{"text": "[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v n = some ifp_n\n⊢ 0 ≤ ifp_n.fr ∧ ifp_n.fr < 1\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v Nat.zero = some ifp_n\n⊢ 0 ≤ ifp_n.fr ∧ ifp_n.fr < 1\ncase succ\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nn✝ : ℕ\nnth_stream_eq : IntFractPair.stream v (Nat.succ n✝) = some ifp_n\n⊢ 0 ≤ ifp_n.fr ∧ ifp_n.fr < 1\n[PROOFSTEP]\ncase zero =>\n  have : IntFractPair.of v = ifp_n := by injection nth_stream_eq\n  rw [← this, IntFractPair.of]\n  exact ⟨fract_nonneg _, fract_lt_one _⟩\n[GOAL]\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v Nat.zero = some ifp_n\n⊢ 0 ≤ ifp_n.fr ∧ ifp_n.fr < 1\n[PROOFSTEP]\ncase zero =>\n  have : IntFractPair.of v = ifp_n := by injection nth_stream_eq\n  rw [← this, IntFractPair.of]\n  exact ⟨fract_nonneg _, fract_lt_one _⟩\n[GOAL]\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v Nat.zero = some ifp_n\n⊢ 0 ≤ ifp_n.fr ∧ ifp_n.fr < 1\n[PROOFSTEP]\nhave : IntFractPair.of v = ifp_n := by injection nth_stream_eq\n[GOAL]\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v Nat.zero = some ifp_n\n⊢ IntFractPair.of v = ifp_n\n[PROOFSTEP]\ninjection nth_stream_eq\n[GOAL]\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v Nat.zero = some ifp_n\nthis : IntFractPair.of v = ifp_n\n⊢ 0 ≤ ifp_n.fr ∧ ifp_n.fr < 1\n[PROOFSTEP]\nrw [← this, IntFractPair.of]\n[GOAL]\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v Nat.zero = some ifp_n\nthis : IntFractPair.of v = ifp_n\n⊢ 0 ≤ { b := ⌊v⌋, fr := fract v }.fr ∧ { b := ⌊v⌋, fr := fract v }.fr < 1\n[PROOFSTEP]\nexact ⟨fract_nonneg _, fract_lt_one _⟩\n[GOAL]\ncase succ\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nn✝ : ℕ\nnth_stream_eq : IntFractPair.stream v (Nat.succ n✝) = some ifp_n\n⊢ 0 ≤ ifp_n.fr ∧ ifp_n.fr < 1\n[PROOFSTEP]\ncase succ =>\n  rcases succ_nth_stream_eq_some_iff.1 nth_stream_eq with ⟨_, _, _, ifp_of_eq_ifp_n⟩\n  rw [← ifp_of_eq_ifp_n, IntFractPair.of]\n  exact ⟨fract_nonneg _, fract_lt_one _⟩\n[GOAL]\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nn✝ : ℕ\nnth_stream_eq : IntFractPair.stream v (Nat.succ n✝) = some ifp_n\n⊢ 0 ≤ ifp_n.fr ∧ ifp_n.fr < 1\n[PROOFSTEP]\ncase succ =>\n  rcases succ_nth_stream_eq_some_iff.1 nth_stream_eq with ⟨_, _, _, ifp_of_eq_ifp_n⟩\n  rw [← ifp_of_eq_ifp_n, IntFractPair.of]\n  exact ⟨fract_nonneg _, fract_lt_one _⟩\n[GOAL]\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nn✝ : ℕ\nnth_stream_eq : IntFractPair.stream v (Nat.succ n✝) = some ifp_n\n⊢ 0 ≤ ifp_n.fr ∧ ifp_n.fr < 1\n[PROOFSTEP]\nrcases succ_nth_stream_eq_some_iff.1 nth_stream_eq with ⟨_, _, _, ifp_of_eq_ifp_n⟩\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nn✝ : ℕ\nnth_stream_eq : IntFractPair.stream v (Nat.succ n✝) = some ifp_n\nw✝ : IntFractPair K\nleft✝¹ : IntFractPair.stream v n✝ = some w✝\nleft✝ : w✝.fr ≠ 0\nifp_of_eq_ifp_n : IntFractPair.of w✝.fr⁻¹ = ifp_n\n⊢ 0 ≤ ifp_n.fr ∧ ifp_n.fr < 1\n[PROOFSTEP]\nrw [← ifp_of_eq_ifp_n, IntFractPair.of]\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nn✝ : ℕ\nnth_stream_eq : IntFractPair.stream v (Nat.succ n✝) = some ifp_n\nw✝ : IntFractPair K\nleft✝¹ : IntFractPair.stream v n✝ = some w✝\nleft✝ : w✝.fr ≠ 0\nifp_of_eq_ifp_n : IntFractPair.of w✝.fr⁻¹ = ifp_n\n⊢ 0 ≤ { b := ⌊w✝.fr⁻¹⌋, fr := fract w✝.fr⁻¹ }.fr ∧ { b := ⌊w✝.fr⁻¹⌋, fr := fract w✝.fr⁻¹ }.fr < 1\n[PROOFSTEP]\nexact ⟨fract_nonneg _, fract_lt_one _⟩\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\n⊢ 1 ≤ ifp_succ_n.b\n[PROOFSTEP]\nobtain ⟨ifp_n, nth_stream_eq, stream_nth_fr_ne_zero, ⟨-⟩⟩ :\n  ∃ ifp_n, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr ≠ 0 ∧ IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\n⊢ ∃ ifp_n, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr ≠ 0 ∧ IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ncase intro.intro.intro.refl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)\n⊢ 1 ≤ (IntFractPair.of ifp_n.fr⁻¹).b\n[PROOFSTEP]\nexact succ_nth_stream_eq_some_iff.1 succ_nth_stream_eq\n[GOAL]\ncase intro.intro.intro.refl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)\n⊢ 1 ≤ (IntFractPair.of ifp_n.fr⁻¹).b\n[PROOFSTEP]\nsuffices 1 ≤ ifp_n.fr⁻¹ by rwa [IntFractPair.of, le_floor, cast_one]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)\nthis : 1 ≤ ifp_n.fr⁻¹\n⊢ 1 ≤ (IntFractPair.of ifp_n.fr⁻¹).b\n[PROOFSTEP]\nrwa [IntFractPair.of, le_floor, cast_one]\n[GOAL]\ncase intro.intro.intro.refl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)\n⊢ 1 ≤ ifp_n.fr⁻¹\n[PROOFSTEP]\nsuffices ifp_n.fr ≤ 1\n  by\n  have h : 0 < ifp_n.fr := lt_of_le_of_ne (nth_stream_fr_nonneg nth_stream_eq) stream_nth_fr_ne_zero.symm\n  apply one_le_inv h this\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)\nthis : ifp_n.fr ≤ 1\n⊢ 1 ≤ ifp_n.fr⁻¹\n[PROOFSTEP]\nhave h : 0 < ifp_n.fr := lt_of_le_of_ne (nth_stream_fr_nonneg nth_stream_eq) stream_nth_fr_ne_zero.symm\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)\nthis : ifp_n.fr ≤ 1\nh : 0 < ifp_n.fr\n⊢ 1 ≤ ifp_n.fr⁻¹\n[PROOFSTEP]\napply one_le_inv h this\n[GOAL]\ncase intro.intro.intro.refl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)\n⊢ ifp_n.fr ≤ 1\n[PROOFSTEP]\nsimp only [le_of_lt (nth_stream_fr_lt_one nth_stream_eq)]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n ifp_succ_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v n = some ifp_n\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\n⊢ ↑ifp_succ_n.b ≤ ifp_n.fr⁻¹\n[PROOFSTEP]\nsuffices (⌊ifp_n.fr⁻¹⌋ : K) ≤ ifp_n.fr⁻¹ by\n  cases' ifp_n with _ ifp_n_fr\n  have : ifp_n_fr ≠ 0 := by\n    intro h\n    simp [h, IntFractPair.stream, nth_stream_eq] at succ_nth_stream_eq \n  have : IntFractPair.of ifp_n_fr⁻¹ = ifp_succ_n := by\n    simpa [this, IntFractPair.stream, nth_stream_eq, Option.coe_def] using succ_nth_stream_eq\n  rwa [← this]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n ifp_succ_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v n = some ifp_n\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nthis : ↑⌊ifp_n.fr⁻¹⌋ ≤ ifp_n.fr⁻¹\n⊢ ↑ifp_succ_n.b ≤ ifp_n.fr⁻¹\n[PROOFSTEP]\ncases' ifp_n with _ ifp_n_fr\n[GOAL]\ncase mk\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nb✝ : ℤ\nifp_n_fr : K\nnth_stream_eq : IntFractPair.stream v n = some { b := b✝, fr := ifp_n_fr }\nthis : ↑⌊{ b := b✝, fr := ifp_n_fr }.fr⁻¹⌋ ≤ { b := b✝, fr := ifp_n_fr }.fr⁻¹\n⊢ ↑ifp_succ_n.b ≤ { b := b✝, fr := ifp_n_fr }.fr⁻¹\n[PROOFSTEP]\nhave : ifp_n_fr ≠ 0 := by\n  intro h\n  simp [h, IntFractPair.stream, nth_stream_eq] at succ_nth_stream_eq \n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nb✝ : ℤ\nifp_n_fr : K\nnth_stream_eq : IntFractPair.stream v n = some { b := b✝, fr := ifp_n_fr }\nthis : ↑⌊{ b := b✝, fr := ifp_n_fr }.fr⁻¹⌋ ≤ { b := b✝, fr := ifp_n_fr }.fr⁻¹\n⊢ ifp_n_fr ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nb✝ : ℤ\nifp_n_fr : K\nnth_stream_eq : IntFractPair.stream v n = some { b := b✝, fr := ifp_n_fr }\nthis : ↑⌊{ b := b✝, fr := ifp_n_fr }.fr⁻¹⌋ ≤ { b := b✝, fr := ifp_n_fr }.fr⁻¹\nh : ifp_n_fr = 0\n⊢ False\n[PROOFSTEP]\nsimp [h, IntFractPair.stream, nth_stream_eq] at succ_nth_stream_eq \n[GOAL]\ncase mk\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nb✝ : ℤ\nifp_n_fr : K\nnth_stream_eq : IntFractPair.stream v n = some { b := b✝, fr := ifp_n_fr }\nthis✝ : ↑⌊{ b := b✝, fr := ifp_n_fr }.fr⁻¹⌋ ≤ { b := b✝, fr := ifp_n_fr }.fr⁻¹\nthis : ifp_n_fr ≠ 0\n⊢ ↑ifp_succ_n.b ≤ { b := b✝, fr := ifp_n_fr }.fr⁻¹\n[PROOFSTEP]\nhave : IntFractPair.of ifp_n_fr⁻¹ = ifp_succ_n := by\n  simpa [this, IntFractPair.stream, nth_stream_eq, Option.coe_def] using succ_nth_stream_eq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nb✝ : ℤ\nifp_n_fr : K\nnth_stream_eq : IntFractPair.stream v n = some { b := b✝, fr := ifp_n_fr }\nthis✝ : ↑⌊{ b := b✝, fr := ifp_n_fr }.fr⁻¹⌋ ≤ { b := b✝, fr := ifp_n_fr }.fr⁻¹\nthis : ifp_n_fr ≠ 0\n⊢ IntFractPair.of ifp_n_fr⁻¹ = ifp_succ_n\n[PROOFSTEP]\nsimpa [this, IntFractPair.stream, nth_stream_eq, Option.coe_def] using succ_nth_stream_eq\n[GOAL]\ncase mk\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nb✝ : ℤ\nifp_n_fr : K\nnth_stream_eq : IntFractPair.stream v n = some { b := b✝, fr := ifp_n_fr }\nthis✝¹ : ↑⌊{ b := b✝, fr := ifp_n_fr }.fr⁻¹⌋ ≤ { b := b✝, fr := ifp_n_fr }.fr⁻¹\nthis✝ : ifp_n_fr ≠ 0\nthis : IntFractPair.of ifp_n_fr⁻¹ = ifp_succ_n\n⊢ ↑ifp_succ_n.b ≤ { b := b✝, fr := ifp_n_fr }.fr⁻¹\n[PROOFSTEP]\nrwa [← this]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp_n ifp_succ_n : IntFractPair K\nnth_stream_eq : IntFractPair.stream v n = some ifp_n\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\n⊢ ↑⌊ifp_n.fr⁻¹⌋ ≤ ifp_n.fr⁻¹\n[PROOFSTEP]\nexact floor_le ifp_n.fr⁻¹\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\n⊢ 1 ≤ b\n[PROOFSTEP]\nobtain ⟨gp_n, nth_s_eq, ⟨-⟩⟩ : ∃ gp_n, (of v).s.get? n = some gp_n ∧ gp_n.b = b\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\n⊢ ∃ gp_n, Stream'.Seq.get? (of v).s n = some gp_n ∧ gp_n.b = b\ncase intro.intro.refl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp_n : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp_n\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some gp_n.b\n⊢ 1 ≤ gp_n.b\n[PROOFSTEP]\nexact exists_s_b_of_part_denom nth_part_denom_eq\n[GOAL]\ncase intro.intro.refl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp_n : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp_n\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some gp_n.b\n⊢ 1 ≤ gp_n.b\n[PROOFSTEP]\nobtain ⟨ifp_n, succ_nth_stream_eq, ifp_n_b_eq_gp_n_b⟩ :\n  ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ (ifp.b : K) = gp_n.b\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp_n : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp_n\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some gp_n.b\n⊢ ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ ↑ifp.b = gp_n.b\ncase intro.intro.refl.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp_n : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp_n\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some gp_n.b\nifp_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_n\nifp_n_b_eq_gp_n_b : ↑ifp_n.b = gp_n.b\n⊢ 1 ≤ gp_n.b\n[PROOFSTEP]\nexact IntFractPair.exists_succ_get?_stream_of_gcf_of_get?_eq_some nth_s_eq\n[GOAL]\ncase intro.intro.refl.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp_n : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp_n\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some gp_n.b\nifp_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_n\nifp_n_b_eq_gp_n_b : ↑ifp_n.b = gp_n.b\n⊢ 1 ≤ gp_n.b\n[PROOFSTEP]\nrw [← ifp_n_b_eq_gp_n_b]\n[GOAL]\ncase intro.intro.refl.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp_n : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp_n\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some gp_n.b\nifp_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_n\nifp_n_b_eq_gp_n_b : ↑ifp_n.b = gp_n.b\n⊢ 1 ≤ ↑ifp_n.b\n[PROOFSTEP]\nexact_mod_cast IntFractPair.one_le_succ_nth_stream_b succ_nth_stream_eq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\n⊢ gp.a = 1 ∧ ∃ z, gp.b = ↑z\n[PROOFSTEP]\nobtain ⟨ifp, stream_succ_nth_eq, -⟩ : ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ _\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\n⊢ ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ ?m.6997 ifp\ncase intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\nifp : IntFractPair K\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp\n⊢ gp.a = 1 ∧ ∃ z, gp.b = ↑z\n[PROOFSTEP]\nexact IntFractPair.exists_succ_get?_stream_of_gcf_of_get?_eq_some nth_s_eq\n[GOAL]\ncase intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\nifp : IntFractPair K\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp\n⊢ gp.a = 1 ∧ ∃ z, gp.b = ↑z\n[PROOFSTEP]\nhave : gp = ⟨1, ifp.b⟩ :=\n  by\n  have : (of v).s.get? n = some ⟨1, ifp.b⟩ := get?_of_eq_some_of_succ_get?_intFractPair_stream stream_succ_nth_eq\n  have : some gp = some ⟨1, ifp.b⟩ := by rwa [nth_s_eq] at this \n  injection this\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\nifp : IntFractPair K\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp\n⊢ gp = { a := 1, b := ↑ifp.b }\n[PROOFSTEP]\nhave : (of v).s.get? n = some ⟨1, ifp.b⟩ := get?_of_eq_some_of_succ_get?_intFractPair_stream stream_succ_nth_eq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\nifp : IntFractPair K\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp\nthis : Stream'.Seq.get? (of v).s n = some { a := 1, b := ↑ifp.b }\n⊢ gp = { a := 1, b := ↑ifp.b }\n[PROOFSTEP]\nhave : some gp = some ⟨1, ifp.b⟩ := by rwa [nth_s_eq] at this \n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\nifp : IntFractPair K\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp\nthis : Stream'.Seq.get? (of v).s n = some { a := 1, b := ↑ifp.b }\n⊢ some gp = some { a := 1, b := ↑ifp.b }\n[PROOFSTEP]\nrwa [nth_s_eq] at this \n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\nifp : IntFractPair K\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp\nthis✝ : Stream'.Seq.get? (of v).s n = some { a := 1, b := ↑ifp.b }\nthis : some gp = some { a := 1, b := ↑ifp.b }\n⊢ gp = { a := 1, b := ↑ifp.b }\n[PROOFSTEP]\ninjection this\n[GOAL]\ncase intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\nifp : IntFractPair K\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp\nthis : gp = { a := 1, b := ↑ifp.b }\n⊢ gp.a = 1 ∧ ∃ z, gp.b = ↑z\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\na : K\nnth_part_num_eq : Stream'.Seq.get? (partialNumerators (of v)) n = some a\n⊢ a = 1\n[PROOFSTEP]\nobtain ⟨gp, nth_s_eq, gp_a_eq_a_n⟩ : ∃ gp, (of v).s.get? n = some gp ∧ gp.a = a\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\na : K\nnth_part_num_eq : Stream'.Seq.get? (partialNumerators (of v)) n = some a\n⊢ ∃ gp, Stream'.Seq.get? (of v).s n = some gp ∧ gp.a = a\ncase intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\na : K\nnth_part_num_eq : Stream'.Seq.get? (partialNumerators (of v)) n = some a\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\ngp_a_eq_a_n : gp.a = a\n⊢ a = 1\n[PROOFSTEP]\nexact exists_s_a_of_part_num nth_part_num_eq\n[GOAL]\ncase intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\na : K\nnth_part_num_eq : Stream'.Seq.get? (partialNumerators (of v)) n = some a\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\ngp_a_eq_a_n : gp.a = a\n⊢ a = 1\n[PROOFSTEP]\nhave : gp.a = 1 := (of_part_num_eq_one_and_exists_int_part_denom_eq nth_s_eq).left\n[GOAL]\ncase intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\na : K\nnth_part_num_eq : Stream'.Seq.get? (partialNumerators (of v)) n = some a\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\ngp_a_eq_a_n : gp.a = a\nthis : gp.a = 1\n⊢ a = 1\n[PROOFSTEP]\nrwa [gp_a_eq_a_n] at this \n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\n⊢ ∃ z, b = ↑z\n[PROOFSTEP]\nobtain ⟨gp, nth_s_eq, gp_b_eq_b_n⟩ : ∃ gp, (of v).s.get? n = some gp ∧ gp.b = b\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\n⊢ ∃ gp, Stream'.Seq.get? (of v).s n = some gp ∧ gp.b = b\ncase intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\ngp_b_eq_b_n : gp.b = b\n⊢ ∃ z, b = ↑z\n[PROOFSTEP]\nexact exists_s_b_of_part_denom nth_part_denom_eq\n[GOAL]\ncase intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\ngp_b_eq_b_n : gp.b = b\n⊢ ∃ z, b = ↑z\n[PROOFSTEP]\nhave : ∃ z : ℤ, gp.b = (z : K) := (of_part_num_eq_one_and_exists_int_part_denom_eq nth_s_eq).right\n[GOAL]\ncase intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\ngp : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp\ngp_b_eq_b_n : gp.b = b\nthis : ∃ z, gp.b = ↑z\n⊢ ∃ z, b = ↑z\n[PROOFSTEP]\nrwa [gp_b_eq_b_n] at this \n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\n⊢ ∀ (n : ℕ),\n    (∀ (m : ℕ), m < n → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b) →\n      n ≤ 1 ∨ ¬TerminatedAt (of v) (n - 2) → ↑(fib n) ≤ (continuantsAux (of v) n).b\n[PROOFSTEP]\nintro n IH hyp\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH : ∀ (m : ℕ), m < n → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : n ≤ 1 ∨ ¬TerminatedAt (of v) (n - 2)\n⊢ ↑(fib n) ≤ (continuantsAux (of v) n).b\n[PROOFSTEP]\nrcases n with (_ | _ | n)\n[GOAL]\ncase zero\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nIH : ∀ (m : ℕ), m < zero → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : zero ≤ 1 ∨ ¬TerminatedAt (of v) (zero - 2)\n⊢ ↑(fib zero) ≤ (continuantsAux (of v) zero).b\n[PROOFSTEP]\nsimp [fib_add_two, continuantsAux]\n  -- case n = 0\n[GOAL]\ncase succ.zero\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nIH : ∀ (m : ℕ), m < Nat.succ zero → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ zero ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ zero - 2)\n⊢ ↑(fib (Nat.succ zero)) ≤ (continuantsAux (of v) (Nat.succ zero)).b\n[PROOFSTEP]\nsimp [fib_add_two, continuantsAux]\n  -- case n = 1\n[GOAL]\ncase succ.succ\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\n⊢ ↑(fib (Nat.succ (Nat.succ n))) ≤ (continuantsAux (of v) (Nat.succ (Nat.succ n))).b\n[PROOFSTEP]\nlet g := of v\n[GOAL]\ncase succ.succ\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\n⊢ ↑(fib (Nat.succ (Nat.succ n))) ≤ (continuantsAux (of v) (Nat.succ (Nat.succ n))).b\n[PROOFSTEP]\nhave : ¬n + 2 ≤ 1 := by linarith\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\n⊢ ¬n + 2 ≤ 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase succ.succ\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\n⊢ ↑(fib (Nat.succ (Nat.succ n))) ≤ (continuantsAux (of v) (Nat.succ (Nat.succ n))).b\n[PROOFSTEP]\nhave not_terminated_at_n : ¬g.TerminatedAt n := Or.resolve_left hyp this\n[GOAL]\ncase succ.succ\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\n⊢ ↑(fib (Nat.succ (Nat.succ n))) ≤ (continuantsAux (of v) (Nat.succ (Nat.succ n))).b\n[PROOFSTEP]\nobtain ⟨gp, s_ppred_nth_eq⟩ : ∃ gp, g.s.get? n = some gp\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\n⊢ ∃ gp, Stream'.Seq.get? g.s n = some gp\ncase succ.succ.intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\n⊢ ↑(fib (Nat.succ (Nat.succ n))) ≤ (continuantsAux (of v) (Nat.succ (Nat.succ n))).b\n[PROOFSTEP]\nexact Option.ne_none_iff_exists'.mp not_terminated_at_n\n[GOAL]\ncase succ.succ.intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\n⊢ ↑(fib (Nat.succ (Nat.succ n))) ≤ (continuantsAux (of v) (Nat.succ (Nat.succ n))).b\n[PROOFSTEP]\nset pconts := g.continuantsAux (n + 1) with pconts_eq\n[GOAL]\ncase succ.succ.intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\n⊢ ↑(fib (Nat.succ (Nat.succ n))) ≤ (continuantsAux (of v) (Nat.succ (Nat.succ n))).b\n[PROOFSTEP]\nset ppconts := g.continuantsAux n with ppconts_eq\n[GOAL]\ncase succ.succ.intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\n⊢ ↑(fib (Nat.succ (Nat.succ n))) ≤ (continuantsAux (of v) (Nat.succ (Nat.succ n))).b\n[PROOFSTEP]\nsuffices (fib n : K) + fib (n + 1) ≤ gp.a * ppconts.b + gp.b * pconts.b by\n  simpa [fib_add_two, add_comm, continuantsAux_recurrence s_ppred_nth_eq ppconts_eq pconts_eq]\n    -- make use of the fact that `gp.a = 1`\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis✝ : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nthis : ↑(fib n) + ↑(fib (n + 1)) ≤ gp.a * ppconts.b + gp.b * pconts.b\n⊢ ↑(fib (Nat.succ (Nat.succ n))) ≤ (continuantsAux (of v) (Nat.succ (Nat.succ n))).b\n[PROOFSTEP]\nsimpa [fib_add_two, add_comm, continuantsAux_recurrence s_ppred_nth_eq ppconts_eq pconts_eq]\n  -- make use of the fact that `gp.a = 1`\n[GOAL]\ncase succ.succ.intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\n⊢ ↑(fib n) + ↑(fib (n + 1)) ≤ gp.a * ppconts.b + gp.b * pconts.b\n[PROOFSTEP]\nsuffices (fib n : K) + fib (n + 1) ≤ ppconts.b + gp.b * pconts.b by\n  simpa [of_part_num_eq_one <| part_num_eq_s_a s_ppred_nth_eq]\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis✝ : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nthis : ↑(fib n) + ↑(fib (n + 1)) ≤ ppconts.b + gp.b * pconts.b\n⊢ ↑(fib n) + ↑(fib (n + 1)) ≤ gp.a * ppconts.b + gp.b * pconts.b\n[PROOFSTEP]\nsimpa [of_part_num_eq_one <| part_num_eq_s_a s_ppred_nth_eq]\n[GOAL]\ncase succ.succ.intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\n⊢ ↑(fib n) + ↑(fib (n + 1)) ≤ ppconts.b + gp.b * pconts.b\n[PROOFSTEP]\nhave not_terminated_at_pred_n : ¬g.TerminatedAt (n - 1) := mt (terminated_stable <| Nat.sub_le n 1) not_terminated_at_n\n[GOAL]\ncase succ.succ.intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\n⊢ ↑(fib n) + ↑(fib (n + 1)) ≤ ppconts.b + gp.b * pconts.b\n[PROOFSTEP]\nhave not_terminated_at_ppred_n : ¬TerminatedAt g (n - 2) :=\n  mt (terminated_stable (n - 1).pred_le) not_terminated_at_pred_n\n[GOAL]\ncase succ.succ.intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\n⊢ ↑(fib n) + ↑(fib (n + 1)) ≤ ppconts.b + gp.b * pconts.b\n[PROOFSTEP]\nhave ppred_nth_fib_le_ppconts_B : (fib n : K) ≤ ppconts.b :=\n  IH n (lt_trans (Nat.lt.base n) <| Nat.lt.base <| n + 1) (Or.inr not_terminated_at_ppred_n)\n[GOAL]\ncase succ.succ.intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\nppred_nth_fib_le_ppconts_B : ↑(fib n) ≤ ppconts.b\n⊢ ↑(fib n) + ↑(fib (n + 1)) ≤ ppconts.b + gp.b * pconts.b\n[PROOFSTEP]\nsuffices : (fib (n + 1) : K) ≤ gp.b * pconts.b\n[GOAL]\ncase succ.succ.intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis✝ : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\nppred_nth_fib_le_ppconts_B : ↑(fib n) ≤ ppconts.b\nthis : ↑(fib (n + 1)) ≤ gp.b * pconts.b\n⊢ ↑(fib n) + ↑(fib (n + 1)) ≤ ppconts.b + gp.b * pconts.b\ncase this\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\nppred_nth_fib_le_ppconts_B : ↑(fib n) ≤ ppconts.b\n⊢ ↑(fib (n + 1)) ≤ gp.b * pconts.b\n[PROOFSTEP]\nsolve_by_elim [_root_.add_le_add ppred_nth_fib_le_ppconts_B]\n  -- finally use the fact that `1 ≤ gp.b` to solve the goal\n[GOAL]\ncase this\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\nppred_nth_fib_le_ppconts_B : ↑(fib n) ≤ ppconts.b\n⊢ ↑(fib (n + 1)) ≤ gp.b * pconts.b\n[PROOFSTEP]\nsuffices 1 * (fib (n + 1) : K) ≤ gp.b * pconts.b by rwa [one_mul] at this \n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis✝ : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\nppred_nth_fib_le_ppconts_B : ↑(fib n) ≤ ppconts.b\nthis : 1 * ↑(fib (n + 1)) ≤ gp.b * pconts.b\n⊢ ↑(fib (n + 1)) ≤ gp.b * pconts.b\n[PROOFSTEP]\nrwa [one_mul] at this \n[GOAL]\ncase this\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\nppred_nth_fib_le_ppconts_B : ↑(fib n) ≤ ppconts.b\n⊢ 1 * ↑(fib (n + 1)) ≤ gp.b * pconts.b\n[PROOFSTEP]\nhave one_le_gp_b : (1 : K) ≤ gp.b := of_one_le_get?_part_denom (part_denom_eq_s_b s_ppred_nth_eq)\n[GOAL]\ncase this\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\nppred_nth_fib_le_ppconts_B : ↑(fib n) ≤ ppconts.b\none_le_gp_b : 1 ≤ gp.b\n⊢ 1 * ↑(fib (n + 1)) ≤ gp.b * pconts.b\n[PROOFSTEP]\nhave : (0 : K) ≤ fib (n + 1) := by exact_mod_cast (fib (n + 1)).zero_le\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\nppred_nth_fib_le_ppconts_B : ↑(fib n) ≤ ppconts.b\none_le_gp_b : 1 ≤ gp.b\n⊢ 0 ≤ ↑(fib (n + 1))\n[PROOFSTEP]\nexact_mod_cast (fib (n + 1)).zero_le\n[GOAL]\ncase this\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis✝ : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\nppred_nth_fib_le_ppconts_B : ↑(fib n) ≤ ppconts.b\none_le_gp_b : 1 ≤ gp.b\nthis : 0 ≤ ↑(fib (n + 1))\n⊢ 1 * ↑(fib (n + 1)) ≤ gp.b * pconts.b\n[PROOFSTEP]\nhave : (0 : K) ≤ gp.b := le_trans zero_le_one one_le_gp_b\n[GOAL]\ncase this\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis✝¹ : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\nppred_nth_fib_le_ppconts_B : ↑(fib n) ≤ ppconts.b\none_le_gp_b : 1 ≤ gp.b\nthis✝ : 0 ≤ ↑(fib (n + 1))\nthis : 0 ≤ gp.b\n⊢ 1 * ↑(fib (n + 1)) ≤ gp.b * pconts.b\n[PROOFSTEP]\nmono\n[GOAL]\ncase this.h₂.a\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis✝¹ : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\nppred_nth_fib_le_ppconts_B : ↑(fib n) ≤ ppconts.b\none_le_gp_b : 1 ≤ gp.b\nthis✝ : 0 ≤ ↑(fib (n + 1))\nthis : 0 ≤ gp.b\ns_ppred_nth_eq_symm : some gp = Stream'.Seq.get? g.s n\n⊢ n + 1 < Nat.succ (Nat.succ n)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase this.h₂.a\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ (Nat.succ n) → m ≤ 1 ∨ ¬TerminatedAt (of v) (m - 2) → ↑(fib m) ≤ (continuantsAux (of v) m).b\nhyp : Nat.succ (Nat.succ n) ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ (Nat.succ n) - 2)\ng : GeneralizedContinuedFraction K := of v\nthis✝¹ : ¬n + 2 ≤ 1\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_ppred_nth_eq : Stream'.Seq.get? g.s n = some gp\npconts : Pair K := continuantsAux g (n + 1)\npconts_eq : pconts = continuantsAux g (n + 1)\nppconts : Pair K := continuantsAux g n\nppconts_eq : ppconts = continuantsAux g n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\nnot_terminated_at_ppred_n : ¬TerminatedAt g (n - 2)\nppred_nth_fib_le_ppconts_B : ↑(fib n) ≤ ppconts.b\none_le_gp_b : 1 ≤ gp.b\nthis✝ : 0 ≤ ↑(fib (n + 1))\nthis : 0 ≤ gp.b\ns_ppred_nth_eq_symm : some gp = Stream'.Seq.get? g.s n\n⊢ n + 1 ≤ 1 ∨ ¬TerminatedAt (of v) (n + 1 - 2)\n[PROOFSTEP]\ntauto\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp : n = 0 ∨ ¬TerminatedAt (of v) (n - 1)\n⊢ ↑(fib (n + 1)) ≤ denominators (of v) n\n[PROOFSTEP]\nrw [denom_eq_conts_b, nth_cont_eq_succ_nth_cont_aux]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp : n = 0 ∨ ¬TerminatedAt (of v) (n - 1)\n⊢ ↑(fib (n + 1)) ≤ (continuantsAux (of v) (n + 1)).b\n[PROOFSTEP]\nhave : n + 1 ≤ 1 ∨ ¬(of v).TerminatedAt (n - 1) := by\n  cases' n with n\n  case zero => exact Or.inl <| le_refl 1\n  case succ => exact Or.inr (Or.resolve_left hyp n.succ_ne_zero)\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp : n = 0 ∨ ¬TerminatedAt (of v) (n - 1)\n⊢ n + 1 ≤ 1 ∨ ¬TerminatedAt (of v) (n - 1)\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp : zero = 0 ∨ ¬TerminatedAt (of v) (zero - 1)\n⊢ zero + 1 ≤ 1 ∨ ¬TerminatedAt (of v) (zero - 1)\ncase succ\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\n⊢ Nat.succ n + 1 ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\n[PROOFSTEP]\ncase zero => exact Or.inl <| le_refl 1\n[GOAL]\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp : zero = 0 ∨ ¬TerminatedAt (of v) (zero - 1)\n⊢ zero + 1 ≤ 1 ∨ ¬TerminatedAt (of v) (zero - 1)\n[PROOFSTEP]\ncase zero => exact Or.inl <| le_refl 1\n[GOAL]\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp : zero = 0 ∨ ¬TerminatedAt (of v) (zero - 1)\n⊢ zero + 1 ≤ 1 ∨ ¬TerminatedAt (of v) (zero - 1)\n[PROOFSTEP]\nexact Or.inl <| le_refl 1\n[GOAL]\ncase succ\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\n⊢ Nat.succ n + 1 ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\n[PROOFSTEP]\ncase succ => exact Or.inr (Or.resolve_left hyp n.succ_ne_zero)\n[GOAL]\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\n⊢ Nat.succ n + 1 ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\n[PROOFSTEP]\ncase succ => exact Or.inr (Or.resolve_left hyp n.succ_ne_zero)\n[GOAL]\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\n⊢ Nat.succ n + 1 ≤ 1 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\n[PROOFSTEP]\nexact Or.inr (Or.resolve_left hyp n.succ_ne_zero)\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp : n = 0 ∨ ¬TerminatedAt (of v) (n - 1)\nthis : n + 1 ≤ 1 ∨ ¬TerminatedAt (of v) (n - 1)\n⊢ ↑(fib (n + 1)) ≤ (continuantsAux (of v) (n + 1)).b\n[PROOFSTEP]\nexact fib_le_of_continuantsAux_b this\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\n⊢ 0 ≤ (continuantsAux (of v) n).b\n[PROOFSTEP]\nlet g := of v\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\n⊢ 0 ≤ (continuantsAux (of v) n).b\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\n⊢ 0 ≤ (continuantsAux (of v) zero).b\ncase succ\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nn : ℕ\nIH : 0 ≤ (continuantsAux (of v) n).b\n⊢ 0 ≤ (continuantsAux (of v) (Nat.succ n)).b\n[PROOFSTEP]\ncase zero => rfl\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\n⊢ 0 ≤ (continuantsAux (of v) zero).b\n[PROOFSTEP]\ncase zero => rfl\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\n⊢ 0 ≤ (continuantsAux (of v) zero).b\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nn : ℕ\nIH : 0 ≤ (continuantsAux (of v) n).b\n⊢ 0 ≤ (continuantsAux (of v) (Nat.succ n)).b\n[PROOFSTEP]\ncase succ =>\n  cases' Decidable.em <| g.TerminatedAt (n - 1) with terminated not_terminated\n  ·\n    -- terminating case\n    cases' n with n\n    · simp [succ_eq_add_one, zero_le_one]\n    · have : g.continuantsAux (n + 2) = g.continuantsAux (n + 1) := continuantsAux_stable_step_of_terminated terminated\n      simp only [this, IH]\n  ·\n    -- non-terminating casecalc\n      (0 : K) ≤ fib (n + 1) := by exact_mod_cast (n + 1).fib.zero_le\n      _ ≤ ((of v).continuantsAux (n + 1)).b := fib_le_of_continuantsAux_b (Or.inr not_terminated)\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nn : ℕ\nIH : 0 ≤ (continuantsAux (of v) n).b\n⊢ 0 ≤ (continuantsAux (of v) (Nat.succ n)).b\n[PROOFSTEP]\ncase succ =>\n  cases' Decidable.em <| g.TerminatedAt (n - 1) with terminated not_terminated\n  ·\n    -- terminating case\n    cases' n with n\n    · simp [succ_eq_add_one, zero_le_one]\n    · have : g.continuantsAux (n + 2) = g.continuantsAux (n + 1) := continuantsAux_stable_step_of_terminated terminated\n      simp only [this, IH]\n  ·\n    -- non-terminating casecalc\n      (0 : K) ≤ fib (n + 1) := by exact_mod_cast (n + 1).fib.zero_le\n      _ ≤ ((of v).continuantsAux (n + 1)).b := fib_le_of_continuantsAux_b (Or.inr not_terminated)\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nn : ℕ\nIH : 0 ≤ (continuantsAux (of v) n).b\n⊢ 0 ≤ (continuantsAux (of v) (Nat.succ n)).b\n[PROOFSTEP]\ncases' Decidable.em <| g.TerminatedAt (n - 1) with terminated not_terminated\n[GOAL]\ncase inl\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nn : ℕ\nIH : 0 ≤ (continuantsAux (of v) n).b\nterminated : TerminatedAt g (n - 1)\n⊢ 0 ≤ (continuantsAux (of v) (Nat.succ n)).b\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase inl.zero\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nIH : 0 ≤ (continuantsAux (of v) zero).b\nterminated : TerminatedAt g (zero - 1)\n⊢ 0 ≤ (continuantsAux (of v) (Nat.succ zero)).b\n[PROOFSTEP]\nsimp [succ_eq_add_one, zero_le_one]\n[GOAL]\ncase inl.succ\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nn : ℕ\nIH : 0 ≤ (continuantsAux (of v) (Nat.succ n)).b\nterminated : TerminatedAt g (Nat.succ n - 1)\n⊢ 0 ≤ (continuantsAux (of v) (Nat.succ (Nat.succ n))).b\n[PROOFSTEP]\nhave : g.continuantsAux (n + 2) = g.continuantsAux (n + 1) := continuantsAux_stable_step_of_terminated terminated\n[GOAL]\ncase inl.succ\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nn : ℕ\nIH : 0 ≤ (continuantsAux (of v) (Nat.succ n)).b\nterminated : TerminatedAt g (Nat.succ n - 1)\nthis : continuantsAux g (n + 2) = continuantsAux g (n + 1)\n⊢ 0 ≤ (continuantsAux (of v) (Nat.succ (Nat.succ n))).b\n[PROOFSTEP]\nsimp only [this, IH]\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nn : ℕ\nIH : 0 ≤ (continuantsAux (of v) n).b\nnot_terminated : ¬TerminatedAt g (n - 1)\n⊢ 0 ≤ (continuantsAux (of v) (Nat.succ n)).b\n[PROOFSTEP]\ncalc\n  (0 : K) ≤ fib (n + 1) := by exact_mod_cast (n + 1).fib.zero_le\n  _ ≤ ((of v).continuantsAux (n + 1)).b := fib_le_of_continuantsAux_b (Or.inr not_terminated)\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nn : ℕ\nIH : 0 ≤ (continuantsAux (of v) n).b\nnot_terminated : ¬TerminatedAt g (n - 1)\n⊢ 0 ≤ ↑(fib (n + 1))\n[PROOFSTEP]\nexact_mod_cast (n + 1).fib.zero_le\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\n⊢ 0 ≤ denominators (of v) n\n[PROOFSTEP]\nrw [denom_eq_conts_b, nth_cont_eq_succ_nth_cont_aux]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\n⊢ 0 ≤ (continuantsAux (of v) (n + 1)).b\n[PROOFSTEP]\nexact zero_le_of_continuantsAux_b\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\n⊢ b * (continuantsAux (of v) (n + 1)).b ≤ (continuantsAux (of v) (n + 2)).b\n[PROOFSTEP]\nobtain ⟨gp_n, nth_s_eq, rfl⟩ : ∃ gp_n, (of v).s.get? n = some gp_n ∧ gp_n.b = b\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\n⊢ ∃ gp_n, Stream'.Seq.get? (of v).s n = some gp_n ∧ gp_n.b = b\ncase intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp_n : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp_n\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some gp_n.b\n⊢ gp_n.b * (continuantsAux (of v) (n + 1)).b ≤ (continuantsAux (of v) (n + 2)).b\n[PROOFSTEP]\nexact exists_s_b_of_part_denom nth_part_denom_eq\n[GOAL]\ncase intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ngp_n : Pair K\nnth_s_eq : Stream'.Seq.get? (of v).s n = some gp_n\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some gp_n.b\n⊢ gp_n.b * (continuantsAux (of v) (n + 1)).b ≤ (continuantsAux (of v) (n + 2)).b\n[PROOFSTEP]\nsimp [of_part_num_eq_one (part_num_eq_s_a nth_s_eq), zero_le_of_continuantsAux_b,\n  GeneralizedContinuedFraction.continuantsAux_recurrence nth_s_eq rfl rfl]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\n⊢ b * denominators (of v) n ≤ denominators (of v) (n + 1)\n[PROOFSTEP]\nrw [denom_eq_conts_b, nth_cont_eq_succ_nth_cont_aux]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\n⊢ b * (continuantsAux (of v) (n + 1)).b ≤ denominators (of v) (n + 1)\n[PROOFSTEP]\nexact le_of_succ_succ_get?_continuantsAux_b nth_part_denom_eq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\n⊢ denominators (of v) n ≤ denominators (of v) (n + 1)\n[PROOFSTEP]\nlet g := of v\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\n⊢ denominators (of v) n ≤ denominators (of v) (n + 1)\n[PROOFSTEP]\ncases' Decidable.em <| g.partialDenominators.TerminatedAt n with terminated not_terminated\n[GOAL]\ncase inl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nterminated : Stream'.Seq.TerminatedAt (partialDenominators g) n\n⊢ denominators (of v) n ≤ denominators (of v) (n + 1)\n[PROOFSTEP]\nhave : g.partialDenominators.get? n = none := by rwa [Stream'.Seq.TerminatedAt] at terminated \n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nterminated : Stream'.Seq.TerminatedAt (partialDenominators g) n\n⊢ Stream'.Seq.get? (partialDenominators g) n = none\n[PROOFSTEP]\nrwa [Stream'.Seq.TerminatedAt] at terminated \n[GOAL]\ncase inl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nterminated : Stream'.Seq.TerminatedAt (partialDenominators g) n\nthis : Stream'.Seq.get? (partialDenominators g) n = none\n⊢ denominators (of v) n ≤ denominators (of v) (n + 1)\n[PROOFSTEP]\nhave : g.TerminatedAt n := terminatedAt_iff_part_denom_none.2 (by rwa [Stream'.Seq.TerminatedAt] at terminated )\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nterminated : Stream'.Seq.TerminatedAt (partialDenominators g) n\nthis : Stream'.Seq.get? (partialDenominators g) n = none\n⊢ Stream'.Seq.get? (partialDenominators g) n = none\n[PROOFSTEP]\nrwa [Stream'.Seq.TerminatedAt] at terminated \n[GOAL]\ncase inl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nterminated : Stream'.Seq.TerminatedAt (partialDenominators g) n\nthis✝ : Stream'.Seq.get? (partialDenominators g) n = none\nthis : TerminatedAt g n\n⊢ denominators (of v) n ≤ denominators (of v) (n + 1)\n[PROOFSTEP]\nhave : g.denominators (n + 1) = g.denominators n := denominators_stable_of_terminated n.le_succ this\n[GOAL]\ncase inl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nterminated : Stream'.Seq.TerminatedAt (partialDenominators g) n\nthis✝¹ : Stream'.Seq.get? (partialDenominators g) n = none\nthis✝ : TerminatedAt g n\nthis : denominators g (n + 1) = denominators g n\n⊢ denominators (of v) n ≤ denominators (of v) (n + 1)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nnot_terminated : ¬Stream'.Seq.TerminatedAt (partialDenominators g) n\n⊢ denominators (of v) n ≤ denominators (of v) (n + 1)\n[PROOFSTEP]\nobtain ⟨b, nth_part_denom_eq⟩ : ∃ b, g.partialDenominators.get? n = some b\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nnot_terminated : ¬Stream'.Seq.TerminatedAt (partialDenominators g) n\n⊢ ∃ b, Stream'.Seq.get? (partialDenominators g) n = some b\ncase inr.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nnot_terminated : ¬Stream'.Seq.TerminatedAt (partialDenominators g) n\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators g) n = some b\n⊢ denominators (of v) n ≤ denominators (of v) (n + 1)\n[PROOFSTEP]\nexact Option.ne_none_iff_exists'.mp not_terminated\n[GOAL]\ncase inr.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nnot_terminated : ¬Stream'.Seq.TerminatedAt (partialDenominators g) n\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators g) n = some b\n⊢ denominators (of v) n ≤ denominators (of v) (n + 1)\n[PROOFSTEP]\nhave : 1 ≤ b := of_one_le_get?_part_denom nth_part_denom_eq\n[GOAL]\ncase inr.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nnot_terminated : ¬Stream'.Seq.TerminatedAt (partialDenominators g) n\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators g) n = some b\nthis : 1 ≤ b\n⊢ denominators (of v) n ≤ denominators (of v) (n + 1)\n[PROOFSTEP]\ncalc\n  g.denominators n ≤ b * g.denominators n := by simpa using mul_le_mul_of_nonneg_right this zero_le_of_denom\n  _ ≤ g.denominators (n + 1) := le_of_succ_get?_denom nth_part_denom_eq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\ng : GeneralizedContinuedFraction K := of v\nnot_terminated : ¬Stream'.Seq.TerminatedAt (partialDenominators g) n\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators g) n = some b\nthis : 1 ≤ b\n⊢ denominators g n ≤ b * denominators g n\n[PROOFSTEP]\nsimpa using mul_le_mul_of_nonneg_right this zero_le_of_denom\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp : n = 0 ∨ ¬TerminatedAt (of v) (n - 1)\n⊢ (continuantsAux (of v) n).a * (continuantsAux (of v) (n + 1)).b -\n      (continuantsAux (of v) n).b * (continuantsAux (of v) (n + 1)).a =\n    (-1) ^ n\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n = 0 ∨ ¬TerminatedAt (of v) (n - 1)\nhyp : zero = 0 ∨ ¬TerminatedAt (of v) (zero - 1)\n⊢ (continuantsAux (of v) zero).a * (continuantsAux (of v) (zero + 1)).b -\n      (continuantsAux (of v) zero).b * (continuantsAux (of v) (zero + 1)).a =\n    (-1) ^ zero\ncase succ\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nIH :\n  n = 0 ∨ ¬TerminatedAt (of v) (n - 1) →\n    (continuantsAux (of v) n).a * (continuantsAux (of v) (n + 1)).b -\n        (continuantsAux (of v) n).b * (continuantsAux (of v) (n + 1)).a =\n      (-1) ^ n\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\n⊢ (continuantsAux (of v) (Nat.succ n)).a * (continuantsAux (of v) (Nat.succ n + 1)).b -\n      (continuantsAux (of v) (Nat.succ n)).b * (continuantsAux (of v) (Nat.succ n + 1)).a =\n    (-1) ^ Nat.succ n\n[PROOFSTEP]\ncase zero => simp [continuantsAux]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n = 0 ∨ ¬TerminatedAt (of v) (n - 1)\nhyp : zero = 0 ∨ ¬TerminatedAt (of v) (zero - 1)\n⊢ (continuantsAux (of v) zero).a * (continuantsAux (of v) (zero + 1)).b -\n      (continuantsAux (of v) zero).b * (continuantsAux (of v) (zero + 1)).a =\n    (-1) ^ zero\n[PROOFSTEP]\ncase zero => simp [continuantsAux]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n = 0 ∨ ¬TerminatedAt (of v) (n - 1)\nhyp : zero = 0 ∨ ¬TerminatedAt (of v) (zero - 1)\n⊢ (continuantsAux (of v) zero).a * (continuantsAux (of v) (zero + 1)).b -\n      (continuantsAux (of v) zero).b * (continuantsAux (of v) (zero + 1)).a =\n    (-1) ^ zero\n[PROOFSTEP]\nsimp [continuantsAux]\n[GOAL]\ncase succ\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nIH :\n  n = 0 ∨ ¬TerminatedAt (of v) (n - 1) →\n    (continuantsAux (of v) n).a * (continuantsAux (of v) (n + 1)).b -\n        (continuantsAux (of v) n).b * (continuantsAux (of v) (n + 1)).a =\n      (-1) ^ n\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\n⊢ (continuantsAux (of v) (Nat.succ n)).a * (continuantsAux (of v) (Nat.succ n + 1)).b -\n      (continuantsAux (of v) (Nat.succ n)).b * (continuantsAux (of v) (Nat.succ n + 1)).a =\n    (-1) ^ Nat.succ n\n[PROOFSTEP]\ncase succ =>\n  -- set up some shorthand notation\n  let g := of v\n  let conts := continuantsAux g (n + 2)\n  set pred_conts := continuantsAux g (n + 1) with pred_conts_eq\n  set ppred_conts := continuantsAux g n with ppred_conts_eq\n  let pA := pred_conts.a\n  let pB := pred_conts.b\n  let ppA := ppred_conts.a\n  let ppB := ppred_conts.b\n  change pA * conts.b - pB * conts.a = (-1) ^ (n + 1)\n  have not_terminated_at_n : ¬TerminatedAt g n := Or.resolve_left hyp n.succ_ne_zero\n  obtain ⟨gp, s_nth_eq⟩ : ∃ gp, g.s.get? n = some gp\n  exact Option.ne_none_iff_exists'.1 not_terminated_at_n\n  suffices pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = (-1) ^ (n + 1)\n    by\n    simp only [continuantsAux_recurrence s_nth_eq ppred_conts_eq pred_conts_eq]\n    have gp_a_eq_one : gp.a = 1 := of_part_num_eq_one (part_num_eq_s_a s_nth_eq)\n    rw [gp_a_eq_one, this.symm]\n    ring\n  suffices : pA * ppB - pB * ppA = (-1) ^ (n + 1);\n  calc\n    pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = pA * ppB + pA * gp.b * pB - pB * ppA - pB * gp.b * pA := by ring\n    _ = pA * ppB - pB * ppA := by ring\n    _ = (-1) ^ (n + 1) := by assumption\n  suffices ppA * pB - ppB * pA = (-1) ^ n\n    by\n    have pow_succ_n : (-1 : K) ^ (n + 1) = -1 * (-1) ^ n := pow_succ (-1) n\n    rw [pow_succ_n, ← this]\n    ring\n  exact IH <| Or.inr <| mt (terminated_stable <| n.sub_le 1) not_terminated_at_n\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nIH :\n  n = 0 ∨ ¬TerminatedAt (of v) (n - 1) →\n    (continuantsAux (of v) n).a * (continuantsAux (of v) (n + 1)).b -\n        (continuantsAux (of v) n).b * (continuantsAux (of v) (n + 1)).a =\n      (-1) ^ n\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\n⊢ (continuantsAux (of v) (Nat.succ n)).a * (continuantsAux (of v) (Nat.succ n + 1)).b -\n      (continuantsAux (of v) (Nat.succ n)).b * (continuantsAux (of v) (Nat.succ n + 1)).a =\n    (-1) ^ Nat.succ n\n[PROOFSTEP]\ncase succ =>\n  -- set up some shorthand notation\n  let g := of v\n  let conts := continuantsAux g (n + 2)\n  set pred_conts := continuantsAux g (n + 1) with pred_conts_eq\n  set ppred_conts := continuantsAux g n with ppred_conts_eq\n  let pA := pred_conts.a\n  let pB := pred_conts.b\n  let ppA := ppred_conts.a\n  let ppB := ppred_conts.b\n  change pA * conts.b - pB * conts.a = (-1) ^ (n + 1)\n  have not_terminated_at_n : ¬TerminatedAt g n := Or.resolve_left hyp n.succ_ne_zero\n  obtain ⟨gp, s_nth_eq⟩ : ∃ gp, g.s.get? n = some gp\n  exact Option.ne_none_iff_exists'.1 not_terminated_at_n\n  suffices pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = (-1) ^ (n + 1)\n    by\n    simp only [continuantsAux_recurrence s_nth_eq ppred_conts_eq pred_conts_eq]\n    have gp_a_eq_one : gp.a = 1 := of_part_num_eq_one (part_num_eq_s_a s_nth_eq)\n    rw [gp_a_eq_one, this.symm]\n    ring\n  suffices : pA * ppB - pB * ppA = (-1) ^ (n + 1);\n  calc\n    pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = pA * ppB + pA * gp.b * pB - pB * ppA - pB * gp.b * pA := by ring\n    _ = pA * ppB - pB * ppA := by ring\n    _ = (-1) ^ (n + 1) := by assumption\n  suffices ppA * pB - ppB * pA = (-1) ^ n\n    by\n    have pow_succ_n : (-1 : K) ^ (n + 1) = -1 * (-1) ^ n := pow_succ (-1) n\n    rw [pow_succ_n, ← this]\n    ring\n  exact IH <| Or.inr <| mt (terminated_stable <| n.sub_le 1) not_terminated_at_n\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nIH :\n  n = 0 ∨ ¬TerminatedAt (of v) (n - 1) →\n    (continuantsAux (of v) n).a * (continuantsAux (of v) (n + 1)).b -\n        (continuantsAux (of v) n).b * (continuantsAux (of v) (n + 1)).a =\n      (-1) ^ n\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\n⊢ (continuantsAux (of v) (Nat.succ n)).a * (continuantsAux (of v) (Nat.succ n + 1)).b -\n      (continuantsAux (of v) (Nat.succ n)).b * (continuantsAux (of v) (Nat.succ n + 1)).a =\n    (-1) ^ Nat.succ n\n[PROOFSTEP]\nlet g := of v\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nIH :\n  n = 0 ∨ ¬TerminatedAt (of v) (n - 1) →\n    (continuantsAux (of v) n).a * (continuantsAux (of v) (n + 1)).b -\n        (continuantsAux (of v) n).b * (continuantsAux (of v) (n + 1)).a =\n      (-1) ^ n\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\n⊢ (continuantsAux (of v) (Nat.succ n)).a * (continuantsAux (of v) (Nat.succ n + 1)).b -\n      (continuantsAux (of v) (Nat.succ n)).b * (continuantsAux (of v) (Nat.succ n + 1)).a =\n    (-1) ^ Nat.succ n\n[PROOFSTEP]\nlet conts := continuantsAux g (n + 2)\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nIH :\n  n = 0 ∨ ¬TerminatedAt (of v) (n - 1) →\n    (continuantsAux (of v) n).a * (continuantsAux (of v) (n + 1)).b -\n        (continuantsAux (of v) n).b * (continuantsAux (of v) (n + 1)).a =\n      (-1) ^ n\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\n⊢ (continuantsAux (of v) (Nat.succ n)).a * (continuantsAux (of v) (Nat.succ n + 1)).b -\n      (continuantsAux (of v) (Nat.succ n)).b * (continuantsAux (of v) (Nat.succ n + 1)).a =\n    (-1) ^ Nat.succ n\n[PROOFSTEP]\nset pred_conts := continuantsAux g (n + 1) with pred_conts_eq\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\nIH :\n  n = 0 ∨ ¬TerminatedAt (of v) (n - 1) →\n    (continuantsAux (of v) n).a * pred_conts.b - (continuantsAux (of v) n).b * pred_conts.a = (-1) ^ n\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\n⊢ pred_conts.a * (continuantsAux (of v) (Nat.succ n + 1)).b -\n      pred_conts.b * (continuantsAux (of v) (Nat.succ n + 1)).a =\n    (-1) ^ Nat.succ n\n[PROOFSTEP]\nset ppred_conts := continuantsAux g n with ppred_conts_eq\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\n⊢ pred_conts.a * (continuantsAux (of v) (Nat.succ n + 1)).b -\n      pred_conts.b * (continuantsAux (of v) (Nat.succ n + 1)).a =\n    (-1) ^ Nat.succ n\n[PROOFSTEP]\nlet pA := pred_conts.a\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\n⊢ pred_conts.a * (continuantsAux (of v) (Nat.succ n + 1)).b -\n      pred_conts.b * (continuantsAux (of v) (Nat.succ n + 1)).a =\n    (-1) ^ Nat.succ n\n[PROOFSTEP]\nlet pB := pred_conts.b\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\n⊢ pred_conts.a * (continuantsAux (of v) (Nat.succ n + 1)).b -\n      pred_conts.b * (continuantsAux (of v) (Nat.succ n + 1)).a =\n    (-1) ^ Nat.succ n\n[PROOFSTEP]\nlet ppA := ppred_conts.a\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\n⊢ pred_conts.a * (continuantsAux (of v) (Nat.succ n + 1)).b -\n      pred_conts.b * (continuantsAux (of v) (Nat.succ n + 1)).a =\n    (-1) ^ Nat.succ n\n[PROOFSTEP]\nlet ppB := ppred_conts.b\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\n⊢ pred_conts.a * (continuantsAux (of v) (Nat.succ n + 1)).b -\n      pred_conts.b * (continuantsAux (of v) (Nat.succ n + 1)).a =\n    (-1) ^ Nat.succ n\n[PROOFSTEP]\nchange pA * conts.b - pB * conts.a = (-1) ^ (n + 1)\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\n⊢ pA * conts.b - pB * conts.a = (-1) ^ (n + 1)\n[PROOFSTEP]\nhave not_terminated_at_n : ¬TerminatedAt g n := Or.resolve_left hyp n.succ_ne_zero\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\n⊢ pA * conts.b - pB * conts.a = (-1) ^ (n + 1)\n[PROOFSTEP]\nobtain ⟨gp, s_nth_eq⟩ : ∃ gp, g.s.get? n = some gp\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\n⊢ ∃ gp, Stream'.Seq.get? g.s n = some gp\ncase intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\n⊢ pA * conts.b - pB * conts.a = (-1) ^ (n + 1)\n[PROOFSTEP]\nexact Option.ne_none_iff_exists'.1 not_terminated_at_n\n[GOAL]\ncase intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\n⊢ pA * conts.b - pB * conts.a = (-1) ^ (n + 1)\n[PROOFSTEP]\nsuffices pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = (-1) ^ (n + 1)\n  by\n  simp only [continuantsAux_recurrence s_nth_eq ppred_conts_eq pred_conts_eq]\n  have gp_a_eq_one : gp.a = 1 := of_part_num_eq_one (part_num_eq_s_a s_nth_eq)\n  rw [gp_a_eq_one, this.symm]\n  ring\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nthis : pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = (-1) ^ (n + 1)\n⊢ pA * conts.b - pB * conts.a = (-1) ^ (n + 1)\n[PROOFSTEP]\nsimp only [continuantsAux_recurrence s_nth_eq ppred_conts_eq pred_conts_eq]\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nthis : pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = (-1) ^ (n + 1)\n⊢ (continuantsAux (of v) (n + 1)).a * (gp.b * (continuantsAux (of v) (n + 1)).b + gp.a * (continuantsAux (of v) n).b) -\n      (continuantsAux (of v) (n + 1)).b *\n        (gp.b * (continuantsAux (of v) (n + 1)).a + gp.a * (continuantsAux (of v) n).a) =\n    (-1) ^ (n + 1)\n[PROOFSTEP]\nhave gp_a_eq_one : gp.a = 1 := of_part_num_eq_one (part_num_eq_s_a s_nth_eq)\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nthis : pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = (-1) ^ (n + 1)\ngp_a_eq_one : gp.a = 1\n⊢ (continuantsAux (of v) (n + 1)).a * (gp.b * (continuantsAux (of v) (n + 1)).b + gp.a * (continuantsAux (of v) n).b) -\n      (continuantsAux (of v) (n + 1)).b *\n        (gp.b * (continuantsAux (of v) (n + 1)).a + gp.a * (continuantsAux (of v) n).a) =\n    (-1) ^ (n + 1)\n[PROOFSTEP]\nrw [gp_a_eq_one, this.symm]\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nthis : pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = (-1) ^ (n + 1)\ngp_a_eq_one : gp.a = 1\n⊢ (continuantsAux (of v) (n + 1)).a * (gp.b * (continuantsAux (of v) (n + 1)).b + 1 * (continuantsAux (of v) n).b) -\n      (continuantsAux (of v) (n + 1)).b * (gp.b * (continuantsAux (of v) (n + 1)).a + 1 * (continuantsAux (of v) n).a) =\n    pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\n⊢ pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = (-1) ^ (n + 1)\n[PROOFSTEP]\nsuffices : pA * ppB - pB * ppA = (-1) ^ (n + 1)\n[GOAL]\ncase intro\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nthis : pA * ppB - pB * ppA = (-1) ^ (n + 1)\n⊢ pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = (-1) ^ (n + 1)\ncase this\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\n⊢ pA * ppB - pB * ppA = (-1) ^ (n + 1)\n[PROOFSTEP]\ncalc\n  pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = pA * ppB + pA * gp.b * pB - pB * ppA - pB * gp.b * pA := by ring\n  _ = pA * ppB - pB * ppA := by ring\n  _ = (-1) ^ (n + 1) := by assumption\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nthis : pA * ppB - pB * ppA = (-1) ^ (n + 1)\n⊢ pA * (ppB + gp.b * pB) - pB * (ppA + gp.b * pA) = pA * ppB + pA * gp.b * pB - pB * ppA - pB * gp.b * pA\n[PROOFSTEP]\nring\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nthis : pA * ppB - pB * ppA = (-1) ^ (n + 1)\n⊢ pA * ppB + pA * gp.b * pB - pB * ppA - pB * gp.b * pA = pA * ppB - pB * ppA\n[PROOFSTEP]\nring\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nthis : pA * ppB - pB * ppA = (-1) ^ (n + 1)\n⊢ pA * ppB - pB * ppA = (-1) ^ (n + 1)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase this\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\n⊢ pA * ppB - pB * ppA = (-1) ^ (n + 1)\n[PROOFSTEP]\nsuffices ppA * pB - ppB * pA = (-1) ^ n\n  by\n  have pow_succ_n : (-1 : K) ^ (n + 1) = -1 * (-1) ^ n := pow_succ (-1) n\n  rw [pow_succ_n, ← this]\n  ring\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nthis : ppA * pB - ppB * pA = (-1) ^ n\n⊢ pA * ppB - pB * ppA = (-1) ^ (n + 1)\n[PROOFSTEP]\nhave pow_succ_n : (-1 : K) ^ (n + 1) = -1 * (-1) ^ n := pow_succ (-1) n\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nthis : ppA * pB - ppB * pA = (-1) ^ n\npow_succ_n : (-1) ^ (n + 1) = -1 * (-1) ^ n\n⊢ pA * ppB - pB * ppA = (-1) ^ (n + 1)\n[PROOFSTEP]\nrw [pow_succ_n, ← this]\n[GOAL]\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nthis : ppA * pB - ppB * pA = (-1) ^ n\npow_succ_n : (-1) ^ (n + 1) = -1 * (-1) ^ n\n⊢ pA * ppB - pB * ppA = -1 * (ppA * pB - ppB * pA)\n[PROOFSTEP]\nring\n[GOAL]\ncase this\nK : Type u_1\nv : K\nn✝ : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nhyp✝ : n✝ = 0 ∨ ¬TerminatedAt (of v) (n✝ - 1)\nn : ℕ\nhyp : Nat.succ n = 0 ∨ ¬TerminatedAt (of v) (Nat.succ n - 1)\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 2)\npred_conts : Pair K := continuantsAux g (n + 1)\npred_conts_eq : pred_conts = continuantsAux g (n + 1)\nppred_conts : Pair K := continuantsAux g n\nIH : n = 0 ∨ ¬TerminatedAt (of v) (n - 1) → ppred_conts.a * pred_conts.b - ppred_conts.b * pred_conts.a = (-1) ^ n\nppred_conts_eq : ppred_conts = continuantsAux g n\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\n⊢ ppA * pB - ppB * pA = (-1) ^ n\n[PROOFSTEP]\nexact IH <| Or.inr <| mt (terminated_stable <| n.sub_le 1) not_terminated_at_n\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nlet g := of v\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nlet conts := g.continuantsAux (n + 1)\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nlet pred_conts := g.continuantsAux n\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nhave g_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr :=\n  compExactValue_correctness_of_stream_eq_some stream_nth_eq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\ncases' Decidable.em (ifp.fr = 0) with ifp_fr_eq_zero ifp_fr_ne_zero\n[GOAL]\ncase inl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\nifp_fr_eq_zero : ifp.fr = 0\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nsuffices v - g.convergents n = 0 by simpa [ifp_fr_eq_zero]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\nifp_fr_eq_zero : ifp.fr = 0\nthis : v - convergents g n = 0\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nsimpa [ifp_fr_eq_zero]\n[GOAL]\ncase inl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\nifp_fr_eq_zero : ifp.fr = 0\n⊢ v - convergents g n = 0\n[PROOFSTEP]\nreplace g_finite_correctness : v = g.convergents n\n[GOAL]\ncase g_finite_correctness\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\nifp_fr_eq_zero : ifp.fr = 0\n⊢ v = convergents g n\n[PROOFSTEP]\nsimpa [GeneralizedContinuedFraction.compExactValue, ifp_fr_eq_zero] using g_finite_correctness\n[GOAL]\ncase inl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_eq_zero : ifp.fr = 0\ng_finite_correctness : v = convergents g n\n⊢ v - convergents g n = 0\n[PROOFSTEP]\nexact sub_eq_zero.2 g_finite_correctness\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\nifp_fr_ne_zero : ¬ifp.fr = 0\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nlet A := conts.a\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nlet B := conts.b\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nlet pA := pred_conts.a\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nlet pB := pred_conts.b\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nsuffices v - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB)) by\n  simpa [ifp_fr_ne_zero]\n    -- now we can unfold `g.compExactValue` to derive the following equality for `v`\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\nthis : v - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n⊢ let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nsimpa [ifp_fr_ne_zero]\n  -- now we can unfold `g.compExactValue` to derive the following equality for `v`\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\n⊢ v - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nreplace g_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\n[GOAL]\ncase g_finite_correctness\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\ng_finite_correctness : v = GeneralizedContinuedFraction.compExactValue pred_conts conts ifp.fr\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\n⊢ v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\n[PROOFSTEP]\nsimpa [GeneralizedContinuedFraction.compExactValue, ifp_fr_ne_zero, nextContinuants, nextNumerator, nextDenominator,\n  add_comm] using g_finite_correctness\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\n⊢ v - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nsuffices (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B) - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB)) by\n  rwa [g_finite_correctness]\n    -- To continue, we need use the determinant equality. So let's derive the needed hypothesis.\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nthis : (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B) - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n⊢ v - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nrwa [g_finite_correctness]\n  -- To continue, we need use the determinant equality. So let's derive the needed hypothesis.\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\n⊢ (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B) - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nhave n_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬g.TerminatedAt (n - 1) :=\n  by\n  cases' n with n'\n  · simp\n  · have : IntFractPair.stream v (n' + 1) ≠ none := by simp [stream_nth_eq]\n    have : ¬g.TerminatedAt n' := (not_congr of_terminatedAt_n_iff_succ_nth_intFractPair_stream_eq_none).2 this\n    exact Or.inr this\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\n⊢ n = 0 ∨ ¬TerminatedAt g (n - 1)\n[PROOFSTEP]\ncases' n with n'\n[GOAL]\ncase zero\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\ng : GeneralizedContinuedFraction K := of v\nifp_fr_ne_zero : ¬ifp.fr = 0\nstream_nth_eq : IntFractPair.stream v zero = some ifp\nconts : Pair K := continuantsAux g (zero + 1)\npred_conts : Pair K := continuantsAux g zero\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\n⊢ zero = 0 ∨ ¬TerminatedAt g (zero - 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\ng : GeneralizedContinuedFraction K := of v\nifp_fr_ne_zero : ¬ifp.fr = 0\nn' : ℕ\nstream_nth_eq : IntFractPair.stream v (Nat.succ n') = some ifp\nconts : Pair K := continuantsAux g (Nat.succ n' + 1)\npred_conts : Pair K := continuantsAux g (Nat.succ n')\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\n⊢ Nat.succ n' = 0 ∨ ¬TerminatedAt g (Nat.succ n' - 1)\n[PROOFSTEP]\nhave : IntFractPair.stream v (n' + 1) ≠ none := by simp [stream_nth_eq]\n[GOAL]\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\ng : GeneralizedContinuedFraction K := of v\nifp_fr_ne_zero : ¬ifp.fr = 0\nn' : ℕ\nstream_nth_eq : IntFractPair.stream v (Nat.succ n') = some ifp\nconts : Pair K := continuantsAux g (Nat.succ n' + 1)\npred_conts : Pair K := continuantsAux g (Nat.succ n')\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\n⊢ IntFractPair.stream v (n' + 1) ≠ none\n[PROOFSTEP]\nsimp [stream_nth_eq]\n[GOAL]\ncase succ\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\ng : GeneralizedContinuedFraction K := of v\nifp_fr_ne_zero : ¬ifp.fr = 0\nn' : ℕ\nstream_nth_eq : IntFractPair.stream v (Nat.succ n') = some ifp\nconts : Pair K := continuantsAux g (Nat.succ n' + 1)\npred_conts : Pair K := continuantsAux g (Nat.succ n')\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nthis : IntFractPair.stream v (n' + 1) ≠ none\n⊢ Nat.succ n' = 0 ∨ ¬TerminatedAt g (Nat.succ n' - 1)\n[PROOFSTEP]\nhave : ¬g.TerminatedAt n' := (not_congr of_terminatedAt_n_iff_succ_nth_intFractPair_stream_eq_none).2 this\n[GOAL]\ncase succ\nK : Type u_1\nv : K\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\ng : GeneralizedContinuedFraction K := of v\nifp_fr_ne_zero : ¬ifp.fr = 0\nn' : ℕ\nstream_nth_eq : IntFractPair.stream v (Nat.succ n') = some ifp\nconts : Pair K := continuantsAux g (Nat.succ n' + 1)\npred_conts : Pair K := continuantsAux g (Nat.succ n')\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nthis✝ : IntFractPair.stream v (n' + 1) ≠ none\nthis : ¬TerminatedAt g n'\n⊢ Nat.succ n' = 0 ∨ ¬TerminatedAt g (Nat.succ n' - 1)\n[PROOFSTEP]\nexact Or.inr this\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\n⊢ (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B) - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nhave determinant_eq : pA * B - pB * A = (-1) ^ n := determinant_aux n_eq_zero_or_not_terminated_at_pred_n\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\n⊢ (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B) - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nhave pB_ineq : (fib n : K) ≤ pB :=\n  haveI : n ≤ 1 ∨ ¬g.TerminatedAt (n - 2) :=\n    by\n    cases' n_eq_zero_or_not_terminated_at_pred_n with n_eq_zero not_terminated_at_pred_n\n    · simp [n_eq_zero]\n    · exact Or.inr <| mt (terminated_stable (n - 1).pred_le) not_terminated_at_pred_n\n  fib_le_of_continuantsAux_b this\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\n⊢ n ≤ 1 ∨ ¬TerminatedAt g (n - 2)\n[PROOFSTEP]\ncases' n_eq_zero_or_not_terminated_at_pred_n with n_eq_zero not_terminated_at_pred_n\n[GOAL]\ncase inl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\nn_eq_zero : n = 0\n⊢ n ≤ 1 ∨ ¬TerminatedAt g (n - 2)\n[PROOFSTEP]\nsimp [n_eq_zero]\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\n⊢ n ≤ 1 ∨ ¬TerminatedAt g (n - 2)\n[PROOFSTEP]\nexact Or.inr <| mt (terminated_stable (n - 1).pred_le) not_terminated_at_pred_n\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\n⊢ (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B) - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nhave B_ineq : (fib (n + 1) : K) ≤ B :=\n  haveI : n + 1 ≤ 1 ∨ ¬g.TerminatedAt (n + 1 - 2) :=\n    by\n    cases' n_eq_zero_or_not_terminated_at_pred_n with n_eq_zero not_terminated_at_pred_n\n    · simp [n_eq_zero, le_refl]\n    · exact Or.inr not_terminated_at_pred_n\n  fib_le_of_continuantsAux_b this\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\n⊢ n + 1 ≤ 1 ∨ ¬TerminatedAt g (n + 1 - 2)\n[PROOFSTEP]\ncases' n_eq_zero_or_not_terminated_at_pred_n with n_eq_zero not_terminated_at_pred_n\n[GOAL]\ncase inl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nn_eq_zero : n = 0\n⊢ n + 1 ≤ 1 ∨ ¬TerminatedAt g (n + 1 - 2)\n[PROOFSTEP]\nsimp [n_eq_zero, le_refl]\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nnot_terminated_at_pred_n : ¬TerminatedAt g (n - 1)\n⊢ n + 1 ≤ 1 ∨ ¬TerminatedAt g (n + 1 - 2)\n[PROOFSTEP]\nexact Or.inr not_terminated_at_pred_n\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\n⊢ (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B) - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nhave zero_lt_B : 0 < B :=\n  haveI : 1 ≤ B := le_trans (by exact_mod_cast fib_pos (lt_of_le_of_ne n.succ.zero_le n.succ_ne_zero.symm)) B_ineq\n  lt_of_lt_of_le zero_lt_one this\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\n⊢ 1 ≤ ↑(fib (n + 1))\n[PROOFSTEP]\nexact_mod_cast fib_pos (lt_of_le_of_ne n.succ.zero_le n.succ_ne_zero.symm)\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\n⊢ (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B) - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nhave zero_ne_B : 0 ≠ B := ne_of_lt zero_lt_B\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\n⊢ (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B) - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nhave : 0 ≠ pB + ifp.fr⁻¹ * B :=\n  by\n  have : (0 : K) ≤ fib n := by exact_mod_cast (fib n).zero_le\n  have zero_le_pB : 0 ≤ pB := le_trans this pB_ineq\n  have : 0 < ifp.fr⁻¹ := by\n    suffices 0 < ifp.fr by rwa [inv_pos]\n    have : 0 ≤ ifp.fr := IntFractPair.nth_stream_fr_nonneg stream_nth_eq\n    change ifp.fr ≠ 0 at ifp_fr_ne_zero \n    exact lt_of_le_of_ne this ifp_fr_ne_zero.symm\n  have : 0 < ifp.fr⁻¹ * B := mul_pos this zero_lt_B\n  have : 0 < pB + ifp.fr⁻¹ * B := add_pos_of_nonneg_of_pos zero_le_pB this\n  exact ne_of_lt this\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\n⊢ 0 ≠ pB + ifp.fr⁻¹ * B\n[PROOFSTEP]\nhave : (0 : K) ≤ fib n := by exact_mod_cast (fib n).zero_le\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\n⊢ 0 ≤ ↑(fib n)\n[PROOFSTEP]\nexact_mod_cast (fib n).zero_le\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis : 0 ≤ ↑(fib n)\n⊢ 0 ≠ pB + ifp.fr⁻¹ * B\n[PROOFSTEP]\nhave zero_le_pB : 0 ≤ pB := le_trans this pB_ineq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis : 0 ≤ ↑(fib n)\nzero_le_pB : 0 ≤ pB\n⊢ 0 ≠ pB + ifp.fr⁻¹ * B\n[PROOFSTEP]\nhave : 0 < ifp.fr⁻¹ := by\n  suffices 0 < ifp.fr by rwa [inv_pos]\n  have : 0 ≤ ifp.fr := IntFractPair.nth_stream_fr_nonneg stream_nth_eq\n  change ifp.fr ≠ 0 at ifp_fr_ne_zero \n  exact lt_of_le_of_ne this ifp_fr_ne_zero.symm\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis : 0 ≤ ↑(fib n)\nzero_le_pB : 0 ≤ pB\n⊢ 0 < ifp.fr⁻¹\n[PROOFSTEP]\nsuffices 0 < ifp.fr by rwa [inv_pos]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis✝ : 0 ≤ ↑(fib n)\nzero_le_pB : 0 ≤ pB\nthis : 0 < ifp.fr\n⊢ 0 < ifp.fr⁻¹\n[PROOFSTEP]\nrwa [inv_pos]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis : 0 ≤ ↑(fib n)\nzero_le_pB : 0 ≤ pB\n⊢ 0 < ifp.fr\n[PROOFSTEP]\nhave : 0 ≤ ifp.fr := IntFractPair.nth_stream_fr_nonneg stream_nth_eq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis✝ : 0 ≤ ↑(fib n)\nzero_le_pB : 0 ≤ pB\nthis : 0 ≤ ifp.fr\n⊢ 0 < ifp.fr\n[PROOFSTEP]\nchange ifp.fr ≠ 0 at ifp_fr_ne_zero \n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis✝ : 0 ≤ ↑(fib n)\nzero_le_pB : 0 ≤ pB\nthis : 0 ≤ ifp.fr\nifp_fr_ne_zero : ifp.fr ≠ 0\n⊢ 0 < ifp.fr\n[PROOFSTEP]\nexact lt_of_le_of_ne this ifp_fr_ne_zero.symm\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis✝ : 0 ≤ ↑(fib n)\nzero_le_pB : 0 ≤ pB\nthis : 0 < ifp.fr⁻¹\n⊢ 0 ≠ pB + ifp.fr⁻¹ * B\n[PROOFSTEP]\nhave : 0 < ifp.fr⁻¹ * B := mul_pos this zero_lt_B\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis✝¹ : 0 ≤ ↑(fib n)\nzero_le_pB : 0 ≤ pB\nthis✝ : 0 < ifp.fr⁻¹\nthis : 0 < ifp.fr⁻¹ * B\n⊢ 0 ≠ pB + ifp.fr⁻¹ * B\n[PROOFSTEP]\nhave : 0 < pB + ifp.fr⁻¹ * B := add_pos_of_nonneg_of_pos zero_le_pB this\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis✝² : 0 ≤ ↑(fib n)\nzero_le_pB : 0 ≤ pB\nthis✝¹ : 0 < ifp.fr⁻¹\nthis✝ : 0 < ifp.fr⁻¹ * B\nthis : 0 < pB + ifp.fr⁻¹ * B\n⊢ 0 ≠ pB + ifp.fr⁻¹ * B\n[PROOFSTEP]\nexact ne_of_lt this\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis : 0 ≠ pB + ifp.fr⁻¹ * B\n⊢ (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B) - A / B = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\ncalc\n  (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B) - A / B =\n      ((pA + ifp.fr⁻¹ * A) * B - (pB + ifp.fr⁻¹ * B) * A) / ((pB + ifp.fr⁻¹ * B) * B) :=\n    by rw [div_sub_div _ _ this.symm zero_ne_B.symm]\n  _ = (pA * B + ifp.fr⁻¹ * A * B - (pB * A + ifp.fr⁻¹ * B * A)) / _ := by repeat' rw [add_mul]\n  _ = (pA * B - pB * A) / ((pB + ifp.fr⁻¹ * B) * B) := by ring\n  _ = (-1) ^ n / ((pB + ifp.fr⁻¹ * B) * B) := by rw [determinant_eq]\n  _ = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB)) := by ac_rfl\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis : 0 ≠ pB + ifp.fr⁻¹ * B\n⊢ (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B) - A / B =\n    ((pA + ifp.fr⁻¹ * A) * B - (pB + ifp.fr⁻¹ * B) * A) / ((pB + ifp.fr⁻¹ * B) * B)\n[PROOFSTEP]\nrw [div_sub_div _ _ this.symm zero_ne_B.symm]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis : 0 ≠ pB + ifp.fr⁻¹ * B\n⊢ ((pA + ifp.fr⁻¹ * A) * B - (pB + ifp.fr⁻¹ * B) * A) / ((pB + ifp.fr⁻¹ * B) * B) =\n    (pA * B + ifp.fr⁻¹ * A * B - (pB * A + ifp.fr⁻¹ * B * A)) / ?m.95134\n[PROOFSTEP]\nrepeat' rw [add_mul]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis : 0 ≠ pB + ifp.fr⁻¹ * B\n⊢ ((pA + ifp.fr⁻¹ * A) * B - (pB + ifp.fr⁻¹ * B) * A) / ((pB + ifp.fr⁻¹ * B) * B) =\n    (pA * B + ifp.fr⁻¹ * A * B - (pB * A + ifp.fr⁻¹ * B * A)) / ?m.95134\n[PROOFSTEP]\nrw [add_mul]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis : 0 ≠ pB + ifp.fr⁻¹ * B\n⊢ (pA * B + ifp.fr⁻¹ * A * B - (pB + ifp.fr⁻¹ * B) * A) / ((pB + ifp.fr⁻¹ * B) * B) =\n    (pA * B + ifp.fr⁻¹ * A * B - (pB * A + ifp.fr⁻¹ * B * A)) / ?m.95134\n[PROOFSTEP]\nrw [add_mul]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis : 0 ≠ pB + ifp.fr⁻¹ * B\n⊢ (pA * B + ifp.fr⁻¹ * A * B - (pB * A + ifp.fr⁻¹ * B * A)) / ((pB + ifp.fr⁻¹ * B) * B) =\n    (pA * B - pB * A) / ((pB + ifp.fr⁻¹ * B) * B)\n[PROOFSTEP]\nring\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis : 0 ≠ pB + ifp.fr⁻¹ * B\n⊢ (pA * B - pB * A) / ((pB + ifp.fr⁻¹ * B) * B) = (-1) ^ n / ((pB + ifp.fr⁻¹ * B) * B)\n[PROOFSTEP]\nrw [determinant_eq]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nifp : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp\ng : GeneralizedContinuedFraction K := of v\nconts : Pair K := continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\nifp_fr_ne_zero : ¬ifp.fr = 0\nA : K := conts.a\nB : K := conts.b\npA : K := pred_conts.a\npB : K := pred_conts.b\ng_finite_correctness : v = (pA + ifp.fr⁻¹ * A) / (pB + ifp.fr⁻¹ * B)\nn_eq_zero_or_not_terminated_at_pred_n : n = 0 ∨ ¬TerminatedAt g (n - 1)\ndeterminant_eq : pA * B - pB * A = (-1) ^ n\npB_ineq : ↑(fib n) ≤ pB\nB_ineq : ↑(fib (n + 1)) ≤ B\nzero_lt_B : 0 < B\nzero_ne_B : 0 ≠ B\nthis : 0 ≠ pB + ifp.fr⁻¹ * B\n⊢ (-1) ^ n / ((pB + ifp.fr⁻¹ * B) * B) = (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))\n[PROOFSTEP]\nac_rfl\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\n⊢ |v - convergents (of v) n| ≤ 1 / (denominators (of v) n * denominators (of v) (n + 1))\n[PROOFSTEP]\nlet g := of v\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\n⊢ |v - convergents (of v) n| ≤ 1 / (denominators (of v) n * denominators (of v) (n + 1))\n[PROOFSTEP]\nlet nextConts := g.continuantsAux (n + 2)\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\n⊢ |v - convergents (of v) n| ≤ 1 / (denominators (of v) n * denominators (of v) (n + 1))\n[PROOFSTEP]\nset conts := continuantsAux g (n + 1) with conts_eq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\n⊢ |v - convergents (of v) n| ≤ 1 / (denominators (of v) n * denominators (of v) (n + 1))\n[PROOFSTEP]\nset pred_conts := continuantsAux g n with pred_conts_eq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\n⊢ |v - convergents (of v) n| ≤ 1 / (denominators (of v) n * denominators (of v) (n + 1))\n[PROOFSTEP]\nchange |v - convergents g n| ≤ 1 / (conts.b * nextConts.b)\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\n⊢ |v - convergents g n| ≤ 1 / (conts.b * nextConts.b)\n[PROOFSTEP]\nobtain ⟨gp, s_nth_eq⟩ : ∃ gp, g.s.get? n = some gp\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\n⊢ ∃ gp, Stream'.Seq.get? g.s n = some gp\ncase intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\n⊢ |v - convergents g n| ≤ 1 / (conts.b * nextConts.b)\n[PROOFSTEP]\nexact Option.ne_none_iff_exists'.1 not_terminated_at_n\n[GOAL]\ncase intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\n⊢ |v - convergents g n| ≤ 1 / (conts.b * nextConts.b)\n[PROOFSTEP]\nhave gp_a_eq_one : gp.a = 1 :=\n  of_part_num_eq_one\n    (part_num_eq_s_a s_nth_eq)\n      -- unfold the recurrence relation for `nextConts.b`\n[GOAL]\ncase intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\n⊢ |v - convergents g n| ≤ 1 / (conts.b * nextConts.b)\n[PROOFSTEP]\nhave nextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b := by\n  simp [continuantsAux_recurrence s_nth_eq pred_conts_eq conts_eq, gp_a_eq_one, pred_conts_eq.symm, conts_eq.symm,\n    add_comm]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\n⊢ nextConts.b = pred_conts.b + gp.b * conts.b\n[PROOFSTEP]\nsimp [continuantsAux_recurrence s_nth_eq pred_conts_eq conts_eq, gp_a_eq_one, pred_conts_eq.symm, conts_eq.symm,\n  add_comm]\n[GOAL]\ncase intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\n⊢ |v - convergents g n| ≤ 1 / (conts.b * nextConts.b)\n[PROOFSTEP]\nlet denom := conts.b * (pred_conts.b + gp.b * conts.b)\n[GOAL]\ncase intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\n⊢ |v - convergents g n| ≤ 1 / (conts.b * nextConts.b)\n[PROOFSTEP]\nsuffices |v - g.convergents n| ≤ 1 / denom by rw [nextConts_b_eq]; congr 1\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nthis : |v - convergents g n| ≤ 1 / denom\n⊢ |v - convergents g n| ≤ 1 / (conts.b * nextConts.b)\n[PROOFSTEP]\nrw [nextConts_b_eq]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nthis : |v - convergents g n| ≤ 1 / denom\n⊢ |v - convergents g n| ≤ 1 / (conts.b * (pred_conts.b + gp.b * conts.b))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\n⊢ |v - convergents g n| ≤ 1 / denom\n[PROOFSTEP]\nobtain ⟨ifp_succ_n, succ_nth_stream_eq, ifp_succ_n_b_eq_gp_b⟩ :\n  ∃ ifp_succ_n, IntFractPair.stream v (n + 1) = some ifp_succ_n ∧ (ifp_succ_n.b : K) = gp.b\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\n⊢ ∃ ifp_succ_n, IntFractPair.stream v (n + 1) = some ifp_succ_n ∧ ↑ifp_succ_n.b = gp.b\ncase intro.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\n⊢ |v - convergents g n| ≤ 1 / denom\n[PROOFSTEP]\nexact IntFractPair.exists_succ_get?_stream_of_gcf_of_get?_eq_some s_nth_eq\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\n⊢ |v - convergents g n| ≤ 1 / denom\n[PROOFSTEP]\nobtain ⟨ifp_n, stream_nth_eq, stream_nth_fr_ne_zero, if_of_eq_ifp_succ_n⟩ :\n  ∃ ifp_n, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr ≠ 0 ∧ IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\n⊢ ∃ ifp_n, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr ≠ 0 ∧ IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ncase intro.intro.intro.intro.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\n⊢ |v - convergents g n| ≤ 1 / denom\n[PROOFSTEP]\nexact IntFractPair.succ_nth_stream_eq_some_iff.1 succ_nth_stream_eq\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\n⊢ |v - convergents g n| ≤ 1 / denom\n[PROOFSTEP]\nlet denom' :=\n  conts.b *\n    (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\n      -- now we can use `sub_convergents_eq` to simplify our goal\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\n⊢ |v - convergents g n| ≤ 1 / denom\n[PROOFSTEP]\nsuffices |(-1) ^ n / denom'| ≤ 1 / denom\n  by\n  have : v - g.convergents n = (-1) ^ n / denom' := by\n    -- apply `sub_convergents_eq` and simplify the result\n    have tmp := sub_convergents_eq stream_nth_eq\n    simp only [stream_nth_fr_ne_zero, conts_eq.symm, pred_conts_eq.symm, if_false] at tmp \n    rw [tmp]\n    ring\n  rwa [this]\n    -- derive some tedious inequalities that we need to rewrite our goal\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nthis : |(-1) ^ n / denom'| ≤ 1 / denom\n⊢ |v - convergents g n| ≤ 1 / denom\n[PROOFSTEP]\nhave : v - g.convergents n = (-1) ^ n / denom' := by\n  -- apply `sub_convergents_eq` and simplify the result\n  have tmp := sub_convergents_eq stream_nth_eq\n  simp only [stream_nth_fr_ne_zero, conts_eq.symm, pred_conts_eq.symm, if_false] at tmp \n  rw [tmp]\n  ring\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nthis : |(-1) ^ n / denom'| ≤ 1 / denom\n⊢ v - convergents g n = (-1) ^ n / denom'\n[PROOFSTEP]\nhave tmp := sub_convergents_eq stream_nth_eq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nthis : |(-1) ^ n / denom'| ≤ 1 / denom\ntmp :\n  let g := of v;\n  let B := (continuantsAux g (n + 1)).b;\n  let pB := (continuantsAux g n).b;\n  v - convergents g n = if ifp_n.fr = 0 then 0 else (-1) ^ n / (B * (ifp_n.fr⁻¹ * B + pB))\n⊢ v - convergents g n = (-1) ^ n / denom'\n[PROOFSTEP]\nsimp only [stream_nth_fr_ne_zero, conts_eq.symm, pred_conts_eq.symm, if_false] at tmp \n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nthis : |(-1) ^ n / denom'| ≤ 1 / denom\ntmp : v - convergents (of v) n = (-1) ^ n / (conts.b * (ifp_n.fr⁻¹ * conts.b + pred_conts.b))\n⊢ v - convergents g n = (-1) ^ n / denom'\n[PROOFSTEP]\nrw [tmp]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nthis : |(-1) ^ n / denom'| ≤ 1 / denom\ntmp : v - convergents (of v) n = (-1) ^ n / (conts.b * (ifp_n.fr⁻¹ * conts.b + pred_conts.b))\n⊢ (-1) ^ n / (conts.b * (ifp_n.fr⁻¹ * conts.b + pred_conts.b)) = (-1) ^ n / denom'\n[PROOFSTEP]\nring\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nthis✝ : |(-1) ^ n / denom'| ≤ 1 / denom\nthis : v - convergents g n = (-1) ^ n / denom'\n⊢ |v - convergents g n| ≤ 1 / denom\n[PROOFSTEP]\nrwa [this]\n  -- derive some tedious inequalities that we need to rewrite our goal\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\n⊢ |(-1) ^ n / denom'| ≤ 1 / denom\n[PROOFSTEP]\nhave nextConts_b_ineq : (fib (n + 2) : K) ≤ pred_conts.b + gp.b * conts.b :=\n  by\n  have : (fib (n + 2) : K) ≤ nextConts.b := fib_le_of_continuantsAux_b (Or.inr not_terminated_at_n)\n  rwa [nextConts_b_eq] at this \n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\n⊢ ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\n[PROOFSTEP]\nhave : (fib (n + 2) : K) ≤ nextConts.b := fib_le_of_continuantsAux_b (Or.inr not_terminated_at_n)\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nthis : ↑(fib (n + 2)) ≤ nextConts.b\n⊢ ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\n[PROOFSTEP]\nrwa [nextConts_b_eq] at this \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\n⊢ |(-1) ^ n / denom'| ≤ 1 / denom\n[PROOFSTEP]\nhave conts_b_ineq : (fib (n + 1) : K) ≤ conts.b :=\n  haveI : ¬g.TerminatedAt (n - 1) := mt (terminated_stable n.pred_le) not_terminated_at_n\n  fib_le_of_continuantsAux_b <| Or.inr this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\n⊢ |(-1) ^ n / denom'| ≤ 1 / denom\n[PROOFSTEP]\nhave zero_lt_conts_b : 0 < conts.b :=\n  haveI : (0 : K) < fib (n + 1) := by exact_mod_cast fib_pos (lt_of_le_of_ne n.succ.zero_le n.succ_ne_zero.symm)\n  lt_of_lt_of_le this conts_b_ineq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\n⊢ 0 < ↑(fib (n + 1))\n[PROOFSTEP]\nexact_mod_cast fib_pos (lt_of_le_of_ne n.succ.zero_le n.succ_ne_zero.symm)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\n⊢ |(-1) ^ n / denom'| ≤ 1 / denom\n[PROOFSTEP]\nsuffices 1 / denom' ≤ 1 / denom\n  by\n  have : |(-1) ^ n / denom'| = 1 / denom' :=\n    by\n    suffices 1 / |denom'| = 1 / denom' by rwa [abs_div, abs_neg_one_pow n]\n    have : 0 < denom' :=\n      by\n      have : 0 ≤ pred_conts.b :=\n        haveI : (fib n : K) ≤ pred_conts.b :=\n          haveI : ¬g.TerminatedAt (n - 2) := mt (terminated_stable (n.sub_le 2)) not_terminated_at_n\n          fib_le_of_continuantsAux_b <| Or.inr this\n        le_trans (by exact_mod_cast (fib n).zero_le) this\n      have : 0 < ifp_n.fr⁻¹ :=\n        haveI zero_le_ifp_n_fract : 0 ≤ ifp_n.fr := IntFractPair.nth_stream_fr_nonneg stream_nth_eq\n        inv_pos.2\n          (lt_of_le_of_ne zero_le_ifp_n_fract stream_nth_fr_ne_zero.symm)\n            -- Porting note: replaced complicated positivity proof with tactic.\n      positivity\n    rw [abs_of_pos this]\n  rwa [this]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis : 1 / denom' ≤ 1 / denom\n⊢ |(-1) ^ n / denom'| ≤ 1 / denom\n[PROOFSTEP]\nhave : |(-1) ^ n / denom'| = 1 / denom' :=\n  by\n  suffices 1 / |denom'| = 1 / denom' by rwa [abs_div, abs_neg_one_pow n]\n  have : 0 < denom' :=\n    by\n    have : 0 ≤ pred_conts.b :=\n      haveI : (fib n : K) ≤ pred_conts.b :=\n        haveI : ¬g.TerminatedAt (n - 2) := mt (terminated_stable (n.sub_le 2)) not_terminated_at_n\n        fib_le_of_continuantsAux_b <| Or.inr this\n      le_trans (by exact_mod_cast (fib n).zero_le) this\n    have : 0 < ifp_n.fr⁻¹ :=\n      haveI zero_le_ifp_n_fract : 0 ≤ ifp_n.fr := IntFractPair.nth_stream_fr_nonneg stream_nth_eq\n      inv_pos.2\n        (lt_of_le_of_ne zero_le_ifp_n_fract stream_nth_fr_ne_zero.symm)\n          -- Porting note: replaced complicated positivity proof with tactic.\n    positivity\n  rw [abs_of_pos this]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis : 1 / denom' ≤ 1 / denom\n⊢ |(-1) ^ n / denom'| = 1 / denom'\n[PROOFSTEP]\nsuffices 1 / |denom'| = 1 / denom' by rwa [abs_div, abs_neg_one_pow n]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis✝ : 1 / denom' ≤ 1 / denom\nthis : 1 / |denom'| = 1 / denom'\n⊢ |(-1) ^ n / denom'| = 1 / denom'\n[PROOFSTEP]\nrwa [abs_div, abs_neg_one_pow n]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis : 1 / denom' ≤ 1 / denom\n⊢ 1 / |denom'| = 1 / denom'\n[PROOFSTEP]\nhave : 0 < denom' :=\n  by\n  have : 0 ≤ pred_conts.b :=\n    haveI : (fib n : K) ≤ pred_conts.b :=\n      haveI : ¬g.TerminatedAt (n - 2) := mt (terminated_stable (n.sub_le 2)) not_terminated_at_n\n      fib_le_of_continuantsAux_b <| Or.inr this\n    le_trans (by exact_mod_cast (fib n).zero_le) this\n  have : 0 < ifp_n.fr⁻¹ :=\n    haveI zero_le_ifp_n_fract : 0 ≤ ifp_n.fr := IntFractPair.nth_stream_fr_nonneg stream_nth_eq\n    inv_pos.2\n      (lt_of_le_of_ne zero_le_ifp_n_fract stream_nth_fr_ne_zero.symm)\n        -- Porting note: replaced complicated positivity proof with tactic.\n  positivity\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis : 1 / denom' ≤ 1 / denom\n⊢ 0 < denom'\n[PROOFSTEP]\nhave : 0 ≤ pred_conts.b :=\n  haveI : (fib n : K) ≤ pred_conts.b :=\n    haveI : ¬g.TerminatedAt (n - 2) := mt (terminated_stable (n.sub_le 2)) not_terminated_at_n\n    fib_le_of_continuantsAux_b <| Or.inr this\n  le_trans (by exact_mod_cast (fib n).zero_le) this\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis✝ : 1 / denom' ≤ 1 / denom\nthis : ↑(fib n) ≤ pred_conts.b\n⊢ 0 ≤ ↑(fib n)\n[PROOFSTEP]\nexact_mod_cast (fib n).zero_le\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis✝ : 1 / denom' ≤ 1 / denom\nthis : 0 ≤ pred_conts.b\n⊢ 0 < denom'\n[PROOFSTEP]\nhave : 0 < ifp_n.fr⁻¹ :=\n  haveI zero_le_ifp_n_fract : 0 ≤ ifp_n.fr := IntFractPair.nth_stream_fr_nonneg stream_nth_eq\n  inv_pos.2\n    (lt_of_le_of_ne zero_le_ifp_n_fract stream_nth_fr_ne_zero.symm)\n      -- Porting note: replaced complicated positivity proof with tactic.\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis✝¹ : 1 / denom' ≤ 1 / denom\nthis✝ : 0 ≤ pred_conts.b\nthis : 0 < ifp_n.fr⁻¹\n⊢ 0 < denom'\n[PROOFSTEP]\npositivity\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis✝ : 1 / denom' ≤ 1 / denom\nthis : 0 < denom'\n⊢ 1 / |denom'| = 1 / denom'\n[PROOFSTEP]\nrw [abs_of_pos this]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis✝ : 1 / denom' ≤ 1 / denom\nthis : |(-1) ^ n / denom'| = 1 / denom'\n⊢ |(-1) ^ n / denom'| ≤ 1 / denom\n[PROOFSTEP]\nrwa [this]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\n⊢ 1 / denom' ≤ 1 / denom\n[PROOFSTEP]\nsuffices 0 < denom ∧ denom ≤ denom' from div_le_div_of_le_left zero_le_one this.left this.right\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\n⊢ 0 < denom ∧ denom ≤ denom'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.left\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\n⊢ 0 < denom\n[PROOFSTEP]\nhave : 0 < pred_conts.b + gp.b * conts.b :=\n  lt_of_lt_of_le (by exact_mod_cast fib_pos (lt_of_le_of_ne n.succ.succ.zero_le n.succ.succ_ne_zero.symm))\n    nextConts_b_ineq\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\n⊢ 0 < ↑(fib (n + 2))\n[PROOFSTEP]\nexact_mod_cast fib_pos (lt_of_le_of_ne n.succ.succ.zero_le n.succ.succ_ne_zero.symm)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.left\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis : 0 < pred_conts.b + gp.b * conts.b\n⊢ 0 < denom\n[PROOFSTEP]\nsolve_by_elim [mul_pos]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.right\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\n⊢ denom ≤ denom'\n[PROOFSTEP]\nsuffices : gp.b * conts.b ≤ ifp_n.fr⁻¹ * conts.b\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.right\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis : gp.b * conts.b ≤ ifp_n.fr⁻¹ * conts.b\n⊢ denom ≤ denom'\ncase this\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\n⊢ gp.b * conts.b ≤ ifp_n.fr⁻¹ * conts.b\n[PROOFSTEP]\nexact (mul_le_mul_left zero_lt_conts_b).2 <| (add_le_add_iff_left pred_conts.b).2 this\n[GOAL]\ncase this\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\n⊢ gp.b * conts.b ≤ ifp_n.fr⁻¹ * conts.b\n[PROOFSTEP]\nsuffices (ifp_succ_n.b : K) * conts.b ≤ ifp_n.fr⁻¹ * conts.b by rwa [← ifp_succ_n_b_eq_gp_b]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis : ↑ifp_succ_n.b * conts.b ≤ ifp_n.fr⁻¹ * conts.b\n⊢ gp.b * conts.b ≤ ifp_n.fr⁻¹ * conts.b\n[PROOFSTEP]\nrwa [← ifp_succ_n_b_eq_gp_b]\n[GOAL]\ncase this\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\n⊢ ↑ifp_succ_n.b * conts.b ≤ ifp_n.fr⁻¹ * conts.b\n[PROOFSTEP]\nhave : (ifp_succ_n.b : K) ≤ ifp_n.fr⁻¹ :=\n  IntFractPair.succ_nth_stream_b_le_nth_stream_fr_inv stream_nth_eq succ_nth_stream_eq\n[GOAL]\ncase this\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis : ↑ifp_succ_n.b ≤ ifp_n.fr⁻¹\n⊢ ↑ifp_succ_n.b * conts.b ≤ ifp_n.fr⁻¹ * conts.b\n[PROOFSTEP]\nhave : 0 ≤ conts.b := le_of_lt zero_lt_conts_b\n[GOAL]\ncase this\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis✝ : ↑ifp_succ_n.b ≤ ifp_n.fr⁻¹\nthis : 0 ≤ conts.b\n⊢ ↑ifp_succ_n.b * conts.b ≤ ifp_n.fr⁻¹ * conts.b\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_right _ _\n[GOAL]\ncase this.refine'_1\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis✝ : ↑ifp_succ_n.b ≤ ifp_n.fr⁻¹\nthis : 0 ≤ conts.b\n⊢ ↑ifp_succ_n.b ≤ ifp_n.fr⁻¹\n[PROOFSTEP]\nassumption\n[GOAL]\ncase this.refine'_2\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nnot_terminated_at_n : ¬TerminatedAt (of v) n\ng : GeneralizedContinuedFraction K := of v\nnextConts : Pair K := continuantsAux g (n + 2)\nconts : Pair K := continuantsAux g (n + 1)\nconts_eq : conts = continuantsAux g (n + 1)\npred_conts : Pair K := continuantsAux g n\npred_conts_eq : pred_conts = continuantsAux g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\ngp_a_eq_one : gp.a = 1\nnextConts_b_eq : nextConts.b = pred_conts.b + gp.b * conts.b\ndenom : K := conts.b * (pred_conts.b + gp.b * conts.b)\nifp_succ_n : IntFractPair K\nsucc_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nifp_succ_n_b_eq_gp_b : ↑ifp_succ_n.b = gp.b\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nstream_nth_fr_ne_zero : ifp_n.fr ≠ 0\nif_of_eq_ifp_succ_n : IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\ndenom' : K := conts.b * (pred_conts.b + ifp_n.fr⁻¹ * conts.b)\nnextConts_b_ineq : ↑(fib (n + 2)) ≤ pred_conts.b + gp.b * conts.b\nconts_b_ineq : ↑(fib (n + 1)) ≤ conts.b\nzero_lt_conts_b : 0 < conts.b\nthis✝ : ↑ifp_succ_n.b ≤ ifp_n.fr⁻¹\nthis : 0 ≤ conts.b\n⊢ 0 ≤ conts.b\n[PROOFSTEP]\nassumption\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\n⊢ |v - convergents (of v) n| ≤ 1 / (b * denominators (of v) n * denominators (of v) n)\n[PROOFSTEP]\nhave not_terminated_at_n : ¬(of v).TerminatedAt n := by simp [terminatedAt_iff_part_denom_none, nth_part_denom_eq]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\n⊢ ¬TerminatedAt (of v) n\n[PROOFSTEP]\nsimp [terminatedAt_iff_part_denom_none, nth_part_denom_eq]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\nnot_terminated_at_n : ¬TerminatedAt (of v) n\n⊢ |v - convergents (of v) n| ≤ 1 / (b * denominators (of v) n * denominators (of v) n)\n[PROOFSTEP]\nrefine'\n  (abs_sub_convergents_le not_terminated_at_n).trans\n    _\n      -- One can show that `0 < (GeneralizedContinuedFraction.of v).denominators n` but it's easier\n        -- to consider the case `(GeneralizedContinuedFraction.of v).denominators n = 0`.\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\nnot_terminated_at_n : ¬TerminatedAt (of v) n\n⊢ 1 / (denominators (of v) n * denominators (of v) (n + 1)) ≤ 1 / (b * denominators (of v) n * denominators (of v) n)\n[PROOFSTEP]\nrcases(zero_le_of_denom (K := K)).eq_or_gt with ((hB : (GeneralizedContinuedFraction.of v).denominators n = 0) | hB)\n[GOAL]\ncase inl\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\nnot_terminated_at_n : ¬TerminatedAt (of v) n\nhB : denominators (of v) n = 0\n⊢ 1 / (denominators (of v) n * denominators (of v) (n + 1)) ≤ 1 / (b * denominators (of v) n * denominators (of v) n)\n[PROOFSTEP]\nsimp only [hB, mul_zero, zero_mul, div_zero, le_refl]\n[GOAL]\ncase inr\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\nnot_terminated_at_n : ¬TerminatedAt (of v) n\nhB : 0 < denominators (of v) n\n⊢ 1 / (denominators (of v) n * denominators (of v) (n + 1)) ≤ 1 / (b * denominators (of v) n * denominators (of v) n)\n[PROOFSTEP]\napply one_div_le_one_div_of_le\n[GOAL]\ncase inr.ha\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\nnot_terminated_at_n : ¬TerminatedAt (of v) n\nhB : 0 < denominators (of v) n\n⊢ 0 < b * denominators (of v) n * denominators (of v) n\n[PROOFSTEP]\nhave : 0 < b := zero_lt_one.trans_le (of_one_le_get?_part_denom nth_part_denom_eq)\n[GOAL]\ncase inr.ha\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\nnot_terminated_at_n : ¬TerminatedAt (of v) n\nhB : 0 < denominators (of v) n\nthis : 0 < b\n⊢ 0 < b * denominators (of v) n * denominators (of v) n\n[PROOFSTEP]\napply_rules [mul_pos]\n[GOAL]\ncase inr.h\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\nnot_terminated_at_n : ¬TerminatedAt (of v) n\nhB : 0 < denominators (of v) n\n⊢ b * denominators (of v) n * denominators (of v) n ≤ denominators (of v) n * denominators (of v) (n + 1)\n[PROOFSTEP]\nconv_rhs => rw [mul_comm]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\nnot_terminated_at_n : ¬TerminatedAt (of v) n\nhB : 0 < denominators (of v) n\n| denominators (of v) n * denominators (of v) (n + 1)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\nnot_terminated_at_n : ¬TerminatedAt (of v) n\nhB : 0 < denominators (of v) n\n| denominators (of v) n * denominators (of v) (n + 1)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\nnot_terminated_at_n : ¬TerminatedAt (of v) n\nhB : 0 < denominators (of v) n\n| denominators (of v) n * denominators (of v) (n + 1)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase inr.h\nK : Type u_1\nv : K\nn : ℕ\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators (of v)) n = some b\nnot_terminated_at_n : ¬TerminatedAt (of v) n\nhB : 0 < denominators (of v) n\n⊢ b * denominators (of v) n * denominators (of v) n ≤ denominators (of v) (n + 1) * denominators (of v) n\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right (le_of_succ_get?_denom nth_part_denom_eq) hB.le\n", "meta": {"mathlib_filename": "Mathlib.Algebra.ContinuedFractions.Computation.Approximations", "llama_tokens": 104527, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419704455588, "lm_q2_score": 0.5774953651858117, "lm_q1q2_score": 0.39999752766547814}}
{"text": "[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\n⊢ ∀ (a b c : M →* N), a * b * c = a * (b * c)\n[PROOFSTEP]\nintros\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\na✝ b✝ c✝ : M →* N\n⊢ a✝ * b✝ * c✝ = a✝ * (b✝ * c✝)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\na✝ b✝ c✝ : M →* N\nx✝ : M\n⊢ ↑(a✝ * b✝ * c✝) x✝ = ↑(a✝ * (b✝ * c✝)) x✝\n[PROOFSTEP]\napply mul_assoc\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\n⊢ ∀ (a : M →* N), 1 * a = a\n[PROOFSTEP]\nintros\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\na✝ : M →* N\n⊢ 1 * a✝ = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\na✝ : M →* N\nx✝ : M\n⊢ ↑(1 * a✝) x✝ = ↑a✝ x✝\n[PROOFSTEP]\napply one_mul\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\n⊢ ∀ (a : M →* N), a * 1 = a\n[PROOFSTEP]\nintros\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\na✝ : M →* N\n⊢ a✝ * 1 = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\na✝ : M →* N\nx✝ : M\n⊢ ↑(a✝ * 1) x✝ = ↑a✝ x✝\n[PROOFSTEP]\napply mul_one\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\nn : ℕ\nf : M →* N\n⊢ (fun x => ↑f x ^ n) 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\nn : ℕ\nf : M →* N\nx y : M\n⊢ OneHom.toFun { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) } (x * y) =\n    OneHom.toFun { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) } x *\n      OneHom.toFun { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) } y\n[PROOFSTEP]\nsimp [mul_pow]\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\nf : M →* N\n⊢ (fun n f =>\n        { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n          map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n      0 f =\n    1\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\nf : M →* N\nx : M\n⊢ ↑((fun n f =>\n            { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n              map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n          0 f)\n      x =\n    ↑1 x\n[PROOFSTEP]\nsimp\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\nn : ℕ\nf : M →* N\n⊢ (fun n f =>\n        { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n          map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n      (n + 1) f =\n    f *\n      (fun n f =>\n          { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n            map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n        n f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\nn : ℕ\nf : M →* N\nx : M\n⊢ ↑((fun n f =>\n            { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n              map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n          (n + 1) f)\n      x =\n    ↑(f *\n          (fun n f =>\n              { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n                map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n            n f)\n      x\n[PROOFSTEP]\nsimp [pow_succ]\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\n⊢ ∀ (a b : M →* N), a * b = b * a\n[PROOFSTEP]\nintros\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\na✝ b✝ : M →* N\n⊢ a✝ * b✝ = b✝ * a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝¹ : MulOneClass M\ninst✝ : CommMonoid N\na✝ b✝ : M →* N\nx✝ : M\n⊢ ↑(a✝ * b✝) x✝ = ↑(b✝ * a✝) x✝\n[PROOFSTEP]\napply mul_comm\n[GOAL]\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\n⊢ ∀ (a b : M →* G), a / b = a * b⁻¹\n[PROOFSTEP]\nintros\n[GOAL]\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\na✝ b✝ : M →* G\n⊢ a✝ / b✝ = a✝ * b✝⁻¹\n[PROOFSTEP]\next\n[GOAL]\ncase h\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\na✝ b✝ : M →* G\nx✝ : M\n⊢ ↑(a✝ / b✝) x✝ = ↑(a✝ * b✝⁻¹) x✝\n[PROOFSTEP]\napply div_eq_mul_inv\n[GOAL]\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\nn : ℤ\nf : M →* G\n⊢ (fun x => ↑f x ^ n) 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\nn : ℤ\nf : M →* G\nx y : M\n⊢ OneHom.toFun { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) } (x * y) =\n    OneHom.toFun { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) } x *\n      OneHom.toFun { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) } y\n[PROOFSTEP]\nsimp [mul_zpow]\n[GOAL]\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\nf : M →* G\n⊢ (fun n f =>\n        { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n          map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n      0 f =\n    1\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\nf : M →* G\nx : M\n⊢ ↑((fun n f =>\n            { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n              map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n          0 f)\n      x =\n    ↑1 x\n[PROOFSTEP]\nsimp\n[GOAL]\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\nn : ℕ\nf : M →* G\n⊢ (fun n f =>\n        { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n          map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n      (Int.ofNat (Nat.succ n)) f =\n    f *\n      (fun n f =>\n          { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n            map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n        (Int.ofNat n) f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\nn : ℕ\nf : M →* G\nx : M\n⊢ ↑((fun n f =>\n            { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n              map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n          (Int.ofNat (Nat.succ n)) f)\n      x =\n    ↑(f *\n          (fun n f =>\n              { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n                map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n            (Int.ofNat n) f)\n      x\n[PROOFSTEP]\nsimp [zpow_ofNat, pow_succ]\n[GOAL]\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\nn : ℕ\nf : M →* G\n⊢ (fun n f =>\n        { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n          map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n      (Int.negSucc n) f =\n    ((fun n f =>\n          { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n            map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n        (↑(Nat.succ n)) f)⁻¹\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\nn : ℕ\nf : M →* G\nx : M\n⊢ ↑((fun n f =>\n            { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n              map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n          (Int.negSucc n) f)\n      x =\n    ↑((fun n f =>\n              { toOneHom := { toFun := fun x => ↑f x ^ n, map_one' := (_ : ↑f 1 ^ n = 1) },\n                map_mul' := (_ : ∀ (x y : M), ↑f (x * y) ^ n = ↑f x ^ n * ↑f y ^ n) })\n            (↑(Nat.succ n)) f)⁻¹\n      x\n[PROOFSTEP]\nsimp [Nat.succ_eq_add_one, zpow_ofNat]\n[GOAL]\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\n⊢ ∀ (a : M →* G), a⁻¹ * a = 1\n[PROOFSTEP]\nintros\n[GOAL]\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\na✝ : M →* G\n⊢ a✝⁻¹ * a✝ = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nM✝ : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nM : Type ?u.8567\nG : Type ?u.8570\ninst✝¹ : MulOneClass M\ninst✝ : CommGroup G\nsrc✝ : CommMonoid (M →* G) := commMonoid\na✝ : M →* G\nx✝ : M\n⊢ ↑(a✝⁻¹ * a✝) x✝ = ↑1 x✝\n[PROOFSTEP]\napply mul_left_inv\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nmM : MulOneClass M\nmN : MulOneClass N\nmP : CommMonoid P\nf : M →* N →* P\ny : N\n⊢ (fun x => ↑(↑f x) y) 1 = 1\n[PROOFSTEP]\nsimp [f.map_one, one_apply]\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\nmM : MulOneClass M\nmN : MulOneClass N\nmP : CommMonoid P\nf : M →* N →* P\ny : N\nx₁ x₂ : M\n⊢ OneHom.toFun { toFun := fun x => ↑(↑f x) y, map_one' := (_ : ↑(↑f 1) y = 1) } (x₁ * x₂) =\n    OneHom.toFun { toFun := fun x => ↑(↑f x) y, map_one' := (_ : ↑(↑f 1) y = 1) } x₁ *\n      OneHom.toFun { toFun := fun x => ↑(↑f x) y, map_one' := (_ : ↑(↑f 1) y = 1) } x₂\n[PROOFSTEP]\nsimp [f.map_mul, mul_apply]\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝² : MulOneClass M\ninst✝¹ : CommMonoid N\ninst✝ : CommMonoid P\n⊢ (fun g =>\n        { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n          map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })\n      1 =\n    1\n[PROOFSTEP]\next1 f\n[GOAL]\ncase h\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝² : MulOneClass M\ninst✝¹ : CommMonoid N\ninst✝ : CommMonoid P\nf : M →* N\n⊢ ↑((fun g =>\n            { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n              map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })\n          1)\n      f =\n    ↑1 f\n[PROOFSTEP]\nexact one_comp f\n[GOAL]\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝² : MulOneClass M\ninst✝¹ : CommMonoid N\ninst✝ : CommMonoid P\ng₁ g₂ : N →* P\n⊢ OneHom.toFun\n      {\n        toFun := fun g =>\n          { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n            map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) },\n        map_one' :=\n          (_ :\n            (fun g =>\n                  { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n                    map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })\n                1 =\n              1) }\n      (g₁ * g₂) =\n    OneHom.toFun\n        {\n          toFun := fun g =>\n            { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n              map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) },\n          map_one' :=\n            (_ :\n              (fun g =>\n                    { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n                      map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })\n                  1 =\n                1) }\n        g₁ *\n      OneHom.toFun\n        {\n          toFun := fun g =>\n            { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n              map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) },\n          map_one' :=\n            (_ :\n              (fun g =>\n                    { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n                      map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })\n                  1 =\n                1) }\n        g₂\n[PROOFSTEP]\next1 f\n[GOAL]\ncase h\nM : Type uM\nN : Type uN\nP : Type uP\nQ : Type uQ\ninst✝² : MulOneClass M\ninst✝¹ : CommMonoid N\ninst✝ : CommMonoid P\ng₁ g₂ : N →* P\nf : M →* N\n⊢ ↑(OneHom.toFun\n          {\n            toFun := fun g =>\n              { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n                map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) },\n            map_one' :=\n              (_ :\n                (fun g =>\n                      { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n                        map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })\n                    1 =\n                  1) }\n          (g₁ * g₂))\n      f =\n    ↑(OneHom.toFun\n            {\n              toFun := fun g =>\n                { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n                  map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) },\n              map_one' :=\n                (_ :\n                  (fun g =>\n                        { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n                          map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })\n                      1 =\n                    1) }\n            g₁ *\n          OneHom.toFun\n            {\n              toFun := fun g =>\n                { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n                  map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) },\n              map_one' :=\n                (_ :\n                  (fun g =>\n                        { toOneHom := { toFun := comp g, map_one' := (_ : comp g 1 = 1) },\n                          map_mul' := (_ : ∀ (f₁ f₂ : M →* N), comp g (f₁ * f₂) = comp g f₁ * comp g f₂) })\n                      1 =\n                    1) }\n            g₂)\n      f\n[PROOFSTEP]\nexact mul_comp g₁ g₂ f\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Hom.GroupInstances", "llama_tokens": 7542, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6791786861878392, "lm_q2_score": 0.5888891307678321, "lm_q1q2_score": 0.39996094614519484}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\nhp : Prime p\ns✝ : Multiset α\na : α\ns : Multiset α\nih : p ∣ Multiset.prod s → ∃ a, a ∈ s ∧ p ∣ a\nh : p ∣ Multiset.prod (a ::ₘ s)\n⊢ p ∣ a * Multiset.prod s\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\nhp : Prime p\ns : Multiset β\nf : β → α\nh : p ∣ Multiset.prod (Multiset.map f s)\n⊢ ∃ a, a ∈ s ∧ p ∣ f a\n[PROOFSTEP]\nsimpa only [exists_prop, Multiset.mem_map, exists_exists_and_eq_and] using hp.exists_mem_multiset_dvd h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\nhp : Prime p\ns : Multiset α\n⊢ (∀ (r : α), r ∈ 0 → Prime r) → p ∣ Multiset.prod 0 → ∃ q, q ∈ 0 ∧ p ~ᵤ q\n[PROOFSTEP]\nsimp [mt isUnit_iff_dvd_one.2 hp.not_unit]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\nhp : Prime p\ns✝ : Multiset α\na : α\ns : Multiset α\nih : (∀ (r : α), r ∈ s → Prime r) → p ∣ Multiset.prod s → ∃ q, q ∈ s ∧ p ~ᵤ q\nhs : ∀ (r : α), r ∈ a ::ₘ s → Prime r\nhps : p ∣ Multiset.prod (a ::ₘ s)\n⊢ ∃ q, q ∈ a ::ₘ s ∧ p ~ᵤ q\n[PROOFSTEP]\nrw [Multiset.prod_cons] at hps \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\nhp : Prime p\ns✝ : Multiset α\na : α\ns : Multiset α\nih : (∀ (r : α), r ∈ s → Prime r) → p ∣ Multiset.prod s → ∃ q, q ∈ s ∧ p ~ᵤ q\nhs : ∀ (r : α), r ∈ a ::ₘ s → Prime r\nhps : p ∣ a * Multiset.prod s\n⊢ ∃ q, q ∈ a ::ₘ s ∧ p ~ᵤ q\n[PROOFSTEP]\ncases' hp.dvd_or_dvd hps with h h\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\nhp : Prime p\ns✝ : Multiset α\na : α\ns : Multiset α\nih : (∀ (r : α), r ∈ s → Prime r) → p ∣ Multiset.prod s → ∃ q, q ∈ s ∧ p ~ᵤ q\nhs : ∀ (r : α), r ∈ a ::ₘ s → Prime r\nhps : p ∣ a * Multiset.prod s\nh : p ∣ a\n⊢ ∃ q, q ∈ a ::ₘ s ∧ p ~ᵤ q\n[PROOFSTEP]\nhave hap := hs a (Multiset.mem_cons.2 (Or.inl rfl))\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\nhp : Prime p\ns✝ : Multiset α\na : α\ns : Multiset α\nih : (∀ (r : α), r ∈ s → Prime r) → p ∣ Multiset.prod s → ∃ q, q ∈ s ∧ p ~ᵤ q\nhs : ∀ (r : α), r ∈ a ::ₘ s → Prime r\nhps : p ∣ a * Multiset.prod s\nh : p ∣ a\nhap : Prime a\n⊢ ∃ q, q ∈ a ::ₘ s ∧ p ~ᵤ q\n[PROOFSTEP]\nexact ⟨a, Multiset.mem_cons_self a _, hp.associated_of_dvd hap h⟩\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\nhp : Prime p\ns✝ : Multiset α\na : α\ns : Multiset α\nih : (∀ (r : α), r ∈ s → Prime r) → p ∣ Multiset.prod s → ∃ q, q ∈ s ∧ p ~ᵤ q\nhs : ∀ (r : α), r ∈ a ::ₘ s → Prime r\nhps : p ∣ a * Multiset.prod s\nh : p ∣ Multiset.prod s\n⊢ ∃ q, q ∈ a ::ₘ s ∧ p ~ᵤ q\n[PROOFSTEP]\nrcases ih (fun r hr => hs _ (Multiset.mem_cons.2 (Or.inr hr))) h with ⟨q, hq₁, hq₂⟩\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\nhp : Prime p\ns✝ : Multiset α\na : α\ns : Multiset α\nih : (∀ (r : α), r ∈ s → Prime r) → p ∣ Multiset.prod s → ∃ q, q ∈ s ∧ p ~ᵤ q\nhs : ∀ (r : α), r ∈ a ::ₘ s → Prime r\nhps : p ∣ a * Multiset.prod s\nh : p ∣ Multiset.prod s\nq : α\nhq₁ : q ∈ s\nhq₂ : p ~ᵤ q\n⊢ ∃ q, q ∈ a ::ₘ s ∧ p ~ᵤ q\n[PROOFSTEP]\nexact ⟨q, Multiset.mem_cons.2 (Or.inr hq₁), hq₂⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns : Multiset α\nn : α\nh : ∀ (a : α), a ∈ s → Prime a\ndiv : ∀ (a : α), a ∈ s → a ∣ n\nuniq : ∀ (a : α), countp (Associated a) s ≤ 1\n⊢ prod s ∣ n\n[PROOFSTEP]\ninduction' s using Multiset.induction_on with a s induct n primes divs generalizing n\n[GOAL]\ncase empty\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns : Multiset α\nn✝ : α\nh✝ : ∀ (a : α), a ∈ s → Prime a\ndiv✝ : ∀ (a : α), a ∈ s → a ∣ n✝\nuniq✝ : ∀ (a : α), countp (Associated a) s ≤ 1\nn : α\nh : ∀ (a : α), a ∈ 0 → Prime a\ndiv : ∀ (a : α), a ∈ 0 → a ∣ n\nuniq : ∀ (a : α), countp (Associated a) 0 ≤ 1\n⊢ prod 0 ∣ n\n[PROOFSTEP]\nsimp only [Multiset.prod_zero, one_dvd]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns✝ : Multiset α\nn✝ : α\nh✝ : ∀ (a : α), a ∈ s✝ → Prime a\ndiv✝ : ∀ (a : α), a ∈ s✝ → a ∣ n✝\nuniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1\na : α\ns : Multiset α\ninduct :\n  ∀ (n : α),\n    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n\nn : α\nh : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1\ndiv : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ n\nuniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1\n⊢ prod (a ::ₘ s) ∣ n\n[PROOFSTEP]\nrw [Multiset.prod_cons]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns✝ : Multiset α\nn✝ : α\nh✝ : ∀ (a : α), a ∈ s✝ → Prime a\ndiv✝ : ∀ (a : α), a ∈ s✝ → a ∣ n✝\nuniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1\na : α\ns : Multiset α\ninduct :\n  ∀ (n : α),\n    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n\nn : α\nh : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1\ndiv : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ n\nuniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1\n⊢ a * prod s ∣ n\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ : a ∣ n := div a (Multiset.mem_cons_self a s)\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns✝ : Multiset α\nn : α\nh✝ : ∀ (a : α), a ∈ s✝ → Prime a\ndiv✝ : ∀ (a : α), a ∈ s✝ → a ∣ n\nuniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1\na : α\ns : Multiset α\ninduct :\n  ∀ (n : α),\n    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n\nh : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1\nuniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1\nk : α\ndiv : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k\n⊢ a * prod s ∣ a * k\n[PROOFSTEP]\napply mul_dvd_mul_left a\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns✝ : Multiset α\nn : α\nh✝ : ∀ (a : α), a ∈ s✝ → Prime a\ndiv✝ : ∀ (a : α), a ∈ s✝ → a ∣ n\nuniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1\na : α\ns : Multiset α\ninduct :\n  ∀ (n : α),\n    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n\nh : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1\nuniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1\nk : α\ndiv : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k\n⊢ prod s ∣ k\n[PROOFSTEP]\nrefine\n  induct _ (fun a ha => h a (Multiset.mem_cons_of_mem ha)) (fun b b_in_s => ?_) fun a =>\n    (Multiset.countp_le_of_le _ (Multiset.le_cons_self _ _)).trans (uniq a)\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns✝ : Multiset α\nn : α\nh✝ : ∀ (a : α), a ∈ s✝ → Prime a\ndiv✝ : ∀ (a : α), a ∈ s✝ → a ∣ n\nuniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1\na : α\ns : Multiset α\ninduct :\n  ∀ (n : α),\n    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n\nh : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1\nuniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1\nk : α\ndiv : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k\nb : α\nb_in_s : b ∈ s\n⊢ b ∣ k\n[PROOFSTEP]\nhave b_div_n := div b (Multiset.mem_cons_of_mem b_in_s)\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns✝ : Multiset α\nn : α\nh✝ : ∀ (a : α), a ∈ s✝ → Prime a\ndiv✝ : ∀ (a : α), a ∈ s✝ → a ∣ n\nuniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1\na : α\ns : Multiset α\ninduct :\n  ∀ (n : α),\n    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n\nh : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1\nuniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1\nk : α\ndiv : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k\nb : α\nb_in_s : b ∈ s\nb_div_n : b ∣ a * k\n⊢ b ∣ k\n[PROOFSTEP]\nhave a_prime := h a (Multiset.mem_cons_self a s)\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns✝ : Multiset α\nn : α\nh✝ : ∀ (a : α), a ∈ s✝ → Prime a\ndiv✝ : ∀ (a : α), a ∈ s✝ → a ∣ n\nuniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1\na : α\ns : Multiset α\ninduct :\n  ∀ (n : α),\n    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n\nh : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1\nuniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1\nk : α\ndiv : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k\nb : α\nb_in_s : b ∈ s\nb_div_n : b ∣ a * k\na_prime : Prime a\n⊢ b ∣ k\n[PROOFSTEP]\nhave b_prime := h b (Multiset.mem_cons_of_mem b_in_s)\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns✝ : Multiset α\nn : α\nh✝ : ∀ (a : α), a ∈ s✝ → Prime a\ndiv✝ : ∀ (a : α), a ∈ s✝ → a ∣ n\nuniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1\na : α\ns : Multiset α\ninduct :\n  ∀ (n : α),\n    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n\nh : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1\nuniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1\nk : α\ndiv : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k\nb : α\nb_in_s : b ∈ s\nb_div_n : b ∣ a * k\na_prime : Prime a\nb_prime : Prime b\n⊢ b ∣ k\n[PROOFSTEP]\nrefine' (b_prime.dvd_or_dvd b_div_n).resolve_left fun b_div_a => _\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns✝ : Multiset α\nn : α\nh✝ : ∀ (a : α), a ∈ s✝ → Prime a\ndiv✝ : ∀ (a : α), a ∈ s✝ → a ∣ n\nuniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1\na : α\ns : Multiset α\ninduct :\n  ∀ (n : α),\n    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n\nh : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1\nuniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1\nk : α\ndiv : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k\nb : α\nb_in_s : b ∈ s\nb_div_n : b ∣ a * k\na_prime : Prime a\nb_prime : Prime b\nb_div_a : b ∣ a\n⊢ False\n[PROOFSTEP]\nhave assoc := b_prime.associated_of_dvd a_prime b_div_a\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns✝ : Multiset α\nn : α\nh✝ : ∀ (a : α), a ∈ s✝ → Prime a\ndiv✝ : ∀ (a : α), a ∈ s✝ → a ∣ n\nuniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1\na : α\ns : Multiset α\ninduct :\n  ∀ (n : α),\n    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n\nh : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1\nuniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1\nk : α\ndiv : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k\nb : α\nb_in_s : b ∈ s\nb_div_n : b ∣ a * k\na_prime : Prime a\nb_prime : Prime b\nb_div_a : b ∣ a\nassoc : b ~ᵤ a\n⊢ False\n[PROOFSTEP]\nhave := uniq a\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns✝ : Multiset α\nn : α\nh✝ : ∀ (a : α), a ∈ s✝ → Prime a\ndiv✝ : ∀ (a : α), a ∈ s✝ → a ∣ n\nuniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1\na : α\ns : Multiset α\ninduct :\n  ∀ (n : α),\n    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n\nh : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1\nuniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1\nk : α\ndiv : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k\nb : α\nb_in_s : b ∈ s\nb_div_n : b ∣ a * k\na_prime : Prime a\nb_prime : Prime b\nb_div_a : b ∣ a\nassoc : b ~ᵤ a\nthis : countp (Associated a) (a ::ₘ s) ≤ 1\n⊢ False\n[PROOFSTEP]\nrw [Multiset.countp_cons_of_pos _ (Associated.refl _), Nat.succ_le_succ_iff, ← not_lt, Multiset.countp_pos] at this \n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : (a : α) → DecidablePred (Associated a)\ns✝ : Multiset α\nn : α\nh✝ : ∀ (a : α), a ∈ s✝ → Prime a\ndiv✝ : ∀ (a : α), a ∈ s✝ → a ∣ n\nuniq✝ : ∀ (a : α), countp (Associated a) s✝ ≤ 1\na : α\ns : Multiset α\ninduct :\n  ∀ (n : α),\n    (∀ (a : α), a ∈ s → Prime a) → (∀ (a : α), a ∈ s → a ∣ n) → (∀ (a : α), countp (Associated a) s ≤ 1) → prod s ∣ n\nh : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Prime a_1\nuniq : ∀ (a_1 : α), countp (Associated a_1) (a ::ₘ s) ≤ 1\nk : α\ndiv : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → a_1 ∣ a * k\nb : α\nb_in_s : b ∈ s\nb_div_n : b ∣ a * k\na_prime : Prime a\nb_prime : Prime b\nb_div_a : b ∣ a\nassoc : b ~ᵤ a\nthis : ¬∃ a_1, a_1 ∈ s ∧ a ~ᵤ a_1\n⊢ False\n[PROOFSTEP]\nexact this ⟨b, b_in_s, assoc.symm⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Unique αˣ\ns : Finset α\nn : α\nh : ∀ (a : α), a ∈ s → Prime a\ndiv : ∀ (a : α), a ∈ s → a ∣ n\n⊢ ∏ p in s, p ∣ n\n[PROOFSTEP]\nclassical exact\n  Multiset.prod_primes_dvd n (by simpa only [Multiset.map_id', Finset.mem_def] using h)\n    (by simpa only [Multiset.map_id', Finset.mem_def] using div)\n    (by\n      -- POrting note: was\n                -- `simp only [Multiset.map_id', associated_eq_eq, Multiset.countp_eq_card_filter, ←\n                --    Multiset.count_eq_card_filter_eq, ← Multiset.nodup_iff_count_le_one, s.nodup]`\n      intro a\n      simp only [Multiset.map_id', associated_eq_eq, Multiset.countp_eq_card_filter]\n      change Multiset.card (Multiset.filter (fun b => a = b) s.val) ≤ 1\n      apply le_of_eq_of_le (Multiset.count_eq_card_filter_eq _ _).symm\n      apply Multiset.nodup_iff_count_le_one.mp\n      exact s.nodup)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Unique αˣ\ns : Finset α\nn : α\nh : ∀ (a : α), a ∈ s → Prime a\ndiv : ∀ (a : α), a ∈ s → a ∣ n\n⊢ ∏ p in s, p ∣ n\n[PROOFSTEP]\nexact\n  Multiset.prod_primes_dvd n (by simpa only [Multiset.map_id', Finset.mem_def] using h)\n    (by simpa only [Multiset.map_id', Finset.mem_def] using div)\n    (by\n      -- POrting note: was\n                -- `simp only [Multiset.map_id', associated_eq_eq, Multiset.countp_eq_card_filter, ←\n                --    Multiset.count_eq_card_filter_eq, ← Multiset.nodup_iff_count_le_one, s.nodup]`\n      intro a\n      simp only [Multiset.map_id', associated_eq_eq, Multiset.countp_eq_card_filter]\n      change Multiset.card (Multiset.filter (fun b => a = b) s.val) ≤ 1\n      apply le_of_eq_of_le (Multiset.count_eq_card_filter_eq _ _).symm\n      apply Multiset.nodup_iff_count_le_one.mp\n      exact s.nodup)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Unique αˣ\ns : Finset α\nn : α\nh : ∀ (a : α), a ∈ s → Prime a\ndiv : ∀ (a : α), a ∈ s → a ∣ n\n⊢ ∀ (a : α), a ∈ Multiset.map (fun p => p) s.val → Prime a\n[PROOFSTEP]\nsimpa only [Multiset.map_id', Finset.mem_def] using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Unique αˣ\ns : Finset α\nn : α\nh : ∀ (a : α), a ∈ s → Prime a\ndiv : ∀ (a : α), a ∈ s → a ∣ n\n⊢ ∀ (a : α), a ∈ Multiset.map (fun p => p) s.val → a ∣ n\n[PROOFSTEP]\nsimpa only [Multiset.map_id', Finset.mem_def] using div\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Unique αˣ\ns : Finset α\nn : α\nh : ∀ (a : α), a ∈ s → Prime a\ndiv : ∀ (a : α), a ∈ s → a ∣ n\n⊢ ∀ (a : α), Multiset.countp (Associated a) (Multiset.map (fun p => p) s.val) ≤ 1\n[PROOFSTEP]\nintro a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Unique αˣ\ns : Finset α\nn : α\nh : ∀ (a : α), a ∈ s → Prime a\ndiv : ∀ (a : α), a ∈ s → a ∣ n\na : α\n⊢ Multiset.countp (Associated a) (Multiset.map (fun p => p) s.val) ≤ 1\n[PROOFSTEP]\nsimp only [Multiset.map_id', associated_eq_eq, Multiset.countp_eq_card_filter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Unique αˣ\ns : Finset α\nn : α\nh : ∀ (a : α), a ∈ s → Prime a\ndiv : ∀ (a : α), a ∈ s → a ∣ n\na : α\n⊢ ↑Multiset.card (Multiset.filter (Eq a) s.val) ≤ 1\n[PROOFSTEP]\nchange Multiset.card (Multiset.filter (fun b => a = b) s.val) ≤ 1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Unique αˣ\ns : Finset α\nn : α\nh : ∀ (a : α), a ∈ s → Prime a\ndiv : ∀ (a : α), a ∈ s → a ∣ n\na : α\n⊢ ↑Multiset.card (Multiset.filter (fun b => a = b) s.val) ≤ 1\n[PROOFSTEP]\napply le_of_eq_of_le (Multiset.count_eq_card_filter_eq _ _).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Unique αˣ\ns : Finset α\nn : α\nh : ∀ (a : α), a ∈ s → Prime a\ndiv : ∀ (a : α), a ∈ s → a ∣ n\na : α\n⊢ Multiset.count a s.val ≤ 1\n[PROOFSTEP]\napply Multiset.nodup_iff_count_le_one.mp\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : Unique αˣ\ns : Finset α\nn : α\nh : ∀ (a : α), a ∈ s → Prime a\ndiv : ∀ (a : α), a ∈ s → a ∣ n\na : α\n⊢ Multiset.Nodup s.val\n[PROOFSTEP]\nexact s.nodup\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np : Multiset α\n⊢ Multiset.prod (Multiset.map Associates.mk 0) = Associates.mk (Multiset.prod 0)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np : Multiset α\na : α\ns : Multiset α\nih : Multiset.prod (Multiset.map Associates.mk s) = Associates.mk (Multiset.prod s)\n⊢ Multiset.prod (Multiset.map Associates.mk (a ::ₘ s)) = Associates.mk (Multiset.prod (a ::ₘ s))\n[PROOFSTEP]\nsimp [ih, Associates.mk_mul_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np : Finset β\nf : β → α\n⊢ ∏ i in p, Associates.mk (f i) = Associates.mk (∏ i in p, f i)\n[PROOFSTEP]\nhave : (fun i => Associates.mk (f i)) = Associates.mk ∘ f := funext <| fun x => Function.comp_apply\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np : Finset β\nf : β → α\nthis : (fun i => Associates.mk (f i)) = Associates.mk ∘ f\n⊢ ∏ i in p, Associates.mk (f i) = Associates.mk (∏ i in p, f i)\n[PROOFSTEP]\nrw [Finset.prod_eq_multiset_prod, this, ← Multiset.map_map, prod_mk, ← Finset.prod_eq_multiset_prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np q : Multiset α\n⊢ Multiset.Rel Associated p q ↔ Multiset.map Associates.mk p = Multiset.map Associates.mk q\n[PROOFSTEP]\nrw [← Multiset.rel_eq, Multiset.rel_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np q : Multiset α\n⊢ Multiset.Rel Associated p q ↔ Multiset.Rel (fun a b => Associates.mk a = Associates.mk b) p q\n[PROOFSTEP]\nsimp only [mk_eq_mk_iff_associated]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np : Multiset (Associates α)\n⊢ Multiset.prod 0 = 1 ↔ ∀ (a : Associates α), a ∈ 0 → a = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np : Multiset (Associates α)\n⊢ ∀ ⦃a : Associates α⦄ {s : Multiset (Associates α)},\n    (Multiset.prod s = 1 ↔ ∀ (a : Associates α), a ∈ s → a = 1) →\n      (Multiset.prod (a ::ₘ s) = 1 ↔ ∀ (a_2 : Associates α), a_2 ∈ a ::ₘ s → a_2 = 1)\n[PROOFSTEP]\nsimp (config := { contextual := true }) [mul_eq_one_iff, or_imp, forall_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np q : Multiset (Associates α)\nh : p ≤ q\n⊢ Multiset.prod p ≤ Multiset.prod q\n[PROOFSTEP]\nhaveI := Classical.decEq (Associates α)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np q : Multiset (Associates α)\nh : p ≤ q\nthis : DecidableEq (Associates α)\n⊢ Multiset.prod p ≤ Multiset.prod q\n[PROOFSTEP]\nhaveI := Classical.decEq α\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np q : Multiset (Associates α)\nh : p ≤ q\nthis✝ : DecidableEq (Associates α)\nthis : DecidableEq α\n⊢ Multiset.prod p ≤ Multiset.prod q\n[PROOFSTEP]\nsuffices p.prod ≤ (p + (q - p)).prod by rwa [add_tsub_cancel_of_le h] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np q : Multiset (Associates α)\nh : p ≤ q\nthis✝¹ : DecidableEq (Associates α)\nthis✝ : DecidableEq α\nthis : Multiset.prod p ≤ Multiset.prod (p + (q - p))\n⊢ Multiset.prod p ≤ Multiset.prod q\n[PROOFSTEP]\nrwa [add_tsub_cancel_of_le h] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np q : Multiset (Associates α)\nh : p ≤ q\nthis✝ : DecidableEq (Associates α)\nthis : DecidableEq α\n⊢ Multiset.prod p ≤ Multiset.prod (p + (q - p))\n[PROOFSTEP]\nsuffices p.prod * 1 ≤ p.prod * (q - p).prod by simpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np q : Multiset (Associates α)\nh : p ≤ q\nthis✝¹ : DecidableEq (Associates α)\nthis✝ : DecidableEq α\nthis : Multiset.prod p * 1 ≤ Multiset.prod p * Multiset.prod (q - p)\n⊢ Multiset.prod p ≤ Multiset.prod (p + (q - p))\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\np q : Multiset (Associates α)\nh : p ≤ q\nthis✝ : DecidableEq (Associates α)\nthis : DecidableEq α\n⊢ Multiset.prod p * 1 ≤ Multiset.prod p * Multiset.prod (q - p)\n[PROOFSTEP]\nexact mul_mono (le_refl p.prod) one_le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\ns✝ : Multiset (Associates α)\np : Associates α\nhp : Prime p\na : Associates α\ns : Multiset (Associates α)\nih : p ≤ Multiset.prod s → ∃ a, a ∈ s ∧ p ≤ a\nh : p ≤ Multiset.prod (a ::ₘ s)\n⊢ p ≤ a * Multiset.prod s\n[PROOFSTEP]\nsimpa using h\n", "meta": {"mathlib_filename": "Mathlib.Algebra.BigOperators.Associated", "llama_tokens": 11698, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7310585786300049, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.39969761627266737}}
{"text": "[GOAL]\nx : SimplexCategory\n⊢ Fintype (ConcreteCategory.forget.obj x)\n[PROOFSTEP]\nchange (Fintype (Fin _))\n[GOAL]\nx : SimplexCategory\n⊢ Fintype (Fin (len x + 1))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\n⊢ (fun i => ∑ j in Finset.filter (fun k => ↑f k = i) Finset.univ, ↑g j) ∈ toTopObj y\n[PROOFSTEP]\nsimp only [Finset.sum_congr, toTopObj, Set.mem_setOf]\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\n⊢ ∑ i : (forget SimplexCategory).obj y, ∑ x_1 in Finset.filter (fun k => ↑f k = i) Finset.univ, ↑g x_1 = 1\n[PROOFSTEP]\nrw [← Finset.sum_biUnion]\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\n⊢ ∑ x_1 in Finset.biUnion Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ, ↑g x_1 = 1\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\n⊢ Set.PairwiseDisjoint ↑Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ\n[PROOFSTEP]\nhave hg := g.2\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\nhg : ↑g ∈ toTopObj x\n⊢ ∑ x_1 in Finset.biUnion Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ, ↑g x_1 = 1\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\n⊢ Set.PairwiseDisjoint ↑Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ\n[PROOFSTEP]\ndsimp [toTopObj] at hg \n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\nhg : ∑ i : (forget SimplexCategory).obj x, ↑g i = 1\n⊢ ∑ x_1 in Finset.biUnion Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ, ↑g x_1 = 1\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\n⊢ Set.PairwiseDisjoint ↑Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ\n[PROOFSTEP]\nconvert hg\n[GOAL]\ncase h.e'_2.h\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\nhg : ∑ i : (forget SimplexCategory).obj x, ↑g i = 1\n⊢ (Finset.biUnion Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ) = Finset.univ\n[PROOFSTEP]\nsimp [Finset.eq_univ_iff_forall]\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\n⊢ Set.PairwiseDisjoint ↑Finset.univ fun i => Finset.filter (fun k => ↑f k = i) Finset.univ\n[PROOFSTEP]\nintro i _ j _ h\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\ni : (forget SimplexCategory).obj y\na✝¹ : i ∈ ↑Finset.univ\nj : (forget SimplexCategory).obj y\na✝ : j ∈ ↑Finset.univ\nh : i ≠ j\n⊢ (Disjoint on fun i => Finset.filter (fun k => ↑f k = i) Finset.univ) i j\n[PROOFSTEP]\nrw [Function.onFun, disjoint_iff_inf_le]\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\ni : (forget SimplexCategory).obj y\na✝¹ : i ∈ ↑Finset.univ\nj : (forget SimplexCategory).obj y\na✝ : j ∈ ↑Finset.univ\nh : i ≠ j\n⊢ Finset.filter (fun k => ↑f k = i) Finset.univ ⊓ Finset.filter (fun k => ↑f k = j) Finset.univ ≤ ⊥\n[PROOFSTEP]\nintro e he\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\ni : (forget SimplexCategory).obj y\na✝¹ : i ∈ ↑Finset.univ\nj : (forget SimplexCategory).obj y\na✝ : j ∈ ↑Finset.univ\nh : i ≠ j\ne : (forget SimplexCategory).obj x\nhe : e ∈ Finset.filter (fun k => ↑f k = i) Finset.univ ⊓ Finset.filter (fun k => ↑f k = j) Finset.univ\n⊢ e ∈ ⊥\n[PROOFSTEP]\nsimp only [Finset.bot_eq_empty, Finset.not_mem_empty]\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\ni : (forget SimplexCategory).obj y\na✝¹ : i ∈ ↑Finset.univ\nj : (forget SimplexCategory).obj y\na✝ : j ∈ ↑Finset.univ\nh : i ≠ j\ne : (forget SimplexCategory).obj x\nhe : e ∈ Finset.filter (fun k => ↑f k = i) Finset.univ ⊓ Finset.filter (fun k => ↑f k = j) Finset.univ\n⊢ False\n[PROOFSTEP]\napply h\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\ni : (forget SimplexCategory).obj y\na✝¹ : i ∈ ↑Finset.univ\nj : (forget SimplexCategory).obj y\na✝ : j ∈ ↑Finset.univ\nh : i ≠ j\ne : (forget SimplexCategory).obj x\nhe : e ∈ Finset.filter (fun k => ↑f k = i) Finset.univ ⊓ Finset.filter (fun k => ↑f k = j) Finset.univ\n⊢ i = j\n[PROOFSTEP]\nsimp only [Finset.mem_univ, forall_true_left, ge_iff_le, Finset.le_eq_subset, Finset.inf_eq_inter, Finset.mem_inter,\n  Finset.mem_filter, true_and] at he \n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ng : ↑(toTopObj x)\ni : (forget SimplexCategory).obj y\na✝¹ : i ∈ ↑Finset.univ\nj : (forget SimplexCategory).obj y\na✝ : j ∈ ↑Finset.univ\nh : i ≠ j\ne : (forget SimplexCategory).obj x\nhe : ↑f e = i ∧ ↑f e = j\n⊢ i = j\n[PROOFSTEP]\nrw [← he.1, he.2]\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\n⊢ Continuous (toTopMap f)\n[PROOFSTEP]\nrefine' Continuous.subtype_mk (continuous_pi fun i => _) _\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ni : (forget SimplexCategory).obj y\n⊢ Continuous fun a => ∑ j in Finset.filter (fun k => ↑f k = i) Finset.univ, ↑a j\n[PROOFSTEP]\ndsimp only [coe_toTopMap]\n[GOAL]\nx y : SimplexCategory\nf : x ⟶ y\ni : (forget SimplexCategory).obj y\n⊢ Continuous fun a => ∑ j in Finset.filter (fun k => ↑f k = i) Finset.univ, ↑a j\n[PROOFSTEP]\nexact continuous_finset_sum _ (fun j _ => (continuous_apply _).comp continuous_subtype_val)\n[GOAL]\nX✝ Y✝ : SimplexCategory\nf : X✝ ⟶ Y✝\n⊢ Continuous (toTopMap f)\n[PROOFSTEP]\ncontinuity\n[GOAL]\n⊢ ∀ (X : SimplexCategory),\n    { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (𝟙 X) =\n      𝟙 ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X)\n[PROOFSTEP]\nintro Δ\n[GOAL]\nΔ : SimplexCategory\n⊢ { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (𝟙 Δ) =\n    𝟙 ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)\n[PROOFSTEP]\next f\n[GOAL]\ncase w\nΔ : SimplexCategory\nf :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)\n⊢ ↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (𝟙 Δ)) f =\n    ↑(𝟙 ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)) f\n[PROOFSTEP]\napply toTopObj.ext\n[GOAL]\ncase w.a\nΔ : SimplexCategory\nf :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)\n⊢ ↑(↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (𝟙 Δ)) f) =\n    ↑(↑(𝟙 ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)) f)\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase w.a.h\nΔ : SimplexCategory\nf :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)\ni : (forget SimplexCategory).obj Δ\n⊢ ↑(↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (𝟙 Δ)) f) i =\n    ↑(↑(𝟙 ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)) f) i\n[PROOFSTEP]\nchange (Finset.univ.filter fun k => k = i).sum _ = _\n[GOAL]\ncase w.a.h\nΔ : SimplexCategory\nf :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)\ni : (forget SimplexCategory).obj Δ\n⊢ ∑ j in Finset.filter (fun k => k = i) Finset.univ, ↑f j =\n    ↑(↑(𝟙 ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj Δ)) f) i\n[PROOFSTEP]\nsimp [Finset.sum_filter, CategoryTheory.id_apply]\n[GOAL]\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (f ≫ g) =\n    { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map f ≫\n      { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map g\n[PROOFSTEP]\next h\n[GOAL]\ncase w\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\n⊢ ↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (f ≫ g)) h =\n    ↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map f ≫\n          { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map g)\n      h\n[PROOFSTEP]\napply toTopObj.ext\n[GOAL]\ncase w.a\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\n⊢ ↑(↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (f ≫ g)) h) =\n    ↑(↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map f ≫\n            { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map g)\n        h)\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase w.a.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\n⊢ ↑(↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map (f ≫ g)) h)\n      i =\n    ↑(↑({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map f ≫\n              { obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.map g)\n          h)\n      i\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.a.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\n⊢ ↑(↑(ContinuousMap.mk (toTopMap (Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))))) h) i =\n    ↑(↑(ContinuousMap.mk (toTopMap f) ≫ ContinuousMap.mk (toTopMap g)) h) i\n[PROOFSTEP]\nrw [CategoryTheory.comp_apply, ContinuousMap.coe_mk, ContinuousMap.coe_mk, ContinuousMap.coe_mk]\n[GOAL]\ncase w.a.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\n⊢ ↑(toTopMap (Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))) h) i = ↑(toTopMap g (toTopMap f h)) i\n[PROOFSTEP]\nsimp only [coe_toTopMap]\n[GOAL]\ncase w.a.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\n⊢ ∑ j in Finset.filter (fun k => ↑(Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))) k = i) Finset.univ,\n      ↑h j =\n    ∑ x in Finset.filter (fun k => ↑g k = i) Finset.univ, ∑ j in Finset.filter (fun k => ↑f k = x) Finset.univ, ↑h j\n[PROOFSTEP]\nerw [← Finset.sum_biUnion]\n[GOAL]\ncase w.a.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\n⊢ ∑ j in Finset.filter (fun k => ↑(Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))) k = i) Finset.univ,\n      ↑h j =\n    ∑ x in\n      Finset.biUnion (Finset.filter (fun k => ↑g k = i) Finset.univ) fun x =>\n        Finset.filter (fun k => ↑f k = x) Finset.univ,\n      ↑h x\n[PROOFSTEP]\napply Finset.sum_congr\n[GOAL]\ncase w.a.h.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\n⊢ Finset.filter (fun k => ↑(Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))) k = i) Finset.univ =\n    Finset.biUnion (Finset.filter (fun k => ↑g k = i) Finset.univ) fun x =>\n      Finset.filter (fun k => ↑f k = x) Finset.univ\n[PROOFSTEP]\nexact Finset.ext (fun j => ⟨fun hj => by simpa using hj, fun hj => by simpa using hj⟩)\n[GOAL]\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\nj : (forget SimplexCategory).obj X✝\nhj : j ∈ Finset.filter (fun k => ↑(Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))) k = i) Finset.univ\n⊢ j ∈\n    Finset.biUnion (Finset.filter (fun k => ↑g k = i) Finset.univ) fun x =>\n      Finset.filter (fun k => ↑f k = x) Finset.univ\n[PROOFSTEP]\nsimpa using hj\n[GOAL]\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\nj : (forget SimplexCategory).obj X✝\nhj :\n  j ∈\n    Finset.biUnion (Finset.filter (fun k => ↑g k = i) Finset.univ) fun x =>\n      Finset.filter (fun k => ↑f k = x) Finset.univ\n⊢ j ∈ Finset.filter (fun k => ↑(Hom.mk (OrderHom.comp (Hom.toOrderHom g) (Hom.toOrderHom f))) k = i) Finset.univ\n[PROOFSTEP]\nsimpa using hj\n[GOAL]\ncase w.a.h.a\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\n⊢ ∀ (x : (forget SimplexCategory).obj X✝),\n    (x ∈\n        Finset.biUnion (Finset.filter (fun k => ↑g k = i) Finset.univ) fun x =>\n          Finset.filter (fun k => ↑f k = x) Finset.univ) →\n      ↑h x = ↑h x\n[PROOFSTEP]\ntauto\n[GOAL]\ncase w.a.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\n⊢ Set.PairwiseDisjoint ↑(Finset.filter (fun k => ↑g k = i) Finset.univ) fun x =>\n    Finset.filter (fun k => ↑f k = x) Finset.univ\n[PROOFSTEP]\nintro j _ k _ h\n[GOAL]\ncase w.a.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh✝ :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\nj : (forget SimplexCategory).obj Y✝\na✝¹ : j ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)\nk : (forget SimplexCategory).obj Y✝\na✝ : k ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)\nh : j ≠ k\n⊢ (Disjoint on fun x => Finset.filter (fun k => ↑f k = x) Finset.univ) j k\n[PROOFSTEP]\nrw [Function.onFun, disjoint_iff_inf_le]\n[GOAL]\ncase w.a.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh✝ :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\nj : (forget SimplexCategory).obj Y✝\na✝¹ : j ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)\nk : (forget SimplexCategory).obj Y✝\na✝ : k ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)\nh : j ≠ k\n⊢ Finset.filter (fun k => ↑f k = j) Finset.univ ⊓ Finset.filter (fun k_1 => ↑f k_1 = k) Finset.univ ≤ ⊥\n[PROOFSTEP]\nintro e he\n[GOAL]\ncase w.a.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh✝ :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\nj : (forget SimplexCategory).obj Y✝\na✝¹ : j ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)\nk : (forget SimplexCategory).obj Y✝\na✝ : k ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)\nh : j ≠ k\ne : (forget SimplexCategory).obj X✝\nhe : e ∈ Finset.filter (fun k => ↑f k = j) Finset.univ ⊓ Finset.filter (fun k_1 => ↑f k_1 = k) Finset.univ\n⊢ e ∈ ⊥\n[PROOFSTEP]\nsimp only [Finset.bot_eq_empty, Finset.not_mem_empty]\n[GOAL]\ncase w.a.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh✝ :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\nj : (forget SimplexCategory).obj Y✝\na✝¹ : j ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)\nk : (forget SimplexCategory).obj Y✝\na✝ : k ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)\nh : j ≠ k\ne : (forget SimplexCategory).obj X✝\nhe : e ∈ Finset.filter (fun k => ↑f k = j) Finset.univ ⊓ Finset.filter (fun k_1 => ↑f k_1 = k) Finset.univ\n⊢ False\n[PROOFSTEP]\napply h\n[GOAL]\ncase w.a.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh✝ :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\nj : (forget SimplexCategory).obj Y✝\na✝¹ : j ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)\nk : (forget SimplexCategory).obj Y✝\na✝ : k ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)\nh : j ≠ k\ne : (forget SimplexCategory).obj X✝\nhe : e ∈ Finset.filter (fun k => ↑f k = j) Finset.univ ⊓ Finset.filter (fun k_1 => ↑f k_1 = k) Finset.univ\n⊢ j = k\n[PROOFSTEP]\nsimp only [Finset.mem_univ, forall_true_left, ge_iff_le, Finset.le_eq_subset, Finset.inf_eq_inter, Finset.mem_inter,\n  Finset.mem_filter, true_and] at he \n[GOAL]\ncase w.a.h\nX✝ Y✝ Z✝ : SimplexCategory\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nh✝ :\n  (forget TopCat).obj\n    ({ obj := fun x => TopCat.of ↑(toTopObj x), map := fun {X Y} f => ContinuousMap.mk (toTopMap f) }.obj X✝)\ni : (forget SimplexCategory).obj Z✝\nj : (forget SimplexCategory).obj Y✝\na✝¹ : j ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)\nk : (forget SimplexCategory).obj Y✝\na✝ : k ∈ ↑(Finset.filter (fun k => ↑g k = i) Finset.univ)\nh : j ≠ k\ne : (forget SimplexCategory).obj X✝\nhe : ↑f e = j ∧ ↑f e = k\n⊢ j = k\n[PROOFSTEP]\nrw [← he.1, he.2]\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.TopologicalSimplex", "llama_tokens": 8686, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943822145998, "lm_q2_score": 0.5273165233795672, "lm_q1q2_score": 0.39959749906596975}}
{"text": "[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype ι\nb : ι → B\n⊢ discr A b = det (traceMatrix A b)\n[PROOFSTEP]\nunfold discr\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype ι\nb : ι → B\n⊢ det (traceMatrix A b) = det (traceMatrix A b)\n[PROOFSTEP]\nconvert rfl\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : CommRing C\ninst✝³ : Algebra A C\nι' : Type u_1\ninst✝² : Fintype ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι'\nb : Basis ι A B\nf : ι ≃ ι'\n⊢ discr A (↑b ∘ ↑f.symm) = discr A ↑b\n[PROOFSTEP]\nclassical rw [← Basis.coe_reindex, discr_def, traceMatrix_reindex, det_reindex_self, ← discr_def]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : CommRing C\ninst✝³ : Algebra A C\nι' : Type u_1\ninst✝² : Fintype ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι'\nb : Basis ι A B\nf : ι ≃ ι'\n⊢ discr A (↑b ∘ ↑f.symm) = discr A ↑b\n[PROOFSTEP]\nrw [← Basis.coe_reindex, discr_def, traceMatrix_reindex, det_reindex_self, ← discr_def]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : IsDomain A\nb : ι → B\nhli : ¬LinearIndependent A b\n⊢ discr A b = 0\n[PROOFSTEP]\nclassical\nobtain ⟨g, hg, i, hi⟩ := Fintype.not_linearIndependent_iff.1 hli\nhave : (traceMatrix A b).mulVec g = 0 := by\n  ext i\n  have : ∀ j, (trace A B) (b i * b j) * g j = (trace A B) (g j • b j * b i) := by intro j; simp [mul_comm]\n  simp only [mulVec, dotProduct, traceMatrix_apply, Pi.zero_apply, traceForm_apply, fun j => this j, ←\n    LinearMap.map_sum, ← sum_mul, hg, zero_mul, LinearMap.map_zero]\nby_contra h\nrw [discr_def] at h \nsimp [Matrix.eq_zero_of_mulVec_eq_zero h this] at hi \n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : IsDomain A\nb : ι → B\nhli : ¬LinearIndependent A b\n⊢ discr A b = 0\n[PROOFSTEP]\nobtain ⟨g, hg, i, hi⟩ := Fintype.not_linearIndependent_iff.1 hli\n[GOAL]\ncase intro.intro.intro\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : IsDomain A\nb : ι → B\nhli : ¬LinearIndependent A b\ng : ι → A\nhg : ∑ i : ι, g i • b i = 0\ni : ι\nhi : g i ≠ 0\n⊢ discr A b = 0\n[PROOFSTEP]\nhave : (traceMatrix A b).mulVec g = 0 := by\n  ext i\n  have : ∀ j, (trace A B) (b i * b j) * g j = (trace A B) (g j • b j * b i) := by intro j; simp [mul_comm]\n  simp only [mulVec, dotProduct, traceMatrix_apply, Pi.zero_apply, traceForm_apply, fun j => this j, ←\n    LinearMap.map_sum, ← sum_mul, hg, zero_mul, LinearMap.map_zero]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : IsDomain A\nb : ι → B\nhli : ¬LinearIndependent A b\ng : ι → A\nhg : ∑ i : ι, g i • b i = 0\ni : ι\nhi : g i ≠ 0\n⊢ mulVec (traceMatrix A b) g = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : IsDomain A\nb : ι → B\nhli : ¬LinearIndependent A b\ng : ι → A\nhg : ∑ i : ι, g i • b i = 0\ni✝ : ι\nhi : g i✝ ≠ 0\ni : ι\n⊢ mulVec (traceMatrix A b) g i = OfNat.ofNat 0 i\n[PROOFSTEP]\nhave : ∀ j, (trace A B) (b i * b j) * g j = (trace A B) (g j • b j * b i) := by intro j; simp [mul_comm]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : IsDomain A\nb : ι → B\nhli : ¬LinearIndependent A b\ng : ι → A\nhg : ∑ i : ι, g i • b i = 0\ni✝ : ι\nhi : g i✝ ≠ 0\ni : ι\n⊢ ∀ (j : ι), ↑(trace A B) (b i * b j) * g j = ↑(trace A B) (g j • b j * b i)\n[PROOFSTEP]\nintro j\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : IsDomain A\nb : ι → B\nhli : ¬LinearIndependent A b\ng : ι → A\nhg : ∑ i : ι, g i • b i = 0\ni✝ : ι\nhi : g i✝ ≠ 0\ni j : ι\n⊢ ↑(trace A B) (b i * b j) * g j = ↑(trace A B) (g j • b j * b i)\n[PROOFSTEP]\nsimp [mul_comm]\n[GOAL]\ncase h\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : IsDomain A\nb : ι → B\nhli : ¬LinearIndependent A b\ng : ι → A\nhg : ∑ i : ι, g i • b i = 0\ni✝ : ι\nhi : g i✝ ≠ 0\ni : ι\nthis : ∀ (j : ι), ↑(trace A B) (b i * b j) * g j = ↑(trace A B) (g j • b j * b i)\n⊢ mulVec (traceMatrix A b) g i = OfNat.ofNat 0 i\n[PROOFSTEP]\nsimp only [mulVec, dotProduct, traceMatrix_apply, Pi.zero_apply, traceForm_apply, fun j => this j, ← LinearMap.map_sum,\n  ← sum_mul, hg, zero_mul, LinearMap.map_zero]\n[GOAL]\ncase intro.intro.intro\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : IsDomain A\nb : ι → B\nhli : ¬LinearIndependent A b\ng : ι → A\nhg : ∑ i : ι, g i • b i = 0\ni : ι\nhi : g i ≠ 0\nthis : mulVec (traceMatrix A b) g = 0\n⊢ discr A b = 0\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase intro.intro.intro\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : IsDomain A\nb : ι → B\nhli : ¬LinearIndependent A b\ng : ι → A\nhg : ∑ i : ι, g i • b i = 0\ni : ι\nhi : g i ≠ 0\nthis : mulVec (traceMatrix A b) g = 0\nh : ¬discr A b = 0\n⊢ False\n[PROOFSTEP]\nrw [discr_def] at h \n[GOAL]\ncase intro.intro.intro\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : IsDomain A\nb : ι → B\nhli : ¬LinearIndependent A b\ng : ι → A\nhg : ∑ i : ι, g i • b i = 0\ni : ι\nhi : g i ≠ 0\nthis : mulVec (traceMatrix A b) g = 0\nh : ¬det (traceMatrix A b) = 0\n⊢ False\n[PROOFSTEP]\nsimp [Matrix.eq_zero_of_mulVec_eq_zero h this] at hi \n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : CommRing C\ninst✝³ : Algebra A C\nι' : Type u_1\ninst✝² : Fintype ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι'\nb : ι → B\nP : Matrix ι ι A\n⊢ discr A (vecMul b (Matrix.map P ↑(algebraMap A B))) = det P ^ 2 * discr A b\n[PROOFSTEP]\nrw [discr_def, traceMatrix_of_matrix_vecMul, det_mul, det_mul, det_transpose, mul_comm, ← mul_assoc, discr_def, pow_two]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : CommRing C\ninst✝³ : Algebra A C\nι' : Type u_1\ninst✝² : Fintype ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι'\nb : ι → B\nP : Matrix ι ι A\n⊢ discr A (mulVec (Matrix.map P ↑(algebraMap A B)) b) = det P ^ 2 * discr A b\n[PROOFSTEP]\nrw [discr_def, traceMatrix_of_matrix_mulVec, det_mul, det_mul, det_transpose, mul_comm, ← mul_assoc, discr_def, pow_two]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\ninst✝ : IsSeparable K L\nb : Basis ι K L\n⊢ discr K ↑b ≠ 0\n[PROOFSTEP]\ncases isEmpty_or_nonempty ι\n[GOAL]\ncase inl\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\ninst✝ : IsSeparable K L\nb : Basis ι K L\nh✝ : IsEmpty ι\n⊢ discr K ↑b ≠ 0\n[PROOFSTEP]\nhave : det (traceMatrix K ↑b) ≠ 0 := by simp\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\ninst✝ : IsSeparable K L\nb : Basis ι K L\nh✝ : IsEmpty ι\n⊢ det (traceMatrix K ↑b) ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\ninst✝ : IsSeparable K L\nb : Basis ι K L\nh✝ : IsEmpty ι\nthis : det (traceMatrix K ↑b) ≠ 0\n⊢ discr K ↑b ≠ 0\n[PROOFSTEP]\nunfold discr\n[GOAL]\ncase inl\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\ninst✝ : IsSeparable K L\nb : Basis ι K L\nh✝ : IsEmpty ι\nthis : det (traceMatrix K ↑b) ≠ 0\n⊢ det (traceMatrix K ↑b) ≠ 0\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase inr\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\ninst✝ : IsSeparable K L\nb : Basis ι K L\nh✝ : Nonempty ι\n⊢ discr K ↑b ≠ 0\n[PROOFSTEP]\nhave := span_eq_top_of_linearIndependent_of_card_eq_finrank b.linearIndependent (finrank_eq_card_basis b).symm\n[GOAL]\ncase inr\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\ninst✝ : IsSeparable K L\nb : Basis ι K L\nh✝ : Nonempty ι\nthis : Submodule.span K (Set.range ↑b) = ⊤\n⊢ discr K ↑b ≠ 0\n[PROOFSTEP]\nclassical\nrw [discr_def, traceMatrix]\nsimp_rw [← Basis.mk_apply b.linearIndependent this.ge]\nrw [← traceMatrix, traceMatrix_of_basis, ← BilinForm.nondegenerate_iff_det_ne_zero]\nexact traceForm_nondegenerate _ _\n[GOAL]\ncase inr\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\ninst✝ : IsSeparable K L\nb : Basis ι K L\nh✝ : Nonempty ι\nthis : Submodule.span K (Set.range ↑b) = ⊤\n⊢ discr K ↑b ≠ 0\n[PROOFSTEP]\nrw [discr_def, traceMatrix]\n[GOAL]\ncase inr\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\ninst✝ : IsSeparable K L\nb : Basis ι K L\nh✝ : Nonempty ι\nthis : Submodule.span K (Set.range ↑b) = ⊤\n⊢ det (↑of fun i j => BilinForm.bilin (traceForm K L) (↑b i) (↑b j)) ≠ 0\n[PROOFSTEP]\nsimp_rw [← Basis.mk_apply b.linearIndependent this.ge]\n[GOAL]\ncase inr\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\ninst✝ : IsSeparable K L\nb : Basis ι K L\nh✝ : Nonempty ι\nthis : Submodule.span K (Set.range ↑b) = ⊤\n⊢ det\n      (↑of fun i j =>\n        BilinForm.bilin (traceForm K L)\n          (↑(Basis.mk (_ : LinearIndependent K ↑b) (_ : ⊤ ≤ Submodule.span K (Set.range ↑b))) i)\n          (↑(Basis.mk (_ : LinearIndependent K ↑b) (_ : ⊤ ≤ Submodule.span K (Set.range ↑b))) j)) ≠\n    0\n[PROOFSTEP]\nrw [← traceMatrix, traceMatrix_of_basis, ← BilinForm.nondegenerate_iff_det_ne_zero]\n[GOAL]\ncase inr\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\ninst✝ : IsSeparable K L\nb : Basis ι K L\nh✝ : Nonempty ι\nthis : Submodule.span K (Set.range ↑b) = ⊤\n⊢ BilinForm.Nondegenerate (traceForm K L)\n[PROOFSTEP]\nexact traceForm_nondegenerate _ _\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : ι ≃ (L →ₐ[K] E)\n⊢ ↑(algebraMap K E) (discr K b) = det (embeddingsMatrixReindex K E b e) ^ 2\n[PROOFSTEP]\nrw [discr_def, RingHom.map_det, RingHom.mapMatrix_apply, traceMatrix_eq_embeddingsMatrixReindex_mul_trans, det_mul,\n  det_transpose, pow_two]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\ninst✝ : IsSeparable K L\n⊢ ↑(algebraMap K E) (discr K ↑pb.basis) = ∏ i : Fin pb.dim, ∏ j in Ioi i, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) ^ 2\n[PROOFSTEP]\nrw [discr_eq_det_embeddingsMatrixReindex_pow_two K E pb.basis e, embeddingsMatrixReindex_eq_vandermonde, det_transpose,\n  det_vandermonde, ← prod_pow]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\ninst✝ : IsSeparable K L\n⊢ ∏ x : Fin pb.dim, (∏ j in Ioi x, (↑(↑e j) pb.gen - ↑(↑e x) pb.gen)) ^ 2 =\n    ∏ i : Fin pb.dim, ∏ j in Ioi i, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) ^ 2\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\ninst✝ : IsSeparable K L\n⊢ (fun x => (∏ j in Ioi x, (↑(↑e j) pb.gen - ↑(↑e x) pb.gen)) ^ 2) = fun i =>\n    ∏ j in Ioi i, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) ^ 2\n[PROOFSTEP]\next i\n[GOAL]\ncase e_f.h\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\ninst✝ : IsSeparable K L\ni : Fin pb.dim\n⊢ (∏ j in Ioi i, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen)) ^ 2 = ∏ j in Ioi i, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) ^ 2\n[PROOFSTEP]\nrw [← prod_pow]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\n⊢ ↑(algebraMap K E) (discr K ↑pb.basis) =\n    ∏ i : Fin pb.dim, ∏ j in Ioi i, -((↑(↑e j) pb.gen - ↑(↑e i) pb.gen) * (↑(↑e i) pb.gen - ↑(↑e j) pb.gen))\n[PROOFSTEP]\nrw [discr_powerBasis_eq_prod _ _ _ e]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\n⊢ ∏ i : Fin pb.dim, ∏ j in Ioi i, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) ^ 2 =\n    ∏ i : Fin pb.dim, ∏ j in Ioi i, -((↑(↑e j) pb.gen - ↑(↑e i) pb.gen) * (↑(↑e i) pb.gen - ↑(↑e j) pb.gen))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\n⊢ (fun i => ∏ j in Ioi i, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) ^ 2) = fun i =>\n    ∏ j in Ioi i, -((↑(↑e j) pb.gen - ↑(↑e i) pb.gen) * (↑(↑e i) pb.gen - ↑(↑e j) pb.gen))\n[PROOFSTEP]\next i\n[GOAL]\ncase e_f.h\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\ni : Fin pb.dim\n⊢ ∏ j in Ioi i, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) ^ 2 =\n    ∏ j in Ioi i, -((↑(↑e j) pb.gen - ↑(↑e i) pb.gen) * (↑(↑e i) pb.gen - ↑(↑e j) pb.gen))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f.h.e_f\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\ni : Fin pb.dim\n⊢ (fun j => (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) ^ 2) = fun j =>\n    -((↑(↑e j) pb.gen - ↑(↑e i) pb.gen) * (↑(↑e i) pb.gen - ↑(↑e j) pb.gen))\n[PROOFSTEP]\next j\n[GOAL]\ncase e_f.h.e_f.h\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\ni j : Fin pb.dim\n⊢ (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) ^ 2 = -((↑(↑e j) pb.gen - ↑(↑e i) pb.gen) * (↑(↑e i) pb.gen - ↑(↑e j) pb.gen))\n[PROOFSTEP]\nring\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\n⊢ ↑(algebraMap K E) (discr K ↑pb.basis) =\n    (-1) ^ (n * (n - 1) / 2) *\n      ∏ i : Fin pb.dim, ∏ j in Ioi i, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) * (↑(↑e i) pb.gen - ↑(↑e j) pb.gen)\n[PROOFSTEP]\nrw [discr_powerBasis_eq_prod' _ _ _ e]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\n⊢ ∏ i : Fin pb.dim, ∏ j in Ioi i, -((↑(↑e j) pb.gen - ↑(↑e i) pb.gen) * (↑(↑e i) pb.gen - ↑(↑e j) pb.gen)) =\n    (-1) ^ (n * (n - 1) / 2) *\n      ∏ i : Fin pb.dim, ∏ j in Ioi i, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) * (↑(↑e i) pb.gen - ↑(↑e j) pb.gen)\n[PROOFSTEP]\nsimp_rw [fun i j => neg_eq_neg_one_mul ((e j pb.gen - e i pb.gen) * (e i pb.gen - e j pb.gen)), prod_mul_distrib]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\n⊢ (∏ x : Fin pb.dim, ∏ x in Ioi x, -1) *\n      ((∏ x : Fin pb.dim, ∏ x_1 in Ioi x, (↑(↑e x_1) pb.gen - ↑(↑e x) pb.gen)) *\n        ∏ x : Fin pb.dim, ∏ x_1 in Ioi x, (↑(↑e x) pb.gen - ↑(↑e x_1) pb.gen)) =\n    (-1) ^ (n * (n - 1) / 2) *\n      ((∏ x : Fin pb.dim, ∏ x_1 in Ioi x, (↑(↑e x_1) pb.gen - ↑(↑e x) pb.gen)) *\n        ∏ x : Fin pb.dim, ∏ x_1 in Ioi x, (↑(↑e x) pb.gen - ↑(↑e x_1) pb.gen))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\n⊢ ∏ x : Fin pb.dim, ∏ x in Ioi x, -1 = (-1) ^ (n * (n - 1) / 2)\n[PROOFSTEP]\nsimp only [prod_pow_eq_pow_sum, prod_const]\n[GOAL]\ncase e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\n⊢ (-1) ^ ∑ x : Fin pb.dim, Finset.card (Ioi x) = (-1) ^ (n * (n - 1) / 2)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\n⊢ ∑ x : Fin pb.dim, Finset.card (Ioi x) = n * (n - 1) / 2\n[PROOFSTEP]\nrw [← @Nat.cast_inj ℚ, Nat.cast_sum]\n[GOAL]\ncase e_a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\n⊢ ∑ x : Fin pb.dim, ↑(Finset.card (Ioi x)) = ↑(n * (n - 1) / 2)\n[PROOFSTEP]\nhave : ∀ x : Fin pb.dim, ↑x + 1 ≤ pb.dim := by simp [Nat.succ_le_iff, Fin.is_lt]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\n⊢ ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\n[PROOFSTEP]\nsimp [Nat.succ_le_iff, Fin.is_lt]\n[GOAL]\ncase e_a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\n⊢ ∑ x : Fin pb.dim, ↑(Finset.card (Ioi x)) = ↑(n * (n - 1) / 2)\n[PROOFSTEP]\nsimp_rw [Fin.card_Ioi, Nat.sub_sub, add_comm 1]\n[GOAL]\ncase e_a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\n⊢ ∑ x : Fin pb.dim, ↑(pb.dim - (↑x + 1)) = ↑(n * (n - 1) / 2)\n[PROOFSTEP]\nsimp only [Nat.cast_sub, this, Finset.card_fin, nsmul_eq_mul, sum_const, sum_sub_distrib, Nat.cast_add, Nat.cast_one,\n  sum_add_distrib, mul_one]\n[GOAL]\ncase e_a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\n⊢ ↑pb.dim * ↑pb.dim - (∑ x : Fin pb.dim, ↑↑x + ↑pb.dim) = ↑(n * (n - 1) / 2)\n[PROOFSTEP]\nrw [← Nat.cast_sum, ← @Finset.sum_range ℕ _ pb.dim fun i => i, sum_range_id]\n[GOAL]\ncase e_a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\n⊢ ↑pb.dim * ↑pb.dim - (↑(pb.dim * (pb.dim - 1) / 2) + ↑pb.dim) = ↑(n * (n - 1) / 2)\n[PROOFSTEP]\nhave hn : n = pb.dim := by\n  rw [← AlgHom.card K L E, ← Fintype.card_fin pb.dim]\n  exact card_congr (Equiv.symm e)\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\n⊢ n = pb.dim\n[PROOFSTEP]\nrw [← AlgHom.card K L E, ← Fintype.card_fin pb.dim]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\n⊢ Fintype.card (L →ₐ[K] E) = Fintype.card (Fin pb.dim)\n[PROOFSTEP]\nexact card_congr (Equiv.symm e)\n[GOAL]\ncase e_a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\nhn : n = pb.dim\n⊢ ↑pb.dim * ↑pb.dim - (↑(pb.dim * (pb.dim - 1) / 2) + ↑pb.dim) = ↑(n * (n - 1) / 2)\n[PROOFSTEP]\nhave h₂ : 2 ∣ pb.dim * (pb.dim - 1) := even_iff_two_dvd.1 (Nat.even_mul_self_pred _)\n[GOAL]\ncase e_a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\nhn : n = pb.dim\nh₂ : 2 ∣ pb.dim * (pb.dim - 1)\n⊢ ↑pb.dim * ↑pb.dim - (↑(pb.dim * (pb.dim - 1) / 2) + ↑pb.dim) = ↑(n * (n - 1) / 2)\n[PROOFSTEP]\nhave hne : ((2 : ℕ) : ℚ) ≠ 0 := by simp\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\nhn : n = pb.dim\nh₂ : 2 ∣ pb.dim * (pb.dim - 1)\n⊢ ↑2 ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\nhn : n = pb.dim\nh₂ : 2 ∣ pb.dim * (pb.dim - 1)\nhne : ↑2 ≠ 0\n⊢ ↑pb.dim * ↑pb.dim - (↑(pb.dim * (pb.dim - 1) / 2) + ↑pb.dim) = ↑(n * (n - 1) / 2)\n[PROOFSTEP]\nhave hle : 1 ≤ pb.dim :=\n  by\n  rw [← hn, Nat.one_le_iff_ne_zero, ← zero_lt_iff, FiniteDimensional.finrank_pos_iff]\n  infer_instance\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\nhn : n = pb.dim\nh₂ : 2 ∣ pb.dim * (pb.dim - 1)\nhne : ↑2 ≠ 0\n⊢ 1 ≤ pb.dim\n[PROOFSTEP]\nrw [← hn, Nat.one_le_iff_ne_zero, ← zero_lt_iff, FiniteDimensional.finrank_pos_iff]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\nhn : n = pb.dim\nh₂ : 2 ∣ pb.dim * (pb.dim - 1)\nhne : ↑2 ≠ 0\n⊢ Nontrivial L\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase e_a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\nhn : n = pb.dim\nh₂ : 2 ∣ pb.dim * (pb.dim - 1)\nhne : ↑2 ≠ 0\nhle : 1 ≤ pb.dim\n⊢ ↑pb.dim * ↑pb.dim - (↑(pb.dim * (pb.dim - 1) / 2) + ↑pb.dim) = ↑(n * (n - 1) / 2)\n[PROOFSTEP]\nrw [hn, Nat.cast_div h₂ hne, Nat.cast_mul, Nat.cast_sub hle]\n[GOAL]\ncase e_a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\nhn : n = pb.dim\nh₂ : 2 ∣ pb.dim * (pb.dim - 1)\nhne : ↑2 ≠ 0\nhle : 1 ≤ pb.dim\n⊢ ↑pb.dim * ↑pb.dim - (↑pb.dim * (↑pb.dim - ↑1) / ↑2 + ↑pb.dim) = ↑pb.dim * (↑pb.dim - ↑1) / ↑2\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase e_a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nthis : ∀ (x : Fin pb.dim), ↑x + 1 ≤ pb.dim\nhn : n = pb.dim\nh₂ : 2 ∣ pb.dim * (pb.dim - 1)\nhne : ↑2 ≠ 0\nhle : 1 ≤ pb.dim\n⊢ ↑pb.dim * ↑pb.dim * 2 - (↑pb.dim * (↑pb.dim - 1) + ↑pb.dim * 2) = ↑pb.dim * (↑pb.dim - 1)\n[PROOFSTEP]\nring\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\n⊢ discr K ↑pb.basis = (-1) ^ (n * (n - 1) / 2) * ↑(norm K) (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\nlet E := AlgebraicClosure L\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\n⊢ discr K ↑pb.basis = (-1) ^ (n * (n - 1) / 2) * ↑(norm K) (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\nletI := fun a b : E => Classical.propDecidable (Eq a b)\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\n⊢ discr K ↑pb.basis = (-1) ^ (n * (n - 1) / 2) * ↑(norm K) (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\nhave e : Fin pb.dim ≃ (L →ₐ[K] E) := by\n  refine' equivOfCardEq _\n  rw [Fintype.card_fin, AlgHom.card]\n  exact (PowerBasis.finrank pb).symm\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\n⊢ Fin pb.dim ≃ (L →ₐ[K] E)\n[PROOFSTEP]\nrefine' equivOfCardEq _\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\n⊢ Fintype.card (Fin pb.dim) = Fintype.card (L →ₐ[K] E)\n[PROOFSTEP]\nrw [Fintype.card_fin, AlgHom.card]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\n⊢ pb.dim = n\n[PROOFSTEP]\nexact (PowerBasis.finrank pb).symm\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\n⊢ discr K ↑pb.basis = (-1) ^ (n * (n - 1) / 2) * ↑(norm K) (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\nhave hnodup : ((minpoly K pb.gen).map (algebraMap K E)).roots.Nodup :=\n  nodup_roots (Separable.map (IsSeparable.separable K pb.gen))\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\n⊢ discr K ↑pb.basis = (-1) ^ (n * (n - 1) / 2) * ↑(norm K) (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\nhave hroots : ∀ σ : L →ₐ[K] E, σ pb.gen ∈ ((minpoly K pb.gen).map (algebraMap K E)).roots :=\n  by\n  intro σ\n  rw [mem_roots, IsRoot.def, eval_map, ← aeval_def, aeval_algHom_apply]\n  repeat' simp [minpoly.ne_zero (IsSeparable.isIntegral K pb.gen)]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\n⊢ ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n[PROOFSTEP]\nintro σ\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nσ : L →ₐ[K] E\n⊢ ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n[PROOFSTEP]\nrw [mem_roots, IsRoot.def, eval_map, ← aeval_def, aeval_algHom_apply]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nσ : L →ₐ[K] E\n⊢ ↑σ (↑(aeval pb.gen) (minpoly K pb.gen)) = 0\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nσ : L →ₐ[K] E\n⊢ Polynomial.map (algebraMap K E) (minpoly K pb.gen) ≠ 0\n[PROOFSTEP]\nrepeat' simp [minpoly.ne_zero (IsSeparable.isIntegral K pb.gen)]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nσ : L →ₐ[K] E\n⊢ ↑σ (↑(aeval pb.gen) (minpoly K pb.gen)) = 0\n[PROOFSTEP]\nsimp [minpoly.ne_zero (IsSeparable.isIntegral K pb.gen)]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nσ : L →ₐ[K] E\n⊢ Polynomial.map (algebraMap K E) (minpoly K pb.gen) ≠ 0\n[PROOFSTEP]\nsimp [minpoly.ne_zero (IsSeparable.isIntegral K pb.gen)]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n⊢ discr K ↑pb.basis = (-1) ^ (n * (n - 1) / 2) * ↑(norm K) (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\napply (algebraMap K E).injective\n[GOAL]\ncase a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n⊢ ↑(algebraMap K E) (discr K ↑pb.basis) =\n    ↑(algebraMap K E) ((-1) ^ (n * (n - 1) / 2) * ↑(norm K) (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen))))\n[PROOFSTEP]\nrw [RingHom.map_mul, RingHom.map_pow, RingHom.map_neg, RingHom.map_one, discr_powerBasis_eq_prod'' _ _ _ e]\n[GOAL]\ncase a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n⊢ (-1) ^ (n * (n - 1) / 2) *\n      ∏ i : Fin pb.dim, ∏ j in Ioi i, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) * (↑(↑e i) pb.gen - ↑(↑e j) pb.gen) =\n    (-1) ^ (n * (n - 1) / 2) * ↑(algebraMap K E) (↑(norm K) (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen))))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n⊢ ∏ i : Fin pb.dim, ∏ j in Ioi i, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) * (↑(↑e i) pb.gen - ↑(↑e j) pb.gen) =\n    ↑(algebraMap K E) (↑(norm K) (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen))))\n[PROOFSTEP]\nrw [norm_eq_prod_embeddings, prod_prod_Ioi_mul_eq_prod_prod_off_diag]\n[GOAL]\ncase a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n⊢ ∏ i : Fin pb.dim, ∏ j in {i}ᶜ, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) =\n    ∏ σ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E, ↑σ (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\nconv_rhs =>\n  congr\n  rfl\n  ext σ\n  rw [← aeval_algHom_apply,\n    aeval_root_derivative_of_splits (minpoly.monic (IsSeparable.isIntegral K pb.gen)) (IsAlgClosed.splits_codomain _)\n      (hroots σ),\n    ← Finset.prod_mk _ (hnodup.erase _)]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n| ∏ σ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E, ↑σ (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\n  congr\n  rfl\n  ext σ\n  rw [← aeval_algHom_apply,\n    aeval_root_derivative_of_splits (minpoly.monic (IsSeparable.isIntegral K pb.gen)) (IsAlgClosed.splits_codomain _)\n      (hroots σ),\n    ← Finset.prod_mk _ (hnodup.erase _)]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n| ∏ σ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E, ↑σ (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\n  congr\n  rfl\n  ext σ\n  rw [← aeval_algHom_apply,\n    aeval_root_derivative_of_splits (minpoly.monic (IsSeparable.isIntegral K pb.gen)) (IsAlgClosed.splits_codomain _)\n      (hroots σ),\n    ← Finset.prod_mk _ (hnodup.erase _)]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n| ∏ σ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E, ↑σ (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase s\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n| univ\ncase f\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n| fun σ => ↑σ (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase f\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n| fun σ => ↑σ (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\next σ\n[GOAL]\ncase f.h\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E\n| ↑σ (↑(aeval pb.gen) (↑derivative (minpoly K pb.gen)))\n[PROOFSTEP]\nrw [← aeval_algHom_apply,\n  aeval_root_derivative_of_splits (minpoly.monic (IsSeparable.isIntegral K pb.gen)) (IsAlgClosed.splits_codomain _)\n    (hroots σ),\n  ← Finset.prod_mk _ (hnodup.erase _)]\n[GOAL]\ncase a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n⊢ ∏ i : Fin pb.dim, ∏ j in {i}ᶜ, (↑(↑e j) pb.gen - ↑(↑e i) pb.gen) =\n    ∏ σ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E,\n      ∏ a in\n        { val := Multiset.erase (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))) (↑σ pb.gen),\n          nodup :=\n            (_ :\n              Multiset.Nodup\n                (Multiset.erase (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))) (↑σ pb.gen))) },\n        (↑σ pb.gen - a)\n[PROOFSTEP]\nrw [prod_sigma', prod_sigma']\n[GOAL]\ncase a.e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n⊢ ∏ x in Finset.sigma univ fun i => {i}ᶜ, (↑(↑e x.snd) pb.gen - ↑(↑e x.fst) pb.gen) =\n    ∏ x in\n      Finset.sigma univ fun σ =>\n        { val := Multiset.erase (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))) (↑σ pb.gen),\n          nodup :=\n            (_ :\n              Multiset.Nodup\n                (Multiset.erase (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))) (↑σ pb.gen))) },\n      (↑x.fst pb.gen - x.snd)\n[PROOFSTEP]\nrefine'\n  prod_bij (fun i _ => ⟨e i.2, e i.1 pb.gen⟩) (fun i hi => _) (fun i _ => by simp) (fun i j hi hj hij => _) fun σ hσ =>\n    _\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\ni : (_ : Fin pb.dim) × Fin pb.dim\nx✝ : i ∈ Finset.sigma univ fun i => {i}ᶜ\n⊢ ↑(↑e i.snd) pb.gen - ↑(↑e i.fst) pb.gen =\n    ↑((fun i x => { fst := ↑e i.snd, snd := ↑(↑e i.fst) pb.gen }) i x✝).fst pb.gen -\n      ((fun i x => { fst := ↑e i.snd, snd := ↑(↑e i.fst) pb.gen }) i x✝).snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.e_a.refine'_1\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\ni : (_ : Fin pb.dim) × Fin pb.dim\nhi : i ∈ Finset.sigma univ fun i => {i}ᶜ\n⊢ (fun i x => { fst := ↑e i.snd, snd := ↑(↑e i.fst) pb.gen }) i hi ∈\n    Finset.sigma univ fun σ =>\n      { val := Multiset.erase (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))) (↑σ pb.gen),\n        nodup :=\n          (_ :\n            Multiset.Nodup (Multiset.erase (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))) (↑σ pb.gen))) }\n[PROOFSTEP]\nsimp only [true_and_iff, Finset.mem_mk, mem_univ, mem_sigma]\n[GOAL]\ncase a.e_a.refine'_1\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\ni : (_ : Fin pb.dim) × Fin pb.dim\nhi : i ∈ Finset.sigma univ fun i => {i}ᶜ\n⊢ ↑(↑e i.fst) pb.gen ∈\n    Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑(↑e i.snd) pb.gen)\n[PROOFSTEP]\nrw [Multiset.mem_erase_of_ne fun h => ?_]\n[GOAL]\ncase a.e_a.refine'_1\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\ni : (_ : Fin pb.dim) × Fin pb.dim\nhi : i ∈ Finset.sigma univ fun i => {i}ᶜ\n⊢ ↑(↑e i.fst) pb.gen ∈ roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))\n[PROOFSTEP]\nexact\n  hroots\n    _\n      -- Porting note: `@mem_compl` was not necessary.\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\ni : (_ : Fin pb.dim) × Fin pb.dim\nhi : i ∈ Finset.sigma univ fun i => {i}ᶜ\nh : ↑(↑e i.fst) pb.gen = ↑(↑e i.snd) pb.gen\n⊢ False\n[PROOFSTEP]\nsimp only [true_and_iff, mem_univ, Ne.def, mem_sigma, @mem_compl _ _ _ (_), mem_singleton] at hi \n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\ni : (_ : Fin pb.dim) × Fin pb.dim\nh : ↑(↑e i.fst) pb.gen = ↑(↑e i.snd) pb.gen\nhi : ¬i.snd = i.fst\n⊢ False\n[PROOFSTEP]\nrw [← PowerBasis.liftEquiv_apply_coe, ← PowerBasis.liftEquiv_apply_coe] at h \n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\ni : (_ : Fin pb.dim) × Fin pb.dim\nh : ↑(↑(PowerBasis.liftEquiv pb) (↑e i.fst)) = ↑(↑(PowerBasis.liftEquiv pb) (↑e i.snd))\nhi : ¬i.snd = i.fst\n⊢ False\n[PROOFSTEP]\nexact hi (e.injective <| pb.liftEquiv.injective <| Subtype.eq h.symm)\n[GOAL]\ncase a.e_a.refine'_2\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\ni j : (_ : Fin pb.dim) × Fin pb.dim\nhi : i ∈ Finset.sigma univ fun i => {i}ᶜ\nhj : j ∈ Finset.sigma univ fun i => {i}ᶜ\nhij :\n  (fun i x => { fst := ↑e i.snd, snd := ↑(↑e i.fst) pb.gen }) i hi =\n    (fun i x => { fst := ↑e i.snd, snd := ↑(↑e i.fst) pb.gen }) j hj\n⊢ i = j\n[PROOFSTEP]\nsimp only [Sigma.mk.inj_iff, EmbeddingLike.apply_eq_iff_eq, heq_eq_eq] at hij \n[GOAL]\ncase a.e_a.refine'_2\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\ni j : (_ : Fin pb.dim) × Fin pb.dim\nhi : i ∈ Finset.sigma univ fun i => {i}ᶜ\nhj : j ∈ Finset.sigma univ fun i => {i}ᶜ\nhij : i.snd = j.snd ∧ ↑(↑e i.fst) pb.gen = ↑(↑e j.fst) pb.gen\n⊢ i = j\n[PROOFSTEP]\nhave h := hij.2\n[GOAL]\ncase a.e_a.refine'_2\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\ni j : (_ : Fin pb.dim) × Fin pb.dim\nhi : i ∈ Finset.sigma univ fun i => {i}ᶜ\nhj : j ∈ Finset.sigma univ fun i => {i}ᶜ\nhij : i.snd = j.snd ∧ ↑(↑e i.fst) pb.gen = ↑(↑e j.fst) pb.gen\nh : ↑(↑e i.fst) pb.gen = ↑(↑e j.fst) pb.gen\n⊢ i = j\n[PROOFSTEP]\nrw [← PowerBasis.liftEquiv_apply_coe, ← PowerBasis.liftEquiv_apply_coe] at h \n[GOAL]\ncase a.e_a.refine'_2\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\ni j : (_ : Fin pb.dim) × Fin pb.dim\nhi : i ∈ Finset.sigma univ fun i => {i}ᶜ\nhj : j ∈ Finset.sigma univ fun i => {i}ᶜ\nhij : i.snd = j.snd ∧ ↑(↑e i.fst) pb.gen = ↑(↑e j.fst) pb.gen\nh : ↑(↑(PowerBasis.liftEquiv pb) (↑e i.fst)) = ↑(↑(PowerBasis.liftEquiv pb) (↑e j.fst))\n⊢ i = j\n[PROOFSTEP]\nrefine' Sigma.eq (Equiv.injective e (Equiv.injective _ (Subtype.eq h))) (by simp [hij.1])\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\ni j : (_ : Fin pb.dim) × Fin pb.dim\nhi : i ∈ Finset.sigma univ fun i => {i}ᶜ\nhj : j ∈ Finset.sigma univ fun i => {i}ᶜ\nhij : i.snd = j.snd ∧ ↑(↑e i.fst) pb.gen = ↑(↑e j.fst) pb.gen\nh : ↑(↑(PowerBasis.liftEquiv pb) (↑e i.fst)) = ↑(↑(PowerBasis.liftEquiv pb) (↑e j.fst))\n⊢ Eq.recOn (_ : i.fst = j.fst) i.snd = j.snd\n[PROOFSTEP]\nsimp [hij.1]\n[GOAL]\ncase a.e_a.refine'_3\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ ∈\n    Finset.sigma univ fun σ =>\n      { val := Multiset.erase (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))) (↑σ pb.gen),\n        nodup :=\n          (_ :\n            Multiset.Nodup (Multiset.erase (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))) (↑σ pb.gen))) }\n⊢ ∃ a ha, σ = (fun i x => { fst := ↑e i.snd, snd := ↑(↑e i.fst) pb.gen }) a ha\n[PROOFSTEP]\nsimp only [true_and_iff, Finset.mem_mk, mem_univ, mem_sigma] at hσ ⊢\n[GOAL]\ncase a.e_a.refine'_3\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\n⊢ ∃ a h, σ = { fst := ↑e a.snd, snd := ↑(↑e a.fst) pb.gen }\n[PROOFSTEP]\nsimp only [Sigma.exists, exists_prop, mem_compl, mem_singleton, Ne.def]\n[GOAL]\ncase a.e_a.refine'_3\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\n⊢ ∃ a b, b ∈ {a}ᶜ ∧ σ = { fst := ↑e b, snd := ↑(↑e a) pb.gen }\n[PROOFSTEP]\nrefine' ⟨e.symm (PowerBasis.lift pb σ.2 _), e.symm σ.1, ⟨_, Sigma.eq _ _⟩⟩\n[GOAL]\ncase a.e_a.refine'_3.refine'_1\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\n⊢ ↑(aeval σ.snd) (minpoly K pb.gen) = 0\n[PROOFSTEP]\nrw [aeval_def, eval₂_eq_eval_map, ← IsRoot.def, ← mem_roots]\n[GOAL]\ncase a.e_a.refine'_3.refine'_1\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\n⊢ σ.snd ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\n[PROOFSTEP]\nexact Multiset.erase_subset _ _ hσ\n[GOAL]\ncase a.e_a.refine'_3.refine'_1\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\n⊢ Polynomial.map (algebraMap K E) (minpoly K pb.gen) ≠ 0\n[PROOFSTEP]\nsimp [minpoly.ne_zero (IsSeparable.isIntegral K pb.gen)]\n  -- Porting note: the `simp only` was not needed.\n[GOAL]\ncase a.e_a.refine'_3.refine'_2\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\n⊢ ↑e.symm σ.fst ∈ {↑e.symm (PowerBasis.lift pb σ.snd (_ : ↑(aeval σ.snd) (minpoly K pb.gen) = 0))}ᶜ\n[PROOFSTEP]\nsimp only [@mem_compl _ _ _ (_), mem_singleton]\n[GOAL]\ncase a.e_a.refine'_3.refine'_2\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\n⊢ ¬↑e.symm σ.fst = ↑e.symm (PowerBasis.lift pb σ.snd (_ : ↑(aeval σ.snd) (minpoly K pb.gen) = 0))\n[PROOFSTEP]\nintro h\n[GOAL]\ncase a.e_a.refine'_3.refine'_2\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\nh : ↑e.symm σ.fst = ↑e.symm (PowerBasis.lift pb σ.snd (_ : ↑(aeval σ.snd) (minpoly K pb.gen) = 0))\n⊢ False\n[PROOFSTEP]\nreplace h := AlgHom.congr_fun (Equiv.injective _ h) pb.gen\n[GOAL]\ncase a.e_a.refine'_3.refine'_2\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\nh : ↑σ.fst pb.gen = ↑(PowerBasis.lift pb σ.snd (_ : ↑(aeval σ.snd) (minpoly K pb.gen) = 0)) pb.gen\n⊢ False\n[PROOFSTEP]\nrw [PowerBasis.lift_gen] at h \n[GOAL]\ncase a.e_a.refine'_3.refine'_2\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\nh : ↑σ.fst pb.gen = σ.snd\n⊢ False\n[PROOFSTEP]\nrw [← h] at hσ \n[GOAL]\ncase a.e_a.refine'_3.refine'_2\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  ↑σ.fst pb.gen ∈\n    Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\nh : ↑σ.fst pb.gen = σ.snd\n⊢ False\n[PROOFSTEP]\nexact hnodup.not_mem_erase hσ\n[GOAL]\ncase a.e_a.refine'_3.refine'_3\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\n⊢ σ.fst =\n    { fst := ↑e (↑e.symm σ.fst),\n        snd := ↑(↑e (↑e.symm (PowerBasis.lift pb σ.snd (_ : ↑(aeval σ.snd) (minpoly K pb.gen) = 0)))) pb.gen }.fst\ncase a.e_a.refine'_3.refine'_4\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\n⊢ Eq.recOn ?a.e_a.refine'_3.refine'_3✝ σ.snd =\n    { fst := ↑e (↑e.symm σ.fst),\n        snd := ↑(↑e (↑e.symm (PowerBasis.lift pb σ.snd (_ : ↑(aeval σ.snd) (minpoly K pb.gen) = 0)))) pb.gen }.snd\n[PROOFSTEP]\nall_goals simp\n[GOAL]\ncase a.e_a.refine'_3.refine'_3\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\n⊢ σ.fst =\n    { fst := ↑e (↑e.symm σ.fst),\n        snd := ↑(↑e (↑e.symm (PowerBasis.lift pb σ.snd (_ : ↑(aeval σ.snd) (minpoly K pb.gen) = 0)))) pb.gen }.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.e_a.refine'_3.refine'_4\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁶ : DecidableEq ι\ninst✝¹⁵ : CommRing A\ninst✝¹⁴ : CommRing B\ninst✝¹³ : Algebra A B\ninst✝¹² : CommRing C\ninst✝¹¹ : Algebra A C\nι' : Type u_1\ninst✝¹⁰ : Fintype ι'\ninst✝⁹ : Fintype ι\ninst✝⁸ : DecidableEq ι'\nK : Type u\nL : Type v\nE✝ : Type z\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field E✝\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K E✝\ninst✝² : Module.Finite K L\ninst✝¹ : IsAlgClosed E✝\nb : ι → L\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nE : Type v := AlgebraicClosure L\nthis : (a b : E) → Decidable (a = b) := fun a b => Classical.propDecidable (a = b)\ne : Fin pb.dim ≃ (L →ₐ[K] E)\nhnodup : Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\nhroots : ∀ (σ : L →ₐ[K] E), ↑σ pb.gen ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen))\nσ : (_ : (fun x => L) (↑derivative (minpoly K pb.gen)) →ₐ[K] E) × E\nhσ :\n  σ.snd ∈ Multiset.erase (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K pb.gen))) (↑σ.fst pb.gen)\n⊢ Eq.recOn (_ : σ.fst = ↑e (↑e.symm σ.fst)) σ.snd =\n    { fst := ↑e (↑e.symm σ.fst),\n        snd := ↑(↑e (↑e.symm (PowerBasis.lift pb σ.snd (_ : ↑(aeval σ.snd) (minpoly K pb.gen) = 0)))) pb.gen }.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁹ : DecidableEq ι\ninst✝¹⁸ : CommRing A\ninst✝¹⁷ : CommRing B\ninst✝¹⁶ : Algebra A B\ninst✝¹⁵ : CommRing C\ninst✝¹⁴ : Algebra A C\nι' : Type u_1\ninst✝¹³ : Fintype ι'\ninst✝¹² : Fintype ι\ninst✝¹¹ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Field E\ninst✝⁷ : Algebra K L\ninst✝⁶ : Algebra K E\ninst✝⁵ : Module.Finite K L\ninst✝⁴ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nb : ι → L\nh : ∀ (i : ι), IsIntegral R (b i)\n⊢ IsIntegral R (discr K b)\n[PROOFSTEP]\nclassical\nrw [discr_def]\nexact IsIntegral.det fun i j => isIntegral_trace (isIntegral_mul (h i) (h j))\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁹ : DecidableEq ι\ninst✝¹⁸ : CommRing A\ninst✝¹⁷ : CommRing B\ninst✝¹⁶ : Algebra A B\ninst✝¹⁵ : CommRing C\ninst✝¹⁴ : Algebra A C\nι' : Type u_1\ninst✝¹³ : Fintype ι'\ninst✝¹² : Fintype ι\ninst✝¹¹ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Field E\ninst✝⁷ : Algebra K L\ninst✝⁶ : Algebra K E\ninst✝⁵ : Module.Finite K L\ninst✝⁴ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nb : ι → L\nh : ∀ (i : ι), IsIntegral R (b i)\n⊢ IsIntegral R (discr K b)\n[PROOFSTEP]\nrw [discr_def]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝¹⁹ : DecidableEq ι\ninst✝¹⁸ : CommRing A\ninst✝¹⁷ : CommRing B\ninst✝¹⁶ : Algebra A B\ninst✝¹⁵ : CommRing C\ninst✝¹⁴ : Algebra A C\nι' : Type u_1\ninst✝¹³ : Fintype ι'\ninst✝¹² : Fintype ι\ninst✝¹¹ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Field E\ninst✝⁷ : Algebra K L\ninst✝⁶ : Algebra K E\ninst✝⁵ : Module.Finite K L\ninst✝⁴ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nb : ι → L\nh : ∀ (i : ι), IsIntegral R (b i)\n⊢ IsIntegral R (det (traceMatrix K b))\n[PROOFSTEP]\nexact IsIntegral.det fun i j => isIntegral_trace (isIntegral_mul (h i) (h j))\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i : ι') (j : ι), IsIntegral ℤ (Basis.toMatrix b' (↑b) i j)\n⊢ discr ℚ ↑b = discr ℚ ↑b'\n[PROOFSTEP]\nreplace h' : ∀ i j, IsIntegral ℤ (b'.toMatrix (b.reindex (b.indexEquiv b')) i j)\n[GOAL]\ncase h'\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i : ι') (j : ι), IsIntegral ℤ (Basis.toMatrix b' (↑b) i j)\n⊢ ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\n[PROOFSTEP]\nintro i j\n[GOAL]\ncase h'\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i : ι') (j : ι), IsIntegral ℤ (Basis.toMatrix b' (↑b) i j)\ni j : ι'\n⊢ IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\n[PROOFSTEP]\nconvert\n  h' i\n    ((b.indexEquiv b').symm j)\n      -- Porting note: `simp; rfl` was `simpa`.\n[GOAL]\ncase h.e'_6\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i : ι') (j : ι), IsIntegral ℤ (Basis.toMatrix b' (↑b) i j)\ni j : ι'\n⊢ Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j =\n    Basis.toMatrix b' (↑b) i (↑(Basis.indexEquiv b b').symm j)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_6\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i : ι') (j : ι), IsIntegral ℤ (Basis.toMatrix b' (↑b) i j)\ni j : ι'\n⊢ Basis.toMatrix b' (↑b ∘ ↑(Basis.indexEquiv b b').symm) i j =\n    Basis.toMatrix b' (↑b) i (↑(Basis.indexEquiv b b').symm j)\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\n⊢ discr ℚ ↑b = discr ℚ ↑b'\n[PROOFSTEP]\nclassical\nrw [← (b.reindex (b.indexEquiv b')).toMatrix_map_vecMul b', discr_of_matrix_vecMul, ← one_mul (discr ℚ b),\n  Basis.coe_reindex, discr_reindex]\ncongr\nhave hint : IsIntegral ℤ ((b.reindex (b.indexEquiv b')).toMatrix b').det := IsIntegral.det fun i j => h _ _\nobtain ⟨r, hr⟩ := IsIntegrallyClosed.isIntegral_iff.1 hint\nhave hunit : IsUnit r :=\n  by\n  have : IsIntegral ℤ (b'.toMatrix (b.reindex (b.indexEquiv b'))).det := IsIntegral.det fun i j => h' _ _\n  obtain ⟨r', hr'⟩ := IsIntegrallyClosed.isIntegral_iff.1 this\n  refine' isUnit_iff_exists_inv.2 ⟨r', _⟩\n  suffices algebraMap ℤ ℚ (r * r') = 1\n    by\n    rw [← RingHom.map_one (algebraMap ℤ ℚ)] at this \n    exact (IsFractionRing.injective ℤ ℚ) this\n  rw [RingHom.map_mul, hr, hr', ← det_mul, Basis.toMatrix_mul_toMatrix_flip, det_one]\nrw [← RingHom.map_one (algebraMap ℤ ℚ), ← hr]\ncases' Int.isUnit_iff.1 hunit with hp hm\n· simp [hp]\n· simp [hm]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\n⊢ discr ℚ ↑b = discr ℚ ↑b'\n[PROOFSTEP]\nrw [← (b.reindex (b.indexEquiv b')).toMatrix_map_vecMul b', discr_of_matrix_vecMul, ← one_mul (discr ℚ b),\n  Basis.coe_reindex, discr_reindex]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\n⊢ 1 * discr ℚ ↑b = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b') ^ 2 * discr ℚ ↑b\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\n⊢ 1 = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b') ^ 2\n[PROOFSTEP]\nhave hint : IsIntegral ℤ ((b.reindex (b.indexEquiv b')).toMatrix b').det := IsIntegral.det fun i j => h _ _\n[GOAL]\ncase e_a\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\n⊢ 1 = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b') ^ 2\n[PROOFSTEP]\nobtain ⟨r, hr⟩ := IsIntegrallyClosed.isIntegral_iff.1 hint\n[GOAL]\ncase e_a.intro\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\nr : ℤ\nhr : ↑(algebraMap ℤ ℚ) r = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b')\n⊢ 1 = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b') ^ 2\n[PROOFSTEP]\nhave hunit : IsUnit r :=\n  by\n  have : IsIntegral ℤ (b'.toMatrix (b.reindex (b.indexEquiv b'))).det := IsIntegral.det fun i j => h' _ _\n  obtain ⟨r', hr'⟩ := IsIntegrallyClosed.isIntegral_iff.1 this\n  refine' isUnit_iff_exists_inv.2 ⟨r', _⟩\n  suffices algebraMap ℤ ℚ (r * r') = 1\n    by\n    rw [← RingHom.map_one (algebraMap ℤ ℚ)] at this \n    exact (IsFractionRing.injective ℤ ℚ) this\n  rw [RingHom.map_mul, hr, hr', ← det_mul, Basis.toMatrix_mul_toMatrix_flip, det_one]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\nr : ℤ\nhr : ↑(algebraMap ℤ ℚ) r = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b')\n⊢ IsUnit r\n[PROOFSTEP]\nhave : IsIntegral ℤ (b'.toMatrix (b.reindex (b.indexEquiv b'))).det := IsIntegral.det fun i j => h' _ _\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\nr : ℤ\nhr : ↑(algebraMap ℤ ℚ) r = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b')\nthis : IsIntegral ℤ (det (Basis.toMatrix b' ↑(Basis.reindex b (Basis.indexEquiv b b'))))\n⊢ IsUnit r\n[PROOFSTEP]\nobtain ⟨r', hr'⟩ := IsIntegrallyClosed.isIntegral_iff.1 this\n[GOAL]\ncase intro\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\nr : ℤ\nhr : ↑(algebraMap ℤ ℚ) r = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b')\nthis : IsIntegral ℤ (det (Basis.toMatrix b' ↑(Basis.reindex b (Basis.indexEquiv b b'))))\nr' : ℤ\nhr' : ↑(algebraMap ℤ ℚ) r' = det (Basis.toMatrix b' ↑(Basis.reindex b (Basis.indexEquiv b b')))\n⊢ IsUnit r\n[PROOFSTEP]\nrefine' isUnit_iff_exists_inv.2 ⟨r', _⟩\n[GOAL]\ncase intro\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\nr : ℤ\nhr : ↑(algebraMap ℤ ℚ) r = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b')\nthis : IsIntegral ℤ (det (Basis.toMatrix b' ↑(Basis.reindex b (Basis.indexEquiv b b'))))\nr' : ℤ\nhr' : ↑(algebraMap ℤ ℚ) r' = det (Basis.toMatrix b' ↑(Basis.reindex b (Basis.indexEquiv b b')))\n⊢ r * r' = 1\n[PROOFSTEP]\nsuffices algebraMap ℤ ℚ (r * r') = 1\n  by\n  rw [← RingHom.map_one (algebraMap ℤ ℚ)] at this \n  exact (IsFractionRing.injective ℤ ℚ) this\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\nr : ℤ\nhr : ↑(algebraMap ℤ ℚ) r = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b')\nthis✝ : IsIntegral ℤ (det (Basis.toMatrix b' ↑(Basis.reindex b (Basis.indexEquiv b b'))))\nr' : ℤ\nhr' : ↑(algebraMap ℤ ℚ) r' = det (Basis.toMatrix b' ↑(Basis.reindex b (Basis.indexEquiv b b')))\nthis : ↑(algebraMap ℤ ℚ) (r * r') = 1\n⊢ r * r' = 1\n[PROOFSTEP]\nrw [← RingHom.map_one (algebraMap ℤ ℚ)] at this \n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\nr : ℤ\nhr : ↑(algebraMap ℤ ℚ) r = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b')\nthis✝ : IsIntegral ℤ (det (Basis.toMatrix b' ↑(Basis.reindex b (Basis.indexEquiv b b'))))\nr' : ℤ\nhr' : ↑(algebraMap ℤ ℚ) r' = det (Basis.toMatrix b' ↑(Basis.reindex b (Basis.indexEquiv b b')))\nthis : ↑(algebraMap ℤ ℚ) (r * r') = ↑(algebraMap ℤ ℚ) 1\n⊢ r * r' = 1\n[PROOFSTEP]\nexact (IsFractionRing.injective ℤ ℚ) this\n[GOAL]\ncase intro\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\nr : ℤ\nhr : ↑(algebraMap ℤ ℚ) r = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b')\nthis : IsIntegral ℤ (det (Basis.toMatrix b' ↑(Basis.reindex b (Basis.indexEquiv b b'))))\nr' : ℤ\nhr' : ↑(algebraMap ℤ ℚ) r' = det (Basis.toMatrix b' ↑(Basis.reindex b (Basis.indexEquiv b b')))\n⊢ ↑(algebraMap ℤ ℚ) (r * r') = 1\n[PROOFSTEP]\nrw [RingHom.map_mul, hr, hr', ← det_mul, Basis.toMatrix_mul_toMatrix_flip, det_one]\n[GOAL]\ncase e_a.intro\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\nr : ℤ\nhr : ↑(algebraMap ℤ ℚ) r = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b')\nhunit : IsUnit r\n⊢ 1 = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b') ^ 2\n[PROOFSTEP]\nrw [← RingHom.map_one (algebraMap ℤ ℚ), ← hr]\n[GOAL]\ncase e_a.intro\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\nr : ℤ\nhr : ↑(algebraMap ℤ ℚ) r = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b')\nhunit : IsUnit r\n⊢ ↑(algebraMap ℤ ℚ) 1 = ↑(algebraMap ℤ ℚ) r ^ 2\n[PROOFSTEP]\ncases' Int.isUnit_iff.1 hunit with hp hm\n[GOAL]\ncase e_a.intro.inl\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\nr : ℤ\nhr : ↑(algebraMap ℤ ℚ) r = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b')\nhunit : IsUnit r\nhp : r = 1\n⊢ ↑(algebraMap ℤ ℚ) 1 = ↑(algebraMap ℤ ℚ) r ^ 2\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase e_a.intro.inr\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝²⁰ : DecidableEq ι\ninst✝¹⁹ : CommRing A\ninst✝¹⁸ : CommRing B\ninst✝¹⁷ : Algebra A B\ninst✝¹⁶ : CommRing C\ninst✝¹⁵ : Algebra A C\nι' : Type u_1\ninst✝¹⁴ : Fintype ι'\ninst✝¹³ : Fintype ι\ninst✝¹² : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field E\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K E\ninst✝⁶ : Module.Finite K L\ninst✝⁵ : IsAlgClosed E\nb✝ : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁴ : CommRing R\ninst✝³ : Algebra R K\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : NumberField K\nb : Basis ι ℚ K\nb' : Basis ι' ℚ K\nh : ∀ (i : ι) (j : ι'), IsIntegral ℤ (Basis.toMatrix b (↑b') i j)\nh' : ∀ (i j : ι'), IsIntegral ℤ (Basis.toMatrix b' (↑(Basis.reindex b (Basis.indexEquiv b b'))) i j)\nhint : IsIntegral ℤ (det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b'))\nr : ℤ\nhr : ↑(algebraMap ℤ ℚ) r = det (Basis.toMatrix (Basis.reindex b (Basis.indexEquiv b b')) ↑b')\nhunit : IsUnit r\nhm : r = -1\n⊢ ↑(algebraMap ℤ ℚ) 1 = ↑(algebraMap ℤ ℚ) r ^ 2\n[PROOFSTEP]\nsimp [hm]\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\n⊢ discr K ↑B.basis • z ∈ adjoin R {B.gen}\n[PROOFSTEP]\nhave hinv : IsUnit (traceMatrix K B.basis).det := by simpa [← discr_def] using discr_isUnit_of_basis _ B.basis\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\n⊢ IsUnit (det (traceMatrix K ↑B.basis))\n[PROOFSTEP]\nsimpa [← discr_def] using discr_isUnit_of_basis _ B.basis\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\n⊢ discr K ↑B.basis • z ∈ adjoin R {B.gen}\n[PROOFSTEP]\nhave H :\n  (traceMatrix K B.basis).det • (traceMatrix K B.basis).mulVec (B.basis.equivFun z) =\n    (traceMatrix K B.basis).det • fun i => trace K L (z * B.basis i) :=\n  by congr; exact traceMatrix_of_basis_mulVec _ _\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\n⊢ det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\n⊢ mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) = fun i => ↑(trace K L) (z * ↑B.basis i)\n[PROOFSTEP]\nexact traceMatrix_of_basis_mulVec _ _\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\n⊢ discr K ↑B.basis • z ∈ adjoin R {B.gen}\n[PROOFSTEP]\nhave cramer := mulVec_cramer (traceMatrix K B.basis) fun i => trace K L (z * B.basis i)\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\n⊢ discr K ↑B.basis • z ∈ adjoin R {B.gen}\n[PROOFSTEP]\nsuffices ∀ i, ((traceMatrix K B.basis).det • B.basis.equivFun z) i ∈ (⊥ : Subalgebra R K)\n  by\n  rw [← B.basis.sum_repr z, Finset.smul_sum]\n  refine' Subalgebra.sum_mem _ fun i _ => _\n  replace this := this i\n  rw [← discr_def, Pi.smul_apply, mem_bot] at this \n  obtain ⟨r, hr⟩ := this\n  rw [Basis.equivFun_apply] at hr \n  rw [← smul_assoc, ← hr, algebraMap_smul]\n  refine' Subalgebra.smul_mem _ _ _\n  rw [B.basis_eq_pow i]\n  refine' Subalgebra.pow_mem _ (subset_adjoin (Set.mem_singleton _)) _\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\nthis : ∀ (i : Fin B.dim), (det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z) i ∈ ⊥\n⊢ discr K ↑B.basis • z ∈ adjoin R {B.gen}\n[PROOFSTEP]\nrw [← B.basis.sum_repr z, Finset.smul_sum]\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\nthis : ∀ (i : Fin B.dim), (det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z) i ∈ ⊥\n⊢ ∑ x : Fin B.dim, discr K ↑B.basis • ↑(↑B.basis.repr z) x • ↑B.basis x ∈ adjoin R {B.gen}\n[PROOFSTEP]\nrefine' Subalgebra.sum_mem _ fun i _ => _\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\nthis : ∀ (i : Fin B.dim), (det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z) i ∈ ⊥\ni : Fin B.dim\nx✝ : i ∈ univ\n⊢ discr K ↑B.basis • ↑(↑B.basis.repr z) i • ↑B.basis i ∈ adjoin R {B.gen}\n[PROOFSTEP]\nreplace this := this i\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\nx✝ : i ∈ univ\nthis : (det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z) i ∈ ⊥\n⊢ discr K ↑B.basis • ↑(↑B.basis.repr z) i • ↑B.basis i ∈ adjoin R {B.gen}\n[PROOFSTEP]\nrw [← discr_def, Pi.smul_apply, mem_bot] at this \n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\nx✝ : i ∈ univ\nthis : discr K ↑B.basis • ↑(Basis.equivFun B.basis) z i ∈ Set.range ↑(algebraMap R K)\n⊢ discr K ↑B.basis • ↑(↑B.basis.repr z) i • ↑B.basis i ∈ adjoin R {B.gen}\n[PROOFSTEP]\nobtain ⟨r, hr⟩ := this\n[GOAL]\ncase intro\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\nx✝ : i ∈ univ\nr : R\nhr : ↑(algebraMap R K) r = discr K ↑B.basis • ↑(Basis.equivFun B.basis) z i\n⊢ discr K ↑B.basis • ↑(↑B.basis.repr z) i • ↑B.basis i ∈ adjoin R {B.gen}\n[PROOFSTEP]\nrw [Basis.equivFun_apply] at hr \n[GOAL]\ncase intro\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\nx✝ : i ∈ univ\nr : R\nhr : ↑(algebraMap R K) r = discr K ↑B.basis • ↑(↑B.basis.repr z) i\n⊢ discr K ↑B.basis • ↑(↑B.basis.repr z) i • ↑B.basis i ∈ adjoin R {B.gen}\n[PROOFSTEP]\nrw [← smul_assoc, ← hr, algebraMap_smul]\n[GOAL]\ncase intro\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\nx✝ : i ∈ univ\nr : R\nhr : ↑(algebraMap R K) r = discr K ↑B.basis • ↑(↑B.basis.repr z) i\n⊢ r • ↑B.basis i ∈ adjoin R {B.gen}\n[PROOFSTEP]\nrefine' Subalgebra.smul_mem _ _ _\n[GOAL]\ncase intro\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\nx✝ : i ∈ univ\nr : R\nhr : ↑(algebraMap R K) r = discr K ↑B.basis • ↑(↑B.basis.repr z) i\n⊢ ↑B.basis i ∈ adjoin R {B.gen}\n[PROOFSTEP]\nrw [B.basis_eq_pow i]\n[GOAL]\ncase intro\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\nx✝ : i ∈ univ\nr : R\nhr : ↑(algebraMap R K) r = discr K ↑B.basis • ↑(↑B.basis.repr z) i\n⊢ B.gen ^ ↑i ∈ adjoin R {B.gen}\n[PROOFSTEP]\nrefine' Subalgebra.pow_mem _ (subset_adjoin (Set.mem_singleton _)) _\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\n⊢ ∀ (i : Fin B.dim), (det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z) i ∈ ⊥\n[PROOFSTEP]\nintro i\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\n⊢ (det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z) i ∈ ⊥\n[PROOFSTEP]\nrw [← H, ← mulVec_smul] at cramer \n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ncramer :\n  mulVec (traceMatrix K ↑B.basis) (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    mulVec (traceMatrix K ↑B.basis) (det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z)\ni : Fin B.dim\n⊢ (det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z) i ∈ ⊥\n[PROOFSTEP]\nreplace cramer := congr_arg (mulVec (traceMatrix K B.basis)⁻¹) cramer\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\ncramer :\n  mulVec (traceMatrix K ↑B.basis)⁻¹\n      (mulVec (traceMatrix K ↑B.basis)\n        (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i))) =\n    mulVec (traceMatrix K ↑B.basis)⁻¹\n      (mulVec (traceMatrix K ↑B.basis) (det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z))\n⊢ (det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z) i ∈ ⊥\n[PROOFSTEP]\nrw [mulVec_mulVec, nonsing_inv_mul _ hinv, mulVec_mulVec, nonsing_inv_mul _ hinv, one_mulVec, one_mulVec] at cramer \n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\ncramer :\n  (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z\n⊢ (det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z) i ∈ ⊥\n[PROOFSTEP]\nrw [← congr_fun cramer i, cramer_apply, det_apply]\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\ncramer :\n  (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z\n⊢ ∑ σ : Equiv.Perm (Fin B.dim),\n      ↑Equiv.Perm.sign σ •\n        ∏ i_1 : Fin B.dim,\n          updateColumn (traceMatrix K ↑B.basis) i (fun i => ↑(trace K L) (z * ↑B.basis i)) (↑σ i_1) i_1 ∈\n    ⊥\n[PROOFSTEP]\nrefine' Subalgebra.sum_mem _ fun σ _ => Subalgebra.zsmul_mem _ (Subalgebra.prod_mem _ fun j _ => _) _\n[GOAL]\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\ncramer :\n  (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z\nσ : Equiv.Perm (Fin B.dim)\nx✝¹ : σ ∈ univ\nj : Fin B.dim\nx✝ : j ∈ univ\n⊢ updateColumn (traceMatrix K ↑B.basis) i (fun i => ↑(trace K L) (z * ↑B.basis i)) (↑σ j) j ∈ ⊥\n[PROOFSTEP]\nby_cases hji : j = i\n[GOAL]\ncase pos\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\ncramer :\n  (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z\nσ : Equiv.Perm (Fin B.dim)\nx✝¹ : σ ∈ univ\nj : Fin B.dim\nx✝ : j ∈ univ\nhji : j = i\n⊢ updateColumn (traceMatrix K ↑B.basis) i (fun i => ↑(trace K L) (z * ↑B.basis i)) (↑σ j) j ∈ ⊥\n[PROOFSTEP]\nsimp only [updateColumn_apply, hji, eq_self_iff_true, PowerBasis.coe_basis]\n[GOAL]\ncase pos\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\ncramer :\n  (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z\nσ : Equiv.Perm (Fin B.dim)\nx✝¹ : σ ∈ univ\nj : Fin B.dim\nx✝ : j ∈ univ\nhji : j = i\n⊢ (if True then ↑(trace K L) (z * B.gen ^ ↑(↑σ i)) else traceMatrix K (fun i => B.gen ^ ↑i) (↑σ i) i) ∈ ⊥\n[PROOFSTEP]\nexact mem_bot.2 (IsIntegrallyClosed.isIntegral_iff.1 <| isIntegral_trace <| isIntegral_mul hz <| IsIntegral.pow hint _)\n[GOAL]\ncase neg\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\ncramer :\n  (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z\nσ : Equiv.Perm (Fin B.dim)\nx✝¹ : σ ∈ univ\nj : Fin B.dim\nx✝ : j ∈ univ\nhji : ¬j = i\n⊢ updateColumn (traceMatrix K ↑B.basis) i (fun i => ↑(trace K L) (z * ↑B.basis i)) (↑σ j) j ∈ ⊥\n[PROOFSTEP]\nsimp only [updateColumn_apply, hji, PowerBasis.coe_basis]\n[GOAL]\ncase neg\nA : Type u\nB✝ : Type v\nC : Type z\nι : Type w\ninst✝²³ : DecidableEq ι\ninst✝²² : CommRing A\ninst✝²¹ : CommRing B✝\ninst✝²⁰ : Algebra A B✝\ninst✝¹⁹ : CommRing C\ninst✝¹⁸ : Algebra A C\nι' : Type u_1\ninst✝¹⁷ : Fintype ι'\ninst✝¹⁶ : Fintype ι\ninst✝¹⁵ : DecidableEq ι'\nK : Type u\nL : Type v\nE : Type z\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Field E\ninst✝¹¹ : Algebra K L\ninst✝¹⁰ : Algebra K E\ninst✝⁹ : Module.Finite K L\ninst✝⁸ : IsAlgClosed E\nb : ι → L\npb : PowerBasis K L\nR : Type z\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R K\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\ninst✝² : IsSeparable K L\ninst✝¹ : IsIntegrallyClosed R\ninst✝ : IsFractionRing R K\nB : PowerBasis K L\nhint : IsIntegral R B.gen\nz : L\nhz : IsIntegral R z\nhinv : IsUnit (det (traceMatrix K ↑B.basis))\nH :\n  det (traceMatrix K ↑B.basis) • mulVec (traceMatrix K ↑B.basis) (↑(Basis.equivFun B.basis) z) =\n    det (traceMatrix K ↑B.basis) • fun i => ↑(trace K L) (z * ↑B.basis i)\ni : Fin B.dim\ncramer :\n  (↑(Matrix.cramer (traceMatrix K ↑B.basis)) fun i => ↑(trace K L) (z * ↑B.basis i)) =\n    det (traceMatrix K ↑B.basis) • ↑(Basis.equivFun B.basis) z\nσ : Equiv.Perm (Fin B.dim)\nx✝¹ : σ ∈ univ\nj : Fin B.dim\nx✝ : j ∈ univ\nhji : ¬j = i\n⊢ (if False then ↑(trace K L) (z * B.gen ^ ↑(↑σ j)) else traceMatrix K (fun i => B.gen ^ ↑i) (↑σ j) j) ∈ ⊥\n[PROOFSTEP]\nexact\n  mem_bot.2\n    (IsIntegrallyClosed.isIntegral_iff.1 <|\n      isIntegral_trace <| isIntegral_mul (IsIntegral.pow hint _) (IsIntegral.pow hint _))\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : Fintype ι\nb b' : Basis ι ℤ A\n⊢ discr ℤ ↑b = discr ℤ ↑b'\n[PROOFSTEP]\nconvert Algebra.discr_of_matrix_vecMul b' (b'.toMatrix b)\n[GOAL]\ncase h.e'_2.h.e'_9\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : Fintype ι\nb b' : Basis ι ℤ A\n⊢ ↑b = vecMul (↑b') (Matrix.map (Basis.toMatrix b' ↑b) ↑(algebraMap ℤ A))\n[PROOFSTEP]\nrw [Basis.toMatrix_map_vecMul]\n[GOAL]\ncase h.e'_3\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : Fintype ι\nb b' : Basis ι ℤ A\n⊢ discr ℤ ↑b' = det (Basis.toMatrix b' ↑b) ^ 2 * discr ℤ ↑b'\n[PROOFSTEP]\nsuffices IsUnit (b'.toMatrix b).det by\n  rw [Int.isUnit_iff, ← sq_eq_one_iff] at this \n  rw [this, one_mul]\n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : Fintype ι\nb b' : Basis ι ℤ A\nthis : IsUnit (det (Basis.toMatrix b' ↑b))\n⊢ discr ℤ ↑b' = det (Basis.toMatrix b' ↑b) ^ 2 * discr ℤ ↑b'\n[PROOFSTEP]\nrw [Int.isUnit_iff, ← sq_eq_one_iff] at this \n[GOAL]\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : Fintype ι\nb b' : Basis ι ℤ A\nthis : det (Basis.toMatrix b' ↑b) ^ 2 = 1\n⊢ discr ℤ ↑b' = det (Basis.toMatrix b' ↑b) ^ 2 * discr ℤ ↑b'\n[PROOFSTEP]\nrw [this, one_mul]\n[GOAL]\ncase h.e'_3\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : Fintype ι\nb b' : Basis ι ℤ A\n⊢ IsUnit (det (Basis.toMatrix b' ↑b))\n[PROOFSTEP]\nrw [← LinearMap.toMatrix_id_eq_basis_toMatrix b b']\n[GOAL]\ncase h.e'_3\nA : Type u\nB : Type v\nC : Type z\nι : Type w\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing C\ninst✝⁴ : Algebra A C\nι' : Type u_1\ninst✝³ : Fintype ι'\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι'\ninst✝ : Fintype ι\nb b' : Basis ι ℤ A\n⊢ IsUnit (det (↑(LinearMap.toMatrix b b') LinearMap.id))\n[PROOFSTEP]\nexact LinearEquiv.isUnit_det (LinearEquiv.refl ℤ A) b b'\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Discriminant", "llama_tokens": 87704, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850278370112, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.3994874076196448}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : β → Measure α\nh : ∀ (s : Set α), MeasurableSet s → Measurable fun b => ↑↑(f b) s\ns : Set α\nhs : MeasurableSet s\n⊢ borel ℝ≥0∞ ≤ MeasurableSpace.map (fun μ => ↑↑μ s) (MeasurableSpace.map f inst✝)\n[PROOFSTEP]\nrw [MeasurableSpace.map_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : β → Measure α\nh : ∀ (s : Set α), MeasurableSet s → Measurable fun b => ↑↑(f b) s\ns : Set α\nhs : MeasurableSet s\n⊢ borel ℝ≥0∞ ≤ MeasurableSpace.map ((fun μ => ↑↑μ s) ∘ f) inst✝\n[PROOFSTEP]\nexact h s hs\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α✝\ninst✝ : MeasurableSpace β\nα : Type u_3\nm : MeasurableSpace α\n⊢ MeasurableAdd₂ (Measure α)\n[PROOFSTEP]\nrefine' ⟨Measure.measurable_of_measurable_coe _ fun s hs => _⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α✝\ninst✝ : MeasurableSpace β\nα : Type u_3\nm : MeasurableSpace α\ns : Set α\nhs : MeasurableSet s\n⊢ Measurable fun b => ↑↑(b.fst + b.snd) s\n[PROOFSTEP]\nsimp_rw [Measure.coe_add, Pi.add_apply]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α✝\ninst✝ : MeasurableSpace β\nα : Type u_3\nm : MeasurableSpace α\ns : Set α\nhs : MeasurableSet s\n⊢ Measurable fun b => ↑↑b.fst s + ↑↑b.snd s\n[PROOFSTEP]\nrefine' Measurable.add _ _\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α✝\ninst✝ : MeasurableSpace β\nα : Type u_3\nm : MeasurableSpace α\ns : Set α\nhs : MeasurableSet s\n⊢ Measurable fun b => ↑↑b.fst s\n[PROOFSTEP]\nexact (Measure.measurable_coe hs).comp measurable_fst\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α✝\ninst✝ : MeasurableSpace β\nα : Type u_3\nm : MeasurableSpace α\ns : Set α\nhs : MeasurableSet s\n⊢ Measurable fun b => ↑↑b.snd s\n[PROOFSTEP]\nexact (Measure.measurable_coe hs).comp measurable_snd\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → β\nhf : Measurable f\n⊢ Measurable fun μ => map f μ\n[PROOFSTEP]\nrefine' measurable_of_measurable_coe _ fun s hs => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → β\nhf : Measurable f\ns : Set β\nhs : MeasurableSet s\n⊢ Measurable fun b => ↑↑(map f b) s\n[PROOFSTEP]\nsimp_rw [map_apply hf hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → β\nhf : Measurable f\ns : Set β\nhs : MeasurableSet s\n⊢ Measurable fun b => ↑↑b (f ⁻¹' s)\n[PROOFSTEP]\nexact measurable_coe (hf hs)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\n⊢ Measurable dirac\n[PROOFSTEP]\nrefine' measurable_of_measurable_coe _ fun s hs => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\nhs : MeasurableSet s\n⊢ Measurable fun b => ↑↑(dirac b) s\n[PROOFSTEP]\nsimp_rw [dirac_apply' _ hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\nhs : MeasurableSet s\n⊢ Measurable fun b => indicator s 1 b\n[PROOFSTEP]\nexact measurable_one.indicator hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → ℝ≥0∞\nhf : Measurable f\n⊢ Measurable fun μ => ∫⁻ (x : α), f x ∂μ\n[PROOFSTEP]\nsimp only [lintegral_eq_iSup_eapprox_lintegral, hf, SimpleFunc.lintegral]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → ℝ≥0∞\nhf : Measurable f\n⊢ Measurable fun μ =>\n    ⨆ (n : ℕ),\n      ∑ x in SimpleFunc.range (SimpleFunc.eapprox (fun x => f x) n),\n        x * ↑↑μ (↑(SimpleFunc.eapprox (fun x => f x) n) ⁻¹' {x})\n[PROOFSTEP]\nrefine' measurable_iSup fun n => Finset.measurable_sum _ fun i _ => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → ℝ≥0∞\nhf : Measurable f\nn : ℕ\ni : ℝ≥0∞\nx✝ : i ∈ SimpleFunc.range (SimpleFunc.eapprox (fun x => f x) n)\n⊢ Measurable fun μ => i * ↑↑μ (↑(SimpleFunc.eapprox (fun x => f x) n) ⁻¹' {i})\n[PROOFSTEP]\nrefine' Measurable.const_mul _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → ℝ≥0∞\nhf : Measurable f\nn : ℕ\ni : ℝ≥0∞\nx✝ : i ∈ SimpleFunc.range (SimpleFunc.eapprox (fun x => f x) n)\n⊢ Measurable fun μ => ↑↑μ (↑(SimpleFunc.eapprox (fun x => f x) n) ⁻¹' {i})\n[PROOFSTEP]\nexact measurable_coe ((SimpleFunc.eapprox f n).measurableSet_preimage _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\n⊢ (fun s x => ∫⁻ (μ : Measure α), ↑↑μ s ∂m) ∅ (_ : MeasurableSet ∅) = 0\n[PROOFSTEP]\nsimp only [measure_empty, lintegral_const, zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\n⊢ ∀ ⦃f : ℕ → Set α⦄ (h : ∀ (i : ℕ), MeasurableSet (f i)),\n    Pairwise (Disjoint on f) →\n      (fun s x => ∫⁻ (μ : Measure α), ↑↑μ s ∂m) (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) =\n        ∑' (i : ℕ), (fun s x => ∫⁻ (μ : Measure α), ↑↑μ s ∂m) (f i) (_ : MeasurableSet (f i))\n[PROOFSTEP]\nintro f hf h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf : ℕ → Set α\nhf : ∀ (i : ℕ), MeasurableSet (f i)\nh : Pairwise (Disjoint on f)\n⊢ (fun s x => ∫⁻ (μ : Measure α), ↑↑μ s ∂m) (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) =\n    ∑' (i : ℕ), (fun s x => ∫⁻ (μ : Measure α), ↑↑μ s ∂m) (f i) (_ : MeasurableSet (f i))\n[PROOFSTEP]\nsimp_rw [measure_iUnion h hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf : ℕ → Set α\nhf : ∀ (i : ℕ), MeasurableSet (f i)\nh : Pairwise (Disjoint on f)\n⊢ ∫⁻ (μ : Measure α), ∑' (i : ℕ), ↑↑μ (f i) ∂m = ∑' (i : ℕ), ∫⁻ (μ : Measure α), ↑↑μ (f i) ∂m\n[PROOFSTEP]\napply lintegral_tsum\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf : ℕ → Set α\nhf : ∀ (i : ℕ), MeasurableSet (f i)\nh : Pairwise (Disjoint on f)\n⊢ ∀ (i : ℕ), AEMeasurable fun a => ↑↑a (f i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf : ℕ → Set α\nhf : ∀ (i : ℕ), MeasurableSet (f i)\nh : Pairwise (Disjoint on f)\ni : ℕ\n⊢ AEMeasurable fun a => ↑↑a (f i)\n[PROOFSTEP]\nexact (measurable_coe (hf i)).aemeasurable\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\n⊢ join 0 = 0\n[PROOFSTEP]\next1 s hs\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\nhs : MeasurableSet s\n⊢ ↑↑(join 0) s = ↑↑0 s\n[PROOFSTEP]\nsimp only [hs, join_apply, lintegral_zero_measure, coe_zero, Pi.zero_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\nhs : MeasurableSet s\n⊢ Measurable fun b => ↑↑(join b) s\n[PROOFSTEP]\nsimp only [join_apply hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\nhs : MeasurableSet s\n⊢ Measurable fun b => ∫⁻ (μ : Measure α), ↑↑μ s ∂b\n[PROOFSTEP]\nexact measurable_lintegral (measurable_coe hs)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf : α → ℝ≥0∞\nhf : Measurable f\n⊢ ∫⁻ (x : α), f x ∂join m = ∫⁻ (μ : Measure α), ∫⁻ (x : α), f x ∂μ ∂m\n[PROOFSTEP]\nsimp_rw [lintegral_eq_iSup_eapprox_lintegral hf, SimpleFunc.lintegral,\n  join_apply (SimpleFunc.measurableSet_preimage _ _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf : α → ℝ≥0∞\nhf : Measurable f\n⊢ ⨆ (n : ℕ),\n      ∑ x in SimpleFunc.range (SimpleFunc.eapprox f n),\n        x * ∫⁻ (μ : Measure α), ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {x}) ∂m =\n    ∫⁻ (μ : Measure α),\n      ⨆ (n : ℕ), ∑ x in SimpleFunc.range (SimpleFunc.eapprox f n), x * ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {x}) ∂m\n[PROOFSTEP]\nsuffices\n  ∀ (s : ℕ → Finset ℝ≥0∞) (f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞),\n    (∀ n r, Measurable (f n r)) →\n      Monotone (fun n μ => ∑ r in s n, r * f n r μ) →\n        ⨆ n, ∑ r in s n, r * ∫⁻ μ, f n r μ ∂m = ∫⁻ μ, ⨆ n, ∑ r in s n, r * f n r μ ∂m\n  by\n  refine'\n    this (fun n => SimpleFunc.range (SimpleFunc.eapprox f n)) (fun n r μ => μ (SimpleFunc.eapprox f n ⁻¹' { r })) _ _\n  · exact fun n r => measurable_coe (SimpleFunc.measurableSet_preimage _ _)\n  · exact fun n m h μ => SimpleFunc.lintegral_mono (SimpleFunc.monotone_eapprox _ h) le_rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf : α → ℝ≥0∞\nhf : Measurable f\nthis :\n  ∀ (s : ℕ → Finset ℝ≥0∞) (f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞),\n    (∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)) →\n      (Monotone fun n μ => ∑ r in s n, r * f n r μ) →\n        ⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m =\n          ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m\n⊢ ⨆ (n : ℕ),\n      ∑ x in SimpleFunc.range (SimpleFunc.eapprox f n),\n        x * ∫⁻ (μ : Measure α), ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {x}) ∂m =\n    ∫⁻ (μ : Measure α),\n      ⨆ (n : ℕ), ∑ x in SimpleFunc.range (SimpleFunc.eapprox f n), x * ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {x}) ∂m\n[PROOFSTEP]\nrefine'\n  this (fun n => SimpleFunc.range (SimpleFunc.eapprox f n)) (fun n r μ => μ (SimpleFunc.eapprox f n ⁻¹' { r })) _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf : α → ℝ≥0∞\nhf : Measurable f\nthis :\n  ∀ (s : ℕ → Finset ℝ≥0∞) (f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞),\n    (∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)) →\n      (Monotone fun n μ => ∑ r in s n, r * f n r μ) →\n        ⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m =\n          ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m\n⊢ ∀ (n : ℕ) (r : ℝ≥0∞), Measurable ((fun n r μ => ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {r})) n r)\n[PROOFSTEP]\nexact fun n r => measurable_coe (SimpleFunc.measurableSet_preimage _ _)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf : α → ℝ≥0∞\nhf : Measurable f\nthis :\n  ∀ (s : ℕ → Finset ℝ≥0∞) (f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞),\n    (∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)) →\n      (Monotone fun n μ => ∑ r in s n, r * f n r μ) →\n        ⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m =\n          ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m\n⊢ Monotone fun n μ =>\n    ∑ r in (fun n => SimpleFunc.range (SimpleFunc.eapprox f n)) n,\n      r * (fun n r μ => ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {r})) n r μ\n[PROOFSTEP]\nexact fun n m h μ => SimpleFunc.lintegral_mono (SimpleFunc.monotone_eapprox _ h) le_rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf : α → ℝ≥0∞\nhf : Measurable f\n⊢ ∀ (s : ℕ → Finset ℝ≥0∞) (f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞),\n    (∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)) →\n      (Monotone fun n μ => ∑ r in s n, r * f n r μ) →\n        ⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m =\n          ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m\n[PROOFSTEP]\nintro s f hf hm\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf✝ : α → ℝ≥0∞\nhf✝ : Measurable f✝\ns : ℕ → Finset ℝ≥0∞\nf : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞\nhf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)\nhm : Monotone fun n μ => ∑ r in s n, r * f n r μ\n⊢ ⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m = ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m\n[PROOFSTEP]\nrw [lintegral_iSup _ hm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf✝ : α → ℝ≥0∞\nhf✝ : Measurable f✝\ns : ℕ → Finset ℝ≥0∞\nf : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞\nhf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)\nhm : Monotone fun n μ => ∑ r in s n, r * f n r μ\n⊢ ⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m = ⨆ (n : ℕ), ∫⁻ (a : Measure α), ∑ r in s n, r * f n r a ∂m\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf✝ : α → ℝ≥0∞\nhf✝ : Measurable f✝\ns : ℕ → Finset ℝ≥0∞\nf : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞\nhf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)\nhm : Monotone fun n μ => ∑ r in s n, r * f n r μ\n⊢ ∀ (n : ℕ), Measurable fun μ => ∑ r in s n, r * f n r μ\n[PROOFSTEP]\nswap\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf✝ : α → ℝ≥0∞\nhf✝ : Measurable f✝\ns : ℕ → Finset ℝ≥0∞\nf : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞\nhf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)\nhm : Monotone fun n μ => ∑ r in s n, r * f n r μ\n⊢ ∀ (n : ℕ), Measurable fun μ => ∑ r in s n, r * f n r μ\n[PROOFSTEP]\nexact fun n => Finset.measurable_sum _ fun r _ => (hf _ _).const_mul _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf✝ : α → ℝ≥0∞\nhf✝ : Measurable f✝\ns : ℕ → Finset ℝ≥0∞\nf : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞\nhf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)\nhm : Monotone fun n μ => ∑ r in s n, r * f n r μ\n⊢ ⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m = ⨆ (n : ℕ), ∫⁻ (a : Measure α), ∑ r in s n, r * f n r a ∂m\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_s\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf✝ : α → ℝ≥0∞\nhf✝ : Measurable f✝\ns : ℕ → Finset ℝ≥0∞\nf : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞\nhf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)\nhm : Monotone fun n μ => ∑ r in s n, r * f n r μ\n⊢ (fun n => ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) = fun n => ∫⁻ (a : Measure α), ∑ r in s n, r * f n r a ∂m\n[PROOFSTEP]\nfunext n\n[GOAL]\ncase e_s.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf✝ : α → ℝ≥0∞\nhf✝ : Measurable f✝\ns : ℕ → Finset ℝ≥0∞\nf : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞\nhf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)\nhm : Monotone fun n μ => ∑ r in s n, r * f n r μ\nn : ℕ\n⊢ ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m = ∫⁻ (a : Measure α), ∑ r in s n, r * f n r a ∂m\n[PROOFSTEP]\nrw [lintegral_finset_sum (s n)]\n[GOAL]\ncase e_s.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf✝ : α → ℝ≥0∞\nhf✝ : Measurable f✝\ns : ℕ → Finset ℝ≥0∞\nf : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞\nhf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)\nhm : Monotone fun n μ => ∑ r in s n, r * f n r μ\nn : ℕ\n⊢ ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m = ∑ b in s n, ∫⁻ (a : Measure α), b * f n b a ∂m\n[PROOFSTEP]\nsimp_rw [lintegral_const_mul _ (hf _ _)]\n[GOAL]\ncase e_s.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure (Measure α)\nf✝ : α → ℝ≥0∞\nhf✝ : Measurable f✝\ns : ℕ → Finset ℝ≥0∞\nf : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞\nhf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)\nhm : Monotone fun n μ => ∑ r in s n, r * f n r μ\nn : ℕ\n⊢ ∀ (b : ℝ≥0∞), b ∈ s n → Measurable fun a => b * f n b a\n[PROOFSTEP]\nexact fun r _ => (hf _ _).const_mul _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → Measure β\n⊢ bind 0 f = 0\n[PROOFSTEP]\nsimp [bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure α\n⊢ bind m 0 = 0\n[PROOFSTEP]\next1 s hs\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure α\ns : Set β\nhs : MeasurableSet s\n⊢ ↑↑(bind m 0) s = ↑↑0 s\n[PROOFSTEP]\nsimp only [bind, hs, join_apply, coe_zero, Pi.zero_apply]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure α\ns : Set β\nhs : MeasurableSet s\n⊢ ∫⁻ (μ : Measure β), ↑↑μ s ∂map 0 m = 0\n[PROOFSTEP]\nrw [lintegral_map (measurable_coe hs) measurable_zero]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure α\ns : Set β\nhs : MeasurableSet s\n⊢ ∫⁻ (a : α), ↑↑(OfNat.ofNat 0 a) s ∂m = 0\n[PROOFSTEP]\nsimp only [Pi.zero_apply, coe_zero, lintegral_const, zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure α\nf : α → Measure β\ns : Set β\nhs : MeasurableSet s\nhf : Measurable f\n⊢ ↑↑(bind m f) s = ∫⁻ (a : α), ↑↑(f a) s ∂m\n[PROOFSTEP]\nrw [bind, join_apply hs, lintegral_map (measurable_coe hs) hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\nγ : Type u_3\ninst✝ : MeasurableSpace γ\nm : Measure α\nf : α → Measure β\ng : β → Measure γ\nhf : Measurable f\nhg : Measurable g\n⊢ bind (bind m f) g = bind m fun a => bind (f a) g\n[PROOFSTEP]\next1 s hs\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\nγ : Type u_3\ninst✝ : MeasurableSpace γ\nm : Measure α\nf : α → Measure β\ng : β → Measure γ\nhf : Measurable f\nhg : Measurable g\ns : Set γ\nhs : MeasurableSet s\n⊢ ↑↑(bind (bind m f) g) s = ↑↑(bind m fun a => bind (f a) g) s\n[PROOFSTEP]\nerw [bind_apply hs hg, bind_apply hs ((measurable_bind' hg).comp hf), lintegral_bind hf ((measurable_coe hs).comp hg)]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\nγ : Type u_3\ninst✝ : MeasurableSpace γ\nm : Measure α\nf : α → Measure β\ng : β → Measure γ\nhf : Measurable f\nhg : Measurable g\ns : Set γ\nhs : MeasurableSet s\n⊢ ∫⁻ (a : α), ∫⁻ (x : β), ((fun μ => ↑↑μ s) ∘ g) x ∂f a ∂m = ∫⁻ (a : α), ↑↑(((fun m => bind m g) ∘ f) a) s ∂m\n[PROOFSTEP]\nconv_rhs => enter [2, a]; erw [bind_apply hs hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\nγ : Type u_3\ninst✝ : MeasurableSpace γ\nm : Measure α\nf : α → Measure β\ng : β → Measure γ\nhf : Measurable f\nhg : Measurable g\ns : Set γ\nhs : MeasurableSet s\n| ∫⁻ (a : α), ↑↑(((fun m => bind m g) ∘ f) a) s ∂m\n[PROOFSTEP]\nenter [2, a]; erw [bind_apply hs hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\nγ : Type u_3\ninst✝ : MeasurableSpace γ\nm : Measure α\nf : α → Measure β\ng : β → Measure γ\nhf : Measurable f\nhg : Measurable g\ns : Set γ\nhs : MeasurableSet s\n| ∫⁻ (a : α), ↑↑(((fun m => bind m g) ∘ f) a) s ∂m\n[PROOFSTEP]\nenter [2, a]; erw [bind_apply hs hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\nγ : Type u_3\ninst✝ : MeasurableSpace γ\nm : Measure α\nf : α → Measure β\ng : β → Measure γ\nhf : Measurable f\nhg : Measurable g\ns : Set γ\nhs : MeasurableSet s\n| ∫⁻ (a : α), ↑↑(((fun m => bind m g) ∘ f) a) s ∂m\n[PROOFSTEP]\nenter [2, a]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\nγ : Type u_3\ninst✝ : MeasurableSpace γ\nm : Measure α\nf : α → Measure β\ng : β → Measure γ\nhf : Measurable f\nhg : Measurable g\ns : Set γ\nhs : MeasurableSet s\na : α\n| ↑↑(((fun m => bind m g) ∘ f) a) s\n[PROOFSTEP]\nerw [bind_apply hs hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → Measure β\nhf : Measurable f\na : α\n⊢ bind (dirac a) f = f a\n[PROOFSTEP]\next1 s hs\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → Measure β\nhf : Measurable f\na : α\ns : Set β\nhs : MeasurableSet s\n⊢ ↑↑(bind (dirac a) f) s = ↑↑(f a) s\n[PROOFSTEP]\nerw [bind_apply hs hf, lintegral_dirac' a ((measurable_coe hs).comp hf)]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → Measure β\nhf : Measurable f\na : α\ns : Set β\nhs : MeasurableSet s\n⊢ ((fun μ => ↑↑μ s) ∘ f) a = ↑↑(f a) s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure α\n⊢ bind m dirac = m\n[PROOFSTEP]\next1 s hs\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nm : Measure α\ns : Set α\nhs : MeasurableSet s\n⊢ ↑↑(bind m dirac) s = ↑↑m s\n[PROOFSTEP]\nsimp only [bind_apply hs measurable_dirac, dirac_apply' _ hs, lintegral_indicator 1 hs, Pi.one_apply, lintegral_one,\n  restrict_apply, MeasurableSet.univ, univ_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nμ : Measure (Measure α)\n⊢ join μ = bind μ id\n[PROOFSTEP]\nrw [bind, map_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → β\nhf : Measurable f\nμ : Measure (Measure α)\n⊢ join (map (map f) μ) = map f (join μ)\n[PROOFSTEP]\next1 s hs\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → β\nhf : Measurable f\nμ : Measure (Measure α)\ns : Set β\nhs : MeasurableSet s\n⊢ ↑↑(join (map (map f) μ)) s = ↑↑(map f (join μ)) s\n[PROOFSTEP]\nrw [join_apply hs, map_apply hf hs, join_apply (hf hs), lintegral_map (measurable_coe hs) (measurable_map f hf)]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : α → β\nhf : Measurable f\nμ : Measure (Measure α)\ns : Set β\nhs : MeasurableSet s\n⊢ ∫⁻ (a : Measure α), ↑↑(map f a) s ∂μ = ∫⁻ (μ : Measure α), ↑↑μ (f ⁻¹' s) ∂μ\n[PROOFSTEP]\nsimp_rw [map_apply hf hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nμ : Measure (Measure (Measure α))\n⊢ join (map join μ) = join (join μ)\n[PROOFSTEP]\nshow bind μ join = join (join μ)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nμ : Measure (Measure (Measure α))\n⊢ bind μ join = join (join μ)\n[PROOFSTEP]\nrw [join_eq_bind, join_eq_bind, bind_bind measurable_id measurable_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nμ : Measure (Measure (Measure α))\n⊢ bind μ join = bind μ fun a => bind (id a) id\n[PROOFSTEP]\napply congr_arg (bind μ)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nμ : Measure (Measure (Measure α))\n⊢ join = fun a => bind (id a) id\n[PROOFSTEP]\nfunext ν\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nμ : Measure (Measure (Measure α))\nν : Measure (Measure α)\n⊢ join ν = bind (id ν) id\n[PROOFSTEP]\nexact join_eq_bind ν\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.GiryMonad", "llama_tokens": 11224, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850278370111, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.39948740761964474}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\n⊢ WellFoundedOn s r ↔ WellFounded fun a b => r a b ∧ a ∈ s ∧ b ∈ s\n[PROOFSTEP]\nhave f : RelEmbedding (fun (a : s) (b : s) => r a b) fun a b : α => r a b ∧ a ∈ s ∧ b ∈ s :=\n  ⟨⟨(↑), Subtype.coe_injective⟩, by simp⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\n⊢ ∀ {a b : ↑s},\n    r (↑{ toFun := Subtype.val, inj' := (_ : Function.Injective fun a => ↑a) } a)\n          (↑{ toFun := Subtype.val, inj' := (_ : Function.Injective fun a => ↑a) } b) ∧\n        ↑{ toFun := Subtype.val, inj' := (_ : Function.Injective fun a => ↑a) } a ∈ s ∧\n          ↑{ toFun := Subtype.val, inj' := (_ : Function.Injective fun a => ↑a) } b ∈ s ↔\n      r ↑a ↑b\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf✝ : β → α\ns t : Set α\nx y : α\nf : (fun a b => r ↑a ↑b) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s\n⊢ WellFoundedOn s r ↔ WellFounded fun a b => r a b ∧ a ∈ s ∧ b ∈ s\n[PROOFSTEP]\nrefine' ⟨fun h => _, f.wellFounded⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf✝ : β → α\ns t : Set α\nx y : α\nf : (fun a b => r ↑a ↑b) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s\nh : WellFoundedOn s r\n⊢ WellFounded fun a b => r a b ∧ a ∈ s ∧ b ∈ s\n[PROOFSTEP]\nrw [WellFounded.wellFounded_iff_has_min]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf✝ : β → α\ns t : Set α\nx y : α\nf : (fun a b => r ↑a ↑b) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s\nh : WellFoundedOn s r\n⊢ ∀ (s_1 : Set α), Set.Nonempty s_1 → ∃ m, m ∈ s_1 ∧ ∀ (x : α), x ∈ s_1 → ¬(r x m ∧ x ∈ s ∧ m ∈ s)\n[PROOFSTEP]\nintro t ht\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf✝ : β → α\ns t✝ : Set α\nx y : α\nf : (fun a b => r ↑a ↑b) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s\nh : WellFoundedOn s r\nt : Set α\nht : Set.Nonempty t\n⊢ ∃ m, m ∈ t ∧ ∀ (x : α), x ∈ t → ¬(r x m ∧ x ∈ s ∧ m ∈ s)\n[PROOFSTEP]\nby_cases hst : (s ∩ t).Nonempty\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf✝ : β → α\ns t✝ : Set α\nx y : α\nf : (fun a b => r ↑a ↑b) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s\nh : WellFoundedOn s r\nt : Set α\nht : Set.Nonempty t\nhst : Set.Nonempty (s ∩ t)\n⊢ ∃ m, m ∈ t ∧ ∀ (x : α), x ∈ t → ¬(r x m ∧ x ∈ s ∧ m ∈ s)\n[PROOFSTEP]\nrw [← Subtype.preimage_coe_nonempty] at hst \n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf✝ : β → α\ns t✝ : Set α\nx y : α\nf : (fun a b => r ↑a ↑b) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s\nh : WellFoundedOn s r\nt : Set α\nht : Set.Nonempty t\nhst : Set.Nonempty (Subtype.val ⁻¹' t)\n⊢ ∃ m, m ∈ t ∧ ∀ (x : α), x ∈ t → ¬(r x m ∧ x ∈ s ∧ m ∈ s)\n[PROOFSTEP]\nrcases h.has_min (Subtype.val ⁻¹' t) hst with ⟨⟨m, ms⟩, mt, hm⟩\n[GOAL]\ncase pos.intro.mk.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf✝ : β → α\ns t✝ : Set α\nx y : α\nf : (fun a b => r ↑a ↑b) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s\nh : WellFoundedOn s r\nt : Set α\nht : Set.Nonempty t\nhst : Set.Nonempty (Subtype.val ⁻¹' t)\nm : α\nms : m ∈ s\nmt : { val := m, property := ms } ∈ Subtype.val ⁻¹' t\nhm : ∀ (x : ↑s), x ∈ Subtype.val ⁻¹' t → ¬r ↑x ↑{ val := m, property := ms }\n⊢ ∃ m, m ∈ t ∧ ∀ (x : α), x ∈ t → ¬(r x m ∧ x ∈ s ∧ m ∈ s)\n[PROOFSTEP]\nexact ⟨m, mt, fun x xt ⟨xm, xs, _⟩ => hm ⟨x, xs⟩ xt xm⟩\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf✝ : β → α\ns t✝ : Set α\nx y : α\nf : (fun a b => r ↑a ↑b) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s\nh : WellFoundedOn s r\nt : Set α\nht : Set.Nonempty t\nhst : ¬Set.Nonempty (s ∩ t)\n⊢ ∃ m, m ∈ t ∧ ∀ (x : α), x ∈ t → ¬(r x m ∧ x ∈ s ∧ m ∈ s)\n[PROOFSTEP]\nrcases ht with ⟨m, mt⟩\n[GOAL]\ncase neg.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf✝ : β → α\ns t✝ : Set α\nx y : α\nf : (fun a b => r ↑a ↑b) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s\nh : WellFoundedOn s r\nt : Set α\nhst : ¬Set.Nonempty (s ∩ t)\nm : α\nmt : m ∈ t\n⊢ ∃ m, m ∈ t ∧ ∀ (x : α), x ∈ t → ¬(r x m ∧ x ∈ s ∧ m ∈ s)\n[PROOFSTEP]\nexact ⟨m, mt, fun x _ ⟨_, _, ms⟩ => hst ⟨m, ⟨ms, mt⟩⟩⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\n⊢ WellFoundedOn univ r ↔ WellFounded r\n[PROOFSTEP]\nsimp [wellFoundedOn_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\n⊢ WellFoundedOn (range f) r ↔ WellFounded (r on f)\n[PROOFSTEP]\nlet f' : β → range f := fun c => ⟨f c, c, rfl⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\nf' : β → ↑(range f) := fun c => { val := f c, property := (_ : ∃ y, f y = f c) }\n⊢ WellFoundedOn (range f) r ↔ WellFounded (r on f)\n[PROOFSTEP]\nrefine' ⟨fun h => (InvImage.wf f' h).mono fun c c' => id, fun h => ⟨_⟩⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\nf' : β → ↑(range f) := fun c => { val := f c, property := (_ : ∃ y, f y = f c) }\nh : WellFounded (r on f)\n⊢ ∀ (a : ↑(range f)), Acc (fun a b => r ↑a ↑b) a\n[PROOFSTEP]\nrintro ⟨_, c, rfl⟩\n[GOAL]\ncase mk.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\nf' : β → ↑(range f) := fun c => { val := f c, property := (_ : ∃ y, f y = f c) }\nh : WellFounded (r on f)\nc : β\n⊢ Acc (fun a b => r ↑a ↑b) { val := f c, property := (_ : ∃ y, f y = f c) }\n[PROOFSTEP]\nrefine' Acc.of_downward_closed f' _ _ _\n[GOAL]\ncase mk.intro.refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\nf' : β → ↑(range f) := fun c => { val := f c, property := (_ : ∃ y, f y = f c) }\nh : WellFounded (r on f)\nc : β\n⊢ ∀ {a : β} {b : ↑(range f)}, r ↑b ↑(f' a) → ∃ c, f' c = b\n[PROOFSTEP]\nrintro _ ⟨_, c', rfl⟩ -\n[GOAL]\ncase mk.intro.refine'_1.mk.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\nf' : β → ↑(range f) := fun c => { val := f c, property := (_ : ∃ y, f y = f c) }\nh : WellFounded (r on f)\nc a✝ c' : β\n⊢ ∃ c, f' c = { val := f c', property := (_ : ∃ y, f y = f c') }\n[PROOFSTEP]\nexact ⟨c', rfl⟩\n[GOAL]\ncase mk.intro.refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\nf' : β → ↑(range f) := fun c => { val := f c, property := (_ : ∃ y, f y = f c) }\nh : WellFounded (r on f)\nc : β\n⊢ Acc (InvImage (fun a b => r ↑a ↑b) f') c\n[PROOFSTEP]\nexact h.apply _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns✝ t : Set α\nx y : α\ns : Set β\n⊢ WellFoundedOn (f '' s) r ↔ WellFoundedOn s (r on f)\n[PROOFSTEP]\nrw [image_eq_range]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns✝ t : Set α\nx y : α\ns : Set β\n⊢ WellFoundedOn (range fun x => f ↑x) r ↔ WellFoundedOn s (r on f)\n[PROOFSTEP]\nexact wellFoundedOn_range\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\nhs : WellFoundedOn s r\nhx : x ∈ s\nP : α → Prop\nhP : ∀ (y : α), y ∈ s → (∀ (z : α), z ∈ s → r z y → P z) → P y\n⊢ P x\n[PROOFSTEP]\nlet Q : s → Prop := fun y => P y\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\nhs : WellFoundedOn s r\nhx : x ∈ s\nP : α → Prop\nhP : ∀ (y : α), y ∈ s → (∀ (z : α), z ∈ s → r z y → P z) → P y\nQ : ↑s → Prop := fun y => P ↑y\n⊢ P x\n[PROOFSTEP]\nchange Q ⟨x, hx⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\nhs : WellFoundedOn s r\nhx : x ∈ s\nP : α → Prop\nhP : ∀ (y : α), y ∈ s → (∀ (z : α), z ∈ s → r z y → P z) → P y\nQ : ↑s → Prop := fun y => P ↑y\n⊢ Q { val := x, property := hx }\n[PROOFSTEP]\nrefine' WellFounded.induction hs ⟨x, hx⟩ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\nhs : WellFoundedOn s r\nhx : x ∈ s\nP : α → Prop\nhP : ∀ (y : α), y ∈ s → (∀ (z : α), z ∈ s → r z y → P z) → P y\nQ : ↑s → Prop := fun y => P ↑y\n⊢ ∀ (x : ↑s), (∀ (y : ↑s), r ↑y ↑x → Q y) → Q x\n[PROOFSTEP]\nsimpa only [Subtype.forall]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\nh : WellFoundedOn t r'\nhle : r ≤ r'\nhst : s ⊆ t\n⊢ WellFoundedOn s r\n[PROOFSTEP]\nrw [wellFoundedOn_iff] at *\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\nf : β → α\ns t : Set α\nx y : α\nh : WellFounded fun a b => r' a b ∧ a ∈ t ∧ b ∈ t\nhle : r ≤ r'\nhst : s ⊆ t\n⊢ WellFounded fun a b => r a b ∧ a ∈ s ∧ b ∈ s\n[PROOFSTEP]\nexact Subrelation.wf (fun xy => ⟨hle _ _ xy.1, hst xy.2.1, hst xy.2.2⟩) h\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r' : α✝ → α✝ → Prop\nf : β → α✝\ns t : Set α✝\nx y : α✝\nα : Type u_6\nr : α → α → Prop\na : α\n⊢ TFAE [Acc r a, WellFoundedOn {b | ReflTransGen r b a} r, WellFoundedOn {b | TransGen r b a} r]\n[PROOFSTEP]\ntfae_have 1 → 2\n[GOAL]\ncase tfae_1_to_2\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r' : α✝ → α✝ → Prop\nf : β → α✝\ns t : Set α✝\nx y : α✝\nα : Type u_6\nr : α → α → Prop\na : α\n⊢ Acc r a → WellFoundedOn {b | ReflTransGen r b a} r\n[PROOFSTEP]\nrefine fun h => ⟨fun b => InvImage.accessible _ ?_⟩\n[GOAL]\ncase tfae_1_to_2\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r' : α✝ → α✝ → Prop\nf : β → α✝\ns t : Set α✝\nx y : α✝\nα : Type u_6\nr : α → α → Prop\na : α\nh : Acc r a\nb : ↑{b | ReflTransGen r b a}\n⊢ Acc r ↑b\n[PROOFSTEP]\nrw [← acc_transGen_iff] at h ⊢\n[GOAL]\ncase tfae_1_to_2\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r' : α✝ → α✝ → Prop\nf : β → α✝\ns t : Set α✝\nx y : α✝\nα : Type u_6\nr : α → α → Prop\na : α\nh : Acc (TransGen r) a\nb : ↑{b | ReflTransGen r b a}\n⊢ Acc (TransGen r) ↑b\n[PROOFSTEP]\nobtain h' | h' := reflTransGen_iff_eq_or_transGen.1 b.2\n[GOAL]\ncase tfae_1_to_2.inl\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r' : α✝ → α✝ → Prop\nf : β → α✝\ns t : Set α✝\nx y : α✝\nα : Type u_6\nr : α → α → Prop\na : α\nh : Acc (TransGen r) a\nb : ↑{b | ReflTransGen r b a}\nh' : a = ↑b\n⊢ Acc (TransGen r) ↑b\n[PROOFSTEP]\nrwa [h'] at h \n[GOAL]\ncase tfae_1_to_2.inr\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r' : α✝ → α✝ → Prop\nf : β → α✝\ns t : Set α✝\nx y : α✝\nα : Type u_6\nr : α → α → Prop\na : α\nh : Acc (TransGen r) a\nb : ↑{b | ReflTransGen r b a}\nh' : TransGen r (↑b) a\n⊢ Acc (TransGen r) ↑b\n[PROOFSTEP]\nexact h.inv h'\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r' : α✝ → α✝ → Prop\nf : β → α✝\ns t : Set α✝\nx y : α✝\nα : Type u_6\nr : α → α → Prop\na : α\ntfae_1_to_2 : Acc r a → WellFoundedOn {b | ReflTransGen r b a} r\n⊢ TFAE [Acc r a, WellFoundedOn {b | ReflTransGen r b a} r, WellFoundedOn {b | TransGen r b a} r]\n[PROOFSTEP]\ntfae_have 2 → 3\n[GOAL]\ncase tfae_2_to_3\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r' : α✝ → α✝ → Prop\nf : β → α✝\ns t : Set α✝\nx y : α✝\nα : Type u_6\nr : α → α → Prop\na : α\ntfae_1_to_2 : Acc r a → WellFoundedOn {b | ReflTransGen r b a} r\n⊢ WellFoundedOn {b | ReflTransGen r b a} r → WellFoundedOn {b | TransGen r b a} r\n[PROOFSTEP]\nexact fun h => h.subset fun _ => TransGen.to_reflTransGen\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r' : α✝ → α✝ → Prop\nf : β → α✝\ns t : Set α✝\nx y : α✝\nα : Type u_6\nr : α → α → Prop\na : α\ntfae_1_to_2 : Acc r a → WellFoundedOn {b | ReflTransGen r b a} r\ntfae_2_to_3 : WellFoundedOn {b | ReflTransGen r b a} r → WellFoundedOn {b | TransGen r b a} r\n⊢ TFAE [Acc r a, WellFoundedOn {b | ReflTransGen r b a} r, WellFoundedOn {b | TransGen r b a} r]\n[PROOFSTEP]\ntfae_have 3 → 1\n[GOAL]\ncase tfae_3_to_1\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r' : α✝ → α✝ → Prop\nf : β → α✝\ns t : Set α✝\nx y : α✝\nα : Type u_6\nr : α → α → Prop\na : α\ntfae_1_to_2 : Acc r a → WellFoundedOn {b | ReflTransGen r b a} r\ntfae_2_to_3 : WellFoundedOn {b | ReflTransGen r b a} r → WellFoundedOn {b | TransGen r b a} r\n⊢ WellFoundedOn {b | TransGen r b a} r → Acc r a\n[PROOFSTEP]\nrefine fun h => Acc.intro _ (fun b hb => (h.apply ⟨b, .single hb⟩).of_fibration Subtype.val ?_)\n[GOAL]\ncase tfae_3_to_1\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r' : α✝ → α✝ → Prop\nf : β → α✝\ns t : Set α✝\nx y : α✝\nα : Type u_6\nr : α → α → Prop\na : α\ntfae_1_to_2 : Acc r a → WellFoundedOn {b | ReflTransGen r b a} r\ntfae_2_to_3 : WellFoundedOn {b | ReflTransGen r b a} r → WellFoundedOn {b | TransGen r b a} r\nh : WellFoundedOn {b | TransGen r b a} r\nb : α\nhb : r b a\n⊢ Fibration (fun a_1 b => r ↑a_1 ↑b) r Subtype.val\n[PROOFSTEP]\nexact fun ⟨c, hc⟩ d h => ⟨⟨d, .head h hc⟩, h, rfl⟩\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r' : α✝ → α✝ → Prop\nf : β → α✝\ns t : Set α✝\nx y : α✝\nα : Type u_6\nr : α → α → Prop\na : α\ntfae_1_to_2 : Acc r a → WellFoundedOn {b | ReflTransGen r b a} r\ntfae_2_to_3 : WellFoundedOn {b | ReflTransGen r b a} r → WellFoundedOn {b | TransGen r b a} r\ntfae_3_to_1 : WellFoundedOn {b | TransGen r b a} r → Acc r a\n⊢ TFAE [Acc r a, WellFoundedOn {b | ReflTransGen r b a} r, WellFoundedOn {b | TransGen r b a} r]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\n⊢ WellFoundedOn s r ↔ ∀ (f : (fun x x_1 => x > x_1) ↪r r), ¬∀ (n : ℕ), ↑f n ∈ s\n[PROOFSTEP]\nsimp only [wellFoundedOn_iff, RelEmbedding.wellFounded_iff_no_descending_seq, ← not_exists, ← not_nonempty_iff,\n  not_iff_not]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\n⊢ Nonempty ((fun x x_1 => x > x_1) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s) ↔ ∃ x, ∀ (n : ℕ), ↑x n ∈ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\n⊢ Nonempty ((fun x x_1 => x > x_1) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s) → ∃ x, ∀ (n : ℕ), ↑x n ∈ s\n[PROOFSTEP]\nrintro ⟨⟨f, hf⟩⟩\n[GOAL]\ncase mp.intro.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\nf : ℕ ↪ α\nhf : ∀ {a b : ℕ}, r (↑f a) (↑f b) ∧ ↑f a ∈ s ∧ ↑f b ∈ s ↔ a > b\n⊢ ∃ x, ∀ (n : ℕ), ↑x n ∈ s\n[PROOFSTEP]\nhave H : ∀ n, f n ∈ s := fun n => (hf.2 n.lt_succ_self).2.2\n[GOAL]\ncase mp.intro.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\nf : ℕ ↪ α\nhf : ∀ {a b : ℕ}, r (↑f a) (↑f b) ∧ ↑f a ∈ s ∧ ↑f b ∈ s ↔ a > b\nH : ∀ (n : ℕ), ↑f n ∈ s\n⊢ ∃ x, ∀ (n : ℕ), ↑x n ∈ s\n[PROOFSTEP]\nrefine' ⟨⟨f, _⟩, H⟩\n[GOAL]\ncase mp.intro.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\nf : ℕ ↪ α\nhf : ∀ {a b : ℕ}, r (↑f a) (↑f b) ∧ ↑f a ∈ s ∧ ↑f b ∈ s ↔ a > b\nH : ∀ (n : ℕ), ↑f n ∈ s\n⊢ ∀ {a b : ℕ}, r (↑f a) (↑f b) ↔ a > b\n[PROOFSTEP]\nsimpa only [H, and_true_iff] using @hf\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\n⊢ (∃ x, ∀ (n : ℕ), ↑x n ∈ s) → Nonempty ((fun x x_1 => x > x_1) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s)\n[PROOFSTEP]\nrintro ⟨⟨f, hf⟩, hfs : ∀ n, f n ∈ s⟩\n[GOAL]\ncase mpr.intro.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\nf : ℕ ↪ α\nhf : ∀ {a b : ℕ}, r (↑f a) (↑f b) ↔ a > b\nhfs : ∀ (n : ℕ), ↑f n ∈ s\n⊢ Nonempty ((fun x x_1 => x > x_1) ↪r fun a b => r a b ∧ a ∈ s ∧ b ∈ s)\n[PROOFSTEP]\nrefine' ⟨⟨f, _⟩⟩\n[GOAL]\ncase mpr.intro.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\nf : ℕ ↪ α\nhf : ∀ {a b : ℕ}, r (↑f a) (↑f b) ↔ a > b\nhfs : ∀ (n : ℕ), ↑f n ∈ s\n⊢ ∀ {a b : ℕ}, r (↑f a) (↑f b) ∧ ↑f a ∈ s ∧ ↑f b ∈ s ↔ a > b\n[PROOFSTEP]\nsimpa only [hfs, and_true_iff] using @hf\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\nhs : WellFoundedOn s r\nht : WellFoundedOn t r\n⊢ WellFoundedOn (s ∪ t) r\n[PROOFSTEP]\nrw [wellFoundedOn_iff_no_descending_seq] at *\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\nhs : ∀ (f : (fun x x_1 => x > x_1) ↪r r), ¬∀ (n : ℕ), ↑f n ∈ s\nht : ∀ (f : (fun x x_1 => x > x_1) ↪r r), ¬∀ (n : ℕ), ↑f n ∈ t\n⊢ ∀ (f : (fun x x_1 => x > x_1) ↪r r), ¬∀ (n : ℕ), ↑f n ∈ s ∪ t\n[PROOFSTEP]\nrintro f hf\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\nhs : ∀ (f : (fun x x_1 => x > x_1) ↪r r), ¬∀ (n : ℕ), ↑f n ∈ s\nht : ∀ (f : (fun x x_1 => x > x_1) ↪r r), ¬∀ (n : ℕ), ↑f n ∈ t\nf : (fun x x_1 => x > x_1) ↪r r\nhf : ∀ (n : ℕ), ↑f n ∈ s ∪ t\n⊢ False\n[PROOFSTEP]\nrcases Nat.exists_subseq_of_forall_mem_union f hf with ⟨g, hg | hg⟩\n[GOAL]\ncase intro.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\nhs : ∀ (f : (fun x x_1 => x > x_1) ↪r r), ¬∀ (n : ℕ), ↑f n ∈ s\nht : ∀ (f : (fun x x_1 => x > x_1) ↪r r), ¬∀ (n : ℕ), ↑f n ∈ t\nf : (fun x x_1 => x > x_1) ↪r r\nhf : ∀ (n : ℕ), ↑f n ∈ s ∪ t\ng : ℕ ↪o ℕ\nhg : ∀ (n : ℕ), ↑f (↑g n) ∈ s\n⊢ False\ncase intro.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr r' : α → α → Prop\ninst✝ : IsStrictOrder α r\ns t : Set α\nhs : ∀ (f : (fun x x_1 => x > x_1) ↪r r), ¬∀ (n : ℕ), ↑f n ∈ s\nht : ∀ (f : (fun x x_1 => x > x_1) ↪r r), ¬∀ (n : ℕ), ↑f n ∈ t\nf : (fun x x_1 => x > x_1) ↪r r\nhf : ∀ (n : ℕ), ↑f n ∈ s ∪ t\ng : ℕ ↪o ℕ\nhg : ∀ (n : ℕ), ↑f (↑g n) ∈ t\n⊢ False\n[PROOFSTEP]\nexacts [hs (g.dual.ltEmbedding.trans f) hg, ht (g.dual.ltEmbedding.trans f) hg]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\ninst✝ : LT α\ns t : Set α\n⊢ IsWf univ ↔ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nsimp [IsWf, wellFoundedOn_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nht : PartiallyWellOrderedOn t r\n⊢ PartiallyWellOrderedOn (s ∪ t) r\n[PROOFSTEP]\nrintro f hf\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nht : PartiallyWellOrderedOn t r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s ∪ t\n⊢ ∃ m n, m < n ∧ r (f m) (f n)\n[PROOFSTEP]\nrcases Nat.exists_subseq_of_forall_mem_union f hf with ⟨g, hgs | hgt⟩\n[GOAL]\ncase intro.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nht : PartiallyWellOrderedOn t r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s ∪ t\ng : ℕ ↪o ℕ\nhgs : ∀ (n : ℕ), f (↑g n) ∈ s\n⊢ ∃ m n, m < n ∧ r (f m) (f n)\n[PROOFSTEP]\nrcases hs _ hgs with ⟨m, n, hlt, hr⟩\n[GOAL]\ncase intro.inl.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nht : PartiallyWellOrderedOn t r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s ∪ t\ng : ℕ ↪o ℕ\nhgs : ∀ (n : ℕ), f (↑g n) ∈ s\nm n : ℕ\nhlt : m < n\nhr : r (f (↑g m)) (f (↑g n))\n⊢ ∃ m n, m < n ∧ r (f m) (f n)\n[PROOFSTEP]\nexact ⟨g m, g n, g.strictMono hlt, hr⟩\n[GOAL]\ncase intro.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nht : PartiallyWellOrderedOn t r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s ∪ t\ng : ℕ ↪o ℕ\nhgt : ∀ (n : ℕ), f (↑g n) ∈ t\n⊢ ∃ m n, m < n ∧ r (f m) (f n)\n[PROOFSTEP]\nrcases ht _ hgt with ⟨m, n, hlt, hr⟩\n[GOAL]\ncase intro.inr.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nht : PartiallyWellOrderedOn t r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s ∪ t\ng : ℕ ↪o ℕ\nhgt : ∀ (n : ℕ), f (↑g n) ∈ t\nm n : ℕ\nhlt : m < n\nhr : r (f (↑g m)) (f (↑g n))\n⊢ ∃ m n, m < n ∧ r (f m) (f n)\n[PROOFSTEP]\nexact ⟨g m, g n, g.strictMono hlt, hr⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nhf : ∀ (a₁ : α), a₁ ∈ s → ∀ (a₂ : α), a₂ ∈ s → r a₁ a₂ → r' (f a₁) (f a₂)\n⊢ PartiallyWellOrderedOn (f '' s) r'\n[PROOFSTEP]\nintro g' hg'\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nhf : ∀ (a₁ : α), a₁ ∈ s → ∀ (a₂ : α), a₂ ∈ s → r a₁ a₂ → r' (f a₁) (f a₂)\ng' : ℕ → β\nhg' : ∀ (n : ℕ), g' n ∈ f '' s\n⊢ ∃ m n, m < n ∧ r' (g' m) (g' n)\n[PROOFSTEP]\nchoose g hgs heq using hg'\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nhf : ∀ (a₁ : α), a₁ ∈ s → ∀ (a₂ : α), a₂ ∈ s → r a₁ a₂ → r' (f a₁) (f a₂)\ng' : ℕ → β\ng : ℕ → α\nhgs : ∀ (n : ℕ), g n ∈ s\nheq : ∀ (n : ℕ), f (g n) = g' n\n⊢ ∃ m n, m < n ∧ r' (g' m) (g' n)\n[PROOFSTEP]\nobtain rfl : f ∘ g = g'\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nhf : ∀ (a₁ : α), a₁ ∈ s → ∀ (a₂ : α), a₂ ∈ s → r a₁ a₂ → r' (f a₁) (f a₂)\ng' : ℕ → β\ng : ℕ → α\nhgs : ∀ (n : ℕ), g n ∈ s\nheq : ∀ (n : ℕ), f (g n) = g' n\n⊢ f ∘ g = g'\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nhf : ∀ (a₁ : α), a₁ ∈ s → ∀ (a₂ : α), a₂ ∈ s → r a₁ a₂ → r' (f a₁) (f a₂)\ng : ℕ → α\nhgs : ∀ (n : ℕ), g n ∈ s\nheq : ∀ (n : ℕ), f (g n) = (f ∘ g) n\n⊢ ∃ m n, m < n ∧ r' ((f ∘ g) m) ((f ∘ g) n)\n[PROOFSTEP]\nexact funext heq\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nhf : ∀ (a₁ : α), a₁ ∈ s → ∀ (a₂ : α), a₂ ∈ s → r a₁ a₂ → r' (f a₁) (f a₂)\ng : ℕ → α\nhgs : ∀ (n : ℕ), g n ∈ s\nheq : ∀ (n : ℕ), f (g n) = (f ∘ g) n\n⊢ ∃ m n, m < n ∧ r' ((f ∘ g) m) ((f ∘ g) n)\n[PROOFSTEP]\nobtain ⟨m, n, hlt, hmn⟩ := hs g hgs\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\nhs : PartiallyWellOrderedOn s r\nhf : ∀ (a₁ : α), a₁ ∈ s → ∀ (a₂ : α), a₂ ∈ s → r a₁ a₂ → r' (f a₁) (f a₂)\ng : ℕ → α\nhgs : ∀ (n : ℕ), g n ∈ s\nheq : ∀ (n : ℕ), f (g n) = (f ∘ g) n\nm n : ℕ\nhlt : m < n\nhmn : r (g m) (g n)\n⊢ ∃ m n, m < n ∧ r' ((f ∘ g) m) ((f ∘ g) n)\n[PROOFSTEP]\nexact ⟨m, n, hlt, hf _ (hgs m) _ (hgs n) hmn⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\nha : IsAntichain r s\nhp : PartiallyWellOrderedOn s r\n⊢ Set.Finite s\n[PROOFSTEP]\nrefine' not_infinite.1 fun hi => _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\nha : IsAntichain r s\nhp : PartiallyWellOrderedOn s r\nhi : Set.Infinite s\n⊢ False\n[PROOFSTEP]\nobtain ⟨m, n, hmn, h⟩ := hp (fun n => hi.natEmbedding _ n) fun n => (hi.natEmbedding _ n).2\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\nha : IsAntichain r s\nhp : PartiallyWellOrderedOn s r\nhi : Set.Infinite s\nm n : ℕ\nhmn : m < n\nh : r ↑(↑(Infinite.natEmbedding s hi) m) ↑(↑(Infinite.natEmbedding s hi) n)\n⊢ False\n[PROOFSTEP]\nexact\n  hmn.ne\n    ((hi.natEmbedding _).injective <| Subtype.val_injective <| ha.eq (hi.natEmbedding _ m).2 (hi.natEmbedding _ n).2 h)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\ninst✝ : IsRefl α r\nhs : Set.Finite s\n⊢ PartiallyWellOrderedOn s r\n[PROOFSTEP]\nintro f hf\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝ : IsRefl α r\nhs : Set.Finite s\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\n⊢ ∃ m n, m < n ∧ r (f m) (f n)\n[PROOFSTEP]\nobtain ⟨m, n, hmn, h⟩ := hs.exists_lt_map_eq_of_forall_mem hf\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝ : IsRefl α r\nhs : Set.Finite s\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nm n : ℕ\nhmn : m < n\nh : f m = f n\n⊢ ∃ m n, m < n ∧ r (f m) (f n)\n[PROOFSTEP]\nexact ⟨m, n, hmn, h.subst <| refl (f m)⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\ninst✝ : IsRefl α r\n⊢ PartiallyWellOrderedOn (insert a s) r ↔ PartiallyWellOrderedOn s r\n[PROOFSTEP]\nsimp only [← singleton_union, partiallyWellOrderedOn_union, partiallyWellOrderedOn_singleton, true_and_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\n⊢ PartiallyWellOrderedOn s r ↔ ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\n[PROOFSTEP]\nrefine' ⟨fun h t ht hrt => hrt.finite_of_partiallyWellOrderedOn (h.mono ht), _⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\n⊢ (∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t) → PartiallyWellOrderedOn s r\n[PROOFSTEP]\nrintro hs f hf\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\n⊢ ∃ m n, m < n ∧ r (f m) (f n)\n[PROOFSTEP]\nby_contra' H\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\n⊢ False\n[PROOFSTEP]\nrefine' infinite_range_of_injective (fun m n hmn => _) (hs _ (range_subset_iff.2 hf) _)\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\nm n : ℕ\nhmn : f m = f n\n⊢ m = n\n[PROOFSTEP]\nobtain h | h | h := lt_trichotomy m n\n[GOAL]\ncase refine'_1.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\nm n : ℕ\nhmn : f m = f n\nh : m < n\n⊢ m = n\n[PROOFSTEP]\nrefine' (H _ _ h _).elim\n[GOAL]\ncase refine'_1.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\nm n : ℕ\nhmn : f m = f n\nh : m < n\n⊢ r (f m) (f n)\n[PROOFSTEP]\nrw [hmn]\n[GOAL]\ncase refine'_1.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\nm n : ℕ\nhmn : f m = f n\nh : m < n\n⊢ r (f n) (f n)\n[PROOFSTEP]\nexact refl _\n[GOAL]\ncase refine'_1.inr.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\nm n : ℕ\nhmn : f m = f n\nh : m = n\n⊢ m = n\n[PROOFSTEP]\nexact h\n[GOAL]\ncase refine'_1.inr.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\nm n : ℕ\nhmn : f m = f n\nh : n < m\n⊢ m = n\n[PROOFSTEP]\nrefine' (H _ _ h _).elim\n[GOAL]\ncase refine'_1.inr.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\nm n : ℕ\nhmn : f m = f n\nh : n < m\n⊢ r (f n) (f m)\n[PROOFSTEP]\nrw [hmn]\n[GOAL]\ncase refine'_1.inr.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\nm n : ℕ\nhmn : f m = f n\nh : n < m\n⊢ r (f n) (f n)\n[PROOFSTEP]\nexact refl _\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\n⊢ IsAntichain r (range fun y => f y)\n[PROOFSTEP]\nrintro _ ⟨m, hm, rfl⟩ _ ⟨n, hn, rfl⟩ hmn\n[GOAL]\ncase refine'_2.intro.refl.intro.refl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\nm n : ℕ\nhmn : (fun y => f y) m ≠ (fun y => f y) n\n⊢ rᶜ ((fun y => f y) m) ((fun y => f y) n)\n[PROOFSTEP]\nobtain h | h := (ne_of_apply_ne _ hmn).lt_or_lt\n[GOAL]\ncase refine'_2.intro.refl.intro.refl.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\nm n : ℕ\nhmn : (fun y => f y) m ≠ (fun y => f y) n\nh : m < n\n⊢ rᶜ ((fun y => f y) m) ((fun y => f y) n)\n[PROOFSTEP]\nexact H _ _ h\n[GOAL]\ncase refine'_2.intro.refl.intro.refl.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsSymm α r\nhs : ∀ (t : Set α), t ⊆ s → IsAntichain r t → Set.Finite t\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\nH : ∀ (m n : ℕ), m < n → ¬r (f m) (f n)\nm n : ℕ\nhmn : (fun y => f y) m ≠ (fun y => f y) n\nh : n < m\n⊢ rᶜ ((fun y => f y) m) ((fun y => f y) n)\n[PROOFSTEP]\nexact mt symm (H _ _ h)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nh : PartiallyWellOrderedOn s r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\n⊢ ∃ g, ∀ (m n : ℕ), m ≤ n → r (f (↑g m)) (f (↑g n))\n[PROOFSTEP]\nobtain ⟨g, h1 | h2⟩ := exists_increasing_or_nonincreasing_subseq r f\n[GOAL]\ncase intro.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nh : PartiallyWellOrderedOn s r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\ng : ℕ ↪o ℕ\nh1 : ∀ (m n : ℕ), m < n → r (f (↑g m)) (f (↑g n))\n⊢ ∃ g, ∀ (m n : ℕ), m ≤ n → r (f (↑g m)) (f (↑g n))\n[PROOFSTEP]\nrefine' ⟨g, fun m n hle => _⟩\n[GOAL]\ncase intro.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nh : PartiallyWellOrderedOn s r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\ng : ℕ ↪o ℕ\nh1 : ∀ (m n : ℕ), m < n → r (f (↑g m)) (f (↑g n))\nm n : ℕ\nhle : m ≤ n\n⊢ r (f (↑g m)) (f (↑g n))\n[PROOFSTEP]\nobtain hlt | rfl := hle.lt_or_eq\n[GOAL]\ncase intro.inl.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nh : PartiallyWellOrderedOn s r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\ng : ℕ ↪o ℕ\nh1 : ∀ (m n : ℕ), m < n → r (f (↑g m)) (f (↑g n))\nm n : ℕ\nhle : m ≤ n\nhlt : m < n\n⊢ r (f (↑g m)) (f (↑g n))\ncase intro.inl.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nh : PartiallyWellOrderedOn s r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\ng : ℕ ↪o ℕ\nh1 : ∀ (m n : ℕ), m < n → r (f (↑g m)) (f (↑g n))\nm : ℕ\nhle : m ≤ m\n⊢ r (f (↑g m)) (f (↑g m))\n[PROOFSTEP]\nexacts [h1 m n hlt, refl_of r _]\n[GOAL]\ncase intro.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nh : PartiallyWellOrderedOn s r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\ng : ℕ ↪o ℕ\nh2 : ∀ (m n : ℕ), m < n → ¬r (f (↑g m)) (f (↑g n))\n⊢ ∃ g, ∀ (m n : ℕ), m ≤ n → r (f (↑g m)) (f (↑g n))\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase intro.inr.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nh : PartiallyWellOrderedOn s r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\ng : ℕ ↪o ℕ\nh2 : ∀ (m n : ℕ), m < n → ¬r (f (↑g m)) (f (↑g n))\n⊢ False\n[PROOFSTEP]\nobtain ⟨m, n, hlt, hle⟩ := h (f ∘ g) fun n => hf _\n[GOAL]\ncase intro.inr.h.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nh : PartiallyWellOrderedOn s r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\ng : ℕ ↪o ℕ\nh2 : ∀ (m n : ℕ), m < n → ¬r (f (↑g m)) (f (↑g n))\nm n : ℕ\nhlt : m < n\nhle : r ((f ∘ ↑g) m) ((f ∘ ↑g) n)\n⊢ False\n[PROOFSTEP]\nexact h2 m n hlt hle\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\n⊢ PartiallyWellOrderedOn s r ↔ ∀ (f : ℕ → α), (∀ (n : ℕ), f n ∈ s) → ∃ g, ∀ (m n : ℕ), m ≤ n → r (f (↑g m)) (f (↑g n))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\n⊢ PartiallyWellOrderedOn s r → ∀ (f : ℕ → α), (∀ (n : ℕ), f n ∈ s) → ∃ g, ∀ (m n : ℕ), m ≤ n → r (f (↑g m)) (f (↑g n))\n[PROOFSTEP]\nintro h f hf\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\n⊢ (∀ (f : ℕ → α), (∀ (n : ℕ), f n ∈ s) → ∃ g, ∀ (m n : ℕ), m ≤ n → r (f (↑g m)) (f (↑g n))) → PartiallyWellOrderedOn s r\n[PROOFSTEP]\nintro h f hf\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nh : PartiallyWellOrderedOn s r\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\n⊢ ∃ g, ∀ (m n : ℕ), m ≤ n → r (f (↑g m)) (f (↑g n))\n[PROOFSTEP]\nexact h.exists_monotone_subseq f hf\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nh : ∀ (f : ℕ → α), (∀ (n : ℕ), f n ∈ s) → ∃ g, ∀ (m n : ℕ), m ≤ n → r (f (↑g m)) (f (↑g n))\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\n⊢ ∃ m n, m < n ∧ r (f m) (f n)\n[PROOFSTEP]\nobtain ⟨g, gmon⟩ := h f hf\n[GOAL]\ncase mpr.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nh : ∀ (f : ℕ → α), (∀ (n : ℕ), f n ∈ s) → ∃ g, ∀ (m n : ℕ), m ≤ n → r (f (↑g m)) (f (↑g n))\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\ng : ℕ ↪o ℕ\ngmon : ∀ (m n : ℕ), m ≤ n → r (f (↑g m)) (f (↑g n))\n⊢ ∃ m n, m < n ∧ r (f m) (f n)\n[PROOFSTEP]\nexact ⟨g 0, g 1, g.lt_iff_lt.2 zero_lt_one, gmon _ _ zero_le_one⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t✝ : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nt : Set β\nhs : PartiallyWellOrderedOn s r\nht : PartiallyWellOrderedOn t r'\n⊢ PartiallyWellOrderedOn (s ×ˢ t) fun x y => r x.fst y.fst ∧ r' x.snd y.snd\n[PROOFSTEP]\nintro f hf\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t✝ : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nt : Set β\nhs : PartiallyWellOrderedOn s r\nht : PartiallyWellOrderedOn t r'\nf : ℕ → α × β\nhf : ∀ (n : ℕ), f n ∈ s ×ˢ t\n⊢ ∃ m n, m < n ∧ (fun x y => r x.fst y.fst ∧ r' x.snd y.snd) (f m) (f n)\n[PROOFSTEP]\nobtain ⟨g₁, h₁⟩ := hs.exists_monotone_subseq (Prod.fst ∘ f) fun n => (hf n).1\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t✝ : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nt : Set β\nhs : PartiallyWellOrderedOn s r\nht : PartiallyWellOrderedOn t r'\nf : ℕ → α × β\nhf : ∀ (n : ℕ), f n ∈ s ×ˢ t\ng₁ : ℕ ↪o ℕ\nh₁ : ∀ (m n : ℕ), m ≤ n → r ((Prod.fst ∘ f) (↑g₁ m)) ((Prod.fst ∘ f) (↑g₁ n))\n⊢ ∃ m n, m < n ∧ (fun x y => r x.fst y.fst ∧ r' x.snd y.snd) (f m) (f n)\n[PROOFSTEP]\nobtain ⟨m, n, hlt, hle⟩ := ht (Prod.snd ∘ f ∘ g₁) fun n => (hf _).2\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t✝ : Set α\na : α\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\nt : Set β\nhs : PartiallyWellOrderedOn s r\nht : PartiallyWellOrderedOn t r'\nf : ℕ → α × β\nhf : ∀ (n : ℕ), f n ∈ s ×ˢ t\ng₁ : ℕ ↪o ℕ\nh₁ : ∀ (m n : ℕ), m ≤ n → r ((Prod.fst ∘ f) (↑g₁ m)) ((Prod.fst ∘ f) (↑g₁ n))\nm n : ℕ\nhlt : m < n\nhle : r' ((Prod.snd ∘ f ∘ ↑g₁) m) ((Prod.snd ∘ f ∘ ↑g₁) n)\n⊢ ∃ m n, m < n ∧ (fun x y => r x.fst y.fst ∧ r' x.snd y.snd) (f m) (f n)\n[PROOFSTEP]\nexact ⟨g₁ m, g₁ n, g₁.strictMono hlt, h₁ _ _ hlt.le, hle⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\ninst✝ : IsPreorder α r\nh : PartiallyWellOrderedOn s r\n⊢ WellFoundedOn s fun a b => r a b ∧ ¬r b a\n[PROOFSTEP]\nletI : Preorder α :=\n  { le := r\n    le_refl := refl_of r\n    le_trans := fun _ _ _ => trans_of r }\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\ninst✝ : IsPreorder α r\nh : PartiallyWellOrderedOn s r\nthis : Preorder α := Preorder.mk (_ : ∀ (a : α), r a a) (_ : ∀ (x x_1 x_2 : α), r x x_1 → r x_1 x_2 → r x x_2)\n⊢ WellFoundedOn s fun a b => r a b ∧ ¬r b a\n[PROOFSTEP]\nchange s.WellFoundedOn (· < ·)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\ninst✝ : IsPreorder α r\nh : PartiallyWellOrderedOn s r\nthis : Preorder α := Preorder.mk (_ : ∀ (a : α), r a a) (_ : ∀ (x x_1 x_2 : α), r x x_1 → r x_1 x_2 → r x x_2)\n⊢ WellFoundedOn s fun x x_1 => x < x_1\n[PROOFSTEP]\nreplace h : s.PartiallyWellOrderedOn (· ≤ ·) := h\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\ninst✝ : IsPreorder α r\nthis : Preorder α := Preorder.mk (_ : ∀ (a : α), r a a) (_ : ∀ (x x_1 x_2 : α), r x x_1 → r x_1 x_2 → r x x_2)\nh : PartiallyWellOrderedOn s fun x x_1 => x ≤ x_1\n⊢ WellFoundedOn s fun x x_1 => x < x_1\n[PROOFSTEP]\nrw [wellFoundedOn_iff_no_descending_seq]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf : α → β\ns t : Set α\na : α\ninst✝ : IsPreorder α r\nthis : Preorder α := Preorder.mk (_ : ∀ (a : α), r a a) (_ : ∀ (x x_1 x_2 : α), r x x_1 → r x_1 x_2 → r x x_2)\nh : PartiallyWellOrderedOn s fun x x_1 => x ≤ x_1\n⊢ ∀ (f : (fun x x_1 => x > x_1) ↪r fun x x_1 => x < x_1), ¬∀ (n : ℕ), ↑f n ∈ s\n[PROOFSTEP]\nintro f hf\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝ : IsPreorder α r\nthis : Preorder α := Preorder.mk (_ : ∀ (a : α), r a a) (_ : ∀ (x x_1 x_2 : α), r x x_1 → r x_1 x_2 → r x x_2)\nh : PartiallyWellOrderedOn s fun x x_1 => x ≤ x_1\nf : (fun x x_1 => x > x_1) ↪r fun x x_1 => x < x_1\nhf : ∀ (n : ℕ), ↑f n ∈ s\n⊢ False\n[PROOFSTEP]\nobtain ⟨m, n, hlt, hle⟩ := h f hf\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nr' : β → β → Prop\nf✝ : α → β\ns t : Set α\na : α\ninst✝ : IsPreorder α r\nthis : Preorder α := Preorder.mk (_ : ∀ (a : α), r a a) (_ : ∀ (x x_1 x_2 : α), r x x_1 → r x_1 x_2 → r x x_2)\nh : PartiallyWellOrderedOn s fun x x_1 => x ≤ x_1\nf : (fun x x_1 => x > x_1) ↪r fun x x_1 => x < x_1\nhf : ∀ (n : ℕ), ↑f n ∈ s\nm n : ℕ\nhlt : m < n\nhle : ↑f m ≤ ↑f n\n⊢ False\n[PROOFSTEP]\nexact (f.map_rel_iff.2 hlt).not_le hle\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ns t : Set α\nh : IsPwo s\n⊢ IsWf s\n[PROOFSTEP]\nsimpa only [← lt_iff_le_not_le] using h.wellFoundedOn\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ns t : Set α\na : α\n⊢ IsPwo (insert a s) ↔ IsPwo s\n[PROOFSTEP]\nsimp only [← singleton_union, isPwo_union, isPwo_singleton, true_and_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ns t : Set α\na : α\n⊢ IsWf (insert a s) ↔ IsWf s\n[PROOFSTEP]\nsimp only [← singleton_union, isWf_union, isWf_singleton, true_and_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\ninst✝ : IsStrictOrder α r\ns : Set α\na : α\n⊢ WellFoundedOn (insert a s) r ↔ WellFoundedOn s r\n[PROOFSTEP]\nsimp only [← singleton_union, wellFoundedOn_union, wellFoundedOn_singleton, true_and_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\ninst✝ : LinearOrder α\ns : Set α\nhs : IsWf s\n⊢ IsPwo s\n[PROOFSTEP]\nintro f hf\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\ninst✝ : LinearOrder α\ns : Set α\nhs : IsWf s\nf : ℕ → α\nhf : ∀ (n : ℕ), f n ∈ s\n⊢ ∃ m n, m < n ∧ (fun x x_1 => x ≤ x_1) (f m) (f n)\n[PROOFSTEP]\nlift f to ℕ → s using hf\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\ninst✝ : LinearOrder α\ns : Set α\nhs : IsWf s\nf : ℕ → ↑s\n⊢ ∃ m n, m < n ∧ (fun x x_1 => x ≤ x_1) ((fun i => ↑(f i)) m) ((fun i => ↑(f i)) n)\n[PROOFSTEP]\nrcases hs.has_min (range f) (range_nonempty _) with ⟨_, ⟨m, rfl⟩, hm⟩\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\ninst✝ : LinearOrder α\ns : Set α\nhs : IsWf s\nf : ℕ → ↑s\nm : ℕ\nhm : ∀ (x : ↑s), x ∈ range f → ¬(fun x x_1 => x < x_1) ↑x ↑(f m)\n⊢ ∃ m n, m < n ∧ (fun x x_1 => x ≤ x_1) ((fun i => ↑(f i)) m) ((fun i => ↑(f i)) n)\n[PROOFSTEP]\nsimp only [forall_range_iff, not_lt] at hm \n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\ninst✝ : LinearOrder α\ns : Set α\nhs : IsWf s\nf : ℕ → ↑s\nm : ℕ\nhm : ∀ (i : ℕ), ↑(f m) ≤ ↑(f i)\n⊢ ∃ m n, m < n ∧ (fun x x_1 => x ≤ x_1) ((fun i => ↑(f i)) m) ((fun i => ↑(f i)) n)\n[PROOFSTEP]\nexact ⟨m, m + 1, lt_add_one m, hm _⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\ninst✝ : IsStrictOrder α r\ns : Finset ι\nf : ι → Set α\n⊢ Set.WellFoundedOn (sup ∅ f) r ↔ ∀ (i : ι), i ∈ ∅ → Set.WellFoundedOn (f i) r\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\ninst✝ : IsStrictOrder α r\ns✝ : Finset ι\nf : ι → Set α\na : ι\ns : Finset ι\nha : ¬a ∈ s\nhs : Set.WellFoundedOn (sup s f) r ↔ ∀ (i : ι), i ∈ s → Set.WellFoundedOn (f i) r\n⊢ Set.WellFoundedOn (sup (cons a s ha) f) r ↔ ∀ (i : ι), i ∈ cons a s ha → Set.WellFoundedOn (f i) r\n[PROOFSTEP]\nsimp [-sup_set_eq_biUnion, hs]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\ns : Finset ι\nf : ι → Set α\n⊢ Set.PartiallyWellOrderedOn (sup ∅ f) r ↔ ∀ (i : ι), i ∈ ∅ → Set.PartiallyWellOrderedOn (f i) r\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\ns✝ : Finset ι\nf : ι → Set α\na : ι\ns : Finset ι\nha : ¬a ∈ s\nhs : Set.PartiallyWellOrderedOn (sup s f) r ↔ ∀ (i : ι), i ∈ s → Set.PartiallyWellOrderedOn (f i) r\n⊢ Set.PartiallyWellOrderedOn (sup (cons a s ha) f) r ↔ ∀ (i : ι), i ∈ cons a s ha → Set.PartiallyWellOrderedOn (f i) r\n[PROOFSTEP]\nsimp [-sup_set_eq_biUnion, hs]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\ninst✝ : IsStrictOrder α r\ns : Finset ι\nf : ι → Set α\n⊢ Set.WellFoundedOn (⋃ (i : ι) (_ : i ∈ s), f i) r ↔ ∀ (i : ι), i ∈ s → Set.WellFoundedOn (f i) r\n[PROOFSTEP]\nsimpa only [Finset.sup_eq_iSup] using s.wellFoundedOn_sup\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\ns : Finset ι\nf : ι → Set α\n⊢ Set.PartiallyWellOrderedOn (⋃ (i : ι) (_ : i ∈ s), f i) r ↔ ∀ (i : ι), i ∈ s → Set.PartiallyWellOrderedOn (f i) r\n[PROOFSTEP]\nsimpa only [Finset.sup_eq_iSup] using s.partiallyWellOrderedOn_sup\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\ninst✝ : LinearOrder α\ns t : Set α\na : α\nhs : IsWf s\nhsn : Set.Nonempty s\nht : IsWf t\nhtn : Set.Nonempty t\n⊢ min (_ : IsWf (s ∪ t)) (_ : Set.Nonempty (s ∪ t)) = Min.min (min hs hsn) (min ht htn)\n[PROOFSTEP]\nrefine'\n  le_antisymm\n    (le_min (IsWf.min_le_min_of_subset (subset_union_left _ _)) (IsWf.min_le_min_of_subset (subset_union_right _ _))) _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\ninst✝ : LinearOrder α\ns t : Set α\na : α\nhs : IsWf s\nhsn : Set.Nonempty s\nht : IsWf t\nhtn : Set.Nonempty t\n⊢ Min.min (min hs hsn) (min ht htn) ≤ min (_ : IsWf (s ∪ t)) (_ : Set.Nonempty (s ∪ t))\n[PROOFSTEP]\nrw [min_le_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\ninst✝ : LinearOrder α\ns t : Set α\na : α\nhs : IsWf s\nhsn : Set.Nonempty s\nht : IsWf t\nhtn : Set.Nonempty t\n⊢ min hs hsn ≤ min (_ : IsWf (s ∪ t)) (_ : Set.Nonempty (s ∪ t)) ∨\n    min ht htn ≤ min (_ : IsWf (s ∪ t)) (_ : Set.Nonempty (s ∪ t))\n[PROOFSTEP]\nexact ((mem_union _ _ _).1 ((hs.union ht).min_mem (union_nonempty.2 (.inl hsn)))).imp (hs.min_le _) (ht.min_le _)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ns : Set α\nf : ℕ → α\n⊢ ((∀ (n : ℕ), f n ∈ s) → ∃ m n, m < n ∧ r (f m) (f n)) ↔ ¬IsBadSeq r s f\n[PROOFSTEP]\nsimp [IsBadSeq]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nn : ℕ\nf : ℕ → α\nhf : IsBadSeq r s f\n⊢ { g // (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ IsMinBadSeq r rk s n g }\n[PROOFSTEP]\nclassical\nhave h : ∃ (k : ℕ) (g : ℕ → α), (∀ m, m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = k :=\n  ⟨_, f, fun _ _ => rfl, hf, rfl⟩\nobtain ⟨h1, h2, h3⟩ := Classical.choose_spec (Nat.find_spec h)\nrefine' ⟨Classical.choose (Nat.find_spec h), h1, by convert h2, fun g hg1 hg2 con => _⟩\nrefine' Nat.find_min h _ ⟨g, fun m mn => (h1 m mn).trans (hg1 m mn), con, rfl⟩\nrwa [← h3]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nn : ℕ\nf : ℕ → α\nhf : IsBadSeq r s f\n⊢ { g // (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ IsMinBadSeq r rk s n g }\n[PROOFSTEP]\nhave h : ∃ (k : ℕ) (g : ℕ → α), (∀ m, m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = k :=\n  ⟨_, f, fun _ _ => rfl, hf, rfl⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nn : ℕ\nf : ℕ → α\nhf : IsBadSeq r s f\nh : ∃ k g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = k\n⊢ { g // (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ IsMinBadSeq r rk s n g }\n[PROOFSTEP]\nobtain ⟨h1, h2, h3⟩ := Classical.choose_spec (Nat.find_spec h)\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nn : ℕ\nf : ℕ → α\nhf : IsBadSeq r s f\nh : ∃ k g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = k\nh1 :\n  ∀ (m : ℕ),\n    m < n → f m = Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h) m\nh2 : IsBadSeq r s (Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h))\nh3 :\n  rk (Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h) n) =\n    Nat.find h\n⊢ { g // (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ IsMinBadSeq r rk s n g }\n[PROOFSTEP]\nrefine' ⟨Classical.choose (Nat.find_spec h), h1, by convert h2, fun g hg1 hg2 con => _⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nn : ℕ\nf : ℕ → α\nhf : IsBadSeq r s f\nh : ∃ k g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = k\nh1 :\n  ∀ (m : ℕ),\n    m < n → f m = Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h) m\nh2 : IsBadSeq r s (Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h))\nh3 :\n  rk (Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h) n) =\n    Nat.find h\n⊢ IsBadSeq r s (Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h))\n[PROOFSTEP]\nconvert h2\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nn : ℕ\nf : ℕ → α\nhf : IsBadSeq r s f\nh : ∃ k g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = k\nh1 :\n  ∀ (m : ℕ),\n    m < n → f m = Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h) m\nh2 : IsBadSeq r s (Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h))\nh3 :\n  rk (Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h) n) =\n    Nat.find h\ng : ℕ → α\nhg1 :\n  ∀ (m : ℕ),\n    m < n → Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h) m = g m\nhg2 :\n  rk (g n) < rk (Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h) n)\ncon : IsBadSeq r s g\n⊢ False\n[PROOFSTEP]\nrefine' Nat.find_min h _ ⟨g, fun m mn => (h1 m mn).trans (hg1 m mn), con, rfl⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nn : ℕ\nf : ℕ → α\nhf : IsBadSeq r s f\nh : ∃ k g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = k\nh1 :\n  ∀ (m : ℕ),\n    m < n → f m = Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h) m\nh2 : IsBadSeq r s (Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h))\nh3 :\n  rk (Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h) n) =\n    Nat.find h\ng : ℕ → α\nhg1 :\n  ∀ (m : ℕ),\n    m < n → Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h) m = g m\nhg2 :\n  rk (g n) < rk (Classical.choose (_ : ∃ g, (∀ (m : ℕ), m < n → f m = g m) ∧ IsBadSeq r s g ∧ rk (g n) = Nat.find h) n)\ncon : IsBadSeq r s g\n⊢ rk (g n) < Nat.find h\n[PROOFSTEP]\nrwa [← h3]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\n⊢ (∃ f, IsBadSeq r s f) → ∃ f, IsBadSeq r s f ∧ ∀ (n : ℕ), IsMinBadSeq r rk s n f\n[PROOFSTEP]\nrintro ⟨f0, hf0 : IsBadSeq r s f0⟩\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\n⊢ ∃ f, IsBadSeq r s f ∧ ∀ (n : ℕ), IsMinBadSeq r rk s n f\n[PROOFSTEP]\nlet fs : ∀ n : ℕ, { f : ℕ → α // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  by\n  refine' Nat.rec _ fun n fn => _\n  · exact ⟨(minBadSeqOfBadSeq r rk s 0 f0 hf0).1, (minBadSeqOfBadSeq r rk s 0 f0 hf0).2.2⟩\n  · exact ⟨(minBadSeqOfBadSeq r rk s (n + 1) fn.1 fn.2.1).1, (minBadSeqOfBadSeq r rk s (n + 1) fn.1 fn.2.1).2.2⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\n⊢ (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f }\n[PROOFSTEP]\nrefine' Nat.rec _ fun n fn => _\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\n⊢ { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s Nat.zero f }\n[PROOFSTEP]\nexact ⟨(minBadSeqOfBadSeq r rk s 0 f0 hf0).1, (minBadSeqOfBadSeq r rk s 0 f0 hf0).2.2⟩\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nn : ℕ\nfn : { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f }\n⊢ { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s (Nat.succ n) f }\n[PROOFSTEP]\nexact ⟨(minBadSeqOfBadSeq r rk s (n + 1) fn.1 fn.2.1).1, (minBadSeqOfBadSeq r rk s (n + 1) fn.1 fn.2.1).2.2⟩\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\n⊢ ∃ f, IsBadSeq r s f ∧ ∀ (n : ℕ), IsMinBadSeq r rk s n f\n[PROOFSTEP]\nhave h : ∀ m n, m ≤ n → (fs m).1 m = (fs n).1 m := fun m n mn =>\n  by\n  obtain ⟨k, rfl⟩ := exists_add_of_le mn; clear mn\n  induction' k with k ih\n  · rfl\n  · rw [ih,\n      (minBadSeqOfBadSeq r rk s (m + k + 1) (fs (m + k)).1 (fs (m + k)).2.1).2.1 m\n        (Nat.lt_succ_iff.2 (Nat.add_le_add_left k.zero_le m))]\n    rfl\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\nm n : ℕ\nmn : m ≤ n\n⊢ ↑(fs m) m = ↑(fs n) m\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := exists_add_of_le mn\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\nm k : ℕ\nmn : m ≤ m + k\n⊢ ↑(fs m) m = ↑(fs (m + k)) m\n[PROOFSTEP]\nclear mn\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\nm k : ℕ\n⊢ ↑(fs m) m = ↑(fs (m + k)) m\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase intro.zero\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\nm : ℕ\n⊢ ↑(fs m) m = ↑(fs (m + Nat.zero)) m\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.succ\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\nm k : ℕ\nih : ↑(fs m) m = ↑(fs (m + k)) m\n⊢ ↑(fs m) m = ↑(fs (m + Nat.succ k)) m\n[PROOFSTEP]\nrw [ih,\n  (minBadSeqOfBadSeq r rk s (m + k + 1) (fs (m + k)).1 (fs (m + k)).2.1).2.1 m\n    (Nat.lt_succ_iff.2 (Nat.add_le_add_left k.zero_le m))]\n[GOAL]\ncase intro.succ\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\nm k : ℕ\nih : ↑(fs m) m = ↑(fs (m + k)) m\n⊢ ↑(minBadSeqOfBadSeq r rk s (m + k + 1) ↑(fs (m + k)) (_ : IsBadSeq r s ↑(fs (m + k)))) m = ↑(fs (m + Nat.succ k)) m\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\nh : ∀ (m n : ℕ), m ≤ n → ↑(fs m) m = ↑(fs n) m\n⊢ ∃ f, IsBadSeq r s f ∧ ∀ (n : ℕ), IsMinBadSeq r rk s n f\n[PROOFSTEP]\nrefine ⟨fun n => (fs n).1 n, ⟨fun n => (fs n).2.1.1 n, fun m n mn => ?_⟩, fun n g hg1 hg2 => ?_⟩\n[GOAL]\ncase intro.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\nh : ∀ (m n : ℕ), m ≤ n → ↑(fs m) m = ↑(fs n) m\nm n : ℕ\nmn : m < n\n⊢ ¬r ((fun n => ↑(fs n) n) m) ((fun n => ↑(fs n) n) n)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\nh : ∀ (m n : ℕ), m ≤ n → ↑(fs m) m = ↑(fs n) m\nm n : ℕ\nmn : m < n\n⊢ ¬r\n      (↑(Nat.rec\n            { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n              property :=\n                (_ :\n                  IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n                    IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n            (fun n fn =>\n              { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n                property :=\n                  (_ :\n                    IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                      IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n            m)\n        m)\n      (↑(Nat.rec\n            { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n              property :=\n                (_ :\n                  IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n                    IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n            (fun n fn =>\n              { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n                property :=\n                  (_ :\n                    IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                      IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n            n)\n        n)\n[PROOFSTEP]\nrw [h m n mn.le]\n[GOAL]\ncase intro.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\nh : ∀ (m n : ℕ), m ≤ n → ↑(fs m) m = ↑(fs n) m\nm n : ℕ\nmn : m < n\n⊢ ¬r (↑(fs n) m)\n      (↑(Nat.rec\n            { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n              property :=\n                (_ :\n                  IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n                    IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n            (fun n fn =>\n              { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n                property :=\n                  (_ :\n                    IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                      IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n            n)\n        n)\n[PROOFSTEP]\nexact (fs n).2.1.2 m n mn\n[GOAL]\ncase intro.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\nh : ∀ (m n : ℕ), m ≤ n → ↑(fs m) m = ↑(fs n) m\nn : ℕ\ng : ℕ → α\nhg1 : ∀ (m : ℕ), m < n → (fun n => ↑(fs n) n) m = g m\nhg2 : rk (g n) < rk ((fun n => ↑(fs n) n) n)\n⊢ ¬IsBadSeq r s g\n[PROOFSTEP]\nrefine (fs n).2.2 g (fun m mn => ?_) hg2\n[GOAL]\ncase intro.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\nrk : α → ℕ\ns : Set α\nf0 : ℕ → α\nhf0 : IsBadSeq r s f0\nfs : (n : ℕ) → { f // IsBadSeq r s f ∧ IsMinBadSeq r rk s n f } :=\n  fun t =>\n    Nat.rec\n      { val := ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0),\n        property :=\n          (_ :\n            IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0) ∧\n              IsMinBadSeq r rk s 0 ↑(minBadSeqOfBadSeq r rk s 0 f0 hf0)) }\n      (fun n fn =>\n        { val := ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)),\n          property :=\n            (_ :\n              IsBadSeq r s ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn)) ∧\n                IsMinBadSeq r rk s (n + 1) ↑(minBadSeqOfBadSeq r rk s (n + 1) ↑fn (_ : IsBadSeq r s ↑fn))) })\n      t\nh : ∀ (m n : ℕ), m ≤ n → ↑(fs m) m = ↑(fs n) m\nn : ℕ\ng : ℕ → α\nhg1 : ∀ (m : ℕ), m < n → (fun n => ↑(fs n) n) m = g m\nhg2 : rk (g n) < rk ((fun n => ↑(fs n) n) n)\nm : ℕ\nmn : m < n\n⊢ ↑(fs n) m = g m\n[PROOFSTEP]\nrw [← h m n mn.le, ← hg1 m mn]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nrk : α → ℕ\ns : Set α\n⊢ PartiallyWellOrderedOn s r ↔ ¬∃ f, IsBadSeq r s f ∧ ∀ (n : ℕ), IsMinBadSeq r rk s n f\n[PROOFSTEP]\nrw [iff_forall_not_isBadSeq, ← not_exists, not_congr]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nrk : α → ℕ\ns : Set α\n⊢ (∃ x, IsBadSeq r s x) ↔ ∃ f, IsBadSeq r s f ∧ ∀ (n : ℕ), IsMinBadSeq r rk s n f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nrk : α → ℕ\ns : Set α\n⊢ (∃ x, IsBadSeq r s x) → ∃ f, IsBadSeq r s f ∧ ∀ (n : ℕ), IsMinBadSeq r rk s n f\n[PROOFSTEP]\napply exists_min_bad_of_exists_bad\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nrk : α → ℕ\ns : Set α\n⊢ (∃ f, IsBadSeq r s f ∧ ∀ (n : ℕ), IsMinBadSeq r rk s n f) → ∃ x, IsBadSeq r s x\n[PROOFSTEP]\nrintro ⟨f, hf1, -⟩\n[GOAL]\ncase mpr.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr : α → α → Prop\nrk : α → ℕ\ns : Set α\nf : ℕ → α\nhf1 : IsBadSeq r s f\n⊢ ∃ x, IsBadSeq r s x\n[PROOFSTEP]\nexact ⟨f, hf1⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\n⊢ PartiallyWellOrderedOn {l | ∀ (x : α), x ∈ l → x ∈ s} (List.SublistForall₂ r)\n[PROOFSTEP]\nrcases isEmpty_or_nonempty α\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : IsEmpty α\n⊢ PartiallyWellOrderedOn {l | ∀ (x : α), x ∈ l → x ∈ s} (List.SublistForall₂ r)\n[PROOFSTEP]\nexact subsingleton_of_subsingleton.partiallyWellOrderedOn\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\n⊢ PartiallyWellOrderedOn {l | ∀ (x : α), x ∈ l → x ∈ s} (List.SublistForall₂ r)\n[PROOFSTEP]\ninhabit α\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\n⊢ PartiallyWellOrderedOn {l | ∀ (x : α), x ∈ l → x ∈ s} (List.SublistForall₂ r)\n[PROOFSTEP]\nrw [iff_not_exists_isMinBadSeq List.length]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\n⊢ ¬∃ f,\n      IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f ∧\n        ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\n[PROOFSTEP]\nrintro ⟨f, hf1, hf2⟩\n[GOAL]\ncase inr.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\n⊢ False\n[PROOFSTEP]\nhave hnil : ∀ n, f n ≠ List.nil := fun n con => hf1.2 n n.succ n.lt_succ_self (con.symm ▸ List.SublistForall₂.nil)\n[GOAL]\ncase inr.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\n⊢ False\n[PROOFSTEP]\nhave : ∀ n, (f n).headI ∈ s\n[GOAL]\ncase this\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\n⊢ ∀ (n : ℕ), List.headI (f n) ∈ s\n[PROOFSTEP]\nexact fun n => hf1.1 n _ (List.head!_mem_self (hnil n))\n[GOAL]\ncase inr.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\n⊢ False\n[PROOFSTEP]\nobtain ⟨g, hg⟩ := h.exists_monotone_subseq (fun n => (f n).headI) this\n[GOAL]\ncase inr.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\n⊢ False\n[PROOFSTEP]\nhave hf' := hf2 (g 0) (fun n => if n < g 0 then f n else List.tail (f (g (n - g 0)))) (fun m hm => (if_pos hm).symm) ?_\n[GOAL]\ncase inr.intro.intro.intro.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  ¬IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} fun n =>\n      if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))\n⊢ False\ncase inr.intro.intro.intro.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\n⊢ List.length ((fun n => if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) (↑g 0)) < List.length (f (↑g 0))\n[PROOFSTEP]\nswap\n[GOAL]\ncase inr.intro.intro.intro.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\n⊢ List.length ((fun n => if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) (↑g 0)) < List.length (f (↑g 0))\n[PROOFSTEP]\nsimp only [if_neg (lt_irrefl (g 0)), tsub_self]\n[GOAL]\ncase inr.intro.intro.intro.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\n⊢ List.length (List.tail (f (↑g 0))) < List.length (f (↑g 0))\n[PROOFSTEP]\nrw [List.length_tail, ← Nat.pred_eq_sub_one]\n[GOAL]\ncase inr.intro.intro.intro.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\n⊢ Nat.pred (List.length (f (↑g 0))) < List.length (f (↑g 0))\n[PROOFSTEP]\nexact Nat.pred_lt fun con => hnil _ (List.length_eq_zero.1 con)\n[GOAL]\ncase inr.intro.intro.intro.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  ¬IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} fun n =>\n      if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))\n⊢ False\n[PROOFSTEP]\nrw [IsBadSeq] at hf' \n[GOAL]\ncase inr.intro.intro.intro.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  ¬((∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) ∧\n      ∀ (m n : ℕ),\n        m < n →\n          ¬List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n              (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))))\n⊢ False\n[PROOFSTEP]\npush_neg at hf' \n[GOAL]\ncase inr.intro.intro.intro.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\n⊢ False\n[PROOFSTEP]\nobtain ⟨m, n, mn, hmn⟩ :=\n  hf' <| fun n x hx => by\n    split_ifs at hx  with hn\n    exacts [hf1.1 _ _ hx, hf1.1 _ _ (List.tail_subset _ hx)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nn : ℕ\nx : α\nhx : x ∈ if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))\n⊢ x ∈ s\n[PROOFSTEP]\nsplit_ifs at hx  with hn\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nn : ℕ\nx : α\nhn : n < ↑g 0\nhx : x ∈ f n\n⊢ x ∈ s\ncase neg\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nn : ℕ\nx : α\nhn : ¬n < ↑g 0\nhx : x ∈ List.tail (f (↑g (n - ↑g 0)))\n⊢ x ∈ s\n[PROOFSTEP]\nexacts [hf1.1 _ _ hx, hf1.1 _ _ (List.tail_subset _ hx)]\n[GOAL]\ncase inr.intro.intro.intro.refine_2.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nm n : ℕ\nmn : m < n\nhmn :\n  List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n    (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\n⊢ False\n[PROOFSTEP]\nby_cases hn : n < g 0\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nm n : ℕ\nmn : m < n\nhmn :\n  List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n    (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nhn : n < ↑g 0\n⊢ False\n[PROOFSTEP]\napply hf1.2 m n mn\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nm n : ℕ\nmn : m < n\nhmn :\n  List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n    (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nhn : n < ↑g 0\n⊢ List.SublistForall₂ r (f m) (f n)\n[PROOFSTEP]\nrwa [if_pos hn, if_pos (mn.trans hn)] at hmn \n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nm n : ℕ\nmn : m < n\nhmn :\n  List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n    (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nhn : ¬n < ↑g 0\n⊢ False\n[PROOFSTEP]\nobtain ⟨n', rfl⟩ := exists_add_of_le (not_lt.1 hn)\n[GOAL]\ncase neg.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nm n' : ℕ\nmn : m < ↑g 0 + n'\nhmn :\n  List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n    (if ↑g 0 + n' < ↑g 0 then f (↑g 0 + n') else List.tail (f (↑g (↑g 0 + n' - ↑g 0))))\nhn : ¬↑g 0 + n' < ↑g 0\n⊢ False\n[PROOFSTEP]\nrw [if_neg hn, add_comm (g 0) n', add_tsub_cancel_right] at hmn \n[GOAL]\ncase neg.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nm n' : ℕ\nmn : m < ↑g 0 + n'\nhmn : List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0)))) (List.tail (f (↑g n')))\nhn : ¬↑g 0 + n' < ↑g 0\n⊢ False\n[PROOFSTEP]\nsplit_ifs at hmn  with hm\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nm n' : ℕ\nmn : m < ↑g 0 + n'\nhn : ¬↑g 0 + n' < ↑g 0\nhm : m < ↑g 0\nhmn : List.SublistForall₂ r (f m) (List.tail (f (↑g n')))\n⊢ False\n[PROOFSTEP]\napply hf1.2 m (g n') (lt_of_lt_of_le hm (g.monotone n'.zero_le))\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nm n' : ℕ\nmn : m < ↑g 0 + n'\nhn : ¬↑g 0 + n' < ↑g 0\nhm : m < ↑g 0\nhmn : List.SublistForall₂ r (f m) (List.tail (f (↑g n')))\n⊢ List.SublistForall₂ r (f m) (f (↑g n'))\n[PROOFSTEP]\nexact _root_.trans hmn (List.tail_sublistForall₂_self _)\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nm n' : ℕ\nmn : m < ↑g 0 + n'\nhn : ¬↑g 0 + n' < ↑g 0\nhm : ¬m < ↑g 0\nhmn : List.SublistForall₂ r (List.tail (f (↑g (m - ↑g 0)))) (List.tail (f (↑g n')))\n⊢ False\n[PROOFSTEP]\nrw [← tsub_lt_iff_left (le_of_not_lt hm)] at mn \n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nm n' : ℕ\nmn : m - ↑g 0 < n'\nhn : ¬↑g 0 + n' < ↑g 0\nhm : ¬m < ↑g 0\nhmn : List.SublistForall₂ r (List.tail (f (↑g (m - ↑g 0)))) (List.tail (f (↑g n')))\n⊢ False\n[PROOFSTEP]\napply hf1.2 _ _ (g.lt_iff_lt.2 mn)\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nm n' : ℕ\nmn : m - ↑g 0 < n'\nhn : ¬↑g 0 + n' < ↑g 0\nhm : ¬m < ↑g 0\nhmn : List.SublistForall₂ r (List.tail (f (↑g (m - ↑g 0)))) (List.tail (f (↑g n')))\n⊢ List.SublistForall₂ r (f (↑g (m - ↑g 0))) (f (↑g n'))\n[PROOFSTEP]\nrw [← List.cons_head!_tail (hnil (g (m - g 0))), ← List.cons_head!_tail (hnil (g n'))]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nr✝ r : α → α → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsTrans α r\ns : Set α\nh : PartiallyWellOrderedOn s r\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : ℕ → List α\nhf1 : IsBadSeq (List.SublistForall₂ r) {l | ∀ (x : α), x ∈ l → x ∈ s} f\nhf2 : ∀ (n : ℕ), IsMinBadSeq (List.SublistForall₂ r) List.length {l | ∀ (x : α), x ∈ l → x ∈ s} n f\nhnil : ∀ (n : ℕ), f n ≠ []\nthis : ∀ (n : ℕ), List.headI (f n) ∈ s\ng : ℕ ↪o ℕ\nhg : ∀ (m n : ℕ), m ≤ n → r (List.headI (f (↑g m))) (List.headI (f (↑g n)))\nhf' :\n  (∀ (n : ℕ), (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0)))) ∈ {l | ∀ (x : α), x ∈ l → x ∈ s}) →\n    ∃ m n,\n      m < n ∧\n        List.SublistForall₂ r (if m < ↑g 0 then f m else List.tail (f (↑g (m - ↑g 0))))\n          (if n < ↑g 0 then f n else List.tail (f (↑g (n - ↑g 0))))\nm n' : ℕ\nmn : m - ↑g 0 < n'\nhn : ¬↑g 0 + n' < ↑g 0\nhm : ¬m < ↑g 0\nhmn : List.SublistForall₂ r (List.tail (f (↑g (m - ↑g 0)))) (List.tail (f (↑g n')))\n⊢ List.SublistForall₂ r (List.head! (f (↑g (m - ↑g 0))) :: List.tail (f (↑g (m - ↑g 0))))\n    (List.head! (f (↑g n')) :: List.tail (f (↑g n')))\n[PROOFSTEP]\nexact List.SublistForall₂.cons (hg _ _ (le_of_lt mn)) hmn\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns : Set ((i : ι) → α i)\n⊢ IsPwo s\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns : Set ((i : ι) → α i)\nval✝ : Fintype ι\n⊢ IsPwo s\n[PROOFSTEP]\nsuffices ∀ (s : Finset ι) (f : ℕ → ∀ s, α s), ∃ g : ℕ ↪o ℕ, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ x, x ∈ s → (f ∘ g) a x ≤ (f ∘ g) b x\n  by\n  refine isPwo_iff_exists_monotone_subseq.2 fun f _ => ?_\n  simpa only [Finset.mem_univ, true_imp_iff] using this Finset.univ f\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns : Set ((i : ι) → α i)\nval✝ : Fintype ι\nthis :\n  ∀ (s : Finset ι) (f : ℕ → (s : ι) → α s), ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x : ι), x ∈ s → (f ∘ ↑g) a x ≤ (f ∘ ↑g) b x\n⊢ IsPwo s\n[PROOFSTEP]\nrefine isPwo_iff_exists_monotone_subseq.2 fun f _ => ?_\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns : Set ((i : ι) → α i)\nval✝ : Fintype ι\nthis :\n  ∀ (s : Finset ι) (f : ℕ → (s : ι) → α s), ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x : ι), x ∈ s → (f ∘ ↑g) a x ≤ (f ∘ ↑g) b x\nf : ℕ → (i : ι) → α i\nx✝ : ∀ (n : ℕ), f n ∈ s\n⊢ ∃ g, Monotone (f ∘ ↑g)\n[PROOFSTEP]\nsimpa only [Finset.mem_univ, true_imp_iff] using this Finset.univ f\n[GOAL]\ncase intro\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns : Set ((i : ι) → α i)\nval✝ : Fintype ι\n⊢ ∀ (s : Finset ι) (f : ℕ → (s : ι) → α s), ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x : ι), x ∈ s → (f ∘ ↑g) a x ≤ (f ∘ ↑g) b x\n[PROOFSTEP]\nrefine' Finset.cons_induction _ _\n[GOAL]\ncase intro.refine'_1\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns : Set ((i : ι) → α i)\nval✝ : Fintype ι\n⊢ ∀ (f : ℕ → (s : ι) → α s), ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x : ι), x ∈ ∅ → (f ∘ ↑g) a x ≤ (f ∘ ↑g) b x\n[PROOFSTEP]\nintro f\n[GOAL]\ncase intro.refine'_1\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns : Set ((i : ι) → α i)\nval✝ : Fintype ι\nf : ℕ → (s : ι) → α s\n⊢ ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x : ι), x ∈ ∅ → (f ∘ ↑g) a x ≤ (f ∘ ↑g) b x\n[PROOFSTEP]\nexists RelEmbedding.refl (· ≤ ·)\n[GOAL]\ncase intro.refine'_1\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns : Set ((i : ι) → α i)\nval✝ : Fintype ι\nf : ℕ → (s : ι) → α s\n⊢ ∀ ⦃a b : ℕ⦄,\n    a ≤ b →\n      ∀ (x : ι),\n        x ∈ ∅ →\n          (f ∘ ↑(RelEmbedding.refl fun x x_1 => x ≤ x_1)) a x ≤ (f ∘ ↑(RelEmbedding.refl fun x x_1 => x ≤ x_1)) b x\n[PROOFSTEP]\nsimp only [IsEmpty.forall_iff, imp_true_iff, forall_const, Finset.not_mem_empty]\n[GOAL]\ncase intro.refine'_2\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns : Set ((i : ι) → α i)\nval✝ : Fintype ι\n⊢ ∀ ⦃a : ι⦄ {s : Finset ι} (h : ¬a ∈ s),\n    (∀ (f : ℕ → (s : ι) → α s), ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x : ι), x ∈ s → (f ∘ ↑g) a x ≤ (f ∘ ↑g) b x) →\n      ∀ (f : ℕ → (s : ι) → α s),\n        ∃ g, ∀ ⦃a_2 b : ℕ⦄, a_2 ≤ b → ∀ (x : ι), x ∈ Finset.cons a s h → (f ∘ ↑g) a_2 x ≤ (f ∘ ↑g) b x\n[PROOFSTEP]\nintro x s hx ih f\n[GOAL]\ncase intro.refine'_2\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns✝ : Set ((i : ι) → α i)\nval✝ : Fintype ι\nx : ι\ns : Finset ι\nhx : ¬x ∈ s\nih : ∀ (f : ℕ → (s : ι) → α s), ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x : ι), x ∈ s → (f ∘ ↑g) a x ≤ (f ∘ ↑g) b x\nf : ℕ → (s : ι) → α s\n⊢ ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x_1 : ι), x_1 ∈ Finset.cons x s hx → (f ∘ ↑g) a x_1 ≤ (f ∘ ↑g) b x_1\n[PROOFSTEP]\nobtain ⟨g, hg⟩ := (IsWellFounded.wf.isWf univ).isPwo.exists_monotone_subseq (fun n => f n x) mem_univ\n[GOAL]\ncase intro.refine'_2.intro\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns✝ : Set ((i : ι) → α i)\nval✝ : Fintype ι\nx : ι\ns : Finset ι\nhx : ¬x ∈ s\nih : ∀ (f : ℕ → (s : ι) → α s), ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x : ι), x ∈ s → (f ∘ ↑g) a x ≤ (f ∘ ↑g) b x\nf : ℕ → (s : ι) → α s\ng : ℕ ↪o ℕ\nhg : Monotone ((fun n => f n x) ∘ ↑g)\n⊢ ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x_1 : ι), x_1 ∈ Finset.cons x s hx → (f ∘ ↑g) a x_1 ≤ (f ∘ ↑g) b x_1\n[PROOFSTEP]\nobtain ⟨g', hg'⟩ := ih (f ∘ g)\n[GOAL]\ncase intro.refine'_2.intro.intro\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns✝ : Set ((i : ι) → α i)\nval✝ : Fintype ι\nx : ι\ns : Finset ι\nhx : ¬x ∈ s\nih : ∀ (f : ℕ → (s : ι) → α s), ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x : ι), x ∈ s → (f ∘ ↑g) a x ≤ (f ∘ ↑g) b x\nf : ℕ → (s : ι) → α s\ng : ℕ ↪o ℕ\nhg : Monotone ((fun n => f n x) ∘ ↑g)\ng' : ℕ ↪o ℕ\nhg' : ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x : ι), x ∈ s → ((f ∘ ↑g) ∘ ↑g') a x ≤ ((f ∘ ↑g) ∘ ↑g') b x\n⊢ ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x_1 : ι), x_1 ∈ Finset.cons x s hx → (f ∘ ↑g) a x_1 ≤ (f ∘ ↑g) b x_1\n[PROOFSTEP]\nrefine' ⟨g'.trans g, fun a b hab => (Finset.forall_mem_cons _ _).2 _⟩\n[GOAL]\ncase intro.refine'_2.intro.intro\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nα : ι → Type u_6\ninst✝² : (i : ι) → LinearOrder (α i)\ninst✝¹ : ∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1\ninst✝ : Finite ι\ns✝ : Set ((i : ι) → α i)\nval✝ : Fintype ι\nx : ι\ns : Finset ι\nhx : ¬x ∈ s\nih : ∀ (f : ℕ → (s : ι) → α s), ∃ g, ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x : ι), x ∈ s → (f ∘ ↑g) a x ≤ (f ∘ ↑g) b x\nf : ℕ → (s : ι) → α s\ng : ℕ ↪o ℕ\nhg : Monotone ((fun n => f n x) ∘ ↑g)\ng' : ℕ ↪o ℕ\nhg' : ∀ ⦃a b : ℕ⦄, a ≤ b → ∀ (x : ι), x ∈ s → ((f ∘ ↑g) ∘ ↑g') a x ≤ ((f ∘ ↑g) ∘ ↑g') b x\na b : ℕ\nhab : a ≤ b\n⊢ (f ∘ ↑(RelEmbedding.trans g' g)) a x ≤ (f ∘ ↑(RelEmbedding.trans g' g)) b x ∧\n    ∀ (x : ι), x ∈ s → (f ∘ ↑(RelEmbedding.trans g' g)) a x ≤ (f ∘ ↑(RelEmbedding.trans g' g)) b x\n[PROOFSTEP]\nexact ⟨hg (OrderHomClass.mono g' hab), hg' hab⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\n⊢ WellFounded (Prod.Lex rα rβ on fun c => (f c, g c))\n[PROOFSTEP]\nrefine' (PSigma.lex_wf (wellFoundedOn_range.2 hα) fun a => hβ a).onFun.mono fun c c' h => _\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\n⊢ γ → (a : ↑(range f)) ×' ↑(f ⁻¹' {↑a})\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\nc c' : γ\nh : (Prod.Lex rα rβ on fun c => (f c, g c)) c c'\n⊢ ((PSigma.Lex (fun a b => rα ↑a ↑b) fun a a_1 b => (rβ on g) ↑a_1 ↑b) on ?refine'_1) c c'\n[PROOFSTEP]\nexact fun c => ⟨⟨_, c, rfl⟩, c, rfl⟩\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\nc c' : γ\nh : (Prod.Lex rα rβ on fun c => (f c, g c)) c c'\n⊢ ((PSigma.Lex (fun a b => rα ↑a ↑b) fun a a_1 b => (rβ on g) ↑a_1 ↑b) on fun c =>\n      { fst := { val := f c, property := (_ : ∃ y, f y = f c) }, snd := { val := c, property := (_ : f c = f c) } })\n    c c'\n[PROOFSTEP]\nobtain h' | h' := Prod.lex_iff.1 h\n[GOAL]\ncase refine'_2.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\nc c' : γ\nh : (Prod.Lex rα rβ on fun c => (f c, g c)) c c'\nh' : rα ((fun c => (f c, g c)) c).fst ((fun c => (f c, g c)) c').fst\n⊢ ((PSigma.Lex (fun a b => rα ↑a ↑b) fun a a_1 b => (rβ on g) ↑a_1 ↑b) on fun c =>\n      { fst := { val := f c, property := (_ : ∃ y, f y = f c) }, snd := { val := c, property := (_ : f c = f c) } })\n    c c'\n[PROOFSTEP]\nexact PSigma.Lex.left _ _ h'\n[GOAL]\ncase refine'_2.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\nc c' : γ\nh : (Prod.Lex rα rβ on fun c => (f c, g c)) c c'\nh' :\n  ((fun c => (f c, g c)) c).fst = ((fun c => (f c, g c)) c').fst ∧\n    rβ ((fun c => (f c, g c)) c).snd ((fun c => (f c, g c)) c').snd\n⊢ ((PSigma.Lex (fun a b => rα ↑a ↑b) fun a a_1 b => (rβ on g) ↑a_1 ↑b) on fun c =>\n      { fst := { val := f c, property := (_ : ∃ y, f y = f c) }, snd := { val := c, property := (_ : f c = f c) } })\n    c c'\n[PROOFSTEP]\ndsimp only [InvImage, (· on ·)] at h' ⊢\n[GOAL]\ncase refine'_2.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\nc c' : γ\nh : (Prod.Lex rα rβ on fun c => (f c, g c)) c c'\nh' : f c = f c' ∧ rβ (g c) (g c')\n⊢ PSigma.Lex (fun a b => rα ↑a ↑b) (fun a a_1 b => rβ (g ↑a_1) (g ↑b))\n    { fst := { val := f c, property := (_ : ∃ y, f y = f c) }, snd := { val := c, property := (_ : f c = f c) } }\n    { fst := { val := f c', property := (_ : ∃ y, f y = f c') }, snd := { val := c', property := (_ : f c' = f c') } }\n[PROOFSTEP]\nconvert PSigma.Lex.right (⟨_, c', rfl⟩ : range f) _ using 1\n[GOAL]\ncase h.e'_5.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\nc c' : γ\nh : (Prod.Lex rα rβ on fun c => (f c, g c)) c c'\nh' : f c = f c' ∧ rβ (g c) (g c')\n⊢ { fst := { val := f c, property := (_ : ∃ y, f y = f c) }, snd := { val := c, property := (_ : f c = f c) } } =\n    { fst := { val := f c', property := (_ : ∃ y, f y = f c') }, snd := ?refine'_2.inr.convert_4 }\ncase refine'_2.inr.convert_4\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\nc c' : γ\nh : (Prod.Lex rα rβ on fun c => (f c, g c)) c c'\nh' : f c = f c' ∧ rβ (g c) (g c')\n⊢ ↑(f ⁻¹' {↑{ val := f c', property := (_ : ∃ y, f y = f c') }})\ncase refine'_2.inr.convert_6\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\nc c' : γ\nh : (Prod.Lex rα rβ on fun c => (f c, g c)) c c'\nh' : f c = f c' ∧ rβ (g c) (g c')\n⊢ rβ (g ↑?refine'_2.inr.convert_4) (g ↑{ val := c', property := (_ : f c' = f c') })\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine'_2.inr.convert_4\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\nc c' : γ\nh : (Prod.Lex rα rβ on fun c => (f c, g c)) c c'\nh' : f c = f c' ∧ rβ (g c) (g c')\n⊢ ↑(f ⁻¹' {↑{ val := f c', property := (_ : ∃ y, f y = f c') }})\ncase h.e'_5.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\nc c' : γ\nh : (Prod.Lex rα rβ on fun c => (f c, g c)) c c'\nh' : f c = f c' ∧ rβ (g c) (g c')\n⊢ { fst := { val := f c, property := (_ : ∃ y, f y = f c) }, snd := { val := c, property := (_ : f c = f c) } } =\n    { fst := { val := f c', property := (_ : ∃ y, f y = f c') }, snd := ?refine'_2.inr.convert_4 }\ncase refine'_2.inr.convert_6\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFounded (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (f ⁻¹' {a}) (rβ on g)\nc c' : γ\nh : (Prod.Lex rα rβ on fun c => (f c, g c)) c c'\nh' : f c = f c' ∧ rβ (g c) (g c')\n⊢ rβ (g ↑?refine'_2.inr.convert_4) (g ↑{ val := c', property := (_ : f c' = f c') })\n[PROOFSTEP]\nexacts [⟨c, h'.1⟩, PSigma.subtype_ext (Subtype.ext h'.1) rfl, h'.2]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFoundedOn s (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (s ∩ f ⁻¹' {a}) (rβ on g)\n⊢ WellFoundedOn s (Prod.Lex rα rβ on fun c => (f c, g c))\n[PROOFSTEP]\nrefine' WellFounded.prod_lex_of_wellFoundedOn_fiber hα fun a ↦ (hβ a).onFun.mono (fun b c h ↦ _)\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFoundedOn s (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (s ∩ f ⁻¹' {a}) (rβ on g)\na : α\nb c : ↑((fun a => f ↑a) ⁻¹' {a})\nh : (rβ on fun a => g ↑a) ↑b ↑c\n⊢ ((fun a_1 b => (rβ on g) ↑a_1 ↑b) on ?refine'_2 a) b c\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFoundedOn s (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (s ∩ f ⁻¹' {a}) (rβ on g)\n⊢ (a : α) → ↑((fun a => f ↑a) ⁻¹' {a}) → ↑(s ∩ f ⁻¹' {a})\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFoundedOn s (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (s ∩ f ⁻¹' {a}) (rβ on g)\n⊢ (a : α) → ↑((fun a => f ↑a) ⁻¹' {a}) → ↑(s ∩ f ⁻¹' {a})\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFoundedOn s (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (s ∩ f ⁻¹' {a}) (rβ on g)\na : α\nb c : ↑((fun a => f ↑a) ⁻¹' {a})\nh : (rβ on fun a => g ↑a) ↑b ↑c\n⊢ ((fun a_1 b => (rβ on g) ↑a_1 ↑b) on ?refine'_2 a) b c\n[PROOFSTEP]\nexact fun _ x => ⟨x, x.1.2, x.2⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrα : α → α → Prop\nrβ : β → β → Prop\nf : γ → α\ng : γ → β\ns : Set γ\nhα : WellFoundedOn s (rα on f)\nhβ : ∀ (a : α), WellFoundedOn (s ∩ f ⁻¹' {a}) (rβ on g)\na : α\nb c : ↑((fun a => f ↑a) ⁻¹' {a})\nh : (rβ on fun a => g ↑a) ↑b ↑c\n⊢ ((fun a_1 b => (rβ on g) ↑a_1 ↑b) on fun x => { val := ↑↑x, property := (_ : ↑↑x ∈ s ∧ ↑↑x ∈ f ⁻¹' {a}) }) b c\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\n⊢ WellFounded (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c })\n[PROOFSTEP]\nrefine' (PSigma.lex_wf (wellFoundedOn_range.2 hι) fun a => hπ a).onFun.mono fun c c' h => _\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\n⊢ γ → (a : ↑(range f)) ×' ↑(f ⁻¹' {↑a})\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\n⊢ ((PSigma.Lex (fun a b => rι ↑a ↑b) fun a a_1 b => (rπ ↑a on g ↑a) ↑a_1 ↑b) on ?refine'_1) c c'\n[PROOFSTEP]\nexact fun c => ⟨⟨_, c, rfl⟩, c, rfl⟩\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\n⊢ ((PSigma.Lex (fun a b => rι ↑a ↑b) fun a a_1 b => (rπ ↑a on g ↑a) ↑a_1 ↑b) on fun c =>\n      { fst := { val := f c, property := (_ : ∃ y, f y = f c) }, snd := { val := c, property := (_ : f c = f c) } })\n    c c'\n[PROOFSTEP]\nobtain h' | ⟨h', h''⟩ := Sigma.lex_iff.1 h\n[GOAL]\ncase refine'_2.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\nh' : rι ((fun c => { fst := f c, snd := g (f c) c }) c).fst ((fun c => { fst := f c, snd := g (f c) c }) c').fst\n⊢ ((PSigma.Lex (fun a b => rι ↑a ↑b) fun a a_1 b => (rπ ↑a on g ↑a) ↑a_1 ↑b) on fun c =>\n      { fst := { val := f c, property := (_ : ∃ y, f y = f c) }, snd := { val := c, property := (_ : f c = f c) } })\n    c c'\n[PROOFSTEP]\nexact PSigma.Lex.left _ _ h'\n[GOAL]\ncase refine'_2.inr.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\nh' : ((fun c => { fst := f c, snd := g (f c) c }) c).fst = ((fun c => { fst := f c, snd := g (f c) c }) c').fst\nh'' :\n  rπ ((fun c => { fst := f c, snd := g (f c) c }) c').fst (h' ▸ ((fun c => { fst := f c, snd := g (f c) c }) c).snd)\n    ((fun c => { fst := f c, snd := g (f c) c }) c').snd\n⊢ ((PSigma.Lex (fun a b => rι ↑a ↑b) fun a a_1 b => (rπ ↑a on g ↑a) ↑a_1 ↑b) on fun c =>\n      { fst := { val := f c, property := (_ : ∃ y, f y = f c) }, snd := { val := c, property := (_ : f c = f c) } })\n    c c'\n[PROOFSTEP]\ndsimp only [InvImage, (· on ·)] at h' ⊢\n[GOAL]\ncase refine'_2.inr.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\nh' : f c = f c'\nh'' :\n  rπ ((fun c => { fst := f c, snd := g (f c) c }) c').fst (h' ▸ ((fun c => { fst := f c, snd := g (f c) c }) c).snd)\n    ((fun c => { fst := f c, snd := g (f c) c }) c').snd\n⊢ PSigma.Lex (fun a b => rι ↑a ↑b) (fun a a_1 b => rπ (↑a) (g ↑a ↑a_1) (g ↑a ↑b))\n    { fst := { val := f c, property := (_ : ∃ y, f y = f c) }, snd := { val := c, property := (_ : f c = f c) } }\n    { fst := { val := f c', property := (_ : ∃ y, f y = f c') }, snd := { val := c', property := (_ : f c' = f c') } }\n[PROOFSTEP]\nconvert PSigma.Lex.right (⟨_, c', rfl⟩ : range f) _ using 1\n[GOAL]\ncase h.e'_5.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\nh' : f c = f c'\nh'' :\n  rπ ((fun c => { fst := f c, snd := g (f c) c }) c').fst (h' ▸ ((fun c => { fst := f c, snd := g (f c) c }) c).snd)\n    ((fun c => { fst := f c, snd := g (f c) c }) c').snd\n⊢ { fst := { val := f c, property := (_ : ∃ y, f y = f c) }, snd := { val := c, property := (_ : f c = f c) } } =\n    { fst := { val := f c', property := (_ : ∃ y, f y = f c') }, snd := ?refine'_2.inr.intro.convert_4 }\ncase refine'_2.inr.intro.convert_4\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\nh' : f c = f c'\nh'' :\n  rπ ((fun c => { fst := f c, snd := g (f c) c }) c').fst (h' ▸ ((fun c => { fst := f c, snd := g (f c) c }) c).snd)\n    ((fun c => { fst := f c, snd := g (f c) c }) c').snd\n⊢ ↑(f ⁻¹' {↑{ val := f c', property := (_ : ∃ y, f y = f c') }})\ncase refine'_2.inr.intro.convert_6\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\nh' : f c = f c'\nh'' :\n  rπ ((fun c => { fst := f c, snd := g (f c) c }) c').fst (h' ▸ ((fun c => { fst := f c, snd := g (f c) c }) c).snd)\n    ((fun c => { fst := f c, snd := g (f c) c }) c').snd\n⊢ rπ (↑{ val := f c', property := (_ : ∃ y, f y = f c') })\n    (g ↑{ val := f c', property := (_ : ∃ y, f y = f c') } ↑?refine'_2.inr.intro.convert_4)\n    (g ↑{ val := f c', property := (_ : ∃ y, f y = f c') } ↑{ val := c', property := (_ : f c' = f c') })\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine'_2.inr.intro.convert_4\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\nh' : f c = f c'\nh'' :\n  rπ ((fun c => { fst := f c, snd := g (f c) c }) c').fst (h' ▸ ((fun c => { fst := f c, snd := g (f c) c }) c).snd)\n    ((fun c => { fst := f c, snd := g (f c) c }) c').snd\n⊢ ↑(f ⁻¹' {↑{ val := f c', property := (_ : ∃ y, f y = f c') }})\n[PROOFSTEP]\nexact ⟨c, h'⟩\n[GOAL]\ncase h.e'_5.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\nh' : f c = f c'\nh'' :\n  rπ ((fun c => { fst := f c, snd := g (f c) c }) c').fst (h' ▸ ((fun c => { fst := f c, snd := g (f c) c }) c).snd)\n    ((fun c => { fst := f c, snd := g (f c) c }) c').snd\n⊢ { fst := { val := f c, property := (_ : ∃ y, f y = f c) }, snd := { val := c, property := (_ : f c = f c) } } =\n    { fst := { val := f c', property := (_ : ∃ y, f y = f c') }, snd := { val := c, property := h' } }\n[PROOFSTEP]\nexact PSigma.subtype_ext (Subtype.ext h') rfl\n[GOAL]\ncase refine'_2.inr.intro.convert_6\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\nh' : f c = f c'\nh'' :\n  rπ ((fun c => { fst := f c, snd := g (f c) c }) c').fst (h' ▸ ((fun c => { fst := f c, snd := g (f c) c }) c).snd)\n    ((fun c => { fst := f c, snd := g (f c) c }) c').snd\n⊢ rπ (↑{ val := f c', property := (_ : ∃ y, f y = f c') })\n    (g ↑{ val := f c', property := (_ : ∃ y, f y = f c') } ↑{ val := c, property := h' })\n    (g ↑{ val := f c', property := (_ : ∃ y, f y = f c') } ↑{ val := c', property := (_ : f c' = f c') })\n[PROOFSTEP]\ndsimp only [Subtype.coe_mk] at *\n[GOAL]\ncase refine'_2.inr.intro.convert_6\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\nh' : f c = f c'\nh'' : rπ (f c') (h' ▸ g (f c) c) (g (f c') c')\n⊢ rπ (f c') (g (f c') c) (g (f c') c')\n[PROOFSTEP]\nrevert h'\n[GOAL]\ncase refine'_2.inr.intro.convert_6\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\n⊢ ∀ (h' : f c = f c'), rπ (f c') (h' ▸ g (f c) c) (g (f c') c') → rπ (f c') (g (f c') c) (g (f c') c')\n[PROOFSTEP]\ngeneralize f c = d\n[GOAL]\ncase refine'_2.inr.intro.convert_6\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\nd : ι\n⊢ ∀ (h' : d = f c'), rπ (f c') (h' ▸ g d c) (g (f c') c') → rπ (f c') (g (f c') c) (g (f c') c')\n[PROOFSTEP]\nrintro rfl h''\n[GOAL]\ncase refine'_2.inr.intro.convert_6\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFounded (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (f ⁻¹' {i}) (rπ i on g i)\nc c' : γ\nh : (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c }) c c'\nh'' : rπ (f c') ((_ : f c' = f c') ▸ g (f c') c) (g (f c') c')\n⊢ rπ (f c') (g (f c') c) (g (f c') c')\n[PROOFSTEP]\nexact h''\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFoundedOn s (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (s ∩ f ⁻¹' {i}) (rπ i on g i)\n⊢ WellFoundedOn s (Sigma.Lex rι rπ on fun c => { fst := f c, snd := g (f c) c })\n[PROOFSTEP]\nshow WellFounded (Sigma.Lex rι rπ on fun c : s => ⟨f c, g (f c) c⟩)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFoundedOn s (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (s ∩ f ⁻¹' {i}) (rπ i on g i)\n⊢ WellFounded (Sigma.Lex rι rπ on fun c => { fst := f ↑c, snd := g (f ↑c) ↑c })\n[PROOFSTEP]\nrefine'\n  @WellFounded.sigma_lex_of_wellFoundedOn_fiber _ s _ _ rπ (fun c => f c) (fun i c => g _ c) hι fun i =>\n    (hπ i).onFun.mono (fun b c h => _)\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFoundedOn s (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (s ∩ f ⁻¹' {i}) (rπ i on g i)\ni : ι\nb c : ↑((fun c => f ↑c) ⁻¹' {i})\nh : (rπ i on (fun i c => g i ↑c) i) ↑b ↑c\n⊢ ((fun a b => (rπ i on g i) ↑a ↑b) on ?refine'_2 i) b c\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFoundedOn s (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (s ∩ f ⁻¹' {i}) (rπ i on g i)\n⊢ (i : ι) → ↑((fun c => f ↑c) ⁻¹' {i}) → ↑(s ∩ f ⁻¹' {i})\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFoundedOn s (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (s ∩ f ⁻¹' {i}) (rπ i on g i)\n⊢ (i : ι) → ↑((fun c => f ↑c) ⁻¹' {i}) → ↑(s ∩ f ⁻¹' {i})\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFoundedOn s (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (s ∩ f ⁻¹' {i}) (rπ i on g i)\ni : ι\nb c : ↑((fun c => f ↑c) ⁻¹' {i})\nh : (rπ i on (fun i c => g i ↑c) i) ↑b ↑c\n⊢ ((fun a b => (rπ i on g i) ↑a ↑b) on ?refine'_2 i) b c\n[PROOFSTEP]\nexact fun _ x => ⟨x, x.1.2, x.2⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nπ : ι → Type u_5\nrι : ι → ι → Prop\nrπ : (i : ι) → π i → π i → Prop\nf : γ → ι\ng : (i : ι) → γ → π i\ns : Set γ\nhι : WellFoundedOn s (rι on f)\nhπ : ∀ (i : ι), WellFoundedOn (s ∩ f ⁻¹' {i}) (rπ i on g i)\ni : ι\nb c : ↑((fun c => f ↑c) ⁻¹' {i})\nh : (rπ i on (fun i c => g i ↑c) i) ↑b ↑c\n⊢ ((fun a b => (rπ i on g i) ↑a ↑b) on fun x => { val := ↑↑x, property := (_ : ↑↑x ∈ s ∧ ↑↑x ∈ f ⁻¹' {i}) }) b c\n[PROOFSTEP]\nassumption\n", "meta": {"mathlib_filename": "Mathlib.Order.WellFoundedSet", "llama_tokens": 69957, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.752012562644147, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.39947612217138995}}
{"text": "[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\n⊢ StrongRankCondition R\n[PROOFSTEP]\nsuffices ∀ n, ∀ f : (Fin (n + 1) → R) →ₗ[R] Fin n → R, ¬Injective f by rwa [strongRankCondition_iff_succ R]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nthis : ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Injective ↑f\n⊢ StrongRankCondition R\n[PROOFSTEP]\nrwa [strongRankCondition_iff_succ R]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\n⊢ ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Injective ↑f\n[PROOFSTEP]\nintro n f\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\n⊢ ¬Injective ↑f\n[PROOFSTEP]\nby_contra hf\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\n⊢ False\n[PROOFSTEP]\nlet g : (Fin (n + 1) → R) →ₗ[R] Fin (n + 1) → R := (ExtendByZero.linearMap R castSucc).comp f\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\ng : (Fin (n + 1) → R) →ₗ[R] Fin (n + 1) → R := LinearMap.comp (ExtendByZero.linearMap R castSucc) f\n⊢ False\n[PROOFSTEP]\nhave hg : Injective g := (extend_injective Fin.strictMono_castSucc.injective _).comp hf\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\ng : (Fin (n + 1) → R) →ₗ[R] Fin (n + 1) → R := LinearMap.comp (ExtendByZero.linearMap R castSucc) f\nhg : Injective ↑g\n⊢ False\n[PROOFSTEP]\nhave hnex : ¬∃ i : Fin n, castSucc i = last n := fun ⟨i, hi⟩ => ne_of_lt (castSucc_lt_last i) hi\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\ng : (Fin (n + 1) → R) →ₗ[R] Fin (n + 1) → R := LinearMap.comp (ExtendByZero.linearMap R castSucc) f\nhg : Injective ↑g\nhnex : ¬∃ i, castSucc i = last n\n⊢ False\n[PROOFSTEP]\nlet a₀ := (minpoly R g).coeff 0\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\ng : (Fin (n + 1) → R) →ₗ[R] Fin (n + 1) → R := LinearMap.comp (ExtendByZero.linearMap R castSucc) f\nhg : Injective ↑g\nhnex : ¬∃ i, castSucc i = last n\na₀ : R := coeff (minpoly R g) 0\n⊢ False\n[PROOFSTEP]\nhave : a₀ ≠ 0 := minpoly_coeff_zero_of_injective hg\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\ng : (Fin (n + 1) → R) →ₗ[R] Fin (n + 1) → R := LinearMap.comp (ExtendByZero.linearMap R castSucc) f\nhg : Injective ↑g\nhnex : ¬∃ i, castSucc i = last n\na₀ : R := coeff (minpoly R g) 0\nthis : a₀ ≠ 0\n⊢ False\n[PROOFSTEP]\nhave : a₀ = 0 := by\n  -- Evaluate `(minpoly R g) g` at the vector `(0,...,0,1)`\n  have heval := LinearMap.congr_fun (minpoly.aeval R g) (Pi.single (Fin.last n) 1)\n  obtain ⟨P, hP⟩ := X_dvd_iff.2 (erase_same (minpoly R g) 0)\n  rw [← monomial_add_erase (minpoly R g) 0, hP] at heval \n  replace heval :=\n    congr_fun heval\n      (Fin.last n)\n        -- Porting note: ...it's just that this line gives a timeout without slightly raising heartbeats\n  simpa [hnex] using heval\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\ng : (Fin (n + 1) → R) →ₗ[R] Fin (n + 1) → R := LinearMap.comp (ExtendByZero.linearMap R castSucc) f\nhg : Injective ↑g\nhnex : ¬∃ i, castSucc i = last n\na₀ : R := coeff (minpoly R g) 0\nthis : a₀ ≠ 0\n⊢ a₀ = 0\n[PROOFSTEP]\nhave heval := LinearMap.congr_fun (minpoly.aeval R g) (Pi.single (Fin.last n) 1)\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\ng : (Fin (n + 1) → R) →ₗ[R] Fin (n + 1) → R := LinearMap.comp (ExtendByZero.linearMap R castSucc) f\nhg : Injective ↑g\nhnex : ¬∃ i, castSucc i = last n\na₀ : R := coeff (minpoly R g) 0\nthis : a₀ ≠ 0\nheval : ↑(↑(aeval g) (minpoly R g)) (Pi.single (last n) 1) = ↑0 (Pi.single (last n) 1)\n⊢ a₀ = 0\n[PROOFSTEP]\nobtain ⟨P, hP⟩ := X_dvd_iff.2 (erase_same (minpoly R g) 0)\n[GOAL]\ncase intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\ng : (Fin (n + 1) → R) →ₗ[R] Fin (n + 1) → R := LinearMap.comp (ExtendByZero.linearMap R castSucc) f\nhg : Injective ↑g\nhnex : ¬∃ i, castSucc i = last n\na₀ : R := coeff (minpoly R g) 0\nthis : a₀ ≠ 0\nheval : ↑(↑(aeval g) (minpoly R g)) (Pi.single (last n) 1) = ↑0 (Pi.single (last n) 1)\nP : R[X]\nhP : erase 0 (minpoly R g) = X * P\n⊢ a₀ = 0\n[PROOFSTEP]\nrw [← monomial_add_erase (minpoly R g) 0, hP] at heval \n[GOAL]\ncase intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\ng : (Fin (n + 1) → R) →ₗ[R] Fin (n + 1) → R := LinearMap.comp (ExtendByZero.linearMap R castSucc) f\nhg : Injective ↑g\nhnex : ¬∃ i, castSucc i = last n\na₀ : R := coeff (minpoly R g) 0\nthis : a₀ ≠ 0\nP : R[X]\nheval : ↑(↑(aeval g) (↑(monomial 0) (coeff (minpoly R g) 0) + X * P)) (Pi.single (last n) 1) = ↑0 (Pi.single (last n) 1)\nhP : erase 0 (minpoly R g) = X * P\n⊢ a₀ = 0\n[PROOFSTEP]\nreplace heval :=\n  congr_fun heval\n    (Fin.last n)\n      -- Porting note: ...it's just that this line gives a timeout without slightly raising heartbeats\n[GOAL]\ncase intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\ng : (Fin (n + 1) → R) →ₗ[R] Fin (n + 1) → R := LinearMap.comp (ExtendByZero.linearMap R castSucc) f\nhg : Injective ↑g\nhnex : ¬∃ i, castSucc i = last n\na₀ : R := coeff (minpoly R g) 0\nthis : a₀ ≠ 0\nP : R[X]\nhP : erase 0 (minpoly R g) = X * P\nheval :\n  ↑(↑(aeval g) (↑(monomial 0) (coeff (minpoly R g) 0) + X * P)) (Pi.single (last n) 1) (last n) =\n    ↑0 (Pi.single (last n) 1) (last n)\n⊢ a₀ = 0\n[PROOFSTEP]\nsimpa [hnex] using heval\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\ng : (Fin (n + 1) → R) →ₗ[R] Fin (n + 1) → R := LinearMap.comp (ExtendByZero.linearMap R castSucc) f\nhg : Injective ↑g\nhnex : ¬∃ i, castSucc i = last n\na₀ : R := coeff (minpoly R g) 0\nthis✝ : a₀ ≠ 0\nthis : a₀ = 0\n⊢ False\n[PROOFSTEP]\ncontradiction\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.FreeModule.StrongRankCondition", "llama_tokens": 3121, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7154239957834733, "lm_q2_score": 0.5583269943353744, "lm_q1q2_score": 0.39944052924119017}}
{"text": "[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ LeftInverse (Polynomial.eval₂ C (X PUnit.unit)) (eval₂ Polynomial.C fun x => Polynomial.X)\n[PROOFSTEP]\nlet f : R[X] →+* MvPolynomial PUnit R := Polynomial.eval₂RingHom MvPolynomial.C (X PUnit.unit)\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nf : R[X] →+* MvPolynomial PUnit R := eval₂RingHom C (X PUnit.unit)\n⊢ LeftInverse (Polynomial.eval₂ C (X PUnit.unit)) (eval₂ Polynomial.C fun x => Polynomial.X)\n[PROOFSTEP]\nlet g : MvPolynomial PUnit R →+* R[X] := eval₂Hom Polynomial.C fun _ => Polynomial.X\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nf : R[X] →+* MvPolynomial PUnit R := eval₂RingHom C (X PUnit.unit)\ng : MvPolynomial PUnit R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X\n⊢ LeftInverse (Polynomial.eval₂ C (X PUnit.unit)) (eval₂ Polynomial.C fun x => Polynomial.X)\n[PROOFSTEP]\nshow ∀ p, f.comp g p = p\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nf : R[X] →+* MvPolynomial PUnit R := eval₂RingHom C (X PUnit.unit)\ng : MvPolynomial PUnit R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X\n⊢ ∀ (p : MvPolynomial PUnit R), ↑(RingHom.comp f g) p = p\n[PROOFSTEP]\napply is_id\n[GOAL]\ncase hC\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nf : R[X] →+* MvPolynomial PUnit R := eval₂RingHom C (X PUnit.unit)\ng : MvPolynomial PUnit R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X\n⊢ RingHom.comp (RingHom.comp f g) C = C\n[PROOFSTEP]\next a\n[GOAL]\ncase hC.a.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na✝ a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nf : R[X] →+* MvPolynomial PUnit R := eval₂RingHom C (X PUnit.unit)\ng : MvPolynomial PUnit R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X\na : R\nm✝ : PUnit →₀ ℕ\n⊢ coeff m✝ (↑(RingHom.comp (RingHom.comp f g) C) a) = coeff m✝ (↑C a)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase hC.a.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na✝ a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nf : R[X] →+* MvPolynomial PUnit R := eval₂RingHom C (X PUnit.unit)\ng : MvPolynomial PUnit R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X\na : R\nm✝ : PUnit →₀ ℕ\n⊢ coeff m✝ (Polynomial.eval₂ C (X PUnit.unit) (eval₂ Polynomial.C (fun x => Polynomial.X) (↑C a))) = coeff m✝ (↑C a)\n[PROOFSTEP]\nrw [eval₂_C, Polynomial.eval₂_C]\n[GOAL]\ncase hX\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nf : R[X] →+* MvPolynomial PUnit R := eval₂RingHom C (X PUnit.unit)\ng : MvPolynomial PUnit R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X\n⊢ ∀ (n : PUnit), ↑(RingHom.comp f g) (X n) = X n\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase hX.unit\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nf : R[X] →+* MvPolynomial PUnit R := eval₂RingHom C (X PUnit.unit)\ng : MvPolynomial PUnit R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X\n⊢ ↑(RingHom.comp f g) (X PUnit.unit) = X PUnit.unit\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase hX.unit\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nf : R[X] →+* MvPolynomial PUnit R := eval₂RingHom C (X PUnit.unit)\ng : MvPolynomial PUnit R →+* R[X] := eval₂Hom Polynomial.C fun x => Polynomial.X\n⊢ Polynomial.eval₂ C (X PUnit.unit) (eval₂ Polynomial.C (fun x => Polynomial.X) (X PUnit.unit)) = X PUnit.unit\n[PROOFSTEP]\nrw [eval₂_X, Polynomial.eval₂_X]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na✝ a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\np : R[X]\na : R\n⊢ eval₂ Polynomial.C (fun x => Polynomial.X) (Polynomial.eval₂ C (X PUnit.unit) (↑Polynomial.C a)) = ↑Polynomial.C a\n[PROOFSTEP]\nrw [Polynomial.eval₂_C, MvPolynomial.eval₂_C]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\np✝ p q : R[X]\nhp : eval₂ Polynomial.C (fun x => Polynomial.X) (Polynomial.eval₂ C (X PUnit.unit) p) = p\nhq : eval₂ Polynomial.C (fun x => Polynomial.X) (Polynomial.eval₂ C (X PUnit.unit) q) = q\n⊢ eval₂ Polynomial.C (fun x => Polynomial.X) (Polynomial.eval₂ C (X PUnit.unit) (p + q)) = p + q\n[PROOFSTEP]\nrw [Polynomial.eval₂_add, MvPolynomial.eval₂_add, hp, hq]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\np✝ : R[X]\np : ℕ\nn : R\nx✝ :\n  eval₂ Polynomial.C (fun x => Polynomial.X) (Polynomial.eval₂ C (X PUnit.unit) (↑Polynomial.C n * Polynomial.X ^ p)) =\n    ↑Polynomial.C n * Polynomial.X ^ p\n⊢ eval₂ Polynomial.C (fun x => Polynomial.X)\n      (Polynomial.eval₂ C (X PUnit.unit) (↑Polynomial.C n * Polynomial.X ^ (p + 1))) =\n    ↑Polynomial.C n * Polynomial.X ^ (p + 1)\n[PROOFSTEP]\nrw [Polynomial.eval₂_mul, Polynomial.eval₂_pow, Polynomial.eval₂_X, Polynomial.eval₂_C, eval₂_mul, eval₂_C, eval₂_pow,\n  eval₂_X]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne✝ : ℕ\ns : σ →₀ ℕ\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S₁\ninst✝¹ : CommSemiring S₂\ninst✝ : CommSemiring S₃\ne : S₁ ≃+* S₂\nf : S₂ ≃+* S₃\np : MvPolynomial σ S₁\n⊢ ↑(RingEquiv.trans (mapEquiv σ e) (mapEquiv σ f)) p = ↑(mapEquiv σ (RingEquiv.trans e f)) p\n[PROOFSTEP]\nsimp only [RingEquiv.coe_trans, comp_apply, mapEquiv_apply, RingEquiv.coe_ringHom_trans, map_map]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne✝ : ℕ\ns : σ →₀ ℕ\ninst✝⁶ : CommSemiring R\nA₁ : Type u_2\nA₂ : Type u_3\nA₃ : Type u_4\ninst✝⁵ : CommSemiring A₁\ninst✝⁴ : CommSemiring A₂\ninst✝³ : CommSemiring A₃\ninst✝² : Algebra R A₁\ninst✝¹ : Algebra R A₂\ninst✝ : Algebra R A₃\ne : A₁ ≃ₐ[R] A₂\nf : A₂ ≃ₐ[R] A₃\n⊢ AlgEquiv.trans (mapAlgEquiv σ e) (mapAlgEquiv σ f) = mapAlgEquiv σ (AlgEquiv.trans e f)\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne✝ : ℕ\ns : σ →₀ ℕ\ninst✝⁶ : CommSemiring R\nA₁ : Type u_2\nA₂ : Type u_3\nA₃ : Type u_4\ninst✝⁵ : CommSemiring A₁\ninst✝⁴ : CommSemiring A₂\ninst✝³ : CommSemiring A₃\ninst✝² : Algebra R A₁\ninst✝¹ : Algebra R A₂\ninst✝ : Algebra R A₃\ne : A₁ ≃ₐ[R] A₂\nf : A₂ ≃ₐ[R] A₃\na✝ : MvPolynomial σ A₁\nm✝ : σ →₀ ℕ\n⊢ coeff m✝ (↑(AlgEquiv.trans (mapAlgEquiv σ e) (mapAlgEquiv σ f)) a✝) =\n    coeff m✝ (↑(mapAlgEquiv σ (AlgEquiv.trans e f)) a✝)\n[PROOFSTEP]\nsimp only [AlgEquiv.trans_apply, mapAlgEquiv_apply, map_map]\n[GOAL]\ncase h.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne✝ : ℕ\ns : σ →₀ ℕ\ninst✝⁶ : CommSemiring R\nA₁ : Type u_2\nA₂ : Type u_3\nA₃ : Type u_4\ninst✝⁵ : CommSemiring A₁\ninst✝⁴ : CommSemiring A₂\ninst✝³ : CommSemiring A₃\ninst✝² : Algebra R A₁\ninst✝¹ : Algebra R A₂\ninst✝ : Algebra R A₃\ne : A₁ ≃ₐ[R] A₂\nf : A₂ ≃ₐ[R] A₃\na✝ : MvPolynomial σ A₁\nm✝ : σ →₀ ℕ\n⊢ coeff m✝ (↑(map (RingHom.comp ↑f ↑e)) a✝) = coeff m✝ (↑(map ↑(AlgEquiv.trans e f)) a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nhe : IsEmpty σ\n⊢ AlgHom.comp (aeval fun a => IsEmpty.elim he a) (Algebra.ofId R (MvPolynomial σ R)) = AlgHom.id R R\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nhe : IsEmpty σ\nx✝ : R\n⊢ ↑(AlgHom.comp (aeval fun a => IsEmpty.elim he a) (Algebra.ofId R (MvPolynomial σ R))) x✝ = ↑(AlgHom.id R R) x✝\n[PROOFSTEP]\nsimp [Algebra.ofId_apply, algebraMap_eq]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nhe : IsEmpty σ\n⊢ AlgHom.comp (Algebra.ofId R (MvPolynomial σ R)) (aeval fun a => IsEmpty.elim he a) = AlgHom.id R (MvPolynomial σ R)\n[PROOFSTEP]\next i m\n[GOAL]\ncase hf.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nhe : IsEmpty σ\ni : σ\nm : σ →₀ ℕ\n⊢ coeff m (↑(AlgHom.comp (Algebra.ofId R (MvPolynomial σ R)) (aeval fun a => IsEmpty.elim he a)) (X i)) =\n    coeff m (↑(AlgHom.id R (MvPolynomial σ R)) (X i))\n[PROOFSTEP]\nexact IsEmpty.elim' he i\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ MvPolynomial (S₁ ⊕ S₂) R ≃+* MvPolynomial S₁ (MvPolynomial S₂ R)\n[PROOFSTEP]\napply mvPolynomialEquivMvPolynomial R (Sum S₁ S₂) _ _ (sumToIter R S₁ S₂) (iterToSum R S₁ S₂)\n[GOAL]\ncase hfgC\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ RingHom.comp (RingHom.comp (sumToIter R S₁ S₂) (iterToSum R S₁ S₂)) C = C\n[PROOFSTEP]\nrefine RingHom.ext (hom_eq_hom _ _ ?hC ?hX)\n[GOAL]\ncase hC\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ RingHom.comp (RingHom.comp (RingHom.comp (sumToIter R S₁ S₂) (iterToSum R S₁ S₂)) C) C = RingHom.comp C C\ncase hX\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ ∀ (n : S₂), ↑(RingHom.comp (RingHom.comp (sumToIter R S₁ S₂) (iterToSum R S₁ S₂)) C) (X n) = ↑C (X n)\n[PROOFSTEP]\ncase hC => ext1; simp only [RingHom.comp_apply, iterToSum_C_C, sumToIter_C]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ RingHom.comp (RingHom.comp (RingHom.comp (sumToIter R S₁ S₂) (iterToSum R S₁ S₂)) C) C = RingHom.comp C C\n[PROOFSTEP]\ncase hC => ext1; simp only [RingHom.comp_apply, iterToSum_C_C, sumToIter_C]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ RingHom.comp (RingHom.comp (RingHom.comp (sumToIter R S₁ S₂) (iterToSum R S₁ S₂)) C) C = RingHom.comp C C\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nx✝ : R\n⊢ ↑(RingHom.comp (RingHom.comp (RingHom.comp (sumToIter R S₁ S₂) (iterToSum R S₁ S₂)) C) C) x✝ = ↑(RingHom.comp C C) x✝\n[PROOFSTEP]\nsimp only [RingHom.comp_apply, iterToSum_C_C, sumToIter_C]\n[GOAL]\ncase hX\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ ∀ (n : S₂), ↑(RingHom.comp (RingHom.comp (sumToIter R S₁ S₂) (iterToSum R S₁ S₂)) C) (X n) = ↑C (X n)\n[PROOFSTEP]\ncase hX => intro; simp only [RingHom.comp_apply, iterToSum_C_X, sumToIter_Xr]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ ∀ (n : S₂), ↑(RingHom.comp (RingHom.comp (sumToIter R S₁ S₂) (iterToSum R S₁ S₂)) C) (X n) = ↑C (X n)\n[PROOFSTEP]\ncase hX => intro; simp only [RingHom.comp_apply, iterToSum_C_X, sumToIter_Xr]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ ∀ (n : S₂), ↑(RingHom.comp (RingHom.comp (sumToIter R S₁ S₂) (iterToSum R S₁ S₂)) C) (X n) = ↑C (X n)\n[PROOFSTEP]\nintro\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn✝ : S₂\n⊢ ↑(RingHom.comp (RingHom.comp (sumToIter R S₁ S₂) (iterToSum R S₁ S₂)) C) (X n✝) = ↑C (X n✝)\n[PROOFSTEP]\nsimp only [RingHom.comp_apply, iterToSum_C_X, sumToIter_Xr]\n[GOAL]\ncase hfgX\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ ∀ (n : S₁), ↑(sumToIter R S₁ S₂) (↑(iterToSum R S₁ S₂) (X n)) = X n\n[PROOFSTEP]\nsimp [iterToSum_X, sumToIter_Xl]\n[GOAL]\ncase hgfC\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ RingHom.comp (RingHom.comp (iterToSum R S₁ S₂) (sumToIter R S₁ S₂)) C = C\n[PROOFSTEP]\next1\n[GOAL]\ncase hgfC.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nx✝ : R\n⊢ ↑(RingHom.comp (RingHom.comp (iterToSum R S₁ S₂) (sumToIter R S₁ S₂)) C) x✝ = ↑C x✝\n[PROOFSTEP]\nsimp only [RingHom.comp_apply, sumToIter_C, iterToSum_C_C]\n[GOAL]\ncase hgfX\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ ∀ (n : S₁ ⊕ S₂), ↑(iterToSum R S₁ S₂) (↑(sumToIter R S₁ S₂) (X n)) = X n\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase hgfX.inl\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nval✝ : S₁\n⊢ ↑(iterToSum R S₁ S₂) (↑(sumToIter R S₁ S₂) (X (Sum.inl val✝))) = X (Sum.inl val✝)\n[PROOFSTEP]\nsimp only [sumToIter_Xl, iterToSum_X, sumToIter_Xr, iterToSum_C_X]\n[GOAL]\ncase hgfX.inr\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nval✝ : S₂\n⊢ ↑(iterToSum R S₁ S₂) (↑(sumToIter R S₁ S₂) (X (Sum.inr val✝))) = X (Sum.inr val✝)\n[PROOFSTEP]\nsimp only [sumToIter_Xl, iterToSum_X, sumToIter_Xr, iterToSum_C_X]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nsrc✝ : MvPolynomial (S₁ ⊕ S₂) R ≃+* MvPolynomial S₁ (MvPolynomial S₂ R) := sumRingEquiv R S₁ S₂\n⊢ ∀ (r : R),\n    Equiv.toFun src✝.toEquiv (↑(algebraMap R (MvPolynomial (S₁ ⊕ S₂) R)) r) =\n      ↑(algebraMap R (MvPolynomial S₁ (MvPolynomial S₂ R))) r\n[PROOFSTEP]\nintro r\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nsrc✝ : MvPolynomial (S₁ ⊕ S₂) R ≃+* MvPolynomial S₁ (MvPolynomial S₂ R) := sumRingEquiv R S₁ S₂\nr : R\n⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R (MvPolynomial (S₁ ⊕ S₂) R)) r) =\n    ↑(algebraMap R (MvPolynomial S₁ (MvPolynomial S₂ R))) r\n[PROOFSTEP]\nhave A : algebraMap R (MvPolynomial S₁ (MvPolynomial S₂ R)) r = (C (C r) : _) := by rfl\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nsrc✝ : MvPolynomial (S₁ ⊕ S₂) R ≃+* MvPolynomial S₁ (MvPolynomial S₂ R) := sumRingEquiv R S₁ S₂\nr : R\n⊢ ↑(algebraMap R (MvPolynomial S₁ (MvPolynomial S₂ R))) r = ↑C (↑C r)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nsrc✝ : MvPolynomial (S₁ ⊕ S₂) R ≃+* MvPolynomial S₁ (MvPolynomial S₂ R) := sumRingEquiv R S₁ S₂\nr : R\nA : ↑(algebraMap R (MvPolynomial S₁ (MvPolynomial S₂ R))) r = ↑C (↑C r)\n⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R (MvPolynomial (S₁ ⊕ S₂) R)) r) =\n    ↑(algebraMap R (MvPolynomial S₁ (MvPolynomial S₂ R))) r\n[PROOFSTEP]\nhave B : algebraMap R (MvPolynomial (Sum S₁ S₂) R) r = C r := by rfl\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nsrc✝ : MvPolynomial (S₁ ⊕ S₂) R ≃+* MvPolynomial S₁ (MvPolynomial S₂ R) := sumRingEquiv R S₁ S₂\nr : R\nA : ↑(algebraMap R (MvPolynomial S₁ (MvPolynomial S₂ R))) r = ↑C (↑C r)\n⊢ ↑(algebraMap R (MvPolynomial (S₁ ⊕ S₂) R)) r = ↑C r\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nsrc✝ : MvPolynomial (S₁ ⊕ S₂) R ≃+* MvPolynomial S₁ (MvPolynomial S₂ R) := sumRingEquiv R S₁ S₂\nr : R\nA : ↑(algebraMap R (MvPolynomial S₁ (MvPolynomial S₂ R))) r = ↑C (↑C r)\nB : ↑(algebraMap R (MvPolynomial (S₁ ⊕ S₂) R)) r = ↑C r\n⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R (MvPolynomial (S₁ ⊕ S₂) R)) r) =\n    ↑(algebraMap R (MvPolynomial S₁ (MvPolynomial S₂ R))) r\n[PROOFSTEP]\nsimp only [sumRingEquiv, mvPolynomialEquivMvPolynomial, Equiv.toFun_as_coe_apply, Equiv.coe_fn_mk, B, sumToIter_C, A]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ AlgHom.comp (aeval fun o => Option.elim o Polynomial.X fun s => ↑Polynomial.C (X s))\n      (Polynomial.aevalTower (rename Option.some) (X none)) =\n    AlgHom.id R (MvPolynomial S₁ R)[X]\n[PROOFSTEP]\next : 2\n[GOAL]\ncase h₁.hf\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni✝ : S₁\n⊢ ↑(AlgHom.comp\n          (AlgHom.comp (aeval fun o => Option.elim o Polynomial.X fun s => ↑Polynomial.C (X s))\n            (Polynomial.aevalTower (rename Option.some) (X none)))\n          (IsScalarTower.toAlgHom R (MvPolynomial S₁ R) (MvPolynomial S₁ R)[X]))\n      (X i✝) =\n    ↑(AlgHom.comp (AlgHom.id R (MvPolynomial S₁ R)[X])\n          (IsScalarTower.toAlgHom R (MvPolynomial S₁ R) (MvPolynomial S₁ R)[X]))\n      (X i✝)\n[PROOFSTEP]\nsimp [← Polynomial.C_eq_algebraMap]\n[GOAL]\ncase h₂.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn✝ : ℕ\n⊢ Polynomial.coeff\n      (↑(AlgHom.comp (aeval fun o => Option.elim o Polynomial.X fun s => ↑Polynomial.C (X s))\n            (Polynomial.aevalTower (rename Option.some) (X none)))\n        Polynomial.X)\n      n✝ =\n    Polynomial.coeff (↑(AlgHom.id R (MvPolynomial S₁ R)[X]) Polynomial.X) n✝\n[PROOFSTEP]\nsimp [← Polynomial.C_eq_algebraMap]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ AlgHom.comp (Polynomial.aevalTower (rename Option.some) (X none))\n      (aeval fun o => Option.elim o Polynomial.X fun s => ↑Polynomial.C (X s)) =\n    AlgHom.id R (MvPolynomial (Option S₁) R)\n[PROOFSTEP]\next i : 2\n[GOAL]\ncase hf.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni : Option S₁\nm✝ : Option S₁ →₀ ℕ\n⊢ coeff m✝\n      (↑(AlgHom.comp (Polynomial.aevalTower (rename Option.some) (X none))\n            (aeval fun o => Option.elim o Polynomial.X fun s => ↑Polynomial.C (X s)))\n        (X i)) =\n    coeff m✝ (↑(AlgHom.id R (MvPolynomial (Option S₁) R)) (X i))\n[PROOFSTEP]\ncases i\n[GOAL]\ncase hf.a.none\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nm✝ : Option S₁ →₀ ℕ\n⊢ coeff m✝\n      (↑(AlgHom.comp (Polynomial.aevalTower (rename Option.some) (X none))\n            (aeval fun o => Option.elim o Polynomial.X fun s => ↑Polynomial.C (X s)))\n        (X none)) =\n    coeff m✝ (↑(AlgHom.id R (MvPolynomial (Option S₁) R)) (X none))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hf.a.some\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nm✝ : Option S₁ →₀ ℕ\nval✝ : S₁\n⊢ coeff m✝\n      (↑(AlgHom.comp (Polynomial.aevalTower (rename Option.some) (X none))\n            (aeval fun o => Option.elim o Polynomial.X fun s => ↑Polynomial.C (X s)))\n        (X (Option.some val✝))) =\n    coeff m✝ (↑(AlgHom.id R (MvPolynomial (Option S₁) R)) (X (Option.some val✝)))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ AlgHom.comp (aeval fun o => Option.elim o (↑C Polynomial.X) X)\n      (aevalTower (Polynomial.aeval (X none)) fun i => X (Option.some i)) =\n    AlgHom.id R (MvPolynomial S₁ R[X])\n[PROOFSTEP]\next : 2\n[GOAL]\ncase h₁.h\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ ↑(AlgHom.comp\n          (AlgHom.comp (aeval fun o => Option.elim o (↑C Polynomial.X) X)\n            (aevalTower (Polynomial.aeval (X none)) fun i => X (Option.some i)))\n          (IsScalarTower.toAlgHom R R[X] (MvPolynomial S₁ R[X])))\n      Polynomial.X =\n    ↑(AlgHom.comp (AlgHom.id R (MvPolynomial S₁ R[X])) (IsScalarTower.toAlgHom R R[X] (MvPolynomial S₁ R[X])))\n      Polynomial.X\n[PROOFSTEP]\nsimp only [MvPolynomial.algebraMap_eq, Option.elim, AlgHom.coe_comp, AlgHom.id_comp, IsScalarTower.coe_toAlgHom',\n  comp_apply, aevalTower_C, Polynomial.aeval_X, aeval_X, Option.elim', aevalTower_X, AlgHom.coe_id, id.def,\n  eq_self_iff_true, imp_true_iff]\n[GOAL]\ncase h₂.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni✝ : S₁\nm✝ : S₁ →₀ ℕ\n⊢ coeff m✝\n      (↑(AlgHom.comp (aeval fun o => Option.elim o (↑C Polynomial.X) X)\n            (aevalTower (Polynomial.aeval (X none)) fun i => X (Option.some i)))\n        (X i✝)) =\n    coeff m✝ (↑(AlgHom.id R (MvPolynomial S₁ R[X])) (X i✝))\n[PROOFSTEP]\nsimp only [MvPolynomial.algebraMap_eq, Option.elim, AlgHom.coe_comp, AlgHom.id_comp, IsScalarTower.coe_toAlgHom',\n  comp_apply, aevalTower_C, Polynomial.aeval_X, aeval_X, Option.elim', aevalTower_X, AlgHom.coe_id, id.def,\n  eq_self_iff_true, imp_true_iff]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\n⊢ AlgHom.comp (aevalTower (Polynomial.aeval (X none)) fun i => X (Option.some i))\n      (aeval fun o => Option.elim o (↑C Polynomial.X) X) =\n    AlgHom.id R (MvPolynomial (Option S₁) R)\n[PROOFSTEP]\next ⟨i⟩ : 2\n[GOAL]\ncase hf.none.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nm✝ : Option S₁ →₀ ℕ\n⊢ coeff m✝\n      (↑(AlgHom.comp (aevalTower (Polynomial.aeval (X none)) fun i => X (Option.some i))\n            (aeval fun o => Option.elim o (↑C Polynomial.X) X))\n        (X none)) =\n    coeff m✝ (↑(AlgHom.id R (MvPolynomial (Option S₁) R)) (X none))\n[PROOFSTEP]\nsimp only [Option.elim, AlgHom.coe_comp, comp_apply, aeval_X, aevalTower_C, Polynomial.aeval_X, AlgHom.coe_id, id.def,\n  aevalTower_X]\n[GOAL]\ncase hf.some.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nval✝ : S₁\nm✝ : Option S₁ →₀ ℕ\n⊢ coeff m✝\n      (↑(AlgHom.comp (aevalTower (Polynomial.aeval (X none)) fun i => X (Option.some i))\n            (aeval fun o => Option.elim o (↑C Polynomial.X) X))\n        (X (Option.some val✝))) =\n    coeff m✝ (↑(AlgHom.id R (MvPolynomial (Option S₁) R)) (X (Option.some val✝)))\n[PROOFSTEP]\nsimp only [Option.elim, AlgHom.coe_comp, comp_apply, aeval_X, aevalTower_C, Polynomial.aeval_X, AlgHom.coe_id, id.def,\n  aevalTower_X]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\n⊢ ↑(finSuccEquiv R n) =\n    eval₂Hom (RingHom.comp Polynomial.C C) fun i => Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) i\n[PROOFSTEP]\next i : 2\n[GOAL]\ncase hC.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ni : R\n⊢ ↑(RingHom.comp (↑(finSuccEquiv R n)) C) i =\n    ↑(RingHom.comp\n          (eval₂Hom (RingHom.comp Polynomial.C C) fun i => Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) i) C)\n      i\n[PROOFSTEP]\nsimp only [finSuccEquiv, optionEquivLeft_apply, aeval_C, AlgEquiv.coe_trans, RingHom.coe_coe, coe_eval₂Hom, comp_apply,\n  renameEquiv_apply, eval₂_C, RingHom.coe_comp, rename_C]\n[GOAL]\ncase hC.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ni : R\n⊢ ↑(algebraMap R (MvPolynomial (Fin n) R)[X]) i = ↑Polynomial.C (↑C i)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hX.a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ni : Fin (n + 1)\nn✝ : ℕ\n⊢ Polynomial.coeff (↑↑(finSuccEquiv R n) (X i)) n✝ =\n    Polynomial.coeff\n      (↑(eval₂Hom (RingHom.comp Polynomial.C C) fun i => Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) i) (X i))\n      n✝\n[PROOFSTEP]\nrefine' Fin.cases _ _ i\n[GOAL]\ncase hX.a.refine'_1\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ni : Fin (n + 1)\nn✝ : ℕ\n⊢ Polynomial.coeff (↑↑(finSuccEquiv R n) (X 0)) n✝ =\n    Polynomial.coeff\n      (↑(eval₂Hom (RingHom.comp Polynomial.C C) fun i => Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) i) (X 0))\n      n✝\n[PROOFSTEP]\nsimp [finSuccEquiv]\n[GOAL]\ncase hX.a.refine'_2\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ni : Fin (n + 1)\nn✝ : ℕ\n⊢ ∀ (i : Fin n),\n    Polynomial.coeff (↑↑(finSuccEquiv R n) (X (Fin.succ i))) n✝ =\n      Polynomial.coeff\n        (↑(eval₂Hom (RingHom.comp Polynomial.C C) fun i => Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) i)\n          (X (Fin.succ i)))\n        n✝\n[PROOFSTEP]\nsimp [finSuccEquiv]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\np : MvPolynomial (Fin (n + 1)) R\n⊢ ↑(finSuccEquiv R n) p =\n    ↑(eval₂Hom (RingHom.comp Polynomial.C C) fun i => Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) i) p\n[PROOFSTEP]\nrw [← finSuccEquiv_eq, RingHom.coe_coe]\n[GOAL]\nR✝ : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R✝\ne : ℕ\ns : σ →₀ ℕ\ninst✝¹ : CommSemiring R✝\nn✝ : ℕ\nR : Type u\ninst✝ : CommSemiring R\nn : ℕ\n⊢ RingHom.comp (↑(AlgEquiv.symm (finSuccEquiv R n))) (RingHom.comp Polynomial.C C) = C\n[PROOFSTEP]\nrefine' RingHom.ext fun x => _\n[GOAL]\nR✝ : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R✝\ne : ℕ\ns : σ →₀ ℕ\ninst✝¹ : CommSemiring R✝\nn✝ : ℕ\nR : Type u\ninst✝ : CommSemiring R\nn : ℕ\nx : R\n⊢ ↑(RingHom.comp (↑(AlgEquiv.symm (finSuccEquiv R n))) (RingHom.comp Polynomial.C C)) x = ↑C x\n[PROOFSTEP]\nrw [RingHom.comp_apply]\n[GOAL]\nR✝ : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R✝\ne : ℕ\ns : σ →₀ ℕ\ninst✝¹ : CommSemiring R✝\nn✝ : ℕ\nR : Type u\ninst✝ : CommSemiring R\nn : ℕ\nx : R\n⊢ ↑↑(AlgEquiv.symm (finSuccEquiv R n)) (↑(RingHom.comp Polynomial.C C) x) = ↑C x\n[PROOFSTEP]\nrefine' (MvPolynomial.finSuccEquiv R n).injective (Trans.trans ((MvPolynomial.finSuccEquiv R n).apply_symm_apply _) _)\n[GOAL]\nR✝ : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R✝\ne : ℕ\ns : σ →₀ ℕ\ninst✝¹ : CommSemiring R✝\nn✝ : ℕ\nR : Type u\ninst✝ : CommSemiring R\nn : ℕ\nx : R\n⊢ ↑(RingHom.comp Polynomial.C C) x = ↑(finSuccEquiv R n) (↑C x)\n[PROOFSTEP]\nsimp only [MvPolynomial.finSuccEquiv_apply, MvPolynomial.eval₂Hom_C]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\n⊢ ↑(finSuccEquiv R n) (X 0) = Polynomial.X\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nj : Fin n\n⊢ ↑(finSuccEquiv R n) (X (Fin.succ j)) = ↑Polynomial.C (X j)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm : Fin n →₀ ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\n⊢ coeff m (Polynomial.coeff (↑(finSuccEquiv R n) f) i) = coeff (cons i m) f\n[PROOFSTEP]\ninduction' f using MvPolynomial.induction_on' with j r p q hp hq generalizing i m\n[GOAL]\ncase h1\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni✝ : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nm : Fin n →₀ ℕ\ni : ℕ\n⊢ coeff m (Polynomial.coeff (↑(finSuccEquiv R n) (↑(monomial j) r)) i) = coeff (cons i m) (↑(monomial j) r)\ncase h2\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni✝ : ℕ\np q : MvPolynomial (Fin (n + 1)) R\nhp : ∀ (m : Fin n →₀ ℕ) (i : ℕ), coeff m (Polynomial.coeff (↑(finSuccEquiv R n) p) i) = coeff (cons i m) p\nhq : ∀ (m : Fin n →₀ ℕ) (i : ℕ), coeff m (Polynomial.coeff (↑(finSuccEquiv R n) q) i) = coeff (cons i m) q\nm : Fin n →₀ ℕ\ni : ℕ\n⊢ coeff m (Polynomial.coeff (↑(finSuccEquiv R n) (p + q)) i) = coeff (cons i m) (p + q)\n[PROOFSTEP]\nswap\n[GOAL]\ncase h2\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni✝ : ℕ\np q : MvPolynomial (Fin (n + 1)) R\nhp : ∀ (m : Fin n →₀ ℕ) (i : ℕ), coeff m (Polynomial.coeff (↑(finSuccEquiv R n) p) i) = coeff (cons i m) p\nhq : ∀ (m : Fin n →₀ ℕ) (i : ℕ), coeff m (Polynomial.coeff (↑(finSuccEquiv R n) q) i) = coeff (cons i m) q\nm : Fin n →₀ ℕ\ni : ℕ\n⊢ coeff m (Polynomial.coeff (↑(finSuccEquiv R n) (p + q)) i) = coeff (cons i m) (p + q)\n[PROOFSTEP]\nsimp only [(finSuccEquiv R n).map_add, Polynomial.coeff_add, coeff_add, hp, hq]\n[GOAL]\ncase h1\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni✝ : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nm : Fin n →₀ ℕ\ni : ℕ\n⊢ coeff m (Polynomial.coeff (↑(finSuccEquiv R n) (↑(monomial j) r)) i) = coeff (cons i m) (↑(monomial j) r)\n[PROOFSTEP]\nsimp only [finSuccEquiv_apply, coe_eval₂Hom, eval₂_monomial, RingHom.coe_comp, prod_pow, Polynomial.coeff_C_mul,\n  coeff_C_mul, coeff_monomial, Fin.prod_univ_succ, Fin.cases_zero, Fin.cases_succ, ← map_prod, ← RingHom.map_pow,\n  Function.comp_apply]\n[GOAL]\ncase h1\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni✝ : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nm : Fin n →₀ ℕ\ni : ℕ\n⊢ r * coeff m (Polynomial.coeff (Polynomial.X ^ ↑j 0 * ↑Polynomial.C (∏ x : Fin n, X x ^ ↑j (Fin.succ x))) i) =\n    if j = cons i m then r else 0\n[PROOFSTEP]\nrw [← mul_boole, mul_comm (Polynomial.X ^ j 0), Polynomial.coeff_C_mul_X_pow]\n[GOAL]\ncase h1\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni✝ : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nm : Fin n →₀ ℕ\ni : ℕ\n⊢ r * coeff m (if i = ↑j 0 then ∏ x : Fin n, X x ^ ↑j (Fin.succ x) else 0) = r * if j = cons i m then 1 else 0\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h1.e_a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni✝ : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nm : Fin n →₀ ℕ\ni : ℕ\n⊢ coeff m (if i = ↑j 0 then ∏ x : Fin n, X x ^ ↑j (Fin.succ x) else 0) = if j = cons i m then 1 else 0\n[PROOFSTEP]\nobtain rfl | hjmi := eq_or_ne j (m.cons i)\n[GOAL]\ncase h1.e_a.inl\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni✝ : ℕ\nr : R\nm : Fin n →₀ ℕ\ni : ℕ\n⊢ coeff m (if i = ↑(cons i m) 0 then ∏ x : Fin n, X x ^ ↑(cons i m) (Fin.succ x) else 0) =\n    if cons i m = cons i m then 1 else 0\n[PROOFSTEP]\nsimpa only [cons_zero, cons_succ, if_pos rfl, monomial_eq, C_1, one_mul, prod_pow] using coeff_monomial m m (1 : R)\n[GOAL]\ncase h1.e_a.inr\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni✝ : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nm : Fin n →₀ ℕ\ni : ℕ\nhjmi : j ≠ cons i m\n⊢ coeff m (if i = ↑j 0 then ∏ x : Fin n, X x ^ ↑j (Fin.succ x) else 0) = if j = cons i m then 1 else 0\n[PROOFSTEP]\nsimp only [hjmi, if_false]\n[GOAL]\ncase h1.e_a.inr\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni✝ : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nm : Fin n →₀ ℕ\ni : ℕ\nhjmi : j ≠ cons i m\n⊢ coeff m (if i = ↑j 0 then ∏ x : Fin n, X x ^ ↑j (Fin.succ x) else 0) = 0\n[PROOFSTEP]\nobtain hij | rfl := ne_or_eq i (j 0)\n[GOAL]\ncase h1.e_a.inr.inl\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni✝ : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nm : Fin n →₀ ℕ\ni : ℕ\nhjmi : j ≠ cons i m\nhij : i ≠ ↑j 0\n⊢ coeff m (if i = ↑j 0 then ∏ x : Fin n, X x ^ ↑j (Fin.succ x) else 0) = 0\n[PROOFSTEP]\nsimp only [hij, if_false, coeff_zero]\n[GOAL]\ncase h1.e_a.inr.inr\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nm : Fin n →₀ ℕ\nhjmi : j ≠ cons (↑j 0) m\n⊢ coeff m (if ↑j 0 = ↑j 0 then ∏ x : Fin n, X x ^ ↑j (Fin.succ x) else 0) = 0\n[PROOFSTEP]\nsimp only [eq_self_iff_true, if_true]\n[GOAL]\ncase h1.e_a.inr.inr\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nm : Fin n →₀ ℕ\nhjmi : j ≠ cons (↑j 0) m\n⊢ coeff m (∏ x : Fin n, X x ^ ↑j (Fin.succ x)) = 0\n[PROOFSTEP]\nhave hmj : m ≠ j.tail := by\n  rintro rfl\n  rw [cons_tail] at hjmi \n  contradiction\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nm : Fin n →₀ ℕ\nhjmi : j ≠ cons (↑j 0) m\n⊢ m ≠ tail j\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm : Fin n →₀ ℕ\ni : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nhjmi : j ≠ cons (↑j 0) (tail j)\n⊢ False\n[PROOFSTEP]\nrw [cons_tail] at hjmi \n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm : Fin n →₀ ℕ\ni : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nhjmi : j ≠ j\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase h1.e_a.inr.inr\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nm✝ : Fin n →₀ ℕ\ni : ℕ\nj : Fin (n + 1) →₀ ℕ\nr : R\nm : Fin n →₀ ℕ\nhjmi : j ≠ cons (↑j 0) m\nhmj : m ≠ tail j\n⊢ coeff m (∏ x : Fin n, X x ^ ↑j (Fin.succ x)) = 0\n[PROOFSTEP]\nsimpa only [monomial_eq, C_1, one_mul, prod_pow, Finsupp.tail_apply, if_neg hmj.symm] using\n  coeff_monomial m j.tail (1 : R)\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns✝ : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ns : Fin n → R\ny : R\nf : MvPolynomial (Fin (n + 1)) R\n⊢ ↑(eval (Fin.cons y s)) f = Polynomial.eval y (Polynomial.map (eval s) (↑(finSuccEquiv R n) f))\n[PROOFSTEP]\nlet φ : (MvPolynomial (Fin n) R)[X] →ₐ[R] R[X] :=\n  { Polynomial.mapRingHom (eval s) with\n    commutes' := fun r => by\n      convert Polynomial.map_C (eval s)\n      exact (eval_C _).symm }\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns✝ : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ns : Fin n → R\ny : R\nf : MvPolynomial (Fin (n + 1)) R\nsrc✝ : (MvPolynomial (Fin n) R)[X] →+* R[X] := mapRingHom (eval s)\nr : R\n⊢ OneHom.toFun\n      (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : (MvPolynomial (Fin n) R)[X]),\n                  OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n      (↑(algebraMap R (MvPolynomial (Fin n) R)[X]) r) =\n    ↑(algebraMap R R[X]) r\n[PROOFSTEP]\nconvert Polynomial.map_C (eval s)\n[GOAL]\ncase h.e'_3.h.e'_6\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns✝ : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ns : Fin n → R\ny : R\nf : MvPolynomial (Fin (n + 1)) R\nsrc✝ : (MvPolynomial (Fin n) R)[X] →+* R[X] := mapRingHom (eval s)\nr : R\n⊢ r = ↑(eval s) (↑(algebraMap R (MvPolynomial (Fin n) R)) r)\n[PROOFSTEP]\nexact (eval_C _).symm\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns✝ : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ns : Fin n → R\ny : R\nf : MvPolynomial (Fin (n + 1)) R\nφ : (MvPolynomial (Fin n) R)[X] →ₐ[R] R[X] :=\n  let src := mapRingHom (eval s);\n  {\n    toRingHom :=\n      { toMonoidHom := ↑src, map_zero' := (_ : OneHom.toFun (↑↑src) 0 = 0),\n        map_add' :=\n          (_ :\n            ∀ (x y : (MvPolynomial (Fin n) R)[X]),\n              OneHom.toFun (↑↑src) (x + y) = OneHom.toFun (↑↑src) x + OneHom.toFun (↑↑src) y) },\n    commutes' :=\n      (_ :\n        ∀ (r : R),\n          OneHom.toFun\n              (↑↑{ toMonoidHom := ↑src, map_zero' := (_ : OneHom.toFun (↑↑src) 0 = 0),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : (MvPolynomial (Fin n) R)[X]),\n                          OneHom.toFun (↑↑src) (x + y) = OneHom.toFun (↑↑src) x + OneHom.toFun (↑↑src) y) })\n              (↑(algebraMap R (MvPolynomial (Fin n) R)[X]) r) =\n            ↑(algebraMap R R[X]) r) }\n⊢ ↑(eval (Fin.cons y s)) f = Polynomial.eval y (Polynomial.map (eval s) (↑(finSuccEquiv R n) f))\n[PROOFSTEP]\nshow aeval (Fin.cons y s : Fin (n + 1) → R) f = (Polynomial.aeval y).comp (φ.comp (finSuccEquiv R n).toAlgHom) f\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns✝ : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ns : Fin n → R\ny : R\nf : MvPolynomial (Fin (n + 1)) R\nφ : (MvPolynomial (Fin n) R)[X] →ₐ[R] R[X] :=\n  let src := mapRingHom (eval s);\n  {\n    toRingHom :=\n      { toMonoidHom := ↑src, map_zero' := (_ : OneHom.toFun (↑↑src) 0 = 0),\n        map_add' :=\n          (_ :\n            ∀ (x y : (MvPolynomial (Fin n) R)[X]),\n              OneHom.toFun (↑↑src) (x + y) = OneHom.toFun (↑↑src) x + OneHom.toFun (↑↑src) y) },\n    commutes' :=\n      (_ :\n        ∀ (r : R),\n          OneHom.toFun\n              (↑↑{ toMonoidHom := ↑src, map_zero' := (_ : OneHom.toFun (↑↑src) 0 = 0),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : (MvPolynomial (Fin n) R)[X]),\n                          OneHom.toFun (↑↑src) (x + y) = OneHom.toFun (↑↑src) x + OneHom.toFun (↑↑src) y) })\n              (↑(algebraMap R (MvPolynomial (Fin n) R)[X]) r) =\n            ↑(algebraMap R R[X]) r) }\n⊢ ↑(aeval (Fin.cons y s)) f = ↑(AlgHom.comp (Polynomial.aeval y) (AlgHom.comp φ ↑(finSuccEquiv R n))) f\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns✝ : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ns : Fin n → R\ny : R\nf : MvPolynomial (Fin (n + 1)) R\nφ : (MvPolynomial (Fin n) R)[X] →ₐ[R] R[X] :=\n  let src := mapRingHom (eval s);\n  {\n    toRingHom :=\n      { toMonoidHom := ↑src, map_zero' := (_ : OneHom.toFun (↑↑src) 0 = 0),\n        map_add' :=\n          (_ :\n            ∀ (x y : (MvPolynomial (Fin n) R)[X]),\n              OneHom.toFun (↑↑src) (x + y) = OneHom.toFun (↑↑src) x + OneHom.toFun (↑↑src) y) },\n    commutes' :=\n      (_ :\n        ∀ (r : R),\n          OneHom.toFun\n              (↑↑{ toMonoidHom := ↑src, map_zero' := (_ : OneHom.toFun (↑↑src) 0 = 0),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : (MvPolynomial (Fin n) R)[X]),\n                          OneHom.toFun (↑↑src) (x + y) = OneHom.toFun (↑↑src) x + OneHom.toFun (↑↑src) y) })\n              (↑(algebraMap R (MvPolynomial (Fin n) R)[X]) r) =\n            ↑(algebraMap R R[X]) r) }\n⊢ aeval (Fin.cons y s) = AlgHom.comp (Polynomial.aeval y) (AlgHom.comp φ ↑(finSuccEquiv R n))\n[PROOFSTEP]\napply MvPolynomial.algHom_ext\n[GOAL]\ncase e_a.hf\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns✝ : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ns : Fin n → R\ny : R\nf : MvPolynomial (Fin (n + 1)) R\nφ : (MvPolynomial (Fin n) R)[X] →ₐ[R] R[X] :=\n  let src := mapRingHom (eval s);\n  {\n    toRingHom :=\n      { toMonoidHom := ↑src, map_zero' := (_ : OneHom.toFun (↑↑src) 0 = 0),\n        map_add' :=\n          (_ :\n            ∀ (x y : (MvPolynomial (Fin n) R)[X]),\n              OneHom.toFun (↑↑src) (x + y) = OneHom.toFun (↑↑src) x + OneHom.toFun (↑↑src) y) },\n    commutes' :=\n      (_ :\n        ∀ (r : R),\n          OneHom.toFun\n              (↑↑{ toMonoidHom := ↑src, map_zero' := (_ : OneHom.toFun (↑↑src) 0 = 0),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : (MvPolynomial (Fin n) R)[X]),\n                          OneHom.toFun (↑↑src) (x + y) = OneHom.toFun (↑↑src) x + OneHom.toFun (↑↑src) y) })\n              (↑(algebraMap R (MvPolynomial (Fin n) R)[X]) r) =\n            ↑(algebraMap R R[X]) r) }\n⊢ ∀ (i : Fin (n + 1)),\n    ↑(aeval (Fin.cons y s)) (X i) = ↑(AlgHom.comp (Polynomial.aeval y) (AlgHom.comp φ ↑(finSuccEquiv R n))) (X i)\n[PROOFSTEP]\nrw [Fin.forall_fin_succ]\n[GOAL]\ncase e_a.hf\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns✝ : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ns : Fin n → R\ny : R\nf : MvPolynomial (Fin (n + 1)) R\nφ : (MvPolynomial (Fin n) R)[X] →ₐ[R] R[X] :=\n  let src := mapRingHom (eval s);\n  {\n    toRingHom :=\n      { toMonoidHom := ↑src, map_zero' := (_ : OneHom.toFun (↑↑src) 0 = 0),\n        map_add' :=\n          (_ :\n            ∀ (x y : (MvPolynomial (Fin n) R)[X]),\n              OneHom.toFun (↑↑src) (x + y) = OneHom.toFun (↑↑src) x + OneHom.toFun (↑↑src) y) },\n    commutes' :=\n      (_ :\n        ∀ (r : R),\n          OneHom.toFun\n              (↑↑{ toMonoidHom := ↑src, map_zero' := (_ : OneHom.toFun (↑↑src) 0 = 0),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : (MvPolynomial (Fin n) R)[X]),\n                          OneHom.toFun (↑↑src) (x + y) = OneHom.toFun (↑↑src) x + OneHom.toFun (↑↑src) y) })\n              (↑(algebraMap R (MvPolynomial (Fin n) R)[X]) r) =\n            ↑(algebraMap R R[X]) r) }\n⊢ ↑(aeval (Fin.cons y s)) (X 0) = ↑(AlgHom.comp (Polynomial.aeval y) (AlgHom.comp φ ↑(finSuccEquiv R n))) (X 0) ∧\n    ∀ (i : Fin n),\n      ↑(aeval (Fin.cons y s)) (X (Fin.succ i)) =\n        ↑(AlgHom.comp (Polynomial.aeval y) (AlgHom.comp φ ↑(finSuccEquiv R n))) (X (Fin.succ i))\n[PROOFSTEP]\nsimp only [aeval_X, Fin.cons_zero, AlgEquiv.toAlgHom_eq_coe, AlgHom.coe_comp, Polynomial.coe_aeval_eq_eval,\n  Polynomial.map_C, AlgHom.coe_mk, RingHom.toFun_eq_coe, Polynomial.coe_mapRingHom, comp_apply, finSuccEquiv_apply,\n  eval₂Hom_X', Fin.cases_zero, Polynomial.map_X, Polynomial.eval_X, Fin.cons_succ, Fin.cases_succ, eval_X,\n  Polynomial.eval_C, RingHom.coe_mk, MonoidHom.coe_coe, AlgHom.coe_coe, implies_true, and_self,\n  RingHom.toMonoidHom_eq_coe]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\ns' : Fin n → R\nf : (MvPolynomial (Fin n) R)[X]\ni : ℕ\n⊢ Polynomial.coeff (Polynomial.map (eval s') f) i = ↑(eval s') (Polynomial.coeff f i)\n[PROOFSTEP]\nsimp only [Polynomial.coeff_map]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin n →₀ ℕ\n⊢ m ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) f) i) ↔ cons i m ∈ support f\n[PROOFSTEP]\napply Iff.intro\n[GOAL]\ncase mp\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin n →₀ ℕ\n⊢ m ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) f) i) → cons i m ∈ support f\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin n →₀ ℕ\nh : m ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) f) i)\n⊢ cons i m ∈ support f\n[PROOFSTEP]\nsimpa [← finSuccEquiv_coeff_coeff] using h\n[GOAL]\ncase mpr\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin n →₀ ℕ\n⊢ cons i m ∈ support f → m ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) f) i)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin n →₀ ℕ\nh : cons i m ∈ support f\n⊢ m ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) f) i)\n[PROOFSTEP]\nsimpa [mem_support_iff, ← finSuccEquiv_coeff_coeff m f i] using h\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\n⊢ Polynomial.support (↑(finSuccEquiv R n) f) = Finset.image (fun m => ↑m 0) (support f)\n[PROOFSTEP]\next i\n[GOAL]\ncase a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\n⊢ i ∈ Polynomial.support (↑(finSuccEquiv R n) f) ↔ i ∈ Finset.image (fun m => ↑m 0) (support f)\n[PROOFSTEP]\nrw [Polynomial.mem_support_iff, Finset.mem_image, nonzero_iff_exists]\n[GOAL]\ncase a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\n⊢ (∃ a, ↑(Polynomial.coeff (↑(finSuccEquiv R n) f) i) a ≠ 0) ↔ ∃ a, a ∈ support f ∧ ↑a 0 = i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\n⊢ (∃ a, ↑(Polynomial.coeff (↑(finSuccEquiv R n) f) i) a ≠ 0) → ∃ a, a ∈ support f ∧ ↑a 0 = i\n[PROOFSTEP]\nrintro ⟨m, hm⟩\n[GOAL]\ncase a.mp.intro\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin n →₀ ℕ\nhm : ↑(Polynomial.coeff (↑(finSuccEquiv R n) f) i) m ≠ 0\n⊢ ∃ a, a ∈ support f ∧ ↑a 0 = i\n[PROOFSTEP]\nrefine' ⟨cons i m, _, cons_zero _ _⟩\n[GOAL]\ncase a.mp.intro\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin n →₀ ℕ\nhm : ↑(Polynomial.coeff (↑(finSuccEquiv R n) f) i) m ≠ 0\n⊢ cons i m ∈ support f\n[PROOFSTEP]\nrw [← support_coeff_finSuccEquiv]\n[GOAL]\ncase a.mp.intro\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin n →₀ ℕ\nhm : ↑(Polynomial.coeff (↑(finSuccEquiv R n) f) i) m ≠ 0\n⊢ m ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) f) i)\n[PROOFSTEP]\nsimpa using hm\n[GOAL]\ncase a.mpr\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\n⊢ (∃ a, a ∈ support f ∧ ↑a 0 = i) → ∃ a, ↑(Polynomial.coeff (↑(finSuccEquiv R n) f) i) a ≠ 0\n[PROOFSTEP]\nrintro ⟨m, h, rfl⟩\n[GOAL]\ncase a.mpr.intro.intro\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nm : Fin (n + 1) →₀ ℕ\nh : m ∈ support f\n⊢ ∃ a, ↑(Polynomial.coeff (↑(finSuccEquiv R n) f) (↑m 0)) a ≠ 0\n[PROOFSTEP]\nrefine' ⟨tail m, _⟩\n[GOAL]\ncase a.mpr.intro.intro\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nm : Fin (n + 1) →₀ ℕ\nh : m ∈ support f\n⊢ ↑(Polynomial.coeff (↑(finSuccEquiv R n) f) (↑m 0)) (tail m) ≠ 0\n[PROOFSTEP]\nrwa [← coeff, ← mem_support_iff, support_coeff_finSuccEquiv, cons_tail]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\n⊢ Finset.image (cons i) (support (Polynomial.coeff (↑(finSuccEquiv R n) f) i)) =\n    Finset.filter (fun m => ↑m 0 = i) (support f)\n[PROOFSTEP]\next m\n[GOAL]\ncase a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\n⊢ m ∈ Finset.image (cons i) (support (Polynomial.coeff (↑(finSuccEquiv R n) f) i)) ↔\n    m ∈ Finset.filter (fun m => ↑m 0 = i) (support f)\n[PROOFSTEP]\nrw [Finset.mem_filter, Finset.mem_image, mem_support_iff]\n[GOAL]\ncase a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\n⊢ (∃ a, a ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) f) i) ∧ cons i a = m) ↔ coeff m f ≠ 0 ∧ ↑m 0 = i\n[PROOFSTEP]\nconv_lhs =>\n  congr\n  ext\n  rw [mem_support_iff, finSuccEquiv_coeff_coeff, Ne.def]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\n| ∃ a, a ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) f) i) ∧ cons i a = m\n[PROOFSTEP]\n  congr\n  ext\n  rw [mem_support_iff, finSuccEquiv_coeff_coeff, Ne.def]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\n| ∃ a, a ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) f) i) ∧ cons i a = m\n[PROOFSTEP]\n  congr\n  ext\n  rw [mem_support_iff, finSuccEquiv_coeff_coeff, Ne.def]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\n| ∃ a, a ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) f) i) ∧ cons i a = m\n[PROOFSTEP]\ncongr\n[GOAL]\ncase p\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\n| fun a => a ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) f) i) ∧ cons i a = m\n[PROOFSTEP]\next\n[GOAL]\ncase p.h\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\nx✝ : Fin n →₀ ℕ\n| x✝ ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) f) i) ∧ cons i x✝ = m\n[PROOFSTEP]\nrw [mem_support_iff, finSuccEquiv_coeff_coeff, Ne.def]\n[GOAL]\ncase a\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\n⊢ (∃ x, ¬coeff (cons i x) f = 0 ∧ cons i x = m) ↔ coeff m f ≠ 0 ∧ ↑m 0 = i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\n⊢ (∃ x, ¬coeff (cons i x) f = 0 ∧ cons i x = m) → coeff m f ≠ 0 ∧ ↑m 0 = i\n[PROOFSTEP]\nrintro ⟨m', ⟨h, hm'⟩⟩\n[GOAL]\ncase a.mp.intro.intro\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\nm' : Fin n →₀ ℕ\nh : ¬coeff (cons i m') f = 0\nhm' : cons i m' = m\n⊢ coeff m f ≠ 0 ∧ ↑m 0 = i\n[PROOFSTEP]\nsimp only [← hm']\n[GOAL]\ncase a.mp.intro.intro\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\nm' : Fin n →₀ ℕ\nh : ¬coeff (cons i m') f = 0\nhm' : cons i m' = m\n⊢ coeff (cons i m') f ≠ 0 ∧ ↑(cons i m') 0 = i\n[PROOFSTEP]\nexact ⟨h, by rw [cons_zero]⟩\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\nm' : Fin n →₀ ℕ\nh : ¬coeff (cons i m') f = 0\nhm' : cons i m' = m\n⊢ ↑(cons i m') 0 = i\n[PROOFSTEP]\nrw [cons_zero]\n[GOAL]\ncase a.mpr\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\n⊢ coeff m f ≠ 0 ∧ ↑m 0 = i → ∃ x, ¬coeff (cons i x) f = 0 ∧ cons i x = m\n[PROOFSTEP]\nintro h\n[GOAL]\ncase a.mpr\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\nh : coeff m f ≠ 0 ∧ ↑m 0 = i\n⊢ ∃ x, ¬coeff (cons i x) f = 0 ∧ cons i x = m\n[PROOFSTEP]\nuse tail m\n[GOAL]\ncase h\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\nh : coeff m f ≠ 0 ∧ ↑m 0 = i\n⊢ ¬coeff (cons i (tail m)) f = 0 ∧ cons i (tail m) = m\n[PROOFSTEP]\nrw [← h.2, cons_tail]\n[GOAL]\ncase h\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\ni : ℕ\nm : Fin (n + 1) →₀ ℕ\nh : coeff m f ≠ 0 ∧ ↑m 0 = i\n⊢ ¬coeff m f = 0 ∧ m = m\n[PROOFSTEP]\nsimp [h.1]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\n⊢ Finset.Nonempty (Polynomial.support (↑(finSuccEquiv R n) f))\n[PROOFSTEP]\nsimp only [Finset.nonempty_iff_ne_empty, Ne, Polynomial.support_eq_empty]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\n⊢ ¬↑(finSuccEquiv R n) f = 0\n[PROOFSTEP]\nrefine fun c => h ?_\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\nc : ↑(finSuccEquiv R n) f = 0\n⊢ f = 0\n[PROOFSTEP]\nlet ii := (finSuccEquiv R n).symm\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\nc : ↑(finSuccEquiv R n) f = 0\nii : (MvPolynomial (Fin n) R)[X] ≃ₐ[R] MvPolynomial (Fin (n + 1)) R := AlgEquiv.symm (finSuccEquiv R n)\n⊢ f = 0\n[PROOFSTEP]\ncalc\n  f = ii (finSuccEquiv R n f) := by simpa only [← AlgEquiv.invFun_eq_symm] using ((finSuccEquiv R n).left_inv f).symm\n  _ = ii 0 := by rw [c]\n  _ = 0 := by simp\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\nc : ↑(finSuccEquiv R n) f = 0\nii : (MvPolynomial (Fin n) R)[X] ≃ₐ[R] MvPolynomial (Fin (n + 1)) R := AlgEquiv.symm (finSuccEquiv R n)\n⊢ f = ↑ii (↑(finSuccEquiv R n) f)\n[PROOFSTEP]\nsimpa only [← AlgEquiv.invFun_eq_symm] using ((finSuccEquiv R n).left_inv f).symm\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\nc : ↑(finSuccEquiv R n) f = 0\nii : (MvPolynomial (Fin n) R)[X] ≃ₐ[R] MvPolynomial (Fin (n + 1)) R := AlgEquiv.symm (finSuccEquiv R n)\n⊢ ↑ii (↑(finSuccEquiv R n) f) = ↑ii 0\n[PROOFSTEP]\nrw [c]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\nc : ↑(finSuccEquiv R n) f = 0\nii : (MvPolynomial (Fin n) R)[X] ≃ₐ[R] MvPolynomial (Fin (n + 1)) R := AlgEquiv.symm (finSuccEquiv R n)\n⊢ ↑ii 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\n⊢ degree (↑(finSuccEquiv R n) f) = ↑(degreeOf 0 f)\n[PROOFSTEP]\nhave h₀ : ∀ {α β : Type _} (f : α → β), (fun x => x) ∘ f = f := fun f => rfl\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\nh₀ : ∀ {α : Type ?u.1446258} {β : Type ?u.1446261} (f : α → β), (fun x => x) ∘ f = f\n⊢ degree (↑(finSuccEquiv R n) f) = ↑(degreeOf 0 f)\n[PROOFSTEP]\nhave h₁ : ∀ {α β : Type _} (f : α → β), f ∘ (fun x => x) = f := fun f => rfl\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\nh₀ : ∀ {α : Type ?u.1446258} {β : Type ?u.1446261} (f : α → β), (fun x => x) ∘ f = f\nh₁ : ∀ {α : Type ?u.1446323} {β : Type ?u.1446326} (f : α → β), (f ∘ fun x => x) = f\n⊢ degree (↑(finSuccEquiv R n) f) = ↑(degreeOf 0 f)\n[PROOFSTEP]\nhave h₂ : WithBot.some = Nat.cast := rfl\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\nh₀ : ∀ {α : Type ?u.1446258} {β : Type ?u.1446261} (f : α → β), (fun x => x) ∘ f = f\nh₁ : ∀ {α : Type ?u.1446323} {β : Type ?u.1446326} (f : α → β), (f ∘ fun x => x) = f\nh₂ : WithBot.some = Nat.cast\n⊢ degree (↑(finSuccEquiv R n) f) = ↑(degreeOf 0 f)\n[PROOFSTEP]\nhave h' : ((finSuccEquiv R n f).support.sup fun x => x) = degreeOf 0 f := by\n  rw [degreeOf_eq_sup, finSuccEquiv_support f, Finset.sup_image, h₀]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\nh₀ : ∀ {α : Type ?u.1446258} {β : Type ?u.1446261} (f : α → β), (fun x => x) ∘ f = f\nh₁ : ∀ {α : Type ?u.1446323} {β : Type ?u.1446326} (f : α → β), (f ∘ fun x => x) = f\nh₂ : WithBot.some = Nat.cast\n⊢ (Finset.sup (Polynomial.support (↑(finSuccEquiv R n) f)) fun x => x) = degreeOf 0 f\n[PROOFSTEP]\nrw [degreeOf_eq_sup, finSuccEquiv_support f, Finset.sup_image, h₀]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nh : f ≠ 0\nh₀ : ∀ {α β : Type} (f : α → β), (fun x => x) ∘ f = f\nh₁ : ∀ {α : Type ?u.1446323} {β : Type ?u.1446326} (f : α → β), (f ∘ fun x => x) = f\nh₂ : WithBot.some = Nat.cast\nh' : (Finset.sup (Polynomial.support (↑(finSuccEquiv R n) f)) fun x => x) = degreeOf 0 f\n⊢ degree (↑(finSuccEquiv R n) f) = ↑(degreeOf 0 f)\n[PROOFSTEP]\nrw [Polynomial.degree, ← h', ← h₂, Finset.coe_sup_of_nonempty (support_finSuccEquiv_nonempty h), Finset.max_eq_sup_coe,\n  h₁]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\n⊢ natDegree (↑(finSuccEquiv R n) f) = degreeOf 0 f\n[PROOFSTEP]\nby_cases c : f = 0\n[GOAL]\ncase pos\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nc : f = 0\n⊢ natDegree (↑(finSuccEquiv R n) f) = degreeOf 0 f\n[PROOFSTEP]\nrw [c, (finSuccEquiv R n).map_zero, Polynomial.natDegree_zero, degreeOf_zero]\n[GOAL]\ncase neg\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nc : ¬f = 0\n⊢ natDegree (↑(finSuccEquiv R n) f) = degreeOf 0 f\n[PROOFSTEP]\nrw [Polynomial.natDegree, degree_finSuccEquiv (by simpa only [Ne.def])]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nc : ¬f = 0\n⊢ f ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def]\n[GOAL]\ncase neg\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nc : ¬f = 0\n⊢ WithBot.unbot' 0 ↑(degreeOf 0 f) = degreeOf 0 f\n[PROOFSTEP]\nerw [WithBot.unbot'_coe]\n[GOAL]\ncase neg\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\nf : MvPolynomial (Fin (n + 1)) R\nc : ¬f = 0\n⊢ ↑(degreeOf 0 f) = degreeOf 0 f\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\np : MvPolynomial (Fin (n + 1)) R\nj : Fin n\ni : ℕ\n⊢ degreeOf j (Polynomial.coeff (↑(finSuccEquiv R n) p) i) ≤ degreeOf (Fin.succ j) p\n[PROOFSTEP]\nrw [degreeOf_eq_sup, degreeOf_eq_sup, Finset.sup_le_iff]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\np : MvPolynomial (Fin (n + 1)) R\nj : Fin n\ni : ℕ\n⊢ ∀ (b : Fin n →₀ ℕ),\n    b ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) p) i) → ↑b j ≤ Finset.sup (support p) fun m => ↑m (Fin.succ j)\n[PROOFSTEP]\nintro m hm\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\np : MvPolynomial (Fin (n + 1)) R\nj : Fin n\ni : ℕ\nm : Fin n →₀ ℕ\nhm : m ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) p) i)\n⊢ ↑m j ≤ Finset.sup (support p) fun m => ↑m (Fin.succ j)\n[PROOFSTEP]\nrw [← Finsupp.cons_succ j i m]\n[GOAL]\nR : Type u\nS₁ : Type v\nS₂ : Type w\nS₃ : Type x\nσ : Type u_1\na a' a₁ a₂ : R\ne : ℕ\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nn : ℕ\np : MvPolynomial (Fin (n + 1)) R\nj : Fin n\ni : ℕ\nm : Fin n →₀ ℕ\nhm : m ∈ support (Polynomial.coeff (↑(finSuccEquiv R n) p) i)\n⊢ ↑(cons i m) (Fin.succ j) ≤ Finset.sup (support p) fun m => ↑m (Fin.succ j)\n[PROOFSTEP]\nexact Finset.le_sup (f := fun (g : Fin (Nat.succ n) →₀ ℕ) => g (Fin.succ j)) (support_coeff_finSuccEquiv.1 hm)\n", "meta": {"mathlib_filename": "Mathlib.Data.MvPolynomial.Equiv", "llama_tokens": 31441, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833945721304, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.39939062462972924}}
{"text": "[GOAL]\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝⁵ : Zero R\ninst✝⁴ : Zero M\ninst✝³ : SMulWithZero R M\na✝ : R\nb : M\ninst✝² : Zero R'\ninst✝¹ : Zero M'\ninst✝ : SMul R M'\nf : ZeroHom M' M\nhf : Injective ↑f\nsmul : ∀ (a : R) (b : M'), ↑f (a • b) = a • ↑f b\na : R\n⊢ ↑f (a • 0) = ↑f 0\n[PROOFSTEP]\nsimp [smul]\n[GOAL]\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝⁵ : Zero R\ninst✝⁴ : Zero M\ninst✝³ : SMulWithZero R M\na✝ : R\nb : M\ninst✝² : Zero R'\ninst✝¹ : Zero M'\ninst✝ : SMul R M'\nf : ZeroHom M' M\nhf : Injective ↑f\nsmul : ∀ (a : R) (b : M'), ↑f (a • b) = a • ↑f b\na : M'\n⊢ ↑f (0 • a) = ↑f 0\n[PROOFSTEP]\nsimp [smul]\n[GOAL]\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝⁵ : Zero R\ninst✝⁴ : Zero M\ninst✝³ : SMulWithZero R M\na : R\nb : M\ninst✝² : Zero R'\ninst✝¹ : Zero M'\ninst✝ : SMul R M'\nf : ZeroHom M M'\nhf : Surjective ↑f\nsmul : ∀ (a : R) (b : M), ↑f (a • b) = a • ↑f b\nc : R\n⊢ c • 0 = 0\n[PROOFSTEP]\nrw [← f.map_zero, ← smul, smul_zero]\n[GOAL]\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝⁵ : Zero R\ninst✝⁴ : Zero M\ninst✝³ : SMulWithZero R M\na : R\nb : M\ninst✝² : Zero R'\ninst✝¹ : Zero M'\ninst✝ : SMul R M'\nf : ZeroHom M M'\nhf : Surjective ↑f\nsmul : ∀ (a : R) (b : M), ↑f (a • b) = a • ↑f b\nm : M'\n⊢ 0 • m = 0\n[PROOFSTEP]\nrcases hf m with ⟨x, rfl⟩\n[GOAL]\ncase intro\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝⁵ : Zero R\ninst✝⁴ : Zero M\ninst✝³ : SMulWithZero R M\na : R\nb : M\ninst✝² : Zero R'\ninst✝¹ : Zero M'\ninst✝ : SMul R M'\nf : ZeroHom M M'\nhf : Surjective ↑f\nsmul : ∀ (a : R) (b : M), ↑f (a • b) = a • ↑f b\nx : M\n⊢ 0 • ↑f x = 0\n[PROOFSTEP]\nsimp [← smul]\n[GOAL]\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝⁵ : Zero R\ninst✝⁴ : Zero M\ninst✝³ : SMulWithZero R M\na : R\nb : M\ninst✝² : Zero R'\ninst✝¹ : Zero M'\ninst✝ : SMul R M'\nf : ZeroHom R' R\nm : M\n⊢ 0 • m = 0\n[PROOFSTEP]\nshow (f 0) • m = 0\n[GOAL]\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝⁵ : Zero R\ninst✝⁴ : Zero M\ninst✝³ : SMulWithZero R M\na : R\nb : M\ninst✝² : Zero R'\ninst✝¹ : Zero M'\ninst✝ : SMul R M'\nf : ZeroHom R' R\nm : M\n⊢ ↑f 0 • m = 0\n[PROOFSTEP]\nrw [map_zero, zero_smul]\n[GOAL]\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝⁴ : MonoidWithZero R\ninst✝³ : MonoidWithZero R'\ninst✝² : Zero M\ninst✝¹ : MulActionWithZero R M\ninst✝ : Subsingleton R\nx y : M\n⊢ x = y\n[PROOFSTEP]\nrw [← one_smul R x, ← one_smul R y, Subsingleton.elim (1 : R) 0, zero_smul, zero_smul]\n[GOAL]\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝⁵ : MonoidWithZero R\ninst✝⁴ : MonoidWithZero R'\ninst✝³ : Zero M\ninst✝² : MulActionWithZero R M\ninst✝¹ : Zero M'\ninst✝ : SMul R M'\nf : R' →*₀ R\nsrc✝ : SMulWithZero R' M := SMulWithZero.compHom M ↑f\nm : M\n⊢ 1 • m = m\n[PROOFSTEP]\nshow (f 1) • m = m\n[GOAL]\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝⁵ : MonoidWithZero R\ninst✝⁴ : MonoidWithZero R'\ninst✝³ : Zero M\ninst✝² : MulActionWithZero R M\ninst✝¹ : Zero M'\ninst✝ : SMul R M'\nf : R' →*₀ R\nsrc✝ : SMulWithZero R' M := SMulWithZero.compHom M ↑f\nm : M\n⊢ ↑f 1 • m = m\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝⁵ : MonoidWithZero R\ninst✝⁴ : MonoidWithZero R'\ninst✝³ : Zero M\ninst✝² : MulActionWithZero R M\ninst✝¹ : Zero M'\ninst✝ : SMul R M'\nf : R' →*₀ R\nsrc✝ : SMulWithZero R' M := SMulWithZero.compHom M ↑f\nr s : R'\nm : M\n⊢ (r * s) • m = r • s • m\n[PROOFSTEP]\nshow f (r * s) • m = (f r) • (f s) • m\n[GOAL]\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\ninst✝⁵ : MonoidWithZero R\ninst✝⁴ : MonoidWithZero R'\ninst✝³ : Zero M\ninst✝² : MulActionWithZero R M\ninst✝¹ : Zero M'\ninst✝ : SMul R M'\nf : R' →*₀ R\nsrc✝ : SMulWithZero R' M := SMulWithZero.compHom M ↑f\nr s : R'\nm : M\n⊢ ↑f (r * s) • m = ↑f r • ↑f s • m\n[PROOFSTEP]\nsimp [mul_smul]\n[GOAL]\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : GroupWithZero α\ninst✝³ : GroupWithZero β\ninst✝² : MulActionWithZero α β\ninst✝¹ : SMulCommClass α β β\ninst✝ : IsScalarTower α β β\nc : α\nx : β\n⊢ (c • x)⁻¹ = c⁻¹ • x⁻¹\n[PROOFSTEP]\nobtain rfl | hc := eq_or_ne c 0\n[GOAL]\ncase inl\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : GroupWithZero α\ninst✝³ : GroupWithZero β\ninst✝² : MulActionWithZero α β\ninst✝¹ : SMulCommClass α β β\ninst✝ : IsScalarTower α β β\nx : β\n⊢ (0 • x)⁻¹ = 0⁻¹ • x⁻¹\n[PROOFSTEP]\nsimp only [inv_zero, zero_smul]\n[GOAL]\ncase inr\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : GroupWithZero α\ninst✝³ : GroupWithZero β\ninst✝² : MulActionWithZero α β\ninst✝¹ : SMulCommClass α β β\ninst✝ : IsScalarTower α β β\nc : α\nx : β\nhc : c ≠ 0\n⊢ (c • x)⁻¹ = c⁻¹ • x⁻¹\n[PROOFSTEP]\nobtain rfl | hx := eq_or_ne x 0\n[GOAL]\ncase inr.inl\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : GroupWithZero α\ninst✝³ : GroupWithZero β\ninst✝² : MulActionWithZero α β\ninst✝¹ : SMulCommClass α β β\ninst✝ : IsScalarTower α β β\nc : α\nhc : c ≠ 0\n⊢ (c • 0)⁻¹ = c⁻¹ • 0⁻¹\n[PROOFSTEP]\nsimp only [inv_zero, smul_zero]\n[GOAL]\ncase inr.inr\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : GroupWithZero α\ninst✝³ : GroupWithZero β\ninst✝² : MulActionWithZero α β\ninst✝¹ : SMulCommClass α β β\ninst✝ : IsScalarTower α β β\nc : α\nx : β\nhc : c ≠ 0\nhx : x ≠ 0\n⊢ (c • x)⁻¹ = c⁻¹ • x⁻¹\n[PROOFSTEP]\nrefine' inv_eq_of_mul_eq_one_left _\n[GOAL]\ncase inr.inr\nR : Type u_1\nR' : Type u_2\nM : Type u_3\nM' : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : GroupWithZero α\ninst✝³ : GroupWithZero β\ninst✝² : MulActionWithZero α β\ninst✝¹ : SMulCommClass α β β\ninst✝ : IsScalarTower α β β\nc : α\nx : β\nhc : c ≠ 0\nhx : x ≠ 0\n⊢ c⁻¹ • x⁻¹ * c • x = 1\n[PROOFSTEP]\nrw [smul_mul_smul, inv_mul_cancel hc, inv_mul_cancel hx, one_smul]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.SMulWithZero", "llama_tokens": 3190, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6825737344123242, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.39937467983346064}}
{"text": "[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nS : Subalgebra R A\n⊢ IsAlgebraic S ↔ Algebra.IsAlgebraic R { x // x ∈ S }\n[PROOFSTEP]\ndelta Algebra.IsAlgebraic Subalgebra.IsAlgebraic\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nS : Subalgebra R A\n⊢ (∀ (x : A), x ∈ S → _root_.IsAlgebraic R x) ↔ ∀ (x : { x // x ∈ S }), _root_.IsAlgebraic R x\n[PROOFSTEP]\nrw [Subtype.forall']\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nS : Subalgebra R A\n⊢ (∀ (x : { a // a ∈ S }), _root_.IsAlgebraic R ↑x) ↔ ∀ (x : { x // x ∈ S }), _root_.IsAlgebraic R x\n[PROOFSTEP]\nrefine' forall_congr' fun x => exists_congr fun p => and_congr Iff.rfl _\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nS : Subalgebra R A\nx : { a // a ∈ S }\np : R[X]\n⊢ ↑(aeval ↑x) p = 0 ↔ ↑(aeval x) p = 0\n[PROOFSTEP]\nhave h : Function.Injective S.val := Subtype.val_injective\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nS : Subalgebra R A\nx : { a // a ∈ S }\np : R[X]\nh : Function.Injective ↑(val S)\n⊢ ↑(aeval ↑x) p = 0 ↔ ↑(aeval x) p = 0\n[PROOFSTEP]\nconv_rhs => rw [← h.eq_iff, AlgHom.map_zero]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nS : Subalgebra R A\nx : { a // a ∈ S }\np : R[X]\nh : Function.Injective ↑(val S)\n| ↑(aeval x) p = 0\n[PROOFSTEP]\nrw [← h.eq_iff, AlgHom.map_zero]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nS : Subalgebra R A\nx : { a // a ∈ S }\np : R[X]\nh : Function.Injective ↑(val S)\n| ↑(aeval x) p = 0\n[PROOFSTEP]\nrw [← h.eq_iff, AlgHom.map_zero]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nS : Subalgebra R A\nx : { a // a ∈ S }\np : R[X]\nh : Function.Injective ↑(val S)\n| ↑(aeval x) p = 0\n[PROOFSTEP]\nrw [← h.eq_iff, AlgHom.map_zero]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nS : Subalgebra R A\nx : { a // a ∈ S }\np : R[X]\nh : Function.Injective ↑(val S)\n⊢ ↑(aeval ↑x) p = 0 ↔ ↑(val S) (↑(aeval x) p) = 0\n[PROOFSTEP]\nrw [← aeval_algHom_apply, S.val_apply]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\n⊢ IsAlgebraic R A ↔ Subalgebra.IsAlgebraic ⊤\n[PROOFSTEP]\ndelta Algebra.IsAlgebraic Subalgebra.IsAlgebraic\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\n⊢ (∀ (x : A), _root_.IsAlgebraic R x) ↔ ∀ (x : A), x ∈ ⊤ → _root_.IsAlgebraic R x\n[PROOFSTEP]\nsimp only [Algebra.mem_top, forall_prop_of_true, iff_self_iff]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nx : A\n⊢ IsAlgebraic R x ↔ ¬Function.Injective ↑(aeval x)\n[PROOFSTEP]\nsimp only [IsAlgebraic, injective_iff_map_eq_zero, not_forall, and_comm, exists_prop]\n[GOAL]\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : Ring A\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R S\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\ninst✝ : Nontrivial R\nx : R\n⊢ ↑(aeval (↑(algebraMap R A) x)) (X - ↑C x) = 0\n[PROOFSTEP]\nrw [_root_.map_sub, aeval_X, aeval_C, sub_self]\n[GOAL]\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : Ring A\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R S\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\ninst✝ : Nontrivial R\n⊢ IsAlgebraic R 1\n[PROOFSTEP]\nrw [← _root_.map_one (algebraMap R A)]\n[GOAL]\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : Ring A\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R S\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\ninst✝ : Nontrivial R\n⊢ IsAlgebraic R (↑(algebraMap R A) 1)\n[PROOFSTEP]\nexact isAlgebraic_algebraMap 1\n[GOAL]\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : Ring A\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R S\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\ninst✝ : Nontrivial R\nn : ℕ\n⊢ IsAlgebraic R ↑n\n[PROOFSTEP]\nrw [← map_natCast (_ : R →+* A) n]\n[GOAL]\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : Ring A\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R S\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\ninst✝ : Nontrivial R\nn : ℕ\n⊢ IsAlgebraic R (↑?m.103292 ↑n)\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : Ring A\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R S\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\ninst✝ : Nontrivial R\nn : ℕ\n⊢ R →+* A\n[PROOFSTEP]\nexact isAlgebraic_algebraMap (Nat.cast n)\n[GOAL]\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : Ring A\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R S\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\ninst✝ : Nontrivial R\nn : ℤ\n⊢ IsAlgebraic R ↑n\n[PROOFSTEP]\nrw [← _root_.map_intCast (algebraMap R A)]\n[GOAL]\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : Ring A\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R S\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\ninst✝ : Nontrivial R\nn : ℤ\n⊢ IsAlgebraic R (↑(algebraMap R A) ↑n)\n[PROOFSTEP]\nexact isAlgebraic_algebraMap (Int.cast n)\n[GOAL]\nR✝ : Type u\nS : Type u_1\nA✝ : Type v\ninst✝⁹ : CommRing R✝\ninst✝⁸ : CommRing S\ninst✝⁷ : Ring A✝\ninst✝⁶ : Algebra R✝ A✝\ninst✝⁵ : Algebra R✝ S\ninst✝⁴ : Algebra S A✝\ninst✝³ : IsScalarTower R✝ S A✝\nR : Type u\nA : Type v\ninst✝² : DivisionRing A\ninst✝¹ : Field R\ninst✝ : Algebra R A\nn : ℚ\n⊢ IsAlgebraic R ↑n\n[PROOFSTEP]\nrw [← map_ratCast (algebraMap R A)]\n[GOAL]\nR✝ : Type u\nS : Type u_1\nA✝ : Type v\ninst✝⁹ : CommRing R✝\ninst✝⁸ : CommRing S\ninst✝⁷ : Ring A✝\ninst✝⁶ : Algebra R✝ A✝\ninst✝⁵ : Algebra R✝ S\ninst✝⁴ : Algebra S A✝\ninst✝³ : IsScalarTower R✝ S A✝\nR : Type u\nA : Type v\ninst✝² : DivisionRing A\ninst✝¹ : Field R\ninst✝ : Algebra R A\nn : ℚ\n⊢ IsAlgebraic R (↑(algebraMap R A) ↑n)\n[PROOFSTEP]\nexact isAlgebraic_algebraMap (Rat.cast n)\n[GOAL]\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Ring A\ninst✝³ : Algebra R A\ninst✝² : Algebra R S\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\na : S\nx✝ : IsAlgebraic R a\nf : R[X]\nhf₁ : f ≠ 0\nhf₂ : ↑(aeval a) f = 0\n⊢ ↑(aeval (↑(algebraMap S A) a)) f = 0\n[PROOFSTEP]\nrw [aeval_algebraMap_apply, hf₂, map_zero]\n[GOAL]\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : Ring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S A\ninst✝² : IsScalarTower R S A\nB : Type u_2\ninst✝¹ : Ring B\ninst✝ : Algebra R B\nf : A →ₐ[R] B\na : A\nh : IsAlgebraic R a\np : R[X]\nhp : p ≠ 0\nha : ↑(aeval a) p = 0\n⊢ ↑(aeval (↑f a)) p = 0\n[PROOFSTEP]\nrw [aeval_algHom, f.comp_apply, ha, map_zero]\n[GOAL]\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : Ring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S A\ninst✝² : IsScalarTower R S A\nB : Type u_2\ninst✝¹ : Ring B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nh : Algebra.IsAlgebraic R A\nb : B\n⊢ IsAlgebraic R b\n[PROOFSTEP]\nconvert ← isAlgebraic_algHom_of_isAlgebraic e.toAlgHom (h _)\n[GOAL]\ncase h.e'_6\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : Ring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S A\ninst✝² : IsScalarTower R S A\nB : Type u_2\ninst✝¹ : Ring B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nh : Algebra.IsAlgebraic R A\nb : B\n⊢ ↑↑e ?m.164018 = b\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : Ring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S A\ninst✝² : IsScalarTower R S A\nB : Type u_2\ninst✝¹ : Ring B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nh : Algebra.IsAlgebraic R A\nb : B\n⊢ A\n[PROOFSTEP]\nrefine e.apply_symm_apply ?_\n[GOAL]\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Ring A\ninst✝³ : Algebra R A\ninst✝² : Algebra R S\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\na : S\nh : Function.Injective ↑(algebraMap S A)\nx✝ : IsAlgebraic R (↑(algebraMap S A) a)\np : R[X]\nhp0 : p ≠ 0\nhp : ↑(aeval (↑(algebraMap S A) a)) p = 0\n⊢ ↑(algebraMap S A) (↑(aeval a) p) = ↑(algebraMap S A) 0\n[PROOFSTEP]\nrwa [map_zero, ← aeval_algebraMap_apply]\n[GOAL]\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Ring A\ninst✝³ : Algebra R A\ninst✝² : Algebra R S\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\nr : A\nn : ℕ\nhn : 0 < n\nht : IsAlgebraic R (r ^ n)\n⊢ IsAlgebraic R r\n[PROOFSTEP]\nobtain ⟨p, p_nonzero, hp⟩ := ht\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Ring A\ninst✝³ : Algebra R A\ninst✝² : Algebra R S\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\nr : A\nn : ℕ\nhn : 0 < n\np : R[X]\np_nonzero : p ≠ 0\nhp : ↑(aeval (r ^ n)) p = 0\n⊢ IsAlgebraic R r\n[PROOFSTEP]\nrefine ⟨Polynomial.expand _ n p, ?_, ?_⟩\n[GOAL]\ncase intro.intro.refine_1\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Ring A\ninst✝³ : Algebra R A\ninst✝² : Algebra R S\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\nr : A\nn : ℕ\nhn : 0 < n\np : R[X]\np_nonzero : p ≠ 0\nhp : ↑(aeval (r ^ n)) p = 0\n⊢ ↑(expand R n) p ≠ 0\n[PROOFSTEP]\nrwa [Polynomial.expand_ne_zero hn]\n[GOAL]\ncase intro.intro.refine_2\nR : Type u\nS : Type u_1\nA : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Ring A\ninst✝³ : Algebra R A\ninst✝² : Algebra R S\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\nr : A\nn : ℕ\nhn : 0 < n\np : R[X]\np_nonzero : p ≠ 0\nhp : ↑(aeval (r ^ n)) p = 0\n⊢ ↑(aeval r) (↑(expand R n) p) = 0\n[PROOFSTEP]\nrwa [Polynomial.expand_aeval n p r]\n[GOAL]\nK : Type u\nA : Type v\ninst✝² : Field K\ninst✝¹ : Ring A\ninst✝ : Algebra K A\nx : A\n⊢ IsAlgebraic K x ↔ IsIntegral K x\n[PROOFSTEP]\nrefine' ⟨_, IsIntegral.isAlgebraic K⟩\n[GOAL]\nK : Type u\nA : Type v\ninst✝² : Field K\ninst✝¹ : Ring A\ninst✝ : Algebra K A\nx : A\n⊢ IsAlgebraic K x → IsIntegral K x\n[PROOFSTEP]\nrintro ⟨p, hp, hpx⟩\n[GOAL]\ncase intro.intro\nK : Type u\nA : Type v\ninst✝² : Field K\ninst✝¹ : Ring A\ninst✝ : Algebra K A\nx : A\np : K[X]\nhp : p ≠ 0\nhpx : ↑(aeval x) p = 0\n⊢ IsIntegral K x\n[PROOFSTEP]\nrefine' ⟨_, monic_mul_leadingCoeff_inv hp, _⟩\n[GOAL]\ncase intro.intro\nK : Type u\nA : Type v\ninst✝² : Field K\ninst✝¹ : Ring A\ninst✝ : Algebra K A\nx : A\np : K[X]\nhp : p ≠ 0\nhpx : ↑(aeval x) p = 0\n⊢ eval₂ (algebraMap K A) x (p * ↑C (leadingCoeff p)⁻¹) = 0\n[PROOFSTEP]\nrw [← aeval_def, AlgHom.map_mul, hpx, zero_mul]\n[GOAL]\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Ring A\ninst✝³ : Algebra R S\ninst✝² : Algebra S A\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R S A\nhinj : Function.Injective ↑(algebraMap R S)\nx : A\nA_alg : IsAlgebraic R x\np : R[X]\nhp₁ : p ≠ 0\nhp₂ : ↑(aeval x) p = 0\n⊢ map (algebraMap R S) p ≠ 0\n[PROOFSTEP]\nrwa [Ne.def, ← degree_eq_bot, degree_map_eq_of_injective hinj, degree_eq_bot]\n[GOAL]\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Ring A\ninst✝³ : Algebra R S\ninst✝² : Algebra S A\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R S A\nhinj : Function.Injective ↑(algebraMap R S)\nx : A\nA_alg : IsAlgebraic R x\np : R[X]\nhp₁ : p ≠ 0\nhp₂ : ↑(aeval x) p = 0\n⊢ ↑(aeval x) (map (algebraMap R S) p) = 0\n[PROOFSTEP]\nsimpa\n[GOAL]\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : CommRing A\ninst✝³ : Algebra K L\ninst✝² : Algebra L A\ninst✝¹ : Algebra K A\ninst✝ : IsScalarTower K L A\nL_alg : IsAlgebraic K L\nA_alg : IsAlgebraic L A\n⊢ IsAlgebraic K A\n[PROOFSTEP]\nsimp only [IsAlgebraic, isAlgebraic_iff_isIntegral] at L_alg A_alg ⊢\n[GOAL]\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : CommRing A\ninst✝³ : Algebra K L\ninst✝² : Algebra L A\ninst✝¹ : Algebra K A\ninst✝ : IsScalarTower K L A\nL_alg : ∀ (x : L), IsIntegral K x\nA_alg : ∀ (x : A), IsIntegral L x\n⊢ ∀ (x : A), IsIntegral K x\n[PROOFSTEP]\nexact isIntegral_trans L_alg A_alg\n[GOAL]\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nha : IsAlgebraic K L\nf : L →ₐ[K] L\n⊢ Function.Bijective ↑f\n[PROOFSTEP]\nrefine' ⟨f.toRingHom.injective, fun b => _⟩\n[GOAL]\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nha : IsAlgebraic K L\nf : L →ₐ[K] L\nb : L\n⊢ ∃ a, ↑f a = b\n[PROOFSTEP]\nobtain ⟨p, hp, he⟩ := ha b\n[GOAL]\ncase intro.intro\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nha : IsAlgebraic K L\nf : L →ₐ[K] L\nb : L\np : K[X]\nhp : p ≠ 0\nhe : ↑(aeval b) p = 0\n⊢ ∃ a, ↑f a = b\n[PROOFSTEP]\nlet f' : p.rootSet L → p.rootSet L := (rootSet_maps_to' (fun x => x) f).restrict f _ _\n[GOAL]\ncase intro.intro\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nha : IsAlgebraic K L\nf : L →ₐ[K] L\nb : L\np : K[X]\nhp : p ≠ 0\nhe : ↑(aeval b) p = 0\nf' : ↑(rootSet p L) → ↑(rootSet p L) :=\n  Set.MapsTo.restrict (↑f) (rootSet p L) (rootSet p L) (_ : Set.MapsTo (↑f) (rootSet p L) (rootSet p L))\n⊢ ∃ a, ↑f a = b\n[PROOFSTEP]\nhave : Function.Surjective f' :=\n  Finite.injective_iff_surjective.1 fun _ _ h => Subtype.eq <| f.toRingHom.injective <| Subtype.ext_iff.1 h\n[GOAL]\ncase intro.intro\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nha : IsAlgebraic K L\nf : L →ₐ[K] L\nb : L\np : K[X]\nhp : p ≠ 0\nhe : ↑(aeval b) p = 0\nf' : ↑(rootSet p L) → ↑(rootSet p L) :=\n  Set.MapsTo.restrict (↑f) (rootSet p L) (rootSet p L) (_ : Set.MapsTo (↑f) (rootSet p L) (rootSet p L))\nthis : Function.Surjective f'\n⊢ ∃ a, ↑f a = b\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := this ⟨b, mem_rootSet.2 ⟨hp, he⟩⟩\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nha✝ : IsAlgebraic K L\nf : L →ₐ[K] L\nb : L\np : K[X]\nhp : p ≠ 0\nhe : ↑(aeval b) p = 0\nf' : ↑(rootSet p L) → ↑(rootSet p L) :=\n  Set.MapsTo.restrict (↑f) (rootSet p L) (rootSet p L) (_ : Set.MapsTo (↑f) (rootSet p L) (rootSet p L))\nthis : Function.Surjective f'\na : ↑(rootSet p L)\nha : f' a = { val := b, property := (_ : b ∈ rootSet p L) }\n⊢ ∃ a, ↑f a = b\n[PROOFSTEP]\nexact ⟨a, Subtype.ext_iff.1 ha⟩\n[GOAL]\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nha : IsAlgebraic K L\nx✝ : L ≃ₐ[K] L\n⊢ (fun ϕ => AlgEquiv.ofBijective ϕ (_ : Function.Bijective ↑ϕ)) ((fun ϕ => ↑ϕ) x✝) = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nha : IsAlgebraic K L\nx✝ : L ≃ₐ[K] L\na✝ : L\n⊢ ↑((fun ϕ => AlgEquiv.ofBijective ϕ (_ : Function.Bijective ↑ϕ)) ((fun ϕ => ↑ϕ) x✝)) a✝ = ↑x✝ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nha : IsAlgebraic K L\nx✝ : L →ₐ[K] L\n⊢ (fun ϕ => ↑ϕ) ((fun ϕ => AlgEquiv.ofBijective ϕ (_ : Function.Bijective ↑ϕ)) x✝) = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase H\nK : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nA : Type u_5\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nha : IsAlgebraic K L\nx✝¹ : L →ₐ[K] L\nx✝ : L\n⊢ ↑((fun ϕ => ↑ϕ) ((fun ϕ => AlgEquiv.ofBijective ϕ (_ : Function.Bijective ↑ϕ)) x✝¹)) x✝ = ↑x✝¹ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nz : S\nhz : IsAlgebraic R z\ninj : ∀ (x : R), ↑(algebraMap R S) x = 0 → x = 0\n⊢ ∃ x y x_1, z * ↑(algebraMap R S) y = ↑x\n[PROOFSTEP]\nrcases hz with ⟨p, p_ne_zero, px⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nz : S\ninj : ∀ (x : R), ↑(algebraMap R S) x = 0 → x = 0\np : R[X]\np_ne_zero : p ≠ 0\npx : ↑(aeval z) p = 0\n⊢ ∃ x y x_1, z * ↑(algebraMap R S) y = ↑x\n[PROOFSTEP]\nset a := p.leadingCoeff\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nz : S\ninj : ∀ (x : R), ↑(algebraMap R S) x = 0 → x = 0\np : R[X]\np_ne_zero : p ≠ 0\npx : ↑(aeval z) p = 0\na : R := leadingCoeff p\n⊢ ∃ x y x_1, z * ↑(algebraMap R S) y = ↑x\n[PROOFSTEP]\nhave a_ne_zero : a ≠ 0 := mt Polynomial.leadingCoeff_eq_zero.mp p_ne_zero\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nz : S\ninj : ∀ (x : R), ↑(algebraMap R S) x = 0 → x = 0\np : R[X]\np_ne_zero : p ≠ 0\npx : ↑(aeval z) p = 0\na : R := leadingCoeff p\na_ne_zero : a ≠ 0\n⊢ ∃ x y x_1, z * ↑(algebraMap R S) y = ↑x\n[PROOFSTEP]\nhave x_integral : IsIntegral R (z * algebraMap R S a) :=\n  ⟨p.integralNormalization, monic_integralNormalization p_ne_zero, integralNormalization_aeval_eq_zero px inj⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nz : S\ninj : ∀ (x : R), ↑(algebraMap R S) x = 0 → x = 0\np : R[X]\np_ne_zero : p ≠ 0\npx : ↑(aeval z) p = 0\na : R := leadingCoeff p\na_ne_zero : a ≠ 0\nx_integral : IsIntegral R (z * ↑(algebraMap R S) a)\n⊢ ∃ x y x_1, z * ↑(algebraMap R S) y = ↑x\n[PROOFSTEP]\nexact ⟨⟨_, x_integral⟩, a, a_ne_zero, rfl⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁸ : CommRing R\ninst✝⁷ : IsDomain R\ninst✝⁶ : CommRing S\nL : Type u_3\ninst✝⁵ : Field L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R S L\ninst✝ : IsIntegralClosure S R L\nh : Algebra.IsAlgebraic R L\ninj : Function.Injective ↑(algebraMap R L)\na b : S\nhb : b ≠ 0\n⊢ ∃ c d x, d • a = b * c\n[PROOFSTEP]\nobtain ⟨c, d, d_ne, hx⟩ :=\n  exists_integral_multiple (h (algebraMap _ L a / algebraMap _ L b)) ((injective_iff_map_eq_zero _).mp inj)\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝⁸ : CommRing R\ninst✝⁷ : IsDomain R\ninst✝⁶ : CommRing S\nL : Type u_3\ninst✝⁵ : Field L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R S L\ninst✝ : IsIntegralClosure S R L\nh : Algebra.IsAlgebraic R L\ninj : Function.Injective ↑(algebraMap R L)\na b : S\nhb : b ≠ 0\nc : { x // x ∈ integralClosure R L }\nd : R\nd_ne : d ≠ 0\nhx : ↑(algebraMap S L) a / ↑(algebraMap S L) b * ↑(algebraMap R L) d = ↑c\n⊢ ∃ c d x, d • a = b * c\n[PROOFSTEP]\nrefine' ⟨IsIntegralClosure.mk' S (c : L) c.2, d, d_ne, IsIntegralClosure.algebraMap_injective S R L _⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝⁸ : CommRing R\ninst✝⁷ : IsDomain R\ninst✝⁶ : CommRing S\nL : Type u_3\ninst✝⁵ : Field L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R S L\ninst✝ : IsIntegralClosure S R L\nh : Algebra.IsAlgebraic R L\ninj : Function.Injective ↑(algebraMap R L)\na b : S\nhb : b ≠ 0\nc : { x // x ∈ integralClosure R L }\nd : R\nd_ne : d ≠ 0\nhx : ↑(algebraMap S L) a / ↑(algebraMap S L) b * ↑(algebraMap R L) d = ↑c\n⊢ ↑(algebraMap S L) (d • a) = ↑(algebraMap S L) (b * mk' S ↑c (_ : ↑c ∈ integralClosure R L))\n[PROOFSTEP]\nsimp only [Algebra.smul_def, RingHom.map_mul, IsIntegralClosure.algebraMap_mk', ← hx, ← IsScalarTower.algebraMap_apply]\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝⁸ : CommRing R\ninst✝⁷ : IsDomain R\ninst✝⁶ : CommRing S\nL : Type u_3\ninst✝⁵ : Field L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R S L\ninst✝ : IsIntegralClosure S R L\nh : Algebra.IsAlgebraic R L\ninj : Function.Injective ↑(algebraMap R L)\na b : S\nhb : b ≠ 0\nc : { x // x ∈ integralClosure R L }\nd : R\nd_ne : d ≠ 0\nhx : ↑(algebraMap S L) a / ↑(algebraMap S L) b * ↑(algebraMap R L) d = ↑c\n⊢ ↑(algebraMap R L) d * ↑(algebraMap S L) a =\n    ↑(algebraMap S L) b * (↑(algebraMap S L) a / ↑(algebraMap S L) b * ↑(algebraMap R L) d)\n[PROOFSTEP]\nrw [← mul_assoc _ (_ / _), mul_div_cancel' (algebraMap S L a), mul_comm]\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝⁸ : CommRing R\ninst✝⁷ : IsDomain R\ninst✝⁶ : CommRing S\nL : Type u_3\ninst✝⁵ : Field L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R S L\ninst✝ : IsIntegralClosure S R L\nh : Algebra.IsAlgebraic R L\ninj : Function.Injective ↑(algebraMap R L)\na b : S\nhb : b ≠ 0\nc : { x // x ∈ integralClosure R L }\nd : R\nd_ne : d ≠ 0\nhx : ↑(algebraMap S L) a / ↑(algebraMap S L) b * ↑(algebraMap R L) d = ↑c\n⊢ ↑(algebraMap S L) b ≠ 0\n[PROOFSTEP]\nexact mt ((injective_iff_map_eq_zero _).mp (IsIntegralClosure.algebraMap_injective S R L) _) hb\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_ne : ↑(aeval x) (divX p) ≠ 0\n⊢ x⁻¹ = ↑(aeval x) (divX p) / (↑(aeval x) p - ↑(algebraMap K L) (coeff p 0))\n[PROOFSTEP]\nrw [inv_eq_iff_eq_inv, inv_div, eq_comm, div_eq_iff, sub_eq_iff_eq_add, mul_comm]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_ne : ↑(aeval x) (divX p) ≠ 0\n⊢ ↑(aeval x) p = ↑(aeval x) (divX p) * x + ↑(algebraMap K L) (coeff p 0)\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_ne : ↑(aeval x) (divX p) ≠ 0\n⊢ ↑(aeval x) (divX p) ≠ 0\n[PROOFSTEP]\nconv_lhs => rw [← divX_mul_X_add p]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_ne : ↑(aeval x) (divX p) ≠ 0\n| ↑(aeval x) p\n[PROOFSTEP]\nrw [← divX_mul_X_add p]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_ne : ↑(aeval x) (divX p) ≠ 0\n| ↑(aeval x) p\n[PROOFSTEP]\nrw [← divX_mul_X_add p]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_ne : ↑(aeval x) (divX p) ≠ 0\n| ↑(aeval x) p\n[PROOFSTEP]\nrw [← divX_mul_X_add p]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_ne : ↑(aeval x) (divX p) ≠ 0\n⊢ ↑(aeval x) (divX p * X + ↑C (coeff p 0)) = ↑(aeval x) (divX p) * x + ↑(algebraMap K L) (coeff p 0)\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_ne : ↑(aeval x) (divX p) ≠ 0\n⊢ ↑(aeval x) (divX p) ≠ 0\n[PROOFSTEP]\nrw [AlgHom.map_add, AlgHom.map_mul, aeval_X, aeval_C]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_ne : ↑(aeval x) (divX p) ≠ 0\n⊢ ↑(aeval x) (divX p) ≠ 0\n[PROOFSTEP]\nexact aeval_ne\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\n⊢ x⁻¹ = -(↑(aeval x) (divX p) / ↑(algebraMap K L) (coeff p 0))\n[PROOFSTEP]\nconvert inv_eq_of_aeval_divX_ne_zero (p := p) (L := L) (mt (fun h => (algebraMap K L).injective ?_) coeff_zero_ne) using\n  1\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\n⊢ -(↑(aeval x) (divX p) / ↑(algebraMap K L) (coeff p 0)) =\n    ↑(aeval x) (divX p) / (↑(aeval x) p - ↑(algebraMap K L) (coeff p 0))\n[PROOFSTEP]\nrw [aeval_eq, zero_sub, div_neg]\n[GOAL]\ncase convert_2\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\nh : ↑(aeval x) (divX p) = 0\n⊢ ↑(algebraMap K L) (coeff p 0) = ↑(algebraMap K L) 0\n[PROOFSTEP]\nrw [RingHom.map_zero]\n[GOAL]\ncase convert_2\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\nh : ↑(aeval x) (divX p) = 0\n⊢ ↑(algebraMap K L) (coeff p 0) = 0\n[PROOFSTEP]\nconvert aeval_eq\n[GOAL]\ncase h.e'_2\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\nh : ↑(aeval x) (divX p) = 0\n⊢ ↑(algebraMap K L) (coeff p 0) = ↑(aeval x) p\n[PROOFSTEP]\nconv_rhs => rw [← divX_mul_X_add p]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\nh : ↑(aeval x) (divX p) = 0\n| ↑(aeval x) p\n[PROOFSTEP]\nrw [← divX_mul_X_add p]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\nh : ↑(aeval x) (divX p) = 0\n| ↑(aeval x) p\n[PROOFSTEP]\nrw [← divX_mul_X_add p]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\nh : ↑(aeval x) (divX p) = 0\n| ↑(aeval x) p\n[PROOFSTEP]\nrw [← divX_mul_X_add p]\n[GOAL]\ncase h.e'_2\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : L\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\nh : ↑(aeval x) (divX p) = 0\n⊢ ↑(algebraMap K L) (coeff p 0) = ↑(aeval x) (divX p * X + ↑C (coeff p 0))\n[PROOFSTEP]\nrw [AlgHom.map_add, AlgHom.map_mul, h, zero_mul, zero_add, aeval_C]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\n⊢ (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nsuffices (x⁻¹ : L) = (-p.coeff 0)⁻¹ • aeval x (divX p) by\n  rw [this]\n  exact A.smul_mem (aeval x _).2 _\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\nthis : (↑x)⁻¹ = ↑((-coeff p 0)⁻¹ • ↑(aeval x) (divX p))\n⊢ (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nrw [this]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\nthis : (↑x)⁻¹ = ↑((-coeff p 0)⁻¹ • ↑(aeval x) (divX p))\n⊢ ↑((-coeff p 0)⁻¹ • ↑(aeval x) (divX p)) ∈ A\n[PROOFSTEP]\nexact A.smul_mem (aeval x _).2 _\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\n⊢ (↑x)⁻¹ = ↑((-coeff p 0)⁻¹ • ↑(aeval x) (divX p))\n[PROOFSTEP]\nhave : aeval (x : L) p = 0 := by\n  rw [Subalgebra.aeval_coe, aeval_eq, Subalgebra.coe_zero]\n    -- porting note: this was a long sequence of `rw`.\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\n⊢ ↑(aeval ↑x) p = 0\n[PROOFSTEP]\nrw [Subalgebra.aeval_coe, aeval_eq, Subalgebra.coe_zero]\n  -- porting note: this was a long sequence of `rw`.\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\nthis : ↑(aeval ↑x) p = 0\n⊢ (↑x)⁻¹ = ↑((-coeff p 0)⁻¹ • ↑(aeval x) (divX p))\n[PROOFSTEP]\nrw [inv_eq_of_root_of_coeff_zero_ne_zero this coeff_zero_ne, div_eq_inv_mul, Algebra.smul_def]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\nthis : ↑(aeval ↑x) p = 0\n⊢ -((↑(algebraMap K L) (coeff p 0))⁻¹ * ↑(aeval ↑x) (divX p)) =\n    ↑(↑(algebraMap K ((fun x => { x // x ∈ A }) (divX p))) (-coeff p 0)⁻¹ * ↑(aeval x) (divX p))\n[PROOFSTEP]\nsimp only [aeval_coe, Submonoid.coe_mul, Subsemiring.coe_toSubmonoid, coe_toSubsemiring, coe_algebraMap]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\naeval_eq : ↑(aeval x) p = 0\ncoeff_zero_ne : coeff p 0 ≠ 0\nthis : ↑(aeval ↑x) p = 0\n⊢ -((↑(algebraMap K L) (coeff p 0))⁻¹ * ↑(↑(aeval x) (divX p))) =\n    ↑(algebraMap K L) (-coeff p 0)⁻¹ * ↑(↑(aeval x) (divX p))\n[PROOFSTEP]\nrw [map_inv₀, map_neg, inv_neg, neg_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\nhx : _root_.IsAlgebraic K ↑x\n⊢ (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nobtain ⟨p, ne_zero, aeval_eq⟩ := hx\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\nne_zero : p ≠ 0\naeval_eq : ↑(aeval ↑x) p = 0\n⊢ (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nrw [Subalgebra.aeval_coe, Subalgebra.coe_eq_zero] at aeval_eq \n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\nne_zero : p ≠ 0\naeval_eq : ↑(aeval x) p = 0\n⊢ (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nrevert ne_zero aeval_eq\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\n⊢ p ≠ 0 → ↑(aeval x) p = 0 → (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nrefine' p.recOnHorner _ _ _\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\n⊢ 0 ≠ 0 → ↑(aeval x) 0 = 0 → (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nintro h\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\nh : 0 ≠ 0\n⊢ ↑(aeval x) 0 = 0 → (↑x)⁻¹ ∈ A\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\n⊢ ∀ (p : K[X]) (a : K),\n    coeff p 0 = 0 →\n      a ≠ 0 → (p ≠ 0 → ↑(aeval x) p = 0 → (↑x)⁻¹ ∈ A) → p + ↑C a ≠ 0 → ↑(aeval x) (p + ↑C a) = 0 → (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nintro p a hp ha _ih _ne_zero aeval_eq\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np✝ p : K[X]\na : K\nhp : coeff p 0 = 0\nha : a ≠ 0\n_ih : p ≠ 0 → ↑(aeval x) p = 0 → (↑x)⁻¹ ∈ A\n_ne_zero : p + ↑C a ≠ 0\naeval_eq : ↑(aeval x) (p + ↑C a) = 0\n⊢ (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nrefine' A.inv_mem_of_root_of_coeff_zero_ne_zero aeval_eq _\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np✝ p : K[X]\na : K\nhp : coeff p 0 = 0\nha : a ≠ 0\n_ih : p ≠ 0 → ↑(aeval x) p = 0 → (↑x)⁻¹ ∈ A\n_ne_zero : p + ↑C a ≠ 0\naeval_eq : ↑(aeval x) (p + ↑C a) = 0\n⊢ coeff (p + ↑C a) 0 ≠ 0\n[PROOFSTEP]\nrwa [coeff_add, hp, zero_add, coeff_C, if_pos rfl]\n[GOAL]\ncase intro.intro.refine'_3\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np : K[X]\n⊢ ∀ (p : K[X]), p ≠ 0 → (p ≠ 0 → ↑(aeval x) p = 0 → (↑x)⁻¹ ∈ A) → p * X ≠ 0 → ↑(aeval x) (p * X) = 0 → (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nintro p hp ih _ne_zero aeval_eq\n[GOAL]\ncase intro.intro.refine'_3\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np✝ p : K[X]\nhp : p ≠ 0\nih : p ≠ 0 → ↑(aeval x) p = 0 → (↑x)⁻¹ ∈ A\n_ne_zero : p * X ≠ 0\naeval_eq : ↑(aeval x) (p * X) = 0\n⊢ (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nrw [AlgHom.map_mul, aeval_X, mul_eq_zero] at aeval_eq \n[GOAL]\ncase intro.intro.refine'_3\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np✝ p : K[X]\nhp : p ≠ 0\nih : p ≠ 0 → ↑(aeval x) p = 0 → (↑x)⁻¹ ∈ A\n_ne_zero : p * X ≠ 0\naeval_eq : ↑(aeval x) p = 0 ∨ x = 0\n⊢ (↑x)⁻¹ ∈ A\n[PROOFSTEP]\ncases' aeval_eq with aeval_eq x_eq\n[GOAL]\ncase intro.intro.refine'_3.inl\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np✝ p : K[X]\nhp : p ≠ 0\nih : p ≠ 0 → ↑(aeval x) p = 0 → (↑x)⁻¹ ∈ A\n_ne_zero : p * X ≠ 0\naeval_eq : ↑(aeval x) p = 0\n⊢ (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nexact ih hp aeval_eq\n[GOAL]\ncase intro.intro.refine'_3.inr\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np✝ p : K[X]\nhp : p ≠ 0\nih : p ≠ 0 → ↑(aeval x) p = 0 → (↑x)⁻¹ ∈ A\n_ne_zero : p * X ≠ 0\nx_eq : x = 0\n⊢ (↑x)⁻¹ ∈ A\n[PROOFSTEP]\nrw [x_eq, Subalgebra.coe_zero, inv_zero]\n[GOAL]\ncase intro.intro.refine'_3.inr\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nx : { x // x ∈ A }\np✝ p : K[X]\nhp : p ≠ 0\nih : p ≠ 0 → ↑(aeval x) p = 0 → (↑x)⁻¹ ∈ A\n_ne_zero : p * X ≠ 0\nx_eq : x = 0\n⊢ 0 ∈ A\n[PROOFSTEP]\nexact A.zero_mem\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommRing S\nK : Type u_3\nL : Type u_4\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nA : Subalgebra K L\nhKL : Algebra.IsAlgebraic K L\n⊢ Nontrivial { x // x ∈ A }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁷ : CommRing R\ninst✝⁶ : IsDomain R\ninst✝⁵ : CommRing S\nR' : Type u\nS' : Type v\nT' : Type w\ninst✝⁴ : CommSemiring R'\ninst✝³ : CommSemiring S'\ninst✝² : CommSemiring T'\ninst✝¹ : Algebra R' S'\ninst✝ : Algebra S' T'\nsrc✝ : SMul R'[X] (S' → T') := hasSMulPi' R' S' T'\n⊢ (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1\n[PROOFSTEP]\nfunext z\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝⁷ : CommRing R\ninst✝⁶ : IsDomain R\ninst✝⁵ : CommRing S\nR' : Type u\nS' : Type v\nT' : Type w\ninst✝⁴ : CommSemiring R'\ninst✝³ : CommSemiring S'\ninst✝² : CommSemiring T'\ninst✝¹ : Algebra R' S'\ninst✝ : Algebra S' T'\nsrc✝ : SMul R'[X] (S' → T') := hasSMulPi' R' S' T'\nz : S'\n⊢ (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 z = OfNat.ofNat 1 z\n[PROOFSTEP]\nsimp only [Polynomial.aeval_one, Pi.one_apply, map_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁷ : CommRing R\ninst✝⁶ : IsDomain R\ninst✝⁵ : CommRing S\nR' : Type u\nS' : Type v\nT' : Type w\ninst✝⁴ : CommSemiring R'\ninst✝³ : CommSemiring S'\ninst✝² : CommSemiring T'\ninst✝¹ : Algebra R' S'\ninst✝ : Algebra S' T'\nsrc✝ : SMul R'[X] (S' → T') := hasSMulPi' R' S' T'\nf g : R'[X]\n⊢ OneHom.toFun\n      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n      (f * g) =\n    OneHom.toFun\n        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n        f *\n      OneHom.toFun\n        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n        g\n[PROOFSTEP]\nfunext z\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝⁷ : CommRing R\ninst✝⁶ : IsDomain R\ninst✝⁵ : CommRing S\nR' : Type u\nS' : Type v\nT' : Type w\ninst✝⁴ : CommSemiring R'\ninst✝³ : CommSemiring S'\ninst✝² : CommSemiring T'\ninst✝¹ : Algebra R' S'\ninst✝ : Algebra S' T'\nsrc✝ : SMul R'[X] (S' → T') := hasSMulPi' R' S' T'\nf g : R'[X]\nz : S'\n⊢ OneHom.toFun\n      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n      (f * g) z =\n    (OneHom.toFun\n          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n          f *\n        OneHom.toFun\n          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n          g)\n      z\n[PROOFSTEP]\nsimp only [Pi.mul_apply, map_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁷ : CommRing R\ninst✝⁶ : IsDomain R\ninst✝⁵ : CommRing S\nR' : Type u\nS' : Type v\nT' : Type w\ninst✝⁴ : CommSemiring R'\ninst✝³ : CommSemiring S'\ninst✝² : CommSemiring T'\ninst✝¹ : Algebra R' S'\ninst✝ : Algebra S' T'\nsrc✝ : SMul R'[X] (S' → T') := hasSMulPi' R' S' T'\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (f g : R'[X]),\n                OneHom.toFun\n                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                    (f * g) =\n                  OneHom.toFun\n                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                      f *\n                    OneHom.toFun\n                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                      g) })\n      0 =\n    0\n[PROOFSTEP]\nfunext z\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝⁷ : CommRing R\ninst✝⁶ : IsDomain R\ninst✝⁵ : CommRing S\nR' : Type u\nS' : Type v\nT' : Type w\ninst✝⁴ : CommSemiring R'\ninst✝³ : CommSemiring S'\ninst✝² : CommSemiring T'\ninst✝¹ : Algebra R' S'\ninst✝ : Algebra S' T'\nsrc✝ : SMul R'[X] (S' → T') := hasSMulPi' R' S' T'\nz : S'\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (f g : R'[X]),\n                OneHom.toFun\n                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                    (f * g) =\n                  OneHom.toFun\n                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                      f *\n                    OneHom.toFun\n                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                      g) })\n      0 z =\n    OfNat.ofNat 0 z\n[PROOFSTEP]\nsimp only [Polynomial.aeval_zero, Pi.zero_apply, map_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁷ : CommRing R\ninst✝⁶ : IsDomain R\ninst✝⁵ : CommRing S\nR' : Type u\nS' : Type v\nT' : Type w\ninst✝⁴ : CommSemiring R'\ninst✝³ : CommSemiring S'\ninst✝² : CommSemiring T'\ninst✝¹ : Algebra R' S'\ninst✝ : Algebra S' T'\nsrc✝ : SMul R'[X] (S' → T') := hasSMulPi' R' S' T'\nf g : R'[X]\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (f g : R'[X]),\n                OneHom.toFun\n                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                    (f * g) =\n                  OneHom.toFun\n                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                      f *\n                    OneHom.toFun\n                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                      g) })\n      (f + g) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (f g : R'[X]),\n                  OneHom.toFun\n                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                      (f * g) =\n                    OneHom.toFun\n                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                        f *\n                      OneHom.toFun\n                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                        g) })\n        f +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (f g : R'[X]),\n                  OneHom.toFun\n                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                      (f * g) =\n                    OneHom.toFun\n                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                        f *\n                      OneHom.toFun\n                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                        g) })\n        g\n[PROOFSTEP]\nfunext z\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝⁷ : CommRing R\ninst✝⁶ : IsDomain R\ninst✝⁵ : CommRing S\nR' : Type u\nS' : Type v\nT' : Type w\ninst✝⁴ : CommSemiring R'\ninst✝³ : CommSemiring S'\ninst✝² : CommSemiring T'\ninst✝¹ : Algebra R' S'\ninst✝ : Algebra S' T'\nsrc✝ : SMul R'[X] (S' → T') := hasSMulPi' R' S' T'\nf g : R'[X]\nz : S'\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (f g : R'[X]),\n                OneHom.toFun\n                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                    (f * g) =\n                  OneHom.toFun\n                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                      f *\n                    OneHom.toFun\n                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                      g) })\n      (f + g) z =\n    (OneHom.toFun\n          (↑{\n              toOneHom :=\n                { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                  map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (f g : R'[X]),\n                    OneHom.toFun\n                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                        (f * g) =\n                      OneHom.toFun\n                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                          f *\n                        OneHom.toFun\n                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                          g) })\n          f +\n        OneHom.toFun\n          (↑{\n              toOneHom :=\n                { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                  map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (f g : R'[X]),\n                    OneHom.toFun\n                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                        (f * g) =\n                      OneHom.toFun\n                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                          f *\n                        OneHom.toFun\n                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                          g) })\n          g)\n      z\n[PROOFSTEP]\nsimp only [Polynomial.aeval_add, Pi.add_apply, map_add]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁷ : CommRing R\ninst✝⁶ : IsDomain R\ninst✝⁵ : CommRing S\nR' : Type u\nS' : Type v\nT' : Type w\ninst✝⁴ : CommSemiring R'\ninst✝³ : CommSemiring S'\ninst✝² : CommSemiring T'\ninst✝¹ : Algebra R' S'\ninst✝ : Algebra S' T'\nsrc✝ : SMul R'[X] (S' → T') := hasSMulPi' R' S' T'\np : R'[X]\nf : (fun x => S' → T') p\n⊢ ↑{\n            toMonoidHom :=\n              {\n                toOneHom :=\n                  { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                    map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (f g : R'[X]),\n                      OneHom.toFun\n                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                          (f * g) =\n                        OneHom.toFun\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                            f *\n                          OneHom.toFun\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                            g) },\n            map_zero' :=\n              (_ :\n                OneHom.toFun\n                    (↑{\n                        toOneHom :=\n                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (f g : R'[X]),\n                              OneHom.toFun\n                                  { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                    map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                  (f * g) =\n                                OneHom.toFun\n                                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                    f *\n                                  OneHom.toFun\n                                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                    g) })\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (f g : R'[X]),\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (f g : R'[X]),\n                                OneHom.toFun\n                                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                    (f * g) =\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      f *\n                                    OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      g) })\n                      (f + g) =\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (f g : R'[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      (f * g) =\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        f *\n                                      OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        g) })\n                        f +\n                      OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (f g : R'[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      (f * g) =\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        f *\n                                      OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        g) })\n                        g) }\n        p *\n      f =\n    f *\n      ↑{\n            toMonoidHom :=\n              {\n                toOneHom :=\n                  { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                    map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (f g : R'[X]),\n                      OneHom.toFun\n                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                          (f * g) =\n                        OneHom.toFun\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                            f *\n                          OneHom.toFun\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                            g) },\n            map_zero' :=\n              (_ :\n                OneHom.toFun\n                    (↑{\n                        toOneHom :=\n                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (f g : R'[X]),\n                              OneHom.toFun\n                                  { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                    map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                  (f * g) =\n                                OneHom.toFun\n                                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                    f *\n                                  OneHom.toFun\n                                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                    g) })\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (f g : R'[X]),\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (f g : R'[X]),\n                                OneHom.toFun\n                                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                    (f * g) =\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      f *\n                                    OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      g) })\n                      (f + g) =\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (f g : R'[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      (f * g) =\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        f *\n                                      OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        g) })\n                        f +\n                      OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (f g : R'[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      (f * g) =\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        f *\n                                      OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        g) })\n                        g) }\n        p\n[PROOFSTEP]\nfunext z\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝⁷ : CommRing R\ninst✝⁶ : IsDomain R\ninst✝⁵ : CommRing S\nR' : Type u\nS' : Type v\nT' : Type w\ninst✝⁴ : CommSemiring R'\ninst✝³ : CommSemiring S'\ninst✝² : CommSemiring T'\ninst✝¹ : Algebra R' S'\ninst✝ : Algebra S' T'\nsrc✝ : SMul R'[X] (S' → T') := hasSMulPi' R' S' T'\np : R'[X]\nf : (fun x => S' → T') p\nz : S'\n⊢ (↑{\n              toMonoidHom :=\n                {\n                  toOneHom :=\n                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (f g : R'[X]),\n                        OneHom.toFun\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                            (f * g) =\n                          OneHom.toFun\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                              f *\n                            OneHom.toFun\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                              g) },\n              map_zero' :=\n                (_ :\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (f g : R'[X]),\n                                OneHom.toFun\n                                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                    (f * g) =\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      f *\n                                    OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      g) })\n                      0 =\n                    0),\n              map_add' :=\n                (_ :\n                  ∀ (f g : R'[X]),\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (f g : R'[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      (f * g) =\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        f *\n                                      OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        g) })\n                        (f + g) =\n                      OneHom.toFun\n                          (↑{\n                              toOneHom :=\n                                { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                  map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (f g : R'[X]),\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        (f * g) =\n                                      OneHom.toFun\n                                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                          f *\n                                        OneHom.toFun\n                                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                          g) })\n                          f +\n                        OneHom.toFun\n                          (↑{\n                              toOneHom :=\n                                { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                  map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (f g : R'[X]),\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        (f * g) =\n                                      OneHom.toFun\n                                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                          f *\n                                        OneHom.toFun\n                                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                          g) })\n                          g) }\n          p *\n        f)\n      z =\n    (f *\n        ↑{\n              toMonoidHom :=\n                {\n                  toOneHom :=\n                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (f g : R'[X]),\n                        OneHom.toFun\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                            (f * g) =\n                          OneHom.toFun\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                              f *\n                            OneHom.toFun\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                              g) },\n              map_zero' :=\n                (_ :\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (f g : R'[X]),\n                                OneHom.toFun\n                                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                    (f * g) =\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      f *\n                                    OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      g) })\n                      0 =\n                    0),\n              map_add' :=\n                (_ :\n                  ∀ (f g : R'[X]),\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (f g : R'[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      (f * g) =\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        f *\n                                      OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        g) })\n                        (f + g) =\n                      OneHom.toFun\n                          (↑{\n                              toOneHom :=\n                                { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                  map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (f g : R'[X]),\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        (f * g) =\n                                      OneHom.toFun\n                                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                          f *\n                                        OneHom.toFun\n                                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                          g) })\n                          f +\n                        OneHom.toFun\n                          (↑{\n                              toOneHom :=\n                                { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                  map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (f g : R'[X]),\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        (f * g) =\n                                      OneHom.toFun\n                                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                          f *\n                                        OneHom.toFun\n                                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                          g) })\n                          g) }\n          p)\n      z\n[PROOFSTEP]\nexact mul_comm _ _\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁷ : CommRing R\ninst✝⁶ : IsDomain R\ninst✝⁵ : CommRing S\nR' : Type u\nS' : Type v\nT' : Type w\ninst✝⁴ : CommSemiring R'\ninst✝³ : CommSemiring S'\ninst✝² : CommSemiring T'\ninst✝¹ : Algebra R' S'\ninst✝ : Algebra S' T'\nsrc✝ : SMul R'[X] (S' → T') := hasSMulPi' R' S' T'\np : R'[X]\nf : (fun x => S' → T') p\n⊢ p • f =\n    ↑{\n            toMonoidHom :=\n              {\n                toOneHom :=\n                  { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                    map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (f g : R'[X]),\n                      OneHom.toFun\n                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                          (f * g) =\n                        OneHom.toFun\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                            f *\n                          OneHom.toFun\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                            g) },\n            map_zero' :=\n              (_ :\n                OneHom.toFun\n                    (↑{\n                        toOneHom :=\n                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (f g : R'[X]),\n                              OneHom.toFun\n                                  { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                    map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                  (f * g) =\n                                OneHom.toFun\n                                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                    f *\n                                  OneHom.toFun\n                                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                    g) })\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (f g : R'[X]),\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (f g : R'[X]),\n                                OneHom.toFun\n                                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                    (f * g) =\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      f *\n                                    OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      g) })\n                      (f + g) =\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (f g : R'[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      (f * g) =\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        f *\n                                      OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        g) })\n                        f +\n                      OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (f g : R'[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      (f * g) =\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        f *\n                                      OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        g) })\n                        g) }\n        p *\n      f\n[PROOFSTEP]\nfunext z\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝⁷ : CommRing R\ninst✝⁶ : IsDomain R\ninst✝⁵ : CommRing S\nR' : Type u\nS' : Type v\nT' : Type w\ninst✝⁴ : CommSemiring R'\ninst✝³ : CommSemiring S'\ninst✝² : CommSemiring T'\ninst✝¹ : Algebra R' S'\ninst✝ : Algebra S' T'\nsrc✝ : SMul R'[X] (S' → T') := hasSMulPi' R' S' T'\np : R'[X]\nf : (fun x => S' → T') p\nz : S'\n⊢ (p • f) z =\n    (↑{\n              toMonoidHom :=\n                {\n                  toOneHom :=\n                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (f g : R'[X]),\n                        OneHom.toFun\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                            (f * g) =\n                          OneHom.toFun\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                              f *\n                            OneHom.toFun\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                              g) },\n              map_zero' :=\n                (_ :\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                              map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (f g : R'[X]),\n                                OneHom.toFun\n                                    { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                      map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                    (f * g) =\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      f *\n                                    OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      g) })\n                      0 =\n                    0),\n              map_add' :=\n                (_ :\n                  ∀ (f g : R'[X]),\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (f g : R'[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                        map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                      (f * g) =\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        f *\n                                      OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        g) })\n                        (f + g) =\n                      OneHom.toFun\n                          (↑{\n                              toOneHom :=\n                                { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                  map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (f g : R'[X]),\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        (f * g) =\n                                      OneHom.toFun\n                                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                          f *\n                                        OneHom.toFun\n                                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                          g) })\n                          f +\n                        OneHom.toFun\n                          (↑{\n                              toOneHom :=\n                                { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                  map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (f g : R'[X]),\n                                    OneHom.toFun\n                                        { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                          map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                        (f * g) =\n                                      OneHom.toFun\n                                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                          f *\n                                        OneHom.toFun\n                                          { toFun := fun p z => ↑(algebraMap S' T') (↑(aeval z) p),\n                                            map_one' := (_ : (fun p z => ↑(algebraMap S' T') (↑(aeval z) p)) 1 = 1) }\n                                          g) })\n                          g) }\n          p *\n        f)\n      z\n[PROOFSTEP]\nsimp only [polynomial_smul_apply', Algebra.algebraMap_eq_smul_one, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk,\n  Pi.mul_apply, Algebra.smul_mul_assoc, one_mul]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Algebraic", "llama_tokens": 37253, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6654105587468141, "lm_q2_score": 0.600188359260205, "lm_q1q2_score": 0.3993716714886666}}
{"text": "[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : Anisotropic (prod Q₁ Q₂)\n⊢ Anisotropic Q₁ ∧ Anisotropic Q₂\n[PROOFSTEP]\nsimp_rw [Anisotropic, prod_apply, Prod.forall, Prod.mk_eq_zero] at h \n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : ∀ (a : M₁) (b : M₂), ↑Q₁ a + ↑Q₂ b = 0 → a = 0 ∧ b = 0\n⊢ Anisotropic Q₁ ∧ Anisotropic Q₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : ∀ (a : M₁) (b : M₂), ↑Q₁ a + ↑Q₂ b = 0 → a = 0 ∧ b = 0\n⊢ Anisotropic Q₁\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase left\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : ∀ (a : M₁) (b : M₂), ↑Q₁ a + ↑Q₂ b = 0 → a = 0 ∧ b = 0\nx : M₁\nhx : ↑Q₁ x = 0\n⊢ x = 0\n[PROOFSTEP]\nrefine' (h x 0 _).1\n[GOAL]\ncase left\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : ∀ (a : M₁) (b : M₂), ↑Q₁ a + ↑Q₂ b = 0 → a = 0 ∧ b = 0\nx : M₁\nhx : ↑Q₁ x = 0\n⊢ ↑Q₁ x + ↑Q₂ 0 = 0\n[PROOFSTEP]\nrw [hx, zero_add, map_zero]\n[GOAL]\ncase right\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : ∀ (a : M₁) (b : M₂), ↑Q₁ a + ↑Q₂ b = 0 → a = 0 ∧ b = 0\n⊢ Anisotropic Q₂\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase right\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : ∀ (a : M₁) (b : M₂), ↑Q₁ a + ↑Q₂ b = 0 → a = 0 ∧ b = 0\nx : M₂\nhx : ↑Q₂ x = 0\n⊢ x = 0\n[PROOFSTEP]\nrefine' (h 0 x _).2\n[GOAL]\ncase right\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : ∀ (a : M₁) (b : M₂), ↑Q₁ a + ↑Q₂ b = 0 → a = 0 ∧ b = 0\nx : M₂\nhx : ↑Q₂ x = 0\n⊢ ↑Q₁ 0 + ↑Q₂ x = 0\n[PROOFSTEP]\nrw [hx, add_zero, map_zero]\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\n⊢ (∀ (x : M₁ × M₂), 0 ≤ ↑(prod Q₁ Q₂) x) ↔ (∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ ∀ (x : M₂), 0 ≤ ↑Q₂ x\n[PROOFSTEP]\nsimp_rw [Prod.forall, prod_apply]\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\n⊢ (∀ (a : M₁) (b : M₂), 0 ≤ ↑Q₁ a + ↑Q₂ b) ↔ (∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ ∀ (x : M₂), 0 ≤ ↑Q₂ x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\n⊢ (∀ (a : M₁) (b : M₂), 0 ≤ ↑Q₁ a + ↑Q₂ b) → (∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ ∀ (x : M₂), 0 ≤ ↑Q₂ x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : ∀ (a : M₁) (b : M₂), 0 ≤ ↑Q₁ a + ↑Q₂ b\n⊢ (∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ ∀ (x : M₂), 0 ≤ ↑Q₂ x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.left\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : ∀ (a : M₁) (b : M₂), 0 ≤ ↑Q₁ a + ↑Q₂ b\n⊢ ∀ (x : M₁), 0 ≤ ↑Q₁ x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase mp.left\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : ∀ (a : M₁) (b : M₂), 0 ≤ ↑Q₁ a + ↑Q₂ b\nx : M₁\n⊢ 0 ≤ ↑Q₁ x\n[PROOFSTEP]\nsimpa only [add_zero, map_zero] using h x 0\n[GOAL]\ncase mp.right\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : ∀ (a : M₁) (b : M₂), 0 ≤ ↑Q₁ a + ↑Q₂ b\n⊢ ∀ (x : M₂), 0 ≤ ↑Q₂ x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase mp.right\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh : ∀ (a : M₁) (b : M₂), 0 ≤ ↑Q₁ a + ↑Q₂ b\nx : M₂\n⊢ 0 ≤ ↑Q₂ x\n[PROOFSTEP]\nsimpa only [zero_add, map_zero] using h 0 x\n[GOAL]\ncase mpr\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\n⊢ ((∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ ∀ (x : M₂), 0 ≤ ↑Q₂ x) → ∀ (a : M₁) (b : M₂), 0 ≤ ↑Q₁ a + ↑Q₂ b\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩ x₁ x₂\n[GOAL]\ncase mpr.intro\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nh₁ : ∀ (x : M₁), 0 ≤ ↑Q₁ x\nh₂ : ∀ (x : M₂), 0 ≤ ↑Q₂ x\nx₁ : M₁\nx₂ : M₂\n⊢ 0 ≤ ↑Q₁ x₁ + ↑Q₂ x₂\n[PROOFSTEP]\nexact add_nonneg (h₁ x₁) (h₂ x₂)\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\n⊢ PosDef (prod Q₁ Q₂) ↔ PosDef Q₁ ∧ PosDef Q₂\n[PROOFSTEP]\nsimp_rw [posDef_iff_nonneg, nonneg_prod_iff]\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\n⊢ ((∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ ∀ (x : M₂), 0 ≤ ↑Q₂ x) ∧ Anisotropic (prod Q₁ Q₂) ↔\n    ((∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ Anisotropic Q₁) ∧ (∀ (x : M₂), 0 ≤ ↑Q₂ x) ∧ Anisotropic Q₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\n⊢ ((∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ ∀ (x : M₂), 0 ≤ ↑Q₂ x) ∧ Anisotropic (prod Q₁ Q₂) →\n    ((∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ Anisotropic Q₁) ∧ (∀ (x : M₂), 0 ≤ ↑Q₂ x) ∧ Anisotropic Q₂\n[PROOFSTEP]\nrintro ⟨⟨hle₁, hle₂⟩, ha⟩\n[GOAL]\ncase mp.intro.intro\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nha : Anisotropic (prod Q₁ Q₂)\nhle₁ : ∀ (x : M₁), 0 ≤ ↑Q₁ x\nhle₂ : ∀ (x : M₂), 0 ≤ ↑Q₂ x\n⊢ ((∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ Anisotropic Q₁) ∧ (∀ (x : M₂), 0 ≤ ↑Q₂ x) ∧ Anisotropic Q₂\n[PROOFSTEP]\nobtain ⟨ha₁, ha₂⟩ := anisotropic_of_prod ha\n[GOAL]\ncase mp.intro.intro.intro\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nha : Anisotropic (prod Q₁ Q₂)\nhle₁ : ∀ (x : M₁), 0 ≤ ↑Q₁ x\nhle₂ : ∀ (x : M₂), 0 ≤ ↑Q₂ x\nha₁ : Anisotropic Q₁\nha₂ : Anisotropic Q₂\n⊢ ((∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ Anisotropic Q₁) ∧ (∀ (x : M₂), 0 ≤ ↑Q₂ x) ∧ Anisotropic Q₂\n[PROOFSTEP]\nrefine' ⟨⟨hle₁, ha₁⟩, ⟨hle₂, ha₂⟩⟩\n[GOAL]\ncase mpr\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\n⊢ ((∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ Anisotropic Q₁) ∧ (∀ (x : M₂), 0 ≤ ↑Q₂ x) ∧ Anisotropic Q₂ →\n    ((∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ ∀ (x : M₂), 0 ≤ ↑Q₂ x) ∧ Anisotropic (prod Q₁ Q₂)\n[PROOFSTEP]\nrintro ⟨⟨hle₁, ha₁⟩, ⟨hle₂, ha₂⟩⟩\n[GOAL]\ncase mpr.intro.intro.intro\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nhle₁ : ∀ (x : M₁), 0 ≤ ↑Q₁ x\nha₁ : Anisotropic Q₁\nhle₂ : ∀ (x : M₂), 0 ≤ ↑Q₂ x\nha₂ : Anisotropic Q₂\n⊢ ((∀ (x : M₁), 0 ≤ ↑Q₁ x) ∧ ∀ (x : M₂), 0 ≤ ↑Q₂ x) ∧ Anisotropic (prod Q₁ Q₂)\n[PROOFSTEP]\nrefine' ⟨⟨hle₁, hle₂⟩, _⟩\n[GOAL]\ncase mpr.intro.intro.intro\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nhle₁ : ∀ (x : M₁), 0 ≤ ↑Q₁ x\nha₁ : Anisotropic Q₁\nhle₂ : ∀ (x : M₂), 0 ≤ ↑Q₂ x\nha₂ : Anisotropic Q₂\n⊢ Anisotropic (prod Q₁ Q₂)\n[PROOFSTEP]\nrintro ⟨x₁, x₂⟩ (hx : Q₁ x₁ + Q₂ x₂ = 0)\n[GOAL]\ncase mpr.intro.intro.intro.mk\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nhle₁ : ∀ (x : M₁), 0 ≤ ↑Q₁ x\nha₁ : Anisotropic Q₁\nhle₂ : ∀ (x : M₂), 0 ≤ ↑Q₂ x\nha₂ : Anisotropic Q₂\nx₁ : M₁\nx₂ : M₂\nhx : ↑Q₁ x₁ + ↑Q₂ x₂ = 0\n⊢ (x₁, x₂) = 0\n[PROOFSTEP]\nrw [add_eq_zero_iff' (hle₁ x₁) (hle₂ x₂), ha₁.eq_zero_iff, ha₂.eq_zero_iff] at hx \n[GOAL]\ncase mpr.intro.intro.intro.mk\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\nR : Type u_9\ninst✝² : OrderedRing R\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nhle₁ : ∀ (x : M₁), 0 ≤ ↑Q₁ x\nha₁ : Anisotropic Q₁\nhle₂ : ∀ (x : M₂), 0 ≤ ↑Q₂ x\nha₂ : Anisotropic Q₂\nx₁ : M₁\nx₂ : M₂\nhx : x₁ = 0 ∧ x₂ = 0\n⊢ (x₁, x₂) = 0\n[PROOFSTEP]\nrwa [Prod.mk_eq_zero]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹³ : Semiring R\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid N₁\ninst✝⁹ : AddCommMonoid N₂\ninst✝⁸ : Module R M₁\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R N₁\ninst✝⁵ : Module R N₂\ninst✝⁴ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝³ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝² : (i : ι) → Module R (Mᵢ i)\ninst✝¹ : (i : ι) → Module R (Nᵢ i)\ninst✝ : Fintype ι\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nQ' : (i : ι) → QuadraticForm R (Nᵢ i)\ne : (i : ι) → IsometryEquiv (Q i) (Q' i)\nx : (i : ι) → Mᵢ i\n⊢ ↑(QuadraticForm.pi Q') (AddHom.toFun (↑(LinearEquiv.piCongrRight fun i => (e i).toLinearEquiv)).toAddHom x) =\n    ↑(QuadraticForm.pi Q) x\n[PROOFSTEP]\nsimp only [pi_apply, LinearEquiv.piCongrRight, LinearEquiv.toFun_eq_coe, IsometryEquiv.coe_toLinearEquiv,\n  IsometryEquiv.map_app]\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : Anisotropic (pi Q)\n⊢ ∀ (i : ι), Anisotropic (Q i)\n[PROOFSTEP]\nsimp_rw [Anisotropic, pi_apply, Function.funext_iff, Pi.zero_apply] at h \n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, ↑(Q i) (x i) = 0 → ∀ (a : ι), x a = 0\n⊢ ∀ (i : ι), Anisotropic (Q i)\n[PROOFSTEP]\nintro i x hx\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, ↑(Q i) (x i) = 0 → ∀ (a : ι), x a = 0\ni : ι\nx : Mᵢ i\nhx : ↑(Q i) x = 0\n⊢ x = 0\n[PROOFSTEP]\nclassical\nhave := h (Pi.single i x) ?_ i\n· rw [Pi.single_eq_same] at this \n  exact this\napply Finset.sum_eq_zero\nintro j _\nby_cases hji : j = i\n· subst hji; rw [Pi.single_eq_same, hx]\n· rw [Pi.single_eq_of_ne hji, map_zero]\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, ↑(Q i) (x i) = 0 → ∀ (a : ι), x a = 0\ni : ι\nx : Mᵢ i\nhx : ↑(Q i) x = 0\n⊢ x = 0\n[PROOFSTEP]\nhave := h (Pi.single i x) ?_ i\n[GOAL]\ncase refine_2\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, ↑(Q i) (x i) = 0 → ∀ (a : ι), x a = 0\ni : ι\nx : Mᵢ i\nhx : ↑(Q i) x = 0\nthis : Pi.single i x i = 0\n⊢ x = 0\n[PROOFSTEP]\nrw [Pi.single_eq_same] at this \n[GOAL]\ncase refine_2\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, ↑(Q i) (x i) = 0 → ∀ (a : ι), x a = 0\ni : ι\nx : Mᵢ i\nhx : ↑(Q i) x = 0\nthis : x = 0\n⊢ x = 0\n[PROOFSTEP]\nexact this\n[GOAL]\ncase refine_1\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, ↑(Q i) (x i) = 0 → ∀ (a : ι), x a = 0\ni : ι\nx : Mᵢ i\nhx : ↑(Q i) x = 0\n⊢ ∑ i_1 : ι, ↑(Q i_1) (Pi.single i x i_1) = 0\n[PROOFSTEP]\napply Finset.sum_eq_zero\n[GOAL]\ncase refine_1.h\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, ↑(Q i) (x i) = 0 → ∀ (a : ι), x a = 0\ni : ι\nx : Mᵢ i\nhx : ↑(Q i) x = 0\n⊢ ∀ (x_1 : ι), x_1 ∈ Finset.univ → ↑(Q x_1) (Pi.single i x x_1) = 0\n[PROOFSTEP]\nintro j _\n[GOAL]\ncase refine_1.h\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, ↑(Q i) (x i) = 0 → ∀ (a : ι), x a = 0\ni : ι\nx : Mᵢ i\nhx : ↑(Q i) x = 0\nj : ι\na✝ : j ∈ Finset.univ\n⊢ ↑(Q j) (Pi.single i x j) = 0\n[PROOFSTEP]\nby_cases hji : j = i\n[GOAL]\ncase pos\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, ↑(Q i) (x i) = 0 → ∀ (a : ι), x a = 0\ni : ι\nx : Mᵢ i\nhx : ↑(Q i) x = 0\nj : ι\na✝ : j ∈ Finset.univ\nhji : j = i\n⊢ ↑(Q j) (Pi.single i x j) = 0\n[PROOFSTEP]\nsubst hji\n[GOAL]\ncase pos\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, ↑(Q i) (x i) = 0 → ∀ (a : ι), x a = 0\nj : ι\na✝ : j ∈ Finset.univ\nx : Mᵢ j\nhx : ↑(Q j) x = 0\n⊢ ↑(Q j) (Pi.single j x j) = 0\n[PROOFSTEP]\nrw [Pi.single_eq_same, hx]\n[GOAL]\ncase neg\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), ∑ i : ι, ↑(Q i) (x i) = 0 → ∀ (a : ι), x a = 0\ni : ι\nx : Mᵢ i\nhx : ↑(Q i) x = 0\nj : ι\na✝ : j ∈ Finset.univ\nhji : ¬j = i\n⊢ ↑(Q j) (Pi.single i x j) = 0\n[PROOFSTEP]\nrw [Pi.single_eq_of_ne hji, map_zero]\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\n⊢ (∀ (x : (i : ι) → Mᵢ i), 0 ≤ ↑(pi Q) x) ↔ ∀ (i : ι) (x : Mᵢ i), 0 ≤ ↑(Q i) x\n[PROOFSTEP]\nsimp_rw [pi, sum_apply, comp_apply, LinearMap.proj_apply]\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\n⊢ (∀ (x : (i : ι) → Mᵢ i), 0 ≤ ∑ x_1 : ι, ↑(Q x_1) (x x_1)) ↔ ∀ (i : ι) (x : Mᵢ i), 0 ≤ ↑(Q i) x\n[PROOFSTEP]\nconstructor\n  -- TODO: does this generalize to a useful lemma independent of `QuadraticForm`?\n[GOAL]\ncase mp\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\n⊢ (∀ (x : (i : ι) → Mᵢ i), 0 ≤ ∑ x_1 : ι, ↑(Q x_1) (x x_1)) → ∀ (i : ι) (x : Mᵢ i), 0 ≤ ↑(Q i) x\n[PROOFSTEP]\nintro h i x\n[GOAL]\ncase mp\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), 0 ≤ ∑ x_1 : ι, ↑(Q x_1) (x x_1)\ni : ι\nx : Mᵢ i\n⊢ 0 ≤ ↑(Q i) x\n[PROOFSTEP]\nclassical\nconvert h (Pi.single i x) using 1\nrw [Finset.sum_eq_single_of_mem i (Finset.mem_univ _) fun j _ hji => ?_, Pi.single_eq_same]\nrw [Pi.single_eq_of_ne hji, map_zero]\n[GOAL]\ncase mp\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), 0 ≤ ∑ x_1 : ι, ↑(Q x_1) (x x_1)\ni : ι\nx : Mᵢ i\n⊢ 0 ≤ ↑(Q i) x\n[PROOFSTEP]\nconvert h (Pi.single i x) using 1\n[GOAL]\ncase h.e'_4\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), 0 ≤ ∑ x_1 : ι, ↑(Q x_1) (x x_1)\ni : ι\nx : Mᵢ i\n⊢ ↑(Q i) x = ∑ x_1 : ι, ↑(Q x_1) (Pi.single i x x_1)\n[PROOFSTEP]\nrw [Finset.sum_eq_single_of_mem i (Finset.mem_univ _) fun j _ hji => ?_, Pi.single_eq_same]\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (x : (i : ι) → Mᵢ i), 0 ≤ ∑ x_1 : ι, ↑(Q x_1) (x x_1)\ni : ι\nx : Mᵢ i\nj : ι\nx✝ : j ∈ Finset.univ\nhji : j ≠ i\n⊢ ↑(Q j) (Pi.single i x j) = 0\n[PROOFSTEP]\nrw [Pi.single_eq_of_ne hji, map_zero]\n[GOAL]\ncase mpr\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\n⊢ (∀ (i : ι) (x : Mᵢ i), 0 ≤ ↑(Q i) x) → ∀ (x : (i : ι) → Mᵢ i), 0 ≤ ∑ x_1 : ι, ↑(Q x_1) (x x_1)\n[PROOFSTEP]\nrintro h x\n[GOAL]\ncase mpr\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (i : ι) (x : Mᵢ i), 0 ≤ ↑(Q i) x\nx : (i : ι) → Mᵢ i\n⊢ 0 ≤ ∑ x_1 : ι, ↑(Q x_1) (x x_1)\n[PROOFSTEP]\nexact Finset.sum_nonneg fun i _ => h i (x i)\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\n⊢ PosDef (pi Q) ↔ ∀ (i : ι), PosDef (Q i)\n[PROOFSTEP]\nsimp_rw [posDef_iff_nonneg, nonneg_pi_iff]\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\n⊢ (∀ (i : ι) (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (pi Q) ↔\n    ∀ (i : ι), (∀ (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (Q i)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\n⊢ (∀ (i : ι) (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (pi Q) →\n    ∀ (i : ι), (∀ (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (Q i)\n[PROOFSTEP]\nrintro ⟨hle, ha⟩\n[GOAL]\ncase mp.intro\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nhle : ∀ (i : ι) (x : Mᵢ i), 0 ≤ ↑(Q i) x\nha : Anisotropic (pi Q)\n⊢ ∀ (i : ι), (∀ (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (Q i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mp.intro\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nhle : ∀ (i : ι) (x : Mᵢ i), 0 ≤ ↑(Q i) x\nha : Anisotropic (pi Q)\ni : ι\n⊢ (∀ (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (Q i)\n[PROOFSTEP]\nexact ⟨hle i, anisotropic_of_pi ha i⟩\n[GOAL]\ncase mpr\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\n⊢ (∀ (i : ι), (∀ (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (Q i)) →\n    (∀ (i : ι) (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (pi Q)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (i : ι), (∀ (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (Q i)\n⊢ (∀ (i : ι) (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (pi Q)\n[PROOFSTEP]\nrefine' ⟨fun i => (h i).1, fun x hx => funext fun i => (h i).2 _ _⟩\n[GOAL]\ncase mpr\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (i : ι), (∀ (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (Q i)\nx : (i : ι) → Mᵢ i\nhx : ↑(pi Q) x = 0\ni : ι\n⊢ ↑(Q i) (x i) = 0\n[PROOFSTEP]\nrw [pi_apply, Finset.sum_eq_zero_iff_of_nonneg fun j _ => ?_] at hx \n[GOAL]\ncase mpr\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (i : ι), (∀ (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (Q i)\nx : (i : ι) → Mᵢ i\nhx : ∀ (i : ι), i ∈ Finset.univ → ↑(Q i) (x i) = 0\ni : ι\n⊢ ↑(Q i) (x i) = 0\n[PROOFSTEP]\nexact hx _ (Finset.mem_univ _)\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\nN₁ : Type u_5\nN₂ : Type u_6\nMᵢ : ι → Type u_7\nNᵢ : ι → Type u_8\ninst✝¹⁵ : Semiring R✝\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid N₁\ninst✝¹¹ : AddCommMonoid N₂\ninst✝¹⁰ : Module R✝ M₁\ninst✝⁹ : Module R✝ M₂\ninst✝⁸ : Module R✝ N₁\ninst✝⁷ : Module R✝ N₂\ninst✝⁶ : (i : ι) → AddCommMonoid (Mᵢ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (Nᵢ i)\ninst✝⁴ : (i : ι) → Module R✝ (Mᵢ i)\ninst✝³ : (i : ι) → Module R✝ (Nᵢ i)\ninst✝² : Fintype ι\nR : Type u_9\ninst✝¹ : OrderedRing R\ninst✝ : (i : ι) → Module R (Mᵢ i)\nQ : (i : ι) → QuadraticForm R (Mᵢ i)\nh : ∀ (i : ι), (∀ (x : Mᵢ i), 0 ≤ ↑(Q i) x) ∧ Anisotropic (Q i)\nx : (i : ι) → Mᵢ i\nhx : ∑ i : ι, ↑(Q i) (x i) = 0\ni j : ι\nx✝ : j ∈ Finset.univ\n⊢ 0 ≤ ↑(Q j) (x j)\n[PROOFSTEP]\nexact (h j).1 _\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.QuadraticForm.Prod", "llama_tokens": 29681, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7461390043208003, "lm_q2_score": 0.5350984286266116, "lm_q1q2_score": 0.3992578087490848}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf g : α →ₛ β\nH : ↑f = ↑g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\ng : α →ₛ β\ntoFun✝ : α → β\nmeasurableSet_fiber'✝ : ∀ (x : β), MeasurableSet (toFun✝ ⁻¹' {x})\nfinite_range'✝ : Set.Finite (range toFun✝)\nH : ↑{ toFun := toFun✝, measurableSet_fiber' := measurableSet_fiber'✝, finite_range' := finite_range'✝ } = ↑g\n⊢ { toFun := toFun✝, measurableSet_fiber' := measurableSet_fiber'✝, finite_range' := finite_range'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\ntoFun✝¹ : α → β\nmeasurableSet_fiber'✝¹ : ∀ (x : β), MeasurableSet (toFun✝¹ ⁻¹' {x})\nfinite_range'✝¹ : Set.Finite (range toFun✝¹)\ntoFun✝ : α → β\nmeasurableSet_fiber'✝ : ∀ (x : β), MeasurableSet (toFun✝ ⁻¹' {x})\nfinite_range'✝ : Set.Finite (range toFun✝)\nH :\n  ↑{ toFun := toFun✝¹, measurableSet_fiber' := measurableSet_fiber'✝¹, finite_range' := finite_range'✝¹ } =\n    ↑{ toFun := toFun✝, measurableSet_fiber' := measurableSet_fiber'✝, finite_range' := finite_range'✝ }\n⊢ { toFun := toFun✝¹, measurableSet_fiber' := measurableSet_fiber'✝¹, finite_range' := finite_range'✝¹ } =\n    { toFun := toFun✝, measurableSet_fiber' := measurableSet_fiber'✝, finite_range' := finite_range'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : IsEmpty α\n⊢ Set.Finite (range fun a => isEmptyElim a)\n[PROOFSTEP]\nsimp [range_eq_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf : α →ₛ β\np : β → Prop\n⊢ (∀ (y : β), y ∈ SimpleFunc.range f → p y) ↔ ∀ (x : α), p (↑f x)\n[PROOFSTEP]\nsimp only [mem_range, Set.forall_range_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf : α →ₛ β\np : β → Prop\n⊢ (∃ y, y ∈ SimpleFunc.range f ∧ p y) ↔ ∃ x, p (↑f x)\n[PROOFSTEP]\nsimpa only [mem_range, exists_prop] using Set.exists_range_iff\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : MeasurableSpace α✝\nα : Type u_5\ninst✝¹ : MeasurableSpace α\ninst✝ : Nonempty α\nb : β\n⊢ ↑(SimpleFunc.range (const α b)) = ↑{b}\n[PROOFSTEP]\nsimp [Function.const]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\ninst✝ : MeasurableSpace α\nb : β\n⊢ ↑(SimpleFunc.range (const α b)) ⊆ ↑{b}\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\n⊢ ∃ c, ∀ (x : α), ↑f x = c\n[PROOFSTEP]\nhave hf_meas := @SimpleFunc.measurableSet_fiber α _ ⊥ f\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nhf_meas : ∀ (x : β), MeasurableSet (↑f ⁻¹' {x})\n⊢ ∃ c, ∀ (x : α), ↑f x = c\n[PROOFSTEP]\nsimp_rw [MeasurableSpace.measurableSet_bot_iff] at hf_meas \n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nhf_meas : ∀ (x : β), ↑f ⁻¹' {x} = ∅ ∨ ↑f ⁻¹' {x} = univ\n⊢ ∃ c, ∀ (x : α), ↑f x = c\n[PROOFSTEP]\ncases' isEmpty_or_nonempty α with h h\n[GOAL]\ncase inl\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nhf_meas : ∀ (x : β), ↑f ⁻¹' {x} = ∅ ∨ ↑f ⁻¹' {x} = univ\nh : IsEmpty α\n⊢ ∃ c, ∀ (x : α), ↑f x = c\n[PROOFSTEP]\nsimp only [IsEmpty.forall_iff, exists_const]\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nhf_meas : ∀ (x : β), ↑f ⁻¹' {x} = ∅ ∨ ↑f ⁻¹' {x} = univ\nh : Nonempty α\n⊢ ∃ c, ∀ (x : α), ↑f x = c\n[PROOFSTEP]\nspecialize hf_meas (f h.some)\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nh : Nonempty α\nhf_meas : ↑f ⁻¹' {↑f (Nonempty.some h)} = ∅ ∨ ↑f ⁻¹' {↑f (Nonempty.some h)} = univ\n⊢ ∃ c, ∀ (x : α), ↑f x = c\n[PROOFSTEP]\ncases' hf_meas with hf_meas hf_meas\n[GOAL]\ncase inr.inl\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nh : Nonempty α\nhf_meas : ↑f ⁻¹' {↑f (Nonempty.some h)} = ∅\n⊢ ∃ c, ∀ (x : α), ↑f x = c\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase inr.inl.h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nh : Nonempty α\nhf_meas : ↑f ⁻¹' {↑f (Nonempty.some h)} = ∅\n⊢ False\n[PROOFSTEP]\nrefine' Set.not_mem_empty h.some _\n[GOAL]\ncase inr.inl.h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nh : Nonempty α\nhf_meas : ↑f ⁻¹' {↑f (Nonempty.some h)} = ∅\n⊢ Nonempty.some h ∈ ∅\n[PROOFSTEP]\nrw [← hf_meas, Set.mem_preimage]\n[GOAL]\ncase inr.inl.h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nh : Nonempty α\nhf_meas : ↑f ⁻¹' {↑f (Nonempty.some h)} = ∅\n⊢ ↑f (Nonempty.some h) ∈ {↑f (Nonempty.some h)}\n[PROOFSTEP]\nexact Set.mem_singleton _\n[GOAL]\ncase inr.inr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nh : Nonempty α\nhf_meas : ↑f ⁻¹' {↑f (Nonempty.some h)} = univ\n⊢ ∃ c, ∀ (x : α), ↑f x = c\n[PROOFSTEP]\nrefine' ⟨f h.some, fun x => _⟩\n[GOAL]\ncase inr.inr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nh : Nonempty α\nhf_meas : ↑f ⁻¹' {↑f (Nonempty.some h)} = univ\nx : α\n⊢ ↑f x = ↑f (Nonempty.some h)\n[PROOFSTEP]\nhave : x ∈ f ⁻¹' {f h.some} := by\n  rw [hf_meas]\n  exact Set.mem_univ x\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nh : Nonempty α\nhf_meas : ↑f ⁻¹' {↑f (Nonempty.some h)} = univ\nx : α\n⊢ x ∈ ↑f ⁻¹' {↑f (Nonempty.some h)}\n[PROOFSTEP]\nrw [hf_meas]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nh : Nonempty α\nhf_meas : ↑f ⁻¹' {↑f (Nonempty.some h)} = univ\nx : α\n⊢ x ∈ univ\n[PROOFSTEP]\nexact Set.mem_univ x\n[GOAL]\ncase inr.inr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\nf : α →ₛ β\ninst✝ : Nonempty β\nh : Nonempty α\nhf_meas : ↑f ⁻¹' {↑f (Nonempty.some h)} = univ\nx : α\nthis : x ∈ ↑f ⁻¹' {↑f (Nonempty.some h)}\n⊢ ↑f x = ↑f (Nonempty.some h)\n[PROOFSTEP]\nrwa [Set.mem_preimage, Set.mem_singleton_iff] at this \n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\ninst✝ : Nonempty β\nf : α →ₛ β\n⊢ ∃ c, f = const α c\n[PROOFSTEP]\nletI : MeasurableSpace α := ⊥\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\ninst✝ : Nonempty β\nf : α →ₛ β\nthis : MeasurableSpace α := ⊥\n⊢ ∃ c, f = const α c\n[PROOFSTEP]\nobtain ⟨c, h_eq⟩ := simpleFunc_bot f\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\ninst✝ : Nonempty β\nf : α →ₛ β\nthis : MeasurableSpace α := ⊥\nc : β\nh_eq : ∀ (x : α), ↑f x = c\n⊢ ∃ c, f = const α c\n[PROOFSTEP]\nrefine' ⟨c, _⟩\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\ninst✝ : Nonempty β\nf : α →ₛ β\nthis : MeasurableSpace α := ⊥\nc : β\nh_eq : ∀ (x : α), ↑f x = c\n⊢ f = const α c\n[PROOFSTEP]\next1 x\n[GOAL]\ncase intro.H\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α✝\nα : Type u_5\ninst✝ : Nonempty β\nf : α →ₛ β\nthis : MeasurableSpace α := ⊥\nc : β\nh_eq : ∀ (x : α), ↑f x = c\nx : α\n⊢ ↑f x = ↑(const α c) x\n[PROOFSTEP]\nrw [h_eq x, SimpleFunc.coe_const, Function.const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nr : α → β → Prop\nf : α →ₛ β\nh : ∀ (b : β), MeasurableSet {a | r a b}\n⊢ MeasurableSet {a | r a (↑f a)}\n[PROOFSTEP]\nhave : {a | r a (f a)} = ⋃ b ∈ range f, {a | r a b} ∩ f ⁻¹' { b } :=\n  by\n  ext a\n  suffices r a (f a) ↔ ∃ i, r a (f i) ∧ f a = f i by simpa\n  exact ⟨fun h => ⟨a, ⟨h, rfl⟩⟩, fun ⟨a', ⟨h', e⟩⟩ => e.symm ▸ h'⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nr : α → β → Prop\nf : α →ₛ β\nh : ∀ (b : β), MeasurableSet {a | r a b}\n⊢ {a | r a (↑f a)} = ⋃ (b : β) (_ : b ∈ range ↑f), {a | r a b} ∩ ↑f ⁻¹' {b}\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nr : α → β → Prop\nf : α →ₛ β\nh : ∀ (b : β), MeasurableSet {a | r a b}\na : α\n⊢ a ∈ {a | r a (↑f a)} ↔ a ∈ ⋃ (b : β) (_ : b ∈ range ↑f), {a | r a b} ∩ ↑f ⁻¹' {b}\n[PROOFSTEP]\nsuffices r a (f a) ↔ ∃ i, r a (f i) ∧ f a = f i by simpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nr : α → β → Prop\nf : α →ₛ β\nh : ∀ (b : β), MeasurableSet {a | r a b}\na : α\nthis : r a (↑f a) ↔ ∃ i, r a (↑f i) ∧ ↑f a = ↑f i\n⊢ a ∈ {a | r a (↑f a)} ↔ a ∈ ⋃ (b : β) (_ : b ∈ range ↑f), {a | r a b} ∩ ↑f ⁻¹' {b}\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nr : α → β → Prop\nf : α →ₛ β\nh : ∀ (b : β), MeasurableSet {a | r a b}\na : α\n⊢ r a (↑f a) ↔ ∃ i, r a (↑f i) ∧ ↑f a = ↑f i\n[PROOFSTEP]\nexact ⟨fun h => ⟨a, ⟨h, rfl⟩⟩, fun ⟨a', ⟨h', e⟩⟩ => e.symm ▸ h'⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nr : α → β → Prop\nf : α →ₛ β\nh : ∀ (b : β), MeasurableSet {a | r a b}\nthis : {a | r a (↑f a)} = ⋃ (b : β) (_ : b ∈ range ↑f), {a | r a b} ∩ ↑f ⁻¹' {b}\n⊢ MeasurableSet {a | r a (↑f a)}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nr : α → β → Prop\nf : α →ₛ β\nh : ∀ (b : β), MeasurableSet {a | r a b}\nthis : {a | r a (↑f a)} = ⋃ (b : β) (_ : b ∈ range ↑f), {a | r a b} ∩ ↑f ⁻¹' {b}\n⊢ MeasurableSet (⋃ (b : β) (_ : b ∈ range ↑f), {a | r a b} ∩ ↑f ⁻¹' {b})\n[PROOFSTEP]\nexact MeasurableSet.biUnion f.finite_range.countable fun b _ => MeasurableSet.inter (h b) (f.measurableSet_fiber _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf : α →ₛ β\nμ : Measure α\n⊢ ∑ y in SimpleFunc.range f, ↑↑μ (↑f ⁻¹' {y}) = ↑↑μ univ\n[PROOFSTEP]\nrw [f.sum_measure_preimage_singleton, coe_range, preimage_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\ns : Set α\nhs : MeasurableSet sᶜ\nf g : α →ₛ β\n⊢ ↑(piecewise sᶜ hs f g) = ↑(piecewise s (_ : MeasurableSet s) g f)\n[PROOFSTEP]\nsimp [hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\ns : Set α\nhs : MeasurableSet sᶜ\nf g : α →ₛ β\n⊢ Set.piecewise sᶜ ↑f ↑g = Set.piecewise s ↑g ↑f\n[PROOFSTEP]\nconvert Set.piecewise_compl s f g\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf g : α →ₛ β\n⊢ ↑(piecewise univ (_ : MeasurableSet univ) f g) = ↑f\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf g : α →ₛ β\n⊢ Set.piecewise univ ↑f ↑g = ↑f\n[PROOFSTEP]\nconvert Set.piecewise_univ f g\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf g : α →ₛ β\n⊢ ↑(piecewise ∅ (_ : MeasurableSet ∅) f g) = ↑g\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf g : α →ₛ β\n⊢ Set.piecewise ∅ ↑f ↑g = ↑g\n[PROOFSTEP]\nconvert Set.piecewise_empty f g\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\ns : Set α\nhs : MeasurableSet s\nhs_nonempty : Set.Nonempty s\nhs_ne_univ : s ≠ univ\nx y : β\n⊢ SimpleFunc.range (piecewise s hs (const α x) (const α y)) = {x, y}\n[PROOFSTEP]\nsimp only [← Finset.coe_inj, coe_range, coe_piecewise, range_piecewise, coe_const, Finset.coe_insert,\n  Finset.coe_singleton, hs_nonempty.image_const, (nonempty_compl.2 hs_ne_univ).image_const, singleton_union,\n  Function.const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf : α →ₛ β\ng : β → α →ₛ γ\n⊢ (range fun a => ↑(g (↑f a)) a) ⊆ ⋃ (i : β) (_ : i ∈ range ↑f), range ↑(g i)\n[PROOFSTEP]\nrintro _ ⟨a, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf : α →ₛ β\ng : β → α →ₛ γ\na : α\n⊢ (fun a => ↑(g (↑f a)) a) a ∈ ⋃ (i : β) (_ : i ∈ range ↑f), range ↑(g i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf : α →ₛ β\ng : β → α →ₛ γ\na : α\n⊢ ∃ i y, ↑(g (↑f i)) y = ↑(g (↑f a)) a\n[PROOFSTEP]\nexact ⟨a, a, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : DecidableEq γ\ng : β → γ\nf : α →ₛ β\n⊢ ↑(SimpleFunc.range (map g f)) = ↑(Finset.image g (SimpleFunc.range f))\n[PROOFSTEP]\nsimp only [coe_range, coe_map, Finset.coe_image, range_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf : α →ₛ β\ng : β → γ\ns : Set γ\n⊢ ↑(map g f) ⁻¹' s = ↑f ⁻¹' ↑(Finset.filter (fun b => g b ∈ s) (SimpleFunc.range f))\n[PROOFSTEP]\nsimp only [coe_range, sep_mem_eq, coe_map, Finset.coe_filter, ← mem_preimage, inter_comm, preimage_inter_range, ←\n  Finset.mem_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf : α →ₛ β\ng : β → γ\ns : Set γ\n⊢ g ∘ ↑f ⁻¹' s = ↑f ⁻¹' (g ⁻¹' s)\n[PROOFSTEP]\nexact preimage_comp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf : β →ₛ γ\ng : α → β\nhgm : Measurable g\n⊢ ↑(SimpleFunc.range (comp f g hgm)) ⊆ ↑(SimpleFunc.range f)\n[PROOFSTEP]\nsimp only [coe_range, coe_comp, Set.range_comp_subset_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf₁ : α →ₛ γ\ng : α → β\nhg : MeasurableEmbedding g\nf₂ : β →ₛ γ\n⊢ ∀ (x : γ), MeasurableSet (Function.extend g ↑f₁ ↑f₂ ⁻¹' {x})\n[PROOFSTEP]\nletI : MeasurableSpace γ := ⊤\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf₁ : α →ₛ γ\ng : α → β\nhg : MeasurableEmbedding g\nf₂ : β →ₛ γ\nthis : MeasurableSpace γ := ⊤\n⊢ ∀ (x : γ), MeasurableSet (Function.extend g ↑f₁ ↑f₂ ⁻¹' {x})\n[PROOFSTEP]\nhaveI : MeasurableSingletonClass γ := ⟨fun _ => trivial⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\nf₁ : α →ₛ γ\ng : α → β\nhg : MeasurableEmbedding g\nf₂ : β →ₛ γ\nthis✝ : MeasurableSpace γ := ⊤\nthis : MeasurableSingletonClass γ\n⊢ ∀ (x : γ), MeasurableSet (Function.extend g ↑f₁ ↑f₂ ⁻¹' {x})\n[PROOFSTEP]\nexact fun x => hg.measurable_extend f₁.measurable f₂.measurable (measurableSet_singleton _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf : α →ₛ β\ng : α →ₛ γ\nb : β\nc : γ\n⊢ ↑(pair f g) ⁻¹' {(b, c)} = ↑f ⁻¹' {b} ∩ ↑g ⁻¹' {c}\n[PROOFSTEP]\nrw [← singleton_prod_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf : α →ₛ β\ng : α →ₛ γ\nb : β\nc : γ\n⊢ ↑(pair f g) ⁻¹' {b} ×ˢ {c} = ↑f ⁻¹' {b} ∩ ↑g ⁻¹' {c}\n[PROOFSTEP]\nexact pair_preimage _ _ _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf : α →ₛ β\n⊢ bind f (const α) = f\n[PROOFSTEP]\next\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nf : α →ₛ β\na✝ : α\n⊢ ↑(bind f (const α)) a✝ = ↑f a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : Nonempty α\ninst✝ : One β\nx : β\n⊢ x ∈ SimpleFunc.range 1 ↔ x ∈ {1}\n[PROOFSTEP]\nsimp [eq_comm]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nβ : Type u_5\nhα : IsEmpty α\nf : α →ₛ β\n⊢ SimpleFunc.range f = ∅\n[PROOFSTEP]\nrw [← Finset.not_nonempty_iff_eq_empty]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nβ : Type u_5\nhα : IsEmpty α\nf : α →ₛ β\n⊢ ¬Finset.Nonempty (SimpleFunc.range f)\n[PROOFSTEP]\nby_contra h\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nβ : Type u_5\nhα : IsEmpty α\nf : α →ₛ β\nh : Finset.Nonempty (SimpleFunc.range f)\n⊢ False\n[PROOFSTEP]\nobtain ⟨y, hy_mem⟩ := h\n[GOAL]\ncase intro\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nβ : Type u_5\nhα : IsEmpty α\nf : α →ₛ β\ny : β\nhy_mem : y ∈ SimpleFunc.range f\n⊢ False\n[PROOFSTEP]\nrw [SimpleFunc.mem_range, Set.mem_range] at hy_mem \n[GOAL]\ncase intro\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nβ : Type u_5\nhα : IsEmpty α\nf : α →ₛ β\ny : β\nhy_mem : ∃ y_1, ↑f y_1 = y\n⊢ False\n[PROOFSTEP]\nobtain ⟨x, hxy⟩ := hy_mem\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nβ : Type u_5\nhα : IsEmpty α\nf : α →ₛ β\ny : β\nx : α\nhxy : ↑f x = y\n⊢ False\n[PROOFSTEP]\nrw [isEmpty_iff] at hα \n[GOAL]\ncase intro.intro\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nβ : Type u_5\nhα : α → False\nf : α →ₛ β\ny : β\nx : α\nhxy : ↑f x = y\n⊢ False\n[PROOFSTEP]\nexact hα x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : MeasurableSpace α\nK : Type u_5\ninst✝¹ : SemilatticeSup β\ninst✝ : OrderBot β\nf : γ → α →ₛ β\ns : Finset γ\na : α\n⊢ ↑(Finset.sup s f) a = Finset.sup s fun c => ↑(f c) a\n[PROOFSTEP]\nrefine' Finset.induction_on s rfl _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : MeasurableSpace α\nK : Type u_5\ninst✝¹ : SemilatticeSup β\ninst✝ : OrderBot β\nf : γ → α →ₛ β\ns : Finset γ\na : α\n⊢ ∀ ⦃a_1 : γ⦄ {s : Finset γ},\n    ¬a_1 ∈ s →\n      (↑(Finset.sup s f) a = Finset.sup s fun c => ↑(f c) a) →\n        ↑(Finset.sup (insert a_1 s) f) a = Finset.sup (insert a_1 s) fun c => ↑(f c) a\n[PROOFSTEP]\nintro a s _ ih\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : MeasurableSpace α\nK : Type u_5\ninst✝¹ : SemilatticeSup β\ninst✝ : OrderBot β\nf : γ → α →ₛ β\ns✝ : Finset γ\na✝¹ : α\na : γ\ns : Finset γ\na✝ : ¬a ∈ s\nih : ↑(Finset.sup s f) a✝¹ = Finset.sup s fun c => ↑(f c) a✝¹\n⊢ ↑(Finset.sup (insert a s) f) a✝¹ = Finset.sup (insert a s) fun c => ↑(f c) a✝¹\n[PROOFSTEP]\nrw [Finset.sup_insert, Finset.sup_insert, sup_apply, ih]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\nK : Type u_5\ninst✝ : Zero β\nf : α →ₛ β\ns : Set α\nhs : MeasurableSet s\n⊢ ↑(restrict f s) = indicator s ↑f\n[PROOFSTEP]\nrw [restrict, dif_pos hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\nK : Type u_5\ninst✝ : Zero β\nf : α →ₛ β\ns : Set α\nhs : MeasurableSet s\n⊢ ↑(piecewise s hs f 0) = indicator s ↑f\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\nK : Type u_5\ninst✝ : Zero β\nf : α →ₛ β\n⊢ restrict f univ = f\n[PROOFSTEP]\nsimp [restrict]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\nK : Type u_5\ninst✝ : Zero β\nf : α →ₛ β\n⊢ restrict f ∅ = 0\n[PROOFSTEP]\nsimp [restrict]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : MeasurableSpace α\nK : Type u_5\ninst✝¹ : Zero β\ninst✝ : Zero γ\ng : β → γ\nhg : g 0 = 0\nf : α →ₛ β\ns : Set α\nx : α\nhs : MeasurableSet s\n⊢ ↑(map g (restrict f s)) x = ↑(restrict (map g f) s) x\n[PROOFSTEP]\nsimp [hs, Set.indicator_comp_of_zero hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : MeasurableSpace α\nK : Type u_5\ninst✝¹ : Zero β\ninst✝ : Zero γ\ng : β → γ\nhg : g 0 = 0\nf : α →ₛ β\ns : Set α\nx : α\nhs : ¬MeasurableSet s\n⊢ ↑(map g (restrict f s)) x = ↑(restrict (map g f) s) x\n[PROOFSTEP]\nsimp [restrict_of_not_measurable hs, hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\nK : Type u_5\ninst✝ : Zero β\nf : α →ₛ β\ns : Set α\nhs : MeasurableSet s\na : α\n⊢ ↑(restrict f s) a = indicator s (↑f) a\n[PROOFSTEP]\nsimp only [f.coe_restrict hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\nK : Type u_5\ninst✝ : Zero β\nf : α →ₛ β\ns : Set α\nhs : MeasurableSet s\nt : Set β\nht : ¬0 ∈ t\n⊢ ↑(restrict f s) ⁻¹' t = s ∩ ↑f ⁻¹' t\n[PROOFSTEP]\nsimp [hs, indicator_preimage_of_not_mem _ _ ht, inter_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\nK : Type u_5\ninst✝ : Zero β\nr : β\ns : Set α\nf : α →ₛ β\nhs : MeasurableSet s\n⊢ r ∈ SimpleFunc.range (restrict f s) ↔ r = 0 ∧ s ≠ univ ∨ r ∈ ↑f '' s\n[PROOFSTEP]\nrw [← Finset.mem_coe, coe_range, coe_restrict _ hs, mem_range_indicator]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\nK : Type u_5\ninst✝ : Zero β\nr : β\ns : Set α\nf : α →ₛ β\nhr : r ∈ SimpleFunc.range (restrict f s)\nh0 : r ≠ 0\nhs : MeasurableSet s\n⊢ r ∈ ↑f '' s\n[PROOFSTEP]\nsimpa [mem_restrict_range hs, h0, -mem_range] using hr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\nK : Type u_5\ninst✝ : Zero β\nr : β\ns : Set α\nf : α →ₛ β\nhr : r ∈ SimpleFunc.range (restrict f s)\nh0 : r ≠ 0\nhs : ¬MeasurableSet s\n⊢ r ∈ ↑f '' s\n[PROOFSTEP]\nrw [restrict_of_not_measurable hs] at hr \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\nK : Type u_5\ninst✝ : Zero β\nr : β\ns : Set α\nf : α →ₛ β\nhr : r ∈ SimpleFunc.range 0\nh0 : r ≠ 0\nhs : ¬MeasurableSet s\n⊢ r ∈ ↑f '' s\n[PROOFSTEP]\nexact (h0 <| eq_zero_of_mem_range_zero hr).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : MeasurableSpace α\nK : Type u_5\ninst✝¹ : Zero β\ninst✝ : Preorder β\ns : Set α\nf g : α →ₛ β\nH : f ≤ g\nhs : MeasurableSet s\nx : α\n⊢ ↑(restrict f s) x ≤ ↑(restrict g s) x\n[PROOFSTEP]\nsimp only [coe_restrict _ hs, indicator_le_indicator (H x)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : MeasurableSpace α\nK : Type u_5\ninst✝¹ : Zero β\ninst✝ : Preorder β\ns : Set α\nf g : α →ₛ β\nH : f ≤ g\nhs : ¬MeasurableSet s\n⊢ restrict f s ≤ restrict g s\n[PROOFSTEP]\nsimp only [restrict_of_not_measurable hs, le_refl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁷ : MeasurableSpace α\nK : Type u_5\ninst✝⁶ : SemilatticeSup β\ninst✝⁵ : OrderBot β\ninst✝⁴ : Zero β\ninst✝³ : TopologicalSpace β\ninst✝² : OrderClosedTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\nn : ℕ\na : α\nhf : Measurable f\n⊢ ↑(approx i f n) a = Finset.sup (Finset.range n) fun k => if i k ≤ f a then i k else 0\n[PROOFSTEP]\ndsimp only [approx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁷ : MeasurableSpace α\nK : Type u_5\ninst✝⁶ : SemilatticeSup β\ninst✝⁵ : OrderBot β\ninst✝⁴ : Zero β\ninst✝³ : TopologicalSpace β\ninst✝² : OrderClosedTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\nn : ℕ\na : α\nhf : Measurable f\n⊢ ↑(Finset.sup (Finset.range n) fun k => restrict (const α (i k)) {a | i k ≤ f a}) a =\n    Finset.sup (Finset.range n) fun k => if i k ≤ f a then i k else 0\n[PROOFSTEP]\nrw [finset_sup_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁷ : MeasurableSpace α\nK : Type u_5\ninst✝⁶ : SemilatticeSup β\ninst✝⁵ : OrderBot β\ninst✝⁴ : Zero β\ninst✝³ : TopologicalSpace β\ninst✝² : OrderClosedTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\nn : ℕ\na : α\nhf : Measurable f\n⊢ (Finset.sup (Finset.range n) fun c => ↑(restrict (const α (i c)) {a | i c ≤ f a}) a) =\n    Finset.sup (Finset.range n) fun k => if i k ≤ f a then i k else 0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁷ : MeasurableSpace α\nK : Type u_5\ninst✝⁶ : SemilatticeSup β\ninst✝⁵ : OrderBot β\ninst✝⁴ : Zero β\ninst✝³ : TopologicalSpace β\ninst✝² : OrderClosedTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\nn : ℕ\na : α\nhf : Measurable f\n⊢ (fun c => ↑(restrict (const α (i c)) {a | i c ≤ f a}) a) = fun k => if i k ≤ f a then i k else 0\n[PROOFSTEP]\nfunext k\n[GOAL]\ncase e_f.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁷ : MeasurableSpace α\nK : Type u_5\ninst✝⁶ : SemilatticeSup β\ninst✝⁵ : OrderBot β\ninst✝⁴ : Zero β\ninst✝³ : TopologicalSpace β\ninst✝² : OrderClosedTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\nn : ℕ\na : α\nhf : Measurable f\nk : ℕ\n⊢ ↑(restrict (const α (i k)) {a | i k ≤ f a}) a = if i k ≤ f a then i k else 0\n[PROOFSTEP]\nrw [restrict_apply]\n[GOAL]\ncase e_f.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁷ : MeasurableSpace α\nK : Type u_5\ninst✝⁶ : SemilatticeSup β\ninst✝⁵ : OrderBot β\ninst✝⁴ : Zero β\ninst✝³ : TopologicalSpace β\ninst✝² : OrderClosedTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\nn : ℕ\na : α\nhf : Measurable f\nk : ℕ\n⊢ indicator {a | i k ≤ f a} (↑(const α (i k))) a = if i k ≤ f a then i k else 0\ncase e_f.h.hs\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁷ : MeasurableSpace α\nK : Type u_5\ninst✝⁶ : SemilatticeSup β\ninst✝⁵ : OrderBot β\ninst✝⁴ : Zero β\ninst✝³ : TopologicalSpace β\ninst✝² : OrderClosedTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\nn : ℕ\na : α\nhf : Measurable f\nk : ℕ\n⊢ MeasurableSet {a | i k ≤ f a}\n[PROOFSTEP]\nrfl\n[GOAL]\ncase e_f.h.hs\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁷ : MeasurableSpace α\nK : Type u_5\ninst✝⁶ : SemilatticeSup β\ninst✝⁵ : OrderBot β\ninst✝⁴ : Zero β\ninst✝³ : TopologicalSpace β\ninst✝² : OrderClosedTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\nn : ℕ\na : α\nhf : Measurable f\nk : ℕ\n⊢ MeasurableSet {a | i k ≤ f a}\n[PROOFSTEP]\nexact hf measurableSet_Ici\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁸ : MeasurableSpace α\nK : Type u_5\ninst✝⁷ : SemilatticeSup β\ninst✝⁶ : OrderBot β\ninst✝⁵ : Zero β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderClosedTopology β\ninst✝² : MeasurableSpace β\ninst✝¹ : OpensMeasurableSpace β\ninst✝ : MeasurableSpace γ\ni : ℕ → β\nf : γ → β\ng : α → γ\nn : ℕ\na : α\nhf : Measurable f\nhg : Measurable g\n⊢ ↑(approx i (f ∘ g) n) a = ↑(approx i f n) (g a)\n[PROOFSTEP]\nrw [approx_apply _ hf, approx_apply _ (hf.comp hg)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁸ : MeasurableSpace α\nK : Type u_5\ninst✝⁷ : SemilatticeSup β\ninst✝⁶ : OrderBot β\ninst✝⁵ : Zero β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderClosedTopology β\ninst✝² : MeasurableSpace β\ninst✝¹ : OpensMeasurableSpace β\ninst✝ : MeasurableSpace γ\ni : ℕ → β\nf : γ → β\ng : α → γ\nn : ℕ\na : α\nhf : Measurable f\nhg : Measurable g\n⊢ (Finset.sup (Finset.range n) fun k => if i k ≤ (f ∘ g) a then i k else 0) =\n    Finset.sup (Finset.range n) fun k => if i k ≤ f (g a) then i k else 0\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁶ : MeasurableSpace α\nK : Type u_5\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : CompleteLattice β\ninst✝³ : OrderClosedTopology β\ninst✝² : Zero β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\na : α\nhf : Measurable f\nh_zero : 0 = ⊥\n⊢ ⨆ (n : ℕ), ↑(approx i f n) a = ⨆ (k : ℕ) (_ : i k ≤ f a), i k\n[PROOFSTEP]\nrefine' le_antisymm (iSup_le fun n => _) (iSup_le fun k => iSup_le fun hk => _)\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁶ : MeasurableSpace α\nK : Type u_5\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : CompleteLattice β\ninst✝³ : OrderClosedTopology β\ninst✝² : Zero β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\na : α\nhf : Measurable f\nh_zero : 0 = ⊥\nn : ℕ\n⊢ ↑(approx i f n) a ≤ ⨆ (k : ℕ) (_ : i k ≤ f a), i k\n[PROOFSTEP]\nrw [approx_apply a hf, h_zero]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁶ : MeasurableSpace α\nK : Type u_5\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : CompleteLattice β\ninst✝³ : OrderClosedTopology β\ninst✝² : Zero β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\na : α\nhf : Measurable f\nh_zero : 0 = ⊥\nn : ℕ\n⊢ (Finset.sup (Finset.range n) fun k => if i k ≤ f a then i k else ⊥) ≤ ⨆ (k : ℕ) (_ : i k ≤ f a), i k\n[PROOFSTEP]\nrefine' Finset.sup_le fun k _ => _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁶ : MeasurableSpace α\nK : Type u_5\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : CompleteLattice β\ninst✝³ : OrderClosedTopology β\ninst✝² : Zero β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\na : α\nhf : Measurable f\nh_zero : 0 = ⊥\nn k : ℕ\nx✝ : k ∈ Finset.range n\n⊢ (if i k ≤ f a then i k else ⊥) ≤ ⨆ (k : ℕ) (_ : i k ≤ f a), i k\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁶ : MeasurableSpace α\nK : Type u_5\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : CompleteLattice β\ninst✝³ : OrderClosedTopology β\ninst✝² : Zero β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\na : α\nhf : Measurable f\nh_zero : 0 = ⊥\nn k : ℕ\nx✝ : k ∈ Finset.range n\nh : i k ≤ f a\n⊢ i k ≤ ⨆ (k : ℕ) (_ : i k ≤ f a), i k\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁶ : MeasurableSpace α\nK : Type u_5\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : CompleteLattice β\ninst✝³ : OrderClosedTopology β\ninst✝² : Zero β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\na : α\nhf : Measurable f\nh_zero : 0 = ⊥\nn k : ℕ\nx✝ : k ∈ Finset.range n\nh : ¬i k ≤ f a\n⊢ ⊥ ≤ ⨆ (k : ℕ) (_ : i k ≤ f a), i k\n[PROOFSTEP]\nexact le_iSup_of_le k (le_iSup (fun _ : i k ≤ f a => i k) h)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁶ : MeasurableSpace α\nK : Type u_5\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : CompleteLattice β\ninst✝³ : OrderClosedTopology β\ninst✝² : Zero β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\na : α\nhf : Measurable f\nh_zero : 0 = ⊥\nn k : ℕ\nx✝ : k ∈ Finset.range n\nh : ¬i k ≤ f a\n⊢ ⊥ ≤ ⨆ (k : ℕ) (_ : i k ≤ f a), i k\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁶ : MeasurableSpace α\nK : Type u_5\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : CompleteLattice β\ninst✝³ : OrderClosedTopology β\ninst✝² : Zero β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\na : α\nhf : Measurable f\nh_zero : 0 = ⊥\nk : ℕ\nhk : i k ≤ f a\n⊢ i k ≤ ⨆ (n : ℕ), ↑(approx i f n) a\n[PROOFSTEP]\nrefine' le_iSup_of_le (k + 1) _\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁶ : MeasurableSpace α\nK : Type u_5\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : CompleteLattice β\ninst✝³ : OrderClosedTopology β\ninst✝² : Zero β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\na : α\nhf : Measurable f\nh_zero : 0 = ⊥\nk : ℕ\nhk : i k ≤ f a\n⊢ i k ≤ ↑(approx i f (k + 1)) a\n[PROOFSTEP]\nrw [approx_apply a hf]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁶ : MeasurableSpace α\nK : Type u_5\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : CompleteLattice β\ninst✝³ : OrderClosedTopology β\ninst✝² : Zero β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\na : α\nhf : Measurable f\nh_zero : 0 = ⊥\nk : ℕ\nhk : i k ≤ f a\n⊢ i k ≤ Finset.sup (Finset.range (k + 1)) fun k => if i k ≤ f a then i k else 0\n[PROOFSTEP]\nhave : k ∈ Finset.range (k + 1) := Finset.mem_range.2 (Nat.lt_succ_self _)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁶ : MeasurableSpace α\nK : Type u_5\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : CompleteLattice β\ninst✝³ : OrderClosedTopology β\ninst✝² : Zero β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\na : α\nhf : Measurable f\nh_zero : 0 = ⊥\nk : ℕ\nhk : i k ≤ f a\nthis : k ∈ Finset.range (k + 1)\n⊢ i k ≤ Finset.sup (Finset.range (k + 1)) fun k => if i k ≤ f a then i k else 0\n[PROOFSTEP]\nrefine' le_trans (le_of_eq _) (Finset.le_sup this)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁶ : MeasurableSpace α\nK : Type u_5\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : CompleteLattice β\ninst✝³ : OrderClosedTopology β\ninst✝² : Zero β\ninst✝¹ : MeasurableSpace β\ninst✝ : OpensMeasurableSpace β\ni : ℕ → β\nf : α → β\na : α\nhf : Measurable f\nh_zero : 0 = ⊥\nk : ℕ\nhk : i k ≤ f a\nthis : k ∈ Finset.range (k + 1)\n⊢ i k = if i k ≤ f a then i k else 0\n[PROOFSTEP]\nrw [if_pos hk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nq : ℚ\n⊢ ennrealRatEmbed (Encodable.encode q) = ↑(Real.toNNReal ↑q)\n[PROOFSTEP]\nrw [ennrealRatEmbed, Encodable.encodek]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nq : ℚ\n⊢ ENNReal.ofReal ↑(Option.getD (Option.some q) 0) = ↑(Real.toNNReal ↑q)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nn : ℕ\na : α\n⊢ ↑(eapprox f n) a < ⊤\n[PROOFSTEP]\nsimp only [eapprox, approx, finset_sup_apply, Finset.mem_range, ENNReal.bot_eq_zero, restrict]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nn : ℕ\na : α\n⊢ (Finset.sup (Finset.range n) fun c =>\n      ↑(if hs : MeasurableSet {a | ennrealRatEmbed c ≤ f a} then\n            piecewise {a | ennrealRatEmbed c ≤ f a} hs (const α (ennrealRatEmbed c)) 0\n          else 0)\n        a) <\n    ⊤\n[PROOFSTEP]\nrw [Finset.sup_lt_iff (α := ℝ≥0∞) WithTop.zero_lt_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nn : ℕ\na : α\n⊢ ∀ (b : ℕ),\n    b ∈ Finset.range n →\n      ↑(if hs : MeasurableSet {a | ennrealRatEmbed b ≤ f a} then\n              piecewise {a | ennrealRatEmbed b ≤ f a} hs (const α (ennrealRatEmbed b)) 0\n            else 0)\n          a <\n        ⊤\n[PROOFSTEP]\nintro b _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nn : ℕ\na : α\nb : ℕ\na✝ : b ∈ Finset.range n\n⊢ ↑(if hs : MeasurableSet {a | ennrealRatEmbed b ≤ f a} then\n          piecewise {a | ennrealRatEmbed b ≤ f a} hs (const α (ennrealRatEmbed b)) 0\n        else 0)\n      a <\n    ⊤\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nn : ℕ\na : α\nb : ℕ\na✝ : b ∈ Finset.range n\nh✝ : MeasurableSet {a | ennrealRatEmbed b ≤ f a}\n⊢ ↑(piecewise {a | ennrealRatEmbed b ≤ f a} h✝ (const α (ennrealRatEmbed b)) 0) a < ⊤\n[PROOFSTEP]\nsimp only [coe_zero, coe_piecewise, piecewise_eq_indicator, coe_const]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nn : ℕ\na : α\nb : ℕ\na✝ : b ∈ Finset.range n\nh✝ : MeasurableSet {a | ennrealRatEmbed b ≤ f a}\n⊢ Set.piecewise {a | ennrealRatEmbed b ≤ f a} (Function.const α (ennrealRatEmbed b)) 0 a < ⊤\n[PROOFSTEP]\ncalc\n  {a : α | ennrealRatEmbed b ≤ f a}.indicator (fun _ => ennrealRatEmbed b) a ≤ ennrealRatEmbed b :=\n    indicator_le_self _ _ a\n  _ < ⊤ := ENNReal.coe_lt_top\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nn : ℕ\na : α\nb : ℕ\na✝ : b ∈ Finset.range n\nh✝ : ¬MeasurableSet {a | ennrealRatEmbed b ≤ f a}\n⊢ ↑0 a < ⊤\n[PROOFSTEP]\nexact WithTop.zero_lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nhf : Measurable f\na : α\n⊢ ⨆ (n : ℕ), ↑(eapprox f n) a = f a\n[PROOFSTEP]\nrw [eapprox, iSup_approx_apply ennrealRatEmbed f a hf rfl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nhf : Measurable f\na : α\n⊢ ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k = f a\n[PROOFSTEP]\nrefine' le_antisymm (iSup_le fun i => iSup_le fun hi => hi) (le_of_not_gt _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nhf : Measurable f\na : α\n⊢ ¬f a > ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nhf : Measurable f\na : α\nh : f a > ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k\n⊢ False\n[PROOFSTEP]\nrcases ENNReal.lt_iff_exists_rat_btwn.1 h with ⟨q, _, lt_q, q_lt⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nhf : Measurable f\na : α\nh : f a > ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k\nq : ℚ\nleft✝ : 0 ≤ q\nlt_q : ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k < ↑(Real.toNNReal ↑q)\nq_lt : ↑(Real.toNNReal ↑q) < f a\n⊢ False\n[PROOFSTEP]\nhave : (Real.toNNReal q : ℝ≥0∞) ≤ ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k :=\n  by\n  refine' le_iSup_of_le (Encodable.encode q) _\n  rw [ennrealRatEmbed_encode q]\n  refine' le_iSup_of_le (le_of_lt q_lt) _\n  exact le_rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nhf : Measurable f\na : α\nh : f a > ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k\nq : ℚ\nleft✝ : 0 ≤ q\nlt_q : ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k < ↑(Real.toNNReal ↑q)\nq_lt : ↑(Real.toNNReal ↑q) < f a\n⊢ ↑(Real.toNNReal ↑q) ≤ ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k\n[PROOFSTEP]\nrefine' le_iSup_of_le (Encodable.encode q) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nhf : Measurable f\na : α\nh : f a > ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k\nq : ℚ\nleft✝ : 0 ≤ q\nlt_q : ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k < ↑(Real.toNNReal ↑q)\nq_lt : ↑(Real.toNNReal ↑q) < f a\n⊢ ↑(Real.toNNReal ↑q) ≤ ⨆ (_ : ennrealRatEmbed (Encodable.encode q) ≤ f a), ennrealRatEmbed (Encodable.encode q)\n[PROOFSTEP]\nrw [ennrealRatEmbed_encode q]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nhf : Measurable f\na : α\nh : f a > ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k\nq : ℚ\nleft✝ : 0 ≤ q\nlt_q : ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k < ↑(Real.toNNReal ↑q)\nq_lt : ↑(Real.toNNReal ↑q) < f a\n⊢ ↑(Real.toNNReal ↑q) ≤ ⨆ (_ : ↑(Real.toNNReal ↑q) ≤ f a), ↑(Real.toNNReal ↑q)\n[PROOFSTEP]\nrefine' le_iSup_of_le (le_of_lt q_lt) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nhf : Measurable f\na : α\nh : f a > ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k\nq : ℚ\nleft✝ : 0 ≤ q\nlt_q : ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k < ↑(Real.toNNReal ↑q)\nq_lt : ↑(Real.toNNReal ↑q) < f a\n⊢ ↑(Real.toNNReal ↑q) ≤ ↑(Real.toNNReal ↑q)\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nhf : Measurable f\na : α\nh : f a > ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k\nq : ℚ\nleft✝ : 0 ≤ q\nlt_q : ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k < ↑(Real.toNNReal ↑q)\nq_lt : ↑(Real.toNNReal ↑q) < f a\nthis : ↑(Real.toNNReal ↑q) ≤ ⨆ (k : ℕ) (_ : ennrealRatEmbed k ≤ f a), ennrealRatEmbed k\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ (lt_of_le_of_lt this lt_q)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nn : ℕ\na : α\n⊢ ∑ k in Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\na : α\n⊢ ∑ k in Finset.range (Nat.zero + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f Nat.zero) a\n[PROOFSTEP]\nsimp only [Nat.zero_eq, Nat.zero_add, Finset.sum_singleton, Finset.range_one]\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\na : α\n⊢ ↑(↑(eapproxDiff f 0) a) = ↑(eapprox f 0) a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\na : α\nn : ℕ\nIH : ∑ k in Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a\n⊢ ∑ k in Finset.range (Nat.succ n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f (Nat.succ n)) a\n[PROOFSTEP]\nerw [Finset.sum_range_succ, Nat.succ_eq_add_one, IH, eapproxDiff, coe_map, Function.comp_apply, coe_sub, Pi.sub_apply,\n  ENNReal.coe_toNNReal, add_tsub_cancel_of_le (monotone_eapprox f (Nat.le_succ _) _)]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\na : α\nn : ℕ\nIH : ∑ k in Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a\n⊢ ↑(eapprox f (Nat.add n 0 + 1)) a - ↑(eapprox f (Nat.add n 0)) a ≠ ⊤\n[PROOFSTEP]\napply (lt_of_le_of_lt _ (eapprox_lt_top f (n + 1) a)).ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\na : α\nn : ℕ\nIH : ∑ k in Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a\n⊢ ↑(eapprox f (Nat.add n 0 + 1)) a - ↑(eapprox f (Nat.add n 0)) a ≤ ↑(eapprox f (n + 1)) a\n[PROOFSTEP]\nrw [tsub_le_iff_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\na : α\nn : ℕ\nIH : ∑ k in Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a\n⊢ ↑(eapprox f (Nat.add n 0 + 1)) a ≤ ↑(eapprox f (n + 1)) a + ↑(eapprox f (Nat.add n 0)) a\n[PROOFSTEP]\nexact le_self_add\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MeasurableSpace α\nK : Type u_5\nf : α → ℝ≥0∞\nhf : Measurable f\na : α\n⊢ ∑' (n : ℕ), ↑(↑(eapproxDiff f n) a) = f a\n[PROOFSTEP]\nsimp_rw [ENNReal.tsum_eq_iSup_nat' (tendsto_add_atTop_nat 1), sum_eapproxDiff, iSup_eapprox_apply f hf a]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Finset ℝ≥0∞\nhs : ∀ (x : α), ↑f x ≠ 0 → ↑↑μ (↑f ⁻¹' {↑f x}) ≠ 0 → ↑f x ∈ s\n⊢ lintegral f μ = ∑ x in s, x * ↑↑μ (↑f ⁻¹' {x})\n[PROOFSTEP]\nrefine' Finset.sum_bij_ne_zero (fun r _ _ => r) _ _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Finset ℝ≥0∞\nhs : ∀ (x : α), ↑f x ≠ 0 → ↑↑μ (↑f ⁻¹' {↑f x}) ≠ 0 → ↑f x ∈ s\n⊢ ∀ (a : ℝ≥0∞) (h₁ : a ∈ SimpleFunc.range f) (h₂ : a * ↑↑μ (↑f ⁻¹' {a}) ≠ 0), (fun r x x => r) a h₁ h₂ ∈ s\n[PROOFSTEP]\nsimpa only [forall_range_iff, mul_ne_zero_iff, and_imp]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Finset ℝ≥0∞\nhs : ∀ (x : α), ↑f x ≠ 0 → ↑↑μ (↑f ⁻¹' {↑f x}) ≠ 0 → ↑f x ∈ s\n⊢ ∀ (a₁ a₂ : ℝ≥0∞) (h₁₁ : a₁ ∈ SimpleFunc.range f) (h₁₂ : a₁ * ↑↑μ (↑f ⁻¹' {a₁}) ≠ 0) (h₂₁ : a₂ ∈ SimpleFunc.range f)\n    (h₂₂ : a₂ * ↑↑μ (↑f ⁻¹' {a₂}) ≠ 0), (fun r x x => r) a₁ h₁₁ h₁₂ = (fun r x x => r) a₂ h₂₁ h₂₂ → a₁ = a₂\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Finset ℝ≥0∞\nhs : ∀ (x : α), ↑f x ≠ 0 → ↑↑μ (↑f ⁻¹' {↑f x}) ≠ 0 → ↑f x ∈ s\na₁✝ a₂✝ : ℝ≥0∞\nh₁₁✝ : a₁✝ ∈ SimpleFunc.range f\nh₁₂✝ : a₁✝ * ↑↑μ (↑f ⁻¹' {a₁✝}) ≠ 0\nh₂₁✝ : a₂✝ ∈ SimpleFunc.range f\nh₂₂✝ : a₂✝ * ↑↑μ (↑f ⁻¹' {a₂✝}) ≠ 0\na✝ : (fun r x x => r) a₁✝ h₁₁✝ h₁₂✝ = (fun r x x => r) a₂✝ h₂₁✝ h₂₂✝\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\nassumption\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Finset ℝ≥0∞\nhs : ∀ (x : α), ↑f x ≠ 0 → ↑↑μ (↑f ⁻¹' {↑f x}) ≠ 0 → ↑f x ∈ s\n⊢ ∀ (b : ℝ≥0∞), b ∈ s → b * ↑↑μ (↑f ⁻¹' {b}) ≠ 0 → ∃ a h₁ h₂, b = (fun r x x => r) a h₁ h₂\n[PROOFSTEP]\nintro b _ hb\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Finset ℝ≥0∞\nhs : ∀ (x : α), ↑f x ≠ 0 → ↑↑μ (↑f ⁻¹' {↑f x}) ≠ 0 → ↑f x ∈ s\nb : ℝ≥0∞\na✝ : b ∈ s\nhb : b * ↑↑μ (↑f ⁻¹' {b}) ≠ 0\n⊢ ∃ a h₁ h₂, b = (fun r x x => r) a h₁ h₂\n[PROOFSTEP]\nrefine' ⟨b, _, hb, rfl⟩\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Finset ℝ≥0∞\nhs : ∀ (x : α), ↑f x ≠ 0 → ↑↑μ (↑f ⁻¹' {↑f x}) ≠ 0 → ↑f x ∈ s\nb : ℝ≥0∞\na✝ : b ∈ s\nhb : b * ↑↑μ (↑f ⁻¹' {b}) ≠ 0\n⊢ b ∈ SimpleFunc.range f\n[PROOFSTEP]\nrw [mem_range, ← preimage_singleton_nonempty]\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Finset ℝ≥0∞\nhs : ∀ (x : α), ↑f x ≠ 0 → ↑↑μ (↑f ⁻¹' {↑f x}) ≠ 0 → ↑f x ∈ s\nb : ℝ≥0∞\na✝ : b ∈ s\nhb : b * ↑↑μ (↑f ⁻¹' {b}) ≠ 0\n⊢ Set.Nonempty (↑f ⁻¹' {b})\n[PROOFSTEP]\nexact nonempty_of_measure_ne_zero (mul_ne_zero_iff.1 hb).2\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Finset ℝ≥0∞\nhs : ∀ (x : α), ↑f x ≠ 0 → ↑↑μ (↑f ⁻¹' {↑f x}) ≠ 0 → ↑f x ∈ s\n⊢ ∀ (a : ℝ≥0∞) (h₁ : a ∈ SimpleFunc.range f) (h₂ : a * ↑↑μ (↑f ⁻¹' {a}) ≠ 0),\n    a * ↑↑μ (↑f ⁻¹' {a}) = (fun r x x => r) a h₁ h₂ * ↑↑μ (↑f ⁻¹' {(fun r x x => r) a h₁ h₂})\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Finset ℝ≥0∞\nhs : ∀ (x : α), ↑f x ≠ 0 → ↑↑μ (↑f ⁻¹' {↑f x}) ≠ 0 → ↑f x ∈ s\na✝ : ℝ≥0∞\nh₁✝ : a✝ ∈ SimpleFunc.range f\nh₂✝ : a✝ * ↑↑μ (↑f ⁻¹' {a✝}) ≠ 0\n⊢ a✝ * ↑↑μ (↑f ⁻¹' {a✝}) = (fun r x x => r) a✝ h₁✝ h₂✝ * ↑↑μ (↑f ⁻¹' {(fun r x x => r) a✝ h₁✝ h₂✝})\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ng : β → ℝ≥0∞\nf : α →ₛ β\n⊢ lintegral (map g f) μ = ∑ x in SimpleFunc.range f, g x * ↑↑μ (↑f ⁻¹' {x})\n[PROOFSTEP]\nsimp only [lintegral, range_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ng : β → ℝ≥0∞\nf : α →ₛ β\n⊢ ∑ x in Finset.image g (SimpleFunc.range f), x * ↑↑μ (↑(map g f) ⁻¹' {x}) =\n    ∑ x in SimpleFunc.range f, g x * ↑↑μ (↑f ⁻¹' {x})\n[PROOFSTEP]\nrefine' Finset.sum_image' _ fun b hb => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ng : β → ℝ≥0∞\nf : α →ₛ β\nb : β\nhb : b ∈ SimpleFunc.range f\n⊢ g b * ↑↑μ (↑(map g f) ⁻¹' {g b}) =\n    ∑ x in Finset.filter (fun c' => g c' = g b) (SimpleFunc.range f), g x * ↑↑μ (↑f ⁻¹' {x})\n[PROOFSTEP]\nrcases mem_range.1 hb with ⟨a, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ng : β → ℝ≥0∞\nf : α →ₛ β\na : α\nhb : ↑f a ∈ SimpleFunc.range f\n⊢ g (↑f a) * ↑↑μ (↑(map g f) ⁻¹' {g (↑f a)}) =\n    ∑ x in Finset.filter (fun c' => g c' = g (↑f a)) (SimpleFunc.range f), g x * ↑↑μ (↑f ⁻¹' {x})\n[PROOFSTEP]\nrw [map_preimage_singleton, ← f.sum_measure_preimage_singleton, Finset.mul_sum]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ng : β → ℝ≥0∞\nf : α →ₛ β\na : α\nhb : ↑f a ∈ SimpleFunc.range f\n⊢ ∑ x in Finset.filter (fun b => g b = g (↑f a)) (SimpleFunc.range f), g (↑f a) * ↑↑μ (↑f ⁻¹' {x}) =\n    ∑ x in Finset.filter (fun c' => g c' = g (↑f a)) (SimpleFunc.range f), g x * ↑↑μ (↑f ⁻¹' {x})\n[PROOFSTEP]\nrefine' Finset.sum_congr _ _\n[GOAL]\ncase intro.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ng : β → ℝ≥0∞\nf : α →ₛ β\na : α\nhb : ↑f a ∈ SimpleFunc.range f\n⊢ Finset.filter (fun b => g b = g (↑f a)) (SimpleFunc.range f) =\n    Finset.filter (fun c' => g c' = g (↑f a)) (SimpleFunc.range f)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ng : β → ℝ≥0∞\nf : α →ₛ β\na : α\nhb : ↑f a ∈ SimpleFunc.range f\n⊢ ∀ (x : β),\n    x ∈ Finset.filter (fun c' => g c' = g (↑f a)) (SimpleFunc.range f) →\n      g (↑f a) * ↑↑μ (↑f ⁻¹' {x}) = g x * ↑↑μ (↑f ⁻¹' {x})\n[PROOFSTEP]\nintro x\n[GOAL]\ncase intro.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ng : β → ℝ≥0∞\nf : α →ₛ β\na : α\nhb : ↑f a ∈ SimpleFunc.range f\nx : β\n⊢ x ∈ Finset.filter (fun c' => g c' = g (↑f a)) (SimpleFunc.range f) →\n    g (↑f a) * ↑↑μ (↑f ⁻¹' {x}) = g x * ↑↑μ (↑f ⁻¹' {x})\n[PROOFSTEP]\nsimp only [Finset.mem_filter]\n[GOAL]\ncase intro.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ng : β → ℝ≥0∞\nf : α →ₛ β\na : α\nhb : ↑f a ∈ SimpleFunc.range f\nx : β\n⊢ x ∈ SimpleFunc.range f ∧ g x = g (↑f a) → g (↑f a) * ↑↑μ (↑f ⁻¹' {x}) = g x * ↑↑μ (↑f ⁻¹' {x})\n[PROOFSTEP]\nrintro ⟨_, h⟩\n[GOAL]\ncase intro.refine'_2.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ng : β → ℝ≥0∞\nf : α →ₛ β\na : α\nhb : ↑f a ∈ SimpleFunc.range f\nx : β\nleft✝ : x ∈ SimpleFunc.range f\nh : g x = g (↑f a)\n⊢ g (↑f a) * ↑↑μ (↑f ⁻¹' {x}) = g x * ↑↑μ (↑f ⁻¹' {x})\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\n⊢ lintegral (f + g) μ =\n    ∑ x in SimpleFunc.range (pair f g), (x.fst * ↑↑μ (↑(pair f g) ⁻¹' {x}) + x.snd * ↑↑μ (↑(pair f g) ⁻¹' {x}))\n[PROOFSTEP]\nrw [add_eq_map₂, map_lintegral]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\n⊢ ∑ x in SimpleFunc.range (pair f g), (x.fst + x.snd) * ↑↑μ (↑(pair f g) ⁻¹' {x}) =\n    ∑ x in SimpleFunc.range (pair f g), (x.fst * ↑↑μ (↑(pair f g) ⁻¹' {x}) + x.snd * ↑↑μ (↑(pair f g) ⁻¹' {x}))\n[PROOFSTEP]\nexact Finset.sum_congr rfl fun a _ => add_mul _ _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\n⊢ ∑ x in SimpleFunc.range (pair f g), (x.fst * ↑↑μ (↑(pair f g) ⁻¹' {x}) + x.snd * ↑↑μ (↑(pair f g) ⁻¹' {x})) =\n    ∑ x in SimpleFunc.range (pair f g), x.fst * ↑↑μ (↑(pair f g) ⁻¹' {x}) +\n      ∑ x in SimpleFunc.range (pair f g), x.snd * ↑↑μ (↑(pair f g) ⁻¹' {x})\n[PROOFSTEP]\nrw [Finset.sum_add_distrib]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\n⊢ ∑ x in SimpleFunc.range (pair f g), x.fst * ↑↑μ (↑(pair f g) ⁻¹' {x}) +\n      ∑ x in SimpleFunc.range (pair f g), x.snd * ↑↑μ (↑(pair f g) ⁻¹' {x}) =\n    lintegral (map Prod.fst (pair f g)) μ + lintegral (map Prod.snd (pair f g)) μ\n[PROOFSTEP]\nrw [map_lintegral, map_lintegral]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm✝ : MeasurableSpace α\nμ ν : Measure α\nm : MeasurableSpace α\nf : α →ₛ ℝ≥0∞\n⊢ ∀ (x y : Measure α), lintegral f (x + y) = lintegral f x + lintegral f y\n[PROOFSTEP]\nsimp [lintegral, mul_add, Finset.sum_add_distrib]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm✝ : MeasurableSpace α\nμ✝ ν : Measure α\nm : MeasurableSpace α\nf : α →ₛ ℝ≥0∞\nc : ℝ≥0∞\nμ : Measure α\n⊢ AddHom.toFun\n      { toFun := lintegral f,\n        map_add' :=\n          (_ :\n            ∀ (a a_1 : Measure α),\n              ∑ x in SimpleFunc.range f, x * ↑↑(a + a_1) (↑f ⁻¹' {x}) =\n                ∑ x in SimpleFunc.range f, x * ↑↑a (↑f ⁻¹' {x}) + ∑ x in SimpleFunc.range f, x * ↑↑a_1 (↑f ⁻¹' {x})) }\n      (c • μ) =\n    ↑(RingHom.id ℝ≥0∞) c •\n      AddHom.toFun\n        { toFun := lintegral f,\n          map_add' :=\n            (_ :\n              ∀ (a a_1 : Measure α),\n                ∑ x in SimpleFunc.range f, x * ↑↑(a + a_1) (↑f ⁻¹' {x}) =\n                  ∑ x in SimpleFunc.range f, x * ↑↑a (↑f ⁻¹' {x}) + ∑ x in SimpleFunc.range f, x * ↑↑a_1 (↑f ⁻¹' {x})) }\n        μ\n[PROOFSTEP]\nsimp [lintegral, mul_left_comm _ c, Finset.mul_sum, Measure.smul_apply c]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm✝ : MeasurableSpace α\nμ✝ ν : Measure α\nm : MeasurableSpace α\nι : Type u_5\nf : α →ₛ ℝ≥0∞\nμ : ι → Measure α\n⊢ lintegral f (Measure.sum μ) = ∑' (i : ι), lintegral f (μ i)\n[PROOFSTEP]\nsimp only [lintegral, Measure.sum_apply, f.measurableSet_preimage, ← Finset.tsum_subtype, ← ENNReal.tsum_mul_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm✝ : MeasurableSpace α\nμ✝ ν : Measure α\nm : MeasurableSpace α\nι : Type u_5\nf : α →ₛ ℝ≥0∞\nμ : ι → Measure α\n⊢ ∑' (x : { x // x ∈ SimpleFunc.range f }) (i : ι), ↑x * ↑↑(μ i) (↑f ⁻¹' {↑x}) =\n    ∑' (i : ι) (x : { x // x ∈ SimpleFunc.range f }), ↑x * ↑↑(μ i) (↑f ⁻¹' {↑x})\n[PROOFSTEP]\napply ENNReal.tsum_comm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Set α\nhs : MeasurableSet s\nx : α\nhx : ↑(restrict f s) x ≠ 0\nhxs : x ∈ s\nx✝ : ↑↑μ (↑(restrict f s) ⁻¹' {↑(restrict f s) x}) ≠ 0\n⊢ ↑(restrict f s) x ∈ SimpleFunc.range f\n[PROOFSTEP]\nsimp only [f.restrict_apply hs, indicator_of_mem hxs, mem_range_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Set α\nhs : MeasurableSet s\nx : α\nhx : ↑(restrict f s) x ≠ 0\nhxs : ¬x ∈ s\n⊢ ↑(restrict f s) x = 0\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Set α\nhs : MeasurableSet s\nb : α\nhb : ↑f b = 0\n⊢ ↑f b * ↑↑μ (↑(restrict f s) ⁻¹' {↑f b}) = ↑f b * ↑↑μ (↑f ⁻¹' {↑f b} ∩ s)\n[PROOFSTEP]\nsimp only [hb, zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Set α\nhs : MeasurableSet s\nb : α\nhb : ¬↑f b = 0\n⊢ ↑f b * ↑↑μ (↑(restrict f s) ⁻¹' {↑f b}) = ↑f b * ↑↑μ (↑f ⁻¹' {↑f b} ∩ s)\n[PROOFSTEP]\nrw [restrict_preimage_singleton _ hs hb, inter_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm✝ : MeasurableSpace α\nμ✝ ν : Measure α\nm : MeasurableSpace α\nf : α →ₛ ℝ≥0∞\ns : Set α\nμ : Measure α\n⊢ lintegral f (Measure.restrict μ s) = ∑ y in SimpleFunc.range f, y * ↑↑μ (↑f ⁻¹' {y} ∩ s)\n[PROOFSTEP]\nsimp only [lintegral, Measure.restrict_apply, f.measurableSet_preimage]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf : α →ₛ ℝ≥0∞\ns : Set α\nhs : MeasurableSet s\n⊢ lintegral (restrict f s) μ = lintegral f (Measure.restrict μ s)\n[PROOFSTEP]\nrw [f.restrict_lintegral hs, lintegral_restrict]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nc : ℝ≥0∞\n⊢ lintegral (const α c) μ = c * ↑↑μ univ\n[PROOFSTEP]\nrw [lintegral]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nc : ℝ≥0∞\n⊢ ∑ x in SimpleFunc.range (const α c), x * ↑↑μ (↑(const α c) ⁻¹' {x}) = c * ↑↑μ univ\n[PROOFSTEP]\ncases isEmpty_or_nonempty α\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nc : ℝ≥0∞\nh✝ : IsEmpty α\n⊢ ∑ x in SimpleFunc.range (const α c), x * ↑↑μ (↑(const α c) ⁻¹' {x}) = c * ↑↑μ univ\n[PROOFSTEP]\nsimp [μ.eq_zero_of_isEmpty]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nc : ℝ≥0∞\nh✝ : Nonempty α\n⊢ ∑ x in SimpleFunc.range (const α c), x * ↑↑μ (↑(const α c) ⁻¹' {x}) = c * ↑↑μ univ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nc : ℝ≥0∞\nh✝ : Nonempty α\n⊢ c * ↑↑μ (Function.const α c ⁻¹' {c}) = c * ↑↑μ univ\n[PROOFSTEP]\nunfold Function.const\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nc : ℝ≥0∞\nh✝ : Nonempty α\n⊢ c * ↑↑μ ((fun x => c) ⁻¹' {c}) = c * ↑↑μ univ\n[PROOFSTEP]\nrw [preimage_const_of_mem (mem_singleton c)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nc : ℝ≥0∞\ns : Set α\n⊢ lintegral (const α c) (Measure.restrict μ s) = c * ↑↑μ s\n[PROOFSTEP]\nrw [const_lintegral, Measure.restrict_apply MeasurableSet.univ, univ_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nc : ℝ≥0∞\ns : Set α\nhs : MeasurableSet s\n⊢ lintegral (restrict (const α c) s) μ = c * ↑↑μ s\n[PROOFSTEP]\nrw [restrict_lintegral_eq_lintegral_restrict _ hs, const_lintegral_restrict]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\n⊢ lintegral (map Prod.fst (pair f g)) μ ⊔ lintegral (map Prod.snd (pair f g)) μ ≤\n    ∑ x in SimpleFunc.range (pair f g), (x.fst ⊔ x.snd) * ↑↑μ (↑(pair f g) ⁻¹' {x})\n[PROOFSTEP]\nrw [map_lintegral, map_lintegral]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\n⊢ (∑ x in SimpleFunc.range (pair f g), x.fst * ↑↑μ (↑(pair f g) ⁻¹' {x})) ⊔\n      ∑ x in SimpleFunc.range (pair f g), x.snd * ↑↑μ (↑(pair f g) ⁻¹' {x}) ≤\n    ∑ x in SimpleFunc.range (pair f g), (x.fst ⊔ x.snd) * ↑↑μ (↑(pair f g) ⁻¹' {x})\n[PROOFSTEP]\nrefine' sup_le _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\n⊢ ∑ x in SimpleFunc.range (pair f g), x.fst * ↑↑μ (↑(pair f g) ⁻¹' {x}) ≤\n    ∑ x in SimpleFunc.range (pair f g), (x.fst ⊔ x.snd) * ↑↑μ (↑(pair f g) ⁻¹' {x})\n[PROOFSTEP]\nrefine' Finset.sum_le_sum fun a _ => mul_le_mul_right' _ _\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\n⊢ ∑ x in SimpleFunc.range (pair f g), x.snd * ↑↑μ (↑(pair f g) ⁻¹' {x}) ≤\n    ∑ x in SimpleFunc.range (pair f g), (x.fst ⊔ x.snd) * ↑↑μ (↑(pair f g) ⁻¹' {x})\n[PROOFSTEP]\nrefine' Finset.sum_le_sum fun a _ => mul_le_mul_right' _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\na : ℝ≥0∞ × ℝ≥0∞\nx✝ : a ∈ SimpleFunc.range (pair f g)\n⊢ a.fst ≤ a.fst ⊔ a.snd\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\na : ℝ≥0∞ × ℝ≥0∞\nx✝ : a ∈ SimpleFunc.range (pair f g)\n⊢ a.snd ≤ a.fst ⊔ a.snd\n[PROOFSTEP]\nexact le_sup_left\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\na : ℝ≥0∞ × ℝ≥0∞\nx✝ : a ∈ SimpleFunc.range (pair f g)\n⊢ a.snd ≤ a.fst ⊔ a.snd\n[PROOFSTEP]\nexact le_sup_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\n⊢ ∑ x in SimpleFunc.range (pair f g), (x.fst ⊔ x.snd) * ↑↑μ (↑(pair f g) ⁻¹' {x}) = lintegral (f ⊔ g) μ\n[PROOFSTEP]\nrw [sup_eq_map₂, map_lintegral]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\nhfg : f ≤ g\nhμν : μ ≤ ν\n⊢ lintegral (f ⊔ g) μ = lintegral g μ\n[PROOFSTEP]\nrw [sup_of_le_right hfg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν✝ : Measure α\ninst✝ : MeasurableSpace β\nf : α →ₛ ℝ≥0∞\ng : β →ₛ ℝ≥0∞\nν : Measure β\nH : ∀ (y : ℝ≥0∞), ↑↑μ (↑f ⁻¹' {y}) = ↑↑ν (↑g ⁻¹' {y})\n⊢ lintegral f μ = lintegral g ν\n[PROOFSTEP]\nsimp only [lintegral, ← H]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν✝ : Measure α\ninst✝ : MeasurableSpace β\nf : α →ₛ ℝ≥0∞\ng : β →ₛ ℝ≥0∞\nν : Measure β\nH : ∀ (y : ℝ≥0∞), ↑↑μ (↑f ⁻¹' {y}) = ↑↑ν (↑g ⁻¹' {y})\n⊢ ∑ x in SimpleFunc.range f, x * ↑↑μ (↑f ⁻¹' {x}) = ∑ x in SimpleFunc.range g, x * ↑↑μ (↑f ⁻¹' {x})\n[PROOFSTEP]\napply lintegral_eq_of_subset\n[GOAL]\ncase hs\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν✝ : Measure α\ninst✝ : MeasurableSpace β\nf : α →ₛ ℝ≥0∞\ng : β →ₛ ℝ≥0∞\nν : Measure β\nH : ∀ (y : ℝ≥0∞), ↑↑μ (↑f ⁻¹' {y}) = ↑↑ν (↑g ⁻¹' {y})\n⊢ ∀ (x : α), ↑f x ≠ 0 → ↑↑μ (↑f ⁻¹' {↑f x}) ≠ 0 → ↑f x ∈ SimpleFunc.range g\n[PROOFSTEP]\nsimp only [H]\n[GOAL]\ncase hs\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν✝ : Measure α\ninst✝ : MeasurableSpace β\nf : α →ₛ ℝ≥0∞\ng : β →ₛ ℝ≥0∞\nν : Measure β\nH : ∀ (y : ℝ≥0∞), ↑↑μ (↑f ⁻¹' {y}) = ↑↑ν (↑g ⁻¹' {y})\n⊢ ∀ (x : α), ↑f x ≠ 0 → ↑↑ν (↑g ⁻¹' {↑f x}) ≠ 0 → ↑f x ∈ SimpleFunc.range g\n[PROOFSTEP]\nintros\n[GOAL]\ncase hs\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν✝ : Measure α\ninst✝ : MeasurableSpace β\nf : α →ₛ ℝ≥0∞\ng : β →ₛ ℝ≥0∞\nν : Measure β\nH : ∀ (y : ℝ≥0∞), ↑↑μ (↑f ⁻¹' {y}) = ↑↑ν (↑g ⁻¹' {y})\nx✝ : α\na✝¹ : ↑f x✝ ≠ 0\na✝ : ↑↑ν (↑g ⁻¹' {↑f x✝}) ≠ 0\n⊢ ↑f x✝ ∈ SimpleFunc.range g\n[PROOFSTEP]\nexact mem_range_of_measure_ne_zero ‹_›\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nf g : α →ₛ ℝ≥0∞\nh : ↑f =ᵐ[μ] ↑g\ny : ℝ≥0∞\nx : α\nhx : ↑f x = ↑g x\n⊢ x ∈ ↑f ⁻¹' {y} ↔ x ∈ ↑g ⁻¹' {y}\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nβ : Type u_5\ninst✝ : MeasurableSpace β\nμ' : Measure β\nf : α →ₛ ℝ≥0∞\ng : β →ₛ ℝ≥0∞\nm' : α → β\neq : ∀ (a : α), ↑f a = ↑g (m' a)\nh : ∀ (s : Set β), MeasurableSet s → ↑↑μ' s = ↑↑μ (m' ⁻¹' s)\ny : ℝ≥0∞\n⊢ ↑↑μ (↑f ⁻¹' {y}) = ↑↑μ' (↑g ⁻¹' {y})\n[PROOFSTEP]\nsimp only [preimage, eq]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\nβ : Type u_5\ninst✝ : MeasurableSpace β\nμ' : Measure β\nf : α →ₛ ℝ≥0∞\ng : β →ₛ ℝ≥0∞\nm' : α → β\neq : ∀ (a : α), ↑f a = ↑g (m' a)\nh : ∀ (s : Set β), MeasurableSet s → ↑↑μ' s = ↑↑μ (m' ⁻¹' s)\ny : ℝ≥0∞\n⊢ ↑↑μ {x | ↑g (m' x) ∈ {y}} = ↑↑μ' {x | ↑g x ∈ {y}}\n[PROOFSTEP]\nexact (h (g ⁻¹' { y }) (g.measurableSet_preimage _)).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : Zero β\nf : α →ₛ β\nx : α\n⊢ x ∈ support ↑f ↔ x ∈ ⋃ (y : β) (_ : y ∈ filter (fun y => y ≠ 0) (SimpleFunc.range f)), ↑f ⁻¹' {y}\n[PROOFSTEP]\nsimp only [mem_support, Set.mem_preimage, mem_filter, mem_range_self, true_and_iff, exists_prop, mem_iUnion,\n  Set.mem_range, mem_singleton_iff, exists_eq_right']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝² : Zero β\ninst✝¹ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\ninst✝ : MeasurableSpace α\nf : α →ₛ β\n⊢ MeasurableSet (support ↑f)\n[PROOFSTEP]\nrw [f.support_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝² : Zero β\ninst✝¹ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\ninst✝ : MeasurableSpace α\nf : α →ₛ β\n⊢ MeasurableSet (⋃ (y : β) (_ : y ∈ filter (fun y => y ≠ 0) (SimpleFunc.range f)), ↑f ⁻¹' {y})\n[PROOFSTEP]\nexact Finset.measurableSet_biUnion _ fun y _ => measurableSet_fiber _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf : α →ₛ β\n⊢ SimpleFunc.FinMeasSupp f μ ↔ ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf : α →ₛ β\n⊢ SimpleFunc.FinMeasSupp f μ → ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nrefine' fun h y hy => lt_of_le_of_lt (measure_mono _) h\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf : α →ₛ β\nh : SimpleFunc.FinMeasSupp f μ\ny : β\nhy : y ≠ 0\n⊢ ↑f ⁻¹' {y} ⊆ {x | (fun x => ↑f x = OfNat.ofNat 0 x) x}ᶜ\n[PROOFSTEP]\nexact fun x hx (H : f x = 0) => hy <| H ▸ Eq.symm hx\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf : α →ₛ β\n⊢ (∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤) → SimpleFunc.FinMeasSupp f μ\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf : α →ₛ β\nH : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\n⊢ SimpleFunc.FinMeasSupp f μ\n[PROOFSTEP]\nrw [finMeasSupp_iff_support, support_eq]\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf : α →ₛ β\nH : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\n⊢ ↑↑μ (⋃ (y : β) (_ : y ∈ filter (fun y => y ≠ 0) (SimpleFunc.range f)), ↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (measure_biUnion_finset_le _ _) (sum_lt_top _)\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf : α →ₛ β\nH : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\n⊢ ∀ (a : β), a ∈ filter (fun y => y ≠ 0) (SimpleFunc.range f) → ↑↑μ (↑f ⁻¹' {a}) ≠ ⊤\n[PROOFSTEP]\nexact fun y hy => (H y (Finset.mem_filter.1 hy).2).ne\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝² : Zero β✝\ninst✝¹ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β✝\nβ : Type u_5\ninst✝ : AddMonoid β\nf g : α →ₛ β\nhf : SimpleFunc.FinMeasSupp f μ\nhg : SimpleFunc.FinMeasSupp g μ\n⊢ SimpleFunc.FinMeasSupp (f + g) μ\n[PROOFSTEP]\nrw [add_eq_map₂]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝² : Zero β✝\ninst✝¹ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β✝\nβ : Type u_5\ninst✝ : AddMonoid β\nf g : α →ₛ β\nhf : SimpleFunc.FinMeasSupp f μ\nhg : SimpleFunc.FinMeasSupp g μ\n⊢ SimpleFunc.FinMeasSupp (map (fun p => p.fst + p.snd) (pair f g)) μ\n[PROOFSTEP]\nexact hf.map₂ hg (zero_add 0)\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝² : Zero β✝\ninst✝¹ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β✝\nβ : Type u_5\ninst✝ : MonoidWithZero β\nf g : α →ₛ β\nhf : SimpleFunc.FinMeasSupp f μ\nhg : SimpleFunc.FinMeasSupp g μ\n⊢ SimpleFunc.FinMeasSupp (f * g) μ\n[PROOFSTEP]\nrw [mul_eq_map₂]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝² : Zero β✝\ninst✝¹ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β✝\nβ : Type u_5\ninst✝ : MonoidWithZero β\nf g : α →ₛ β\nhf : SimpleFunc.FinMeasSupp f μ\nhg : SimpleFunc.FinMeasSupp g μ\n⊢ SimpleFunc.FinMeasSupp (map (fun p => p.fst * p.snd) (pair f g)) μ\n[PROOFSTEP]\nexact hf.map₂ hg (zero_mul 0)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\nf : α →ₛ ℝ≥0∞\nhm : SimpleFunc.FinMeasSupp f μ\nhf : ∀ᵐ (a : α) ∂μ, ↑f a ≠ ⊤\n⊢ lintegral f μ < ⊤\n[PROOFSTEP]\nrefine' sum_lt_top fun a ha => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\nf : α →ₛ ℝ≥0∞\nhm : SimpleFunc.FinMeasSupp f μ\nhf : ∀ᵐ (a : α) ∂μ, ↑f a ≠ ⊤\na : ℝ≥0∞\nha : a ∈ SimpleFunc.range f\n⊢ a * ↑↑μ (↑f ⁻¹' {a}) ≠ ⊤\n[PROOFSTEP]\nrcases eq_or_ne a ∞ with (rfl | ha)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\nf : α →ₛ ℝ≥0∞\nhm : SimpleFunc.FinMeasSupp f μ\nhf : ∀ᵐ (a : α) ∂μ, ↑f a ≠ ⊤\nha : ⊤ ∈ SimpleFunc.range f\n⊢ ⊤ * ↑↑μ (↑f ⁻¹' {⊤}) ≠ ⊤\n[PROOFSTEP]\nsimp only [ae_iff, Ne.def, Classical.not_not] at hf \n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\nf : α →ₛ ℝ≥0∞\nhm : SimpleFunc.FinMeasSupp f μ\nha : ⊤ ∈ SimpleFunc.range f\nhf : ↑↑μ {a | ↑f a = ⊤} = 0\n⊢ ⊤ * ↑↑μ (↑f ⁻¹' {⊤}) ≠ ⊤\n[PROOFSTEP]\nsimp [Set.preimage, hf]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\nf : α →ₛ ℝ≥0∞\nhm : SimpleFunc.FinMeasSupp f μ\nhf : ∀ᵐ (a : α) ∂μ, ↑f a ≠ ⊤\na : ℝ≥0∞\nha✝ : a ∈ SimpleFunc.range f\nha : a ≠ ⊤\n⊢ a * ↑↑μ (↑f ⁻¹' {a}) ≠ ⊤\n[PROOFSTEP]\nby_cases ha0 : a = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\nf : α →ₛ ℝ≥0∞\nhm : SimpleFunc.FinMeasSupp f μ\nhf : ∀ᵐ (a : α) ∂μ, ↑f a ≠ ⊤\na : ℝ≥0∞\nha✝ : a ∈ SimpleFunc.range f\nha : a ≠ ⊤\nha0 : a = 0\n⊢ a * ↑↑μ (↑f ⁻¹' {a}) ≠ ⊤\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\nf : α →ₛ ℝ≥0∞\nhm : SimpleFunc.FinMeasSupp f μ\nhf : ∀ᵐ (a : α) ∂μ, ↑f a ≠ ⊤\nha✝ : 0 ∈ SimpleFunc.range f\nha : 0 ≠ ⊤\n⊢ 0 * ↑↑μ (↑f ⁻¹' {0}) ≠ ⊤\n[PROOFSTEP]\nrwa [zero_mul]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\nf : α →ₛ ℝ≥0∞\nhm : SimpleFunc.FinMeasSupp f μ\nhf : ∀ᵐ (a : α) ∂μ, ↑f a ≠ ⊤\na : ℝ≥0∞\nha✝ : a ∈ SimpleFunc.range f\nha : a ≠ ⊤\nha0 : ¬a = 0\n⊢ a * ↑↑μ (↑f ⁻¹' {a}) ≠ ⊤\n[PROOFSTEP]\nexact mul_ne_top ha (finMeasSupp_iff.1 hm _ ha0).ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\nf : α →ₛ ℝ≥0∞\nh : lintegral f μ ≠ ⊤\n⊢ SimpleFunc.FinMeasSupp f μ\n[PROOFSTEP]\nrefine' finMeasSupp_iff.2 fun b hb => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\nf : α →ₛ ℝ≥0∞\nh : lintegral f μ ≠ ⊤\nb : ℝ≥0∞\nhb : b ≠ 0\n⊢ ↑↑μ (↑f ⁻¹' {b}) < ⊤\n[PROOFSTEP]\nrw [f.lintegral_eq_of_subset' (Finset.subset_insert b _)] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\nf : α →ₛ ℝ≥0∞\nb : ℝ≥0∞\nh : ∑ x in insert b (SimpleFunc.range f \\ {0}), x * ↑↑μ (↑f ⁻¹' {x}) ≠ ⊤\nhb : b ≠ 0\n⊢ ↑↑μ (↑f ⁻¹' {b}) < ⊤\n[PROOFSTEP]\nrefine' ENNReal.lt_top_of_mul_ne_top_right _ hb\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\ninst✝¹ : Zero β\ninst✝ : Zero γ\nμ : Measure α\nf✝ : α →ₛ β\nf : α →ₛ ℝ≥0∞\nb : ℝ≥0∞\nh : ∑ x in insert b (SimpleFunc.range f \\ {0}), x * ↑↑μ (↑f ⁻¹' {x}) ≠ ⊤\nhb : b ≠ 0\n⊢ b * ↑↑μ (↑f ⁻¹' {b}) ≠ ⊤\n[PROOFSTEP]\nexact (lt_top_of_sum_ne_top h (Finset.mem_insert_self _ _)).ne\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nf : α →ₛ γ\n⊢ P f\n[PROOFSTEP]\ngeneralize h : f.range \\ {0} = s\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nf : α →ₛ γ\ns : Finset γ\nh : SimpleFunc.range f \\ {0} = s\n⊢ P f\n[PROOFSTEP]\nrw [← Finset.coe_inj, Finset.coe_sdiff, Finset.coe_singleton, SimpleFunc.coe_range] at h \n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nf : α →ₛ γ\ns : Finset γ\nh : range ↑f \\ {0} = ↑s\n⊢ P f\n[PROOFSTEP]\ninduction s using Finset.induction generalizing f with\n| empty =>\n  rw [Finset.coe_empty, diff_eq_empty, range_subset_singleton] at h \n  convert h_ind 0 MeasurableSet.univ\n  ext x\n  simp [h]\n| @insert x s hxs ih =>\n  have mx := f.measurableSet_preimage { x }\n  let g := SimpleFunc.piecewise (f ⁻¹' { x }) mx 0 f\n  have Pg : P g := by\n    apply ih\n    simp only [SimpleFunc.coe_piecewise, range_piecewise]\n    rw [image_compl_preimage, union_diff_distrib, diff_diff_comm, h, Finset.coe_insert, insert_diff_self_of_not_mem,\n      diff_eq_empty.mpr, Set.empty_union]\n    · rw [Set.image_subset_iff]\n      convert Set.subset_univ _\n      exact preimage_const_of_mem (mem_singleton _)\n    · rwa [Finset.mem_coe]\n  convert h_add _ Pg (h_ind x mx)\n  · ext1 y\n    by_cases hy : y ∈ f ⁻¹' { x }\n    · simpa [piecewise_eq_of_mem _ _ _ hy, -piecewise_eq_indicator]\n    · simp [piecewise_eq_of_not_mem _ _ _ hy, -piecewise_eq_indicator]\n  rw [disjoint_iff_inf_le]\n  rintro y\n  by_cases hy : y ∈ f ⁻¹' { x }\n  · simp [piecewise_eq_of_mem _ _ _ hy, -piecewise_eq_indicator]\n  · simp [piecewise_eq_of_not_mem _ _ _ hy, -piecewise_eq_indicator]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nf : α →ₛ γ\ns : Finset γ\nh : range ↑f \\ {0} = ↑s\n⊢ P f\n[PROOFSTEP]\ninduction s using Finset.induction generalizing f with\n| empty =>\n  rw [Finset.coe_empty, diff_eq_empty, range_subset_singleton] at h \n  convert h_ind 0 MeasurableSet.univ\n  ext x\n  simp [h]\n| @insert x s hxs ih =>\n  have mx := f.measurableSet_preimage { x }\n  let g := SimpleFunc.piecewise (f ⁻¹' { x }) mx 0 f\n  have Pg : P g := by\n    apply ih\n    simp only [SimpleFunc.coe_piecewise, range_piecewise]\n    rw [image_compl_preimage, union_diff_distrib, diff_diff_comm, h, Finset.coe_insert, insert_diff_self_of_not_mem,\n      diff_eq_empty.mpr, Set.empty_union]\n    · rw [Set.image_subset_iff]\n      convert Set.subset_univ _\n      exact preimage_const_of_mem (mem_singleton _)\n    · rwa [Finset.mem_coe]\n  convert h_add _ Pg (h_ind x mx)\n  · ext1 y\n    by_cases hy : y ∈ f ⁻¹' { x }\n    · simpa [piecewise_eq_of_mem _ _ _ hy, -piecewise_eq_indicator]\n    · simp [piecewise_eq_of_not_mem _ _ _ hy, -piecewise_eq_indicator]\n  rw [disjoint_iff_inf_le]\n  rintro y\n  by_cases hy : y ∈ f ⁻¹' { x }\n  · simp [piecewise_eq_of_mem _ _ _ hy, -piecewise_eq_indicator]\n  · simp [piecewise_eq_of_not_mem _ _ _ hy, -piecewise_eq_indicator]\n[GOAL]\ncase empty\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑∅\n⊢ P f\n[PROOFSTEP]\n\n| empty =>\n  rw [Finset.coe_empty, diff_eq_empty, range_subset_singleton] at h \n  convert h_ind 0 MeasurableSet.univ\n  ext x\n  simp [h]\n[GOAL]\ncase empty\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑∅\n⊢ P f\n[PROOFSTEP]\nrw [Finset.coe_empty, diff_eq_empty, range_subset_singleton] at h \n[GOAL]\ncase empty\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nf : α →ₛ γ\nh : ↑f = Function.const α 0\n⊢ P f\n[PROOFSTEP]\nconvert h_ind 0 MeasurableSet.univ\n[GOAL]\ncase h.e'_1\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nf : α →ₛ γ\nh : ↑f = Function.const α 0\n⊢ f = piecewise univ (_ : MeasurableSet univ) (const α 0) (const α 0)\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_1.H\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nf : α →ₛ γ\nh : ↑f = Function.const α 0\nx : α\n⊢ ↑f x = ↑(piecewise univ (_ : MeasurableSet univ) (const α 0) (const α 0)) x\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase insert\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\n⊢ P f\n[PROOFSTEP]\n\n| @insert x s hxs ih =>\n  have mx := f.measurableSet_preimage { x }\n  let g := SimpleFunc.piecewise (f ⁻¹' { x }) mx 0 f\n  have Pg : P g := by\n    apply ih\n    simp only [SimpleFunc.coe_piecewise, range_piecewise]\n    rw [image_compl_preimage, union_diff_distrib, diff_diff_comm, h, Finset.coe_insert, insert_diff_self_of_not_mem,\n      diff_eq_empty.mpr, Set.empty_union]\n    · rw [Set.image_subset_iff]\n      convert Set.subset_univ _\n      exact preimage_const_of_mem (mem_singleton _)\n    · rwa [Finset.mem_coe]\n  convert h_add _ Pg (h_ind x mx)\n  · ext1 y\n    by_cases hy : y ∈ f ⁻¹' { x }\n    · simpa [piecewise_eq_of_mem _ _ _ hy, -piecewise_eq_indicator]\n    · simp [piecewise_eq_of_not_mem _ _ _ hy, -piecewise_eq_indicator]\n  rw [disjoint_iff_inf_le]\n  rintro y\n  by_cases hy : y ∈ f ⁻¹' { x }\n  · simp [piecewise_eq_of_mem _ _ _ hy, -piecewise_eq_indicator]\n  · simp [piecewise_eq_of_not_mem _ _ _ hy, -piecewise_eq_indicator]\n[GOAL]\ncase insert\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\n⊢ P f\n[PROOFSTEP]\nhave mx := f.measurableSet_preimage { x }\n[GOAL]\ncase insert\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\n⊢ P f\n[PROOFSTEP]\nlet g := SimpleFunc.piecewise (f ⁻¹' { x }) mx 0 f\n[GOAL]\ncase insert\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\n⊢ P f\n[PROOFSTEP]\nhave Pg : P g := by\n  apply ih\n  simp only [SimpleFunc.coe_piecewise, range_piecewise]\n  rw [image_compl_preimage, union_diff_distrib, diff_diff_comm, h, Finset.coe_insert, insert_diff_self_of_not_mem,\n    diff_eq_empty.mpr, Set.empty_union]\n  · rw [Set.image_subset_iff]\n    convert Set.subset_univ _\n    exact preimage_const_of_mem (mem_singleton _)\n  · rwa [Finset.mem_coe]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\n⊢ P g\n[PROOFSTEP]\napply ih\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\n⊢ range ↑g \\ {0} = ↑s\n[PROOFSTEP]\nsimp only [SimpleFunc.coe_piecewise, range_piecewise]\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\n⊢ (↑0 '' (↑f ⁻¹' {x}) ∪ ↑f '' (↑f ⁻¹' {x})ᶜ) \\ {0} = ↑s\n[PROOFSTEP]\nrw [image_compl_preimage, union_diff_distrib, diff_diff_comm, h, Finset.coe_insert, insert_diff_self_of_not_mem,\n  diff_eq_empty.mpr, Set.empty_union]\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\n⊢ ↑0 '' (↑f ⁻¹' {x}) ⊆ {0}\n[PROOFSTEP]\nrw [Set.image_subset_iff]\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\n⊢ ↑f ⁻¹' {x} ⊆ ↑0 ⁻¹' {0}\n[PROOFSTEP]\nconvert Set.subset_univ _\n[GOAL]\ncase h.e'_4\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\n⊢ ↑0 ⁻¹' {0} = univ\n[PROOFSTEP]\nexact preimage_const_of_mem (mem_singleton _)\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\n⊢ ¬x ∈ ↑s\n[PROOFSTEP]\nrwa [Finset.mem_coe]\n[GOAL]\ncase insert\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\nPg : P g\n⊢ P f\n[PROOFSTEP]\nconvert h_add _ Pg (h_ind x mx)\n[GOAL]\ncase h.e'_1\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\nPg : P g\n⊢ f = g + piecewise (↑f ⁻¹' {x}) mx (const α x) (const α 0)\n[PROOFSTEP]\next1 y\n[GOAL]\ncase h.e'_1.H\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\nPg : P g\ny : α\n⊢ ↑f y = ↑(g + piecewise (↑f ⁻¹' {x}) mx (const α x) (const α 0)) y\n[PROOFSTEP]\nby_cases hy : y ∈ f ⁻¹' { x }\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\nPg : P g\ny : α\nhy : y ∈ ↑f ⁻¹' {x}\n⊢ ↑f y = ↑(g + piecewise (↑f ⁻¹' {x}) mx (const α x) (const α 0)) y\n[PROOFSTEP]\nsimpa [piecewise_eq_of_mem _ _ _ hy, -piecewise_eq_indicator]\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\nPg : P g\ny : α\nhy : ¬y ∈ ↑f ⁻¹' {x}\n⊢ ↑f y = ↑(g + piecewise (↑f ⁻¹' {x}) mx (const α x) (const α 0)) y\n[PROOFSTEP]\nsimp [piecewise_eq_of_not_mem _ _ _ hy, -piecewise_eq_indicator]\n[GOAL]\ncase insert\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\nPg : P g\n⊢ Disjoint (support ↑g) (support ↑(piecewise (↑f ⁻¹' {x}) mx (const α x) (const α 0)))\n[PROOFSTEP]\nrw [disjoint_iff_inf_le]\n[GOAL]\ncase insert\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\nPg : P g\n⊢ support ↑g ⊓ support ↑(piecewise (↑f ⁻¹' {x}) mx (const α x) (const α 0)) ≤ ⊥\n[PROOFSTEP]\nrintro y\n[GOAL]\ncase insert\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\nPg : P g\ny : α\n⊢ y ∈ support ↑g ⊓ support ↑(piecewise (↑f ⁻¹' {x}) mx (const α x) (const α 0)) → y ∈ ⊥\n[PROOFSTEP]\nby_cases hy : y ∈ f ⁻¹' { x }\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\nPg : P g\ny : α\nhy : y ∈ ↑f ⁻¹' {x}\n⊢ y ∈ support ↑g ⊓ support ↑(piecewise (↑f ⁻¹' {x}) mx (const α x) (const α 0)) → y ∈ ⊥\n[PROOFSTEP]\nsimp [piecewise_eq_of_mem _ _ _ hy, -piecewise_eq_indicator]\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\nα : Type u_5\nγ : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : AddMonoid γ\nP : (α →ₛ γ) → Prop\nh_ind : ∀ (c : γ) {s : Set α} (hs : MeasurableSet s), P (piecewise s hs (const α c) (const α 0))\nh_add : ∀ ⦃f g : α →ₛ γ⦄, Disjoint (support ↑f) (support ↑g) → P f → P g → P (f + g)\nx : γ\ns : Finset γ\nhxs : ¬x ∈ s\nih : ∀ (f : α →ₛ γ), range ↑f \\ {0} = ↑s → P f\nf : α →ₛ γ\nh : range ↑f \\ {0} = ↑(insert x s)\nmx : MeasurableSet (↑f ⁻¹' {x})\ng : α →ₛ γ := piecewise (↑f ⁻¹' {x}) mx 0 f\nPg : P g\ny : α\nhy : ¬y ∈ ↑f ⁻¹' {x}\n⊢ y ∈ support ↑g ⊓ support ↑(piecewise (↑f ⁻¹' {x}) mx (const α x) (const α 0)) → y ∈ ⊥\n[PROOFSTEP]\nsimp [piecewise_eq_of_not_mem _ _ _ hy, -piecewise_eq_indicator]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nP : (α → ℝ≥0∞) → Prop\nh_ind : ∀ (c : ℝ≥0∞) ⦃s : Set α⦄, MeasurableSet s → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → ℝ≥0∞⦄, Disjoint (support f) (support g) → Measurable f → Measurable g → P f → P g → P (f + g)\nh_iSup :\n  ∀ ⦃f : ℕ → α → ℝ≥0∞⦄, (∀ (n : ℕ), Measurable (f n)) → Monotone f → (∀ (n : ℕ), P (f n)) → P fun x => ⨆ (n : ℕ), f n x\nf : α → ℝ≥0∞\nhf : Measurable f\n⊢ P f\n[PROOFSTEP]\nconvert h_iSup (fun n => (eapprox f n).measurable) (monotone_eapprox f) _ using 1\n[GOAL]\ncase h.e'_1\nα : Type u_1\ninst✝ : MeasurableSpace α\nP : (α → ℝ≥0∞) → Prop\nh_ind : ∀ (c : ℝ≥0∞) ⦃s : Set α⦄, MeasurableSet s → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → ℝ≥0∞⦄, Disjoint (support f) (support g) → Measurable f → Measurable g → P f → P g → P (f + g)\nh_iSup :\n  ∀ ⦃f : ℕ → α → ℝ≥0∞⦄, (∀ (n : ℕ), Measurable (f n)) → Monotone f → (∀ (n : ℕ), P (f n)) → P fun x => ⨆ (n : ℕ), f n x\nf : α → ℝ≥0∞\nhf : Measurable f\n⊢ f = fun x => ⨆ (n : ℕ), ↑(eapprox f n) x\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h.e'_1.h\nα : Type u_1\ninst✝ : MeasurableSpace α\nP : (α → ℝ≥0∞) → Prop\nh_ind : ∀ (c : ℝ≥0∞) ⦃s : Set α⦄, MeasurableSet s → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → ℝ≥0∞⦄, Disjoint (support f) (support g) → Measurable f → Measurable g → P f → P g → P (f + g)\nh_iSup :\n  ∀ ⦃f : ℕ → α → ℝ≥0∞⦄, (∀ (n : ℕ), Measurable (f n)) → Monotone f → (∀ (n : ℕ), P (f n)) → P fun x => ⨆ (n : ℕ), f n x\nf : α → ℝ≥0∞\nhf : Measurable f\nx : α\n⊢ f x = ⨆ (n : ℕ), ↑(eapprox f n) x\n[PROOFSTEP]\nrw [iSup_eapprox_apply f hf]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nP : (α → ℝ≥0∞) → Prop\nh_ind : ∀ (c : ℝ≥0∞) ⦃s : Set α⦄, MeasurableSet s → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → ℝ≥0∞⦄, Disjoint (support f) (support g) → Measurable f → Measurable g → P f → P g → P (f + g)\nh_iSup :\n  ∀ ⦃f : ℕ → α → ℝ≥0∞⦄, (∀ (n : ℕ), Measurable (f n)) → Monotone f → (∀ (n : ℕ), P (f n)) → P fun x => ⨆ (n : ℕ), f n x\nf : α → ℝ≥0∞\nhf : Measurable f\n⊢ ∀ (n : ℕ), P ↑(eapprox f n)\n[PROOFSTEP]\nexact fun n =>\n  SimpleFunc.induction (fun c s hs => h_ind c hs) (fun f g hfg hf hg => h_add hfg f.measurable g.measurable hf hg)\n    (eapprox f n)\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.SimpleFunc", "llama_tokens": 50935, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583250334526, "lm_q2_score": 0.5736784074525098, "lm_q1q2_score": 0.39925626355850724}}
{"text": "[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate l (n % length l) = rotate l n\n[PROOFSTEP]\nsimp [rotate]\n[GOAL]\nα : Type u\nn : ℕ\n⊢ rotate [] n = []\n[PROOFSTEP]\nsimp [rotate]\n[GOAL]\nα : Type u\nl : List α\n⊢ rotate l 0 = l\n[PROOFSTEP]\nsimp [rotate]\n[GOAL]\nα : Type u\nn : ℕ\n⊢ rotate' [] n = []\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nα : Type u\n⊢ rotate' [] zero = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u\nn✝ : ℕ\n⊢ rotate' [] (succ n✝) = []\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nl : List α\n⊢ rotate' l 0 = l\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nα : Type u\n⊢ rotate' [] 0 = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u\nhead✝ : α\ntail✝ : List α\n⊢ rotate' (head✝ :: tail✝) 0 = head✝ :: tail✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nl : List α\na : α\nn : ℕ\n⊢ rotate' (a :: l) (succ n) = rotate' (l ++ [a]) n\n[PROOFSTEP]\nsimp [rotate']\n[GOAL]\nα : Type u\nx✝ : ℕ\n⊢ length (rotate' [] x✝) = length []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\na : α\nl : List α\nn : ℕ\n⊢ length (rotate' (a :: l) (n + 1)) = length (a :: l)\n[PROOFSTEP]\nrw [List.rotate', length_rotate' (l ++ [a]) n]\n[GOAL]\nα : Type u\na : α\nl : List α\nn : ℕ\n⊢ length (l ++ [a]) = length (a :: l)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nn : ℕ\nh : n ≤ length []\n⊢ rotate' [] n = drop n [] ++ take n []\n[PROOFSTEP]\nsimp [drop_append_of_le_length h]\n[GOAL]\nα : Type u\nl : List α\nh : 0 ≤ length l\n⊢ rotate' l 0 = drop 0 l ++ take 0 l\n[PROOFSTEP]\nsimp [take_append_of_le_length h]\n[GOAL]\nα : Type u\na : α\nl : List α\nn : ℕ\nh : n + 1 ≤ length (a :: l)\n⊢ rotate' (a :: l) (n + 1) = drop (n + 1) (a :: l) ++ take (n + 1) (a :: l)\n[PROOFSTEP]\nhave hnl : n ≤ l.length := le_of_succ_le_succ h\n[GOAL]\nα : Type u\na : α\nl : List α\nn : ℕ\nh : n + 1 ≤ length (a :: l)\nhnl : n ≤ length l\n⊢ rotate' (a :: l) (n + 1) = drop (n + 1) (a :: l) ++ take (n + 1) (a :: l)\n[PROOFSTEP]\nhave hnl' : n ≤ (l ++ [a]).length := by rw [length_append, length_cons, List.length]; exact le_of_succ_le h\n[GOAL]\nα : Type u\na : α\nl : List α\nn : ℕ\nh : n + 1 ≤ length (a :: l)\nhnl : n ≤ length l\n⊢ n ≤ length (l ++ [a])\n[PROOFSTEP]\nrw [length_append, length_cons, List.length]\n[GOAL]\nα : Type u\na : α\nl : List α\nn : ℕ\nh : n + 1 ≤ length (a :: l)\nhnl : n ≤ length l\n⊢ n ≤ length l + succ 0\n[PROOFSTEP]\nexact le_of_succ_le h\n[GOAL]\nα : Type u\na : α\nl : List α\nn : ℕ\nh : n + 1 ≤ length (a :: l)\nhnl : n ≤ length l\nhnl' : n ≤ length (l ++ [a])\n⊢ rotate' (a :: l) (n + 1) = drop (n + 1) (a :: l) ++ take (n + 1) (a :: l)\n[PROOFSTEP]\nrw [rotate'_cons_succ, rotate'_eq_drop_append_take hnl', drop, take, drop_append_of_le_length hnl,\n  take_append_of_le_length hnl]\n[GOAL]\nα : Type u\na : α\nl : List α\nn : ℕ\nh : n + 1 ≤ length (a :: l)\nhnl : n ≤ length l\nhnl' : n ≤ length (l ++ [a])\n⊢ drop n l ++ [a] ++ take n l = drop n l ++ a :: take n l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\na : α\nl : List α\nm : ℕ\n⊢ rotate' (rotate' (a :: l) 0) m = rotate' (a :: l) (0 + m)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nn m : ℕ\n⊢ rotate' (rotate' [] n) m = rotate' [] (n + m)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\na : α\nl : List α\nn m : ℕ\n⊢ rotate' (rotate' (a :: l) (n + 1)) m = rotate' (a :: l) (n + 1 + m)\n[PROOFSTEP]\nrw [rotate'_cons_succ, rotate'_rotate' _ n, add_right_comm, ← rotate'_cons_succ]\n[GOAL]\nα : Type u\nl : List α\n⊢ rotate' l (length l) = l\n[PROOFSTEP]\nrw [rotate'_eq_drop_append_take le_rfl]\n[GOAL]\nα : Type u\nl : List α\n⊢ drop (length l) l ++ take (length l) l = l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl : List α\n⊢ rotate' l (length l * 0) = l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate' l (length l * (n + 1)) = rotate' (rotate' l (length l * n)) (length (rotate' l (length l * n)))\n[PROOFSTEP]\nsimp [-rotate'_length, Nat.mul_succ, rotate'_rotate']\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate' (rotate' l (length l * n)) (length (rotate' l (length l * n))) = l\n[PROOFSTEP]\nrw [rotate'_length, rotate'_length_mul l n]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate' l (n % length l) = rotate' (rotate' l (n % length l)) (length (rotate' l (n % length l)) * (n / length l))\n[PROOFSTEP]\nrw [rotate'_length_mul]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate' (rotate' l (n % length l)) (length (rotate' l (n % length l)) * (n / length l)) = rotate' l n\n[PROOFSTEP]\nrw [rotate'_rotate', length_rotate', Nat.mod_add_div]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nh : length l = 0\n⊢ rotate l n = rotate' l n\n[PROOFSTEP]\nsimp_all [length_eq_zero]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nh : ¬length l = 0\n⊢ rotate l n = rotate' l n\n[PROOFSTEP]\nrw [← rotate'_mod, rotate'_eq_drop_append_take (le_of_lt (Nat.mod_lt _ (Nat.pos_of_ne_zero h)))]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nh : ¬length l = 0\n⊢ rotate l n = drop (n % length l) l ++ take (n % length l) l\n[PROOFSTEP]\nsimp [rotate]\n[GOAL]\nα : Type u\nl : List α\na : α\nn : ℕ\n⊢ rotate (a :: l) (succ n) = rotate (l ++ [a]) n\n[PROOFSTEP]\nrw [rotate_eq_rotate', rotate_eq_rotate', rotate'_cons_succ]\n[GOAL]\nα : Type u\nx✝ : α\nn : ℕ\n⊢ x✝ ∈ rotate [] n ↔ x✝ ∈ []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\na : α\nl : List α\nx✝ : α\n⊢ x✝ ∈ rotate (a :: l) 0 ↔ x✝ ∈ a :: l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\na : α\nl : List α\nx✝ : α\nn : ℕ\n⊢ x✝ ∈ rotate (a :: l) (n + 1) ↔ x✝ ∈ a :: l\n[PROOFSTEP]\nsimp [rotate_cons_succ, mem_rotate, or_comm]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ length (rotate l n) = length l\n[PROOFSTEP]\nrw [rotate_eq_rotate', length_rotate']\n[GOAL]\nα : Type u\na : α\nn k : ℕ\n⊢ length (rotate (replicate n a) k) = n\n[PROOFSTEP]\nrw [length_rotate, length_replicate]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ n ≤ length l → rotate l n = drop n l ++ take n l\n[PROOFSTEP]\nrw [rotate_eq_rotate']\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ n ≤ length l → rotate' l n = drop n l ++ take n l\n[PROOFSTEP]\nexact rotate'_eq_drop_append_take\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate l n = drop (n % length l) l ++ take (n % length l) l\n[PROOFSTEP]\ncases' l.length.zero_le.eq_or_lt with hl hl\n[GOAL]\ncase inl\nα : Type u\nl : List α\nn : ℕ\nhl : 0 = length l\n⊢ rotate l n = drop (n % length l) l ++ take (n % length l) l\n[PROOFSTEP]\nsimp [eq_nil_of_length_eq_zero hl.symm]\n[GOAL]\ncase inr\nα : Type u\nl : List α\nn : ℕ\nhl : 0 < length l\n⊢ rotate l n = drop (n % length l) l ++ take (n % length l) l\n[PROOFSTEP]\nrw [← rotate_eq_drop_append_take (n.mod_lt hl).le, rotate_mod]\n[GOAL]\nα : Type u\nl l' : List α\n⊢ rotate (l ++ l') (length l) = l' ++ l\n[PROOFSTEP]\nrw [rotate_eq_rotate']\n[GOAL]\nα : Type u\nl l' : List α\n⊢ rotate' (l ++ l') (length l) = l' ++ l\n[PROOFSTEP]\ninduction l generalizing l'\n[GOAL]\ncase nil\nα : Type u\nl' : List α\n⊢ rotate' ([] ++ l') (length []) = l' ++ []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (l' : List α), rotate' (tail✝ ++ l') (length tail✝) = l' ++ tail✝\nl' : List α\n⊢ rotate' (head✝ :: tail✝ ++ l') (length (head✝ :: tail✝)) = l' ++ head✝ :: tail✝\n[PROOFSTEP]\nsimp_all [rotate']\n[GOAL]\nα : Type u\nl : List α\nn m : ℕ\n⊢ rotate (rotate l n) m = rotate l (n + m)\n[PROOFSTEP]\nrw [rotate_eq_rotate', rotate_eq_rotate', rotate_eq_rotate', rotate'_rotate']\n[GOAL]\nα : Type u\nl : List α\n⊢ rotate l (length l) = l\n[PROOFSTEP]\nrw [rotate_eq_rotate', rotate'_length]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate l (length l * n) = l\n[PROOFSTEP]\nrw [rotate_eq_rotate', rotate'_length_mul]\n[GOAL]\nα : Type u\ninst✝ : Group α\nx✝¹ : prod [] = 1\nx✝ : ℕ\n⊢ prod (rotate [] x✝) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝ : Group α\na : α\nl : List α\nhl : prod (a :: l) = 1\nn : ℕ\n⊢ prod (rotate (a :: l) n) = 1\n[PROOFSTEP]\nhave : n % List.length (a :: l) ≤ List.length (a :: l) := le_of_lt (Nat.mod_lt _ (by simp))\n[GOAL]\nα : Type u\ninst✝ : Group α\na : α\nl : List α\nhl : prod (a :: l) = 1\nn : ℕ\n⊢ length (a :: l) > 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝ : Group α\na : α\nl : List α\nhl : prod (a :: l) = 1\nn : ℕ\nthis : n % length (a :: l) ≤ length (a :: l)\n⊢ prod (rotate (a :: l) n) = 1\n[PROOFSTEP]\nrw [← List.take_append_drop (n % List.length (a :: l)) (a :: l)] at hl \n[GOAL]\nα : Type u\ninst✝ : Group α\na : α\nl : List α\nn : ℕ\nhl : prod (take (n % length (a :: l)) (a :: l) ++ drop (n % length (a :: l)) (a :: l)) = 1\nthis : n % length (a :: l) ≤ length (a :: l)\n⊢ prod (rotate (a :: l) n) = 1\n[PROOFSTEP]\nrw [← rotate_mod, rotate_eq_drop_append_take this, List.prod_append, mul_eq_one_iff_inv_eq, ← one_mul (List.prod _)⁻¹, ←\n  hl, List.prod_append, mul_assoc, mul_inv_self, mul_one]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate l n ~ l\n[PROOFSTEP]\nrw [rotate_eq_rotate']\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate' l n ~ l\n[PROOFSTEP]\ninduction' n with n hn generalizing l\n[GOAL]\ncase zero\nα : Type u\nl✝ l : List α\n⊢ rotate' l zero ~ l\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u\nl✝ : List α\nn : ℕ\nhn : ∀ (l : List α), rotate' l n ~ l\nl : List α\n⊢ rotate' l (succ n) ~ l\n[PROOFSTEP]\ncases' l with hd tl\n[GOAL]\ncase succ.nil\nα : Type u\nl : List α\nn : ℕ\nhn : ∀ (l : List α), rotate' l n ~ l\n⊢ rotate' [] (succ n) ~ []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.cons\nα : Type u\nl : List α\nn : ℕ\nhn : ∀ (l : List α), rotate' l n ~ l\nhd : α\ntl : List α\n⊢ rotate' (hd :: tl) (succ n) ~ hd :: tl\n[PROOFSTEP]\nrw [rotate'_cons_succ]\n[GOAL]\ncase succ.cons\nα : Type u\nl : List α\nn : ℕ\nhn : ∀ (l : List α), rotate' l n ~ l\nhd : α\ntl : List α\n⊢ rotate' (tl ++ [hd]) n ~ hd :: tl\n[PROOFSTEP]\nexact (hn _).trans (perm_append_singleton _ _)\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate l n = [] ↔ l = []\n[PROOFSTEP]\ninduction' n with n hn generalizing l\n[GOAL]\ncase zero\nα : Type u\nl✝ l : List α\n⊢ rotate l zero = [] ↔ l = []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u\nl✝ : List α\nn : ℕ\nhn : ∀ {l : List α}, rotate l n = [] ↔ l = []\nl : List α\n⊢ rotate l (succ n) = [] ↔ l = []\n[PROOFSTEP]\ncases' l with hd tl\n[GOAL]\ncase succ.nil\nα : Type u\nl : List α\nn : ℕ\nhn : ∀ {l : List α}, rotate l n = [] ↔ l = []\n⊢ rotate [] (succ n) = [] ↔ [] = []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.cons\nα : Type u\nl : List α\nn : ℕ\nhn : ∀ {l : List α}, rotate l n = [] ↔ l = []\nhd : α\ntl : List α\n⊢ rotate (hd :: tl) (succ n) = [] ↔ hd :: tl = []\n[PROOFSTEP]\nsimp [rotate_cons_succ, hn]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ [] = rotate l n ↔ [] = l\n[PROOFSTEP]\nrw [eq_comm, rotate_eq_nil_iff, eq_comm]\n[GOAL]\nα✝ : Type u\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β → γ\nl : List α\nl' : List β\nn : ℕ\nh : length l = length l'\n⊢ rotate (zipWith f l l') n = zipWith f (rotate l n) (rotate l' n)\n[PROOFSTEP]\nrw [rotate_eq_drop_append_take_mod, rotate_eq_drop_append_take_mod, rotate_eq_drop_append_take_mod, h, zipWith_append, ←\n  zipWith_distrib_drop, ← zipWith_distrib_take, List.length_zipWith, h, min_self]\n[GOAL]\ncase h\nα✝ : Type u\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β → γ\nl : List α\nl' : List β\nn : ℕ\nh : length l = length l'\n⊢ length (drop (n % length l') l) = length (drop (n % length l') l')\n[PROOFSTEP]\nrw [length_drop, length_drop, h]\n[GOAL]\nα : Type u\nβ : Type u_1\nf : α → α → β\nx y : α\nl : List α\n⊢ zipWith f (x :: y :: l) (rotate (x :: y :: l) 1) = f x y :: zipWith f (y :: l) (l ++ [x])\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\n⊢ get? (rotate l n) m = get? l ((m + n) % length l)\n[PROOFSTEP]\nrw [rotate_eq_drop_append_take_mod]\n[GOAL]\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\n⊢ get? (drop (n % length l) l ++ take (n % length l) l) m = get? l ((m + n) % length l)\n[PROOFSTEP]\nrcases lt_or_le m (l.drop (n % l.length)).length with hm | hm\n[GOAL]\ncase inl\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : m < length (drop (n % length l) l)\n⊢ get? (drop (n % length l) l ++ take (n % length l) l) m = get? l ((m + n) % length l)\n[PROOFSTEP]\nrw [get?_append hm, get?_drop, add_comm m, ← mod_add_mod]\n[GOAL]\ncase inl\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : m < length (drop (n % length l) l)\n⊢ get? l (n % length l + m) = get? l ((n % length l + m) % length l)\n[PROOFSTEP]\nrw [length_drop, lt_tsub_iff_left] at hm \n[GOAL]\ncase inl\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm✝ : m < length l - n % length l\nhm : n % length l + m < length l\n⊢ get? l (n % length l + m) = get? l ((n % length l + m) % length l)\n[PROOFSTEP]\nrw [mod_eq_of_lt hm]\n[GOAL]\ncase inr\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length (drop (n % length l) l) ≤ m\n⊢ get? (drop (n % length l) l ++ take (n % length l) l) m = get? l ((m + n) % length l)\n[PROOFSTEP]\nhave hlt : n % length l < length l := mod_lt _ (m.zero_le.trans_lt hml)\n[GOAL]\ncase inr\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length (drop (n % length l) l) ≤ m\nhlt : n % length l < length l\n⊢ get? (drop (n % length l) l ++ take (n % length l) l) m = get? l ((m + n) % length l)\n[PROOFSTEP]\nrw [get?_append_right hm, get?_take, length_drop]\n[GOAL]\ncase inr\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length (drop (n % length l) l) ≤ m\nhlt : n % length l < length l\n⊢ get? l (m - (length l - n % length l)) = get? l ((m + n) % length l)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase inr.e_a\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length (drop (n % length l) l) ≤ m\nhlt : n % length l < length l\n⊢ m - (length l - n % length l) = (m + n) % length l\n[PROOFSTEP]\nrw [length_drop] at hm \n[GOAL]\ncase inr.e_a\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length l - n % length l ≤ m\nhlt : n % length l < length l\n⊢ m - (length l - n % length l) = (m + n) % length l\n[PROOFSTEP]\nhave hm' := tsub_le_iff_left.1 hm\n[GOAL]\ncase inr.e_a\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length l - n % length l ≤ m\nhlt : n % length l < length l\nhm' : length l ≤ n % length l + m\n⊢ m - (length l - n % length l) = (m + n) % length l\n[PROOFSTEP]\nhave : n % length l + m - length l < length l\n[GOAL]\ncase this\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length l - n % length l ≤ m\nhlt : n % length l < length l\nhm' : length l ≤ n % length l + m\n⊢ n % length l + m - length l < length l\n[PROOFSTEP]\nrw [tsub_lt_iff_left hm']\n[GOAL]\ncase this\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length l - n % length l ≤ m\nhlt : n % length l < length l\nhm' : length l ≤ n % length l + m\n⊢ n % length l + m < length l + length l\n[PROOFSTEP]\nexact Nat.add_lt_add hlt hml\n[GOAL]\ncase inr.e_a\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length l - n % length l ≤ m\nhlt : n % length l < length l\nhm' : length l ≤ n % length l + m\nthis : n % length l + m - length l < length l\n⊢ m - (length l - n % length l) = (m + n) % length l\n[PROOFSTEP]\nconv_rhs => rw [add_comm m, ← mod_add_mod, mod_eq_sub_mod hm', mod_eq_of_lt this]\n[GOAL]\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length l - n % length l ≤ m\nhlt : n % length l < length l\nhm' : length l ≤ n % length l + m\nthis : n % length l + m - length l < length l\n| (m + n) % length l\n[PROOFSTEP]\nrw [add_comm m, ← mod_add_mod, mod_eq_sub_mod hm', mod_eq_of_lt this]\n[GOAL]\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length l - n % length l ≤ m\nhlt : n % length l < length l\nhm' : length l ≤ n % length l + m\nthis : n % length l + m - length l < length l\n| (m + n) % length l\n[PROOFSTEP]\nrw [add_comm m, ← mod_add_mod, mod_eq_sub_mod hm', mod_eq_of_lt this]\n[GOAL]\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length l - n % length l ≤ m\nhlt : n % length l < length l\nhm' : length l ≤ n % length l + m\nthis : n % length l + m - length l < length l\n| (m + n) % length l\n[PROOFSTEP]\nrw [add_comm m, ← mod_add_mod, mod_eq_sub_mod hm', mod_eq_of_lt this]\n[GOAL]\ncase inr.e_a\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length l - n % length l ≤ m\nhlt : n % length l < length l\nhm' : length l ≤ n % length l + m\nthis : n % length l + m - length l < length l\n⊢ m - (length l - n % length l) = n % length l + m - length l\n[PROOFSTEP]\nrw [← add_right_inj l.length, ← add_tsub_assoc_of_le, add_tsub_tsub_cancel, add_tsub_cancel_of_le, add_comm]\n[GOAL]\ncase inr.e_a\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length l - n % length l ≤ m\nhlt : n % length l < length l\nhm' : length l ≤ n % length l + m\nthis : n % length l + m - length l < length l\n⊢ length l ≤ n % length l + m\ncase inr.e_a\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length l - n % length l ≤ m\nhlt : n % length l < length l\nhm' : length l ≤ n % length l + m\nthis : n % length l + m - length l < length l\n⊢ n % length l ≤ length l\ncase inr.e_a.h\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length l - n % length l ≤ m\nhlt : n % length l < length l\nhm' : length l ≤ n % length l + m\nthis : n % length l + m - length l < length l\n⊢ length l - n % length l ≤ m\n[PROOFSTEP]\nexacts [hm', hlt.le, hm]\n[GOAL]\ncase inr\nα : Type u\nl : List α\nn m : ℕ\nhml : m < length l\nhm : length (drop (n % length l) l) ≤ m\nhlt : n % length l < length l\n⊢ m - length (drop (n % length l) l) < n % length l\n[PROOFSTEP]\nrwa [tsub_lt_iff_left hm, length_drop, tsub_add_cancel_of_le hlt.le]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nk : Fin (length (rotate l n))\n⊢ get (rotate l n) k = get l { val := (↑k + n) % length l, isLt := (_ : (↑k + n) % length l < length l) }\n[PROOFSTEP]\nrw [← Option.some_inj, ← get?_eq_get, ← get?_eq_get, get?_rotate]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nk : Fin (length (rotate l n))\n⊢ ↑k < length l\n[PROOFSTEP]\nexact k.2.trans_eq (length_rotate _ _)\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nh : n < length l\n⊢ head? (rotate l n) = get? l n\n[PROOFSTEP]\nrw [← get?_zero, get?_rotate (n.zero_le.trans_lt h), zero_add, Nat.mod_eq_of_lt h]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nk : Fin (length l)\n⊢ get l k =\n    get (rotate l n)\n      { val := (length l - n % length l + ↑k) % length l,\n        isLt := (_ : (length l - n % length l + ↑k) % length l < length (rotate l n)) }\n[PROOFSTEP]\nrw [get_rotate]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nk : Fin (length l)\n⊢ get l k =\n    get l\n      {\n        val :=\n          (↑{ val := (length l - n % length l + ↑k) % length l,\n                  isLt := (_ : (length l - n % length l + ↑k) % length l < length (rotate l n)) } +\n              n) %\n            length l,\n        isLt :=\n          (_ :\n            (↑{ val := (length l - n % length l + ↑k) % length l,\n                      isLt := (_ : (length l - n % length l + ↑k) % length l < length (rotate l n)) } +\n                  n) %\n                length l <\n              length l) }\n[PROOFSTEP]\nrefine congr_arg l.get (Fin.eq_of_val_eq ?_)\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nk : Fin (length l)\n⊢ ↑k =\n    ↑{\n        val :=\n          (↑{ val := (length l - n % length l + ↑k) % length l,\n                  isLt := (_ : (length l - n % length l + ↑k) % length l < length (rotate l n)) } +\n              n) %\n            length l,\n        isLt :=\n          (_ :\n            (↑{ val := (length l - n % length l + ↑k) % length l,\n                      isLt := (_ : (length l - n % length l + ↑k) % length l < length (rotate l n)) } +\n                  n) %\n                length l <\n              length l) }\n[PROOFSTEP]\nsimp only [mod_add_mod]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nk : Fin (length l)\n⊢ ↑k = (length l - n % length l + ↑k + n) % length l\n[PROOFSTEP]\nrw [← add_mod_mod, add_right_comm, tsub_add_cancel_of_le, add_mod_left, mod_eq_of_lt]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nk : Fin (length l)\n⊢ ↑k < length l\nα : Type u l : List α n : ℕ k : Fin (length l) ⊢ n % length l ≤ length l\n[PROOFSTEP]\nexacts [k.2, (mod_lt _ (k.1.zero_le.trans_lt k.2)).le]\n[GOAL]\nα : Type u\nhα : Nonempty α\n⊢ (∀ (n : ℕ), rotate [] n = []) ↔ ∃ a, [] = replicate (length []) a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nhα : Nonempty α\na : α\nl : List α\nh : ∀ (n : ℕ), rotate (a :: l) n = a :: l\nn : ℕ\nh₁ : n < length (a :: l)\nh₂ : n < length (replicate (length (a :: l)) a)\n⊢ get (a :: l) { val := n, isLt := h₁ } = get (replicate (length (a :: l)) a) { val := n, isLt := h₂ }\n[PROOFSTEP]\nrw [get_replicate, ← Option.some_inj, ← get?_eq_get, ← head?_rotate h₁, h, head?_cons]\n[GOAL]\nα : Type u\nhα : Nonempty α\na : α\nl : List α\nx✝ : ∃ a_1, a :: l = replicate (length (a :: l)) a_1\nn : ℕ\nb : α\nhb : a :: l = replicate (length (a :: l)) b\n⊢ rotate (a :: l) n = a :: l\n[PROOFSTEP]\nrw [hb, rotate_replicate]\n[GOAL]\nα : Type u\ninst✝ : Nonempty α\nl : List α\nh : rotate l 1 = l\nn✝ n : ℕ\nhn : rotate l n = l\n⊢ rotate l (succ n) = l\n[PROOFSTEP]\nrwa [Nat.succ_eq_add_one, ← l.rotate_rotate, hn]\n[GOAL]\nα : Type u\nn : ℕ\n⊢ Injective fun l => rotate l n\n[PROOFSTEP]\nrintro l l' (h : l.rotate n = l'.rotate n)\n[GOAL]\nα : Type u\nn : ℕ\nl l' : List α\nh : rotate l n = rotate l' n\n⊢ l = l'\n[PROOFSTEP]\nhave hle : l.length = l'.length := (l.length_rotate n).symm.trans (h.symm ▸ l'.length_rotate n)\n[GOAL]\nα : Type u\nn : ℕ\nl l' : List α\nh : rotate l n = rotate l' n\nhle : length l = length l'\n⊢ l = l'\n[PROOFSTEP]\nrw [rotate_eq_drop_append_take_mod, rotate_eq_drop_append_take_mod] at h \n[GOAL]\nα : Type u\nn : ℕ\nl l' : List α\nh : drop (n % length l) l ++ take (n % length l) l = drop (n % length l') l' ++ take (n % length l') l'\nhle : length l = length l'\n⊢ l = l'\n[PROOFSTEP]\nobtain ⟨hd, ht⟩ := append_inj h (by simp_all)\n[GOAL]\nα : Type u\nn : ℕ\nl l' : List α\nh : drop (n % length l) l ++ take (n % length l) l = drop (n % length l') l' ++ take (n % length l') l'\nhle : length l = length l'\n⊢ length (drop (n % length l) l) = length (drop (n % length l') l')\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase intro\nα : Type u\nn : ℕ\nl l' : List α\nh : drop (n % length l) l ++ take (n % length l) l = drop (n % length l') l' ++ take (n % length l') l'\nhle : length l = length l'\nhd : drop (n % length l) l = drop (n % length l') l'\nht : take (n % length l) l = take (n % length l') l'\n⊢ l = l'\n[PROOFSTEP]\nrw [← take_append_drop _ l, ht, hd, take_append_drop]\n[GOAL]\nα : Type u\nl l' : List α\nn : ℕ\n⊢ rotate l n = l' ↔ l = rotate l' (length l' - n % length l')\n[PROOFSTEP]\nrw [← @rotate_eq_rotate _ l _ n, rotate_rotate, ← rotate_mod l', add_mod]\n[GOAL]\nα : Type u\nl l' : List α\nn : ℕ\n⊢ rotate l n = l' ↔ rotate l n = rotate l' (((length l' - n % length l') % length l' + n % length l') % length l')\n[PROOFSTEP]\ncases' l'.length.zero_le.eq_or_lt with hl hl\n[GOAL]\ncase inl\nα : Type u\nl l' : List α\nn : ℕ\nhl : 0 = length l'\n⊢ rotate l n = l' ↔ rotate l n = rotate l' (((length l' - n % length l') % length l' + n % length l') % length l')\n[PROOFSTEP]\nrw [eq_nil_of_length_eq_zero hl.symm, rotate_nil, rotate_eq_nil_iff]\n[GOAL]\ncase inr\nα : Type u\nl l' : List α\nn : ℕ\nhl : 0 < length l'\n⊢ rotate l n = l' ↔ rotate l n = rotate l' (((length l' - n % length l') % length l' + n % length l') % length l')\n[PROOFSTEP]\ncases' (Nat.zero_le (n % l'.length)).eq_or_lt with hn hn\n[GOAL]\ncase inr.inl\nα : Type u\nl l' : List α\nn : ℕ\nhl : 0 < length l'\nhn : 0 = n % length l'\n⊢ rotate l n = l' ↔ rotate l n = rotate l' (((length l' - n % length l') % length l' + n % length l') % length l')\n[PROOFSTEP]\nsimp [← hn]\n[GOAL]\ncase inr.inr\nα : Type u\nl l' : List α\nn : ℕ\nhl : 0 < length l'\nhn : 0 < n % length l'\n⊢ rotate l n = l' ↔ rotate l n = rotate l' (((length l' - n % length l') % length l' + n % length l') % length l')\n[PROOFSTEP]\nrw [mod_eq_of_lt (tsub_lt_self hl hn), tsub_add_cancel_of_le, mod_self, rotate_zero]\n[GOAL]\ncase inr.inr\nα : Type u\nl l' : List α\nn : ℕ\nhl : 0 < length l'\nhn : 0 < n % length l'\n⊢ n % length l' ≤ length l'\n[PROOFSTEP]\nexact (Nat.mod_lt _ hl).le\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nx : α\n⊢ rotate l n = [x] ↔ l = [x]\n[PROOFSTEP]\nrw [rotate_eq_iff, rotate_singleton]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nx : α\n⊢ [x] = rotate l n ↔ [x] = l\n[PROOFSTEP]\nrw [eq_comm, rotate_eq_singleton_iff, eq_comm]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ reverse (rotate l n) = rotate (reverse l) (length l - n % length l)\n[PROOFSTEP]\nrw [← length_reverse l, ← rotate_eq_iff]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate (reverse (rotate l n)) n = reverse l\n[PROOFSTEP]\ninduction' n with n hn generalizing l\n[GOAL]\ncase zero\nα : Type u\nl✝ l : List α\n⊢ rotate (reverse (rotate l zero)) zero = reverse l\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u\nl✝ : List α\nn : ℕ\nhn : ∀ (l : List α), rotate (reverse (rotate l n)) n = reverse l\nl : List α\n⊢ rotate (reverse (rotate l (succ n))) (succ n) = reverse l\n[PROOFSTEP]\ncases' l with hd tl\n[GOAL]\ncase succ.nil\nα : Type u\nl : List α\nn : ℕ\nhn : ∀ (l : List α), rotate (reverse (rotate l n)) n = reverse l\n⊢ rotate (reverse (rotate [] (succ n))) (succ n) = reverse []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.cons\nα : Type u\nl : List α\nn : ℕ\nhn : ∀ (l : List α), rotate (reverse (rotate l n)) n = reverse l\nhd : α\ntl : List α\n⊢ rotate (reverse (rotate (hd :: tl) (succ n))) (succ n) = reverse (hd :: tl)\n[PROOFSTEP]\nrw [rotate_cons_succ, Nat.succ_eq_add_one, ← rotate_rotate, hn]\n[GOAL]\ncase succ.cons\nα : Type u\nl : List α\nn : ℕ\nhn : ∀ (l : List α), rotate (reverse (rotate l n)) n = reverse l\nhd : α\ntl : List α\n⊢ rotate (reverse (tl ++ [hd])) 1 = reverse (hd :: tl)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate (reverse l) n = reverse (rotate l (length l - n % length l))\n[PROOFSTEP]\nrw [← reverse_reverse l]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate (reverse (reverse (reverse l))) n =\n    reverse (rotate (reverse (reverse l)) (length (reverse (reverse l)) - n % length (reverse (reverse l))))\n[PROOFSTEP]\nsimp_rw [reverse_rotate, reverse_reverse, rotate_eq_iff, rotate_rotate, length_rotate, length_reverse]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ reverse l = rotate (reverse l) (length l - (length l - n % length l) % length l + (length l - n % length l))\n[PROOFSTEP]\nrw [← length_reverse l]\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\n⊢ reverse l =\n    rotate (reverse l)\n      (length (reverse l) - (length (reverse l) - n % length (reverse l)) % length (reverse l) +\n        (length (reverse l) - n % length (reverse l)))\n[PROOFSTEP]\nlet k := n % l.reverse.length\n[GOAL]\nα : Type u\nl : List α\nn : ℕ\nk : ℕ := n % length (reverse l)\n⊢ reverse l =\n    rotate (reverse l)\n      (length (reverse l) - (length (reverse l) - n % length (reverse l)) % length (reverse l) +\n        (length (reverse l) - n % length (reverse l)))\n[PROOFSTEP]\ncases' hk' : k with k'\n[GOAL]\ncase zero\nα : Type u\nl : List α\nn : ℕ\nk : ℕ := n % length (reverse l)\nhk' : k = zero\n⊢ reverse l =\n    rotate (reverse l)\n      (length (reverse l) - (length (reverse l) - n % length (reverse l)) % length (reverse l) +\n        (length (reverse l) - n % length (reverse l)))\n[PROOFSTEP]\nsimp_all! [length_reverse, ← rotate_rotate]\n[GOAL]\ncase succ\nα : Type u\nl : List α\nn : ℕ\nk : ℕ := n % length (reverse l)\nk' : ℕ\nhk' : k = succ k'\n⊢ reverse l =\n    rotate (reverse l)\n      (length (reverse l) - (length (reverse l) - n % length (reverse l)) % length (reverse l) +\n        (length (reverse l) - n % length (reverse l)))\n[PROOFSTEP]\ncases' l with x l\n[GOAL]\ncase succ.nil\nα : Type u\nn k' : ℕ\nk : ℕ := n % length (reverse [])\nhk' : k = succ k'\n⊢ reverse [] =\n    rotate (reverse [])\n      (length (reverse []) - (length (reverse []) - n % length (reverse [])) % length (reverse []) +\n        (length (reverse []) - n % length (reverse [])))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.cons\nα : Type u\nn k' : ℕ\nx : α\nl : List α\nk : ℕ := n % length (reverse (x :: l))\nhk' : k = succ k'\n⊢ reverse (x :: l) =\n    rotate (reverse (x :: l))\n      (length (reverse (x :: l)) -\n          (length (reverse (x :: l)) - n % length (reverse (x :: l))) % length (reverse (x :: l)) +\n        (length (reverse (x :: l)) - n % length (reverse (x :: l))))\n[PROOFSTEP]\nrw [Nat.mod_eq_of_lt, tsub_add_cancel_of_le, rotate_length]\n[GOAL]\ncase succ.cons\nα : Type u\nn k' : ℕ\nx : α\nl : List α\nk : ℕ := n % length (reverse (x :: l))\nhk' : k = succ k'\n⊢ length (reverse (x :: l)) - n % length (reverse (x :: l)) ≤ length (reverse (x :: l))\n[PROOFSTEP]\nexact tsub_le_self\n[GOAL]\ncase succ.cons\nα : Type u\nn k' : ℕ\nx : α\nl : List α\nk : ℕ := n % length (reverse (x :: l))\nhk' : k = succ k'\n⊢ length (reverse (x :: l)) - n % length (reverse (x :: l)) < length (reverse (x :: l))\n[PROOFSTEP]\nexact tsub_lt_self (by simp) (by simp_all! )\n[GOAL]\nα : Type u\nn k' : ℕ\nx : α\nl : List α\nk : ℕ := n % length (reverse (x :: l))\nhk' : k = succ k'\n⊢ 0 < length (reverse (x :: l))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nn k' : ℕ\nx : α\nl : List α\nk : ℕ := n % length (reverse (x :: l))\nhk' : k = succ k'\n⊢ 0 < n % length (reverse (x :: l))\n[PROOFSTEP]\nsimp_all!\n[GOAL]\nα : Type u\nβ : Type u_1\nf : α → β\nl : List α\nn : ℕ\n⊢ map f (rotate l n) = rotate (map f l) n\n[PROOFSTEP]\ninduction' n with n hn IH generalizing l\n[GOAL]\ncase zero\nα : Type u\nβ : Type u_1\nf : α → β\nl✝ l : List α\n⊢ map f (rotate l zero) = rotate (map f l) zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u\nβ : Type u_1\nf : α → β\nl✝ : List α\nn : ℕ\nhn : ∀ (l : List α), map f (rotate l n) = rotate (map f l) n\nl : List α\n⊢ map f (rotate l (succ n)) = rotate (map f l) (succ n)\n[PROOFSTEP]\ncases' l with hd tl\n[GOAL]\ncase succ.nil\nα : Type u\nβ : Type u_1\nf : α → β\nl : List α\nn : ℕ\nhn : ∀ (l : List α), map f (rotate l n) = rotate (map f l) n\n⊢ map f (rotate [] (succ n)) = rotate (map f []) (succ n)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.cons\nα : Type u\nβ : Type u_1\nf : α → β\nl : List α\nn : ℕ\nhn : ∀ (l : List α), map f (rotate l n) = rotate (map f l) n\nhd : α\ntl : List α\n⊢ map f (rotate (hd :: tl) (succ n)) = rotate (map f (hd :: tl)) (succ n)\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\nα : Type u\nl : List α\nhl : Nodup l\nn : ℕ\n⊢ rotate l n = l ↔ n % length l = 0 ∨ l = []\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nl : List α\nhl : Nodup l\nn : ℕ\n⊢ rotate l n = l → n % length l = 0 ∨ l = []\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nl : List α\nhl : Nodup l\nn : ℕ\nh : rotate l n = l\n⊢ n % length l = 0 ∨ l = []\n[PROOFSTEP]\ncases' l.length.zero_le.eq_or_lt with hl' hl'\n[GOAL]\ncase mp.inl\nα : Type u\nl : List α\nhl : Nodup l\nn : ℕ\nh : rotate l n = l\nhl' : 0 = length l\n⊢ n % length l = 0 ∨ l = []\n[PROOFSTEP]\nsimp [← length_eq_zero, ← hl']\n[GOAL]\ncase mp.inr\nα : Type u\nl : List α\nhl : Nodup l\nn : ℕ\nh : rotate l n = l\nhl' : 0 < length l\n⊢ n % length l = 0 ∨ l = []\n[PROOFSTEP]\nleft\n[GOAL]\ncase mp.inr.h\nα : Type u\nl : List α\nhl : Nodup l\nn : ℕ\nh : rotate l n = l\nhl' : 0 < length l\n⊢ n % length l = 0\n[PROOFSTEP]\nrw [nodup_iff_nthLe_inj] at hl \n[GOAL]\ncase mp.inr.h\nα : Type u\nl : List α\nhl : ∀ (i j : ℕ) (h₁ : i < length l) (h₂ : j < length l), nthLe l i h₁ = nthLe l j h₂ → i = j\nn : ℕ\nh : rotate l n = l\nhl' : 0 < length l\n⊢ n % length l = 0\n[PROOFSTEP]\nrefine' hl _ _ (mod_lt _ hl') hl' _\n[GOAL]\ncase mp.inr.h\nα : Type u\nl : List α\nhl : ∀ (i j : ℕ) (h₁ : i < length l) (h₂ : j < length l), nthLe l i h₁ = nthLe l j h₂ → i = j\nn : ℕ\nh : rotate l n = l\nhl' : 0 < length l\n⊢ nthLe l (n % length l) (_ : n % length l < length l) = nthLe l 0 hl'\n[PROOFSTEP]\nrw [← nthLe_rotate' _ n]\n[GOAL]\ncase mp.inr.h\nα : Type u\nl : List α\nhl : ∀ (i j : ℕ) (h₁ : i < length l) (h₂ : j < length l), nthLe l i h₁ = nthLe l j h₂ → i = j\nn : ℕ\nh : rotate l n = l\nhl' : 0 < length l\n⊢ nthLe (rotate l n) ((length l - n % length l + n % length l) % length l)\n      (_ : (length l - n % length l + n % length l) % length l < length (rotate l n)) =\n    nthLe l 0 hl'\n[PROOFSTEP]\nsimp_rw [h, tsub_add_cancel_of_le (mod_lt _ hl').le, mod_self]\n[GOAL]\ncase mpr\nα : Type u\nl : List α\nhl : Nodup l\nn : ℕ\n⊢ n % length l = 0 ∨ l = [] → rotate l n = l\n[PROOFSTEP]\nrintro (h | h)\n[GOAL]\ncase mpr.inl\nα : Type u\nl : List α\nhl : Nodup l\nn : ℕ\nh : n % length l = 0\n⊢ rotate l n = l\n[PROOFSTEP]\nrw [← rotate_mod, h]\n[GOAL]\ncase mpr.inl\nα : Type u\nl : List α\nhl : Nodup l\nn : ℕ\nh : n % length l = 0\n⊢ rotate l 0 = l\n[PROOFSTEP]\nexact rotate_zero l\n[GOAL]\ncase mpr.inr\nα : Type u\nl : List α\nhl : Nodup l\nn : ℕ\nh : l = []\n⊢ rotate l n = l\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nl : List α\nhl : Nodup l\nhn : l ≠ []\ni j : ℕ\nh : rotate l i = rotate l j\n⊢ i % length l = j % length l\n[PROOFSTEP]\nhave hi : i % l.length < l.length := mod_lt _ (length_pos_of_ne_nil hn)\n[GOAL]\nα : Type u\nl : List α\nhl : Nodup l\nhn : l ≠ []\ni j : ℕ\nh : rotate l i = rotate l j\nhi : i % length l < length l\n⊢ i % length l = j % length l\n[PROOFSTEP]\nhave hj : j % l.length < l.length := mod_lt _ (length_pos_of_ne_nil hn)\n[GOAL]\nα : Type u\nl : List α\nhl : Nodup l\nhn : l ≠ []\ni j : ℕ\nh : rotate l i = rotate l j\nhi : i % length l < length l\nhj : j % length l < length l\n⊢ i % length l = j % length l\n[PROOFSTEP]\nrefine' (nodup_iff_nthLe_inj.mp hl) _ _ hi hj _\n[GOAL]\nα : Type u\nl : List α\nhl : Nodup l\nhn : l ≠ []\ni j : ℕ\nh : rotate l i = rotate l j\nhi : i % length l < length l\nhj : j % length l < length l\n⊢ nthLe l (i % length l) hi = nthLe l (j % length l) hj\n[PROOFSTEP]\nrw [← nthLe_rotate' l i, ← nthLe_rotate' l j]\n[GOAL]\nα : Type u\nl : List α\nhl : Nodup l\nhn : l ≠ []\ni j : ℕ\nh : rotate l i = rotate l j\nhi : i % length l < length l\nhj : j % length l < length l\n⊢ nthLe (rotate l i) ((length l - i % length l + i % length l) % length l)\n      (_ : (length l - i % length l + i % length l) % length l < length (rotate l i)) =\n    nthLe (rotate l j) ((length l - j % length l + j % length l) % length l)\n      (_ : (length l - j % length l + j % length l) % length l < length (rotate l j))\n[PROOFSTEP]\nsimp [tsub_add_cancel_of_le, hi.le, hj.le, h]\n[GOAL]\nα : Type u\nl✝ l' l : List α\n⊢ rotate l 0 = l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl l' : List α\nh : l ~r l'\n⊢ l' ~r l\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := h\n[GOAL]\ncase intro\nα : Type u\nl : List α\nn : ℕ\n⊢ rotate l n ~r l\n[PROOFSTEP]\ncases' l with hd tl\n[GOAL]\ncase intro.nil\nα : Type u\nn : ℕ\n⊢ rotate [] n ~r []\n[PROOFSTEP]\nexists 0\n[GOAL]\ncase intro.cons\nα : Type u\nn : ℕ\nhd : α\ntl : List α\n⊢ rotate (hd :: tl) n ~r (hd :: tl)\n[PROOFSTEP]\nuse(hd :: tl).length * n - n\n[GOAL]\ncase h\nα : Type u\nn : ℕ\nhd : α\ntl : List α\n⊢ rotate (rotate (hd :: tl) n) (length (hd :: tl) * n - n) = hd :: tl\n[PROOFSTEP]\nrw [rotate_rotate, add_tsub_cancel_of_le, rotate_length_mul]\n[GOAL]\ncase h\nα : Type u\nn : ℕ\nhd : α\ntl : List α\n⊢ n ≤ length (hd :: tl) * n\n[PROOFSTEP]\nexact Nat.le_mul_of_pos_left (by simp)\n[GOAL]\nα : Type u\nn : ℕ\nhd : α\ntl : List α\n⊢ 0 < length (hd :: tl)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl l' l✝ : List α\nn m : ℕ\n⊢ rotate l✝ (n + m) = rotate (rotate l✝ n) m\n[PROOFSTEP]\nrw [rotate_rotate]\n[GOAL]\nα : Type u\nl l' : List α\nx✝ : l ~r []\nn : ℕ\nhn : rotate l n = []\n⊢ l = []\n[PROOFSTEP]\nsimpa using hn\n[GOAL]\nα : Type u\nl l' : List α\nh : l = []\n⊢ l ~r l\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nl l' : List α\n⊢ [] ~r l ↔ [] = l\n[PROOFSTEP]\nrw [isRotated_comm, isRotated_nil_iff, eq_comm]\n[GOAL]\nα : Type u\nl l' : List α\nx : α\nx✝ : l ~r [x]\nn : ℕ\nhn : rotate l n = [x]\n⊢ l = [x]\n[PROOFSTEP]\nsimpa using hn\n[GOAL]\nα : Type u\nl l' : List α\nx : α\nh : l = [x]\n⊢ l ~r l\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nl l' : List α\nx : α\n⊢ [x] ~r l ↔ [x] = l\n[PROOFSTEP]\nrw [isRotated_comm, isRotated_singleton_iff, eq_comm]\n[GOAL]\nα : Type u\nl l' : List α\nhd : α\ntl : List α\n⊢ rotate (hd :: tl) 1 = tl ++ [hd]\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl l' : List α\n⊢ rotate (l ++ l') (length l) = l' ++ l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl l' : List α\nh : l ~r l'\n⊢ List.reverse l ~r List.reverse l'\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := h\n[GOAL]\ncase intro\nα : Type u\nl : List α\nn : ℕ\n⊢ List.reverse l ~r List.reverse (rotate l n)\n[PROOFSTEP]\nexact ⟨_, (reverse_rotate _ _).symm⟩\n[GOAL]\nα : Type u\nl l' : List α\n⊢ reverse l ~r l' ↔ l ~r reverse l'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nl l' : List α\n⊢ reverse l ~r l' → l ~r reverse l'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nl l' : List α\nh : reverse l ~r l'\n⊢ l ~r reverse l'\n[PROOFSTEP]\nsimpa using h.reverse\n[GOAL]\ncase mpr\nα : Type u\nl l' : List α\n⊢ l ~r reverse l' → reverse l ~r l'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u\nl l' : List α\nh : l ~r reverse l'\n⊢ reverse l ~r l'\n[PROOFSTEP]\nsimpa using h.reverse\n[GOAL]\nα : Type u\nl l' : List α\n⊢ reverse l ~r reverse l' ↔ l ~r l'\n[PROOFSTEP]\nsimp [isRotated_reverse_comm_iff]\n[GOAL]\nα : Type u\nl l' : List α\n⊢ l ~r l' ↔ ∃ n, n ≤ length l ∧ rotate l n = l'\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun ⟨n, _, h⟩ => ⟨n, h⟩⟩\n[GOAL]\nα : Type u\nl l' : List α\nh : l ~r l'\n⊢ ∃ n, n ≤ length l ∧ rotate l n = l'\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := h\n[GOAL]\ncase intro\nα : Type u\nl : List α\nn : ℕ\n⊢ ∃ n_1, n_1 ≤ length l ∧ rotate l n_1 = rotate l n\n[PROOFSTEP]\ncases' l with hd tl\n[GOAL]\ncase intro.nil\nα : Type u\nn : ℕ\n⊢ ∃ n_1, n_1 ≤ length [] ∧ rotate [] n_1 = rotate [] n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.cons\nα : Type u\nn : ℕ\nhd : α\ntl : List α\n⊢ ∃ n_1, n_1 ≤ length (hd :: tl) ∧ rotate (hd :: tl) n_1 = rotate (hd :: tl) n\n[PROOFSTEP]\nrefine' ⟨n % (hd :: tl).length, _, rotate_mod _ _⟩\n[GOAL]\ncase intro.cons\nα : Type u\nn : ℕ\nhd : α\ntl : List α\n⊢ n % length (hd :: tl) ≤ length (hd :: tl)\n[PROOFSTEP]\nrefine' (Nat.mod_lt _ _).le\n[GOAL]\ncase intro.cons\nα : Type u\nn : ℕ\nhd : α\ntl : List α\n⊢ length (hd :: tl) > 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl l' : List α\n⊢ l ~r l' ↔ l' ∈ map (rotate l) (range (length l + 1))\n[PROOFSTEP]\nsimp_rw [mem_map, mem_range, isRotated_iff_mod]\n[GOAL]\nα : Type u\nl l' : List α\n⊢ (∃ n, n ≤ length l ∧ rotate l n = l') ↔ ∃ a, a < length l + 1 ∧ rotate l a = l'\n[PROOFSTEP]\nexact ⟨fun ⟨n, hn, h⟩ => ⟨n, Nat.lt_succ_of_le hn, h⟩, fun ⟨n, hn, h⟩ => ⟨n, Nat.le_of_lt_succ hn, h⟩⟩\n[GOAL]\nα : Type u\nl l' : List α\nβ : Type u_1\nl₁ l₂ : List α\nh : l₁ ~r l₂\nf : α → β\n⊢ List.map f l₁ ~r List.map f l₂\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := h\n[GOAL]\ncase intro\nα : Type u\nl l' : List α\nβ : Type u_1\nl₁ : List α\nf : α → β\nn : ℕ\n⊢ List.map f l₁ ~r List.map f (rotate l₁ n)\n[PROOFSTEP]\nrw [map_rotate]\n[GOAL]\ncase intro\nα : Type u\nl l' : List α\nβ : Type u_1\nl₁ : List α\nf : α → β\nn : ℕ\n⊢ List.map f l₁ ~r rotate (List.map f l₁) n\n[PROOFSTEP]\nuse n\n[GOAL]\nα : Type u\nl✝ l' l : List α\nh : l ≠ []\n⊢ cyclicPermutations l = dropLast (zipWith (fun x x_1 => x ++ x_1) (tails l) (inits l))\n[PROOFSTEP]\nobtain ⟨hd, tl, rfl⟩ := exists_cons_of_ne_nil h\n[GOAL]\ncase intro.intro\nα : Type u\nl l' : List α\nhd : α\ntl : List α\nh : hd :: tl ≠ []\n⊢ cyclicPermutations (hd :: tl) = dropLast (zipWith (fun x x_1 => x ++ x_1) (tails (hd :: tl)) (inits (hd :: tl)))\n[PROOFSTEP]\nexact cyclicPermutations_cons _ _\n[GOAL]\nα : Type u\nl✝ l' : List α\nx : α\nl : List α\n⊢ length (cyclicPermutations (x :: l)) = length l + 1\n[PROOFSTEP]\nsimp [cyclicPermutations_cons]\n[GOAL]\nα : Type u\nl✝ l' l : List α\nh : l ≠ []\n⊢ length (cyclicPermutations l) = length l\n[PROOFSTEP]\nsimp [cyclicPermutations_of_ne_nil _ h]\n[GOAL]\nα : Type u\nl✝ l' l : List α\nn : ℕ\nhn : n < length (cyclicPermutations l)\n⊢ nthLe (cyclicPermutations l) n hn = rotate l n\n[PROOFSTEP]\nobtain rfl | h := eq_or_ne l []\n[GOAL]\ncase inl\nα : Type u\nl l' : List α\nn : ℕ\nhn : n < length (cyclicPermutations [])\n⊢ nthLe (cyclicPermutations []) n hn = rotate [] n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u\nl✝ l' l : List α\nn : ℕ\nhn : n < length (cyclicPermutations l)\nh : l ≠ []\n⊢ nthLe (cyclicPermutations l) n hn = rotate l n\n[PROOFSTEP]\nrw [length_cyclicPermutations_of_ne_nil _ h] at hn \n[GOAL]\ncase inr\nα : Type u\nl✝ l' l : List α\nn : ℕ\nhn✝ : n < length (cyclicPermutations l)\nhn : n < length l\nh : l ≠ []\n⊢ nthLe (cyclicPermutations l) n hn✝ = rotate l n\n[PROOFSTEP]\nsimp [dropLast_eq_take, cyclicPermutations_of_ne_nil _ h, nthLe_take', rotate_eq_drop_append_take hn.le]\n[GOAL]\nα : Type u\nl✝ l' l : List α\n⊢ l ∈ cyclicPermutations l\n[PROOFSTEP]\ncases' l with x l\n[GOAL]\ncase nil\nα : Type u\nl l' : List α\n⊢ [] ∈ cyclicPermutations []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nl✝ l' : List α\nx : α\nl : List α\n⊢ x :: l ∈ cyclicPermutations (x :: l)\n[PROOFSTEP]\nrw [mem_iff_nthLe]\n[GOAL]\ncase cons\nα : Type u\nl✝ l' : List α\nx : α\nl : List α\n⊢ ∃ n h, nthLe (cyclicPermutations (x :: l)) n h = x :: l\n[PROOFSTEP]\nrefine' ⟨0, by simp, _⟩\n[GOAL]\nα : Type u\nl✝ l' : List α\nx : α\nl : List α\n⊢ 0 < length (cyclicPermutations (x :: l))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nl✝ l' : List α\nx : α\nl : List α\n⊢ nthLe (cyclicPermutations (x :: l)) 0 (_ : 0 < length (cyclicPermutations (x :: l))) = x :: l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl✝ l' l : List α\nh : l' ∈ cyclicPermutations l\n⊢ length l' = length l\n[PROOFSTEP]\nobtain ⟨k, hk, rfl⟩ := nthLe_of_mem h\n[GOAL]\ncase intro.intro\nα : Type u\nl✝ l : List α\nk : ℕ\nhk : k < length (cyclicPermutations l)\nh : nthLe (cyclicPermutations l) k hk ∈ cyclicPermutations l\n⊢ length (nthLe (cyclicPermutations l) k hk) = length l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl✝ l'✝ l l' : List α\n⊢ l ∈ cyclicPermutations l' ↔ l ~r l'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nl✝ l'✝ l l' : List α\n⊢ l ∈ cyclicPermutations l' → l ~r l'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nl✝ l'✝ l l' : List α\nh : l ∈ cyclicPermutations l'\n⊢ l ~r l'\n[PROOFSTEP]\nobtain ⟨k, hk, rfl⟩ := nthLe_of_mem h\n[GOAL]\ncase mp.intro.intro\nα : Type u\nl l'✝ l' : List α\nk : ℕ\nhk : k < length (cyclicPermutations l')\nh : nthLe (cyclicPermutations l') k hk ∈ cyclicPermutations l'\n⊢ nthLe (cyclicPermutations l') k hk ~r l'\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nα : Type u\nl✝ l'✝ l l' : List α\n⊢ l ~r l' → l ∈ cyclicPermutations l'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u\nl✝ l'✝ l l' : List α\nh : l ~r l'\n⊢ l ∈ cyclicPermutations l'\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := h.symm\n[GOAL]\ncase mpr.intro\nα : Type u\nl l'✝ l' : List α\nk : ℕ\nh : rotate l' k ~r l'\n⊢ rotate l' k ∈ cyclicPermutations l'\n[PROOFSTEP]\nrw [mem_iff_nthLe]\n[GOAL]\ncase mpr.intro\nα : Type u\nl l'✝ l' : List α\nk : ℕ\nh : rotate l' k ~r l'\n⊢ ∃ n h, nthLe (cyclicPermutations l') n h = rotate l' k\n[PROOFSTEP]\nsimp only [exists_prop, nthLe_cyclicPermutations]\n[GOAL]\ncase mpr.intro\nα : Type u\nl l'✝ l' : List α\nk : ℕ\nh : rotate l' k ~r l'\n⊢ ∃ n, n < length (cyclicPermutations l') ∧ rotate l' n = rotate l' k\n[PROOFSTEP]\ncases' l' with x l\n[GOAL]\ncase mpr.intro.nil\nα : Type u\nl l' : List α\nk : ℕ\nh : rotate [] k ~r []\n⊢ ∃ n, n < length (cyclicPermutations []) ∧ rotate [] n = rotate [] k\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.intro.cons\nα : Type u\nl✝ l' : List α\nk : ℕ\nx : α\nl : List α\nh : rotate (x :: l) k ~r (x :: l)\n⊢ ∃ n, n < length (cyclicPermutations (x :: l)) ∧ rotate (x :: l) n = rotate (x :: l) k\n[PROOFSTEP]\nrefine' ⟨k % length (x :: l), _, rotate_mod _ _⟩\n[GOAL]\ncase mpr.intro.cons\nα : Type u\nl✝ l' : List α\nk : ℕ\nx : α\nl : List α\nh : rotate (x :: l) k ~r (x :: l)\n⊢ k % length (x :: l) < length (cyclicPermutations (x :: l))\n[PROOFSTEP]\nsimpa using Nat.mod_lt _ (zero_lt_succ _)\n[GOAL]\nα : Type u\nl✝ l' l : List α\n⊢ cyclicPermutations l = [[]] ↔ l = []\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => by simp [h]⟩\n[GOAL]\nα : Type u\nl✝ l' l : List α\nh : l = []\n⊢ cyclicPermutations l = [[]]\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nl✝ l' l : List α\nh : cyclicPermutations l = [[]]\n⊢ l = []\n[PROOFSTEP]\nrw [eq_comm, ← isRotated_nil_iff', ← mem_cyclicPermutations_iff, h, mem_singleton]\n[GOAL]\nα : Type u\nl✝ l' l : List α\nx : α\n⊢ cyclicPermutations l = [[x]] ↔ l = [x]\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => by simp [cyclicPermutations, h, dropLast_eq_take]⟩\n[GOAL]\nα : Type u\nl✝ l' l : List α\nx : α\nh : l = [x]\n⊢ cyclicPermutations l = [[x]]\n[PROOFSTEP]\nsimp [cyclicPermutations, h, dropLast_eq_take]\n[GOAL]\nα : Type u\nl✝ l' l : List α\nx : α\nh : cyclicPermutations l = [[x]]\n⊢ l = [x]\n[PROOFSTEP]\nrw [eq_comm, ← isRotated_singleton_iff', ← mem_cyclicPermutations_iff, h, mem_singleton]\n[GOAL]\nα : Type u\nl✝ l' l : List α\nhn : Nodup l\n⊢ Nodup (List.cyclicPermutations l)\n[PROOFSTEP]\ncases' l with x l\n[GOAL]\ncase nil\nα : Type u\nl l' : List α\nhn : Nodup []\n⊢ Nodup (List.cyclicPermutations [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nl✝ l' : List α\nx : α\nl : List α\nhn : Nodup (x :: l)\n⊢ Nodup (List.cyclicPermutations (x :: l))\n[PROOFSTEP]\nrw [nodup_iff_nthLe_inj]\n[GOAL]\ncase cons\nα : Type u\nl✝ l' : List α\nx : α\nl : List α\nhn : Nodup (x :: l)\n⊢ ∀ (i j : ℕ) (h₁ : i < length (List.cyclicPermutations (x :: l))) (h₂ : j < length (List.cyclicPermutations (x :: l))),\n    nthLe (List.cyclicPermutations (x :: l)) i h₁ = nthLe (List.cyclicPermutations (x :: l)) j h₂ → i = j\n[PROOFSTEP]\nintro i j hi hj h\n[GOAL]\ncase cons\nα : Type u\nl✝ l' : List α\nx : α\nl : List α\nhn : Nodup (x :: l)\ni j : ℕ\nhi : i < length (List.cyclicPermutations (x :: l))\nhj : j < length (List.cyclicPermutations (x :: l))\nh : nthLe (List.cyclicPermutations (x :: l)) i hi = nthLe (List.cyclicPermutations (x :: l)) j hj\n⊢ i = j\n[PROOFSTEP]\nsimp only [length_cyclicPermutations_cons] at hi hj \n[GOAL]\ncase cons\nα : Type u\nl✝ l' : List α\nx : α\nl : List α\nhn : Nodup (x :: l)\ni j : ℕ\nhi✝ : i < length (List.cyclicPermutations (x :: l))\nhj✝ : j < length (List.cyclicPermutations (x :: l))\nh : nthLe (List.cyclicPermutations (x :: l)) i hi✝ = nthLe (List.cyclicPermutations (x :: l)) j hj✝\nhi : i < length l + 1\nhj : j < length l + 1\n⊢ i = j\n[PROOFSTEP]\nrw [← mod_eq_of_lt hi, ← mod_eq_of_lt hj]\n[GOAL]\ncase cons\nα : Type u\nl✝ l' : List α\nx : α\nl : List α\nhn : Nodup (x :: l)\ni j : ℕ\nhi✝ : i < length (List.cyclicPermutations (x :: l))\nhj✝ : j < length (List.cyclicPermutations (x :: l))\nh : nthLe (List.cyclicPermutations (x :: l)) i hi✝ = nthLe (List.cyclicPermutations (x :: l)) j hj✝\nhi : i < length l + 1\nhj : j < length l + 1\n⊢ i % (length l + 1) = j % (length l + 1)\n[PROOFSTEP]\napply hn.rotate_congr\n[GOAL]\ncase cons.hn\nα : Type u\nl✝ l' : List α\nx : α\nl : List α\nhn : Nodup (x :: l)\ni j : ℕ\nhi✝ : i < length (List.cyclicPermutations (x :: l))\nhj✝ : j < length (List.cyclicPermutations (x :: l))\nh : nthLe (List.cyclicPermutations (x :: l)) i hi✝ = nthLe (List.cyclicPermutations (x :: l)) j hj✝\nhi : i < length l + 1\nhj : j < length l + 1\n⊢ x :: l ≠ []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.h\nα : Type u\nl✝ l' : List α\nx : α\nl : List α\nhn : Nodup (x :: l)\ni j : ℕ\nhi✝ : i < length (List.cyclicPermutations (x :: l))\nhj✝ : j < length (List.cyclicPermutations (x :: l))\nh : nthLe (List.cyclicPermutations (x :: l)) i hi✝ = nthLe (List.cyclicPermutations (x :: l)) j hj✝\nhi : i < length l + 1\nhj : j < length l + 1\n⊢ rotate (x :: l) i = rotate (x :: l) j\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u\nl✝ l' l : List α\nk : ℕ\n⊢ cyclicPermutations (rotate l k) = rotate (cyclicPermutations l) k\n[PROOFSTEP]\nhave : (l.rotate k).cyclicPermutations.length = length (l.cyclicPermutations.rotate k) :=\n  by\n  cases l\n  · simp\n  · rw [length_cyclicPermutations_of_ne_nil] <;> simp\n[GOAL]\nα : Type u\nl✝ l' l : List α\nk : ℕ\n⊢ length (cyclicPermutations (rotate l k)) = length (rotate (cyclicPermutations l) k)\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nα : Type u\nl l' : List α\nk : ℕ\n⊢ length (cyclicPermutations (rotate [] k)) = length (rotate (cyclicPermutations []) k)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nl l' : List α\nk : ℕ\nhead✝ : α\ntail✝ : List α\n⊢ length (cyclicPermutations (rotate (head✝ :: tail✝) k)) = length (rotate (cyclicPermutations (head✝ :: tail✝)) k)\n[PROOFSTEP]\nrw [length_cyclicPermutations_of_ne_nil]\n[GOAL]\ncase cons\nα : Type u\nl l' : List α\nk : ℕ\nhead✝ : α\ntail✝ : List α\n⊢ length (rotate (head✝ :: tail✝) k) = length (rotate (cyclicPermutations (head✝ :: tail✝)) k)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.h\nα : Type u\nl l' : List α\nk : ℕ\nhead✝ : α\ntail✝ : List α\n⊢ rotate (head✝ :: tail✝) k ≠ []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl✝ l' l : List α\nk : ℕ\nthis : length (cyclicPermutations (rotate l k)) = length (rotate (cyclicPermutations l) k)\n⊢ cyclicPermutations (rotate l k) = rotate (cyclicPermutations l) k\n[PROOFSTEP]\nrefine' ext_nthLe this fun n hn hn' => _\n[GOAL]\nα : Type u\nl✝ l' l : List α\nk : ℕ\nthis : length (cyclicPermutations (rotate l k)) = length (rotate (cyclicPermutations l) k)\nn : ℕ\nhn : n < length (cyclicPermutations (rotate l k))\nhn' : n < length (rotate (cyclicPermutations l) k)\n⊢ nthLe (cyclicPermutations (rotate l k)) n hn = nthLe (rotate (cyclicPermutations l) k) n hn'\n[PROOFSTEP]\nrw [nthLe_rotate, nthLe_cyclicPermutations, rotate_rotate, ← rotate_mod, add_comm]\n[GOAL]\nα : Type u\nl✝ l' l : List α\nk : ℕ\nthis : length (cyclicPermutations (rotate l k)) = length (rotate (cyclicPermutations l) k)\nn : ℕ\nhn : n < length (cyclicPermutations (rotate l k))\nhn' : n < length (rotate (cyclicPermutations l) k)\n⊢ rotate l ((n + k) % length l) =\n    nthLe (cyclicPermutations l) ((n + k) % length (cyclicPermutations l))\n      (_ : (n + k) % length (cyclicPermutations l) < length (cyclicPermutations l))\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nα : Type u\nl l' : List α\nk n : ℕ\nthis : length (cyclicPermutations (rotate [] k)) = length (rotate (cyclicPermutations []) k)\nhn : n < length (cyclicPermutations (rotate [] k))\nhn' : n < length (rotate (cyclicPermutations []) k)\n⊢ rotate [] ((n + k) % length []) =\n    nthLe (cyclicPermutations []) ((n + k) % length (cyclicPermutations []))\n      (_ : (n + k) % length (cyclicPermutations []) < length (cyclicPermutations []))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nl l' : List α\nk n : ℕ\nhead✝ : α\ntail✝ : List α\nthis : length (cyclicPermutations (rotate (head✝ :: tail✝) k)) = length (rotate (cyclicPermutations (head✝ :: tail✝)) k)\nhn : n < length (cyclicPermutations (rotate (head✝ :: tail✝) k))\nhn' : n < length (rotate (cyclicPermutations (head✝ :: tail✝)) k)\n⊢ rotate (head✝ :: tail✝) ((n + k) % length (head✝ :: tail✝)) =\n    nthLe (cyclicPermutations (head✝ :: tail✝)) ((n + k) % length (cyclicPermutations (head✝ :: tail✝)))\n      (_ : (n + k) % length (cyclicPermutations (head✝ :: tail✝)) < length (cyclicPermutations (head✝ :: tail✝)))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl✝ l'✝ l l' : List α\nh : l ~r l'\n⊢ List.cyclicPermutations l ~r List.cyclicPermutations l'\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := h\n[GOAL]\ncase intro\nα : Type u\nl✝ l' l : List α\nk : ℕ\n⊢ List.cyclicPermutations l ~r List.cyclicPermutations (rotate l k)\n[PROOFSTEP]\nexact ⟨k, by simp⟩\n[GOAL]\nα : Type u\nl✝ l' l : List α\nk : ℕ\n⊢ rotate (List.cyclicPermutations l) k = List.cyclicPermutations (rotate l k)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl✝ l'✝ l l' : List α\n⊢ cyclicPermutations l ~r cyclicPermutations l' ↔ l ~r l'\n[PROOFSTEP]\nby_cases hl : l = []\n[GOAL]\ncase pos\nα : Type u\nl✝ l'✝ l l' : List α\nhl : l = []\n⊢ cyclicPermutations l ~r cyclicPermutations l' ↔ l ~r l'\n[PROOFSTEP]\nsimp [hl, eq_comm]\n[GOAL]\ncase neg\nα : Type u\nl✝ l'✝ l l' : List α\nhl : ¬l = []\n⊢ cyclicPermutations l ~r cyclicPermutations l' ↔ l ~r l'\n[PROOFSTEP]\nhave hl' : l.cyclicPermutations.length = l.length := length_cyclicPermutations_of_ne_nil _ hl\n[GOAL]\ncase neg\nα : Type u\nl✝ l'✝ l l' : List α\nhl : ¬l = []\nhl' : length (cyclicPermutations l) = length l\n⊢ cyclicPermutations l ~r cyclicPermutations l' ↔ l ~r l'\n[PROOFSTEP]\nrefine' ⟨fun h => _, IsRotated.cyclicPermutations⟩\n[GOAL]\ncase neg\nα : Type u\nl✝ l'✝ l l' : List α\nhl : ¬l = []\nhl' : length (cyclicPermutations l) = length l\nh : cyclicPermutations l ~r cyclicPermutations l'\n⊢ l ~r l'\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := h\n[GOAL]\ncase neg.intro\nα : Type u\nl✝ l'✝ l l' : List α\nhl : ¬l = []\nhl' : length (cyclicPermutations l) = length l\nk : ℕ\nhk : rotate (cyclicPermutations l) k = cyclicPermutations l'\n⊢ l ~r l'\n[PROOFSTEP]\nrefine' ⟨k % l.length, _⟩\n[GOAL]\ncase neg.intro\nα : Type u\nl✝ l'✝ l l' : List α\nhl : ¬l = []\nhl' : length (cyclicPermutations l) = length l\nk : ℕ\nhk : rotate (cyclicPermutations l) k = cyclicPermutations l'\n⊢ rotate l (k % length l) = l'\n[PROOFSTEP]\nhave hk' : k % l.length < l.length := mod_lt _ (length_pos_of_ne_nil hl)\n[GOAL]\ncase neg.intro\nα : Type u\nl✝ l'✝ l l' : List α\nhl : ¬l = []\nhl' : length (cyclicPermutations l) = length l\nk : ℕ\nhk : rotate (cyclicPermutations l) k = cyclicPermutations l'\nhk' : k % length l < length l\n⊢ rotate l (k % length l) = l'\n[PROOFSTEP]\nrw [← nthLe_cyclicPermutations _ _ (hk'.trans_le hl'.ge), ← nthLe_rotate' _ k]\n[GOAL]\ncase neg.intro\nα : Type u\nl✝ l'✝ l l' : List α\nhl : ¬l = []\nhl' : length (cyclicPermutations l) = length l\nk : ℕ\nhk : rotate (cyclicPermutations l) k = cyclicPermutations l'\nhk' : k % length l < length l\n⊢ nthLe (rotate (cyclicPermutations l) k)\n      ((length (cyclicPermutations l) - k % length (cyclicPermutations l) + k % length l) %\n        length (cyclicPermutations l))\n      (_ :\n        (length (cyclicPermutations l) - k % length (cyclicPermutations l) + k % length l) %\n            length (cyclicPermutations l) <\n          length (rotate (cyclicPermutations l) k)) =\n    l'\n[PROOFSTEP]\nsimp [hk, hl', tsub_add_cancel_of_le hk'.le]\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Rotate", "llama_tokens": 23823, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583124210897, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.39925625632306694}}
{"text": "[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc x y : Con M\nh : (fun c x y => r x y) x = (fun c x y => r x y) y\n⊢ x = y\n[PROOFSTEP]\nrcases x with ⟨⟨x, _⟩, _⟩\n[GOAL]\ncase mk.mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc y : Con M\nx : M → M → Prop\niseqv✝ : Equivalence x\nmul'✝ : ∀ {w x_1 y z : M}, r w x_1 → r y z → r (w * y) (x_1 * z)\nh : (fun c x y => r x y) { toSetoid := { r := x, iseqv := iseqv✝ }, mul' := mul'✝ } = (fun c x y => r x y) y\n⊢ { toSetoid := { r := x, iseqv := iseqv✝ }, mul' := mul'✝ } = y\n[PROOFSTEP]\nrcases y with ⟨⟨y, _⟩, _⟩\n[GOAL]\ncase mk.mk.mk.mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nx : M → M → Prop\niseqv✝¹ : Equivalence x\nmul'✝¹ : ∀ {w x_1 y z : M}, r w x_1 → r y z → r (w * y) (x_1 * z)\ny : M → M → Prop\niseqv✝ : Equivalence y\nmul'✝ : ∀ {w x y_1 z : M}, r w x → r y_1 z → r (w * y_1) (x * z)\nh :\n  (fun c x y => r x y) { toSetoid := { r := x, iseqv := iseqv✝¹ }, mul' := mul'✝¹ } =\n    (fun c x y => r x y) { toSetoid := { r := y, iseqv := iseqv✝ }, mul' := mul'✝ }\n⊢ { toSetoid := { r := x, iseqv := iseqv✝¹ }, mul' := mul'✝¹ } =\n    { toSetoid := { r := y, iseqv := iseqv✝ }, mul' := mul'✝ }\n[PROOFSTEP]\nhave : x = y := h\n[GOAL]\ncase mk.mk.mk.mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nx : M → M → Prop\niseqv✝¹ : Equivalence x\nmul'✝¹ : ∀ {w x_1 y z : M}, r w x_1 → r y z → r (w * y) (x_1 * z)\ny : M → M → Prop\niseqv✝ : Equivalence y\nmul'✝ : ∀ {w x y_1 z : M}, r w x → r y_1 z → r (w * y_1) (x * z)\nh :\n  (fun c x y => r x y) { toSetoid := { r := x, iseqv := iseqv✝¹ }, mul' := mul'✝¹ } =\n    (fun c x y => r x y) { toSetoid := { r := y, iseqv := iseqv✝ }, mul' := mul'✝ }\nthis : x = y\n⊢ { toSetoid := { r := x, iseqv := iseqv✝¹ }, mul' := mul'✝¹ } =\n    { toSetoid := { r := y, iseqv := iseqv✝ }, mul' := mul'✝ }\n[PROOFSTEP]\nsubst x\n[GOAL]\ncase mk.mk.mk.mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\ny : M → M → Prop\niseqv✝¹ : Equivalence y\nmul'✝¹ : ∀ {w x y_1 z : M}, r w x → r y_1 z → r (w * y_1) (x * z)\niseqv✝ : Equivalence y\nmul'✝ : ∀ {w x y_1 z : M}, r w x → r y_1 z → r (w * y_1) (x * z)\nh :\n  (fun c x y => r x y) { toSetoid := { r := y, iseqv := iseqv✝ }, mul' := mul'✝ } =\n    (fun c x y => r x y) { toSetoid := { r := y, iseqv := iseqv✝¹ }, mul' := mul'✝¹ }\n⊢ { toSetoid := { r := y, iseqv := iseqv✝ }, mul' := mul'✝ } =\n    { toSetoid := { r := y, iseqv := iseqv✝¹ }, mul' := mul'✝¹ }\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c d : Con M\nH : r = r\n⊢ c = d\n[PROOFSTEP]\nrcases c with ⟨⟨⟩⟩\n[GOAL]\ncase mk.mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc d : Con M\nr✝ : M → M → Prop\niseqv✝ : Equivalence r✝\nmul'✝ : ∀ {w x y z : M}, r w x → r y z → r (w * y) (x * z)\nH : r = r\n⊢ { toSetoid := { r := r✝, iseqv := iseqv✝ }, mul' := mul'✝ } = d\n[PROOFSTEP]\nrcases d with ⟨⟨⟩⟩\n[GOAL]\ncase mk.mk.mk.mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nr✝¹ : M → M → Prop\niseqv✝¹ : Equivalence r✝¹\nmul'✝¹ : ∀ {w x y z : M}, r w x → r y z → r (w * y) (x * z)\nr✝ : M → M → Prop\niseqv✝ : Equivalence r✝\nmul'✝ : ∀ {w x y z : M}, r w x → r y z → r (w * y) (x * z)\nH : r = r\n⊢ { toSetoid := { r := r✝¹, iseqv := iseqv✝¹ }, mul' := mul'✝¹ } =\n    { toSetoid := { r := r✝, iseqv := iseqv✝ }, mul' := mul'✝ }\n[PROOFSTEP]\ncases H\n[GOAL]\ncase mk.mk.mk.mk.refl\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nr✝ : M → M → Prop\niseqv✝¹ : Equivalence r✝\nmul'✝¹ : ∀ {w x y z : M}, r w x → r y z → r (w * y) (x * z)\niseqv✝ : Equivalence r✝\nmul'✝ : ∀ {w x y z : M}, r w x → r y z → r (w * y) (x * z)\n⊢ { toSetoid := { r := r✝, iseqv := iseqv✝¹ }, mul' := mul'✝¹ } =\n    { toSetoid := { r := r✝, iseqv := iseqv✝ }, mul' := mul'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c d : Con M\nH : ∀ (x y : M), ↑c x y ↔ ↑d x y\n⊢ r = r\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.a\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c d : Con M\nH : ∀ (x y : M), ↑c x y ↔ ↑d x y\nx✝¹ x✝ : M\n⊢ r x✝¹ x✝ ↔ r x✝¹ x✝\n[PROOFSTEP]\napply H\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nf : M → P\nh : ∀ (x y : M), f (x * y) = f x * f y\nw✝ x✝ y✝ z✝ : M\nh1 : r w✝ x✝\nh2 : r y✝ z✝\n⊢ r (w✝ * y✝) (x✝ * z✝)\n[PROOFSTEP]\ndsimp [Setoid.ker, onFun] at *\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nf : M → P\nh : ∀ (x y : M), f (x * y) = f x * f y\nw✝ x✝ y✝ z✝ : M\nh1 : f w✝ = f x✝\nh2 : f y✝ = f z✝\n⊢ f (w✝ * y✝) = f (x✝ * z✝)\n[PROOFSTEP]\nrw [h, h1, h2, h]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c d : Con M\nh : c = d\n⊢ ∀ (a₁ a₂ : M), r a₁ a₂ ↔ r (↑(Equiv.refl M) a₁) (↑(Equiv.refl M) a₂)\n[PROOFSTEP]\napply ext_iff.2 h\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c d : Con M\nh : c = d\nsrc✝ : Quotient c.toSetoid ≃ Quotient d.toSetoid := Quotient.congr (Equiv.refl M) (_ : ∀ (x y : M), ↑c x y ↔ ↑d x y)\nx y : Con.Quotient c\n⊢ Equiv.toFun\n      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      (x * y) =\n    Equiv.toFun\n        { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        x *\n      Equiv.toFun\n        { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        y\n[PROOFSTEP]\nrcases x with ⟨⟩\n[GOAL]\ncase mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c d : Con M\nh : c = d\nsrc✝ : Quotient c.toSetoid ≃ Quotient d.toSetoid := Quotient.congr (Equiv.refl M) (_ : ∀ (x y : M), ↑c x y ↔ ↑d x y)\nx y : Con.Quotient c\na✝ : M\n⊢ Equiv.toFun\n      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      (Quot.mk r a✝ * y) =\n    Equiv.toFun\n        { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        (Quot.mk r a✝) *\n      Equiv.toFun\n        { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        y\n[PROOFSTEP]\nrcases y with ⟨⟩\n[GOAL]\ncase mk.mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c d : Con M\nh : c = d\nsrc✝ : Quotient c.toSetoid ≃ Quotient d.toSetoid := Quotient.congr (Equiv.refl M) (_ : ∀ (x y : M), ↑c x y ↔ ↑d x y)\nx y : Con.Quotient c\na✝¹ a✝ : M\n⊢ Equiv.toFun\n      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      (Quot.mk r a✝¹ * Quot.mk r a✝) =\n    Equiv.toFun\n        { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        (Quot.mk r a✝¹) *\n      Equiv.toFun\n        { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        (Quot.mk r a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ : Con M\nS : Set (Con M)\nx y : M\nh : Rel (sInf S).toSetoid x y\nr : Setoid M\nx✝ : r ∈ toSetoid '' S\nc : Con M\nhS : c ∈ S\nhr : c.toSetoid = r\n⊢ Rel r x y\n[PROOFSTEP]\nrw [← hr]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ : Con M\nS : Set (Con M)\nx y : M\nh : Rel (sInf S).toSetoid x y\nr : Setoid M\nx✝ : r ∈ toSetoid '' S\nc : Con M\nhS : c ∈ S\nhr : c.toSetoid = r\n⊢ Rel c.toSetoid x y\n[PROOFSTEP]\nexact h c hS\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nS : Set (Con M)\n⊢ ↑(sInf S) = sInf (FunLike.coe '' S)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.a\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nS : Set (Con M)\nx✝¹ x✝ : M\n⊢ ↑(sInf S) x✝¹ x✝ ↔ sInf (FunLike.coe '' S) x✝¹ x✝\n[PROOFSTEP]\nsimp only [sInf_image, iInf_apply, iInf_Prop_eq]\n[GOAL]\ncase h.h.a\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nS : Set (Con M)\nx✝¹ x✝ : M\n⊢ ↑(sInf S) x✝¹ x✝ ↔ ∀ (i : Con M), i ∈ S → ↑i x✝¹ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nsrc✝¹ : CompleteLattice (Con M) :=\n  completeLatticeOfInf (Con M) (_ : ∀ (s : Set (Con M)), sInf s ∈ lowerBounds s ∧ sInf s ∈ upperBounds (lowerBounds s))\nsrc✝ : Setoid M := ⊤\n⊢ ∀ {w x y z : M}, r w x → r y z → r (w * y) (x * z)\n[PROOFSTEP]\ntauto\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nr : M → M → Prop\ns : Con M\nhs : s ∈ {s | ∀ (x y : M), r x y → ↑s x y}\nx y : M\nhxy : Setoid.r x y\n⊢ Setoid.r x y\n[PROOFSTEP]\napply ConGen.Rel.recOn (motive := fun x y _ => s.r x y) hxy\n[GOAL]\ncase of\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nr : M → M → Prop\ns : Con M\nhs : s ∈ {s | ∀ (x y : M), r x y → ↑s x y}\nx y : M\nhxy : Setoid.r x y\n⊢ ∀ (x y : M), r x y → Setoid.r x y\n[PROOFSTEP]\nexact fun x y h => hs x y h\n[GOAL]\ncase refl\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nr : M → M → Prop\ns : Con M\nhs : s ∈ {s | ∀ (x y : M), r x y → ↑s x y}\nx y : M\nhxy : Setoid.r x y\n⊢ ∀ (x : M), Setoid.r x x\n[PROOFSTEP]\nexact s.refl'\n[GOAL]\ncase symm\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nr : M → M → Prop\ns : Con M\nhs : s ∈ {s | ∀ (x y : M), r x y → ↑s x y}\nx y : M\nhxy : Setoid.r x y\n⊢ ∀ {x y : M}, ConGen.Rel r x y → Setoid.r x y → Setoid.r y x\n[PROOFSTEP]\nexact fun _ => s.symm'\n[GOAL]\ncase trans\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nr : M → M → Prop\ns : Con M\nhs : s ∈ {s | ∀ (x y : M), r x y → ↑s x y}\nx y : M\nhxy : Setoid.r x y\n⊢ ∀ {x y z : M}, ConGen.Rel r x y → ConGen.Rel r y z → Setoid.r x y → Setoid.r y z → Setoid.r x z\n[PROOFSTEP]\nexact fun _ _ => s.trans'\n[GOAL]\ncase mul\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nr : M → M → Prop\ns : Con M\nhs : s ∈ {s | ∀ (x y : M), r x y → ↑s x y}\nx y : M\nhxy : Setoid.r x y\n⊢ ∀ {w x y z : M}, ConGen.Rel r w x → ConGen.Rel r y z → Setoid.r w x → Setoid.r y z → Setoid.r (w * y) (x * z)\n[PROOFSTEP]\nexact fun _ _ => s.mul\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ : Con M\nr : M → M → Prop\nc : Con M\nh : ∀ (x y : M), r x y → Setoid.r x y\n⊢ conGen r ≤ c\n[PROOFSTEP]\nrw [conGen_eq]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ : Con M\nr : M → M → Prop\nc : Con M\nh : ∀ (x y : M), r x y → Setoid.r x y\n⊢ sInf {s | ∀ (x y : M), r x y → ↑s x y} ≤ c\n[PROOFSTEP]\nexact sInf_le h\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c : Con M\n⊢ conGen ↑c ≤ c\n[PROOFSTEP]\nrw [conGen_eq]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c : Con M\n⊢ sInf {s | ∀ (x y : M), ↑c x y → ↑s x y} ≤ c\n[PROOFSTEP]\nexact sInf_le fun _ _ => id\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c d : Con M\n⊢ c ⊔ d = conGen fun x y => ↑c x y ∨ ↑d x y\n[PROOFSTEP]\nrw [conGen_eq]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c d : Con M\n⊢ c ⊔ d = sInf {s | ∀ (x y : M), ↑c x y ∨ ↑d x y → ↑s x y}\n[PROOFSTEP]\napply congr_arg sInf\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c d : Con M\n⊢ {x | c ≤ x ∧ d ≤ x} = {s | ∀ (x y : M), ↑c x y ∨ ↑d x y → ↑s x y}\n[PROOFSTEP]\nsimp only [le_def, or_imp, ← forall_and]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c d : Con M\n⊢ c ⊔ d = conGen (r ⊔ r)\n[PROOFSTEP]\nrw [sup_eq_conGen]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c d : Con M\n⊢ (conGen fun x y => ↑c x y ∨ ↑d x y) = conGen (r ⊔ r)\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nS : Set (Con M)\n⊢ sSup S = conGen fun x y => ∃ c, c ∈ S ∧ ↑c x y\n[PROOFSTEP]\nrw [conGen_eq]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nS : Set (Con M)\n⊢ sSup S = sInf {s | ∀ (x y : M), (∃ c, c ∈ S ∧ ↑c x y) → ↑s x y}\n[PROOFSTEP]\napply congr_arg sInf\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nS : Set (Con M)\n⊢ upperBounds S = {s | ∀ (x y : M), (∃ c, c ∈ S ∧ ↑c x y) → ↑s x y}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nS : Set (Con M)\nx✝ : Con M\n⊢ x✝ ∈ upperBounds S ↔ x✝ ∈ {s | ∀ (x y : M), (∃ c, c ∈ S ∧ ↑c x y) → ↑s x y}\n[PROOFSTEP]\nexact ⟨fun h _ _ ⟨r, hr⟩ => h hr.1 hr.2, fun h r hS _ _ hr => h _ _ ⟨r, hS, hr⟩⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nS : Set (Con M)\n⊢ sSup S = conGen (sSup (FunLike.coe '' S))\n[PROOFSTEP]\nrw [sSup_eq_conGen, sSup_image]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nS : Set (Con M)\n⊢ (conGen fun x y => ∃ c, c ∈ S ∧ ↑c x y) = conGen (⨆ (a : Con M) (_ : a ∈ S), ↑a)\n[PROOFSTEP]\ncongr with (x y)\n[GOAL]\ncase e_r.h.h.a\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nS : Set (Con M)\nx y : M\n⊢ (∃ c, c ∈ S ∧ ↑c x y) ↔ iSup (fun a => ⨆ (_ : a ∈ S), ↑a) x y\n[PROOFSTEP]\nsimp only [sSup_image, iSup_apply, iSup_Prop_eq, exists_prop, rel_eq_coe]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nf : M → N\nH : ∀ (x y : M), f (x * y) = f x * f y\nh : mulKer f H ≤ c\nhf : Surjective f\nsrc✝ : Setoid N := Setoid.mapOfSurjective c.toSetoid f h hf\nw✝ x✝ y✝ z✝ : N\nh₁ : r w✝ x✝\nh₂ : r y✝ z✝\n⊢ r (w✝ * y✝) (x✝ * z✝)\n[PROOFSTEP]\nrcases h₁ with ⟨a, b, rfl, rfl, h1⟩\n[GOAL]\ncase intro.intro.intro.intro\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nf : M → N\nH : ∀ (x y : M), f (x * y) = f x * f y\nh : mulKer f H ≤ c\nhf : Surjective f\nsrc✝ : Setoid N := Setoid.mapOfSurjective c.toSetoid f h hf\ny✝ z✝ : N\nh₂ : r y✝ z✝\na b : M\nh1 : Rel c.toSetoid a b\n⊢ r (f a * y✝) (f b * z✝)\n[PROOFSTEP]\nrcases h₂ with ⟨p, q, rfl, rfl, h2⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nf : M → N\nH : ∀ (x y : M), f (x * y) = f x * f y\nh : mulKer f H ≤ c\nhf : Surjective f\nsrc✝ : Setoid N := Setoid.mapOfSurjective c.toSetoid f h hf\na b : M\nh1 : Rel c.toSetoid a b\np q : M\nh2 : Rel c.toSetoid p q\n⊢ r (f a * f p) (f b * f q)\n[PROOFSTEP]\nexact ⟨a * p, b * q, by rw [H], by rw [H], c.mul h1 h2⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nf : M → N\nH : ∀ (x y : M), f (x * y) = f x * f y\nh : mulKer f H ≤ c\nhf : Surjective f\nsrc✝ : Setoid N := Setoid.mapOfSurjective c.toSetoid f h hf\na b : M\nh1 : Rel c.toSetoid a b\np q : M\nh2 : Rel c.toSetoid p q\n⊢ f (a * p) = f a * f p\n[PROOFSTEP]\nrw [H]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nf : M → N\nH : ∀ (x y : M), f (x * y) = f x * f y\nh : mulKer f H ≤ c\nhf : Surjective f\nsrc✝ : Setoid N := Setoid.mapOfSurjective c.toSetoid f h hf\na b : M\nh1 : Rel c.toSetoid a b\np q : M\nh2 : Rel c.toSetoid p q\n⊢ f (b * q) = f b * f q\n[PROOFSTEP]\nrw [H]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c : Con M\nf : M → N\nH : ∀ (x y : M), f (x * y) = f x * f y\nh : mulKer f H ≤ c\nhf : Surjective f\n⊢ mapGen c f = mapOfSurjective c f H h hf\n[PROOFSTEP]\nrw [← conGen_of_con (c.mapOfSurjective f H h hf)]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ c : Con M\nf : M → N\nH : ∀ (x y : M), f (x * y) = f x * f y\nh : mulKer f H ≤ c\nhf : Surjective f\n⊢ mapGen c f = conGen ↑(mapOfSurjective c f H h hf)\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ : Con M\nf : M → N\nH : ∀ (x y : M), f (x * y) = f x * f y\nc : Con N\nsrc✝ : Setoid M := Setoid.comap f c.toSetoid\nw x y z : M\nh1 : r w x\nh2 : r y z\n⊢ ↑c (f (w * y)) (f (x * z))\n[PROOFSTEP]\nrw [H, H]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc✝ : Con M\nf : M → N\nH : ∀ (x y : M), f (x * y) = f x * f y\nc : Con N\nsrc✝ : Setoid M := Setoid.comap f c.toSetoid\nw x y z : M\nh1 : r w x\nh2 : r y z\n⊢ ↑c (f w * f y) (f x * f z)\n[PROOFSTEP]\nexact c.mul h1 h2\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nd : { d // c ≤ d }\n⊢ mulKer toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑x * ↑y) ≤ ↑d\n[PROOFSTEP]\nrw [mul_ker_mk_eq]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nd : { d // c ≤ d }\n⊢ c ≤ ↑d\n[PROOFSTEP]\nexact d.2\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nd : Con (Con.Quotient c)\nx y : M\nh : ↑c x y\n⊢ ↑d ↑x ↑y\n[PROOFSTEP]\nrw [c.eq.2 h]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nd : Con (Con.Quotient c)\nx y : M\nh : ↑c x y\n⊢ ↑d ↑y ↑y\n[PROOFSTEP]\nexact d.refl _\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nd : { d // c ≤ d }\n⊢ (fun d =>\n        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n      ((fun d =>\n          mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n            (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n            (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n        d) =\n    d\n[PROOFSTEP]\nexact\n  Subtype.ext_iff_val.2 <|\n    ext fun x y =>\n      ⟨fun h =>\n        let ⟨a, b, hx, hy, H⟩ := h\n        d.1.trans (d.1.symm <| d.2 <| c.eq.1 hx) <| d.1.trans H <| d.2 <| c.eq.1 hy,\n        fun h => ⟨_, _, rfl, rfl, h⟩⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\nd : Con (Con.Quotient c)\n⊢ (fun d =>\n        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n      ((fun d =>\n          { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n            property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n        d) =\n    d\n[PROOFSTEP]\nexact\n  ext fun x y =>\n    ⟨fun h =>\n      let ⟨_, _, hx, hy, H⟩ := h\n      hx ▸ hy ▸ H,\n      Con.induction_on₂ x y fun w z h => ⟨w, z, rfl, rfl, h⟩⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\ns t : { d // c ≤ d }\n⊢ ↑{\n            toFun := fun d =>\n              mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n            invFun := fun d =>\n              { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n            left_inv :=\n              (_ :\n                ∀ (d : { d // c ≤ d }),\n                  (fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      ((fun d =>\n                          mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                            (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                            (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                        d) =\n                    d),\n            right_inv :=\n              (_ :\n                ∀ (d : Con (Con.Quotient c)),\n                  (fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      ((fun d =>\n                          { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                            property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                        d) =\n                    d) }\n        s ≤\n      ↑{\n            toFun := fun d =>\n              mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n            invFun := fun d =>\n              { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n            left_inv :=\n              (_ :\n                ∀ (d : { d // c ≤ d }),\n                  (fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      ((fun d =>\n                          mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                            (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                            (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                        d) =\n                    d),\n            right_inv :=\n              (_ :\n                ∀ (d : Con (Con.Quotient c)),\n                  (fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      ((fun d =>\n                          { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                            property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                        d) =\n                    d) }\n        t ↔\n    s ≤ t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\ns t : { d // c ≤ d }\n⊢ ↑{\n            toFun := fun d =>\n              mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n            invFun := fun d =>\n              { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n            left_inv :=\n              (_ :\n                ∀ (d : { d // c ≤ d }),\n                  (fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      ((fun d =>\n                          mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                            (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                            (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                        d) =\n                    d),\n            right_inv :=\n              (_ :\n                ∀ (d : Con (Con.Quotient c)),\n                  (fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      ((fun d =>\n                          { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                            property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                        d) =\n                    d) }\n        s ≤\n      ↑{\n            toFun := fun d =>\n              mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n            invFun := fun d =>\n              { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n            left_inv :=\n              (_ :\n                ∀ (d : { d // c ≤ d }),\n                  (fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      ((fun d =>\n                          mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                            (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                            (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                        d) =\n                    d),\n            right_inv :=\n              (_ :\n                ∀ (d : Con (Con.Quotient c)),\n                  (fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      ((fun d =>\n                          { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                            property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                        d) =\n                    d) }\n        t →\n    s ≤ t\n[PROOFSTEP]\nintros h x y hs\n[GOAL]\ncase mp\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\ns t : { d // c ≤ d }\nh :\n  ↑{\n          toFun := fun d =>\n            mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n              (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n              (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n          invFun := fun d =>\n            { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n              property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n          left_inv :=\n            (_ :\n              ∀ (d : { d // c ≤ d }),\n                (fun d =>\n                      { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                        property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                    ((fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      d) =\n                  d),\n          right_inv :=\n            (_ :\n              ∀ (d : Con (Con.Quotient c)),\n                (fun d =>\n                      mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                        (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                        (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                    ((fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      d) =\n                  d) }\n      s ≤\n    ↑{\n          toFun := fun d =>\n            mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n              (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n              (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n          invFun := fun d =>\n            { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n              property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n          left_inv :=\n            (_ :\n              ∀ (d : { d // c ≤ d }),\n                (fun d =>\n                      { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                        property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                    ((fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      d) =\n                  d),\n          right_inv :=\n            (_ :\n              ∀ (d : Con (Con.Quotient c)),\n                (fun d =>\n                      mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                        (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                        (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                    ((fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      d) =\n                  d) }\n      t\nx y : M\nhs : ↑↑s x y\n⊢ ↑↑t x y\n[PROOFSTEP]\nrcases h ⟨x, y, rfl, rfl, hs⟩ with ⟨a, b, hx, hy, ht⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\ns t : { d // c ≤ d }\nh :\n  ↑{\n          toFun := fun d =>\n            mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n              (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n              (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n          invFun := fun d =>\n            { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n              property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n          left_inv :=\n            (_ :\n              ∀ (d : { d // c ≤ d }),\n                (fun d =>\n                      { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                        property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                    ((fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      d) =\n                  d),\n          right_inv :=\n            (_ :\n              ∀ (d : Con (Con.Quotient c)),\n                (fun d =>\n                      mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                        (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                        (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                    ((fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      d) =\n                  d) }\n      s ≤\n    ↑{\n          toFun := fun d =>\n            mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n              (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n              (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n          invFun := fun d =>\n            { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n              property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n          left_inv :=\n            (_ :\n              ∀ (d : { d // c ≤ d }),\n                (fun d =>\n                      { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                        property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                    ((fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      d) =\n                  d),\n          right_inv :=\n            (_ :\n              ∀ (d : Con (Con.Quotient c)),\n                (fun d =>\n                      mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                        (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                        (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                    ((fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      d) =\n                  d) }\n      t\nx y : M\nhs : ↑↑s x y\na b : M\nhx : ↑a = ↑x\nhy : ↑b = ↑y\nht : Rel (↑t).toSetoid a b\n⊢ ↑↑t x y\n[PROOFSTEP]\nexact t.1.trans (t.1.symm <| t.2 <| eq_rel.1 hx) (t.1.trans ht (t.2 <| eq_rel.1 hy))\n[GOAL]\ncase mpr\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\ns t : { d // c ≤ d }\n⊢ s ≤ t →\n    ↑{\n            toFun := fun d =>\n              mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n            invFun := fun d =>\n              { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n            left_inv :=\n              (_ :\n                ∀ (d : { d // c ≤ d }),\n                  (fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      ((fun d =>\n                          mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                            (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                            (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                        d) =\n                    d),\n            right_inv :=\n              (_ :\n                ∀ (d : Con (Con.Quotient c)),\n                  (fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      ((fun d =>\n                          { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                            property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                        d) =\n                    d) }\n        s ≤\n      ↑{\n            toFun := fun d =>\n              mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n            invFun := fun d =>\n              { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n            left_inv :=\n              (_ :\n                ∀ (d : { d // c ≤ d }),\n                  (fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      ((fun d =>\n                          mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                            (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                            (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                        d) =\n                    d),\n            right_inv :=\n              (_ :\n                ∀ (d : Con (Con.Quotient c)),\n                  (fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      ((fun d =>\n                          { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                            property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                        d) =\n                    d) }\n        t\n[PROOFSTEP]\nintros h _ _ hs\n[GOAL]\ncase mpr\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\ns t : { d // c ≤ d }\nh : s ≤ t\nx✝ y✝ : Con.Quotient c\nhs :\n  ↑(↑{\n            toFun := fun d =>\n              mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n            invFun := fun d =>\n              { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n            left_inv :=\n              (_ :\n                ∀ (d : { d // c ≤ d }),\n                  (fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      ((fun d =>\n                          mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                            (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                            (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                        d) =\n                    d),\n            right_inv :=\n              (_ :\n                ∀ (d : Con (Con.Quotient c)),\n                  (fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      ((fun d =>\n                          { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                            property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                        d) =\n                    d) }\n        s)\n    x✝ y✝\n⊢ ↑(↑{\n            toFun := fun d =>\n              mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n            invFun := fun d =>\n              { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n            left_inv :=\n              (_ :\n                ∀ (d : { d // c ≤ d }),\n                  (fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      ((fun d =>\n                          mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                            (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                            (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                        d) =\n                    d),\n            right_inv :=\n              (_ :\n                ∀ (d : Con (Con.Quotient c)),\n                  (fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      ((fun d =>\n                          { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                            property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                        d) =\n                    d) }\n        t)\n    x✝ y✝\n[PROOFSTEP]\nrcases hs with ⟨a, b, hx, hy, Hs⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nc : Con M\ns t : { d // c ≤ d }\nh : s ≤ t\nx✝ y✝ : Con.Quotient c\na b : M\nhx : ↑a = x✝\nhy : ↑b = y✝\nHs : Rel (↑s).toSetoid a b\n⊢ ↑(↑{\n            toFun := fun d =>\n              mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q),\n            invFun := fun d =>\n              { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) },\n            left_inv :=\n              (_ :\n                ∀ (d : { d // c ≤ d }),\n                  (fun d =>\n                        { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                          property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                      ((fun d =>\n                          mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                            (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                            (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                        d) =\n                    d),\n            right_inv :=\n              (_ :\n                ∀ (d : Con (Con.Quotient c)),\n                  (fun d =>\n                        mapOfSurjective (↑d) toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1))\n                          (_ : mulKer toQuotient (_ : ∀ (x x_1 : M), ↑(x * x_1) = ↑(x * x_1)) ≤ ↑d)\n                          (_ : ∀ (q : Quotient c.toSetoid), ∃ a, Quotient.mk c.toSetoid a = q))\n                      ((fun d =>\n                          { val := comap toQuotient (_ : ∀ (x y : M), ↑(x * y) = ↑(x * y)) d,\n                            property := (_ : ∀ (x y : M), ↑c x y → ↑d ↑x ↑y) })\n                        d) =\n                    d) }\n        t)\n    x✝ y✝\n[PROOFSTEP]\nexact ⟨a, b, hx, hy, h Hs⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y✝ : M\nf : N →* M\nx y : N\n⊢ ↑c (↑f x) (↑f y) ↔ ↑(mk' c) (↑f x) = ↑(mk' c) (↑f y)\n[PROOFSTEP]\nrw [← c.eq]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y✝ : M\nf : N →* M\nx y : N\n⊢ ↑(↑f x) = ↑(↑f y) ↔ ↑(mk' c) (↑f x) = ↑(mk' c) (↑f y)\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx y : M\nf : M →* P\nH : c ≤ ker f\n⊢ (fun x => Con.liftOn x ↑f (_ : ∀ (x x_1 : M), ↑c x x_1 → ↑(ker f) x x_1)) 1 = 1\n[PROOFSTEP]\nrw [← f.map_one]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx y : M\nf : M →* P\nH : c ≤ ker f\n⊢ (fun x => Con.liftOn x ↑f (_ : ∀ (x x_1 : M), ↑c x x_1 → ↑(ker f) x x_1)) 1 = ↑f 1\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y✝ : M\nf : M →* P\nH : c ≤ ker f\nx y : Con.Quotient c\nm n : M\n⊢ OneHom.toFun\n      { toFun := fun x => Con.liftOn x ↑f (_ : ∀ (x x_1 : M), ↑c x x_1 → ↑(ker f) x x_1),\n        map_one' := (_ : (fun x => Con.liftOn x ↑f (_ : ∀ (x x_1 : M), ↑c x x_1 → ↑(ker f) x x_1)) 1 = 1) }\n      (↑m * ↑n) =\n    OneHom.toFun\n        { toFun := fun x => Con.liftOn x ↑f (_ : ∀ (x x_1 : M), ↑c x x_1 → ↑(ker f) x x_1),\n          map_one' := (_ : (fun x => Con.liftOn x ↑f (_ : ∀ (x x_1 : M), ↑c x x_1 → ↑(ker f) x x_1)) 1 = 1) }\n        ↑m *\n      OneHom.toFun\n        { toFun := fun x => Con.liftOn x ↑f (_ : ∀ (x x_1 : M), ↑c x x_1 → ↑(ker f) x x_1),\n          map_one' := (_ : (fun x => Con.liftOn x ↑f (_ : ∀ (x x_1 : M), ↑c x x_1 → ↑(ker f) x x_1)) 1 = 1) }\n        ↑n\n[PROOFSTEP]\ndsimp only [← coe_mul, Con.liftOn_coe]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y✝ : M\nf : M →* P\nH : c ≤ ker f\nx y : Con.Quotient c\nm n : M\n⊢ ↑f (m * n) = ↑f m * ↑f n\n[PROOFSTEP]\nrw [map_mul]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx y : M\nf : M →* P\nH : c ≤ ker f\n⊢ MonoidHom.comp (lift c f H) (mk' c) = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx y : M\nf : M →* P\nH : c ≤ ker f\nx✝ : M\n⊢ ↑(MonoidHom.comp (lift c f H) (mk' c)) x✝ = ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y✝ : M\nf✝ : M →* P\nf : Con.Quotient c →* P\nx y : M\nh : ↑c x y\n⊢ ↑f ↑x = ↑f ↑y\n[PROOFSTEP]\nrw [c.eq.2 h]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx y : M\nf✝ : M →* P\nf : Con.Quotient c →* P\n⊢ lift c (MonoidHom.comp f (mk' c)) (_ : ∀ (x y : M), ↑c x y → ↑f ↑x = ↑f ↑y) = f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y : M\nf✝ : M →* P\nf : Con.Quotient c →* P\nx : Con.Quotient c\n⊢ ↑(lift c (MonoidHom.comp f (mk' c)) (_ : ∀ (x y : M), ↑c x y → ↑f ↑x = ↑f ↑y)) x = ↑f x\n[PROOFSTEP]\nrcases x with ⟨⟩\n[GOAL]\ncase h.mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y : M\nf✝ : M →* P\nf : Con.Quotient c →* P\nx : Con.Quotient c\na✝ : M\n⊢ ↑(lift c (MonoidHom.comp f (mk' c)) (_ : ∀ (x y : M), ↑c x y → ↑f ↑x = ↑f ↑y)) (Quot.mk r a✝) = ↑f (Quot.mk r a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx y : M\nf✝ : M →* P\nf g : Con.Quotient c →* P\nh : ∀ (a : M), ↑f ↑a = ↑g ↑a\n⊢ f = g\n[PROOFSTEP]\nrw [← lift_apply_mk' f, ← lift_apply_mk' g]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx y : M\nf✝ : M →* P\nf g : Con.Quotient c →* P\nh : ∀ (a : M), ↑f ↑a = ↑g ↑a\n⊢ lift c (MonoidHom.comp f (mk' c)) (_ : ∀ (x y : M), ↑c x y → ↑f ↑x = ↑f ↑y) =\n    lift c (MonoidHom.comp g (mk' c)) (_ : ∀ (x y : M), ↑c x y → ↑g ↑x = ↑g ↑y)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx y : M\nf✝ : M →* P\nf g : Con.Quotient c →* P\nh : ∀ (a : M), ↑f ↑a = ↑g ↑a\n⊢ MonoidHom.comp f (mk' c) = MonoidHom.comp g (mk' c)\n[PROOFSTEP]\nexact FunLike.ext_iff.2 h\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y : M\nf : M →* P\nH : c ≤ ker f\ng : Con.Quotient c →* P\nHg : MonoidHom.comp g (mk' c) = f\nx : M\n⊢ ↑g ↑x = ↑(lift c f H) ↑x\n[PROOFSTEP]\nsubst f\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y : M\ng : Con.Quotient c →* P\nx : M\nH : c ≤ ker (MonoidHom.comp g (mk' c))\n⊢ ↑g ↑x = ↑(lift c (MonoidHom.comp g (mk' c)) H) ↑x\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y : M\nf : M →* P\nH : c ≤ ker f\nx : P\n⊢ x ∈ MonoidHom.mrange (lift c f H) → x ∈ MonoidHom.mrange f\n[PROOFSTEP]\nrintro ⟨⟨y⟩, hy⟩\n[GOAL]\ncase intro.mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y✝ : M\nf : M →* P\nH : c ≤ ker f\nx : P\nw✝ : Con.Quotient c\ny : M\nhy : ↑(lift c f H) (Quot.mk r y) = x\n⊢ x ∈ MonoidHom.mrange f\n[PROOFSTEP]\nexact ⟨y, hy⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y✝ : M\nf✝ f : M →* P\nx y : Con.Quotient (ker f)\nh : (fun x => ↑(MonoidHom.mrangeRestrict (kerLift f)) x) x = (fun x => ↑(MonoidHom.mrangeRestrict (kerLift f)) x) y\n⊢ ↑(kerLift f) x = ↑(kerLift f) y\n[PROOFSTEP]\nrcases x with ⟨⟩\n[GOAL]\ncase mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y✝ : M\nf✝ f : M →* P\nx y : Con.Quotient (ker f)\na✝ : M\nh :\n  (fun x => ↑(MonoidHom.mrangeRestrict (kerLift f)) x) (Quot.mk r a✝) =\n    (fun x => ↑(MonoidHom.mrangeRestrict (kerLift f)) x) y\n⊢ ↑(kerLift f) (Quot.mk r a✝) = ↑(kerLift f) y\n[PROOFSTEP]\nrcases y with ⟨⟩\n[GOAL]\ncase mk.mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y✝ : M\nf✝ f : M →* P\nx y : Con.Quotient (ker f)\na✝¹ a✝ : M\nh :\n  (fun x => ↑(MonoidHom.mrangeRestrict (kerLift f)) x) (Quot.mk r a✝¹) =\n    (fun x => ↑(MonoidHom.mrangeRestrict (kerLift f)) x) (Quot.mk r a✝)\n⊢ ↑(kerLift f) (Quot.mk r a✝¹) = ↑(kerLift f) (Quot.mk r a✝)\n[PROOFSTEP]\ninjections\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx y : M\nf✝ f : M →* P\nx✝ : { x // x ∈ MonoidHom.mrange (kerLift f) }\nw : P\nz : Con.Quotient (ker f)\nhz : ↑(kerLift f) z = w\n⊢ (fun x => ↑(MonoidHom.mrangeRestrict (kerLift f)) x) z = { val := w, property := (_ : ∃ y, ↑(kerLift f) y = w) }\n[PROOFSTEP]\nrcases hz with ⟨⟩\n[GOAL]\ncase refl\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx y : M\nf✝ f : M →* P\nx✝ : { x // x ∈ MonoidHom.mrange (kerLift f) }\nz : Con.Quotient (ker f)\n⊢ (fun x => ↑(MonoidHom.mrangeRestrict (kerLift f)) x) z =\n    { val := ↑(kerLift f) z, property := (_ : ∃ y, ↑(kerLift f) y = ↑(kerLift f) z) }\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y : M\nf✝ f : M →* P\ng : P → M\nhf : Function.RightInverse g ↑f\nsrc✝ : Con.Quotient (ker f) →* P := kerLift f\nx : Con.Quotient (ker f)\n⊢ ↑(kerLift f) ((toQuotient ∘ g) (↑(kerLift f) x)) = ↑(kerLift f) x\n[PROOFSTEP]\nrw [Function.comp_apply, kerLift_mk, hf]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y : M\nf✝ f : M →* P\ng : P → M\nhf : Function.RightInverse g ↑f\nsrc✝ : Con.Quotient (ker f) →* P := kerLift f\nx : P\n⊢ ↑(kerLift f) ((toQuotient ∘ g) x) = x\n[PROOFSTEP]\nconv_rhs => rw [← hf x]; rfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y : M\nf✝ f : M →* P\ng : P → M\nhf : Function.RightInverse g ↑f\nsrc✝ : Con.Quotient (ker f) →* P := kerLift f\nx : P\n| x\n[PROOFSTEP]\nrw [← hf x]; rfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y : M\nf✝ f : M →* P\ng : P → M\nhf : Function.RightInverse g ↑f\nsrc✝ : Con.Quotient (ker f) →* P := kerLift f\nx : P\n| x\n[PROOFSTEP]\nrw [← hf x]; rfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y : M\nf✝ f : M →* P\ng : P → M\nhf : Function.RightInverse g ↑f\nsrc✝ : Con.Quotient (ker f) →* P := kerLift f\nx : P\n| x\n[PROOFSTEP]\nrw [← hf x]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc : Con M\nx✝ y : M\nf✝ f : M →* P\ng : P → M\nhf : Function.RightInverse g ↑f\nsrc✝ : Con.Quotient (ker f) →* P := kerLift f\nx : P\n| ↑f (g x)\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc✝ : Con M\nx✝ y✝ : M\nf : M →* P\nc d : Con M\nh : c ≤ d\nsrc✝ : Quotient (Setoid.ker (Quot.mapRight h)) ≃ Quotient d.toSetoid :=\n  Setoid.quotientQuotientEquivQuotient c.toSetoid d.toSetoid h\nx y : Con.Quotient (ker (map c d h))\nw z : Con.Quotient c\na b : M\n⊢ Equiv.toFun\n      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      (↑↑a * ↑↑b) =\n    ↑(mk' d) a * ↑(mk' d) b\n[PROOFSTEP]\nrw [← d.mk'.map_mul]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nc✝ : Con M\nx✝ y✝ : M\nf : M →* P\nc d : Con M\nh : c ≤ d\nsrc✝ : Quotient (Setoid.ker (Quot.mapRight h)) ≃ Quotient d.toSetoid :=\n  Setoid.quotientQuotientEquivQuotient c.toSetoid d.toSetoid h\nx y : Con.Quotient (ker (map c d h))\nw z : Con.Quotient c\na b : M\n⊢ Equiv.toFun\n      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      (↑↑a * ↑↑b) =\n    ↑(mk' d) (a * b)\n[PROOFSTEP]\nrfl\n[GOAL]\nM✝ : Type u_1\nN : Type u_2\nP : Type u_3\nM : Type u_4\ninst✝ : Monoid M\nc : Con M\nw x : M\nx✝ : ↑c w x\n⊢ ↑c (w ^ 0) (x ^ 0)\n[PROOFSTEP]\nsimpa using c.refl _\n[GOAL]\nM✝ : Type u_1\nN : Type u_2\nP : Type u_3\nM : Type u_4\ninst✝ : Monoid M\nc : Con M\nn : ℕ\nw x : M\nh : ↑c w x\n⊢ ↑c (w ^ Nat.succ n) (x ^ Nat.succ n)\n[PROOFSTEP]\nsimpa [pow_succ] using c.mul h (Con.pow c n h)\n[GOAL]\nM✝ : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nM : Type u_5\ninst✝² : MulOneClass M\ninst✝¹ : SMul α M\ninst✝ : IsScalarTower α M M\nc : Con M\na : α\nw x : M\nh : ↑c w x\n⊢ ↑c (a • w) (a • x)\n[PROOFSTEP]\nsimpa only [smul_one_mul] using c.mul (c.refl' (a • (1 : M) : M)) h\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Group M\ninst✝¹ : Group N\ninst✝ : Group P\nc : Con M\nx y : M\nh : ↑c x y\n⊢ ↑c x⁻¹ y⁻¹\n[PROOFSTEP]\nsimpa using c.symm (c.mul (c.mul (c.refl x⁻¹) h) (c.refl y⁻¹))\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Group M\ninst✝¹ : Group N\ninst✝ : Group P\nc : Con M\nw x y z : M\nh1 : ↑c w x\nh2 : ↑c y z\n⊢ ↑c (w / y) (x / z)\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using c.mul h1 (c.inv h2)\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Group M\ninst✝¹ : Group N\ninst✝ : Group P\nc : Con M\nn : ℕ\nw x : M\nh : ↑c w x\n⊢ ↑c (w ^ Int.ofNat n) (x ^ Int.ofNat n)\n[PROOFSTEP]\nsimpa only [zpow_ofNat, Int.ofNat_eq_coe] using c.pow n h\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\ninst✝² : Group M\ninst✝¹ : Group N\ninst✝ : Group P\nc : Con M\nn : ℕ\nw x : M\nh : ↑c w x\n⊢ ↑c (w ^ Int.negSucc n) (x ^ Int.negSucc n)\n[PROOFSTEP]\nsimpa only [zpow_negSucc] using c.inv (c.pow _ h)\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\ninst✝ : Monoid M\nc : Con M\nu : (Con.Quotient c)ˣ\nf : (x y : M) → ↑c (x * y) 1 → ↑c (y * x) 1 → α\nHf :\n  ∀ (x y : M) (hxy : ↑c (x * y) 1) (hyx : ↑c (y * x) 1) (x' y' : M) (hxy' : ↑c (x' * y') 1) (hyx' : ↑c (y' * x') 1),\n    ↑c x x' → ↑c y y' → f x y hxy hyx = f x' y' hxy' hyx'\n⊢ α\n[PROOFSTEP]\nrefine'\n  @Con.hrecOn₂ M M _ _ c c (fun x y => x * y = 1 → y * x = 1 → α) (u : c.Quotient) (↑u⁻¹ : c.Quotient)\n    (fun (x y : M) (hxy : (x * y : c.Quotient) = 1) (hyx : (y * x : c.Quotient) = 1) => f x y (c.eq.1 hxy) (c.eq.1 hyx))\n    (fun x y x' y' hx hy => _) u.3 u.4\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\ninst✝ : Monoid M\nc : Con M\nu : (Con.Quotient c)ˣ\nf : (x y : M) → ↑c (x * y) 1 → ↑c (y * x) 1 → α\nHf :\n  ∀ (x y : M) (hxy : ↑c (x * y) 1) (hyx : ↑c (y * x) 1) (x' y' : M) (hxy' : ↑c (x' * y') 1) (hyx' : ↑c (y' * x') 1),\n    ↑c x x' → ↑c y y' → f x y hxy hyx = f x' y' hxy' hyx'\nx y x' y' : M\nhx : ↑c x x'\nhy : ↑c y y'\n⊢ HEq ((fun x y hxy hyx => f x y (_ : ↑c (x * y) 1) (_ : ↑c (y * x) 1)) x y)\n    ((fun x y hxy hyx => f x y (_ : ↑c (x * y) 1) (_ : ↑c (y * x) 1)) x' y')\n[PROOFSTEP]\nrefine' Function.hfunext _ _\n[GOAL]\ncase refine'_1\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\ninst✝ : Monoid M\nc : Con M\nu : (Con.Quotient c)ˣ\nf : (x y : M) → ↑c (x * y) 1 → ↑c (y * x) 1 → α\nHf :\n  ∀ (x y : M) (hxy : ↑c (x * y) 1) (hyx : ↑c (y * x) 1) (x' y' : M) (hxy' : ↑c (x' * y') 1) (hyx' : ↑c (y' * x') 1),\n    ↑c x x' → ↑c y y' → f x y hxy hyx = f x' y' hxy' hyx'\nx y x' y' : M\nhx : ↑c x x'\nhy : ↑c y y'\n⊢ (↑x * ↑y = 1) = (↑x' * ↑y' = 1)\ncase refine'_2\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\ninst✝ : Monoid M\nc : Con M\nu : (Con.Quotient c)ˣ\nf : (x y : M) → ↑c (x * y) 1 → ↑c (y * x) 1 → α\nHf :\n  ∀ (x y : M) (hxy : ↑c (x * y) 1) (hyx : ↑c (y * x) 1) (x' y' : M) (hxy' : ↑c (x' * y') 1) (hyx' : ↑c (y' * x') 1),\n    ↑c x x' → ↑c y y' → f x y hxy hyx = f x' y' hxy' hyx'\nx y x' y' : M\nhx : ↑c x x'\nhy : ↑c y y'\n⊢ ∀ (a : ↑x * ↑y = 1) (a' : ↑x' * ↑y' = 1),\n    HEq a a' →\n      HEq ((fun x y hxy hyx => f x y (_ : ↑c (x * y) 1) (_ : ↑c (y * x) 1)) x y a)\n        ((fun x y hxy hyx => f x y (_ : ↑c (x * y) 1) (_ : ↑c (y * x) 1)) x' y' a')\n[PROOFSTEP]\nrw [c.eq.2 hx, c.eq.2 hy]\n[GOAL]\ncase refine'_2\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\ninst✝ : Monoid M\nc : Con M\nu : (Con.Quotient c)ˣ\nf : (x y : M) → ↑c (x * y) 1 → ↑c (y * x) 1 → α\nHf :\n  ∀ (x y : M) (hxy : ↑c (x * y) 1) (hyx : ↑c (y * x) 1) (x' y' : M) (hxy' : ↑c (x' * y') 1) (hyx' : ↑c (y' * x') 1),\n    ↑c x x' → ↑c y y' → f x y hxy hyx = f x' y' hxy' hyx'\nx y x' y' : M\nhx : ↑c x x'\nhy : ↑c y y'\n⊢ ∀ (a : ↑x * ↑y = 1) (a' : ↑x' * ↑y' = 1),\n    HEq a a' →\n      HEq ((fun x y hxy hyx => f x y (_ : ↑c (x * y) 1) (_ : ↑c (y * x) 1)) x y a)\n        ((fun x y hxy hyx => f x y (_ : ↑c (x * y) 1) (_ : ↑c (y * x) 1)) x' y' a')\n[PROOFSTEP]\nrintro Hxy Hxy' -\n[GOAL]\ncase refine'_2\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\ninst✝ : Monoid M\nc : Con M\nu : (Con.Quotient c)ˣ\nf : (x y : M) → ↑c (x * y) 1 → ↑c (y * x) 1 → α\nHf :\n  ∀ (x y : M) (hxy : ↑c (x * y) 1) (hyx : ↑c (y * x) 1) (x' y' : M) (hxy' : ↑c (x' * y') 1) (hyx' : ↑c (y' * x') 1),\n    ↑c x x' → ↑c y y' → f x y hxy hyx = f x' y' hxy' hyx'\nx y x' y' : M\nhx : ↑c x x'\nhy : ↑c y y'\nHxy : ↑x * ↑y = 1\nHxy' : ↑x' * ↑y' = 1\n⊢ HEq ((fun x y hxy hyx => f x y (_ : ↑c (x * y) 1) (_ : ↑c (y * x) 1)) x y Hxy)\n    ((fun x y hxy hyx => f x y (_ : ↑c (x * y) 1) (_ : ↑c (y * x) 1)) x' y' Hxy')\n[PROOFSTEP]\nrefine' Function.hfunext _ _\n[GOAL]\ncase refine'_2.refine'_1\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\ninst✝ : Monoid M\nc : Con M\nu : (Con.Quotient c)ˣ\nf : (x y : M) → ↑c (x * y) 1 → ↑c (y * x) 1 → α\nHf :\n  ∀ (x y : M) (hxy : ↑c (x * y) 1) (hyx : ↑c (y * x) 1) (x' y' : M) (hxy' : ↑c (x' * y') 1) (hyx' : ↑c (y' * x') 1),\n    ↑c x x' → ↑c y y' → f x y hxy hyx = f x' y' hxy' hyx'\nx y x' y' : M\nhx : ↑c x x'\nhy : ↑c y y'\nHxy : ↑x * ↑y = 1\nHxy' : ↑x' * ↑y' = 1\n⊢ (↑y * ↑x = 1) = (↑y' * ↑x' = 1)\n[PROOFSTEP]\nrw [c.eq.2 hx, c.eq.2 hy]\n[GOAL]\ncase refine'_2.refine'_2\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\ninst✝ : Monoid M\nc : Con M\nu : (Con.Quotient c)ˣ\nf : (x y : M) → ↑c (x * y) 1 → ↑c (y * x) 1 → α\nHf :\n  ∀ (x y : M) (hxy : ↑c (x * y) 1) (hyx : ↑c (y * x) 1) (x' y' : M) (hxy' : ↑c (x' * y') 1) (hyx' : ↑c (y' * x') 1),\n    ↑c x x' → ↑c y y' → f x y hxy hyx = f x' y' hxy' hyx'\nx y x' y' : M\nhx : ↑c x x'\nhy : ↑c y y'\nHxy : ↑x * ↑y = 1\nHxy' : ↑x' * ↑y' = 1\n⊢ ∀ (a : ↑y * ↑x = 1) (a' : ↑y' * ↑x' = 1),\n    HEq a a' →\n      HEq ((fun x y hxy hyx => f x y (_ : ↑c (x * y) 1) (_ : ↑c (y * x) 1)) x y Hxy a)\n        ((fun x y hxy hyx => f x y (_ : ↑c (x * y) 1) (_ : ↑c (y * x) 1)) x' y' Hxy' a')\n[PROOFSTEP]\nrintro Hyx Hyx' -\n[GOAL]\ncase refine'_2.refine'_2\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\ninst✝ : Monoid M\nc : Con M\nu : (Con.Quotient c)ˣ\nf : (x y : M) → ↑c (x * y) 1 → ↑c (y * x) 1 → α\nHf :\n  ∀ (x y : M) (hxy : ↑c (x * y) 1) (hyx : ↑c (y * x) 1) (x' y' : M) (hxy' : ↑c (x' * y') 1) (hyx' : ↑c (y' * x') 1),\n    ↑c x x' → ↑c y y' → f x y hxy hyx = f x' y' hxy' hyx'\nx y x' y' : M\nhx : ↑c x x'\nhy : ↑c y y'\nHxy : ↑x * ↑y = 1\nHxy' : ↑x' * ↑y' = 1\nHyx : ↑y * ↑x = 1\nHyx' : ↑y' * ↑x' = 1\n⊢ HEq ((fun x y hxy hyx => f x y (_ : ↑c (x * y) 1) (_ : ↑c (y * x) 1)) x y Hxy Hyx)\n    ((fun x y hxy hyx => f x y (_ : ↑c (x * y) 1) (_ : ↑c (y * x) 1)) x' y' Hxy' Hyx')\n[PROOFSTEP]\nexact heq_of_eq (Hf _ _ _ _ _ _ _ _ hx hy)\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\ninst✝ : Monoid M\nc : Con M\np : (Con.Quotient c)ˣ → Prop\nu : (Con.Quotient c)ˣ\nH :\n  ∀ (x y : M) (hxy : ↑c (x * y) 1) (hyx : ↑c (y * x) 1),\n    p\n      { val := ↑x, inv := ↑y, val_inv := (_ : ↑((fun x x_1 => x * x_1) x y) = ↑1),\n        inv_val := (_ : ↑((fun x x_1 => x * x_1) y x) = ↑1) }\n⊢ p u\n[PROOFSTEP]\nrcases u with ⟨⟨x⟩, ⟨y⟩, h₁, h₂⟩\n[GOAL]\ncase mk.mk.mk\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\ninst✝ : Monoid M\nc : Con M\np : (Con.Quotient c)ˣ → Prop\nH :\n  ∀ (x y : M) (hxy : ↑c (x * y) 1) (hyx : ↑c (y * x) 1),\n    p\n      { val := ↑x, inv := ↑y, val_inv := (_ : ↑((fun x x_1 => x * x_1) x y) = ↑1),\n        inv_val := (_ : ↑((fun x x_1 => x * x_1) y x) = ↑1) }\nval✝ inv✝ : Con.Quotient c\nx y : M\nh₁ : Quot.mk r x * Quot.mk r y = 1\nh₂ : Quot.mk r y * Quot.mk r x = 1\n⊢ p { val := Quot.mk r x, inv := Quot.mk r y, val_inv := h₁, inv_val := h₂ }\n[PROOFSTEP]\nexact H x y (c.eq.1 h₁) (c.eq.1 h₂)\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Congruence", "llama_tokens": 32233, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7248702642896702, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3991189065753687}}
{"text": "[GOAL]\nn : ℕ\nα β γ : TypeVec n\nF : TypeVec n → Type v\ninst✝¹ : MvFunctor F\nP✝ : α ⟹ TypeVec.repeat n Prop\nR : α ⊗ α ⟹ TypeVec.repeat n Prop\ninst✝ : LawfulMvFunctor F\nP : F α → Prop\nq : F β → Prop\nf : α ⟹ β\ng : β ⟹ α\nh₀ : f ⊚ g = TypeVec.id\nh₁ : ∀ (u : F α), P u ↔ q (f <$$> u)\n⊢ (∃ u, P u) ↔ ∃ u, q u\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : ℕ\nα β γ : TypeVec n\nF : TypeVec n → Type v\ninst✝¹ : MvFunctor F\nP✝ : α ⟹ TypeVec.repeat n Prop\nR : α ⊗ α ⟹ TypeVec.repeat n Prop\ninst✝ : LawfulMvFunctor F\nP : F α → Prop\nq : F β → Prop\nf : α ⟹ β\ng : β ⟹ α\nh₀ : f ⊚ g = TypeVec.id\nh₁ : ∀ (u : F α), P u ↔ q (f <$$> u)\n⊢ (∃ u, P u) → ∃ u, q u\n[PROOFSTEP]\nrintro ⟨u, h₂⟩\n[GOAL]\ncase mpr\nn : ℕ\nα β γ : TypeVec n\nF : TypeVec n → Type v\ninst✝¹ : MvFunctor F\nP✝ : α ⟹ TypeVec.repeat n Prop\nR : α ⊗ α ⟹ TypeVec.repeat n Prop\ninst✝ : LawfulMvFunctor F\nP : F α → Prop\nq : F β → Prop\nf : α ⟹ β\ng : β ⟹ α\nh₀ : f ⊚ g = TypeVec.id\nh₁ : ∀ (u : F α), P u ↔ q (f <$$> u)\n⊢ (∃ u, q u) → ∃ u, P u\n[PROOFSTEP]\nrintro ⟨u, h₂⟩\n[GOAL]\ncase mp.intro\nn : ℕ\nα β γ : TypeVec n\nF : TypeVec n → Type v\ninst✝¹ : MvFunctor F\nP✝ : α ⟹ TypeVec.repeat n Prop\nR : α ⊗ α ⟹ TypeVec.repeat n Prop\ninst✝ : LawfulMvFunctor F\nP : F α → Prop\nq : F β → Prop\nf : α ⟹ β\ng : β ⟹ α\nh₀ : f ⊚ g = TypeVec.id\nh₁ : ∀ (u : F α), P u ↔ q (f <$$> u)\nu : F α\nh₂ : P u\n⊢ ∃ u, q u\n[PROOFSTEP]\nrefine ⟨f <$$> u, ?_⟩\n[GOAL]\ncase mp.intro\nn : ℕ\nα β γ : TypeVec n\nF : TypeVec n → Type v\ninst✝¹ : MvFunctor F\nP✝ : α ⟹ TypeVec.repeat n Prop\nR : α ⊗ α ⟹ TypeVec.repeat n Prop\ninst✝ : LawfulMvFunctor F\nP : F α → Prop\nq : F β → Prop\nf : α ⟹ β\ng : β ⟹ α\nh₀ : f ⊚ g = TypeVec.id\nh₁ : ∀ (u : F α), P u ↔ q (f <$$> u)\nu : F α\nh₂ : P u\n⊢ q (f <$$> u)\n[PROOFSTEP]\napply (h₁ u).mp h₂\n[GOAL]\ncase mpr.intro\nn : ℕ\nα β γ : TypeVec n\nF : TypeVec n → Type v\ninst✝¹ : MvFunctor F\nP✝ : α ⟹ TypeVec.repeat n Prop\nR : α ⊗ α ⟹ TypeVec.repeat n Prop\ninst✝ : LawfulMvFunctor F\nP : F α → Prop\nq : F β → Prop\nf : α ⟹ β\ng : β ⟹ α\nh₀ : f ⊚ g = TypeVec.id\nh₁ : ∀ (u : F α), P u ↔ q (f <$$> u)\nu : F β\nh₂ : q u\n⊢ ∃ u, P u\n[PROOFSTEP]\nrefine ⟨g <$$> u, ?_⟩\n[GOAL]\ncase mpr.intro\nn : ℕ\nα β γ : TypeVec n\nF : TypeVec n → Type v\ninst✝¹ : MvFunctor F\nP✝ : α ⟹ TypeVec.repeat n Prop\nR : α ⊗ α ⟹ TypeVec.repeat n Prop\ninst✝ : LawfulMvFunctor F\nP : F α → Prop\nq : F β → Prop\nf : α ⟹ β\ng : β ⟹ α\nh₀ : f ⊚ g = TypeVec.id\nh₁ : ∀ (u : F α), P u ↔ q (f <$$> u)\nu : F β\nh₂ : q u\n⊢ P (g <$$> u)\n[PROOFSTEP]\napply (h₁ _).mpr _\n[GOAL]\nn : ℕ\nα β γ : TypeVec n\nF : TypeVec n → Type v\ninst✝¹ : MvFunctor F\nP✝ : α ⟹ TypeVec.repeat n Prop\nR : α ⊗ α ⟹ TypeVec.repeat n Prop\ninst✝ : LawfulMvFunctor F\nP : F α → Prop\nq : F β → Prop\nf : α ⟹ β\ng : β ⟹ α\nh₀ : f ⊚ g = TypeVec.id\nh₁ : ∀ (u : F α), P u ↔ q (f <$$> u)\nu : F β\nh₂ : q u\n⊢ q (f <$$> g <$$> u)\n[PROOFSTEP]\nsimp only [MvFunctor.map_map, h₀, LawfulMvFunctor.id_map, h₂]\n[GOAL]\nn : ℕ\nα β γ : TypeVec n\nF : TypeVec n → Type v\ninst✝¹ : MvFunctor F\nP : α ⟹ TypeVec.repeat n Prop\nR : α ⊗ α ⟹ TypeVec.repeat n Prop\ninst✝ : LawfulMvFunctor F\nx : F α\n⊢ ∀ (u : F fun i => Subtype ((fun i x => ofRepeat (P i x)) i)),\n    (fun i => Subtype.val) <$$> u = x ↔ subtypeVal P <$$> toSubtype P <$$> u = x\n[PROOFSTEP]\nsimp [MvFunctor.map_map]\n[GOAL]\nn : ℕ\nα β γ : TypeVec n\nF : TypeVec n → Type v\ninst✝¹ : MvFunctor F\nP : α ⟹ TypeVec.repeat n Prop\nR : α ⊗ α ⟹ TypeVec.repeat n Prop\ninst✝ : LawfulMvFunctor F\nx y : F α\n⊢ ∀ (u : F fun i => { p // (fun i x y => ofRepeat (R i (prod.mk i x y))) i p.fst p.snd }),\n    (fun i t => (↑t).fst) <$$> u = x ∧ (fun i t => (↑t).snd) <$$> u = y ↔\n      (prod.fst ⊚ subtypeVal R) <$$> toSubtype' R <$$> u = x ∧ (prod.snd ⊚ subtypeVal R) <$$> toSubtype' R <$$> u = y\n[PROOFSTEP]\nsimp only [map_map, comp_assoc, subtypeVal_toSubtype']\n[GOAL]\nn : ℕ\nα β γ : TypeVec n\nF : TypeVec n → Type v\ninst✝¹ : MvFunctor F\nP : α ⟹ TypeVec.repeat n Prop\nR : α ⊗ α ⟹ TypeVec.repeat n Prop\ninst✝ : LawfulMvFunctor F\nx y : F α\n⊢ ∀ (u : F fun i => { p // (fun i x y => ofRepeat (R i (prod.mk i x y))) i p.fst p.snd }),\n    (fun i t => (↑t).fst) <$$> u = x ∧ (fun i t => (↑t).snd) <$$> u = y ↔\n      (prod.fst ⊚ fun i x => prod.mk i (↑x).fst (↑x).snd) <$$> u = x ∧\n        (prod.snd ⊚ fun i x => prod.mk i (↑x).fst (↑x).snd) <$$> u = y\n[PROOFSTEP]\nsimp [comp]\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα✝ : TypeVec n\nβ : Type u\npp : β → Prop\nx✝ : ℕ\nα : TypeVec x✝\ni : Fin2 x✝\nx : (fun i => { p_1 // ofRepeat (PredLast' α pp i p_1) }) (Fin2.fs i)\n⊢ ofRepeat (PredLast' α pp (Fin2.fs i) ↑x) = PredLast α pp ↑x\n[PROOFSTEP]\nsimp only [PredLast]\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα✝ : TypeVec n\nβ : Type u\npp : β → Prop\nx✝ : ℕ\nα : TypeVec x✝\ni : Fin2 x✝\nx : (fun i => { p_1 // ofRepeat (PredLast' α pp i p_1) }) (Fin2.fs i)\n⊢ ofRepeat (PredLast' α pp (Fin2.fs i) ↑x) = True\n[PROOFSTEP]\nerw [const_iff_true]\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα✝ : TypeVec n\nβ : Type u\npp : β → Prop\nx✝ : ℕ\nα : TypeVec x✝\ni : Fin2 x✝\nx : (fun i => { p_1 // PredLast α pp p_1 }) (Fin2.fs i)\n⊢ PredLast α pp ↑x = ofRepeat (PredLast' α pp (Fin2.fs i) ↑x)\n[PROOFSTEP]\nsimp only [PredLast]\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα✝ : TypeVec n\nβ : Type u\npp : β → Prop\nx✝ : ℕ\nα : TypeVec x✝\ni : Fin2 x✝\nx : (fun i => { p_1 // PredLast α pp p_1 }) (Fin2.fs i)\n⊢ True = ofRepeat (PredLast' α pp (Fin2.fs i) ↑x)\n[PROOFSTEP]\nerw [const_iff_true]\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx : F (α ::: β)\n⊢ LiftP' (PredLast' α P) x ↔ LiftP (PredLast α P) x\n[PROOFSTEP]\ndsimp only [LiftP, LiftP']\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx : F (α ::: β)\n⊢ (∃ u, (fun i => Subtype.val) <$$> u = x) ↔ ∃ u, (fun i => Subtype.val) <$$> u = x\n[PROOFSTEP]\napply exists_iff_exists_of_mono F (f _ n α) (g _ n α)\n[GOAL]\ncase h₀\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx : F (α ::: β)\n⊢ MvFunctor.f P n α ⊚ MvFunctor.g P n α = TypeVec.id\n[PROOFSTEP]\next i ⟨x, _⟩\n[GOAL]\ncase h₀.a.h.mk.a\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx✝ : F (α ::: β)\ni : Fin2 (n + 1)\nx : (α ::: β) i\nproperty✝ : PredLast α P x\n⊢ ↑((MvFunctor.f P n α ⊚ MvFunctor.g P n α) i { val := x, property := property✝ }) =\n    ↑(TypeVec.id i { val := x, property := property✝ })\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h₀.a.h.mk.a.fz\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx✝ : F (α ::: β)\nx : (α ::: β) Fin2.fz\nproperty✝ : PredLast α P x\n⊢ ↑((MvFunctor.f P n α ⊚ MvFunctor.g P n α) Fin2.fz { val := x, property := property✝ }) =\n    ↑(TypeVec.id Fin2.fz { val := x, property := property✝ })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₀.a.h.mk.a.fs\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx✝ : F (α ::: β)\na✝ : Fin2 (Nat.add n 0)\nx : (α ::: β) (Fin2.fs a✝)\nproperty✝ : PredLast α P x\n⊢ ↑((MvFunctor.f P n α ⊚ MvFunctor.g P n α) (Fin2.fs a✝) { val := x, property := property✝ }) =\n    ↑(TypeVec.id (Fin2.fs a✝) { val := x, property := property✝ })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₁\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx : F (α ::: β)\n⊢ ∀ (u : F fun i => { p_1 // ofRepeat (PredLast' α P i p_1) }),\n    (fun i => Subtype.val) <$$> u = x ↔ (fun i => Subtype.val) <$$> MvFunctor.f P n α <$$> u = x\n[PROOFSTEP]\nintros\n[GOAL]\ncase h₁\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (PredLast' α P i p_1) }\n⊢ (fun i => Subtype.val) <$$> u✝ = x ↔ (fun i => Subtype.val) <$$> MvFunctor.f P n α <$$> u✝ = x\n[PROOFSTEP]\nrw [MvFunctor.map_map]\n[GOAL]\ncase h₁\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (PredLast' α P i p_1) }\n⊢ (fun i => Subtype.val) <$$> u✝ = x ↔ ((fun i => Subtype.val) ⊚ MvFunctor.f P n α) <$$> u✝ = x\n[PROOFSTEP]\ndsimp [(· ⊚ ·)]\n[GOAL]\ncase h₁\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (PredLast' α P i p_1) }\n⊢ (fun i => Subtype.val) <$$> u✝ = x ↔ (fun i x => ↑(MvFunctor.f P n α i x)) <$$> u✝ = x\n[PROOFSTEP]\nsuffices (fun i => Subtype.val) = (fun i x => (MvFunctor.f P n α i x).val) by rw [this];\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (PredLast' α P i p_1) }\nthis : (fun i => Subtype.val) = fun i x => ↑(MvFunctor.f P n α i x)\n⊢ (fun i => Subtype.val) <$$> u✝ = x ↔ (fun i x => ↑(MvFunctor.f P n α i x)) <$$> u✝ = x\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase h₁\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (PredLast' α P i p_1) }\n⊢ (fun i => Subtype.val) = fun i x => ↑(MvFunctor.f P n α i x)\n[PROOFSTEP]\next i ⟨x, _⟩\n[GOAL]\ncase h₁.h.h.mk\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx✝ : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (PredLast' α P i p_1) }\ni : Fin2 (n + 1)\nx : (α ::: β) i\nproperty✝ : ofRepeat (PredLast' α P i x)\n⊢ ↑{ val := x, property := property✝ } = ↑(MvFunctor.f P n α i { val := x, property := property✝ })\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h₁.h.h.mk.fz\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx✝ : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (PredLast' α P i p_1) }\nx : (α ::: β) Fin2.fz\nproperty✝ : ofRepeat (PredLast' α P Fin2.fz x)\n⊢ ↑{ val := x, property := property✝ } = ↑(MvFunctor.f P n α Fin2.fz { val := x, property := property✝ })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₁.h.h.mk.fs\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ✝ : Type u\npp : β✝ → Prop\nβ : Type u\nP : β → Prop\nx✝ : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (PredLast' α P i p_1) }\na✝ : Fin2 (Nat.add n 0)\nx : (α ::: β) (Fin2.fs a✝)\nproperty✝ : ofRepeat (PredLast' α P (Fin2.fs a✝) x)\n⊢ ↑{ val := x, property := property✝ } = ↑(MvFunctor.f P n α (Fin2.fs a✝) { val := x, property := property✝ })\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα✝ : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ : ℕ\nα : TypeVec x✝\ni : Fin2 x✝\nx : (fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }) (Fin2.fs i)\n⊢ ofRepeat (RelLast' α rr (Fin2.fs i) (prod.mk (Fin2.fs i) (↑x).fst (↑x).snd)) = RelLast α rr (↑x).fst (↑x).snd\n[PROOFSTEP]\nsimp only [RelLast]\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα✝ : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ : ℕ\nα : TypeVec x✝\ni : Fin2 x✝\nx : (fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }) (Fin2.fs i)\n⊢ ofRepeat (RelLast' α rr (Fin2.fs i) (prod.mk (Fin2.fs i) (↑x).fst (↑x).snd)) = ((↑x).fst = (↑x).snd)\n[PROOFSTEP]\nerw [repeatEq_iff_eq]\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα✝ : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ : ℕ\nα : TypeVec x✝\ni : Fin2 x✝\nx : (fun i => { p_1 // RelLast α rr p_1.fst p_1.snd }) (Fin2.fs i)\n⊢ RelLast α rr (↑x).fst (↑x).snd = ofRepeat (RelLast' α rr (Fin2.fs i) (prod.mk (Fin2.fs i) (↑x).fst (↑x).snd))\n[PROOFSTEP]\nsimp only [RelLast]\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα✝ : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ : ℕ\nα : TypeVec x✝\ni : Fin2 x✝\nx : (fun i => { p_1 // RelLast α rr p_1.fst p_1.snd }) (Fin2.fs i)\n⊢ ((↑x).fst = (↑x).snd) = ofRepeat (RelLast' α rr (Fin2.fs i) (prod.mk (Fin2.fs i) (↑x).fst (↑x).snd))\n[PROOFSTEP]\nerw [repeatEq_iff_eq]\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx y : F (α ::: β)\n⊢ LiftR' (RelLast' α rr) x y ↔ LiftR (fun {i} => RelLast α rr) x y\n[PROOFSTEP]\ndsimp only [LiftR, LiftR']\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx y : F (α ::: β)\n⊢ (∃ u, (fun i t => (↑t).fst) <$$> u = x ∧ (fun i t => (↑t).snd) <$$> u = y) ↔\n    ∃ u, (fun i t => (↑t).fst) <$$> u = x ∧ (fun i t => (↑t).snd) <$$> u = y\n[PROOFSTEP]\napply exists_iff_exists_of_mono F (f' rr _ _) (g' rr _ _)\n[GOAL]\ncase h₀\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx y : F (α ::: β)\n⊢ MvFunctor.f' rr n α ⊚ MvFunctor.g' rr n α = TypeVec.id\n[PROOFSTEP]\next i ⟨x, _⟩ : 2\n[GOAL]\ncase h₀.a.h.mk\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ y : F (α ::: β)\ni : Fin2 (n + 1)\nx : (α ::: β) i × (α ::: β) i\nproperty✝ : RelLast α rr x.fst x.snd\n⊢ (MvFunctor.f' rr n α ⊚ MvFunctor.g' rr n α) i { val := x, property := property✝ } =\n    TypeVec.id i { val := x, property := property✝ }\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h₀.a.h.mk.fz\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ y : F (α ::: β)\nx : (α ::: β) Fin2.fz × (α ::: β) Fin2.fz\nproperty✝ : RelLast α rr x.fst x.snd\n⊢ (MvFunctor.f' rr n α ⊚ MvFunctor.g' rr n α) Fin2.fz { val := x, property := property✝ } =\n    TypeVec.id Fin2.fz { val := x, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₀.a.h.mk.fs\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ y : F (α ::: β)\na✝ : Fin2 (Nat.add n 0)\nx : (α ::: β) (Fin2.fs a✝) × (α ::: β) (Fin2.fs a✝)\nproperty✝ : RelLast α rr x.fst x.snd\n⊢ (MvFunctor.f' rr n α ⊚ MvFunctor.g' rr n α) (Fin2.fs a✝) { val := x, property := property✝ } =\n    TypeVec.id (Fin2.fs a✝) { val := x, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₁\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx y : F (α ::: β)\n⊢ ∀ (u : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }),\n    (fun i t => (↑t).fst) <$$> u = x ∧ (fun i t => (↑t).snd) <$$> u = y ↔\n      (fun i t => (↑t).fst) <$$> MvFunctor.f' rr n α <$$> u = x ∧\n        (fun i t => (↑t).snd) <$$> MvFunctor.f' rr n α <$$> u = y\n[PROOFSTEP]\nintros\n[GOAL]\ncase h₁\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\n⊢ (fun i t => (↑t).fst) <$$> u✝ = x ∧ (fun i t => (↑t).snd) <$$> u✝ = y ↔\n    (fun i t => (↑t).fst) <$$> MvFunctor.f' rr n α <$$> u✝ = x ∧\n      (fun i t => (↑t).snd) <$$> MvFunctor.f' rr n α <$$> u✝ = y\n[PROOFSTEP]\nsimp [MvFunctor.map_map, (· ⊚ ·)]\n  -- porting note: proof was\n      -- rw [MvFunctor.map_map, MvFunctor.map_map, (· ⊚ ·), (· ⊚ ·)]\n      -- congr <;> ext i ⟨x, _⟩ <;> cases i <;> rfl\n[GOAL]\ncase h₁\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\n⊢ (fun i t => (↑t).fst) <$$> u✝ = x ∧ (fun i t => (↑t).snd) <$$> u✝ = y ↔\n    (fun i x => (↑(MvFunctor.f' rr n α i x)).fst) <$$> u✝ = x ∧\n      (fun i x => (↑(MvFunctor.f' rr n α i x)).snd) <$$> u✝ = y\n[PROOFSTEP]\nsuffices\n  (fun i t => t.val.fst) = ((fun i x => (MvFunctor.f' rr n α i x).val.fst)) ∧\n    (fun i t => t.val.snd) = ((fun i x => (MvFunctor.f' rr n α i x).val.snd))\n  by\n  rcases this with ⟨left, right⟩\n  rw [left, right];\n[GOAL]\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\nthis :\n  ((fun i t => (↑t).fst) = fun i x => (↑(MvFunctor.f' rr n α i x)).fst) ∧\n    (fun i t => (↑t).snd) = fun i x => (↑(MvFunctor.f' rr n α i x)).snd\n⊢ (fun i t => (↑t).fst) <$$> u✝ = x ∧ (fun i t => (↑t).snd) <$$> u✝ = y ↔\n    (fun i x => (↑(MvFunctor.f' rr n α i x)).fst) <$$> u✝ = x ∧\n      (fun i x => (↑(MvFunctor.f' rr n α i x)).snd) <$$> u✝ = y\n[PROOFSTEP]\nrcases this with ⟨left, right⟩\n[GOAL]\ncase intro\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\nleft : (fun i t => (↑t).fst) = fun i x => (↑(MvFunctor.f' rr n α i x)).fst\nright : (fun i t => (↑t).snd) = fun i x => (↑(MvFunctor.f' rr n α i x)).snd\n⊢ (fun i t => (↑t).fst) <$$> u✝ = x ∧ (fun i t => (↑t).snd) <$$> u✝ = y ↔\n    (fun i x => (↑(MvFunctor.f' rr n α i x)).fst) <$$> u✝ = x ∧\n      (fun i x => (↑(MvFunctor.f' rr n α i x)).snd) <$$> u✝ = y\n[PROOFSTEP]\nrw [left, right]\n[GOAL]\ncase h₁\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\n⊢ ((fun i t => (↑t).fst) = fun i x => (↑(MvFunctor.f' rr n α i x)).fst) ∧\n    (fun i t => (↑t).snd) = fun i x => (↑(MvFunctor.f' rr n α i x)).snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h₁.left\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\n⊢ (fun i t => (↑t).fst) = fun i x => (↑(MvFunctor.f' rr n α i x)).fst\n[PROOFSTEP]\next i ⟨x, _⟩\n[GOAL]\ncase h₁.right\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\n⊢ (fun i t => (↑t).snd) = fun i x => (↑(MvFunctor.f' rr n α i x)).snd\n[PROOFSTEP]\next i ⟨x, _⟩\n[GOAL]\ncase h₁.left.h.h.mk\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\ni : Fin2 (n + 1)\nx : (α ::: β) i × (α ::: β) i\nproperty✝ : ofRepeat (RelLast' α rr i (prod.mk i x.fst x.snd))\n⊢ (↑{ val := x, property := property✝ }).fst = (↑(MvFunctor.f' rr n α i { val := x, property := property✝ })).fst\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h₁.right.h.h.mk\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\ni : Fin2 (n + 1)\nx : (α ::: β) i × (α ::: β) i\nproperty✝ : ofRepeat (RelLast' α rr i (prod.mk i x.fst x.snd))\n⊢ (↑{ val := x, property := property✝ }).snd = (↑(MvFunctor.f' rr n α i { val := x, property := property✝ })).snd\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h₁.left.h.h.mk.fz\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\nx : (α ::: β) Fin2.fz × (α ::: β) Fin2.fz\nproperty✝ : ofRepeat (RelLast' α rr Fin2.fz (prod.mk Fin2.fz x.fst x.snd))\n⊢ (↑{ val := x, property := property✝ }).fst = (↑(MvFunctor.f' rr n α Fin2.fz { val := x, property := property✝ })).fst\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₁.left.h.h.mk.fs\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\na✝ : Fin2 (Nat.add n 0)\nx : (α ::: β) (Fin2.fs a✝) × (α ::: β) (Fin2.fs a✝)\nproperty✝ : ofRepeat (RelLast' α rr (Fin2.fs a✝) (prod.mk (Fin2.fs a✝) x.fst x.snd))\n⊢ (↑{ val := x, property := property✝ }).fst =\n    (↑(MvFunctor.f' rr n α (Fin2.fs a✝) { val := x, property := property✝ })).fst\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₁.right.h.h.mk.fz\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\nx : (α ::: β) Fin2.fz × (α ::: β) Fin2.fz\nproperty✝ : ofRepeat (RelLast' α rr Fin2.fz (prod.mk Fin2.fz x.fst x.snd))\n⊢ (↑{ val := x, property := property✝ }).snd = (↑(MvFunctor.f' rr n α Fin2.fz { val := x, property := property✝ })).snd\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₁.right.h.h.mk.fs\nn : ℕ\nF : TypeVec (n + 1) → Type u_1\ninst✝¹ : MvFunctor F\ninst✝ : LawfulMvFunctor F\nα : TypeVec n\nβ : Type u\npp : β → Prop\nrr : β → β → Prop\nx✝ y : F (α ::: β)\nu✝ : F fun i => { p_1 // ofRepeat (RelLast' α rr i (prod.mk i p_1.fst p_1.snd)) }\na✝ : Fin2 (Nat.add n 0)\nx : (α ::: β) (Fin2.fs a✝) × (α ::: β) (Fin2.fs a✝)\nproperty✝ : ofRepeat (RelLast' α rr (Fin2.fs a✝) (prod.mk (Fin2.fs a✝) x.fst x.snd))\n⊢ (↑{ val := x, property := property✝ }).snd =\n    (↑(MvFunctor.f' rr n α (Fin2.fs a✝) { val := x, property := property✝ })).snd\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Control.Functor.Multivariate", "llama_tokens": 12408, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802603710086, "lm_q2_score": 0.5964331462646255, "lm_q1q2_score": 0.39894235816738255}}
{"text": "[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\n⊢ evariance X μ < ⊤\n[PROOFSTEP]\nhave := ENNReal.pow_lt_top (hX.sub <| memℒp_const <| μ[X]).2 2\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\nthis : snorm (X - fun x => ∫ (x : Ω), X x ∂μ) 2 μ ^ 2 < ⊤\n⊢ evariance X μ < ⊤\n[PROOFSTEP]\nrw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top, ← ENNReal.rpow_two] at this \n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\nthis : ((∫⁻ (x : Ω), ↑‖(X - fun x => ∫ (x : Ω), X x ∂μ) x‖₊ ^ ENNReal.toReal 2 ∂μ) ^ (1 / ENNReal.toReal 2)) ^ 2 < ⊤\n⊢ evariance X μ < ⊤\n[PROOFSTEP]\nsimp only [coe_two, Pi.sub_apply, ENNReal.one_toReal, one_div] at this \n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\nthis : ((∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ) ^ 2⁻¹) ^ 2 < ⊤\n⊢ evariance X μ < ⊤\n[PROOFSTEP]\nrw [← ENNReal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 : ℝ) ≠ 0), ENNReal.rpow_one] at this \n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\nthis : ∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ < ⊤\n⊢ evariance X μ < ⊤\n[PROOFSTEP]\nsimp_rw [ENNReal.rpow_two] at this \n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\nthis : ∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ < ⊤\n⊢ evariance X μ < ⊤\n[PROOFSTEP]\nexact this\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhXm : AEStronglyMeasurable X μ\nhX : ¬Memℒp X 2\n⊢ evariance X μ = ⊤\n[PROOFSTEP]\nby_contra h\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhXm : AEStronglyMeasurable X μ\nhX : ¬Memℒp X 2\nh : ¬evariance X μ = ⊤\n⊢ False\n[PROOFSTEP]\nrw [← Ne.def, ← lt_top_iff_ne_top] at h \n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhXm : AEStronglyMeasurable X μ\nhX : ¬Memℒp X 2\nh : evariance X μ < ⊤\n⊢ False\n[PROOFSTEP]\nhave : Memℒp (fun ω => X ω - μ[X]) 2 μ :=\n  by\n  refine' ⟨hXm.sub aestronglyMeasurable_const, _⟩\n  rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top]\n  simp only [coe_two, ENNReal.one_toReal, ENNReal.rpow_two, Ne.def]\n  exact ENNReal.rpow_lt_top_of_nonneg (by linarith) h.ne\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhXm : AEStronglyMeasurable X μ\nhX : ¬Memℒp X 2\nh : evariance X μ < ⊤\n⊢ Memℒp (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2\n[PROOFSTEP]\nrefine' ⟨hXm.sub aestronglyMeasurable_const, _⟩\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhXm : AEStronglyMeasurable X μ\nhX : ¬Memℒp X 2\nh : evariance X μ < ⊤\n⊢ snorm (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2 μ < ⊤\n[PROOFSTEP]\nrw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhXm : AEStronglyMeasurable X μ\nhX : ¬Memℒp X 2\nh : evariance X μ < ⊤\n⊢ (∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ ENNReal.toReal 2 ∂μ) ^ (1 / ENNReal.toReal 2) < ⊤\n[PROOFSTEP]\nsimp only [coe_two, ENNReal.one_toReal, ENNReal.rpow_two, Ne.def]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhXm : AEStronglyMeasurable X μ\nhX : ¬Memℒp X 2\nh : evariance X μ < ⊤\n⊢ (∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ) ^ (1 / 2) < ⊤\n[PROOFSTEP]\nexact ENNReal.rpow_lt_top_of_nonneg (by linarith) h.ne\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhXm : AEStronglyMeasurable X μ\nhX : ¬Memℒp X 2\nh : evariance X μ < ⊤\n⊢ 0 ≤ 1 / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhXm : AEStronglyMeasurable X μ\nhX : ¬Memℒp X 2\nh : evariance X μ < ⊤\nthis : Memℒp (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2\n⊢ False\n[PROOFSTEP]\nrefine'\n  hX\n    _\n      -- Porting note: `μ[X]` without whitespace is ambiguous as it could be GetElem,\n        -- and `convert` cannot disambiguate based on typeclass inference failure.\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhXm : AEStronglyMeasurable X μ\nhX : ¬Memℒp X 2\nh : evariance X μ < ⊤\nthis : Memℒp (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2\n⊢ Memℒp X 2\n[PROOFSTEP]\nconvert this.add (memℒp_const <| μ [X])\n[GOAL]\ncase h.e'_5\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhXm : AEStronglyMeasurable X μ\nhX : ¬Memℒp X 2\nh : evariance X μ < ⊤\nthis : Memℒp (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2\n⊢ X = (fun ω => X ω - ∫ (x : Ω), X x ∂μ) + fun x => ∫ (x : Ω), X x ∂μ\n[PROOFSTEP]\next ω\n[GOAL]\ncase h.e'_5.h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhXm : AEStronglyMeasurable X μ\nhX : ¬Memℒp X 2\nh : evariance X μ < ⊤\nthis : Memℒp (fun ω => X ω - ∫ (x : Ω), X x ∂μ) 2\nω : Ω\n⊢ X ω = ((fun ω => X ω - ∫ (x : Ω), X x ∂μ) + fun x => ∫ (x : Ω), X x ∂μ) ω\n[PROOFSTEP]\nrw [Pi.add_apply, sub_add_cancel]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : AEStronglyMeasurable X μ\n⊢ evariance X μ < ⊤ ↔ Memℒp X 2\n[PROOFSTEP]\nrefine' ⟨_, MeasureTheory.Memℒp.evariance_lt_top⟩\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : AEStronglyMeasurable X μ\n⊢ evariance X μ < ⊤ → Memℒp X 2\n[PROOFSTEP]\ncontrapose\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : AEStronglyMeasurable X μ\n⊢ ¬Memℒp X 2 → ¬evariance X μ < ⊤\n[PROOFSTEP]\nrw [not_lt, top_le_iff]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : AEStronglyMeasurable X μ\n⊢ ¬Memℒp X 2 → evariance X μ = ⊤\n[PROOFSTEP]\nexact evariance_eq_top hX\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\n⊢ ENNReal.ofReal (variance X μ) = evariance X μ\n[PROOFSTEP]\nrw [variance, ENNReal.ofReal_toReal]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\n⊢ evariance X μ ≠ ⊤\n[PROOFSTEP]\nexact hX.evariance_lt_top.ne\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nX : Ω → ℝ\nμ : Measure Ω\n⊢ evariance X μ = ∫⁻ (ω : Ω), ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2) ∂μ\n[PROOFSTEP]\nrw [evariance]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nX : Ω → ℝ\nμ : Measure Ω\n⊢ ∫⁻ (ω : Ω), ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ = ∫⁻ (ω : Ω), ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2) ∂μ\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nX : Ω → ℝ\nμ : Measure Ω\n⊢ (fun ω => ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2) = fun ω => ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2)\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase e_f.h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n⊢ ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 = ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2)\n[PROOFSTEP]\nrw [pow_two, ← ENNReal.coe_mul, ← nnnorm_mul, ← pow_two]\n[GOAL]\ncase e_f.h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n⊢ ↑‖(X ω - ∫ (x : Ω), X x ∂μ) ^ 2‖₊ = ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f.h.e_a\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n⊢ ‖(X ω - ∫ (x : Ω), X x ∂μ) ^ 2‖₊ = Real.toNNReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2)\n[PROOFSTEP]\nexact (Real.toNNReal_eq_nnnorm_of_nonneg <| sq_nonneg _).symm\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : Memℒp X 2\nhXint : ∫ (x : Ω), X x ∂μ = 0\n⊢ variance X μ = ∫ (x : Ω), (X ^ 2) x ∂μ\n[PROOFSTEP]\nrw [variance, evariance_eq_lintegral_ofReal, ← ofReal_integral_eq_lintegral_ofReal, ENNReal.toReal_ofReal]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : Memℒp X 2\nhXint : ∫ (x : Ω), X x ∂μ = 0\n⊢ ∫ (x : Ω), (X x - ∫ (x : Ω), X x ∂μ) ^ 2 ∂μ = ∫ (x : Ω), (X ^ 2) x ∂μ\n[PROOFSTEP]\nsimp_rw [hXint, sub_zero]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : Memℒp X 2\nhXint : ∫ (x : Ω), X x ∂μ = 0\n⊢ 0 ≤ ∫ (x : Ω), (X x - ∫ (x : Ω), X x ∂μ) ^ 2 ∂μ\n[PROOFSTEP]\nsimp_rw [hXint, sub_zero]\n[GOAL]\ncase hfi\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : Memℒp X 2\nhXint : ∫ (x : Ω), X x ∂μ = 0\n⊢ Integrable fun ω => (X ω - ∫ (x : Ω), X x ∂μ) ^ 2\n[PROOFSTEP]\nsimp_rw [hXint, sub_zero]\n[GOAL]\ncase f_nn\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : Memℒp X 2\nhXint : ∫ (x : Ω), X x ∂μ = 0\n⊢ 0 ≤ᵐ[μ] fun ω => (X ω - ∫ (x : Ω), X x ∂μ) ^ 2\n[PROOFSTEP]\nsimp_rw [hXint, sub_zero]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : Memℒp X 2\nhXint : ∫ (x : Ω), X x ∂μ = 0\n⊢ ∫ (x : Ω), X x ^ 2 ∂μ = ∫ (x : Ω), (X ^ 2) x ∂μ\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : Memℒp X 2\nhXint : ∫ (x : Ω), X x ∂μ = 0\n⊢ 0 ≤ ∫ (x : Ω), X x ^ 2 ∂μ\n[PROOFSTEP]\nexact integral_nonneg fun ω => pow_two_nonneg _\n[GOAL]\ncase hfi\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : Memℒp X 2\nhXint : ∫ (x : Ω), X x ∂μ = 0\n⊢ Integrable fun ω => X ω ^ 2\n[PROOFSTEP]\nconvert hX.integrable_norm_rpow two_ne_zero ENNReal.two_ne_top with ω\n[GOAL]\ncase h.e'_5.h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : Memℒp X 2\nhXint : ∫ (x : Ω), X x ∂μ = 0\nω : Ω\n⊢ X ω ^ 2 = ‖X ω‖ ^ ENNReal.toReal 2\n[PROOFSTEP]\nsimp only [Pi.sub_apply, Real.norm_eq_abs, coe_two, ENNReal.one_toReal, Real.rpow_two, sq_abs, abs_pow]\n[GOAL]\ncase f_nn\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : Memℒp X 2\nhXint : ∫ (x : Ω), X x ∂μ = 0\n⊢ 0 ≤ᵐ[μ] fun ω => X ω ^ 2\n[PROOFSTEP]\nexact ae_of_all _ fun ω => pow_two_nonneg _\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\n⊢ variance X μ = ∫ (x : Ω), ((X - fun x => ∫ (x : Ω), X x ∂μ) ^ 2) x ∂μ\n[PROOFSTEP]\nrw [variance, evariance_eq_lintegral_ofReal, ← ofReal_integral_eq_lintegral_ofReal, ENNReal.toReal_ofReal]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\n⊢ ∫ (x : Ω), (X x - ∫ (x : Ω), X x ∂μ) ^ 2 ∂μ = ∫ (x : Ω), ((X - fun x => ∫ (x : Ω), X x ∂μ) ^ 2) x ∂μ\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\n⊢ 0 ≤ ∫ (x : Ω), (X x - ∫ (x : Ω), X x ∂μ) ^ 2 ∂μ\n[PROOFSTEP]\nexact integral_nonneg fun ω => pow_two_nonneg _\n[GOAL]\ncase hfi\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\n⊢ Integrable fun ω => (X ω - ∫ (x : Ω), X x ∂μ) ^ 2\n[PROOFSTEP]\nconvert (hX.sub <| memℒp_const (μ [X])).integrable_norm_rpow two_ne_zero ENNReal.two_ne_top with ω\n[GOAL]\ncase h.e'_5.h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\nω : Ω\n⊢ (X ω - ∫ (x : Ω), X x ∂μ) ^ 2 = ‖(X - fun x => ∫ (x : Ω), X x ∂μ) ω‖ ^ ENNReal.toReal 2\n[PROOFSTEP]\nsimp only [Pi.sub_apply, Real.norm_eq_abs, coe_two, ENNReal.one_toReal, Real.rpow_two, sq_abs, abs_pow]\n[GOAL]\ncase f_nn\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\n⊢ 0 ≤ᵐ[μ] fun ω => (X ω - ∫ (x : Ω), X x ∂μ) ^ 2\n[PROOFSTEP]\nexact ae_of_all _ fun ω => pow_two_nonneg _\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\n⊢ evariance 0 μ = 0\n[PROOFSTEP]\nsimp [evariance]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : AEMeasurable X\n⊢ evariance X μ = 0 ↔ X =ᵐ[μ] fun x => ∫ (x : Ω), X x ∂μ\n[PROOFSTEP]\nrw [evariance, lintegral_eq_zero_iff']\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : AEMeasurable X\n⊢ (fun ω => ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2) =ᵐ[μ] 0 ↔ X =ᵐ[μ] fun x => ∫ (x : Ω), X x ∂μ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : AEMeasurable X\n⊢ (fun ω => ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2) =ᵐ[μ] 0 → X =ᵐ[μ] fun x => ∫ (x : Ω), X x ∂μ\n[PROOFSTEP]\nintro hX\n[GOAL]\ncase mpr\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : AEMeasurable X\n⊢ (X =ᵐ[μ] fun x => ∫ (x : Ω), X x ∂μ) → (fun ω => ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2) =ᵐ[μ] 0\n[PROOFSTEP]\nintro hX\n[GOAL]\ncase mp\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX✝ : AEMeasurable X\nhX : (fun ω => ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2) =ᵐ[μ] 0\n⊢ X =ᵐ[μ] fun x => ∫ (x : Ω), X x ∂μ\n[PROOFSTEP]\nfilter_upwards [hX] with ω hω\n[GOAL]\ncase mpr\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX✝ : AEMeasurable X\nhX : X =ᵐ[μ] fun x => ∫ (x : Ω), X x ∂μ\n⊢ (fun ω => ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2) =ᵐ[μ] 0\n[PROOFSTEP]\nfilter_upwards [hX] with ω hω\n[GOAL]\ncase h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX✝ : AEMeasurable X\nhX : (fun ω => ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2) =ᵐ[μ] 0\nω : Ω\nhω : ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 = OfNat.ofNat 0 ω\n⊢ X ω = ∫ (x : Ω), X x ∂μ\n[PROOFSTEP]\nsimp only [Pi.zero_apply, pow_eq_zero_iff, Nat.succ_pos', ENNReal.coe_eq_zero, nnnorm_eq_zero, sub_eq_zero] at hω \n[GOAL]\ncase h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX✝ : AEMeasurable X\nhX : (fun ω => ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2) =ᵐ[μ] 0\nω : Ω\nhω : X ω = ∫ (x : Ω), X x ∂μ\n⊢ X ω = ∫ (x : Ω), X x ∂μ\n[PROOFSTEP]\nexact hω\n[GOAL]\ncase h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX✝ : AEMeasurable X\nhX : X =ᵐ[μ] fun x => ∫ (x : Ω), X x ∂μ\nω : Ω\nhω : X ω = ∫ (x : Ω), X x ∂μ\n⊢ ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 = OfNat.ofNat 0 ω\n[PROOFSTEP]\nrw [hω]\n[GOAL]\ncase h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX✝ : AEMeasurable X\nhX : X =ᵐ[μ] fun x => ∫ (x : Ω), X x ∂μ\nω : Ω\nhω : X ω = ∫ (x : Ω), X x ∂μ\n⊢ ↑‖∫ (x : Ω), X x ∂μ - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 = OfNat.ofNat 0 ω\n[PROOFSTEP]\nsimp\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ : Measure Ω\nhX : AEMeasurable X\n⊢ AEMeasurable fun ω => ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2\n[PROOFSTEP]\nmeasurability\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\n⊢ evariance (fun ω => c * X ω) μ = ENNReal.ofReal (c ^ 2) * evariance X μ\n[PROOFSTEP]\nrw [evariance, evariance, ← lintegral_const_mul' _ _ ENNReal.ofReal_lt_top.ne]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\n⊢ ∫⁻ (ω : Ω), ↑‖c * X ω - ∫ (x : Ω), c * X x ∂μ‖₊ ^ 2 ∂μ =\n    ∫⁻ (a : Ω), ENNReal.ofReal (c ^ 2) * ↑‖X a - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\n⊢ (fun ω => ↑‖c * X ω - ∫ (x : Ω), c * X x ∂μ‖₊ ^ 2) = fun a => ENNReal.ofReal (c ^ 2) * ↑‖X a - ∫ (x : Ω), X x ∂μ‖₊ ^ 2\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase e_f.h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n⊢ ↑‖c * X ω - ∫ (x : Ω), c * X x ∂μ‖₊ ^ 2 = ENNReal.ofReal (c ^ 2) * ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2\n[PROOFSTEP]\nrw [ENNReal.ofReal, ← ENNReal.coe_pow, ← ENNReal.coe_pow, ← ENNReal.coe_mul]\n[GOAL]\ncase e_f.h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n⊢ ↑(‖c * X ω - ∫ (x : Ω), c * X x ∂μ‖₊ ^ 2) = ↑(Real.toNNReal (c ^ 2) * ‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f.h.e_a\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n⊢ ‖c * X ω - ∫ (x : Ω), c * X x ∂μ‖₊ ^ 2 = Real.toNNReal (c ^ 2) * ‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2\n[PROOFSTEP]\nrw [← sq_abs, ← Real.rpow_two, Real.toNNReal_rpow_of_nonneg (abs_nonneg _), NNReal.rpow_two, ← mul_pow,\n  Real.toNNReal_mul_nnnorm _ (abs_nonneg _)]\n[GOAL]\ncase e_f.h.e_a\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n⊢ ‖c * X ω - ∫ (x : Ω), c * X x ∂μ‖₊ ^ 2 = ‖|c| * (X ω - ∫ (x : Ω), X x ∂μ)‖₊ ^ 2\n[PROOFSTEP]\nconv_rhs => rw [← nnnorm_norm, norm_mul, norm_abs_eq_norm, ← norm_mul, nnnorm_norm, mul_sub]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n| ‖|c| * (X ω - ∫ (x : Ω), X x ∂μ)‖₊ ^ 2\n[PROOFSTEP]\nrw [← nnnorm_norm, norm_mul, norm_abs_eq_norm, ← norm_mul, nnnorm_norm, mul_sub]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n| ‖|c| * (X ω - ∫ (x : Ω), X x ∂μ)‖₊ ^ 2\n[PROOFSTEP]\nrw [← nnnorm_norm, norm_mul, norm_abs_eq_norm, ← norm_mul, nnnorm_norm, mul_sub]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n| ‖|c| * (X ω - ∫ (x : Ω), X x ∂μ)‖₊ ^ 2\n[PROOFSTEP]\nrw [← nnnorm_norm, norm_mul, norm_abs_eq_norm, ← norm_mul, nnnorm_norm, mul_sub]\n[GOAL]\ncase e_f.h.e_a\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n⊢ ‖c * X ω - ∫ (x : Ω), c * X x ∂μ‖₊ ^ 2 = ‖c * X ω - c * ∫ (x : Ω), X x ∂μ‖₊ ^ 2\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f.h.e_a.e_a.e_a.e_a\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n⊢ ∫ (x : Ω), c * X x ∂μ = c * ∫ (x : Ω), X x ∂μ\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase e_f.h.e_a.e_a.e_a.e_a\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\nω : Ω\n⊢ ∫ (x : Ω), c * X x ∂μ = (∫ (x : Ω), X x ∂μ) * c\n[PROOFSTEP]\nsimp_rw [← smul_eq_mul, ← integral_smul_const, smul_eq_mul, mul_comm]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX : Ω → ℝ\nμ✝ μ : Measure Ω\n⊢ variance 0 μ = 0\n[PROOFSTEP]\nsimp only [variance, evariance_zero, ENNReal.zero_toReal]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\n⊢ variance (fun ω => c * X ω) μ = c ^ 2 * variance X μ\n[PROOFSTEP]\nrw [variance, evariance_mul, ENNReal.toReal_mul, ENNReal.toReal_ofReal (sq_nonneg _)]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nc : ℝ\nX : Ω → ℝ\nμ : Measure Ω\n⊢ c ^ 2 * ENNReal.toReal (evariance (fun ω => X ω) μ) = c ^ 2 * variance X μ\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nA : Type u_2\ninst✝¹ : CommSemiring A\ninst✝ : Algebra A ℝ\nc : A\nX : Ω → ℝ\nμ : Measure Ω\n⊢ variance (c • X) μ = c ^ 2 • variance X μ\n[PROOFSTEP]\nconvert variance_smul (algebraMap A ℝ c) X μ using 1\n[GOAL]\ncase h.e'_2\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nA : Type u_2\ninst✝¹ : CommSemiring A\ninst✝ : Algebra A ℝ\nc : A\nX : Ω → ℝ\nμ : Measure Ω\n⊢ variance (c • X) μ = variance (↑(algebraMap A ℝ) c • X) μ\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_2.e_X\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nA : Type u_2\ninst✝¹ : CommSemiring A\ninst✝ : Algebra A ℝ\nc : A\nX : Ω → ℝ\nμ : Measure Ω\n⊢ c • X = ↑(algebraMap A ℝ) c • X\n[PROOFSTEP]\nsimp only [algebraMap_smul]\n[GOAL]\ncase h.e'_3\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ✝ : Measure Ω\nA : Type u_2\ninst✝¹ : CommSemiring A\ninst✝ : Algebra A ℝ\nc : A\nX : Ω → ℝ\nμ : Measure Ω\n⊢ c ^ 2 • variance X μ = ↑(algebraMap A ℝ) c ^ 2 * variance X μ\n[PROOFSTEP]\nsimp only [Algebra.smul_def, map_pow]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ variance X ℙ = (∫ (a : Ω), (X ^ 2) a) - (∫ (a : Ω), X a) ^ 2\n[PROOFSTEP]\nrw [hX.variance_eq, sub_sq', integral_sub', integral_add']\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ ((∫ (a : Ω), (X ^ 2) a) + ∫ (a : Ω), ((fun x => ∫ (x : Ω), X x) ^ 2) a) -\n      ∫ (a : Ω), (2 * X * fun x => ∫ (x : Ω), X x) a =\n    (∫ (a : Ω), (X ^ 2) a) - (∫ (a : Ω), X a) ^ 2\ncase hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ Integrable (X ^ 2)\ncase hg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ Integrable ((fun x => ∫ (x : Ω), X x) ^ 2)\ncase hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ Integrable (X ^ 2 + (fun x => ∫ (x : Ω), X x) ^ 2)\ncase hg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ Integrable (2 * X * fun x => ∫ (x : Ω), X x)\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ Integrable (X ^ 2)\n[PROOFSTEP]\nexact hX.integrable_sq\n[GOAL]\ncase hg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ Integrable ((fun x => ∫ (x : Ω), X x) ^ 2)\n[PROOFSTEP]\nconvert @integrable_const Ω ℝ (_) ℙ _ _ (𝔼[X] ^ 2)\n[GOAL]\ncase hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ Integrable (X ^ 2 + (fun x => ∫ (x : Ω), X x) ^ 2)\n[PROOFSTEP]\napply hX.integrable_sq.add\n[GOAL]\ncase hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ Integrable ((fun x => ∫ (x : Ω), X x) ^ 2)\n[PROOFSTEP]\nconvert @integrable_const Ω ℝ (_) ℙ _ _ (𝔼[X] ^ 2)\n[GOAL]\ncase hg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ Integrable (2 * X * fun x => ∫ (x : Ω), X x)\n[PROOFSTEP]\nexact ((hX.integrable one_le_two).const_mul 2).mul_const' _\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ ((∫ (a : Ω), (X ^ 2) a) + ∫ (a : Ω), ((fun x => ∫ (x : Ω), X x) ^ 2) a) -\n      ∫ (a : Ω), (2 * X * fun x => ∫ (x : Ω), X x) a =\n    (∫ (a : Ω), (X ^ 2) a) - (∫ (a : Ω), X a) ^ 2\n[PROOFSTEP]\nsimp [integral_mul_right, integral_mul_left]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\n⊢ (∫ (a : Ω), X a ^ 2) + (∫ (x : Ω), X x) ^ 2 - (2 * ∫ (x : Ω), X x) * ∫ (x : Ω), X x =\n    (∫ (a : Ω), X a ^ 2) - (∫ (x : Ω), X x) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\n⊢ variance X ℙ ≤ ∫ (a : Ω), (X ^ 2) a\n[PROOFSTEP]\nby_cases hX : Memℒp X 2\n[GOAL]\ncase pos\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : Memℒp X 2\n⊢ variance X ℙ ≤ ∫ (a : Ω), (X ^ 2) a\n[PROOFSTEP]\nrw [variance_def' hX]\n[GOAL]\ncase pos\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : Memℒp X 2\n⊢ (∫ (a : Ω), (X ^ 2) a) - (∫ (a : Ω), X a) ^ 2 ≤ ∫ (a : Ω), (X ^ 2) a\n[PROOFSTEP]\nsimp only [sq_nonneg, sub_le_self_iff]\n[GOAL]\ncase neg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\n⊢ variance X ℙ ≤ ∫ (a : Ω), (X ^ 2) a\n[PROOFSTEP]\nrw [variance, evariance_eq_lintegral_ofReal, ← integral_eq_lintegral_of_nonneg_ae]\n[GOAL]\ncase neg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\n⊢ ∫ (a : Ω), (X a - ∫ (x : Ω), X x) ^ 2 ≤ ∫ (a : Ω), (X ^ 2) a\ncase neg.hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\n⊢ 0 ≤ᵐ[ℙ] fun ω => (X ω - ∫ (x : Ω), X x) ^ 2\ncase neg.hfm\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\n⊢ AEStronglyMeasurable (fun ω => (X ω - ∫ (x : Ω), X x) ^ 2) ℙ\n[PROOFSTEP]\nby_cases hint : Integrable X\n[GOAL]\ncase pos\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\nhint : Integrable X\n⊢ ∫ (a : Ω), (X a - ∫ (x : Ω), X x) ^ 2 ≤ ∫ (a : Ω), (X ^ 2) a\ncase neg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\nhint : ¬Integrable X\n⊢ ∫ (a : Ω), (X a - ∫ (x : Ω), X x) ^ 2 ≤ ∫ (a : Ω), (X ^ 2) a\ncase neg.hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\n⊢ 0 ≤ᵐ[ℙ] fun ω => (X ω - ∫ (x : Ω), X x) ^ 2\ncase neg.hfm\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\n⊢ AEStronglyMeasurable (fun ω => (X ω - ∫ (x : Ω), X x) ^ 2) ℙ\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\nhint : ¬Integrable X\n⊢ ∫ (a : Ω), (X a - ∫ (x : Ω), X x) ^ 2 ≤ ∫ (a : Ω), (X ^ 2) a\n[PROOFSTEP]\nsimp only [integral_undef hint, Pi.pow_apply, Pi.sub_apply, sub_zero]\n[GOAL]\ncase neg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\nhint : ¬Integrable X\n⊢ ∫ (a : Ω), X a ^ 2 ≤ ∫ (a : Ω), X a ^ 2\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\ncase pos\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\nhint : Integrable X\n⊢ ∫ (a : Ω), (X a - ∫ (x : Ω), X x) ^ 2 ≤ ∫ (a : Ω), (X ^ 2) a\n[PROOFSTEP]\nrw [integral_undef]\n[GOAL]\ncase pos\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\nhint : Integrable X\n⊢ 0 ≤ ∫ (a : Ω), (X ^ 2) a\n[PROOFSTEP]\nexact integral_nonneg fun a => sq_nonneg _\n[GOAL]\ncase pos\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\nhint : Integrable X\n⊢ ¬Integrable fun a => (X a - ∫ (x : Ω), X x) ^ 2\n[PROOFSTEP]\nintro h\n[GOAL]\ncase pos\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\nhint : Integrable X\nh : Integrable fun a => (X a - ∫ (x : Ω), X x) ^ 2\n⊢ False\n[PROOFSTEP]\nhave A : Memℒp (X - fun ω : Ω => 𝔼[X]) 2 ℙ :=\n  (memℒp_two_iff_integrable_sq (hint.aestronglyMeasurable.sub aestronglyMeasurable_const)).2 h\n[GOAL]\ncase pos\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\nhint : Integrable X\nh : Integrable fun a => (X a - ∫ (x : Ω), X x) ^ 2\nA : Memℒp (X - fun ω => ∫ (a : Ω), X a) 2\n⊢ False\n[PROOFSTEP]\nhave B : Memℒp (fun _ : Ω => 𝔼[X]) 2 ℙ := memℒp_const _\n[GOAL]\ncase pos\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\nhint : Integrable X\nh : Integrable fun a => (X a - ∫ (x : Ω), X x) ^ 2\nA : Memℒp (X - fun ω => ∫ (a : Ω), X a) 2\nB : Memℒp (fun x => ∫ (a : Ω), X a) 2\n⊢ False\n[PROOFSTEP]\napply hX\n[GOAL]\ncase pos\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\nhint : Integrable X\nh : Integrable fun a => (X a - ∫ (x : Ω), X x) ^ 2\nA : Memℒp (X - fun ω => ∫ (a : Ω), X a) 2\nB : Memℒp (fun x => ∫ (a : Ω), X a) 2\n⊢ Memℒp X 2\n[PROOFSTEP]\nconvert A.add B\n[GOAL]\ncase h.e'_5\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\nhint : Integrable X\nh : Integrable fun a => (X a - ∫ (x : Ω), X x) ^ 2\nA : Memℒp (X - fun ω => ∫ (a : Ω), X a) 2\nB : Memℒp (fun x => ∫ (a : Ω), X a) 2\n⊢ X = (X - fun ω => ∫ (a : Ω), X a) + fun x => ∫ (a : Ω), X a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\n⊢ 0 ≤ᵐ[ℙ] fun ω => (X ω - ∫ (x : Ω), X x) ^ 2\n[PROOFSTEP]\nexact @ae_of_all _ (_) _ _ fun x => sq_nonneg _\n[GOAL]\ncase neg.hfm\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhm : AEStronglyMeasurable X ℙ\nhX : ¬Memℒp X 2\n⊢ AEStronglyMeasurable (fun ω => (X ω - ∫ (x : Ω), X x) ^ 2) ℙ\n[PROOFSTEP]\nexact (AEMeasurable.pow_const (hm.aemeasurable.sub_const _) _).aestronglyMeasurable\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\n⊢ evariance X ℙ = (∫⁻ (ω : Ω), ↑(‖X ω‖₊ ^ 2)) - ENNReal.ofReal ((∫ (a : Ω), X a) ^ 2)\n[PROOFSTEP]\nby_cases hℒ : Memℒp X 2\n[GOAL]\ncase pos\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : Memℒp X 2\n⊢ evariance X ℙ = (∫⁻ (ω : Ω), ↑(‖X ω‖₊ ^ 2)) - ENNReal.ofReal ((∫ (a : Ω), X a) ^ 2)\n[PROOFSTEP]\nrw [← hℒ.ofReal_variance_eq, variance_def' hℒ, ENNReal.ofReal_sub _ (sq_nonneg _)]\n[GOAL]\ncase pos\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : Memℒp X 2\n⊢ ENNReal.ofReal (∫ (a : Ω), (X ^ 2) a) - ENNReal.ofReal ((∫ (a : Ω), X a) ^ 2) =\n    (∫⁻ (ω : Ω), ↑(‖X ω‖₊ ^ 2)) - ENNReal.ofReal ((∫ (a : Ω), X a) ^ 2)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase pos.e_a\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : Memℒp X 2\n⊢ ENNReal.ofReal (∫ (a : Ω), (X ^ 2) a) = ∫⁻ (ω : Ω), ↑(‖X ω‖₊ ^ 2)\n[PROOFSTEP]\nrw [lintegral_coe_eq_integral]\n[GOAL]\ncase pos.e_a\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : Memℒp X 2\n⊢ ENNReal.ofReal (∫ (a : Ω), (X ^ 2) a) = ENNReal.ofReal (∫ (a : Ω), ↑(‖X a‖₊ ^ 2))\n[PROOFSTEP]\ncongr 2 with ω\n[GOAL]\ncase pos.e_a.e_r.e_f.h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : Memℒp X 2\nω : Ω\n⊢ (X ^ 2) ω = ↑(‖X ω‖₊ ^ 2)\n[PROOFSTEP]\nsimp only [Pi.pow_apply, NNReal.coe_pow, coe_nnnorm, Real.norm_eq_abs, Even.pow_abs even_two]\n[GOAL]\ncase pos.e_a.hfi\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : Memℒp X 2\n⊢ Integrable fun x => ↑(‖X x‖₊ ^ 2)\n[PROOFSTEP]\nexact hℒ.abs.integrable_sq\n[GOAL]\ncase neg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : ¬Memℒp X 2\n⊢ evariance X ℙ = (∫⁻ (ω : Ω), ↑(‖X ω‖₊ ^ 2)) - ENNReal.ofReal ((∫ (a : Ω), X a) ^ 2)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase neg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : ¬Memℒp X 2\n⊢ (∫⁻ (ω : Ω), ↑(‖X ω‖₊ ^ 2)) - ENNReal.ofReal ((∫ (a : Ω), X a) ^ 2) = evariance X ℙ\n[PROOFSTEP]\nrw [evariance_eq_top hX hℒ, ENNReal.sub_eq_top_iff]\n[GOAL]\ncase neg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : ¬Memℒp X 2\n⊢ ∫⁻ (ω : Ω), ↑(‖X ω‖₊ ^ 2) = ⊤ ∧ ENNReal.ofReal ((∫ (a : Ω), X a) ^ 2) ≠ ⊤\n[PROOFSTEP]\nrefine' ⟨_, ENNReal.ofReal_ne_top⟩\n[GOAL]\ncase neg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : ¬Memℒp X 2\n⊢ ∫⁻ (ω : Ω), ↑(‖X ω‖₊ ^ 2) = ⊤\n[PROOFSTEP]\nrw [Memℒp, not_and] at hℒ \n[GOAL]\ncase neg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : AEStronglyMeasurable X ℙ → ¬snorm X 2 ℙ < ⊤\n⊢ ∫⁻ (ω : Ω), ↑(‖X ω‖₊ ^ 2) = ⊤\n[PROOFSTEP]\nspecialize hℒ hX\n[GOAL]\ncase neg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : ¬snorm X 2 ℙ < ⊤\n⊢ ∫⁻ (ω : Ω), ↑(‖X ω‖₊ ^ 2) = ⊤\n[PROOFSTEP]\nsimp only [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top, not_lt, top_le_iff, coe_two, one_div,\n  ENNReal.rpow_eq_top_iff, inv_lt_zero, inv_pos, and_true_iff, or_iff_not_imp_left, not_and_or, zero_lt_two] at hℒ \n[GOAL]\ncase neg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nhℒ : (¬¬∫⁻ (x : Ω), ↑‖X x‖₊ ^ 2 = 0 → 0 ≤ 2) → ∫⁻ (x : Ω), ↑‖X x‖₊ ^ 2 = ⊤\n⊢ ∫⁻ (ω : Ω), ↑(‖X ω‖₊ ^ 2) = ⊤\n[PROOFSTEP]\nexact_mod_cast hℒ fun _ => zero_le_two\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝ : MeasureSpace Ω\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nc : ℝ≥0\nhc : c ≠ 0\n⊢ ↑↑ℙ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} ≤ evariance X ℙ / ↑(c ^ 2)\n[PROOFSTEP]\nhave A : (c : ℝ≥0∞) ≠ 0 := by rwa [Ne.def, ENNReal.coe_eq_zero]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝ : MeasureSpace Ω\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nc : ℝ≥0\nhc : c ≠ 0\n⊢ ↑c ≠ 0\n[PROOFSTEP]\nrwa [Ne.def, ENNReal.coe_eq_zero]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝ : MeasureSpace Ω\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nc : ℝ≥0\nhc : c ≠ 0\nA : ↑c ≠ 0\n⊢ ↑↑ℙ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} ≤ evariance X ℙ / ↑(c ^ 2)\n[PROOFSTEP]\nhave B : AEStronglyMeasurable (fun _ : Ω => 𝔼[X]) ℙ := aestronglyMeasurable_const\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝ : MeasureSpace Ω\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nc : ℝ≥0\nhc : c ≠ 0\nA : ↑c ≠ 0\nB : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ\n⊢ ↑↑ℙ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} ≤ evariance X ℙ / ↑(c ^ 2)\n[PROOFSTEP]\nconvert meas_ge_le_mul_pow_snorm ℙ two_ne_zero ENNReal.two_ne_top (hX.sub B) A using 1\n[GOAL]\ncase h.e'_3\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝ : MeasureSpace Ω\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nc : ℝ≥0\nhc : c ≠ 0\nA : ↑c ≠ 0\nB : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ\n⊢ ↑↑ℙ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} = ↑↑ℙ {x | ↑c ≤ ↑‖(X - fun x => ∫ (a : Ω), X a) x‖₊}\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_3.e_a\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝ : MeasureSpace Ω\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nc : ℝ≥0\nhc : c ≠ 0\nA : ↑c ≠ 0\nB : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ\n⊢ {ω | ↑c ≤ |X ω - ∫ (a : Ω), X a|} = {x | ↑c ≤ ↑‖(X - fun x => ∫ (a : Ω), X a) x‖₊}\n[PROOFSTEP]\nsimp only [Pi.sub_apply, ENNReal.coe_le_coe, ← Real.norm_eq_abs, ← coe_nnnorm, NNReal.coe_le_coe,\n  ENNReal.ofReal_coe_nnreal]\n[GOAL]\ncase h.e'_4\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝ : MeasureSpace Ω\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nc : ℝ≥0\nhc : c ≠ 0\nA : ↑c ≠ 0\nB : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ\n⊢ evariance X ℙ / ↑(c ^ 2) = (↑c)⁻¹ ^ ENNReal.toReal 2 * snorm (X - fun x => ∫ (a : Ω), X a) 2 ℙ ^ ENNReal.toReal 2\n[PROOFSTEP]\nrw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top]\n[GOAL]\ncase h.e'_4\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝ : MeasureSpace Ω\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nc : ℝ≥0\nhc : c ≠ 0\nA : ↑c ≠ 0\nB : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ\n⊢ evariance X ℙ / ↑(c ^ 2) =\n    (↑c)⁻¹ ^ ENNReal.toReal 2 *\n      ((∫⁻ (x : Ω), ↑‖(X - fun x => ∫ (a : Ω), X a) x‖₊ ^ ENNReal.toReal 2) ^ (1 / ENNReal.toReal 2)) ^ ENNReal.toReal 2\n[PROOFSTEP]\nsimp only [show ENNReal.some (c ^ 2) = (ENNReal.some c) ^ 2 by norm_cast, coe_two, one_div, Pi.sub_apply]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝ : MeasureSpace Ω\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nc : ℝ≥0\nhc : c ≠ 0\nA : ↑c ≠ 0\nB : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ\n⊢ ↑(c ^ 2) = ↑c ^ 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.e'_4\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝ : MeasureSpace Ω\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nc : ℝ≥0\nhc : c ≠ 0\nA : ↑c ≠ 0\nB : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ\n⊢ evariance X ℙ / ↑c ^ 2 = (↑c)⁻¹ ^ 2 * ((∫⁻ (x : Ω), ↑‖X x - ∫ (a : Ω), X a‖₊ ^ 2) ^ 2⁻¹) ^ 2\n[PROOFSTEP]\nrw [div_eq_mul_inv, ENNReal.inv_pow, mul_comm, ENNReal.rpow_two]\n[GOAL]\ncase h.e'_4\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝ : MeasureSpace Ω\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nc : ℝ≥0\nhc : c ≠ 0\nA : ↑c ≠ 0\nB : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ\n⊢ (↑c)⁻¹ ^ 2 * evariance X ℙ = (↑c)⁻¹ ^ 2 * ((∫⁻ (x : Ω), ↑‖X x - ∫ (a : Ω), X a‖₊ ^ 2) ^ 2⁻¹) ^ 2\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_4.e_a\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝ : MeasureSpace Ω\nX : Ω → ℝ\nhX : AEStronglyMeasurable X ℙ\nc : ℝ≥0\nhc : c ≠ 0\nA : ↑c ≠ 0\nB : AEStronglyMeasurable (fun x => ∫ (a : Ω), X a) ℙ\n⊢ evariance X ℙ = ((∫⁻ (x : Ω), ↑‖X x - ∫ (a : Ω), X a‖₊ ^ 2) ^ 2⁻¹) ^ 2\n[PROOFSTEP]\nsimp_rw [← ENNReal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 : ℝ) ≠ 0), ENNReal.rpow_two, ENNReal.rpow_one, evariance]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsFiniteMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\nc : ℝ\nhc : 0 < c\n⊢ ↑↑ℙ {ω | c ≤ |X ω - ∫ (a : Ω), X a|} ≤ ENNReal.ofReal (variance X ℙ / c ^ 2)\n[PROOFSTEP]\nrw [ENNReal.ofReal_div_of_pos (sq_pos_of_ne_zero _ hc.ne.symm), hX.ofReal_variance_eq]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsFiniteMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\nc : ℝ\nhc : 0 < c\n⊢ ↑↑ℙ {ω | c ≤ |X ω - ∫ (a : Ω), X a|} ≤ evariance X ℙ / ENNReal.ofReal (c ^ 2)\n[PROOFSTEP]\nconvert @meas_ge_le_evariance_div_sq _ _ _ hX.1 c.toNNReal (by simp [hc]) using 1\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsFiniteMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\nc : ℝ\nhc : 0 < c\n⊢ Real.toNNReal c ≠ 0\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\ncase h.e'_3\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsFiniteMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\nc : ℝ\nhc : 0 < c\n⊢ ↑↑ℙ {ω | c ≤ |X ω - ∫ (a : Ω), X a|} = ↑↑ℙ {ω | ↑(Real.toNNReal c) ≤ |X ω - ∫ (a : Ω), X a|}\n[PROOFSTEP]\nsimp only [Real.coe_toNNReal', max_le_iff, abs_nonneg, and_true_iff]\n[GOAL]\ncase h.e'_4\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsFiniteMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\nc : ℝ\nhc : 0 < c\n⊢ evariance X ℙ / ENNReal.ofReal (c ^ 2) = evariance X ℙ / ↑(Real.toNNReal c ^ 2)\n[PROOFSTEP]\nrw [ENNReal.ofReal_pow hc.le, ENNReal.coe_pow]\n[GOAL]\ncase h.e'_4\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsFiniteMeasure ℙ\nX : Ω → ℝ\nhX : Memℒp X 2\nc : ℝ\nhc : 0 < c\n⊢ evariance X ℙ / ENNReal.ofReal c ^ 2 = evariance X ℙ / ↑(Real.toNNReal c) ^ 2\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ variance (X + Y) ℙ = (∫ (a : Ω), (fun a => X a ^ 2 + Y a ^ 2 + 2 * X a * Y a) a) - (∫ (a : Ω), (X + Y) a) ^ 2\n[PROOFSTEP]\nsimp [variance_def' (hX.add hY), add_sq']\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ (∫ (a : Ω), (fun a => X a ^ 2 + Y a ^ 2 + 2 * X a * Y a) a) - (∫ (a : Ω), (X + Y) a) ^ 2 =\n    (((∫ (a : Ω), (X ^ 2) a) + ∫ (a : Ω), (Y ^ 2) a) + 2 * ∫ (a : Ω), (X * Y) a) -\n      ((∫ (a : Ω), X a) + ∫ (a : Ω), Y a) ^ 2\n[PROOFSTEP]\nsimp only [Pi.add_apply, Pi.pow_apply, Pi.mul_apply, mul_assoc]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ (∫ (a : Ω), X a ^ 2 + Y a ^ 2 + 2 * (X a * Y a)) - (∫ (a : Ω), X a + Y a) ^ 2 =\n    (((∫ (a : Ω), X a ^ 2) + ∫ (a : Ω), Y a ^ 2) + 2 * ∫ (a : Ω), X a * Y a) - ((∫ (a : Ω), X a) + ∫ (a : Ω), Y a) ^ 2\n[PROOFSTEP]\nrw [integral_add, integral_add, integral_add, integral_mul_left]\n[GOAL]\ncase hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ Integrable fun a => X a\n[PROOFSTEP]\nexact hX.integrable one_le_two\n[GOAL]\ncase hg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ Integrable fun a => Y a\n[PROOFSTEP]\nexact hY.integrable one_le_two\n[GOAL]\ncase hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ Integrable fun a => X a ^ 2\n[PROOFSTEP]\nexact hX.integrable_sq\n[GOAL]\ncase hg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ Integrable fun a => Y a ^ 2\n[PROOFSTEP]\nexact hY.integrable_sq\n[GOAL]\ncase hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ Integrable fun a => X a ^ 2 + Y a ^ 2\n[PROOFSTEP]\nexact hX.integrable_sq.add hY.integrable_sq\n[GOAL]\ncase hg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ Integrable fun a => 2 * (X a * Y a)\n[PROOFSTEP]\napply Integrable.const_mul\n[GOAL]\ncase hg.h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ Integrable fun x => X x * Y x\n[PROOFSTEP]\nexact h.integrable_mul (hX.integrable one_le_two) (hY.integrable one_le_two)\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ (((∫ (a : Ω), (X ^ 2) a) + ∫ (a : Ω), (Y ^ 2) a) + 2 * ∫ (a : Ω), (X * Y) a) -\n      ((∫ (a : Ω), X a) + ∫ (a : Ω), Y a) ^ 2 =\n    ((∫ (a : Ω), (X ^ 2) a) + ∫ (a : Ω), (Y ^ 2) a) + ↑2 * ((∫ (a : Ω), X a) * ∫ (a : Ω), Y a) -\n      ((∫ (a : Ω), X a) + ∫ (a : Ω), Y a) ^ 2\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_a.e_a\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ ∫ (a : Ω), (X * Y) a = (∫ (a : Ω), X a) * ∫ (a : Ω), Y a\n[PROOFSTEP]\nexact h.integral_mul_of_integrable (hX.integrable one_le_two) (hY.integrable one_le_two)\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ ((∫ (a : Ω), (X ^ 2) a) + ∫ (a : Ω), (Y ^ 2) a) + ↑2 * ((∫ (a : Ω), X a) * ∫ (a : Ω), Y a) -\n      ((∫ (a : Ω), X a) + ∫ (a : Ω), Y a) ^ 2 =\n    variance X ℙ + variance Y ℙ\n[PROOFSTEP]\nsimp only [variance_def', hX, hY, Pi.pow_apply]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nX Y : Ω → ℝ\nhX : Memℒp X 2\nhY : Memℒp Y 2\nh : IndepFun X Y\n⊢ ((∫ (a : Ω), X a ^ 2) + ∫ (a : Ω), Y a ^ 2) + ↑2 * ((∫ (a : Ω), X a) * ∫ (a : Ω), Y a) -\n      ((∫ (a : Ω), X a) + ∫ (a : Ω), Y a) ^ 2 =\n    (∫ (a : Ω), X a ^ 2) - (∫ (a : Ω), X a) ^ 2 + ((∫ (a : Ω), Y a ^ 2) - (∫ (a : Ω), Y a) ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns : Finset ι\nhs : ∀ (i : ι), i ∈ s → Memℒp (X i) 2\nh : Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)\n⊢ variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction_on with k s ks IH\n· simp only [Finset.sum_empty, variance_zero]\nrw [variance_def' (memℒp_finset_sum' _ hs), sum_insert ks, sum_insert ks]\nsimp only [add_sq']\ncalc\n  𝔼[X k ^ 2 + (∑ i in s, X i) ^ 2 + 2 * X k * ∑ i in s, X i] - 𝔼[X k + ∑ i in s, X i] ^ 2 =\n      𝔼[X k ^ 2] + 𝔼[(∑ i in s, X i) ^ 2] + 𝔼[2 * X k * ∑ i in s, X i] - (𝔼[X k] + 𝔼[∑ i in s, X i]) ^ 2 :=\n    by\n    rw [integral_add', integral_add', integral_add']\n    · exact Memℒp.integrable one_le_two (hs _ (mem_insert_self _ _))\n    · apply integrable_finset_sum' _ fun i hi => ?_\n      exact Memℒp.integrable one_le_two (hs _ (mem_insert_of_mem hi))\n    · exact Memℒp.integrable_sq (hs _ (mem_insert_self _ _))\n    · apply Memℒp.integrable_sq\n      exact memℒp_finset_sum' _ fun i hi => hs _ (mem_insert_of_mem hi)\n    · apply Integrable.add\n      · exact Memℒp.integrable_sq (hs _ (mem_insert_self _ _))\n      · apply Memℒp.integrable_sq\n        exact memℒp_finset_sum' _ fun i hi => hs _ (mem_insert_of_mem hi)\n    · rw [mul_assoc]\n      apply Integrable.const_mul _ (2 : ℝ)\n      simp only [mul_sum, sum_apply, Pi.mul_apply]\n      apply integrable_finset_sum _ fun i hi => ?_\n      apply\n        IndepFun.integrable_mul _ (Memℒp.integrable one_le_two (hs _ (mem_insert_self _ _)))\n          (Memℒp.integrable one_le_two (hs _ (mem_insert_of_mem hi)))\n      apply h (mem_insert_self _ _) (mem_insert_of_mem hi)\n      exact fun hki => ks (hki.symm ▸ hi)\n  _ = Var[X k] + Var[∑ i in s, X i] + (𝔼[2 * X k * ∑ i in s, X i] - 2 * 𝔼[X k] * 𝔼[∑ i in s, X i]) :=\n    by\n    rw [variance_def' (hs _ (mem_insert_self _ _)),\n      variance_def' (memℒp_finset_sum' _ fun i hi => hs _ (mem_insert_of_mem hi))]\n    ring\n  _ = Var[X k] + Var[∑ i in s, X i] :=\n    by\n    simp only [mul_assoc, integral_mul_left, Pi.mul_apply, Pi.one_apply, sum_apply, add_right_eq_self, mul_sum]\n    rw [integral_finset_sum s fun i hi => ?_]; swap\n    · apply Integrable.const_mul _ (2 : ℝ)\n      apply\n        IndepFun.integrable_mul _ (Memℒp.integrable one_le_two (hs _ (mem_insert_self _ _)))\n          (Memℒp.integrable one_le_two (hs _ (mem_insert_of_mem hi)))\n      apply h (mem_insert_self _ _) (mem_insert_of_mem hi)\n      exact fun hki => ks (hki.symm ▸ hi)\n    rw [integral_finset_sum s fun i hi => Memℒp.integrable one_le_two (hs _ (mem_insert_of_mem hi)), mul_sum, mul_sum, ←\n      sum_sub_distrib]\n    apply Finset.sum_eq_zero fun i hi => ?_\n    have : ∀ (a : Ω), @OfNat.ofNat (Ω → ℝ) 2 instOfNat a = (2 : ℝ) := fun a => rfl\n    conv_lhs => enter [1, 2, a]; rw [this]\n    rw [integral_mul_left, IndepFun.integral_mul', sub_self]\n    · apply h (mem_insert_self _ _) (mem_insert_of_mem hi)\n      exact fun hki => ks (hki.symm ▸ hi)\n    · exact Memℒp.aestronglyMeasurable (hs _ (mem_insert_self _ _))\n    · exact Memℒp.aestronglyMeasurable (hs _ (mem_insert_of_mem hi))\n  _ = Var[X k] + ∑ i in s, Var[X i] := by\n    rw [IH (fun i hi => hs i (mem_insert_of_mem hi)) (h.mono (by simp only [coe_insert, Set.subset_insert]))]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns : Finset ι\nhs : ∀ (i : ι), i ∈ s → Memℒp (X i) 2\nh : Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)\n⊢ variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\n[PROOFSTEP]\ninduction' s using Finset.induction_on with k s ks IH\n[GOAL]\ncase empty\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)\nhs : ∀ (i : ι), i ∈ ∅ → Memℒp (X i) 2\nh : Set.Pairwise ↑∅ fun i j => IndepFun (X i) (X j)\n⊢ variance (∑ i in ∅, X i) ℙ = ∑ i in ∅, variance (X i) ℙ\n[PROOFSTEP]\nsimp only [Finset.sum_empty, variance_zero]\n[GOAL]\ncase insert\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ variance (∑ i in insert k s, X i) ℙ = ∑ i in insert k s, variance (X i) ℙ\n[PROOFSTEP]\nrw [variance_def' (memℒp_finset_sum' _ hs), sum_insert ks, sum_insert ks]\n[GOAL]\ncase insert\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ (∫ (a : Ω), ((X k + ∑ x in s, X x) ^ 2) a) - (∫ (a : Ω), (X k + ∑ x in s, X x) a) ^ 2 =\n    variance (X k) ℙ + ∑ x in s, variance (X x) ℙ\n[PROOFSTEP]\nsimp only [add_sq']\n[GOAL]\ncase insert\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ (∫ (a : Ω), (X k ^ 2 + (∑ x in s, X x) ^ 2 + 2 * X k * ∑ x in s, X x) a) - (∫ (a : Ω), (X k + ∑ x in s, X x) a) ^ 2 =\n    variance (X k) ℙ + ∑ x in s, variance (X x) ℙ\n[PROOFSTEP]\ncalc\n  𝔼[X k ^ 2 + (∑ i in s, X i) ^ 2 + 2 * X k * ∑ i in s, X i] - 𝔼[X k + ∑ i in s, X i] ^ 2 =\n      𝔼[X k ^ 2] + 𝔼[(∑ i in s, X i) ^ 2] + 𝔼[2 * X k * ∑ i in s, X i] - (𝔼[X k] + 𝔼[∑ i in s, X i]) ^ 2 :=\n    by\n    rw [integral_add', integral_add', integral_add']\n    · exact Memℒp.integrable one_le_two (hs _ (mem_insert_self _ _))\n    · apply integrable_finset_sum' _ fun i hi => ?_\n      exact Memℒp.integrable one_le_two (hs _ (mem_insert_of_mem hi))\n    · exact Memℒp.integrable_sq (hs _ (mem_insert_self _ _))\n    · apply Memℒp.integrable_sq\n      exact memℒp_finset_sum' _ fun i hi => hs _ (mem_insert_of_mem hi)\n    · apply Integrable.add\n      · exact Memℒp.integrable_sq (hs _ (mem_insert_self _ _))\n      · apply Memℒp.integrable_sq\n        exact memℒp_finset_sum' _ fun i hi => hs _ (mem_insert_of_mem hi)\n    · rw [mul_assoc]\n      apply Integrable.const_mul _ (2 : ℝ)\n      simp only [mul_sum, sum_apply, Pi.mul_apply]\n      apply integrable_finset_sum _ fun i hi => ?_\n      apply\n        IndepFun.integrable_mul _ (Memℒp.integrable one_le_two (hs _ (mem_insert_self _ _)))\n          (Memℒp.integrable one_le_two (hs _ (mem_insert_of_mem hi)))\n      apply h (mem_insert_self _ _) (mem_insert_of_mem hi)\n      exact fun hki => ks (hki.symm ▸ hi)\n  _ = Var[X k] + Var[∑ i in s, X i] + (𝔼[2 * X k * ∑ i in s, X i] - 2 * 𝔼[X k] * 𝔼[∑ i in s, X i]) :=\n    by\n    rw [variance_def' (hs _ (mem_insert_self _ _)),\n      variance_def' (memℒp_finset_sum' _ fun i hi => hs _ (mem_insert_of_mem hi))]\n    ring\n  _ = Var[X k] + Var[∑ i in s, X i] :=\n    by\n    simp only [mul_assoc, integral_mul_left, Pi.mul_apply, Pi.one_apply, sum_apply, add_right_eq_self, mul_sum]\n    rw [integral_finset_sum s fun i hi => ?_]; swap\n    · apply Integrable.const_mul _ (2 : ℝ)\n      apply\n        IndepFun.integrable_mul _ (Memℒp.integrable one_le_two (hs _ (mem_insert_self _ _)))\n          (Memℒp.integrable one_le_two (hs _ (mem_insert_of_mem hi)))\n      apply h (mem_insert_self _ _) (mem_insert_of_mem hi)\n      exact fun hki => ks (hki.symm ▸ hi)\n    rw [integral_finset_sum s fun i hi => Memℒp.integrable one_le_two (hs _ (mem_insert_of_mem hi)), mul_sum, mul_sum, ←\n      sum_sub_distrib]\n    apply Finset.sum_eq_zero fun i hi => ?_\n    have : ∀ (a : Ω), @OfNat.ofNat (Ω → ℝ) 2 instOfNat a = (2 : ℝ) := fun a => rfl\n    conv_lhs => enter [1, 2, a]; rw [this]\n    rw [integral_mul_left, IndepFun.integral_mul', sub_self]\n    · apply h (mem_insert_self _ _) (mem_insert_of_mem hi)\n      exact fun hki => ks (hki.symm ▸ hi)\n    · exact Memℒp.aestronglyMeasurable (hs _ (mem_insert_self _ _))\n    · exact Memℒp.aestronglyMeasurable (hs _ (mem_insert_of_mem hi))\n  _ = Var[X k] + ∑ i in s, Var[X i] := by\n    rw [IH (fun i hi => hs i (mem_insert_of_mem hi)) (h.mono (by simp only [coe_insert, Set.subset_insert]))]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ (∫ (a : Ω), (X k ^ 2 + (∑ i in s, X i) ^ 2 + 2 * X k * ∑ i in s, X i) a) - (∫ (a : Ω), (X k + ∑ i in s, X i) a) ^ 2 =\n    (((∫ (a : Ω), (X k ^ 2) a) + ∫ (a : Ω), ((∑ i in s, X i) ^ 2) a) + ∫ (a : Ω), (2 * X k * ∑ i in s, X i) a) -\n      ((∫ (a : Ω), X k a) + ∫ (a : Ω), Finset.sum s (fun i => X i) a) ^ 2\n[PROOFSTEP]\nrw [integral_add', integral_add', integral_add']\n[GOAL]\ncase hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Integrable (X k)\n[PROOFSTEP]\nexact Memℒp.integrable one_le_two (hs _ (mem_insert_self _ _))\n[GOAL]\ncase hg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Integrable (∑ i in s, X i)\n[PROOFSTEP]\napply integrable_finset_sum' _ fun i hi => ?_\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\n⊢ Integrable (X i)\n[PROOFSTEP]\nexact Memℒp.integrable one_le_two (hs _ (mem_insert_of_mem hi))\n[GOAL]\ncase hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Integrable (X k ^ 2)\n[PROOFSTEP]\nexact Memℒp.integrable_sq (hs _ (mem_insert_self _ _))\n[GOAL]\ncase hg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Integrable ((∑ i in s, X i) ^ 2)\n[PROOFSTEP]\napply Memℒp.integrable_sq\n[GOAL]\ncase hg.h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Memℒp (fun x => Finset.sum s (fun i => X i) x) 2\n[PROOFSTEP]\nexact memℒp_finset_sum' _ fun i hi => hs _ (mem_insert_of_mem hi)\n[GOAL]\ncase hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Integrable (X k ^ 2 + (∑ i in s, X i) ^ 2)\n[PROOFSTEP]\napply Integrable.add\n[GOAL]\ncase hf.hf\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Integrable (X k ^ 2)\n[PROOFSTEP]\nexact Memℒp.integrable_sq (hs _ (mem_insert_self _ _))\n[GOAL]\ncase hf.hg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Integrable ((∑ i in s, X i) ^ 2)\n[PROOFSTEP]\napply Memℒp.integrable_sq\n[GOAL]\ncase hf.hg.h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Memℒp (fun x => Finset.sum s (fun i => X i) x) 2\n[PROOFSTEP]\nexact memℒp_finset_sum' _ fun i hi => hs _ (mem_insert_of_mem hi)\n[GOAL]\ncase hg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Integrable (2 * X k * ∑ i in s, X i)\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\ncase hg\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Integrable (2 * (X k * ∑ i in s, X i))\n[PROOFSTEP]\napply Integrable.const_mul _ (2 : ℝ)\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Integrable fun x => (X k * ∑ i in s, X i) x\n[PROOFSTEP]\nsimp only [mul_sum, sum_apply, Pi.mul_apply]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ Integrable fun x => ∑ x_1 in s, X k x * X x_1 x\n[PROOFSTEP]\napply integrable_finset_sum _ fun i hi => ?_\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\n⊢ Integrable fun a => X k a * X i a\n[PROOFSTEP]\napply\n  IndepFun.integrable_mul _ (Memℒp.integrable one_le_two (hs _ (mem_insert_self _ _)))\n    (Memℒp.integrable one_le_two (hs _ (mem_insert_of_mem hi)))\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\n⊢ IndepFun (X k) (X i)\n[PROOFSTEP]\napply h (mem_insert_self _ _) (mem_insert_of_mem hi)\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\n⊢ k ≠ i\n[PROOFSTEP]\nexact fun hki => ks (hki.symm ▸ hi)\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ (((∫ (a : Ω), (X k ^ 2) a) + ∫ (a : Ω), ((∑ i in s, X i) ^ 2) a) + ∫ (a : Ω), (2 * X k * ∑ i in s, X i) a) -\n      ((∫ (a : Ω), X k a) + ∫ (a : Ω), Finset.sum s (fun i => X i) a) ^ 2 =\n    variance (X k) ℙ + variance (∑ i in s, X i) ℙ +\n      ((∫ (a : Ω), (2 * X k * ∑ i in s, X i) a) - (2 * ∫ (a : Ω), X k a) * ∫ (a : Ω), Finset.sum s (fun i => X i) a)\n[PROOFSTEP]\nrw [variance_def' (hs _ (mem_insert_self _ _)),\n  variance_def' (memℒp_finset_sum' _ fun i hi => hs _ (mem_insert_of_mem hi))]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ (((∫ (a : Ω), (X k ^ 2) a) + ∫ (a : Ω), ((∑ i in s, X i) ^ 2) a) + ∫ (a : Ω), (2 * X k * ∑ i in s, X i) a) -\n      ((∫ (a : Ω), X k a) + ∫ (a : Ω), Finset.sum s (fun i => X i) a) ^ 2 =\n    (∫ (a : Ω), (X k ^ 2) a) - (∫ (a : Ω), X k a) ^ 2 +\n        ((∫ (a : Ω), ((∑ i in s, X i) ^ 2) a) - (∫ (a : Ω), Finset.sum s (fun i => X i) a) ^ 2) +\n      ((∫ (a : Ω), (2 * X k * ∑ i in s, X i) a) - (2 * ∫ (a : Ω), X k a) * ∫ (a : Ω), Finset.sum s (fun i => X i) a)\n[PROOFSTEP]\nring\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ variance (X k) ℙ + variance (∑ i in s, X i) ℙ +\n      ((∫ (a : Ω), (2 * X k * ∑ i in s, X i) a) - (2 * ∫ (a : Ω), X k a) * ∫ (a : Ω), Finset.sum s (fun i => X i) a) =\n    variance (X k) ℙ + variance (∑ i in s, X i) ℙ\n[PROOFSTEP]\nsimp only [mul_assoc, integral_mul_left, Pi.mul_apply, Pi.one_apply, sum_apply, add_right_eq_self, mul_sum]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ (∫ (a : Ω), ∑ x in s, OfNat.ofNat 2 a * (X k a * X x a)) - 2 * ((∫ (a : Ω), X k a) * ∫ (a : Ω), ∑ c in s, X c a) = 0\n[PROOFSTEP]\nrw [integral_finset_sum s fun i hi => ?_]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ (∑ i in s, ∫ (a : Ω), OfNat.ofNat 2 a * (X k a * X i a)) - 2 * ((∫ (a : Ω), X k a) * ∫ (a : Ω), ∑ c in s, X c a) = 0\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\n⊢ Integrable fun a => OfNat.ofNat 2 a * (X k a * X i a)\n[PROOFSTEP]\nswap\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\n⊢ Integrable fun a => OfNat.ofNat 2 a * (X k a * X i a)\n[PROOFSTEP]\napply Integrable.const_mul _ (2 : ℝ)\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\n⊢ Integrable fun x => X k x * X i x\n[PROOFSTEP]\napply\n  IndepFun.integrable_mul _ (Memℒp.integrable one_le_two (hs _ (mem_insert_self _ _)))\n    (Memℒp.integrable one_le_two (hs _ (mem_insert_of_mem hi)))\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\n⊢ IndepFun (X k) (X i)\n[PROOFSTEP]\napply h (mem_insert_self _ _) (mem_insert_of_mem hi)\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\n⊢ k ≠ i\n[PROOFSTEP]\nexact fun hki => ks (hki.symm ▸ hi)\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ (∑ i in s, ∫ (a : Ω), OfNat.ofNat 2 a * (X k a * X i a)) - 2 * ((∫ (a : Ω), X k a) * ∫ (a : Ω), ∑ c in s, X c a) = 0\n[PROOFSTEP]\nrw [integral_finset_sum s fun i hi => Memℒp.integrable one_le_two (hs _ (mem_insert_of_mem hi)), mul_sum, mul_sum, ←\n  sum_sub_distrib]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ ∑ x in s, ((∫ (a : Ω), OfNat.ofNat 2 a * (X k a * X x a)) - 2 * ((∫ (a : Ω), X k a) * ∫ (a : Ω), X x a)) = 0\n[PROOFSTEP]\napply Finset.sum_eq_zero fun i hi => ?_\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\n⊢ (∫ (a : Ω), OfNat.ofNat 2 a * (X k a * X i a)) - 2 * ((∫ (a : Ω), X k a) * ∫ (a : Ω), X i a) = 0\n[PROOFSTEP]\nhave : ∀ (a : Ω), @OfNat.ofNat (Ω → ℝ) 2 instOfNat a = (2 : ℝ) := fun a => rfl\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\nthis : ∀ (a : Ω), OfNat.ofNat 2 a = 2\n⊢ (∫ (a : Ω), OfNat.ofNat 2 a * (X k a * X i a)) - 2 * ((∫ (a : Ω), X k a) * ∫ (a : Ω), X i a) = 0\n[PROOFSTEP]\nconv_lhs => enter [1, 2, a]; rw [this]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\nthis : ∀ (a : Ω), OfNat.ofNat 2 a = 2\n| (∫ (a : Ω), OfNat.ofNat 2 a * (X k a * X i a)) - 2 * ((∫ (a : Ω), X k a) * ∫ (a : Ω), X i a)\n[PROOFSTEP]\nenter [1, 2, a]; rw [this]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\nthis : ∀ (a : Ω), OfNat.ofNat 2 a = 2\n| (∫ (a : Ω), OfNat.ofNat 2 a * (X k a * X i a)) - 2 * ((∫ (a : Ω), X k a) * ∫ (a : Ω), X i a)\n[PROOFSTEP]\nenter [1, 2, a]; rw [this]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\nthis : ∀ (a : Ω), OfNat.ofNat 2 a = 2\n| (∫ (a : Ω), OfNat.ofNat 2 a * (X k a * X i a)) - 2 * ((∫ (a : Ω), X k a) * ∫ (a : Ω), X i a)\n[PROOFSTEP]\nenter [1, 2, a]\n[GOAL]\ncase h\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\nthis : ∀ (a : Ω), OfNat.ofNat 2 a = 2\na : Ω\n| OfNat.ofNat 2 a * (X k a * X i a)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\nthis : ∀ (a : Ω), OfNat.ofNat 2 a = 2\n⊢ (∫ (a : Ω), 2 * (X k a * X i a)) - 2 * ((∫ (a : Ω), X k a) * ∫ (a : Ω), X i a) = 0\n[PROOFSTEP]\nrw [integral_mul_left, IndepFun.integral_mul', sub_self]\n[GOAL]\ncase hXY\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\nthis : ∀ (a : Ω), OfNat.ofNat 2 a = 2\n⊢ IndepFun (fun a => X k a) fun a => X i a\n[PROOFSTEP]\napply h (mem_insert_self _ _) (mem_insert_of_mem hi)\n[GOAL]\ncase hXY\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\nthis : ∀ (a : Ω), OfNat.ofNat 2 a = 2\n⊢ k ≠ i\n[PROOFSTEP]\nexact fun hki => ks (hki.symm ▸ hi)\n[GOAL]\ncase hX\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\nthis : ∀ (a : Ω), OfNat.ofNat 2 a = 2\n⊢ AEStronglyMeasurable (fun a => X k a) ℙ\n[PROOFSTEP]\nexact Memℒp.aestronglyMeasurable (hs _ (mem_insert_self _ _))\n[GOAL]\ncase hY\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\ni : ι\nhi : i ∈ s\nthis : ∀ (a : Ω), OfNat.ofNat 2 a = 2\n⊢ AEStronglyMeasurable (fun a => X i a) ℙ\n[PROOFSTEP]\nexact Memℒp.aestronglyMeasurable (hs _ (mem_insert_of_mem hi))\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ variance (X k) ℙ + variance (∑ i in s, X i) ℙ = variance (X k) ℙ + ∑ i in s, variance (X i) ℙ\n[PROOFSTEP]\nrw [IH (fun i hi => hs i (mem_insert_of_mem hi)) (h.mono (by simp only [coe_insert, Set.subset_insert]))]\n[GOAL]\nΩ : Type u_1\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\nμ : Measure Ω\ninst✝¹ : MeasureSpace Ω\ninst✝ : IsProbabilityMeasure ℙ\nι : Type u_2\nX : ι → Ω → ℝ\ns✝ : Finset ι\nhs✝ : ∀ (i : ι), i ∈ s✝ → Memℒp (X i) 2\nh✝ : Set.Pairwise ↑s✝ fun i j => IndepFun (X i) (X j)\nk : ι\ns : Finset ι\nks : ¬k ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → Memℒp (X i) 2) →\n    (Set.Pairwise ↑s fun i j => IndepFun (X i) (X j)) → variance (∑ i in s, X i) ℙ = ∑ i in s, variance (X i) ℙ\nhs : ∀ (i : ι), i ∈ insert k s → Memℒp (X i) 2\nh : Set.Pairwise ↑(insert k s) fun i j => IndepFun (X i) (X j)\n⊢ ↑s ⊆ ↑(insert k s)\n[PROOFSTEP]\nsimp only [coe_insert, Set.subset_insert]\n", "meta": {"mathlib_filename": "Mathlib.Probability.Variance", "llama_tokens": 48928, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.785308580887758, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.3987890144950688}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : TopologicalSpace β\nl l' : Filter α\nf✝ g : α → β\nμ ν : Measure α\nf : α → β\n⊢ AEStronglyMeasurable f (Measure.restrict μ ∅)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : TopologicalSpace β\nl l' : Filter α\nf g : α → β\nμ ν : Measure α\nh : AEStronglyMeasurable f μ\n⊢ AEStronglyMeasurable f (Measure.restrict μ univ)\n[PROOFSTEP]\nrwa [Measure.restrict_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\ns : Set α\nμ : Measure α\nC : ℝ\nhs : ↑↑μ s < ⊤\nhf : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ C\n⊢ ↑↑(Measure.restrict μ s) univ < ⊤\n[PROOFSTEP]\nrwa [Measure.restrict_apply_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\n⊢ IntegrableOn f ∅\n[PROOFSTEP]\nsimp [IntegrableOn, integrable_zero_measure]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\n⊢ IntegrableOn f univ ↔ Integrable f\n[PROOFSTEP]\nrw [IntegrableOn, Measure.restrict_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nC : E\n⊢ C = 0 ∨ ↑↑(Measure.restrict μ s) univ < ⊤ ↔ C = 0 ∨ ↑↑μ s < ⊤\n[PROOFSTEP]\nrw [Measure.restrict_apply_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nh : IntegrableOn f s\nhs : MeasurableSet s\n⊢ IntegrableOn f s\n[PROOFSTEP]\nrw [IntegrableOn, Measure.restrict_restrict hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nh : IntegrableOn f s\nhs : MeasurableSet s\n⊢ Integrable f\n[PROOFSTEP]\nexact h.mono_set (inter_subset_left _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nx : α\ninst✝ : MeasurableSingletonClass α\n⊢ IntegrableOn f {x} ↔ f x = 0 ∨ ↑↑μ {x} < ⊤\n[PROOFSTEP]\nhave : f =ᵐ[μ.restrict { x }] fun _ => f x :=\n  by\n  filter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha\n  simp only [mem_singleton_iff.1 ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nx : α\ninst✝ : MeasurableSingletonClass α\n⊢ f =ᵐ[Measure.restrict μ {x}] fun x_1 => f x\n[PROOFSTEP]\nfilter_upwards [ae_restrict_mem (measurableSet_singleton x)] with _ ha\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nx : α\ninst✝ : MeasurableSingletonClass α\na✝ : α\nha : a✝ ∈ {x}\n⊢ f a✝ = f x\n[PROOFSTEP]\nsimp only [mem_singleton_iff.1 ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nx : α\ninst✝ : MeasurableSingletonClass α\nthis : f =ᵐ[Measure.restrict μ {x}] fun x_1 => f x\n⊢ IntegrableOn f {x} ↔ f x = 0 ∨ ↑↑μ {x} < ⊤\n[PROOFSTEP]\nrw [IntegrableOn, integrable_congr this, integrable_const_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nx : α\ninst✝ : MeasurableSingletonClass α\nthis : f =ᵐ[Measure.restrict μ {x}] fun x_1 => f x\n⊢ f x = 0 ∨ ↑↑(Measure.restrict μ {x}) univ < ⊤ ↔ f x = 0 ∨ ↑↑μ {x} < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns✝ t✝ : Set α\nμ ν : Measure α\ns : Set β\nhs : Set.Finite s\nt : β → Set α\n⊢ IntegrableOn f (⋃ (i : β) (_ : i ∈ s), t i) ↔ ∀ (i : β), i ∈ s → IntegrableOn f (t i)\n[PROOFSTEP]\nrefine hs.induction_on ?_ ?_\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns✝ t✝ : Set α\nμ ν : Measure α\ns : Set β\nhs : Set.Finite s\nt : β → Set α\n⊢ IntegrableOn f (⋃ (i : β) (_ : i ∈ ∅), t i) ↔ ∀ (i : β), i ∈ ∅ → IntegrableOn f (t i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns✝ t✝ : Set α\nμ ν : Measure α\ns : Set β\nhs : Set.Finite s\nt : β → Set α\n⊢ ∀ {a : β} {s : Set β},\n    ¬a ∈ s →\n      Set.Finite s →\n        (IntegrableOn f (⋃ (i : β) (_ : i ∈ s), t i) ↔ ∀ (i : β), i ∈ s → IntegrableOn f (t i)) →\n          (IntegrableOn f (⋃ (i : β) (_ : i ∈ insert a s), t i) ↔ ∀ (i : β), i ∈ insert a s → IntegrableOn f (t i))\n[PROOFSTEP]\nintro a s _ _ hf\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns✝¹ t✝ : Set α\nμ ν : Measure α\ns✝ : Set β\nhs : Set.Finite s✝\nt : β → Set α\na : β\ns : Set β\na✝¹ : ¬a ∈ s\na✝ : Set.Finite s\nhf : IntegrableOn f (⋃ (i : β) (_ : i ∈ s), t i) ↔ ∀ (i : β), i ∈ s → IntegrableOn f (t i)\n⊢ IntegrableOn f (⋃ (i : β) (_ : i ∈ insert a s), t i) ↔ ∀ (i : β), i ∈ insert a s → IntegrableOn f (t i)\n[PROOFSTEP]\nsimp [hf, or_imp, forall_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t✝ : Set α\nμ ν : Measure α\ninst✝ : Finite β\nt : β → Set α\n⊢ IntegrableOn f (⋃ (i : β), t i) ↔ ∀ (i : β), IntegrableOn f (t i)\n[PROOFSTEP]\ncases nonempty_fintype β\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t✝ : Set α\nμ ν : Measure α\ninst✝ : Finite β\nt : β → Set α\nval✝ : Fintype β\n⊢ IntegrableOn f (⋃ (i : β), t i) ↔ ∀ (i : β), IntegrableOn f (t i)\n[PROOFSTEP]\nsimpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhμ : IntegrableOn f s\nhν : IntegrableOn f s\n⊢ IntegrableOn f s\n[PROOFSTEP]\ndelta IntegrableOn\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhμ : IntegrableOn f s\nhν : IntegrableOn f s\n⊢ Integrable f\n[PROOFSTEP]\nrw [Measure.restrict_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhμ : IntegrableOn f s\nhν : IntegrableOn f s\n⊢ Integrable f\n[PROOFSTEP]\nexact hμ.integrable.add_measure hν\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns✝ t : Set α\nμ✝ ν : Measure α\ninst✝ : MeasurableSpace β\ne : α → β\nhe : MeasurableEmbedding e\nf : β → E\nμ : Measure α\ns : Set β\n⊢ IntegrableOn f s ↔ IntegrableOn (f ∘ e) (e ⁻¹' s)\n[PROOFSTEP]\nsimp only [IntegrableOn, he.restrict_map, he.integrable_map_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns✝ t : Set α\nμ✝ ν : Measure α\ninst✝ : MeasurableSpace β\ne : α ≃ᵐ β\nf : β → E\nμ : Measure α\ns : Set β\n⊢ IntegrableOn f s ↔ IntegrableOn (f ∘ ↑e) (↑e ⁻¹' s)\n[PROOFSTEP]\nsimp only [IntegrableOn, e.restrict_map, integrable_map_equiv e]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhs : MeasurableSet s\n⊢ Integrable (indicator s f) ↔ IntegrableOn f s\n[PROOFSTEP]\nsimp [IntegrableOn, Integrable, HasFiniteIntegral, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator,\n  lintegral_indicator _ hs, aestronglyMeasurable_indicator_iff hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E✝\nf g : α → E✝\ns✝ t : Set α\nμ ν : Measure α\nE : Type u_5\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ Integrable ↑↑(indicatorConstLp p hs hμs c)\n[PROOFSTEP]\nrw [integrable_congr indicatorConstLp_coeFn, integrable_indicator_iff hs, IntegrableOn, integrable_const_iff,\n  lt_top_iff_ne_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E✝\nf g : α → E✝\ns✝ t : Set α\nμ ν : Measure α\nE : Type u_5\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ c = 0 ∨ ↑↑(Measure.restrict μ s) univ ≠ ⊤\n[PROOFSTEP]\nright\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E✝\nf g : α → E✝\ns✝ t : Set α\nμ ν : Measure α\nE : Type u_5\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ ↑↑(Measure.restrict μ s) univ ≠ ⊤\n[PROOFSTEP]\nsimpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] using hμs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\n⊢ Measure.restrict μ (toMeasurable μ s) = Measure.restrict μ s\n[PROOFSTEP]\nrcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨u, _, u_pos, u_lim⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\n⊢ Measure.restrict μ (toMeasurable μ s) = Measure.restrict μ s\n[PROOFSTEP]\nlet v n := toMeasurable (μ.restrict s) {x | u n ≤ ‖f x‖}\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\n⊢ Measure.restrict μ (toMeasurable μ s) = Measure.restrict μ s\n[PROOFSTEP]\nhave A : ∀ n, μ (s ∩ v n) ≠ ∞ := by\n  intro n\n  rw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable]\n  exact (hf.measure_ge_lt_top (u_pos n)).ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\n⊢ ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\nn : ℕ\n⊢ ↑↑μ (s ∩ v n) ≠ ⊤\n[PROOFSTEP]\nrw [inter_comm, ← Measure.restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\nn : ℕ\n⊢ ↑↑(Measure.restrict μ s) {x | u n ≤ ‖f x‖} ≠ ⊤\n[PROOFSTEP]\nexact (hf.measure_ge_lt_top (u_pos n)).ne\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\nA : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤\n⊢ Measure.restrict μ (toMeasurable μ s) = Measure.restrict μ s\n[PROOFSTEP]\napply Measure.restrict_toMeasurable_of_cover _ A\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\nA : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤\n⊢ s ⊆ ⋃ (n : ℕ), v n\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\nA : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤\nx : α\nhx : x ∈ s\n⊢ x ∈ ⋃ (n : ℕ), v n\n[PROOFSTEP]\nhave : 0 < ‖f x‖ := by simp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\nA : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤\nx : α\nhx : x ∈ s\n⊢ 0 < ‖f x‖\n[PROOFSTEP]\nsimp only [h's x hx, norm_pos_iff, Ne.def, not_false_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\nA : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤\nx : α\nhx : x ∈ s\nthis : 0 < ‖f x‖\n⊢ x ∈ ⋃ (n : ℕ), v n\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n, u n < ‖f x‖\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\nA : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤\nx : α\nhx : x ∈ s\nthis : 0 < ‖f x‖\n⊢ ∃ n, u n < ‖f x‖\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\nA : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤\nx : α\nhx : x ∈ s\nthis : 0 < ‖f x‖\nn : ℕ\nhn : u n < ‖f x‖\n⊢ x ∈ ⋃ (n : ℕ), v n\n[PROOFSTEP]\nexact ((tendsto_order.1 u_lim).2 _ this).exists\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\nA : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤\nx : α\nhx : x ∈ s\nthis : 0 < ‖f x‖\nn : ℕ\nhn : u n < ‖f x‖\n⊢ x ∈ ⋃ (n : ℕ), v n\n[PROOFSTEP]\nrefine' mem_iUnion.2 ⟨n, _⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh's : ∀ (x : α), x ∈ s → f x ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set α := fun n => toMeasurable (Measure.restrict μ s) {x | u n ≤ ‖f x‖}\nA : ∀ (n : ℕ), ↑↑μ (s ∩ v n) ≠ ⊤\nx : α\nhx : x ∈ s\nthis : 0 < ‖f x‖\nn : ℕ\nhn : u n < ‖f x‖\n⊢ x ∈ v n\n[PROOFSTEP]\nexact subset_toMeasurable _ _ hn.le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\n⊢ IntegrableOn f t\n[PROOFSTEP]\nlet u := {x ∈ s | f x ≠ 0}\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\n⊢ IntegrableOn f t\n[PROOFSTEP]\nhave hu : IntegrableOn f u μ := hf.mono_set fun x hx => hx.1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\n⊢ IntegrableOn f t\n[PROOFSTEP]\nlet v := toMeasurable μ u\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\n⊢ IntegrableOn f t\n[PROOFSTEP]\nhave A : IntegrableOn f v μ := by\n  rw [IntegrableOn, hu.restrict_toMeasurable]\n  · exact hu\n  · intro x hx; exact hx.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\n⊢ IntegrableOn f v\n[PROOFSTEP]\nrw [IntegrableOn, hu.restrict_toMeasurable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\n⊢ Integrable f\n[PROOFSTEP]\nexact hu\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\n⊢ ∀ (x : α), x ∈ u → f x ≠ 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\nx : α\nhx : x ∈ u\n⊢ f x ≠ 0\n[PROOFSTEP]\nexact hx.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\nA : IntegrableOn f v\n⊢ IntegrableOn f t\n[PROOFSTEP]\nhave B : IntegrableOn f (t \\ v) μ := by\n  apply integrableOn_zero.congr\n  filter_upwards [ae_restrict_of_ae h't,\n    ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx\n  by_cases h'x : x ∈ s\n  · by_contra H\n    exact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩)\n  · exact (hxt ⟨hx.1, h'x⟩).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\nA : IntegrableOn f v\n⊢ IntegrableOn f (t \\ v)\n[PROOFSTEP]\napply integrableOn_zero.congr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\nA : IntegrableOn f v\n⊢ (fun x => 0) =ᵐ[Measure.restrict μ (t \\ v)] f\n[PROOFSTEP]\nfilter_upwards [ae_restrict_of_ae h't,\n  ae_restrict_mem₀ (ht.diff (measurableSet_toMeasurable μ u).nullMeasurableSet)] with x hxt hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\nA : IntegrableOn f v\nx : α\nhxt : x ∈ t \\ s → f x = 0\nhx : x ∈ t \\ toMeasurable μ {x | x ∈ s ∧ f x ≠ 0}\n⊢ 0 = f x\n[PROOFSTEP]\nby_cases h'x : x ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\nA : IntegrableOn f v\nx : α\nhxt : x ∈ t \\ s → f x = 0\nhx : x ∈ t \\ toMeasurable μ {x | x ∈ s ∧ f x ≠ 0}\nh'x : x ∈ s\n⊢ 0 = f x\n[PROOFSTEP]\nby_contra H\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\nA : IntegrableOn f v\nx : α\nhxt : x ∈ t \\ s → f x = 0\nhx : x ∈ t \\ toMeasurable μ {x | x ∈ s ∧ f x ≠ 0}\nh'x : x ∈ s\nH : ¬0 = f x\n⊢ False\n[PROOFSTEP]\nexact hx.2 (subset_toMeasurable μ u ⟨h'x, Ne.symm H⟩)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\nA : IntegrableOn f v\nx : α\nhxt : x ∈ t \\ s → f x = 0\nhx : x ∈ t \\ toMeasurable μ {x | x ∈ s ∧ f x ≠ 0}\nh'x : ¬x ∈ s\n⊢ 0 = f x\n[PROOFSTEP]\nexact (hxt ⟨hx.1, h'x⟩).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\nA : IntegrableOn f v\nB : IntegrableOn f (t \\ v)\n⊢ IntegrableOn f t\n[PROOFSTEP]\napply (A.union B).mono_set _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\nA : IntegrableOn f v\nB : IntegrableOn f (t \\ v)\n⊢ t ⊆ v ∪ t \\ v\n[PROOFSTEP]\nrw [union_diff_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nht : NullMeasurableSet t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nu : Set α := {x | x ∈ s ∧ f x ≠ 0}\nhu : IntegrableOn f u\nv : Set α := toMeasurable μ u\nA : IntegrableOn f v\nB : IntegrableOn f (t \\ v)\n⊢ t ⊆ v ∪ t\n[PROOFSTEP]\nexact subset_union_right _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh't : ∀ᵐ (x : α) ∂μ, ¬x ∈ s → f x = 0\n⊢ Integrable f\n[PROOFSTEP]\nrw [← integrableOn_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh't : ∀ᵐ (x : α) ∂μ, ¬x ∈ s → f x = 0\n⊢ IntegrableOn f univ\n[PROOFSTEP]\napply hf.of_ae_diff_eq_zero nullMeasurableSet_univ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nhf : IntegrableOn f s\nh't : ∀ᵐ (x : α) ∂μ, ¬x ∈ s → f x = 0\n⊢ ∀ᵐ (x : α) ∂μ, x ∈ univ \\ s → f x = 0\n[PROOFSTEP]\nfilter_upwards [h't] with x hx h'x using hx h'x.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nh1s : support f ⊆ s\n⊢ IntegrableOn f s ↔ Integrable f\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => h.integrableOn⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nh1s : support f ⊆ s\nh : IntegrableOn f s\n⊢ Integrable f\n[PROOFSTEP]\nrefine h.integrable_of_forall_not_mem_eq_zero fun x hx => ?_\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nh1s : support f ⊆ s\nh : IntegrableOn f s\nx : α\nhx : ¬x ∈ s\n⊢ f x = 0\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nh1s : support f ⊆ s\nh : IntegrableOn f s\nx : α\nhx : f x ≠ 0\n⊢ x ∈ s\n[PROOFSTEP]\nexact h1s (mem_support.2 hx)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E✝\nf✝ g : α → E✝\ns✝ t : Set α\nμ ν : Measure α\nE : Type u_5\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\ns : Set α\nf : { x // x ∈ Lp E p }\nhp : 1 ≤ p\nhμs : ↑↑μ s ≠ ⊤\n⊢ IntegrableOn (↑↑f) s\n[PROOFSTEP]\nrefine' memℒp_one_iff_integrable.mp _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E✝\nf✝ g : α → E✝\ns✝ t : Set α\nμ ν : Measure α\nE : Type u_5\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\ns : Set α\nf : { x // x ∈ Lp E p }\nhp : 1 ≤ p\nhμs : ↑↑μ s ≠ ⊤\n⊢ Memℒp (↑↑f) 1\n[PROOFSTEP]\nhave hμ_restrict_univ : (μ.restrict s) Set.univ < ∞ := by\n  simpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E✝\nf✝ g : α → E✝\ns✝ t : Set α\nμ ν : Measure α\nE : Type u_5\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\ns : Set α\nf : { x // x ∈ Lp E p }\nhp : 1 ≤ p\nhμs : ↑↑μ s ≠ ⊤\n⊢ ↑↑(Measure.restrict μ s) univ < ⊤\n[PROOFSTEP]\nsimpa only [Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply, lt_top_iff_ne_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E✝\nf✝ g : α → E✝\ns✝ t : Set α\nμ ν : Measure α\nE : Type u_5\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\ns : Set α\nf : { x // x ∈ Lp E p }\nhp : 1 ≤ p\nhμs : ↑↑μ s ≠ ⊤\nhμ_restrict_univ : ↑↑(Measure.restrict μ s) univ < ⊤\n⊢ Memℒp (↑↑f) 1\n[PROOFSTEP]\nhaveI hμ_finite : IsFiniteMeasure (μ.restrict s) := ⟨hμ_restrict_univ⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E✝\nf✝ g : α → E✝\ns✝ t : Set α\nμ ν : Measure α\nE : Type u_5\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\ns : Set α\nf : { x // x ∈ Lp E p }\nhp : 1 ≤ p\nhμs : ↑↑μ s ≠ ⊤\nhμ_restrict_univ : ↑↑(Measure.restrict μ s) univ < ⊤\nhμ_finite : IsFiniteMeasure (Measure.restrict μ s)\n⊢ Memℒp (↑↑f) 1\n[PROOFSTEP]\nexact ((Lp.memℒp _).restrict s).memℒp_of_exponent_le hp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g✝ : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\nf g : α → E\nhf : IntegrableAtFilter f l\nhg : IntegrableAtFilter g l\n⊢ IntegrableAtFilter (f + g) l\n[PROOFSTEP]\nrcases hf with ⟨s, sl, hs⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g✝ : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\nf g : α → E\nhg : IntegrableAtFilter g l\ns : Set α\nsl : s ∈ l\nhs : IntegrableOn f s\n⊢ IntegrableAtFilter (f + g) l\n[PROOFSTEP]\nrcases hg with ⟨t, tl, ht⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g✝ : α → E\ns✝ t✝ : Set α\nμ ν : Measure α\nl l' : Filter α\nf g : α → E\ns : Set α\nsl : s ∈ l\nhs : IntegrableOn f s\nt : Set α\ntl : t ∈ l\nht : IntegrableOn g t\n⊢ IntegrableAtFilter (f + g) l\n[PROOFSTEP]\nrefine ⟨s ∩ t, inter_mem sl tl, ?_⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g✝ : α → E\ns✝ t✝ : Set α\nμ ν : Measure α\nl l' : Filter α\nf g : α → E\ns : Set α\nsl : s ∈ l\nhs : IntegrableOn f s\nt : Set α\ntl : t ∈ l\nht : IntegrableOn g t\n⊢ IntegrableOn (f + g) (s ∩ t)\n[PROOFSTEP]\nexact (hs.mono_set (inter_subset_left _ _)).add (ht.mono_set (inter_subset_right _ _))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\nf : α → E\nhf : IntegrableAtFilter f l\n⊢ IntegrableAtFilter (-f) l\n[PROOFSTEP]\nrcases hf with ⟨s, sl, hs⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\nf : α → E\ns : Set α\nsl : s ∈ l\nhs : IntegrableOn f s\n⊢ IntegrableAtFilter (-f) l\n[PROOFSTEP]\nexact ⟨s, sl, hs.neg⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g✝ : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\nf g : α → E\nhf : IntegrableAtFilter f l\nhg : IntegrableAtFilter g l\n⊢ IntegrableAtFilter (f - g) l\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g✝ : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\nf g : α → E\nhf : IntegrableAtFilter f l\nhg : IntegrableAtFilter g l\n⊢ IntegrableAtFilter (f + -g) l\n[PROOFSTEP]\nexact hf.add hg.neg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\n⊢ IntegrableAtFilter f (l ⊓ Measure.ae μ) ↔ IntegrableAtFilter f l\n[PROOFSTEP]\nrefine' ⟨_, fun h => h.filter_mono inf_le_left⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\n⊢ IntegrableAtFilter f (l ⊓ Measure.ae μ) → IntegrableAtFilter f l\n[PROOFSTEP]\nrintro ⟨s, ⟨t, ht, u, hu, rfl⟩, hf⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t✝ : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\nt : Set α\nht : t ∈ l\nu : Set α\nhu : u ∈ Measure.ae μ\nhf : IntegrableOn f (t ∩ u)\n⊢ IntegrableAtFilter f l\n[PROOFSTEP]\nrefine' ⟨t, ht, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t✝ : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\nt : Set α\nht : t ∈ l\nu : Set α\nhu : u ∈ Measure.ae μ\nhf : IntegrableOn f (t ∩ u)\n⊢ IntegrableOn f t\n[PROOFSTEP]\nrefine' hf.integrable.mono_measure fun v hv => _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t✝ : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\nt : Set α\nht : t ∈ l\nu : Set α\nhu : u ∈ Measure.ae μ\nhf : IntegrableOn f (t ∩ u)\nv : Set α\nhv : MeasurableSet v\n⊢ ↑↑(Measure.restrict μ t) v ≤ ↑↑(Measure.restrict μ (t ∩ u)) v\n[PROOFSTEP]\nsimp only [Measure.restrict_apply hv]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t✝ : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\nt : Set α\nht : t ∈ l\nu : Set α\nhu : u ∈ Measure.ae μ\nhf : IntegrableOn f (t ∩ u)\nv : Set α\nhv : MeasurableSet v\n⊢ ↑↑μ (v ∩ t) ≤ ↑↑μ (v ∩ (t ∩ u))\n[PROOFSTEP]\nrefine' measure_mono_ae (mem_of_superset hu fun x hx => _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf g : α → E\ns t✝ : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\nt : Set α\nht : t ∈ l\nu : Set α\nhu : u ∈ Measure.ae μ\nhf : IntegrableOn f (t ∩ u)\nv : Set α\nhv : MeasurableSet v\nx : α\nhx : x ∈ u\n⊢ x ∈ {x | (fun x => (v ∩ t) x ≤ (v ∩ (t ∩ u)) x) x}\n[PROOFSTEP]\nexact fun ⟨hv, ht⟩ => ⟨hv, ⟨ht, hx⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\ninst✝ : IsMeasurablyGenerated l\nhfm : StronglyMeasurableAtFilter f l\nhμ : FiniteAtFilter μ l\nhf : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f)\n⊢ IntegrableAtFilter f l\n[PROOFSTEP]\nobtain ⟨C, hC⟩ : ∃ C, ∀ᶠ s in l.smallSets, ∀ x ∈ s, ‖f x‖ ≤ C\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\ninst✝ : IsMeasurablyGenerated l\nhfm : StronglyMeasurableAtFilter f l\nhμ : FiniteAtFilter μ l\nhf : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f)\n⊢ ∃ C, ∀ᶠ (s : Set α) in smallSets l, ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\ninst✝ : IsMeasurablyGenerated l\nhfm : StronglyMeasurableAtFilter f l\nhμ : FiniteAtFilter μ l\nhf : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f)\nC : ℝ\nhC : ∀ᶠ (s : Set α) in smallSets l, ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\n⊢ IntegrableAtFilter f l\n[PROOFSTEP]\nexact hf.imp fun C hC => eventually_smallSets.2 ⟨_, hC, fun t => id⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\ninst✝ : IsMeasurablyGenerated l\nhfm : StronglyMeasurableAtFilter f l\nhμ : FiniteAtFilter μ l\nhf : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f)\nC : ℝ\nhC : ∀ᶠ (s : Set α) in smallSets l, ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\n⊢ IntegrableAtFilter f l\n[PROOFSTEP]\nrcases(hfm.eventually.and (hμ.eventually.and hC)).exists_measurable_mem_of_smallSets with ⟨s, hsl, hsm, hfm, hμ, hC⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\ninst✝ : IsMeasurablyGenerated l\nhfm✝ : StronglyMeasurableAtFilter f l\nhμ✝ : FiniteAtFilter μ l\nhf : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f)\nC : ℝ\nhC✝ : ∀ᶠ (s : Set α) in smallSets l, ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\ns : Set α\nhsl : s ∈ l\nhsm : MeasurableSet s\nhfm : AEStronglyMeasurable f (restrict μ s)\nhμ : ↑↑μ s < ⊤\nhC : ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\n⊢ IntegrableAtFilter f l\n[PROOFSTEP]\nrefine' ⟨s, hsl, ⟨hfm, hasFiniteIntegral_restrict_of_bounded hμ _⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\ninst✝ : IsMeasurablyGenerated l\nhfm✝ : StronglyMeasurableAtFilter f l\nhμ✝ : FiniteAtFilter μ l\nhf : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f)\nC : ℝ\nhC✝ : ∀ᶠ (s : Set α) in smallSets l, ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\ns : Set α\nhsl : s ∈ l\nhsm : MeasurableSet s\nhfm : AEStronglyMeasurable f (restrict μ s)\nhμ : ↑↑μ s < ⊤\nhC : ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\n⊢ ℝ\ncase intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\ninst✝ : IsMeasurablyGenerated l\nhfm✝ : StronglyMeasurableAtFilter f l\nhμ✝ : FiniteAtFilter μ l\nhf : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f)\nC : ℝ\nhC✝ : ∀ᶠ (s : Set α) in smallSets l, ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\ns : Set α\nhsl : s ∈ l\nhsm : MeasurableSet s\nhfm : AEStronglyMeasurable f (restrict μ s)\nhμ : ↑↑μ s < ⊤\nhC : ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\n⊢ ∀ᵐ (x : α) ∂restrict μ s, ‖f x‖ ≤ ?intro.intro.intro.intro.intro.intro.refine'_1\n[PROOFSTEP]\nexact C\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\ninst✝ : IsMeasurablyGenerated l\nhfm✝ : StronglyMeasurableAtFilter f l\nhμ✝ : FiniteAtFilter μ l\nhf : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f)\nC : ℝ\nhC✝ : ∀ᶠ (s : Set α) in smallSets l, ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\ns : Set α\nhsl : s ∈ l\nhsm : MeasurableSet s\nhfm : AEStronglyMeasurable f (restrict μ s)\nhμ : ↑↑μ s < ⊤\nhC : ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\n⊢ ∀ᵐ (x : α) ∂restrict μ s, ‖f x‖ ≤ C\n[PROOFSTEP]\nrw [ae_restrict_eq hsm, eventually_inf_principal]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl✝ l' l : Filter α\ninst✝ : IsMeasurablyGenerated l\nhfm✝ : StronglyMeasurableAtFilter f l\nhμ✝ : FiniteAtFilter μ l\nhf : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f)\nC : ℝ\nhC✝ : ∀ᶠ (s : Set α) in smallSets l, ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\ns : Set α\nhsl : s ∈ l\nhsm : MeasurableSet s\nhfm : AEStronglyMeasurable f (restrict μ s)\nhμ : ↑↑μ s < ⊤\nhC : ∀ (x : α), x ∈ s → ‖f x‖ ≤ C\n⊢ ∀ᵐ (x : α) ∂μ, x ∈ s → ‖f x‖ ≤ C\n[PROOFSTEP]\nexact eventually_of_forall hC\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g✝ : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\nf g : α → E\nh : Disjoint (support f) (support g)\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\n⊢ Integrable (f + g) ↔ Integrable f ∧ Integrable g\n[PROOFSTEP]\nrefine' ⟨fun hfg => ⟨_, _⟩, fun h => h.1.add h.2⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g✝ : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\nf g : α → E\nh : Disjoint (support f) (support g)\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nhfg : Integrable (f + g)\n⊢ Integrable f\n[PROOFSTEP]\nrw [← indicator_add_eq_left h]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g✝ : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\nf g : α → E\nh : Disjoint (support f) (support g)\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nhfg : Integrable (f + g)\n⊢ Integrable (indicator (support f) (f + g))\n[PROOFSTEP]\nexact hfg.indicator hf.measurableSet_support\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g✝ : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\nf g : α → E\nh : Disjoint (support f) (support g)\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nhfg : Integrable (f + g)\n⊢ Integrable g\n[PROOFSTEP]\nrw [← indicator_add_eq_right h]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ g✝ : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\nf g : α → E\nh : Disjoint (support f) (support g)\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nhfg : Integrable (f + g)\n⊢ Integrable (indicator (support g) (f + g))\n[PROOFSTEP]\nexact hfg.indicator hg.measurableSet_support\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : TopologicalSpace β\ninst✝ : BorelSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\n⊢ AEMeasurable f\n[PROOFSTEP]\nnontriviality α\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : TopologicalSpace β\ninst✝ : BorelSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\n✝ : Nontrivial α\n⊢ AEMeasurable f\n[PROOFSTEP]\ninhabit α\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : TopologicalSpace β\ninst✝ : BorelSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\n✝ : Nontrivial α\ninhabited_h : Inhabited α\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave : (Set.piecewise s f fun _ => f default) =ᵐ[μ.restrict s] f := piecewise_ae_eq_restrict hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : TopologicalSpace β\ninst✝ : BorelSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\n✝ : Nontrivial α\ninhabited_h : Inhabited α\nthis : (Set.piecewise s f fun x => f default) =ᵐ[Measure.restrict μ s] f\n⊢ AEMeasurable f\n[PROOFSTEP]\nrefine' ⟨Set.piecewise s f fun _ => f default, _, this.symm⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : TopologicalSpace β\ninst✝ : BorelSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\n✝ : Nontrivial α\ninhabited_h : Inhabited α\nthis : (Set.piecewise s f fun x => f default) =ᵐ[Measure.restrict μ s] f\n⊢ Measurable (Set.piecewise s f fun x => f default)\n[PROOFSTEP]\napply measurable_of_isOpen\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : TopologicalSpace β\ninst✝ : BorelSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\n✝ : Nontrivial α\ninhabited_h : Inhabited α\nthis : (Set.piecewise s f fun x => f default) =ᵐ[Measure.restrict μ s] f\n⊢ ∀ (s_1 : Set β), IsOpen s_1 → MeasurableSet ((Set.piecewise s f fun x => f default) ⁻¹' s_1)\n[PROOFSTEP]\nintro t ht\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : TopologicalSpace β\ninst✝ : BorelSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\n✝ : Nontrivial α\ninhabited_h : Inhabited α\nthis : (Set.piecewise s f fun x => f default) =ᵐ[Measure.restrict μ s] f\nt : Set β\nht : IsOpen t\n⊢ MeasurableSet ((Set.piecewise s f fun x => f default) ⁻¹' t)\n[PROOFSTEP]\nobtain ⟨u, u_open, hu⟩ : ∃ u : Set α, IsOpen u ∧ f ⁻¹' t ∩ s = u ∩ s := _root_.continuousOn_iff'.1 hf t ht\n[GOAL]\ncase hf.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : TopologicalSpace β\ninst✝ : BorelSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\n✝ : Nontrivial α\ninhabited_h : Inhabited α\nthis : (Set.piecewise s f fun x => f default) =ᵐ[Measure.restrict μ s] f\nt : Set β\nht : IsOpen t\nu : Set α\nu_open : IsOpen u\nhu : f ⁻¹' t ∩ s = u ∩ s\n⊢ MeasurableSet ((Set.piecewise s f fun x => f default) ⁻¹' t)\n[PROOFSTEP]\nrw [piecewise_preimage, Set.ite, hu]\n[GOAL]\ncase hf.intro.intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : TopologicalSpace β\ninst✝ : BorelSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\n✝ : Nontrivial α\ninhabited_h : Inhabited α\nthis : (Set.piecewise s f fun x => f default) =ᵐ[Measure.restrict μ s] f\nt : Set β\nht : IsOpen t\nu : Set α\nu_open : IsOpen u\nhu : f ⁻¹' t ∩ s = u ∩ s\n⊢ MeasurableSet (u ∩ s ∪ (fun x => f default) ⁻¹' t \\ s)\n[PROOFSTEP]\nexact (u_open.measurableSet.inter hs).union ((measurable_const ht.measurableSet).diff hs)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : PseudoMetrizableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nh's : IsSeparable s\n⊢ AEStronglyMeasurable f (Measure.restrict μ s)\n[PROOFSTEP]\nletI := pseudoMetrizableSpacePseudoMetric α\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : PseudoMetrizableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nh's : IsSeparable s\nthis : PseudoMetricSpace α := pseudoMetrizableSpacePseudoMetric α\n⊢ AEStronglyMeasurable f (Measure.restrict μ s)\n[PROOFSTEP]\nborelize β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : PseudoMetrizableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nh's : IsSeparable s\nthis : PseudoMetricSpace α := pseudoMetrizableSpacePseudoMetric α\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ AEStronglyMeasurable f (Measure.restrict μ s)\n[PROOFSTEP]\nrw [aestronglyMeasurable_iff_aemeasurable_separable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : PseudoMetrizableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nh's : IsSeparable s\nthis : PseudoMetricSpace α := pseudoMetrizableSpacePseudoMetric α\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ AEMeasurable f ∧ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂Measure.restrict μ s, f x ∈ t\n[PROOFSTEP]\nrefine' ⟨hf.aemeasurable hs, f '' s, hf.isSeparable_image h's, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : TopologicalSpace α\ninst✝³ : PseudoMetrizableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nh's : IsSeparable s\nthis : PseudoMetricSpace α := pseudoMetrizableSpacePseudoMetric α\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, f x ∈ f '' s\n[PROOFSTEP]\nexact mem_of_superset (self_mem_ae_restrict hs) (subset_preimage_image _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\nh : SecondCountableTopologyEither α β\ninst✝¹ : OpensMeasurableSpace α\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\n⊢ AEStronglyMeasurable f (Measure.restrict μ s)\n[PROOFSTEP]\nborelize β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\nh : SecondCountableTopologyEither α β\ninst✝¹ : OpensMeasurableSpace α\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ AEStronglyMeasurable f (Measure.restrict μ s)\n[PROOFSTEP]\nrefine'\n  aestronglyMeasurable_iff_aemeasurable_separable.2\n    ⟨hf.aemeasurable hs, f '' s, _, mem_of_superset (self_mem_ae_restrict hs) (subset_preimage_image _ _)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\nh : SecondCountableTopologyEither α β\ninst✝¹ : OpensMeasurableSpace α\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ IsSeparable (f '' s)\n[PROOFSTEP]\ncases h.out\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\nh : SecondCountableTopologyEither α β\ninst✝¹ : OpensMeasurableSpace α\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh✝ : SecondCountableTopology α\n⊢ IsSeparable (f '' s)\n[PROOFSTEP]\nlet f' : s → β := s.restrict f\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\nh : SecondCountableTopologyEither α β\ninst✝¹ : OpensMeasurableSpace α\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh✝ : SecondCountableTopology α\nf' : ↑s → β := Set.restrict s f\n⊢ IsSeparable (f '' s)\n[PROOFSTEP]\nhave A : Continuous f' := continuousOn_iff_continuous_restrict.1 hf\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\nh : SecondCountableTopologyEither α β\ninst✝¹ : OpensMeasurableSpace α\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh✝ : SecondCountableTopology α\nf' : ↑s → β := Set.restrict s f\nA : Continuous f'\n⊢ IsSeparable (f '' s)\n[PROOFSTEP]\nhave B : IsSeparable (univ : Set s) := isSeparable_of_separableSpace _\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\nh : SecondCountableTopologyEither α β\ninst✝¹ : OpensMeasurableSpace α\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh✝ : SecondCountableTopology α\nf' : ↑s → β := Set.restrict s f\nA : Continuous f'\nB : IsSeparable univ\n⊢ IsSeparable (f '' s)\n[PROOFSTEP]\nconvert IsSeparable.image B A using 1\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\nh : SecondCountableTopologyEither α β\ninst✝¹ : OpensMeasurableSpace α\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh✝ : SecondCountableTopology α\nf' : ↑s → β := Set.restrict s f\nA : Continuous f'\nB : IsSeparable univ\n⊢ f '' s = f' '' univ\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\nh : SecondCountableTopologyEither α β\ninst✝¹ : OpensMeasurableSpace α\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh✝ : SecondCountableTopology α\nf' : ↑s → β := Set.restrict s f\nA : Continuous f'\nB : IsSeparable univ\nx : β\n⊢ x ∈ f '' s ↔ x ∈ f' '' univ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\nh : SecondCountableTopologyEither α β\ninst✝¹ : OpensMeasurableSpace α\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : MeasurableSet s\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh✝ : SecondCountableTopology β\n⊢ IsSeparable (f '' s)\n[PROOFSTEP]\nexact isSeparable_of_separableSpace _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : IsCompact s\nh's : MeasurableSet s\n⊢ AEStronglyMeasurable f (Measure.restrict μ s)\n[PROOFSTEP]\nletI := pseudoMetrizableSpacePseudoMetric β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : IsCompact s\nh's : MeasurableSet s\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\n⊢ AEStronglyMeasurable f (Measure.restrict μ s)\n[PROOFSTEP]\nborelize β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : IsCompact s\nh's : MeasurableSet s\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ AEStronglyMeasurable f (Measure.restrict μ s)\n[PROOFSTEP]\nrw [aestronglyMeasurable_iff_aemeasurable_separable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : IsCompact s\nh's : MeasurableSet s\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ AEMeasurable f ∧ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂Measure.restrict μ s, f x ∈ t\n[PROOFSTEP]\nrefine' ⟨hf.aemeasurable h's, f '' s, _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : IsCompact s\nh's : MeasurableSet s\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ IsSeparable (f '' s)\n[PROOFSTEP]\nexact (hs.image_of_continuousOn hf).isSeparable\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nf : α → β\ns : Set α\nμ : Measure α\nhf : ContinuousOn f s\nhs : IsCompact s\nh's : MeasurableSet s\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, f x ∈ f '' s\n[PROOFSTEP]\nexact mem_of_superset (self_mem_ae_restrict h's) (subset_preimage_image _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : SecondCountableTopologyEither α E\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nf : α → E\nhf : Continuous f\na : α\n⊢ IntegrableAtFilter f (𝓝 a)\n[PROOFSTEP]\nrw [← nhdsWithin_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : TopologicalSpace α\ninst✝² : SecondCountableTopologyEither α E\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nf : α → E\nhf : Continuous f\na : α\n⊢ IntegrableAtFilter f (𝓝[univ] a)\n[PROOFSTEP]\nexact hf.continuousOn.integrableAt_nhdsWithin MeasurableSet.univ (mem_univ a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nha : ↑↑μ {a} ≠ ⊤\n⊢ IntegrableOn f (Icc a b) ↔ IntegrableOn f (Ioc a b)\n[PROOFSTEP]\nby_cases hab : a ≤ b\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nha : ↑↑μ {a} ≠ ⊤\nhab : a ≤ b\n⊢ IntegrableOn f (Icc a b) ↔ IntegrableOn f (Ioc a b)\n[PROOFSTEP]\nrw [← Ioc_union_left hab, integrableOn_union, eq_true (integrableOn_singleton_iff.mpr <| Or.inr ha.lt_top),\n  and_true_iff]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nha : ↑↑μ {a} ≠ ⊤\nhab : ¬a ≤ b\n⊢ IntegrableOn f (Icc a b) ↔ IntegrableOn f (Ioc a b)\n[PROOFSTEP]\nrw [Icc_eq_empty hab, Ioc_eq_empty]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nha : ↑↑μ {a} ≠ ⊤\nhab : ¬a ≤ b\n⊢ ¬a < b\n[PROOFSTEP]\ncontrapose! hab\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nha : ↑↑μ {a} ≠ ⊤\nhab : a < b\n⊢ a ≤ b\n[PROOFSTEP]\nexact hab.le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nhb : ↑↑μ {b} ≠ ⊤\n⊢ IntegrableOn f (Icc a b) ↔ IntegrableOn f (Ico a b)\n[PROOFSTEP]\nby_cases hab : a ≤ b\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nhb : ↑↑μ {b} ≠ ⊤\nhab : a ≤ b\n⊢ IntegrableOn f (Icc a b) ↔ IntegrableOn f (Ico a b)\n[PROOFSTEP]\nrw [← Ico_union_right hab, integrableOn_union, eq_true (integrableOn_singleton_iff.mpr <| Or.inr hb.lt_top),\n  and_true_iff]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nhb : ↑↑μ {b} ≠ ⊤\nhab : ¬a ≤ b\n⊢ IntegrableOn f (Icc a b) ↔ IntegrableOn f (Ico a b)\n[PROOFSTEP]\nrw [Icc_eq_empty hab, Ico_eq_empty]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nhb : ↑↑μ {b} ≠ ⊤\nhab : ¬a ≤ b\n⊢ ¬a < b\n[PROOFSTEP]\ncontrapose! hab\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nhb : ↑↑μ {b} ≠ ⊤\nhab : a < b\n⊢ a ≤ b\n[PROOFSTEP]\nexact hab.le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nha : ↑↑μ {a} ≠ ⊤\n⊢ IntegrableOn f (Ico a b) ↔ IntegrableOn f (Ioo a b)\n[PROOFSTEP]\nby_cases hab : a < b\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nha : ↑↑μ {a} ≠ ⊤\nhab : a < b\n⊢ IntegrableOn f (Ico a b) ↔ IntegrableOn f (Ioo a b)\n[PROOFSTEP]\nrw [← Ioo_union_left hab, integrableOn_union, eq_true (integrableOn_singleton_iff.mpr <| Or.inr ha.lt_top),\n  and_true_iff]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nha : ↑↑μ {a} ≠ ⊤\nhab : ¬a < b\n⊢ IntegrableOn f (Ico a b) ↔ IntegrableOn f (Ioo a b)\n[PROOFSTEP]\nrw [Ioo_eq_empty hab, Ico_eq_empty hab]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nhb : ↑↑μ {b} ≠ ⊤\n⊢ IntegrableOn f (Ioc a b) ↔ IntegrableOn f (Ioo a b)\n[PROOFSTEP]\nby_cases hab : a < b\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nhb : ↑↑μ {b} ≠ ⊤\nhab : a < b\n⊢ IntegrableOn f (Ioc a b) ↔ IntegrableOn f (Ioo a b)\n[PROOFSTEP]\nrw [← Ioo_union_right hab, integrableOn_union, eq_true (integrableOn_singleton_iff.mpr <| Or.inr hb.lt_top),\n  and_true_iff]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nhb : ↑↑μ {b} ≠ ⊤\nhab : ¬a < b\n⊢ IntegrableOn f (Ioc a b) ↔ IntegrableOn f (Ioo a b)\n[PROOFSTEP]\nrw [Ioo_eq_empty hab, Ioc_eq_empty hab]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nha : ↑↑μ {a} ≠ ⊤\nhb : ↑↑μ {b} ≠ ⊤\n⊢ IntegrableOn f (Icc a b) ↔ IntegrableOn f (Ioo a b)\n[PROOFSTEP]\nrw [integrableOn_Icc_iff_integrableOn_Ioc' ha, integrableOn_Ioc_iff_integrableOn_Ioo' hb]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nhb : ↑↑μ {b} ≠ ⊤\n⊢ IntegrableOn f (Ici b) ↔ IntegrableOn f (Ioi b)\n[PROOFSTEP]\nrw [← Ioi_union_left, integrableOn_union, eq_true (integrableOn_singleton_iff.mpr <| Or.inr hb.lt_top), and_true_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : PartialOrder α\ninst✝ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\nhb : ↑↑μ {b} ≠ ⊤\n⊢ IntegrableOn f (Iic b) ↔ IntegrableOn f (Iio b)\n[PROOFSTEP]\nrw [← Iio_union_right, integrableOn_union, eq_true (integrableOn_singleton_iff.mpr <| Or.inr hb.lt_top), and_true_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ ↑↑μ {a} ≠ ⊤\n[PROOFSTEP]\nrw [measure_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ 0 ≠ ⊤\n[PROOFSTEP]\nexact ENNReal.zero_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ ↑↑μ {b} ≠ ⊤\n[PROOFSTEP]\nrw [measure_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ 0 ≠ ⊤\n[PROOFSTEP]\nexact ENNReal.zero_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ ↑↑μ {a} ≠ ⊤\n[PROOFSTEP]\nrw [measure_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ 0 ≠ ⊤\n[PROOFSTEP]\nexact ENNReal.zero_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ ↑↑μ {b} ≠ ⊤\n[PROOFSTEP]\nrw [measure_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ 0 ≠ ⊤\n[PROOFSTEP]\nexact ENNReal.zero_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ IntegrableOn f (Icc a b) ↔ IntegrableOn f (Ioo a b)\n[PROOFSTEP]\nrw [integrableOn_Icc_iff_integrableOn_Ioc, integrableOn_Ioc_iff_integrableOn_Ioo]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ ↑↑μ {b} ≠ ⊤\n[PROOFSTEP]\nrw [measure_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ 0 ≠ ⊤\n[PROOFSTEP]\nexact ENNReal.zero_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ ↑↑μ {b} ≠ ⊤\n[PROOFSTEP]\nrw [measure_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : PartialOrder α\ninst✝¹ : MeasurableSingletonClass α\nf : α → E\nμ : Measure α\na b : α\ninst✝ : NoAtoms μ\n⊢ 0 ≠ ⊤\n[PROOFSTEP]\nexact ENNReal.zero_ne_top\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Integral.IntegrableOn", "llama_tokens": 34885, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6406358685621721, "lm_q2_score": 0.6224593312018546, "lm_q1q2_score": 0.3987697742891289}}
{"text": "[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\n⊢ ⊤ * ⊤ = ⊤\n[PROOFSTEP]\nsimp [mul_def]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\n⊢ Option.map₂ (fun x x_1 => x * x_1) ⊤ ⊤ = ⊤\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\na : WithTop α\n⊢ a * ⊤ = if a = 0 then 0 else ⊤\n[PROOFSTEP]\ninduction a using recTopCoe\n[GOAL]\ncase top\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\n⊢ ⊤ * ⊤ = if ⊤ = 0 then 0 else ⊤\n[PROOFSTEP]\nsimp [mul_def]\n[GOAL]\ncase coe\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\na✝ : α\n⊢ ↑a✝ * ⊤ = if ↑a✝ = 0 then 0 else ⊤\n[PROOFSTEP]\nsimp [mul_def]\n[GOAL]\ncase top\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\n⊢ Option.map₂ (fun x x_1 => x * x_1) ⊤ ⊤ = ⊤\n[PROOFSTEP]\nrfl\n[GOAL]\ncase coe\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\na✝ : α\n⊢ (if a✝ = 0 then 0 else Option.map₂ (fun x x_1 => x * x_1) ↑a✝ ⊤) = if a✝ = 0 then 0 else ⊤\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\na : WithTop α\nh : a ≠ 0\n⊢ a * ⊤ = ⊤\n[PROOFSTEP]\nrw [mul_top', if_neg h]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\na : WithTop α\n⊢ ⊤ * a = if a = 0 then 0 else ⊤\n[PROOFSTEP]\ninduction a using recTopCoe\n[GOAL]\ncase top\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\n⊢ ⊤ * ⊤ = if ⊤ = 0 then 0 else ⊤\n[PROOFSTEP]\nsimp [mul_def]\n[GOAL]\ncase coe\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\na✝ : α\n⊢ ⊤ * ↑a✝ = if ↑a✝ = 0 then 0 else ⊤\n[PROOFSTEP]\nsimp [mul_def]\n[GOAL]\ncase top\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\n⊢ Option.map₂ (fun x x_1 => x * x_1) ⊤ ⊤ = ⊤\n[PROOFSTEP]\nrfl\n[GOAL]\ncase coe\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\na✝ : α\n⊢ (if a✝ = 0 then 0 else Option.map₂ (fun x x_1 => x * x_1) ⊤ ↑a✝) = if a✝ = 0 then 0 else ⊤\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\na : WithTop α\nh : a ≠ 0\n⊢ ⊤ * a = ⊤\n[PROOFSTEP]\nrw [top_mul', if_neg h]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\na b : WithTop α\n⊢ a * b = ⊤ ↔ a ≠ 0 ∧ b = ⊤ ∨ a = ⊤ ∧ b ≠ 0\n[PROOFSTEP]\nrw [mul_def, ite_eq_iff, ← none_eq_top, Option.map₂_eq_none_iff]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\na b : WithTop α\n⊢ (a = 0 ∨ b = 0) ∧ 0 = none ∨ ¬(a = 0 ∨ b = 0) ∧ (a = none ∨ b = none) ↔ a ≠ 0 ∧ b = none ∨ a = none ∧ b ≠ 0\n[PROOFSTEP]\nhave ha : a = 0 → a ≠ none := fun h => h.symm ▸ zero_ne_top\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\na b : WithTop α\nha : a = 0 → a ≠ none\n⊢ (a = 0 ∨ b = 0) ∧ 0 = none ∨ ¬(a = 0 ∨ b = 0) ∧ (a = none ∨ b = none) ↔ a ≠ 0 ∧ b = none ∨ a = none ∧ b ≠ 0\n[PROOFSTEP]\nhave hb : b = 0 → b ≠ none := fun h => h.symm ▸ zero_ne_top\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : Zero α\ninst✝ : Mul α\na b : WithTop α\nha : a = 0 → a ≠ none\nhb : b = 0 → b ≠ none\n⊢ (a = 0 ∨ b = 0) ∧ 0 = none ∨ ¬(a = 0 ∨ b = 0) ∧ (a = none ∨ b = none) ↔ a ≠ 0 ∧ b = none ∨ a = none ∧ b ≠ 0\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : Zero α\ninst✝¹ : Mul α\ninst✝ : LT α\na b : WithTop α\nha : a < ⊤\nhb : b < ⊤\n⊢ a * b < ⊤\n[PROOFSTEP]\nrw [WithTop.lt_top_iff_ne_top] at *\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : Zero α\ninst✝¹ : Mul α\ninst✝ : LT α\na b : WithTop α\nha : a ≠ ⊤\nhb : b ≠ ⊤\n⊢ a * b ≠ ⊤\n[PROOFSTEP]\nsimp only [Ne.def, mul_eq_top_iff, *, and_false, false_and, false_or]\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : Zero α\ninst✝¹ : Mul α\ninst✝ : NoZeroDivisors α\n⊢ NoZeroDivisors (WithTop α)\n[PROOFSTEP]\nrefine ⟨fun h₁ => Decidable.by_contradiction <| fun h₂ => ?_⟩\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : Zero α\ninst✝¹ : Mul α\ninst✝ : NoZeroDivisors α\na✝ b✝ : WithTop α\nh₁ : a✝ * b✝ = 0\nh₂ : ¬(a✝ = 0 ∨ b✝ = 0)\n⊢ False\n[PROOFSTEP]\nrw [mul_def, if_neg h₂] at h₁ \n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : Zero α\ninst✝¹ : Mul α\ninst✝ : NoZeroDivisors α\na✝ b✝ : WithTop α\nh₁ : Option.map₂ (fun x x_1 => x * x_1) a✝ b✝ = 0\nh₂ : ¬(a✝ = 0 ∨ b✝ = 0)\n⊢ False\n[PROOFSTEP]\nrcases Option.mem_map₂_iff.1 h₁ with ⟨a, b, (rfl : _ = _), (rfl : _ = _), hab⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : Zero α\ninst✝¹ : Mul α\ninst✝ : NoZeroDivisors α\na b : α\nhab : a * b = 0\nh₁ : Option.map₂ (fun x x_1 => x * x_1) (Option.some a) (Option.some b) = 0\nh₂ : ¬(Option.some a = 0 ∨ Option.some b = 0)\n⊢ False\n[PROOFSTEP]\nexact h₂ ((eq_zero_or_eq_zero_of_mul_eq_zero hab).imp (congr_arg some) (congr_arg some))\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na b : α\n⊢ ↑(a * b) = ↑a * ↑b\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na b : α\nha : a = 0\n⊢ ↑(a * b) = ↑a * ↑b\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na b : α\nha : ¬a = 0\n⊢ ↑(a * b) = ↑a * ↑b\n[PROOFSTEP]\nby_cases hb : b = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na b : α\nha : ¬a = 0\nhb : b = 0\n⊢ ↑(a * b) = ↑a * ↑b\n[PROOFSTEP]\nsimp [hb]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na b : α\nha : ¬a = 0\nhb : ¬b = 0\n⊢ ↑(a * b) = ↑a * ↑b\n[PROOFSTEP]\nsimp [*, mul_def]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na b : α\nha : ¬a = 0\nhb : ¬b = 0\n⊢ ↑(a * b) = Option.map₂ (fun x x_1 => x * x_1) ↑a ↑b\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\nb : α\nhb : b ≠ 0\n⊢ (if ⊤ = 0 ∨ ↑b = 0 then 0 else ⊤) = ⊤\n[PROOFSTEP]\nsimp [hb]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\nb : α\nhb : b ≠ 0\na : α\n⊢ Option.some a * ↑b = Option.bind (Option.some a) fun a => Option.some (a * b)\n[PROOFSTEP]\nrw [some_eq_coe, ← coe_mul]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\nb : α\nhb : b ≠ 0\na : α\n⊢ ↑(a * b) = Option.bind ↑a fun a => Option.some (a * b)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na b : WithTop α\n⊢ untop' 0 (a * b) = untop' 0 a * untop' 0 b\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na b : WithTop α\nha : a = 0\n⊢ untop' 0 (a * b) = untop' 0 a * untop' 0 b\n[PROOFSTEP]\nrw [ha, zero_mul, ← coe_zero, untop'_coe, zero_mul]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na b : WithTop α\nha : ¬a = 0\n⊢ untop' 0 (a * b) = untop' 0 a * untop' 0 b\n[PROOFSTEP]\nby_cases hb : b = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na b : WithTop α\nha : ¬a = 0\nhb : b = 0\n⊢ untop' 0 (a * b) = untop' 0 a * untop' 0 b\n[PROOFSTEP]\nrw [hb, mul_zero, ← coe_zero, untop'_coe, mul_zero]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na b : WithTop α\nha : ¬a = 0\nhb : ¬b = 0\n⊢ untop' 0 (a * b) = untop' 0 a * untop' 0 b\n[PROOFSTEP]\ninduction a using WithTop.recTopCoe\n[GOAL]\ncase neg.top\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\nb : WithTop α\nhb : ¬b = 0\nha : ¬⊤ = 0\n⊢ untop' 0 (⊤ * b) = untop' 0 ⊤ * untop' 0 b\n[PROOFSTEP]\nrw [top_mul hb, untop'_top, zero_mul]\n[GOAL]\ncase neg.coe\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\nb : WithTop α\nhb : ¬b = 0\na✝ : α\nha : ¬↑a✝ = 0\n⊢ untop' 0 (↑a✝ * b) = untop' 0 ↑a✝ * untop' 0 b\n[PROOFSTEP]\ninduction b using WithTop.recTopCoe\n[GOAL]\ncase neg.coe.top\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na✝ : α\nha : ¬↑a✝ = 0\nhb : ¬⊤ = 0\n⊢ untop' 0 (↑a✝ * ⊤) = untop' 0 ↑a✝ * untop' 0 ⊤\n[PROOFSTEP]\nrw [mul_top ha, untop'_top, mul_zero]\n[GOAL]\ncase neg.coe.coe\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : MulZeroClass α\na✝¹ : α\nha : ¬↑a✝¹ = 0\na✝ : α\nhb : ¬↑a✝ = 0\n⊢ untop' 0 (↑a✝¹ * ↑a✝) = untop' 0 ↑a✝¹ * untop' 0 ↑a✝\n[PROOFSTEP]\nrw [← coe_mul, untop'_coe, untop'_coe, untop'_coe]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : MulZeroOneClass α\ninst✝ : Nontrivial α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na✝ : WithTop α\na : α\n⊢ 1 * ↑a = ↑a\n[PROOFSTEP]\nrw [← coe_one, ← coe_mul, one_mul]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : MulZeroOneClass α\ninst✝ : Nontrivial α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na✝ : WithTop α\na : α\n⊢ ↑a * 1 = ↑a\n[PROOFSTEP]\nrw [← coe_one, ← coe_mul, mul_one]\n[GOAL]\nα : Type u_1\ninst✝⁶ : DecidableEq α\nR : Type u_2\nS : Type u_3\ninst✝⁵ : MulZeroOneClass R\ninst✝⁴ : DecidableEq R\ninst✝³ : Nontrivial R\ninst✝² : MulZeroOneClass S\ninst✝¹ : DecidableEq S\ninst✝ : Nontrivial S\nf : R →*₀ S\nhf : Function.Injective ↑f\nsrc✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f\nsrc✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f\nx y : WithTop R\n⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (x * y) =\n    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } x *\n      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y\n[PROOFSTEP]\nhave : ∀ z, map f z = 0 ↔ z = 0 := fun z => (Option.map_injective hf).eq_iff' f.toZeroHom.withTopMap.map_zero\n[GOAL]\nα : Type u_1\ninst✝⁶ : DecidableEq α\nR : Type u_2\nS : Type u_3\ninst✝⁵ : MulZeroOneClass R\ninst✝⁴ : DecidableEq R\ninst✝³ : Nontrivial R\ninst✝² : MulZeroOneClass S\ninst✝¹ : DecidableEq S\ninst✝ : Nontrivial S\nf : R →*₀ S\nhf : Function.Injective ↑f\nsrc✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f\nsrc✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f\nx y : WithTop R\nthis : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0\n⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (x * y) =\n    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } x *\n      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y\n[PROOFSTEP]\nrcases Decidable.eq_or_ne x 0 with (rfl | hx)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝⁶ : DecidableEq α\nR : Type u_2\nS : Type u_3\ninst✝⁵ : MulZeroOneClass R\ninst✝⁴ : DecidableEq R\ninst✝³ : Nontrivial R\ninst✝² : MulZeroOneClass S\ninst✝¹ : DecidableEq S\ninst✝ : Nontrivial S\nf : R →*₀ S\nhf : Function.Injective ↑f\nsrc✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f\nsrc✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f\ny : WithTop R\nthis : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0\n⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (0 * y) =\n    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } 0 *\n      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\ninst✝⁶ : DecidableEq α\nR : Type u_2\nS : Type u_3\ninst✝⁵ : MulZeroOneClass R\ninst✝⁴ : DecidableEq R\ninst✝³ : Nontrivial R\ninst✝² : MulZeroOneClass S\ninst✝¹ : DecidableEq S\ninst✝ : Nontrivial S\nf : R →*₀ S\nhf : Function.Injective ↑f\nsrc✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f\nsrc✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f\nx y : WithTop R\nthis : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0\nhx : x ≠ 0\n⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (x * y) =\n    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } x *\n      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y\n[PROOFSTEP]\nrcases Decidable.eq_or_ne y 0 with (rfl | hy)\n[GOAL]\ncase inr.inl\nα : Type u_1\ninst✝⁶ : DecidableEq α\nR : Type u_2\nS : Type u_3\ninst✝⁵ : MulZeroOneClass R\ninst✝⁴ : DecidableEq R\ninst✝³ : Nontrivial R\ninst✝² : MulZeroOneClass S\ninst✝¹ : DecidableEq S\ninst✝ : Nontrivial S\nf : R →*₀ S\nhf : Function.Injective ↑f\nsrc✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f\nsrc✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f\nx : WithTop R\nthis : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0\nhx : x ≠ 0\n⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (x * 0) =\n    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } x *\n      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝⁶ : DecidableEq α\nR : Type u_2\nS : Type u_3\ninst✝⁵ : MulZeroOneClass R\ninst✝⁴ : DecidableEq R\ninst✝³ : Nontrivial R\ninst✝² : MulZeroOneClass S\ninst✝¹ : DecidableEq S\ninst✝ : Nontrivial S\nf : R →*₀ S\nhf : Function.Injective ↑f\nsrc✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f\nsrc✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f\nx y : WithTop R\nthis : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (x * y) =\n    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } x *\n      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y\n[PROOFSTEP]\ninduction' x using WithTop.recTopCoe with x\n[GOAL]\ncase inr.inr.top\nα : Type u_1\ninst✝⁶ : DecidableEq α\nR : Type u_2\nS : Type u_3\ninst✝⁵ : MulZeroOneClass R\ninst✝⁴ : DecidableEq R\ninst✝³ : Nontrivial R\ninst✝² : MulZeroOneClass S\ninst✝¹ : DecidableEq S\ninst✝ : Nontrivial S\nf : R →*₀ S\nhf : Function.Injective ↑f\nsrc✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f\nsrc✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f\nx y : WithTop R\nthis : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0\nhx✝ : x ≠ 0\nhy : y ≠ 0\nhx : ⊤ ≠ 0\n⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (⊤ * y) =\n    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ⊤ *\n      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y\n[PROOFSTEP]\nsimp [hy, this]\n[GOAL]\ncase inr.inr.coe\nα : Type u_1\ninst✝⁶ : DecidableEq α\nR : Type u_2\nS : Type u_3\ninst✝⁵ : MulZeroOneClass R\ninst✝⁴ : DecidableEq R\ninst✝³ : Nontrivial R\ninst✝² : MulZeroOneClass S\ninst✝¹ : DecidableEq S\ninst✝ : Nontrivial S\nf : R →*₀ S\nhf : Function.Injective ↑f\nsrc✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f\nsrc✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f\nx✝ y : WithTop R\nthis : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0\nhx✝ : x✝ ≠ 0\nhy : y ≠ 0\nx : R\nhx : ↑x ≠ 0\n⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (↑x * y) =\n    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ↑x *\n      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y\n[PROOFSTEP]\ninduction' y using WithTop.recTopCoe with y\n[GOAL]\ncase inr.inr.coe.top\nα : Type u_1\ninst✝⁶ : DecidableEq α\nR : Type u_2\nS : Type u_3\ninst✝⁵ : MulZeroOneClass R\ninst✝⁴ : DecidableEq R\ninst✝³ : Nontrivial R\ninst✝² : MulZeroOneClass S\ninst✝¹ : DecidableEq S\ninst✝ : Nontrivial S\nf : R →*₀ S\nhf : Function.Injective ↑f\nsrc✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f\nsrc✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f\nx✝ y : WithTop R\nthis : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0\nhx✝ : x✝ ≠ 0\nhy✝ : y ≠ 0\nx : R\nhx : ↑x ≠ 0\nhy : ⊤ ≠ 0\n⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (↑x * ⊤) =\n    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ↑x *\n      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ⊤\n[PROOFSTEP]\nhave : (f x : WithTop S) ≠ 0 := by simpa [hf.eq_iff' (map_zero f)] using hx\n[GOAL]\nα : Type u_1\ninst✝⁶ : DecidableEq α\nR : Type u_2\nS : Type u_3\ninst✝⁵ : MulZeroOneClass R\ninst✝⁴ : DecidableEq R\ninst✝³ : Nontrivial R\ninst✝² : MulZeroOneClass S\ninst✝¹ : DecidableEq S\ninst✝ : Nontrivial S\nf : R →*₀ S\nhf : Function.Injective ↑f\nsrc✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f\nsrc✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f\nx✝ y : WithTop R\nthis : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0\nhx✝ : x✝ ≠ 0\nhy✝ : y ≠ 0\nx : R\nhx : ↑x ≠ 0\nhy : ⊤ ≠ 0\n⊢ ↑(↑f x) ≠ 0\n[PROOFSTEP]\nsimpa [hf.eq_iff' (map_zero f)] using hx\n[GOAL]\ncase inr.inr.coe.top\nα : Type u_1\ninst✝⁶ : DecidableEq α\nR : Type u_2\nS : Type u_3\ninst✝⁵ : MulZeroOneClass R\ninst✝⁴ : DecidableEq R\ninst✝³ : Nontrivial R\ninst✝² : MulZeroOneClass S\ninst✝¹ : DecidableEq S\ninst✝ : Nontrivial S\nf : R →*₀ S\nhf : Function.Injective ↑f\nsrc✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f\nsrc✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f\nx✝ y : WithTop R\nthis✝ : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0\nhx✝ : x✝ ≠ 0\nhy✝ : y ≠ 0\nx : R\nhx : ↑x ≠ 0\nhy : ⊤ ≠ 0\nthis : ↑(↑f x) ≠ 0\n⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (↑x * ⊤) =\n    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ↑x *\n      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ⊤\n[PROOFSTEP]\nsimp [mul_top hx, mul_top this]\n[GOAL]\ncase inr.inr.coe.coe\nα : Type u_1\ninst✝⁶ : DecidableEq α\nR : Type u_2\nS : Type u_3\ninst✝⁵ : MulZeroOneClass R\ninst✝⁴ : DecidableEq R\ninst✝³ : Nontrivial R\ninst✝² : MulZeroOneClass S\ninst✝¹ : DecidableEq S\ninst✝ : Nontrivial S\nf : R →*₀ S\nhf : Function.Injective ↑f\nsrc✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f\nsrc✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f\nx✝ y✝ : WithTop R\nthis : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0\nhx✝ : x✝ ≠ 0\nhy✝ : y✝ ≠ 0\nx : R\nhx : ↑x ≠ 0\ny : R\nhy : ↑y ≠ 0\n⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (↑x * ↑y) =\n    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ↑x *\n      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ↑y\n[PROOFSTEP]\nsimp only [map_coe, ← coe_mul, map_mul]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na b c : WithTop α\n⊢ a * b * c = a * (b * c)\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\nb c : WithTop α\n⊢ 0 * b * c = 0 * (b * c)\n[PROOFSTEP]\nsimp only [zero_mul]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na b c : WithTop α\nha : a ≠ 0\n⊢ a * b * c = a * (b * c)\n[PROOFSTEP]\nrcases eq_or_ne b 0 with (rfl | hb)\n[GOAL]\ncase inr.inl\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na c : WithTop α\nha : a ≠ 0\n⊢ a * 0 * c = a * (0 * c)\n[PROOFSTEP]\nsimp only [zero_mul, mul_zero]\n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na b c : WithTop α\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a * b * c = a * (b * c)\n[PROOFSTEP]\nrcases eq_or_ne c 0 with (rfl | hc)\n[GOAL]\ncase inr.inr.inl\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na b : WithTop α\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a * b * 0 = a * (b * 0)\n[PROOFSTEP]\nsimp only [mul_zero]\n  -- Porting note: below needed to be rewritten due to changed `simp` behaviour for `coe`\n[GOAL]\ncase inr.inr.inr\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na b c : WithTop α\nha : a ≠ 0\nhb : b ≠ 0\nhc : c ≠ 0\n⊢ a * b * c = a * (b * c)\n[PROOFSTEP]\ninduction' a using WithTop.recTopCoe with a\n[GOAL]\ncase inr.inr.inr.top\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na b c : WithTop α\nha✝ : a ≠ 0\nhb : b ≠ 0\nhc : c ≠ 0\nha : ⊤ ≠ 0\n⊢ ⊤ * b * c = ⊤ * (b * c)\n[PROOFSTEP]\nsimp [hb, hc]\n[GOAL]\ncase inr.inr.inr.coe\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na✝ b c : WithTop α\nha✝ : a✝ ≠ 0\nhb : b ≠ 0\nhc : c ≠ 0\na : α\nha : ↑a ≠ 0\n⊢ ↑a * b * c = ↑a * (b * c)\n[PROOFSTEP]\ninduction' b using WithTop.recTopCoe with b\n[GOAL]\ncase inr.inr.inr.coe.top\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na✝ b c : WithTop α\nha✝ : a✝ ≠ 0\nhb✝ : b ≠ 0\nhc : c ≠ 0\na : α\nha : ↑a ≠ 0\nhb : ⊤ ≠ 0\n⊢ ↑a * ⊤ * c = ↑a * (⊤ * c)\n[PROOFSTEP]\nsimp [mul_top ha, top_mul hc]\n[GOAL]\ncase inr.inr.inr.coe.coe\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na✝ b✝ c : WithTop α\nha✝ : a✝ ≠ 0\nhb✝ : b✝ ≠ 0\nhc : c ≠ 0\na : α\nha : ↑a ≠ 0\nb : α\nhb : ↑b ≠ 0\n⊢ ↑a * ↑b * c = ↑a * (↑b * c)\n[PROOFSTEP]\ninduction' c using WithTop.recTopCoe with c\n[GOAL]\ncase inr.inr.inr.coe.coe.top\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na✝ b✝ c : WithTop α\nha✝ : a✝ ≠ 0\nhb✝ : b✝ ≠ 0\nhc✝ : c ≠ 0\na : α\nha : ↑a ≠ 0\nb : α\nhb : ↑b ≠ 0\nhc : ⊤ ≠ 0\n⊢ ↑a * ↑b * ⊤ = ↑a * (↑b * ⊤)\n[PROOFSTEP]\nrw [mul_top hb, mul_top ha]\n[GOAL]\ncase inr.inr.inr.coe.coe.top\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na✝ b✝ c : WithTop α\nha✝ : a✝ ≠ 0\nhb✝ : b✝ ≠ 0\nhc✝ : c ≠ 0\na : α\nha : ↑a ≠ 0\nb : α\nhb : ↑b ≠ 0\nhc : ⊤ ≠ 0\n⊢ ↑a * ↑b * ⊤ = ⊤\n[PROOFSTEP]\nrw [← coe_zero, ne_eq, coe_eq_coe] at ha hb \n[GOAL]\ncase inr.inr.inr.coe.coe.top\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na✝ b✝ c : WithTop α\nha✝ : a✝ ≠ 0\nhb✝ : b✝ ≠ 0\nhc✝ : c ≠ 0\na : α\nha : ¬a = 0\nb : α\nhb : ¬b = 0\nhc : ⊤ ≠ 0\n⊢ ↑a * ↑b * ⊤ = ⊤\n[PROOFSTEP]\nsimp [ha, hb]\n[GOAL]\ncase inr.inr.inr.coe.coe.coe\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : SemigroupWithZero α\ninst✝ : NoZeroDivisors α\nsrc✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop\na✝ b✝ c✝ : WithTop α\nha✝ : a✝ ≠ 0\nhb✝ : b✝ ≠ 0\nhc✝ : c✝ ≠ 0\na : α\nha : ↑a ≠ 0\nb : α\nhb : ↑b ≠ 0\nc : α\nhc : ↑c ≠ 0\n⊢ ↑a * ↑b * ↑c = ↑a * (↑b * ↑c)\n[PROOFSTEP]\nsimp only [← coe_mul, mul_assoc]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\na b c : WithTop α\n⊢ (a + b) * c = a * c + b * c\n[PROOFSTEP]\ninduction' c using WithTop.recTopCoe with c\n[GOAL]\ncase top\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\na b : WithTop α\n⊢ (a + b) * ⊤ = a * ⊤ + b * ⊤\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\na b : WithTop α\nha : a = 0\n⊢ (a + b) * ⊤ = a * ⊤ + b * ⊤\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\na b : WithTop α\nha : ¬a = 0\n⊢ (a + b) * ⊤ = a * ⊤ + b * ⊤\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase coe\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\na b : WithTop α\nc : α\n⊢ (a + b) * ↑c = a * ↑c + b * ↑c\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\na b : WithTop α\nc : α\nhc : c = 0\n⊢ (a + b) * ↑c = a * ↑c + b * ↑c\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\na b : WithTop α\nc : α\nhc : ¬c = 0\n⊢ (a + b) * ↑c = a * ↑c + b * ↑c\n[PROOFSTEP]\nsimp [mul_coe hc]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\na b : WithTop α\nc : α\nhc : ¬c = 0\n⊢ (Option.bind (a + b) fun a => Option.some (a * c)) =\n    (Option.bind a fun a => Option.some (a * c)) + Option.bind b fun a => Option.some (a * c)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase neg.none\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nb : WithTop α\nc : α\nhc : ¬c = 0\n⊢ (Option.bind (none + b) fun a => Option.some (a * c)) =\n    (Option.bind none fun a => Option.some (a * c)) + Option.bind b fun a => Option.some (a * c)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase neg.some\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nb : WithTop α\nc : α\nhc : ¬c = 0\nval✝ : α\n⊢ (Option.bind (Option.some val✝ + b) fun a => Option.some (a * c)) =\n    (Option.bind (Option.some val✝) fun a => Option.some (a * c)) + Option.bind b fun a => Option.some (a * c)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase neg.none.none\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\n⊢ (Option.bind (none + none) fun a => Option.some (a * c)) =\n    (Option.bind none fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)\ncase neg.none.some\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\nval✝ : α\n⊢ (Option.bind (none + Option.some val✝) fun a => Option.some (a * c)) =\n    (Option.bind none fun a => Option.some (a * c)) + Option.bind (Option.some val✝) fun a => Option.some (a * c)\ncase neg.some.none\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\nval✝ : α\n⊢ (Option.bind (Option.some val✝ + none) fun a => Option.some (a * c)) =\n    (Option.bind (Option.some val✝) fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)\ncase neg.some.some\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\nval✝¹ val✝ : α\n⊢ (Option.bind (Option.some val✝¹ + Option.some val✝) fun a => Option.some (a * c)) =\n    (Option.bind (Option.some val✝¹) fun a => Option.some (a * c)) +\n      Option.bind (Option.some val✝) fun a => Option.some (a * c)\n[PROOFSTEP]\nrepeat'\n  first\n  | rfl\n  | exact congr_arg some (add_mul _ _ _)\n[GOAL]\ncase neg.none.none\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\n⊢ (Option.bind (none + none) fun a => Option.some (a * c)) =\n    (Option.bind none fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)\n[PROOFSTEP]\nfirst\n| rfl\n| exact congr_arg some (add_mul _ _ _)\n[GOAL]\ncase neg.none.none\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\n⊢ (Option.bind (none + none) fun a => Option.some (a * c)) =\n    (Option.bind none fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg.none.some\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\nval✝ : α\n⊢ (Option.bind (none + Option.some val✝) fun a => Option.some (a * c)) =\n    (Option.bind none fun a => Option.some (a * c)) + Option.bind (Option.some val✝) fun a => Option.some (a * c)\n[PROOFSTEP]\nfirst\n| rfl\n| exact congr_arg some (add_mul _ _ _)\n[GOAL]\ncase neg.none.some\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\nval✝ : α\n⊢ (Option.bind (none + Option.some val✝) fun a => Option.some (a * c)) =\n    (Option.bind none fun a => Option.some (a * c)) + Option.bind (Option.some val✝) fun a => Option.some (a * c)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg.some.none\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\nval✝ : α\n⊢ (Option.bind (Option.some val✝ + none) fun a => Option.some (a * c)) =\n    (Option.bind (Option.some val✝) fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)\n[PROOFSTEP]\nfirst\n| rfl\n| exact congr_arg some (add_mul _ _ _)\n[GOAL]\ncase neg.some.none\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\nval✝ : α\n⊢ (Option.bind (Option.some val✝ + none) fun a => Option.some (a * c)) =\n    (Option.bind (Option.some val✝) fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg.some.some\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\nval✝¹ val✝ : α\n⊢ (Option.bind (Option.some val✝¹ + Option.some val✝) fun a => Option.some (a * c)) =\n    (Option.bind (Option.some val✝¹) fun a => Option.some (a * c)) +\n      Option.bind (Option.some val✝) fun a => Option.some (a * c)\n[PROOFSTEP]\nfirst\n| rfl\n| exact congr_arg some (add_mul _ _ _)\n[GOAL]\ncase neg.some.some\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\nval✝¹ val✝ : α\n⊢ (Option.bind (Option.some val✝¹ + Option.some val✝) fun a => Option.some (a * c)) =\n    (Option.bind (Option.some val✝¹) fun a => Option.some (a * c)) +\n      Option.bind (Option.some val✝) fun a => Option.some (a * c)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg.some.some\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CanonicallyOrderedCommSemiring α\nc : α\nhc : ¬c = 0\nval✝¹ val✝ : α\n⊢ (Option.bind (Option.some val✝¹ + Option.some val✝) fun a => Option.some (a * c)) =\n    (Option.bind (Option.some val✝¹) fun a => Option.some (a * c)) +\n      Option.bind (Option.some val✝) fun a => Option.some (a * c)\n[PROOFSTEP]\nexact congr_arg some (add_mul _ _ _)\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CanonicallyOrderedCommSemiring α\ninst✝ : Nontrivial α\nsrc✝¹ : AddCommMonoidWithOne (WithTop α) := addCommMonoidWithOne\nsrc✝ : CommMonoidWithZero (WithTop α) := commMonoidWithZero\na b c : WithTop α\n⊢ a * (b + c) = a * b + a * c\n[PROOFSTEP]\nrw [mul_comm, distrib', mul_comm b, mul_comm c]\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\n⊢ Covariant { x // 0 ≤ x } (WithBot α) (fun x y => ↑x * y) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nintro ⟨x, x0⟩ a b h\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : a ≤ b\n⊢ (fun x y => ↑x * y) { val := x, property := x0 } a ≤ (fun x y => ↑x * y) { val := x, property := x0 } b\n[PROOFSTEP]\nsimp only [Subtype.coe_mk]\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : a ≤ b\n⊢ x * a ≤ x * b\n[PROOFSTEP]\nrcases eq_or_ne x 0 with rfl | x0'\n[GOAL]\ncase inl\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\na b : WithBot α\nh : a ≤ b\nx0 : 0 ≤ 0\n⊢ 0 * a ≤ 0 * b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : a ≤ b\nx0' : x ≠ 0\n⊢ x * a ≤ x * b\n[PROOFSTEP]\nlift x to α\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : a ≤ b\nx0' : x ≠ 0\n⊢ x ≠ ⊥\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\na b : WithBot α\nh : a ≤ b\nx0 : 0 ≤ ⊥\nx0' : ⊥ ≠ 0\n⊢ False\n[PROOFSTEP]\nexact (WithBot.bot_lt_coe (0 : α)).not_le x0\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\na b : WithBot α\nh : a ≤ b\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\n⊢ ↑x * a ≤ ↑x * b\n[PROOFSTEP]\ninduction a using WithBot.recBotCoe\n[GOAL]\ncase inr.intro.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\nb : WithBot α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\nh : ⊥ ≤ b\n⊢ ↑x * ⊥ ≤ ↑x * b\n[PROOFSTEP]\nsimp_rw [mul_bot x0', bot_le]\n[GOAL]\ncase inr.intro.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\nb : WithBot α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝ : α\nh : ↑a✝ ≤ b\n⊢ ↑x * ↑a✝ ≤ ↑x * b\n[PROOFSTEP]\ninduction b using WithBot.recBotCoe\n[GOAL]\ncase inr.intro.coe.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝ : α\nh : ↑a✝ ≤ ⊥\n⊢ ↑x * ↑a✝ ≤ ↑x * ⊥\n[PROOFSTEP]\nexact absurd h (bot_lt_coe _).not_le\n[GOAL]\ncase inr.intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝¹ a✝ : α\nh : ↑a✝¹ ≤ ↑a✝\n⊢ ↑x * ↑a✝¹ ≤ ↑x * ↑a✝\n[PROOFSTEP]\nsimp only [← coe_mul, coe_le_coe] at *\n[GOAL]\ncase inr.intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝¹ a✝ : α\nh : a✝¹ ≤ a✝\n⊢ x * a✝¹ ≤ x * a✝\n[PROOFSTEP]\nnorm_cast at x0 \n[GOAL]\ncase inr.intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMono α\nx : α\nx0' : ↑x ≠ 0\na✝¹ a✝ : α\nh : a✝¹ ≤ a✝\nx0 : 0 ≤ x\n⊢ x * a✝¹ ≤ x * a✝\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left h x0\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\n⊢ Covariant { x // 0 ≤ x } (WithBot α) (fun x y => y * ↑x) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nintro ⟨x, x0⟩ a b h\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : a ≤ b\n⊢ (fun x y => y * ↑x) { val := x, property := x0 } a ≤ (fun x y => y * ↑x) { val := x, property := x0 } b\n[PROOFSTEP]\nsimp only [Subtype.coe_mk]\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : a ≤ b\n⊢ a * x ≤ b * x\n[PROOFSTEP]\nrcases eq_or_ne x 0 with rfl | x0'\n[GOAL]\ncase inl\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\na b : WithBot α\nh : a ≤ b\nx0 : 0 ≤ 0\n⊢ a * 0 ≤ b * 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : a ≤ b\nx0' : x ≠ 0\n⊢ a * x ≤ b * x\n[PROOFSTEP]\nlift x to α\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : a ≤ b\nx0' : x ≠ 0\n⊢ x ≠ ⊥\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\na b : WithBot α\nh : a ≤ b\nx0 : 0 ≤ ⊥\nx0' : ⊥ ≠ 0\n⊢ False\n[PROOFSTEP]\nexact (WithBot.bot_lt_coe (0 : α)).not_le x0\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\na b : WithBot α\nh : a ≤ b\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\n⊢ a * ↑x ≤ b * ↑x\n[PROOFSTEP]\ninduction a using WithBot.recBotCoe\n[GOAL]\ncase inr.intro.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\nb : WithBot α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\nh : ⊥ ≤ b\n⊢ ⊥ * ↑x ≤ b * ↑x\n[PROOFSTEP]\nsimp_rw [bot_mul x0', bot_le]\n[GOAL]\ncase inr.intro.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\nb : WithBot α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝ : α\nh : ↑a✝ ≤ b\n⊢ ↑a✝ * ↑x ≤ b * ↑x\n[PROOFSTEP]\ninduction b using WithBot.recBotCoe\n[GOAL]\ncase inr.intro.coe.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝ : α\nh : ↑a✝ ≤ ⊥\n⊢ ↑a✝ * ↑x ≤ ⊥ * ↑x\n[PROOFSTEP]\nexact absurd h (bot_lt_coe _).not_le\n[GOAL]\ncase inr.intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝¹ a✝ : α\nh : ↑a✝¹ ≤ ↑a✝\n⊢ ↑a✝¹ * ↑x ≤ ↑a✝ * ↑x\n[PROOFSTEP]\nsimp only [← coe_mul, coe_le_coe] at *\n[GOAL]\ncase inr.intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝¹ a✝ : α\nh : a✝¹ ≤ a✝\n⊢ a✝¹ * x ≤ a✝ * x\n[PROOFSTEP]\nnorm_cast at x0 \n[GOAL]\ncase inr.intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMono α\nx : α\nx0' : ↑x ≠ 0\na✝¹ a✝ : α\nh : a✝¹ ≤ a✝\nx0 : 0 ≤ x\n⊢ a✝¹ * x ≤ a✝ * x\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right h x0\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulStrictMono α\n⊢ Covariant { x // 0 < x } (WithBot α) (fun x y => ↑x * y) fun x x_1 => x < x_1\n[PROOFSTEP]\nintro ⟨x, x0⟩ a b h\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulStrictMono α\nx : WithBot α\nx0 : 0 < x\na b : WithBot α\nh : a < b\n⊢ (fun x y => ↑x * y) { val := x, property := x0 } a < (fun x y => ↑x * y) { val := x, property := x0 } b\n[PROOFSTEP]\nsimp only [Subtype.coe_mk]\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulStrictMono α\nx : WithBot α\nx0 : 0 < x\na b : WithBot α\nh : a < b\n⊢ x * a < x * b\n[PROOFSTEP]\nlift x to α using x0.ne_bot\n[GOAL]\ncase intro\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulStrictMono α\na b : WithBot α\nh : a < b\nx : α\nx0 : 0 < ↑x\n⊢ ↑x * a < ↑x * b\n[PROOFSTEP]\ninduction b using WithBot.recBotCoe\n[GOAL]\ncase intro.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulStrictMono α\na : WithBot α\nx : α\nx0 : 0 < ↑x\nh : a < ⊥\n⊢ ↑x * a < ↑x * ⊥\n[PROOFSTEP]\nexact absurd h not_lt_bot\n[GOAL]\ncase intro.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulStrictMono α\na : WithBot α\nx : α\nx0 : 0 < ↑x\na✝ : α\nh : a < ↑a✝\n⊢ ↑x * a < ↑x * ↑a✝\n[PROOFSTEP]\ninduction a using WithBot.recBotCoe\n[GOAL]\ncase intro.coe.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulStrictMono α\nx : α\nx0 : 0 < ↑x\na✝ : α\nh : ⊥ < ↑a✝\n⊢ ↑x * ⊥ < ↑x * ↑a✝\n[PROOFSTEP]\nsimp_rw [mul_bot x0.ne.symm, ← coe_mul, bot_lt_coe]\n[GOAL]\ncase intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulStrictMono α\nx : α\nx0 : 0 < ↑x\na✝¹ a✝ : α\nh : ↑a✝ < ↑a✝¹\n⊢ ↑x * ↑a✝ < ↑x * ↑a✝¹\n[PROOFSTEP]\nsimp only [← coe_mul, coe_lt_coe] at *\n[GOAL]\ncase intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulStrictMono α\nx : α\nx0 : 0 < ↑x\na✝¹ a✝ : α\nh : a✝ < a✝¹\n⊢ x * a✝ < x * a✝¹\n[PROOFSTEP]\nnorm_cast at x0 \n[GOAL]\ncase intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulStrictMono α\nx a✝¹ a✝ : α\nh : a✝ < a✝¹\nx0 : 0 < x\n⊢ x * a✝ < x * a✝¹\n[PROOFSTEP]\nexact mul_lt_mul_of_pos_left h x0\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosStrictMono α\n⊢ Covariant { x // 0 < x } (WithBot α) (fun x y => y * ↑x) fun x x_1 => x < x_1\n[PROOFSTEP]\nintro ⟨x, x0⟩ a b h\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosStrictMono α\nx : WithBot α\nx0 : 0 < x\na b : WithBot α\nh : a < b\n⊢ (fun x y => y * ↑x) { val := x, property := x0 } a < (fun x y => y * ↑x) { val := x, property := x0 } b\n[PROOFSTEP]\nsimp only [Subtype.coe_mk]\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosStrictMono α\nx : WithBot α\nx0 : 0 < x\na b : WithBot α\nh : a < b\n⊢ a * x < b * x\n[PROOFSTEP]\nlift x to α using x0.ne_bot\n[GOAL]\ncase intro\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosStrictMono α\na b : WithBot α\nh : a < b\nx : α\nx0 : 0 < ↑x\n⊢ a * ↑x < b * ↑x\n[PROOFSTEP]\ninduction b using WithBot.recBotCoe\n[GOAL]\ncase intro.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosStrictMono α\na : WithBot α\nx : α\nx0 : 0 < ↑x\nh : a < ⊥\n⊢ a * ↑x < ⊥ * ↑x\n[PROOFSTEP]\nexact absurd h not_lt_bot\n[GOAL]\ncase intro.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosStrictMono α\na : WithBot α\nx : α\nx0 : 0 < ↑x\na✝ : α\nh : a < ↑a✝\n⊢ a * ↑x < ↑a✝ * ↑x\n[PROOFSTEP]\ninduction a using WithBot.recBotCoe\n[GOAL]\ncase intro.coe.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosStrictMono α\nx : α\nx0 : 0 < ↑x\na✝ : α\nh : ⊥ < ↑a✝\n⊢ ⊥ * ↑x < ↑a✝ * ↑x\n[PROOFSTEP]\nsimp_rw [bot_mul x0.ne.symm, ← coe_mul, bot_lt_coe]\n[GOAL]\ncase intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosStrictMono α\nx : α\nx0 : 0 < ↑x\na✝¹ a✝ : α\nh : ↑a✝ < ↑a✝¹\n⊢ ↑a✝ * ↑x < ↑a✝¹ * ↑x\n[PROOFSTEP]\nsimp only [← coe_mul, coe_lt_coe] at *\n[GOAL]\ncase intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosStrictMono α\nx : α\nx0 : 0 < ↑x\na✝¹ a✝ : α\nh : a✝ < a✝¹\n⊢ a✝ * x < a✝¹ * x\n[PROOFSTEP]\nnorm_cast at x0 \n[GOAL]\ncase intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosStrictMono α\nx a✝¹ a✝ : α\nh : a✝ < a✝¹\nx0 : 0 < x\n⊢ a✝ * x < a✝¹ * x\n[PROOFSTEP]\nexact mul_lt_mul_of_pos_right h x0\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\n⊢ Contravariant { x // 0 ≤ x } (WithBot α) (fun x y => ↑x * y) fun x x_1 => x < x_1\n[PROOFSTEP]\nintro ⟨x, x0⟩ a b h\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : (fun x y => ↑x * y) { val := x, property := x0 } a < (fun x y => ↑x * y) { val := x, property := x0 } b\n⊢ a < b\n[PROOFSTEP]\nsimp only [Subtype.coe_mk] at h \n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : x * a < x * b\n⊢ a < b\n[PROOFSTEP]\nrcases eq_or_ne x 0 with rfl | x0'\n[GOAL]\ncase inl\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\na b : WithBot α\nx0 : 0 ≤ 0\nh : 0 * a < 0 * b\n⊢ a < b\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase inr\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : x * a < x * b\nx0' : x ≠ 0\n⊢ a < b\n[PROOFSTEP]\nlift x to α\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : x * a < x * b\nx0' : x ≠ 0\n⊢ x ≠ ⊥\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\na b : WithBot α\nx0 : 0 ≤ ⊥\nh : ⊥ * a < ⊥ * b\nx0' : ⊥ ≠ 0\n⊢ False\n[PROOFSTEP]\nexact (WithBot.bot_lt_coe (0 : α)).not_le x0\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\na b : WithBot α\nx : α\nx0 : 0 ≤ ↑x\nh : ↑x * a < ↑x * b\nx0' : ↑x ≠ 0\n⊢ a < b\n[PROOFSTEP]\ninduction b using WithBot.recBotCoe\n[GOAL]\ncase inr.intro.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\na : WithBot α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\nh : ↑x * a < ↑x * ⊥\n⊢ a < ⊥\n[PROOFSTEP]\nrw [mul_bot x0'] at h \n[GOAL]\ncase inr.intro.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\na : WithBot α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\nh : ↑x * a < ⊥\n⊢ a < ⊥\n[PROOFSTEP]\nexact absurd h bot_le.not_lt\n[GOAL]\ncase inr.intro.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\na : WithBot α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝ : α\nh : ↑x * a < ↑x * ↑a✝\n⊢ a < ↑a✝\n[PROOFSTEP]\ninduction a using WithBot.recBotCoe\n[GOAL]\ncase inr.intro.coe.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝ : α\nh : ↑x * ⊥ < ↑x * ↑a✝\n⊢ ⊥ < ↑a✝\n[PROOFSTEP]\nexact WithBot.bot_lt_coe _\n[GOAL]\ncase inr.intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝¹ a✝ : α\nh : ↑x * ↑a✝ < ↑x * ↑a✝¹\n⊢ ↑a✝ < ↑a✝¹\n[PROOFSTEP]\nsimp only [← coe_mul, coe_lt_coe] at *\n[GOAL]\ncase inr.intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝¹ a✝ : α\nh : x * a✝ < x * a✝¹\n⊢ a✝ < a✝¹\n[PROOFSTEP]\nnorm_cast at x0 \n[GOAL]\ncase inr.intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulReflectLT α\nx : α\nx0' : ↑x ≠ 0\na✝¹ a✝ : α\nh : x * a✝ < x * a✝¹\nx0 : 0 ≤ x\n⊢ a✝ < a✝¹\n[PROOFSTEP]\nexact lt_of_mul_lt_mul_left h x0\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\n⊢ Contravariant { x // 0 ≤ x } (WithBot α) (fun x y => y * ↑x) fun x x_1 => x < x_1\n[PROOFSTEP]\nintro ⟨x, x0⟩ a b h\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : (fun x y => y * ↑x) { val := x, property := x0 } a < (fun x y => y * ↑x) { val := x, property := x0 } b\n⊢ a < b\n[PROOFSTEP]\nsimp only [Subtype.coe_mk] at h \n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : a * x < b * x\n⊢ a < b\n[PROOFSTEP]\nrcases eq_or_ne x 0 with rfl | x0'\n[GOAL]\ncase inl\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\na b : WithBot α\nx0 : 0 ≤ 0\nh : a * 0 < b * 0\n⊢ a < b\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase inr\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : a * x < b * x\nx0' : x ≠ 0\n⊢ a < b\n[PROOFSTEP]\nlift x to α\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\nx : WithBot α\nx0 : 0 ≤ x\na b : WithBot α\nh : a * x < b * x\nx0' : x ≠ 0\n⊢ x ≠ ⊥\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\na b : WithBot α\nx0 : 0 ≤ ⊥\nh : a * ⊥ < b * ⊥\nx0' : ⊥ ≠ 0\n⊢ False\n[PROOFSTEP]\nexact (WithBot.bot_lt_coe (0 : α)).not_le x0\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\na b : WithBot α\nx : α\nx0 : 0 ≤ ↑x\nh : a * ↑x < b * ↑x\nx0' : ↑x ≠ 0\n⊢ a < b\n[PROOFSTEP]\ninduction b using WithBot.recBotCoe\n[GOAL]\ncase inr.intro.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\na : WithBot α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\nh : a * ↑x < ⊥ * ↑x\n⊢ a < ⊥\n[PROOFSTEP]\nrw [bot_mul x0'] at h \n[GOAL]\ncase inr.intro.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\na : WithBot α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\nh : a * ↑x < ⊥\n⊢ a < ⊥\n[PROOFSTEP]\nexact absurd h bot_le.not_lt\n[GOAL]\ncase inr.intro.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\na : WithBot α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝ : α\nh : a * ↑x < ↑a✝ * ↑x\n⊢ a < ↑a✝\n[PROOFSTEP]\ninduction a using WithBot.recBotCoe\n[GOAL]\ncase inr.intro.coe.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝ : α\nh : ⊥ * ↑x < ↑a✝ * ↑x\n⊢ ⊥ < ↑a✝\n[PROOFSTEP]\nexact WithBot.bot_lt_coe _\n[GOAL]\ncase inr.intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝¹ a✝ : α\nh : ↑a✝ * ↑x < ↑a✝¹ * ↑x\n⊢ ↑a✝ < ↑a✝¹\n[PROOFSTEP]\nsimp only [← coe_mul, coe_lt_coe] at *\n[GOAL]\ncase inr.intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\nx : α\nx0 : 0 ≤ ↑x\nx0' : ↑x ≠ 0\na✝¹ a✝ : α\nh : a✝ * x < a✝¹ * x\n⊢ a✝ < a✝¹\n[PROOFSTEP]\nnorm_cast at x0 \n[GOAL]\ncase inr.intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosReflectLT α\nx : α\nx0' : ↑x ≠ 0\na✝¹ a✝ : α\nh : a✝ * x < a✝¹ * x\nx0 : 0 ≤ x\n⊢ a✝ < a✝¹\n[PROOFSTEP]\nexact lt_of_mul_lt_mul_right h x0\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMonoRev α\n⊢ Contravariant { x // 0 < x } (WithBot α) (fun x y => ↑x * y) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nintro ⟨x, x0⟩ a b h\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMonoRev α\nx : WithBot α\nx0 : 0 < x\na b : WithBot α\nh : (fun x y => ↑x * y) { val := x, property := x0 } a ≤ (fun x y => ↑x * y) { val := x, property := x0 } b\n⊢ a ≤ b\n[PROOFSTEP]\nsimp only [Subtype.coe_mk] at h \n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMonoRev α\nx : WithBot α\nx0 : 0 < x\na b : WithBot α\nh : x * a ≤ x * b\n⊢ a ≤ b\n[PROOFSTEP]\nlift x to α using x0.ne_bot\n[GOAL]\ncase intro\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMonoRev α\na b : WithBot α\nx : α\nx0 : 0 < ↑x\nh : ↑x * a ≤ ↑x * b\n⊢ a ≤ b\n[PROOFSTEP]\ninduction a using WithBot.recBotCoe\n[GOAL]\ncase intro.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMonoRev α\nb : WithBot α\nx : α\nx0 : 0 < ↑x\nh : ↑x * ⊥ ≤ ↑x * b\n⊢ ⊥ ≤ b\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase intro.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMonoRev α\nb : WithBot α\nx : α\nx0 : 0 < ↑x\na✝ : α\nh : ↑x * ↑a✝ ≤ ↑x * b\n⊢ ↑a✝ ≤ b\n[PROOFSTEP]\ninduction b using WithBot.recBotCoe\n[GOAL]\ncase intro.coe.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMonoRev α\nx : α\nx0 : 0 < ↑x\na✝ : α\nh : ↑x * ↑a✝ ≤ ↑x * ⊥\n⊢ ↑a✝ ≤ ⊥\n[PROOFSTEP]\nrw [mul_bot x0.ne.symm, ← coe_mul] at h \n[GOAL]\ncase intro.coe.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMonoRev α\nx : α\nx0 : 0 < ↑x\na✝ : α\nh : ↑(x * a✝) ≤ ⊥\n⊢ ↑a✝ ≤ ⊥\n[PROOFSTEP]\nexact absurd h (bot_lt_coe _).not_le\n[GOAL]\ncase intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMonoRev α\nx : α\nx0 : 0 < ↑x\na✝¹ a✝ : α\nh : ↑x * ↑a✝¹ ≤ ↑x * ↑a✝\n⊢ ↑a✝¹ ≤ ↑a✝\n[PROOFSTEP]\nsimp only [← coe_mul, coe_le_coe] at *\n[GOAL]\ncase intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMonoRev α\nx : α\nx0 : 0 < ↑x\na✝¹ a✝ : α\nh : x * a✝¹ ≤ x * a✝\n⊢ a✝¹ ≤ a✝\n[PROOFSTEP]\nnorm_cast at x0 \n[GOAL]\ncase intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : PosMulMonoRev α\nx a✝¹ a✝ : α\nh : x * a✝¹ ≤ x * a✝\nx0 : 0 < x\n⊢ a✝¹ ≤ a✝\n[PROOFSTEP]\nexact le_of_mul_le_mul_left h x0\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMonoRev α\n⊢ Contravariant { x // 0 < x } (WithBot α) (fun x y => y * ↑x) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nintro ⟨x, x0⟩ a b h\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMonoRev α\nx : WithBot α\nx0 : 0 < x\na b : WithBot α\nh : (fun x y => y * ↑x) { val := x, property := x0 } a ≤ (fun x y => y * ↑x) { val := x, property := x0 } b\n⊢ a ≤ b\n[PROOFSTEP]\nsimp only [Subtype.coe_mk] at h \n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMonoRev α\nx : WithBot α\nx0 : 0 < x\na b : WithBot α\nh : a * x ≤ b * x\n⊢ a ≤ b\n[PROOFSTEP]\nlift x to α using x0.ne_bot\n[GOAL]\ncase intro\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMonoRev α\na b : WithBot α\nx : α\nx0 : 0 < ↑x\nh : a * ↑x ≤ b * ↑x\n⊢ a ≤ b\n[PROOFSTEP]\ninduction a using WithBot.recBotCoe\n[GOAL]\ncase intro.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMonoRev α\nb : WithBot α\nx : α\nx0 : 0 < ↑x\nh : ⊥ * ↑x ≤ b * ↑x\n⊢ ⊥ ≤ b\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase intro.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMonoRev α\nb : WithBot α\nx : α\nx0 : 0 < ↑x\na✝ : α\nh : ↑a✝ * ↑x ≤ b * ↑x\n⊢ ↑a✝ ≤ b\n[PROOFSTEP]\ninduction b using WithBot.recBotCoe\n[GOAL]\ncase intro.coe.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMonoRev α\nx : α\nx0 : 0 < ↑x\na✝ : α\nh : ↑a✝ * ↑x ≤ ⊥ * ↑x\n⊢ ↑a✝ ≤ ⊥\n[PROOFSTEP]\nrw [bot_mul x0.ne.symm, ← coe_mul] at h \n[GOAL]\ncase intro.coe.bot\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMonoRev α\nx : α\nx0 : 0 < ↑x\na✝ : α\nh : ↑(a✝ * x) ≤ ⊥\n⊢ ↑a✝ ≤ ⊥\n[PROOFSTEP]\nexact absurd h (bot_lt_coe _).not_le\n[GOAL]\ncase intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMonoRev α\nx : α\nx0 : 0 < ↑x\na✝¹ a✝ : α\nh : ↑a✝¹ * ↑x ≤ ↑a✝ * ↑x\n⊢ ↑a✝¹ ≤ ↑a✝\n[PROOFSTEP]\nsimp only [← coe_mul, coe_le_coe] at *\n[GOAL]\ncase intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMonoRev α\nx : α\nx0 : 0 < ↑x\na✝¹ a✝ : α\nh : a✝¹ * x ≤ a✝ * x\n⊢ a✝¹ ≤ a✝\n[PROOFSTEP]\nnorm_cast at x0 \n[GOAL]\ncase intro.coe.coe\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : MulZeroClass α\ninst✝¹ : Preorder α\ninst✝ : MulPosMonoRev α\nx a✝¹ a✝ : α\nh : a✝¹ * x ≤ a✝ * x\nx0 : 0 < x\n⊢ a✝¹ ≤ a✝\n[PROOFSTEP]\nexact le_of_mul_le_mul_right h x0\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Ring.WithTop", "llama_tokens": 29288, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.640635854839898, "lm_q2_score": 0.6224593382055109, "lm_q1q2_score": 0.3987697702343647}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝¹ : IsROrC 𝕜\nE : Type u_2\ninst✝ : NormedAddCommGroup E\nz : E\n⊢ ‖↑‖z‖‖ = ‖z‖\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\nhx : x ≠ 0\n⊢ ‖(↑‖x‖)⁻¹ • x‖ = 1\n[PROOFSTEP]\nhave : ‖x‖ ≠ 0 := by simp [hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\nhx : x ≠ 0\n⊢ ‖x‖ ≠ 0\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nx : E\nhx : x ≠ 0\nthis : ‖x‖ ≠ 0\n⊢ ‖(↑‖x‖)⁻¹ • x‖ = 1\n[PROOFSTEP]\nfield_simp [norm_smul]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_nonneg : 0 ≤ r\nx : E\nhx : x ≠ 0\n⊢ ‖(↑r * (↑‖x‖)⁻¹) • x‖ = r\n[PROOFSTEP]\nhave : ‖x‖ ≠ 0 := by simp [hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_nonneg : 0 ≤ r\nx : E\nhx : x ≠ 0\n⊢ ‖x‖ ≠ 0\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_nonneg : 0 ≤ r\nx : E\nhx : x ≠ 0\nthis : ‖x‖ ≠ 0\n⊢ ‖(↑r * (↑‖x‖)⁻¹) • x‖ = r\n[PROOFSTEP]\nfield_simp [norm_smul, r_nonneg, isROrC_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\n⊢ ‖↑f z‖ ≤ c / r * ‖z‖\n[PROOFSTEP]\nby_cases z_zero : z = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : z = 0\n⊢ ‖↑f z‖ ≤ c / r * ‖z‖\n[PROOFSTEP]\nrw [z_zero]\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : z = 0\n⊢ ‖↑f 0‖ ≤ c / r * ‖0‖\n[PROOFSTEP]\nsimp only [LinearMap.map_zero, norm_zero, mul_zero]\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : z = 0\n⊢ 0 ≤ 0\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\n⊢ ‖↑f z‖ ≤ c / r * ‖z‖\n[PROOFSTEP]\nset z₁ := ((r : 𝕜) * (‖z‖ : 𝕜)⁻¹) • z with hz₁\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\n⊢ ‖↑f z‖ ≤ c / r * ‖z‖\n[PROOFSTEP]\nhave norm_f_z₁ : ‖f z₁‖ ≤ c := by\n  apply h\n  rw [mem_sphere_zero_iff_norm]\n  exact norm_smul_inv_norm' r_pos.le z_zero\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\n⊢ ‖↑f z₁‖ ≤ c\n[PROOFSTEP]\napply h\n[GOAL]\ncase a\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\n⊢ z₁ ∈ sphere 0 r\n[PROOFSTEP]\nrw [mem_sphere_zero_iff_norm]\n[GOAL]\ncase a\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\n⊢ ‖z₁‖ = r\n[PROOFSTEP]\nexact norm_smul_inv_norm' r_pos.le z_zero\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\nnorm_f_z₁ : ‖↑f z₁‖ ≤ c\n⊢ ‖↑f z‖ ≤ c / r * ‖z‖\n[PROOFSTEP]\nhave r_ne_zero : (r : 𝕜) ≠ 0 := IsROrC.ofReal_ne_zero.mpr r_pos.ne'\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\nnorm_f_z₁ : ‖↑f z₁‖ ≤ c\nr_ne_zero : ↑r ≠ 0\n⊢ ‖↑f z‖ ≤ c / r * ‖z‖\n[PROOFSTEP]\nhave eq : f z = ‖z‖ / r * f z₁ := by\n  rw [hz₁, LinearMap.map_smul, smul_eq_mul]\n  rw [← mul_assoc, ← mul_assoc, div_mul_cancel _ r_ne_zero, mul_inv_cancel, one_mul]\n  simp only [z_zero, IsROrC.ofReal_eq_zero, norm_eq_zero, Ne.def, not_false_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\nnorm_f_z₁ : ‖↑f z₁‖ ≤ c\nr_ne_zero : ↑r ≠ 0\n⊢ ↑f z = ↑‖z‖ / ↑r * ↑f z₁\n[PROOFSTEP]\nrw [hz₁, LinearMap.map_smul, smul_eq_mul]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\nnorm_f_z₁ : ‖↑f z₁‖ ≤ c\nr_ne_zero : ↑r ≠ 0\n⊢ ↑f z = ↑‖z‖ / ↑r * (↑r * (↑‖z‖)⁻¹ * ↑f z)\n[PROOFSTEP]\nrw [← mul_assoc, ← mul_assoc, div_mul_cancel _ r_ne_zero, mul_inv_cancel, one_mul]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\nnorm_f_z₁ : ‖↑f z₁‖ ≤ c\nr_ne_zero : ↑r ≠ 0\n⊢ ↑‖z‖ ≠ 0\n[PROOFSTEP]\nsimp only [z_zero, IsROrC.ofReal_eq_zero, norm_eq_zero, Ne.def, not_false_iff]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\nnorm_f_z₁ : ‖↑f z₁‖ ≤ c\nr_ne_zero : ↑r ≠ 0\neq : ↑f z = ↑‖z‖ / ↑r * ↑f z₁\n⊢ ‖↑f z‖ ≤ c / r * ‖z‖\n[PROOFSTEP]\nrw [eq, norm_mul, norm_div, IsROrC.norm_coe_norm, IsROrC.norm_of_nonneg r_pos.le, div_mul_eq_mul_div,\n  div_mul_eq_mul_div, mul_comm]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\nnorm_f_z₁ : ‖↑f z₁‖ ≤ c\nr_ne_zero : ↑r ≠ 0\neq : ↑f z = ↑‖z‖ / ↑r * ↑f z₁\n⊢ ‖↑f z₁‖ * ‖z‖ / r ≤ c * ‖z‖ / r\n[PROOFSTEP]\napply div_le_div _ _ r_pos rfl.ge\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\nnorm_f_z₁ : ‖↑f z₁‖ ≤ c\nr_ne_zero : ↑r ≠ 0\neq : ↑f z = ↑‖z‖ / ↑r * ↑f z₁\n⊢ 0 ≤ c * ‖z‖\n[PROOFSTEP]\nexact mul_nonneg ((norm_nonneg _).trans norm_f_z₁) (norm_nonneg z)\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →ₗ[𝕜] 𝕜\nh : ∀ (z : E), z ∈ sphere 0 r → ‖↑f z‖ ≤ c\nz : E\nz_zero : ¬z = 0\nz₁ : E := (↑r * (↑‖z‖)⁻¹) • z\nhz₁ : z₁ = (↑r * (↑‖z‖)⁻¹) • z\nnorm_f_z₁ : ‖↑f z₁‖ ≤ c\nr_ne_zero : ↑r ≠ 0\neq : ↑f z = ↑‖z‖ / ↑r * ↑f z₁\n⊢ ‖↑f z₁‖ * ‖z‖ ≤ c * ‖z‖\n[PROOFSTEP]\napply mul_le_mul norm_f_z₁ rfl.le (norm_nonneg z) ((norm_nonneg _).trans norm_f_z₁)\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →L[𝕜] 𝕜\nh : ∀ (z : E), z ∈ closedBall 0 r → ‖↑f z‖ ≤ c\n⊢ ‖f‖ ≤ c / r\n[PROOFSTEP]\napply ContinuousLinearMap.op_norm_le_bound\n[GOAL]\ncase hMp\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →L[𝕜] 𝕜\nh : ∀ (z : E), z ∈ closedBall 0 r → ‖↑f z‖ ≤ c\n⊢ 0 ≤ c / r\n[PROOFSTEP]\napply div_nonneg _ r_pos.le\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →L[𝕜] 𝕜\nh : ∀ (z : E), z ∈ closedBall 0 r → ‖↑f z‖ ≤ c\n⊢ 0 ≤ c\n[PROOFSTEP]\nexact (norm_nonneg _).trans (h 0 (by simp only [norm_zero, mem_closedBall, dist_zero_left, r_pos.le]))\n[GOAL]\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →L[𝕜] 𝕜\nh : ∀ (z : E), z ∈ closedBall 0 r → ‖↑f z‖ ≤ c\n⊢ 0 ∈ closedBall 0 r\n[PROOFSTEP]\nsimp only [norm_zero, mem_closedBall, dist_zero_left, r_pos.le]\n[GOAL]\ncase hM\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →L[𝕜] 𝕜\nh : ∀ (z : E), z ∈ closedBall 0 r → ‖↑f z‖ ≤ c\n⊢ ∀ (x : E), ‖↑f x‖ ≤ c / r * ‖x‖\n[PROOFSTEP]\napply LinearMap.bound_of_ball_bound' r_pos\n[GOAL]\ncase hM.h\n𝕜 : Type u_1\ninst✝² : IsROrC 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nr : ℝ\nr_pos : 0 < r\nc : ℝ\nf : E →L[𝕜] 𝕜\nh : ∀ (z : E), z ∈ closedBall 0 r → ‖↑f z‖ ≤ c\n⊢ ∀ (z : E), z ∈ closedBall 0 r → ‖↑↑f z‖ ≤ c\n[PROOFSTEP]\nexact fun z hz => h z hz\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.IsROrC", "llama_tokens": 6053, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191337850933, "lm_q2_score": 0.5621765008857982, "lm_q1q2_score": 0.39859389569238335}}
{"text": "[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf g : M ↪ₑ[L] N\nh : (fun f => ↑f) f = (fun f => ↑f) g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\ng : M ↪ₑ[L] N\ntoFun✝ : M → N\nmap_formula'✝ : ∀ ⦃n : ℕ⦄ (φ : Formula L (Fin n)) (x : Fin n → M), Formula.Realize φ (toFun✝ ∘ x) ↔ Formula.Realize φ x\nh : (fun f => ↑f) (mk toFun✝) = (fun f => ↑f) g\n⊢ mk toFun✝ = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\ntoFun✝¹ : M → N\nmap_formula'✝¹ :\n  ∀ ⦃n : ℕ⦄ (φ : Formula L (Fin n)) (x : Fin n → M), Formula.Realize φ (toFun✝¹ ∘ x) ↔ Formula.Realize φ x\ntoFun✝ : M → N\nmap_formula'✝ : ∀ ⦃n : ℕ⦄ (φ : Formula L (Fin n)) (x : Fin n → M), Formula.Realize φ (toFun✝ ∘ x) ↔ Formula.Realize φ x\nh : (fun f => ↑f) (mk toFun✝¹) = (fun f => ↑f) (mk toFun✝)\n⊢ mk toFun✝¹ = mk toFun✝\n[PROOFSTEP]\nsimp only [ElementaryEmbedding.mk.injEq]\n[GOAL]\ncase mk.mk\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\ntoFun✝¹ : M → N\nmap_formula'✝¹ :\n  ∀ ⦃n : ℕ⦄ (φ : Formula L (Fin n)) (x : Fin n → M), Formula.Realize φ (toFun✝¹ ∘ x) ↔ Formula.Realize φ x\ntoFun✝ : M → N\nmap_formula'✝ : ∀ ⦃n : ℕ⦄ (φ : Formula L (Fin n)) (x : Fin n → M), Formula.Realize φ (toFun✝ ∘ x) ↔ Formula.Realize φ x\nh : (fun f => ↑f) (mk toFun✝¹) = (fun f => ↑f) (mk toFun✝)\n⊢ toFun✝¹ = toFun✝\n[PROOFSTEP]\next x\n[GOAL]\ncase mk.mk.h\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\ntoFun✝¹ : M → N\nmap_formula'✝¹ :\n  ∀ ⦃n : ℕ⦄ (φ : Formula L (Fin n)) (x : Fin n → M), Formula.Realize φ (toFun✝¹ ∘ x) ↔ Formula.Realize φ x\ntoFun✝ : M → N\nmap_formula'✝ : ∀ ⦃n : ℕ⦄ (φ : Formula L (Fin n)) (x : Fin n → M), Formula.Realize φ (toFun✝ ∘ x) ↔ Formula.Realize φ x\nh : (fun f => ↑f) (mk toFun✝¹) = (fun f => ↑f) (mk toFun✝)\nx : M\n⊢ toFun✝¹ x = toFun✝ x\n[PROOFSTEP]\nexact Function.funext_iff.1 h x\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪ₑ[L] N\nα : Type u_5\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\n⊢ BoundedFormula.Realize φ (↑f ∘ v) (↑f ∘ xs) ↔ BoundedFormula.Realize φ v xs\n[PROOFSTEP]\nclassical\nrw [← BoundedFormula.realize_restrictFreeVar Set.Subset.rfl, Set.inclusion_eq_id, iff_eq_eq]\nhave h :=\n  f.map_formula' ((φ.restrictFreeVar id).toFormula.relabel (Fintype.equivFin _))\n    (Sum.elim (v ∘ (↑)) xs ∘ (Fintype.equivFin _).symm)\nsimp only [Formula.realize_relabel, BoundedFormula.realize_toFormula, iff_eq_eq] at h \nrw [← Function.comp.assoc _ _ (Fintype.equivFin _).symm,\n  Function.comp.assoc _ (Fintype.equivFin _).symm (Fintype.equivFin _), Equiv.symm_comp_self, Function.comp.right_id,\n  Function.comp.assoc, Sum.elim_comp_inl, Function.comp.assoc _ _ Sum.inr, Sum.elim_comp_inr, ← Function.comp.assoc] at\n  h \nrefine' h.trans _\nerw [Function.comp.assoc _ _ (Fintype.equivFin _), Equiv.symm_comp_self, Function.comp.right_id, Sum.elim_comp_inl,\n  Sum.elim_comp_inr (v ∘ Subtype.val) xs, ←\n  Set.inclusion_eq_id (s := (BoundedFormula.freeVarFinset φ : Set α)) Set.Subset.rfl,\n  BoundedFormula.realize_restrictFreeVar Set.Subset.rfl]\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪ₑ[L] N\nα : Type u_5\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\n⊢ BoundedFormula.Realize φ (↑f ∘ v) (↑f ∘ xs) ↔ BoundedFormula.Realize φ v xs\n[PROOFSTEP]\nrw [← BoundedFormula.realize_restrictFreeVar Set.Subset.rfl, Set.inclusion_eq_id, iff_eq_eq]\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪ₑ[L] N\nα : Type u_5\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\n⊢ BoundedFormula.Realize (BoundedFormula.restrictFreeVar φ id) ((↑f ∘ v) ∘ Subtype.val) (↑f ∘ xs) =\n    BoundedFormula.Realize φ v xs\n[PROOFSTEP]\nhave h :=\n  f.map_formula' ((φ.restrictFreeVar id).toFormula.relabel (Fintype.equivFin _))\n    (Sum.elim (v ∘ (↑)) xs ∘ (Fintype.equivFin _).symm)\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪ₑ[L] N\nα : Type u_5\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\nh :\n  Formula.Realize\n      (Formula.relabel (↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)))\n        (BoundedFormula.toFormula (BoundedFormula.restrictFreeVar φ id)))\n      (↑f ∘\n        Sum.elim (v ∘ Subtype.val) xs ∘\n          ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)).symm) ↔\n    Formula.Realize\n      (Formula.relabel (↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)))\n        (BoundedFormula.toFormula (BoundedFormula.restrictFreeVar φ id)))\n      (Sum.elim (v ∘ Subtype.val) xs ∘ ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)).symm)\n⊢ BoundedFormula.Realize (BoundedFormula.restrictFreeVar φ id) ((↑f ∘ v) ∘ Subtype.val) (↑f ∘ xs) =\n    BoundedFormula.Realize φ v xs\n[PROOFSTEP]\nsimp only [Formula.realize_relabel, BoundedFormula.realize_toFormula, iff_eq_eq] at h \n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪ₑ[L] N\nα : Type u_5\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\nh :\n  BoundedFormula.Realize (BoundedFormula.restrictFreeVar φ id)\n      (((↑f ∘\n            Sum.elim (v ∘ Subtype.val) xs ∘\n              ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)).symm) ∘\n          ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n))) ∘\n        Sum.inl)\n      (((↑f ∘\n            Sum.elim (v ∘ Subtype.val) xs ∘\n              ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)).symm) ∘\n          ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n))) ∘\n        Sum.inr) =\n    BoundedFormula.Realize (BoundedFormula.restrictFreeVar φ id)\n      (((Sum.elim (v ∘ Subtype.val) xs ∘\n            ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)).symm) ∘\n          ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n))) ∘\n        Sum.inl)\n      (((Sum.elim (v ∘ Subtype.val) xs ∘\n            ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)).symm) ∘\n          ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n))) ∘\n        Sum.inr)\n⊢ BoundedFormula.Realize (BoundedFormula.restrictFreeVar φ id) ((↑f ∘ v) ∘ Subtype.val) (↑f ∘ xs) =\n    BoundedFormula.Realize φ v xs\n[PROOFSTEP]\nrw [← Function.comp.assoc _ _ (Fintype.equivFin _).symm,\n  Function.comp.assoc _ (Fintype.equivFin _).symm (Fintype.equivFin _), Equiv.symm_comp_self, Function.comp.right_id,\n  Function.comp.assoc, Sum.elim_comp_inl, Function.comp.assoc _ _ Sum.inr, Sum.elim_comp_inr, ← Function.comp.assoc] at\n  h \n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪ₑ[L] N\nα : Type u_5\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\nh :\n  BoundedFormula.Realize (BoundedFormula.restrictFreeVar φ id) ((↑f ∘ v) ∘ Subtype.val) (↑f ∘ xs) =\n    BoundedFormula.Realize (BoundedFormula.restrictFreeVar φ id)\n      (((Sum.elim (v ∘ Subtype.val) xs ∘\n            ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)).symm) ∘\n          ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n))) ∘\n        Sum.inl)\n      (((Sum.elim (v ∘ Subtype.val) xs ∘\n            ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)).symm) ∘\n          ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n))) ∘\n        Sum.inr)\n⊢ BoundedFormula.Realize (BoundedFormula.restrictFreeVar φ id) ((↑f ∘ v) ∘ Subtype.val) (↑f ∘ xs) =\n    BoundedFormula.Realize φ v xs\n[PROOFSTEP]\nrefine' h.trans _\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪ₑ[L] N\nα : Type u_5\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\nh :\n  BoundedFormula.Realize (BoundedFormula.restrictFreeVar φ id) ((↑f ∘ v) ∘ Subtype.val) (↑f ∘ xs) =\n    BoundedFormula.Realize (BoundedFormula.restrictFreeVar φ id)\n      (((Sum.elim (v ∘ Subtype.val) xs ∘\n            ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)).symm) ∘\n          ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n))) ∘\n        Sum.inl)\n      (((Sum.elim (v ∘ Subtype.val) xs ∘\n            ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)).symm) ∘\n          ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n))) ∘\n        Sum.inr)\n⊢ BoundedFormula.Realize (BoundedFormula.restrictFreeVar φ id)\n      (((Sum.elim (v ∘ Subtype.val) xs ∘\n            ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)).symm) ∘\n          ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n))) ∘\n        Sum.inl)\n      (((Sum.elim (v ∘ Subtype.val) xs ∘\n            ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n)).symm) ∘\n          ↑(Fintype.equivFin ({ x // x ∈ BoundedFormula.freeVarFinset φ } ⊕ Fin n))) ∘\n        Sum.inr) =\n    BoundedFormula.Realize φ v xs\n[PROOFSTEP]\nerw [Function.comp.assoc _ _ (Fintype.equivFin _), Equiv.symm_comp_self, Function.comp.right_id, Sum.elim_comp_inl,\n  Sum.elim_comp_inr (v ∘ Subtype.val) xs, ←\n  Set.inclusion_eq_id (s := (BoundedFormula.freeVarFinset φ : Set α)) Set.Subset.rfl,\n  BoundedFormula.realize_restrictFreeVar Set.Subset.rfl]\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪ₑ[L] N\nα : Type u_5\nφ : Formula L α\nx : α → M\n⊢ Formula.Realize φ (↑f ∘ x) ↔ Formula.Realize φ x\n[PROOFSTEP]\nrw [Formula.Realize, Formula.Realize, ← f.map_boundedFormula, Unique.eq_default (f ∘ default)]\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪ₑ[L] N\nφ : Sentence L\n⊢ M ⊨ φ ↔ N ⊨ φ\n[PROOFSTEP]\nrw [Sentence.Realize, Sentence.Realize, ← f.map_formula, Unique.eq_default (f ∘ default)]\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪ₑ[L] N\nT : Theory L\n⊢ M ⊨ T ↔ N ⊨ T\n[PROOFSTEP]\nsimp only [Theory.model_iff, f.map_sentence]\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nφ : M ↪ₑ[L] N\n⊢ Function.Injective ↑φ\n[PROOFSTEP]\nintro x y\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nφ : M ↪ₑ[L] N\nx y : M\n⊢ ↑φ x = ↑φ y → x = y\n[PROOFSTEP]\nhave h := φ.map_formula ((var 0).equal (var 1) : L.Formula (Fin 2)) fun i => if i = 0 then x else y\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nφ : M ↪ₑ[L] N\nx y : M\nh :\n  Formula.Realize (Term.equal (var 0) (var 1)) (↑φ ∘ fun i => if i = 0 then x else y) ↔\n    Formula.Realize (Term.equal (var 0) (var 1)) fun i => if i = 0 then x else y\n⊢ ↑φ x = ↑φ y → x = y\n[PROOFSTEP]\nrw [Formula.realize_equal, Formula.realize_equal] at h \n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nφ : M ↪ₑ[L] N\nx y : M\nh :\n  Term.realize (↑φ ∘ fun i => if i = 0 then x else y) (var 0) =\n      Term.realize (↑φ ∘ fun i => if i = 0 then x else y) (var 1) ↔\n    Term.realize (fun i => if i = 0 then x else y) (var 0) = Term.realize (fun i => if i = 0 then x else y) (var 1)\n⊢ ↑φ x = ↑φ y → x = y\n[PROOFSTEP]\nsimp only [Nat.one_ne_zero, Term.realize, Fin.one_eq_zero_iff, if_true, eq_self_iff_true, Function.comp_apply,\n  if_false] at h \n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nφ : M ↪ₑ[L] N\nx y : M\nh : ↑φ x = ↑φ y ↔ x = y\n⊢ ↑φ x = ↑φ y → x = y\n[PROOFSTEP]\nexact h.1\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nφ : M ↪ₑ[L] N\nn : ℕ\nf : Functions L n\nx : Fin n → M\n⊢ ↑φ (funMap f x) = funMap f (↑φ ∘ x)\n[PROOFSTEP]\nhave h := φ.map_formula (Formula.graph f) (Fin.cons (funMap f x) x)\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nφ : M ↪ₑ[L] N\nn : ℕ\nf : Functions L n\nx : Fin n → M\nh :\n  Formula.Realize (Formula.graph f) (↑φ ∘ Fin.cons (funMap f x) x) ↔\n    Formula.Realize (Formula.graph f) (Fin.cons (funMap f x) x)\n⊢ ↑φ (funMap f x) = funMap f (↑φ ∘ x)\n[PROOFSTEP]\nrw [Formula.realize_graph, Fin.comp_cons, Formula.realize_graph] at h \n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nφ : M ↪ₑ[L] N\nn : ℕ\nf : Functions L n\nx : Fin n → M\nh : funMap f (↑φ ∘ x) = ↑φ (funMap f x) ↔ funMap f x = funMap f x\n⊢ ↑φ (funMap f x) = funMap f (↑φ ∘ x)\n[PROOFSTEP]\nrw [eq_comm, h]\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf✝ : M ↪ₑ[L] N\nx✝ : ℕ\nf : Functions L x✝\nx : Fin x✝ → M\n⊢ Function.Embedding.toFun { toFun := ↑f✝, inj' := (_ : Function.Injective ↑f✝) } (funMap f x) =\n    funMap f ({ toFun := ↑f✝, inj' := (_ : Function.Injective ↑f✝) }.toFun ∘ x)\n[PROOFSTEP]\naesop\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪ₑ[L] N\nx✝ : ℕ\nR : Relations L x✝\nx : Fin x✝ → M\n⊢ RelMap R ({ toFun := ↑f, inj' := (_ : Function.Injective ↑f) }.toFun ∘ x) ↔ RelMap R x\n[PROOFSTEP]\naesop\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf✝ : M ↪ₑ[L] N\nx✝ : ℕ\nf : Functions L x✝\nx : Fin x✝ → M\n⊢ ↑f✝ (funMap f x) = funMap f (↑f✝ ∘ x)\n[PROOFSTEP]\naesop\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪ₑ[L] N\nx✝ : ℕ\nR : Relations L x✝\nx : Fin x✝ → M\n⊢ RelMap R x → RelMap R (↑f ∘ x)\n[PROOFSTEP]\naesop\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nhnp : N ↪ₑ[L] P\nhmn : M ↪ₑ[L] N\nn : ℕ\nφ : Formula L (Fin n)\nx : Fin n → M\n⊢ Formula.Realize φ ((↑hnp ∘ ↑hmn) ∘ x) ↔ Formula.Realize φ x\n[PROOFSTEP]\ncases' hnp with _ hhnp\n[GOAL]\ncase mk\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nhmn : M ↪ₑ[L] N\nn : ℕ\nφ : Formula L (Fin n)\nx : Fin n → M\ntoFun✝ : N → P\nhhnp : ∀ ⦃n : ℕ⦄ (φ : Formula L (Fin n)) (x : Fin n → N), Formula.Realize φ (toFun✝ ∘ x) ↔ Formula.Realize φ x\n⊢ Formula.Realize φ ((↑(mk toFun✝) ∘ ↑hmn) ∘ x) ↔ Formula.Realize φ x\n[PROOFSTEP]\ncases' hmn with _ hhmn\n[GOAL]\ncase mk.mk\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nn : ℕ\nφ : Formula L (Fin n)\nx : Fin n → M\ntoFun✝¹ : N → P\nhhnp : ∀ ⦃n : ℕ⦄ (φ : Formula L (Fin n)) (x : Fin n → N), Formula.Realize φ (toFun✝¹ ∘ x) ↔ Formula.Realize φ x\ntoFun✝ : M → N\nhhmn : ∀ ⦃n : ℕ⦄ (φ : Formula L (Fin n)) (x : Fin n → M), Formula.Realize φ (toFun✝ ∘ x) ↔ Formula.Realize φ x\n⊢ Formula.Realize φ ((↑(mk toFun✝¹) ∘ ↑(mk toFun✝)) ∘ x) ↔ Formula.Realize φ x\n[PROOFSTEP]\nerw [hhnp, hhmn]\n[GOAL]\nL : Language\nM : Type u_1\nN✝ : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝⁷ : Structure L M\ninst✝⁶ : Structure L N✝\ninst✝⁵ : Structure L P\ninst✝⁴ : Structure L Q\nN : Type u_5\ninst✝³ : Structure L N\ninst✝² : Structure (L[[M]]) N\ninst✝¹ : LHom.IsExpansionOn (lhomWithConstants L M) N\ninst✝ : N ⊨ elementaryDiagram L M\nn : ℕ\nφ : Formula L (Fin n)\nx : Fin n → M\n⊢ Formula.Realize φ ((constantMap ∘ Sum.inr) ∘ x) ↔ Formula.Realize φ x\n[PROOFSTEP]\nrefine'\n  _root_.trans _\n    ((realize_iff_of_model_completeTheory M N\n          (((L.lhomWithConstants M).onBoundedFormula φ).subst (Constants.term ∘ Sum.inr ∘ x)).alls).trans\n      _)\n[GOAL]\ncase refine'_1\nL : Language\nM : Type u_1\nN✝ : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝⁷ : Structure L M\ninst✝⁶ : Structure L N✝\ninst✝⁵ : Structure L P\ninst✝⁴ : Structure L Q\nN : Type u_5\ninst✝³ : Structure L N\ninst✝² : Structure (L[[M]]) N\ninst✝¹ : LHom.IsExpansionOn (lhomWithConstants L M) N\ninst✝ : N ⊨ elementaryDiagram L M\nn : ℕ\nφ : Formula L (Fin n)\nx : Fin n → M\n⊢ Formula.Realize φ ((constantMap ∘ Sum.inr) ∘ x) ↔\n    N ⊨\n      BoundedFormula.alls\n        (BoundedFormula.subst (LHom.onBoundedFormula (lhomWithConstants L M) φ) (Constants.term ∘ Sum.inr ∘ x))\n[PROOFSTEP]\nsimp_rw [Sentence.Realize, BoundedFormula.realize_alls, BoundedFormula.realize_subst, LHom.realize_onBoundedFormula,\n  Formula.Realize, Unique.forall_iff, Function.comp, Term.realize_constants]\n[GOAL]\ncase refine'_2\nL : Language\nM : Type u_1\nN✝ : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝⁷ : Structure L M\ninst✝⁶ : Structure L N✝\ninst✝⁵ : Structure L P\ninst✝⁴ : Structure L Q\nN : Type u_5\ninst✝³ : Structure L N\ninst✝² : Structure (L[[M]]) N\ninst✝¹ : LHom.IsExpansionOn (lhomWithConstants L M) N\ninst✝ : N ⊨ elementaryDiagram L M\nn : ℕ\nφ : Formula L (Fin n)\nx : Fin n → M\n⊢ M ⊨\n      BoundedFormula.alls\n        (BoundedFormula.subst (LHom.onBoundedFormula (lhomWithConstants L M) φ) (Constants.term ∘ Sum.inr ∘ x)) ↔\n    Formula.Realize φ x\n[PROOFSTEP]\nsimp_rw [Sentence.Realize, BoundedFormula.realize_alls, BoundedFormula.realize_subst, LHom.realize_onBoundedFormula,\n  Formula.Realize, Unique.forall_iff]\n[GOAL]\ncase refine'_2\nL : Language\nM : Type u_1\nN✝ : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝⁷ : Structure L M\ninst✝⁶ : Structure L N✝\ninst✝⁵ : Structure L P\ninst✝⁴ : Structure L Q\nN : Type u_5\ninst✝³ : Structure L N\ninst✝² : Structure (L[[M]]) N\ninst✝¹ : LHom.IsExpansionOn (lhomWithConstants L M) N\ninst✝ : N ⊨ elementaryDiagram L M\nn : ℕ\nφ : Formula L (Fin n)\nx : Fin n → M\n⊢ BoundedFormula.Realize φ (fun a => Term.realize default ((Constants.term ∘ Sum.inr ∘ x) a)) default ↔\n    BoundedFormula.Realize φ x default\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\n⊢ ∀ {n : ℕ} (φ : Formula L (Fin n)) (x : Fin n → M), Formula.Realize φ (↑f ∘ x) ↔ Formula.Realize φ x\n[PROOFSTEP]\nsuffices h :\n  ∀ (n : ℕ) (φ : L.BoundedFormula Empty n) (xs : Fin n → M), φ.Realize (f ∘ default) (f ∘ xs) ↔ φ.Realize default xs\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nh :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty n) (xs : Fin n → M),\n    BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\n⊢ ∀ {n : ℕ} (φ : Formula L (Fin n)) (x : Fin n → M), Formula.Realize φ (↑f ∘ x) ↔ Formula.Realize φ x\n[PROOFSTEP]\nintro n φ x\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nh :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty n) (xs : Fin n → M),\n    BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\nn : ℕ\nφ : Formula L (Fin n)\nx : Fin n → M\n⊢ Formula.Realize φ (↑f ∘ x) ↔ Formula.Realize φ x\n[PROOFSTEP]\nrefine' φ.realize_relabel_sum_inr.symm.trans (_root_.trans (h n _ _) φ.realize_relabel_sum_inr)\n[GOAL]\ncase h\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\n⊢ ∀ (n : ℕ) (φ : BoundedFormula L Empty n) (xs : Fin n → M),\n    BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\n[PROOFSTEP]\nrefine' fun n φ => φ.recOn _ _ _ _ _\n[GOAL]\ncase h.refine'_1\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn : ℕ\nφ : BoundedFormula L Empty n\n⊢ ∀ {n : ℕ} (xs : Fin n → M),\n    BoundedFormula.Realize BoundedFormula.falsum (↑f ∘ default) (↑f ∘ xs) ↔\n      BoundedFormula.Realize BoundedFormula.falsum default xs\n[PROOFSTEP]\nexact fun {_} _ => Iff.rfl\n[GOAL]\ncase h.refine'_2\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn : ℕ\nφ : BoundedFormula L Empty n\n⊢ ∀ {n : ℕ} (t₁ t₂ : Term L (Empty ⊕ Fin n)) (xs : Fin n → M),\n    BoundedFormula.Realize (BoundedFormula.equal t₁ t₂) (↑f ∘ default) (↑f ∘ xs) ↔\n      BoundedFormula.Realize (BoundedFormula.equal t₁ t₂) default xs\n[PROOFSTEP]\nintros\n[GOAL]\ncase h.refine'_2\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn : ℕ\nφ : BoundedFormula L Empty n\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (Empty ⊕ Fin n✝)\nxs✝ : Fin n✝ → M\n⊢ BoundedFormula.Realize (BoundedFormula.equal t₁✝ t₂✝) (↑f ∘ default) (↑f ∘ xs✝) ↔\n    BoundedFormula.Realize (BoundedFormula.equal t₁✝ t₂✝) default xs✝\n[PROOFSTEP]\nsimp [BoundedFormula.Realize, ← Sum.comp_elim, Embedding.realize_term]\n[GOAL]\ncase h.refine'_3\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn : ℕ\nφ : BoundedFormula L Empty n\n⊢ ∀ {n l : ℕ} (R : Relations L l) (ts : Fin l → Term L (Empty ⊕ Fin n)) (xs : Fin n → M),\n    BoundedFormula.Realize (BoundedFormula.rel R ts) (↑f ∘ default) (↑f ∘ xs) ↔\n      BoundedFormula.Realize (BoundedFormula.rel R ts) default xs\n[PROOFSTEP]\nintros\n[GOAL]\ncase h.refine'_3\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn : ℕ\nφ : BoundedFormula L Empty n\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (Empty ⊕ Fin n✝)\nxs✝ : Fin n✝ → M\n⊢ BoundedFormula.Realize (BoundedFormula.rel R✝ ts✝) (↑f ∘ default) (↑f ∘ xs✝) ↔\n    BoundedFormula.Realize (BoundedFormula.rel R✝ ts✝) default xs✝\n[PROOFSTEP]\nsimp [BoundedFormula.Realize, ← Sum.comp_elim, Embedding.realize_term]\n[GOAL]\ncase h.refine'_3\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn : ℕ\nφ : BoundedFormula L Empty n\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (Empty ⊕ Fin n✝)\nxs✝ : Fin n✝ → M\n⊢ (RelMap R✝ fun i => ↑f (Term.realize (Sum.elim default xs✝) (ts✝ i))) ↔\n    RelMap R✝ fun i => Term.realize (Sum.elim default xs✝) (ts✝ i)\n[PROOFSTEP]\nerw [map_rel f]\n[GOAL]\ncase h.refine'_4\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn : ℕ\nφ : BoundedFormula L Empty n\n⊢ ∀ {n : ℕ} (f₁ f₂ : BoundedFormula L Empty n),\n    (∀ (xs : Fin n → M), BoundedFormula.Realize f₁ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize f₁ default xs) →\n      (∀ (xs : Fin n → M), BoundedFormula.Realize f₂ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize f₂ default xs) →\n        ∀ (xs : Fin n → M),\n          BoundedFormula.Realize (f₁ ⟹ f₂) (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize (f₁ ⟹ f₂) default xs\n[PROOFSTEP]\nintro _ _ _ ih1 ih2 _\n[GOAL]\ncase h.refine'_4\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn : ℕ\nφ : BoundedFormula L Empty n\nn✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L Empty n✝\nih1 : ∀ (xs : Fin n✝ → M), BoundedFormula.Realize f₁✝ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize f₁✝ default xs\nih2 : ∀ (xs : Fin n✝ → M), BoundedFormula.Realize f₂✝ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize f₂✝ default xs\nxs✝ : Fin n✝ → M\n⊢ BoundedFormula.Realize (f₁✝ ⟹ f₂✝) (↑f ∘ default) (↑f ∘ xs✝) ↔ BoundedFormula.Realize (f₁✝ ⟹ f₂✝) default xs✝\n[PROOFSTEP]\nsimp [ih1, ih2]\n[GOAL]\ncase h.refine'_5\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn : ℕ\nφ : BoundedFormula L Empty n\n⊢ ∀ {n : ℕ} (f_1 : BoundedFormula L Empty (n + 1)),\n    (∀ (xs : Fin (n + 1) → M),\n        BoundedFormula.Realize f_1 (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize f_1 default xs) →\n      ∀ (xs : Fin n → M),\n        BoundedFormula.Realize (∀'f_1) (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize (∀'f_1) default xs\n[PROOFSTEP]\nintro n φ ih xs\n[GOAL]\ncase h.refine'_5\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn✝ : ℕ\nφ✝ : BoundedFormula L Empty n✝\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nih : ∀ (xs : Fin (n + 1) → M), BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\nxs : Fin n → M\n⊢ BoundedFormula.Realize (∀'φ) (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize (∀'φ) default xs\n[PROOFSTEP]\nsimp only [BoundedFormula.realize_all]\n[GOAL]\ncase h.refine'_5\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn✝ : ℕ\nφ✝ : BoundedFormula L Empty n✝\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nih : ∀ (xs : Fin (n + 1) → M), BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\nxs : Fin n → M\n⊢ (∀ (a : N), BoundedFormula.Realize φ (↑f ∘ default) (Fin.snoc (↑f ∘ xs) a)) ↔\n    ∀ (a : M), BoundedFormula.Realize φ default (Fin.snoc xs a)\n[PROOFSTEP]\nrefine' ⟨fun h a => _, _⟩\n[GOAL]\ncase h.refine'_5.refine'_1\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn✝ : ℕ\nφ✝ : BoundedFormula L Empty n✝\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nih : ∀ (xs : Fin (n + 1) → M), BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\nxs : Fin n → M\nh : ∀ (a : N), BoundedFormula.Realize φ (↑f ∘ default) (Fin.snoc (↑f ∘ xs) a)\na : M\n⊢ BoundedFormula.Realize φ default (Fin.snoc xs a)\n[PROOFSTEP]\nrw [← ih, Fin.comp_snoc]\n[GOAL]\ncase h.refine'_5.refine'_1\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn✝ : ℕ\nφ✝ : BoundedFormula L Empty n✝\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nih : ∀ (xs : Fin (n + 1) → M), BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\nxs : Fin n → M\nh : ∀ (a : N), BoundedFormula.Realize φ (↑f ∘ default) (Fin.snoc (↑f ∘ xs) a)\na : M\n⊢ BoundedFormula.Realize φ (↑f ∘ default) (Fin.snoc (↑f ∘ xs) (↑f a))\n[PROOFSTEP]\nexact h (f a)\n[GOAL]\ncase h.refine'_5.refine'_2\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn✝ : ℕ\nφ✝ : BoundedFormula L Empty n✝\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nih : ∀ (xs : Fin (n + 1) → M), BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\nxs : Fin n → M\n⊢ (∀ (a : M), BoundedFormula.Realize φ default (Fin.snoc xs a)) →\n    ∀ (a : N), BoundedFormula.Realize φ (↑f ∘ default) (Fin.snoc (↑f ∘ xs) a)\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase h.refine'_5.refine'_2\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn✝ : ℕ\nφ✝ : BoundedFormula L Empty n✝\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nih : ∀ (xs : Fin (n + 1) → M), BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\nxs : Fin n → M\n⊢ (∃ a, ¬BoundedFormula.Realize φ (↑f ∘ default) (Fin.snoc (↑f ∘ xs) a)) →\n    ∃ a, ¬BoundedFormula.Realize φ default (Fin.snoc xs a)\n[PROOFSTEP]\nrintro ⟨a, ha⟩\n[GOAL]\ncase h.refine'_5.refine'_2.intro\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn✝ : ℕ\nφ✝ : BoundedFormula L Empty n✝\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nih : ∀ (xs : Fin (n + 1) → M), BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\nxs : Fin n → M\na : N\nha : ¬BoundedFormula.Realize φ (↑f ∘ default) (Fin.snoc (↑f ∘ xs) a)\n⊢ ∃ a, ¬BoundedFormula.Realize φ default (Fin.snoc xs a)\n[PROOFSTEP]\nobtain ⟨b, hb⟩ :=\n  htv n φ.not xs a\n    (by\n      rw [BoundedFormula.realize_not, ← Unique.eq_default (f ∘ default)]\n      exact ha)\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn✝ : ℕ\nφ✝ : BoundedFormula L Empty n✝\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nih : ∀ (xs : Fin (n + 1) → M), BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\nxs : Fin n → M\na : N\nha : ¬BoundedFormula.Realize φ (↑f ∘ default) (Fin.snoc (↑f ∘ xs) a)\n⊢ BoundedFormula.Realize (∼φ) default (Fin.snoc (↑f ∘ xs) a)\n[PROOFSTEP]\nrw [BoundedFormula.realize_not, ← Unique.eq_default (f ∘ default)]\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn✝ : ℕ\nφ✝ : BoundedFormula L Empty n✝\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nih : ∀ (xs : Fin (n + 1) → M), BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\nxs : Fin n → M\na : N\nha : ¬BoundedFormula.Realize φ (↑f ∘ default) (Fin.snoc (↑f ∘ xs) a)\n⊢ ¬BoundedFormula.Realize φ (↑f ∘ default) (Fin.snoc (↑f ∘ xs) a)\n[PROOFSTEP]\nexact ha\n[GOAL]\ncase h.refine'_5.refine'_2.intro.intro\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn✝ : ℕ\nφ✝ : BoundedFormula L Empty n✝\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nih : ∀ (xs : Fin (n + 1) → M), BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\nxs : Fin n → M\na : N\nha : ¬BoundedFormula.Realize φ (↑f ∘ default) (Fin.snoc (↑f ∘ xs) a)\nb : M\nhb : BoundedFormula.Realize (∼φ) default (Fin.snoc (↑f ∘ xs) (↑f b))\n⊢ ∃ a, ¬BoundedFormula.Realize φ default (Fin.snoc xs a)\n[PROOFSTEP]\nrefine' ⟨b, fun h => hb (Eq.mp _ ((ih _).2 h))⟩\n[GOAL]\ncase h.refine'_5.refine'_2.intro.intro\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ↪[L] N\nhtv :\n  ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → M) (a : N),\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ x) (↑f b))\nn✝ : ℕ\nφ✝ : BoundedFormula L Empty n✝\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nih : ∀ (xs : Fin (n + 1) → M), BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ xs) ↔ BoundedFormula.Realize φ default xs\nxs : Fin n → M\na : N\nha : ¬BoundedFormula.Realize φ (↑f ∘ default) (Fin.snoc (↑f ∘ xs) a)\nb : M\nhb : BoundedFormula.Realize (∼φ) default (Fin.snoc (↑f ∘ xs) (↑f b))\nh : BoundedFormula.Realize φ default (Fin.snoc xs b)\n⊢ BoundedFormula.Realize φ (↑f ∘ default) (↑f ∘ Fin.snoc xs b) =\n    BoundedFormula.Realize φ default (Fin.snoc (↑f ∘ xs) (↑f b))\n[PROOFSTEP]\nrw [Unique.eq_default (f ∘ default), Fin.comp_snoc]\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nf : M ≃[L] N\nn : ℕ\nφ : Formula L (Fin n)\nx : Fin n → M\n⊢ Formula.Realize φ (↑f ∘ x) ↔ Formula.Realize φ x\n[PROOFSTEP]\naesop\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nα : Type u_5\nn : ℕ\nφ : BoundedFormula L α n\nv : α → { x // x ∈ ⊤ }\nxs : Fin n → { x // x ∈ ⊤ }\n⊢ BoundedFormula.Realize φ v xs ↔ BoundedFormula.Realize φ (Subtype.val ∘ v) (Subtype.val ∘ xs)\n[PROOFSTEP]\nrw [← Substructure.topEquiv.realize_boundedFormula φ]\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nα : Type u_5\nn : ℕ\nφ : BoundedFormula L α n\nv : α → { x // x ∈ ⊤ }\nxs : Fin n → { x // x ∈ ⊤ }\n⊢ BoundedFormula.Realize φ (↑topEquiv ∘ v) (↑topEquiv ∘ xs) ↔\n    BoundedFormula.Realize φ (Subtype.val ∘ v) (Subtype.val ∘ xs)\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nα : Type u_5\nφ : Formula L α\nv : α → { x // x ∈ ⊤ }\n⊢ Formula.Realize φ v ↔ Formula.Realize φ (Subtype.val ∘ v)\n[PROOFSTEP]\nrw [← Substructure.topEquiv.realize_formula φ]\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nα : Type u_5\nφ : Formula L α\nv : α → { x // x ∈ ⊤ }\n⊢ Formula.Realize φ (↑topEquiv ∘ v) ↔ Formula.Realize φ (Subtype.val ∘ v)\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nx✝² x✝¹ : ElementarySubstructure L M\ns : Set M\nhs1 : ∀ {n : ℕ} (f : Functions L n), ClosedUnder f s\nhs2 : Substructure.IsElementary { carrier := s, fun_mem := hs1 }\nt : Set M\nht1 : ∀ {n : ℕ} (f : Functions L n), ClosedUnder f t\nisElementary'✝ : Substructure.IsElementary { carrier := t, fun_mem := ht1 }\nx✝ :\n  (fun x => ↑↑x) { toSubstructure := { carrier := s, fun_mem := hs1 }, isElementary' := hs2 } =\n    (fun x => ↑↑x) { toSubstructure := { carrier := t, fun_mem := ht1 }, isElementary' := isElementary'✝ }\n⊢ { toSubstructure := { carrier := s, fun_mem := hs1 }, isElementary' := hs2 } =\n    { toSubstructure := { carrier := t, fun_mem := ht1 }, isElementary' := isElementary'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nL : Language\nM : Type u_1\nN : Type u_2\nP : Type u_3\nQ : Type u_4\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\ninst✝ : Structure L Q\nS : ElementarySubstructure L M\nT : Theory L\n⊢ { x // x ∈ S } ⊨ T ↔ M ⊨ T\n[PROOFSTEP]\nsimp only [Theory.model_iff, realize_sentence]\n", "meta": {"mathlib_filename": "Mathlib.ModelTheory.ElementaryMaps", "llama_tokens": 20070, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6992544210587586, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.398471985853405}}
{"text": "[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\n⊢ ‖(∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)) • ↑f' (Pi.single i 1) -\n        (integral (Box.face I i) ⊥ (f ∘ Fin.insertNth i (Box.upper I i)) BoxAdditiveMap.volume -\n          integral (Box.face I i) ⊥ (f ∘ Fin.insertNth i (Box.lower I i)) BoxAdditiveMap.volume)‖ ≤\n    2 * ε * ↑c * ∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)\n[PROOFSTEP]\nset e : ℝ → (Fin n → ℝ) → (Fin (n + 1) → ℝ) :=\n  i.insertNth (α := fun _ ↦ ℝ)\n    /- **Plan of the proof**. The difference of the integrals of the affine function\n        `fun y ↦ a + f' (y - x)` over the faces `x i = I.upper i` and `x i = I.lower i` is equal to the\n        volume of `I` multiplied by `f' (Pi.single i 1)`, so it suffices to show that the integral of\n        `f y - a - f' (y - x)` over each of these faces is less than or equal to `ε * c * vol I`. We\n        integrate a function of the norm `≤ ε * diam I.Icc` over a box of volume\n        `∏ j ≠ i, (I.upper j - I.lower j)`. Since `diam I.Icc ≤ c * (I.upper i - I.lower i)`, we get the\n        required estimate.  -/\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\n⊢ ‖(∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)) • ↑f' (Pi.single i 1) -\n        (integral (Box.face I i) ⊥ (f ∘ e (Box.upper I i)) BoxAdditiveMap.volume -\n          integral (Box.face I i) ⊥ (f ∘ e (Box.lower I i)) BoxAdditiveMap.volume)‖ ≤\n    2 * ε * ↑c * ∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)\n[PROOFSTEP]\nhave Hl : I.lower i ∈ Icc (I.lower i) (I.upper i) := Set.left_mem_Icc.2 (I.lower_le_upper i)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\n⊢ ‖(∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)) • ↑f' (Pi.single i 1) -\n        (integral (Box.face I i) ⊥ (f ∘ e (Box.upper I i)) BoxAdditiveMap.volume -\n          integral (Box.face I i) ⊥ (f ∘ e (Box.lower I i)) BoxAdditiveMap.volume)‖ ≤\n    2 * ε * ↑c * ∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)\n[PROOFSTEP]\nhave Hu : I.upper i ∈ Icc (I.lower i) (I.upper i) := Set.right_mem_Icc.2 (I.lower_le_upper i)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\n⊢ ‖(∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)) • ↑f' (Pi.single i 1) -\n        (integral (Box.face I i) ⊥ (f ∘ e (Box.upper I i)) BoxAdditiveMap.volume -\n          integral (Box.face I i) ⊥ (f ∘ e (Box.lower I i)) BoxAdditiveMap.volume)‖ ≤\n    2 * ε * ↑c * ∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)\n[PROOFSTEP]\nhave Hi : ∀ x ∈ Icc (I.lower i) (I.upper i), Integrable.{0, u, u} (I.face i) ⊥ (f ∘ e x) BoxAdditiveMap.volume :=\n  fun x hx => integrable_of_continuousOn _ (Box.continuousOn_face_Icc hfc hx) volume\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\n⊢ ‖(∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)) • ↑f' (Pi.single i 1) -\n        (integral (Box.face I i) ⊥ (f ∘ e (Box.upper I i)) BoxAdditiveMap.volume -\n          integral (Box.face I i) ⊥ (f ∘ e (Box.lower I i)) BoxAdditiveMap.volume)‖ ≤\n    2 * ε * ↑c * ∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)\n[PROOFSTEP]\nhave :\n  ∀ y ∈ Box.Icc (I.face i),\n    ‖f' (Pi.single i (I.upper i - I.lower i)) - (f (e (I.upper i) y) - f (e (I.lower i) y))‖ ≤\n      2 * ε * diam (Box.Icc I) :=\n  fun y hy ↦ by\n  set g := fun y => f y - a - f' (y - x) with hg\n  change ∀ y ∈ (Box.Icc I), ‖g y‖ ≤ ε * ‖y - x‖ at hε \n  clear_value g; obtain rfl : f = fun y => a + f' (y - x) + g y := by simp [hg]\n  convert_to ‖g (e (I.lower i) y) - g (e (I.upper i) y)‖ ≤ _\n  · congr 1\n    have := Fin.insertNth_sub_same (α := fun _ ↦ ℝ) i (I.upper i) (I.lower i) y\n    simp only [← this, f'.map_sub]; abel\n  · have : ∀ z ∈ Icc (I.lower i) (I.upper i), e z y ∈ (Box.Icc I) := fun z hz => I.mapsTo_insertNth_face_Icc hz hy\n    replace hε : ∀ y ∈ (Box.Icc I), ‖g y‖ ≤ ε * diam (Box.Icc I)\n    · intro y hy\n      refine' (hε y hy).trans (mul_le_mul_of_nonneg_left _ h0.le)\n      rw [← dist_eq_norm]\n      exact dist_le_diam_of_mem I.isCompact_Icc.bounded hy hxI\n    rw [two_mul, add_mul]\n    exact norm_sub_le_of_le (hε _ (this _ Hl)) (hε _ (this _ Hu))\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\n⊢ ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) y) - f (e (Box.lower I i) y))‖ ≤\n    2 * ε * diam (↑Box.Icc I)\n[PROOFSTEP]\nset g := fun y => f y - a - f' (y - x) with hg\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E := fun y => f y - a - ↑f' (y - x)\nhg : g = fun y => f y - a - ↑f' (y - x)\n⊢ ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) y) - f (e (Box.lower I i) y))‖ ≤\n    2 * ε * diam (↑Box.Icc I)\n[PROOFSTEP]\nchange ∀ y ∈ (Box.Icc I), ‖g y‖ ≤ ε * ‖y - x‖ at hε \n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E := fun y => f y - a - ↑f' (y - x)\nhg : g = fun y => f y - a - ↑f' (y - x)\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\n⊢ ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) y) - f (e (Box.lower I i) y))‖ ≤\n    2 * ε * diam (↑Box.Icc I)\n[PROOFSTEP]\nclear_value g\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhg : g = fun y => f y - a - ↑f' (y - x)\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\n⊢ ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) y) - f (e (Box.lower I i) y))‖ ≤\n    2 * ε * diam (↑Box.Icc I)\n[PROOFSTEP]\nobtain rfl : f = fun y => a + f' (y - x) + g y := by simp [hg]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhg : g = fun y => f y - a - ↑f' (y - x)\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\n⊢ f = fun y => a + ↑f' (y - x) + g y\n[PROOFSTEP]\nsimp [hg]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\n⊢ ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) -\n        ((fun y => a + ↑f' (y - x) + g y) (e (Box.upper I i) y) -\n          (fun y => a + ↑f' (y - x) + g y) (e (Box.lower I i) y))‖ ≤\n    2 * ε * diam (↑Box.Icc I)\n[PROOFSTEP]\nconvert_to ‖g (e (I.lower i) y) - g (e (I.upper i) y)‖ ≤ _\n[GOAL]\ncase h.e'_3\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\n⊢ ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) -\n        ((fun y => a + ↑f' (y - x) + g y) (e (Box.upper I i) y) -\n          (fun y => a + ↑f' (y - x) + g y) (e (Box.lower I i) y))‖ =\n    ‖g (e (Box.lower I i) y) - g (e (Box.upper I i) y)‖\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_3.e_a\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\n⊢ ↑f' (Pi.single i (Box.upper I i - Box.lower I i)) -\n      ((fun y => a + ↑f' (y - x) + g y) (e (Box.upper I i) y) -\n        (fun y => a + ↑f' (y - x) + g y) (e (Box.lower I i) y)) =\n    g (e (Box.lower I i) y) - g (e (Box.upper I i) y)\n[PROOFSTEP]\nhave := Fin.insertNth_sub_same (α := fun _ ↦ ℝ) i (I.upper i) (I.lower i) y\n[GOAL]\ncase h.e'_3.e_a\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\nthis :\n  Fin.insertNth i (Box.upper I i) y - Fin.insertNth i (Box.lower I i) y = Pi.single i (Box.upper I i - Box.lower I i)\n⊢ ↑f' (Pi.single i (Box.upper I i - Box.lower I i)) -\n      ((fun y => a + ↑f' (y - x) + g y) (e (Box.upper I i) y) -\n        (fun y => a + ↑f' (y - x) + g y) (e (Box.lower I i) y)) =\n    g (e (Box.lower I i) y) - g (e (Box.upper I i) y)\n[PROOFSTEP]\nsimp only [← this, f'.map_sub]\n[GOAL]\ncase h.e'_3.e_a\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\nthis :\n  Fin.insertNth i (Box.upper I i) y - Fin.insertNth i (Box.lower I i) y = Pi.single i (Box.upper I i - Box.lower I i)\n⊢ ↑f' (Fin.insertNth i (Box.upper I i) y) - ↑f' (Fin.insertNth i (Box.lower I i) y) -\n      (a + (↑f' (Fin.insertNth i (Box.upper I i) y) - ↑f' x) + g (Fin.insertNth i (Box.upper I i) y) -\n        (a + (↑f' (Fin.insertNth i (Box.lower I i) y) - ↑f' x) + g (Fin.insertNth i (Box.lower I i) y))) =\n    g (Fin.insertNth i (Box.lower I i) y) - g (Fin.insertNth i (Box.upper I i) y)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_3.e_a\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\nthis :\n  Fin.insertNth i (Box.upper I i) y - Fin.insertNth i (Box.lower I i) y = Pi.single i (Box.upper I i - Box.lower I i)\n⊢ ↑f' (Fin.insertNth i (Box.upper I i) y) - ↑f' (Fin.insertNth i (Box.lower I i) y) -\n      (a + (↑f' (Fin.insertNth i (Box.upper I i) y) - ↑f' x) + g (Fin.insertNth i (Box.upper I i) y) -\n        (a + (↑f' (Fin.insertNth i (Box.lower I i) y) - ↑f' x) + g (Fin.insertNth i (Box.lower I i) y))) =\n    g (Fin.insertNth i (Box.lower I i) y) - g (Fin.insertNth i (Box.upper I i) y)\n[PROOFSTEP]\nabel\n[GOAL]\ncase convert_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\n⊢ ‖g (e (Box.lower I i) y) - g (e (Box.upper I i) y)‖ ≤ 2 * ε * diam (↑Box.Icc I)\n[PROOFSTEP]\nhave : ∀ z ∈ Icc (I.lower i) (I.upper i), e z y ∈ (Box.Icc I) := fun z hz => I.mapsTo_insertNth_face_Icc hz hy\n[GOAL]\ncase convert_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\nthis : ∀ (z : ℝ), z ∈ Set.Icc (Box.lower I i) (Box.upper I i) → e z y ∈ ↑Box.Icc I\n⊢ ‖g (e (Box.lower I i) y) - g (e (Box.upper I i) y)‖ ≤ 2 * ε * diam (↑Box.Icc I)\n[PROOFSTEP]\nreplace hε : ∀ y ∈ (Box.Icc I), ‖g y‖ ≤ ε * diam (Box.Icc I)\n[GOAL]\ncase hε\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\nthis : ∀ (z : ℝ), z ∈ Set.Icc (Box.lower I i) (Box.upper I i) → e z y ∈ ↑Box.Icc I\n⊢ ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * diam (↑Box.Icc I)\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase hε\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny✝ : Fin n → ℝ\nhy✝ : y✝ ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\nthis : ∀ (z : ℝ), z ∈ Set.Icc (Box.lower I i) (Box.upper I i) → e z y✝ ∈ ↑Box.Icc I\ny : Fin (n + 1) → ℝ\nhy : y ∈ ↑Box.Icc I\n⊢ ‖g y‖ ≤ ε * diam (↑Box.Icc I)\n[PROOFSTEP]\nrefine' (hε y hy).trans (mul_le_mul_of_nonneg_left _ h0.le)\n[GOAL]\ncase hε\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny✝ : Fin n → ℝ\nhy✝ : y✝ ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\nthis : ∀ (z : ℝ), z ∈ Set.Icc (Box.lower I i) (Box.upper I i) → e z y✝ ∈ ↑Box.Icc I\ny : Fin (n + 1) → ℝ\nhy : y ∈ ↑Box.Icc I\n⊢ ‖y - x‖ ≤ diam (↑Box.Icc I)\n[PROOFSTEP]\nrw [← dist_eq_norm]\n[GOAL]\ncase hε\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny✝ : Fin n → ℝ\nhy✝ : y✝ ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * ‖y - x‖\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\nthis : ∀ (z : ℝ), z ∈ Set.Icc (Box.lower I i) (Box.upper I i) → e z y✝ ∈ ↑Box.Icc I\ny : Fin (n + 1) → ℝ\nhy : y ∈ ↑Box.Icc I\n⊢ dist y x ≤ diam (↑Box.Icc I)\n[PROOFSTEP]\nexact dist_le_diam_of_mem I.isCompact_Icc.bounded hy hxI\n[GOAL]\ncase convert_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\nthis : ∀ (z : ℝ), z ∈ Set.Icc (Box.lower I i) (Box.upper I i) → e z y ∈ ↑Box.Icc I\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * diam (↑Box.Icc I)\n⊢ ‖g (e (Box.lower I i) y) - g (e (Box.upper I i) y)‖ ≤ 2 * ε * diam (↑Box.Icc I)\n[PROOFSTEP]\nrw [two_mul, add_mul]\n[GOAL]\ncase convert_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\ng : (Fin (n + 1) → ℝ) → E\nhfc : ContinuousOn (fun y => a + ↑f' (y - x) + g y) (↑Box.Icc I)\nHi :\n  ∀ (x_1 : ℝ),\n    x_1 ∈ Set.Icc (Box.lower I i) (Box.upper I i) →\n      Integrable (Box.face I i) ⊥ ((fun y => a + ↑f' (y - x) + g y) ∘ e x_1) BoxAdditiveMap.volume\nhg : g = fun y => (fun y => a + ↑f' (y - x) + g y) y - a - ↑f' (y - x)\nthis : ∀ (z : ℝ), z ∈ Set.Icc (Box.lower I i) (Box.upper I i) → e z y ∈ ↑Box.Icc I\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖g y‖ ≤ ε * diam (↑Box.Icc I)\n⊢ ‖g (e (Box.lower I i) y) - g (e (Box.upper I i) y)‖ ≤ ε * diam (↑Box.Icc I) + ε * diam (↑Box.Icc I)\n[PROOFSTEP]\nexact norm_sub_le_of_le (hε _ (this _ Hl)) (hε _ (this _ Hu))\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\nthis :\n  ∀ (y : Fin n → ℝ),\n    y ∈ ↑Box.Icc (Box.face I i) →\n      ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) y) - f (e (Box.lower I i) y))‖ ≤\n        2 * ε * diam (↑Box.Icc I)\n⊢ ‖(∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)) • ↑f' (Pi.single i 1) -\n        (integral (Box.face I i) ⊥ (f ∘ e (Box.upper I i)) BoxAdditiveMap.volume -\n          integral (Box.face I i) ⊥ (f ∘ e (Box.lower I i)) BoxAdditiveMap.volume)‖ ≤\n    2 * ε * ↑c * ∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)\n[PROOFSTEP]\ncalc\n  ‖(∏ j, (I.upper j - I.lower j)) • f' (Pi.single i 1) -\n          (integral (I.face i) ⊥ (f ∘ e (I.upper i)) BoxAdditiveMap.volume -\n            integral (I.face i) ⊥ (f ∘ e (I.lower i)) BoxAdditiveMap.volume)‖ =\n      ‖integral.{0, u, u} (I.face i) ⊥\n          (fun x : Fin n → ℝ => f' (Pi.single i (I.upper i - I.lower i)) - (f (e (I.upper i) x) - f (e (I.lower i) x)))\n          BoxAdditiveMap.volume‖ :=\n    by\n    rw [← integral_sub (Hi _ Hu) (Hi _ Hl), ← Box.volume_face_mul i, mul_smul, ← Box.volume_apply, ←\n      BoxAdditiveMap.toSMul_apply, ← integral_const, ← BoxAdditiveMap.volume, ←\n      integral_sub (integrable_const _) ((Hi _ Hu).sub (Hi _ Hl))]\n    simp only [(· ∘ ·), Pi.sub_def, ← f'.map_smul, ← Pi.single_smul', smul_eq_mul, mul_one]\n  _ ≤ (volume (I.face i : Set (Fin n → ℝ))).toReal * (2 * ε * c * (I.upper i - I.lower i)) := by\n    -- The hard part of the estimate was done above, here we just replace `diam I.Icc`\n          -- with `c * (I.upper i - I.lower i)`\n    refine' norm_integral_le_of_le_const (fun y hy => (this y hy).trans _) volume\n    rw [mul_assoc (2 * ε)]\n    exact mul_le_mul_of_nonneg_left (I.diam_Icc_le_of_distortion_le i hc) (mul_nonneg zero_le_two h0.le)\n  _ = 2 * ε * c * ∏ j, (I.upper j - I.lower j) :=\n    by\n    rw [← Measure.toBoxAdditive_apply, Box.volume_apply, ← I.volume_face_mul i]\n    ac_rfl\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\nthis :\n  ∀ (y : Fin n → ℝ),\n    y ∈ ↑Box.Icc (Box.face I i) →\n      ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) y) - f (e (Box.lower I i) y))‖ ≤\n        2 * ε * diam (↑Box.Icc I)\n⊢ ‖(∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)) • ↑f' (Pi.single i 1) -\n        (integral (Box.face I i) ⊥ (f ∘ e (Box.upper I i)) BoxAdditiveMap.volume -\n          integral (Box.face I i) ⊥ (f ∘ e (Box.lower I i)) BoxAdditiveMap.volume)‖ =\n    ‖integral (Box.face I i) ⊥\n        (fun x =>\n          ↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) x) - f (e (Box.lower I i) x)))\n        BoxAdditiveMap.volume‖\n[PROOFSTEP]\nrw [← integral_sub (Hi _ Hu) (Hi _ Hl), ← Box.volume_face_mul i, mul_smul, ← Box.volume_apply, ←\n  BoxAdditiveMap.toSMul_apply, ← integral_const, ← BoxAdditiveMap.volume, ←\n  integral_sub (integrable_const _) ((Hi _ Hu).sub (Hi _ Hl))]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\nthis :\n  ∀ (y : Fin n → ℝ),\n    y ∈ ↑Box.Icc (Box.face I i) →\n      ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) y) - f (e (Box.lower I i) y))‖ ≤\n        2 * ε * diam (↑Box.Icc I)\n⊢ ‖integral (Box.face I i) ⊥\n        ((fun x => (Box.upper I i - Box.lower I i) • ↑f' (Pi.single i 1)) -\n          (f ∘ e (Box.upper I i) - f ∘ e (Box.lower I i)))\n        BoxAdditiveMap.volume‖ =\n    ‖integral (Box.face I i) ⊥\n        (fun x =>\n          ↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) x) - f (e (Box.lower I i) x)))\n        BoxAdditiveMap.volume‖\n[PROOFSTEP]\nsimp only [(· ∘ ·), Pi.sub_def, ← f'.map_smul, ← Pi.single_smul', smul_eq_mul, mul_one]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\nthis :\n  ∀ (y : Fin n → ℝ),\n    y ∈ ↑Box.Icc (Box.face I i) →\n      ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) y) - f (e (Box.lower I i) y))‖ ≤\n        2 * ε * diam (↑Box.Icc I)\n⊢ ‖integral (Box.face I i) ⊥\n        (fun x =>\n          ↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) x) - f (e (Box.lower I i) x)))\n        BoxAdditiveMap.volume‖ ≤\n    ENNReal.toReal (↑↑volume ↑(Box.face I i)) * (2 * ε * ↑c * (Box.upper I i - Box.lower I i))\n[PROOFSTEP]\nrefine' norm_integral_le_of_le_const (fun y hy => (this y hy).trans _) volume\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\nthis :\n  ∀ (y : Fin n → ℝ),\n    y ∈ ↑Box.Icc (Box.face I i) →\n      ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) y) - f (e (Box.lower I i) y))‖ ≤\n        2 * ε * diam (↑Box.Icc I)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\n⊢ 2 * ε * diam (↑Box.Icc I) ≤ 2 * ε * ↑c * (Box.upper I i - Box.lower I i)\n[PROOFSTEP]\nrw [mul_assoc (2 * ε)]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\nthis :\n  ∀ (y : Fin n → ℝ),\n    y ∈ ↑Box.Icc (Box.face I i) →\n      ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) y) - f (e (Box.lower I i) y))‖ ≤\n        2 * ε * diam (↑Box.Icc I)\ny : Fin n → ℝ\nhy : y ∈ ↑Box.Icc (Box.face I i)\n⊢ 2 * ε * diam (↑Box.Icc I) ≤ 2 * ε * (↑c * (Box.upper I i - Box.lower I i))\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left (I.diam_Icc_le_of_distortion_le i hc) (mul_nonneg zero_le_two h0.le)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\nthis :\n  ∀ (y : Fin n → ℝ),\n    y ∈ ↑Box.Icc (Box.face I i) →\n      ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) y) - f (e (Box.lower I i) y))‖ ≤\n        2 * ε * diam (↑Box.Icc I)\n⊢ ENNReal.toReal (↑↑volume ↑(Box.face I i)) * (2 * ε * ↑c * (Box.upper I i - Box.lower I i)) =\n    2 * ε * ↑c * ∏ j : Fin (n + 1), (Box.upper I j - Box.lower I j)\n[PROOFSTEP]\nrw [← Measure.toBoxAdditive_apply, Box.volume_apply, ← I.volume_face_mul i]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) →L[ℝ] E\nhfc : ContinuousOn f (↑Box.Icc I)\nx : Fin (n + 1) → ℝ\nhxI : x ∈ ↑Box.Icc I\na : E\nε : ℝ\nh0 : 0 < ε\nhε : ∀ (y : Fin (n + 1) → ℝ), y ∈ ↑Box.Icc I → ‖f y - a - ↑f' (y - x)‖ ≤ ε * ‖y - x‖\nc : ℝ≥0\nhc : Box.distortion I ≤ c\ne : ℝ → (Fin n → ℝ) → Fin (n + 1) → ℝ := Fin.insertNth i\nHl : Box.lower I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHu : Box.upper I i ∈ Set.Icc (Box.lower I i) (Box.upper I i)\nHi :\n  ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → Integrable (Box.face I i) ⊥ (f ∘ e x) BoxAdditiveMap.volume\nthis :\n  ∀ (y : Fin n → ℝ),\n    y ∈ ↑Box.Icc (Box.face I i) →\n      ‖↑f' (Pi.single i (Box.upper I i - Box.lower I i)) - (f (e (Box.upper I i) y) - f (e (Box.lower I i) y))‖ ≤\n        2 * ε * diam (↑Box.Icc I)\n⊢ (∏ i_1 : Fin n, (Box.upper (Box.face I i) i_1 - Box.lower (Box.face I i) i_1)) *\n      (2 * ε * ↑c * (Box.upper I i - Box.lower I i)) =\n    2 * ε * ↑c *\n      ((∏ j : Fin n, (Box.upper (Box.face I i) j - Box.lower (Box.face I i) j)) * (Box.upper I i - Box.lower I i))\n[PROOFSTEP]\nac_rfl\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\n⊢ HasIntegral I GP (fun x => ↑(f' x) (Pi.single i 1)) BoxAdditiveMap.volume\n    (integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.upper I i) x)) BoxAdditiveMap.volume -\n      integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.lower I i) x)) BoxAdditiveMap.volume)\n[PROOFSTEP]\nhave Hc : ContinuousOn f (Box.Icc I) := fun x hx ↦\n  by\n  by_cases hxs : x ∈ s\n  exacts [Hs x hxs, (Hd x ⟨hx, hxs⟩).continuousWithinAt]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I\n⊢ ContinuousWithinAt f (↑Box.Icc I) x\n[PROOFSTEP]\nby_cases hxs : x ∈ s\n[GOAL]\ncase pos\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I\nhxs : x ∈ s\n⊢ ContinuousWithinAt f (↑Box.Icc I) x\ncase neg\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I\nhxs : ¬x ∈ s\n⊢ ContinuousWithinAt f (↑Box.Icc I) x\n[PROOFSTEP]\nexacts [Hs x hxs, (Hd x ⟨hx, hxs⟩).continuousWithinAt]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\n⊢ HasIntegral I GP (fun x => ↑(f' x) (Pi.single i 1)) BoxAdditiveMap.volume\n    (integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.upper I i) x)) BoxAdditiveMap.volume -\n      integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.lower I i) x)) BoxAdditiveMap.volume)\n[PROOFSTEP]\nset fI : ℝ → Box (Fin n) → E := fun y J => integral.{0, u, u} J GP (fun x => f (i.insertNth y x)) BoxAdditiveMap.volume\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\n⊢ HasIntegral I GP (fun x => ↑(f' x) (Pi.single i 1)) BoxAdditiveMap.volume\n    (integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.upper I i) x)) BoxAdditiveMap.volume -\n      integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.lower I i) x)) BoxAdditiveMap.volume)\n[PROOFSTEP]\nset fb : Icc (I.lower i) (I.upper i) → Fin n →ᵇᵃ[↑(I.face i)] E := fun x =>\n  (integrable_of_continuousOn GP (Box.continuousOn_face_Icc Hc x.2) volume).toBoxAdditive\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\n⊢ HasIntegral I GP (fun x => ↑(f' x) (Pi.single i 1)) BoxAdditiveMap.volume\n    (integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.upper I i) x)) BoxAdditiveMap.volume -\n      integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.lower I i) x)) BoxAdditiveMap.volume)\n[PROOFSTEP]\nset F : Fin (n + 1) →ᵇᵃ[I] E := BoxAdditiveMap.upperSubLower I i fI fb fun x _ J => rfl\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\n⊢ HasIntegral I GP (fun x => ↑(f' x) (Pi.single i 1)) BoxAdditiveMap.volume\n    (integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.upper I i) x)) BoxAdditiveMap.volume -\n      integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.lower I i) x)) BoxAdditiveMap.volume)\n[PROOFSTEP]\nchange HasIntegral I GP (fun x => f' x (Pi.single i 1)) _ (F I)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\n⊢ HasIntegral I GP (fun x => ↑(f' x) (Pi.single i 1)) BoxAdditiveMap.volume (↑F I)\n[PROOFSTEP]\nrefine' HasIntegral.of_le_Henstock_of_forall_isLittleO gp_le _ _ _ s hs _ _\n[GOAL]\ncase refine'_1\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\n⊢ Fin (n + 1) →ᵇᵃ[↑I] ℝ\n[PROOFSTEP]\nexact (volume : Measure (Fin (n + 1) → ℝ)).toBoxAdditive.restrict _ le_top\n[GOAL]\ncase refine'_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\n⊢ ∀ (J : Box (Fin (n + 1))), 0 ≤ ↑(BoxAdditiveMap.restrict (Measure.toBoxAdditive volume) ↑I (_ : ↑I ≤ ⊤)) J\n[PROOFSTEP]\nexact fun J => ENNReal.toReal_nonneg\n[GOAL]\ncase refine'_3\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\n⊢ ∀ (c : ℝ≥0) (x : Fin (n + 1) → ℝ),\n    x ∈ ↑Box.Icc I ∩ s →\n      ∀ (ε : ℝ),\n        ε > 0 →\n          ∃ δ,\n            δ > 0 ∧\n              ∀ (J : Box (Fin (n + 1))),\n                J ≤ I →\n                  ↑Box.Icc J ⊆ closedBall x δ →\n                    x ∈ ↑Box.Icc J →\n                      (GP.bDistortion = true → Box.distortion J ≤ c) →\n                        dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤ ε\n[PROOFSTEP]\nintro c x hx ε ε0\n[GOAL]\ncase refine'_3\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\n⊢ ∃ δ,\n    δ > 0 ∧\n      ∀ (J : Box (Fin (n + 1))),\n        J ≤ I →\n          ↑Box.Icc J ⊆ closedBall x δ →\n            x ∈ ↑Box.Icc J →\n              (GP.bDistortion = true → Box.distortion J ≤ c) →\n                dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤ ε\n[PROOFSTEP]\nhave :\n  ∀ᶠ δ in 𝓝[>] (0 : ℝ),\n    δ ∈ Ioc (0 : ℝ) (1 / 2) ∧\n      (∀ᵉ (y₁ ∈ closedBall x δ ∩ (Box.Icc I)) (y₂ ∈ closedBall x δ ∩ (Box.Icc I)), ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖f' x (Pi.single i 1)‖ ≤ ε / 2 :=\n  by\n  refine' .and _ (.and _ _)\n  · exact Ioc_mem_nhdsWithin_Ioi ⟨le_rfl, one_half_pos⟩\n  · rcases((nhdsWithin_hasBasis nhds_basis_closedBall _).tendsto_iff nhds_basis_closedBall).1 (Hs x hx.2) _\n        (half_pos <| half_pos ε0) with ⟨δ₁, δ₁0, hδ₁⟩\n    filter_upwards [Ioc_mem_nhdsWithin_Ioi ⟨le_rfl, δ₁0⟩] with δ hδ y₁ hy₁ y₂ hy₂\n    have : closedBall x δ ∩ (Box.Icc I) ⊆ closedBall x δ₁ ∩ (Box.Icc I) :=\n      inter_subset_inter_left _ (closedBall_subset_closedBall hδ.2)\n    rw [← dist_eq_norm]\n    calc\n      dist (f y₁) (f y₂) ≤ dist (f y₁) (f x) + dist (f y₂) (f x) := dist_triangle_right _ _ _\n      _ ≤ ε / 2 / 2 + ε / 2 / 2 := (add_le_add (hδ₁ _ <| this hy₁) (hδ₁ _ <| this hy₂))\n      _ = ε / 2 := add_halves _\n  · have : ContinuousWithinAt (fun δ : ℝ => (2 * δ) ^ (n + 1) * ‖f' x (Pi.single i 1)‖) (Ioi 0) 0 :=\n      ((continuousWithinAt_id.const_mul _).pow _).mul_const _\n    refine' this.eventually (ge_mem_nhds _)\n    simpa using half_pos ε0\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\n⊢ ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\n[PROOFSTEP]\nrefine' .and _ (.and _ _)\n[GOAL]\ncase refine'_1\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\n⊢ ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0, δ ∈ Set.Ioc 0 (1 / 2)\n[PROOFSTEP]\nexact Ioc_mem_nhdsWithin_Ioi ⟨le_rfl, one_half_pos⟩\n[GOAL]\ncase refine'_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\n⊢ ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    ∀ (y₁ : Fin (n + 1) → ℝ),\n      y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n        ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\n[PROOFSTEP]\nrcases((nhdsWithin_hasBasis nhds_basis_closedBall _).tendsto_iff nhds_basis_closedBall).1 (Hs x hx.2) _\n    (half_pos <| half_pos ε0) with\n  ⟨δ₁, δ₁0, hδ₁⟩\n[GOAL]\ncase refine'_2.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nδ₁ : ℝ\nδ₁0 : 0 < δ₁\nhδ₁ : ∀ (x_1 : Fin (n + 1) → ℝ), x_1 ∈ closedBall x δ₁ ∩ ↑Box.Icc I → f x_1 ∈ closedBall (f x) (ε / 2 / 2)\n⊢ ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    ∀ (y₁ : Fin (n + 1) → ℝ),\n      y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n        ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\n[PROOFSTEP]\nfilter_upwards [Ioc_mem_nhdsWithin_Ioi ⟨le_rfl, δ₁0⟩] with δ hδ y₁ hy₁ y₂ hy₂\n[GOAL]\ncase h\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nδ₁ : ℝ\nδ₁0 : 0 < δ₁\nhδ₁ : ∀ (x_1 : Fin (n + 1) → ℝ), x_1 ∈ closedBall x δ₁ ∩ ↑Box.Icc I → f x_1 ∈ closedBall (f x) (ε / 2 / 2)\nδ : ℝ\nhδ : δ ∈ Set.Ioc 0 δ₁\ny₁ : Fin (n + 1) → ℝ\nhy₁ : y₁ ∈ closedBall x δ ∩ ↑Box.Icc I\ny₂ : Fin (n + 1) → ℝ\nhy₂ : y₂ ∈ closedBall x δ ∩ ↑Box.Icc I\n⊢ ‖f y₁ - f y₂‖ ≤ ε / 2\n[PROOFSTEP]\nhave : closedBall x δ ∩ (Box.Icc I) ⊆ closedBall x δ₁ ∩ (Box.Icc I) :=\n  inter_subset_inter_left _ (closedBall_subset_closedBall hδ.2)\n[GOAL]\ncase h\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nδ₁ : ℝ\nδ₁0 : 0 < δ₁\nhδ₁ : ∀ (x_1 : Fin (n + 1) → ℝ), x_1 ∈ closedBall x δ₁ ∩ ↑Box.Icc I → f x_1 ∈ closedBall (f x) (ε / 2 / 2)\nδ : ℝ\nhδ : δ ∈ Set.Ioc 0 δ₁\ny₁ : Fin (n + 1) → ℝ\nhy₁ : y₁ ∈ closedBall x δ ∩ ↑Box.Icc I\ny₂ : Fin (n + 1) → ℝ\nhy₂ : y₂ ∈ closedBall x δ ∩ ↑Box.Icc I\nthis : closedBall x δ ∩ ↑Box.Icc I ⊆ closedBall x δ₁ ∩ ↑Box.Icc I\n⊢ ‖f y₁ - f y₂‖ ≤ ε / 2\n[PROOFSTEP]\nrw [← dist_eq_norm]\n[GOAL]\ncase h\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nδ₁ : ℝ\nδ₁0 : 0 < δ₁\nhδ₁ : ∀ (x_1 : Fin (n + 1) → ℝ), x_1 ∈ closedBall x δ₁ ∩ ↑Box.Icc I → f x_1 ∈ closedBall (f x) (ε / 2 / 2)\nδ : ℝ\nhδ : δ ∈ Set.Ioc 0 δ₁\ny₁ : Fin (n + 1) → ℝ\nhy₁ : y₁ ∈ closedBall x δ ∩ ↑Box.Icc I\ny₂ : Fin (n + 1) → ℝ\nhy₂ : y₂ ∈ closedBall x δ ∩ ↑Box.Icc I\nthis : closedBall x δ ∩ ↑Box.Icc I ⊆ closedBall x δ₁ ∩ ↑Box.Icc I\n⊢ dist (f y₁) (f y₂) ≤ ε / 2\n[PROOFSTEP]\ncalc\n  dist (f y₁) (f y₂) ≤ dist (f y₁) (f x) + dist (f y₂) (f x) := dist_triangle_right _ _ _\n  _ ≤ ε / 2 / 2 + ε / 2 / 2 := (add_le_add (hδ₁ _ <| this hy₁) (hδ₁ _ <| this hy₂))\n  _ = ε / 2 := add_halves _\n[GOAL]\ncase refine'_3\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\n⊢ ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0, (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\n[PROOFSTEP]\nhave : ContinuousWithinAt (fun δ : ℝ => (2 * δ) ^ (n + 1) * ‖f' x (Pi.single i 1)‖) (Ioi 0) 0 :=\n  ((continuousWithinAt_id.const_mul _).pow _).mul_const _\n[GOAL]\ncase refine'_3\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis : ContinuousWithinAt (fun δ => (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖) (Set.Ioi 0) 0\n⊢ ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0, (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\n[PROOFSTEP]\nrefine' this.eventually (ge_mem_nhds _)\n[GOAL]\ncase refine'_3\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis : ContinuousWithinAt (fun δ => (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖) (Set.Ioi 0) 0\n⊢ (fun δ => (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖) 0 < ε / 2\n[PROOFSTEP]\nsimpa using half_pos ε0\n[GOAL]\ncase refine'_3\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\n⊢ ∃ δ,\n    δ > 0 ∧\n      ∀ (J : Box (Fin (n + 1))),\n        J ≤ I →\n          ↑Box.Icc J ⊆ closedBall x δ →\n            x ∈ ↑Box.Icc J →\n              (GP.bDistortion = true → Box.distortion J ≤ c) →\n                dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤ ε\n[PROOFSTEP]\nrcases this.exists with ⟨δ, ⟨hδ0, hδ12⟩, hdfδ, hδ⟩\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\n⊢ ∃ δ,\n    δ > 0 ∧\n      ∀ (J : Box (Fin (n + 1))),\n        J ≤ I →\n          ↑Box.Icc J ⊆ closedBall x δ →\n            x ∈ ↑Box.Icc J →\n              (GP.bDistortion = true → Box.distortion J ≤ c) →\n                dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤ ε\n[PROOFSTEP]\nrefine' ⟨δ, hδ0, fun J hJI hJδ _ _ => add_halves ε ▸ _⟩\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\n⊢ dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤ ε / 2 + ε / 2\n[PROOFSTEP]\nhave Hl : J.lower i ∈ Icc (J.lower i) (J.upper i) := Set.left_mem_Icc.2 (J.lower_le_upper i)\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\n⊢ dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤ ε / 2 + ε / 2\n[PROOFSTEP]\nhave Hu : J.upper i ∈ Icc (J.lower i) (J.upper i) := Set.right_mem_Icc.2 (J.lower_le_upper i)\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\n⊢ dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤ ε / 2 + ε / 2\n[PROOFSTEP]\nhave Hi :\n  ∀ x ∈ Icc (J.lower i) (J.upper i),\n    Integrable.{0, u, u} (J.face i) GP (fun y => f (i.insertNth x y)) BoxAdditiveMap.volume :=\n  fun x hx => integrable_of_continuousOn _ (Box.continuousOn_face_Icc (Hc.mono <| Box.le_iff_Icc.1 hJI) hx) volume\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\n⊢ dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤ ε / 2 + ε / 2\n[PROOFSTEP]\nhave hJδ' : Box.Icc J ⊆ closedBall x δ ∩ (Box.Icc I) := subset_inter hJδ (Box.le_iff_Icc.1 hJI)\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\n⊢ dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤ ε / 2 + ε / 2\n[PROOFSTEP]\nhave Hmaps :\n  ∀ z ∈ Icc (J.lower i) (J.upper i), MapsTo (i.insertNth z) (Box.Icc (J.face i)) (closedBall x δ ∩ (Box.Icc I)) :=\n  fun z hz => (J.mapsTo_insertNth_face_Icc hz).mono Subset.rfl hJδ'\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\n⊢ dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤ ε / 2 + ε / 2\n[PROOFSTEP]\nsimp only [dist_eq_norm]\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\n⊢ ‖↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1)) -\n        ↑(BoxAdditiveMap.upperSubLower I i\n              (fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume)\n              (fun x =>\n                Integrable.toBoxAdditive\n                  (_ :\n                    Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x)\n                      (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume))))\n              (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J))\n          J‖ ≤\n    ε / 2 + ε / 2\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\n⊢ ‖↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1)) -\n        (integral (Box.face J i) GP (fun x => f (Fin.insertNth i (Box.upper J i) x)) BoxAdditiveMap.volume -\n          integral (Box.face J i) GP (fun x => f (Fin.insertNth i (Box.lower J i) x)) BoxAdditiveMap.volume)‖ ≤\n    ε / 2 + ε / 2\n[PROOFSTEP]\nrw [← integral_sub (Hi _ Hu) (Hi _ Hl)]\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\n⊢ ‖↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1)) -\n        integral (Box.face J i) GP\n          ((fun y => f (Fin.insertNth i (Box.upper J i) y)) - fun y => f (Fin.insertNth i (Box.lower J i) y))\n          BoxAdditiveMap.volume‖ ≤\n    ε / 2 + ε / 2\n[PROOFSTEP]\nrefine' (norm_sub_le _ _).trans (add_le_add _ _)\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_1\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\n⊢ ‖↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))‖ ≤ ε / 2\n[PROOFSTEP]\nsimp_rw [BoxAdditiveMap.volume_apply, norm_smul, Real.norm_eq_abs, abs_prod]\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_1\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\n⊢ (∏ x : Fin (n + 1), |Box.upper J x - Box.lower J x|) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\n[PROOFSTEP]\nrefine' (mul_le_mul_of_nonneg_right _ <| norm_nonneg _).trans hδ\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_1\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\n⊢ ∏ x : Fin (n + 1), |Box.upper J x - Box.lower J x| ≤ (2 * δ) ^ (n + 1)\n[PROOFSTEP]\nhave : ∀ j, |J.upper j - J.lower j| ≤ 2 * δ := fun j ↦\n  calc\n    dist (J.upper j) (J.lower j) ≤ dist J.upper J.lower := dist_le_pi_dist _ _ _\n    _ ≤ dist J.upper x + dist J.lower x := (dist_triangle_right _ _ _)\n    _ ≤ δ + δ := (add_le_add (hJδ J.upper_mem_Icc) (hJδ J.lower_mem_Icc))\n    _ = 2 * δ := (two_mul δ).symm\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_1\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis✝ :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\nthis : ∀ (j : Fin (n + 1)), |Box.upper J j - Box.lower J j| ≤ 2 * δ\n⊢ ∏ x : Fin (n + 1), |Box.upper J x - Box.lower J x| ≤ (2 * δ) ^ (n + 1)\n[PROOFSTEP]\ncalc\n  ∏ j, |J.upper j - J.lower j| ≤ ∏ j : Fin (n + 1), 2 * δ := prod_le_prod (fun _ _ => abs_nonneg _) fun j _ => this j\n  _ = (2 * δ) ^ (n + 1) := by simp\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis✝ :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\nthis : ∀ (j : Fin (n + 1)), |Box.upper J j - Box.lower J j| ≤ 2 * δ\n⊢ ∏ j : Fin (n + 1), 2 * δ = (2 * δ) ^ (n + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\n⊢ ‖integral (Box.face J i) GP\n        ((fun y => f (Fin.insertNth i (Box.upper J i) y)) - fun y => f (Fin.insertNth i (Box.lower J i) y))\n        BoxAdditiveMap.volume‖ ≤\n    ε / 2\n[PROOFSTEP]\nrefine' (norm_integral_le_of_le_const (fun y hy => hdfδ _ (Hmaps _ Hu hy) _ (Hmaps _ Hl hy)) volume).trans _\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\n⊢ ENNReal.toReal (↑↑volume ↑(Box.face J i)) * (ε / 2) ≤ ε / 2\n[PROOFSTEP]\nrefine' (mul_le_mul_of_nonneg_right _ (half_pos ε0).le).trans_eq (one_mul _)\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\n⊢ ENNReal.toReal (↑↑volume ↑(Box.face J i)) ≤ 1\n[PROOFSTEP]\nrw [Box.coe_eq_pi, Real.volume_pi_Ioc_toReal (Box.lower_le_upper _)]\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝¹ : x ∈ ↑Box.Icc J\nx✝ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\n⊢ ∏ i_1 : Fin n, (Box.upper (Box.face J i) i_1 - Box.lower (Box.face J i) i_1) ≤ 1\n[PROOFSTEP]\nrefine' prod_le_one (fun _ _ => sub_nonneg.2 <| Box.lower_le_upper _ _) fun j _ => _\n[GOAL]\ncase refine'_3.intro.intro.intro.intro.refine'_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I ∩ s\nε : ℝ\nε0 : ε > 0\nthis :\n  ∀ᶠ (δ : ℝ) in 𝓝[Set.Ioi 0] 0,\n    δ ∈ Set.Ioc 0 (1 / 2) ∧\n      (∀ (y₁ : Fin (n + 1) → ℝ),\n          y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n            ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2) ∧\n        (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nδ : ℝ\nhδ0 : 0 < δ\nhδ12 : δ ≤ 1 / 2\nhdfδ :\n  ∀ (y₁ : Fin (n + 1) → ℝ),\n    y₁ ∈ closedBall x δ ∩ ↑Box.Icc I →\n      ∀ (y₂ : Fin (n + 1) → ℝ), y₂ ∈ closedBall x δ ∩ ↑Box.Icc I → ‖f y₁ - f y₂‖ ≤ ε / 2\nhδ : (2 * δ) ^ (n + 1) * ‖↑(f' x) (Pi.single i 1)‖ ≤ ε / 2\nJ : Box (Fin (n + 1))\nhJI : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nx✝² : x ∈ ↑Box.Icc J\nx✝¹ : GP.bDistortion = true → Box.distortion J ≤ c\nHl : Box.lower J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHu : Box.upper J i ∈ Set.Icc (Box.lower J i) (Box.upper J i)\nHi :\n  ∀ (x : ℝ),\n    x ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      Integrable (Box.face J i) GP (fun y => f (Fin.insertNth i x y)) BoxAdditiveMap.volume\nhJδ' : ↑Box.Icc J ⊆ closedBall x δ ∩ ↑Box.Icc I\nHmaps :\n  ∀ (z : ℝ),\n    z ∈ Set.Icc (Box.lower J i) (Box.upper J i) →\n      MapsTo (Fin.insertNth i z) (↑Box.Icc (Box.face J i)) (closedBall x δ ∩ ↑Box.Icc I)\nj : Fin n\nx✝ : j ∈ Finset.univ\n⊢ Box.upper (Box.face J i) j - Box.lower (Box.face J i) j ≤ 1\n[PROOFSTEP]\ncalc\n  J.upper (i.succAbove j) - J.lower (i.succAbove j) ≤ dist (J.upper (i.succAbove j)) (J.lower (i.succAbove j)) :=\n    le_abs_self _\n  _ ≤ dist J.upper J.lower := (dist_le_pi_dist J.upper J.lower (i.succAbove j))\n  _ ≤ dist J.upper x + dist J.lower x := (dist_triangle_right _ _ _)\n  _ ≤ δ + δ := (add_le_add (hJδ J.upper_mem_Icc) (hJδ J.lower_mem_Icc))\n  _ ≤ 1 / 2 + 1 / 2 := (add_le_add hδ12 hδ12)\n  _ = 1 := add_halves 1\n[GOAL]\ncase refine'_4\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\n⊢ ∀ (c : ℝ≥0) (x : Fin (n + 1) → ℝ),\n    x ∈ ↑Box.Icc I \\ s →\n      ∀ (ε : ℝ),\n        ε > 0 →\n          ∃ δ,\n            δ > 0 ∧\n              ∀ (J : Box (Fin (n + 1))),\n                J ≤ I →\n                  ↑Box.Icc J ⊆ closedBall x δ →\n                    x ∈ ↑Box.Icc J →\n                      (GP.bDistortion = true → Box.distortion J ≤ c) →\n                        dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤\n                          ε * ↑(BoxAdditiveMap.restrict (Measure.toBoxAdditive volume) ↑I (_ : ↑I ≤ ⊤)) J\n[PROOFSTEP]\nintro c x hx ε ε0\n[GOAL]\ncase refine'_4\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I \\ s\nε : ℝ\nε0 : ε > 0\n⊢ ∃ δ,\n    δ > 0 ∧\n      ∀ (J : Box (Fin (n + 1))),\n        J ≤ I →\n          ↑Box.Icc J ⊆ closedBall x δ →\n            x ∈ ↑Box.Icc J →\n              (GP.bDistortion = true → Box.distortion J ≤ c) →\n                dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤\n                  ε * ↑(BoxAdditiveMap.restrict (Measure.toBoxAdditive volume) ↑I (_ : ↑I ≤ ⊤)) J\n[PROOFSTEP]\nrcases exists_pos_mul_lt ε0 (2 * c) with ⟨ε', ε'0, hlt⟩\n[GOAL]\ncase refine'_4.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I \\ s\nε : ℝ\nε0 : ε > 0\nε' : ℝ\nε'0 : 0 < ε'\nhlt : 2 * ↑c * ε' < ε\n⊢ ∃ δ,\n    δ > 0 ∧\n      ∀ (J : Box (Fin (n + 1))),\n        J ≤ I →\n          ↑Box.Icc J ⊆ closedBall x δ →\n            x ∈ ↑Box.Icc J →\n              (GP.bDistortion = true → Box.distortion J ≤ c) →\n                dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤\n                  ε * ↑(BoxAdditiveMap.restrict (Measure.toBoxAdditive volume) ↑I (_ : ↑I ≤ ⊤)) J\n[PROOFSTEP]\nrcases(nhdsWithin_hasBasis nhds_basis_closedBall _).mem_iff.1 ((Hd x hx).def ε'0) with ⟨δ, δ0, Hδ⟩\n[GOAL]\ncase refine'_4.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I \\ s\nε : ℝ\nε0 : ε > 0\nε' : ℝ\nε'0 : 0 < ε'\nhlt : 2 * ↑c * ε' < ε\nδ : ℝ\nδ0 : 0 < δ\nHδ : closedBall x δ ∩ ↑Box.Icc I ⊆ {x_1 | (fun x_2 => ‖f x_2 - f x - ↑(f' x) (x_2 - x)‖ ≤ ε' * ‖x_2 - x‖) x_1}\n⊢ ∃ δ,\n    δ > 0 ∧\n      ∀ (J : Box (Fin (n + 1))),\n        J ≤ I →\n          ↑Box.Icc J ⊆ closedBall x δ →\n            x ∈ ↑Box.Icc J →\n              (GP.bDistortion = true → Box.distortion J ≤ c) →\n                dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤\n                  ε * ↑(BoxAdditiveMap.restrict (Measure.toBoxAdditive volume) ↑I (_ : ↑I ≤ ⊤)) J\n[PROOFSTEP]\nrefine' ⟨δ, δ0, fun J hle hJδ hxJ hJc => _⟩\n[GOAL]\ncase refine'_4.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I \\ s\nε : ℝ\nε0 : ε > 0\nε' : ℝ\nε'0 : 0 < ε'\nhlt : 2 * ↑c * ε' < ε\nδ : ℝ\nδ0 : 0 < δ\nHδ : closedBall x δ ∩ ↑Box.Icc I ⊆ {x_1 | (fun x_2 => ‖f x_2 - f x - ↑(f' x) (x_2 - x)‖ ≤ ε' * ‖x_2 - x‖) x_1}\nJ : Box (Fin (n + 1))\nhle : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nhxJ : x ∈ ↑Box.Icc J\nhJc : GP.bDistortion = true → Box.distortion J ≤ c\n⊢ dist (↑(↑BoxAdditiveMap.volume J) (↑(f' x) (Pi.single i 1))) (↑F J) ≤\n    ε * ↑(BoxAdditiveMap.restrict (Measure.toBoxAdditive volume) ↑I (_ : ↑I ≤ ⊤)) J\n[PROOFSTEP]\nsimp only [BoxAdditiveMap.volume_apply, Box.volume_apply, dist_eq_norm]\n[GOAL]\ncase refine'_4.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I \\ s\nε : ℝ\nε0 : ε > 0\nε' : ℝ\nε'0 : 0 < ε'\nhlt : 2 * ↑c * ε' < ε\nδ : ℝ\nδ0 : 0 < δ\nHδ : closedBall x δ ∩ ↑Box.Icc I ⊆ {x_1 | (fun x_2 => ‖f x_2 - f x - ↑(f' x) (x_2 - x)‖ ≤ ε' * ‖x_2 - x‖) x_1}\nJ : Box (Fin (n + 1))\nhle : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nhxJ : x ∈ ↑Box.Icc J\nhJc : GP.bDistortion = true → Box.distortion J ≤ c\n⊢ ‖(∏ j : Fin (n + 1), (Box.upper J j - Box.lower J j)) • ↑(f' x) (Pi.single i 1) -\n        ↑(BoxAdditiveMap.upperSubLower I i\n              (fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume)\n              (fun x =>\n                Integrable.toBoxAdditive\n                  (_ :\n                    Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x)\n                      (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume))))\n              (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J))\n          J‖ ≤\n    ε * ↑(BoxAdditiveMap.restrict (Measure.toBoxAdditive volume) ↑I (_ : ↑I ≤ ⊤)) J\n[PROOFSTEP]\nrefine'\n  (norm_volume_sub_integral_face_upper_sub_lower_smul_le _ (Hc.mono <| Box.le_iff_Icc.1 hle) hxJ ε'0 (fun y hy => Hδ _)\n        (hJc rfl)).trans\n    _\n[GOAL]\ncase refine'_4.intro.intro.intro.intro.refine'_1\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I \\ s\nε : ℝ\nε0 : ε > 0\nε' : ℝ\nε'0 : 0 < ε'\nhlt : 2 * ↑c * ε' < ε\nδ : ℝ\nδ0 : 0 < δ\nHδ : closedBall x δ ∩ ↑Box.Icc I ⊆ {x_1 | (fun x_2 => ‖f x_2 - f x - ↑(f' x) (x_2 - x)‖ ≤ ε' * ‖x_2 - x‖) x_1}\nJ : Box (Fin (n + 1))\nhle : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nhxJ : x ∈ ↑Box.Icc J\nhJc : GP.bDistortion = true → Box.distortion J ≤ c\ny : Fin (n + 1) → ℝ\nhy : y ∈ ↑Box.Icc J\n⊢ y ∈ closedBall x δ ∩ ↑Box.Icc I\n[PROOFSTEP]\nexact ⟨hJδ hy, Box.le_iff_Icc.1 hle hy⟩\n[GOAL]\ncase refine'_4.intro.intro.intro.intro.refine'_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I \\ s\nε : ℝ\nε0 : ε > 0\nε' : ℝ\nε'0 : 0 < ε'\nhlt : 2 * ↑c * ε' < ε\nδ : ℝ\nδ0 : 0 < δ\nHδ : closedBall x δ ∩ ↑Box.Icc I ⊆ {x_1 | (fun x_2 => ‖f x_2 - f x - ↑(f' x) (x_2 - x)‖ ≤ ε' * ‖x_2 - x‖) x_1}\nJ : Box (Fin (n + 1))\nhle : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nhxJ : x ∈ ↑Box.Icc J\nhJc : GP.bDistortion = true → Box.distortion J ≤ c\n⊢ 2 * ε' * ↑c * ∏ j : Fin (n + 1), (Box.upper J j - Box.lower J j) ≤\n    ε * ↑(BoxAdditiveMap.restrict (Measure.toBoxAdditive volume) ↑I (_ : ↑I ≤ ⊤)) J\n[PROOFSTEP]\nrw [mul_right_comm (2 : ℝ), ← Box.volume_apply]\n[GOAL]\ncase refine'_4.intro.intro.intro.intro.refine'_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nHc : ContinuousOn f (↑Box.Icc I)\nfI : ℝ → Box (Fin n) → E := fun y J => integral J GP (fun x => f (Fin.insertNth i y x)) BoxAdditiveMap.volume\nfb : ↑(Set.Icc (Box.lower I i) (Box.upper I i)) → Fin n →ᵇᵃ[↑(Box.face I i)] E :=\n  fun x =>\n    Integrable.toBoxAdditive\n      (_ : Integrable (Box.face I i) GP (f ∘ Fin.insertNth i ↑x) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive volume)))\nF : Fin (n + 1) →ᵇᵃ[↑I] E :=\n  BoxAdditiveMap.upperSubLower I i fI fb\n    (_ : ∀ (x : ℝ), x ∈ Set.Icc (Box.lower I i) (Box.upper I i) → ∀ (J : Box (Fin n)), fI x J = fI x J)\nc : ℝ≥0\nx : Fin (n + 1) → ℝ\nhx : x ∈ ↑Box.Icc I \\ s\nε : ℝ\nε0 : ε > 0\nε' : ℝ\nε'0 : 0 < ε'\nhlt : 2 * ↑c * ε' < ε\nδ : ℝ\nδ0 : 0 < δ\nHδ : closedBall x δ ∩ ↑Box.Icc I ⊆ {x_1 | (fun x_2 => ‖f x_2 - f x - ↑(f' x) (x_2 - x)‖ ≤ ε' * ‖x_2 - x‖) x_1}\nJ : Box (Fin (n + 1))\nhle : J ≤ I\nhJδ : ↑Box.Icc J ⊆ closedBall x δ\nhxJ : x ∈ ↑Box.Icc J\nhJc : GP.bDistortion = true → Box.distortion J ≤ c\n⊢ 2 * ↑c * ε' * ↑(Measure.toBoxAdditive volume) J ≤\n    ε * ↑(BoxAdditiveMap.restrict (Measure.toBoxAdditive volume) ↑I (_ : ↑I ≤ ⊤)) J\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right hlt.le ENNReal.toReal_nonneg\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → Fin (n + 1) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\n⊢ HasIntegral I GP (fun x => ∑ i : Fin (n + 1), ↑(f' x) (Pi.single i 1) i) BoxAdditiveMap.volume\n    (∑ i : Fin (n + 1),\n      (integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.upper I i) x) i) BoxAdditiveMap.volume -\n        integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.lower I i) x) i) BoxAdditiveMap.volume))\n[PROOFSTEP]\nrefine HasIntegral.sum fun i _ => ?_\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → Fin (n + 1) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ContinuousWithinAt f (↑Box.Icc I) x\nHd : ∀ (x : Fin (n + 1) → ℝ), x ∈ ↑Box.Icc I \\ s → HasFDerivWithinAt f (f' x) (↑Box.Icc I) x\ni : Fin (n + 1)\nx✝ : i ∈ Finset.univ\n⊢ HasIntegral I GP (fun x => ↑(f' x) (Pi.single i 1) i) BoxAdditiveMap.volume\n    (integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.upper I i) x) i) BoxAdditiveMap.volume -\n      integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.lower I i) x) i) BoxAdditiveMap.volume)\n[PROOFSTEP]\nsimp only [hasFDerivWithinAt_pi', continuousWithinAt_pi] at Hd Hs \n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nn : ℕ\ninst✝ : CompleteSpace E\nI : Box (Fin (n + 1))\ni✝ : Fin (n + 1)\nf : (Fin (n + 1) → ℝ) → Fin (n + 1) → E\nf' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E\ns : Set (Fin (n + 1) → ℝ)\nhs : Set.Countable s\ni : Fin (n + 1)\nx✝ : i ∈ Finset.univ\nHd :\n  ∀ (x : Fin (n + 1) → ℝ),\n    x ∈ ↑Box.Icc I \\ s →\n      ∀ (i : Fin (n + 1)),\n        HasFDerivWithinAt (fun x => f x i) (ContinuousLinearMap.comp (ContinuousLinearMap.proj i) (f' x)) (↑Box.Icc I) x\nHs : ∀ (x : Fin (n + 1) → ℝ), x ∈ s → ∀ (i : Fin (n + 1)), ContinuousWithinAt (fun y => f y i) (↑Box.Icc I) x\n⊢ HasIntegral I GP (fun x => ↑(f' x) (Pi.single i 1) i) BoxAdditiveMap.volume\n    (integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.upper I i) x) i) BoxAdditiveMap.volume -\n      integral (Box.face I i) GP (fun x => f (Fin.insertNth i (Box.lower I i) x) i) BoxAdditiveMap.volume)\n[PROOFSTEP]\nexact hasIntegral_GP_pderiv I _ _ s hs (fun x hx => Hs x hx i) (fun x hx => Hd x hx i) i\n", "meta": {"mathlib_filename": "Mathlib.Analysis.BoxIntegral.DivergenceTheorem", "llama_tokens": 73705, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506526772884, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.3981400300429889}}
{"text": "[GOAL]\nn m : ℕ\nF : TypeVec n → Type u_1\nfF : MvFunctor F\nq : MvQPF F\nG : Fin2 n → TypeVec m → Type u\nfG : (i : Fin2 n) → MvFunctor (G i)\nq' : (i : Fin2 n) → MvQPF (G i)\nα β : TypeVec m\nf : α ⟹ β\n⊢ ∀ {α : TypeVec m} (x : Comp F G α),\n    (fun {α} => Comp.mk ∘ (MvFunctor.map fun i => abs) ∘ abs ∘ comp.get)\n        ((fun {α} => comp.mk ∘ repr ∘ (MvFunctor.map fun i => repr) ∘ Comp.get) x) =\n      x\n[PROOFSTEP]\nintros\n[GOAL]\nn m : ℕ\nF : TypeVec n → Type u_1\nfF : MvFunctor F\nq : MvQPF F\nG : Fin2 n → TypeVec m → Type u\nfG : (i : Fin2 n) → MvFunctor (G i)\nq' : (i : Fin2 n) → MvQPF (G i)\nα β : TypeVec m\nf : α ⟹ β\nα✝ : TypeVec m\nx✝ : Comp F G α✝\n⊢ (fun {α} => Comp.mk ∘ (MvFunctor.map fun i => abs) ∘ abs ∘ comp.get)\n      ((fun {α} => comp.mk ∘ repr ∘ (MvFunctor.map fun i => repr) ∘ Comp.get) x✝) =\n    x✝\n[PROOFSTEP]\nsimp only [(· ∘ ·), comp.get_mk, abs_repr, map_map, TypeVec.comp, MvFunctor.id_map', Comp.mk_get]\n[GOAL]\nn m : ℕ\nF : TypeVec n → Type u_1\nfF : MvFunctor F\nq : MvQPF F\nG : Fin2 n → TypeVec m → Type u\nfG : (i : Fin2 n) → MvFunctor (G i)\nq' : (i : Fin2 n) → MvQPF (G i)\nα β : TypeVec m\nf : α ⟹ β\n⊢ ∀ {α β : TypeVec m} (f : α ⟹ β) (p : Obj (comp (P F) fun i => P (G i)) α),\n    (fun {α} => Comp.mk ∘ (MvFunctor.map fun i => abs) ∘ abs ∘ comp.get) (f <$$> p) =\n      f <$$> (fun {α} => Comp.mk ∘ (MvFunctor.map fun i => abs) ∘ abs ∘ comp.get) p\n[PROOFSTEP]\nintros\n[GOAL]\nn m : ℕ\nF : TypeVec n → Type u_1\nfF : MvFunctor F\nq : MvQPF F\nG : Fin2 n → TypeVec m → Type u\nfG : (i : Fin2 n) → MvFunctor (G i)\nq' : (i : Fin2 n) → MvQPF (G i)\nα β : TypeVec m\nf : α ⟹ β\nα✝ β✝ : TypeVec m\nf✝ : α✝ ⟹ β✝\np✝ : Obj (comp (P F) fun i => P (G i)) α✝\n⊢ (fun {α} => Comp.mk ∘ (MvFunctor.map fun i => abs) ∘ abs ∘ comp.get) (f✝ <$$> p✝) =\n    f✝ <$$> (fun {α} => Comp.mk ∘ (MvFunctor.map fun i => abs) ∘ abs ∘ comp.get) p✝\n[PROOFSTEP]\nsimp only [(· ∘ ·)]\n[GOAL]\nn m : ℕ\nF : TypeVec n → Type u_1\nfF : MvFunctor F\nq : MvQPF F\nG : Fin2 n → TypeVec m → Type u\nfG : (i : Fin2 n) → MvFunctor (G i)\nq' : (i : Fin2 n) → MvQPF (G i)\nα β : TypeVec m\nf : α ⟹ β\nα✝ β✝ : TypeVec m\nf✝ : α✝ ⟹ β✝\np✝ : Obj (comp (P F) fun i => P (G i)) α✝\n⊢ Comp.mk ((fun i => abs) <$$> abs (comp.get (f✝ <$$> p✝))) = f✝ <$$> Comp.mk ((fun i => abs) <$$> abs (comp.get p✝))\n[PROOFSTEP]\nrw [← abs_map]\n[GOAL]\nn m : ℕ\nF : TypeVec n → Type u_1\nfF : MvFunctor F\nq : MvQPF F\nG : Fin2 n → TypeVec m → Type u\nfG : (i : Fin2 n) → MvFunctor (G i)\nq' : (i : Fin2 n) → MvQPF (G i)\nα β : TypeVec m\nf : α ⟹ β\nα✝ β✝ : TypeVec m\nf✝ : α✝ ⟹ β✝\np✝ : Obj (comp (P F) fun i => P (G i)) α✝\n⊢ Comp.mk (abs ((fun i => abs) <$$> comp.get (f✝ <$$> p✝))) = f✝ <$$> Comp.mk ((fun i => abs) <$$> abs (comp.get p✝))\n[PROOFSTEP]\nsimp only [comp.get_map, map_map, TypeVec.comp, abs_map, map_mk]\n", "meta": {"mathlib_filename": "Mathlib.Data.QPF.Multivariate.Constructions.Comp", "llama_tokens": 1511, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7549149868676284, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.3980791463221694}}
{"text": "[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝³ : TopologicalSpace B\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nφ φ' : B → F ≃L[𝕜] F\nU U' : Set B\nhU : IsOpen U\nhφ : ContinuousOn (fun x => ↑(φ x)) U\nh2φ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nhU' : IsOpen U'\nhφ' : ContinuousOn (fun x => ↑(φ' x)) U'\nh2φ' : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'\n⊢ (localHomeomorph φ hU hφ h2φ ≫ₕ localHomeomorph φ' hU' hφ' h2φ').toLocalEquiv.source = (U ∩ U') ×ˢ univ\n[PROOFSTEP]\ndsimp only [FiberwiseLinear.localHomeomorph]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝³ : TopologicalSpace B\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nφ φ' : B → F ≃L[𝕜] F\nU U' : Set B\nhU : IsOpen U\nhφ : ContinuousOn (fun x => ↑(φ x)) U\nh2φ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nhU' : IsOpen U'\nhφ' : ContinuousOn (fun x => ↑(φ' x)) U'\nh2φ' : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'\n⊢ ({\n            toLocalEquiv :=\n              { toFun := fun x => (x.fst, ↑(φ x.fst) x.snd),\n                invFun := fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd), source := U ×ˢ univ,\n                target := U ×ˢ univ,\n                map_source' := (_ : ∀ (_x : B × F), _x ∈ U ×ˢ univ → (_x.fst, ↑(φ _x.fst) _x.snd) ∈ U ×ˢ univ),\n                map_target' :=\n                  (_ :\n                    ∀ (_x : B × F),\n                      _x ∈ U ×ˢ univ → (_x.fst, ↑(ContinuousLinearEquiv.symm (φ _x.fst)) _x.snd) ∈ U ×ˢ univ),\n                left_inv' :=\n                  (_ :\n                    ∀ (x : B × F),\n                      x ∈ U ×ˢ univ →\n                        (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd))\n                            ((fun x => (x.fst, ↑(φ x.fst) x.snd)) x) =\n                          x),\n                right_inv' :=\n                  (_ :\n                    ∀ (x : B × F),\n                      x ∈ U ×ˢ univ →\n                        (fun x => (x.fst, ↑(φ x.fst) x.snd))\n                            ((fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd)) x) =\n                          x) },\n            open_source := (_ : IsOpen (U ×ˢ univ)), open_target := (_ : IsOpen (U ×ˢ univ)),\n            continuous_toFun :=\n              (_ :\n                ContinuousOn (fun x => (x.fst, ↑(φ x.fst) x.snd))\n                  { toFun := fun x => (x.fst, ↑(φ x.fst) x.snd),\n                      invFun := fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd), source := U ×ˢ univ,\n                      target := U ×ˢ univ,\n                      map_source' := (_ : ∀ (_x : B × F), _x ∈ U ×ˢ univ → (_x.fst, ↑(φ _x.fst) _x.snd) ∈ U ×ˢ univ),\n                      map_target' :=\n                        (_ :\n                          ∀ (_x : B × F),\n                            _x ∈ U ×ˢ univ → (_x.fst, ↑(ContinuousLinearEquiv.symm (φ _x.fst)) _x.snd) ∈ U ×ˢ univ),\n                      left_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U ×ˢ univ →\n                              (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd))\n                                  ((fun x => (x.fst, ↑(φ x.fst) x.snd)) x) =\n                                x),\n                      right_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U ×ˢ univ →\n                              (fun x => (x.fst, ↑(φ x.fst) x.snd))\n                                  ((fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd)) x) =\n                                x) }.source),\n            continuous_invFun :=\n              (_ :\n                ContinuousOn (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd))\n                  { toFun := fun x => (x.fst, ↑(φ x.fst) x.snd),\n                      invFun := fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd), source := U ×ˢ univ,\n                      target := U ×ˢ univ,\n                      map_source' := (_ : ∀ (_x : B × F), _x ∈ U ×ˢ univ → (_x.fst, ↑(φ _x.fst) _x.snd) ∈ U ×ˢ univ),\n                      map_target' :=\n                        (_ :\n                          ∀ (_x : B × F),\n                            _x ∈ U ×ˢ univ → (_x.fst, ↑(ContinuousLinearEquiv.symm (φ _x.fst)) _x.snd) ∈ U ×ˢ univ),\n                      left_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U ×ˢ univ →\n                              (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd))\n                                  ((fun x => (x.fst, ↑(φ x.fst) x.snd)) x) =\n                                x),\n                      right_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U ×ˢ univ →\n                              (fun x => (x.fst, ↑(φ x.fst) x.snd))\n                                  ((fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd)) x) =\n                                x) }.target) } ≫ₕ\n          {\n            toLocalEquiv :=\n              { toFun := fun x => (x.fst, ↑(φ' x.fst) x.snd),\n                invFun := fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd), source := U' ×ˢ univ,\n                target := U' ×ˢ univ,\n                map_source' := (_ : ∀ (_x : B × F), _x ∈ U' ×ˢ univ → (_x.fst, ↑(φ' _x.fst) _x.snd) ∈ U' ×ˢ univ),\n                map_target' :=\n                  (_ :\n                    ∀ (_x : B × F),\n                      _x ∈ U' ×ˢ univ → (_x.fst, ↑(ContinuousLinearEquiv.symm (φ' _x.fst)) _x.snd) ∈ U' ×ˢ univ),\n                left_inv' :=\n                  (_ :\n                    ∀ (x : B × F),\n                      x ∈ U' ×ˢ univ →\n                        (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd))\n                            ((fun x => (x.fst, ↑(φ' x.fst) x.snd)) x) =\n                          x),\n                right_inv' :=\n                  (_ :\n                    ∀ (x : B × F),\n                      x ∈ U' ×ˢ univ →\n                        (fun x => (x.fst, ↑(φ' x.fst) x.snd))\n                            ((fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd)) x) =\n                          x) },\n            open_source := (_ : IsOpen (U' ×ˢ univ)), open_target := (_ : IsOpen (U' ×ˢ univ)),\n            continuous_toFun :=\n              (_ :\n                ContinuousOn (fun x => (x.fst, ↑(φ' x.fst) x.snd))\n                  { toFun := fun x => (x.fst, ↑(φ' x.fst) x.snd),\n                      invFun := fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd), source := U' ×ˢ univ,\n                      target := U' ×ˢ univ,\n                      map_source' := (_ : ∀ (_x : B × F), _x ∈ U' ×ˢ univ → (_x.fst, ↑(φ' _x.fst) _x.snd) ∈ U' ×ˢ univ),\n                      map_target' :=\n                        (_ :\n                          ∀ (_x : B × F),\n                            _x ∈ U' ×ˢ univ → (_x.fst, ↑(ContinuousLinearEquiv.symm (φ' _x.fst)) _x.snd) ∈ U' ×ˢ univ),\n                      left_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U' ×ˢ univ →\n                              (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd))\n                                  ((fun x => (x.fst, ↑(φ' x.fst) x.snd)) x) =\n                                x),\n                      right_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U' ×ˢ univ →\n                              (fun x => (x.fst, ↑(φ' x.fst) x.snd))\n                                  ((fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd)) x) =\n                                x) }.source),\n            continuous_invFun :=\n              (_ :\n                ContinuousOn (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd))\n                  { toFun := fun x => (x.fst, ↑(φ' x.fst) x.snd),\n                      invFun := fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd), source := U' ×ˢ univ,\n                      target := U' ×ˢ univ,\n                      map_source' := (_ : ∀ (_x : B × F), _x ∈ U' ×ˢ univ → (_x.fst, ↑(φ' _x.fst) _x.snd) ∈ U' ×ˢ univ),\n                      map_target' :=\n                        (_ :\n                          ∀ (_x : B × F),\n                            _x ∈ U' ×ˢ univ → (_x.fst, ↑(ContinuousLinearEquiv.symm (φ' _x.fst)) _x.snd) ∈ U' ×ˢ univ),\n                      left_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U' ×ˢ univ →\n                              (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd))\n                                  ((fun x => (x.fst, ↑(φ' x.fst) x.snd)) x) =\n                                x),\n                      right_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U' ×ˢ univ →\n                              (fun x => (x.fst, ↑(φ' x.fst) x.snd))\n                                  ((fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd)) x) =\n                                x) }.target) }).toLocalEquiv.source =\n    (U ∩ U') ×ˢ univ\n[PROOFSTEP]\nmfld_set_tac\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝³ : TopologicalSpace B\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nφ φ' : B → F ≃L[𝕜] F\nU U' : Set B\nhU : IsOpen U\nhφ : ContinuousOn (fun x => ↑(φ x)) U\nh2φ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nhU' : IsOpen U'\nhφ' : ContinuousOn (fun x => ↑(φ' x)) U'\nh2φ' : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'\n⊢ (localHomeomorph φ hU hφ h2φ ≫ₕ localHomeomorph φ' hU' hφ' h2φ').toLocalEquiv.target = (U ∩ U') ×ˢ univ\n[PROOFSTEP]\ndsimp only [FiberwiseLinear.localHomeomorph]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝³ : TopologicalSpace B\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nφ φ' : B → F ≃L[𝕜] F\nU U' : Set B\nhU : IsOpen U\nhφ : ContinuousOn (fun x => ↑(φ x)) U\nh2φ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nhU' : IsOpen U'\nhφ' : ContinuousOn (fun x => ↑(φ' x)) U'\nh2φ' : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'\n⊢ ({\n            toLocalEquiv :=\n              { toFun := fun x => (x.fst, ↑(φ x.fst) x.snd),\n                invFun := fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd), source := U ×ˢ univ,\n                target := U ×ˢ univ,\n                map_source' := (_ : ∀ (_x : B × F), _x ∈ U ×ˢ univ → (_x.fst, ↑(φ _x.fst) _x.snd) ∈ U ×ˢ univ),\n                map_target' :=\n                  (_ :\n                    ∀ (_x : B × F),\n                      _x ∈ U ×ˢ univ → (_x.fst, ↑(ContinuousLinearEquiv.symm (φ _x.fst)) _x.snd) ∈ U ×ˢ univ),\n                left_inv' :=\n                  (_ :\n                    ∀ (x : B × F),\n                      x ∈ U ×ˢ univ →\n                        (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd))\n                            ((fun x => (x.fst, ↑(φ x.fst) x.snd)) x) =\n                          x),\n                right_inv' :=\n                  (_ :\n                    ∀ (x : B × F),\n                      x ∈ U ×ˢ univ →\n                        (fun x => (x.fst, ↑(φ x.fst) x.snd))\n                            ((fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd)) x) =\n                          x) },\n            open_source := (_ : IsOpen (U ×ˢ univ)), open_target := (_ : IsOpen (U ×ˢ univ)),\n            continuous_toFun :=\n              (_ :\n                ContinuousOn (fun x => (x.fst, ↑(φ x.fst) x.snd))\n                  { toFun := fun x => (x.fst, ↑(φ x.fst) x.snd),\n                      invFun := fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd), source := U ×ˢ univ,\n                      target := U ×ˢ univ,\n                      map_source' := (_ : ∀ (_x : B × F), _x ∈ U ×ˢ univ → (_x.fst, ↑(φ _x.fst) _x.snd) ∈ U ×ˢ univ),\n                      map_target' :=\n                        (_ :\n                          ∀ (_x : B × F),\n                            _x ∈ U ×ˢ univ → (_x.fst, ↑(ContinuousLinearEquiv.symm (φ _x.fst)) _x.snd) ∈ U ×ˢ univ),\n                      left_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U ×ˢ univ →\n                              (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd))\n                                  ((fun x => (x.fst, ↑(φ x.fst) x.snd)) x) =\n                                x),\n                      right_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U ×ˢ univ →\n                              (fun x => (x.fst, ↑(φ x.fst) x.snd))\n                                  ((fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd)) x) =\n                                x) }.source),\n            continuous_invFun :=\n              (_ :\n                ContinuousOn (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd))\n                  { toFun := fun x => (x.fst, ↑(φ x.fst) x.snd),\n                      invFun := fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd), source := U ×ˢ univ,\n                      target := U ×ˢ univ,\n                      map_source' := (_ : ∀ (_x : B × F), _x ∈ U ×ˢ univ → (_x.fst, ↑(φ _x.fst) _x.snd) ∈ U ×ˢ univ),\n                      map_target' :=\n                        (_ :\n                          ∀ (_x : B × F),\n                            _x ∈ U ×ˢ univ → (_x.fst, ↑(ContinuousLinearEquiv.symm (φ _x.fst)) _x.snd) ∈ U ×ˢ univ),\n                      left_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U ×ˢ univ →\n                              (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd))\n                                  ((fun x => (x.fst, ↑(φ x.fst) x.snd)) x) =\n                                x),\n                      right_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U ×ˢ univ →\n                              (fun x => (x.fst, ↑(φ x.fst) x.snd))\n                                  ((fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ x.fst)) x.snd)) x) =\n                                x) }.target) } ≫ₕ\n          {\n            toLocalEquiv :=\n              { toFun := fun x => (x.fst, ↑(φ' x.fst) x.snd),\n                invFun := fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd), source := U' ×ˢ univ,\n                target := U' ×ˢ univ,\n                map_source' := (_ : ∀ (_x : B × F), _x ∈ U' ×ˢ univ → (_x.fst, ↑(φ' _x.fst) _x.snd) ∈ U' ×ˢ univ),\n                map_target' :=\n                  (_ :\n                    ∀ (_x : B × F),\n                      _x ∈ U' ×ˢ univ → (_x.fst, ↑(ContinuousLinearEquiv.symm (φ' _x.fst)) _x.snd) ∈ U' ×ˢ univ),\n                left_inv' :=\n                  (_ :\n                    ∀ (x : B × F),\n                      x ∈ U' ×ˢ univ →\n                        (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd))\n                            ((fun x => (x.fst, ↑(φ' x.fst) x.snd)) x) =\n                          x),\n                right_inv' :=\n                  (_ :\n                    ∀ (x : B × F),\n                      x ∈ U' ×ˢ univ →\n                        (fun x => (x.fst, ↑(φ' x.fst) x.snd))\n                            ((fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd)) x) =\n                          x) },\n            open_source := (_ : IsOpen (U' ×ˢ univ)), open_target := (_ : IsOpen (U' ×ˢ univ)),\n            continuous_toFun :=\n              (_ :\n                ContinuousOn (fun x => (x.fst, ↑(φ' x.fst) x.snd))\n                  { toFun := fun x => (x.fst, ↑(φ' x.fst) x.snd),\n                      invFun := fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd), source := U' ×ˢ univ,\n                      target := U' ×ˢ univ,\n                      map_source' := (_ : ∀ (_x : B × F), _x ∈ U' ×ˢ univ → (_x.fst, ↑(φ' _x.fst) _x.snd) ∈ U' ×ˢ univ),\n                      map_target' :=\n                        (_ :\n                          ∀ (_x : B × F),\n                            _x ∈ U' ×ˢ univ → (_x.fst, ↑(ContinuousLinearEquiv.symm (φ' _x.fst)) _x.snd) ∈ U' ×ˢ univ),\n                      left_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U' ×ˢ univ →\n                              (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd))\n                                  ((fun x => (x.fst, ↑(φ' x.fst) x.snd)) x) =\n                                x),\n                      right_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U' ×ˢ univ →\n                              (fun x => (x.fst, ↑(φ' x.fst) x.snd))\n                                  ((fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd)) x) =\n                                x) }.source),\n            continuous_invFun :=\n              (_ :\n                ContinuousOn (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd))\n                  { toFun := fun x => (x.fst, ↑(φ' x.fst) x.snd),\n                      invFun := fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd), source := U' ×ˢ univ,\n                      target := U' ×ˢ univ,\n                      map_source' := (_ : ∀ (_x : B × F), _x ∈ U' ×ˢ univ → (_x.fst, ↑(φ' _x.fst) _x.snd) ∈ U' ×ˢ univ),\n                      map_target' :=\n                        (_ :\n                          ∀ (_x : B × F),\n                            _x ∈ U' ×ˢ univ → (_x.fst, ↑(ContinuousLinearEquiv.symm (φ' _x.fst)) _x.snd) ∈ U' ×ˢ univ),\n                      left_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U' ×ˢ univ →\n                              (fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd))\n                                  ((fun x => (x.fst, ↑(φ' x.fst) x.snd)) x) =\n                                x),\n                      right_inv' :=\n                        (_ :\n                          ∀ (x : B × F),\n                            x ∈ U' ×ˢ univ →\n                              (fun x => (x.fst, ↑(φ' x.fst) x.snd))\n                                  ((fun x => (x.fst, ↑(ContinuousLinearEquiv.symm (φ' x.fst)) x.snd)) x) =\n                                x) }.target) }).toLocalEquiv.target =\n    (U ∩ U') ×ˢ univ\n[PROOFSTEP]\nmfld_set_tac\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nh :\n  ∀ (p : B × F),\n    p ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          p ∈ s ∧\n            ∃ φ u hu hφ h2φ,\n              LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e s)\n                (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n                  (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n⊢ ∃ U,\n    e.source = U ×ˢ univ ∧\n      ∀ (x : B),\n        x ∈ U →\n          ∃ φ u hu _huU _hux hφ h2φ,\n            LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n              (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n[PROOFSTEP]\nrw [SetCoe.forall'] at h \n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nh :\n  ∀ (x : ↑e.source),\n    ∃ s,\n      IsOpen s ∧\n        ↑x ∈ s ∧\n          ∃ φ u hu hφ h2φ,\n            LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e s)\n              (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n⊢ ∃ U,\n    e.source = U ×ˢ univ ∧\n      ∀ (x : B),\n        x ∈ U →\n          ∃ φ u hu _huU _hux hφ h2φ,\n            LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n              (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n[PROOFSTEP]\nchoose s hs hsp φ u hu hφ h2φ heφ using h\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\n⊢ ∃ U,\n    e.source = U ×ˢ univ ∧\n      ∀ (x : B),\n        x ∈ U →\n          ∃ φ u hu _huU _hux hφ h2φ,\n            LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n              (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n[PROOFSTEP]\nhave hesu : ∀ p : e.source, e.source ∩ s p = u p ×ˢ univ :=\n  by\n  intro p\n  rw [← e.restr_source' (s _) (hs _)]\n  exact (heφ p).1\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\n⊢ ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\n[PROOFSTEP]\nintro p\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\np : ↑e.source\n⊢ e.source ∩ s p = u p ×ˢ univ\n[PROOFSTEP]\nrw [← e.restr_source' (s _) (hs _)]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\np : ↑e.source\n⊢ (LocalHomeomorph.restr e (s p)).toLocalEquiv.source = u p ×ˢ univ\n[PROOFSTEP]\nexact (heφ p).1\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\n⊢ ∃ U,\n    e.source = U ×ˢ univ ∧\n      ∀ (x : B),\n        x ∈ U →\n          ∃ φ u hu _huU _hux hφ h2φ,\n            LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n              (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n[PROOFSTEP]\nhave hu' : ∀ p : e.source, (p : B × F).fst ∈ u p := by\n  intro p\n  have : (p : B × F) ∈ e.source ∩ s p := ⟨p.prop, hsp p⟩\n  simpa only [hesu, mem_prod, mem_univ, and_true_iff] using this\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\n⊢ ∀ (p : ↑e.source), (↑p).fst ∈ u p\n[PROOFSTEP]\nintro p\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\np : ↑e.source\n⊢ (↑p).fst ∈ u p\n[PROOFSTEP]\nhave : (p : B × F) ∈ e.source ∩ s p := ⟨p.prop, hsp p⟩\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\np : ↑e.source\nthis : ↑p ∈ e.source ∩ s p\n⊢ (↑p).fst ∈ u p\n[PROOFSTEP]\nsimpa only [hesu, mem_prod, mem_univ, and_true_iff] using this\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\n⊢ ∃ U,\n    e.source = U ×ˢ univ ∧\n      ∀ (x : B),\n        x ∈ U →\n          ∃ φ u hu _huU _hux hφ h2φ,\n            LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n              (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n[PROOFSTEP]\nhave heu : ∀ p : e.source, ∀ q : B × F, q.fst ∈ u p → q ∈ e.source :=\n  by\n  intro p q hq\n  have : q ∈ u p ×ˢ (univ : Set F) := ⟨hq, trivial⟩\n  rw [← hesu p] at this \n  exact this.1\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\n⊢ ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\n[PROOFSTEP]\nintro p q hq\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\np : ↑e.source\nq : B × F\nhq : q.fst ∈ u p\n⊢ q ∈ e.source\n[PROOFSTEP]\nhave : q ∈ u p ×ˢ (univ : Set F) := ⟨hq, trivial⟩\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\np : ↑e.source\nq : B × F\nhq : q.fst ∈ u p\nthis : q ∈ u p ×ˢ univ\n⊢ q ∈ e.source\n[PROOFSTEP]\nrw [← hesu p] at this \n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\np : ↑e.source\nq : B × F\nhq : q.fst ∈ u p\nthis : q ∈ e.source ∩ s p\n⊢ q ∈ e.source\n[PROOFSTEP]\nexact this.1\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\n⊢ ∃ U,\n    e.source = U ×ˢ univ ∧\n      ∀ (x : B),\n        x ∈ U →\n          ∃ φ u hu _huU _hux hφ h2φ,\n            LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n              (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n[PROOFSTEP]\nhave he : e.source = (Prod.fst '' e.source) ×ˢ (univ : Set F) :=\n  by\n  apply HasSubset.Subset.antisymm\n  · intro p hp\n    exact ⟨⟨p, hp, rfl⟩, trivial⟩\n  · rintro ⟨x, v⟩ ⟨⟨p, hp, rfl : p.fst = x⟩, -⟩\n    exact heu ⟨p, hp⟩ (p.fst, v) (hu' ⟨p, hp⟩)\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\n⊢ e.source = (Prod.fst '' e.source) ×ˢ univ\n[PROOFSTEP]\napply HasSubset.Subset.antisymm\n[GOAL]\ncase a\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\n⊢ e.source ⊆ (Prod.fst '' e.source) ×ˢ univ\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase a\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\np : B × F\nhp : p ∈ e.source\n⊢ p ∈ (Prod.fst '' e.source) ×ˢ univ\n[PROOFSTEP]\nexact ⟨⟨p, hp, rfl⟩, trivial⟩\n[GOAL]\ncase a\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\n⊢ (Prod.fst '' e.source) ×ˢ univ ⊆ e.source\n[PROOFSTEP]\nrintro ⟨x, v⟩ ⟨⟨p, hp, rfl : p.fst = x⟩, -⟩\n[GOAL]\ncase a.mk.intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\nv : F\np : B × F\nhp : p ∈ e.source\n⊢ (p.fst, v) ∈ e.source\n[PROOFSTEP]\nexact heu ⟨p, hp⟩ (p.fst, v) (hu' ⟨p, hp⟩)\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\nhe : e.source = (Prod.fst '' e.source) ×ˢ univ\n⊢ ∃ U,\n    e.source = U ×ˢ univ ∧\n      ∀ (x : B),\n        x ∈ U →\n          ∃ φ u hu _huU _hux hφ h2φ,\n            LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n              (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n[PROOFSTEP]\nrefine' ⟨Prod.fst '' e.source, he, _⟩\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\nhe : e.source = (Prod.fst '' e.source) ×ˢ univ\n⊢ ∀ (x : B),\n    x ∈ Prod.fst '' e.source →\n      ∃ φ u hu _huU _hux hφ h2φ,\n        LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n          (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n[PROOFSTEP]\nrintro x ⟨p, hp, rfl⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\nhe : e.source = (Prod.fst '' e.source) ×ˢ univ\np : B × F\nhp : p ∈ e.source\n⊢ ∃ φ u hu _huU _hux hφ h2φ,\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n[PROOFSTEP]\nrefine' ⟨φ ⟨p, hp⟩, u ⟨p, hp⟩, hu ⟨p, hp⟩, _, hu' _, hφ ⟨p, hp⟩, h2φ ⟨p, hp⟩, _⟩\n[GOAL]\ncase intro.intro.refine'_1\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\nhe : e.source = (Prod.fst '' e.source) ×ˢ univ\np : B × F\nhp : p ∈ e.source\n⊢ u { val := p, property := hp } ⊆ Prod.fst '' e.source\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase intro.intro.refine'_1\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\nhe : e.source = (Prod.fst '' e.source) ×ˢ univ\np : B × F\nhp : p ∈ e.source\ny : B\nhy : y ∈ u { val := p, property := hp }\n⊢ y ∈ Prod.fst '' e.source\n[PROOFSTEP]\nrefine' ⟨(y, 0), heu ⟨p, hp⟩ ⟨_, _⟩ hy, rfl⟩\n[GOAL]\ncase intro.intro.refine'_2\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\nhe : e.source = (Prod.fst '' e.source) ×ˢ univ\np : B × F\nhp : p ∈ e.source\n⊢ LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u { val := p, property := hp } ×ˢ univ))\n    (FiberwiseLinear.localHomeomorph (φ { val := p, property := hp }) (_ : IsOpen (u { val := p, property := hp }))\n      (_ : ContinuousOn (fun x => ↑(φ { val := p, property := hp } x)) (u { val := p, property := hp }))\n      (_ :\n        ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ { val := p, property := hp } x)))\n          (u { val := p, property := hp })))\n[PROOFSTEP]\nrw [← hesu, e.restr_source_inter]\n[GOAL]\ncase intro.intro.refine'_2\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\ns : ↑e.source → Set (B × F)\nhs : ∀ (x : ↑e.source), IsOpen (s x)\nhsp : ∀ (x : ↑e.source), ↑x ∈ s x\nφ : ↑e.source → B → F ≃L[𝕜] F\nu : ↑e.source → Set B\nhu : ∀ (x : ↑e.source), IsOpen (u x)\nhφ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑e.source), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑e.source),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s x))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nhesu : ∀ (p : ↑e.source), e.source ∩ s p = u p ×ˢ univ\nhu' : ∀ (p : ↑e.source), (↑p).fst ∈ u p\nheu : ∀ (p : ↑e.source) (q : B × F), q.fst ∈ u p → q ∈ e.source\nhe : e.source = (Prod.fst '' e.source) ×ˢ univ\np : B × F\nhp : p ∈ e.source\n⊢ LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (s { val := p, property := hp }))\n    (FiberwiseLinear.localHomeomorph (φ { val := p, property := hp }) (_ : IsOpen (u { val := p, property := hp }))\n      (_ : ContinuousOn (fun x => ↑(φ { val := p, property := hp } x)) (u { val := p, property := hp }))\n      (_ :\n        ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ { val := p, property := hp } x)))\n          (u { val := p, property := hp })))\n[PROOFSTEP]\nexact heφ ⟨p, hp⟩\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nh :\n  ∀ (x : B),\n    x ∈ U →\n      ∃ φ u hu _hUu _hux hφ h2φ,\n        LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n          (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nclassical\nrw [SetCoe.forall'] at h \nchoose! φ u hu hUu hux hφ h2φ heφ using h\nhave heuφ : ∀ x : U, EqOn e (fun q => (q.1, φ x q.1 q.2)) (u x ×ˢ univ) := fun x p hp ↦\n  by\n  refine' (heφ x).2 _\n  rw [(heφ x).1]\n  exact hp\nhave huφ : ∀ (x x' : U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y := fun p p' y hyp hyp' ↦\n  by\n  ext v\n  have h1 : e (y, v) = (y, φ p y v) := heuφ _ ⟨(id hyp : (y, v).fst ∈ u p), trivial⟩\n  have h2 : e (y, v) = (y, φ p' y v) := heuφ _ ⟨(id hyp' : (y, v).fst ∈ u p'), trivial⟩\n  exact congr_arg Prod.snd (h1.symm.trans h2)\nhave hUu' : U = ⋃ i, u i := by\n  ext x\n  rw [mem_iUnion]\n  refine' ⟨fun h => ⟨⟨x, h⟩, hux _⟩, _⟩\n  rintro ⟨x, hx⟩\n  exact hUu x hx\nhave hU' : IsOpen U := by\n  rw [hUu']\n  apply isOpen_iUnion hu\nlet Φ₀ : U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ (↑)) huφ U hUu'.le\nlet Φ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ ⟨y, hy⟩ else ContinuousLinearEquiv.refl 𝕜 F\nhave hΦ : ∀ (y) (hy : y ∈ U), Φ y = Φ₀ ⟨y, hy⟩ := fun y hy => dif_pos hy\nhave hΦφ : ∀ x : U, ∀ y ∈ u x, Φ y = φ x y := by\n  intro x y hyu\n  refine' (hΦ y (hUu x hyu)).trans _\n  exact iUnionLift_mk ⟨y, hyu⟩ _\nhave hΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => (Φ y : F →L[𝕜] F)) U :=\n  by\n  apply contMDiffOn_of_locally_contMDiffOn\n  intro x hx\n  refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩\n  refine' (ContMDiffOn.congr (hφ ⟨x, hx⟩) _).mono (inter_subset_right _ _)\n  intro y hy\n  rw [hΦφ ⟨x, hx⟩ y hy]\nhave h2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ((Φ y).symm : F →L[𝕜] F)) U :=\n  by\n  apply contMDiffOn_of_locally_contMDiffOn\n  intro x hx\n  refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩\n  refine' (ContMDiffOn.congr (h2φ ⟨x, hx⟩) _).mono (inter_subset_right _ _)\n  intro y hy\n  rw [hΦφ ⟨x, hx⟩ y hy]\nrefine' ⟨Φ, U, hU', hΦ, h2Φ, hU, fun p hp => _⟩\nrw [hU] at hp \nrw [heuφ ⟨p.fst, hp.1⟩ ⟨hux _, hp.2⟩]\n  -- porting note: replaced `congrm` with manual `congr_arg`\nrefine congr_arg (Prod.mk _) ?_\nrw [hΦφ]\napply hux\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nh :\n  ∀ (x : B),\n    x ∈ U →\n      ∃ φ u hu _hUu _hux hφ h2φ,\n        LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n          (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nrw [SetCoe.forall'] at h \n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nh :\n  ∀ (x : ↑U),\n    ∃ φ u hu _hUu _hux hφ h2φ,\n      LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n        (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nchoose! φ u hu hUu hux hφ h2φ heφ using h\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nhave heuφ : ∀ x : U, EqOn e (fun q => (q.1, φ x q.1 q.2)) (u x ×ˢ univ) := fun x p hp ↦\n  by\n  refine' (heφ x).2 _\n  rw [(heφ x).1]\n  exact hp\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nx : ↑U\np : B × F\nhp : p ∈ u x ×ˢ univ\n⊢ ↑e p = (fun q => (q.fst, ↑(φ x q.fst) q.snd)) p\n[PROOFSTEP]\nrefine' (heφ x).2 _\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nx : ↑U\np : B × F\nhp : p ∈ u x ×ˢ univ\n⊢ p ∈ (LocalHomeomorph.restr e (u x ×ˢ univ)).toLocalEquiv.source\n[PROOFSTEP]\nrw [(heφ x).1]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nx : ↑U\np : B × F\nhp : p ∈ u x ×ˢ univ\n⊢ p ∈\n    (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n          (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x))).toLocalEquiv.source\n[PROOFSTEP]\nexact hp\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nhave huφ : ∀ (x x' : U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y := fun p p' y hyp hyp' ↦\n  by\n  ext v\n  have h1 : e (y, v) = (y, φ p y v) := heuφ _ ⟨(id hyp : (y, v).fst ∈ u p), trivial⟩\n  have h2 : e (y, v) = (y, φ p' y v) := heuφ _ ⟨(id hyp' : (y, v).fst ∈ u p'), trivial⟩\n  exact congr_arg Prod.snd (h1.symm.trans h2)\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\np p' : ↑U\ny : B\nhyp : y ∈ u p\nhyp' : y ∈ u p'\n⊢ φ p y = φ p' y\n[PROOFSTEP]\next v\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\np p' : ↑U\ny : B\nhyp : y ∈ u p\nhyp' : y ∈ u p'\nv : F\n⊢ ↑(φ p y) v = ↑(φ p' y) v\n[PROOFSTEP]\nhave h1 : e (y, v) = (y, φ p y v) := heuφ _ ⟨(id hyp : (y, v).fst ∈ u p), trivial⟩\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\np p' : ↑U\ny : B\nhyp : y ∈ u p\nhyp' : y ∈ u p'\nv : F\nh1 : ↑e (y, v) = (y, ↑(φ p y) v)\n⊢ ↑(φ p y) v = ↑(φ p' y) v\n[PROOFSTEP]\nhave h2 : e (y, v) = (y, φ p' y v) := heuφ _ ⟨(id hyp' : (y, v).fst ∈ u p'), trivial⟩\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\np p' : ↑U\ny : B\nhyp : y ∈ u p\nhyp' : y ∈ u p'\nv : F\nh1 : ↑e (y, v) = (y, ↑(φ p y) v)\nh2 : ↑e (y, v) = (y, ↑(φ p' y) v)\n⊢ ↑(φ p y) v = ↑(φ p' y) v\n[PROOFSTEP]\nexact congr_arg Prod.snd (h1.symm.trans h2)\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nhave hUu' : U = ⋃ i, u i := by\n  ext x\n  rw [mem_iUnion]\n  refine' ⟨fun h => ⟨⟨x, h⟩, hux _⟩, _⟩\n  rintro ⟨x, hx⟩\n  exact hUu x hx\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\n⊢ U = ⋃ (i : ↑U), u i\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nx : B\n⊢ x ∈ U ↔ x ∈ ⋃ (i : ↑U), u i\n[PROOFSTEP]\nrw [mem_iUnion]\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nx : B\n⊢ x ∈ U ↔ ∃ i, x ∈ u i\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨⟨x, h⟩, hux _⟩, _⟩\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nx : B\n⊢ (∃ i, x ∈ u i) → x ∈ U\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase h.intro\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nx✝ : B\nx : ↑U\nhx : x✝ ∈ u x\n⊢ x✝ ∈ U\n[PROOFSTEP]\nexact hUu x hx\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nhave hU' : IsOpen U := by\n  rw [hUu']\n  apply isOpen_iUnion hu\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\n⊢ IsOpen U\n[PROOFSTEP]\nrw [hUu']\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\n⊢ IsOpen (⋃ (i : ↑U), u i)\n[PROOFSTEP]\napply isOpen_iUnion hu\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nlet Φ₀ : U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ (↑)) huφ U hUu'.le\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nlet Φ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ ⟨y, hy⟩ else ContinuousLinearEquiv.refl 𝕜 F\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nhave hΦ : ∀ (y) (hy : y ∈ U), Φ y = Φ₀ ⟨y, hy⟩ := fun y hy => dif_pos hy\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nhave hΦφ : ∀ x : U, ∀ y ∈ u x, Φ y = φ x y := by\n  intro x y hyu\n  refine' (hΦ y (hUu x hyu)).trans _\n  exact iUnionLift_mk ⟨y, hyu⟩ _\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\n⊢ ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\n[PROOFSTEP]\nintro x y hyu\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nx : ↑U\ny : B\nhyu : y ∈ u x\n⊢ Φ y = φ x y\n[PROOFSTEP]\nrefine' (hΦ y (hUu x hyu)).trans _\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nx : ↑U\ny : B\nhyu : y ∈ u x\n⊢ Φ₀ { val := y, property := (_ : y ∈ U) } = φ x y\n[PROOFSTEP]\nexact iUnionLift_mk ⟨y, hyu⟩ _\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nhave hΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => (Φ y : F →L[𝕜] F)) U :=\n  by\n  apply contMDiffOn_of_locally_contMDiffOn\n  intro x hx\n  refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩\n  refine' (ContMDiffOn.congr (hφ ⟨x, hx⟩) _).mono (inter_subset_right _ _)\n  intro y hy\n  rw [hΦφ ⟨x, hx⟩ y hy]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\n⊢ SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\n[PROOFSTEP]\napply contMDiffOn_of_locally_contMDiffOn\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\n⊢ ∀ (x : B), x ∈ U → ∃ u, IsOpen u ∧ x ∈ u ∧ ContMDiffOn IB 𝓘(𝕜, F →L[𝕜] F) ⊤ (fun y => ↑(Φ y)) (U ∩ u)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nx : B\nhx : x ∈ U\n⊢ ∃ u, IsOpen u ∧ x ∈ u ∧ ContMDiffOn IB 𝓘(𝕜, F →L[𝕜] F) ⊤ (fun y => ↑(Φ y)) (U ∩ u)\n[PROOFSTEP]\nrefine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nx : B\nhx : x ∈ U\n⊢ ContMDiffOn IB 𝓘(𝕜, F →L[𝕜] F) ⊤ (fun y => ↑(Φ y)) (U ∩ u { val := x, property := hx })\n[PROOFSTEP]\nrefine' (ContMDiffOn.congr (hφ ⟨x, hx⟩) _).mono (inter_subset_right _ _)\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nx : B\nhx : x ∈ U\n⊢ ∀ (y : B), y ∈ u { val := x, property := hx } → ↑(Φ y) = ↑(φ { val := x, property := hx } y)\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nx : B\nhx : x ∈ U\ny : B\nhy : y ∈ u { val := x, property := hx }\n⊢ ↑(Φ y) = ↑(φ { val := x, property := hx } y)\n[PROOFSTEP]\nrw [hΦφ ⟨x, hx⟩ y hy]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nhave h2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ((Φ y).symm : F →L[𝕜] F)) U :=\n  by\n  apply contMDiffOn_of_locally_contMDiffOn\n  intro x hx\n  refine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩\n  refine' (ContMDiffOn.congr (h2φ ⟨x, hx⟩) _).mono (inter_subset_right _ _)\n  intro y hy\n  rw [hΦφ ⟨x, hx⟩ y hy]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\n⊢ SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(ContinuousLinearEquiv.symm (Φ y))) U\n[PROOFSTEP]\napply contMDiffOn_of_locally_contMDiffOn\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\n⊢ ∀ (x : B),\n    x ∈ U →\n      ∃ u, IsOpen u ∧ x ∈ u ∧ ContMDiffOn IB 𝓘(𝕜, F →L[𝕜] F) ⊤ (fun y => ↑(ContinuousLinearEquiv.symm (Φ y))) (U ∩ u)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\nx : B\nhx : x ∈ U\n⊢ ∃ u, IsOpen u ∧ x ∈ u ∧ ContMDiffOn IB 𝓘(𝕜, F →L[𝕜] F) ⊤ (fun y => ↑(ContinuousLinearEquiv.symm (Φ y))) (U ∩ u)\n[PROOFSTEP]\nrefine' ⟨u ⟨x, hx⟩, hu ⟨x, hx⟩, hux _, _⟩\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\nx : B\nhx : x ∈ U\n⊢ ContMDiffOn IB 𝓘(𝕜, F →L[𝕜] F) ⊤ (fun y => ↑(ContinuousLinearEquiv.symm (Φ y))) (U ∩ u { val := x, property := hx })\n[PROOFSTEP]\nrefine' (ContMDiffOn.congr (h2φ ⟨x, hx⟩) _).mono (inter_subset_right _ _)\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\nx : B\nhx : x ∈ U\n⊢ ∀ (y : B),\n    y ∈ u { val := x, property := hx } →\n      ↑(ContinuousLinearEquiv.symm (Φ y)) = ↑(ContinuousLinearEquiv.symm (φ { val := x, property := hx } y))\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\nx : B\nhx : x ∈ U\ny : B\nhy : y ∈ u { val := x, property := hx }\n⊢ ↑(ContinuousLinearEquiv.symm (Φ y)) = ↑(ContinuousLinearEquiv.symm (φ { val := x, property := hx } y))\n[PROOFSTEP]\nrw [hΦφ ⟨x, hx⟩ y hy]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\nh2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(ContinuousLinearEquiv.symm (Φ y))) U\n⊢ ∃ Φ U hU₀ hΦ h2Φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph Φ hU₀ (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n[PROOFSTEP]\nrefine' ⟨Φ, U, hU', hΦ, h2Φ, hU, fun p hp => _⟩\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\nh2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(ContinuousLinearEquiv.symm (Φ y))) U\np : B × F\nhp : p ∈ e.source\n⊢ ↑e p =\n    ↑(FiberwiseLinear.localHomeomorph Φ hU' (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n      p\n[PROOFSTEP]\nrw [hU] at hp \n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\nh2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(ContinuousLinearEquiv.symm (Φ y))) U\np : B × F\nhp : p ∈ U ×ˢ univ\n⊢ ↑e p =\n    ↑(FiberwiseLinear.localHomeomorph Φ hU' (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n      p\n[PROOFSTEP]\nrw [heuφ ⟨p.fst, hp.1⟩ ⟨hux _, hp.2⟩]\n  -- porting note: replaced `congrm` with manual `congr_arg`\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\nh2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(ContinuousLinearEquiv.symm (Φ y))) U\np : B × F\nhp : p ∈ U ×ˢ univ\n⊢ (fun q => (q.fst, ↑(φ { val := p.fst, property := (_ : p.fst ∈ U) } q.fst) q.snd)) p =\n    ↑(FiberwiseLinear.localHomeomorph Φ hU' (_ : ContinuousOn (fun x => ↑(Φ x)) U)\n          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (Φ x))) U))\n      p\n[PROOFSTEP]\nrefine congr_arg (Prod.mk _) ?_\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\nh2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(ContinuousLinearEquiv.symm (Φ y))) U\np : B × F\nhp : p ∈ U ×ˢ univ\n⊢ ↑(φ { val := p.fst, property := (_ : p.fst ∈ U) } p.fst) p.snd = ↑(Φ p.fst) p.snd\n[PROOFSTEP]\nrw [hΦφ]\n[GOAL]\ncase a\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nU : Set B\nhU : e.source = U ×ˢ univ\nφ : ↑U → B → F ≃L[𝕜] F\nu : ↑U → Set B\nhu : ∀ (x : ↑U), IsOpen (u x)\nhUu : ∀ (x : ↑U), u x ⊆ U\nhux : ∀ (x : ↑U), ↑x ∈ u x\nhφ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(φ x x_1)) (u x)\nh2φ : ∀ (x : ↑U), SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)\nheφ :\n  ∀ (x : ↑U),\n    LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u x ×ˢ univ))\n      (FiberwiseLinear.localHomeomorph (φ x) (_ : IsOpen (u x)) (_ : ContinuousOn (fun x_1 => ↑(φ x x_1)) (u x))\n        (_ : ContinuousOn (fun x_1 => ↑(ContinuousLinearEquiv.symm (φ x x_1))) (u x)))\nheuφ : ∀ (x : ↑U), EqOn (↑e) (fun q => (q.fst, ↑(φ x q.fst) q.snd)) (u x ×ˢ univ)\nhuφ : ∀ (x x' : ↑U) (y : B), y ∈ u x → y ∈ u x' → φ x y = φ x' y\nhUu' : U = ⋃ (i : ↑U), u i\nhU' : IsOpen U\nΦ₀ : ↑U → F ≃L[𝕜] F := iUnionLift u (fun x => φ x ∘ Subtype.val) huφ U (_ : U ≤ ⋃ (i : ↑U), u i)\nΦ : B → F ≃L[𝕜] F := fun y => if hy : y ∈ U then Φ₀ { val := y, property := hy } else ContinuousLinearEquiv.refl 𝕜 F\nhΦ✝ : ∀ (y : B) (hy : y ∈ U), Φ y = Φ₀ { val := y, property := hy }\nhΦφ : ∀ (x : ↑U) (y : B), y ∈ u x → Φ y = φ x y\nhΦ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Φ y)) U\nh2Φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(ContinuousLinearEquiv.symm (Φ y))) U\np : B × F\nhp : p ∈ U ×ˢ univ\n⊢ p.fst ∈ u { val := p.fst, property := (_ : p.fst ∈ U) }\n[PROOFSTEP]\napply hux\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\n⊢ e ∈\n      ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U) (h2φ :\n        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),\n        {e |\n          LocalHomeomorph.EqOnSource e\n            (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n              (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))} ↔\n    ∃ φ U hU hφ h2φ,\n      LocalHomeomorph.EqOnSource e\n        (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_setOf_eq]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\n⊢ ∀ (e e' : LocalHomeomorph (B × F) (B × F)),\n    e ∈\n        ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U) (h2φ :\n          SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),\n          {e |\n            LocalHomeomorph.EqOnSource e\n              (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))} →\n      e' ∈\n          ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ :\n            SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U) (h2φ :\n            SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),\n            {e |\n              LocalHomeomorph.EqOnSource e\n                (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n                  (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))} →\n        e ≫ₕ e' ∈\n          ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ :\n            SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U) (h2φ :\n            SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),\n            {e |\n              LocalHomeomorph.EqOnSource e\n                (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n                  (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}\n[PROOFSTEP]\nsimp only [mem_aux]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\n⊢ ∀ (e e' : LocalHomeomorph (B × F) (B × F)),\n    (∃ φ U hU hφ h2φ,\n        LocalHomeomorph.EqOnSource e\n          (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))) →\n      (∃ φ U hU hφ h2φ,\n          LocalHomeomorph.EqOnSource e'\n            (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n              (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))) →\n        ∃ φ U hU hφ h2φ,\n          LocalHomeomorph.EqOnSource (e ≫ₕ e')\n            (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n              (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\n[PROOFSTEP]\nrintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne e' : LocalHomeomorph (B × F) (B × F)\nφ : B → F ≃L[𝕜] F\nU : Set B\nhU : IsOpen U\nhφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\nh2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nheφ :\n  LocalHomeomorph.EqOnSource e\n    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\nφ' : B → F ≃L[𝕜] F\nU' : Set B\nhU' : IsOpen U'\nhφ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ' x)) U'\nh2φ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'\nheφ' :\n  LocalHomeomorph.EqOnSource e'\n    (FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'))\n⊢ ∃ φ U hU hφ h2φ,\n    LocalHomeomorph.EqOnSource (e ≫ₕ e')\n      (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\n[PROOFSTEP]\nrefine'\n  ⟨fun b => (φ b).trans (φ' b), _, hU.inter hU', _, _, Setoid.trans (LocalHomeomorph.EqOnSource.trans' heφ heφ') ⟨_, _⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne e' : LocalHomeomorph (B × F) (B × F)\nφ : B → F ≃L[𝕜] F\nU : Set B\nhU : IsOpen U\nhφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\nh2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nheφ :\n  LocalHomeomorph.EqOnSource e\n    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\nφ' : B → F ≃L[𝕜] F\nU' : Set B\nhU' : IsOpen U'\nhφ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ' x)) U'\nh2φ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'\nheφ' :\n  LocalHomeomorph.EqOnSource e'\n    (FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'))\n⊢ SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑((fun b => ContinuousLinearEquiv.trans (φ b) (φ' b)) x)) (U ∩ U')\n[PROOFSTEP]\nshow SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x : B => (φ' x).toContinuousLinearMap ∘L (φ x).toContinuousLinearMap) (U ∩ U')\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne e' : LocalHomeomorph (B × F) (B × F)\nφ : B → F ≃L[𝕜] F\nU : Set B\nhU : IsOpen U\nhφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\nh2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nheφ :\n  LocalHomeomorph.EqOnSource e\n    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\nφ' : B → F ≃L[𝕜] F\nU' : Set B\nhU' : IsOpen U'\nhφ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ' x)) U'\nh2φ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'\nheφ' :\n  LocalHomeomorph.EqOnSource e'\n    (FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'))\n⊢ SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ContinuousLinearMap.comp ↑(φ' x) ↑(φ x)) (U ∩ U')\n[PROOFSTEP]\nexact (hφ'.mono <| inter_subset_right _ _).clm_comp (hφ.mono <| inter_subset_left _ _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne e' : LocalHomeomorph (B × F) (B × F)\nφ : B → F ≃L[𝕜] F\nU : Set B\nhU : IsOpen U\nhφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\nh2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nheφ :\n  LocalHomeomorph.EqOnSource e\n    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\nφ' : B → F ≃L[𝕜] F\nU' : Set B\nhU' : IsOpen U'\nhφ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ' x)) U'\nh2φ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'\nheφ' :\n  LocalHomeomorph.EqOnSource e'\n    (FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'))\n⊢ SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)\n    (fun x => ↑(ContinuousLinearEquiv.symm ((fun b => ContinuousLinearEquiv.trans (φ b) (φ' b)) x))) (U ∩ U')\n[PROOFSTEP]\nshow\n  SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x : B => (φ x).symm.toContinuousLinearMap ∘L (φ' x).symm.toContinuousLinearMap)\n    (U ∩ U')\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne e' : LocalHomeomorph (B × F) (B × F)\nφ : B → F ≃L[𝕜] F\nU : Set B\nhU : IsOpen U\nhφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\nh2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nheφ :\n  LocalHomeomorph.EqOnSource e\n    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\nφ' : B → F ≃L[𝕜] F\nU' : Set B\nhU' : IsOpen U'\nhφ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ' x)) U'\nh2φ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'\nheφ' :\n  LocalHomeomorph.EqOnSource e'\n    (FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'))\n⊢ SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)\n    (fun x => ContinuousLinearMap.comp ↑(ContinuousLinearEquiv.symm (φ x)) ↑(ContinuousLinearEquiv.symm (φ' x)))\n    (U ∩ U')\n[PROOFSTEP]\nexact (h2φ.mono <| inter_subset_left _ _).clm_comp (h2φ'.mono <| inter_subset_right _ _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne e' : LocalHomeomorph (B × F) (B × F)\nφ : B → F ≃L[𝕜] F\nU : Set B\nhU : IsOpen U\nhφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\nh2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nheφ :\n  LocalHomeomorph.EqOnSource e\n    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\nφ' : B → F ≃L[𝕜] F\nU' : Set B\nhU' : IsOpen U'\nhφ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ' x)) U'\nh2φ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'\nheφ' :\n  LocalHomeomorph.EqOnSource e'\n    (FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'))\n⊢ (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U) ≫ₕ\n          FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U')).toLocalEquiv.source =\n    (FiberwiseLinear.localHomeomorph (fun b => ContinuousLinearEquiv.trans (φ b) (φ' b)) (_ : IsOpen (U ∩ U'))\n          (_ : ContinuousOn (fun x => ↑((fun b => ContinuousLinearEquiv.trans (φ b) (φ' b)) x)) (U ∩ U'))\n          (_ :\n            ContinuousOn\n              (fun x => ↑(ContinuousLinearEquiv.symm ((fun b => ContinuousLinearEquiv.trans (φ b) (φ' b)) x)))\n              (U ∩ U'))).toLocalEquiv.source\n[PROOFSTEP]\napply FiberwiseLinear.source_trans_localHomeomorph\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_4\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne e' : LocalHomeomorph (B × F) (B × F)\nφ : B → F ≃L[𝕜] F\nU : Set B\nhU : IsOpen U\nhφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\nh2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nheφ :\n  LocalHomeomorph.EqOnSource e\n    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\nφ' : B → F ≃L[𝕜] F\nU' : Set B\nhU' : IsOpen U'\nhφ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ' x)) U'\nh2φ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'\nheφ' :\n  LocalHomeomorph.EqOnSource e'\n    (FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'))\n⊢ EqOn\n    (↑(FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U) ≫ₕ\n        FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')\n          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U')))\n    (↑(FiberwiseLinear.localHomeomorph (fun b => ContinuousLinearEquiv.trans (φ b) (φ' b)) (_ : IsOpen (U ∩ U'))\n        (_ : ContinuousOn (fun x => ↑((fun b => ContinuousLinearEquiv.trans (φ b) (φ' b)) x)) (U ∩ U'))\n        (_ :\n          ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm ((fun b => ContinuousLinearEquiv.trans (φ b) (φ' b)) x)))\n            (U ∩ U'))))\n    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U) ≫ₕ\n          FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U')).toLocalEquiv.source\n[PROOFSTEP]\nrintro ⟨b, v⟩ -\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_4.mk\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne e' : LocalHomeomorph (B × F) (B × F)\nφ : B → F ≃L[𝕜] F\nU : Set B\nhU : IsOpen U\nhφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\nh2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nheφ :\n  LocalHomeomorph.EqOnSource e\n    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\nφ' : B → F ≃L[𝕜] F\nU' : Set B\nhU' : IsOpen U'\nhφ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ' x)) U'\nh2φ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'\nheφ' :\n  LocalHomeomorph.EqOnSource e'\n    (FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'))\nb : B\nv : F\n⊢ ↑(FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U) ≫ₕ\n          FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'))\n      (b, v) =\n    ↑(FiberwiseLinear.localHomeomorph (fun b => ContinuousLinearEquiv.trans (φ b) (φ' b)) (_ : IsOpen (U ∩ U'))\n          (_ : ContinuousOn (fun x => ↑((fun b => ContinuousLinearEquiv.trans (φ b) (φ' b)) x)) (U ∩ U'))\n          (_ :\n            ContinuousOn\n              (fun x => ↑(ContinuousLinearEquiv.symm ((fun b => ContinuousLinearEquiv.trans (φ b) (φ' b)) x)))\n              (U ∩ U')))\n      (b, v)\n[PROOFSTEP]\napply FiberwiseLinear.trans_localHomeomorph_apply\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\n⊢ e ∈\n      ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U) (h2φ :\n        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),\n        {e |\n          LocalHomeomorph.EqOnSource e\n            (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n              (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))} →\n    LocalHomeomorph.symm e ∈\n      ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U) (h2φ :\n        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),\n        {e |\n          LocalHomeomorph.EqOnSource e\n            (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n              (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}\n[PROOFSTEP]\nsimp only [mem_iUnion]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\n⊢ (∃ i i_1 h h_1 i_2,\n      e ∈\n        {e |\n          LocalHomeomorph.EqOnSource e\n            (FiberwiseLinear.localHomeomorph i (_ : IsOpen i_1) (_ : ContinuousOn (fun x => ↑(i x)) i_1)\n              (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (i x))) i_1))}) →\n    ∃ i i_1 h h_1 i_2,\n      LocalHomeomorph.symm e ∈\n        {e |\n          LocalHomeomorph.EqOnSource e\n            (FiberwiseLinear.localHomeomorph i (_ : IsOpen i_1) (_ : ContinuousOn (fun x => ↑(i x)) i_1)\n              (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (i x))) i_1))}\n[PROOFSTEP]\nrintro ⟨φ, U, hU, hφ, h2φ, heφ⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nφ : B → F ≃L[𝕜] F\nU : Set B\nhU : IsOpen U\nhφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\nh2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nheφ :\n  e ∈\n    {e |\n      LocalHomeomorph.EqOnSource e\n        (FiberwiseLinear.localHomeomorph φ (_ : IsOpen U) (_ : ContinuousOn (fun x => ↑(φ x)) U)\n          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}\n⊢ ∃ i i_1 h h_1 i_2,\n    LocalHomeomorph.symm e ∈\n      {e |\n        LocalHomeomorph.EqOnSource e\n          (FiberwiseLinear.localHomeomorph i (_ : IsOpen i_1) (_ : ContinuousOn (fun x => ↑(i x)) i_1)\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (i x))) i_1))}\n[PROOFSTEP]\nrefine' ⟨fun b => (φ b).symm, U, hU, h2φ, _, LocalHomeomorph.EqOnSource.symm' heφ⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nφ : B → F ≃L[𝕜] F\nU : Set B\nhU : IsOpen U\nhφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\nh2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nheφ :\n  e ∈\n    {e |\n      LocalHomeomorph.EqOnSource e\n        (FiberwiseLinear.localHomeomorph φ (_ : IsOpen U) (_ : ContinuousOn (fun x => ↑(φ x)) U)\n          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}\n⊢ SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm ((fun b => ContinuousLinearEquiv.symm (φ b)) x))) U\n[PROOFSTEP]\nsimp_rw [ContinuousLinearEquiv.symm_symm]\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nφ : B → F ≃L[𝕜] F\nU : Set B\nhU : IsOpen U\nhφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\nh2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nheφ :\n  e ∈\n    {e |\n      LocalHomeomorph.EqOnSource e\n        (FiberwiseLinear.localHomeomorph φ (_ : IsOpen U) (_ : ContinuousOn (fun x => ↑(φ x)) U)\n          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}\n⊢ SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\n[PROOFSTEP]\nexact hφ\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\n⊢ LocalHomeomorph.refl (B × F) ∈\n    ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U) (h2φ :\n      SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),\n      {e |\n        LocalHomeomorph.EqOnSource e\n          (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}\n[PROOFSTEP]\nrefine mem_iUnion.2 ⟨fun _ ↦ .refl 𝕜 F, mem_iUnion.2 ⟨univ, mem_iUnion.2 ⟨isOpen_univ, ?_⟩⟩⟩\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\n⊢ LocalHomeomorph.refl (B × F) ∈\n    ⋃ (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑((fun x => ContinuousLinearEquiv.refl 𝕜 F) x)) univ) (h2φ :\n      SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm ((fun x => ContinuousLinearEquiv.refl 𝕜 F) x)))\n        univ),\n      {e |\n        LocalHomeomorph.EqOnSource e\n          (FiberwiseLinear.localHomeomorph (fun x => ContinuousLinearEquiv.refl 𝕜 F) (_ : IsOpen univ)\n            (_ : ContinuousOn (fun x => ↑((fun x => ContinuousLinearEquiv.refl 𝕜 F) x)) univ)\n            (_ :\n              ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm ((fun x => ContinuousLinearEquiv.refl 𝕜 F) x)))\n                univ))}\n[PROOFSTEP]\nrefine mem_iUnion.2 ⟨contMDiffOn_const, mem_iUnion.2 ⟨contMDiffOn_const, ?_, ?_⟩⟩\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\n⊢ (LocalHomeomorph.refl (B × F)).toLocalEquiv.source =\n    (FiberwiseLinear.localHomeomorph (fun x => ContinuousLinearEquiv.refl 𝕜 F) (_ : IsOpen univ)\n          (_ : ContinuousOn (fun x => ↑((fun x => ContinuousLinearEquiv.refl 𝕜 F) x)) univ)\n          (_ :\n            ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm ((fun x => ContinuousLinearEquiv.refl 𝕜 F) x)))\n              univ)).toLocalEquiv.source\n[PROOFSTEP]\nsimp only [FiberwiseLinear.localHomeomorph, LocalHomeomorph.refl_localEquiv, LocalEquiv.refl_source, univ_prod_univ]\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\n⊢ EqOn (↑(LocalHomeomorph.refl (B × F)))\n    (↑(FiberwiseLinear.localHomeomorph (fun x => ContinuousLinearEquiv.refl 𝕜 F) (_ : IsOpen univ)\n        (_ : ContinuousOn (fun x => ↑((fun x => ContinuousLinearEquiv.refl 𝕜 F) x)) univ)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm ((fun x => ContinuousLinearEquiv.refl 𝕜 F) x))) univ)))\n    (LocalHomeomorph.refl (B × F)).toLocalEquiv.source\n[PROOFSTEP]\nexact eqOn_refl id _\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\n⊢ ∀ (e : LocalHomeomorph (B × F) (B × F)),\n    (∀ (x : B × F),\n        x ∈ e.source →\n          ∃ s,\n            IsOpen s ∧\n              x ∈ s ∧\n                LocalHomeomorph.restr e s ∈\n                  ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ :\n                    SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U) (h2φ :\n                    SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),\n                    {e |\n                      LocalHomeomorph.EqOnSource e\n                        (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n                          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}) →\n      e ∈\n        ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U) (h2φ :\n          SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),\n          {e |\n            LocalHomeomorph.EqOnSource e\n              (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}\n[PROOFSTEP]\nsimp only [mem_aux]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\n⊢ ∀ (e : LocalHomeomorph (B × F) (B × F)),\n    (∀ (x : B × F),\n        x ∈ e.source →\n          ∃ s,\n            IsOpen s ∧\n              x ∈ s ∧\n                ∃ φ U hU hφ h2φ,\n                  LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e s)\n                    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n                      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))) →\n      ∃ φ U hU hφ h2φ,\n        LocalHomeomorph.EqOnSource e\n          (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\n[PROOFSTEP]\nintro e he\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nhe :\n  ∀ (x : B × F),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            ∃ φ U hU hφ h2φ,\n              LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e s)\n                (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n                  (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\n⊢ ∃ φ U hU hφ h2φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\n[PROOFSTEP]\nobtain ⟨U, hU, h⟩ := SmoothFiberwiseLinear.locality_aux₁ e he\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne : LocalHomeomorph (B × F) (B × F)\nhe :\n  ∀ (x : B × F),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            ∃ φ U hU hφ h2φ,\n              LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e s)\n                (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n                  (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\nU : Set B\nhU : e.source = U ×ˢ univ\nh :\n  ∀ (x : B),\n    x ∈ U →\n      ∃ φ u hu _huU _hux hφ h2φ,\n        LocalHomeomorph.EqOnSource (LocalHomeomorph.restr e (u ×ˢ univ))\n          (FiberwiseLinear.localHomeomorph φ hu (_ : ContinuousOn (fun x => ↑(φ x)) u)\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) u))\n⊢ ∃ φ U hU hφ h2φ,\n    LocalHomeomorph.EqOnSource e\n      (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\n[PROOFSTEP]\nexact SmoothFiberwiseLinear.locality_aux₂ e U hU h\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\n⊢ ∀ (e e' : LocalHomeomorph (B × F) (B × F)),\n    e ∈\n        ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U) (h2φ :\n          SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),\n          {e |\n            LocalHomeomorph.EqOnSource e\n              (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))} →\n      e' ≈ e →\n        e' ∈\n          ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) (hφ :\n            SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U) (h2φ :\n            SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),\n            {e |\n              LocalHomeomorph.EqOnSource e\n                (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n                  (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}\n[PROOFSTEP]\nsimp only [mem_aux]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\n⊢ ∀ (e e' : LocalHomeomorph (B × F) (B × F)),\n    (∃ φ U hU hφ h2φ,\n        LocalHomeomorph.EqOnSource e\n          (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n            (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))) →\n      e' ≈ e →\n        ∃ φ U hU hφ h2φ,\n          LocalHomeomorph.EqOnSource e'\n            (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n              (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\n[PROOFSTEP]\nrintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ hee'\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\nF : Type u_3\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nEB : Type u_4\ninst✝³ : NormedAddCommGroup EB\ninst✝² : NormedSpace 𝕜 EB\nHB : Type u_5\ninst✝¹ : TopologicalSpace HB\ninst✝ : ChartedSpace HB B\nIB : ModelWithCorners 𝕜 EB HB\ne e' : LocalHomeomorph (B × F) (B × F)\nφ : B → F ≃L[𝕜] F\nU : Set B\nhU : IsOpen U\nhφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U\nh2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U\nheφ :\n  LocalHomeomorph.EqOnSource e\n    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\nhee' : e' ≈ e\n⊢ ∃ φ U hU hφ h2φ,\n    LocalHomeomorph.EqOnSource e'\n      (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)\n        (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))\n[PROOFSTEP]\nexact ⟨φ, U, hU, hφ, h2φ, Setoid.trans hee' heφ⟩\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Manifold.VectorBundle.FiberwiseLinear", "llama_tokens": 82538, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7549149868676284, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.3980791463221694}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\n⊢ Option.isSome (toOption o) = true ↔ o.Dom\n[PROOFSTEP]\nby_cases h : o.Dom\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\nh : o.Dom\n⊢ Option.isSome (toOption o) = true ↔ o.Dom\n[PROOFSTEP]\nsimp [h, toOption]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\nh : ¬o.Dom\n⊢ Option.isSome (toOption o) = true ↔ o.Dom\n[PROOFSTEP]\nsimp [h, toOption]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\n⊢ Option.isNone (toOption o) = true ↔ ¬o.Dom\n[PROOFSTEP]\nby_cases h : o.Dom\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\nh : o.Dom\n⊢ Option.isNone (toOption o) = true ↔ ¬o.Dom\n[PROOFSTEP]\nsimp [h, toOption]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\nh : ¬o.Dom\n⊢ Option.isNone (toOption o) = true ↔ ¬o.Dom\n[PROOFSTEP]\nsimp [h, toOption]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nod : Prop\no : od → α\npd : Prop\np : pd → α\nH1 : { Dom := od, get := o }.Dom ↔ { Dom := pd, get := p }.Dom\nH2 :\n  ∀ (h₁ : { Dom := od, get := o }.Dom) (h₂ : { Dom := pd, get := p }.Dom),\n    get { Dom := od, get := o } h₁ = get { Dom := pd, get := p } h₂\n⊢ { Dom := od, get := o } = { Dom := pd, get := p }\n[PROOFSTEP]\nhave t : od = pd := propext H1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nod : Prop\no : od → α\npd : Prop\np : pd → α\nH1 : { Dom := od, get := o }.Dom ↔ { Dom := pd, get := p }.Dom\nH2 :\n  ∀ (h₁ : { Dom := od, get := o }.Dom) (h₂ : { Dom := pd, get := p }.Dom),\n    get { Dom := od, get := o } h₁ = get { Dom := pd, get := p } h₂\nt : od = pd\n⊢ { Dom := od, get := o } = { Dom := pd, get := p }\n[PROOFSTEP]\ncases t\n[GOAL]\ncase refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nod : Prop\no p : od → α\nH1 : { Dom := od, get := o }.Dom ↔ { Dom := od, get := p }.Dom\nH2 :\n  ∀ (h₁ : { Dom := od, get := o }.Dom) (h₂ : { Dom := od, get := p }.Dom),\n    get { Dom := od, get := o } h₁ = get { Dom := od, get := p } h₂\n⊢ { Dom := od, get := o } = { Dom := od, get := p }\n[PROOFSTEP]\nrw [show o = p from funext fun p => H2 p p]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\nh : ∀ (a : α), ¬a ∈ o\n⊢ ∀ (a : α), a ∈ o ↔ a ∈ none\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : α\n⊢ some x ≠ none\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : α\nh : some x = none\n⊢ False\n[PROOFSTEP]\nexact true_ne_false (congr_arg Dom h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\n⊢ o ≠ none ↔ ∃ x, o = some x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\n⊢ o ≠ none → ∃ x, o = some x\n[PROOFSTEP]\nrw [Ne, eq_none_iff', not_not]\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\n⊢ o.Dom → ∃ x, o = some x\n[PROOFSTEP]\nexact fun h => ⟨o.get h, eq_some_iff.2 (get_mem h)⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\n⊢ (∃ x, o = some x) → o ≠ none\n[PROOFSTEP]\nrintro ⟨x, rfl⟩\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : α\n⊢ some x ≠ none\n[PROOFSTEP]\napply some_ne_none\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : Part α\nha : a.Dom\nb : α\nh : get a ha = b\n⊢ a = some b\n[PROOFSTEP]\nsimp [h.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : Part α\nha : a.Dom\nb : α\nh : a = some b\n⊢ get a ha = b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : Part α\nha : a.Dom\nb : Part α\nh : a = b\n⊢ get a ha = get b (_ : b.Dom)\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\na : α\n⊢ a ∈ toOption o ↔ a ∈ o\n[PROOFSTEP]\nunfold toOption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\na : α\n⊢ (a ∈ if h : o.Dom then Option.some (get o h) else Option.none) ↔ a ∈ o\n[PROOFSTEP]\nby_cases h : o.Dom\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\na : α\nh : o.Dom\n⊢ (a ∈ if h : o.Dom then Option.some (get o h) else Option.none) ↔ a ∈ o\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\na : α\nh : ¬o.Dom\n⊢ (a ∈ if h : o.Dom then Option.some (get o h) else Option.none) ↔ a ∈ o\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\na : α\nh : o.Dom\n⊢ get o (_ : o.Dom) = a ↔ a ∈ o\n[PROOFSTEP]\nexact ⟨fun h => ⟨_, h⟩, fun ⟨_, h⟩ => h⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\na : α\nh : ¬o.Dom\n⊢ ¬a ∈ o\n[PROOFSTEP]\nexact mt Exists.fst h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\ninst✝ : Decidable o.Dom\na : α\n⊢ toOption o = Option.some a ↔ a ∈ o\n[PROOFSTEP]\nrw [← Option.mem_def, mem_toOption]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\na : Part α\ninst✝ : Decidable a.Dom\nb : β\nf : α → β\n⊢ Option.elim (toOption a) b f = if h : a.Dom then f (get a h) else b\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\na : Part α\ninst✝ : Decidable a.Dom\nb : β\nf : α → β\nh : a.Dom\n⊢ Option.elim (toOption a) b f = f (get a h)\n[PROOFSTEP]\nrw [h.toOption]\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\na : Part α\ninst✝ : Decidable a.Dom\nb : β\nf : α → β\nh : a.Dom\n⊢ Option.elim (Option.some (get a h)) b f = f (get a h)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\na : Part α\ninst✝ : Decidable a.Dom\nb : β\nf : α → β\nh : ¬a.Dom\n⊢ Option.elim (toOption a) b f = b\n[PROOFSTEP]\nrw [Part.toOption_eq_none_iff.2 h]\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\na : Part α\ninst✝ : Decidable a.Dom\nb : β\nf : α → β\nh : ¬a.Dom\n⊢ Option.elim Option.none b f = b\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\n⊢ (↑Option.none).Dom ↔ Option.isSome Option.none = true\n[PROOFSTEP]\nsimp [ofOption, none]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\na : α\n⊢ (↑(Option.some a)).Dom ↔ Option.isSome (Option.some a) = true\n[PROOFSTEP]\nsimp [ofOption]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\no : Option α\nh₁ : (↑o).Dom\nh₂ : { Dom := Option.isSome o = true, get := Option.get o }.Dom\n⊢ get (↑o) h₁ = get { Dom := Option.isSome o = true, get := Option.get o } h₂\n[PROOFSTEP]\ncases o\n[GOAL]\ncase none\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nh₁ : (↑Option.none).Dom\nh₂ : { Dom := Option.isSome Option.none = true, get := Option.get Option.none }.Dom\n⊢ get (↑Option.none) h₁ = get { Dom := Option.isSome Option.none = true, get := Option.get Option.none } h₂\n[PROOFSTEP]\nsimp at h₂ \n[GOAL]\ncase some\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nval✝ : α\nh₁ : (↑(Option.some val✝)).Dom\nh₂ : { Dom := Option.isSome (Option.some val✝) = true, get := Option.get (Option.some val✝) }.Dom\n⊢ get (↑(Option.some val✝)) h₁ =\n    get { Dom := Option.isSome (Option.some val✝) = true, get := Option.get (Option.some val✝) } h₂\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Option α\n⊢ toOption ↑o = o\n[PROOFSTEP]\ncases o\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ toOption ↑Option.none = Option.none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nval✝ : α\n⊢ toOption ↑(Option.some val✝) = Option.some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nthis : (p : Prop) → Decidable p\no : Option α\n⊢ (fun o => toOption o) ↑o = toOption ↑o\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nthis : (p : Prop) → Decidable p\no : Option α\n⊢ toOption ↑o = toOption ↑o\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ ∀ (a : Part α), ⊥ ≤ a\n[PROOFSTEP]\nintrov x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : Part α\nx : α\n⊢ x ∈ ⊥ → x ∈ a\n[PROOFSTEP]\nrintro ⟨⟨_⟩, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : Part α\nhx : x ≤ z\nhy : y ≤ z\n⊢ x ≤ y ∨ y ≤ x\n[PROOFSTEP]\nrcases Part.eq_none_or_eq_some x with (h | ⟨b, h₀⟩)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : Part α\nhx : x ≤ z\nhy : y ≤ z\nh : x = none\n⊢ x ≤ y ∨ y ≤ x\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : Part α\nhx : x ≤ z\nhy : y ≤ z\nh : x = none\n⊢ none ≤ y ∨ y ≤ none\n[PROOFSTEP]\nleft\n[GOAL]\ncase inl.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : Part α\nhx : x ≤ z\nhy : y ≤ z\nh : x = none\n⊢ none ≤ y\n[PROOFSTEP]\napply OrderBot.bot_le _\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : Part α\nhx : x ≤ z\nhy : y ≤ z\nb : α\nh₀ : x = some b\n⊢ x ≤ y ∨ y ≤ x\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : Part α\nhx : x ≤ z\nhy : y ≤ z\nb : α\nh₀ : x = some b\n⊢ y ≤ x\n[PROOFSTEP]\nintro b' h₁\n[GOAL]\ncase inr.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : Part α\nhx : x ≤ z\nhy : y ≤ z\nb : α\nh₀ : x = some b\nb' : α\nh₁ : b' ∈ y\n⊢ b' ∈ x\n[PROOFSTEP]\nrw [Part.eq_some_iff] at h₀ \n[GOAL]\ncase inr.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : Part α\nhx : x ≤ z\nhy : y ≤ z\nb : α\nh₀ : b ∈ x\nb' : α\nh₁ : b' ∈ y\n⊢ b' ∈ x\n[PROOFSTEP]\nhave hx := hx _ h₀\n[GOAL]\ncase inr.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : Part α\nhx✝ : x ≤ z\nhy : y ≤ z\nb : α\nh₀ : b ∈ x\nb' : α\nh₁ : b' ∈ y\nhx : b ∈ z\n⊢ b' ∈ x\n[PROOFSTEP]\nhave hy := hy _ h₁\n[GOAL]\ncase inr.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : Part α\nhx✝ : x ≤ z\nhy✝ : y ≤ z\nb : α\nh₀ : b ∈ x\nb' : α\nh₁ : b' ∈ y\nhx : b ∈ z\nhy : b' ∈ z\n⊢ b' ∈ x\n[PROOFSTEP]\nhave hx := Part.mem_unique hx hy\n[GOAL]\ncase inr.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : Part α\nhx✝¹ : x ≤ z\nhy✝ : y ≤ z\nb : α\nh₀ : b ∈ x\nb' : α\nh₁ : b' ∈ y\nhx✝ : b ∈ z\nhy : b' ∈ z\nhx : b = b'\n⊢ b' ∈ x\n[PROOFSTEP]\nsubst hx\n[GOAL]\ncase inr.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx y z : Part α\nhx✝ : x ≤ z\nhy✝ : y ≤ z\nb : α\nh₀ : b ∈ x\nhx : b ∈ z\nh₁ : b ∈ y\nhy : b ∈ z\n⊢ b ∈ x\n[PROOFSTEP]\nexact h₀\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\na : β\n⊢ ¬a ∈ map f none\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\nf : p → Part α\nh : p\n⊢ assert p f = f h\n[PROOFSTEP]\ndsimp [assert]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\nf : p → Part α\nh : p\n⊢ { Dom := ∃ h, (f h).Dom, get := fun ha => get (f (_ : p)) (_ : (f (_ : p)).Dom) } = f h\n[PROOFSTEP]\ncases h' : f h\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\nf : p → Part α\nh : p\nDom✝ : Prop\nget✝ : Dom✝ → α\nh' : f h = { Dom := Dom✝, get := get✝ }\n⊢ { Dom := ∃ h, (f h).Dom, get := fun ha => get (f (_ : p)) (_ : (f (_ : p)).Dom) } = { Dom := Dom✝, get := get✝ }\n[PROOFSTEP]\nsimp [h', mk.injEq, h, exists_prop_of_true, true_and]\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\nf : p → Part α\nh : p\nDom✝ : Prop\nget✝ : Dom✝ → α\nh' : f h = { Dom := Dom✝, get := get✝ }\n⊢ HEq (fun ha => get✝ (_ : { Dom := Dom✝, get := get✝ }.Dom)) get✝\n[PROOFSTEP]\napply Function.hfunext\n[GOAL]\ncase mk.hα\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\nf : p → Part α\nh : p\nDom✝ : Prop\nget✝ : Dom✝ → α\nh' : f h = { Dom := Dom✝, get := get✝ }\n⊢ (∃ h, (f h).Dom) = Dom✝\n[PROOFSTEP]\nsimp only [h, h', exists_prop_of_true]\n[GOAL]\ncase mk.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\nf : p → Part α\nh : p\nDom✝ : Prop\nget✝ : Dom✝ → α\nh' : f h = { Dom := Dom✝, get := get✝ }\n⊢ ∀ (a : ∃ h, (f h).Dom) (a' : Dom✝), HEq a a' → HEq (get✝ (_ : { Dom := Dom✝, get := get✝ }.Dom)) (get✝ a')\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\nf : p → Part α\nh : ¬p\n⊢ assert p f = none\n[PROOFSTEP]\ndsimp [assert, none]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\nf : p → Part α\nh : ¬p\n⊢ { Dom := ∃ h, (f h).Dom, get := fun ha => get (f (_ : p)) (_ : (f (_ : p)).Dom) } =\n    { Dom := False, get := fun t => False.rec (fun x => α) t }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\nf : p → Part α\nh : ¬p\n⊢ (∃ h, (f h).Dom) = False\n[PROOFSTEP]\nsimp only [h, not_false_iff, exists_prop_of_false]\n[GOAL]\ncase h.e_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\nf : p → Part α\nh : ¬p\n⊢ HEq (fun ha => get (f (_ : p)) (_ : (f (_ : p)).Dom)) fun t => False.rec (fun x => α) t\n[PROOFSTEP]\napply Function.hfunext\n[GOAL]\ncase h.e_3.hα\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\nf : p → Part α\nh : ¬p\n⊢ (∃ h, (f h).Dom) = False\n[PROOFSTEP]\nsimp only [h, not_false_iff, exists_prop_of_false]\n[GOAL]\ncase h.e_3.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\nf : p → Part α\nh : ¬p\n⊢ ∀ (a : ∃ h, (f h).Dom) (a' : False),\n    HEq a a' → HEq (get (f (_ : p)) (_ : (f (_ : p)).Dom)) (False.rec (fun x => α) a')\n[PROOFSTEP]\nsimp at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\nh : o.Dom\nf : α → Part β\n⊢ Part.bind o f = f (get o h)\n[PROOFSTEP]\next b\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\nh : o.Dom\nf : α → Part β\nb : β\n⊢ b ∈ Part.bind o f ↔ b ∈ f (get o h)\n[PROOFSTEP]\nsimp only [Part.mem_bind_iff, exists_prop]\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\nh : o.Dom\nf : α → Part β\nb : β\n⊢ (∃ a, a ∈ o ∧ b ∈ f a) ↔ b ∈ f (get o h)\n[PROOFSTEP]\nrefine' ⟨_, fun hb => ⟨o.get h, Part.get_mem _, hb⟩⟩\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\nh : o.Dom\nf : α → Part β\nb : β\n⊢ (∃ a, a ∈ o ∧ b ∈ f a) → b ∈ f (get o h)\n[PROOFSTEP]\nrintro ⟨a, ha, hb⟩\n[GOAL]\ncase H.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\nh : o.Dom\nf : α → Part β\nb : β\na : α\nha : a ∈ o\nhb : b ∈ f a\n⊢ b ∈ f (get o h)\n[PROOFSTEP]\nrwa [Part.get_eq_of_mem ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → Part β\na : β\n⊢ ¬a ∈ Part.bind none f\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\nf : α → Part β\n⊢ ∀ (a_1 : β), a_1 ∈ Part.bind (some a) f ↔ a_1 ∈ f a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\no : Part α\na : α\nh : a ∈ o\nf : α → Part β\n⊢ Part.bind o f = f a\n[PROOFSTEP]\nrw [eq_some_iff.2 h, bind_some]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\nx : Part α\n⊢ ∀ (a : β), a ∈ Part.bind x (some ∘ f) ↔ a ∈ map f x\n[PROOFSTEP]\nsimp [eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → Part β\no : Part α\ninst✝² : Decidable o.Dom\ninst✝¹ : (a : α) → Decidable (f a).Dom\ninst✝ : Decidable (Part.bind o f).Dom\n⊢ toOption (Part.bind o f) = Option.elim (toOption o) Option.none fun a => toOption (f a)\n[PROOFSTEP]\nby_cases h : o.Dom\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → Part β\no : Part α\ninst✝² : Decidable o.Dom\ninst✝¹ : (a : α) → Decidable (f a).Dom\ninst✝ : Decidable (Part.bind o f).Dom\nh : o.Dom\n⊢ toOption (Part.bind o f) = Option.elim (toOption o) Option.none fun a => toOption (f a)\n[PROOFSTEP]\nsimp_rw [h.toOption, h.bind]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → Part β\no : Part α\ninst✝² : Decidable o.Dom\ninst✝¹ : (a : α) → Decidable (f a).Dom\ninst✝ : Decidable (Part.bind o f).Dom\nh : o.Dom\n⊢ toOption (f (get o h)) = Option.elim (Option.some (get o h)) Option.none fun a => toOption (f a)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → Part β\no : Part α\ninst✝² : Decidable o.Dom\ninst✝¹ : (a : α) → Decidable (f a).Dom\ninst✝ : Decidable (Part.bind o f).Dom\nh : ¬o.Dom\n⊢ toOption (Part.bind o f) = Option.elim (toOption o) Option.none fun a => toOption (f a)\n[PROOFSTEP]\nrw [Part.toOption_eq_none_iff.2 h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → Part β\no : Part α\ninst✝² : Decidable o.Dom\ninst✝¹ : (a : α) → Decidable (f a).Dom\ninst✝ : Decidable (Part.bind o f).Dom\nh : ¬o.Dom\n⊢ toOption (Part.bind o f) = Option.elim Option.none Option.none fun a => toOption (f a)\n[PROOFSTEP]\nexact Part.toOption_eq_none_iff.2 fun ho => h ho.of_bind\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nγ : Type u_4\nf : Part α\ng : α → Part β\nk : β → Part γ\na : γ\n⊢ a ∈ Part.bind (Part.bind f g) k ↔ a ∈ Part.bind f fun x => Part.bind (g x) k\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nγ : Type u_4\nf : Part α\ng : α → Part β\nk : β → Part γ\na : γ\n⊢ (∃ a_1, (∃ a, a ∈ f ∧ a_1 ∈ g a) ∧ a ∈ k a_1) ↔ ∃ a_1, a_1 ∈ f ∧ ∃ a_2, a_2 ∈ g a_1 ∧ a ∈ k a_2\n[PROOFSTEP]\nexact ⟨fun ⟨_, ⟨_, h₁, h₂⟩, h₃⟩ => ⟨_, h₁, _, h₂, h₃⟩, fun ⟨_, h₁, _, h₂, h₃⟩ => ⟨_, ⟨_, h₁, h₂⟩, h₃⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nγ : Type u_4\nf : α → β\nx : Part α\ng : β → Part γ\n⊢ Part.bind (map f x) g = Part.bind x fun y => g (f y)\n[PROOFSTEP]\nrw [← bind_some_eq_map, bind_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nγ : Type u_4\nf : α → β\nx : Part α\ng : β → Part γ\n⊢ (Part.bind x fun x => Part.bind ((some ∘ f) x) g) = Part.bind x fun y => g (f y)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nγ : Type u_4\nf : α → Part β\nx : Part α\ng : β → γ\n⊢ map g (Part.bind x f) = Part.bind x fun y => map g (f y)\n[PROOFSTEP]\nrw [← bind_some_eq_map, bind_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nγ : Type u_4\nf : α → Part β\nx : Part α\ng : β → γ\n⊢ (Part.bind x fun x => Part.bind (f x) (some ∘ g)) = Part.bind x fun y => map g (f y)\n[PROOFSTEP]\nsimp [bind_some_eq_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ng : β → γ\nf : α → β\no : Part α\n⊢ map g (map f o) = map (g ∘ f) o\n[PROOFSTEP]\nerw [← bind_some_eq_map, bind_map, bind_some_eq_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ ∀ {α β : Type ?u.35509}, Functor.mapConst = Functor.map ∘ const β\n[PROOFSTEP]\nsimp [Functor.mapConst, Functor.map]\n  --Porting TODO : In Lean3 these were automatic by a tactic\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nα✝ : Type ?u.35509\nf : Part α✝\n⊢ id <$> f = f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nα✝ : Type ?u.35509\nDom✝ : Prop\nget✝ : Dom✝ → α✝\n⊢ id <$> { Dom := Dom✝, get := get✝ } = { Dom := Dom✝, get := get✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nα✝ β✝ : Type ?u.35509\nx : Part α✝\ny : Part β✝\n⊢ (SeqLeft.seqLeft x fun x => y).Dom ↔ (Seq.seq (const β✝ <$> x) fun x => y).Dom\n[PROOFSTEP]\nsimp [SeqLeft.seqLeft, Part.bind, assert, Seq.seq, const, (· <$> ·), and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nα✝ β✝ : Type ?u.35509\nx : Part α✝\ny : Part β✝\n⊢ (SeqRight.seqRight x fun x => y).Dom ↔ (Seq.seq (const α✝ id <$> x) fun x => y).Dom\n[PROOFSTEP]\nsimp [SeqRight.seqRight, Part.bind, assert, Seq.seq, const, (· <$> ·), and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nα✝ β✝ : Type ?u.35509\nx : α✝ → β✝\ny : Part α✝\n⊢ (Seq.seq (pure x) fun x => y).Dom ↔ (x <$> y).Dom\n[PROOFSTEP]\nsimp [Seq.seq, Part.bind, assert, (· <$> ·), pure]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nα✝ β✝ : Type ?u.35509\nx : Part (α✝ → β✝)\ny : Part α✝\n⊢ (do\n        let x ← x\n        x <$> y).Dom ↔\n    (Seq.seq x fun x => y).Dom\n[PROOFSTEP]\nsimp [(· >>= ·), Part.bind, assert, Seq.seq, get, (· <$> ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → α\nH : ∀ (x : α), f x = x\no : Part α\n⊢ map f o = o\n[PROOFSTEP]\nrw [show f = id from funext H]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → α\nH : ∀ (x : α), f x = x\no : Part α\n⊢ map id o = o\n[PROOFSTEP]\nexact id_map o\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : Part α\n⊢ Part.bind x some = x\n[PROOFSTEP]\nerw [bind_some_eq_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : Part α\n⊢ map (fun a => a) x = x\n[PROOFSTEP]\nsimp [map_id']\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_2\nx : Part α\nf : α → Part β\ny : Part β\n⊢ x >>= f ≤ y ↔ ∀ (a : α), a ∈ x → f a ≤ y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_2\nx : Part α\nf : α → Part β\ny : Part β\n⊢ x >>= f ≤ y → ∀ (a : α), a ∈ x → f a ≤ y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_2\nx : Part α\nf : α → Part β\ny : Part β\n⊢ (∀ (a : α), a ∈ x → f a ≤ y) → x >>= f ≤ y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_2\nx : Part α\nf : α → Part β\ny : Part β\nh : x >>= f ≤ y\n⊢ ∀ (a : α), a ∈ x → f a ≤ y\n[PROOFSTEP]\nintro a h' b\n[GOAL]\ncase mp\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_2\nx : Part α\nf : α → Part β\ny : Part β\nh : x >>= f ≤ y\na : α\nh' : a ∈ x\nb : β\n⊢ b ∈ f a → b ∈ y\n[PROOFSTEP]\nhave h := h b\n[GOAL]\ncase mp\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_2\nx : Part α\nf : α → Part β\ny : Part β\nh✝ : x >>= f ≤ y\na : α\nh' : a ∈ x\nb : β\nh : b ∈ x >>= f → b ∈ y\n⊢ b ∈ f a → b ∈ y\n[PROOFSTEP]\nsimp only [and_imp, exists_prop, bind_eq_bind, mem_bind_iff, exists_imp] at h \n[GOAL]\ncase mp\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_2\nx : Part α\nf : α → Part β\ny : Part β\nh✝ : x >>= f ≤ y\na : α\nh' : a ∈ x\nb : β\nh : ∀ (x_1 : α), x_1 ∈ x → b ∈ f x_1 → b ∈ y\n⊢ b ∈ f a → b ∈ y\n[PROOFSTEP]\napply h _ h'\n[GOAL]\ncase mpr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_2\nx : Part α\nf : α → Part β\ny : Part β\nh : ∀ (a : α), a ∈ x → f a ≤ y\n⊢ x >>= f ≤ y\n[PROOFSTEP]\nintro b h'\n[GOAL]\ncase mpr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_2\nx : Part α\nf : α → Part β\ny : Part β\nh : ∀ (a : α), a ∈ x → f a ≤ y\nb : β\nh' : b ∈ x >>= f\n⊢ b ∈ y\n[PROOFSTEP]\nsimp only [exists_prop, bind_eq_bind, mem_bind_iff] at h' \n[GOAL]\ncase mpr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_2\nx : Part α\nf : α → Part β\ny : Part β\nh : ∀ (a : α), a ∈ x → f a ≤ y\nb : β\nh' : ∃ a, a ∈ x ∧ b ∈ f a\n⊢ b ∈ y\n[PROOFSTEP]\nrcases h' with ⟨a, h₀, h₁⟩\n[GOAL]\ncase mpr.intro.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_2\nx : Part α\nf : α → Part β\ny : Part β\nh : ∀ (a : α), a ∈ x → f a ≤ y\nb : β\na : α\nh₀ : a ∈ x\nh₁ : b ∈ f a\n⊢ b ∈ y\n[PROOFSTEP]\napply h _ h₀ _ h₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\no : Part α\nh : p → o.Dom\na : α\n⊢ a ∈ restrict p o h ↔ p ∧ a ∈ o\n[PROOFSTEP]\ndsimp [restrict, mem_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\no : Part α\nh : p → o.Dom\na : α\n⊢ (∃ h_1, get o (_ : o.Dom) = a) ↔ p ∧ ∃ h, get o h = a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\no : Part α\nh : p → o.Dom\na : α\n⊢ (∃ h_1, get o (_ : o.Dom) = a) → p ∧ ∃ h, get o h = a\n[PROOFSTEP]\nrintro ⟨h₀, h₁⟩\n[GOAL]\ncase mp.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\no : Part α\nh : p → o.Dom\na : α\nh₀ : p\nh₁ : get o (_ : o.Dom) = a\n⊢ p ∧ ∃ h, get o h = a\n[PROOFSTEP]\nexact ⟨h₀, ⟨_, h₁⟩⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\no : Part α\nh : p → o.Dom\na : α\n⊢ (p ∧ ∃ h, get o h = a) → ∃ h_1, get o (_ : o.Dom) = a\n[PROOFSTEP]\nrintro ⟨h₀, _, h₂⟩\n[GOAL]\ncase mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\no : Part α\nh : p → o.Dom\na : α\nh₀ : p\nw✝ : o.Dom\nh₂ : get o w✝ = a\n⊢ ∃ h_1, get o (_ : o.Dom) = a\n[PROOFSTEP]\nexact ⟨h₀, h₂⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Mul α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ get (a * b)\n      (_ : ∃ h, ((fun b_1 => (fun y => map y ((fun x => b) ())) (get ((fun x x_1 => x * x_1) <$> a) b_1)) h).Dom) =\n    ma * mb\n[PROOFSTEP]\nsimp [← ha.2, ← hb.2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Mul α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ get (a * b)\n      (_ : ∃ h, ((fun b_1 => (fun y => map y ((fun x => b) ())) (get ((fun x x_1 => x * x_1) <$> a) b_1)) h).Dom) =\n    get a (_ : a.Dom) * get b (_ : b.Dom)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Mul α\na b : α\n⊢ some a * some b = some (a * b)\n[PROOFSTEP]\nsimp [mul_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Inv α\na : Part α\nma : α\nha : ma ∈ a\n⊢ ma⁻¹ ∈ a⁻¹\n[PROOFSTEP]\nsimp [inv_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Inv α\na : Part α\nma : α\nha : ma ∈ a\n⊢ ∃ a_1, a_1 ∈ a ∧ a_1⁻¹ = ma⁻¹\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Div α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ ma / mb ∈ a / b\n[PROOFSTEP]\nsimp [div_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Div α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ ∃ a_1, a_1 ∈ a ∧ ∃ a, a ∈ b ∧ a_1 / a = ma / mb\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Div α\na b : Part α\nhab : (a / b).Dom\n⊢ get (a / b) hab = get a (_ : a.Dom) / get b (_ : b.Dom)\n[PROOFSTEP]\nsimp [div_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Div α\na b : Part α\nhab : (a / b).Dom\n⊢ get (Part.bind a fun y => map (fun x => y / x) b) (_ : (Part.bind a fun y => map (fun x => y / x) b).Dom) =\n    get a (_ : a.Dom) / get b (_ : b.Dom)\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Div α\na b : α\n⊢ some a / some b = some (a / b)\n[PROOFSTEP]\nsimp [div_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Mod α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ ma % mb ∈ a % b\n[PROOFSTEP]\nsimp [mod_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Mod α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ ∃ a_1, a_1 ∈ a ∧ ∃ a, a ∈ b ∧ a_1 % a = ma % mb\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Mod α\na b : Part α\nhab : (a % b).Dom\n⊢ get (a % b) hab = get a (_ : a.Dom) % get b (_ : b.Dom)\n[PROOFSTEP]\nsimp [mod_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Mod α\na b : Part α\nhab : (a % b).Dom\n⊢ get (Part.bind a fun y => map (fun x => y % x) b) (_ : (Part.bind a fun y => map (fun x => y % x) b).Dom) =\n    get a (_ : a.Dom) % get b (_ : b.Dom)\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Mod α\na b : α\n⊢ some a % some b = some (a % b)\n[PROOFSTEP]\nsimp [mod_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Append α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ ma ++ mb ∈ a ++ b\n[PROOFSTEP]\nsimp [append_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Append α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ ∃ a_1, a_1 ∈ a ∧ ∃ a, a ∈ b ∧ a_1 ++ a = ma ++ mb\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Append α\na b : Part α\nhab : (a ++ b).Dom\n⊢ get (a ++ b) hab = get a (_ : a.Dom) ++ get b (_ : b.Dom)\n[PROOFSTEP]\nsimp [append_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Append α\na b : Part α\nhab : (a ++ b).Dom\n⊢ get (Part.bind a fun y => map (fun x => y ++ x) b) (_ : (Part.bind a fun y => map (fun x => y ++ x) b).Dom) =\n    get a (_ : a.Dom) ++ get b (_ : b.Dom)\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Append α\na b : α\n⊢ some a ++ some b = some (a ++ b)\n[PROOFSTEP]\nsimp [append_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Inter α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ ma ∩ mb ∈ a ∩ b\n[PROOFSTEP]\nsimp [inter_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Inter α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ ∃ a_1, a_1 ∈ a ∧ ∃ a, a ∈ b ∧ a_1 ∩ a = ma ∩ mb\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Inter α\na b : Part α\nhab : (a ∩ b).Dom\n⊢ get (a ∩ b) hab = get a (_ : a.Dom) ∩ get b (_ : b.Dom)\n[PROOFSTEP]\nsimp [inter_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Inter α\na b : Part α\nhab : (a ∩ b).Dom\n⊢ get (Part.bind a fun y => map (fun x => y ∩ x) b) (_ : (Part.bind a fun y => map (fun x => y ∩ x) b).Dom) =\n    get a (_ : a.Dom) ∩ get b (_ : b.Dom)\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Inter α\na b : α\n⊢ some a ∩ some b = some (a ∩ b)\n[PROOFSTEP]\nsimp [inter_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Union α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ ma ∪ mb ∈ a ∪ b\n[PROOFSTEP]\nsimp [union_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Union α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ ∃ a_1, a_1 ∈ a ∧ ∃ a, a ∈ b ∧ a_1 ∪ a = ma ∪ mb\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Union α\na b : Part α\nhab : (a ∪ b).Dom\n⊢ get (a ∪ b) hab = get a (_ : a.Dom) ∪ get b (_ : b.Dom)\n[PROOFSTEP]\nsimp [union_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Union α\na b : Part α\nhab : (a ∪ b).Dom\n⊢ get (Part.bind a fun y => map (fun x => y ∪ x) b) (_ : (Part.bind a fun y => map (fun x => y ∪ x) b).Dom) =\n    get a (_ : a.Dom) ∪ get b (_ : b.Dom)\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Union α\na b : α\n⊢ some a ∪ some b = some (a ∪ b)\n[PROOFSTEP]\nsimp [union_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : SDiff α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ ma \\ mb ∈ a \\ b\n[PROOFSTEP]\nsimp [sdiff_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : SDiff α\na b : Part α\nma mb : α\nha : ma ∈ a\nhb : mb ∈ b\n⊢ ∃ a_1, a_1 ∈ a ∧ ∃ a, a ∈ b ∧ a_1 \\ a = ma \\ mb\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : SDiff α\na b : Part α\nhab : (a \\ b).Dom\n⊢ get (a \\ b) hab = get a (_ : a.Dom) \\ get b (_ : b.Dom)\n[PROOFSTEP]\nsimp [sdiff_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : SDiff α\na b : Part α\nhab : (a \\ b).Dom\n⊢ get (Part.bind a fun y => map (fun x => y \\ x) b) (_ : (Part.bind a fun y => map (fun x => y \\ x) b).Dom) =\n    get a (_ : a.Dom) \\ get b (_ : b.Dom)\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : SDiff α\na b : α\n⊢ some a \\ some b = some (a \\ b)\n[PROOFSTEP]\nsimp [sdiff_def]\n", "meta": {"mathlib_filename": "Mathlib.Data.Part", "llama_tokens": 15422, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6893056295505783, "lm_q2_score": 0.5774953651858117, "lm_q1q2_score": 0.398070806261947}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : HasConstantSpeedOnWith f s l\nx y : ℝ\nhx : x ∈ s\nhy : y ∈ s\n⊢ BoundedVariationOn f (s ∩ Icc x y)\n[PROOFSTEP]\nsimp only [BoundedVariationOn, h hx hy, Ne.def, ENNReal.ofReal_ne_top, not_false_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl✝ : ℝ≥0\nf : ℝ → E\ns : Set ℝ\nhs : Set.Subsingleton s\nl : ℝ≥0\n⊢ HasConstantSpeedOnWith f s l\n[PROOFSTEP]\nrintro x hx y hy\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl✝ : ℝ≥0\nf : ℝ → E\ns : Set ℝ\nhs : Set.Subsingleton s\nl : ℝ≥0\nx : ℝ\nhx : x ∈ s\ny : ℝ\nhy : y ∈ s\n⊢ eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\n[PROOFSTEP]\ncases hs hx hy\n[GOAL]\ncase refl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl✝ : ℝ≥0\nf : ℝ → E\ns : Set ℝ\nhs : Set.Subsingleton s\nl : ℝ≥0\nx : ℝ\nhx hy : x ∈ s\n⊢ eVariationOn f (s ∩ Icc x x) = ENNReal.ofReal (↑l * (x - x))\n[PROOFSTEP]\nrw [eVariationOn.subsingleton f (fun y hy z hz => hs hy.1 hz.1 : (s ∩ Icc x x).Subsingleton)]\n[GOAL]\ncase refl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl✝ : ℝ≥0\nf : ℝ → E\ns : Set ℝ\nhs : Set.Subsingleton s\nl : ℝ≥0\nx : ℝ\nhx hy : x ∈ s\n⊢ 0 = ENNReal.ofReal (↑l * (x - x))\n[PROOFSTEP]\nsimp only [sub_self, mul_zero, ENNReal.ofReal_zero]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\n⊢ HasConstantSpeedOnWith f s l ↔\n    ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\n[PROOFSTEP]\nrefine' ⟨fun h x xs y ys _ => h xs ys, fun h x xs y ys => _⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\n⊢ eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\n[PROOFSTEP]\nrcases le_total x y with (xy | yx)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nxy : x ≤ y\n⊢ eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\n[PROOFSTEP]\nexact h xs ys xy\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nyx : y ≤ x\n⊢ eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\n[PROOFSTEP]\nrw [eVariationOn.subsingleton, ENNReal.ofReal_of_nonpos]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nyx : y ≤ x\n⊢ ↑l * (y - x) ≤ 0\n[PROOFSTEP]\nexact mul_nonpos_of_nonneg_of_nonpos l.prop (sub_nonpos_of_le yx)\n[GOAL]\ncase inr.hs\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nyx : y ≤ x\n⊢ Set.Subsingleton (s ∩ Icc x y)\n[PROOFSTEP]\nrintro z ⟨zs, xz, zy⟩ w ⟨ws, xw, wy⟩\n[GOAL]\ncase inr.hs.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nyx : y ≤ x\nz : ℝ\nzs : z ∈ s\nxz : x ≤ z\nzy : z ≤ y\nw : ℝ\nws : w ∈ s\nxw : x ≤ w\nwy : w ≤ y\n⊢ z = w\n[PROOFSTEP]\ncases le_antisymm (zy.trans yx) xz\n[GOAL]\ncase inr.hs.intro.intro.intro.intro.refl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nyx : y ≤ x\nw : ℝ\nws : w ∈ s\nxw : x ≤ w\nwy : w ≤ y\nzs : x ∈ s\nxz : x ≤ x\nzy : x ≤ y\n⊢ x = w\n[PROOFSTEP]\ncases le_antisymm (wy.trans yx) xw\n[GOAL]\ncase inr.hs.intro.intro.intro.intro.refl.refl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nyx : y ≤ x\nzs : x ∈ s\nxz : x ≤ x\nzy : x ≤ y\nws : x ∈ s\nxw : x ≤ x\nwy : x ≤ y\n⊢ x = x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\n⊢ HasConstantSpeedOnWith f s l ↔\n    LocallyBoundedVariationOn f s ∧ ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → variationOnFromTo f s x y = ↑l * (y - x)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\n⊢ HasConstantSpeedOnWith f s l →\n    LocallyBoundedVariationOn f s ∧ ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → variationOnFromTo f s x y = ↑l * (y - x)\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : HasConstantSpeedOnWith f s l\n⊢ LocallyBoundedVariationOn f s ∧ ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → variationOnFromTo f s x y = ↑l * (y - x)\n[PROOFSTEP]\nrefine' ⟨h.hasLocallyBoundedVariationOn, fun x xs y ys => _⟩\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : HasConstantSpeedOnWith f s l\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\n⊢ variationOnFromTo f s x y = ↑l * (y - x)\n[PROOFSTEP]\nrw [hasConstantSpeedOnWith_iff_ordered] at h \n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\n⊢ variationOnFromTo f s x y = ↑l * (y - x)\n[PROOFSTEP]\nrcases le_total x y with (xy | yx)\n[GOAL]\ncase mp.inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nxy : x ≤ y\n⊢ variationOnFromTo f s x y = ↑l * (y - x)\n[PROOFSTEP]\nrw [variationOnFromTo.eq_of_le f s xy, h xs ys xy]\n[GOAL]\ncase mp.inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nxy : x ≤ y\n⊢ ENNReal.toReal (ENNReal.ofReal (↑l * (y - x))) = ↑l * (y - x)\n[PROOFSTEP]\nexact ENNReal.toReal_ofReal (mul_nonneg l.prop (sub_nonneg.mpr xy))\n[GOAL]\ncase mp.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nyx : y ≤ x\n⊢ variationOnFromTo f s x y = ↑l * (y - x)\n[PROOFSTEP]\nrw [variationOnFromTo.eq_of_ge f s yx, h ys xs yx]\n[GOAL]\ncase mp.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nyx : y ≤ x\n⊢ -ENNReal.toReal (ENNReal.ofReal (↑l * (x - y))) = ↑l * (y - x)\n[PROOFSTEP]\nhave := ENNReal.toReal_ofReal (mul_nonneg l.prop (sub_nonneg.mpr yx))\n[GOAL]\ncase mp.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nyx : y ≤ x\nthis : ENNReal.toReal (ENNReal.ofReal (↑l * (x - y))) = ↑l * (x - y)\n⊢ -ENNReal.toReal (ENNReal.ofReal (↑l * (x - y))) = ↑l * (y - x)\n[PROOFSTEP]\nsimp_all only [NNReal.val_eq_coe]\n[GOAL]\ncase mp.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nyx : y ≤ x\nthis : ENNReal.toReal (ENNReal.ofReal (↑l * (x - y))) = ↑l * (x - y)\n⊢ -(↑l * (x - y)) = ↑l * (y - x)\n[PROOFSTEP]\nring\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\n⊢ (LocallyBoundedVariationOn f s ∧ ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → variationOnFromTo f s x y = ↑l * (y - x)) →\n    HasConstantSpeedOnWith f s l\n[PROOFSTEP]\nrw [hasConstantSpeedOnWith_iff_ordered]\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\n⊢ (LocallyBoundedVariationOn f s ∧ ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → variationOnFromTo f s x y = ↑l * (y - x)) →\n    ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\n[PROOFSTEP]\nrintro h x xs y ys xy\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : LocallyBoundedVariationOn f s ∧ ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → variationOnFromTo f s x y = ↑l * (y - x)\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nxy : x ≤ y\n⊢ eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\n[PROOFSTEP]\nrw [← h.2 xs ys, variationOnFromTo.eq_of_le f s xy, ENNReal.ofReal_toReal (h.1 x y xs ys)]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : HasConstantSpeedOnWith f s l\nhft : HasConstantSpeedOnWith f t l\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\n⊢ HasConstantSpeedOnWith f (s ∪ t) l\n[PROOFSTEP]\nrw [hasConstantSpeedOnWith_iff_ordered] at hfs hft ⊢\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\n⊢ ∀ ⦃x : ℝ⦄,\n    x ∈ s ∪ t → ∀ ⦃y : ℝ⦄, y ∈ s ∪ t → x ≤ y → eVariationOn f ((s ∪ t) ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\n[PROOFSTEP]\nrintro z (zs | zt) y (ys | yt) zy\n[GOAL]\ncase inl.inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nys : y ∈ s\nzy : z ≤ y\n⊢ eVariationOn f ((s ∪ t) ∩ Icc z y) = ENNReal.ofReal (↑l * (y - z))\n[PROOFSTEP]\nhave : (s ∪ t) ∩ Icc z y = s ∩ Icc z y := by\n  ext w; constructor\n  · rintro ⟨ws | wt, zw, wy⟩\n    · exact ⟨ws, zw, wy⟩\n    · exact ⟨(le_antisymm (wy.trans (hs.2 ys)) (ht.2 wt)).symm ▸ hs.1, zw, wy⟩\n  · rintro ⟨ws, zwy⟩; exact ⟨Or.inl ws, zwy⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nys : y ∈ s\nzy : z ≤ y\n⊢ (s ∪ t) ∩ Icc z y = s ∩ Icc z y\n[PROOFSTEP]\next w\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nys : y ∈ s\nzy : z ≤ y\nw : ℝ\n⊢ w ∈ (s ∪ t) ∩ Icc z y ↔ w ∈ s ∩ Icc z y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nys : y ∈ s\nzy : z ≤ y\nw : ℝ\n⊢ w ∈ (s ∪ t) ∩ Icc z y → w ∈ s ∩ Icc z y\n[PROOFSTEP]\nrintro ⟨ws | wt, zw, wy⟩\n[GOAL]\ncase h.mp.intro.inl.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nys : y ∈ s\nzy : z ≤ y\nw : ℝ\nws : w ∈ s\nzw : z ≤ w\nwy : w ≤ y\n⊢ w ∈ s ∩ Icc z y\n[PROOFSTEP]\nexact ⟨ws, zw, wy⟩\n[GOAL]\ncase h.mp.intro.inr.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nys : y ∈ s\nzy : z ≤ y\nw : ℝ\nwt : w ∈ t\nzw : z ≤ w\nwy : w ≤ y\n⊢ w ∈ s ∩ Icc z y\n[PROOFSTEP]\nexact ⟨(le_antisymm (wy.trans (hs.2 ys)) (ht.2 wt)).symm ▸ hs.1, zw, wy⟩\n[GOAL]\ncase h.mpr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nys : y ∈ s\nzy : z ≤ y\nw : ℝ\n⊢ w ∈ s ∩ Icc z y → w ∈ (s ∪ t) ∩ Icc z y\n[PROOFSTEP]\nrintro ⟨ws, zwy⟩\n[GOAL]\ncase h.mpr.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nys : y ∈ s\nzy : z ≤ y\nw : ℝ\nws : w ∈ s\nzwy : w ∈ Icc z y\n⊢ w ∈ (s ∪ t) ∩ Icc z y\n[PROOFSTEP]\nexact ⟨Or.inl ws, zwy⟩\n[GOAL]\ncase inl.inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nys : y ∈ s\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z y\n⊢ eVariationOn f ((s ∪ t) ∩ Icc z y) = ENNReal.ofReal (↑l * (y - z))\n[PROOFSTEP]\nrw [this, hfs zs ys zy]\n[GOAL]\ncase inl.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\n⊢ eVariationOn f ((s ∪ t) ∩ Icc z y) = ENNReal.ofReal (↑l * (y - z))\n[PROOFSTEP]\nhave : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y := by\n  ext w; constructor\n  · rintro ⟨ws | wt, zw, wy⟩\n    exacts [Or.inl ⟨ws, zw, hs.2 ws⟩, Or.inr ⟨wt, ht.2 wt, wy⟩]\n  · rintro (⟨ws, zw, wx⟩ | ⟨wt, xw, wy⟩)\n    exacts [⟨Or.inl ws, zw, wx.trans (ht.2 yt)⟩, ⟨Or.inr wt, (hs.2 zs).trans xw, wy⟩]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\n⊢ (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n[PROOFSTEP]\next w\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\n⊢ w ∈ (s ∪ t) ∩ Icc z y ↔ w ∈ s ∩ Icc z x ∪ t ∩ Icc x y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\n⊢ w ∈ (s ∪ t) ∩ Icc z y → w ∈ s ∩ Icc z x ∪ t ∩ Icc x y\n[PROOFSTEP]\nrintro ⟨ws | wt, zw, wy⟩\n[GOAL]\ncase h.mp.intro.inl.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\nws : w ∈ s\nzw : z ≤ w\nwy : w ≤ y\n⊢ w ∈ s ∩ Icc z x ∪ t ∩ Icc x y\ncase h.mp.intro.inr.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\nwt : w ∈ t\nzw : z ≤ w\nwy : w ≤ y\n⊢ w ∈ s ∩ Icc z x ∪ t ∩ Icc x y\n[PROOFSTEP]\nexacts [Or.inl ⟨ws, zw, hs.2 ws⟩, Or.inr ⟨wt, ht.2 wt, wy⟩]\n[GOAL]\ncase h.mpr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\n⊢ w ∈ s ∩ Icc z x ∪ t ∩ Icc x y → w ∈ (s ∪ t) ∩ Icc z y\n[PROOFSTEP]\nrintro (⟨ws, zw, wx⟩ | ⟨wt, xw, wy⟩)\n[GOAL]\ncase h.mpr.inl.intro.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\nws : w ∈ s\nzw : z ≤ w\nwx : w ≤ x\n⊢ w ∈ (s ∪ t) ∩ Icc z y\ncase h.mpr.inr.intro.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\nwt : w ∈ t\nxw : x ≤ w\nwy : w ≤ y\n⊢ w ∈ (s ∪ t) ∩ Icc z y\n[PROOFSTEP]\nexacts [⟨Or.inl ws, zw, wx.trans (ht.2 yt)⟩, ⟨Or.inr wt, (hs.2 zs).trans xw, wy⟩]\n[GOAL]\ncase inl.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n⊢ eVariationOn f ((s ∪ t) ∩ Icc z y) = ENNReal.ofReal (↑l * (y - z))\n[PROOFSTEP]\nrw [this, @eVariationOn.union _ _ _ _ f _ _ x, hfs zs hs.1 (hs.2 zs), hft ht.1 yt (ht.2 yt)]\n[GOAL]\ncase inl.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n⊢ ENNReal.ofReal (↑l * (x - z)) + ENNReal.ofReal (↑l * (y - x)) = ENNReal.ofReal (↑l * (y - z))\ncase inl.inr.hs\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n⊢ IsGreatest (s ∩ Icc z x) x\ncase inl.inr.ht\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n⊢ IsLeast (t ∩ Icc x y) x\n[PROOFSTEP]\nhave q :=\n  ENNReal.ofReal_add (mul_nonneg l.prop (sub_nonneg.mpr (hs.2 zs))) (mul_nonneg l.prop (sub_nonneg.mpr (ht.2 yt)))\n[GOAL]\ncase inl.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\nq : ENNReal.ofReal (↑l * (x - z) + ↑l * (y - x)) = ENNReal.ofReal (↑l * (x - z)) + ENNReal.ofReal (↑l * (y - x))\n⊢ ENNReal.ofReal (↑l * (x - z)) + ENNReal.ofReal (↑l * (y - x)) = ENNReal.ofReal (↑l * (y - z))\ncase inl.inr.hs\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n⊢ IsGreatest (s ∩ Icc z x) x\ncase inl.inr.ht\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n⊢ IsLeast (t ∩ Icc x y) x\n[PROOFSTEP]\nsimp only [NNReal.val_eq_coe] at q \n[GOAL]\ncase inl.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\nq : ENNReal.ofReal (↑l * (x - z) + ↑l * (y - x)) = ENNReal.ofReal (↑l * (x - z)) + ENNReal.ofReal (↑l * (y - x))\n⊢ ENNReal.ofReal (↑l * (x - z)) + ENNReal.ofReal (↑l * (y - x)) = ENNReal.ofReal (↑l * (y - z))\ncase inl.inr.hs\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n⊢ IsGreatest (s ∩ Icc z x) x\ncase inl.inr.ht\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n⊢ IsLeast (t ∩ Icc x y) x\n[PROOFSTEP]\nrw [← q]\n[GOAL]\ncase inl.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\nq : ENNReal.ofReal (↑l * (x - z) + ↑l * (y - x)) = ENNReal.ofReal (↑l * (x - z)) + ENNReal.ofReal (↑l * (y - x))\n⊢ ENNReal.ofReal (↑l * (x - z) + ↑l * (y - x)) = ENNReal.ofReal (↑l * (y - z))\ncase inl.inr.hs\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n⊢ IsGreatest (s ∩ Icc z x) x\ncase inl.inr.ht\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n⊢ IsLeast (t ∩ Icc x y) x\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase inl.inr.hs\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n⊢ IsGreatest (s ∩ Icc z x) x\ncase inl.inr.ht\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzs : z ∈ s\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = s ∩ Icc z x ∪ t ∩ Icc x y\n⊢ IsLeast (t ∩ Icc x y) x\n[PROOFSTEP]\nexacts [⟨⟨hs.1, hs.2 zs, le_rfl⟩, fun w ⟨_, _, wx⟩ => wx⟩, ⟨⟨ht.1, le_rfl, ht.2 yt⟩, fun w ⟨_, xw, _⟩ => xw⟩]\n[GOAL]\ncase inr.inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzt : z ∈ t\ny : ℝ\nys : y ∈ s\nzy : z ≤ y\n⊢ eVariationOn f ((s ∪ t) ∩ Icc z y) = ENNReal.ofReal (↑l * (y - z))\n[PROOFSTEP]\ncases le_antisymm zy ((hs.2 ys).trans (ht.2 zt))\n[GOAL]\ncase inr.inl.refl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzt : z ∈ t\nys : z ∈ s\nzy : z ≤ z\n⊢ eVariationOn f ((s ∪ t) ∩ Icc z z) = ENNReal.ofReal (↑l * (z - z))\n[PROOFSTEP]\nsimp only [Icc_self, sub_self, mul_zero, ENNReal.ofReal_zero]\n[GOAL]\ncase inr.inl.refl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzt : z ∈ t\nys : z ∈ s\nzy : z ≤ z\n⊢ eVariationOn f ((s ∪ t) ∩ {z}) = 0\n[PROOFSTEP]\nexact eVariationOn.subsingleton _ fun _ ⟨_, uz⟩ _ ⟨_, vz⟩ => uz.trans vz.symm\n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzt : z ∈ t\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\n⊢ eVariationOn f ((s ∪ t) ∩ Icc z y) = ENNReal.ofReal (↑l * (y - z))\n[PROOFSTEP]\nhave : (s ∪ t) ∩ Icc z y = t ∩ Icc z y := by\n  ext w; constructor\n  · rintro ⟨ws | wt, zw, wy⟩\n    · exact ⟨le_antisymm ((ht.2 zt).trans zw) (hs.2 ws) ▸ ht.1, zw, wy⟩\n    · exact ⟨wt, zw, wy⟩\n  · rintro ⟨wt, zwy⟩; exact ⟨Or.inr wt, zwy⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzt : z ∈ t\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\n⊢ (s ∪ t) ∩ Icc z y = t ∩ Icc z y\n[PROOFSTEP]\next w\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzt : z ∈ t\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\n⊢ w ∈ (s ∪ t) ∩ Icc z y ↔ w ∈ t ∩ Icc z y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzt : z ∈ t\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\n⊢ w ∈ (s ∪ t) ∩ Icc z y → w ∈ t ∩ Icc z y\n[PROOFSTEP]\nrintro ⟨ws | wt, zw, wy⟩\n[GOAL]\ncase h.mp.intro.inl.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzt : z ∈ t\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\nws : w ∈ s\nzw : z ≤ w\nwy : w ≤ y\n⊢ w ∈ t ∩ Icc z y\n[PROOFSTEP]\nexact ⟨le_antisymm ((ht.2 zt).trans zw) (hs.2 ws) ▸ ht.1, zw, wy⟩\n[GOAL]\ncase h.mp.intro.inr.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzt : z ∈ t\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\nwt : w ∈ t\nzw : z ≤ w\nwy : w ≤ y\n⊢ w ∈ t ∩ Icc z y\n[PROOFSTEP]\nexact ⟨wt, zw, wy⟩\n[GOAL]\ncase h.mpr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzt : z ∈ t\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\n⊢ w ∈ t ∩ Icc z y → w ∈ (s ∪ t) ∩ Icc z y\n[PROOFSTEP]\nrintro ⟨wt, zwy⟩\n[GOAL]\ncase h.mpr.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzt : z ∈ t\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nw : ℝ\nwt : w ∈ t\nzwy : w ∈ Icc z y\n⊢ w ∈ (s ∪ t) ∩ Icc z y\n[PROOFSTEP]\nexact ⟨Or.inr wt, zwy⟩\n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nt : Set ℝ\nhfs : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → x ≤ y → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nhft : ∀ ⦃x : ℝ⦄, x ∈ t → ∀ ⦃y : ℝ⦄, y ∈ t → x ≤ y → eVariationOn f (t ∩ Icc x y) = ENNReal.ofReal (↑l * (y - x))\nx : ℝ\nhs : IsGreatest s x\nht : IsLeast t x\nz : ℝ\nzt : z ∈ t\ny : ℝ\nyt : y ∈ t\nzy : z ≤ y\nthis : (s ∪ t) ∩ Icc z y = t ∩ Icc z y\n⊢ eVariationOn f ((s ∪ t) ∩ Icc z y) = ENNReal.ofReal (↑l * (y - z))\n[PROOFSTEP]\nrw [this, hft zt yt zy]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nx y z : ℝ\nhfs : HasConstantSpeedOnWith f (Icc x y) l\nhft : HasConstantSpeedOnWith f (Icc y z) l\n⊢ HasConstantSpeedOnWith f (Icc x z) l\n[PROOFSTEP]\nrcases le_total x y with (xy | yx)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nx y z : ℝ\nhfs : HasConstantSpeedOnWith f (Icc x y) l\nhft : HasConstantSpeedOnWith f (Icc y z) l\nxy : x ≤ y\n⊢ HasConstantSpeedOnWith f (Icc x z) l\ncase inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nx y z : ℝ\nhfs : HasConstantSpeedOnWith f (Icc x y) l\nhft : HasConstantSpeedOnWith f (Icc y z) l\nyx : y ≤ x\n⊢ HasConstantSpeedOnWith f (Icc x z) l\n[PROOFSTEP]\nrcases le_total y z with (yz | zy)\n[GOAL]\ncase inl.inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nx y z : ℝ\nhfs : HasConstantSpeedOnWith f (Icc x y) l\nhft : HasConstantSpeedOnWith f (Icc y z) l\nxy : x ≤ y\nyz : y ≤ z\n⊢ HasConstantSpeedOnWith f (Icc x z) l\n[PROOFSTEP]\nrw [← Set.Icc_union_Icc_eq_Icc xy yz]\n[GOAL]\ncase inl.inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nx y z : ℝ\nhfs : HasConstantSpeedOnWith f (Icc x y) l\nhft : HasConstantSpeedOnWith f (Icc y z) l\nxy : x ≤ y\nyz : y ≤ z\n⊢ HasConstantSpeedOnWith f (Icc x y ∪ Icc y z) l\n[PROOFSTEP]\nexact hfs.union hft (isGreatest_Icc xy) (isLeast_Icc yz)\n[GOAL]\ncase inl.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nx y z : ℝ\nhfs : HasConstantSpeedOnWith f (Icc x y) l\nhft : HasConstantSpeedOnWith f (Icc y z) l\nxy : x ≤ y\nzy : z ≤ y\n⊢ HasConstantSpeedOnWith f (Icc x z) l\n[PROOFSTEP]\nrintro u ⟨xu, uz⟩ v ⟨xv, vz⟩\n[GOAL]\ncase inl.inr.intro.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nx y z : ℝ\nhfs : HasConstantSpeedOnWith f (Icc x y) l\nhft : HasConstantSpeedOnWith f (Icc y z) l\nxy : x ≤ y\nzy : z ≤ y\nu : ℝ\nxu : x ≤ u\nuz : u ≤ z\nv : ℝ\nxv : x ≤ v\nvz : v ≤ z\n⊢ eVariationOn f (Icc x z ∩ Icc u v) = ENNReal.ofReal (↑l * (v - u))\n[PROOFSTEP]\nrw [Icc_inter_Icc, sup_of_le_right xu, inf_of_le_right vz, ← hfs ⟨xu, uz.trans zy⟩ ⟨xv, vz.trans zy⟩, Icc_inter_Icc,\n  sup_of_le_right xu, inf_of_le_right (vz.trans zy)]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nx y z : ℝ\nhfs : HasConstantSpeedOnWith f (Icc x y) l\nhft : HasConstantSpeedOnWith f (Icc y z) l\nyx : y ≤ x\n⊢ HasConstantSpeedOnWith f (Icc x z) l\n[PROOFSTEP]\nrintro u ⟨xu, uz⟩ v ⟨xv, vz⟩\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nx y z : ℝ\nhfs : HasConstantSpeedOnWith f (Icc x y) l\nhft : HasConstantSpeedOnWith f (Icc y z) l\nyx : y ≤ x\nu : ℝ\nxu : x ≤ u\nuz : u ≤ z\nv : ℝ\nxv : x ≤ v\nvz : v ≤ z\n⊢ eVariationOn f (Icc x z ∩ Icc u v) = ENNReal.ofReal (↑l * (v - u))\n[PROOFSTEP]\nrw [Icc_inter_Icc, sup_of_le_right xu, inf_of_le_right vz, ← hft ⟨yx.trans xu, uz⟩ ⟨yx.trans xv, vz⟩, Icc_inter_Icc,\n  sup_of_le_right (yx.trans xu), inf_of_le_right vz]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\n⊢ HasConstantSpeedOnWith f s 0 ↔ ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → edist (f x) (f y) = 0\n[PROOFSTEP]\ndsimp [HasConstantSpeedOnWith]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\n⊢ (∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → eVariationOn f (s ∩ Icc x y) = ENNReal.ofReal (0 * (y - x))) ↔\n    ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → edist (f x) (f y) = 0\n[PROOFSTEP]\nsimp only [zero_mul, ENNReal.ofReal_zero, ← eVariationOn.eq_zero_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\n⊢ (∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → eVariationOn f (s ∩ Icc x y) = 0) ↔ eVariationOn (fun x => f x) s = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\n⊢ (∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → eVariationOn f (s ∩ Icc x y) = 0) → eVariationOn (fun x => f x) s = 0\n[PROOFSTEP]\nby_contra'\n[GOAL]\ncase mp\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nthis : (∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → eVariationOn f (s ∩ Icc x y) = 0) ∧ eVariationOn (fun x => f x) s ≠ 0\n⊢ False\n[PROOFSTEP]\nobtain ⟨h, hfs⟩ := this\n[GOAL]\ncase mp.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → eVariationOn f (s ∩ Icc x y) = 0\nhfs : eVariationOn (fun x => f x) s ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp_rw [ne_eq, eVariationOn.eq_zero_iff] at hfs h \n[GOAL]\ncase mp.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nhfs : ¬∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → edist (f x) (f y) = 0\nh :\n  ∀ ⦃x : ℝ⦄,\n    x ∈ s →\n      ∀ ⦃y : ℝ⦄, y ∈ s → ∀ (x_3 : ℝ), x_3 ∈ s ∩ Icc x y → ∀ (y_1 : ℝ), y_1 ∈ s ∩ Icc x y → edist (f x_3) (f y_1) = 0\n⊢ False\n[PROOFSTEP]\npush_neg at hfs \n[GOAL]\ncase mp.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh :\n  ∀ ⦃x : ℝ⦄,\n    x ∈ s →\n      ∀ ⦃y : ℝ⦄, y ∈ s → ∀ (x_3 : ℝ), x_3 ∈ s ∩ Icc x y → ∀ (y_1 : ℝ), y_1 ∈ s ∩ Icc x y → edist (f x_3) (f y_1) = 0\nhfs : ∃ x, x ∈ s ∧ ∃ y, y ∈ s ∧ edist (f x) (f y) ≠ 0\n⊢ False\n[PROOFSTEP]\nobtain ⟨x, xs, y, ys, hxy⟩ := hfs\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh :\n  ∀ ⦃x : ℝ⦄,\n    x ∈ s →\n      ∀ ⦃y : ℝ⦄, y ∈ s → ∀ (x_3 : ℝ), x_3 ∈ s ∩ Icc x y → ∀ (y_1 : ℝ), y_1 ∈ s ∩ Icc x y → edist (f x_3) (f y_1) = 0\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nhxy : edist (f x) (f y) ≠ 0\n⊢ False\n[PROOFSTEP]\nrcases le_total x y with (xy | yx)\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh :\n  ∀ ⦃x : ℝ⦄,\n    x ∈ s →\n      ∀ ⦃y : ℝ⦄, y ∈ s → ∀ (x_3 : ℝ), x_3 ∈ s ∩ Icc x y → ∀ (y_1 : ℝ), y_1 ∈ s ∩ Icc x y → edist (f x_3) (f y_1) = 0\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nhxy : edist (f x) (f y) ≠ 0\nxy : x ≤ y\n⊢ False\n[PROOFSTEP]\nexact hxy (h xs ys x ⟨xs, le_rfl, xy⟩ y ⟨ys, xy, le_rfl⟩)\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh :\n  ∀ ⦃x : ℝ⦄,\n    x ∈ s →\n      ∀ ⦃y : ℝ⦄, y ∈ s → ∀ (x_3 : ℝ), x_3 ∈ s ∩ Icc x y → ∀ (y_1 : ℝ), y_1 ∈ s ∩ Icc x y → edist (f x_3) (f y_1) = 0\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nhxy : edist (f x) (f y) ≠ 0\nyx : y ≤ x\n⊢ False\n[PROOFSTEP]\nrw [edist_comm] at hxy \n[GOAL]\ncase mp.intro.intro.intro.intro.intro.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh :\n  ∀ ⦃x : ℝ⦄,\n    x ∈ s →\n      ∀ ⦃y : ℝ⦄, y ∈ s → ∀ (x_3 : ℝ), x_3 ∈ s ∩ Icc x y → ∀ (y_1 : ℝ), y_1 ∈ s ∩ Icc x y → edist (f x_3) (f y_1) = 0\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\nhxy : edist (f y) (f x) ≠ 0\nyx : y ≤ x\n⊢ False\n[PROOFSTEP]\nexact hxy (h ys xs y ⟨ys, le_rfl, yx⟩ x ⟨xs, yx, le_rfl⟩)\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\n⊢ eVariationOn (fun x => f x) s = 0 → ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → eVariationOn f (s ∩ Icc x y) = 0\n[PROOFSTEP]\nrintro h x _ y _\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : eVariationOn (fun x => f x) s = 0\nx : ℝ\nx✝¹ : x ∈ s\ny : ℝ\nx✝ : y ∈ s\n⊢ eVariationOn f (s ∩ Icc x y) = 0\n[PROOFSTEP]\nrefine' le_antisymm _ zero_le'\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : eVariationOn (fun x => f x) s = 0\nx : ℝ\nx✝¹ : x ∈ s\ny : ℝ\nx✝ : y ∈ s\n⊢ eVariationOn f (s ∩ Icc x y) ≤ 0\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nh : eVariationOn (fun x => f x) s = 0\nx : ℝ\nx✝¹ : x ∈ s\ny : ℝ\nx✝ : y ∈ s\n⊢ eVariationOn f (s ∩ Icc x y) ≤ eVariationOn (fun x => f x) s\n[PROOFSTEP]\nexact eVariationOn.mono f (inter_subset_left s (Icc x y))\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl l' : ℝ≥0\nhl' : l' ≠ 0\nφ : ℝ → ℝ\nφm : MonotoneOn φ s\nhfφ : HasConstantSpeedOnWith (f ∘ φ) s l\nhf : HasConstantSpeedOnWith f (φ '' s) l'\nx : ℝ\nxs : x ∈ s\n⊢ EqOn φ (fun y => ↑l / ↑l' * (y - x) + φ x) s\n[PROOFSTEP]\nrintro y ys\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl l' : ℝ≥0\nhl' : l' ≠ 0\nφ : ℝ → ℝ\nφm : MonotoneOn φ s\nhfφ : HasConstantSpeedOnWith (f ∘ φ) s l\nhf : HasConstantSpeedOnWith f (φ '' s) l'\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\n⊢ φ y = (fun y => ↑l / ↑l' * (y - x) + φ x) y\n[PROOFSTEP]\nrw [← sub_eq_iff_eq_add, mul_comm, ← mul_div_assoc, eq_div_iff (NNReal.coe_ne_zero.mpr hl')]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl l' : ℝ≥0\nhl' : l' ≠ 0\nφ : ℝ → ℝ\nφm : MonotoneOn φ s\nhfφ : HasConstantSpeedOnWith (f ∘ φ) s l\nhf : HasConstantSpeedOnWith f (φ '' s) l'\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\n⊢ (φ y - φ x) * ↑l' = (y - x) * ↑l\n[PROOFSTEP]\nrw [hasConstantSpeedOnWith_iff_variationOnFromTo_eq] at hf \n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl l' : ℝ≥0\nhl' : l' ≠ 0\nφ : ℝ → ℝ\nφm : MonotoneOn φ s\nhfφ : HasConstantSpeedOnWith (f ∘ φ) s l\nhf :\n  LocallyBoundedVariationOn f (φ '' s) ∧\n    ∀ ⦃x : ℝ⦄, x ∈ φ '' s → ∀ ⦃y : ℝ⦄, y ∈ φ '' s → variationOnFromTo f (φ '' s) x y = ↑l' * (y - x)\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\n⊢ (φ y - φ x) * ↑l' = (y - x) * ↑l\n[PROOFSTEP]\nrw [hasConstantSpeedOnWith_iff_variationOnFromTo_eq] at hfφ \n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl l' : ℝ≥0\nhl' : l' ≠ 0\nφ : ℝ → ℝ\nφm : MonotoneOn φ s\nhfφ :\n  LocallyBoundedVariationOn (f ∘ φ) s ∧\n    ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → variationOnFromTo (f ∘ φ) s x y = ↑l * (y - x)\nhf :\n  LocallyBoundedVariationOn f (φ '' s) ∧\n    ∀ ⦃x : ℝ⦄, x ∈ φ '' s → ∀ ⦃y : ℝ⦄, y ∈ φ '' s → variationOnFromTo f (φ '' s) x y = ↑l' * (y - x)\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\n⊢ (φ y - φ x) * ↑l' = (y - x) * ↑l\n[PROOFSTEP]\nsymm\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl l' : ℝ≥0\nhl' : l' ≠ 0\nφ : ℝ → ℝ\nφm : MonotoneOn φ s\nhfφ :\n  LocallyBoundedVariationOn (f ∘ φ) s ∧\n    ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → variationOnFromTo (f ∘ φ) s x y = ↑l * (y - x)\nhf :\n  LocallyBoundedVariationOn f (φ '' s) ∧\n    ∀ ⦃x : ℝ⦄, x ∈ φ '' s → ∀ ⦃y : ℝ⦄, y ∈ φ '' s → variationOnFromTo f (φ '' s) x y = ↑l' * (y - x)\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\n⊢ (y - x) * ↑l = (φ y - φ x) * ↑l'\n[PROOFSTEP]\ncalc\n  (y - x) * l = l * (y - x) := by rw [mul_comm]\n  _ = variationOnFromTo (f ∘ φ) s x y := (hfφ.2 xs ys).symm\n  _ = variationOnFromTo f (φ '' s) (φ x) (φ y) := (variationOnFromTo.comp_eq_of_monotoneOn f φ φm xs ys)\n  _ = l' * (φ y - φ x) := (hf.2 ⟨x, xs, rfl⟩ ⟨y, ys, rfl⟩)\n  _ = (φ y - φ x) * l' := by rw [mul_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl l' : ℝ≥0\nhl' : l' ≠ 0\nφ : ℝ → ℝ\nφm : MonotoneOn φ s\nhfφ :\n  LocallyBoundedVariationOn (f ∘ φ) s ∧\n    ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → variationOnFromTo (f ∘ φ) s x y = ↑l * (y - x)\nhf :\n  LocallyBoundedVariationOn f (φ '' s) ∧\n    ∀ ⦃x : ℝ⦄, x ∈ φ '' s → ∀ ⦃y : ℝ⦄, y ∈ φ '' s → variationOnFromTo f (φ '' s) x y = ↑l' * (y - x)\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\n⊢ (y - x) * ↑l = ↑l * (y - x)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl l' : ℝ≥0\nhl' : l' ≠ 0\nφ : ℝ → ℝ\nφm : MonotoneOn φ s\nhfφ :\n  LocallyBoundedVariationOn (f ∘ φ) s ∧\n    ∀ ⦃x : ℝ⦄, x ∈ s → ∀ ⦃y : ℝ⦄, y ∈ s → variationOnFromTo (f ∘ φ) s x y = ↑l * (y - x)\nhf :\n  LocallyBoundedVariationOn f (φ '' s) ∧\n    ∀ ⦃x : ℝ⦄, x ∈ φ '' s → ∀ ⦃y : ℝ⦄, y ∈ φ '' s → variationOnFromTo f (φ '' s) x y = ↑l' * (y - x)\nx : ℝ\nxs : x ∈ s\ny : ℝ\nys : y ∈ s\n⊢ ↑l' * (φ y - φ x) = (φ y - φ x) * ↑l'\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nφ : ℝ → ℝ\nφm : MonotoneOn φ s\nhfφ : HasUnitSpeedOn (f ∘ φ) s\nhf : HasUnitSpeedOn f (φ '' s)\nx : ℝ\nxs : x ∈ s\n⊢ EqOn φ (fun y => y - x + φ x) s\n[PROOFSTEP]\ndsimp only [HasUnitSpeedOn] at hf hfφ \n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nφ : ℝ → ℝ\nφm : MonotoneOn φ s\nhfφ : HasConstantSpeedOnWith (f ∘ φ) s 1\nhf : HasConstantSpeedOnWith f (φ '' s) 1\nx : ℝ\nxs : x ∈ s\n⊢ EqOn φ (fun y => y - x + φ x) s\n[PROOFSTEP]\nconvert HasConstantSpeedOnWith.ratio one_ne_zero φm hfφ hf xs using 3\n[GOAL]\ncase h.e'_4.h.h.e'_5\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns : Set ℝ\nl : ℝ≥0\nφ : ℝ → ℝ\nφm : MonotoneOn φ s\nhfφ : HasConstantSpeedOnWith (f ∘ φ) s 1\nhf : HasConstantSpeedOnWith f (φ '' s) 1\nx : ℝ\nxs : x ∈ s\nx✝ : ℝ\n⊢ x✝ - x = ↑1 / ↑1 * (x✝ - x)\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (Icc 0 t)\n⊢ EqOn φ id (Icc 0 s)\n[PROOFSTEP]\nrw [← φst] at hf \n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (φ '' Icc 0 s)\n⊢ EqOn φ id (Icc 0 s)\n[PROOFSTEP]\nconvert unique_unit_speed φm hfφ hf ⟨le_rfl, hs⟩ using 1\n[GOAL]\ncase h.e'_4\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (φ '' Icc 0 s)\n⊢ id = fun y => y - 0 + φ 0\n[PROOFSTEP]\nhave : φ 0 = 0 := by\n  have hm : 0 ∈ φ '' Icc 0 s := by simp only [mem_Icc, le_refl, ht, φst]\n  obtain ⟨x, xs, hx⟩ := hm\n  apply le_antisymm ((φm ⟨le_rfl, hs⟩ xs xs.1).trans_eq hx) _\n  have := φst ▸ mapsTo_image φ (Icc 0 s)\n  exact (mem_Icc.mp (@this 0 (by rw [mem_Icc]; exact ⟨le_rfl, hs⟩))).1\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (φ '' Icc 0 s)\n⊢ φ 0 = 0\n[PROOFSTEP]\nhave hm : 0 ∈ φ '' Icc 0 s := by simp only [mem_Icc, le_refl, ht, φst]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (φ '' Icc 0 s)\n⊢ 0 ∈ φ '' Icc 0 s\n[PROOFSTEP]\nsimp only [mem_Icc, le_refl, ht, φst]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (φ '' Icc 0 s)\nhm : 0 ∈ φ '' Icc 0 s\n⊢ φ 0 = 0\n[PROOFSTEP]\nobtain ⟨x, xs, hx⟩ := hm\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (φ '' Icc 0 s)\nx : ℝ\nxs : x ∈ Icc 0 s\nhx : φ x = 0\n⊢ φ 0 = 0\n[PROOFSTEP]\napply le_antisymm ((φm ⟨le_rfl, hs⟩ xs xs.1).trans_eq hx) _\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (φ '' Icc 0 s)\nx : ℝ\nxs : x ∈ Icc 0 s\nhx : φ x = 0\n⊢ 0 ≤ φ 0\n[PROOFSTEP]\nhave := φst ▸ mapsTo_image φ (Icc 0 s)\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (φ '' Icc 0 s)\nx : ℝ\nxs : x ∈ Icc 0 s\nhx : φ x = 0\nthis : MapsTo φ (Icc 0 s) (Icc 0 t)\n⊢ 0 ≤ φ 0\n[PROOFSTEP]\nexact (mem_Icc.mp (@this 0 (by rw [mem_Icc]; exact ⟨le_rfl, hs⟩))).1\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (φ '' Icc 0 s)\nx : ℝ\nxs : x ∈ Icc 0 s\nhx : φ x = 0\nthis : MapsTo φ (Icc 0 s) (Icc 0 t)\n⊢ 0 ∈ Icc 0 s\n[PROOFSTEP]\nrw [mem_Icc]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (φ '' Icc 0 s)\nx : ℝ\nxs : x ∈ Icc 0 s\nhx : φ x = 0\nthis : MapsTo φ (Icc 0 s) (Icc 0 t)\n⊢ 0 ≤ 0 ∧ 0 ≤ s\n[PROOFSTEP]\nexact ⟨le_rfl, hs⟩\n[GOAL]\ncase h.e'_4\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (φ '' Icc 0 s)\nthis : φ 0 = 0\n⊢ id = fun y => y - 0 + φ 0\n[PROOFSTEP]\nsimp only [tsub_zero, this, add_zero]\n[GOAL]\ncase h.e'_4\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\ns t : ℝ\nhs : 0 ≤ s\nht : 0 ≤ t\nφ : ℝ → ℝ\nφm : MonotoneOn φ (Icc 0 s)\nφst : φ '' Icc 0 s = Icc 0 t\nhfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)\nhf : HasUnitSpeedOn f (φ '' Icc 0 s)\nthis : φ 0 = 0\n⊢ id = fun y => y\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\n⊢ edist (naturalParameterization f s a (variationOnFromTo f s a b)) (f b) = 0\n[PROOFSTEP]\ndsimp only [naturalParameterization]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\n⊢ edist ((f ∘ Function.invFunOn (variationOnFromTo f s a) s) (variationOnFromTo f s a b)) (f b) = 0\n[PROOFSTEP]\nhaveI : Nonempty α := ⟨a⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nthis : Nonempty α\n⊢ edist ((f ∘ Function.invFunOn (variationOnFromTo f s a) s) (variationOnFromTo f s a b)) (f b) = 0\n[PROOFSTEP]\nobtain ⟨cs, hc⟩ := @Function.invFunOn_pos _ _ _ s (variationOnFromTo f s a) (variationOnFromTo f s a b) ⟨b, bs, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nthis : Nonempty α\ncs : Function.invFunOn (variationOnFromTo f s a) s (variationOnFromTo f s a b) ∈ s\nhc :\n  variationOnFromTo f s a (Function.invFunOn (variationOnFromTo f s a) s (variationOnFromTo f s a b)) =\n    variationOnFromTo f s a b\n⊢ edist ((f ∘ Function.invFunOn (variationOnFromTo f s a) s) (variationOnFromTo f s a b)) (f b) = 0\n[PROOFSTEP]\nrw [variationOnFromTo.eq_left_iff hf as cs bs] at hc \n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nthis : Nonempty α\ncs : Function.invFunOn (variationOnFromTo f s a) s (variationOnFromTo f s a b) ∈ s\nhc : variationOnFromTo f s (Function.invFunOn (variationOnFromTo f s a) s (variationOnFromTo f s a b)) b = 0\n⊢ edist ((f ∘ Function.invFunOn (variationOnFromTo f s a) s) (variationOnFromTo f s a b)) (f b) = 0\n[PROOFSTEP]\napply variationOnFromTo.edist_zero_of_eq_zero hf cs bs hc\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\n⊢ HasUnitSpeedOn (naturalParameterization f s a) (variationOnFromTo f s a '' s)\n[PROOFSTEP]\ndsimp only [HasUnitSpeedOn]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\n⊢ HasConstantSpeedOnWith (naturalParameterization f s a) (variationOnFromTo f s a '' s) 1\n[PROOFSTEP]\nrw [hasConstantSpeedOnWith_iff_ordered]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\n⊢ ∀ ⦃x : ℝ⦄,\n    x ∈ variationOnFromTo f s a '' s →\n      ∀ ⦃y : ℝ⦄,\n        y ∈ variationOnFromTo f s a '' s →\n          x ≤ y →\n            eVariationOn (naturalParameterization f s a) (variationOnFromTo f s a '' s ∩ Icc x y) =\n              ENNReal.ofReal (↑1 * (y - x))\n[PROOFSTEP]\nrintro _ ⟨b, bs, rfl⟩ _ ⟨c, cs, rfl⟩ h\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nc : α\ncs : c ∈ s\nh : variationOnFromTo f s a b ≤ variationOnFromTo f s a c\n⊢ eVariationOn (naturalParameterization f s a)\n      (variationOnFromTo f s a '' s ∩ Icc (variationOnFromTo f s a b) (variationOnFromTo f s a c)) =\n    ENNReal.ofReal (↑1 * (variationOnFromTo f s a c - variationOnFromTo f s a b))\n[PROOFSTEP]\nrcases le_total c b with (cb | bc)\n[GOAL]\ncase intro.intro.intro.intro.inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nc : α\ncs : c ∈ s\nh : variationOnFromTo f s a b ≤ variationOnFromTo f s a c\ncb : c ≤ b\n⊢ eVariationOn (naturalParameterization f s a)\n      (variationOnFromTo f s a '' s ∩ Icc (variationOnFromTo f s a b) (variationOnFromTo f s a c)) =\n    ENNReal.ofReal (↑1 * (variationOnFromTo f s a c - variationOnFromTo f s a b))\n[PROOFSTEP]\nrw [NNReal.coe_one, one_mul, le_antisymm h (variationOnFromTo.monotoneOn hf as cs bs cb), sub_self, ENNReal.ofReal_zero,\n  Icc_self, eVariationOn.subsingleton]\n[GOAL]\ncase intro.intro.intro.intro.inl.hs\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nc : α\ncs : c ∈ s\nh : variationOnFromTo f s a b ≤ variationOnFromTo f s a c\ncb : c ≤ b\n⊢ Set.Subsingleton (variationOnFromTo f s a '' s ∩ {variationOnFromTo f s a c})\n[PROOFSTEP]\nexact fun x hx y hy => hx.2.trans hy.2.symm\n[GOAL]\ncase intro.intro.intro.intro.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nc : α\ncs : c ∈ s\nh : variationOnFromTo f s a b ≤ variationOnFromTo f s a c\nbc : b ≤ c\n⊢ eVariationOn (naturalParameterization f s a)\n      (variationOnFromTo f s a '' s ∩ Icc (variationOnFromTo f s a b) (variationOnFromTo f s a c)) =\n    ENNReal.ofReal (↑1 * (variationOnFromTo f s a c - variationOnFromTo f s a b))\n[PROOFSTEP]\nrw [NNReal.coe_one, one_mul, sub_eq_add_neg, variationOnFromTo.eq_neg_swap, neg_neg, add_comm,\n  variationOnFromTo.add hf bs as cs, ← variationOnFromTo.eq_neg_swap f]\n[GOAL]\ncase intro.intro.intro.intro.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nc : α\ncs : c ∈ s\nh : variationOnFromTo f s a b ≤ variationOnFromTo f s a c\nbc : b ≤ c\n⊢ eVariationOn (naturalParameterization f s a)\n      (variationOnFromTo f s a '' s ∩ Icc (variationOnFromTo f s a b) (variationOnFromTo f s a c)) =\n    ENNReal.ofReal (variationOnFromTo f s b c)\n[PROOFSTEP]\nrw [←\n  eVariationOn.comp_inter_Icc_eq_of_monotoneOn (naturalParameterization f s a) _ (variationOnFromTo.monotoneOn hf as) bs\n    cs]\n[GOAL]\ncase intro.intro.intro.intro.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nc : α\ncs : c ∈ s\nh : variationOnFromTo f s a b ≤ variationOnFromTo f s a c\nbc : b ≤ c\n⊢ eVariationOn (naturalParameterization f s a ∘ variationOnFromTo f s a) (s ∩ Icc b c) =\n    ENNReal.ofReal (variationOnFromTo f s b c)\n[PROOFSTEP]\nrw [@eVariationOn.eq_of_edist_zero_on _ _ _ _ _ f]\n[GOAL]\ncase intro.intro.intro.intro.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nc : α\ncs : c ∈ s\nh : variationOnFromTo f s a b ≤ variationOnFromTo f s a c\nbc : b ≤ c\n⊢ eVariationOn f (s ∩ Icc b c) = ENNReal.ofReal (variationOnFromTo f s b c)\n[PROOFSTEP]\nrw [variationOnFromTo.eq_of_le _ _ bc, ENNReal.ofReal_toReal (hf b c bs cs)]\n[GOAL]\ncase intro.intro.intro.intro.inr.h\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nc : α\ncs : c ∈ s\nh : variationOnFromTo f s a b ≤ variationOnFromTo f s a c\nbc : b ≤ c\n⊢ ∀ ⦃x : α⦄, x ∈ s ∩ Icc b c → edist ((naturalParameterization f s a ∘ variationOnFromTo f s a) x) (f x) = 0\n[PROOFSTEP]\nrintro x ⟨xs, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.inr.h.intro.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nE : Type u_2\ninst✝ : PseudoEMetricSpace E\nf✝ : ℝ → E\ns✝ : Set ℝ\nl : ℝ≥0\nf : α → E\ns : Set α\nhf : LocallyBoundedVariationOn f s\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nc : α\ncs : c ∈ s\nh : variationOnFromTo f s a b ≤ variationOnFromTo f s a c\nbc : b ≤ c\nx : α\nxs : x ∈ s\nleft✝ : b ≤ x\nright✝ : x ≤ c\n⊢ edist ((naturalParameterization f s a ∘ variationOnFromTo f s a) x) (f x) = 0\n[PROOFSTEP]\nexact edist_naturalParameterization_eq_zero hf as xs\n", "meta": {"mathlib_filename": "Mathlib.Analysis.ConstantSpeed", "llama_tokens": 37585, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6893056167854461, "lm_q2_score": 0.5774953651858118, "lm_q1q2_score": 0.39807079889014246}}
{"text": "[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Monoid R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : DistribMulAction R A\nr₁ r₂ : R\n⊢ 0 = r₁ • 0 + r₂ • 0 + 0 * 0\n[PROOFSTEP]\nsimp only [smul_zero, add_zero, mul_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : Mul A\ninst✝ : SMulWithZero R A\na₁ a₂ : A\n⊢ a₁ * a₂ = 0 • a₂ + 0 • a₁ + a₁ * a₂\n[PROOFSTEP]\nsimp only [zero_smul, zero_add]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Semiring R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : DistribMulAction R A\nr : R\na : A\n⊢ r • a + 0 • 0 + 0 * a = r • a\n[PROOFSTEP]\nrw [smul_zero, add_zero, zero_mul, add_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Semiring R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : DistribMulAction R A\nr : R\na : A\n⊢ 0 • 0 + r • a + a * 0 = r • a\n[PROOFSTEP]\nrw [smul_zero, zero_add, mul_zero, add_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Monoid R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : DistribMulAction R A\nsrc✝¹ : One (Unitization R A) := instOne\nsrc✝ : Mul (Unitization R A) := instMul\nx : Unitization R A\n⊢ 1 • x.snd + x.fst • 0 + 0 * x.snd = x.snd\n[PROOFSTEP]\nrw [one_smul, smul_zero, add_zero, zero_mul, add_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Monoid R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : DistribMulAction R A\nsrc✝¹ : One (Unitization R A) := instOne\nsrc✝ : Mul (Unitization R A) := instMul\nx : Unitization R A\n⊢ x.fst • 0 + 1 • x.snd + x.snd * 0 = x.snd\n[PROOFSTEP]\nrw [smul_zero, zero_add, one_smul, mul_zero, add_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Semiring R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : Module R A\nsrc✝¹ : MulOneClass (Unitization R A) := instMulOneClass\nsrc✝ : AddCommMonoid (Unitization R A) := instAddCommMonoid\nx₁ x₂ x₃ : Unitization R A\n⊢ x₁.fst • (x₂.snd + x₃.snd) + (x₂.fst + x₃.fst) • x₁.snd + x₁.snd * (x₂.snd + x₃.snd) =\n    x₁.fst • x₂.snd + x₂.fst • x₁.snd + x₁.snd * x₂.snd + (x₁.fst • x₃.snd + x₃.fst • x₁.snd + x₁.snd * x₃.snd)\n[PROOFSTEP]\nsimp only [smul_add, add_smul, mul_add]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Semiring R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : Module R A\nsrc✝¹ : MulOneClass (Unitization R A) := instMulOneClass\nsrc✝ : AddCommMonoid (Unitization R A) := instAddCommMonoid\nx₁ x₂ x₃ : Unitization R A\n⊢ x₁.fst • x₂.snd + x₁.fst • x₃.snd + (x₂.fst • x₁.snd + x₃.fst • x₁.snd) + (x₁.snd * x₂.snd + x₁.snd * x₃.snd) =\n    x₁.fst • x₂.snd + x₂.fst • x₁.snd + x₁.snd * x₂.snd + (x₁.fst • x₃.snd + x₃.fst • x₁.snd + x₁.snd * x₃.snd)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Semiring R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : Module R A\nsrc✝¹ : MulOneClass (Unitization R A) := instMulOneClass\nsrc✝ : AddCommMonoid (Unitization R A) := instAddCommMonoid\nx₁ x₂ x₃ : Unitization R A\n⊢ x₁.fst • x₂.snd + x₁.fst • x₃.snd + (x₂.fst • x₁.snd + x₃.fst • x₁.snd) + (x₁.snd * x₂.snd + x₁.snd * x₃.snd) =\n    x₁.fst • x₂.snd + x₂.fst • x₁.snd + x₁.snd * x₂.snd + (x₁.fst • x₃.snd + x₃.fst • x₁.snd + x₁.snd * x₃.snd)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Semiring R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : Module R A\nsrc✝¹ : MulOneClass (Unitization R A) := instMulOneClass\nsrc✝ : AddCommMonoid (Unitization R A) := instAddCommMonoid\nx₁ x₂ x₃ : Unitization R A\n⊢ (x₁.fst + x₂.fst) • x₃.snd + x₃.fst • (x₁.snd + x₂.snd) + (x₁.snd + x₂.snd) * x₃.snd =\n    x₁.fst • x₃.snd + x₃.fst • x₁.snd + x₁.snd * x₃.snd + (x₂.fst • x₃.snd + x₃.fst • x₂.snd + x₂.snd * x₃.snd)\n[PROOFSTEP]\nsimp only [add_smul, smul_add, add_mul]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Semiring R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : Module R A\nsrc✝¹ : MulOneClass (Unitization R A) := instMulOneClass\nsrc✝ : AddCommMonoid (Unitization R A) := instAddCommMonoid\nx₁ x₂ x₃ : Unitization R A\n⊢ x₁.fst • x₃.snd + x₂.fst • x₃.snd + (x₃.fst • x₁.snd + x₃.fst • x₂.snd) + (x₁.snd * x₃.snd + x₂.snd * x₃.snd) =\n    x₁.fst • x₃.snd + x₃.fst • x₁.snd + x₁.snd * x₃.snd + (x₂.fst • x₃.snd + x₃.fst • x₂.snd + x₂.snd * x₃.snd)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Semiring R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : Module R A\nsrc✝¹ : MulOneClass (Unitization R A) := instMulOneClass\nsrc✝ : AddCommMonoid (Unitization R A) := instAddCommMonoid\nx₁ x₂ x₃ : Unitization R A\n⊢ x₁.fst • x₃.snd + x₂.fst • x₃.snd + (x₃.fst • x₁.snd + x₃.fst • x₂.snd) + (x₁.snd * x₃.snd + x₂.snd * x₃.snd) =\n    x₁.fst • x₃.snd + x₃.fst • x₁.snd + x₁.snd * x₃.snd + (x₂.fst • x₃.snd + x₃.fst • x₂.snd + x₂.snd * x₃.snd)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Semiring R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : Module R A\nsrc✝¹ : MulOneClass (Unitization R A) := instMulOneClass\nsrc✝ : AddCommMonoid (Unitization R A) := instAddCommMonoid\nx : Unitization R A\n⊢ 0 • x.snd + x.fst • 0 + 0 * x.snd = 0\n[PROOFSTEP]\nrw [zero_smul, zero_add, smul_zero, zero_mul, add_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Semiring R\ninst✝¹ : NonUnitalNonAssocSemiring A\ninst✝ : Module R A\nsrc✝¹ : MulOneClass (Unitization R A) := instMulOneClass\nsrc✝ : AddCommMonoid (Unitization R A) := instAddCommMonoid\nx : Unitization R A\n⊢ x.fst • 0 + 0 • x.snd + x.snd * 0 = 0\n[PROOFSTEP]\nrw [smul_zero, zero_add, zero_smul, mul_zero, add_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommMonoid R\ninst✝³ : NonUnitalSemiring A\ninst✝² : DistribMulAction R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nsrc✝ : MulOneClass (Unitization R A) := instMulOneClass\nx y z : Unitization R A\n⊢ (x.fst * y.fst) • z.snd + z.fst • (x.fst • y.snd + y.fst • x.snd + x.snd * y.snd) +\n      (x.fst • y.snd + y.fst • x.snd + x.snd * y.snd) * z.snd =\n    x.fst • (y.fst • z.snd + z.fst • y.snd + y.snd * z.snd) + (y.fst * z.fst) • x.snd +\n      x.snd * (y.fst • z.snd + z.fst • y.snd + y.snd * z.snd)\n[PROOFSTEP]\nsimp only [smul_add, mul_add, add_mul, smul_smul, smul_mul_assoc, mul_smul_comm, mul_assoc]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommMonoid R\ninst✝³ : NonUnitalSemiring A\ninst✝² : DistribMulAction R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nsrc✝ : MulOneClass (Unitization R A) := instMulOneClass\nx y z : Unitization R A\n⊢ (x.fst * y.fst) • z.snd + ((z.fst * x.fst) • y.snd + (z.fst * y.fst) • x.snd + z.fst • (x.snd * y.snd)) +\n      (x.fst • (y.snd * z.snd) + y.fst • (x.snd * z.snd) + x.snd * (y.snd * z.snd)) =\n    (x.fst * y.fst) • z.snd + (x.fst * z.fst) • y.snd + x.fst • (y.snd * z.snd) + (y.fst * z.fst) • x.snd +\n      (y.fst • (x.snd * z.snd) + z.fst • (x.snd * y.snd) + x.snd * (y.snd * z.snd))\n[PROOFSTEP]\nrw [mul_comm z.1 x.1]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommMonoid R\ninst✝³ : NonUnitalSemiring A\ninst✝² : DistribMulAction R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nsrc✝ : MulOneClass (Unitization R A) := instMulOneClass\nx y z : Unitization R A\n⊢ (x.fst * y.fst) • z.snd + ((x.fst * z.fst) • y.snd + (z.fst * y.fst) • x.snd + z.fst • (x.snd * y.snd)) +\n      (x.fst • (y.snd * z.snd) + y.fst • (x.snd * z.snd) + x.snd * (y.snd * z.snd)) =\n    (x.fst * y.fst) • z.snd + (x.fst * z.fst) • y.snd + x.fst • (y.snd * z.snd) + (y.fst * z.fst) • x.snd +\n      (y.fst • (x.snd * z.snd) + z.fst • (x.snd * y.snd) + x.snd * (y.snd * z.snd))\n[PROOFSTEP]\nrw [mul_comm z.1 y.1]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommMonoid R\ninst✝³ : NonUnitalSemiring A\ninst✝² : DistribMulAction R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nsrc✝ : MulOneClass (Unitization R A) := instMulOneClass\nx y z : Unitization R A\n⊢ (x.fst * y.fst) • z.snd + ((x.fst * z.fst) • y.snd + (y.fst * z.fst) • x.snd + z.fst • (x.snd * y.snd)) +\n      (x.fst • (y.snd * z.snd) + y.fst • (x.snd * z.snd) + x.snd * (y.snd * z.snd)) =\n    (x.fst * y.fst) • z.snd + (x.fst * z.fst) • y.snd + x.fst • (y.snd * z.snd) + (y.fst * z.fst) • x.snd +\n      (y.fst • (x.snd * z.snd) + z.fst • (x.snd * y.snd) + x.snd * (y.snd * z.snd))\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommMonoid R\ninst✝³ : NonUnitalSemiring A\ninst✝² : DistribMulAction R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nsrc✝ : MulOneClass (Unitization R A) := instMulOneClass\nx y z : Unitization R A\n⊢ (x.fst * y.fst) • z.snd + ((x.fst * z.fst) • y.snd + (y.fst * z.fst) • x.snd + z.fst • (x.snd * y.snd)) +\n      (x.fst • (y.snd * z.snd) + y.fst • (x.snd * z.snd) + x.snd * (y.snd * z.snd)) =\n    (x.fst * y.fst) • z.snd + (x.fst * z.fst) • y.snd + x.fst • (y.snd * z.snd) + (y.fst * z.fst) • x.snd +\n      (y.fst • (x.snd * z.snd) + z.fst • (x.snd * y.snd) + x.snd * (y.snd * z.snd))\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommMonoid R\ninst✝³ : NonUnitalCommSemiring A\ninst✝² : DistribMulAction R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nsrc✝ : Monoid (Unitization R A) := instMonoid\nx₁ x₂ : Unitization R A\n⊢ x₁.fst • x₂.snd + x₂.fst • x₁.snd + x₁.snd * x₂.snd = x₂.fst • x₁.snd + x₁.fst • x₂.snd + x₂.snd * x₁.snd\n[PROOFSTEP]\nrw [add_comm (x₁.1 • x₂.2), mul_comm]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : Star R\ninst✝¹ : AddMonoid A\ninst✝ : StarAddMonoid A\nr : R\n⊢ snd (inl (star r)) = snd (star (inl r))\n[PROOFSTEP]\nsimp only [snd_star, star_zero, snd_inl]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : AddMonoid R\ninst✝¹ : StarAddMonoid R\ninst✝ : Star A\na : A\n⊢ fst ↑(star a) = fst (star ↑a)\n[PROOFSTEP]\nsimp only [fst_star, star_zero, fst_inr]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : StarRing R\ninst✝³ : AddCommMonoid A\ninst✝² : StarAddMonoid A\ninst✝¹ : Module R A\ninst✝ : StarModule R A\nr : R\nx : Unitization R A\n⊢ fst (star (r • x)) = fst (star r • star x)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : StarRing R\ninst✝³ : AddCommMonoid A\ninst✝² : StarAddMonoid A\ninst✝¹ : Module R A\ninst✝ : StarModule R A\nr : R\nx : Unitization R A\n⊢ snd (star (r • x)) = snd (star r • star x)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁷ : CommSemiring R\ninst✝⁶ : StarRing R\ninst✝⁵ : NonUnitalSemiring A\ninst✝⁴ : StarRing A\ninst✝³ : Module R A\ninst✝² : IsScalarTower R A A\ninst✝¹ : SMulCommClass R A A\ninst✝ : StarModule R A\nsrc✝ : StarAddMonoid (Unitization R A) := instStarAddMonoid\nx y : Unitization R A\n⊢ fst (star (x * y)) = fst (star y * star x)\n[PROOFSTEP]\nsimp [-star_mul']\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁷ : CommSemiring R\ninst✝⁶ : StarRing R\ninst✝⁵ : NonUnitalSemiring A\ninst✝⁴ : StarRing A\ninst✝³ : Module R A\ninst✝² : IsScalarTower R A A\ninst✝¹ : SMulCommClass R A A\ninst✝ : StarModule R A\nsrc✝ : StarAddMonoid (Unitization R A) := instStarAddMonoid\nx y : Unitization R A\n⊢ snd (star (x * y)) = snd (star y * star x)\n[PROOFSTEP]\nsimp [-star_mul', add_comm (star x.fst • star y.snd)]\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁸ : CommSemiring S\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : IsScalarTower R A A\ninst✝³ : SMulCommClass R A A\ninst✝² : Algebra S R\ninst✝¹ : DistribMulAction S A\ninst✝ : IsScalarTower S R A\nsrc✝ : S →+* Unitization R A := RingHom.comp (inlRingHom R A) (algebraMap S R)\ns : S\nx : (fun x => Unitization R A) s\n⊢ ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        s *\n      x =\n    x *\n      ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        s\n[PROOFSTEP]\ninduction' x using Unitization.ind with r a\n[GOAL]\ncase h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁸ : CommSemiring S\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : IsScalarTower R A A\ninst✝³ : SMulCommClass R A A\ninst✝² : Algebra S R\ninst✝¹ : DistribMulAction S A\ninst✝ : IsScalarTower S R A\nsrc✝ : S →+* Unitization R A := RingHom.comp (inlRingHom R A) (algebraMap S R)\ns : S\nr : R\na : A\n⊢ ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        s *\n      (inl r + ↑a) =\n    (inl r + ↑a) *\n      ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        s\n[PROOFSTEP]\nshow inl (algebraMap S R s) * _ = _ * inl (algebraMap S R s)\n[GOAL]\ncase h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁸ : CommSemiring S\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : IsScalarTower R A A\ninst✝³ : SMulCommClass R A A\ninst✝² : Algebra S R\ninst✝¹ : DistribMulAction S A\ninst✝ : IsScalarTower S R A\nsrc✝ : S →+* Unitization R A := RingHom.comp (inlRingHom R A) (algebraMap S R)\ns : S\nr : R\na : A\n⊢ inl (↑(algebraMap S R) s) * (inl r + ↑a) = (inl r + ↑a) * inl (↑(algebraMap S R) s)\n[PROOFSTEP]\nrw [mul_add, add_mul, inl_mul_inl, inl_mul_inl, inl_mul_inr, inr_mul_inl, mul_comm]\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁸ : CommSemiring S\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : IsScalarTower R A A\ninst✝³ : SMulCommClass R A A\ninst✝² : Algebra S R\ninst✝¹ : DistribMulAction S A\ninst✝ : IsScalarTower S R A\nsrc✝ : S →+* Unitization R A := RingHom.comp (inlRingHom R A) (algebraMap S R)\ns : S\nx : (fun x => Unitization R A) s\n⊢ s • x =\n    ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        s *\n      x\n[PROOFSTEP]\ninduction' x using Unitization.ind with r a\n[GOAL]\ncase h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁸ : CommSemiring S\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : IsScalarTower R A A\ninst✝³ : SMulCommClass R A A\ninst✝² : Algebra S R\ninst✝¹ : DistribMulAction S A\ninst✝ : IsScalarTower S R A\nsrc✝ : S →+* Unitization R A := RingHom.comp (inlRingHom R A) (algebraMap S R)\ns : S\nr : R\na : A\n⊢ s • (inl r + ↑a) =\n    ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        s *\n      (inl r + ↑a)\n[PROOFSTEP]\nshow _ = inl (algebraMap S R s) * _\n[GOAL]\ncase h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁸ : CommSemiring S\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : IsScalarTower R A A\ninst✝³ : SMulCommClass R A A\ninst✝² : Algebra S R\ninst✝¹ : DistribMulAction S A\ninst✝ : IsScalarTower S R A\nsrc✝ : S →+* Unitization R A := RingHom.comp (inlRingHom R A) (algebraMap S R)\ns : S\nr : R\na : A\n⊢ s • (inl r + ↑a) = inl (↑(algebraMap S R) s) * (inl r + ↑a)\n[PROOFSTEP]\nrw [mul_add, smul_add, Algebra.algebraMap_eq_smul_one, inl_mul_inl, inl_mul_inr, smul_one_mul, inl_smul, inr_smul,\n  smul_one_smul]\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹³ : CommSemiring S\ninst✝¹² : CommSemiring R\ninst✝¹¹ : NonUnitalSemiring A\ninst✝¹⁰ : Module R A\ninst✝⁹ : SMulCommClass R A A\ninst✝⁸ : IsScalarTower R A A\nB : Type u_4\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra S B\ninst✝⁵ : Algebra S R\ninst✝⁴ : DistribMulAction S A\ninst✝³ : IsScalarTower S R A\nC : Type u_5\ninst✝² : Semiring C\ninst✝¹ : Algebra R C\nF : Type u_6\ninst✝ : AlgHomClass F S (Unitization R A) B\nφ ψ : F\nh : ∀ (a : A), ↑φ ↑a = ↑ψ ↑a\nh' : ∀ (r : R), ↑φ (↑(algebraMap R (Unitization R A)) r) = ↑ψ (↑(algebraMap R (Unitization R A)) r)\n⊢ φ = ψ\n[PROOFSTEP]\nrefine FunLike.ext φ ψ (fun x ↦ ?_)\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹³ : CommSemiring S\ninst✝¹² : CommSemiring R\ninst✝¹¹ : NonUnitalSemiring A\ninst✝¹⁰ : Module R A\ninst✝⁹ : SMulCommClass R A A\ninst✝⁸ : IsScalarTower R A A\nB : Type u_4\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra S B\ninst✝⁵ : Algebra S R\ninst✝⁴ : DistribMulAction S A\ninst✝³ : IsScalarTower S R A\nC : Type u_5\ninst✝² : Semiring C\ninst✝¹ : Algebra R C\nF : Type u_6\ninst✝ : AlgHomClass F S (Unitization R A) B\nφ ψ : F\nh : ∀ (a : A), ↑φ ↑a = ↑ψ ↑a\nh' : ∀ (r : R), ↑φ (↑(algebraMap R (Unitization R A)) r) = ↑ψ (↑(algebraMap R (Unitization R A)) r)\nx : Unitization R A\n⊢ ↑φ x = ↑ψ x\n[PROOFSTEP]\ninduction x using Unitization.ind\n[GOAL]\ncase h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹³ : CommSemiring S\ninst✝¹² : CommSemiring R\ninst✝¹¹ : NonUnitalSemiring A\ninst✝¹⁰ : Module R A\ninst✝⁹ : SMulCommClass R A A\ninst✝⁸ : IsScalarTower R A A\nB : Type u_4\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra S B\ninst✝⁵ : Algebra S R\ninst✝⁴ : DistribMulAction S A\ninst✝³ : IsScalarTower S R A\nC : Type u_5\ninst✝² : Semiring C\ninst✝¹ : Algebra R C\nF : Type u_6\ninst✝ : AlgHomClass F S (Unitization R A) B\nφ ψ : F\nh : ∀ (a : A), ↑φ ↑a = ↑ψ ↑a\nh' : ∀ (r : R), ↑φ (↑(algebraMap R (Unitization R A)) r) = ↑ψ (↑(algebraMap R (Unitization R A)) r)\nr✝ : R\na✝ : A\n⊢ ↑φ (inl r✝ + ↑a✝) = ↑ψ (inl r✝ + ↑a✝)\n[PROOFSTEP]\nsimp only [map_add, ← algebraMap_eq_inl, h, h']\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹³ : CommSemiring S\ninst✝¹² : CommSemiring R\ninst✝¹¹ : NonUnitalSemiring A\ninst✝¹⁰ : Module R A\ninst✝⁹ : SMulCommClass R A A\ninst✝⁸ : IsScalarTower R A A\nB : Type u_4\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra S B\ninst✝⁵ : Algebra S R\ninst✝⁴ : DistribMulAction S A\ninst✝³ : IsScalarTower S R A\nC : Type u_5\ninst✝² : Semiring C\ninst✝¹ : Algebra R C\nF : Type u_6\ninst✝ : AlgHomClass F R (Unitization R A) C\nφ ψ : F\nh : ∀ (a : A), ↑φ ↑a = ↑ψ ↑a\nr : R\n⊢ ↑φ (↑(algebraMap R (Unitization R A)) r) = ↑ψ (↑(algebraMap R (Unitization R A)) r)\n[PROOFSTEP]\nsimp only [AlgHomClass.commutes]\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\n⊢ (fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x)) 1 = 1\n[PROOFSTEP]\nsimp only [fst_one, map_one, snd_one, φ.map_zero, add_zero]\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\nx y : Unitization R A\n⊢ OneHom.toFun\n      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x), map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x), map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n        x *\n      OneHom.toFun\n        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x), map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) } y\n[PROOFSTEP]\ninduction' x using Unitization.ind with x_r x_a\n[GOAL]\ncase h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\ny : Unitization R A\nx_r : R\nx_a : A\n⊢ OneHom.toFun\n      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x), map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n      ((inl x_r + ↑x_a) * y) =\n    OneHom.toFun\n        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x), map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n        (inl x_r + ↑x_a) *\n      OneHom.toFun\n        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x), map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) } y\n[PROOFSTEP]\ninduction' y using Unitization.ind with y_r y_a\n[GOAL]\ncase h.h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\nx_r : R\nx_a : A\ny_r : R\ny_a : A\n⊢ OneHom.toFun\n      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x), map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n      ((inl x_r + ↑x_a) * (inl y_r + ↑y_a)) =\n    OneHom.toFun\n        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x), map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n        (inl x_r + ↑x_a) *\n      OneHom.toFun\n        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x), map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n        (inl y_r + ↑y_a)\n[PROOFSTEP]\nsimp only [fst_mul, fst_add, fst_inl, fst_inr, snd_mul, snd_add, snd_inl, snd_inr, add_zero, map_mul, zero_add, map_add,\n  map_smul φ]\n[GOAL]\ncase h.h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\nx_r : R\nx_a : A\ny_r : R\ny_a : A\n⊢ ↑(algebraMap R C) x_r * ↑(algebraMap R C) y_r + (x_r • ↑φ y_a + y_r • ↑φ x_a + ↑φ x_a * ↑φ y_a) =\n    (↑(algebraMap R C) x_r + ↑φ x_a) * (↑(algebraMap R C) y_r + ↑φ y_a)\n[PROOFSTEP]\nrw [add_mul, mul_add, mul_add]\n[GOAL]\ncase h.h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\nx_r : R\nx_a : A\ny_r : R\ny_a : A\n⊢ ↑(algebraMap R C) x_r * ↑(algebraMap R C) y_r + (x_r • ↑φ y_a + y_r • ↑φ x_a + ↑φ x_a * ↑φ y_a) =\n    ↑(algebraMap R C) x_r * ↑(algebraMap R C) y_r + ↑(algebraMap R C) x_r * ↑φ y_a +\n      (↑φ x_a * ↑(algebraMap R C) y_r + ↑φ x_a * ↑φ y_a)\n[PROOFSTEP]\nrw [← Algebra.commutes _ (φ x_a)]\n[GOAL]\ncase h.h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\nx_r : R\nx_a : A\ny_r : R\ny_a : A\n⊢ ↑(algebraMap R C) x_r * ↑(algebraMap R C) y_r + (x_r • ↑φ y_a + y_r • ↑φ x_a + ↑φ x_a * ↑φ y_a) =\n    ↑(algebraMap R C) x_r * ↑(algebraMap R C) y_r + ↑(algebraMap R C) x_r * ↑φ y_a +\n      (↑(algebraMap R ((fun x => C) x_a)) y_r * ↑φ x_a + ↑φ x_a * ↑φ y_a)\n[PROOFSTEP]\nsimp only [Algebra.algebraMap_eq_smul_one, smul_one_mul, add_assoc]\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n              map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Unitization R A),\n                OneHom.toFun\n                    { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                      map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      y) })\n      0 =\n    0\n[PROOFSTEP]\nsimp only [fst_zero, map_zero, snd_zero, φ.map_zero, add_zero]\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\nx y : Unitization R A\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n              map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Unitization R A),\n                OneHom.toFun\n                    { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                      map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      y) })\n      (x + y) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Unitization R A),\n                  OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                        y) })\n        x +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Unitization R A),\n                  OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                        y) })\n        y\n[PROOFSTEP]\ninduction' x using Unitization.ind with x_r x_a\n[GOAL]\ncase h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\ny : Unitization R A\nx_r : R\nx_a : A\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n              map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Unitization R A),\n                OneHom.toFun\n                    { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                      map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      y) })\n      (inl x_r + ↑x_a + y) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Unitization R A),\n                  OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                        y) })\n        (inl x_r + ↑x_a) +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Unitization R A),\n                  OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                        y) })\n        y\n[PROOFSTEP]\ninduction' y using Unitization.ind with y_r y_a\n[GOAL]\ncase h.h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\nx_r : R\nx_a : A\ny_r : R\ny_a : A\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n              map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Unitization R A),\n                OneHom.toFun\n                    { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                      map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      y) })\n      (inl x_r + ↑x_a + (inl y_r + ↑y_a)) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Unitization R A),\n                  OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                        y) })\n        (inl x_r + ↑x_a) +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Unitization R A),\n                  OneHom.toFun\n                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                        y) })\n        (inl y_r + ↑y_a)\n[PROOFSTEP]\nsimp only [fst_add, fst_inl, fst_inr, add_zero, map_add, snd_add, snd_inl, snd_inr, zero_add, φ.map_add]\n[GOAL]\ncase h.h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\nx_r : R\nx_a : A\ny_r : R\ny_a : A\n⊢ ↑(algebraMap R C) x_r + ↑(algebraMap R C) y_r + (↑φ x_a + ↑φ y_a) =\n    ↑(algebraMap R C) x_r + ↑φ x_a + (↑(algebraMap R C) y_r + ↑φ y_a)\n[PROOFSTEP]\nrw [add_add_add_comm]\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\nr : R\n⊢ OneHom.toFun\n      (↑↑{\n            toMonoidHom :=\n              {\n                toOneHom :=\n                  { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                    map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : Unitization R A),\n                      OneHom.toFun\n                          { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                            map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                          (x * y) =\n                        OneHom.toFun\n                            { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                              map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                            x *\n                          OneHom.toFun\n                            { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                              map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                            y) },\n            map_zero' := (_ : ↑(algebraMap R C) 0 + ↑φ 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : Unitization R A),\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                              map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (x y : Unitization R A),\n                                OneHom.toFun\n                                    { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                                      map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                                    (x * y) =\n                                  OneHom.toFun\n                                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                                      x *\n                                    OneHom.toFun\n                                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                                      y) })\n                      (x + y) =\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                                map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : Unitization R A),\n                                  OneHom.toFun\n                                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                                      (x * y) =\n                                    OneHom.toFun\n                                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                                        y) })\n                        x +\n                      OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                                map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : Unitization R A),\n                                  OneHom.toFun\n                                      { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                                        map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                                      (x * y) =\n                                    OneHom.toFun\n                                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        { toFun := fun x => ↑(algebraMap R C) (fst x) + ↑φ (snd x),\n                                          map_one' := (_ : ↑(algebraMap R C) 1 + ↑φ 0 = 1) }\n                                        y) })\n                        y) })\n      (↑(algebraMap R (Unitization R A)) r) =\n    ↑(algebraMap R C) r\n[PROOFSTEP]\nsimp only [algebraMap_eq_inl, fst_inl, snd_inl, φ.map_zero, add_zero]\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\n⊢ (fun φ => NonUnitalAlgHom.comp (↑φ) (inrNonUnitalAlgHom R A)) (NonUnitalAlgHom.toAlgHom φ) = φ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : A →ₙₐ[R] C\nx✝ : A\n⊢ ↑((fun φ => NonUnitalAlgHom.comp (↑φ) (inrNonUnitalAlgHom R A)) (NonUnitalAlgHom.toAlgHom φ)) x✝ = ↑φ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : Unitization R A →ₐ[R] C\n⊢ NonUnitalAlgHom.comp (↑(NonUnitalAlgHom.toAlgHom ((fun φ => NonUnitalAlgHom.comp (↑φ) (inrNonUnitalAlgHom R A)) φ)))\n      (inrNonUnitalAlgHom R A) =\n    NonUnitalAlgHom.comp (↑φ) (inrNonUnitalAlgHom R A)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ : Unitization R A →ₐ[R] C\nx✝ : A\n⊢ ↑(NonUnitalAlgHom.comp (↑(NonUnitalAlgHom.toAlgHom ((fun φ => NonUnitalAlgHom.comp (↑φ) (inrNonUnitalAlgHom R A)) φ)))\n          (inrNonUnitalAlgHom R A))\n      x✝ =\n    ↑(NonUnitalAlgHom.comp (↑φ) (inrNonUnitalAlgHom R A)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\n⊢ ↑(NonUnitalAlgHom.toAlgHom 0) = fst\n[PROOFSTEP]\next\n[GOAL]\ncase h\nS : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝¹² : CommSemiring S\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : NonUnitalSemiring A\ninst✝⁹ : Module R A\ninst✝⁸ : SMulCommClass R A A\ninst✝⁷ : IsScalarTower R A A\nB : Type u_4\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra S B\ninst✝⁴ : Algebra S R\ninst✝³ : DistribMulAction S A\ninst✝² : IsScalarTower S R A\nC : Type u_5\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nx✝ : Unitization R A\n⊢ ↑(NonUnitalAlgHom.toAlgHom 0) x✝ = fst x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nC : Type u_3\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : StarRing R\ninst✝⁹ : NonUnitalSemiring A\ninst✝⁸ : StarRing A\ninst✝⁷ : Module R A\ninst✝⁶ : SMulCommClass R A A\ninst✝⁵ : IsScalarTower R A A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring C\ninst✝² : Algebra R C\ninst✝¹ : StarRing C\ninst✝ : StarModule R C\nφ : A →⋆ₙₐ[R] C\nx : Unitization R A\n⊢ OneHom.toFun (↑↑↑(↑lift φ.toNonUnitalAlgHom)) (star x) = star (OneHom.toFun (↑↑↑(↑lift φ.toNonUnitalAlgHom)) x)\n[PROOFSTEP]\ninduction x using Unitization.ind\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nC : Type u_3\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : StarRing R\ninst✝⁹ : NonUnitalSemiring A\ninst✝⁸ : StarRing A\ninst✝⁷ : Module R A\ninst✝⁶ : SMulCommClass R A A\ninst✝⁵ : IsScalarTower R A A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring C\ninst✝² : Algebra R C\ninst✝¹ : StarRing C\ninst✝ : StarModule R C\nφ : A →⋆ₙₐ[R] C\nr✝ : R\na✝ : A\n⊢ OneHom.toFun (↑↑↑(↑lift φ.toNonUnitalAlgHom)) (star (inl r✝ + ↑a✝)) =\n    star (OneHom.toFun (↑↑↑(↑lift φ.toNonUnitalAlgHom)) (inl r✝ + ↑a✝))\n[PROOFSTEP]\nsimp [map_star]\n[GOAL]\nR : Type u_1\nA : Type u_2\nC : Type u_3\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : StarRing R\ninst✝⁹ : NonUnitalSemiring A\ninst✝⁸ : StarRing A\ninst✝⁷ : Module R A\ninst✝⁶ : SMulCommClass R A A\ninst✝⁵ : IsScalarTower R A A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring C\ninst✝² : Algebra R C\ninst✝¹ : StarRing C\ninst✝ : StarModule R C\nφ : A →⋆ₙₐ[R] C\n⊢ (fun φ => NonUnitalStarAlgHom.comp (StarAlgHom.toNonUnitalStarAlgHom φ) (inrNonUnitalStarAlgHom R A))\n      ((fun φ =>\n          { toAlgHom := ↑lift φ.toNonUnitalAlgHom,\n            map_star' :=\n              (_ :\n                ∀ (x : Unitization R A),\n                  OneHom.toFun (↑↑↑(↑lift φ.toNonUnitalAlgHom)) (star x) =\n                    star (OneHom.toFun (↑↑↑(↑lift φ.toNonUnitalAlgHom)) x)) })\n        φ) =\n    φ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nC : Type u_3\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : StarRing R\ninst✝⁹ : NonUnitalSemiring A\ninst✝⁸ : StarRing A\ninst✝⁷ : Module R A\ninst✝⁶ : SMulCommClass R A A\ninst✝⁵ : IsScalarTower R A A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring C\ninst✝² : Algebra R C\ninst✝¹ : StarRing C\ninst✝ : StarModule R C\nφ : A →⋆ₙₐ[R] C\nx✝ : A\n⊢ ↑((fun φ => NonUnitalStarAlgHom.comp (StarAlgHom.toNonUnitalStarAlgHom φ) (inrNonUnitalStarAlgHom R A))\n          ((fun φ =>\n              { toAlgHom := ↑lift φ.toNonUnitalAlgHom,\n                map_star' :=\n                  (_ :\n                    ∀ (x : Unitization R A),\n                      OneHom.toFun (↑↑↑(↑lift φ.toNonUnitalAlgHom)) (star x) =\n                        star (OneHom.toFun (↑↑↑(↑lift φ.toNonUnitalAlgHom)) x)) })\n            φ))\n      x✝ =\n    ↑φ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nC : Type u_3\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : StarRing R\ninst✝⁹ : NonUnitalSemiring A\ninst✝⁸ : StarRing A\ninst✝⁷ : Module R A\ninst✝⁶ : SMulCommClass R A A\ninst✝⁵ : IsScalarTower R A A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring C\ninst✝² : Algebra R C\ninst✝¹ : StarRing C\ninst✝ : StarModule R C\nφ : Unitization R A →⋆ₐ[R] C\n⊢ ∀ (a : A),\n    ↑((fun φ =>\n              { toAlgHom := ↑lift φ.toNonUnitalAlgHom,\n                map_star' :=\n                  (_ :\n                    ∀ (x : Unitization R A),\n                      OneHom.toFun (↑↑↑(↑lift φ.toNonUnitalAlgHom)) (star x) =\n                        star (OneHom.toFun (↑↑↑(↑lift φ.toNonUnitalAlgHom)) x)) })\n            ((fun φ => NonUnitalStarAlgHom.comp (StarAlgHom.toNonUnitalStarAlgHom φ) (inrNonUnitalStarAlgHom R A)) φ))\n        ↑a =\n      ↑φ ↑a\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Algebra.Unitization", "llama_tokens": 22242, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718435083355187, "lm_q2_score": 0.5156199157230157, "lm_q1q2_score": 0.39797788471931694}}
{"text": "[GOAL]\nb : ℝ\nhb : 0 < b\n⊢ (fun x => rexp (-b * x ^ 2)) =o[atTop] fun x => rexp (-x)\n[PROOFSTEP]\nhave A : (fun x : ℝ => -x - -b * x ^ 2) = fun x => x * (b * x + -1) := by ext x; ring\n[GOAL]\nb : ℝ\nhb : 0 < b\n⊢ (fun x => -x - -b * x ^ 2) = fun x => x * (b * x + -1)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nb : ℝ\nhb : 0 < b\nx : ℝ\n⊢ -x - -b * x ^ 2 = x * (b * x + -1)\n[PROOFSTEP]\nring\n[GOAL]\nb : ℝ\nhb : 0 < b\nA : (fun x => -x - -b * x ^ 2) = fun x => x * (b * x + -1)\n⊢ (fun x => rexp (-b * x ^ 2)) =o[atTop] fun x => rexp (-x)\n[PROOFSTEP]\nrw [isLittleO_exp_comp_exp_comp, A]\n[GOAL]\nb : ℝ\nhb : 0 < b\nA : (fun x => -x - -b * x ^ 2) = fun x => x * (b * x + -1)\n⊢ Tendsto (fun x => x * (b * x + -1)) atTop atTop\n[PROOFSTEP]\napply Tendsto.atTop_mul_atTop tendsto_id\n[GOAL]\nb : ℝ\nhb : 0 < b\nA : (fun x => -x - -b * x ^ 2) = fun x => x * (b * x + -1)\n⊢ Tendsto (fun x => b * x + -1) atTop atTop\n[PROOFSTEP]\nexact tendsto_atTop_add_const_right atTop (-1 : ℝ) (Tendsto.const_mul_atTop hb tendsto_id)\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\n⊢ (fun x => x ^ s * rexp (-b * x ^ 2)) =o[atTop] fun x => rexp (-(1 / 2) * x)\n[PROOFSTEP]\napply ((isBigO_refl (fun x : ℝ => x ^ s) atTop).mul_isLittleO (exp_neg_mul_sq_isLittleO_exp_neg hb)).trans\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\n⊢ (fun x => x ^ s * rexp (-x)) =o[atTop] fun x => rexp (-(1 / 2) * x)\n[PROOFSTEP]\nsimpa only [mul_comm] using Gamma_integrand_isLittleO s\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioi 0)\n[PROOFSTEP]\nrw [← Ioc_union_Ioi_eq_Ioi (zero_le_one : (0 : ℝ) ≤ 1), integrableOn_union]\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioc 0 1) ∧\n    IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioi 1)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioc 0 1)\n[PROOFSTEP]\nrw [← integrableOn_Icc_iff_integrableOn_Ioc]\n[GOAL]\ncase left\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Icc 0 1)\n[PROOFSTEP]\nrefine' IntegrableOn.mul_continuousOn _ _ isCompact_Icc\n[GOAL]\ncase left.refine'_1\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ IntegrableOn (fun x => x ^ s) (Icc 0 1)\n[PROOFSTEP]\nrefine' (intervalIntegrable_iff_integrable_Icc_of_le zero_le_one).mp _\n[GOAL]\ncase left.refine'_1\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ IntervalIntegrable (fun x => x ^ s) volume 0 1\n[PROOFSTEP]\nexact intervalIntegral.intervalIntegrable_rpow' hs\n[GOAL]\ncase left.refine'_2\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ ContinuousOn (fun x => rexp (-b * x ^ 2)) (Icc 0 1)\n[PROOFSTEP]\nexact (continuous_exp.comp (continuous_const.mul (continuous_pow 2))).continuousOn\n[GOAL]\ncase right\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioi 1)\n[PROOFSTEP]\nhave B : (0 : ℝ) < 1 / 2 := by norm_num\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ 0 < 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase right\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\nB : 0 < 1 / 2\n⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioi 1)\n[PROOFSTEP]\napply integrable_of_isBigO_exp_neg B _ (IsLittleO.isBigO (rpow_mul_exp_neg_mul_sq_isLittleO_exp_neg hb _))\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\nB : 0 < 1 / 2\n⊢ ContinuousOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ici 1)\n[PROOFSTEP]\nintro x hx\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\nB : 0 < 1 / 2\nx : ℝ\nhx : x ∈ Ici 1\n⊢ ContinuousWithinAt (fun x => x ^ s * rexp (-b * x ^ 2)) (Ici 1) x\n[PROOFSTEP]\nhave N : x ≠ 0 := by refine' (zero_lt_one.trans_le _).ne'; exact hx\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\nB : 0 < 1 / 2\nx : ℝ\nhx : x ∈ Ici 1\n⊢ x ≠ 0\n[PROOFSTEP]\nrefine' (zero_lt_one.trans_le _).ne'\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\nB : 0 < 1 / 2\nx : ℝ\nhx : x ∈ Ici 1\n⊢ 1 ≤ x\n[PROOFSTEP]\nexact hx\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\nB : 0 < 1 / 2\nx : ℝ\nhx : x ∈ Ici 1\nN : x ≠ 0\n⊢ ContinuousWithinAt (fun x => x ^ s * rexp (-b * x ^ 2)) (Ici 1) x\n[PROOFSTEP]\napply ((continuousAt_rpow_const _ _ (Or.inl N)).mul _).continuousWithinAt\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\nB : 0 < 1 / 2\nx : ℝ\nhx : x ∈ Ici 1\nN : x ≠ 0\n⊢ ContinuousAt (fun x => rexp (-b * x ^ 2)) x\n[PROOFSTEP]\nexact (continuous_exp.comp (continuous_const.mul (continuous_pow 2))).continuousAt\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ Integrable fun x => x ^ s * rexp (-b * x ^ 2)\n[PROOFSTEP]\nrw [← integrableOn_univ, ← @Iio_union_Ici _ _ (0 : ℝ), integrableOn_union, integrableOn_Ici_iff_integrableOn_Ioi]\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Iio 0) ∧ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Ioi 0)\n[PROOFSTEP]\nrefine' ⟨_, integrableOn_rpow_mul_exp_neg_mul_sq hb hs⟩\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ 2)) (Iio 0)\n[PROOFSTEP]\nrw [←\n  (Measure.measurePreserving_neg (volume : Measure ℝ)).integrableOn_comp_preimage\n    (Homeomorph.neg ℝ).toMeasurableEquiv.measurableEmbedding]\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ IntegrableOn ((fun x => x ^ s * rexp (-b * x ^ 2)) ∘ Neg.neg) (Neg.neg ⁻¹' Iio 0)\n[PROOFSTEP]\nsimp only [Function.comp, neg_sq, neg_preimage, preimage_neg_Iio, neg_neg, neg_zero]\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ IntegrableOn (fun x => (-x) ^ s * rexp (-b * x ^ 2)) (Ioi 0)\n[PROOFSTEP]\napply Integrable.mono' (integrableOn_rpow_mul_exp_neg_mul_sq hb hs)\n[GOAL]\ncase hf\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ AEStronglyMeasurable (fun x => (-x) ^ s * rexp (-b * x ^ 2)) (Measure.restrict volume (Ioi 0))\n[PROOFSTEP]\napply Measurable.aestronglyMeasurable\n[GOAL]\ncase hf.hf\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ Measurable fun x => (-x) ^ s * rexp (-b * x ^ 2)\n[PROOFSTEP]\nexact (measurable_id'.neg.pow measurable_const).mul ((measurable_id'.pow measurable_const).const_mul (-b)).exp\n[GOAL]\ncase h\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\n⊢ ∀ᵐ (a : ℝ) ∂Measure.restrict volume (Ioi 0), ‖(-a) ^ s * rexp (-b * a ^ 2)‖ ≤ a ^ s * rexp (-b * a ^ 2)\n[PROOFSTEP]\nhave : MeasurableSet (Ioi (0 : ℝ)) := measurableSet_Ioi\n[GOAL]\ncase h\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\nthis : MeasurableSet (Ioi 0)\n⊢ ∀ᵐ (a : ℝ) ∂Measure.restrict volume (Ioi 0), ‖(-a) ^ s * rexp (-b * a ^ 2)‖ ≤ a ^ s * rexp (-b * a ^ 2)\n[PROOFSTEP]\nfilter_upwards [ae_restrict_mem this] with x hx\n[GOAL]\ncase h\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\nthis : MeasurableSet (Ioi 0)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ‖(-x) ^ s * rexp (-b * x ^ 2)‖ ≤ x ^ s * rexp (-b * x ^ 2)\n[PROOFSTEP]\nhave h'x : 0 ≤ x := le_of_lt hx\n[GOAL]\ncase h\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\nthis : MeasurableSet (Ioi 0)\nx : ℝ\nhx : x ∈ Ioi 0\nh'x : 0 ≤ x\n⊢ ‖(-x) ^ s * rexp (-b * x ^ 2)‖ ≤ x ^ s * rexp (-b * x ^ 2)\n[PROOFSTEP]\nrw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (exp_pos _).le]\n[GOAL]\ncase h\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\nthis : MeasurableSet (Ioi 0)\nx : ℝ\nhx : x ∈ Ioi 0\nh'x : 0 ≤ x\n⊢ |(-x) ^ s| * rexp (-b * x ^ 2) ≤ x ^ s * rexp (-b * x ^ 2)\n[PROOFSTEP]\napply mul_le_mul_of_nonneg_right _ (exp_pos _).le\n[GOAL]\nb : ℝ\nhb : 0 < b\ns : ℝ\nhs : -1 < s\nthis : MeasurableSet (Ioi 0)\nx : ℝ\nhx : x ∈ Ioi 0\nh'x : 0 ≤ x\n⊢ |(-x) ^ s| ≤ x ^ s\n[PROOFSTEP]\nsimpa [abs_of_nonneg h'x] using abs_rpow_le_abs_rpow (-x) s\n[GOAL]\nb : ℝ\nhb : 0 < b\n⊢ Integrable fun x => rexp (-b * x ^ 2)\n[PROOFSTEP]\nsimpa using integrable_rpow_mul_exp_neg_mul_sq hb (by norm_num : (-1 : ℝ) < 0)\n[GOAL]\nb : ℝ\nhb : 0 < b\n⊢ -1 < 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nb : ℝ\n⊢ IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0) ↔ 0 < b\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => (integrable_exp_neg_mul_sq h).integrableOn⟩\n[GOAL]\nb : ℝ\nh : IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0)\n⊢ 0 < b\n[PROOFSTEP]\nby_contra' hb\n[GOAL]\nb : ℝ\nh : IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0)\nhb : b ≤ 0\n⊢ False\n[PROOFSTEP]\nhave : ∫⁻ _ : ℝ in Ioi 0, 1 ≤ ∫⁻ x : ℝ in Ioi 0, ‖exp (-b * x ^ 2)‖₊ :=\n  by\n  apply lintegral_mono (fun x ↦ _)\n  simp only [neg_mul, ENNReal.one_le_coe_iff, ← toNNReal_one, toNNReal_le_iff_le_coe,\n    Real.norm_of_nonneg (exp_pos _).le, coe_nnnorm, one_le_exp_iff, Right.nonneg_neg_iff]\n  exact fun x ↦ mul_nonpos_of_nonpos_of_nonneg hb (sq_nonneg x)\n[GOAL]\nb : ℝ\nh : IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0)\nhb : b ≤ 0\n⊢ ∫⁻ (x : ℝ) in Ioi 0, 1 ≤ ∫⁻ (x : ℝ) in Ioi 0, ↑‖rexp (-b * x ^ 2)‖₊\n[PROOFSTEP]\napply lintegral_mono (fun x ↦ _)\n[GOAL]\nb : ℝ\nh : IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0)\nhb : b ≤ 0\n⊢ ∀ (x : ℝ), 1 ≤ ↑‖rexp (-b * x ^ 2)‖₊\n[PROOFSTEP]\nsimp only [neg_mul, ENNReal.one_le_coe_iff, ← toNNReal_one, toNNReal_le_iff_le_coe, Real.norm_of_nonneg (exp_pos _).le,\n  coe_nnnorm, one_le_exp_iff, Right.nonneg_neg_iff]\n[GOAL]\nb : ℝ\nh : IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0)\nhb : b ≤ 0\n⊢ ∀ (x : ℝ), b * x ^ 2 ≤ 0\n[PROOFSTEP]\nexact fun x ↦ mul_nonpos_of_nonpos_of_nonneg hb (sq_nonneg x)\n[GOAL]\nb : ℝ\nh : IntegrableOn (fun x => rexp (-b * x ^ 2)) (Ioi 0)\nhb : b ≤ 0\nthis : ∫⁻ (x : ℝ) in Ioi 0, 1 ≤ ∫⁻ (x : ℝ) in Ioi 0, ↑‖rexp (-b * x ^ 2)‖₊\n⊢ False\n[PROOFSTEP]\nsimpa using this.trans_lt h.2\n[GOAL]\nb : ℝ\nhb : 0 < b\n⊢ Integrable fun x => x * rexp (-b * x ^ 2)\n[PROOFSTEP]\nsimpa using integrable_rpow_mul_exp_neg_mul_sq hb (by norm_num : (-1 : ℝ) < 1)\n[GOAL]\nb : ℝ\nhb : 0 < b\n⊢ -1 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nb : ℂ\nx : ℝ\n⊢ ‖cexp (-b * ↑x ^ 2)‖ = rexp (-b.re * x ^ 2)\n[PROOFSTEP]\nrw [Complex.norm_eq_abs, Complex.abs_exp, ← ofReal_pow, mul_comm (-b) _, ofReal_mul_re, neg_re, mul_comm]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ Integrable fun x => cexp (-b * ↑x ^ 2)\n[PROOFSTEP]\nrefine' ⟨(Complex.continuous_exp.comp (continuous_const.mul (continuous_ofReal.pow 2))).aestronglyMeasurable, _⟩\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ HasFiniteIntegral fun x => cexp (-b * ↑x ^ 2)\n[PROOFSTEP]\nrw [← hasFiniteIntegral_norm_iff]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ HasFiniteIntegral fun a => ‖cexp (-b * ↑a ^ 2)‖\n[PROOFSTEP]\nsimp_rw [norm_cexp_neg_mul_sq]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ HasFiniteIntegral fun a => rexp (-b.re * a ^ 2)\n[PROOFSTEP]\nexact (integrable_exp_neg_mul_sq hb).2\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ Integrable fun x => ↑x * cexp (-b * ↑x ^ 2)\n[PROOFSTEP]\nrefine' ⟨(continuous_ofReal.mul (Complex.continuous_exp.comp _)).aestronglyMeasurable, _⟩\n[GOAL]\ncase refine'_1\nb : ℂ\nhb : 0 < b.re\n⊢ Continuous fun x => -b * ↑x ^ 2\n[PROOFSTEP]\nexact continuous_const.mul (continuous_ofReal.pow 2)\n[GOAL]\ncase refine'_2\nb : ℂ\nhb : 0 < b.re\n⊢ HasFiniteIntegral fun x => ↑x * cexp (-b * ↑x ^ 2)\n[PROOFSTEP]\nhave := (integrable_mul_exp_neg_mul_sq hb).hasFiniteIntegral\n[GOAL]\ncase refine'_2\nb : ℂ\nhb : 0 < b.re\nthis : HasFiniteIntegral fun x => x * rexp (-b.re * x ^ 2)\n⊢ HasFiniteIntegral fun x => ↑x * cexp (-b * ↑x ^ 2)\n[PROOFSTEP]\nrw [← hasFiniteIntegral_norm_iff] at this ⊢\n[GOAL]\ncase refine'_2\nb : ℂ\nhb : 0 < b.re\nthis : HasFiniteIntegral fun a => ‖a * rexp (-b.re * a ^ 2)‖\n⊢ HasFiniteIntegral fun a => ‖↑a * cexp (-b * ↑a ^ 2)‖\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_5.h\nb : ℂ\nhb : 0 < b.re\nthis : HasFiniteIntegral fun a => ‖a * rexp (-b.re * a ^ 2)‖\nx✝ : ℝ\n⊢ ‖↑x✝ * cexp (-b * ↑x✝ ^ 2)‖ = ‖x✝ * rexp (-b.re * x✝ ^ 2)‖\n[PROOFSTEP]\nrw [norm_mul, norm_mul, norm_cexp_neg_mul_sq b, Complex.norm_eq_abs, abs_ofReal, Real.norm_eq_abs,\n  norm_of_nonneg (exp_pos _).le]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ ∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2) = (2 * b)⁻¹\n[PROOFSTEP]\nhave hb' : b ≠ 0 := by contrapose! hb; rw [hb, zero_re]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ b ≠ 0\n[PROOFSTEP]\ncontrapose! hb\n[GOAL]\nb : ℂ\nhb : b = 0\n⊢ b.re ≤ 0\n[PROOFSTEP]\nrw [hb, zero_re]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nhb' : b ≠ 0\n⊢ ∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2) = (2 * b)⁻¹\n[PROOFSTEP]\nhave A : ∀ x : ℂ, HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x :=\n  by\n  intro x\n  convert ((hasDerivAt_pow 2 x).const_mul (-b)).cexp.const_mul (-(2 * b)⁻¹) using 1\n  field_simp [hb']\n  ring\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nhb' : b ≠ 0\n⊢ ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x\n[PROOFSTEP]\nintro x\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nhb' : b ≠ 0\nx : ℂ\n⊢ HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x\n[PROOFSTEP]\nconvert ((hasDerivAt_pow 2 x).const_mul (-b)).cexp.const_mul (-(2 * b)⁻¹) using 1\n[GOAL]\ncase h.e'_7\nb : ℂ\nhb : 0 < b.re\nhb' : b ≠ 0\nx : ℂ\n⊢ x * cexp (-b * x ^ 2) = -(2 * b)⁻¹ * (cexp (-b * x ^ 2) * (-b * (↑2 * x ^ (2 - 1))))\n[PROOFSTEP]\nfield_simp [hb']\n[GOAL]\ncase h.e'_7\nb : ℂ\nhb : 0 < b.re\nhb' : b ≠ 0\nx : ℂ\n⊢ x * cexp (-(b * x ^ 2)) * (2 * b) = cexp (-(b * x ^ 2)) * (b * (2 * x))\n[PROOFSTEP]\nring\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nhb' : b ≠ 0\nA : ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x\n⊢ ∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2) = (2 * b)⁻¹\n[PROOFSTEP]\nhave B : Tendsto (fun y : ℝ ↦ -(2 * b)⁻¹ * cexp (-b * (y : ℂ) ^ 2)) atTop (𝓝 (-(2 * b)⁻¹ * 0)) :=\n  by\n  refine' Tendsto.const_mul _ (tendsto_zero_iff_norm_tendsto_zero.mpr _)\n  simp_rw [norm_cexp_neg_mul_sq b]\n  exact tendsto_exp_atBot.comp (Tendsto.neg_const_mul_atTop (neg_lt_zero.2 hb) (tendsto_pow_atTop two_ne_zero))\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nhb' : b ≠ 0\nA : ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x\n⊢ Tendsto (fun y => -(2 * b)⁻¹ * cexp (-b * ↑y ^ 2)) atTop (𝓝 (-(2 * b)⁻¹ * 0))\n[PROOFSTEP]\nrefine' Tendsto.const_mul _ (tendsto_zero_iff_norm_tendsto_zero.mpr _)\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nhb' : b ≠ 0\nA : ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x\n⊢ Tendsto (fun e => ‖cexp (-b * ↑e ^ 2)‖) atTop (𝓝 0)\n[PROOFSTEP]\nsimp_rw [norm_cexp_neg_mul_sq b]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nhb' : b ≠ 0\nA : ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x\n⊢ Tendsto (fun e => rexp (-b.re * e ^ 2)) atTop (𝓝 0)\n[PROOFSTEP]\nexact tendsto_exp_atBot.comp (Tendsto.neg_const_mul_atTop (neg_lt_zero.2 hb) (tendsto_pow_atTop two_ne_zero))\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nhb' : b ≠ 0\nA : ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x\nB : Tendsto (fun y => -(2 * b)⁻¹ * cexp (-b * ↑y ^ 2)) atTop (𝓝 (-(2 * b)⁻¹ * 0))\n⊢ ∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2) = (2 * b)⁻¹\n[PROOFSTEP]\nconvert\n  integral_Ioi_of_hasDerivAt_of_tendsto' (fun x _ => (A ↑x).comp_ofReal)\n    (integrable_mul_cexp_neg_mul_sq hb).integrableOn B using\n  1\n[GOAL]\ncase h.e'_3\nb : ℂ\nhb : 0 < b.re\nhb' : b ≠ 0\nA : ∀ (x : ℂ), HasDerivAt (fun x => -(2 * b)⁻¹ * cexp (-b * x ^ 2)) (x * cexp (-b * x ^ 2)) x\nB : Tendsto (fun y => -(2 * b)⁻¹ * cexp (-b * ↑y ^ 2)) atTop (𝓝 (-(2 * b)⁻¹ * 0))\n⊢ (2 * b)⁻¹ = -(2 * b)⁻¹ * 0 - -(2 * b)⁻¹ * cexp (-b * ↑0 ^ 2)\n[PROOFSTEP]\nsimp only [mul_zero, ofReal_zero, zero_pow', Ne.def, bit0_eq_zero, Nat.one_ne_zero, not_false_iff, Complex.exp_zero,\n  mul_one, sub_neg_eq_add, zero_add]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ (∫ (x : ℝ), cexp (-b * ↑x ^ 2)) ^ 2 = ↑π / b\n[PROOFSTEP]\ncalc\n  (∫ x : ℝ, cexp (-b * (x : ℂ) ^ 2)) ^ 2 = ∫ p : ℝ × ℝ, cexp (-b * (p.1 : ℂ) ^ 2) * cexp (-b * (p.2 : ℂ) ^ 2) := by\n    rw [pow_two, ← integral_prod_mul]; rfl\n  _ = ∫ p : ℝ × ℝ, cexp (-b * ((p.1 : ℂ) ^ 2 + (p.2 : ℂ) ^ 2)) :=\n    by\n    congr\n    ext1 p\n    rw [← Complex.exp_add, mul_add]\n  _ = ∫ p in polarCoord.target, p.1 • cexp (-b * ((p.1 * Complex.cos p.2) ^ 2 + (p.1 * Complex.sin p.2) ^ 2)) :=\n    by\n    rw [← integral_comp_polarCoord_symm]\n    simp only [polarCoord_symm_apply, ofReal_mul, ofReal_cos, ofReal_sin]\n  _ = (∫ r in Ioi (0 : ℝ), r * cexp (-b * (r : ℂ) ^ 2)) * ∫ θ in Ioo (-π) π, 1 :=\n    by\n    rw [← set_integral_prod_mul]\n    congr with p : 1\n    rw [mul_one]\n    congr\n    conv_rhs => rw [← one_mul ((p.1 : ℂ) ^ 2), ← sin_sq_add_cos_sq (p.2 : ℂ)]\n    ring\n  _ = ↑π / b := by\n    have : 0 ≤ π + π := by linarith [Real.pi_pos]\n    simp only [integral_const, Measure.restrict_apply', measurableSet_Ioo, univ_inter, volume_Ioo, sub_neg_eq_add,\n      ENNReal.toReal_ofReal, this]\n    rw [← two_mul, real_smul, mul_one, ofReal_mul, ofReal_ofNat, integral_mul_cexp_neg_mul_sq hb]\n    field_simp [(by contrapose! hb; rw [hb, zero_re] : b ≠ 0)]\n    ring\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ (∫ (x : ℝ), cexp (-b * ↑x ^ 2)) ^ 2 = ∫ (p : ℝ × ℝ), cexp (-b * ↑p.fst ^ 2) * cexp (-b * ↑p.snd ^ 2)\n[PROOFSTEP]\nrw [pow_two, ← integral_prod_mul]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ ∫ (z : ℝ × ℝ), cexp (-b * ↑z.fst ^ 2) * cexp (-b * ↑z.snd ^ 2) ∂Measure.prod volume volume =\n    ∫ (p : ℝ × ℝ), cexp (-b * ↑p.fst ^ 2) * cexp (-b * ↑p.snd ^ 2)\n[PROOFSTEP]\nrfl\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ ∫ (p : ℝ × ℝ), cexp (-b * ↑p.fst ^ 2) * cexp (-b * ↑p.snd ^ 2) = ∫ (p : ℝ × ℝ), cexp (-b * (↑p.fst ^ 2 + ↑p.snd ^ 2))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nb : ℂ\nhb : 0 < b.re\n⊢ (fun p => cexp (-b * ↑p.fst ^ 2) * cexp (-b * ↑p.snd ^ 2)) = fun p => cexp (-b * (↑p.fst ^ 2 + ↑p.snd ^ 2))\n[PROOFSTEP]\next1 p\n[GOAL]\ncase e_f.h\nb : ℂ\nhb : 0 < b.re\np : ℝ × ℝ\n⊢ cexp (-b * ↑p.fst ^ 2) * cexp (-b * ↑p.snd ^ 2) = cexp (-b * (↑p.fst ^ 2 + ↑p.snd ^ 2))\n[PROOFSTEP]\nrw [← Complex.exp_add, mul_add]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ ∫ (p : ℝ × ℝ), cexp (-b * (↑p.fst ^ 2 + ↑p.snd ^ 2)) =\n    ∫ (p : ℝ × ℝ) in polarCoord.target,\n      p.fst • cexp (-b * ((↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2))\n[PROOFSTEP]\nrw [← integral_comp_polarCoord_symm]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ ∫ (p : ℝ × ℝ) in polarCoord.target,\n      p.fst •\n        cexp\n          (-b * (↑(↑(LocalHomeomorph.symm polarCoord) p).fst ^ 2 + ↑(↑(LocalHomeomorph.symm polarCoord) p).snd ^ 2)) =\n    ∫ (p : ℝ × ℝ) in polarCoord.target,\n      p.fst • cexp (-b * ((↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2))\n[PROOFSTEP]\nsimp only [polarCoord_symm_apply, ofReal_mul, ofReal_cos, ofReal_sin]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ ∫ (p : ℝ × ℝ) in polarCoord.target,\n      p.fst • cexp (-b * ((↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2)) =\n    (∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2)) * ∫ (θ : ℝ) in Ioo (-π) π, 1\n[PROOFSTEP]\nrw [← set_integral_prod_mul]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ ∫ (p : ℝ × ℝ) in polarCoord.target,\n      p.fst • cexp (-b * ((↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2)) =\n    ∫ (z : ℝ × ℝ) in Ioi 0 ×ˢ Ioo (-π) π, ↑z.fst * cexp (-b * ↑z.fst ^ 2) * 1 ∂Measure.prod volume volume\n[PROOFSTEP]\ncongr with p : 1\n[GOAL]\ncase e_f.h\nb : ℂ\nhb : 0 < b.re\np : ℝ × ℝ\n⊢ p.fst • cexp (-b * ((↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2)) =\n    ↑p.fst * cexp (-b * ↑p.fst ^ 2) * 1\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase e_f.h\nb : ℂ\nhb : 0 < b.re\np : ℝ × ℝ\n⊢ p.fst • cexp (-b * ((↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2)) =\n    ↑p.fst * cexp (-b * ↑p.fst ^ 2)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f.h.e_a.e_z.e_a\nb : ℂ\nhb : 0 < b.re\np : ℝ × ℝ\n⊢ (↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2 = ↑p.fst ^ 2\n[PROOFSTEP]\nconv_rhs => rw [← one_mul ((p.1 : ℂ) ^ 2), ← sin_sq_add_cos_sq (p.2 : ℂ)]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\np : ℝ × ℝ\n| ↑p.fst ^ 2\n[PROOFSTEP]\nrw [← one_mul ((p.1 : ℂ) ^ 2), ← sin_sq_add_cos_sq (p.2 : ℂ)]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\np : ℝ × ℝ\n| ↑p.fst ^ 2\n[PROOFSTEP]\nrw [← one_mul ((p.1 : ℂ) ^ 2), ← sin_sq_add_cos_sq (p.2 : ℂ)]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\np : ℝ × ℝ\n| ↑p.fst ^ 2\n[PROOFSTEP]\nrw [← one_mul ((p.1 : ℂ) ^ 2), ← sin_sq_add_cos_sq (p.2 : ℂ)]\n[GOAL]\ncase e_f.h.e_a.e_z.e_a\nb : ℂ\nhb : 0 < b.re\np : ℝ × ℝ\n⊢ (↑p.fst * Complex.cos ↑p.snd) ^ 2 + (↑p.fst * Complex.sin ↑p.snd) ^ 2 =\n    (Complex.sin ↑p.snd ^ 2 + Complex.cos ↑p.snd ^ 2) * ↑p.fst ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ (∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2)) * ∫ (θ : ℝ) in Ioo (-π) π, 1 = ↑π / b\n[PROOFSTEP]\nhave : 0 ≤ π + π := by linarith [Real.pi_pos]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ 0 ≤ π + π\n[PROOFSTEP]\nlinarith [Real.pi_pos]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nthis : 0 ≤ π + π\n⊢ (∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2)) * ∫ (θ : ℝ) in Ioo (-π) π, 1 = ↑π / b\n[PROOFSTEP]\nsimp only [integral_const, Measure.restrict_apply', measurableSet_Ioo, univ_inter, volume_Ioo, sub_neg_eq_add,\n  ENNReal.toReal_ofReal, this]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nthis : 0 ≤ π + π\n⊢ (∫ (r : ℝ) in Ioi 0, ↑r * cexp (-b * ↑r ^ 2)) * (π + π) • 1 = ↑π / b\n[PROOFSTEP]\nrw [← two_mul, real_smul, mul_one, ofReal_mul, ofReal_ofNat, integral_mul_cexp_neg_mul_sq hb]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nthis : 0 ≤ π + π\n⊢ (2 * b)⁻¹ * (2 * ↑π) = ↑π / b\n[PROOFSTEP]\nfield_simp [(by contrapose! hb; rw [hb, zero_re] : b ≠ 0)]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nthis : 0 ≤ π + π\n⊢ b ≠ 0\n[PROOFSTEP]\ncontrapose! hb\n[GOAL]\nb : ℂ\nthis : 0 ≤ π + π\nhb : b = 0\n⊢ b.re ≤ 0\n[PROOFSTEP]\nrw [hb, zero_re]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nthis : 0 ≤ π + π\n⊢ 2 * ↑π * b = ↑π * (2 * b)\n[PROOFSTEP]\nring\n[GOAL]\nb : ℝ\n⊢ ∫ (x : ℝ), rexp (-b * x ^ 2) = sqrt (π / b)\n[PROOFSTEP]\nrcases le_or_lt b 0 with (hb | hb)\n[GOAL]\ncase inl\nb : ℝ\nhb : b ≤ 0\n⊢ ∫ (x : ℝ), rexp (-b * x ^ 2) = sqrt (π / b)\n[PROOFSTEP]\nrw [integral_undef, sqrt_eq_zero_of_nonpos]\n[GOAL]\ncase inl\nb : ℝ\nhb : b ≤ 0\n⊢ π / b ≤ 0\n[PROOFSTEP]\nexact div_nonpos_of_nonneg_of_nonpos pi_pos.le hb\n[GOAL]\ncase inl\nb : ℝ\nhb : b ≤ 0\n⊢ ¬Integrable fun x => rexp (-b * x ^ 2)\n[PROOFSTEP]\nsimpa only [not_lt, integrable_exp_neg_mul_sq_iff] using hb\n[GOAL]\ncase inr\nb : ℝ\nhb : 0 < b\n⊢ ∫ (x : ℝ), rexp (-b * x ^ 2) = sqrt (π / b)\n[PROOFSTEP]\nrefine' (sq_eq_sq _ (sqrt_nonneg _)).1 _\n[GOAL]\ncase inr.refine'_1\nb : ℝ\nhb : 0 < b\n⊢ 0 ≤ ∫ (x : ℝ), rexp (-b * x ^ 2)\n[PROOFSTEP]\nexact integral_nonneg fun x => (exp_pos _).le\n[GOAL]\ncase inr.refine'_2\nb : ℝ\nhb : 0 < b\n⊢ (∫ (x : ℝ), rexp (-b * x ^ 2)) ^ 2 = sqrt (π / b) ^ 2\n[PROOFSTEP]\nrw [← ofReal_inj, ofReal_pow, ← coe_algebraMap, IsROrC.algebraMap_eq_ofReal, ← integral_ofReal,\n  sq_sqrt (div_pos pi_pos hb).le, ← IsROrC.algebraMap_eq_ofReal, coe_algebraMap, ofReal_div]\n[GOAL]\ncase inr.refine'_2\nb : ℝ\nhb : 0 < b\n⊢ (∫ (a : ℝ), ↑(rexp (-b * a ^ 2))) ^ 2 = ↑π / ↑b\n[PROOFSTEP]\nconvert integral_gaussian_sq_complex (by rwa [ofReal_re] : 0 < (b : ℂ).re) with _ x\n[GOAL]\nb : ℝ\nhb : 0 < b\n⊢ 0 < (↑b).re\n[PROOFSTEP]\nrwa [ofReal_re]\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_7.h\nb : ℝ\nhb : 0 < b\nx : ℝ\n⊢ ↑(rexp (-b * x ^ 2)) = cexp (-↑b * ↑x ^ 2)\n[PROOFSTEP]\nrw [ofReal_exp, ofReal_mul, ofReal_pow, ofReal_neg]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b\n[PROOFSTEP]\nlet f : ℂ → ℝ → ℂ := fun (c : ℂ) (x : ℝ) => cexp (-c * (x : ℂ) ^ 2)\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nf : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)\n⊢ ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b\n[PROOFSTEP]\nobtain ⟨d, hd, hd'⟩ := exists_between hb\n[GOAL]\ncase intro.intro\nb : ℂ\nhb : 0 < b.re\nf : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)\nd : ℝ\nhd : 0 < d\nhd' : d < b.re\n⊢ ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b\n[PROOFSTEP]\nhave f_meas : ∀ c : ℂ, AEStronglyMeasurable (f c) volume := fun c =>\n  by\n  apply Continuous.aestronglyMeasurable\n  exact Complex.continuous_exp.comp (continuous_const.mul (continuous_ofReal.pow 2))\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nf : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)\nd : ℝ\nhd : 0 < d\nhd' : d < b.re\nc : ℂ\n⊢ AEStronglyMeasurable (f c) volume\n[PROOFSTEP]\napply Continuous.aestronglyMeasurable\n[GOAL]\ncase hf\nb : ℂ\nhb : 0 < b.re\nf : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)\nd : ℝ\nhd : 0 < d\nhd' : d < b.re\nc : ℂ\n⊢ Continuous (f c)\n[PROOFSTEP]\nexact Complex.continuous_exp.comp (continuous_const.mul (continuous_ofReal.pow 2))\n[GOAL]\ncase intro.intro\nb : ℂ\nhb : 0 < b.re\nf : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)\nd : ℝ\nhd : 0 < d\nhd' : d < b.re\nf_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume\n⊢ ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b\n[PROOFSTEP]\nhave f_cts : ∀ x : ℝ, ContinuousAt (fun c => f c x) b := fun x =>\n  (Complex.continuous_exp.comp (continuous_id'.neg.mul continuous_const)).continuousAt\n[GOAL]\ncase intro.intro\nb : ℂ\nhb : 0 < b.re\nf : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)\nd : ℝ\nhd : 0 < d\nhd' : d < b.re\nf_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume\nf_cts : ∀ (x : ℝ), ContinuousAt (fun c => f c x) b\n⊢ ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b\n[PROOFSTEP]\nhave f_le_bd : ∀ᶠ c : ℂ in 𝓝 b, ∀ᵐ x : ℝ, ‖f c x‖ ≤ exp (-d * x ^ 2) :=\n  by\n  refine' eventually_of_mem ((continuous_re.isOpen_preimage _ isOpen_Ioi).mem_nhds hd') _\n  refine' fun c hc => ae_of_all _ fun x => _\n  rw [norm_cexp_neg_mul_sq, exp_le_exp]\n  exact mul_le_mul_of_nonneg_right (neg_le_neg (le_of_lt hc)) (sq_nonneg _)\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nf : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)\nd : ℝ\nhd : 0 < d\nhd' : d < b.re\nf_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume\nf_cts : ∀ (x : ℝ), ContinuousAt (fun c => f c x) b\n⊢ ∀ᶠ (c : ℂ) in 𝓝 b, ∀ᵐ (x : ℝ), ‖f c x‖ ≤ rexp (-d * x ^ 2)\n[PROOFSTEP]\nrefine' eventually_of_mem ((continuous_re.isOpen_preimage _ isOpen_Ioi).mem_nhds hd') _\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nf : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)\nd : ℝ\nhd : 0 < d\nhd' : d < b.re\nf_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume\nf_cts : ∀ (x : ℝ), ContinuousAt (fun c => f c x) b\n⊢ ∀ (x : ℂ), x ∈ re ⁻¹' Ioi d → ∀ᵐ (x_1 : ℝ), ‖f x x_1‖ ≤ rexp (-d * x_1 ^ 2)\n[PROOFSTEP]\nrefine' fun c hc => ae_of_all _ fun x => _\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nf : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)\nd : ℝ\nhd : 0 < d\nhd' : d < b.re\nf_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume\nf_cts : ∀ (x : ℝ), ContinuousAt (fun c => f c x) b\nc : ℂ\nhc : c ∈ re ⁻¹' Ioi d\nx : ℝ\n⊢ ‖f c x‖ ≤ rexp (-d * x ^ 2)\n[PROOFSTEP]\nrw [norm_cexp_neg_mul_sq, exp_le_exp]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nf : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)\nd : ℝ\nhd : 0 < d\nhd' : d < b.re\nf_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume\nf_cts : ∀ (x : ℝ), ContinuousAt (fun c => f c x) b\nc : ℂ\nhc : c ∈ re ⁻¹' Ioi d\nx : ℝ\n⊢ -c.re * x ^ 2 ≤ -d * x ^ 2\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right (neg_le_neg (le_of_lt hc)) (sq_nonneg _)\n[GOAL]\ncase intro.intro\nb : ℂ\nhb : 0 < b.re\nf : ℂ → ℝ → ℂ := fun c x => cexp (-c * ↑x ^ 2)\nd : ℝ\nhd : 0 < d\nhd' : d < b.re\nf_meas : ∀ (c : ℂ), AEStronglyMeasurable (f c) volume\nf_cts : ∀ (x : ℝ), ContinuousAt (fun c => f c x) b\nf_le_bd : ∀ᶠ (c : ℂ) in 𝓝 b, ∀ᵐ (x : ℝ), ‖f c x‖ ≤ rexp (-d * x ^ 2)\n⊢ ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b\n[PROOFSTEP]\nexact continuousAt_of_dominated (eventually_of_forall f_meas) f_le_bd (integrable_exp_neg_mul_sq hd) (ae_of_all _ f_cts)\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ ∫ (x : ℝ), cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\n[PROOFSTEP]\nhave nv : ∀ {b : ℂ}, 0 < re b → b ≠ 0 := by intro b hb; contrapose! hb; rw [hb]; simp\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ ∀ {b : ℂ}, 0 < b.re → b ≠ 0\n[PROOFSTEP]\nintro b hb\n[GOAL]\nb✝ : ℂ\nhb✝ : 0 < b✝.re\nb : ℂ\nhb : 0 < b.re\n⊢ b ≠ 0\n[PROOFSTEP]\ncontrapose! hb\n[GOAL]\nb✝ : ℂ\nhb✝ : 0 < b✝.re\nb : ℂ\nhb : b = 0\n⊢ b.re ≤ 0\n[PROOFSTEP]\nrw [hb]\n[GOAL]\nb✝ : ℂ\nhb✝ : 0 < b✝.re\nb : ℂ\nhb : b = 0\n⊢ 0.re ≤ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\n⊢ ∫ (x : ℝ), cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\n[PROOFSTEP]\napply\n  (convex_halfspace_re_gt 0).isPreconnected.eq_of_sq_eq ?_ ?_ (fun c hc => ?_) (fun {c} hc => ?_)\n    (by simp : 0 < re (1 : ℂ)) ?_ hb\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\n⊢ 0 < 1.re\n[PROOFSTEP]\nsimp\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\n⊢ ContinuousOn (fun {b} => ∫ (x : ℝ), cexp (-b * ↑x ^ 2)) {c | 0 < c.re}\n[PROOFSTEP]\nexact ContinuousAt.continuousOn continuousAt_gaussian_integral\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\n⊢ ContinuousOn (fun {b} => (↑π / b) ^ (1 / 2)) {c | 0 < c.re}\n[PROOFSTEP]\nrefine'\n  ContinuousAt.continuousOn fun b hb =>\n    (continuousAt_cpow_const (Or.inl _)).comp (continuousAt_const.div continuousAt_id (nv hb))\n[GOAL]\nb✝ : ℂ\nhb✝ : 0 < b✝.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nb : ℂ\nhb : b ∈ {c | 0 < c.re}\n⊢ 0 < (↑π / b).re\n[PROOFSTEP]\nrw [div_re, ofReal_im, ofReal_re, zero_mul, zero_div, add_zero]\n[GOAL]\nb✝ : ℂ\nhb✝ : 0 < b✝.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nb : ℂ\nhb : b ∈ {c | 0 < c.re}\n⊢ 0 < π * b.re / ↑normSq b\n[PROOFSTEP]\nexact div_pos (mul_pos pi_pos hb) (normSq_pos.mpr (nv hb))\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\n⊢ ∫ (x : ℝ), cexp (-1 * ↑x ^ 2) = (↑π / 1) ^ (1 / 2)\n[PROOFSTEP]\nhave : ∀ x : ℝ, cexp (-(1 : ℂ) * (x : ℂ) ^ 2) = exp (-(1 : ℝ) * x ^ 2) :=\n  by\n  intro x\n  simp only [ofReal_exp, neg_mul, one_mul, ofReal_neg, ofReal_pow]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\n⊢ ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n[PROOFSTEP]\nintro x\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nx : ℝ\n⊢ cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n[PROOFSTEP]\nsimp only [ofReal_exp, neg_mul, one_mul, ofReal_neg, ofReal_pow]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n⊢ ∫ (x : ℝ), cexp (-1 * ↑x ^ 2) = (↑π / 1) ^ (1 / 2)\n[PROOFSTEP]\nsimp_rw [this, ← coe_algebraMap, IsROrC.algebraMap_eq_ofReal, integral_ofReal, ← IsROrC.algebraMap_eq_ofReal,\n  coe_algebraMap]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n⊢ ↑(∫ (a : ℝ), rexp (-1 * a ^ 2)) = (↑π / 1) ^ (1 / 2)\n[PROOFSTEP]\nconv_rhs =>\n  congr\n  ·rw [← ofReal_one, ← ofReal_div]\n  ·rw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n| (↑π / 1) ^ (1 / 2)\n[PROOFSTEP]\n  congr\n  ·rw [← ofReal_one, ← ofReal_div]\n  ·rw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n| (↑π / 1) ^ (1 / 2)\n[PROOFSTEP]\n  congr\n  ·rw [← ofReal_one, ← ofReal_div]\n  ·rw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n| (↑π / 1) ^ (1 / 2)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n| ↑π / 1\ncase a\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n| 1 / 2\n[PROOFSTEP]\n·rw [← ofReal_one, ← ofReal_div]\n[GOAL]\ncase a\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n| ↑π / 1\n[PROOFSTEP]\nrw [← ofReal_one, ← ofReal_div]\n[GOAL]\ncase a\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n| ↑π / 1\n[PROOFSTEP]\nrw [← ofReal_one, ← ofReal_div]\n[GOAL]\ncase a\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n| ↑π / 1\n[PROOFSTEP]\nrw [← ofReal_one, ← ofReal_div]\n[GOAL]\ncase a\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n| 1 / 2\n[PROOFSTEP]\n·rw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]\n[GOAL]\ncase a\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n| 1 / 2\n[PROOFSTEP]\nrw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]\n[GOAL]\ncase a\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n| 1 / 2\n[PROOFSTEP]\nrw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]\n[GOAL]\ncase a\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n| 1 / 2\n[PROOFSTEP]\nrw [← ofReal_one, ← ofReal_ofNat, ← ofReal_div]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n⊢ ↑(∫ (a : ℝ), rexp (-1 * a ^ 2)) = ↑(π / 1) ^ ↑(1 / 2)\n[PROOFSTEP]\nrw [← ofReal_cpow, ofReal_inj]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n⊢ ∫ (a : ℝ), rexp (-1 * a ^ 2) = (π / 1) ^ (1 / 2)\ncase hx\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n⊢ 0 ≤ π / 1\n[PROOFSTEP]\nconvert integral_gaussian (1 : ℝ) using 1\n[GOAL]\ncase h.e'_3\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n⊢ (π / 1) ^ (1 / 2) = sqrt (π / 1)\n[PROOFSTEP]\nrw [sqrt_eq_rpow]\n[GOAL]\ncase hx\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n⊢ 0 ≤ π / 1\n[PROOFSTEP]\nrw [div_one]\n[GOAL]\ncase hx\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nthis : ∀ (x : ℝ), cexp (-1 * ↑x ^ 2) = ↑(rexp (-1 * x ^ 2))\n⊢ 0 ≤ π\n[PROOFSTEP]\nexact pi_pos.le\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nc : ℂ\nhc : c ∈ {c | 0 < c.re}\n⊢ ((fun {b} => ∫ (x : ℝ), cexp (-b * ↑x ^ 2)) ^ 2) c = ((fun {b} => (↑π / b) ^ (1 / 2)) ^ 2) c\n[PROOFSTEP]\ndsimp only [Pi.pow_apply]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nc : ℂ\nhc : c ∈ {c | 0 < c.re}\n⊢ (∫ (x : ℝ), cexp (-c * ↑x ^ 2)) ^ 2 = ((↑π / c) ^ (1 / 2)) ^ 2\n[PROOFSTEP]\nrw [integral_gaussian_sq_complex hc, sq]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nc : ℂ\nhc : c ∈ {c | 0 < c.re}\n⊢ ↑π / c = (↑π / c) ^ (1 / 2) * (↑π / c) ^ (1 / 2)\n[PROOFSTEP]\nconv_lhs => rw [← cpow_one (↑π / c)]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nc : ℂ\nhc : c ∈ {c | 0 < c.re}\n| ↑π / c\n[PROOFSTEP]\nrw [← cpow_one (↑π / c)]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nc : ℂ\nhc : c ∈ {c | 0 < c.re}\n| ↑π / c\n[PROOFSTEP]\nrw [← cpow_one (↑π / c)]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nc : ℂ\nhc : c ∈ {c | 0 < c.re}\n| ↑π / c\n[PROOFSTEP]\nrw [← cpow_one (↑π / c)]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nc : ℂ\nhc : c ∈ {c | 0 < c.re}\n⊢ (↑π / c) ^ 1 = (↑π / c) ^ (1 / 2) * (↑π / c) ^ (1 / 2)\n[PROOFSTEP]\nrw [← cpow_add _ _ (div_ne_zero (ofReal_ne_zero.mpr pi_ne_zero) (nv hc))]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nc : ℂ\nhc : c ∈ {c | 0 < c.re}\n⊢ (↑π / c) ^ 1 = (↑π / c) ^ (1 / 2 + 1 / 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nc : ℂ\nhc : c ∈ {c | 0 < c.re}\n⊢ (↑π / c) ^ (1 / 2) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, cpow_eq_zero_iff, not_and_or]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nnv : ∀ {b : ℂ}, 0 < b.re → b ≠ 0\nc : ℂ\nhc : c ∈ {c | 0 < c.re}\n⊢ ¬↑π / c = 0 ∨ ¬1 / 2 ≠ 0\n[PROOFSTEP]\nexact Or.inl (div_ne_zero (ofReal_ne_zero.mpr pi_ne_zero) (nv hc))\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2\n[PROOFSTEP]\nhave full_integral := integral_gaussian_complex hb\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : ∫ (x : ℝ), cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\n⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2\n[PROOFSTEP]\nhave : MeasurableSet (Ioi (0 : ℝ)) := measurableSet_Ioi\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : ∫ (x : ℝ), cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis : MeasurableSet (Ioi 0)\n⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2\n[PROOFSTEP]\nrw [← integral_add_compl this (integrable_cexp_neg_mul_sq hb), compl_Ioi] at full_integral \n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis : MeasurableSet (Ioi 0)\n⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2\n[PROOFSTEP]\nsuffices ∫ x : ℝ in Iic 0, cexp (-b * (x : ℂ) ^ 2) = ∫ x : ℝ in Ioi 0, cexp (-b * (x : ℂ) ^ 2)\n  by\n  rw [this, ← mul_two] at full_integral \n  rwa [eq_div_iff]; exact two_ne_zero\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis✝ : MeasurableSet (Ioi 0)\nthis : ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)\n⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2\n[PROOFSTEP]\nrw [this, ← mul_two] at full_integral \n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) * 2 = (↑π / b) ^ (1 / 2)\nthis✝ : MeasurableSet (Ioi 0)\nthis : ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)\n⊢ ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2) / 2\n[PROOFSTEP]\nrwa [eq_div_iff]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) * 2 = (↑π / b) ^ (1 / 2)\nthis✝ : MeasurableSet (Ioi 0)\nthis : ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)\n⊢ 2 ≠ 0\n[PROOFSTEP]\nexact two_ne_zero\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis : MeasurableSet (Ioi 0)\n⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)\n[PROOFSTEP]\nhave : ∀ c : ℝ, ∫ x in (0 : ℝ)..c, cexp (-b * (x : ℂ) ^ 2) = ∫ x in -c..0, cexp (-b * (x : ℂ) ^ 2) :=\n  by\n  intro c\n  have := intervalIntegral.integral_comp_sub_left (a := 0) (b := c) (fun x => cexp (-b * (x : ℂ) ^ 2)) 0\n  simpa [zero_sub, neg_sq, neg_zero] using this\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis : MeasurableSet (Ioi 0)\n⊢ ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)\n[PROOFSTEP]\nintro c\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis : MeasurableSet (Ioi 0)\nc : ℝ\n⊢ ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)\n[PROOFSTEP]\nhave := intervalIntegral.integral_comp_sub_left (a := 0) (b := c) (fun x => cexp (-b * (x : ℂ) ^ 2)) 0\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis✝ : MeasurableSet (Ioi 0)\nc : ℝ\nthis : ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑(0 - x) ^ 2) = ∫ (x : ℝ) in 0 - c..0 - 0, cexp (-b * ↑x ^ 2)\n⊢ ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)\n[PROOFSTEP]\nsimpa [zero_sub, neg_sq, neg_zero] using this\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis✝ : MeasurableSet (Ioi 0)\nthis : ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)\n⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)\n[PROOFSTEP]\nhave t1 := intervalIntegral_tendsto_integral_Ioi 0 (integrable_cexp_neg_mul_sq hb).integrableOn tendsto_id\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis✝ : MeasurableSet (Ioi 0)\nthis : ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)\nt1 : Tendsto (fun i => ∫ (x : ℝ) in 0 ..id i, cexp (-b * ↑x ^ 2)) atTop (𝓝 (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)))\n⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)\n[PROOFSTEP]\nhave t2 :\n  Tendsto (fun c : ℝ => ∫ x : ℝ in (0 : ℝ)..c, cexp (-b * (x : ℂ) ^ 2)) atTop\n    (𝓝 (∫ x : ℝ in Iic 0, cexp (-b * (x : ℂ) ^ 2))) :=\n  by\n  simp_rw [this]\n  refine' intervalIntegral_tendsto_integral_Iic _ _ tendsto_neg_atTop_atBot\n  apply (integrable_cexp_neg_mul_sq hb).integrableOn\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis✝ : MeasurableSet (Ioi 0)\nthis : ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)\nt1 : Tendsto (fun i => ∫ (x : ℝ) in 0 ..id i, cexp (-b * ↑x ^ 2)) atTop (𝓝 (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)))\n⊢ Tendsto (fun c => ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2)) atTop (𝓝 (∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2)))\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis✝ : MeasurableSet (Ioi 0)\nthis : ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)\nt1 : Tendsto (fun i => ∫ (x : ℝ) in 0 ..id i, cexp (-b * ↑x ^ 2)) atTop (𝓝 (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)))\n⊢ Tendsto (fun c => ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)) atTop (𝓝 (∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2)))\n[PROOFSTEP]\nrefine' intervalIntegral_tendsto_integral_Iic _ _ tendsto_neg_atTop_atBot\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis✝ : MeasurableSet (Ioi 0)\nthis : ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)\nt1 : Tendsto (fun i => ∫ (x : ℝ) in 0 ..id i, cexp (-b * ↑x ^ 2)) atTop (𝓝 (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)))\n⊢ IntegrableOn (fun x => cexp (-b * ↑x ^ 2)) (Iic 0)\n[PROOFSTEP]\napply (integrable_cexp_neg_mul_sq hb).integrableOn\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nfull_integral : (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)) + ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = (↑π / b) ^ (1 / 2)\nthis✝ : MeasurableSet (Ioi 0)\nthis : ∀ (c : ℝ), ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in -c..0, cexp (-b * ↑x ^ 2)\nt1 : Tendsto (fun i => ∫ (x : ℝ) in 0 ..id i, cexp (-b * ↑x ^ 2)) atTop (𝓝 (∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)))\nt2 : Tendsto (fun c => ∫ (x : ℝ) in 0 ..c, cexp (-b * ↑x ^ 2)) atTop (𝓝 (∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2)))\n⊢ ∫ (x : ℝ) in Iic 0, cexp (-b * ↑x ^ 2) = ∫ (x : ℝ) in Ioi 0, cexp (-b * ↑x ^ 2)\n[PROOFSTEP]\nexact tendsto_nhds_unique t2 t1\n[GOAL]\nb : ℝ\n⊢ ∫ (x : ℝ) in Ioi 0, rexp (-b * x ^ 2) = sqrt (π / b) / 2\n[PROOFSTEP]\nrcases le_or_lt b 0 with (hb | hb)\n[GOAL]\ncase inl\nb : ℝ\nhb : b ≤ 0\n⊢ ∫ (x : ℝ) in Ioi 0, rexp (-b * x ^ 2) = sqrt (π / b) / 2\n[PROOFSTEP]\nrw [integral_undef, sqrt_eq_zero_of_nonpos, zero_div]\n[GOAL]\ncase inl\nb : ℝ\nhb : b ≤ 0\n⊢ π / b ≤ 0\ncase inl b : ℝ hb : b ≤ 0 ⊢ ¬Integrable fun x => rexp (-b * x ^ 2)\n[PROOFSTEP]\nexact div_nonpos_of_nonneg_of_nonpos pi_pos.le hb\n[GOAL]\ncase inl\nb : ℝ\nhb : b ≤ 0\n⊢ ¬Integrable fun x => rexp (-b * x ^ 2)\n[PROOFSTEP]\nrwa [← IntegrableOn, integrableOn_Ioi_exp_neg_mul_sq_iff, not_lt]\n[GOAL]\ncase inr\nb : ℝ\nhb : 0 < b\n⊢ ∫ (x : ℝ) in Ioi 0, rexp (-b * x ^ 2) = sqrt (π / b) / 2\n[PROOFSTEP]\nrw [← IsROrC.ofReal_inj (K := ℂ), ← integral_ofReal, ← IsROrC.algebraMap_eq_ofReal, coe_algebraMap]\n[GOAL]\ncase inr\nb : ℝ\nhb : 0 < b\n⊢ ∫ (a : ℝ) in Ioi 0, ↑(rexp (-b * a ^ 2)) = ↑(sqrt (π / b) / 2)\n[PROOFSTEP]\nconvert integral_gaussian_complex_Ioi (by rwa [ofReal_re] : 0 < (b : ℂ).re)\n[GOAL]\nb : ℝ\nhb : 0 < b\n⊢ 0 < (↑b).re\n[PROOFSTEP]\nrwa [ofReal_re]\n[GOAL]\ncase h.e'_2.h.e'_7.h\nb : ℝ\nhb : 0 < b\nx✝ : ℝ\n⊢ ↑(rexp (-b * x✝ ^ 2)) = cexp (-↑b * ↑x✝ ^ 2)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nb : ℝ\nhb : 0 < b\n⊢ ↑(sqrt (π / b) / 2) = (↑π / ↑b) ^ (1 / 2) / 2\n[PROOFSTEP]\nrw [sqrt_eq_rpow, ← ofReal_div, ofReal_div, ofReal_cpow]\n[GOAL]\ncase h.e'_3\nb : ℝ\nhb : 0 < b\n⊢ ↑(π / b) ^ ↑(1 / 2) / ↑2 = ↑(π / b) ^ (1 / 2) / 2\ncase h.e'_3.hx b : ℝ hb : 0 < b ⊢ 0 ≤ π / b\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_3.hx\nb : ℝ\nhb : 0 < b\n⊢ 0 ≤ π / b\n[PROOFSTEP]\nexact (div_pos pi_pos hb).le\n[GOAL]\n⊢ Gamma (1 / 2) = sqrt π\n[PROOFSTEP]\nrw [Gamma_eq_integral one_half_pos, ← integral_comp_rpow_Ioi_of_pos zero_lt_two]\n[GOAL]\n⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = sqrt π\n[PROOFSTEP]\nconvert congr_arg (fun x : ℝ => 2 * x) (integral_gaussian_Ioi 1) using 1\n[GOAL]\ncase h.e'_2\n⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) =\n    2 * ∫ (x : ℝ) in Ioi 0, rexp (-1 * x ^ 2)\n[PROOFSTEP]\nrw [← integral_mul_left]\n[GOAL]\ncase h.e'_2\n⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) =\n    ∫ (a : ℝ) in Ioi 0, 2 * rexp (-1 * a ^ 2)\n[PROOFSTEP]\nrefine' set_integral_congr measurableSet_Ioi fun x hx => _\n[GOAL]\ncase h.e'_2\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = 2 * rexp (-1 * x ^ 2)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h.e'_2\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = 2 * rexp (-1 * x ^ 2)\n[PROOFSTEP]\nhave : (x ^ (2 : ℝ)) ^ (1 / (2 : ℝ) - 1) = x⁻¹ :=\n  by\n  rw [← rpow_mul (le_of_lt hx)]\n  norm_num\n  rw [rpow_neg (le_of_lt hx), rpow_one]\n[GOAL]\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ (x ^ 2) ^ (1 / 2 - 1) = x⁻¹\n[PROOFSTEP]\nrw [← rpow_mul (le_of_lt hx)]\n[GOAL]\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ x ^ (2 * (1 / 2 - 1)) = x⁻¹\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ x ^ (-1) = x⁻¹\n[PROOFSTEP]\nrw [rpow_neg (le_of_lt hx), rpow_one]\n[GOAL]\ncase h.e'_2\nx : ℝ\nhx : x ∈ Ioi 0\nthis : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹\n⊢ (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = 2 * rexp (-1 * x ^ 2)\n[PROOFSTEP]\nrw [smul_eq_mul, this]\n[GOAL]\ncase h.e'_2\nx : ℝ\nhx : x ∈ Ioi 0\nthis : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹\n⊢ 2 * x ^ (2 - 1) * (rexp (-x ^ 2) * x⁻¹) = 2 * rexp (-1 * x ^ 2)\n[PROOFSTEP]\nfield_simp [(ne_of_lt (show 0 < x from hx)).symm]\n[GOAL]\ncase h.e'_2\nx : ℝ\nhx : x ∈ Ioi 0\nthis : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹\n⊢ 2 * x ^ (2 - 1) * rexp (-x ^ 2) = 2 * rexp (-x ^ 2) * x\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_2\nx : ℝ\nhx : x ∈ Ioi 0\nthis : (x ^ 2) ^ (1 / 2 - 1) = x⁻¹\n⊢ 2 * x * rexp (-x ^ 2) = 2 * rexp (-x ^ 2) * x\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_3\n⊢ sqrt π = 2 * (sqrt (π / 1) / 2)\n[PROOFSTEP]\nrw [div_one, ← mul_div_assoc, mul_comm, mul_div_cancel _ (two_ne_zero' ℝ)]\n[GOAL]\n⊢ Gamma (1 / 2) = ↑π ^ (1 / 2)\n[PROOFSTEP]\nconvert congr_arg ((↑) : ℝ → ℂ) Real.Gamma_one_half_eq\n[GOAL]\ncase h.e'_2\n⊢ Gamma (1 / 2) = ↑(Real.Gamma (1 / 2))\n[PROOFSTEP]\nsimpa only [one_div, ofReal_inv, ofReal_ofNat] using Gamma_ofReal (1 / 2)\n[GOAL]\ncase h.e'_3\n⊢ ↑π ^ (1 / 2) = ↑(sqrt π)\n[PROOFSTEP]\nrw [sqrt_eq_rpow, ofReal_cpow pi_pos.le, ofReal_div, ofReal_ofNat, ofReal_one]\n[GOAL]\nb✝ b : ℂ\nc T : ℝ\n⊢ ‖cexp (-b * (↑T + ↑c * I) ^ 2)‖ = rexp (-(b.re * T ^ 2 - ↑2 * b.im * c * T - b.re * c ^ 2))\n[PROOFSTEP]\nrw [Complex.norm_eq_abs, Complex.abs_exp, neg_mul, neg_re, ← re_add_im b]\n[GOAL]\nb✝ b : ℂ\nc T : ℝ\n⊢ rexp (-((↑b.re + ↑b.im * I) * (↑T + ↑c * I) ^ 2).re) =\n    rexp (-((↑b.re + ↑b.im * I).re * T ^ 2 - ↑2 * (↑b.re + ↑b.im * I).im * c * T - (↑b.re + ↑b.im * I).re * c ^ 2))\n[PROOFSTEP]\nsimp only [sq, re_add_im, mul_re, mul_im, add_re, add_im, ofReal_re, ofReal_im, I_re, I_im]\n[GOAL]\nb✝ b : ℂ\nc T : ℝ\n⊢ rexp\n      (-(b.re * ((T + (c * 0 - 0 * 1)) * (T + (c * 0 - 0 * 1)) - (0 + (c * 1 + 0 * 0)) * (0 + (c * 1 + 0 * 0))) -\n          b.im * ((T + (c * 0 - 0 * 1)) * (0 + (c * 1 + 0 * 0)) + (0 + (c * 1 + 0 * 0)) * (T + (c * 0 - 0 * 1))))) =\n    rexp (-(b.re * (T * T) - ↑2 * b.im * c * T - b.re * (c * c)))\n[PROOFSTEP]\nring_nf\n[GOAL]\nb : ℂ\nhb : b.re ≠ 0\nc T : ℝ\n⊢ ‖cexp (-b * (↑T + ↑c * I) ^ 2)‖ = rexp (-(b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re)))\n[PROOFSTEP]\nhave :\n  b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2 =\n    b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re) :=\n  by field_simp; ring\n[GOAL]\nb : ℂ\nhb : b.re ≠ 0\nc T : ℝ\n⊢ b.re * T ^ 2 - ↑2 * b.im * c * T - b.re * c ^ 2 = b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re)\n[PROOFSTEP]\nfield_simp\n[GOAL]\nb : ℂ\nhb : b.re ≠ 0\nc T : ℝ\n⊢ (b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2) * (b.re ^ 2 * b.re) =\n    b.re * (T * b.re - b.im * c) ^ 2 * b.re - b.re ^ 2 * (c ^ 2 * (b.im ^ 2 + b.re * b.re))\n[PROOFSTEP]\nring\n[GOAL]\nb : ℂ\nhb : b.re ≠ 0\nc T : ℝ\nthis :\n  b.re * T ^ 2 - ↑2 * b.im * c * T - b.re * c ^ 2 = b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re)\n⊢ ‖cexp (-b * (↑T + ↑c * I) ^ 2)‖ = rexp (-(b.re * (T - b.im * c / b.re) ^ 2 - c ^ 2 * (b.im ^ 2 / b.re + b.re)))\n[PROOFSTEP]\nrw [norm_cexp_neg_mul_sq_add_mul_I, this]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\n⊢ ‖verticalIntegral b c T‖ ≤ 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nhave vert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (T + y * I) ^ 2)‖ ≤ exp (-(b.re * T ^ 2 - (2 : ℝ) * |b.im| * |c| * T - b.re * c ^ 2)) :=\n  by\n  intro T hT c y hy\n  rw [norm_cexp_neg_mul_sq_add_mul_I b, exp_le_exp, neg_le_neg_iff]\n  refine' sub_le_sub (sub_le_sub (le_refl _) (mul_le_mul_of_nonneg_right _ hT)) _\n  · (conv_lhs => rw [mul_assoc]); (conv_rhs => rw [mul_assoc])\n    refine' mul_le_mul_of_nonneg_left ((le_abs_self _).trans _) zero_le_two\n    rw [abs_mul]\n    exact mul_le_mul_of_nonneg_left hy (abs_nonneg _)\n  · refine' mul_le_mul_of_nonneg_left _ hb.le\n    rwa [sq_le_sq]\n      -- now main proof\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\n⊢ ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nintro T hT c y hy\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n⊢ ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nrw [norm_cexp_neg_mul_sq_add_mul_I b, exp_le_exp, neg_le_neg_iff]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n⊢ b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2 ≤ b.re * T ^ 2 - ↑2 * b.im * y * T - b.re * y ^ 2\n[PROOFSTEP]\nrefine' sub_le_sub (sub_le_sub (le_refl _) (mul_le_mul_of_nonneg_right _ hT)) _\n[GOAL]\ncase refine'_1\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n⊢ ↑2 * b.im * y ≤ 2 * |b.im| * |c|\n[PROOFSTEP]\nconv_lhs => rw [mul_assoc]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n| ↑2 * b.im * y\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n| ↑2 * b.im * y\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n| ↑2 * b.im * y\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\ncase refine'_1\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n⊢ ↑2 * (b.im * y) ≤ 2 * |b.im| * |c|\n[PROOFSTEP]\nconv_rhs => rw [mul_assoc]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n| 2 * |b.im| * |c|\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n| 2 * |b.im| * |c|\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n| 2 * |b.im| * |c|\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\ncase refine'_1\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n⊢ ↑2 * (b.im * y) ≤ 2 * (|b.im| * |c|)\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left ((le_abs_self _).trans _) zero_le_two\n[GOAL]\ncase refine'_1\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n⊢ |b.im * y| ≤ |b.im| * |c|\n[PROOFSTEP]\nrw [abs_mul]\n[GOAL]\ncase refine'_1\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n⊢ |b.im| * |y| ≤ |b.im| * |c|\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left hy (abs_nonneg _)\n[GOAL]\ncase refine'_2\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n⊢ b.re * y ^ 2 ≤ b.re * c ^ 2\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left _ hb.le\n[GOAL]\ncase refine'_2\nb : ℂ\nhb : 0 < b.re\nc✝ T✝ : ℝ\nhT✝ : 0 ≤ T✝\nT : ℝ\nhT : 0 ≤ T\nc y : ℝ\nhy : |y| ≤ |c|\n⊢ y ^ 2 ≤ c ^ 2\n[PROOFSTEP]\nrwa [sq_le_sq]\n  -- now main proof\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n⊢ ‖verticalIntegral b c T‖ ≤ 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nrefine' (intervalIntegral.norm_integral_le_of_norm_le_const _).trans _\n[GOAL]\ncase refine'_1\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n⊢ ℝ\ncase refine'_2\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n⊢ ∀ (x : ℝ), x ∈ Ι 0 c → ‖I * (cexp (-b * (↑T + ↑x * I) ^ 2) - cexp (-b * (↑T - ↑x * I) ^ 2))‖ ≤ ?refine'_1\ncase refine'_3\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n⊢ ?refine'_1 * |c - 0| ≤ 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\npick_goal 3\n[GOAL]\ncase refine'_3\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n⊢ ?refine'_1 * |c - 0| ≤ 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nrw [sub_zero]\n[GOAL]\ncase refine'_3\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n⊢ ?refine'_1 * |c| ≤ 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ncase refine'_1\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n⊢ ℝ\n[PROOFSTEP]\nconv_lhs => simp only [mul_comm _ |c|]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n| ?refine'_1 * |c|\n[PROOFSTEP]\nsimp only [mul_comm _ |c|]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n| ?refine'_1 * |c|\n[PROOFSTEP]\nsimp only [mul_comm _ |c|]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n| ?refine'_1 * |c|\n[PROOFSTEP]\nsimp only [mul_comm _ |c|]\n[GOAL]\ncase refine'_3\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n⊢ |c| * ?refine'_1 ≤ 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ncase refine'_1\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n⊢ ℝ\n[PROOFSTEP]\nconv_rhs =>\n  conv =>\n    congr\n    rw [mul_comm]\n  rw [mul_assoc]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n| 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\n  conv =>\n    congr\n    rw [mul_comm]\n  rw [mul_assoc]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n| 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\n  conv =>\n    congr\n    rw [mul_comm]\n  rw [mul_assoc]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n| 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nconv =>\n  congr\n  rw [mul_comm]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n| 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\n  congr\n  rw [mul_comm]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n| 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n| 2 * |c|\ncase a\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n| rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n| |c| * 2 * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\ncase refine'_2\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n⊢ ∀ (x : ℝ),\n    x ∈ Ι 0 c →\n      ‖I * (cexp (-b * (↑T + ↑x * I) ^ 2) - cexp (-b * (↑T - ↑x * I) ^ 2))‖ ≤\n        2 * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase refine'_2\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ny : ℝ\nhy : y ∈ Ι 0 c\n⊢ ‖I * (cexp (-b * (↑T + ↑y * I) ^ 2) - cexp (-b * (↑T - ↑y * I) ^ 2))‖ ≤\n    2 * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nhave absy : |y| ≤ |c| := by\n  rcases le_or_lt 0 c with (h | h)\n  · rw [uIoc_of_le h] at hy \n    rw [abs_of_nonneg h, abs_of_pos hy.1]\n    exact hy.2\n  · rw [uIoc_of_lt h] at hy \n    rw [abs_of_neg h, abs_of_nonpos hy.2, neg_le_neg_iff]\n    exact hy.1.le\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ny : ℝ\nhy : y ∈ Ι 0 c\n⊢ |y| ≤ |c|\n[PROOFSTEP]\nrcases le_or_lt 0 c with (h | h)\n[GOAL]\ncase inl\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ny : ℝ\nhy : y ∈ Ι 0 c\nh : 0 ≤ c\n⊢ |y| ≤ |c|\n[PROOFSTEP]\nrw [uIoc_of_le h] at hy \n[GOAL]\ncase inl\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ny : ℝ\nhy : y ∈ Ioc 0 c\nh : 0 ≤ c\n⊢ |y| ≤ |c|\n[PROOFSTEP]\nrw [abs_of_nonneg h, abs_of_pos hy.1]\n[GOAL]\ncase inl\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ny : ℝ\nhy : y ∈ Ioc 0 c\nh : 0 ≤ c\n⊢ y ≤ c\n[PROOFSTEP]\nexact hy.2\n[GOAL]\ncase inr\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ny : ℝ\nhy : y ∈ Ι 0 c\nh : c < 0\n⊢ |y| ≤ |c|\n[PROOFSTEP]\nrw [uIoc_of_lt h] at hy \n[GOAL]\ncase inr\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ny : ℝ\nhy : y ∈ Ioc c 0\nh : c < 0\n⊢ |y| ≤ |c|\n[PROOFSTEP]\nrw [abs_of_neg h, abs_of_nonpos hy.2, neg_le_neg_iff]\n[GOAL]\ncase inr\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ny : ℝ\nhy : y ∈ Ioc c 0\nh : c < 0\n⊢ c ≤ y\n[PROOFSTEP]\nexact hy.1.le\n[GOAL]\ncase refine'_2\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ny : ℝ\nhy : y ∈ Ι 0 c\nabsy : |y| ≤ |c|\n⊢ ‖I * (cexp (-b * (↑T + ↑y * I) ^ 2) - cexp (-b * (↑T - ↑y * I) ^ 2))‖ ≤\n    2 * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nrw [norm_mul, Complex.norm_eq_abs, abs_I, one_mul, two_mul]\n[GOAL]\ncase refine'_2\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ny : ℝ\nhy : y ∈ Ι 0 c\nabsy : |y| ≤ |c|\n⊢ ‖cexp (-b * (↑T + ↑y * I) ^ 2) - cexp (-b * (↑T - ↑y * I) ^ 2)‖ ≤\n    rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2)) +\n      rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nrefine' (norm_sub_le _ _).trans (add_le_add (vert_norm_bound hT absy) _)\n[GOAL]\ncase refine'_2\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ny : ℝ\nhy : y ∈ Ι 0 c\nabsy : |y| ≤ |c|\n⊢ ‖cexp (-b * (↑T - ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nrw [← abs_neg y] at absy \n[GOAL]\ncase refine'_2\nb : ℂ\nhb : 0 < b.re\nc T : ℝ\nhT : 0 ≤ T\nvert_norm_bound :\n  ∀ {T : ℝ},\n    0 ≤ T →\n      ∀ {c y : ℝ},\n        |y| ≤ |c| → ‖cexp (-b * (↑T + ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\ny : ℝ\nhy : y ∈ Ι 0 c\nabsy : |(-y)| ≤ |c|\n⊢ ‖cexp (-b * (↑T - ↑y * I) ^ 2)‖ ≤ rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))\n[PROOFSTEP]\nsimpa only [neg_mul, ofReal_neg] using vert_norm_bound hT absy\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ Tendsto (verticalIntegral b c) atTop (𝓝 0)\n[PROOFSTEP]\nrw [tendsto_zero_iff_norm_tendsto_zero]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ Tendsto (fun e => ‖verticalIntegral b c e‖) atTop (𝓝 0)\n[PROOFSTEP]\nrefine'\n  tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds _ (eventually_of_forall fun _ => norm_nonneg _)\n    ((eventually_ge_atTop (0 : ℝ)).mp (eventually_of_forall fun T hT => verticalIntegral_norm_le hb c hT))\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ Tendsto (fun T => 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))) atTop (𝓝 0)\n[PROOFSTEP]\nrw [(by ring : 0 = 2 * |c| * 0)]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ 0 = 2 * |c| * 0\n[PROOFSTEP]\nring\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ Tendsto (fun T => 2 * |c| * rexp (-(b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2))) atTop (𝓝 (2 * |c| * 0))\n[PROOFSTEP]\nrefine' (tendsto_exp_atBot.comp (tendsto_neg_atTop_atBot.comp _)).const_mul _\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ Tendsto (fun T => b.re * T ^ 2 - 2 * |b.im| * |c| * T - b.re * c ^ 2) atTop atTop\n[PROOFSTEP]\napply tendsto_atTop_add_const_right\n[GOAL]\ncase hf\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ Tendsto (fun x => b.re * x ^ 2 - 2 * |b.im| * |c| * x) atTop atTop\n[PROOFSTEP]\nsimp_rw [sq, ← mul_assoc, ← sub_mul]\n[GOAL]\ncase hf\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ Tendsto (fun x => (b.re * x - 2 * |b.im| * |c|) * x) atTop atTop\n[PROOFSTEP]\nrefine' Tendsto.atTop_mul_atTop (tendsto_atTop_add_const_right _ _ _) tendsto_id\n[GOAL]\ncase hf\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ Tendsto (fun x => b.re * x) atTop atTop\n[PROOFSTEP]\nexact (tendsto_const_mul_atTop_of_pos hb).mpr tendsto_id\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ Integrable fun x => cexp (-b * (↑x + ↑c * I) ^ 2)\n[PROOFSTEP]\nrefine'\n  ⟨(Complex.continuous_exp.comp\n        (continuous_const.mul ((continuous_ofReal.add continuous_const).pow 2))).aestronglyMeasurable,\n    _⟩\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ HasFiniteIntegral fun x => cexp (-b * (↑x + ↑c * I) ^ 2)\n[PROOFSTEP]\nrw [← hasFiniteIntegral_norm_iff]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ HasFiniteIntegral fun a => ‖cexp (-b * (↑a + ↑c * I) ^ 2)‖\n[PROOFSTEP]\nsimp_rw [norm_cexp_neg_mul_sq_add_mul_I' hb.ne', neg_sub _ (c ^ 2 * _), sub_eq_add_neg _ (b.re * _), Real.exp_add]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ HasFiniteIntegral fun a => rexp (c ^ 2 * (b.im ^ 2 / b.re + b.re)) * rexp (-(b.re * (a - b.im * c / b.re) ^ 2))\n[PROOFSTEP]\nsuffices Integrable fun x : ℝ => exp (-(b.re * x ^ 2)) by\n  exact (Integrable.comp_sub_right this (b.im * c / b.re)).hasFiniteIntegral.const_mul _\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nthis : Integrable fun x => rexp (-(b.re * x ^ 2))\n⊢ HasFiniteIntegral fun a => rexp (c ^ 2 * (b.im ^ 2 / b.re + b.re)) * rexp (-(b.re * (a - b.im * c / b.re) ^ 2))\n[PROOFSTEP]\nexact (Integrable.comp_sub_right this (b.im * c / b.re)).hasFiniteIntegral.const_mul _\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ Integrable fun x => rexp (-(b.re * x ^ 2))\n[PROOFSTEP]\nsimp_rw [← neg_mul]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ Integrable fun x => rexp (-b.re * x ^ 2)\n[PROOFSTEP]\napply integrable_exp_neg_mul_sq hb\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ ∫ (x : ℝ), cexp (-b * (↑x + ↑c * I) ^ 2) = (↑π / b) ^ (1 / 2)\n[PROOFSTEP]\nrefine'\n  tendsto_nhds_unique\n    (intervalIntegral_tendsto_integral (integrable_cexp_neg_mul_sq_add_real_mul_I hb c) tendsto_neg_atTop_atBot\n      tendsto_id)\n    _\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\n⊢ Tendsto (fun i => ∫ (x : ℝ) in -i..id i, cexp (-b * (↑x + ↑c * I) ^ 2)) atTop (𝓝 ((↑π / b) ^ (1 / 2)))\n[PROOFSTEP]\nset I₁ := fun T => ∫ x : ℝ in -T..T, cexp (-b * (x + c * I) ^ 2) with HI₁\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\n⊢ Tendsto (fun i => ∫ (x : ℝ) in -i..id i, cexp (-b * (↑x + ↑c * I) ^ 2)) atTop (𝓝 ((↑π / b) ^ (1 / 2)))\n[PROOFSTEP]\nlet I₂ := fun T : ℝ => ∫ x : ℝ in -T..T, cexp (-b * (x : ℂ) ^ 2)\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\n⊢ Tendsto (fun i => ∫ (x : ℝ) in -i..id i, cexp (-b * (↑x + ↑c * I) ^ 2)) atTop (𝓝 ((↑π / b) ^ (1 / 2)))\n[PROOFSTEP]\nlet I₄ := fun T : ℝ => ∫ y : ℝ in (0 : ℝ)..c, cexp (-b * (T + y * I) ^ 2)\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\n⊢ Tendsto (fun i => ∫ (x : ℝ) in -i..id i, cexp (-b * (↑x + ↑c * I) ^ 2)) atTop (𝓝 ((↑π / b) ^ (1 / 2)))\n[PROOFSTEP]\nlet I₅ := fun T : ℝ => ∫ y : ℝ in (0 : ℝ)..c, cexp (-b * (-T + y * I) ^ 2)\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\n⊢ Tendsto (fun i => ∫ (x : ℝ) in -i..id i, cexp (-b * (↑x + ↑c * I) ^ 2)) atTop (𝓝 ((↑π / b) ^ (1 / 2)))\n[PROOFSTEP]\nhave C : ∀ T : ℝ, I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0 :=\n  by\n  intro T\n  have :=\n    integral_boundary_rect_eq_zero_of_differentiableOn (fun z => cexp (-b * z ^ 2)) (-T) (T + c * I)\n      (by\n        refine' Differentiable.differentiableOn (Differentiable.const_mul _ _).cexp\n        exact differentiable_pow 2)\n  simpa only [neg_im, ofReal_im, neg_zero, ofReal_zero, zero_mul, add_zero, neg_re, ofReal_re, add_re, mul_re, I_re,\n    mul_zero, I_im, tsub_zero, add_im, mul_im, mul_one, zero_add, Algebra.id.smul_eq_mul, ofReal_neg] using this\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\n⊢ ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0\n[PROOFSTEP]\nintro T\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\n⊢ I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0\n[PROOFSTEP]\nhave :=\n  integral_boundary_rect_eq_zero_of_differentiableOn (fun z => cexp (-b * z ^ 2)) (-T) (T + c * I)\n    (by\n      refine' Differentiable.differentiableOn (Differentiable.const_mul _ _).cexp\n      exact differentiable_pow 2)\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\n⊢ DifferentiableOn ℂ (fun z => cexp (-b * z ^ 2)) (uIcc (-↑T).re (↑T + ↑c * I).re ×ℂ uIcc (-↑T).im (↑T + ↑c * I).im)\n[PROOFSTEP]\nrefine' Differentiable.differentiableOn (Differentiable.const_mul _ _).cexp\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\n⊢ Differentiable ℂ fun z => z ^ 2\n[PROOFSTEP]\nexact differentiable_pow 2\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nthis :\n  (((∫ (x : ℝ) in (-↑T).re..(↑T + ↑c * I).re, (fun z => cexp (-b * z ^ 2)) (↑x + ↑(-↑T).im * I)) -\n          ∫ (x : ℝ) in (-↑T).re..(↑T + ↑c * I).re, (fun z => cexp (-b * z ^ 2)) (↑x + ↑(↑T + ↑c * I).im * I)) +\n        I • ∫ (y : ℝ) in (-↑T).im..(↑T + ↑c * I).im, (fun z => cexp (-b * z ^ 2)) (↑(↑T + ↑c * I).re + ↑y * I)) -\n      I • ∫ (y : ℝ) in (-↑T).im..(↑T + ↑c * I).im, (fun z => cexp (-b * z ^ 2)) (↑(-↑T).re + ↑y * I) =\n    0\n⊢ I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0\n[PROOFSTEP]\nsimpa only [neg_im, ofReal_im, neg_zero, ofReal_zero, zero_mul, add_zero, neg_re, ofReal_re, add_re, mul_re, I_re,\n  mul_zero, I_im, tsub_zero, add_im, mul_im, mul_one, zero_add, Algebra.id.smul_eq_mul, ofReal_neg] using this\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nC : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0\n⊢ Tendsto (fun i => ∫ (x : ℝ) in -i..id i, cexp (-b * (↑x + ↑c * I) ^ 2)) atTop (𝓝 ((↑π / b) ^ (1 / 2)))\n[PROOFSTEP]\nsimp_rw [id.def, ← HI₁]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nC : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0\n⊢ Tendsto I₁ atTop (𝓝 ((↑π / b) ^ (1 / 2)))\n[PROOFSTEP]\nhave : I₁ = fun T : ℝ => I₂ T + verticalIntegral b c T :=\n  by\n  ext1 T\n  specialize C T\n  rw [sub_eq_zero] at C \n  unfold verticalIntegral\n  rw [integral_const_mul, intervalIntegral.integral_sub]\n  · simp_rw [(fun a b => by rw [sq]; ring_nf : ∀ a b : ℂ, (a - b * I) ^ 2 = (-a + b * I) ^ 2)]\n    change I₁ T = I₂ T + I * (I₄ T - I₅ T)\n    rw [mul_sub, ← C]\n    abel\n  all_goals apply Continuous.intervalIntegrable; continuity\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nC : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0\n⊢ I₁ = fun T => I₂ T + verticalIntegral b c T\n[PROOFSTEP]\next1 T\n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nC : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0\nT : ℝ\n⊢ I₁ T = I₂ T + verticalIntegral b c T\n[PROOFSTEP]\nspecialize C T\n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0\n⊢ I₁ T = I₂ T + verticalIntegral b c T\n[PROOFSTEP]\nrw [sub_eq_zero] at C \n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ I₁ T = I₂ T + verticalIntegral b c T\n[PROOFSTEP]\nunfold verticalIntegral\n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ I₁ T = I₂ T + ∫ (y : ℝ) in 0 ..c, I * (cexp (-b * (↑T + ↑y * I) ^ 2) - cexp (-b * (↑T - ↑y * I) ^ 2))\n[PROOFSTEP]\nrw [integral_const_mul, intervalIntegral.integral_sub]\n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ I₁ T =\n    I₂ T + I * ((∫ (x : ℝ) in 0 ..c, cexp (-b * (↑T + ↑x * I) ^ 2)) - ∫ (x : ℝ) in 0 ..c, cexp (-b * (↑T - ↑x * I) ^ 2))\n[PROOFSTEP]\nsimp_rw [(fun a b => by rw [sq]; ring_nf : ∀ a b : ℂ, (a - b * I) ^ 2 = (-a + b * I) ^ 2)]\n[GOAL]\nb✝ : ℂ\nhb : 0 < b✝.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b✝ * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b✝ * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b✝ * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b✝ * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b✝ * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\na b : ℂ\n⊢ (a - b * I) ^ 2 = (-a + b * I) ^ 2\n[PROOFSTEP]\nrw [sq]\n[GOAL]\nb✝ : ℂ\nhb : 0 < b✝.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b✝ * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b✝ * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b✝ * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b✝ * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b✝ * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\na b : ℂ\n⊢ (a - b * I) * (a - b * I) = (-a + b * I) ^ 2\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2) =\n    (∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)) +\n      I * ((∫ (x : ℝ) in 0 ..c, cexp (-b * (↑T + ↑x * I) ^ 2)) - ∫ (x : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑x * I) ^ 2))\n[PROOFSTEP]\nchange I₁ T = I₂ T + I * (I₄ T - I₅ T)\n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ I₁ T = I₂ T + I * (I₄ T - I₅ T)\n[PROOFSTEP]\nrw [mul_sub, ← C]\n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ I₁ T = I₂ T + (I * I₄ T - (I₂ T - I₁ T + I * I₄ T))\n[PROOFSTEP]\nabel\n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ I₁ T = I₂ T + (I * I₄ T - (I₂ T - I₁ T + I * I₄ T))\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.hf\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ IntervalIntegrable (fun x => cexp (-b * (↑T + ↑x * I) ^ 2)) volume 0 c\ncase h.hg\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ IntervalIntegrable (fun x => cexp (-b * (↑T - ↑x * I) ^ 2)) volume 0 c\n[PROOFSTEP]\nall_goals apply Continuous.intervalIntegrable; continuity\n[GOAL]\ncase h.hf\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ IntervalIntegrable (fun x => cexp (-b * (↑T + ↑x * I) ^ 2)) volume 0 c\n[PROOFSTEP]\napply Continuous.intervalIntegrable\n[GOAL]\ncase h.hf.hu\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ Continuous fun x => cexp (-b * (↑T + ↑x * I) ^ 2)\n[PROOFSTEP]\ncontinuity\n[GOAL]\ncase h.hg\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ IntervalIntegrable (fun x => cexp (-b * (↑T - ↑x * I) ^ 2)) volume 0 c\n[PROOFSTEP]\napply Continuous.intervalIntegrable\n[GOAL]\ncase h.hg.hu\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nT : ℝ\nC : I₂ T - I₁ T + I * I₄ T = I * I₅ T\n⊢ Continuous fun x => cexp (-b * (↑T - ↑x * I) ^ 2)\n[PROOFSTEP]\ncontinuity\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nC : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0\nthis : I₁ = fun T => I₂ T + verticalIntegral b c T\n⊢ Tendsto I₁ atTop (𝓝 ((↑π / b) ^ (1 / 2)))\n[PROOFSTEP]\nrw [this, ← add_zero ((π / b : ℂ) ^ (1 / 2 : ℂ)), ← integral_gaussian_complex hb]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nC : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0\nthis : I₁ = fun T => I₂ T + verticalIntegral b c T\n⊢ Tendsto (fun T => I₂ T + verticalIntegral b c T) atTop (𝓝 ((∫ (x : ℝ), cexp (-b * ↑x ^ 2)) + 0))\n[PROOFSTEP]\nrefine' Tendsto.add _ (tendsto_verticalIntegral hb c)\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℝ\nI₁ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nHI₁ : I₁ = fun T => ∫ (x : ℝ) in -T..T, cexp (-b * (↑x + ↑c * I) ^ 2)\nI₂ : ℝ → ℂ := fun T => ∫ (x : ℝ) in -T..T, cexp (-b * ↑x ^ 2)\nI₄ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (↑T + ↑y * I) ^ 2)\nI₅ : ℝ → ℂ := fun T => ∫ (y : ℝ) in 0 ..c, cexp (-b * (-↑T + ↑y * I) ^ 2)\nC : ∀ (T : ℝ), I₂ T - I₁ T + I * I₄ T - I * I₅ T = 0\nthis : I₁ = fun T => I₂ T + verticalIntegral b c T\n⊢ Tendsto (fun T => I₂ T) atTop (𝓝 (∫ (x : ℝ), cexp (-b * ↑x ^ 2)))\n[PROOFSTEP]\nexact intervalIntegral_tendsto_integral (integrable_cexp_neg_mul_sq hb) tendsto_neg_atTop_atBot tendsto_id\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℂ\n⊢ ∫ (x : ℝ), cexp (-b * (↑x + c) ^ 2) = (↑π / b) ^ (1 / 2)\n[PROOFSTEP]\nrw [← re_add_im c]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℂ\n⊢ ∫ (x : ℝ), cexp (-b * (↑x + (↑c.re + ↑c.im * I)) ^ 2) = (↑π / b) ^ (1 / 2)\n[PROOFSTEP]\nsimp_rw [← add_assoc, ← ofReal_add]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℂ\n⊢ ∫ (x : ℝ), cexp (-b * (↑(x + c.re) + ↑c.im * I) ^ 2) = (↑π / b) ^ (1 / 2)\n[PROOFSTEP]\nrw [integral_add_right_eq_self fun x : ℝ => cexp (-b * (↑x + ↑c.im * I) ^ 2)]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nc : ℂ\n⊢ ∫ (x : ℝ), cexp (-b * (↑x + ↑c.im * I) ^ 2) = (↑π / b) ^ (1 / 2)\n[PROOFSTEP]\napply integral_cexp_neg_mul_sq_add_real_mul_I hb\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℂ\n⊢ ∫ (x : ℝ), cexp (I * t * ↑x) * cexp (-b * ↑x ^ 2) = cexp (-t ^ 2 / (4 * b)) * (↑π / b) ^ (1 / 2)\n[PROOFSTEP]\nhave : b ≠ 0 := by contrapose! hb; rw [hb, zero_re]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℂ\n⊢ b ≠ 0\n[PROOFSTEP]\ncontrapose! hb\n[GOAL]\nb t : ℂ\nhb : b = 0\n⊢ b.re ≤ 0\n[PROOFSTEP]\nrw [hb, zero_re]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℂ\nthis : b ≠ 0\n⊢ ∫ (x : ℝ), cexp (I * t * ↑x) * cexp (-b * ↑x ^ 2) = cexp (-t ^ 2 / (4 * b)) * (↑π / b) ^ (1 / 2)\n[PROOFSTEP]\nsimp_rw [← Complex.exp_add]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℂ\nthis : b ≠ 0\n⊢ ∫ (x : ℝ), cexp (I * t * ↑x + -b * ↑x ^ 2) = cexp (-t ^ 2 / (4 * b)) * (↑π / b) ^ (1 / 2)\n[PROOFSTEP]\nhave : ∀ x : ℂ, I * t * x + -b * x ^ 2 = -t ^ 2 / ((4 : ℂ) * b) + -b * (x + -I * t / 2 / b) ^ 2 :=\n  by\n  intro x\n  ring_nf\n  rw [I_sq]\n  field_simp; ring\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℂ\nthis : b ≠ 0\n⊢ ∀ (x : ℂ), I * t * x + -b * x ^ 2 = -t ^ 2 / (4 * b) + -b * (x + -I * t / 2 / b) ^ 2\n[PROOFSTEP]\nintro x\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℂ\nthis : b ≠ 0\nx : ℂ\n⊢ I * t * x + -b * x ^ 2 = -t ^ 2 / (4 * b) + -b * (x + -I * t / 2 / b) ^ 2\n[PROOFSTEP]\nring_nf\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℂ\nthis : b ≠ 0\nx : ℂ\n⊢ I * t * x - x ^ 2 * b =\n    I * t * x * b * b⁻¹ + I ^ 2 * t ^ 2 * b * b⁻¹ ^ 2 * ↑(Int.negOfNat 1) * (↑(Int.ofNat 1) / ↑4) +\n      (t ^ 2 * b⁻¹ * ↑(Int.negOfNat 1) * (↑(Int.ofNat 1) / ↑4) - x ^ 2 * b)\n[PROOFSTEP]\nrw [I_sq]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℂ\nthis : b ≠ 0\nx : ℂ\n⊢ I * t * x - x ^ 2 * b =\n    I * t * x * b * b⁻¹ + -1 * t ^ 2 * b * b⁻¹ ^ 2 * ↑(Int.negOfNat 1) * (↑(Int.ofNat 1) / ↑4) +\n      (t ^ 2 * b⁻¹ * ↑(Int.negOfNat 1) * (↑(Int.ofNat 1) / ↑4) - x ^ 2 * b)\n[PROOFSTEP]\nfield_simp\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℂ\nthis : b ≠ 0\nx : ℂ\n⊢ (I * t * x - x ^ 2 * b) * (b ^ 2 * 4 * (b * 4)) =\n    (I * t * x * (b ^ 2 * 4) + t ^ 2 * b) * (b * 4) + (-t ^ 2 - b * 4 * (x ^ 2 * b)) * (b ^ 2 * 4)\n[PROOFSTEP]\nring\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℂ\nthis✝ : b ≠ 0\nthis : ∀ (x : ℂ), I * t * x + -b * x ^ 2 = -t ^ 2 / (4 * b) + -b * (x + -I * t / 2 / b) ^ 2\n⊢ ∫ (x : ℝ), cexp (I * t * ↑x + -b * ↑x ^ 2) = cexp (-t ^ 2 / (4 * b)) * (↑π / b) ^ (1 / 2)\n[PROOFSTEP]\nsimp_rw [this, Complex.exp_add, integral_mul_left, integral_cexp_neg_mul_sq_add_const hb]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\n⊢ (𝓕 fun x => cexp (-↑π * b * ↑x ^ 2)) = fun t => 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)\n[PROOFSTEP]\next1 t\n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nt : ℝ\n⊢ 𝓕 (fun x => cexp (-↑π * b * ↑x ^ 2)) t = 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)\n[PROOFSTEP]\nsimp_rw [fourierIntegral_eq_integral_exp_smul, smul_eq_mul]\n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nt : ℝ\n⊢ ∫ (v : ℝ), cexp (↑(-2 * π * v * t) * I) * cexp (-↑π * b * ↑v ^ 2) = 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)\n[PROOFSTEP]\nhave h1 : 0 < re (π * b) := by rw [ofReal_mul_re]; exact mul_pos pi_pos hb\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℝ\n⊢ 0 < (↑π * b).re\n[PROOFSTEP]\nrw [ofReal_mul_re]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℝ\n⊢ 0 < π * b.re\n[PROOFSTEP]\nexact mul_pos pi_pos hb\n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\n⊢ ∫ (v : ℝ), cexp (↑(-2 * π * v * t) * I) * cexp (-↑π * b * ↑v ^ 2) = 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)\n[PROOFSTEP]\nhave h2 : b ≠ 0 := by contrapose! hb; rw [hb, zero_re]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\n⊢ b ≠ 0\n[PROOFSTEP]\ncontrapose! hb\n[GOAL]\nb : ℂ\nt : ℝ\nh1 : 0 < (↑π * b).re\nhb : b = 0\n⊢ b.re ≤ 0\n[PROOFSTEP]\nrw [hb, zero_re]\n[GOAL]\ncase h\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\n⊢ ∫ (v : ℝ), cexp (↑(-2 * π * v * t) * I) * cexp (-↑π * b * ↑v ^ 2) = 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)\n[PROOFSTEP]\nconvert _root_.fourier_transform_gaussian h1 (-2 * π * t) using 1\n[GOAL]\ncase h.e'_2\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\n⊢ ∫ (v : ℝ), cexp (↑(-2 * π * v * t) * I) * cexp (-↑π * b * ↑v ^ 2) =\n    ∫ (x : ℝ), cexp (I * (-2 * ↑π * ↑t) * ↑x) * cexp (-(↑π * b) * ↑x ^ 2)\n[PROOFSTEP]\ncongr 1 with x : 1\n[GOAL]\ncase h.e'_2.e_f.h\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\nx : ℝ\n⊢ cexp (↑(-2 * π * x * t) * I) * cexp (-↑π * b * ↑x ^ 2) = cexp (I * (-2 * ↑π * ↑t) * ↑x) * cexp (-(↑π * b) * ↑x ^ 2)\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.e'_2.e_f.h.e_a.e_z\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\nx : ℝ\n⊢ ↑(-2 * π * x * t) * I = I * (-2 * ↑π * ↑t) * ↑x\ncase h.e'_2.e_f.h.e_a.e_z\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\nx : ℝ\n⊢ -↑π * b * ↑x ^ 2 = -(↑π * b) * ↑x ^ 2\n[PROOFSTEP]\nany_goals push_cast ; ring\n[GOAL]\ncase h.e'_2.e_f.h.e_a.e_z\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\nx : ℝ\n⊢ ↑(-2 * π * x * t) * I = I * (-2 * ↑π * ↑t) * ↑x\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_2.e_f.h.e_a.e_z\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\nx : ℝ\n⊢ -2 * ↑π * ↑x * ↑t * I = I * (-2 * ↑π * ↑t) * ↑x\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_2.e_f.h.e_a.e_z\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\nx : ℝ\n⊢ -↑π * b * ↑x ^ 2 = -(↑π * b) * ↑x ^ 2\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_2.e_f.h.e_a.e_z\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\nx : ℝ\n⊢ -↑π * b * ↑x ^ 2 = -(↑π * b) * ↑x ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_3\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\n⊢ 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2) = cexp (-(-2 * ↑π * ↑t) ^ 2 / (4 * (↑π * b))) * (↑π / (↑π * b)) ^ (1 / 2)\n[PROOFSTEP]\nconv_lhs => rw [mul_comm]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\n| 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\n| 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\n| 1 / b ^ (1 / 2) * cexp (-↑π / b * ↑t ^ 2)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase h.e'_3\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\n⊢ cexp (-↑π / b * ↑t ^ 2) * (1 / b ^ (1 / 2)) = cexp (-(-2 * ↑π * ↑t) ^ 2 / (4 * (↑π * b))) * (↑π / (↑π * b)) ^ (1 / 2)\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.e'_3.e_a.e_z\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\n⊢ -↑π / b * ↑t ^ 2 = -(-2 * ↑π * ↑t) ^ 2 / (4 * (↑π * b))\n[PROOFSTEP]\nfield_simp [ofReal_ne_zero.mpr pi_ne_zero]\n[GOAL]\ncase h.e'_3.e_a.e_z\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\n⊢ ↑π * ↑t ^ 2 * (4 * (↑π * b)) = (2 * ↑π * ↑t) ^ 2 * b\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_3.e_a\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\n⊢ 1 / b ^ (1 / 2) = (↑π / (↑π * b)) ^ (1 / 2)\n[PROOFSTEP]\nrw [← div_div, div_self (ofReal_ne_zero.mpr pi_ne_zero), one_div, one_div b, inv_cpow]\n[GOAL]\ncase h.e'_3.e_a.hx\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\n⊢ arg b ≠ π\n[PROOFSTEP]\nrw [Ne.def, arg_eq_pi_iff, not_and_or, not_lt]\n[GOAL]\ncase h.e'_3.e_a.hx\nb : ℂ\nhb : 0 < b.re\nt : ℝ\nh1 : 0 < (↑π * b).re\nh2 : b ≠ 0\n⊢ 0 ≤ b.re ∨ ¬b.im = 0\n[PROOFSTEP]\nexact Or.inl hb.le\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nha : 0 < a\ns : ℝ\n⊢ Tendsto (fun x => |x| ^ s * rexp (-a * x ^ 2)) (cocompact ℝ) (𝓝 0)\n[PROOFSTEP]\nconv in rexp _ => rw [← sq_abs]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nha : 0 < a\ns x : ℝ\n| rexp (-a * x ^ 2)\n[PROOFSTEP]\nrw [← sq_abs]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nha : 0 < a\ns x : ℝ\n| rexp (-a * x ^ 2)\n[PROOFSTEP]\nrw [← sq_abs]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nha : 0 < a\ns x : ℝ\n| rexp (-a * x ^ 2)\n[PROOFSTEP]\nrw [← sq_abs]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nha : 0 < a\ns : ℝ\n⊢ Tendsto (fun x => |x| ^ s * rexp (-a * |x| ^ 2)) (cocompact ℝ) (𝓝 0)\n[PROOFSTEP]\nerw [cocompact_eq, ← comap_abs_atTop,\n  @tendsto_comap'_iff _ _ _ (fun y => y ^ s * rexp (-a * y ^ 2)) _ _ _\n    (mem_atTop_sets.mpr ⟨0, fun b hb => ⟨b, abs_of_nonneg hb⟩⟩)]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nha : 0 < a\ns : ℝ\n⊢ Tendsto (fun y => y ^ s * rexp (-a * y ^ 2)) atTop (𝓝 0)\n[PROOFSTEP]\nexact\n  (rpow_mul_exp_neg_mul_sq_isLittleO_exp_neg ha s).tendsto_zero_of_tendsto\n    (tendsto_exp_atBot.comp <| tendsto_id.neg_const_mul_atTop (neg_lt_zero.mpr one_half_pos))\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\ns : ℝ\n⊢ (fun x => cexp (-a * ↑x ^ 2)) =o[cocompact ℝ] fun x => |x| ^ s\n[PROOFSTEP]\nrw [← isLittleO_norm_left]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\ns : ℝ\n⊢ (fun x => ‖cexp (-a * ↑x ^ 2)‖) =o[cocompact ℝ] fun x => |x| ^ s\n[PROOFSTEP]\nsimp_rw [norm_cexp_neg_mul_sq]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\ns : ℝ\n⊢ (fun x => rexp (-a.re * x ^ 2)) =o[cocompact ℝ] fun x => |x| ^ s\n[PROOFSTEP]\napply isLittleO_of_tendsto'\n[GOAL]\ncase hgf\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\ns : ℝ\n⊢ ∀ᶠ (x : ℝ) in cocompact ℝ, |x| ^ s = 0 → rexp (-a.re * x ^ 2) = 0\n[PROOFSTEP]\nrefine' Eventually.filter_mono cocompact_le_cofinite _\n[GOAL]\ncase hgf\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\ns : ℝ\n⊢ ∀ᶠ (x : ℝ) in cofinite, |x| ^ s = 0 → rexp (-a.re * x ^ 2) = 0\n[PROOFSTEP]\nrefine' (eventually_cofinite_ne 0).mp (eventually_of_forall fun x hx h => _)\n[GOAL]\ncase hgf\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\ns x : ℝ\nhx : x ≠ 0\nh : |x| ^ s = 0\n⊢ rexp (-a.re * x ^ 2) = 0\n[PROOFSTEP]\nexact ((rpow_pos_of_pos (abs_pos.mpr hx) _).ne' h).elim\n[GOAL]\ncase a\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\ns : ℝ\n⊢ Tendsto (fun x => rexp (-a.re * x ^ 2) / |x| ^ s) (cocompact ℝ) (𝓝 0)\n[PROOFSTEP]\nrefine'\n  Tendsto.congr' (Eventually.filter_mono cocompact_le_cofinite _)\n    (tendsto_zero_iff_norm_tendsto_zero.mp <| tendsto_rpow_abs_mul_exp_neg_mul_sq_cocompact ha (-s))\n[GOAL]\ncase a\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\ns : ℝ\n⊢ ∀ᶠ (x : ℝ) in cofinite, ‖|x| ^ (-s) * rexp (-a.re * x ^ 2)‖ = (fun x => rexp (-a.re * x ^ 2) / |x| ^ s) x\n[PROOFSTEP]\nrefine' (eventually_cofinite_ne 0).mp (eventually_of_forall fun x _ => _)\n[GOAL]\ncase a\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\ns x : ℝ\nx✝ : x ≠ 0\n⊢ ‖|x| ^ (-s) * rexp (-a.re * x ^ 2)‖ = (fun x => rexp (-a.re * x ^ 2) / |x| ^ s) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase a\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\ns x : ℝ\nx✝ : x ≠ 0\n⊢ ‖|x| ^ (-s) * rexp (-a.re * x ^ 2)‖ = rexp (-a.re * x ^ 2) / |x| ^ s\n[PROOFSTEP]\nrw [norm_mul, norm_of_nonneg (rpow_nonneg_of_nonneg (abs_nonneg _) _), mul_comm, rpow_neg (abs_nonneg x),\n  div_eq_mul_inv, norm_of_nonneg (exp_pos _).le]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\n⊢ ∑' (n : ℤ), cexp (-↑π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / a * ↑n ^ 2)\n[PROOFSTEP]\nlet f := fun x : ℝ => cexp (-π * a * (x : ℂ) ^ 2)\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\n⊢ ∑' (n : ℤ), cexp (-↑π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / a * ↑n ^ 2)\n[PROOFSTEP]\nhave h1 : 0 < (↑π * a).re := by\n  rw [ofReal_mul_re]\n  exact mul_pos pi_pos ha\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\n⊢ 0 < (↑π * a).re\n[PROOFSTEP]\nrw [ofReal_mul_re]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\n⊢ 0 < π * a.re\n[PROOFSTEP]\nexact mul_pos pi_pos ha\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\n⊢ ∑' (n : ℤ), cexp (-↑π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / a * ↑n ^ 2)\n[PROOFSTEP]\nhave h2 : 0 < (↑π / a).re := by\n  rw [div_eq_mul_inv, ofReal_mul_re, inv_re]\n  refine' mul_pos pi_pos (div_pos ha <| normSq_pos.mpr _)\n  contrapose! ha\n  rw [ha, zero_re]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\n⊢ 0 < (↑π / a).re\n[PROOFSTEP]\nrw [div_eq_mul_inv, ofReal_mul_re, inv_re]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\n⊢ 0 < π * (a.re / ↑normSq a)\n[PROOFSTEP]\nrefine' mul_pos pi_pos (div_pos ha <| normSq_pos.mpr _)\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\n⊢ a ≠ 0\n[PROOFSTEP]\ncontrapose! ha\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\nha : a = 0\n⊢ a.re ≤ 0\n[PROOFSTEP]\nrw [ha, zero_re]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\nh2 : 0 < (↑π / a).re\n⊢ ∑' (n : ℤ), cexp (-↑π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / a * ↑n ^ 2)\n[PROOFSTEP]\nhave f_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2 : ℝ) :=\n  by\n  convert (isLittleO_exp_neg_mul_sq_cocompact h1 (-2)).isBigO using 2\n  dsimp only\n  congr 1\n  ring\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\nh2 : 0 < (↑π / a).re\n⊢ f =O[cocompact ℝ] fun x => |x| ^ (-2)\n[PROOFSTEP]\nconvert (isLittleO_exp_neg_mul_sq_cocompact h1 (-2)).isBigO using 2\n[GOAL]\ncase h.e'_7.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\nh2 : 0 < (↑π / a).re\nx✝ : ℝ\n⊢ f x✝ = cexp (-(↑π * a) * ↑x✝ ^ 2)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h.e'_7.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\nh2 : 0 < (↑π / a).re\nx✝ : ℝ\n⊢ cexp (-↑π * a * ↑x✝ ^ 2) = cexp (-(↑π * a) * ↑x✝ ^ 2)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_7.h.e_z\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\nh2 : 0 < (↑π / a).re\nx✝ : ℝ\n⊢ -↑π * a * ↑x✝ ^ 2 = -(↑π * a) * ↑x✝ ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\nh2 : 0 < (↑π / a).re\nf_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2)\n⊢ ∑' (n : ℤ), cexp (-↑π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / a * ↑n ^ 2)\n[PROOFSTEP]\nhave Ff_bd : 𝓕 f =O[cocompact ℝ] fun x => |x| ^ (-2 : ℝ) :=\n  by\n  rw [fourier_transform_gaussian_pi ha]\n  convert (isLittleO_exp_neg_mul_sq_cocompact h2 (-2)).isBigO.const_mul_left ((1 : ℂ) / a ^ (1 / 2 : ℂ)) using 2\n  congr 1\n  ring_nf\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\nh2 : 0 < (↑π / a).re\nf_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2)\n⊢ 𝓕 f =O[cocompact ℝ] fun x => |x| ^ (-2)\n[PROOFSTEP]\nrw [fourier_transform_gaussian_pi ha]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\nh2 : 0 < (↑π / a).re\nf_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2)\n⊢ (fun t => 1 / a ^ (1 / 2) * cexp (-↑π / a * ↑t ^ 2)) =O[cocompact ℝ] fun x => |x| ^ (-2)\n[PROOFSTEP]\nconvert (isLittleO_exp_neg_mul_sq_cocompact h2 (-2)).isBigO.const_mul_left ((1 : ℂ) / a ^ (1 / 2 : ℂ)) using 2\n[GOAL]\ncase h.e'_7.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\nh2 : 0 < (↑π / a).re\nf_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2)\nx✝ : ℝ\n⊢ 1 / a ^ (1 / 2) * cexp (-↑π / a * ↑x✝ ^ 2) = 1 / a ^ (1 / 2) * cexp (-(↑π / a) * ↑x✝ ^ 2)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_7.h.e_a\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\nh2 : 0 < (↑π / a).re\nf_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2)\nx✝ : ℝ\n⊢ cexp (-↑π / a * ↑x✝ ^ 2) = cexp (-(↑π / a) * ↑x✝ ^ 2)\n[PROOFSTEP]\nring_nf\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℂ\nha : 0 < a.re\nf : ℝ → ℂ := fun x => cexp (-↑π * a * ↑x ^ 2)\nh1 : 0 < (↑π * a).re\nh2 : 0 < (↑π / a).re\nf_bd : f =O[cocompact ℝ] fun x => |x| ^ (-2)\nFf_bd : 𝓕 f =O[cocompact ℝ] fun x => |x| ^ (-2)\n⊢ ∑' (n : ℤ), cexp (-↑π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), cexp (-↑π / a * ↑n ^ 2)\n[PROOFSTEP]\nsimpa only [fourier_transform_gaussian_pi ha, tsum_mul_left, Function.comp] using\n  Real.tsum_eq_tsum_fourierIntegral_of_rpow_decay\n    (Complex.continuous_exp.comp (continuous_const.mul (continuous_ofReal.pow 2)) : Continuous f) one_lt_two f_bd Ff_bd\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nha : 0 < a\n⊢ ∑' (n : ℤ), rexp (-π * a * ↑n ^ 2) = 1 / a ^ (1 / 2) * ∑' (n : ℤ), rexp (-π / a * ↑n ^ 2)\n[PROOFSTEP]\nsimpa only [← ofReal_inj, ofReal_mul, ofReal_tsum, ofReal_exp, ofReal_div, ofReal_pow, ofReal_int_cast, ofReal_neg,\n  ofReal_cpow ha.le, ofReal_ofNat, ofReal_one] using\n  Complex.tsum_exp_neg_mul_int_sq (by rwa [ofReal_re] : 0 < (a : ℂ).re)\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nha : 0 < a\n⊢ 0 < (↑a).re\n[PROOFSTEP]\nrwa [ofReal_re]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Gaussian", "llama_tokens": 61061, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646010190477, "lm_q2_score": 0.588889130767832, "lm_q1q2_score": 0.3979504284977778}}
{"text": "[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\n⊢ Fibration (InvImage (GameAdd (DFinsupp.Lex r s) (DFinsupp.Lex r s)) snd) (DFinsupp.Lex r s) fun x =>\n    piecewise x.snd.fst x.snd.snd x.fst\n[PROOFSTEP]\nrintro ⟨p, x₁, x₂⟩ x ⟨i, hr, hs⟩\n[GOAL]\ncase mk.mk.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = ↑((fun x => piecewise x.snd.fst x.snd.snd x.fst) (p, x₁, x₂)) j\nhs : s i (↑x i) (↑((fun x => piecewise x.snd.fst x.snd.snd x.fst) (p, x₁, x₂)) i)\n⊢ ∃ a',\n    InvImage (GameAdd (DFinsupp.Lex r s) (DFinsupp.Lex r s)) snd a' (p, x₁, x₂) ∧\n      (fun x => piecewise x.snd.fst x.snd.snd x.fst) a' = x\n[PROOFSTEP]\nsimp_rw [piecewise_apply] at hs hr \n[GOAL]\ncase mk.mk.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhs : s i (↑x i) (if i ∈ p then ↑x₁ i else ↑x₂ i)\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\n⊢ ∃ a',\n    InvImage (GameAdd (DFinsupp.Lex r s) (DFinsupp.Lex r s)) snd a' (p, x₁, x₂) ∧\n      (fun x => piecewise x.snd.fst x.snd.snd x.fst) a' = x\n[PROOFSTEP]\nsplit_ifs at hs  with hp\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\n⊢ ∃ a',\n    InvImage (GameAdd (DFinsupp.Lex r s) (DFinsupp.Lex r s)) snd a' (p, x₁, x₂) ∧\n      (fun x => piecewise x.snd.fst x.snd.snd x.fst) a' = x\n[PROOFSTEP]\nrefine ⟨⟨{j | r j i → j ∈ p}, piecewise x₁ x {j | r j i}, x₂⟩, .fst ⟨i, fun j hj ↦ ?_, ?_⟩, ?_⟩\n[GOAL]\ncase pos.refine_1\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\nhj : r j i\n⊢ ↑(piecewise x₁ x {j | r j i}) j = ↑x₁ j\n[PROOFSTEP]\nsimp only [piecewise_apply, Set.mem_setOf_eq]\n[GOAL]\ncase pos.refine_2\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\n⊢ (fun {i} => s i) (↑(piecewise x₁ x {j | r j i}) i) (↑x₁ i)\n[PROOFSTEP]\nsimp only [piecewise_apply, Set.mem_setOf_eq]\n[GOAL]\ncase pos.refine_3\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\n⊢ (fun x => piecewise x.snd.fst x.snd.snd x.fst) ({j | r j i → j ∈ p}, piecewise x₁ x {j | r j i}, x₂) = x\n[PROOFSTEP]\nsimp only [piecewise_apply, Set.mem_setOf_eq]\n[GOAL]\ncase pos.refine_1\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\nhj : r j i\n⊢ (if r j i then ↑x₁ j else ↑x j) = ↑x₁ j\n[PROOFSTEP]\nsimp only [if_pos hj]\n[GOAL]\ncase pos.refine_2\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\n⊢ s i (if r i i then ↑x₁ i else ↑x i) (↑x₁ i)\n[PROOFSTEP]\nsplit_ifs with hi\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nhi : r i i\n⊢ s i (↑x₁ i) (↑x₁ i)\n[PROOFSTEP]\nrwa [hr i hi, if_pos hp] at hs \n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nhi : ¬r i i\n⊢ s i (↑x i) (↑x₁ i)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase pos.refine_3\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\n⊢ piecewise (piecewise x₁ x {j | r j i}) x₂ {j | r j i → j ∈ p} = x\n[PROOFSTEP]\next1 j\n[GOAL]\ncase pos.refine_3.h\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\n⊢ ↑(piecewise (piecewise x₁ x {j | r j i}) x₂ {j | r j i → j ∈ p}) j = ↑x j\n[PROOFSTEP]\nsimp only [piecewise_apply, Set.mem_setOf_eq]\n[GOAL]\ncase pos.refine_3.h\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\n⊢ (if r j i → j ∈ p then if r j i then ↑x₁ j else ↑x j else ↑x₂ j) = ↑x j\n[PROOFSTEP]\nsplit_ifs with h₁ h₂\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\nh₁ : r j i → j ∈ p\nh₂ : r j i\n⊢ ↑x₁ j = ↑x j\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\nh₁ : r j i → j ∈ p\nh₂ : r j i\n⊢ ↑x₁ j = ↑x j\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\nh₁ : r j i → j ∈ p\nh₂ : ¬r j i\n⊢ ↑x j = ↑x j\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\nh₁ : r j i → j ∈ p\nh₂ : ¬r j i\n⊢ ↑x j = ↑x j\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\nh₁ : ¬(r j i → j ∈ p)\n⊢ ↑x₂ j = ↑x j\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\nh₁ : ¬(r j i → j ∈ p)\n⊢ ↑x₂ j = ↑x j\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\nh₁ : r j i → j ∈ p\nh₂ : r j i\n⊢ ↑x₁ j = ↑x j\n[PROOFSTEP]\nrw [hr j h₂, if_pos (h₁ h₂)]\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\nh₁ : ¬(r j i → j ∈ p)\n⊢ ↑x₂ j = ↑x j\n[PROOFSTEP]\nrw [not_imp] at h₁ \n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : i ∈ p\nhs : s i (↑x i) (↑x₁ i)\nj : ι\nh₁ : r j i ∧ ¬j ∈ p\n⊢ ↑x₂ j = ↑x j\n[PROOFSTEP]\nrw [hr j h₁.1, if_neg h₁.2]\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\n⊢ ∃ a',\n    InvImage (GameAdd (DFinsupp.Lex r s) (DFinsupp.Lex r s)) snd a' (p, x₁, x₂) ∧\n      (fun x => piecewise x.snd.fst x.snd.snd x.fst) a' = x\n[PROOFSTEP]\nrefine ⟨⟨{j | r j i ∧ j ∈ p}, x₁, piecewise x₂ x {j | r j i}⟩, .snd ⟨i, fun j hj ↦ ?_, ?_⟩, ?_⟩\n[GOAL]\ncase neg.refine_1\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\nhj : r j i\n⊢ ↑(piecewise x₂ x {j | r j i}) j = ↑x₂ j\n[PROOFSTEP]\nsimp only [piecewise_apply, Set.mem_setOf_eq]\n[GOAL]\ncase neg.refine_2\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\n⊢ (fun {i} => s i) (↑(piecewise x₂ x {j | r j i}) i) (↑x₂ i)\n[PROOFSTEP]\nsimp only [piecewise_apply, Set.mem_setOf_eq]\n[GOAL]\ncase neg.refine_3\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\n⊢ (fun x => piecewise x.snd.fst x.snd.snd x.fst) ({j | r j i ∧ j ∈ p}, x₁, piecewise x₂ x {j | r j i}) = x\n[PROOFSTEP]\nsimp only [piecewise_apply, Set.mem_setOf_eq]\n[GOAL]\ncase neg.refine_1\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\nhj : r j i\n⊢ (if r j i then ↑x₂ j else ↑x j) = ↑x₂ j\n[PROOFSTEP]\nexact if_pos hj\n[GOAL]\ncase neg.refine_2\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\n⊢ s i (if r i i then ↑x₂ i else ↑x i) (↑x₂ i)\n[PROOFSTEP]\nsplit_ifs with hi\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nhi : r i i\n⊢ s i (↑x₂ i) (↑x₂ i)\n[PROOFSTEP]\nrwa [hr i hi, if_neg hp] at hs \n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nhi : ¬r i i\n⊢ s i (↑x i) (↑x₂ i)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg.refine_3\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\n⊢ piecewise x₁ (piecewise x₂ x {j | r j i}) {j | r j i ∧ j ∈ p} = x\n[PROOFSTEP]\next1 j\n[GOAL]\ncase neg.refine_3.h\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\n⊢ ↑(piecewise x₁ (piecewise x₂ x {j | r j i}) {j | r j i ∧ j ∈ p}) j = ↑x j\n[PROOFSTEP]\nsimp only [piecewise_apply, Set.mem_setOf_eq]\n[GOAL]\ncase neg.refine_3.h\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\n⊢ (if r j i ∧ j ∈ p then ↑x₁ j else if r j i then ↑x₂ j else ↑x j) = ↑x j\n[PROOFSTEP]\nsplit_ifs with h₁ h₂\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\nh₁ : r j i ∧ j ∈ p\n⊢ ↑x₁ j = ↑x j\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\nh₁ : r j i ∧ j ∈ p\n⊢ ↑x₁ j = ↑x j\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\nh₁ : ¬(r j i ∧ j ∈ p)\nh₂ : r j i\n⊢ ↑x₂ j = ↑x j\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\nh₁ : ¬(r j i ∧ j ∈ p)\nh₂ : r j i\n⊢ ↑x₂ j = ↑x j\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\nh₁ : ¬(r j i ∧ j ∈ p)\nh₂ : ¬r j i\n⊢ ↑x j = ↑x j\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\nh₁ : ¬(r j i ∧ j ∈ p)\nh₂ : ¬r j i\n⊢ ↑x j = ↑x j\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\nh₁ : r j i ∧ j ∈ p\n⊢ ↑x₁ j = ↑x j\n[PROOFSTEP]\nrw [hr j h₁.1, if_pos h₁.2]\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\nh₁ : ¬(r j i ∧ j ∈ p)\nh₂ : r j i\n⊢ ↑x₂ j = ↑x j\n[PROOFSTEP]\nrw [hr j h₂, if_neg]\n[GOAL]\ncase pos.hnc\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : (i : ι) → (s : Set ι) → Decidable (i ∈ s)\np : Set ι\nx₁ x₂ x : Π₀ (i : ι), α i\ni : ι\nhr : ∀ (j : ι), r j i → ↑x j = if j ∈ p then ↑x₁ j else ↑x₂ j\nhp : ¬i ∈ p\nhs : s i (↑x i) (↑x₂ i)\nj : ι\nh₁ : ¬(r j i ∧ j ∈ p)\nh₂ : r j i\n⊢ ¬j ∈ p\n[PROOFSTEP]\nsimpa [h₂] using h₁\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : DecidableEq ι\nx : Π₀ (i : ι), α i\ni : ι\nhs : Acc (DFinsupp.Lex r s) (single i (↑x i))\nhu : Acc (DFinsupp.Lex r s) (erase i x)\n⊢ Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nclassical\nconvert ← @Acc.of_fibration _ _ _ _ _ (lex_fibration r s) ⟨{ i }, _⟩ (InvImage.accessible snd <| hs.prod_gameAdd hu)\nconvert piecewise_single_erase x i\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : DecidableEq ι\nx : Π₀ (i : ι), α i\ni : ι\nhs : Acc (DFinsupp.Lex r s) (single i (↑x i))\nhu : Acc (DFinsupp.Lex r s) (erase i x)\n⊢ Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nconvert ← @Acc.of_fibration _ _ _ _ _ (lex_fibration r s) ⟨{ i }, _⟩ (InvImage.accessible snd <| hs.prod_gameAdd hu)\n[GOAL]\ncase h.e'_3\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝ : DecidableEq ι\nx : Π₀ (i : ι), α i\ni : ι\nhs : Acc (DFinsupp.Lex r s) (single i (↑x i))\nhu : Acc (DFinsupp.Lex r s) (erase i x)\n⊢ piecewise ({i}, single i (↑x i), erase i x).snd.fst ({i}, single i (↑x i), erase i x).snd.snd\n      ({i}, single i (↑x i), erase i x).fst =\n    x\n[PROOFSTEP]\nconvert piecewise_single_erase x i\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nx : Π₀ (i : ι), α i\n⊢ (∀ (i : ι), i ∈ support x → Acc (DFinsupp.Lex r s) (single i (↑x i))) → Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\ngeneralize ht : x.support = t\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nx : Π₀ (i : ι), α i\nt : Finset ι\nht : support x = t\n⊢ (∀ (i : ι), i ∈ t → Acc (DFinsupp.Lex r s) (single i (↑x i))) → Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nrevert x\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nt : Finset ι\n⊢ ∀ (x : Π₀ (i : ι), α i),\n    support x = t → (∀ (i : ι), i ∈ t → Acc (DFinsupp.Lex r s) (single i (↑x i))) → Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nclassical\ninduction' t using Finset.induction with b t hb ih\n· intro x ht\n  rw [support_eq_empty.1 ht]\n  exact fun _ => Lex.acc_zero hbot\nrefine' fun x ht h => Lex.acc_of_single_erase b (h b <| t.mem_insert_self b) _\nrefine' ih _ (by rw [support_erase, ht, Finset.erase_insert hb]) fun a ha => _\nrw [erase_ne (ha.ne_of_not_mem hb)]\nexact h a (Finset.mem_insert_of_mem ha)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nt : Finset ι\n⊢ ∀ (x : Π₀ (i : ι), α i),\n    support x = t → (∀ (i : ι), i ∈ t → Acc (DFinsupp.Lex r s) (single i (↑x i))) → Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\ninduction' t using Finset.induction with b t hb ih\n[GOAL]\ncase empty\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\n⊢ ∀ (x : Π₀ (i : ι), α i),\n    support x = ∅ → (∀ (i : ι), i ∈ ∅ → Acc (DFinsupp.Lex r s) (single i (↑x i))) → Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nintro x ht\n[GOAL]\ncase empty\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nx : Π₀ (i : ι), α i\nht : support x = ∅\n⊢ (∀ (i : ι), i ∈ ∅ → Acc (DFinsupp.Lex r s) (single i (↑x i))) → Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nrw [support_eq_empty.1 ht]\n[GOAL]\ncase empty\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nx : Π₀ (i : ι), α i\nht : support x = ∅\n⊢ (∀ (i : ι), i ∈ ∅ → Acc (DFinsupp.Lex r s) (single i (↑0 i))) → Acc (DFinsupp.Lex r s) 0\n[PROOFSTEP]\nexact fun _ => Lex.acc_zero hbot\n[GOAL]\ncase insert\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nb : ι\nt : Finset ι\nhb : ¬b ∈ t\nih :\n  ∀ (x : Π₀ (i : ι), α i),\n    support x = t → (∀ (i : ι), i ∈ t → Acc (DFinsupp.Lex r s) (single i (↑x i))) → Acc (DFinsupp.Lex r s) x\n⊢ ∀ (x : Π₀ (i : ι), α i),\n    support x = insert b t →\n      (∀ (i : ι), i ∈ insert b t → Acc (DFinsupp.Lex r s) (single i (↑x i))) → Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nrefine' fun x ht h => Lex.acc_of_single_erase b (h b <| t.mem_insert_self b) _\n[GOAL]\ncase insert\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nb : ι\nt : Finset ι\nhb : ¬b ∈ t\nih :\n  ∀ (x : Π₀ (i : ι), α i),\n    support x = t → (∀ (i : ι), i ∈ t → Acc (DFinsupp.Lex r s) (single i (↑x i))) → Acc (DFinsupp.Lex r s) x\nx : Π₀ (i : ι), α i\nht : support x = insert b t\nh : ∀ (i : ι), i ∈ insert b t → Acc (DFinsupp.Lex r s) (single i (↑x i))\n⊢ Acc (DFinsupp.Lex r s) (erase b x)\n[PROOFSTEP]\nrefine' ih _ (by rw [support_erase, ht, Finset.erase_insert hb]) fun a ha => _\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nb : ι\nt : Finset ι\nhb : ¬b ∈ t\nih :\n  ∀ (x : Π₀ (i : ι), α i),\n    support x = t → (∀ (i : ι), i ∈ t → Acc (DFinsupp.Lex r s) (single i (↑x i))) → Acc (DFinsupp.Lex r s) x\nx : Π₀ (i : ι), α i\nht : support x = insert b t\nh : ∀ (i : ι), i ∈ insert b t → Acc (DFinsupp.Lex r s) (single i (↑x i))\n⊢ support (erase b x) = t\n[PROOFSTEP]\nrw [support_erase, ht, Finset.erase_insert hb]\n[GOAL]\ncase insert\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nb : ι\nt : Finset ι\nhb : ¬b ∈ t\nih :\n  ∀ (x : Π₀ (i : ι), α i),\n    support x = t → (∀ (i : ι), i ∈ t → Acc (DFinsupp.Lex r s) (single i (↑x i))) → Acc (DFinsupp.Lex r s) x\nx : Π₀ (i : ι), α i\nht : support x = insert b t\nh : ∀ (i : ι), i ∈ insert b t → Acc (DFinsupp.Lex r s) (single i (↑x i))\na : ι\nha : a ∈ t\n⊢ Acc (DFinsupp.Lex r s) (single a (↑(erase b x) a))\n[PROOFSTEP]\nrw [erase_ne (ha.ne_of_not_mem hb)]\n[GOAL]\ncase insert\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nb : ι\nt : Finset ι\nhb : ¬b ∈ t\nih :\n  ∀ (x : Π₀ (i : ι), α i),\n    support x = t → (∀ (i : ι), i ∈ t → Acc (DFinsupp.Lex r s) (single i (↑x i))) → Acc (DFinsupp.Lex r s) x\nx : Π₀ (i : ι), α i\nht : support x = insert b t\nh : ∀ (i : ι), i ∈ insert b t → Acc (DFinsupp.Lex r s) (single i (↑x i))\na : ι\nha : a ∈ t\n⊢ Acc (DFinsupp.Lex r s) (single a (↑x a))\n[PROOFSTEP]\nexact h a (Finset.mem_insert_of_mem ha)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni : ι\nhi : Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) i\n⊢ ∀ (a : α i), Acc (DFinsupp.Lex r s) (single i a)\n[PROOFSTEP]\ninduction' hi with i _ ih\n[GOAL]\ncase intro\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\n⊢ ∀ (a : α i), Acc (DFinsupp.Lex r s) (single i a)\n[PROOFSTEP]\nrefine fun a => WellFounded.induction (hs i) (C := fun x ↦ Acc (DFinsupp.Lex r s) (single i x)) a fun a ha ↦ ?_\n[GOAL]\ncase intro\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\n⊢ (fun x => Acc (DFinsupp.Lex r s) (single i x)) a\n[PROOFSTEP]\nrefine Acc.intro _ fun x ↦ ?_\n[GOAL]\ncase intro\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\n⊢ DFinsupp.Lex r s x (single i a) → Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nrintro ⟨k, hr, hs⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nk : ι\nhr : ∀ (j : ι), r j k → ↑x j = ↑(single i a) j\nhs : s k (↑x k) (↑(single i a) k)\n⊢ Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nrw [single_apply] at hs \n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nk : ι\nhr : ∀ (j : ι), r j k → ↑x j = ↑(single i a) j\nhs : s k (↑x k) (if h : i = k then Eq.recOn h a else 0)\n⊢ Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nsplit_ifs at hs  with hik\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nk : ι\nhr : ∀ (j : ι), r j k → ↑x j = ↑(single i a) j\nhik : i = k\nhs : s k (↑x k) (Eq.recOn hik a)\n⊢ Acc (DFinsupp.Lex r s) x\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nk : ι\nhr : ∀ (j : ι), r j k → ↑x j = ↑(single i a) j\nhik : ¬i = k\nhs : s k (↑x k) 0\n⊢ Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nk : ι\nhr : ∀ (j : ι), r j k → ↑x j = ↑(single i a) j\nhik : ¬i = k\nhs : s k (↑x k) 0\n⊢ Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nexact (hbot hs).elim\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nk : ι\nhr : ∀ (j : ι), r j k → ↑x j = ↑(single i a) j\nhik : i = k\nhs : s k (↑x k) (Eq.recOn hik a)\n⊢ Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nsubst hik\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nhr : ∀ (j : ι), r j i → ↑x j = ↑(single i a) j\nhs : s i (↑x i) (Eq.recOn (_ : i = i) a)\n⊢ Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nclassical\nrefine Lex.acc_of_single hbot x fun j hj ↦ ?_\nobtain rfl | hij := eq_or_ne i j\n· exact ha _ hs\nby_cases r j i\n· rw [hr j h, single_eq_of_ne hij, single_zero]\n  exact Lex.acc_zero hbot\n· exact ih _ ⟨h, hij.symm⟩ _\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nhr : ∀ (j : ι), r j i → ↑x j = ↑(single i a) j\nhs : s i (↑x i) (Eq.recOn (_ : i = i) a)\n⊢ Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nrefine Lex.acc_of_single hbot x fun j hj ↦ ?_\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nhr : ∀ (j : ι), r j i → ↑x j = ↑(single i a) j\nhs : s i (↑x i) (Eq.recOn (_ : i = i) a)\nj : ι\nhj : j ∈ support x\n⊢ Acc (DFinsupp.Lex r fun i a => s i a) (single j (↑x j))\n[PROOFSTEP]\nobtain rfl | hij := eq_or_ne i j\n[GOAL]\ncase pos.inl\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nhr : ∀ (j : ι), r j i → ↑x j = ↑(single i a) j\nhs : s i (↑x i) (Eq.recOn (_ : i = i) a)\nhj : i ∈ support x\n⊢ Acc (DFinsupp.Lex r fun i a => s i a) (single i (↑x i))\n[PROOFSTEP]\nexact ha _ hs\n[GOAL]\ncase pos.inr\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nhr : ∀ (j : ι), r j i → ↑x j = ↑(single i a) j\nhs : s i (↑x i) (Eq.recOn (_ : i = i) a)\nj : ι\nhj : j ∈ support x\nhij : i ≠ j\n⊢ Acc (DFinsupp.Lex r fun i a => s i a) (single j (↑x j))\n[PROOFSTEP]\nby_cases r j i\n[GOAL]\ncase pos.inr\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nhr : ∀ (j : ι), r j i → ↑x j = ↑(single i a) j\nhs : s i (↑x i) (Eq.recOn (_ : i = i) a)\nj : ι\nhj : j ∈ support x\nhij : i ≠ j\n⊢ Acc (DFinsupp.Lex r fun i a => s i a) (single j (↑x j))\n[PROOFSTEP]\nby_cases r j i\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nhr : ∀ (j : ι), r j i → ↑x j = ↑(single i a) j\nhs : s i (↑x i) (Eq.recOn (_ : i = i) a)\nj : ι\nhj : j ∈ support x\nhij : i ≠ j\nh : r j i\n⊢ Acc (DFinsupp.Lex r fun i a => s i a) (single j (↑x j))\n[PROOFSTEP]\nrw [hr j h, single_eq_of_ne hij, single_zero]\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nhr : ∀ (j : ι), r j i → ↑x j = ↑(single i a) j\nhs : s i (↑x i) (Eq.recOn (_ : i = i) a)\nj : ι\nhj : j ∈ support x\nhij : i ≠ j\nh : r j i\n⊢ Acc (DFinsupp.Lex r fun i a => s i a) 0\n[PROOFSTEP]\nexact Lex.acc_zero hbot\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs✝ : ∀ (i : ι), WellFounded (s i)\ninst✝ : DecidableEq ι\ni✝ i : ι\nh✝ : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) y\nih : ∀ (y : ι), (rᶜ ⊓ fun x x_1 => x ≠ x_1) y i → ∀ (a : α y), Acc (DFinsupp.Lex r s) (single y a)\na✝ a : α i\nha : ∀ (y : α i), s i y a → (fun x => Acc (DFinsupp.Lex r s) (single i x)) y\nx : Π₀ (i : ι), α i\nhr : ∀ (j : ι), r j i → ↑x j = ↑(single i a) j\nhs : s i (↑x i) (Eq.recOn (_ : i = i) a)\nj : ι\nhj : j ∈ support x\nhij : i ≠ j\nh : ¬r j i\n⊢ Acc (DFinsupp.Lex r fun i a => s i a) (single j (↑x j))\n[PROOFSTEP]\nexact ih _ ⟨h, hij.symm⟩ _\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs : ∀ (i : ι), WellFounded (s i)\nhr : WellFounded (rᶜ ⊓ fun x x_1 => x ≠ x_1)\nx : Π₀ (i : ι), α i\n⊢ Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nclassical exact Lex.acc hbot hs x fun i _ => hr.apply i\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → Zero (α i)\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0\nhs : ∀ (i : ι), WellFounded (s i)\nhr : WellFounded (rᶜ ⊓ fun x x_1 => x ≠ x_1)\nx : Π₀ (i : ι), α i\n⊢ Acc (DFinsupp.Lex r s) x\n[PROOFSTEP]\nexact Lex.acc hbot hs x fun i _ => hr.apply i\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : IsStrictTotalOrder ι r\ninst✝ : Finite ι\nhs : ∀ (i : ι), WellFounded (s i)\n⊢ WellFounded (Pi.Lex r fun {i} => s i)\n[PROOFSTEP]\nobtain h | ⟨⟨x⟩⟩ := isEmpty_or_nonempty (∀ i, α i)\n[GOAL]\ncase inl\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : IsStrictTotalOrder ι r\ninst✝ : Finite ι\nhs : ∀ (i : ι), WellFounded (s i)\nh : IsEmpty ((i : ι) → α i)\n⊢ WellFounded (Pi.Lex r fun {i} => s i)\n[PROOFSTEP]\nconvert emptyWf.wf\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : IsStrictTotalOrder ι r\ninst✝ : Finite ι\nhs : ∀ (i : ι), WellFounded (s i)\nx : (i : ι) → α i\n⊢ WellFounded (Pi.Lex r fun {i} => s i)\n[PROOFSTEP]\nletI : ∀ i, Zero (α i) := fun i => ⟨(hs i).min ⊤ ⟨x i, trivial⟩⟩\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : IsStrictTotalOrder ι r\ninst✝ : Finite ι\nhs : ∀ (i : ι), WellFounded (s i)\nx : (i : ι) → α i\nthis : (i : ι) → Zero (α i) := fun i => { zero := WellFounded.min (_ : WellFounded (s i)) ⊤ (_ : ∃ x, x ∈ ⊤) }\n⊢ WellFounded (Pi.Lex r fun {i} => s i)\n[PROOFSTEP]\nhaveI := IsTrans.swap r\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : IsStrictTotalOrder ι r\ninst✝ : Finite ι\nhs : ∀ (i : ι), WellFounded (s i)\nx : (i : ι) → α i\nthis✝ : (i : ι) → Zero (α i) := fun i => { zero := WellFounded.min (_ : WellFounded (s i)) ⊤ (_ : ∃ x, x ∈ ⊤) }\nthis : IsTrans ι (Function.swap r)\n⊢ WellFounded (Pi.Lex r fun {i} => s i)\n[PROOFSTEP]\nhaveI := IsIrrefl.swap r\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : IsStrictTotalOrder ι r\ninst✝ : Finite ι\nhs : ∀ (i : ι), WellFounded (s i)\nx : (i : ι) → α i\nthis✝¹ : (i : ι) → Zero (α i) := fun i => { zero := WellFounded.min (_ : WellFounded (s i)) ⊤ (_ : ∃ x, x ∈ ⊤) }\nthis✝ : IsTrans ι (Function.swap r)\nthis : IsIrrefl ι (Function.swap r)\n⊢ WellFounded (Pi.Lex r fun {i} => s i)\n[PROOFSTEP]\nhaveI := Fintype.ofFinite ι\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : IsStrictTotalOrder ι r\ninst✝ : Finite ι\nhs : ∀ (i : ι), WellFounded (s i)\nx : (i : ι) → α i\nthis✝² : (i : ι) → Zero (α i) := fun i => { zero := WellFounded.min (_ : WellFounded (s i)) ⊤ (_ : ∃ x, x ∈ ⊤) }\nthis✝¹ : IsTrans ι (Function.swap r)\nthis✝ : IsIrrefl ι (Function.swap r)\nthis : Fintype ι\n⊢ WellFounded (Pi.Lex r fun {i} => s i)\n[PROOFSTEP]\nrefine' InvImage.wf equivFunOnFintype.symm (Lex.wellFounded' (fun i a => _) hs _)\n[GOAL]\ncase inr.intro.refine'_1\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : IsStrictTotalOrder ι r\ninst✝ : Finite ι\nhs : ∀ (i : ι), WellFounded (s i)\nx : (i : ι) → α i\nthis✝² : (i : ι) → Zero (α i) := fun i => { zero := WellFounded.min (_ : WellFounded (s i)) ⊤ (_ : ∃ x, x ∈ ⊤) }\nthis✝¹ : IsTrans ι (Function.swap r)\nthis✝ : IsIrrefl ι (Function.swap r)\nthis : Fintype ι\ni : ι\na : α i\n⊢ ¬s i a 0\ncase inr.intro.refine'_2\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : IsStrictTotalOrder ι r\ninst✝ : Finite ι\nhs : ∀ (i : ι), WellFounded (s i)\nx : (i : ι) → α i\nthis✝² : (i : ι) → Zero (α i) := fun i => { zero := WellFounded.min (_ : WellFounded (s i)) ⊤ (_ : ∃ x, x ∈ ⊤) }\nthis✝¹ : IsTrans ι (Function.swap r)\nthis✝ : IsIrrefl ι (Function.swap r)\nthis : Fintype ι\n⊢ WellFounded (Function.swap fun j i => r j i)\n[PROOFSTEP]\nexacts [(hs i).not_lt_min ⊤ _ trivial, Finite.wellFounded_of_trans_of_irrefl (Function.swap r)]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nset β := fun i ↦ Antisymmetrization (α i) (· ≤ ·)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nset e : (i : ι) → α i → β i := fun i ↦ toAntisymmetrization (· ≤ ·)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\ne : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nlet _ : ∀ i, Zero (β i) := fun i ↦ ⟨e i 0⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\ne : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1\nx✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nhave : WellFounded (DFinsupp.Lex (Function.swap <| @WellOrderingRel ι) (fun _ ↦ (· < ·) : (i : ι) → β i → β i → Prop))\n[GOAL]\ncase this\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\ne : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1\nx✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }\n⊢ WellFounded (DFinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)\n[PROOFSTEP]\nhave := IsTrichotomous.swap (@WellOrderingRel ι)\n[GOAL]\ncase this\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\ne : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1\nx✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }\nthis : IsTrichotomous ι (Function.swap WellOrderingRel)\n⊢ WellFounded (DFinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)\n[PROOFSTEP]\nrefine Lex.wellFounded' ?_ (fun i ↦ IsWellFounded.wf) ?_\n[GOAL]\ncase this.refine_1\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\ne : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1\nx✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }\nthis : IsTrichotomous ι (Function.swap WellOrderingRel)\n⊢ ∀ ⦃i : ι⦄ ⦃a : β i⦄, ¬a < 0\n[PROOFSTEP]\nrintro i ⟨a⟩\n[GOAL]\ncase this.refine_1.mk\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\ne : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1\nx✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }\nthis : IsTrichotomous ι (Function.swap WellOrderingRel)\ni : ι\na✝ : β i\na : α i\n⊢ ¬Quot.mk Setoid.r a < 0\n[PROOFSTEP]\napply hbot\n[GOAL]\ncase this.refine_2\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\ne : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1\nx✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }\nthis : IsTrichotomous ι (Function.swap WellOrderingRel)\n⊢ WellFounded (Function.swap (Function.swap WellOrderingRel))\n[PROOFSTEP]\nsimp only [Function.swap]\n[GOAL]\ncase this.refine_2\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\ne : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1\nx✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }\nthis : IsTrichotomous ι (Function.swap WellOrderingRel)\n⊢ WellFounded fun y x => WellOrderingRel y x\n[PROOFSTEP]\nexact IsWellFounded.wf\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\ne : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1\nx✝ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }\nthis : WellFounded (DFinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nrefine Subrelation.wf (fun h => ?_) <| InvImage.wf (mapRange (fun i ↦ e i) fun _ ↦ rfl) this\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\ne : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1\nx✝¹ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }\nthis : WellFounded (DFinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)\nx✝ y✝ : Π₀ (i : ι), α i\nh : x✝ < y✝\n⊢ InvImage (DFinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)\n    (mapRange (fun i => e i) (_ : ∀ (x : ι), (fun i => e i) x 0 = (fun i => e i) x 0)) x✝ y✝\n[PROOFSTEP]\nhave := IsStrictOrder.swap (@WellOrderingRel ι)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\ne : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1\nx✝¹ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }\nthis✝ : WellFounded (DFinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)\nx✝ y✝ : Π₀ (i : ι), α i\nh : x✝ < y✝\nthis : IsStrictOrder ι (Function.swap WellOrderingRel)\n⊢ InvImage (DFinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)\n    (mapRange (fun i => e i) (_ : ∀ (x : ι), (fun i => e i) x 0 = (fun i => e i) x 0)) x✝ y✝\n[PROOFSTEP]\nobtain ⟨i, he, hl⟩ := lex_lt_of_lt_of_preorder (Function.swap WellOrderingRel) h\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), WellFoundedLT (α i)\nhbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬a < 0\nβ : ι → Type u_2 := fun i => Antisymmetrization (α i) fun x x_1 => x ≤ x_1\ne : (i : ι) → α i → β i := fun i => toAntisymmetrization fun x x_1 => x ≤ x_1\nx✝¹ : (i : ι) → Zero (β i) := fun i => { zero := e i 0 }\nthis✝ : WellFounded (DFinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)\nx✝ y✝ : Π₀ (i : ι), α i\nh : x✝ < y✝\nthis : IsStrictOrder ι (Function.swap WellOrderingRel)\ni : ι\nhe : ∀ (j : ι), Function.swap WellOrderingRel j i → ↑x✝ j ≤ ↑y✝ j ∧ ↑y✝ j ≤ ↑x✝ j\nhl : ↑x✝ i < ↑y✝ i\n⊢ InvImage (DFinsupp.Lex (Function.swap WellOrderingRel) fun x x_1 x_2 => x_1 < x_2)\n    (mapRange (fun i => e i) (_ : ∀ (x : ι), (fun i => e i) x 0 = (fun i => e i) x 0)) x✝ y✝\n[PROOFSTEP]\nexact ⟨i, fun j hj ↦ Quot.sound (he j hj), hl⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : Finite ι\ninst✝ : (i : ι) → Preorder (α i)\nhw : ∀ (i : ι), WellFoundedLT (α i)\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nobtain h | ⟨⟨x⟩⟩ := isEmpty_or_nonempty (∀ i, α i)\n[GOAL]\ncase inl\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : Finite ι\ninst✝ : (i : ι) → Preorder (α i)\nhw : ∀ (i : ι), WellFoundedLT (α i)\nh : IsEmpty ((i : ι) → α i)\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nconvert emptyWf.wf\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : Finite ι\ninst✝ : (i : ι) → Preorder (α i)\nhw : ∀ (i : ι), WellFoundedLT (α i)\nx : (i : ι) → α i\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nletI : ∀ i, Zero (α i) := fun i => ⟨(hw i).wf.min ⊤ ⟨x i, trivial⟩⟩\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : Finite ι\ninst✝ : (i : ι) → Preorder (α i)\nhw : ∀ (i : ι), WellFoundedLT (α i)\nx : (i : ι) → α i\nthis : (i : ι) → Zero (α i) :=\n  fun i => { zero := WellFounded.min (_ : WellFounded fun x x_1 => x < x_1) ⊤ (_ : ∃ x, x ∈ ⊤) }\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nhaveI := Fintype.ofFinite ι\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : Finite ι\ninst✝ : (i : ι) → Preorder (α i)\nhw : ∀ (i : ι), WellFoundedLT (α i)\nx : (i : ι) → α i\nthis✝ : (i : ι) → Zero (α i) :=\n  fun i => { zero := WellFounded.min (_ : WellFounded fun x x_1 => x < x_1) ⊤ (_ : ∃ x, x ∈ ⊤) }\nthis : Fintype ι\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nrefine' InvImage.wf equivFunOnFintype.symm (DFinsupp.wellFoundedLT fun i a => _).wf\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : ι → Type u_2\nr : ι → ι → Prop\ns : (i : ι) → α i → α i → Prop\ninst✝¹ : Finite ι\ninst✝ : (i : ι) → Preorder (α i)\nhw : ∀ (i : ι), WellFoundedLT (α i)\nx : (i : ι) → α i\nthis✝ : (i : ι) → Zero (α i) :=\n  fun i => { zero := WellFounded.min (_ : WellFounded fun x x_1 => x < x_1) ⊤ (_ : ∃ x, x ∈ ⊤) }\nthis : Fintype ι\ni : ι\na : α i\n⊢ ¬a < 0\n[PROOFSTEP]\nexact (hw i).wf.not_lt_min ⊤ _ trivial\n", "meta": {"mathlib_filename": "Mathlib.Data.DFinsupp.WellFounded", "llama_tokens": 31298, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.8080672227971211, "lm_q2_score": 0.49218813572079556, "lm_q1q2_score": 0.3977210999255958}}
{"text": "[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\ne : α ≃ β\ns : Set α\nt : Set β\n⊢ ↑e.symm '' t ⊆ s ↔ t ⊆ ↑e '' s\n[PROOFSTEP]\nrw [image_subset_iff, e.image_eq_preimage]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\ne : α ≃ β\ns : Set α\nt : Set β\n⊢ s ⊆ ↑e.symm '' t ↔ ↑e.symm.symm '' s ⊆ t\n[PROOFSTEP]\nrw [e.symm.subset_image]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\ne : α ≃ β\ns : Set α\nt : Set β\n⊢ ↑e.symm.symm '' s ⊆ t ↔ ↑e '' s ⊆ t\n[PROOFSTEP]\nrw [e.symm_symm]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Set α\nt : Set β\nu : Set γ\n⊢ ↑(prodAssoc α β γ) ⁻¹' s ×ˢ t ×ˢ u = (s ×ˢ t) ×ˢ u\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Set α\nt : Set β\nu : Set γ\nx✝ : (α × β) × γ\n⊢ x✝ ∈ ↑(prodAssoc α β γ) ⁻¹' s ×ˢ t ×ˢ u ↔ x✝ ∈ (s ×ˢ t) ×ˢ u\n[PROOFSTEP]\nsimp [and_assoc]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Set α\nt : Set β\nu : Set γ\n⊢ ↑(prodAssoc α β γ).symm ⁻¹' (s ×ˢ t) ×ˢ u = s ×ˢ t ×ˢ u\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Set α\nt : Set β\nu : Set γ\nx✝ : α × β × γ\n⊢ x✝ ∈ ↑(prodAssoc α β γ).symm ⁻¹' (s ×ˢ t) ×ˢ u ↔ x✝ ∈ s ×ˢ t ×ˢ u\n[PROOFSTEP]\nsimp [and_assoc]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Set α\nt : Set β\nu : Set γ\n⊢ ↑(prodAssoc α β γ) '' (s ×ˢ t) ×ˢ u = s ×ˢ t ×ˢ u\n[PROOFSTEP]\nsimpa only [Equiv.image_eq_preimage] using prod_assoc_symm_preimage\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Set α\nt : Set β\nu : Set γ\n⊢ ↑(prodAssoc α β γ).symm '' s ×ˢ t ×ˢ u = (s ×ˢ t) ×ˢ u\n[PROOFSTEP]\nsimpa only [Equiv.image_eq_preimage] using prod_assoc_preimage\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\ns : Set (α × β)\nx : ↑s\n⊢ (↑x).snd ∈ {y | ((↑x).fst, y) ∈ s}\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\ne : α ≃ β\ns : Set α\nx : ↑s\n⊢ ↑e ↑x ∈ ↑e '' s\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\ne : α ≃ β\ns : Set α\ny : ↑(↑e '' s)\n⊢ ↑e.symm ↑y ∈ s\n[PROOFSTEP]\nrcases y with ⟨-, ⟨a, ⟨m, rfl⟩⟩⟩\n[GOAL]\ncase mk.intro.intro\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\ne : α ≃ β\ns : Set α\na : α\nm : a ∈ s\n⊢ ↑e.symm ↑{ val := ↑e a, property := (_ : ∃ a_1, a_1 ∈ s ∧ ↑e a_1 = ↑e a) } ∈ s\n[PROOFSTEP]\nsimpa using m\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\ne : α ≃ β\ns : Set α\nx : ↑s\n⊢ (fun y => { val := ↑e.symm ↑y, property := (_ : ↑e.symm ↑y ∈ s) })\n      ((fun x => { val := ↑e ↑x, property := (_ : ↑e ↑x ∈ ↑e '' s) }) x) =\n    x\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\ne : α ≃ β\ns : Set α\ny : ↑(↑e '' s)\n⊢ (fun x => { val := ↑e ↑x, property := (_ : ↑e ↑x ∈ ↑e '' s) })\n      ((fun y => { val := ↑e.symm ↑y, property := (_ : ↑e.symm ↑y ∈ s) }) y) =\n    y\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.13643\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nhs : ∀ (x : α), x ∈ s → p x\nht : ∀ (x : α), x ∈ t → ¬p x\nx✝ : ↑(s ∪ t)\nx : α\nh' : x ∈ s ∪ t\n⊢ (fun o =>\n        match o with\n        | Sum.inl x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) }\n        | Sum.inr x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) })\n      ((fun x =>\n          if hp : p ↑x then Sum.inl { val := ↑x, property := (_ : ↑x ∈ s) }\n          else Sum.inr { val := ↑x, property := (_ : ↑x ∈ t) })\n        { val := x, property := h' }) =\n    { val := x, property := h' }\n[PROOFSTEP]\nby_cases h : p x\n[GOAL]\ncase pos\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.13643\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nhs : ∀ (x : α), x ∈ s → p x\nht : ∀ (x : α), x ∈ t → ¬p x\nx✝ : ↑(s ∪ t)\nx : α\nh' : x ∈ s ∪ t\nh : p x\n⊢ (fun o =>\n        match o with\n        | Sum.inl x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) }\n        | Sum.inr x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) })\n      ((fun x =>\n          if hp : p ↑x then Sum.inl { val := ↑x, property := (_ : ↑x ∈ s) }\n          else Sum.inr { val := ↑x, property := (_ : ↑x ∈ t) })\n        { val := x, property := h' }) =\n    { val := x, property := h' }\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.13643\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nhs : ∀ (x : α), x ∈ s → p x\nht : ∀ (x : α), x ∈ t → ¬p x\nx✝ : ↑(s ∪ t)\nx : α\nh' : x ∈ s ∪ t\nh : ¬p x\n⊢ (fun o =>\n        match o with\n        | Sum.inl x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) }\n        | Sum.inr x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) })\n      ((fun x =>\n          if hp : p ↑x then Sum.inl { val := ↑x, property := (_ : ↑x ∈ s) }\n          else Sum.inr { val := ↑x, property := (_ : ↑x ∈ t) })\n        { val := x, property := h' }) =\n    { val := x, property := h' }\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.13643\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nhs : ∀ (x : α), x ∈ s → p x\nht : ∀ (x : α), x ∈ t → ¬p x\no : ↑s ⊕ ↑t\n⊢ (fun x =>\n        if hp : p ↑x then Sum.inl { val := ↑x, property := (_ : ↑x ∈ s) }\n        else Sum.inr { val := ↑x, property := (_ : ↑x ∈ t) })\n      ((fun o =>\n          match o with\n          | Sum.inl x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) }\n          | Sum.inr x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) })\n        o) =\n    o\n[PROOFSTEP]\nrcases o with (⟨x, h⟩ | ⟨x, h⟩) <;> [simp [hs _ h]; simp [ht _ h]]\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.13643\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nhs : ∀ (x : α), x ∈ s → p x\nht : ∀ (x : α), x ∈ t → ¬p x\no : ↑s ⊕ ↑t\n⊢ (fun x =>\n        if hp : p ↑x then Sum.inl { val := ↑x, property := (_ : ↑x ∈ s) }\n        else Sum.inr { val := ↑x, property := (_ : ↑x ∈ t) })\n      ((fun o =>\n          match o with\n          | Sum.inl x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) }\n          | Sum.inr x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) })\n        o) =\n    o\n[PROOFSTEP]\nrcases o with (⟨x, h⟩ | ⟨x, h⟩)\n[GOAL]\ncase inl.mk\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.13643\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nhs : ∀ (x : α), x ∈ s → p x\nht : ∀ (x : α), x ∈ t → ¬p x\nx : α\nh : x ∈ s\n⊢ (fun x =>\n        if hp : p ↑x then Sum.inl { val := ↑x, property := (_ : ↑x ∈ s) }\n        else Sum.inr { val := ↑x, property := (_ : ↑x ∈ t) })\n      ((fun o =>\n          match o with\n          | Sum.inl x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) }\n          | Sum.inr x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) })\n        (Sum.inl { val := x, property := h })) =\n    Sum.inl { val := x, property := h }\n[PROOFSTEP]\nsimp [hs _ h]\n[GOAL]\ncase inr.mk\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.13643\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nhs : ∀ (x : α), x ∈ s → p x\nht : ∀ (x : α), x ∈ t → ¬p x\nx : α\nh : x ∈ t\n⊢ (fun x =>\n        if hp : p ↑x then Sum.inl { val := ↑x, property := (_ : ↑x ∈ s) }\n        else Sum.inr { val := ↑x, property := (_ : ↑x ∈ t) })\n      ((fun o =>\n          match o with\n          | Sum.inl x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) }\n          | Sum.inr x => { val := ↑x, property := (_ : ↑x ∈ s ∨ ↑x ∈ t) })\n        (Sum.inr { val := x, property := h })) =\n    Sum.inr { val := x, property := h }\n[PROOFSTEP]\nsimp [ht _ h]\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.20174\na : α\nx✝ : ↑{a}\nx : α\nh : x ∈ {a}\n⊢ (fun x => { val := a, property := (_ : a ∈ {a}) }) ((fun x => PUnit.unit) { val := x, property := h }) =\n    { val := x, property := h }\n[PROOFSTEP]\nsimp at h \n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.20174\na : α\nx✝ : ↑{a}\nx : α\nh✝ : x ∈ {a}\nh : x = a\n⊢ (fun x => { val := a, property := (_ : a ∈ {a}) }) ((fun x => PUnit.unit) { val := x, property := h✝ }) =\n    { val := x, property := h✝ }\n[PROOFSTEP]\nsubst x\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.20174\na : α\nx✝ : ↑{a}\nh : a = a\n⊢ (fun x => { val := a, property := (_ : a ∈ {a}) }) ((fun x => PUnit.unit) { val := a, property := (_ : a = a) }) =\n    { val := a, property := (_ : a = a) }\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\na : α\nH : ¬a ∈ s\n⊢ insert a s = s ∪ {a}\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\na : α\nH : ¬a ∈ s\nx : α\nx✝ : x ∈ s ∩ {a}\nhx : x ∈ s\nright✝ : x ∈ {a}\n⊢ x ∈ ∅\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.24478\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ s ∩ sᶜ ⊆ ∅\n[PROOFSTEP]\nsimp [Set.ext_iff]\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.24478\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ s ∪ sᶜ = univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nx : α\nhx : x ∈ s\n⊢ ↑(Set.sumCompl s).symm x = Sum.inl { val := x, property := hx }\n[PROOFSTEP]\nhave : ((⟨x, Or.inl hx⟩ : (s ∪ sᶜ : Set α)) : α) ∈ s := hx\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nx : α\nhx : x ∈ s\nthis : ↑{ val := x, property := (_ : x ∈ s ∨ x ∈ sᶜ) } ∈ s\n⊢ ↑(Set.sumCompl s).symm x = Sum.inl { val := x, property := hx }\n[PROOFSTEP]\nrw [Equiv.Set.sumCompl]\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nx : α\nhx : x ∈ s\nthis : ↑{ val := x, property := (_ : x ∈ s ∨ x ∈ sᶜ) } ∈ s\n⊢ ↑(Trans.trans (Trans.trans (Set.union (_ : s ∩ sᶜ ⊆ ∅)).symm (Set.ofEq (_ : s ∪ sᶜ = univ))) (Set.univ α)).symm x =\n    Sum.inl { val := x, property := hx }\n[PROOFSTEP]\nsimpa using Set.union_apply_left (by simp) this\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nx : α\nhx : x ∈ s\nthis : ↑{ val := x, property := (_ : x ∈ s ∨ x ∈ sᶜ) } ∈ s\n⊢ s ∩ sᶜ ⊆ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nx : α\nhx : ¬x ∈ s\n⊢ ↑(Set.sumCompl s).symm x = Sum.inr { val := x, property := hx }\n[PROOFSTEP]\nhave : ((⟨x, Or.inr hx⟩ : (s ∪ sᶜ : Set α)) : α) ∈ sᶜ := hx\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nx : α\nhx : ¬x ∈ s\nthis : ↑{ val := x, property := (_ : x ∈ s ∨ x ∈ sᶜ) } ∈ sᶜ\n⊢ ↑(Set.sumCompl s).symm x = Sum.inr { val := x, property := hx }\n[PROOFSTEP]\nrw [Equiv.Set.sumCompl]\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nx : α\nhx : ¬x ∈ s\nthis : ↑{ val := x, property := (_ : x ∈ s ∨ x ∈ sᶜ) } ∈ sᶜ\n⊢ ↑(Trans.trans (Trans.trans (Set.union (_ : s ∩ sᶜ ⊆ ∅)).symm (Set.ofEq (_ : s ∪ sᶜ = univ))) (Set.univ α)).symm x =\n    Sum.inr { val := x, property := hx }\n[PROOFSTEP]\nsimpa using Set.union_apply_right (by simp) this\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nx : α\nhx : ¬x ∈ s\nthis : ↑{ val := x, property := (_ : x ∈ s ∨ x ∈ sᶜ) } ∈ sᶜ\n⊢ s ∩ sᶜ ⊆ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u_1\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nx : ↑s\n⊢ ↑(Set.sumCompl s).symm ↑x = Sum.inl x\n[PROOFSTEP]\ncases' x with x hx\n[GOAL]\ncase mk\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u_1\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nx : α\nhx : x ∈ s\n⊢ ↑(Set.sumCompl s).symm ↑{ val := x, property := hx } = Sum.inl { val := x, property := hx }\n[PROOFSTEP]\nexact Set.sumCompl_symm_apply_of_mem hx\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u_1\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nx : ↑sᶜ\n⊢ ↑(Set.sumCompl s).symm ↑x = Sum.inr x\n[PROOFSTEP]\ncases' x with x hx\n[GOAL]\ncase mk\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u_1\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nx : α\nhx : x ∈ sᶜ\n⊢ ↑(Set.sumCompl s).symm ↑{ val := x, property := hx } = Sum.inr { val := x, property := hx }\n[PROOFSTEP]\nexact Set.sumCompl_symm_apply_of_not_mem hx\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.32810\ns t : Set α\nh : s ⊆ t\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ s ∩ (t \\ s) ⊆ ∅\n[PROOFSTEP]\nsimp [inter_diff_self]\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.32810\ns t : Set α\nh : s ⊆ t\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ s ∪ t \\ s = t\n[PROOFSTEP]\nsimp [union_diff_self, union_eq_self_of_subset_left h]\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u_1\ns t : Set α\nh : s ⊆ t\ninst✝ : DecidablePred fun x => x ∈ s\nx : ↑t\nhx : ↑x ∈ s\n⊢ ↑(Set.sumDiffSubset h).symm x = Sum.inl { val := ↑x, property := hx }\n[PROOFSTEP]\napply (Equiv.Set.sumDiffSubset h).injective\n[GOAL]\ncase a\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u_1\ns t : Set α\nh : s ⊆ t\ninst✝ : DecidablePred fun x => x ∈ s\nx : ↑t\nhx : ↑x ∈ s\n⊢ ↑(Set.sumDiffSubset h) (↑(Set.sumDiffSubset h).symm x) =\n    ↑(Set.sumDiffSubset h) (Sum.inl { val := ↑x, property := hx })\n[PROOFSTEP]\nsimp only [apply_symm_apply, sumDiffSubset_apply_inl]\n[GOAL]\ncase a\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u_1\ns t : Set α\nh : s ⊆ t\ninst✝ : DecidablePred fun x => x ∈ s\nx : ↑t\nhx : ↑x ∈ s\n⊢ x = inclusion h { val := ↑x, property := hx }\n[PROOFSTEP]\nexact Subtype.eq rfl\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u_1\ns t : Set α\nh : s ⊆ t\ninst✝ : DecidablePred fun x => x ∈ s\nx : ↑t\nhx : ¬↑x ∈ s\n⊢ ↑(Set.sumDiffSubset h).symm x = Sum.inr { val := ↑x, property := (_ : ↑x ∈ t ∧ ¬↑x ∈ s) }\n[PROOFSTEP]\napply (Equiv.Set.sumDiffSubset h).injective\n[GOAL]\ncase a\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u_1\ns t : Set α\nh : s ⊆ t\ninst✝ : DecidablePred fun x => x ∈ s\nx : ↑t\nhx : ¬↑x ∈ s\n⊢ ↑(Set.sumDiffSubset h) (↑(Set.sumDiffSubset h).symm x) =\n    ↑(Set.sumDiffSubset h) (Sum.inr { val := ↑x, property := (_ : ↑x ∈ t ∧ ¬↑x ∈ s) })\n[PROOFSTEP]\nsimp only [apply_symm_apply, sumDiffSubset_apply_inr]\n[GOAL]\ncase a\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u_1\ns t : Set α\nh : s ⊆ t\ninst✝ : DecidablePred fun x => x ∈ s\nx : ↑t\nhx : ¬↑x ∈ s\n⊢ x = inclusion (_ : t \\ s ⊆ t) { val := ↑x, property := (_ : ↑x ∈ t ∧ ¬↑x ∈ s) }\n[PROOFSTEP]\nexact Subtype.eq rfl\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns t : Set α\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ ↑(s ∪ t) ⊕ ↑(s ∩ t) ≃ ↑(s ∪ t \\ s) ⊕ ↑(s ∩ t)\n[PROOFSTEP]\nrw [union_diff_self]\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns t : Set α\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ ↑(t \\ s) ⊕ ↑(s ∩ t) ≃ ↑(t \\ s ∪ s ∩ t)\n[PROOFSTEP]\nrefine' (Set.union' (· ∉ s) _ _).symm\n[GOAL]\ncase refine'_1\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns t : Set α\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ ∀ (x : α), x ∈ t \\ s → (fun x => ¬x ∈ s) x\ncase refine'_2\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns t : Set α\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ ∀ (x : α), x ∈ s ∩ t → ¬(fun x => ¬x ∈ s) x\n[PROOFSTEP]\nexacts [fun x hx => hx.2, fun x hx => not_not_intro hx.1]\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns t : Set α\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ ↑s ⊕ ↑(t \\ s ∪ s ∩ t) ≃ ↑s ⊕ ↑t\n[PROOFSTEP]\n{ rw [(_ : t \\ s ∪ s ∩ t = t)]\n  rw [union_comm, inter_comm, inter_union_diff]\n}\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns t : Set α\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ ↑s ⊕ ↑(t \\ s ∪ s ∩ t) ≃ ↑s ⊕ ↑t\n[PROOFSTEP]\nrw [(_ : t \\ s ∪ s ∩ t = t)]\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u\ns t : Set α\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ t \\ s ∪ s ∩ t = t\n[PROOFSTEP]\nrw [union_comm, inter_comm, inter_union_diff]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u\nβ : Type v\ns : Set α\nt : Set β\ninst✝¹ : DecidablePred fun x => x ∈ s\ninst✝ : DecidablePred fun x => x ∈ t\ne₀ : ↑s ≃ ↑t\ne₁ : ↑sᶜ ≃ ↑tᶜ\nx : ↑s\n⊢ ↑(Trans.trans (Trans.trans (Set.sumCompl s).symm (sumCongr e₀ e₁)) (Set.sumCompl t)) ↑x = ↑(↑e₀ x)\n[PROOFSTEP]\nsimp only [Sum.map_inl, trans_apply, sumCongr_apply, Set.sumCompl_apply_inl, Set.sumCompl_symm_apply, Trans.trans]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u\nβ : Type v\ns : Set α\nt : Set β\ninst✝¹ : DecidablePred fun x => x ∈ s\ninst✝ : DecidablePred fun x => x ∈ t\ne₀ : ↑s ≃ ↑t\ne : { e // ∀ (x : ↑s), ↑e ↑x = ↑(↑e₀ x) }\n⊢ (fun e₁ =>\n        { val := Trans.trans (Trans.trans (Set.sumCompl s).symm (sumCongr e₀ e₁)) (Set.sumCompl t),\n          property := (_ : ∀ (x : ↑s), ↑(Set.sumCompl t) (↑(sumCongr e₀ e₁) (↑(Set.sumCompl s).symm ↑x)) = ↑(↑e₀ x)) })\n      ((fun e => subtypeEquiv ↑e (_ : ∀ (a : α), ¬a ∈ s ↔ ¬↑↑e a ∈ t)) e) =\n    e\n[PROOFSTEP]\next x\n[GOAL]\ncase a.H\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u\nβ : Type v\ns : Set α\nt : Set β\ninst✝¹ : DecidablePred fun x => x ∈ s\ninst✝ : DecidablePred fun x => x ∈ t\ne₀ : ↑s ≃ ↑t\ne : { e // ∀ (x : ↑s), ↑e ↑x = ↑(↑e₀ x) }\nx : α\n⊢ ↑↑((fun e₁ =>\n              { val := Trans.trans (Trans.trans (Set.sumCompl s).symm (sumCongr e₀ e₁)) (Set.sumCompl t),\n                property :=\n                  (_ : ∀ (x : ↑s), ↑(Set.sumCompl t) (↑(sumCongr e₀ e₁) (↑(Set.sumCompl s).symm ↑x)) = ↑(↑e₀ x)) })\n            ((fun e => subtypeEquiv ↑e (_ : ∀ (a : α), ¬a ∈ s ↔ ¬↑↑e a ∈ t)) e))\n      x =\n    ↑↑e x\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u\nβ : Type v\ns : Set α\nt : Set β\ninst✝¹ : DecidablePred fun x => x ∈ s\ninst✝ : DecidablePred fun x => x ∈ t\ne₀ : ↑s ≃ ↑t\ne : { e // ∀ (x : ↑s), ↑e ↑x = ↑(↑e₀ x) }\nx : α\nhx : x ∈ s\n⊢ ↑↑((fun e₁ =>\n              { val := Trans.trans (Trans.trans (Set.sumCompl s).symm (sumCongr e₀ e₁)) (Set.sumCompl t),\n                property :=\n                  (_ : ∀ (x : ↑s), ↑(Set.sumCompl t) (↑(sumCongr e₀ e₁) (↑(Set.sumCompl s).symm ↑x)) = ↑(↑e₀ x)) })\n            ((fun e => subtypeEquiv ↑e (_ : ∀ (a : α), ¬a ∈ s ↔ ¬↑↑e a ∈ t)) e))\n      x =\n    ↑↑e x\n[PROOFSTEP]\nsimp only [Set.sumCompl_symm_apply_of_mem hx, ← e.prop ⟨x, hx⟩, Sum.map_inl, sumCongr_apply, trans_apply,\n  Subtype.coe_mk, Set.sumCompl_apply_inl, Trans.trans]\n[GOAL]\ncase neg\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u\nβ : Type v\ns : Set α\nt : Set β\ninst✝¹ : DecidablePred fun x => x ∈ s\ninst✝ : DecidablePred fun x => x ∈ t\ne₀ : ↑s ≃ ↑t\ne : { e // ∀ (x : ↑s), ↑e ↑x = ↑(↑e₀ x) }\nx : α\nhx : ¬x ∈ s\n⊢ ↑↑((fun e₁ =>\n              { val := Trans.trans (Trans.trans (Set.sumCompl s).symm (sumCongr e₀ e₁)) (Set.sumCompl t),\n                property :=\n                  (_ : ∀ (x : ↑s), ↑(Set.sumCompl t) (↑(sumCongr e₀ e₁) (↑(Set.sumCompl s).symm ↑x)) = ↑(↑e₀ x)) })\n            ((fun e => subtypeEquiv ↑e (_ : ∀ (a : α), ¬a ∈ s ↔ ¬↑↑e a ∈ t)) e))\n      x =\n    ↑↑e x\n[PROOFSTEP]\nsimp only [Set.sumCompl_symm_apply_of_not_mem hx, Sum.map_inr, subtypeEquiv_apply, Set.sumCompl_apply_inr, trans_apply,\n  sumCongr_apply, Subtype.coe_mk, Trans.trans]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u\nβ : Type v\ns : Set α\nt : Set β\ninst✝¹ : DecidablePred fun x => x ∈ s\ninst✝ : DecidablePred fun x => x ∈ t\ne₀ : ↑s ≃ ↑t\ne : ↑sᶜ ≃ ↑tᶜ\nx : { a // a ∈ sᶜ }\n⊢ ↑((fun e => subtypeEquiv ↑e (_ : ∀ (a : α), ¬a ∈ s ↔ ¬↑↑e a ∈ t))\n          ((fun e₁ =>\n              { val := Trans.trans (Trans.trans (Set.sumCompl s).symm (sumCongr e₀ e₁)) (Set.sumCompl t),\n                property :=\n                  (_ : ∀ (x : ↑s), ↑(Set.sumCompl t) (↑(sumCongr e₀ e₁) (↑(Set.sumCompl s).symm ↑x)) = ↑(↑e₀ x)) })\n            e))\n      x =\n    ↑e x\n[PROOFSTEP]\nsimp only [Sum.map_inr, subtypeEquiv_apply, Set.sumCompl_apply_inr, Function.comp_apply, sumCongr_apply,\n  Equiv.coe_trans, Subtype.coe_eta, Subtype.coe_mk, Trans.trans, Set.sumCompl_symm_apply_compl]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : α → Type u_2\ns : (a : α) → Set (β a)\nx✝ : ↑(pi univ s)\nf : (i : α) → β i\nhf : f ∈ pi univ s\n⊢ (fun f => { val := fun a => ↑(f a), property := (_ : ∀ (a : α), a ∈ univ → ↑(f a) ∈ s a) })\n      ((fun f a => { val := ↑f a, property := (_ : ↑f a ∈ s a) }) { val := f, property := hf }) =\n    { val := f, property := hf }\n[PROOFSTEP]\next a\n[GOAL]\ncase a.h\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : α → Type u_2\ns : (a : α) → Set (β a)\nx✝ : ↑(pi univ s)\nf : (i : α) → β i\nhf : f ∈ pi univ s\na : α\n⊢ ↑((fun f => { val := fun a => ↑(f a), property := (_ : ∀ (a : α), a ∈ univ → ↑(f a) ∈ s a) })\n          ((fun f a => { val := ↑f a, property := (_ : ↑f a ∈ s a) }) { val := f, property := hf }))\n      a =\n    ↑{ val := f, property := hf } a\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : α → Type u_2\ns : (a : α) → Set (β a)\nf : (a : α) → ↑(s a)\n⊢ (fun f a => { val := ↑f a, property := (_ : ↑f a ∈ s a) })\n      ((fun f => { val := fun a => ↑(f a), property := (_ : ∀ (a : α), a ∈ univ → ↑(f a) ∈ s a) }) f) =\n    f\n[PROOFSTEP]\next a\n[GOAL]\ncase h.a\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : α → Type u_2\ns : (a : α) → Set (β a)\nf : (a : α) → ↑(s a)\na : α\n⊢ ↑((fun f a => { val := ↑f a, property := (_ : ↑f a ∈ s a) })\n        ((fun f => { val := fun a => ↑(f a), property := (_ : ∀ (a : α), a ∈ univ → ↑(f a) ∈ s a) }) f) a) =\n    ↑(f a)\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\ns : Set α\nH : Injective f\nx : α\nh : x ∈ s\n⊢ ↑(Set.image f s H).symm { val := f x, property := (_ : ∃ a, a ∈ s ∧ f a = f x) } = { val := x, property := h }\n[PROOFSTEP]\napply (Set.image f s H).injective\n[GOAL]\ncase a\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\ns : Set α\nH : Injective f\nx : α\nh : x ∈ s\n⊢ ↑(Set.image f s H) (↑(Set.image f s H).symm { val := f x, property := (_ : ∃ a, a ∈ s ∧ f a = f x) }) =\n    ↑(Set.image f s H) { val := x, property := h }\n[PROOFSTEP]\nsimp [(Set.image f s H).apply_symm_apply]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\nhf : Injective f\nu s : Set α\n⊢ (fun x => ↑(↑(Set.image f s hf).symm x)) ⁻¹' u = Subtype.val ⁻¹' (f '' u)\n[PROOFSTEP]\next ⟨b, a, has, rfl⟩\n[GOAL]\ncase h.mk.intro.intro\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\nhf : Injective f\nu s : Set α\na : α\nhas : a ∈ s\n⊢ { val := f a, property := (_ : ∃ a_1, a_1 ∈ s ∧ f a_1 = f a) } ∈ (fun x => ↑(↑(Set.image f s hf).symm x)) ⁻¹' u ↔\n    { val := f a, property := (_ : ∃ a_1, a_1 ∈ s ∧ f a_1 = f a) } ∈ Subtype.val ⁻¹' (f '' u)\n[PROOFSTEP]\nhave : ∀ h : ∃ a', a' ∈ s ∧ a' = a, Classical.choose h = a := fun h => (Classical.choose_spec h).2\n[GOAL]\ncase h.mk.intro.intro\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\nhf : Injective f\nu s : Set α\na : α\nhas : a ∈ s\nthis : ∀ (h : ∃ a', a' ∈ s ∧ a' = a), Classical.choose h = a\n⊢ { val := f a, property := (_ : ∃ a_1, a_1 ∈ s ∧ f a_1 = f a) } ∈ (fun x => ↑(↑(Set.image f s hf).symm x)) ⁻¹' u ↔\n    { val := f a, property := (_ : ∃ a_1, a_1 ∈ s ∧ f a_1 = f a) } ∈ Subtype.val ⁻¹' (f '' u)\n[PROOFSTEP]\nsimp [Equiv.Set.image, Equiv.Set.imageOfInjOn, hf.eq_iff, this]\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.53602\nS : Set α\nx : Set ↑S\n⊢ Subtype.val '' x ∈ 𝒫 S\n[PROOFSTEP]\nrintro _ ⟨a : S, _, rfl⟩\n[GOAL]\ncase intro.intro\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.53602\nS : Set α\nx : Set ↑S\na : ↑S\nleft✝ : a ∈ x\n⊢ ↑a ∈ S\n[PROOFSTEP]\nexact a.2\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.53602\nS : Set α\nx : ↑(𝒫 S)\n⊢ (fun x => { val := Subtype.val '' x, property := (_ : ∀ ⦃a : α⦄, a ∈ Subtype.val '' x → a ∈ S) })\n      ((fun x => Subtype.val ⁻¹' ↑x) x) =\n    x\n[PROOFSTEP]\next y\n[GOAL]\ncase a.h\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.53602\nS : Set α\nx : ↑(𝒫 S)\ny : α\n⊢ y ∈\n      ↑((fun x => { val := Subtype.val '' x, property := (_ : ∀ ⦃a : α⦄, a ∈ Subtype.val '' x → a ∈ S) })\n          ((fun x => Subtype.val ⁻¹' ↑x) x)) ↔\n    y ∈ ↑x\n[PROOFSTEP]\nexact ⟨fun ⟨⟨_, _⟩, h, rfl⟩ => h, fun h => ⟨⟨_, x.2 h⟩, h, rfl⟩⟩\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.53602\nS : Set α\nx : Set ↑S\n⊢ (fun x => Subtype.val ⁻¹' ↑x)\n      ((fun x => { val := Subtype.val '' x, property := (_ : ∀ ⦃a : α⦄, a ∈ Subtype.val '' x → a ∈ S) }) x) =\n    x\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type ?u.53602\nS : Set α\nx : Set ↑S\nx✝ : ↑S\n⊢ x✝ ∈\n      (fun x => Subtype.val ⁻¹' ↑x)\n        ((fun x => { val := Subtype.val '' x, property := (_ : ∀ ⦃a : α⦄, a ∈ Subtype.val '' x → a ∈ S) }) x) ↔\n    x✝ ∈ x\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\ns : Set ↑(range f)\nx : ↑(rangeSplitting f '' s)\n⊢ f ↑x ∈ range f\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\ns : Set ↑(range f)\nx : ↑(rangeSplitting f '' s)\n⊢ { val := f ↑x, property := (_ : f ↑x ∈ range f) } ∈ s\n[PROOFSTEP]\nrcases x with ⟨x, ⟨y, ⟨m, rfl⟩⟩⟩\n[GOAL]\ncase mk.intro.intro\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\ns : Set ↑(range f)\ny : ↑(range f)\nm : y ∈ s\n⊢ { val := f ↑{ val := rangeSplitting f y, property := (_ : ∃ a, a ∈ s ∧ rangeSplitting f a = rangeSplitting f y) },\n      property :=\n        (_ :\n          f ↑{ val := rangeSplitting f y, property := (_ : ∃ a, a ∈ s ∧ rangeSplitting f a = rangeSplitting f y) } ∈\n            range f) } ∈\n    s\n[PROOFSTEP]\nsimpa [apply_rangeSplitting f] using m\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\ns : Set ↑(range f)\nx : ↑(rangeSplitting f '' s)\n⊢ (fun x => { val := rangeSplitting f ↑x, property := (_ : ∃ a, a ∈ s ∧ rangeSplitting f a = rangeSplitting f ↑x) })\n      ((fun x =>\n          { val := { val := f ↑x, property := (_ : f ↑x ∈ range f) },\n            property := (_ : { val := f ↑x, property := (_ : f ↑x ∈ range f) } ∈ s) })\n        x) =\n    x\n[PROOFSTEP]\nrcases x with ⟨x, ⟨y, ⟨m, rfl⟩⟩⟩\n[GOAL]\ncase mk.intro.intro\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\ns : Set ↑(range f)\ny : ↑(range f)\nm : y ∈ s\n⊢ (fun x => { val := rangeSplitting f ↑x, property := (_ : ∃ a, a ∈ s ∧ rangeSplitting f a = rangeSplitting f ↑x) })\n      ((fun x =>\n          { val := { val := f ↑x, property := (_ : f ↑x ∈ range f) },\n            property := (_ : { val := f ↑x, property := (_ : f ↑x ∈ range f) } ∈ s) })\n        { val := rangeSplitting f y, property := (_ : ∃ a, a ∈ s ∧ rangeSplitting f a = rangeSplitting f y) }) =\n    { val := rangeSplitting f y, property := (_ : ∃ a, a ∈ s ∧ rangeSplitting f a = rangeSplitting f y) }\n[PROOFSTEP]\nsimp [apply_rangeSplitting f]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\ns : Set ↑(range f)\nx : ↑s\n⊢ (fun x =>\n        { val := { val := f ↑x, property := (_ : f ↑x ∈ range f) },\n          property := (_ : { val := f ↑x, property := (_ : f ↑x ∈ range f) } ∈ s) })\n      ((fun x =>\n          { val := rangeSplitting f ↑x, property := (_ : ∃ a, a ∈ s ∧ rangeSplitting f a = rangeSplitting f ↑x) })\n        x) =\n    x\n[PROOFSTEP]\nsimp [apply_rangeSplitting f]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nval✝ : β\nh : Sum.inr val✝ ∈ range Sum.inl\n⊢ False\n[PROOFSTEP]\nrcases h with ⟨x, h'⟩\n[GOAL]\ncase intro\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nval✝ : β\nx : α\nh' : Sum.inl x = Sum.inr val✝\n⊢ False\n[PROOFSTEP]\ncases h'\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nval✝ : α\nh : Sum.inl val✝ ∈ range Sum.inr\n⊢ False\n[PROOFSTEP]\nrcases h with ⟨x, h'⟩\n[GOAL]\ncase intro\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nval✝ : α\nx : β\nh' : Sum.inr x = Sum.inl val✝\n⊢ False\n[PROOFSTEP]\ncases h'\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Sort u_1\nβ : Type u_2\nf : α → β\nhf : Injective f\na : α\n⊢ ↑(ofInjective f hf).symm { val := f a, property := (_ : ∃ y, f y = f a) } = a\n[PROOFSTEP]\napply (ofInjective f hf).injective\n[GOAL]\ncase a\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Sort u_1\nβ : Type u_2\nf : α → β\nhf : Injective f\na : α\n⊢ ↑(ofInjective f hf) (↑(ofInjective f hf).symm { val := f a, property := (_ : ∃ y, f y = f a) }) =\n    ↑(ofInjective f hf) a\n[PROOFSTEP]\nsimp [apply_ofInjective_symm hf]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\nhf : Injective f\n⊢ ↑(ofInjective f hf).symm = rangeSplitting f\n[PROOFSTEP]\next ⟨y, x, rfl⟩\n[GOAL]\ncase h.mk.intro\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\nhf : Injective f\nx : α\n⊢ ↑(ofInjective f hf).symm { val := f x, property := (_ : ∃ y, f y = f x) } =\n    rangeSplitting f { val := f x, property := (_ : ∃ y, f y = f x) }\n[PROOFSTEP]\napply hf\n[GOAL]\ncase h.mk.intro.a\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\nhf : Injective f\nx : α\n⊢ f (↑(ofInjective f hf).symm { val := f x, property := (_ : ∃ y, f y = f x) }) =\n    f (rangeSplitting f { val := f x, property := (_ : ∃ y, f y = f x) })\n[PROOFSTEP]\nsimp [apply_rangeSplitting f]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\nf_inv : Nonempty α → β → α\nhf : ∀ (h : Nonempty α), LeftInverse (f_inv h) f\n⊢ ofLeftInverse f f_inv hf = ofInjective f (_ : Injective f)\n[PROOFSTEP]\next\n[GOAL]\ncase H.a\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\nf_inv : Nonempty α → β → α\nhf : ∀ (h : Nonempty α), LeftInverse (f_inv h) f\nx✝ : α\n⊢ ↑(↑(ofLeftInverse f f_inv hf) x✝) = ↑(↑(ofInjective f (_ : Injective f)) x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\nf_inv : β → α\nhf : LeftInverse f_inv f\n⊢ ofLeftInverse' f f_inv hf = ofInjective f (_ : Injective f)\n[PROOFSTEP]\next\n[GOAL]\ncase H.a\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : Type u_2\nf : α → β\nf_inv : β → α\nhf : LeftInverse f_inv f\nx✝ : α\n⊢ ↑(↑(ofLeftInverse' f f_inv hf) x✝) = ↑(↑(ofInjective f (_ : Injective f)) x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : α → Type u_2\np : α → Prop\ninst✝ : DecidablePred p\ns : (i : α) → Set (β i)\n⊢ ↑(piEquivPiSubtypeProd p β).symm ⁻¹' pi univ s = (pi univ fun i => s ↑i) ×ˢ pi univ fun i => s ↑i\n[PROOFSTEP]\next ⟨f, g⟩\n[GOAL]\ncase h.mk\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : α → Type u_2\np : α → Prop\ninst✝ : DecidablePred p\ns : (i : α) → Set (β i)\nf : (i : { x // p x }) → β ↑i\ng : (i : { x // ¬p x }) → β ↑i\n⊢ (f, g) ∈ ↑(piEquivPiSubtypeProd p β).symm ⁻¹' pi univ s ↔ (f, g) ∈ (pi univ fun i => s ↑i) ×ˢ pi univ fun i => s ↑i\n[PROOFSTEP]\nsimp only [mem_preimage, mem_univ_pi, prod_mk_mem_set_prod_eq, Subtype.forall, ← forall_and]\n[GOAL]\ncase h.mk\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : α → Type u_2\np : α → Prop\ninst✝ : DecidablePred p\ns : (i : α) → Set (β i)\nf : (i : { x // p x }) → β ↑i\ng : (i : { x // ¬p x }) → β ↑i\n⊢ (∀ (i : α), ↑(piEquivPiSubtypeProd p β).symm (f, g) i ∈ s i) ↔\n    ∀ (x : α), (∀ (b : p x), f { val := x, property := b } ∈ s x) ∧ ∀ (b : ¬p x), g { val := x, property := b } ∈ s x\n[PROOFSTEP]\nrefine' forall_congr' fun i => _\n[GOAL]\ncase h.mk\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : α → Type u_2\np : α → Prop\ninst✝ : DecidablePred p\ns : (i : α) → Set (β i)\nf : (i : { x // p x }) → β ↑i\ng : (i : { x // ¬p x }) → β ↑i\ni : α\n⊢ ↑(piEquivPiSubtypeProd p β).symm (f, g) i ∈ s i ↔\n    (∀ (b : p i), f { val := i, property := b } ∈ s i) ∧ ∀ (b : ¬p i), g { val := i, property := b } ∈ s i\n[PROOFSTEP]\ndsimp only [Subtype.coe_mk]\n  -- Porting note: Two lines below were `by_cases hi <;> simp [hi]`\n    -- This regression is https://github.com/leanprover/lean4/issues/1926\n[GOAL]\ncase h.mk\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : α → Type u_2\np : α → Prop\ninst✝ : DecidablePred p\ns : (i : α) → Set (β i)\nf : (i : { x // p x }) → β ↑i\ng : (i : { x // ¬p x }) → β ↑i\ni : α\n⊢ ↑(piEquivPiSubtypeProd p β).symm (f, g) i ∈ s i ↔\n    (∀ (b : p i), f { val := i, property := b } ∈ s i) ∧ ∀ (b : ¬p i), g { val := i, property := b } ∈ s i\n[PROOFSTEP]\nby_cases hi : p i\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : α → Type u_2\np : α → Prop\ninst✝ : DecidablePred p\ns : (i : α) → Set (β i)\nf : (i : { x // p x }) → β ↑i\ng : (i : { x // ¬p x }) → β ↑i\ni : α\nhi : p i\n⊢ ↑(piEquivPiSubtypeProd p β).symm (f, g) i ∈ s i ↔\n    (∀ (b : p i), f { val := i, property := b } ∈ s i) ∧ ∀ (b : ¬p i), g { val := i, property := b } ∈ s i\n[PROOFSTEP]\nsimp [forall_prop_of_true hi, forall_prop_of_false (not_not.2 hi), hi]\n[GOAL]\ncase neg\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Type u_1\nβ : α → Type u_2\np : α → Prop\ninst✝ : DecidablePred p\ns : (i : α) → Set (β i)\nf : (i : { x // p x }) → β ↑i\ng : (i : { x // ¬p x }) → β ↑i\ni : α\nhi : ¬p i\n⊢ ↑(piEquivPiSubtypeProd p β).symm (f, g) i ∈ s i ↔\n    (∀ (b : p i), f { val := i, property := b } ∈ s i) ∧ ∀ (b : ¬p i), g { val := i, property := b } ∈ s i\n[PROOFSTEP]\nsimp [forall_prop_of_false hi, hi, forall_prop_of_true hi]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Sort u_2\nγ : Sort u_3\np : α → Prop\ne : β ≃ Subtype p\nv : β → γ\nw : α → γ\nj : β\nx : γ\ninst✝² : DecidableEq β\ninst✝¹ : DecidableEq α\ninst✝ : (j : α) → Decidable (p j)\n⊢ (fun i => if h : p i then update v j x (↑e.symm { val := i, property := h }) else w i) =\n    update (fun i => if h : p i then v (↑e.symm { val := i, property := h }) else w i) (↑(↑e j)) x\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Sort u_2\nγ : Sort u_3\np : α → Prop\ne : β ≃ Subtype p\nv : β → γ\nw : α → γ\nj : β\nx : γ\ninst✝² : DecidableEq β\ninst✝¹ : DecidableEq α\ninst✝ : (j : α) → Decidable (p j)\ni : α\n⊢ (if h : p i then update v j x (↑e.symm { val := i, property := h }) else w i) =\n    update (fun i => if h : p i then v (↑e.symm { val := i, property := h }) else w i) (↑(↑e j)) x i\n[PROOFSTEP]\nby_cases h : p i\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Sort u_2\nγ : Sort u_3\np : α → Prop\ne : β ≃ Subtype p\nv : β → γ\nw : α → γ\nj : β\nx : γ\ninst✝² : DecidableEq β\ninst✝¹ : DecidableEq α\ninst✝ : (j : α) → Decidable (p j)\ni : α\nh : p i\n⊢ (if h : p i then update v j x (↑e.symm { val := i, property := h }) else w i) =\n    update (fun i => if h : p i then v (↑e.symm { val := i, property := h }) else w i) (↑(↑e j)) x i\n[PROOFSTEP]\nrw [dif_pos h, Function.update_apply_equiv_apply, Equiv.symm_symm, Function.update_apply, Function.update_apply,\n  dif_pos h]\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Sort u_2\nγ : Sort u_3\np : α → Prop\ne : β ≃ Subtype p\nv : β → γ\nw : α → γ\nj : β\nx : γ\ninst✝² : DecidableEq β\ninst✝¹ : DecidableEq α\ninst✝ : (j : α) → Decidable (p j)\ni : α\nh : p i\n⊢ (if { val := i, property := h } = ↑e j then x else (v ∘ ↑e.symm) { val := i, property := h }) =\n    if i = ↑(↑e j) then x else v (↑e.symm { val := i, property := h })\n[PROOFSTEP]\nhave h_coe : (⟨i, h⟩ : Subtype p) = e j ↔ i = e j := Subtype.ext_iff.trans (by rw [Subtype.coe_mk])\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Sort u_2\nγ : Sort u_3\np : α → Prop\ne : β ≃ Subtype p\nv : β → γ\nw : α → γ\nj : β\nx : γ\ninst✝² : DecidableEq β\ninst✝¹ : DecidableEq α\ninst✝ : (j : α) → Decidable (p j)\ni : α\nh : p i\n⊢ ↑{ val := i, property := h } = ↑(↑e j) ↔ i = ↑(↑e j)\n[PROOFSTEP]\nrw [Subtype.coe_mk]\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Sort u_2\nγ : Sort u_3\np : α → Prop\ne : β ≃ Subtype p\nv : β → γ\nw : α → γ\nj : β\nx : γ\ninst✝² : DecidableEq β\ninst✝¹ : DecidableEq α\ninst✝ : (j : α) → Decidable (p j)\ni : α\nh : p i\nh_coe : { val := i, property := h } = ↑e j ↔ i = ↑(↑e j)\n⊢ (if { val := i, property := h } = ↑e j then x else (v ∘ ↑e.symm) { val := i, property := h }) =\n    if i = ↑(↑e j) then x else v (↑e.symm { val := i, property := h })\n[PROOFSTEP]\nsimp [h_coe]\n[GOAL]\ncase neg\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Sort u_2\nγ : Sort u_3\np : α → Prop\ne : β ≃ Subtype p\nv : β → γ\nw : α → γ\nj : β\nx : γ\ninst✝² : DecidableEq β\ninst✝¹ : DecidableEq α\ninst✝ : (j : α) → Decidable (p j)\ni : α\nh : ¬p i\n⊢ (if h : p i then update v j x (↑e.symm { val := i, property := h }) else w i) =\n    update (fun i => if h : p i then v (↑e.symm { val := i, property := h }) else w i) (↑(↑e j)) x i\n[PROOFSTEP]\nhave : i ≠ e j := by\n  contrapose! h\n  have : p (e j : α) := (e j).2\n  rwa [← h] at this \n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Sort u_2\nγ : Sort u_3\np : α → Prop\ne : β ≃ Subtype p\nv : β → γ\nw : α → γ\nj : β\nx : γ\ninst✝² : DecidableEq β\ninst✝¹ : DecidableEq α\ninst✝ : (j : α) → Decidable (p j)\ni : α\nh : ¬p i\n⊢ i ≠ ↑(↑e j)\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Sort u_2\nγ : Sort u_3\np : α → Prop\ne : β ≃ Subtype p\nv : β → γ\nw : α → γ\nj : β\nx : γ\ninst✝² : DecidableEq β\ninst✝¹ : DecidableEq α\ninst✝ : (j : α) → Decidable (p j)\ni : α\nh : i = ↑(↑e j)\n⊢ p i\n[PROOFSTEP]\nhave : p (e j : α) := (e j).2\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Sort u_2\nγ : Sort u_3\np : α → Prop\ne : β ≃ Subtype p\nv : β → γ\nw : α → γ\nj : β\nx : γ\ninst✝² : DecidableEq β\ninst✝¹ : DecidableEq α\ninst✝ : (j : α) → Decidable (p j)\ni : α\nh : i = ↑(↑e j)\nthis : p ↑(↑e j)\n⊢ p i\n[PROOFSTEP]\nrwa [← h] at this \n[GOAL]\ncase neg\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα : Type u_1\nβ : Sort u_2\nγ : Sort u_3\np : α → Prop\ne : β ≃ Subtype p\nv : β → γ\nw : α → γ\nj : β\nx : γ\ninst✝² : DecidableEq β\ninst✝¹ : DecidableEq α\ninst✝ : (j : α) → Decidable (p j)\ni : α\nh : ¬p i\nthis : i ≠ ↑(↑e j)\n⊢ (if h : p i then update v j x (↑e.symm { val := i, property := h }) else w i) =\n    update (fun i => if h : p i then v (↑e.symm { val := i, property := h }) else w i) (↑(↑e j)) x i\n[PROOFSTEP]\nsimp [h, this]\n", "meta": {"mathlib_filename": "Mathlib.Logic.Equiv.Set", "llama_tokens": 19461, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7122321964553657, "lm_q2_score": 0.5583269943353744, "lm_q1q2_score": 0.3976584615158062}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\n⊢ WellFounded r ↔ ∀ (s : Set α), Set.Nonempty s → ∃ m, m ∈ s ∧ ∀ (x : α), x ∈ s → ¬r x m\n[PROOFSTEP]\nrefine ⟨fun h => h.has_min, fun h => ⟨fun x => ?_⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nh : ∀ (s : Set α), Set.Nonempty s → ∃ m, m ∈ s ∧ ∀ (x : α), x ∈ s → ¬r x m\nx : α\n⊢ Acc r x\n[PROOFSTEP]\nby_contra hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nh : ∀ (s : Set α), Set.Nonempty s → ∃ m, m ∈ s ∧ ∀ (x : α), x ∈ s → ¬r x m\nx : α\nhx : ¬Acc r x\n⊢ False\n[PROOFSTEP]\nobtain ⟨m, hm, hm'⟩ := h {x | ¬Acc r x} ⟨x, hx⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nh : ∀ (s : Set α), Set.Nonempty s → ∃ m, m ∈ s ∧ ∀ (x : α), x ∈ s → ¬r x m\nx : α\nhx : ¬Acc r x\nm : α\nhm : m ∈ {x | ¬Acc r x}\nhm' : ∀ (x : α), x ∈ {x | ¬Acc r x} → ¬r x m\n⊢ False\n[PROOFSTEP]\nrefine' hm ⟨_, fun y hy => _⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nh : ∀ (s : Set α), Set.Nonempty s → ∃ m, m ∈ s ∧ ∀ (x : α), x ∈ s → ¬r x m\nx : α\nhx : ¬Acc r x\nm : α\nhm : m ∈ {x | ¬Acc r x}\nhm' : ∀ (x : α), x ∈ {x | ¬Acc r x} → ¬r x m\ny : α\nhy : r y m\n⊢ Acc r y\n[PROOFSTEP]\nby_contra hy'\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nh : ∀ (s : Set α), Set.Nonempty s → ∃ m, m ∈ s ∧ ∀ (x : α), x ∈ s → ¬r x m\nx : α\nhx : ¬Acc r x\nm : α\nhm : m ∈ {x | ¬Acc r x}\nhm' : ∀ (x : α), x ∈ {x | ¬Acc r x} → ¬r x m\ny : α\nhy : r y m\nhy' : ¬Acc r y\n⊢ False\n[PROOFSTEP]\nexact hm' y hy' hy\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwf : WellFounded r\nx : α\nh : ∃ y, r x y\n⊢ r x (WellFounded.succ wf x)\n[PROOFSTEP]\nrw [WellFounded.succ, dif_pos h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwf : WellFounded r\nx : α\nh : ∃ y, r x y\n⊢ r x (min wf {y | r x y} h)\n[PROOFSTEP]\napply min_mem\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\n⊢ r y (WellFounded.succ (_ : WellFounded r) x) ↔ r y x ∨ y = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\n⊢ r y (WellFounded.succ (_ : WellFounded r) x) → r y x ∨ y = x\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\n⊢ r y x ∨ y = x\n[PROOFSTEP]\nhave : ¬r x y := by\n  intro hy\n  rw [WellFounded.succ, dif_pos] at h' \n  exact wo.wf.not_lt_min _ h hy h'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\n⊢ ¬r x y\n[PROOFSTEP]\nintro hy\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nhy : r x y\n⊢ False\n[PROOFSTEP]\nrw [WellFounded.succ, dif_pos] at h' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh'✝ : r y (if h : ∃ y, r x y then min (_ : WellFounded r) {y | r x y} h else x)\nh' : r y (min (_ : WellFounded r) {y | r x y} ?hc)\nhy : r x y\n⊢ False\ncase hc\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (if h : ∃ y, r x y then min (_ : WellFounded r) {y | r x y} h else x)\nhy : r x y\n⊢ ∃ y, r x y\n[PROOFSTEP]\nexact wo.wf.not_lt_min _ h hy h'\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\n⊢ r y x ∨ y = x\n[PROOFSTEP]\nrcases trichotomous_of r x y with (hy | hy | hy)\n[GOAL]\ncase mp.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\nhy : r x y\n⊢ r y x ∨ y = x\ncase mp.inr.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\nhy : x = y\n⊢ r y x ∨ y = x\ncase mp.inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\nhy : r y x\n⊢ r y x ∨ y = x\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase mp.inl.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\nhy : r x y\n⊢ False\ncase mp.inr.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\nhy : x = y\n⊢ r y x ∨ y = x\ncase mp.inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\nhy : r y x\n⊢ r y x ∨ y = x\n[PROOFSTEP]\nexact this hy\n[GOAL]\ncase mp.inr.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\nhy : x = y\n⊢ r y x ∨ y = x\ncase mp.inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\nhy : r y x\n⊢ r y x ∨ y = x\n[PROOFSTEP]\nright\n[GOAL]\ncase mp.inr.inl.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\nhy : x = y\n⊢ y = x\ncase mp.inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\nhy : r y x\n⊢ r y x ∨ y = x\n[PROOFSTEP]\nexact hy.symm\n[GOAL]\ncase mp.inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\nhy : r y x\n⊢ r y x ∨ y = x\n[PROOFSTEP]\nleft\n[GOAL]\ncase mp.inr.inr.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nh' : r y (WellFounded.succ (_ : WellFounded r) x)\nthis : ¬r x y\nhy : r y x\n⊢ r y x\n[PROOFSTEP]\nexact hy\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\n⊢ r y x ∨ y = x → r y (WellFounded.succ (_ : WellFounded r) x)\n[PROOFSTEP]\nrintro (hy | rfl)\n[GOAL]\ncase mpr.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\nx : α\nh : ∃ y, r x y\ny : α\nhy : r y x\n⊢ r y (WellFounded.succ (_ : WellFounded r) x)\ncase mpr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\ny : α\nh : ∃ y_1, r y y_1\n⊢ r y (WellFounded.succ (_ : WellFounded r) y)\n[PROOFSTEP]\nexact _root_.trans hy (wo.wf.lt_succ h)\n[GOAL]\ncase mpr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r' r : α → α → Prop\nwo : IsWellOrder α r\ny : α\nh : ∃ y_1, r y y_1\n⊢ r y (WellFounded.succ (_ : WellFounded r) y)\n[PROOFSTEP]\nexact wo.wf.lt_succ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf g : β → γ\nhf : StrictMono f\nhg : StrictMono g\nhfg : range f = range g\nb : β\nH : ∀ (a : β), a < b → f a = g a\n⊢ f b ≤ g b\n[PROOFSTEP]\nobtain ⟨c, hc⟩ : g b ∈ Set.range f := by\n  rw [hfg]\n  exact Set.mem_range_self b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf g : β → γ\nhf : StrictMono f\nhg : StrictMono g\nhfg : range f = range g\nb : β\nH : ∀ (a : β), a < b → f a = g a\n⊢ g b ∈ range f\n[PROOFSTEP]\nrw [hfg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf g : β → γ\nhf : StrictMono f\nhg : StrictMono g\nhfg : range f = range g\nb : β\nH : ∀ (a : β), a < b → f a = g a\n⊢ g b ∈ range g\n[PROOFSTEP]\nexact Set.mem_range_self b\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf g : β → γ\nhf : StrictMono f\nhg : StrictMono g\nhfg : range f = range g\nb : β\nH : ∀ (a : β), a < b → f a = g a\nc : β\nhc : f c = g b\n⊢ f b ≤ g b\n[PROOFSTEP]\ncases' lt_or_le c b with hcb hbc\n[GOAL]\ncase intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf g : β → γ\nhf : StrictMono f\nhg : StrictMono g\nhfg : range f = range g\nb : β\nH : ∀ (a : β), a < b → f a = g a\nc : β\nhc : f c = g b\nhcb : c < b\n⊢ f b ≤ g b\n[PROOFSTEP]\nrw [H c hcb] at hc \n[GOAL]\ncase intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf g : β → γ\nhf : StrictMono f\nhg : StrictMono g\nhfg : range f = range g\nb : β\nH : ∀ (a : β), a < b → f a = g a\nc : β\nhc : g c = g b\nhcb : c < b\n⊢ f b ≤ g b\n[PROOFSTEP]\nrw [hg.injective hc] at hcb \n[GOAL]\ncase intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf g : β → γ\nhf : StrictMono f\nhg : StrictMono g\nhfg : range f = range g\nb : β\nH : ∀ (a : β), a < b → f a = g a\nc : β\nhc : g c = g b\nhcb : b < b\n⊢ f b ≤ g b\n[PROOFSTEP]\nexact hcb.false.elim\n[GOAL]\ncase intro.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf g : β → γ\nhf : StrictMono f\nhg : StrictMono g\nhfg : range f = range g\nb : β\nH : ∀ (a : β), a < b → f a = g a\nc : β\nhc : f c = g b\nhbc : b ≤ c\n⊢ f b ≤ g b\n[PROOFSTEP]\nrw [← hc]\n[GOAL]\ncase intro.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf g : β → γ\nhf : StrictMono f\nhg : StrictMono g\nhfg : range f = range g\nb : β\nH : ∀ (a : β), a < b → f a = g a\nc : β\nhc : f c = g b\nhbc : b ≤ c\n⊢ f b ≤ f c\n[PROOFSTEP]\nexact hf.monotone hbc\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf g : β → γ\nhf : StrictMono f\nhg : StrictMono g\nhfg : range f = range g\n⊢ f = g\n[PROOFSTEP]\nfunext a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf g : β → γ\nhf : StrictMono f\nhg : StrictMono g\nhfg : range f = range g\na : β\n⊢ f a = g a\n[PROOFSTEP]\napply h.induction a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf g : β → γ\nhf : StrictMono f\nhg : StrictMono g\nhfg : range f = range g\na : β\n⊢ ∀ (x : β), (∀ (y : β), y < x → f y = g y) → f x = g x\n[PROOFSTEP]\nexact fun b H =>\n  le_antisymm (eq_strictMono_iff_eq_range_aux hf hg hfg H)\n    (eq_strictMono_iff_eq_range_aux hg hf hfg.symm fun a hab => (H a hab).symm)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf : β → β\nhf : StrictMono f\n⊢ ∀ (n : β), n ≤ f n\n[PROOFSTEP]\nby_contra' h₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf : β → β\nhf : StrictMono f\nh₁ : ∃ n, f n < n\n⊢ False\n[PROOFSTEP]\nhave h₂ := h.min_mem _ h₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr r' : α → α → Prop\ninst✝¹ : LinearOrder β\nh : WellFounded fun x x_1 => x < x_1\ninst✝ : PartialOrder γ\nf : β → β\nhf : StrictMono f\nh₁ : ∃ n, f n < n\nh₂ : min h (fun x => Preorder.toLT.1 (f x) x) h₁ ∈ fun x => Preorder.toLT.1 (f x) x\n⊢ False\n[PROOFSTEP]\nexact h.not_lt_min _ h₁ (hf h₂) h₂\n", "meta": {"mathlib_filename": "Mathlib.Order.WellFounded", "llama_tokens": 6602, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7025300449389327, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.397645026967586}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\n⊢ s ∈ nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ ¬a ∈ s\n[PROOFSTEP]\nsimp [nonMemberSubfamily]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\n⊢ s ∈ memberSubfamily a 𝒜 ↔ insert a s ∈ 𝒜 ∧ ¬a ∈ s\n[PROOFSTEP]\nsimp_rw [memberSubfamily, mem_image, mem_filter]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\n⊢ (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ erase a_1 a = s) ↔ insert a s ∈ 𝒜 ∧ ¬a ∈ s\n[PROOFSTEP]\nrefine' ⟨_, fun h => ⟨insert a s, ⟨h.1, by simp⟩, erase_insert h.2⟩⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nh : insert a s ∈ 𝒜 ∧ ¬a ∈ s\n⊢ a ∈ insert a s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\n⊢ (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ erase a_1 a = s) → insert a s ∈ 𝒜 ∧ ¬a ∈ s\n[PROOFSTEP]\nrintro ⟨s, ⟨hs1, hs2⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\na : α\ns : Finset α\nhs1 : s ∈ 𝒜\nhs2 : a ∈ s\n⊢ insert a (erase s a) ∈ 𝒜 ∧ ¬a ∈ erase s a\n[PROOFSTEP]\nrw [insert_erase hs2]\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\na : α\ns : Finset α\nhs1 : s ∈ 𝒜\nhs2 : a ∈ s\n⊢ s ∈ 𝒜 ∧ ¬a ∈ erase s a\n[PROOFSTEP]\nexact ⟨hs1, not_mem_erase _ _⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 ℬ : Finset (Finset α)\n⊢ memberSubfamily a (𝒜 ∩ ℬ) = memberSubfamily a 𝒜 ∩ memberSubfamily a ℬ\n[PROOFSTEP]\nunfold memberSubfamily\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 ℬ : Finset (Finset α)\n⊢ image (fun s => erase s a) (filter (fun s => a ∈ s) (𝒜 ∩ ℬ)) =\n    image (fun s => erase s a) (filter (fun s => a ∈ s) 𝒜) ∩ image (fun s => erase s a) (filter (fun s => a ∈ s) ℬ)\n[PROOFSTEP]\nrw [filter_inter_distrib, image_inter_of_injOn _ _ ((erase_injOn' _).mono _)]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 ℬ : Finset (Finset α)\n⊢ ↑(filter (fun s => a ∈ s) 𝒜) ∪ ↑(filter (fun s => a ∈ s) ℬ) ⊆ {s | a ∈ s}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 ℬ : Finset (Finset α)\n⊢ memberSubfamily a (𝒜 ∪ ℬ) = memberSubfamily a 𝒜 ∪ memberSubfamily a ℬ\n[PROOFSTEP]\nsimp_rw [memberSubfamily, filter_union, image_union]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n⊢ card (memberSubfamily a 𝒜) + card (nonMemberSubfamily a 𝒜) = card 𝒜\n[PROOFSTEP]\nrw [memberSubfamily, nonMemberSubfamily, card_image_of_injOn]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n⊢ card (filter (fun s => a ∈ s) 𝒜) + card (filter (fun s => ¬a ∈ s) 𝒜) = card 𝒜\n[PROOFSTEP]\nconv_rhs => rw [← filter_card_add_filter_neg_card_eq_card (fun s => (a ∈ s))]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n| card 𝒜\n[PROOFSTEP]\nrw [← filter_card_add_filter_neg_card_eq_card (fun s => (a ∈ s))]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n| card 𝒜\n[PROOFSTEP]\nrw [← filter_card_add_filter_neg_card_eq_card (fun s => (a ∈ s))]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n| card 𝒜\n[PROOFSTEP]\nrw [← filter_card_add_filter_neg_card_eq_card (fun s => (a ∈ s))]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n⊢ Set.InjOn (fun s => erase s a) ↑(filter (fun s => a ∈ s) 𝒜)\n[PROOFSTEP]\napply (erase_injOn' _).mono\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n⊢ ↑(filter (fun s => a ∈ s) 𝒜) ⊆ {s | a ∈ s}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n⊢ memberSubfamily a 𝒜 ∪ nonMemberSubfamily a 𝒜 = image (fun s => erase s a) 𝒜\n[PROOFSTEP]\next s\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ s ∈ memberSubfamily a 𝒜 ∪ nonMemberSubfamily a 𝒜 ↔ s ∈ image (fun s => erase s a) 𝒜\n[PROOFSTEP]\nsimp only [mem_union, mem_memberSubfamily, mem_nonMemberSubfamily, mem_image, exists_prop]\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ insert a s ∈ 𝒜 ∧ ¬a ∈ s ∨ s ∈ 𝒜 ∧ ¬a ∈ s ↔ ∃ a_1, a_1 ∈ 𝒜 ∧ erase a_1 a = s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ insert a s ∈ 𝒜 ∧ ¬a ∈ s ∨ s ∈ 𝒜 ∧ ¬a ∈ s → ∃ a_2, a_2 ∈ 𝒜 ∧ erase a_2 a = s\n[PROOFSTEP]\nrintro (h | h)\n[GOAL]\ncase a.mp.inl\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nh : insert a s ∈ 𝒜 ∧ ¬a ∈ s\n⊢ ∃ a_1, a_1 ∈ 𝒜 ∧ erase a_1 a = s\n[PROOFSTEP]\nexact ⟨_, h.1, erase_insert h.2⟩\n[GOAL]\ncase a.mp.inr\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nh : s ∈ 𝒜 ∧ ¬a ∈ s\n⊢ ∃ a_1, a_1 ∈ 𝒜 ∧ erase a_1 a = s\n[PROOFSTEP]\nexact ⟨_, h.1, erase_eq_of_not_mem h.2⟩\n[GOAL]\ncase a.mpr\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ (∃ a_1, a_1 ∈ 𝒜 ∧ erase a_1 a = s) → insert a s ∈ 𝒜 ∧ ¬a ∈ s ∨ s ∈ 𝒜 ∧ ¬a ∈ s\n[PROOFSTEP]\nrintro ⟨s, hs, rfl⟩\n[GOAL]\ncase a.mpr.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nhs : s ∈ 𝒜\n⊢ insert a (erase s a) ∈ 𝒜 ∧ ¬a ∈ erase s a ∨ erase s a ∈ 𝒜 ∧ ¬a ∈ erase s a\n[PROOFSTEP]\nby_cases ha : a ∈ s\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nhs : s ∈ 𝒜\nha : a ∈ s\n⊢ insert a (erase s a) ∈ 𝒜 ∧ ¬a ∈ erase s a ∨ erase s a ∈ 𝒜 ∧ ¬a ∈ erase s a\n[PROOFSTEP]\nexact Or.inl ⟨by rwa [insert_erase ha], not_mem_erase _ _⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nhs : s ∈ 𝒜\nha : a ∈ s\n⊢ insert a (erase s a) ∈ 𝒜\n[PROOFSTEP]\nrwa [insert_erase ha]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nhs : s ∈ 𝒜\nha : ¬a ∈ s\n⊢ insert a (erase s a) ∈ 𝒜 ∧ ¬a ∈ erase s a ∨ erase s a ∈ 𝒜 ∧ ¬a ∈ erase s a\n[PROOFSTEP]\nexact Or.inr ⟨by rwa [erase_eq_of_not_mem ha], not_mem_erase _ _⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nhs : s ∈ 𝒜\nha : ¬a ∈ s\n⊢ erase s a ∈ 𝒜\n[PROOFSTEP]\nrwa [erase_eq_of_not_mem ha]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\n⊢ memberSubfamily a (memberSubfamily a 𝒜) = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\na✝ : Finset α\n⊢ a✝ ∈ memberSubfamily a (memberSubfamily a 𝒜) ↔ a✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\n⊢ memberSubfamily a (nonMemberSubfamily a 𝒜) = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\na✝ : Finset α\n⊢ a✝ ∈ memberSubfamily a (nonMemberSubfamily a 𝒜) ↔ a✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\n⊢ nonMemberSubfamily a (memberSubfamily a 𝒜) = memberSubfamily a 𝒜\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\na✝ : Finset α\n⊢ a✝ ∈ nonMemberSubfamily a (memberSubfamily a 𝒜) ↔ a✝ ∈ memberSubfamily a 𝒜\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\n⊢ nonMemberSubfamily a (nonMemberSubfamily a 𝒜) = nonMemberSubfamily a 𝒜\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\na✝ : Finset α\n⊢ a✝ ∈ nonMemberSubfamily a (nonMemberSubfamily a 𝒜) ↔ a✝ ∈ nonMemberSubfamily a 𝒜\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nh₁ : s ∈ filter (fun s => erase s a ∈ 𝒜) 𝒜\nh₂ : s ∈ filter (fun s => ¬s ∈ 𝒜) (image (fun s => erase s a) 𝒜)\n⊢ False\n[PROOFSTEP]\nhave := (mem_filter.1 h₂).2\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nh₁ : s ∈ filter (fun s => erase s a ∈ 𝒜) 𝒜\nh₂ : s ∈ filter (fun s => ¬s ∈ 𝒜) (image (fun s => erase s a) 𝒜)\nthis : ¬s ∈ 𝒜\n⊢ False\n[PROOFSTEP]\nexact this (mem_filter.1 h₁).1\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\n⊢ s ∈ 𝓓 a 𝒜 ↔ s ∈ 𝒜 ∧ erase s a ∈ 𝒜 ∨ ¬s ∈ 𝒜 ∧ insert a s ∈ 𝒜\n[PROOFSTEP]\nsimp_rw [compression, mem_disjUnion, mem_filter, mem_image, and_comm (a := (¬s ∈ 𝒜))]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\n⊢ s ∈ 𝒜 ∧ erase s a ∈ 𝒜 ∨ (∃ a_1, a_1 ∈ 𝒜 ∧ erase a_1 a = s) ∧ ¬s ∈ 𝒜 ↔ s ∈ 𝒜 ∧ erase s a ∈ 𝒜 ∨ insert a s ∈ 𝒜 ∧ ¬s ∈ 𝒜\n[PROOFSTEP]\nrefine'\n  or_congr_right\n    (and_congr_left fun hs => ⟨_, fun h => ⟨_, h, erase_insert <| insert_ne_self.1 <| ne_of_mem_of_not_mem h hs⟩⟩)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nhs : ¬s ∈ 𝒜\n⊢ (∃ a_1, a_1 ∈ 𝒜 ∧ erase a_1 a = s) → insert a s ∈ 𝒜\n[PROOFSTEP]\nrintro ⟨t, ht, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\na : α\nt : Finset α\nht : t ∈ 𝒜\nhs : ¬erase t a ∈ 𝒜\n⊢ insert a (erase t a) ∈ 𝒜\n[PROOFSTEP]\nrwa [insert_erase (erase_ne_self.1 (ne_of_mem_of_not_mem ht hs).symm)]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nhs : s ∈ 𝒜\n⊢ erase s a ∈ 𝓓 a 𝒜\n[PROOFSTEP]\nsimp_rw [mem_compression, erase_idem, and_self_iff]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nhs : s ∈ 𝒜\n⊢ erase s a ∈ 𝒜 ∨ ¬erase s a ∈ 𝒜 ∧ insert a (erase s a) ∈ 𝒜\n[PROOFSTEP]\nrefine' (em _).imp_right fun h => ⟨h, _⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nhs : s ∈ 𝒜\nh : ¬erase s a ∈ 𝒜\n⊢ insert a (erase s a) ∈ 𝒜\n[PROOFSTEP]\nrwa [insert_erase (erase_ne_self.1 (ne_of_mem_of_not_mem hs h).symm)]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\n⊢ s ∈ 𝓓 a 𝒜 → erase s a ∈ 𝓓 a 𝒜\n[PROOFSTEP]\nsimp_rw [mem_compression, erase_idem]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\n⊢ s ∈ 𝒜 ∧ erase s a ∈ 𝒜 ∨ ¬s ∈ 𝒜 ∧ insert a s ∈ 𝒜 →\n    erase s a ∈ 𝒜 ∧ erase s a ∈ 𝒜 ∨ ¬erase s a ∈ 𝒜 ∧ insert a (erase s a) ∈ 𝒜\n[PROOFSTEP]\nrefine' Or.imp (fun h => ⟨h.2, h.2⟩) fun h => _\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nh : ¬s ∈ 𝒜 ∧ insert a s ∈ 𝒜\n⊢ ¬erase s a ∈ 𝒜 ∧ insert a (erase s a) ∈ 𝒜\n[PROOFSTEP]\nrwa [erase_eq_of_not_mem (insert_ne_self.1 <| ne_of_mem_of_not_mem h.2 h.1)]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nh : insert a s ∈ 𝓓 a 𝒜\n⊢ s ∈ 𝓓 a 𝒜\n[PROOFSTEP]\nby_cases ha : a ∈ s\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nh : insert a s ∈ 𝓓 a 𝒜\nha : a ∈ s\n⊢ s ∈ 𝓓 a 𝒜\n[PROOFSTEP]\nrwa [insert_eq_of_mem ha] at h \n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nh : insert a s ∈ 𝓓 a 𝒜\nha : ¬a ∈ s\n⊢ s ∈ 𝓓 a 𝒜\n[PROOFSTEP]\nrw [← erase_insert ha]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nh : insert a s ∈ 𝓓 a 𝒜\nha : ¬a ∈ s\n⊢ erase (insert a s) a ∈ 𝓓 a 𝒜\n[PROOFSTEP]\nexact erase_mem_compression_of_mem_compression h\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n⊢ 𝓓 a (𝓓 a 𝒜) = 𝓓 a 𝒜\n[PROOFSTEP]\next s\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ s ∈ 𝓓 a (𝓓 a 𝒜) ↔ s ∈ 𝓓 a 𝒜\n[PROOFSTEP]\nrefine' mem_compression.trans ⟨_, fun h => Or.inl ⟨h, erase_mem_compression_of_mem_compression h⟩⟩\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ s ∈ 𝓓 a 𝒜 ∧ erase s a ∈ 𝓓 a 𝒜 ∨ ¬s ∈ 𝓓 a 𝒜 ∧ insert a s ∈ 𝓓 a 𝒜 → s ∈ 𝓓 a 𝒜\n[PROOFSTEP]\nrintro (h | h)\n[GOAL]\ncase a.inl\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nh : s ∈ 𝓓 a 𝒜 ∧ erase s a ∈ 𝓓 a 𝒜\n⊢ s ∈ 𝓓 a 𝒜\n[PROOFSTEP]\nexact h.1\n[GOAL]\ncase a.inr\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nh : ¬s ∈ 𝓓 a 𝒜 ∧ insert a s ∈ 𝓓 a 𝒜\n⊢ s ∈ 𝓓 a 𝒜\n[PROOFSTEP]\ncases h.1 (mem_compression_of_insert_mem_compression h.2)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n⊢ card (𝓓 a 𝒜) = card 𝒜\n[PROOFSTEP]\nrw [compression, card_disjUnion, image_filter, card_image_of_injOn ((erase_injOn' _).mono fun s hs => _), ←\n  card_disjoint_union]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n⊢ card (filter (fun s => erase s a ∈ 𝒜) 𝒜 ∪ filter ((fun s => ¬s ∈ 𝒜) ∘ fun s => erase s a) 𝒜) = card 𝒜\n[PROOFSTEP]\nconv_rhs => rw [← filter_union_filter_neg_eq (fun s => (erase s a ∈ 𝒜)) 𝒜]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n| card 𝒜\n[PROOFSTEP]\nrw [← filter_union_filter_neg_eq (fun s => (erase s a ∈ 𝒜)) 𝒜]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n| card 𝒜\n[PROOFSTEP]\nrw [← filter_union_filter_neg_eq (fun s => (erase s a ∈ 𝒜)) 𝒜]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n| card 𝒜\n[PROOFSTEP]\nrw [← filter_union_filter_neg_eq (fun s => (erase s a ∈ 𝒜)) 𝒜]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n⊢ Disjoint (filter (fun s => erase s a ∈ 𝒜) 𝒜) (filter ((fun s => ¬s ∈ 𝒜) ∘ fun s => erase s a) 𝒜)\n[PROOFSTEP]\nexact disjoint_filter_filter_neg 𝒜 𝒜 (fun s => (erase s a ∈ 𝒜))\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\n⊢ ∀ (s : Finset α), s ∈ ↑(filter ((fun s => ¬s ∈ 𝒜) ∘ fun s => erase s a) 𝒜) → s ∈ {s | a ∈ s}\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nhs : s ∈ ↑(filter ((fun s => ¬s ∈ 𝒜) ∘ fun s => erase s a) 𝒜)\n⊢ s ∈ {s | a ∈ s}\n[PROOFSTEP]\nrw [mem_coe, mem_filter, Function.comp_apply] at hs \n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ : Finset (Finset α)\ns✝ : Finset α\na✝ a : α\n𝒜 : Finset (Finset α)\ns : Finset α\nhs : s ∈ 𝒜 ∧ ¬erase s a ∈ 𝒜\n⊢ s ∈ {s | a ∈ s}\n[PROOFSTEP]\nexact not_imp_comm.1 erase_eq_of_not_mem (ne_of_mem_of_not_mem hs.1 hs.2).symm\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SetFamily.Compression.Down", "llama_tokens": 9446, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6584175139669998, "lm_q2_score": 0.6039318337259584, "lm_q1q2_score": 0.39763929656737695}}
{"text": "[GOAL]\n⊢ ConcreteCategory CompleteLatCat\n[PROOFSTEP]\ndsimp [CompleteLatCat]\n[GOAL]\n⊢ ConcreteCategory (Bundled CompleteLattice)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα β : CompleteLatCat\ne : ↑α ≃o ↑β\n⊢ { tosInfHom := { toFun := ↑e, map_sInf' := (_ : ∀ (s : Set ↑α), ↑e (sInf s) = sInf (↑e '' s)) },\n        map_sSup' := (_ : ∀ (s : Set ↑α), ↑e (sSup s) = sSup (↑e '' s)) } ≫\n      {\n        tosInfHom :=\n          { toFun := ↑(OrderIso.symm e),\n            map_sInf' := (_ : ∀ (s : Set ↑β), ↑(OrderIso.symm e) (sInf s) = sInf (↑(OrderIso.symm e) '' s)) },\n        map_sSup' := (_ : ∀ (s : Set ↑β), ↑(OrderIso.symm e) (sSup s) = sSup (↑(OrderIso.symm e) '' s)) } =\n    𝟙 α\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : CompleteLatCat\ne : ↑α ≃o ↑β\nx✝ : (forget CompleteLatCat).obj α\n⊢ ↑({ tosInfHom := { toFun := ↑e, map_sInf' := (_ : ∀ (s : Set ↑α), ↑e (sInf s) = sInf (↑e '' s)) },\n            map_sSup' := (_ : ∀ (s : Set ↑α), ↑e (sSup s) = sSup (↑e '' s)) } ≫\n          {\n            tosInfHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_sInf' := (_ : ∀ (s : Set ↑β), ↑(OrderIso.symm e) (sInf s) = sInf (↑(OrderIso.symm e) '' s)) },\n            map_sSup' := (_ : ∀ (s : Set ↑β), ↑(OrderIso.symm e) (sSup s) = sSup (↑(OrderIso.symm e) '' s)) })\n      x✝ =\n    ↑(𝟙 α) x✝\n[PROOFSTEP]\nexact e.symm_apply_apply _\n[GOAL]\nα β : CompleteLatCat\ne : ↑α ≃o ↑β\n⊢ {\n        tosInfHom :=\n          { toFun := ↑(OrderIso.symm e),\n            map_sInf' := (_ : ∀ (s : Set ↑β), ↑(OrderIso.symm e) (sInf s) = sInf (↑(OrderIso.symm e) '' s)) },\n        map_sSup' := (_ : ∀ (s : Set ↑β), ↑(OrderIso.symm e) (sSup s) = sSup (↑(OrderIso.symm e) '' s)) } ≫\n      { tosInfHom := { toFun := ↑e, map_sInf' := (_ : ∀ (s : Set ↑α), ↑e (sInf s) = sInf (↑e '' s)) },\n        map_sSup' := (_ : ∀ (s : Set ↑α), ↑e (sSup s) = sSup (↑e '' s)) } =\n    𝟙 β\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : CompleteLatCat\ne : ↑α ≃o ↑β\nx✝ : (forget CompleteLatCat).obj β\n⊢ ↑({\n            tosInfHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_sInf' := (_ : ∀ (s : Set ↑β), ↑(OrderIso.symm e) (sInf s) = sInf (↑(OrderIso.symm e) '' s)) },\n            map_sSup' := (_ : ∀ (s : Set ↑β), ↑(OrderIso.symm e) (sSup s) = sSup (↑(OrderIso.symm e) '' s)) } ≫\n          { tosInfHom := { toFun := ↑e, map_sInf' := (_ : ∀ (s : Set ↑α), ↑e (sInf s) = sInf (↑e '' s)) },\n            map_sSup' := (_ : ∀ (s : Set ↑α), ↑e (sSup s) = sSup (↑e '' s)) })\n      x✝ =\n    ↑(𝟙 β) x✝\n[PROOFSTEP]\nexact e.apply_symm_apply _\n", "meta": {"mathlib_filename": "Mathlib.Order.Category.CompleteLatCat", "llama_tokens": 1247, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7217432062975979, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3973971254124779}}
{"text": "[GOAL]\nX : Type u\nY Z : Profinite\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Epi g\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nrw [epi_iff_surjective] at hg \n[GOAL]\nX : Type u\nY Z : Profinite\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nobtain ⟨g', hg'⟩ := hg.hasRightInverse\n[GOAL]\ncase intro\nX : Type u\nY Z : Profinite\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget Profinite).obj Z → (forget Profinite).obj Y\nhg' : Function.RightInverse g' ↑g\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nlet t : X → Y := g' ∘ f ∘ (pure : X → Ultrafilter X)\n[GOAL]\ncase intro\nX : Type u\nY Z : Profinite\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget Profinite).obj Z → (forget Profinite).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toCompHaus.toTop := g' ∘ ↑f ∘ pure\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nlet h : Ultrafilter X → Y := Ultrafilter.extend t\n[GOAL]\ncase intro\nX : Type u\nY Z : Profinite\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget Profinite).obj Z → (forget Profinite).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toCompHaus.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toCompHaus.toTop := Ultrafilter.extend t\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nhave hh : Continuous h := continuous_ultrafilter_extend _\n[GOAL]\ncase intro\nX : Type u\nY Z : Profinite\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget Profinite).obj Z → (forget Profinite).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toCompHaus.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toCompHaus.toTop := Ultrafilter.extend t\nhh : Continuous h\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nuse⟨h, hh⟩\n[GOAL]\ncase h\nX : Type u\nY Z : Profinite\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget Profinite).obj Z → (forget Profinite).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toCompHaus.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toCompHaus.toTop := Ultrafilter.extend t\nhh : Continuous h\n⊢ ContinuousMap.mk h ≫ g = f\n[PROOFSTEP]\napply Faithful.map_injective (F := forget Profinite)\n[GOAL]\ncase h.a\nX : Type u\nY Z : Profinite\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget Profinite).obj Z → (forget Profinite).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toCompHaus.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toCompHaus.toTop := Ultrafilter.extend t\nhh : Continuous h\n⊢ (forget Profinite).map (ContinuousMap.mk h ≫ g) = (forget Profinite).map f\n[PROOFSTEP]\nsimp only [ContinuousMap.coe_mk, coe_comp]\n[GOAL]\ncase h.a\nX : Type u\nY Z : Profinite\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget Profinite).obj Z → (forget Profinite).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toCompHaus.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toCompHaus.toTop := Ultrafilter.extend t\nhh : Continuous h\n⊢ (forget Profinite).map (ContinuousMap.mk (Ultrafilter.extend (g' ∘ ↑f ∘ pure)) ≫ g) = (forget Profinite).map f\n[PROOFSTEP]\nconvert\n  denseRange_pure.equalizer (g.continuous.comp hh) f.continuous\n    _\n      -- Porting note: same fix as in `Topology.Category.CompHaus.Projective`\n[GOAL]\ncase h.a\nX : Type u\nY Z : Profinite\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget Profinite).obj Z → (forget Profinite).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toCompHaus.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toCompHaus.toTop := Ultrafilter.extend t\nhh : Continuous h\n⊢ (↑g ∘ h) ∘ pure = ↑f ∘ pure\n[PROOFSTEP]\nlet g'' : ContinuousMap Y Z := g\n[GOAL]\ncase h.a\nX : Type u\nY Z : Profinite\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget Profinite).obj Z → (forget Profinite).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toCompHaus.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toCompHaus.toTop := Ultrafilter.extend t\nhh : Continuous h\ng'' : C(↑Y.toCompHaus.toTop, ↑Z.toCompHaus.toTop) := g\n⊢ (↑g ∘ h) ∘ pure = ↑f ∘ pure\n[PROOFSTEP]\nhave : g'' ∘ g' = id := hg'.comp_eq_id\n[GOAL]\ncase h.a\nX : Type u\nY Z : Profinite\nf : of (Ultrafilter X) ⟶ Z\ng : Y ⟶ Z\nhg : Surjective ↑g\ng' : (forget Profinite).obj Z → (forget Profinite).obj Y\nhg' : Function.RightInverse g' ↑g\nt : X → ↑Y.toCompHaus.toTop := g' ∘ ↑f ∘ pure\nh : Ultrafilter X → ↑Y.toCompHaus.toTop := Ultrafilter.extend t\nhh : Continuous h\ng'' : C(↑Y.toCompHaus.toTop, ↑Z.toCompHaus.toTop) := g\nthis : ↑g'' ∘ g' = id\n⊢ (↑g ∘ h) ∘ pure = ↑f ∘ pure\n[PROOFSTEP]\nrw [comp.assoc, ultrafilter_extend_extends, ← comp.assoc, this, comp.left_id]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.Profinite.Projective", "llama_tokens": 2091, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6791786861878392, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.39738823319873884}}
{"text": "[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU : Set E\n⊢ U ∈ basisSets p ↔ ∃ i r x, U = ball (Finset.sup i p) 0 r\n[PROOFSTEP]\nsimp only [basisSets, mem_iUnion, mem_singleton_iff]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ni : ι\nr : ℝ\nhr : 0 < r\n⊢ ball (p i) 0 r = ball (Finset.sup {i} p) 0 r\n[PROOFSTEP]\nrw [Finset.sup_singleton]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\n⊢ Set.Nonempty (basisSets p)\n[PROOFSTEP]\nlet i := Classical.arbitrary ι\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\ni : ι := Classical.arbitrary ι\n⊢ Set.Nonempty (basisSets p)\n[PROOFSTEP]\nrefine' nonempty_def.mpr ⟨(p i).ball 0 1, _⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\ni : ι := Classical.arbitrary ι\n⊢ ball (p i) 0 1 ∈ basisSets p\n[PROOFSTEP]\nexact p.basisSets_singleton_mem i zero_lt_one\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU V : Set E\nhU : U ∈ basisSets p\nhV : V ∈ basisSets p\n⊢ ∃ z, z ∈ basisSets p ∧ z ⊆ U ∩ V\n[PROOFSTEP]\nclassical\nrcases p.basisSets_iff.mp hU with ⟨s, r₁, hr₁, hU⟩\nrcases p.basisSets_iff.mp hV with ⟨t, r₂, hr₂, hV⟩\nuse((s ∪ t).sup p).ball 0 (min r₁ r₂)\nrefine' ⟨p.basisSets_mem (s ∪ t) (lt_min_iff.mpr ⟨hr₁, hr₂⟩), _⟩\nrw [hU, hV, ball_finset_sup_eq_iInter _ _ _ (lt_min_iff.mpr ⟨hr₁, hr₂⟩), ball_finset_sup_eq_iInter _ _ _ hr₁,\n  ball_finset_sup_eq_iInter _ _ _ hr₂]\nexact\n  Set.subset_inter (Set.iInter₂_mono' fun i hi => ⟨i, Finset.subset_union_left _ _ hi, ball_mono <| min_le_left _ _⟩)\n    (Set.iInter₂_mono' fun i hi => ⟨i, Finset.subset_union_right _ _ hi, ball_mono <| min_le_right _ _⟩)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU V : Set E\nhU : U ∈ basisSets p\nhV : V ∈ basisSets p\n⊢ ∃ z, z ∈ basisSets p ∧ z ⊆ U ∩ V\n[PROOFSTEP]\nrcases p.basisSets_iff.mp hU with ⟨s, r₁, hr₁, hU⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU V : Set E\nhU✝ : U ∈ basisSets p\nhV : V ∈ basisSets p\ns : Finset ι\nr₁ : ℝ\nhr₁ : 0 < r₁\nhU : U = ball (Finset.sup s p) 0 r₁\n⊢ ∃ z, z ∈ basisSets p ∧ z ⊆ U ∩ V\n[PROOFSTEP]\nrcases p.basisSets_iff.mp hV with ⟨t, r₂, hr₂, hV⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU V : Set E\nhU✝ : U ∈ basisSets p\nhV✝ : V ∈ basisSets p\ns : Finset ι\nr₁ : ℝ\nhr₁ : 0 < r₁\nhU : U = ball (Finset.sup s p) 0 r₁\nt : Finset ι\nr₂ : ℝ\nhr₂ : 0 < r₂\nhV : V = ball (Finset.sup t p) 0 r₂\n⊢ ∃ z, z ∈ basisSets p ∧ z ⊆ U ∩ V\n[PROOFSTEP]\nuse((s ∪ t).sup p).ball 0 (min r₁ r₂)\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU V : Set E\nhU✝ : U ∈ basisSets p\nhV✝ : V ∈ basisSets p\ns : Finset ι\nr₁ : ℝ\nhr₁ : 0 < r₁\nhU : U = ball (Finset.sup s p) 0 r₁\nt : Finset ι\nr₂ : ℝ\nhr₂ : 0 < r₂\nhV : V = ball (Finset.sup t p) 0 r₂\n⊢ ball (Finset.sup (s ∪ t) p) 0 (min r₁ r₂) ∈ basisSets p ∧ ball (Finset.sup (s ∪ t) p) 0 (min r₁ r₂) ⊆ U ∩ V\n[PROOFSTEP]\nrefine' ⟨p.basisSets_mem (s ∪ t) (lt_min_iff.mpr ⟨hr₁, hr₂⟩), _⟩\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU V : Set E\nhU✝ : U ∈ basisSets p\nhV✝ : V ∈ basisSets p\ns : Finset ι\nr₁ : ℝ\nhr₁ : 0 < r₁\nhU : U = ball (Finset.sup s p) 0 r₁\nt : Finset ι\nr₂ : ℝ\nhr₂ : 0 < r₂\nhV : V = ball (Finset.sup t p) 0 r₂\n⊢ ball (Finset.sup (s ∪ t) p) 0 (min r₁ r₂) ⊆ U ∩ V\n[PROOFSTEP]\nrw [hU, hV, ball_finset_sup_eq_iInter _ _ _ (lt_min_iff.mpr ⟨hr₁, hr₂⟩), ball_finset_sup_eq_iInter _ _ _ hr₁,\n  ball_finset_sup_eq_iInter _ _ _ hr₂]\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU V : Set E\nhU✝ : U ∈ basisSets p\nhV✝ : V ∈ basisSets p\ns : Finset ι\nr₁ : ℝ\nhr₁ : 0 < r₁\nhU : U = ball (Finset.sup s p) 0 r₁\nt : Finset ι\nr₂ : ℝ\nhr₂ : 0 < r₂\nhV : V = ball (Finset.sup t p) 0 r₂\n⊢ ⋂ (i : ι) (_ : i ∈ s ∪ t), ball (p i) 0 (min r₁ r₂) ⊆\n    (⋂ (i : ι) (_ : i ∈ s), ball (p i) 0 r₁) ∩ ⋂ (i : ι) (_ : i ∈ t), ball (p i) 0 r₂\n[PROOFSTEP]\nexact\n  Set.subset_inter (Set.iInter₂_mono' fun i hi => ⟨i, Finset.subset_union_left _ _ hi, ball_mono <| min_le_left _ _⟩)\n    (Set.iInter₂_mono' fun i hi => ⟨i, Finset.subset_union_right _ _ hi, ball_mono <| min_le_right _ _⟩)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU : Set E\nhU : U ∈ basisSets p\n⊢ 0 ∈ U\n[PROOFSTEP]\nrcases p.basisSets_iff.mp hU with ⟨ι', r, hr, hU⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι'✝ : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU : Set E\nhU✝ : U ∈ basisSets p\nι' : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup ι' p) 0 r\n⊢ 0 ∈ U\n[PROOFSTEP]\nrw [hU, mem_ball_zero, map_zero]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι'✝ : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU : Set E\nhU✝ : U ∈ basisSets p\nι' : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup ι' p) 0 r\n⊢ 0 < r\n[PROOFSTEP]\nexact hr\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU : Set E\nhU : U ∈ basisSets p\n⊢ ∃ V, V ∈ basisSets p ∧ V + V ⊆ U\n[PROOFSTEP]\nrcases p.basisSets_iff.mp hU with ⟨s, r, hr, hU⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ∃ V, V ∈ basisSets p ∧ V + V ⊆ U\n[PROOFSTEP]\nuse(s.sup p).ball 0 (r / 2)\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ball (Finset.sup s p) 0 (r / 2) ∈ basisSets p ∧ ball (Finset.sup s p) 0 (r / 2) + ball (Finset.sup s p) 0 (r / 2) ⊆ U\n[PROOFSTEP]\nrefine' ⟨p.basisSets_mem s (div_pos hr zero_lt_two), _⟩\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ball (Finset.sup s p) 0 (r / 2) + ball (Finset.sup s p) 0 (r / 2) ⊆ U\n[PROOFSTEP]\nrefine' Set.Subset.trans (ball_add_ball_subset (s.sup p) (r / 2) (r / 2) 0 0) _\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ball (Finset.sup s p) (0 + 0) (r / 2 + r / 2) ⊆ U\n[PROOFSTEP]\nrw [hU, add_zero, add_halves']\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU : Set E\nhU' : U ∈ basisSets p\n⊢ ∃ V, V ∈ basisSets p ∧ V ⊆ (fun x => -x) ⁻¹' U\n[PROOFSTEP]\nrcases p.basisSets_iff.mp hU' with ⟨s, r, _, hU⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU : Set E\nhU' : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nw✝ : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ∃ V, V ∈ basisSets p ∧ V ⊆ (fun x => -x) ⁻¹' U\n[PROOFSTEP]\nrw [hU, neg_preimage, neg_ball (s.sup p), neg_zero]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nU : Set E\nhU' : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nw✝ : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ∃ V, V ∈ basisSets p ∧ V ⊆ ball (Finset.sup s p) 0 r\n[PROOFSTEP]\nexact ⟨U, hU', Eq.subset hU⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nv : E\nU : Set E\nhU : U ∈ basisSets p\n⊢ ∀ᶠ (x : 𝕜) in 𝓝 0, x • v ∈ U\n[PROOFSTEP]\nrcases p.basisSets_iff.mp hU with ⟨s, r, hr, hU⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nv : E\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ∀ᶠ (x : 𝕜) in 𝓝 0, x • v ∈ U\n[PROOFSTEP]\nrw [hU, Filter.eventually_iff]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nv : E\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ {x | x • v ∈ ball (Finset.sup s p) 0 r} ∈ 𝓝 0\n[PROOFSTEP]\nsimp_rw [(s.sup p).mem_ball_zero, map_smul_eq_mul]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nv : E\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ {x | ‖x‖ * ↑(Finset.sup s p) v < r} ∈ 𝓝 0\n[PROOFSTEP]\nby_cases h : 0 < (s.sup p) v\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nv : E\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : 0 < ↑(Finset.sup s p) v\n⊢ {x | ‖x‖ * ↑(Finset.sup s p) v < r} ∈ 𝓝 0\n[PROOFSTEP]\nsimp_rw [(lt_div_iff h).symm]\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nv : E\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : 0 < ↑(Finset.sup s p) v\n⊢ {x | ‖x‖ < r / ↑(Finset.sup s p) v} ∈ 𝓝 0\n[PROOFSTEP]\nrw [← _root_.ball_zero_eq]\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nv : E\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : 0 < ↑(Finset.sup s p) v\n⊢ Metric.ball 0 (r / ↑(Finset.sup s p) v) ∈ 𝓝 0\n[PROOFSTEP]\nexact Metric.ball_mem_nhds 0 (div_pos hr h)\n[GOAL]\ncase neg\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nv : E\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : ¬0 < ↑(Finset.sup s p) v\n⊢ {x | ‖x‖ * ↑(Finset.sup s p) v < r} ∈ 𝓝 0\n[PROOFSTEP]\nsimp_rw [le_antisymm (not_lt.mp h) (map_nonneg _ v), mul_zero, hr]\n[GOAL]\ncase neg\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝² : NormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\nv : E\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : ¬0 < ↑(Finset.sup s p) v\n⊢ {x | True} ∈ 𝓝 0\n[PROOFSTEP]\nexact IsOpen.mem_nhds isOpen_univ (mem_univ 0)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nU : Set E\nhU : U ∈ basisSets p\n⊢ ∃ V, V ∈ 𝓝 0 ∧ ∃ W, W ∈ AddGroupFilterBasis.toFilterBasis.sets ∧ V • W ⊆ U\n[PROOFSTEP]\nrcases p.basisSets_iff.mp hU with ⟨s, r, hr, hU⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ∃ V, V ∈ 𝓝 0 ∧ ∃ W, W ∈ AddGroupFilterBasis.toFilterBasis.sets ∧ V • W ⊆ U\n[PROOFSTEP]\nrefine' ⟨Metric.ball 0 r.sqrt, Metric.ball_mem_nhds 0 (Real.sqrt_pos.mpr hr), _⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ∃ W, W ∈ AddGroupFilterBasis.toFilterBasis.sets ∧ Metric.ball 0 (Real.sqrt r) • W ⊆ U\n[PROOFSTEP]\nrefine' ⟨(s.sup p).ball 0 r.sqrt, p.basisSets_mem s (Real.sqrt_pos.mpr hr), _⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ Metric.ball 0 (Real.sqrt r) • ball (Finset.sup s p) 0 (Real.sqrt r) ⊆ U\n[PROOFSTEP]\nrefine' Set.Subset.trans (ball_smul_ball (s.sup p) r.sqrt r.sqrt) _\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ball (Finset.sup s p) 0 (Real.sqrt r * Real.sqrt r) ⊆ U\n[PROOFSTEP]\nrw [hU, Real.mul_self_sqrt (le_of_lt hr)]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nx : 𝕜\nU : Set E\nhU : U ∈ basisSets p\n⊢ ∃ V, V ∈ AddGroupFilterBasis.toFilterBasis.sets ∧ V ⊆ (fun y => x • y) ⁻¹' U\n[PROOFSTEP]\nrcases p.basisSets_iff.mp hU with ⟨s, r, hr, hU⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nx : 𝕜\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ∃ V, V ∈ AddGroupFilterBasis.toFilterBasis.sets ∧ V ⊆ (fun y => x • y) ⁻¹' U\n[PROOFSTEP]\nrw [hU]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nx : 𝕜\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ∃ V, V ∈ AddGroupFilterBasis.toFilterBasis.sets ∧ V ⊆ (fun y => x • y) ⁻¹' ball (Finset.sup s p) 0 r\n[PROOFSTEP]\nby_cases h : x ≠ 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nx : 𝕜\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : x ≠ 0\n⊢ ∃ V, V ∈ AddGroupFilterBasis.toFilterBasis.sets ∧ V ⊆ (fun y => x • y) ⁻¹' ball (Finset.sup s p) 0 r\n[PROOFSTEP]\nrw [(s.sup p).smul_ball_preimage 0 r x h, smul_zero]\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nx : 𝕜\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : x ≠ 0\n⊢ ∃ V, V ∈ AddGroupFilterBasis.toFilterBasis.sets ∧ V ⊆ ball (Finset.sup s p) 0 (r / ‖x‖)\n[PROOFSTEP]\nuse(s.sup p).ball 0 (r / ‖x‖)\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nx : 𝕜\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : x ≠ 0\n⊢ ball (Finset.sup s p) 0 (r / ‖x‖) ∈ AddGroupFilterBasis.toFilterBasis.sets ∧\n    ball (Finset.sup s p) 0 (r / ‖x‖) ⊆ ball (Finset.sup s p) 0 (r / ‖x‖)\n[PROOFSTEP]\nexact ⟨p.basisSets_mem s (div_pos hr (norm_pos_iff.mpr h)), Subset.rfl⟩\n[GOAL]\ncase neg\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nx : 𝕜\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : ¬x ≠ 0\n⊢ ∃ V, V ∈ AddGroupFilterBasis.toFilterBasis.sets ∧ V ⊆ (fun y => x • y) ⁻¹' ball (Finset.sup s p) 0 r\n[PROOFSTEP]\nrefine' ⟨(s.sup p).ball 0 r, p.basisSets_mem s hr, _⟩\n[GOAL]\ncase neg\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nx : 𝕜\nU : Set E\nhU✝ : U ∈ basisSets p\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : ¬x ≠ 0\n⊢ ball (Finset.sup s p) 0 r ⊆ (fun y => x • y) ⁻¹' ball (Finset.sup s p) 0 r\n[PROOFSTEP]\nsimp only [not_ne_iff.mp h, Set.subset_def, mem_ball_zero, hr, mem_univ, map_zero, imp_true_iff, preimage_const_of_mem,\n  zero_smul]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np✝ : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\np : SeminormFamily 𝕜 E ι\n⊢ FilterBasis.filter AddGroupFilterBasis.toFilterBasis = ⨅ (i : ι), comap (↑(p i)) (𝓝 0)\n[PROOFSTEP]\nrefine' le_antisymm (le_iInf fun i => _) _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np✝ : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ni : ι\n⊢ FilterBasis.filter AddGroupFilterBasis.toFilterBasis ≤ comap (↑(p i)) (𝓝 0)\n[PROOFSTEP]\nrw [p.moduleFilterBasis.toFilterBasis.hasBasis.le_basis_iff (Metric.nhds_basis_ball.comap _)]\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np✝ : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ni : ι\n⊢ ∀ (i' : ℝ), 0 < i' → ∃ i_1, i_1 ∈ AddGroupFilterBasis.toFilterBasis ∧ id i_1 ⊆ ↑(p i) ⁻¹' Metric.ball 0 i'\n[PROOFSTEP]\nintro ε hε\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np✝ : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ni : ι\nε : ℝ\nhε : 0 < ε\n⊢ ∃ i_1, i_1 ∈ AddGroupFilterBasis.toFilterBasis ∧ id i_1 ⊆ ↑(p i) ⁻¹' Metric.ball 0 ε\n[PROOFSTEP]\nrefine' ⟨(p i).ball 0 ε, _, _⟩\n[GOAL]\ncase refine'_1.refine'_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np✝ : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ni : ι\nε : ℝ\nhε : 0 < ε\n⊢ ball (p i) 0 ε ∈ AddGroupFilterBasis.toFilterBasis\n[PROOFSTEP]\nrw [← (Finset.sup_singleton : _ = p i)]\n[GOAL]\ncase refine'_1.refine'_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np✝ : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ni : ι\nε : ℝ\nhε : 0 < ε\n⊢ ball (Finset.sup {i} p) 0 ε ∈ AddGroupFilterBasis.toFilterBasis\n[PROOFSTEP]\nexact p.basisSets_mem { i } hε\n[GOAL]\ncase refine'_1.refine'_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np✝ : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ni : ι\nε : ℝ\nhε : 0 < ε\n⊢ id (ball (p i) 0 ε) ⊆ ↑(p i) ⁻¹' Metric.ball 0 ε\n[PROOFSTEP]\nrw [id, (p i).ball_zero_eq_preimage_ball]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np✝ : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\np : SeminormFamily 𝕜 E ι\n⊢ ⨅ (i : ι), comap (↑(p i)) (𝓝 0) ≤ FilterBasis.filter AddGroupFilterBasis.toFilterBasis\n[PROOFSTEP]\nrw [p.moduleFilterBasis.toFilterBasis.hasBasis.ge_iff]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np✝ : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\np : SeminormFamily 𝕜 E ι\n⊢ ∀ (i' : Set E), i' ∈ AddGroupFilterBasis.toFilterBasis → id i' ∈ ⨅ (i : ι), comap (↑(p i)) (𝓝 0)\n[PROOFSTEP]\nrintro U (hU : U ∈ p.basisSets)\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np✝ : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\np : SeminormFamily 𝕜 E ι\nU : Set E\nhU : U ∈ basisSets p\n⊢ id U ∈ ⨅ (i : ι), comap (↑(p i)) (𝓝 0)\n[PROOFSTEP]\nrcases p.basisSets_iff.mp hU with ⟨s, r, hr, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np✝ : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : ball (Finset.sup s p) 0 r ∈ basisSets p\n⊢ id (ball (Finset.sup s p) 0 r) ∈ ⨅ (i : ι), comap (↑(p i)) (𝓝 0)\n[PROOFSTEP]\nrw [id, Seminorm.ball_finset_sup_eq_iInter _ _ _ hr, s.iInter_mem_sets]\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\np✝ : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhU : ball (Finset.sup s p) 0 r ∈ basisSets p\n⊢ ∀ (i : ι), i ∈ s → ball (p i) 0 r ∈ ⨅ (i : ι), comap (↑(p i)) (𝓝 0)\n[PROOFSTEP]\nexact fun i _ =>\n  Filter.mem_iInf_of_mem i ⟨Metric.ball 0 r, Metric.ball_mem_nhds 0 hr, Eq.subset (p i).ball_zero_eq_preimage_ball.symm⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι'✝ : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\nι' : Type u_10\ninst✝ : Nonempty ι'\np : ι → Seminorm 𝕜 E\nq : Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\n⊢ IsBounded p (fun x => q) f ↔ ∃ s C, comp q f ≤ C • Finset.sup s p\n[PROOFSTEP]\nsimp only [IsBounded, forall_const]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι✝ : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\nι : Type u_10\ninst✝ : Nonempty ι\np : Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\n⊢ IsBounded (fun x => p) q f ↔ ∀ (i : ι'), ∃ C, comp (q i) f ≤ C • p\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι✝ : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\nι : Type u_10\ninst✝ : Nonempty ι\np : Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\n⊢ IsBounded (fun x => p) q f → ∀ (i : ι'), ∃ C, comp (q i) f ≤ C • p\n[PROOFSTEP]\nintro h i\n[GOAL]\ncase mpr\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι✝ : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\nι : Type u_10\ninst✝ : Nonempty ι\np : Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\n⊢ (∀ (i : ι'), ∃ C, comp (q i) f ≤ C • p) → IsBounded (fun x => p) q f\n[PROOFSTEP]\nintro h i\n[GOAL]\ncase mp\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι✝ : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\nι : Type u_10\ninst✝ : Nonempty ι\np : Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\nh : IsBounded (fun x => p) q f\ni : ι'\n⊢ ∃ C, comp (q i) f ≤ C • p\n[PROOFSTEP]\nrcases h i with ⟨s, C, h⟩\n[GOAL]\ncase mp.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι✝ : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\nι : Type u_10\ninst✝ : Nonempty ι\np : Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\nh✝ : IsBounded (fun x => p) q f\ni : ι'\ns : Finset ι\nC : ℝ≥0\nh : comp (q i) f ≤ C • Finset.sup s fun x => p\n⊢ ∃ C, comp (q i) f ≤ C • p\n[PROOFSTEP]\nexact ⟨C, le_trans h (smul_le_smul (Finset.sup_le fun _ _ => le_rfl) le_rfl)⟩\n[GOAL]\ncase mpr\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι✝ : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\nι : Type u_10\ninst✝ : Nonempty ι\np : Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\nh : ∀ (i : ι'), ∃ C, comp (q i) f ≤ C • p\ni : ι'\n⊢ ∃ s C, comp (q i) f ≤ C • Finset.sup s fun x => p\n[PROOFSTEP]\nuse{Classical.arbitrary ι}\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι✝ : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\nι : Type u_10\ninst✝ : Nonempty ι\np : Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\nh : ∀ (i : ι'), ∃ C, comp (q i) f ≤ C • p\ni : ι'\n⊢ ∃ C, comp (q i) f ≤ C • Finset.sup {Classical.arbitrary ι} fun x => p\n[PROOFSTEP]\nsimp only [h, Finset.sup_singleton]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\nhf : IsBounded p q f\ns' : Finset ι'\n⊢ ∃ C s, comp (Finset.sup s' q) f ≤ C • Finset.sup s p\n[PROOFSTEP]\nclassical\nobtain rfl | _ := s'.eq_empty_or_nonempty\n· exact ⟨1, ∅, by simp [Seminorm.bot_eq_zero]⟩\nchoose fₛ fC hf using hf\nuse s'.card • s'.sup fC, Finset.biUnion s' fₛ\nhave hs : ∀ i : ι', i ∈ s' → (q i).comp f ≤ s'.sup fC • (Finset.biUnion s' fₛ).sup p :=\n  by\n  intro i hi\n  refine' (hf i).trans (smul_le_smul _ (Finset.le_sup hi))\n  exact Finset.sup_mono (Finset.subset_biUnion_of_mem fₛ hi)\nrefine' (comp_mono f (finset_sup_le_sum q s')).trans _\nsimp_rw [← pullback_apply, map_sum, pullback_apply]\nrefine' (Finset.sum_le_sum hs).trans _\nrw [Finset.sum_const, smul_assoc]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\nhf : IsBounded p q f\ns' : Finset ι'\n⊢ ∃ C s, comp (Finset.sup s' q) f ≤ C • Finset.sup s p\n[PROOFSTEP]\nobtain rfl | _ := s'.eq_empty_or_nonempty\n[GOAL]\ncase inl\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\nhf : IsBounded p q f\n⊢ ∃ C s, comp (Finset.sup ∅ q) f ≤ C • Finset.sup s p\n[PROOFSTEP]\nexact ⟨1, ∅, by simp [Seminorm.bot_eq_zero]⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\nhf : IsBounded p q f\n⊢ comp (Finset.sup ∅ q) f ≤ 1 • Finset.sup ∅ p\n[PROOFSTEP]\nsimp [Seminorm.bot_eq_zero]\n[GOAL]\ncase inr\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\nhf : IsBounded p q f\ns' : Finset ι'\nh✝ : Finset.Nonempty s'\n⊢ ∃ C s, comp (Finset.sup s' q) f ≤ C • Finset.sup s p\n[PROOFSTEP]\nchoose fₛ fC hf using hf\n[GOAL]\ncase inr\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\ns' : Finset ι'\nh✝ : Finset.Nonempty s'\nfₛ : ι' → Finset ι\nfC : ι' → ℝ≥0\nhf : ∀ (i : ι'), comp (q i) f ≤ fC i • Finset.sup (fₛ i) p\n⊢ ∃ C s, comp (Finset.sup s' q) f ≤ C • Finset.sup s p\n[PROOFSTEP]\nuse s'.card • s'.sup fC, Finset.biUnion s' fₛ\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\ns' : Finset ι'\nh✝ : Finset.Nonempty s'\nfₛ : ι' → Finset ι\nfC : ι' → ℝ≥0\nhf : ∀ (i : ι'), comp (q i) f ≤ fC i • Finset.sup (fₛ i) p\n⊢ comp (Finset.sup s' q) f ≤ (Finset.card s' • Finset.sup s' fC) • Finset.sup (Finset.biUnion s' fₛ) p\n[PROOFSTEP]\nhave hs : ∀ i : ι', i ∈ s' → (q i).comp f ≤ s'.sup fC • (Finset.biUnion s' fₛ).sup p :=\n  by\n  intro i hi\n  refine' (hf i).trans (smul_le_smul _ (Finset.le_sup hi))\n  exact Finset.sup_mono (Finset.subset_biUnion_of_mem fₛ hi)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\ns' : Finset ι'\nh✝ : Finset.Nonempty s'\nfₛ : ι' → Finset ι\nfC : ι' → ℝ≥0\nhf : ∀ (i : ι'), comp (q i) f ≤ fC i • Finset.sup (fₛ i) p\n⊢ ∀ (i : ι'), i ∈ s' → comp (q i) f ≤ Finset.sup s' fC • Finset.sup (Finset.biUnion s' fₛ) p\n[PROOFSTEP]\nintro i hi\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\ns' : Finset ι'\nh✝ : Finset.Nonempty s'\nfₛ : ι' → Finset ι\nfC : ι' → ℝ≥0\nhf : ∀ (i : ι'), comp (q i) f ≤ fC i • Finset.sup (fₛ i) p\ni : ι'\nhi : i ∈ s'\n⊢ comp (q i) f ≤ Finset.sup s' fC • Finset.sup (Finset.biUnion s' fₛ) p\n[PROOFSTEP]\nrefine' (hf i).trans (smul_le_smul _ (Finset.le_sup hi))\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\ns' : Finset ι'\nh✝ : Finset.Nonempty s'\nfₛ : ι' → Finset ι\nfC : ι' → ℝ≥0\nhf : ∀ (i : ι'), comp (q i) f ≤ fC i • Finset.sup (fₛ i) p\ni : ι'\nhi : i ∈ s'\n⊢ Finset.sup (fₛ i) p ≤ Finset.sup (Finset.biUnion s' fₛ) p\n[PROOFSTEP]\nexact Finset.sup_mono (Finset.subset_biUnion_of_mem fₛ hi)\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\ns' : Finset ι'\nh✝ : Finset.Nonempty s'\nfₛ : ι' → Finset ι\nfC : ι' → ℝ≥0\nhf : ∀ (i : ι'), comp (q i) f ≤ fC i • Finset.sup (fₛ i) p\nhs : ∀ (i : ι'), i ∈ s' → comp (q i) f ≤ Finset.sup s' fC • Finset.sup (Finset.biUnion s' fₛ) p\n⊢ comp (Finset.sup s' q) f ≤ (Finset.card s' • Finset.sup s' fC) • Finset.sup (Finset.biUnion s' fₛ) p\n[PROOFSTEP]\nrefine' (comp_mono f (finset_sup_le_sum q s')).trans _\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\ns' : Finset ι'\nh✝ : Finset.Nonempty s'\nfₛ : ι' → Finset ι\nfC : ι' → ℝ≥0\nhf : ∀ (i : ι'), comp (q i) f ≤ fC i • Finset.sup (fₛ i) p\nhs : ∀ (i : ι'), i ∈ s' → comp (q i) f ≤ Finset.sup s' fC • Finset.sup (Finset.biUnion s' fₛ) p\n⊢ comp (∑ i in s', q i) f ≤ (Finset.card s' • Finset.sup s' fC) • Finset.sup (Finset.biUnion s' fₛ) p\n[PROOFSTEP]\nsimp_rw [← pullback_apply, map_sum, pullback_apply]\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\ns' : Finset ι'\nh✝ : Finset.Nonempty s'\nfₛ : ι' → Finset ι\nfC : ι' → ℝ≥0\nhf : ∀ (i : ι'), comp (q i) f ≤ fC i • Finset.sup (fₛ i) p\nhs : ∀ (i : ι'), i ∈ s' → comp (q i) f ≤ Finset.sup s' fC • Finset.sup (Finset.biUnion s' fₛ) p\n⊢ ∑ x in s', comp (q x) f ≤ (Finset.card s' • Finset.sup s' fC) • Finset.sup (Finset.biUnion s' fₛ) p\n[PROOFSTEP]\nrefine' (Finset.sum_le_sum hs).trans _\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : ι → Seminorm 𝕜 E\nq : ι' → Seminorm 𝕜₂ F\nf : E →ₛₗ[σ₁₂] F\ns' : Finset ι'\nh✝ : Finset.Nonempty s'\nfₛ : ι' → Finset ι\nfC : ι' → ℝ≥0\nhf : ∀ (i : ι'), comp (q i) f ≤ fC i • Finset.sup (fₛ i) p\nhs : ∀ (i : ι'), i ∈ s' → comp (q i) f ≤ Finset.sup s' fC • Finset.sup (Finset.biUnion s' fₛ) p\n⊢ ∑ i in s', Finset.sup s' fC • Finset.sup (Finset.biUnion s' fₛ) p ≤\n    (Finset.card s' • Finset.sup s' fC) • Finset.sup (Finset.biUnion s' fₛ) p\n[PROOFSTEP]\nrw [Finset.sum_const, smul_assoc]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\n⊢ TopologicalAddGroup E\n[PROOFSTEP]\nrw [hp.withSeminorms_eq]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\n⊢ TopologicalAddGroup E\n[PROOFSTEP]\nexact AddGroupFilterBasis.isTopologicalAddGroup _\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\n⊢ ContinuousSMul 𝕜 E\n[PROOFSTEP]\nrw [hp.withSeminorms_eq]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\n⊢ ContinuousSMul 𝕜 E\n[PROOFSTEP]\nexact ModuleFilterBasis.continuousSMul _\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\n⊢ HasBasis (𝓝 0) (fun s => s ∈ SeminormFamily.basisSets p) id\n[PROOFSTEP]\nrw [congr_fun (congr_arg (@nhds E) hp.1) 0]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\n⊢ HasBasis (𝓝 0) (fun s => s ∈ SeminormFamily.basisSets p) id\n[PROOFSTEP]\nexact AddGroupFilterBasis.nhds_zero_hasBasis _\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\n⊢ HasBasis (𝓝 0) (fun sr => 0 < sr.snd) fun sr => ball (Finset.sup sr.fst p) 0 sr.snd\n[PROOFSTEP]\nrefine' ⟨fun V => _⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nV : Set E\n⊢ V ∈ 𝓝 0 ↔ ∃ i, 0 < i.snd ∧ ball (Finset.sup i.fst p) 0 i.snd ⊆ V\n[PROOFSTEP]\nsimp only [hp.hasBasis.mem_iff, SeminormFamily.basisSets_iff, Prod.exists]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nV : Set E\n⊢ (∃ i, (∃ i_1 r x, i = ball (Finset.sup i_1 p) 0 r) ∧ id i ⊆ V) ↔ ∃ a b, 0 < b ∧ ball (Finset.sup a p) 0 b ⊆ V\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nV : Set E\n⊢ (∃ i, (∃ i_1 r x, i = ball (Finset.sup i_1 p) 0 r) ∧ id i ⊆ V) → ∃ a b, 0 < b ∧ ball (Finset.sup a p) 0 b ⊆ V\n[PROOFSTEP]\nrintro ⟨-, ⟨s, r, hr, rfl⟩, hV⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nV : Set E\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhV : id (ball (Finset.sup s p) 0 r) ⊆ V\n⊢ ∃ a b, 0 < b ∧ ball (Finset.sup a p) 0 b ⊆ V\n[PROOFSTEP]\nexact ⟨s, r, hr, hV⟩\n[GOAL]\ncase mpr\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nV : Set E\n⊢ (∃ a b, 0 < b ∧ ball (Finset.sup a p) 0 b ⊆ V) → ∃ i, (∃ i_1 r x, i = ball (Finset.sup i_1 p) 0 r) ∧ id i ⊆ V\n[PROOFSTEP]\nrintro ⟨s, r, hr, hV⟩\n[GOAL]\ncase mpr.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nV : Set E\ns : Finset ι\nr : ℝ\nhr : 0 < r\nhV : ball (Finset.sup s p) 0 r ⊆ V\n⊢ ∃ i, (∃ i_1 r x, i = ball (Finset.sup i_1 p) 0 r) ∧ id i ⊆ V\n[PROOFSTEP]\nexact ⟨_, ⟨s, r, hr, rfl⟩, hV⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nx : E\n⊢ HasBasis (𝓝 x) (fun sr => 0 < sr.snd) fun sr => ball (Finset.sup sr.fst p) x sr.snd\n[PROOFSTEP]\nhave : TopologicalAddGroup E := hp.topologicalAddGroup\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nx : E\nthis : TopologicalAddGroup E\n⊢ HasBasis (𝓝 x) (fun sr => 0 < sr.snd) fun sr => ball (Finset.sup sr.fst p) x sr.snd\n[PROOFSTEP]\nrw [← map_add_left_nhds_zero]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nx : E\nthis : TopologicalAddGroup E\n⊢ HasBasis (Filter.map ((fun x x_1 => x + x_1) x) (𝓝 0)) (fun sr => 0 < sr.snd) fun sr =>\n    ball (Finset.sup sr.fst p) x sr.snd\n[PROOFSTEP]\nconvert hp.hasBasis_zero_ball.map ((· + ·) x) using 1\n[GOAL]\ncase h.e'_5\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nx : E\nthis : TopologicalAddGroup E\n⊢ (fun sr => ball (Finset.sup sr.fst p) x sr.snd) = fun i =>\n    (fun x x_1 => x + x_1) x '' ball (Finset.sup i.fst p) 0 i.snd\n[PROOFSTEP]\next sr : 1\n  -- Porting note: extra type ascriptions needed on `0`\n[GOAL]\ncase h.e'_5.h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nx : E\nthis : TopologicalAddGroup E\nsr : Finset ι × ℝ\n⊢ ball (Finset.sup sr.fst p) x sr.snd = (fun x x_1 => x + x_1) x '' ball (Finset.sup sr.fst p) 0 sr.snd\n[PROOFSTEP]\nhave : (sr.fst.sup p).ball (x +ᵥ (0 : E)) sr.snd = x +ᵥ (sr.fst.sup p).ball 0 sr.snd :=\n  Eq.symm (Seminorm.vadd_ball (sr.fst.sup p))\n[GOAL]\ncase h.e'_5.h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nx : E\nthis✝ : TopologicalAddGroup E\nsr : Finset ι × ℝ\nthis : ball (Finset.sup sr.fst p) (x +ᵥ 0) sr.snd = x +ᵥ ball (Finset.sup sr.fst p) 0 sr.snd\n⊢ ball (Finset.sup sr.fst p) x sr.snd = (fun x x_1 => x + x_1) x '' ball (Finset.sup sr.fst p) 0 sr.snd\n[PROOFSTEP]\nrwa [vadd_eq_add, add_zero] at this \n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nx : E\nU : Set E\n⊢ U ∈ 𝓝 x ↔ ∃ s r, r > 0 ∧ ball (Finset.sup s p) x r ⊆ U\n[PROOFSTEP]\nrw [hp.hasBasis_ball.mem_iff, Prod.exists]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nU : Set E\n⊢ IsOpen U ↔ ∀ (x : E), x ∈ U → ∃ s r, r > 0 ∧ ball (Finset.sup s p) x r ⊆ U\n[PROOFSTEP]\nsimp_rw [← WithSeminorms.mem_nhds_iff hp _ U, isOpen_iff_mem_nhds]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nh : ∀ (x : E), x ≠ 0 → ∃ i, ↑(p i) x ≠ 0\n⊢ T1Space E\n[PROOFSTEP]\nhave := hp.topologicalAddGroup\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nh : ∀ (x : E), x ≠ 0 → ∃ i, ↑(p i) x ≠ 0\nthis : TopologicalAddGroup E\n⊢ T1Space E\n[PROOFSTEP]\nrefine' TopologicalAddGroup.t1Space _ _\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nh : ∀ (x : E), x ≠ 0 → ∃ i, ↑(p i) x ≠ 0\nthis : TopologicalAddGroup E\n⊢ IsClosed {0}\n[PROOFSTEP]\nrw [← isOpen_compl_iff, hp.isOpen_iff_mem_balls]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nh : ∀ (x : E), x ≠ 0 → ∃ i, ↑(p i) x ≠ 0\nthis : TopologicalAddGroup E\n⊢ ∀ (x : E), x ∈ {0}ᶜ → ∃ s r, r > 0 ∧ ball (Finset.sup s p) x r ⊆ {0}ᶜ\n[PROOFSTEP]\nrintro x (hx : x ≠ 0)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nh : ∀ (x : E), x ≠ 0 → ∃ i, ↑(p i) x ≠ 0\nthis : TopologicalAddGroup E\nx : E\nhx : x ≠ 0\n⊢ ∃ s r, r > 0 ∧ ball (Finset.sup s p) x r ⊆ {0}ᶜ\n[PROOFSTEP]\ncases' h x hx with i pi_nonzero\n[GOAL]\ncase intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nh : ∀ (x : E), x ≠ 0 → ∃ i, ↑(p i) x ≠ 0\nthis : TopologicalAddGroup E\nx : E\nhx : x ≠ 0\ni : ι\npi_nonzero : ↑(p i) x ≠ 0\n⊢ ∃ s r, r > 0 ∧ ball (Finset.sup s p) x r ⊆ {0}ᶜ\n[PROOFSTEP]\nrefine' ⟨{ i }, p i x, by positivity, subset_compl_singleton_iff.mpr _⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nh : ∀ (x : E), x ≠ 0 → ∃ i, ↑(p i) x ≠ 0\nthis : TopologicalAddGroup E\nx : E\nhx : x ≠ 0\ni : ι\npi_nonzero : ↑(p i) x ≠ 0\n⊢ ↑(p i) x > 0\n[PROOFSTEP]\npositivity\n[GOAL]\ncase intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nh : ∀ (x : E), x ≠ 0 → ∃ i, ↑(p i) x ≠ 0\nthis : TopologicalAddGroup E\nx : E\nhx : x ≠ 0\ni : ι\npi_nonzero : ↑(p i) x ≠ 0\n⊢ ¬0 ∈ ball (Finset.sup {i} p) x (↑(p i) x)\n[PROOFSTEP]\nrw [Finset.sup_singleton, mem_ball, zero_sub, map_neg_eq_map, not_lt]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\ninst✝ : T1Space E\nhp : WithSeminorms p\nx : E\nhx : x ≠ 0\n⊢ ∃ i, ↑(p i) x ≠ 0\n[PROOFSTEP]\nhave := ((t1Space_TFAE E).out 0 9).mp (inferInstanceAs <| T1Space E)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\ninst✝ : T1Space E\nhp : WithSeminorms p\nx : E\nhx : x ≠ 0\nthis : ∀ ⦃x y : E⦄, x ⤳ y → x = y\n⊢ ∃ i, ↑(p i) x ≠ 0\n[PROOFSTEP]\nby_contra' h\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\ninst✝ : T1Space E\nhp : WithSeminorms p\nx : E\nhx : x ≠ 0\nthis : ∀ ⦃x y : E⦄, x ⤳ y → x = y\nh : ∀ (i : ι), ↑(p i) x = 0\n⊢ False\n[PROOFSTEP]\nrefine' hx (this _)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\ninst✝ : T1Space E\nhp : WithSeminorms p\nx : E\nhx : x ≠ 0\nthis : ∀ ⦃x y : E⦄, x ⤳ y → x = y\nh : ∀ (i : ι), ↑(p i) x = 0\n⊢ x ⤳ 0\n[PROOFSTEP]\nrw [hp.hasBasis_zero_ball.specializes_iff]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\ninst✝ : T1Space E\nhp : WithSeminorms p\nx : E\nhx : x ≠ 0\nthis : ∀ ⦃x y : E⦄, x ⤳ y → x = y\nh : ∀ (i : ι), ↑(p i) x = 0\n⊢ ∀ (i : Finset ι × ℝ), 0 < i.snd → x ∈ ball (Finset.sup i.fst p) 0 i.snd\n[PROOFSTEP]\nrintro ⟨s, r⟩ (hr : 0 < r)\n[GOAL]\ncase mk\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\ninst✝ : T1Space E\nhp : WithSeminorms p\nx : E\nhx : x ≠ 0\nthis : ∀ ⦃x y : E⦄, x ⤳ y → x = y\nh : ∀ (i : ι), ↑(p i) x = 0\ns : Finset ι\nr : ℝ\nhr : 0 < r\n⊢ x ∈ ball (Finset.sup (s, r).fst p) 0 (s, r).snd\n[PROOFSTEP]\nsimp only [ball_finset_sup_eq_iInter _ _ _ hr, mem_iInter₂, mem_ball_zero, h, hr, forall_true_iff]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\n⊢ (∀ (x : E), x ≠ 0 → ∃ i, ↑(p i) x ≠ 0) ↔ T1Space E\n[PROOFSTEP]\nrefine' ⟨WithSeminorms.T1_of_separating hp, _⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\n⊢ T1Space E → ∀ (x : E), x ≠ 0 → ∃ i, ↑(p i) x ≠ 0\n[PROOFSTEP]\nintro\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\na✝ : T1Space E\n⊢ ∀ (x : E), x ≠ 0 → ∃ i, ↑(p i) x ≠ 0\n[PROOFSTEP]\nexact WithSeminorms.separating_of_T1 hp\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nu : F → E\nf : Filter F\ny₀ : E\n⊢ Tendsto u f (𝓝 y₀) ↔ ∀ (s : Finset ι) (ε : ℝ), 0 < ε → ∀ᶠ (x : F) in f, ↑(Finset.sup s p) (u x - y₀) < ε\n[PROOFSTEP]\nsimp [hp.hasBasis_ball.tendsto_right_iff]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nu : F → E\nf : Filter F\ny₀ : E\n⊢ Tendsto u f (𝓝 y₀) ↔ ∀ (i : ι) (ε : ℝ), 0 < ε → ∀ᶠ (x : F) in f, ↑(p i) (u x - y₀) < ε\n[PROOFSTEP]\nrw [hp.tendsto_nhds' u y₀]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nu : F → E\nf : Filter F\ny₀ : E\n⊢ (∀ (s : Finset ι) (ε : ℝ), 0 < ε → ∀ᶠ (x : F) in f, ↑(Finset.sup s p) (u x - y₀) < ε) ↔\n    ∀ (i : ι) (ε : ℝ), 0 < ε → ∀ᶠ (x : F) in f, ↑(p i) (u x - y₀) < ε\n[PROOFSTEP]\nexact\n  ⟨fun h i => by simpa only [Finset.sup_singleton] using h { i }, fun h s ε hε =>\n    (s.eventually_all.2 fun i _ => h i ε hε).mono fun _ => finset_sup_apply_lt hε⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nu : F → E\nf : Filter F\ny₀ : E\nh : ∀ (s : Finset ι) (ε : ℝ), 0 < ε → ∀ᶠ (x : F) in f, ↑(Finset.sup s p) (u x - y₀) < ε\ni : ι\n⊢ ∀ (ε : ℝ), 0 < ε → ∀ᶠ (x : F) in f, ↑(p i) (u x - y₀) < ε\n[PROOFSTEP]\nsimpa only [Finset.sup_singleton] using h { i }\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : Nonempty ι\ninst✝² : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\ninst✝¹ : SemilatticeSup F\ninst✝ : Nonempty F\nhp : WithSeminorms p\nu : F → E\ny₀ : E\n⊢ Tendsto u atTop (𝓝 y₀) ↔ ∀ (i : ι) (ε : ℝ), 0 < ε → ∃ x₀, ∀ (x : F), x₀ ≤ x → ↑(p i) (u x - y₀) < ε\n[PROOFSTEP]\nrw [hp.tendsto_nhds u y₀]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : Nonempty ι\ninst✝² : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\ninst✝¹ : SemilatticeSup F\ninst✝ : Nonempty F\nhp : WithSeminorms p\nu : F → E\ny₀ : E\n⊢ (∀ (i : ι) (ε : ℝ), 0 < ε → ∀ᶠ (x : F) in atTop, ↑(p i) (u x - y₀) < ε) ↔\n    ∀ (i : ι) (ε : ℝ), 0 < ε → ∃ x₀, ∀ (x : F), x₀ ≤ x → ↑(p i) (u x - y₀) < ε\n[PROOFSTEP]\nexact forall₃_congr fun _ _ _ => Filter.eventually_atTop\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nt : TopologicalSpace E\ninst✝ : TopologicalAddGroup E\np : SeminormFamily 𝕜 E ι\nh : 𝓝 0 = FilterBasis.filter AddGroupFilterBasis.toFilterBasis\n⊢ WithSeminorms p\n[PROOFSTEP]\nrefine' ⟨TopologicalAddGroup.ext inferInstance p.addGroupFilterBasis.isTopologicalAddGroup _⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nt : TopologicalSpace E\ninst✝ : TopologicalAddGroup E\np : SeminormFamily 𝕜 E ι\nh : 𝓝 0 = FilterBasis.filter AddGroupFilterBasis.toFilterBasis\n⊢ 𝓝 0 = 𝓝 0\n[PROOFSTEP]\nrw [AddGroupFilterBasis.nhds_zero_eq]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nt : TopologicalSpace E\ninst✝ : TopologicalAddGroup E\np : SeminormFamily 𝕜 E ι\nh : 𝓝 0 = FilterBasis.filter AddGroupFilterBasis.toFilterBasis\n⊢ 𝓝 0 = FilterBasis.filter AddGroupFilterBasis.toFilterBasis\n[PROOFSTEP]\nexact h\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nt : TopologicalSpace E\ninst✝ : TopologicalAddGroup E\np : SeminormFamily 𝕜 E ι\n⊢ WithSeminorms p ↔ 𝓝 0 = ⨅ (i : ι), comap (↑(p i)) (𝓝 0)\n[PROOFSTEP]\nrw [← p.filter_eq_iInf]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nt : TopologicalSpace E\ninst✝ : TopologicalAddGroup E\np : SeminormFamily 𝕜 E ι\n⊢ WithSeminorms p ↔ 𝓝 0 = FilterBasis.filter AddGroupFilterBasis.toFilterBasis\n[PROOFSTEP]\nrefine' ⟨fun h => _, p.withSeminorms_of_nhds⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nt : TopologicalSpace E\ninst✝ : TopologicalAddGroup E\np : SeminormFamily 𝕜 E ι\nh : WithSeminorms p\n⊢ 𝓝 0 = FilterBasis.filter AddGroupFilterBasis.toFilterBasis\n[PROOFSTEP]\nrw [h.topology_eq_withSeminorms]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nt : TopologicalSpace E\ninst✝ : TopologicalAddGroup E\np : SeminormFamily 𝕜 E ι\nh : WithSeminorms p\n⊢ 𝓝 0 = FilterBasis.filter AddGroupFilterBasis.toFilterBasis\n[PROOFSTEP]\nexact AddGroupFilterBasis.nhds_zero_eq _\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nt : TopologicalSpace E\ninst✝ : TopologicalAddGroup E\np : SeminormFamily 𝕜 E ι\n⊢ WithSeminorms p ↔ t = ⨅ (i : ι), UniformSpace.toTopologicalSpace\n[PROOFSTEP]\nrw [p.withSeminorms_iff_nhds_eq_iInf,\n  TopologicalAddGroup.ext_iff inferInstance (topologicalAddGroup_iInf fun i => inferInstance), nhds_iInf]\n  -- Porting note: next three lines was `congrm (_ = ⨅ i, _)`\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nt : TopologicalSpace E\ninst✝ : TopologicalAddGroup E\np : SeminormFamily 𝕜 E ι\n⊢ 𝓝 0 = ⨅ (i : ι), comap (↑(p i)) (𝓝 0) ↔ 𝓝 0 = ⨅ (i : ι), 𝓝 0\n[PROOFSTEP]\nrefine Eq.to_iff ?_\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nt : TopologicalSpace E\ninst✝ : TopologicalAddGroup E\np : SeminormFamily 𝕜 E ι\n⊢ (𝓝 0 = ⨅ (i : ι), comap (↑(p i)) (𝓝 0)) = (𝓝 0 = ⨅ (i : ι), 𝓝 0)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_s\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nt : TopologicalSpace E\ninst✝ : TopologicalAddGroup E\np : SeminormFamily 𝕜 E ι\n⊢ (fun i => comap (↑(p i)) (𝓝 0)) = fun i => 𝓝 0\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase e_a.e_s.h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nt : TopologicalSpace E\ninst✝ : TopologicalAddGroup E\np : SeminormFamily 𝕜 E ι\ni : ι\n⊢ comap (↑(p i)) (𝓝 0) = 𝓝 0\n[PROOFSTEP]\nexact @comap_norm_nhds_zero _ (p i).toSeminormedAddGroup\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : Nonempty ι\nt : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\ni : ι\n⊢ Continuous ↑(p i)\n[PROOFSTEP]\nhave := hp.topologicalAddGroup\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : Nonempty ι\nt : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\ni : ι\nthis : TopologicalAddGroup E\n⊢ Continuous ↑(p i)\n[PROOFSTEP]\nrw [p.withSeminorms_iff_topologicalSpace_eq_iInf.mp hp]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝³ : NormedField 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : Nonempty ι\nt : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\ni : ι\nthis : TopologicalAddGroup E\n⊢ Continuous ↑(p i)\n[PROOFSTEP]\nexact continuous_iInf_dom (@continuous_norm _ (p i).toSeminormedAddGroup)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nu : UniformSpace E\ninst✝ : UniformAddGroup E\np : SeminormFamily 𝕜 E ι\n⊢ WithSeminorms p ↔ u = ⨅ (i : ι), PseudoMetricSpace.toUniformSpace\n[PROOFSTEP]\nrw [p.withSeminorms_iff_nhds_eq_iInf,\n  UniformAddGroup.ext_iff inferInstance (uniformAddGroup_iInf fun i => inferInstance), toTopologicalSpace_iInf,\n  nhds_iInf]\n  -- Porting note: next three lines was `congrm (_ = ⨅ i, _)`\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nu : UniformSpace E\ninst✝ : UniformAddGroup E\np : SeminormFamily 𝕜 E ι\n⊢ 𝓝 0 = ⨅ (i : ι), comap (↑(p i)) (𝓝 0) ↔ 𝓝 0 = ⨅ (i : ι), 𝓝 0\n[PROOFSTEP]\nrefine Eq.to_iff ?_\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nu : UniformSpace E\ninst✝ : UniformAddGroup E\np : SeminormFamily 𝕜 E ι\n⊢ (𝓝 0 = ⨅ (i : ι), comap (↑(p i)) (𝓝 0)) = (𝓝 0 = ⨅ (i : ι), 𝓝 0)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_s\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nu : UniformSpace E\ninst✝ : UniformAddGroup E\np : SeminormFamily 𝕜 E ι\n⊢ (fun i => comap (↑(p i)) (𝓝 0)) = fun i => 𝓝 0\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase e_a.e_s.h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\nu : UniformSpace E\ninst✝ : UniformAddGroup E\np : SeminormFamily 𝕜 E ι\ni : ι\n⊢ comap (↑(p i)) (𝓝 0) = 𝓝 0\n[PROOFSTEP]\nexact @comap_norm_nhds_zero _ (p i).toAddGroupSeminorm.toSeminormedAddGroup\n[GOAL]\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\n⊢ WithSeminorms fun x => normSeminorm 𝕜 E\n[PROOFSTEP]\nlet p : SeminormFamily 𝕜 E (Fin 1) := fun _ => normSeminorm 𝕜 E\n[GOAL]\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : SeminormFamily 𝕜 E (Fin 1) := fun x => normSeminorm 𝕜 E\n⊢ WithSeminorms fun x => normSeminorm 𝕜 E\n[PROOFSTEP]\nrefine' ⟨SeminormedAddCommGroup.toTopologicalAddGroup.ext p.addGroupFilterBasis.isTopologicalAddGroup _⟩\n[GOAL]\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : SeminormFamily 𝕜 E (Fin 1) := fun x => normSeminorm 𝕜 E\n⊢ 𝓝 0 = 𝓝 0\n[PROOFSTEP]\nrefine' Filter.HasBasis.eq_of_same_basis Metric.nhds_basis_ball _\n[GOAL]\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : SeminormFamily 𝕜 E (Fin 1) := fun x => normSeminorm 𝕜 E\n⊢ HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\n[PROOFSTEP]\nrw [← ball_normSeminorm 𝕜 E]\n[GOAL]\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : SeminormFamily 𝕜 E (Fin 1) := fun x => normSeminorm 𝕜 E\n⊢ HasBasis (𝓝 0) (fun x => 0 < x) (ball (normSeminorm 𝕜 E) 0)\n[PROOFSTEP]\nrefine'\n  Filter.HasBasis.to_hasBasis p.addGroupFilterBasis.nhds_zero_hasBasis _ fun r hr =>\n    ⟨(normSeminorm 𝕜 E).ball 0 r, p.basisSets_singleton_mem 0 hr, rfl.subset⟩\n[GOAL]\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : SeminormFamily 𝕜 E (Fin 1) := fun x => normSeminorm 𝕜 E\n⊢ ∀ (i : Set E), i ∈ SeminormFamily.addGroupFilterBasis p → ∃ i', 0 < i' ∧ ball (normSeminorm 𝕜 E) 0 i' ⊆ id i\n[PROOFSTEP]\nrintro U (hU : U ∈ p.basisSets)\n[GOAL]\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : SeminormFamily 𝕜 E (Fin 1) := fun x => normSeminorm 𝕜 E\nU : Set E\nhU : U ∈ SeminormFamily.basisSets p\n⊢ ∃ i', 0 < i' ∧ ball (normSeminorm 𝕜 E) 0 i' ⊆ id U\n[PROOFSTEP]\nrcases p.basisSets_iff.mp hU with ⟨s, r, hr, hU⟩\n[GOAL]\ncase intro.intro.intro\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : SeminormFamily 𝕜 E (Fin 1) := fun x => normSeminorm 𝕜 E\nU : Set E\nhU✝ : U ∈ SeminormFamily.basisSets p\ns : Finset (Fin 1)\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ∃ i', 0 < i' ∧ ball (normSeminorm 𝕜 E) 0 i' ⊆ id U\n[PROOFSTEP]\nuse r, hr\n[GOAL]\ncase right\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : SeminormFamily 𝕜 E (Fin 1) := fun x => normSeminorm 𝕜 E\nU : Set E\nhU✝ : U ∈ SeminormFamily.basisSets p\ns : Finset (Fin 1)\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ball (normSeminorm 𝕜 E) 0 r ⊆ id U\n[PROOFSTEP]\nrw [hU, id.def]\n[GOAL]\ncase right\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : SeminormFamily 𝕜 E (Fin 1) := fun x => normSeminorm 𝕜 E\nU : Set E\nhU✝ : U ∈ SeminormFamily.basisSets p\ns : Finset (Fin 1)\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\n⊢ ball (normSeminorm 𝕜 E) 0 r ⊆ ball (Finset.sup s p) 0 r\n[PROOFSTEP]\nby_cases h : s.Nonempty\n[GOAL]\ncase pos\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : SeminormFamily 𝕜 E (Fin 1) := fun x => normSeminorm 𝕜 E\nU : Set E\nhU✝ : U ∈ SeminormFamily.basisSets p\ns : Finset (Fin 1)\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : Finset.Nonempty s\n⊢ ball (normSeminorm 𝕜 E) 0 r ⊆ ball (Finset.sup s p) 0 r\n[PROOFSTEP]\nrw [Finset.sup_const h]\n[GOAL]\ncase neg\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : SeminormFamily 𝕜 E (Fin 1) := fun x => normSeminorm 𝕜 E\nU : Set E\nhU✝ : U ∈ SeminormFamily.basisSets p\ns : Finset (Fin 1)\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : ¬Finset.Nonempty s\n⊢ ball (normSeminorm 𝕜 E) 0 r ⊆ ball (Finset.sup s p) 0 r\n[PROOFSTEP]\nrw [Finset.not_nonempty_iff_eq_empty.mp h, Finset.sup_empty, ball_bot _ hr]\n[GOAL]\ncase neg\n𝕜✝ : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\n𝕜 : Type u_10\nE : Type u_11\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : SeminormFamily 𝕜 E (Fin 1) := fun x => normSeminorm 𝕜 E\nU : Set E\nhU✝ : U ∈ SeminormFamily.basisSets p\ns : Finset (Fin 1)\nr : ℝ\nhr : 0 < r\nhU : U = ball (Finset.sup s p) 0 r\nh : ¬Finset.Nonempty s\n⊢ ball (normSeminorm 𝕜 E) 0 r ⊆ univ\n[PROOFSTEP]\nexact Set.subset_univ _\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\n⊢ Bornology.IsVonNBounded 𝕜 s ↔ ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nrw [hp.hasBasis.isVonNBounded_basis_iff]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\n⊢ (∀ (i : Set E), i ∈ SeminormFamily.basisSets p → Absorbs 𝕜 (id i) s) ↔\n    ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\n⊢ (∀ (i : Set E), i ∈ SeminormFamily.basisSets p → Absorbs 𝕜 (id i) s) →\n    ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nintro h I\n[GOAL]\ncase mp\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nh : ∀ (i : Set E), i ∈ SeminormFamily.basisSets p → Absorbs 𝕜 (id i) s\nI : Finset ι\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nsimp only [id.def] at h \n[GOAL]\ncase mp\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nh : ∀ (i : Set E), i ∈ SeminormFamily.basisSets p → Absorbs 𝕜 i s\nI : Finset ι\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nspecialize h ((I.sup p).ball 0 1) (p.basisSets_mem I zero_lt_one)\n[GOAL]\ncase mp\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nh : Absorbs 𝕜 (ball (Finset.sup I p) 0 1) s\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nrcases h with ⟨r, hr, h⟩\n[GOAL]\ncase mp.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nr : ℝ\nhr : 0 < r\nh : ∀ (a : 𝕜), r ≤ ‖a‖ → s ⊆ a • ball (Finset.sup I p) 0 1\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\ncases' NormedField.exists_lt_norm 𝕜 r with a ha\n[GOAL]\ncase mp.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nr : ℝ\nhr : 0 < r\nh : ∀ (a : 𝕜), r ≤ ‖a‖ → s ⊆ a • ball (Finset.sup I p) 0 1\na : 𝕜\nha : r < ‖a‖\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nspecialize h a (le_of_lt ha)\n[GOAL]\ncase mp.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nr : ℝ\nhr : 0 < r\na : 𝕜\nha : r < ‖a‖\nh : s ⊆ a • ball (Finset.sup I p) 0 1\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nrw [Seminorm.smul_ball_zero (norm_pos_iff.1 <| hr.trans ha), mul_one] at h \n[GOAL]\ncase mp.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nr : ℝ\nhr : 0 < r\na : 𝕜\nha : r < ‖a‖\nh : s ⊆ ball (Finset.sup I p) 0 ‖a‖\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nrefine' ⟨‖a‖, lt_trans hr ha, _⟩\n[GOAL]\ncase mp.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nr : ℝ\nhr : 0 < r\na : 𝕜\nha : r < ‖a‖\nh : s ⊆ ball (Finset.sup I p) 0 ‖a‖\n⊢ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < ‖a‖\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase mp.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nr : ℝ\nhr : 0 < r\na : 𝕜\nha : r < ‖a‖\nh : s ⊆ ball (Finset.sup I p) 0 ‖a‖\nx : E\nhx : x ∈ s\n⊢ ↑(Finset.sup I p) x < ‖a‖\n[PROOFSTEP]\nspecialize h hx\n[GOAL]\ncase mp.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nr : ℝ\nhr : 0 < r\na : 𝕜\nha : r < ‖a‖\nx : E\nhx : x ∈ s\nh : x ∈ ball (Finset.sup I p) 0 ‖a‖\n⊢ ↑(Finset.sup I p) x < ‖a‖\n[PROOFSTEP]\nexact (Finset.sup I p).mem_ball_zero.mp h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\n⊢ (∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r) →\n    ∀ (i : Set E), i ∈ SeminormFamily.basisSets p → Absorbs 𝕜 (id i) s\n[PROOFSTEP]\nintro h s' hs'\n[GOAL]\ncase mpr\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nh : ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\ns' : Set E\nhs' : s' ∈ SeminormFamily.basisSets p\n⊢ Absorbs 𝕜 (id s') s\n[PROOFSTEP]\nrcases p.basisSets_iff.mp hs' with ⟨I, r, hr, hs'⟩\n[GOAL]\ncase mpr.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nh : ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\ns' : Set E\nhs'✝ : s' ∈ SeminormFamily.basisSets p\nI : Finset ι\nr : ℝ\nhr : 0 < r\nhs' : s' = ball (Finset.sup I p) 0 r\n⊢ Absorbs 𝕜 (id s') s\n[PROOFSTEP]\nrw [id.def, hs']\n[GOAL]\ncase mpr.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nh : ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\ns' : Set E\nhs'✝ : s' ∈ SeminormFamily.basisSets p\nI : Finset ι\nr : ℝ\nhr : 0 < r\nhs' : s' = ball (Finset.sup I p) 0 r\n⊢ Absorbs 𝕜 (ball (Finset.sup I p) 0 r) s\n[PROOFSTEP]\nrcases h I with ⟨r', _, h'⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nh : ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\ns' : Set E\nhs'✝ : s' ∈ SeminormFamily.basisSets p\nI : Finset ι\nr : ℝ\nhr : 0 < r\nhs' : s' = ball (Finset.sup I p) 0 r\nr' : ℝ\nleft✝ : r' > 0\nh' : ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r'\n⊢ Absorbs 𝕜 (ball (Finset.sup I p) 0 r) s\n[PROOFSTEP]\nsimp_rw [← (I.sup p).mem_ball_zero] at h' \n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nh : ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\ns' : Set E\nhs'✝ : s' ∈ SeminormFamily.basisSets p\nI : Finset ι\nr : ℝ\nhr : 0 < r\nhs' : s' = ball (Finset.sup I p) 0 r\nr' : ℝ\nleft✝ : r' > 0\nh' : ∀ (x : E), x ∈ s → x ∈ ball (Finset.sup I p) 0 r'\n⊢ Absorbs 𝕜 (ball (Finset.sup I p) 0 r) s\n[PROOFSTEP]\nrefine' Absorbs.mono_right _ h'\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nh : ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\ns' : Set E\nhs'✝ : s' ∈ SeminormFamily.basisSets p\nI : Finset ι\nr : ℝ\nhr : 0 < r\nhs' : s' = ball (Finset.sup I p) 0 r\nr' : ℝ\nleft✝ : r' > 0\nh' : ∀ (x : E), x ∈ s → x ∈ ball (Finset.sup I p) 0 r'\n⊢ Absorbs 𝕜 (ball (Finset.sup I p) 0 r) (ball (Finset.sup I p) 0 r')\n[PROOFSTEP]\nexact (Finset.sup I p).ball_zero_absorbs_ball_zero hr\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nf : G → E\ns : Set G\nhp : WithSeminorms p\n⊢ Bornology.IsVonNBounded 𝕜 (f '' s) ↔ ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : G), x ∈ s → ↑(Finset.sup I p) (f x) < r\n[PROOFSTEP]\nsimp_rw [hp.isVonNBounded_iff_finset_seminorm_bounded, Set.ball_image_iff]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\n⊢ Bornology.IsVonNBounded 𝕜 s ↔ ∀ (i : ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(p i) x < r\n[PROOFSTEP]\nrw [hp.isVonNBounded_iff_finset_seminorm_bounded]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\n⊢ (∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r) ↔\n    ∀ (i : ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(p i) x < r\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\n⊢ (∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r) →\n    ∀ (i : ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(p i) x < r\n[PROOFSTEP]\nintro hI i\n[GOAL]\ncase mp\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nhI : ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\ni : ι\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(p i) x < r\n[PROOFSTEP]\nconvert hI { i }\n[GOAL]\ncase h.e'_2.h.h.e'_2.h.h'.h.e'_3.h.e'_5\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nhI : ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\ni : ι\nx✝ : ℝ\na✝¹ : E\na✝ : a✝¹ ∈ s\n⊢ p i = Finset.sup {i} p\n[PROOFSTEP]\nrw [Finset.sup_singleton]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\n⊢ (∀ (i : ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(p i) x < r) →\n    ∀ (I : Finset ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nintro hi I\n[GOAL]\ncase mpr\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nhi : ∀ (i : ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(p i) x < r\nI : Finset ι\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nby_cases hI : I.Nonempty\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nhi : ∀ (i : ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(p i) x < r\nI : Finset ι\nhI : Finset.Nonempty I\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nchoose r hr h using hi\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nhI : Finset.Nonempty I\nr : ι → ℝ\nhr : ∀ (i : ι), r i > 0\nh : ∀ (i : ι) (x : E), x ∈ s → ↑(p i) x < r i\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nhave h' : 0 < I.sup' hI r := by\n  rcases hI.bex with ⟨i, hi⟩\n  exact lt_of_lt_of_le (hr i) (Finset.le_sup' r hi)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nhI : Finset.Nonempty I\nr : ι → ℝ\nhr : ∀ (i : ι), r i > 0\nh : ∀ (i : ι) (x : E), x ∈ s → ↑(p i) x < r i\n⊢ 0 < Finset.sup' I hI r\n[PROOFSTEP]\nrcases hI.bex with ⟨i, hi⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nhI : Finset.Nonempty I\nr : ι → ℝ\nhr : ∀ (i : ι), r i > 0\nh : ∀ (i : ι) (x : E), x ∈ s → ↑(p i) x < r i\ni : ι\nhi : i ∈ I\n⊢ 0 < Finset.sup' I hI r\n[PROOFSTEP]\nexact lt_of_lt_of_le (hr i) (Finset.le_sup' r hi)\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nhI : Finset.Nonempty I\nr : ι → ℝ\nhr : ∀ (i : ι), r i > 0\nh : ∀ (i : ι) (x : E), x ∈ s → ↑(p i) x < r i\nh' : 0 < Finset.sup' I hI r\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nrefine' ⟨I.sup' hI r, h', fun x hx => finset_sup_apply_lt h' fun i hi => _⟩\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nhI : Finset.Nonempty I\nr : ι → ℝ\nhr : ∀ (i : ι), r i > 0\nh : ∀ (i : ι) (x : E), x ∈ s → ↑(p i) x < r i\nh' : 0 < Finset.sup' I hI r\nx : E\nhx : x ∈ s\ni : ι\nhi : i ∈ I\n⊢ ↑(p i) x < Finset.sup' I hI r\n[PROOFSTEP]\nrefine' lt_of_lt_of_le (h i x hx) _\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nhI : Finset.Nonempty I\nr : ι → ℝ\nhr : ∀ (i : ι), r i > 0\nh : ∀ (i : ι) (x : E), x ∈ s → ↑(p i) x < r i\nh' : 0 < Finset.sup' I hI r\nx : E\nhx : x ∈ s\ni : ι\nhi : i ∈ I\n⊢ r i ≤ Finset.sup' I hI r\n[PROOFSTEP]\nsimp only [Finset.le_sup'_iff, exists_prop]\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nI : Finset ι\nhI : Finset.Nonempty I\nr : ι → ℝ\nhr : ∀ (i : ι), r i > 0\nh : ∀ (i : ι) (x : E), x ∈ s → ↑(p i) x < r i\nh' : 0 < Finset.sup' I hI r\nx : E\nhx : x ∈ s\ni : ι\nhi : i ∈ I\n⊢ ∃ b, b ∈ I ∧ r i ≤ r b\n[PROOFSTEP]\nexact ⟨i, hi, (Eq.refl _).le⟩\n[GOAL]\ncase neg\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nhi : ∀ (i : ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(p i) x < r\nI : Finset ι\nhI : ¬Finset.Nonempty I\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(Finset.sup I p) x < r\n[PROOFSTEP]\nsimp only [Finset.not_nonempty_iff_eq_empty.mp hI, Finset.sup_empty, coe_bot, Pi.zero_apply, exists_prop]\n[GOAL]\ncase neg\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\ns : Set E\nhp : WithSeminorms p\nhi : ∀ (i : ι), ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → ↑(p i) x < r\nI : Finset ι\nhI : ¬Finset.Nonempty I\n⊢ ∃ r, r > 0 ∧ ∀ (x : E), x ∈ s → 0 < r\n[PROOFSTEP]\nexact ⟨1, zero_lt_one, fun _ _ => zero_lt_one⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : Nonempty ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nf : G → E\ns : Set G\nhp : WithSeminorms p\n⊢ Bornology.IsVonNBounded 𝕜 (f '' s) ↔ ∀ (i : ι), ∃ r, r > 0 ∧ ∀ (x : G), x ∈ s → ↑(p i) (f x) < r\n[PROOFSTEP]\nsimp_rw [hp.isVonNBounded_iff_seminorm_bounded, Set.ball_image_iff]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nq : SeminormFamily 𝕝₂ F ι'\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : ∀ (i : ι'), Continuous ↑(comp (q i) f)\n⊢ Continuous ↑f\n[PROOFSTEP]\nhave : TopologicalAddGroup F := hq.topologicalAddGroup\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nq : SeminormFamily 𝕝₂ F ι'\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : ∀ (i : ι'), Continuous ↑(comp (q i) f)\nthis : TopologicalAddGroup F\n⊢ Continuous ↑f\n[PROOFSTEP]\nrefine' continuous_of_continuousAt_zero f _\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nq : SeminormFamily 𝕝₂ F ι'\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : ∀ (i : ι'), Continuous ↑(comp (q i) f)\nthis : TopologicalAddGroup F\n⊢ ContinuousAt (↑f) 0\n[PROOFSTEP]\nsimp_rw [ContinuousAt, f.map_zero, q.withSeminorms_iff_nhds_eq_iInf.mp hq, Filter.tendsto_iInf,\n  Filter.tendsto_comap_iff]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nq : SeminormFamily 𝕝₂ F ι'\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : ∀ (i : ι'), Continuous ↑(comp (q i) f)\nthis : TopologicalAddGroup F\n⊢ ∀ (i : ι'), Tendsto (↑(q i) ∘ ↑f) (𝓝 0) (𝓝 0)\n[PROOFSTEP]\nintro i\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nq : SeminormFamily 𝕝₂ F ι'\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : ∀ (i : ι'), Continuous ↑(comp (q i) f)\nthis : TopologicalAddGroup F\ni : ι'\n⊢ Tendsto (↑(q i) ∘ ↑f) (𝓝 0) (𝓝 0)\n[PROOFSTEP]\nconvert (hf i).continuousAt.tendsto\n[GOAL]\ncase h.e'_5.h.e'_3\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nq : SeminormFamily 𝕝₂ F ι'\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : ∀ (i : ι'), Continuous ↑(comp (q i) f)\nthis : TopologicalAddGroup F\ni : ι'\n⊢ 0 = ↑(comp (q i) f) 0\n[PROOFSTEP]\nexact (map_zero _).symm\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹³ : NontriviallyNormedField 𝕜\ninst✝¹² : AddCommGroup E\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : NormedField 𝕝\ninst✝⁹ : Module 𝕝 E\ninst✝⁸ : NontriviallyNormedField 𝕜₂\ninst✝⁷ : AddCommGroup F\ninst✝⁶ : Module 𝕜₂ F\ninst✝⁵ : NormedField 𝕝₂\ninst✝⁴ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝² : RingHomIsometric τ₁₂\ninst✝¹ : Nonempty ι\ninst✝ : Nonempty ι'\np : SeminormFamily 𝕝 E ι\nq : SeminormFamily 𝕝₂ F ι'\nx✝¹ : TopologicalSpace E\nhp : WithSeminorms p\nx✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : IsBounded p q f\n⊢ Continuous ↑f\n[PROOFSTEP]\nhave : TopologicalAddGroup E := hp.topologicalAddGroup\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹³ : NontriviallyNormedField 𝕜\ninst✝¹² : AddCommGroup E\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : NormedField 𝕝\ninst✝⁹ : Module 𝕝 E\ninst✝⁸ : NontriviallyNormedField 𝕜₂\ninst✝⁷ : AddCommGroup F\ninst✝⁶ : Module 𝕜₂ F\ninst✝⁵ : NormedField 𝕝₂\ninst✝⁴ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝² : RingHomIsometric τ₁₂\ninst✝¹ : Nonempty ι\ninst✝ : Nonempty ι'\np : SeminormFamily 𝕝 E ι\nq : SeminormFamily 𝕝₂ F ι'\nx✝¹ : TopologicalSpace E\nhp : WithSeminorms p\nx✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : IsBounded p q f\nthis : TopologicalAddGroup E\n⊢ Continuous ↑f\n[PROOFSTEP]\nrefine continuous_of_continuous_comp hq _ fun i => ?_\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹³ : NontriviallyNormedField 𝕜\ninst✝¹² : AddCommGroup E\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : NormedField 𝕝\ninst✝⁹ : Module 𝕝 E\ninst✝⁸ : NontriviallyNormedField 𝕜₂\ninst✝⁷ : AddCommGroup F\ninst✝⁶ : Module 𝕜₂ F\ninst✝⁵ : NormedField 𝕝₂\ninst✝⁴ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝² : RingHomIsometric τ₁₂\ninst✝¹ : Nonempty ι\ninst✝ : Nonempty ι'\np : SeminormFamily 𝕝 E ι\nq : SeminormFamily 𝕝₂ F ι'\nx✝¹ : TopologicalSpace E\nhp : WithSeminorms p\nx✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : IsBounded p q f\nthis : TopologicalAddGroup E\ni : ι'\n⊢ Continuous ↑(comp (q i) f)\n[PROOFSTEP]\nrcases hf i with ⟨s, C, hC⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹³ : NontriviallyNormedField 𝕜\ninst✝¹² : AddCommGroup E\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : NormedField 𝕝\ninst✝⁹ : Module 𝕝 E\ninst✝⁸ : NontriviallyNormedField 𝕜₂\ninst✝⁷ : AddCommGroup F\ninst✝⁶ : Module 𝕜₂ F\ninst✝⁵ : NormedField 𝕝₂\ninst✝⁴ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝² : RingHomIsometric τ₁₂\ninst✝¹ : Nonempty ι\ninst✝ : Nonempty ι'\np : SeminormFamily 𝕝 E ι\nq : SeminormFamily 𝕝₂ F ι'\nx✝¹ : TopologicalSpace E\nhp : WithSeminorms p\nx✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : IsBounded p q f\nthis : TopologicalAddGroup E\ni : ι'\ns : Finset ι\nC : ℝ≥0\nhC : comp (q i) f ≤ C • Finset.sup s p\n⊢ Continuous ↑(comp (q i) f)\n[PROOFSTEP]\nrw [← Seminorm.finset_sup_smul] at hC \n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹³ : NontriviallyNormedField 𝕜\ninst✝¹² : AddCommGroup E\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : NormedField 𝕝\ninst✝⁹ : Module 𝕝 E\ninst✝⁸ : NontriviallyNormedField 𝕜₂\ninst✝⁷ : AddCommGroup F\ninst✝⁶ : Module 𝕜₂ F\ninst✝⁵ : NormedField 𝕝₂\ninst✝⁴ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝² : RingHomIsometric τ₁₂\ninst✝¹ : Nonempty ι\ninst✝ : Nonempty ι'\np : SeminormFamily 𝕝 E ι\nq : SeminormFamily 𝕝₂ F ι'\nx✝¹ : TopologicalSpace E\nhp : WithSeminorms p\nx✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : IsBounded p q f\nthis : TopologicalAddGroup E\ni : ι'\ns : Finset ι\nC : ℝ≥0\nhC : comp (q i) f ≤ Finset.sup s (C • p)\n⊢ Continuous ↑(comp (q i) f)\n[PROOFSTEP]\nrefine Seminorm.continuous_of_le ?_ (hC.trans <| Seminorm.finset_sup_le_sum _ _)\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹³ : NontriviallyNormedField 𝕜\ninst✝¹² : AddCommGroup E\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : NormedField 𝕝\ninst✝⁹ : Module 𝕝 E\ninst✝⁸ : NontriviallyNormedField 𝕜₂\ninst✝⁷ : AddCommGroup F\ninst✝⁶ : Module 𝕜₂ F\ninst✝⁵ : NormedField 𝕝₂\ninst✝⁴ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝² : RingHomIsometric τ₁₂\ninst✝¹ : Nonempty ι\ninst✝ : Nonempty ι'\np : SeminormFamily 𝕝 E ι\nq : SeminormFamily 𝕝₂ F ι'\nx✝¹ : TopologicalSpace E\nhp : WithSeminorms p\nx✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : IsBounded p q f\nthis : TopologicalAddGroup E\ni : ι'\ns : Finset ι\nC : ℝ≥0\nhC : comp (q i) f ≤ Finset.sup s (C • p)\n⊢ Continuous ↑(∑ i in s, (C • p) i)\n[PROOFSTEP]\nchange Continuous (fun x ↦ Seminorm.coeFnAddMonoidHom _ _ (∑ i in s, C • p i) x)\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹³ : NontriviallyNormedField 𝕜\ninst✝¹² : AddCommGroup E\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : NormedField 𝕝\ninst✝⁹ : Module 𝕝 E\ninst✝⁸ : NontriviallyNormedField 𝕜₂\ninst✝⁷ : AddCommGroup F\ninst✝⁶ : Module 𝕜₂ F\ninst✝⁵ : NormedField 𝕝₂\ninst✝⁴ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝² : RingHomIsometric τ₁₂\ninst✝¹ : Nonempty ι\ninst✝ : Nonempty ι'\np : SeminormFamily 𝕝 E ι\nq : SeminormFamily 𝕝₂ F ι'\nx✝¹ : TopologicalSpace E\nhp : WithSeminorms p\nx✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : IsBounded p q f\nthis : TopologicalAddGroup E\ni : ι'\ns : Finset ι\nC : ℝ≥0\nhC : comp (q i) f ≤ Finset.sup s (C • p)\n⊢ Continuous fun x => ↑(coeFnAddMonoidHom 𝕝 E) (∑ i in s, C • p i) x\n[PROOFSTEP]\nsimp_rw [map_sum, Finset.sum_apply]\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹³ : NontriviallyNormedField 𝕜\ninst✝¹² : AddCommGroup E\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : NormedField 𝕝\ninst✝⁹ : Module 𝕝 E\ninst✝⁸ : NontriviallyNormedField 𝕜₂\ninst✝⁷ : AddCommGroup F\ninst✝⁶ : Module 𝕜₂ F\ninst✝⁵ : NormedField 𝕝₂\ninst✝⁴ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝² : RingHomIsometric τ₁₂\ninst✝¹ : Nonempty ι\ninst✝ : Nonempty ι'\np : SeminormFamily 𝕝 E ι\nq : SeminormFamily 𝕝₂ F ι'\nx✝¹ : TopologicalSpace E\nhp : WithSeminorms p\nx✝ : TopologicalSpace F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : IsBounded p q f\nthis : TopologicalAddGroup E\ni : ι'\ns : Finset ι\nC : ℝ≥0\nhC : comp (q i) f ≤ Finset.sup s (C • p)\n⊢ Continuous fun x => ∑ c in s, ↑(coeFnAddMonoidHom 𝕝 E) (C • p c) x\n[PROOFSTEP]\nexact (continuous_finset_sum _ fun i _ ↦ (hp.continuous_seminorm i).const_smul (C : ℝ))\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF✝ : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F✝\ninst✝⁹ : Module 𝕜₂ F✝\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F✝\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nF : Type u_10\ninst✝² : SeminormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕝₂ F\ninst✝ : TopologicalSpace E\np : ι → Seminorm 𝕝 E\nhp : WithSeminorms p\nf : E →ₛₗ[τ₁₂] F\nhf : ∃ s C, comp (normSeminorm 𝕝₂ F) f ≤ C • Finset.sup s p\n⊢ Continuous ↑f\n[PROOFSTEP]\nrw [← Seminorm.isBounded_const (Fin 1)] at hf \n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF✝ : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F✝\ninst✝⁹ : Module 𝕜₂ F✝\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F✝\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nF : Type u_10\ninst✝² : SeminormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕝₂ F\ninst✝ : TopologicalSpace E\np : ι → Seminorm 𝕝 E\nhp : WithSeminorms p\nf : E →ₛₗ[τ₁₂] F\nhf : IsBounded p (fun x => normSeminorm 𝕝₂ F) f\n⊢ Continuous ↑f\n[PROOFSTEP]\nexact continuous_from_bounded hp (norm_withSeminorms 𝕝₂ F) f hf\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E✝\ninst✝¹⁴ : Module 𝕜 E✝\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E✝\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nE : Type u_10\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕝 E\ninst✝ : TopologicalSpace F\nq : ι → Seminorm 𝕝₂ F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : ∀ (i : ι), ∃ C, comp (q i) f ≤ C • normSeminorm 𝕝 E\n⊢ Continuous ↑f\n[PROOFSTEP]\nrw [← Seminorm.const_isBounded (Fin 1)] at hf \n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE✝ : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E✝\ninst✝¹⁴ : Module 𝕜 E✝\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E✝\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nE : Type u_10\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕝 E\ninst✝ : TopologicalSpace F\nq : ι → Seminorm 𝕝₂ F\nhq : WithSeminorms q\nf : E →ₛₗ[τ₁₂] F\nhf : IsBounded (fun x => normSeminorm 𝕝 E) (fun i => q i) f\n⊢ Continuous ↑f\n[PROOFSTEP]\nexact continuous_from_bounded (norm_withSeminorms 𝕝 E) hq f hf\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\nu : UniformSpace F\nhu : UniformAddGroup F\nhq : WithSeminorms q\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\n⊢ TFAE\n    [EquicontinuousAt (FunLike.coe ∘ f) 0, Equicontinuous (FunLike.coe ∘ f), UniformEquicontinuous (FunLike.coe ∘ f),\n      ∀ (i : ι'), ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p,\n      ∀ (i : ι'), BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))]\n[PROOFSTEP]\nrw [q.withSeminorms_iff_uniformSpace_eq_iInf.mp hq, uniformEquicontinuous_iInf_rng, equicontinuous_iInf_rng,\n  equicontinuousAt_iInf_rng]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\nu : UniformSpace F\nhu : UniformAddGroup F\nhq : WithSeminorms q\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\n⊢ TFAE\n    [∀ (k : ι'), EquicontinuousAt (FunLike.coe ∘ f) 0, ∀ (k : ι'), Equicontinuous (FunLike.coe ∘ f),\n      ∀ (k : ι'), UniformEquicontinuous (FunLike.coe ∘ f),\n      ∀ (i : ι'), ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p,\n      ∀ (i : ι'), BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))]\n[PROOFSTEP]\nrefine forall_tfae [_, _, _, _, _] fun i ↦ ?_\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\nu : UniformSpace F\nhu : UniformAddGroup F\nhq : WithSeminorms q\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\n⊢ TFAE\n    (List.map (fun p => p i)\n      [fun k => EquicontinuousAt (FunLike.coe ∘ f) 0, fun k => Equicontinuous (FunLike.coe ∘ f), fun k =>\n        UniformEquicontinuous (FunLike.coe ∘ f), fun i => ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p, fun i =>\n        BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))])\n[PROOFSTEP]\nlet _ : SeminormedAddCommGroup F := (q i).toSeminormedAddCommGroup\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\nu : UniformSpace F\nhu : UniformAddGroup F\nhq : WithSeminorms q\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\n⊢ TFAE\n    (List.map (fun p => p i)\n      [fun k => EquicontinuousAt (FunLike.coe ∘ f) 0, fun k => Equicontinuous (FunLike.coe ∘ f), fun k =>\n        UniformEquicontinuous (FunLike.coe ∘ f), fun i => ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p, fun i =>\n        BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))])\n[PROOFSTEP]\nclear u hu hq\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\n⊢ TFAE\n    (List.map (fun p => p i)\n      [fun k => EquicontinuousAt (FunLike.coe ∘ f) 0, fun k => Equicontinuous (FunLike.coe ∘ f), fun k =>\n        UniformEquicontinuous (FunLike.coe ∘ f), fun i => ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p, fun i =>\n        BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))])\n[PROOFSTEP]\nsimp only [List.map]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\n⊢ TFAE\n    [EquicontinuousAt (FunLike.coe ∘ f) 0, Equicontinuous (FunLike.coe ∘ f), UniformEquicontinuous (FunLike.coe ∘ f),\n      ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p,\n      BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))]\n[PROOFSTEP]\ntfae_have 1 → 3\n[GOAL]\ncase tfae_1_to_3\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\n⊢ EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\n[PROOFSTEP]\nexact uniformEquicontinuous_of_equicontinuousAt_zero f\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\n⊢ TFAE\n    [EquicontinuousAt (FunLike.coe ∘ f) 0, Equicontinuous (FunLike.coe ∘ f), UniformEquicontinuous (FunLike.coe ∘ f),\n      ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p,\n      BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))]\n[PROOFSTEP]\ntfae_have 3 → 2\n[GOAL]\ncase tfae_3_to_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\n⊢ UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\n[PROOFSTEP]\nexact UniformEquicontinuous.equicontinuous\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\n⊢ TFAE\n    [EquicontinuousAt (FunLike.coe ∘ f) 0, Equicontinuous (FunLike.coe ∘ f), UniformEquicontinuous (FunLike.coe ∘ f),\n      ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p,\n      BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))]\n[PROOFSTEP]\ntfae_have 2 → 1\n[GOAL]\ncase tfae_2_to_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\n⊢ Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\n[PROOFSTEP]\nexact fun H ↦ H 0\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\n⊢ TFAE\n    [EquicontinuousAt (FunLike.coe ∘ f) 0, Equicontinuous (FunLike.coe ∘ f), UniformEquicontinuous (FunLike.coe ∘ f),\n      ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p,\n      BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))]\n[PROOFSTEP]\ntfae_have 3 → 5\n[GOAL]\ncase tfae_3_to_5\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\n⊢ UniformEquicontinuous (FunLike.coe ∘ f) →\n    BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))\n[PROOFSTEP]\nintro H\n[GOAL]\ncase tfae_3_to_5\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\nH : UniformEquicontinuous (FunLike.coe ∘ f)\n⊢ BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))\n[PROOFSTEP]\nhave : ∀ᶠ x in 𝓝 0, ∀ k, q i (f k x) ≤ 1 :=\n  by\n  filter_upwards [Metric.equicontinuousAt_iff_right.mp (H.equicontinuous 0) 1 one_pos] with x hx k\n  simpa using (hx k).le\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\nH : UniformEquicontinuous (FunLike.coe ∘ f)\n⊢ ∀ᶠ (x : E) in 𝓝 0, ∀ (k : κ), ↑(q i) (↑(f k) x) ≤ 1\n[PROOFSTEP]\nfilter_upwards [Metric.equicontinuousAt_iff_right.mp (H.equicontinuous 0) 1 one_pos] with x hx k\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\nH : UniformEquicontinuous (FunLike.coe ∘ f)\nx : E\nhx : ∀ (i_1 : κ), dist ((FunLike.coe ∘ f) i_1 0) ((FunLike.coe ∘ f) i_1 x) < 1\nk : κ\n⊢ ↑(q i) (↑(f k) x) ≤ 1\n[PROOFSTEP]\nsimpa using (hx k).le\n[GOAL]\ncase tfae_3_to_5\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\nH : UniformEquicontinuous (FunLike.coe ∘ f)\nthis : ∀ᶠ (x : E) in 𝓝 0, ∀ (k : κ), ↑(q i) (↑(f k) x) ≤ 1\n⊢ BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))\n[PROOFSTEP]\nhave bdd : BddAbove (range fun k ↦ (q i).comp (f k)) :=\n  Seminorm.bddAbove_of_absorbent (absorbent_nhds_zero this) (fun x hx ↦ ⟨1, forall_range_iff.mpr hx⟩)\n[GOAL]\ncase tfae_3_to_5\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\nH : UniformEquicontinuous (FunLike.coe ∘ f)\nthis : ∀ᶠ (x : E) in 𝓝 0, ∀ (k : κ), ↑(q i) (↑(f k) x) ≤ 1\nbdd : BddAbove (Set.range fun k => comp (q i) (f k))\n⊢ BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))\n[PROOFSTEP]\nrw [← Seminorm.coe_iSup_eq bdd]\n[GOAL]\ncase tfae_3_to_5\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\nH : UniformEquicontinuous (FunLike.coe ∘ f)\nthis : ∀ᶠ (x : E) in 𝓝 0, ∀ (k : κ), ↑(q i) (↑(f k) x) ≤ 1\nbdd : BddAbove (Set.range fun k => comp (q i) (f k))\n⊢ BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous ↑(⨆ (i_1 : κ), comp (q i) (f i_1))\n[PROOFSTEP]\nrefine ⟨bdd, Seminorm.continuous' (r := 1) ?_⟩\n[GOAL]\ncase tfae_3_to_5\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\nH : UniformEquicontinuous (FunLike.coe ∘ f)\nthis : ∀ᶠ (x : E) in 𝓝 0, ∀ (k : κ), ↑(q i) (↑(f k) x) ≤ 1\nbdd : BddAbove (Set.range fun k => comp (q i) (f k))\n⊢ closedBall (⨆ (i_1 : κ), comp (q i) (f i_1)) 0 1 ∈ 𝓝 0\n[PROOFSTEP]\nfilter_upwards [this] with x hx\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\nH : UniformEquicontinuous (FunLike.coe ∘ f)\nthis : ∀ᶠ (x : E) in 𝓝 0, ∀ (k : κ), ↑(q i) (↑(f k) x) ≤ 1\nbdd : BddAbove (Set.range fun k => comp (q i) (f k))\nx : E\nhx : ∀ (k : κ), ↑(q i) (↑(f k) x) ≤ 1\n⊢ x ∈ closedBall (⨆ (i_1 : κ), comp (q i) (f i_1)) 0 1\n[PROOFSTEP]\nsimpa only [closedBall_iSup bdd _ one_pos, mem_iInter, mem_closedBall_zero] using hx\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\ntfae_3_to_5 :\n  UniformEquicontinuous (FunLike.coe ∘ f) →\n    BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))\n⊢ TFAE\n    [EquicontinuousAt (FunLike.coe ∘ f) 0, Equicontinuous (FunLike.coe ∘ f), UniformEquicontinuous (FunLike.coe ∘ f),\n      ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p,\n      BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))]\n[PROOFSTEP]\ntfae_have 5 → 4\n[GOAL]\ncase tfae_5_to_4\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\ntfae_3_to_5 :\n  UniformEquicontinuous (FunLike.coe ∘ f) →\n    BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))\n⊢ BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k))) →\n    ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p\n[PROOFSTEP]\nexact fun H ↦ ⟨⨆ k, (q i).comp (f k), Seminorm.coe_iSup_eq H.1 ▸ H.2, le_ciSup H.1⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\ntfae_3_to_5 :\n  UniformEquicontinuous (FunLike.coe ∘ f) →\n    BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))\ntfae_5_to_4 :\n  BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k))) →\n    ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p\n⊢ TFAE\n    [EquicontinuousAt (FunLike.coe ∘ f) 0, Equicontinuous (FunLike.coe ∘ f), UniformEquicontinuous (FunLike.coe ∘ f),\n      ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p,\n      BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))]\n[PROOFSTEP]\ntfae_have 4 → 1\n  -- This would work over any `NormedField`\n[GOAL]\ncase tfae_4_to_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\ntfae_3_to_5 :\n  UniformEquicontinuous (FunLike.coe ∘ f) →\n    BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))\ntfae_5_to_4 :\n  BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k))) →\n    ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p\n⊢ (∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p) → EquicontinuousAt (FunLike.coe ∘ f) 0\n[PROOFSTEP]\nintro ⟨p, hp, hfp⟩\n[GOAL]\ncase tfae_4_to_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\ntfae_3_to_5 :\n  UniformEquicontinuous (FunLike.coe ∘ f) →\n    BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))\ntfae_5_to_4 :\n  BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k))) →\n    ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p\np : Seminorm 𝕜 E\nhp : Continuous ↑p\nhfp : ∀ (k : κ), comp (q i) (f k) ≤ p\n⊢ EquicontinuousAt (FunLike.coe ∘ f) 0\n[PROOFSTEP]\nexact\n  Metric.equicontinuousAt_of_continuity_modulus p (map_zero p ▸ hp.tendsto 0) _ <|\n    eventually_of_forall fun x k ↦ by simpa using hfp k x\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\ntfae_3_to_5 :\n  UniformEquicontinuous (FunLike.coe ∘ f) →\n    BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))\ntfae_5_to_4 :\n  BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k))) →\n    ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p\np : Seminorm 𝕜 E\nhp : Continuous ↑p\nhfp : ∀ (k : κ), comp (q i) (f k) ≤ p\nx : E\nk : κ\n⊢ dist ((FunLike.coe ∘ f) k 0) ((FunLike.coe ∘ f) k x) ≤ ↑p x\n[PROOFSTEP]\nsimpa using hfp k x\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁶ : NontriviallyNormedField 𝕜\ninst✝¹⁵ : AddCommGroup E\ninst✝¹⁴ : Module 𝕜 E\ninst✝¹³ : NormedField 𝕝\ninst✝¹² : Module 𝕝 E\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\ninst✝¹⁰ : AddCommGroup F\ninst✝⁹ : Module 𝕜₂ F\ninst✝⁸ : NormedField 𝕝₂\ninst✝⁷ : Module 𝕝₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁶ : RingHomIsometric σ₁₂\nτ₁₂ : 𝕝 →+* 𝕝₂\ninst✝⁵ : RingHomIsometric τ₁₂\ninst✝⁴ : Nonempty ι\ninst✝³ : Nonempty ι'\nκ : Type u_10\nq : SeminormFamily 𝕜₂ F ι'\ninst✝² : UniformSpace E\ninst✝¹ : UniformAddGroup E\ninst✝ : ContinuousSMul 𝕜 E\nf : κ → E →ₛₗ[σ₁₂] F\ni : ι'\nx✝ : SeminormedAddCommGroup F := AddGroupSeminorm.toSeminormedAddCommGroup (q i).toAddGroupSeminorm\ntfae_1_to_3 : EquicontinuousAt (FunLike.coe ∘ f) 0 → UniformEquicontinuous (FunLike.coe ∘ f)\ntfae_3_to_2 : UniformEquicontinuous (FunLike.coe ∘ f) → Equicontinuous (FunLike.coe ∘ f)\ntfae_2_to_1 : Equicontinuous (FunLike.coe ∘ f) → EquicontinuousAt (FunLike.coe ∘ f) 0\ntfae_3_to_5 :\n  UniformEquicontinuous (FunLike.coe ∘ f) →\n    BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))\ntfae_5_to_4 :\n  BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k))) →\n    ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p\ntfae_4_to_1 : (∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p) → EquicontinuousAt (FunLike.coe ∘ f) 0\n⊢ TFAE\n    [EquicontinuousAt (FunLike.coe ∘ f) 0, Equicontinuous (FunLike.coe ∘ f), UniformEquicontinuous (FunLike.coe ∘ f),\n      ∃ p, Continuous ↑p ∧ ∀ (k : κ), comp (q i) (f k) ≤ p,\n      BddAbove (Set.range fun k => comp (q i) (f k)) ∧ Continuous (⨆ (k : κ), ↑(comp (q i) (f k)))]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nq : SeminormFamily 𝕜 E ι'\nt : TopologicalSpace E\nhp : WithSeminorms p\nhpq : Seminorm.IsBounded p q LinearMap.id\nhqp : Seminorm.IsBounded q p LinearMap.id\n⊢ WithSeminorms q\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase topology_eq_withSeminorms\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nq : SeminormFamily 𝕜 E ι'\nt : TopologicalSpace E\nhp : WithSeminorms p\nhpq : Seminorm.IsBounded p q LinearMap.id\nhqp : Seminorm.IsBounded q p LinearMap.id\n⊢ t = ModuleFilterBasis.topology (SeminormFamily.moduleFilterBasis q)\n[PROOFSTEP]\nrw [hp.topology_eq_withSeminorms]\n[GOAL]\ncase topology_eq_withSeminorms\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nq : SeminormFamily 𝕜 E ι'\nt : TopologicalSpace E\nhp : WithSeminorms p\nhpq : Seminorm.IsBounded p q LinearMap.id\nhqp : Seminorm.IsBounded q p LinearMap.id\n⊢ ModuleFilterBasis.topology (SeminormFamily.moduleFilterBasis p) =\n    ModuleFilterBasis.topology (SeminormFamily.moduleFilterBasis q)\n[PROOFSTEP]\nclear hp t\n[GOAL]\ncase topology_eq_withSeminorms\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nq : SeminormFamily 𝕜 E ι'\nhpq : Seminorm.IsBounded p q LinearMap.id\nhqp : Seminorm.IsBounded q p LinearMap.id\n⊢ ModuleFilterBasis.topology (SeminormFamily.moduleFilterBasis p) =\n    ModuleFilterBasis.topology (SeminormFamily.moduleFilterBasis q)\n[PROOFSTEP]\nrefine le_antisymm ?_ ?_\n[GOAL]\ncase topology_eq_withSeminorms.refine_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nq : SeminormFamily 𝕜 E ι'\nhpq : Seminorm.IsBounded p q LinearMap.id\nhqp : Seminorm.IsBounded q p LinearMap.id\n⊢ ModuleFilterBasis.topology (SeminormFamily.moduleFilterBasis p) ≤\n    ModuleFilterBasis.topology (SeminormFamily.moduleFilterBasis q)\n[PROOFSTEP]\nrw [← continuous_id_iff_le]\n[GOAL]\ncase topology_eq_withSeminorms.refine_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nq : SeminormFamily 𝕜 E ι'\nhpq : Seminorm.IsBounded p q LinearMap.id\nhqp : Seminorm.IsBounded q p LinearMap.id\n⊢ ModuleFilterBasis.topology (SeminormFamily.moduleFilterBasis q) ≤\n    ModuleFilterBasis.topology (SeminormFamily.moduleFilterBasis p)\n[PROOFSTEP]\nrw [← continuous_id_iff_le]\n[GOAL]\ncase topology_eq_withSeminorms.refine_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nq : SeminormFamily 𝕜 E ι'\nhpq : Seminorm.IsBounded p q LinearMap.id\nhqp : Seminorm.IsBounded q p LinearMap.id\n⊢ Continuous id\n[PROOFSTEP]\nrefine continuous_from_bounded (.mk (topology := _) rfl) (.mk (topology := _) rfl) LinearMap.id (by assumption)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nq : SeminormFamily 𝕜 E ι'\nhpq : Seminorm.IsBounded p q LinearMap.id\nhqp : Seminorm.IsBounded q p LinearMap.id\n⊢ Seminorm.IsBounded p q LinearMap.id\n[PROOFSTEP]\nassumption\n[GOAL]\ncase topology_eq_withSeminorms.refine_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nq : SeminormFamily 𝕜 E ι'\nhpq : Seminorm.IsBounded p q LinearMap.id\nhqp : Seminorm.IsBounded q p LinearMap.id\n⊢ Continuous id\n[PROOFSTEP]\nrefine continuous_from_bounded (.mk (topology := _) rfl) (.mk (topology := _) rfl) LinearMap.id (by assumption)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nq : SeminormFamily 𝕜 E ι'\nhpq : Seminorm.IsBounded p q LinearMap.id\nhqp : Seminorm.IsBounded q p LinearMap.id\n⊢ Seminorm.IsBounded q p LinearMap.id\n[PROOFSTEP]\nassumption\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁹ : Nonempty ι\ninst✝⁸ : Nonempty ι'\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\n⊢ WithSeminorms fun s => Finset.sup s p\n[PROOFSTEP]\nrefine hp.congr ?_ ?_\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁹ : Nonempty ι\ninst✝⁸ : Nonempty ι'\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\n⊢ Seminorm.IsBounded p (fun s => Finset.sup s p) LinearMap.id\n[PROOFSTEP]\nintro s\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁹ : Nonempty ι\ninst✝⁸ : Nonempty ι'\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\ns : Finset ι\n⊢ ∃ s_1 C, comp ((fun s => Finset.sup s p) s) LinearMap.id ≤ C • Finset.sup s_1 p\n[PROOFSTEP]\nrefine ⟨s, 1, ?_⟩\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁹ : Nonempty ι\ninst✝⁸ : Nonempty ι'\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\ns : Finset ι\n⊢ comp ((fun s => Finset.sup s p) s) LinearMap.id ≤ 1 • Finset.sup s p\n[PROOFSTEP]\nrw [one_smul]\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁹ : Nonempty ι\ninst✝⁸ : Nonempty ι'\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\ns : Finset ι\n⊢ comp ((fun s => Finset.sup s p) s) LinearMap.id ≤ Finset.sup s p\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁹ : Nonempty ι\ninst✝⁸ : Nonempty ι'\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\n⊢ Seminorm.IsBounded (fun s => Finset.sup s p) p LinearMap.id\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁹ : Nonempty ι\ninst✝⁸ : Nonempty ι'\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\ni : ι\n⊢ ∃ s C, comp (p i) LinearMap.id ≤ C • Finset.sup s fun s => Finset.sup s p\n[PROOFSTEP]\nrefine ⟨{{ i }}, 1, ?_⟩\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁹ : Nonempty ι\ninst✝⁸ : Nonempty ι'\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\ni : ι\n⊢ comp (p i) LinearMap.id ≤ 1 • Finset.sup {{i}} fun s => Finset.sup s p\n[PROOFSTEP]\nrw [Finset.sup_singleton, Finset.sup_singleton, one_smul]\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁹ : Nonempty ι\ninst✝⁸ : Nonempty ι'\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\ni : ι\n⊢ comp (p i) LinearMap.id ≤ p i\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹¹ : Nonempty ι\ninst✝¹⁰ : Nonempty ι'\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\ninst✝² : Preorder ι\ninst✝¹ : LocallyFiniteOrderBot ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\n⊢ WithSeminorms fun i => Finset.sup (Finset.Iic i) p\n[PROOFSTEP]\nrefine hp.congr ?_ ?_\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹¹ : Nonempty ι\ninst✝¹⁰ : Nonempty ι'\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\ninst✝² : Preorder ι\ninst✝¹ : LocallyFiniteOrderBot ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\n⊢ Seminorm.IsBounded p (fun i => Finset.sup (Finset.Iic i) p) LinearMap.id\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹¹ : Nonempty ι\ninst✝¹⁰ : Nonempty ι'\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\ninst✝² : Preorder ι\ninst✝¹ : LocallyFiniteOrderBot ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\ni : ι\n⊢ ∃ s C, comp ((fun i => Finset.sup (Finset.Iic i) p) i) LinearMap.id ≤ C • Finset.sup s p\n[PROOFSTEP]\nrefine ⟨Finset.Iic i, 1, ?_⟩\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹¹ : Nonempty ι\ninst✝¹⁰ : Nonempty ι'\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\ninst✝² : Preorder ι\ninst✝¹ : LocallyFiniteOrderBot ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\ni : ι\n⊢ comp ((fun i => Finset.sup (Finset.Iic i) p) i) LinearMap.id ≤ 1 • Finset.sup (Finset.Iic i) p\n[PROOFSTEP]\nrw [one_smul]\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹¹ : Nonempty ι\ninst✝¹⁰ : Nonempty ι'\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\ninst✝² : Preorder ι\ninst✝¹ : LocallyFiniteOrderBot ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\ni : ι\n⊢ comp ((fun i => Finset.sup (Finset.Iic i) p) i) LinearMap.id ≤ Finset.sup (Finset.Iic i) p\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹¹ : Nonempty ι\ninst✝¹⁰ : Nonempty ι'\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\ninst✝² : Preorder ι\ninst✝¹ : LocallyFiniteOrderBot ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\n⊢ Seminorm.IsBounded (fun i => Finset.sup (Finset.Iic i) p) p LinearMap.id\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹¹ : Nonempty ι\ninst✝¹⁰ : Nonempty ι'\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\ninst✝² : Preorder ι\ninst✝¹ : LocallyFiniteOrderBot ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\ni : ι\n⊢ ∃ s C, comp (p i) LinearMap.id ≤ C • Finset.sup s fun i => Finset.sup (Finset.Iic i) p\n[PROOFSTEP]\nrefine ⟨{ i }, 1, ?_⟩\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹¹ : Nonempty ι\ninst✝¹⁰ : Nonempty ι'\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\ninst✝² : Preorder ι\ninst✝¹ : LocallyFiniteOrderBot ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\ni : ι\n⊢ comp (p i) LinearMap.id ≤ 1 • Finset.sup {i} fun i => Finset.sup (Finset.Iic i) p\n[PROOFSTEP]\nrw [Finset.sup_singleton, one_smul]\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹¹ : Nonempty ι\ninst✝¹⁰ : Nonempty ι'\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝³ : RingHomIsometric σ₁₂\ninst✝² : Preorder ι\ninst✝¹ : LocallyFiniteOrderBot ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\ni : ι\n⊢ comp (p i) LinearMap.id ≤ Finset.sup (Finset.Iic i) p\n[PROOFSTEP]\nexact (Finset.le_sup (Finset.mem_Iic.mpr le_rfl) : p i ≤ (Finset.Iic i).sup p)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nt : TopologicalSpace E\nhp : WithSeminorms p\ne : ι' ≃ ι\n⊢ WithSeminorms (p ∘ ↑e)\n[PROOFSTEP]\nrefine hp.congr ?_ ?_ <;> intro i <;> [use{e i}, 1; use{e.symm i}, 1]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nt : TopologicalSpace E\nhp : WithSeminorms p\ne : ι' ≃ ι\n⊢ WithSeminorms (p ∘ ↑e)\n[PROOFSTEP]\nrefine hp.congr ?_ ?_\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nt : TopologicalSpace E\nhp : WithSeminorms p\ne : ι' ≃ ι\n⊢ Seminorm.IsBounded p (p ∘ ↑e) LinearMap.id\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nt : TopologicalSpace E\nhp : WithSeminorms p\ne : ι' ≃ ι\n⊢ Seminorm.IsBounded (p ∘ ↑e) p LinearMap.id\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nt : TopologicalSpace E\nhp : WithSeminorms p\ne : ι' ≃ ι\ni : ι'\n⊢ ∃ s C, comp ((p ∘ ↑e) i) LinearMap.id ≤ C • Finset.sup s p\n[PROOFSTEP]\nuse{e i}, 1\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nt : TopologicalSpace E\nhp : WithSeminorms p\ne : ι' ≃ ι\ni : ι\n⊢ ∃ s C, comp (p i) LinearMap.id ≤ C • Finset.sup s (p ∘ ↑e)\n[PROOFSTEP]\nuse{e.symm i}, 1\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nt : TopologicalSpace E\nhp : WithSeminorms p\ne : ι' ≃ ι\ni : ι'\n⊢ comp ((p ∘ ↑e) i) LinearMap.id ≤ 1 • Finset.sup {↑e i} p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : Nonempty ι\ninst✝⁷ : Nonempty ι'\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\np : SeminormFamily 𝕜 E ι\nt : TopologicalSpace E\nhp : WithSeminorms p\ne : ι' ≃ ι\ni : ι\n⊢ comp (p i) LinearMap.id ≤ 1 • Finset.sup {↑e.symm i} (p ∘ ↑e)\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\nq : Seminorm 𝕜 F\nhq : Continuous ↑q\n⊢ ∃ C, 0 < C ∧ ∀ (x : F), ↑q x ≤ C * ‖x‖\n[PROOFSTEP]\nhave hq' : Tendsto q (𝓝 0) (𝓝 0) := map_zero q ▸ hq.tendsto 0\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\nq : Seminorm 𝕜 F\nhq : Continuous ↑q\nhq' : Tendsto (↑q) (𝓝 0) (𝓝 0)\n⊢ ∃ C, 0 < C ∧ ∀ (x : F), ↑q x ≤ C * ‖x‖\n[PROOFSTEP]\nrcases NormedAddCommGroup.nhds_zero_basis_norm_lt.mem_iff.mp (hq' $ Iio_mem_nhds one_pos) with ⟨ε, ε_pos, hε⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\nq : Seminorm 𝕜 F\nhq : Continuous ↑q\nhq' : Tendsto (↑q) (𝓝 0) (𝓝 0)\nε : ℝ\nε_pos : 0 < ε\nhε : {y | ‖y‖ < ε} ⊆ ↑q ⁻¹' Iio 1\n⊢ ∃ C, 0 < C ∧ ∀ (x : F), ↑q x ≤ C * ‖x‖\n[PROOFSTEP]\nrcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\nq : Seminorm 𝕜 F\nhq : Continuous ↑q\nhq' : Tendsto (↑q) (𝓝 0) (𝓝 0)\nε : ℝ\nε_pos : 0 < ε\nhε : {y | ‖y‖ < ε} ⊆ ↑q ⁻¹' Iio 1\nc : 𝕜\nhc : 1 < ‖c‖\n⊢ ∃ C, 0 < C ∧ ∀ (x : F), ↑q x ≤ C * ‖x‖\n[PROOFSTEP]\nhave : 0 < ‖c‖ / ε := by positivity\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\nq : Seminorm 𝕜 F\nhq : Continuous ↑q\nhq' : Tendsto (↑q) (𝓝 0) (𝓝 0)\nε : ℝ\nε_pos : 0 < ε\nhε : {y | ‖y‖ < ε} ⊆ ↑q ⁻¹' Iio 1\nc : 𝕜\nhc : 1 < ‖c‖\n⊢ 0 < ‖c‖ / ε\n[PROOFSTEP]\npositivity\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\nq : Seminorm 𝕜 F\nhq : Continuous ↑q\nhq' : Tendsto (↑q) (𝓝 0) (𝓝 0)\nε : ℝ\nε_pos : 0 < ε\nhε : {y | ‖y‖ < ε} ⊆ ↑q ⁻¹' Iio 1\nc : 𝕜\nhc : 1 < ‖c‖\nthis : 0 < ‖c‖ / ε\n⊢ ∃ C, 0 < C ∧ ∀ (x : F), ↑q x ≤ C * ‖x‖\n[PROOFSTEP]\nrefine ⟨‖c‖ / ε, this, fun x ↦ ?_⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\nq : Seminorm 𝕜 F\nhq : Continuous ↑q\nhq' : Tendsto (↑q) (𝓝 0) (𝓝 0)\nε : ℝ\nε_pos : 0 < ε\nhε : {y | ‖y‖ < ε} ⊆ ↑q ⁻¹' Iio 1\nc : 𝕜\nhc : 1 < ‖c‖\nthis : 0 < ‖c‖ / ε\nx : F\n⊢ ↑q x ≤ ‖c‖ / ε * ‖x‖\n[PROOFSTEP]\nby_cases hx : ‖x‖ = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\nq : Seminorm 𝕜 F\nhq : Continuous ↑q\nhq' : Tendsto (↑q) (𝓝 0) (𝓝 0)\nε : ℝ\nε_pos : 0 < ε\nhε : {y | ‖y‖ < ε} ⊆ ↑q ⁻¹' Iio 1\nc : 𝕜\nhc : 1 < ‖c‖\nthis : 0 < ‖c‖ / ε\nx : F\nhx : ‖x‖ = 0\n⊢ ↑q x ≤ ‖c‖ / ε * ‖x‖\n[PROOFSTEP]\nrw [hx, mul_zero]\n[GOAL]\ncase pos\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\nq : Seminorm 𝕜 F\nhq : Continuous ↑q\nhq' : Tendsto (↑q) (𝓝 0) (𝓝 0)\nε : ℝ\nε_pos : 0 < ε\nhε : {y | ‖y‖ < ε} ⊆ ↑q ⁻¹' Iio 1\nc : 𝕜\nhc : 1 < ‖c‖\nthis : 0 < ‖c‖ / ε\nx : F\nhx : ‖x‖ = 0\n⊢ ↑q x ≤ 0\n[PROOFSTEP]\nexact le_of_eq (map_eq_zero_of_norm_zero q hq hx)\n[GOAL]\ncase neg\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\nq : Seminorm 𝕜 F\nhq : Continuous ↑q\nhq' : Tendsto (↑q) (𝓝 0) (𝓝 0)\nε : ℝ\nε_pos : 0 < ε\nhε : {y | ‖y‖ < ε} ⊆ ↑q ⁻¹' Iio 1\nc : 𝕜\nhc : 1 < ‖c‖\nthis : 0 < ‖c‖ / ε\nx : F\nhx : ¬‖x‖ = 0\n⊢ ↑q x ≤ ‖c‖ / ε * ‖x‖\n[PROOFSTEP]\nrefine (normSeminorm 𝕜 F).bound_of_shell q ε_pos hc (fun x hle hlt ↦ ?_) hx\n[GOAL]\ncase neg\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\nq : Seminorm 𝕜 F\nhq : Continuous ↑q\nhq' : Tendsto (↑q) (𝓝 0) (𝓝 0)\nε : ℝ\nε_pos : 0 < ε\nhε : {y | ‖y‖ < ε} ⊆ ↑q ⁻¹' Iio 1\nc : 𝕜\nhc : 1 < ‖c‖\nthis : 0 < ‖c‖ / ε\nx✝ : F\nhx : ¬‖x✝‖ = 0\nx : F\nhle : ε / ‖c‖ ≤ ↑(normSeminorm 𝕜 F) x\nhlt : ↑(normSeminorm 𝕜 F) x < ε\n⊢ ↑q x ≤ ‖c‖ / ε * ↑(normSeminorm 𝕜 F) x\n[PROOFSTEP]\nrefine (le_of_lt <| show q x < _ from hε hlt).trans ?_\n[GOAL]\ncase neg\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\nq : Seminorm 𝕜 F\nhq : Continuous ↑q\nhq' : Tendsto (↑q) (𝓝 0) (𝓝 0)\nε : ℝ\nε_pos : 0 < ε\nhε : {y | ‖y‖ < ε} ⊆ ↑q ⁻¹' Iio 1\nc : 𝕜\nhc : 1 < ‖c‖\nthis : 0 < ‖c‖ / ε\nx✝ : F\nhx : ¬‖x✝‖ = 0\nx : F\nhle : ε / ‖c‖ ≤ ↑(normSeminorm 𝕜 F) x\nhlt : ↑(normSeminorm 𝕜 F) x < ε\n⊢ 1 ≤ ‖c‖ / ε * ↑(normSeminorm 𝕜 F) x\n[PROOFSTEP]\nrwa [← div_le_iff' this, one_div_div]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : SeminormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nt : TopologicalSpace E\nhp : WithSeminorms p\nq : Seminorm 𝕜 E\nhq : Continuous ↑q\n⊢ ∃ s C, C ≠ 0 ∧ q ≤ C • Finset.sup s p\n[PROOFSTEP]\nrcases hp.hasBasis.mem_iff.mp (ball_mem_nhds hq one_pos) with ⟨V, hV, hε⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : SeminormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nt : TopologicalSpace E\nhp : WithSeminorms p\nq : Seminorm 𝕜 E\nhq : Continuous ↑q\nV : Set E\nhV : V ∈ SeminormFamily.basisSets p\nhε : id V ⊆ ball q 0 1\n⊢ ∃ s C, C ≠ 0 ∧ q ≤ C • Finset.sup s p\n[PROOFSTEP]\nrcases p.basisSets_iff.mp hV with\n  ⟨s, ε, ε_pos, rfl⟩\n    -- Now forget that `E` already had a topology and view it as the (semi)normed space\n      -- `(E, s.sup p)`.\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : SeminormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nt : TopologicalSpace E\nhp : WithSeminorms p\nq : Seminorm 𝕜 E\nhq : Continuous ↑q\ns : Finset ι\nε : ℝ\nε_pos : 0 < ε\nhV : ball (Finset.sup s p) 0 ε ∈ SeminormFamily.basisSets p\nhε : id (ball (Finset.sup s p) 0 ε) ⊆ ball q 0 1\n⊢ ∃ s C, C ≠ 0 ∧ q ≤ C • Finset.sup s p\n[PROOFSTEP]\nclear hp hq t\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : SeminormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nq : Seminorm 𝕜 E\ns : Finset ι\nε : ℝ\nε_pos : 0 < ε\nhV : ball (Finset.sup s p) 0 ε ∈ SeminormFamily.basisSets p\nhε : id (ball (Finset.sup s p) 0 ε) ⊆ ball q 0 1\n⊢ ∃ s C, C ≠ 0 ∧ q ≤ C • Finset.sup s p\n[PROOFSTEP]\nlet _ : SeminormedAddCommGroup E := (s.sup p).toSeminormedAddCommGroup\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : SeminormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nq : Seminorm 𝕜 E\ns : Finset ι\nε : ℝ\nε_pos : 0 < ε\nhV : ball (Finset.sup s p) 0 ε ∈ SeminormFamily.basisSets p\nhε : id (ball (Finset.sup s p) 0 ε) ⊆ ball q 0 1\nx✝ : SeminormedAddCommGroup E := AddGroupSeminorm.toSeminormedAddCommGroup (Finset.sup s p).toAddGroupSeminorm\n⊢ ∃ s C, C ≠ 0 ∧ q ≤ C • Finset.sup s p\n[PROOFSTEP]\nlet _ : NormedSpace 𝕜 E :=\n  { norm_smul_le := fun a b ↦ le_of_eq (map_smul_eq_mul (s.sup p) a b) }\n    -- The inclusion `hε` tells us exactly that `q` is *still* continuous for this new topology\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : SeminormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nq : Seminorm 𝕜 E\ns : Finset ι\nε : ℝ\nε_pos : 0 < ε\nhV : ball (Finset.sup s p) 0 ε ∈ SeminormFamily.basisSets p\nhε : id (ball (Finset.sup s p) 0 ε) ⊆ ball q 0 1\nx✝¹ : SeminormedAddCommGroup E := AddGroupSeminorm.toSeminormedAddCommGroup (Finset.sup s p).toAddGroupSeminorm\nx✝ : NormedSpace 𝕜 E := NormedSpace.mk (_ : ∀ (a : 𝕜) (b : E), ‖a • b‖ ≤ ‖a‖ * ‖b‖)\n⊢ ∃ s C, C ≠ 0 ∧ q ≤ C • Finset.sup s p\n[PROOFSTEP]\nhave : Continuous q :=\n  Seminorm.continuous (r := 1)\n    (mem_of_superset (Metric.ball_mem_nhds _ ε_pos) hε)\n      -- Hence we can conclude by applying `bound_of_continuous_normed_space`.\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : SeminormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nq : Seminorm 𝕜 E\ns : Finset ι\nε : ℝ\nε_pos : 0 < ε\nhV : ball (Finset.sup s p) 0 ε ∈ SeminormFamily.basisSets p\nhε : id (ball (Finset.sup s p) 0 ε) ⊆ ball q 0 1\nx✝¹ : SeminormedAddCommGroup E := AddGroupSeminorm.toSeminormedAddCommGroup (Finset.sup s p).toAddGroupSeminorm\nx✝ : NormedSpace 𝕜 E := NormedSpace.mk (_ : ∀ (a : 𝕜) (b : E), ‖a • b‖ ≤ ‖a‖ * ‖b‖)\nthis : Continuous ↑q\n⊢ ∃ s C, C ≠ 0 ∧ q ≤ C • Finset.sup s p\n[PROOFSTEP]\nrcases bound_of_continuous_normedSpace q this with ⟨C, C_pos, hC⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : SeminormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : SeminormFamily 𝕜 E ι\ninst✝ : Nonempty ι\nq : Seminorm 𝕜 E\ns : Finset ι\nε : ℝ\nε_pos : 0 < ε\nhV : ball (Finset.sup s p) 0 ε ∈ SeminormFamily.basisSets p\nhε : id (ball (Finset.sup s p) 0 ε) ⊆ ball q 0 1\nx✝¹ : SeminormedAddCommGroup E := AddGroupSeminorm.toSeminormedAddCommGroup (Finset.sup s p).toAddGroupSeminorm\nx✝ : NormedSpace 𝕜 E := NormedSpace.mk (_ : ∀ (a : 𝕜) (b : E), ‖a • b‖ ≤ ‖a‖ * ‖b‖)\nthis : Continuous ↑q\nC : ℝ\nC_pos : 0 < C\nhC : ∀ (x : E), ↑q x ≤ C * ‖x‖\n⊢ ∃ s C, C ≠ 0 ∧ q ≤ C • Finset.sup s p\n[PROOFSTEP]\nexact\n  ⟨s, ⟨C, C_pos.le⟩, fun H ↦ C_pos.ne.symm (congr_arg NNReal.toReal H), hC⟩\n    -- Note that the key ingredient for this proof is that, by scaling arguments hidden in\n      -- `seminorm.continuous`, we only have to look at the `q`-ball of radius one, and the `s` we get\n      -- from that will automatically work for all other radii.\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : Nonempty ι\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedSpace ℝ 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\n⊢ LocallyConvexSpace ℝ E\n[PROOFSTEP]\nhave := hp.topologicalAddGroup\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : Nonempty ι\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedSpace ℝ 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nthis : TopologicalAddGroup E\n⊢ LocallyConvexSpace ℝ E\n[PROOFSTEP]\napply ofBasisZero ℝ E id fun s => s ∈ p.basisSets\n[GOAL]\ncase hbasis\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : Nonempty ι\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedSpace ℝ 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nthis : TopologicalAddGroup E\n⊢ HasBasis (𝓝 0) (fun s => s ∈ SeminormFamily.basisSets p) id\n[PROOFSTEP]\nrw [hp.1, AddGroupFilterBasis.nhds_eq _, AddGroupFilterBasis.N_zero]\n[GOAL]\ncase hbasis\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : Nonempty ι\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedSpace ℝ 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nthis : TopologicalAddGroup E\n⊢ HasBasis (FilterBasis.filter AddGroupFilterBasis.toFilterBasis) (fun s => s ∈ SeminormFamily.basisSets p) id\n[PROOFSTEP]\nexact FilterBasis.hasBasis _\n[GOAL]\ncase hconvex\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : Nonempty ι\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedSpace ℝ 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nthis : TopologicalAddGroup E\n⊢ ∀ (i : Set E), i ∈ SeminormFamily.basisSets p → Convex ℝ (id i)\n[PROOFSTEP]\nintro s hs\n[GOAL]\ncase hconvex\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : Nonempty ι\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedSpace ℝ 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nthis : TopologicalAddGroup E\ns : Set E\nhs : s ∈ SeminormFamily.basisSets p\n⊢ Convex ℝ (id s)\n[PROOFSTEP]\nchange s ∈ Set.iUnion _ at hs \n[GOAL]\ncase hconvex\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : Nonempty ι\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedSpace ℝ 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nthis : TopologicalAddGroup E\ns : Set E\nhs : s ∈ ⋃ (s : Finset ι) (r : ℝ) (_ : 0 < r), {ball (Finset.sup s p) 0 r}\n⊢ Convex ℝ (id s)\n[PROOFSTEP]\nsimp_rw [Set.mem_iUnion, Set.mem_singleton_iff] at hs \n[GOAL]\ncase hconvex\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : Nonempty ι\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedSpace ℝ 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nthis : TopologicalAddGroup E\ns : Set E\nhs : ∃ i i_1 h, s = ball (Finset.sup i p) 0 i_1\n⊢ Convex ℝ (id s)\n[PROOFSTEP]\nrcases hs with ⟨I, r, _, rfl⟩\n[GOAL]\ncase hconvex.intro.intro.intro\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : Nonempty ι\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedSpace ℝ 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : TopologicalSpace E\np : SeminormFamily 𝕜 E ι\nhp : WithSeminorms p\nthis : TopologicalAddGroup E\nI : Finset ι\nr : ℝ\nw✝ : 0 < r\n⊢ Convex ℝ (id (ball (Finset.sup I p) 0 r))\n[PROOFSTEP]\nexact convex_ball _ _ _\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\nq : SeminormFamily 𝕜₂ F ι\ns : Finset ι\nf : E →ₛₗ[σ₁₂] F\n⊢ Seminorm.comp (Finset.sup s q) f = Finset.sup s (comp q f)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\nq : SeminormFamily 𝕜₂ F ι\ns : Finset ι\nf : E →ₛₗ[σ₁₂] F\nx : E\n⊢ ↑(Seminorm.comp (Finset.sup s q) f) x = ↑(Finset.sup s (comp q f)) x\n[PROOFSTEP]\nrw [Seminorm.comp_apply, Seminorm.finset_sup_apply, Seminorm.finset_sup_apply]\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : NormedField 𝕜₂\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝ : RingHomIsometric σ₁₂\nq : SeminormFamily 𝕜₂ F ι\ns : Finset ι\nf : E →ₛₗ[σ₁₂] F\nx : E\n⊢ ↑(Finset.sup s fun i => { val := ↑(q i) (↑f x), property := (_ : 0 ≤ ↑(q i) (↑f x)) }) =\n    ↑(Finset.sup s fun i => { val := ↑(comp q f i) x, property := (_ : 0 ≤ ↑(comp q f i) x) })\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\ninst✝ : TopologicalSpace F\nhι : Nonempty ι\nq : SeminormFamily 𝕜₂ F ι\nhq : WithSeminorms q\nf : E →ₛₗ[σ₁₂] F\n⊢ WithSeminorms (SeminormFamily.comp q f)\n[PROOFSTEP]\nhave := hq.topologicalAddGroup\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\ninst✝ : TopologicalSpace F\nhι : Nonempty ι\nq : SeminormFamily 𝕜₂ F ι\nhq : WithSeminorms q\nf : E →ₛₗ[σ₁₂] F\nthis : TopologicalAddGroup F\n⊢ WithSeminorms (SeminormFamily.comp q f)\n[PROOFSTEP]\nlet _ : TopologicalSpace E := induced f inferInstance\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\ninst✝ : TopologicalSpace F\nhι : Nonempty ι\nq : SeminormFamily 𝕜₂ F ι\nhq : WithSeminorms q\nf : E →ₛₗ[σ₁₂] F\nthis : TopologicalAddGroup F\nx✝ : TopologicalSpace E := TopologicalSpace.induced (↑f) inferInstance\n⊢ WithSeminorms (SeminormFamily.comp q f)\n[PROOFSTEP]\nhave : TopologicalAddGroup E := topologicalAddGroup_induced f\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\ninst✝ : TopologicalSpace F\nhι : Nonempty ι\nq : SeminormFamily 𝕜₂ F ι\nhq : WithSeminorms q\nf : E →ₛₗ[σ₁₂] F\nthis✝ : TopologicalAddGroup F\nx✝ : TopologicalSpace E := TopologicalSpace.induced (↑f) inferInstance\nthis : TopologicalAddGroup E\n⊢ WithSeminorms (SeminormFamily.comp q f)\n[PROOFSTEP]\nrw [(q.comp f).withSeminorms_iff_nhds_eq_iInf, nhds_induced, map_zero, q.withSeminorms_iff_nhds_eq_iInf.mp hq,\n  Filter.comap_iInf]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\ninst✝ : TopologicalSpace F\nhι : Nonempty ι\nq : SeminormFamily 𝕜₂ F ι\nhq : WithSeminorms q\nf : E →ₛₗ[σ₁₂] F\nthis✝ : TopologicalAddGroup F\nx✝ : TopologicalSpace E := TopologicalSpace.induced (↑f) inferInstance\nthis : TopologicalAddGroup E\n⊢ ⨅ (i : ι), comap (↑f) (comap (↑(q i)) (𝓝 0)) = ⨅ (i : ι), comap (↑(SeminormFamily.comp q f i)) (𝓝 0)\n[PROOFSTEP]\nrefine' iInf_congr fun i => _\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁷ : NormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : NormedField 𝕜₂\ninst✝³ : AddCommGroup F\ninst✝² : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝¹ : RingHomIsometric σ₁₂\ninst✝ : TopologicalSpace F\nhι : Nonempty ι\nq : SeminormFamily 𝕜₂ F ι\nhq : WithSeminorms q\nf : E →ₛₗ[σ₁₂] F\nthis✝ : TopologicalAddGroup F\nx✝ : TopologicalSpace E := TopologicalSpace.induced (↑f) inferInstance\nthis : TopologicalAddGroup E\ni : ι\n⊢ comap (↑f) (comap (↑(q i)) (𝓝 0)) = comap (↑(SeminormFamily.comp q f i)) (𝓝 0)\n[PROOFSTEP]\nexact Filter.comap_comap\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : Module 𝕜 E\ninst✝⁵ : NormedField 𝕜₂\ninst✝⁴ : AddCommGroup F\ninst✝³ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝² : RingHomIsometric σ₁₂\ninst✝¹ : TopologicalSpace F\nhι : Nonempty ι\nq : SeminormFamily 𝕜₂ F ι\nhq : WithSeminorms q\ninst✝ : TopologicalSpace E\nf : E →ₛₗ[σ₁₂] F\nhf : Inducing ↑f\n⊢ WithSeminorms (SeminormFamily.comp q f)\n[PROOFSTEP]\nrw [hf.induced]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : AddCommGroup E\ninst✝⁶ : Module 𝕜 E\ninst✝⁵ : NormedField 𝕜₂\ninst✝⁴ : AddCommGroup F\ninst✝³ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝² : RingHomIsometric σ₁₂\ninst✝¹ : TopologicalSpace F\nhι : Nonempty ι\nq : SeminormFamily 𝕜₂ F ι\nhq : WithSeminorms q\ninst✝ : TopologicalSpace E\nf : E →ₛₗ[σ₁₂] F\nhf : Inducing ↑f\n⊢ WithSeminorms (SeminormFamily.comp q f)\n[PROOFSTEP]\nexact f.withSeminorms_induced hq\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁰ : NormedField 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : Module 𝕜 E\ninst✝⁷ : NormedField 𝕜₂\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁴ : RingHomIsometric σ₁₂\ninst✝³ : TopologicalSpace F\nκ : ι → Type u_10\ninst✝² : Nonempty ((i : ι) × κ i)\ninst✝¹ : ∀ (i : ι), Nonempty (κ i)\np : (i : ι) → SeminormFamily 𝕜 E (κ i)\nt : ι → TopologicalSpace E\ninst✝ : ∀ (i : ι), TopologicalAddGroup E\nhp : ∀ (i : ι), WithSeminorms (p i)\n⊢ WithSeminorms (SeminormFamily.sigma p)\n[PROOFSTEP]\nhave : @TopologicalAddGroup E (⨅ i, t i) _ := topologicalAddGroup_iInf (fun i ↦ inferInstance)\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁰ : NormedField 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : Module 𝕜 E\ninst✝⁷ : NormedField 𝕜₂\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁴ : RingHomIsometric σ₁₂\ninst✝³ : TopologicalSpace F\nκ : ι → Type u_10\ninst✝² : Nonempty ((i : ι) × κ i)\ninst✝¹ : ∀ (i : ι), Nonempty (κ i)\np : (i : ι) → SeminormFamily 𝕜 E (κ i)\nt : ι → TopologicalSpace E\ninst✝ : ∀ (i : ι), TopologicalAddGroup E\nhp : ∀ (i : ι), WithSeminorms (p i)\nthis : TopologicalAddGroup E\n⊢ WithSeminorms (SeminormFamily.sigma p)\n[PROOFSTEP]\nsimp_rw [@SeminormFamily.withSeminorms_iff_topologicalSpace_eq_iInf _ _ _ _ _ _ _ (_)] at hp ⊢\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁰ : NormedField 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : Module 𝕜 E\ninst✝⁷ : NormedField 𝕜₂\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁴ : RingHomIsometric σ₁₂\ninst✝³ : TopologicalSpace F\nκ : ι → Type u_10\ninst✝² : Nonempty ((i : ι) × κ i)\ninst✝¹ : ∀ (i : ι), Nonempty (κ i)\np : (i : ι) → SeminormFamily 𝕜 E (κ i)\nt : ι → TopologicalSpace E\ninst✝ : ∀ (i : ι), TopologicalAddGroup E\nthis : TopologicalAddGroup E\nhp : ∀ (i : ι), t i = ⨅ (i_1 : κ i), UniformSpace.toTopologicalSpace\n⊢ ⨅ (i : ι), t i = ⨅ (i : (i : ι) × κ i), UniformSpace.toTopologicalSpace\n[PROOFSTEP]\nrw [iInf_sigma]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝¹⁰ : NormedField 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : Module 𝕜 E\ninst✝⁷ : NormedField 𝕜₂\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module 𝕜₂ F\nσ₁₂ : 𝕜 →+* 𝕜₂\ninst✝⁴ : RingHomIsometric σ₁₂\ninst✝³ : TopologicalSpace F\nκ : ι → Type u_10\ninst✝² : Nonempty ((i : ι) × κ i)\ninst✝¹ : ∀ (i : ι), Nonempty (κ i)\np : (i : ι) → SeminormFamily 𝕜 E (κ i)\nt : ι → TopologicalSpace E\ninst✝ : ∀ (i : ι), TopologicalAddGroup E\nthis : TopologicalAddGroup E\nhp : ∀ (i : ι), t i = ⨅ (i_1 : κ i), UniformSpace.toTopologicalSpace\n⊢ ⨅ (i : ι), t i = ⨅ (i : ι) (j : κ i), UniformSpace.toTopologicalSpace\n[PROOFSTEP]\nexact iInf_congr hp\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : Countable ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\n⊢ FirstCountableTopology E\n[PROOFSTEP]\nhave := hp.topologicalAddGroup\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : Countable ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\nthis : TopologicalAddGroup E\n⊢ FirstCountableTopology E\n[PROOFSTEP]\nlet _ : UniformSpace E := TopologicalAddGroup.toUniformSpace E\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : Countable ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\nthis : TopologicalAddGroup E\nx✝ : UniformSpace E := TopologicalAddGroup.toUniformSpace E\n⊢ FirstCountableTopology E\n[PROOFSTEP]\nhave : UniformAddGroup E := comm_topologicalAddGroup_is_uniform\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : Countable ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\nthis✝ : TopologicalAddGroup E\nx✝ : UniformSpace E := TopologicalAddGroup.toUniformSpace E\nthis : UniformAddGroup E\n⊢ FirstCountableTopology E\n[PROOFSTEP]\nhave : (𝓝 (0 : E)).IsCountablyGenerated :=\n  by\n  rw [p.withSeminorms_iff_nhds_eq_iInf.mp hp]\n  exact Filter.iInf.isCountablyGenerated _\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : Countable ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\nthis✝ : TopologicalAddGroup E\nx✝ : UniformSpace E := TopologicalAddGroup.toUniformSpace E\nthis : UniformAddGroup E\n⊢ IsCountablyGenerated (𝓝 0)\n[PROOFSTEP]\nrw [p.withSeminorms_iff_nhds_eq_iInf.mp hp]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : Countable ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\nthis✝ : TopologicalAddGroup E\nx✝ : UniformSpace E := TopologicalAddGroup.toUniformSpace E\nthis : UniformAddGroup E\n⊢ IsCountablyGenerated (⨅ (i : ι), comap (↑(p i)) (𝓝 0))\n[PROOFSTEP]\nexact Filter.iInf.isCountablyGenerated _\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : Countable ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\nthis✝¹ : TopologicalAddGroup E\nx✝ : UniformSpace E := TopologicalAddGroup.toUniformSpace E\nthis✝ : UniformAddGroup E\nthis : IsCountablyGenerated (𝓝 0)\n⊢ FirstCountableTopology E\n[PROOFSTEP]\nhave : (uniformity E).IsCountablyGenerated := UniformAddGroup.uniformity_countably_generated\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\n𝕝 : Type u_3\n𝕝₂ : Type u_4\nE : Type u_5\nF : Type u_6\nG : Type u_7\nι : Type u_8\nι' : Type u_9\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : Nonempty ι\ninst✝¹ : Countable ι\np : SeminormFamily 𝕜 E ι\ninst✝ : TopologicalSpace E\nhp : WithSeminorms p\nthis✝² : TopologicalAddGroup E\nx✝ : UniformSpace E := TopologicalAddGroup.toUniformSpace E\nthis✝¹ : UniformAddGroup E\nthis✝ : IsCountablyGenerated (𝓝 0)\nthis : IsCountablyGenerated (𝓤 E)\n⊢ FirstCountableTopology E\n[PROOFSTEP]\nexact UniformSpace.firstCountableTopology E\n", "meta": {"mathlib_filename": "Mathlib.Analysis.LocallyConvex.WithSeminorms", "llama_tokens": 108108, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6791786861878392, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.39738823319873884}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\n⊢ AEMeasurable f\n[PROOFSTEP]\nnontriviality α\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\n✝ : Nontrivial α\n⊢ AEMeasurable f\n[PROOFSTEP]\ninhabit α\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\n✝ : Nontrivial α\ninhabited_h : Inhabited α\n⊢ AEMeasurable f\n[PROOFSTEP]\nexact ⟨fun _ => f default, measurable_const, rfl⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n⊢ AEMeasurable f\n[PROOFSTEP]\nnontriviality β\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\n⊢ AEMeasurable f\n[PROOFSTEP]\ninhabit β\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\n⊢ AEMeasurable f\n[PROOFSTEP]\nset s : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ (h i).mk f x}\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave hsμ : ∀ i, μ i (s i) = 0 := by\n  intro i\n  rw [measure_toMeasurable]\n  exact (h i).ae_eq_mk\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\n⊢ ∀ (i : ι), ↑↑(μ i) (s i) = 0\n[PROOFSTEP]\nintro i\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\ni : ι\n⊢ ↑↑(μ i) (s i) = 0\n[PROOFSTEP]\nrw [measure_toMeasurable]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\ni : ι\n⊢ ↑↑(μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x} = 0\n[PROOFSTEP]\nexact (h i).ae_eq_mk\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave hsm : MeasurableSet (⋂ i, s i) := MeasurableSet.iInter fun i => measurableSet_toMeasurable _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave hs : ∀ i x, x ∉ s i → f x = (h i).mk f x := by\n  intro i x hx\n  contrapose! hx\n  exact subset_toMeasurable _ _ hx\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\n⊢ ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\n[PROOFSTEP]\nintro i x hx\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\ni : ι\nx : α\nhx : ¬x ∈ s i\n⊢ f x = mk f (_ : AEMeasurable f) x\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\ni : ι\nx : α\nhx : f x ≠ mk f (_ : AEMeasurable f) x\n⊢ x ∈ (fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}) i\n[PROOFSTEP]\nexact subset_toMeasurable _ _ hx\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\n⊢ AEMeasurable f\n[PROOFSTEP]\nset g : α → β := (⋂ i, s i).piecewise (const α default) f\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\n⊢ AEMeasurable f\n[PROOFSTEP]\nrefine' ⟨g, measurable_of_restrict_of_restrict_compl hsm _ _, ae_sum_iff.mpr fun i => _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\n⊢ Measurable (Set.restrict (⋂ (i : ι), s i) g)\n[PROOFSTEP]\nrw [restrict_piecewise]\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\n⊢ Measurable (Set.restrict (⋂ (i : ι), s i) (const α default))\n[PROOFSTEP]\nsimp only [Set.restrict, const]\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\n⊢ Measurable fun x => default\n[PROOFSTEP]\nexact measurable_const\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\n⊢ Measurable (Set.restrict (⋂ (i : ι), s i)ᶜ g)\n[PROOFSTEP]\nrw [restrict_piecewise_compl, compl_iInter]\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\n⊢ Measurable (Set.restrict (⋃ (i : ι), (s i)ᶜ) f)\n[PROOFSTEP]\nintro t ht\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\nt : Set β\nht : MeasurableSet t\n⊢ MeasurableSet (Set.restrict (⋃ (i : ι), (s i)ᶜ) f ⁻¹' t)\n[PROOFSTEP]\nrefine'\n  ⟨⋃ i, (h i).mk f ⁻¹' t ∩ (s i)ᶜ,\n    MeasurableSet.iUnion fun i => (measurable_mk _ ht).inter (measurableSet_toMeasurable _ _).compl, _⟩\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\nt : Set β\nht : MeasurableSet t\n⊢ Subtype.val ⁻¹' ⋃ (i : ι), mk f (_ : AEMeasurable f) ⁻¹' t ∩ (s i)ᶜ = Set.restrict (⋃ (i : ι), (s i)ᶜ) f ⁻¹' t\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase refine'_2.h.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\nt : Set β\nht : MeasurableSet t\nx : α\nhx : x ∈ ⋃ (i : ι), (s i)ᶜ\n⊢ { val := x, property := hx } ∈ Subtype.val ⁻¹' ⋃ (i : ι), mk f (_ : AEMeasurable f) ⁻¹' t ∩ (s i)ᶜ ↔\n    { val := x, property := hx } ∈ Set.restrict (⋃ (i : ι), (s i)ᶜ) f ⁻¹' t\n[PROOFSTEP]\nsimp only [mem_preimage, mem_iUnion, Subtype.coe_mk, Set.restrict, mem_inter_iff, mem_compl_iff] at hx ⊢\n[GOAL]\ncase refine'_2.h.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\nt : Set β\nht : MeasurableSet t\nx : α\nhx : ∃ i, ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\n⊢ (∃ i, mk f (_ : AEMeasurable f) x ∈ t ∧ ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}) ↔ f x ∈ t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase refine'_2.h.mk.mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\nt : Set β\nht : MeasurableSet t\nx : α\nhx : ∃ i, ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\n⊢ (∃ i, mk f (_ : AEMeasurable f) x ∈ t ∧ ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}) → f x ∈ t\n[PROOFSTEP]\nrintro ⟨i, hxt, hxs⟩\n[GOAL]\ncase refine'_2.h.mk.mp.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\nt : Set β\nht : MeasurableSet t\nx : α\nhx : ∃ i, ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\ni : ι\nhxt : mk f (_ : AEMeasurable f) x ∈ t\nhxs : ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\n⊢ f x ∈ t\n[PROOFSTEP]\nrwa [hs _ _ hxs]\n[GOAL]\ncase refine'_2.h.mk.mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\nt : Set β\nht : MeasurableSet t\nx : α\nhx : ∃ i, ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\n⊢ f x ∈ t → ∃ i, mk f (_ : AEMeasurable f) x ∈ t ∧ ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\n[PROOFSTEP]\nrcases hx with ⟨i, hi⟩\n[GOAL]\ncase refine'_2.h.mk.mpr.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\nt : Set β\nht : MeasurableSet t\nx : α\ni : ι\nhi : ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\n⊢ f x ∈ t → ∃ i, mk f (_ : AEMeasurable f) x ∈ t ∧ ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\n[PROOFSTEP]\nrw [hs _ _ hi]\n[GOAL]\ncase refine'_2.h.mk.mpr.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\nt : Set β\nht : MeasurableSet t\nx : α\ni : ι\nhi : ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\n⊢ mk f (_ : AEMeasurable f) x ∈ t →\n    ∃ i, mk f (_ : AEMeasurable f) x ∈ t ∧ ¬x ∈ toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\n[PROOFSTEP]\nexact fun h => ⟨i, h, hi⟩\n[GOAL]\ncase refine'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\ni : ι\n⊢ ∀ᵐ (x : α) ∂μ i, f x = g x\n[PROOFSTEP]\nrefine' measure_mono_null (fun x (hx : f x ≠ g x) => _) (hsμ i)\n[GOAL]\ncase refine'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\ni : ι\nx : α\nhx : f x ≠ g x\n⊢ x ∈ s i\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase refine'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\ni : ι\nx : α\nhx : ¬x ∈ (fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}) i\n⊢ f x = piecewise (⋂ (i : ι), s i) (const α default) f x\n[PROOFSTEP]\nrefine' (piecewise_eq_of_not_mem _ _ _ _).symm\n[GOAL]\ncase refine'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ninst✝ : Countable ι\nμ : ι → Measure α\nh : ∀ (i : ι), AEMeasurable f\n✝ : Nontrivial β\ninhabited_h : Inhabited β\ns : ι → Set α := fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsm : MeasurableSet (⋂ (i : ι), s i)\nhs : ∀ (i : ι) (x : α), ¬x ∈ s i → f x = mk f (_ : AEMeasurable f) x\ng : α → β := piecewise (⋂ (i : ι), s i) (const α default) f\ni : ι\nx : α\nhx : ¬x ∈ (fun i => toMeasurable (μ i) {x | f x ≠ mk f (_ : AEMeasurable f) x}) i\n⊢ ¬x ∈ ⋂ (i : ι), s i\n[PROOFSTEP]\nexact fun h => hx (mem_iInter.1 h i)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\n⊢ AEMeasurable f ↔ AEMeasurable f ∧ AEMeasurable f\n[PROOFSTEP]\nrw [← sum_cond, aemeasurable_sum_measure_iff, Bool.forall_bool, and_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\n⊢ AEMeasurable f ∧ AEMeasurable f ↔ AEMeasurable f ∧ AEMeasurable f\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\ns t : Set α\n⊢ AEMeasurable f ↔ AEMeasurable f ∧ AEMeasurable f\n[PROOFSTEP]\nsimp only [union_eq_iUnion, aemeasurable_iUnion_iff, Bool.forall_bool, cond, and_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf✝ g✝ : α → β\nμ ν : Measure α\ng : β → γ\nf : α → β\nhg : AEMeasurable g\nhf : AEMeasurable f\n⊢ Measure.map g (Measure.map f μ) = Measure.map (g ∘ f) μ\n[PROOFSTEP]\next1 s hs\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf✝ g✝ : α → β\nμ ν : Measure α\ng : β → γ\nf : α → β\nhg : AEMeasurable g\nhf : AEMeasurable f\ns : Set γ\nhs : MeasurableSet s\n⊢ ↑↑(Measure.map g (Measure.map f μ)) s = ↑↑(Measure.map (g ∘ f) μ) s\n[PROOFSTEP]\nlet g' := hg.mk g\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf✝ g✝ : α → β\nμ ν : Measure α\ng : β → γ\nf : α → β\nhg : AEMeasurable g\nhf : AEMeasurable f\ns : Set γ\nhs : MeasurableSet s\ng' : β → γ := mk g hg\n⊢ ↑↑(Measure.map g (Measure.map f μ)) s = ↑↑(Measure.map (g ∘ f) μ) s\n[PROOFSTEP]\nhave A : map g (map f μ) = map g' (map f μ) :=\n  by\n  apply MeasureTheory.Measure.map_congr\n  exact hg.ae_eq_mk\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf✝ g✝ : α → β\nμ ν : Measure α\ng : β → γ\nf : α → β\nhg : AEMeasurable g\nhf : AEMeasurable f\ns : Set γ\nhs : MeasurableSet s\ng' : β → γ := mk g hg\n⊢ Measure.map g (Measure.map f μ) = Measure.map g' (Measure.map f μ)\n[PROOFSTEP]\napply MeasureTheory.Measure.map_congr\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf✝ g✝ : α → β\nμ ν : Measure α\ng : β → γ\nf : α → β\nhg : AEMeasurable g\nhf : AEMeasurable f\ns : Set γ\nhs : MeasurableSet s\ng' : β → γ := mk g hg\n⊢ g =ᶠ[ae (Measure.map f μ)] g'\n[PROOFSTEP]\nexact hg.ae_eq_mk\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf✝ g✝ : α → β\nμ ν : Measure α\ng : β → γ\nf : α → β\nhg : AEMeasurable g\nhf : AEMeasurable f\ns : Set γ\nhs : MeasurableSet s\ng' : β → γ := mk g hg\nA : Measure.map g (Measure.map f μ) = Measure.map g' (Measure.map f μ)\n⊢ ↑↑(Measure.map g (Measure.map f μ)) s = ↑↑(Measure.map (g ∘ f) μ) s\n[PROOFSTEP]\nhave B : map (g ∘ f) μ = map (g' ∘ f) μ :=\n  by\n  apply MeasureTheory.Measure.map_congr\n  exact ae_of_ae_map hf hg.ae_eq_mk\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf✝ g✝ : α → β\nμ ν : Measure α\ng : β → γ\nf : α → β\nhg : AEMeasurable g\nhf : AEMeasurable f\ns : Set γ\nhs : MeasurableSet s\ng' : β → γ := mk g hg\nA : Measure.map g (Measure.map f μ) = Measure.map g' (Measure.map f μ)\n⊢ Measure.map (g ∘ f) μ = Measure.map (g' ∘ f) μ\n[PROOFSTEP]\napply MeasureTheory.Measure.map_congr\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf✝ g✝ : α → β\nμ ν : Measure α\ng : β → γ\nf : α → β\nhg : AEMeasurable g\nhf : AEMeasurable f\ns : Set γ\nhs : MeasurableSet s\ng' : β → γ := mk g hg\nA : Measure.map g (Measure.map f μ) = Measure.map g' (Measure.map f μ)\n⊢ g ∘ f =ᶠ[ae μ] g' ∘ f\n[PROOFSTEP]\nexact ae_of_ae_map hf hg.ae_eq_mk\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf✝ g✝ : α → β\nμ ν : Measure α\ng : β → γ\nf : α → β\nhg : AEMeasurable g\nhf : AEMeasurable f\ns : Set γ\nhs : MeasurableSet s\ng' : β → γ := mk g hg\nA : Measure.map g (Measure.map f μ) = Measure.map g' (Measure.map f μ)\nB : Measure.map (g ∘ f) μ = Measure.map (g' ∘ f) μ\n⊢ ↑↑(Measure.map g (Measure.map f μ)) s = ↑↑(Measure.map (g ∘ f) μ) s\n[PROOFSTEP]\nsimp only [A, B, hs, hg.measurable_mk.aemeasurable.comp_aemeasurable hf, hg.measurable_mk, hg.measurable_mk hs, hf,\n  map_apply, map_apply_of_aemeasurable]\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf✝ g✝ : α → β\nμ ν : Measure α\ng : β → γ\nf : α → β\nhg : AEMeasurable g\nhf : AEMeasurable f\ns : Set γ\nhs : MeasurableSet s\ng' : β → γ := mk g hg\nA : Measure.map g (Measure.map f μ) = Measure.map g' (Measure.map f μ)\nB : Measure.map (g ∘ f) μ = Measure.map (g' ∘ f) μ\n⊢ ↑↑μ (f ⁻¹' (mk g hg ⁻¹' s)) = ↑↑μ (mk g hg ∘ f ⁻¹' s)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\n⊢ ∃ g, Measurable g ∧ range g ⊆ t ∧ f =ᶠ[ae μ] g\n[PROOFSTEP]\nlet s : Set α := toMeasurable μ {x | f x = H.mk f x ∧ f x ∈ t}ᶜ\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\n⊢ ∃ g, Measurable g ∧ range g ⊆ t ∧ f =ᶠ[ae μ] g\n[PROOFSTEP]\nlet g : α → β := piecewise s (fun _ => h₀.some) (H.mk f)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\n⊢ ∃ g, Measurable g ∧ range g ⊆ t ∧ f =ᶠ[ae μ] g\n[PROOFSTEP]\nrefine' ⟨g, _, _, _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\n⊢ Measurable g\n[PROOFSTEP]\nexact Measurable.piecewise (measurableSet_toMeasurable _ _) measurable_const H.measurable_mk\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\n⊢ range g ⊆ t\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩\n[GOAL]\ncase refine'_2.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\nx : α\n⊢ g x ∈ t\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\nx : α\nhx : x ∈ s\n⊢ g x ∈ t\n[PROOFSTEP]\nsimpa [hx] using h₀.some_mem\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\nx : α\nhx : ¬x ∈ s\n⊢ g x ∈ t\n[PROOFSTEP]\nsimp only [hx, piecewise_eq_of_not_mem, not_false_iff]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\nx : α\nhx : ¬x ∈ s\n⊢ mk f H x ∈ t\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\nx : α\nhx : ¬mk f H x ∈ t\n⊢ x ∈ toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\n[PROOFSTEP]\napply subset_toMeasurable\n[GOAL]\ncase neg.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\nx : α\nhx : ¬mk f H x ∈ t\n⊢ x ∈ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [hx, mem_compl_iff, mem_setOf_eq, not_and, not_false_iff, imp_true_iff]\n[GOAL]\ncase refine'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\n⊢ f =ᶠ[ae μ] g\n[PROOFSTEP]\nhave A : μ (toMeasurable μ {x | f x = H.mk f x ∧ f x ∈ t}ᶜ) = 0 :=\n  by\n  rw [measure_toMeasurable, ← compl_mem_ae_iff, compl_compl]\n  exact H.ae_eq_mk.and ht\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\n⊢ ↑↑μ (toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ) = 0\n[PROOFSTEP]\nrw [measure_toMeasurable, ← compl_mem_ae_iff, compl_compl]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\n⊢ {x | f x = mk f H x ∧ f x ∈ t} ∈ ae μ\n[PROOFSTEP]\nexact H.ae_eq_mk.and ht\n[GOAL]\ncase refine'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\nA : ↑↑μ (toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ) = 0\n⊢ f =ᶠ[ae μ] g\n[PROOFSTEP]\nfilter_upwards [compl_mem_ae_iff.2 A] with x hx\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\nA : ↑↑μ (toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ) = 0\nx : α\nhx : x ∈ (toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ)ᶜ\n⊢ f x = piecewise (toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ) (fun x => Set.Nonempty.some h₀) (mk f H) x\n[PROOFSTEP]\nrw [mem_compl_iff] at hx \n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\nA : ↑↑μ (toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ) = 0\nx : α\nhx : ¬x ∈ toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\n⊢ f x = piecewise (toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ) (fun x => Set.Nonempty.some h₀) (mk f H) x\n[PROOFSTEP]\nsimp only [hx, piecewise_eq_of_not_mem, not_false_iff]\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\nA : ↑↑μ (toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ) = 0\nx : α\nhx : ¬x ∈ toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\n⊢ f x = mk f H x\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\nA : ↑↑μ (toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ) = 0\nx : α\nhx : f x ≠ mk f H x\n⊢ x ∈ toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\n[PROOFSTEP]\napply subset_toMeasurable\n[GOAL]\ncase h.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nH : AEMeasurable f\nt : Set β\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ns : Set α := toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\ng : α → β := piecewise s (fun x => Set.Nonempty.some h₀) (mk f H)\nA : ↑↑μ (toMeasurable μ {x | f x = mk f H x ∧ f x ∈ t}ᶜ) = 0\nx : α\nhx : f x ≠ mk f H x\n⊢ x ∈ {x | f x = mk f H x ∧ f x ∈ t}ᶜ\n[PROOFSTEP]\nsimp only [hx, mem_compl_iff, mem_setOf_eq, false_and_iff, not_false_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf✝ g : α → β✝\nμ ν : Measure α\nβ : Type u_7\ninst✝¹ : Preorder β\ninst✝ : Zero β\nmβ : MeasurableSpace β\nf : α → β\nhf : AEMeasurable f\nf_nn : ∀ᵐ (t : α) ∂μ, 0 ≤ f t\n⊢ ∃ g, Measurable g ∧ 0 ≤ g ∧ f =ᶠ[ae μ] g\n[PROOFSTEP]\nobtain ⟨G, hG_meas, hG_mem, hG_ae_eq⟩ := hf.exists_ae_eq_range_subset f_nn ⟨0, le_rfl⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf✝ g : α → β✝\nμ ν : Measure α\nβ : Type u_7\ninst✝¹ : Preorder β\ninst✝ : Zero β\nmβ : MeasurableSpace β\nf : α → β\nhf : AEMeasurable f\nf_nn : ∀ᵐ (t : α) ∂μ, 0 ≤ f t\nG : α → β\nhG_meas : Measurable G\nhG_mem : range G ⊆ Preorder.toLE.1 0\nhG_ae_eq : f =ᶠ[ae μ] G\n⊢ ∃ g, Measurable g ∧ 0 ≤ g ∧ f =ᶠ[ae μ] g\n[PROOFSTEP]\nexact ⟨G, hG_meas, fun x => hG_mem (mem_range_self x), hG_ae_eq⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\nh : AEMeasurable f\ns : Set β\nhfs : ∀ (x : α), f x ∈ s\n⊢ AEMeasurable (codRestrict f s hfs)\n[PROOFSTEP]\nnontriviality α\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\nh : AEMeasurable f\ns : Set β\nhfs : ∀ (x : α), f x ∈ s\n✝ : Nontrivial α\n⊢ AEMeasurable (codRestrict f s hfs)\n[PROOFSTEP]\ninhabit α\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\nh : AEMeasurable f\ns : Set β\nhfs : ∀ (x : α), f x ∈ s\n✝ : Nontrivial α\ninhabited_h : Inhabited α\n⊢ AEMeasurable (codRestrict f s hfs)\n[PROOFSTEP]\nobtain ⟨g, g_meas, hg, fg⟩ : ∃ g : α → β, Measurable g ∧ range g ⊆ s ∧ f =ᵐ[μ] g :=\n  h.exists_ae_eq_range_subset (eventually_of_forall hfs) ⟨_, hfs default⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nh : AEMeasurable f\ns : Set β\nhfs : ∀ (x : α), f x ∈ s\n✝ : Nontrivial α\ninhabited_h : Inhabited α\ng : α → β\ng_meas : Measurable g\nhg : range g ⊆ s\nfg : f =ᶠ[ae μ] g\n⊢ AEMeasurable (codRestrict f s hfs)\n[PROOFSTEP]\nrefine' ⟨codRestrict g s fun x => hg (mem_range_self _), Measurable.subtype_mk g_meas, _⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nh : AEMeasurable f\ns : Set β\nhfs : ∀ (x : α), f x ∈ s\n✝ : Nontrivial α\ninhabited_h : Inhabited α\ng : α → β\ng_meas : Measurable g\nhg : range g ⊆ s\nfg : f =ᶠ[ae μ] g\n⊢ codRestrict f s hfs =ᶠ[ae μ] codRestrict g s (_ : ∀ (x : α), g x ∈ s)\n[PROOFSTEP]\nfilter_upwards [fg] with x hx\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\nh : AEMeasurable f\ns : Set β\nhfs : ∀ (x : α), f x ∈ s\n✝ : Nontrivial α\ninhabited_h : Inhabited α\ng : α → β\ng_meas : Measurable g\nhg : range g ⊆ s\nfg : f =ᶠ[ae μ] g\nx : α\nhx : f x = g x\n⊢ codRestrict f s hfs x = codRestrict g s (_ : ∀ (x : α), g x ∈ s) x\n[PROOFSTEP]\nsimpa [Subtype.ext_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\nh : ∀ᵐ (x : α) (y : α) ∂μ, f x = f y\n⊢ AEMeasurable f\n[PROOFSTEP]\nrcases eq_or_ne μ 0 with (rfl | hμ)\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nν : Measure α\nh : ∀ᵐ (x : α) (y : α) ∂0, f x = f y\n⊢ AEMeasurable f\n[PROOFSTEP]\nexact aemeasurable_zero_measure\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\nh : ∀ᵐ (x : α) (y : α) ∂μ, f x = f y\nhμ : μ ≠ 0\n⊢ AEMeasurable f\n[PROOFSTEP]\nhaveI := ae_neBot.2 hμ\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\nh : ∀ᵐ (x : α) (y : α) ∂μ, f x = f y\nhμ : μ ≠ 0\nthis : NeBot (ae μ)\n⊢ AEMeasurable f\n[PROOFSTEP]\nrcases h.exists with ⟨x, hx⟩\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\nh : ∀ᵐ (x : α) (y : α) ∂μ, f x = f y\nhμ : μ ≠ 0\nthis : NeBot (ae μ)\nx : α\nhx : ∀ᵐ (y : α) ∂μ, f x = f y\n⊢ AEMeasurable f\n[PROOFSTEP]\nexact ⟨const α (f x), measurable_const, EventuallyEq.symm hx⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf✝ g : α → β\nμ ν : Measure α\ninst✝ : LinearOrder α\nf : α → β\na b : α\n⊢ AEMeasurable f ↔ AEMeasurable f ∧ AEMeasurable f\n[PROOFSTEP]\nrw [uIoc_eq_union, aemeasurable_union_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\ng : β → γ\nhf : MeasurableEmbedding f\n⊢ AEMeasurable g ↔ AEMeasurable (g ∘ f)\n[PROOFSTEP]\nrefine' ⟨fun H => H.comp_measurable hf.measurable, _⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\ng : β → γ\nhf : MeasurableEmbedding f\n⊢ AEMeasurable (g ∘ f) → AEMeasurable g\n[PROOFSTEP]\nrintro ⟨g₁, hgm₁, heq⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\ng : β → γ\nhf : MeasurableEmbedding f\ng₁ : α → γ\nhgm₁ : Measurable g₁\nheq : g ∘ f =ᶠ[ae μ] g₁\n⊢ AEMeasurable g\n[PROOFSTEP]\nrcases hf.exists_measurable_extend hgm₁ fun x => ⟨g x⟩ with ⟨g₂, hgm₂, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ ν : Measure α\ng : β → γ\nhf : MeasurableEmbedding f\ng₂ : β → γ\nhgm₂ : Measurable g₂\nhgm₁ : Measurable (g₂ ∘ f)\nheq : g ∘ f =ᶠ[ae μ] g₂ ∘ f\n⊢ AEMeasurable g\n[PROOFSTEP]\nexact ⟨g₂, hgm₂, hf.ae_map_iff.2 heq⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ng : β → γ\nhg : MeasurableEmbedding g\nμ : Measure α\n⊢ AEMeasurable (g ∘ f) ↔ AEMeasurable f\n[PROOFSTEP]\nrefine' ⟨fun H => _, hg.measurable.comp_aemeasurable⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ng : β → γ\nhg : MeasurableEmbedding g\nμ : Measure α\nH : AEMeasurable (g ∘ f)\n⊢ AEMeasurable f\n[PROOFSTEP]\nsuffices AEMeasurable ((rangeSplitting g ∘ rangeFactorization g) ∘ f) μ by\n  rwa [(rightInverse_rangeSplitting hg.injective).comp_eq_id] at this \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ng : β → γ\nhg : MeasurableEmbedding g\nμ : Measure α\nH : AEMeasurable (g ∘ f)\nthis : AEMeasurable ((rangeSplitting g ∘ rangeFactorization g) ∘ f)\n⊢ AEMeasurable f\n[PROOFSTEP]\nrwa [(rightInverse_rangeSplitting hg.injective).comp_eq_id] at this \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf g✝ : α → β\nμ✝ ν : Measure α\ng : β → γ\nhg : MeasurableEmbedding g\nμ : Measure α\nH : AEMeasurable (g ∘ f)\n⊢ AEMeasurable ((rangeSplitting g ∘ rangeFactorization g) ∘ f)\n[PROOFSTEP]\nexact hg.measurable_rangeSplitting.comp_aemeasurable H.subtype_mk\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : MeasurableSpace γ\ninst✝ : MeasurableSpace δ\nf✝ g : α → β\nμ✝ ν : Measure α\ns : Set α\nhs : MeasurableSet s\nμ : Measure α\nf : α → β\n⊢ AEMeasurable f ↔ AEMeasurable (f ∘ Subtype.val)\n[PROOFSTEP]\nrw [← map_comap_subtype_coe hs, (MeasurableEmbedding.subtype_coe hs).aemeasurable_map_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf g✝ : α → β✝\nμ ν : Measure α\nβ : Type u_7\nmβ : MeasurableSpace β\ninst✝¹ : LinearOrder α\ninst✝ : IsCountablyGenerated atTop\nx : α\ng : α → β\ng_meas : ∀ (t : α), t > x → AEMeasurable g\n⊢ AEMeasurable g\n[PROOFSTEP]\nhaveI : Nonempty α := ⟨x⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf g✝ : α → β✝\nμ ν : Measure α\nβ : Type u_7\nmβ : MeasurableSpace β\ninst✝¹ : LinearOrder α\ninst✝ : IsCountablyGenerated atTop\nx : α\ng : α → β\ng_meas : ∀ (t : α), t > x → AEMeasurable g\nthis : Nonempty α\n⊢ AEMeasurable g\n[PROOFSTEP]\nobtain ⟨u, hu_tendsto⟩ := exists_seq_tendsto (atTop : Filter α)\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf g✝ : α → β✝\nμ ν : Measure α\nβ : Type u_7\nmβ : MeasurableSpace β\ninst✝¹ : LinearOrder α\ninst✝ : IsCountablyGenerated atTop\nx : α\ng : α → β\ng_meas : ∀ (t : α), t > x → AEMeasurable g\nthis : Nonempty α\nu : ℕ → α\nhu_tendsto : Tendsto u atTop atTop\n⊢ AEMeasurable g\n[PROOFSTEP]\nhave Ioi_eq_iUnion : Ioi x = ⋃ n : ℕ, Ioc x (u n) :=\n  by\n  rw [iUnion_Ioc_eq_Ioi_self_iff.mpr _]\n  exact fun y _ => (hu_tendsto.eventually (eventually_ge_atTop y)).exists\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf g✝ : α → β✝\nμ ν : Measure α\nβ : Type u_7\nmβ : MeasurableSpace β\ninst✝¹ : LinearOrder α\ninst✝ : IsCountablyGenerated atTop\nx : α\ng : α → β\ng_meas : ∀ (t : α), t > x → AEMeasurable g\nthis : Nonempty α\nu : ℕ → α\nhu_tendsto : Tendsto u atTop atTop\n⊢ Ioi x = ⋃ (n : ℕ), Ioc x (u n)\n[PROOFSTEP]\nrw [iUnion_Ioc_eq_Ioi_self_iff.mpr _]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf g✝ : α → β✝\nμ ν : Measure α\nβ : Type u_7\nmβ : MeasurableSpace β\ninst✝¹ : LinearOrder α\ninst✝ : IsCountablyGenerated atTop\nx : α\ng : α → β\ng_meas : ∀ (t : α), t > x → AEMeasurable g\nthis : Nonempty α\nu : ℕ → α\nhu_tendsto : Tendsto u atTop atTop\n⊢ ∀ (x_1 : α), x < x_1 → ∃ i, x_1 ≤ u i\n[PROOFSTEP]\nexact fun y _ => (hu_tendsto.eventually (eventually_ge_atTop y)).exists\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf g✝ : α → β✝\nμ ν : Measure α\nβ : Type u_7\nmβ : MeasurableSpace β\ninst✝¹ : LinearOrder α\ninst✝ : IsCountablyGenerated atTop\nx : α\ng : α → β\ng_meas : ∀ (t : α), t > x → AEMeasurable g\nthis : Nonempty α\nu : ℕ → α\nhu_tendsto : Tendsto u atTop atTop\nIoi_eq_iUnion : Ioi x = ⋃ (n : ℕ), Ioc x (u n)\n⊢ AEMeasurable g\n[PROOFSTEP]\nrw [Ioi_eq_iUnion, aemeasurable_iUnion_iff]\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf g✝ : α → β✝\nμ ν : Measure α\nβ : Type u_7\nmβ : MeasurableSpace β\ninst✝¹ : LinearOrder α\ninst✝ : IsCountablyGenerated atTop\nx : α\ng : α → β\ng_meas : ∀ (t : α), t > x → AEMeasurable g\nthis : Nonempty α\nu : ℕ → α\nhu_tendsto : Tendsto u atTop atTop\nIoi_eq_iUnion : Ioi x = ⋃ (n : ℕ), Ioc x (u n)\n⊢ ∀ (i : ℕ), AEMeasurable g\n[PROOFSTEP]\nintro n\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf g✝ : α → β✝\nμ ν : Measure α\nβ : Type u_7\nmβ : MeasurableSpace β\ninst✝¹ : LinearOrder α\ninst✝ : IsCountablyGenerated atTop\nx : α\ng : α → β\ng_meas : ∀ (t : α), t > x → AEMeasurable g\nthis : Nonempty α\nu : ℕ → α\nhu_tendsto : Tendsto u atTop atTop\nIoi_eq_iUnion : Ioi x = ⋃ (n : ℕ), Ioc x (u n)\nn : ℕ\n⊢ AEMeasurable g\n[PROOFSTEP]\ncases' lt_or_le x (u n) with h h\n[GOAL]\ncase intro.inl\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf g✝ : α → β✝\nμ ν : Measure α\nβ : Type u_7\nmβ : MeasurableSpace β\ninst✝¹ : LinearOrder α\ninst✝ : IsCountablyGenerated atTop\nx : α\ng : α → β\ng_meas : ∀ (t : α), t > x → AEMeasurable g\nthis : Nonempty α\nu : ℕ → α\nhu_tendsto : Tendsto u atTop atTop\nIoi_eq_iUnion : Ioi x = ⋃ (n : ℕ), Ioc x (u n)\nn : ℕ\nh : x < u n\n⊢ AEMeasurable g\n[PROOFSTEP]\nexact g_meas (u n) h\n[GOAL]\ncase intro.inr\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf g✝ : α → β✝\nμ ν : Measure α\nβ : Type u_7\nmβ : MeasurableSpace β\ninst✝¹ : LinearOrder α\ninst✝ : IsCountablyGenerated atTop\nx : α\ng : α → β\ng_meas : ∀ (t : α), t > x → AEMeasurable g\nthis : Nonempty α\nu : ℕ → α\nhu_tendsto : Tendsto u atTop atTop\nIoi_eq_iUnion : Ioi x = ⋃ (n : ℕ), Ioc x (u n)\nn : ℕ\nh : u n ≤ x\n⊢ AEMeasurable g\n[PROOFSTEP]\nrw [Ioc_eq_empty (not_lt.mpr h), Measure.restrict_empty]\n[GOAL]\ncase intro.inr\nι : Type u_1\nα : Type u_2\nβ✝ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β✝\ninst✝³ : MeasurableSpace γ\ninst✝² : MeasurableSpace δ\nf g✝ : α → β✝\nμ ν : Measure α\nβ : Type u_7\nmβ : MeasurableSpace β\ninst✝¹ : LinearOrder α\ninst✝ : IsCountablyGenerated atTop\nx : α\ng : α → β\ng_meas : ∀ (t : α), t > x → AEMeasurable g\nthis : Nonempty α\nu : ℕ → α\nhu_tendsto : Tendsto u atTop atTop\nIoi_eq_iUnion : Ioi x = ⋃ (n : ℕ), Ioc x (u n)\nn : ℕ\nh : u n ≤ x\n⊢ AEMeasurable g\n[PROOFSTEP]\nexact aemeasurable_zero_measure\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\n⊢ AEMeasurable (indicator s f) ↔ AEMeasurable f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\n⊢ AEMeasurable (indicator s f) → AEMeasurable f\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\nh : AEMeasurable (indicator s f)\n⊢ AEMeasurable f\n[PROOFSTEP]\nexact (h.mono_measure Measure.restrict_le_self).congr (indicator_ae_eq_restrict hs)\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\n⊢ AEMeasurable f → AEMeasurable (indicator s f)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\nh : AEMeasurable f\n⊢ AEMeasurable (indicator s f)\n[PROOFSTEP]\nrefine' ⟨indicator s (h.mk f), h.measurable_mk.indicator hs, _⟩\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\nh : AEMeasurable f\n⊢ indicator s f =ᶠ[ae μ] indicator s (AEMeasurable.mk f h)\n[PROOFSTEP]\nhave A : s.indicator f =ᵐ[μ.restrict s] s.indicator (AEMeasurable.mk f h) :=\n  (indicator_ae_eq_restrict hs).trans (h.ae_eq_mk.trans <| (indicator_ae_eq_restrict hs).symm)\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\nh : AEMeasurable f\nA : indicator s f =ᶠ[ae (Measure.restrict μ s)] indicator s (AEMeasurable.mk f h)\n⊢ indicator s f =ᶠ[ae μ] indicator s (AEMeasurable.mk f h)\n[PROOFSTEP]\nhave B : s.indicator f =ᵐ[μ.restrict sᶜ] s.indicator (AEMeasurable.mk f h) :=\n  (indicator_ae_eq_restrict_compl hs).trans (indicator_ae_eq_restrict_compl hs).symm\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\nh : AEMeasurable f\nA : indicator s f =ᶠ[ae (Measure.restrict μ s)] indicator s (AEMeasurable.mk f h)\nB : indicator s f =ᶠ[ae (Measure.restrict μ sᶜ)] indicator s (AEMeasurable.mk f h)\n⊢ indicator s f =ᶠ[ae μ] indicator s (AEMeasurable.mk f h)\n[PROOFSTEP]\nexact ae_of_ae_restrict_of_ae_restrict_compl _ A B\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\ninst✝ : Zero β\ns : Set α\nhs : NullMeasurableSet s\n⊢ AEMeasurable (indicator s f) ↔ AEMeasurable f\n[PROOFSTEP]\nrcases hs with ⟨t, ht, hst⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf g : α → β\nμ ν : Measure α\ninst✝ : Zero β\ns t : Set α\nht : MeasurableSet t\nhst : s =ᶠ[ae μ] t\n⊢ AEMeasurable (indicator s f) ↔ AEMeasurable f\n[PROOFSTEP]\nrw [← aemeasurable_congr (indicator_ae_eq_of_ae_eq_set hst.symm), aemeasurable_indicator_iff ht, restrict_congr_set hst]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf✝ g : α → β\nμ ν : Measure α\ninst✝ : Zero β\nf : α → δ\nhf : AEMeasurable f\ns : Set δ\nhs : MeasurableSet s\n⊢ restrict (map f μ) s = restrict (map (AEMeasurable.mk f hf) μ) s\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_μ\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf✝ g : α → β\nμ ν : Measure α\ninst✝ : Zero β\nf : α → δ\nhf : AEMeasurable f\ns : Set δ\nhs : MeasurableSet s\n⊢ map f μ = map (AEMeasurable.mk f hf) μ\n[PROOFSTEP]\napply Measure.map_congr hf.ae_eq_mk\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf✝ g : α → β\nμ ν : Measure α\ninst✝ : Zero β\nf : α → δ\nhf : AEMeasurable f\ns : Set δ\nhs : MeasurableSet s\n⊢ map f (restrict μ (AEMeasurable.mk f hf ⁻¹' s)) = map f (restrict μ (f ⁻¹' s))\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf✝ g : α → β\nμ ν : Measure α\ninst✝ : Zero β\nf : α → δ\nhf : AEMeasurable f\ns : Set δ\nhs : MeasurableSet s\n⊢ restrict μ (AEMeasurable.mk f hf ⁻¹' s) = restrict μ (f ⁻¹' s)\n[PROOFSTEP]\next1 t ht\n[GOAL]\ncase h.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf✝ g : α → β\nμ ν : Measure α\ninst✝ : Zero β\nf : α → δ\nhf : AEMeasurable f\ns : Set δ\nhs : MeasurableSet s\nt : Set α\nht : MeasurableSet t\n⊢ ↑↑(restrict μ (AEMeasurable.mk f hf ⁻¹' s)) t = ↑↑(restrict μ (f ⁻¹' s)) t\n[PROOFSTEP]\nsimp only [ht, Measure.restrict_apply]\n[GOAL]\ncase h.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf✝ g : α → β\nμ ν : Measure α\ninst✝ : Zero β\nf : α → δ\nhf : AEMeasurable f\ns : Set δ\nhs : MeasurableSet s\nt : Set α\nht : MeasurableSet t\n⊢ ↑↑μ (t ∩ AEMeasurable.mk f hf ⁻¹' s) = ↑↑μ (t ∩ f ⁻¹' s)\n[PROOFSTEP]\napply measure_congr\n[GOAL]\ncase h.h.H\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf✝ g : α → β\nμ ν : Measure α\ninst✝ : Zero β\nf : α → δ\nhf : AEMeasurable f\ns : Set δ\nhs : MeasurableSet s\nt : Set α\nht : MeasurableSet t\n⊢ t ∩ AEMeasurable.mk f hf ⁻¹' s =ᶠ[ae μ] t ∩ f ⁻¹' s\n[PROOFSTEP]\napply (EventuallyEq.refl _ _).inter (hf.ae_eq_mk.symm.preimage s)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nR : Type u_6\nm0 : MeasurableSpace α\ninst✝³ : MeasurableSpace β\ninst✝² : MeasurableSpace γ\ninst✝¹ : MeasurableSpace δ\nf✝ g : α → β\nμ ν : Measure α\ninst✝ : Zero β\nf : α → δ\nh : μ ≤ ν\nhf : AEMeasurable f\ns : Set δ\nhs : MeasurableSet s\n⊢ ↑↑(map f μ) s ≤ ↑↑(map f ν) s\n[PROOFSTEP]\nsimpa [hf, hs, hf.mono_measure h] using Measure.le_iff'.1 h (f ⁻¹' s)\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.AEMeasurable", "llama_tokens": 33425, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7371581626286834, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.39731588064982337}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ s ∈ ∂ 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ ∃ a, a ∈ t ∧ erase t a = s\n[PROOFSTEP]\nsimp only [shadow, mem_sup, mem_image]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ s ∈ ∂ 𝒜 ↔ ∃ a x, insert a s ∈ 𝒜\n[PROOFSTEP]\nrefine' mem_shadow_iff.trans ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ (∃ t, t ∈ 𝒜 ∧ ∃ a, a ∈ t ∧ erase t a = s) → ∃ a x, insert a s ∈ 𝒜\n[PROOFSTEP]\nrintro ⟨s, hs, a, ha, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nt : Finset α\na✝ : α\nk r : ℕ\ns : Finset α\nhs : s ∈ 𝒜\na : α\nha : a ∈ s\n⊢ ∃ a_1 x, insert a_1 (erase s a) ∈ 𝒜\n[PROOFSTEP]\nrefine' ⟨a, not_mem_erase a s, _⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nt : Finset α\na✝ : α\nk r : ℕ\ns : Finset α\nhs : s ∈ 𝒜\na : α\nha : a ∈ s\n⊢ insert a (erase s a) ∈ 𝒜\n[PROOFSTEP]\nrwa [insert_erase ha]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ (∃ a x, insert a s ∈ 𝒜) → ∃ t, t ∈ 𝒜 ∧ ∃ a, a ∈ t ∧ erase t a = s\n[PROOFSTEP]\nrintro ⟨a, ha, hs⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na✝ : α\nk r : ℕ\na : α\nha : ¬a ∈ s\nhs : insert a s ∈ 𝒜\n⊢ ∃ t, t ∈ 𝒜 ∧ ∃ a, a ∈ t ∧ erase t a = s\n[PROOFSTEP]\nexact ⟨insert a s, hs, a, mem_insert_self _ _, erase_insert ha⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\nh𝒜 : Set.Sized r ↑𝒜\n⊢ Set.Sized (r - 1) ↑(∂ 𝒜)\n[PROOFSTEP]\nintro A h\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\nh𝒜 : Set.Sized r ↑𝒜\nA : Finset α\nh : A ∈ ↑(∂ 𝒜)\n⊢ card A = r - 1\n[PROOFSTEP]\nobtain ⟨A, hA, i, hi, rfl⟩ := mem_shadow_iff.1 h\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\nh𝒜 : Set.Sized r ↑𝒜\nA : Finset α\nhA : A ∈ 𝒜\ni : α\nhi : i ∈ A\nh : erase A i ∈ ↑(∂ 𝒜)\n⊢ card (erase A i) = r - 1\n[PROOFSTEP]\nrw [card_erase_of_mem hi, h𝒜 hA]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\nh : ¬∅ ∈ 𝒜\n⊢ Set.Sized r ↑(∂ 𝒜) ↔ Set.Sized (r + 1) ↑𝒜\n[PROOFSTEP]\nrefine' ⟨fun h𝒜 s hs => _, Set.Sized.shadow⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\nh : ¬∅ ∈ 𝒜\nh𝒜 : Set.Sized r ↑(∂ 𝒜)\ns : Finset α\nhs : s ∈ ↑𝒜\n⊢ card s = r + 1\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := nonempty_iff_ne_empty.2 (ne_of_mem_of_not_mem hs h)\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na✝ : α\nk r : ℕ\nh : ¬∅ ∈ 𝒜\nh𝒜 : Set.Sized r ↑(∂ 𝒜)\ns : Finset α\nhs : s ∈ ↑𝒜\na : α\nha : a ∈ s\n⊢ card s = r + 1\n[PROOFSTEP]\nrw [← h𝒜 (erase_mem_shadow hs ha), card_erase_add_one ha]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ s ∈ ∂ 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + 1\n[PROOFSTEP]\nrefine' mem_shadow_iff_insert_mem.trans ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ (∃ a x, insert a s ∈ 𝒜) → ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + 1\n[PROOFSTEP]\nrintro ⟨a, ha, hs⟩\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na✝ : α\nk r : ℕ\na : α\nha : ¬a ∈ s\nhs : insert a s ∈ 𝒜\n⊢ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + 1\n[PROOFSTEP]\nexact ⟨insert a s, hs, subset_insert _ _, card_insert_of_not_mem ha⟩\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ (∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + 1) → ∃ a x, insert a s ∈ 𝒜\n[PROOFSTEP]\nrintro ⟨t, ht, hst, h⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t✝ : Finset α\na : α\nk r : ℕ\nt : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nh : card t = card s + 1\n⊢ ∃ a x, insert a s ∈ 𝒜\n[PROOFSTEP]\nobtain ⟨a, ha⟩ : ∃ a, t \\ s = { a } := card_eq_one.1 (by rw [card_sdiff hst, h, add_tsub_cancel_left])\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t✝ : Finset α\na : α\nk r : ℕ\nt : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nh : card t = card s + 1\n⊢ card (t \\ s) = 1\n[PROOFSTEP]\nrw [card_sdiff hst, h, add_tsub_cancel_left]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t✝ : Finset α\na✝ : α\nk r : ℕ\nt : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nh : card t = card s + 1\na : α\nha : t \\ s = {a}\n⊢ ∃ a x, insert a s ∈ 𝒜\n[PROOFSTEP]\nexact\n  ⟨a, fun hat => not_mem_sdiff_of_mem_right hat (ha.superset <| mem_singleton_self a), by\n    rwa [insert_eq a s, ← ha, sdiff_union_of_subset hst]⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t✝ : Finset α\na✝ : α\nk r : ℕ\nt : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nh : card t = card s + 1\na : α\nha : t \\ s = {a}\n⊢ insert a s ∈ 𝒜\n[PROOFSTEP]\nrwa [insert_eq a s, ← ha, sdiff_union_of_subset hst]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ s ∈ ∂ ^[k] 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + k\n[PROOFSTEP]\ninduction' k with k ih generalizing 𝒜 s\n[GOAL]\ncase zero\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ s ∈ ∂ ^[zero] 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + zero\n[PROOFSTEP]\nrefine' ⟨fun hs => ⟨s, hs, Subset.refl _, rfl⟩, _⟩\n[GOAL]\ncase zero\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ (∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + zero) → s ∈ ∂ ^[zero] 𝒜\n[PROOFSTEP]\nrintro ⟨t, ht, hst, hcard⟩\n[GOAL]\ncase zero.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk r : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nhcard : card t = card s + zero\n⊢ s ∈ ∂ ^[zero] 𝒜\n[PROOFSTEP]\nrwa [eq_of_subset_of_card_le hst hcard.le]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk✝ r k : ℕ\nih : ∀ {𝒜 : Finset (Finset α)} {s : Finset α}, s ∈ ∂ ^[k] 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + k\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ s ∈ ∂ ^[succ k] 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k\n[PROOFSTEP]\nsimp only [exists_prop, Function.comp_apply, Function.iterate_succ]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk✝ r k : ℕ\nih : ∀ {𝒜 : Finset (Finset α)} {s : Finset α}, s ∈ ∂ ^[k] 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + k\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ s ∈ ∂ ^[k] (∂ 𝒜) ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k\n[PROOFSTEP]\nrefine' ih.trans _\n[GOAL]\ncase succ\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk✝ r k : ℕ\nih : ∀ {𝒜 : Finset (Finset α)} {s : Finset α}, s ∈ ∂ ^[k] 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + k\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ (∃ t, t ∈ ∂ 𝒜 ∧ s ⊆ t ∧ card t = card s + k) ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k\n[PROOFSTEP]\nclear ih\n[GOAL]\ncase succ\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ (∃ t, t ∈ ∂ 𝒜 ∧ s ⊆ t ∧ card t = card s + k) ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.mp\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ (∃ t, t ∈ ∂ 𝒜 ∧ s ⊆ t ∧ card t = card s + k) → ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k\n[PROOFSTEP]\nrintro ⟨t, ht, hst, hcardst⟩\n[GOAL]\ncase succ.mp.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ ∂ 𝒜\nhst : s ⊆ t\nhcardst : card t = card s + k\n⊢ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k\n[PROOFSTEP]\nobtain ⟨u, hu, htu, hcardtu⟩ := mem_shadow_iff_exists_mem_card_add_one.1 ht\n[GOAL]\ncase succ.mp.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ ∂ 𝒜\nhst : s ⊆ t\nhcardst : card t = card s + k\nu : Finset α\nhu : u ∈ 𝒜\nhtu : t ⊆ u\nhcardtu : card u = card t + 1\n⊢ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k\n[PROOFSTEP]\nrefine' ⟨u, hu, hst.trans htu, _⟩\n[GOAL]\ncase succ.mp.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ ∂ 𝒜\nhst : s ⊆ t\nhcardst : card t = card s + k\nu : Finset α\nhu : u ∈ 𝒜\nhtu : t ⊆ u\nhcardtu : card u = card t + 1\n⊢ card u = card s + succ k\n[PROOFSTEP]\nrw [hcardtu, hcardst]\n[GOAL]\ncase succ.mp.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ ∂ 𝒜\nhst : s ⊆ t\nhcardst : card t = card s + k\nu : Finset α\nhu : u ∈ 𝒜\nhtu : t ⊆ u\nhcardtu : card u = card t + 1\n⊢ card s + k + 1 = card s + succ k\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.mpr\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ (∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k) → ∃ t, t ∈ ∂ 𝒜 ∧ s ⊆ t ∧ card t = card s + k\n[PROOFSTEP]\nrintro ⟨t, ht, hst, hcard⟩\n[GOAL]\ncase succ.mpr.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nhcard : card t = card s + succ k\n⊢ ∃ t, t ∈ ∂ 𝒜 ∧ s ⊆ t ∧ card t = card s + k\n[PROOFSTEP]\nobtain ⟨u, hsu, hut, hu⟩ :=\n  Finset.exists_intermediate_set k\n    (by\n      rw [add_comm, hcard]\n      exact le_succ _)\n    hst\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nhcard : card t = card s + succ k\n⊢ k + card s ≤ card t\n[PROOFSTEP]\nrw [add_comm, hcard]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nhcard : card t = card s + succ k\n⊢ card s + k ≤ card s + succ k\n[PROOFSTEP]\nexact le_succ _\n[GOAL]\ncase succ.mpr.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nhcard : card t = card s + succ k\nu : Finset α\nhsu : s ⊆ u\nhut : u ⊆ t\nhu : card u = k + card s\n⊢ ∃ t, t ∈ ∂ 𝒜 ∧ s ⊆ t ∧ card t = card s + k\n[PROOFSTEP]\nrw [add_comm] at hu \n[GOAL]\ncase succ.mpr.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nhcard : card t = card s + succ k\nu : Finset α\nhsu : s ⊆ u\nhut : u ⊆ t\nhu : card u = card s + k\n⊢ ∃ t, t ∈ ∂ 𝒜 ∧ s ⊆ t ∧ card t = card s + k\n[PROOFSTEP]\nrefine' ⟨u, mem_shadow_iff_exists_mem_card_add_one.2 ⟨t, ht, hut, _⟩, hsu, hu⟩\n[GOAL]\ncase succ.mpr.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nhcard : card t = card s + succ k\nu : Finset α\nhsu : s ⊆ u\nhut : u ⊆ t\nhu : card u = card s + k\n⊢ card t = card u + 1\n[PROOFSTEP]\nrw [hcard, hu]\n[GOAL]\ncase succ.mpr.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nhcard : card t = card s + succ k\nu : Finset α\nhsu : s ⊆ u\nhut : u ⊆ t\nhu : card u = card s + k\n⊢ card s + succ k = card s + k + 1\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ s ∈ ∂⁺ 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ ∃ a x, insert a t = s\n[PROOFSTEP]\nsimp_rw [upShadow, mem_sup, mem_image, exists_prop, mem_compl]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\nh𝒜 : Set.Sized r ↑𝒜\n⊢ Set.Sized (r + 1) ↑(∂⁺ 𝒜)\n[PROOFSTEP]\nintro A h\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\nh𝒜 : Set.Sized r ↑𝒜\nA : Finset α\nh : A ∈ ↑(∂⁺ 𝒜)\n⊢ card A = r + 1\n[PROOFSTEP]\nobtain ⟨A, hA, i, hi, rfl⟩ := mem_upShadow_iff.1 h\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\nh𝒜 : Set.Sized r ↑𝒜\nA : Finset α\nhA : A ∈ 𝒜\ni : α\nhi : ¬i ∈ A\nh : insert i A ∈ ↑(∂⁺ 𝒜)\n⊢ card (insert i A) = r + 1\n[PROOFSTEP]\nrw [card_insert_of_not_mem hi, h𝒜 hA]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ s ∈ ∂⁺ 𝒜 ↔ ∃ a, a ∈ s ∧ erase s a ∈ 𝒜\n[PROOFSTEP]\nrefine' mem_upShadow_iff.trans ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ (∃ t, t ∈ 𝒜 ∧ ∃ a x, insert a t = s) → ∃ a, a ∈ s ∧ erase s a ∈ 𝒜\n[PROOFSTEP]\nrintro ⟨s, hs, a, ha, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nt : Finset α\na✝ : α\nk r : ℕ\ns : Finset α\nhs : s ∈ 𝒜\na : α\nha : ¬a ∈ s\n⊢ ∃ a_1, a_1 ∈ insert a s ∧ erase (insert a s) a_1 ∈ 𝒜\n[PROOFSTEP]\nrefine' ⟨a, mem_insert_self a s, _⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nt : Finset α\na✝ : α\nk r : ℕ\ns : Finset α\nhs : s ∈ 𝒜\na : α\nha : ¬a ∈ s\n⊢ erase (insert a s) a ∈ 𝒜\n[PROOFSTEP]\nrwa [erase_insert ha]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ (∃ a, a ∈ s ∧ erase s a ∈ 𝒜) → ∃ t, t ∈ 𝒜 ∧ ∃ a x, insert a t = s\n[PROOFSTEP]\nrintro ⟨a, ha, hs⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na✝ : α\nk r : ℕ\na : α\nha : a ∈ s\nhs : erase s a ∈ 𝒜\n⊢ ∃ t, t ∈ 𝒜 ∧ ∃ a x, insert a t = s\n[PROOFSTEP]\nexact ⟨s.erase a, hs, a, not_mem_erase _ _, insert_erase ha⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ s ∈ ∂⁺ 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + 1 = card s\n[PROOFSTEP]\nrefine' mem_upShadow_iff_erase_mem.trans ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ (∃ a, a ∈ s ∧ erase s a ∈ 𝒜) → ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + 1 = card s\n[PROOFSTEP]\nrintro ⟨a, ha, hs⟩\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na✝ : α\nk r : ℕ\na : α\nha : a ∈ s\nhs : erase s a ∈ 𝒜\n⊢ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + 1 = card s\n[PROOFSTEP]\nexact ⟨s.erase a, hs, erase_subset _ _, card_erase_add_one ha⟩\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ (∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + 1 = card s) → ∃ a, a ∈ s ∧ erase s a ∈ 𝒜\n[PROOFSTEP]\nrintro ⟨t, ht, hts, h⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t✝ : Finset α\na : α\nk r : ℕ\nt : Finset α\nht : t ∈ 𝒜\nhts : t ⊆ s\nh : card t + 1 = card s\n⊢ ∃ a, a ∈ s ∧ erase s a ∈ 𝒜\n[PROOFSTEP]\nobtain ⟨a, ha⟩ : ∃ a, s \\ t = { a } := card_eq_one.1 (by rw [card_sdiff hts, ← h, add_tsub_cancel_left])\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t✝ : Finset α\na : α\nk r : ℕ\nt : Finset α\nht : t ∈ 𝒜\nhts : t ⊆ s\nh : card t + 1 = card s\n⊢ card (s \\ t) = 1\n[PROOFSTEP]\nrw [card_sdiff hts, ← h, add_tsub_cancel_left]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t✝ : Finset α\na✝ : α\nk r : ℕ\nt : Finset α\nht : t ∈ 𝒜\nhts : t ⊆ s\nh : card t + 1 = card s\na : α\nha : s \\ t = {a}\n⊢ ∃ a, a ∈ s ∧ erase s a ∈ 𝒜\n[PROOFSTEP]\nrefine' ⟨a, sdiff_subset _ _ ((ha.ge : _ ⊆ _) <| mem_singleton_self a), _⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t✝ : Finset α\na✝ : α\nk r : ℕ\nt : Finset α\nht : t ∈ 𝒜\nhts : t ⊆ s\nh : card t + 1 = card s\na : α\nha : s \\ t = {a}\n⊢ erase s a ∈ 𝒜\n[PROOFSTEP]\nrwa [← sdiff_singleton_eq_erase, ← ha, sdiff_sdiff_eq_self hts]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ s ∈ ∂⁺ ^[k] 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + k = card s\n[PROOFSTEP]\ninduction' k with k ih generalizing 𝒜 s\n[GOAL]\ncase zero\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ s ∈ ∂⁺ ^[zero] 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + zero = card s\n[PROOFSTEP]\nrefine' ⟨fun hs => ⟨s, hs, Subset.refl _, rfl⟩, _⟩\n[GOAL]\ncase zero\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ (∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + zero = card s) → s ∈ ∂⁺ ^[zero] 𝒜\n[PROOFSTEP]\nrintro ⟨t, ht, hst, hcard⟩\n[GOAL]\ncase zero.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk r : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhst : t ⊆ s\nhcard : card t + zero = card s\n⊢ s ∈ ∂⁺ ^[zero] 𝒜\n[PROOFSTEP]\nrwa [← eq_of_subset_of_card_le hst hcard.ge]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk✝ r k : ℕ\nih : ∀ {𝒜 : Finset (Finset α)} {s : Finset α}, s ∈ ∂⁺ ^[k] 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + k = card s\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ s ∈ ∂⁺ ^[succ k] 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + succ k = card s\n[PROOFSTEP]\nsimp only [exists_prop, Function.comp_apply, Function.iterate_succ]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk✝ r k : ℕ\nih : ∀ {𝒜 : Finset (Finset α)} {s : Finset α}, s ∈ ∂⁺ ^[k] 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + k = card s\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ s ∈ ∂⁺ ^[k] (∂⁺ 𝒜) ↔ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + succ k = card s\n[PROOFSTEP]\nrefine' ih.trans _\n[GOAL]\ncase succ\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk✝ r k : ℕ\nih : ∀ {𝒜 : Finset (Finset α)} {s : Finset α}, s ∈ ∂⁺ ^[k] 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + k = card s\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ (∃ t, t ∈ ∂⁺ 𝒜 ∧ t ⊆ s ∧ card t + k = card s) ↔ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + succ k = card s\n[PROOFSTEP]\nclear ih\n[GOAL]\ncase succ\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ (∃ t, t ∈ ∂⁺ 𝒜 ∧ t ⊆ s ∧ card t + k = card s) ↔ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + succ k = card s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.mp\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ (∃ t, t ∈ ∂⁺ 𝒜 ∧ t ⊆ s ∧ card t + k = card s) → ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + succ k = card s\n[PROOFSTEP]\nrintro ⟨t, ht, hts, hcardst⟩\n[GOAL]\ncase succ.mp.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ ∂⁺ 𝒜\nhts : t ⊆ s\nhcardst : card t + k = card s\n⊢ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + succ k = card s\n[PROOFSTEP]\nobtain ⟨u, hu, hut, hcardtu⟩ := mem_upShadow_iff_exists_mem_card_add_one.1 ht\n[GOAL]\ncase succ.mp.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ ∂⁺ 𝒜\nhts : t ⊆ s\nhcardst : card t + k = card s\nu : Finset α\nhu : u ∈ 𝒜\nhut : u ⊆ t\nhcardtu : card u + 1 = card t\n⊢ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + succ k = card s\n[PROOFSTEP]\nrefine' ⟨u, hu, hut.trans hts, _⟩\n[GOAL]\ncase succ.mp.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ ∂⁺ 𝒜\nhts : t ⊆ s\nhcardst : card t + k = card s\nu : Finset α\nhu : u ∈ 𝒜\nhut : u ⊆ t\nhcardtu : card u + 1 = card t\n⊢ card u + succ k = card s\n[PROOFSTEP]\nrw [← hcardst, ← hcardtu, add_right_comm]\n[GOAL]\ncase succ.mp.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ ∂⁺ 𝒜\nhts : t ⊆ s\nhcardst : card t + k = card s\nu : Finset α\nhu : u ∈ 𝒜\nhut : u ⊆ t\nhcardtu : card u + 1 = card t\n⊢ card u + succ k = card u + k + 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.mpr\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ (∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + succ k = card s) → ∃ t, t ∈ ∂⁺ 𝒜 ∧ t ⊆ s ∧ card t + k = card s\n[PROOFSTEP]\nrintro ⟨t, ht, hts, hcard⟩\n[GOAL]\ncase succ.mpr.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhts : t ⊆ s\nhcard : card t + succ k = card s\n⊢ ∃ t, t ∈ ∂⁺ 𝒜 ∧ t ⊆ s ∧ card t + k = card s\n[PROOFSTEP]\nobtain ⟨u, htu, hus, hu⟩ :=\n  Finset.exists_intermediate_set 1\n    (by\n      rw [add_comm, ← hcard]\n      exact add_le_add_left (succ_le_of_lt (zero_lt_succ _)) _)\n    hts\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhts : t ⊆ s\nhcard : card t + succ k = card s\n⊢ 1 + card t ≤ card s\n[PROOFSTEP]\nrw [add_comm, ← hcard]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhts : t ⊆ s\nhcard : card t + succ k = card s\n⊢ card t + 1 ≤ card t + succ k\n[PROOFSTEP]\nexact add_le_add_left (succ_le_of_lt (zero_lt_succ _)) _\n[GOAL]\ncase succ.mpr.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhts : t ⊆ s\nhcard : card t + succ k = card s\nu : Finset α\nhtu : t ⊆ u\nhus : u ⊆ s\nhu : card u = 1 + card t\n⊢ ∃ t, t ∈ ∂⁺ 𝒜 ∧ t ⊆ s ∧ card t + k = card s\n[PROOFSTEP]\nrw [add_comm] at hu \n[GOAL]\ncase succ.mpr.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhts : t ⊆ s\nhcard : card t + succ k = card s\nu : Finset α\nhtu : t ⊆ u\nhus : u ⊆ s\nhu : card u = card t + 1\n⊢ ∃ t, t ∈ ∂⁺ 𝒜 ∧ t ⊆ s ∧ card t + k = card s\n[PROOFSTEP]\nrefine' ⟨u, mem_upShadow_iff_exists_mem_card_add_one.2 ⟨t, ht, htu, hu.symm⟩, hus, _⟩\n[GOAL]\ncase succ.mpr.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhts : t ⊆ s\nhcard : card t + succ k = card s\nu : Finset α\nhtu : t ⊆ u\nhus : u ⊆ s\nhu : card u = card t + 1\n⊢ card u + k = card s\n[PROOFSTEP]\nrw [hu, ← hcard, add_right_comm]\n[GOAL]\ncase succ.mpr.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜✝ : Finset (Finset α)\ns✝ t✝ : Finset α\na : α\nk✝ r k : ℕ\n𝒜 : Finset (Finset α)\ns t : Finset α\nht : t ∈ 𝒜\nhts : t ⊆ s\nhcard : card t + succ k = card s\nu : Finset α\nhtu : t ⊆ u\nhus : u ⊆ s\nhu : card u = card t + 1\n⊢ card t + k + 1 = card t + succ k\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ image compl (∂ 𝒜) = ∂⁺ (image compl 𝒜)\n[PROOFSTEP]\next s\n[GOAL]\ncase a\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\ns : Finset α\n⊢ s ∈ image compl (∂ 𝒜) ↔ s ∈ ∂⁺ (image compl 𝒜)\n[PROOFSTEP]\nsimp only [mem_image, exists_prop, mem_shadow_iff, mem_upShadow_iff]\n[GOAL]\ncase a\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\ns : Finset α\n⊢ (∃ a, (∃ t, t ∈ 𝒜 ∧ ∃ a_1, a_1 ∈ t ∧ erase t a_1 = a) ∧ aᶜ = s) ↔\n    ∃ t, (∃ a, a ∈ 𝒜 ∧ aᶜ = t) ∧ ∃ a, ¬a ∈ t ∧ insert a t = s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\ns : Finset α\n⊢ (∃ a, (∃ t, t ∈ 𝒜 ∧ ∃ a_1, a_1 ∈ t ∧ erase t a_1 = a) ∧ aᶜ = s) →\n    ∃ t, (∃ a, a ∈ 𝒜 ∧ aᶜ = t) ∧ ∃ a, ¬a ∈ t ∧ insert a t = s\n[PROOFSTEP]\nrintro ⟨_, ⟨s, hs, a, ha, rfl⟩, rfl⟩\n[GOAL]\ncase a.mp.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na✝ : α\nk r : ℕ\ns : Finset α\nhs : s ∈ 𝒜\na : α\nha : a ∈ s\n⊢ ∃ t, (∃ a, a ∈ 𝒜 ∧ aᶜ = t) ∧ ∃ a_1, ¬a_1 ∈ t ∧ insert a_1 t = (erase s a)ᶜ\n[PROOFSTEP]\nexact ⟨sᶜ, ⟨s, hs, rfl⟩, a, not_mem_compl.2 ha, compl_erase.symm⟩\n[GOAL]\ncase a.mpr\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\ns : Finset α\n⊢ (∃ t, (∃ a, a ∈ 𝒜 ∧ aᶜ = t) ∧ ∃ a, ¬a ∈ t ∧ insert a t = s) →\n    ∃ a, (∃ t, t ∈ 𝒜 ∧ ∃ a_1, a_1 ∈ t ∧ erase t a_1 = a) ∧ aᶜ = s\n[PROOFSTEP]\nrintro ⟨_, ⟨s, hs, rfl⟩, a, ha, rfl⟩\n[GOAL]\ncase a.mpr.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na✝ : α\nk r : ℕ\ns : Finset α\nhs : s ∈ 𝒜\na : α\nha : ¬a ∈ sᶜ\n⊢ ∃ a_1, (∃ t, t ∈ 𝒜 ∧ ∃ a, a ∈ t ∧ erase t a = a_1) ∧ a_1ᶜ = insert a sᶜ\n[PROOFSTEP]\nexact ⟨s.erase a, ⟨s, hs, a, not_mem_compl.1 ha, rfl⟩, compl_erase⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns t : Finset α\na : α\nk r : ℕ\n⊢ image compl (∂⁺ 𝒜) = ∂ (image compl 𝒜)\n[PROOFSTEP]\next s\n[GOAL]\ncase a\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\ns : Finset α\n⊢ s ∈ image compl (∂⁺ 𝒜) ↔ s ∈ ∂ (image compl 𝒜)\n[PROOFSTEP]\nsimp only [mem_image, exists_prop, mem_shadow_iff, mem_upShadow_iff]\n[GOAL]\ncase a\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\ns : Finset α\n⊢ (∃ a, (∃ t, t ∈ 𝒜 ∧ ∃ a_1, ¬a_1 ∈ t ∧ insert a_1 t = a) ∧ aᶜ = s) ↔\n    ∃ t, (∃ a, a ∈ 𝒜 ∧ aᶜ = t) ∧ ∃ a, a ∈ t ∧ erase t a = s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\ns : Finset α\n⊢ (∃ a, (∃ t, t ∈ 𝒜 ∧ ∃ a_1, ¬a_1 ∈ t ∧ insert a_1 t = a) ∧ aᶜ = s) →\n    ∃ t, (∃ a, a ∈ 𝒜 ∧ aᶜ = t) ∧ ∃ a, a ∈ t ∧ erase t a = s\n[PROOFSTEP]\nrintro ⟨_, ⟨s, hs, a, ha, rfl⟩, rfl⟩\n[GOAL]\ncase a.mp.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na✝ : α\nk r : ℕ\ns : Finset α\nhs : s ∈ 𝒜\na : α\nha : ¬a ∈ s\n⊢ ∃ t, (∃ a, a ∈ 𝒜 ∧ aᶜ = t) ∧ ∃ a_1, a_1 ∈ t ∧ erase t a_1 = (insert a s)ᶜ\n[PROOFSTEP]\nexact ⟨sᶜ, ⟨s, hs, rfl⟩, a, mem_compl.2 ha, compl_insert.symm⟩\n[GOAL]\ncase a.mpr\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na : α\nk r : ℕ\ns : Finset α\n⊢ (∃ t, (∃ a, a ∈ 𝒜 ∧ aᶜ = t) ∧ ∃ a, a ∈ t ∧ erase t a = s) →\n    ∃ a, (∃ t, t ∈ 𝒜 ∧ ∃ a_1, ¬a_1 ∈ t ∧ insert a_1 t = a) ∧ aᶜ = s\n[PROOFSTEP]\nrintro ⟨_, ⟨s, hs, rfl⟩, a, ha, rfl⟩\n[GOAL]\ncase a.mpr.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\ns✝ t : Finset α\na✝ : α\nk r : ℕ\ns : Finset α\nhs : s ∈ 𝒜\na : α\nha : a ∈ sᶜ\n⊢ ∃ a_1, (∃ t, t ∈ 𝒜 ∧ ∃ a, ¬a ∈ t ∧ insert a t = a_1) ∧ a_1ᶜ = erase sᶜ a\n[PROOFSTEP]\nexact ⟨insert a s, ⟨s, hs, a, mem_compl.1 ha, rfl⟩, compl_insert⟩\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SetFamily.Shadow", "llama_tokens": 16667, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499941, "lm_q2_score": 0.6001883592602049, "lm_q1q2_score": 0.39727840481320426}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b a : α\nl : List α\n⊢ Nodup (a :: l) ↔ ¬a ∈ l ∧ Nodup l\n[PROOFSTEP]\nsimp only [Nodup, pairwise_cons, forall_mem_ne]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr✝ : α → α → Prop\na b : α\nr : α → β → Prop\nhr : Relator.BiUnique r\n⊢ (fun x x_1 => x ↔ x_1) (Nodup []) (Nodup [])\n[PROOFSTEP]\nsimp only [nodup_nil]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr✝ : α → α → Prop\na b : α\nr : α → β → Prop\nhr : Relator.BiUnique r\na✝ : α\nb✝ : β\nl₁✝ : List α\nl₂✝ : List β\nhab : r a✝ b✝\nh : Forall₂ r l₁✝ l₂✝\n⊢ (fun x x_1 => x ↔ x_1) (Nodup (a✝ :: l₁✝)) (Nodup (b✝ :: l₂✝))\n[PROOFSTEP]\nsimpa only [nodup_cons] using Relator.rel_and (Relator.rel_not (rel_mem hr hab h)) (rel_nodup hr h)\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\n⊢ (∀ (a : α), ¬[a, a] <+ l) → Nodup l\n[PROOFSTEP]\ninduction' l with a l IH\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\n⊢ (∀ (a : α), ¬[a, a] <+ []) → Nodup []\n[PROOFSTEP]\nintro h\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b a : α\nl : List α\nIH : (∀ (a : α), ¬[a, a] <+ l) → Nodup l\n⊢ (∀ (a_1 : α), ¬[a_1, a_1] <+ a :: l) → Nodup (a :: l)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\nh : ∀ (a : α), ¬[a, a] <+ []\n⊢ Nodup []\n[PROOFSTEP]\nexact nodup_nil\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b a : α\nl : List α\nIH : (∀ (a : α), ¬[a, a] <+ l) → Nodup l\nh : ∀ (a_1 : α), ¬[a_1, a_1] <+ a :: l\n⊢ Nodup (a :: l)\n[PROOFSTEP]\nexact (IH fun a s => h a <| sublist_cons_of_sublist _ s).cons fun al => h a <| (singleton_sublist.2 al).cons_cons _\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh : ∀ (i j : Fin (length l)), i < j → get l i ≠ get l j\ni j : Fin (length l)\nhg : get l i = get l j\n⊢ i = j\n[PROOFSTEP]\ncases' i with i hi\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh : ∀ (i j : Fin (length l)), i < j → get l i ≠ get l j\nj : Fin (length l)\ni : ℕ\nhi : i < length l\nhg : get l { val := i, isLt := hi } = get l j\n⊢ { val := i, isLt := hi } = j\n[PROOFSTEP]\ncases' j with j hj\n[GOAL]\ncase mk.mk\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh : ∀ (i j : Fin (length l)), i < j → get l i ≠ get l j\ni : ℕ\nhi : i < length l\nj : ℕ\nhj : j < length l\nhg : get l { val := i, isLt := hi } = get l { val := j, isLt := hj }\n⊢ { val := i, isLt := hi } = { val := j, isLt := hj }\n[PROOFSTEP]\nrcases lt_trichotomy i j with (hij | rfl | hji)\n[GOAL]\ncase mk.mk.inl\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh : ∀ (i j : Fin (length l)), i < j → get l i ≠ get l j\ni : ℕ\nhi : i < length l\nj : ℕ\nhj : j < length l\nhg : get l { val := i, isLt := hi } = get l { val := j, isLt := hj }\nhij : i < j\n⊢ { val := i, isLt := hi } = { val := j, isLt := hj }\n[PROOFSTEP]\nexact (h ⟨i, hi⟩ ⟨j, hj⟩ hij hg).elim\n[GOAL]\ncase mk.mk.inr.inl\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh : ∀ (i j : Fin (length l)), i < j → get l i ≠ get l j\ni : ℕ\nhi hj : i < length l\nhg : get l { val := i, isLt := hi } = get l { val := i, isLt := hj }\n⊢ { val := i, isLt := hi } = { val := i, isLt := hj }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.mk.inr.inr\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh : ∀ (i j : Fin (length l)), i < j → get l i ≠ get l j\ni : ℕ\nhi : i < length l\nj : ℕ\nhj : j < length l\nhg : get l { val := i, isLt := hi } = get l { val := j, isLt := hj }\nhji : j < i\n⊢ { val := i, isLt := hi } = { val := j, isLt := hj }\n[PROOFSTEP]\nexact (h ⟨j, hj⟩ ⟨i, hi⟩ hji hg.symm).elim\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh : Nodup l\ni j : ℕ\nhi : i < length l\nhj : j < length l\n⊢ i = j → nthLe l i hi = nthLe l j hj\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\n⊢ Nodup l ↔ ∀ (i j : ℕ), i < j → j < length l → get? l i ≠ get? l j\n[PROOFSTEP]\nrw [Nodup, pairwise_iff_get]\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\n⊢ (∀ (i j : Fin (length l)), i < j → get l i ≠ get l j) ↔ ∀ (i j : ℕ), i < j → j < length l → get? l i ≠ get? l j\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\n⊢ (∀ (i j : Fin (length l)), i < j → get l i ≠ get l j) → ∀ (i j : ℕ), i < j → j < length l → get? l i ≠ get? l j\n[PROOFSTEP]\nintro h i j hij hj\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh : ∀ (i j : Fin (length l)), i < j → get l i ≠ get l j\ni j : ℕ\nhij : i < j\nhj : j < length l\n⊢ get? l i ≠ get? l j\n[PROOFSTEP]\nrw [get?_eq_get (lt_trans hij hj), get?_eq_get hj, Ne.def, Option.some_inj]\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh : ∀ (i j : Fin (length l)), i < j → get l i ≠ get l j\ni j : ℕ\nhij : i < j\nhj : j < length l\n⊢ ¬get l { val := i, isLt := (_ : i < length l) } = get l { val := j, isLt := hj }\n[PROOFSTEP]\nexact h _ _ hij\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\n⊢ (∀ (i j : ℕ), i < j → j < length l → get? l i ≠ get? l j) → ∀ (i j : Fin (length l)), i < j → get l i ≠ get l j\n[PROOFSTEP]\nintro h i j hij\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh : ∀ (i j : ℕ), i < j → j < length l → get? l i ≠ get? l j\ni j : Fin (length l)\nhij : i < j\n⊢ get l i ≠ get l j\n[PROOFSTEP]\nrw [Ne.def, ← Option.some_inj, ← get?_eq_get, ← get?_eq_get]\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh : ∀ (i j : ℕ), i < j → j < length l → get? l i ≠ get? l j\ni j : Fin (length l)\nhij : i < j\n⊢ ¬get? l ↑i = get? l ↑j\n[PROOFSTEP]\nexact h i j hij j.2\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh : Nodup l\nx : α\n⊢ l ≠ [x] ↔ l = [] ∨ ∃ y, y ∈ l ∧ y ≠ x\n[PROOFSTEP]\ninduction' l with hd tl hl\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh✝ : Nodup l\nx : α\nh : Nodup []\n⊢ [] ≠ [x] ↔ [] = [] ∨ ∃ y, y ∈ [] ∧ y ≠ x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh✝ : Nodup l\nx hd : α\ntl : List α\nhl : Nodup tl → (tl ≠ [x] ↔ tl = [] ∨ ∃ y, y ∈ tl ∧ y ≠ x)\nh : Nodup (hd :: tl)\n⊢ hd :: tl ≠ [x] ↔ hd :: tl = [] ∨ ∃ y, y ∈ hd :: tl ∧ y ≠ x\n[PROOFSTEP]\nspecialize hl h.of_cons\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh✝ : Nodup l\nx hd : α\ntl : List α\nh : Nodup (hd :: tl)\nhl : tl ≠ [x] ↔ tl = [] ∨ ∃ y, y ∈ tl ∧ y ≠ x\n⊢ hd :: tl ≠ [x] ↔ hd :: tl = [] ∨ ∃ y, y ∈ hd :: tl ∧ y ≠ x\n[PROOFSTEP]\nby_cases hx : tl = [x]\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh✝ : Nodup l\nx hd : α\ntl : List α\nh : Nodup (hd :: tl)\nhl : tl ≠ [x] ↔ tl = [] ∨ ∃ y, y ∈ tl ∧ y ≠ x\nhx : tl = [x]\n⊢ hd :: tl ≠ [x] ↔ hd :: tl = [] ∨ ∃ y, y ∈ hd :: tl ∧ y ≠ x\n[PROOFSTEP]\nsimpa [hx, and_comm, and_or_left] using h\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh✝ : Nodup l\nx hd : α\ntl : List α\nh : Nodup (hd :: tl)\nhl : tl ≠ [x] ↔ tl = [] ∨ ∃ y, y ∈ tl ∧ y ≠ x\nhx : ¬tl = [x]\n⊢ hd :: tl ≠ [x] ↔ hd :: tl = [] ∨ ∃ y, y ∈ hd :: tl ∧ y ≠ x\n[PROOFSTEP]\nrw [← Ne.def, hl] at hx \n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh✝ : Nodup l\nx hd : α\ntl : List α\nh : Nodup (hd :: tl)\nhl : tl ≠ [x] ↔ tl = [] ∨ ∃ y, y ∈ tl ∧ y ≠ x\nhx : tl = [] ∨ ∃ y, y ∈ tl ∧ y ≠ x\n⊢ hd :: tl ≠ [x] ↔ hd :: tl = [] ∨ ∃ y, y ∈ hd :: tl ∧ y ≠ x\n[PROOFSTEP]\nrcases hx with (rfl | ⟨y, hy, hx⟩)\n[GOAL]\ncase neg.inl\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh✝ : Nodup l\nx hd : α\nh : Nodup [hd]\nhl : [] ≠ [x] ↔ [] = [] ∨ ∃ y, y ∈ [] ∧ y ≠ x\n⊢ [hd] ≠ [x] ↔ [hd] = [] ∨ ∃ y, y ∈ [hd] ∧ y ≠ x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.inr.intro.intro\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh✝ : Nodup l\nx hd : α\ntl : List α\nh : Nodup (hd :: tl)\nhl : tl ≠ [x] ↔ tl = [] ∨ ∃ y, y ∈ tl ∧ y ≠ x\ny : α\nhy : y ∈ tl\nhx : y ≠ x\n⊢ hd :: tl ≠ [x] ↔ hd :: tl = [] ∨ ∃ y, y ∈ hd :: tl ∧ y ≠ x\n[PROOFSTEP]\nsuffices ∃ (y : α) (_ : y ∈ hd :: tl), y ≠ x by simpa [ne_nil_of_mem hy]\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh✝ : Nodup l\nx hd : α\ntl : List α\nh : Nodup (hd :: tl)\nhl : tl ≠ [x] ↔ tl = [] ∨ ∃ y, y ∈ tl ∧ y ≠ x\ny : α\nhy : y ∈ tl\nhx : y ≠ x\nthis : ∃ y x_1, y ≠ x\n⊢ hd :: tl ≠ [x] ↔ hd :: tl = [] ∨ ∃ y, y ∈ hd :: tl ∧ y ≠ x\n[PROOFSTEP]\nsimpa [ne_nil_of_mem hy]\n[GOAL]\ncase neg.inr.intro.intro\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\nh✝ : Nodup l\nx hd : α\ntl : List α\nh : Nodup (hd :: tl)\nhl : tl ≠ [x] ↔ tl = [] ∨ ∃ y, y ∈ tl ∧ y ≠ x\ny : α\nhy : y ∈ tl\nhx : y ≠ x\n⊢ ∃ y x_1, y ≠ x\n[PROOFSTEP]\nexact ⟨y, mem_cons_of_mem _ hy, hx⟩\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\nxs : List α\nn m : Fin (length xs)\nh : get xs n = get xs m\nhne : n ≠ m\n⊢ ¬Nodup xs\n[PROOFSTEP]\nrw [nodup_iff_injective_get]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\nxs : List α\nn m : Fin (length xs)\nh : get xs n = get xs m\nhne : n ≠ m\n⊢ ¬Injective (get xs)\n[PROOFSTEP]\nexact fun hinj => hne (hinj h)\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\nxs : List α\nn m : ℕ\nhn : n < length xs\nhm : m < length xs\nh : nthLe xs n hn = nthLe xs m hm\nhne : n ≠ m\n⊢ ¬Nodup xs\n[PROOFSTEP]\nrw [nodup_iff_nthLe_inj]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\nxs : List α\nn m : ℕ\nhn : n < length xs\nhm : m < length xs\nh : nthLe xs n hn = nthLe xs m hm\nhne : n ≠ m\n⊢ ¬∀ (i j : ℕ) (h₁ : i < length xs) (h₂ : j < length xs), nthLe xs i h₁ = nthLe xs j h₂ → i = j\n[PROOFSTEP]\nsimp only [exists_prop, exists_and_right, not_forall]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\nxs : List α\nn m : ℕ\nhn : n < length xs\nhm : m < length xs\nh : nthLe xs n hn = nthLe xs m hm\nhne : n ≠ m\n⊢ ∃ x x_1, (∃ x_2 x_3, nthLe xs x (_ : x < length xs) = nthLe xs x_1 (_ : x_1 < length xs)) ∧ ¬x = x_1\n[PROOFSTEP]\nexact ⟨n, m, ⟨hn, hm, h⟩, hne⟩\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nl : List α\nH : Nodup l\ni : Fin (length l)\n⊢ get l { val := indexOf (get l i) l, isLt := (_ : indexOf (get l i) l < length l) } = get l i\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na✝ b a : α\n⊢ Nodup (replicate 0 a) ↔ 0 ≤ 1\n[PROOFSTEP]\nsimp [Nat.zero_le]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na✝ b a : α\n⊢ Nodup (replicate 1 a) ↔ 1 ≤ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b : α\ninst✝ : DecidableEq α\na : α\nl : List α\nd : Nodup l\n⊢ count a l = if a ∈ l then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b : α\ninst✝ : DecidableEq α\na : α\nl : List α\nd : Nodup l\nh : a ∈ l\n⊢ count a l = 1\n[PROOFSTEP]\nexact count_eq_one_of_mem d h\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b : α\ninst✝ : DecidableEq α\na : α\nl : List α\nd : Nodup l\nh : ¬a ∈ l\n⊢ count a l = 0\n[PROOFSTEP]\nexact count_eq_zero_of_not_mem h\n[GOAL]\nα : Type u\nβ : Type v\nl l₁✝ l₂✝ : List α\nr : α → α → Prop\na b : α\nl₁ l₂ : List α\n⊢ Nodup (l₁ ++ l₂) ↔ Nodup l₁ ∧ Nodup l₂ ∧ Disjoint l₁ l₂\n[PROOFSTEP]\nsimp only [Nodup, pairwise_append, disjoint_iff_ne]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁✝ l₂✝ : List α\nr : α → α → Prop\na b : α\nl₁ l₂ : List α\n⊢ Nodup (l₁ ++ l₂) ↔ Nodup (l₂ ++ l₁)\n[PROOFSTEP]\nsimp only [nodup_append, and_left_comm, disjoint_comm]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁✝ l₂✝ : List α\nr : α → α → Prop\na✝ b a : α\nl₁ l₂ : List α\n⊢ Nodup (l₁ ++ a :: l₂) ↔ Nodup (a :: (l₁ ++ l₂))\n[PROOFSTEP]\nsimp only [nodup_append, not_or, and_left_comm, and_assoc, nodup_cons, mem_append, disjoint_cons_right]\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nf : α → β\nl : List α\nd : Nodup (map f l)\n⊢ ∀ ⦃x : α⦄, x ∈ l → ∀ ⦃y : α⦄, y ∈ l → f x = f y → x = y\n[PROOFSTEP]\ninduction' l with hd tl ih\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nf : α → β\nl : List α\nd✝ : Nodup (map f l)\nd : Nodup (map f [])\n⊢ ∀ ⦃x : α⦄, x ∈ [] → ∀ ⦃y : α⦄, y ∈ [] → f x = f y → x = y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nf : α → β\nl : List α\nd✝ : Nodup (map f l)\nhd : α\ntl : List α\nih : Nodup (map f tl) → ∀ ⦃x : α⦄, x ∈ tl → ∀ ⦃y : α⦄, y ∈ tl → f x = f y → x = y\nd : Nodup (map f (hd :: tl))\n⊢ ∀ ⦃x : α⦄, x ∈ hd :: tl → ∀ ⦃y : α⦄, y ∈ hd :: tl → f x = f y → x = y\n[PROOFSTEP]\nsimp only [map, nodup_cons, mem_map, not_exists, not_and, ← Ne.def] at d \n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nf : α → β\nl : List α\nd✝ : Nodup (map f l)\nhd : α\ntl : List α\nih : Nodup (map f tl) → ∀ ⦃x : α⦄, x ∈ tl → ∀ ⦃y : α⦄, y ∈ tl → f x = f y → x = y\nd : (∀ (x : α), x ∈ tl → f x ≠ f hd) ∧ Nodup (map f tl)\n⊢ ∀ ⦃x : α⦄, x ∈ hd :: tl → ∀ ⦃y : α⦄, y ∈ hd :: tl → f x = f y → x = y\n[PROOFSTEP]\nsimp only [mem_cons]\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nf : α → β\nl : List α\nd✝ : Nodup (map f l)\nhd : α\ntl : List α\nih : Nodup (map f tl) → ∀ ⦃x : α⦄, x ∈ tl → ∀ ⦃y : α⦄, y ∈ tl → f x = f y → x = y\nd : (∀ (x : α), x ∈ tl → f x ≠ f hd) ∧ Nodup (map f tl)\n⊢ ∀ ⦃x : α⦄, x = hd ∨ x ∈ tl → ∀ ⦃y : α⦄, y = hd ∨ y ∈ tl → f x = f y → x = y\n[PROOFSTEP]\nrintro _ (rfl | h₁) _ (rfl | h₂) h₃\n[GOAL]\ncase cons.inl.inl\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nf : α → β\nl : List α\nd✝ : Nodup (map f l)\ntl : List α\nih : Nodup (map f tl) → ∀ ⦃x : α⦄, x ∈ tl → ∀ ⦃y : α⦄, y ∈ tl → f x = f y → x = y\ny✝ : α\nd : (∀ (x : α), x ∈ tl → f x ≠ f y✝) ∧ Nodup (map f tl)\nh₃ : f y✝ = f y✝\n⊢ y✝ = y✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons.inl.inr\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nf : α → β\nl : List α\nd✝ : Nodup (map f l)\ntl : List α\nih : Nodup (map f tl) → ∀ ⦃x : α⦄, x ∈ tl → ∀ ⦃y : α⦄, y ∈ tl → f x = f y → x = y\nx✝ : α\nd : (∀ (x : α), x ∈ tl → f x ≠ f x✝) ∧ Nodup (map f tl)\ny✝ : α\nh₂ : y✝ ∈ tl\nh₃ : f x✝ = f y✝\n⊢ x✝ = y✝\n[PROOFSTEP]\napply (d.1 _ h₂ h₃.symm).elim\n[GOAL]\ncase cons.inr.inl\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nf : α → β\nl : List α\nd✝ : Nodup (map f l)\ntl : List α\nih : Nodup (map f tl) → ∀ ⦃x : α⦄, x ∈ tl → ∀ ⦃y : α⦄, y ∈ tl → f x = f y → x = y\nx✝ : α\nh₁ : x✝ ∈ tl\ny✝ : α\nd : (∀ (x : α), x ∈ tl → f x ≠ f y✝) ∧ Nodup (map f tl)\nh₃ : f x✝ = f y✝\n⊢ x✝ = y✝\n[PROOFSTEP]\napply (d.1 _ h₁ h₃).elim\n[GOAL]\ncase cons.inr.inr\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nf : α → β\nl : List α\nd✝ : Nodup (map f l)\nhd : α\ntl : List α\nih : Nodup (map f tl) → ∀ ⦃x : α⦄, x ∈ tl → ∀ ⦃y : α⦄, y ∈ tl → f x = f y → x = y\nd : (∀ (x : α), x ∈ tl → f x ≠ f hd) ∧ Nodup (map f tl)\nx✝ : α\nh₁ : x✝ ∈ tl\ny✝ : α\nh₂ : y✝ ∈ tl\nh₃ : f x✝ = f y✝\n⊢ x✝ = y✝\n[PROOFSTEP]\napply ih d.2 h₁ h₂ h₃\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\nhf : ∀ (a : α) (ha : p a) (b : α) (hb : p b), f a ha = f b hb → a = b\nh : Nodup l\n⊢ Nodup (List.pmap f l H)\n[PROOFSTEP]\nrw [pmap_eq_map_attach]\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\nhf : ∀ (a : α) (ha : p a) (b : α) (hb : p b), f a ha = f b hb → a = b\nh : Nodup l\n⊢ Nodup (map (fun x => f ↑x (_ : p ↑x)) (List.attach l))\n[PROOFSTEP]\nexact h.attach.map fun ⟨a, ha⟩ ⟨b, hb⟩ h => by congr; exact hf a (H _ ha) b (H _ hb) h\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b✝ : α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\nhf : ∀ (a : α) (ha : p a) (b : α) (hb : p b), f a ha = f b hb → a = b\nh✝ : Nodup l\nx✝¹ x✝ : { x // x ∈ l }\na : α\nha : a ∈ l\nb : α\nhb : b ∈ l\nh :\n  f ↑{ val := a, property := ha } (_ : p ↑{ val := a, property := ha }) =\n    f ↑{ val := b, property := hb } (_ : p ↑{ val := b, property := hb })\n⊢ { val := a, property := ha } = { val := b, property := hb }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_val\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b✝ : α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\nhf : ∀ (a : α) (ha : p a) (b : α) (hb : p b), f a ha = f b hb → a = b\nh✝ : Nodup l\nx✝¹ x✝ : { x // x ∈ l }\na : α\nha : a ∈ l\nb : α\nhb : b ∈ l\nh :\n  f ↑{ val := a, property := ha } (_ : p ↑{ val := a, property := ha }) =\n    f ↑{ val := b, property := hb } (_ : p ↑{ val := b, property := hb })\n⊢ a = b\n[PROOFSTEP]\nexact hf a (H _ ha) b (H _ hb) h\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\np : α → Bool\nl : List α\n⊢ Nodup l → Nodup (List.filter p l)\n[PROOFSTEP]\nsimpa using Pairwise.filter (fun a ↦ p a)\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\nl : List α\n⊢ Pairwise (fun a b => b ≠ a) l ↔ Nodup l\n[PROOFSTEP]\nsimp only [Nodup, Ne.def, eq_comm]\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b : α\ninst✝ : DecidableEq α\nl : List α\nd : Nodup l\na : α\n⊢ List.erase l a = List.filter (fun x => decide (x ≠ a)) l\n[PROOFSTEP]\ninduction' d with b l m _ IH\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b : α\ninst✝ : DecidableEq α\nl : List α\na : α\n⊢ List.erase [] a = List.filter (fun x => decide (x ≠ a)) []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝¹ l₁ l₂ : List α\nr : α → α → Prop\na✝¹ b✝ : α\ninst✝ : DecidableEq α\nl✝ : List α\na b : α\nl : List α\nm : ∀ (a' : α), a' ∈ l → b ≠ a'\na✝ : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : List.erase l a = List.filter (fun x => decide (x ≠ a)) l\n⊢ List.erase (b :: l) a = List.filter (fun x => decide (x ≠ a)) (b :: l)\n[PROOFSTEP]\nby_cases h : b = a\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nl✝¹ l₁ l₂ : List α\nr : α → α → Prop\na✝¹ b✝ : α\ninst✝ : DecidableEq α\nl✝ : List α\na b : α\nl : List α\nm : ∀ (a' : α), a' ∈ l → b ≠ a'\na✝ : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : List.erase l a = List.filter (fun x => decide (x ≠ a)) l\nh : b = a\n⊢ List.erase (b :: l) a = List.filter (fun x => decide (x ≠ a)) (b :: l)\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nl✝¹ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nl✝ : List α\nb : α\nl : List α\nm : ∀ (a' : α), a' ∈ l → b ≠ a'\na✝ : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : List.erase l b = List.filter (fun x => decide (x ≠ b)) l\n⊢ List.erase (b :: l) b = List.filter (fun x => decide (x ≠ b)) (b :: l)\n[PROOFSTEP]\nrw [erase_cons_head, filter_cons_of_neg _ (by simp)]\n[GOAL]\nα : Type u\nβ : Type v\nl✝¹ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nl✝ : List α\nb : α\nl : List α\nm : ∀ (a' : α), a' ∈ l → b ≠ a'\na✝ : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : List.erase l b = List.filter (fun x => decide (x ≠ b)) l\n⊢ ¬decide (b ≠ b) = true\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nl✝¹ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nl✝ : List α\nb : α\nl : List α\nm : ∀ (a' : α), a' ∈ l → b ≠ a'\na✝ : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : List.erase l b = List.filter (fun x => decide (x ≠ b)) l\n⊢ l = List.filter (fun x => decide (x ≠ b)) l\n[PROOFSTEP]\nsymm\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nl✝¹ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nl✝ : List α\nb : α\nl : List α\nm : ∀ (a' : α), a' ∈ l → b ≠ a'\na✝ : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : List.erase l b = List.filter (fun x => decide (x ≠ b)) l\n⊢ List.filter (fun x => decide (x ≠ b)) l = l\n[PROOFSTEP]\nrw [filter_eq_self]\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nl✝¹ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nl✝ : List α\nb : α\nl : List α\nm : ∀ (a' : α), a' ∈ l → b ≠ a'\na✝ : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : List.erase l b = List.filter (fun x => decide (x ≠ b)) l\n⊢ ∀ (a : α), a ∈ l → decide (a ≠ b) = true\n[PROOFSTEP]\nsimpa [@eq_comm α] using m\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nl✝¹ l₁ l₂ : List α\nr : α → α → Prop\na✝¹ b✝ : α\ninst✝ : DecidableEq α\nl✝ : List α\na b : α\nl : List α\nm : ∀ (a' : α), a' ∈ l → b ≠ a'\na✝ : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : List.erase l a = List.filter (fun x => decide (x ≠ a)) l\nh : ¬b = a\n⊢ List.erase (b :: l) a = List.filter (fun x => decide (x ≠ a)) (b :: l)\n[PROOFSTEP]\nrw [erase_cons_tail _ h, filter_cons_of_pos, IH]\n[GOAL]\ncase neg.pa\nα : Type u\nβ : Type v\nl✝¹ l₁ l₂ : List α\nr : α → α → Prop\na✝¹ b✝ : α\ninst✝ : DecidableEq α\nl✝ : List α\na b : α\nl : List α\nm : ∀ (a' : α), a' ∈ l → b ≠ a'\na✝ : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : List.erase l a = List.filter (fun x => decide (x ≠ a)) l\nh : ¬b = a\n⊢ decide (b ≠ a) = true\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nd : Nodup l\n⊢ a ∈ List.erase l b ↔ a ≠ b ∧ a ∈ l\n[PROOFSTEP]\nrw [d.erase_eq_filter, mem_filter, and_comm, decide_eq_true_iff]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\nL : List (List α)\n⊢ Nodup (join L) ↔ (∀ (l : List α), l ∈ L → Nodup l) ∧ Pairwise Disjoint L\n[PROOFSTEP]\nsimp only [Nodup, pairwise_join, disjoint_left.symm, forall_mem_ne]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁✝ l₂ : List α\nr : α → α → Prop\na b : α\nl₁ : List α\nf : α → List β\n⊢ Nodup (List.bind l₁ f) ↔ (∀ (x : α), x ∈ l₁ → Nodup (f x)) ∧ Pairwise (fun a b => Disjoint (f a) (f b)) l₁\n[PROOFSTEP]\nsimp only [List.bind, nodup_join, pairwise_map, and_comm, and_left_comm, mem_map, exists_imp, and_imp]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁✝ l₂ : List α\nr : α → α → Prop\na b : α\nl₁ : List α\nf : α → List β\n⊢ (Pairwise (fun a b => Disjoint (f a) (f b)) l₁ ∧ ∀ (l : List β) (x : α), f x = l → x ∈ l₁ → Nodup l) ↔\n    Pairwise (fun a b => Disjoint (f a) (f b)) l₁ ∧ ∀ (x : α), x ∈ l₁ → Nodup (f x)\n[PROOFSTEP]\nrw [show (∀ (l : List β) (x : α), f x = l → x ∈ l₁ → Nodup l) ↔ ∀ x : α, x ∈ l₁ → Nodup (f x) from\n    forall_swap.trans <| forall_congr' fun _ => forall_eq']\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂✝ : List α\nr : α → α → Prop\na b : α\nl₂ : List β\nd₁ : Nodup l₁\nd₂ : Nodup l₂\na₁ a₂ : α\nn : a₁ ≠ a₂\nx : α × β\nh₁ : x ∈ map (Prod.mk a₁) l₂\nh₂ : x ∈ map (Prod.mk a₂) l₂\n⊢ False\n[PROOFSTEP]\nrcases mem_map.1 h₁ with ⟨b₁, _, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nl l₁ l₂✝ : List α\nr : α → α → Prop\na b : α\nl₂ : List β\nd₁ : Nodup l₁\nd₂ : Nodup l₂\na₁ a₂ : α\nn : a₁ ≠ a₂\nb₁ : β\nleft✝ : b₁ ∈ l₂\nh₁ : (a₁, b₁) ∈ map (Prod.mk a₁) l₂\nh₂ : (a₁, b₁) ∈ map (Prod.mk a₂) l₂\n⊢ False\n[PROOFSTEP]\nrcases mem_map.1 h₂ with ⟨b₂, mb₂, ⟨⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.refl\nα : Type u\nβ : Type v\nl l₁ l₂✝ : List α\nr : α → α → Prop\na b : α\nl₂ : List β\nd₁ : Nodup l₁\nd₂ : Nodup l₂\na₁ : α\nb₁ : β\nleft✝ : b₁ ∈ l₂\nh₁ : (a₁, b₁) ∈ map (Prod.mk a₁) l₂\nn : a₁ ≠ a₁\nh₂ : (a₁, b₁) ∈ map (Prod.mk a₁) l₂\nmb₂ : b₁ ∈ l₂\n⊢ False\n[PROOFSTEP]\nexact n rfl\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂✝ : List α\nr : α → α → Prop\na✝ b✝ : α\nσ : α → Type u_1\nl₂ : (a : α) → List (σ a)\nd₁ : Nodup l₁\nd₂ : ∀ (a : α), Nodup (l₂ a)\na : α\nx✝ : a ∈ l₁\nb b' : (fun a => σ a) a\nh : { fst := a, snd := b } = { fst := a, snd := b' }\n⊢ b = b'\n[PROOFSTEP]\ninjection h with _ h\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂✝ : List α\nr : α → α → Prop\na b : α\nσ : α → Type u_1\nl₂ : (a : α) → List (σ a)\nd₁ : Nodup l₁\nd₂ : ∀ (a : α), Nodup (l₂ a)\na₁ a₂ : α\nn : a₁ ≠ a₂\nx : (a : α) × σ a\nh₁ : x ∈ map (Sigma.mk a₁) (l₂ a₁)\nh₂ : x ∈ map (Sigma.mk a₂) (l₂ a₂)\n⊢ False\n[PROOFSTEP]\nrcases mem_map.1 h₁ with ⟨b₁, _, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nl l₁ l₂✝ : List α\nr : α → α → Prop\na b : α\nσ : α → Type u_1\nl₂ : (a : α) → List (σ a)\nd₁ : Nodup l₁\nd₂ : ∀ (a : α), Nodup (l₂ a)\na₁ a₂ : α\nn : a₁ ≠ a₂\nb₁ : σ a₁\nleft✝ : b₁ ∈ l₂ a₁\nh₁ : { fst := a₁, snd := b₁ } ∈ map (Sigma.mk a₁) (l₂ a₁)\nh₂ : { fst := a₁, snd := b₁ } ∈ map (Sigma.mk a₂) (l₂ a₂)\n⊢ False\n[PROOFSTEP]\nrcases mem_map.1 h₂ with ⟨b₂, mb₂, ⟨⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.refl\nα : Type u\nβ : Type v\nl l₁ l₂✝ : List α\nr : α → α → Prop\na b : α\nσ : α → Type u_1\nl₂ : (a : α) → List (σ a)\nd₁ : Nodup l₁\nd₂ : ∀ (a : α), Nodup (l₂ a)\na₁ : α\nb₁ : σ a₁\nleft✝ : b₁ ∈ l₂ a₁\nh₁ : { fst := a₁, snd := b₁ } ∈ map (Sigma.mk a₁) (l₂ a₁)\nn : a₁ ≠ a₁\nh₂ : { fst := a₁, snd := b₁ } ∈ map (Sigma.mk a₁) (l₂ a₁)\nmb₂ : b₁ ∈ l₂ a₁\n⊢ False\n[PROOFSTEP]\nexact n rfl\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na✝ b✝ : α\nf : α → Option β\nh : ∀ (a a' : α) (b : β), b ∈ f a → b ∈ f a' → a = a'\na a' : α\nn : a ≠ a'\nb : β\nbm : b ∈ f a\nb' : β\nbm' : b' ∈ f a'\ne : b = b'\n⊢ b' ∈ f a\n[PROOFSTEP]\nrw [← e]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na✝ b✝ : α\nf : α → Option β\nh : ∀ (a a' : α) (b : β), b ∈ f a → b ∈ f a' → a = a'\na a' : α\nn : a ≠ a'\nb : β\nbm : b ∈ f a\nb' : β\nbm' : b' ∈ f a'\ne : b = b'\n⊢ b ∈ f a\n[PROOFSTEP]\nexact bm\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\nh : ¬a ∈ l\nh' : Nodup l\n⊢ Nodup (concat l a)\n[PROOFSTEP]\nrw [concat_eq_append]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\nh : ¬a ∈ l\nh' : Nodup l\n⊢ Nodup (l ++ [a])\n[PROOFSTEP]\nexact h'.append (nodup_singleton _) (disjoint_singleton.2 h)\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nh : Nodup l\nh' : a ∈ l\n⊢ Nodup (List.insert a l)\n[PROOFSTEP]\nrw [insert_of_mem h']\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nh : Nodup l\nh' : a ∈ l\n⊢ Nodup l\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nh : Nodup l\nh' : ¬a ∈ l\n⊢ Nodup (List.insert a l)\n[PROOFSTEP]\nrw [insert_of_not_mem h', nodup_cons]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nh : Nodup l\nh' : ¬a ∈ l\n⊢ ¬a ∈ l ∧ Nodup l\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nh : Nodup l\nh' : ¬a ∈ l\n⊢ ¬a ∈ l\n[PROOFSTEP]\nassumption\n[GOAL]\ncase right\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nh : Nodup l\nh' : ¬a ∈ l\n⊢ Nodup l\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : Type v\nl l₁✝ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nl₁ : List α\nh : Nodup l₂\n⊢ Nodup (l₁ ∪ l₂)\n[PROOFSTEP]\ninduction' l₁ with a l₁ ih generalizing l₂\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nl l₁ l₂✝ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nh✝ : Nodup l₂✝\nl₂ : List α\nh : Nodup l₂\n⊢ Nodup ([] ∪ l₂)\n[PROOFSTEP]\nexact h\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl l₁✝ l₂✝ : List α\nr : α → α → Prop\na✝ b : α\ninst✝ : DecidableEq α\nh✝ : Nodup l₂✝\na : α\nl₁ : List α\nih : ∀ {l₂ : List α}, Nodup l₂ → Nodup (l₁ ∪ l₂)\nl₂ : List α\nh : Nodup l₂\n⊢ Nodup (a :: l₁ ∪ l₂)\n[PROOFSTEP]\nexact (ih h).insert\n[GOAL]\nα : Type u\nβ : Type v\nl l₁✝ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nl₁ : List α\nx✝ : Nodup l₁\n⊢ List.diff l₁ [] = List.filter (fun x => decide ¬x ∈ []) l₁\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nl l₁✝ l₂✝ : List α\nr : α → α → Prop\na✝ b : α\ninst✝ : DecidableEq α\nl₁ : List α\na : α\nl₂ : List α\nhl₁ : Nodup l₁\n⊢ List.diff l₁ (a :: l₂) = List.filter (fun x => decide ¬x ∈ a :: l₂) l₁\n[PROOFSTEP]\nrw [diff_cons, (hl₁.erase _).diff_eq_filter, hl₁.erase_eq_filter, filter_filter]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁✝ l₂✝ : List α\nr : α → α → Prop\na✝ b : α\ninst✝ : DecidableEq α\nl₁ : List α\na : α\nl₂ : List α\nhl₁ : Nodup l₁\n⊢ List.filter (fun a_1 => decide ((decide ¬a_1 ∈ l₂) = true ∧ decide (a_1 ≠ a) = true)) l₁ =\n    List.filter (fun x => decide ¬x ∈ a :: l₂) l₁\n[PROOFSTEP]\nsimp only [decide_not, Bool.not_eq_true', decide_eq_false_iff_not, ne_eq, and_comm, Bool.decide_and, find?, mem_cons,\n  not_or]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nhl₁ : Nodup l₁\n⊢ a ∈ List.diff l₁ l₂ ↔ a ∈ l₁ ∧ ¬a ∈ l₂\n[PROOFSTEP]\nrw [hl₁.diff_eq_filter, mem_filter, decide_eq_true_iff]\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nl : List α\nhl : Nodup l\nf : α → β\nx : α\ny : β\n⊢ map (update f x y) l = if x ∈ l then set (map f l) (indexOf x l) y else map f l\n[PROOFSTEP]\ninduction' l with hd tl ihl\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nl : List α\nhl✝ : Nodup l\nf : α → β\nx : α\ny : β\nhl : Nodup []\n⊢ map (update f x y) [] = if x ∈ [] then set (map f []) (indexOf x []) y else map f []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nl : List α\nhl✝ : Nodup l\nf : α → β\nx : α\ny : β\nhd : α\ntl : List α\nihl : Nodup tl → map (update f x y) tl = if x ∈ tl then set (map f tl) (indexOf x tl) y else map f tl\nhl : Nodup (hd :: tl)\n⊢ map (update f x y) (hd :: tl) =\n    if x ∈ hd :: tl then set (map f (hd :: tl)) (indexOf x (hd :: tl)) y else map f (hd :: tl)\n[PROOFSTEP]\nrw [nodup_cons] at hl \n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nl : List α\nhl✝ : Nodup l\nf : α → β\nx : α\ny : β\nhd : α\ntl : List α\nihl : Nodup tl → map (update f x y) tl = if x ∈ tl then set (map f tl) (indexOf x tl) y else map f tl\nhl : ¬hd ∈ tl ∧ Nodup tl\n⊢ map (update f x y) (hd :: tl) =\n    if x ∈ hd :: tl then set (map f (hd :: tl)) (indexOf x (hd :: tl)) y else map f (hd :: tl)\n[PROOFSTEP]\nsimp only [mem_cons, map, ihl hl.2]\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nl : List α\nhl✝ : Nodup l\nf : α → β\nx : α\ny : β\nhd : α\ntl : List α\nihl : Nodup tl → map (update f x y) tl = if x ∈ tl then set (map f tl) (indexOf x tl) y else map f tl\nhl : ¬hd ∈ tl ∧ Nodup tl\n⊢ (update f x y hd :: if x ∈ tl then set (map f tl) (indexOf x tl) y else map f tl) =\n    if x = hd ∨ x ∈ tl then set (f hd :: map f tl) (indexOf x (hd :: tl)) y else f hd :: map f tl\n[PROOFSTEP]\nby_cases H : hd = x\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nl : List α\nhl✝ : Nodup l\nf : α → β\nx : α\ny : β\nhd : α\ntl : List α\nihl : Nodup tl → map (update f x y) tl = if x ∈ tl then set (map f tl) (indexOf x tl) y else map f tl\nhl : ¬hd ∈ tl ∧ Nodup tl\nH : hd = x\n⊢ (update f x y hd :: if x ∈ tl then set (map f tl) (indexOf x tl) y else map f tl) =\n    if x = hd ∨ x ∈ tl then set (f hd :: map f tl) (indexOf x (hd :: tl)) y else f hd :: map f tl\n[PROOFSTEP]\nsubst hd\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nl : List α\nhl✝ : Nodup l\nf : α → β\nx : α\ny : β\ntl : List α\nihl : Nodup tl → map (update f x y) tl = if x ∈ tl then set (map f tl) (indexOf x tl) y else map f tl\nhl : ¬x ∈ tl ∧ Nodup tl\n⊢ (update f x y x :: if x ∈ tl then set (map f tl) (indexOf x tl) y else map f tl) =\n    if x = x ∨ x ∈ tl then set (f x :: map f tl) (indexOf x (x :: tl)) y else f x :: map f tl\n[PROOFSTEP]\nsimp [set, hl.1]\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nl : List α\nhl✝ : Nodup l\nf : α → β\nx : α\ny : β\nhd : α\ntl : List α\nihl : Nodup tl → map (update f x y) tl = if x ∈ tl then set (map f tl) (indexOf x tl) y else map f tl\nhl : ¬hd ∈ tl ∧ Nodup tl\nH : ¬hd = x\n⊢ (update f x y hd :: if x ∈ tl then set (map f tl) (indexOf x tl) y else map f tl) =\n    if x = hd ∨ x ∈ tl then set (f hd :: map f tl) (indexOf x (hd :: tl)) y else f hd :: map f tl\n[PROOFSTEP]\nsimp [Ne.symm H, H, set, ← apply_ite (cons (f hd))]\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr✝ : α → α → Prop\na b : α\nl : List α\nr : α → α → Prop\nhl : Nodup l\nh : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\n⊢ Pairwise r l\n[PROOFSTEP]\nclassical\nrefine' pairwise_of_reflexive_on_dupl_of_forall_ne _ h\nintro x hx\nrw [nodup_iff_count_le_one] at hl \nexact absurd (hl x) hx.not_le\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr✝ : α → α → Prop\na b : α\nl : List α\nr : α → α → Prop\nhl : Nodup l\nh : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\n⊢ Pairwise r l\n[PROOFSTEP]\nrefine' pairwise_of_reflexive_on_dupl_of_forall_ne _ h\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr✝ : α → α → Prop\na b : α\nl : List α\nr : α → α → Prop\nhl : Nodup l\nh : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\n⊢ ∀ (a : α), 1 < count a l → r a a\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr✝ : α → α → Prop\na b : α\nl : List α\nr : α → α → Prop\nhl : Nodup l\nh : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nx : α\nhx : 1 < count x l\n⊢ r x x\n[PROOFSTEP]\nrw [nodup_iff_count_le_one] at hl \n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr✝ : α → α → Prop\na b : α\nl : List α\nr : α → α → Prop\nhl✝ : Nodup l\nhl : ∀ (a : α), count a l ≤ 1\nh : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nx : α\nhx : 1 < count x l\n⊢ r x x\n[PROOFSTEP]\nexact absurd (hl x) hx.not_le\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : IsSymm α r\nhl : Nodup l\n⊢ Set.Pairwise {a | a ∈ l} r ↔ Pairwise r l\n[PROOFSTEP]\ninduction' l with a l ih\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : IsSymm α r\nhl✝ : Nodup l\nhl : Nodup []\n⊢ Set.Pairwise {a | a ∈ []} r ↔ Pairwise r []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b : α\ninst✝ : IsSymm α r\nhl✝ : Nodup l✝\na : α\nl : List α\nih : Nodup l → (Set.Pairwise {a | a ∈ l} r ↔ Pairwise r l)\nhl : Nodup (a :: l)\n⊢ Set.Pairwise {a_1 | a_1 ∈ a :: l} r ↔ Pairwise r (a :: l)\n[PROOFSTEP]\nrw [List.nodup_cons] at hl \n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b : α\ninst✝ : IsSymm α r\nhl✝ : Nodup l✝\na : α\nl : List α\nih : Nodup l → (Set.Pairwise {a | a ∈ l} r ↔ Pairwise r l)\nhl : ¬a ∈ l ∧ Nodup l\n⊢ Set.Pairwise {a_1 | a_1 ∈ a :: l} r ↔ Pairwise r (a :: l)\n[PROOFSTEP]\nhave : ∀ b ∈ l, ¬a = b → r a b ↔ r a b := fun b hb => imp_iff_right (ne_of_mem_of_not_mem hb hl.1).symm\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na✝ b : α\ninst✝ : IsSymm α r\nhl✝ : Nodup l✝\na : α\nl : List α\nih : Nodup l → (Set.Pairwise {a | a ∈ l} r ↔ Pairwise r l)\nhl : ¬a ∈ l ∧ Nodup l\nthis : ∀ (b : α), b ∈ l → (¬a = b → r a b ↔ r a b)\n⊢ Set.Pairwise {a_1 | a_1 ∈ a :: l} r ↔ Pairwise r (a :: l)\n[PROOFSTEP]\nsimp [Set.setOf_or, Set.pairwise_insert_of_symmetric (@symm_of _ r _), ih hl.2, and_comm, forall₂_congr this]\n[GOAL]\nα : Type u\nβ : Type v\nl l₁ l₂ : List α\nr : α → α → Prop\na b : α\ninst✝ : DecidableEq α\nn : ℕ\nx✝ : Nodup []\n⊢ take n [] = List.filter (fun x => decide (x ∈ take n [])) []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nb : α\nl : List α\nx✝ : Nodup (b :: l)\n⊢ take 0 (b :: l) = List.filter (fun x => decide (x ∈ take 0 (b :: l))) (b :: l)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nb : α\nl : List α\nn : ℕ\nhl : Nodup (b :: l)\n⊢ take (n + 1) (b :: l) = List.filter (fun x => decide (x ∈ take (n + 1) (b :: l))) (b :: l)\n[PROOFSTEP]\nrw [take_cons, Nodup.take_eq_filter_mem (Nodup.of_cons hl), List.filter_cons_of_pos _ (by simp)]\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nb : α\nl : List α\nn : ℕ\nhl : Nodup (b :: l)\n⊢ decide (b ∈ b :: List.filter (fun x => decide (x ∈ take n l)) l) = true\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nb : α\nl : List α\nn : ℕ\nhl : Nodup (b :: l)\n⊢ b :: List.filter (fun x => decide (x ∈ take n l)) l =\n    b :: List.filter (fun x => decide (x ∈ b :: List.filter (fun x => decide (x ∈ take n l)) l)) l\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_tail\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nb : α\nl : List α\nn : ℕ\nhl : Nodup (b :: l)\n⊢ List.filter (fun x => decide (x ∈ take n l)) l =\n    List.filter (fun x => decide (x ∈ b :: List.filter (fun x => decide (x ∈ take n l)) l)) l\n[PROOFSTEP]\nrefine' List.filter_congr' _\n[GOAL]\ncase e_tail\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nb : α\nl : List α\nn : ℕ\nhl : Nodup (b :: l)\n⊢ ∀ (x : α),\n    x ∈ l → (decide (x ∈ take n l) = true ↔ decide (x ∈ b :: List.filter (fun x => decide (x ∈ take n l)) l) = true)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase e_tail\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nb : α\nl : List α\nn : ℕ\nhl : Nodup (b :: l)\nx : α\nhx : x ∈ l\n⊢ decide (x ∈ take n l) = true ↔ decide (x ∈ b :: List.filter (fun x => decide (x ∈ take n l)) l) = true\n[PROOFSTEP]\nhave : x ≠ b := fun h => (nodup_cons.1 hl).1 (h ▸ hx)\n[GOAL]\ncase e_tail\nα : Type u\nβ : Type v\nl✝ l₁ l₂ : List α\nr : α → α → Prop\na b✝ : α\ninst✝ : DecidableEq α\nb : α\nl : List α\nn : ℕ\nhl : Nodup (b :: l)\nx : α\nhx : x ∈ l\nthis : x ≠ b\n⊢ decide (x ∈ take n l) = true ↔ decide (x ∈ b :: List.filter (fun x => decide (x ∈ take n l)) l) = true\n[PROOFSTEP]\nsimp (config := { contextual := true }) [List.mem_filter, this, hx]\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Nodup", "llama_tokens": 20286, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228625116081, "lm_q2_score": 0.600188359260205, "lm_q1q2_score": 0.3972783968076603}}
{"text": "[GOAL]\nE : Type u\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℂ E\nF : Type v\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℂ F\ninst✝ : CompleteSpace F\nR : ℝ\nc : ℂ\nf : ℂ → F\nhR : 0 < R\nhf : DiffContOnCl ℂ f (ball c R)\n⊢ deriv f c = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - c) ^ (-2) • f z\n[PROOFSTEP]\nlift R to ℝ≥0 using hR.le\n[GOAL]\ncase intro\nE : Type u\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℂ E\nF : Type v\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℂ F\ninst✝ : CompleteSpace F\nc : ℂ\nf : ℂ → F\nR : ℝ≥0\nhR : 0 < ↑R\nhf : DiffContOnCl ℂ f (ball c ↑R)\n⊢ deriv f c = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - c) ^ (-2) • f z\n[PROOFSTEP]\nrefine' (hf.hasFPowerSeriesOnBall hR).hasFPowerSeriesAt.deriv.trans _\n[GOAL]\ncase intro\nE : Type u\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℂ E\nF : Type v\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℂ F\ninst✝ : CompleteSpace F\nc : ℂ\nf : ℂ → F\nR : ℝ≥0\nhR : 0 < ↑R\nhf : DiffContOnCl ℂ f (ball c ↑R)\n⊢ (↑(cauchyPowerSeries f c (↑R) 1) fun x => 1) = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - c) ^ (-2) • f z\n[PROOFSTEP]\nsimp only [cauchyPowerSeries_apply, one_div, zpow_neg, pow_one, smul_smul, zpow_two, mul_inv]\n[GOAL]\nE : Type u\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℂ E\nF : Type v\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℂ F\ninst✝ : CompleteSpace F\nc : ℂ\nR C : ℝ\nf : ℂ → F\nhR : 0 < R\nhf : DiffContOnCl ℂ f (ball c R)\nhC : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\n⊢ ‖deriv f c‖ ≤ C / R\n[PROOFSTEP]\nhave : ∀ z ∈ sphere c R, ‖(z - c) ^ (-2 : ℤ) • f z‖ ≤ C / (R * R) := fun z (hz : abs (z - c) = R) => by\n  simpa [-mul_inv_rev, norm_smul, hz, zpow_two, ← div_eq_inv_mul] using (div_le_div_right (mul_pos hR hR)).2 (hC z hz)\n[GOAL]\nE : Type u\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℂ E\nF : Type v\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℂ F\ninst✝ : CompleteSpace F\nc : ℂ\nR C : ℝ\nf : ℂ → F\nhR : 0 < R\nhf : DiffContOnCl ℂ f (ball c R)\nhC : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nz : ℂ\nhz : ↑abs (z - c) = R\n⊢ ‖(z - c) ^ (-2) • f z‖ ≤ C / (R * R)\n[PROOFSTEP]\nsimpa [-mul_inv_rev, norm_smul, hz, zpow_two, ← div_eq_inv_mul] using (div_le_div_right (mul_pos hR hR)).2 (hC z hz)\n[GOAL]\nE : Type u\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℂ E\nF : Type v\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℂ F\ninst✝ : CompleteSpace F\nc : ℂ\nR C : ℝ\nf : ℂ → F\nhR : 0 < R\nhf : DiffContOnCl ℂ f (ball c R)\nhC : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nthis : ∀ (z : ℂ), z ∈ sphere c R → ‖(z - c) ^ (-2) • f z‖ ≤ C / (R * R)\n⊢ ‖deriv f c‖ ≤ C / R\n[PROOFSTEP]\ncalc\n  ‖deriv f c‖ = ‖(2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - c) ^ (-2 : ℤ) • f z‖ :=\n    congr_arg norm (deriv_eq_smul_circleIntegral hR hf)\n  _ ≤ R * (C / (R * R)) := (circleIntegral.norm_two_pi_i_inv_smul_integral_le_of_norm_le_const hR.le this)\n  _ = C / R := by rw [mul_div_left_comm, div_self_mul_self', div_eq_mul_inv]\n[GOAL]\nE : Type u\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℂ E\nF : Type v\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℂ F\ninst✝ : CompleteSpace F\nc : ℂ\nR C : ℝ\nf : ℂ → F\nhR : 0 < R\nhf : DiffContOnCl ℂ f (ball c R)\nhC : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nthis : ∀ (z : ℂ), z ∈ sphere c R → ‖(z - c) ^ (-2) • f z‖ ≤ C / (R * R)\n⊢ R * (C / (R * R)) = C / R\n[PROOFSTEP]\nrw [mul_div_left_comm, div_self_mul_self', div_eq_mul_inv]\n[GOAL]\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nc : ℂ\nR C : ℝ\nf : ℂ → F\nhR : 0 < R\nhd : DiffContOnCl ℂ f (ball c R)\nhC : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\n⊢ ‖deriv f c‖ ≤ C / R\n[PROOFSTEP]\nset e : F →L[ℂ] F̂ := UniformSpace.Completion.toComplL\n[GOAL]\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nc : ℂ\nR C : ℝ\nf : ℂ → F\nhR : 0 < R\nhd : DiffContOnCl ℂ f (ball c R)\nhC : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\ne : F →L[ℂ] F̂ := UniformSpace.Completion.toComplL\n⊢ ‖deriv f c‖ ≤ C / R\n[PROOFSTEP]\nhave : HasDerivAt (e ∘ f) (e (deriv f c)) c :=\n  e.hasFDerivAt.comp_hasDerivAt c (hd.differentiableAt isOpen_ball <| mem_ball_self hR).hasDerivAt\n[GOAL]\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nc : ℂ\nR C : ℝ\nf : ℂ → F\nhR : 0 < R\nhd : DiffContOnCl ℂ f (ball c R)\nhC : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\ne : F →L[ℂ] F̂ := UniformSpace.Completion.toComplL\nthis : HasDerivAt (↑e ∘ f) (↑e (deriv f c)) c\n⊢ ‖deriv f c‖ ≤ C / R\n[PROOFSTEP]\ncalc\n  ‖deriv f c‖ = ‖deriv (e ∘ f) c‖ := by\n    rw [this.deriv]\n    exact (UniformSpace.Completion.norm_coe _).symm\n  _ ≤ C / R :=\n    norm_deriv_le_aux hR (e.differentiable.comp_diffContOnCl hd) fun z hz =>\n      (UniformSpace.Completion.norm_coe _).trans_le (hC z hz)\n[GOAL]\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nc : ℂ\nR C : ℝ\nf : ℂ → F\nhR : 0 < R\nhd : DiffContOnCl ℂ f (ball c R)\nhC : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\ne : F →L[ℂ] F̂ := UniformSpace.Completion.toComplL\nthis : HasDerivAt (↑e ∘ f) (↑e (deriv f c)) c\n⊢ ‖deriv f c‖ = ‖deriv (↑e ∘ f) c‖\n[PROOFSTEP]\nrw [this.deriv]\n[GOAL]\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nc : ℂ\nR C : ℝ\nf : ℂ → F\nhR : 0 < R\nhd : DiffContOnCl ℂ f (ball c R)\nhC : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\ne : F →L[ℂ] F̂ := UniformSpace.Completion.toComplL\nthis : HasDerivAt (↑e ∘ f) (↑e (deriv f c)) c\n⊢ ‖deriv f c‖ = ‖↑e (deriv f c)‖\n[PROOFSTEP]\nexact (UniformSpace.Completion.norm_coe _).symm\n[GOAL]\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : ℂ → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nz w : ℂ\n⊢ f z = f w\n[PROOFSTEP]\nsuffices : ∀ c, deriv f c = 0\n[GOAL]\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : ℂ → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nz w : ℂ\nthis : ∀ (c : ℂ), deriv f c = 0\n⊢ f z = f w\ncase this\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : ℂ → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nz w : ℂ\n⊢ ∀ (c : ℂ), deriv f c = 0\n[PROOFSTEP]\nexact is_const_of_deriv_eq_zero hf this z w\n[GOAL]\ncase this\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : ℂ → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nz w : ℂ\n⊢ ∀ (c : ℂ), deriv f c = 0\n[PROOFSTEP]\nclear z w\n[GOAL]\ncase this\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : ℂ → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\n⊢ ∀ (c : ℂ), deriv f c = 0\n[PROOFSTEP]\nintro c\n[GOAL]\ncase this\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : ℂ → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nc : ℂ\n⊢ deriv f c = 0\n[PROOFSTEP]\nobtain ⟨C, C₀, hC⟩ : ∃ C > (0 : ℝ), ∀ z, ‖f z‖ ≤ C :=\n  by\n  rcases bounded_iff_forall_norm_le.1 hb with ⟨C, hC⟩\n  exact ⟨max C 1, lt_max_iff.2 (Or.inr zero_lt_one), fun z => (hC (f z) (mem_range_self _)).trans (le_max_left _ _)⟩\n[GOAL]\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : ℂ → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nc : ℂ\n⊢ ∃ C, C > 0 ∧ ∀ (z : ℂ), ‖f z‖ ≤ C\n[PROOFSTEP]\nrcases bounded_iff_forall_norm_le.1 hb with ⟨C, hC⟩\n[GOAL]\ncase intro\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : ℂ → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nc : ℂ\nC : ℝ\nhC : ∀ (x : F), x ∈ range f → ‖x‖ ≤ C\n⊢ ∃ C, C > 0 ∧ ∀ (z : ℂ), ‖f z‖ ≤ C\n[PROOFSTEP]\nexact ⟨max C 1, lt_max_iff.2 (Or.inr zero_lt_one), fun z => (hC (f z) (mem_range_self _)).trans (le_max_left _ _)⟩\n[GOAL]\ncase this.intro.intro\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : ℂ → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nc : ℂ\nC : ℝ\nC₀ : C > 0\nhC : ∀ (z : ℂ), ‖f z‖ ≤ C\n⊢ deriv f c = 0\n[PROOFSTEP]\nrefine' norm_le_zero_iff.1 (le_of_forall_le_of_dense fun ε ε₀ => _)\n[GOAL]\ncase this.intro.intro\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : ℂ → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nc : ℂ\nC : ℝ\nC₀ : C > 0\nhC : ∀ (z : ℂ), ‖f z‖ ≤ C\nε : ℝ\nε₀ : 0 < ε\n⊢ ‖deriv f c‖ ≤ ε\n[PROOFSTEP]\ncalc\n  ‖deriv f c‖ ≤ C / (C / ε) :=\n    norm_deriv_le_of_forall_mem_sphere_norm_le (div_pos C₀ ε₀) hf.diffContOnCl fun z _ => hC z\n  _ = ε := div_div_cancel' C₀.lt.ne'\n[GOAL]\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : E → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nz w : E\n⊢ f z = f w\n[PROOFSTEP]\nset g : ℂ → F := f ∘ fun t : ℂ => t • (w - z) + z\n[GOAL]\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : E → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nz w : E\ng : ℂ → F := f ∘ fun t => t • (w - z) + z\n⊢ f z = f w\n[PROOFSTEP]\nsuffices g 0 = g 1 by simpa\n[GOAL]\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : E → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nz w : E\ng : ℂ → F := f ∘ fun t => t • (w - z) + z\nthis : g 0 = g 1\n⊢ f z = f w\n[PROOFSTEP]\nsimpa\n[GOAL]\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : E → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nz w : E\ng : ℂ → F := f ∘ fun t => t • (w - z) + z\n⊢ g 0 = g 1\n[PROOFSTEP]\napply liouville_theorem_aux\n[GOAL]\ncase hf\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : E → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nz w : E\ng : ℂ → F := f ∘ fun t => t • (w - z) + z\n⊢ Differentiable ℂ g\ncase hb\nE : Type u\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\nF : Type v\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℂ F\nf : E → F\nhf : Differentiable ℂ f\nhb : Metric.Bounded (range f)\nz w : E\ng : ℂ → F := f ∘ fun t => t • (w - z) + z\n⊢ Metric.Bounded (range g)\n[PROOFSTEP]\nexacts [hf.comp ((differentiable_id.smul_const (w - z)).add_const z), hb.mono (range_comp_subset_range _ _)]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.Liouville", "llama_tokens": 5652, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.787931190663057, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.3970433889274398}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ¬restrict s i ≤ restrict 0 i\n⊢ MeasureTheory.SignedMeasure.ExistsOneDivLT s i (MeasureTheory.SignedMeasure.findExistsOneDivLT s i)\n[PROOFSTEP]\nrw [findExistsOneDivLT, dif_pos hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ¬restrict s i ≤ restrict 0 i\n⊢ MeasureTheory.SignedMeasure.ExistsOneDivLT s i (Nat.find (_ : ∃ n, MeasureTheory.SignedMeasure.ExistsOneDivLT s i n))\n[PROOFSTEP]\nconvert Nat.find_spec (existsNatOneDivLTMeasure_of_not_negative hi)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ¬restrict s i ≤ restrict 0 i\nm : ℕ\nhm : m < MeasureTheory.SignedMeasure.findExistsOneDivLT s i\n⊢ ¬MeasureTheory.SignedMeasure.ExistsOneDivLT s i m\n[PROOFSTEP]\nrw [findExistsOneDivLT, dif_pos hi] at hm \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ¬restrict s i ≤ restrict 0 i\nm : ℕ\nhm : m < Nat.find (_ : ∃ n, MeasureTheory.SignedMeasure.ExistsOneDivLT s i n)\n⊢ ¬MeasureTheory.SignedMeasure.ExistsOneDivLT s i m\n[PROOFSTEP]\nexact Nat.find_min _ hm\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ¬restrict s i ≤ restrict 0 i\n⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s i ⊆ i ∧\n    MeasurableSet (MeasureTheory.SignedMeasure.someExistsOneDivLT s i) ∧\n      1 / (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s i) + 1) <\n        ↑s (MeasureTheory.SignedMeasure.someExistsOneDivLT s i)\n[PROOFSTEP]\nrw [someExistsOneDivLT, dif_pos hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ¬restrict s i ≤ restrict 0 i\n⊢ Classical.choose\n        (_ : MeasureTheory.SignedMeasure.ExistsOneDivLT s i (MeasureTheory.SignedMeasure.findExistsOneDivLT s i)) ⊆\n      i ∧\n    MeasurableSet\n        (Classical.choose\n          (_ : MeasureTheory.SignedMeasure.ExistsOneDivLT s i (MeasureTheory.SignedMeasure.findExistsOneDivLT s i))) ∧\n      1 / (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s i) + 1) <\n        ↑s\n          (Classical.choose\n            (_ : MeasureTheory.SignedMeasure.ExistsOneDivLT s i (MeasureTheory.SignedMeasure.findExistsOneDivLT s i)))\n[PROOFSTEP]\nexact Classical.choose_spec (findExistsOneDivLT_spec hi)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\n⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s i ⊆ i\n[PROOFSTEP]\nby_cases hi : ¬s ≤[i] 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ¬restrict s i ≤ restrict 0 i\n⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s i ⊆ i\n[PROOFSTEP]\nexact\n  let ⟨h, _⟩ := someExistsOneDivLT_spec hi\n  h\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ¬¬restrict s i ≤ restrict 0 i\n⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s i ⊆ i\n[PROOFSTEP]\nrw [someExistsOneDivLT, dif_neg hi]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ¬¬restrict s i ≤ restrict 0 i\n⊢ ∅ ⊆ i\n[PROOFSTEP]\nexact Set.empty_subset _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\n⊢ MeasurableSet (MeasureTheory.SignedMeasure.someExistsOneDivLT s i)\n[PROOFSTEP]\nby_cases hi : ¬s ≤[i] 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ¬restrict s i ≤ restrict 0 i\n⊢ MeasurableSet (MeasureTheory.SignedMeasure.someExistsOneDivLT s i)\n[PROOFSTEP]\nexact\n  let ⟨_, h, _⟩ := someExistsOneDivLT_spec hi\n  h\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ¬¬restrict s i ≤ restrict 0 i\n⊢ MeasurableSet (MeasureTheory.SignedMeasure.someExistsOneDivLT s i)\n[PROOFSTEP]\nrw [someExistsOneDivLT, dif_neg hi]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ¬¬restrict s i ≤ restrict 0 i\n⊢ MeasurableSet ∅\n[PROOFSTEP]\nexact MeasurableSet.empty\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn : ℕ\n⊢ MeasureTheory.SignedMeasure.restrictNonposSeq s i (Nat.succ n) =\n    MeasureTheory.SignedMeasure.someExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n[PROOFSTEP]\nrw [restrictNonposSeq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn : ℕ\n⊢ MeasureTheory.SignedMeasure.restrictNonposSeq s i n ⊆ i\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\n⊢ MeasureTheory.SignedMeasure.restrictNonposSeq s i Nat.zero ⊆ i\n[PROOFSTEP]\nrw [restrictNonposSeq]\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\n⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s (i \\ ∅) ⊆ i\n[PROOFSTEP]\nexact someExistsOneDivLT_subset'\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn✝ : ℕ\n⊢ MeasureTheory.SignedMeasure.restrictNonposSeq s i (Nat.succ n✝) ⊆ i\n[PROOFSTEP]\nrw [restrictNonposSeq]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn✝ : ℕ\n⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s\n      (i \\\n        ⋃ (k : ℕ) (H : k ≤ n✝),\n          let_fun this := (_ : k < Nat.succ n✝);\n          MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ⊆\n    i\n[PROOFSTEP]\nexact someExistsOneDivLT_subset'\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ 1 /\n      (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s\n            (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)) +\n        1) <\n    ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i (Nat.succ n))\n[PROOFSTEP]\nrw [restrictNonposSeq_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ 1 /\n      (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s\n            (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)) +\n        1) <\n    ↑s\n      (MeasureTheory.SignedMeasure.someExistsOneDivLT s\n        (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k))\n[PROOFSTEP]\napply someExistsOneDivLT_lt hn\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ 0 < ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i n)\n[PROOFSTEP]\ncases n with\n| zero =>\n  rw [restrictNonposSeq]; rw [← @Set.diff_empty _ i] at hi₂ \n  rcases someExistsOneDivLT_spec hi₂ with ⟨_, _, h⟩\n  exact lt_trans Nat.one_div_pos_of_nat h\n| succ n =>\n  rw [restrictNonposSeq_succ]\n  have h₁ : ¬s ≤[i \\ ⋃ (k : ℕ) (_ : k ≤ n), restrictNonposSeq s i k] 0 :=\n    by\n    refine' mt (restrict_le_zero_subset _ _ (by simp [Nat.lt_succ_iff]; rfl)) hn\n    convert measurable_of_not_restrict_le_zero _ hn using 3\n    exact funext fun x => by rw [Nat.lt_succ_iff]\n  rcases someExistsOneDivLT_spec h₁ with ⟨_, _, h⟩\n  exact lt_trans Nat.one_div_pos_of_nat h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ 0 < ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i n)\n[PROOFSTEP]\ncases n with\n| zero =>\n  rw [restrictNonposSeq]; rw [← @Set.diff_empty _ i] at hi₂ \n  rcases someExistsOneDivLT_spec hi₂ with ⟨_, _, h⟩\n  exact lt_trans Nat.one_div_pos_of_nat h\n| succ n =>\n  rw [restrictNonposSeq_succ]\n  have h₁ : ¬s ≤[i \\ ⋃ (k : ℕ) (_ : k ≤ n), restrictNonposSeq s i k] 0 :=\n    by\n    refine' mt (restrict_le_zero_subset _ _ (by simp [Nat.lt_succ_iff]; rfl)) hn\n    convert measurable_of_not_restrict_le_zero _ hn using 3\n    exact funext fun x => by rw [Nat.lt_succ_iff]\n  rcases someExistsOneDivLT_spec h₁ with ⟨_, _, h⟩\n  exact lt_trans Nat.one_div_pos_of_nat h\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.zero), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.zero), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ 0 < ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i Nat.zero)\n[PROOFSTEP]\n\n| zero =>\n  rw [restrictNonposSeq]; rw [← @Set.diff_empty _ i] at hi₂ \n  rcases someExistsOneDivLT_spec hi₂ with ⟨_, _, h⟩\n  exact lt_trans Nat.one_div_pos_of_nat h\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.zero), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.zero), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ 0 < ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i Nat.zero)\n[PROOFSTEP]\nrw [restrictNonposSeq]\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.zero), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.zero), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ 0 < ↑s (MeasureTheory.SignedMeasure.someExistsOneDivLT s (i \\ ∅))\n[PROOFSTEP]\nrw [← @Set.diff_empty _ i] at hi₂ \n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s (i \\ ∅) ≤ restrict 0 (i \\ ∅)\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.zero), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.zero), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ 0 < ↑s (MeasureTheory.SignedMeasure.someExistsOneDivLT s (i \\ ∅))\n[PROOFSTEP]\nrcases someExistsOneDivLT_spec hi₂ with ⟨_, _, h⟩\n[GOAL]\ncase zero.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s (i \\ ∅) ≤ restrict 0 (i \\ ∅)\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.zero), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.zero), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nleft✝¹ : MeasureTheory.SignedMeasure.someExistsOneDivLT s (i \\ ∅) ⊆ i \\ ∅\nleft✝ : MeasurableSet (MeasureTheory.SignedMeasure.someExistsOneDivLT s (i \\ ∅))\nh :\n  1 / (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s (i \\ ∅)) + 1) <\n    ↑s (MeasureTheory.SignedMeasure.someExistsOneDivLT s (i \\ ∅))\n⊢ 0 < ↑s (MeasureTheory.SignedMeasure.someExistsOneDivLT s (i \\ ∅))\n[PROOFSTEP]\nexact lt_trans Nat.one_div_pos_of_nat h\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ 0 < ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i (Nat.succ n))\n[PROOFSTEP]\n\n| succ n =>\n  rw [restrictNonposSeq_succ]\n  have h₁ : ¬s ≤[i \\ ⋃ (k : ℕ) (_ : k ≤ n), restrictNonposSeq s i k] 0 :=\n    by\n    refine' mt (restrict_le_zero_subset _ _ (by simp [Nat.lt_succ_iff]; rfl)) hn\n    convert measurable_of_not_restrict_le_zero _ hn using 3\n    exact funext fun x => by rw [Nat.lt_succ_iff]\n  rcases someExistsOneDivLT_spec h₁ with ⟨_, _, h⟩\n  exact lt_trans Nat.one_div_pos_of_nat h\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ 0 < ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i (Nat.succ n))\n[PROOFSTEP]\nrw [restrictNonposSeq_succ]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ 0 <\n    ↑s\n      (MeasureTheory.SignedMeasure.someExistsOneDivLT s\n        (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k))\n[PROOFSTEP]\nhave h₁ : ¬s ≤[i \\ ⋃ (k : ℕ) (_ : k ≤ n), restrictNonposSeq s i k] 0 :=\n  by\n  refine' mt (restrict_le_zero_subset _ _ (by simp [Nat.lt_succ_iff]; rfl)) hn\n  convert measurable_of_not_restrict_le_zero _ hn using 3\n  exact funext fun x => by rw [Nat.lt_succ_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n[PROOFSTEP]\nrefine' mt (restrict_le_zero_subset _ _ (by simp [Nat.lt_succ_iff]; rfl)) hn\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k ⊆\n    i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k\n[PROOFSTEP]\nsimp [Nat.lt_succ_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k ⊆\n    i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ MeasurableSet (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n[PROOFSTEP]\nconvert measurable_of_not_restrict_le_zero _ hn using 3\n[GOAL]\ncase h.e'_3.h.e'_4.h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ (fun k => ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) = fun k =>\n    ⋃ (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k\n[PROOFSTEP]\nexact funext fun x => by rw [Nat.lt_succ_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nx : ℕ\n⊢ ⋃ (_ : x ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i x =\n    ⋃ (_ : x < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i x\n[PROOFSTEP]\nrw [Nat.lt_succ_iff]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nh₁ :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ 0 <\n    ↑s\n      (MeasureTheory.SignedMeasure.someExistsOneDivLT s\n        (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k))\n[PROOFSTEP]\nrcases someExistsOneDivLT_spec h₁ with ⟨_, _, h⟩\n[GOAL]\ncase succ.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₂ : ¬restrict s i ≤ restrict 0 i\nn : ℕ\nhn :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < Nat.succ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nh₁ :\n  ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nleft✝¹ :\n  MeasureTheory.SignedMeasure.someExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ⊆\n    i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k\nleft✝ :\n  MeasurableSet\n    (MeasureTheory.SignedMeasure.someExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k))\nh :\n  1 /\n      (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s\n            (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)) +\n        1) <\n    ↑s\n      (MeasureTheory.SignedMeasure.someExistsOneDivLT s\n        (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k))\n⊢ 0 <\n    ↑s\n      (MeasureTheory.SignedMeasure.someExistsOneDivLT s\n        (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k))\n[PROOFSTEP]\nexact lt_trans Nat.one_div_pos_of_nat h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn : ℕ\n⊢ MeasurableSet (MeasureTheory.SignedMeasure.restrictNonposSeq s i n)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\n⊢ MeasurableSet (MeasureTheory.SignedMeasure.restrictNonposSeq s i Nat.zero)\n[PROOFSTEP]\nrw [restrictNonposSeq]\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\n⊢ MeasurableSet (MeasureTheory.SignedMeasure.someExistsOneDivLT s (i \\ ∅))\n[PROOFSTEP]\nexact someExistsOneDivLT_measurableSet\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn✝ : ℕ\n⊢ MeasurableSet (MeasureTheory.SignedMeasure.restrictNonposSeq s i (Nat.succ n✝))\n[PROOFSTEP]\nrw [restrictNonposSeq]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn✝ : ℕ\n⊢ MeasurableSet\n    (MeasureTheory.SignedMeasure.someExistsOneDivLT s\n      (i \\\n        ⋃ (k : ℕ) (H : k ≤ n✝),\n          let_fun this := (_ : k < Nat.succ n✝);\n          MeasureTheory.SignedMeasure.restrictNonposSeq s i k))\n[PROOFSTEP]\nexact someExistsOneDivLT_measurableSet\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn m : ℕ\nh : n < m\n⊢ MeasureTheory.SignedMeasure.restrictNonposSeq s i n ∩ MeasureTheory.SignedMeasure.restrictNonposSeq s i m = ∅\n[PROOFSTEP]\nrw [Set.eq_empty_iff_forall_not_mem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn m : ℕ\nh : n < m\n⊢ ∀ (x : α),\n    ¬x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i n ∩ MeasureTheory.SignedMeasure.restrictNonposSeq s i m\n[PROOFSTEP]\nrintro x ⟨hx₁, hx₂⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn m : ℕ\nh : n < m\nx : α\nhx₁ : x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i n\nhx₂ : x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i m\n⊢ False\n[PROOFSTEP]\ncases m\n[GOAL]\ncase intro.zero\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn : ℕ\nx : α\nhx₁ : x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i n\nh : n < Nat.zero\nhx₂ : x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i Nat.zero\n⊢ False\n[PROOFSTEP]\nrw [Nat.zero_eq] at h \n[GOAL]\ncase intro.zero\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn : ℕ\nx : α\nhx₁ : x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i n\nh : n < 0\nhx₂ : x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i Nat.zero\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase intro.succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn : ℕ\nx : α\nhx₁ : x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i n\nn✝ : ℕ\nh : n < Nat.succ n✝\nhx₂ : x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i (Nat.succ n✝)\n⊢ False\n[PROOFSTEP]\nrw [restrictNonposSeq] at hx₂ \n[GOAL]\ncase intro.succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn : ℕ\nx : α\nhx₁ : x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i n\nn✝ : ℕ\nh : n < Nat.succ n✝\nhx₂ :\n  x ∈\n    MeasureTheory.SignedMeasure.someExistsOneDivLT s\n      (i \\\n        ⋃ (k : ℕ) (H : k ≤ n✝),\n          let_fun this := (_ : k < Nat.succ n✝);\n          MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ False\n[PROOFSTEP]\nexact (someExistsOneDivLT_subset hx₂).2 (Set.mem_iUnion.2 ⟨n, Set.mem_iUnion.2 ⟨Nat.lt_succ_iff.mp h, hx₁⟩⟩)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\n⊢ Pairwise (Disjoint on MeasureTheory.SignedMeasure.restrictNonposSeq s i)\n[PROOFSTEP]\nintro n m h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn m : ℕ\nh : n ≠ m\n⊢ (Disjoint on MeasureTheory.SignedMeasure.restrictNonposSeq s i) n m\n[PROOFSTEP]\nrw [Function.onFun, Set.disjoint_iff_inter_eq_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn m : ℕ\nh : n ≠ m\n⊢ MeasureTheory.SignedMeasure.restrictNonposSeq s i n ∩ MeasureTheory.SignedMeasure.restrictNonposSeq s i m = ∅\n[PROOFSTEP]\nrcases lt_or_gt_of_ne h with (h | h)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn m : ℕ\nh✝ : n ≠ m\nh : n < m\n⊢ MeasureTheory.SignedMeasure.restrictNonposSeq s i n ∩ MeasureTheory.SignedMeasure.restrictNonposSeq s i m = ∅\n[PROOFSTEP]\nrw [restrictNonposSeq_disjoint' h]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nn m : ℕ\nh✝ : n ≠ m\nh : n > m\n⊢ MeasureTheory.SignedMeasure.restrictNonposSeq s i n ∩ MeasureTheory.SignedMeasure.restrictNonposSeq s i m = ∅\n[PROOFSTEP]\nrw [Set.inter_comm, restrictNonposSeq_disjoint' h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nhn :\n  ¬∀ (n : ℕ),\n      ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n          restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nby_cases s ≤[i] 0\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nhn :\n  ¬∀ (n : ℕ),\n      ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n          restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nby_cases s ≤[i] 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nhn :\n  ¬∀ (n : ℕ),\n      ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n          restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh : restrict s i ≤ restrict 0 i\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nexact ⟨i, hi₁, Set.Subset.refl _, h, hi₂⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nhn :\n  ¬∀ (n : ℕ),\n      ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n          restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh : ¬restrict s i ≤ restrict 0 i\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\npush_neg at hn \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nset k := Nat.find hn\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nhave hk₂ : s ≤[i \\ ⋃ l < k, restrictNonposSeq s i l] 0 := Nat.find_spec hn\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nhave hmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), restrictNonposSeq s i l) :=\n  MeasurableSet.iUnion fun _ => MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nrefine' ⟨i \\ ⋃ l < k, restrictNonposSeq s i l, hi₁.diff hmeas, Set.diff_subset _ _, hk₂, _⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ↑s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) < 0\n[PROOFSTEP]\nrw [of_diff hmeas hi₁, s.of_disjoint_iUnion_nat]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ↑s i - ∑' (i_1 : ℕ), ↑s (⋃ (_ : i_1 < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1) < 0\n[PROOFSTEP]\nhave h₁ : ∀ l < k, 0 ≤ s (restrictNonposSeq s i l) := by\n  intro l hl\n  refine' le_of_lt (measure_of_restrictNonposSeq h _ _)\n  refine' mt (restrict_le_zero_subset _ (hi₁.diff _) (Set.Subset.refl _)) (Nat.find_min hn hl)\n  exact MeasurableSet.iUnion fun _ => MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nintro l hl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\nhl : l < k\n⊢ 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nrefine' le_of_lt (measure_of_restrictNonposSeq h _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\nhl : l < k\n⊢ ¬restrict s (i \\ ⋃ (k : ℕ) (_ : k < l), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤\n      restrict 0 (i \\ ⋃ (k : ℕ) (_ : k < l), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n[PROOFSTEP]\nrefine' mt (restrict_le_zero_subset _ (hi₁.diff _) (Set.Subset.refl _)) (Nat.find_min hn hl)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\nhl : l < k\n⊢ MeasurableSet (⋃ (k : ℕ) (_ : k < l), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n[PROOFSTEP]\nexact MeasurableSet.iUnion fun _ => MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ↑s i - ∑' (i_1 : ℕ), ↑s (⋃ (_ : i_1 < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1) < 0\n[PROOFSTEP]\nsuffices 0 ≤ ∑' l : ℕ, s (⋃ _ : l < k, restrictNonposSeq s i l)\n  by\n  rw [sub_neg]\n  exact lt_of_lt_of_le hi₂ this\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nthis : 0 ≤ ∑' (l : ℕ), ↑s (⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ↑s i - ∑' (i_1 : ℕ), ↑s (⋃ (_ : i_1 < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1) < 0\n[PROOFSTEP]\nrw [sub_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nthis : 0 ≤ ∑' (l : ℕ), ↑s (⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ↑s i < ∑' (i_1 : ℕ), ↑s (⋃ (_ : i_1 < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1)\n[PROOFSTEP]\nexact lt_of_lt_of_le hi₂ this\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ 0 ≤ ∑' (l : ℕ), ↑s (⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nrefine' tsum_nonneg _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∀ (i_1 : ℕ), 0 ≤ ↑s (⋃ (_ : i_1 < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1)\n[PROOFSTEP]\nintro l\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\n⊢ 0 ≤ ↑s (⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nby_cases l < k\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\n⊢ 0 ≤ ↑s (⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nby_cases l < k\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh✝ : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\nh : l < k\n⊢ 0 ≤ ↑s (⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nconvert h₁ _ h\n[GOAL]\ncase h.e'_4.h.e'_7\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh✝ : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\nh : l < k\n⊢ ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l =\n    MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_4.h.e'_7.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh✝ : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\nh : l < k\nx : α\n⊢ x ∈ ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l ↔\n    x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n[PROOFSTEP]\nrw [Set.mem_iUnion, exists_prop, and_iff_right_iff_imp]\n[GOAL]\ncase h.e'_4.h.e'_7.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh✝ : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\nh : l < k\nx : α\n⊢ x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i l → l < k\n[PROOFSTEP]\nexact fun _ => h\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh✝ : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\nh : ¬l < k\n⊢ 0 ≤ ↑s (⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nconvert le_of_eq s.empty.symm\n[GOAL]\ncase h.e'_4.h.e'_7\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh✝ : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\nh : ¬l < k\n⊢ ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_4.h.e'_7.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh✝ : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\nh : ¬l < k\nx✝ : α\n⊢ x✝ ∈ ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l ↔ x✝ ∈ ∅\n[PROOFSTEP]\nsimp only [exists_prop, Set.mem_empty_iff_false, Set.mem_iUnion, not_and, iff_false_iff]\n[GOAL]\ncase h.e'_4.h.e'_7.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh✝ : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ∀ (l : ℕ), l < k → 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nl : ℕ\nh : ¬l < k\nx✝ : α\n⊢ l < Nat.find hn → ¬x✝ ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n[PROOFSTEP]\nexact fun h' => False.elim (h h')\n[GOAL]\ncase neg.hf₁\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∀ (i_1 : ℕ), MeasurableSet (⋃ (_ : i_1 < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1)\n[PROOFSTEP]\nintro\n[GOAL]\ncase neg.hf₁\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\ni✝ : ℕ\n⊢ MeasurableSet (⋃ (_ : i✝ < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i i✝)\n[PROOFSTEP]\nexact MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _\n[GOAL]\ncase neg.hf₂\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ Pairwise (Disjoint on fun l => ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nintro a b hab\n[GOAL]\ncase neg.hf₂\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\na b : ℕ\nhab : a ≠ b\n⊢ (Disjoint on fun l => ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) a b\n[PROOFSTEP]\nrefine' Set.disjoint_iUnion_left.mpr fun _ => _\n[GOAL]\ncase neg.hf₂\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\na b : ℕ\nhab : a ≠ b\nx✝ : a < k\n⊢ Disjoint (MeasureTheory.SignedMeasure.restrictNonposSeq s i a)\n    ((fun l => ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) b)\n[PROOFSTEP]\nrefine' Set.disjoint_iUnion_right.mpr fun _ => _\n[GOAL]\ncase neg.hf₂\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\na b : ℕ\nhab : a ≠ b\nx✝¹ : a < k\nx✝ : b < k\n⊢ Disjoint (MeasureTheory.SignedMeasure.restrictNonposSeq s i a) (MeasureTheory.SignedMeasure.restrictNonposSeq s i b)\n[PROOFSTEP]\nexact restrictNonposSeq_disjoint hab\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l ⊆ i\n[PROOFSTEP]\napply Set.iUnion_subset\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∀ (i_1 : ℕ), ⋃ (_ : i_1 < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1 ⊆ i\n[PROOFSTEP]\nintro a x\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\na : ℕ\nx : α\n⊢ x ∈ ⋃ (_ : a < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i a → x ∈ i\n[PROOFSTEP]\nsimp only [and_imp, exists_prop, Set.mem_iUnion]\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\na : ℕ\nx : α\n⊢ a < Nat.find hn → x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i a → x ∈ i\n[PROOFSTEP]\nintro _ hx\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : ↑s i < 0\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∃ n,\n    restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nk : ℕ := Nat.find hn\nhk₂ :\n  restrict s (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n    restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nhmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\na : ℕ\nx : α\na✝ : a < Nat.find hn\nhx : x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i a\n⊢ x ∈ i\n[PROOFSTEP]\nexact restrictNonposSeq_subset _ hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nhave hi₁ : MeasurableSet i := by_contradiction fun h => ne_of_lt hi <| s.not_measurable h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nby_cases s ≤[i] 0\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nby_cases s ≤[i] 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : restrict s i ≤ restrict 0 i\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nexact ⟨i, hi₁, Set.Subset.refl _, h, hi⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nby_cases hn : ∀ n : ℕ, ¬s ≤[i \\ ⋃ l < n, restrictNonposSeq s i l] 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ¬∀ (n : ℕ),\n      ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n          restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ¬∀ (n : ℕ),\n      ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n          restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nexact exists_subset_restrict_nonpos' hi₁ hi hn\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nset A := i \\ ⋃ l, restrictNonposSeq s i l with hA\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nset bdd : ℕ → ℕ := fun n => findExistsOneDivLT s (i \\ ⋃ k ≤ n, restrictNonposSeq s i k)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nhave hn' : ∀ n : ℕ, ¬s ≤[i \\ ⋃ l ≤ n, restrictNonposSeq s i l] 0 :=\n  by\n  intro n\n  convert hn (n + 1) using 5 <;>\n    · ext l\n      simp only [exists_prop, Set.mem_iUnion, and_congr_left_iff]\n      exact fun _ => Nat.lt_succ_iff.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\n⊢ ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nn : ℕ\n⊢ ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n      restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nconvert hn (n + 1) using 5\n[GOAL]\ncase h.e'_1.h.e'_3.h.e'_7.h.e'_4.h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nn : ℕ\n⊢ (fun l => ⋃ (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) = fun l =>\n    ⋃ (_ : l < n + 1), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n[PROOFSTEP]\next l\n[GOAL]\ncase h.e'_1.h.e'_3.h.e'_7.h.e'_4.h.e'_3.h.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nn l : ℕ\nx✝ : α\n⊢ x✝ ∈ ⋃ (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l ↔\n    x✝ ∈ ⋃ (_ : l < n + 1), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n[PROOFSTEP]\nsimp only [exists_prop, Set.mem_iUnion, and_congr_left_iff]\n[GOAL]\ncase h.e'_1.h.e'_3.h.e'_7.h.e'_4.h.e'_3.h.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nn l : ℕ\nx✝ : α\n⊢ x✝ ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i l → (l ≤ n ↔ l < n + 1)\n[PROOFSTEP]\nexact fun _ => Nat.lt_succ_iff.symm\n[GOAL]\ncase h.e'_1.h.e'_4.h.e'_7.h.e'_4.h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nn : ℕ\n⊢ (fun l => ⋃ (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) = fun l =>\n    ⋃ (_ : l < n + 1), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n[PROOFSTEP]\next l\n[GOAL]\ncase h.e'_1.h.e'_4.h.e'_7.h.e'_4.h.e'_3.h.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nn l : ℕ\nx✝ : α\n⊢ x✝ ∈ ⋃ (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l ↔\n    x✝ ∈ ⋃ (_ : l < n + 1), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n[PROOFSTEP]\nsimp only [exists_prop, Set.mem_iUnion, and_congr_left_iff]\n[GOAL]\ncase h.e'_1.h.e'_4.h.e'_7.h.e'_4.h.e'_3.h.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nn l : ℕ\nx✝ : α\n⊢ x✝ ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i l → (l ≤ n ↔ l < n + 1)\n[PROOFSTEP]\nexact fun _ => Nat.lt_succ_iff.symm\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nhave h₁ : s i = s A + ∑' l, s (restrictNonposSeq s i l) :=\n  by\n  rw [hA, ← s.of_disjoint_iUnion_nat, add_comm, of_add_of_diff]\n  exact MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _\n  exacts [hi₁, Set.iUnion_subset fun _ => restrictNonposSeq_subset _, fun _ => restrictNonposSeq_measurableSet _,\n    restrictNonposSeq_disjoint]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nrw [hA, ← s.of_disjoint_iUnion_nat, add_comm, of_add_of_diff]\n[GOAL]\ncase hA\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ MeasurableSet (⋃ (i_1 : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1)\ncase hB\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ MeasurableSet i\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ⋃ (i_1 : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1 ⊆ i\ncase hf₁\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∀ (i_1 : ℕ), MeasurableSet (MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1)\ncase hf₂\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ Pairwise (Disjoint on fun l => MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nexact MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _\n[GOAL]\ncase hB\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ MeasurableSet i\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ⋃ (i_1 : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1 ⊆ i\ncase hf₁\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∀ (i_1 : ℕ), MeasurableSet (MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1)\ncase hf₂\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ Pairwise (Disjoint on fun l => MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nexacts [hi₁, Set.iUnion_subset fun _ => restrictNonposSeq_subset _, fun _ => restrictNonposSeq_measurableSet _,\n  restrictNonposSeq_disjoint]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nhave h₂ : s A ≤ s i := by\n  rw [h₁]\n  apply le_add_of_nonneg_right\n  exact tsum_nonneg fun n => le_of_lt (measure_of_restrictNonposSeq h _ (hn n))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ↑s A ≤ ↑s i\n[PROOFSTEP]\nrw [h₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ ↑s A ≤ ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\napply le_add_of_nonneg_right\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ 0 ≤ ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n[PROOFSTEP]\nexact tsum_nonneg fun n => le_of_lt (measure_of_restrictNonposSeq h _ (hn n))\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nhave h₃' : Summable fun n => (1 / (bdd n + 1) : ℝ) :=\n  by\n  have : Summable fun l => s (restrictNonposSeq s i l) :=\n    HasSum.summable (s.m_iUnion (fun _ => restrictNonposSeq_measurableSet _) restrictNonposSeq_disjoint)\n  refine' summable_of_nonneg_of_le (fun n => _) (fun n => _) (Summable.comp_injective this Nat.succ_injective)\n  · exact le_of_lt Nat.one_div_pos_of_nat\n  · exact le_of_lt (restrictNonposSeq_lt n (hn' n))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\n⊢ Summable fun n => 1 / (↑(bdd n) + 1)\n[PROOFSTEP]\nhave : Summable fun l => s (restrictNonposSeq s i l) :=\n  HasSum.summable (s.m_iUnion (fun _ => restrictNonposSeq_measurableSet _) restrictNonposSeq_disjoint)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nthis : Summable fun l => ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\n⊢ Summable fun n => 1 / (↑(bdd n) + 1)\n[PROOFSTEP]\nrefine' summable_of_nonneg_of_le (fun n => _) (fun n => _) (Summable.comp_injective this Nat.succ_injective)\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nthis : Summable fun l => ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nn : ℕ\n⊢ 0 ≤ 1 / (↑(bdd n) + 1)\n[PROOFSTEP]\nexact le_of_lt Nat.one_div_pos_of_nat\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nthis : Summable fun l => ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nn : ℕ\n⊢ 1 / (↑(bdd n) + 1) ≤ ((fun l => ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)) ∘ Nat.succ) n\n[PROOFSTEP]\nexact le_of_lt (restrictNonposSeq_lt n (hn' n))\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nhave h₃ : Tendsto (fun n => (bdd n : ℝ) + 1) atTop atTop :=\n  by\n  simp only [one_div] at h₃' \n  exact Summable.tendsto_atTop_of_pos h₃' fun n => Nat.cast_add_one_pos (bdd n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\n⊢ Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\n[PROOFSTEP]\nsimp only [one_div] at h₃' \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' :\n  Summable fun n =>\n    (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s\n            (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)) +\n        1)⁻¹\n⊢ Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\n[PROOFSTEP]\nexact Summable.tendsto_atTop_of_pos h₃' fun n => Nat.cast_add_one_pos (bdd n)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nhave h₄ : Tendsto (fun n => (bdd n : ℝ)) atTop atTop := by convert atTop.tendsto_atTop_add_const_right (-1) h₃; simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\n⊢ Tendsto (fun n => ↑(bdd n)) atTop atTop\n[PROOFSTEP]\nconvert atTop.tendsto_atTop_add_const_right (-1) h₃\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nx✝ : ℕ\n⊢ ↑(bdd x✝) = ↑(bdd x✝) + 1 + -1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nhave A_meas : MeasurableSet A := hi₁.diff (MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ restrict s j ≤ restrict 0 j ∧ ↑s j < 0\n[PROOFSTEP]\nrefine' ⟨A, A_meas, Set.diff_subset _ _, _, h₂.trans_lt hi⟩\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\n⊢ restrict s A ≤ restrict 0 A\n[PROOFSTEP]\nby_contra hnn\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nhnn : ¬restrict s A ≤ restrict 0 A\n⊢ False\n[PROOFSTEP]\nrw [restrict_le_restrict_iff _ _ A_meas] at hnn \n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nhnn : ¬∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ A → ↑s j ≤ ↑0 j\n⊢ False\n[PROOFSTEP]\npush_neg at hnn \n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nhnn :\n  Exists fun ⦃j⦄ =>\n    MeasurableSet j ∧ j ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l ∧ ↑0 j < ↑s j\n⊢ False\n[PROOFSTEP]\nobtain ⟨E, hE₁, hE₂, hE₃⟩ := hnn\n[GOAL]\ncase pos.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\n⊢ False\n[PROOFSTEP]\nhave : ∃ k, 1 ≤ bdd k ∧ 1 / (bdd k : ℝ) < s E :=\n  by\n  rw [tendsto_atTop_atTop] at h₄ \n  obtain ⟨k, hk⟩ := h₄ (max (1 / s E + 1) 1)\n  refine' ⟨k, _, _⟩\n  · have hle := le_of_max_le_right (hk k le_rfl)\n    norm_cast at hle \n  · have : 1 / s E < bdd k := by linarith only [le_of_max_le_left (hk k le_rfl)]\n    rw [one_div] at this ⊢\n    rwa [inv_lt (lt_trans (inv_pos.2 hE₃) this) hE₃]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\n⊢ ∃ k, 1 ≤ bdd k ∧ 1 / ↑(bdd k) < ↑s E\n[PROOFSTEP]\nrw [tendsto_atTop_atTop] at h₄ \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : ∀ (b : ℝ), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ ↑(bdd a)\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\n⊢ ∃ k, 1 ≤ bdd k ∧ 1 / ↑(bdd k) < ↑s E\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := h₄ (max (1 / s E + 1) 1)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : ∀ (b : ℝ), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ ↑(bdd a)\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk : ∀ (a : ℕ), k ≤ a → max (1 / ↑s E + 1) 1 ≤ ↑(bdd a)\n⊢ ∃ k, 1 ≤ bdd k ∧ 1 / ↑(bdd k) < ↑s E\n[PROOFSTEP]\nrefine' ⟨k, _, _⟩\n[GOAL]\ncase intro.refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : ∀ (b : ℝ), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ ↑(bdd a)\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk : ∀ (a : ℕ), k ≤ a → max (1 / ↑s E + 1) 1 ≤ ↑(bdd a)\n⊢ 1 ≤ bdd k\n[PROOFSTEP]\nhave hle := le_of_max_le_right (hk k le_rfl)\n[GOAL]\ncase intro.refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : ∀ (b : ℝ), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ ↑(bdd a)\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk : ∀ (a : ℕ), k ≤ a → max (1 / ↑s E + 1) 1 ≤ ↑(bdd a)\nhle : 1 ≤ ↑(bdd k)\n⊢ 1 ≤ bdd k\n[PROOFSTEP]\nnorm_cast at hle \n[GOAL]\ncase intro.refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : ∀ (b : ℝ), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ ↑(bdd a)\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk : ∀ (a : ℕ), k ≤ a → max (1 / ↑s E + 1) 1 ≤ ↑(bdd a)\n⊢ 1 / ↑(bdd k) < ↑s E\n[PROOFSTEP]\nhave : 1 / s E < bdd k := by linarith only [le_of_max_le_left (hk k le_rfl)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : ∀ (b : ℝ), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ ↑(bdd a)\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk : ∀ (a : ℕ), k ≤ a → max (1 / ↑s E + 1) 1 ≤ ↑(bdd a)\n⊢ 1 / ↑s E < ↑(bdd k)\n[PROOFSTEP]\nlinarith only [le_of_max_le_left (hk k le_rfl)]\n[GOAL]\ncase intro.refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : ∀ (b : ℝ), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ ↑(bdd a)\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk : ∀ (a : ℕ), k ≤ a → max (1 / ↑s E + 1) 1 ≤ ↑(bdd a)\nthis : 1 / ↑s E < ↑(bdd k)\n⊢ 1 / ↑(bdd k) < ↑s E\n[PROOFSTEP]\nrw [one_div] at this ⊢\n[GOAL]\ncase intro.refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : ∀ (b : ℝ), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ ↑(bdd a)\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk : ∀ (a : ℕ), k ≤ a → max (1 / ↑s E + 1) 1 ≤ ↑(bdd a)\nthis : (↑s E)⁻¹ < ↑(bdd k)\n⊢ (↑(bdd k))⁻¹ < ↑s E\n[PROOFSTEP]\nrwa [inv_lt (lt_trans (inv_pos.2 hE₃) this) hE₃]\n[GOAL]\ncase pos.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nthis : ∃ k, 1 ≤ bdd k ∧ 1 / ↑(bdd k) < ↑s E\n⊢ False\n[PROOFSTEP]\nobtain ⟨k, hk₁, hk₂⟩ := this\n[GOAL]\ncase pos.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk₁ : 1 ≤ bdd k\nhk₂ : 1 / ↑(bdd k) < ↑s E\n⊢ False\n[PROOFSTEP]\nhave hA' : A ⊆ i \\ ⋃ l ≤ k, restrictNonposSeq s i l :=\n  by\n  apply Set.diff_subset_diff_right\n  intro x; simp only [Set.mem_iUnion]\n  rintro ⟨n, _, hn₂⟩\n  exact ⟨n, hn₂⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk₁ : 1 ≤ bdd k\nhk₂ : 1 / ↑(bdd k) < ↑s E\n⊢ A ⊆ i \\ ⋃ (l : ℕ) (_ : l ≤ k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n[PROOFSTEP]\napply Set.diff_subset_diff_right\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk₁ : 1 ≤ bdd k\nhk₂ : 1 / ↑(bdd k) < ↑s E\n⊢ ⋃ (l : ℕ) (_ : l ≤ k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l ⊆\n    ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk₁ : 1 ≤ bdd k\nhk₂ : 1 / ↑(bdd k) < ↑s E\nx : α\n⊢ x ∈ ⋃ (l : ℕ) (_ : l ≤ k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l →\n    x ∈ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n[PROOFSTEP]\nsimp only [Set.mem_iUnion]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk₁ : 1 ≤ bdd k\nhk₂ : 1 / ↑(bdd k) < ↑s E\nx : α\n⊢ (∃ i_1 i_2, x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1) →\n    ∃ i_1, x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1\n[PROOFSTEP]\nrintro ⟨n, _, hn₂⟩\n[GOAL]\ncase h.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk₁ : 1 ≤ bdd k\nhk₂ : 1 / ↑(bdd k) < ↑s E\nx : α\nn : ℕ\nw✝ : n ≤ k\nhn₂ : x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i n\n⊢ ∃ i_1, x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1\n[PROOFSTEP]\nexact ⟨n, hn₂⟩\n[GOAL]\ncase pos.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk₁ : 1 ≤ bdd k\nhk₂ : 1 / ↑(bdd k) < ↑s E\nhA' : A ⊆ i \\ ⋃ (l : ℕ) (_ : l ≤ k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n⊢ False\n[PROOFSTEP]\nrefine' findExistsOneDivLT_min (hn' k) (Nat.sub_lt hk₁ Nat.zero_lt_one) ⟨E, Set.Subset.trans hE₂ hA', hE₁, _⟩\n[GOAL]\ncase pos.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk₁ : 1 ≤ bdd k\nhk₂ : 1 / ↑(bdd k) < ↑s E\nhA' : A ⊆ i \\ ⋃ (l : ℕ) (_ : l ≤ k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n⊢ 1 /\n      (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s\n              (i \\ ⋃ (l : ℕ) (_ : l ≤ k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) -\n            1) +\n        1) <\n    ↑s E\n[PROOFSTEP]\nconvert hk₂\n[GOAL]\ncase h.e'_3.h.e'_6\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk₁ : 1 ≤ bdd k\nhk₂ : 1 / ↑(bdd k) < ↑s E\nhA' : A ⊆ i \\ ⋃ (l : ℕ) (_ : l ≤ k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n⊢ ↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s\n            (i \\ ⋃ (l : ℕ) (_ : l ≤ k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) -\n          1) +\n      1 =\n    ↑(bdd k)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.e'_3.h.e'_6\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nhi : ↑s i < 0\nhi₁ : MeasurableSet i\nh : ¬restrict s i ≤ restrict 0 i\nhn :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nA : Set α := i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhA : A = i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nbdd : ℕ → ℕ :=\n  fun n =>\n    MeasureTheory.SignedMeasure.findExistsOneDivLT s\n      (i \\ ⋃ (k : ℕ) (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)\nhn' :\n  ∀ (n : ℕ),\n    ¬restrict s (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) ≤\n        restrict 0 (i \\ ⋃ (l : ℕ) (_ : l ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₁ : ↑s i = ↑s A + ∑' (l : ℕ), ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)\nh₂ : ↑s A ≤ ↑s i\nh₃' : Summable fun n => 1 / (↑(bdd n) + 1)\nh₃ : Tendsto (fun n => ↑(bdd n) + 1) atTop atTop\nh₄ : Tendsto (fun n => ↑(bdd n)) atTop atTop\nA_meas : MeasurableSet A\nE : Set α\nhE₁ : MeasurableSet E\nhE₂ : E ⊆ i \\ ⋃ (l : ℕ), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\nhE₃ : ↑0 E < ↑s E\nk : ℕ\nhk₁ : 1 ≤ bdd k\nhk₂ : 1 / ↑(bdd k) < ↑s E\nhA' : A ⊆ i \\ ⋃ (l : ℕ) (_ : l ≤ k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l\n⊢ MeasureTheory.SignedMeasure.findExistsOneDivLT s\n          (i \\ ⋃ (l : ℕ) (_ : l ≤ k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) -\n        1 +\n      1 =\n    bdd k\n[PROOFSTEP]\nexact tsub_add_cancel_of_le hk₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\n⊢ BddBelow (measureOfNegatives s)\n[PROOFSTEP]\nsimp_rw [BddBelow, Set.Nonempty, mem_lowerBounds]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\n⊢ ∃ x, ∀ (x_1 : ℝ), x_1 ∈ measureOfNegatives s → x ≤ x_1\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\n⊢ False\n[PROOFSTEP]\nhave h' : ∀ n : ℕ, ∃ y : ℝ, y ∈ s.measureOfNegatives ∧ y < -n := fun n => h (-n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nh' : ∀ (n : ℕ), ∃ y, y ∈ measureOfNegatives s ∧ y < -↑n\n⊢ False\n[PROOFSTEP]\nchoose f hf using h'\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\n⊢ False\n[PROOFSTEP]\nhave hf' : ∀ n : ℕ, ∃ B, MeasurableSet B ∧ s ≤[B] 0 ∧ s B < -n :=\n  by\n  intro n\n  rcases hf n with ⟨⟨B, ⟨hB₁, hBr⟩, hB₂⟩, hlt⟩\n  exact ⟨B, hB₁, hBr, hB₂.symm ▸ hlt⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\n⊢ ∀ (n : ℕ), ∃ B, MeasurableSet B ∧ restrict s B ≤ restrict 0 B ∧ ↑s B < -↑n\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nn : ℕ\n⊢ ∃ B, MeasurableSet B ∧ restrict s B ≤ restrict 0 B ∧ ↑s B < -↑n\n[PROOFSTEP]\nrcases hf n with ⟨⟨B, ⟨hB₁, hBr⟩, hB₂⟩, hlt⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nn : ℕ\nhlt : f n < -↑n\nB : Set α\nhB₂ : ↑s B = f n\nhB₁ : MeasurableSet B\nhBr : restrict s B ≤ restrict 0 B\n⊢ ∃ B, MeasurableSet B ∧ restrict s B ≤ restrict 0 B ∧ ↑s B < -↑n\n[PROOFSTEP]\nexact ⟨B, hB₁, hBr, hB₂.symm ▸ hlt⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nhf' : ∀ (n : ℕ), ∃ B, MeasurableSet B ∧ restrict s B ≤ restrict 0 B ∧ ↑s B < -↑n\n⊢ False\n[PROOFSTEP]\nchoose B hmeas hr h_lt using hf'\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nB : ℕ → Set α\nhmeas : ∀ (n : ℕ), MeasurableSet (B n)\nhr : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nh_lt : ∀ (n : ℕ), ↑s (B n) < -↑n\n⊢ False\n[PROOFSTEP]\nset A := ⋃ n, B n with hA\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nB : ℕ → Set α\nhmeas : ∀ (n : ℕ), MeasurableSet (B n)\nhr : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nh_lt : ∀ (n : ℕ), ↑s (B n) < -↑n\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\n⊢ False\n[PROOFSTEP]\nhave hfalse : ∀ n : ℕ, s A ≤ -n := by\n  intro n\n  refine' le_trans _ (le_of_lt (h_lt _))\n  rw [hA, ← Set.diff_union_of_subset (Set.subset_iUnion _ n), of_union Set.disjoint_sdiff_left _ (hmeas n)]\n  · refine' add_le_of_nonpos_left _\n    have : s ≤[A] 0 := restrict_le_restrict_iUnion _ _ hmeas hr\n    refine' nonpos_of_restrict_le_zero _ (restrict_le_zero_subset _ _ (Set.diff_subset _ _) this)\n    exact MeasurableSet.iUnion hmeas\n  · exact (MeasurableSet.iUnion hmeas).diff (hmeas n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nB : ℕ → Set α\nhmeas : ∀ (n : ℕ), MeasurableSet (B n)\nhr : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nh_lt : ∀ (n : ℕ), ↑s (B n) < -↑n\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\n⊢ ∀ (n : ℕ), ↑s A ≤ -↑n\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nB : ℕ → Set α\nhmeas : ∀ (n : ℕ), MeasurableSet (B n)\nhr : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nh_lt : ∀ (n : ℕ), ↑s (B n) < -↑n\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nn : ℕ\n⊢ ↑s A ≤ -↑n\n[PROOFSTEP]\nrefine' le_trans _ (le_of_lt (h_lt _))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nB : ℕ → Set α\nhmeas : ∀ (n : ℕ), MeasurableSet (B n)\nhr : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nh_lt : ∀ (n : ℕ), ↑s (B n) < -↑n\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nn : ℕ\n⊢ ↑s A ≤ ↑s (B n)\n[PROOFSTEP]\nrw [hA, ← Set.diff_union_of_subset (Set.subset_iUnion _ n), of_union Set.disjoint_sdiff_left _ (hmeas n)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nB : ℕ → Set α\nhmeas : ∀ (n : ℕ), MeasurableSet (B n)\nhr : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nh_lt : ∀ (n : ℕ), ↑s (B n) < -↑n\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nn : ℕ\n⊢ ↑s ((⋃ (i : ℕ), B i) \\ B n) + ↑s (B n) ≤ ↑s (B n)\n[PROOFSTEP]\nrefine' add_le_of_nonpos_left _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nB : ℕ → Set α\nhmeas : ∀ (n : ℕ), MeasurableSet (B n)\nhr : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nh_lt : ∀ (n : ℕ), ↑s (B n) < -↑n\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nn : ℕ\n⊢ ↑s ((⋃ (i : ℕ), B i) \\ B n) ≤ 0\n[PROOFSTEP]\nhave : s ≤[A] 0 := restrict_le_restrict_iUnion _ _ hmeas hr\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nB : ℕ → Set α\nhmeas : ∀ (n : ℕ), MeasurableSet (B n)\nhr : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nh_lt : ∀ (n : ℕ), ↑s (B n) < -↑n\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nn : ℕ\nthis : restrict s A ≤ restrict 0 A\n⊢ ↑s ((⋃ (i : ℕ), B i) \\ B n) ≤ 0\n[PROOFSTEP]\nrefine' nonpos_of_restrict_le_zero _ (restrict_le_zero_subset _ _ (Set.diff_subset _ _) this)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nB : ℕ → Set α\nhmeas : ∀ (n : ℕ), MeasurableSet (B n)\nhr : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nh_lt : ∀ (n : ℕ), ↑s (B n) < -↑n\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nn : ℕ\nthis : restrict s A ≤ restrict 0 A\n⊢ MeasurableSet (⋃ (i : ℕ), B i)\n[PROOFSTEP]\nexact MeasurableSet.iUnion hmeas\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nB : ℕ → Set α\nhmeas : ∀ (n : ℕ), MeasurableSet (B n)\nhr : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nh_lt : ∀ (n : ℕ), ↑s (B n) < -↑n\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nn : ℕ\n⊢ MeasurableSet ((⋃ (i : ℕ), B i) \\ B n)\n[PROOFSTEP]\nexact (MeasurableSet.iUnion hmeas).diff (hmeas n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nB : ℕ → Set α\nhmeas : ∀ (n : ℕ), MeasurableSet (B n)\nhr : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nh_lt : ∀ (n : ℕ), ↑s (B n) < -↑n\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhfalse : ∀ (n : ℕ), ↑s A ≤ -↑n\n⊢ False\n[PROOFSTEP]\nrcases exists_nat_gt (-s A) with ⟨n, hn⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns : SignedMeasure α\ni j : Set α\nh : ∀ (x : ℝ), ∃ x_1, x_1 ∈ measureOfNegatives s ∧ x_1 < x\nf : ℕ → ℝ\nhf : ∀ (n : ℕ), f n ∈ measureOfNegatives s ∧ f n < -↑n\nB : ℕ → Set α\nhmeas : ∀ (n : ℕ), MeasurableSet (B n)\nhr : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nh_lt : ∀ (n : ℕ), ↑s (B n) < -↑n\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhfalse : ∀ (n : ℕ), ↑s A ≤ -↑n\nn : ℕ\nhn : -↑s A < ↑n\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ ((neg_lt.1 hn).trans_le (hfalse n))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\n⊢ ∃ i, MeasurableSet i ∧ restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\n[PROOFSTEP]\nobtain ⟨f, _, hf₂, hf₁⟩ := exists_seq_tendsto_sInf ⟨0, @zero_mem_measureOfNegatives _ _ s⟩ bddBelow_measureOfNegatives\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nhf₁ : ∀ (n : ℕ), f n ∈ measureOfNegatives s\n⊢ ∃ i, MeasurableSet i ∧ restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\n[PROOFSTEP]\nchoose B hB using hf₁\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\n⊢ ∃ i, MeasurableSet i ∧ restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\n[PROOFSTEP]\nhave hB₁ : ∀ n, MeasurableSet (B n) := fun n => (hB n).1.1\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\n⊢ ∃ i, MeasurableSet i ∧ restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\n[PROOFSTEP]\nhave hB₂ : ∀ n, s ≤[B n] 0 := fun n => (hB n).1.2\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\n⊢ ∃ i, MeasurableSet i ∧ restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\n[PROOFSTEP]\nset A := ⋃ n, B n with hA\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\n⊢ ∃ i, MeasurableSet i ∧ restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\n[PROOFSTEP]\nhave hA₁ : MeasurableSet A := MeasurableSet.iUnion hB₁\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\n⊢ ∃ i, MeasurableSet i ∧ restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\n[PROOFSTEP]\nhave hA₂ : s ≤[A] 0 := restrict_le_restrict_iUnion _ _ hB₁ hB₂\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\n⊢ ∃ i, MeasurableSet i ∧ restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\n[PROOFSTEP]\nhave hA₃ : s A = sInf s.measureOfNegatives := by\n  apply le_antisymm\n  · refine' le_of_tendsto_of_tendsto tendsto_const_nhds hf₂ (eventually_of_forall fun n => _)\n    rw [← (hB n).2, hA, ← Set.diff_union_of_subset (Set.subset_iUnion _ n), of_union Set.disjoint_sdiff_left _ (hB₁ n)]\n    · refine' add_le_of_nonpos_left _\n      have : s ≤[A] 0 :=\n        restrict_le_restrict_iUnion _ _ hB₁ fun m =>\n          let ⟨_, h⟩ := (hB m).1\n          h\n      refine' nonpos_of_restrict_le_zero _ (restrict_le_zero_subset _ _ (Set.diff_subset _ _) this)\n      exact MeasurableSet.iUnion hB₁\n    · exact (MeasurableSet.iUnion hB₁).diff (hB₁ n)\n  · exact csInf_le bddBelow_measureOfNegatives ⟨A, ⟨hA₁, hA₂⟩, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\n⊢ ↑s A = sInf (measureOfNegatives s)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\n⊢ ↑s A ≤ sInf (measureOfNegatives s)\n[PROOFSTEP]\nrefine' le_of_tendsto_of_tendsto tendsto_const_nhds hf₂ (eventually_of_forall fun n => _)\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nn : ℕ\n⊢ (fun x => ↑s A) n ≤ f n\n[PROOFSTEP]\nrw [← (hB n).2, hA, ← Set.diff_union_of_subset (Set.subset_iUnion _ n), of_union Set.disjoint_sdiff_left _ (hB₁ n)]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nn : ℕ\n⊢ (fun x => ↑s ((⋃ (i : ℕ), B i) \\ B n) + ↑s (B n)) n ≤ ↑s (B n)\n[PROOFSTEP]\nrefine' add_le_of_nonpos_left _\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nn : ℕ\n⊢ ↑s ((⋃ (i : ℕ), B i) \\ B n) ≤ 0\n[PROOFSTEP]\nhave : s ≤[A] 0 :=\n  restrict_le_restrict_iUnion _ _ hB₁ fun m =>\n    let ⟨_, h⟩ := (hB m).1\n    h\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nn : ℕ\nthis : restrict s A ≤ restrict 0 A\n⊢ ↑s ((⋃ (i : ℕ), B i) \\ B n) ≤ 0\n[PROOFSTEP]\nrefine' nonpos_of_restrict_le_zero _ (restrict_le_zero_subset _ _ (Set.diff_subset _ _) this)\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nn : ℕ\nthis : restrict s A ≤ restrict 0 A\n⊢ MeasurableSet (⋃ (i : ℕ), B i)\n[PROOFSTEP]\nexact MeasurableSet.iUnion hB₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nn : ℕ\n⊢ MeasurableSet ((⋃ (i : ℕ), B i) \\ B n)\n[PROOFSTEP]\nexact (MeasurableSet.iUnion hB₁).diff (hB₁ n)\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\n⊢ sInf (measureOfNegatives s) ≤ ↑s A\n[PROOFSTEP]\nexact csInf_le bddBelow_measureOfNegatives ⟨A, ⟨hA₁, hA₂⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nhA₃ : ↑s A = sInf (measureOfNegatives s)\n⊢ ∃ i, MeasurableSet i ∧ restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\n[PROOFSTEP]\nrefine' ⟨Aᶜ, hA₁.compl, _, (compl_compl A).symm ▸ hA₂⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nhA₃ : ↑s A = sInf (measureOfNegatives s)\n⊢ restrict 0 Aᶜ ≤ restrict s Aᶜ\n[PROOFSTEP]\nrw [restrict_le_restrict_iff _ _ hA₁.compl]\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nhA₃ : ↑s A = sInf (measureOfNegatives s)\n⊢ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ Aᶜ → ↑0 j ≤ ↑s j\n[PROOFSTEP]\nintro C _ hC₁\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nhA₃ : ↑s A = sInf (measureOfNegatives s)\nC : Set α\na✝ : MeasurableSet C\nhC₁ : C ⊆ Aᶜ\n⊢ ↑0 C ≤ ↑s C\n[PROOFSTEP]\nby_contra' hC₂\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nhA₃ : ↑s A = sInf (measureOfNegatives s)\nC : Set α\na✝ : MeasurableSet C\nhC₁ : C ⊆ Aᶜ\nhC₂ : ↑s C < ↑0 C\n⊢ False\n[PROOFSTEP]\nrcases exists_subset_restrict_nonpos hC₂ with ⟨D, hD₁, hD, hD₂, hD₃⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nhA₃ : ↑s A = sInf (measureOfNegatives s)\nC : Set α\na✝ : MeasurableSet C\nhC₁ : C ⊆ Aᶜ\nhC₂ : ↑s C < ↑0 C\nD : Set α\nhD₁ : MeasurableSet D\nhD : D ⊆ C\nhD₂ : restrict s D ≤ restrict 0 D\nhD₃ : ↑s D < 0\n⊢ False\n[PROOFSTEP]\nhave : s (A ∪ D) < sInf s.measureOfNegatives :=\n  by\n  rw [← hA₃, of_union (Set.disjoint_of_subset_right (Set.Subset.trans hD hC₁) disjoint_compl_right) hA₁ hD₁]\n  linarith\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nhA₃ : ↑s A = sInf (measureOfNegatives s)\nC : Set α\na✝ : MeasurableSet C\nhC₁ : C ⊆ Aᶜ\nhC₂ : ↑s C < ↑0 C\nD : Set α\nhD₁ : MeasurableSet D\nhD : D ⊆ C\nhD₂ : restrict s D ≤ restrict 0 D\nhD₃ : ↑s D < 0\n⊢ ↑s (A ∪ D) < sInf (measureOfNegatives s)\n[PROOFSTEP]\nrw [← hA₃, of_union (Set.disjoint_of_subset_right (Set.Subset.trans hD hC₁) disjoint_compl_right) hA₁ hD₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nhA₃ : ↑s A = sInf (measureOfNegatives s)\nC : Set α\na✝ : MeasurableSet C\nhC₁ : C ⊆ Aᶜ\nhC₂ : ↑s C < ↑0 C\nD : Set α\nhD₁ : MeasurableSet D\nhD : D ⊆ C\nhD₂ : restrict s D ≤ restrict 0 D\nhD₃ : ↑s D < 0\n⊢ ↑s A + ↑s D < ↑s A\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nhA₃ : ↑s A = sInf (measureOfNegatives s)\nC : Set α\na✝ : MeasurableSet C\nhC₁ : C ⊆ Aᶜ\nhC₂ : ↑s C < ↑0 C\nD : Set α\nhD₁ : MeasurableSet D\nhD : D ⊆ C\nhD₂ : restrict s D ≤ restrict 0 D\nhD₃ : ↑s D < 0\nthis : ↑s (A ∪ D) < sInf (measureOfNegatives s)\n⊢ False\n[PROOFSTEP]\nrefine' not_le.2 this _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nhA₃ : ↑s A = sInf (measureOfNegatives s)\nC : Set α\na✝ : MeasurableSet C\nhC₁ : C ⊆ Aᶜ\nhC₂ : ↑s C < ↑0 C\nD : Set α\nhD₁ : MeasurableSet D\nhD : D ⊆ C\nhD₂ : restrict s D ≤ restrict 0 D\nhD₃ : ↑s D < 0\nthis : ↑s (A ∪ D) < sInf (measureOfNegatives s)\n⊢ sInf (measureOfNegatives s) ≤ ↑s (A ∪ D)\n[PROOFSTEP]\nrefine' csInf_le bddBelow_measureOfNegatives ⟨A ∪ D, ⟨_, _⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nhA₃ : ↑s A = sInf (measureOfNegatives s)\nC : Set α\na✝ : MeasurableSet C\nhC₁ : C ⊆ Aᶜ\nhC₂ : ↑s C < ↑0 C\nD : Set α\nhD₁ : MeasurableSet D\nhD : D ⊆ C\nhD₂ : restrict s D ≤ restrict 0 D\nhD₃ : ↑s D < 0\nthis : ↑s (A ∪ D) < sInf (measureOfNegatives s)\n⊢ MeasurableSet (A ∪ D)\n[PROOFSTEP]\nexact hA₁.union hD₁\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni j : Set α\ns : SignedMeasure α\nf : ℕ → ℝ\nleft✝ : Antitone f\nhf₂ : Tendsto f atTop (nhds (sInf (measureOfNegatives s)))\nB : ℕ → Set α\nhB : ∀ (n : ℕ), B n ∈ {B | MeasurableSet B ∧ restrict s B ≤ restrict 0 B} ∧ ↑s (B n) = f n\nhB₁ : ∀ (n : ℕ), MeasurableSet (B n)\nhB₂ : ∀ (n : ℕ), restrict s (B n) ≤ restrict 0 (B n)\nA : Set α := ⋃ (n : ℕ), B n\nhA : A = ⋃ (n : ℕ), B n\nhA₁ : MeasurableSet A\nhA₂ : restrict s A ≤ restrict 0 A\nhA₃ : ↑s A = sInf (measureOfNegatives s)\nC : Set α\na✝ : MeasurableSet C\nhC₁ : C ⊆ Aᶜ\nhC₂ : ↑s C < ↑0 C\nD : Set α\nhD₁ : MeasurableSet D\nhD : D ⊆ C\nhD₂ : restrict s D ≤ restrict 0 D\nhD₃ : ↑s D < 0\nthis : ↑s (A ∪ D) < sInf (measureOfNegatives s)\n⊢ restrict s (A ∪ D) ≤ restrict 0 (A ∪ D)\n[PROOFSTEP]\nexact restrict_le_restrict_union _ _ hA₁ hA₂ hD₁ hD₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\nhj' : restrict 0 j ≤ restrict s j ∧ restrict s jᶜ ≤ restrict 0 jᶜ\n⊢ ↑s (i ∆ j) = 0 ∧ ↑s (iᶜ ∆ jᶜ) = 0\n[PROOFSTEP]\nrw [restrict_le_restrict_iff s 0, restrict_le_restrict_iff 0 s] at hi' hj' \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : (∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑0 j ≤ ↑s j) ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' :\n  (∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ j → ↑0 j_1 ≤ ↑s j_1) ∧\n    ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ ↑s (i ∆ j) = 0 ∧ ↑s (iᶜ ∆ jᶜ) = 0\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : (∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑0 j ≤ ↑s j) ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' : restrict 0 j ≤ restrict s j ∧ ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ MeasurableSet j\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : restrict 0 i ≤ restrict s i ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' : restrict 0 j ≤ restrict s j ∧ ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ MeasurableSet i\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : restrict 0 i ≤ restrict s i ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' : restrict 0 j ≤ restrict s j ∧ restrict s jᶜ ≤ restrict 0 jᶜ\n⊢ MeasurableSet jᶜ\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\nhj' : restrict 0 j ≤ restrict s j ∧ restrict s jᶜ ≤ restrict 0 jᶜ\n⊢ MeasurableSet iᶜ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : (∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑0 j ≤ ↑s j) ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' :\n  (∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ j → ↑0 j_1 ≤ ↑s j_1) ∧\n    ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ ↑s (i ∆ j) = 0\n[PROOFSTEP]\nrw [Set.symmDiff_def, Set.diff_eq_compl_inter, Set.diff_eq_compl_inter, of_union,\n  le_antisymm (hi'.2 (hi.compl.inter hj) (Set.inter_subset_left _ _))\n    (hj'.1 (hi.compl.inter hj) (Set.inter_subset_right _ _)),\n  le_antisymm (hj'.2 (hj.compl.inter hi) (Set.inter_subset_left _ _))\n    (hi'.1 (hj.compl.inter hi) (Set.inter_subset_right _ _)),\n  zero_apply, zero_apply, zero_add]\n[GOAL]\ncase left.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : (∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑0 j ≤ ↑s j) ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' :\n  (∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ j → ↑0 j_1 ≤ ↑s j_1) ∧\n    ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ Disjoint (jᶜ ∩ i) (iᶜ ∩ j)\n[PROOFSTEP]\nexact\n  Set.disjoint_of_subset_left (Set.inter_subset_left _ _)\n    (Set.disjoint_of_subset_right (Set.inter_subset_right _ _) (disjoint_comm.1 (IsCompl.disjoint isCompl_compl)))\n[GOAL]\ncase left.hA\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : (∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑0 j ≤ ↑s j) ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' :\n  (∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ j → ↑0 j_1 ≤ ↑s j_1) ∧\n    ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ MeasurableSet (jᶜ ∩ i)\n[PROOFSTEP]\nexact hj.compl.inter hi\n[GOAL]\ncase left.hB\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : (∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑0 j ≤ ↑s j) ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' :\n  (∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ j → ↑0 j_1 ≤ ↑s j_1) ∧\n    ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ MeasurableSet (iᶜ ∩ j)\n[PROOFSTEP]\nexact hi.compl.inter hj\n[GOAL]\ncase right\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : (∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑0 j ≤ ↑s j) ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' :\n  (∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ j → ↑0 j_1 ≤ ↑s j_1) ∧\n    ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ ↑s (iᶜ ∆ jᶜ) = 0\n[PROOFSTEP]\nrw [Set.symmDiff_def, Set.diff_eq_compl_inter, Set.diff_eq_compl_inter, compl_compl, compl_compl, of_union,\n  le_antisymm (hi'.2 (hj.inter hi.compl) (Set.inter_subset_right _ _))\n    (hj'.1 (hj.inter hi.compl) (Set.inter_subset_left _ _)),\n  le_antisymm (hj'.2 (hi.inter hj.compl) (Set.inter_subset_right _ _))\n    (hi'.1 (hi.inter hj.compl) (Set.inter_subset_left _ _)),\n  zero_apply, zero_apply, zero_add]\n[GOAL]\ncase right.h\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : (∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑0 j ≤ ↑s j) ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' :\n  (∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ j → ↑0 j_1 ≤ ↑s j_1) ∧\n    ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ Disjoint (j ∩ iᶜ) (i ∩ jᶜ)\n[PROOFSTEP]\nexact\n  Set.disjoint_of_subset_left (Set.inter_subset_left _ _)\n    (Set.disjoint_of_subset_right (Set.inter_subset_right _ _) (IsCompl.disjoint isCompl_compl))\n[GOAL]\ncase right.hA\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : (∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑0 j ≤ ↑s j) ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' :\n  (∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ j → ↑0 j_1 ≤ ↑s j_1) ∧\n    ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ MeasurableSet (j ∩ iᶜ)\n[PROOFSTEP]\nexact hj.inter hi.compl\n[GOAL]\ncase right.hB\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : (∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑0 j ≤ ↑s j) ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' :\n  (∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ j → ↑0 j_1 ≤ ↑s j_1) ∧\n    ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ MeasurableSet (i ∩ jᶜ)\n[PROOFSTEP]\nexact hi.inter hj.compl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : (∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑0 j ≤ ↑s j) ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' : restrict 0 j ≤ restrict s j ∧ ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ MeasurableSet j\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : restrict 0 i ≤ restrict s i ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' : restrict 0 j ≤ restrict s j ∧ ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ MeasurableSet i\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : restrict 0 i ≤ restrict s i ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' : restrict 0 j ≤ restrict s j ∧ restrict s jᶜ ≤ restrict 0 jᶜ\n⊢ MeasurableSet jᶜ\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\nhj' : restrict 0 j ≤ restrict s j ∧ restrict s jᶜ ≤ restrict 0 jᶜ\n⊢ MeasurableSet iᶜ\n[PROOFSTEP]\nall_goals measurability\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : (∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑0 j ≤ ↑s j) ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' : restrict 0 j ≤ restrict s j ∧ ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ MeasurableSet j\n[PROOFSTEP]\nmeasurability\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : restrict 0 i ≤ restrict s i ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' : restrict 0 j ≤ restrict s j ∧ ∀ ⦃j_1 : Set α⦄, MeasurableSet j_1 → j_1 ⊆ jᶜ → ↑s j_1 ≤ ↑0 j_1\n⊢ MeasurableSet i\n[PROOFSTEP]\nmeasurability\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : restrict 0 i ≤ restrict s i ∧ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ iᶜ → ↑s j ≤ ↑0 j\nhj' : restrict 0 j ≤ restrict s j ∧ restrict s jᶜ ≤ restrict 0 jᶜ\n⊢ MeasurableSet jᶜ\n[PROOFSTEP]\nmeasurability\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\ns✝ : SignedMeasure α\ni✝ j✝ : Set α\ns : SignedMeasure α\ni j : Set α\nhi : MeasurableSet i\nhj : MeasurableSet j\nhi' : restrict 0 i ≤ restrict s i ∧ restrict s iᶜ ≤ restrict 0 iᶜ\nhj' : restrict 0 j ≤ restrict s j ∧ restrict s jᶜ ≤ restrict 0 jᶜ\n⊢ MeasurableSet iᶜ\n[PROOFSTEP]\nmeasurability\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Decomposition.SignedHahn", "llama_tokens": 99627, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7310585786300049, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.3968648601865095}}
{"text": "[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\na b : StructureGroupoid H\nh : a.members = b.members\n⊢ a = b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase mk\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nb : StructureGroupoid H\nmembers✝ : Set (LocalHomeomorph H H)\ntrans'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝ → e' ∈ members✝ → e ≫ₕ e' ∈ members✝\nsymm'✝ : ∀ (e : LocalHomeomorph H H), e ∈ members✝ → LocalHomeomorph.symm e ∈ members✝\nid_mem'✝ : LocalHomeomorph.refl H ∈ members✝\nlocality'✝ :\n  ∀ (e : LocalHomeomorph H H),\n    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝) → e ∈ members✝\neq_on_source'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝ → e' ≈ e → e' ∈ members✝\nh :\n  { members := members✝, trans' := trans'✝, symm' := symm'✝, id_mem' := id_mem'✝, locality' := locality'✝,\n        eq_on_source' := eq_on_source'✝ }.members =\n    b.members\n⊢ { members := members✝, trans' := trans'✝, symm' := symm'✝, id_mem' := id_mem'✝, locality' := locality'✝,\n      eq_on_source' := eq_on_source'✝ } =\n    b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase mk.mk\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nmembers✝¹ : Set (LocalHomeomorph H H)\ntrans'✝¹ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ∈ members✝¹ → e ≫ₕ e' ∈ members✝¹\nsymm'✝¹ : ∀ (e : LocalHomeomorph H H), e ∈ members✝¹ → LocalHomeomorph.symm e ∈ members✝¹\nid_mem'✝¹ : LocalHomeomorph.refl H ∈ members✝¹\nlocality'✝¹ :\n  ∀ (e : LocalHomeomorph H H),\n    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝¹) → e ∈ members✝¹\neq_on_source'✝¹ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ≈ e → e' ∈ members✝¹\nmembers✝ : Set (LocalHomeomorph H H)\ntrans'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝ → e' ∈ members✝ → e ≫ₕ e' ∈ members✝\nsymm'✝ : ∀ (e : LocalHomeomorph H H), e ∈ members✝ → LocalHomeomorph.symm e ∈ members✝\nid_mem'✝ : LocalHomeomorph.refl H ∈ members✝\nlocality'✝ :\n  ∀ (e : LocalHomeomorph H H),\n    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝) → e ∈ members✝\neq_on_source'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝ → e' ≈ e → e' ∈ members✝\nh :\n  { members := members✝¹, trans' := trans'✝¹, symm' := symm'✝¹, id_mem' := id_mem'✝¹, locality' := locality'✝¹,\n        eq_on_source' := eq_on_source'✝¹ }.members =\n    { members := members✝, trans' := trans'✝, symm' := symm'✝, id_mem' := id_mem'✝, locality' := locality'✝,\n        eq_on_source' := eq_on_source'✝ }.members\n⊢ { members := members✝¹, trans' := trans'✝¹, symm' := symm'✝¹, id_mem' := id_mem'✝¹, locality' := locality'✝¹,\n      eq_on_source' := eq_on_source'✝¹ } =\n    { members := members✝, trans' := trans'✝, symm' := symm'✝, id_mem' := id_mem'✝, locality' := locality'✝,\n      eq_on_source' := eq_on_source'✝ }\n[PROOFSTEP]\ndsimp at h \n[GOAL]\ncase mk.mk\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nmembers✝¹ : Set (LocalHomeomorph H H)\ntrans'✝¹ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ∈ members✝¹ → e ≫ₕ e' ∈ members✝¹\nsymm'✝¹ : ∀ (e : LocalHomeomorph H H), e ∈ members✝¹ → LocalHomeomorph.symm e ∈ members✝¹\nid_mem'✝¹ : LocalHomeomorph.refl H ∈ members✝¹\nlocality'✝¹ :\n  ∀ (e : LocalHomeomorph H H),\n    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝¹) → e ∈ members✝¹\neq_on_source'✝¹ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ≈ e → e' ∈ members✝¹\nmembers✝ : Set (LocalHomeomorph H H)\ntrans'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝ → e' ∈ members✝ → e ≫ₕ e' ∈ members✝\nsymm'✝ : ∀ (e : LocalHomeomorph H H), e ∈ members✝ → LocalHomeomorph.symm e ∈ members✝\nid_mem'✝ : LocalHomeomorph.refl H ∈ members✝\nlocality'✝ :\n  ∀ (e : LocalHomeomorph H H),\n    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝) → e ∈ members✝\neq_on_source'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝ → e' ≈ e → e' ∈ members✝\nh : members✝¹ = members✝\n⊢ { members := members✝¹, trans' := trans'✝¹, symm' := symm'✝¹, id_mem' := id_mem'✝¹, locality' := locality'✝¹,\n      eq_on_source' := eq_on_source'✝¹ } =\n    { members := members✝, trans' := trans'✝, symm' := symm'✝, id_mem' := id_mem'✝, locality' := locality'✝,\n      eq_on_source' := eq_on_source'✝ }\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase mk.mk.refl\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nmembers✝¹ : Set (LocalHomeomorph H H)\ntrans'✝¹ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ∈ members✝¹ → e ≫ₕ e' ∈ members✝¹\nsymm'✝¹ : ∀ (e : LocalHomeomorph H H), e ∈ members✝¹ → LocalHomeomorph.symm e ∈ members✝¹\nid_mem'✝¹ : LocalHomeomorph.refl H ∈ members✝¹\nlocality'✝¹ :\n  ∀ (e : LocalHomeomorph H H),\n    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝¹) → e ∈ members✝¹\neq_on_source'✝¹ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ≈ e → e' ∈ members✝¹\nmembers✝ : Set (LocalHomeomorph H H)\ntrans'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ∈ members✝¹ → e ≫ₕ e' ∈ members✝¹\nsymm'✝ : ∀ (e : LocalHomeomorph H H), e ∈ members✝¹ → LocalHomeomorph.symm e ∈ members✝¹\nid_mem'✝ : LocalHomeomorph.refl H ∈ members✝¹\nlocality'✝ :\n  ∀ (e : LocalHomeomorph H H),\n    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝¹) → e ∈ members✝¹\neq_on_source'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ≈ e → e' ∈ members✝¹\n⊢ { members := members✝¹, trans' := trans'✝¹, symm' := symm'✝¹, id_mem' := id_mem'✝¹, locality' := locality'✝¹,\n      eq_on_source' := eq_on_source'✝¹ } =\n    { members := members✝¹, trans' := trans'✝, symm' := symm'✝, id_mem' := id_mem'✝, locality' := locality'✝,\n      eq_on_source' := eq_on_source'✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe : e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nhe' : e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n⊢ e ≫ₕ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\ncases' he with he he\n[GOAL]\ncase inl\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe' : e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nhe : e ∈ {LocalHomeomorph.refl H}\n⊢ e ≫ₕ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\nsimpa only [mem_singleton_iff.1 he, refl_trans]\n[GOAL]\ncase inr\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe' : e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nhe : e ∈ {e | e.source = ∅}\n⊢ e ≫ₕ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\nhave : (e ≫ₕ e').source ⊆ e.source := sep_subset _ _\n[GOAL]\ncase inr\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe' : e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nhe : e ∈ {e | e.source = ∅}\nthis : (e ≫ₕ e').toLocalEquiv.source ⊆ e.source\n⊢ e ≫ₕ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\nrw [he] at this \n[GOAL]\ncase inr\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe' : e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nhe : e ∈ {e | e.source = ∅}\nthis : (e ≫ₕ e').toLocalEquiv.source ⊆ ∅\n⊢ e ≫ₕ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\nhave : e ≫ₕ e' ∈ {e : LocalHomeomorph H H | e.source = ∅} := eq_bot_iff.2 this\n[GOAL]\ncase inr\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe' : e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nhe : e ∈ {e | e.source = ∅}\nthis✝ : (e ≫ₕ e').toLocalEquiv.source ⊆ ∅\nthis : e ≫ₕ e' ∈ {e | e.source = ∅}\n⊢ e ≫ₕ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\nexact (mem_union _ _ _).2 (Or.inr this)\n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe : e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n⊢ LocalHomeomorph.symm e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\ncases' (mem_union _ _ _).1 he with E E\n[GOAL]\ncase inl\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe : e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nE : e ∈ {LocalHomeomorph.refl H}\n⊢ LocalHomeomorph.symm e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\nsimp [mem_singleton_iff.mp E]\n[GOAL]\ncase inr\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe : e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nE : e ∈ {e | e.source = ∅}\n⊢ LocalHomeomorph.symm e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.h\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe : e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nE : e ∈ {e | e.source = ∅}\n⊢ LocalHomeomorph.symm e ∈ {e | e.source = ∅}\n[PROOFSTEP]\nsimpa only [e.toLocalEquiv.image_source_eq_target.symm, mfld_simps] using E\n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n⊢ e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\ncases' e.source.eq_empty_or_nonempty with h h\n[GOAL]\ncase inl\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nh : e.source = ∅\n⊢ e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\nright\n[GOAL]\ncase inl.h\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nh : e.source = ∅\n⊢ e ∈ {e | e.source = ∅}\n[PROOFSTEP]\nexact h\n[GOAL]\ncase inr\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nh : Set.Nonempty e.source\n⊢ e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\nleft\n[GOAL]\ncase inr.h\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nh : Set.Nonempty e.source\n⊢ e ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\nrcases h with ⟨x, hx⟩\n[GOAL]\ncase inr.h.intro\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\n⊢ e ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\nrcases he x hx with ⟨s, open_s, xs, hs⟩\n[GOAL]\ncase inr.h.intro.intro.intro.intro\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n⊢ e ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\nhave x's : x ∈ (e.restr s).source := by\n  rw [restr_source, open_s.interior_eq]\n  exact ⟨hx, xs⟩\n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n⊢ x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\n[PROOFSTEP]\nrw [restr_source, open_s.interior_eq]\n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n⊢ x ∈ e.source ∩ s\n[PROOFSTEP]\nexact ⟨hx, xs⟩\n[GOAL]\ncase inr.h.intro.intro.intro.intro\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\n⊢ e ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\ncases' hs with hs hs\n[GOAL]\ncase inr.h.intro.intro.intro.intro.inl\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H}\n⊢ e ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\nreplace hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H\n[GOAL]\ncase hs\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H}\n⊢ LocalHomeomorph.restr e s = LocalHomeomorph.refl H\n[PROOFSTEP]\nsimpa only using hs\n[GOAL]\ncase inr.h.intro.intro.intro.intro.inl\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H\n⊢ e ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\nhave : (e.restr s).source = univ := by\n  rw [hs]\n  simp\n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H\n⊢ (LocalHomeomorph.restr e s).toLocalEquiv.source = univ\n[PROOFSTEP]\nrw [hs]\n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H\n⊢ (LocalHomeomorph.refl H).toLocalEquiv.source = univ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.h.intro.intro.intro.intro.inl\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H\nthis : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ\n⊢ e ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\nhave : e.toLocalEquiv.source ∩ interior s = univ := this\n[GOAL]\ncase inr.h.intro.intro.intro.intro.inl\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H\nthis✝ : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ\nthis : e.source ∩ interior s = univ\n⊢ e ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\nhave : univ ⊆ interior s := by\n  rw [← this]\n  exact inter_subset_right _ _\n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H\nthis✝ : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ\nthis : e.source ∩ interior s = univ\n⊢ univ ⊆ interior s\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H\nthis✝ : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ\nthis : e.source ∩ interior s = univ\n⊢ e.source ∩ interior s ⊆ interior s\n[PROOFSTEP]\nexact inter_subset_right _ _\n[GOAL]\ncase inr.h.intro.intro.intro.intro.inl\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H\nthis✝¹ : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ\nthis✝ : e.source ∩ interior s = univ\nthis : univ ⊆ interior s\n⊢ e ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\nhave : s = univ := by rwa [open_s.interior_eq, univ_subset_iff] at this \n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H\nthis✝¹ : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ\nthis✝ : e.source ∩ interior s = univ\nthis : univ ⊆ interior s\n⊢ s = univ\n[PROOFSTEP]\nrwa [open_s.interior_eq, univ_subset_iff] at this \n[GOAL]\ncase inr.h.intro.intro.intro.intro.inl\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H\nthis✝² : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ\nthis✝¹ : e.source ∩ interior s = univ\nthis✝ : univ ⊆ interior s\nthis : s = univ\n⊢ e ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\nsimpa only [this, restr_univ] using hs\n[GOAL]\ncase inr.h.intro.intro.intro.intro.inr\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s ∈ {e | e.source = ∅}\n⊢ e ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase inr.h.intro.intro.intro.intro.inr.h\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : LocalHomeomorph.restr e s ∈ {e | e.source = ∅}\n⊢ False\n[PROOFSTEP]\nrw [mem_setOf_eq] at hs \n[GOAL]\ncase inr.h.intro.intro.intro.intro.inr.h\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nx : H\nhx : x ∈ e.source\ns : Set H\nopen_s : IsOpen s\nxs : x ∈ s\nx's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\nhs : (LocalHomeomorph.restr e s).toLocalEquiv.source = ∅\n⊢ False\n[PROOFSTEP]\nrwa [hs] at x's \n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe : e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\nhe'e : e' ≈ e\n⊢ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\ncases' he with he he\n[GOAL]\ncase inl\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe'e : e' ≈ e\nhe : e ∈ {LocalHomeomorph.refl H}\n⊢ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\nleft\n[GOAL]\ncase inl.h\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe'e : e' ≈ e\nhe : e ∈ {LocalHomeomorph.refl H}\n⊢ e' ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\nhave : e = e' := by refine' eq_of_eq_on_source_univ (Setoid.symm he'e) _ _ <;> rw [Set.mem_singleton_iff.1 he] <;> rfl\n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe'e : e' ≈ e\nhe : e ∈ {LocalHomeomorph.refl H}\n⊢ e = e'\n[PROOFSTEP]\nrefine' eq_of_eq_on_source_univ (Setoid.symm he'e) _ _\n[GOAL]\ncase refine'_1\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe'e : e' ≈ e\nhe : e ∈ {LocalHomeomorph.refl H}\n⊢ e.source = univ\n[PROOFSTEP]\nrw [Set.mem_singleton_iff.1 he]\n[GOAL]\ncase refine'_2\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe'e : e' ≈ e\nhe : e ∈ {LocalHomeomorph.refl H}\n⊢ e.target = univ\n[PROOFSTEP]\nrw [Set.mem_singleton_iff.1 he]\n[GOAL]\ncase refine'_1\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe'e : e' ≈ e\nhe : e ∈ {LocalHomeomorph.refl H}\n⊢ (LocalHomeomorph.refl H).toLocalEquiv.source = univ\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe'e : e' ≈ e\nhe : e ∈ {LocalHomeomorph.refl H}\n⊢ (LocalHomeomorph.refl H).toLocalEquiv.target = univ\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inl.h\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe'e : e' ≈ e\nhe : e ∈ {LocalHomeomorph.refl H}\nthis : e = e'\n⊢ e' ∈ {LocalHomeomorph.refl H}\n[PROOFSTEP]\nrwa [← this]\n[GOAL]\ncase inr\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe'e : e' ≈ e\nhe : e ∈ {e | e.source = ∅}\n⊢ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.h\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe'e : e' ≈ e\nhe : e ∈ {e | e.source = ∅}\n⊢ e' ∈ {e | e.source = ∅}\n[PROOFSTEP]\nhave he : e.toLocalEquiv.source = ∅ := he\n[GOAL]\ncase inr.h\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝¹ : TopologicalSpace H✝\nH : Type u\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\nhe'e : e' ≈ e\nhe✝ : e ∈ {e | e.source = ∅}\nhe : e.source = ∅\n⊢ e' ∈ {e | e.source = ∅}\n[PROOFSTEP]\nrwa [Set.mem_setOf_eq, EqOnSource.source_eq he'e]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\n⊢ ∀ (a : StructureGroupoid H), ⊥ ≤ a\n[PROOFSTEP]\nintro u f hf\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nu : StructureGroupoid H\nf : LocalHomeomorph H H\nhf : f ∈ ⊥.members\n⊢ f ∈ u.members\n[PROOFSTEP]\nhave hf : f ∈ {LocalHomeomorph.refl H} ∪ {e : LocalHomeomorph H H | e.source = ∅} := hf\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nu : StructureGroupoid H\nf : LocalHomeomorph H H\nhf✝ : f ∈ ⊥.members\nhf : f ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}\n⊢ f ∈ u.members\n[PROOFSTEP]\nsimp only [singleton_union, mem_setOf_eq, mem_insert_iff] at hf \n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nu : StructureGroupoid H\nf : LocalHomeomorph H H\nhf✝ : f ∈ ⊥.members\nhf : f = LocalHomeomorph.refl H ∨ f.source = ∅\n⊢ f ∈ u.members\n[PROOFSTEP]\ncases' hf with hf hf\n[GOAL]\ncase inl\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nu : StructureGroupoid H\nf : LocalHomeomorph H H\nhf✝ : f ∈ ⊥.members\nhf : f = LocalHomeomorph.refl H\n⊢ f ∈ u.members\n[PROOFSTEP]\nrw [hf]\n[GOAL]\ncase inl\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nu : StructureGroupoid H\nf : LocalHomeomorph H H\nhf✝ : f ∈ ⊥.members\nhf : f = LocalHomeomorph.refl H\n⊢ LocalHomeomorph.refl H ∈ u.members\n[PROOFSTEP]\napply u.id_mem\n[GOAL]\ncase inr\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nu : StructureGroupoid H\nf : LocalHomeomorph H H\nhf✝ : f ∈ ⊥.members\nhf : f.source = ∅\n⊢ f ∈ u.members\n[PROOFSTEP]\napply u.locality\n[GOAL]\ncase inr\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nu : StructureGroupoid H\nf : LocalHomeomorph H H\nhf✝ : f ∈ ⊥.members\nhf : f.source = ∅\n⊢ ∀ (x : H), x ∈ f.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr f s ∈ u\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase inr\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nu : StructureGroupoid H\nf : LocalHomeomorph H H\nhf✝ : f ∈ ⊥.members\nhf : f.source = ∅\nx : H\nhx : x ∈ f.source\n⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr f s ∈ u\n[PROOFSTEP]\nrw [hf, mem_empty_iff_false] at hx \n[GOAL]\ncase inr\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nu : StructureGroupoid H\nf : LocalHomeomorph H H\nhf✝ : f ∈ ⊥.members\nhf : f.source = ∅\nx : H\nhx : False\n⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr f s ∈ u\n[PROOFSTEP]\nexact hx.elim\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nhe' : e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ e ≫ₕ e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nhe' : e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ property PG (↑(e ≫ₕ e')) (e ≫ₕ e').toLocalEquiv.source\n[PROOFSTEP]\napply PG.comp he.1 he'.1 e.open_source e'.open_source\n[GOAL]\ncase left\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nhe' : e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ IsOpen (e.source ∩ ↑e ⁻¹' e'.source)\n[PROOFSTEP]\napply e.continuous_toFun.preimage_open_of_open e.open_source e'.open_source\n[GOAL]\ncase right\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nhe' : e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ property PG (↑(LocalHomeomorph.symm (e ≫ₕ e'))) (e ≫ₕ e').toLocalEquiv.target\n[PROOFSTEP]\napply PG.comp he'.2 he.2 e'.open_target e.open_target\n[GOAL]\ncase right\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nhe' : e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ IsOpen (e'.target ∩ ↑(LocalHomeomorph.symm e') ⁻¹' e.target)\n[PROOFSTEP]\napply e'.continuous_invFun.preimage_open_of_open e'.open_target e.open_target\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ property PG (↑e) e.source\n[PROOFSTEP]\nrefine' PG.locality e.open_source fun x xu ↦ _\n[GOAL]\ncase left\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nx : H\nxu : x ∈ e.source\n⊢ ∃ v, IsOpen v ∧ x ∈ v ∧ property PG (↑e) (e.source ∩ v)\n[PROOFSTEP]\nrcases he x xu with ⟨s, s_open, xs, hs⟩\n[GOAL]\ncase left.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nx : H\nxu : x ∈ e.source\ns : Set H\ns_open : IsOpen s\nxs : x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ ∃ v, IsOpen v ∧ x ∈ v ∧ property PG (↑e) (e.source ∩ v)\n[PROOFSTEP]\nrefine' ⟨s, s_open, xs, _⟩\n[GOAL]\ncase left.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nx : H\nxu : x ∈ e.source\ns : Set H\ns_open : IsOpen s\nxs : x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ property PG (↑e) (e.source ∩ s)\n[PROOFSTEP]\nconvert hs.1 using 1\n[GOAL]\ncase h.e'_5\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nx : H\nxu : x ∈ e.source\ns : Set H\ns_open : IsOpen s\nxs : x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ e.source ∩ s = (LocalHomeomorph.restr e s).toLocalEquiv.source\n[PROOFSTEP]\ndsimp [LocalHomeomorph.restr]\n[GOAL]\ncase h.e'_5\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nx : H\nxu : x ∈ e.source\ns : Set H\ns_open : IsOpen s\nxs : x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ e.source ∩ s = e.source ∩ interior s\n[PROOFSTEP]\nrw [s_open.interior_eq]\n[GOAL]\ncase right\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ property PG (↑(LocalHomeomorph.symm e)) e.target\n[PROOFSTEP]\nrefine' PG.locality e.open_target fun x xu ↦ _\n[GOAL]\ncase right\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nx : H\nxu : x ∈ e.target\n⊢ ∃ v, IsOpen v ∧ x ∈ v ∧ property PG (↑(LocalHomeomorph.symm e)) (e.target ∩ v)\n[PROOFSTEP]\nrcases he (e.symm x) (e.map_target xu) with ⟨s, s_open, xs, hs⟩\n[GOAL]\ncase right.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nx : H\nxu : x ∈ e.target\ns : Set H\ns_open : IsOpen s\nxs : ↑(LocalHomeomorph.symm e) x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ ∃ v, IsOpen v ∧ x ∈ v ∧ property PG (↑(LocalHomeomorph.symm e)) (e.target ∩ v)\n[PROOFSTEP]\nrefine' ⟨e.target ∩ e.symm ⁻¹' s, _, ⟨xu, xs⟩, _⟩\n[GOAL]\ncase right.intro.intro.intro.refine'_1\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nx : H\nxu : x ∈ e.target\ns : Set H\ns_open : IsOpen s\nxs : ↑(LocalHomeomorph.symm e) x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ IsOpen (e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s)\n[PROOFSTEP]\nexact ContinuousOn.preimage_open_of_open e.continuous_invFun e.open_target s_open\n[GOAL]\ncase right.intro.intro.intro.refine'_2\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nx : H\nxu : x ∈ e.target\ns : Set H\ns_open : IsOpen s\nxs : ↑(LocalHomeomorph.symm e) x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ property PG (↑(LocalHomeomorph.symm e)) (e.target ∩ (e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s))\n[PROOFSTEP]\nrw [← inter_assoc, inter_self]\n[GOAL]\ncase right.intro.intro.intro.refine'_2\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nx : H\nxu : x ∈ e.target\ns : Set H\ns_open : IsOpen s\nxs : ↑(LocalHomeomorph.symm e) x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ property PG (↑(LocalHomeomorph.symm e)) (e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s)\n[PROOFSTEP]\nconvert hs.2 using 1\n[GOAL]\ncase h.e'_5\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nx : H\nxu : x ∈ e.target\ns : Set H\ns_open : IsOpen s\nxs : ↑(LocalHomeomorph.symm e) x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s = (LocalHomeomorph.restr e s).toLocalEquiv.target\n[PROOFSTEP]\ndsimp [LocalHomeomorph.restr]\n[GOAL]\ncase h.e'_5\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne : LocalHomeomorph H H\nhe :\n  ∀ (x : H),\n    x ∈ e.source →\n      ∃ s,\n        IsOpen s ∧\n          x ∈ s ∧\n            LocalHomeomorph.restr e s ∈\n              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nx : H\nxu : x ∈ e.target\ns : Set H\ns_open : IsOpen s\nxs : ↑(LocalHomeomorph.symm e) x ∈ s\nhs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n⊢ e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s = e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' interior s\n[PROOFSTEP]\nrw [s_open.interior_eq]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nee' : e' ≈ e\n⊢ e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nee' : e' ≈ e\n⊢ property PG (↑e') e'.source\n[PROOFSTEP]\napply PG.congr e'.open_source ee'.2\n[GOAL]\ncase left\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nee' : e' ≈ e\n⊢ property PG (fun x => ↑e x) e'.source\n[PROOFSTEP]\nsimp only [ee'.1, he.1]\n[GOAL]\ncase right\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nee' : e' ≈ e\n⊢ property PG (↑(LocalHomeomorph.symm e')) e'.target\n[PROOFSTEP]\nhave A := EqOnSource.symm' ee'\n[GOAL]\ncase right\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nee' : e' ≈ e\nA : LocalHomeomorph.symm e' ≈ LocalHomeomorph.symm e\n⊢ property PG (↑(LocalHomeomorph.symm e')) e'.target\n[PROOFSTEP]\napply\n  PG.congr e'.symm.open_source\n    A.2\n      -- Porting note: was\n            -- convert he.2\n            -- rw [A.1]\n            -- rfl\n[GOAL]\ncase right\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nee' : e' ≈ e\nA : LocalHomeomorph.symm e' ≈ LocalHomeomorph.symm e\n⊢ property PG (fun x => ↑(LocalHomeomorph.symm e) x) (LocalHomeomorph.symm e').toLocalEquiv.source\n[PROOFSTEP]\nrw [A.1, symm_toLocalEquiv, LocalEquiv.symm_source]\n[GOAL]\ncase right\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}\nee' : e' ≈ e\nA : LocalHomeomorph.symm e' ≈ LocalHomeomorph.symm e\n⊢ property PG (fun x => ↑(LocalHomeomorph.symm e) x) e.target\n[PROOFSTEP]\nexact he.2\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG₁ PG₂ : Pregroupoid H\nh : ∀ (f : H → H) (s : Set H), Pregroupoid.property PG₁ f s → Pregroupoid.property PG₂ f s\n⊢ Pregroupoid.groupoid PG₁ ≤ Pregroupoid.groupoid PG₂\n[PROOFSTEP]\nrefine' StructureGroupoid.le_iff.2 fun e he ↦ _\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG₁ PG₂ : Pregroupoid H\nh : ∀ (f : H → H) (s : Set H), Pregroupoid.property PG₁ f s → Pregroupoid.property PG₂ f s\ne : LocalHomeomorph H H\nhe : e ∈ Pregroupoid.groupoid PG₁\n⊢ e ∈ Pregroupoid.groupoid PG₂\n[PROOFSTEP]\nrw [mem_groupoid_of_pregroupoid] at he ⊢\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG₁ PG₂ : Pregroupoid H\nh : ∀ (f : H → H) (s : Set H), Pregroupoid.property PG₁ f s → Pregroupoid.property PG₂ f s\ne : LocalHomeomorph H H\nhe : Pregroupoid.property PG₁ (↑e) e.source ∧ Pregroupoid.property PG₁ (↑(LocalHomeomorph.symm e)) e.target\n⊢ Pregroupoid.property PG₂ (↑e) e.source ∧ Pregroupoid.property PG₂ (↑(LocalHomeomorph.symm e)) e.target\n[PROOFSTEP]\nexact ⟨h _ _ he.1, h _ _ he.2⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe' : e ≈ e'\nhe : Pregroupoid.property PG (↑e) e.source\n⊢ Pregroupoid.property PG (↑e') e'.source\n[PROOFSTEP]\nrw [← he'.1]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nPG : Pregroupoid H\ne e' : LocalHomeomorph H H\nhe' : e ≈ e'\nhe : Pregroupoid.property PG (↑e) e.source\n⊢ Pregroupoid.property PG (↑e') e.source\n[PROOFSTEP]\nexact PG.congr e.open_source he'.eqOn.symm he\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\n⊢ ∀ (e e' : LocalHomeomorph H H),\n    e ∈ {e | ∃ s h, e ≈ ofSet s h} → e' ∈ {e | ∃ s h, e ≈ ofSet s h} → e ≫ₕ e' ∈ {e | ∃ s h, e ≈ ofSet s h}\n[PROOFSTEP]\nrintro e e' ⟨s, hs, hse⟩ ⟨s', hs', hse'⟩\n[GOAL]\ncase intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhse : e ≈ ofSet s hs\ns' : Set H\nhs' : IsOpen s'\nhse' : e' ≈ ofSet s' hs'\n⊢ e ≫ₕ e' ∈ {e | ∃ s h, e ≈ ofSet s h}\n[PROOFSTEP]\nrefine' ⟨s ∩ s', IsOpen.inter hs hs', _⟩\n[GOAL]\ncase intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhse : e ≈ ofSet s hs\ns' : Set H\nhs' : IsOpen s'\nhse' : e' ≈ ofSet s' hs'\n⊢ e ≫ₕ e' ≈ ofSet (s ∩ s') (_ : IsOpen (s ∩ s'))\n[PROOFSTEP]\nhave := LocalHomeomorph.EqOnSource.trans' hse hse'\n[GOAL]\ncase intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhse : e ≈ ofSet s hs\ns' : Set H\nhs' : IsOpen s'\nhse' : e' ≈ ofSet s' hs'\nthis : e ≫ₕ e' ≈ ofSet s hs ≫ₕ ofSet s' hs'\n⊢ e ≫ₕ e' ≈ ofSet (s ∩ s') (_ : IsOpen (s ∩ s'))\n[PROOFSTEP]\nrwa [LocalHomeomorph.ofSet_trans_ofSet] at this \n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\n⊢ ∀ (e : LocalHomeomorph H H), e ∈ {e | ∃ s h, e ≈ ofSet s h} → LocalHomeomorph.symm e ∈ {e | ∃ s h, e ≈ ofSet s h}\n[PROOFSTEP]\nrintro e ⟨s, hs, hse⟩\n[GOAL]\ncase intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhse : e ≈ ofSet s hs\n⊢ LocalHomeomorph.symm e ∈ {e | ∃ s h, e ≈ ofSet s h}\n[PROOFSTEP]\nrefine' ⟨s, hs, _⟩\n[GOAL]\ncase intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhse : e ≈ ofSet s hs\n⊢ LocalHomeomorph.symm e ≈ ofSet s hs\n[PROOFSTEP]\nrw [← ofSet_symm]\n[GOAL]\ncase intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhse : e ≈ ofSet s hs\n⊢ LocalHomeomorph.symm e ≈ LocalHomeomorph.symm (ofSet s hs)\n[PROOFSTEP]\nexact LocalHomeomorph.EqOnSource.symm' hse\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\n⊢ LocalHomeomorph.refl H ≈ ofSet univ (_ : IsOpen univ)\n[PROOFSTEP]\nsimp only [mfld_simps, refl]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\n⊢ ∀ (e : LocalHomeomorph H H),\n    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}) →\n      e ∈ {e | ∃ s h, e ≈ ofSet s h}\n[PROOFSTEP]\nintro e h\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nh : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}\n⊢ e ∈ {e | ∃ s h, e ≈ ofSet s h}\n[PROOFSTEP]\nrefine' ⟨e.source, e.open_source, by simp only [mfld_simps], _⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nh : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}\n⊢ e.source = (ofSet e.source (_ : IsOpen e.source)).toLocalEquiv.source\n[PROOFSTEP]\nsimp only [mfld_simps]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nh : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}\n⊢ EqOn (↑e) (↑(ofSet e.source (_ : IsOpen e.source))) e.source\n[PROOFSTEP]\nintro x hx\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nh : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}\nx : H\nhx : x ∈ e.source\n⊢ ↑e x = ↑(ofSet e.source (_ : IsOpen e.source)) x\n[PROOFSTEP]\nrcases h x hx with ⟨s, hs, hxs, s', hs', hes'⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nh : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}\nx : H\nhx : x ∈ e.source\ns : Set H\nhs : IsOpen s\nhxs : x ∈ s\ns' : Set H\nhs' : IsOpen s'\nhes' : LocalHomeomorph.restr e s ≈ ofSet s' hs'\n⊢ ↑e x = ↑(ofSet e.source (_ : IsOpen e.source)) x\n[PROOFSTEP]\nhave hes : x ∈ (e.restr s).source := by\n  rw [e.restr_source]\n  refine' ⟨hx, _⟩\n  rw [hs.interior_eq]\n  exact hxs\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nh : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}\nx : H\nhx : x ∈ e.source\ns : Set H\nhs : IsOpen s\nhxs : x ∈ s\ns' : Set H\nhs' : IsOpen s'\nhes' : LocalHomeomorph.restr e s ≈ ofSet s' hs'\n⊢ x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\n[PROOFSTEP]\nrw [e.restr_source]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nh : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}\nx : H\nhx : x ∈ e.source\ns : Set H\nhs : IsOpen s\nhxs : x ∈ s\ns' : Set H\nhs' : IsOpen s'\nhes' : LocalHomeomorph.restr e s ≈ ofSet s' hs'\n⊢ x ∈ e.source ∩ interior s\n[PROOFSTEP]\nrefine' ⟨hx, _⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nh : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}\nx : H\nhx : x ∈ e.source\ns : Set H\nhs : IsOpen s\nhxs : x ∈ s\ns' : Set H\nhs' : IsOpen s'\nhes' : LocalHomeomorph.restr e s ≈ ofSet s' hs'\n⊢ x ∈ interior s\n[PROOFSTEP]\nrw [hs.interior_eq]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nh : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}\nx : H\nhx : x ∈ e.source\ns : Set H\nhs : IsOpen s\nhxs : x ∈ s\ns' : Set H\nhs' : IsOpen s'\nhes' : LocalHomeomorph.restr e s ≈ ofSet s' hs'\n⊢ x ∈ s\n[PROOFSTEP]\nexact hxs\n[GOAL]\ncase intro.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\nh : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}\nx : H\nhx : x ∈ e.source\ns : Set H\nhs : IsOpen s\nhxs : x ∈ s\ns' : Set H\nhs' : IsOpen s'\nhes' : LocalHomeomorph.restr e s ≈ ofSet s' hs'\nhes : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source\n⊢ ↑e x = ↑(ofSet e.source (_ : IsOpen e.source)) x\n[PROOFSTEP]\nsimpa only [mfld_simps] using LocalHomeomorph.EqOnSource.eqOn hes' hes\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\n⊢ ∀ (e e' : LocalHomeomorph H H), e ∈ {e | ∃ s h, e ≈ ofSet s h} → e' ≈ e → e' ∈ {e | ∃ s h, e ≈ ofSet s h}\n[PROOFSTEP]\nrintro e e' ⟨s, hs, hse⟩ hee'\n[GOAL]\ncase intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne e' : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhse : e ≈ ofSet s hs\nhee' : e' ≈ e\n⊢ e' ∈ {e | ∃ s h, e ≈ ofSet s h}\n[PROOFSTEP]\nexact ⟨s, hs, Setoid.trans hee' hse⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\n⊢ ∀ {e : LocalHomeomorph H H},\n    e ∈ idRestrGroupoid → ∀ (s : Set H), IsOpen s → LocalHomeomorph.restr e s ∈ idRestrGroupoid\n[PROOFSTEP]\nrintro e ⟨s', hs', he⟩ s hs\n[GOAL]\ncase intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\ns' : Set H\nhs' : IsOpen s'\nhe : e ≈ ofSet s' hs'\ns : Set H\nhs : IsOpen s\n⊢ LocalHomeomorph.restr e s ∈ idRestrGroupoid\n[PROOFSTEP]\nuse s' ∩ s, IsOpen.inter hs' hs\n[GOAL]\ncase h\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\ns' : Set H\nhs' : IsOpen s'\nhe : e ≈ ofSet s' hs'\ns : Set H\nhs : IsOpen s\n⊢ LocalHomeomorph.restr e s ≈ ofSet (s' ∩ s) (_ : IsOpen (s' ∩ s))\n[PROOFSTEP]\nrefine' Setoid.trans (LocalHomeomorph.EqOnSource.restr he s) _\n[GOAL]\ncase h\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\ns' : Set H\nhs' : IsOpen s'\nhe : e ≈ ofSet s' hs'\ns : Set H\nhs : IsOpen s\n⊢ LocalHomeomorph.restr (ofSet s' hs') s ≈ ofSet (s' ∩ s) (_ : IsOpen (s' ∩ s))\n[PROOFSTEP]\nexact ⟨by simp only [hs.interior_eq, mfld_simps], by simp only [mfld_simps, eqOn_refl]⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\ns' : Set H\nhs' : IsOpen s'\nhe : e ≈ ofSet s' hs'\ns : Set H\nhs : IsOpen s\n⊢ (LocalHomeomorph.restr (ofSet s' hs') s).toLocalEquiv.source =\n    (ofSet (s' ∩ s) (_ : IsOpen (s' ∩ s))).toLocalEquiv.source\n[PROOFSTEP]\nsimp only [hs.interior_eq, mfld_simps]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\ne : LocalHomeomorph H H\ns' : Set H\nhs' : IsOpen s'\nhe : e ≈ ofSet s' hs'\ns : Set H\nhs : IsOpen s\n⊢ EqOn (↑(LocalHomeomorph.restr (ofSet s' hs') s)) (↑(ofSet (s' ∩ s) (_ : IsOpen (s' ∩ s))))\n    (LocalHomeomorph.restr (ofSet s' hs') s).toLocalEquiv.source\n[PROOFSTEP]\nsimp only [mfld_simps, eqOn_refl]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\n⊢ ClosedUnderRestriction G ↔ idRestrGroupoid ≤ G\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\n⊢ ClosedUnderRestriction G → idRestrGroupoid ≤ G\n[PROOFSTEP]\nintro _i\n[GOAL]\ncase mp\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\n_i : ClosedUnderRestriction G\n⊢ idRestrGroupoid ≤ G\n[PROOFSTEP]\napply StructureGroupoid.le_iff.mpr\n[GOAL]\ncase mp\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\n_i : ClosedUnderRestriction G\n⊢ ∀ (e : LocalHomeomorph H H), e ∈ idRestrGroupoid → e ∈ G\n[PROOFSTEP]\nrintro e ⟨s, hs, hes⟩\n[GOAL]\ncase mp.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\n_i : ClosedUnderRestriction G\ne : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhes : e ≈ ofSet s hs\n⊢ e ∈ G\n[PROOFSTEP]\nrefine' G.eq_on_source _ hes\n[GOAL]\ncase mp.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\n_i : ClosedUnderRestriction G\ne : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhes : e ≈ ofSet s hs\n⊢ ofSet s hs ∈ G\n[PROOFSTEP]\nconvert closedUnderRestriction' G.id_mem hs\n[GOAL]\ncase h.e'_4\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\n_i : ClosedUnderRestriction G\ne : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhes : e ≈ ofSet s hs\n⊢ ofSet s hs = LocalHomeomorph.restr (LocalHomeomorph.refl H) s\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_4.h\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\n_i : ClosedUnderRestriction G\ne : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhes : e ≈ ofSet s hs\nx✝ : H\n⊢ ↑(ofSet s hs) x✝ = ↑(LocalHomeomorph.restr (LocalHomeomorph.refl H) s) x✝\n[PROOFSTEP]\nrw [LocalHomeomorph.restr_apply, LocalHomeomorph.refl_apply, id, ofSet_apply, id_eq]\n[GOAL]\ncase h.e'_4.hinv\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\n_i : ClosedUnderRestriction G\ne : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhes : e ≈ ofSet s hs\nx✝ : H\n⊢ ↑(LocalHomeomorph.symm (ofSet s hs)) x✝ =\n    ↑(LocalHomeomorph.symm (LocalHomeomorph.restr (LocalHomeomorph.refl H) s)) x✝\n[PROOFSTEP]\nsimp [hs]\n[GOAL]\ncase h.e'_4.hs.h\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\n_i : ClosedUnderRestriction G\ne : LocalHomeomorph H H\ns : Set H\nhs : IsOpen s\nhes : e ≈ ofSet s hs\nx✝ : H\n⊢ x✝ ∈ (ofSet s hs).toLocalEquiv.source ↔ x✝ ∈ (LocalHomeomorph.restr (LocalHomeomorph.refl H) s).toLocalEquiv.source\n[PROOFSTEP]\nsimp [hs.interior_eq]\n[GOAL]\ncase mpr\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\n⊢ idRestrGroupoid ≤ G → ClosedUnderRestriction G\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\nh : idRestrGroupoid ≤ G\n⊢ ClosedUnderRestriction G\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.closedUnderRestriction\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\nh : idRestrGroupoid ≤ G\n⊢ ∀ {e : LocalHomeomorph H H}, e ∈ G → ∀ (s : Set H), IsOpen s → LocalHomeomorph.restr e s ∈ G\n[PROOFSTEP]\nintro e he s hs\n[GOAL]\ncase mpr.closedUnderRestriction\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\nh : idRestrGroupoid ≤ G\ne : LocalHomeomorph H H\nhe : e ∈ G\ns : Set H\nhs : IsOpen s\n⊢ LocalHomeomorph.restr e s ∈ G\n[PROOFSTEP]\nrw [← ofSet_trans (e : LocalHomeomorph H H) hs]\n[GOAL]\ncase mpr.closedUnderRestriction\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\nh : idRestrGroupoid ≤ G\ne : LocalHomeomorph H H\nhe : e ∈ G\ns : Set H\nhs : IsOpen s\n⊢ ofSet s hs ≫ₕ e ∈ G\n[PROOFSTEP]\nrefine' G.trans _ he\n[GOAL]\ncase mpr.closedUnderRestriction\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\nh : idRestrGroupoid ≤ G\ne : LocalHomeomorph H H\nhe : e ∈ G\ns : Set H\nhs : IsOpen s\n⊢ ofSet s hs ∈ G\n[PROOFSTEP]\napply StructureGroupoid.le_iff.mp h\n[GOAL]\ncase mpr.closedUnderRestriction.a\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\nh : idRestrGroupoid ≤ G\ne : LocalHomeomorph H H\nhe : e ∈ G\ns : Set H\nhs : IsOpen s\n⊢ ofSet s hs ∈ idRestrGroupoid\n[PROOFSTEP]\nexact idRestrGroupoid_mem hs\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SecondCountableTopology H\ns : Set M\nhs : ⋃ (x : M) (_ : x ∈ s), (chartAt H x).toLocalEquiv.source = univ\nhsc : Set.Countable s\n⊢ SecondCountableTopology M\n[PROOFSTEP]\nhaveI : ∀ x : M, SecondCountableTopology (chartAt H x).source := fun x ↦\n  (chartAt (H := H) x).secondCountableTopology_source\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SecondCountableTopology H\ns : Set M\nhs : ⋃ (x : M) (_ : x ∈ s), (chartAt H x).toLocalEquiv.source = univ\nhsc : Set.Countable s\nthis : ∀ (x : M), SecondCountableTopology ↑(chartAt H x).toLocalEquiv.source\n⊢ SecondCountableTopology M\n[PROOFSTEP]\nhaveI := hsc.toEncodable\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SecondCountableTopology H\ns : Set M\nhs : ⋃ (x : M) (_ : x ∈ s), (chartAt H x).toLocalEquiv.source = univ\nhsc : Set.Countable s\nthis✝ : ∀ (x : M), SecondCountableTopology ↑(chartAt H x).toLocalEquiv.source\nthis : Encodable ↑s\n⊢ SecondCountableTopology M\n[PROOFSTEP]\nrw [biUnion_eq_iUnion] at hs \n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SecondCountableTopology H\ns : Set M\nhs : ⋃ (x : ↑s), (chartAt H ↑x).toLocalEquiv.source = univ\nhsc : Set.Countable s\nthis✝ : ∀ (x : M), SecondCountableTopology ↑(chartAt H x).toLocalEquiv.source\nthis : Encodable ↑s\n⊢ SecondCountableTopology M\n[PROOFSTEP]\nexact secondCountableTopology_of_countable_cover (fun x : s ↦ (chartAt H (x : M)).open_source) hs\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SecondCountableTopology H\ninst✝ : SigmaCompactSpace M\n⊢ SecondCountableTopology M\n[PROOFSTEP]\nobtain ⟨s, hsc, hsU⟩ : ∃ s, Set.Countable s ∧ ⋃ (x) (_ : x ∈ s), (chartAt H x).source = univ :=\n  countable_cover_nhds_of_sigma_compact fun x : M ↦ chart_source_mem_nhds H x\n[GOAL]\ncase intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SecondCountableTopology H\ninst✝ : SigmaCompactSpace M\ns : Set M\nhsc : Set.Countable s\nhsU : ⋃ (x : M) (_ : x ∈ s), (chartAt H x).toLocalEquiv.source = univ\n⊢ SecondCountableTopology M\n[PROOFSTEP]\nexact ChartedSpace.secondCountable_of_countable_cover H hsU hsc\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : LocallyCompactSpace H\n⊢ LocallyCompactSpace M\n[PROOFSTEP]\nhave :\n  ∀ x : M,\n    (𝓝 x).HasBasis (fun s ↦ s ∈ 𝓝 (chartAt H x x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target) fun s ↦\n      (chartAt H x).symm '' s :=\n  fun x ↦ by\n  rw [← (chartAt H x).symm_map_nhds_eq (mem_chart_source H x)]\n  exact ((compact_basis_nhds (chartAt H x x)).hasBasis_self_subset (chart_target_mem_nhds H x)).map _\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : LocallyCompactSpace H\nx : M\n⊢ HasBasis (𝓝 x) (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).toLocalEquiv.target) fun s =>\n    ↑(LocalHomeomorph.symm (chartAt H x)) '' s\n[PROOFSTEP]\nrw [← (chartAt H x).symm_map_nhds_eq (mem_chart_source H x)]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : LocallyCompactSpace H\nx : M\n⊢ HasBasis (map (↑(LocalHomeomorph.symm (chartAt H x))) (𝓝 (↑(chartAt H x) x)))\n    (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).toLocalEquiv.target) fun s =>\n    ↑(LocalHomeomorph.symm (chartAt H x)) '' s\n[PROOFSTEP]\nexact ((compact_basis_nhds (chartAt H x x)).hasBasis_self_subset (chart_target_mem_nhds H x)).map _\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : LocallyCompactSpace H\nthis :\n  ∀ (x : M),\n    HasBasis (𝓝 x) (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).toLocalEquiv.target) fun s =>\n      ↑(LocalHomeomorph.symm (chartAt H x)) '' s\n⊢ LocallyCompactSpace M\n[PROOFSTEP]\nrefine locallyCompactSpace_of_hasBasis this ?_\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : LocallyCompactSpace H\nthis :\n  ∀ (x : M),\n    HasBasis (𝓝 x) (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).toLocalEquiv.target) fun s =>\n      ↑(LocalHomeomorph.symm (chartAt H x)) '' s\n⊢ ∀ (x : M) (i : Set H),\n    i ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact i ∧ i ⊆ (chartAt H x).toLocalEquiv.target →\n      IsCompact (↑(LocalHomeomorph.symm (chartAt H x)) '' i)\n[PROOFSTEP]\nrintro x s ⟨_, h₂, h₃⟩\n[GOAL]\ncase intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : LocallyCompactSpace H\nthis :\n  ∀ (x : M),\n    HasBasis (𝓝 x) (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).toLocalEquiv.target) fun s =>\n      ↑(LocalHomeomorph.symm (chartAt H x)) '' s\nx : M\ns : Set H\nleft✝ : s ∈ 𝓝 (↑(chartAt H x) x)\nh₂ : IsCompact s\nh₃ : s ⊆ (chartAt H x).toLocalEquiv.target\n⊢ IsCompact (↑(LocalHomeomorph.symm (chartAt H x)) '' s)\n[PROOFSTEP]\nexact h₂.image_of_continuousOn ((chartAt H x).continuousOn_symm.mono h₃)\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : LocallyConnectedSpace H\n⊢ LocallyConnectedSpace M\n[PROOFSTEP]\nlet e : M → LocalHomeomorph M H := chartAt H\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : LocallyConnectedSpace H\ne : M → LocalHomeomorph M H := chartAt H\n⊢ LocallyConnectedSpace M\n[PROOFSTEP]\nrefine'\n  locallyConnectedSpace_of_connected_bases (fun x s ↦ (e x).symm '' s)\n    (fun x s ↦ (IsOpen s ∧ e x x ∈ s ∧ IsConnected s) ∧ s ⊆ (e x).target) _ _\n[GOAL]\ncase refine'_1\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : LocallyConnectedSpace H\ne : M → LocalHomeomorph M H := chartAt H\n⊢ ∀ (x : M),\n    HasBasis (𝓝 x) ((fun x s => (IsOpen s ∧ ↑(e x) x ∈ s ∧ IsConnected s) ∧ s ⊆ (e x).target) x)\n      ((fun x s => ↑(LocalHomeomorph.symm (e x)) '' s) x)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_1\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : LocallyConnectedSpace H\ne : M → LocalHomeomorph M H := chartAt H\nx : M\n⊢ HasBasis (𝓝 x) ((fun x s => (IsOpen s ∧ ↑(e x) x ∈ s ∧ IsConnected s) ∧ s ⊆ (e x).target) x)\n    ((fun x s => ↑(LocalHomeomorph.symm (e x)) '' s) x)\n[PROOFSTEP]\nsimpa only [LocalHomeomorph.symm_map_nhds_eq, mem_chart_source] using\n  ((LocallyConnectedSpace.open_connected_basis (e x x)).restrict_subset\n        ((e x).open_target.mem_nhds (mem_chart_target H x))).map\n    (e x).symm\n[GOAL]\ncase refine'_2\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : LocallyConnectedSpace H\ne : M → LocalHomeomorph M H := chartAt H\n⊢ ∀ (x : M) (i : Set H),\n    (fun x s => (IsOpen s ∧ ↑(e x) x ∈ s ∧ IsConnected s) ∧ s ⊆ (e x).target) x i →\n      IsPreconnected ((fun x s => ↑(LocalHomeomorph.symm (e x)) '' s) x i)\n[PROOFSTEP]\nrintro x s ⟨⟨-, -, hsconn⟩, hssubset⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : LocallyConnectedSpace H\ne : M → LocalHomeomorph M H := chartAt H\nx : M\ns : Set H\nhssubset : s ⊆ (e x).target\nhsconn : IsConnected s\n⊢ IsPreconnected ((fun x s => ↑(LocalHomeomorph.symm (e x)) '' s) x s)\n[PROOFSTEP]\nexact hsconn.isPreconnected.image _ ((e x).continuousOn_symm.mono hssubset)\n[GOAL]\nH✝ : Type u\nH'✝ : Type u_1\nM✝ : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁷ : TopologicalSpace H✝\ninst✝⁶ : TopologicalSpace M✝\ninst✝⁵ : ChartedSpace H✝ M✝\nH : Type u_5\ninst✝⁴ : TopologicalSpace H\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nM : Type u_7\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H H'\ninst✝ : ChartedSpace H' M\np : M\n⊢ p ∈ ((fun p => chartAt H' p ≫ₕ chartAt H (↑(chartAt H' p) p)) p).source\n[PROOFSTEP]\nsimp only [mfld_simps]\n[GOAL]\nH✝ : Type u\nH'✝ : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\nH : Type u_5\nH' : Type u_6\nα : Type u_7\nf : H → α\n⊢ (range fun p => (f p.fst, p.snd)) = range f ×ˢ univ\n[PROOFSTEP]\nrw [prod_range_univ_eq]\n[GOAL]\nH✝ : Type u\nH'✝ : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\nH : Type u_5\nH' : Type u_6\nα : Type u_7\nf : H → α\n⊢ (range fun p => (f p.fst, p.snd)) = range fun p => (f p.fst, p.snd)\n[PROOFSTEP]\nrfl\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁵ : TopologicalSpace H\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : TopologicalSpace H'\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\nx : M × M'\n⊢ prodChartedSpace H H H' H' = chartedSpaceSelf (H × H')\n[PROOFSTEP]\next1\n[GOAL]\ncase atlas\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁵ : TopologicalSpace H\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : TopologicalSpace H'\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\nx : M × M'\n⊢ ChartedSpace.atlas = ChartedSpace.atlas\n[PROOFSTEP]\nsimp [prodChartedSpace, atlas, ChartedSpace.atlas]\n[GOAL]\ncase chartAt\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁵ : TopologicalSpace H\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : TopologicalSpace H'\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\nx : M × M'\n⊢ ChartedSpace.chartAt = ChartedSpace.chartAt\n[PROOFSTEP]\next1\n[GOAL]\ncase chartAt.h\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁵ : TopologicalSpace H\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : TopologicalSpace H'\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\nx : M × M'\nx✝ : H × H'\n⊢ ChartedSpace.chartAt x✝ = ChartedSpace.chartAt x✝\n[PROOFSTEP]\nsimp only [prodChartedSpace_chartAt, chartAt_self_eq, refl_prod_refl]\n[GOAL]\ncase chartAt.h\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁵ : TopologicalSpace H\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : TopologicalSpace H'\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\nx : M × M'\nx✝ : H × H'\n⊢ LocalHomeomorph.refl (H × H') = LocalHomeomorph.refl (ModelProd H H')\n[PROOFSTEP]\nrfl\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne : LocalEquiv M H\nhe : e ∈ c.atlas\n⊢ IsOpen e.source\n[PROOFSTEP]\napply TopologicalSpace.GenerateOpen.basic\n[GOAL]\ncase a\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne : LocalEquiv M H\nhe : e ∈ c.atlas\n⊢ e.source ∈ ⋃ (e : LocalEquiv M H) (_ : e ∈ c.atlas) (s : Set H) (_ : IsOpen s), {↑e ⁻¹' s ∩ e.source}\n[PROOFSTEP]\nsimp only [exists_prop, mem_iUnion, mem_singleton_iff]\n[GOAL]\ncase a\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne : LocalEquiv M H\nhe : e ∈ c.atlas\n⊢ ∃ i, i ∈ c.atlas ∧ ∃ i_1, IsOpen i_1 ∧ e.source = ↑i ⁻¹' i_1 ∩ i.source\n[PROOFSTEP]\nrefine' ⟨e, he, univ, isOpen_univ, _⟩\n[GOAL]\ncase a\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne : LocalEquiv M H\nhe : e ∈ c.atlas\n⊢ e.source = ↑e ⁻¹' univ ∩ e.source\n[PROOFSTEP]\nsimp only [Set.univ_inter, Set.preimage_univ]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne : LocalEquiv M H\nhe : e ∈ c.atlas\n⊢ IsOpen e.target\n[PROOFSTEP]\nhave E : e.target ∩ e.symm ⁻¹' e.source = e.target :=\n  Subset.antisymm (inter_subset_left _ _) fun x hx ↦ ⟨hx, LocalEquiv.target_subset_preimage_source _ hx⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne : LocalEquiv M H\nhe : e ∈ c.atlas\nE : e.target ∩ ↑(LocalEquiv.symm e) ⁻¹' e.source = e.target\n⊢ IsOpen e.target\n[PROOFSTEP]\nsimpa [LocalEquiv.trans_source, E] using c.open_source e e he he\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\n⊢ IsOpen\n    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.source\n[PROOFSTEP]\nconvert c.open_source' he\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\n⊢ IsOpen\n    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target\n[PROOFSTEP]\nconvert c.open_target he\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\n⊢ ContinuousOn\n    ↑{ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }\n    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.source\n[PROOFSTEP]\nletI : TopologicalSpace M := c.toTopologicalSpace\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\n⊢ ContinuousOn\n    ↑{ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }\n    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.source\n[PROOFSTEP]\nrw [continuousOn_open_iff (c.open_source' he)]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\n⊢ ∀ (t : Set H),\n    IsOpen t →\n      IsOpen\n        (e.source ∩\n          ↑{ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n                map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n                map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n                left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n                right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) } ⁻¹'\n            t)\n[PROOFSTEP]\nintro s s_open\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\ns : Set H\ns_open : IsOpen s\n⊢ IsOpen\n    (e.source ∩\n      ↑{ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) } ⁻¹'\n        s)\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\ns : Set H\ns_open : IsOpen s\n⊢ IsOpen\n    (↑{ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) } ⁻¹'\n        s ∩\n      e.source)\n[PROOFSTEP]\napply TopologicalSpace.GenerateOpen.basic\n[GOAL]\ncase a\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\ns : Set H\ns_open : IsOpen s\n⊢ ↑{ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) } ⁻¹'\n        s ∩\n      e.source ∈\n    ⋃ (e : LocalEquiv M H) (_ : e ∈ c.atlas) (s : Set H) (_ : IsOpen s), {↑e ⁻¹' s ∩ e.source}\n[PROOFSTEP]\nsimp only [exists_prop, mem_iUnion, mem_singleton_iff]\n[GOAL]\ncase a\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\ns : Set H\ns_open : IsOpen s\n⊢ ∃ i, i ∈ c.atlas ∧ ∃ i_1, IsOpen i_1 ∧ ↑e ⁻¹' s ∩ e.source = ↑i ⁻¹' i_1 ∩ i.source\n[PROOFSTEP]\nexact ⟨e, he, ⟨s, s_open, rfl⟩⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\n⊢ ContinuousOn\n    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun\n    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target\n[PROOFSTEP]\nletI : TopologicalSpace M := c.toTopologicalSpace\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\n⊢ ContinuousOn\n    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun\n    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target\n[PROOFSTEP]\napply continuousOn_open_of_generateFrom\n[GOAL]\ncase h\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\n⊢ ∀ (t : Set M),\n    t ∈ ⋃ (e : LocalEquiv M H) (_ : e ∈ c.atlas) (s : Set H) (_ : IsOpen s), {↑e ⁻¹' s ∩ e.source} →\n      IsOpen\n        ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n              map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n              map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n              left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n              right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩\n          { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n                map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n                map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n                left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n                right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'\n            t)\n[PROOFSTEP]\nintro t ht\n[GOAL]\ncase h\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nt : Set M\nht : t ∈ ⋃ (e : LocalEquiv M H) (_ : e ∈ c.atlas) (s : Set H) (_ : IsOpen s), {↑e ⁻¹' s ∩ e.source}\n⊢ IsOpen\n    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩\n      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'\n        t)\n[PROOFSTEP]\nsimp only [exists_prop, mem_iUnion, mem_singleton_iff] at ht \n[GOAL]\ncase h\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nt : Set M\nht : ∃ i, i ∈ c.atlas ∧ ∃ i_1, IsOpen i_1 ∧ t = ↑i ⁻¹' i_1 ∩ i.source\n⊢ IsOpen\n    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩\n      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'\n        t)\n[PROOFSTEP]\nrcases ht with ⟨e', e'_atlas, s, s_open, ts⟩\n[GOAL]\ncase h.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nt : Set M\ne' : LocalEquiv M H\ne'_atlas : e' ∈ c.atlas\ns : Set H\ns_open : IsOpen s\nts : t = ↑e' ⁻¹' s ∩ e'.source\n⊢ IsOpen\n    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩\n      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'\n        t)\n[PROOFSTEP]\nrw [ts]\n[GOAL]\ncase h.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nt : Set M\ne' : LocalEquiv M H\ne'_atlas : e' ∈ c.atlas\ns : Set H\ns_open : IsOpen s\nts : t = ↑e' ⁻¹' s ∩ e'.source\n⊢ IsOpen\n    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩\n      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'\n        (↑e' ⁻¹' s ∩ e'.source))\n[PROOFSTEP]\nlet f := e.symm.trans e'\n[GOAL]\ncase h.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nt : Set M\ne' : LocalEquiv M H\ne'_atlas : e' ∈ c.atlas\ns : Set H\ns_open : IsOpen s\nts : t = ↑e' ⁻¹' s ∩ e'.source\nf : LocalEquiv H H := LocalEquiv.symm e ≫ e'\n⊢ IsOpen\n    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩\n      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'\n        (↑e' ⁻¹' s ∩ e'.source))\n[PROOFSTEP]\nhave : IsOpen (f ⁻¹' s ∩ f.source) := by\n  simpa [inter_comm] using\n    (continuousOn_open_iff (c.open_source e e' he e'_atlas)).1 (c.continuous_toFun e e' he e'_atlas) s s_open\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nt : Set M\ne' : LocalEquiv M H\ne'_atlas : e' ∈ c.atlas\ns : Set H\ns_open : IsOpen s\nts : t = ↑e' ⁻¹' s ∩ e'.source\nf : LocalEquiv H H := LocalEquiv.symm e ≫ e'\n⊢ IsOpen (↑f ⁻¹' s ∩ f.source)\n[PROOFSTEP]\nsimpa [inter_comm] using\n  (continuousOn_open_iff (c.open_source e e' he e'_atlas)).1 (c.continuous_toFun e e' he e'_atlas) s s_open\n[GOAL]\ncase h.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nt : Set M\ne' : LocalEquiv M H\ne'_atlas : e' ∈ c.atlas\ns : Set H\ns_open : IsOpen s\nts : t = ↑e' ⁻¹' s ∩ e'.source\nf : LocalEquiv H H := LocalEquiv.symm e ≫ e'\nthis : IsOpen (↑f ⁻¹' s ∩ f.source)\n⊢ IsOpen\n    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩\n      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'\n        (↑e' ⁻¹' s ∩ e'.source))\n[PROOFSTEP]\nhave A :\n  e' ∘ e.symm ⁻¹' s ∩ (e.target ∩ e.symm ⁻¹' e'.source) = e.target ∩ (e' ∘ e.symm ⁻¹' s ∩ e.symm ⁻¹' e'.source) :=\n  by\n  rw [← inter_assoc, ← inter_assoc]\n  congr 1\n  exact inter_comm _ _\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nt : Set M\ne' : LocalEquiv M H\ne'_atlas : e' ∈ c.atlas\ns : Set H\ns_open : IsOpen s\nts : t = ↑e' ⁻¹' s ∩ e'.source\nf : LocalEquiv H H := LocalEquiv.symm e ≫ e'\nthis : IsOpen (↑f ⁻¹' s ∩ f.source)\n⊢ ↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ (e.target ∩ ↑(LocalEquiv.symm e) ⁻¹' e'.source) =\n    e.target ∩ (↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ ↑(LocalEquiv.symm e) ⁻¹' e'.source)\n[PROOFSTEP]\nrw [← inter_assoc, ← inter_assoc]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nt : Set M\ne' : LocalEquiv M H\ne'_atlas : e' ∈ c.atlas\ns : Set H\ns_open : IsOpen s\nts : t = ↑e' ⁻¹' s ∩ e'.source\nf : LocalEquiv H H := LocalEquiv.symm e ≫ e'\nthis : IsOpen (↑f ⁻¹' s ∩ f.source)\n⊢ ↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ e.target ∩ ↑(LocalEquiv.symm e) ⁻¹' e'.source =\n    e.target ∩ ↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ ↑(LocalEquiv.symm e) ⁻¹' e'.source\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nt : Set M\ne' : LocalEquiv M H\ne'_atlas : e' ∈ c.atlas\ns : Set H\ns_open : IsOpen s\nts : t = ↑e' ⁻¹' s ∩ e'.source\nf : LocalEquiv H H := LocalEquiv.symm e ≫ e'\nthis : IsOpen (↑f ⁻¹' s ∩ f.source)\n⊢ ↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ e.target = e.target ∩ ↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s\n[PROOFSTEP]\nexact inter_comm _ _\n[GOAL]\ncase h.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne✝ e : LocalEquiv M H\nhe : e ∈ c.atlas\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nthis✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nt : Set M\ne' : LocalEquiv M H\ne'_atlas : e' ∈ c.atlas\ns : Set H\ns_open : IsOpen s\nts : t = ↑e' ⁻¹' s ∩ e'.source\nf : LocalEquiv H H := LocalEquiv.symm e ≫ e'\nthis : IsOpen (↑f ⁻¹' s ∩ f.source)\nA :\n  ↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ (e.target ∩ ↑(LocalEquiv.symm e) ⁻¹' e'.source) =\n    e.target ∩ (↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ ↑(LocalEquiv.symm e) ⁻¹' e'.source)\n⊢ IsOpen\n    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩\n      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,\n            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),\n            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),\n            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),\n            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'\n        (↑e' ⁻¹' s ∩ e'.source))\n[PROOFSTEP]\nsimpa [LocalEquiv.trans_source, preimage_inter, preimage_comp.symm, A] using this\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne : LocalEquiv M H\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nx : M\n⊢ (fun x => ChartedSpaceCore.localHomeomorph c (chartAt c x) (_ : chartAt c x ∈ c.atlas)) x ∈\n    ⋃ (e : LocalEquiv M H) (he : e ∈ c.atlas), {ChartedSpaceCore.localHomeomorph c e he}\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_singleton_iff]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝ : TopologicalSpace H\nc : ChartedSpaceCore H M\ne : LocalEquiv M H\nsrc✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c\nx : M\n⊢ ∃ i h,\n    ChartedSpaceCore.localHomeomorph c (chartAt c x) (_ : chartAt c x ∈ c.atlas) =\n      ChartedSpaceCore.localHomeomorph c i (_ : i ∈ c.atlas)\n[PROOFSTEP]\nexact ⟨c.chartAt x, c.chart_mem_atlas x, rfl⟩\n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H✝\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H✝ M\nH : Type u_5\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\ne e' : LocalHomeomorph H H\nhe : e ∈ atlas H H\nhe' : e' ∈ atlas H H\n⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G\n[PROOFSTEP]\nrw [chartedSpaceSelf_atlas] at he he' \n[GOAL]\nH✝ : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H✝\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H✝ M\nH : Type u_5\ninst✝ : TopologicalSpace H\nG : StructureGroupoid H\ne e' : LocalHomeomorph H H\nhe : e = LocalHomeomorph.refl H\nhe' : e' = LocalHomeomorph.refl H\n⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G\n[PROOFSTEP]\nsimp [he, he', StructureGroupoid.id_mem]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\n⊢ HasGroupoid M (continuousGroupoid H)\n[PROOFSTEP]\nrefine' ⟨fun _ _ ↦ _⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\ne✝ e'✝ : LocalHomeomorph M H\nx✝¹ : e✝ ∈ atlas H M\nx✝ : e'✝ ∈ atlas H M\n⊢ LocalHomeomorph.symm e✝ ≫ₕ e'✝ ∈ continuousGroupoid H\n[PROOFSTEP]\nrw [continuousGroupoid, mem_groupoid_of_pregroupoid]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\ne✝ e'✝ : LocalHomeomorph M H\nx✝¹ : e✝ ∈ atlas H M\nx✝ : e'✝ ∈ atlas H M\n⊢ Pregroupoid.property (continuousPregroupoid H) (↑(LocalHomeomorph.symm e✝ ≫ₕ e'✝))\n      (LocalHomeomorph.symm e✝ ≫ₕ e'✝).toLocalEquiv.source ∧\n    Pregroupoid.property (continuousPregroupoid H) (↑(LocalHomeomorph.symm (LocalHomeomorph.symm e✝ ≫ₕ e'✝)))\n      (LocalHomeomorph.symm e✝ ≫ₕ e'✝).toLocalEquiv.target\n[PROOFSTEP]\nsimp only [and_self_iff]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\n⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G\n[PROOFSTEP]\nrefine' G.locality fun x hx ↦ _\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\n⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G\n[PROOFSTEP]\nset f := chartAt (H := H) (e.symm x)\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\n⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G\n[PROOFSTEP]\nlet s := e.target ∩ e.symm ⁻¹' f.source\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\n⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G\n[PROOFSTEP]\nhave hs : IsOpen s := by apply e.symm.continuous_toFun.preimage_open_of_open <;> apply open_source\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\n⊢ IsOpen s\n[PROOFSTEP]\napply e.symm.continuous_toFun.preimage_open_of_open\n[GOAL]\ncase hs\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\n⊢ IsOpen (LocalHomeomorph.symm e).toLocalEquiv.source\n[PROOFSTEP]\napply open_source\n[GOAL]\ncase ht\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\n⊢ IsOpen f.source\n[PROOFSTEP]\napply open_source\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\n⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G\n[PROOFSTEP]\nhave xs : x ∈ s := by\n  simp only [mem_inter_iff, mem_preimage, mem_chart_source, and_true]\n  exact ((mem_inter_iff _ _ _).1 hx).1\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\n⊢ x ∈ s\n[PROOFSTEP]\nsimp only [mem_inter_iff, mem_preimage, mem_chart_source, and_true]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\n⊢ x ∈ e.target\n[PROOFSTEP]\nexact ((mem_inter_iff _ _ _).1 hx).1\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\nxs : x ∈ s\n⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G\n[PROOFSTEP]\nrefine' ⟨s, hs, xs, _⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\nxs : x ∈ s\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G\n[PROOFSTEP]\nhave A : e.symm ≫ₕ f ∈ G := (mem_maximalAtlas_iff.1 he f (chart_mem_atlas _ _)).1\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\nxs : x ∈ s\nA : LocalHomeomorph.symm e ≫ₕ f ∈ G\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G\n[PROOFSTEP]\nhave B : f.symm ≫ₕ e' ∈ G := (mem_maximalAtlas_iff.1 he' f (chart_mem_atlas _ _)).2\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\nxs : x ∈ s\nA : LocalHomeomorph.symm e ≫ₕ f ∈ G\nB : LocalHomeomorph.symm f ≫ₕ e' ∈ G\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G\n[PROOFSTEP]\nhave C : (e.symm ≫ₕ f) ≫ₕ f.symm ≫ₕ e' ∈ G := G.trans A B\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\nxs : x ∈ s\nA : LocalHomeomorph.symm e ≫ₕ f ∈ G\nB : LocalHomeomorph.symm f ≫ₕ e' ∈ G\nC : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G\n[PROOFSTEP]\nhave D : (e.symm ≫ₕ f) ≫ₕ f.symm ≫ₕ e' ≈ (e.symm ≫ₕ e').restr s :=\n  calc\n    (e.symm ≫ₕ f) ≫ₕ f.symm ≫ₕ e' = e.symm ≫ₕ (f ≫ₕ f.symm) ≫ₕ e' := by simp only [trans_assoc]\n    _ ≈ e.symm ≫ₕ ofSet f.source f.open_source ≫ₕ e' :=\n      (EqOnSource.trans' (refl _) (EqOnSource.trans' (trans_self_symm _) (refl _)))\n    _ ≈ (e.symm ≫ₕ ofSet f.source f.open_source) ≫ₕ e' := by rw [trans_assoc]\n    _ ≈ e.symm.restr s ≫ₕ e' := by rw [trans_of_set']; apply refl\n    _ ≈ (e.symm ≫ₕ e').restr s := by rw [restr_trans]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\nxs : x ∈ s\nA : LocalHomeomorph.symm e ≫ₕ f ∈ G\nB : LocalHomeomorph.symm f ≫ₕ e' ∈ G\nC : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G\n⊢ (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' =\n    LocalHomeomorph.symm e ≫ₕ (f ≫ₕ LocalHomeomorph.symm f) ≫ₕ e'\n[PROOFSTEP]\nsimp only [trans_assoc]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\nxs : x ∈ s\nA : LocalHomeomorph.symm e ≫ₕ f ∈ G\nB : LocalHomeomorph.symm f ≫ₕ e' ∈ G\nC : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G\n⊢ LocalHomeomorph.symm e ≫ₕ ofSet f.source (_ : IsOpen f.source) ≫ₕ e' ≈\n    (LocalHomeomorph.symm e ≫ₕ ofSet f.source (_ : IsOpen f.source)) ≫ₕ e'\n[PROOFSTEP]\nrw [trans_assoc]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\nxs : x ∈ s\nA : LocalHomeomorph.symm e ≫ₕ f ∈ G\nB : LocalHomeomorph.symm f ≫ₕ e' ∈ G\nC : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G\n⊢ (LocalHomeomorph.symm e ≫ₕ ofSet f.source (_ : IsOpen f.source)) ≫ₕ e' ≈\n    LocalHomeomorph.restr (LocalHomeomorph.symm e) s ≫ₕ e'\n[PROOFSTEP]\nrw [trans_of_set']\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\nxs : x ∈ s\nA : LocalHomeomorph.symm e ≫ₕ f ∈ G\nB : LocalHomeomorph.symm f ≫ₕ e' ∈ G\nC : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e)\n        ((LocalHomeomorph.symm e).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source) ≫ₕ\n      e' ≈\n    LocalHomeomorph.restr (LocalHomeomorph.symm e) s ≫ₕ e'\n[PROOFSTEP]\napply refl\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\nxs : x ∈ s\nA : LocalHomeomorph.symm e ≫ₕ f ∈ G\nB : LocalHomeomorph.symm f ≫ₕ e' ∈ G\nC : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e) s ≫ₕ e' ≈ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s\n[PROOFSTEP]\nrw [restr_trans]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\ne e' : LocalHomeomorph M H\nhe : e ∈ maximalAtlas M G\nhe' : e' ∈ maximalAtlas M G\nx : H\nhx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source\nf : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)\ns : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source\nhs : IsOpen s\nxs : x ∈ s\nA : LocalHomeomorph.symm e ≫ₕ f ∈ G\nB : LocalHomeomorph.symm f ≫ₕ e' ∈ G\nC : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G\nD :\n  (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ≈ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G\n[PROOFSTEP]\nexact G.eq_on_source C (Setoid.symm D)\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\n⊢ LocalHomeomorph.refl H ∈ atlas H H\n[PROOFSTEP]\nsimp\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\nf : LocalHomeomorph H H\nhf : f ∈ G\n⊢ f ∈ maximalAtlas H G\n[PROOFSTEP]\nrintro e (rfl : e = LocalHomeomorph.refl H)\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝² : TopologicalSpace H\ninst✝¹ : TopologicalSpace M\ninst✝ : ChartedSpace H M\nG : StructureGroupoid H\nf : LocalHomeomorph H H\nhf : f ∈ G\n⊢ LocalHomeomorph.symm f ≫ₕ LocalHomeomorph.refl H ∈ G ∧ LocalHomeomorph.symm (LocalHomeomorph.refl H) ≫ₕ f ∈ G\n[PROOFSTEP]\nexact ⟨G.trans (G.symm hf) G.id_mem, G.trans (G.symm G.id_mem) hf⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nα : Type u_5\ninst✝ : TopologicalSpace α\ne : LocalHomeomorph α H\nh : e.source = univ\nx✝ : α\n⊢ x✝ ∈ ((fun x => e) x✝).source\n[PROOFSTEP]\nrw [h]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nα : Type u_5\ninst✝ : TopologicalSpace α\ne : LocalHomeomorph α H\nh : e.source = univ\nx✝ : α\n⊢ x✝ ∈ univ\n[PROOFSTEP]\napply mem_univ\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nα : Type u_5\ninst✝ : TopologicalSpace α\ne : LocalHomeomorph α H\nh : e.source = univ\nx✝ : α\n⊢ (fun x => e) x✝ ∈ {e}\n[PROOFSTEP]\ntauto\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nα : Type u_5\ninst✝¹ : TopologicalSpace α\ne : LocalHomeomorph α H\nh : e.source = univ\nG : StructureGroupoid H\ninst✝ : ClosedUnderRestriction G\nsrc✝ : ChartedSpace H α := singletonChartedSpace e h\n⊢ ∀ {e_1 e' : LocalHomeomorph α H}, e_1 ∈ atlas H α → e' ∈ atlas H α → LocalHomeomorph.symm e_1 ≫ₕ e' ∈ G\n[PROOFSTEP]\nintro e' e'' he' he''\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nα : Type u_5\ninst✝¹ : TopologicalSpace α\ne : LocalHomeomorph α H\nh : e.source = univ\nG : StructureGroupoid H\ninst✝ : ClosedUnderRestriction G\nsrc✝ : ChartedSpace H α := singletonChartedSpace e h\ne' e'' : LocalHomeomorph α H\nhe' : e' ∈ atlas H α\nhe'' : e'' ∈ atlas H α\n⊢ LocalHomeomorph.symm e' ≫ₕ e'' ∈ G\n[PROOFSTEP]\nrw [e.singletonChartedSpace_mem_atlas_eq h e' he', e.singletonChartedSpace_mem_atlas_eq h e'' he'']\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nα : Type u_5\ninst✝¹ : TopologicalSpace α\ne : LocalHomeomorph α H\nh : e.source = univ\nG : StructureGroupoid H\ninst✝ : ClosedUnderRestriction G\nsrc✝ : ChartedSpace H α := singletonChartedSpace e h\ne' e'' : LocalHomeomorph α H\nhe' : e' ∈ atlas H α\nhe'' : e'' ∈ atlas H α\n⊢ LocalHomeomorph.symm e ≫ₕ e ∈ G\n[PROOFSTEP]\nrefine' G.eq_on_source _ e.trans_symm_self\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nα : Type u_5\ninst✝¹ : TopologicalSpace α\ne : LocalHomeomorph α H\nh : e.source = univ\nG : StructureGroupoid H\ninst✝ : ClosedUnderRestriction G\nsrc✝ : ChartedSpace H α := singletonChartedSpace e h\ne' e'' : LocalHomeomorph α H\nhe' : e' ∈ atlas H α\nhe'' : e'' ∈ atlas H α\n⊢ ofSet e.target (_ : IsOpen e.target) ∈ G\n[PROOFSTEP]\nhave hle : idRestrGroupoid ≤ G := (closedUnderRestriction_iff_id_le G).mp (by assumption)\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nα : Type u_5\ninst✝¹ : TopologicalSpace α\ne : LocalHomeomorph α H\nh : e.source = univ\nG : StructureGroupoid H\ninst✝ : ClosedUnderRestriction G\nsrc✝ : ChartedSpace H α := singletonChartedSpace e h\ne' e'' : LocalHomeomorph α H\nhe' : e' ∈ atlas H α\nhe'' : e'' ∈ atlas H α\n⊢ ClosedUnderRestriction G\n[PROOFSTEP]\nassumption\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nα : Type u_5\ninst✝¹ : TopologicalSpace α\ne : LocalHomeomorph α H\nh : e.source = univ\nG : StructureGroupoid H\ninst✝ : ClosedUnderRestriction G\nsrc✝ : ChartedSpace H α := singletonChartedSpace e h\ne' e'' : LocalHomeomorph α H\nhe' : e' ∈ atlas H α\nhe'' : e'' ∈ atlas H α\nhle : idRestrGroupoid ≤ G\n⊢ ofSet e.target (_ : IsOpen e.target) ∈ G\n[PROOFSTEP]\nexact StructureGroupoid.le_iff.mp hle _ (idRestrGroupoid_mem _)\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nG : StructureGroupoid H\ninst✝ : HasGroupoid M G\ns : Opens M\nx : { x // x ∈ s }\n⊢ (fun x => subtypeRestr (chartAt H ↑x) s) x ∈ ⋃ (x : { x // x ∈ s }), {subtypeRestr (chartAt H ↑x) s}\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_singleton_iff]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nG : StructureGroupoid H\ninst✝ : HasGroupoid M G\ns : Opens M\nx : { x // x ∈ s }\n⊢ ∃ i, subtypeRestr (chartAt H ↑x) s = subtypeRestr (chartAt H ↑i) s\n[PROOFSTEP]\nuse x\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nG : StructureGroupoid H\ninst✝¹ : HasGroupoid M G\ns : Opens M\ninst✝ : ClosedUnderRestriction G\n⊢ ∀ {e e' : LocalHomeomorph { x // x ∈ s } H},\n    e ∈ atlas H { x // x ∈ s } → e' ∈ atlas H { x // x ∈ s } → LocalHomeomorph.symm e ≫ₕ e' ∈ G\n[PROOFSTEP]\nrintro e e' ⟨_, ⟨x, hc⟩, he⟩ ⟨_, ⟨x', hc'⟩, he'⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nG : StructureGroupoid H\ninst✝¹ : HasGroupoid M G\ns : Opens M\ninst✝ : ClosedUnderRestriction G\ne e' : LocalHomeomorph { x // x ∈ s } H\nw✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)\nhe : e ∈ w✝¹\nx : { x // x ∈ s }\nhc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹\nw✝ : Set (LocalHomeomorph { x // x ∈ s } H)\nhe' : e' ∈ w✝\nx' : { x // x ∈ s }\nhc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝\n⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G\n[PROOFSTEP]\nhaveI : Nonempty s := ⟨x⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nG : StructureGroupoid H\ninst✝¹ : HasGroupoid M G\ns : Opens M\ninst✝ : ClosedUnderRestriction G\ne e' : LocalHomeomorph { x // x ∈ s } H\nw✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)\nhe : e ∈ w✝¹\nx : { x // x ∈ s }\nhc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹\nw✝ : Set (LocalHomeomorph { x // x ∈ s } H)\nhe' : e' ∈ w✝\nx' : { x // x ∈ s }\nhc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝\nthis : Nonempty { x // x ∈ s }\n⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G\n[PROOFSTEP]\nhave asdf := he\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nG : StructureGroupoid H\ninst✝¹ : HasGroupoid M G\ns : Opens M\ninst✝ : ClosedUnderRestriction G\ne e' : LocalHomeomorph { x // x ∈ s } H\nw✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)\nhe : e ∈ w✝¹\nx : { x // x ∈ s }\nhc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹\nw✝ : Set (LocalHomeomorph { x // x ∈ s } H)\nhe' : e' ∈ w✝\nx' : { x // x ∈ s }\nhc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝\nthis : Nonempty { x // x ∈ s }\nasdf : e ∈ w✝¹\n⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G\n[PROOFSTEP]\nrw [hc.symm, mem_singleton_iff] at he \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nG : StructureGroupoid H\ninst✝¹ : HasGroupoid M G\ns : Opens M\ninst✝ : ClosedUnderRestriction G\ne e' : LocalHomeomorph { x // x ∈ s } H\nw✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)\nx : { x // x ∈ s }\nhe : e = subtypeRestr (chartAt H ↑x) s\nhc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹\nw✝ : Set (LocalHomeomorph { x // x ∈ s } H)\nhe' : e' ∈ w✝\nx' : { x // x ∈ s }\nhc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝\nthis : Nonempty { x // x ∈ s }\nasdf : e ∈ w✝¹\n⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G\n[PROOFSTEP]\nrw [hc'.symm, mem_singleton_iff] at he' \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nG : StructureGroupoid H\ninst✝¹ : HasGroupoid M G\ns : Opens M\ninst✝ : ClosedUnderRestriction G\ne e' : LocalHomeomorph { x // x ∈ s } H\nw✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)\nx : { x // x ∈ s }\nhe : e = subtypeRestr (chartAt H ↑x) s\nhc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹\nw✝ : Set (LocalHomeomorph { x // x ∈ s } H)\nx' : { x // x ∈ s }\nhe' : e' = subtypeRestr (chartAt H ↑x') s\nhc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝\nthis : Nonempty { x // x ∈ s }\nasdf : e ∈ w✝¹\n⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G\n[PROOFSTEP]\nrw [he, he']\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nG : StructureGroupoid H\ninst✝¹ : HasGroupoid M G\ns : Opens M\ninst✝ : ClosedUnderRestriction G\ne e' : LocalHomeomorph { x // x ∈ s } H\nw✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)\nx : { x // x ∈ s }\nhe : e = subtypeRestr (chartAt H ↑x) s\nhc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹\nw✝ : Set (LocalHomeomorph { x // x ∈ s } H)\nx' : { x // x ∈ s }\nhe' : e' = subtypeRestr (chartAt H ↑x') s\nhc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝\nthis : Nonempty { x // x ∈ s }\nasdf : e ∈ w✝¹\n⊢ LocalHomeomorph.symm (subtypeRestr (chartAt H ↑x) s) ≫ₕ subtypeRestr (chartAt H ↑x') s ∈ G\n[PROOFSTEP]\nrefine' G.eq_on_source _ (subtypeRestr_symm_trans_subtypeRestr s (chartAt H x) (chartAt H x'))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nG : StructureGroupoid H\ninst✝¹ : HasGroupoid M G\ns : Opens M\ninst✝ : ClosedUnderRestriction G\ne e' : LocalHomeomorph { x // x ∈ s } H\nw✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)\nx : { x // x ∈ s }\nhe : e = subtypeRestr (chartAt H ↑x) s\nhc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹\nw✝ : Set (LocalHomeomorph { x // x ∈ s } H)\nx' : { x // x ∈ s }\nhe' : e' = subtypeRestr (chartAt H ↑x') s\nhc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝\nthis : Nonempty { x // x ∈ s }\nasdf : e ∈ w✝¹\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm (chartAt H ↑x) ≫ₕ chartAt H ↑x')\n      ((chartAt H ↑x).toLocalEquiv.target ∩ ↑(LocalHomeomorph.symm (chartAt H ↑x)) ⁻¹' ↑s) ∈\n    G\n[PROOFSTEP]\napply closedUnderRestriction'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.he\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nG : StructureGroupoid H\ninst✝¹ : HasGroupoid M G\ns : Opens M\ninst✝ : ClosedUnderRestriction G\ne e' : LocalHomeomorph { x // x ∈ s } H\nw✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)\nx : { x // x ∈ s }\nhe : e = subtypeRestr (chartAt H ↑x) s\nhc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹\nw✝ : Set (LocalHomeomorph { x // x ∈ s } H)\nx' : { x // x ∈ s }\nhe' : e' = subtypeRestr (chartAt H ↑x') s\nhc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝\nthis : Nonempty { x // x ∈ s }\nasdf : e ∈ w✝¹\n⊢ LocalHomeomorph.symm (chartAt H ↑x) ≫ₕ chartAt H ↑x' ∈ G\n[PROOFSTEP]\nexact G.compatible (chart_mem_atlas _ _) (chart_mem_atlas _ _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.hs\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁴ : TopologicalSpace H\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\nG : StructureGroupoid H\ninst✝¹ : HasGroupoid M G\ns : Opens M\ninst✝ : ClosedUnderRestriction G\ne e' : LocalHomeomorph { x // x ∈ s } H\nw✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)\nx : { x // x ∈ s }\nhe : e = subtypeRestr (chartAt H ↑x) s\nhc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹\nw✝ : Set (LocalHomeomorph { x // x ∈ s } H)\nx' : { x // x ∈ s }\nhe' : e' = subtypeRestr (chartAt H ↑x') s\nhc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝\nthis : Nonempty { x // x ∈ s }\nasdf : e ∈ w✝¹\n⊢ IsOpen ((chartAt H ↑x).toLocalEquiv.target ∩ ↑(LocalHomeomorph.symm (chartAt H ↑x)) ⁻¹' ↑s)\n[PROOFSTEP]\nexact preimage_open_of_open_symm (chartAt _ _) s.2\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nG : StructureGroupoid H\ninst✝ : HasGroupoid M G\ns U V : Opens M\nhUV : U ≤ V\nx : { x // x ∈ U }\n⊢ ↑(LocalHomeomorph.symm (chartAt H (inclusion hUV x))) =ᶠ[𝓝 (↑(chartAt H (inclusion hUV x)) (inclusion hUV x))]\n    inclusion hUV ∘ ↑(LocalHomeomorph.symm (chartAt H x))\n[PROOFSTEP]\nset i := Set.inclusion hUV\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nG : StructureGroupoid H\ninst✝ : HasGroupoid M G\ns U V : Opens M\nhUV : U ≤ V\nx : { x // x ∈ U }\ni : ↑↑U → ↑↑V := inclusion hUV\n⊢ ↑(LocalHomeomorph.symm (chartAt H (i x))) =ᶠ[𝓝 (↑(chartAt H (i x)) (i x))] i ∘ ↑(LocalHomeomorph.symm (chartAt H x))\n[PROOFSTEP]\nset e := chartAt H (x : M)\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nG : StructureGroupoid H\ninst✝ : HasGroupoid M G\ns U V : Opens M\nhUV : U ≤ V\nx : { x // x ∈ U }\ni : ↑↑U → ↑↑V := inclusion hUV\ne : LocalHomeomorph M H := chartAt H ↑x\n⊢ ↑(LocalHomeomorph.symm (chartAt H (i x))) =ᶠ[𝓝 (↑(chartAt H (i x)) (i x))] i ∘ ↑(LocalHomeomorph.symm (chartAt H x))\n[PROOFSTEP]\nhaveI : Nonempty U := ⟨x⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nG : StructureGroupoid H\ninst✝ : HasGroupoid M G\ns U V : Opens M\nhUV : U ≤ V\nx : { x // x ∈ U }\ni : ↑↑U → ↑↑V := inclusion hUV\ne : LocalHomeomorph M H := chartAt H ↑x\nthis : Nonempty { x // x ∈ U }\n⊢ ↑(LocalHomeomorph.symm (chartAt H (i x))) =ᶠ[𝓝 (↑(chartAt H (i x)) (i x))] i ∘ ↑(LocalHomeomorph.symm (chartAt H x))\n[PROOFSTEP]\nhaveI : Nonempty V := ⟨i x⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nG : StructureGroupoid H\ninst✝ : HasGroupoid M G\ns U V : Opens M\nhUV : U ≤ V\nx : { x // x ∈ U }\ni : ↑↑U → ↑↑V := inclusion hUV\ne : LocalHomeomorph M H := chartAt H ↑x\nthis✝ : Nonempty { x // x ∈ U }\nthis : Nonempty { x // x ∈ V }\n⊢ ↑(LocalHomeomorph.symm (chartAt H (i x))) =ᶠ[𝓝 (↑(chartAt H (i x)) (i x))] i ∘ ↑(LocalHomeomorph.symm (chartAt H x))\n[PROOFSTEP]\nhave heUx_nhds : (e.subtypeRestr U).target ∈ 𝓝 (e x) :=\n  by\n  apply (e.subtypeRestr U).open_target.mem_nhds\n  exact e.map_subtype_source (mem_chart_source _ _)\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nG : StructureGroupoid H\ninst✝ : HasGroupoid M G\ns U V : Opens M\nhUV : U ≤ V\nx : { x // x ∈ U }\ni : ↑↑U → ↑↑V := inclusion hUV\ne : LocalHomeomorph M H := chartAt H ↑x\nthis✝ : Nonempty { x // x ∈ U }\nthis : Nonempty { x // x ∈ V }\n⊢ (subtypeRestr e U).toLocalEquiv.target ∈ 𝓝 (↑e ↑x)\n[PROOFSTEP]\napply (e.subtypeRestr U).open_target.mem_nhds\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nG : StructureGroupoid H\ninst✝ : HasGroupoid M G\ns U V : Opens M\nhUV : U ≤ V\nx : { x // x ∈ U }\ni : ↑↑U → ↑↑V := inclusion hUV\ne : LocalHomeomorph M H := chartAt H ↑x\nthis✝ : Nonempty { x // x ∈ U }\nthis : Nonempty { x // x ∈ V }\n⊢ ↑e ↑x ∈ (subtypeRestr e U).toLocalEquiv.target\n[PROOFSTEP]\nexact e.map_subtype_source (mem_chart_source _ _)\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝³ : TopologicalSpace H\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\nG : StructureGroupoid H\ninst✝ : HasGroupoid M G\ns U V : Opens M\nhUV : U ≤ V\nx : { x // x ∈ U }\ni : ↑↑U → ↑↑V := inclusion hUV\ne : LocalHomeomorph M H := chartAt H ↑x\nthis✝ : Nonempty { x // x ∈ U }\nthis : Nonempty { x // x ∈ V }\nheUx_nhds : (subtypeRestr e U).toLocalEquiv.target ∈ 𝓝 (↑e ↑x)\n⊢ ↑(LocalHomeomorph.symm (chartAt H (i x))) =ᶠ[𝓝 (↑(chartAt H (i x)) (i x))] i ∘ ↑(LocalHomeomorph.symm (chartAt H x))\n[PROOFSTEP]\nexact Filter.eventuallyEq_of_mem heUx_nhds (e.subtypeRestr_symm_eqOn_of_le hUV)\n[GOAL]\nH : Type u\nH' : Type u_1\nM✝ : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁹ : TopologicalSpace H\ninst✝⁸ : TopologicalSpace M✝\ninst✝⁷ : ChartedSpace H M✝\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝⁴ : ChartedSpace H M'\ninst✝³ : ChartedSpace H M''\nM : Type u_5\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : HasGroupoid M G\nsrc✝ : M ≃ₜ M := Homeomorph.refl M\nc c' : LocalHomeomorph M H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M\n⊢ LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c' ∈ G\n[PROOFSTEP]\nchange LocalHomeomorph.symm c ≫ₕ LocalHomeomorph.refl M ≫ₕ c' ∈ G\n[GOAL]\nH : Type u\nH' : Type u_1\nM✝ : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁹ : TopologicalSpace H\ninst✝⁸ : TopologicalSpace M✝\ninst✝⁷ : ChartedSpace H M✝\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝⁴ : ChartedSpace H M'\ninst✝³ : ChartedSpace H M''\nM : Type u_5\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : HasGroupoid M G\nsrc✝ : M ≃ₜ M := Homeomorph.refl M\nc c' : LocalHomeomorph M H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M\n⊢ LocalHomeomorph.symm c ≫ₕ LocalHomeomorph.refl M ≫ₕ c' ∈ G\n[PROOFSTEP]\nrw [LocalHomeomorph.refl_trans]\n[GOAL]\nH : Type u\nH' : Type u_1\nM✝ : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁹ : TopologicalSpace H\ninst✝⁸ : TopologicalSpace M✝\ninst✝⁷ : ChartedSpace H M✝\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝⁴ : ChartedSpace H M'\ninst✝³ : ChartedSpace H M''\nM : Type u_5\ninst✝² : TopologicalSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : HasGroupoid M G\nsrc✝ : M ≃ₜ M := Homeomorph.refl M\nc c' : LocalHomeomorph M H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M\n⊢ LocalHomeomorph.symm c ≫ₕ c' ∈ G\n[PROOFSTEP]\nexact G.compatible hc hc'\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\nsrc✝ : M' ≃ₜ M := Homeomorph.symm e.toHomeomorph\n⊢ ∀ (c : LocalHomeomorph M' H) (c' : LocalHomeomorph M H),\n    c ∈ atlas H M' →\n      c' ∈ atlas H M → LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c' ∈ G\n[PROOFSTEP]\nintro c c' hc hc'\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\nsrc✝ : M' ≃ₜ M := Homeomorph.symm e.toHomeomorph\nc : LocalHomeomorph M' H\nc' : LocalHomeomorph M H\nhc : c ∈ atlas H M'\nhc' : c' ∈ atlas H M\n⊢ LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c' ∈ G\n[PROOFSTEP]\nhave : (c'.symm ≫ₕ e.toHomeomorph.toLocalHomeomorph ≫ₕ c).symm ∈ G := G.symm (e.mem_groupoid c' c hc' hc)\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\nsrc✝ : M' ≃ₜ M := Homeomorph.symm e.toHomeomorph\nc : LocalHomeomorph M' H\nc' : LocalHomeomorph M H\nhc : c ∈ atlas H M'\nhc' : c' ∈ atlas H M\nthis : LocalHomeomorph.symm (LocalHomeomorph.symm c' ≫ₕ Homeomorph.toLocalHomeomorph e.toHomeomorph ≫ₕ c) ∈ G\n⊢ LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c' ∈ G\n[PROOFSTEP]\nrwa [trans_symm_eq_symm_trans_symm, trans_symm_eq_symm_trans_symm, symm_symm, trans_assoc] at this \n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\n⊢ ∀ (c : LocalHomeomorph M H) (c' : LocalHomeomorph M'' H),\n    c ∈ atlas H M →\n      c' ∈ atlas H M'' → LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c' ∈ G\n[PROOFSTEP]\nintro c c' hc hc'\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\n⊢ LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c' ∈ G\n[PROOFSTEP]\nrefine' G.locality fun x hx ↦ _\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\n⊢ ∃ s,\n    IsOpen s ∧\n      x ∈ s ∧\n        LocalHomeomorph.restr\n            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n          G\n[PROOFSTEP]\nlet f₁ := e.toHomeomorph.toLocalHomeomorph\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\n⊢ ∃ s,\n    IsOpen s ∧\n      x ∈ s ∧\n        LocalHomeomorph.restr\n            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n          G\n[PROOFSTEP]\nlet f₂ := e'.toHomeomorph.toLocalHomeomorph\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\n⊢ ∃ s,\n    IsOpen s ∧\n      x ∈ s ∧\n        LocalHomeomorph.restr\n            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n          G\n[PROOFSTEP]\nlet f := (e.toHomeomorph.trans e'.toHomeomorph).toLocalHomeomorph\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\n⊢ ∃ s,\n    IsOpen s ∧\n      x ∈ s ∧\n        LocalHomeomorph.restr\n            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n          G\n[PROOFSTEP]\nhave feq : f = f₁ ≫ₕ f₂ :=\n  Homeomorph.trans_toLocalHomeomorph _\n    _\n      -- define the atlas g around y\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\n⊢ ∃ s,\n    IsOpen s ∧\n      x ∈ s ∧\n        LocalHomeomorph.restr\n            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n          G\n[PROOFSTEP]\nlet y := (c.symm ≫ₕ f₁) x\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\n⊢ ∃ s,\n    IsOpen s ∧\n      x ∈ s ∧\n        LocalHomeomorph.restr\n            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n          G\n[PROOFSTEP]\nlet g := chartAt (H := H) y\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\n⊢ ∃ s,\n    IsOpen s ∧\n      x ∈ s ∧\n        LocalHomeomorph.restr\n            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n          G\n[PROOFSTEP]\nhave hg₁ := chart_mem_atlas (H := H) y\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\n⊢ ∃ s,\n    IsOpen s ∧\n      x ∈ s ∧\n        LocalHomeomorph.restr\n            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n          G\n[PROOFSTEP]\nhave hg₂ := mem_chart_source (H := H) y\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\n⊢ ∃ s,\n    IsOpen s ∧\n      x ∈ s ∧\n        LocalHomeomorph.restr\n            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n          G\n[PROOFSTEP]\nlet s := (c.symm ≫ₕ f₁).source ∩ c.symm ≫ₕ f₁ ⁻¹' g.source\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\n⊢ ∃ s,\n    IsOpen s ∧\n      x ∈ s ∧\n        LocalHomeomorph.restr\n            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n          G\n[PROOFSTEP]\nhave open_s : IsOpen s := by apply (c.symm ≫ₕ f₁).continuous_toFun.preimage_open_of_open <;> apply open_source\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\n⊢ IsOpen s\n[PROOFSTEP]\napply (c.symm ≫ₕ f₁).continuous_toFun.preimage_open_of_open\n[GOAL]\ncase hs\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\n⊢ IsOpen (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source\n[PROOFSTEP]\napply open_source\n[GOAL]\ncase ht\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\n⊢ IsOpen g.source\n[PROOFSTEP]\napply open_source\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\n⊢ ∃ s,\n    IsOpen s ∧\n      x ∈ s ∧\n        LocalHomeomorph.restr\n            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n          G\n[PROOFSTEP]\nhave : x ∈ s := by\n  constructor\n  · simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toLocalHomeomorph_source]\n    rw [trans_source] at hx \n    exact hx.1\n  · exact hg₂\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\n⊢ x ∈ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\n⊢ x ∈ (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source\n[PROOFSTEP]\nsimp only [trans_source, preimage_univ, inter_univ, Homeomorph.toLocalHomeomorph_source]\n[GOAL]\ncase left\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\n⊢ x ∈ (LocalHomeomorph.symm c).toLocalEquiv.source\n[PROOFSTEP]\nrw [trans_source] at hx \n[GOAL]\ncase left\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx :\n  x ∈\n    (LocalHomeomorph.symm c).toLocalEquiv.source ∩\n      ↑(LocalHomeomorph.symm c) ⁻¹'\n        (Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\n⊢ x ∈ (LocalHomeomorph.symm c).toLocalEquiv.source\n[PROOFSTEP]\nexact hx.1\n[GOAL]\ncase right\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\n⊢ x ∈ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\n[PROOFSTEP]\nexact hg₂\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis : x ∈ s\n⊢ ∃ s,\n    IsOpen s ∧\n      x ∈ s ∧\n        LocalHomeomorph.restr\n            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n          G\n[PROOFSTEP]\nrefine' ⟨s, open_s, this, _⟩\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis : x ∈ s\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n    G\n[PROOFSTEP]\nlet F₁ := (c.symm ≫ₕ f₁ ≫ₕ g) ≫ₕ g.symm ≫ₕ f₂ ≫ₕ c'\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis : x ∈ s\nF₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n    G\n[PROOFSTEP]\nhave A : F₁ ∈ G := G.trans (e.mem_groupoid c g hc hg₁) (e'.mem_groupoid g c' hg₁ hc')\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis : x ∈ s\nF₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'\nA : F₁ ∈ G\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n    G\n[PROOFSTEP]\nlet F₂ := (c.symm ≫ₕ f ≫ₕ c').restr s\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis : x ∈ s\nF₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'\nA : F₁ ∈ G\nF₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n    G\n[PROOFSTEP]\nhave : F₁ ≈ F₂ :=\n  calc\n    F₁ ≈ c.symm ≫ₕ f₁ ≫ₕ (g ≫ₕ g.symm) ≫ₕ f₂ ≫ₕ c' := by simp only [trans_assoc, _root_.refl]\n    _ ≈ c.symm ≫ₕ f₁ ≫ₕ ofSet g.source g.open_source ≫ₕ f₂ ≫ₕ c' :=\n      (EqOnSource.trans' (_root_.refl _)\n        (EqOnSource.trans' (_root_.refl _) (EqOnSource.trans' (trans_self_symm g) (_root_.refl _))))\n    _ ≈ ((c.symm ≫ₕ f₁) ≫ₕ ofSet g.source g.open_source) ≫ₕ f₂ ≫ₕ c' := by simp only [trans_assoc, _root_.refl]\n    _ ≈ (c.symm ≫ₕ f₁).restr s ≫ₕ f₂ ≫ₕ c' := by rw [trans_of_set']\n    _ ≈ ((c.symm ≫ₕ f₁) ≫ₕ f₂ ≫ₕ c').restr s := by rw [restr_trans]\n    _ ≈ (c.symm ≫ₕ (f₁ ≫ₕ f₂) ≫ₕ c').restr s := by simp only [EqOnSource.restr, trans_assoc, _root_.refl]\n    _ ≈ F₂ := by simp only [feq, _root_.refl]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis : x ∈ s\nF₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'\nA : F₁ ∈ G\nF₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s\n⊢ F₁ ≈ LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ (g ≫ₕ LocalHomeomorph.symm g) ≫ₕ f₂ ≫ₕ c'\n[PROOFSTEP]\nsimp only [trans_assoc, _root_.refl]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis : x ∈ s\nF₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'\nA : F₁ ∈ G\nF₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s\n⊢ LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ ofSet g.source (_ : IsOpen g.source) ≫ₕ f₂ ≫ₕ c' ≈\n    ((LocalHomeomorph.symm c ≫ₕ f₁) ≫ₕ ofSet g.source (_ : IsOpen g.source)) ≫ₕ f₂ ≫ₕ c'\n[PROOFSTEP]\nsimp only [trans_assoc, _root_.refl]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis : x ∈ s\nF₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'\nA : F₁ ∈ G\nF₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s\n⊢ ((LocalHomeomorph.symm c ≫ₕ f₁) ≫ₕ ofSet g.source (_ : IsOpen g.source)) ≫ₕ f₂ ≫ₕ c' ≈\n    LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f₁) s ≫ₕ f₂ ≫ₕ c'\n[PROOFSTEP]\nrw [trans_of_set']\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis : x ∈ s\nF₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'\nA : F₁ ∈ G\nF₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f₁) s ≫ₕ f₂ ≫ₕ c' ≈\n    LocalHomeomorph.restr ((LocalHomeomorph.symm c ≫ₕ f₁) ≫ₕ f₂ ≫ₕ c') s\n[PROOFSTEP]\nrw [restr_trans]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis : x ∈ s\nF₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'\nA : F₁ ∈ G\nF₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s\n⊢ LocalHomeomorph.restr ((LocalHomeomorph.symm c ≫ₕ f₁) ≫ₕ f₂ ≫ₕ c') s ≈\n    LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ (f₁ ≫ₕ f₂) ≫ₕ c') s\n[PROOFSTEP]\nsimp only [EqOnSource.restr, trans_assoc, _root_.refl]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis : x ∈ s\nF₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'\nA : F₁ ∈ G\nF₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ (f₁ ≫ₕ f₂) ≫ₕ c') s ≈ F₂\n[PROOFSTEP]\nsimp only [feq, _root_.refl]\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis✝ : x ∈ s\nF₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'\nA : F₁ ∈ G\nF₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s\nthis : F₁ ≈ F₂\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n    G\n[PROOFSTEP]\nhave : F₂ ∈ G := G.eq_on_source A (Setoid.symm this)\n[GOAL]\nH : Type u\nH' : Type u_1\nM : Type u_2\nM' : Type u_3\nM'' : Type u_4\ninst✝⁶ : TopologicalSpace H\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : ChartedSpace H M\ninst✝³ : TopologicalSpace M'\ninst✝² : TopologicalSpace M''\nG : StructureGroupoid H\ninst✝¹ : ChartedSpace H M'\ninst✝ : ChartedSpace H M''\ne : Structomorph G M M'\ne' : Structomorph G M' M''\nsrc✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph\nc : LocalHomeomorph M H\nc' : LocalHomeomorph M'' H\nhc : c ∈ atlas H M\nhc' : c' ∈ atlas H M''\nx : H\nhx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source\nf₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph\nf₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph\nf : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)\nfeq : f = f₁ ≫ₕ f₂\ny : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x\ng : LocalHomeomorph M' H := chartAt H y\nhg₁ : chartAt H y ∈ atlas H M'\nhg₂ : y ∈ (chartAt H y).toLocalEquiv.source\ns : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source\nopen_s : IsOpen s\nthis✝¹ : x ∈ s\nF₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'\nA : F₁ ∈ G\nF₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s\nthis✝ : F₁ ≈ F₂\nthis : F₂ ∈ G\n⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈\n    G\n[PROOFSTEP]\nexact this\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Manifold.ChartedSpace", "llama_tokens": 84915, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7310585786300049, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.3968648601865095}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g✝ : α → β\nc c₁ c₂ x : α\ninst✝ : Add α\nh : Periodic f c\ng : β → γ\n⊢ Periodic (g ∘ f) c\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g✝ : α → β\nc c₁ c₂ x✝ : α\ninst✝¹ : Add α\ninst✝ : Add γ\nh : Periodic f c\ng : AddHom γ α\ng_inv : α → γ\nhg : RightInverse g_inv ↑g\nx : γ\n⊢ (f ∘ ↑g) (x + g_inv c) = (f ∘ ↑g) x\n[PROOFSTEP]\nsimp only [hg c, h (g x), map_add, comp_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : Add α\ninst✝ : Mul β\nhf : Periodic f c\nhg : Periodic g c\n⊢ Periodic (f * g) c\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : Add α\ninst✝ : Div β\nhf : Periodic f c\nhg : Periodic g c\n⊢ Periodic (f / g) c\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : Add α\ninst✝ : Monoid β\nl : List (α → β)\nhl : ∀ (f : α → β), f ∈ l → Periodic f c\n⊢ Periodic (List.prod l) c\n[PROOFSTEP]\ninduction' l with g l ih hl\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : Add α\ninst✝ : Monoid β\nl : List (α → β)\nhl✝ : ∀ (f : α → β), f ∈ l → Periodic f c\nhl : ∀ (f : α → β), f ∈ [] → Periodic f c\n⊢ Periodic (List.prod []) c\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g✝ : α → β\nc c₁ c₂ x : α\ninst✝¹ : Add α\ninst✝ : Monoid β\nl✝ : List (α → β)\nhl✝ : ∀ (f : α → β), f ∈ l✝ → Periodic f c\ng : α → β\nl : List (α → β)\nih : (∀ (f : α → β), f ∈ l → Periodic f c) → Periodic (List.prod l) c\nhl : ∀ (f : α → β), f ∈ g :: l → Periodic f c\n⊢ Periodic (List.prod (g :: l)) c\n[PROOFSTEP]\nrw [List.forall_mem_cons] at hl \n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g✝ : α → β\nc c₁ c₂ x : α\ninst✝¹ : Add α\ninst✝ : Monoid β\nl✝ : List (α → β)\nhl✝ : ∀ (f : α → β), f ∈ l✝ → Periodic f c\ng : α → β\nl : List (α → β)\nih : (∀ (f : α → β), f ∈ l → Periodic f c) → Periodic (List.prod l) c\nhl : Periodic g c ∧ ∀ (x : α → β), x ∈ l → Periodic x c\n⊢ Periodic (List.prod (g :: l)) c\n[PROOFSTEP]\nsimpa only [List.prod_cons] using hl.1.mul (ih hl.2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf✝ g : α → β\nc c₁ c₂ x : α\ninst✝¹ : Add α\ninst✝ : CommMonoid β\nι : Type u_4\nf : ι → α → β\ns : Finset ι\nhs : ∀ (i : ι), i ∈ s → Periodic (f i) c\n⊢ ∀ (f_1 : α → β), f_1 ∈ List.map f (Finset.toList s) → Periodic f_1 c\n[PROOFSTEP]\nsimpa [-Periodic]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : Add α\ninst✝ : SMul γ β\nh : Periodic f c\na : γ\n⊢ Periodic (a • f) c\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝² : AddMonoid α\ninst✝¹ : Group γ\ninst✝ : DistribMulAction γ α\nh : Periodic f c\na : γ\nx : α\n⊢ (fun x => f (a • x)) (x + a⁻¹ • c) = (fun x => f (a • x)) x\n[PROOFSTEP]\nsimpa only [smul_add, smul_inv_smul] using h (a • x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝² : AddCommMonoid α\ninst✝¹ : DivisionSemiring γ\ninst✝ : Module γ α\nh : Periodic f c\na : γ\nx : α\n⊢ (fun x => f (a • x)) (x + a⁻¹ • c) = (fun x => f (a • x)) x\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝² : AddCommMonoid α\ninst✝¹ : DivisionSemiring γ\ninst✝ : Module γ α\nh : Periodic f c\na : γ\nx : α\nha : a = 0\n⊢ (fun x => f (a • x)) (x + a⁻¹ • c) = (fun x => f (a • x)) x\n[PROOFSTEP]\nsimp only [ha, zero_smul]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝² : AddCommMonoid α\ninst✝¹ : DivisionSemiring γ\ninst✝ : Module γ α\nh : Periodic f c\na : γ\nx : α\nha : ¬a = 0\n⊢ (fun x => f (a • x)) (x + a⁻¹ • c) = (fun x => f (a • x)) x\n[PROOFSTEP]\nsimpa only [smul_add, smul_inv_smul₀ ha] using h (a • x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝² : AddMonoid α\ninst✝¹ : Group γ\ninst✝ : DistribMulAction γ α\nh : Periodic f c\na : γ\n⊢ Periodic (fun x => f (a⁻¹ • x)) (a • c)\n[PROOFSTEP]\nsimpa only [inv_inv] using h.const_smul a⁻¹\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝² : AddCommMonoid α\ninst✝¹ : DivisionSemiring γ\ninst✝ : Module γ α\nh : Periodic f c\na : γ\n⊢ Periodic (fun x => f (a⁻¹ • x)) (a • c)\n[PROOFSTEP]\nsimpa only [inv_inv] using h.const_smul₀ a⁻¹\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : DivisionSemiring α\nh : Periodic f c\na : α\n⊢ Periodic (fun x => f (x * a)) (c / a)\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using h.mul_const a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : DivisionSemiring α\nh : Periodic f c\na : α\n⊢ Periodic (fun x => f (x / a)) (c * a)\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using h.mul_const_inv a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : AddSemigroup α\nh1 : Periodic f c₁\nh2 : Periodic f c₂\n⊢ Periodic f (c₁ + c₂)\n[PROOFSTEP]\nsimp_all [← add_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddGroup α\nh : Periodic f c\nx : α\n⊢ f (x - c) = f x\n[PROOFSTEP]\nsimpa only [sub_add_cancel] using (h (x - c)).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : AddCommGroup α\nh : Periodic f c\n⊢ f (c - x) = f (-x)\n[PROOFSTEP]\nsimpa only [sub_eq_neg_add] using h (-x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : AddGroup α\nh : Periodic f c\n⊢ Periodic f (-c)\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg, Periodic] using h.sub_eq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddGroup α\nh1 : Periodic f c₁\nh2 : Periodic f c₂\nx : α\n⊢ f (x + (c₁ - c₂)) = f x\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← add_assoc, h2.neg, h1]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddSemigroup α\nh : Periodic f c\na x : α\n⊢ (fun x => f (a + x)) (x + c) = (fun x => f (a + x)) x\n[PROOFSTEP]\nsimpa [add_assoc] using h (a + x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddCommSemigroup α\nh : Periodic f c\na x : α\n⊢ (fun x => f (x + a)) (x + c) = (fun x => f (x + a)) x\n[PROOFSTEP]\nsimpa only [add_right_comm] using h (x + a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddCommGroup α\nh : Periodic f c\na x : α\n⊢ (fun x => f (a - x)) (x + c) = (fun x => f (a - x)) x\n[PROOFSTEP]\nsimp only [← sub_sub, h.sub_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : AddCommGroup α\nh : Periodic f c\na : α\n⊢ Periodic (fun x => f (x - a)) c\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using h.add_const (-a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : AddMonoid α\nh : Periodic f c\nn : ℕ\n⊢ Periodic f (n • c)\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : AddMonoid α\nh : Periodic f c\n⊢ Periodic f (Nat.zero • c)\n[PROOFSTEP]\nsimp_all [Nat.succ_eq_add_one, add_nsmul, ← add_assoc, zero_nsmul]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : AddMonoid α\nh : Periodic f c\nn✝ : ℕ\nn_ih✝ : Periodic f (n✝ • c)\n⊢ Periodic f (Nat.succ n✝ • c)\n[PROOFSTEP]\nsimp_all [Nat.succ_eq_add_one, add_nsmul, ← add_assoc, zero_nsmul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : Semiring α\nh : Periodic f c\nn : ℕ\n⊢ Periodic f (↑n * c)\n[PROOFSTEP]\nsimpa only [nsmul_eq_mul] using h.nsmul n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : AddGroup α\nh : Periodic f c\nn : ℕ\n⊢ f (x - n • c) = f x\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using h.neg_nsmul n x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : Ring α\nh : Periodic f c\nn : ℕ\n⊢ f (x - ↑n * c) = f x\n[PROOFSTEP]\nsimpa only [nsmul_eq_mul] using h.sub_nsmul_eq n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : Ring α\nh : Periodic f c\nn : ℕ\n⊢ f (↑n * c - x) = f (-x)\n[PROOFSTEP]\nsimpa only [sub_eq_neg_add] using h.nat_mul n (-x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : AddGroup α\nh : Periodic f c\nn : ℤ\n⊢ Periodic f (n • c)\n[PROOFSTEP]\ncases' n with n n\n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : AddGroup α\nh : Periodic f c\nn : ℕ\n⊢ Periodic f (Int.ofNat n • c)\n[PROOFSTEP]\nsimpa only [Int.ofNat_eq_coe, coe_nat_zsmul] using h.nsmul n\n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : AddGroup α\nh : Periodic f c\nn : ℕ\n⊢ Periodic f (Int.negSucc n • c)\n[PROOFSTEP]\nsimpa only [negSucc_zsmul] using (h.nsmul (n + 1)).neg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : Ring α\nh : Periodic f c\nn : ℤ\n⊢ Periodic f (↑n * c)\n[PROOFSTEP]\nsimpa only [zsmul_eq_mul] using h.zsmul n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝ : AddZeroClass α\nh : Periodic f c\n⊢ f c = f 0\n[PROOFSTEP]\nsimpa only [zero_add] using h 0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\nh : Periodic f c\nhc : c ≠ 0\na : α\n⊢ f '' uIcc a (a + c) = range f\n[PROOFSTEP]\ncases hc.lt_or_lt with\n| inl hc =>\n  rw [uIcc_of_ge (add_le_of_nonpos_right hc.le), ← h.neg.image_Icc (neg_pos.2 hc) (a + c), add_neg_cancel_right]\n| inr hc => rw [uIcc_of_le (le_add_of_nonneg_right hc.le), h.image_Icc hc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\nh : Periodic f c\nhc : c ≠ 0\na : α\nx✝ : c < 0 ∨ 0 < c\n⊢ f '' uIcc a (a + c) = range f\n[PROOFSTEP]\ncases hc.lt_or_lt with\n| inl hc =>\n  rw [uIcc_of_ge (add_le_of_nonpos_right hc.le), ← h.neg.image_Icc (neg_pos.2 hc) (a + c), add_neg_cancel_right]\n| inr hc => rw [uIcc_of_le (le_add_of_nonneg_right hc.le), h.image_Icc hc]\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\nh : Periodic f c\nhc✝ : c ≠ 0\na : α\nhc : c < 0\n⊢ f '' uIcc a (a + c) = range f\n[PROOFSTEP]\n\n| inl hc =>\n  rw [uIcc_of_ge (add_le_of_nonpos_right hc.le), ← h.neg.image_Icc (neg_pos.2 hc) (a + c), add_neg_cancel_right]\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\nh : Periodic f c\nhc✝ : c ≠ 0\na : α\nhc : c < 0\n⊢ f '' uIcc a (a + c) = range f\n[PROOFSTEP]\nrw [uIcc_of_ge (add_le_of_nonpos_right hc.le), ← h.neg.image_Icc (neg_pos.2 hc) (a + c), add_neg_cancel_right]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\nh : Periodic f c\nhc✝ : c ≠ 0\na : α\nhc : 0 < c\n⊢ f '' uIcc a (a + c) = range f\n[PROOFSTEP]\n\n| inr hc => rw [uIcc_of_le (le_add_of_nonneg_right hc.le), h.image_Icc hc]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : LinearOrderedAddCommGroup α\ninst✝ : Archimedean α\nh : Periodic f c\nhc✝ : c ≠ 0\na : α\nhc : 0 < c\n⊢ f '' uIcc a (a + c) = range f\n[PROOFSTEP]\nrw [uIcc_of_le (le_add_of_nonneg_right hc.le), h.image_Icc hc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf✝ g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddZeroClass α\nf : α → β\nx : α\n⊢ f (x + 0) = f x\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddCommGroup α\nhf : Periodic f c\na : { x // x ∈ AddSubgroup.zmultiples c }\nx : α\n⊢ f (a +ᵥ x) = f x\n[PROOFSTEP]\nrcases a with ⟨_, m, rfl⟩\n[GOAL]\ncase mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddCommGroup α\nhf : Periodic f c\nx : α\nm : ℤ\n⊢ f ({ val := (fun x => x • c) m, property := (_ : ∃ y, (fun x => x • c) y = (fun x => x • c) m) } +ᵥ x) = f x\n[PROOFSTEP]\nsimp [AddSubgroup.vadd_def, add_comm _ x, hf.zsmul m x]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddCommMonoid α\nhf : Periodic f c\na : { x // x ∈ AddSubmonoid.multiples c }\nx : α\n⊢ f (a +ᵥ x) = f x\n[PROOFSTEP]\nrcases a with ⟨_, m, rfl⟩\n[GOAL]\ncase mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddCommMonoid α\nhf : Periodic f c\nx : α\nm : ℕ\n⊢ f ({ val := (fun i => i • c) m, property := (_ : ∃ y, (fun i => i • c) y = (fun i => i • c) m) } +ᵥ x) = f x\n[PROOFSTEP]\nsimp [AddSubmonoid.vadd_def, add_comm _ x, hf.nsmul m x]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddGroup α\nh : Periodic f c\nx : α ⧸ AddSubgroup.zmultiples c\na b : α\nh' : Setoid.r a b\n⊢ f a = f b\n[PROOFSTEP]\nrw [QuotientAddGroup.leftRel_apply] at h' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddGroup α\nh : Periodic f c\nx : α ⧸ AddSubgroup.zmultiples c\na b : α\nh' : -a + b ∈ AddSubgroup.zmultiples c\n⊢ f a = f b\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := h'\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝ : AddGroup α\nh : Periodic f c\nx : α ⧸ AddSubgroup.zmultiples c\na b : α\nk : ℤ\nhk : (fun x => x • c) k = -a + b\n⊢ f a = f b\n[PROOFSTEP]\nexact (h.zsmul k _).symm.trans (congr_arg f (add_eq_of_eq_neg_add hk))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : Semiring α\ninst✝ : InvolutiveNeg β\nh : Antiperiodic f c\n⊢ Periodic f (2 * c)\n[PROOFSTEP]\nsimp [two_mul, ← add_assoc, h _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : AddZeroClass α\ninst✝ : Neg β\nh : Antiperiodic f c\n⊢ f c = -f 0\n[PROOFSTEP]\nsimpa only [zero_add] using h 0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝¹ : Semiring α\ninst✝ : InvolutiveNeg β\nh : Antiperiodic f c\nn : ℕ\nx : α\n⊢ f (x + (↑n * (2 * c) + c)) = -f x\n[PROOFSTEP]\nrw [← add_assoc, h, h.periodic.nat_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝¹ : Ring α\ninst✝ : InvolutiveNeg β\nh : Antiperiodic f c\nn : ℤ\nx : α\n⊢ f (x + (↑n * (2 * c) + c)) = -f x\n[PROOFSTEP]\nrw [← add_assoc, h, h.periodic.int_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝¹ : AddGroup α\ninst✝ : InvolutiveNeg β\nh : Antiperiodic f c\nx : α\n⊢ f (x - c) = -f x\n[PROOFSTEP]\nsimp only [← neg_eq_iff_eq_neg, ← h (x - c), sub_add_cancel]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : AddCommGroup α\ninst✝ : Neg β\nh : Antiperiodic f c\n⊢ f (c - x) = -f (-x)\n[PROOFSTEP]\nsimpa only [sub_eq_neg_add] using h (-x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : AddGroup α\ninst✝ : InvolutiveNeg β\nh : Antiperiodic f c\n⊢ Antiperiodic f (-c)\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg, Antiperiodic] using h.sub_eq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : AddGroup α\ninst✝ : InvolutiveNeg β\nh : Antiperiodic f c\n⊢ f (-c) = -f 0\n[PROOFSTEP]\nsimpa only [zero_add] using h.neg 0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : Semiring α\ninst✝ : NegZeroClass β\nh : Antiperiodic f c\nhi : f 0 = 0\n⊢ f (↑0 * c) = 0\n[PROOFSTEP]\nrwa [Nat.cast_zero, zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : Semiring α\ninst✝ : NegZeroClass β\nh : Antiperiodic f c\nhi : f 0 = 0\nn : ℕ\n⊢ f (↑(n + 1) * c) = 0\n[PROOFSTEP]\nsimp [add_mul, h _, Antiperiodic.nat_mul_eq_of_eq_zero h hi n]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : Ring α\ninst✝ : SubtractionMonoid β\nh : Antiperiodic f c\nhi : f 0 = 0\nn : ℕ\n⊢ f (↑↑n * c) = 0\n[PROOFSTEP]\nrw [Int.cast_ofNat, h.nat_mul_eq_of_eq_zero hi n]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : Ring α\ninst✝ : SubtractionMonoid β\nh : Antiperiodic f c\nhi : f 0 = 0\nn : ℕ\n⊢ f (↑(Int.negSucc n) * c) = 0\n[PROOFSTEP]\nrw [Int.cast_negSucc, neg_mul, ← mul_neg, h.neg.nat_mul_eq_of_eq_zero hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝¹ : AddSemigroup α\ninst✝ : Neg β\nh : Antiperiodic f c\na x : α\n⊢ (fun x => f (a + x)) (x + c) = -(fun x => f (a + x)) x\n[PROOFSTEP]\nsimpa [add_assoc] using h (a + x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝¹ : AddCommSemigroup α\ninst✝ : Neg β\nh : Antiperiodic f c\na x : α\n⊢ (fun x => f (x + a)) (x + c) = -(fun x => f (x + a)) x\n[PROOFSTEP]\nsimpa only [add_right_comm] using h (x + a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝¹ : AddCommGroup α\ninst✝ : InvolutiveNeg β\nh : Antiperiodic f c\na x : α\n⊢ (fun x => f (a - x)) (x + c) = -(fun x => f (a - x)) x\n[PROOFSTEP]\nsimp only [← sub_sub, h.sub_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : AddCommGroup α\ninst✝ : Neg β\nh : Antiperiodic f c\na : α\n⊢ Antiperiodic (fun x => f (x - a)) c\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using h.add_const (-a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝³ : Add α\ninst✝² : Monoid γ\ninst✝¹ : AddGroup β\ninst✝ : DistribMulAction γ β\nh : Antiperiodic f c\na : γ\n⊢ Antiperiodic (a • f) c\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝³ : AddMonoid α\ninst✝² : Neg β\ninst✝¹ : Group γ\ninst✝ : DistribMulAction γ α\nh : Antiperiodic f c\na : γ\nx : α\n⊢ (fun x => f (a • x)) (x + a⁻¹ • c) = -(fun x => f (a • x)) x\n[PROOFSTEP]\nsimpa only [smul_add, smul_inv_smul] using h (a • x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x✝ : α\ninst✝³ : AddCommMonoid α\ninst✝² : Neg β\ninst✝¹ : DivisionSemiring γ\ninst✝ : Module γ α\nh : Antiperiodic f c\na : γ\nha : a ≠ 0\nx : α\n⊢ (fun x => f (a • x)) (x + a⁻¹ • c) = -(fun x => f (a • x)) x\n[PROOFSTEP]\nsimpa only [smul_add, smul_inv_smul₀ ha] using h (a • x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝³ : AddMonoid α\ninst✝² : Neg β\ninst✝¹ : Group γ\ninst✝ : DistribMulAction γ α\nh : Antiperiodic f c\na : γ\n⊢ Antiperiodic (fun x => f (a⁻¹ • x)) (a • c)\n[PROOFSTEP]\nsimpa only [inv_inv] using h.const_smul a⁻¹\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝³ : AddCommMonoid α\ninst✝² : Neg β\ninst✝¹ : DivisionSemiring γ\ninst✝ : Module γ α\nh : Antiperiodic f c\na : γ\nha : a ≠ 0\n⊢ Antiperiodic (fun x => f (a⁻¹ • x)) (a • c)\n[PROOFSTEP]\nsimpa only [inv_inv] using h.const_smul₀ (inv_ne_zero ha)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : DivisionSemiring α\ninst✝ : Neg β\nh : Antiperiodic f c\na : α\nha : a ≠ 0\n⊢ Antiperiodic (fun x => f (x * a)) (c / a)\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using h.mul_const ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : DivisionSemiring α\ninst✝ : Neg β\nh : Antiperiodic f c\na : α\nha : a ≠ 0\n⊢ Antiperiodic (fun x => f (x / a)) (c * a)\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using h.mul_const_inv ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : AddGroup α\ninst✝ : InvolutiveNeg β\nh1 : Antiperiodic f c₁\nh2 : Antiperiodic f c₂\n⊢ Periodic f (c₁ + c₂)\n[PROOFSTEP]\nsimp_all [← add_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : AddGroup α\ninst✝ : InvolutiveNeg β\nh1 : Antiperiodic f c₁\nh2 : Antiperiodic f c₂\n⊢ Periodic f (c₁ - c₂)\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using h1.add h2.neg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : AddGroup α\ninst✝ : Neg β\nh1 : Periodic f c₁\nh2 : Antiperiodic f c₂\n⊢ Antiperiodic f (c₁ + c₂)\n[PROOFSTEP]\nsimp_all [← add_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝¹ : AddGroup α\ninst✝ : InvolutiveNeg β\nh1 : Periodic f c₁\nh2 : Antiperiodic f c₂\n⊢ Antiperiodic f (c₁ - c₂)\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using h1.add_antiperiod h2.neg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝² : Add α\ninst✝¹ : Mul β\ninst✝ : HasDistribNeg β\nhf : Antiperiodic f c\nhg : Antiperiodic g c\n⊢ Periodic (f * g) c\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α → β\nc c₁ c₂ x : α\ninst✝² : Add α\ninst✝¹ : DivisionMonoid β\ninst✝ : HasDistribNeg β\nhf : Antiperiodic f c\nhg : Antiperiodic g c\n⊢ Periodic (f / g) c\n[PROOFSTEP]\nsimp_all [neg_div_neg_eq]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nf g : α✝ → β\nc c₁ c₂ x : α✝\nα : Type u_4\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\na : α\n⊢ fract (a + 1) = fract a\n[PROOFSTEP]\nexact_mod_cast Int.fract_add_int a 1\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Periodic", "llama_tokens": 11036, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6825737344123242, "lm_q2_score": 0.5813030906443133, "lm_q1q2_score": 0.3967822214065147}}
{"text": "[GOAL]\nR : Type u\ninst✝ : Semiring R\n⊢ StrongRankCondition R ↔ ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Injective ↑f\n[PROOFSTEP]\nrefine' ⟨fun h n => fun f hf => _, fun h => ⟨@fun n m f hf => _⟩⟩\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝ : Semiring R\nh : StrongRankCondition R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\n⊢ False\n[PROOFSTEP]\nletI : StrongRankCondition R := h\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝ : Semiring R\nh : StrongRankCondition R\nn : ℕ\nf : (Fin (n + 1) → R) →ₗ[R] Fin n → R\nhf : Injective ↑f\nthis : StrongRankCondition R := h\n⊢ False\n[PROOFSTEP]\nexact Nat.not_succ_le_self n (le_of_fin_injective R f hf)\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝ : Semiring R\nh : ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Injective ↑f\nn m : ℕ\nf : (Fin n → R) →ₗ[R] Fin m → R\nhf : Injective ↑f\n⊢ n ≤ m\n[PROOFSTEP]\nby_contra H\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝ : Semiring R\nh : ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Injective ↑f\nn m : ℕ\nf : (Fin n → R) →ₗ[R] Fin m → R\nhf : Injective ↑f\nH : ¬n ≤ m\n⊢ False\n[PROOFSTEP]\nexact\n  h m (f.comp (Function.ExtendByZero.linearMap R (Fin.castLE (not_le.1 H))))\n    (hf.comp (Function.extend_injective (Fin.strictMono_castLE _).injective _))\n[GOAL]\nR : Type u\ninst✝³ : Semiring R\ninst✝² : StrongRankCondition R\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nf : (α → R) →ₗ[R] β → R\ni : Injective ↑f\n⊢ Fintype.card α ≤ Fintype.card β\n[PROOFSTEP]\nlet P := LinearEquiv.funCongrLeft R R (Fintype.equivFin α)\n[GOAL]\nR : Type u\ninst✝³ : Semiring R\ninst✝² : StrongRankCondition R\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nf : (α → R) →ₗ[R] β → R\ni : Injective ↑f\nP : (Fin (Fintype.card α) → R) ≃ₗ[R] α → R := LinearEquiv.funCongrLeft R R (Fintype.equivFin α)\n⊢ Fintype.card α ≤ Fintype.card β\n[PROOFSTEP]\nlet Q := LinearEquiv.funCongrLeft R R (Fintype.equivFin β)\n[GOAL]\nR : Type u\ninst✝³ : Semiring R\ninst✝² : StrongRankCondition R\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nf : (α → R) →ₗ[R] β → R\ni : Injective ↑f\nP : (Fin (Fintype.card α) → R) ≃ₗ[R] α → R := LinearEquiv.funCongrLeft R R (Fintype.equivFin α)\nQ : (Fin (Fintype.card β) → R) ≃ₗ[R] β → R := LinearEquiv.funCongrLeft R R (Fintype.equivFin β)\n⊢ Fintype.card α ≤ Fintype.card β\n[PROOFSTEP]\nexact\n  le_of_fin_injective R ((Q.symm.toLinearMap.comp f).comp P.toLinearMap)\n    (((LinearEquiv.symm Q).injective.comp i).comp (LinearEquiv.injective P))\n[GOAL]\nR : Type u\ninst✝³ : Semiring R\ninst✝² : StrongRankCondition R\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nf : (α →₀ R) →ₗ[R] β →₀ R\ni : Injective ↑f\n⊢ Fintype.card α ≤ Fintype.card β\n[PROOFSTEP]\nlet P := Finsupp.linearEquivFunOnFinite R R β\n[GOAL]\nR : Type u\ninst✝³ : Semiring R\ninst✝² : StrongRankCondition R\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nf : (α →₀ R) →ₗ[R] β →₀ R\ni : Injective ↑f\nP : (β →₀ R) ≃ₗ[R] β → R := Finsupp.linearEquivFunOnFinite R R β\n⊢ Fintype.card α ≤ Fintype.card β\n[PROOFSTEP]\nlet Q := (Finsupp.linearEquivFunOnFinite R R α).symm\n[GOAL]\nR : Type u\ninst✝³ : Semiring R\ninst✝² : StrongRankCondition R\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nf : (α →₀ R) →ₗ[R] β →₀ R\ni : Injective ↑f\nP : (β →₀ R) ≃ₗ[R] β → R := Finsupp.linearEquivFunOnFinite R R β\nQ : (α → R) ≃ₗ[R] α →₀ R := LinearEquiv.symm (Finsupp.linearEquivFunOnFinite R R α)\n⊢ Fintype.card α ≤ Fintype.card β\n[PROOFSTEP]\nexact card_le_of_injective R ((P.toLinearMap.comp f).comp Q.toLinearMap) ((P.injective.comp i).comp Q.injective)\n[GOAL]\nR : Type u\ninst✝³ : Semiring R\ninst✝² : RankCondition R\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nf : (α → R) →ₗ[R] β → R\ni : Surjective ↑f\n⊢ Fintype.card β ≤ Fintype.card α\n[PROOFSTEP]\nlet P := LinearEquiv.funCongrLeft R R (Fintype.equivFin α)\n[GOAL]\nR : Type u\ninst✝³ : Semiring R\ninst✝² : RankCondition R\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nf : (α → R) →ₗ[R] β → R\ni : Surjective ↑f\nP : (Fin (Fintype.card α) → R) ≃ₗ[R] α → R := LinearEquiv.funCongrLeft R R (Fintype.equivFin α)\n⊢ Fintype.card β ≤ Fintype.card α\n[PROOFSTEP]\nlet Q := LinearEquiv.funCongrLeft R R (Fintype.equivFin β)\n[GOAL]\nR : Type u\ninst✝³ : Semiring R\ninst✝² : RankCondition R\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nf : (α → R) →ₗ[R] β → R\ni : Surjective ↑f\nP : (Fin (Fintype.card α) → R) ≃ₗ[R] α → R := LinearEquiv.funCongrLeft R R (Fintype.equivFin α)\nQ : (Fin (Fintype.card β) → R) ≃ₗ[R] β → R := LinearEquiv.funCongrLeft R R (Fintype.equivFin β)\n⊢ Fintype.card β ≤ Fintype.card α\n[PROOFSTEP]\nexact\n  le_of_fin_surjective R ((Q.symm.toLinearMap.comp f).comp P.toLinearMap)\n    (((LinearEquiv.symm Q).surjective.comp i).comp (LinearEquiv.surjective P))\n[GOAL]\nR : Type u\ninst✝³ : Semiring R\ninst✝² : RankCondition R\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nf : (α →₀ R) →ₗ[R] β →₀ R\ni : Surjective ↑f\n⊢ Fintype.card β ≤ Fintype.card α\n[PROOFSTEP]\nlet P := Finsupp.linearEquivFunOnFinite R R β\n[GOAL]\nR : Type u\ninst✝³ : Semiring R\ninst✝² : RankCondition R\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nf : (α →₀ R) →ₗ[R] β →₀ R\ni : Surjective ↑f\nP : (β →₀ R) ≃ₗ[R] β → R := Finsupp.linearEquivFunOnFinite R R β\n⊢ Fintype.card β ≤ Fintype.card α\n[PROOFSTEP]\nlet Q := (Finsupp.linearEquivFunOnFinite R R α).symm\n[GOAL]\nR : Type u\ninst✝³ : Semiring R\ninst✝² : RankCondition R\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nf : (α →₀ R) →ₗ[R] β →₀ R\ni : Surjective ↑f\nP : (β →₀ R) ≃ₗ[R] β → R := Finsupp.linearEquivFunOnFinite R R β\nQ : (α → R) ≃ₗ[R] α →₀ R := LinearEquiv.symm (Finsupp.linearEquivFunOnFinite R R α)\n⊢ Fintype.card β ≤ Fintype.card α\n[PROOFSTEP]\nexact card_le_of_surjective R ((P.toLinearMap.comp f).comp Q.toLinearMap) ((P.surjective.comp i).comp Q.surjective)\n[GOAL]\nR : Type u\ninst✝¹ : Semiring R\ninst✝ : InvariantBasisNumber R\n⊢ Nontrivial R\n[PROOFSTEP]\nby_contra h\n[GOAL]\nR : Type u\ninst✝¹ : Semiring R\ninst✝ : InvariantBasisNumber R\nh : ¬Nontrivial R\n⊢ False\n[PROOFSTEP]\nrefine' zero_ne_one (eq_of_fin_equiv R _)\n[GOAL]\nR : Type u\ninst✝¹ : Semiring R\ninst✝ : InvariantBasisNumber R\nh : ¬Nontrivial R\n⊢ (Fin 0 → R) ≃ₗ[R] Fin 1 → R\n[PROOFSTEP]\nhaveI := not_nontrivial_iff_subsingleton.1 h\n[GOAL]\nR : Type u\ninst✝¹ : Semiring R\ninst✝ : InvariantBasisNumber R\nh : ¬Nontrivial R\nthis : Subsingleton R\n⊢ (Fin 0 → R) ≃ₗ[R] Fin 1 → R\n[PROOFSTEP]\nhaveI : Subsingleton (Fin 1 → R) := Subsingleton.intro <| fun a b => funext fun x => Subsingleton.elim _ _\n[GOAL]\nR : Type u\ninst✝¹ : Semiring R\ninst✝ : InvariantBasisNumber R\nh : ¬Nontrivial R\nthis✝ : Subsingleton R\nthis : Subsingleton (Fin 1 → R)\n⊢ (Fin 0 → R) ≃ₗ[R] Fin 1 → R\n[PROOFSTEP]\nexact\n  { toFun := 0\n    invFun := 0\n    map_add' := by aesop\n    map_smul' := by aesop\n    left_inv := fun _ => by simp\n    right_inv := fun _ => by simp }\n[GOAL]\nR : Type u\ninst✝¹ : Semiring R\ninst✝ : InvariantBasisNumber R\nh : ¬Nontrivial R\nthis✝ : Subsingleton R\nthis : Subsingleton (Fin 1 → R)\n⊢ ∀ (x y : Fin 0 → R), OfNat.ofNat 0 (x + y) = OfNat.ofNat 0 x + OfNat.ofNat 0 y\n[PROOFSTEP]\naesop\n[GOAL]\nR : Type u\ninst✝¹ : Semiring R\ninst✝ : InvariantBasisNumber R\nh : ¬Nontrivial R\nthis✝ : Subsingleton R\nthis : Subsingleton (Fin 1 → R)\n⊢ ∀ (r : R) (x : Fin 0 → R),\n    AddHom.toFun { toFun := 0, map_add' := (_ : ∀ (x y : Fin 0 → R), OfNat.ofNat 0 (x + y) = 0 + 0) } (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun { toFun := 0, map_add' := (_ : ∀ (x y : Fin 0 → R), OfNat.ofNat 0 (x + y) = 0 + 0) } x\n[PROOFSTEP]\naesop\n[GOAL]\nR : Type u\ninst✝¹ : Semiring R\ninst✝ : InvariantBasisNumber R\nh : ¬Nontrivial R\nthis✝ : Subsingleton R\nthis : Subsingleton (Fin 1 → R)\nx✝ : Fin 0 → R\n⊢ OfNat.ofNat 0\n      (AddHom.toFun\n        { toAddHom := { toFun := 0, map_add' := (_ : ∀ (x y : Fin 0 → R), OfNat.ofNat 0 (x + y) = 0 + 0) },\n            map_smul' := (_ : ∀ (r : R) (x : Fin 0 → R), OfNat.ofNat 0 (r • x) = r • 0) }.toAddHom\n        x✝) =\n    x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\ninst✝¹ : Semiring R\ninst✝ : InvariantBasisNumber R\nh : ¬Nontrivial R\nthis✝ : Subsingleton R\nthis : Subsingleton (Fin 1 → R)\nx✝ : Fin 1 → R\n⊢ AddHom.toFun\n      { toAddHom := { toFun := 0, map_add' := (_ : ∀ (x y : Fin 0 → R), OfNat.ofNat 0 (x + y) = 0 + 0) },\n          map_smul' := (_ : ∀ (r : R) (x : Fin 0 → R), OfNat.ofNat 0 (r • x) = r • 0) }.toAddHom\n      (OfNat.ofNat 0 x✝) =\n    x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : IsNoetherianRing R\n⊢ StrongRankCondition R\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase le_of_fin_injective\nR : Type u\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : IsNoetherianRing R\n⊢ ∀ {n m : ℕ} (f : (Fin n → R) →ₗ[R] Fin m → R), Injective ↑f → n ≤ m\n[PROOFSTEP]\nintro m n f i\n[GOAL]\ncase le_of_fin_injective\nR : Type u\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : IsNoetherianRing R\nm n : ℕ\nf : (Fin m → R) →ₗ[R] Fin n → R\ni : Injective ↑f\n⊢ m ≤ n\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase le_of_fin_injective\nR : Type u\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : IsNoetherianRing R\nm n : ℕ\nf : (Fin m → R) →ₗ[R] Fin n → R\ni : Injective ↑f\nh : ¬m ≤ n\n⊢ False\n[PROOFSTEP]\nrw [not_le, ← Nat.add_one_le_iff, le_iff_exists_add] at h \n[GOAL]\ncase le_of_fin_injective\nR : Type u\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : IsNoetherianRing R\nm n : ℕ\nf : (Fin m → R) →ₗ[R] Fin n → R\ni : Injective ↑f\nh : ∃ c, m = n + 1 + c\n⊢ False\n[PROOFSTEP]\nobtain ⟨m, rfl⟩ := h\n[GOAL]\ncase le_of_fin_injective.intro\nR : Type u\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : IsNoetherianRing R\nn m : ℕ\nf : (Fin (n + 1 + m) → R) →ₗ[R] Fin n → R\ni : Injective ↑f\n⊢ False\n[PROOFSTEP]\nlet e : Fin (n + 1 + m) ≃ Sum (Fin n) (Fin (1 + m)) := (finCongr (add_assoc _ _ _)).trans finSumFinEquiv.symm\n[GOAL]\ncase le_of_fin_injective.intro\nR : Type u\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : IsNoetherianRing R\nn m : ℕ\nf : (Fin (n + 1 + m) → R) →ₗ[R] Fin n → R\ni : Injective ↑f\ne : Fin (n + 1 + m) ≃ Fin n ⊕ Fin (1 + m) := (finCongr (_ : n + 1 + m = n + (1 + m))).trans finSumFinEquiv.symm\n⊢ False\n[PROOFSTEP]\nlet f' := f.comp ((LinearEquiv.sumArrowLequivProdArrow _ _ R R).symm.trans (LinearEquiv.funCongrLeft R R e)).toLinearMap\n[GOAL]\ncase le_of_fin_injective.intro\nR : Type u\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : IsNoetherianRing R\nn m : ℕ\nf : (Fin (n + 1 + m) → R) →ₗ[R] Fin n → R\ni : Injective ↑f\ne : Fin (n + 1 + m) ≃ Fin n ⊕ Fin (1 + m) := (finCongr (_ : n + 1 + m = n + (1 + m))).trans finSumFinEquiv.symm\nf' : (Fin n → R) × (Fin (1 + m) → R) →ₗ[R] Fin n → R :=\n  LinearMap.comp f\n    ↑(LinearEquiv.trans (LinearEquiv.symm (LinearEquiv.sumArrowLequivProdArrow (Fin n) (Fin (1 + m)) R R))\n        (LinearEquiv.funCongrLeft R R e))\n⊢ False\n[PROOFSTEP]\nhave i' : Injective f' := i.comp (LinearEquiv.injective _)\n[GOAL]\ncase le_of_fin_injective.intro\nR : Type u\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : IsNoetherianRing R\nn m : ℕ\nf : (Fin (n + 1 + m) → R) →ₗ[R] Fin n → R\ni : Injective ↑f\ne : Fin (n + 1 + m) ≃ Fin n ⊕ Fin (1 + m) := (finCongr (_ : n + 1 + m = n + (1 + m))).trans finSumFinEquiv.symm\nf' : (Fin n → R) × (Fin (1 + m) → R) →ₗ[R] Fin n → R :=\n  LinearMap.comp f\n    ↑(LinearEquiv.trans (LinearEquiv.symm (LinearEquiv.sumArrowLequivProdArrow (Fin n) (Fin (1 + m)) R R))\n        (LinearEquiv.funCongrLeft R R e))\ni' : Injective ↑f'\n⊢ False\n[PROOFSTEP]\napply @zero_ne_one (Fin (1 + m) → R) _ _\n[GOAL]\ncase le_of_fin_injective.intro.a\nR : Type u\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : IsNoetherianRing R\nn m : ℕ\nf : (Fin (n + 1 + m) → R) →ₗ[R] Fin n → R\ni : Injective ↑f\ne : Fin (n + 1 + m) ≃ Fin n ⊕ Fin (1 + m) := (finCongr (_ : n + 1 + m = n + (1 + m))).trans finSumFinEquiv.symm\nf' : (Fin n → R) × (Fin (1 + m) → R) →ₗ[R] Fin n → R :=\n  LinearMap.comp f\n    ↑(LinearEquiv.trans (LinearEquiv.symm (LinearEquiv.sumArrowLequivProdArrow (Fin n) (Fin (1 + m)) R R))\n        (LinearEquiv.funCongrLeft R R e))\ni' : Injective ↑f'\n⊢ 0 = 1\n[PROOFSTEP]\napply (IsNoetherian.equivPUnitOfProdInjective f' i').injective\n[GOAL]\ncase le_of_fin_injective.intro.a.a\nR : Type u\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : IsNoetherianRing R\nn m : ℕ\nf : (Fin (n + 1 + m) → R) →ₗ[R] Fin n → R\ni : Injective ↑f\ne : Fin (n + 1 + m) ≃ Fin n ⊕ Fin (1 + m) := (finCongr (_ : n + 1 + m = n + (1 + m))).trans finSumFinEquiv.symm\nf' : (Fin n → R) × (Fin (1 + m) → R) →ₗ[R] Fin n → R :=\n  LinearMap.comp f\n    ↑(LinearEquiv.trans (LinearEquiv.symm (LinearEquiv.sumArrowLequivProdArrow (Fin n) (Fin (1 + m)) R R))\n        (LinearEquiv.funCongrLeft R R e))\ni' : Injective ↑f'\n⊢ ↑(IsNoetherian.equivPUnitOfProdInjective f' i') 0 = ↑(IsNoetherian.equivPUnitOfProdInjective f' i') 1\n[PROOFSTEP]\next\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝ : Fintype ι\nι' : Type w\nI : Ideal R\ne : (ι → R) →ₗ[R] ι' → R\nx : (ι → R) ⧸ Ideal.pi I ι\n⊢ ∀ (a b : ι → R),\n    Setoid.r a b →\n      (fun y => ↑(Ideal.Quotient.mk (Ideal.pi I ι')) (↑e y)) a =\n        (fun y => ↑(Ideal.Quotient.mk (Ideal.pi I ι')) (↑e y)) b\n[PROOFSTEP]\nrefine' fun a b hab => Ideal.Quotient.eq.2 fun h => _\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝ : Fintype ι\nι' : Type w\nI : Ideal R\ne : (ι → R) →ₗ[R] ι' → R\nx : (ι → R) ⧸ Ideal.pi I ι\na b : ι → R\nhab : Setoid.r a b\nh : ι'\n⊢ (↑e a - ↑e b) h ∈ I\n[PROOFSTEP]\nrw [Submodule.quotientRel_r_def] at hab \n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝ : Fintype ι\nι' : Type w\nI : Ideal R\ne : (ι → R) →ₗ[R] ι' → R\nx : (ι → R) ⧸ Ideal.pi I ι\na b : ι → R\nhab : a - b ∈ Ideal.pi I ι\nh : ι'\n⊢ (↑e a - ↑e b) h ∈ I\n[PROOFSTEP]\nrw [← LinearMap.map_sub]\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝ : Fintype ι\nι' : Type w\nI : Ideal R\ne : (ι → R) →ₗ[R] ι' → R\nx : (ι → R) ⧸ Ideal.pi I ι\na b : ι → R\nhab : a - b ∈ Ideal.pi I ι\nh : ι'\n⊢ ↑e (a - b) h ∈ I\n[PROOFSTEP]\nexact Ideal.map_pi _ _ hab e h\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ ((ι → R) ⧸ Ideal.pi I ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ Ideal.pi I ι'\n[PROOFSTEP]\nrefine'\n  { toFun := induced_map I e\n    invFun := induced_map I e.symm .. }\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ ∀ (x y : (ι → R) ⧸ Ideal.pi I ι), induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y\ncase refine'_2\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n    AddHom.toFun { toFun := induced_map I ↑e, map_add' := ?refine'_1 } (r • x) =\n      ↑(RingHom.id (R ⧸ I)) r • AddHom.toFun { toFun := induced_map I ↑e, map_add' := ?refine'_1 } x\ncase refine'_3\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ LeftInverse (induced_map I ↑(LinearEquiv.symm e))\n    { toAddHom := { toFun := induced_map I ↑e, map_add' := ?refine'_1 }, map_smul' := ?refine'_2 }.toAddHom.toFun\ncase refine'_4\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ Function.RightInverse (induced_map I ↑(LinearEquiv.symm e))\n    { toAddHom := { toFun := induced_map I ↑e, map_add' := ?refine'_1 }, map_smul' := ?refine'_2 }.toAddHom.toFun\n[PROOFSTEP]\nall_goals\n  first\n  | rintro ⟨a⟩ ⟨b⟩\n  |\n    rintro\n      ⟨a⟩\n          -- porting note: the next 4 lines were necessary because Lean couldn't correctly infer `(I.pi ι)`\n            -- and `(I.pi ι')` on its own.\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ ∀ (x y : (ι → R) ⧸ Ideal.pi I ι), induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y\n[PROOFSTEP]\nfirst\n| rintro ⟨a⟩ ⟨b⟩\n|\n  rintro\n    ⟨a⟩\n        -- porting note: the next 4 lines were necessary because Lean couldn't correctly infer `(I.pi ι)`\n          -- and `(I.pi ι')` on its own.\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ ∀ (x y : (ι → R) ⧸ Ideal.pi I ι), induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n    AddHom.toFun\n        { toFun := induced_map I ↑e,\n          map_add' :=\n            (_ :\n              ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n        (r • x) =\n      ↑(RingHom.id (R ⧸ I)) r •\n        AddHom.toFun\n          { toFun := induced_map I ↑e,\n            map_add' :=\n              (_ :\n                ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                  induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n          x\n[PROOFSTEP]\nfirst\n| rintro ⟨a⟩ ⟨b⟩\n|\n  rintro\n    ⟨a⟩\n        -- porting note: the next 4 lines were necessary because Lean couldn't correctly infer `(I.pi ι)`\n          -- and `(I.pi ι')` on its own.\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n    AddHom.toFun\n        { toFun := induced_map I ↑e,\n          map_add' :=\n            (_ :\n              ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n        (r • x) =\n      ↑(RingHom.id (R ⧸ I)) r •\n        AddHom.toFun\n          { toFun := induced_map I ↑e,\n            map_add' :=\n              (_ :\n                ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                  induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n          x\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase refine'_3\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ LeftInverse (induced_map I ↑(LinearEquiv.symm e))\n    {\n          toAddHom :=\n            { toFun := induced_map I ↑e,\n              map_add' :=\n                (_ :\n                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                AddHom.toFun\n                    { toFun := induced_map I ↑e,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                    (r • x) =\n                  ↑(RingHom.id (R ⧸ I)) r •\n                    AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      x) }.toAddHom.toFun\n[PROOFSTEP]\nfirst\n| rintro ⟨a⟩ ⟨b⟩\n|\n  rintro\n    ⟨a⟩\n        -- porting note: the next 4 lines were necessary because Lean couldn't correctly infer `(I.pi ι)`\n          -- and `(I.pi ι')` on its own.\n[GOAL]\ncase refine'_3\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ LeftInverse (induced_map I ↑(LinearEquiv.symm e))\n    {\n          toAddHom :=\n            { toFun := induced_map I ↑e,\n              map_add' :=\n                (_ :\n                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                AddHom.toFun\n                    { toFun := induced_map I ↑e,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                    (r • x) =\n                  ↑(RingHom.id (R ⧸ I)) r •\n                    AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      x) }.toAddHom.toFun\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase refine'_3\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ LeftInverse (induced_map I ↑(LinearEquiv.symm e))\n    {\n          toAddHom :=\n            { toFun := induced_map I ↑e,\n              map_add' :=\n                (_ :\n                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                AddHom.toFun\n                    { toFun := induced_map I ↑e,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                    (r • x) =\n                  ↑(RingHom.id (R ⧸ I)) r •\n                    AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      x) }.toAddHom.toFun\n[PROOFSTEP]\nrintro\n  ⟨a⟩\n      -- porting note: the next 4 lines were necessary because Lean couldn't correctly infer `(I.pi ι)`\n        -- and `(I.pi ι')` on its own.\n[GOAL]\ncase refine'_4\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ Function.RightInverse (induced_map I ↑(LinearEquiv.symm e))\n    {\n          toAddHom :=\n            { toFun := induced_map I ↑e,\n              map_add' :=\n                (_ :\n                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                AddHom.toFun\n                    { toFun := induced_map I ↑e,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                    (r • x) =\n                  ↑(RingHom.id (R ⧸ I)) r •\n                    AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      x) }.toAddHom.toFun\n[PROOFSTEP]\nfirst\n| rintro ⟨a⟩ ⟨b⟩\n|\n  rintro\n    ⟨a⟩\n        -- porting note: the next 4 lines were necessary because Lean couldn't correctly infer `(I.pi ι)`\n          -- and `(I.pi ι')` on its own.\n[GOAL]\ncase refine'_4\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ Function.RightInverse (induced_map I ↑(LinearEquiv.symm e))\n    {\n          toAddHom :=\n            { toFun := induced_map I ↑e,\n              map_add' :=\n                (_ :\n                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                AddHom.toFun\n                    { toFun := induced_map I ↑e,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                    (r • x) =\n                  ↑(RingHom.id (R ⧸ I)) r •\n                    AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      x) }.toAddHom.toFun\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase refine'_4\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\n⊢ Function.RightInverse (induced_map I ↑(LinearEquiv.symm e))\n    {\n          toAddHom :=\n            { toFun := induced_map I ↑e,\n              map_add' :=\n                (_ :\n                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                AddHom.toFun\n                    { toFun := induced_map I ↑e,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                    (r • x) =\n                  ↑(RingHom.id (R ⧸ I)) r •\n                    AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      x) }.toAddHom.toFun\n[PROOFSTEP]\nrintro\n  ⟨a⟩\n      -- porting note: the next 4 lines were necessary because Lean couldn't correctly infer `(I.pi ι)`\n        -- and `(I.pi ι')` on its own.\n[GOAL]\ncase refine'_1.mk.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\na : ι → R\ny✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ induced_map I (↑e) (Quot.mk Setoid.r a + Quot.mk Setoid.r b) =\n    induced_map I (↑e) (Quot.mk Setoid.r a) + induced_map I (↑e) (Quot.mk Setoid.r b)\ncase refine'_2.mk.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nr✝ : R ⧸ I\na : R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ AddHom.toFun\n      { toFun := induced_map I ↑e,\n        map_add' :=\n          (_ :\n            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n      (Quot.mk Setoid.r a • Quot.mk Setoid.r b) =\n    ↑(RingHom.id (R ⧸ I)) (Quot.mk Setoid.r a) •\n      AddHom.toFun\n        { toFun := induced_map I ↑e,\n          map_add' :=\n            (_ :\n              ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n        (Quot.mk Setoid.r b)\ncase refine'_3.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\na : ι → R\n⊢ induced_map I (↑(LinearEquiv.symm e))\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := induced_map I ↑e,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                      induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                  AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      (r • x) =\n                    ↑(RingHom.id (R ⧸ I)) r •\n                      AddHom.toFun\n                        { toFun := induced_map I ↑e,\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                                induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                        x) }.toAddHom\n        (Quot.mk Setoid.r a)) =\n    Quot.mk Setoid.r a\ncase refine'_4.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι' → R) ⧸ Ideal.pi I ι'\na : ι' → R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := induced_map I ↑e,\n              map_add' :=\n                (_ :\n                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                AddHom.toFun\n                    { toFun := induced_map I ↑e,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                    (r • x) =\n                  ↑(RingHom.id (R ⧸ I)) r •\n                    AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      x) }.toAddHom\n      (induced_map I (↑(LinearEquiv.symm e)) (Quot.mk Setoid.r a)) =\n    Quot.mk Setoid.r a\n[PROOFSTEP]\npick_goal 3\n[GOAL]\ncase refine'_3.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\na : ι → R\n⊢ induced_map I (↑(LinearEquiv.symm e))\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := induced_map I ↑e,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                      induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                  AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      (r • x) =\n                    ↑(RingHom.id (R ⧸ I)) r •\n                      AddHom.toFun\n                        { toFun := induced_map I ↑e,\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                                induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                        x) }.toAddHom\n        (Quot.mk Setoid.r a)) =\n    Quot.mk Setoid.r a\ncase refine'_1.mk.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\na : ι → R\ny✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ induced_map I (↑e) (Quot.mk Setoid.r a + Quot.mk Setoid.r b) =\n    induced_map I (↑e) (Quot.mk Setoid.r a) + induced_map I (↑e) (Quot.mk Setoid.r b)\ncase refine'_2.mk.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nr✝ : R ⧸ I\na : R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ AddHom.toFun\n      { toFun := induced_map I ↑e,\n        map_add' :=\n          (_ :\n            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n      (Quot.mk Setoid.r a • Quot.mk Setoid.r b) =\n    ↑(RingHom.id (R ⧸ I)) (Quot.mk Setoid.r a) •\n      AddHom.toFun\n        { toFun := induced_map I ↑e,\n          map_add' :=\n            (_ :\n              ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n        (Quot.mk Setoid.r b)\ncase refine'_4.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι' → R) ⧸ Ideal.pi I ι'\na : ι' → R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := induced_map I ↑e,\n              map_add' :=\n                (_ :\n                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                AddHom.toFun\n                    { toFun := induced_map I ↑e,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                    (r • x) =\n                  ↑(RingHom.id (R ⧸ I)) r •\n                    AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      x) }.toAddHom\n      (induced_map I (↑(LinearEquiv.symm e)) (Quot.mk Setoid.r a)) =\n    Quot.mk Setoid.r a\n[PROOFSTEP]\nconvert_to Ideal.Quotient.mk (I.pi ι) _ = Ideal.Quotient.mk (I.pi ι) _\n[GOAL]\ncase refine'_3.mk.convert_3\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\na : ι → R\n⊢ ↑(Ideal.Quotient.mk (Ideal.pi I ι)) (↑↑(LinearEquiv.symm e) (↑↑e a)) = ↑(Ideal.Quotient.mk (Ideal.pi I ι)) a\ncase refine'_1.mk.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\na : ι → R\ny✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ induced_map I (↑e) (Quot.mk Setoid.r a + Quot.mk Setoid.r b) =\n    induced_map I (↑e) (Quot.mk Setoid.r a) + induced_map I (↑e) (Quot.mk Setoid.r b)\ncase refine'_2.mk.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nr✝ : R ⧸ I\na : R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ AddHom.toFun\n      { toFun := induced_map I ↑e,\n        map_add' :=\n          (_ :\n            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n      (Quot.mk Setoid.r a • Quot.mk Setoid.r b) =\n    ↑(RingHom.id (R ⧸ I)) (Quot.mk Setoid.r a) •\n      AddHom.toFun\n        { toFun := induced_map I ↑e,\n          map_add' :=\n            (_ :\n              ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n        (Quot.mk Setoid.r b)\ncase refine'_4.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι' → R) ⧸ Ideal.pi I ι'\na : ι' → R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := induced_map I ↑e,\n              map_add' :=\n                (_ :\n                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                AddHom.toFun\n                    { toFun := induced_map I ↑e,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                    (r • x) =\n                  ↑(RingHom.id (R ⧸ I)) r •\n                    AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      x) }.toAddHom\n      (induced_map I (↑(LinearEquiv.symm e)) (Quot.mk Setoid.r a)) =\n    Quot.mk Setoid.r a\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine'_3.mk.convert_3.h.e_6.h\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\na : ι → R\n⊢ ↑↑(LinearEquiv.symm e) (↑↑e a) = a\ncase refine'_1.mk.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\na : ι → R\ny✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ induced_map I (↑e) (Quot.mk Setoid.r a + Quot.mk Setoid.r b) =\n    induced_map I (↑e) (Quot.mk Setoid.r a) + induced_map I (↑e) (Quot.mk Setoid.r b)\ncase refine'_2.mk.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nr✝ : R ⧸ I\na : R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ AddHom.toFun\n      { toFun := induced_map I ↑e,\n        map_add' :=\n          (_ :\n            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n      (Quot.mk Setoid.r a • Quot.mk Setoid.r b) =\n    ↑(RingHom.id (R ⧸ I)) (Quot.mk Setoid.r a) •\n      AddHom.toFun\n        { toFun := induced_map I ↑e,\n          map_add' :=\n            (_ :\n              ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n        (Quot.mk Setoid.r b)\ncase refine'_4.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι' → R) ⧸ Ideal.pi I ι'\na : ι' → R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := induced_map I ↑e,\n              map_add' :=\n                (_ :\n                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                AddHom.toFun\n                    { toFun := induced_map I ↑e,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                    (r • x) =\n                  ↑(RingHom.id (R ⧸ I)) r •\n                    AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      x) }.toAddHom\n      (induced_map I (↑(LinearEquiv.symm e)) (Quot.mk Setoid.r a)) =\n    Quot.mk Setoid.r a\n[PROOFSTEP]\nsimp only [LinearEquiv.coe_coe, LinearEquiv.symm_apply_apply]\n[GOAL]\ncase refine'_1.mk.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\na : ι → R\ny✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ induced_map I (↑e) (Quot.mk Setoid.r a + Quot.mk Setoid.r b) =\n    induced_map I (↑e) (Quot.mk Setoid.r a) + induced_map I (↑e) (Quot.mk Setoid.r b)\ncase refine'_2.mk.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nr✝ : R ⧸ I\na : R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ AddHom.toFun\n      { toFun := induced_map I ↑e,\n        map_add' :=\n          (_ :\n            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n      (Quot.mk Setoid.r a • Quot.mk Setoid.r b) =\n    ↑(RingHom.id (R ⧸ I)) (Quot.mk Setoid.r a) •\n      AddHom.toFun\n        { toFun := induced_map I ↑e,\n          map_add' :=\n            (_ :\n              ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n        (Quot.mk Setoid.r b)\ncase refine'_4.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι' → R) ⧸ Ideal.pi I ι'\na : ι' → R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := induced_map I ↑e,\n              map_add' :=\n                (_ :\n                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                AddHom.toFun\n                    { toFun := induced_map I ↑e,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                    (r • x) =\n                  ↑(RingHom.id (R ⧸ I)) r •\n                    AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      x) }.toAddHom\n      (induced_map I (↑(LinearEquiv.symm e)) (Quot.mk Setoid.r a)) =\n    Quot.mk Setoid.r a\n[PROOFSTEP]\nall_goals\n  convert_to Ideal.Quotient.mk (I.pi ι') _ = Ideal.Quotient.mk (I.pi ι') _\n  congr\n  simp only [map_add, LinearEquiv.coe_coe, LinearEquiv.map_smulₛₗ, RingHom.id_apply, LinearEquiv.apply_symm_apply]\n[GOAL]\ncase refine'_1.mk.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\na : ι → R\ny✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ induced_map I (↑e) (Quot.mk Setoid.r a + Quot.mk Setoid.r b) =\n    induced_map I (↑e) (Quot.mk Setoid.r a) + induced_map I (↑e) (Quot.mk Setoid.r b)\n[PROOFSTEP]\nconvert_to Ideal.Quotient.mk (I.pi ι') _ = Ideal.Quotient.mk (I.pi ι') _\n[GOAL]\ncase refine'_1.mk.mk.convert_3\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\na : ι → R\ny✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ ↑(Ideal.Quotient.mk (Ideal.pi I ι')) (↑↑e ((fun x x_1 => x + x_1) a b)) =\n    ↑(Ideal.Quotient.mk (Ideal.pi I ι')) ((fun x x_1 => x + x_1) (↑↑e a) (↑↑e b))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine'_1.mk.mk.convert_3.h.e_6.h\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\na : ι → R\ny✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ ↑↑e ((fun x x_1 => x + x_1) a b) = (fun x x_1 => x + x_1) (↑↑e a) (↑↑e b)\n[PROOFSTEP]\nsimp only [map_add, LinearEquiv.coe_coe, LinearEquiv.map_smulₛₗ, RingHom.id_apply, LinearEquiv.apply_symm_apply]\n[GOAL]\ncase refine'_2.mk.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nr✝ : R ⧸ I\na : R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ AddHom.toFun\n      { toFun := induced_map I ↑e,\n        map_add' :=\n          (_ :\n            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n      (Quot.mk Setoid.r a • Quot.mk Setoid.r b) =\n    ↑(RingHom.id (R ⧸ I)) (Quot.mk Setoid.r a) •\n      AddHom.toFun\n        { toFun := induced_map I ↑e,\n          map_add' :=\n            (_ :\n              ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n        (Quot.mk Setoid.r b)\n[PROOFSTEP]\nconvert_to Ideal.Quotient.mk (I.pi ι') _ = Ideal.Quotient.mk (I.pi ι') _\n[GOAL]\ncase refine'_2.mk.mk.convert_3\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nr✝ : R ⧸ I\na : R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ ↑(Ideal.Quotient.mk (Ideal.pi I ι')) (↑↑e (a • b)) = ↑(Ideal.Quotient.mk (Ideal.pi I ι')) (a • ↑↑e b)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine'_2.mk.mk.convert_3.h.e_6.h\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nr✝ : R ⧸ I\na : R\nx✝ : (ι → R) ⧸ Ideal.pi I ι\nb : ι → R\n⊢ ↑↑e (a • b) = a • ↑↑e b\n[PROOFSTEP]\nsimp only [map_add, LinearEquiv.coe_coe, LinearEquiv.map_smulₛₗ, RingHom.id_apply, LinearEquiv.apply_symm_apply]\n[GOAL]\ncase refine'_4.mk\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι' → R) ⧸ Ideal.pi I ι'\na : ι' → R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := induced_map I ↑e,\n              map_add' :=\n                (_ :\n                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),\n                AddHom.toFun\n                    { toFun := induced_map I ↑e,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                    (r • x) =\n                  ↑(RingHom.id (R ⧸ I)) r •\n                    AddHom.toFun\n                      { toFun := induced_map I ↑e,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),\n                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }\n                      x) }.toAddHom\n      (induced_map I (↑(LinearEquiv.symm e)) (Quot.mk Setoid.r a)) =\n    Quot.mk Setoid.r a\n[PROOFSTEP]\nconvert_to Ideal.Quotient.mk (I.pi ι') _ = Ideal.Quotient.mk (I.pi ι') _\n[GOAL]\ncase refine'_4.mk.convert_3\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι' → R) ⧸ Ideal.pi I ι'\na : ι' → R\n⊢ ↑(Ideal.Quotient.mk (Ideal.pi I ι')) (↑↑e (↑↑(LinearEquiv.symm e) a)) = ↑(Ideal.Quotient.mk (Ideal.pi I ι')) a\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine'_4.mk.convert_3.h.e_6.h\nR : Type u\ninst✝² : CommRing R\nI✝ : Ideal R\nι : Type v\ninst✝¹ : Fintype ι\nι' : Type w\ninst✝ : Fintype ι'\nI : Ideal R\ne : (ι → R) ≃ₗ[R] ι' → R\nx✝ : (ι' → R) ⧸ Ideal.pi I ι'\na : ι' → R\n⊢ ↑↑e (↑↑(LinearEquiv.symm e) a) = a\n[PROOFSTEP]\nsimp only [map_add, LinearEquiv.coe_coe, LinearEquiv.map_smulₛₗ, RingHom.id_apply, LinearEquiv.apply_symm_apply]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.InvariantBasisNumber", "llama_tokens": 22668, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6825737344123242, "lm_q2_score": 0.5813030906443133, "lm_q1q2_score": 0.3967822214065147}}
{"text": "[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\np q : Substructure L M\nh : ↑p = ↑q\n⊢ p = q\n[PROOFSTEP]\ncases p\n[GOAL]\ncase mk\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nq : Substructure L M\ncarrier✝ : Set M\nfun_mem✝ : ∀ {n : ℕ} (f : Functions L n), ClosedUnder f carrier✝\nh : ↑{ carrier := carrier✝, fun_mem := fun_mem✝ } = ↑q\n⊢ { carrier := carrier✝, fun_mem := fun_mem✝ } = q\n[PROOFSTEP]\ncases q\n[GOAL]\ncase mk.mk\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\ncarrier✝¹ : Set M\nfun_mem✝¹ : ∀ {n : ℕ} (f : Functions L n), ClosedUnder f carrier✝¹\ncarrier✝ : Set M\nfun_mem✝ : ∀ {n : ℕ} (f : Functions L n), ClosedUnder f carrier✝\nh : ↑{ carrier := carrier✝¹, fun_mem := fun_mem✝¹ } = ↑{ carrier := carrier✝, fun_mem := fun_mem✝ }\n⊢ { carrier := carrier✝¹, fun_mem := fun_mem✝¹ } = { carrier := carrier✝, fun_mem := fun_mem✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nα : Type u_3\nt : Term L α\nxs : α → M\nh : ∀ (a : α), xs a ∈ S\n⊢ realize xs t ∈ S\n[PROOFSTEP]\ninduction' t with a n f ts ih\n[GOAL]\ncase var\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nα : Type u_3\nxs : α → M\nh : ∀ (a : α), xs a ∈ S\na : α\n⊢ realize xs (var a) ∈ S\n[PROOFSTEP]\nexact h a\n[GOAL]\ncase func\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nα : Type u_3\nxs : α → M\nh : ∀ (a : α), xs a ∈ S\nn : ℕ\nf : Functions L n\nts : Fin n → Term L α\nih : ∀ (a : Fin n), realize xs (ts a) ∈ S\n⊢ realize xs (func f ts) ∈ S\n[PROOFSTEP]\nexact Substructure.fun_mem _ _ _ ih\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set (Substructure L M)\nn : ℕ\nf : Functions L n\n⊢ ∀ (s_1 : Set M), (s_1 ∈ Set.range fun t => ⋂ (_ : t ∈ s), ↑t) → ClosedUnder f s_1\n[PROOFSTEP]\nrintro _ ⟨t, rfl⟩\n[GOAL]\ncase intro\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set (Substructure L M)\nn : ℕ\nf : Functions L n\nt : Substructure L M\n⊢ ClosedUnder f ((fun t => ⋂ (_ : t ∈ s), ↑t) t)\n[PROOFSTEP]\nby_cases h : t ∈ s\n[GOAL]\ncase pos\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set (Substructure L M)\nn : ℕ\nf : Functions L n\nt : Substructure L M\nh : t ∈ s\n⊢ ClosedUnder f ((fun t => ⋂ (_ : t ∈ s), ↑t) t)\n[PROOFSTEP]\nsimpa [h] using t.fun_mem f\n[GOAL]\ncase neg\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set (Substructure L M)\nn : ℕ\nf : Functions L n\nt : Substructure L M\nh : ¬t ∈ s\n⊢ ClosedUnder f ((fun t => ⋂ (_ : t ∈ s), ↑t) t)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\nι : Sort u_3\nS : ι → Substructure L M\nx : M\n⊢ x ∈ ⨅ (i : ι), S i ↔ ∀ (i : ι), x ∈ S i\n[PROOFSTEP]\nsimp only [iInf, mem_sInf, Set.forall_range_iff]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\nι : Sort u_3\nS : ι → Substructure L M\n⊢ ↑(⨅ (i : ι), S i) = ⋂ (i : ι), ↑(S i)\n[PROOFSTEP]\nsimp only [iInf, coe_sInf, Set.biInter_range]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\n⊢ ↑(LowerAdjoint.toFun (closure L) s) = range (Term.realize Subtype.val)\n[PROOFSTEP]\nlet S : L.Substructure M :=\n  ⟨range (Term.realize (L := L) ((↑) : s → M)), fun {n} f x hx =>\n    by\n    simp only [mem_range] at *\n    refine' ⟨func f fun i => Classical.choose (hx i), _⟩\n    simp only [Term.realize, fun i => Classical.choose_spec (hx i)]⟩\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\nn : ℕ\nf : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ range (Term.realize Subtype.val)\n⊢ funMap f x ∈ range (Term.realize Subtype.val)\n[PROOFSTEP]\nsimp only [mem_range] at *\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\nn : ℕ\nf : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), ∃ y, Term.realize Subtype.val y = x i\n⊢ ∃ y, Term.realize Subtype.val y = funMap f x\n[PROOFSTEP]\nrefine' ⟨func f fun i => Classical.choose (hx i), _⟩\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\nn : ℕ\nf : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), ∃ y, Term.realize Subtype.val y = x i\n⊢ Term.realize Subtype.val (func f fun i => Classical.choose (_ : ∃ y, Term.realize Subtype.val y = x i)) = funMap f x\n[PROOFSTEP]\nsimp only [Term.realize, fun i => Classical.choose_spec (hx i)]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\ns : Set M\nS : Substructure L M :=\n  { carrier := range (Term.realize Subtype.val),\n    fun_mem :=\n      (_ :\n        ∀ {n : ℕ} (f : Functions L n) (x : Fin n → M),\n          (∀ (i : Fin n), x i ∈ range (Term.realize Subtype.val)) → funMap f x ∈ range (Term.realize Subtype.val)) }\n⊢ ↑(LowerAdjoint.toFun (closure L) s) = range (Term.realize Subtype.val)\n[PROOFSTEP]\nchange _ = (S : Set M)\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\ns : Set M\nS : Substructure L M :=\n  { carrier := range (Term.realize Subtype.val),\n    fun_mem :=\n      (_ :\n        ∀ {n : ℕ} (f : Functions L n) (x : Fin n → M),\n          (∀ (i : Fin n), x i ∈ range (Term.realize Subtype.val)) → funMap f x ∈ range (Term.realize Subtype.val)) }\n⊢ ↑(LowerAdjoint.toFun (closure L) s) = ↑S\n[PROOFSTEP]\nrw [← SetLike.ext'_iff]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\ns : Set M\nS : Substructure L M :=\n  { carrier := range (Term.realize Subtype.val),\n    fun_mem :=\n      (_ :\n        ∀ {n : ℕ} (f : Functions L n) (x : Fin n → M),\n          (∀ (i : Fin n), x i ∈ range (Term.realize Subtype.val)) → funMap f x ∈ range (Term.realize Subtype.val)) }\n⊢ LowerAdjoint.toFun (closure L) s = S\n[PROOFSTEP]\nrefine' closure_eq_of_le (fun x hx => ⟨var ⟨x, hx⟩, rfl⟩) (le_sInf fun S' hS' => _)\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\ns : Set M\nS : Substructure L M :=\n  { carrier := range (Term.realize Subtype.val),\n    fun_mem :=\n      (_ :\n        ∀ {n : ℕ} (f : Functions L n) (x : Fin n → M),\n          (∀ (i : Fin n), x i ∈ range (Term.realize Subtype.val)) → funMap f x ∈ range (Term.realize Subtype.val)) }\nS' : Substructure L M\nhS' : S' ∈ {S | s ⊆ ↑S}\n⊢ S ≤ S'\n[PROOFSTEP]\nrintro _ ⟨t, rfl⟩\n[GOAL]\ncase intro\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\ns : Set M\nS : Substructure L M :=\n  { carrier := range (Term.realize Subtype.val),\n    fun_mem :=\n      (_ :\n        ∀ {n : ℕ} (f : Functions L n) (x : Fin n → M),\n          (∀ (i : Fin n), x i ∈ range (Term.realize Subtype.val)) → funMap f x ∈ range (Term.realize Subtype.val)) }\nS' : Substructure L M\nhS' : S' ∈ {S | s ⊆ ↑S}\nt : Term L { x // x ∈ s }\n⊢ Term.realize Subtype.val t ∈ S'\n[PROOFSTEP]\nexact t.realize_mem _ fun i => hS' i.2\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nS : Substructure L M\ns : Set M\ninst✝ : Small.{u, w} ↑s\n⊢ Small.{u, w} { x // x ∈ LowerAdjoint.toFun (closure L) s }\n[PROOFSTEP]\nrw [← SetLike.coe_sort_coe, Substructure.coe_closure_eq_range_term_realize]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nS : Substructure L M\ns : Set M\ninst✝ : Small.{u, w} ↑s\n⊢ Small.{u, w} ↑(range (Term.realize Subtype.val))\n[PROOFSTEP]\nexact small_range _\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\nx : M\n⊢ x ∈ LowerAdjoint.toFun (closure L) s ↔ ∃ t, Term.realize Subtype.val t = x\n[PROOFSTEP]\nrw [← SetLike.mem_coe, coe_closure_eq_range_term_realize, mem_range]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\n⊢ lift #{ x // x ∈ LowerAdjoint.toFun (closure L) s } ≤ #(Term L ↑s)\n[PROOFSTEP]\nrw [← SetLike.coe_sort_coe, coe_closure_eq_range_term_realize]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\n⊢ lift #↑(range (Term.realize Subtype.val)) ≤ #(Term L ↑s)\n[PROOFSTEP]\nrw [← Cardinal.lift_id'.{w, max u w} #(L.Term s)]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\n⊢ lift #↑(range (Term.realize Subtype.val)) ≤ lift #(Term L ↑s)\n[PROOFSTEP]\nexact Cardinal.mk_range_le_lift\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\n⊢ lift #{ x // x ∈ LowerAdjoint.toFun (closure L) s } ≤ max ℵ₀ (lift #↑s + lift #((i : ℕ) × Functions L i))\n[PROOFSTEP]\nrw [← lift_umax]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\n⊢ lift #{ x // x ∈ LowerAdjoint.toFun (closure L) s } ≤ max ℵ₀ (lift #↑s + lift #((i : ℕ) × Functions L i))\n[PROOFSTEP]\nrefine' lift_card_closure_le_card_term.trans (Term.card_le.trans _)\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\n⊢ max ℵ₀ #(↑s ⊕ (i : ℕ) × Functions L i) ≤ max ℵ₀ (lift #↑s + lift #((i : ℕ) × Functions L i))\n[PROOFSTEP]\nrw [mk_sum, lift_umax.{w, u}]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nS : Substructure L M\ns : Set M\ninst✝ : Countable ((l : ℕ) × Functions L l)\nh : Set.Countable s\n⊢ Countable { x // x ∈ LowerAdjoint.toFun (closure L) s }\n[PROOFSTEP]\nhaveI : Countable s := h.to_subtype\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nS : Substructure L M\ns : Set M\ninst✝ : Countable ((l : ℕ) × Functions L l)\nh : Set.Countable s\nthis : Countable ↑s\n⊢ Countable { x // x ∈ LowerAdjoint.toFun (closure L) s }\n[PROOFSTEP]\nrw [← mk_le_aleph0_iff, ← lift_le_aleph0]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nS : Substructure L M\ns : Set M\ninst✝ : Countable ((l : ℕ) × Functions L l)\nh : Set.Countable s\nthis : Countable ↑s\n⊢ lift #{ x // x ∈ LowerAdjoint.toFun (closure L) s } ≤ ℵ₀\n[PROOFSTEP]\nexact lift_card_closure_le_card_term.trans mk_le_aleph0\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns✝ : Set M\np : M → Prop\nx : M\ns : Set M\nhs : LowerAdjoint.toFun (closure L) s = ⊤\nHs : ∀ (x : M), x ∈ s → p x\nHfun : ∀ {n : ℕ} (f : Functions L n), ClosedUnder f (setOf p)\n⊢ p x\n[PROOFSTEP]\nhave : ∀ x ∈ closure L s, p x := fun x hx => closure_induction hx Hs fun {n} => Hfun\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns✝ : Set M\np : M → Prop\nx : M\ns : Set M\nhs : LowerAdjoint.toFun (closure L) s = ⊤\nHs : ∀ (x : M), x ∈ s → p x\nHfun : ∀ {n : ℕ} (f : Functions L n), ClosedUnder f (setOf p)\nthis : ∀ (x : M), x ∈ LowerAdjoint.toFun (closure L) s → p x\n⊢ p x\n[PROOFSTEP]\nsimpa [hs] using this x\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\n⊢ Small.{u, w} { x // x ∈ ⊥ }\n[PROOFSTEP]\nrw [← closure_empty]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\n⊢ Small.{u, w} { x // x ∈ LowerAdjoint.toFun (closure L) ∅ }\n[PROOFSTEP]\nhaveI : Small.{u} (∅ : Set M) := small_subsingleton _\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\nthis : Small.{u, w} ↑∅\n⊢ Small.{u, w} { x // x ∈ LowerAdjoint.toFun (closure L) ∅ }\n[PROOFSTEP]\nexact Substructure.small_closure\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\ns : Set M\nφ : M →[L] N\nS : Substructure L N\nn : ℕ\nf : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ ↑φ ⁻¹' ↑S\n⊢ funMap f x ∈ ↑φ ⁻¹' ↑S\n[PROOFSTEP]\nrw [mem_preimage, φ.map_fun]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\ns : Set M\nφ : M →[L] N\nS : Substructure L N\nn : ℕ\nf : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ ↑φ ⁻¹' ↑S\n⊢ funMap f (↑φ ∘ x) ∈ ↑S\n[PROOFSTEP]\nexact S.fun_mem f (φ ∘ x) hx\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\ns : Set M\nS : Substructure L P\n⊢ ∀ (x : P), x ∈ comap (Hom.id L P) S ↔ x ∈ S\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\ns : Set M\nφ : M →[L] N\nS : Substructure L M\nn : ℕ\nf : Functions L n\nx : Fin n → N\nhx : ∀ (i : Fin n), x i ∈ ↑φ '' ↑S\n⊢ (fun a => ↑φ a) (funMap f fun i => Classical.choose (_ : x i ∈ ↑φ '' ↑S)) = funMap f x\n[PROOFSTEP]\nsimp only [Hom.map_fun, SetLike.mem_coe]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\ns : Set M\nφ : M →[L] N\nS : Substructure L M\nn : ℕ\nf : Functions L n\nx : Fin n → N\nhx : ∀ (i : Fin n), x i ∈ ↑φ '' ↑S\n⊢ funMap f (↑φ ∘ fun i => Classical.choose (_ : ∃ x_1, (fun x_2 => x_2 ∈ S ∧ ↑φ x_2 = x i) x_1)) = funMap f x\n[PROOFSTEP]\nexact congr rfl (funext fun i => (Classical.choose_spec (hx i)).2)\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\ns : Set M\nι : Type u_3\nf : M →[L] N\nhf : Function.Injective ↑f\nS : Substructure L M\nx : M\n⊢ x ∈ comap f (map f S) → x ∈ S\n[PROOFSTEP]\nsimp [mem_comap, mem_map, hf.eq_iff]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ : Substructure L M\ns : Set M\nι : Type u_3\nf : M →[L] N\nhf : Function.Surjective ↑f\nS : Substructure L N\nx : N\nh : x ∈ S\ny : M\nhy : ↑f y = x\n⊢ y ∈ comap f S ∧ ↑f y = x\n[PROOFSTEP]\nsimp [hy, h]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns : Set M\nm : { x // x ∈ ⊤ }\n⊢ (fun m => { val := m, property := (_ : m ∈ ⊤) }) (↑(subtype ⊤) m) = m\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns✝ s : Set M\np : (x : M) → x ∈ LowerAdjoint.toFun (closure L) s → Prop\nHs : ∀ (x : M) (h : x ∈ s), p x (_ : x ∈ ↑(LowerAdjoint.toFun (closure L) s))\nHfun : ∀ {n : ℕ} (f : Functions L n), ClosedUnder f {x | ∃ hx, p x hx}\nx : M\nhx : x ∈ LowerAdjoint.toFun (closure L) s\n⊢ p x hx\n[PROOFSTEP]\nrefine' Exists.elim _ fun (hx : x ∈ closure L s) (hc : p x hx) => hc\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\ns✝ s : Set M\np : (x : M) → x ∈ LowerAdjoint.toFun (closure L) s → Prop\nHs : ∀ (x : M) (h : x ∈ s), p x (_ : x ∈ ↑(LowerAdjoint.toFun (closure L) s))\nHfun : ∀ {n : ℕ} (f : Functions L n), ClosedUnder f {x | ∃ hx, p x hx}\nx : M\nhx : x ∈ LowerAdjoint.toFun (closure L) s\n⊢ ∃ x_1, p x x_1\n[PROOFSTEP]\nexact closure_induction hx (fun x hx => ⟨subset_closure hx, Hs x hx⟩) @Hfun\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nS✝ : Substructure L M\nL' : Language\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nS : Substructure L' M\nn : ℕ\nf : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ ↑S\n⊢ funMap f x ∈ ↑S\n[PROOFSTEP]\nhave h := S.fun_mem (φ.onFunction f) x hx\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nS✝ : Substructure L M\nL' : Language\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nS : Substructure L' M\nn : ℕ\nf : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ ↑S\nh : funMap (onFunction φ f) x ∈ ↑S\n⊢ funMap f x ∈ ↑S\n[PROOFSTEP]\nsimp only [LHom.map_onFunction, Substructure.mem_carrier] at h \n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nS✝ : Substructure L M\nL' : Language\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nS : Substructure L' M\nn : ℕ\nf : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ ↑S\nh : funMap f x ∈ S\n⊢ funMap f x ∈ ↑S\n[PROOFSTEP]\nexact h\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nS✝ : Substructure L M\nL' : Language\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nS T : Substructure L' M\nh :\n  (fun S =>\n        { carrier := ↑S,\n          fun_mem := (_ : ∀ {n : ℕ} (f : Functions L n) (x : Fin n → M), (∀ (i : Fin n), x i ∈ ↑S) → funMap f x ∈ S) })\n      S =\n    (fun S =>\n        { carrier := ↑S,\n          fun_mem := (_ : ∀ {n : ℕ} (f : Functions L n) (x : Fin n → M), (∀ (i : Fin n), x i ∈ ↑S) → funMap f x ∈ S) })\n      T\n⊢ S = T\n[PROOFSTEP]\nsimp only [SetLike.coe_set_eq, Substructure.mk.injEq] at h \n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nS✝ : Substructure L M\nL' : Language\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nS T : Substructure L' M\nh : S = T\n⊢ S = T\n[PROOFSTEP]\nexact h\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ S : Substructure L M\nA : Set M\nh : A ⊆ ↑S\nn : ℕ\nf : Functions (L[[↑A]]) n\n⊢ ClosedUnder f ↑S\n[PROOFSTEP]\ncases' f with f f\n[GOAL]\ncase inl\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ S : Substructure L M\nA : Set M\nh : A ⊆ ↑S\nn : ℕ\nf : Functions L n\n⊢ ClosedUnder (Sum.inl f) ↑S\n[PROOFSTEP]\nexact S.fun_mem f\n[GOAL]\ncase inr\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ S : Substructure L M\nA : Set M\nh : A ⊆ ↑S\nn : ℕ\nf : Functions (constantsOn ↑A) n\n⊢ ClosedUnder (Sum.inr f) ↑S\n[PROOFSTEP]\ncases n\n[GOAL]\ncase inr.zero\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ S : Substructure L M\nA : Set M\nh : A ⊆ ↑S\nf : Functions (constantsOn ↑A) Nat.zero\n⊢ ClosedUnder (Sum.inr f) ↑S\n[PROOFSTEP]\nexact fun _ _ => h f.2\n[GOAL]\ncase inr.succ\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ S : Substructure L M\nA : Set M\nh : A ⊆ ↑S\nn✝ : ℕ\nf : Functions (constantsOn ↑A) (Nat.succ n✝)\n⊢ ClosedUnder (Sum.inr f) ↑S\n[PROOFSTEP]\nexact isEmptyElim f\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nA s : Set M\nh : A ⊆ ↑S\n⊢ ↑(LHom.substructureReduct (lhomWithConstants L ↑A)) (withConstants S h) = S\n[PROOFSTEP]\next\n[GOAL]\ncase h\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nA s : Set M\nh : A ⊆ ↑S\nx✝ : M\n⊢ x✝ ∈ ↑(LHom.substructureReduct (lhomWithConstants L ↑A)) (withConstants S h) ↔ x✝ ∈ S\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nA s : Set M\nh : A ⊆ ↑S\n⊢ A ⊆ ↑(LowerAdjoint.toFun (closure (L[[↑A]])) s)\n[PROOFSTEP]\nintro a ha\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nA s : Set M\nh : A ⊆ ↑S\na : M\nha : a ∈ A\n⊢ a ∈ ↑(LowerAdjoint.toFun (closure (L[[↑A]])) s)\n[PROOFSTEP]\nsimp only [SetLike.mem_coe]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nA s : Set M\nh : A ⊆ ↑S\na : M\nha : a ∈ A\n⊢ a ∈ LowerAdjoint.toFun (closure (L[[↑A]])) s\n[PROOFSTEP]\nlet a' : L[[A]].Constants := Sum.inr ⟨a, ha⟩\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nA s : Set M\nh : A ⊆ ↑S\na : M\nha : a ∈ A\na' : Language.Constants (L[[↑A]]) := Sum.inr { val := a, property := ha }\n⊢ a ∈ LowerAdjoint.toFun (closure (L[[↑A]])) s\n[PROOFSTEP]\nexact constants_mem a'\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nA s : Set M\nh : A ⊆ ↑S\n⊢ LowerAdjoint.toFun (closure (L[[↑A]])) s =\n    withConstants (LowerAdjoint.toFun (closure L) (A ∪ s)) (_ : A ⊆ ↑(LowerAdjoint.toFun (closure L) (A ∪ s)))\n[PROOFSTEP]\nrefine' closure_eq_of_le ((A.subset_union_right s).trans subset_closure) _\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nA s : Set M\nh : A ⊆ ↑S\n⊢ withConstants (LowerAdjoint.toFun (closure L) (A ∪ s)) (_ : A ⊆ ↑(LowerAdjoint.toFun (closure L) (A ∪ s))) ≤\n    LowerAdjoint.toFun (closure (L[[↑A]])) s\n[PROOFSTEP]\nrw [← (L.lhomWithConstants A).substructureReduct.le_iff_le]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nA s : Set M\nh : A ⊆ ↑S\n⊢ ↑(LHom.substructureReduct (lhomWithConstants L ↑A))\n      (withConstants (LowerAdjoint.toFun (closure L) (A ∪ s)) (_ : A ⊆ ↑(LowerAdjoint.toFun (closure L) (A ∪ s)))) ≤\n    ↑(LHom.substructureReduct (lhomWithConstants L ↑A)) (LowerAdjoint.toFun (closure (L[[↑A]])) s)\n[PROOFSTEP]\nsimp only [subset_closure, reduct_withConstants, closure_le, LHom.coe_substructureReduct, Set.union_subset_iff,\n  and_true_iff]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nA s : Set M\nh : A ⊆ ↑S\n⊢ A ⊆ ↑(LowerAdjoint.toFun (closure (L[[↑A]])) s)\n[PROOFSTEP]\nexact subset_closure_withConstants\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\np : Substructure L N\nf✝ : M →[L] N\nh : ∀ (c : M), ↑f✝ c ∈ p\nn : ℕ\nf : Functions L n\nx : Fin n → M\n⊢ (fun c => { val := ↑f✝ c, property := (_ : ↑f✝ c ∈ p) }) (funMap f x) =\n    funMap f ((fun c => { val := ↑f✝ c, property := (_ : ↑f✝ c ∈ p) }) ∘ x)\n[PROOFSTEP]\naesop\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf : M →[L] N\n⊢ range f = Substructure.map f ⊤\n[PROOFSTEP]\next\n[GOAL]\ncase h\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf : M →[L] N\nx✝ : N\n⊢ x✝ ∈ range f ↔ x✝ ∈ Substructure.map f ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf : M →[L] N\n⊢ range f = ⊤ ↔ Function.Surjective ↑f\n[PROOFSTEP]\nrw [SetLike.ext'_iff, range_coe, coe_top, Set.range_iff_surjective]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf : M →[L] N\np : Substructure L N\n⊢ range f ≤ p ↔ comap f p = ⊤\n[PROOFSTEP]\nrw [range_eq_map, map_le_iff_le_comap, eq_top_iff]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf g : M →[L] N\nn : ℕ\nfn : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ {x | ↑f x = ↑g x}\n⊢ funMap fn x ∈ {x | ↑f x = ↑g x}\n[PROOFSTEP]\nhave h : f ∘ x = g ∘ x := by\n  ext\n  repeat' rw [Function.comp_apply]\n  apply hx\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf g : M →[L] N\nn : ℕ\nfn : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ {x | ↑f x = ↑g x}\n⊢ ↑f ∘ x = ↑g ∘ x\n[PROOFSTEP]\next\n[GOAL]\ncase h\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf g : M →[L] N\nn : ℕ\nfn : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ {x | ↑f x = ↑g x}\nx✝ : Fin n\n⊢ (↑f ∘ x) x✝ = (↑g ∘ x) x✝\n[PROOFSTEP]\nrepeat' rw [Function.comp_apply]\n[GOAL]\ncase h\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf g : M →[L] N\nn : ℕ\nfn : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ {x | ↑f x = ↑g x}\nx✝ : Fin n\n⊢ (↑f ∘ x) x✝ = (↑g ∘ x) x✝\n[PROOFSTEP]\nrw [Function.comp_apply]\n[GOAL]\ncase h\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf g : M →[L] N\nn : ℕ\nfn : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ {x | ↑f x = ↑g x}\nx✝ : Fin n\n⊢ ↑f (x x✝) = (↑g ∘ x) x✝\n[PROOFSTEP]\nrw [Function.comp_apply]\n[GOAL]\ncase h\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf g : M →[L] N\nn : ℕ\nfn : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ {x | ↑f x = ↑g x}\nx✝ : Fin n\n⊢ ↑f (x x✝) = ↑g (x x✝)\n[PROOFSTEP]\nrw [Function.comp_apply]\n[GOAL]\ncase h\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf g : M →[L] N\nn : ℕ\nfn : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ {x | ↑f x = ↑g x}\nx✝ : Fin n\n⊢ ↑f (x x✝) = ↑g (x x✝)\n[PROOFSTEP]\napply hx\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf g : M →[L] N\nn : ℕ\nfn : Functions L n\nx : Fin n → M\nhx : ∀ (i : Fin n), x i ∈ {x | ↑f x = ↑g x}\nh : ↑f ∘ x = ↑g ∘ x\n⊢ funMap fn x ∈ {x | ↑f x = ↑g x}\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\np : Substructure L N\nf : M ↪[L] N\nh : ∀ (c : M), ↑f c ∈ p\nn : ℕ\nr : Relations L n\nx : Fin n → M\n⊢ RelMap r\n      ({ toFun := ↑(Hom.codRestrict p (toHom f) h),\n            inj' :=\n              (_ :\n                ∀ (a b : M), ↑(Hom.codRestrict p (toHom f) h) a = ↑(Hom.codRestrict p (toHom f) h) b → a = b) }.toFun ∘\n        x) ↔\n    RelMap r x\n[PROOFSTEP]\nsimp only\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\np : Substructure L N\nf : M ↪[L] N\nh : ∀ (c : M), ↑f c ∈ p\nn : ℕ\nr : Relations L n\nx : Fin n → M\n⊢ RelMap r (↑(Hom.codRestrict p (toHom f) h) ∘ x) ↔ RelMap r x\n[PROOFSTEP]\nrw [← p.subtype.map_rel]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\np : Substructure L N\nf : M ↪[L] N\nh : ∀ (c : M), ↑f c ∈ p\nn : ℕ\nr : Relations L n\nx : Fin n → M\n⊢ RelMap r (↑(subtype p) ∘ ↑(Hom.codRestrict p (toHom f) h) ∘ x) ↔ RelMap r x\n[PROOFSTEP]\nchange RelMap r (Hom.comp p.subtype.toHom (f.toHom.codRestrict p h) ∘ x) ↔ _\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\np : Substructure L N\nf : M ↪[L] N\nh : ∀ (c : M), ↑f c ∈ p\nn : ℕ\nr : Relations L n\nx : Fin n → M\n⊢ RelMap r (↑(Hom.comp (toHom (subtype p)) (Hom.codRestrict p (toHom f) h)) ∘ x) ↔ RelMap r x\n[PROOFSTEP]\nrw [Hom.subtype_comp_codRestrict, ← f.map_rel]\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\np : Substructure L N\nf : M ↪[L] N\nh : ∀ (c : M), ↑f c ∈ p\nn : ℕ\nr : Relations L n\nx : Fin n → M\n⊢ RelMap r (↑(toHom f) ∘ x) ↔ RelMap r (↑f ∘ x)\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf✝ : M ↪[L] N\ns : Substructure L M\nn : ℕ\nf : Functions L n\nx : Fin n → { x // x ∈ s }\n⊢ Equiv.toFun\n      {\n        toFun :=\n          ↑(codRestrict (Substructure.map (toHom f✝) s) (domRestrict f✝ s)\n              (_ : ∀ (x : { x // x ∈ s }), ↑(domRestrict f✝ s) x ∈ Substructure.map (toHom f✝) s)),\n        invFun := fun n =>\n          { val := Classical.choose (_ : ↑n ∈ Substructure.map (toHom f✝) s),\n            property := (_ : Classical.choose (_ : ↑n ∈ Substructure.map (toHom f✝) s) ∈ ↑s) },\n        left_inv :=\n          (_ :\n            ∀ (x : { x // x ∈ s }),\n              (fun n =>\n                    { val := Classical.choose (_ : ↑n ∈ Substructure.map (toHom f✝) s),\n                      property := (_ : Classical.choose (_ : ↑n ∈ Substructure.map (toHom f✝) s) ∈ ↑s) })\n                  (↑(codRestrict (Substructure.map (toHom f✝) s) (domRestrict f✝ s)\n                        (_ : ∀ (x : { x // x ∈ s }), ↑(domRestrict f✝ s) x ∈ Substructure.map (toHom f✝) s))\n                    x) =\n                x),\n        right_inv :=\n          (_ :\n            ∀ (x : { x // x ∈ Substructure.map (toHom f✝) s }),\n              ↑(codRestrict (Substructure.map (toHom f✝) s) (domRestrict f✝ s)\n                      (_ : ∀ (x : { x // x ∈ s }), ↑(domRestrict f✝ s) x ∈ Substructure.map (toHom f✝) s))\n                  ((fun n =>\n                      { val := Classical.choose (_ : ↑n ∈ Substructure.map (toHom f✝) s),\n                        property := (_ : Classical.choose (_ : ↑n ∈ Substructure.map (toHom f✝) s) ∈ ↑s) })\n                    x) =\n                x) }\n      (funMap f x) =\n    funMap f\n      ({\n            toFun :=\n              ↑(codRestrict (Substructure.map (toHom f✝) s) (domRestrict f✝ s)\n                  (_ : ∀ (x : { x // x ∈ s }), ↑(domRestrict f✝ s) x ∈ Substructure.map (toHom f✝) s)),\n            invFun := fun n =>\n              { val := Classical.choose (_ : ↑n ∈ Substructure.map (toHom f✝) s),\n                property := (_ : Classical.choose (_ : ↑n ∈ Substructure.map (toHom f✝) s) ∈ ↑s) },\n            left_inv :=\n              (_ :\n                ∀ (x : { x // x ∈ s }),\n                  (fun n =>\n                        { val := Classical.choose (_ : ↑n ∈ Substructure.map (toHom f✝) s),\n                          property := (_ : Classical.choose (_ : ↑n ∈ Substructure.map (toHom f✝) s) ∈ ↑s) })\n                      (↑(codRestrict (Substructure.map (toHom f✝) s) (domRestrict f✝ s)\n                            (_ : ∀ (x : { x // x ∈ s }), ↑(domRestrict f✝ s) x ∈ Substructure.map (toHom f✝) s))\n                        x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : { x // x ∈ Substructure.map (toHom f✝) s }),\n                  ↑(codRestrict (Substructure.map (toHom f✝) s) (domRestrict f✝ s)\n                          (_ : ∀ (x : { x // x ∈ s }), ↑(domRestrict f✝ s) x ∈ Substructure.map (toHom f✝) s))\n                      ((fun n =>\n                          { val := Classical.choose (_ : ↑n ∈ Substructure.map (toHom f✝) s),\n                            property := (_ : Classical.choose (_ : ↑n ∈ Substructure.map (toHom f✝) s) ∈ ↑s) })\n                        x) =\n                    x) }.toFun ∘\n        x)\n[PROOFSTEP]\naesop\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf : M ↪[L] N\ns : Substructure L M\nn : ℕ\nR : Relations L n\nx : Fin n → { x // x ∈ s }\n⊢ RelMap R\n      ({\n            toFun :=\n              ↑(codRestrict (Substructure.map (toHom f) s) (domRestrict f s)\n                  (_ : ∀ (x : { x // x ∈ s }), ↑(domRestrict f s) x ∈ Substructure.map (toHom f) s)),\n            invFun := fun n =>\n              { val := Classical.choose (_ : ↑n ∈ Substructure.map (toHom f) s),\n                property := (_ : Classical.choose (_ : ↑n ∈ Substructure.map (toHom f) s) ∈ ↑s) },\n            left_inv :=\n              (_ :\n                ∀ (x : { x // x ∈ s }),\n                  (fun n =>\n                        { val := Classical.choose (_ : ↑n ∈ Substructure.map (toHom f) s),\n                          property := (_ : Classical.choose (_ : ↑n ∈ Substructure.map (toHom f) s) ∈ ↑s) })\n                      (↑(codRestrict (Substructure.map (toHom f) s) (domRestrict f s)\n                            (_ : ∀ (x : { x // x ∈ s }), ↑(domRestrict f s) x ∈ Substructure.map (toHom f) s))\n                        x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : { x // x ∈ Substructure.map (toHom f) s }),\n                  ↑(codRestrict (Substructure.map (toHom f) s) (domRestrict f s)\n                          (_ : ∀ (x : { x // x ∈ s }), ↑(domRestrict f s) x ∈ Substructure.map (toHom f) s))\n                      ((fun n =>\n                          { val := Classical.choose (_ : ↑n ∈ Substructure.map (toHom f) s),\n                            property := (_ : Classical.choose (_ : ↑n ∈ Substructure.map (toHom f) s) ∈ ↑s) })\n                        x) =\n                    x) }.toFun ∘\n        x) ↔\n    RelMap R x\n[PROOFSTEP]\naesop\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf✝ : M ↪[L] N\nn : ℕ\nf : Functions L n\nx : Fin n → M\n⊢ Equiv.toFun\n      { toFun := ↑(codRestrict (Hom.range (toHom f✝)) f✝ (_ : ∀ (x : M), ↑(toHom f✝) x ∈ Hom.range (toHom f✝))),\n        invFun := fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f✝)),\n        left_inv :=\n          (_ :\n            ∀ (m : M),\n              (fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f✝)))\n                  (↑(codRestrict (Hom.range (toHom f✝)) f✝ (_ : ∀ (x : M), ↑(toHom f✝) x ∈ Hom.range (toHom f✝))) m) =\n                m),\n        right_inv :=\n          (_ :\n            ∀ (x : { x // x ∈ Hom.range (toHom f✝) }),\n              ↑(codRestrict (Hom.range (toHom f✝)) f✝ (_ : ∀ (x : M), ↑(toHom f✝) x ∈ Hom.range (toHom f✝)))\n                  ((fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f✝))) x) =\n                x) }\n      (funMap f x) =\n    funMap f\n      ({ toFun := ↑(codRestrict (Hom.range (toHom f✝)) f✝ (_ : ∀ (x : M), ↑(toHom f✝) x ∈ Hom.range (toHom f✝))),\n            invFun := fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f✝)),\n            left_inv :=\n              (_ :\n                ∀ (m : M),\n                  (fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f✝)))\n                      (↑(codRestrict (Hom.range (toHom f✝)) f✝ (_ : ∀ (x : M), ↑(toHom f✝) x ∈ Hom.range (toHom f✝)))\n                        m) =\n                    m),\n            right_inv :=\n              (_ :\n                ∀ (x : { x // x ∈ Hom.range (toHom f✝) }),\n                  ↑(codRestrict (Hom.range (toHom f✝)) f✝ (_ : ∀ (x : M), ↑(toHom f✝) x ∈ Hom.range (toHom f✝)))\n                      ((fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f✝))) x) =\n                    x) }.toFun ∘\n        x)\n[PROOFSTEP]\naesop\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf : M ↪[L] N\nn : ℕ\nR : Relations L n\nx : Fin n → M\n⊢ RelMap R\n      ({ toFun := ↑(codRestrict (Hom.range (toHom f)) f (_ : ∀ (x : M), ↑(toHom f) x ∈ Hom.range (toHom f))),\n            invFun := fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f)),\n            left_inv :=\n              (_ :\n                ∀ (m : M),\n                  (fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f)))\n                      (↑(codRestrict (Hom.range (toHom f)) f (_ : ∀ (x : M), ↑(toHom f) x ∈ Hom.range (toHom f))) m) =\n                    m),\n            right_inv :=\n              (_ :\n                ∀ (x : { x // x ∈ Hom.range (toHom f) }),\n                  ↑(codRestrict (Hom.range (toHom f)) f (_ : ∀ (x : M), ↑(toHom f) x ∈ Hom.range (toHom f)))\n                      ((fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f))) x) =\n                    x) }.toFun ∘\n        x) ↔\n    RelMap R x\n[PROOFSTEP]\naesop\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf : M ≃[L] N\n⊢ Hom.range (toHom f) = ⊤\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf : M ≃[L] N\nn : N\n⊢ n ∈ Hom.range (toHom f) ↔ n ∈ ⊤\n[PROOFSTEP]\nsimp only [Hom.mem_range, coe_toHom, Substructure.mem_top, iff_true_iff]\n[GOAL]\ncase h\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS : Substructure L M\nf : M ≃[L] N\nn : N\n⊢ ∃ y, ↑f y = n\n[PROOFSTEP]\nexact ⟨f.symm n, apply_symm_apply _ _⟩\n[GOAL]\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ S : Substructure L M\n⊢ Hom.range (Embedding.toHom (subtype S)) = S\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ S : Substructure L M\nx : M\n⊢ x ∈ Hom.range (Embedding.toHom (subtype S)) ↔ x ∈ S\n[PROOFSTEP]\nsimp only [Hom.mem_range, Embedding.coe_toHom, coeSubtype]\n[GOAL]\ncase h\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ S : Substructure L M\nx : M\n⊢ (∃ y, ↑y = x) ↔ x ∈ S\n[PROOFSTEP]\nrefine' ⟨_, fun h => ⟨⟨x, h⟩, rfl⟩⟩\n[GOAL]\ncase h\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ S : Substructure L M\nx : M\n⊢ (∃ y, ↑y = x) → x ∈ S\n[PROOFSTEP]\nrintro ⟨⟨y, hy⟩, rfl⟩\n[GOAL]\ncase h.intro.mk\nL : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nS✝ S : Substructure L M\ny : M\nhy : y ∈ S\n⊢ ↑{ val := y, property := hy } ∈ S\n[PROOFSTEP]\nexact hy\n", "meta": {"mathlib_filename": "Mathlib.ModelTheory.Substructures", "llama_tokens": 18550, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583250334526, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.3965936967940687}}
{"text": "[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\np : R[X]\nhp : Monic p\n⊢ IsPrimitive p\n[PROOFSTEP]\nrintro r ⟨q, h⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : CommSemiring R\np : R[X]\nhp : Monic p\nr : R\nq : R[X]\nh : p = ↑C r * q\n⊢ IsUnit r\n[PROOFSTEP]\nexact isUnit_of_mul_eq_one r (q.coeff p.natDegree) (by rwa [← coeff_C_mul, ← h])\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\np : R[X]\nhp : Monic p\nr : R\nq : R[X]\nh : p = ↑C r * q\n⊢ r * coeff q (natDegree p) = 1\n[PROOFSTEP]\nrwa [← coeff_C_mul, ← h]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Nontrivial R\np : R[X]\nhp : IsPrimitive p\n⊢ p ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Nontrivial R\nhp : IsPrimitive 0\n⊢ False\n[PROOFSTEP]\nexact (hp 0 (dvd_zero (C 0))).ne_zero rfl\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\n⊢ content p ∣ coeff p n\n[PROOFSTEP]\nby_cases h : n ∈ p.support\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : n ∈ support p\n⊢ content p ∣ coeff p n\n[PROOFSTEP]\napply Finset.gcd_dvd h\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : ¬n ∈ support p\n⊢ content p ∣ coeff p n\n[PROOFSTEP]\nrw [mem_support_iff, Classical.not_not] at h \n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : coeff p n = 0\n⊢ content p ∣ coeff p n\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : coeff p n = 0\n⊢ content p ∣ 0\n[PROOFSTEP]\napply dvd_zero\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\n⊢ content (↑C r) = ↑normalize r\n[PROOFSTEP]\nrw [content]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\n⊢ Finset.gcd (support (↑C r)) (coeff (↑C r)) = ↑normalize r\n[PROOFSTEP]\nby_cases h0 : r = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0 : r = 0\n⊢ Finset.gcd (support (↑C r)) (coeff (↑C r)) = ↑normalize r\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0 : ¬r = 0\n⊢ Finset.gcd (support (↑C r)) (coeff (↑C r)) = ↑normalize r\n[PROOFSTEP]\nhave h : (C r).support = {0} := support_monomial _ h0\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0 : ¬r = 0\nh : support (↑C r) = {0}\n⊢ Finset.gcd (support (↑C r)) (coeff (↑C r)) = ↑normalize r\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\n⊢ content 0 = 0\n[PROOFSTEP]\nrw [← C_0, content_C, normalize_zero]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\n⊢ content 1 = 1\n[PROOFSTEP]\nrw [← C_1, content_C, normalize_one]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ content (X * p) = content p\n[PROOFSTEP]\nrw [content, content, Finset.gcd_def, Finset.gcd_def]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ Multiset.gcd (Multiset.map (coeff (X * p)) (support (X * p)).val) =\n    Multiset.gcd (Multiset.map (coeff p) (support p).val)\n[PROOFSTEP]\nrefine' congr rfl _\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ Multiset.map (coeff (X * p)) (support (X * p)).val = Multiset.map (coeff p) (support p).val\n[PROOFSTEP]\nhave h : (X * p).support = p.support.map ⟨Nat.succ, Nat.succ_injective⟩ :=\n  by\n  ext a\n  simp only [exists_prop, Finset.mem_map, Function.Embedding.coeFn_mk, Ne.def, mem_support_iff]\n  cases' a with a\n  · simp [coeff_X_mul_zero, Nat.succ_ne_zero]\n  rw [mul_comm, coeff_mul_X]\n  constructor\n  · intro h\n    use a\n  · rintro ⟨b, ⟨h1, h2⟩⟩\n    rw [← Nat.succ_injective h2]\n    apply h1\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\na : ℕ\n⊢ a ∈ support (X * p) ↔ a ∈ Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)\n[PROOFSTEP]\nsimp only [exists_prop, Finset.mem_map, Function.Embedding.coeFn_mk, Ne.def, mem_support_iff]\n[GOAL]\ncase a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\na : ℕ\n⊢ ¬coeff (X * p) a = 0 ↔ ∃ a_1, ¬coeff p a_1 = 0 ∧ Nat.succ a_1 = a\n[PROOFSTEP]\ncases' a with a\n[GOAL]\ncase a.zero\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ ¬coeff (X * p) Nat.zero = 0 ↔ ∃ a, ¬coeff p a = 0 ∧ Nat.succ a = Nat.zero\n[PROOFSTEP]\nsimp [coeff_X_mul_zero, Nat.succ_ne_zero]\n[GOAL]\ncase a.succ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\na : ℕ\n⊢ ¬coeff (X * p) (Nat.succ a) = 0 ↔ ∃ a_1, ¬coeff p a_1 = 0 ∧ Nat.succ a_1 = Nat.succ a\n[PROOFSTEP]\nrw [mul_comm, coeff_mul_X]\n[GOAL]\ncase a.succ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\na : ℕ\n⊢ ¬coeff p a = 0 ↔ ∃ a_1, ¬coeff p a_1 = 0 ∧ Nat.succ a_1 = Nat.succ a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.succ.mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\na : ℕ\n⊢ ¬coeff p a = 0 → ∃ a_2, ¬coeff p a_2 = 0 ∧ Nat.succ a_2 = Nat.succ a\n[PROOFSTEP]\nintro h\n[GOAL]\ncase a.succ.mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\na : ℕ\nh : ¬coeff p a = 0\n⊢ ∃ a_1, ¬coeff p a_1 = 0 ∧ Nat.succ a_1 = Nat.succ a\n[PROOFSTEP]\nuse a\n[GOAL]\ncase a.succ.mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\na : ℕ\n⊢ (∃ a_1, ¬coeff p a_1 = 0 ∧ Nat.succ a_1 = Nat.succ a) → ¬coeff p a = 0\n[PROOFSTEP]\nrintro ⟨b, ⟨h1, h2⟩⟩\n[GOAL]\ncase a.succ.mpr.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\na b : ℕ\nh1 : ¬coeff p b = 0\nh2 : Nat.succ b = Nat.succ a\n⊢ ¬coeff p a = 0\n[PROOFSTEP]\nrw [← Nat.succ_injective h2]\n[GOAL]\ncase a.succ.mpr.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\na b : ℕ\nh1 : ¬coeff p b = 0\nh2 : Nat.succ b = Nat.succ a\n⊢ ¬coeff p b = 0\n[PROOFSTEP]\napply h1\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)\n⊢ Multiset.map (coeff (X * p)) (support (X * p)).val = Multiset.map (coeff p) (support p).val\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)\n⊢ Multiset.map (coeff (X * p)) (Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)).val =\n    Multiset.map (coeff p) (support p).val\n[PROOFSTEP]\nsimp only [Finset.map_val, Function.comp_apply, Function.Embedding.coeFn_mk, Multiset.map_map]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)\n⊢ Multiset.map (fun x => coeff (X * p) (Nat.succ x)) (support p).val = Multiset.map (coeff p) (support p).val\n[PROOFSTEP]\nrefine' congr (congr rfl _) rfl\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)\n⊢ (fun x => coeff (X * p) (Nat.succ x)) = coeff p\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)\na : ℕ\n⊢ coeff (X * p) (Nat.succ a) = coeff p a\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : support (X * p) = Finset.map { toFun := Nat.succ, inj' := Nat.succ_injective } (support p)\na : ℕ\n⊢ coeff (p * X) (Nat.succ a) = coeff p a\n[PROOFSTEP]\nsimp [coeff_mul_X]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nk : ℕ\n⊢ content (X ^ k) = 1\n[PROOFSTEP]\ninduction' k with k hi\n[GOAL]\ncase zero\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\n⊢ content (X ^ Nat.zero) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nk : ℕ\nhi : content (X ^ k) = 1\n⊢ content (X ^ Nat.succ k) = 1\n[PROOFSTEP]\nrw [pow_succ, content_X_mul, hi]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\n⊢ content X = 1\n[PROOFSTEP]\nrw [← mul_one X, content_X_mul, content_one]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\np : R[X]\n⊢ content (↑C r * p) = ↑normalize r * content p\n[PROOFSTEP]\nby_cases h0 : r = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\np : R[X]\nh0 : r = 0\n⊢ content (↑C r * p) = ↑normalize r * content p\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\np : R[X]\nh0 : ¬r = 0\n⊢ content (↑C r * p) = ↑normalize r * content p\n[PROOFSTEP]\nrw [content]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\np : R[X]\nh0 : ¬r = 0\n⊢ Finset.gcd (support (↑C r * p)) (coeff (↑C r * p)) = ↑normalize r * content p\n[PROOFSTEP]\nrw [content]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\np : R[X]\nh0 : ¬r = 0\n⊢ Finset.gcd (support (↑C r * p)) (coeff (↑C r * p)) = ↑normalize r * Finset.gcd (support p) (coeff p)\n[PROOFSTEP]\nrw [← Finset.gcd_mul_left]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\np : R[X]\nh0 : ¬r = 0\n⊢ Finset.gcd (support (↑C r * p)) (coeff (↑C r * p)) = Finset.gcd (support p) fun x => r * coeff p x\n[PROOFSTEP]\nrefine' congr (congr rfl _) _\n[GOAL]\ncase neg.refine'_1\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\np : R[X]\nh0 : ¬r = 0\n⊢ support (↑C r * p) = support p\n[PROOFSTEP]\next\n[GOAL]\ncase neg.refine'_2\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\np : R[X]\nh0 : ¬r = 0\n⊢ coeff (↑C r * p) = fun x => r * coeff p x\n[PROOFSTEP]\next\n[GOAL]\ncase neg.refine'_1.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\np : R[X]\nh0 : ¬r = 0\na✝ : ℕ\n⊢ a✝ ∈ support (↑C r * p) ↔ a✝ ∈ support p\n[PROOFSTEP]\nsimp [h0, mem_support_iff]\n[GOAL]\ncase neg.refine'_2.h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\np : R[X]\nh0 : ¬r = 0\nx✝ : ℕ\n⊢ coeff (↑C r * p) x✝ = r * coeff p x✝\n[PROOFSTEP]\nsimp [h0, mem_support_iff]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nk : ℕ\n⊢ content (↑(monomial k) r) = ↑normalize r\n[PROOFSTEP]\nrw [← C_mul_X_pow_eq_monomial, content_C_mul, content_X_pow, mul_one]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ content p = 0 ↔ p = 0\n[PROOFSTEP]\nrw [content, Finset.gcd_eq_zero_iff]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ (∀ (x : ℕ), x ∈ support p → coeff p x = 0) ↔ p = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ (∀ (x : ℕ), x ∈ support p → coeff p x = 0) → p = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ p = 0 → ∀ (x : ℕ), x ∈ support p → coeff p x = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ∀ (x : ℕ), x ∈ support p → coeff p x = 0\n⊢ p = 0\n[PROOFSTEP]\next n\n[GOAL]\ncase mp.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ∀ (x : ℕ), x ∈ support p → coeff p x = 0\nn : ℕ\n⊢ coeff p n = coeff 0 n\n[PROOFSTEP]\nby_cases h0 : n ∈ p.support\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ∀ (x : ℕ), x ∈ support p → coeff p x = 0\nn : ℕ\nh0 : n ∈ support p\n⊢ coeff p n = coeff 0 n\n[PROOFSTEP]\nrw [h n h0, coeff_zero]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ∀ (x : ℕ), x ∈ support p → coeff p x = 0\nn : ℕ\nh0 : ¬n ∈ support p\n⊢ coeff p n = coeff 0 n\n[PROOFSTEP]\nrw [mem_support_iff] at h0 \n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ∀ (x : ℕ), x ∈ support p → coeff p x = 0\nn : ℕ\nh0 : ¬coeff p n ≠ 0\n⊢ coeff p n = coeff 0 n\n[PROOFSTEP]\npush_neg at h0 \n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ∀ (x : ℕ), x ∈ support p → coeff p x = 0\nn : ℕ\nh0 : coeff p n = 0\n⊢ coeff p n = coeff 0 n\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : p = 0\n⊢ ∀ (x : ℕ), x ∈ support p → coeff p x = 0\n[PROOFSTEP]\nintro x\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : p = 0\nx : ℕ\n⊢ x ∈ support p → coeff p x = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ normUnit (content p) = 1\n[PROOFSTEP]\nby_cases hp0 : p.content = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp0 : content p = 0\n⊢ normUnit (content p) = 1\n[PROOFSTEP]\nsimp [hp0]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp0 : ¬content p = 0\n⊢ normUnit (content p) = 1\n[PROOFSTEP]\next\n[GOAL]\ncase neg.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp0 : ¬content p = 0\n⊢ ↑(normUnit (content p)) = ↑1\n[PROOFSTEP]\napply mul_left_cancel₀ hp0\n[GOAL]\ncase neg.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp0 : ¬content p = 0\n⊢ content p * ↑(normUnit (content p)) = content p * ↑1\n[PROOFSTEP]\nerw [← normalize_apply, normalize_content, mul_one]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : natDegree p < n\n⊢ content p = Finset.gcd (Finset.range n) (coeff p)\n[PROOFSTEP]\napply dvd_antisymm_of_normalize_eq normalize_content Finset.normalize_gcd\n[GOAL]\ncase hab\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : natDegree p < n\n⊢ content p ∣ Finset.gcd (Finset.range n) (coeff p)\n[PROOFSTEP]\nrw [Finset.dvd_gcd_iff]\n[GOAL]\ncase hab\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : natDegree p < n\n⊢ ∀ (b : ℕ), b ∈ Finset.range n → content p ∣ coeff p b\n[PROOFSTEP]\nintro i _\n[GOAL]\ncase hab\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : natDegree p < n\ni : ℕ\na✝ : i ∈ Finset.range n\n⊢ content p ∣ coeff p i\n[PROOFSTEP]\napply content_dvd_coeff _\n[GOAL]\ncase hba\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : natDegree p < n\n⊢ Finset.gcd (Finset.range n) (coeff p) ∣ content p\n[PROOFSTEP]\napply Finset.gcd_mono\n[GOAL]\ncase hba.h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : natDegree p < n\n⊢ support p ⊆ Finset.range n\n[PROOFSTEP]\nintro i\n[GOAL]\ncase hba.h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : natDegree p < n\ni : ℕ\n⊢ i ∈ support p → i ∈ Finset.range n\n[PROOFSTEP]\nsimp only [Nat.lt_succ_iff, mem_support_iff, Ne.def, Finset.mem_range]\n[GOAL]\ncase hba.h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : natDegree p < n\ni : ℕ\n⊢ ¬coeff p i = 0 → i < n\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase hba.h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : natDegree p < n\ni : ℕ\n⊢ n ≤ i → coeff p i = 0\n[PROOFSTEP]\nintro h1\n[GOAL]\ncase hba.h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nn : ℕ\nh : natDegree p < n\ni : ℕ\nh1 : n ≤ i\n⊢ coeff p i = 0\n[PROOFSTEP]\napply coeff_eq_zero_of_natDegree_lt (lt_of_lt_of_le h h1)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ content p = gcd (leadingCoeff p) (content (eraseLead p))\n[PROOFSTEP]\nby_cases h : p = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : p = 0\n⊢ content p = gcd (leadingCoeff p) (content (eraseLead p))\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ¬p = 0\n⊢ content p = gcd (leadingCoeff p) (content (eraseLead p))\n[PROOFSTEP]\nrw [← leadingCoeff_eq_zero, leadingCoeff, ← Ne.def, ← mem_support_iff] at h \n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : natDegree p ∈ support p\n⊢ content p = gcd (leadingCoeff p) (content (eraseLead p))\n[PROOFSTEP]\nrw [content, ← Finset.insert_erase h, Finset.gcd_insert, leadingCoeff, content, eraseLead_support]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : natDegree p ∈ support p\n⊢ gcd (coeff p (natDegree p)) (Finset.gcd (Finset.erase (support p) (natDegree p)) (coeff p)) =\n    gcd (coeff p (natDegree p)) (Finset.gcd (Finset.erase (support p) (natDegree p)) (coeff (eraseLead p)))\n[PROOFSTEP]\nrefine' congr rfl (Finset.gcd_congr rfl fun i hi => _)\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : natDegree p ∈ support p\ni : ℕ\nhi : i ∈ Finset.erase (support p) (natDegree p)\n⊢ coeff p i = coeff (eraseLead p) i\n[PROOFSTEP]\nrw [Finset.mem_erase] at hi \n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : natDegree p ∈ support p\ni : ℕ\nhi : i ≠ natDegree p ∧ i ∈ support p\n⊢ coeff p i = coeff (eraseLead p) i\n[PROOFSTEP]\nrw [eraseLead_coeff, if_neg hi.1]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nr : R\n⊢ r ∣ content p ↔ ↑C r ∣ p\n[PROOFSTEP]\nrw [C_dvd_iff_dvd_coeff]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nr : R\n⊢ r ∣ content p ↔ ∀ (i : ℕ), r ∣ coeff p i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nr : R\n⊢ r ∣ content p → ∀ (i : ℕ), r ∣ coeff p i\n[PROOFSTEP]\nintro h i\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nr : R\nh : r ∣ content p\ni : ℕ\n⊢ r ∣ coeff p i\n[PROOFSTEP]\napply h.trans (content_dvd_coeff _)\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nr : R\n⊢ (∀ (i : ℕ), r ∣ coeff p i) → r ∣ content p\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nr : R\nh : ∀ (i : ℕ), r ∣ coeff p i\n⊢ r ∣ content p\n[PROOFSTEP]\nrw [content, Finset.dvd_gcd_iff]\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nr : R\nh : ∀ (i : ℕ), r ∣ coeff p i\n⊢ ∀ (b : ℕ), b ∈ support p → r ∣ coeff p b\n[PROOFSTEP]\nintro i _\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nr : R\nh : ∀ (i : ℕ), r ∣ coeff p i\ni : ℕ\na✝ : i ∈ support p\n⊢ r ∣ coeff p i\n[PROOFSTEP]\napply h i\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ IsPrimitive p ↔ content p = 1\n[PROOFSTEP]\nrw [← normalize_content, normalize_eq_one, IsPrimitive]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ (∀ (r : R), ↑C r ∣ p → IsUnit r) ↔ IsUnit (content p)\n[PROOFSTEP]\nsimp_rw [← dvd_content_iff_C_dvd]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ (∀ (r : R), r ∣ content p → IsUnit r) ↔ IsUnit (content p)\n[PROOFSTEP]\nexact ⟨fun h => h p.content (dvd_refl p.content), fun h r hdvd => isUnit_of_dvd_unit hdvd h⟩\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ p = ↑C (content p) * primPart p\n[PROOFSTEP]\nby_cases h : p = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : p = 0\n⊢ p = ↑C (content p) * primPart p\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ¬p = 0\n⊢ p = ↑C (content p) * primPart p\n[PROOFSTEP]\nrw [primPart, if_neg h, ← Classical.choose_spec (C_content_dvd p)]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ IsPrimitive (primPart p)\n[PROOFSTEP]\nby_cases h : p = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : p = 0\n⊢ IsPrimitive (primPart p)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ¬p = 0\n⊢ IsPrimitive (primPart p)\n[PROOFSTEP]\nrw [← content_eq_zero_iff] at h \n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh✝ : ¬p = 0\nh : ¬content p = 0\n⊢ IsPrimitive (primPart p)\n[PROOFSTEP]\nrw [isPrimitive_iff_content_eq_one]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh✝ : ¬p = 0\nh : ¬content p = 0\n⊢ content (primPart p) = 1\n[PROOFSTEP]\napply mul_left_cancel₀ h\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh✝ : ¬p = 0\nh : ¬content p = 0\n⊢ content p * content (primPart p) = content p * 1\n[PROOFSTEP]\nconv_rhs => rw [p.eq_C_content_mul_primPart, mul_one, content_C_mul, normalize_content]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh✝ : ¬p = 0\nh : ¬content p = 0\n| content p * 1\n[PROOFSTEP]\nrw [p.eq_C_content_mul_primPart, mul_one, content_C_mul, normalize_content]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh✝ : ¬p = 0\nh : ¬content p = 0\n| content p * 1\n[PROOFSTEP]\nrw [p.eq_C_content_mul_primPart, mul_one, content_C_mul, normalize_content]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh✝ : ¬p = 0\nh : ¬content p = 0\n| content p * 1\n[PROOFSTEP]\nrw [p.eq_C_content_mul_primPart, mul_one, content_C_mul, normalize_content]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\n⊢ natDegree (primPart p) = natDegree p\n[PROOFSTEP]\nby_cases h : C p.content = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ↑C (content p) = 0\n⊢ natDegree (primPart p) = natDegree p\n[PROOFSTEP]\nrw [C_eq_zero, content_eq_zero_iff] at h \n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : p = 0\n⊢ natDegree (primPart p) = natDegree p\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ¬↑C (content p) = 0\n⊢ natDegree (primPart p) = natDegree p\n[PROOFSTEP]\nconv_rhs => rw [p.eq_C_content_mul_primPart, natDegree_mul h p.primPart_ne_zero, natDegree_C, zero_add]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ¬↑C (content p) = 0\n| natDegree p\n[PROOFSTEP]\nrw [p.eq_C_content_mul_primPart, natDegree_mul h p.primPart_ne_zero, natDegree_C, zero_add]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ¬↑C (content p) = 0\n| natDegree p\n[PROOFSTEP]\nrw [p.eq_C_content_mul_primPart, natDegree_mul h p.primPart_ne_zero, natDegree_C, zero_add]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nh : ¬↑C (content p) = 0\n| natDegree p\n[PROOFSTEP]\nrw [p.eq_C_content_mul_primPart, natDegree_mul h p.primPart_ne_zero, natDegree_C, zero_add]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\n⊢ primPart p = p\n[PROOFSTEP]\nrw [← one_mul p.primPart, ← C_1, ← hp.content_eq_one, ← p.eq_C_content_mul_primPart]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\n⊢ IsUnit (primPart (↑C r))\n[PROOFSTEP]\nby_cases h0 : r = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0 : r = 0\n⊢ IsUnit (primPart (↑C r))\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0 : ¬r = 0\n⊢ IsUnit (primPart (↑C r))\n[PROOFSTEP]\nunfold IsUnit\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0 : ¬r = 0\n⊢ ∃ u, ↑u = primPart (↑C r)\n[PROOFSTEP]\nrefine'\n  ⟨⟨C ↑(normUnit r)⁻¹, C ↑(normUnit r), by rw [← RingHom.map_mul, Units.inv_mul, C_1], by\n      rw [← RingHom.map_mul, Units.mul_inv, C_1]⟩,\n    _⟩\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0 : ¬r = 0\n⊢ ↑C ↑(normUnit r)⁻¹ * ↑C ↑(normUnit r) = 1\n[PROOFSTEP]\nrw [← RingHom.map_mul, Units.inv_mul, C_1]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0 : ¬r = 0\n⊢ ↑C ↑(normUnit r) * ↑C ↑(normUnit r)⁻¹ = 1\n[PROOFSTEP]\nrw [← RingHom.map_mul, Units.mul_inv, C_1]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0 : ¬r = 0\n⊢ ↑{ val := ↑C ↑(normUnit r)⁻¹, inv := ↑C ↑(normUnit r), val_inv := (_ : ↑C ↑(normUnit r)⁻¹ * ↑C ↑(normUnit r) = 1),\n        inv_val := (_ : ↑C ↑(normUnit r) * ↑C ↑(normUnit r)⁻¹ = 1) } =\n    primPart (↑C r)\n[PROOFSTEP]\nrw [← normalize_eq_zero, ← C_eq_zero] at h0 \n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0✝ : ¬r = 0\nh0 : ¬↑C (↑normalize r) = 0\n⊢ ↑{ val := ↑C ↑(normUnit r)⁻¹, inv := ↑C ↑(normUnit r), val_inv := (_ : ↑C ↑(normUnit r)⁻¹ * ↑C ↑(normUnit r) = 1),\n        inv_val := (_ : ↑C ↑(normUnit r) * ↑C ↑(normUnit r)⁻¹ = 1) } =\n    primPart (↑C r)\n[PROOFSTEP]\napply mul_left_cancel₀ h0\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0✝ : ¬r = 0\nh0 : ¬↑C (↑normalize r) = 0\n⊢ ↑C (↑normalize r) *\n      ↑{ val := ↑C ↑(normUnit r)⁻¹, inv := ↑C ↑(normUnit r), val_inv := (_ : ↑C ↑(normUnit r)⁻¹ * ↑C ↑(normUnit r) = 1),\n          inv_val := (_ : ↑C ↑(normUnit r) * ↑C ↑(normUnit r)⁻¹ = 1) } =\n    ↑C (↑normalize r) * primPart (↑C r)\n[PROOFSTEP]\nconv_rhs => rw [← content_C, ← (C r).eq_C_content_mul_primPart]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0✝ : ¬r = 0\nh0 : ¬↑C (↑normalize r) = 0\n| ↑C (↑normalize r) * primPart (↑C r)\n[PROOFSTEP]\nrw [← content_C, ← (C r).eq_C_content_mul_primPart]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0✝ : ¬r = 0\nh0 : ¬↑C (↑normalize r) = 0\n| ↑C (↑normalize r) * primPart (↑C r)\n[PROOFSTEP]\nrw [← content_C, ← (C r).eq_C_content_mul_primPart]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0✝ : ¬r = 0\nh0 : ¬↑C (↑normalize r) = 0\n| ↑C (↑normalize r) * primPart (↑C r)\n[PROOFSTEP]\nrw [← content_C, ← (C r).eq_C_content_mul_primPart]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0✝ : ¬r = 0\nh0 : ¬↑C (↑normalize r) = 0\n⊢ ↑C (↑normalize r) *\n      ↑{ val := ↑C ↑(normUnit r)⁻¹, inv := ↑C ↑(normUnit r), val_inv := (_ : ↑C ↑(normUnit r)⁻¹ * ↑C ↑(normUnit r) = 1),\n          inv_val := (_ : ↑C ↑(normUnit r) * ↑C ↑(normUnit r)⁻¹ = 1) } =\n    ↑C r\n[PROOFSTEP]\nsimp only [Units.val_mk, normalize_apply, RingHom.map_mul]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\nr : R\nh0✝ : ¬r = 0\nh0 : ¬↑C (↑normalize r) = 0\n⊢ ↑C r * ↑C ↑(normUnit r) * ↑C ↑(normUnit r)⁻¹ = ↑C r\n[PROOFSTEP]\nrw [mul_assoc, ← RingHom.map_mul, Units.mul_inv, C_1, mul_one]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\ninst✝⁵ : IsDomain R\ninst✝⁴ : NormalizedGCDMonoid R\nS : Type u_2\ninst✝³ : Ring S\ninst✝² : IsDomain S\ninst✝¹ : Algebra R S\ninst✝ : NoZeroSMulDivisors R S\np : R[X]\ns : S\nhpzero : p ≠ 0\nhp : ↑(aeval s) p = 0\n⊢ ↑(aeval s) (primPart p) = 0\n[PROOFSTEP]\nrw [eq_C_content_mul_primPart p, map_mul, aeval_C] at hp \n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\ninst✝⁵ : IsDomain R\ninst✝⁴ : NormalizedGCDMonoid R\nS : Type u_2\ninst✝³ : Ring S\ninst✝² : IsDomain S\ninst✝¹ : Algebra R S\ninst✝ : NoZeroSMulDivisors R S\np : R[X]\ns : S\nhpzero : p ≠ 0\nhp : ↑(algebraMap R S) (content p) * ↑(aeval s) (primPart p) = 0\n⊢ ↑(aeval s) (primPart p) = 0\n[PROOFSTEP]\nhave hcont : p.content ≠ 0 := fun h => hpzero (content_eq_zero_iff.1 h)\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\ninst✝⁵ : IsDomain R\ninst✝⁴ : NormalizedGCDMonoid R\nS : Type u_2\ninst✝³ : Ring S\ninst✝² : IsDomain S\ninst✝¹ : Algebra R S\ninst✝ : NoZeroSMulDivisors R S\np : R[X]\ns : S\nhpzero : p ≠ 0\nhp : ↑(algebraMap R S) (content p) * ↑(aeval s) (primPart p) = 0\nhcont : content p ≠ 0\n⊢ ↑(aeval s) (primPart p) = 0\n[PROOFSTEP]\nreplace hcont := Function.Injective.ne (NoZeroSMulDivisors.algebraMap_injective R S) hcont\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\ninst✝⁵ : IsDomain R\ninst✝⁴ : NormalizedGCDMonoid R\nS : Type u_2\ninst✝³ : Ring S\ninst✝² : IsDomain S\ninst✝¹ : Algebra R S\ninst✝ : NoZeroSMulDivisors R S\np : R[X]\ns : S\nhpzero : p ≠ 0\nhp : ↑(algebraMap R S) (content p) * ↑(aeval s) (primPart p) = 0\nhcont : ↑(algebraMap R S) (content p) ≠ ↑(algebraMap R S) 0\n⊢ ↑(aeval s) (primPart p) = 0\n[PROOFSTEP]\nrw [map_zero] at hcont \n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\ninst✝⁵ : IsDomain R\ninst✝⁴ : NormalizedGCDMonoid R\nS : Type u_2\ninst✝³ : Ring S\ninst✝² : IsDomain S\ninst✝¹ : Algebra R S\ninst✝ : NoZeroSMulDivisors R S\np : R[X]\ns : S\nhpzero : p ≠ 0\nhp : ↑(algebraMap R S) (content p) * ↑(aeval s) (primPart p) = 0\nhcont : ↑(algebraMap R S) (content p) ≠ 0\n⊢ ↑(aeval s) (primPart p) = 0\n[PROOFSTEP]\nexact eq_zero_of_ne_zero_of_mul_left_eq_zero hcont hp\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : NormalizedGCDMonoid R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nf : R →+* S\nhinj : Function.Injective ↑f\np : R[X]\ns : S\nhpzero : p ≠ 0\nhp : eval₂ f s p = 0\n⊢ eval₂ f s (primPart p) = 0\n[PROOFSTEP]\nrw [eq_C_content_mul_primPart p, eval₂_mul, eval₂_C] at hp \n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : NormalizedGCDMonoid R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nf : R →+* S\nhinj : Function.Injective ↑f\np : R[X]\ns : S\nhpzero : p ≠ 0\nhp : ↑f (content p) * eval₂ f s (primPart p) = 0\n⊢ eval₂ f s (primPart p) = 0\n[PROOFSTEP]\nhave hcont : p.content ≠ 0 := fun h => hpzero (content_eq_zero_iff.1 h)\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : NormalizedGCDMonoid R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nf : R →+* S\nhinj : Function.Injective ↑f\np : R[X]\ns : S\nhpzero : p ≠ 0\nhp : ↑f (content p) * eval₂ f s (primPart p) = 0\nhcont : content p ≠ 0\n⊢ eval₂ f s (primPart p) = 0\n[PROOFSTEP]\nreplace hcont := Function.Injective.ne hinj hcont\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : NormalizedGCDMonoid R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nf : R →+* S\nhinj : Function.Injective ↑f\np : R[X]\ns : S\nhpzero : p ≠ 0\nhp : ↑f (content p) * eval₂ f s (primPart p) = 0\nhcont : ↑f (content p) ≠ ↑f 0\n⊢ eval₂ f s (primPart p) = 0\n[PROOFSTEP]\nrw [map_zero] at hcont \n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : NormalizedGCDMonoid R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nf : R →+* S\nhinj : Function.Injective ↑f\np : R[X]\ns : S\nhpzero : p ≠ 0\nhp : ↑f (content p) * eval₂ f s (primPart p) = 0\nhcont : ↑f (content p) ≠ 0\n⊢ eval₂ f s (primPart p) = 0\n[PROOFSTEP]\nexact eq_zero_of_ne_zero_of_mul_left_eq_zero hcont hp\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\na : R\np q : R[X]\nh : ↑C a ∣ p - q\n⊢ gcd a (content p) = gcd a (content q)\n[PROOFSTEP]\nrw [content_eq_gcd_range_of_lt p (max p.natDegree q.natDegree).succ\n    (lt_of_le_of_lt (le_max_left _ _) (Nat.lt_succ_self _))]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\na : R\np q : R[X]\nh : ↑C a ∣ p - q\n⊢ gcd a (Finset.gcd (Finset.range (Nat.succ (max (natDegree p) (natDegree q)))) (coeff p)) = gcd a (content q)\n[PROOFSTEP]\nrw [content_eq_gcd_range_of_lt q (max p.natDegree q.natDegree).succ\n    (lt_of_le_of_lt (le_max_right _ _) (Nat.lt_succ_self _))]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\na : R\np q : R[X]\nh : ↑C a ∣ p - q\n⊢ gcd a (Finset.gcd (Finset.range (Nat.succ (max (natDegree p) (natDegree q)))) (coeff p)) =\n    gcd a (Finset.gcd (Finset.range (Nat.succ (max (natDegree p) (natDegree q)))) (coeff q))\n[PROOFSTEP]\napply Finset.gcd_eq_of_dvd_sub\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\na : R\np q : R[X]\nh : ↑C a ∣ p - q\n⊢ ∀ (x : ℕ), x ∈ Finset.range (Nat.succ (max (natDegree p) (natDegree q))) → a ∣ coeff p x - coeff q x\n[PROOFSTEP]\nintro x _\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\na : R\np q : R[X]\nh : ↑C a ∣ p - q\nx : ℕ\na✝ : x ∈ Finset.range (Nat.succ (max (natDegree p) (natDegree q)))\n⊢ a ∣ coeff p x - coeff q x\n[PROOFSTEP]\ncases' h with w hw\n[GOAL]\ncase h.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\na : R\np q : R[X]\nx : ℕ\na✝ : x ∈ Finset.range (Nat.succ (max (natDegree p) (natDegree q)))\nw : (fun x => R[X]) a\nhw : p - q = ↑C a * w\n⊢ a ∣ coeff p x - coeff q x\n[PROOFSTEP]\nuse w.coeff x\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\na : R\np q : R[X]\nx : ℕ\na✝ : x ∈ Finset.range (Nat.succ (max (natDegree p) (natDegree q)))\nw : (fun x => R[X]) a\nhw : p - q = ↑C a * w\n⊢ coeff p x - coeff q x = a * coeff w x\n[PROOFSTEP]\nrw [← coeff_sub, hw, coeff_C_mul]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\n⊢ gcd (content (eraseLead (p * q))) (leadingCoeff p) = gcd (content (eraseLead p * q)) (leadingCoeff p)\n[PROOFSTEP]\nrw [gcd_comm (content _) _, gcd_comm (content _) _]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\n⊢ gcd (leadingCoeff p) (content (eraseLead (p * q))) = gcd (leadingCoeff p) (content (eraseLead p * q))\n[PROOFSTEP]\napply gcd_content_eq_of_dvd_sub\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\n⊢ ↑C (leadingCoeff p) ∣ eraseLead (p * q) - eraseLead p * q\n[PROOFSTEP]\nrw [← self_sub_C_mul_X_pow, ← self_sub_C_mul_X_pow, sub_mul, sub_sub, add_comm, sub_add, sub_sub_cancel,\n  leadingCoeff_mul, RingHom.map_mul, mul_assoc, mul_assoc]\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\n⊢ ↑C (leadingCoeff p) ∣\n    ↑C (leadingCoeff p) * (X ^ natDegree p * q) - ↑C (leadingCoeff p) * (↑C (leadingCoeff q) * X ^ natDegree (p * q))\n[PROOFSTEP]\napply dvd_sub (Dvd.intro _ rfl) (Dvd.intro _ rfl)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\nclassical\nsuffices h : ∀ (n : ℕ) (p q : R[X]), (p * q).degree < n → (p * q).content = p.content * q.content\n· apply h\n  apply lt_of_le_of_lt degree_le_natDegree (WithBot.coe_lt_coe.2 (Nat.lt_succ_self _))\nintro n\ninduction' n with n ih\n· intro p q hpq\n  dsimp at hpq \n  rw [Nat.cast_withBot, WithBot.coe_zero, Nat.WithBot.lt_zero_iff, degree_eq_bot, mul_eq_zero] at hpq \n  rcases hpq with (rfl | rfl) <;> simp\nintro p q hpq\nby_cases p0 : p = 0\n· simp [p0]\nby_cases q0 : q = 0\n· simp [q0]\nrw [degree_eq_natDegree (mul_ne_zero p0 q0), Nat.cast_withBot, Nat.cast_withBot, WithBot.coe_lt_coe,\n  Nat.lt_succ_iff_lt_or_eq, ← WithBot.coe_lt_coe, ← Nat.cast_withBot, ← degree_eq_natDegree (mul_ne_zero p0 q0),\n  natDegree_mul p0 q0] at hpq \nrcases hpq with (hlt | heq)\n· apply ih _ _ hlt\nrw [← p.natDegree_primPart, ← q.natDegree_primPart, ← WithBot.coe_eq_coe, WithBot.coe_add, ← Nat.cast_withBot, ←\n  degree_eq_natDegree p.primPart_ne_zero, ← Nat.cast_withBot, ← degree_eq_natDegree q.primPart_ne_zero] at heq \nrw [p.eq_C_content_mul_primPart, q.eq_C_content_mul_primPart]\nsuffices h : (q.primPart * p.primPart).content = 1\n·\n  rw [mul_assoc, content_C_mul, content_C_mul, mul_comm p.primPart, mul_assoc, content_C_mul, content_C_mul, h, mul_one,\n    content_primPart, content_primPart, mul_one, mul_one]\nrw [← normalize_content, normalize_eq_one, isUnit_iff_dvd_one, content_eq_gcd_leadingCoeff_content_eraseLead,\n  leadingCoeff_mul, gcd_comm]\napply (gcd_mul_dvd_mul_gcd _ _ _).trans\nrw [content_mul_aux, ih, content_primPart, mul_one, gcd_comm, ← content_eq_gcd_leadingCoeff_content_eraseLead,\n  content_primPart, one_mul, mul_comm q.primPart, content_mul_aux, ih, content_primPart, mul_one, gcd_comm, ←\n  content_eq_gcd_leadingCoeff_content_eraseLead, content_primPart]\n· rw [Nat.cast_withBot, ← heq, degree_mul, WithBot.add_lt_add_iff_right]\n  · apply degree_erase_lt p.primPart_ne_zero\n  · rw [Ne.def, degree_eq_bot]\n    apply q.primPart_ne_zero\n· rw [mul_comm, Nat.cast_withBot, ← heq, degree_mul, WithBot.add_lt_add_iff_left]\n  · apply degree_erase_lt q.primPart_ne_zero\n  · rw [Ne.def, degree_eq_bot]\n    apply p.primPart_ne_zero\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\nsuffices h : ∀ (n : ℕ) (p q : R[X]), (p * q).degree < n → (p * q).content = p.content * q.content\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nh : ∀ (n : ℕ) (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\napply h\n[GOAL]\ncase a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nh : ∀ (n : ℕ) (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\n⊢ degree (p * q) < ↑?n\ncase n\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nh : ∀ (n : ℕ) (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\n⊢ ℕ\n[PROOFSTEP]\napply lt_of_le_of_lt degree_le_natDegree (WithBot.coe_lt_coe.2 (Nat.lt_succ_self _))\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\n⊢ ∀ (n : ℕ) (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nn : ℕ\n⊢ ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase h.zero\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\n⊢ ∀ (p q : R[X]), degree (p * q) < ↑Nat.zero → content (p * q) = content p * content q\n[PROOFSTEP]\nintro p q hpq\n[GOAL]\ncase h.zero\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ p q : R[X]\nhpq : degree (p * q) < ↑Nat.zero\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\ndsimp at hpq \n[GOAL]\ncase h.zero\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ p q : R[X]\nhpq : degree (p * q) < ↑0\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\nrw [Nat.cast_withBot, WithBot.coe_zero, Nat.WithBot.lt_zero_iff, degree_eq_bot, mul_eq_zero] at hpq \n[GOAL]\ncase h.zero\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ p q : R[X]\nhpq : p = 0 ∨ q = 0\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\nrcases hpq with (rfl | rfl)\n[GOAL]\ncase h.zero.inl\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q✝ q : R[X]\n⊢ content (0 * q) = content 0 * content q\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.zero.inr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q p : R[X]\n⊢ content (p * 0) = content p * content 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.succ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\n⊢ ∀ (p q : R[X]), degree (p * q) < ↑(Nat.succ n) → content (p * q) = content p * content q\n[PROOFSTEP]\nintro p q hpq\n[GOAL]\ncase h.succ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\nhpq : degree (p * q) < ↑(Nat.succ n)\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\nby_cases p0 : p = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\nhpq : degree (p * q) < ↑(Nat.succ n)\np0 : p = 0\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\nsimp [p0]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\nhpq : degree (p * q) < ↑(Nat.succ n)\np0 : ¬p = 0\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\nby_cases q0 : q = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\nhpq : degree (p * q) < ↑(Nat.succ n)\np0 : ¬p = 0\nq0 : q = 0\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\nsimp [q0]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\nhpq : degree (p * q) < ↑(Nat.succ n)\np0 : ¬p = 0\nq0 : ¬q = 0\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\nrw [degree_eq_natDegree (mul_ne_zero p0 q0), Nat.cast_withBot, Nat.cast_withBot, WithBot.coe_lt_coe,\n  Nat.lt_succ_iff_lt_or_eq, ← WithBot.coe_lt_coe, ← Nat.cast_withBot, ← degree_eq_natDegree (mul_ne_zero p0 q0),\n  natDegree_mul p0 q0] at hpq \n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\nhpq : degree (p * q) < ↑n ∨ natDegree p + natDegree q = n\np0 : ¬p = 0\nq0 : ¬q = 0\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\nrcases hpq with (hlt | heq)\n[GOAL]\ncase neg.inl\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nhlt : degree (p * q) < ↑n\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\napply ih _ _ hlt\n[GOAL]\ncase neg.inr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : natDegree p + natDegree q = n\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\nrw [← p.natDegree_primPart, ← q.natDegree_primPart, ← WithBot.coe_eq_coe, WithBot.coe_add, ← Nat.cast_withBot, ←\n  degree_eq_natDegree p.primPart_ne_zero, ← Nat.cast_withBot, ← degree_eq_natDegree q.primPart_ne_zero] at heq \n[GOAL]\ncase neg.inr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ content (p * q) = content p * content q\n[PROOFSTEP]\nrw [p.eq_C_content_mul_primPart, q.eq_C_content_mul_primPart]\n[GOAL]\ncase neg.inr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ content (↑C (content p) * primPart p * (↑C (content q) * primPart q)) =\n    content (↑C (content p) * primPart p) * content (↑C (content q) * primPart q)\n[PROOFSTEP]\nsuffices h : (q.primPart * p.primPart).content = 1\n[GOAL]\ncase neg.inr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\nh : content (primPart q * primPart p) = 1\n⊢ content (↑C (content p) * primPart p * (↑C (content q) * primPart q)) =\n    content (↑C (content p) * primPart p) * content (↑C (content q) * primPart q)\n[PROOFSTEP]\nrw [mul_assoc, content_C_mul, content_C_mul, mul_comm p.primPart, mul_assoc, content_C_mul, content_C_mul, h, mul_one,\n  content_primPart, content_primPart, mul_one, mul_one]\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ content (primPart q * primPart p) = 1\n[PROOFSTEP]\nrw [← normalize_content, normalize_eq_one, isUnit_iff_dvd_one, content_eq_gcd_leadingCoeff_content_eraseLead,\n  leadingCoeff_mul, gcd_comm]\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ gcd (content (eraseLead (primPart q * primPart p))) (leadingCoeff (primPart q) * leadingCoeff (primPart p)) ∣ 1\n[PROOFSTEP]\napply (gcd_mul_dvd_mul_gcd _ _ _).trans\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ gcd (content (eraseLead (primPart q * primPart p))) (leadingCoeff (primPart q)) *\n      gcd (content (eraseLead (primPart q * primPart p))) (leadingCoeff (primPart p)) ∣\n    1\n[PROOFSTEP]\nrw [content_mul_aux, ih, content_primPart, mul_one, gcd_comm, ← content_eq_gcd_leadingCoeff_content_eraseLead,\n  content_primPart, one_mul, mul_comm q.primPart, content_mul_aux, ih, content_primPart, mul_one, gcd_comm, ←\n  content_eq_gcd_leadingCoeff_content_eraseLead, content_primPart]\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ degree (eraseLead (primPart p) * primPart q) < ↑n\n[PROOFSTEP]\nrw [Nat.cast_withBot, ← heq, degree_mul, WithBot.add_lt_add_iff_right]\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ degree (eraseLead (primPart p)) < degree (primPart p)\n[PROOFSTEP]\napply degree_erase_lt p.primPart_ne_zero\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ degree (primPart q) ≠ ⊥\n[PROOFSTEP]\nrw [Ne.def, degree_eq_bot]\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ ¬primPart q = 0\n[PROOFSTEP]\napply q.primPart_ne_zero\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ degree (eraseLead (primPart q) * primPart p) < ↑n\n[PROOFSTEP]\nrw [mul_comm, Nat.cast_withBot, ← heq, degree_mul, WithBot.add_lt_add_iff_left]\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ degree (eraseLead (primPart q)) < degree (primPart q)\n[PROOFSTEP]\napply degree_erase_lt q.primPart_ne_zero\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ degree (primPart p) ≠ ⊥\n[PROOFSTEP]\nrw [Ne.def, degree_eq_bot]\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np✝ q✝ : R[X]\nn : ℕ\nih : ∀ (p q : R[X]), degree (p * q) < ↑n → content (p * q) = content p * content q\np q : R[X]\np0 : ¬p = 0\nq0 : ¬q = 0\nheq : degree (primPart p) + degree (primPart q) = ↑n\n⊢ ¬primPart p = 0\n[PROOFSTEP]\napply p.primPart_ne_zero\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\n⊢ IsPrimitive (p * q)\n[PROOFSTEP]\nrw [isPrimitive_iff_content_eq_one, content_mul, hp.content_eq_one, hq.content_eq_one, mul_one]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nh0 : p * q ≠ 0\n⊢ primPart (p * q) = primPart p * primPart q\n[PROOFSTEP]\nrw [Ne.def, ← content_eq_zero_iff, ← C_eq_zero] at h0 \n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nh0✝ : ¬p * q = 0\nh0 : ¬↑C (content (p * q)) = 0\n⊢ primPart (p * q) = primPart p * primPart q\n[PROOFSTEP]\napply mul_left_cancel₀ h0\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nh0✝ : ¬p * q = 0\nh0 : ¬↑C (content (p * q)) = 0\n⊢ ↑C (content (p * q)) * primPart (p * q) = ↑C (content (p * q)) * (primPart p * primPart q)\n[PROOFSTEP]\nconv_lhs => rw [← (p * q).eq_C_content_mul_primPart, p.eq_C_content_mul_primPart, q.eq_C_content_mul_primPart]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nh0✝ : ¬p * q = 0\nh0 : ¬↑C (content (p * q)) = 0\n| ↑C (content (p * q)) * primPart (p * q)\n[PROOFSTEP]\nrw [← (p * q).eq_C_content_mul_primPart, p.eq_C_content_mul_primPart, q.eq_C_content_mul_primPart]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nh0✝ : ¬p * q = 0\nh0 : ¬↑C (content (p * q)) = 0\n| ↑C (content (p * q)) * primPart (p * q)\n[PROOFSTEP]\nrw [← (p * q).eq_C_content_mul_primPart, p.eq_C_content_mul_primPart, q.eq_C_content_mul_primPart]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nh0✝ : ¬p * q = 0\nh0 : ¬↑C (content (p * q)) = 0\n| ↑C (content (p * q)) * primPart (p * q)\n[PROOFSTEP]\nrw [← (p * q).eq_C_content_mul_primPart, p.eq_C_content_mul_primPart, q.eq_C_content_mul_primPart]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nh0✝ : ¬p * q = 0\nh0 : ¬↑C (content (p * q)) = 0\n⊢ ↑C (content p) * primPart p * (↑C (content q) * primPart q) = ↑C (content (p * q)) * (primPart p * primPart q)\n[PROOFSTEP]\nrw [content_mul, RingHom.map_mul]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nh0✝ : ¬p * q = 0\nh0 : ¬↑C (content (p * q)) = 0\n⊢ ↑C (content p) * primPart p * (↑C (content q) * primPart q) =\n    ↑C (content p) * ↑C (content q) * (primPart p * primPart q)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : q ≠ 0\n⊢ p ∣ primPart q ↔ p ∣ q\n[PROOFSTEP]\nrefine' ⟨fun h => h.trans (Dvd.intro_left _ q.eq_C_content_mul_primPart.symm), fun h => _⟩\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : q ≠ 0\nh : p ∣ q\n⊢ p ∣ primPart q\n[PROOFSTEP]\nrcases h with ⟨r, rfl⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nr : R[X]\nhq : p * r ≠ 0\n⊢ p ∣ primPart (p * r)\n[PROOFSTEP]\napply Dvd.intro _\n[GOAL]\ncase intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nr : R[X]\nhq : p * r ≠ 0\n⊢ p * ?m.658553 = primPart (p * r)\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nr : R[X]\nhq : p * r ≠ 0\n⊢ R[X]\n[PROOFSTEP]\nrw [primPart_mul hq, hp.primPart_eq]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\n⊢ ∃ r, IsPrimitive r ∧ ∀ (s : R[X]), p ∣ s ∧ q ∣ s ↔ r ∣ s\n[PROOFSTEP]\nclassical\nhave h : ∃ (n : ℕ) (r : R[X]), r.natDegree = n ∧ r.IsPrimitive ∧ p ∣ r ∧ q ∣ r :=\n  ⟨(p * q).natDegree, p * q, rfl, hp.mul hq, dvd_mul_right _ _, dvd_mul_left _ _⟩\nrcases Nat.find_spec h with ⟨r, rdeg, rprim, pr, qr⟩\nrefine' ⟨r, rprim, fun s => ⟨_, fun rs => ⟨pr.trans rs, qr.trans rs⟩⟩⟩\nsuffices hs : ∀ (n : ℕ) (s : R[X]), s.natDegree = n → p ∣ s ∧ q ∣ s → r ∣ s\n· apply hs s.natDegree s rfl\nclear s\nby_contra' con\nrcases Nat.find_spec con with ⟨s, sdeg, ⟨ps, qs⟩, rs⟩\nhave s0 : s ≠ 0 := by\n  contrapose! rs\n  simp [rs]\nhave hs :=\n  Nat.find_min' h\n    ⟨_, s.natDegree_primPart, s.isPrimitive_primPart, (hp.dvd_primPart_iff_dvd s0).2 ps,\n      (hq.dvd_primPart_iff_dvd s0).2 qs⟩\nrw [← rdeg] at hs \nby_cases sC : s.natDegree ≤ 0\n· rw [eq_C_of_natDegree_le_zero (le_trans hs sC), isPrimitive_iff_content_eq_one, content_C, normalize_eq_one] at rprim \n  rw [eq_C_of_natDegree_le_zero (le_trans hs sC), ← dvd_content_iff_C_dvd] at rs \n  apply rs rprim.dvd\nhave hcancel := natDegree_cancelLeads_lt_of_natDegree_le_natDegree hs (lt_of_not_ge sC)\nrw [sdeg] at hcancel \napply Nat.find_min con hcancel\nrefine' ⟨_, rfl, ⟨dvd_cancelLeads_of_dvd_of_dvd pr ps, dvd_cancelLeads_of_dvd_of_dvd qr qs⟩, fun rcs => rs _⟩\nrw [← rprim.dvd_primPart_iff_dvd s0]\nrw [cancelLeads, tsub_eq_zero_iff_le.mpr hs, pow_zero, mul_one] at rcs \nhave h := dvd_add rcs (Dvd.intro_left (C (leadingCoeff s) * X ^ (natDegree s - natDegree r)) rfl)\nhave hC0 := rprim.ne_zero\nrw [Ne.def, ← leadingCoeff_eq_zero, ← C_eq_zero] at hC0 \nrw [sub_add_cancel, ← rprim.dvd_primPart_iff_dvd (mul_ne_zero hC0 s0)] at h \nrcases isUnit_primPart_C r.leadingCoeff with ⟨u, hu⟩\napply h.trans (Associated.symm ⟨u, _⟩).dvd\nrw [primPart_mul (mul_ne_zero hC0 s0), hu, mul_comm]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\n⊢ ∃ r, IsPrimitive r ∧ ∀ (s : R[X]), p ∣ s ∧ q ∣ s ↔ r ∣ s\n[PROOFSTEP]\nhave h : ∃ (n : ℕ) (r : R[X]), r.natDegree = n ∧ r.IsPrimitive ∧ p ∣ r ∧ q ∣ r :=\n  ⟨(p * q).natDegree, p * q, rfl, hp.mul hq, dvd_mul_right _ _, dvd_mul_left _ _⟩\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\n⊢ ∃ r, IsPrimitive r ∧ ∀ (s : R[X]), p ∣ s ∧ q ∣ s ↔ r ∣ s\n[PROOFSTEP]\nrcases Nat.find_spec h with ⟨r, rdeg, rprim, pr, qr⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\n⊢ ∃ r, IsPrimitive r ∧ ∀ (s : R[X]), p ∣ s ∧ q ∣ s ↔ r ∣ s\n[PROOFSTEP]\nrefine' ⟨r, rprim, fun s => ⟨_, fun rs => ⟨pr.trans rs, qr.trans rs⟩⟩⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ns : R[X]\n⊢ p ∣ s ∧ q ∣ s → r ∣ s\n[PROOFSTEP]\nsuffices hs : ∀ (n : ℕ) (s : R[X]), s.natDegree = n → p ∣ s ∧ q ∣ s → r ∣ s\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ns : R[X]\nhs : ∀ (n : ℕ) (s : R[X]), natDegree s = n → p ∣ s ∧ q ∣ s → r ∣ s\n⊢ p ∣ s ∧ q ∣ s → r ∣ s\n[PROOFSTEP]\napply hs s.natDegree s rfl\n[GOAL]\ncase hs\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ns : R[X]\n⊢ ∀ (n : ℕ) (s : R[X]), natDegree s = n → p ∣ s ∧ q ∣ s → r ∣ s\n[PROOFSTEP]\nclear s\n[GOAL]\ncase hs\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\n⊢ ∀ (n : ℕ) (s : R[X]), natDegree s = n → p ∣ s ∧ q ∣ s → r ∣ s\n[PROOFSTEP]\nby_contra' con\n[GOAL]\ncase hs\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\n⊢ False\n[PROOFSTEP]\nrcases Nat.find_spec con with ⟨s, sdeg, ⟨ps, qs⟩, rs⟩\n[GOAL]\ncase hs.intro.intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\n⊢ False\n[PROOFSTEP]\nhave s0 : s ≠ 0 := by\n  contrapose! rs\n  simp [rs]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\n⊢ s ≠ 0\n[PROOFSTEP]\ncontrapose! rs\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nps : p ∣ s\nqs : q ∣ s\nrs : s = 0\n⊢ r ∣ s\n[PROOFSTEP]\nsimp [rs]\n[GOAL]\ncase hs.intro.intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\n⊢ False\n[PROOFSTEP]\nhave hs :=\n  Nat.find_min' h\n    ⟨_, s.natDegree_primPart, s.isPrimitive_primPart, (hp.dvd_primPart_iff_dvd s0).2 ps,\n      (hq.dvd_primPart_iff_dvd s0).2 qs⟩\n[GOAL]\ncase hs.intro.intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : Nat.find h ≤ natDegree s\n⊢ False\n[PROOFSTEP]\nrw [← rdeg] at hs \n[GOAL]\ncase hs.intro.intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\n⊢ False\n[PROOFSTEP]\nby_cases sC : s.natDegree ≤ 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : natDegree s ≤ 0\n⊢ False\n[PROOFSTEP]\nrw [eq_C_of_natDegree_le_zero (le_trans hs sC), isPrimitive_iff_content_eq_one, content_C, normalize_eq_one] at rprim \n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim✝ : IsPrimitive (↑C (coeff r 0))\nrprim : IsUnit (coeff r 0)\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : natDegree s ≤ 0\n⊢ False\n[PROOFSTEP]\nrw [eq_C_of_natDegree_le_zero (le_trans hs sC), ← dvd_content_iff_C_dvd] at rs \n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim✝ : IsPrimitive (↑C (coeff r 0))\nrprim : IsUnit (coeff r 0)\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs✝ : ¬↑C (coeff r 0) ∣ s\nrs : ¬coeff r 0 ∣ content s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : natDegree s ≤ 0\n⊢ False\n[PROOFSTEP]\napply rs rprim.dvd\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\n⊢ False\n[PROOFSTEP]\nhave hcancel := natDegree_cancelLeads_lt_of_natDegree_le_natDegree hs (lt_of_not_ge sC)\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\nhcancel : natDegree (cancelLeads r s) < natDegree s\n⊢ False\n[PROOFSTEP]\nrw [sdeg] at hcancel \n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\nhcancel : natDegree (cancelLeads r s) < Nat.find con\n⊢ False\n[PROOFSTEP]\napply Nat.find_min con hcancel\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\nhcancel : natDegree (cancelLeads r s) < Nat.find con\n⊢ ∃ s_1, natDegree s_1 = natDegree (cancelLeads r s) ∧ (p ∣ s_1 ∧ q ∣ s_1) ∧ ¬r ∣ s_1\n[PROOFSTEP]\nrefine' ⟨_, rfl, ⟨dvd_cancelLeads_of_dvd_of_dvd pr ps, dvd_cancelLeads_of_dvd_of_dvd qr qs⟩, fun rcs => rs _⟩\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\nhcancel : natDegree (cancelLeads r s) < Nat.find con\nrcs : r ∣ cancelLeads r s\n⊢ r ∣ s\n[PROOFSTEP]\nrw [← rprim.dvd_primPart_iff_dvd s0]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\nhcancel : natDegree (cancelLeads r s) < Nat.find con\nrcs : r ∣ cancelLeads r s\n⊢ r ∣ primPart s\n[PROOFSTEP]\nrw [cancelLeads, tsub_eq_zero_iff_le.mpr hs, pow_zero, mul_one] at rcs \n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\nhcancel : natDegree (cancelLeads r s) < Nat.find con\nrcs : r ∣ ↑C (leadingCoeff r) * s - ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r\n⊢ r ∣ primPart s\n[PROOFSTEP]\nhave h := dvd_add rcs (Dvd.intro_left (C (leadingCoeff s) * X ^ (natDegree s - natDegree r)) rfl)\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh✝ : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h✝\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\nhcancel : natDegree (cancelLeads r s) < Nat.find con\nrcs : r ∣ ↑C (leadingCoeff r) * s - ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r\nh :\n  r ∣\n    ↑C (leadingCoeff r) * s - ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r +\n      ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r\n⊢ r ∣ primPart s\n[PROOFSTEP]\nhave hC0 := rprim.ne_zero\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh✝ : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h✝\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\nhcancel : natDegree (cancelLeads r s) < Nat.find con\nrcs : r ∣ ↑C (leadingCoeff r) * s - ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r\nh :\n  r ∣\n    ↑C (leadingCoeff r) * s - ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r +\n      ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r\nhC0 : r ≠ 0\n⊢ r ∣ primPart s\n[PROOFSTEP]\nrw [Ne.def, ← leadingCoeff_eq_zero, ← C_eq_zero] at hC0 \n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh✝ : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h✝\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\nhcancel : natDegree (cancelLeads r s) < Nat.find con\nrcs : r ∣ ↑C (leadingCoeff r) * s - ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r\nh :\n  r ∣\n    ↑C (leadingCoeff r) * s - ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r +\n      ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r\nhC0 : ¬↑C (leadingCoeff r) = 0\n⊢ r ∣ primPart s\n[PROOFSTEP]\nrw [sub_add_cancel, ← rprim.dvd_primPart_iff_dvd (mul_ne_zero hC0 s0)] at h \n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh✝ : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h✝\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\nhcancel : natDegree (cancelLeads r s) < Nat.find con\nrcs : r ∣ ↑C (leadingCoeff r) * s - ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r\nh : r ∣ primPart (↑C (leadingCoeff r) * s)\nhC0 : ¬↑C (leadingCoeff r) = 0\n⊢ r ∣ primPart s\n[PROOFSTEP]\nrcases isUnit_primPart_C r.leadingCoeff with ⟨u, hu⟩\n[GOAL]\ncase neg.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh✝ : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h✝\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\nhcancel : natDegree (cancelLeads r s) < Nat.find con\nrcs : r ∣ ↑C (leadingCoeff r) * s - ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r\nh : r ∣ primPart (↑C (leadingCoeff r) * s)\nhC0 : ¬↑C (leadingCoeff r) = 0\nu : R[X]ˣ\nhu : ↑u = primPart (↑C (leadingCoeff r))\n⊢ r ∣ primPart s\n[PROOFSTEP]\napply h.trans (Associated.symm ⟨u, _⟩).dvd\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh✝ : ∃ n r, natDegree r = n ∧ IsPrimitive r ∧ p ∣ r ∧ q ∣ r\nr : R[X]\nrdeg : natDegree r = Nat.find h✝\nrprim : IsPrimitive r\npr : p ∣ r\nqr : q ∣ r\ncon : ∃ n s, natDegree s = n ∧ (p ∣ s ∧ q ∣ s) ∧ ¬r ∣ s\ns : R[X]\nsdeg : natDegree s = Nat.find con\nrs : ¬r ∣ s\nps : p ∣ s\nqs : q ∣ s\ns0 : s ≠ 0\nhs : natDegree r ≤ natDegree s\nsC : ¬natDegree s ≤ 0\nhcancel : natDegree (cancelLeads r s) < Nat.find con\nrcs : r ∣ ↑C (leadingCoeff r) * s - ↑C (leadingCoeff s) * X ^ (natDegree s - natDegree r) * r\nh : r ∣ primPart (↑C (leadingCoeff r) * s)\nhC0 : ¬↑C (leadingCoeff r) = 0\nu : R[X]ˣ\nhu : ↑u = primPart (↑C (leadingCoeff r))\n⊢ primPart s * ↑u = primPart (↑C (leadingCoeff r) * s)\n[PROOFSTEP]\nrw [primPart_mul (mul_ne_zero hC0 s0), hu, mul_comm]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhq : q ≠ 0\n⊢ p ∣ q ↔ content p ∣ content q ∧ primPart p ∣ primPart q\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhq : q ≠ 0\n⊢ p ∣ q → content p ∣ content q ∧ primPart p ∣ primPart q\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhq : q ≠ 0\n⊢ content p ∣ content q ∧ primPart p ∣ primPart q → p ∣ q\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhq : q ≠ 0\nh : p ∣ q\n⊢ content p ∣ content q ∧ primPart p ∣ primPart q\n[PROOFSTEP]\nrcases h with ⟨r, rfl⟩\n[GOAL]\ncase mp.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np r : R[X]\nhq : p * r ≠ 0\n⊢ content p ∣ content (p * r) ∧ primPart p ∣ primPart (p * r)\n[PROOFSTEP]\nrw [content_mul, p.isPrimitive_primPart.dvd_primPart_iff_dvd hq]\n[GOAL]\ncase mp.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np r : R[X]\nhq : p * r ≠ 0\n⊢ content p ∣ content p * content r ∧ primPart p ∣ p * r\n[PROOFSTEP]\nexact ⟨Dvd.intro _ rfl, p.primPart_dvd.trans (Dvd.intro _ rfl)⟩\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhq : q ≠ 0\nh : content p ∣ content q ∧ primPart p ∣ primPart q\n⊢ p ∣ q\n[PROOFSTEP]\nrw [p.eq_C_content_mul_primPart, q.eq_C_content_mul_primPart]\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhq : q ≠ 0\nh : content p ∣ content q ∧ primPart p ∣ primPart q\n⊢ ↑C (content p) * primPart p ∣ ↑C (content q) * primPart q\n[PROOFSTEP]\nexact mul_dvd_mul (RingHom.map_dvd C h.1) h.2\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\n⊢ ∃ c, ∀ (d : R[X]), p ∣ d ∧ q ∣ d ↔ c ∣ d\n[PROOFSTEP]\nrcases exists_primitive_lcm_of_isPrimitive p.isPrimitive_primPart q.isPrimitive_primPart with ⟨r, rprim, hr⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\n⊢ ∃ c, ∀ (d : R[X]), p ∣ d ∧ q ∣ d ↔ c ∣ d\n[PROOFSTEP]\nrefine' ⟨C (lcm p.content q.content) * r, fun s => _⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\n⊢ p ∣ s ∧ q ∣ s ↔ ↑C (lcm (content p) (content q)) * r ∣ s\n[PROOFSTEP]\nby_cases hs : s = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\nhs : s = 0\n⊢ p ∣ s ∧ q ∣ s ↔ ↑C (lcm (content p) (content q)) * r ∣ s\n[PROOFSTEP]\nsimp [hs]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\nhs : ¬s = 0\n⊢ p ∣ s ∧ q ∣ s ↔ ↑C (lcm (content p) (content q)) * r ∣ s\n[PROOFSTEP]\nby_cases hpq : C (lcm p.content q.content) = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\nhs : ¬s = 0\nhpq : ↑C (lcm (content p) (content q)) = 0\n⊢ p ∣ s ∧ q ∣ s ↔ ↑C (lcm (content p) (content q)) * r ∣ s\n[PROOFSTEP]\nrw [C_eq_zero, lcm_eq_zero_iff, content_eq_zero_iff, content_eq_zero_iff] at hpq \n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\nhs : ¬s = 0\nhpq : p = 0 ∨ q = 0\n⊢ p ∣ s ∧ q ∣ s ↔ ↑C (lcm (content p) (content q)) * r ∣ s\n[PROOFSTEP]\nrcases hpq with (hpq | hpq)\n[GOAL]\ncase pos.inl\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\nhs : ¬s = 0\nhpq : p = 0\n⊢ p ∣ s ∧ q ∣ s ↔ ↑C (lcm (content p) (content q)) * r ∣ s\n[PROOFSTEP]\nsimp [hpq, hs]\n[GOAL]\ncase pos.inr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\nhs : ¬s = 0\nhpq : q = 0\n⊢ p ∣ s ∧ q ∣ s ↔ ↑C (lcm (content p) (content q)) * r ∣ s\n[PROOFSTEP]\nsimp [hpq, hs]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\nhs : ¬s = 0\nhpq : ¬↑C (lcm (content p) (content q)) = 0\n⊢ p ∣ s ∧ q ∣ s ↔ ↑C (lcm (content p) (content q)) * r ∣ s\n[PROOFSTEP]\niterate 3 rw [dvd_iff_content_dvd_content_and_primPart_dvd_primPart hs]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\nhs : ¬s = 0\nhpq : ¬↑C (lcm (content p) (content q)) = 0\n⊢ p ∣ s ∧ q ∣ s ↔ ↑C (lcm (content p) (content q)) * r ∣ s\n[PROOFSTEP]\nrw [dvd_iff_content_dvd_content_and_primPart_dvd_primPart hs]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\nhs : ¬s = 0\nhpq : ¬↑C (lcm (content p) (content q)) = 0\n⊢ (content p ∣ content s ∧ primPart p ∣ primPart s) ∧ q ∣ s ↔ ↑C (lcm (content p) (content q)) * r ∣ s\n[PROOFSTEP]\nrw [dvd_iff_content_dvd_content_and_primPart_dvd_primPart hs]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\nhs : ¬s = 0\nhpq : ¬↑C (lcm (content p) (content q)) = 0\n⊢ (content p ∣ content s ∧ primPart p ∣ primPart s) ∧ content q ∣ content s ∧ primPart q ∣ primPart s ↔\n    ↑C (lcm (content p) (content q)) * r ∣ s\n[PROOFSTEP]\nrw [dvd_iff_content_dvd_content_and_primPart_dvd_primPart hs]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\nhs : ¬s = 0\nhpq : ¬↑C (lcm (content p) (content q)) = 0\n⊢ (content p ∣ content s ∧ primPart p ∣ primPart s) ∧ content q ∣ content s ∧ primPart q ∣ primPart s ↔\n    content (↑C (lcm (content p) (content q)) * r) ∣ content s ∧\n      primPart (↑C (lcm (content p) (content q)) * r) ∣ primPart s\n[PROOFSTEP]\nrw [content_mul, rprim.content_eq_one, mul_one, content_C, normalize_lcm, lcm_dvd_iff,\n  primPart_mul (mul_ne_zero hpq rprim.ne_zero), rprim.primPart_eq,\n  IsUnit.mul_left_dvd _ _ _ (isUnit_primPart_C (lcm p.content q.content)), ← hr s.primPart]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q r : R[X]\nrprim : IsPrimitive r\nhr : ∀ (s : R[X]), primPart p ∣ s ∧ primPart q ∣ s ↔ r ∣ s\ns : R[X]\nhs : ¬s = 0\nhpq : ¬↑C (lcm (content p) (content q)) = 0\n⊢ (content p ∣ content s ∧ primPart p ∣ primPart s) ∧ content q ∣ content s ∧ primPart q ∣ primPart s ↔\n    (content p ∣ content s ∧ content q ∣ content s) ∧ primPart p ∣ primPart s ∧ primPart q ∣ primPart s\n[PROOFSTEP]\ntauto\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : p ≠ 0\nq : R[X]\n⊢ degree (gcd p q) ≤ degree p\n[PROOFSTEP]\nhave := natDegree_le_iff_degree_le.mp (natDegree_le_of_dvd (gcd_dvd_left p q) hp)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : p ≠ 0\nq : R[X]\nthis : degree (gcd p q) ≤ ↑(natDegree p)\n⊢ degree (gcd p q) ≤ degree p\n[PROOFSTEP]\nrwa [degree_eq_natDegree hp]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhq : q ≠ 0\n⊢ degree (gcd p q) ≤ degree q\n[PROOFSTEP]\nrw [gcd_comm]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhq : q ≠ 0\n⊢ degree (gcd q p) ≤ degree q\n[PROOFSTEP]\nexact degree_gcd_le_left hq p\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.Content", "llama_tokens": 43356, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6334102636778401, "lm_q2_score": 0.6261241702517976, "lm_q1q2_score": 0.39659347577425996}}
{"text": "[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : A\nr : R\n⊢ (fun r => r • 1) r = x ↔ ↑(algebraMap R A) r = x\n[PROOFSTEP]\nrw [algebraMap_eq_smul_one]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ 1 ≤ 1.toAddSubmonoid\n[PROOFSTEP]\nrintro x ⟨n, rfl⟩\n[GOAL]\ncase intro\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nn : ℕ\n⊢ ↑(Nat.castAddMonoidHom A) n ∈ 1.toAddSubmonoid\n[PROOFSTEP]\nexact ⟨n, map_natCast (algebraMap R A) n⟩\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ 1 = span R {1}\n[PROOFSTEP]\napply Submodule.ext\n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ ∀ (x : A), x ∈ 1 ↔ x ∈ span R {1}\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n a : A\n⊢ a ∈ 1 ↔ a ∈ span R {1}\n[PROOFSTEP]\nsimp only [mem_one, mem_span_singleton, Algebra.smul_def, mul_one]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ 1 ≤ P ↔ 1 ∈ P\n[PROOFSTEP]\nsimp only [one_eq_span, span_le, Set.singleton_subset_iff, SetLike.mem_coe]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\n⊢ map (AlgHom.toLinearMap f) 1 = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nx✝ : A'\n⊢ x✝ ∈ map (AlgHom.toLinearMap f) 1 ↔ x✝ ∈ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ map (↑(opLinearEquiv R)) 1 = 1\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\nx : Aᵐᵒᵖ\n⊢ x ∈ map (↑(opLinearEquiv R)) 1 ↔ x ∈ 1\n[PROOFSTEP]\ninduction x using MulOpposite.rec'\n[GOAL]\ncase h.h\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n X✝ : A\n⊢ op X✝ ∈ map (↑(opLinearEquiv R)) 1 ↔ op X✝ ∈ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ comap (↑(opLinearEquiv R)) 1 = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n x✝ : A\n⊢ x✝ ∈ comap (↑(opLinearEquiv R)) 1 ↔ x✝ ∈ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ map (↑(LinearEquiv.symm (opLinearEquiv R))) 1 = 1\n[PROOFSTEP]\nrw [← comap_equiv_eq_map_symm, comap_op_one]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ comap (↑(LinearEquiv.symm (opLinearEquiv R))) 1 = 1\n[PROOFSTEP]\nrw [← map_equiv_eq_comap_symm, map_op_one]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM✝ N✝ P Q : Submodule R A\nm n : A\nM N : Submodule R A\n⊢ (M * N).toAddSubmonoid = M.toAddSubmonoid * N.toAddSubmonoid\n[PROOFSTEP]\ndsimp [HMul.hMul, Mul.mul]\n  --porting note: added `hMul`\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM✝ N✝ P Q : Submodule R A\nm n : A\nM N : Submodule R A\n⊢ (map₂ (LinearMap.mul R A) M N).toAddSubmonoid =\n    ⨆ (s : { x // x ∈ M.toAddSubmonoid }), AddSubmonoid.map (AddMonoidHom.mulLeft ↑s) N.toAddSubmonoid\n[PROOFSTEP]\nrw [map₂, iSup_toAddSubmonoid]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM✝ N✝ P Q : Submodule R A\nm n : A\nM N : Submodule R A\n⊢ ⨆ (i : { x // x ∈ M }), (map (↑(LinearMap.mul R A) ↑i) N).toAddSubmonoid =\n    ⨆ (s : { x // x ∈ M.toAddSubmonoid }), AddSubmonoid.map (AddMonoidHom.mulLeft ↑s) N.toAddSubmonoid\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\nC : A → Prop\nr : A\nhr : r ∈ M * N\nhm : ∀ (m : A), m ∈ M → ∀ (n : A), n ∈ N → C (m * n)\nha : ∀ (x y : A), C x → C y → C (x + y)\n⊢ C r\n[PROOFSTEP]\nrw [← mem_toAddSubmonoid, mul_toAddSubmonoid] at hr \n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\nC : A → Prop\nr : A\nhr : r ∈ M.toAddSubmonoid * N.toAddSubmonoid\nhm : ∀ (m : A), m ∈ M → ∀ (n : A), n ∈ N → C (m * n)\nha : ∀ (x y : A), C x → C y → C (x + y)\n⊢ C r\n[PROOFSTEP]\nexact AddSubmonoid.mul_induction_on hr hm ha\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\nC : (r : A) → r ∈ M * N → Prop\nhm : ∀ (m : A) (x : m ∈ M) (n : A) (x_1 : n ∈ N), C (m * n) (_ : m * n ∈ M * N)\nha : ∀ (x : A) (hx : x ∈ M * N) (y : A) (hy : y ∈ M * N), C x hx → C y hy → C (x + y) (_ : x + y ∈ M * N)\nr : A\nhr : r ∈ M * N\n⊢ C r hr\n[PROOFSTEP]\nrefine' Exists.elim _ fun (hr : r ∈ M * N) (hc : C r hr) => hc\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\nC : (r : A) → r ∈ M * N → Prop\nhm : ∀ (m : A) (x : m ∈ M) (n : A) (x_1 : n ∈ N), C (m * n) (_ : m * n ∈ M * N)\nha : ∀ (x : A) (hx : x ∈ M * N) (y : A) (hy : y ∈ M * N), C x hx → C y hy → C (x + y) (_ : x + y ∈ M * N)\nr : A\nhr : r ∈ M * N\n⊢ ∃ x, C r x\n[PROOFSTEP]\nexact\n  Submodule.mul_induction_on hr (fun x hx y hy => ⟨_, hm _ hx _ hy⟩) fun x y ⟨_, hx⟩ ⟨_, hy⟩ => ⟨_, ha _ _ _ _ hx hy⟩\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ 1 * M = M\n[PROOFSTEP]\nconv_lhs => rw [one_eq_span, ← span_eq M]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n| 1 * M\n[PROOFSTEP]\nrw [one_eq_span, ← span_eq M]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n| 1 * M\n[PROOFSTEP]\nrw [one_eq_span, ← span_eq M]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n| 1 * M\n[PROOFSTEP]\nrw [one_eq_span, ← span_eq M]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ span R {1} * span R ↑M = M\n[PROOFSTEP]\nerw [span_mul_span, one_mul, span_eq]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ M * 1 = M\n[PROOFSTEP]\nconv_lhs => rw [one_eq_span, ← span_eq M]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n| M * 1\n[PROOFSTEP]\nrw [one_eq_span, ← span_eq M]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n| M * 1\n[PROOFSTEP]\nrw [one_eq_span, ← span_eq M]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n| M * 1\n[PROOFSTEP]\nrw [one_eq_span, ← span_eq M]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ span R ↑M * span R {1} = M\n[PROOFSTEP]\nerw [span_mul_span, mul_one, span_eq]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\n⊢ ⨆ (i : { x // x ∈ M }), map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N) =\n    map (AlgHom.toLinearMap f) M * map (AlgHom.toLinearMap f) N\n[PROOFSTEP]\napply congr_arg sSup\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\n⊢ (range fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) =\n    range fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)\n[PROOFSTEP]\next S\n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\n⊢ (S ∈ range fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) ↔\n    S ∈ range fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\n⊢ (S ∈ range fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) →\n    S ∈ range fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)\n[PROOFSTEP]\nrintro ⟨y, hy⟩\n[GOAL]\ncase h.mpr\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\n⊢ (S ∈ range fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)) →\n    S ∈ range fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)\n[PROOFSTEP]\nrintro ⟨y, hy⟩\n[GOAL]\ncase h.mp.intro\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\ny : { x // x ∈ M }\nhy : (fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) y = S\n⊢ S ∈ range fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)\n[PROOFSTEP]\nuse⟨f y, mem_map.mpr ⟨y.1, y.2, rfl⟩⟩\n    -- porting note: added `⟨⟩`\n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\ny : { x // x ∈ M }\nhy : (fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) y = S\n⊢ (fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N))\n      { val := ↑f ↑y, property := (_ : ↑f ↑y ∈ map (AlgHom.toLinearMap f) M) } =\n    S\n[PROOFSTEP]\nrefine' Eq.trans _ hy\n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\ny : { x // x ∈ M }\nhy : (fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) y = S\n⊢ (fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N))\n      { val := ↑f ↑y, property := (_ : ↑f ↑y ∈ map (AlgHom.toLinearMap f) M) } =\n    (fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) y\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\ny : { x // x ∈ M }\nhy : (fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) y = S\nx✝ : A'\n⊢ x✝ ∈\n      (fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N))\n        { val := ↑f ↑y, property := (_ : ↑f ↑y ∈ map (AlgHom.toLinearMap f) M) } ↔\n    x✝ ∈ (fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mpr.intro\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\ny : { x // x ∈ map (AlgHom.toLinearMap f) M }\nhy : (fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)) y = S\n⊢ S ∈ range fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)\n[PROOFSTEP]\nobtain ⟨y', hy', fy_eq⟩ := mem_map.mp y.2\n[GOAL]\ncase h.mpr.intro.intro.intro\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\ny : { x // x ∈ map (AlgHom.toLinearMap f) M }\nhy : (fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)) y = S\ny' : A\nhy' : y' ∈ M\nfy_eq : ↑(AlgHom.toLinearMap f) y' = ↑y\n⊢ S ∈ range fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)\n[PROOFSTEP]\nuse⟨y', hy'⟩\n    -- porting note: added `⟨⟩`\n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\ny : { x // x ∈ map (AlgHom.toLinearMap f) M }\nhy : (fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)) y = S\ny' : A\nhy' : y' ∈ M\nfy_eq : ↑(AlgHom.toLinearMap f) y' = ↑y\n⊢ (fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) { val := y', property := hy' } = S\n[PROOFSTEP]\nrefine' Eq.trans _ hy\n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\ny : { x // x ∈ map (AlgHom.toLinearMap f) M }\nhy : (fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)) y = S\ny' : A\nhy' : y' ∈ M\nfy_eq : ↑(AlgHom.toLinearMap f) y' = ↑y\n⊢ (fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) { val := y', property := hy' } =\n    (fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)) y\n[PROOFSTEP]\nrw [f.toLinearMap_apply] at fy_eq \n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\ny : { x // x ∈ map (AlgHom.toLinearMap f) M }\nhy : (fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)) y = S\ny' : A\nhy' : y' ∈ M\nfy_eq : ↑f y' = ↑y\n⊢ (fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) { val := y', property := hy' } =\n    (fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)) y\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : Semiring A\ninst✝² : Algebra R A\nS✝ T : Set A\nM N P Q : Submodule R A\nm n : A\nA' : Type u_1\ninst✝¹ : Semiring A'\ninst✝ : Algebra R A'\nf : A →ₐ[R] A'\nS : Submodule R A'\ny : { x // x ∈ map (AlgHom.toLinearMap f) M }\nhy : (fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)) y = S\ny' : A\nhy' : y' ∈ M\nfy_eq : ↑f y' = ↑y\nx✝ : A'\n⊢ x✝ ∈ (fun i => map (AlgHom.toLinearMap f) (map (↑(LinearMap.mul R A) ↑i) N)) { val := y', property := hy' } ↔\n    x✝ ∈ (fun s => map (↑(LinearMap.mul R A') ↑s) (map (AlgHom.toLinearMap f) N)) y\n[PROOFSTEP]\nsimp [fy_eq]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ map (↑(opLinearEquiv R)) (M * N) = map (↑(opLinearEquiv R)) N * map (↑(opLinearEquiv R)) M\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ map (↑(opLinearEquiv R)) (M * N) ≤ map (↑(opLinearEquiv R)) N * map (↑(opLinearEquiv R)) M\n[PROOFSTEP]\nsimp_rw [map_le_iff_le_comap]\n[GOAL]\ncase a\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ M * N ≤ comap (↑(opLinearEquiv R)) (map (↑(opLinearEquiv R)) N * map (↑(opLinearEquiv R)) M)\n[PROOFSTEP]\nrefine' mul_le.2 fun m hm n hn => _\n[GOAL]\ncase a\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm✝ n✝ m : A\nhm : m ∈ M\nn : A\nhn : n ∈ N\n⊢ m * n ∈ comap (↑(opLinearEquiv R)) (map (↑(opLinearEquiv R)) N * map (↑(opLinearEquiv R)) M)\n[PROOFSTEP]\nrw [mem_comap, map_equiv_eq_comap_symm, map_equiv_eq_comap_symm]\n[GOAL]\ncase a\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm✝ n✝ m : A\nhm : m ∈ M\nn : A\nhn : n ∈ N\n⊢ ↑↑(opLinearEquiv R) (m * n) ∈\n    comap (↑(LinearEquiv.symm (opLinearEquiv R))) N * comap (↑(LinearEquiv.symm (opLinearEquiv R))) M\n[PROOFSTEP]\nshow op n * op m ∈ _\n[GOAL]\ncase a\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm✝ n✝ m : A\nhm : m ∈ M\nn : A\nhn : n ∈ N\n⊢ op n * op m ∈ comap (↑(LinearEquiv.symm (opLinearEquiv R))) N * comap (↑(LinearEquiv.symm (opLinearEquiv R))) M\n[PROOFSTEP]\nexact mul_mem_mul hn hm\n[GOAL]\ncase a\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ map (↑(opLinearEquiv R)) N * map (↑(opLinearEquiv R)) M ≤ map (↑(opLinearEquiv R)) (M * N)\n[PROOFSTEP]\nrefine' mul_le.2 (MulOpposite.rec' fun m hm => MulOpposite.rec' fun n hn => _)\n[GOAL]\ncase a\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm✝ n✝ m : A\nhm : op m ∈ map (↑(opLinearEquiv R)) N\nn : A\nhn : op n ∈ map (↑(opLinearEquiv R)) M\n⊢ op m * op n ∈ map (↑(opLinearEquiv R)) (M * N)\n[PROOFSTEP]\nrw [Submodule.mem_map_equiv] at hm hn ⊢\n[GOAL]\ncase a\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm✝ n✝ m : A\nhm : ↑(LinearEquiv.symm (opLinearEquiv R)) (op m) ∈ N\nn : A\nhn : ↑(LinearEquiv.symm (opLinearEquiv R)) (op n) ∈ M\n⊢ ↑(LinearEquiv.symm (opLinearEquiv R)) (op m * op n) ∈ M * N\n[PROOFSTEP]\nexact mul_mem_mul hn hm\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ comap (↑(LinearEquiv.symm (opLinearEquiv R))) (M * N) =\n    comap (↑(LinearEquiv.symm (opLinearEquiv R))) N * comap (↑(LinearEquiv.symm (opLinearEquiv R))) M\n[PROOFSTEP]\nsimp_rw [← map_equiv_eq_comap_symm, map_op_mul]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM✝ N✝ P Q : Submodule R A\nm n : A\nM N : Submodule R Aᵐᵒᵖ\nthis : Function.Injective ↑↑(opLinearEquiv R)\n⊢ map (↑(opLinearEquiv R)) (map (↑(LinearEquiv.symm (opLinearEquiv R))) (M * N)) =\n    map (↑(opLinearEquiv R))\n      (map (↑(LinearEquiv.symm (opLinearEquiv R))) N * map (↑(LinearEquiv.symm (opLinearEquiv R))) M)\n[PROOFSTEP]\nrw [← map_comp, map_op_mul, ← map_comp, ← map_comp, LinearEquiv.comp_coe, LinearEquiv.symm_trans_self,\n  LinearEquiv.refl_toLinearMap, map_id, map_id, map_id]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM✝ N✝ P Q : Submodule R A\nm n : A\nM N : Submodule R Aᵐᵒᵖ\n⊢ comap (↑(opLinearEquiv R)) (M * N) = comap (↑(opLinearEquiv R)) N * comap (↑(opLinearEquiv R)) M\n[PROOFSTEP]\nsimp_rw [comap_equiv_eq_map_symm, map_unop_mul]\n[GOAL]\nι : Sort uι\nR✝ : Type u\ninst✝⁶ : CommSemiring R✝\nA✝ : Type v\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\nS✝ T : Set A✝\nM N P Q : Submodule R✝ A✝\nm n : A✝\nR : Type u_1\nA : Type u_2\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : Mul A\ninst✝ : Module R A\nS S' : Set A\nx : A\nhx : x ∈ span R (S * S')\n⊢ ∃ T T', ↑T ⊆ S ∧ ↑T' ⊆ S' ∧ x ∈ span R (↑T * ↑T')\n[PROOFSTEP]\nobtain ⟨U, h, hU⟩ := mem_span_finite_of_mem_span hx\n[GOAL]\ncase intro.intro\nι : Sort uι\nR✝ : Type u\ninst✝⁶ : CommSemiring R✝\nA✝ : Type v\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\nS✝ T : Set A✝\nM N P Q : Submodule R✝ A✝\nm n : A✝\nR : Type u_1\nA : Type u_2\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : Mul A\ninst✝ : Module R A\nS S' : Set A\nx : A\nhx : x ∈ span R (S * S')\nU : Finset A\nh : ↑U ⊆ S * S'\nhU : x ∈ span R ↑U\n⊢ ∃ T T', ↑T ⊆ S ∧ ↑T' ⊆ S' ∧ x ∈ span R (↑T * ↑T')\n[PROOFSTEP]\nobtain ⟨T, T', hS, hS', h⟩ := Finset.subset_mul h\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nι : Sort uι\nR✝ : Type u\ninst✝⁶ : CommSemiring R✝\nA✝ : Type v\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\nS✝ T✝ : Set A✝\nM N P Q : Submodule R✝ A✝\nm n : A✝\nR : Type u_1\nA : Type u_2\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : Mul A\ninst✝ : Module R A\nS S' : Set A\nx : A\nhx : x ∈ span R (S * S')\nU : Finset A\nh✝ : ↑U ⊆ S * S'\nhU : x ∈ span R ↑U\nT T' : Finset A\nhS : ↑T ⊆ S\nhS' : ↑T' ⊆ S'\nh : U ⊆ T * T'\n⊢ ∃ T T', ↑T ⊆ S ∧ ↑T' ⊆ S' ∧ x ∈ span R (↑T * ↑T')\n[PROOFSTEP]\nuse T, T', hS, hS'\n[GOAL]\ncase right\nι : Sort uι\nR✝ : Type u\ninst✝⁶ : CommSemiring R✝\nA✝ : Type v\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\nS✝ T✝ : Set A✝\nM N P Q : Submodule R✝ A✝\nm n : A✝\nR : Type u_1\nA : Type u_2\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : Mul A\ninst✝ : Module R A\nS S' : Set A\nx : A\nhx : x ∈ span R (S * S')\nU : Finset A\nh✝ : ↑U ⊆ S * S'\nhU : x ∈ span R ↑U\nT T' : Finset A\nhS : ↑T ⊆ S\nhS' : ↑T' ⊆ S'\nh : U ⊆ T * T'\n⊢ x ∈ span R (↑T * ↑T')\n[PROOFSTEP]\nhave h' : (U : Set A) ⊆ T * T' := by assumption_mod_cast\n[GOAL]\nι : Sort uι\nR✝ : Type u\ninst✝⁶ : CommSemiring R✝\nA✝ : Type v\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\nS✝ T✝ : Set A✝\nM N P Q : Submodule R✝ A✝\nm n : A✝\nR : Type u_1\nA : Type u_2\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : Mul A\ninst✝ : Module R A\nS S' : Set A\nx : A\nhx : x ∈ span R (S * S')\nU : Finset A\nh✝ : ↑U ⊆ S * S'\nhU : x ∈ span R ↑U\nT T' : Finset A\nhS : ↑T ⊆ S\nhS' : ↑T' ⊆ S'\nh : U ⊆ T * T'\n⊢ ↑U ⊆ ↑T * ↑T'\n[PROOFSTEP]\nassumption_mod_cast\n[GOAL]\ncase right\nι : Sort uι\nR✝ : Type u\ninst✝⁶ : CommSemiring R✝\nA✝ : Type v\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\nS✝ T✝ : Set A✝\nM N P Q : Submodule R✝ A✝\nm n : A✝\nR : Type u_1\nA : Type u_2\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : Mul A\ninst✝ : Module R A\nS S' : Set A\nx : A\nhx : x ∈ span R (S * S')\nU : Finset A\nh✝ : ↑U ⊆ S * S'\nhU : x ∈ span R ↑U\nT T' : Finset A\nhS : ↑T ⊆ S\nhS' : ↑T' ⊆ S'\nh : U ⊆ T * T'\nh' : ↑U ⊆ ↑T * ↑T'\n⊢ x ∈ span R (↑T * ↑T')\n[PROOFSTEP]\nhave h'' := span_mono h' hU\n[GOAL]\ncase right\nι : Sort uι\nR✝ : Type u\ninst✝⁶ : CommSemiring R✝\nA✝ : Type v\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\nS✝ T✝ : Set A✝\nM N P Q : Submodule R✝ A✝\nm n : A✝\nR : Type u_1\nA : Type u_2\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : Mul A\ninst✝ : Module R A\nS S' : Set A\nx : A\nhx : x ∈ span R (S * S')\nU : Finset A\nh✝ : ↑U ⊆ S * S'\nhU : x ∈ span R ↑U\nT T' : Finset A\nhS : ↑T ⊆ S\nhS' : ↑T' ⊆ S'\nh : U ⊆ T * T'\nh' : ↑U ⊆ ↑T * ↑T'\nh'' : x ∈ span R (↑T * ↑T')\n⊢ x ∈ span R (↑T * ↑T')\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P✝ Q✝ : Submodule R A\nm n : A\nP Q : Submodule R A\nx : A\nhx : x ∈ P * Q\n⊢ x ∈ span R (↑P * ↑Q)\n[PROOFSTEP]\nrwa [← Submodule.span_eq P, ← Submodule.span_eq Q, Submodule.span_mul_span] at hx \n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n x y : A\n⊢ x ∈ span R {y} * P ↔ ∃ z, z ∈ P ∧ y * z = x\n[PROOFSTEP]\nsimp_rw [(· * ·), Mul.mul, map₂_span_singleton_eq_map]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n x y : A\n⊢ x ∈ map (↑(LinearMap.mul R A) y) P ↔ ∃ z, z ∈ P ∧ Mul.mul y z = x\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n x y : A\n⊢ x ∈ P * span R {y} ↔ ∃ z, z ∈ P ∧ z * y = x\n[PROOFSTEP]\nsimp_rw [(· * ·), Mul.mul, map₂_span_singleton_eq_map_flip]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n x y : A\n⊢ x ∈ map (↑(LinearMap.flip (LinearMap.mul R A)) y) P ↔ ∃ z, z ∈ P ∧ Mul.mul z y = x\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\nsrc✝² : Semigroup (Submodule R A) :=\n  Function.Injective.semigroup toAddSubmonoid (_ : Function.Injective toAddSubmonoid)\n    (_ : ∀ (m n : Submodule R A), (m * n).toAddSubmonoid = m.toAddSubmonoid * n.toAddSubmonoid)\nsrc✝¹ : AddMonoidWithOne (Submodule R A) := AddMonoidWithOne.unary\nsrc✝ : AddCommMonoid (Submodule R A) := pointwiseAddCommMonoid\n⊢ Lattice (Submodule R A)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\ns : Set A\n⊢ span R s ^ 0 = span R (s ^ 0)\n[PROOFSTEP]\nrw [pow_zero, pow_zero, one_eq_span_one_set]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\ns : Set A\nn : ℕ\n⊢ span R s ^ (n + 1) = span R (s ^ (n + 1))\n[PROOFSTEP]\nrw [pow_succ, pow_succ, span_pow s n, span_mul_span]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nn : ℕ\n⊢ M ^ n = span R (↑M ^ n)\n[PROOFSTEP]\nrw [← span_pow, span_eq]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nn : ℕ\nh : n ≠ 0\n⊢ (M ^ n).toAddSubmonoid = M.toAddSubmonoid ^ n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nn : ℕ\nh✝ : n ≠ 0\nh : Nat.zero ≠ 0\n⊢ (M ^ Nat.zero).toAddSubmonoid = M.toAddSubmonoid ^ Nat.zero\n[PROOFSTEP]\nexact (h rfl).elim\n[GOAL]\ncase succ\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝¹ : A\nn✝ : ℕ\nh✝ : n✝ ≠ 0\nn : ℕ\nih : n ≠ 0 → (M ^ n).toAddSubmonoid = M.toAddSubmonoid ^ n\nh : Nat.succ n ≠ 0\n⊢ (M ^ Nat.succ n).toAddSubmonoid = M.toAddSubmonoid ^ Nat.succ n\n[PROOFSTEP]\nrw [pow_succ, pow_succ, mul_toAddSubmonoid]\n[GOAL]\ncase succ\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝¹ : A\nn✝ : ℕ\nh✝ : n✝ ≠ 0\nn : ℕ\nih : n ≠ 0 → (M ^ n).toAddSubmonoid = M.toAddSubmonoid ^ n\nh : Nat.succ n ≠ 0\n⊢ M.toAddSubmonoid * (M ^ n).toAddSubmonoid = M.toAddSubmonoid * M.toAddSubmonoid ^ n\n[PROOFSTEP]\ncases n with\n| zero => rw [pow_zero, pow_zero, mul_one, ← mul_toAddSubmonoid, mul_one]\n| succ n => rw [ih n.succ_ne_zero]\n[GOAL]\ncase succ\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝¹ : A\nn✝ : ℕ\nh✝ : n✝ ≠ 0\nn : ℕ\nih : n ≠ 0 → (M ^ n).toAddSubmonoid = M.toAddSubmonoid ^ n\nh : Nat.succ n ≠ 0\n⊢ M.toAddSubmonoid * (M ^ n).toAddSubmonoid = M.toAddSubmonoid * M.toAddSubmonoid ^ n\n[PROOFSTEP]\ncases n with\n| zero => rw [pow_zero, pow_zero, mul_one, ← mul_toAddSubmonoid, mul_one]\n| succ n => rw [ih n.succ_ne_zero]\n[GOAL]\ncase succ.zero\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nn : ℕ\nh✝ : n ≠ 0\nih : Nat.zero ≠ 0 → (M ^ Nat.zero).toAddSubmonoid = M.toAddSubmonoid ^ Nat.zero\nh : Nat.succ Nat.zero ≠ 0\n⊢ M.toAddSubmonoid * (M ^ Nat.zero).toAddSubmonoid = M.toAddSubmonoid * M.toAddSubmonoid ^ Nat.zero\n[PROOFSTEP]\n\n| zero => rw [pow_zero, pow_zero, mul_one, ← mul_toAddSubmonoid, mul_one]\n[GOAL]\ncase succ.zero\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nn : ℕ\nh✝ : n ≠ 0\nih : Nat.zero ≠ 0 → (M ^ Nat.zero).toAddSubmonoid = M.toAddSubmonoid ^ Nat.zero\nh : Nat.succ Nat.zero ≠ 0\n⊢ M.toAddSubmonoid * (M ^ Nat.zero).toAddSubmonoid = M.toAddSubmonoid * M.toAddSubmonoid ^ Nat.zero\n[PROOFSTEP]\nrw [pow_zero, pow_zero, mul_one, ← mul_toAddSubmonoid, mul_one]\n[GOAL]\ncase succ.succ\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝¹ : A\nn✝ : ℕ\nh✝ : n✝ ≠ 0\nn : ℕ\nih : Nat.succ n ≠ 0 → (M ^ Nat.succ n).toAddSubmonoid = M.toAddSubmonoid ^ Nat.succ n\nh : Nat.succ (Nat.succ n) ≠ 0\n⊢ M.toAddSubmonoid * (M ^ Nat.succ n).toAddSubmonoid = M.toAddSubmonoid * M.toAddSubmonoid ^ Nat.succ n\n[PROOFSTEP]\n\n| succ n => rw [ih n.succ_ne_zero]\n[GOAL]\ncase succ.succ\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝¹ : A\nn✝ : ℕ\nh✝ : n✝ ≠ 0\nn : ℕ\nih : Nat.succ n ≠ 0 → (M ^ Nat.succ n).toAddSubmonoid = M.toAddSubmonoid ^ Nat.succ n\nh : Nat.succ (Nat.succ n) ≠ 0\n⊢ M.toAddSubmonoid * (M ^ Nat.succ n).toAddSubmonoid = M.toAddSubmonoid * M.toAddSubmonoid ^ Nat.succ n\n[PROOFSTEP]\nrw [ih n.succ_ne_zero]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nn : ℕ\n⊢ M.toAddSubmonoid ^ n ≤ (M ^ n).toAddSubmonoid\n[PROOFSTEP]\nobtain rfl | hn := Decidable.eq_or_ne n 0\n[GOAL]\ncase inl\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ M.toAddSubmonoid ^ 0 ≤ (M ^ 0).toAddSubmonoid\n[PROOFSTEP]\nrw [pow_zero, pow_zero]\n[GOAL]\ncase inl\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\n⊢ 1 ≤ 1.toAddSubmonoid\n[PROOFSTEP]\nexact le_one_toAddSubmonoid\n[GOAL]\ncase inr\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nn : ℕ\nhn : n ≠ 0\n⊢ M.toAddSubmonoid ^ n ≤ (M ^ n).toAddSubmonoid\n[PROOFSTEP]\nexact (pow_toAddSubmonoid M hn).ge\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (m : A) (hm : m ∈ M) (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → C (Nat.succ i) (m * x) (_ : m * x ∈ M * npowRec i M)\nn : ℕ\nx : A\nhx : x ∈ M ^ n\n⊢ C n x hx\n[PROOFSTEP]\ninduction' n with n n_ih generalizing x\n[GOAL]\ncase zero\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (m : A) (hm : m ∈ M) (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → C (Nat.succ i) (m * x) (_ : m * x ∈ M * npowRec i M)\nn : ℕ\nx✝ : A\nhx✝ : x✝ ∈ M ^ n\nx : A\nhx : x ∈ M ^ Nat.zero\n⊢ C Nat.zero x hx\n[PROOFSTEP]\nrw [pow_zero] at hx \n[GOAL]\ncase zero\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (m : A) (hm : m ∈ M) (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → C (Nat.succ i) (m * x) (_ : m * x ∈ M * npowRec i M)\nn : ℕ\nx✝ : A\nhx✝¹ : x✝ ∈ M ^ n\nx : A\nhx✝ : x ∈ M ^ Nat.zero\nhx : x ∈ 1\n⊢ C Nat.zero x hx✝\n[PROOFSTEP]\nobtain ⟨r, rfl⟩ := hx\n[GOAL]\ncase zero.intro\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (m : A) (hm : m ∈ M) (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → C (Nat.succ i) (m * x) (_ : m * x ∈ M * npowRec i M)\nn : ℕ\nx : A\nhx✝ : x ∈ M ^ n\nr : R\nhx : ↑(Algebra.linearMap R A) r ∈ M ^ Nat.zero\n⊢ C Nat.zero (↑(Algebra.linearMap R A) r) hx\n[PROOFSTEP]\nexact hr r\n[GOAL]\ncase succ\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝¹ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (m : A) (hm : m ∈ M) (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → C (Nat.succ i) (m * x) (_ : m * x ∈ M * npowRec i M)\nn✝ : ℕ\nx✝ : A\nhx✝ : x✝ ∈ M ^ n✝\nn : ℕ\nn_ih : ∀ {x : A} (hx : x ∈ M ^ n), C n x hx\nx : A\nhx : x ∈ M ^ Nat.succ n\n⊢ C (Nat.succ n) x hx\n[PROOFSTEP]\nexact\n  Submodule.mul_induction_on' (fun m hm x ih => hmul _ hm _ _ _ (n_ih ih)) (fun x hx y hy Cx Cy => hadd _ _ _ _ _ Cx Cy)\n    hx\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → ∀ (m : A) (hm : m ∈ M), C (Nat.succ i) (x * m) (_ : x * m ∈ M ^ (i + 1))\nn : ℕ\nx : A\nhx : x ∈ M ^ n\n⊢ C n x hx\n[PROOFSTEP]\ninduction' n with n n_ih generalizing x\n[GOAL]\ncase zero\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → ∀ (m : A) (hm : m ∈ M), C (Nat.succ i) (x * m) (_ : x * m ∈ M ^ (i + 1))\nn : ℕ\nx✝ : A\nhx✝ : x✝ ∈ M ^ n\nx : A\nhx : x ∈ M ^ Nat.zero\n⊢ C Nat.zero x hx\n[PROOFSTEP]\nrw [pow_zero] at hx \n[GOAL]\ncase zero\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → ∀ (m : A) (hm : m ∈ M), C (Nat.succ i) (x * m) (_ : x * m ∈ M ^ (i + 1))\nn : ℕ\nx✝ : A\nhx✝¹ : x✝ ∈ M ^ n\nx : A\nhx✝ : x ∈ M ^ Nat.zero\nhx : x ∈ 1\n⊢ C Nat.zero x hx✝\n[PROOFSTEP]\nobtain ⟨r, rfl⟩ := hx\n[GOAL]\ncase zero.intro\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → ∀ (m : A) (hm : m ∈ M), C (Nat.succ i) (x * m) (_ : x * m ∈ M ^ (i + 1))\nn : ℕ\nx : A\nhx✝ : x ∈ M ^ n\nr : R\nhx : ↑(Algebra.linearMap R A) r ∈ M ^ Nat.zero\n⊢ C Nat.zero (↑(Algebra.linearMap R A) r) hx\n[PROOFSTEP]\nexact hr r\n[GOAL]\ncase succ\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝¹ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → ∀ (m : A) (hm : m ∈ M), C (Nat.succ i) (x * m) (_ : x * m ∈ M ^ (i + 1))\nn✝ : ℕ\nx✝ : A\nhx✝ : x✝ ∈ M ^ n✝\nn : ℕ\nn_ih : ∀ {x : A} (hx : x ∈ M ^ n), C n x hx\nx : A\nhx : x ∈ M ^ Nat.succ n\n⊢ C (Nat.succ n) x hx\n[PROOFSTEP]\nrevert hx\n[GOAL]\ncase succ\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝¹ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → ∀ (m : A) (hm : m ∈ M), C (Nat.succ i) (x * m) (_ : x * m ∈ M ^ (i + 1))\nn✝ : ℕ\nx✝ : A\nhx : x✝ ∈ M ^ n✝\nn : ℕ\nn_ih : ∀ {x : A} (hx : x ∈ M ^ n), C n x hx\nx : A\n⊢ ∀ (hx : x ∈ M ^ Nat.succ n), C (Nat.succ n) x hx\n[PROOFSTEP]\nsuffices h_lean4_1926 : ∀ (hx' : x ∈ M ^ n * M), C (Nat.succ n) x (by rwa [pow_succ']) from fun hx =>\n  h_lean4_1926\n    (by rwa [← pow_succ'])\n      -- porting note: end workaround\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝¹ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → ∀ (m : A) (hm : m ∈ M), C (Nat.succ i) (x * m) (_ : x * m ∈ M ^ (i + 1))\nn✝ : ℕ\nx✝ : A\nhx : x✝ ∈ M ^ n✝\nn : ℕ\nn_ih : ∀ {x : A} (hx : x ∈ M ^ n), C n x hx\nx : A\nhx' : x ∈ M ^ n * M\n⊢ x ∈ M ^ Nat.succ n\n[PROOFSTEP]\nrwa [pow_succ']\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝¹ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → ∀ (m : A) (hm : m ∈ M), C (Nat.succ i) (x * m) (_ : x * m ∈ M ^ (i + 1))\nn✝ : ℕ\nx✝ : A\nhx✝ : x✝ ∈ M ^ n✝\nn : ℕ\nn_ih : ∀ {x : A} (hx : x ∈ M ^ n), C n x hx\nx : A\nh_lean4_1926 : ∀ (hx' : x ∈ M ^ n * M), C (Nat.succ n) x (_ : x ∈ M ^ Nat.succ n)\nhx : x ∈ M ^ Nat.succ n\n⊢ x ∈ M ^ n * M\n[PROOFSTEP]\nrwa [← pow_succ']\n[GOAL]\ncase succ\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝¹ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → ∀ (m : A) (hm : m ∈ M), C (Nat.succ i) (x * m) (_ : x * m ∈ M ^ (i + 1))\nn✝ : ℕ\nx✝ : A\nhx : x✝ ∈ M ^ n✝\nn : ℕ\nn_ih : ∀ {x : A} (hx : x ∈ M ^ n), C n x hx\nx : A\n⊢ ∀ (hx' : x ∈ M ^ n * M), C (Nat.succ n) x (_ : x ∈ M ^ Nat.succ n)\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase succ\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝¹ : A\nC : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop\nhr : ∀ (r : R), C 0 (↑(algebraMap R A) r) (_ : ↑(algebraMap R A) r ∈ 1)\nhadd : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) (_ : x + y ∈ M ^ i)\nhmul :\n  ∀ (i : ℕ) (x : A) (hx : x ∈ M ^ i),\n    C i x hx → ∀ (m : A) (hm : m ∈ M), C (Nat.succ i) (x * m) (_ : x * m ∈ M ^ (i + 1))\nn✝ : ℕ\nx✝ : A\nhx✝ : x✝ ∈ M ^ n✝\nn : ℕ\nn_ih : ∀ {x : A} (hx : x ∈ M ^ n), C n x hx\nx : A\nhx : x ∈ M ^ n * M\n⊢ C (Nat.succ n) x (_ : x ∈ M ^ Nat.succ n)\n[PROOFSTEP]\nexact\n  Submodule.mul_induction_on' (fun m hm x ih => hmul _ _ hm (n_ih _) _ ih) (fun x hx y hy Cx Cy => hadd _ _ _ _ _ Cx Cy)\n    hx\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\np q : Submodule R Aᵐᵒᵖ\n⊢ Equiv.toFun\n      { toFun := fun p => op (comap (↑(opLinearEquiv R)) p),\n        invFun := fun p => comap (↑(LinearEquiv.symm (opLinearEquiv R))) (unop p),\n        left_inv :=\n          (_ :\n            ∀ (p : Submodule R Aᵐᵒᵖ),\n              (fun p => comap (↑(LinearEquiv.symm (opLinearEquiv R))) (unop p))\n                  ((fun p => op (comap (↑(opLinearEquiv R)) p)) p) =\n                p),\n        right_inv :=\n          (_ :\n            ∀ (p : (Submodule R A)ᵐᵒᵖ),\n              (fun p => op (comap (↑(opLinearEquiv R)) p))\n                  ((fun p => comap (↑(LinearEquiv.symm (opLinearEquiv R))) (unop p)) p) =\n                p) }\n      (p + q) =\n    Equiv.toFun\n        { toFun := fun p => op (comap (↑(opLinearEquiv R)) p),\n          invFun := fun p => comap (↑(LinearEquiv.symm (opLinearEquiv R))) (unop p),\n          left_inv :=\n            (_ :\n              ∀ (p : Submodule R Aᵐᵒᵖ),\n                (fun p => comap (↑(LinearEquiv.symm (opLinearEquiv R))) (unop p))\n                    ((fun p => op (comap (↑(opLinearEquiv R)) p)) p) =\n                  p),\n          right_inv :=\n            (_ :\n              ∀ (p : (Submodule R A)ᵐᵒᵖ),\n                (fun p => op (comap (↑(opLinearEquiv R)) p))\n                    ((fun p => comap (↑(LinearEquiv.symm (opLinearEquiv R))) (unop p)) p) =\n                  p) }\n        p +\n      Equiv.toFun\n        { toFun := fun p => op (comap (↑(opLinearEquiv R)) p),\n          invFun := fun p => comap (↑(LinearEquiv.symm (opLinearEquiv R))) (unop p),\n          left_inv :=\n            (_ :\n              ∀ (p : Submodule R Aᵐᵒᵖ),\n                (fun p => comap (↑(LinearEquiv.symm (opLinearEquiv R))) (unop p))\n                    ((fun p => op (comap (↑(opLinearEquiv R)) p)) p) =\n                  p),\n          right_inv :=\n            (_ :\n              ∀ (p : (Submodule R A)ᵐᵒᵖ),\n                (fun p => op (comap (↑(opLinearEquiv R)) p))\n                    ((fun p => comap (↑(LinearEquiv.symm (opLinearEquiv R))) (unop p)) p) =\n                  p) }\n        q\n[PROOFSTEP]\nsimp [comap_equiv_eq_map_symm, ← op_add]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n✝ : A\nn : ℕ\n⊢ map (↑(opLinearEquiv R)) (M ^ n) = map (↑(opLinearEquiv R)) M ^ n\n[PROOFSTEP]\nrw [map_equiv_eq_comap_symm, map_equiv_eq_comap_symm, comap_unop_pow]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM✝ N P Q : Submodule R A\nm n✝ : A\nn : ℕ\nM : Submodule R Aᵐᵒᵖ\n⊢ map (↑(LinearEquiv.symm (opLinearEquiv R))) (M ^ n) = map (↑(LinearEquiv.symm (opLinearEquiv R))) M ^ n\n[PROOFSTEP]\nrw [← comap_equiv_eq_map_symm, ← comap_equiv_eq_map_symm, comap_op_pow]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\ns t : SetSemiring A\n⊢ OneHom.toFun { toFun := fun s => span R (↑SetSemiring.down s), map_one' := (_ : span R {1} = 1) } (s * t) =\n    OneHom.toFun { toFun := fun s => span R (↑SetSemiring.down s), map_one' := (_ : span R {1} = 1) } s *\n      OneHom.toFun { toFun := fun s => span R (↑SetSemiring.down s), map_one' := (_ : span R {1} = 1) } t\n[PROOFSTEP]\ndsimp only\n  -- porting note: new, needed due to new-style structures\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nS T : Set A\nM N P Q : Submodule R A\nm n : A\ns t : SetSemiring A\n⊢ span R (↑SetSemiring.down (s * t)) = span R (↑SetSemiring.down s) * span R (↑SetSemiring.down t)\n[PROOFSTEP]\nrw [SetSemiring.down_mul, span_mul_span, ← image_mul_prod]\n[GOAL]\nι✝ : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n : A\nι : Type u_1\ns : Finset ι\nM : ι → Set A\n⊢ ∏ i in s, span R (M i) = span R (∏ i in s, M i)\n[PROOFSTEP]\nletI := Classical.decEq ι\n[GOAL]\nι✝ : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n : A\nι : Type u_1\ns : Finset ι\nM : ι → Set A\nthis : DecidableEq ι := Classical.decEq ι\n⊢ ∏ i in s, span R (M i) = span R (∏ i in s, M i)\n[PROOFSTEP]\nrefine' Finset.induction_on s _ _\n[GOAL]\ncase refine'_1\nι✝ : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n : A\nι : Type u_1\ns : Finset ι\nM : ι → Set A\nthis : DecidableEq ι := Classical.decEq ι\n⊢ ∏ i in ∅, span R (M i) = span R (∏ i in ∅, M i)\n[PROOFSTEP]\nsimp [one_eq_span, Set.singleton_one]\n[GOAL]\ncase refine'_2\nι✝ : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n : A\nι : Type u_1\ns : Finset ι\nM : ι → Set A\nthis : DecidableEq ι := Classical.decEq ι\n⊢ ∀ ⦃a : ι⦄ {s : Finset ι},\n    ¬a ∈ s →\n      ∏ i in s, span R (M i) = span R (∏ i in s, M i) →\n        ∏ i in insert a s, span R (M i) = span R (∏ i in insert a s, M i)\n[PROOFSTEP]\nintro _ _ H ih\n[GOAL]\ncase refine'_2\nι✝ : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n : A\nι : Type u_1\ns : Finset ι\nM : ι → Set A\nthis : DecidableEq ι := Classical.decEq ι\na✝ : ι\ns✝ : Finset ι\nH : ¬a✝ ∈ s✝\nih : ∏ i in s✝, span R (M i) = span R (∏ i in s✝, M i)\n⊢ ∏ i in insert a✝ s✝, span R (M i) = span R (∏ i in insert a✝ s✝, M i)\n[PROOFSTEP]\nrw [Finset.prod_insert H, Finset.prod_insert H, ih, span_mul_span]\n[GOAL]\nι✝ : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nι : Type u_1\ns : Finset ι\nx : ι → A\n⊢ ∏ i in s, span R {x i} = span R {∏ i in s, x i}\n[PROOFSTEP]\nrw [prod_span, Set.finset_prod_singleton]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nP : Submodule R A\n⊢ 1 • P = P\n[PROOFSTEP]\nsimp_rw [HSMul.hSMul, SetSemiring.down_one, ← one_eq_span_one_set, one_mul]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\ns t : SetSemiring A\nP : Submodule R A\n⊢ (s * t) • P = s • t • P\n[PROOFSTEP]\nsimp_rw [HSMul.hSMul, SetSemiring.down_mul, ← mul_assoc, span_mul_span]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\ns t : SetSemiring A\nP : Submodule R A\n⊢ (s + t) • P = s • P + t • P\n[PROOFSTEP]\nsimp_rw [HSMul.hSMul, SetSemiring.down_add, span_union, sup_mul, add_eq_sup]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nP : Submodule R A\n⊢ 0 • P = 0\n[PROOFSTEP]\nsimp_rw [HSMul.hSMul, SetSemiring.down_zero, span_empty, bot_mul, bot_eq_zero]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n a : A\nM : Submodule R A\n⊢ ↑Set.up {a} • M = map (LinearMap.mulLeft R a) M\n[PROOFSTEP]\nconv_lhs => rw [← span_eq M]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n a : A\nM : Submodule R A\n| ↑Set.up {a} • M\n[PROOFSTEP]\nrw [← span_eq M]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n a : A\nM : Submodule R A\n| ↑Set.up {a} • M\n[PROOFSTEP]\nrw [← span_eq M]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n a : A\nM : Submodule R A\n| ↑Set.up {a} • M\n[PROOFSTEP]\nrw [← span_eq M]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n a : A\nM : Submodule R A\n⊢ ↑Set.up {a} • span R ↑M = map (LinearMap.mulLeft R a) M\n[PROOFSTEP]\nchange span _ _ * span _ _ = _\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n a : A\nM : Submodule R A\n⊢ span R (↑SetSemiring.down (↑Set.up {a})) * span R ↑M = map (LinearMap.mulLeft R a) M\n[PROOFSTEP]\nrw [span_mul_span]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n a : A\nM : Submodule R A\n⊢ span R (↑SetSemiring.down (↑Set.up {a}) * ↑M) = map (LinearMap.mulLeft R a) M\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n a : A\nM : Submodule R A\n⊢ span R (↑SetSemiring.down (↑Set.up {a}) * ↑M) ≤ map (LinearMap.mulLeft R a) M\n[PROOFSTEP]\nrw [span_le]\n[GOAL]\ncase a\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n a : A\nM : Submodule R A\n⊢ ↑SetSemiring.down (↑Set.up {a}) * ↑M ⊆ ↑(map (LinearMap.mulLeft R a) M)\n[PROOFSTEP]\nrintro _ ⟨b, m, hb, hm, rfl⟩\n[GOAL]\ncase a.intro.intro.intro.intro\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm✝ n a : A\nM : Submodule R A\nb m : A\nhb : b ∈ ↑SetSemiring.down (↑Set.up {a})\nhm : m ∈ ↑M\n⊢ (fun x x_1 => x * x_1) b m ∈ ↑(map (LinearMap.mulLeft R a) M)\n[PROOFSTEP]\nrw [SetLike.mem_coe, mem_map, Set.mem_singleton_iff.mp hb]\n[GOAL]\ncase a.intro.intro.intro.intro\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm✝ n a : A\nM : Submodule R A\nb m : A\nhb : b ∈ ↑SetSemiring.down (↑Set.up {a})\nhm : m ∈ ↑M\n⊢ ∃ y, y ∈ M ∧ ↑(LinearMap.mulLeft R a) y = (fun x x_1 => x * x_1) a m\n[PROOFSTEP]\nexact ⟨m, hm, rfl⟩\n[GOAL]\ncase a\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm n a : A\nM : Submodule R A\n⊢ map (LinearMap.mulLeft R a) M ≤ span R (↑SetSemiring.down (↑Set.up {a}) * ↑M)\n[PROOFSTEP]\nrintro _ ⟨m, hm, rfl⟩\n[GOAL]\ncase a.intro.intro\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM✝ N : Submodule R A\nm✝ n a : A\nM : Submodule R A\nm : A\nhm : m ∈ ↑M\n⊢ ↑(LinearMap.mulLeft R a) m ∈ span R (↑SetSemiring.down (↑Set.up {a}) * ↑M)\n[PROOFSTEP]\nexact subset_span ⟨a, m, Set.mem_singleton a, hm, rfl⟩\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI J : Submodule R A\na✝ b✝ : A\nha : a✝ ∈ {x | ∀ (y : A), y ∈ J → x * y ∈ I}\nhb : b✝ ∈ {x | ∀ (y : A), y ∈ J → x * y ∈ I}\ny : A\nhy : y ∈ J\n⊢ (a✝ + b✝) * y ∈ I\n[PROOFSTEP]\nrw [add_mul]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI J : Submodule R A\na✝ b✝ : A\nha : a✝ ∈ {x | ∀ (y : A), y ∈ J → x * y ∈ I}\nhb : b✝ ∈ {x | ∀ (y : A), y ∈ J → x * y ∈ I}\ny : A\nhy : y ∈ J\n⊢ a✝ * y + b✝ * y ∈ I\n[PROOFSTEP]\nexact Submodule.add_mem _ (ha _ hy) (hb _ hy)\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI J : Submodule R A\ny : A\nx✝ : y ∈ J\n⊢ 0 * y ∈ I\n[PROOFSTEP]\nrw [zero_mul]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI J : Submodule R A\ny : A\nx✝ : y ∈ J\n⊢ 0 ∈ I\n[PROOFSTEP]\napply Submodule.zero_mem\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI J : Submodule R A\nr : R\nx : A\nhx :\n  x ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {x | ∀ (y : A), y ∈ J → x * y ∈ I},\n              add_mem' :=\n                (_ :\n                  ∀ {a b : A},\n                    a ∈ {x | ∀ (y : A), y ∈ J → x * y ∈ I} →\n                      b ∈ {x | ∀ (y : A), y ∈ J → x * y ∈ I} → ∀ (y : A), y ∈ J → (a + b) * y ∈ I) },\n          zero_mem' := (_ : ∀ (y : A), y ∈ J → 0 * y ∈ I) }.toAddSubsemigroup.carrier\ny : A\nhy : y ∈ J\n⊢ r • x * y ∈ I\n[PROOFSTEP]\nrw [Algebra.smul_mul_assoc]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI J : Submodule R A\nr : R\nx : A\nhx :\n  x ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {x | ∀ (y : A), y ∈ J → x * y ∈ I},\n              add_mem' :=\n                (_ :\n                  ∀ {a b : A},\n                    a ∈ {x | ∀ (y : A), y ∈ J → x * y ∈ I} →\n                      b ∈ {x | ∀ (y : A), y ∈ J → x * y ∈ I} → ∀ (y : A), y ∈ J → (a + b) * y ∈ I) },\n          zero_mem' := (_ : ∀ (y : A), y ∈ J → 0 * y ∈ I) }.toAddSubsemigroup.carrier\ny : A\nhy : y ∈ J\n⊢ r • (x * y) ∈ I\n[PROOFSTEP]\nexact Submodule.smul_mem _ _ (hx _ hy)\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n x : A\nI J : Submodule R A\nh : x ∈ I / J\ny : A\nx✝ : y ∈ x • ↑J\ny' : A\nhy' : y' ∈ ↑J\nxy'_eq_y : (fun x_1 => x • x_1) y' = y\n⊢ y ∈ ↑I\n[PROOFSTEP]\nrw [← xy'_eq_y]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n x : A\nI J : Submodule R A\nh : x ∈ I / J\ny : A\nx✝ : y ∈ x • ↑J\ny' : A\nhy' : y' ∈ ↑J\nxy'_eq_y : (fun x_1 => x • x_1) y' = y\n⊢ (fun x_1 => x • x_1) y' ∈ ↑I\n[PROOFSTEP]\napply h\n[GOAL]\ncase a\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n x : A\nI J : Submodule R A\nh : x ∈ I / J\ny : A\nx✝ : y ∈ x • ↑J\ny' : A\nhy' : y' ∈ ↑J\nxy'_eq_y : (fun x_1 => x • x_1) y' = y\n⊢ y' ∈ J\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI J K : Submodule R A\n⊢ I ≤ J / K ↔ I * K ≤ J\n[PROOFSTEP]\nrw [le_div_iff, mul_le]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI : Submodule R A\n⊢ 1 ≤ 1 / I ↔ I ≤ 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI : Submodule R A\n⊢ 1 ≤ 1 / I → I ≤ 1\ncase mpr\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI : Submodule R A\n⊢ I ≤ 1 → 1 ≤ 1 / I\n[PROOFSTEP]\nall_goals intro hI\n[GOAL]\ncase mp\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI : Submodule R A\n⊢ 1 ≤ 1 / I → I ≤ 1\n[PROOFSTEP]\nintro hI\n[GOAL]\ncase mpr\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI : Submodule R A\n⊢ I ≤ 1 → 1 ≤ 1 / I\n[PROOFSTEP]\nintro hI\n[GOAL]\ncase mp\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI : Submodule R A\nhI : 1 ≤ 1 / I\n⊢ I ≤ 1\n[PROOFSTEP]\nrwa [le_div_iff_mul_le, one_mul] at hI \n[GOAL]\ncase mpr\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI : Submodule R A\nhI : I ≤ 1\n⊢ 1 ≤ 1 / I\n[PROOFSTEP]\nrwa [le_div_iff_mul_le, one_mul]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI : Submodule R A\nhI : I ≤ 1\n⊢ I ≤ I * (1 / I)\n[PROOFSTEP]\nrefine\n  (mul_one I).symm.trans_le\n    ?_\n      -- porting note: drop `rw {occs := _}` in favor of `refine`\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI : Submodule R A\nhI : I ≤ 1\n⊢ I * 1 ≤ I * (1 / I)\n[PROOFSTEP]\napply mul_le_mul_right (one_le_one_div.mpr hI)\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI : Submodule R A\n⊢ I * (1 / I) ≤ 1\n[PROOFSTEP]\nrw [Submodule.mul_le]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm n : A\nI : Submodule R A\n⊢ ∀ (m : A), m ∈ I → ∀ (n : A), n ∈ 1 / I → m * n ∈ 1\n[PROOFSTEP]\nintro m hm n hn\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm✝ n✝ : A\nI : Submodule R A\nm : A\nhm : m ∈ I\nn : A\nhn : n ∈ 1 / I\n⊢ m * n ∈ 1\n[PROOFSTEP]\nrw [Submodule.mem_div_iff_forall_mul_mem] at hn \n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm✝ n✝ : A\nI : Submodule R A\nm : A\nhm : m ∈ I\nn : A\nhn : ∀ (y : A), y ∈ I → n * y ∈ 1\n⊢ m * n ∈ 1\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝² : CommSemiring R\nA : Type v\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nM N : Submodule R A\nm✝ n✝ : A\nI : Submodule R A\nm : A\nhm : m ∈ I\nn : A\nhn : ∀ (y : A), y ∈ I → n * y ∈ 1\n⊢ n * m ∈ 1\n[PROOFSTEP]\nexact hn m hm\n[GOAL]\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\nM N : Submodule R A\nm n : A\nB : Type u_1\ninst✝¹ : CommSemiring B\ninst✝ : Algebra R B\nI J : Submodule R A\nh : A ≃ₐ[R] B\n⊢ map (AlgEquiv.toLinearMap h) (I / J) = map (AlgEquiv.toLinearMap h) I / map (AlgEquiv.toLinearMap h) J\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\nM N : Submodule R A\nm n : A\nB : Type u_1\ninst✝¹ : CommSemiring B\ninst✝ : Algebra R B\nI J : Submodule R A\nh : A ≃ₐ[R] B\nx : B\n⊢ x ∈ map (AlgEquiv.toLinearMap h) (I / J) ↔ x ∈ map (AlgEquiv.toLinearMap h) I / map (AlgEquiv.toLinearMap h) J\n[PROOFSTEP]\nsimp only [mem_map, mem_div_iff_forall_mul_mem]\n[GOAL]\ncase h\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\nM N : Submodule R A\nm n : A\nB : Type u_1\ninst✝¹ : CommSemiring B\ninst✝ : Algebra R B\nI J : Submodule R A\nh : A ≃ₐ[R] B\nx : B\n⊢ (∃ y, (∀ (y_1 : A), y_1 ∈ J → y * y_1 ∈ I) ∧ ↑(AlgEquiv.toLinearMap h) y = x) ↔\n    ∀ (y : B),\n      (∃ y_1, y_1 ∈ J ∧ ↑(AlgEquiv.toLinearMap h) y_1 = y) → ∃ y_1, y_1 ∈ I ∧ ↑(AlgEquiv.toLinearMap h) y_1 = x * y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\nM N : Submodule R A\nm n : A\nB : Type u_1\ninst✝¹ : CommSemiring B\ninst✝ : Algebra R B\nI J : Submodule R A\nh : A ≃ₐ[R] B\nx : B\n⊢ (∃ y, (∀ (y_1 : A), y_1 ∈ J → y * y_1 ∈ I) ∧ ↑(AlgEquiv.toLinearMap h) y = x) →\n    ∀ (y : B),\n      (∃ y_1, y_1 ∈ J ∧ ↑(AlgEquiv.toLinearMap h) y_1 = y) → ∃ y_1, y_1 ∈ I ∧ ↑(AlgEquiv.toLinearMap h) y_1 = x * y\n[PROOFSTEP]\nrintro ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\nM N : Submodule R A\nm n : A\nB : Type u_1\ninst✝¹ : CommSemiring B\ninst✝ : Algebra R B\nI J : Submodule R A\nh : A ≃ₐ[R] B\nx : A\nhx : ∀ (y : A), y ∈ J → x * y ∈ I\ny : A\nhy : y ∈ J\n⊢ ∃ y_1, y_1 ∈ I ∧ ↑(AlgEquiv.toLinearMap h) y_1 = ↑(AlgEquiv.toLinearMap h) x * ↑(AlgEquiv.toLinearMap h) y\n[PROOFSTEP]\nexact ⟨x * y, hx _ hy, h.map_mul x y⟩\n[GOAL]\ncase h.mpr\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\nM N : Submodule R A\nm n : A\nB : Type u_1\ninst✝¹ : CommSemiring B\ninst✝ : Algebra R B\nI J : Submodule R A\nh : A ≃ₐ[R] B\nx : B\n⊢ (∀ (y : B),\n      (∃ y_1, y_1 ∈ J ∧ ↑(AlgEquiv.toLinearMap h) y_1 = y) → ∃ y_1, y_1 ∈ I ∧ ↑(AlgEquiv.toLinearMap h) y_1 = x * y) →\n    ∃ y, (∀ (y_1 : A), y_1 ∈ J → y * y_1 ∈ I) ∧ ↑(AlgEquiv.toLinearMap h) y = x\n[PROOFSTEP]\nrintro hx\n[GOAL]\ncase h.mpr\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\nM N : Submodule R A\nm n : A\nB : Type u_1\ninst✝¹ : CommSemiring B\ninst✝ : Algebra R B\nI J : Submodule R A\nh : A ≃ₐ[R] B\nx : B\nhx :\n  ∀ (y : B),\n    (∃ y_1, y_1 ∈ J ∧ ↑(AlgEquiv.toLinearMap h) y_1 = y) → ∃ y_1, y_1 ∈ I ∧ ↑(AlgEquiv.toLinearMap h) y_1 = x * y\n⊢ ∃ y, (∀ (y_1 : A), y_1 ∈ J → y * y_1 ∈ I) ∧ ↑(AlgEquiv.toLinearMap h) y = x\n[PROOFSTEP]\nrefine' ⟨h.symm x, fun z hz => _, h.apply_symm_apply x⟩\n[GOAL]\ncase h.mpr\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\nM N : Submodule R A\nm n : A\nB : Type u_1\ninst✝¹ : CommSemiring B\ninst✝ : Algebra R B\nI J : Submodule R A\nh : A ≃ₐ[R] B\nx : B\nhx :\n  ∀ (y : B),\n    (∃ y_1, y_1 ∈ J ∧ ↑(AlgEquiv.toLinearMap h) y_1 = y) → ∃ y_1, y_1 ∈ I ∧ ↑(AlgEquiv.toLinearMap h) y_1 = x * y\nz : A\nhz : z ∈ J\n⊢ ↑(AlgEquiv.symm h) x * z ∈ I\n[PROOFSTEP]\nobtain ⟨xz, xz_mem, hxz⟩ := hx (h z) ⟨z, hz, rfl⟩\n[GOAL]\ncase h.mpr.intro.intro\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\nM N : Submodule R A\nm n : A\nB : Type u_1\ninst✝¹ : CommSemiring B\ninst✝ : Algebra R B\nI J : Submodule R A\nh : A ≃ₐ[R] B\nx : B\nhx :\n  ∀ (y : B),\n    (∃ y_1, y_1 ∈ J ∧ ↑(AlgEquiv.toLinearMap h) y_1 = y) → ∃ y_1, y_1 ∈ I ∧ ↑(AlgEquiv.toLinearMap h) y_1 = x * y\nz : A\nhz : z ∈ J\nxz : A\nxz_mem : xz ∈ I\nhxz : ↑(AlgEquiv.toLinearMap h) xz = x * ↑h z\n⊢ ↑(AlgEquiv.symm h) x * z ∈ I\n[PROOFSTEP]\nconvert xz_mem\n[GOAL]\ncase h.e'_4\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\nM N : Submodule R A\nm n : A\nB : Type u_1\ninst✝¹ : CommSemiring B\ninst✝ : Algebra R B\nI J : Submodule R A\nh : A ≃ₐ[R] B\nx : B\nhx :\n  ∀ (y : B),\n    (∃ y_1, y_1 ∈ J ∧ ↑(AlgEquiv.toLinearMap h) y_1 = y) → ∃ y_1, y_1 ∈ I ∧ ↑(AlgEquiv.toLinearMap h) y_1 = x * y\nz : A\nhz : z ∈ J\nxz : A\nxz_mem : xz ∈ I\nhxz : ↑(AlgEquiv.toLinearMap h) xz = x * ↑h z\n⊢ ↑(AlgEquiv.symm h) x * z = xz\n[PROOFSTEP]\napply h.injective\n[GOAL]\ncase h.e'_4.a\nι : Sort uι\nR : Type u\ninst✝⁴ : CommSemiring R\nA : Type v\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\nM N : Submodule R A\nm n : A\nB : Type u_1\ninst✝¹ : CommSemiring B\ninst✝ : Algebra R B\nI J : Submodule R A\nh : A ≃ₐ[R] B\nx : B\nhx :\n  ∀ (y : B),\n    (∃ y_1, y_1 ∈ J ∧ ↑(AlgEquiv.toLinearMap h) y_1 = y) → ∃ y_1, y_1 ∈ I ∧ ↑(AlgEquiv.toLinearMap h) y_1 = x * y\nz : A\nhz : z ∈ J\nxz : A\nxz_mem : xz ∈ I\nhxz : ↑(AlgEquiv.toLinearMap h) xz = x * ↑h z\n⊢ ↑h (↑(AlgEquiv.symm h) x * z) = ↑h xz\n[PROOFSTEP]\nerw [h.map_mul, h.apply_symm_apply, hxz]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Algebra.Operations", "llama_tokens": 33937, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6334102498375401, "lm_q2_score": 0.6261241772283034, "lm_q1q2_score": 0.3965934715275039}}
{"text": "[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Module R A\nh₁ : ∀ (r : R) (x : A), r • 1 * x = r • x\nh₂ : ∀ (r : R) (x : A), x * r • 1 = r • x\nr₁ r₂ : R\n⊢ OneHom.toFun { toFun := fun r => r • 1, map_one' := (_ : 1 • 1 = 1) } (r₁ * r₂) =\n    OneHom.toFun { toFun := fun r => r • 1, map_one' := (_ : 1 • 1 = 1) } r₁ *\n      OneHom.toFun { toFun := fun r => r • 1, map_one' := (_ : 1 • 1 = 1) } r₂\n[PROOFSTEP]\nsimp only [h₁, mul_smul]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Module R A\nh₁ : ∀ (r : R) (x : A), r • 1 * x = r • x\nh₂ : ∀ (r : R) (x : A), x * r • 1 = r • x\nr : R\nx : (fun x => A) r\n⊢ ↑{\n            toMonoidHom :=\n              { toOneHom := { toFun := fun r => r • 1, map_one' := (_ : 1 • 1 = 1) },\n                map_mul' := (_ : ∀ (r₁ r₂ : R), (r₁ * r₂) • 1 = r₁ • 1 * r₂ • 1) },\n            map_zero' := (_ : 0 • 1 = 0), map_add' := (_ : ∀ (r₁ r₂ : R), (r₁ + r₂) • 1 = r₁ • 1 + r₂ • 1) }\n        r *\n      x =\n    x *\n      ↑{\n            toMonoidHom :=\n              { toOneHom := { toFun := fun r => r • 1, map_one' := (_ : 1 • 1 = 1) },\n                map_mul' := (_ : ∀ (r₁ r₂ : R), (r₁ * r₂) • 1 = r₁ • 1 * r₂ • 1) },\n            map_zero' := (_ : 0 • 1 = 0), map_add' := (_ : ∀ (r₁ r₂ : R), (r₁ + r₂) • 1 = r₁ • 1 + r₂ • 1) }\n        r\n[PROOFSTEP]\nsimp [h₁, h₂]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Module R A\nh₁ : ∀ (r : R) (x : A), r • 1 * x = r • x\nh₂ : ∀ (r : R) (x : A), x * r • 1 = r • x\nr : R\nx : (fun x => A) r\n⊢ r • x =\n    ↑{\n            toMonoidHom :=\n              { toOneHom := { toFun := fun r => r • 1, map_one' := (_ : 1 • 1 = 1) },\n                map_mul' := (_ : ∀ (r₁ r₂ : R), (r₁ * r₂) • 1 = r₁ • 1 * r₂ • 1) },\n            map_zero' := (_ : 0 • 1 = 0), map_add' := (_ : ∀ (r₁ r₂ : R), (r₁ + r₂) • 1 = r₁ • 1 + r₂ • 1) }\n        r *\n      x\n[PROOFSTEP]\nsimp [h₁]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Module R A\nh₁ : ∀ (r : R) (x y : A), r • x * y = r • (x * y)\nh₂ : ∀ (r : R) (x y : A), x * r • y = r • (x * y)\nr : R\nx : A\n⊢ r • 1 * x = r • x\n[PROOFSTEP]\nrw [h₁, one_mul]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Module R A\nh₁ : ∀ (r : R) (x y : A), r • x * y = r • (x * y)\nh₂ : ∀ (r : R) (x y : A), x * r • y = r • (x * y)\nr : R\nx : A\n⊢ x * r • 1 = r • x\n[PROOFSTEP]\nrw [h₂, mul_one]\n[GOAL]\nR✝ : Type u\nS : Type v\nA✝ : Type w\nB : Type u_1\ninst✝⁷ : CommSemiring R✝\ninst✝⁶ : CommSemiring S\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\ninst✝³ : Semiring B\ninst✝² : Algebra R✝ B\nR : Type u_2\ninst✝¹ : CommSemiring R\nA : Type u_3\ninst✝ : Semiring A\nP Q : Algebra R A\nh : ∀ (r : R), ↑(algebraMap R A) r = ↑(algebraMap R A) r\n⊢ P = Q\n[PROOFSTEP]\nreplace h : P.toRingHom = Q.toRingHom := FunLike.ext _ _ h\n[GOAL]\nR✝ : Type u\nS : Type v\nA✝ : Type w\nB : Type u_1\ninst✝⁷ : CommSemiring R✝\ninst✝⁶ : CommSemiring S\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\ninst✝³ : Semiring B\ninst✝² : Algebra R✝ B\nR : Type u_2\ninst✝¹ : CommSemiring R\nA : Type u_3\ninst✝ : Semiring A\nP Q : Algebra R A\nh : toRingHom = toRingHom\n⊢ P = Q\n[PROOFSTEP]\nhave h' :\n  (haveI := P;\n      (· • ·) :\n      R → A → A) =\n    (haveI := Q;\n      (· • ·) :\n      R → A → A) :=\n  by\n  funext r a\n  rw [P.smul_def', Q.smul_def', h]\n[GOAL]\nR✝ : Type u\nS : Type v\nA✝ : Type w\nB : Type u_1\ninst✝⁷ : CommSemiring R✝\ninst✝⁶ : CommSemiring S\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\ninst✝³ : Semiring B\ninst✝² : Algebra R✝ B\nR : Type u_2\ninst✝¹ : CommSemiring R\nA : Type u_3\ninst✝ : Semiring A\nP Q : Algebra R A\nh : toRingHom = toRingHom\n⊢ (fun x x_1 => x • x_1) = fun x x_1 => x • x_1\n[PROOFSTEP]\nfunext r a\n[GOAL]\ncase h.h\nR✝ : Type u\nS : Type v\nA✝ : Type w\nB : Type u_1\ninst✝⁷ : CommSemiring R✝\ninst✝⁶ : CommSemiring S\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\ninst✝³ : Semiring B\ninst✝² : Algebra R✝ B\nR : Type u_2\ninst✝¹ : CommSemiring R\nA : Type u_3\ninst✝ : Semiring A\nP Q : Algebra R A\nh : toRingHom = toRingHom\nr : R\na : A\n⊢ r • a = r • a\n[PROOFSTEP]\nrw [P.smul_def', Q.smul_def', h]\n[GOAL]\nR✝ : Type u\nS : Type v\nA✝ : Type w\nB : Type u_1\ninst✝⁷ : CommSemiring R✝\ninst✝⁶ : CommSemiring S\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\ninst✝³ : Semiring B\ninst✝² : Algebra R✝ B\nR : Type u_2\ninst✝¹ : CommSemiring R\nA : Type u_3\ninst✝ : Semiring A\nP Q : Algebra R A\nh : toRingHom = toRingHom\nh' : (fun x x_1 => x • x_1) = fun x x_1 => x • x_1\n⊢ P = Q\n[PROOFSTEP]\nrcases P with @⟨⟨P⟩⟩\n[GOAL]\ncase mk.mk\nR✝ : Type u\nS : Type v\nA✝ : Type w\nB : Type u_1\ninst✝⁷ : CommSemiring R✝\ninst✝⁶ : CommSemiring S\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\ninst✝³ : Semiring B\ninst✝² : Algebra R✝ B\nR : Type u_2\ninst✝¹ : CommSemiring R\nA : Type u_3\ninst✝ : Semiring A\nQ : Algebra R A\ntoRingHom✝ : R →+* A\ncommutes'✝ : ∀ (r : R) (x : (fun x => A) r), ↑toRingHom✝ r * x = x * ↑toRingHom✝ r\nP : R → A → A\nsmul_def'✝ : ∀ (r : R) (x : (fun x => A) r), r • x = ↑toRingHom✝ r * x\nh : toRingHom = toRingHom\nh' : (fun x x_1 => x • x_1) = fun x x_1 => x • x_1\n⊢ mk toRingHom✝ commutes'✝ smul_def'✝ = Q\n[PROOFSTEP]\nrcases Q with @⟨⟨Q⟩⟩\n[GOAL]\ncase mk.mk.mk.mk\nR✝ : Type u\nS : Type v\nA✝ : Type w\nB : Type u_1\ninst✝⁷ : CommSemiring R✝\ninst✝⁶ : CommSemiring S\ninst✝⁵ : Semiring A✝\ninst✝⁴ : Algebra R✝ A✝\ninst✝³ : Semiring B\ninst✝² : Algebra R✝ B\nR : Type u_2\ninst✝¹ : CommSemiring R\nA : Type u_3\ninst✝ : Semiring A\ntoRingHom✝¹ : R →+* A\ncommutes'✝¹ : ∀ (r : R) (x : (fun x => A) r), ↑toRingHom✝¹ r * x = x * ↑toRingHom✝¹ r\nP : R → A → A\nsmul_def'✝¹ : ∀ (r : R) (x : (fun x => A) r), r • x = ↑toRingHom✝¹ r * x\ntoRingHom✝ : R →+* A\ncommutes'✝ : ∀ (r : R) (x : (fun x => A) r), ↑toRingHom✝ r * x = x * ↑toRingHom✝ r\nQ : R → A → A\nsmul_def'✝ : ∀ (r : R) (x : (fun x => A) r), r • x = ↑toRingHom✝ r * x\nh : toRingHom = toRingHom\nh' : (fun x x_1 => x • x_1) = fun x x_1 => x • x_1\n⊢ mk toRingHom✝¹ commutes'✝¹ smul_def'✝¹ = mk toRingHom✝ commutes'✝ smul_def'✝\n[PROOFSTEP]\ncongr\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nx✝ : A\n⊢ 1 • x✝ = x✝\n[PROOFSTEP]\nsimp [smul_def']\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\n⊢ ∀ (x y : R) (b : A), (x * y) • b = x • y • b\n[PROOFSTEP]\nsimp [smul_def', mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\n⊢ ∀ (a : R), a • 0 = 0\n[PROOFSTEP]\nsimp [smul_def']\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\n⊢ ∀ (a : R) (x y : A), a • (x + y) = a • x + a • y\n[PROOFSTEP]\nsimp [smul_def', mul_add]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\n⊢ ∀ (r s : R) (x : A), (r + s) • x = r • x + s • x\n[PROOFSTEP]\nsimp [smul_def', add_mul]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\n⊢ ∀ (x : A), 0 • x = 0\n[PROOFSTEP]\nsimp [smul_def']\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nx : A\nr : R\ny : A\n⊢ x * (↑(algebraMap R A) r * y) = ↑(algebraMap R A) r * (x * y)\n[PROOFSTEP]\nrw [← mul_assoc, ← commutes, mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nx : A\nr : R\ny : A\n⊢ x * ↑(algebraMap R A) r * y = x * y * ↑(algebraMap R A) r\n[PROOFSTEP]\nrw [mul_assoc, commutes, ← mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nx : R\ny z : A\n⊢ (x • y) • z = x • y • z\n[PROOFSTEP]\nrw [smul_eq_mul, smul_eq_mul, smul_def, smul_def, mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\ns : R\nx y : A\n⊢ x * s • y = s • (x * y)\n[PROOFSTEP]\nrw [smul_def, smul_def, left_comm]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝⁸ : CommSemiring R\ninst✝⁷ : CommSemiring S\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R B\nα : Type u_2\ninst✝² : Monoid α\ninst✝¹ : MulDistribMulAction α A\ninst✝ : SMulCommClass α R A\na : α\nr : R\n⊢ a • ↑(algebraMap R A) r = ↑(algebraMap R A) r\n[PROOFSTEP]\nrw [algebraMap_eq_smul_one, smul_comm a r (1 : A), smul_one]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nsrc✝ : R →+* A := algebraMap R A\nx y : R\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n      (x • y) =\n    ↑(RingHom.id R) x •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        y\n[PROOFSTEP]\nsimp [Algebra.smul_def]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nx : A\nr : R\n⊢ x * (x - ↑(algebraMap R A) r) = (x - ↑(algebraMap R A) r) * x\n[PROOFSTEP]\nrw [mul_sub, ← commutes, sub_mul]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nx : A\nr : R\nn : ℕ\n⊢ x * (x - ↑(algebraMap R A) r) ^ n = (x - ↑(algebraMap R A) r) ^ n * x\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nx : A\nr : R\n⊢ x * (x - ↑(algebraMap R A) r) ^ Nat.zero = (x - ↑(algebraMap R A) r) ^ Nat.zero * x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nx : A\nr : R\nn : ℕ\nih : x * (x - ↑(algebraMap R A) r) ^ n = (x - ↑(algebraMap R A) r) ^ n * x\n⊢ x * (x - ↑(algebraMap R A) r) ^ Nat.succ n = (x - ↑(algebraMap R A) r) ^ Nat.succ n * x\n[PROOFSTEP]\nrw [pow_succ, ← mul_assoc, mul_sub_algebraMap_commutes, mul_assoc, ih, ← mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝² : CommRing R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝¹ : AddCommGroup A := Module.addCommMonoidToAddCommGroup R\nsrc✝ : Semiring A := inferInstance\nz : ℕ\n⊢ IntCast.intCast ↑z = ↑z\n[PROOFSTEP]\nsimp only [Int.cast_ofNat, map_natCast]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u_1\ninst✝² : CommRing R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝¹ : AddCommGroup A := Module.addCommMonoidToAddCommGroup R\nsrc✝ : Semiring A := inferInstance\nz : ℕ\n⊢ IntCast.intCast (Int.negSucc z) = -↑(z + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nM : Type w\ninst✝⁷ : CommSemiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : Module S M\ninst✝² : SMulCommClass S R M\ninst✝¹ : SMul R S\ninst✝ : IsScalarTower R S M\nx : R\nh : IsUnit (↑(algebraMap R (End S M)) x)\nm m' : M\nH : m = x • m'\n⊢ ↑↑(IsUnit.unit h)⁻¹ (x • m') = m'\n[PROOFSTEP]\napply_fun ⇑h.unit.val using ((Module.End_isUnit_iff _).mp h).injective\n[GOAL]\nR : Type u\nS : Type v\nM : Type w\ninst✝⁷ : CommSemiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : Module S M\ninst✝² : SMulCommClass S R M\ninst✝¹ : SMul R S\ninst✝ : IsScalarTower R S M\nx : R\nh : IsUnit (↑(algebraMap R (End S M)) x)\nm m' : M\nH : m = x • m'\n⊢ ↑↑(IsUnit.unit h) (↑↑(IsUnit.unit h)⁻¹ (x • m')) = ↑↑(IsUnit.unit h) m'\n[PROOFSTEP]\nerw [End_isUnit_apply_inv_apply_of_isUnit]\n[GOAL]\nR : Type u\nS : Type v\nM : Type w\ninst✝⁷ : CommSemiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : Module S M\ninst✝² : SMulCommClass S R M\ninst✝¹ : SMul R S\ninst✝ : IsScalarTower R S M\nx : R\nh : IsUnit (↑(algebraMap R (End S M)) x)\nm m' : M\nH : m = x • m'\n⊢ x • m' = ↑↑(IsUnit.unit h) m'\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nM : Type w\ninst✝⁷ : CommSemiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : Module S M\ninst✝² : SMulCommClass S R M\ninst✝¹ : SMul R S\ninst✝ : IsScalarTower R S M\nx : R\nh : IsUnit (↑(algebraMap R (End S M)) x)\nm m' : M\nH : m = x • m'\n⊢ m' = ↑↑(IsUnit.unit h)⁻¹ (x • m')\n[PROOFSTEP]\napply_fun (↑h.unit : M → M) using ((Module.End_isUnit_iff _).mp h).injective\n[GOAL]\nR : Type u\nS : Type v\nM : Type w\ninst✝⁷ : CommSemiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : Module S M\ninst✝² : SMulCommClass S R M\ninst✝¹ : SMul R S\ninst✝ : IsScalarTower R S M\nx : R\nh : IsUnit (↑(algebraMap R (End S M)) x)\nm m' : M\nH : m = x • m'\n⊢ ↑↑(IsUnit.unit h) m' = ↑↑(IsUnit.unit h) (↑↑(IsUnit.unit h)⁻¹ (x • m'))\n[PROOFSTEP]\nerw [End_isUnit_apply_inv_apply_of_isUnit]\n[GOAL]\nR : Type u\nS : Type v\nM : Type w\ninst✝⁷ : CommSemiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : Module S M\ninst✝² : SMulCommClass S R M\ninst✝¹ : SMul R S\ninst✝ : IsScalarTower R S M\nx : R\nh : IsUnit (↑(algebraMap R (End S M)) x)\nm m' : M\nH : m = x • m'\n⊢ ↑↑(IsUnit.unit h) m' = x • m'\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Semiring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₗ[R] B\na : A\nr : R\n⊢ ↑f (↑(algebraMap R A) r * a) = ↑(algebraMap R B) r * ↑f a\n[PROOFSTEP]\nrw [← Algebra.smul_def, ← Algebra.smul_def, map_smul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Semiring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₗ[R] B\na : A\nr : R\n⊢ ↑f (a * ↑(algebraMap R A) r) = ↑f a * ↑(algebraMap R B) r\n[PROOFSTEP]\nrw [← Algebra.commutes, ← Algebra.commutes, map_algebraMap_mul]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nP Q : Algebra ℕ R\n⊢ P = Q\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝ : Semiring R\nP Q : Algebra ℕ R\nr✝ : ℕ\n⊢ ↑(algebraMap ℕ R) r✝ = ↑(algebraMap ℕ R) r✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Nontrivial A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\n⊢ Function.Injective ↑(algebraMap R A)\n[PROOFSTEP]\nhave := @smul_left_injective R A CommRing.toRing Ring.toAddCommGroup Algebra.toModule ‹_› 1 one_ne_zero\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Nontrivial A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\nthis : Function.Injective fun c => c • 1\n⊢ Function.Injective ↑(algebraMap R A)\n[PROOFSTEP]\nsimpa only [algebraMap_eq_smul_one'] using this\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\ninst✝⁴ : IsScalarTower R A M\nN : Type u_4\ninst✝³ : AddCommMonoid N\ninst✝² : Module A N\ninst✝¹ : Module R N\ninst✝ : IsScalarTower R A N\nr : R\nm : M\n⊢ r • m = ↑(algebraMap R A) r • m\n[PROOFSTEP]\nrw [← one_smul A m, ← smul_assoc, Algebra.smul_def, mul_one, one_smul]\n[GOAL]\nR✝ : Type u_1\ninst✝²⁰ : CommSemiring R✝\nA✝ : Type u_2\ninst✝¹⁹ : Semiring A✝\ninst✝¹⁸ : Algebra R✝ A✝\nM✝ : Type u_3\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module A✝ M✝\ninst✝¹⁵ : Module R✝ M✝\ninst✝¹⁴ : IsScalarTower R✝ A✝ M✝\nN : Type u_4\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : Module A✝ N\ninst✝¹¹ : Module R✝ N\ninst✝¹⁰ : IsScalarTower R✝ A✝ N\nR : Type u_5\nA : Type u_6\nM : Type u_7\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring A\ninst✝⁷ : IsDomain A\ninst✝⁶ : Algebra R A\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module A M\ninst✝² : IsScalarTower R A M\ninst✝¹ : NoZeroSMulDivisors R A\ninst✝ : NoZeroSMulDivisors A M\n⊢ NoZeroSMulDivisors R M\n[PROOFSTEP]\nrefine' ⟨fun {r m} h => _⟩\n[GOAL]\nR✝ : Type u_1\ninst✝²⁰ : CommSemiring R✝\nA✝ : Type u_2\ninst✝¹⁹ : Semiring A✝\ninst✝¹⁸ : Algebra R✝ A✝\nM✝ : Type u_3\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module A✝ M✝\ninst✝¹⁵ : Module R✝ M✝\ninst✝¹⁴ : IsScalarTower R✝ A✝ M✝\nN : Type u_4\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : Module A✝ N\ninst✝¹¹ : Module R✝ N\ninst✝¹⁰ : IsScalarTower R✝ A✝ N\nR : Type u_5\nA : Type u_6\nM : Type u_7\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring A\ninst✝⁷ : IsDomain A\ninst✝⁶ : Algebra R A\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module A M\ninst✝² : IsScalarTower R A M\ninst✝¹ : NoZeroSMulDivisors R A\ninst✝ : NoZeroSMulDivisors A M\nr : R\nm : M\nh : r • m = 0\n⊢ r = 0 ∨ m = 0\n[PROOFSTEP]\nrw [algebra_compatible_smul A r m] at h \n[GOAL]\nR✝ : Type u_1\ninst✝²⁰ : CommSemiring R✝\nA✝ : Type u_2\ninst✝¹⁹ : Semiring A✝\ninst✝¹⁸ : Algebra R✝ A✝\nM✝ : Type u_3\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module A✝ M✝\ninst✝¹⁵ : Module R✝ M✝\ninst✝¹⁴ : IsScalarTower R✝ A✝ M✝\nN : Type u_4\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : Module A✝ N\ninst✝¹¹ : Module R✝ N\ninst✝¹⁰ : IsScalarTower R✝ A✝ N\nR : Type u_5\nA : Type u_6\nM : Type u_7\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring A\ninst✝⁷ : IsDomain A\ninst✝⁶ : Algebra R A\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module A M\ninst✝² : IsScalarTower R A M\ninst✝¹ : NoZeroSMulDivisors R A\ninst✝ : NoZeroSMulDivisors A M\nr : R\nm : M\nh : ↑(algebraMap R A) r • m = 0\n⊢ r = 0 ∨ m = 0\n[PROOFSTEP]\ncases' smul_eq_zero.1 h with H H\n[GOAL]\ncase inl\nR✝ : Type u_1\ninst✝²⁰ : CommSemiring R✝\nA✝ : Type u_2\ninst✝¹⁹ : Semiring A✝\ninst✝¹⁸ : Algebra R✝ A✝\nM✝ : Type u_3\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module A✝ M✝\ninst✝¹⁵ : Module R✝ M✝\ninst✝¹⁴ : IsScalarTower R✝ A✝ M✝\nN : Type u_4\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : Module A✝ N\ninst✝¹¹ : Module R✝ N\ninst✝¹⁰ : IsScalarTower R✝ A✝ N\nR : Type u_5\nA : Type u_6\nM : Type u_7\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring A\ninst✝⁷ : IsDomain A\ninst✝⁶ : Algebra R A\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module A M\ninst✝² : IsScalarTower R A M\ninst✝¹ : NoZeroSMulDivisors R A\ninst✝ : NoZeroSMulDivisors A M\nr : R\nm : M\nh : ↑(algebraMap R A) r • m = 0\nH : ↑(algebraMap R A) r = 0\n⊢ r = 0 ∨ m = 0\n[PROOFSTEP]\nhave : Function.Injective (algebraMap R A) := NoZeroSMulDivisors.iff_algebraMap_injective.1 inferInstance\n[GOAL]\ncase inl\nR✝ : Type u_1\ninst✝²⁰ : CommSemiring R✝\nA✝ : Type u_2\ninst✝¹⁹ : Semiring A✝\ninst✝¹⁸ : Algebra R✝ A✝\nM✝ : Type u_3\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module A✝ M✝\ninst✝¹⁵ : Module R✝ M✝\ninst✝¹⁴ : IsScalarTower R✝ A✝ M✝\nN : Type u_4\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : Module A✝ N\ninst✝¹¹ : Module R✝ N\ninst✝¹⁰ : IsScalarTower R✝ A✝ N\nR : Type u_5\nA : Type u_6\nM : Type u_7\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring A\ninst✝⁷ : IsDomain A\ninst✝⁶ : Algebra R A\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module A M\ninst✝² : IsScalarTower R A M\ninst✝¹ : NoZeroSMulDivisors R A\ninst✝ : NoZeroSMulDivisors A M\nr : R\nm : M\nh : ↑(algebraMap R A) r • m = 0\nH : ↑(algebraMap R A) r = 0\nthis : Function.Injective ↑(algebraMap R A)\n⊢ r = 0 ∨ m = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase inl.h\nR✝ : Type u_1\ninst✝²⁰ : CommSemiring R✝\nA✝ : Type u_2\ninst✝¹⁹ : Semiring A✝\ninst✝¹⁸ : Algebra R✝ A✝\nM✝ : Type u_3\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module A✝ M✝\ninst✝¹⁵ : Module R✝ M✝\ninst✝¹⁴ : IsScalarTower R✝ A✝ M✝\nN : Type u_4\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : Module A✝ N\ninst✝¹¹ : Module R✝ N\ninst✝¹⁰ : IsScalarTower R✝ A✝ N\nR : Type u_5\nA : Type u_6\nM : Type u_7\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring A\ninst✝⁷ : IsDomain A\ninst✝⁶ : Algebra R A\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module A M\ninst✝² : IsScalarTower R A M\ninst✝¹ : NoZeroSMulDivisors R A\ninst✝ : NoZeroSMulDivisors A M\nr : R\nm : M\nh : ↑(algebraMap R A) r • m = 0\nH : ↑(algebraMap R A) r = 0\nthis : Function.Injective ↑(algebraMap R A)\n⊢ r = 0\n[PROOFSTEP]\nexact (injective_iff_map_eq_zero _).1 this _ H\n[GOAL]\ncase inr\nR✝ : Type u_1\ninst✝²⁰ : CommSemiring R✝\nA✝ : Type u_2\ninst✝¹⁹ : Semiring A✝\ninst✝¹⁸ : Algebra R✝ A✝\nM✝ : Type u_3\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module A✝ M✝\ninst✝¹⁵ : Module R✝ M✝\ninst✝¹⁴ : IsScalarTower R✝ A✝ M✝\nN : Type u_4\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : Module A✝ N\ninst✝¹¹ : Module R✝ N\ninst✝¹⁰ : IsScalarTower R✝ A✝ N\nR : Type u_5\nA : Type u_6\nM : Type u_7\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring A\ninst✝⁷ : IsDomain A\ninst✝⁶ : Algebra R A\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module A M\ninst✝² : IsScalarTower R A M\ninst✝¹ : NoZeroSMulDivisors R A\ninst✝ : NoZeroSMulDivisors A M\nr : R\nm : M\nh : ↑(algebraMap R A) r • m = 0\nH : m = 0\n⊢ r = 0 ∨ m = 0\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.h\nR✝ : Type u_1\ninst✝²⁰ : CommSemiring R✝\nA✝ : Type u_2\ninst✝¹⁹ : Semiring A✝\ninst✝¹⁸ : Algebra R✝ A✝\nM✝ : Type u_3\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module A✝ M✝\ninst✝¹⁵ : Module R✝ M✝\ninst✝¹⁴ : IsScalarTower R✝ A✝ M✝\nN : Type u_4\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : Module A✝ N\ninst✝¹¹ : Module R✝ N\ninst✝¹⁰ : IsScalarTower R✝ A✝ N\nR : Type u_5\nA : Type u_6\nM : Type u_7\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring A\ninst✝⁷ : IsDomain A\ninst✝⁶ : Algebra R A\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Module A M\ninst✝² : IsScalarTower R A M\ninst✝¹ : NoZeroSMulDivisors R A\ninst✝ : NoZeroSMulDivisors A M\nr : R\nm : M\nh : ↑(algebraMap R A) r • m = 0\nH : m = 0\n⊢ m = 0\n[PROOFSTEP]\nexact H\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\ninst✝⁴ : IsScalarTower R A M\nN : Type u_4\ninst✝³ : AddCommMonoid N\ninst✝² : Module A N\ninst✝¹ : Module R N\ninst✝ : IsScalarTower R A N\nr : R\na : A\nm : M\n⊢ r • a • m = a • r • m\n[PROOFSTEP]\nrw [algebra_compatible_smul A r (a • m), smul_smul, Algebra.commutes, mul_smul, ← algebra_compatible_smul]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Algebra.Basic", "llama_tokens": 11905, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7690802476562641, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.3965530924807589}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl m : Language α\na b x✝ x : List α\n⊢ x ∈ 1 ↔ x = []\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\nx✝ : List α\nh : x✝ ∈ []\n⊢ x✝ ∈ l\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\n⊢ 1 * l = l\n[PROOFSTEP]\nsimp [mul_def, one_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\n⊢ l * 1 = l\n[PROOFSTEP]\nsimp [mul_def, one_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl m : Language α\na b x : List α\nn : ℕ\n⊢ NatCast.natCast (n + 1) = NatCast.natCast n + 1\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl m : Language α\na b x : List α\n⊢ NatCast.natCast (Nat.zero + 1) = NatCast.natCast Nat.zero + 1\n[PROOFSTEP]\nsimp [Nat.cast, add_def, zero_def]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl m : Language α\na b x : List α\nn✝ : ℕ\n⊢ NatCast.natCast (Nat.succ n✝ + 1) = NatCast.natCast (Nat.succ n✝) + 1\n[PROOFSTEP]\nsimp [Nat.cast, add_def, zero_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\n⊢ ↑(map id) l = l\n[PROOFSTEP]\nsimp [map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\ng : β → γ\nf : α → β\nl : Language α\n⊢ ↑(map g) (↑(map f) l) = ↑(map (g ∘ f)) l\n[PROOFSTEP]\nsimp [map, image_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\n⊢ l∗ = {x | ∃ S, x = join S ∧ ∀ (y : List α), y ∈ S → y ∈ l ∧ y ≠ []}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝ : List α\nl : Language α\nx : List α\n⊢ x ∈ l∗ ↔ x ∈ {x | ∃ S, x = join S ∧ ∀ (y : List α), y ∈ S → y ∈ l ∧ y ≠ []}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝ : List α\nl : Language α\nx : List α\n⊢ x ∈ l∗ → x ∈ {x | ∃ S, x = join S ∧ ∀ (y : List α), y ∈ S → y ∈ l ∧ y ≠ []}\n[PROOFSTEP]\nrintro ⟨S, rfl, h⟩\n[GOAL]\ncase h.mp.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\nS : List (List α)\nh : ∀ (y : List α), y ∈ S → y ∈ l\n⊢ join S ∈ {x | ∃ S, x = join S ∧ ∀ (y : List α), y ∈ S → y ∈ l ∧ y ≠ []}\n[PROOFSTEP]\nrefine'\n  ⟨S.filter fun l ↦ ¬List.isEmpty l, by simp, fun y hy ↦ _⟩\n    -- Porting note: The previous code was:\n        -- rw [mem_filter, empty_iff_eq_nil] at hy\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\nS : List (List α)\nh : ∀ (y : List α), y ∈ S → y ∈ l\n⊢ join S = join (filter (fun l => decide ¬isEmpty l = true) S)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mp.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\nS : List (List α)\nh : ∀ (y : List α), y ∈ S → y ∈ l\ny : List α\nhy : y ∈ filter (fun l => decide ¬isEmpty l = true) S\n⊢ y ∈ l ∧ y ≠ []\n[PROOFSTEP]\nrw [mem_filter, decide_not, Bool.decide_coe, Bool.not_eq_true', ← Bool.bool_iff_false, isEmpty_iff_eq_nil] at hy \n[GOAL]\ncase h.mp.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\nS : List (List α)\nh : ∀ (y : List α), y ∈ S → y ∈ l\ny : List α\nhy : y ∈ S ∧ ¬y = []\n⊢ y ∈ l ∧ y ≠ []\n[PROOFSTEP]\nexact ⟨h y hy.1, hy.2⟩\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝ : List α\nl : Language α\nx : List α\n⊢ x ∈ {x | ∃ S, x = join S ∧ ∀ (y : List α), y ∈ S → y ∈ l ∧ y ≠ []} → x ∈ l∗\n[PROOFSTEP]\nrintro ⟨S, hx, h⟩\n[GOAL]\ncase h.mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝ : List α\nl : Language α\nx : List α\nS : List (List α)\nhx : x = join S\nh : ∀ (y : List α), y ∈ S → y ∈ l ∧ y ≠ []\n⊢ x ∈ l∗\n[PROOFSTEP]\nexact ⟨S, hx, fun y hy ↦ (h y hy).1⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl m : Language α\na b x : List α\nl₁ l₂ m₁ m₂ : Language α\n⊢ l₁ ≤ m₁ → l₂ ≤ m₂ → l₁ * l₂ ≤ m₁ * m₂\n[PROOFSTEP]\nintro h₁ h₂ x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl m : Language α\na b x✝ : List α\nl₁ l₂ m₁ m₂ : Language α\nh₁ : l₁ ≤ m₁\nh₂ : l₂ ≤ m₂\nx : List α\nhx : x ∈ l₁ * l₂\n⊢ x ∈ m₁ * m₂\n[PROOFSTEP]\nsimp only [mul_def, exists_and_left, mem_image2, image_prod] at hx ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl m : Language α\na b x✝ : List α\nl₁ l₂ m₁ m₂ : Language α\nh₁ : l₁ ≤ m₁\nh₂ : l₂ ≤ m₂\nx : List α\nhx : ∃ a, a ∈ l₁ ∧ ∃ x_1, x_1 ∈ l₂ ∧ a ++ x_1 = x\n⊢ ∃ a, a ∈ m₁ ∧ ∃ x_1, x_1 ∈ m₂ ∧ a ++ x_1 = x\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝ : List α\nl : Language α\nx : List α\nn : ℕ\n⊢ x ∈ l ^ n ↔ ∃ S, x = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l\n[PROOFSTEP]\ninduction' n with n ihn generalizing x\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝¹ : List α\nl : Language α\nx✝ x : List α\n⊢ x ∈ l ^ Nat.zero ↔ ∃ S, x = join S ∧ length S = Nat.zero ∧ ∀ (y : List α), y ∈ S → y ∈ l\n[PROOFSTEP]\nsimp only [mem_one, pow_zero, length_eq_zero]\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝¹ : List α\nl : Language α\nx✝ x : List α\n⊢ x = [] ↔ ∃ S, x = join S ∧ S = [] ∧ ∀ (y : List α), y ∈ S → y ∈ l\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase zero.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝¹ : List α\nl : Language α\nx✝ x : List α\n⊢ x = [] → ∃ S, x = join S ∧ S = [] ∧ ∀ (y : List α), y ∈ S → y ∈ l\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase zero.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝ : List α\nl : Language α\nx : List α\n⊢ ∃ S, [] = join S ∧ S = [] ∧ ∀ (y : List α), y ∈ S → y ∈ l\n[PROOFSTEP]\nexact ⟨[], rfl, rfl, fun _ h ↦ by contradiction⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝¹ : List α\nl : Language α\nx x✝ : List α\nh : x✝ ∈ []\n⊢ x✝ ∈ l\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase zero.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝¹ : List α\nl : Language α\nx✝ x : List α\n⊢ (∃ S, x = join S ∧ S = [] ∧ ∀ (y : List α), y ∈ S → y ∈ l) → x = []\n[PROOFSTEP]\nrintro ⟨_, rfl, rfl, _⟩\n[GOAL]\ncase zero.mpr.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝ : List α\nl : Language α\nx : List α\nright✝ : ∀ (y : List α), y ∈ [] → y ∈ l\n⊢ join [] = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝¹ : List α\nl : Language α\nx✝ : List α\nn : ℕ\nihn : ∀ {x : List α}, x ∈ l ^ n ↔ ∃ S, x = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l\nx : List α\n⊢ x ∈ l ^ Nat.succ n ↔ ∃ S, x = join S ∧ length S = Nat.succ n ∧ ∀ (y : List α), y ∈ S → y ∈ l\n[PROOFSTEP]\nsimp only [pow_succ, mem_mul, ihn]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝¹ : List α\nl : Language α\nx✝ : List α\nn : ℕ\nihn : ∀ {x : List α}, x ∈ l ^ n ↔ ∃ S, x = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l\nx : List α\n⊢ (∃ a b, a ∈ l ∧ (∃ S, b = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l) ∧ a ++ b = x) ↔\n    ∃ S, x = join S ∧ length S = Nat.succ n ∧ ∀ (y : List α), y ∈ S → y ∈ l\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝¹ : List α\nl : Language α\nx✝ : List α\nn : ℕ\nihn : ∀ {x : List α}, x ∈ l ^ n ↔ ∃ S, x = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l\nx : List α\n⊢ (∃ a b, a ∈ l ∧ (∃ S, b = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l) ∧ a ++ b = x) →\n    ∃ S, x = join S ∧ length S = Nat.succ n ∧ ∀ (y : List α), y ∈ S → y ∈ l\n[PROOFSTEP]\nrintro ⟨a, b, ha, ⟨S, rfl, rfl, hS⟩, rfl⟩\n[GOAL]\ncase succ.mp.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na✝ b x✝ : List α\nl : Language α\nx a : List α\nha : a ∈ l\nS : List (List α)\nhS : ∀ (y : List α), y ∈ S → y ∈ l\nihn : ∀ {x : List α}, x ∈ l ^ length S ↔ ∃ S_1, x = join S_1 ∧ length S_1 = length S ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l\n⊢ ∃ S_1, a ++ join S = join S_1 ∧ length S_1 = Nat.succ (length S) ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l\n[PROOFSTEP]\nexact ⟨a :: S, rfl, rfl, forall_mem_cons.2 ⟨ha, hS⟩⟩\n[GOAL]\ncase succ.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝¹ : List α\nl : Language α\nx✝ : List α\nn : ℕ\nihn : ∀ {x : List α}, x ∈ l ^ n ↔ ∃ S, x = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l\nx : List α\n⊢ (∃ S, x = join S ∧ length S = Nat.succ n ∧ ∀ (y : List α), y ∈ S → y ∈ l) →\n    ∃ a b, a ∈ l ∧ (∃ S, b = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l) ∧ a ++ b = x\n[PROOFSTEP]\nrintro ⟨_ | ⟨a, S⟩, rfl, hn, hS⟩\n[GOAL]\ncase succ.mpr.intro.nil.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝ : List α\nl : Language α\nx : List α\nn : ℕ\nihn : ∀ {x : List α}, x ∈ l ^ n ↔ ∃ S, x = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l\nhn : length [] = Nat.succ n\nhS : ∀ (y : List α), y ∈ [] → y ∈ l\n⊢ ∃ a b, a ∈ l ∧ (∃ S, b = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l) ∧ a ++ b = join []\n[PROOFSTEP]\ncases hn\n[GOAL]\ncase succ.mpr.intro.cons.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na✝ b x✝ : List α\nl : Language α\nx : List α\nn : ℕ\nihn : ∀ {x : List α}, x ∈ l ^ n ↔ ∃ S, x = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l\na : List α\nS : List (List α)\nhn : length (a :: S) = Nat.succ n\nhS : ∀ (y : List α), y ∈ a :: S → y ∈ l\n⊢ ∃ a_1 b, a_1 ∈ l ∧ (∃ S, b = join S ∧ length S = n ∧ ∀ (y : List α), y ∈ S → y ∈ l) ∧ a_1 ++ b = join (a :: S)\n[PROOFSTEP]\ncases hn\n[GOAL]\ncase succ.mpr.intro.cons.intro.intro.refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na✝ b x✝ : List α\nl : Language α\nx a : List α\nS : List (List α)\nhS : ∀ (y : List α), y ∈ a :: S → y ∈ l\nihn :\n  ∀ {x : List α},\n    x ∈ l ^ Nat.add (length S) 0 ↔\n      ∃ S_1, x = join S_1 ∧ length S_1 = Nat.add (length S) 0 ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l\n⊢ ∃ a_1 b,\n    a_1 ∈ l ∧\n      (∃ S_1, b = join S_1 ∧ length S_1 = Nat.add (length S) 0 ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l) ∧\n        a_1 ++ b = join (a :: S)\n[PROOFSTEP]\nrw [forall_mem_cons] at hS \n[GOAL]\ncase succ.mpr.intro.cons.intro.intro.refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na✝ b x✝ : List α\nl : Language α\nx a : List α\nS : List (List α)\nhS : a ∈ l ∧ ∀ (x : List α), x ∈ S → x ∈ l\nihn :\n  ∀ {x : List α},\n    x ∈ l ^ Nat.add (length S) 0 ↔\n      ∃ S_1, x = join S_1 ∧ length S_1 = Nat.add (length S) 0 ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l\n⊢ ∃ a_1 b,\n    a_1 ∈ l ∧\n      (∃ S_1, b = join S_1 ∧ length S_1 = Nat.add (length S) 0 ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l) ∧\n        a_1 ++ b = join (a :: S)\n[PROOFSTEP]\nexact ⟨a, _, hS.1, ⟨S, rfl, rfl, hS.2⟩, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\n⊢ l∗ = ⨆ (i : ℕ), l ^ i\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝ : List α\nl : Language α\nx : List α\n⊢ x ∈ l∗ ↔ x ∈ ⨆ (i : ℕ), l ^ i\n[PROOFSTEP]\nsimp only [mem_kstar, mem_iSup, mem_pow]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝ : List α\nl : Language α\nx : List α\n⊢ (∃ L, x = join L ∧ ∀ (y : List α), y ∈ L → y ∈ l) ↔ ∃ i S, x = join S ∧ length S = i ∧ ∀ (y : List α), y ∈ S → y ∈ l\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝ : List α\nl : Language α\nx : List α\n⊢ (∃ L, x = join L ∧ ∀ (y : List α), y ∈ L → y ∈ l) → ∃ i S, x = join S ∧ length S = i ∧ ∀ (y : List α), y ∈ S → y ∈ l\n[PROOFSTEP]\nrintro ⟨S, rfl, hS⟩\n[GOAL]\ncase h.mp.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\nS : List (List α)\nhS : ∀ (y : List α), y ∈ S → y ∈ l\n⊢ ∃ i S_1, join S = join S_1 ∧ length S_1 = i ∧ ∀ (y : List α), y ∈ S_1 → y ∈ l\n[PROOFSTEP]\nexact ⟨_, S, rfl, rfl, hS⟩\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x✝ : List α\nl : Language α\nx : List α\n⊢ (∃ i S, x = join S ∧ length S = i ∧ ∀ (y : List α), y ∈ S → y ∈ l) → ∃ L, x = join L ∧ ∀ (y : List α), y ∈ L → y ∈ l\n[PROOFSTEP]\nrintro ⟨_, S, rfl, rfl, hS⟩\n[GOAL]\ncase h.mpr.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\nS : List (List α)\nhS : ∀ (y : List α), y ∈ S → y ∈ l\n⊢ ∃ L, join S = join L ∧ ∀ (y : List α), y ∈ L → y ∈ l\n[PROOFSTEP]\nexact ⟨S, rfl, hS⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nf : α → β\nl : Language α\n⊢ ↑(map f) l∗ = (↑(map f) l)∗\n[PROOFSTEP]\nrw [kstar_eq_iSup_pow, kstar_eq_iSup_pow]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nf : α → β\nl : Language α\n⊢ ↑(map f) (⨆ (i : ℕ), l ^ i) = ⨆ (i : ℕ), ↑(map f) l ^ i\n[PROOFSTEP]\nsimp_rw [← map_pow]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nf : α → β\nl : Language α\n⊢ ↑(map f) (⨆ (i : ℕ), l ^ i) = ⨆ (i : ℕ), ↑(map f) (l ^ i)\n[PROOFSTEP]\nexact image_iUnion\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\n⊢ l∗ * l = l * l∗\n[PROOFSTEP]\nsimp only [kstar_eq_iSup_pow, mul_iSup, iSup_mul, ← pow_succ, ← pow_succ']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\n⊢ 1 + l * l∗ = l∗\n[PROOFSTEP]\nsimp only [kstar_eq_iSup_pow, mul_iSup, ← pow_succ, ← pow_zero l]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\n⊢ l ^ 0 + ⨆ (i : ℕ), l ^ (i + 1) = ⨆ (i : ℕ), l ^ i\n[PROOFSTEP]\nexact sup_iSup_nat_succ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na b x : List α\nl : Language α\n⊢ 1 + l∗ * l = l∗\n[PROOFSTEP]\nrw [mul_self_kstar_comm, one_add_self_mul_kstar_eq_kstar]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m : Language α\na✝ b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\na : Language α\nl : List α\nhl : l ∈ 1\n⊢ ∀ (y : List α), y ∈ [] → y ∈ a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m✝ : Language α\na b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\nl m : Language α\nh : m * l ≤ m\n⊢ m * l∗ ≤ m\n[PROOFSTEP]\nrw [kstar_eq_iSup_pow, mul_iSup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m✝ : Language α\na b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\nl m : Language α\nh : m * l ≤ m\n⊢ ⨆ (i : ℕ), m * l ^ i ≤ m\n[PROOFSTEP]\nrefine' iSup_le (fun n ↦ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m✝ : Language α\na b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\nl m : Language α\nh : m * l ≤ m\nn : ℕ\n⊢ m * l ^ n ≤ m\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m✝ : Language α\na b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\nl m : Language α\nh : m * l ≤ m\n⊢ m * l ^ Nat.zero ≤ m\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m✝ : Language α\na b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\nl m : Language α\nh : m * l ≤ m\nn : ℕ\nih : m * l ^ n ≤ m\n⊢ m * l ^ Nat.succ n ≤ m\n[PROOFSTEP]\nrw [pow_succ, ← mul_assoc m l (l ^ n)]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m✝ : Language α\na b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\nl m : Language α\nh : m * l ≤ m\nn : ℕ\nih : m * l ^ n ≤ m\n⊢ m * l * l ^ n ≤ m\n[PROOFSTEP]\nexact le_trans (le_mul_congr h le_rfl) ih\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m✝ : Language α\na b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\nl m : Language α\nh : l * m ≤ m\n⊢ l∗ * m ≤ m\n[PROOFSTEP]\nrw [kstar_eq_iSup_pow, iSup_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m✝ : Language α\na b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\nl m : Language α\nh : l * m ≤ m\n⊢ ⨆ (i : ℕ), l ^ i * m ≤ m\n[PROOFSTEP]\nrefine' iSup_le (fun n ↦ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m✝ : Language α\na b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\nl m : Language α\nh : l * m ≤ m\nn : ℕ\n⊢ l ^ n * m ≤ m\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m✝ : Language α\na b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\nl m : Language α\nh : l * m ≤ m\n⊢ l ^ Nat.zero * m ≤ m\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m✝ : Language α\na b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\nl m : Language α\nh : l * m ≤ m\nn : ℕ\nih : l ^ n * m ≤ m\n⊢ l ^ Nat.succ n * m ≤ m\n[PROOFSTEP]\nrw [pow_succ', mul_assoc (l ^ n) l m]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl✝ m✝ : Language α\na b x : List α\nsrc✝¹ : Semiring (Language α) := instSemiring\nsrc✝ : CompleteAtomicBooleanAlgebra (Set (List α)) := Set.completeAtomicBooleanAlgebra\nl m : Language α\nh : l * m ≤ m\nn : ℕ\nih : l ^ n * m ≤ m\n⊢ l ^ n * (l * m) ≤ m\n[PROOFSTEP]\nexact le_trans (le_mul_congr le_rfl h) ih\n", "meta": {"mathlib_filename": "Mathlib.Computability.Language", "llama_tokens": 9142, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802603710086, "lm_q2_score": 0.5926665999540698, "lm_q1q2_score": 0.39642298969047857}}
{"text": "[GOAL]\nα : Type u\nT : Set (Set α)\nempty_mem : ∅ ∈ T\nsInter_mem : ∀ (A : Set (Set α)), A ⊆ T → ⋂₀ A ∈ T\nunion_mem : ∀ (A : Set α), A ∈ T → ∀ (B : Set α), B ∈ T → A ∪ B ∈ T\n⊢ (fun X => Xᶜ ∈ T) univ\n[PROOFSTEP]\nsimp [empty_mem]\n[GOAL]\nα : Type u\nT : Set (Set α)\nempty_mem : ∅ ∈ T\nsInter_mem : ∀ (A : Set (Set α)), A ⊆ T → ⋂₀ A ∈ T\nunion_mem : ∀ (A : Set α), A ∈ T → ∀ (B : Set α), B ∈ T → A ∪ B ∈ T\ns t : Set α\nhs : (fun X => Xᶜ ∈ T) s\nht : (fun X => Xᶜ ∈ T) t\n⊢ (fun X => Xᶜ ∈ T) (s ∩ t)\n[PROOFSTEP]\nsimpa only [compl_inter] using union_mem sᶜ hs tᶜ ht\n[GOAL]\nα : Type u\nT : Set (Set α)\nempty_mem : ∅ ∈ T\nsInter_mem : ∀ (A : Set (Set α)), A ⊆ T → ⋂₀ A ∈ T\nunion_mem : ∀ (A : Set α), A ∈ T → ∀ (B : Set α), B ∈ T → A ∪ B ∈ T\ns : Set (Set α)\nhs : ∀ (t : Set α), t ∈ s → (fun X => Xᶜ ∈ T) t\n⊢ (fun X => Xᶜ ∈ T) (⋃₀ s)\n[PROOFSTEP]\nsimp only [Set.compl_sUnion]\n[GOAL]\nα : Type u\nT : Set (Set α)\nempty_mem : ∅ ∈ T\nsInter_mem : ∀ (A : Set (Set α)), A ⊆ T → ⋂₀ A ∈ T\nunion_mem : ∀ (A : Set α), A ∈ T → ∀ (B : Set α), B ∈ T → A ∪ B ∈ T\ns : Set (Set α)\nhs : ∀ (t : Set α), t ∈ s → (fun X => Xᶜ ∈ T) t\n⊢ ⋂₀ (compl '' s) ∈ T\n[PROOFSTEP]\nexact sInter_mem (compl '' s) fun z ⟨y, hy, hz⟩ => hz ▸ hs y hy\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\nt t' : TopologicalSpace α\nh : ∀ (s : Set α), IsOpen s ↔ IsOpen s\n⊢ t = t'\n[PROOFSTEP]\next\n[GOAL]\ncase a.h.a\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\nt t' : TopologicalSpace α\nh : ∀ (s : Set α), IsOpen s ↔ IsOpen s\nx✝ : Set α\n⊢ IsOpen x✝ ↔ IsOpen x✝\n[PROOFSTEP]\nexact h _\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nh₁ : IsOpen s₁\nh₂ : IsOpen s₂\n⊢ IsOpen (s₁ ∪ s₂)\n[PROOFSTEP]\nrw [union_eq_iUnion]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nh₁ : IsOpen s₁\nh₂ : IsOpen s₂\n⊢ IsOpen (⋃ (b : Bool), bif b then s₁ else s₂)\n[PROOFSTEP]\nexact isOpen_iUnion (Bool.forall_bool.2 ⟨h₂, h₁⟩)\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\n⊢ IsOpen ∅\n[PROOFSTEP]\nrw [← sUnion_empty]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\n⊢ IsOpen (⋃₀ ∅)\n[PROOFSTEP]\nexact isOpen_sUnion fun a => False.elim\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set (Set α)\nhs : Set.Finite s\nx✝ : ∀ (t : Set α), t ∈ ∅ → IsOpen t\n⊢ IsOpen (⋂₀ ∅)\n[PROOFSTEP]\nrw [sInter_empty]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set (Set α)\nhs : Set.Finite s\nx✝ : ∀ (t : Set α), t ∈ ∅ → IsOpen t\n⊢ IsOpen univ\n[PROOFSTEP]\nexact isOpen_univ\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝¹ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set (Set α)\nhs : Set.Finite s\na✝ : Set α\ns✝ : Set (Set α)\nx✝¹ : ¬a✝ ∈ s✝\nx✝ : Set.Finite s✝\nih : (∀ (t : Set α), t ∈ s✝ → IsOpen t) → IsOpen (⋂₀ s✝)\nh : ∀ (t : Set α), t ∈ insert a✝ s✝ → IsOpen t\n⊢ IsOpen (⋂₀ insert a✝ s✝)\n[PROOFSTEP]\nsimp only [sInter_insert, ball_insert_iff] at h ⊢\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝¹ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set (Set α)\nhs : Set.Finite s\na✝ : Set α\ns✝ : Set (Set α)\nx✝¹ : ¬a✝ ∈ s✝\nx✝ : Set.Finite s✝\nih : (∀ (t : Set α), t ∈ s✝ → IsOpen t) → IsOpen (⋂₀ s✝)\nh : IsOpen a✝ ∧ ∀ (x : Set α), x ∈ s✝ → IsOpen x\n⊢ IsOpen (a✝ ∩ ⋂₀ s✝)\n[PROOFSTEP]\nexact h.1.inter (ih h.2)\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\np : Prop\n⊢ IsOpen {_a | p}\n[PROOFSTEP]\nby_cases p\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\np : Prop\n⊢ IsOpen {_a | p}\n[PROOFSTEP]\nby_cases p\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\np : Prop\nh : p\n⊢ IsOpen {_a | p}\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\np : Prop\nh : ¬p\n⊢ IsOpen {_a | p}\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\n⊢ IsClosed s₁ → IsClosed s₂ → IsClosed (s₁ ∪ s₂)\n[PROOFSTEP]\nsimpa only [← isOpen_compl_iff, compl_union] using IsOpen.inter\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set (Set α)\n⊢ (∀ (t : Set α), t ∈ s → IsClosed t) → IsClosed (⋂₀ s)\n[PROOFSTEP]\nsimpa only [← isOpen_compl_iff, compl_sInter, sUnion_image] using isOpen_biUnion\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ IsClosed sᶜ ↔ IsOpen s\n[PROOFSTEP]\nrw [← isOpen_compl_iff, compl_compl]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nh₁ : IsClosed s₁\nh₂ : IsClosed s₂\n⊢ IsClosed (s₁ ∩ s₂)\n[PROOFSTEP]\nrw [← isOpen_compl_iff] at *\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nh₁ : IsOpen s₁ᶜ\nh₂ : IsOpen s₂ᶜ\n⊢ IsOpen (s₁ ∩ s₂)ᶜ\n[PROOFSTEP]\nrw [compl_inter]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nh₁ : IsOpen s₁ᶜ\nh₂ : IsOpen s₂ᶜ\n⊢ IsOpen (s₁ᶜ ∪ s₂ᶜ)\n[PROOFSTEP]\nexact IsOpen.union h₁ h₂\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set β\nf : β → Set α\nhs : Set.Finite s\nh : ∀ (i : β), i ∈ s → IsClosed (f i)\n⊢ IsClosed (⋃ (i : β) (_ : i ∈ s), f i)\n[PROOFSTEP]\nsimp only [← isOpen_compl_iff, compl_iUnion] at *\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set β\nf : β → Set α\nhs : Set.Finite s\nh : ∀ (i : β), i ∈ s → IsOpen (f i)ᶜ\n⊢ IsOpen (⋂ (i : β) (_ : i ∈ s), (f i)ᶜ)\n[PROOFSTEP]\nexact isOpen_biInter hs h\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\ninst✝ : Finite ι\ns : ι → Set α\nh : ∀ (i : ι), IsClosed (s i)\n⊢ IsClosed (⋃ (i : ι), s i)\n[PROOFSTEP]\nsimp only [← isOpen_compl_iff, compl_iUnion] at *\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\ninst✝ : Finite ι\ns : ι → Set α\nh : ∀ (i : ι), IsOpen (s i)ᶜ\n⊢ IsOpen (⋂ (i : ι), (s i)ᶜ)\n[PROOFSTEP]\nexact isOpen_iInter h\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\np q : α → Prop\nhp : IsOpen {x | p x}\nhq : IsClosed {x | q x}\n⊢ IsClosed {x | p x → q x}\n[PROOFSTEP]\nsimpa only [imp_iff_not_or] using hp.isClosed_compl.union hq\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nx : α\n⊢ x ∈ interior s ↔ ∃ t, t ⊆ s ∧ IsOpen t ∧ x ∈ t\n[PROOFSTEP]\nsimp only [interior, mem_sUnion, mem_setOf_eq, and_assoc, and_left_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ s ⊆ interior s ↔ IsOpen s\n[PROOFSTEP]\nsimp only [interior_eq_iff_isOpen.symm, Subset.antisymm_iff, interior_subset, true_and]\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nι : Type u_1\ns : Finset ι\nf : ι → Set α\n⊢ interior (⋂ (i : ι) (_ : i ∈ s), f i) = ⋂ (i : ι) (_ : i ∈ s), interior (f i)\n[PROOFSTEP]\nclassical\nrefine' s.induction_on (by simp) _\nintro i s _ h₂\nsimp [h₂]\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nι : Type u_1\ns : Finset ι\nf : ι → Set α\n⊢ interior (⋂ (i : ι) (_ : i ∈ s), f i) = ⋂ (i : ι) (_ : i ∈ s), interior (f i)\n[PROOFSTEP]\nrefine' s.induction_on (by simp) _\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nι : Type u_1\ns : Finset ι\nf : ι → Set α\n⊢ interior (⋂ (i : ι) (_ : i ∈ ∅), f i) = ⋂ (i : ι) (_ : i ∈ ∅), interior (f i)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nι : Type u_1\ns : Finset ι\nf : ι → Set α\n⊢ ∀ ⦃a : ι⦄ {s : Finset ι},\n    ¬a ∈ s →\n      interior (⋂ (i : ι) (_ : i ∈ s), f i) = ⋂ (i : ι) (_ : i ∈ s), interior (f i) →\n        interior (⋂ (i : ι) (_ : i ∈ insert a s), f i) = ⋂ (i : ι) (_ : i ∈ insert a s), interior (f i)\n[PROOFSTEP]\nintro i s _ h₂\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns✝¹ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nι : Type u_1\ns✝ : Finset ι\nf : ι → Set α\ni : ι\ns : Finset ι\na✝ : ¬i ∈ s\nh₂ : interior (⋂ (i : ι) (_ : i ∈ s), f i) = ⋂ (i : ι) (_ : i ∈ s), interior (f i)\n⊢ interior (⋂ (i_1 : ι) (_ : i_1 ∈ insert i s), f i_1) = ⋂ (i_1 : ι) (_ : i_1 ∈ insert i s), interior (f i_1)\n[PROOFSTEP]\nsimp [h₂]\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nι : Type u_1\ninst✝ : Finite ι\nf : ι → Set α\n⊢ interior (⋂ (i : ι), f i) = ⋂ (i : ι), interior (f i)\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nι : Type u_1\ninst✝ : Finite ι\nf : ι → Set α\nval✝ : Fintype ι\n⊢ interior (⋂ (i : ι), f i) = ⋂ (i : ι), interior (f i)\n[PROOFSTEP]\nconvert Finset.univ.interior_iInter f\n[GOAL]\ncase h.e'_2.h.e'_3.h.e'_3.h\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nι : Type u_1\ninst✝ : Finite ι\nf : ι → Set α\nval✝ : Fintype ι\nx✝ : ι\n⊢ f x✝ = ⋂ (_ : x✝ ∈ Finset.univ), f x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3.h.e'_3.h\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nι : Type u_1\ninst✝ : Finite ι\nf : ι → Set α\nval✝ : Fintype ι\nx✝ : ι\n⊢ interior (f x✝) = ⋂ (_ : x✝ ∈ Finset.univ), interior (f x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\nh₁ : IsClosed s\nh₂ : interior t = ∅\nx : α\nx✝ : x ∈ interior (s ∪ t)\nu : Set α\nhu₁ : IsOpen u\nhu₂ : u ⊆ s ∪ t\nhx₁ : x ∈ u\nhx₂ : ¬x ∈ s\nthis : u \\ s ⊆ t\n⊢ u \\ s ⊆ interior t\n[PROOFSTEP]\nrwa [(IsOpen.sdiff hu₁ h₁).subset_interior_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\nh₁ : IsClosed s\nh₂ : interior t = ∅\nx : α\nx✝ : x ∈ interior (s ∪ t)\nu : Set α\nhu₁ : IsOpen u\nhu₂ : u ⊆ s ∪ t\nhx₁ : x ∈ u\nhx₂ : ¬x ∈ s\nthis✝ : u \\ s ⊆ t\nthis : u \\ s ⊆ interior t\n⊢ u \\ s ⊆ ∅\n[PROOFSTEP]\nrwa [h₂] at this \n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\n⊢ IsOpen s ↔ ∀ (x : α), x ∈ s → ∃ t, t ⊆ s ∧ IsOpen t ∧ x ∈ t\n[PROOFSTEP]\nrw [← subset_interior_iff_isOpen]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\n⊢ s ⊆ interior s ↔ ∀ (x : α), x ∈ s → ∃ t, t ⊆ s ∧ IsOpen t ∧ x ∈ t\n[PROOFSTEP]\nsimp only [subset_def, mem_interior]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nS : Set (Set α)\n⊢ interior (⋂₀ S) = interior (⋂ (s : Set α) (_ : s ∈ S), s)\n[PROOFSTEP]\nrw [sInter_eq_biInter]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\n⊢ s \\ t ⊆ closure t ↔ s ⊆ closure t\n[PROOFSTEP]\nrw [diff_subset_iff, union_eq_self_of_subset_left subset_closure]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : closure s ⊆ s\n⊢ IsClosed s\n[PROOFSTEP]\nrw [subset_closure.antisymm h]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : closure s ⊆ s\n⊢ IsClosed (closure s)\n[PROOFSTEP]\nexact isClosed_closure\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ Set.Nonempty (closure s) ↔ Set.Nonempty s\n[PROOFSTEP]\nsimp only [nonempty_iff_ne_empty, Ne.def, closure_empty_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nι : Type u_1\ns : Finset ι\nf : ι → Set α\n⊢ closure (⋃ (i : ι) (_ : i ∈ s), f i) = ⋃ (i : ι) (_ : i ∈ s), closure (f i)\n[PROOFSTEP]\nclassical\nrefine' s.induction_on (by simp) _\nintro i s _ h₂\nsimp [h₂]\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nι : Type u_1\ns : Finset ι\nf : ι → Set α\n⊢ closure (⋃ (i : ι) (_ : i ∈ s), f i) = ⋃ (i : ι) (_ : i ∈ s), closure (f i)\n[PROOFSTEP]\nrefine' s.induction_on (by simp) _\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nι : Type u_1\ns : Finset ι\nf : ι → Set α\n⊢ closure (⋃ (i : ι) (_ : i ∈ ∅), f i) = ⋃ (i : ι) (_ : i ∈ ∅), closure (f i)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nι : Type u_1\ns : Finset ι\nf : ι → Set α\n⊢ ∀ ⦃a : ι⦄ {s : Finset ι},\n    ¬a ∈ s →\n      closure (⋃ (i : ι) (_ : i ∈ s), f i) = ⋃ (i : ι) (_ : i ∈ s), closure (f i) →\n        closure (⋃ (i : ι) (_ : i ∈ insert a s), f i) = ⋃ (i : ι) (_ : i ∈ insert a s), closure (f i)\n[PROOFSTEP]\nintro i s _ h₂\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns✝¹ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nι : Type u_1\ns✝ : Finset ι\nf : ι → Set α\ni : ι\ns : Finset ι\na✝ : ¬i ∈ s\nh₂ : closure (⋃ (i : ι) (_ : i ∈ s), f i) = ⋃ (i : ι) (_ : i ∈ s), closure (f i)\n⊢ closure (⋃ (i_1 : ι) (_ : i_1 ∈ insert i s), f i_1) = ⋃ (i_1 : ι) (_ : i_1 ∈ insert i s), closure (f i_1)\n[PROOFSTEP]\nsimp [h₂]\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nι : Type u_1\ninst✝ : Finite ι\nf : ι → Set α\n⊢ closure (⋃ (i : ι), f i) = ⋃ (i : ι), closure (f i)\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nι : Type u_1\ninst✝ : Finite ι\nf : ι → Set α\nval✝ : Fintype ι\n⊢ closure (⋃ (i : ι), f i) = ⋃ (i : ι), closure (f i)\n[PROOFSTEP]\nconvert Finset.univ.closure_biUnion f\n[GOAL]\ncase h.e'_2.h.e'_3.h.e'_3.h\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nι : Type u_1\ninst✝ : Finite ι\nf : ι → Set α\nval✝ : Fintype ι\nx✝ : ι\n⊢ f x✝ = ⋃ (_ : x✝ ∈ Finset.univ), f x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3.h.e'_3.h\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nι : Type u_1\ninst✝ : Finite ι\nf : ι → Set α\nval✝ : Fintype ι\nx✝ : ι\n⊢ closure (f x✝) = ⋃ (_ : x✝ ∈ Finset.univ), closure (f x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ closure s = (interior sᶜ)ᶜ\n[PROOFSTEP]\nrw [interior, closure, compl_sUnion, compl_image_set_of]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ ⋂₀ {t | IsClosed t ∧ s ⊆ t} = ⋂₀ {s_1 | IsOpen s_1ᶜ ∧ s_1ᶜ ⊆ sᶜ}\n[PROOFSTEP]\nsimp only [compl_subset_compl, isOpen_compl_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ interior sᶜ = (closure s)ᶜ\n[PROOFSTEP]\nsimp [closure_eq_compl_interior_compl]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ closure sᶜ = (interior s)ᶜ\n[PROOFSTEP]\nsimp [closure_eq_compl_interior_compl]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nl : Filter α\nh : l = ⊥\n⊢ Filter.lift' ⊥ closure = ⊥\n[PROOFSTEP]\nrw [lift'_bot (monotone_closure _), closure_empty, principal_empty]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ interior s = ∅ ↔ Dense sᶜ\n[PROOFSTEP]\nrw [dense_iff_closure_eq, closure_compl, compl_univ_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : Dense s\n⊢ Dense sᶜᶜ\n[PROOFSTEP]\nrwa [compl_compl]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ Dense (closure s) ↔ Dense s\n[PROOFSTEP]\nrw [Dense, Dense, closure_closure]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ Dense s ↔ ∀ (U : Set α), IsOpen U → Set.Nonempty U → Set.Nonempty (U ∩ s)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ Dense s → ∀ (U : Set α), IsOpen U → Set.Nonempty U → Set.Nonempty (U ∩ s)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ (∀ (U : Set α), IsOpen U → Set.Nonempty U → Set.Nonempty (U ∩ s)) → Dense s\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : Dense s\n⊢ ∀ (U : Set α), IsOpen U → Set.Nonempty U → Set.Nonempty (U ∩ s)\n[PROOFSTEP]\nrintro U U_op ⟨x, x_in⟩\n[GOAL]\ncase mp.intro\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : Dense s\nU : Set α\nU_op : IsOpen U\nx : α\nx_in : x ∈ U\n⊢ Set.Nonempty (U ∩ s)\n[PROOFSTEP]\nexact mem_closure_iff.1 (h _) U U_op x_in\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : ∀ (U : Set α), IsOpen U → Set.Nonempty U → Set.Nonempty (U ∩ s)\n⊢ Dense s\n[PROOFSTEP]\nintro x\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : ∀ (U : Set α), IsOpen U → Set.Nonempty U → Set.Nonempty (U ∩ s)\nx : α\n⊢ x ∈ closure s\n[PROOFSTEP]\nrw [mem_closure_iff]\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : ∀ (U : Set α), IsOpen U → Set.Nonempty U → Set.Nonempty (U ∩ s)\nx : α\n⊢ ∀ (o : Set α), IsOpen o → x ∈ o → Set.Nonempty (o ∩ s)\n[PROOFSTEP]\nintro U U_op x_in\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : ∀ (U : Set α), IsOpen U → Set.Nonempty U → Set.Nonempty (U ∩ s)\nx : α\nU : Set α\nU_op : IsOpen U\nx_in : x ∈ U\n⊢ Set.Nonempty (U ∩ s)\n[PROOFSTEP]\nexact h U U_op ⟨_, x_in⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\n⊢ Dense {x}ᶜ ↔ ¬IsOpen {x}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\n⊢ Dense {x}ᶜ → ¬IsOpen {x}\n[PROOFSTEP]\nintro hd ho\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nhd : Dense {x}ᶜ\nho : IsOpen {x}\n⊢ False\n[PROOFSTEP]\nexact (hd.inter_open_nonempty _ ho (singleton_nonempty _)).ne_empty (inter_compl_self _)\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\n⊢ ¬IsOpen {x} → Dense {x}ᶜ\n[PROOFSTEP]\nrefine' fun ho => dense_iff_inter_open.2 fun U hU hne => inter_compl_nonempty_iff.2 fun hUx => _\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nho : ¬IsOpen {x}\nU : Set α\nhU : IsOpen U\nhne : Set.Nonempty U\nhUx : U ⊆ {x}\n⊢ False\n[PROOFSTEP]\nobtain rfl : U = { x }\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nho : ¬IsOpen {x}\nU : Set α\nhU : IsOpen U\nhne : Set.Nonempty U\nhUx : U ⊆ {x}\n⊢ U = {x}\ncase mpr\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nho : ¬IsOpen {x}\nhU : IsOpen {x}\nhne : Set.Nonempty {x}\nhUx : {x} ⊆ {x}\n⊢ False\n[PROOFSTEP]\nexact eq_singleton_iff_nonempty_unique_mem.2 ⟨hne, hUx⟩\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nho : ¬IsOpen {x}\nhU : IsOpen {x}\nhne : Set.Nonempty {x}\nhUx : {x} ⊆ {x}\n⊢ False\n[PROOFSTEP]\nexact ho hU\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ closure s \\ frontier s = interior s\n[PROOFSTEP]\nrw [frontier, diff_diff_right_self, inter_eq_self_of_subset_right interior_subset_closure]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ s \\ frontier s = interior s\n[PROOFSTEP]\nrw [frontier, diff_diff_right, diff_eq_empty.2 subset_closure, inter_eq_self_of_subset_right interior_subset,\n  empty_union]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ frontier s = closure s ∩ closure sᶜ\n[PROOFSTEP]\nrw [closure_compl, frontier, diff_eq]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ frontier sᶜ = frontier s\n[PROOFSTEP]\nsimp only [frontier_eq_closure_inter_closure, compl_compl, inter_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\n⊢ frontier univ = ∅\n[PROOFSTEP]\nsimp [frontier]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\n⊢ frontier ∅ = ∅\n[PROOFSTEP]\nsimp [frontier]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\n⊢ frontier (s ∩ t) ⊆ frontier s ∩ closure t ∪ closure s ∩ frontier t\n[PROOFSTEP]\nsimp only [frontier_eq_closure_inter_closure, compl_inter, closure_union]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\n⊢ closure (s ∩ t) ∩ (closure sᶜ ∪ closure tᶜ) ⊆\n    closure s ∩ closure sᶜ ∩ closure t ∪ closure s ∩ (closure t ∩ closure tᶜ)\n[PROOFSTEP]\nrefine' (inter_subset_inter_left _ (closure_inter_subset_inter_closure s t)).trans_eq _\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\n⊢ closure s ∩ closure t ∩ (closure sᶜ ∪ closure tᶜ) =\n    closure s ∩ closure sᶜ ∩ closure t ∪ closure s ∩ (closure t ∩ closure tᶜ)\n[PROOFSTEP]\nsimp only [inter_distrib_left, inter_distrib_right, inter_assoc, inter_comm (closure t)]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\n⊢ frontier (s ∪ t) ⊆ frontier s ∩ closure tᶜ ∪ closure sᶜ ∩ frontier t\n[PROOFSTEP]\nsimpa only [frontier_compl, ← compl_union] using frontier_inter_subset sᶜ tᶜ\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nhs : IsClosed s\n⊢ frontier s = s \\ interior s\n[PROOFSTEP]\nrw [frontier, hs.closure_eq]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nhs : IsOpen s\n⊢ frontier s = closure s \\ s\n[PROOFSTEP]\nrw [frontier, hs.interior_eq]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nhs : IsOpen s\n⊢ s ∩ frontier s = ∅\n[PROOFSTEP]\nrw [hs.frontier_eq, inter_diff_self]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ IsClosed (frontier s)\n[PROOFSTEP]\nrw [frontier_eq_closure_inter_closure]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ IsClosed (closure s ∩ closure sᶜ)\n[PROOFSTEP]\nexact IsClosed.inter isClosed_closure isClosed_closure\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : IsClosed s\n⊢ interior (frontier s) = ∅\n[PROOFSTEP]\nhave A : frontier s = s \\ interior s := h.frontier_eq\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : IsClosed s\nA : frontier s = s \\ interior s\n⊢ interior (frontier s) = ∅\n[PROOFSTEP]\nhave B : interior (frontier s) ⊆ interior s := by rw [A]; exact interior_mono (diff_subset _ _)\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : IsClosed s\nA : frontier s = s \\ interior s\n⊢ interior (frontier s) ⊆ interior s\n[PROOFSTEP]\nrw [A]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : IsClosed s\nA : frontier s = s \\ interior s\n⊢ interior (s \\ interior s) ⊆ interior s\n[PROOFSTEP]\nexact interior_mono (diff_subset _ _)\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : IsClosed s\nA : frontier s = s \\ interior s\nB : interior (frontier s) ⊆ interior s\n⊢ interior (frontier s) = ∅\n[PROOFSTEP]\nhave C : interior (frontier s) ⊆ frontier s := interior_subset\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : IsClosed s\nA : frontier s = s \\ interior s\nB : interior (frontier s) ⊆ interior s\nC : interior (frontier s) ⊆ frontier s\n⊢ interior (frontier s) = ∅\n[PROOFSTEP]\nhave : interior (frontier s) ⊆ interior s ∩ (s \\ interior s) := subset_inter B (by simpa [A] using C)\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : IsClosed s\nA : frontier s = s \\ interior s\nB : interior (frontier s) ⊆ interior s\nC : interior (frontier s) ⊆ frontier s\n⊢ interior (frontier s) ⊆ s \\ interior s\n[PROOFSTEP]\nsimpa [A] using C\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nh : IsClosed s\nA : frontier s = s \\ interior s\nB : interior (frontier s) ⊆ interior s\nC : interior (frontier s) ⊆ frontier s\nthis : interior (frontier s) ⊆ interior s ∩ (s \\ interior s)\n⊢ interior (frontier s) = ∅\n[PROOFSTEP]\nrwa [inter_diff_self, subset_empty_iff] at this \n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ frontier s = (interior s)ᶜ ∩ (interior sᶜ)ᶜ\n[PROOFSTEP]\nrw [← frontier_compl, ← closure_compl]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ frontier sᶜ = closure sᶜ ∩ (interior sᶜ)ᶜ\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ (frontier s)ᶜ = interior s ∪ interior sᶜ\n[PROOFSTEP]\nrw [frontier_eq_inter_compl_interior]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ ((interior s)ᶜ ∩ (interior sᶜ)ᶜ)ᶜ = interior s ∪ interior sᶜ\n[PROOFSTEP]\nsimp only [compl_inter, compl_compl]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\n⊢ 𝓝 a = ⨅ (s : Set α) (_ : IsOpen s) (_ : a ∈ s), 𝓟 s\n[PROOFSTEP]\nsimp only [nhds_def, mem_setOf_eq, @and_comm (a ∈ _), iInf_and]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\n⊢ HasBasis (𝓝 a) (fun s => a ∈ s ∧ IsOpen s) fun s => s\n[PROOFSTEP]\nrw [nhds_def]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\n⊢ HasBasis (⨅ (s : Set α) (_ : s ∈ {s | a ∈ s ∧ IsOpen s}), 𝓟 s) (fun s => a ∈ s ∧ IsOpen s) fun s => s\n[PROOFSTEP]\nexact\n  hasBasis_biInf_principal\n    (fun s ⟨has, hs⟩ t ⟨hat, ht⟩ =>\n      ⟨s ∩ t, ⟨⟨has, hat⟩, IsOpen.inter hs ht⟩, ⟨inter_subset_left _ _, inter_subset_right _ _⟩⟩)\n    ⟨univ, ⟨mem_univ a, isOpen_univ⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\nt : Set α\n⊢ (∃ x, (a ∈ xᶜ ∧ IsOpen xᶜ) ∧ xᶜ ⊆ t) ↔ ∃ i, (¬a ∈ i ∧ IsClosed i) ∧ iᶜ ⊆ t\n[PROOFSTEP]\nsimp only [isOpen_compl_iff, mem_compl_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : Filter α\na : α\n⊢ f ≤ 𝓝 a ↔ ∀ (s : Set α), a ∈ s → IsOpen s → s ∈ f\n[PROOFSTEP]\nsimp [nhds_def]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : Filter α\na : α\ns : Set α\nh : a ∈ s\no : IsOpen s\nsf : 𝓟 s ≤ f\n⊢ 𝓝 a ≤ f\n[PROOFSTEP]\nrw [nhds_def]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : Filter α\na : α\ns : Set α\nh : a ∈ s\no : IsOpen s\nsf : 𝓟 s ≤ f\n⊢ ⨅ (s : Set α) (_ : s ∈ {s | a ∈ s ∧ IsOpen s}), 𝓟 s ≤ f\n[PROOFSTEP]\nexact iInf₂_le_of_le s ⟨h, o⟩ sf\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\np : α → Prop\n⊢ (∃ t, t ⊆ {x | (fun x => p x) x} ∧ IsOpen t ∧ a ∈ t) ↔ ∃ t, (∀ (x : α), x ∈ t → p x) ∧ IsOpen t ∧ a ∈ t\n[PROOFSTEP]\nsimp only [subset_def, exists_prop, mem_setOf_eq]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\n⊢ HasBasis (𝓝 a) (fun s => s ∈ 𝓝 a ∧ IsOpen s) fun x => x\n[PROOFSTEP]\nconvert nhds_basis_opens a using 2\n[GOAL]\ncase h.e'_4.h.a\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\nx✝ : Set α\n⊢ x✝ ∈ 𝓝 a ∧ IsOpen x✝ ↔ a ∈ x✝ ∧ IsOpen x✝\n[PROOFSTEP]\nexact and_congr_left_iff.2 IsOpen.mem_nhds_iff\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns U : Set α\nh : U ∈ ⨆ (x : α) (_ : x ∈ s), 𝓝 x\n⊢ ∀ (x : α), x ∈ s → U ∈ 𝓝 x\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\np : α → Prop\na : α\n⊢ (∃ᶠ (y : α) in 𝓝 a, ∃ᶠ (x : α) in 𝓝 y, p x) ↔ ∃ᶠ (x : α) in 𝓝 a, p x\n[PROOFSTEP]\nrw [← not_iff_not]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\np : α → Prop\na : α\n⊢ (¬∃ᶠ (y : α) in 𝓝 a, ∃ᶠ (x : α) in 𝓝 y, p x) ↔ ¬∃ᶠ (x : α) in 𝓝 a, p x\n[PROOFSTEP]\nsimp only [not_frequently, eventually_eventually_nhds]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nP : Set α → Prop\nhP : ∀ (s t : Set α), s ⊆ t → P s → P t\n⊢ (∀ (i : Set α), x ∈ i ∧ IsOpen i → P i) ↔ ∀ (s : Set α), IsOpen s → x ∈ s → P s\n[PROOFSTEP]\nsimp only [@and_comm (x ∈ _), and_imp]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝² : TopologicalSpace α\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nf : β → α\na : α\n⊢ (∀ (ib : Set α), a ∈ ib ∧ IsOpen ib → ∃ ia, True ∧ ∀ (x : β), x ∈ Ici ia → f x ∈ ib) ↔\n    ∀ (U : Set α), a ∈ U → IsOpen U → ∃ N, ∀ (n : β), N ≤ n → f n ∈ U\n[PROOFSTEP]\nsimp only [and_imp, exists_prop, true_and_iff, mem_Ici, ge_iff_le]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nF : Filter α\n⊢ ClusterPt x F ↔ ¬Disjoint (𝓝 x) F\n[PROOFSTEP]\nrw [disjoint_iff, ClusterPt, neBot_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\ns : Set α\n⊢ ClusterPt x (𝓟 s) ↔ ∃ᶠ (y : α) in 𝓝 x, y ∈ s\n[PROOFSTEP]\nsimp only [clusterPt_principal_iff, frequently_iff, Set.Nonempty, exists_prop, mem_inter_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nx : α\nf : Filter α\nH : f ≤ 𝓝 x\ninst✝ : NeBot f\n⊢ ClusterPt x f\n[PROOFSTEP]\nrwa [ClusterPt, inf_eq_right.mpr H]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nf : Filter α\nH : 𝓝 x ≤ f\n⊢ ClusterPt x f\n[PROOFSTEP]\nsimp only [ClusterPt, inf_eq_left.mpr H, nhds_neBot]\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nι : Type u_1\nx : α\nF : Filter ι\nu : ι → α\n⊢ MapClusterPt x F u ↔ ∀ (s : Set α), s ∈ 𝓝 x → ∃ᶠ (a : ι) in F, u a ∈ s\n[PROOFSTEP]\nsimp_rw [MapClusterPt, ClusterPt, inf_neBot_iff_frequently_left, frequently_map]\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nι : Type u_1\nx : α\nF : Filter ι\nu : ι → α\n⊢ (∀ {p : α → Prop}, (∀ᶠ (x : α) in 𝓝 x, p x) → ∃ᶠ (a : ι) in F, p (u a)) ↔\n    ∀ (s : Set α), s ∈ 𝓝 x → ∃ᶠ (a : ι) in F, u a ∈ s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nι : Type u_1\nδ : Type u_2\nF : Filter ι\nφ : δ → ι\np : Filter δ\nx : α\nu : ι → α\ninst✝ : NeBot p\nh : Tendsto φ p F\nH : Tendsto (u ∘ φ) p (𝓝 x)\n⊢ MapClusterPt x F u\n[PROOFSTEP]\nhave :=\n  calc\n    map (u ∘ φ) p = map u (map φ p) := map_map\n    _ ≤ map u F := map_mono h\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nι : Type u_1\nδ : Type u_2\nF : Filter ι\nφ : δ → ι\np : Filter δ\nx : α\nu : ι → α\ninst✝ : NeBot p\nh : Tendsto φ p F\nH : Tendsto (u ∘ φ) p (𝓝 x)\nthis : map (u ∘ φ) p ≤ map u F\n⊢ MapClusterPt x F u\n[PROOFSTEP]\nhave : map (u ∘ φ) p ≤ 𝓝 x ⊓ map u F := le_inf H this\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nι : Type u_1\nδ : Type u_2\nF : Filter ι\nφ : δ → ι\np : Filter δ\nx : α\nu : ι → α\ninst✝ : NeBot p\nh : Tendsto φ p F\nH : Tendsto (u ∘ φ) p (𝓝 x)\nthis✝ : map (u ∘ φ) p ≤ map u F\nthis : map (u ∘ φ) p ≤ 𝓝 x ⊓ map u F\n⊢ MapClusterPt x F u\n[PROOFSTEP]\nexact neBot_of_le this\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nF : Filter α\n⊢ AccPt x F ↔ ClusterPt x (𝓟 {x}ᶜ ⊓ F)\n[PROOFSTEP]\nrw [AccPt, nhdsWithin, ClusterPt, inf_assoc]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nC : Set α\n⊢ AccPt x (𝓟 C) ↔ ClusterPt x (𝓟 (C \\ {x}))\n[PROOFSTEP]\nrw [acc_iff_cluster, inf_principal, inter_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nC : Set α\n⊢ ClusterPt x (𝓟 (C ∩ {x}ᶜ)) ↔ ClusterPt x (𝓟 (C \\ {x}))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nC : Set α\n⊢ AccPt x (𝓟 C) ↔ ∀ (U : Set α), U ∈ 𝓝 x → ∃ y, y ∈ U ∩ C ∧ y ≠ x\n[PROOFSTEP]\nsimp [acc_principal_iff_cluster, clusterPt_principal_iff, Set.Nonempty, exists_prop, and_assoc, @and_comm (¬_ = x)]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nx : α\nC : Set α\n⊢ AccPt x (𝓟 C) ↔ ∃ᶠ (y : α) in 𝓝 x, y ≠ x ∧ y ∈ C\n[PROOFSTEP]\nsimp [acc_principal_iff_cluster, clusterPt_principal_iff_frequently, and_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nx : α\n⊢ x ∈ interior s ↔ x ∈ {a | s ∈ 𝓝 a}\n[PROOFSTEP]\nsimp only [mem_interior, mem_nhds_iff, mem_setOf_eq]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ {a | s ∈ 𝓝 a} = {a | 𝓝 a ≤ 𝓟 s}\n[PROOFSTEP]\nsimp only [le_principal_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\np : α → Prop\n⊢ IsOpen {x | ∀ᶠ (y : α) in 𝓝 x, p y}\n[PROOFSTEP]\nsimp only [← interior_setOf_eq, isOpen_interior]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns V : Set α\n⊢ s ⊆ interior V ↔ ∀ (x : α), x ∈ s → V ∈ 𝓝 x\n[PROOFSTEP]\nsimp_rw [subset_def, mem_interior_iff_mem_nhds]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ s ⊆ interior s ↔ ∀ (a : α), a ∈ s → 𝓝 a ≤ 𝓟 s\n[PROOFSTEP]\nrw [interior_eq_nhds]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ s ⊆ {a | 𝓝 a ≤ 𝓟 s} ↔ ∀ (a : α), a ∈ s → 𝓝 a ≤ 𝓟 s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ IsOpen s ↔ ∀ (x : α), x ∈ s → ∀ (l : Ultrafilter α), ↑l ≤ 𝓝 x → s ∈ l\n[PROOFSTEP]\nsimp_rw [isOpen_iff_mem_nhds, ← mem_iff_ultrafilter]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\n⊢ IsOpen {a} ↔ 𝓝 a = pure a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\n⊢ IsOpen {a} → 𝓝 a = pure a\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\nh : IsOpen {a}\n⊢ 𝓝 a = pure a\n[PROOFSTEP]\napply le_antisymm _ (pure_le_nhds a)\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\nh : IsOpen {a}\n⊢ 𝓝 a ≤ pure a\n[PROOFSTEP]\nrw [le_pure_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\nh : IsOpen {a}\n⊢ {a} ∈ 𝓝 a\n[PROOFSTEP]\nexact h.mem_nhds (mem_singleton a)\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\n⊢ 𝓝 a = pure a → IsOpen {a}\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\nh : 𝓝 a = pure a\n⊢ IsOpen {a}\n[PROOFSTEP]\nsimp [isOpen_iff_nhds, h]\n[GOAL]\nα✝ : Type u\nβ : Type v\nι : Sort w\na✝ : α✝\ns s₁ s₂ t : Set α✝\np p₁ p₂ : α✝ → Prop\ninst✝¹ : TopologicalSpace α✝\nα : Type u_1\ninst✝ : TopologicalSpace α\na : α\n⊢ IsOpen {a} ↔ 𝓝[{a}ᶜ] a = ⊥\n[PROOFSTEP]\nrw [isOpen_singleton_iff_nhds_eq_pure, nhdsWithin, ← mem_iff_inf_principal_compl, ← le_pure_iff, nhds_neBot.le_pure_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\na : α\n⊢ a ∈ closure s ↔ ∃ᶠ (x : α) in 𝓝 a, x ∈ s\n[PROOFSTEP]\nrw [Filter.Frequently, Filter.Eventually, ← mem_interior_iff_mem_nhds, closure_eq_compl_interior_compl]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\na : α\n⊢ a ∈ (interior sᶜ)ᶜ ↔ ¬a ∈ interior {x | ¬x ∈ s}\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ IsClosed s ↔ ∀ (x : α), (∃ᶠ (y : α) in 𝓝 x, y ∈ s) → x ∈ s\n[PROOFSTEP]\nrw [← closure_subset_iff_isClosed]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ closure s ⊆ s ↔ ∀ (x : α), (∃ᶠ (y : α) in 𝓝 x, y ∈ s) → x ∈ s\n[PROOFSTEP]\nrefine' forall_congr' fun x => _\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nx : α\n⊢ x ∈ closure s → x ∈ s ↔ (∃ᶠ (y : α) in 𝓝 x, y ∈ s) → x ∈ s\n[PROOFSTEP]\nrw [mem_closure_iff_frequently]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : Filter α\n⊢ IsClosed {x | ClusterPt x f}\n[PROOFSTEP]\nsimp only [ClusterPt, inf_neBot_iff_frequently_left, setOf_forall, imp_iff_not_or]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : Filter α\n⊢ IsClosed (⋂ (i : α → Prop), {x | (¬∀ᶠ (x : α) in 𝓝 x, i x) ∨ ∃ᶠ (x : α) in f, i x})\n[PROOFSTEP]\nrefine' isClosed_iInter fun p => IsClosed.union _ _\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : Filter α\np : α → Prop\n⊢ IsClosed fun x => (∀ᶠ (x : α) in 𝓝 x, p x) → False\n[PROOFSTEP]\napply isClosed_compl_iff.2\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : Filter α\np : α → Prop\n⊢ IsClosed fun x => (∀ᶠ (x : α) in f, ¬(fun x => p x) x) → False\n[PROOFSTEP]\napply isClosed_compl_iff.2\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : Filter α\np : α → Prop\n⊢ IsOpen fun x => sets (𝓝 x) {x | (fun x => p x) x}\ncase refine'_2\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : Filter α\np : α → Prop\n⊢ IsOpen fun x => sets f {x | (fun x => ¬(fun x => p x) x) x}\n[PROOFSTEP]\nexacts [isOpen_setOf_eventually_nhds, isOpen_const]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nx : α\ninst✝ : NeBot (𝓝[{x}ᶜ] x)\n⊢ Dense {x}ᶜ\n[PROOFSTEP]\nintro y\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nx : α\ninst✝ : NeBot (𝓝[{x}ᶜ] x)\ny : α\n⊢ y ∈ closure {x}ᶜ\n[PROOFSTEP]\nrcases eq_or_ne y x with (rfl | hne)\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\ny : α\ninst✝ : NeBot (𝓝[{y}ᶜ] y)\n⊢ y ∈ closure {y}ᶜ\n[PROOFSTEP]\nrwa [mem_closure_iff_nhdsWithin_neBot]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝¹ : TopologicalSpace α\nx : α\ninst✝ : NeBot (𝓝[{x}ᶜ] x)\ny : α\nhne : y ≠ x\n⊢ y ∈ closure {x}ᶜ\n[PROOFSTEP]\nexact subset_closure hne\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\na : α\n⊢ a ∈ closure s ↔ ∀ (t : Set α), t ∈ 𝓝 a → ∃ y, ↑y ∈ t\n[PROOFSTEP]\nsimp only [mem_closure_iff_nhds, Set.inter_nonempty_iff_exists_right, SetCoe.exists, exists_prop]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nA : Set α\nx : α\n⊢ x ∈ closure A ↔ NeBot (comap Subtype.val (𝓝 x))\n[PROOFSTEP]\nsimp_rw [mem_closure_iff_nhds, comap_neBot_iff, Set.inter_nonempty_iff_exists_right, SetCoe.exists, exists_prop]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t✝ : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\np : ι → Prop\ns : ι → Set α\nh : HasBasis (𝓝 a) p s\nt : Set α\n⊢ (∀ ⦃i : ι⦄, p i → ∀ ⦃j : Unit⦄, True → Set.Nonempty (s i ∩ t)) ↔ ∀ (i : ι), p i → Set.Nonempty (s i ∩ t)\n[PROOFSTEP]\nsimp only [exists_prop, forall_const]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t✝ : Set α\np✝ p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\na : α\np : ι → Prop\ns : ι → Set α\nh : HasBasis (𝓝 a) p s\nt : Set α\n⊢ (∀ (i : ι), p i → Set.Nonempty (s i ∩ t)) ↔ ∀ (i : ι), p i → ∃ y, y ∈ t ∧ y ∈ s i\n[PROOFSTEP]\nsimp only [Set.Nonempty, mem_inter_iff, exists_prop, and_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nF : Filter α\na : α\n⊢ ClusterPt a F ↔ ∀ (s : Set α), s ∈ F → a ∈ closure s\n[PROOFSTEP]\nsimp_rw [ClusterPt, inf_neBot_iff, mem_closure_iff_nhds]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nF : Filter α\na : α\n⊢ (∀ ⦃s : Set α⦄, s ∈ 𝓝 a → ∀ ⦃s' : Set α⦄, s' ∈ F → Set.Nonempty (s ∩ s')) ↔\n    ∀ (s : Set α), s ∈ F → ∀ (t : Set α), t ∈ 𝓝 a → Set.Nonempty (t ∩ s)\n[PROOFSTEP]\nrw [forall₂_swap]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nF : Filter α\na : α\n⊢ ClusterPt a F ↔ pure a ≤ Filter.lift' F closure\n[PROOFSTEP]\nsimp_rw [clusterPt_iff_forall_mem_closure, (hasBasis_pure _).le_basis_iff F.basis_sets.lift'_closure, id,\n  singleton_subset_iff, true_and, exists_const]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nF : Filter α\na : α\n⊢ ClusterPt a F ↔ NeBot (Filter.lift' F closure ⊓ pure a)\n[PROOFSTEP]\nrw [clusterPt_iff_lift'_closure, ← Ultrafilter.coe_pure, inf_comm, Ultrafilter.inf_neBot_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nF : Filter α\na : α\n⊢ ClusterPt a (Filter.lift' F closure) ↔ ClusterPt a F\n[PROOFSTEP]\nsimp [clusterPt_iff_lift'_closure, lift'_lift'_assoc (monotone_closure α) (monotone_closure α)]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\nx : α\n⊢ x ∈ closure s ↔ ∃ u, s ∈ u ∧ ↑u ≤ 𝓝 x\n[PROOFSTEP]\nsimp [closure_eq_cluster_pts, ClusterPt, ← exists_ultrafilter_iff, and_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ closure s ⊆ s ↔ ∀ (a : α), ClusterPt a (𝓟 s) → a ∈ s\n[PROOFSTEP]\nsimp only [subset_def, mem_closure_iff_clusterPt]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns : Set α\n⊢ IsClosed s ↔ ∀ (x : α), (∀ (U : Set α), U ∈ 𝓝 x → Set.Nonempty (U ∩ s)) → x ∈ s\n[PROOFSTEP]\nsimp_rw [isClosed_iff_clusterPt, ClusterPt, inf_principal_neBot_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\nh : IsClosed t\n⊢ interior (s ∪ t) ⊆ interior s ∪ t\n[PROOFSTEP]\nsimpa only [union_comm _ t] using h.interior_union_left\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\nh : IsOpen s\n⊢ (closure (s ∩ t))ᶜ ⊆ (s ∩ closure t)ᶜ\n[PROOFSTEP]\nsimpa only [← interior_compl, compl_inter] using IsClosed.interior_union_left h.isClosed_compl\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\nh : IsOpen t\n⊢ closure s ∩ t ⊆ closure (s ∩ t)\n[PROOFSTEP]\nsimpa only [inter_comm t] using h.inter_closure\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\nhs : Dense s\nht : IsOpen t\n⊢ t = t ∩ closure s\n[PROOFSTEP]\nrw [hs.closure_eq, inter_univ]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁✝ s₂✝ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns₁ s₂ : Set α\nx : α\nh : x ∈ closure (s₁ ∪ s₂)\nh₁ : s₁ᶜ ∈ 𝓝 x\n⊢ x ∈ closure s₂\n[PROOFSTEP]\nrw [mem_closure_iff_nhds_neBot] at *\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁✝ s₂✝ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns₁ s₂ : Set α\nx : α\nh : 𝓝 x ⊓ 𝓟 (s₁ ∪ s₂) ≠ ⊥\nh₁ : s₁ᶜ ∈ 𝓝 x\n⊢ 𝓝 x ⊓ 𝓟 s₂ ≠ ⊥\n[PROOFSTEP]\nrwa [←\n  calc\n    𝓝 x ⊓ principal (s₁ ∪ s₂) = 𝓝 x ⊓ (principal s₁ ⊔ principal s₂) := by rw [sup_principal]\n    _ = 𝓝 x ⊓ principal s₁ ⊔ 𝓝 x ⊓ principal s₂ := inf_sup_left\n    _ = ⊥ ⊔ 𝓝 x ⊓ principal s₂ := by rw [inf_principal_eq_bot.mpr h₁]\n    _ = 𝓝 x ⊓ principal s₂ := bot_sup_eq]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁✝ s₂✝ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns₁ s₂ : Set α\nx : α\nh : 𝓝 x ⊓ 𝓟 (s₁ ∪ s₂) ≠ ⊥\nh₁ : s₁ᶜ ∈ 𝓝 x\n⊢ 𝓝 x ⊓ 𝓟 (s₁ ∪ s₂) = 𝓝 x ⊓ (𝓟 s₁ ⊔ 𝓟 s₂)\n[PROOFSTEP]\nrw [sup_principal]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns s₁✝ s₂✝ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns₁ s₂ : Set α\nx : α\nh : 𝓝 x ⊓ 𝓟 (s₁ ∪ s₂) ≠ ⊥\nh₁ : s₁ᶜ ∈ 𝓝 x\n⊢ 𝓝 x ⊓ 𝓟 s₁ ⊔ 𝓝 x ⊓ 𝓟 s₂ = ⊥ ⊔ 𝓝 x ⊓ 𝓟 s₂\n[PROOFSTEP]\nrw [inf_principal_eq_bot.mpr h₁]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\nhs : Dense s\nht : Dense t\nhso : IsOpen s\nx : α\n⊢ x ∈ closure (s ∩ closure t)\n[PROOFSTEP]\nsimp [hs.closure_eq, ht.closure_eq]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\n⊢ closure s \\ closure t = (closure t)ᶜ ∩ closure s\n[PROOFSTEP]\nsimp only [diff_eq, inter_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\ns t : Set α\n⊢ closure ((closure t)ᶜ ∩ s) = closure (s \\ closure t)\n[PROOFSTEP]\nsimp only [diff_eq, inter_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : β → α\nl : Filter β\ns : Set β\na : α\nh : ∀ (x : β), ¬x ∈ s → f x = a\n⊢ Tendsto f (l ⊓ 𝓟 s) (𝓝 a) ↔ Tendsto f l (𝓝 a)\n[PROOFSTEP]\nrw [tendsto_iff_comap, tendsto_iff_comap]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : β → α\nl : Filter β\ns : Set β\na : α\nh : ∀ (x : β), ¬x ∈ s → f x = a\n⊢ l ⊓ 𝓟 s ≤ comap f (𝓝 a) ↔ l ≤ comap f (𝓝 a)\n[PROOFSTEP]\nreplace h : 𝓟 sᶜ ≤ comap f (𝓝 a)\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : β → α\nl : Filter β\ns : Set β\na : α\nh : ∀ (x : β), ¬x ∈ s → f x = a\n⊢ 𝓟 sᶜ ≤ comap f (𝓝 a)\n[PROOFSTEP]\nrintro U ⟨t, ht, htU⟩ x hx\n[GOAL]\ncase h.intro.intro\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : β → α\nl : Filter β\ns : Set β\na : α\nh : ∀ (x : β), ¬x ∈ s → f x = a\nU : Set β\nt : Set α\nht : t ∈ 𝓝 a\nhtU : f ⁻¹' t ⊆ U\nx : β\nhx : x ∈ sᶜ\n⊢ x ∈ U\n[PROOFSTEP]\nhave : f x ∈ t := (h x hx).symm ▸ mem_of_mem_nhds ht\n[GOAL]\ncase h.intro.intro\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t✝ : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : β → α\nl : Filter β\ns : Set β\na : α\nh : ∀ (x : β), ¬x ∈ s → f x = a\nU : Set β\nt : Set α\nht : t ∈ 𝓝 a\nhtU : f ⁻¹' t ⊆ U\nx : β\nhx : x ∈ sᶜ\nthis : f x ∈ t\n⊢ x ∈ U\n[PROOFSTEP]\nexact htU this\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : β → α\nl : Filter β\ns : Set β\na : α\nh : 𝓟 sᶜ ≤ comap f (𝓝 a)\n⊢ l ⊓ 𝓟 s ≤ comap f (𝓝 a) ↔ l ≤ comap f (𝓝 a)\n[PROOFSTEP]\nrefine' ⟨fun h' => _, le_trans inf_le_left⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : β → α\nl : Filter β\ns : Set β\na : α\nh : 𝓟 sᶜ ≤ comap f (𝓝 a)\nh' : l ⊓ 𝓟 s ≤ comap f (𝓝 a)\n⊢ l ≤ comap f (𝓝 a)\n[PROOFSTEP]\nhave := sup_le h' h\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : β → α\nl : Filter β\ns : Set β\na : α\nh : 𝓟 sᶜ ≤ comap f (𝓝 a)\nh' : l ⊓ 𝓟 s ≤ comap f (𝓝 a)\nthis : l ⊓ 𝓟 s ⊔ 𝓟 sᶜ ≤ comap f (𝓝 a)\n⊢ l ≤ comap f (𝓝 a)\n[PROOFSTEP]\nrw [sup_inf_right, sup_principal, union_compl_self, principal_univ, inf_top_eq, sup_le_iff] at this \n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\na✝ : α\ns✝ s₁ s₂ t : Set α\np p₁ p₂ : α → Prop\ninst✝ : TopologicalSpace α\nf : β → α\nl : Filter β\ns : Set β\na : α\nh : 𝓟 sᶜ ≤ comap f (𝓝 a)\nh' : l ⊓ 𝓟 s ≤ comap f (𝓝 a)\nthis : l ≤ comap f (𝓝 a) ∧ 𝓟 sᶜ ≤ comap f (𝓝 a)\n⊢ l ≤ comap f (𝓝 a)\n[PROOFSTEP]\nexact this.1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf g : α → β\nh : Continuous f\nh' : ∀ (x : α), f x = g x\n⊢ Continuous g\n[PROOFSTEP]\nconvert h\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf g : α → β\nh : Continuous f\nh' : ∀ (x : α), f x = g x\n⊢ g = f\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf g : α → β\nh : Continuous f\nh' : ∀ (x : α), f x = g x\nx✝ : α\n⊢ g x✝ = f x✝\n[PROOFSTEP]\nrw [h']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf g : α → β\nx : α\nh : f =ᶠ[𝓝 x] g\n⊢ ContinuousAt f x ↔ ContinuousAt g x\n[PROOFSTEP]\nsimp only [ContinuousAt, tendsto_congr' h, h.eq_of_nhds]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nM₀ : Type u_5\ninst✝ : Zero M₀\na : α\nf : α → M₀\n⊢ f =ᶠ[𝓝 a] 0 ↔ ¬a ∈ closure (Function.support f)\n[PROOFSTEP]\nrw [← mem_compl_iff, ← interior_compl, mem_interior_iff_mem_nhds, Function.compl_support]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nM₀ : Type u_5\ninst✝ : Zero M₀\na : α\nf : α → M₀\n⊢ f =ᶠ[𝓝 a] 0 ↔ {x | f x = 0} ∈ 𝓝 a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng : β → γ\nf : α → β\nx : α\ny : β\nhg : ContinuousAt g y\nhf : ContinuousAt f x\nhy : f x = y\n⊢ ContinuousAt (g ∘ f) x\n[PROOFSTEP]\nsubst hy\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ng : β → γ\nf : α → β\nx : α\nhf : ContinuousAt f x\nhg : ContinuousAt g (f x)\n⊢ ContinuousAt (g ∘ f) x\n[PROOFSTEP]\nexact hg.comp hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α → β\n⊢ (∀ (x : Set β), IsOpen xᶜ → IsOpen (f ⁻¹' xᶜ)) ↔ ∀ (s : Set β), IsClosed s → IsClosed (f ⁻¹' s)\n[PROOFSTEP]\nsimp only [isOpen_compl_iff, preimage_compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α → β\n⊢ Continuous f ↔ ∀ (x : α) (g : Ultrafilter α), ↑g ≤ 𝓝 x → Tendsto f (↑g) (𝓝 (f x))\n[PROOFSTEP]\nsimp only [continuous_iff_continuousAt, continuousAt_iff_ultrafilter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α → β\nhf : Continuous f\nt : Set β\n⊢ closure (f ⁻¹' t) ⊆ f ⁻¹' closure t\n[PROOFSTEP]\nrw [← (isClosed_closure.preimage hf).closure_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α → β\nhf : Continuous f\nt : Set β\n⊢ closure (f ⁻¹' t) ⊆ closure (f ⁻¹' closure t)\n[PROOFSTEP]\nexact closure_mono (preimage_mono subset_closure)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nt : Set β\nf : α → β\nh : MapsTo f s t\nhc : Continuous f\n⊢ MapsTo f (closure s) (closure t)\n[PROOFSTEP]\nsimp only [MapsTo, mem_closure_iff_clusterPt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\ns : Set α\nt : Set β\nf : α → β\nh : MapsTo f s t\nhc : Continuous f\n⊢ ∀ ⦃x : α⦄, ClusterPt x (𝓟 s) → ClusterPt (f x) (𝓟 t)\n[PROOFSTEP]\nexact fun x hx => hx.map hc.continuousAt (tendsto_principal_principal.2 h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α → β\ns : Set α\nh : Continuous f\n⊢ closure s ⊆ f ⁻¹' closure (f '' s)\n[PROOFSTEP]\nrw [← Set.image_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α → β\ns : Set α\nh : Continuous f\n⊢ f '' closure s ⊆ closure (f '' s)\n[PROOFSTEP]\nexact image_closure_subset_closure_image h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nκ : Type u_5\nι : Type u_6\nf : κ → β\ng : β → γ\nhf : Surjective f\nx : β\n⊢ x ∈ closure (range f)\n[PROOFSTEP]\nsimp [hf.range_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nκ : Type u_5\nι : Type u_6\nf : κ → β\ng : β → γ\ns : Set α\nh : Dense s\n⊢ DenseRange Subtype.val\n[PROOFSTEP]\nsimpa only [DenseRange, Subtype.range_coe_subtype]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nκ : Type u_5\nι : Type u_6\nf✝ : κ → β\ng : β → γ\nf : α → β\nhf : Continuous f\ns : Set α\nhs : Dense s\n⊢ range f ⊆ closure (f '' s)\n[PROOFSTEP]\nrw [← image_univ, ← hs.closure_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nκ : Type u_5\nι : Type u_6\nf✝ : κ → β\ng : β → γ\nf : α → β\nhf : Continuous f\ns : Set α\nhs : Dense s\n⊢ f '' closure s ⊆ closure (f '' s)\n[PROOFSTEP]\nexact image_closure_subset_closure_image hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nκ : Type u_5\nι : Type u_6\nf : κ → β\ng : β → γ\nhf : DenseRange f\ns : Set β\nhs : IsOpen s\n⊢ s ⊆ closure (f '' (f ⁻¹' s))\n[PROOFSTEP]\nrw [image_preimage_eq_inter_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nκ : Type u_5\nι : Type u_6\nf : κ → β\ng : β → γ\nhf : DenseRange f\ns : Set β\nhs : IsOpen s\n⊢ s ⊆ closure (s ∩ range f)\n[PROOFSTEP]\nexact hf.open_subset_closure_inter hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nκ : Type u_5\nι : Type u_6\nf✝ : κ → β\ng✝ g : β → γ\nf : κ → β\nhg : DenseRange g\nhf : DenseRange f\ncg : Continuous g\n⊢ DenseRange (g ∘ f)\n[PROOFSTEP]\nrw [DenseRange, range_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nκ : Type u_5\nι : Type u_6\nf✝ : κ → β\ng✝ g : β → γ\nf : κ → β\nhg : DenseRange g\nhf : DenseRange f\ncg : Continuous g\n⊢ Dense (g '' range f)\n[PROOFSTEP]\nexact hg.dense_image cg hf\n", "meta": {"mathlib_filename": "Mathlib.Topology.Basic", "llama_tokens": 30525, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.640635868562172, "lm_q2_score": 0.6187804337438501, "lm_q1q2_score": 0.3964129406207689}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝³ : DecidableRel r\ninst✝² : IsTrans α r\ninst✝¹ : IsAntisymm α r\ninst✝ : IsTotal α r\ns : Finset α\n⊢ Nodup ↑(sort r s)\n[PROOFSTEP]\nrw [sort_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝³ : DecidableRel r\ninst✝² : IsTrans α r\ninst✝¹ : IsAntisymm α r\ninst✝ : IsTotal α r\ns : Finset α\n⊢ Nodup s.val\n[PROOFSTEP]\nexact s.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝³ : DecidableRel r\ninst✝² : IsTrans α r\ninst✝¹ : IsAntisymm α r\ninst✝ : IsTotal α r\ns : Finset α\n⊢ sort r s ~ toList s\n[PROOFSTEP]\nrw [← Multiset.coe_eq_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝³ : DecidableRel r\ninst✝² : IsTrans α r\ninst✝¹ : IsAntisymm α r\ninst✝ : IsTotal α r\ns : Finset α\n⊢ ↑(sort r s) = ↑(toList s)\n[PROOFSTEP]\nsimp only [coe_toList, sort_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : 0 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\n⊢ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) 0 h = min' s H\n[PROOFSTEP]\nlet l := s.sort (· ≤ ·)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : 0 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\n⊢ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) 0 h = min' s H\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : 0 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\n⊢ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) 0 h ≤ min' s H\n[PROOFSTEP]\nhave : s.min' H ∈ l := (Finset.mem_sort (α := α) (· ≤ ·)).mpr (s.min'_mem H)\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : 0 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\nthis : min' s H ∈ l\n⊢ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) 0 h ≤ min' s H\n[PROOFSTEP]\nobtain ⟨i, hi⟩ : ∃ i, l.get i = s.min' H := List.mem_iff_get.1 this\n[GOAL]\ncase a.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : 0 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\nthis : min' s H ∈ l\ni : Fin (List.length l)\nhi : List.get l i = min' s H\n⊢ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) 0 h ≤ min' s H\n[PROOFSTEP]\nrw [← hi]\n[GOAL]\ncase a.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : 0 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\nthis : min' s H ∈ l\ni : Fin (List.length l)\nhi : List.get l i = min' s H\n⊢ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) 0 h ≤ List.get l i\n[PROOFSTEP]\nexact (s.sort_sorted (· ≤ ·)).rel_nthLe_of_le _ _ (Nat.zero_le i)\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : 0 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\n⊢ min' s H ≤ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) 0 h\n[PROOFSTEP]\nhave : l.get ⟨0, h⟩ ∈ s := (Finset.mem_sort (α := α) (· ≤ ·)).1 (List.get_mem l 0 h)\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : 0 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\nthis : List.get l { val := 0, isLt := h } ∈ s\n⊢ min' s H ≤ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) 0 h\n[PROOFSTEP]\nexact s.min'_le _ this\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : 0 < List.length (sort (fun x x_1 => x ≤ x_1) s)\n⊢ 0 < card s\n[PROOFSTEP]\nrwa [length_sort] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : Finset.Nonempty s\n⊢ 0 < List.length (sort (fun x x_1 => x ≤ x_1) s)\n[PROOFSTEP]\nrw [length_sort]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : Finset.Nonempty s\n⊢ 0 < card s\n[PROOFSTEP]\nexact card_pos.2 h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : List.length (sort (fun x x_1 => x ≤ x_1) s) - 1 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\n⊢ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) (List.length (sort (fun x x_1 => x ≤ x_1) s) - 1) h = max' s H\n[PROOFSTEP]\nlet l := s.sort (· ≤ ·)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : List.length (sort (fun x x_1 => x ≤ x_1) s) - 1 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\n⊢ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) (List.length (sort (fun x x_1 => x ≤ x_1) s) - 1) h = max' s H\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : List.length (sort (fun x x_1 => x ≤ x_1) s) - 1 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\n⊢ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) (List.length (sort (fun x x_1 => x ≤ x_1) s) - 1) h ≤ max' s H\n[PROOFSTEP]\nhave : l.get ⟨(s.sort (· ≤ ·)).length - 1, h⟩ ∈ s := (Finset.mem_sort (α := α) (· ≤ ·)).1 (List.get_mem l _ h)\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : List.length (sort (fun x x_1 => x ≤ x_1) s) - 1 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\nthis : List.get l { val := List.length (sort (fun x x_1 => x ≤ x_1) s) - 1, isLt := h } ∈ s\n⊢ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) (List.length (sort (fun x x_1 => x ≤ x_1) s) - 1) h ≤ max' s H\n[PROOFSTEP]\nexact s.le_max' _ this\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : List.length (sort (fun x x_1 => x ≤ x_1) s) - 1 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\n⊢ max' s H ≤ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) (List.length (sort (fun x x_1 => x ≤ x_1) s) - 1) h\n[PROOFSTEP]\nhave : s.max' H ∈ l := (Finset.mem_sort (α := α) (· ≤ ·)).mpr (s.max'_mem H)\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : List.length (sort (fun x x_1 => x ≤ x_1) s) - 1 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\nthis : max' s H ∈ l\n⊢ max' s H ≤ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) (List.length (sort (fun x x_1 => x ≤ x_1) s) - 1) h\n[PROOFSTEP]\nobtain ⟨i, hi⟩ : ∃ i, l.get i = s.max' H := List.mem_iff_get.1 this\n[GOAL]\ncase a.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : List.length (sort (fun x x_1 => x ≤ x_1) s) - 1 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\nthis : max' s H ∈ l\ni : Fin (List.length l)\nhi : List.get l i = max' s H\n⊢ max' s H ≤ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) (List.length (sort (fun x x_1 => x ≤ x_1) s) - 1) h\n[PROOFSTEP]\nrw [← hi]\n[GOAL]\ncase a.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : List.length (sort (fun x x_1 => x ≤ x_1) s) - 1 < List.length (sort (fun x x_1 => x ≤ x_1) s)\nH : Finset.Nonempty s\nl : List α := sort (fun x x_1 => x ≤ x_1) s\nthis : max' s H ∈ l\ni : Fin (List.length l)\nhi : List.get l i = max' s H\n⊢ List.get l i ≤ List.nthLe (sort (fun x x_1 => x ≤ x_1) s) (List.length (sort (fun x x_1 => x ≤ x_1) s) - 1) h\n[PROOFSTEP]\nexact (s.sort_sorted (· ≤ ·)).rel_nthLe_of_le _ _ (Nat.le_pred_of_lt i.prop)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : List.length (sort (fun x x_1 => x ≤ x_1) s) - 1 < List.length (sort (fun x x_1 => x ≤ x_1) s)\n⊢ Finset.Nonempty s\n[PROOFSTEP]\nrw [length_sort] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : card s - 1 < card s\n⊢ Finset.Nonempty s\n[PROOFSTEP]\nexact card_pos.1 (lt_of_le_of_lt bot_le h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nh : Finset.Nonempty s\n⊢ List.length (sort (fun x x_1 => x ≤ x_1) s) - 1 < List.length (sort (fun x x_1 => x ≤ x_1) s)\n[PROOFSTEP]\nsimpa using Nat.sub_lt (card_pos.mpr h) zero_lt_one\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nk : ℕ\nh : card s = k\ni : Fin k\n⊢ ↑i < List.length (sort (fun x x_1 => x ≤ x_1) s)\n[PROOFSTEP]\nrw [length_sort, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nk : ℕ\nh : card s = k\ni : Fin k\n⊢ ↑i < k\n[PROOFSTEP]\nexact i.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nk : ℕ\nh : card s = k\n⊢ Set.range ↑(orderEmbOfFin s h) = ↑s\n[PROOFSTEP]\nsimp only [orderEmbOfFin, Set.range_comp ((↑) : _ → α) (s.orderIsoOfFin h), RelEmbedding.coe_trans, Set.image_univ,\n  Finset.orderEmbOfFin, RelIso.range_eq, OrderEmbedding.subtype_apply, OrderIso.coe_toOrderEmbedding, eq_self_iff_true,\n  Subtype.range_coe_subtype, Finset.setOf_mem, Finset.coe_inj]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nk : ℕ\nh : card s = k\nhz : 0 < k\n⊢ ↑(orderEmbOfFin s h) { val := 0, isLt := hz } = min' s (_ : Finset.Nonempty s)\n[PROOFSTEP]\nsimp only [orderEmbOfFin_apply, Fin.val_mk, sorted_zero_eq_min']\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nk : ℕ\nh : card s = k\nhz : 0 < k\n⊢ ↑(orderEmbOfFin s h) { val := k - 1, isLt := (_ : k - 1 < k) } = max' s (_ : Finset.Nonempty s)\n[PROOFSTEP]\nsimp [orderEmbOfFin_apply, max'_eq_sorted_last, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\na : α\ni : Fin 1\n⊢ ↑(orderEmbOfFin {a} (_ : card {a} = 1)) i = a\n[PROOFSTEP]\nrw [Subsingleton.elim i ⟨0, zero_lt_one⟩, orderEmbOfFin_zero _ zero_lt_one, min'_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nk : ℕ\nh : card s = k\nf : Fin k → α\nhfs : ∀ (x : Fin k), f x ∈ s\nhmono : StrictMono f\n⊢ f = ↑(orderEmbOfFin s h)\n[PROOFSTEP]\napply Fin.strictMono_unique hmono (s.orderEmbOfFin h).strictMono\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nk : ℕ\nh : card s = k\nf : Fin k → α\nhfs : ∀ (x : Fin k), f x ∈ s\nhmono : StrictMono f\n⊢ Set.range f = Set.range ↑(orderEmbOfFin s h)\n[PROOFSTEP]\nrw [range_orderEmbOfFin, ← Set.image_univ, ← coe_univ, ← coe_image, coe_inj]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nk : ℕ\nh : card s = k\nf : Fin k → α\nhfs : ∀ (x : Fin k), f x ∈ s\nhmono : StrictMono f\n⊢ image f univ = s\n[PROOFSTEP]\nrefine' eq_of_subset_of_card_le (fun x hx => _) _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nk : ℕ\nh : card s = k\nf : Fin k → α\nhfs : ∀ (x : Fin k), f x ∈ s\nhmono : StrictMono f\nx : α\nhx : x ∈ image f univ\n⊢ x ∈ s\n[PROOFSTEP]\nrcases mem_image.1 hx with ⟨x, _, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nk : ℕ\nh : card s = k\nf : Fin k → α\nhfs : ∀ (x : Fin k), f x ∈ s\nhmono : StrictMono f\nx : Fin k\nleft✝ : x ∈ univ\nhx : f x ∈ image f univ\n⊢ f x ∈ s\n[PROOFSTEP]\nexact hfs x\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nk : ℕ\nh : card s = k\nf : Fin k → α\nhfs : ∀ (x : Fin k), f x ∈ s\nhmono : StrictMono f\n⊢ card s ≤ card (image f univ)\n[PROOFSTEP]\nrw [h, card_image_of_injective _ hmono.injective, card_univ, Fintype.card_fin]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nk l : ℕ\ns : Finset α\ni : Fin k\nj : Fin l\nh : card s = k\nh' : card s = l\n⊢ ↑(orderEmbOfFin s h) i = ↑(orderEmbOfFin s h') j ↔ ↑i = ↑j\n[PROOFSTEP]\nsubsts k l\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\ni j : Fin (card s)\n⊢ ↑(orderEmbOfFin s (_ : card s = card s)) i = ↑(orderEmbOfFin s (_ : card s = card s)) j ↔ ↑i = ↑j\n[PROOFSTEP]\nexact (s.orderEmbOfFin rfl).eq_iff_eq.trans Fin.ext_iff\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\ns : Finset α\nk : ℕ\nh : k ≤ card s\na : Fin k\n⊢ ↑(orderEmbOfCardLe s h) a ∈ s\n[PROOFSTEP]\nsimp only [orderEmbOfCardLe, RelEmbedding.coe_trans, Finset.orderEmbOfFin_mem, Function.comp_apply]\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.Sort", "llama_tokens": 5971, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6406358411176238, "lm_q2_score": 0.6187804337438501, "lm_q1q2_score": 0.39641292363861946}}
{"text": "[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\n⊢ ∃ α, F⟮α⟯ = ⊤\n[PROOFSTEP]\nobtain ⟨α, hα⟩ := @IsCyclic.exists_generator (Units E) _ _\n[GOAL]\ncase intro\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\nα : Eˣ\nhα : ∀ (x : Eˣ), x ∈ Subgroup.zpowers α\n⊢ ∃ α, F⟮α⟯ = ⊤\n[PROOFSTEP]\nuse α\n[GOAL]\ncase h\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\nα : Eˣ\nhα : ∀ (x : Eˣ), x ∈ Subgroup.zpowers α\n⊢ F⟮↑α⟯ = ⊤\n[PROOFSTEP]\napply eq_top_iff.mpr\n[GOAL]\ncase h\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\nα : Eˣ\nhα : ∀ (x : Eˣ), x ∈ Subgroup.zpowers α\n⊢ ⊤ ≤ F⟮↑α⟯\n[PROOFSTEP]\nrintro x -\n[GOAL]\ncase h\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\nα : Eˣ\nhα : ∀ (x : Eˣ), x ∈ Subgroup.zpowers α\nx : E\n⊢ x ∈ F⟮↑α⟯\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\nα : Eˣ\nhα : ∀ (x : Eˣ), x ∈ Subgroup.zpowers α\nx : E\nhx : x = 0\n⊢ x ∈ F⟮↑α⟯\n[PROOFSTEP]\nrw [hx]\n[GOAL]\ncase pos\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\nα : Eˣ\nhα : ∀ (x : Eˣ), x ∈ Subgroup.zpowers α\nx : E\nhx : x = 0\n⊢ 0 ∈ F⟮↑α⟯\n[PROOFSTEP]\nexact F⟮α.val⟯.zero_mem\n[GOAL]\ncase neg\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\nα : Eˣ\nhα : ∀ (x : Eˣ), x ∈ Subgroup.zpowers α\nx : E\nhx : ¬x = 0\n⊢ x ∈ F⟮↑α⟯\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := Set.mem_range.mp (hα (Units.mk0 x hx))\n[GOAL]\ncase neg.intro\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\nα : Eˣ\nhα : ∀ (x : Eˣ), x ∈ Subgroup.zpowers α\nx : E\nhx : ¬x = 0\nn : ℤ\nhn : (fun x x_1 => x ^ x_1) α n = Units.mk0 x hx\n⊢ x ∈ F⟮↑α⟯\n[PROOFSTEP]\nsimp only at hn \n[GOAL]\ncase neg.intro\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\nα : Eˣ\nhα : ∀ (x : Eˣ), x ∈ Subgroup.zpowers α\nx : E\nhx : ¬x = 0\nn : ℤ\nhn : α ^ n = Units.mk0 x hx\n⊢ x ∈ F⟮↑α⟯\n[PROOFSTEP]\nrw [show x = α ^ n by norm_cast; rw [hn, Units.val_mk0], Units.val_zpow_eq_zpow_val]\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\nα : Eˣ\nhα : ∀ (x : Eˣ), x ∈ Subgroup.zpowers α\nx : E\nhx : ¬x = 0\nn : ℤ\nhn : α ^ n = Units.mk0 x hx\n⊢ x = ↑(α ^ n)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\nα : Eˣ\nhα : ∀ (x : Eˣ), x ∈ Subgroup.zpowers α\nx : E\nhx : ¬x = 0\nn : ℤ\nhn : α ^ n = Units.mk0 x hx\n⊢ x = ↑(α ^ n)\n[PROOFSTEP]\nrw [hn, Units.val_mk0]\n[GOAL]\ncase neg.intro\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : Finite E\nα : Eˣ\nhα : ∀ (x : Eˣ), x ∈ Subgroup.zpowers α\nx : E\nhx : ¬x = 0\nn : ℤ\nhn : α ^ n = Units.mk0 x hx\n⊢ ↑α ^ n ∈ F⟮↑α⟯\n[PROOFSTEP]\nexact zpow_mem (mem_adjoin_simple_self F (E := E) ↑α) n\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Infinite F\nE : Type u_2\ninst✝ : Field E\nϕ : F →+* E\nα β : E\nf g : F[X]\n⊢ ∃ c,\n    ∀ (α' : E),\n      α' ∈ roots (Polynomial.map ϕ f) → ∀ (β' : E), β' ∈ roots (Polynomial.map ϕ g) → -(α' - α) / (β' - β) ≠ ↑ϕ c\n[PROOFSTEP]\nlet sf := (f.map ϕ).roots\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Infinite F\nE : Type u_2\ninst✝ : Field E\nϕ : F →+* E\nα β : E\nf g : F[X]\nsf : Multiset E := roots (Polynomial.map ϕ f)\n⊢ ∃ c,\n    ∀ (α' : E),\n      α' ∈ roots (Polynomial.map ϕ f) → ∀ (β' : E), β' ∈ roots (Polynomial.map ϕ g) → -(α' - α) / (β' - β) ≠ ↑ϕ c\n[PROOFSTEP]\nlet sg := (g.map ϕ).roots\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Infinite F\nE : Type u_2\ninst✝ : Field E\nϕ : F →+* E\nα β : E\nf g : F[X]\nsf : Multiset E := roots (Polynomial.map ϕ f)\nsg : Multiset E := roots (Polynomial.map ϕ g)\n⊢ ∃ c,\n    ∀ (α' : E),\n      α' ∈ roots (Polynomial.map ϕ f) → ∀ (β' : E), β' ∈ roots (Polynomial.map ϕ g) → -(α' - α) / (β' - β) ≠ ↑ϕ c\n[PROOFSTEP]\nlet s := (sf.bind fun α' => sg.map fun β' => -(α' - α) / (β' - β)).toFinset\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Infinite F\nE : Type u_2\ninst✝ : Field E\nϕ : F →+* E\nα β : E\nf g : F[X]\nsf : Multiset E := roots (Polynomial.map ϕ f)\nsg : Multiset E := roots (Polynomial.map ϕ g)\ns : Finset E := Multiset.toFinset (Multiset.bind sf fun α' => Multiset.map (fun β' => -(α' - α) / (β' - β)) sg)\n⊢ ∃ c,\n    ∀ (α' : E),\n      α' ∈ roots (Polynomial.map ϕ f) → ∀ (β' : E), β' ∈ roots (Polynomial.map ϕ g) → -(α' - α) / (β' - β) ≠ ↑ϕ c\n[PROOFSTEP]\nlet s' := s.preimage ϕ fun x _ y _ h => ϕ.injective h\n[GOAL]\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Infinite F\nE : Type u_2\ninst✝ : Field E\nϕ : F →+* E\nα β : E\nf g : F[X]\nsf : Multiset E := roots (Polynomial.map ϕ f)\nsg : Multiset E := roots (Polynomial.map ϕ g)\ns : Finset E := Multiset.toFinset (Multiset.bind sf fun α' => Multiset.map (fun β' => -(α' - α) / (β' - β)) sg)\ns' : Finset F := Finset.preimage s ↑ϕ (_ : ∀ (x : F), x ∈ ↑ϕ ⁻¹' ↑s → ∀ (y : F), y ∈ ↑ϕ ⁻¹' ↑s → ↑ϕ x = ↑ϕ y → x = y)\n⊢ ∃ c,\n    ∀ (α' : E),\n      α' ∈ roots (Polynomial.map ϕ f) → ∀ (β' : E), β' ∈ roots (Polynomial.map ϕ g) → -(α' - α) / (β' - β) ≠ ↑ϕ c\n[PROOFSTEP]\nobtain ⟨c, hc⟩ := Infinite.exists_not_mem_finset s'\n[GOAL]\ncase intro\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Infinite F\nE : Type u_2\ninst✝ : Field E\nϕ : F →+* E\nα β : E\nf g : F[X]\nsf : Multiset E := roots (Polynomial.map ϕ f)\nsg : Multiset E := roots (Polynomial.map ϕ g)\ns : Finset E := Multiset.toFinset (Multiset.bind sf fun α' => Multiset.map (fun β' => -(α' - α) / (β' - β)) sg)\ns' : Finset F := Finset.preimage s ↑ϕ (_ : ∀ (x : F), x ∈ ↑ϕ ⁻¹' ↑s → ∀ (y : F), y ∈ ↑ϕ ⁻¹' ↑s → ↑ϕ x = ↑ϕ y → x = y)\nc : F\nhc : ¬c ∈ s'\n⊢ ∃ c,\n    ∀ (α' : E),\n      α' ∈ roots (Polynomial.map ϕ f) → ∀ (β' : E), β' ∈ roots (Polynomial.map ϕ g) → -(α' - α) / (β' - β) ≠ ↑ϕ c\n[PROOFSTEP]\nsimp_rw [Finset.mem_preimage, Multiset.mem_toFinset, Multiset.mem_bind, Multiset.mem_map] at hc \n[GOAL]\ncase intro\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Infinite F\nE : Type u_2\ninst✝ : Field E\nϕ : F →+* E\nα β : E\nf g : F[X]\nsf : Multiset E := roots (Polynomial.map ϕ f)\nsg : Multiset E := roots (Polynomial.map ϕ g)\ns : Finset E := Multiset.toFinset (Multiset.bind sf fun α' => Multiset.map (fun β' => -(α' - α) / (β' - β)) sg)\ns' : Finset F := Finset.preimage s ↑ϕ (_ : ∀ (x : F), x ∈ ↑ϕ ⁻¹' ↑s → ∀ (y : F), y ∈ ↑ϕ ⁻¹' ↑s → ↑ϕ x = ↑ϕ y → x = y)\nc : F\nhc : ¬∃ a, a ∈ roots (Polynomial.map ϕ f) ∧ ∃ a_1, a_1 ∈ roots (Polynomial.map ϕ g) ∧ -(a - α) / (a_1 - β) = ↑ϕ c\n⊢ ∃ c,\n    ∀ (α' : E),\n      α' ∈ roots (Polynomial.map ϕ f) → ∀ (β' : E), β' ∈ roots (Polynomial.map ϕ g) → -(α' - α) / (β' - β) ≠ ↑ϕ c\n[PROOFSTEP]\npush_neg at hc \n[GOAL]\ncase intro\nF : Type u_1\ninst✝² : Field F\ninst✝¹ : Infinite F\nE : Type u_2\ninst✝ : Field E\nϕ : F →+* E\nα β : E\nf g : F[X]\nsf : Multiset E := roots (Polynomial.map ϕ f)\nsg : Multiset E := roots (Polynomial.map ϕ g)\ns : Finset E := Multiset.toFinset (Multiset.bind sf fun α' => Multiset.map (fun β' => -(α' - α) / (β' - β)) sg)\ns' : Finset F := Finset.preimage s ↑ϕ (_ : ∀ (x : F), x ∈ ↑ϕ ⁻¹' ↑s → ∀ (y : F), y ∈ ↑ϕ ⁻¹' ↑s → ↑ϕ x = ↑ϕ y → x = y)\nc : F\nhc :\n  ∀ (a : E),\n    a ∈ roots (Polynomial.map ϕ f) → ∀ (a_1 : E), a_1 ∈ roots (Polynomial.map ϕ g) → -(a - α) / (a_1 - β) ≠ ↑ϕ c\n⊢ ∃ c,\n    ∀ (α' : E),\n      α' ∈ roots (Polynomial.map ϕ f) → ∀ (β' : E), β' ∈ roots (Polynomial.map ϕ g) → -(α' - α) / (β' - β) ≠ ↑ϕ c\n[PROOFSTEP]\nexact ⟨c, hc⟩\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\n⊢ ∃ γ, F⟮α, β⟯ = F⟮γ⟯\n[PROOFSTEP]\nhave hα := IsSeparable.isIntegral F α\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\n⊢ ∃ γ, F⟮α, β⟯ = F⟮γ⟯\n[PROOFSTEP]\nhave hβ := IsSeparable.isIntegral F β\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\n⊢ ∃ γ, F⟮α, β⟯ = F⟮γ⟯\n[PROOFSTEP]\nlet f := minpoly F α\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\n⊢ ∃ γ, F⟮α, β⟯ = F⟮γ⟯\n[PROOFSTEP]\nlet g := minpoly F β\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\n⊢ ∃ γ, F⟮α, β⟯ = F⟮γ⟯\n[PROOFSTEP]\nlet ιFE := algebraMap F E\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\n⊢ ∃ γ, F⟮α, β⟯ = F⟮γ⟯\n[PROOFSTEP]\nlet ιEE' := algebraMap E (SplittingField (g.map ιFE))\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\n⊢ ∃ γ, F⟮α, β⟯ = F⟮γ⟯\n[PROOFSTEP]\nobtain ⟨c, hc⟩ := primitive_element_inf_aux_exists_c (ιEE'.comp ιFE) (ιEE' α) (ιEE' β) f g\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\n⊢ ∃ γ, F⟮α, β⟯ = F⟮γ⟯\n[PROOFSTEP]\nlet γ := α + c • β\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\n⊢ ∃ γ, F⟮α, β⟯ = F⟮γ⟯\n[PROOFSTEP]\nsuffices β_in_Fγ : β ∈ F⟮γ⟯\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\n⊢ ∃ γ, F⟮α, β⟯ = F⟮γ⟯\n[PROOFSTEP]\nuse γ\n[GOAL]\ncase h\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\n⊢ F⟮α, β⟯ = F⟮γ⟯\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase h.a\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\n⊢ F⟮α, β⟯ ≤ F⟮γ⟯\n[PROOFSTEP]\nrw [adjoin_le_iff]\n[GOAL]\ncase h.a\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\n⊢ {α, β} ≤ ↑F⟮γ⟯\n[PROOFSTEP]\nhave α_in_Fγ : α ∈ F⟮γ⟯ := by\n  rw [← add_sub_cancel α (c • β)]\n  exact F⟮γ⟯.sub_mem (mem_adjoin_simple_self F γ) (F⟮γ⟯.toSubalgebra.smul_mem β_in_Fγ c)\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\n⊢ α ∈ F⟮γ⟯\n[PROOFSTEP]\nrw [← add_sub_cancel α (c • β)]\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\n⊢ α + c • β - c • β ∈ F⟮γ⟯\n[PROOFSTEP]\nexact F⟮γ⟯.sub_mem (mem_adjoin_simple_self F γ) (F⟮γ⟯.toSubalgebra.smul_mem β_in_Fγ c)\n[GOAL]\ncase h.a\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\nα_in_Fγ : α ∈ F⟮γ⟯\n⊢ {α, β} ≤ ↑F⟮γ⟯\n[PROOFSTEP]\nexact fun x hx => by\n  -- Porting note: was `by cases hx <;> cases hx <;> cases hx <;> assumption`\n  cases' hx with hx hx\n  · rwa [← hx] at α_in_Fγ \n  · cases hx; norm_cast\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\nα_in_Fγ : α ∈ F⟮γ⟯\nx : E\nhx : x ∈ {α, β}\n⊢ x ∈ ↑F⟮γ⟯\n[PROOFSTEP]\ncases' hx with hx hx\n[GOAL]\ncase inl\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\nα_in_Fγ : α ∈ F⟮γ⟯\nx : E\nhx : x = α\n⊢ x ∈ ↑F⟮γ⟯\n[PROOFSTEP]\nrwa [← hx] at α_in_Fγ \n[GOAL]\ncase inr\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\nα_in_Fγ : α ∈ F⟮γ⟯\nx : E\nhx : x ∈ {β}\n⊢ x ∈ ↑F⟮γ⟯\n[PROOFSTEP]\ncases hx\n[GOAL]\ncase inr.refl\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\nα_in_Fγ : α ∈ F⟮γ⟯\n⊢ β ∈ ↑F⟮γ⟯\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.a\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\n⊢ F⟮γ⟯ ≤ F⟮α, β⟯\n[PROOFSTEP]\nrw [adjoin_simple_le_iff]\n[GOAL]\ncase h.a\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\n⊢ γ ∈ F⟮α, β⟯\n[PROOFSTEP]\nhave α_in_Fαβ : α ∈ F⟮α, β⟯ := subset_adjoin F { α, β } (Set.mem_insert α { β })\n[GOAL]\ncase h.a\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\nα_in_Fαβ : α ∈ F⟮α, β⟯\n⊢ γ ∈ F⟮α, β⟯\n[PROOFSTEP]\nhave β_in_Fαβ : β ∈ F⟮α, β⟯ := subset_adjoin F { α, β } (Set.mem_insert_of_mem α rfl)\n[GOAL]\ncase h.a\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\nβ_in_Fγ : β ∈ F⟮γ⟯\nα_in_Fαβ : α ∈ F⟮α, β⟯\nβ_in_Fαβ : β ∈ F⟮α, β⟯\n⊢ γ ∈ F⟮α, β⟯\n[PROOFSTEP]\nexact F⟮α, β⟯.add_mem α_in_Fαβ (F⟮α, β⟯.smul_mem β_in_Fαβ)\n[GOAL]\ncase β_in_Fγ\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\n⊢ β ∈ F⟮γ⟯\n[PROOFSTEP]\nlet p :=\n  EuclideanDomain.gcd ((f.map (algebraMap F F⟮γ⟯)).comp (C (AdjoinSimple.gen F γ) - (C ↑c : F⟮γ⟯[X]) * X))\n    (g.map (algebraMap F F⟮γ⟯))\n[GOAL]\ncase β_in_Fγ\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\n⊢ β ∈ F⟮γ⟯\n[PROOFSTEP]\nlet h := EuclideanDomain.gcd ((f.map ιFE).comp (C γ - C (ιFE c) * X)) (g.map ιFE)\n[GOAL]\ncase β_in_Fγ\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\n⊢ β ∈ F⟮γ⟯\n[PROOFSTEP]\nhave map_g_ne_zero : g.map ιFE ≠ 0 := map_ne_zero (minpoly.ne_zero hβ)\n[GOAL]\ncase β_in_Fγ\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\n⊢ β ∈ F⟮γ⟯\n[PROOFSTEP]\nhave h_ne_zero : h ≠ 0 := mt EuclideanDomain.gcd_eq_zero_iff.mp (not_and.mpr fun _ => map_g_ne_zero)\n[GOAL]\ncase β_in_Fγ\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\n⊢ β ∈ F⟮γ⟯\n[PROOFSTEP]\nsuffices p_linear : p.map (algebraMap F⟮γ⟯ E) = C h.leadingCoeff * (X - C β)\n[GOAL]\ncase β_in_Fγ\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\np_linear : Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E) p = ↑C (leadingCoeff h) * (X - ↑C β)\n⊢ β ∈ F⟮γ⟯\n[PROOFSTEP]\nhave finale : β = algebraMap F⟮γ⟯ E (-p.coeff 0 / p.coeff 1) :=\n  by\n  rw [map_div₀, RingHom.map_neg, ← coeff_map, ← coeff_map, p_linear]\n    -- Porting note: had to add `-map_add` to avoid going in the wrong direction.\n  simp [mul_sub, coeff_C, mul_div_cancel_left β (mt leadingCoeff_eq_zero.mp h_ne_zero), -map_add]\n    -- Porting note: an alternative solution is:\n          -- simp_rw [Polynomial.coeff_C_mul, Polynomial.coeff_sub, mul_sub,\n          --   Polynomial.coeff_X_zero, Polynomial.coeff_X_one, mul_zero, mul_one, zero_sub, neg_neg,\n          --   Polynomial.coeff_C, eq_self_iff_true, Nat.one_ne_zero, if_true, if_false, mul_zero,\n          --   sub_zero, mul_div_cancel_left β (mt leadingCoeff_eq_zero.mp h_ne_zero)]\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\np_linear : Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E) p = ↑C (leadingCoeff h) * (X - ↑C β)\n⊢ β = ↑(algebraMap { x // x ∈ F⟮γ⟯ } E) (-coeff p 0 / coeff p 1)\n[PROOFSTEP]\nrw [map_div₀, RingHom.map_neg, ← coeff_map, ← coeff_map, p_linear]\n  -- Porting note: had to add `-map_add` to avoid going in the wrong direction.\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\np_linear : Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E) p = ↑C (leadingCoeff h) * (X - ↑C β)\n⊢ β = -coeff (↑C (leadingCoeff h) * (X - ↑C β)) 0 / coeff (↑C (leadingCoeff h) * (X - ↑C β)) 1\n[PROOFSTEP]\nsimp [mul_sub, coeff_C, mul_div_cancel_left β (mt leadingCoeff_eq_zero.mp h_ne_zero), -map_add]\n  -- Porting note: an alternative solution is:\n        -- simp_rw [Polynomial.coeff_C_mul, Polynomial.coeff_sub, mul_sub,\n        --   Polynomial.coeff_X_zero, Polynomial.coeff_X_one, mul_zero, mul_one, zero_sub, neg_neg,\n        --   Polynomial.coeff_C, eq_self_iff_true, Nat.one_ne_zero, if_true, if_false, mul_zero,\n        --   sub_zero, mul_div_cancel_left β (mt leadingCoeff_eq_zero.mp h_ne_zero)]\n[GOAL]\ncase β_in_Fγ\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\np_linear : Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E) p = ↑C (leadingCoeff h) * (X - ↑C β)\nfinale : β = ↑(algebraMap { x // x ∈ F⟮γ⟯ } E) (-coeff p 0 / coeff p 1)\n⊢ β ∈ F⟮γ⟯\n[PROOFSTEP]\nrw [finale]\n[GOAL]\ncase β_in_Fγ\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\np_linear : Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E) p = ↑C (leadingCoeff h) * (X - ↑C β)\nfinale : β = ↑(algebraMap { x // x ∈ F⟮γ⟯ } E) (-coeff p 0 / coeff p 1)\n⊢ ↑(algebraMap { x // x ∈ F⟮γ⟯ } E) (-coeff p 0 / coeff p 1) ∈ F⟮γ⟯\n[PROOFSTEP]\nexact Subtype.mem (-p.coeff 0 / p.coeff 1)\n[GOAL]\ncase p_linear\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\n⊢ Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E) p = ↑C (leadingCoeff h) * (X - ↑C β)\n[PROOFSTEP]\nhave h_sep : h.Separable := separable_gcd_right _ (IsSeparable.separable F β).map\n[GOAL]\ncase p_linear\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\n⊢ Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E) p = ↑C (leadingCoeff h) * (X - ↑C β)\n[PROOFSTEP]\nhave h_root : h.eval β = 0 := by\n  apply eval_gcd_eq_zero\n  ·\n    rw [eval_comp, eval_sub, eval_mul, eval_C, eval_C, eval_X, eval_map, ← aeval_def, ← Algebra.smul_def,\n      add_sub_cancel, minpoly.aeval]\n  · rw [eval_map, ← aeval_def, minpoly.aeval]\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\n⊢ eval β h = 0\n[PROOFSTEP]\napply eval_gcd_eq_zero\n[GOAL]\ncase hf\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\n⊢ eval β (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) = 0\n[PROOFSTEP]\nrw [eval_comp, eval_sub, eval_mul, eval_C, eval_C, eval_X, eval_map, ← aeval_def, ← Algebra.smul_def, add_sub_cancel,\n  minpoly.aeval]\n[GOAL]\ncase hg\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\n⊢ eval β (Polynomial.map ιFE g) = 0\n[PROOFSTEP]\nrw [eval_map, ← aeval_def, minpoly.aeval]\n[GOAL]\ncase p_linear\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\n⊢ Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E) p = ↑C (leadingCoeff h) * (X - ↑C β)\n[PROOFSTEP]\nhave h_splits : Splits ιEE' h := splits_of_splits_gcd_right ιEE' map_g_ne_zero (SplittingField.splits _)\n[GOAL]\ncase p_linear\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\n⊢ Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E) p = ↑C (leadingCoeff h) * (X - ↑C β)\n[PROOFSTEP]\nhave h_roots : ∀ x ∈ (h.map ιEE').roots, x = ιEE' β :=\n  by\n  intro x hx\n  rw [mem_roots_map h_ne_zero] at hx \n  specialize\n    hc (ιEE' γ - ιEE' (ιFE c) * x)\n      (by\n        have f_root := root_left_of_root_gcd hx\n        rw [eval₂_comp, eval₂_sub, eval₂_mul, eval₂_C, eval₂_C, eval₂_X, eval₂_map] at f_root \n        exact (mem_roots_map (minpoly.ne_zero hα)).mpr f_root)\n  specialize\n    hc x\n      (by\n        rw [mem_roots_map (minpoly.ne_zero hβ), ← eval₂_map]\n        exact root_right_of_root_gcd hx)\n  by_contra a\n  apply hc\n  apply (div_eq_iff (sub_ne_zero.mpr a)).mpr\n  simp only [Algebra.smul_def, RingHom.map_add, RingHom.map_mul, RingHom.comp_apply]\n  ring\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\n⊢ ∀ (x : SplittingField (Polynomial.map ιFE g)), x ∈ roots (Polynomial.map ιEE' h) → x = ↑ιEE' β\n[PROOFSTEP]\nintro x hx\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : x ∈ roots (Polynomial.map ιEE' h)\n⊢ x = ↑ιEE' β\n[PROOFSTEP]\nrw [mem_roots_map h_ne_zero] at hx \n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : eval₂ ιEE' x h = 0\n⊢ x = ↑ιEE' β\n[PROOFSTEP]\nspecialize\n  hc (ιEE' γ - ιEE' (ιFE c) * x)\n    (by\n      have f_root := root_left_of_root_gcd hx\n      rw [eval₂_comp, eval₂_sub, eval₂_mul, eval₂_C, eval₂_C, eval₂_X, eval₂_map] at f_root \n      exact (mem_roots_map (minpoly.ne_zero hα)).mpr f_root)\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : eval₂ ιEE' x h = 0\n⊢ ↑ιEE' γ - ↑ιEE' (↑ιFE c) * x ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f)\n[PROOFSTEP]\nhave f_root := root_left_of_root_gcd hx\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : eval₂ ιEE' x h = 0\nf_root : eval₂ ιEE' x (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) = 0\n⊢ ↑ιEE' γ - ↑ιEE' (↑ιFE c) * x ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f)\n[PROOFSTEP]\nrw [eval₂_comp, eval₂_sub, eval₂_mul, eval₂_C, eval₂_C, eval₂_X, eval₂_map] at f_root \n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : eval₂ ιEE' x h = 0\nf_root : eval₂ (RingHom.comp ιEE' ιFE) (↑ιEE' γ - ↑ιEE' (↑ιFE c) * x) f = 0\n⊢ ↑ιEE' γ - ↑ιEE' (↑ιFE c) * x ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f)\n[PROOFSTEP]\nexact (mem_roots_map (minpoly.ne_zero hα)).mpr f_root\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : eval₂ ιEE' x h = 0\nhc :\n  ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n    β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n      -(↑ιEE' γ - ↑ιEE' (↑ιFE c) * x - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\n⊢ x = ↑ιEE' β\n[PROOFSTEP]\nspecialize\n  hc x\n    (by\n      rw [mem_roots_map (minpoly.ne_zero hβ), ← eval₂_map]\n      exact root_right_of_root_gcd hx)\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : eval₂ ιEE' x h = 0\nhc :\n  ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n    β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n      -(↑ιEE' γ - ↑ιEE' (↑ιFE c) * x - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\n⊢ x ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g)\n[PROOFSTEP]\nrw [mem_roots_map (minpoly.ne_zero hβ), ← eval₂_map]\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : eval₂ ιEE' x h = 0\nhc :\n  ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n    β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n      -(↑ιEE' γ - ↑ιEE' (↑ιFE c) * x - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\n⊢ eval₂ ιEE' x (Polynomial.map ιFE (minpoly F β)) = 0\n[PROOFSTEP]\nexact root_right_of_root_gcd hx\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : eval₂ ιEE' x h = 0\nhc : -(↑ιEE' γ - ↑ιEE' (↑ιFE c) * x - ↑ιEE' α) / (x - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\n⊢ x = ↑ιEE' β\n[PROOFSTEP]\nby_contra a\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : eval₂ ιEE' x h = 0\nhc : -(↑ιEE' γ - ↑ιEE' (↑ιFE c) * x - ↑ιEE' α) / (x - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\na : ¬x = ↑ιEE' β\n⊢ False\n[PROOFSTEP]\napply hc\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : eval₂ ιEE' x h = 0\nhc : -(↑ιEE' γ - ↑ιEE' (↑ιFE c) * x - ↑ιEE' α) / (x - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\na : ¬x = ↑ιEE' β\n⊢ -(↑ιEE' γ - ↑ιEE' (↑ιFE c) * x - ↑ιEE' α) / (x - ↑ιEE' β) = ↑(RingHom.comp ιEE' ιFE) c\n[PROOFSTEP]\napply (div_eq_iff (sub_ne_zero.mpr a)).mpr\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : eval₂ ιEE' x h = 0\nhc : -(↑ιEE' γ - ↑ιEE' (↑ιFE c) * x - ↑ιEE' α) / (x - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\na : ¬x = ↑ιEE' β\n⊢ -(↑ιEE' γ - ↑ιEE' (↑ιFE c) * x - ↑ιEE' α) = ↑(RingHom.comp ιEE' ιFE) c * (x - ↑ιEE' β)\n[PROOFSTEP]\nsimp only [Algebra.smul_def, RingHom.map_add, RingHom.map_mul, RingHom.comp_apply]\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nx : SplittingField (Polynomial.map ιFE g)\nhx : eval₂ ιEE' x h = 0\nhc : -(↑ιEE' γ - ↑ιEE' (↑ιFE c) * x - ↑ιEE' α) / (x - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\na : ¬x = ↑ιEE' β\n⊢ -(↑(algebraMap E (SplittingField (Polynomial.map (algebraMap F E) (minpoly F β)))) α +\n            ↑(algebraMap E (SplittingField (Polynomial.map (algebraMap F E) (minpoly F β)))) (↑(algebraMap F E) c) *\n              ↑(algebraMap E (SplittingField (Polynomial.map (algebraMap F E) (minpoly F β)))) β -\n          ↑(algebraMap E (SplittingField (Polynomial.map (algebraMap F E) (minpoly F β)))) (↑(algebraMap F E) c) * x -\n        ↑(algebraMap E (SplittingField (Polynomial.map (algebraMap F E) (minpoly F β)))) α) =\n    ↑(algebraMap E (SplittingField (Polynomial.map (algebraMap F E) (minpoly F β)))) (↑(algebraMap F E) c) *\n      (x - ↑(algebraMap E (SplittingField (Polynomial.map (algebraMap F E) (minpoly F β)))) β)\n[PROOFSTEP]\nring\n[GOAL]\ncase p_linear\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nh_roots : ∀ (x : SplittingField (Polynomial.map ιFE g)), x ∈ roots (Polynomial.map ιEE' h) → x = ↑ιEE' β\n⊢ Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E) p = ↑C (leadingCoeff h) * (X - ↑C β)\n[PROOFSTEP]\nrw [← eq_X_sub_C_of_separable_of_root_eq h_sep h_root h_splits h_roots]\n[GOAL]\ncase p_linear\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nh_roots : ∀ (x : SplittingField (Polynomial.map ιFE g)), x ∈ roots (Polynomial.map ιEE' h) → x = ↑ιEE' β\n⊢ Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E) p = h\n[PROOFSTEP]\ntrans EuclideanDomain.gcd (?_ : E[X]) (?_ : E[X])\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nh_roots : ∀ (x : SplittingField (Polynomial.map ιFE g)), x ∈ roots (Polynomial.map ιEE' h) → x = ↑ιEE' β\n⊢ Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E) p = EuclideanDomain.gcd ?p_linear.p_linear_1 ?p_linear.p_linear_2\n[PROOFSTEP]\ndsimp only\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nh_roots : ∀ (x : SplittingField (Polynomial.map ιFE g)), x ∈ roots (Polynomial.map ιEE' h) → x = ↑ιEE' β\n⊢ Polynomial.map (algebraMap { x // x ∈ F⟮α + c • β⟯ } E)\n      (EuclideanDomain.gcd\n        (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮α + c • β⟯ }) (minpoly F α))\n          (↑C (AdjoinSimple.gen F (α + c • β)) -\n            ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮α + c • β⟯) } * X))\n        (Polynomial.map (algebraMap F { x // x ∈ F⟮α + c • β⟯ }) (minpoly F β))) =\n    EuclideanDomain.gcd ?p_linear.p_linear_1 ?p_linear.p_linear_2\n[PROOFSTEP]\nconvert (gcd_map (algebraMap F⟮γ⟯ E)).symm\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nh_roots : ∀ (x : SplittingField (Polynomial.map ιFE g)), x ∈ roots (Polynomial.map ιEE' h) → x = ↑ιEE' β\n⊢ EuclideanDomain.gcd\n      (Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E)\n        (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮α + c • β⟯ }) (minpoly F α))\n          (↑C (AdjoinSimple.gen F (α + c • β)) -\n            ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮α + c • β⟯) } * X)))\n      (Polynomial.map (algebraMap { x // x ∈ F⟮γ⟯ } E)\n        (Polynomial.map (algebraMap F { x // x ∈ F⟮α + c • β⟯ }) (minpoly F β))) =\n    h\n[PROOFSTEP]\nsimp [map_comp, Polynomial.map_map, ← IsScalarTower.algebraMap_eq]\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\ninst✝³ : Infinite F\nE : Type u_2\ninst✝² : Field E\nϕ : F →+* E\nα β : E\ninst✝¹ : Algebra F E\ninst✝ : IsSeparable F E\nhα : IsIntegral F α\nhβ : IsIntegral F β\nf : F[X] := minpoly F α\ng : F[X] := minpoly F β\nιFE : F →+* E := algebraMap F E\nιEE' : E →+* SplittingField (Polynomial.map ιFE g) := algebraMap E (SplittingField (Polynomial.map ιFE g))\nc : F\nhc :\n  ∀ (α' : SplittingField (Polynomial.map ιFE g)),\n    α' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) f) →\n      ∀ (β' : SplittingField (Polynomial.map ιFE g)),\n        β' ∈ roots (Polynomial.map (RingHom.comp ιEE' ιFE) g) →\n          -(α' - ↑ιEE' α) / (β' - ↑ιEE' β) ≠ ↑(RingHom.comp ιEE' ιFE) c\nγ : E := α + c • β\np : { x // x ∈ F⟮γ⟯ }[X] :=\n  EuclideanDomain.gcd\n    (comp (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) f)\n      (↑C (AdjoinSimple.gen F γ) - ↑C { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮γ⟯) } * X))\n    (Polynomial.map (algebraMap F { x // x ∈ F⟮γ⟯ }) g)\nh : E[X] := EuclideanDomain.gcd (comp (Polynomial.map ιFE f) (↑C γ - ↑C (↑ιFE c) * X)) (Polynomial.map ιFE g)\nmap_g_ne_zero : Polynomial.map ιFE g ≠ 0\nh_ne_zero : h ≠ 0\nh_sep : Separable h\nh_root : eval β h = 0\nh_splits : Splits ιEE' h\nh_roots : ∀ (x : SplittingField (Polynomial.map ιFE g)), x ∈ roots (Polynomial.map ιEE' h) → x = ↑ιEE' β\n⊢ EuclideanDomain.gcd\n      (comp (Polynomial.map (algebraMap F E) (minpoly F α))\n        (↑C α + ↑C (c • β) -\n          ↑C\n              (↑(algebraMap { x // x ∈ F⟮α + c • β⟯ } E)\n                { val := ↑(algebraMap F E) c, property := (_ : ↑(algebraMap F E) c ∈ F⟮α + c • β⟯) }) *\n            X))\n      (Polynomial.map (algebraMap F E) (minpoly F β)) =\n    EuclideanDomain.gcd\n      (comp (Polynomial.map (algebraMap F E) (minpoly F α)) (↑C α + ↑C (c • β) - ↑C (↑(algebraMap F E) c) * X))\n      (Polynomial.map (algebraMap F E) (minpoly F β))\n[PROOFSTEP]\ncongr\n[GOAL]\nF : Type u_1\nE : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsSeparable F E\n⊢ ∃ α, F⟮α⟯ = ⊤\n[PROOFSTEP]\nrcases isEmpty_or_nonempty (Fintype F) with (F_inf | ⟨⟨F_finite⟩⟩)\n[GOAL]\ncase inl\nF : Type u_1\nE : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsSeparable F E\nF_inf : IsEmpty (Fintype F)\n⊢ ∃ α, F⟮α⟯ = ⊤\n[PROOFSTEP]\nlet P : IntermediateField F E → Prop := fun K => ∃ α : E, F⟮α⟯ = K\n[GOAL]\ncase inl\nF : Type u_1\nE : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsSeparable F E\nF_inf : IsEmpty (Fintype F)\nP : IntermediateField F E → Prop := fun K => ∃ α, F⟮α⟯ = K\n⊢ ∃ α, F⟮α⟯ = ⊤\n[PROOFSTEP]\nhave base : P ⊥ := ⟨0, adjoin_zero⟩\n[GOAL]\ncase inl\nF : Type u_1\nE : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsSeparable F E\nF_inf : IsEmpty (Fintype F)\nP : IntermediateField F E → Prop := fun K => ∃ α, F⟮α⟯ = K\nbase : P ⊥\n⊢ ∃ α, F⟮α⟯ = ⊤\n[PROOFSTEP]\nhave ih : ∀ (K : IntermediateField F E) (x : E), P K → P (K⟮x⟯.restrictScalars F) :=\n  by\n  intro K β hK\n  cases' hK with α hK\n  rw [← hK, adjoin_simple_adjoin_simple]\n  haveI : Infinite F := isEmpty_fintype.mp F_inf\n  cases' primitive_element_inf_aux F α β with γ hγ\n  exact ⟨γ, hγ.symm⟩\n[GOAL]\nF : Type u_1\nE : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsSeparable F E\nF_inf : IsEmpty (Fintype F)\nP : IntermediateField F E → Prop := fun K => ∃ α, F⟮α⟯ = K\nbase : P ⊥\n⊢ ∀ (K : IntermediateField F E) (x : E), P K → P (restrictScalars F { x // x ∈ K }⟮x⟯)\n[PROOFSTEP]\nintro K β hK\n[GOAL]\nF : Type u_1\nE : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsSeparable F E\nF_inf : IsEmpty (Fintype F)\nP : IntermediateField F E → Prop := fun K => ∃ α, F⟮α⟯ = K\nbase : P ⊥\nK : IntermediateField F E\nβ : E\nhK : P K\n⊢ P (restrictScalars F { x // x ∈ K }⟮β⟯)\n[PROOFSTEP]\ncases' hK with α hK\n[GOAL]\ncase intro\nF : Type u_1\nE : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsSeparable F E\nF_inf : IsEmpty (Fintype F)\nP : IntermediateField F E → Prop := fun K => ∃ α, F⟮α⟯ = K\nbase : P ⊥\nK : IntermediateField F E\nβ α : E\nhK : F⟮α⟯ = K\n⊢ P (restrictScalars F { x // x ∈ K }⟮β⟯)\n[PROOFSTEP]\nrw [← hK, adjoin_simple_adjoin_simple]\n[GOAL]\ncase intro\nF : Type u_1\nE : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsSeparable F E\nF_inf : IsEmpty (Fintype F)\nP : IntermediateField F E → Prop := fun K => ∃ α, F⟮α⟯ = K\nbase : P ⊥\nK : IntermediateField F E\nβ α : E\nhK : F⟮α⟯ = K\n⊢ P F⟮α, β⟯\n[PROOFSTEP]\nhaveI : Infinite F := isEmpty_fintype.mp F_inf\n[GOAL]\ncase intro\nF : Type u_1\nE : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsSeparable F E\nF_inf : IsEmpty (Fintype F)\nP : IntermediateField F E → Prop := fun K => ∃ α, F⟮α⟯ = K\nbase : P ⊥\nK : IntermediateField F E\nβ α : E\nhK : F⟮α⟯ = K\nthis : Infinite F\n⊢ P F⟮α, β⟯\n[PROOFSTEP]\ncases' primitive_element_inf_aux F α β with γ hγ\n[GOAL]\ncase intro.intro\nF : Type u_1\nE : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsSeparable F E\nF_inf : IsEmpty (Fintype F)\nP : IntermediateField F E → Prop := fun K => ∃ α, F⟮α⟯ = K\nbase : P ⊥\nK : IntermediateField F E\nβ α : E\nhK : F⟮α⟯ = K\nthis : Infinite F\nγ : E\nhγ : F⟮α, β⟯ = F⟮γ⟯\n⊢ P F⟮α, β⟯\n[PROOFSTEP]\nexact ⟨γ, hγ.symm⟩\n[GOAL]\ncase inl\nF : Type u_1\nE : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsSeparable F E\nF_inf : IsEmpty (Fintype F)\nP : IntermediateField F E → Prop := fun K => ∃ α, F⟮α⟯ = K\nbase : P ⊥\nih : ∀ (K : IntermediateField F E) (x : E), P K → P (restrictScalars F { x // x ∈ K }⟮x⟯)\n⊢ ∃ α, F⟮α⟯ = ⊤\n[PROOFSTEP]\nexact induction_on_adjoin P base ih ⊤\n[GOAL]\ncase inr.intro\nF : Type u_1\nE : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsSeparable F E\nF_finite : Fintype F\n⊢ ∃ α, F⟮α⟯ = ⊤\n[PROOFSTEP]\nexact exists_primitive_element_of_finite_bot F E\n[GOAL]\nF : Type u_1\nE : Type u_2\nK : Type u_3\ninst✝⁷ : Field F\ninst✝⁶ : Field E\ninst✝⁵ : Field K\ninst✝⁴ : IsAlgClosed K\ninst✝³ : Algebra F E\ninst✝² : FiniteDimensional F E\ninst✝¹ : IsSeparable F E\ninst✝ : Algebra F K\n⊢ Fintype.card (E →ₐ[F] K) = finrank F E\n[PROOFSTEP]\nconvert\n  (AlgHom.card_of_powerBasis (L := K) (Field.powerBasisOfFiniteOfSeparable F E) (IsSeparable.separable _ _)\n        (IsAlgClosed.splits_codomain _)).trans\n    (PowerBasis.finrank _).symm\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.PrimitiveElement", "llama_tokens": 42191, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7461389930307512, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.3963560269375908}}
{"text": "[GOAL]\nR : Type u\ninst✝¹ : CommRing R\nD : Type v\ninst✝ : SmallCategory D\nI : D ⥤ Ideal R\nX✝ Y✝ Z✝ : D\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun t => ModuleCat.of R (R ⧸ I.obj t),\n          map := fun {X Y} w => Submodule.mapQ (I.obj X) (I.obj Y) LinearMap.id (_ : I.obj X ≤ I.obj Y) }.map\n      (f ≫ g) =\n    { obj := fun t => ModuleCat.of R (R ⧸ I.obj t),\n            map := fun {X Y} w => Submodule.mapQ (I.obj X) (I.obj Y) LinearMap.id (_ : I.obj X ≤ I.obj Y) }.map\n        f ≫\n      { obj := fun t => ModuleCat.of R (R ⧸ I.obj t),\n            map := fun {X Y} w => Submodule.mapQ (I.obj X) (I.obj Y) LinearMap.id (_ : I.obj X ≤ I.obj Y) }.map\n        g\n[PROOFSTEP]\napply Submodule.linearMap_qext\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : CommRing R\nD : Type v\ninst✝ : SmallCategory D\nI : D ⥤ Ideal R\nX✝ Y✝ Z✝ : D\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ LinearMap.comp\n      ({ obj := fun t => ModuleCat.of R (R ⧸ I.obj t),\n            map := fun {X Y} w => Submodule.mapQ (I.obj X) (I.obj Y) LinearMap.id (_ : I.obj X ≤ I.obj Y) }.map\n        (f ≫ g))\n      (Submodule.mkQ (I.obj X✝)) =\n    LinearMap.comp\n      ({ obj := fun t => ModuleCat.of R (R ⧸ I.obj t),\n              map := fun {X Y} w => Submodule.mapQ (I.obj X) (I.obj Y) LinearMap.id (_ : I.obj X ≤ I.obj Y) }.map\n          f ≫\n        { obj := fun t => ModuleCat.of R (R ⧸ I.obj t),\n              map := fun {X Y} w => Submodule.mapQ (I.obj X) (I.obj Y) LinearMap.id (_ : I.obj X ≤ I.obj Y) }.map\n          g)\n      (Submodule.mkQ (I.obj X✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nJ : Ideal R\nk : ℕᵒᵖ\n⊢ J ≤ Ideal.radical ((idealPowersDiagram J).obj k)\n[PROOFSTEP]\nchange _ ≤ (J ^ unop k).radical\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nJ : Ideal R\nk : ℕᵒᵖ\n⊢ J ≤ Ideal.radical (J ^ k.unop)\n[PROOFSTEP]\ncases' unop k with n\n[GOAL]\ncase zero\nR : Type u\ninst✝ : CommRing R\nJ : Ideal R\nk : ℕᵒᵖ\n⊢ J ≤ Ideal.radical (J ^ Nat.zero)\n[PROOFSTEP]\nsimp [Ideal.radical_top, pow_zero, Ideal.one_eq_top, le_top, Nat.zero_eq]\n[GOAL]\ncase succ\nR : Type u\ninst✝ : CommRing R\nJ : Ideal R\nk : ℕᵒᵖ\nn : ℕ\n⊢ J ≤ Ideal.radical (J ^ Nat.succ n)\n[PROOFSTEP]\nsimp only [J.radical_pow _ n.succ_pos, Ideal.le_radical]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhIJ : I ≤ Ideal.radical J\nhJ : Ideal.FG (Ideal.radical J)\n⊢ ∃ k, I ^ k ≤ J\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := J.exists_radical_pow_le_of_fg hJ\n[GOAL]\ncase intro\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhIJ : I ≤ Ideal.radical J\nhJ : Ideal.FG (Ideal.radical J)\nk : ℕ\nhk : Ideal.radical J ^ k ≤ J\n⊢ ∃ k, I ^ k ≤ J\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhIJ : I ≤ Ideal.radical J\nhJ : Ideal.FG (Ideal.radical J)\nk : ℕ\nhk : Ideal.radical J ^ k ≤ J\n⊢ I ^ k ≤ J\n[PROOFSTEP]\ncalc\n  I ^ k ≤ J.radical ^ k := Ideal.pow_mono hIJ _\n  _ ≤ J := hk\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhR : IsNoetherian R R\nJ' : SelfLERadical J\n⊢ IsConnected (CostructuredArrow (idealPowersToSelfLERadical J) J')\n[PROOFSTEP]\napply (config := { allowSynthFailures := true }) zigzag_isConnected\n[GOAL]\ncase inst\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhR : IsNoetherian R R\nJ' : SelfLERadical J\n⊢ Nonempty (CostructuredArrow (idealPowersToSelfLERadical J) J')\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := Ideal.exists_pow_le_of_le_radical_of_fG J'.2 (isNoetherian_def.mp hR _)\n[GOAL]\ncase inst.intro\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhR : IsNoetherian R R\nJ' : SelfLERadical J\nk : ℕ\nhk : J ^ k ≤ J'.obj\n⊢ Nonempty (CostructuredArrow (idealPowersToSelfLERadical J) J')\n[PROOFSTEP]\nexact ⟨CostructuredArrow.mk (⟨⟨hk⟩⟩ : (idealPowersToSelfLERadical J).obj (op k) ⟶ J')⟩\n[GOAL]\ncase h\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhR : IsNoetherian R R\nJ' : SelfLERadical J\n⊢ ∀ (j₁ j₂ : CostructuredArrow (idealPowersToSelfLERadical J) J'), Zigzag j₁ j₂\n[PROOFSTEP]\nintro j1 j2\n[GOAL]\ncase h\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhR : IsNoetherian R R\nJ' : SelfLERadical J\nj1 j2 : CostructuredArrow (idealPowersToSelfLERadical J) J'\n⊢ Zigzag j1 j2\n[PROOFSTEP]\napply Relation.ReflTransGen.single\n[GOAL]\ncase h.hab\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhR : IsNoetherian R R\nJ' : SelfLERadical J\nj1 j2 : CostructuredArrow (idealPowersToSelfLERadical J) J'\n⊢ Zag j1 j2\n[PROOFSTEP]\ncases' le_total (unop j1.left) (unop j2.left) with h h\n[GOAL]\ncase h.hab.inl\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhR : IsNoetherian R R\nJ' : SelfLERadical J\nj1 j2 : CostructuredArrow (idealPowersToSelfLERadical J) J'\nh : j1.left.unop ≤ j2.left.unop\n⊢ Zag j1 j2\ncase h.hab.inr\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhR : IsNoetherian R R\nJ' : SelfLERadical J\nj1 j2 : CostructuredArrow (idealPowersToSelfLERadical J) J'\nh : j2.left.unop ≤ j1.left.unop\n⊢ Zag j1 j2\n[PROOFSTEP]\nright\n[GOAL]\ncase h.hab.inl.h\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhR : IsNoetherian R R\nJ' : SelfLERadical J\nj1 j2 : CostructuredArrow (idealPowersToSelfLERadical J) J'\nh : j1.left.unop ≤ j2.left.unop\n⊢ Nonempty (j2 ⟶ j1)\ncase h.hab.inr\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhR : IsNoetherian R R\nJ' : SelfLERadical J\nj1 j2 : CostructuredArrow (idealPowersToSelfLERadical J) J'\nh : j2.left.unop ≤ j1.left.unop\n⊢ Zag j1 j2\n[PROOFSTEP]\nexact ⟨CostructuredArrow.homMk (homOfLE h).op (AsTrue.get trivial)⟩\n[GOAL]\ncase h.hab.inr\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhR : IsNoetherian R R\nJ' : SelfLERadical J\nj1 j2 : CostructuredArrow (idealPowersToSelfLERadical J) J'\nh : j2.left.unop ≤ j1.left.unop\n⊢ Zag j1 j2\n[PROOFSTEP]\nleft\n[GOAL]\ncase h.hab.inr.h\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhR : IsNoetherian R R\nJ' : SelfLERadical J\nj1 j2 : CostructuredArrow (idealPowersToSelfLERadical J) J'\nh : j2.left.unop ≤ j1.left.unop\n⊢ Nonempty (j1 ⟶ j2)\n[PROOFSTEP]\nexact ⟨CostructuredArrow.homMk (homOfLE h).op (AsTrue.get trivial)⟩\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhJK : Ideal.radical J = Ideal.radical K\nL : Ideal R\nhL : J ≤ Ideal.radical L\n⊢ K ≤ Ideal.radical L\n[PROOFSTEP]\nrw [← Ideal.radical_le_radical_iff] at hL ⊢\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nI J K : Ideal R\nhJK : Ideal.radical J = Ideal.radical K\nL : Ideal R\nhL : Ideal.radical J ≤ Ideal.radical L\n⊢ Ideal.radical K ≤ Ideal.radical L\n[PROOFSTEP]\nexact hJK.symm.trans_le hL\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Homology.LocalCohomology", "llama_tokens": 3075, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.72487026428967, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.3963142287263328}}
{"text": "[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nsrc✝ : AddGroupWithOne (ColimitType F) := ColimitType.AddGroupWithOne F\nx✝ y✝ z✝ : ColimitType F\nx y z : Prequotient F\n⊢ Quot.mk Setoid.r x * (Quot.mk Setoid.r y + Quot.mk Setoid.r z) =\n    Quot.mk Setoid.r x * Quot.mk Setoid.r y + Quot.mk Setoid.r x * Quot.mk Setoid.r z\n[PROOFSTEP]\nsimp only [(· + ·), (· * ·), Add.add]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nsrc✝ : AddGroupWithOne (ColimitType F) := ColimitType.AddGroupWithOne F\nx✝ y✝ z✝ : ColimitType F\nx y z : Prequotient F\n⊢ Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))\n      (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r x)\n      (Quotient.map₂ add (_ : ∀ (x x' : Prequotient F), x ≈ x' → ∀ (y y' : Prequotient F), y ≈ y' → add x y ≈ add x' y')\n        (Quot.mk Setoid.r y) (Quot.mk Setoid.r z)) =\n    Quotient.map₂ add (_ : ∀ (x x' : Prequotient F), x ≈ x' → ∀ (y y' : Prequotient F), y ≈ y' → add x y ≈ add x' y')\n      (Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))\n        (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r x)\n        (Quot.mk Setoid.r y))\n      (Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))\n        (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r x)\n        (Quot.mk Setoid.r z))\n[PROOFSTEP]\nexact Quot.sound (Relation.left_distrib _ _ _)\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nsrc✝ : AddGroupWithOne (ColimitType F) := ColimitType.AddGroupWithOne F\nx✝ y✝ z✝ : ColimitType F\nx y z : Prequotient F\n⊢ (Quot.mk Setoid.r x + Quot.mk Setoid.r y) * Quot.mk Setoid.r z =\n    Quot.mk Setoid.r x * Quot.mk Setoid.r z + Quot.mk Setoid.r y * Quot.mk Setoid.r z\n[PROOFSTEP]\nsimp only [(· + ·), (· * ·), Add.add]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nsrc✝ : AddGroupWithOne (ColimitType F) := ColimitType.AddGroupWithOne F\nx✝ y✝ z✝ : ColimitType F\nx y z : Prequotient F\n⊢ Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))\n      (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y))\n      (Quotient.map₂ add (_ : ∀ (x x' : Prequotient F), x ≈ x' → ∀ (y y' : Prequotient F), y ≈ y' → add x y ≈ add x' y')\n        (Quot.mk Setoid.r x) (Quot.mk Setoid.r y))\n      (Quot.mk Setoid.r z) =\n    Quotient.map₂ add (_ : ∀ (x x' : Prequotient F), x ≈ x' → ∀ (y y' : Prequotient F), y ≈ y' → add x y ≈ add x' y')\n      (Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))\n        (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r x)\n        (Quot.mk Setoid.r z))\n      (Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))\n        (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r y)\n        (Quot.mk Setoid.r z))\n[PROOFSTEP]\nexact Quot.sound (Relation.right_distrib _ _ _)\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nsrc✝ : AddGroupWithOne (ColimitType F) := ColimitType.AddGroupWithOne F\nx✝ y✝ z✝ : ColimitType F\nx y z : Prequotient F\n⊢ Quot.mk Setoid.r x * Quot.mk Setoid.r y * Quot.mk Setoid.r z =\n    Quot.mk Setoid.r x * (Quot.mk Setoid.r y * Quot.mk Setoid.r z)\n[PROOFSTEP]\nsimp only [(· * ·)]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nsrc✝ : AddGroupWithOne (ColimitType F) := ColimitType.AddGroupWithOne F\nx✝ y✝ z✝ : ColimitType F\nx y z : Prequotient F\n⊢ Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))\n      (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y))\n      (Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))\n        (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r x)\n        (Quot.mk Setoid.r y))\n      (Quot.mk Setoid.r z) =\n    Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))\n      (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r x)\n      (Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))\n        (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r y)\n        (Quot.mk Setoid.r z))\n[PROOFSTEP]\nexact Quot.sound (Relation.mul_assoc _ _ _)\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj : J\n⊢ coconeFun F j 1 = 1\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj : J\n⊢ Setoid.r (Prequotient.of j 1) one\n[PROOFSTEP]\napply Relation.one\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj : J\n⊢ ∀ (x y : ↑(F.obj j)),\n    OneHom.toFun\n        { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) }\n        (x * y) =\n      OneHom.toFun\n          { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) } x *\n        OneHom.toFun\n          { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) } y\n[PROOFSTEP]\nintros\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj : J\nx✝ y✝ : ↑(F.obj j)\n⊢ OneHom.toFun\n      { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) }\n      (x✝ * y✝) =\n    OneHom.toFun\n        { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) } x✝ *\n      OneHom.toFun\n        { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) } y✝\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj : J\nx✝ y✝ : ↑(F.obj j)\n⊢ Setoid.r (Prequotient.of j (x✝ * y✝)) (mul (Prequotient.of j x✝) (Prequotient.of j y✝))\n[PROOFSTEP]\napply Relation.mul\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj : J\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : ↑(F.obj j)),\n                Quot.mk Setoid.r (Prequotient.of j (x * y)) =\n                  Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })\n      0 =\n    0\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj : J\n⊢ Setoid.r (Prequotient.of j 0) zero\n[PROOFSTEP]\napply Relation.zero\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj : J\n⊢ ∀ (x y : ↑(F.obj j)),\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := coconeFun F j,\n                map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : ↑(F.obj j)),\n                  Quot.mk Setoid.r (Prequotient.of j (x * y)) =\n                    Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })\n        (x + y) =\n      OneHom.toFun\n          (↑{\n              toOneHom :=\n                { toFun := coconeFun F j,\n                  map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : ↑(F.obj j)),\n                    Quot.mk Setoid.r (Prequotient.of j (x * y)) =\n                      Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })\n          x +\n        OneHom.toFun\n          (↑{\n              toOneHom :=\n                { toFun := coconeFun F j,\n                  map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : ↑(F.obj j)),\n                    Quot.mk Setoid.r (Prequotient.of j (x * y)) =\n                      Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })\n          y\n[PROOFSTEP]\nintros\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj : J\nx✝ y✝ : ↑(F.obj j)\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : ↑(F.obj j)),\n                Quot.mk Setoid.r (Prequotient.of j (x * y)) =\n                  Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })\n      (x✝ + y✝) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := coconeFun F j,\n                map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : ↑(F.obj j)),\n                  Quot.mk Setoid.r (Prequotient.of j (x * y)) =\n                    Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })\n        x✝ +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := coconeFun F j,\n                map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : ↑(F.obj j)),\n                  Quot.mk Setoid.r (Prequotient.of j (x * y)) =\n                    Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })\n        y✝\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj : J\nx✝ y✝ : ↑(F.obj j)\n⊢ Setoid.r (Prequotient.of j (x✝ + y✝)) (add (Prequotient.of j x✝) (Prequotient.of j y✝))\n[PROOFSTEP]\napply Relation.add\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj j' : J\nf : j ⟶ j'\n⊢ F.map f ≫ coconeMorphism F j' = coconeMorphism F j\n[PROOFSTEP]\next\n[GOAL]\ncase w\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj j' : J\nf : j ⟶ j'\nx✝ : (forget CommRingCat).obj (F.obj j)\n⊢ ↑(F.map f ≫ coconeMorphism F j') x✝ = ↑(coconeMorphism F j) x✝\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase w.a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj j' : J\nf : j ⟶ j'\nx✝ : (forget CommRingCat).obj (F.obj j)\n⊢ Setoid.r (Prequotient.of j' (↑(F.map f) x✝)) (Prequotient.of j x✝)\n[PROOFSTEP]\napply Relation.map\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj j' : J\nf : j ⟶ j'\nx : ↑(F.obj j)\n⊢ ↑(coconeMorphism F j') (↑(F.map f) x) = ↑(coconeMorphism F j) x\n[PROOFSTEP]\nrw [← cocone_naturality F f]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\nj j' : J\nf : j ⟶ j'\nx : ↑(F.obj j)\n⊢ ↑(coconeMorphism F j') (↑(F.map f) x) = ↑(F.map f ≫ coconeMorphism F j') x\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\n⊢ ColimitType F → ↑s.pt\n[PROOFSTEP]\nfapply Quot.lift\n[GOAL]\ncase f\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\n⊢ Prequotient F → ↑s.pt\n[PROOFSTEP]\nexact descFunLift F s\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\n⊢ ∀ (a b : Prequotient F), Setoid.r a b → descFunLift F s a = descFunLift F s b\n[PROOFSTEP]\nintro x y r\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y : Prequotient F\nr : Setoid.r x y\n⊢ descFunLift F s x = descFunLift F s y\n[PROOFSTEP]\ninduction r with\n| refl => rfl\n| symm x y _ ih => exact ih.symm\n| trans x y z _ _ ih1 ih2 => exact ih1.trans ih2\n| map j j' f x => exact RingHom.congr_fun (s.ι.naturality f) x\n| zero j => simp\n| one j => simp\n| neg j x => simp\n| add j x y => simp\n| mul j x y => simp\n| neg_1 x x' r ih => dsimp; rw [ih]\n| add_1 x x' y r ih => dsimp; rw [ih]\n| add_2 x y y' r ih => dsimp; rw [ih]\n| mul_1 x x' y r ih => dsimp; rw [ih]\n| mul_2 x y y' r ih => dsimp; rw [ih]\n| zero_add x => dsimp; rw [zero_add]\n| add_zero x => dsimp; rw [add_zero]\n| one_mul x => dsimp; rw [one_mul]\n| mul_one x => dsimp; rw [mul_one]\n| add_left_neg x => dsimp; rw [add_left_neg]\n| add_comm x y => dsimp; rw [add_comm]\n| mul_comm x y => dsimp; rw [mul_comm]\n| add_assoc x y z => dsimp; rw [add_assoc]\n| mul_assoc x y z => dsimp; rw [mul_assoc]\n| left_distrib x y z => dsimp; rw [mul_add]\n| right_distrib x y z => dsimp; rw [add_mul]\n| zero_mul x => dsimp; rw [zero_mul]\n| mul_zero x => dsimp; rw [mul_zero]\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y : Prequotient F\nr : Setoid.r x y\n⊢ descFunLift F s x = descFunLift F s y\n[PROOFSTEP]\ninduction r with\n| refl => rfl\n| symm x y _ ih => exact ih.symm\n| trans x y z _ _ ih1 ih2 => exact ih1.trans ih2\n| map j j' f x => exact RingHom.congr_fun (s.ι.naturality f) x\n| zero j => simp\n| one j => simp\n| neg j x => simp\n| add j x y => simp\n| mul j x y => simp\n| neg_1 x x' r ih => dsimp; rw [ih]\n| add_1 x x' y r ih => dsimp; rw [ih]\n| add_2 x y y' r ih => dsimp; rw [ih]\n| mul_1 x x' y r ih => dsimp; rw [ih]\n| mul_2 x y y' r ih => dsimp; rw [ih]\n| zero_add x => dsimp; rw [zero_add]\n| add_zero x => dsimp; rw [add_zero]\n| one_mul x => dsimp; rw [one_mul]\n| mul_one x => dsimp; rw [mul_one]\n| add_left_neg x => dsimp; rw [add_left_neg]\n| add_comm x y => dsimp; rw [add_comm]\n| mul_comm x y => dsimp; rw [mul_comm]\n| add_assoc x y z => dsimp; rw [add_assoc]\n| mul_assoc x y z => dsimp; rw [mul_assoc]\n| left_distrib x y z => dsimp; rw [mul_add]\n| right_distrib x y z => dsimp; rw [add_mul]\n| zero_mul x => dsimp; rw [zero_mul]\n| mul_zero x => dsimp; rw [mul_zero]\n[GOAL]\ncase a.refl\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s x✝ = descFunLift F s x✝\n[PROOFSTEP]\n\n| refl => rfl\n[GOAL]\ncase a.refl\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s x✝ = descFunLift F s x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.symm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝¹ y✝ x y : Prequotient F\nx✝ : Relation F x y\nih : descFunLift F s x = descFunLift F s y\n⊢ descFunLift F s y = descFunLift F s x\n[PROOFSTEP]\n\n| symm x y _ ih => exact ih.symm\n[GOAL]\ncase a.symm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝¹ y✝ x y : Prequotient F\nx✝ : Relation F x y\nih : descFunLift F s x = descFunLift F s y\n⊢ descFunLift F s y = descFunLift F s x\n[PROOFSTEP]\nexact ih.symm\n[GOAL]\ncase a.trans\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝² y✝ x y z : Prequotient F\nx✝¹ : Relation F x y\nx✝ : Relation F y z\nih1 : descFunLift F s x = descFunLift F s y\nih2 : descFunLift F s y = descFunLift F s z\n⊢ descFunLift F s x = descFunLift F s z\n[PROOFSTEP]\n\n| trans x y z _ _ ih1 ih2 => exact ih1.trans ih2\n[GOAL]\ncase a.trans\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝² y✝ x y z : Prequotient F\nx✝¹ : Relation F x y\nx✝ : Relation F y z\nih1 : descFunLift F s x = descFunLift F s y\nih2 : descFunLift F s y = descFunLift F s z\n⊢ descFunLift F s x = descFunLift F s z\n[PROOFSTEP]\nexact ih1.trans ih2\n[GOAL]\ncase a.map\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y : Prequotient F\nj j' : J\nf : j ⟶ j'\nx : ↑(F.obj j)\n⊢ descFunLift F s (Prequotient.of j' (↑(F.map f) x)) = descFunLift F s (Prequotient.of j x)\n[PROOFSTEP]\n\n| map j j' f x => exact RingHom.congr_fun (s.ι.naturality f) x\n[GOAL]\ncase a.map\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y : Prequotient F\nj j' : J\nf : j ⟶ j'\nx : ↑(F.obj j)\n⊢ descFunLift F s (Prequotient.of j' (↑(F.map f) x)) = descFunLift F s (Prequotient.of j x)\n[PROOFSTEP]\nexact RingHom.congr_fun (s.ι.naturality f) x\n[GOAL]\ncase a.zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y : Prequotient F\nj : J\n⊢ descFunLift F s (Prequotient.of j 0) = descFunLift F s zero\n[PROOFSTEP]\n\n| zero j => simp\n[GOAL]\ncase a.zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y : Prequotient F\nj : J\n⊢ descFunLift F s (Prequotient.of j 0) = descFunLift F s zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y : Prequotient F\nj : J\n⊢ descFunLift F s (Prequotient.of j 1) = descFunLift F s one\n[PROOFSTEP]\n\n| one j => simp\n[GOAL]\ncase a.one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y : Prequotient F\nj : J\n⊢ descFunLift F s (Prequotient.of j 1) = descFunLift F s one\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y : Prequotient F\nj : J\nx : ↑(F.obj j)\n⊢ descFunLift F s (Prequotient.of j (-x)) = descFunLift F s (neg (Prequotient.of j x))\n[PROOFSTEP]\n\n| neg j x => simp\n[GOAL]\ncase a.neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y : Prequotient F\nj : J\nx : ↑(F.obj j)\n⊢ descFunLift F s (Prequotient.of j (-x)) = descFunLift F s (neg (Prequotient.of j x))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ : Prequotient F\nj : J\nx y : ↑(F.obj j)\n⊢ descFunLift F s (Prequotient.of j (x + y)) = descFunLift F s (add (Prequotient.of j x) (Prequotient.of j y))\n[PROOFSTEP]\n\n| add j x y => simp\n[GOAL]\ncase a.add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ : Prequotient F\nj : J\nx y : ↑(F.obj j)\n⊢ descFunLift F s (Prequotient.of j (x + y)) = descFunLift F s (add (Prequotient.of j x) (Prequotient.of j y))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ : Prequotient F\nj : J\nx y : ↑(F.obj j)\n⊢ descFunLift F s (Prequotient.of j (x * y)) = descFunLift F s (mul (Prequotient.of j x) (Prequotient.of j y))\n[PROOFSTEP]\n\n| mul j x y => simp\n[GOAL]\ncase a.mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ : Prequotient F\nj : J\nx y : ↑(F.obj j)\n⊢ descFunLift F s (Prequotient.of j (x * y)) = descFunLift F s (mul (Prequotient.of j x) (Prequotient.of j y))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.neg_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x x' : Prequotient F\nr : Relation F x x'\nih : descFunLift F s x = descFunLift F s x'\n⊢ descFunLift F s (neg x) = descFunLift F s (neg x')\n[PROOFSTEP]\n\n| neg_1 x x' r ih => dsimp; rw [ih]\n[GOAL]\ncase a.neg_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x x' : Prequotient F\nr : Relation F x x'\nih : descFunLift F s x = descFunLift F s x'\n⊢ descFunLift F s (neg x) = descFunLift F s (neg x')\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.neg_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x x' : Prequotient F\nr : Relation F x x'\nih : descFunLift F s x = descFunLift F s x'\n⊢ -descFunLift F s x = -descFunLift F s x'\n[PROOFSTEP]\nrw [ih]\n[GOAL]\ncase a.add_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x x' y : Prequotient F\nr : Relation F x x'\nih : descFunLift F s x = descFunLift F s x'\n⊢ descFunLift F s (add x y) = descFunLift F s (add x' y)\n[PROOFSTEP]\n\n| add_1 x x' y r ih => dsimp; rw [ih]\n[GOAL]\ncase a.add_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x x' y : Prequotient F\nr : Relation F x x'\nih : descFunLift F s x = descFunLift F s x'\n⊢ descFunLift F s (add x y) = descFunLift F s (add x' y)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.add_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x x' y : Prequotient F\nr : Relation F x x'\nih : descFunLift F s x = descFunLift F s x'\n⊢ descFunLift F s x + descFunLift F s y = descFunLift F s x' + descFunLift F s y\n[PROOFSTEP]\nrw [ih]\n[GOAL]\ncase a.add_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y y' : Prequotient F\nr : Relation F y y'\nih : descFunLift F s y = descFunLift F s y'\n⊢ descFunLift F s (add x y) = descFunLift F s (add x y')\n[PROOFSTEP]\n\n| add_2 x y y' r ih => dsimp; rw [ih]\n[GOAL]\ncase a.add_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y y' : Prequotient F\nr : Relation F y y'\nih : descFunLift F s y = descFunLift F s y'\n⊢ descFunLift F s (add x y) = descFunLift F s (add x y')\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.add_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y y' : Prequotient F\nr : Relation F y y'\nih : descFunLift F s y = descFunLift F s y'\n⊢ descFunLift F s x + descFunLift F s y = descFunLift F s x + descFunLift F s y'\n[PROOFSTEP]\nrw [ih]\n[GOAL]\ncase a.mul_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x x' y : Prequotient F\nr : Relation F x x'\nih : descFunLift F s x = descFunLift F s x'\n⊢ descFunLift F s (mul x y) = descFunLift F s (mul x' y)\n[PROOFSTEP]\n\n| mul_1 x x' y r ih => dsimp; rw [ih]\n[GOAL]\ncase a.mul_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x x' y : Prequotient F\nr : Relation F x x'\nih : descFunLift F s x = descFunLift F s x'\n⊢ descFunLift F s (mul x y) = descFunLift F s (mul x' y)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.mul_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x x' y : Prequotient F\nr : Relation F x x'\nih : descFunLift F s x = descFunLift F s x'\n⊢ descFunLift F s x * descFunLift F s y = descFunLift F s x' * descFunLift F s y\n[PROOFSTEP]\nrw [ih]\n[GOAL]\ncase a.mul_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y y' : Prequotient F\nr : Relation F y y'\nih : descFunLift F s y = descFunLift F s y'\n⊢ descFunLift F s (mul x y) = descFunLift F s (mul x y')\n[PROOFSTEP]\n\n| mul_2 x y y' r ih => dsimp; rw [ih]\n[GOAL]\ncase a.mul_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y y' : Prequotient F\nr : Relation F y y'\nih : descFunLift F s y = descFunLift F s y'\n⊢ descFunLift F s (mul x y) = descFunLift F s (mul x y')\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.mul_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y y' : Prequotient F\nr : Relation F y y'\nih : descFunLift F s y = descFunLift F s y'\n⊢ descFunLift F s x * descFunLift F s y = descFunLift F s x * descFunLift F s y'\n[PROOFSTEP]\nrw [ih]\n[GOAL]\ncase a.zero_add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (add zero x) = descFunLift F s x\n[PROOFSTEP]\n\n| zero_add x => dsimp; rw [zero_add]\n[GOAL]\ncase a.zero_add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (add zero x) = descFunLift F s x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.zero_add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ 0 + descFunLift F s x = descFunLift F s x\n[PROOFSTEP]\nrw [zero_add]\n[GOAL]\ncase a.add_zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (add x zero) = descFunLift F s x\n[PROOFSTEP]\n\n| add_zero x => dsimp; rw [add_zero]\n[GOAL]\ncase a.add_zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (add x zero) = descFunLift F s x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.add_zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s x + 0 = descFunLift F s x\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\ncase a.one_mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (mul one x) = descFunLift F s x\n[PROOFSTEP]\n\n| one_mul x => dsimp; rw [one_mul]\n[GOAL]\ncase a.one_mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (mul one x) = descFunLift F s x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.one_mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ 1 * descFunLift F s x = descFunLift F s x\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\ncase a.mul_one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (mul x one) = descFunLift F s x\n[PROOFSTEP]\n\n| mul_one x => dsimp; rw [mul_one]\n[GOAL]\ncase a.mul_one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (mul x one) = descFunLift F s x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.mul_one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s x * 1 = descFunLift F s x\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase a.add_left_neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (add (neg x) x) = descFunLift F s zero\n[PROOFSTEP]\n\n| add_left_neg x => dsimp; rw [add_left_neg]\n[GOAL]\ncase a.add_left_neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (add (neg x) x) = descFunLift F s zero\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.add_left_neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ -descFunLift F s x + descFunLift F s x = 0\n[PROOFSTEP]\nrw [add_left_neg]\n[GOAL]\ncase a.add_comm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y : Prequotient F\n⊢ descFunLift F s (add x y) = descFunLift F s (add y x)\n[PROOFSTEP]\n\n| add_comm x y => dsimp; rw [add_comm]\n[GOAL]\ncase a.add_comm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y : Prequotient F\n⊢ descFunLift F s (add x y) = descFunLift F s (add y x)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.add_comm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y : Prequotient F\n⊢ descFunLift F s x + descFunLift F s y = descFunLift F s y + descFunLift F s x\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\ncase a.mul_comm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y : Prequotient F\n⊢ descFunLift F s (mul x y) = descFunLift F s (mul y x)\n[PROOFSTEP]\n\n| mul_comm x y => dsimp; rw [mul_comm]\n[GOAL]\ncase a.mul_comm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y : Prequotient F\n⊢ descFunLift F s (mul x y) = descFunLift F s (mul y x)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.mul_comm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y : Prequotient F\n⊢ descFunLift F s x * descFunLift F s y = descFunLift F s y * descFunLift F s x\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase a.add_assoc\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y z : Prequotient F\n⊢ descFunLift F s (add (add x y) z) = descFunLift F s (add x (add y z))\n[PROOFSTEP]\n\n| add_assoc x y z => dsimp; rw [add_assoc]\n[GOAL]\ncase a.add_assoc\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y z : Prequotient F\n⊢ descFunLift F s (add (add x y) z) = descFunLift F s (add x (add y z))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.add_assoc\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y z : Prequotient F\n⊢ descFunLift F s x + descFunLift F s y + descFunLift F s z =\n    descFunLift F s x + (descFunLift F s y + descFunLift F s z)\n[PROOFSTEP]\nrw [add_assoc]\n[GOAL]\ncase a.mul_assoc\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y z : Prequotient F\n⊢ descFunLift F s (mul (mul x y) z) = descFunLift F s (mul x (mul y z))\n[PROOFSTEP]\n\n| mul_assoc x y z => dsimp; rw [mul_assoc]\n[GOAL]\ncase a.mul_assoc\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y z : Prequotient F\n⊢ descFunLift F s (mul (mul x y) z) = descFunLift F s (mul x (mul y z))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.mul_assoc\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y z : Prequotient F\n⊢ descFunLift F s x * descFunLift F s y * descFunLift F s z =\n    descFunLift F s x * (descFunLift F s y * descFunLift F s z)\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\ncase a.left_distrib\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y z : Prequotient F\n⊢ descFunLift F s (mul x (add y z)) = descFunLift F s (add (mul x y) (mul x z))\n[PROOFSTEP]\n\n| left_distrib x y z => dsimp; rw [mul_add]\n[GOAL]\ncase a.left_distrib\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y z : Prequotient F\n⊢ descFunLift F s (mul x (add y z)) = descFunLift F s (add (mul x y) (mul x z))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.left_distrib\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y z : Prequotient F\n⊢ descFunLift F s x * (descFunLift F s y + descFunLift F s z) =\n    descFunLift F s x * descFunLift F s y + descFunLift F s x * descFunLift F s z\n[PROOFSTEP]\nrw [mul_add]\n[GOAL]\ncase a.right_distrib\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y z : Prequotient F\n⊢ descFunLift F s (mul (add x y) z) = descFunLift F s (add (mul x z) (mul y z))\n[PROOFSTEP]\n\n| right_distrib x y z => dsimp; rw [add_mul]\n[GOAL]\ncase a.right_distrib\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y z : Prequotient F\n⊢ descFunLift F s (mul (add x y) z) = descFunLift F s (add (mul x z) (mul y z))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.right_distrib\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y✝ x y z : Prequotient F\n⊢ (descFunLift F s x + descFunLift F s y) * descFunLift F s z =\n    descFunLift F s x * descFunLift F s z + descFunLift F s y * descFunLift F s z\n[PROOFSTEP]\nrw [add_mul]\n[GOAL]\ncase a.zero_mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (mul zero x) = descFunLift F s zero\n[PROOFSTEP]\n\n| zero_mul x => dsimp; rw [zero_mul]\n[GOAL]\ncase a.zero_mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (mul zero x) = descFunLift F s zero\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.zero_mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ 0 * descFunLift F s x = 0\n[PROOFSTEP]\nrw [zero_mul]\n[GOAL]\ncase a.mul_zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (mul x zero) = descFunLift F s zero\n[PROOFSTEP]\n\n| mul_zero x => dsimp; rw [mul_zero]\n[GOAL]\ncase a.mul_zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s (mul x zero) = descFunLift F s zero\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.mul_zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ y x : Prequotient F\n⊢ descFunLift F s x * 0 = 0\n[PROOFSTEP]\nrw [mul_zero]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y : ↑(colimit F)\n⊢ OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =\n    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *\n      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y\n[PROOFSTEP]\nexact Quot.induction_on₂ x y fun a b => rfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y : ↑(colimit F)\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : ↑(colimit F)),\n                OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =\n                  OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *\n                    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y) })\n      (x + y) =\n    OneHom.toFun\n        (↑{ toOneHom := { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : ↑(colimit F)),\n                  OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =\n                    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *\n                      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y) })\n        x +\n      OneHom.toFun\n        (↑{ toOneHom := { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : ↑(colimit F)),\n                  OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =\n                    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *\n                      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y) })\n        y\n[PROOFSTEP]\nrefine Quot.induction_on₂ x y fun a b => ?_\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y : ↑(colimit F)\na b : Prequotient F\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : ↑(colimit F)),\n                OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =\n                  OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *\n                    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y) })\n      (Quot.mk Setoid.r a + Quot.mk Setoid.r b) =\n    OneHom.toFun\n        (↑{ toOneHom := { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : ↑(colimit F)),\n                  OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =\n                    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *\n                      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y) })\n        (Quot.mk Setoid.r a) +\n      OneHom.toFun\n        (↑{ toOneHom := { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : ↑(colimit F)),\n                  OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =\n                    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *\n                      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y) })\n        (Quot.mk Setoid.r b)\n[PROOFSTEP]\ndsimp [descFun, (· + ·)]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y : ↑(colimit F)\na b : Prequotient F\n⊢ Quot.lift (descFunLift F s) (_ : ∀ (x y : Prequotient F), Setoid.r x y → descFunLift F s x = descFunLift F s y)\n      (Add.add (Quot.mk Setoid.r a) (Quot.mk Setoid.r b)) =\n    Add.add (descFunLift F s a) (descFunLift F s b)\n[PROOFSTEP]\nrw [← quot_add]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx y : ↑(colimit F)\na b : Prequotient F\n⊢ Quot.lift (descFunLift F s) (_ : ∀ (x y : Prequotient F), Setoid.r x y → descFunLift F s x = descFunLift F s y)\n      (Quot.mk Setoid.r (add a b)) =\n    Add.add (descFunLift F s a) (descFunLift F s b)\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx : ↑(colimitCocone F).pt\n⊢ ↑m x = ↑((fun s => descMorphism F s) s) x\n[PROOFSTEP]\nchange (colimitCocone F).pt →+* s.pt at m \n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ ↑m x = ↑((fun s => descMorphism F s) s) x\n[PROOFSTEP]\nrefine Quot.inductionOn x ?_\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ ∀ (a : Prequotient F), ↑m (Quot.mk Setoid.r a) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r a)\n[PROOFSTEP]\nintro x\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx : Prequotient F\n⊢ ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\n[PROOFSTEP]\ninduction x with\n| zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]\n| one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]\n| neg x ih => erw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]\n| of j x => exact congr_fun (congr_arg (fun f : F.obj j ⟶ s.pt => (f : F.obj j → s.pt)) (w j)) x\n| add x y ih_x ih_y => erw [quot_add, map_add (f := m), (descMorphism F s).map_add, ih_x, ih_y]\n| mul x y ih_x ih_y => erw [quot_mul, map_mul (f := m), (descMorphism F s).map_mul, ih_x, ih_y]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx : Prequotient F\n⊢ ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\n[PROOFSTEP]\ninduction x with\n| zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]\n| one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]\n| neg x ih => erw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]\n| of j x => exact congr_fun (congr_arg (fun f : F.obj j ⟶ s.pt => (f : F.obj j → s.pt)) (w j)) x\n| add x y ih_x ih_y => erw [quot_add, map_add (f := m), (descMorphism F s).map_add, ih_x, ih_y]\n| mul x y ih_x ih_y => erw [quot_mul, map_mul (f := m), (descMorphism F s).map_mul, ih_x, ih_y]\n[GOAL]\ncase zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ ↑m (Quot.mk Setoid.r zero) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r zero)\n[PROOFSTEP]\n\n| zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]\n[GOAL]\ncase zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ ↑m (Quot.mk Setoid.r zero) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r zero)\n[PROOFSTEP]\nerw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]\n[GOAL]\ncase one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ ↑m (Quot.mk Setoid.r one) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r one)\n[PROOFSTEP]\n\n| one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]\n[GOAL]\ncase one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ ↑m (Quot.mk Setoid.r one) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r one)\n[PROOFSTEP]\nerw [quot_one, map_one (f := m), (descMorphism F s).map_one]\n[GOAL]\ncase neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx : Prequotient F\nih : ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\n⊢ ↑m (Quot.mk Setoid.r (neg x)) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r (neg x))\n[PROOFSTEP]\n\n| neg x ih => erw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]\n[GOAL]\ncase neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx : Prequotient F\nih : ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\n⊢ ↑m (Quot.mk Setoid.r (neg x)) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r (neg x))\n[PROOFSTEP]\nerw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]\n[GOAL]\ncase of\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nj : J\nx : ↑(F.obj j)\n⊢ ↑m (Quot.mk Setoid.r (Prequotient.of j x)) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r (Prequotient.of j x))\n[PROOFSTEP]\n\n| of j x => exact congr_fun (congr_arg (fun f : F.obj j ⟶ s.pt => (f : F.obj j → s.pt)) (w j)) x\n[GOAL]\ncase of\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nj : J\nx : ↑(F.obj j)\n⊢ ↑m (Quot.mk Setoid.r (Prequotient.of j x)) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r (Prequotient.of j x))\n[PROOFSTEP]\nexact congr_fun (congr_arg (fun f : F.obj j ⟶ s.pt => (f : F.obj j → s.pt)) (w j)) x\n[GOAL]\ncase add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx y : Prequotient F\nih_x : ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\nih_y : ↑m (Quot.mk Setoid.r y) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)\n⊢ ↑m (Quot.mk Setoid.r (add x y)) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r (add x y))\n[PROOFSTEP]\n\n| add x y ih_x ih_y => erw [quot_add, map_add (f := m), (descMorphism F s).map_add, ih_x, ih_y]\n[GOAL]\ncase add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx y : Prequotient F\nih_x : ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\nih_y : ↑m (Quot.mk Setoid.r y) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)\n⊢ ↑m (Quot.mk Setoid.r (add x y)) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r (add x y))\n[PROOFSTEP]\nerw [quot_add, map_add (f := m), (descMorphism F s).map_add, ih_x, ih_y]\n[GOAL]\ncase mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx y : Prequotient F\nih_x : ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\nih_y : ↑m (Quot.mk Setoid.r y) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)\n⊢ ↑m (Quot.mk Setoid.r (mul x y)) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r (mul x y))\n[PROOFSTEP]\n\n| mul x y ih_x ih_y => erw [quot_mul, map_mul (f := m), (descMorphism F s).map_mul, ih_x, ih_y]\n[GOAL]\ncase mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ CommRingCat\ns : Cocone F\nx✝ : ↑(colimitCocone F).pt\nm : ↑(colimitCocone F).pt →+* ↑s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx y : Prequotient F\nih_x : ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\nih_y : ↑m (Quot.mk Setoid.r y) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)\n⊢ ↑m (Quot.mk Setoid.r (mul x y)) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r (mul x y))\n[PROOFSTEP]\nerw [quot_mul, map_mul (f := m), (descMorphism F s).map_mul, ih_x, ih_y]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.Ring.Colimits", "llama_tokens": 20427, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7401743735019595, "lm_q2_score": 0.5350984286266116, "lm_q1q2_score": 0.3960661441705852}}
{"text": "[GOAL]\nu : ℂ\nhu : 0 < u.re\nv : ℂ\n⊢ IntervalIntegrable (fun x => ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)) volume 0 (1 / 2)\n[PROOFSTEP]\napply IntervalIntegrable.mul_continuousOn\n[GOAL]\ncase hf\nu : ℂ\nhu : 0 < u.re\nv : ℂ\n⊢ IntervalIntegrable (fun x => ↑x ^ (u - 1)) volume 0 (1 / 2)\n[PROOFSTEP]\nrefine' intervalIntegral.intervalIntegrable_cpow' _\n[GOAL]\ncase hf\nu : ℂ\nhu : 0 < u.re\nv : ℂ\n⊢ -1 < (u - 1).re\n[PROOFSTEP]\nrwa [sub_re, one_re, ← zero_sub, sub_lt_sub_iff_right]\n[GOAL]\ncase hg\nu : ℂ\nhu : 0 < u.re\nv : ℂ\n⊢ ContinuousOn (fun x => (1 - ↑x) ^ (v - 1)) (uIcc 0 (1 / 2))\n[PROOFSTEP]\napply ContinuousAt.continuousOn\n[GOAL]\ncase hg.hcont\nu : ℂ\nhu : 0 < u.re\nv : ℂ\n⊢ ∀ (x : ℝ), x ∈ uIcc 0 (1 / 2) → ContinuousAt (fun x => (1 - ↑x) ^ (v - 1)) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase hg.hcont\nu : ℂ\nhu : 0 < u.re\nv : ℂ\nx : ℝ\nhx : x ∈ uIcc 0 (1 / 2)\n⊢ ContinuousAt (fun x => (1 - ↑x) ^ (v - 1)) x\n[PROOFSTEP]\nrw [uIcc_of_le (by positivity : (0 : ℝ) ≤ 1 / 2)] at hx \n[GOAL]\nu : ℂ\nhu : 0 < u.re\nv : ℂ\nx : ℝ\nhx : x ∈ uIcc 0 (1 / 2)\n⊢ 0 ≤ 1 / 2\n[PROOFSTEP]\npositivity\n[GOAL]\ncase hg.hcont\nu : ℂ\nhu : 0 < u.re\nv : ℂ\nx : ℝ\nhx : x ∈ Icc 0 (1 / 2)\n⊢ ContinuousAt (fun x => (1 - ↑x) ^ (v - 1)) x\n[PROOFSTEP]\napply ContinuousAt.cpow\n[GOAL]\ncase hg.hcont.hf\nu : ℂ\nhu : 0 < u.re\nv : ℂ\nx : ℝ\nhx : x ∈ Icc 0 (1 / 2)\n⊢ ContinuousAt (fun x => 1 - ↑x) x\n[PROOFSTEP]\nexact (continuous_const.sub continuous_ofReal).continuousAt\n[GOAL]\ncase hg.hcont.hg\nu : ℂ\nhu : 0 < u.re\nv : ℂ\nx : ℝ\nhx : x ∈ Icc 0 (1 / 2)\n⊢ ContinuousAt (fun x => v - 1) x\n[PROOFSTEP]\nexact continuousAt_const\n[GOAL]\ncase hg.hcont.h0\nu : ℂ\nhu : 0 < u.re\nv : ℂ\nx : ℝ\nhx : x ∈ Icc 0 (1 / 2)\n⊢ 0 < (1 - ↑x).re ∨ (1 - ↑x).im ≠ 0\n[PROOFSTEP]\nrw [sub_re, one_re, ofReal_re, sub_pos]\n[GOAL]\ncase hg.hcont.h0\nu : ℂ\nhu : 0 < u.re\nv : ℂ\nx : ℝ\nhx : x ∈ Icc 0 (1 / 2)\n⊢ x < 1 ∨ (1 - ↑x).im ≠ 0\n[PROOFSTEP]\nexact Or.inl (hx.2.trans_lt (by norm_num : (1 / 2 : ℝ) < 1))\n[GOAL]\nu : ℂ\nhu : 0 < u.re\nv : ℂ\nx : ℝ\nhx : x ∈ Icc 0 (1 / 2)\n⊢ 1 / 2 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\n⊢ IntervalIntegrable (fun x => ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)) volume 0 1\n[PROOFSTEP]\nrefine' (betaIntegral_convergent_left hu v).trans _\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\n⊢ IntervalIntegrable (fun x => ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)) volume (1 / 2) 1\n[PROOFSTEP]\nrw [IntervalIntegrable.iff_comp_neg]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\n⊢ IntervalIntegrable (fun x => ↑(-x) ^ (u - 1) * (1 - ↑(-x)) ^ (v - 1)) volume (-(1 / 2)) (-1)\n[PROOFSTEP]\nconvert ((betaIntegral_convergent_left hv u).comp_add_right 1).symm using 1\n[GOAL]\ncase h.e'_3\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\n⊢ (fun x => ↑(-x) ^ (u - 1) * (1 - ↑(-x)) ^ (v - 1)) = fun x => ↑(x + 1) ^ (v - 1) * (1 - ↑(x + 1)) ^ (u - 1)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h.e'_3.h\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nx : ℝ\n⊢ ↑(-x) ^ (u - 1) * (1 - ↑(-x)) ^ (v - 1) = ↑(x + 1) ^ (v - 1) * (1 - ↑(x + 1)) ^ (u - 1)\n[PROOFSTEP]\nconv_lhs => rw [mul_comm]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nx : ℝ\n| ↑(-x) ^ (u - 1) * (1 - ↑(-x)) ^ (v - 1)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nx : ℝ\n| ↑(-x) ^ (u - 1) * (1 - ↑(-x)) ^ (v - 1)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nx : ℝ\n| ↑(-x) ^ (u - 1) * (1 - ↑(-x)) ^ (v - 1)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase h.e'_3.h\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nx : ℝ\n⊢ (1 - ↑(-x)) ^ (v - 1) * ↑(-x) ^ (u - 1) = ↑(x + 1) ^ (v - 1) * (1 - ↑(x + 1)) ^ (u - 1)\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.e'_3.h.e_a.e_a\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nx : ℝ\n⊢ 1 - ↑(-x) = ↑(x + 1)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_3.h.e_a.e_a\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nx : ℝ\n⊢ 1 - -↑x = ↑x + 1\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_3.h.e_a.e_a\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nx : ℝ\n⊢ ↑(-x) = 1 - ↑(x + 1)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_3.h.e_a.e_a\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nx : ℝ\n⊢ -↑x = 1 - (↑x + 1)\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_5\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\n⊢ -(1 / 2) = 1 / 2 - 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_6\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\n⊢ -1 = 0 - 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nu v : ℂ\n⊢ betaIntegral v u = betaIntegral u v\n[PROOFSTEP]\nrw [betaIntegral, betaIntegral]\n[GOAL]\nu v : ℂ\n⊢ ∫ (x : ℝ) in 0 ..1, ↑x ^ (v - 1) * (1 - ↑x) ^ (u - 1) = ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n[PROOFSTEP]\nhave :=\n  intervalIntegral.integral_comp_mul_add (a := 0) (b := 1) (c := -1)\n    (fun x : ℝ => (x : ℂ) ^ (u - 1) * (1 - (x : ℂ)) ^ (v - 1)) neg_one_lt_zero.ne 1\n[GOAL]\nu v : ℂ\nthis :\n  ∫ (x : ℝ) in 0 ..1, ↑(-1 * x + 1) ^ (u - 1) * (1 - ↑(-1 * x + 1)) ^ (v - 1) =\n    (-1)⁻¹ • ∫ (x : ℝ) in -1 * 0 + 1 ..-1 * 1 + 1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n⊢ ∫ (x : ℝ) in 0 ..1, ↑x ^ (v - 1) * (1 - ↑x) ^ (u - 1) = ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n[PROOFSTEP]\nrw [inv_neg, inv_one, neg_one_smul, ← intervalIntegral.integral_symm] at this \n[GOAL]\nu v : ℂ\nthis :\n  ∫ (x : ℝ) in 0 ..1, ↑(-1 * x + 1) ^ (u - 1) * (1 - ↑(-1 * x + 1)) ^ (v - 1) =\n    ∫ (x : ℝ) in -1 * 1 + 1 ..-1 * 0 + 1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n⊢ ∫ (x : ℝ) in 0 ..1, ↑x ^ (v - 1) * (1 - ↑x) ^ (u - 1) = ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n[PROOFSTEP]\nsimp at this \n[GOAL]\nu v : ℂ\nthis : ∫ (x : ℝ) in 0 ..1, (-↑x + 1) ^ (u - 1) * ↑x ^ (v - 1) = ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n⊢ ∫ (x : ℝ) in 0 ..1, ↑x ^ (v - 1) * (1 - ↑x) ^ (u - 1) = ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n[PROOFSTEP]\nconv_lhs at this => arg 1; intro x; rw [add_comm, ← sub_eq_add_neg, mul_comm]\n[GOAL]\nu v : ℂ\nthis : ∫ (x : ℝ) in 0 ..1, (-↑x + 1) ^ (u - 1) * ↑x ^ (v - 1) = ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n| ∫ (x : ℝ) in 0 ..1, (-↑x + 1) ^ (u - 1) * ↑x ^ (v - 1)\n[PROOFSTEP]\narg 1; intro x; rw [add_comm, ← sub_eq_add_neg, mul_comm]\n[GOAL]\nu v : ℂ\nthis : ∫ (x : ℝ) in 0 ..1, (-↑x + 1) ^ (u - 1) * ↑x ^ (v - 1) = ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n| ∫ (x : ℝ) in 0 ..1, (-↑x + 1) ^ (u - 1) * ↑x ^ (v - 1)\n[PROOFSTEP]\narg 1; intro x; rw [add_comm, ← sub_eq_add_neg, mul_comm]\n[GOAL]\nu v : ℂ\nthis : ∫ (x : ℝ) in 0 ..1, (-↑x + 1) ^ (u - 1) * ↑x ^ (v - 1) = ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n| ∫ (x : ℝ) in 0 ..1, (-↑x + 1) ^ (u - 1) * ↑x ^ (v - 1)\n[PROOFSTEP]\narg 1\n[GOAL]\nu v : ℂ\nthis : ∫ (x : ℝ) in 0 ..1, (-↑x + 1) ^ (u - 1) * ↑x ^ (v - 1) = ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n| fun x => (-↑x + 1) ^ (u - 1) * ↑x ^ (v - 1)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nu v : ℂ\nthis : ∫ (x : ℝ) in 0 ..1, (-↑x + 1) ^ (u - 1) * ↑x ^ (v - 1) = ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\nx : ℝ\n| (-↑x + 1) ^ (u - 1) * ↑x ^ (v - 1)\n[PROOFSTEP]\nrw [add_comm, ← sub_eq_add_neg, mul_comm]\n[GOAL]\nu v : ℂ\nthis : ∫ (x : ℝ) in 0 ..1, ↑x ^ (v - 1) * (1 - ↑x) ^ (u - 1) = ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n⊢ ∫ (x : ℝ) in 0 ..1, ↑x ^ (v - 1) * (1 - ↑x) ^ (u - 1) = ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)\n[PROOFSTEP]\nexact this\n[GOAL]\nu : ℂ\nhu : 0 < u.re\n⊢ betaIntegral u 1 = 1 / u\n[PROOFSTEP]\nsimp_rw [betaIntegral, sub_self, cpow_zero, mul_one]\n[GOAL]\nu : ℂ\nhu : 0 < u.re\n⊢ ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) = 1 / u\n[PROOFSTEP]\nrw [integral_cpow (Or.inl _)]\n[GOAL]\nu : ℂ\nhu : 0 < u.re\n⊢ (↑1 ^ (u - 1 + 1) - ↑0 ^ (u - 1 + 1)) / (u - 1 + 1) = 1 / u\n[PROOFSTEP]\nrw [ofReal_zero, ofReal_one, one_cpow, zero_cpow, sub_zero, sub_add_cancel]\n[GOAL]\nu : ℂ\nhu : 0 < u.re\n⊢ u - 1 + 1 ≠ 0\n[PROOFSTEP]\nrw [sub_add_cancel]\n[GOAL]\nu : ℂ\nhu : 0 < u.re\n⊢ u ≠ 0\n[PROOFSTEP]\ncontrapose! hu\n[GOAL]\nu : ℂ\nhu : u = 0\n⊢ u.re ≤ 0\n[PROOFSTEP]\nrw [hu, zero_re]\n[GOAL]\nu : ℂ\nhu : 0 < u.re\n⊢ -1 < (u - 1).re\n[PROOFSTEP]\nrwa [sub_re, one_re, ← sub_pos, sub_neg_eq_add, sub_add_cancel]\n[GOAL]\ns t : ℂ\na : ℝ\nha : 0 < a\n⊢ ∫ (x : ℝ) in 0 ..a, ↑x ^ (s - 1) * (↑a - ↑x) ^ (t - 1) = ↑a ^ (s + t - 1) * betaIntegral s t\n[PROOFSTEP]\nhave ha' : (a : ℂ) ≠ 0 := ofReal_ne_zero.mpr ha.ne'\n[GOAL]\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\n⊢ ∫ (x : ℝ) in 0 ..a, ↑x ^ (s - 1) * (↑a - ↑x) ^ (t - 1) = ↑a ^ (s + t - 1) * betaIntegral s t\n[PROOFSTEP]\nrw [betaIntegral]\n[GOAL]\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\n⊢ ∫ (x : ℝ) in 0 ..a, ↑x ^ (s - 1) * (↑a - ↑x) ^ (t - 1) =\n    ↑a ^ (s + t - 1) * ∫ (x : ℝ) in 0 ..1, ↑x ^ (s - 1) * (1 - ↑x) ^ (t - 1)\n[PROOFSTEP]\nhave A : (a : ℂ) ^ (s + t - 1) = a * ((a : ℂ) ^ (s - 1) * (a : ℂ) ^ (t - 1)) := by\n  rw [(by abel : s + t - 1 = 1 + (s - 1) + (t - 1)), cpow_add _ _ ha', cpow_add 1 _ ha', cpow_one, mul_assoc]\n[GOAL]\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\n⊢ ↑a ^ (s + t - 1) = ↑a * (↑a ^ (s - 1) * ↑a ^ (t - 1))\n[PROOFSTEP]\nrw [(by abel : s + t - 1 = 1 + (s - 1) + (t - 1)), cpow_add _ _ ha', cpow_add 1 _ ha', cpow_one, mul_assoc]\n[GOAL]\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\n⊢ s + t - 1 = 1 + (s - 1) + (t - 1)\n[PROOFSTEP]\nabel\n[GOAL]\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\n⊢ s + t - 1 = 1 + (s - 1) + (t - 1)\n[PROOFSTEP]\nabel\n[GOAL]\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\nA : ↑a ^ (s + t - 1) = ↑a * (↑a ^ (s - 1) * ↑a ^ (t - 1))\n⊢ ∫ (x : ℝ) in 0 ..a, ↑x ^ (s - 1) * (↑a - ↑x) ^ (t - 1) =\n    ↑a ^ (s + t - 1) * ∫ (x : ℝ) in 0 ..1, ↑x ^ (s - 1) * (1 - ↑x) ^ (t - 1)\n[PROOFSTEP]\nrw [A, mul_assoc, ← intervalIntegral.integral_const_mul, ← real_smul, ← zero_div a, ← div_self ha.ne', ←\n  intervalIntegral.integral_comp_div _ ha.ne', zero_div]\n[GOAL]\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\nA : ↑a ^ (s + t - 1) = ↑a * (↑a ^ (s - 1) * ↑a ^ (t - 1))\n⊢ ∫ (x : ℝ) in 0 ..a, ↑x ^ (s - 1) * (↑a - ↑x) ^ (t - 1) =\n    ∫ (x : ℝ) in 0 ..a, ↑a ^ (s - 1) * ↑a ^ (t - 1) * (↑(x / a) ^ (s - 1) * (1 - ↑(x / a)) ^ (t - 1))\n[PROOFSTEP]\nsimp_rw [intervalIntegral.integral_of_le ha.le]\n[GOAL]\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\nA : ↑a ^ (s + t - 1) = ↑a * (↑a ^ (s - 1) * ↑a ^ (t - 1))\n⊢ ∫ (x : ℝ) in Ioc 0 a, ↑x ^ (s - 1) * (↑a - ↑x) ^ (t - 1) =\n    ∫ (x : ℝ) in Ioc 0 a, ↑a ^ (s - 1) * ↑a ^ (t - 1) * (↑(x / a) ^ (s - 1) * (1 - ↑(x / a)) ^ (t - 1))\n[PROOFSTEP]\nrefine' set_integral_congr measurableSet_Ioc fun x hx => _\n[GOAL]\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\nA : ↑a ^ (s + t - 1) = ↑a * (↑a ^ (s - 1) * ↑a ^ (t - 1))\nx : ℝ\nhx : x ∈ Ioc 0 a\n⊢ ↑x ^ (s - 1) * (↑a - ↑x) ^ (t - 1) = ↑a ^ (s - 1) * ↑a ^ (t - 1) * (↑(x / a) ^ (s - 1) * (1 - ↑(x / a)) ^ (t - 1))\n[PROOFSTEP]\nrw [mul_mul_mul_comm]\n[GOAL]\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\nA : ↑a ^ (s + t - 1) = ↑a * (↑a ^ (s - 1) * ↑a ^ (t - 1))\nx : ℝ\nhx : x ∈ Ioc 0 a\n⊢ ↑x ^ (s - 1) * (↑a - ↑x) ^ (t - 1) = ↑a ^ (s - 1) * ↑(x / a) ^ (s - 1) * (↑a ^ (t - 1) * (1 - ↑(x / a)) ^ (t - 1))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\nA : ↑a ^ (s + t - 1) = ↑a * (↑a ^ (s - 1) * ↑a ^ (t - 1))\nx : ℝ\nhx : x ∈ Ioc 0 a\n⊢ ↑x ^ (s - 1) = ↑a ^ (s - 1) * ↑(x / a) ^ (s - 1)\n[PROOFSTEP]\nrw [← mul_cpow_ofReal_nonneg ha.le (div_pos hx.1 ha).le, ofReal_div, mul_div_cancel' _ ha']\n[GOAL]\ncase e_a\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\nA : ↑a ^ (s + t - 1) = ↑a * (↑a ^ (s - 1) * ↑a ^ (t - 1))\nx : ℝ\nhx : x ∈ Ioc 0 a\n⊢ (↑a - ↑x) ^ (t - 1) = ↑a ^ (t - 1) * (1 - ↑(x / a)) ^ (t - 1)\n[PROOFSTEP]\nrw [(by norm_cast : (1 : ℂ) - ↑(x / a) = ↑(1 - x / a)), ←\n  mul_cpow_ofReal_nonneg ha.le (sub_nonneg.mpr <| (div_le_one ha).mpr hx.2)]\n[GOAL]\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\nA : ↑a ^ (s + t - 1) = ↑a * (↑a ^ (s - 1) * ↑a ^ (t - 1))\nx : ℝ\nhx : x ∈ Ioc 0 a\n⊢ 1 - ↑(x / a) = ↑(1 - x / a)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase e_a\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\nA : ↑a ^ (s + t - 1) = ↑a * (↑a ^ (s - 1) * ↑a ^ (t - 1))\nx : ℝ\nhx : x ∈ Ioc 0 a\n⊢ (↑a - ↑x) ^ (t - 1) = (↑a * ↑(1 - x / a)) ^ (t - 1)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase e_a\ns t : ℂ\na : ℝ\nha : 0 < a\nha' : ↑a ≠ 0\nA : ↑a ^ (s + t - 1) = ↑a * (↑a ^ (s - 1) * ↑a ^ (t - 1))\nx : ℝ\nhx : x ∈ Ioc 0 a\n⊢ (↑a - ↑x) ^ (t - 1) = (↑a * (1 - ↑x / ↑a)) ^ (t - 1)\n[PROOFSTEP]\nrw [mul_sub, mul_one, mul_div_cancel' _ ha']\n[GOAL]\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\n⊢ Gamma s * Gamma t = Gamma (s + t) * betaIntegral s t\n[PROOFSTEP]\nhave conv_int :=\n  integral_posConvolution (GammaIntegral_convergent hs) (GammaIntegral_convergent ht) (ContinuousLinearMap.mul ℝ ℂ)\n[GOAL]\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x,\n        ↑(↑(ContinuousLinearMap.mul ℝ ℂ) (↑(rexp (-t_1)) * ↑t_1 ^ (s - 1)))\n          (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    ↑(↑(ContinuousLinearMap.mul ℝ ℂ) (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)))\n      (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1))\n⊢ Gamma s * Gamma t = Gamma (s + t) * betaIntegral s t\n[PROOFSTEP]\nsimp_rw [ContinuousLinearMap.mul_apply'] at conv_int \n[GOAL]\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\n⊢ Gamma s * Gamma t = Gamma (s + t) * betaIntegral s t\n[PROOFSTEP]\nhave hst : 0 < re (s + t) := by rw [add_re]; exact add_pos hs ht\n[GOAL]\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\n⊢ 0 < (s + t).re\n[PROOFSTEP]\nrw [add_re]\n[GOAL]\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\n⊢ 0 < s.re + t.re\n[PROOFSTEP]\nexact add_pos hs ht\n[GOAL]\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\nhst : 0 < (s + t).re\n⊢ Gamma s * Gamma t = Gamma (s + t) * betaIntegral s t\n[PROOFSTEP]\nrw [Gamma_eq_integral hs, Gamma_eq_integral ht, Gamma_eq_integral hst, GammaIntegral, GammaIntegral, GammaIntegral, ←\n  conv_int, ← integral_mul_right (betaIntegral _ _)]\n[GOAL]\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\nhst : 0 < (s + t).re\n⊢ ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    ∫ (a : ℝ) in Ioi 0, ↑(rexp (-a)) * ↑a ^ (s + t - 1) * betaIntegral s t\n[PROOFSTEP]\nrefine' set_integral_congr measurableSet_Ioi fun x hx => _\n[GOAL]\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\nhst : 0 < (s + t).re\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    ↑(rexp (-x)) * ↑x ^ (s + t - 1) * betaIntegral s t\n[PROOFSTEP]\nrw [mul_assoc, ← betaIntegral_scaled s t hx, ← intervalIntegral.integral_const_mul]\n[GOAL]\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\nhst : 0 < (s + t).re\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    ∫ (x_1 : ℝ) in 0 ..x, ↑(rexp (-x)) * (↑x_1 ^ (s - 1) * (↑x - ↑x_1) ^ (t - 1))\n[PROOFSTEP]\ncongr 1 with y : 1\n[GOAL]\ncase e_f.h\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\nhst : 0 < (s + t).re\nx : ℝ\nhx : x ∈ Ioi 0\ny : ℝ\n⊢ ↑(rexp (-y)) * ↑y ^ (s - 1) * (↑(rexp (-(x - y))) * ↑(x - y) ^ (t - 1)) =\n    ↑(rexp (-x)) * (↑y ^ (s - 1) * (↑x - ↑y) ^ (t - 1))\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase e_f.h\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\nhst : 0 < (s + t).re\nx : ℝ\nhx : x ∈ Ioi 0\ny : ℝ\n⊢ cexp (-↑y) * ↑y ^ (s - 1) * (cexp (-(↑x - ↑y)) * (↑x - ↑y) ^ (t - 1)) =\n    cexp (-↑x) * (↑y ^ (s - 1) * (↑x - ↑y) ^ (t - 1))\n[PROOFSTEP]\nsuffices Complex.exp (-x) = Complex.exp (-y) * Complex.exp (-(x - y)) by rw [this]; ring\n[GOAL]\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\nhst : 0 < (s + t).re\nx : ℝ\nhx : x ∈ Ioi 0\ny : ℝ\nthis : cexp (-↑x) = cexp (-↑y) * cexp (-(↑x - ↑y))\n⊢ cexp (-↑y) * ↑y ^ (s - 1) * (cexp (-(↑x - ↑y)) * (↑x - ↑y) ^ (t - 1)) =\n    cexp (-↑x) * (↑y ^ (s - 1) * (↑x - ↑y) ^ (t - 1))\n[PROOFSTEP]\nrw [this]\n[GOAL]\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\nhst : 0 < (s + t).re\nx : ℝ\nhx : x ∈ Ioi 0\ny : ℝ\nthis : cexp (-↑x) = cexp (-↑y) * cexp (-(↑x - ↑y))\n⊢ cexp (-↑y) * ↑y ^ (s - 1) * (cexp (-(↑x - ↑y)) * (↑x - ↑y) ^ (t - 1)) =\n    cexp (-↑y) * cexp (-(↑x - ↑y)) * (↑y ^ (s - 1) * (↑x - ↑y) ^ (t - 1))\n[PROOFSTEP]\nring\n[GOAL]\ncase e_f.h\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\nhst : 0 < (s + t).re\nx : ℝ\nhx : x ∈ Ioi 0\ny : ℝ\n⊢ cexp (-↑x) = cexp (-↑y) * cexp (-(↑x - ↑y))\n[PROOFSTEP]\nrw [← Complex.exp_add]\n[GOAL]\ncase e_f.h\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\nhst : 0 < (s + t).re\nx : ℝ\nhx : x ∈ Ioi 0\ny : ℝ\n⊢ cexp (-↑x) = cexp (-↑y + -(↑x - ↑y))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f.h.e_z\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\nhst : 0 < (s + t).re\nx : ℝ\nhx : x ∈ Ioi 0\ny : ℝ\n⊢ -↑x = -↑y + -(↑x - ↑y)\n[PROOFSTEP]\nabel\n[GOAL]\ncase e_f.h.e_z\ns t : ℂ\nhs : 0 < s.re\nht : 0 < t.re\nconv_int :\n  ∫ (x : ℝ) in Ioi 0,\n      ∫ (t_1 : ℝ) in 0 ..x, ↑(rexp (-t_1)) * ↑t_1 ^ (s - 1) * (↑(rexp (-(x - t_1))) * ↑(x - t_1) ^ (t - 1)) =\n    (∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (s - 1)) * ∫ (x : ℝ) in Ioi 0, ↑(rexp (-x)) * ↑x ^ (t - 1)\nhst : 0 < (s + t).re\nx : ℝ\nhx : x ∈ Ioi 0\ny : ℝ\n⊢ -↑x = -↑y + -(↑x - ↑y)\n[PROOFSTEP]\nabel\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\n⊢ u * betaIntegral u (v + 1) = v * betaIntegral (u + 1) v\n[PROOFSTEP]\nlet F : ℝ → ℂ := fun x => (x : ℂ) ^ u * (1 - (x : ℂ)) ^ v\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\n⊢ u * betaIntegral u (v + 1) = v * betaIntegral (u + 1) v\n[PROOFSTEP]\nhave hu' : 0 < re (u + 1) := by rw [add_re, one_re]; positivity\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\n⊢ 0 < (u + 1).re\n[PROOFSTEP]\nrw [add_re, one_re]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\n⊢ 0 < u.re + 1\n[PROOFSTEP]\npositivity\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\n⊢ u * betaIntegral u (v + 1) = v * betaIntegral (u + 1) v\n[PROOFSTEP]\nhave hv' : 0 < re (v + 1) := by rw [add_re, one_re]; positivity\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\n⊢ 0 < (v + 1).re\n[PROOFSTEP]\nrw [add_re, one_re]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\n⊢ 0 < v.re + 1\n[PROOFSTEP]\npositivity\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\n⊢ u * betaIntegral u (v + 1) = v * betaIntegral (u + 1) v\n[PROOFSTEP]\nhave hc : ContinuousOn F (Icc 0 1) :=\n  by\n  refine' (ContinuousAt.continuousOn fun x hx => _).mul (ContinuousAt.continuousOn fun x hx => _)\n  · refine' (continuousAt_cpow_const_of_re_pos (Or.inl _) hu).comp continuous_ofReal.continuousAt\n    rw [ofReal_re]; exact hx.1\n  · refine' (continuousAt_cpow_const_of_re_pos (Or.inl _) hv).comp (continuous_const.sub continuous_ofReal).continuousAt\n    rw [sub_re, one_re, ofReal_re, sub_nonneg]\n    exact hx.2\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\n⊢ ContinuousOn F (Icc 0 1)\n[PROOFSTEP]\nrefine' (ContinuousAt.continuousOn fun x hx => _).mul (ContinuousAt.continuousOn fun x hx => _)\n[GOAL]\ncase refine'_1\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ ContinuousAt (fun x => ↑x ^ u) x\n[PROOFSTEP]\nrefine' (continuousAt_cpow_const_of_re_pos (Or.inl _) hu).comp continuous_ofReal.continuousAt\n[GOAL]\ncase refine'_1\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ 0 ≤ (↑x).re\n[PROOFSTEP]\nrw [ofReal_re]\n[GOAL]\ncase refine'_1\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ 0 ≤ x\n[PROOFSTEP]\nexact hx.1\n[GOAL]\ncase refine'_2\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ ContinuousAt (fun x => (1 - ↑x) ^ v) x\n[PROOFSTEP]\nrefine' (continuousAt_cpow_const_of_re_pos (Or.inl _) hv).comp (continuous_const.sub continuous_ofReal).continuousAt\n[GOAL]\ncase refine'_2\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ 0 ≤ (1 - ↑x).re\n[PROOFSTEP]\nrw [sub_re, one_re, ofReal_re, sub_nonneg]\n[GOAL]\ncase refine'_2\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nx : ℝ\nhx : x ∈ Icc 0 1\n⊢ x ≤ 1\n[PROOFSTEP]\nexact hx.2\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\n⊢ u * betaIntegral u (v + 1) = v * betaIntegral (u + 1) v\n[PROOFSTEP]\nhave hder :\n  ∀ x : ℝ,\n    x ∈ Ioo (0 : ℝ) 1 →\n      HasDerivAt F (u * ((x : ℂ) ^ (u - 1) * (1 - (x : ℂ)) ^ v) - v * ((x : ℂ) ^ u * (1 - (x : ℂ)) ^ (v - 1))) x :=\n  by\n  intro x hx\n  have U : HasDerivAt (fun y : ℂ => y ^ u) (u * (x : ℂ) ^ (u - 1)) ↑x :=\n    by\n    have := @HasDerivAt.cpow_const _ _ _ u (hasDerivAt_id (x : ℂ)) (Or.inl ?_)\n    simp only [id_eq, mul_one] at this \n    · exact this\n    · rw [id_eq, ofReal_re]; exact hx.1\n  have V : HasDerivAt (fun y : ℂ => (1 - y) ^ v) (-v * (1 - (x : ℂ)) ^ (v - 1)) ↑x :=\n    by\n    have A := @HasDerivAt.cpow_const _ _ _ v (hasDerivAt_id (1 - (x : ℂ))) (Or.inl ?_)\n    swap; · rw [id.def, sub_re, one_re, ofReal_re, sub_pos]; exact hx.2\n    simp_rw [id.def] at A \n    have B : HasDerivAt (fun y : ℂ => 1 - y) (-1) ↑x := by apply HasDerivAt.const_sub; apply hasDerivAt_id\n    convert HasDerivAt.comp (↑x) A B using 1\n    ring\n  convert (U.mul V).comp_ofReal using 1\n  ring\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\n⊢ ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\n⊢ HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\n[PROOFSTEP]\nhave U : HasDerivAt (fun y : ℂ => y ^ u) (u * (x : ℂ) ^ (u - 1)) ↑x :=\n  by\n  have := @HasDerivAt.cpow_const _ _ _ u (hasDerivAt_id (x : ℂ)) (Or.inl ?_)\n  simp only [id_eq, mul_one] at this \n  · exact this\n  · rw [id_eq, ofReal_re]; exact hx.1\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\n⊢ HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\n[PROOFSTEP]\nhave := @HasDerivAt.cpow_const _ _ _ u (hasDerivAt_id (x : ℂ)) (Or.inl ?_)\n[GOAL]\ncase refine_2\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nthis : HasDerivAt (fun x => id x ^ u) (u * id ↑x ^ (u - 1) * 1) ↑x\n⊢ HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\ncase refine_1\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\n⊢ 0 < (id ↑x).re\n[PROOFSTEP]\nsimp only [id_eq, mul_one] at this \n[GOAL]\ncase refine_2\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nthis : HasDerivAt (fun x => x ^ u) (u * ↑x ^ (u - 1)) ↑x\n⊢ HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\n[PROOFSTEP]\nexact this\n[GOAL]\ncase refine_1\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\n⊢ 0 < (id ↑x).re\n[PROOFSTEP]\nrw [id_eq, ofReal_re]\n[GOAL]\ncase refine_1\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\n⊢ 0 < x\n[PROOFSTEP]\nexact hx.1\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\n⊢ HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\n[PROOFSTEP]\nhave V : HasDerivAt (fun y : ℂ => (1 - y) ^ v) (-v * (1 - (x : ℂ)) ^ (v - 1)) ↑x :=\n  by\n  have A := @HasDerivAt.cpow_const _ _ _ v (hasDerivAt_id (1 - (x : ℂ))) (Or.inl ?_)\n  swap; · rw [id.def, sub_re, one_re, ofReal_re, sub_pos]; exact hx.2\n  simp_rw [id.def] at A \n  have B : HasDerivAt (fun y : ℂ => 1 - y) (-1) ↑x := by apply HasDerivAt.const_sub; apply hasDerivAt_id\n  convert HasDerivAt.comp (↑x) A B using 1\n  ring\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\n⊢ HasDerivAt (fun y => (1 - y) ^ v) (-v * (1 - ↑x) ^ (v - 1)) ↑x\n[PROOFSTEP]\nhave A := @HasDerivAt.cpow_const _ _ _ v (hasDerivAt_id (1 - (x : ℂ))) (Or.inl ?_)\n[GOAL]\ncase refine_2\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\nA : HasDerivAt (fun x => id x ^ v) (v * id (1 - ↑x) ^ (v - 1) * 1) (1 - ↑x)\n⊢ HasDerivAt (fun y => (1 - y) ^ v) (-v * (1 - ↑x) ^ (v - 1)) ↑x\ncase refine_1\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\n⊢ 0 < (id (1 - ↑x)).re\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine_1\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\n⊢ 0 < (id (1 - ↑x)).re\n[PROOFSTEP]\nrw [id.def, sub_re, one_re, ofReal_re, sub_pos]\n[GOAL]\ncase refine_1\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\n⊢ x < 1\n[PROOFSTEP]\nexact hx.2\n[GOAL]\ncase refine_2\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\nA : HasDerivAt (fun x => id x ^ v) (v * id (1 - ↑x) ^ (v - 1) * 1) (1 - ↑x)\n⊢ HasDerivAt (fun y => (1 - y) ^ v) (-v * (1 - ↑x) ^ (v - 1)) ↑x\n[PROOFSTEP]\nsimp_rw [id.def] at A \n[GOAL]\ncase refine_2\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\nA : HasDerivAt (fun x => x ^ v) (v * (1 - ↑x) ^ (v - 1) * 1) (1 - ↑x)\n⊢ HasDerivAt (fun y => (1 - y) ^ v) (-v * (1 - ↑x) ^ (v - 1)) ↑x\n[PROOFSTEP]\nhave B : HasDerivAt (fun y : ℂ => 1 - y) (-1) ↑x := by apply HasDerivAt.const_sub; apply hasDerivAt_id\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\nA : HasDerivAt (fun x => x ^ v) (v * (1 - ↑x) ^ (v - 1) * 1) (1 - ↑x)\n⊢ HasDerivAt (fun y => 1 - y) (-1) ↑x\n[PROOFSTEP]\napply HasDerivAt.const_sub\n[GOAL]\ncase hf\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\nA : HasDerivAt (fun x => x ^ v) (v * (1 - ↑x) ^ (v - 1) * 1) (1 - ↑x)\n⊢ HasDerivAt (fun x => x) 1 ↑x\n[PROOFSTEP]\napply hasDerivAt_id\n[GOAL]\ncase refine_2\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\nA : HasDerivAt (fun x => x ^ v) (v * (1 - ↑x) ^ (v - 1) * 1) (1 - ↑x)\nB : HasDerivAt (fun y => 1 - y) (-1) ↑x\n⊢ HasDerivAt (fun y => (1 - y) ^ v) (-v * (1 - ↑x) ^ (v - 1)) ↑x\n[PROOFSTEP]\nconvert HasDerivAt.comp (↑x) A B using 1\n[GOAL]\ncase h.e'_7\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\nA : HasDerivAt (fun x => x ^ v) (v * (1 - ↑x) ^ (v - 1) * 1) (1 - ↑x)\nB : HasDerivAt (fun y => 1 - y) (-1) ↑x\n⊢ -v * (1 - ↑x) ^ (v - 1) = v * (1 - ↑x) ^ (v - 1) * 1 * -1\n[PROOFSTEP]\nring\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\nV : HasDerivAt (fun y => (1 - y) ^ v) (-v * (1 - ↑x) ^ (v - 1)) ↑x\n⊢ HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\n[PROOFSTEP]\nconvert (U.mul V).comp_ofReal using 1\n[GOAL]\ncase h.e'_7\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nx : ℝ\nhx : x ∈ Ioo 0 1\nU : HasDerivAt (fun y => y ^ u) (u * ↑x ^ (u - 1)) ↑x\nV : HasDerivAt (fun y => (1 - y) ^ v) (-v * (1 - ↑x) ^ (v - 1)) ↑x\n⊢ u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1)) =\n    u * ↑x ^ (u - 1) * (1 - ↑x) ^ v + ↑x ^ u * (-v * (1 - ↑x) ^ (v - 1))\n[PROOFSTEP]\nring\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\n⊢ u * betaIntegral u (v + 1) = v * betaIntegral (u + 1) v\n[PROOFSTEP]\nhave h_int := ((betaIntegral_convergent hu hv').const_mul u).sub ((betaIntegral_convergent hu' hv).const_mul v)\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int :\n  IntervalIntegrable\n    (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ (v + 1 - 1)) - v * (↑x ^ (u + 1 - 1) * (1 - ↑x) ^ (v - 1))) volume 0 1\n⊢ u * betaIntegral u (v + 1) = v * betaIntegral (u + 1) v\n[PROOFSTEP]\nrw [add_sub_cancel, add_sub_cancel] at h_int \n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\n⊢ u * betaIntegral u (v + 1) = v * betaIntegral (u + 1) v\n[PROOFSTEP]\nhave int_ev := intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le zero_le_one hc hder h_int\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = F 1 - F 0\n⊢ u * betaIntegral u (v + 1) = v * betaIntegral (u + 1) v\n[PROOFSTEP]\nhave hF0 : F 0 = 0 :=\n  by\n  simp only [mul_eq_zero, ofReal_zero, cpow_eq_zero_iff, eq_self_iff_true, Ne.def, true_and_iff, sub_zero, one_cpow,\n    one_ne_zero, or_false_iff]\n  contrapose! hu; rw [hu, zero_re]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = F 1 - F 0\n⊢ F 0 = 0\n[PROOFSTEP]\nsimp only [mul_eq_zero, ofReal_zero, cpow_eq_zero_iff, eq_self_iff_true, Ne.def, true_and_iff, sub_zero, one_cpow,\n  one_ne_zero, or_false_iff]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = F 1 - F 0\n⊢ ¬u = 0\n[PROOFSTEP]\ncontrapose! hu\n[GOAL]\nu v : ℂ\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = F 1 - F 0\nhu : u = 0\n⊢ u.re ≤ 0\n[PROOFSTEP]\nrw [hu, zero_re]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = F 1 - F 0\nhF0 : F 0 = 0\n⊢ u * betaIntegral u (v + 1) = v * betaIntegral (u + 1) v\n[PROOFSTEP]\nhave hF1 : F 1 = 0 :=\n  by\n  simp only [mul_eq_zero, ofReal_one, one_cpow, one_ne_zero, sub_self, cpow_eq_zero_iff, eq_self_iff_true, Ne.def,\n    true_and_iff, false_or_iff]\n  contrapose! hv; rw [hv, zero_re]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = F 1 - F 0\nhF0 : F 0 = 0\n⊢ F 1 = 0\n[PROOFSTEP]\nsimp only [mul_eq_zero, ofReal_one, one_cpow, one_ne_zero, sub_self, cpow_eq_zero_iff, eq_self_iff_true, Ne.def,\n  true_and_iff, false_or_iff]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = F 1 - F 0\nhF0 : F 0 = 0\n⊢ ¬v = 0\n[PROOFSTEP]\ncontrapose! hv\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = F 1 - F 0\nhF0 : F 0 = 0\nhv : v = 0\n⊢ v.re ≤ 0\n[PROOFSTEP]\nrw [hv, zero_re]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = F 1 - F 0\nhF0 : F 0 = 0\nhF1 : F 1 = 0\n⊢ u * betaIntegral u (v + 1) = v * betaIntegral (u + 1) v\n[PROOFSTEP]\nrw [hF0, hF1, sub_zero, intervalIntegral.integral_sub, intervalIntegral.integral_const_mul,\n  intervalIntegral.integral_const_mul] at int_ev \n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : (u * ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * ∫ (x : ℝ) in 0 ..1, ↑x ^ u * (1 - ↑x) ^ (v - 1) = 0\nhF0 : F 0 = 0\nhF1 : F 1 = 0\n⊢ u * betaIntegral u (v + 1) = v * betaIntegral (u + 1) v\n[PROOFSTEP]\nrw [betaIntegral, betaIntegral, ← sub_eq_zero]\n[GOAL]\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : (u * ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * ∫ (x : ℝ) in 0 ..1, ↑x ^ u * (1 - ↑x) ^ (v - 1) = 0\nhF0 : F 0 = 0\nhF1 : F 1 = 0\n⊢ (u * ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ (v + 1 - 1)) -\n      v * ∫ (x : ℝ) in 0 ..1, ↑x ^ (u + 1 - 1) * (1 - ↑x) ^ (v - 1) =\n    0\n[PROOFSTEP]\nconvert int_ev\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_6.h.e'_4.h.h.e'_6.h.e'_6\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : (u * ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * ∫ (x : ℝ) in 0 ..1, ↑x ^ u * (1 - ↑x) ^ (v - 1) = 0\nhF0 : F 0 = 0\nhF1 : F 1 = 0\nx✝ : ℝ\n⊢ v + 1 - 1 = v\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_2.h.e'_6.h.e'_6.h.e'_4.h.h.e'_5.h.e'_6\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : (u * ∫ (x : ℝ) in 0 ..1, ↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * ∫ (x : ℝ) in 0 ..1, ↑x ^ u * (1 - ↑x) ^ (v - 1) = 0\nhF0 : F 0 = 0\nhF1 : F 1 = 0\nx✝ : ℝ\n⊢ u + 1 - 1 = u\n[PROOFSTEP]\nring\n[GOAL]\ncase hf\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = 0\nhF0 : F 0 = 0\nhF1 : F 1 = 0\n⊢ IntervalIntegrable (fun y => u * (↑y ^ (u - 1) * (1 - ↑y) ^ v)) volume 0 1\n[PROOFSTEP]\napply IntervalIntegrable.const_mul\n[GOAL]\ncase hf.hf\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = 0\nhF0 : F 0 = 0\nhF1 : F 1 = 0\n⊢ IntervalIntegrable (fun x => ↑x ^ (u - 1) * (1 - ↑x) ^ v) volume 0 1\n[PROOFSTEP]\nconvert betaIntegral_convergent hu hv'\n[GOAL]\ncase h.e'_3.h.h.e'_6.h.e'_6\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = 0\nhF0 : F 0 = 0\nhF1 : F 1 = 0\nx✝ : ℝ\n⊢ v = v + 1 - 1\n[PROOFSTEP]\nring\n[GOAL]\ncase hg\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = 0\nhF0 : F 0 = 0\nhF1 : F 1 = 0\n⊢ IntervalIntegrable (fun y => v * (↑y ^ u * (1 - ↑y) ^ (v - 1))) volume 0 1\n[PROOFSTEP]\napply IntervalIntegrable.const_mul\n[GOAL]\ncase hg.hf\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = 0\nhF0 : F 0 = 0\nhF1 : F 1 = 0\n⊢ IntervalIntegrable (fun x => ↑x ^ u * (1 - ↑x) ^ (v - 1)) volume 0 1\n[PROOFSTEP]\nconvert betaIntegral_convergent hu' hv\n[GOAL]\ncase h.e'_3.h.h.e'_5.h.e'_6\nu v : ℂ\nhu : 0 < u.re\nhv : 0 < v.re\nF : ℝ → ℂ := fun x => ↑x ^ u * (1 - ↑x) ^ v\nhu' : 0 < (u + 1).re\nhv' : 0 < (v + 1).re\nhc : ContinuousOn F (Icc 0 1)\nhder : ∀ (x : ℝ), x ∈ Ioo 0 1 → HasDerivAt F (u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) x\nh_int : IntervalIntegrable (fun x => u * (↑x ^ (u - 1) * (1 - ↑x) ^ v) - v * (↑x ^ u * (1 - ↑x) ^ (v - 1))) volume 0 1\nint_ev : ∫ (y : ℝ) in 0 ..1, u * (↑y ^ (u - 1) * (1 - ↑y) ^ v) - v * (↑y ^ u * (1 - ↑y) ^ (v - 1)) = 0\nhF0 : F 0 = 0\nhF1 : F 1 = 0\nx✝ : ℝ\n⊢ u = u + 1 - 1\n[PROOFSTEP]\nring\n[GOAL]\nu : ℂ\nhu : 0 < u.re\nn : ℕ\n⊢ betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\n[PROOFSTEP]\ninduction' n with n IH generalizing u\n[GOAL]\ncase zero\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nu : ℂ\nhu : 0 < u.re\n⊢ betaIntegral u (↑Nat.zero + 1) = ↑Nat.zero ! / ∏ j in Finset.range (Nat.zero + 1), (u + ↑j)\n[PROOFSTEP]\nrw [Nat.cast_zero, zero_add, betaIntegral_eval_one_right hu, Nat.factorial_zero, Nat.cast_one]\n[GOAL]\ncase zero\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nu : ℂ\nhu : 0 < u.re\n⊢ 1 / u = 1 / ∏ j in Finset.range (Nat.zero + 1), (u + ↑j)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\n⊢ betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n)! / ∏ j in Finset.range (Nat.succ n + 1), (u + ↑j)\n[PROOFSTEP]\nhave := betaIntegral_recurrence hu (?_ : 0 < re n.succ)\n[GOAL]\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : u * betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n)\n⊢ betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n)! / ∏ j in Finset.range (Nat.succ n + 1), (u + ↑j)\ncase succ.refine_1\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\n⊢ 0 < (↑(Nat.succ n)).re\n[PROOFSTEP]\nswap\n[GOAL]\ncase succ.refine_1\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\n⊢ 0 < (↑(Nat.succ n)).re\n[PROOFSTEP]\nrw [← ofReal_nat_cast, ofReal_re]\n[GOAL]\ncase succ.refine_1\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\n⊢ 0 < ↑(Nat.succ n)\n[PROOFSTEP]\npositivity\n[GOAL]\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : u * betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n)\n⊢ betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n)! / ∏ j in Finset.range (Nat.succ n + 1), (u + ↑j)\n[PROOFSTEP]\nrw [mul_comm u _, ← eq_div_iff] at this \n[GOAL]\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n) / u\n⊢ betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n)! / ∏ j in Finset.range (Nat.succ n + 1), (u + ↑j)\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) * u = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n)\n⊢ u ≠ 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) * u = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n)\n⊢ u ≠ 0\n[PROOFSTEP]\ncontrapose! hu\n[GOAL]\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nthis : betaIntegral u (↑(Nat.succ n) + 1) * u = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n)\nhu : u = 0\n⊢ u.re ≤ 0\n[PROOFSTEP]\nrw [hu, zero_re]\n[GOAL]\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n) / u\n⊢ betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n)! / ∏ j in Finset.range (Nat.succ n + 1), (u + ↑j)\n[PROOFSTEP]\nrw [this, Finset.prod_range_succ', Nat.cast_succ, IH]\n[GOAL]\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n) / u\n⊢ (↑n + 1) * (↑n ! / ∏ j in Finset.range (n + 1), (u + 1 + ↑j)) / u =\n    ↑(Nat.succ n)! / ((∏ k in Finset.range (n + 1), (u + ↑(k + 1))) * (u + ↑0))\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n) / u\n⊢ 0 < (u + 1).re\n[PROOFSTEP]\nswap\n[GOAL]\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n) / u\n⊢ 0 < (u + 1).re\n[PROOFSTEP]\nrw [add_re, one_re]\n[GOAL]\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n) / u\n⊢ 0 < u.re + 1\n[PROOFSTEP]\npositivity\n[GOAL]\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n) / u\n⊢ (↑n + 1) * (↑n ! / ∏ j in Finset.range (n + 1), (u + 1 + ↑j)) / u =\n    ↑(Nat.succ n)! / ((∏ k in Finset.range (n + 1), (u + ↑(k + 1))) * (u + ↑0))\n[PROOFSTEP]\nrw [Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one, Nat.cast_zero, add_zero, ← mul_div_assoc, ← div_div]\n[GOAL]\ncase succ.refine_2\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n) / u\n⊢ ((↑n + 1) * ↑n ! / ∏ j in Finset.range (n + 1), (u + 1 + ↑j)) / u =\n    ((↑n + 1) * ↑n ! / ∏ k in Finset.range (n + 1), (u + ↑(k + 1))) / u\n[PROOFSTEP]\ncongr 3 with j : 1\n[GOAL]\ncase succ.refine_2.e_a.e_a.e_f.h\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n) / u\nj : ℕ\n⊢ u + 1 + ↑j = u + ↑(j + 1)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase succ.refine_2.e_a.e_a.e_f.h\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n) / u\nj : ℕ\n⊢ u + 1 + ↑j = u + (↑j + 1)\n[PROOFSTEP]\nabel\n[GOAL]\ncase succ.refine_2.e_a.e_a.e_f.h\nu✝ : ℂ\nhu✝ : 0 < u✝.re\nn : ℕ\nIH : ∀ {u : ℂ}, 0 < u.re → betaIntegral u (↑n + 1) = ↑n ! / ∏ j in Finset.range (n + 1), (u + ↑j)\nu : ℂ\nhu : 0 < u.re\nthis : betaIntegral u (↑(Nat.succ n) + 1) = ↑(Nat.succ n) * betaIntegral (u + 1) ↑(Nat.succ n) / u\nj : ℕ\n⊢ u + 1 + ↑j = u + (↑j + 1)\n[PROOFSTEP]\nabel\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n⊢ GammaSeq s n = ↑n ^ s * betaIntegral s (↑n + 1)\n[PROOFSTEP]\nrw [GammaSeq, betaIntegral_eval_nat_add_one_right hs n, ← mul_div_assoc]\n[GOAL]\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n⊢ GammaSeq (s + 1) n / s = ↑n / (↑n + 1 + s) * GammaSeq s n\n[PROOFSTEP]\nconv_lhs => rw [GammaSeq, Finset.prod_range_succ, div_div]\n[GOAL]\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n| GammaSeq (s + 1) n / s\n[PROOFSTEP]\nrw [GammaSeq, Finset.prod_range_succ, div_div]\n[GOAL]\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n| GammaSeq (s + 1) n / s\n[PROOFSTEP]\nrw [GammaSeq, Finset.prod_range_succ, div_div]\n[GOAL]\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n| GammaSeq (s + 1) n / s\n[PROOFSTEP]\nrw [GammaSeq, Finset.prod_range_succ, div_div]\n[GOAL]\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n⊢ ↑n ^ (s + 1) * ↑n ! / ((∏ x in Finset.range n, (s + 1 + ↑x)) * (s + 1 + ↑n) * s) = ↑n / (↑n + 1 + s) * GammaSeq s n\n[PROOFSTEP]\nconv_rhs =>\n  rw [GammaSeq, Finset.prod_range_succ', Nat.cast_zero, add_zero, div_mul_div_comm, ← mul_assoc, ← mul_assoc,\n    mul_comm _ (Finset.prod _ _)]\n[GOAL]\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n| ↑n / (↑n + 1 + s) * GammaSeq s n\n[PROOFSTEP]\nrw [GammaSeq, Finset.prod_range_succ', Nat.cast_zero, add_zero, div_mul_div_comm, ← mul_assoc, ← mul_assoc,\n    mul_comm _ (Finset.prod _ _)]\n[GOAL]\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n| ↑n / (↑n + 1 + s) * GammaSeq s n\n[PROOFSTEP]\nrw [GammaSeq, Finset.prod_range_succ', Nat.cast_zero, add_zero, div_mul_div_comm, ← mul_assoc, ← mul_assoc,\n    mul_comm _ (Finset.prod _ _)]\n[GOAL]\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n| ↑n / (↑n + 1 + s) * GammaSeq s n\n[PROOFSTEP]\nrw [GammaSeq, Finset.prod_range_succ', Nat.cast_zero, add_zero, div_mul_div_comm, ← mul_assoc, ← mul_assoc,\n  mul_comm _ (Finset.prod _ _)]\n[GOAL]\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n⊢ ↑n ^ (s + 1) * ↑n ! / ((∏ x in Finset.range n, (s + 1 + ↑x)) * (s + 1 + ↑n) * s) =\n    ↑n * ↑n ^ s * ↑n ! / ((∏ k in Finset.range n, (s + ↑(k + 1))) * (↑n + 1 + s) * s)\n[PROOFSTEP]\ncongr 3\n[GOAL]\ncase e_a.e_a\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n⊢ ↑n ^ (s + 1) = ↑n * ↑n ^ s\n[PROOFSTEP]\nrw [cpow_add _ _ (Nat.cast_ne_zero.mpr hn), cpow_one, mul_comm]\n[GOAL]\ncase e_a.e_a.e_a\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n⊢ ∏ x in Finset.range n, (s + 1 + ↑x) = ∏ k in Finset.range n, (s + ↑(k + 1))\n[PROOFSTEP]\nrefine' Finset.prod_congr (by rfl) fun x _ => _\n[GOAL]\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n⊢ Finset.range n = Finset.range n\n[PROOFSTEP]\nrfl\n[GOAL]\ncase e_a.e_a.e_a\ns : ℂ\nn : ℕ\nhn : n ≠ 0\nx : ℕ\nx✝ : x ∈ Finset.range n\n⊢ s + 1 + ↑x = s + ↑(x + 1)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase e_a.e_a.e_a\ns : ℂ\nn : ℕ\nhn : n ≠ 0\nx : ℕ\nx✝ : x ∈ Finset.range n\n⊢ s + 1 + ↑x = s + (↑x + 1)\n[PROOFSTEP]\nring\n[GOAL]\ncase e_a.e_a.e_a\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n⊢ s + 1 + ↑n = ↑n + 1 + s\n[PROOFSTEP]\nabel\n[GOAL]\ncase e_a.e_a.e_a\ns : ℂ\nn : ℕ\nhn : n ≠ 0\n⊢ s + 1 + ↑n = ↑n + 1 + s\n[PROOFSTEP]\nabel\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\n⊢ GammaSeq s n = ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\n[PROOFSTEP]\nhave : ∀ x : ℝ, x = x / n * n := by intro x; rw [div_mul_cancel]; exact Nat.cast_ne_zero.mpr hn\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\n⊢ ∀ (x : ℝ), x = x / ↑n * ↑n\n[PROOFSTEP]\nintro x\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nx : ℝ\n⊢ x = x / ↑n * ↑n\n[PROOFSTEP]\nrw [div_mul_cancel]\n[GOAL]\ncase h\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nx : ℝ\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nexact Nat.cast_ne_zero.mpr hn\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis : ∀ (x : ℝ), x = x / ↑n * ↑n\n⊢ GammaSeq s n = ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\n[PROOFSTEP]\nconv_rhs => enter [1, x, 2, 1]; rw [this x]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis : ∀ (x : ℝ), x = x / ↑n * ↑n\n| ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\n[PROOFSTEP]\nenter [1, x, 2, 1]; rw [this x]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis : ∀ (x : ℝ), x = x / ↑n * ↑n\n| ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\n[PROOFSTEP]\nenter [1, x, 2, 1]; rw [this x]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis : ∀ (x : ℝ), x = x / ↑n * ↑n\n| ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\n[PROOFSTEP]\nenter [1, x, 2, 1]\n[GOAL]\ncase h\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis : ∀ (x : ℝ), x = x / ↑n * ↑n\nx : ℝ\n| ↑x\n[PROOFSTEP]\nrw [this x]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis : ∀ (x : ℝ), x = x / ↑n * ↑n\n⊢ GammaSeq s n = ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1)\n[PROOFSTEP]\nrw [GammaSeq_eq_betaIntegral_of_re_pos hs]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis : ∀ (x : ℝ), x = x / ↑n * ↑n\n⊢ ↑n ^ s * betaIntegral s (↑n + 1) = ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1)\n[PROOFSTEP]\nhave :=\n  intervalIntegral.integral_comp_div (a := 0) (b := n) (fun x => ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1) : ℝ → ℂ)\n    (Nat.cast_ne_zero.mpr hn)\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, (fun x => ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)) (x / ↑n) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, (fun x => ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)) x\n⊢ ↑n ^ s * betaIntegral s (↑n + 1) = ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1)\n[PROOFSTEP]\ndsimp only at this \n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\n⊢ ↑n ^ s * betaIntegral s (↑n + 1) = ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1)\n[PROOFSTEP]\nrw [betaIntegral, this, real_smul, zero_div, div_self, add_sub_cancel, ← intervalIntegral.integral_const_mul, ←\n  intervalIntegral.integral_const_mul]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\n⊢ ∫ (x : ℝ) in 0 ..1, ↑n ^ s * (↑x ^ (s - 1) * (1 - ↑x) ^ ↑n) =\n    ∫ (x : ℝ) in 0 ..1, ↑↑n * (↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1))\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nswap\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nexact Nat.cast_ne_zero.mpr hn\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\n⊢ ∫ (x : ℝ) in 0 ..1, ↑n ^ s * (↑x ^ (s - 1) * (1 - ↑x) ^ ↑n) =\n    ∫ (x : ℝ) in 0 ..1, ↑↑n * (↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1))\n[PROOFSTEP]\nsimp_rw [intervalIntegral.integral_of_le zero_le_one]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\n⊢ ∫ (x : ℝ) in Ioc 0 1, ↑n ^ s * (↑x ^ (s - 1) * (1 - ↑x) ^ ↑n) =\n    ∫ (x : ℝ) in Ioc 0 1, ↑↑n * (↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1))\n[PROOFSTEP]\nrefine' set_integral_congr measurableSet_Ioc fun x hx => _\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\n⊢ ↑n ^ s * (↑x ^ (s - 1) * (1 - ↑x) ^ ↑n) = ↑↑n * (↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1))\n[PROOFSTEP]\npush_cast\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\n⊢ ↑n ^ s * (↑x ^ (s - 1) * (1 - ↑x) ^ ↑n) = ↑n * ((1 - ↑x) ^ n * (↑x * ↑n) ^ (s - 1))\n[PROOFSTEP]\nhave hn' : (n : ℂ) ≠ 0 := Nat.cast_ne_zero.mpr hn\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\nhn' : ↑n ≠ 0\n⊢ ↑n ^ s * (↑x ^ (s - 1) * (1 - ↑x) ^ ↑n) = ↑n * ((1 - ↑x) ^ n * (↑x * ↑n) ^ (s - 1))\n[PROOFSTEP]\nhave A : (n : ℂ) ^ s = (n : ℂ) ^ (s - 1) * n :=\n  by\n  conv_lhs => rw [(by ring : s = s - 1 + 1), cpow_add _ _ hn']\n  simp\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\nhn' : ↑n ≠ 0\n⊢ ↑n ^ s = ↑n ^ (s - 1) * ↑n\n[PROOFSTEP]\nconv_lhs => rw [(by ring : s = s - 1 + 1), cpow_add _ _ hn']\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\nhn' : ↑n ≠ 0\n| ↑n ^ s\n[PROOFSTEP]\nrw [(by ring : s = s - 1 + 1), cpow_add _ _ hn']\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\nhn' : ↑n ≠ 0\n| ↑n ^ s\n[PROOFSTEP]\nrw [(by ring : s = s - 1 + 1), cpow_add _ _ hn']\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\nhn' : ↑n ≠ 0\n| ↑n ^ s\n[PROOFSTEP]\nrw [(by ring : s = s - 1 + 1), cpow_add _ _ hn']\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\nhn' : ↑n ≠ 0\n⊢ s = s - 1 + 1\n[PROOFSTEP]\nring\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\nhn' : ↑n ≠ 0\n⊢ ↑n ^ (s - 1) * ↑n ^ 1 = ↑n ^ (s - 1) * ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\nhn' : ↑n ≠ 0\nA : ↑n ^ s = ↑n ^ (s - 1) * ↑n\n⊢ ↑n ^ s * (↑x ^ (s - 1) * (1 - ↑x) ^ ↑n) = ↑n * ((1 - ↑x) ^ n * (↑x * ↑n) ^ (s - 1))\n[PROOFSTEP]\nhave B : ((x : ℂ) * ↑n) ^ (s - 1) = (x : ℂ) ^ (s - 1) * (n : ℂ) ^ (s - 1) := by\n  rw [← ofReal_nat_cast, mul_cpow_ofReal_nonneg hx.1.le (Nat.cast_pos.mpr (Nat.pos_of_ne_zero hn)).le]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\nhn' : ↑n ≠ 0\nA : ↑n ^ s = ↑n ^ (s - 1) * ↑n\n⊢ (↑x * ↑n) ^ (s - 1) = ↑x ^ (s - 1) * ↑n ^ (s - 1)\n[PROOFSTEP]\nrw [← ofReal_nat_cast, mul_cpow_ofReal_nonneg hx.1.le (Nat.cast_pos.mpr (Nat.pos_of_ne_zero hn)).le]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\nhn' : ↑n ≠ 0\nA : ↑n ^ s = ↑n ^ (s - 1) * ↑n\nB : (↑x * ↑n) ^ (s - 1) = ↑x ^ (s - 1) * ↑n ^ (s - 1)\n⊢ ↑n ^ s * (↑x ^ (s - 1) * (1 - ↑x) ^ ↑n) = ↑n * ((1 - ↑x) ^ n * (↑x * ↑n) ^ (s - 1))\n[PROOFSTEP]\nrw [A, B, cpow_nat_cast]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\nthis✝ : ∀ (x : ℝ), x = x / ↑n * ↑n\nthis :\n  ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑(x / ↑n * ↑n) ^ (s - 1) =\n    ↑n • ∫ (x : ℝ) in 0 / ↑n..↑n / ↑n, ↑((1 - x) ^ n) * ↑(x * ↑n) ^ (s - 1)\nx : ℝ\nhx : x ∈ Ioc 0 1\nhn' : ↑n ≠ 0\nA : ↑n ^ s = ↑n ^ (s - 1) * ↑n\nB : (↑x * ↑n) ^ (s - 1) = ↑x ^ (s - 1) * ↑n ^ (s - 1)\n⊢ ↑n ^ (s - 1) * ↑n * (↑x ^ (s - 1) * (1 - ↑x) ^ n) = ↑n * ((1 - ↑x) ^ n * (↑x ^ (s - 1) * ↑n ^ (s - 1)))\n[PROOFSTEP]\nring\n[GOAL]\ns : ℂ\nhs : 0 < s.re\n⊢ Tendsto (fun n => ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) atTop (𝓝 (Gamma s))\n[PROOFSTEP]\nrw [Gamma_eq_integral hs]\n  -- We apply dominated convergence to the following function, which we will show is uniformly\n    -- bounded above by the Gamma integrand `exp (-x) * x ^ (re s - 1)`.\n[GOAL]\ns : ℂ\nhs : 0 < s.re\n⊢ Tendsto (fun n => ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) atTop (𝓝 (GammaIntegral s))\n[PROOFSTEP]\nlet f : ℕ → ℝ → ℂ := fun n =>\n  indicator (Ioc 0 (n : ℝ)) fun x : ℝ =>\n    ↑((1 - x / n) ^ n) *\n      (x : ℂ) ^\n        (s - 1)\n          -- integrability of f\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\n⊢ Tendsto (fun n => ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) atTop (𝓝 (GammaIntegral s))\n[PROOFSTEP]\nhave f_ible : ∀ n : ℕ, Integrable (f n) (volume.restrict (Ioi 0)) :=\n  by\n  intro n\n  rw [integrable_indicator_iff (measurableSet_Ioc : MeasurableSet (Ioc (_ : ℝ) _)), IntegrableOn,\n    Measure.restrict_restrict_of_subset Ioc_subset_Ioi_self, ← IntegrableOn, ←\n    intervalIntegrable_iff_integrable_Ioc_of_le (by positivity : (0 : ℝ) ≤ n)]\n  apply IntervalIntegrable.continuousOn_mul\n  · refine' intervalIntegral.intervalIntegrable_cpow' _\n    rwa [sub_re, one_re, ← zero_sub, sub_lt_sub_iff_right]\n  · apply Continuous.continuousOn\n    exact\n      IsROrC.continuous_ofReal.comp\n        ((continuous_const.sub (continuous_id'.div_const ↑n)).pow n)\n          -- pointwise limit of f\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\n⊢ ∀ (n : ℕ), Integrable (f n)\n[PROOFSTEP]\nintro n\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nn : ℕ\n⊢ Integrable (f n)\n[PROOFSTEP]\nrw [integrable_indicator_iff (measurableSet_Ioc : MeasurableSet (Ioc (_ : ℝ) _)), IntegrableOn,\n  Measure.restrict_restrict_of_subset Ioc_subset_Ioi_self, ← IntegrableOn, ←\n  intervalIntegrable_iff_integrable_Ioc_of_le (by positivity : (0 : ℝ) ≤ n)]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nn : ℕ\n⊢ 0 ≤ ↑n\n[PROOFSTEP]\npositivity\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nn : ℕ\n⊢ IntervalIntegrable (fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) volume 0 ↑n\n[PROOFSTEP]\napply IntervalIntegrable.continuousOn_mul\n[GOAL]\ncase hf\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nn : ℕ\n⊢ IntervalIntegrable (fun x => ↑x ^ (s - 1)) volume 0 ↑n\n[PROOFSTEP]\nrefine' intervalIntegral.intervalIntegrable_cpow' _\n[GOAL]\ncase hf\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nn : ℕ\n⊢ -1 < (s - 1).re\n[PROOFSTEP]\nrwa [sub_re, one_re, ← zero_sub, sub_lt_sub_iff_right]\n[GOAL]\ncase hg\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nn : ℕ\n⊢ ContinuousOn (fun x => ↑((1 - x / ↑n) ^ n)) (uIcc 0 ↑n)\n[PROOFSTEP]\napply Continuous.continuousOn\n[GOAL]\ncase hg.h\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nn : ℕ\n⊢ Continuous fun x => ↑((1 - x / ↑n) ^ n)\n[PROOFSTEP]\nexact\n  IsROrC.continuous_ofReal.comp\n    ((continuous_const.sub (continuous_id'.div_const ↑n)).pow n)\n      -- pointwise limit of f\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\n⊢ Tendsto (fun n => ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) atTop (𝓝 (GammaIntegral s))\n[PROOFSTEP]\nhave f_tends :\n  ∀ x : ℝ, x ∈ Ioi (0 : ℝ) → Tendsto (fun n : ℕ => f n x) atTop (𝓝 <| ↑(Real.exp (-x)) * (x : ℂ) ^ (s - 1)) :=\n  by\n  intro x hx\n  apply Tendsto.congr'\n  show ∀ᶠ n : ℕ in atTop, ↑((1 - x / n) ^ n) * (x : ℂ) ^ (s - 1) = f n x\n  · refine' Eventually.mp (eventually_ge_atTop ⌈x⌉₊) (eventually_of_forall fun n hn => _)\n    rw [Nat.ceil_le] at hn \n    dsimp only\n    rw [indicator_of_mem]\n    exact ⟨hx, hn⟩\n  · simp_rw [mul_comm]\n    refine' (Tendsto.comp (continuous_ofReal.tendsto _) _).const_mul _\n    convert tendsto_one_plus_div_pow_exp (-x) using 1\n    ext1 n\n    rw [neg_div, ← sub_eq_add_neg];\n    norm_cast\n      -- let `convert` identify the remaining goals\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\n⊢ ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\n[PROOFSTEP]\nintro x hx\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\n[PROOFSTEP]\napply Tendsto.congr'\n[GOAL]\ncase hl\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ?f₁ =ᶠ[atTop] fun n => f n x\ncase h\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ Tendsto ?f₁ atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\ncase f₁\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ℕ → ℂ\n[PROOFSTEP]\nshow ∀ᶠ n : ℕ in atTop, ↑((1 - x / n) ^ n) * (x : ℂ) ^ (s - 1) = f n x\n[GOAL]\ncase hl\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1) = f n x\n[PROOFSTEP]\nrefine' Eventually.mp (eventually_ge_atTop ⌈x⌉₊) (eventually_of_forall fun n hn => _)\n[GOAL]\ncase hl\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\nn : ℕ\nhn : ⌈x⌉₊ ≤ n\n⊢ ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1) = f n x\n[PROOFSTEP]\nrw [Nat.ceil_le] at hn \n[GOAL]\ncase hl\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\nn : ℕ\nhn : x ≤ ↑n\n⊢ ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1) = f n x\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase hl\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\nn : ℕ\nhn : x ≤ ↑n\n⊢ ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1) = indicator (Ioc 0 ↑n) (fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) x\n[PROOFSTEP]\nrw [indicator_of_mem]\n[GOAL]\ncase hl.h\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\nn : ℕ\nhn : x ≤ ↑n\n⊢ x ∈ Ioc 0 ↑n\n[PROOFSTEP]\nexact ⟨hx, hn⟩\n[GOAL]\ncase h\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ Tendsto (fun x_1 => ↑((1 - x / ↑x_1) ^ x_1) * ↑x ^ (s - 1)) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\n[PROOFSTEP]\nsimp_rw [mul_comm]\n[GOAL]\ncase h\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ Tendsto (fun x_1 => ↑x ^ (s - 1) * ↑((1 - x / ↑x_1) ^ x_1)) atTop (𝓝 (↑x ^ (s - 1) * ↑(rexp (-x))))\n[PROOFSTEP]\nrefine' (Tendsto.comp (continuous_ofReal.tendsto _) _).const_mul _\n[GOAL]\ncase h\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ Tendsto (fun x_1 => (1 - x / ↑x_1) ^ x_1) atTop (𝓝 (rexp (-x)))\n[PROOFSTEP]\nconvert tendsto_one_plus_div_pow_exp (-x) using 1\n[GOAL]\ncase h.e'_3\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ (fun x_1 => (1 - x / ↑x_1) ^ x_1) = fun x_1 => (1 + -x / ↑x_1) ^ ↑x_1\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_3.h\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\nn : ℕ\n⊢ (1 - x / ↑n) ^ n = (1 + -x / ↑n) ^ ↑n\n[PROOFSTEP]\nrw [neg_div, ← sub_eq_add_neg]\n[GOAL]\ncase h.e'_3.h\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nx : ℝ\nhx : x ∈ Ioi 0\nn : ℕ\n⊢ (1 - x / ↑n) ^ n = (1 - x / ↑n) ^ ↑n\n[PROOFSTEP]\nnorm_cast\n  -- let `convert` identify the remaining goals\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\n⊢ Tendsto (fun n => ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) atTop (𝓝 (GammaIntegral s))\n[PROOFSTEP]\nconvert\n  tendsto_integral_of_dominated_convergence _ (fun n => (f_ible n).1) (Real.GammaIntegral_convergent hs) _\n    ((ae_restrict_iff' measurableSet_Ioi).mpr (ae_of_all _ f_tends)) using\n  1\n  -- limit of f is the integrand we want\n[GOAL]\ncase h.e'_3\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\n⊢ (fun n => ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) = fun n => ∫ (a : ℝ) in Ioi 0, f n a\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_3.h\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\nn : ℕ\n⊢ ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1) = ∫ (a : ℝ) in Ioi 0, f n a\n[PROOFSTEP]\nrw [integral_indicator (measurableSet_Ioc : MeasurableSet (Ioc (_ : ℝ) _)),\n  intervalIntegral.integral_of_le (by positivity : 0 ≤ (n : ℝ)),\n  Measure.restrict_restrict_of_subset Ioc_subset_Ioi_self]\n  -- f is uniformly bounded by the Gamma integrand\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\nn : ℕ\n⊢ 0 ≤ ↑n\n[PROOFSTEP]\npositivity\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\n⊢ ∀ (n : ℕ), ∀ᵐ (a : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n a‖ ≤ rexp (-a) * a ^ (s.re - 1)\n[PROOFSTEP]\nintro n\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\nn : ℕ\n⊢ ∀ᵐ (a : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n a‖ ≤ rexp (-a) * a ^ (s.re - 1)\n[PROOFSTEP]\nrefine' (ae_restrict_iff' measurableSet_Ioi).mpr (ae_of_all _ fun x hx => _)\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\nn : ℕ\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ‖f n x‖ ≤ rexp (-x) * x ^ (s.re - 1)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\nn : ℕ\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ‖indicator (Ioc 0 ↑n) (fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) x‖ ≤ rexp (-x) * x ^ (s.re - 1)\n[PROOFSTEP]\nrcases lt_or_le (n : ℝ) x with (hxn | hxn)\n[GOAL]\ncase inl\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\nn : ℕ\nx : ℝ\nhx : x ∈ Ioi 0\nhxn : ↑n < x\n⊢ ‖indicator (Ioc 0 ↑n) (fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) x‖ ≤ rexp (-x) * x ^ (s.re - 1)\n[PROOFSTEP]\nrw [indicator_of_not_mem (not_mem_Ioc_of_gt hxn), norm_zero, mul_nonneg_iff_right_nonneg_of_pos (exp_pos _)]\n[GOAL]\ncase inl\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\nn : ℕ\nx : ℝ\nhx : x ∈ Ioi 0\nhxn : ↑n < x\n⊢ 0 ≤ x ^ (s.re - 1)\n[PROOFSTEP]\nexact rpow_nonneg_of_nonneg (le_of_lt hx) _\n[GOAL]\ncase inr\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\nn : ℕ\nx : ℝ\nhx : x ∈ Ioi 0\nhxn : x ≤ ↑n\n⊢ ‖indicator (Ioc 0 ↑n) (fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) x‖ ≤ rexp (-x) * x ^ (s.re - 1)\n[PROOFSTEP]\nrw [indicator_of_mem (mem_Ioc.mpr ⟨mem_Ioi.mp hx, hxn⟩), norm_mul, Complex.norm_eq_abs,\n  Complex.abs_of_nonneg (pow_nonneg (sub_nonneg.mpr <| div_le_one_of_le hxn <| by positivity) _), Complex.norm_eq_abs,\n  abs_cpow_eq_rpow_re_of_pos hx, sub_re, one_re, mul_le_mul_right (rpow_pos_of_pos hx _)]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\nn : ℕ\nx : ℝ\nhx : x ∈ Ioi 0\nhxn : x ≤ ↑n\n⊢ 0 ≤ ↑n\n[PROOFSTEP]\npositivity\n[GOAL]\ncase inr\ns : ℂ\nhs : 0 < s.re\nf : ℕ → ℝ → ℂ := fun n => indicator (Ioc 0 ↑n) fun x => ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)\nf_ible : ∀ (n : ℕ), Integrable (f n)\nf_tends : ∀ (x : ℝ), x ∈ Ioi 0 → Tendsto (fun n => f n x) atTop (𝓝 (↑(rexp (-x)) * ↑x ^ (s - 1)))\nn : ℕ\nx : ℝ\nhx : x ∈ Ioi 0\nhxn : x ≤ ↑n\n⊢ (1 - x / ↑n) ^ n ≤ rexp (-x)\n[PROOFSTEP]\nexact one_sub_div_pow_le_exp_neg hxn\n[GOAL]\ns : ℂ\n⊢ Tendsto (GammaSeq s) atTop (𝓝 (Gamma s))\n[PROOFSTEP]\nsuffices ∀ m : ℕ, -↑m < re s → Tendsto (GammaSeq s) atTop (𝓝 <| GammaAux m s)\n  by\n  rw [Gamma]\n  apply this\n  rw [neg_lt]\n  rcases lt_or_le 0 (re s) with (hs | hs)\n  · exact (neg_neg_of_pos hs).trans_le (Nat.cast_nonneg _)\n  · refine' (Nat.lt_floor_add_one _).trans_le _\n    rw [sub_eq_neg_add, Nat.floor_add_one (neg_nonneg.mpr hs), Nat.cast_add_one]\n[GOAL]\ns : ℂ\nthis : ∀ (m : ℕ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\n⊢ Tendsto (GammaSeq s) atTop (𝓝 (Gamma s))\n[PROOFSTEP]\nrw [Gamma]\n[GOAL]\ns : ℂ\nthis : ∀ (m : ℕ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\n⊢ Tendsto (GammaSeq s) atTop (𝓝 (GammaAux ⌊1 - s.re⌋₊ s))\n[PROOFSTEP]\napply this\n[GOAL]\ncase a\ns : ℂ\nthis : ∀ (m : ℕ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\n⊢ -↑⌊1 - s.re⌋₊ < s.re\n[PROOFSTEP]\nrw [neg_lt]\n[GOAL]\ncase a\ns : ℂ\nthis : ∀ (m : ℕ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\n⊢ -s.re < ↑⌊1 - s.re⌋₊\n[PROOFSTEP]\nrcases lt_or_le 0 (re s) with (hs | hs)\n[GOAL]\ncase a.inl\ns : ℂ\nthis : ∀ (m : ℕ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\nhs : 0 < s.re\n⊢ -s.re < ↑⌊1 - s.re⌋₊\n[PROOFSTEP]\nexact (neg_neg_of_pos hs).trans_le (Nat.cast_nonneg _)\n[GOAL]\ncase a.inr\ns : ℂ\nthis : ∀ (m : ℕ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\nhs : s.re ≤ 0\n⊢ -s.re < ↑⌊1 - s.re⌋₊\n[PROOFSTEP]\nrefine' (Nat.lt_floor_add_one _).trans_le _\n[GOAL]\ncase a.inr\ns : ℂ\nthis : ∀ (m : ℕ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\nhs : s.re ≤ 0\n⊢ ↑⌊-s.re⌋₊ + 1 ≤ ↑⌊1 - s.re⌋₊\n[PROOFSTEP]\nrw [sub_eq_neg_add, Nat.floor_add_one (neg_nonneg.mpr hs), Nat.cast_add_one]\n[GOAL]\ns : ℂ\n⊢ ∀ (m : ℕ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\n[PROOFSTEP]\nintro m\n[GOAL]\ns : ℂ\nm : ℕ\n⊢ -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\n[PROOFSTEP]\ninduction' m with m IH generalizing s\n[GOAL]\ncase zero\ns✝ s : ℂ\n⊢ -↑Nat.zero < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux Nat.zero s))\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase zero\ns✝ s : ℂ\nhs : -↑Nat.zero < s.re\n⊢ Tendsto (GammaSeq s) atTop (𝓝 (GammaAux Nat.zero s))\n[PROOFSTEP]\nrw [Nat.cast_zero, neg_zero] at hs \n[GOAL]\ncase zero\ns✝ s : ℂ\nhs : 0 < s.re\n⊢ Tendsto (GammaSeq s) atTop (𝓝 (GammaAux Nat.zero s))\n[PROOFSTEP]\nrw [← Gamma_eq_GammaAux]\n[GOAL]\ncase zero\ns✝ s : ℂ\nhs : 0 < s.re\n⊢ Tendsto (GammaSeq s) atTop (𝓝 (Gamma s))\n[PROOFSTEP]\nrefine' Tendsto.congr' _ (approx_Gamma_integral_tendsto_Gamma_integral hs)\n[GOAL]\ncase zero\ns✝ s : ℂ\nhs : 0 < s.re\n⊢ (fun n => ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) =ᶠ[atTop] GammaSeq s\n[PROOFSTEP]\nrefine' (eventually_ne_atTop 0).mp (eventually_of_forall fun n hn => _)\n[GOAL]\ncase zero\ns✝ s : ℂ\nhs : 0 < s.re\nn : ℕ\nhn : n ≠ 0\n⊢ (fun n => ∫ (x : ℝ) in 0 ..↑n, ↑((1 - x / ↑n) ^ n) * ↑x ^ (s - 1)) n = GammaSeq s n\n[PROOFSTEP]\nexact (GammaSeq_eq_approx_Gamma_integral hs hn).symm\n[GOAL]\ncase zero.h1\ns✝ s : ℂ\nhs : 0 < s.re\n⊢ -s.re < ↑Nat.zero\n[PROOFSTEP]\nrwa [Nat.cast_zero, neg_lt_zero]\n[GOAL]\ncase succ\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\n⊢ -↑(Nat.succ m) < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux (Nat.succ m) s))\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase succ\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑(Nat.succ m) < s.re\n⊢ Tendsto (GammaSeq s) atTop (𝓝 (GammaAux (Nat.succ m) s))\n[PROOFSTEP]\nrw [Nat.cast_succ, neg_add, ← sub_eq_add_neg, sub_lt_iff_lt_add, ← one_re, ← add_re] at hs \n[GOAL]\ncase succ\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\n⊢ Tendsto (GammaSeq s) atTop (𝓝 (GammaAux (Nat.succ m) s))\n[PROOFSTEP]\nrw [GammaAux]\n[GOAL]\ncase succ\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\n⊢ Tendsto (GammaSeq s) atTop (𝓝 ((fun s => GammaAux m (s + 1) / s) s))\n[PROOFSTEP]\nhave :=\n  @Tendsto.congr' _ _ _ ?_ _ _ ((eventually_ne_atTop 0).mp (eventually_of_forall fun n hn => ?_))\n    ((IH _ hs).div_const s)\n[GOAL]\ncase succ.refine_3\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\nthis : Tendsto ?succ.refine_1 atTop (𝓝 (GammaAux m (s + 1) / s))\n⊢ Tendsto (GammaSeq s) atTop (𝓝 ((fun s => GammaAux m (s + 1) / s) s))\ncase succ.refine_1\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\n⊢ ℕ → ℂ\ncase succ.refine_2\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\nn : ℕ\nhn : n ≠ 0\n⊢ GammaSeq (s + 1) n / s = ?succ.refine_1 n\n[PROOFSTEP]\npick_goal 3\n[GOAL]\ncase succ.refine_2\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\nn : ℕ\nhn : n ≠ 0\n⊢ GammaSeq (s + 1) n / s = ?succ.refine_1 n\n[PROOFSTEP]\nexact GammaSeq_add_one_left s hn\n[GOAL]\ncase succ.refine_3\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\nthis : Tendsto (fun n => ↑n / (↑n + 1 + s) * GammaSeq s n) atTop (𝓝 (GammaAux m (s + 1) / s))\n⊢ Tendsto (GammaSeq s) atTop (𝓝 ((fun s => GammaAux m (s + 1) / s) s))\n[PROOFSTEP]\nconv at this => arg 1; intro n; rw [mul_comm]\n[GOAL]\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\nthis : Tendsto (fun n => ↑n / (↑n + 1 + s) * GammaSeq s n) atTop (𝓝 (GammaAux m (s + 1) / s))\n| Tendsto (fun n => ↑n / (↑n + 1 + s) * GammaSeq s n) atTop (𝓝 (GammaAux m (s + 1) / s))\n[PROOFSTEP]\narg 1; intro n; rw [mul_comm]\n[GOAL]\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\nthis : Tendsto (fun n => ↑n / (↑n + 1 + s) * GammaSeq s n) atTop (𝓝 (GammaAux m (s + 1) / s))\n| Tendsto (fun n => ↑n / (↑n + 1 + s) * GammaSeq s n) atTop (𝓝 (GammaAux m (s + 1) / s))\n[PROOFSTEP]\narg 1; intro n; rw [mul_comm]\n[GOAL]\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\nthis : Tendsto (fun n => ↑n / (↑n + 1 + s) * GammaSeq s n) atTop (𝓝 (GammaAux m (s + 1) / s))\n| Tendsto (fun n => ↑n / (↑n + 1 + s) * GammaSeq s n) atTop (𝓝 (GammaAux m (s + 1) / s))\n[PROOFSTEP]\narg 1\n[GOAL]\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\nthis : Tendsto (fun n => ↑n / (↑n + 1 + s) * GammaSeq s n) atTop (𝓝 (GammaAux m (s + 1) / s))\n| fun n => ↑n / (↑n + 1 + s) * GammaSeq s n\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\nthis : Tendsto (fun n => ↑n / (↑n + 1 + s) * GammaSeq s n) atTop (𝓝 (GammaAux m (s + 1) / s))\nn : ℕ\n| ↑n / (↑n + 1 + s) * GammaSeq s n\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase succ.refine_3\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\nthis : Tendsto (fun n => GammaSeq s n * (↑n / (↑n + 1 + s))) atTop (𝓝 (GammaAux m (s + 1) / s))\n⊢ Tendsto (GammaSeq s) atTop (𝓝 ((fun s => GammaAux m (s + 1) / s) s))\n[PROOFSTEP]\nrwa [← mul_one (GammaAux m (s + 1) / s), tendsto_mul_iff_of_ne_zero _ (one_ne_zero' ℂ)] at this \n[GOAL]\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\nthis : Tendsto (fun n => GammaSeq s n * (↑n / (↑n + 1 + s))) atTop (𝓝 (GammaAux m (s + 1) / s * 1))\n⊢ Tendsto (fun n => ↑n / (↑n + 1 + s)) atTop (𝓝 1)\n[PROOFSTEP]\nsimp_rw [add_assoc]\n[GOAL]\ns✝ : ℂ\nm : ℕ\nIH : ∀ (s : ℂ), -↑m < s.re → Tendsto (GammaSeq s) atTop (𝓝 (GammaAux m s))\ns : ℂ\nhs : -↑m < (s + 1).re\nthis : Tendsto (fun n => GammaSeq s n * (↑n / (↑n + 1 + s))) atTop (𝓝 (GammaAux m (s + 1) / s * 1))\n⊢ Tendsto (fun n => ↑n / (↑n + (1 + s))) atTop (𝓝 1)\n[PROOFSTEP]\nexact tendsto_coe_nat_div_add_atTop (1 + s)\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\n⊢ GammaSeq z n * GammaSeq (1 - z) n = ↑n / (↑n + 1 - z) * (1 / (z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)))\n[PROOFSTEP]\nhave aux : ∀ a b c d : ℂ, a * b * (c * d) = a * c * (b * d) := by intros; ring\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\n⊢ ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\n[PROOFSTEP]\nintros\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\na✝ b✝ c✝ d✝ : ℂ\n⊢ a✝ * b✝ * (c✝ * d✝) = a✝ * c✝ * (b✝ * d✝)\n[PROOFSTEP]\nring\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\n⊢ GammaSeq z n * GammaSeq (1 - z) n = ↑n / (↑n + 1 - z) * (1 / (z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)))\n[PROOFSTEP]\nrw [GammaSeq, GammaSeq, div_mul_div_comm, aux, ← pow_two]\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\n⊢ ↑n ^ z * ↑n ^ (1 - z) * ↑n ! ^ 2 /\n      ((∏ j in Finset.range (n + 1), (z + ↑j)) * ∏ j in Finset.range (n + 1), (1 - z + ↑j)) =\n    ↑n / (↑n + 1 - z) * (1 / (z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)))\n[PROOFSTEP]\nhave : (n : ℂ) ^ z * (n : ℂ) ^ (1 - z) = n := by\n  rw [← cpow_add _ _ (Nat.cast_ne_zero.mpr hn), add_sub_cancel'_right, cpow_one]\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\n⊢ ↑n ^ z * ↑n ^ (1 - z) = ↑n\n[PROOFSTEP]\nrw [← cpow_add _ _ (Nat.cast_ne_zero.mpr hn), add_sub_cancel'_right, cpow_one]\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis : ↑n ^ z * ↑n ^ (1 - z) = ↑n\n⊢ ↑n ^ z * ↑n ^ (1 - z) * ↑n ! ^ 2 /\n      ((∏ j in Finset.range (n + 1), (z + ↑j)) * ∏ j in Finset.range (n + 1), (1 - z + ↑j)) =\n    ↑n / (↑n + 1 - z) * (1 / (z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)))\n[PROOFSTEP]\nrw [this, Finset.prod_range_succ', Finset.prod_range_succ, aux, ← Finset.prod_mul_distrib, Nat.cast_zero, add_zero,\n  add_comm (1 - z) n, ← add_sub_assoc]\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis : ↑n ^ z * ↑n ^ (1 - z) = ↑n\n⊢ ↑n * ↑n ! ^ 2 / ((∏ x in Finset.range n, (z + ↑(x + 1)) * (1 - z + ↑x)) * (z * (↑n + 1 - z))) =\n    ↑n / (↑n + 1 - z) * (1 / (z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)))\n[PROOFSTEP]\nhave : ∀ j : ℕ, (z + ↑(j + 1)) * (↑1 - z + ↑j) = ↑((j + 1) ^ 2) * (↑1 - z ^ 2 / ((j : ℂ) + 1) ^ 2) :=\n  by\n  intro j\n  push_cast\n  have : (j : ℂ) + 1 ≠ 0 := by rw [← Nat.cast_succ, Nat.cast_ne_zero]; exact Nat.succ_ne_zero j\n  field_simp; ring\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis : ↑n ^ z * ↑n ^ (1 - z) = ↑n\n⊢ ∀ (j : ℕ), (z + ↑(j + 1)) * (1 - z + ↑j) = ↑((j + 1) ^ 2) * (1 - z ^ 2 / (↑j + 1) ^ 2)\n[PROOFSTEP]\nintro j\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis : ↑n ^ z * ↑n ^ (1 - z) = ↑n\nj : ℕ\n⊢ (z + ↑(j + 1)) * (1 - z + ↑j) = ↑((j + 1) ^ 2) * (1 - z ^ 2 / (↑j + 1) ^ 2)\n[PROOFSTEP]\npush_cast\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis : ↑n ^ z * ↑n ^ (1 - z) = ↑n\nj : ℕ\n⊢ (z + (↑j + 1)) * (1 - z + ↑j) = (↑j + 1) ^ 2 * (1 - z ^ 2 / (↑j + 1) ^ 2)\n[PROOFSTEP]\nhave : (j : ℂ) + 1 ≠ 0 := by rw [← Nat.cast_succ, Nat.cast_ne_zero]; exact Nat.succ_ne_zero j\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis : ↑n ^ z * ↑n ^ (1 - z) = ↑n\nj : ℕ\n⊢ ↑j + 1 ≠ 0\n[PROOFSTEP]\nrw [← Nat.cast_succ, Nat.cast_ne_zero]\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis : ↑n ^ z * ↑n ^ (1 - z) = ↑n\nj : ℕ\n⊢ Nat.succ j ≠ 0\n[PROOFSTEP]\nexact Nat.succ_ne_zero j\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis✝ : ↑n ^ z * ↑n ^ (1 - z) = ↑n\nj : ℕ\nthis : ↑j + 1 ≠ 0\n⊢ (z + (↑j + 1)) * (1 - z + ↑j) = (↑j + 1) ^ 2 * (1 - z ^ 2 / (↑j + 1) ^ 2)\n[PROOFSTEP]\nfield_simp\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis✝ : ↑n ^ z * ↑n ^ (1 - z) = ↑n\nj : ℕ\nthis : ↑j + 1 ≠ 0\n⊢ (z + (↑j + 1)) * (1 - z + ↑j) * (↑j + 1) ^ 2 = (↑j + 1) ^ 2 * ((↑j + 1) ^ 2 - z ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis✝ : ↑n ^ z * ↑n ^ (1 - z) = ↑n\nthis : ∀ (j : ℕ), (z + ↑(j + 1)) * (1 - z + ↑j) = ↑((j + 1) ^ 2) * (1 - z ^ 2 / (↑j + 1) ^ 2)\n⊢ ↑n * ↑n ! ^ 2 / ((∏ x in Finset.range n, (z + ↑(x + 1)) * (1 - z + ↑x)) * (z * (↑n + 1 - z))) =\n    ↑n / (↑n + 1 - z) * (1 / (z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)))\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis✝ : ↑n ^ z * ↑n ^ (1 - z) = ↑n\nthis : ∀ (j : ℕ), (z + ↑(j + 1)) * (1 - z + ↑j) = ↑((j + 1) ^ 2) * (1 - z ^ 2 / (↑j + 1) ^ 2)\n⊢ ↑n * ↑n ! ^ 2 / ((∏ x in Finset.range n, ↑((x + 1) ^ 2) * (1 - z ^ 2 / (↑x + 1) ^ 2)) * (z * (↑n + 1 - z))) =\n    ↑n / (↑n + 1 - z) * (1 / (z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)))\n[PROOFSTEP]\nrw [Finset.prod_mul_distrib, ← Nat.cast_prod, Finset.prod_pow, Finset.prod_range_add_one_eq_factorial, Nat.cast_pow,\n  (by intros; ring : ∀ a b c d : ℂ, a * b * (c * d) = a * (d * (b * c))), ← div_div, mul_div_cancel, ← div_div,\n  mul_comm z _, mul_one_div]\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis✝ : ↑n ^ z * ↑n ^ (1 - z) = ↑n\nthis : ∀ (j : ℕ), (z + ↑(j + 1)) * (1 - z + ↑j) = ↑((j + 1) ^ 2) * (1 - z ^ 2 / (↑j + 1) ^ 2)\n⊢ ∀ (a b c d : ℂ), a * b * (c * d) = a * (d * (b * c))\n[PROOFSTEP]\nintros\n[GOAL]\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis✝ : ↑n ^ z * ↑n ^ (1 - z) = ↑n\nthis : ∀ (j : ℕ), (z + ↑(j + 1)) * (1 - z + ↑j) = ↑((j + 1) ^ 2) * (1 - z ^ 2 / (↑j + 1) ^ 2)\na✝ b✝ c✝ d✝ : ℂ\n⊢ a✝ * b✝ * (c✝ * d✝) = a✝ * (d✝ * (b✝ * c✝))\n[PROOFSTEP]\nring\n[GOAL]\ncase h\nz : ℂ\nn : ℕ\nhn : n ≠ 0\naux : ∀ (a b c d : ℂ), a * b * (c * d) = a * c * (b * d)\nthis✝ : ↑n ^ z * ↑n ^ (1 - z) = ↑n\nthis : ∀ (j : ℕ), (z + ↑(j + 1)) * (1 - z + ↑j) = ↑((j + 1) ^ 2) * (1 - z ^ 2 / (↑j + 1) ^ 2)\n⊢ ↑n ! ^ 2 ≠ 0\n[PROOFSTEP]\nexact pow_ne_zero 2 (Nat.cast_ne_zero.mpr <| Nat.factorial_ne_zero n)\n[GOAL]\nz : ℂ\n⊢ Gamma z * Gamma (1 - z) = ↑π / sin (↑π * z)\n[PROOFSTEP]\nhave pi_ne : (π : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr pi_ne_zero\n[GOAL]\nz : ℂ\npi_ne : ↑π ≠ 0\n⊢ Gamma z * Gamma (1 - z) = ↑π / sin (↑π * z)\n[PROOFSTEP]\nby_cases hs : sin (↑π * z) = 0\n[GOAL]\ncase pos\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : sin (↑π * z) = 0\n⊢ Gamma z * Gamma (1 - z) = ↑π / sin (↑π * z)\n[PROOFSTEP]\nrw [hs, div_zero]\n[GOAL]\ncase pos\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : sin (↑π * z) = 0\n⊢ Gamma z * Gamma (1 - z) = 0\n[PROOFSTEP]\nrw [← neg_eq_zero, ← Complex.sin_neg, ← mul_neg, Complex.sin_eq_zero_iff, mul_comm] at hs \n[GOAL]\ncase pos\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ∃ k, -z * ↑π = ↑k * ↑π\n⊢ Gamma z * Gamma (1 - z) = 0\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := hs\n[GOAL]\ncase pos.intro\nz : ℂ\npi_ne : ↑π ≠ 0\nk : ℤ\nhk : -z * ↑π = ↑k * ↑π\n⊢ Gamma z * Gamma (1 - z) = 0\n[PROOFSTEP]\nrw [mul_eq_mul_right_iff, eq_false (ofReal_ne_zero.mpr pi_pos.ne'), or_false_iff, neg_eq_iff_eq_neg] at hk \n[GOAL]\ncase pos.intro\nz : ℂ\npi_ne : ↑π ≠ 0\nk : ℤ\nhk : z = -↑k\n⊢ Gamma z * Gamma (1 - z) = 0\n[PROOFSTEP]\nrw [hk]\n[GOAL]\ncase pos.intro\nz : ℂ\npi_ne : ↑π ≠ 0\nk : ℤ\nhk : z = -↑k\n⊢ Gamma (-↑k) * Gamma (1 - -↑k) = 0\n[PROOFSTEP]\ncases k\n[GOAL]\ncase pos.intro.ofNat\nz : ℂ\npi_ne : ↑π ≠ 0\na✝ : ℕ\nhk : z = -↑(Int.ofNat a✝)\n⊢ Gamma (-↑(Int.ofNat a✝)) * Gamma (1 - -↑(Int.ofNat a✝)) = 0\n[PROOFSTEP]\nrw [Int.ofNat_eq_coe, Int.cast_ofNat, Complex.Gamma_neg_nat_eq_zero, zero_mul]\n[GOAL]\ncase pos.intro.negSucc\nz : ℂ\npi_ne : ↑π ≠ 0\na✝ : ℕ\nhk : z = -↑(Int.negSucc a✝)\n⊢ Gamma (-↑(Int.negSucc a✝)) * Gamma (1 - -↑(Int.negSucc a✝)) = 0\n[PROOFSTEP]\nrw [Int.cast_negSucc, neg_neg, Nat.cast_add, Nat.cast_one, add_comm, sub_add_cancel', Complex.Gamma_neg_nat_eq_zero,\n  mul_zero]\n[GOAL]\ncase neg\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\n⊢ Gamma z * Gamma (1 - z) = ↑π / sin (↑π * z)\n[PROOFSTEP]\nrefine' tendsto_nhds_unique ((GammaSeq_tendsto_Gamma z).mul (GammaSeq_tendsto_Gamma <| 1 - z)) _\n[GOAL]\ncase neg\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\n⊢ Tendsto (fun x => GammaSeq z x * GammaSeq (1 - z) x) atTop (𝓝 (↑π / sin (↑π * z)))\n[PROOFSTEP]\nhave : ↑π / sin (↑π * z) = 1 * (π / sin (π * z)) := by rw [one_mul]\n[GOAL]\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\n⊢ ↑π / sin (↑π * z) = 1 * (↑π / sin (↑π * z))\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\ncase neg\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\nthis : ↑π / sin (↑π * z) = 1 * (↑π / sin (↑π * z))\n⊢ Tendsto (fun x => GammaSeq z x * GammaSeq (1 - z) x) atTop (𝓝 (↑π / sin (↑π * z)))\n[PROOFSTEP]\nconvert\n  Tendsto.congr' ((eventually_ne_atTop 0).mp (eventually_of_forall fun n hn => (GammaSeq_mul z hn).symm))\n    (Tendsto.mul _ _)\n[GOAL]\ncase neg.convert_3\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\nthis : ↑π / sin (↑π * z) = 1 * (↑π / sin (↑π * z))\n⊢ Tendsto (fun n => ↑n / (↑n + 1 - z)) atTop (𝓝 1)\n[PROOFSTEP]\nconvert tendsto_coe_nat_div_add_atTop (1 - z) using 1\n[GOAL]\ncase h.e'_3\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\nthis : ↑π / sin (↑π * z) = 1 * (↑π / sin (↑π * z))\n⊢ (fun n => ↑n / (↑n + 1 - z)) = fun n => ↑n / (↑n + (1 - z))\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_3.h\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\nthis : ↑π / sin (↑π * z) = 1 * (↑π / sin (↑π * z))\nn : ℕ\n⊢ ↑n / (↑n + 1 - z) = ↑n / (↑n + (1 - z))\n[PROOFSTEP]\nrw [add_sub_assoc]\n[GOAL]\ncase neg.convert_4\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\nthis : ↑π / sin (↑π * z) = 1 * (↑π / sin (↑π * z))\n⊢ Tendsto (fun n => 1 / (z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2))) atTop (𝓝 (↑π / sin (↑π * z)))\n[PROOFSTEP]\nhave : ↑π / sin (↑π * z) = 1 / (sin (π * z) / π) := by field_simp\n[GOAL]\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\nthis : ↑π / sin (↑π * z) = 1 * (↑π / sin (↑π * z))\n⊢ ↑π / sin (↑π * z) = 1 / (sin (↑π * z) / ↑π)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase neg.convert_4\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\nthis✝ : ↑π / sin (↑π * z) = 1 * (↑π / sin (↑π * z))\nthis : ↑π / sin (↑π * z) = 1 / (sin (↑π * z) / ↑π)\n⊢ Tendsto (fun n => 1 / (z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2))) atTop (𝓝 (↑π / sin (↑π * z)))\n[PROOFSTEP]\nconvert tendsto_const_nhds.div _ (div_ne_zero hs pi_ne)\n[GOAL]\ncase neg.convert_4.convert_5\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\nthis✝ : ↑π / sin (↑π * z) = 1 * (↑π / sin (↑π * z))\nthis : ↑π / sin (↑π * z) = 1 / (sin (↑π * z) / ↑π)\n⊢ Tendsto (fun x => z * ∏ j in Finset.range x, (1 - z ^ 2 / (↑j + 1) ^ 2)) atTop (𝓝 (sin (↑π * z) / ↑π))\n[PROOFSTEP]\nrw [← tendsto_mul_iff_of_ne_zero tendsto_const_nhds pi_ne, div_mul_cancel _ pi_ne]\n[GOAL]\ncase neg.convert_4.convert_5\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\nthis✝ : ↑π / sin (↑π * z) = 1 * (↑π / sin (↑π * z))\nthis : ↑π / sin (↑π * z) = 1 / (sin (↑π * z) / ↑π)\n⊢ Tendsto (fun n => (z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)) * ↑π) atTop (𝓝 (sin (↑π * z)))\n[PROOFSTEP]\nconvert tendsto_euler_sin_prod z using 1\n[GOAL]\ncase h.e'_3\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\nthis✝ : ↑π / sin (↑π * z) = 1 * (↑π / sin (↑π * z))\nthis : ↑π / sin (↑π * z) = 1 / (sin (↑π * z) / ↑π)\n⊢ (fun n => (z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)) * ↑π) = fun n =>\n    ↑π * z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_3.h\nz : ℂ\npi_ne : ↑π ≠ 0\nhs : ¬sin (↑π * z) = 0\nthis✝ : ↑π / sin (↑π * z) = 1 * (↑π / sin (↑π * z))\nthis : ↑π / sin (↑π * z) = 1 / (sin (↑π * z) / ↑π)\nn : ℕ\n⊢ (z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)) * ↑π =\n    ↑π * z * ∏ j in Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)\n[PROOFSTEP]\nrw [mul_comm, ← mul_assoc]\n[GOAL]\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\n⊢ Gamma s ≠ 0\n[PROOFSTEP]\nby_cases h_im : s.im = 0\n[GOAL]\ncase pos\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : s.im = 0\n⊢ Gamma s ≠ 0\n[PROOFSTEP]\nhave : s = ↑s.re := by\n  conv_lhs => rw [← Complex.re_add_im s]\n  rw [h_im, ofReal_zero, zero_mul, add_zero]\n[GOAL]\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : s.im = 0\n⊢ s = ↑s.re\n[PROOFSTEP]\nconv_lhs => rw [← Complex.re_add_im s]\n[GOAL]\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : s.im = 0\n| s\n[PROOFSTEP]\nrw [← Complex.re_add_im s]\n[GOAL]\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : s.im = 0\n| s\n[PROOFSTEP]\nrw [← Complex.re_add_im s]\n[GOAL]\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : s.im = 0\n| s\n[PROOFSTEP]\nrw [← Complex.re_add_im s]\n[GOAL]\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : s.im = 0\n⊢ ↑s.re + ↑s.im * I = ↑s.re\n[PROOFSTEP]\nrw [h_im, ofReal_zero, zero_mul, add_zero]\n[GOAL]\ncase pos\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : s.im = 0\nthis : s = ↑s.re\n⊢ Gamma s ≠ 0\n[PROOFSTEP]\nrw [this, Gamma_ofReal, ofReal_ne_zero]\n[GOAL]\ncase pos\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : s.im = 0\nthis : s = ↑s.re\n⊢ Real.Gamma s.re ≠ 0\n[PROOFSTEP]\nrefine' Real.Gamma_ne_zero fun n => _\n[GOAL]\ncase pos\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : s.im = 0\nthis : s = ↑s.re\nn : ℕ\n⊢ s.re ≠ -↑n\n[PROOFSTEP]\nspecialize hs n\n[GOAL]\ncase pos\ns : ℂ\nh_im : s.im = 0\nthis : s = ↑s.re\nn : ℕ\nhs : s ≠ -↑n\n⊢ s.re ≠ -↑n\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\ncase pos\ns : ℂ\nh_im : s.im = 0\nthis : s = ↑s.re\nn : ℕ\nhs : s.re = -↑n\n⊢ s = -↑n\n[PROOFSTEP]\nrwa [this, ← ofReal_nat_cast, ← ofReal_neg, ofReal_inj]\n[GOAL]\ncase neg\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : ¬s.im = 0\n⊢ Gamma s ≠ 0\n[PROOFSTEP]\nhave : sin (↑π * s) ≠ 0 := by\n  rw [Complex.sin_ne_zero_iff]\n  intro k\n  apply_fun im\n  rw [ofReal_mul_im, ← ofReal_int_cast, ← ofReal_mul, ofReal_im]\n  exact mul_ne_zero Real.pi_pos.ne' h_im\n[GOAL]\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : ¬s.im = 0\n⊢ sin (↑π * s) ≠ 0\n[PROOFSTEP]\nrw [Complex.sin_ne_zero_iff]\n[GOAL]\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : ¬s.im = 0\n⊢ ∀ (k : ℤ), ↑π * s ≠ ↑k * ↑π\n[PROOFSTEP]\nintro k\n[GOAL]\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : ¬s.im = 0\nk : ℤ\n⊢ ↑π * s ≠ ↑k * ↑π\n[PROOFSTEP]\napply_fun im\n[GOAL]\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : ¬s.im = 0\nk : ℤ\n⊢ (↑π * s).im ≠ (↑k * ↑π).im\n[PROOFSTEP]\nrw [ofReal_mul_im, ← ofReal_int_cast, ← ofReal_mul, ofReal_im]\n[GOAL]\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : ¬s.im = 0\nk : ℤ\n⊢ π * s.im ≠ 0\n[PROOFSTEP]\nexact mul_ne_zero Real.pi_pos.ne' h_im\n[GOAL]\ncase neg\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : ¬s.im = 0\nthis : sin (↑π * s) ≠ 0\n⊢ Gamma s ≠ 0\n[PROOFSTEP]\nhave A := div_ne_zero (ofReal_ne_zero.mpr Real.pi_pos.ne') this\n[GOAL]\ncase neg\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : ¬s.im = 0\nthis : sin (↑π * s) ≠ 0\nA : ↑π / sin (↑π * s) ≠ 0\n⊢ Gamma s ≠ 0\n[PROOFSTEP]\nrw [← Complex.Gamma_mul_Gamma_one_sub s, mul_ne_zero_iff] at A \n[GOAL]\ncase neg\ns : ℂ\nhs : ∀ (m : ℕ), s ≠ -↑m\nh_im : ¬s.im = 0\nthis : sin (↑π * s) ≠ 0\nA : Gamma s ≠ 0 ∧ Gamma (1 - s) ≠ 0\n⊢ Gamma s ≠ 0\n[PROOFSTEP]\nexact A.1\n[GOAL]\ns : ℂ\n⊢ Gamma s = 0 ↔ ∃ m, s = -↑m\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\ns : ℂ\n⊢ Gamma s = 0 → ∃ m, s = -↑m\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase mp\ns : ℂ\n⊢ (∀ (m : ℕ), s ≠ -↑m) → Gamma s ≠ 0\n[PROOFSTEP]\nexact Gamma_ne_zero\n[GOAL]\ncase mpr\ns : ℂ\n⊢ (∃ m, s = -↑m) → Gamma s = 0\n[PROOFSTEP]\nrintro ⟨m, rfl⟩\n[GOAL]\ncase mpr.intro\nm : ℕ\n⊢ Gamma (-↑m) = 0\n[PROOFSTEP]\nexact Gamma_neg_nat_eq_zero m\n[GOAL]\ns : ℂ\nhs : 0 < s.re\n⊢ Gamma s ≠ 0\n[PROOFSTEP]\nrefine' Gamma_ne_zero fun m => _\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nm : ℕ\n⊢ s ≠ -↑m\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\ns : ℂ\nm : ℕ\nhs : s = -↑m\n⊢ s.re ≤ 0\n[PROOFSTEP]\nsimpa only [hs, neg_re, ← ofReal_nat_cast, ofReal_re, neg_nonpos] using Nat.cast_nonneg _\n[GOAL]\ns : ℝ\n⊢ Tendsto (GammaSeq s) atTop (𝓝 (Gamma s))\n[PROOFSTEP]\nsuffices : Tendsto ((↑) ∘ GammaSeq s : ℕ → ℂ) atTop (𝓝 <| Complex.Gamma s)\n[GOAL]\ns : ℝ\nthis : Tendsto (Complex.ofReal' ∘ GammaSeq s) atTop (𝓝 (Complex.Gamma ↑s))\n⊢ Tendsto (GammaSeq s) atTop (𝓝 (Gamma s))\ncase this s : ℝ ⊢ Tendsto (Complex.ofReal' ∘ GammaSeq s) atTop (𝓝 (Complex.Gamma ↑s))\n[PROOFSTEP]\nexact (Complex.continuous_re.tendsto (Complex.Gamma ↑s)).comp this\n[GOAL]\ncase this\ns : ℝ\n⊢ Tendsto (Complex.ofReal' ∘ GammaSeq s) atTop (𝓝 (Complex.Gamma ↑s))\n[PROOFSTEP]\nconvert Complex.GammaSeq_tendsto_Gamma s\n[GOAL]\ncase h.e'_3\ns : ℝ\n⊢ Complex.ofReal' ∘ GammaSeq s = Complex.GammaSeq ↑s\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_3.h\ns : ℝ\nn : ℕ\n⊢ (Complex.ofReal' ∘ GammaSeq s) n = Complex.GammaSeq (↑s) n\n[PROOFSTEP]\ndsimp only [GammaSeq, Function.comp_apply, Complex.GammaSeq]\n[GOAL]\ncase h.e'_3.h\ns : ℝ\nn : ℕ\n⊢ ↑(↑n ^ s * ↑n ! / ∏ j in Finset.range (n + 1), (s + ↑j)) = ↑n ^ ↑s * ↑n ! / ∏ j in Finset.range (n + 1), (↑s + ↑j)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_3.h\ns : ℝ\nn : ℕ\n⊢ ↑(↑n ^ s) * ↑n ! / ∏ x in Finset.range (n + 1), (↑s + ↑x) = ↑n ^ ↑s * ↑n ! / ∏ x in Finset.range (n + 1), (↑s + ↑x)\n[PROOFSTEP]\nrw [Complex.ofReal_cpow n.cast_nonneg, Complex.ofReal_nat_cast]\n[GOAL]\ns : ℝ\n⊢ Gamma s * Gamma (1 - s) = π / sin (π * s)\n[PROOFSTEP]\nsimp_rw [← Complex.ofReal_inj, Complex.ofReal_div, Complex.ofReal_sin, Complex.ofReal_mul, ← Complex.Gamma_ofReal,\n  Complex.ofReal_sub, Complex.ofReal_one]\n[GOAL]\ns : ℝ\n⊢ Complex.Gamma ↑s * Complex.Gamma (1 - ↑s) = ↑π / Complex.sin (↑π * ↑s)\n[PROOFSTEP]\nexact Complex.Gamma_mul_Gamma_one_sub s\n[GOAL]\ns : ℂ\n⊢ (Gamma s)⁻¹ = s * (Gamma (s + 1))⁻¹\n[PROOFSTEP]\nrcases ne_or_eq s 0 with (h | rfl)\n[GOAL]\ncase inl\ns : ℂ\nh : s ≠ 0\n⊢ (Gamma s)⁻¹ = s * (Gamma (s + 1))⁻¹\n[PROOFSTEP]\nrw [Gamma_add_one s h, mul_inv, mul_inv_cancel_left₀ h]\n[GOAL]\ncase inr\n⊢ (Gamma 0)⁻¹ = 0 * (Gamma (0 + 1))⁻¹\n[PROOFSTEP]\nrw [zero_add, Gamma_zero, inv_zero, zero_mul]\n[GOAL]\n⊢ Differentiable ℂ fun s => (Gamma s)⁻¹\n[PROOFSTEP]\nsuffices : ∀ n : ℕ, ∀ (s : ℂ) (_ : -s.re < n), DifferentiableAt ℂ (fun u : ℂ => (Gamma u)⁻¹) s\n[GOAL]\nthis : ∀ (n : ℕ) (s : ℂ), -s.re < ↑n → DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\n⊢ Differentiable ℂ fun s => (Gamma s)⁻¹\ncase this ⊢ ∀ (n : ℕ) (s : ℂ), -s.re < ↑n → DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\n[PROOFSTEP]\nexact fun s =>\n  let ⟨n, h⟩ := exists_nat_gt (-s.re)\n  this n s h\n[GOAL]\ncase this\n⊢ ∀ (n : ℕ) (s : ℂ), -s.re < ↑n → DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\n[PROOFSTEP]\nintro n\n[GOAL]\ncase this\nn : ℕ\n⊢ ∀ (s : ℂ), -s.re < ↑n → DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\n[PROOFSTEP]\ninduction' n with m hm\n[GOAL]\ncase this.zero\n⊢ ∀ (s : ℂ), -s.re < ↑Nat.zero → DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\n[PROOFSTEP]\nintro s hs\n[GOAL]\ncase this.zero\ns : ℂ\nhs : -s.re < ↑Nat.zero\n⊢ DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\n[PROOFSTEP]\nrw [Nat.cast_zero, neg_lt_zero] at hs \n[GOAL]\ncase this.zero\ns : ℂ\nhs : 0 < s.re\n⊢ DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\n[PROOFSTEP]\nsuffices : ∀ m : ℕ, s ≠ -↑m\n[GOAL]\ncase this.zero\ns : ℂ\nhs : 0 < s.re\nthis : ∀ (m : ℕ), s ≠ -↑m\n⊢ DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\ncase this s : ℂ hs : 0 < s.re ⊢ ∀ (m : ℕ), s ≠ -↑m\n[PROOFSTEP]\nexact (differentiableAt_Gamma _ this).inv (Gamma_ne_zero this)\n[GOAL]\ncase this\ns : ℂ\nhs : 0 < s.re\n⊢ ∀ (m : ℕ), s ≠ -↑m\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\ncase this\ns : ℂ\nhs : ∃ m, s = -↑m\n⊢ s.re ≤ 0\n[PROOFSTEP]\nrcases hs with ⟨m, rfl⟩\n[GOAL]\ncase this.intro\nm : ℕ\n⊢ (-↑m).re ≤ 0\n[PROOFSTEP]\nsimpa only [neg_re, ← ofReal_nat_cast, ofReal_re, neg_nonpos] using Nat.cast_nonneg m\n[GOAL]\ncase this.succ\nm : ℕ\nhm : ∀ (s : ℂ), -s.re < ↑m → DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\n⊢ ∀ (s : ℂ), -s.re < ↑(Nat.succ m) → DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\n[PROOFSTEP]\nintro s hs\n[GOAL]\ncase this.succ\nm : ℕ\nhm : ∀ (s : ℂ), -s.re < ↑m → DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\ns : ℂ\nhs : -s.re < ↑(Nat.succ m)\n⊢ DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\n[PROOFSTEP]\nrw [funext one_div_Gamma_eq_self_mul_one_div_Gamma_add_one]\n[GOAL]\ncase this.succ\nm : ℕ\nhm : ∀ (s : ℂ), -s.re < ↑m → DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\ns : ℂ\nhs : -s.re < ↑(Nat.succ m)\n⊢ DifferentiableAt ℂ (fun x => x * (Gamma (x + 1))⁻¹) s\n[PROOFSTEP]\nspecialize hm (s + 1) (by rwa [add_re, one_re, neg_add', sub_lt_iff_lt_add, ← Nat.cast_succ])\n[GOAL]\nm : ℕ\nhm : ∀ (s : ℂ), -s.re < ↑m → DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) s\ns : ℂ\nhs : -s.re < ↑(Nat.succ m)\n⊢ -(s + 1).re < ↑m\n[PROOFSTEP]\nrwa [add_re, one_re, neg_add', sub_lt_iff_lt_add, ← Nat.cast_succ]\n[GOAL]\ncase this.succ\nm : ℕ\ns : ℂ\nhs : -s.re < ↑(Nat.succ m)\nhm : DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) (s + 1)\n⊢ DifferentiableAt ℂ (fun x => x * (Gamma (x + 1))⁻¹) s\n[PROOFSTEP]\nrefine' differentiableAt_id.mul (hm.comp s _)\n[GOAL]\ncase this.succ\nm : ℕ\ns : ℂ\nhs : -s.re < ↑(Nat.succ m)\nhm : DifferentiableAt ℂ (fun u => (Gamma u)⁻¹) (s + 1)\n⊢ DifferentiableAt ℂ (fun x => x + 1) s\n[PROOFSTEP]\nexact differentiableAt_id.add (differentiableAt_const _)\n[GOAL]\ns : ℂ\n⊢ Gamma s * Gamma (s + 1 / 2) = Gamma (2 * s) * 2 ^ (1 - 2 * s) * ↑(sqrt π)\n[PROOFSTEP]\nsuffices\n  (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * (2 : ℂ) ^ (2 * z - 1) / ↑(Real.sqrt π)\n  by\n  convert congr_arg Inv.inv (congr_fun this s) using 1\n  · rw [mul_inv, inv_inv, inv_inv]\n  · rw [div_eq_mul_inv, mul_inv, mul_inv, inv_inv, inv_inv, ← cpow_neg, neg_sub]\n[GOAL]\ns : ℂ\nthis : (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)\n⊢ Gamma s * Gamma (s + 1 / 2) = Gamma (2 * s) * 2 ^ (1 - 2 * s) * ↑(sqrt π)\n[PROOFSTEP]\nconvert congr_arg Inv.inv (congr_fun this s) using 1\n[GOAL]\ncase h.e'_2\ns : ℂ\nthis : (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)\n⊢ Gamma s * Gamma (s + 1 / 2) = ((Gamma s)⁻¹ * (Gamma (s + 1 / 2))⁻¹)⁻¹\n[PROOFSTEP]\nrw [mul_inv, inv_inv, inv_inv]\n[GOAL]\ncase h.e'_3\ns : ℂ\nthis : (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)\n⊢ Gamma (2 * s) * 2 ^ (1 - 2 * s) * ↑(sqrt π) = ((Gamma (2 * s))⁻¹ * 2 ^ (2 * s - 1) / ↑(sqrt π))⁻¹\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_inv, mul_inv, inv_inv, inv_inv, ← cpow_neg, neg_sub]\n[GOAL]\ns : ℂ\n⊢ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)\n[PROOFSTEP]\nhave h1 : AnalyticOn ℂ (fun z : ℂ => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ :=\n  by\n  refine' DifferentiableOn.analyticOn _ isOpen_univ\n  refine' (differentiable_one_div_Gamma.mul _).differentiableOn\n  exact differentiable_one_div_Gamma.comp (differentiable_id.add (differentiable_const _))\n[GOAL]\ns : ℂ\n⊢ AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\n[PROOFSTEP]\nrefine' DifferentiableOn.analyticOn _ isOpen_univ\n[GOAL]\ns : ℂ\n⊢ DifferentiableOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\n[PROOFSTEP]\nrefine' (differentiable_one_div_Gamma.mul _).differentiableOn\n[GOAL]\ns : ℂ\n⊢ Differentiable ℂ fun z => (Gamma (z + 1 / 2))⁻¹\n[PROOFSTEP]\nexact differentiable_one_div_Gamma.comp (differentiable_id.add (differentiable_const _))\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\n⊢ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)\n[PROOFSTEP]\nhave h2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * (2 : ℂ) ^ (2 * z - 1) / ↑(Real.sqrt π)) univ :=\n  by\n  refine' DifferentiableOn.analyticOn _ isOpen_univ\n  refine' (Differentiable.mul _ (differentiable_const _)).differentiableOn\n  apply Differentiable.mul\n  · exact differentiable_one_div_Gamma.comp (differentiable_id'.const_mul _)\n  · refine' fun t => DifferentiableAt.const_cpow _ (Or.inl two_ne_zero)\n    refine' DifferentiableAt.sub_const (differentiableAt_id.const_mul _) _\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\n⊢ AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\n[PROOFSTEP]\nrefine' DifferentiableOn.analyticOn _ isOpen_univ\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\n⊢ DifferentiableOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\n[PROOFSTEP]\nrefine' (Differentiable.mul _ (differentiable_const _)).differentiableOn\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\n⊢ Differentiable ℂ fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1)\n[PROOFSTEP]\napply Differentiable.mul\n[GOAL]\ncase ha\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\n⊢ Differentiable ℂ fun y => (Gamma (2 * y))⁻¹\n[PROOFSTEP]\nexact differentiable_one_div_Gamma.comp (differentiable_id'.const_mul _)\n[GOAL]\ncase hb\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\n⊢ Differentiable ℂ fun y => 2 ^ (2 * y - 1)\n[PROOFSTEP]\nrefine' fun t => DifferentiableAt.const_cpow _ (Or.inl two_ne_zero)\n[GOAL]\ncase hb\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nt : ℂ\n⊢ DifferentiableAt ℂ (fun y => 2 * y - 1) t\n[PROOFSTEP]\nrefine' DifferentiableAt.sub_const (differentiableAt_id.const_mul _) _\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nh2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\n⊢ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)\n[PROOFSTEP]\nhave h3 : Tendsto ((↑) : ℝ → ℂ) (𝓝[≠] 1) (𝓝[≠] 1) :=\n  by\n  rw [tendsto_nhdsWithin_iff]; constructor\n  · exact tendsto_nhdsWithin_of_tendsto_nhds continuous_ofReal.continuousAt\n  · exact eventually_nhdsWithin_iff.mpr (eventually_of_forall fun t ht => ofReal_ne_one.mpr ht)\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nh2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\n⊢ Tendsto ofReal' (𝓝[{1}ᶜ] 1) (𝓝[{1}ᶜ] 1)\n[PROOFSTEP]\nrw [tendsto_nhdsWithin_iff]\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nh2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\n⊢ Tendsto ofReal' (𝓝[{1}ᶜ] 1) (𝓝 1) ∧ ∀ᶠ (n : ℝ) in 𝓝[{1}ᶜ] 1, ↑n ∈ {1}ᶜ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nh2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\n⊢ Tendsto ofReal' (𝓝[{1}ᶜ] 1) (𝓝 1)\n[PROOFSTEP]\nexact tendsto_nhdsWithin_of_tendsto_nhds continuous_ofReal.continuousAt\n[GOAL]\ncase right\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nh2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\n⊢ ∀ᶠ (n : ℝ) in 𝓝[{1}ᶜ] 1, ↑n ∈ {1}ᶜ\n[PROOFSTEP]\nexact eventually_nhdsWithin_iff.mpr (eventually_of_forall fun t ht => ofReal_ne_one.mpr ht)\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nh2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\nh3 : Tendsto ofReal' (𝓝[{1}ᶜ] 1) (𝓝[{1}ᶜ] 1)\n⊢ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) = fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)\n[PROOFSTEP]\nrefine' AnalyticOn.eq_of_frequently_eq h1 h2 (h3.frequently _)\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nh2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\nh3 : Tendsto ofReal' (𝓝[{1}ᶜ] 1) (𝓝[{1}ᶜ] 1)\n⊢ ∃ᶠ (x : ℝ) in 𝓝[{1}ᶜ] 1, (Gamma ↑x)⁻¹ * (Gamma (↑x + 1 / 2))⁻¹ = (Gamma (2 * ↑x))⁻¹ * 2 ^ (2 * ↑x - 1) / ↑(sqrt π)\n[PROOFSTEP]\nrefine' ((Eventually.filter_mono nhdsWithin_le_nhds) _).frequently\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nh2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\nh3 : Tendsto ofReal' (𝓝[{1}ᶜ] 1) (𝓝[{1}ᶜ] 1)\n⊢ ∀ᶠ (x : ℝ) in 𝓝 1, (Gamma ↑x)⁻¹ * (Gamma (↑x + 1 / 2))⁻¹ = (Gamma (2 * ↑x))⁻¹ * 2 ^ (2 * ↑x - 1) / ↑(sqrt π)\n[PROOFSTEP]\nrefine' (eventually_gt_nhds zero_lt_one).mp (eventually_of_forall fun t ht => _)\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nh2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\nh3 : Tendsto ofReal' (𝓝[{1}ᶜ] 1) (𝓝[{1}ᶜ] 1)\nt : ℝ\nht : 0 < t\n⊢ (Gamma ↑t)⁻¹ * (Gamma (↑t + 1 / 2))⁻¹ = (Gamma (2 * ↑t))⁻¹ * 2 ^ (2 * ↑t - 1) / ↑(sqrt π)\n[PROOFSTEP]\nrw [← mul_inv, Gamma_ofReal, (by norm_num : (t : ℂ) + 1 / 2 = ↑(t + 1 / 2)), Gamma_ofReal, ← ofReal_mul,\n  Gamma_mul_Gamma_add_half_of_pos ht, ofReal_mul, ofReal_mul, ← Gamma_ofReal, mul_inv, mul_inv,\n  (by norm_num : 2 * (t : ℂ) = ↑(2 * t)), Gamma_ofReal, ofReal_cpow zero_le_two, show (2 : ℝ) = (2 : ℂ) by norm_cast, ←\n  cpow_neg, ofReal_sub, ofReal_one, neg_sub, ← div_eq_mul_inv]\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nh2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\nh3 : Tendsto ofReal' (𝓝[{1}ᶜ] 1) (𝓝[{1}ᶜ] 1)\nt : ℝ\nht : 0 < t\n⊢ ↑t + 1 / 2 = ↑(t + 1 / 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nh2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\nh3 : Tendsto ofReal' (𝓝[{1}ᶜ] 1) (𝓝[{1}ᶜ] 1)\nt : ℝ\nht : 0 < t\n⊢ 2 * ↑t = ↑(2 * t)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ns : ℂ\nh1 : AnalyticOn ℂ (fun z => (Gamma z)⁻¹ * (Gamma (z + 1 / 2))⁻¹) univ\nh2 : AnalyticOn ℂ (fun z => (Gamma (2 * z))⁻¹ * 2 ^ (2 * z - 1) / ↑(sqrt π)) univ\nh3 : Tendsto ofReal' (𝓝[{1}ᶜ] 1) (𝓝[{1}ᶜ] 1)\nt : ℝ\nht : 0 < t\n⊢ ↑2 = 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ns : ℝ\n⊢ Gamma s * Gamma (s + 1 / 2) = Gamma (2 * s) * 2 ^ (1 - 2 * s) * sqrt π\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\ns : ℝ\n⊢ ↑(Gamma s * Gamma (s + 1 / 2)) = ↑(Gamma (2 * s) * 2 ^ (1 - 2 * s) * sqrt π)\n[PROOFSTEP]\nsimpa only [← Gamma_ofReal, ofReal_cpow zero_le_two, ofReal_mul, ofReal_add, ofReal_div, ofReal_sub] using\n  Complex.Gamma_mul_Gamma_add_half ↑s\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Gamma.Beta", "llama_tokens": 70948, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191337850932, "lm_q2_score": 0.5583269943353745, "lm_q1q2_score": 0.3958645218925018}}
{"text": "[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nf : α →₀ ℕ\np : (α →₀ ℕ) × (α →₀ ℕ)\n⊢ p ∈ antidiagonal f ↔ p.fst + p.snd = f\n[PROOFSTEP]\nrcases p with ⟨p₁, p₂⟩\n[GOAL]\ncase mk\nα : Type u\ninst✝ : DecidableEq α\nf p₁ p₂ : α →₀ ℕ\n⊢ (p₁, p₂) ∈ antidiagonal f ↔ (p₁, p₂).fst + (p₁, p₂).snd = f\n[PROOFSTEP]\nsimp [antidiagonal, antidiagonal', ← and_assoc, Multiset.toFinsupp_eq_iff, ← Multiset.toFinsupp_eq_iff (f := f)]\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nn : α →₀ ℕ\nf : (α →₀ ℕ) × (α →₀ ℕ)\n⊢ Prod.swap f ∈ antidiagonal n ↔ f ∈ antidiagonal n\n[PROOFSTEP]\nsimp only [mem_antidiagonal, add_comm, Prod.swap]\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nf g : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.fst = g)\n⊢ Finset.filter (fun p => p.fst = g) (antidiagonal f) = if g ≤ f then {(g, f - g)} else ∅\n[PROOFSTEP]\next ⟨a, b⟩\n[GOAL]\ncase a.mk\nα : Type u\ninst✝ : DecidableEq α\nf g : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.fst = g)\na b : α →₀ ℕ\n⊢ (a, b) ∈ Finset.filter (fun p => p.fst = g) (antidiagonal f) ↔ (a, b) ∈ if g ≤ f then {(g, f - g)} else ∅\n[PROOFSTEP]\nsuffices a = g → (a + b = f ↔ g ≤ f ∧ b = f - g) by\n  simpa [apply_ite (fun f ↦ (a, b) ∈ f), mem_filter, mem_antidiagonal, mem_singleton, Prod.mk.inj_iff, ← and_assoc,\n    @and_right_comm _ (a = _), and_congr_left_iff]\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nf g : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.fst = g)\na b : α →₀ ℕ\nthis : a = g → (a + b = f ↔ g ≤ f ∧ b = f - g)\n⊢ (a, b) ∈ Finset.filter (fun p => p.fst = g) (antidiagonal f) ↔ (a, b) ∈ if g ≤ f then {(g, f - g)} else ∅\n[PROOFSTEP]\nsimpa [apply_ite (fun f ↦ (a, b) ∈ f), mem_filter, mem_antidiagonal, mem_singleton, Prod.mk.inj_iff, ← and_assoc,\n  @and_right_comm _ (a = _), and_congr_left_iff]\n[GOAL]\ncase a.mk\nα : Type u\ninst✝ : DecidableEq α\nf g : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.fst = g)\na b : α →₀ ℕ\n⊢ a = g → (a + b = f ↔ g ≤ f ∧ b = f - g)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase a.mk\nα : Type u\ninst✝ : DecidableEq α\nf a b : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.fst = a)\n⊢ a + b = f ↔ a ≤ f ∧ b = f - a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mk.mp\nα : Type u\ninst✝ : DecidableEq α\nf a b : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.fst = a)\n⊢ a + b = f → a ≤ f ∧ b = f - a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase a.mk.mp\nα : Type u\ninst✝ : DecidableEq α\na b : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.fst = a)\n⊢ a ≤ a + b ∧ b = a + b - a\n[PROOFSTEP]\nexact ⟨le_add_right le_rfl, (add_tsub_cancel_left _ _).symm⟩\n[GOAL]\ncase a.mk.mpr\nα : Type u\ninst✝ : DecidableEq α\nf a b : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.fst = a)\n⊢ a ≤ f ∧ b = f - a → a + b = f\n[PROOFSTEP]\nrintro ⟨h, rfl⟩\n[GOAL]\ncase a.mk.mpr.intro\nα : Type u\ninst✝ : DecidableEq α\nf a : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.fst = a)\nh : a ≤ f\n⊢ a + (f - a) = f\n[PROOFSTEP]\nexact add_tsub_cancel_of_le h\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nf g : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.snd = g)\n⊢ Finset.filter (fun p => p.snd = g) (antidiagonal f) = if g ≤ f then {(f - g, g)} else ∅\n[PROOFSTEP]\next ⟨a, b⟩\n[GOAL]\ncase a.mk\nα : Type u\ninst✝ : DecidableEq α\nf g : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.snd = g)\na b : α →₀ ℕ\n⊢ (a, b) ∈ Finset.filter (fun p => p.snd = g) (antidiagonal f) ↔ (a, b) ∈ if g ≤ f then {(f - g, g)} else ∅\n[PROOFSTEP]\nsuffices b = g → (a + b = f ↔ g ≤ f ∧ a = f - g) by\n  simpa [apply_ite (fun f ↦ (a, b) ∈ f), mem_filter, mem_antidiagonal, mem_singleton, Prod.mk.inj_iff, ← and_assoc,\n    and_congr_left_iff]\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nf g : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.snd = g)\na b : α →₀ ℕ\nthis : b = g → (a + b = f ↔ g ≤ f ∧ a = f - g)\n⊢ (a, b) ∈ Finset.filter (fun p => p.snd = g) (antidiagonal f) ↔ (a, b) ∈ if g ≤ f then {(f - g, g)} else ∅\n[PROOFSTEP]\nsimpa [apply_ite (fun f ↦ (a, b) ∈ f), mem_filter, mem_antidiagonal, mem_singleton, Prod.mk.inj_iff, ← and_assoc,\n  and_congr_left_iff]\n[GOAL]\ncase a.mk\nα : Type u\ninst✝ : DecidableEq α\nf g : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.snd = g)\na b : α →₀ ℕ\n⊢ b = g → (a + b = f ↔ g ≤ f ∧ a = f - g)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase a.mk\nα : Type u\ninst✝ : DecidableEq α\nf a b : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.snd = b)\n⊢ a + b = f ↔ b ≤ f ∧ a = f - b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mk.mp\nα : Type u\ninst✝ : DecidableEq α\nf a b : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.snd = b)\n⊢ a + b = f → b ≤ f ∧ a = f - b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase a.mk.mp\nα : Type u\ninst✝ : DecidableEq α\na b : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.snd = b)\n⊢ b ≤ a + b ∧ a = a + b - b\n[PROOFSTEP]\nexact ⟨le_add_left le_rfl, (add_tsub_cancel_right _ _).symm⟩\n[GOAL]\ncase a.mk.mpr\nα : Type u\ninst✝ : DecidableEq α\nf a b : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.snd = b)\n⊢ b ≤ f ∧ a = f - b → a + b = f\n[PROOFSTEP]\nrintro ⟨h, rfl⟩\n[GOAL]\ncase a.mk.mpr.intro\nα : Type u\ninst✝ : DecidableEq α\nf b : α →₀ ℕ\nD : (p : (α →₀ ℕ) × (α →₀ ℕ)) → Decidable (p.snd = b)\nh : b ≤ f\n⊢ f - b + b = f\n[PROOFSTEP]\nexact tsub_add_cancel_of_le h\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\n⊢ antidiagonal (single a n) =\n    map\n      (Function.Embedding.prodMap { toFun := single a, inj' := (_ : Function.Injective (single a)) }\n        { toFun := single a, inj' := (_ : Function.Injective (single a)) })\n      (Nat.antidiagonal n)\n[PROOFSTEP]\next ⟨x, y⟩\n[GOAL]\ncase a.mk\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\n⊢ (x, y) ∈ antidiagonal (single a n) ↔\n    (x, y) ∈\n      map\n        (Function.Embedding.prodMap { toFun := single a, inj' := (_ : Function.Injective (single a)) }\n          { toFun := single a, inj' := (_ : Function.Injective (single a)) })\n        (Nat.antidiagonal n)\n[PROOFSTEP]\nsimp only [mem_antidiagonal, mem_map, Nat.mem_antidiagonal, Function.Embedding.coe_prodMap, Function.Embedding.coeFn_mk,\n  Prod_map, Prod.mk.injEq, Prod.exists]\n[GOAL]\ncase a.mk\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\n⊢ x + y = single a n ↔ ∃ a_1 b, a_1 + b = n ∧ single a a_1 = x ∧ single a b = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mk.mp\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\n⊢ x + y = single a n → ∃ a_2 b, a_2 + b = n ∧ single a a_2 = x ∧ single a b = y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase a.mk.mp\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\nh : x + y = single a n\n⊢ ∃ a_1 b, a_1 + b = n ∧ single a a_1 = x ∧ single a b = y\n[PROOFSTEP]\nrefine ⟨x a, y a, FunLike.congr_fun h a |>.trans single_eq_same, ?_⟩\n[GOAL]\ncase a.mk.mp\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\nh : x + y = single a n\n⊢ single a (↑x a) = x ∧ single a (↑y a) = y\n[PROOFSTEP]\nsimp_rw [FunLike.ext_iff, ← forall_and]\n[GOAL]\ncase a.mk.mp\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\nh : x + y = single a n\n⊢ ∀ (x_1 : α), ↑(single a (↑x a)) x_1 = ↑x x_1 ∧ ↑(single a (↑y a)) x_1 = ↑y x_1\n[PROOFSTEP]\nintro i\n[GOAL]\ncase a.mk.mp\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\nh : x + y = single a n\ni : α\n⊢ ↑(single a (↑x a)) i = ↑x i ∧ ↑(single a (↑y a)) i = ↑y i\n[PROOFSTEP]\nreplace h := FunLike.congr_fun h i\n[GOAL]\ncase a.mk.mp\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\ni : α\nh : ↑(x + y) i = ↑(single a n) i\n⊢ ↑(single a (↑x a)) i = ↑x i ∧ ↑(single a (↑y a)) i = ↑y i\n[PROOFSTEP]\nsimp_rw [single_apply, Finsupp.add_apply] at h ⊢\n[GOAL]\ncase a.mk.mp\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\ni : α\nh : ↑x i + ↑y i = if a = i then n else 0\n⊢ (if a = i then ↑x a else 0) = ↑x i ∧ (if a = i then ↑y a else 0) = ↑y i\n[PROOFSTEP]\nobtain rfl | hai := Decidable.eq_or_ne a i\n[GOAL]\ncase a.mk.mp.inl\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\nh : ↑x a + ↑y a = if a = a then n else 0\n⊢ (if a = a then ↑x a else 0) = ↑x a ∧ (if a = a then ↑y a else 0) = ↑y a\n[PROOFSTEP]\nexact ⟨if_pos rfl, if_pos rfl⟩\n[GOAL]\ncase a.mk.mp.inr\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\ni : α\nh : ↑x i + ↑y i = if a = i then n else 0\nhai : a ≠ i\n⊢ (if a = i then ↑x a else 0) = ↑x i ∧ (if a = i then ↑y a else 0) = ↑y i\n[PROOFSTEP]\nsimp_rw [if_neg hai, _root_.add_eq_zero_iff] at h ⊢\n[GOAL]\ncase a.mk.mp.inr\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\ni : α\nhai : a ≠ i\nh : ↑x i = 0 ∧ ↑y i = 0\n⊢ 0 = ↑x i ∧ 0 = ↑y i\n[PROOFSTEP]\nexact h.imp Eq.symm Eq.symm\n[GOAL]\ncase a.mk.mpr\nα : Type u\ninst✝ : DecidableEq α\na : α\nn : ℕ\nx y : α →₀ ℕ\n⊢ (∃ a_1 b, a_1 + b = n ∧ single a a_1 = x ∧ single a b = y) → x + y = single a n\n[PROOFSTEP]\nrintro ⟨a, b, rfl, rfl, rfl⟩\n[GOAL]\ncase a.mk.mpr.intro.intro.intro.intro\nα : Type u\ninst✝ : DecidableEq α\na✝ : α\na b : ℕ\n⊢ single a✝ a + single a✝ b = single a✝ (a + b)\n[PROOFSTEP]\nexact (single_add _ _ _).symm\n", "meta": {"mathlib_filename": "Mathlib.Data.Finsupp.Antidiagonal", "llama_tokens": 4730, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6513548511303336, "lm_q2_score": 0.6076631698328916, "lm_q1q2_score": 0.39580435352388976}}
{"text": "[GOAL]\nα : Type u_1\n⊢ Tendsto Real.toNNReal atTop atTop\n[PROOFSTEP]\nrw [← tendsto_coe_atTop]\n[GOAL]\nα : Type u_1\n⊢ Tendsto (fun a => ↑(Real.toNNReal a)) atTop atTop\n[PROOFSTEP]\nexact tendsto_atTop_mono Real.le_coe_toNNReal tendsto_id\n[GOAL]\nα : Type u_1\n⊢ ⨅ (l : ℝ≥0) (_ : ⊥ < l), 𝓟 (Set.Iio l) = ⨅ (a : ℝ≥0) (_ : a ≠ 0), 𝓟 (Set.Iio a)\n[PROOFSTEP]\nsimp only [bot_lt_iff_ne_bot]\n[GOAL]\nα : Type u_1\n⊢ ⨅ (l : ℝ≥0) (_ : l ≠ ⊥), 𝓟 (Set.Iio l) = ⨅ (a : ℝ≥0) (_ : a ≠ 0), 𝓟 (Set.Iio a)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nf : α → ℝ≥0\nr : ℝ≥0\n⊢ HasSum (fun a => ↑(f a)) ↑r ↔ HasSum f r\n[PROOFSTEP]\nsimp only [HasSum, ← coe_sum, tendsto_coe]\n[GOAL]\nα : Type u_1\nf : α → ℝ\ny : ℝ\nhf₀ : ∀ (n : α), 0 ≤ f n\nhy : HasSum f y\n⊢ HasSum (fun x => Real.toNNReal (f x)) (Real.toNNReal y)\n[PROOFSTEP]\nlift y to ℝ≥0 using hy.nonneg hf₀\n[GOAL]\ncase intro\nα : Type u_1\nf : α → ℝ\nhf₀ : ∀ (n : α), 0 ≤ f n\ny : ℝ≥0\nhy : HasSum f ↑y\n⊢ HasSum (fun x => Real.toNNReal (f x)) (Real.toNNReal ↑y)\n[PROOFSTEP]\nlift f to α → ℝ≥0 using hf₀\n[GOAL]\ncase intro.intro\nα : Type u_1\ny : ℝ≥0\nf : α → ℝ≥0\nhy : HasSum (fun i => ↑(f i)) ↑y\n⊢ HasSum (fun x => Real.toNNReal ((fun i => ↑(f i)) x)) (Real.toNNReal ↑y)\n[PROOFSTEP]\nsimpa [hasSum_coe] using hy\n[GOAL]\nα : Type u_1\nf : α → ℝ≥0\n⊢ (Summable fun a => ↑(f a)) ↔ Summable f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nf : α → ℝ≥0\n⊢ (Summable fun a => ↑(f a)) → Summable f\ncase mpr α : Type u_1 f : α → ℝ≥0 ⊢ Summable f → Summable fun a => ↑(f a)\n[PROOFSTEP]\nexact fun ⟨a, ha⟩ => ⟨⟨a, ha.nonneg fun x => (f x).2⟩, hasSum_coe.1 ha⟩\n[GOAL]\ncase mpr\nα : Type u_1\nf : α → ℝ≥0\n⊢ Summable f → Summable fun a => ↑(f a)\n[PROOFSTEP]\nexact fun ⟨a, ha⟩ => ⟨a.1, hasSum_coe.2 ha⟩\n[GOAL]\nα : Type u_1\nf : α → ℝ≥0\nhf : ¬Summable f\n⊢ ↑(∑' (a : α), f a) = ∑' (a : α), ↑(f a)\n[PROOFSTEP]\nsimp [tsum_def, hf, mt summable_coe.1 hf]\n[GOAL]\nα : Type u_1\na : ℝ≥0\nf : α → ℝ≥0\n⊢ ↑(∑' (x : α), a * f x) = ↑(a * ∑' (x : α), f x)\n[PROOFSTEP]\nsimp only [coe_tsum, NNReal.coe_mul, tsum_mul_left]\n[GOAL]\nα : Type u_1\nf : α → ℝ≥0\na : ℝ≥0\n⊢ ↑(∑' (x : α), f x * a) = ↑((∑' (x : α), f x) * a)\n[PROOFSTEP]\nsimp only [coe_tsum, NNReal.coe_mul, tsum_mul_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → ℝ≥0\nhf : Summable f\ni : β → α\nhi : Function.Injective i\n⊢ Summable (f ∘ i)\n[PROOFSTEP]\nrw [← summable_coe] at hf ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → ℝ≥0\nhf : Summable fun a => ↑(f a)\ni : β → α\nhi : Function.Injective i\n⊢ Summable fun a => ↑((f ∘ i) a)\n[PROOFSTEP]\nexact hf.comp_injective hi\n[GOAL]\nα : Type u_1\nf : ℕ → ℝ≥0\nk : ℕ\n⊢ (Summable fun i => f (i + k)) ↔ Summable f\n[PROOFSTEP]\nrw [← summable_coe, ← summable_coe]\n[GOAL]\nα : Type u_1\nf : ℕ → ℝ≥0\nk : ℕ\n⊢ (Summable fun a => ↑(f (a + k))) ↔ Summable fun a => ↑(f a)\n[PROOFSTEP]\nexact @summable_nat_add_iff ℝ _ _ _ (fun i => (f i : ℝ)) k\n[GOAL]\nα : Type u_1\nf : ℕ → ℝ≥0\nk : ℕ\na : ℝ≥0\n⊢ HasSum (fun n => f (n + k)) a ↔ HasSum f (a + ∑ i in Finset.range k, f i)\n[PROOFSTEP]\nrw [← hasSum_coe, hasSum_nat_add_iff (f := fun n => toReal (f n)) k]\n[GOAL]\nα : Type u_1\nf : ℕ → ℝ≥0\nk : ℕ\na : ℝ≥0\n⊢ HasSum (fun n => ↑(f n)) (↑a + ∑ i in Finset.range k, ↑(f i)) ↔ HasSum f (a + ∑ i in Finset.range k, f i)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nα : Type u_1\nf : α → ℝ≥0\nhf : Summable f\n⊢ Tendsto f cofinite (𝓝 0)\n[PROOFSTEP]\nsimp only [← summable_coe, ← tendsto_coe] at hf ⊢\n[GOAL]\nα : Type u_1\nf : α → ℝ≥0\nhf : Summable fun a => ↑(f a)\n⊢ Tendsto (fun a => ↑(f a)) cofinite (𝓝 ↑0)\n[PROOFSTEP]\nexact hf.tendsto_cofinite_zero\n[GOAL]\nf : ℕ → ℝ≥0\nhf : Summable f\n⊢ Tendsto f atTop (𝓝 0)\n[PROOFSTEP]\nrw [← Nat.cofinite_eq_atTop]\n[GOAL]\nf : ℕ → ℝ≥0\nhf : Summable f\n⊢ Tendsto f cofinite (𝓝 0)\n[PROOFSTEP]\nexact tendsto_cofinite_zero_of_summable hf\n[GOAL]\nα : Type u_1\nf : α → ℝ≥0\n⊢ Tendsto (fun s => ∑' (b : { x // ¬x ∈ s }), f ↑b) atTop (𝓝 0)\n[PROOFSTEP]\nsimp_rw [← tendsto_coe, coe_tsum, NNReal.coe_zero]\n[GOAL]\nα : Type u_1\nf : α → ℝ≥0\n⊢ Tendsto (fun a => ∑' (a_1 : { x // ¬x ∈ a }), ↑(f ↑a_1)) atTop (𝓝 0)\n[PROOFSTEP]\nexact tendsto_tsum_compl_atTop_zero fun a : α => (f a : ℝ)\n[GOAL]\nn : ℕ\nhn : n ≠ 0\n⊢ Tendsto (fun b => id b ^ n) atBot atBot\n[PROOFSTEP]\nsimpa [OrderBot.atBot_eq, pos_iff_ne_zero]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Instances.NNReal", "llama_tokens": 2327, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6992544210587585, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.3957909631370764}}
{"text": "[GOAL]\nα : Type u_1\nf : Filter α\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a ≠ ⊤\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nby_cases ha_zero : a = 0\n[GOAL]\ncase pos\nα : Type u_1\nf : Filter α\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a ≠ ⊤\nha_zero : a = 0\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nsimp_rw [ha_zero, zero_mul, ← ENNReal.bot_eq_zero]\n[GOAL]\ncase pos\nα : Type u_1\nf : Filter α\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a ≠ ⊤\nha_zero : a = 0\n⊢ limsup (fun x => ⊥) f = ⊥\n[PROOFSTEP]\nexact limsup_const_bot\n[GOAL]\ncase neg\nα : Type u_1\nf : Filter α\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a ≠ ⊤\nha_zero : ¬a = 0\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nlet g := fun x : ℝ≥0∞ => a * x\n[GOAL]\ncase neg\nα : Type u_1\nf : Filter α\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a ≠ ⊤\nha_zero : ¬a = 0\ng : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nhave hg_bij : Function.Bijective g :=\n  Function.bijective_iff_has_inverse.mpr\n    ⟨fun x => a⁻¹ * x,\n      ⟨fun x => by simp [← mul_assoc, ENNReal.inv_mul_cancel ha_zero ha_top], fun x => by\n        simp [← mul_assoc, ENNReal.mul_inv_cancel ha_zero ha_top]⟩⟩\n[GOAL]\nα : Type u_1\nf : Filter α\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a ≠ ⊤\nha_zero : ¬a = 0\ng : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x\nx : ℝ≥0∞\n⊢ (fun x => a⁻¹ * x) (g x) = x\n[PROOFSTEP]\nsimp [← mul_assoc, ENNReal.inv_mul_cancel ha_zero ha_top]\n[GOAL]\nα : Type u_1\nf : Filter α\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a ≠ ⊤\nha_zero : ¬a = 0\ng : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x\nx : ℝ≥0∞\n⊢ g ((fun x => a⁻¹ * x) x) = x\n[PROOFSTEP]\nsimp [← mul_assoc, ENNReal.mul_inv_cancel ha_zero ha_top]\n[GOAL]\ncase neg\nα : Type u_1\nf : Filter α\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a ≠ ⊤\nha_zero : ¬a = 0\ng : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x\nhg_bij : Function.Bijective g\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nhave hg_mono : StrictMono g :=\n  Monotone.strictMono_of_injective (fun _ _ _ => by rwa [mul_le_mul_left ha_zero ha_top]) hg_bij.1\n[GOAL]\nα : Type u_1\nf : Filter α\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a ≠ ⊤\nha_zero : ¬a = 0\ng : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x\nhg_bij : Function.Bijective g\nx✝² x✝¹ : ℝ≥0∞\nx✝ : x✝² ≤ x✝¹\n⊢ g x✝² ≤ g x✝¹\n[PROOFSTEP]\nrwa [mul_le_mul_left ha_zero ha_top]\n[GOAL]\ncase neg\nα : Type u_1\nf : Filter α\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a ≠ ⊤\nha_zero : ¬a = 0\ng : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x\nhg_bij : Function.Bijective g\nhg_mono : StrictMono g\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nlet g_iso := StrictMono.orderIsoOfSurjective g hg_mono hg_bij.2\n[GOAL]\ncase neg\nα : Type u_1\nf : Filter α\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a ≠ ⊤\nha_zero : ¬a = 0\ng : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x\nhg_bij : Function.Bijective g\nhg_mono : StrictMono g\ng_iso : ℝ≥0∞ ≃o ℝ≥0∞ := StrictMono.orderIsoOfSurjective g hg_mono (_ : Function.Surjective g)\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nexact (OrderIso.limsup_apply g_iso).symm\n[GOAL]\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nby_cases ha_top : a ≠ ⊤\n[GOAL]\ncase pos\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a ≠ ⊤\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nexact limsup_const_mul_of_ne_top ha_top\n[GOAL]\ncase neg\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : ¬a ≠ ⊤\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\npush_neg at ha_top \n[GOAL]\ncase neg\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nby_cases hu : u =ᶠ[f] 0\n[GOAL]\ncase pos\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\nhu : u =ᶠ[f] 0\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nhave hau : (a * u ·) =ᶠ[f] 0 := hu.mono fun x hx => by simp [hx]\n[GOAL]\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\nhu : u =ᶠ[f] 0\nx : α\nhx : u x = OfNat.ofNat 0 x\n⊢ (fun x => a * u x) x = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase pos\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\nhu : u =ᶠ[f] 0\nhau : (fun x => a * u x) =ᶠ[f] 0\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nsimp only [limsup_congr hu, limsup_congr hau, Pi.zero_apply, ← ENNReal.bot_eq_zero, limsup_const_bot]\n[GOAL]\ncase pos\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\nhu : u =ᶠ[f] 0\nhau : (fun x => a * u x) =ᶠ[f] 0\n⊢ ⊥ = a * ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\nhu : ¬u =ᶠ[f] 0\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nhave hu_mul : ∃ᶠ x : α in f, ⊤ ≤ ite (u x = 0) (0 : ℝ≥0∞) ⊤ :=\n  by\n  rw [EventuallyEq, not_eventually] at hu \n  refine' hu.mono fun x hx => _\n  rw [Pi.zero_apply] at hx \n  simp [hx]\n[GOAL]\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\nhu : ¬u =ᶠ[f] 0\n⊢ ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤\n[PROOFSTEP]\nrw [EventuallyEq, not_eventually] at hu \n[GOAL]\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\nhu : ∃ᶠ (x : α) in f, ¬u x = OfNat.ofNat 0 x\n⊢ ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤\n[PROOFSTEP]\nrefine' hu.mono fun x hx => _\n[GOAL]\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\nhu : ∃ᶠ (x : α) in f, ¬u x = OfNat.ofNat 0 x\nx : α\nhx : ¬u x = OfNat.ofNat 0 x\n⊢ ⊤ ≤ if u x = 0 then 0 else ⊤\n[PROOFSTEP]\nrw [Pi.zero_apply] at hx \n[GOAL]\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\nhu : ∃ᶠ (x : α) in f, ¬u x = OfNat.ofNat 0 x\nx : α\nhx : ¬u x = 0\n⊢ ⊤ ≤ if u x = 0 then 0 else ⊤\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\nhu : ¬u =ᶠ[f] 0\nhu_mul : ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nhave h_top_le : (f.limsup fun x : α => ite (u x = 0) (0 : ℝ≥0∞) ⊤) = ⊤ :=\n  eq_top_iff.mpr (le_limsup_of_frequently_le hu_mul)\n[GOAL]\ncase neg\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\nhu : ¬u =ᶠ[f] 0\nhu_mul : ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤\nh_top_le : limsup (fun x => if u x = 0 then 0 else ⊤) f = ⊤\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nhave hfu : f.limsup u ≠ 0 := mt limsup_eq_zero_iff.1 hu\n[GOAL]\ncase neg\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu : α → ℝ≥0∞\na : ℝ≥0∞\nha_top : a = ⊤\nhu : ¬u =ᶠ[f] 0\nhu_mul : ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤\nh_top_le : limsup (fun x => if u x = 0 then 0 else ⊤) f = ⊤\nhfu : limsup u f ≠ 0\n⊢ limsup (fun x => a * u x) f = a * limsup u f\n[PROOFSTEP]\nsimp only [ha_top, top_mul', hfu, h_top_le]\n[GOAL]\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu v : α → ℝ≥0∞\n⊢ limsup (u * v) f ≤ limsup (fun x => limsup u f * v x) f\n[PROOFSTEP]\nrefine limsup_le_limsup ?_\n[GOAL]\nα : Type u_1\nf : Filter α\ninst✝ : CountableInterFilter f\nu v : α → ℝ≥0∞\n⊢ u * v ≤ᶠ[f] fun x => limsup u f * v x\n[PROOFSTEP]\nfilter_upwards [@eventually_le_limsup _ f _ u] with x hx using mul_le_mul' hx le_rfl\n[GOAL]\nα : Type u_1\nf✝ : Filter α\nβ : Type u_2\ninst✝¹ : Countable β\nf : Filter α\ninst✝ : CountableInterFilter f\ng : Filter β\nu : α → β → ℝ≥0∞\n⊢ ∀ᶠ (a : α) in f, ∀ (b : β), u a b ≤ limsup (fun a' => u a' b) f\n[PROOFSTEP]\nrw [eventually_countable_forall]\n[GOAL]\nα : Type u_1\nf✝ : Filter α\nβ : Type u_2\ninst✝¹ : Countable β\nf : Filter α\ninst✝ : CountableInterFilter f\ng : Filter β\nu : α → β → ℝ≥0∞\n⊢ ∀ (i : β), ∀ᶠ (x : α) in f, u x i ≤ limsup (fun a' => u a' i) f\n[PROOFSTEP]\nexact fun b => ENNReal.eventually_le_limsup fun a => u a b\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.ENNReal", "llama_tokens": 4288, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7341195269001831, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.39567810697837963}}
{"text": "[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LE (α i)\na b : (i : ι) × α i\n⊢ a ≤ b ↔ ∃ h, h ▸ a.snd ≤ b.snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LE (α i)\na b : (i : ι) × α i\n⊢ a ≤ b → ∃ h, h ▸ a.snd ≤ b.snd\n[PROOFSTEP]\nrintro ⟨i, a, b, h⟩\n[GOAL]\ncase mp.fiber\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LE (α i)\ni : ι\na b : α i\nh : a ≤ b\n⊢ ∃ h, h ▸ { fst := i, snd := a }.snd ≤ { fst := i, snd := b }.snd\n[PROOFSTEP]\nexact ⟨rfl, h⟩\n[GOAL]\ncase mpr\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LE (α i)\na b : (i : ι) × α i\n⊢ (∃ h, h ▸ a.snd ≤ b.snd) → a ≤ b\n[PROOFSTEP]\nobtain ⟨i, a⟩ := a\n[GOAL]\ncase mpr.mk\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LE (α i)\nb : (i : ι) × α i\ni : ι\na : α i\n⊢ (∃ h, h ▸ { fst := i, snd := a }.snd ≤ b.snd) → { fst := i, snd := a } ≤ b\n[PROOFSTEP]\nobtain ⟨j, b⟩ := b\n[GOAL]\ncase mpr.mk.mk\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LE (α i)\ni : ι\na : α i\nj : ι\nb : α j\n⊢ (∃ h, h ▸ { fst := i, snd := a }.snd ≤ { fst := j, snd := b }.snd) → { fst := i, snd := a } ≤ { fst := j, snd := b }\n[PROOFSTEP]\nrintro ⟨rfl : i = j, h⟩\n[GOAL]\ncase mpr.mk.mk.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LE (α i)\ni : ι\na b : α i\nh : (_ : i = i) ▸ { fst := i, snd := a }.snd ≤ { fst := i, snd := b }.snd\n⊢ { fst := i, snd := a } ≤ { fst := i, snd := b }\n[PROOFSTEP]\nexact le.fiber _ _ _ h\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LT (α i)\na b : (i : ι) × α i\n⊢ a < b ↔ ∃ h, h ▸ a.snd < b.snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LT (α i)\na b : (i : ι) × α i\n⊢ a < b → ∃ h, h ▸ a.snd < b.snd\n[PROOFSTEP]\nrintro ⟨i, a, b, h⟩\n[GOAL]\ncase mp.fiber\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LT (α i)\ni : ι\na b : α i\nh : a < b\n⊢ ∃ h, h ▸ { fst := i, snd := a }.snd < { fst := i, snd := b }.snd\n[PROOFSTEP]\nexact ⟨rfl, h⟩\n[GOAL]\ncase mpr\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LT (α i)\na b : (i : ι) × α i\n⊢ (∃ h, h ▸ a.snd < b.snd) → a < b\n[PROOFSTEP]\nobtain ⟨i, a⟩ := a\n[GOAL]\ncase mpr.mk\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LT (α i)\nb : (i : ι) × α i\ni : ι\na : α i\n⊢ (∃ h, h ▸ { fst := i, snd := a }.snd < b.snd) → { fst := i, snd := a } < b\n[PROOFSTEP]\nobtain ⟨j, b⟩ := b\n[GOAL]\ncase mpr.mk.mk\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LT (α i)\ni : ι\na : α i\nj : ι\nb : α j\n⊢ (∃ h, h ▸ { fst := i, snd := a }.snd < { fst := j, snd := b }.snd) → { fst := i, snd := a } < { fst := j, snd := b }\n[PROOFSTEP]\nrintro ⟨rfl : i = j, h⟩\n[GOAL]\ncase mpr.mk.mk.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → LT (α i)\ni : ι\na b : α i\nh : (_ : i = i) ▸ { fst := i, snd := a }.snd < { fst := i, snd := b }.snd\n⊢ { fst := i, snd := a } < { fst := i, snd := b }\n[PROOFSTEP]\nexact lt.fiber _ _ _ h\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE ((i : ι) × α i) := Sigma.LE\nsrc✝ : LT ((i : ι) × α i) := Sigma.LT\n⊢ ∀ (a b c : (i : ι) × α i), a ≤ b → b ≤ c → a ≤ c\n[PROOFSTEP]\nrintro _ _ _ ⟨i, a, b, hab⟩ ⟨_, _, c, hbc⟩\n[GOAL]\ncase fiber.fiber\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE ((i : ι) × α i) := Sigma.LE\nsrc✝ : LT ((i : ι) × α i) := Sigma.LT\ni : ι\na b : α i\nhab : a ≤ b\nc : α i\nhbc : b ≤ c\n⊢ { fst := i, snd := a } ≤ { fst := i, snd := c }\n[PROOFSTEP]\nexact le.fiber i a c (hab.trans hbc)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE ((i : ι) × α i) := Sigma.LE\nsrc✝ : LT ((i : ι) × α i) := Sigma.LT\nx✝¹ x✝ : (i : ι) × α i\n⊢ x✝¹ < x✝ ↔ x✝¹ ≤ x✝ ∧ ¬x✝ ≤ x✝¹\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE ((i : ι) × α i) := Sigma.LE\nsrc✝ : LT ((i : ι) × α i) := Sigma.LT\nx✝¹ x✝ : (i : ι) × α i\n⊢ x✝¹ < x✝ → x✝¹ ≤ x✝ ∧ ¬x✝ ≤ x✝¹\n[PROOFSTEP]\nrintro ⟨i, a, b, hab⟩\n[GOAL]\ncase mp.fiber\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE ((i : ι) × α i) := Sigma.LE\nsrc✝ : LT ((i : ι) × α i) := Sigma.LT\ni : ι\na b : α i\nhab : a < b\n⊢ { fst := i, snd := a } ≤ { fst := i, snd := b } ∧ ¬{ fst := i, snd := b } ≤ { fst := i, snd := a }\n[PROOFSTEP]\nrwa [mk_le_mk_iff, mk_le_mk_iff, ← lt_iff_le_not_le]\n[GOAL]\ncase mpr\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE ((i : ι) × α i) := Sigma.LE\nsrc✝ : LT ((i : ι) × α i) := Sigma.LT\nx✝¹ x✝ : (i : ι) × α i\n⊢ x✝¹ ≤ x✝ ∧ ¬x✝ ≤ x✝¹ → x✝¹ < x✝\n[PROOFSTEP]\nrintro ⟨⟨i, a, b, hab⟩, h⟩\n[GOAL]\ncase mpr.intro.fiber\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE ((i : ι) × α i) := Sigma.LE\nsrc✝ : LT ((i : ι) × α i) := Sigma.LT\ni : ι\na b : α i\nhab : a ≤ b\nh : ¬{ fst := i, snd := b } ≤ { fst := i, snd := a }\n⊢ { fst := i, snd := a } < { fst := i, snd := b }\n[PROOFSTEP]\nrw [mk_le_mk_iff] at h \n[GOAL]\ncase mpr.intro.fiber\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE ((i : ι) × α i) := Sigma.LE\nsrc✝ : LT ((i : ι) × α i) := Sigma.LT\ni : ι\na b : α i\nhab : a ≤ b\nh : ¬b ≤ a\n⊢ { fst := i, snd := a } < { fst := i, snd := b }\n[PROOFSTEP]\nexact mk_lt_mk_iff.2 (hab.lt_of_not_le h)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → PartialOrder (α i)\nsrc✝ : Preorder ((i : ι) × α i) := Sigma.preorder\n⊢ ∀ (a b : (i : ι) × α i), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nrintro _ _ ⟨i, a, b, hab⟩ ⟨_, _, _, hba⟩\n[GOAL]\ncase fiber.fiber\nι : Type u_1\nα : ι → Type u_2\ninst✝ : (i : ι) → PartialOrder (α i)\nsrc✝ : Preorder ((i : ι) × α i) := Sigma.preorder\ni : ι\na b : (fun i => α i) i\nhab : a ≤ b\nhba : b ≤ a\n⊢ { fst := i, snd := a } = { fst := i, snd := b }\n[PROOFSTEP]\nexact ext rfl (heq_of_eq <| hab.antisymm hba)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\n⊢ ∀ (a₁ a₂ : (i : ι) × α i), a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂\n[PROOFSTEP]\nrintro ⟨i, a⟩ ⟨_, _⟩ ⟨_, _, b, h⟩\n[GOAL]\ncase mk.mk.fiber\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\ni : ι\na b : α i\nh : a < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nobtain ⟨c, ha, hb⟩ := exists_between h\n[GOAL]\ncase mk.mk.fiber.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\ni : ι\na b : α i\nh : a < b\nc : α i\nha : a < c\nhb : c < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nexact ⟨⟨i, c⟩, lt.fiber i a c ha, lt.fiber i c b hb⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ (i : ι), α i) := Lex.LE\nsrc✝ : LT (Σₗ (i : ι), α i) := Lex.LT\n⊢ ∀ (a b : Σₗ (i : ι), α i), a < b ↔ a ≤ b ∧ ¬b ≤ a\n[PROOFSTEP]\nrefine' fun a b => ⟨fun hab => ⟨hab.mono_right fun i a b => le_of_lt, _⟩, _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ (i : ι), α i) := Lex.LE\nsrc✝ : LT (Σₗ (i : ι), α i) := Lex.LT\na b : Σₗ (i : ι), α i\nhab : a < b\n⊢ ¬b ≤ a\n[PROOFSTEP]\nrintro (⟨b, a, hji⟩ | ⟨b, a, hba⟩)\n[GOAL]\ncase refine'_1.left\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ (i : ι), α i) := Lex.LE\nsrc✝ : LT (Σₗ (i : ι), α i) := Lex.LT\ni✝ j✝ : ι\nb : α i✝\na : α j✝\nhji : i✝ < j✝\nhab : { fst := j✝, snd := a } < { fst := i✝, snd := b }\n⊢ False\n[PROOFSTEP]\nobtain ⟨_, _, hij⟩ | ⟨_, _, hab⟩ := hab\n[GOAL]\ncase refine'_1.right\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ (i : ι), α i) := Lex.LE\nsrc✝ : LT (Σₗ (i : ι), α i) := Lex.LT\ni✝ : ι\nb a : α i✝\nhba : b ≤ a\nhab : { fst := i✝, snd := a } < { fst := i✝, snd := b }\n⊢ False\n[PROOFSTEP]\nobtain ⟨_, _, hij⟩ | ⟨_, _, hab⟩ := hab\n[GOAL]\ncase refine'_1.left.left\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ (i : ι), α i) := Lex.LE\nsrc✝ : LT (Σₗ (i : ι), α i) := Lex.LT\ni✝ j✝ : ι\nb : α i✝\na : α j✝\nhji : i✝ < j✝\nhij : j✝ < i✝\n⊢ False\n[PROOFSTEP]\nexact hij.not_lt hji\n[GOAL]\ncase refine'_1.left.right\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ (i : ι), α i) := Lex.LE\nsrc✝ : LT (Σₗ (i : ι), α i) := Lex.LT\ni✝ : ι\nb a : α i✝\nhji : i✝ < i✝\nhab : a < b\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ hji\n[GOAL]\ncase refine'_1.right.left\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ (i : ι), α i) := Lex.LE\nsrc✝ : LT (Σₗ (i : ι), α i) := Lex.LT\ni✝ : ι\nb a : α i✝\nhba : b ≤ a\nhij : i✝ < i✝\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ hij\n[GOAL]\ncase refine'_1.right.right\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ (i : ι), α i) := Lex.LE\nsrc✝ : LT (Σₗ (i : ι), α i) := Lex.LT\ni✝ : ι\nb a : α i✝\nhba : b ≤ a\nhab : a < b\n⊢ False\n[PROOFSTEP]\nexact hab.not_le hba\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ (i : ι), α i) := Lex.LE\nsrc✝ : LT (Σₗ (i : ι), α i) := Lex.LT\na b : Σₗ (i : ι), α i\n⊢ a ≤ b ∧ ¬b ≤ a → a < b\n[PROOFSTEP]\nrintro ⟨⟨a, b, hij⟩ | ⟨a, b, hab⟩, hba⟩\n[GOAL]\ncase refine'_2.intro.left\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ (i : ι), α i) := Lex.LE\nsrc✝ : LT (Σₗ (i : ι), α i) := Lex.LT\ni✝ j✝ : ι\na : α i✝\nb : α j✝\nhij : i✝ < j✝\nhba : ¬{ fst := j✝, snd := b } ≤ { fst := i✝, snd := a }\n⊢ { fst := i✝, snd := a } < { fst := j✝, snd := b }\n[PROOFSTEP]\nexact Sigma.Lex.left _ _ hij\n[GOAL]\ncase refine'_2.intro.right\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ (i : ι), α i) := Lex.LE\nsrc✝ : LT (Σₗ (i : ι), α i) := Lex.LT\ni✝ : ι\na b : α i✝\nhab : a ≤ b\nhba : ¬{ fst := i✝, snd := b } ≤ { fst := i✝, snd := a }\n⊢ { fst := i✝, snd := a } < { fst := i✝, snd := b }\n[PROOFSTEP]\nexact Sigma.Lex.right _ _ (hab.lt_of_not_le fun h => hba <| Sigma.Lex.right _ _ h)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : PartialOrder ι\ninst✝² : OrderBot ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : OrderBot (α ⊥)\nx✝ : Σₗ (i : ι), α i\na : ι\nb : α a\n⊢ ⊥ ≤ { fst := a, snd := b }\n[PROOFSTEP]\nobtain rfl | ha := eq_bot_or_bot_lt a\n[GOAL]\ncase inl\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : PartialOrder ι\ninst✝² : OrderBot ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : OrderBot (α ⊥)\nx✝ : Σₗ (i : ι), α i\nb : α ⊥\n⊢ ⊥ ≤ { fst := ⊥, snd := b }\n[PROOFSTEP]\nexact Lex.right _ _ bot_le\n[GOAL]\ncase inr\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : PartialOrder ι\ninst✝² : OrderBot ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : OrderBot (α ⊥)\nx✝ : Σₗ (i : ι), α i\na : ι\nb : α a\nha : ⊥ < a\n⊢ ⊥ ≤ { fst := a, snd := b }\n[PROOFSTEP]\nexact Lex.left _ _ ha\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : PartialOrder ι\ninst✝² : OrderTop ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : OrderTop (α ⊤)\nx✝ : Σₗ (i : ι), α i\na : ι\nb : α a\n⊢ { fst := a, snd := b } ≤ ⊤\n[PROOFSTEP]\nobtain rfl | ha := eq_top_or_lt_top a\n[GOAL]\ncase inl\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : PartialOrder ι\ninst✝² : OrderTop ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : OrderTop (α ⊤)\nx✝ : Σₗ (i : ι), α i\nb : α ⊤\n⊢ { fst := ⊤, snd := b } ≤ ⊤\n[PROOFSTEP]\nexact Lex.right _ _ le_top\n[GOAL]\ncase inr\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : PartialOrder ι\ninst✝² : OrderTop ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : OrderTop (α ⊤)\nx✝ : Σₗ (i : ι), α i\na : ι\nb : α a\nha : a < ⊤\n⊢ { fst := a, snd := b } ≤ ⊤\n[PROOFSTEP]\nexact Lex.left _ _ ha\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Preorder ι\ninst✝³ : DenselyOrdered ι\ninst✝² : ∀ (i : ι), Nonempty (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\n⊢ ∀ (a₁ a₂ : Σₗ (i : ι), α i), a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂\n[PROOFSTEP]\nrintro ⟨i, a⟩ ⟨j, b⟩ (⟨_, _, h⟩ | ⟨_, b, h⟩)\n[GOAL]\ncase mk.mk.left\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Preorder ι\ninst✝³ : DenselyOrdered ι\ninst✝² : ∀ (i : ι), Nonempty (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nobtain ⟨k, hi, hj⟩ := exists_between h\n[GOAL]\ncase mk.mk.left.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Preorder ι\ninst✝³ : DenselyOrdered ι\ninst✝² : ∀ (i : ι), Nonempty (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\nk : ι\nhi : i < k\nhj : k < j\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nobtain ⟨c⟩ : Nonempty (α k) := inferInstance\n[GOAL]\ncase mk.mk.left.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Preorder ι\ninst✝³ : DenselyOrdered ι\ninst✝² : ∀ (i : ι), Nonempty (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\nk : ι\nhi : i < k\nhj : k < j\nc : α k\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nexact ⟨⟨k, c⟩, left _ _ hi, left _ _ hj⟩\n[GOAL]\ncase mk.mk.right\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Preorder ι\ninst✝³ : DenselyOrdered ι\ninst✝² : ∀ (i : ι), Nonempty (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\ni : ι\na b : α i\nh : a < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nobtain ⟨c, ha, hb⟩ := exists_between h\n[GOAL]\ncase mk.mk.right.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Preorder ι\ninst✝³ : DenselyOrdered ι\ninst✝² : ∀ (i : ι), Nonempty (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\ni : ι\na b : α i\nh : a < b\nc : α i\nha : a < c\nhb : c < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nexact ⟨⟨i, c⟩, right _ _ ha, right _ _ hb⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\n⊢ ∀ (a₁ a₂ : Σₗ (i : ι), α i), a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂\n[PROOFSTEP]\nrintro ⟨i, a⟩ ⟨j, b⟩ (⟨_, _, h⟩ | ⟨_, b, h⟩)\n[GOAL]\ncase mk.mk.left\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nobtain ⟨c, ha⟩ := exists_gt a\n[GOAL]\ncase mk.mk.left.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\nc : α i\nha : a < c\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nexact ⟨⟨i, c⟩, right _ _ ha, left _ _ h⟩\n[GOAL]\ncase mk.mk.right\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\ni : ι\na b : α i\nh : a < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nobtain ⟨c, ha, hb⟩ := exists_between h\n[GOAL]\ncase mk.mk.right.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\ni : ι\na b : α i\nh : a < b\nc : α i\nha : a < c\nhb : c < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nexact ⟨⟨i, c⟩, right _ _ ha, right _ _ hb⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\n⊢ ∀ (a₁ a₂ : Σₗ (i : ι), α i), a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂\n[PROOFSTEP]\nrintro ⟨i, a⟩ ⟨j, b⟩ (⟨_, _, h⟩ | ⟨_, b, h⟩)\n[GOAL]\ncase mk.mk.left\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nobtain ⟨c, hb⟩ := exists_lt b\n[GOAL]\ncase mk.mk.left.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\nc : α j\nhb : c < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nexact ⟨⟨j, c⟩, left _ _ h, right _ _ hb⟩\n[GOAL]\ncase mk.mk.right\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\ni : ι\na b : α i\nh : a < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nobtain ⟨c, ha, hb⟩ := exists_between h\n[GOAL]\ncase mk.mk.right.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\ni : ι\na b : α i\nh : a < b\nc : α i\nha : a < c\nhb : c < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nexact ⟨⟨i, c⟩, right _ _ ha, right _ _ hb⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMaxOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\n⊢ ∀ (a : Σₗ (i : ι), α i), ∃ b, a < b\n[PROOFSTEP]\nrintro ⟨i, a⟩\n[GOAL]\ncase mk\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMaxOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\ni : ι\na : α i\n⊢ ∃ b, { fst := i, snd := a } < b\n[PROOFSTEP]\nobtain ⟨j, h⟩ := exists_gt i\n[GOAL]\ncase mk.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMaxOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\ni : ι\na : α i\nj : ι\nh : i < j\n⊢ ∃ b, { fst := i, snd := a } < b\n[PROOFSTEP]\nobtain ⟨b⟩ : Nonempty (α j) := inferInstance\n[GOAL]\ncase mk.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMaxOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\ni : ι\na : α i\nj : ι\nh : i < j\nb : α j\n⊢ ∃ b, { fst := i, snd := a } < b\n[PROOFSTEP]\nexact ⟨⟨j, b⟩, left _ _ h⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMinOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\n⊢ ∀ (a : Σₗ (i : ι), α i), ∃ b, b < a\n[PROOFSTEP]\nrintro ⟨i, a⟩\n[GOAL]\ncase mk\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMinOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\ni : ι\na : α i\n⊢ ∃ b, b < { fst := i, snd := a }\n[PROOFSTEP]\nobtain ⟨j, h⟩ := exists_lt i\n[GOAL]\ncase mk.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMinOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\ni : ι\na : α i\nj : ι\nh : j < i\n⊢ ∃ b, b < { fst := i, snd := a }\n[PROOFSTEP]\nobtain ⟨b⟩ : Nonempty (α j) := inferInstance\n[GOAL]\ncase mk.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMinOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\ni : ι\na : α i\nj : ι\nh : j < i\nb : α j\n⊢ ∃ b, b < { fst := i, snd := a }\n[PROOFSTEP]\nexact ⟨⟨j, b⟩, left _ _ h⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Preorder ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\n⊢ ∀ (a : Σₗ (i : ι), α i), ∃ b, a < b\n[PROOFSTEP]\nrintro ⟨i, a⟩\n[GOAL]\ncase mk\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Preorder ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\ni : ι\na : α i\n⊢ ∃ b, { fst := i, snd := a } < b\n[PROOFSTEP]\nobtain ⟨b, h⟩ := exists_gt a\n[GOAL]\ncase mk.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Preorder ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\ni : ι\na b : α i\nh : a < b\n⊢ ∃ b, { fst := i, snd := a } < b\n[PROOFSTEP]\nexact ⟨⟨i, b⟩, right _ _ h⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Preorder ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\n⊢ ∀ (a : Σₗ (i : ι), α i), ∃ b, b < a\n[PROOFSTEP]\nrintro ⟨i, a⟩\n[GOAL]\ncase mk\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Preorder ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\ni : ι\na : α i\n⊢ ∃ b, b < { fst := i, snd := a }\n[PROOFSTEP]\nobtain ⟨b, h⟩ := exists_lt a\n[GOAL]\ncase mk.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Preorder ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\ni : ι\na b : α i\nh : b < a\n⊢ ∃ b, b < { fst := i, snd := a }\n[PROOFSTEP]\nexact ⟨⟨i, b⟩, right _ _ h⟩\n", "meta": {"mathlib_filename": "Mathlib.Data.Sigma.Order", "llama_tokens": 11980, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.734119526900183, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.3956781069783796}}
{"text": "[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf g : Filtration ι m\nh : ↑f = ↑g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ng : Filtration ι m\nseq✝ : ι → MeasurableSpace Ω\nmono'✝ : Monotone seq✝\nle'✝ : ∀ (i : ι), seq✝ i ≤ m\nh : ↑{ seq := seq✝, mono' := mono'✝, le' := le'✝ } = ↑g\n⊢ { seq := seq✝, mono' := mono'✝, le' := le'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nseq✝¹ : ι → MeasurableSpace Ω\nmono'✝¹ : Monotone seq✝¹\nle'✝¹ : ∀ (i : ι), seq✝¹ i ≤ m\nseq✝ : ι → MeasurableSpace Ω\nmono'✝ : Monotone seq✝\nle'✝ : ∀ (i : ι), seq✝ i ≤ m\nh : ↑{ seq := seq✝¹, mono' := mono'✝¹, le' := le'✝¹ } = ↑{ seq := seq✝, mono' := mono'✝, le' := le'✝ }\n⊢ { seq := seq✝¹, mono' := mono'✝¹, le' := le'✝¹ } = { seq := seq✝, mono' := mono'✝, le' := le'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\n⊢ (fun i => sSup ((fun f => ↑f i) '' s)) i ≤ (fun i => sSup ((fun f => ↑f i) '' s)) j\n[PROOFSTEP]\nrefine' sSup_le fun m' hm' => _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nm' : MeasurableSpace Ω\nhm' : m' ∈ (fun f => ↑f i) '' s\n⊢ m' ≤ (fun i => sSup ((fun f => ↑f i) '' s)) j\n[PROOFSTEP]\nrw [Set.mem_image] at hm' \n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nm' : MeasurableSpace Ω\nhm' : ∃ x, x ∈ s ∧ ↑x i = m'\n⊢ m' ≤ (fun i => sSup ((fun f => ↑f i) '' s)) j\n[PROOFSTEP]\nobtain ⟨f, hf_mem, hfm'⟩ := hm'\n[GOAL]\ncase intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nm' : MeasurableSpace Ω\nf : Filtration ι m\nhf_mem : f ∈ s\nhfm' : ↑f i = m'\n⊢ m' ≤ (fun i => sSup ((fun f => ↑f i) '' s)) j\n[PROOFSTEP]\nrw [← hfm']\n[GOAL]\ncase intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nm' : MeasurableSpace Ω\nf : Filtration ι m\nhf_mem : f ∈ s\nhfm' : ↑f i = m'\n⊢ ↑f i ≤ (fun i => sSup ((fun f => ↑f i) '' s)) j\n[PROOFSTEP]\nrefine' (f.mono hij).trans _\n[GOAL]\ncase intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nm' : MeasurableSpace Ω\nf : Filtration ι m\nhf_mem : f ∈ s\nhfm' : ↑f i = m'\n⊢ ↑f j ≤ (fun i => sSup ((fun f => ↑f i) '' s)) j\n[PROOFSTEP]\nhave hfj_mem : f j ∈ (fun g : Filtration ι m => g j) '' s := ⟨f, hf_mem, rfl⟩\n[GOAL]\ncase intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nm' : MeasurableSpace Ω\nf : Filtration ι m\nhf_mem : f ∈ s\nhfm' : ↑f i = m'\nhfj_mem : ↑f j ∈ (fun g => ↑g j) '' s\n⊢ ↑f j ≤ (fun i => sSup ((fun f => ↑f i) '' s)) j\n[PROOFSTEP]\nexact le_sSup hfj_mem\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni : ι\n⊢ (fun i => sSup ((fun f => ↑f i) '' s)) i ≤ m\n[PROOFSTEP]\nrefine' sSup_le fun m' hm' => _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni : ι\nm' : MeasurableSpace Ω\nhm' : m' ∈ (fun f => ↑f i) '' s\n⊢ m' ≤ m\n[PROOFSTEP]\nrw [Set.mem_image] at hm' \n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni : ι\nm' : MeasurableSpace Ω\nhm' : ∃ x, x ∈ s ∧ ↑x i = m'\n⊢ m' ≤ m\n[PROOFSTEP]\nobtain ⟨f, _, hfm'⟩ := hm'\n[GOAL]\ncase intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni : ι\nm' : MeasurableSpace Ω\nf : Filtration ι m\nleft✝ : f ∈ s\nhfm' : ↑f i = m'\n⊢ m' ≤ m\n[PROOFSTEP]\nrw [← hfm']\n[GOAL]\ncase intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni : ι\nm' : MeasurableSpace Ω\nf : Filtration ι m\nleft✝ : f ∈ s\nhfm' : ↑f i = m'\n⊢ ↑f i ≤ m\n[PROOFSTEP]\nexact f.le i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\n⊢ (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) i ≤\n    (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) j\n[PROOFSTEP]\nby_cases h_nonempty : Set.Nonempty s\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nh_nonempty : Set.Nonempty s\n⊢ (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) i ≤\n    (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) j\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nh_nonempty : ¬Set.Nonempty s\n⊢ (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) i ≤\n    (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) j\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nh_nonempty : ¬Set.Nonempty s\n⊢ (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) i ≤\n    (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) j\n[PROOFSTEP]\nsimp only [h_nonempty, Set.nonempty_image_iff, if_false, le_refl]\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nh_nonempty : Set.Nonempty s\n⊢ (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) i ≤\n    (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) j\n[PROOFSTEP]\nsimp only [h_nonempty, if_true, le_sInf_iff, Set.mem_image, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂]\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nh_nonempty : Set.Nonempty s\n⊢ ∀ (a : Filtration ι m), a ∈ s → sInf ((fun f => ↑f i) '' s) ≤ ↑a j\n[PROOFSTEP]\nrefine' fun f hf_mem => le_trans _ (f.mono hij)\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nh_nonempty : Set.Nonempty s\nf : Filtration ι m\nhf_mem : f ∈ s\n⊢ sInf ((fun f => ↑f i) '' s) ≤ ↑f i\n[PROOFSTEP]\nhave hfi_mem : f i ∈ (fun g : Filtration ι m => g i) '' s := ⟨f, hf_mem, rfl⟩\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni j : ι\nhij : i ≤ j\nh_nonempty : Set.Nonempty s\nf : Filtration ι m\nhf_mem : f ∈ s\nhfi_mem : ↑f i ∈ (fun g => ↑g i) '' s\n⊢ sInf ((fun f => ↑f i) '' s) ≤ ↑f i\n[PROOFSTEP]\nexact sInf_le hfi_mem\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni : ι\n⊢ (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) i ≤ m\n[PROOFSTEP]\nby_cases h_nonempty : Set.Nonempty s\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni : ι\nh_nonempty : Set.Nonempty s\n⊢ (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) i ≤ m\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni : ι\nh_nonempty : ¬Set.Nonempty s\n⊢ (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) i ≤ m\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni : ι\nh_nonempty : ¬Set.Nonempty s\n⊢ (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) i ≤ m\n[PROOFSTEP]\nsimp only [h_nonempty, if_false, le_refl]\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni : ι\nh_nonempty : Set.Nonempty s\n⊢ (fun i => if Set.Nonempty s then sInf ((fun f => ↑f i) '' s) else m) i ≤ m\n[PROOFSTEP]\nsimp only [h_nonempty, if_true]\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni : ι\nh_nonempty : Set.Nonempty s\n⊢ sInf ((fun f => ↑f i) '' s) ≤ m\n[PROOFSTEP]\nobtain ⟨f, hf_mem⟩ := h_nonempty\n[GOAL]\ncase pos.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\ni : ι\nf : Filtration ι m\nhf_mem : f ∈ s\n⊢ sInf ((fun f => ↑f i) '' s) ≤ m\n[PROOFSTEP]\nexact le_trans (sInf_le ⟨f, hf_mem, rfl⟩) (f.le i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nh_forall : ∀ (b : Filtration ι m), b ∈ s → b ≤ f\ni : ι\nm' : MeasurableSpace Ω\nhm' : m' ∈ (fun f => ↑f i) '' s\n⊢ m' ≤ ↑f i\n[PROOFSTEP]\nobtain ⟨g, hg_mem, hfm'⟩ := hm'\n[GOAL]\ncase intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nh_forall : ∀ (b : Filtration ι m), b ∈ s → b ≤ f\ni : ι\nm' : MeasurableSpace Ω\ng : Filtration ι m\nhg_mem : g ∈ s\nhfm' : (fun f => ↑f i) g = m'\n⊢ m' ≤ ↑f i\n[PROOFSTEP]\nrw [← hfm']\n[GOAL]\ncase intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nh_forall : ∀ (b : Filtration ι m), b ∈ s → b ≤ f\ni : ι\nm' : MeasurableSpace Ω\ng : Filtration ι m\nhg_mem : g ∈ s\nhfm' : (fun f => ↑f i) g = m'\n⊢ (fun f => ↑f i) g ≤ ↑f i\n[PROOFSTEP]\nexact h_forall g hg_mem i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nhf_mem : f ∈ s\ni : ι\n⊢ ↑(sInf s) i ≤ ↑f i\n[PROOFSTEP]\nhave hs : s.Nonempty := ⟨f, hf_mem⟩\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nhf_mem : f ∈ s\ni : ι\nhs : Set.Nonempty s\n⊢ ↑(sInf s) i ≤ ↑f i\n[PROOFSTEP]\nsimp only [sInf_def, hs, if_true]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nhf_mem : f ∈ s\ni : ι\nhs : Set.Nonempty s\n⊢ sInf ((fun f => ↑f i) '' s) ≤ ↑f i\n[PROOFSTEP]\nexact sInf_le ⟨f, hf_mem, rfl⟩\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nh_forall : ∀ (b : Filtration ι m), b ∈ s → f ≤ b\ni : ι\n⊢ ↑f i ≤ ↑(sInf s) i\n[PROOFSTEP]\nby_cases hs : s.Nonempty\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nh_forall : ∀ (b : Filtration ι m), b ∈ s → f ≤ b\ni : ι\nhs : Set.Nonempty s\n⊢ ↑f i ≤ ↑(sInf s) i\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nh_forall : ∀ (b : Filtration ι m), b ∈ s → f ≤ b\ni : ι\nhs : ¬Set.Nonempty s\n⊢ ↑f i ≤ ↑(sInf s) i\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nh_forall : ∀ (b : Filtration ι m), b ∈ s → f ≤ b\ni : ι\nhs : ¬Set.Nonempty s\n⊢ ↑f i ≤ ↑(sInf s) i\n[PROOFSTEP]\nsimp only [sInf_def, hs, if_false]\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nh_forall : ∀ (b : Filtration ι m), b ∈ s → f ≤ b\ni : ι\nhs : ¬Set.Nonempty s\n⊢ ↑f i ≤ m\n[PROOFSTEP]\nexact f.le i\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nh_forall : ∀ (b : Filtration ι m), b ∈ s → f ≤ b\ni : ι\nhs : Set.Nonempty s\n⊢ ↑f i ≤ ↑(sInf s) i\n[PROOFSTEP]\nsimp only [sInf_def, hs, if_true, le_sInf_iff, Set.mem_image, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂]\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\ns : Set (Filtration ι m)\nf : Filtration ι m\nh_forall : ∀ (b : Filtration ι m), b ∈ s → f ≤ b\ni : ι\nhs : Set.Nonempty s\n⊢ ∀ (a : Filtration ι m), a ∈ s → ↑f i ≤ ↑a i\n[PROOFSTEP]\nexact fun g hg_mem => h_forall g hg_mem i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nμ : Measure Ω\nf : Filtration ι m\ninst✝ : IsFiniteMeasure μ\nn : ι\n⊢ SigmaFinite (Measure.trim μ (_ : ↑f n ≤ m))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : TopologicalSpace β\ninst✝² : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝¹ : BorelSpace β\ninst✝ : Preorder ι\nu : ι → Ω → β\nhum : ∀ (i : ι), StronglyMeasurable (u i)\ni : ι\n⊢ (fun i => ⨆ (j : ι) (_ : j ≤ i), MeasurableSpace.comap (u j) mβ) i ≤ m\n[PROOFSTEP]\nrefine' iSup₂_le _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : TopologicalSpace β\ninst✝² : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝¹ : BorelSpace β\ninst✝ : Preorder ι\nu : ι → Ω → β\nhum : ∀ (i : ι), StronglyMeasurable (u i)\ni : ι\n⊢ ∀ (i_1 : ι), i_1 ≤ i → MeasurableSpace.comap (u i_1) mβ ≤ m\n[PROOFSTEP]\nrintro j _ s ⟨t, ht, rfl⟩\n[GOAL]\ncase intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : TopologicalSpace β\ninst✝² : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝¹ : BorelSpace β\ninst✝ : Preorder ι\nu : ι → Ω → β\nhum : ∀ (i : ι), StronglyMeasurable (u i)\ni j : ι\nj✝ : j ≤ i\nt : Set β\nht : MeasurableSet t\n⊢ MeasurableSet (u j ⁻¹' t)\n[PROOFSTEP]\nexact (hum j).measurable ht\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\n⊢ filtrationOfSet hsm =\n    natural (fun i => Set.indicator (s i) fun x => 1) (_ : ∀ (i : ι), StronglyMeasurable (Set.indicator (s i) 1))\n[PROOFSTEP]\nsimp [natural, filtrationOfSet, measurableSpace_iSup_eq]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\n⊢ (fun i => MeasurableSpace.generateFrom {t | ∃ j, j ≤ i ∧ s j = t}) = fun i =>\n    MeasurableSpace.generateFrom {s_1 | ∃ n, MeasurableSet s_1}\n[PROOFSTEP]\next1 i\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\n⊢ MeasurableSpace.generateFrom {t | ∃ j, j ≤ i ∧ s j = t} = MeasurableSpace.generateFrom {s_1 | ∃ n, MeasurableSet s_1}\n[PROOFSTEP]\nrefine' le_antisymm (generateFrom_le _) (generateFrom_le _)\n[GOAL]\ncase h.refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\n⊢ ∀ (t : Set Ω), t ∈ {t | ∃ j, j ≤ i ∧ s j = t} → MeasurableSet t\n[PROOFSTEP]\nrintro _ ⟨j, hij, rfl⟩\n[GOAL]\ncase h.refine'_1.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni j : ι\nhij : j ≤ i\n⊢ MeasurableSet (s j)\n[PROOFSTEP]\nrefine' measurableSet_generateFrom ⟨j, measurableSet_generateFrom ⟨hij, _⟩⟩\n[GOAL]\ncase h.refine'_1.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni j : ι\nhij : j ≤ i\n⊢ MeasurableSet (s j)\n[PROOFSTEP]\nrw [comap_eq_generateFrom]\n[GOAL]\ncase h.refine'_1.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni j : ι\nhij : j ≤ i\n⊢ MeasurableSet (s j)\n[PROOFSTEP]\nrefine' measurableSet_generateFrom ⟨{1}, measurableSet_singleton 1, _⟩\n[GOAL]\ncase h.refine'_1.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni j : ι\nhij : j ≤ i\n⊢ (Set.indicator (s j) fun x => 1) ⁻¹' {1} = s j\n[PROOFSTEP]\next x\n[GOAL]\ncase h.refine'_1.intro.intro.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni j : ι\nhij : j ≤ i\nx : Ω\n⊢ x ∈ (Set.indicator (s j) fun x => 1) ⁻¹' {1} ↔ x ∈ s j\n[PROOFSTEP]\nsimp [Set.indicator_const_preimage_eq_union]\n[GOAL]\ncase h.refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\n⊢ ∀ (t : Set Ω), t ∈ {s_1 | ∃ n, MeasurableSet s_1} → MeasurableSet t\n[PROOFSTEP]\nrintro t ⟨n, ht⟩\n[GOAL]\ncase h.refine'_2.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt : Set Ω\nn : ι\nht : MeasurableSet t\n⊢ MeasurableSet t\n[PROOFSTEP]\nsuffices\n  MeasurableSpace.generateFrom\n      {t | n ≤ i ∧ MeasurableSet[MeasurableSpace.comap ((s n).indicator (fun _ => 1 : Ω → β)) mβ] t} ≤\n    MeasurableSpace.generateFrom {t | ∃ (j : ι), j ≤ i ∧ s j = t}\n  by exact this _ ht\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt : Set Ω\nn : ι\nht : MeasurableSet t\nthis :\n  MeasurableSpace.generateFrom {t | n ≤ i ∧ MeasurableSet t} ≤ MeasurableSpace.generateFrom {t | ∃ j, j ≤ i ∧ s j = t}\n⊢ MeasurableSet t\n[PROOFSTEP]\nexact this _ ht\n[GOAL]\ncase h.refine'_2.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt : Set Ω\nn : ι\nht : MeasurableSet t\n⊢ MeasurableSpace.generateFrom {t | n ≤ i ∧ MeasurableSet t} ≤ MeasurableSpace.generateFrom {t | ∃ j, j ≤ i ∧ s j = t}\n[PROOFSTEP]\nrefine' generateFrom_le _\n[GOAL]\ncase h.refine'_2.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt : Set Ω\nn : ι\nht : MeasurableSet t\n⊢ ∀ (t : Set Ω), t ∈ {t | n ≤ i ∧ MeasurableSet t} → MeasurableSet t\n[PROOFSTEP]\nrintro t ⟨hn, u, _, hu'⟩\n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\n⊢ MeasurableSet t\n[PROOFSTEP]\nobtain heq | heq | heq | heq := Set.indicator_const_preimage (s n) u (1 : β)\n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = Set.univ\n⊢ MeasurableSet t\ncase h.refine'_2.intro.intro.intro.intro.inr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = s n\n⊢ MeasurableSet t\ncase h.refine'_2.intro.intro.intro.intro.inr.inr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = (s n)ᶜ\n⊢ MeasurableSet t\ncase h.refine'_2.intro.intro.intro.intro.inr.inr.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u ∈ {∅}\n⊢ MeasurableSet t\n[PROOFSTEP]\npick_goal 4\n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro.inr.inr.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u ∈ {∅}\n⊢ MeasurableSet t\ncase h.refine'_2.intro.intro.intro.intro.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = Set.univ\n⊢ MeasurableSet t\ncase h.refine'_2.intro.intro.intro.intro.inr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = s n\n⊢ MeasurableSet t\ncase h.refine'_2.intro.intro.intro.intro.inr.inr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = (s n)ᶜ\n⊢ MeasurableSet t\n[PROOFSTEP]\nrw [Set.mem_singleton_iff] at heq \n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro.inr.inr.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = ∅\n⊢ MeasurableSet t\ncase h.refine'_2.intro.intro.intro.intro.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = Set.univ\n⊢ MeasurableSet t\ncase h.refine'_2.intro.intro.intro.intro.inr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = s n\n⊢ MeasurableSet t\ncase h.refine'_2.intro.intro.intro.intro.inr.inr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = (s n)ᶜ\n⊢ MeasurableSet t\n[PROOFSTEP]\nall_goals rw [heq] at hu' ; rw [← hu']\n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro.inr.inr.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = ∅\n⊢ MeasurableSet t\n[PROOFSTEP]\nrw [heq] at hu' \n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro.inr.inr.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : ∅ = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = ∅\n⊢ MeasurableSet t\n[PROOFSTEP]\nrw [← hu']\n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = Set.univ\n⊢ MeasurableSet t\n[PROOFSTEP]\nrw [heq] at hu' \n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : Set.univ = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = Set.univ\n⊢ MeasurableSet t\n[PROOFSTEP]\nrw [← hu']\n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro.inr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = s n\n⊢ MeasurableSet t\n[PROOFSTEP]\nrw [heq] at hu' \n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro.inr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : s n = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = s n\n⊢ MeasurableSet t\n[PROOFSTEP]\nrw [← hu']\n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro.inr.inr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (Set.indicator (s n) fun x => 1) ⁻¹' u = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = (s n)ᶜ\n⊢ MeasurableSet t\n[PROOFSTEP]\nrw [heq] at hu' \n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro.inr.inr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (s n)ᶜ = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = (s n)ᶜ\n⊢ MeasurableSet t\n[PROOFSTEP]\nrw [← hu']\n[GOAL]\ncase h.refine'_2.intro.intro.intro.intro.inr.inr.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : ∅ = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = ∅\n⊢ MeasurableSet ∅\ncase h.refine'_2.intro.intro.intro.intro.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : Set.univ = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = Set.univ\n⊢ MeasurableSet Set.univ\ncase h.refine'_2.intro.intro.intro.intro.inr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : s n = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = s n\n⊢ MeasurableSet (s n)\ncase h.refine'_2.intro.intro.intro.intro.inr.inr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\ninst✝¹ : MulZeroOneClass β\ninst✝ : Nontrivial β\ns : ι → Set Ω\nhsm : ∀ (i : ι), MeasurableSet (s i)\ni : ι\nt✝ : Set Ω\nn : ι\nht : MeasurableSet t✝\nt : Set Ω\nhn : n ≤ i\nu : Set β\nleft✝ : MeasurableSet u\nhu' : (s n)ᶜ = t\nheq : (Set.indicator (s n) fun x => 1) ⁻¹' u = (s n)ᶜ\n⊢ MeasurableSet (s n)ᶜ\n[PROOFSTEP]\nexacts [measurableSet_empty _, MeasurableSet.univ, measurableSet_generateFrom ⟨n, hn, rfl⟩,\n  MeasurableSet.compl (measurableSet_generateFrom ⟨n, hn, rfl⟩)]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\nE : Type u_4\ninst✝¹ : Zero E\ninst✝ : TopologicalSpace E\nℱ : Filtration ι m\nf : ι → Ω → E\nμ : Measure Ω\n⊢ StronglyMeasurable (limitProcess f ℱ μ)\n[PROOFSTEP]\nrw [limitProcess]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\nE : Type u_4\ninst✝¹ : Zero E\ninst✝ : TopologicalSpace E\nℱ : Filtration ι m\nf : ι → Ω → E\nμ : Measure Ω\n⊢ StronglyMeasurable\n    (if h : ∃ g, StronglyMeasurable g ∧ ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun n => f n ω) atTop (𝓝 (g ω)) then Classical.choose h\n    else 0)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\nE : Type u_4\ninst✝¹ : Zero E\ninst✝ : TopologicalSpace E\nℱ : Filtration ι m\nf : ι → Ω → E\nμ : Measure Ω\nh : ∃ g, StronglyMeasurable g ∧ ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun n => f n ω) atTop (𝓝 (g ω))\n⊢ StronglyMeasurable (Classical.choose h)\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : Preorder ι\nE : Type u_4\ninst✝¹ : Zero E\ninst✝ : TopologicalSpace E\nℱ : Filtration ι m\nf : ι → Ω → E\nμ : Measure Ω\nh : ¬∃ g, StronglyMeasurable g ∧ ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun n => f n ω) atTop (𝓝 (g ω))\n⊢ StronglyMeasurable 0\n[PROOFSTEP]\nexacts [(Classical.choose_spec h).1, stronglyMeasurable_zero]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝⁴ : BorelSpace β\ninst✝³ : Preorder ι\nE : Type u_4\ninst✝² : Zero E\ninst✝¹ : TopologicalSpace E\nℱ✝ : Filtration ι m\nf✝ : ι → Ω → E\nμ : Measure Ω\nR : ℝ≥0\np : ℝ≥0∞\nF : Type u_5\ninst✝ : NormedAddCommGroup F\nℱ : Filtration ℕ m\nf : ℕ → Ω → F\nhfm : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhbdd : ∀ (n : ℕ), snorm (f n) p μ ≤ ↑R\n⊢ Memℒp (limitProcess f ℱ μ) p\n[PROOFSTEP]\nrw [limitProcess]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝⁴ : BorelSpace β\ninst✝³ : Preorder ι\nE : Type u_4\ninst✝² : Zero E\ninst✝¹ : TopologicalSpace E\nℱ✝ : Filtration ι m\nf✝ : ι → Ω → E\nμ : Measure Ω\nR : ℝ≥0\np : ℝ≥0∞\nF : Type u_5\ninst✝ : NormedAddCommGroup F\nℱ : Filtration ℕ m\nf : ℕ → Ω → F\nhfm : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhbdd : ∀ (n : ℕ), snorm (f n) p μ ≤ ↑R\n⊢ Memℒp\n    (if h : ∃ g, StronglyMeasurable g ∧ ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun n => f n ω) atTop (𝓝 (g ω)) then Classical.choose h\n    else 0)\n    p\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝⁴ : BorelSpace β\ninst✝³ : Preorder ι\nE : Type u_4\ninst✝² : Zero E\ninst✝¹ : TopologicalSpace E\nℱ✝ : Filtration ι m\nf✝ : ι → Ω → E\nμ : Measure Ω\nR : ℝ≥0\np : ℝ≥0∞\nF : Type u_5\ninst✝ : NormedAddCommGroup F\nℱ : Filtration ℕ m\nf : ℕ → Ω → F\nhfm : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhbdd : ∀ (n : ℕ), snorm (f n) p μ ≤ ↑R\nh : ∃ g, StronglyMeasurable g ∧ ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun n => f n ω) atTop (𝓝 (g ω))\n⊢ Memℒp (Classical.choose h) p\n[PROOFSTEP]\nrefine'\n  ⟨StronglyMeasurable.aestronglyMeasurable ((Classical.choose_spec h).1.mono (sSup_le fun m ⟨n, hn⟩ => hn ▸ ℱ.le _)),\n    lt_of_le_of_lt (Lp.snorm_lim_le_liminf_snorm hfm _ (Classical.choose_spec h).2)\n      (lt_of_le_of_lt _ (ENNReal.coe_lt_top : ↑R < ∞))⟩\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝⁴ : BorelSpace β\ninst✝³ : Preorder ι\nE : Type u_4\ninst✝² : Zero E\ninst✝¹ : TopologicalSpace E\nℱ✝ : Filtration ι m\nf✝ : ι → Ω → E\nμ : Measure Ω\nR : ℝ≥0\np : ℝ≥0∞\nF : Type u_5\ninst✝ : NormedAddCommGroup F\nℱ : Filtration ℕ m\nf : ℕ → Ω → F\nhfm : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhbdd : ∀ (n : ℕ), snorm (f n) p μ ≤ ↑R\nh : ∃ g, StronglyMeasurable g ∧ ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun n => f n ω) atTop (𝓝 (g ω))\n⊢ liminf (fun n => snorm (f n) p μ) atTop ≤ ↑R\n[PROOFSTEP]\nsimp_rw [liminf_eq, eventually_atTop]\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝⁴ : BorelSpace β\ninst✝³ : Preorder ι\nE : Type u_4\ninst✝² : Zero E\ninst✝¹ : TopologicalSpace E\nℱ✝ : Filtration ι m\nf✝ : ι → Ω → E\nμ : Measure Ω\nR : ℝ≥0\np : ℝ≥0∞\nF : Type u_5\ninst✝ : NormedAddCommGroup F\nℱ : Filtration ℕ m\nf : ℕ → Ω → F\nhfm : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhbdd : ∀ (n : ℕ), snorm (f n) p μ ≤ ↑R\nh : ∃ g, StronglyMeasurable g ∧ ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun n => f n ω) atTop (𝓝 (g ω))\n⊢ sSup {a | ∃ a_1, ∀ (b : ℕ), b ≥ a_1 → a ≤ snorm (f b) p μ} ≤ ↑R\n[PROOFSTEP]\nexact sSup_le fun b ⟨a, ha⟩ => (ha a le_rfl).trans (hbdd _)\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : MetrizableSpace β\nmβ : MeasurableSpace β\ninst✝⁴ : BorelSpace β\ninst✝³ : Preorder ι\nE : Type u_4\ninst✝² : Zero E\ninst✝¹ : TopologicalSpace E\nℱ✝ : Filtration ι m\nf✝ : ι → Ω → E\nμ : Measure Ω\nR : ℝ≥0\np : ℝ≥0∞\nF : Type u_5\ninst✝ : NormedAddCommGroup F\nℱ : Filtration ℕ m\nf : ℕ → Ω → F\nhfm : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhbdd : ∀ (n : ℕ), snorm (f n) p μ ≤ ↑R\nh : ¬∃ g, StronglyMeasurable g ∧ ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun n => f n ω) atTop (𝓝 (g ω))\n⊢ Memℒp 0 p\n[PROOFSTEP]\nexact zero_memℒp\n", "meta": {"mathlib_filename": "Mathlib.Probability.Process.Filtration", "llama_tokens": 20816, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7185944046238981, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3956633720183291}}
{"text": "[GOAL]\nα : Type u_1\np : Set α → Prop\ns₀ : Set α\nhp : p s₀\nt : Set α\ninst✝ : HasCountableSeparatingOn α p t\n⊢ ∃ S, (∀ (n : ℕ), p (S n)) ∧ ∀ (x : α), x ∈ t → ∀ (y : α), y ∈ t → (∀ (n : ℕ), x ∈ S n ↔ y ∈ S n) → x = y\n[PROOFSTEP]\nrcases exists_nonempty_countable_separating α hp t with ⟨S, hSne, hSc, hS⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\np : Set α → Prop\ns₀ : Set α\nhp : p s₀\nt : Set α\ninst✝ : HasCountableSeparatingOn α p t\nS : Set (Set α)\nhSne : Set.Nonempty S\nhSc : Set.Countable S\nhS :\n  (∀ (s : Set α), s ∈ S → p s) ∧ ∀ (x : α), x ∈ t → ∀ (y : α), y ∈ t → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\n⊢ ∃ S, (∀ (n : ℕ), p (S n)) ∧ ∀ (x : α), x ∈ t → ∀ (y : α), y ∈ t → (∀ (n : ℕ), x ∈ S n ↔ y ∈ S n) → x = y\n[PROOFSTEP]\nrcases hSc.exists_eq_range hSne with ⟨S, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\np : Set α → Prop\ns₀ : Set α\nhp : p s₀\nt : Set α\ninst✝ : HasCountableSeparatingOn α p t\nS : ℕ → Set α\nhSne : Set.Nonempty (range S)\nhSc : Set.Countable (range S)\nhS :\n  (∀ (s : Set α), s ∈ range S → p s) ∧\n    ∀ (x : α), x ∈ t → ∀ (y : α), y ∈ t → (∀ (s : Set α), s ∈ range S → (x ∈ s ↔ y ∈ s)) → x = y\n⊢ ∃ S, (∀ (n : ℕ), p (S n)) ∧ ∀ (x : α), x ∈ t → ∀ (y : α), y ∈ t → (∀ (n : ℕ), x ∈ S n ↔ y ∈ S n) → x = y\n[PROOFSTEP]\nuse S\n[GOAL]\ncase h\nα : Type u_1\np : Set α → Prop\ns₀ : Set α\nhp : p s₀\nt : Set α\ninst✝ : HasCountableSeparatingOn α p t\nS : ℕ → Set α\nhSne : Set.Nonempty (range S)\nhSc : Set.Countable (range S)\nhS :\n  (∀ (s : Set α), s ∈ range S → p s) ∧\n    ∀ (x : α), x ∈ t → ∀ (y : α), y ∈ t → (∀ (s : Set α), s ∈ range S → (x ∈ s ↔ y ∈ s)) → x = y\n⊢ (∀ (n : ℕ), p (S n)) ∧ ∀ (x : α), x ∈ t → ∀ (y : α), y ∈ t → (∀ (n : ℕ), x ∈ S n ↔ y ∈ S n) → x = y\n[PROOFSTEP]\nsimpa only [forall_range_iff] using hS\n[GOAL]\nα : Type u_1\np : Set α → Prop\nt : Set α\nq : Set ↑t → Prop\nh : HasCountableSeparatingOn (↑t) q univ\nhpq : ∀ (U : Set ↑t), q U → ∃ V, p V ∧ Subtype.val ⁻¹' V = U\n⊢ HasCountableSeparatingOn α p t\n[PROOFSTEP]\nrcases h.1 with ⟨S, hSc, hSq, hS⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\np : Set α → Prop\nt : Set α\nq : Set ↑t → Prop\nh : HasCountableSeparatingOn (↑t) q univ\nhpq : ∀ (U : Set ↑t), q U → ∃ V, p V ∧ Subtype.val ⁻¹' V = U\nS : Set (Set ↑t)\nhSc : Set.Countable S\nhSq : ∀ (s : Set ↑t), s ∈ S → q s\nhS : ∀ (x : ↑t), x ∈ univ → ∀ (y : ↑t), y ∈ univ → (∀ (s : Set ↑t), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\n⊢ HasCountableSeparatingOn α p t\n[PROOFSTEP]\nchoose! V hpV hV using fun s hs ↦ hpq s (hSq s hs)\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\np : Set α → Prop\nt : Set α\nq : Set ↑t → Prop\nh : HasCountableSeparatingOn (↑t) q univ\nhpq : ∀ (U : Set ↑t), q U → ∃ V, p V ∧ Subtype.val ⁻¹' V = U\nS : Set (Set ↑t)\nhSc : Set.Countable S\nhSq : ∀ (s : Set ↑t), s ∈ S → q s\nhS : ∀ (x : ↑t), x ∈ univ → ∀ (y : ↑t), y ∈ univ → (∀ (s : Set ↑t), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nV : Set ↑t → Set α\nhpV : ∀ (s : Set ↑t), s ∈ S → p (V s)\nhV : ∀ (s : Set ↑t), s ∈ S → Subtype.val ⁻¹' V s = s\n⊢ HasCountableSeparatingOn α p t\n[PROOFSTEP]\nrefine ⟨⟨V '' S, hSc.image _, ball_image_iff.2 hpV, fun x hx y hy h ↦ ?_⟩⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\np : Set α → Prop\nt : Set α\nq : Set ↑t → Prop\nh✝ : HasCountableSeparatingOn (↑t) q univ\nhpq : ∀ (U : Set ↑t), q U → ∃ V, p V ∧ Subtype.val ⁻¹' V = U\nS : Set (Set ↑t)\nhSc : Set.Countable S\nhSq : ∀ (s : Set ↑t), s ∈ S → q s\nhS : ∀ (x : ↑t), x ∈ univ → ∀ (y : ↑t), y ∈ univ → (∀ (s : Set ↑t), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nV : Set ↑t → Set α\nhpV : ∀ (s : Set ↑t), s ∈ S → p (V s)\nhV : ∀ (s : Set ↑t), s ∈ S → Subtype.val ⁻¹' V s = s\nx : α\nhx : x ∈ t\ny : α\nhy : y ∈ t\nh : ∀ (s : Set α), s ∈ V '' S → (x ∈ s ↔ y ∈ s)\n⊢ x = y\n[PROOFSTEP]\nrefine congr_arg Subtype.val (hS ⟨x, hx⟩ trivial ⟨y, hy⟩ trivial fun U hU ↦ ?_)\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\np : Set α → Prop\nt : Set α\nq : Set ↑t → Prop\nh✝ : HasCountableSeparatingOn (↑t) q univ\nhpq : ∀ (U : Set ↑t), q U → ∃ V, p V ∧ Subtype.val ⁻¹' V = U\nS : Set (Set ↑t)\nhSc : Set.Countable S\nhSq : ∀ (s : Set ↑t), s ∈ S → q s\nhS : ∀ (x : ↑t), x ∈ univ → ∀ (y : ↑t), y ∈ univ → (∀ (s : Set ↑t), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nV : Set ↑t → Set α\nhpV : ∀ (s : Set ↑t), s ∈ S → p (V s)\nhV : ∀ (s : Set ↑t), s ∈ S → Subtype.val ⁻¹' V s = s\nx : α\nhx : x ∈ t\ny : α\nhy : y ∈ t\nh : ∀ (s : Set α), s ∈ V '' S → (x ∈ s ↔ y ∈ s)\nU : Set ↑t\nhU : U ∈ S\n⊢ { val := x, property := hx } ∈ U ↔ { val := y, property := hy } ∈ U\n[PROOFSTEP]\nrw [← hV U hU]\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\np : Set α → Prop\nt : Set α\nq : Set ↑t → Prop\nh✝ : HasCountableSeparatingOn (↑t) q univ\nhpq : ∀ (U : Set ↑t), q U → ∃ V, p V ∧ Subtype.val ⁻¹' V = U\nS : Set (Set ↑t)\nhSc : Set.Countable S\nhSq : ∀ (s : Set ↑t), s ∈ S → q s\nhS : ∀ (x : ↑t), x ∈ univ → ∀ (y : ↑t), y ∈ univ → (∀ (s : Set ↑t), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nV : Set ↑t → Set α\nhpV : ∀ (s : Set ↑t), s ∈ S → p (V s)\nhV : ∀ (s : Set ↑t), s ∈ S → Subtype.val ⁻¹' V s = s\nx : α\nhx : x ∈ t\ny : α\nhy : y ∈ t\nh : ∀ (s : Set α), s ∈ V '' S → (x ∈ s ↔ y ∈ s)\nU : Set ↑t\nhU : U ∈ S\n⊢ { val := x, property := hx } ∈ Subtype.val ⁻¹' V U ↔ { val := y, property := hy } ∈ Subtype.val ⁻¹' V U\n[PROOFSTEP]\nexact h _ (mem_image_of_mem _ hU)\n[GOAL]\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns : Set α\nh : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\n⊢ ∃ t, t ⊆ s ∧ Set.Subsingleton t ∧ t ∈ l\n[PROOFSTEP]\nrcases h.1 with ⟨S, hSc, hSp, hS⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns : Set α\nh : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nS : Set (Set α)\nhSc : Set.Countable S\nhSp : ∀ (s : Set α), s ∈ S → p s\nhS : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\n⊢ ∃ t, t ⊆ s ∧ Set.Subsingleton t ∧ t ∈ l\n[PROOFSTEP]\nrefine ⟨s ∩ ⋂₀ (S ∩ l.sets) ∩ ⋂ (U ∈ S) (_ : Uᶜ ∈ l), Uᶜ, ?_, ?_, ?_⟩\n[GOAL]\ncase intro.intro.intro.refine_1\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns : Set α\nh : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nS : Set (Set α)\nhSc : Set.Countable S\nhSp : ∀ (s : Set α), s ∈ S → p s\nhS : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\n⊢ s ∩ ⋂₀ (S ∩ l.sets) ∩ ⋂ (U : Set α) (_ : U ∈ S) (_ : Uᶜ ∈ l), Uᶜ ⊆ s\n[PROOFSTEP]\nexact fun _ h ↦ h.1.1\n[GOAL]\ncase intro.intro.intro.refine_2\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns : Set α\nh : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nS : Set (Set α)\nhSc : Set.Countable S\nhSp : ∀ (s : Set α), s ∈ S → p s\nhS : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\n⊢ Set.Subsingleton (s ∩ ⋂₀ (S ∩ l.sets) ∩ ⋂ (U : Set α) (_ : U ∈ S) (_ : Uᶜ ∈ l), Uᶜ)\n[PROOFSTEP]\nintro x hx y hy\n[GOAL]\ncase intro.intro.intro.refine_2\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns : Set α\nh : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nS : Set (Set α)\nhSc : Set.Countable S\nhSp : ∀ (s : Set α), s ∈ S → p s\nhS : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nx : α\nhx : x ∈ s ∩ ⋂₀ (S ∩ l.sets) ∩ ⋂ (U : Set α) (_ : U ∈ S) (_ : Uᶜ ∈ l), Uᶜ\ny : α\nhy : y ∈ s ∩ ⋂₀ (S ∩ l.sets) ∩ ⋂ (U : Set α) (_ : U ∈ S) (_ : Uᶜ ∈ l), Uᶜ\n⊢ x = y\n[PROOFSTEP]\nsimp only [mem_sInter, mem_inter_iff, mem_iInter, mem_compl_iff] at hx hy \n[GOAL]\ncase intro.intro.intro.refine_2\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns : Set α\nh : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nS : Set (Set α)\nhSc : Set.Countable S\nhSp : ∀ (s : Set α), s ∈ S → p s\nhS : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nx y : α\nhx : (x ∈ s ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → x ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬x ∈ i\nhy : (y ∈ s ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → y ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬y ∈ i\n⊢ x = y\n[PROOFSTEP]\nrefine hS x hx.1.1 y hy.1.1 (fun s hsS ↦ ?_)\n[GOAL]\ncase intro.intro.intro.refine_2\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns✝ : Set α\nh : HasCountableSeparatingOn α p s✝\nhs : s✝ ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nS : Set (Set α)\nhSc : Set.Countable S\nhSp : ∀ (s : Set α), s ∈ S → p s\nhS : ∀ (x : α), x ∈ s✝ → ∀ (y : α), y ∈ s✝ → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nx y : α\nhx : (x ∈ s✝ ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → x ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬x ∈ i\nhy : (y ∈ s✝ ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → y ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬y ∈ i\ns : Set α\nhsS : s ∈ S\n⊢ x ∈ s ↔ y ∈ s\n[PROOFSTEP]\ncases hl s (hSp s hsS) with\n| inl hsl => simp only [hx.1.2 s ⟨hsS, hsl⟩, hy.1.2 s ⟨hsS, hsl⟩]\n| inr hsl => simp only [hx.2 s hsS hsl, hy.2 s hsS hsl]\n[GOAL]\ncase intro.intro.intro.refine_2\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns✝ : Set α\nh : HasCountableSeparatingOn α p s✝\nhs : s✝ ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nS : Set (Set α)\nhSc : Set.Countable S\nhSp : ∀ (s : Set α), s ∈ S → p s\nhS : ∀ (x : α), x ∈ s✝ → ∀ (y : α), y ∈ s✝ → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nx y : α\nhx : (x ∈ s✝ ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → x ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬x ∈ i\nhy : (y ∈ s✝ ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → y ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬y ∈ i\ns : Set α\nhsS : s ∈ S\nx✝ : s ∈ l ∨ sᶜ ∈ l\n⊢ x ∈ s ↔ y ∈ s\n[PROOFSTEP]\ncases hl s (hSp s hsS) with\n| inl hsl => simp only [hx.1.2 s ⟨hsS, hsl⟩, hy.1.2 s ⟨hsS, hsl⟩]\n| inr hsl => simp only [hx.2 s hsS hsl, hy.2 s hsS hsl]\n[GOAL]\ncase intro.intro.intro.refine_2.inl\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns✝ : Set α\nh : HasCountableSeparatingOn α p s✝\nhs : s✝ ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nS : Set (Set α)\nhSc : Set.Countable S\nhSp : ∀ (s : Set α), s ∈ S → p s\nhS : ∀ (x : α), x ∈ s✝ → ∀ (y : α), y ∈ s✝ → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nx y : α\nhx : (x ∈ s✝ ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → x ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬x ∈ i\nhy : (y ∈ s✝ ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → y ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬y ∈ i\ns : Set α\nhsS : s ∈ S\nhsl : s ∈ l\n⊢ x ∈ s ↔ y ∈ s\n[PROOFSTEP]\n\n| inl hsl => simp only [hx.1.2 s ⟨hsS, hsl⟩, hy.1.2 s ⟨hsS, hsl⟩]\n[GOAL]\ncase intro.intro.intro.refine_2.inl\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns✝ : Set α\nh : HasCountableSeparatingOn α p s✝\nhs : s✝ ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nS : Set (Set α)\nhSc : Set.Countable S\nhSp : ∀ (s : Set α), s ∈ S → p s\nhS : ∀ (x : α), x ∈ s✝ → ∀ (y : α), y ∈ s✝ → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nx y : α\nhx : (x ∈ s✝ ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → x ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬x ∈ i\nhy : (y ∈ s✝ ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → y ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬y ∈ i\ns : Set α\nhsS : s ∈ S\nhsl : s ∈ l\n⊢ x ∈ s ↔ y ∈ s\n[PROOFSTEP]\nsimp only [hx.1.2 s ⟨hsS, hsl⟩, hy.1.2 s ⟨hsS, hsl⟩]\n[GOAL]\ncase intro.intro.intro.refine_2.inr\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns✝ : Set α\nh : HasCountableSeparatingOn α p s✝\nhs : s✝ ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nS : Set (Set α)\nhSc : Set.Countable S\nhSp : ∀ (s : Set α), s ∈ S → p s\nhS : ∀ (x : α), x ∈ s✝ → ∀ (y : α), y ∈ s✝ → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nx y : α\nhx : (x ∈ s✝ ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → x ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬x ∈ i\nhy : (y ∈ s✝ ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → y ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬y ∈ i\ns : Set α\nhsS : s ∈ S\nhsl : sᶜ ∈ l\n⊢ x ∈ s ↔ y ∈ s\n[PROOFSTEP]\n\n| inr hsl => simp only [hx.2 s hsS hsl, hy.2 s hsS hsl]\n[GOAL]\ncase intro.intro.intro.refine_2.inr\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns✝ : Set α\nh : HasCountableSeparatingOn α p s✝\nhs : s✝ ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nS : Set (Set α)\nhSc : Set.Countable S\nhSp : ∀ (s : Set α), s ∈ S → p s\nhS : ∀ (x : α), x ∈ s✝ → ∀ (y : α), y ∈ s✝ → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nx y : α\nhx : (x ∈ s✝ ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → x ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬x ∈ i\nhy : (y ∈ s✝ ∧ ∀ (t : Set α), t ∈ S ∧ t ∈ l.sets → y ∈ t) ∧ ∀ (i : Set α), i ∈ S → iᶜ ∈ l → ¬y ∈ i\ns : Set α\nhsS : s ∈ S\nhsl : sᶜ ∈ l\n⊢ x ∈ s ↔ y ∈ s\n[PROOFSTEP]\nsimp only [hx.2 s hsS hsl, hy.2 s hsS hsl]\n[GOAL]\ncase intro.intro.intro.refine_3\nα : Type u_1\nβ : Sort ?u.5043\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns : Set α\nh : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nS : Set (Set α)\nhSc : Set.Countable S\nhSp : ∀ (s : Set α), s ∈ S → p s\nhS : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → (∀ (s : Set α), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\n⊢ s ∩ ⋂₀ (S ∩ l.sets) ∩ ⋂ (U : Set α) (_ : U ∈ S) (_ : Uᶜ ∈ l), Uᶜ ∈ l\n[PROOFSTEP]\nexact\n  inter_mem (inter_mem hs ((countable_sInter_mem (hSc.mono (inter_subset_left _ _))).2 fun _ h ↦ h.2))\n    ((countable_bInter_mem hSc).2 fun U hU ↦ iInter_mem.2 id)\n[GOAL]\nα : Type u_1\nβ : Sort ?u.6801\nl : Filter α\ninst✝¹ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns : Set α\ninst✝ : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhne : Set.Nonempty s\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\n⊢ ∃ a, a ∈ s ∧ {a} ∈ l\n[PROOFSTEP]\nrcases exists_subset_subsingleton_mem_of_forall_separating p hs hl with ⟨t, hts, ht, htl⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Sort ?u.6801\nl : Filter α\ninst✝¹ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns : Set α\ninst✝ : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhne : Set.Nonempty s\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nt : Set α\nhts : t ⊆ s\nht : Set.Subsingleton t\nhtl : t ∈ l\n⊢ ∃ a, a ∈ s ∧ {a} ∈ l\n[PROOFSTEP]\nrcases ht.eq_empty_or_singleton with rfl | ⟨x, rfl⟩\n[GOAL]\ncase intro.intro.intro.inl\nα : Type u_1\nβ : Sort ?u.6801\nl : Filter α\ninst✝¹ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns : Set α\ninst✝ : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhne : Set.Nonempty s\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nhts : ∅ ⊆ s\nht : Set.Subsingleton ∅\nhtl : ∅ ∈ l\n⊢ ∃ a, a ∈ s ∧ {a} ∈ l\n[PROOFSTEP]\nexact hne.imp fun a ha ↦ ⟨ha, mem_of_superset htl (empty_subset _)⟩\n[GOAL]\ncase intro.intro.intro.inr.intro\nα : Type u_1\nβ : Sort ?u.6801\nl : Filter α\ninst✝¹ : CountableInterFilter l\nf g : α → β\np : Set α → Prop\ns : Set α\ninst✝ : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhne : Set.Nonempty s\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nx : α\nhts : {x} ⊆ s\nht : Set.Subsingleton {x}\nhtl : {x} ∈ l\n⊢ ∃ a, a ∈ s ∧ {a} ∈ l\n[PROOFSTEP]\nexact ⟨x, hts rfl, htl⟩\n[GOAL]\nα : Type u_1\nβ : Sort ?u.7319\nl : Filter α\ninst✝² : CountableInterFilter l\nf g : α → β\ninst✝¹ : Nonempty α\np : Set α → Prop\ns : Set α\ninst✝ : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\n⊢ ∃ a, {a} ∈ l\n[PROOFSTEP]\nrcases s.eq_empty_or_nonempty with rfl | hne\n[GOAL]\ncase inl\nα : Type u_1\nβ : Sort ?u.7319\nl : Filter α\ninst✝² : CountableInterFilter l\nf g : α → β\ninst✝¹ : Nonempty α\np : Set α → Prop\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\ninst✝ : HasCountableSeparatingOn α p ∅\nhs : ∅ ∈ l\n⊢ ∃ a, {a} ∈ l\n[PROOFSTEP]\nexact ‹Nonempty α›.elim fun a ↦ ⟨a, mem_of_superset hs (empty_subset _)⟩\n[GOAL]\ncase inr\nα : Type u_1\nβ : Sort ?u.7319\nl : Filter α\ninst✝² : CountableInterFilter l\nf g : α → β\ninst✝¹ : Nonempty α\np : Set α → Prop\ns : Set α\ninst✝ : HasCountableSeparatingOn α p s\nhs : s ∈ l\nhl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l\nhne : Set.Nonempty s\n⊢ ∃ a, {a} ∈ l\n[PROOFSTEP]\nexact (exists_mem_singleton_mem_of_mem_of_nonempty_of_forall_separating p hs hne hl).imp fun _ ↦ And.right\n[GOAL]\nα : Type u_2\nβ : Type u_1\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set β → Prop\ns : Set β\nh' : HasCountableSeparatingOn β p s\nhf : ∀ᶠ (x : α) in l, f x ∈ s\nhg : ∀ᶠ (x : α) in l, g x ∈ s\nh : ∀ (U : Set β), p U → ∀ᶠ (x : α) in l, f x ∈ U ↔ g x ∈ U\n⊢ f =ᶠ[l] g\n[PROOFSTEP]\nrcases h'.1 with ⟨S, hSc, hSp, hS⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_2\nβ : Type u_1\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set β → Prop\ns : Set β\nh' : HasCountableSeparatingOn β p s\nhf : ∀ᶠ (x : α) in l, f x ∈ s\nhg : ∀ᶠ (x : α) in l, g x ∈ s\nh : ∀ (U : Set β), p U → ∀ᶠ (x : α) in l, f x ∈ U ↔ g x ∈ U\nS : Set (Set β)\nhSc : Set.Countable S\nhSp : ∀ (s : Set β), s ∈ S → p s\nhS : ∀ (x : β), x ∈ s → ∀ (y : β), y ∈ s → (∀ (s : Set β), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\n⊢ f =ᶠ[l] g\n[PROOFSTEP]\nhave H : ∀ᶠ x in l, ∀ s ∈ S, f x ∈ s ↔ g x ∈ s := (eventually_countable_ball hSc).2 fun s hs ↦ (h _ (hSp _ hs))\n[GOAL]\ncase intro.intro.intro\nα : Type u_2\nβ : Type u_1\nl : Filter α\ninst✝ : CountableInterFilter l\nf g : α → β\np : Set β → Prop\ns : Set β\nh' : HasCountableSeparatingOn β p s\nhf : ∀ᶠ (x : α) in l, f x ∈ s\nhg : ∀ᶠ (x : α) in l, g x ∈ s\nh : ∀ (U : Set β), p U → ∀ᶠ (x : α) in l, f x ∈ U ↔ g x ∈ U\nS : Set (Set β)\nhSc : Set.Countable S\nhSp : ∀ (s : Set β), s ∈ S → p s\nhS : ∀ (x : β), x ∈ s → ∀ (y : β), y ∈ s → (∀ (s : Set β), s ∈ S → (x ∈ s ↔ y ∈ s)) → x = y\nH : ∀ᶠ (x : α) in l, ∀ (s : Set β), s ∈ S → (f x ∈ s ↔ g x ∈ s)\n⊢ f =ᶠ[l] g\n[PROOFSTEP]\nfilter_upwards [H, hf, hg] with x hx hxf hxg using hS _ hxf _ hxg hx\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.CountableSeparatingOn", "llama_tokens": 9931, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7185943925708561, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3956633653818354}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nh : a ∈ b :: l\n⊢ a = b ∨ a ≠ b ∧ a ∈ l\n[PROOFSTEP]\nby_cases hab : a = b\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nh : a ∈ b :: l\nhab : a = b\n⊢ a = b ∨ a ≠ b ∧ a ∈ l\n[PROOFSTEP]\nexact Or.inl hab\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nh : a ∈ b :: l\nhab : ¬a = b\n⊢ a = b ∨ a ≠ b ∧ a ∈ l\n[PROOFSTEP]\nexact ((List.mem_cons.1 h).elim Or.inl (fun h => Or.inr ⟨hab, h⟩))\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nh : a ∈ l\n⊢ ∃ s t, l = s ++ a :: t\n[PROOFSTEP]\ninduction' l with b l ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nh✝ : a ∈ l\nh : a ∈ []\n⊢ ∃ s t, [] = s ++ a :: t\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl✝ : List α\nh✝ : a ∈ l✝\nb : α\nl : List α\nih : a ∈ l → ∃ s t, l = s ++ a :: t\nh : a ∈ b :: l\n⊢ ∃ s t, b :: l = s ++ a :: t\n[PROOFSTEP]\n{cases h\n}\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nh✝ : a ∈ l\nh : a ∈ []\n⊢ ∃ s t, [] = s ++ a :: t\n[PROOFSTEP]\ncases h\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl✝ : List α\nh✝ : a ∈ l✝\nb : α\nl : List α\nih : a ∈ l → ∃ s t, l = s ++ a :: t\nh : a ∈ b :: l\n⊢ ∃ s t, b :: l = s ++ a :: t\n[PROOFSTEP]\nrcases h with (_ | ⟨_, h⟩)\n[GOAL]\ncase cons.head\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl✝ : List α\nh : a ∈ l✝\nl : List α\nih : a ∈ l → ∃ s t, l = s ++ a :: t\n⊢ ∃ s t, a :: l = s ++ a :: t\n[PROOFSTEP]\nexact ⟨[], l, rfl⟩\n[GOAL]\ncase cons.tail\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl✝ : List α\nh✝ : a ∈ l✝\nb : α\nl : List α\nih : a ∈ l → ∃ s t, l = s ++ a :: t\nh : Mem a l\n⊢ ∃ s t, b :: l = s ++ a :: t\n[PROOFSTEP]\nrcases ih h with ⟨s, t, rfl⟩\n[GOAL]\ncase cons.tail.intro.intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nh✝ : a ∈ l\nb : α\ns t : List α\nih : a ∈ s ++ a :: t → ∃ s_1 t_1, s ++ a :: t = s_1 ++ a :: t_1\nh : Mem a (s ++ a :: t)\n⊢ ∃ s_1 t_1, b :: (s ++ a :: t) = s_1 ++ a :: t_1\n[PROOFSTEP]\nexact ⟨b :: s, t, rfl⟩\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\nhf : Involutive f\nx : α\nl : List α\n⊢ (∃ y, y ∈ l ∧ f y = x) → f x ∈ l\n[PROOFSTEP]\nrintro ⟨y, h, rfl⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\nhf : Involutive f\nl : List α\ny : α\nh : y ∈ l\n⊢ f (f y) ∈ l\n[PROOFSTEP]\nrwa [hf y]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\nhf : Involutive f\na : α\nl : List α\n⊢ a ∈ map f l ↔ f a ∈ l\n[PROOFSTEP]\nrw [mem_map, hf.exists_mem_and_apply_eq_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ng : β → List γ\nf : α → β\na : α\nl : List α\n⊢ List.bind (map f (a :: l)) g = List.bind (a :: l) fun a => g (f a)\n[PROOFSTEP]\nsimp only [cons_bind, map_cons, map_bind _ _ l]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ Injective length ↔ Subsingleton α\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ Injective length → Subsingleton α\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nh : Injective length\n⊢ Subsingleton α\n[PROOFSTEP]\nrefine ⟨fun x y => ?_⟩\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nh : Injective length\nx y : α\n⊢ x = y\n[PROOFSTEP]\nsuffices [x] = [y] by simpa using this\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nh : Injective length\nx y : α\nthis : [x] = [y]\n⊢ x = y\n[PROOFSTEP]\nsimpa using this\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nh : Injective length\nx y : α\n⊢ [x] = [y]\n[PROOFSTEP]\napply h\n[GOAL]\ncase mp.a\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nh : Injective length\nx y : α\n⊢ length [x] = length [y]\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ Subsingleton α → Injective length\n[PROOFSTEP]\nintros hα l1 l2 hl\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhα : Subsingleton α\nl1 l2 : List α\nhl : length l1 = length l2\n⊢ l1 = l2\n[PROOFSTEP]\ninduction l1 generalizing l2\n[GOAL]\ncase mpr.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhα : Subsingleton α\nl2 : List α\nhl : length [] = length l2\n⊢ [] = l2\n[PROOFSTEP]\ncases l2\n[GOAL]\ncase mpr.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhα : Subsingleton α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ ⦃l2 : List α⦄, length tail✝ = length l2 → tail✝ = l2\nl2 : List α\nhl : length (head✝ :: tail✝) = length l2\n⊢ head✝ :: tail✝ = l2\n[PROOFSTEP]\ncases l2\n[GOAL]\ncase mpr.nil.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhα : Subsingleton α\nhl : length [] = length []\n⊢ [] = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr.nil.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhα : Subsingleton α\nhead✝ : α\ntail✝ : List α\nhl : length [] = length (head✝ :: tail✝)\n⊢ [] = head✝ :: tail✝\n[PROOFSTEP]\ncases hl\n[GOAL]\ncase mpr.cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhα : Subsingleton α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ ⦃l2 : List α⦄, length tail✝ = length l2 → tail✝ = l2\nhl : length (head✝ :: tail✝) = length []\n⊢ head✝ :: tail✝ = []\n[PROOFSTEP]\ncases hl\n[GOAL]\ncase mpr.cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhα : Subsingleton α\nhead✝¹ : α\ntail✝¹ : List α\ntail_ih✝ : ∀ ⦃l2 : List α⦄, length tail✝¹ = length l2 → tail✝¹ = l2\nhead✝ : α\ntail✝ : List α\nhl : length (head✝¹ :: tail✝¹) = length (head✝ :: tail✝)\n⊢ head✝¹ :: tail✝¹ = head✝ :: tail✝\n[PROOFSTEP]\nnext ih _ _ =>\n  congr\n  · exact Subsingleton.elim _ _\n  · apply ih; simpa using hl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhα : Subsingleton α\nhead✝¹ : α\ntail✝¹ : List α\nih : ∀ ⦃l2 : List α⦄, length tail✝¹ = length l2 → tail✝¹ = l2\nhead✝ : α\ntail✝ : List α\nhl : length (head✝¹ :: tail✝¹) = length (head✝ :: tail✝)\n⊢ head✝¹ :: tail✝¹ = head✝ :: tail✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_head\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhα : Subsingleton α\nhead✝¹ : α\ntail✝¹ : List α\nih : ∀ ⦃l2 : List α⦄, length tail✝¹ = length l2 → tail✝¹ = l2\nhead✝ : α\ntail✝ : List α\nhl : length (head✝¹ :: tail✝¹) = length (head✝ :: tail✝)\n⊢ head✝¹ = head✝\n[PROOFSTEP]\nexact Subsingleton.elim _ _\n[GOAL]\ncase e_tail\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhα : Subsingleton α\nhead✝¹ : α\ntail✝¹ : List α\nih : ∀ ⦃l2 : List α⦄, length tail✝¹ = length l2 → tail✝¹ = l2\nhead✝ : α\ntail✝ : List α\nhl : length (head✝¹ :: tail✝¹) = length (head✝ :: tail✝)\n⊢ tail✝¹ = tail✝\n[PROOFSTEP]\napply ih\n[GOAL]\ncase e_tail.hl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhα : Subsingleton α\nhead✝¹ : α\ntail✝¹ : List α\nih : ∀ ⦃l2 : List α⦄, length tail✝¹ = length l2 → tail✝¹ = l2\nhead✝ : α\ntail✝ : List α\nhl : length (head✝¹ :: tail✝¹) = length (head✝ :: tail✝)\n⊢ length tail✝¹ = length tail✝\n[PROOFSTEP]\nsimpa using hl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nh : x ≠ y\n⊢ {x, y} = [x, y]\n[PROOFSTEP]\nrw [insert_neg, singleton_eq]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nh : x ≠ y\n⊢ ¬x ∈ {y}\n[PROOFSTEP]\nrwa [singleton_eq, mem_singleton]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\na : α\nl : List α\nx✝ : ∃ x, x ∈ a :: l ∧ p x\nx : α\nxal : x ∈ a :: l\npx : p x\nh : x = a\n⊢ p a ∨ ∃ x, x ∈ l ∧ p x\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\na : α\nl : List α\nx✝ : ∃ x, x ∈ a :: l ∧ p x\nx : α\nxal : x ∈ a :: l\npx : p x\nh : x = a\n⊢ p x ∨ ∃ x, x ∈ l ∧ p x\n[PROOFSTEP]\nleft\n[GOAL]\ncase h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\na : α\nl : List α\nx✝ : ∃ x, x ∈ a :: l ∧ p x\nx : α\nxal : x ∈ a :: l\npx : p x\nh : x = a\n⊢ p x\n[PROOFSTEP]\nexact px\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nf : α → β\nh : Injective f\n⊢ map f l₁ ⊆ map f l₂ ↔ l₁ ⊆ l₂\n[PROOFSTEP]\nrefine' ⟨_, map_subset f⟩\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nf : α → β\nh : Injective f\n⊢ map f l₁ ⊆ map f l₂ → l₁ ⊆ l₂\n[PROOFSTEP]\nintro h2 x hx\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nf : α → β\nh : Injective f\nh2 : map f l₁ ⊆ map f l₂\nx : α\nhx : x ∈ l₁\n⊢ x ∈ l₂\n[PROOFSTEP]\nrcases mem_map.1 (h2 (mem_map_of_mem f hx)) with ⟨x', hx', hxx'⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nf : α → β\nh : Injective f\nh2 : map f l₁ ⊆ map f l₂\nx : α\nhx : x ∈ l₁\nx' : α\nhx' : x' ∈ l₂\nhxx' : f x' = f x\n⊢ x ∈ l₂\n[PROOFSTEP]\ncases h hxx'\n[GOAL]\ncase intro.intro.refl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nf : α → β\nh : Injective f\nh2 : map f l₁ ⊆ map f l₂\nx : α\nhx : x ∈ l₁\nhx' : x ∈ l₂\nhxx' : f x = f x\n⊢ x ∈ l₂\n[PROOFSTEP]\nexact hx'\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ a b c : List α\nx : α\n⊢ a ++ b = x :: c ↔ a = [] ∧ b = x :: c ∨ ∃ a', a = x :: a' ∧ c = a' ++ b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ b c : List α\nx : α\n⊢ [] ++ b = x :: c ↔ [] = [] ∧ b = x :: c ∨ ∃ a', [] = x :: a' ∧ c = a' ++ b\n[PROOFSTEP]\nsimp only [and_assoc, @eq_comm _ c, nil_append, cons_append, cons.injEq, true_and_iff, false_and_iff, exists_false,\n  false_or_iff, or_false_iff, exists_and_left, exists_eq_left']\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ b c : List α\nx head✝ : α\ntail✝ : List α\n⊢ head✝ :: tail✝ ++ b = x :: c ↔ head✝ :: tail✝ = [] ∧ b = x :: c ∨ ∃ a', head✝ :: tail✝ = x :: a' ∧ c = a' ++ b\n[PROOFSTEP]\nsimp only [and_assoc, @eq_comm _ c, nil_append, cons_append, cons.injEq, true_and_iff, false_and_iff, exists_false,\n  false_or_iff, or_false_iff, exists_and_left, exists_eq_left']\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ a b c : List α\nx : α\n⊢ x :: c = a ++ b ↔ a = [] ∧ b = x :: c ∨ ∃ a', a = x :: a' ∧ c = a' ++ b\n[PROOFSTEP]\nrw [eq_comm, append_eq_cons_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\n⊢ [] = replicate (length []) a ↔ ∀ (b : α), b ∈ [] → b = a\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ b :: l = replicate (length (b :: l)) a ↔ ∀ (b_1 : α), b_1 ∈ b :: l → b_1 = a\n[PROOFSTEP]\nsimp [eq_replicate_length]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm n : ℕ\na : α\n⊢ replicate (m + n) a = replicate m a ++ replicate n a\n[PROOFSTEP]\ninduction m\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\na : α\n⊢ replicate (zero + n) a = replicate zero a ++ replicate n a\n[PROOFSTEP]\nsimp [*, zero_add, succ_add, replicate]\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\na : α\nn✝ : ℕ\nn_ih✝ : replicate (n✝ + n) a = replicate n✝ a ++ replicate n a\n⊢ replicate (succ n✝ + n) a = replicate (succ n✝) a ++ replicate n a\n[PROOFSTEP]\nsimp [*, zero_add, succ_add, replicate]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nL : List α\n⊢ L ⊆ [a] ↔ ∃ n, L = replicate n a\n[PROOFSTEP]\nsimp only [eq_replicate, subset_def, mem_singleton, exists_eq_left']\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nn : ℕ\na : α\n⊢ map f (replicate n a) = replicate n (f a)\n[PROOFSTEP]\ninduction n <;> [rfl; simp only [*, replicate, map]]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nn : ℕ\na : α\n⊢ map f (replicate n a) = replicate n (f a)\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\na : α\n⊢ map f (replicate zero a) = replicate zero (f a)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\na : α\nn✝ : ℕ\nn_ih✝ : map f (replicate n✝ a) = replicate n✝ (f a)\n⊢ map f (replicate (succ n✝) a) = replicate (succ n✝) (f a)\n[PROOFSTEP]\nsimp only [*, replicate, map]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn : ℕ\n⊢ tail (replicate n a) = replicate (n - 1) a\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\n⊢ tail (replicate zero a) = replicate (zero - 1) a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn✝ : ℕ\n⊢ tail (replicate (succ n✝) a) = replicate (succ n✝ - 1) a\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\n⊢ join (replicate n []) = []\n[PROOFSTEP]\ninduction n <;> [rfl; simp only [*, replicate, join, append_nil]]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\n⊢ join (replicate n []) = []\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ join (replicate zero []) = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn✝ : ℕ\nn_ih✝ : join (replicate n✝ []) = []\n⊢ join (replicate (succ n✝) []) = []\n[PROOFSTEP]\nsimp only [*, replicate, join, append_nil]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\n⊢ replicate 0 a = replicate 0 b ↔ 0 = 0 ∨ a = b\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nn : ℕ\n⊢ a = b ↔ n + 1 = 0 ∨ a = b\n[PROOFSTEP]\nsimp only [n.succ_ne_zero, false_or]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nx y : α\n⊢ x ∈ [y] ↔ x = y\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\n⊢ concat l₁ a = concat l₂ a → l₁ = l₂\n[PROOFSTEP]\nintro h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\nh : concat l₁ a = concat l₂ a\n⊢ l₁ = l₂\n[PROOFSTEP]\nrw [concat_eq_append, concat_eq_append] at h \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\nh : l₁ ++ [a] = l₂ ++ [a]\n⊢ l₁ = l₂\n[PROOFSTEP]\nexact append_right_cancel h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ concat l a = concat l b → a = b\n[PROOFSTEP]\nintro h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nh : concat l a = concat l b\n⊢ a = b\n[PROOFSTEP]\nrw [concat_eq_append, concat_eq_append] at h \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nh : l ++ [a] = l ++ [b]\n⊢ a = b\n[PROOFSTEP]\nexact head_eq_of_cons_eq (append_left_cancel h)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\n⊢ concat l a ≠ []\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\n⊢ concat l₁ a ++ l₂ = l₁ ++ a :: l₂\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\n⊢ length (concat l a) = succ (length l)\n[PROOFSTEP]\nsimp only [concat_eq_append, length_append, length]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\n⊢ l₁ ++ concat l₂ a = concat (l₁ ++ l₂) a\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\n⊢ reverse (a :: l) = concat (reverse l) a\n[PROOFSTEP]\nsimp only [reverse_cons, concat_eq_append]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\n⊢ concat l a = reverse (a :: reverse l)\n[PROOFSTEP]\nsimp only [concat_eq_append, reverse_cons, reverse_reverse]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\nf : α → β\nl₁ l₂ : List α\n⊢ map f (reverseAux l₁ l₂) = reverseAux (map f l₁) (map f l₂)\n[PROOFSTEP]\nsimp only [reverseAux_eq, map_append, map_reverse]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\na : α\n⊢ length (reverse (replicate n a)) = n\n[PROOFSTEP]\nrw [length_reverse, length_replicate]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\n⊢ isEmpty l = true ↔ l = []\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ isEmpty [] = true ↔ [] = []\n[PROOFSTEP]\nsimp [isEmpty]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhead✝ : α\ntail✝ : List α\n⊢ isEmpty (head✝ :: tail✝) = true ↔ head✝ :: tail✝ = []\n[PROOFSTEP]\nsimp [isEmpty]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ length (dropLast (a :: b :: l)) = length (a :: b :: l) - 1\n[PROOFSTEP]\nrw [dropLast, length_cons, length_cons, length_dropLast (b :: l), succ_sub_one, length_cons, succ_sub_one]\n[GOAL]\ncase x_2\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ b :: l = [] → False\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\n⊢ ∀ (h : l ≠ []), getLast (a :: l) (_ : a :: l ≠ []) = getLast l h\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\n⊢ ∀ (h : [] ≠ []), getLast [a] (_ : [a] ≠ []) = getLast [] h\n[PROOFSTEP]\nintros\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na head✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (h : tail✝ ≠ []), getLast (a :: tail✝) (_ : a :: tail✝ ≠ []) = getLast tail✝ h\n⊢ ∀ (h : head✝ :: tail✝ ≠ []), getLast (a :: head✝ :: tail✝) (_ : a :: head✝ :: tail✝ ≠ []) = getLast (head✝ :: tail✝) h\n[PROOFSTEP]\nintros\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nh✝ : [] ≠ []\n⊢ getLast [a] (_ : [a] ≠ []) = getLast [] h✝\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na head✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (h : tail✝ ≠ []), getLast (a :: tail✝) (_ : a :: tail✝ ≠ []) = getLast tail✝ h\nh✝ : head✝ :: tail✝ ≠ []\n⊢ getLast (a :: head✝ :: tail✝) (_ : a :: head✝ :: tail✝ ≠ []) = getLast (head✝ :: tail✝) h✝\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na head✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (h : tail✝ ≠ []), getLast (a :: tail✝) (_ : a :: tail✝ ≠ []) = getLast tail✝ h\nh✝ : head✝ :: tail✝ ≠ []\n⊢ getLast (a :: head✝ :: tail✝) (_ : a :: head✝ :: tail✝ ≠ []) = getLast (head✝ :: tail✝) h✝\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\n⊢ getLast (l ++ [a]) (_ : l ++ [a] ≠ []) = a\n[PROOFSTEP]\nsimp only [getLast_append]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nh : l₂ ≠ []\n⊢ getLast (l₁ ++ l₂) (_ : l₁ ++ l₂ ≠ []) = getLast l₂ h\n[PROOFSTEP]\ninduction' l₁ with _ _ ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nh : l₂ ≠ []\n⊢ getLast ([] ++ l₂) (_ : [] ++ l₂ ≠ []) = getLast l₂ h\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nh : l₂ ≠ []\nhead✝ : α\ntail✝ : List α\nih : getLast (tail✝ ++ l₂) (_ : tail✝ ++ l₂ ≠ []) = getLast l₂ h\n⊢ getLast (head✝ :: tail✝ ++ l₂) (_ : head✝ :: tail✝ ++ l₂ ≠ []) = getLast l₂ h\n[PROOFSTEP]\nsimp only [cons_append]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nh : l₂ ≠ []\nhead✝ : α\ntail✝ : List α\nih : getLast (tail✝ ++ l₂) (_ : tail✝ ++ l₂ ≠ []) = getLast l₂ h\n⊢ getLast (head✝ :: (tail✝ ++ l₂)) (_ : head✝ :: (tail✝ ++ l₂) ≠ []) = getLast l₂ h\n[PROOFSTEP]\nrw [List.getLast_cons]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nh : l₂ ≠ []\nhead✝ : α\ntail✝ : List α\nih : getLast (tail✝ ++ l₂) (_ : tail✝ ++ l₂ ≠ []) = getLast l₂ h\n⊢ getLast (tail✝ ++ l₂) ?cons = getLast l₂ h\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nh : l₂ ≠ []\nhead✝ : α\ntail✝ : List α\nih : getLast (tail✝ ++ l₂) (_ : tail✝ ++ l₂ ≠ []) = getLast l₂ h\n⊢ tail✝ ++ l₂ ≠ []\n[PROOFSTEP]\nexact ih\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nh : a :: b :: l ≠ []\n⊢ dropLast (a :: b :: l) ++ [getLast (a :: b :: l) h] = a :: b :: l\n[PROOFSTEP]\nrw [dropLast_cons_cons, cons_append, getLast_cons (cons_ne_nil _ _)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nh : a :: b :: l ≠ []\n⊢ a :: (dropLast (b :: l) ++ [getLast (b :: l) (_ : b :: l ≠ [])]) = a :: b :: l\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_tail\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nh : a :: b :: l ≠ []\n⊢ dropLast (b :: l) ++ [getLast (b :: l) (_ : b :: l ≠ [])] = b :: l\n[PROOFSTEP]\nexact dropLast_append_getLast (cons_ne_nil b l)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nh₁ : l₁ ≠ []\nh₂ : l₂ ≠ []\nh₃ : l₁ = l₂\n⊢ getLast l₁ h₁ = getLast l₂ h₂\n[PROOFSTEP]\nsubst l₁\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nh₂ h₁ : l₂ ≠ []\n⊢ getLast l₂ h₁ = getLast l₂ h₂\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nx✝ : [a] ≠ []\n⊢ getLast [a] x✝ ∈ [a]\n[PROOFSTEP]\nsimp only [getLast, mem_singleton]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nh : a :: b :: l ≠ []\n⊢ getLast (a :: b :: l) h ∈ b :: l\n[PROOFSTEP]\nrw [getLast_cons_cons]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nh : a :: b :: l ≠ []\n⊢ getLast (b :: l) (_ : b :: l ≠ []) ∈ b :: l\n[PROOFSTEP]\nexact getLast_mem (cons_ne_nil b l)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : ℕ\na : α\n⊢ getLast (replicate (m + 1) a) (_ : replicate (m + 1) a ≠ []) = a\n[PROOFSTEP]\nsimp only [replicate_succ']\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : ℕ\na : α\n⊢ getLast (replicate m a ++ [a]) (_ : replicate m a ++ [a] ≠ []) = a\n[PROOFSTEP]\nexact getLast_append_singleton _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ Option.isNone (getLast? []) = true ↔ [] = []\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\n⊢ Option.isNone (getLast? [a]) = true ↔ [a] = []\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ Option.isNone (getLast? (a :: b :: l)) = true ↔ a :: b :: l = []\n[PROOFSTEP]\nsimp [@getLast?_isNone (b :: l)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ Option.isSome (getLast? []) = true ↔ [] ≠ []\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\n⊢ Option.isSome (getLast? [a]) = true ↔ [a] ≠ []\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ Option.isSome (getLast? (a :: b :: l)) = true ↔ a :: b :: l ≠ []\n[PROOFSTEP]\nsimp [@getLast?_isSome (b :: l)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\nhx : x ∈ getLast? []\n⊢ False\n[PROOFSTEP]\nsimp at hx \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na x : α\nhx : x ∈ getLast? [a]\n⊢ a = x\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nx : α\nhx : x ∈ getLast? (a :: b :: l)\n⊢ ∃ h, x = getLast (a :: b :: l) h\n[PROOFSTEP]\nrw [getLast?_cons_cons] at hx \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nx : α\nhx : x ∈ getLast? (b :: l)\n⊢ ∃ h, x = getLast (a :: b :: l) h\n[PROOFSTEP]\nrcases mem_getLast?_eq_getLast hx with ⟨_, h₂⟩\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nx : α\nhx : x ∈ getLast? (b :: l)\nw✝ : b :: l ≠ []\nh₂ : x = getLast (b :: l) w✝\n⊢ ∃ h, x = getLast (a :: b :: l) h\n[PROOFSTEP]\nuse cons_ne_nil _ _\n[GOAL]\ncase h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nx : α\nhx : x ∈ getLast? (b :: l)\nw✝ : b :: l ≠ []\nh₂ : x = getLast (b :: l) w✝\n⊢ x = getLast (a :: b :: l) (_ : a :: b :: l ≠ [])\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx y : α\nx✝ : x ∈ getLast? []\n⊢ x ∈ getLast? [y]\n[PROOFSTEP]\ncontradiction\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nc : α\nhc : c ∈ getLast? (a :: b :: l)\n⊢ dropLast (a :: b :: l) ++ [c] = a :: b :: l\n[PROOFSTEP]\nrw [getLast?_cons_cons] at hc \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\nc : α\nhc : c ∈ getLast? (b :: l)\n⊢ dropLast (a :: b :: l) ++ [c] = a :: b :: l\n[PROOFSTEP]\nrw [dropLast_cons_cons, cons_append, dropLast_append_getLast? _ hc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\n⊢ getLastI [] = Option.iget (getLast? [])\n[PROOFSTEP]\nsimp [getLastI, Inhabited.default]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nhead✝¹ head✝ c : α\nl : List α\n⊢ getLastI (head✝¹ :: head✝ :: c :: l) = Option.iget (getLast? (head✝¹ :: head✝ :: c :: l))\n[PROOFSTEP]\nsimp [getLastI, getLastI_eq_getLast? (c :: l)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\nb c : α\nl₁ : List α\na : α\nl₂ : List α\n⊢ getLast? (b :: c :: l₁ ++ a :: l₂) = getLast? (a :: l₂)\n[PROOFSTEP]\nrw [cons_append, cons_append, getLast?_cons_cons, ← cons_append, getLast?_append_cons (c :: l₁)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ l₁ : List α\nhl₂ : [] ≠ []\n⊢ getLast? (l₁ ++ []) = getLast? []\n[PROOFSTEP]\ncontradiction\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nx : α\nh : x ∈ getLast? l₂\n⊢ x ∈ getLast? (l₁ ++ l₂)\n[PROOFSTEP]\ncases l₂\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ l₁ : List α\nx : α\nh : x ∈ getLast? []\n⊢ x ∈ getLast? (l₁ ++ [])\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ l₁ : List α\nx head✝ : α\ntail✝ : List α\nh : x ∈ getLast? (head✝ :: tail✝)\n⊢ x ∈ getLast? (l₁ ++ head✝ :: tail✝)\n[PROOFSTEP]\nrw [List.getLast?_append_cons]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ l₁ : List α\nx head✝ : α\ntail✝ : List α\nh : x ∈ getLast? (head✝ :: tail✝)\n⊢ x ∈ getLast? (head✝ :: tail✝)\n[PROOFSTEP]\nexact h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nl : List α\n⊢ head! l = Option.iget (head? l)\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\n⊢ head! [] = Option.iget (head? [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nhead✝ : α\ntail✝ : List α\n⊢ head! (head✝ :: tail✝) = Option.iget (head? (head✝ :: tail✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx a : α\nl : List α\nh : x ∈ head? (a :: l)\n⊢ a :: l = x :: tail (a :: l)\n[PROOFSTEP]\nsimp only [head?, Option.mem_def, Option.some_inj] at h \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx a : α\nl : List α\nh : a = x\n⊢ a :: l = x :: tail (a :: l)\n[PROOFSTEP]\nexact h ▸ rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nt s : List α\nh : s ≠ []\n⊢ head! (s ++ t) = head! s\n[PROOFSTEP]\ninduction s\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nt : List α\nh : [] ≠ []\n⊢ head! ([] ++ t) = head! []\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nt : List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : tail✝ ≠ [] → head! (tail✝ ++ t) = head! tail✝\nh : head✝ :: tail✝ ≠ []\n⊢ head! (head✝ :: tail✝ ++ t) = head! (head✝ :: tail✝)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nt : List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : tail✝ ≠ [] → head! (tail✝ ++ t) = head! tail✝\nh : head✝ :: tail✝ ≠ []\n⊢ head! (head✝ :: tail✝ ++ t) = head! (head✝ :: tail✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ s t : List α\nx : α\nh : x ∈ head? s\n⊢ x ∈ head? (s ++ t)\n[PROOFSTEP]\ncases s\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ t : List α\nx : α\nh : x ∈ head? []\n⊢ x ∈ head? ([] ++ t)\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ t : List α\nx head✝ : α\ntail✝ : List α\nh : x ∈ head? (head✝ :: tail✝)\n⊢ x ∈ head? (head✝ :: tail✝ ++ t)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ t : List α\nx head✝ : α\ntail✝ : List α\nh : x ∈ head? (head✝ :: tail✝)\n⊢ x ∈ head? (head✝ :: tail✝ ++ t)\n[PROOFSTEP]\nexact h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nh : l ≠ []\n⊢ tail (l ++ [a]) = tail l ++ [a]\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nh : [] ≠ []\n⊢ tail ([] ++ [a]) = tail [] ++ [a]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na head✝ : α\ntail✝ : List α\ntail_ih✝ : tail✝ ≠ [] → tail (tail✝ ++ [a]) = tail tail✝ ++ [a]\nh : head✝ :: tail✝ ≠ []\n⊢ tail (head✝ :: tail✝ ++ [a]) = tail (head✝ :: tail✝) ++ [a]\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na head✝ : α\ntail✝ : List α\ntail_ih✝ : tail✝ ≠ [] → tail (tail✝ ++ [a]) = tail tail✝ ++ [a]\nh : head✝ :: tail✝ ≠ []\n⊢ tail (head✝ :: tail✝ ++ [a]) = tail (head✝ :: tail✝) ++ [a]\n[PROOFSTEP]\nrw [tail, cons_append, tail]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nh : a ∈ head? []\n⊢ a :: tail [] = []\n[PROOFSTEP]\ncontradiction\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nb : α\nl : List α\na : α\nh : a ∈ head? (b :: l)\n⊢ a :: tail (b :: l) = b :: l\n[PROOFSTEP]\nsimp at h \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nb : α\nl : List α\na : α\nh : b = a\n⊢ a :: tail (b :: l) = b :: l\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nh : [] ≠ []\n⊢ head! [] ∈ head? []\n[PROOFSTEP]\ncontradiction\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nl : List α\nh : l ≠ []\n⊢ head! l ∈ l\n[PROOFSTEP]\nhave h' := mem_cons_self l.head! l.tail\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nl : List α\nh : l ≠ []\nh' : head! l ∈ head! l :: tail l\n⊢ head! l ∈ l\n[PROOFSTEP]\nrwa [cons_head!_tail h] at h' \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nl : List α\n⊢ head? (map f l) = Option.map f (head? l)\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\n⊢ head? (map f []) = Option.map f (head? [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nhead✝ : α\ntail✝ : List α\n⊢ head? (map f (head✝ :: tail✝)) = Option.map f (head? (head✝ :: tail✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l l' : List α\nh : l ≠ []\n⊢ tail (l ++ l') = tail l ++ l'\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l' : List α\nh : [] ≠ []\n⊢ tail ([] ++ l') = tail [] ++ l'\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l' : List α\nhead✝ : α\ntail✝ : List α\nh : head✝ :: tail✝ ≠ []\n⊢ tail (head✝ :: tail✝ ++ l') = tail (head✝ :: tail✝) ++ l'\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\ni : ℕ\nh : i < length (tail l)\n⊢ i + 1 < length l\n[PROOFSTEP]\nsimpa [← lt_tsub_iff_right] using h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\ni : ℕ\nh : i < length (tail l)\nh' : optParam (i + 1 < length l) (_ : i + 1 < length l)\n⊢ nthLe (tail l) i h = nthLe l (i + 1) h'\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ni : ℕ\nh : i < length (tail [])\nh' : optParam (i + 1 < length []) (_ : i + 1 < length [])\n⊢ nthLe (tail []) i h = nthLe [] (i + 1) h'\n[PROOFSTEP]\ncases h\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ni : ℕ\nhead✝ : α\ntail✝ : List α\nh : i < length (tail (head✝ :: tail✝))\nh' : optParam (i + 1 < length (head✝ :: tail✝)) (_ : i + 1 < length (head✝ :: tail✝))\n⊢ nthLe (tail (head✝ :: tail✝)) i h = nthLe (head✝ :: tail✝) (i + 1) h'\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\na : α\nn : ℕ\nhn : n ≠ 0\nh : n < length (a :: l)\n⊢ n - 1 < length l\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\na : α\nn : ℕ\nhn : n ≠ 0\nh : length l ≤ n - 1\n⊢ length (a :: l) ≤ n\n[PROOFSTEP]\nrw [length_cons]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\na : α\nn : ℕ\nhn : n ≠ 0\nh : length l ≤ n - 1\n⊢ succ (length l) ≤ n\n[PROOFSTEP]\nconvert succ_le_succ h\n[GOAL]\ncase h.e'_4\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\na : α\nn : ℕ\nhn : n ≠ 0\nh : length l ≤ n - 1\n⊢ n = succ (n - 1)\n[PROOFSTEP]\nexact (Nat.succ_pred_eq_of_pos hn.bot_lt).symm\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\na : α\nn : ℕ\nhl : n < length (a :: l)\n⊢ nthLe (a :: l) n hl = if hn : n = 0 then a else nthLe l (n - 1) (_ : n - 1 < length l)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\na : α\nn : ℕ\nhl : n < length (a :: l)\nh : n = 0\n⊢ nthLe (a :: l) n hl = a\n[PROOFSTEP]\nsimp [nthLe, h]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\na : α\nn : ℕ\nhl : n < length (a :: l)\nh : ¬n = 0\n⊢ nthLe (a :: l) n hl = nthLe l (n - 1) (_ : n - 1 < length l)\n[PROOFSTEP]\ncases l\n[GOAL]\ncase neg.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn : ℕ\nh : ¬n = 0\nhl : n < length [a]\n⊢ nthLe [a] n hl = nthLe [] (n - 1) (_ : n - 1 < length [])\n[PROOFSTEP]\nrw [length_singleton, lt_succ_iff, nonpos_iff_eq_zero] at hl \n[GOAL]\ncase neg.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn : ℕ\nh : ¬n = 0\nhl✝ : n < length [a]\nhl : n = 0\n⊢ nthLe [a] n hl✝ = nthLe [] (n - 1) (_ : n - 1 < length [])\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase neg.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn : ℕ\nh : ¬n = 0\nhead✝ : α\ntail✝ : List α\nhl : n < length (a :: head✝ :: tail✝)\n⊢ nthLe (a :: head✝ :: tail✝) n hl = nthLe (head✝ :: tail✝) (n - 1) (_ : n - 1 < length (head✝ :: tail✝))\n[PROOFSTEP]\ncases n\n[GOAL]\ncase neg.cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na head✝ : α\ntail✝ : List α\nh : ¬zero = 0\nhl : zero < length (a :: head✝ :: tail✝)\n⊢ nthLe (a :: head✝ :: tail✝) zero hl = nthLe (head✝ :: tail✝) (zero - 1) (_ : zero - 1 < length (head✝ :: tail✝))\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase neg.cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na head✝ : α\ntail✝ : List α\nn✝ : ℕ\nh : ¬succ n✝ = 0\nhl : succ n✝ < length (a :: head✝ :: tail✝)\n⊢ nthLe (a :: head✝ :: tail✝) (succ n✝) hl =\n    nthLe (head✝ :: tail✝) (succ n✝ - 1) (_ : succ n✝ - 1 < length (head✝ :: tail✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nf g : α → α\n⊢ modifyHead g (modifyHead f l) = modifyHead (g ∘ f) l\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → α\n⊢ modifyHead g (modifyHead f []) = modifyHead (g ∘ f) []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → α\nhead✝ : α\ntail✝ : List α\n⊢ modifyHead g (modifyHead f (head✝ :: tail✝)) = modifyHead (g ∘ f) (head✝ :: tail✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nl : List α\nH0 : C []\nH1 : (l : List α) → (a : α) → C l → C (l ++ [a])\n⊢ C l\n[PROOFSTEP]\nrw [← reverse_reverse l]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nl : List α\nH0 : C []\nH1 : (l : List α) → (a : α) → C l → C (l ++ [a])\n⊢ C (reverse (reverse l))\n[PROOFSTEP]\nmatch h : (reverse l) with\n| [] => exact H0\n|\nhead ::\n    tail =>\n  have : tail.length < l.length := by\n    rw [← length_reverse l, h, length_cons]\n    simp [Nat.lt_succ]\n  let ih := reverseRecOn (reverse tail) H0 H1\n  rw [reverse_cons]\n  exact H1 _ _ ih\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nl : List α\nH0 : C []\nH1 : (l : List α) → (a : α) → C l → C (l ++ [a])\nh : reverse l = []\n⊢ C (reverse [])\n[PROOFSTEP]\nexact H0\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nl : List α\nH0 : C []\nH1 : (l : List α) → (a : α) → C l → C (l ++ [a])\nhead : α\ntail : List α\nh : reverse l = head :: tail\n⊢ C (reverse (head :: tail))\n[PROOFSTEP]\nhave : tail.length < l.length := by\n  rw [← length_reverse l, h, length_cons]\n  simp [Nat.lt_succ]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nl : List α\nH0 : C []\nH1 : (l : List α) → (a : α) → C l → C (l ++ [a])\nhead : α\ntail : List α\nh : reverse l = head :: tail\n⊢ length tail < length l\n[PROOFSTEP]\nrw [← length_reverse l, h, length_cons]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nl : List α\nH0 : C []\nH1 : (l : List α) → (a : α) → C l → C (l ++ [a])\nhead : α\ntail : List α\nh : reverse l = head :: tail\n⊢ length tail < succ (length tail)\n[PROOFSTEP]\nsimp [Nat.lt_succ]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nl : List α\nH0 : C []\nH1 : (l : List α) → (a : α) → C l → C (l ++ [a])\nhead : α\ntail : List α\nh : reverse l = head :: tail\nthis : length tail < length l\n⊢ C (reverse (head :: tail))\n[PROOFSTEP]\nlet ih := reverseRecOn (reverse tail) H0 H1\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nl : List α\nH0 : C []\nH1 : (l : List α) → (a : α) → C l → C (l ++ [a])\nhead : α\ntail : List α\nh : reverse l = head :: tail\nthis : length tail < length l\nih : C (reverse tail) := reverseRecOn (reverse tail) H0 H1\n⊢ C (reverse (head :: tail))\n[PROOFSTEP]\nrw [reverse_cons]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nl : List α\nH0 : C []\nH1 : (l : List α) → (a : α) → C l → C (l ++ [a])\nhead : α\ntail : List α\nh : reverse l = head :: tail\nthis : length tail < length l\nih : C (reverse tail) := reverseRecOn (reverse tail) H0 H1\n⊢ C (reverse tail ++ [head])\n[PROOFSTEP]\nexact H1 _ _ ih\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nH0 : C []\nH1 : (a : α) → C [a]\nHn : (a : α) → (l : List α) → (b : α) → C l → C (a :: (l ++ [b]))\na b : α\nl : List α\n⊢ C (a :: b :: l)\n[PROOFSTEP]\nlet l' := dropLast (b :: l)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nH0 : C []\nH1 : (a : α) → C [a]\nHn : (a : α) → (l : List α) → (b : α) → C l → C (a :: (l ++ [b]))\na b : α\nl : List α\nl' : List α := dropLast (b :: l)\n⊢ C (a :: b :: l)\n[PROOFSTEP]\nlet b' := getLast (b :: l) (cons_ne_nil _ _)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nH0 : C []\nH1 : (a : α) → C [a]\nHn : (a : α) → (l : List α) → (b : α) → C l → C (a :: (l ++ [b]))\na b : α\nl : List α\nl' : List α := dropLast (b :: l)\nb' : α := getLast (b :: l) (_ : b :: l ≠ [])\n⊢ C (a :: b :: l)\n[PROOFSTEP]\nrw [← dropLast_append_getLast (cons_ne_nil b l)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nH0 : C []\nH1 : (a : α) → C [a]\nHn : (a : α) → (l : List α) → (b : α) → C l → C (a :: (l ++ [b]))\na b : α\nl : List α\nl' : List α := dropLast (b :: l)\nb' : α := getLast (b :: l) (_ : b :: l ≠ [])\n⊢ C (a :: (dropLast (b :: l) ++ [getLast (b :: l) (_ : b :: l ≠ [])]))\n[PROOFSTEP]\nhave : C l' := bidirectionalRec H0 H1 Hn l'\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : List α → Sort u_2\nH0 : C []\nH1 : (a : α) → C [a]\nHn : (a : α) → (l : List α) → (b : α) → C l → C (a :: (l ++ [b]))\na b : α\nl : List α\nl' : List α := dropLast (b :: l)\nb' : α := getLast (b :: l) (_ : b :: l ≠ [])\nthis : C l'\n⊢ C (a :: (dropLast (b :: l) ++ [getLast (b :: l) (_ : b :: l ≠ [])]))\n[PROOFSTEP]\nexact Hn a l' b' this\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\na : α\nn : ℕ\n⊢ (∃ k, k ≤ n ∧ l = replicate k a) → l <+ replicate n a\n[PROOFSTEP]\nrintro ⟨k, h, rfl⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn k : ℕ\nh : k ≤ n\n⊢ replicate k a <+ replicate n a\n[PROOFSTEP]\nexact (replicate_sublist_replicate _).mpr h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np✝ : α → Bool\nb : α\nl✝ : List α\np : α → Bool\nl : List α\nn : ℕ\n⊢ findIdx.go p l (n + 1) = findIdx.go p l n + 1\n[PROOFSTEP]\ncases l with\n| nil => unfold List.findIdx.go; exact Nat.succ_eq_add_one n\n| cons head tail =>\n  unfold List.findIdx.go\n  cases p head <;> simp only [cond_false, cond_true]\n  exact\n    findIdx_go_succ p tail\n      (n + 1)\n        -- indexOf_cons_eq _ rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np✝ : α → Bool\nb : α\nl✝ : List α\np : α → Bool\nl : List α\nn : ℕ\n⊢ findIdx.go p l (n + 1) = findIdx.go p l n + 1\n[PROOFSTEP]\ncases l with\n| nil => unfold List.findIdx.go; exact Nat.succ_eq_add_one n\n| cons head tail =>\n  unfold List.findIdx.go\n  cases p head <;> simp only [cond_false, cond_true]\n  exact\n    findIdx_go_succ p tail\n      (n + 1)\n        -- indexOf_cons_eq _ rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np✝ : α → Bool\nb : α\nl : List α\np : α → Bool\nn : ℕ\n⊢ findIdx.go p [] (n + 1) = findIdx.go p [] n + 1\n[PROOFSTEP]\n\n| nil => unfold List.findIdx.go; exact Nat.succ_eq_add_one n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np✝ : α → Bool\nb : α\nl : List α\np : α → Bool\nn : ℕ\n⊢ findIdx.go p [] (n + 1) = findIdx.go p [] n + 1\n[PROOFSTEP]\nunfold List.findIdx.go\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np✝ : α → Bool\nb : α\nl : List α\np : α → Bool\nn : ℕ\n⊢ n + 1 = n + 1\n[PROOFSTEP]\nexact Nat.succ_eq_add_one n\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np✝ : α → Bool\nb : α\nl : List α\np : α → Bool\nn : ℕ\nhead : α\ntail : List α\n⊢ findIdx.go p (head :: tail) (n + 1) = findIdx.go p (head :: tail) n + 1\n[PROOFSTEP]\n\n| cons head tail =>\n  unfold List.findIdx.go\n  cases p head <;> simp only [cond_false, cond_true]\n  exact\n    findIdx_go_succ p tail\n      (n + 1)\n        -- indexOf_cons_eq _ rfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np✝ : α → Bool\nb : α\nl : List α\np : α → Bool\nn : ℕ\nhead : α\ntail : List α\n⊢ findIdx.go p (head :: tail) (n + 1) = findIdx.go p (head :: tail) n + 1\n[PROOFSTEP]\nunfold List.findIdx.go\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np✝ : α → Bool\nb : α\nl : List α\np : α → Bool\nn : ℕ\nhead : α\ntail : List α\n⊢ (bif p head then n + 1 else findIdx.go p tail (n + 1 + 1)) = (bif p head then n else findIdx.go p tail (n + 1)) + 1\n[PROOFSTEP]\ncases p head\n[GOAL]\ncase cons.false\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np✝ : α → Bool\nb : α\nl : List α\np : α → Bool\nn : ℕ\nhead : α\ntail : List α\n⊢ (bif false then n + 1 else findIdx.go p tail (n + 1 + 1)) = (bif false then n else findIdx.go p tail (n + 1)) + 1\n[PROOFSTEP]\nsimp only [cond_false, cond_true]\n[GOAL]\ncase cons.true\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np✝ : α → Bool\nb : α\nl : List α\np : α → Bool\nn : ℕ\nhead : α\ntail : List α\n⊢ (bif true then n + 1 else findIdx.go p tail (n + 1 + 1)) = (bif true then n else findIdx.go p tail (n + 1)) + 1\n[PROOFSTEP]\nsimp only [cond_false, cond_true]\n[GOAL]\ncase cons.false\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np✝ : α → Bool\nb : α\nl : List α\np : α → Bool\nn : ℕ\nhead : α\ntail : List α\n⊢ findIdx.go p tail (n + 1 + 1) = findIdx.go p tail (n + 1) + 1\n[PROOFSTEP]\nexact\n  findIdx_go_succ p tail\n    (n + 1)\n      -- indexOf_cons_eq _ rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np : α → Bool\nb : α\nl : List α\n⊢ findIdx p (b :: l) = bif p b then 0 else findIdx p l + 1\n[PROOFSTEP]\ncases H : p b with\n| true => simp [H, findIdx, findIdx.go]\n| false => simp [H, findIdx, findIdx.go, findIdx_go_succ]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np : α → Bool\nb : α\nl : List α\nx✝ : Bool\nH : p b = x✝\n⊢ findIdx p (b :: l) = bif x✝ then 0 else findIdx p l + 1\n[PROOFSTEP]\ncases H : p b with\n| true => simp [H, findIdx, findIdx.go]\n| false => simp [H, findIdx, findIdx.go, findIdx_go_succ]\n[GOAL]\ncase true\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np : α → Bool\nb : α\nl : List α\nH : p b = true\n⊢ findIdx p (b :: l) = bif true then 0 else findIdx p l + 1\n[PROOFSTEP]\n\n| true => simp [H, findIdx, findIdx.go]\n[GOAL]\ncase true\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np : α → Bool\nb : α\nl : List α\nH : p b = true\n⊢ findIdx p (b :: l) = bif true then 0 else findIdx p l + 1\n[PROOFSTEP]\nsimp [H, findIdx, findIdx.go]\n[GOAL]\ncase false\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np : α → Bool\nb : α\nl : List α\nH : p b = false\n⊢ findIdx p (b :: l) = bif false then 0 else findIdx p l + 1\n[PROOFSTEP]\n\n| false => simp [H, findIdx, findIdx.go, findIdx_go_succ]\n[GOAL]\ncase false\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\np : α → Bool\nb : α\nl : List α\nH : p b = false\n⊢ findIdx p (b :: l) = bif false then 0 else findIdx p l + 1\n[PROOFSTEP]\nsimp [H, findIdx, findIdx.go, findIdx_go_succ]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ indexOf a (a :: l) = 0\n[PROOFSTEP]\nrw [indexOf, findIdx_cons, beq_self_eq_true, cond]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nx✝ : a = b\ne : a = b := x✝\n⊢ indexOf a (b :: l) = 0\n[PROOFSTEP]\nrw [e]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nx✝ : a = b\ne : a = b := x✝\n⊢ indexOf b (b :: l) = 0\n[PROOFSTEP]\nexact indexOf_cons_self b l\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nx✝ : a ≠ b\nh : a ≠ b := x✝\n⊢ indexOf a (b :: l) = succ (indexOf a l)\n[PROOFSTEP]\nsimp only [indexOf, findIdx_cons, Bool.cond_eq_ite, beq_iff_eq, h, ite_false]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\n⊢ indexOf a (b :: l) = if a = b then 0 else succ (indexOf a l)\n[PROOFSTEP]\nsimp only [indexOf, findIdx_cons, Bool.cond_eq_ite, beq_iff_eq]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ indexOf a l = length l ↔ ¬a ∈ l\n[PROOFSTEP]\ninduction' l with b l ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\n⊢ indexOf a [] = length [] ↔ ¬a ∈ []\n[PROOFSTEP]\nexact iff_of_true rfl (not_mem_nil _)\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l = length l ↔ ¬a ∈ l\n⊢ indexOf a (b :: l) = length (b :: l) ↔ ¬a ∈ b :: l\n[PROOFSTEP]\nsimp only [length, mem_cons, indexOf_cons]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l = length l ↔ ¬a ∈ l\n⊢ (if a = b then 0 else succ (indexOf a l)) = length l + 1 ↔ ¬(a = b ∨ a ∈ l)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l = length l ↔ ¬a ∈ l\nh : a = b\n⊢ 0 = length l + 1 ↔ ¬(a = b ∨ a ∈ l)\n[PROOFSTEP]\nexact iff_of_false (by rintro ⟨⟩) fun H => H <| Or.inl h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l = length l ↔ ¬a ∈ l\nh : a = b\n⊢ ¬0 = length l + 1\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l = length l ↔ ¬a ∈ l\nh : ¬a = b\n⊢ succ (indexOf a l) = length l + 1 ↔ ¬(a = b ∨ a ∈ l)\n[PROOFSTEP]\nsimp only [h, false_or_iff]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l = length l ↔ ¬a ∈ l\nh : ¬a = b\n⊢ succ (indexOf a l) = length l + 1 ↔ ¬a ∈ l\n[PROOFSTEP]\nrw [← ih]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l = length l ↔ ¬a ∈ l\nh : ¬a = b\n⊢ succ (indexOf a l) = length l + 1 ↔ indexOf a l = length l\n[PROOFSTEP]\nexact succ_inj'\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ indexOf a l ≤ length l\n[PROOFSTEP]\ninduction' l with b l ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\n⊢ indexOf a [] ≤ length []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l ≤ length l\n⊢ indexOf a (b :: l) ≤ length (b :: l)\n[PROOFSTEP]\nsimp only [length, indexOf_cons]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l ≤ length l\n⊢ (if a = b then 0 else succ (indexOf a l)) ≤ length l + 1\n[PROOFSTEP]\nby_cases h : a = b\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l ≤ length l\nh : a = b\n⊢ (if a = b then 0 else succ (indexOf a l)) ≤ length l + 1\n[PROOFSTEP]\nrw [if_pos h]\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l ≤ length l\nh : a = b\n⊢ 0 ≤ length l + 1\n[PROOFSTEP]\nexact Nat.zero_le _\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l ≤ length l\nh : ¬a = b\n⊢ (if a = b then 0 else succ (indexOf a l)) ≤ length l + 1\n[PROOFSTEP]\nrw [if_neg h]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nih : indexOf a l ≤ length l\nh : ¬a = b\n⊢ succ (indexOf a l) ≤ length l + 1\n[PROOFSTEP]\nexact succ_le_succ ih\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nh : a ∈ l₁\n⊢ indexOf a (l₁ ++ l₂) = indexOf a l₁\n[PROOFSTEP]\ninduction' l₁ with d₁ t₁ ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nh✝ : a ∈ l₁\nh : a ∈ []\n⊢ indexOf a ([] ++ l₂) = indexOf a []\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase nil.h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nh✝ : a ∈ l₁\nh : a ∈ []\n⊢ False\n[PROOFSTEP]\nexact not_mem_nil a h\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nh✝ : a ∈ l₁\nd₁ : α\nt₁ : List α\nih : a ∈ t₁ → indexOf a (t₁ ++ l₂) = indexOf a t₁\nh : a ∈ d₁ :: t₁\n⊢ indexOf a (d₁ :: t₁ ++ l₂) = indexOf a (d₁ :: t₁)\n[PROOFSTEP]\nrw [List.cons_append]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nh✝ : a ∈ l₁\nd₁ : α\nt₁ : List α\nih : a ∈ t₁ → indexOf a (t₁ ++ l₂) = indexOf a t₁\nh : a ∈ d₁ :: t₁\n⊢ indexOf a (d₁ :: (t₁ ++ l₂)) = indexOf a (d₁ :: t₁)\n[PROOFSTEP]\nby_cases hh : a = d₁\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nh✝ : a ∈ l₁\nd₁ : α\nt₁ : List α\nih : a ∈ t₁ → indexOf a (t₁ ++ l₂) = indexOf a t₁\nh : a ∈ d₁ :: t₁\nhh : a = d₁\n⊢ indexOf a (d₁ :: (t₁ ++ l₂)) = indexOf a (d₁ :: t₁)\n[PROOFSTEP]\niterate 2 rw [indexOf_cons_eq _ hh]\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nh✝ : a ∈ l₁\nd₁ : α\nt₁ : List α\nih : a ∈ t₁ → indexOf a (t₁ ++ l₂) = indexOf a t₁\nh : a ∈ d₁ :: t₁\nhh : a = d₁\n⊢ indexOf a (d₁ :: (t₁ ++ l₂)) = indexOf a (d₁ :: t₁)\n[PROOFSTEP]\nrw [indexOf_cons_eq _ hh]\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nh✝ : a ∈ l₁\nd₁ : α\nt₁ : List α\nih : a ∈ t₁ → indexOf a (t₁ ++ l₂) = indexOf a t₁\nh : a ∈ d₁ :: t₁\nhh : a = d₁\n⊢ 0 = indexOf a (d₁ :: t₁)\n[PROOFSTEP]\nrw [indexOf_cons_eq _ hh]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nh✝ : a ∈ l₁\nd₁ : α\nt₁ : List α\nih : a ∈ t₁ → indexOf a (t₁ ++ l₂) = indexOf a t₁\nh : a ∈ d₁ :: t₁\nhh : ¬a = d₁\n⊢ indexOf a (d₁ :: (t₁ ++ l₂)) = indexOf a (d₁ :: t₁)\n[PROOFSTEP]\nrw [indexOf_cons_ne _ hh, indexOf_cons_ne _ hh, ih (mem_of_ne_of_mem hh h)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nh : ¬a ∈ l₁\n⊢ indexOf a (l₁ ++ l₂) = length l₁ + indexOf a l₂\n[PROOFSTEP]\ninduction' l₁ with d₁ t₁ ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nh✝ : ¬a ∈ l₁\nh : ¬a ∈ []\n⊢ indexOf a ([] ++ l₂) = length [] + indexOf a l₂\n[PROOFSTEP]\nrw [List.nil_append, List.length, zero_add]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nh✝ : ¬a ∈ l₁\nd₁ : α\nt₁ : List α\nih : ¬a ∈ t₁ → indexOf a (t₁ ++ l₂) = length t₁ + indexOf a l₂\nh : ¬a ∈ d₁ :: t₁\n⊢ indexOf a (d₁ :: t₁ ++ l₂) = length (d₁ :: t₁) + indexOf a l₂\n[PROOFSTEP]\nrw [List.cons_append, indexOf_cons_ne _ (ne_of_not_mem_cons h), List.length, ih (not_mem_of_not_mem_cons h),\n  Nat.succ_add]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nxs : List α\ni j : ℕ\nh₀ : i < length xs\nh₁ : Nodup xs\nh₂ : get? xs i = get? xs j\n⊢ i = j\n[PROOFSTEP]\ninduction xs generalizing i j with\n| nil => cases h₀\n| cons x xs tail_ih =>\n  cases i <;> cases j\n  case zero.zero => rfl\n  case succ.succ =>\n    congr; cases h₁\n    apply tail_ih <;> solve_by_elim [lt_of_succ_lt_succ]\n  all_goals (dsimp at h₂ ; cases' h₁ with _ _ h h')\n  · cases (h x (mem_iff_get?.mpr ⟨_, h₂.symm⟩) rfl)\n  · cases (h x (mem_iff_get?.mpr ⟨_, h₂⟩) rfl)\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nxs : List α\ni j : ℕ\nh₀ : i < length xs\nh₁ : Nodup xs\nh₂ : get? xs i = get? xs j\n⊢ i = j\n[PROOFSTEP]\ninduction xs generalizing i j with\n| nil => cases h₀\n| cons x xs tail_ih =>\n  cases i <;> cases j\n  case zero.zero => rfl\n  case succ.succ =>\n    congr; cases h₁\n    apply tail_ih <;> solve_by_elim [lt_of_succ_lt_succ]\n  all_goals (dsimp at h₂ ; cases' h₁ with _ _ h h')\n  · cases (h x (mem_iff_get?.mpr ⟨_, h₂.symm⟩) rfl)\n  · cases (h x (mem_iff_get?.mpr ⟨_, h₂⟩) rfl)\n[GOAL]\ncase nil\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\ni j : ℕ\nh₀ : i < length []\nh₁ : Nodup []\nh₂ : get? [] i = get? [] j\n⊢ i = j\n[PROOFSTEP]\n\n| nil => cases h₀\n[GOAL]\ncase nil\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\ni j : ℕ\nh₀ : i < length []\nh₁ : Nodup []\nh₂ : get? [] i = get? [] j\n⊢ i = j\n[PROOFSTEP]\ncases h₀\n[GOAL]\ncase cons\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\ni j : ℕ\nh₀ : i < length (x :: xs)\nh₁ : Nodup (x :: xs)\nh₂ : get? (x :: xs) i = get? (x :: xs) j\n⊢ i = j\n[PROOFSTEP]\n\n| cons x xs tail_ih =>\n  cases i <;> cases j\n  case zero.zero => rfl\n  case succ.succ =>\n    congr; cases h₁\n    apply tail_ih <;> solve_by_elim [lt_of_succ_lt_succ]\n  all_goals (dsimp at h₂ ; cases' h₁ with _ _ h h')\n  · cases (h x (mem_iff_get?.mpr ⟨_, h₂.symm⟩) rfl)\n  · cases (h x (mem_iff_get?.mpr ⟨_, h₂⟩) rfl)\n[GOAL]\ncase cons\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\ni j : ℕ\nh₀ : i < length (x :: xs)\nh₁ : Nodup (x :: xs)\nh₂ : get? (x :: xs) i = get? (x :: xs) j\n⊢ i = j\n[PROOFSTEP]\ncases i\n[GOAL]\ncase cons.zero\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nj : ℕ\nh₁ : Nodup (x :: xs)\nh₀ : zero < length (x :: xs)\nh₂ : get? (x :: xs) zero = get? (x :: xs) j\n⊢ zero = j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase cons.succ\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nj : ℕ\nh₁ : Nodup (x :: xs)\nn✝ : ℕ\nh₀ : succ n✝ < length (x :: xs)\nh₂ : get? (x :: xs) (succ n✝) = get? (x :: xs) j\n⊢ succ n✝ = j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase cons.zero.zero\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nh₀ : zero < length (x :: xs)\nh₂ : get? (x :: xs) zero = get? (x :: xs) zero\n⊢ zero = zero\ncase cons.zero.succ\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nh₀ : zero < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) zero = get? (x :: xs) (succ n✝)\n⊢ zero = succ n✝\ncase cons.succ.zero\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nn✝ : ℕ\nh₀ : succ n✝ < length (x :: xs)\nh₂ : get? (x :: xs) (succ n✝) = get? (x :: xs) zero\n⊢ succ n✝ = zero\ncase cons.succ.succ\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nn✝¹ : ℕ\nh₀ : succ n✝¹ < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) (succ n✝¹) = get? (x :: xs) (succ n✝)\n⊢ succ n✝¹ = succ n✝\n[PROOFSTEP]\ncase zero.zero => rfl\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nh₀ : zero < length (x :: xs)\nh₂ : get? (x :: xs) zero = get? (x :: xs) zero\n⊢ zero = zero\n[PROOFSTEP]\ncase zero.zero => rfl\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nh₀ : zero < length (x :: xs)\nh₂ : get? (x :: xs) zero = get? (x :: xs) zero\n⊢ zero = zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons.zero.succ\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nh₀ : zero < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) zero = get? (x :: xs) (succ n✝)\n⊢ zero = succ n✝\ncase cons.succ.zero\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nn✝ : ℕ\nh₀ : succ n✝ < length (x :: xs)\nh₂ : get? (x :: xs) (succ n✝) = get? (x :: xs) zero\n⊢ succ n✝ = zero\ncase cons.succ.succ\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nn✝¹ : ℕ\nh₀ : succ n✝¹ < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) (succ n✝¹) = get? (x :: xs) (succ n✝)\n⊢ succ n✝¹ = succ n✝\n[PROOFSTEP]\ncase succ.succ =>\n  congr; cases h₁\n  apply tail_ih <;> solve_by_elim [lt_of_succ_lt_succ]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nn✝¹ : ℕ\nh₀ : succ n✝¹ < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) (succ n✝¹) = get? (x :: xs) (succ n✝)\n⊢ succ n✝¹ = succ n✝\n[PROOFSTEP]\ncase succ.succ =>\n  congr; cases h₁\n  apply tail_ih <;> solve_by_elim [lt_of_succ_lt_succ]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nn✝¹ : ℕ\nh₀ : succ n✝¹ < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) (succ n✝¹) = get? (x :: xs) (succ n✝)\n⊢ succ n✝¹ = succ n✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_n\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nn✝¹ : ℕ\nh₀ : succ n✝¹ < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) (succ n✝¹) = get? (x :: xs) (succ n✝)\n⊢ n✝¹ = n✝\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase e_n.cons\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nn✝¹ : ℕ\nh₀ : succ n✝¹ < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) (succ n✝¹) = get? (x :: xs) (succ n✝)\na✝¹ : Pairwise (fun x x_1 => x ≠ x_1) xs\na✝ : ∀ (a' : α), a' ∈ xs → x ≠ a'\n⊢ n✝¹ = n✝\n[PROOFSTEP]\napply tail_ih\n[GOAL]\ncase e_n.cons.h₀\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nn✝¹ : ℕ\nh₀ : succ n✝¹ < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) (succ n✝¹) = get? (x :: xs) (succ n✝)\na✝¹ : Pairwise (fun x x_1 => x ≠ x_1) xs\na✝ : ∀ (a' : α), a' ∈ xs → x ≠ a'\n⊢ n✝¹ < length xs\n[PROOFSTEP]\nsolve_by_elim [lt_of_succ_lt_succ]\n[GOAL]\ncase e_n.cons.h₁\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nn✝¹ : ℕ\nh₀ : succ n✝¹ < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) (succ n✝¹) = get? (x :: xs) (succ n✝)\na✝¹ : Pairwise (fun x x_1 => x ≠ x_1) xs\na✝ : ∀ (a' : α), a' ∈ xs → x ≠ a'\n⊢ Nodup xs\n[PROOFSTEP]\nsolve_by_elim [lt_of_succ_lt_succ]\n[GOAL]\ncase e_n.cons.h₂\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nn✝¹ : ℕ\nh₀ : succ n✝¹ < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) (succ n✝¹) = get? (x :: xs) (succ n✝)\na✝¹ : Pairwise (fun x x_1 => x ≠ x_1) xs\na✝ : ∀ (a' : α), a' ∈ xs → x ≠ a'\n⊢ get? xs n✝¹ = get? xs n✝\n[PROOFSTEP]\nsolve_by_elim [lt_of_succ_lt_succ]\n[GOAL]\ncase cons.zero.succ\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nh₀ : zero < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) zero = get? (x :: xs) (succ n✝)\n⊢ zero = succ n✝\ncase cons.succ.zero\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nn✝ : ℕ\nh₀ : succ n✝ < length (x :: xs)\nh₂ : get? (x :: xs) (succ n✝) = get? (x :: xs) zero\n⊢ succ n✝ = zero\n[PROOFSTEP]\nall_goals (dsimp at h₂ ; cases' h₁ with _ _ h h')\n[GOAL]\ncase cons.zero.succ\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nh₀ : zero < length (x :: xs)\nn✝ : ℕ\nh₂ : get? (x :: xs) zero = get? (x :: xs) (succ n✝)\n⊢ zero = succ n✝\n[PROOFSTEP]\ndsimp at h₂ \n[GOAL]\ncase cons.zero.succ\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nh₀ : zero < length (x :: xs)\nn✝ : ℕ\nh₂ : some x = get? xs n✝\n⊢ zero = succ n✝\n[PROOFSTEP]\ncases' h₁ with _ _ h h'\n[GOAL]\ncase cons.succ.zero\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nn✝ : ℕ\nh₀ : succ n✝ < length (x :: xs)\nh₂ : get? (x :: xs) (succ n✝) = get? (x :: xs) zero\n⊢ succ n✝ = zero\n[PROOFSTEP]\ndsimp at h₂ \n[GOAL]\ncase cons.succ.zero\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₁ : Nodup (x :: xs)\nn✝ : ℕ\nh₀ : succ n✝ < length (x :: xs)\nh₂ : get? xs n✝ = some x\n⊢ succ n✝ = zero\n[PROOFSTEP]\ncases' h₁ with _ _ h h'\n[GOAL]\ncase cons.zero.succ.cons\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nh₀ : zero < length (x :: xs)\nn✝ : ℕ\nh₂ : some x = get? xs n✝\nh' : Pairwise (fun x x_1 => x ≠ x_1) xs\nh : ∀ (a' : α), a' ∈ xs → x ≠ a'\n⊢ zero = succ n✝\n[PROOFSTEP]\ncases (h x (mem_iff_get?.mpr ⟨_, h₂.symm⟩) rfl)\n[GOAL]\ncase cons.succ.zero.cons\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u\nx : α\nxs : List α\ntail_ih : ∀ {i j : ℕ}, i < length xs → Nodup xs → get? xs i = get? xs j → i = j\nn✝ : ℕ\nh₀ : succ n✝ < length (x :: xs)\nh₂ : get? xs n✝ = some x\nh' : Pairwise (fun x x_1 => x ≠ x_1) xs\nh : ∀ (a' : α), a' ∈ xs → x ≠ a'\n⊢ succ n✝ = zero\n[PROOFSTEP]\ncases (h x (mem_iff_get?.mpr ⟨_, h₂⟩) rfl)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L L' : List α\nh : L = L'\ni : ℕ\nhi : i < length L\n⊢ nthLe L i hi = nthLe L' i (_ : i < length L')\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nL : List α\nh : 0 < length L\n⊢ nthLe L 0 h = head! L\n[PROOFSTEP]\ncases L\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nh : 0 < length []\n⊢ nthLe [] 0 h = head! []\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nhead✝ : α\ntail✝ : List α\nh : 0 < length (head✝ :: tail✝)\n⊢ nthLe (head✝ :: tail✝) 0 h = head! (head✝ :: tail✝)\n[PROOFSTEP]\ncases h\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nhead✝ : α\ntail✝ : List α\nh : 0 < length (head✝ :: tail✝)\n⊢ nthLe (head✝ :: tail✝) 0 h = head! (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [nthLe]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nh : length l - 1 < length l\n⊢ l ≠ []\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nh : length [] - 1 < length []\n⊢ False\n[PROOFSTEP]\nexact Nat.lt_irrefl 0 h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nh : length l - 1 < length l\n⊢ l ≠ []\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nh : length [] - 1 < length []\n⊢ False\n[PROOFSTEP]\nexact Nat.lt_irrefl 0 h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\nxs : List α\nn : ℕ\nh : n = length xs\n⊢ n < length (x :: xs)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : ℕ\nh : n < length l\n⊢ take 1 (drop n l) = [get l { val := n, isLt := h }]\n[PROOFSTEP]\ninduction' l with x l ih generalizing n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝ : ℕ\nh✝ : n✝ < length l\nn : ℕ\nh : n < length []\n⊢ take 1 (drop n []) = [get [] { val := n, isLt := h }]\n[PROOFSTEP]\ncases h\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nn✝ : ℕ\nh✝ : n✝ < length l✝\nx : α\nl : List α\nih : ∀ {n : ℕ} (h : n < length l), take 1 (drop n l) = [get l { val := n, isLt := h }]\nn : ℕ\nh : n < length (x :: l)\n⊢ take 1 (drop n (x :: l)) = [get (x :: l) { val := n, isLt := h }]\n[PROOFSTEP]\nby_cases h₁ : l = []\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nn✝ : ℕ\nh✝ : n✝ < length l✝\nx : α\nl : List α\nih : ∀ {n : ℕ} (h : n < length l), take 1 (drop n l) = [get l { val := n, isLt := h }]\nn : ℕ\nh : n < length (x :: l)\nh₁ : l = []\n⊢ take 1 (drop n (x :: l)) = [get (x :: l) { val := n, isLt := h }]\n[PROOFSTEP]\nsubst h₁\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝ : ℕ\nh✝ : n✝ < length l\nx : α\nn : ℕ\nih : ∀ {n : ℕ} (h : n < length []), take 1 (drop n []) = [get [] { val := n, isLt := h }]\nh : n < length [x]\n⊢ take 1 (drop n [x]) = [get [x] { val := n, isLt := h }]\n[PROOFSTEP]\nrw [get_singleton]\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝ : ℕ\nh✝ : n✝ < length l\nx : α\nn : ℕ\nih : ∀ {n : ℕ} (h : n < length []), take 1 (drop n []) = [get [] { val := n, isLt := h }]\nh : n < length [x]\n⊢ take 1 (drop n [x]) = [x]\n[PROOFSTEP]\nsimp [lt_succ_iff] at h \n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝ : ℕ\nh✝ : n✝ < length l\nx : α\nn : ℕ\nih : ∀ {n : ℕ} (h : n < length []), take 1 (drop n []) = [get [] { val := n, isLt := h }]\nh : n = 0\n⊢ take 1 (drop n [x]) = [x]\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : ℕ\nh : n < length l\nx : α\nih : ∀ {n : ℕ} (h : n < length []), take 1 (drop n []) = [get [] { val := n, isLt := h }]\n⊢ take 1 (drop 0 [x]) = [x]\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nn✝ : ℕ\nh✝ : n✝ < length l✝\nx : α\nl : List α\nih : ∀ {n : ℕ} (h : n < length l), take 1 (drop n l) = [get l { val := n, isLt := h }]\nn : ℕ\nh : n < length (x :: l)\nh₁ : ¬l = []\n⊢ take 1 (drop n (x :: l)) = [get (x :: l) { val := n, isLt := h }]\n[PROOFSTEP]\nhave h₂ := h\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nn✝ : ℕ\nh✝ : n✝ < length l✝\nx : α\nl : List α\nih : ∀ {n : ℕ} (h : n < length l), take 1 (drop n l) = [get l { val := n, isLt := h }]\nn : ℕ\nh : n < length (x :: l)\nh₁ : ¬l = []\nh₂ : n < length (x :: l)\n⊢ take 1 (drop n (x :: l)) = [get (x :: l) { val := n, isLt := h }]\n[PROOFSTEP]\nrw [length_cons, Nat.lt_succ_iff, le_iff_eq_or_lt] at h₂ \n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nn✝ : ℕ\nh✝ : n✝ < length l✝\nx : α\nl : List α\nih : ∀ {n : ℕ} (h : n < length l), take 1 (drop n l) = [get l { val := n, isLt := h }]\nn : ℕ\nh : n < length (x :: l)\nh₁ : ¬l = []\nh₂ : n = length l ∨ n < length l\n⊢ take 1 (drop n (x :: l)) = [get (x :: l) { val := n, isLt := h }]\n[PROOFSTEP]\ncases n\n[GOAL]\ncase neg.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nn : ℕ\nh✝ : n < length l✝\nx : α\nl : List α\nih : ∀ {n : ℕ} (h : n < length l), take 1 (drop n l) = [get l { val := n, isLt := h }]\nh₁ : ¬l = []\nh : zero < length (x :: l)\nh₂ : zero = length l ∨ zero < length l\n⊢ take 1 (drop zero (x :: l)) = [get (x :: l) { val := zero, isLt := h }]\n[PROOFSTEP]\nsimp [get]\n[GOAL]\ncase neg.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nn : ℕ\nh✝ : n < length l✝\nx : α\nl : List α\nih : ∀ {n : ℕ} (h : n < length l), take 1 (drop n l) = [get l { val := n, isLt := h }]\nh₁ : ¬l = []\nn✝ : ℕ\nh : succ n✝ < length (x :: l)\nh₂ : succ n✝ = length l ∨ succ n✝ < length l\n⊢ take 1 (drop (succ n✝) (x :: l)) = [get (x :: l) { val := succ n✝, isLt := h }]\n[PROOFSTEP]\nrw [drop, get]\n[GOAL]\ncase neg.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nn : ℕ\nh✝ : n < length l✝\nx : α\nl : List α\nih : ∀ {n : ℕ} (h : n < length l), take 1 (drop n l) = [get l { val := n, isLt := h }]\nh₁ : ¬l = []\nn✝ : ℕ\nh : succ n✝ < length (x :: l)\nh₂ : succ n✝ = length l ∨ succ n✝ < length l\n⊢ take 1 (drop n✝ l) = [get l { val := n✝, isLt := (_ : succ n✝ ≤ length l) }]\n[PROOFSTEP]\napply ih\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nh : indexOf a (b :: l) < length (b :: l)\n⊢ get (b :: l) { val := indexOf a (b :: l), isLt := h } = a\n[PROOFSTEP]\nby_cases h' : a = b\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nh : indexOf a (b :: l) < length (b :: l)\nh' : a = b\n⊢ get (b :: l) { val := indexOf a (b :: l), isLt := h } = a\n[PROOFSTEP]\nsimp only [h', if_pos, if_false, indexOf_cons, get, @indexOf_get _ _ l]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nh : indexOf a (b :: l) < length (b :: l)\nh' : ¬a = b\n⊢ get (b :: l) { val := indexOf a (b :: l), isLt := h } = a\n[PROOFSTEP]\nsimp only [h', if_pos, if_false, indexOf_cons, get, @indexOf_get _ _ l]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\nh : a ∈ l\n⊢ get? l (indexOf a l) = some a\n[PROOFSTEP]\nrw [nthLe_get?, indexOf_nthLe (indexOf_lt_length.2 h)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl r : List α\ni : ℕ\n⊢ ∀ (h1 : i + length (a :: l) < length (reverseAux (a :: l) r)) (h2 : i < length r),\n    get (reverseAux (a :: l) r) { val := i + length (a :: l), isLt := h1 } = get r { val := i, isLt := h2 }\n[PROOFSTEP]\nrw [show i + length (a :: l) = i + 1 + length l from add_right_comm i (length l) 1]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl r : List α\ni : ℕ\n⊢ ∀ (h1 : i + 1 + length l < length (reverseAux (a :: l) r)) (h2 : i < length r),\n    get (reverseAux (a :: l) r) { val := i + 1 + length l, isLt := h1 } = get r { val := i, isLt := h2 }\n[PROOFSTEP]\nexact fun h1 h2 => get_reverse_aux₁ l (a :: r) (i + 1) h1 (succ_lt_succ h2)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\nx y : α\nhx : x ∈ l\nhy : y ∈ l\nh : indexOf x l = indexOf y l\n⊢ x = y\n[PROOFSTEP]\nhave x_eq_y : get l ⟨indexOf x l, indexOf_lt_length.2 hx⟩ = get l ⟨indexOf y l, indexOf_lt_length.2 hy⟩ := by\n  simp only [h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\nx y : α\nhx : x ∈ l\nhy : y ∈ l\nh : indexOf x l = indexOf y l\n⊢ get l { val := indexOf x l, isLt := (_ : indexOf x l < length l) } =\n    get l { val := indexOf y l, isLt := (_ : indexOf y l < length l) }\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\nx y : α\nhx : x ∈ l\nhy : y ∈ l\nh : indexOf x l = indexOf y l\nx_eq_y :\n  get l { val := indexOf x l, isLt := (_ : indexOf x l < length l) } =\n    get l { val := indexOf y l, isLt := (_ : indexOf y l < length l) }\n⊢ x = y\n[PROOFSTEP]\nsimp only [indexOf_get] at x_eq_y \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\nx y : α\nhx : x ∈ l\nhy : y ∈ l\nh : indexOf x l = indexOf y l\nx_eq_y : x = y\n⊢ x = y\n[PROOFSTEP]\nexact x_eq_y\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\nx y : α\nhx : x ∈ l\nhy : y ∈ l\nh : x = y\n⊢ indexOf x l = indexOf y l\n[PROOFSTEP]\nsubst h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\nx : α\nhx hy : x ∈ l\n⊢ indexOf x l = indexOf x l\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl r : List α\nh1 : length (a :: l) - 1 - 0 < length (reverseAux (a :: l) r)\nx✝ : 0 < length (a :: l)\n⊢ get (reverseAux (a :: l) r) { val := length (a :: l) - 1 - 0, isLt := h1 } = get (a :: l) { val := 0, isLt := x✝ }\n[PROOFSTEP]\nhave aux := get_reverse_aux₁ l (a :: r) 0\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl r : List α\nh1 : length (a :: l) - 1 - 0 < length (reverseAux (a :: l) r)\nx✝ : 0 < length (a :: l)\naux :\n  ∀ (h1 : 0 + length l < length (reverseAux l (a :: r))) (h2 : 0 < length (a :: r)),\n    get (reverseAux l (a :: r)) { val := 0 + length l, isLt := h1 } = get (a :: r) { val := 0, isLt := h2 }\n⊢ get (reverseAux (a :: l) r) { val := length (a :: l) - 1 - 0, isLt := h1 } = get (a :: l) { val := 0, isLt := x✝ }\n[PROOFSTEP]\nrw [zero_add] at aux \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl r : List α\nh1 : length (a :: l) - 1 - 0 < length (reverseAux (a :: l) r)\nx✝ : 0 < length (a :: l)\naux :\n  ∀ (h1 : length l < length (reverseAux l (a :: r))) (h2 : 0 < length (a :: r)),\n    get (reverseAux l (a :: r)) { val := length l, isLt := h1 } = get (a :: r) { val := 0, isLt := h2 }\n⊢ get (reverseAux (a :: l) r) { val := length (a :: l) - 1 - 0, isLt := h1 } = get (a :: l) { val := 0, isLt := x✝ }\n[PROOFSTEP]\nexact aux _ (zero_lt_succ _)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl r : List α\ni : ℕ\nh1 : length (a :: l) - 1 - (i + 1) < length (reverseAux (a :: l) r)\nh2 : i + 1 < length (a :: l)\n⊢ get (reverseAux (a :: l) r) { val := length (a :: l) - 1 - (i + 1), isLt := h1 } =\n    get (a :: l) { val := i + 1, isLt := h2 }\n[PROOFSTEP]\nhave aux := get_reverse_aux₂ l (a :: r) i\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl r : List α\ni : ℕ\nh1 : length (a :: l) - 1 - (i + 1) < length (reverseAux (a :: l) r)\nh2 : i + 1 < length (a :: l)\naux :\n  ∀ (h1 : length l - 1 - i < length (reverseAux l (a :: r))) (h2 : i < length l),\n    get (reverseAux l (a :: r)) { val := length l - 1 - i, isLt := h1 } = get l { val := i, isLt := h2 }\n⊢ get (reverseAux (a :: l) r) { val := length (a :: l) - 1 - (i + 1), isLt := h1 } =\n    get (a :: l) { val := i + 1, isLt := h2 }\n[PROOFSTEP]\nhave heq :=\n  calc\n    length (a :: l) - 1 - (i + 1) = length l - (1 + i) := by rw [add_comm]; rfl\n    _ = length l - 1 - i := by rw [← tsub_add_eq_tsub_tsub]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl r : List α\ni : ℕ\nh1 : length (a :: l) - 1 - (i + 1) < length (reverseAux (a :: l) r)\nh2 : i + 1 < length (a :: l)\naux :\n  ∀ (h1 : length l - 1 - i < length (reverseAux l (a :: r))) (h2 : i < length l),\n    get (reverseAux l (a :: r)) { val := length l - 1 - i, isLt := h1 } = get l { val := i, isLt := h2 }\n⊢ length (a :: l) - 1 - (i + 1) = length l - (1 + i)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl r : List α\ni : ℕ\nh1 : length (a :: l) - 1 - (i + 1) < length (reverseAux (a :: l) r)\nh2 : i + 1 < length (a :: l)\naux :\n  ∀ (h1 : length l - 1 - i < length (reverseAux l (a :: r))) (h2 : i < length l),\n    get (reverseAux l (a :: r)) { val := length l - 1 - i, isLt := h1 } = get l { val := i, isLt := h2 }\n⊢ length (a :: l) - 1 - (1 + i) = length l - (1 + i)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl r : List α\ni : ℕ\nh1 : length (a :: l) - 1 - (i + 1) < length (reverseAux (a :: l) r)\nh2 : i + 1 < length (a :: l)\naux :\n  ∀ (h1 : length l - 1 - i < length (reverseAux l (a :: r))) (h2 : i < length l),\n    get (reverseAux l (a :: r)) { val := length l - 1 - i, isLt := h1 } = get l { val := i, isLt := h2 }\n⊢ length l - (1 + i) = length l - 1 - i\n[PROOFSTEP]\nrw [← tsub_add_eq_tsub_tsub]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl r : List α\ni : ℕ\nh1 : length (a :: l) - 1 - (i + 1) < length (reverseAux (a :: l) r)\nh2 : i + 1 < length (a :: l)\naux :\n  ∀ (h1 : length l - 1 - i < length (reverseAux l (a :: r))) (h2 : i < length l),\n    get (reverseAux l (a :: r)) { val := length l - 1 - i, isLt := h1 } = get l { val := i, isLt := h2 }\nheq : length (a :: l) - 1 - (i + 1) = length l - 1 - i\n⊢ get (reverseAux (a :: l) r) { val := length (a :: l) - 1 - (i + 1), isLt := h1 } =\n    get (a :: l) { val := i + 1, isLt := h2 }\n[PROOFSTEP]\nrw [← heq] at aux \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl r : List α\ni : ℕ\nh1 : length (a :: l) - 1 - (i + 1) < length (reverseAux (a :: l) r)\nh2 : i + 1 < length (a :: l)\naux :\n  ∀ (h1 : length (a :: l) - 1 - (i + 1) < length (reverseAux l (a :: r))) (h2 : i < length l),\n    get (reverseAux l (a :: r)) { val := length (a :: l) - 1 - (i + 1), isLt := h1 } = get l { val := i, isLt := h2 }\nheq : length (a :: l) - 1 - (i + 1) = length l - 1 - i\n⊢ get (reverseAux (a :: l) r) { val := length (a :: l) - 1 - (i + 1), isLt := h1 } =\n    get (a :: l) { val := i + 1, isLt := h2 }\n[PROOFSTEP]\napply aux\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : ℕ\nhn : n < length (reverse l)\nhn' : length l - 1 - n < length l\n⊢ nthLe (reverse l) n hn = nthLe l (length l - 1 - n) hn'\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : ℕ\nhn : n < length (reverse l)\nhn' : length l - 1 - n < length l\n⊢ nthLe l (length l - 1 - n) hn' = nthLe (reverse l) n hn\n[PROOFSTEP]\nconvert nthLe_reverse l.reverse n (by simpa) hn using 1\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : ℕ\nhn : n < length (reverse l)\nhn' : length l - 1 - n < length l\n⊢ length (reverse l) - 1 - n < length (reverse (reverse l))\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase h.e'_2\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : ℕ\nhn : n < length (reverse l)\nhn' : length l - 1 - n < length l\n⊢ nthLe l (length l - 1 - n) hn' =\n    nthLe (reverse (reverse l)) (length (reverse l) - 1 - n)\n      (_ : length (reverse l) - 1 - n < length (reverse (reverse l)))\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nh : length l = 1\n⊢ l = [nthLe l 0 (_ : 0 < length l)]\n[PROOFSTEP]\nrefine' ext_get (by convert h) fun n h₁ h₂ => _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nh : length l = 1\n⊢ length l = length [nthLe l 0 (_ : 0 < length l)]\n[PROOFSTEP]\nconvert h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nh : length l = 1\nn : ℕ\nh₁ : n < length l\nh₂ : n < length [nthLe l 0 (_ : 0 < length l)]\n⊢ get l { val := n, isLt := h₁ } = get [nthLe l 0 (_ : 0 < length l)] { val := n, isLt := h₂ }\n[PROOFSTEP]\nsimp only [get_singleton]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nh : length l = 1\nn : ℕ\nh₁ : n < length l\nh₂ : n < length [nthLe l 0 (_ : 0 < length l)]\n⊢ get l { val := n, isLt := h₁ } = nthLe l 0 (_ : 0 < length l)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_val\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nh : length l = 1\nn : ℕ\nh₁ : n < length l\nh₂ : n < length [nthLe l 0 (_ : 0 < length l)]\n⊢ n = 0\n[PROOFSTEP]\nexact eq_bot_iff.mpr (Nat.lt_succ_iff.mp h₂)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : Fin (length l)\nx : α\n⊢ get l n = x ↔ get? l ↑n = some x\n[PROOFSTEP]\nrw [get?_eq_some]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : Fin (length l)\nx : α\n⊢ get l n = x ↔ ∃ h, get l { val := ↑n, isLt := h } = x\n[PROOFSTEP]\nsimp [n.2]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : List α → List α\nm n : ℕ\nl : List α\nh : n ≤ m\n⊢ modifyNthTail g m (modifyNthTail f n l) = modifyNthTail (fun l => modifyNthTail g (m - n) (f l)) n l\n[PROOFSTEP]\nrcases exists_add_of_le h with ⟨m, rfl⟩\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : List α → List α\nn : ℕ\nl : List α\nm : ℕ\nh : n ≤ n + m\n⊢ modifyNthTail g (n + m) (modifyNthTail f n l) = modifyNthTail (fun l => modifyNthTail g (n + m - n) (f l)) n l\n[PROOFSTEP]\nrw [@add_tsub_cancel_left, add_comm, modifyNthTail_modifyNthTail]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : List α → List α\nn : ℕ\nl : List α\n⊢ modifyNthTail g n (modifyNthTail f n l) = modifyNthTail (g ∘ f) n l\n[PROOFSTEP]\nrw [modifyNthTail_modifyNthTail_le n n l (le_refl n), tsub_self]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : List α → List α\nn : ℕ\nl : List α\n⊢ modifyNthTail (fun l => modifyNthTail g 0 (f l)) n l = modifyNthTail (g ∘ f) n l\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\n⊢ removeNth l 0 = modifyNthTail tail 0 l\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ removeNth [] 0 = modifyNthTail tail 0 []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhead✝ : α\ntail✝ : List α\n⊢ removeNth (head✝ :: tail✝) 0 = modifyNthTail tail 0 (head✝ :: tail✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\nl : List α\n⊢ modifyNth f 0 l = Option.getD ((fun a => set l 0 (f a)) <$> get? l 0) l\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\n⊢ modifyNth f 0 [] = Option.getD ((fun a => set [] 0 (f a)) <$> get? [] 0) []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\nhead✝ : α\ntail✝ : List α\n⊢ modifyNth f 0 (head✝ :: tail✝) =\n    Option.getD ((fun a => set (head✝ :: tail✝) 0 (f a)) <$> get? (head✝ :: tail✝) 0) (head✝ :: tail✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\nn : ℕ\nb : α\nl : List α\n⊢ b :: Option.getD ((fun a => set l n (f a)) <$> get? l n) l =\n    Option.getD ((fun a => set (b :: l) (n + 1) (f a)) <$> get? (b :: l) (n + 1)) (b :: l)\n[PROOFSTEP]\ncases get? l n\n[GOAL]\ncase none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\nn : ℕ\nb : α\nl : List α\n⊢ b :: Option.getD ((fun a => set l n (f a)) <$> none) l =\n    Option.getD ((fun a => set (b :: l) (n + 1) (f a)) <$> none) (b :: l)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\nn : ℕ\nb : α\nl : List α\nval✝ : α\n⊢ b :: Option.getD ((fun a => set l n (f a)) <$> some val✝) l =\n    Option.getD ((fun a => set (b :: l) (n + 1) (f a)) <$> some val✝) (b :: l)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\ni j : ℕ\nh : i ≠ j\na : α\nhj : j < length (set l i a)\n⊢ j < length l\n[PROOFSTEP]\nsimpa using hj\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\ni j : ℕ\nh : i ≠ j\na : α\nhj : j < length (set l i a)\n⊢ get (set l i a) { val := j, isLt := hj } = get l { val := j, isLt := (_ : j < length l) }\n[PROOFSTEP]\nrw [← Option.some_inj, ← List.get?_eq_get, List.get?_set_ne _ _ h, List.get?_eq_get]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\ni j : ℕ\nh : i ≠ j\na : α\nhj : j < length (set l i a)\n⊢ j < length l\n[PROOFSTEP]\nsimpa using hj\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn : ℕ\nl : List α\n⊢ removeNth (insertNth n a l) n = l\n[PROOFSTEP]\nrw [removeNth_eq_nth_tail, insertNth, modifyNthTail_modifyNthTail_same]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn : ℕ\nl : List α\n⊢ modifyNthTail (tail ∘ cons a) n l = l\n[PROOFSTEP]\nexact modifyNthTail_id _ _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na head✝ : α\nas : List α\nx✝¹ : 0 < length (head✝ :: as)\nx✝ : 0 ≤ 0\n⊢ insertNth 0 a (removeNth (head✝ :: as) 0) = removeNth (insertNth (0 + 1) a (head✝ :: as)) 0\n[PROOFSTEP]\nsimp [removeNth, insertNth]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na✝ a b : α\nj : ℕ\nl : List α\n⊢ 0 ≤ j → j ≤ length l → insertNth (j + 1) b (insertNth 0 a l) = insertNth 0 a (insertNth j b l)\n[PROOFSTEP]\nsimp [insertNth]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na✝ a b : α\ni j : ℕ\n⊢ i + 1 ≤ j + 1 →\n    j + 1 ≤ length [] → insertNth (j + 1 + 1) b (insertNth (i + 1) a []) = insertNth (i + 1) a (insertNth (j + 1) b [])\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na✝ a b : α\ni j : ℕ\nc : α\nl : List α\nh₀ : i + 1 ≤ j + 1\nh₁ : j + 1 ≤ length (c :: l)\n⊢ insertNth (j + 1 + 1) b (insertNth (i + 1) a (c :: l)) = insertNth (i + 1) a (insertNth (j + 1) b (c :: l))\n[PROOFSTEP]\nsimp [insertNth]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na✝ a b : α\ni j : ℕ\nc : α\nl : List α\nh₀ : i + 1 ≤ j + 1\nh₁ : j + 1 ≤ length (c :: l)\n⊢ modifyNthTail (cons b) (j + 1) (modifyNthTail (cons a) i l) = modifyNthTail (cons a) i (modifyNthTail (cons b) j l)\n[PROOFSTEP]\nexact insertNth_comm a b i j l (Nat.le_of_succ_le_succ h₀) (Nat.le_of_succ_le_succ h₁)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na✝ a b : α\nas : List α\nx✝ : 0 ≤ length as\n⊢ a ∈ insertNth 0 b as ↔ a = b ∨ a ∈ as\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na✝ a b : α\nn : ℕ\na' : α\nas : List α\nh : n + 1 ≤ length (a' :: as)\n⊢ a ∈ insertNth (n + 1) b (a' :: as) ↔ a = b ∨ a ∈ a' :: as\n[PROOFSTEP]\nrw [List.insertNth_succ_cons, mem_cons, mem_insertNth (Nat.le_of_succ_le_succ h), ← or_assoc, @or_comm (a = a'),\n  or_assoc, mem_cons]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nh : length l < n\n⊢ insertNth n x l = l\n[PROOFSTEP]\ninduction' l with hd tl IH generalizing n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn✝ : ℕ\nh✝ : length l < n✝\nn : ℕ\nh : length [] < n\n⊢ insertNth n x [] = []\n[PROOFSTEP]\ncases n\n[GOAL]\ncase nil.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nh✝ : length l < n\nh : length [] < zero\n⊢ insertNth zero x [] = []\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase nil.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nh✝ : length l < n\nn✝ : ℕ\nh : length [] < succ n✝\n⊢ insertNth (succ n✝) x [] = []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn✝ : ℕ\nh✝ : length l < n✝\nhd : α\ntl : List α\nIH : ∀ (n : ℕ), length tl < n → insertNth n x tl = tl\nn : ℕ\nh : length (hd :: tl) < n\n⊢ insertNth n x (hd :: tl) = hd :: tl\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nh✝ : length l < n\nhd : α\ntl : List α\nIH : ∀ (n : ℕ), length tl < n → insertNth n x tl = tl\nh : length (hd :: tl) < zero\n⊢ insertNth zero x (hd :: tl) = hd :: tl\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nh✝ : length l < n\nhd : α\ntl : List α\nIH : ∀ (n : ℕ), length tl < n → insertNth n x tl = tl\nn✝ : ℕ\nh : length (hd :: tl) < succ n✝\n⊢ insertNth (succ n✝) x (hd :: tl) = hd :: tl\n[PROOFSTEP]\nsimp only [Nat.succ_lt_succ_iff, length] at h \n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nh✝ : length l < n\nhd : α\ntl : List α\nIH : ∀ (n : ℕ), length tl < n → insertNth n x tl = tl\nn✝ : ℕ\nh : length tl < n✝\n⊢ insertNth (succ n✝) x (hd :: tl) = hd :: tl\n[PROOFSTEP]\nsimpa using IH _ h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\n⊢ insertNth (length l) x l = l ++ [x]\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na x : α\n⊢ insertNth (length []) x [] = [] ++ [x]\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na x hd : α\ntl : List α\nIH : insertNth (length tl) x tl = tl ++ [x]\n⊢ insertNth (length (hd :: tl)) x (hd :: tl) = hd :: tl ++ [x]\n[PROOFSTEP]\nsimpa using IH\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\n⊢ length l ≤ length (insertNth n x l)\n[PROOFSTEP]\ncases' le_or_lt n l.length with hn hn\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn : n ≤ length l\n⊢ length l ≤ length (insertNth n x l)\n[PROOFSTEP]\nrw [length_insertNth _ _ hn]\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn : n ≤ length l\n⊢ length l ≤ length l + 1\n[PROOFSTEP]\nexact (Nat.lt_succ_self _).le\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn : length l < n\n⊢ length l ≤ length (insertNth n x l)\n[PROOFSTEP]\nrw [insertNth_of_length_lt _ _ _ hn]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\n⊢ length (insertNth n x l) ≤ length l + 1\n[PROOFSTEP]\ncases' le_or_lt n l.length with hn hn\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn : n ≤ length l\n⊢ length (insertNth n x l) ≤ length l + 1\n[PROOFSTEP]\nrw [length_insertNth _ _ hn]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn : length l < n\n⊢ length (insertNth n x l) ≤ length l + 1\n[PROOFSTEP]\nrw [insertNth_of_length_lt _ _ _ hn]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn : length l < n\n⊢ length l ≤ length l + 1\n[PROOFSTEP]\nexact (Nat.lt_succ_self _).le\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn k : ℕ\nhn : k < n\nhk : k < length l\nhk' : optParam (k < length (insertNth n x l)) (_ : k < length (insertNth n x l))\n⊢ get (insertNth n x l) { val := k, isLt := hk' } = get l { val := k, isLt := hk }\n[PROOFSTEP]\ninduction' n with n IH generalizing k l\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl✝ : List α\nx : α\nn k✝ : ℕ\nhn✝ : k✝ < n\nhk✝ : k✝ < length l✝\nhk'✝ : optParam (k✝ < length (insertNth n x l✝)) (_ : k✝ < length (insertNth n x l✝))\nl : List α\nk : ℕ\nhn : k < zero\nhk : k < length l\nhk' : optParam (k < length (insertNth zero x l)) (_ : k < length (insertNth zero x l))\n⊢ get (insertNth zero x l) { val := k, isLt := hk' } = get l { val := k, isLt := hk }\n[PROOFSTEP]\nsimp at hn \n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl✝ : List α\nx : α\nn✝ k✝ : ℕ\nhn✝ : k✝ < n✝\nhk✝ : k✝ < length l✝\nhk'✝ : optParam (k✝ < length (insertNth n✝ x l✝)) (_ : k✝ < length (insertNth n✝ x l✝))\nn : ℕ\nIH :\n  ∀ (l : List α) (k : ℕ),\n    k < n →\n      ∀ (hk : k < length l) (hk' : optParam (k < length (insertNth n x l)) (_ : k < length (insertNth n x l))),\n        get (insertNth n x l) { val := k, isLt := hk' } = get l { val := k, isLt := hk }\nl : List α\nk : ℕ\nhn : k < succ n\nhk : k < length l\nhk' : optParam (k < length (insertNth (succ n) x l)) (_ : k < length (insertNth (succ n) x l))\n⊢ get (insertNth (succ n) x l) { val := k, isLt := hk' } = get l { val := k, isLt := hk }\n[PROOFSTEP]\ncases' l with hd tl\n[GOAL]\ncase succ.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn✝ k✝ : ℕ\nhn✝ : k✝ < n✝\nhk✝ : k✝ < length l\nhk'✝ : optParam (k✝ < length (insertNth n✝ x l)) (_ : k✝ < length (insertNth n✝ x l))\nn : ℕ\nIH :\n  ∀ (l : List α) (k : ℕ),\n    k < n →\n      ∀ (hk : k < length l) (hk' : optParam (k < length (insertNth n x l)) (_ : k < length (insertNth n x l))),\n        get (insertNth n x l) { val := k, isLt := hk' } = get l { val := k, isLt := hk }\nk : ℕ\nhn : k < succ n\nhk : k < length []\nhk' : optParam (k < length (insertNth (succ n) x [])) (_ : k < length (insertNth (succ n) x []))\n⊢ get (insertNth (succ n) x []) { val := k, isLt := hk' } = get [] { val := k, isLt := hk }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn✝ k✝ : ℕ\nhn✝ : k✝ < n✝\nhk✝ : k✝ < length l\nhk'✝ : optParam (k✝ < length (insertNth n✝ x l)) (_ : k✝ < length (insertNth n✝ x l))\nn : ℕ\nIH :\n  ∀ (l : List α) (k : ℕ),\n    k < n →\n      ∀ (hk : k < length l) (hk' : optParam (k < length (insertNth n x l)) (_ : k < length (insertNth n x l))),\n        get (insertNth n x l) { val := k, isLt := hk' } = get l { val := k, isLt := hk }\nk : ℕ\nhn : k < succ n\nhd : α\ntl : List α\nhk : k < length (hd :: tl)\nhk' : optParam (k < length (insertNth (succ n) x (hd :: tl))) (_ : k < length (insertNth (succ n) x (hd :: tl)))\n⊢ get (insertNth (succ n) x (hd :: tl)) { val := k, isLt := hk' } = get (hd :: tl) { val := k, isLt := hk }\n[PROOFSTEP]\ncases k\n[GOAL]\ncase succ.cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn✝ k : ℕ\nhn✝ : k < n✝\nhk✝ : k < length l\nhk'✝ : optParam (k < length (insertNth n✝ x l)) (_ : k < length (insertNth n✝ x l))\nn : ℕ\nIH :\n  ∀ (l : List α) (k : ℕ),\n    k < n →\n      ∀ (hk : k < length l) (hk' : optParam (k < length (insertNth n x l)) (_ : k < length (insertNth n x l))),\n        get (insertNth n x l) { val := k, isLt := hk' } = get l { val := k, isLt := hk }\nhd : α\ntl : List α\nhn : zero < succ n\nhk : zero < length (hd :: tl)\nhk' : optParam (zero < length (insertNth (succ n) x (hd :: tl))) (_ : zero < length (insertNth (succ n) x (hd :: tl)))\n⊢ get (insertNth (succ n) x (hd :: tl)) { val := zero, isLt := hk' } = get (hd :: tl) { val := zero, isLt := hk }\n[PROOFSTEP]\nsimp [get]\n[GOAL]\ncase succ.cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn✝¹ k : ℕ\nhn✝ : k < n✝¹\nhk✝ : k < length l\nhk'✝ : optParam (k < length (insertNth n✝¹ x l)) (_ : k < length (insertNth n✝¹ x l))\nn : ℕ\nIH :\n  ∀ (l : List α) (k : ℕ),\n    k < n →\n      ∀ (hk : k < length l) (hk' : optParam (k < length (insertNth n x l)) (_ : k < length (insertNth n x l))),\n        get (insertNth n x l) { val := k, isLt := hk' } = get l { val := k, isLt := hk }\nhd : α\ntl : List α\nn✝ : ℕ\nhn : succ n✝ < succ n\nhk : succ n✝ < length (hd :: tl)\nhk' :\n  optParam (succ n✝ < length (insertNth (succ n) x (hd :: tl))) (_ : succ n✝ < length (insertNth (succ n) x (hd :: tl)))\n⊢ get (insertNth (succ n) x (hd :: tl)) { val := succ n✝, isLt := hk' } = get (hd :: tl) { val := succ n✝, isLt := hk }\n[PROOFSTEP]\nrw [Nat.succ_lt_succ_iff] at hn \n[GOAL]\ncase succ.cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn✝¹ k : ℕ\nhn✝ : k < n✝¹\nhk✝ : k < length l\nhk'✝ : optParam (k < length (insertNth n✝¹ x l)) (_ : k < length (insertNth n✝¹ x l))\nn : ℕ\nIH :\n  ∀ (l : List α) (k : ℕ),\n    k < n →\n      ∀ (hk : k < length l) (hk' : optParam (k < length (insertNth n x l)) (_ : k < length (insertNth n x l))),\n        get (insertNth n x l) { val := k, isLt := hk' } = get l { val := k, isLt := hk }\nhd : α\ntl : List α\nn✝ : ℕ\nhn : n✝ < n\nhk : succ n✝ < length (hd :: tl)\nhk' :\n  optParam (succ n✝ < length (insertNth (succ n) x (hd :: tl))) (_ : succ n✝ < length (insertNth (succ n) x (hd :: tl)))\n⊢ get (insertNth (succ n) x (hd :: tl)) { val := succ n✝, isLt := hk' } = get (hd :: tl) { val := succ n✝, isLt := hk }\n[PROOFSTEP]\nsimpa using IH _ _ hn _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn : n ≤ length l\n⊢ n < length (insertNth n x l)\n[PROOFSTEP]\nrwa [length_insertNth _ _ hn, Nat.lt_succ_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn : n ≤ length l\nhn' : optParam (n < length (insertNth n x l)) (_ : n < length (insertNth n x l))\n⊢ get (insertNth n x l) { val := n, isLt := hn' } = x\n[PROOFSTEP]\ninduction' l with hd tl IH generalizing n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn✝ : ℕ\nhn✝ : n✝ ≤ length l\nhn'✝ : optParam (n✝ < length (insertNth n✝ x l)) (_ : n✝ < length (insertNth n✝ x l))\nn : ℕ\nhn : n ≤ length []\nhn' : optParam (n < length (insertNth n x [])) (_ : n < length (insertNth n x []))\n⊢ get (insertNth n x []) { val := n, isLt := hn' } = x\n[PROOFSTEP]\nsimp only [length, nonpos_iff_eq_zero] at hn \n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn✝ : ℕ\nhn✝¹ : n✝ ≤ length l\nhn'✝ : optParam (n✝ < length (insertNth n✝ x l)) (_ : n✝ < length (insertNth n✝ x l))\nn : ℕ\nhn✝ : n ≤ length []\nhn' : optParam (n < length (insertNth n x [])) (_ : n < length (insertNth n x []))\nhn : n = 0\n⊢ get (insertNth n x []) { val := n, isLt := hn' } = x\n[PROOFSTEP]\ncases hn\n[GOAL]\ncase nil.refl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn✝ : n ≤ length l\nhn'✝ : optParam (n < length (insertNth n x l)) (_ : n < length (insertNth n x l))\nhn : 0 ≤ length []\nhn' : optParam (0 < length (insertNth 0 x [])) (_ : 0 < length (insertNth 0 x []))\n⊢ get (insertNth 0 x []) { val := 0, isLt := hn' } = x\n[PROOFSTEP]\nsimp only [insertNth_zero, get_singleton]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn✝ : ℕ\nhn✝ : n✝ ≤ length l\nhn'✝ : optParam (n✝ < length (insertNth n✝ x l)) (_ : n✝ < length (insertNth n✝ x l))\nhd : α\ntl : List α\nIH :\n  ∀ (n : ℕ) (hn : n ≤ length tl) (hn' : optParam (n < length (insertNth n x tl)) (_ : n < length (insertNth n x tl))),\n    get (insertNth n x tl) { val := n, isLt := hn' } = x\nn : ℕ\nhn : n ≤ length (hd :: tl)\nhn' : optParam (n < length (insertNth n x (hd :: tl))) (_ : n < length (insertNth n x (hd :: tl)))\n⊢ get (insertNth n x (hd :: tl)) { val := n, isLt := hn' } = x\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn✝ : n ≤ length l\nhn'✝ : optParam (n < length (insertNth n x l)) (_ : n < length (insertNth n x l))\nhd : α\ntl : List α\nIH :\n  ∀ (n : ℕ) (hn : n ≤ length tl) (hn' : optParam (n < length (insertNth n x tl)) (_ : n < length (insertNth n x tl))),\n    get (insertNth n x tl) { val := n, isLt := hn' } = x\nhn : zero ≤ length (hd :: tl)\nhn' : optParam (zero < length (insertNth zero x (hd :: tl))) (_ : zero < length (insertNth zero x (hd :: tl)))\n⊢ get (insertNth zero x (hd :: tl)) { val := zero, isLt := hn' } = x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn✝ : n ≤ length l\nhn'✝ : optParam (n < length (insertNth n x l)) (_ : n < length (insertNth n x l))\nhd : α\ntl : List α\nIH :\n  ∀ (n : ℕ) (hn : n ≤ length tl) (hn' : optParam (n < length (insertNth n x tl)) (_ : n < length (insertNth n x tl))),\n    get (insertNth n x tl) { val := n, isLt := hn' } = x\nn✝ : ℕ\nhn : succ n✝ ≤ length (hd :: tl)\nhn' :\n  optParam (succ n✝ < length (insertNth (succ n✝) x (hd :: tl)))\n    (_ : succ n✝ < length (insertNth (succ n✝) x (hd :: tl)))\n⊢ get (insertNth (succ n✝) x (hd :: tl)) { val := succ n✝, isLt := hn' } = x\n[PROOFSTEP]\nsimp only [Nat.succ_le_succ_iff, length] at hn \n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn✝¹ : n ≤ length l\nhn'✝ : optParam (n < length (insertNth n x l)) (_ : n < length (insertNth n x l))\nhd : α\ntl : List α\nIH :\n  ∀ (n : ℕ) (hn : n ≤ length tl) (hn' : optParam (n < length (insertNth n x tl)) (_ : n < length (insertNth n x tl))),\n    get (insertNth n x tl) { val := n, isLt := hn' } = x\nn✝ : ℕ\nhn✝ : succ n✝ ≤ length (hd :: tl)\nhn' :\n  optParam (succ n✝ < length (insertNth (succ n✝) x (hd :: tl)))\n    (_ : succ n✝ < length (insertNth (succ n✝) x (hd :: tl)))\nhn : n✝ ≤ length tl\n⊢ get (insertNth (succ n✝) x (hd :: tl)) { val := succ n✝, isLt := hn' } = x\n[PROOFSTEP]\nsimpa using IH _ hn\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn : ℕ\nhn : n ≤ length l\n⊢ n < length (insertNth n x l)\n[PROOFSTEP]\nrwa [length_insertNth _ _ hn, Nat.lt_succ_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn k : ℕ\nhk' : n + k < length l\n⊢ n + k + 1 < length (insertNth n x l)\n[PROOFSTEP]\nrw [length_insertNth _ _ (le_self_add.trans hk'.le)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn k : ℕ\nhk' : n + k < length l\n⊢ n + k + 1 < length l + 1\n[PROOFSTEP]\nexact Nat.succ_lt_succ_iff.2 hk'\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn k : ℕ\nhk' : n + k < length l\nhk : optParam (n + k + 1 < length (insertNth n x l)) (_ : n + k + 1 < length (insertNth n x l))\n⊢ get (insertNth n x l) { val := n + k + 1, isLt := hk } = get l { val := n + k, isLt := hk' }\n[PROOFSTEP]\ninduction' l with hd tl IH generalizing n k\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn✝ k✝ : ℕ\nhk'✝ : n✝ + k✝ < length l\nhk✝ : optParam (n✝ + k✝ + 1 < length (insertNth n✝ x l)) (_ : n✝ + k✝ + 1 < length (insertNth n✝ x l))\nn k : ℕ\nhk' : n + k < length []\nhk : optParam (n + k + 1 < length (insertNth n x [])) (_ : n + k + 1 < length (insertNth n x []))\n⊢ get (insertNth n x []) { val := n + k + 1, isLt := hk } = get [] { val := n + k, isLt := hk' }\n[PROOFSTEP]\nsimp at hk' \n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn✝ k✝ : ℕ\nhk'✝ : n✝ + k✝ < length l\nhk✝ : optParam (n✝ + k✝ + 1 < length (insertNth n✝ x l)) (_ : n✝ + k✝ + 1 < length (insertNth n✝ x l))\nhd : α\ntl : List α\nIH :\n  ∀ (n k : ℕ) (hk' : n + k < length tl)\n    (hk : optParam (n + k + 1 < length (insertNth n x tl)) (_ : n + k + 1 < length (insertNth n x tl))),\n    get (insertNth n x tl) { val := n + k + 1, isLt := hk } = get tl { val := n + k, isLt := hk' }\nn k : ℕ\nhk' : n + k < length (hd :: tl)\nhk : optParam (n + k + 1 < length (insertNth n x (hd :: tl))) (_ : n + k + 1 < length (insertNth n x (hd :: tl)))\n⊢ get (insertNth n x (hd :: tl)) { val := n + k + 1, isLt := hk } = get (hd :: tl) { val := n + k, isLt := hk' }\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn k✝ : ℕ\nhk'✝ : n + k✝ < length l\nhk✝ : optParam (n + k✝ + 1 < length (insertNth n x l)) (_ : n + k✝ + 1 < length (insertNth n x l))\nhd : α\ntl : List α\nIH :\n  ∀ (n k : ℕ) (hk' : n + k < length tl)\n    (hk : optParam (n + k + 1 < length (insertNth n x tl)) (_ : n + k + 1 < length (insertNth n x tl))),\n    get (insertNth n x tl) { val := n + k + 1, isLt := hk } = get tl { val := n + k, isLt := hk' }\nk : ℕ\nhk' : zero + k < length (hd :: tl)\nhk :\n  optParam (zero + k + 1 < length (insertNth zero x (hd :: tl)))\n    (_ : zero + k + 1 < length (insertNth zero x (hd :: tl)))\n⊢ get (insertNth zero x (hd :: tl)) { val := zero + k + 1, isLt := hk } =\n    get (hd :: tl) { val := zero + k, isLt := hk' }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn k✝ : ℕ\nhk'✝ : n + k✝ < length l\nhk✝ : optParam (n + k✝ + 1 < length (insertNth n x l)) (_ : n + k✝ + 1 < length (insertNth n x l))\nhd : α\ntl : List α\nIH :\n  ∀ (n k : ℕ) (hk' : n + k < length tl)\n    (hk : optParam (n + k + 1 < length (insertNth n x tl)) (_ : n + k + 1 < length (insertNth n x tl))),\n    get (insertNth n x tl) { val := n + k + 1, isLt := hk } = get tl { val := n + k, isLt := hk' }\nk n✝ : ℕ\nhk' : succ n✝ + k < length (hd :: tl)\nhk :\n  optParam (succ n✝ + k + 1 < length (insertNth (succ n✝) x (hd :: tl)))\n    (_ : succ n✝ + k + 1 < length (insertNth (succ n✝) x (hd :: tl)))\n⊢ get (insertNth (succ n✝) x (hd :: tl)) { val := succ n✝ + k + 1, isLt := hk } =\n    get (hd :: tl) { val := succ n✝ + k, isLt := hk' }\n[PROOFSTEP]\nsimpa [succ_add] using IH _ _ _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn k : ℕ\nhk' : n + k < length l\n⊢ n + k + 1 < length (insertNth n x l)\n[PROOFSTEP]\nrw [length_insertNth _ _ (le_self_add.trans hk'.le)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nl : List α\nx : α\nn k : ℕ\nhk' : n + k < length l\n⊢ n + k + 1 < length l + 1\n[PROOFSTEP]\nexact Nat.succ_lt_succ_iff.2 hk'\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn : ℕ\nx : α\n⊢ Injective (insertNth n x)\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na x : α\n⊢ Injective (insertNth zero x)\n[PROOFSTEP]\nhave : insertNth 0 x = cons x := funext fun _ => rfl\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na x : α\nthis : insertNth 0 x = cons x\n⊢ Injective (insertNth zero x)\n[PROOFSTEP]\nsimp [this]\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na x : α\nn : ℕ\nIH : Injective (insertNth n x)\n⊢ Injective (insertNth (succ n) x)\n[PROOFSTEP]\nrintro (_ | ⟨a, as⟩) (_ | ⟨b, bs⟩) h\n[GOAL]\ncase succ.nil.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na x : α\nn : ℕ\nIH : Injective (insertNth n x)\nh : insertNth (succ n) x [] = insertNth (succ n) x []\n⊢ [] = []\n[PROOFSTEP]\nsimpa [IH.eq_iff] using h\n[GOAL]\ncase succ.nil.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na x : α\nn : ℕ\nIH : Injective (insertNth n x)\nb : α\nbs : List α\nh : insertNth (succ n) x [] = insertNth (succ n) x (b :: bs)\n⊢ [] = b :: bs\n[PROOFSTEP]\nsimpa [IH.eq_iff] using h\n[GOAL]\ncase succ.cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na✝ x : α\nn : ℕ\nIH : Injective (insertNth n x)\na : α\nas : List α\nh : insertNth (succ n) x (a :: as) = insertNth (succ n) x []\n⊢ a :: as = []\n[PROOFSTEP]\nsimpa [IH.eq_iff] using h\n[GOAL]\ncase succ.cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na✝ x : α\nn : ℕ\nIH : Injective (insertNth n x)\na : α\nas : List α\nb : α\nbs : List α\nh : insertNth (succ n) x (a :: as) = insertNth (succ n) x (b :: bs)\n⊢ a :: as = b :: bs\n[PROOFSTEP]\nsimpa [IH.eq_iff] using h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nl : List α\n⊢ map f l = foldr (fun a bs => f a :: bs) [] l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\n⊢ map f [] = foldr (fun a bs => f a :: bs) [] []\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : map f tail✝ = foldr (fun a bs => f a :: bs) [] tail✝\n⊢ map f (head✝ :: tail✝) = foldr (fun a bs => f a :: bs) [] (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β\na : α\nl : List α\nh : ∀ (x : α), x ∈ a :: l → f x = g x\n⊢ map f (a :: l) = map g (a :: l)\n[PROOFSTEP]\nlet ⟨h₁, h₂⟩ := forall_mem_cons.1 h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β\na : α\nl : List α\nh : ∀ (x : α), x ∈ a :: l → f x = g x\nh₁ : f a = g a\nh₂ : ∀ (x : α), x ∈ l → f x = g x\n⊢ map f (a :: l) = map g (a :: l)\n[PROOFSTEP]\nrw [map, map, h₁, map_congr h₂]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β\nl : List α\n⊢ map f l = map g l ↔ ∀ (x : α), x ∈ l → f x = g x\n[PROOFSTEP]\nrefine' ⟨_, map_congr⟩\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β\nl : List α\n⊢ map f l = map g l → ∀ (x : α), x ∈ l → f x = g x\n[PROOFSTEP]\nintro h x hx\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β\nl : List α\nh : map f l = map g l\nx : α\nhx : x ∈ l\n⊢ f x = g x\n[PROOFSTEP]\nrw [mem_iff_get] at hx \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β\nl : List α\nh : map f l = map g l\nx : α\nhx : ∃ n, get l n = x\n⊢ f x = g x\n[PROOFSTEP]\nrcases hx with ⟨n, hn, rfl⟩\n[GOAL]\ncase intro.refl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β\nl : List α\nh : map f l = map g l\nn : Fin (length l)\n⊢ f (get l n) = g (get l n)\n[PROOFSTEP]\nrw [get_map_rev f, get_map_rev g]\n[GOAL]\ncase intro.refl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β\nl : List α\nh : map f l = map g l\nn : Fin (length l)\n⊢ get (map f l) { val := ↑n, isLt := (_ : ↑n < length (map f l)) } =\n    get (map g l) { val := ↑n, isLt := (_ : ↑n < length (map g l)) }\n[PROOFSTEP]\ncongr!\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\na : α\nl : List α\n⊢ map f (concat l a) = concat (map f l) (f a)\n[PROOFSTEP]\ninduction l <;> [rfl; simp only [*, concat_eq_append, cons_append, map, map_append]]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\na : α\nl : List α\n⊢ map f (concat l a) = concat (map f l) (f a)\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\na : α\n⊢ map f (concat [] a) = concat (map f []) (f a)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\na head✝ : α\ntail✝ : List α\ntail_ih✝ : map f (concat tail✝ a) = concat (map f tail✝) (f a)\n⊢ map f (concat (head✝ :: tail✝) a) = concat (map f (head✝ :: tail✝)) (f a)\n[PROOFSTEP]\nsimp only [*, concat_eq_append, cons_append, map, map_append]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\nh : ∀ (x : α), f x = x\nl : List α\n⊢ map f l = l\n[PROOFSTEP]\nsimp [show f = id from funext h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nl : List α\nh : map f l = []\n⊢ length l = 0\n[PROOFSTEP]\nrw [← length_map l f, h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nl : List α\nh : map f l = []\n⊢ length [] = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nL : List (List α)\n⊢ map f (join L) = join (map (map f) L)\n[PROOFSTEP]\ninduction L <;> [rfl; simp only [*, join, map, map_append]]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nL : List (List α)\n⊢ map f (join L) = join (map (map f) L)\n[PROOFSTEP]\ninduction L\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\n⊢ map f (join []) = join (map (map f) [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nhead✝ : List α\ntail✝ : List (List α)\ntail_ih✝ : map f (join tail✝) = join (map (map f) tail✝)\n⊢ map f (join (head✝ :: tail✝)) = join (map (map f) (head✝ :: tail✝))\n[PROOFSTEP]\nsimp only [*, join, map, map_append]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nl : List α\n⊢ List.bind l (List.ret ∘ f) = map f l\n[PROOFSTEP]\nunfold List.bind\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nl : List α\n⊢ join (map (List.ret ∘ f) l) = map f l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\n⊢ join (map (List.ret ∘ f) []) = map f []\n[PROOFSTEP]\nsimp [map, join, List.ret, cons_append, nil_append, *] at *\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : join (map (List.ret ∘ f) tail✝) = map f tail✝\n⊢ join (map (List.ret ∘ f) (head✝ :: tail✝)) = map f (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [map, join, List.ret, cons_append, nil_append, *] at *\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : join (map ((fun a => [a]) ∘ f) tail✝) = map f tail✝\n⊢ join (map ((fun a => [a]) ∘ f) tail✝) = map f tail✝\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nl : List α\n⊢ map f (tail l) = tail (map f l)\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\n⊢ map f (tail []) = tail (map f [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nhead✝ : α\ntail✝ : List α\n⊢ map f (tail (head✝ :: tail✝)) = tail (map f (head✝ :: tail✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\n⊢ Injective (map f) ↔ Injective f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\n⊢ Injective (map f) → Injective f\n[PROOFSTEP]\nintro h x y hxy\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\n⊢ Injective f → Injective (map f)\n[PROOFSTEP]\nintro h x y hxy\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nh : Injective (map f)\nx y : α\nhxy : f x = f y\n⊢ x = y\n[PROOFSTEP]\nsuffices [x] = [y] by simpa using this\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nh : Injective (map f)\nx y : α\nhxy : f x = f y\nthis : [x] = [y]\n⊢ x = y\n[PROOFSTEP]\nsimpa using this\n[GOAL]\ncase mp\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nh : Injective (map f)\nx y : α\nhxy : f x = f y\n⊢ [x] = [y]\n[PROOFSTEP]\napply h\n[GOAL]\ncase mp.a\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nh : Injective (map f)\nx y : α\nhxy : f x = f y\n⊢ map f [x] = map f [y]\n[PROOFSTEP]\nsimp [hxy]\n[GOAL]\ncase mpr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nh : Injective f\nx y : List α\nhxy : map f x = map f y\n⊢ x = y\n[PROOFSTEP]\ninduction' y with yh yt y_ih generalizing x\n[GOAL]\ncase mpr.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nh : Injective f\nx✝ y : List α\nhxy✝ : map f x✝ = map f y\nx : List α\nhxy : map f x = map f []\n⊢ x = []\n[PROOFSTEP]\nsimpa using hxy\n[GOAL]\ncase mpr.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nh : Injective f\nx✝ y : List α\nhxy✝ : map f x✝ = map f y\nyh : α\nyt : List α\ny_ih : ∀ ⦃x : List α⦄, map f x = map f yt → x = yt\nx : List α\nhxy : map f x = map f (yh :: yt)\n⊢ x = yh :: yt\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mpr.cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nh : Injective f\nx y : List α\nhxy✝ : map f x = map f y\nyh : α\nyt : List α\ny_ih : ∀ ⦃x : List α⦄, map f x = map f yt → x = yt\nhxy : map f [] = map f (yh :: yt)\n⊢ [] = yh :: yt\n[PROOFSTEP]\nsimp at hxy \n[GOAL]\ncase mpr.cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nh : Injective f\nx y : List α\nhxy✝ : map f x = map f y\nyh : α\nyt : List α\ny_ih : ∀ ⦃x : List α⦄, map f x = map f yt → x = yt\nhead✝ : α\ntail✝ : List α\nhxy : map f (head✝ :: tail✝) = map f (yh :: yt)\n⊢ head✝ :: tail✝ = yh :: yt\n[PROOFSTEP]\nsimp only [map, cons.injEq] at hxy \n[GOAL]\ncase mpr.cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nh : Injective f\nx y : List α\nhxy✝ : map f x = map f y\nyh : α\nyt : List α\ny_ih : ∀ ⦃x : List α⦄, map f x = map f yt → x = yt\nhead✝ : α\ntail✝ : List α\nhxy : f head✝ = f yh ∧ map f tail✝ = map f yt\n⊢ head✝ :: tail✝ = yh :: yt\n[PROOFSTEP]\nsimp [y_ih hxy.2, h hxy.1]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ng : β → γ\nf : α → β\n⊢ map g ∘ map f = map (g ∘ f)\n[PROOFSTEP]\next l\n[GOAL]\ncase h.a.a\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ng : β → γ\nf : α → β\nl : List α\nn✝ : ℕ\na✝ : γ\n⊢ a✝ ∈ get? ((map g ∘ map f) l) n✝ ↔ a✝ ∈ get? (map (g ∘ f) l) n✝\n[PROOFSTEP]\nrw [comp_map, Function.comp_apply]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\np : α → Bool\nas : List α\n⊢ map f (filter p as) = foldr (fun a bs => bif p a then f a :: bs else bs) [] as\n[PROOFSTEP]\ninduction' as with head tail\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\np : α → Bool\n⊢ map f (filter p []) = foldr (fun a bs => bif p a then f a :: bs else bs) [] []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\np : α → Bool\nhead : α\ntail : List α\ntail_ih✝ : map f (filter p tail) = foldr (fun a bs => bif p a then f a :: bs else bs) [] tail\n⊢ map f (filter p (head :: tail)) = foldr (fun a bs => bif p a then f a :: bs else bs) [] (head :: tail)\n[PROOFSTEP]\nsimp only [foldr]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\np : α → Bool\nhead : α\ntail : List α\ntail_ih✝ : map f (filter p tail) = foldr (fun a bs => bif p a then f a :: bs else bs) [] tail\n⊢ map f (filter p (head :: tail)) =\n    bif p head then f head :: foldr (fun a bs => bif p a then f a :: bs else bs) [] tail\n    else foldr (fun a bs => bif p a then f a :: bs else bs) [] tail\n[PROOFSTEP]\ncases hp : p head\n[GOAL]\ncase cons.false\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\np : α → Bool\nhead : α\ntail : List α\ntail_ih✝ : map f (filter p tail) = foldr (fun a bs => bif p a then f a :: bs else bs) [] tail\nhp : p head = false\n⊢ map f (filter p (head :: tail)) =\n    bif false then f head :: foldr (fun a bs => bif p a then f a :: bs else bs) [] tail\n    else foldr (fun a bs => bif p a then f a :: bs else bs) [] tail\n[PROOFSTEP]\nsimp [filter, *]\n[GOAL]\ncase cons.true\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\np : α → Bool\nhead : α\ntail : List α\ntail_ih✝ : map f (filter p tail) = foldr (fun a bs => bif p a then f a :: bs else bs) [] tail\nhp : p head = true\n⊢ map f (filter p (head :: tail)) =\n    bif true then f head :: foldr (fun a bs => bif p a then f a :: bs else bs) [] tail\n    else foldr (fun a bs => bif p a then f a :: bs else bs) [] tail\n[PROOFSTEP]\nsimp [filter, *]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nl : List α\nhl : l ≠ []\n⊢ getLast (map f l) (_ : ¬map f l = []) = f (getLast l hl)\n[PROOFSTEP]\ninduction' l with l_hd l_tl l_ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nl : List α\nhl✝ : l ≠ []\nhl : [] ≠ []\n⊢ getLast (map f []) (_ : ¬map f [] = []) = f (getLast [] hl)\n[PROOFSTEP]\napply (hl rfl).elim\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nl : List α\nhl✝ : l ≠ []\nl_hd : α\nl_tl : List α\nl_ih : ∀ (hl : l_tl ≠ []), getLast (map f l_tl) (_ : ¬map f l_tl = []) = f (getLast l_tl hl)\nhl : l_hd :: l_tl ≠ []\n⊢ getLast (map f (l_hd :: l_tl)) (_ : ¬map f (l_hd :: l_tl) = []) = f (getLast (l_hd :: l_tl) hl)\n[PROOFSTEP]\ncases l_tl\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nl : List α\nhl✝ : l ≠ []\nl_hd : α\nl_ih : ∀ (hl : [] ≠ []), getLast (map f []) (_ : ¬map f [] = []) = f (getLast [] hl)\nhl : [l_hd] ≠ []\n⊢ getLast (map f [l_hd]) (_ : ¬map f [l_hd] = []) = f (getLast [l_hd] hl)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nl : List α\nhl✝ : l ≠ []\nl_hd head✝ : α\ntail✝ : List α\nl_ih :\n  ∀ (hl : head✝ :: tail✝ ≠ []),\n    getLast (map f (head✝ :: tail✝)) (_ : ¬map f (head✝ :: tail✝) = []) = f (getLast (head✝ :: tail✝) hl)\nhl : l_hd :: head✝ :: tail✝ ≠ []\n⊢ getLast (map f (l_hd :: head✝ :: tail✝)) (_ : ¬map f (l_hd :: head✝ :: tail✝) = []) =\n    f (getLast (l_hd :: head✝ :: tail✝) hl)\n[PROOFSTEP]\nsimpa using l_ih _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nf : α → β\nb : β\n⊢ map f l = replicate (length l) b ↔ ∀ (x : α), x ∈ l → f x = b\n[PROOFSTEP]\nsimp [eq_replicate]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nb₁ b₂ : β\nl : List α\nh : b₁ ∈ map (const α b₂) l\n⊢ b₁ = b₂\n[PROOFSTEP]\nrw [map_const] at h \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nb₁ b₂ : β\nl : List α\nh : b₁ ∈ replicate (length l) b₂\n⊢ b₁ = b₂\n[PROOFSTEP]\nexact eq_of_mem_replicate h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\nl : List β\n⊢ zipWith f [] l = []\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\n⊢ zipWith f [] [] = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\nhead✝ : β\ntail✝ : List β\n⊢ zipWith f [] (head✝ :: tail✝) = []\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\nl : List α\n⊢ zipWith f l [] = []\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\n⊢ zipWith f [] [] = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\nhead✝ : α\ntail✝ : List α\n⊢ zipWith f (head✝ :: tail✝) [] = []\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\na : α\nas : List α\nb : β\nbs : List β\n⊢ zipWith (flip f) (b :: bs) (a :: as) = zipWith f (a :: as) (b :: bs)\n[PROOFSTEP]\nsimp! [zipWith_flip]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\na : α\nas : List α\nb : β\nbs : List β\n⊢ flip f b a = f a b\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\na : α\nl : List α\nh : length (a :: l) ≤ n + 1\n⊢ take (n + 1) (a :: l) = a :: l\n[PROOFSTEP]\nchange a :: take n l = a :: l\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\na : α\nl : List α\nh : length (a :: l) ≤ n + 1\n⊢ a :: take n l = a :: l\n[PROOFSTEP]\nrw [take_all_of_le (le_of_succ_le_succ h)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nn : ℕ\nh : length l₁ = n\n⊢ take n (l₁ ++ l₂) = l₁\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nn : ℕ\nh : length l₁ = n\n⊢ take (length l₁) (l₁ ++ l₂) = l₁\n[PROOFSTEP]\napply take_left\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nl : List α\n⊢ take n (take 0 l) = take (min n 0) l\n[PROOFSTEP]\nrw [min_zero, take_zero, take_nil]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : ℕ\nl : List α\n⊢ take 0 (take m l) = take (min 0 m) l\n[PROOFSTEP]\nrw [zero_min, take_zero, take_zero]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn m : ℕ\n⊢ take (succ n) (take (succ m) []) = take (min (succ n) (succ m)) []\n[PROOFSTEP]\nsimp only [take_nil]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn m : ℕ\na : α\nl : List α\n⊢ take (succ n) (take (succ m) (a :: l)) = take (min (succ n) (succ m)) (a :: l)\n[PROOFSTEP]\nsimp only [take, min_succ_succ, take_take n m l]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn : ℕ\n⊢ take n (replicate 0 a) = replicate (min n 0) a\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nm : ℕ\n⊢ take 0 (replicate m a) = replicate (min 0 m) a\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn m : ℕ\n⊢ take (succ n) (replicate (succ m) a) = replicate (min (succ n) (succ m)) a\n[PROOFSTEP]\nsimp [min_succ_succ, take_replicate]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\nf : α → β\ni : ℕ\n⊢ map f (take i []) = take i (map f [])\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\nf : α → β\nx✝ : List α\n⊢ map f (take 0 x✝) = take 0 (map f x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\nf : α → β\nh : α\nt : List α\nn : ℕ\n⊢ map f (take (n + 1) (h :: t)) = take (n + 1) (map f (h :: t))\n[PROOFSTEP]\ndsimp\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\nf : α → β\nh : α\nt : List α\nn : ℕ\n⊢ f h :: map f (take n t) = f h :: take n (map f t)\n[PROOFSTEP]\nrw [map_take f t n]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nn : ℕ\n⊢ take n (l₁ ++ l₂) = take n l₁ ++ take (n - length l₁) l₂\n[PROOFSTEP]\ninduction l₁ generalizing n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nn : ℕ\n⊢ take n ([] ++ l₂) = take n [] ++ take (n - length []) l₂\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ {n : ℕ}, take n (tail✝ ++ l₂) = take n tail✝ ++ take (n - length tail✝) l₂\nn : ℕ\n⊢ take n (head✝ :: tail✝ ++ l₂) = take n (head✝ :: tail✝) ++ take (n - length (head✝ :: tail✝)) l₂\n[PROOFSTEP]\n{simp\n}\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nn : ℕ\n⊢ take n ([] ++ l₂) = take n [] ++ take (n - length []) l₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ {n : ℕ}, take n (tail✝ ++ l₂) = take n tail✝ ++ take (n - length tail✝) l₂\nn : ℕ\n⊢ take n (head✝ :: tail✝ ++ l₂) = take n (head✝ :: tail✝) ++ take (n - length (head✝ :: tail✝)) l₂\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ {n : ℕ}, take n (tail✝ ++ l₂) = take n tail✝ ++ take (n - length tail✝) l₂\n⊢ take zero (head✝ :: tail✝ ++ l₂) = take zero (head✝ :: tail✝) ++ take (zero - length (head✝ :: tail✝)) l₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ {n : ℕ}, take n (tail✝ ++ l₂) = take n tail✝ ++ take (n - length tail✝) l₂\nn✝ : ℕ\n⊢ take (succ n✝) (head✝ :: tail✝ ++ l₂) = take (succ n✝) (head✝ :: tail✝) ++ take (succ n✝ - length (head✝ :: tail✝)) l₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nn : ℕ\nh : n ≤ length l₁\n⊢ take n (l₁ ++ l₂) = take n l₁\n[PROOFSTEP]\nsimp [take_append_eq_append_take, tsub_eq_zero_iff_le.mpr h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\ni : ℕ\n⊢ take (length l₁ + i) (l₁ ++ l₂) = l₁ ++ take i l₂\n[PROOFSTEP]\nsimp [take_append_eq_append_take, take_all_of_le le_self_add]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\nj : ℕ\ni : Fin (length (take j L))\n⊢ length (take j L) ≤ length L\n[PROOFSTEP]\nsimp [le_refl]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\nj : ℕ\ni : Fin (length (take j L))\n⊢ get (take j L) i = get L { val := ↑i, isLt := (_ : ↑i < length L) }\n[PROOFSTEP]\nlet ⟨i, hi⟩ := i\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\nj : ℕ\ni✝ : Fin (length (take j L))\ni : ℕ\nhi : i < length (take j L)\n⊢ get (take j L) { val := i, isLt := hi } =\n    get L { val := ↑{ val := i, isLt := hi }, isLt := (_ : ↑{ val := i, isLt := hi } < length L) }\n[PROOFSTEP]\nsimp at hi \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\nj : ℕ\ni✝ : Fin (length (take j L))\ni : ℕ\nhi✝ : i < length (take j L)\nhi : i < j ∧ i < length L\n⊢ get (take j L) { val := i, isLt := hi✝ } =\n    get L { val := ↑{ val := i, isLt := hi✝ }, isLt := (_ : ↑{ val := i, isLt := hi✝ } < length L) }\n[PROOFSTEP]\nrw [get_take L _ hi.1]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nhi : i < length (take j L)\n⊢ length (take j L) ≤ length L\n[PROOFSTEP]\nsimp [le_refl]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn m : ℕ\nh : m < n\n⊢ get? (take n l) m = get? l m\n[PROOFSTEP]\ninduction' n with n hn generalizing l m\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nn m✝ : ℕ\nh✝ : m✝ < n\nl : List α\nm : ℕ\nh : m < zero\n⊢ get? (take zero l) m = get? l m\n[PROOFSTEP]\nsimp only [Nat.zero_eq] at h \n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nn m✝ : ℕ\nh✝ : m✝ < n\nl : List α\nm : ℕ\nh : m < 0\n⊢ get? (take zero l) m = get? l m\n[PROOFSTEP]\nexact absurd h (not_lt_of_le m.zero_le)\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nn✝ m✝ : ℕ\nh✝ : m✝ < n✝\nn : ℕ\nhn : ∀ {l : List α} {m : ℕ}, m < n → get? (take n l) m = get? l m\nl : List α\nm : ℕ\nh : m < succ n\n⊢ get? (take (succ n) l) m = get? l m\n[PROOFSTEP]\ncases' l with hd tl\n[GOAL]\ncase succ.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝ m✝ : ℕ\nh✝ : m✝ < n✝\nn : ℕ\nhn : ∀ {l : List α} {m : ℕ}, m < n → get? (take n l) m = get? l m\nm : ℕ\nh : m < succ n\n⊢ get? (take (succ n) []) m = get? [] m\n[PROOFSTEP]\nsimp only [take_nil]\n[GOAL]\ncase succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝ m✝ : ℕ\nh✝ : m✝ < n✝\nn : ℕ\nhn : ∀ {l : List α} {m : ℕ}, m < n → get? (take n l) m = get? l m\nm : ℕ\nh : m < succ n\nhd : α\ntl : List α\n⊢ get? (take (succ n) (hd :: tl)) m = get? (hd :: tl) m\n[PROOFSTEP]\ncases m\n[GOAL]\ncase succ.cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝ m : ℕ\nh✝ : m < n✝\nn : ℕ\nhn : ∀ {l : List α} {m : ℕ}, m < n → get? (take n l) m = get? l m\nhd : α\ntl : List α\nh : zero < succ n\n⊢ get? (take (succ n) (hd :: tl)) zero = get? (hd :: tl) zero\n[PROOFSTEP]\nsimp only [get?, take]\n[GOAL]\ncase succ.cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝¹ m : ℕ\nh✝ : m < n✝¹\nn : ℕ\nhn : ∀ {l : List α} {m : ℕ}, m < n → get? (take n l) m = get? l m\nhd : α\ntl : List α\nn✝ : ℕ\nh : succ n✝ < succ n\n⊢ get? (take (succ n) (hd :: tl)) (succ n✝) = get? (hd :: tl) (succ n✝)\n[PROOFSTEP]\nsimpa only using hn (Nat.lt_of_succ_lt_succ h)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : ℕ\n⊢ take (n + 1) l = take n l ++ Option.toList (get? l n)\n[PROOFSTEP]\ninduction' l with hd tl hl generalizing n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn✝ n : ℕ\n⊢ take (n + 1) [] = take n [] ++ Option.toList (get? [] n)\n[PROOFSTEP]\nsimp only [Option.toList, get?, take_nil, append_nil]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn✝ : ℕ\nhd : α\ntl : List α\nhl : ∀ {n : ℕ}, take (n + 1) tl = take n tl ++ Option.toList (get? tl n)\nn : ℕ\n⊢ take (n + 1) (hd :: tl) = take n (hd :: tl) ++ Option.toList (get? (hd :: tl) n)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nhd : α\ntl : List α\nhl : ∀ {n : ℕ}, take (n + 1) tl = take n tl ++ Option.toList (get? tl n)\n⊢ take (zero + 1) (hd :: tl) = take zero (hd :: tl) ++ Option.toList (get? (hd :: tl) zero)\n[PROOFSTEP]\nsimp only [Option.toList, get?, eq_self_iff_true, and_self_iff, take, nil_append]\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nhd : α\ntl : List α\nhl : ∀ {n : ℕ}, take (n + 1) tl = take n tl ++ Option.toList (get? tl n)\nn✝ : ℕ\n⊢ take (succ n✝ + 1) (hd :: tl) = take (succ n✝) (hd :: tl) ++ Option.toList (get? (hd :: tl) (succ n✝))\n[PROOFSTEP]\nsimp only [hl, cons_append, get?, eq_self_iff_true, and_self_iff, take]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nk : ℕ\n⊢ take k l = [] ↔ l = [] ∨ k = 0\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nk : ℕ\n⊢ take k [] = [] ↔ [] = [] ∨ k = 0\n[PROOFSTEP]\ncases k\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nk : ℕ\nhead✝ : α\ntail✝ : List α\n⊢ take k (head✝ :: tail✝) = [] ↔ head✝ :: tail✝ = [] ∨ k = 0\n[PROOFSTEP]\ncases k\n[GOAL]\ncase nil.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ take zero [] = [] ↔ [] = [] ∨ zero = 0\n[PROOFSTEP]\nsimp [Nat.succ_ne_zero]\n[GOAL]\ncase nil.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn✝ : ℕ\n⊢ take (succ n✝) [] = [] ↔ [] = [] ∨ succ n✝ = 0\n[PROOFSTEP]\nsimp [Nat.succ_ne_zero]\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhead✝ : α\ntail✝ : List α\n⊢ take zero (head✝ :: tail✝) = [] ↔ head✝ :: tail✝ = [] ∨ zero = 0\n[PROOFSTEP]\nsimp [Nat.succ_ne_zero]\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhead✝ : α\ntail✝ : List α\nn✝ : ℕ\n⊢ take (succ n✝) (head✝ :: tail✝) = [] ↔ head✝ :: tail✝ = [] ∨ succ n✝ = 0\n[PROOFSTEP]\nsimp [Nat.succ_ne_zero]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm n : ℕ\n⊢ take m [] = take n [] ↔ min m (length []) = min n (length [])\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhead✝ : α\nxs : List α\n⊢ take 0 (head✝ :: xs) = take 0 (head✝ :: xs) ↔ min 0 (length (head✝ :: xs)) = min 0 (length (head✝ :: xs))\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\nxs : List α\nm : ℕ\n⊢ take (m + 1) (x :: xs) = take 0 (x :: xs) ↔ min (m + 1) (length (x :: xs)) = min 0 (length (x :: xs))\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\nxs : List α\nn : ℕ\n⊢ take 0 (x :: xs) = take (n + 1) (x :: xs) ↔ min 0 (length (x :: xs)) = min (n + 1) (length (x :: xs))\n[PROOFSTEP]\nsimp [@eq_comm ℕ 0]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\nxs : List α\nm n : ℕ\n⊢ take (m + 1) (x :: xs) = take (n + 1) (x :: xs) ↔ min (m + 1) (length (x :: xs)) = min (n + 1) (length (x :: xs))\n[PROOFSTEP]\nsimp [Nat.min_succ_succ, take_eq_take]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nm n : ℕ\n⊢ take (m + n) l = take m l ++ take n (drop m l)\n[PROOFSTEP]\nconvert_to take (m + n) (take m l ++ drop m l) = take m l ++ take n (drop m l)\n[GOAL]\ncase h.e'_2\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nm n : ℕ\n⊢ take (m + n) l = take (m + n) (take m l ++ drop m l)\n[PROOFSTEP]\nrw [take_append_drop]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nm n : ℕ\n⊢ take (m + n) (take m l ++ drop m l) = take m l ++ take n (drop m l)\n[PROOFSTEP]\nrw [take_append_eq_append_take, take_all_of_le, append_right_inj]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nm n : ℕ\n⊢ take (m + n - length (take m l)) (drop m l) = take n (drop m l)\n[PROOFSTEP]\nsimp only [take_eq_take, length_take, length_drop]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nm n : ℕ\n⊢ min (m + n - min m (length l)) (length l - m) = min n (length l - m)\n[PROOFSTEP]\ngeneralize l.length = k\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nm n k : ℕ\n⊢ min (m + n - min m k) (k - m) = min n (k - m)\n[PROOFSTEP]\nby_cases h : m ≤ k\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nm n k : ℕ\nh : m ≤ k\n⊢ min (m + n - min m k) (k - m) = min n (k - m)\n[PROOFSTEP]\nsimp [min_eq_left_iff.mpr h]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nm n k : ℕ\nh : ¬m ≤ k\n⊢ min (m + n - min m k) (k - m) = min n (k - m)\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nm n k : ℕ\nh : k < m\n⊢ min (m + n - min m k) (k - m) = min n (k - m)\n[PROOFSTEP]\nsimp [Nat.sub_eq_zero_of_le (le_of_lt h)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nm n : ℕ\n⊢ length (take m l) ≤ m + n\n[PROOFSTEP]\ntrans m\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nm n : ℕ\n⊢ length (take m l) ≤ m\n[PROOFSTEP]\napply length_take_le\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nm n : ℕ\n⊢ m ≤ m + n\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\n⊢ dropLast l = take (pred (length l)) l\n[PROOFSTEP]\ncases' l with x l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ dropLast [] = take (pred (length [])) []\n[PROOFSTEP]\nsimp [dropLast]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\nl : List α\n⊢ dropLast (x :: l) = take (pred (length (x :: l))) (x :: l)\n[PROOFSTEP]\ninduction' l with hd tl hl generalizing x\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx✝ x : α\n⊢ dropLast [x] = take (pred (length [x])) [x]\n[PROOFSTEP]\nsimp [dropLast]\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx✝ hd : α\ntl : List α\nhl : ∀ (x : α), dropLast (x :: tl) = take (pred (length (x :: tl))) (x :: tl)\nx : α\n⊢ dropLast (x :: hd :: tl) = take (pred (length (x :: hd :: tl))) (x :: hd :: tl)\n[PROOFSTEP]\nsimp [dropLast, hl]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nl : List α\nh : n < length l\n⊢ dropLast (take n l) = take (pred n) l\n[PROOFSTEP]\nsimp [dropLast_eq_take, min_eq_left_of_lt h, take_take, pred_le]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nx : α\nl : List α\nh : l ≠ []\n⊢ dropLast (x :: l) = x :: dropLast l\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nl : List α\nx✝ : l ≠ []\n⊢ dropLast ([] ++ l) = [] ++ dropLast l\n[PROOFSTEP]\nsimp only [nil_append]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nl : List α\na : α\nl' : List α\nh : l ≠ []\n⊢ dropLast (a :: l' ++ l) = a :: l' ++ dropLast l\n[PROOFSTEP]\nrw [cons_append, dropLast, dropLast_append_of_ne_nil l' h, cons_append]\n[GOAL]\ncase x_2\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nl : List α\na : α\nl' : List α\nh : l ≠ []\n⊢ l' ++ l = [] → False\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nk : ℕ\n⊢ drop k l = [] ↔ length l ≤ k\n[PROOFSTEP]\nrefine' ⟨fun h => _, drop_eq_nil_of_le⟩\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nk : ℕ\nh : drop k l = []\n⊢ length l ≤ k\n[PROOFSTEP]\ninduction' k with k hk generalizing l\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nk : ℕ\nh✝ : drop k l✝ = []\nl : List α\nh : drop zero l = []\n⊢ length l ≤ zero\n[PROOFSTEP]\nsimp only [drop] at h \n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nk : ℕ\nh✝ : drop k l✝ = []\nl : List α\nh : l = []\n⊢ length l ≤ zero\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nk✝ : ℕ\nh✝ : drop k✝ l✝ = []\nk : ℕ\nhk : ∀ {l : List α}, drop k l = [] → length l ≤ k\nl : List α\nh : drop (succ k) l = []\n⊢ length l ≤ succ k\n[PROOFSTEP]\ncases l\n[GOAL]\ncase succ.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nk✝ : ℕ\nh✝ : drop k✝ l = []\nk : ℕ\nhk : ∀ {l : List α}, drop k l = [] → length l ≤ k\nh : drop (succ k) [] = []\n⊢ length [] ≤ succ k\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nk✝ : ℕ\nh✝ : drop k✝ l = []\nk : ℕ\nhk : ∀ {l : List α}, drop k l = [] → length l ≤ k\nhead✝ : α\ntail✝ : List α\nh : drop (succ k) (head✝ :: tail✝) = []\n⊢ length (head✝ :: tail✝) ≤ succ k\n[PROOFSTEP]\nsimp only [drop] at h \n[GOAL]\ncase succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nk✝ : ℕ\nh✝ : drop k✝ l = []\nk : ℕ\nhk : ∀ {l : List α}, drop k l = [] → length l ≤ k\nhead✝ : α\ntail✝ : List α\nh : drop k tail✝ = []\n⊢ length (head✝ :: tail✝) ≤ succ k\n[PROOFSTEP]\nsimpa [Nat.succ_le_succ_iff] using hk h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : ℕ\n⊢ tail (drop n l) = drop (n + 1) l\n[PROOFSTEP]\ninduction' l with hd tl hl generalizing n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn✝ n : ℕ\n⊢ tail (drop n []) = drop (n + 1) []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn✝ : ℕ\nhd : α\ntl : List α\nhl : ∀ (n : ℕ), tail (drop n tl) = drop (n + 1) tl\nn : ℕ\n⊢ tail (drop n (hd :: tl)) = drop (n + 1) (hd :: tl)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nhd : α\ntl : List α\nhl : ∀ (n : ℕ), tail (drop n tl) = drop (n + 1) tl\n⊢ tail (drop zero (hd :: tl)) = drop (zero + 1) (hd :: tl)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nhd : α\ntl : List α\nhl : ∀ (n : ℕ), tail (drop n tl) = drop (n + 1) tl\nn✝ : ℕ\n⊢ tail (drop (succ n✝) (hd :: tl)) = drop (succ n✝ + 1) (hd :: tl)\n[PROOFSTEP]\nsimp [hl]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : Fin (length l)\n⊢ get l n :: drop (↑n + 1) l = drop (↑n) l\n[PROOFSTEP]\ninduction' l with hd tl hl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝ : Fin (length l)\nn : Fin (length [])\n⊢ get [] n :: drop (↑n + 1) [] = drop ↑n []\n[PROOFSTEP]\nexact absurd n.1.zero_le (not_le_of_lt (nomatch n))\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝ : Fin (length l)\nhd : α\ntl : List α\nhl : ∀ {n : Fin (length tl)}, get tl n :: drop (↑n + 1) tl = drop (↑n) tl\nn : Fin (length (hd :: tl))\n⊢ get (hd :: tl) n :: drop (↑n + 1) (hd :: tl) = drop (↑n) (hd :: tl)\n[PROOFSTEP]\nmatch n with\n| ⟨0, _⟩ => simp [get]\n| ⟨n + 1, hn⟩ =>\n  simp only [Nat.succ_lt_succ_iff, List.length] at hn \n  simpa [List.get, List.drop] using hl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝ : Fin (length l)\nhd : α\ntl : List α\nhl : ∀ {n : Fin (length tl)}, get tl n :: drop (↑n + 1) tl = drop (↑n) tl\nn : Fin (length (hd :: tl))\nisLt✝ : 0 < length (hd :: tl)\n⊢ get (hd :: tl) { val := 0, isLt := isLt✝ } :: drop (↑{ val := 0, isLt := isLt✝ } + 1) (hd :: tl) =\n    drop (↑{ val := 0, isLt := isLt✝ }) (hd :: tl)\n[PROOFSTEP]\nsimp [get]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝¹ : Fin (length l)\nhd : α\ntl : List α\nhl : ∀ {n : Fin (length tl)}, get tl n :: drop (↑n + 1) tl = drop (↑n) tl\nn✝ : Fin (length (hd :: tl))\nn : ℕ\nhn : n + 1 < length (hd :: tl)\n⊢ get (hd :: tl) { val := n + 1, isLt := hn } :: drop (↑{ val := n + 1, isLt := hn } + 1) (hd :: tl) =\n    drop (↑{ val := n + 1, isLt := hn }) (hd :: tl)\n[PROOFSTEP]\nsimp only [Nat.succ_lt_succ_iff, List.length] at hn \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn✝¹ : Fin (length l)\nhd : α\ntl : List α\nhl : ∀ {n : Fin (length tl)}, get tl n :: drop (↑n + 1) tl = drop (↑n) tl\nn✝ : Fin (length (hd :: tl))\nn : ℕ\nhn✝ : n + 1 < length (hd :: tl)\nhn : n < length tl\n⊢ get (hd :: tl) { val := n + 1, isLt := hn✝ } :: drop (↑{ val := n + 1, isLt := hn✝ } + 1) (hd :: tl) =\n    drop (↑{ val := n + 1, isLt := hn✝ }) (hd :: tl)\n[PROOFSTEP]\nsimpa [List.get, List.drop] using hl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nn : ℕ\nh : length l₁ = n\n⊢ drop n (l₁ ++ l₂) = l₂\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nn : ℕ\nh : length l₁ = n\n⊢ drop (length l₁) (l₁ ++ l₂) = l₂\n[PROOFSTEP]\napply drop_left\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nh : l ≠ []\na : α\n⊢ drop (length l) (a :: l) = [getLast l h]\n[PROOFSTEP]\ninduction' l with y l ih generalizing a\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nh✝ : l ≠ []\na✝ : α\nh : [] ≠ []\na : α\n⊢ drop (length []) [a] = [getLast [] h]\n[PROOFSTEP]\ncases h rfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nh✝ : l✝ ≠ []\na✝ y : α\nl : List α\nih : ∀ (h : l ≠ []) (a : α), drop (length l) (a :: l) = [getLast l h]\nh : y :: l ≠ []\na : α\n⊢ drop (length (y :: l)) (a :: y :: l) = [getLast (y :: l) h]\n[PROOFSTEP]\nsimp only [drop, length]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nh✝ : l✝ ≠ []\na✝ y : α\nl : List α\nih : ∀ (h : l ≠ []) (a : α), drop (length l) (a :: l) = [getLast l h]\nh : y :: l ≠ []\na : α\n⊢ drop (Nat.add (length l) 0) (y :: l) = [getLast (y :: l) h]\n[PROOFSTEP]\nby_cases h₁ : l = []\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nh✝ : l✝ ≠ []\na✝ y : α\nl : List α\nih : ∀ (h : l ≠ []) (a : α), drop (length l) (a :: l) = [getLast l h]\nh : y :: l ≠ []\na : α\nh₁ : l = []\n⊢ drop (Nat.add (length l) 0) (y :: l) = [getLast (y :: l) h]\n[PROOFSTEP]\nsimp [h₁]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nh✝ : l✝ ≠ []\na✝ y : α\nl : List α\nih : ∀ (h : l ≠ []) (a : α), drop (length l) (a :: l) = [getLast l h]\nh : y :: l ≠ []\na : α\nh₁ : ¬l = []\n⊢ drop (Nat.add (length l) 0) (y :: l) = [getLast (y :: l) h]\n[PROOFSTEP]\nrw [getLast_cons h₁]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nh✝ : l✝ ≠ []\na✝ y : α\nl : List α\nih : ∀ (h : l ≠ []) (a : α), drop (length l) (a :: l) = [getLast l h]\nh : y :: l ≠ []\na : α\nh₁ : ¬l = []\n⊢ drop (Nat.add (length l) 0) (y :: l) = [getLast l h₁]\n[PROOFSTEP]\nexact ih h₁ y\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nn : ℕ\n⊢ drop n (l₁ ++ l₂) = drop n l₁ ++ drop (n - length l₁) l₂\n[PROOFSTEP]\ninduction l₁ generalizing n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nn : ℕ\n⊢ drop n ([] ++ l₂) = drop n [] ++ drop (n - length []) l₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ {n : ℕ}, drop n (tail✝ ++ l₂) = drop n tail✝ ++ drop (n - length tail✝) l₂\nn : ℕ\n⊢ drop n (head✝ :: tail✝ ++ l₂) = drop n (head✝ :: tail✝) ++ drop (n - length (head✝ :: tail✝)) l₂\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ {n : ℕ}, drop n (tail✝ ++ l₂) = drop n tail✝ ++ drop (n - length tail✝) l₂\n⊢ drop zero (head✝ :: tail✝ ++ l₂) = drop zero (head✝ :: tail✝) ++ drop (zero - length (head✝ :: tail✝)) l₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ l₂ : List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ {n : ℕ}, drop n (tail✝ ++ l₂) = drop n tail✝ ++ drop (n - length tail✝) l₂\nn✝ : ℕ\n⊢ drop (succ n✝) (head✝ :: tail✝ ++ l₂) = drop (succ n✝) (head✝ :: tail✝) ++ drop (succ n✝ - length (head✝ :: tail✝)) l₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nn : ℕ\nh : n ≤ length l₁\n⊢ drop n (l₁ ++ l₂) = drop n l₁ ++ l₂\n[PROOFSTEP]\nsimp [drop_append_eq_append_drop, tsub_eq_zero_iff_le.mpr h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\ni : ℕ\n⊢ drop (length l₁ + i) (l₁ ++ l₂) = drop i l₂\n[PROOFSTEP]\nrw [drop_append_eq_append_drop, drop_eq_nil_of_le]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\ni : ℕ\n⊢ [] ++ drop (length l₁ + i - length l₁) l₂ = drop i l₂\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\ni : ℕ\n⊢ length l₁ ≤ length l₁ + i\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nl : List α\n⊢ ∀ (n : ℕ), sizeOf (drop n l) ≤ sizeOf l\n[PROOFSTEP]\ninduction' l with _ _ lih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\n⊢ ∀ (n : ℕ), sizeOf (drop n []) ≤ sizeOf []\n[PROOFSTEP]\nintro n\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nhead✝ : α\ntail✝ : List α\nlih : ∀ (n : ℕ), sizeOf (drop n tail✝) ≤ sizeOf tail✝\n⊢ ∀ (n : ℕ), sizeOf (drop n (head✝ :: tail✝)) ≤ sizeOf (head✝ :: tail✝)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nn : ℕ\n⊢ sizeOf (drop n []) ≤ sizeOf []\n[PROOFSTEP]\nrw [drop_nil]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nhead✝ : α\ntail✝ : List α\nlih : ∀ (n : ℕ), sizeOf (drop n tail✝) ≤ sizeOf tail✝\nn : ℕ\n⊢ sizeOf (drop n (head✝ :: tail✝)) ≤ sizeOf (head✝ :: tail✝)\n[PROOFSTEP]\ninduction' n with n\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nhead✝ : α\ntail✝ : List α\nlih : ∀ (n : ℕ), sizeOf (drop n tail✝) ≤ sizeOf tail✝\n⊢ sizeOf (drop zero (head✝ :: tail✝)) ≤ sizeOf (head✝ :: tail✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nhead✝ : α\ntail✝ : List α\nlih : ∀ (n : ℕ), sizeOf (drop n tail✝) ≤ sizeOf tail✝\nn : ℕ\nn_ih✝ : sizeOf (drop n (head✝ :: tail✝)) ≤ sizeOf (head✝ :: tail✝)\n⊢ sizeOf (drop (succ n) (head✝ :: tail✝)) ≤ sizeOf (head✝ :: tail✝)\n[PROOFSTEP]\nexact Trans.trans (lih _) le_add_self\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nh : i + j < length L\n⊢ j < length (drop i L)\n[PROOFSTEP]\nhave A : i < L.length := lt_of_le_of_lt (Nat.le.intro rfl) h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nh : i + j < length L\nA : i < length L\n⊢ j < length (drop i L)\n[PROOFSTEP]\nrw [(take_append_drop i L).symm] at h \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nh : i + j < length (take i L ++ drop i L)\nA : i < length L\n⊢ j < length (drop i L)\n[PROOFSTEP]\nsimpa only [le_of_lt A, min_eq_left, add_lt_add_iff_left, length_take, length_append] using h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nh : i + j < length L\n⊢ get L { val := i + j, isLt := h } = get (drop i L) { val := j, isLt := (_ : j < length (drop i L)) }\n[PROOFSTEP]\nrw [← nthLe_eq, ← nthLe_eq]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nh : i + j < length L\n⊢ nthLe L (i + j) h = nthLe (drop i L) j (_ : j < length (drop i L))\n[PROOFSTEP]\nrw [nthLe_of_eq (take_append_drop i L).symm h, nthLe_append_right]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nh : i + j < length L\n⊢ nthLe (drop i L) (i + j - length (take i L)) (_ : i + j - length (take i L) < length (drop i L)) =\n    nthLe (drop i L) j (_ : j < length (drop i L))\n[PROOFSTEP]\nsimp [min_eq_left (show i ≤ length L from le_trans (by simp) (le_of_lt h))]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nh : i + j < length L\n⊢ i ≤ i + j\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₁\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nh : i + j < length L\n⊢ length (take i L) ≤ i + j\n[PROOFSTEP]\nsimp [min_eq_left (show i ≤ length L from le_trans (by simp) (le_of_lt h))]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nh : i + j < length L\n⊢ i ≤ i + j\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nh : i + j < length L\n⊢ j < length (drop i L)\n[PROOFSTEP]\nhave A : i < L.length := lt_of_le_of_lt (Nat.le.intro rfl) h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nh : i + j < length L\nA : i < length L\n⊢ j < length (drop i L)\n[PROOFSTEP]\nrw [(take_append_drop i L).symm] at h \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\nh : i + j < length (take i L ++ drop i L)\nA : i < length L\n⊢ j < length (drop i L)\n[PROOFSTEP]\nsimpa only [le_of_lt A, min_eq_left, add_lt_add_iff_left, length_take, length_append] using h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni : ℕ\nj : Fin (length (drop i L))\n⊢ get (drop i L) j = get L { val := i + ↑j, isLt := (_ : i + ↑j < length L) }\n[PROOFSTEP]\nrw [get_drop]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\n⊢ get? (drop i L) j = get? L (i + j)\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\na✝ : α\n⊢ a✝ ∈ get? (drop i L) j ↔ a✝ ∈ get? L (i + j)\n[PROOFSTEP]\nsimp only [get?_eq_some, get_drop', Option.mem_def]\n[GOAL]\ncase a\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\na✝ : α\n⊢ (∃ h, get L { val := i + j, isLt := (_ : i + ↑{ val := j, isLt := (_ : j < length (drop i L)) } < length L) } = a✝) ↔\n    ∃ h, get L { val := i + j, isLt := h } = a✝\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\na✝ : α\n⊢ (∃ h, get L { val := i + j, isLt := (_ : i + ↑{ val := j, isLt := (_ : j < length (drop i L)) } < length L) } = a✝) →\n    ∃ h, get L { val := i + j, isLt := h } = a✝\n[PROOFSTEP]\nexact fun ⟨h, ha⟩ => ⟨by simpa [lt_tsub_iff_left] using h, ha⟩\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\na✝ : α\nx✝ : ∃ h, get L { val := i + j, isLt := (_ : i + ↑{ val := j, isLt := (_ : j < length (drop i L)) } < length L) } = a✝\nh : j < length (drop i L)\nha : get L { val := i + j, isLt := (_ : i + ↑{ val := j, isLt := (_ : j < length (drop i L)) } < length L) } = a✝\n⊢ i + j < length L\n[PROOFSTEP]\nsimpa [lt_tsub_iff_left] using h\n[GOAL]\ncase a.mpr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\na✝ : α\n⊢ (∃ h, get L { val := i + j, isLt := h } = a✝) →\n    ∃ h, get L { val := i + j, isLt := (_ : i + ↑{ val := j, isLt := (_ : j < length (drop i L)) } < length L) } = a✝\n[PROOFSTEP]\nexact fun ⟨h, ha⟩ => ⟨by simpa [lt_tsub_iff_left] using h, ha⟩\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni j : ℕ\na✝ : α\nx✝ : ∃ h, get L { val := i + j, isLt := h } = a✝\nh : i + j < length L\nha : get L { val := i + j, isLt := h } = a✝\n⊢ j < length (drop i L)\n[PROOFSTEP]\nsimpa [lt_tsub_iff_left] using h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn m : ℕ\n⊢ drop n (drop m []) = drop (n + m) []\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nl : List α\n⊢ drop n (drop 0 l) = drop (n + 0) l\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nx✝ : List α\n⊢ drop 0 (take (0 + n) x✝) = take n (drop 0 x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm n : ℕ\n⊢ drop (m + 1) (take (m + 1 + n) []) = take n (drop (m + 1) [])\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm n : ℕ\nhead✝ : α\nl : List α\n⊢ drop (m + 1) (take (m + 1 + n) (head✝ :: l)) = take n (drop (m + 1) (head✝ :: l))\n[PROOFSTEP]\nhave h : m + 1 + n = m + n + 1 := by ac_rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm n : ℕ\nhead✝ : α\nl : List α\n⊢ m + 1 + n = m + n + 1\n[PROOFSTEP]\nac_rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm n : ℕ\nhead✝ : α\nl : List α\nh : m + 1 + n = m + n + 1\n⊢ drop (m + 1) (take (m + 1 + n) (head✝ :: l)) = take n (drop (m + 1) (head✝ :: l))\n[PROOFSTEP]\nsimpa [take_cons, h] using drop_take m n l\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\nf : α → β\ni : ℕ\n⊢ map f (drop i []) = drop i (map f [])\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\nf : α → β\nL : List α\n⊢ map f (drop 0 L) = drop 0 (map f L)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\nf : α → β\nh : α\nt : List α\nn : ℕ\n⊢ map f (drop (n + 1) (h :: t)) = drop (n + 1) (map f (h :: t))\n[PROOFSTEP]\ndsimp\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\nf : α → β\nh : α\nt : List α\nn : ℕ\n⊢ map f (drop n t) = drop n (map f t)\n[PROOFSTEP]\nrw [map_drop f t]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\nn : ℕ\nl : List α\nh : n < length l\n⊢ modifyNth f n l = take n l ++ f (get l { val := n, isLt := h }) :: drop (n + 1) l\n[PROOFSTEP]\nrw [modifyNth_eq_take_drop, drop_eq_get_cons h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\nn : ℕ\nl : List α\nh : n < length l\n⊢ take n l ++ modifyHead f (get l { val := n, isLt := h } :: drop (n + 1) l) =\n    take n l ++ f (get l { val := n, isLt := h }) :: drop (n + 1) l\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn : ℕ\nl : List α\nh : n < length l\n⊢ set l n a = take n l ++ a :: drop (n + 1) l\n[PROOFSTEP]\nrw [set_eq_modifyNth, modifyNth_eq_take_cons_drop _ h]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn : ℕ\nh : n ≤ length xs\n⊢ take n (reverse xs) = reverse (drop (length xs - n) xs)\n[PROOFSTEP]\ninduction' xs with xs_hd xs_tl xs_ih generalizing n\n[GOAL]\ncase nil\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn✝ : ℕ\nh✝ : n✝ ≤ length xs\nn : ℕ\nh : n ≤ length []\n⊢ take n (reverse []) = reverse (drop (length [] - n) [])\n[PROOFSTEP]\nsimp only [reverse_cons, drop, reverse_nil, zero_tsub, length, take_nil]\n[GOAL]\ncase cons\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn✝ : ℕ\nh✝ : n✝ ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nn : ℕ\nh : n ≤ length (xs_hd :: xs_tl)\n⊢ take n (reverse (xs_hd :: xs_tl)) = reverse (drop (length (xs_hd :: xs_tl) - n) (xs_hd :: xs_tl))\n[PROOFSTEP]\nsimp only [reverse_cons, drop, reverse_nil, zero_tsub, length, take_nil]\n[GOAL]\ncase cons\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn✝ : ℕ\nh✝ : n✝ ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nn : ℕ\nh : n ≤ length (xs_hd :: xs_tl)\n⊢ take n (reverse xs_tl ++ [xs_hd]) = reverse (drop (length xs_tl + 1 - n) (xs_hd :: xs_tl))\n[PROOFSTEP]\ncases' h.lt_or_eq_dec with h' h'\n[GOAL]\ncase cons.inl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn✝ : ℕ\nh✝ : n✝ ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nn : ℕ\nh : n ≤ length (xs_hd :: xs_tl)\nh' : n < length (xs_hd :: xs_tl)\n⊢ take n (reverse xs_tl ++ [xs_hd]) = reverse (drop (length xs_tl + 1 - n) (xs_hd :: xs_tl))\n[PROOFSTEP]\nreplace h' := le_of_succ_le_succ h'\n[GOAL]\ncase cons.inl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn✝ : ℕ\nh✝ : n✝ ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nn : ℕ\nh : n ≤ length (xs_hd :: xs_tl)\nh' : n ≤ length xs_tl\n⊢ take n (reverse xs_tl ++ [xs_hd]) = reverse (drop (length xs_tl + 1 - n) (xs_hd :: xs_tl))\n[PROOFSTEP]\nrw [take_append_of_le_length, xs_ih _ h']\n[GOAL]\ncase cons.inl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn✝ : ℕ\nh✝ : n✝ ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nn : ℕ\nh : n ≤ length (xs_hd :: xs_tl)\nh' : n ≤ length xs_tl\n⊢ reverse (drop (length xs_tl - n) xs_tl) = reverse (drop (length xs_tl + 1 - n) (xs_hd :: xs_tl))\ncase cons.inl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn✝ : ℕ\nh✝ : n✝ ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nn : ℕ\nh : n ≤ length (xs_hd :: xs_tl)\nh' : n ≤ length xs_tl\n⊢ n ≤ length (reverse xs_tl)\n[PROOFSTEP]\nrw [show xs_tl.length + 1 - n = succ (xs_tl.length - n) from _, drop]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn✝ : ℕ\nh✝ : n✝ ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nn : ℕ\nh : n ≤ length (xs_hd :: xs_tl)\nh' : n ≤ length xs_tl\n⊢ length xs_tl + 1 - n = succ (length xs_tl - n)\n[PROOFSTEP]\nrwa [succ_eq_add_one, ← @tsub_add_eq_add_tsub]\n[GOAL]\ncase cons.inl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn✝ : ℕ\nh✝ : n✝ ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nn : ℕ\nh : n ≤ length (xs_hd :: xs_tl)\nh' : n ≤ length xs_tl\n⊢ n ≤ length (reverse xs_tl)\n[PROOFSTEP]\nrwa [length_reverse]\n[GOAL]\ncase cons.inr\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn✝ : ℕ\nh✝ : n✝ ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nn : ℕ\nh : n ≤ length (xs_hd :: xs_tl)\nh' : n = length (xs_hd :: xs_tl)\n⊢ take n (reverse xs_tl ++ [xs_hd]) = reverse (drop (length xs_tl + 1 - n) (xs_hd :: xs_tl))\n[PROOFSTEP]\nsubst h'\n[GOAL]\ncase cons.inr\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn : ℕ\nh✝ : n ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nh : length (xs_hd :: xs_tl) ≤ length (xs_hd :: xs_tl)\n⊢ take (length (xs_hd :: xs_tl)) (reverse xs_tl ++ [xs_hd]) =\n    reverse (drop (length xs_tl + 1 - length (xs_hd :: xs_tl)) (xs_hd :: xs_tl))\n[PROOFSTEP]\nrw [length, tsub_self, drop]\n[GOAL]\ncase cons.inr\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn : ℕ\nh✝ : n ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nh : length (xs_hd :: xs_tl) ≤ length (xs_hd :: xs_tl)\n⊢ take (length xs_tl + 1) (reverse xs_tl ++ [xs_hd]) = reverse (xs_hd :: xs_tl)\n[PROOFSTEP]\nsuffices xs_tl.length + 1 = (xs_tl.reverse ++ [xs_hd]).length by rw [this, take_length, reverse_cons]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn : ℕ\nh✝ : n ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nh : length (xs_hd :: xs_tl) ≤ length (xs_hd :: xs_tl)\nthis : length xs_tl + 1 = length (reverse xs_tl ++ [xs_hd])\n⊢ take (length xs_tl + 1) (reverse xs_tl ++ [xs_hd]) = reverse (xs_hd :: xs_tl)\n[PROOFSTEP]\nrw [this, take_length, reverse_cons]\n[GOAL]\ncase cons.inr\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn : ℕ\nh✝ : n ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nh : length (xs_hd :: xs_tl) ≤ length (xs_hd :: xs_tl)\n⊢ length xs_tl + 1 = length (reverse xs_tl ++ [xs_hd])\n[PROOFSTEP]\nrw [length_append, length_reverse]\n[GOAL]\ncase cons.inr\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nxs : List α\nn : ℕ\nh✝ : n ≤ length xs\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (n : ℕ), n ≤ length xs_tl → take n (reverse xs_tl) = reverse (drop (length xs_tl - n) xs_tl)\nh : length (xs_hd :: xs_tl) ≤ length (xs_hd :: xs_tl)\n⊢ length xs_tl + 1 = length xs_tl + length [xs_hd]\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : ℕ\na : α\n⊢ set l n a = [] ↔ l = []\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\na : α\n⊢ set [] n a = [] ↔ [] = []\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\na head✝ : α\ntail✝ : List α\n⊢ set (head✝ :: tail✝) n a = [] ↔ head✝ :: tail✝ = []\n[PROOFSTEP]\ncases n\n[GOAL]\ncase nil.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\n⊢ set [] zero a = [] ↔ [] = []\n[PROOFSTEP]\nsimp only [set]\n[GOAL]\ncase nil.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nn✝ : ℕ\n⊢ set [] (succ n✝) a = [] ↔ [] = []\n[PROOFSTEP]\nsimp only [set]\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na head✝ : α\ntail✝ : List α\n⊢ set (head✝ :: tail✝) zero a = [] ↔ head✝ :: tail✝ = []\n[PROOFSTEP]\nsimp only [set]\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na head✝ : α\ntail✝ : List α\nn✝ : ℕ\n⊢ set (head✝ :: tail✝) (succ n✝) a = [] ↔ head✝ :: tail✝ = []\n[PROOFSTEP]\nsimp only [set]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\ninst✝ : Inhabited α\nl₁ l₂ : List α\n⊢ length l₁ ≤ length (l₁ ++ l₂)\n[PROOFSTEP]\nsimp only [length_append, Nat.le_add_right]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\ninst✝ : Inhabited α\nl₁ l₂ : List α\nn : ℕ\nh : length l₁ = n\n⊢ takeI n (l₁ ++ l₂) = l₁\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\ninst✝ : Inhabited α\nl₁ l₂ : List α\nn : ℕ\nh : length l₁ = n\n⊢ takeI (length l₁) (l₁ ++ l₂) = l₁\n[PROOFSTEP]\napply takeI_left\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\na : α\n⊢ length l₁ ≤ length (l₁ ++ l₂)\n[PROOFSTEP]\nsimp only [length_append, Nat.le_add_right]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nn : ℕ\na : α\nh : length l₁ = n\n⊢ takeD n (l₁ ++ l₂) a = l₁\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ l₁ l₂ : List α\nn : ℕ\na : α\nh : length l₁ = n\n⊢ takeD (length l₁) (l₁ ++ l₂) a = l₁\n[PROOFSTEP]\napply takeD_left\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β → α\na : α\nl : List β\nH : ∀ (a : α) (b : β), b ∈ l → f a b = g a b\n⊢ foldl f a l = foldl g a l\n[PROOFSTEP]\ninduction l generalizing a with\n| nil => rfl\n| cons hd tl ih =>\n  unfold foldl\n  rw [ih _ fun a b bin => H a b <| mem_cons_of_mem _ bin, H a hd (mem_cons_self _ _)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β → α\na : α\nl : List β\nH : ∀ (a : α) (b : β), b ∈ l → f a b = g a b\n⊢ foldl f a l = foldl g a l\n[PROOFSTEP]\ninduction l generalizing a with\n| nil => rfl\n| cons hd tl ih =>\n  unfold foldl\n  rw [ih _ fun a b bin => H a b <| mem_cons_of_mem _ bin, H a hd (mem_cons_self _ _)]\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β → α\na : α\nH : ∀ (a : α) (b : β), b ∈ [] → f a b = g a b\n⊢ foldl f a [] = foldl g a []\n[PROOFSTEP]\n\n| nil => rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β → α\na : α\nH : ∀ (a : α) (b : β), b ∈ [] → f a b = g a b\n⊢ foldl f a [] = foldl g a []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β → α\nhd : β\ntl : List β\nih : ∀ (a : α), (∀ (a : α) (b : β), b ∈ tl → f a b = g a b) → foldl f a tl = foldl g a tl\na : α\nH : ∀ (a : α) (b : β), b ∈ hd :: tl → f a b = g a b\n⊢ foldl f a (hd :: tl) = foldl g a (hd :: tl)\n[PROOFSTEP]\n\n| cons hd tl ih =>\n  unfold foldl\n  rw [ih _ fun a b bin => H a b <| mem_cons_of_mem _ bin, H a hd (mem_cons_self _ _)]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β → α\nhd : β\ntl : List β\nih : ∀ (a : α), (∀ (a : α) (b : β), b ∈ tl → f a b = g a b) → foldl f a tl = foldl g a tl\na : α\nH : ∀ (a : α) (b : β), b ∈ hd :: tl → f a b = g a b\n⊢ foldl f a (hd :: tl) = foldl g a (hd :: tl)\n[PROOFSTEP]\nunfold foldl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β → α\nhd : β\ntl : List β\nih : ∀ (a : α), (∀ (a : α) (b : β), b ∈ tl → f a b = g a b) → foldl f a tl = foldl g a tl\na : α\nH : ∀ (a : α) (b : β), b ∈ hd :: tl → f a b = g a b\n⊢ foldl f (f a hd) tl = foldl g (g a hd) tl\n[PROOFSTEP]\nrw [ih _ fun a b bin => H a b <| mem_cons_of_mem _ bin, H a hd (mem_cons_self _ _)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β → β\nb : β\nl : List α\nH : ∀ (a : α), a ∈ l → ∀ (b : β), f a b = g a b\n⊢ foldr f b l = foldr g b l\n[PROOFSTEP]\ninduction' l with hd tl ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β → β\nb : β\nl : List α\nH✝ : ∀ (a : α), a ∈ l → ∀ (b : β), f a b = g a b\nH : ∀ (a : α), a ∈ [] → ∀ (b : β), f a b = g a b\n⊢ foldr f b [] = foldr g b []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β → β\nb : β\nl : List α\nH✝ : ∀ (a : α), a ∈ l → ∀ (b : β), f a b = g a b\nhd : α\ntl : List α\nih : (∀ (a : α), a ∈ tl → ∀ (b : β), f a b = g a b) → foldr f b tl = foldr g b tl\nH : ∀ (a : α), a ∈ hd :: tl → ∀ (b : β), f a b = g a b\n⊢ foldr f b (hd :: tl) = foldr g b (hd :: tl)\n[PROOFSTEP]\nsimp only [mem_cons, or_imp, forall_and, forall_eq] at H \n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf g : α → β → β\nb : β\nl : List α\nH✝ : ∀ (a : α), a ∈ l → ∀ (b : β), f a b = g a b\nhd : α\ntl : List α\nih : (∀ (a : α), a ∈ tl → ∀ (b : β), f a b = g a b) → foldr f b tl = foldr g b tl\nH : (∀ (b : β), f hd b = g hd b) ∧ ∀ (x : α), x ∈ tl → ∀ (b : β), f x b = g x b\n⊢ foldr f b (hd :: tl) = foldr g b (hd :: tl)\n[PROOFSTEP]\nsimp only [foldr, ih H.2, H.1]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\nx : α\nxs : List α\n⊢ foldl f b (xs ++ [x]) = f (foldl f b xs) x\n[PROOFSTEP]\nsimp only [List.foldl_append, List.foldl]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → β\nb : β\nx : α\nxs : List α\n⊢ foldr f b (xs ++ [x]) = foldr f (f x b) xs\n[PROOFSTEP]\nsimp only [List.foldr_append, List.foldr]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → α\na : α\nhf : ∀ (b : β), f a b = a\nb : β\nl : List β\n⊢ foldl f a (b :: l) = a\n[PROOFSTEP]\nrw [foldl_cons, hf b, foldl_fixed' hf l]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → β\nb : β\nhf : ∀ (a : α), f a b = b\na : α\nl : List α\n⊢ foldr f b (a :: l) = b\n[PROOFSTEP]\nrw [foldr_cons, foldr_fixed' hf l, hf a]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → α\na : α\nl : List β\nL : List (List β)\n⊢ foldl f a (join (l :: L)) = foldl (foldl f) a (l :: L)\n[PROOFSTEP]\nsimp only [join, foldl_append, foldl_cons, foldl_join f (foldl f a l) L]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → β\na : β\nl : List α\nL : List (List α)\n⊢ foldr f a (join (l :: L)) = foldr (fun l b => foldr f b l) a (l :: L)\n[PROOFSTEP]\nsimp only [join, foldr_append, foldr_join f a L, foldr_cons]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ ∀ (l : List α), foldr cons [] l = l\n[PROOFSTEP]\nsimp only [foldr_self_append, append_nil, forall_const]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\n⊢ reverse (foldl (fun t h => h :: t) [] l) = l\n[PROOFSTEP]\nrw [← foldr_reverse]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\n⊢ reverse (foldr (fun h t => h :: t) [] (reverse l)) = l\n[PROOFSTEP]\nsimp only [foldr_self_append, append_nil, reverse_reverse]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα β : Type u\ng : α → β\nf : α → α → α\nf' : β → β → β\na : α\nl : List α\nh : ∀ (x y : α), f' (g x) (g y) = g (f x y)\n⊢ foldl f' (g a) (map g l) = g (foldl f a l)\n[PROOFSTEP]\ninduction l generalizing a\n[GOAL]\ncase nil\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα β : Type u\ng : α → β\nf : α → α → α\nf' : β → β → β\nh : ∀ (x y : α), f' (g x) (g y) = g (f x y)\na : α\n⊢ foldl f' (g a) (map g []) = g (foldl f a [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα β : Type u\ng : α → β\nf : α → α → α\nf' : β → β → β\nh : ∀ (x y : α), f' (g x) (g y) = g (f x y)\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (a : α), foldl f' (g a) (map g tail✝) = g (foldl f a tail✝)\na : α\n⊢ foldl f' (g a) (map g (head✝ :: tail✝)) = g (foldl f a (head✝ :: tail✝))\n[PROOFSTEP]\nsimp [*, h]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα β : Type u\ng : α → β\nf : α → α → α\nf' : β → β → β\na : α\nl : List α\nh : ∀ (x y : α), f' (g x) (g y) = g (f x y)\n⊢ foldr f' (g a) (map g l) = g (foldr f a l)\n[PROOFSTEP]\ninduction l generalizing a\n[GOAL]\ncase nil\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα β : Type u\ng : α → β\nf : α → α → α\nf' : β → β → β\nh : ∀ (x y : α), f' (g x) (g y) = g (f x y)\na : α\n⊢ foldr f' (g a) (map g []) = g (foldr f a [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα β : Type u\ng : α → β\nf : α → α → α\nf' : β → β → β\nh : ∀ (x y : α), f' (g x) (g y) = g (f x y)\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (a : α), foldr f' (g a) (map g tail✝) = g (foldr f a tail✝)\na : α\n⊢ foldr f' (g a) (map g (head✝ :: tail✝)) = g (foldr f a (head✝ :: tail✝))\n[PROOFSTEP]\nsimp [*, h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List ι\nf : α → β → γ\nop₁ : α → ι → α\nop₂ : β → ι → β\nop₃ : γ → ι → γ\na : α\nb : β\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ a i) (op₂ b i) = op₃ (f a b) i\n⊢ f (foldl op₁ a l) (foldl op₂ b l) = foldl op₃ (f a b) l\n[PROOFSTEP]\nrevert a b\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List ι\nf : α → β → γ\nop₁ : α → ι → α\nop₂ : β → ι → β\nop₃ : γ → ι → γ\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ a i) (op₂ b i) = op₃ (f a b) i\n⊢ ∀ (a : α) (b : β), f (foldl op₁ a l) (foldl op₂ b l) = foldl op₃ (f a b) l\n[PROOFSTEP]\ninduction l <;> intros <;> [rfl; simp only [*, foldl]]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List ι\nf : α → β → γ\nop₁ : α → ι → α\nop₂ : β → ι → β\nop₃ : γ → ι → γ\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ a i) (op₂ b i) = op₃ (f a b) i\n⊢ ∀ (a : α) (b : β), f (foldl op₁ a l) (foldl op₂ b l) = foldl op₃ (f a b) l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\nop₁ : α → ι → α\nop₂ : β → ι → β\nop₃ : γ → ι → γ\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ a i) (op₂ b i) = op₃ (f a b) i\n⊢ ∀ (a : α) (b : β), f (foldl op₁ a []) (foldl op₂ b []) = foldl op₃ (f a b) []\n[PROOFSTEP]\nintros\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\nop₁ : α → ι → α\nop₂ : β → ι → β\nop₃ : γ → ι → γ\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ a i) (op₂ b i) = op₃ (f a b) i\nhead✝ : ι\ntail✝ : List ι\ntail_ih✝ : ∀ (a : α) (b : β), f (foldl op₁ a tail✝) (foldl op₂ b tail✝) = foldl op₃ (f a b) tail✝\n⊢ ∀ (a : α) (b : β),\n    f (foldl op₁ a (head✝ :: tail✝)) (foldl op₂ b (head✝ :: tail✝)) = foldl op₃ (f a b) (head✝ :: tail✝)\n[PROOFSTEP]\nintros\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\nop₁ : α → ι → α\nop₂ : β → ι → β\nop₃ : γ → ι → γ\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ a i) (op₂ b i) = op₃ (f a b) i\na✝ : α\nb✝ : β\n⊢ f (foldl op₁ a✝ []) (foldl op₂ b✝ []) = foldl op₃ (f a✝ b✝) []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\nop₁ : α → ι → α\nop₂ : β → ι → β\nop₃ : γ → ι → γ\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ a i) (op₂ b i) = op₃ (f a b) i\nhead✝ : ι\ntail✝ : List ι\ntail_ih✝ : ∀ (a : α) (b : β), f (foldl op₁ a tail✝) (foldl op₂ b tail✝) = foldl op₃ (f a b) tail✝\na✝ : α\nb✝ : β\n⊢ f (foldl op₁ a✝ (head✝ :: tail✝)) (foldl op₂ b✝ (head✝ :: tail✝)) = foldl op₃ (f a✝ b✝) (head✝ :: tail✝)\n[PROOFSTEP]\nsimp only [*, foldl]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List ι\nf : α → β → γ\nop₁ : ι → α → α\nop₂ : ι → β → β\nop₃ : ι → γ → γ\na : α\nb : β\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ i a) (op₂ i b) = op₃ i (f a b)\n⊢ foldr op₃ (f a b) l = f (foldr op₁ a l) (foldr op₂ b l)\n[PROOFSTEP]\nrevert a\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List ι\nf : α → β → γ\nop₁ : ι → α → α\nop₂ : ι → β → β\nop₃ : ι → γ → γ\nb : β\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ i a) (op₂ i b) = op₃ i (f a b)\n⊢ ∀ (a : α), foldr op₃ (f a b) l = f (foldr op₁ a l) (foldr op₂ b l)\n[PROOFSTEP]\ninduction l <;> intros <;> [rfl; simp only [*, foldr]]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List ι\nf : α → β → γ\nop₁ : ι → α → α\nop₂ : ι → β → β\nop₃ : ι → γ → γ\nb : β\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ i a) (op₂ i b) = op₃ i (f a b)\n⊢ ∀ (a : α), foldr op₃ (f a b) l = f (foldr op₁ a l) (foldr op₂ b l)\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\nop₁ : ι → α → α\nop₂ : ι → β → β\nop₃ : ι → γ → γ\nb : β\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ i a) (op₂ i b) = op₃ i (f a b)\n⊢ ∀ (a : α), foldr op₃ (f a b) [] = f (foldr op₁ a []) (foldr op₂ b [])\n[PROOFSTEP]\nintros\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\nop₁ : ι → α → α\nop₂ : ι → β → β\nop₃ : ι → γ → γ\nb : β\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ i a) (op₂ i b) = op₃ i (f a b)\nhead✝ : ι\ntail✝ : List ι\ntail_ih✝ : ∀ (a : α), foldr op₃ (f a b) tail✝ = f (foldr op₁ a tail✝) (foldr op₂ b tail✝)\n⊢ ∀ (a : α), foldr op₃ (f a b) (head✝ :: tail✝) = f (foldr op₁ a (head✝ :: tail✝)) (foldr op₂ b (head✝ :: tail✝))\n[PROOFSTEP]\nintros\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\nop₁ : ι → α → α\nop₂ : ι → β → β\nop₃ : ι → γ → γ\nb : β\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ i a) (op₂ i b) = op₃ i (f a b)\na✝ : α\n⊢ foldr op₃ (f a✝ b) [] = f (foldr op₁ a✝ []) (foldr op₂ b [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → γ\nop₁ : ι → α → α\nop₂ : ι → β → β\nop₃ : ι → γ → γ\nb : β\nh : ∀ (a : α) (b : β) (i : ι), f (op₁ i a) (op₂ i b) = op₃ i (f a b)\nhead✝ : ι\ntail✝ : List ι\ntail_ih✝ : ∀ (a : α), foldr op₃ (f a b) tail✝ = f (foldr op₁ a tail✝) (foldr op₂ b tail✝)\na✝ : α\n⊢ foldr op₃ (f a✝ b) (head✝ :: tail✝) = f (foldr op₁ a✝ (head✝ :: tail✝)) (foldr op₂ b (head✝ :: tail✝))\n[PROOFSTEP]\nsimp only [*, foldr]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nl : List (α → α)\nf : α → α\nhl : ∀ (f : α → α), f ∈ l → Injective f\nhf : Injective f\n⊢ Injective (foldl comp f l)\n[PROOFSTEP]\ninduction' l with lh lt l_ih generalizing f\n[GOAL]\ncase nil\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nl : List (α → α)\nf✝ : α → α\nhl✝ : ∀ (f : α → α), f ∈ l → Injective f\nhf✝ : Injective f✝\nf : α → α\nhl : ∀ (f : α → α), f ∈ [] → Injective f\nhf : Injective f\n⊢ Injective (foldl comp f [])\n[PROOFSTEP]\nexact hf\n[GOAL]\ncase cons\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nl : List (α → α)\nf✝ : α → α\nhl✝ : ∀ (f : α → α), f ∈ l → Injective f\nhf✝ : Injective f✝\nlh : α → α\nlt : List (α → α)\nl_ih : ∀ {f : α → α}, (∀ (f : α → α), f ∈ lt → Injective f) → Injective f → Injective (foldl comp f lt)\nf : α → α\nhl : ∀ (f : α → α), f ∈ lh :: lt → Injective f\nhf : Injective f\n⊢ Injective (foldl comp f (lh :: lt))\n[PROOFSTEP]\napply l_ih fun _ h => hl _ (List.mem_cons_of_mem _ h)\n[GOAL]\ncase cons\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nl : List (α → α)\nf✝ : α → α\nhl✝ : ∀ (f : α → α), f ∈ l → Injective f\nhf✝ : Injective f✝\nlh : α → α\nlt : List (α → α)\nl_ih : ∀ {f : α → α}, (∀ (f : α → α), f ∈ lt → Injective f) → Injective f → Injective (foldl comp f lt)\nf : α → α\nhl : ∀ (f : α → α), f ∈ lh :: lt → Injective f\nhf : Injective f\n⊢ Injective (f ∘ lh)\n[PROOFSTEP]\napply Function.Injective.comp hf\n[GOAL]\ncase cons\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nl : List (α → α)\nf✝ : α → α\nhl✝ : ∀ (f : α → α), f ∈ l → Injective f\nhf✝ : Injective f✝\nlh : α → α\nlt : List (α → α)\nl_ih : ∀ {f : α → α}, (∀ (f : α → α), f ∈ lt → Injective f) → Injective f → Injective (foldl comp f lt)\nf : α → α\nhl : ∀ (f : α → α), f ∈ lh :: lt → Injective f\nhf : Injective f\n⊢ Injective lh\n[PROOFSTEP]\napply hl _ (List.mem_cons_self _ _)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nl : List α\nop : α → β → β\nb : β\nhb : C b\nhl : (b : β) → C b → (a : α) → a ∈ l → C (op a b)\n⊢ C (foldr op b l)\n[PROOFSTEP]\ncases l with\n| nil => exact hb\n|\n  cons hd tl =>\n  have IH : ((b : β) → C b → (a : α) → a ∈ tl → C (op a b)) → C (foldr op b tl) := foldrRecOn _ _ _ hb\n  refine' hl _ _ hd (mem_cons_self hd tl)\n  refine' IH _\n  intro y hy x hx\n  exact hl y hy x (mem_cons_of_mem hd hx)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nl : List α\nop : α → β → β\nb : β\nhb : C b\nhl : (b : β) → C b → (a : α) → a ∈ l → C (op a b)\n⊢ C (foldr op b l)\n[PROOFSTEP]\ncases l with\n| nil => exact hb\n|\n  cons hd tl =>\n  have IH : ((b : β) → C b → (a : α) → a ∈ tl → C (op a b)) → C (foldr op b tl) := foldrRecOn _ _ _ hb\n  refine' hl _ _ hd (mem_cons_self hd tl)\n  refine' IH _\n  intro y hy x hx\n  exact hl y hy x (mem_cons_of_mem hd hx)\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : α → β → β\nb : β\nhb : C b\nhl : (b : β) → C b → (a : α) → a ∈ [] → C (op a b)\n⊢ C (foldr op b [])\n[PROOFSTEP]\n\n| nil => exact hb\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : α → β → β\nb : β\nhb : C b\nhl : (b : β) → C b → (a : α) → a ∈ [] → C (op a b)\n⊢ C (foldr op b [])\n[PROOFSTEP]\nexact hb\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : α → β → β\nb : β\nhb : C b\nhd : α\ntl : List α\nhl : (b : β) → C b → (a : α) → a ∈ hd :: tl → C (op a b)\n⊢ C (foldr op b (hd :: tl))\n[PROOFSTEP]\n\n|\n  cons hd tl =>\n  have IH : ((b : β) → C b → (a : α) → a ∈ tl → C (op a b)) → C (foldr op b tl) := foldrRecOn _ _ _ hb\n  refine' hl _ _ hd (mem_cons_self hd tl)\n  refine' IH _\n  intro y hy x hx\n  exact hl y hy x (mem_cons_of_mem hd hx)\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : α → β → β\nb : β\nhb : C b\nhd : α\ntl : List α\nhl : (b : β) → C b → (a : α) → a ∈ hd :: tl → C (op a b)\n⊢ C (foldr op b (hd :: tl))\n[PROOFSTEP]\nhave IH : ((b : β) → C b → (a : α) → a ∈ tl → C (op a b)) → C (foldr op b tl) := foldrRecOn _ _ _ hb\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : α → β → β\nb : β\nhb : C b\nhd : α\ntl : List α\nhl : (b : β) → C b → (a : α) → a ∈ hd :: tl → C (op a b)\nIH : ((b : β) → C b → (a : α) → a ∈ tl → C (op a b)) → C (foldr op b tl)\n⊢ C (foldr op b (hd :: tl))\n[PROOFSTEP]\nrefine' hl _ _ hd (mem_cons_self hd tl)\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : α → β → β\nb : β\nhb : C b\nhd : α\ntl : List α\nhl : (b : β) → C b → (a : α) → a ∈ hd :: tl → C (op a b)\nIH : ((b : β) → C b → (a : α) → a ∈ tl → C (op a b)) → C (foldr op b tl)\n⊢ C (foldr op b tl)\n[PROOFSTEP]\nrefine' IH _\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : α → β → β\nb : β\nhb : C b\nhd : α\ntl : List α\nhl : (b : β) → C b → (a : α) → a ∈ hd :: tl → C (op a b)\nIH : ((b : β) → C b → (a : α) → a ∈ tl → C (op a b)) → C (foldr op b tl)\n⊢ (b : β) → C b → (a : α) → a ∈ tl → C (op a b)\n[PROOFSTEP]\nintro y hy x hx\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : α → β → β\nb : β\nhb : C b\nhd : α\ntl : List α\nhl : (b : β) → C b → (a : α) → a ∈ hd :: tl → C (op a b)\nIH : ((b : β) → C b → (a : α) → a ∈ tl → C (op a b)) → C (foldr op b tl)\ny : β\nhy : C y\nx : α\nhx : x ∈ tl\n⊢ C (op x y)\n[PROOFSTEP]\nexact hl y hy x (mem_cons_of_mem hd hx)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nl : List α\nop : β → α → β\nb : β\nhb : C b\nhl : (b : β) → C b → (a : α) → a ∈ l → C (op b a)\n⊢ C (foldl op b l)\n[PROOFSTEP]\ncases l with\n| nil => exact hb\n|\n  cons hd tl =>\n  have IH : (b : β) → C b → ((b : β) → C b → (a : α) → a ∈ tl → C (op b a)) → C (foldl op b tl) := foldlRecOn _ _\n  refine' IH _ _ _\n  · exact hl b hb hd (mem_cons_self hd tl)\n  · intro y hy x hx\n    exact hl y hy x (mem_cons_of_mem hd hx)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nl : List α\nop : β → α → β\nb : β\nhb : C b\nhl : (b : β) → C b → (a : α) → a ∈ l → C (op b a)\n⊢ C (foldl op b l)\n[PROOFSTEP]\ncases l with\n| nil => exact hb\n|\n  cons hd tl =>\n  have IH : (b : β) → C b → ((b : β) → C b → (a : α) → a ∈ tl → C (op b a)) → C (foldl op b tl) := foldlRecOn _ _\n  refine' IH _ _ _\n  · exact hl b hb hd (mem_cons_self hd tl)\n  · intro y hy x hx\n    exact hl y hy x (mem_cons_of_mem hd hx)\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : β → α → β\nb : β\nhb : C b\nhl : (b : β) → C b → (a : α) → a ∈ [] → C (op b a)\n⊢ C (foldl op b [])\n[PROOFSTEP]\n\n| nil => exact hb\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : β → α → β\nb : β\nhb : C b\nhl : (b : β) → C b → (a : α) → a ∈ [] → C (op b a)\n⊢ C (foldl op b [])\n[PROOFSTEP]\nexact hb\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : β → α → β\nb : β\nhb : C b\nhd : α\ntl : List α\nhl : (b : β) → C b → (a : α) → a ∈ hd :: tl → C (op b a)\n⊢ C (foldl op b (hd :: tl))\n[PROOFSTEP]\n\n|\n  cons hd tl =>\n  have IH : (b : β) → C b → ((b : β) → C b → (a : α) → a ∈ tl → C (op b a)) → C (foldl op b tl) := foldlRecOn _ _\n  refine' IH _ _ _\n  · exact hl b hb hd (mem_cons_self hd tl)\n  · intro y hy x hx\n    exact hl y hy x (mem_cons_of_mem hd hx)\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : β → α → β\nb : β\nhb : C b\nhd : α\ntl : List α\nhl : (b : β) → C b → (a : α) → a ∈ hd :: tl → C (op b a)\n⊢ C (foldl op b (hd :: tl))\n[PROOFSTEP]\nhave IH : (b : β) → C b → ((b : β) → C b → (a : α) → a ∈ tl → C (op b a)) → C (foldl op b tl) := foldlRecOn _ _\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : β → α → β\nb : β\nhb : C b\nhd : α\ntl : List α\nhl : (b : β) → C b → (a : α) → a ∈ hd :: tl → C (op b a)\nIH : (b : β) → C b → ((b : β) → C b → (a : α) → a ∈ tl → C (op b a)) → C (foldl op b tl)\n⊢ C (foldl op b (hd :: tl))\n[PROOFSTEP]\nrefine' IH _ _ _\n[GOAL]\ncase cons.refine'_1\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : β → α → β\nb : β\nhb : C b\nhd : α\ntl : List α\nhl : (b : β) → C b → (a : α) → a ∈ hd :: tl → C (op b a)\nIH : (b : β) → C b → ((b : β) → C b → (a : α) → a ∈ tl → C (op b a)) → C (foldl op b tl)\n⊢ C (op b hd)\n[PROOFSTEP]\nexact hl b hb hd (mem_cons_self hd tl)\n[GOAL]\ncase cons.refine'_2\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : β → α → β\nb : β\nhb : C b\nhd : α\ntl : List α\nhl : (b : β) → C b → (a : α) → a ∈ hd :: tl → C (op b a)\nIH : (b : β) → C b → ((b : β) → C b → (a : α) → a ∈ tl → C (op b a)) → C (foldl op b tl)\n⊢ (b : β) → C b → (a : α) → a ∈ tl → C (op b a)\n[PROOFSTEP]\nintro y hy x hx\n[GOAL]\ncase cons.refine'_2\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nC : β → Sort u_2\nop : β → α → β\nb : β\nhb : C b\nhd : α\ntl : List α\nhl : (b : β) → C b → (a : α) → a ∈ hd :: tl → C (op b a)\nIH : (b : β) → C b → ((b : β) → C b → (a : α) → a ∈ tl → C (op b a)) → C (foldl op b tl)\ny : β\nhy : C y\nx : α\nhx : x ∈ tl\n⊢ C (op y x)\n[PROOFSTEP]\nexact hl y hy x (mem_cons_of_mem hd hx)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\na✝ : α\nl✝ : List α\na : β\nx : α\nl : List α\n⊢ length (scanl f a (x :: l)) = length (x :: l) + 1\n[PROOFSTEP]\nrw [scanl, length_cons, length_cons, ← succ_eq_add_one, congr_arg succ]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\na✝ : α\nl✝ : List α\na : β\nx : α\nl : List α\n⊢ length (scanl f (f a x) l) = length l + 1\n[PROOFSTEP]\nexact length_scanl _ _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\na : α\nl : List α\n⊢ scanl f b (a :: l) = [b] ++ scanl f (f b a) l\n[PROOFSTEP]\nsimp only [scanl, eq_self_iff_true, singleton_append, and_self_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\na : α\nl : List α\n⊢ get? (scanl f b l) 0 = some b\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\na : α\n⊢ get? (scanl f b []) 0 = some b\n[PROOFSTEP]\nsimp only [get?, scanl_nil]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\na head✝ : α\ntail✝ : List α\n⊢ get? (scanl f b (head✝ :: tail✝)) 0 = some b\n[PROOFSTEP]\nsimp only [get?, scanl_cons, singleton_append]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\na : α\nl : List α\nh : 0 < length (scanl f b l)\n⊢ get (scanl f b l) { val := 0, isLt := h } = b\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\na : α\nh : 0 < length (scanl f b [])\n⊢ get (scanl f b []) { val := 0, isLt := h } = b\n[PROOFSTEP]\nsimp only [get, scanl_nil]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\na head✝ : α\ntail✝ : List α\nh : 0 < length (scanl f b (head✝ :: tail✝))\n⊢ get (scanl f b (head✝ :: tail✝)) { val := 0, isLt := h } = b\n[PROOFSTEP]\nsimp only [get, scanl_cons, singleton_append]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\na : α\nl : List α\ni : ℕ\n⊢ get? (scanl f b l) (i + 1) = Option.bind (get? (scanl f b l) i) fun x => Option.map (fun y => f x y) (get? l i)\n[PROOFSTEP]\ninduction' l with hd tl hl generalizing b i\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb✝ : β\na : α\nl : List α\ni✝ : ℕ\nb : β\ni : ℕ\n⊢ get? (scanl f b []) (i + 1) = Option.bind (get? (scanl f b []) i) fun x => Option.map (fun y => f x y) (get? [] i)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb✝ : β\na : α\nl : List α\ni✝ : ℕ\nb : β\ni : ℕ\n⊢ (Option.bind (get? (scanl f b []) i) fun x => Option.map (fun y => f x y) (get? [] i)) = get? (scanl f b []) (i + 1)\n[PROOFSTEP]\nsimp only [Option.bind_eq_none', get?, forall₂_true_iff, not_false_iff, Option.map_none', scanl_nil,\n  Option.not_mem_none, forall_true_iff]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb✝ : β\na : α\nl : List α\ni✝ : ℕ\nhd : α\ntl : List α\nhl :\n  ∀ {b : β} {i : ℕ},\n    get? (scanl f b tl) (i + 1) = Option.bind (get? (scanl f b tl) i) fun x => Option.map (fun y => f x y) (get? tl i)\nb : β\ni : ℕ\n⊢ get? (scanl f b (hd :: tl)) (i + 1) =\n    Option.bind (get? (scanl f b (hd :: tl)) i) fun x => Option.map (fun y => f x y) (get? (hd :: tl) i)\n[PROOFSTEP]\nsimp only [scanl_cons, singleton_append]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb✝ : β\na : α\nl : List α\ni✝ : ℕ\nhd : α\ntl : List α\nhl :\n  ∀ {b : β} {i : ℕ},\n    get? (scanl f b tl) (i + 1) = Option.bind (get? (scanl f b tl) i) fun x => Option.map (fun y => f x y) (get? tl i)\nb : β\ni : ℕ\n⊢ get? (b :: scanl f (f b hd) tl) (i + 1) =\n    Option.bind (get? (b :: scanl f (f b hd) tl) i) fun x => Option.map (fun y => f x y) (get? (hd :: tl) i)\n[PROOFSTEP]\ncases i\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb✝ : β\na : α\nl : List α\ni : ℕ\nhd : α\ntl : List α\nhl :\n  ∀ {b : β} {i : ℕ},\n    get? (scanl f b tl) (i + 1) = Option.bind (get? (scanl f b tl) i) fun x => Option.map (fun y => f x y) (get? tl i)\nb : β\n⊢ get? (b :: scanl f (f b hd) tl) (zero + 1) =\n    Option.bind (get? (b :: scanl f (f b hd) tl) zero) fun x => Option.map (fun y => f x y) (get? (hd :: tl) zero)\n[PROOFSTEP]\nsimp only [Option.map_some', get?_zero_scanl, get?, Option.some_bind']\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb✝ : β\na : α\nl : List α\ni : ℕ\nhd : α\ntl : List α\nhl :\n  ∀ {b : β} {i : ℕ},\n    get? (scanl f b tl) (i + 1) = Option.bind (get? (scanl f b tl) i) fun x => Option.map (fun y => f x y) (get? tl i)\nb : β\nn✝ : ℕ\n⊢ get? (b :: scanl f (f b hd) tl) (succ n✝ + 1) =\n    Option.bind (get? (b :: scanl f (f b hd) tl) (succ n✝)) fun x =>\n      Option.map (fun y => f x y) (get? (hd :: tl) (succ n✝))\n[PROOFSTEP]\nsimp only [hl, get?]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\na : α\nl : List α\ni : ℕ\nh : i + 1 < length (scanl f b l)\n⊢ nthLe (scanl f b l) (i + 1) h =\n    f (nthLe (scanl f b l) i (_ : i < length (scanl f b l))) (nthLe l i (_ : i < length l))\n[PROOFSTEP]\ninduction i generalizing b l with\n| zero =>\n  cases l\n  · simp only [length, zero_add, scanl_nil] at h \n  · simp [scanl_cons, singleton_append, nthLe_zero_scanl, nthLe_cons]\n| succ i hi =>\n  cases l\n  · simp only [length, add_lt_iff_neg_right, scanl_nil] at h \n    exact absurd h (not_lt_of_lt Nat.succ_pos')\n  · simp_rw [scanl_cons]\n    rw [nthLe_append_right]\n    · simp only [length, zero_add 1, succ_add_sub_one, hi]; rfl\n    · simp only [length, Nat.zero_le, le_add_iff_nonneg_left]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\nb : β\na : α\nl : List α\ni : ℕ\nh : i + 1 < length (scanl f b l)\n⊢ nthLe (scanl f b l) (i + 1) h =\n    f (nthLe (scanl f b l) i (_ : i < length (scanl f b l))) (nthLe l i (_ : i < length l))\n[PROOFSTEP]\ninduction i generalizing b l with\n| zero =>\n  cases l\n  · simp only [length, zero_add, scanl_nil] at h \n  · simp [scanl_cons, singleton_append, nthLe_zero_scanl, nthLe_cons]\n| succ i hi =>\n  cases l\n  · simp only [length, add_lt_iff_neg_right, scanl_nil] at h \n    exact absurd h (not_lt_of_lt Nat.succ_pos')\n  · simp_rw [scanl_cons]\n    rw [nthLe_append_right]\n    · simp only [length, zero_add 1, succ_add_sub_one, hi]; rfl\n    · simp only [length, Nat.zero_le, le_add_iff_nonneg_left]\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\nb : β\nl : List α\nh : zero + 1 < length (scanl f b l)\n⊢ nthLe (scanl f b l) (zero + 1) h =\n    f (nthLe (scanl f b l) zero (_ : zero < length (scanl f b l))) (nthLe l zero (_ : zero < length l))\n[PROOFSTEP]\n\n| zero =>\n  cases l\n  · simp only [length, zero_add, scanl_nil] at h \n  · simp [scanl_cons, singleton_append, nthLe_zero_scanl, nthLe_cons]\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\nb : β\nl : List α\nh : zero + 1 < length (scanl f b l)\n⊢ nthLe (scanl f b l) (zero + 1) h =\n    f (nthLe (scanl f b l) zero (_ : zero < length (scanl f b l))) (nthLe l zero (_ : zero < length l))\n[PROOFSTEP]\ncases l\n[GOAL]\ncase zero.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\nb : β\nh : zero + 1 < length (scanl f b [])\n⊢ nthLe (scanl f b []) (zero + 1) h =\n    f (nthLe (scanl f b []) zero (_ : zero < length (scanl f b []))) (nthLe [] zero (_ : zero < length []))\n[PROOFSTEP]\nsimp only [length, zero_add, scanl_nil] at h \n[GOAL]\ncase zero.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\nb : β\nhead✝ : α\ntail✝ : List α\nh : zero + 1 < length (scanl f b (head✝ :: tail✝))\n⊢ nthLe (scanl f b (head✝ :: tail✝)) (zero + 1) h =\n    f (nthLe (scanl f b (head✝ :: tail✝)) zero (_ : zero < length (scanl f b (head✝ :: tail✝))))\n      (nthLe (head✝ :: tail✝) zero (_ : zero < length (head✝ :: tail✝)))\n[PROOFSTEP]\nsimp [scanl_cons, singleton_append, nthLe_zero_scanl, nthLe_cons]\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\ni : ℕ\nhi :\n  ∀ {b : β} {l : List α} {h : i + 1 < length (scanl f b l)},\n    nthLe (scanl f b l) (i + 1) h =\n      f (nthLe (scanl f b l) i (_ : i < length (scanl f b l))) (nthLe l i (_ : i < length l))\nb : β\nl : List α\nh : succ i + 1 < length (scanl f b l)\n⊢ nthLe (scanl f b l) (succ i + 1) h =\n    f (nthLe (scanl f b l) (succ i) (_ : succ i < length (scanl f b l))) (nthLe l (succ i) (_ : succ i < length l))\n[PROOFSTEP]\n\n| succ i hi =>\n  cases l\n  · simp only [length, add_lt_iff_neg_right, scanl_nil] at h \n    exact absurd h (not_lt_of_lt Nat.succ_pos')\n  · simp_rw [scanl_cons]\n    rw [nthLe_append_right]\n    · simp only [length, zero_add 1, succ_add_sub_one, hi]; rfl\n    · simp only [length, Nat.zero_le, le_add_iff_nonneg_left]\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\ni : ℕ\nhi :\n  ∀ {b : β} {l : List α} {h : i + 1 < length (scanl f b l)},\n    nthLe (scanl f b l) (i + 1) h =\n      f (nthLe (scanl f b l) i (_ : i < length (scanl f b l))) (nthLe l i (_ : i < length l))\nb : β\nl : List α\nh : succ i + 1 < length (scanl f b l)\n⊢ nthLe (scanl f b l) (succ i + 1) h =\n    f (nthLe (scanl f b l) (succ i) (_ : succ i < length (scanl f b l))) (nthLe l (succ i) (_ : succ i < length l))\n[PROOFSTEP]\ncases l\n[GOAL]\ncase succ.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\ni : ℕ\nhi :\n  ∀ {b : β} {l : List α} {h : i + 1 < length (scanl f b l)},\n    nthLe (scanl f b l) (i + 1) h =\n      f (nthLe (scanl f b l) i (_ : i < length (scanl f b l))) (nthLe l i (_ : i < length l))\nb : β\nh : succ i + 1 < length (scanl f b [])\n⊢ nthLe (scanl f b []) (succ i + 1) h =\n    f (nthLe (scanl f b []) (succ i) (_ : succ i < length (scanl f b []))) (nthLe [] (succ i) (_ : succ i < length []))\n[PROOFSTEP]\nsimp only [length, add_lt_iff_neg_right, scanl_nil] at h \n[GOAL]\ncase succ.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\ni : ℕ\nhi :\n  ∀ {b : β} {l : List α} {h : i + 1 < length (scanl f b l)},\n    nthLe (scanl f b l) (i + 1) h =\n      f (nthLe (scanl f b l) i (_ : i < length (scanl f b l))) (nthLe l i (_ : i < length l))\nb : β\nh✝ : succ i + 1 < length (scanl f b [])\nh : succ i < 0\n⊢ nthLe (scanl f b []) (succ i + 1) h✝ =\n    f (nthLe (scanl f b []) (succ i) (_ : succ i < length (scanl f b []))) (nthLe [] (succ i) (_ : succ i < length []))\n[PROOFSTEP]\nexact absurd h (not_lt_of_lt Nat.succ_pos')\n[GOAL]\ncase succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\ni : ℕ\nhi :\n  ∀ {b : β} {l : List α} {h : i + 1 < length (scanl f b l)},\n    nthLe (scanl f b l) (i + 1) h =\n      f (nthLe (scanl f b l) i (_ : i < length (scanl f b l))) (nthLe l i (_ : i < length l))\nb : β\nhead✝ : α\ntail✝ : List α\nh : succ i + 1 < length (scanl f b (head✝ :: tail✝))\n⊢ nthLe (scanl f b (head✝ :: tail✝)) (succ i + 1) h =\n    f (nthLe (scanl f b (head✝ :: tail✝)) (succ i) (_ : succ i < length (scanl f b (head✝ :: tail✝))))\n      (nthLe (head✝ :: tail✝) (succ i) (_ : succ i < length (head✝ :: tail✝)))\n[PROOFSTEP]\nsimp_rw [scanl_cons]\n[GOAL]\ncase succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\ni : ℕ\nhi :\n  ∀ {b : β} {l : List α} {h : i + 1 < length (scanl f b l)},\n    nthLe (scanl f b l) (i + 1) h =\n      f (nthLe (scanl f b l) i (_ : i < length (scanl f b l))) (nthLe l i (_ : i < length l))\nb : β\nhead✝ : α\ntail✝ : List α\nh : succ i + 1 < length (scanl f b (head✝ :: tail✝))\n⊢ nthLe ([b] ++ scanl f (f b head✝) tail✝) (succ i + 1) (_ : succ i + 1 < length ([b] ++ scanl f (f b head✝) tail✝)) =\n    f (nthLe ([b] ++ scanl f (f b head✝) tail✝) (succ i) (_ : succ i < length ([b] ++ scanl f (f b head✝) tail✝)))\n      (nthLe (head✝ :: tail✝) (succ i) (_ : succ i < length (head✝ :: tail✝)))\n[PROOFSTEP]\nrw [nthLe_append_right]\n[GOAL]\ncase succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\ni : ℕ\nhi :\n  ∀ {b : β} {l : List α} {h : i + 1 < length (scanl f b l)},\n    nthLe (scanl f b l) (i + 1) h =\n      f (nthLe (scanl f b l) i (_ : i < length (scanl f b l))) (nthLe l i (_ : i < length l))\nb : β\nhead✝ : α\ntail✝ : List α\nh : succ i + 1 < length (scanl f b (head✝ :: tail✝))\n⊢ nthLe (scanl f (f b head✝) tail✝) (succ i + 1 - length [b])\n      (_ : succ i + 1 - length [b] < length (scanl f (f b head✝) tail✝)) =\n    f (nthLe ([b] ++ scanl f (f b head✝) tail✝) (succ i) (_ : succ i < length ([b] ++ scanl f (f b head✝) tail✝)))\n      (nthLe (head✝ :: tail✝) (succ i) (_ : succ i < length (head✝ :: tail✝)))\n[PROOFSTEP]\nsimp only [length, zero_add 1, succ_add_sub_one, hi]\n[GOAL]\ncase succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\ni : ℕ\nhi :\n  ∀ {b : β} {l : List α} {h : i + 1 < length (scanl f b l)},\n    nthLe (scanl f b l) (i + 1) h =\n      f (nthLe (scanl f b l) i (_ : i < length (scanl f b l))) (nthLe l i (_ : i < length l))\nb : β\nhead✝ : α\ntail✝ : List α\nh : succ i + 1 < length (scanl f b (head✝ :: tail✝))\n⊢ f (nthLe (scanl f (f b head✝) tail✝) i (_ : i < length (scanl f (f b head✝) tail✝)))\n      (nthLe tail✝ i (_ : i < length tail✝)) =\n    f (nthLe ([b] ++ scanl f (f b head✝) tail✝) (succ i) (_ : succ i < length ([b] ++ scanl f (f b head✝) tail✝)))\n      (nthLe (head✝ :: tail✝) (succ i) (_ : succ i < length (head✝ :: tail✝)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.cons.h₁\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : β → α → β\na : α\ni : ℕ\nhi :\n  ∀ {b : β} {l : List α} {h : i + 1 < length (scanl f b l)},\n    nthLe (scanl f b l) (i + 1) h =\n      f (nthLe (scanl f b l) i (_ : i < length (scanl f b l))) (nthLe l i (_ : i < length l))\nb : β\nhead✝ : α\ntail✝ : List α\nh : succ i + 1 < length (scanl f b (head✝ :: tail✝))\n⊢ length [b] ≤ succ i + 1\n[PROOFSTEP]\nsimp only [length, Nat.zero_le, le_add_iff_nonneg_left]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → β\nb : β\na : α\nl : List α\n⊢ scanr f b (a :: l) = foldr f b (a :: l) :: scanr f b l\n[PROOFSTEP]\nsimp only [scanr, foldr, cons.injEq, and_true]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → β\nb : β\na : α\nl : List α\n⊢ f a (foldr (fun a x => (f a x.fst, x.fst :: x.snd)) (b, []) l).fst = f a (foldr f b l)\n[PROOFSTEP]\ninduction l generalizing a with\n| nil => rfl\n| cons hd tl ih => simp only [foldr, ih]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → β\nb : β\na : α\nl : List α\n⊢ f a (foldr (fun a x => (f a x.fst, x.fst :: x.snd)) (b, []) l).fst = f a (foldr f b l)\n[PROOFSTEP]\ninduction l generalizing a with\n| nil => rfl\n| cons hd tl ih => simp only [foldr, ih]\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → β\nb : β\na : α\n⊢ f a (foldr (fun a x => (f a x.fst, x.fst :: x.snd)) (b, []) []).fst = f a (foldr f b [])\n[PROOFSTEP]\n\n| nil => rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → β\nb : β\na : α\n⊢ f a (foldr (fun a x => (f a x.fst, x.fst :: x.snd)) (b, []) []).fst = f a (foldr f b [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → β\nb : β\nhd : α\ntl : List α\nih : ∀ (a : α), f a (foldr (fun a x => (f a x.fst, x.fst :: x.snd)) (b, []) tl).fst = f a (foldr f b tl)\na : α\n⊢ f a (foldr (fun a x => (f a x.fst, x.fst :: x.snd)) (b, []) (hd :: tl)).fst = f a (foldr f b (hd :: tl))\n[PROOFSTEP]\n\n| cons hd tl ih => simp only [foldr, ih]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → β\nb : β\nhd : α\ntl : List α\nih : ∀ (a : α), f a (foldr (fun a x => (f a x.fst, x.fst :: x.snd)) (b, []) tl).fst = f a (foldr f b tl)\na : α\n⊢ f a (foldr (fun a x => (f a x.fst, x.fst :: x.snd)) (b, []) (hd :: tl)).fst = f a (foldr f b (hd :: tl))\n[PROOFSTEP]\nsimp only [foldr, ih]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α → α\nhcomm : Commutative f\nhassoc : Associative f\na b c : α\nl : List α\n⊢ foldl f a (c :: l ++ [b]) = foldr f b (a :: c :: l)\n[PROOFSTEP]\nsimp only [cons_append, foldl_cons, foldr_cons, foldl1_eq_foldr1 _ _ l]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α → α\nhcomm : Commutative f\nhassoc : Associative f\na b c : α\nl : List α\n⊢ f (f a c) (foldr f b l) = f a (f c (foldr f b l))\n[PROOFSTEP]\nrw [hassoc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α → α\nhcomm : Commutative f\nhassoc : Associative f\na b c : α\nl : List α\n⊢ foldl f a (b :: c :: l) = f b (foldl f a (c :: l))\n[PROOFSTEP]\nsimp only [foldl_cons]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α → α\nhcomm : Commutative f\nhassoc : Associative f\na b c : α\nl : List α\n⊢ foldl f (f (f a b) c) l = f b (foldl f (f a c) l)\n[PROOFSTEP]\nrw [← foldl_eq_of_comm_of_assoc .., right_comm _ hcomm hassoc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α → α\nhcomm : Commutative f\nhassoc : Associative f\na b c : α\nl : List α\n⊢ foldl f (f (f a c) b) l = foldl f (f a c) (b :: l)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α → α\nhcomm : Commutative f\nhassoc : Associative f\na b : α\nl : List α\n⊢ foldl f a (b :: l) = foldr f a (b :: l)\n[PROOFSTEP]\nsimp only [foldr_cons, foldl_eq_of_comm_of_assoc hcomm hassoc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α → α\nhcomm : Commutative f\nhassoc : Associative f\na b : α\nl : List α\n⊢ f b (foldl f a l) = f b (foldr f a l)\n[PROOFSTEP]\nrw [foldl_eq_foldr a l]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → α\nhf : ∀ (a : α) (b c : β), f (f a b) c = f (f a c) b\na : α\nb c : β\nl : List β\n⊢ foldl f a (b :: c :: l) = f (foldl f a (c :: l)) b\n[PROOFSTEP]\nrw [foldl, foldl, foldl, ← foldl_eq_of_comm' .., foldl, hf]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → α\nhf : ∀ (a : α) (b c : β), f (f a b) c = f (f a c) b\na : α\nb : β\nl : List β\n⊢ foldl f a (b :: l) = foldr (flip f) a (b :: l)\n[PROOFSTEP]\nrw [foldl_eq_of_comm' hf, foldr, foldl_eq_foldr' ..]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → α\nhf : ∀ (a : α) (b c : β), f (f a b) c = f (f a c) b\na : α\nb : β\nl : List β\n⊢ f (foldr (flip f) a l) b = flip f b (foldr (flip f) a l)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → β\nhf : ∀ (a b : α) (c : β), f a (f b c) = f b (f a c)\na : β\nb c : α\nl : List α\n⊢ foldr f a (b :: c :: l) = foldr f (f b a) (c :: l)\n[PROOFSTEP]\nrw [foldr, foldr, foldr, hf, ← foldr_eq_of_comm' ..]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β → β\nhf : ∀ (a b : α) (c : β), f a (f b c) = f b (f a c)\na : β\nb c : α\nl : List α\n⊢ f c (f b (foldr f a l)) = f c (foldr f a (b :: l))\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nop : α → α → α\nha : IsAssociative α op\nhc : IsCommutative α op\na : α\nl : List α\na₁ a₂ : α\n⊢ ((a :: l) <*> op a₁ a₂) = l <*> op a₁ (op a₂ a)\n[PROOFSTEP]\nsimp only [foldl_cons, ha.assoc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nop : α → α → α\nha : IsAssociative α op\nhc : IsCommutative α op\na : α\nl : List α\na₁ a₂ : α\n⊢ (l <*> op a₁ (op a₂ a)) = op a₁ ((a :: l) <*> a₂)\n[PROOFSTEP]\nrw [foldl_assoc, foldl_cons]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nop : α → α → α\nha : IsAssociative α op\nhc : IsCommutative α op\na : α\nl : List α\na₁ a₂ : α\n⊢ op ((a :: l) <*> a₁) a₂ = op a₁ (foldr (fun x x_1 => op x x_1) a₂ (a :: l))\n[PROOFSTEP]\nsimp only [foldl_cons, foldr_cons, foldl_assoc, ha.assoc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nop : α → α → α\nha : IsAssociative α op\nhc : IsCommutative α op\na : α\nl : List α\na₁ a₂ : α\n⊢ op a₁ (op (l <*> a) a₂) = op a₁ (op a (foldr (fun x x_1 => op x x_1) a₂ l))\n[PROOFSTEP]\nrw [foldl_op_eq_op_foldr_assoc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nop : α → α → α\nha : IsAssociative α op\nhc : IsCommutative α op\nl : List α\na₁ a₂ : α\n⊢ ((a₁ :: l) <*> a₂) = op a₁ (l <*> a₂)\n[PROOFSTEP]\nrw [foldl_cons, hc.comm, foldl_assoc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : α → β → m β\nb : β\nl : List α\n⊢ foldrM f b l = foldr (fun a mb => mb >>= f a) (pure b) l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : α → β → m β\nb : β\n⊢ foldrM f b [] = foldr (fun a mb => mb >>= f a) (pure b) []\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : α → β → m β\nb : β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : foldrM f b tail✝ = foldr (fun a mb => mb >>= f a) (pure b) tail✝\n⊢ foldrM f b (head✝ :: tail✝) = foldr (fun a mb => mb >>= f a) (pure b) (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : β → α → m β\nb : β\nl : List α\n⊢ List.foldlM f b l =\n    foldl\n      (fun mb a => do\n        let b ← mb\n        f b a)\n      (pure b) l\n[PROOFSTEP]\nsuffices h : ∀ mb : m β, (mb >>= fun b => List.foldlM f b l) = foldl (fun mb a => mb >>= fun b => f b a) mb l\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : β → α → m β\nb : β\nl : List α\nh :\n  ∀ (mb : m β),\n    (do\n        let b ← mb\n        List.foldlM f b l) =\n      foldl\n        (fun mb a => do\n          let b ← mb\n          f b a)\n        mb l\n⊢ List.foldlM f b l =\n    foldl\n      (fun mb a => do\n        let b ← mb\n        f b a)\n      (pure b) l\n[PROOFSTEP]\nsimp [← h (pure b)]\n[GOAL]\ncase h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : β → α → m β\nb : β\nl : List α\n⊢ ∀ (mb : m β),\n    (do\n        let b ← mb\n        List.foldlM f b l) =\n      foldl\n        (fun mb a => do\n          let b ← mb\n          f b a)\n        mb l\n[PROOFSTEP]\ninduction l with\n| nil => intro; simp\n| cons _ _ l_ih => intro; simp only [List.foldlM, foldl, ← l_ih, functor_norm]\n[GOAL]\ncase h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : β → α → m β\nb : β\nl : List α\n⊢ ∀ (mb : m β),\n    (do\n        let b ← mb\n        List.foldlM f b l) =\n      foldl\n        (fun mb a => do\n          let b ← mb\n          f b a)\n        mb l\n[PROOFSTEP]\ninduction l with\n| nil => intro; simp\n| cons _ _ l_ih => intro; simp only [List.foldlM, foldl, ← l_ih, functor_norm]\n[GOAL]\ncase h.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : β → α → m β\nb : β\n⊢ ∀ (mb : m β),\n    (do\n        let b ← mb\n        List.foldlM f b []) =\n      foldl\n        (fun mb a => do\n          let b ← mb\n          f b a)\n        mb []\n[PROOFSTEP]\n\n| nil => intro; simp\n[GOAL]\ncase h.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : β → α → m β\nb : β\n⊢ ∀ (mb : m β),\n    (do\n        let b ← mb\n        List.foldlM f b []) =\n      foldl\n        (fun mb a => do\n          let b ← mb\n          f b a)\n        mb []\n[PROOFSTEP]\nintro\n[GOAL]\ncase h.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : β → α → m β\nb : β\nmb✝ : m β\n⊢ (do\n      let b ← mb✝\n      List.foldlM f b []) =\n    foldl\n      (fun mb a => do\n        let b ← mb\n        f b a)\n      mb✝ []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : β → α → m β\nb : β\nhead✝ : α\ntail✝ : List α\nl_ih :\n  ∀ (mb : m β),\n    (do\n        let b ← mb\n        List.foldlM f b tail✝) =\n      foldl\n        (fun mb a => do\n          let b ← mb\n          f b a)\n        mb tail✝\n⊢ ∀ (mb : m β),\n    (do\n        let b ← mb\n        List.foldlM f b (head✝ :: tail✝)) =\n      foldl\n        (fun mb a => do\n          let b ← mb\n          f b a)\n        mb (head✝ :: tail✝)\n[PROOFSTEP]\n\n| cons _ _ l_ih => intro; simp only [List.foldlM, foldl, ← l_ih, functor_norm]\n[GOAL]\ncase h.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : β → α → m β\nb : β\nhead✝ : α\ntail✝ : List α\nl_ih :\n  ∀ (mb : m β),\n    (do\n        let b ← mb\n        List.foldlM f b tail✝) =\n      foldl\n        (fun mb a => do\n          let b ← mb\n          f b a)\n        mb tail✝\n⊢ ∀ (mb : m β),\n    (do\n        let b ← mb\n        List.foldlM f b (head✝ :: tail✝)) =\n      foldl\n        (fun mb a => do\n          let b ← mb\n          f b a)\n        mb (head✝ :: tail✝)\n[PROOFSTEP]\nintro\n[GOAL]\ncase h.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : Type v → Type w\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nf : β → α → m β\nb : β\nhead✝ : α\ntail✝ : List α\nl_ih :\n  ∀ (mb : m β),\n    (do\n        let b ← mb\n        List.foldlM f b tail✝) =\n      foldl\n        (fun mb a => do\n          let b ← mb\n          f b a)\n        mb tail✝\nmb✝ : m β\n⊢ (do\n      let b ← mb✝\n      List.foldlM f b (head✝ :: tail✝)) =\n    foldl\n      (fun mb a => do\n        let b ← mb\n        f b a)\n      mb✝ (head✝ :: tail✝)\n[PROOFSTEP]\nsimp only [List.foldlM, foldl, ← l_ih, functor_norm]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn✝ : ℕ\nl✝ : List α\nn : ℕ\nl xs : List α\nacc : Array α\n⊢ splitAt.go l xs n acc = if n < length xs then (Array.toList acc ++ take n xs, drop n xs) else (l, [])\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn✝ : ℕ\nl✝ : List α\nn : ℕ\nl xs : List α\nacc : Array α\nh : n < length xs\n⊢ splitAt.go l xs n acc = (Array.toList acc ++ take n xs, drop n xs)\n[PROOFSTEP]\ninduction n generalizing xs acc with\n| zero =>\n  rw [splitAt.go, take, drop, append_nil]\n  · intros h₁; rw [h₁] at h ; contradiction\n  · intros; contradiction\n| succ _ ih =>\n  cases xs with\n  | nil => contradiction\n  | cons hd tl =>\n    rw [length, succ_eq_add_one] at h \n    rw [splitAt.go, take, drop, append_cons, Array.toList_eq, ← Array.push_data, ← Array.toList_eq]\n    exact ih _ _ <| lt_of_add_lt_add_right h\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn✝ : ℕ\nl✝ : List α\nn : ℕ\nl xs : List α\nacc : Array α\nh : n < length xs\n⊢ splitAt.go l xs n acc = (Array.toList acc ++ take n xs, drop n xs)\n[PROOFSTEP]\ninduction n generalizing xs acc with\n| zero =>\n  rw [splitAt.go, take, drop, append_nil]\n  · intros h₁; rw [h₁] at h ; contradiction\n  · intros; contradiction\n| succ _ ih =>\n  cases xs with\n  | nil => contradiction\n  | cons hd tl =>\n    rw [length, succ_eq_add_one] at h \n    rw [splitAt.go, take, drop, append_cons, Array.toList_eq, ← Array.push_data, ← Array.toList_eq]\n    exact ih _ _ <| lt_of_add_lt_add_right h\n[GOAL]\ncase pos.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l xs : List α\nacc : Array α\nh : zero < length xs\n⊢ splitAt.go l xs zero acc = (Array.toList acc ++ take zero xs, drop zero xs)\n[PROOFSTEP]\n\n| zero =>\n  rw [splitAt.go, take, drop, append_nil]\n  · intros h₁; rw [h₁] at h ; contradiction\n  · intros; contradiction\n[GOAL]\ncase pos.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l xs : List α\nacc : Array α\nh : zero < length xs\n⊢ splitAt.go l xs zero acc = (Array.toList acc ++ take zero xs, drop zero xs)\n[PROOFSTEP]\nrw [splitAt.go, take, drop, append_nil]\n[GOAL]\ncase pos.zero.x_4\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l xs : List α\nacc : Array α\nh : zero < length xs\n⊢ xs = [] → False\n[PROOFSTEP]\nintros h₁\n[GOAL]\ncase pos.zero.x_4\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l xs : List α\nacc : Array α\nh : zero < length xs\nh₁ : xs = []\n⊢ False\n[PROOFSTEP]\nrw [h₁] at h \n[GOAL]\ncase pos.zero.x_4\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l xs : List α\nacc : Array α\nh : zero < length []\nh₁ : xs = []\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase pos.zero.x_5\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l xs : List α\nacc : Array α\nh : zero < length xs\n⊢ ∀ (x : α) (xs_1 : List α) (n : ℕ), xs = x :: xs_1 → zero = succ n → False\n[PROOFSTEP]\nintros\n[GOAL]\ncase pos.zero.x_5\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l xs : List α\nacc : Array α\nh : zero < length xs\nx✝ : α\nxs_1✝ : List α\nn✝ : ℕ\nx_1✝ : xs = x✝ :: xs_1✝\nx_2✝ : zero = succ n✝\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase pos.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih :\n  ∀ (xs : List α) (acc : Array α),\n    n✝ < length xs → splitAt.go l xs n✝ acc = (Array.toList acc ++ take n✝ xs, drop n✝ xs)\nxs : List α\nacc : Array α\nh : succ n✝ < length xs\n⊢ splitAt.go l xs (succ n✝) acc = (Array.toList acc ++ take (succ n✝) xs, drop (succ n✝) xs)\n[PROOFSTEP]\n\n| succ _ ih =>\n  cases xs with\n  | nil => contradiction\n  | cons hd tl =>\n    rw [length, succ_eq_add_one] at h \n    rw [splitAt.go, take, drop, append_cons, Array.toList_eq, ← Array.push_data, ← Array.toList_eq]\n    exact ih _ _ <| lt_of_add_lt_add_right h\n[GOAL]\ncase pos.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih :\n  ∀ (xs : List α) (acc : Array α),\n    n✝ < length xs → splitAt.go l xs n✝ acc = (Array.toList acc ++ take n✝ xs, drop n✝ xs)\nxs : List α\nacc : Array α\nh : succ n✝ < length xs\n⊢ splitAt.go l xs (succ n✝) acc = (Array.toList acc ++ take (succ n✝) xs, drop (succ n✝) xs)\n[PROOFSTEP]\ncases xs with\n| nil => contradiction\n| cons hd tl =>\n  rw [length, succ_eq_add_one] at h \n  rw [splitAt.go, take, drop, append_cons, Array.toList_eq, ← Array.push_data, ← Array.toList_eq]\n  exact ih _ _ <| lt_of_add_lt_add_right h\n[GOAL]\ncase pos.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih :\n  ∀ (xs : List α) (acc : Array α),\n    n✝ < length xs → splitAt.go l xs n✝ acc = (Array.toList acc ++ take n✝ xs, drop n✝ xs)\nxs : List α\nacc : Array α\nh : succ n✝ < length xs\n⊢ splitAt.go l xs (succ n✝) acc = (Array.toList acc ++ take (succ n✝) xs, drop (succ n✝) xs)\n[PROOFSTEP]\ncases xs with\n| nil => contradiction\n| cons hd tl =>\n  rw [length, succ_eq_add_one] at h \n  rw [splitAt.go, take, drop, append_cons, Array.toList_eq, ← Array.push_data, ← Array.toList_eq]\n  exact ih _ _ <| lt_of_add_lt_add_right h\n[GOAL]\ncase pos.succ.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih :\n  ∀ (xs : List α) (acc : Array α),\n    n✝ < length xs → splitAt.go l xs n✝ acc = (Array.toList acc ++ take n✝ xs, drop n✝ xs)\nacc : Array α\nh : succ n✝ < length []\n⊢ splitAt.go l [] (succ n✝) acc = (Array.toList acc ++ take (succ n✝) [], drop (succ n✝) [])\n[PROOFSTEP]\n\n| nil => contradiction\n[GOAL]\ncase pos.succ.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih :\n  ∀ (xs : List α) (acc : Array α),\n    n✝ < length xs → splitAt.go l xs n✝ acc = (Array.toList acc ++ take n✝ xs, drop n✝ xs)\nacc : Array α\nh : succ n✝ < length []\n⊢ splitAt.go l [] (succ n✝) acc = (Array.toList acc ++ take (succ n✝) [], drop (succ n✝) [])\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase pos.succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih :\n  ∀ (xs : List α) (acc : Array α),\n    n✝ < length xs → splitAt.go l xs n✝ acc = (Array.toList acc ++ take n✝ xs, drop n✝ xs)\nacc : Array α\nhd : α\ntl : List α\nh : succ n✝ < length (hd :: tl)\n⊢ splitAt.go l (hd :: tl) (succ n✝) acc = (Array.toList acc ++ take (succ n✝) (hd :: tl), drop (succ n✝) (hd :: tl))\n[PROOFSTEP]\n\n| cons hd tl =>\n  rw [length, succ_eq_add_one] at h \n  rw [splitAt.go, take, drop, append_cons, Array.toList_eq, ← Array.push_data, ← Array.toList_eq]\n  exact ih _ _ <| lt_of_add_lt_add_right h\n[GOAL]\ncase pos.succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih :\n  ∀ (xs : List α) (acc : Array α),\n    n✝ < length xs → splitAt.go l xs n✝ acc = (Array.toList acc ++ take n✝ xs, drop n✝ xs)\nacc : Array α\nhd : α\ntl : List α\nh : succ n✝ < length (hd :: tl)\n⊢ splitAt.go l (hd :: tl) (succ n✝) acc = (Array.toList acc ++ take (succ n✝) (hd :: tl), drop (succ n✝) (hd :: tl))\n[PROOFSTEP]\nrw [length, succ_eq_add_one] at h \n[GOAL]\ncase pos.succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih :\n  ∀ (xs : List α) (acc : Array α),\n    n✝ < length xs → splitAt.go l xs n✝ acc = (Array.toList acc ++ take n✝ xs, drop n✝ xs)\nacc : Array α\nhd : α\ntl : List α\nh : n✝ + 1 < length tl + 1\n⊢ splitAt.go l (hd :: tl) (succ n✝) acc = (Array.toList acc ++ take (succ n✝) (hd :: tl), drop (succ n✝) (hd :: tl))\n[PROOFSTEP]\nrw [splitAt.go, take, drop, append_cons, Array.toList_eq, ← Array.push_data, ← Array.toList_eq]\n[GOAL]\ncase pos.succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih :\n  ∀ (xs : List α) (acc : Array α),\n    n✝ < length xs → splitAt.go l xs n✝ acc = (Array.toList acc ++ take n✝ xs, drop n✝ xs)\nacc : Array α\nhd : α\ntl : List α\nh : n✝ + 1 < length tl + 1\n⊢ splitAt.go l tl n✝ (Array.push acc hd) = (Array.toList (Array.push acc hd) ++ take n✝ tl, drop n✝ tl)\n[PROOFSTEP]\nexact ih _ _ <| lt_of_add_lt_add_right h\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn✝ : ℕ\nl✝ : List α\nn : ℕ\nl xs : List α\nacc : Array α\nh : ¬n < length xs\n⊢ splitAt.go l xs n acc = (l, [])\n[PROOFSTEP]\ninduction n generalizing xs acc with\n| zero =>\n  rw [zero_eq, not_lt, nonpos_iff_eq_zero] at h \n  rw [eq_nil_of_length_eq_zero h, splitAt.go]\n| succ _ ih =>\n  cases xs with\n  | nil => rw [splitAt.go]\n  | cons hd tl =>\n    rw [length, succ_eq_add_one] at h \n    rw [splitAt.go]\n    exact ih _ _ <| not_imp_not.mpr (Nat.add_lt_add_right · 1) h\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn✝ : ℕ\nl✝ : List α\nn : ℕ\nl xs : List α\nacc : Array α\nh : ¬n < length xs\n⊢ splitAt.go l xs n acc = (l, [])\n[PROOFSTEP]\ninduction n generalizing xs acc with\n| zero =>\n  rw [zero_eq, not_lt, nonpos_iff_eq_zero] at h \n  rw [eq_nil_of_length_eq_zero h, splitAt.go]\n| succ _ ih =>\n  cases xs with\n  | nil => rw [splitAt.go]\n  | cons hd tl =>\n    rw [length, succ_eq_add_one] at h \n    rw [splitAt.go]\n    exact ih _ _ <| not_imp_not.mpr (Nat.add_lt_add_right · 1) h\n[GOAL]\ncase neg.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l xs : List α\nacc : Array α\nh : ¬zero < length xs\n⊢ splitAt.go l xs zero acc = (l, [])\n[PROOFSTEP]\n\n| zero =>\n  rw [zero_eq, not_lt, nonpos_iff_eq_zero] at h \n  rw [eq_nil_of_length_eq_zero h, splitAt.go]\n[GOAL]\ncase neg.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l xs : List α\nacc : Array α\nh : ¬zero < length xs\n⊢ splitAt.go l xs zero acc = (l, [])\n[PROOFSTEP]\nrw [zero_eq, not_lt, nonpos_iff_eq_zero] at h \n[GOAL]\ncase neg.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l xs : List α\nacc : Array α\nh : length xs = 0\n⊢ splitAt.go l xs zero acc = (l, [])\n[PROOFSTEP]\nrw [eq_nil_of_length_eq_zero h, splitAt.go]\n[GOAL]\ncase neg.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih : ∀ (xs : List α) (acc : Array α), ¬n✝ < length xs → splitAt.go l xs n✝ acc = (l, [])\nxs : List α\nacc : Array α\nh : ¬succ n✝ < length xs\n⊢ splitAt.go l xs (succ n✝) acc = (l, [])\n[PROOFSTEP]\n\n| succ _ ih =>\n  cases xs with\n  | nil => rw [splitAt.go]\n  | cons hd tl =>\n    rw [length, succ_eq_add_one] at h \n    rw [splitAt.go]\n    exact ih _ _ <| not_imp_not.mpr (Nat.add_lt_add_right · 1) h\n[GOAL]\ncase neg.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih : ∀ (xs : List α) (acc : Array α), ¬n✝ < length xs → splitAt.go l xs n✝ acc = (l, [])\nxs : List α\nacc : Array α\nh : ¬succ n✝ < length xs\n⊢ splitAt.go l xs (succ n✝) acc = (l, [])\n[PROOFSTEP]\ncases xs with\n| nil => rw [splitAt.go]\n| cons hd tl =>\n  rw [length, succ_eq_add_one] at h \n  rw [splitAt.go]\n  exact ih _ _ <| not_imp_not.mpr (Nat.add_lt_add_right · 1) h\n[GOAL]\ncase neg.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih : ∀ (xs : List α) (acc : Array α), ¬n✝ < length xs → splitAt.go l xs n✝ acc = (l, [])\nxs : List α\nacc : Array α\nh : ¬succ n✝ < length xs\n⊢ splitAt.go l xs (succ n✝) acc = (l, [])\n[PROOFSTEP]\ncases xs with\n| nil => rw [splitAt.go]\n| cons hd tl =>\n  rw [length, succ_eq_add_one] at h \n  rw [splitAt.go]\n  exact ih _ _ <| not_imp_not.mpr (Nat.add_lt_add_right · 1) h\n[GOAL]\ncase neg.succ.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih : ∀ (xs : List α) (acc : Array α), ¬n✝ < length xs → splitAt.go l xs n✝ acc = (l, [])\nacc : Array α\nh : ¬succ n✝ < length []\n⊢ splitAt.go l [] (succ n✝) acc = (l, [])\n[PROOFSTEP]\n\n| nil => rw [splitAt.go]\n[GOAL]\ncase neg.succ.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih : ∀ (xs : List α) (acc : Array α), ¬n✝ < length xs → splitAt.go l xs n✝ acc = (l, [])\nacc : Array α\nh : ¬succ n✝ < length []\n⊢ splitAt.go l [] (succ n✝) acc = (l, [])\n[PROOFSTEP]\nrw [splitAt.go]\n[GOAL]\ncase neg.succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih : ∀ (xs : List α) (acc : Array α), ¬n✝ < length xs → splitAt.go l xs n✝ acc = (l, [])\nacc : Array α\nhd : α\ntl : List α\nh : ¬succ n✝ < length (hd :: tl)\n⊢ splitAt.go l (hd :: tl) (succ n✝) acc = (l, [])\n[PROOFSTEP]\n\n| cons hd tl =>\n  rw [length, succ_eq_add_one] at h \n  rw [splitAt.go]\n  exact ih _ _ <| not_imp_not.mpr (Nat.add_lt_add_right · 1) h\n[GOAL]\ncase neg.succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih : ∀ (xs : List α) (acc : Array α), ¬n✝ < length xs → splitAt.go l xs n✝ acc = (l, [])\nacc : Array α\nhd : α\ntl : List α\nh : ¬succ n✝ < length (hd :: tl)\n⊢ splitAt.go l (hd :: tl) (succ n✝) acc = (l, [])\n[PROOFSTEP]\nrw [length, succ_eq_add_one] at h \n[GOAL]\ncase neg.succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih : ∀ (xs : List α) (acc : Array α), ¬n✝ < length xs → splitAt.go l xs n✝ acc = (l, [])\nacc : Array α\nhd : α\ntl : List α\nh : ¬n✝ + 1 < length tl + 1\n⊢ splitAt.go l (hd :: tl) (succ n✝) acc = (l, [])\n[PROOFSTEP]\nrw [splitAt.go]\n[GOAL]\ncase neg.succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl✝ l : List α\nn✝ : ℕ\nih : ∀ (xs : List α) (acc : Array α), ¬n✝ < length xs → splitAt.go l xs n✝ acc = (l, [])\nacc : Array α\nhd : α\ntl : List α\nh : ¬n✝ + 1 < length tl + 1\n⊢ splitAt.go l tl n✝ (Array.push acc hd) = (l, [])\n[PROOFSTEP]\nexact ih _ _ <| not_imp_not.mpr (Nat.add_lt_add_right · 1) h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl : List α\n⊢ splitAt n l = (take n l, drop n l)\n[PROOFSTEP]\nby_cases h : n < l.length\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl : List α\nh : n < length l\n⊢ splitAt n l = (take n l, drop n l)\n[PROOFSTEP]\nrw [splitAt, go_eq_take_drop]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl : List α\nh : ¬n < length l\n⊢ splitAt n l = (take n l, drop n l)\n[PROOFSTEP]\nrw [splitAt, go_eq_take_drop]\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl : List α\nh : n < length l\n⊢ (if n < length l then (Array.toList #[] ++ take n l, drop n l) else (l, [])) = (take n l, drop n l)\n[PROOFSTEP]\nrw [if_pos h]\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl : List α\nh : n < length l\n⊢ (Array.toList #[] ++ take n l, drop n l) = (take n l, drop n l)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nn : ℕ\nl : List α\nh : ¬n < length l\n⊢ (if n < length l then (Array.toList #[] ++ take n l, drop n l) else (l, [])) = (take n l, drop n l)\n[PROOFSTEP]\nrw [if_neg h, take_all_of_le <| le_of_not_lt h, drop_eq_nil_of_le <| le_of_not_lt h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nxs acc : List α\n⊢ go p xs acc ≠ []\n[PROOFSTEP]\ninduction xs generalizing acc\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nacc : List α\n⊢ go p [] acc ≠ []\n[PROOFSTEP]\nsimp [go]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (acc : List α), go p tail✝ acc ≠ []\nacc : List α\n⊢ go p (head✝ :: tail✝) acc ≠ []\n[PROOFSTEP]\nsimp [go]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (acc : List α), go p tail✝ acc ≠ []\nacc : List α\n⊢ ¬(if p head✝ = true then reverse acc :: go p tail✝ [] else go p tail✝ (head✝ :: acc)) = []\n[PROOFSTEP]\nsplit\n[GOAL]\ncase cons.inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (acc : List α), go p tail✝ acc ≠ []\nacc : List α\nh✝ : p head✝ = true\n⊢ ¬False\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons.inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (acc : List α), go p tail✝ acc ≠ []\nacc : List α\nh✝ : ¬p head✝ = true\n⊢ ¬go p tail✝ (head✝ :: acc) = []\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nxs acc : List α\n⊢ go p xs acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p xs)\n[PROOFSTEP]\ninduction xs generalizing acc with\n| nil => simp only [go, modifyHead, splitOnP_nil, append_nil]\n| cons hd tl ih =>\n  simp only [splitOnP, go]; split\n  · simp only [modifyHead, reverse_nil, append_nil]\n  · rw [ih [hd], modifyHead_modifyHead, ih]\n    congr; funext x; simp only [reverse_cons, append_assoc]; rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nxs acc : List α\n⊢ go p xs acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p xs)\n[PROOFSTEP]\ninduction xs generalizing acc with\n| nil => simp only [go, modifyHead, splitOnP_nil, append_nil]\n| cons hd tl ih =>\n  simp only [splitOnP, go]; split\n  · simp only [modifyHead, reverse_nil, append_nil]\n  · rw [ih [hd], modifyHead_modifyHead, ih]\n    congr; funext x; simp only [reverse_cons, append_assoc]; rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nacc : List α\n⊢ go p [] acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p [])\n[PROOFSTEP]\n\n| nil => simp only [go, modifyHead, splitOnP_nil, append_nil]\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nacc : List α\n⊢ go p [] acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p [])\n[PROOFSTEP]\nsimp only [go, modifyHead, splitOnP_nil, append_nil]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : ∀ (acc : List α), go p tl acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p tl)\nacc : List α\n⊢ go p (hd :: tl) acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p (hd :: tl))\n[PROOFSTEP]\n\n| cons hd tl ih =>\n  simp only [splitOnP, go]; split\n  · simp only [modifyHead, reverse_nil, append_nil]\n  · rw [ih [hd], modifyHead_modifyHead, ih]\n    congr; funext x; simp only [reverse_cons, append_assoc]; rfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : ∀ (acc : List α), go p tl acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p tl)\nacc : List α\n⊢ go p (hd :: tl) acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p (hd :: tl))\n[PROOFSTEP]\nsimp only [splitOnP, go]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : ∀ (acc : List α), go p tl acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p tl)\nacc : List α\n⊢ (if p hd = true then reverse acc :: go p tl [] else go p tl (hd :: acc)) =\n    modifyHead (fun x => reverse acc ++ x) (if p hd = true then reverse [] :: go p tl [] else go p tl [hd])\n[PROOFSTEP]\nsplit\n[GOAL]\ncase cons.inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : ∀ (acc : List α), go p tl acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p tl)\nacc : List α\nh✝ : p hd = true\n⊢ reverse acc :: go p tl [] = modifyHead (fun x => reverse acc ++ x) (reverse [] :: go p tl [])\n[PROOFSTEP]\nsimp only [modifyHead, reverse_nil, append_nil]\n[GOAL]\ncase cons.inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : ∀ (acc : List α), go p tl acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p tl)\nacc : List α\nh✝ : ¬p hd = true\n⊢ go p tl (hd :: acc) = modifyHead (fun x => reverse acc ++ x) (go p tl [hd])\n[PROOFSTEP]\nrw [ih [hd], modifyHead_modifyHead, ih]\n[GOAL]\ncase cons.inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : ∀ (acc : List α), go p tl acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p tl)\nacc : List α\nh✝ : ¬p hd = true\n⊢ modifyHead (fun x => reverse (hd :: acc) ++ x) (splitOnP p tl) =\n    modifyHead ((fun x => reverse acc ++ x) ∘ fun x => reverse [hd] ++ x) (splitOnP p tl)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase cons.inr.e_f\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : ∀ (acc : List α), go p tl acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p tl)\nacc : List α\nh✝ : ¬p hd = true\n⊢ (fun x => reverse (hd :: acc) ++ x) = (fun x => reverse acc ++ x) ∘ fun x => reverse [hd] ++ x\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase cons.inr.e_f.h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : ∀ (acc : List α), go p tl acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p tl)\nacc : List α\nh✝ : ¬p hd = true\nx : List α\n⊢ reverse (hd :: acc) ++ x = ((fun x => reverse acc ++ x) ∘ fun x => reverse [hd] ++ x) x\n[PROOFSTEP]\nsimp only [reverse_cons, append_assoc]\n[GOAL]\ncase cons.inr.e_f.h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : ∀ (acc : List α), go p tl acc = modifyHead (fun x => reverse acc ++ x) (splitOnP p tl)\nacc : List α\nh✝ : ¬p hd = true\nx : List α\n⊢ reverse acc ++ ([hd] ++ x) = ((fun x => reverse acc ++ x) ∘ fun x => reverse [] ++ ([hd] ++ x)) x\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nx : α\nxs : List α\n⊢ splitOnP p (x :: xs) = if p x = true then [] :: splitOnP p xs else modifyHead (cons x) (splitOnP p xs)\n[PROOFSTEP]\nrw [splitOnP, splitOnP.go]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nx : α\nxs : List α\n⊢ (if p x = true then reverse [] :: splitOnP.go p xs [] else splitOnP.go p xs [x]) =\n    if p x = true then [] :: splitOnP p xs else modifyHead (cons x) (splitOnP p xs)\n[PROOFSTEP]\nsplit <;> [rfl; simp [splitOnP.go_acc]]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nx : α\nxs : List α\n⊢ (if p x = true then reverse [] :: splitOnP.go p xs [] else splitOnP.go p xs [x]) =\n    if p x = true then [] :: splitOnP p xs else modifyHead (cons x) (splitOnP p xs)\n[PROOFSTEP]\nsplit\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nx : α\nxs : List α\nh✝ : p x = true\n⊢ reverse [] :: splitOnP.go p xs [] = [] :: splitOnP p xs\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys : List α\nls : List (List α)\nf : List α → List α\nx : α\nxs : List α\nh✝ : ¬p x = true\n⊢ splitOnP.go p xs [x] = modifyHead (cons x) (splitOnP p xs)\n[PROOFSTEP]\nsimp [splitOnP.go_acc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys✝ : List α\nls : List (List α)\nf : List α → List α\nas : List α\nxs ys : List (List α)\na : α\nhxs : xs ≠ []\nhys : ys ≠ []\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (modifyHead (cons a) xs) ys) = a :: join (zipWith (fun x x_1 => x ++ x_1) xs ys)\n[PROOFSTEP]\ncases xs with\n| nil => contradiction\n| cons =>\n  cases ys with\n  | nil => contradiction\n  | cons => rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs✝ ys✝ : List α\nls : List (List α)\nf : List α → List α\nas : List α\nxs ys : List (List α)\na : α\nhxs : xs ≠ []\nhys : ys ≠ []\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (modifyHead (cons a) xs) ys) = a :: join (zipWith (fun x x_1 => x ++ x_1) xs ys)\n[PROOFSTEP]\ncases xs with\n| nil => contradiction\n| cons =>\n  cases ys with\n  | nil => contradiction\n  | cons => rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys✝ : List α\nls : List (List α)\nf : List α → List α\nas : List α\nys : List (List α)\na : α\nhys : ys ≠ []\nhxs : [] ≠ []\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (modifyHead (cons a) []) ys) = a :: join (zipWith (fun x x_1 => x ++ x_1) [] ys)\n[PROOFSTEP]\n\n| nil => contradiction\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys✝ : List α\nls : List (List α)\nf : List α → List α\nas : List α\nys : List (List α)\na : α\nhys : ys ≠ []\nhxs : [] ≠ []\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (modifyHead (cons a) []) ys) = a :: join (zipWith (fun x x_1 => x ++ x_1) [] ys)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys✝ : List α\nls : List (List α)\nf : List α → List α\nas : List α\nys : List (List α)\na : α\nhys : ys ≠ []\nhead✝ : List α\ntail✝ : List (List α)\nhxs : head✝ :: tail✝ ≠ []\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (modifyHead (cons a) (head✝ :: tail✝)) ys) =\n    a :: join (zipWith (fun x x_1 => x ++ x_1) (head✝ :: tail✝) ys)\n[PROOFSTEP]\n\n| cons =>\n  cases ys with\n  | nil => contradiction\n  | cons => rfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys✝ : List α\nls : List (List α)\nf : List α → List α\nas : List α\nys : List (List α)\na : α\nhys : ys ≠ []\nhead✝ : List α\ntail✝ : List (List α)\nhxs : head✝ :: tail✝ ≠ []\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (modifyHead (cons a) (head✝ :: tail✝)) ys) =\n    a :: join (zipWith (fun x x_1 => x ++ x_1) (head✝ :: tail✝) ys)\n[PROOFSTEP]\ncases ys with\n| nil => contradiction\n| cons => rfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys✝ : List α\nls : List (List α)\nf : List α → List α\nas : List α\nys : List (List α)\na : α\nhys : ys ≠ []\nhead✝ : List α\ntail✝ : List (List α)\nhxs : head✝ :: tail✝ ≠ []\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (modifyHead (cons a) (head✝ :: tail✝)) ys) =\n    a :: join (zipWith (fun x x_1 => x ++ x_1) (head✝ :: tail✝) ys)\n[PROOFSTEP]\ncases ys with\n| nil => contradiction\n| cons => rfl\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nas : List α\na : α\nhead✝ : List α\ntail✝ : List (List α)\nhxs : head✝ :: tail✝ ≠ []\nhys : [] ≠ []\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (modifyHead (cons a) (head✝ :: tail✝)) []) =\n    a :: join (zipWith (fun x x_1 => x ++ x_1) (head✝ :: tail✝) [])\n[PROOFSTEP]\n\n| nil => contradiction\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nas : List α\na : α\nhead✝ : List α\ntail✝ : List (List α)\nhxs : head✝ :: tail✝ ≠ []\nhys : [] ≠ []\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (modifyHead (cons a) (head✝ :: tail✝)) []) =\n    a :: join (zipWith (fun x x_1 => x ++ x_1) (head✝ :: tail✝) [])\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nas : List α\na : α\nhead✝¹ : List α\ntail✝¹ : List (List α)\nhxs : head✝¹ :: tail✝¹ ≠ []\nhead✝ : List α\ntail✝ : List (List α)\nhys : head✝ :: tail✝ ≠ []\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (modifyHead (cons a) (head✝¹ :: tail✝¹)) (head✝ :: tail✝)) =\n    a :: join (zipWith (fun x x_1 => x ++ x_1) (head✝¹ :: tail✝¹) (head✝ :: tail✝))\n[PROOFSTEP]\n\n| cons => rfl\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nas : List α\na : α\nhead✝¹ : List α\ntail✝¹ : List (List α)\nhxs : head✝¹ :: tail✝¹ ≠ []\nhead✝ : List α\ntail✝ : List (List α)\nhys : head✝ :: tail✝ ≠ []\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (modifyHead (cons a) (head✝¹ :: tail✝¹)) (head✝ :: tail✝)) =\n    a :: join (zipWith (fun x x_1 => x ++ x_1) (head✝¹ :: tail✝¹) (head✝ :: tail✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nas : List α\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p as) (map (fun x => [x]) (filter p as) ++ [[]])) = as\n[PROOFSTEP]\ninduction as with\n| nil => rfl\n| cons a as' ih =>\n  rw [splitOnP_cons, filter]\n  by_cases h : p a\n  · rw [if_pos h, h, map, cons_append, zipWith, nil_append, join, cons_append, cons_inj]\n    exact ih\n  · rw [if_neg h, eq_false_of_ne_true h,\n      join_zipWith (splitOnP_ne_nil _ _) (append_ne_nil_of_ne_nil_right _ [[]] (cons_ne_nil [] [])), cons_inj]\n    exact ih\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nas : List α\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p as) (map (fun x => [x]) (filter p as) ++ [[]])) = as\n[PROOFSTEP]\ninduction as with\n| nil => rfl\n| cons a as' ih =>\n  rw [splitOnP_cons, filter]\n  by_cases h : p a\n  · rw [if_pos h, h, map, cons_append, zipWith, nil_append, join, cons_append, cons_inj]\n    exact ih\n  · rw [if_neg h, eq_false_of_ne_true h,\n      join_zipWith (splitOnP_ne_nil _ _) (append_ne_nil_of_ne_nil_right _ [[]] (cons_ne_nil [] [])), cons_inj]\n    exact ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p []) (map (fun x => [x]) (filter p []) ++ [[]])) = []\n[PROOFSTEP]\n\n| nil => rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p []) (map (fun x => [x]) (filter p []) ++ [[]])) = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\na : α\nas' : List α\nih : join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p as') (map (fun x => [x]) (filter p as') ++ [[]])) = as'\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p (a :: as')) (map (fun x => [x]) (filter p (a :: as')) ++ [[]])) =\n    a :: as'\n[PROOFSTEP]\n\n| cons a as' ih =>\n  rw [splitOnP_cons, filter]\n  by_cases h : p a\n  · rw [if_pos h, h, map, cons_append, zipWith, nil_append, join, cons_append, cons_inj]\n    exact ih\n  · rw [if_neg h, eq_false_of_ne_true h,\n      join_zipWith (splitOnP_ne_nil _ _) (append_ne_nil_of_ne_nil_right _ [[]] (cons_ne_nil [] [])), cons_inj]\n    exact ih\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\na : α\nas' : List α\nih : join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p as') (map (fun x => [x]) (filter p as') ++ [[]])) = as'\n⊢ join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p (a :: as')) (map (fun x => [x]) (filter p (a :: as')) ++ [[]])) =\n    a :: as'\n[PROOFSTEP]\nrw [splitOnP_cons, filter]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\na : α\nas' : List α\nih : join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p as') (map (fun x => [x]) (filter p as') ++ [[]])) = as'\n⊢ join\n      (zipWith (fun x x_1 => x ++ x_1)\n        (if p a = true then [] :: splitOnP p as' else modifyHead (cons a) (splitOnP p as'))\n        (map (fun x => [x])\n            (match p a with\n            | true => a :: filter p as'\n            | false => filter p as') ++\n          [[]])) =\n    a :: as'\n[PROOFSTEP]\nby_cases h : p a\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\na : α\nas' : List α\nih : join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p as') (map (fun x => [x]) (filter p as') ++ [[]])) = as'\nh : p a = true\n⊢ join\n      (zipWith (fun x x_1 => x ++ x_1)\n        (if p a = true then [] :: splitOnP p as' else modifyHead (cons a) (splitOnP p as'))\n        (map (fun x => [x])\n            (match p a with\n            | true => a :: filter p as'\n            | false => filter p as') ++\n          [[]])) =\n    a :: as'\n[PROOFSTEP]\nrw [if_pos h, h, map, cons_append, zipWith, nil_append, join, cons_append, cons_inj]\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\na : α\nas' : List α\nih : join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p as') (map (fun x => [x]) (filter p as') ++ [[]])) = as'\nh : p a = true\n⊢ [] ++ join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p as') (map (fun x => [x]) (filter p as') ++ [[]])) = as'\n[PROOFSTEP]\nexact ih\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\na : α\nas' : List α\nih : join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p as') (map (fun x => [x]) (filter p as') ++ [[]])) = as'\nh : ¬p a = true\n⊢ join\n      (zipWith (fun x x_1 => x ++ x_1)\n        (if p a = true then [] :: splitOnP p as' else modifyHead (cons a) (splitOnP p as'))\n        (map (fun x => [x])\n            (match p a with\n            | true => a :: filter p as'\n            | false => filter p as') ++\n          [[]])) =\n    a :: as'\n[PROOFSTEP]\nrw [if_neg h, eq_false_of_ne_true h,\n  join_zipWith (splitOnP_ne_nil _ _) (append_ne_nil_of_ne_nil_right _ [[]] (cons_ne_nil [] [])), cons_inj]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\na : α\nas' : List α\nih : join (zipWith (fun x x_1 => x ++ x_1) (splitOnP p as') (map (fun x => [x]) (filter p as') ++ [[]])) = as'\nh : ¬p a = true\n⊢ join\n      (zipWith (fun x x_1 => x ++ x_1) (splitOnP p as')\n        (map (fun x => [x])\n            (match false with\n            | true => a :: filter p as'\n            | false => filter p as') ++\n          [[]])) =\n    as'\n[PROOFSTEP]\nexact ih\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nh : ∀ (x : α), x ∈ xs → ¬p x = true\n⊢ splitOnP p xs = [xs]\n[PROOFSTEP]\ninduction xs with\n| nil => rfl\n| cons hd tl ih =>\n  simp only [splitOnP_cons, h hd (mem_cons_self hd tl), if_neg]\n  rw [ih <| forall_mem_of_forall_mem_cons h]\n  rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nh : ∀ (x : α), x ∈ xs → ¬p x = true\n⊢ splitOnP p xs = [xs]\n[PROOFSTEP]\ninduction xs with\n| nil => rfl\n| cons hd tl ih =>\n  simp only [splitOnP_cons, h hd (mem_cons_self hd tl), if_neg]\n  rw [ih <| forall_mem_of_forall_mem_cons h]\n  rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nh : ∀ (x : α), x ∈ [] → ¬p x = true\n⊢ splitOnP p [] = [[]]\n[PROOFSTEP]\n\n| nil => rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nh : ∀ (x : α), x ∈ [] → ¬p x = true\n⊢ splitOnP p [] = [[]]\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : (∀ (x : α), x ∈ tl → ¬p x = true) → splitOnP p tl = [tl]\nh : ∀ (x : α), x ∈ hd :: tl → ¬p x = true\n⊢ splitOnP p (hd :: tl) = [hd :: tl]\n[PROOFSTEP]\n\n| cons hd tl ih =>\n  simp only [splitOnP_cons, h hd (mem_cons_self hd tl), if_neg]\n  rw [ih <| forall_mem_of_forall_mem_cons h]\n  rfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : (∀ (x : α), x ∈ tl → ¬p x = true) → splitOnP p tl = [tl]\nh : ∀ (x : α), x ∈ hd :: tl → ¬p x = true\n⊢ splitOnP p (hd :: tl) = [hd :: tl]\n[PROOFSTEP]\nsimp only [splitOnP_cons, h hd (mem_cons_self hd tl), if_neg]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : (∀ (x : α), x ∈ tl → ¬p x = true) → splitOnP p tl = [tl]\nh : ∀ (x : α), x ∈ hd :: tl → ¬p x = true\n⊢ modifyHead (cons hd) (splitOnP p tl) = [hd :: tl]\n[PROOFSTEP]\nrw [ih <| forall_mem_of_forall_mem_cons h]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nhd : α\ntl : List α\nih : (∀ (x : α), x ∈ tl → ¬p x = true) → splitOnP p tl = [tl]\nh : ∀ (x : α), x ∈ hd :: tl → ¬p x = true\n⊢ modifyHead (cons hd) [tl] = [hd :: tl]\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nh : ∀ (x : α), x ∈ xs → ¬p x = true\nsep : α\nhsep : p sep = true\nas : List α\n⊢ splitOnP p (xs ++ sep :: as) = xs :: splitOnP p as\n[PROOFSTEP]\ninduction xs with\n| nil => simp [hsep]\n| cons hd tl ih => simp [h hd _, ih <| forall_mem_of_forall_mem_cons h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nh : ∀ (x : α), x ∈ xs → ¬p x = true\nsep : α\nhsep : p sep = true\nas : List α\n⊢ splitOnP p (xs ++ sep :: as) = xs :: splitOnP p as\n[PROOFSTEP]\ninduction xs with\n| nil => simp [hsep]\n| cons hd tl ih => simp [h hd _, ih <| forall_mem_of_forall_mem_cons h]\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nsep : α\nhsep : p sep = true\nas : List α\nh : ∀ (x : α), x ∈ [] → ¬p x = true\n⊢ splitOnP p ([] ++ sep :: as) = [] :: splitOnP p as\n[PROOFSTEP]\n\n| nil => simp [hsep]\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nsep : α\nhsep : p sep = true\nas : List α\nh : ∀ (x : α), x ∈ [] → ¬p x = true\n⊢ splitOnP p ([] ++ sep :: as) = [] :: splitOnP p as\n[PROOFSTEP]\nsimp [hsep]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nsep : α\nhsep : p sep = true\nas : List α\nhd : α\ntl : List α\nih : (∀ (x : α), x ∈ tl → ¬p x = true) → splitOnP p (tl ++ sep :: as) = tl :: splitOnP p as\nh : ∀ (x : α), x ∈ hd :: tl → ¬p x = true\n⊢ splitOnP p (hd :: tl ++ sep :: as) = (hd :: tl) :: splitOnP p as\n[PROOFSTEP]\n\n| cons hd tl ih => simp [h hd _, ih <| forall_mem_of_forall_mem_cons h]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nsep : α\nhsep : p sep = true\nas : List α\nhd : α\ntl : List α\nih : (∀ (x : α), x ∈ tl → ¬p x = true) → splitOnP p (tl ++ sep :: as) = tl :: splitOnP p as\nh : ∀ (x : α), x ∈ hd :: tl → ¬p x = true\n⊢ splitOnP p (hd :: tl ++ sep :: as) = (hd :: tl) :: splitOnP p as\n[PROOFSTEP]\nsimp [h hd _, ih <| forall_mem_of_forall_mem_cons h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\n⊢ intercalate [x] (splitOn x xs) = xs\n[PROOFSTEP]\nsimp only [intercalate, splitOn]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\n⊢ join (intersperse [x] (splitOnP (fun x_1 => x_1 == x) xs)) = xs\n[PROOFSTEP]\ninduction' xs with hd tl ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\n⊢ join (intersperse [x] (splitOnP (fun x_1 => x_1 == x) [])) = []\n[PROOFSTEP]\nsimp [join]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nih : join (intersperse [x] (splitOnP (fun x_1 => x_1 == x) tl)) = tl\n⊢ join (intersperse [x] (splitOnP (fun x_1 => x_1 == x) (hd :: tl))) = hd :: tl\n[PROOFSTEP]\ncases' h' : splitOnP (· == x) tl with hd' tl'\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nih : join (intersperse [x] (splitOnP (fun x_1 => x_1 == x) tl)) = tl\nh' : splitOnP (fun x_1 => x_1 == x) tl = []\n⊢ join (intersperse [x] (splitOnP (fun x_1 => x_1 == x) (hd :: tl))) = hd :: tl\n[PROOFSTEP]\nexact (splitOnP_ne_nil _ tl h').elim\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nih : join (intersperse [x] (splitOnP (fun x_1 => x_1 == x) tl)) = tl\nhd' : List α\ntl' : List (List α)\nh' : splitOnP (fun x_1 => x_1 == x) tl = hd' :: tl'\n⊢ join (intersperse [x] (splitOnP (fun x_1 => x_1 == x) (hd :: tl))) = hd :: tl\n[PROOFSTEP]\nrw [h'] at ih \n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\nhd : α\ntl hd' : List α\ntl' : List (List α)\nih : join (intersperse [x] (hd' :: tl')) = tl\nh' : splitOnP (fun x_1 => x_1 == x) tl = hd' :: tl'\n⊢ join (intersperse [x] (splitOnP (fun x_1 => x_1 == x) (hd :: tl))) = hd :: tl\n[PROOFSTEP]\nrw [splitOnP_cons]\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\nhd : α\ntl hd' : List α\ntl' : List (List α)\nih : join (intersperse [x] (hd' :: tl')) = tl\nh' : splitOnP (fun x_1 => x_1 == x) tl = hd' :: tl'\n⊢ join\n      (intersperse [x]\n        (if (hd == x) = true then [] :: splitOnP (fun x_1 => x_1 == x) tl\n        else modifyHead (cons hd) (splitOnP (fun x_1 => x_1 == x) tl))) =\n    hd :: tl\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\nhd : α\ntl hd' : List α\ntl' : List (List α)\nih : join (intersperse [x] (hd' :: tl')) = tl\nh' : splitOnP (fun x_1 => x_1 == x) tl = hd' :: tl'\nh : (hd == x) = true\n⊢ join (intersperse [x] ([] :: splitOnP (fun x_1 => x_1 == x) tl)) = hd :: tl\n[PROOFSTEP]\nrw [beq_iff_eq] at h \n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\nhd : α\ntl hd' : List α\ntl' : List (List α)\nih : join (intersperse [x] (hd' :: tl')) = tl\nh' : splitOnP (fun x_1 => x_1 == x) tl = hd' :: tl'\nh : hd = x\n⊢ join (intersperse [x] ([] :: splitOnP (fun x_1 => x_1 == x) tl)) = hd :: tl\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nhd : α\ntl hd' : List α\ntl' : List (List α)\nih : join (intersperse [hd] (hd' :: tl')) = tl\nh' : splitOnP (fun x => x == hd) tl = hd' :: tl'\n⊢ join (intersperse [hd] ([] :: splitOnP (fun x => x == hd) tl)) = hd :: tl\n[PROOFSTEP]\nsimp [ih, join, h']\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\nhd : α\ntl hd' : List α\ntl' : List (List α)\nih : join (intersperse [x] (hd' :: tl')) = tl\nh' : splitOnP (fun x_1 => x_1 == x) tl = hd' :: tl'\nh : ¬(hd == x) = true\n⊢ join (intersperse [x] (modifyHead (cons hd) (splitOnP (fun x_1 => x_1 == x) tl))) = hd :: tl\n[PROOFSTEP]\ncases tl'\n[GOAL]\ncase neg.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\nhd : α\ntl hd' : List α\nh : ¬(hd == x) = true\nih : join (intersperse [x] [hd']) = tl\nh' : splitOnP (fun x_1 => x_1 == x) tl = [hd']\n⊢ join (intersperse [x] (modifyHead (cons hd) (splitOnP (fun x_1 => x_1 == x) tl))) = hd :: tl\n[PROOFSTEP]\nsimpa [join, h'] using ih\n[GOAL]\ncase neg.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\nx : α\ninst✝ : DecidableEq α\nhd : α\ntl hd' : List α\nh : ¬(hd == x) = true\nhead✝ : List α\ntail✝ : List (List α)\nih : join (intersperse [x] (hd' :: head✝ :: tail✝)) = tl\nh' : splitOnP (fun x_1 => x_1 == x) tl = hd' :: head✝ :: tail✝\n⊢ join (intersperse [x] (modifyHead (cons hd) (splitOnP (fun x_1 => x_1 == x) tl))) = hd :: tl\n[PROOFSTEP]\nsimpa [join, h'] using ih\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls : ls ≠ []\n⊢ splitOn x (intercalate [x] ls) = ls\n[PROOFSTEP]\nsimp only [intercalate]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls : ls ≠ []\n⊢ splitOn x (join (intersperse [x] ls)) = ls\n[PROOFSTEP]\ninduction' ls with hd tl ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhx : ∀ (l : List α), l ∈ [] → ¬x ∈ l\nhls : [] ≠ []\n⊢ splitOn x (join (intersperse [x] [])) = []\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd : List α\ntl : List (List α)\nih : (∀ (l : List α), l ∈ tl → ¬x ∈ l) → tl ≠ [] → splitOn x (join (intersperse [x] tl)) = tl\nhx : ∀ (l : List α), l ∈ hd :: tl → ¬x ∈ l\nhls : hd :: tl ≠ []\n⊢ splitOn x (join (intersperse [x] (hd :: tl))) = hd :: tl\n[PROOFSTEP]\ncases tl\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd : List α\nih : (∀ (l : List α), l ∈ [] → ¬x ∈ l) → [] ≠ [] → splitOn x (join (intersperse [x] [])) = []\nhx : ∀ (l : List α), l ∈ [hd] → ¬x ∈ l\nhls : [hd] ≠ []\n⊢ splitOn x (join (intersperse [x] [hd])) = [hd]\n[PROOFSTEP]\nsuffices hd.splitOn x = [hd] by simpa [join]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd : List α\nih : (∀ (l : List α), l ∈ [] → ¬x ∈ l) → [] ≠ [] → splitOn x (join (intersperse [x] [])) = []\nhx : ∀ (l : List α), l ∈ [hd] → ¬x ∈ l\nhls : [hd] ≠ []\nthis : splitOn x hd = [hd]\n⊢ splitOn x (join (intersperse [x] [hd])) = [hd]\n[PROOFSTEP]\nsimpa [join]\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd : List α\nih : (∀ (l : List α), l ∈ [] → ¬x ∈ l) → [] ≠ [] → splitOn x (join (intersperse [x] [])) = []\nhx : ∀ (l : List α), l ∈ [hd] → ¬x ∈ l\nhls : [hd] ≠ []\n⊢ splitOn x hd = [hd]\n[PROOFSTEP]\nrefine' splitOnP_eq_single _ _ _\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd : List α\nih : (∀ (l : List α), l ∈ [] → ¬x ∈ l) → [] ≠ [] → splitOn x (join (intersperse [x] [])) = []\nhx : ∀ (l : List α), l ∈ [hd] → ¬x ∈ l\nhls : [hd] ≠ []\n⊢ ∀ (x_1 : α), x_1 ∈ hd → ¬(x_1 == x) = true\n[PROOFSTEP]\nintro y hy H\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd : List α\nih : (∀ (l : List α), l ∈ [] → ¬x ∈ l) → [] ≠ [] → splitOn x (join (intersperse [x] [])) = []\nhx : ∀ (l : List α), l ∈ [hd] → ¬x ∈ l\nhls : [hd] ≠ []\ny : α\nhy : y ∈ hd\nH : (y == x) = true\n⊢ False\n[PROOFSTEP]\nrw [eq_of_beq H] at hy \n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd : List α\nih : (∀ (l : List α), l ∈ [] → ¬x ∈ l) → [] ≠ [] → splitOn x (join (intersperse [x] [])) = []\nhx : ∀ (l : List α), l ∈ [hd] → ¬x ∈ l\nhls : [hd] ≠ []\ny : α\nhy : x ∈ hd\nH : (y == x) = true\n⊢ False\n[PROOFSTEP]\nrefine' hx hd _ hy\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd : List α\nih : (∀ (l : List α), l ∈ [] → ¬x ∈ l) → [] ≠ [] → splitOn x (join (intersperse [x] [])) = []\nhx : ∀ (l : List α), l ∈ [hd] → ¬x ∈ l\nhls : [hd] ≠ []\ny : α\nhy : x ∈ hd\nH : (y == x) = true\n⊢ hd ∈ [hd]\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nih :\n  (∀ (l : List α), l ∈ head✝ :: tail✝ → ¬x ∈ l) →\n    head✝ :: tail✝ ≠ [] → splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\n⊢ splitOn x (join (intersperse [x] (hd :: head✝ :: tail✝))) = hd :: head✝ :: tail✝\n[PROOFSTEP]\nsimp only [intersperse_cons_cons, singleton_append, join]\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nih :\n  (∀ (l : List α), l ∈ head✝ :: tail✝ → ¬x ∈ l) →\n    head✝ :: tail✝ ≠ [] → splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\n⊢ splitOn x (hd ++ x :: join (intersperse [x] (head✝ :: tail✝))) = hd :: head✝ :: tail✝\n[PROOFSTEP]\nspecialize ih _ _\n[GOAL]\ncase cons.cons.specialize_1\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nih :\n  (∀ (l : List α), l ∈ head✝ :: tail✝ → ¬x ∈ l) →\n    head✝ :: tail✝ ≠ [] → splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\n⊢ ∀ (l : List α), l ∈ head✝ :: tail✝ → ¬x ∈ l\n[PROOFSTEP]\nintro l hl\n[GOAL]\ncase cons.cons.specialize_1\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nih :\n  (∀ (l : List α), l ∈ head✝ :: tail✝ → ¬x ∈ l) →\n    head✝ :: tail✝ ≠ [] → splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\nl : List α\nhl : l ∈ head✝ :: tail✝\n⊢ ¬x ∈ l\n[PROOFSTEP]\napply hx l\n[GOAL]\ncase cons.cons.specialize_1\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nih :\n  (∀ (l : List α), l ∈ head✝ :: tail✝ → ¬x ∈ l) →\n    head✝ :: tail✝ ≠ [] → splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\nl : List α\nhl : l ∈ head✝ :: tail✝\n⊢ l ∈ hd :: head✝ :: tail✝\n[PROOFSTEP]\nsimp at hl ⊢\n[GOAL]\ncase cons.cons.specialize_1\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nih :\n  (∀ (l : List α), l ∈ head✝ :: tail✝ → ¬x ∈ l) →\n    head✝ :: tail✝ ≠ [] → splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\nl : List α\nhl : l = head✝ ∨ l ∈ tail✝\n⊢ l = hd ∨ l = head✝ ∨ l ∈ tail✝\n[PROOFSTEP]\nexact Or.inr hl\n[GOAL]\ncase cons.cons.specialize_2\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nih :\n  (∀ (l : List α), l ∈ head✝ :: tail✝ → ¬x ∈ l) →\n    head✝ :: tail✝ ≠ [] → splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\n⊢ head✝ :: tail✝ ≠ []\n[PROOFSTEP]\nexact List.noConfusion\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\nih : splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\n⊢ splitOn x (hd ++ x :: join (intersperse [x] (head✝ :: tail✝))) = hd :: head✝ :: tail✝\n[PROOFSTEP]\nhave := splitOnP_first (· == x) hd ?h x (beq_self_eq_true _)\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\nih : splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\nthis : ∀ (as : List α), splitOnP (fun x_1 => x_1 == x) (hd ++ x :: as) = hd :: splitOnP (fun x_1 => x_1 == x) as\n⊢ splitOn x (hd ++ x :: join (intersperse [x] (head✝ :: tail✝))) = hd :: head✝ :: tail✝\ncase h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\nih : splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\n⊢ ∀ (x_1 : α), x_1 ∈ hd → ¬(fun x_2 => x_2 == x) x_1 = true\n[PROOFSTEP]\ncase h =>\n  intro y hy H\n  rw [eq_of_beq H] at hy \n  exact hx hd (.head _) hy\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\nih : splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\n⊢ ∀ (x_1 : α), x_1 ∈ hd → ¬(fun x_2 => x_2 == x) x_1 = true\n[PROOFSTEP]\ncase h =>\n  intro y hy H\n  rw [eq_of_beq H] at hy \n  exact hx hd (.head _) hy\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\nih : splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\n⊢ ∀ (x_1 : α), x_1 ∈ hd → ¬(fun x_2 => x_2 == x) x_1 = true\n[PROOFSTEP]\nintro y hy H\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\nih : splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\ny : α\nhy : y ∈ hd\nH : (fun x_1 => x_1 == x) y = true\n⊢ False\n[PROOFSTEP]\nrw [eq_of_beq H] at hy \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\nih : splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\ny : α\nhy : x ∈ hd\nH : (fun x_1 => x_1 == x) y = true\n⊢ False\n[PROOFSTEP]\nexact hx hd (.head _) hy\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\nih : splitOn x (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\nthis : ∀ (as : List α), splitOnP (fun x_1 => x_1 == x) (hd ++ x :: as) = hd :: splitOnP (fun x_1 => x_1 == x) as\n⊢ splitOn x (hd ++ x :: join (intersperse [x] (head✝ :: tail✝))) = hd :: head✝ :: tail✝\n[PROOFSTEP]\nsimp only [splitOn] at ih ⊢\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nxs ys : List α\nls : List (List α)\nf : List α → List α\ninst✝ : DecidableEq α\nx : α\nhx✝ : ∀ (l : List α), l ∈ ls → ¬x ∈ l\nhls✝ : ls ≠ []\nhd head✝ : List α\ntail✝ : List (List α)\nhx : ∀ (l : List α), l ∈ hd :: head✝ :: tail✝ → ¬x ∈ l\nhls : hd :: head✝ :: tail✝ ≠ []\nih : splitOnP (fun x_1 => x_1 == x) (join (intersperse [x] (head✝ :: tail✝))) = head✝ :: tail✝\nthis : ∀ (as : List α), splitOnP (fun x_1 => x_1 == x) (hd ++ x :: as) = hd :: splitOnP (fun x_1 => x_1 == x) as\n⊢ splitOnP (fun x_1 => x_1 == x) (hd ++ x :: join (intersperse [x] (head✝ :: tail✝))) = hd :: head✝ :: tail✝\n[PROOFSTEP]\nrw [this, ih]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\ntl : List α\nr : Array α\n⊢ go f (tl ++ [a]) r = Array.toListAppend r (go f (tl ++ [a]) #[])\n[PROOFSTEP]\ncases tl with\n| nil => simp only [nil_append, modifyLast.go]; rfl\n| cons hd tl =>\n  simp only [cons_append]\n  rw [modifyLast.go, modifyLast.go]\n  case x_3 | x_3 => exact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n  rw [modifyLast.go_append_one _ _ tl _, modifyLast.go_append_one _ _ tl (Array.push #[] hd)]\n  simp only [Array.toListAppend_eq, Array.push_data, Array.data_toArray, nil_append, append_assoc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\ntl : List α\nr : Array α\n⊢ go f (tl ++ [a]) r = Array.toListAppend r (go f (tl ++ [a]) #[])\n[PROOFSTEP]\ncases tl with\n| nil => simp only [nil_append, modifyLast.go]; rfl\n| cons hd tl =>\n  simp only [cons_append]\n  rw [modifyLast.go, modifyLast.go]\n  case x_3 | x_3 => exact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n  rw [modifyLast.go_append_one _ _ tl _, modifyLast.go_append_one _ _ tl (Array.push #[] hd)]\n  simp only [Array.toListAppend_eq, Array.push_data, Array.data_toArray, nil_append, append_assoc]\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\n⊢ go f ([] ++ [a]) r = Array.toListAppend r (go f ([] ++ [a]) #[])\n[PROOFSTEP]\n\n| nil => simp only [nil_append, modifyLast.go]; rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\n⊢ go f ([] ++ [a]) r = Array.toListAppend r (go f ([] ++ [a]) #[])\n[PROOFSTEP]\nsimp only [nil_append, modifyLast.go]\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\n⊢ Array.toListAppend r [f a] = Array.toListAppend r (Array.toListAppend #[] [f a])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\nhd : α\ntl : List α\n⊢ go f (hd :: tl ++ [a]) r = Array.toListAppend r (go f (hd :: tl ++ [a]) #[])\n[PROOFSTEP]\n\n| cons hd tl =>\n  simp only [cons_append]\n  rw [modifyLast.go, modifyLast.go]\n  case x_3 | x_3 => exact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n  rw [modifyLast.go_append_one _ _ tl _, modifyLast.go_append_one _ _ tl (Array.push #[] hd)]\n  simp only [Array.toListAppend_eq, Array.push_data, Array.data_toArray, nil_append, append_assoc]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\nhd : α\ntl : List α\n⊢ go f (hd :: tl ++ [a]) r = Array.toListAppend r (go f (hd :: tl ++ [a]) #[])\n[PROOFSTEP]\nsimp only [cons_append]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\nhd : α\ntl : List α\n⊢ go f (hd :: (tl ++ [a])) r = Array.toListAppend r (go f (hd :: (tl ++ [a])) #[])\n[PROOFSTEP]\nrw [modifyLast.go, modifyLast.go]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\nhd : α\ntl : List α\n⊢ go f (tl ++ [a]) (Array.push r hd) = Array.toListAppend r (go f (tl ++ [a]) (Array.push #[] hd))\ncase cons.x_3\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\nhd : α\ntl : List α\n⊢ tl ++ [a] = [] → False\ncase cons.x_3\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\nhd : α\ntl : List α\n⊢ tl ++ [a] = [] → False\n[PROOFSTEP]\ncase x_3 | x_3 => exact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\nhd : α\ntl : List α\n⊢ tl ++ [a] = [] → False\n[PROOFSTEP]\ncase x_3 | x_3 => exact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\nhd : α\ntl : List α\n⊢ tl ++ [a] = [] → False\n[PROOFSTEP]\nexact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\nhd : α\ntl : List α\n⊢ tl ++ [a] = [] → False\n[PROOFSTEP]\ncase x_3 | x_3 => exact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\nhd : α\ntl : List α\n⊢ tl ++ [a] = [] → False\n[PROOFSTEP]\nexact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\nhd : α\ntl : List α\n⊢ go f (tl ++ [a]) (Array.push r hd) = Array.toListAppend r (go f (tl ++ [a]) (Array.push #[] hd))\n[PROOFSTEP]\nrw [modifyLast.go_append_one _ _ tl _, modifyLast.go_append_one _ _ tl (Array.push #[] hd)]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nr : Array α\nhd : α\ntl : List α\n⊢ Array.toListAppend (Array.push r hd) (go f (tl ++ [a]) #[]) =\n    Array.toListAppend r (Array.toListAppend (Array.push #[] hd) (go f (tl ++ [a]) #[]))\n[PROOFSTEP]\nsimp only [Array.toListAppend_eq, Array.push_data, Array.data_toArray, nil_append, append_assoc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nl : List α\n⊢ modifyLast f (l ++ [a]) = l ++ [f a]\n[PROOFSTEP]\ncases l with\n| nil => simp only [nil_append, modifyLast, modifyLast.go, Array.toListAppend_eq, Array.data_toArray]\n| cons _ tl =>\n  simp only [cons_append, modifyLast]\n  rw [modifyLast.go]\n  case x_3 => exact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n  rw [modifyLast.go_append_one, Array.toListAppend_eq, Array.push_data, Array.data_toArray, nil_append, cons_append,\n    nil_append, cons_inj]\n  exact modifyLast_append_one _ _ tl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\nl : List α\n⊢ modifyLast f (l ++ [a]) = l ++ [f a]\n[PROOFSTEP]\ncases l with\n| nil => simp only [nil_append, modifyLast, modifyLast.go, Array.toListAppend_eq, Array.data_toArray]\n| cons _ tl =>\n  simp only [cons_append, modifyLast]\n  rw [modifyLast.go]\n  case x_3 => exact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n  rw [modifyLast.go_append_one, Array.toListAppend_eq, Array.push_data, Array.data_toArray, nil_append, cons_append,\n    nil_append, cons_inj]\n  exact modifyLast_append_one _ _ tl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\n⊢ modifyLast f ([] ++ [a]) = [] ++ [f a]\n[PROOFSTEP]\n\n| nil => simp only [nil_append, modifyLast, modifyLast.go, Array.toListAppend_eq, Array.data_toArray]\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na : α\n⊢ modifyLast f ([] ++ [a]) = [] ++ [f a]\n[PROOFSTEP]\nsimp only [nil_append, modifyLast, modifyLast.go, Array.toListAppend_eq, Array.data_toArray]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na head✝ : α\ntl : List α\n⊢ modifyLast f (head✝ :: tl ++ [a]) = head✝ :: tl ++ [f a]\n[PROOFSTEP]\n\n| cons _ tl =>\n  simp only [cons_append, modifyLast]\n  rw [modifyLast.go]\n  case x_3 => exact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n  rw [modifyLast.go_append_one, Array.toListAppend_eq, Array.push_data, Array.data_toArray, nil_append, cons_append,\n    nil_append, cons_inj]\n  exact modifyLast_append_one _ _ tl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na head✝ : α\ntl : List α\n⊢ modifyLast f (head✝ :: tl ++ [a]) = head✝ :: tl ++ [f a]\n[PROOFSTEP]\nsimp only [cons_append, modifyLast]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na head✝ : α\ntl : List α\n⊢ modifyLast.go f (head✝ :: (tl ++ [a])) #[] = head✝ :: (tl ++ [f a])\n[PROOFSTEP]\nrw [modifyLast.go]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na head✝ : α\ntl : List α\n⊢ modifyLast.go f (tl ++ [a]) (Array.push #[] head✝) = head✝ :: (tl ++ [f a])\ncase cons.x_3\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na head✝ : α\ntl : List α\n⊢ tl ++ [a] = [] → False\n[PROOFSTEP]\ncase x_3 => exact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na head✝ : α\ntl : List α\n⊢ tl ++ [a] = [] → False\n[PROOFSTEP]\ncase x_3 => exact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na head✝ : α\ntl : List α\n⊢ tl ++ [a] = [] → False\n[PROOFSTEP]\nexact append_ne_nil_of_ne_nil_right tl [a] (cons_ne_nil a [])\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na head✝ : α\ntl : List α\n⊢ modifyLast.go f (tl ++ [a]) (Array.push #[] head✝) = head✝ :: (tl ++ [f a])\n[PROOFSTEP]\nrw [modifyLast.go_append_one, Array.toListAppend_eq, Array.push_data, Array.data_toArray, nil_append, cons_append,\n  nil_append, cons_inj]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → α\na head✝ : α\ntl : List α\n⊢ modifyLast.go f (tl ++ [a]) #[] = tl ++ [f a]\n[PROOFSTEP]\nexact modifyLast_append_one _ _ tl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\nf : α → α\nl₁ l₂ : List α\nx✝ : l₂ ≠ []\n⊢ modifyLast f (l₁ ++ l₂) = l₁ ++ modifyLast f l₂\n[PROOFSTEP]\ncases l₂ with\n| nil => contradiction\n| cons hd tl =>\n  cases tl with\n  | nil => exact modifyLast_append_one _ hd _\n  |\n    cons hd' tl' =>\n    rw [append_cons, ← nil_append (hd :: hd' :: tl'), append_cons [], nil_append,\n      modifyLast_append _ (l₁ ++ [hd]) (hd' :: tl') _, modifyLast_append _ [hd] (hd' :: tl') _, append_assoc]\n    all_goals {exact cons_ne_nil _ _\n    }\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\nf : α → α\nl₁ l₂ : List α\nx✝ : l₂ ≠ []\n⊢ modifyLast f (l₁ ++ l₂) = l₁ ++ modifyLast f l₂\n[PROOFSTEP]\ncases l₂ with\n| nil => contradiction\n| cons hd tl =>\n  cases tl with\n  | nil => exact modifyLast_append_one _ hd _\n  |\n    cons hd' tl' =>\n    rw [append_cons, ← nil_append (hd :: hd' :: tl'), append_cons [], nil_append,\n      modifyLast_append _ (l₁ ++ [hd]) (hd' :: tl') _, modifyLast_append _ [hd] (hd' :: tl') _, append_assoc]\n    all_goals {exact cons_ne_nil _ _\n    }\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nx✝ : [] ≠ []\n⊢ modifyLast f (l₁ ++ []) = l₁ ++ modifyLast f []\n[PROOFSTEP]\n\n| nil => contradiction\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nx✝ : [] ≠ []\n⊢ modifyLast f (l₁ ++ []) = l₁ ++ modifyLast f []\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd : α\ntl : List α\nx✝ : hd :: tl ≠ []\n⊢ modifyLast f (l₁ ++ hd :: tl) = l₁ ++ modifyLast f (hd :: tl)\n[PROOFSTEP]\n\n| cons hd tl =>\n  cases tl with\n  | nil => exact modifyLast_append_one _ hd _\n  |\n    cons hd' tl' =>\n    rw [append_cons, ← nil_append (hd :: hd' :: tl'), append_cons [], nil_append,\n      modifyLast_append _ (l₁ ++ [hd]) (hd' :: tl') _, modifyLast_append _ [hd] (hd' :: tl') _, append_assoc]\n    all_goals {exact cons_ne_nil _ _\n    }\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd : α\ntl : List α\nx✝ : hd :: tl ≠ []\n⊢ modifyLast f (l₁ ++ hd :: tl) = l₁ ++ modifyLast f (hd :: tl)\n[PROOFSTEP]\ncases tl with\n| nil => exact modifyLast_append_one _ hd _\n|\n  cons hd' tl' =>\n  rw [append_cons, ← nil_append (hd :: hd' :: tl'), append_cons [], nil_append,\n    modifyLast_append _ (l₁ ++ [hd]) (hd' :: tl') _, modifyLast_append _ [hd] (hd' :: tl') _, append_assoc]\n  all_goals {exact cons_ne_nil _ _\n  }\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd : α\ntl : List α\nx✝ : hd :: tl ≠ []\n⊢ modifyLast f (l₁ ++ hd :: tl) = l₁ ++ modifyLast f (hd :: tl)\n[PROOFSTEP]\ncases tl with\n| nil => exact modifyLast_append_one _ hd _\n|\n  cons hd' tl' =>\n  rw [append_cons, ← nil_append (hd :: hd' :: tl'), append_cons [], nil_append,\n    modifyLast_append _ (l₁ ++ [hd]) (hd' :: tl') _, modifyLast_append _ [hd] (hd' :: tl') _, append_assoc]\n  all_goals {exact cons_ne_nil _ _\n  }\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd : α\nx✝ : [hd] ≠ []\n⊢ modifyLast f (l₁ ++ [hd]) = l₁ ++ modifyLast f [hd]\n[PROOFSTEP]\n\n| nil => exact modifyLast_append_one _ hd _\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd : α\nx✝ : [hd] ≠ []\n⊢ modifyLast f (l₁ ++ [hd]) = l₁ ++ modifyLast f [hd]\n[PROOFSTEP]\nexact modifyLast_append_one _ hd _\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd hd' : α\ntl' : List α\nx✝ : hd :: hd' :: tl' ≠ []\n⊢ modifyLast f (l₁ ++ hd :: hd' :: tl') = l₁ ++ modifyLast f (hd :: hd' :: tl')\n[PROOFSTEP]\n\n|\n  cons hd' tl' =>\n  rw [append_cons, ← nil_append (hd :: hd' :: tl'), append_cons [], nil_append,\n    modifyLast_append _ (l₁ ++ [hd]) (hd' :: tl') _, modifyLast_append _ [hd] (hd' :: tl') _, append_assoc]\n  all_goals {exact cons_ne_nil _ _\n  }\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd hd' : α\ntl' : List α\nx✝ : hd :: hd' :: tl' ≠ []\n⊢ modifyLast f (l₁ ++ hd :: hd' :: tl') = l₁ ++ modifyLast f (hd :: hd' :: tl')\n[PROOFSTEP]\nrw [append_cons, ← nil_append (hd :: hd' :: tl'), append_cons [], nil_append,\n  modifyLast_append _ (l₁ ++ [hd]) (hd' :: tl') _, modifyLast_append _ [hd] (hd' :: tl') _, append_assoc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd hd' : α\ntl' : List α\nx✝ : hd :: hd' :: tl' ≠ []\n⊢ hd' :: tl' ≠ []\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd hd' : α\ntl' : List α\nx✝ : hd :: hd' :: tl' ≠ []\n⊢ hd' :: tl' ≠ []\n[PROOFSTEP]\nall_goals {exact cons_ne_nil _ _\n}\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd hd' : α\ntl' : List α\nx✝ : hd :: hd' :: tl' ≠ []\n⊢ hd' :: tl' ≠ []\n[PROOFSTEP]\n{exact cons_ne_nil _ _\n}\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd hd' : α\ntl' : List α\nx✝ : hd :: hd' :: tl' ≠ []\n⊢ hd' :: tl' ≠ []\n[PROOFSTEP]\nexact cons_ne_nil _ _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd hd' : α\ntl' : List α\nx✝ : hd :: hd' :: tl' ≠ []\n⊢ hd' :: tl' ≠ []\n[PROOFSTEP]\n{exact cons_ne_nil _ _\n}\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\nf : α → α\nl₁ : List α\nhd hd' : α\ntl' : List α\nx✝ : hd :: hd' :: tl' ≠ []\n⊢ hd' :: tl' ≠ []\n[PROOFSTEP]\nexact cons_ne_nil _ _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nl : List α\nhx : x ∈ l\n⊢ sizeOf x < sizeOf l\n[PROOFSTEP]\ninduction' l with h t ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nl : List α\nhx✝ : x ∈ l\nhx : x ∈ []\n⊢ sizeOf x < sizeOf []\n[PROOFSTEP]\ncases hx\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nl : List α\nhx✝ : x ∈ l\nh : α\nt : List α\nih : x ∈ t → sizeOf x < sizeOf t\nhx : x ∈ h :: t\n⊢ sizeOf x < sizeOf (h :: t)\n[PROOFSTEP]\ncases hx\n[GOAL]\ncase cons.head\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nl : List α\nhx : x ∈ l\nt : List α\nih : x ∈ t → sizeOf x < sizeOf t\n⊢ sizeOf x < sizeOf (x :: t)\n[PROOFSTEP]\nrw [cons.sizeOf_spec]\n[GOAL]\ncase cons.tail\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nl : List α\nhx : x ∈ l\nh : α\nt : List α\nih : x ∈ t → sizeOf x < sizeOf t\na✝ : Mem x t\n⊢ sizeOf x < sizeOf (h :: t)\n[PROOFSTEP]\nrw [cons.sizeOf_spec]\n[GOAL]\ncase cons.head\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nl : List α\nhx : x ∈ l\nt : List α\nih : x ∈ t → sizeOf x < sizeOf t\n⊢ sizeOf x < 1 + sizeOf x + sizeOf t\n[PROOFSTEP]\nexact lt_add_of_lt_of_nonneg (lt_one_add _) (Nat.zero_le _)\n[GOAL]\ncase cons.tail\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nl : List α\nhx : x ∈ l\nh : α\nt : List α\nih : x ∈ t → sizeOf x < sizeOf t\na✝ : Mem x t\n⊢ sizeOf x < 1 + sizeOf h + sizeOf t\n[PROOFSTEP]\nrefine lt_add_of_pos_of_le ?_ (le_of_lt (ih ‹_›))\n[GOAL]\ncase cons.tail\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nl : List α\nhx : x ∈ l\nh : α\nt : List α\nih : x ∈ t → sizeOf x < sizeOf t\na✝ : Mem x t\n⊢ 0 < 1 + sizeOf h\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\ncase cons.tail\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nl : List α\nhx : x ∈ l\nh : α\nt : List α\nih : x ∈ t → sizeOf x < sizeOf t\na✝ : Mem x t\n⊢ 0 < sizeOf h + 1\n[PROOFSTEP]\nexact succ_pos _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : α → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\n⊢ pmap (fun a x => f a) l H = map f l\n[PROOFSTEP]\ninduction l <;> [rfl; simp only [*, pmap, map]]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : α → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\n⊢ pmap (fun a x => f a) l H = map f l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : α → β\nH : ∀ (a : α), a ∈ [] → p a\n⊢ pmap (fun a x => f a) [] H = map f []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : α → β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (H : ∀ (a : α), a ∈ tail✝ → p a), pmap (fun a x => f a) tail✝ H = map f tail✝\nH : ∀ (a : α), a ∈ head✝ :: tail✝ → p a\n⊢ pmap (fun a x => f a) (head✝ :: tail✝) H = map f (head✝ :: tail✝)\n[PROOFSTEP]\nsimp only [*, pmap, map]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np q : α → Prop\nf : (a : α) → p a → β\ng : (a : α) → q a → β\nl : List α\nH₁ : ∀ (a : α), a ∈ l → p a\nH₂ : ∀ (a : α), a ∈ l → q a\nh : ∀ (a : α), a ∈ l → ∀ (h₁ : p a) (h₂ : q a), f a h₁ = g a h₂\n⊢ pmap f l H₁ = pmap g l H₂\n[PROOFSTEP]\ninduction' l with _ _ ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np q : α → Prop\nf : (a : α) → p a → β\ng : (a : α) → q a → β\nl : List α\nH₁✝ : ∀ (a : α), a ∈ l → p a\nH₂✝ : ∀ (a : α), a ∈ l → q a\nh✝ : ∀ (a : α), a ∈ l → ∀ (h₁ : p a) (h₂ : q a), f a h₁ = g a h₂\nH₁ : ∀ (a : α), a ∈ [] → p a\nH₂ : ∀ (a : α), a ∈ [] → q a\nh : ∀ (a : α), a ∈ [] → ∀ (h₁ : p a) (h₂ : q a), f a h₁ = g a h₂\n⊢ pmap f [] H₁ = pmap g [] H₂\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np q : α → Prop\nf : (a : α) → p a → β\ng : (a : α) → q a → β\nl : List α\nH₁✝ : ∀ (a : α), a ∈ l → p a\nH₂✝ : ∀ (a : α), a ∈ l → q a\nh✝ : ∀ (a : α), a ∈ l → ∀ (h₁ : p a) (h₂ : q a), f a h₁ = g a h₂\nhead✝ : α\ntail✝ : List α\nih :\n  ∀ {H₁ : ∀ (a : α), a ∈ tail✝ → p a} {H₂ : ∀ (a : α), a ∈ tail✝ → q a},\n    (∀ (a : α), a ∈ tail✝ → ∀ (h₁ : p a) (h₂ : q a), f a h₁ = g a h₂) → pmap f tail✝ H₁ = pmap g tail✝ H₂\nH₁ : ∀ (a : α), a ∈ head✝ :: tail✝ → p a\nH₂ : ∀ (a : α), a ∈ head✝ :: tail✝ → q a\nh : ∀ (a : α), a ∈ head✝ :: tail✝ → ∀ (h₁ : p a) (h₂ : q a), f a h₁ = g a h₂\n⊢ pmap f (head✝ :: tail✝) H₁ = pmap g (head✝ :: tail✝) H₂\n[PROOFSTEP]\nrw [pmap, pmap, h _ (mem_cons_self _ _), ih fun a ha => h a (mem_cons_of_mem _ ha)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\ng : β → γ\nf : (a : α) → p a → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\n⊢ map g (pmap f l H) = pmap (fun a h => g (f a h)) l H\n[PROOFSTEP]\ninduction l <;> [rfl; simp only [*, pmap, map]]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\ng : β → γ\nf : (a : α) → p a → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\n⊢ map g (pmap f l H) = pmap (fun a h => g (f a h)) l H\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\ng : β → γ\nf : (a : α) → p a → β\nH : ∀ (a : α), a ∈ [] → p a\n⊢ map g (pmap f [] H) = pmap (fun a h => g (f a h)) [] H\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\ng : β → γ\nf : (a : α) → p a → β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (H : ∀ (a : α), a ∈ tail✝ → p a), map g (pmap f tail✝ H) = pmap (fun a h => g (f a h)) tail✝ H\nH : ∀ (a : α), a ∈ head✝ :: tail✝ → p a\n⊢ map g (pmap f (head✝ :: tail✝) H) = pmap (fun a h => g (f a h)) (head✝ :: tail✝) H\n[PROOFSTEP]\nsimp only [*, pmap, map]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : β → Prop\ng : (b : β) → p b → γ\nf : α → β\nl : List α\nH : ∀ (a : β), a ∈ map f l → p a\n⊢ pmap g (map f l) H = pmap (fun a h => g (f a) h) l (_ : ∀ (a : α), a ∈ l → p (f a))\n[PROOFSTEP]\ninduction l <;> [rfl; simp only [*, pmap, map]]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : β → Prop\ng : (b : β) → p b → γ\nf : α → β\nl : List α\nH : ∀ (a : β), a ∈ map f l → p a\n⊢ pmap g (map f l) H = pmap (fun a h => g (f a) h) l (_ : ∀ (a : α), a ∈ l → p (f a))\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : β → Prop\ng : (b : β) → p b → γ\nf : α → β\nH : ∀ (a : β), a ∈ map f [] → p a\n⊢ pmap g (map f []) H = pmap (fun a h => g (f a) h) [] (_ : ∀ (a : α), a ∈ [] → p (f a))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : β → Prop\ng : (b : β) → p b → γ\nf : α → β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ :\n  ∀ (H : ∀ (a : β), a ∈ map f tail✝ → p a),\n    pmap g (map f tail✝) H = pmap (fun a h => g (f a) h) tail✝ (_ : ∀ (a : α), a ∈ tail✝ → p (f a))\nH : ∀ (a : β), a ∈ map f (head✝ :: tail✝) → p a\n⊢ pmap g (map f (head✝ :: tail✝)) H =\n    pmap (fun a h => g (f a) h) (head✝ :: tail✝) (_ : ∀ (a : α), a ∈ head✝ :: tail✝ → p (f a))\n[PROOFSTEP]\nsimp only [*, pmap, map]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\n⊢ pmap f l H = map (fun x => f ↑x (_ : p ↑x)) (attach l)\n[PROOFSTEP]\nrw [attach, map_pmap]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\n⊢ pmap f l H =\n    pmap (fun a h => f ↑{ val := a, property := h } (_ : p ↑{ val := a, property := h })) l\n      (_ : ∀ (x : α), x ∈ l → x ∈ l)\n[PROOFSTEP]\nexact pmap_congr l fun _ _ _ _ => rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nf : α → β\n⊢ map (fun i => f ↑i) (attach l) = map f l\n[PROOFSTEP]\nrw [attach, map_pmap]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nf : α → β\n⊢ pmap (fun a h => f ↑{ val := a, property := h }) l (_ : ∀ (x : α), x ∈ l → x ∈ l) = map f l\n[PROOFSTEP]\nexact pmap_eq_map _ _ _ _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\na : α\nh : a ∈ l\n⊢ { val := a, property := h } ∈ attach l\n[PROOFSTEP]\nhave := mem_map.1 (by rw [attach_map_val] <;> exact h)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\na : α\nh : a ∈ l\n⊢ ?m.323925 ∈ map ?m.323926 ?m.323927\n[PROOFSTEP]\nrw [attach_map_val]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\na : α\nh : a ∈ l\n⊢ ?m.323925 ∈ ?m.323939\n[PROOFSTEP]\nexact h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\na : α\nh : a ∈ l\nthis : ∃ a_1, a_1 ∈ attach l ∧ ↑a_1 = a\n⊢ { val := a, property := h } ∈ attach l\n[PROOFSTEP]\nrcases this with ⟨⟨_, _⟩, m, rfl⟩\n[GOAL]\ncase intro.mk.intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nval✝ : α\nproperty✝ : val✝ ∈ l\nm : { val := val✝, property := property✝ } ∈ attach l\nh : ↑{ val := val✝, property := property✝ } ∈ l\n⊢ { val := ↑{ val := val✝, property := property✝ }, property := h } ∈ attach l\n[PROOFSTEP]\nexact m\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\nb : β\n⊢ b ∈ pmap f l H ↔ ∃ a h, f a (_ : p a) = b\n[PROOFSTEP]\nsimp only [pmap_eq_map_attach, mem_map, mem_attach, true_and_iff, Subtype.exists, eq_comm]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\n⊢ length (pmap f l H) = length l\n[PROOFSTEP]\ninduction l <;> [rfl; simp only [*, pmap, length]]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\n⊢ length (pmap f l H) = length l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nH : ∀ (a : α), a ∈ [] → p a\n⊢ length (pmap f [] H) = length []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ {H : ∀ (a : α), a ∈ tail✝ → p a}, length (pmap f tail✝ H) = length tail✝\nH : ∀ (a : α), a ∈ head✝ :: tail✝ → p a\n⊢ length (pmap f (head✝ :: tail✝) H) = length (head✝ :: tail✝)\n[PROOFSTEP]\nsimp only [*, pmap, length]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nH : ∀ (a : α), a ∈ l → p a\n⊢ pmap f l H = [] ↔ l = []\n[PROOFSTEP]\nrw [← length_eq_zero, length_pmap, length_eq_zero]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nhl₁ : ∀ (a : α), a ∈ l → p a\nhl₂ : l ≠ []\n⊢ getLast (pmap f l hl₁) (_ : ¬pmap f l hl₁ = []) = f (getLast l hl₂) (_ : p (getLast l hl₂))\n[PROOFSTEP]\ninduction' l with l_hd l_tl l_ih\n[GOAL]\ncase nil\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nhl₁✝ : ∀ (a : α), a ∈ l → p a\nhl₂✝ : l ≠ []\nhl₁ : ∀ (a : α), a ∈ [] → p a\nhl₂ : [] ≠ []\n⊢ getLast (pmap f [] hl₁) (_ : ¬pmap f [] hl₁ = []) = f (getLast [] hl₂) (_ : p (getLast [] hl₂))\n[PROOFSTEP]\napply (hl₂ rfl).elim\n[GOAL]\ncase cons\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nhl₁✝ : ∀ (a : α), a ∈ l → p a\nhl₂✝ : l ≠ []\nl_hd : α\nl_tl : List α\nl_ih :\n  ∀ (hl₁ : ∀ (a : α), a ∈ l_tl → p a) (hl₂ : l_tl ≠ []),\n    getLast (pmap f l_tl hl₁) (_ : ¬pmap f l_tl hl₁ = []) = f (getLast l_tl hl₂) (_ : p (getLast l_tl hl₂))\nhl₁ : ∀ (a : α), a ∈ l_hd :: l_tl → p a\nhl₂ : l_hd :: l_tl ≠ []\n⊢ getLast (pmap f (l_hd :: l_tl) hl₁) (_ : ¬pmap f (l_hd :: l_tl) hl₁ = []) =\n    f (getLast (l_hd :: l_tl) hl₂) (_ : p (getLast (l_hd :: l_tl) hl₂))\n[PROOFSTEP]\nby_cases hl_tl : l_tl = []\n[GOAL]\ncase pos\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nhl₁✝ : ∀ (a : α), a ∈ l → p a\nhl₂✝ : l ≠ []\nl_hd : α\nl_tl : List α\nl_ih :\n  ∀ (hl₁ : ∀ (a : α), a ∈ l_tl → p a) (hl₂ : l_tl ≠ []),\n    getLast (pmap f l_tl hl₁) (_ : ¬pmap f l_tl hl₁ = []) = f (getLast l_tl hl₂) (_ : p (getLast l_tl hl₂))\nhl₁ : ∀ (a : α), a ∈ l_hd :: l_tl → p a\nhl₂ : l_hd :: l_tl ≠ []\nhl_tl : l_tl = []\n⊢ getLast (pmap f (l_hd :: l_tl) hl₁) (_ : ¬pmap f (l_hd :: l_tl) hl₁ = []) =\n    f (getLast (l_hd :: l_tl) hl₂) (_ : p (getLast (l_hd :: l_tl) hl₂))\n[PROOFSTEP]\nsimp [hl_tl]\n[GOAL]\ncase neg\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nhl₁✝ : ∀ (a : α), a ∈ l → p a\nhl₂✝ : l ≠ []\nl_hd : α\nl_tl : List α\nl_ih :\n  ∀ (hl₁ : ∀ (a : α), a ∈ l_tl → p a) (hl₂ : l_tl ≠ []),\n    getLast (pmap f l_tl hl₁) (_ : ¬pmap f l_tl hl₁ = []) = f (getLast l_tl hl₂) (_ : p (getLast l_tl hl₂))\nhl₁ : ∀ (a : α), a ∈ l_hd :: l_tl → p a\nhl₂ : l_hd :: l_tl ≠ []\nhl_tl : ¬l_tl = []\n⊢ getLast (pmap f (l_hd :: l_tl) hl₁) (_ : ¬pmap f (l_hd :: l_tl) hl₁ = []) =\n    f (getLast (l_hd :: l_tl) hl₂) (_ : p (getLast (l_hd :: l_tl) hl₂))\n[PROOFSTEP]\nsimp only [pmap]\n[GOAL]\ncase neg\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nhl₁✝ : ∀ (a : α), a ∈ l → p a\nhl₂✝ : l ≠ []\nl_hd : α\nl_tl : List α\nl_ih :\n  ∀ (hl₁ : ∀ (a : α), a ∈ l_tl → p a) (hl₂ : l_tl ≠ []),\n    getLast (pmap f l_tl hl₁) (_ : ¬pmap f l_tl hl₁ = []) = f (getLast l_tl hl₂) (_ : p (getLast l_tl hl₂))\nhl₁ : ∀ (a : α), a ∈ l_hd :: l_tl → p a\nhl₂ : l_hd :: l_tl ≠ []\nhl_tl : ¬l_tl = []\n⊢ getLast (f l_hd (_ : p l_hd) :: pmap f l_tl (_ : ∀ (x : α), x ∈ l_tl → p x))\n      (_ : f l_hd (_ : p l_hd) :: pmap f l_tl (_ : ∀ (x : α), x ∈ l_tl → p x) ≠ []) =\n    f (getLast (l_hd :: l_tl) hl₂) (_ : p (getLast (l_hd :: l_tl) hl₂))\n[PROOFSTEP]\nrw [getLast_cons, l_ih _ hl_tl]\n[GOAL]\ncase neg\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α✝\nα : Type u_2\nβ : Type u_3\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nhl₁✝ : ∀ (a : α), a ∈ l → p a\nhl₂✝ : l ≠ []\nl_hd : α\nl_tl : List α\nl_ih :\n  ∀ (hl₁ : ∀ (a : α), a ∈ l_tl → p a) (hl₂ : l_tl ≠ []),\n    getLast (pmap f l_tl hl₁) (_ : ¬pmap f l_tl hl₁ = []) = f (getLast l_tl hl₂) (_ : p (getLast l_tl hl₂))\nhl₁ : ∀ (a : α), a ∈ l_hd :: l_tl → p a\nhl₂ : l_hd :: l_tl ≠ []\nhl_tl : ¬l_tl = []\n⊢ f (getLast l_tl hl_tl) (_ : p (getLast l_tl hl_tl)) =\n    f (getLast (l_hd :: l_tl) hl₂) (_ : p (getLast (l_hd :: l_tl) hl₂))\n[PROOFSTEP]\nsimp only [getLast_cons hl_tl]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nh : ∀ (a : α), a ∈ l → p a\nn : ℕ\n⊢ get? (pmap f l h) n = Option.pmap f (get? l n) (_ : ∀ (x : α), x ∈ get? l n → p x)\n[PROOFSTEP]\ninduction' l with hd tl hl generalizing n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nh✝ : ∀ (a : α), a ∈ l → p a\nn✝ : ℕ\nh : ∀ (a : α), a ∈ [] → p a\nn : ℕ\n⊢ get? (pmap f [] h) n = Option.pmap f (get? [] n) (_ : ∀ (x : α), x ∈ get? [] n → p x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nh✝ : ∀ (a : α), a ∈ l → p a\nn✝ : ℕ\nhd : α\ntl : List α\nhl :\n  ∀ (h : ∀ (a : α), a ∈ tl → p a) (n : ℕ),\n    get? (pmap f tl h) n = Option.pmap f (get? tl n) (_ : ∀ (x : α), x ∈ get? tl n → p x)\nh : ∀ (a : α), a ∈ hd :: tl → p a\nn : ℕ\n⊢ get? (pmap f (hd :: tl) h) n = Option.pmap f (get? (hd :: tl) n) (_ : ∀ (x : α), x ∈ get? (hd :: tl) n → p x)\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nh✝ : ∀ (a : α), a ∈ l → p a\nn : ℕ\nhd : α\ntl : List α\nhl :\n  ∀ (h : ∀ (a : α), a ∈ tl → p a) (n : ℕ),\n    get? (pmap f tl h) n = Option.pmap f (get? tl n) (_ : ∀ (x : α), x ∈ get? tl n → p x)\nh : ∀ (a : α), a ∈ hd :: tl → p a\n⊢ get? (pmap f (hd :: tl) h) zero = Option.pmap f (get? (hd :: tl) zero) (_ : ∀ (x : α), x ∈ get? (hd :: tl) zero → p x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nh✝ : ∀ (a : α), a ∈ l → p a\nn✝ : ℕ\nhd : α\ntl : List α\nhl :\n  ∀ (h : ∀ (a : α), a ∈ tl → p a) (n : ℕ),\n    get? (pmap f tl h) n = Option.pmap f (get? tl n) (_ : ∀ (x : α), x ∈ get? tl n → p x)\nh : ∀ (a : α), a ∈ hd :: tl → p a\nn : ℕ\n⊢ get? (pmap f (hd :: tl) h) (succ n) =\n    Option.pmap f (get? (hd :: tl) (succ n)) (_ : ∀ (x : α), x ∈ get? (hd :: tl) (succ n) → p x)\n[PROOFSTEP]\nsimp [hl]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nh : ∀ (a : α), a ∈ l → p a\nn : ℕ\nhn : n < length (pmap f l h)\n⊢ get (pmap f l h) { val := n, isLt := hn } =\n    f (get l { val := n, isLt := (_ : n < length l) }) (_ : p (get l { val := n, isLt := (_ : n < length l) }))\n[PROOFSTEP]\ninduction' l with hd tl hl generalizing n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nh✝ : ∀ (a : α), a ∈ l → p a\nn✝ : ℕ\nhn✝ : n✝ < length (pmap f l h✝)\nh : ∀ (a : α), a ∈ [] → p a\nn : ℕ\nhn : n < length (pmap f [] h)\n⊢ get (pmap f [] h) { val := n, isLt := hn } =\n    f (get [] { val := n, isLt := (_ : n < length []) }) (_ : p (get [] { val := n, isLt := (_ : n < length []) }))\n[PROOFSTEP]\nsimp only [length, pmap] at hn \n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nh✝ : ∀ (a : α), a ∈ l → p a\nn✝ : ℕ\nhn✝ : n✝ < length (pmap f l h✝)\nh : ∀ (a : α), a ∈ [] → p a\nn : ℕ\nhn : n < 0\n⊢ get (pmap f [] h) { val := n, isLt := hn } =\n    f (get [] { val := n, isLt := (_ : n < length []) }) (_ : p (get [] { val := n, isLt := (_ : n < length []) }))\n[PROOFSTEP]\nexact absurd hn (not_lt_of_le n.zero_le)\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nh✝ : ∀ (a : α), a ∈ l → p a\nn✝ : ℕ\nhn✝ : n✝ < length (pmap f l h✝)\nhd : α\ntl : List α\nhl :\n  ∀ (h : ∀ (a : α), a ∈ tl → p a) {n : ℕ} (hn : n < length (pmap f tl h)),\n    get (pmap f tl h) { val := n, isLt := hn } =\n      f (get tl { val := n, isLt := (_ : n < length tl) }) (_ : p (get tl { val := n, isLt := (_ : n < length tl) }))\nh : ∀ (a : α), a ∈ hd :: tl → p a\nn : ℕ\nhn : n < length (pmap f (hd :: tl) h)\n⊢ get (pmap f (hd :: tl) h) { val := n, isLt := hn } =\n    f (get (hd :: tl) { val := n, isLt := (_ : n < length (hd :: tl)) })\n      (_ : p (get (hd :: tl) { val := n, isLt := (_ : n < length (hd :: tl)) }))\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nh✝ : ∀ (a : α), a ∈ l → p a\nn : ℕ\nhn✝ : n < length (pmap f l h✝)\nhd : α\ntl : List α\nhl :\n  ∀ (h : ∀ (a : α), a ∈ tl → p a) {n : ℕ} (hn : n < length (pmap f tl h)),\n    get (pmap f tl h) { val := n, isLt := hn } =\n      f (get tl { val := n, isLt := (_ : n < length tl) }) (_ : p (get tl { val := n, isLt := (_ : n < length tl) }))\nh : ∀ (a : α), a ∈ hd :: tl → p a\nhn : zero < length (pmap f (hd :: tl) h)\n⊢ get (pmap f (hd :: tl) h) { val := zero, isLt := hn } =\n    f (get (hd :: tl) { val := zero, isLt := (_ : zero < length (hd :: tl)) })\n      (_ : p (get (hd :: tl) { val := zero, isLt := (_ : zero < length (hd :: tl)) }))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Prop\nf : (a : α) → p a → β\nl : List α\nh✝ : ∀ (a : α), a ∈ l → p a\nn : ℕ\nhn✝ : n < length (pmap f l h✝)\nhd : α\ntl : List α\nhl :\n  ∀ (h : ∀ (a : α), a ∈ tl → p a) {n : ℕ} (hn : n < length (pmap f tl h)),\n    get (pmap f tl h) { val := n, isLt := hn } =\n      f (get tl { val := n, isLt := (_ : n < length tl) }) (_ : p (get tl { val := n, isLt := (_ : n < length tl) }))\nh : ∀ (a : α), a ∈ hd :: tl → p a\nn✝ : ℕ\nhn : succ n✝ < length (pmap f (hd :: tl) h)\n⊢ get (pmap f (hd :: tl) h) { val := succ n✝, isLt := hn } =\n    f (get (hd :: tl) { val := succ n✝, isLt := (_ : succ n✝ < length (hd :: tl)) })\n      (_ : p (get (hd :: tl) { val := succ n✝, isLt := (_ : succ n✝ < length (hd :: tl)) }))\n[PROOFSTEP]\nsimp [hl]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\np : ι → Prop\nf : (a : ι) → p a → α\nl₁ l₂ : List ι\nh : ∀ (a : ι), a ∈ l₁ ++ l₂ → p a\n⊢ pmap f (l₁ ++ l₂) h = pmap f l₁ (_ : ∀ (a : ι), a ∈ l₁ → p a) ++ pmap f l₂ (_ : ∀ (a : ι), a ∈ l₂ → p a)\n[PROOFSTEP]\ninduction' l₁ with _ _ ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\np : ι → Prop\nf : (a : ι) → p a → α\nl₁ l₂ : List ι\nh✝ : ∀ (a : ι), a ∈ l₁ ++ l₂ → p a\nh : ∀ (a : ι), a ∈ [] ++ l₂ → p a\n⊢ pmap f ([] ++ l₂) h = pmap f [] (_ : ∀ (a : ι), a ∈ [] → p a) ++ pmap f l₂ (_ : ∀ (a : ι), a ∈ l₂ → p a)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\np : ι → Prop\nf : (a : ι) → p a → α\nl₁ l₂ : List ι\nh✝ : ∀ (a : ι), a ∈ l₁ ++ l₂ → p a\nhead✝ : ι\ntail✝ : List ι\nih :\n  ∀ (h : ∀ (a : ι), a ∈ tail✝ ++ l₂ → p a),\n    pmap f (tail✝ ++ l₂) h = pmap f tail✝ (_ : ∀ (a : ι), a ∈ tail✝ → p a) ++ pmap f l₂ (_ : ∀ (a : ι), a ∈ l₂ → p a)\nh : ∀ (a : ι), a ∈ head✝ :: tail✝ ++ l₂ → p a\n⊢ pmap f (head✝ :: tail✝ ++ l₂) h =\n    pmap f (head✝ :: tail✝) (_ : ∀ (a : ι), a ∈ head✝ :: tail✝ → p a) ++ pmap f l₂ (_ : ∀ (a : ι), a ∈ l₂ → p a)\n[PROOFSTEP]\ndsimp only [pmap, cons_append]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\np : ι → Prop\nf : (a : ι) → p a → α\nl₁ l₂ : List ι\nh✝ : ∀ (a : ι), a ∈ l₁ ++ l₂ → p a\nhead✝ : ι\ntail✝ : List ι\nih :\n  ∀ (h : ∀ (a : ι), a ∈ tail✝ ++ l₂ → p a),\n    pmap f (tail✝ ++ l₂) h = pmap f tail✝ (_ : ∀ (a : ι), a ∈ tail✝ → p a) ++ pmap f l₂ (_ : ∀ (a : ι), a ∈ l₂ → p a)\nh : ∀ (a : ι), a ∈ head✝ :: tail✝ ++ l₂ → p a\n⊢ f head✝ (_ : p head✝) :: pmap f (tail✝ ++ l₂) (_ : ∀ (x : ι), x ∈ tail✝ ++ l₂ → p x) =\n    f head✝ (_ : p head✝) :: (pmap f tail✝ (_ : ∀ (x : ι), x ∈ tail✝ → p x) ++ pmap f l₂ (_ : ∀ (a : ι), a ∈ l₂ → p a))\n[PROOFSTEP]\nrw [ih]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\na : α\nH : find? p l = some a\n⊢ a ∈ l\n[PROOFSTEP]\ninduction' l with b l IH\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\na : α\nH✝ : find? p l = some a\nH : find? p [] = some a\n⊢ a ∈ []\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl✝ : List α\na : α\nH✝ : find? p l✝ = some a\nb : α\nl : List α\nIH : find? p l = some a → a ∈ l\nH : find? p (b :: l) = some a\n⊢ a ∈ b :: l\n[PROOFSTEP]\nby_cases h : p b\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl✝ : List α\na : α\nH✝ : find? p l✝ = some a\nb : α\nl : List α\nIH : find? p l = some a → a ∈ l\nH : find? p (b :: l) = some a\nh : p b = true\n⊢ a ∈ b :: l\n[PROOFSTEP]\nrw [find?_cons_of_pos _ h] at H \n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl✝ : List α\na : α\nH✝ : find? p l✝ = some a\nb : α\nl : List α\nIH : find? p l = some a → a ∈ l\nH : some b = some a\nh : p b = true\n⊢ a ∈ b :: l\n[PROOFSTEP]\ncases H\n[GOAL]\ncase pos.refl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl✝ : List α\na : α\nH : find? p l✝ = some a\nl : List α\nIH : find? p l = some a → a ∈ l\nh : p a = true\n⊢ a ∈ a :: l\n[PROOFSTEP]\napply mem_cons_self\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl✝ : List α\na : α\nH✝ : find? p l✝ = some a\nb : α\nl : List α\nIH : find? p l = some a → a ∈ l\nH : find? p (b :: l) = some a\nh : ¬p b = true\n⊢ a ∈ b :: l\n[PROOFSTEP]\nrw [find?_cons_of_neg _ h] at H \n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl✝ : List α\na : α\nH✝ : find? p l✝ = some a\nb : α\nl : List α\nIH : find? p l = some a → a ∈ l\nH : find? p l = some a\nh : ¬p b = true\n⊢ a ∈ b :: l\n[PROOFSTEP]\nexact mem_cons_of_mem _ (IH H)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nl : List α\nacc : Array α\n⊢ go f l acc = Array.toListAppend acc (lookmap f l)\n[PROOFSTEP]\ncases l with\n| nil => rfl\n| cons hd tl =>\n  rw [lookmap, go, go]\n  cases f hd with\n  | none => simp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]; rfl\n  | some a => rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nl : List α\nacc : Array α\n⊢ go f l acc = Array.toListAppend acc (lookmap f l)\n[PROOFSTEP]\ncases l with\n| nil => rfl\n| cons hd tl =>\n  rw [lookmap, go, go]\n  cases f hd with\n  | none => simp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]; rfl\n  | some a => rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nacc : Array α\n⊢ go f [] acc = Array.toListAppend acc (lookmap f [])\n[PROOFSTEP]\n\n| nil => rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nacc : Array α\n⊢ go f [] acc = Array.toListAppend acc (lookmap f [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nacc : Array α\nhd : α\ntl : List α\n⊢ go f (hd :: tl) acc = Array.toListAppend acc (lookmap f (hd :: tl))\n[PROOFSTEP]\n\n| cons hd tl =>\n  rw [lookmap, go, go]\n  cases f hd with\n  | none => simp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]; rfl\n  | some a => rfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nacc : Array α\nhd : α\ntl : List α\n⊢ go f (hd :: tl) acc = Array.toListAppend acc (lookmap f (hd :: tl))\n[PROOFSTEP]\nrw [lookmap, go, go]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nacc : Array α\nhd : α\ntl : List α\n⊢ (match f hd with\n    | some b => Array.toListAppend acc (b :: tl)\n    | none => go f tl (Array.push acc hd)) =\n    Array.toListAppend acc\n      (match f hd with\n      | some b => Array.toListAppend #[] (b :: tl)\n      | none => go f tl (Array.push #[] hd))\n[PROOFSTEP]\ncases f hd with\n| none => simp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]; rfl\n| some a => rfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nacc : Array α\nhd : α\ntl : List α\nx✝ : Option α\n⊢ (match x✝ with\n    | some b => Array.toListAppend acc (b :: tl)\n    | none => go f tl (Array.push acc hd)) =\n    Array.toListAppend acc\n      (match x✝ with\n      | some b => Array.toListAppend #[] (b :: tl)\n      | none => go f tl (Array.push #[] hd))\n[PROOFSTEP]\ncases f hd with\n| none => simp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]; rfl\n| some a => rfl\n[GOAL]\ncase cons.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nacc : Array α\nhd : α\ntl : List α\n⊢ (match none with\n    | some b => Array.toListAppend acc (b :: tl)\n    | none => go f tl (Array.push acc hd)) =\n    Array.toListAppend acc\n      (match none with\n      | some b => Array.toListAppend #[] (b :: tl)\n      | none => go f tl (Array.push #[] hd))\n[PROOFSTEP]\n\n| none => simp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]; rfl\n[GOAL]\ncase cons.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nacc : Array α\nhd : α\ntl : List α\n⊢ (match none with\n    | some b => Array.toListAppend acc (b :: tl)\n    | none => go f tl (Array.push acc hd)) =\n    Array.toListAppend acc\n      (match none with\n      | some b => Array.toListAppend #[] (b :: tl)\n      | none => go f tl (Array.push #[] hd))\n[PROOFSTEP]\nsimp only [go_append tl _, Array.toListAppend_eq, append_assoc, Array.push_data]\n[GOAL]\ncase cons.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nacc : Array α\nhd : α\ntl : List α\n⊢ acc.data ++ ([hd] ++ lookmap f tl) = acc.data ++ (#[].data ++ ([hd] ++ lookmap f tl))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons.some\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nacc : Array α\nhd : α\ntl : List α\na : α\n⊢ (match some a with\n    | some b => Array.toListAppend acc (b :: tl)\n    | none => go f tl (Array.push acc hd)) =\n    Array.toListAppend acc\n      (match some a with\n      | some b => Array.toListAppend #[] (b :: tl)\n      | none => go f tl (Array.push #[] hd))\n[PROOFSTEP]\n\n| some a => rfl\n[GOAL]\ncase cons.some\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nacc : Array α\nhd : α\ntl : List α\na : α\n⊢ (match some a with\n    | some b => Array.toListAppend acc (b :: tl)\n    | none => go f tl (Array.push acc hd)) =\n    Array.toListAppend acc\n      (match some a with\n      | some b => Array.toListAppend #[] (b :: tl)\n      | none => go f tl (Array.push #[] hd))\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\na : α\nl : List α\nh : f a = none\n⊢ lookmap f (a :: l) = a :: lookmap f l\n[PROOFSTEP]\nsimp only [lookmap, lookmap.go, Array.toListAppend_eq, Array.data_toArray, nil_append]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\na : α\nl : List α\nh : f a = none\n⊢ (match f a with\n    | some b => b :: l\n    | none => lookmap.go f l (Array.push #[] a)) =\n    a :: lookmap.go f l #[]\n[PROOFSTEP]\nrw [lookmap.go_append, h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\na : α\nl : List α\nh : f a = none\n⊢ (match none with\n    | some b => b :: l\n    | none => Array.toListAppend (Array.push #[] a) (lookmap f l)) =\n    a :: lookmap.go f l #[]\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\na b : α\nl : List α\nh : f a = some b\n⊢ lookmap f (a :: l) = b :: l\n[PROOFSTEP]\nsimp only [lookmap, lookmap.go, Array.toListAppend_eq, Array.data_toArray, nil_append]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\na b : α\nl : List α\nh : f a = some b\n⊢ (match f a with\n    | some b => b :: l\n    | none => lookmap.go f l (Array.push #[] a)) =\n    b :: l\n[PROOFSTEP]\nrw [h]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf✝ f g : α → Option α\na : α\nl : List α\nH : ∀ (a_1 : α), a_1 ∈ a :: l → f a_1 = g a_1\n⊢ lookmap f (a :: l) = lookmap g (a :: l)\n[PROOFSTEP]\ncases' forall_mem_cons.1 H with H₁ H₂\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf✝ f g : α → Option α\na : α\nl : List α\nH : ∀ (a_1 : α), a_1 ∈ a :: l → f a_1 = g a_1\nH₁ : f a = g a\nH₂ : ∀ (x : α), x ∈ l → f x = g x\n⊢ lookmap f (a :: l) = lookmap g (a :: l)\n[PROOFSTEP]\ncases' h : g a with b\n[GOAL]\ncase intro.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf✝ f g : α → Option α\na : α\nl : List α\nH : ∀ (a_1 : α), a_1 ∈ a :: l → f a_1 = g a_1\nH₁ : f a = g a\nH₂ : ∀ (x : α), x ∈ l → f x = g x\nh : g a = none\n⊢ lookmap f (a :: l) = lookmap g (a :: l)\n[PROOFSTEP]\nsimp [h, H₁.trans h, lookmap_congr H₂]\n[GOAL]\ncase intro.some\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf✝ f g : α → Option α\na : α\nl : List α\nH : ∀ (a_1 : α), a_1 ∈ a :: l → f a_1 = g a_1\nH₁ : f a = g a\nH₂ : ∀ (x : α), x ∈ l → f x = g x\nb : α\nh : g a = some b\n⊢ lookmap f (a :: l) = lookmap g (a :: l)\n[PROOFSTEP]\nsimp [lookmap_cons_some _ _ h, lookmap_cons_some _ _ (H₁.trans h)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\ng : α → β\nh : ∀ (a b : α), b ∈ f a → g a = g b\na : α\nl : List α\n⊢ map g (lookmap f (a :: l)) = map g (a :: l)\n[PROOFSTEP]\ncases' h' : f a with b\n[GOAL]\ncase none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\ng : α → β\nh : ∀ (a b : α), b ∈ f a → g a = g b\na : α\nl : List α\nh' : f a = none\n⊢ map g (lookmap f (a :: l)) = map g (a :: l)\n[PROOFSTEP]\nsimp [h']\n[GOAL]\ncase none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\ng : α → β\nh : ∀ (a b : α), b ∈ f a → g a = g b\na : α\nl : List α\nh' : f a = none\n⊢ map g (lookmap f l) = map g l\n[PROOFSTEP]\nexact lookmap_map_eq _ h l\n[GOAL]\ncase some\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\ng : α → β\nh : ∀ (a b : α), b ∈ f a → g a = g b\na : α\nl : List α\nb : α\nh' : f a = some b\n⊢ map g (lookmap f (a :: l)) = map g (a :: l)\n[PROOFSTEP]\nsimp [lookmap_cons_some _ _ h', h _ _ h']\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nh : ∀ (a b : α), b ∈ f a → a = b\nl : List α\n⊢ lookmap f l = l\n[PROOFSTEP]\nrw [← map_id (l.lookmap f), lookmap_map_eq, map_id]\n[GOAL]\ncase h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nh : ∀ (a b : α), b ∈ f a → a = b\nl : List α\n⊢ ∀ (a b : α), b ∈ f a → id a = id b\n[PROOFSTEP]\nexact h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nl : List α\n⊢ length (lookmap f l) = length l\n[PROOFSTEP]\nrw [← length_map, lookmap_map_eq _ fun _ => (), length_map]\n[GOAL]\ncase h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option α\nl : List α\n⊢ ∀ (a b : α), b ∈ f a → () = ()\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\nl : List (Option α)\n⊢ reduceOption (some x :: l) = x :: reduceOption l\n[PROOFSTEP]\nsimp only [reduceOption, filterMap, id.def, eq_self_iff_true, and_self_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List (Option α)\n⊢ reduceOption (none :: l) = reduceOption l\n[PROOFSTEP]\nsimp only [reduceOption, filterMap, id.def]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List (Option α)\nf : α → β\n⊢ reduceOption (map (Option.map f) l) = map f (reduceOption l)\n[PROOFSTEP]\ninduction' l with hd tl hl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\n⊢ reduceOption (map (Option.map f) []) = map f (reduceOption [])\n[PROOFSTEP]\nsimp only [reduceOption_nil, map_nil]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\nhd : Option α\ntl : List (Option α)\nhl : reduceOption (map (Option.map f) tl) = map f (reduceOption tl)\n⊢ reduceOption (map (Option.map f) (hd :: tl)) = map f (reduceOption (hd :: tl))\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase cons.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\ntl : List (Option α)\nhl : reduceOption (map (Option.map f) tl) = map f (reduceOption tl)\n⊢ reduceOption (map (Option.map f) (none :: tl)) = map f (reduceOption (none :: tl))\n[PROOFSTEP]\nsimpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl\n[GOAL]\ncase cons.some\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → β\ntl : List (Option α)\nhl : reduceOption (map (Option.map f) tl) = map f (reduceOption tl)\nval✝ : α\n⊢ reduceOption (map (Option.map f) (some val✝ :: tl)) = map f (reduceOption (some val✝ :: tl))\n[PROOFSTEP]\nsimpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List (Option α)\n⊢ length (reduceOption l) ≤ length l\n[PROOFSTEP]\ninduction' l with hd tl hl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ length (reduceOption []) ≤ length []\n[PROOFSTEP]\nsimp only [reduceOption_nil, length]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhd : Option α\ntl : List (Option α)\nhl : length (reduceOption tl) ≤ length tl\n⊢ length (reduceOption (hd :: tl)) ≤ length (hd :: tl)\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase cons.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ntl : List (Option α)\nhl : length (reduceOption tl) ≤ length tl\n⊢ length (reduceOption (none :: tl)) ≤ length (none :: tl)\n[PROOFSTEP]\nexact Nat.le_succ_of_le hl\n[GOAL]\ncase cons.some\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ntl : List (Option α)\nhl : length (reduceOption tl) ≤ length tl\nval✝ : α\n⊢ length (reduceOption (some val✝ :: tl)) ≤ length (some val✝ :: tl)\n[PROOFSTEP]\nsimpa only [length, add_le_add_iff_right, reduceOption_cons_of_some] using hl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List (Option α)\n⊢ length (reduceOption l) = length l ↔ ∀ (x : Option α), x ∈ l → Option.isSome x = true\n[PROOFSTEP]\ninduction' l with hd tl hl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ length (reduceOption []) = length [] ↔ ∀ (x : Option α), x ∈ [] → Option.isSome x = true\n[PROOFSTEP]\nsimp only [forall_const, reduceOption_nil, not_mem_nil, forall_prop_of_false, eq_self_iff_true, length, not_false_iff]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhd : Option α\ntl : List (Option α)\nhl : length (reduceOption tl) = length tl ↔ ∀ (x : Option α), x ∈ tl → Option.isSome x = true\n⊢ length (reduceOption (hd :: tl)) = length (hd :: tl) ↔ ∀ (x : Option α), x ∈ hd :: tl → Option.isSome x = true\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase cons.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ntl : List (Option α)\nhl : length (reduceOption tl) = length tl ↔ ∀ (x : Option α), x ∈ tl → Option.isSome x = true\n⊢ length (reduceOption (none :: tl)) = length (none :: tl) ↔ ∀ (x : Option α), x ∈ none :: tl → Option.isSome x = true\n[PROOFSTEP]\nsimp only [mem_cons, forall_eq_or_imp, Bool.coe_sort_false, false_and_iff, reduceOption_cons_of_none, length,\n  Option.isSome_none, iff_false_iff]\n[GOAL]\ncase cons.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ntl : List (Option α)\nhl : length (reduceOption tl) = length tl ↔ ∀ (x : Option α), x ∈ tl → Option.isSome x = true\n⊢ ¬length (reduceOption tl) = length tl + 1\n[PROOFSTEP]\nintro H\n[GOAL]\ncase cons.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ntl : List (Option α)\nhl : length (reduceOption tl) = length tl ↔ ∀ (x : Option α), x ∈ tl → Option.isSome x = true\nH : length (reduceOption tl) = length tl + 1\n⊢ False\n[PROOFSTEP]\nhave := reduceOption_length_le tl\n[GOAL]\ncase cons.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ntl : List (Option α)\nhl : length (reduceOption tl) = length tl ↔ ∀ (x : Option α), x ∈ tl → Option.isSome x = true\nH : length (reduceOption tl) = length tl + 1\nthis : length (reduceOption tl) ≤ length tl\n⊢ False\n[PROOFSTEP]\nrw [H] at this \n[GOAL]\ncase cons.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ntl : List (Option α)\nhl : length (reduceOption tl) = length tl ↔ ∀ (x : Option α), x ∈ tl → Option.isSome x = true\nH : length (reduceOption tl) = length tl + 1\nthis : length tl + 1 ≤ length tl\n⊢ False\n[PROOFSTEP]\nexact absurd (Nat.lt_succ_self _) (not_lt_of_le this)\n[GOAL]\ncase cons.some\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ntl : List (Option α)\nhl : length (reduceOption tl) = length tl ↔ ∀ (x : Option α), x ∈ tl → Option.isSome x = true\nval✝ : α\n⊢ length (reduceOption (some val✝ :: tl)) = length (some val✝ :: tl) ↔\n    ∀ (x : Option α), x ∈ some val✝ :: tl → Option.isSome x = true\n[PROOFSTEP]\nsimp only [length, add_left_inj, find?, mem_cons, forall_eq_or_imp, Option.isSome_some, ← hl, reduceOption, true_and]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List (Option α)\n⊢ length (reduceOption l) < length l ↔ none ∈ l\n[PROOFSTEP]\nrw [(reduceOption_length_le l).lt_iff_ne, Ne, reduceOption_length_eq_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List (Option α)\n⊢ (¬∀ (x : Option α), x ∈ l → Option.isSome x = true) ↔ none ∈ l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ (¬∀ (x : Option α), x ∈ [] → Option.isSome x = true) ↔ none ∈ []\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhead✝ : Option α\ntail✝ : List (Option α)\ntail_ih✝ : (¬∀ (x : Option α), x ∈ tail✝ → Option.isSome x = true) ↔ none ∈ tail✝\n⊢ (¬∀ (x : Option α), x ∈ head✝ :: tail✝ → Option.isSome x = true) ↔ none ∈ head✝ :: tail✝\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhead✝ : Option α\ntail✝ : List (Option α)\ntail_ih✝ : (¬∀ (x : Option α), x ∈ tail✝ → Option.isSome x = true) ↔ none ∈ tail✝\n⊢ (Option.isSome head✝ = true → ∃ x, x ∈ tail✝ ∧ Option.isNone x = true) ↔ none = head✝ ∨ none ∈ tail✝\n[PROOFSTEP]\nrw [@eq_comm _ none, ← Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nhead✝ : Option α\ntail✝ : List (Option α)\ntail_ih✝ : (¬∀ (x : Option α), x ∈ tail✝ → Option.isSome x = true) ↔ none ∈ tail✝\n⊢ (¬Option.isSome head✝ = true ∨ ∃ x, x ∈ tail✝ ∧ Option.isNone x = true) ↔ ¬Option.isSome head✝ = true ∨ none ∈ tail✝\n[PROOFSTEP]\nsimp [Option.isNone_iff_eq_none]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : Option α\n⊢ reduceOption [x] = Option.toList x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ reduceOption [none] = Option.toList none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nval✝ : α\n⊢ reduceOption [some val✝] = Option.toList (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List (Option α)\nx : Option α\n⊢ reduceOption (concat l x) = reduceOption l ++ Option.toList x\n[PROOFSTEP]\ninduction' l with hd tl hl generalizing x\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx✝ x : Option α\n⊢ reduceOption (concat [] x) = reduceOption [] ++ Option.toList x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase nil.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : Option α\n⊢ reduceOption (concat [] none) = reduceOption [] ++ Option.toList none\n[PROOFSTEP]\nsimp [Option.toList]\n[GOAL]\ncase nil.some\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : Option α\nval✝ : α\n⊢ reduceOption (concat [] (some val✝)) = reduceOption [] ++ Option.toList (some val✝)\n[PROOFSTEP]\nsimp [Option.toList]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx✝ hd : Option α\ntl : List (Option α)\nhl : ∀ (x : Option α), reduceOption (concat tl x) = reduceOption tl ++ Option.toList x\nx : Option α\n⊢ reduceOption (concat (hd :: tl) x) = reduceOption (hd :: tl) ++ Option.toList x\n[PROOFSTEP]\nsimp only [concat_eq_append, reduceOption_append] at hl \n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx✝ hd : Option α\ntl : List (Option α)\nx : Option α\nhl : ∀ (x : Option α), reduceOption tl ++ reduceOption [x] = reduceOption tl ++ Option.toList x\n⊢ reduceOption (concat (hd :: tl) x) = reduceOption (hd :: tl) ++ Option.toList x\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase cons.none\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx✝ : Option α\ntl : List (Option α)\nx : Option α\nhl : ∀ (x : Option α), reduceOption tl ++ reduceOption [x] = reduceOption tl ++ Option.toList x\n⊢ reduceOption (concat (none :: tl) x) = reduceOption (none :: tl) ++ Option.toList x\n[PROOFSTEP]\nsimp [hl, reduceOption_append]\n[GOAL]\ncase cons.some\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx✝ : Option α\ntl : List (Option α)\nx : Option α\nhl : ∀ (x : Option α), reduceOption tl ++ reduceOption [x] = reduceOption tl ++ Option.toList x\nval✝ : α\n⊢ reduceOption (concat (some val✝ :: tl) x) = reduceOption (some val✝ :: tl) ++ Option.toList x\n[PROOFSTEP]\nsimp [hl, reduceOption_append]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List (Option α)\nx : α\n⊢ reduceOption (concat l (some x)) = concat (reduceOption l) x\n[PROOFSTEP]\nsimp only [reduceOption_nil, concat_eq_append, reduceOption_append, reduceOption_cons_of_some]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List (Option α)\nx : α\n⊢ x ∈ reduceOption l ↔ some x ∈ l\n[PROOFSTEP]\nsimp only [reduceOption, id.def, mem_filterMap, exists_eq_right]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nl : List (Option α)\nx : α\n⊢ (∃ i, get? l i = some (some x)) ↔ ∃ i, get? (reduceOption l) i = some x\n[PROOFSTEP]\nrw [← mem_iff_get?, ← mem_iff_get?, reduceOption_mem_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p : α → Bool\nl : List α\n⊢ filter p l = foldr (fun a out => bif p a then a :: out else out) [] l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p : α → Bool\n⊢ filter p [] = foldr (fun a out => bif p a then a :: out else out) [] []\n[PROOFSTEP]\nsimp [*, filter]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p : α → Bool\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : filter p tail✝ = foldr (fun a out => bif p a then a :: out else out) [] tail✝\n⊢ filter p (head✝ :: tail✝) = foldr (fun a out => bif p a then a :: out else out) [] (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [*, filter]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p : α → Bool\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : filter p tail✝ = foldr (fun a out => bif p a then a :: out else out) [] tail✝\n⊢ (match p head✝ with\n    | true => head✝ :: foldr (fun a out => bif p a then a :: out else out) [] tail✝\n    | false => foldr (fun a out => bif p a then a :: out else out) [] tail✝) =\n    bif p head✝ then head✝ :: foldr (fun a out => bif p a then a :: out else out) [] tail✝\n    else foldr (fun a out => bif p a then a :: out else out) [] tail✝\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\na b : α\nl : List α\nain : a ∈ filter p (b :: l)\npb : p b = true\n⊢ a ∈ b :: filter p l\n[PROOFSTEP]\nsimpa only [filter_cons_of_pos _ pb] using ain\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\na b : α\nl : List α\nain : a ∈ filter p (b :: l)\npb : p b = true\nthis : a ∈ b :: filter p l\nh : a = b\n⊢ p a = true\n[PROOFSTEP]\nrw [← h] at pb \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\na b : α\nl : List α\nain : a ∈ filter p (b :: l)\npb : p a = true\nthis : a ∈ b :: filter p l\nh : a = b\n⊢ p a = true\n[PROOFSTEP]\nexact pb\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\na b : α\nl : List α\nain : a ∈ filter p (b :: l)\npb : ¬p b = true\n⊢ p a = true\n[PROOFSTEP]\nsimp only [filter_cons_of_neg _ pb] at ain \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\na b : α\nl : List α\npb : ¬p b = true\nain : a ∈ filter p l\n⊢ p a = true\n[PROOFSTEP]\nexact of_mem_filter ain\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\na x : α\nl : List α\nh : a ∈ x :: l\nh1 : p a = true\n⊢ a ∈ filter p (x :: l)\n[PROOFSTEP]\nrcases mem_cons.1 h with rfl | h\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\na : α\nl : List α\nh1 : p a = true\nh : a ∈ a :: l\n⊢ a ∈ filter p (a :: l)\n[PROOFSTEP]\nsimp [filter, h1]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\na x : α\nl : List α\nh✝ : a ∈ x :: l\nh1 : p a = true\nh : a ∈ l\n⊢ a ∈ filter p (x :: l)\n[PROOFSTEP]\nrw [filter]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\na x : α\nl : List α\nh✝ : a ∈ x :: l\nh1 : p a = true\nh : a ∈ l\n⊢ a ∈\n    match p x with\n    | true => x :: filter p l\n    | false => filter p l\n[PROOFSTEP]\ncases p x\n[GOAL]\ncase inr.false\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\na x : α\nl : List α\nh✝ : a ∈ x :: l\nh1 : p a = true\nh : a ∈ l\n⊢ a ∈\n    match false with\n    | true => x :: filter p l\n    | false => filter p l\n[PROOFSTEP]\nsimp [mem_filter_of_mem h h1]\n[GOAL]\ncase inr.true\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\na x : α\nl : List α\nh✝ : a ∈ x :: l\nh1 : p a = true\nh : a ∈ l\n⊢ a ∈\n    match true with\n    | true => x :: filter p l\n    | false => filter p l\n[PROOFSTEP]\nsimp [mem_filter_of_mem h h1]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p : α → Bool\nl l' : List α\nh : l ⊆ l'\n⊢ filter p l ⊆ filter p l'\n[PROOFSTEP]\nintro x hx\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p : α → Bool\nl l' : List α\nh : l ⊆ l'\nx : α\nhx : x ∈ filter p l\n⊢ x ∈ filter p l'\n[PROOFSTEP]\nrw [mem_filter] at hx ⊢\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p : α → Bool\nl l' : List α\nh : l ⊆ l'\nx : α\nhx : x ∈ l ∧ p x = true\n⊢ x ∈ l' ∧ p x = true\n[PROOFSTEP]\nexact ⟨h hx.left, hx.right⟩\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ : α → Bool\nl : List α\np q : α → Bool\nh : ∀ (a : α), p a = true → q a = true\n⊢ filter p l <+ filter q l\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p q : α → Bool\nh : ∀ (a : α), p a = true → q a = true\n⊢ filter p [] <+ filter q []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p q : α → Bool\nh : ∀ (a : α), p a = true → q a = true\nhd : α\ntl : List α\nIH : filter p tl <+ filter q tl\n⊢ filter p (hd :: tl) <+ filter q (hd :: tl)\n[PROOFSTEP]\nby_cases hp : p hd\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p q : α → Bool\nh : ∀ (a : α), p a = true → q a = true\nhd : α\ntl : List α\nIH : filter p tl <+ filter q tl\nhp : p hd = true\n⊢ filter p (hd :: tl) <+ filter q (hd :: tl)\n[PROOFSTEP]\nrw [filter_cons_of_pos _ hp, filter_cons_of_pos _ (h _ hp)]\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p q : α → Bool\nh : ∀ (a : α), p a = true → q a = true\nhd : α\ntl : List α\nIH : filter p tl <+ filter q tl\nhp : p hd = true\n⊢ hd :: filter p tl <+ hd :: filter q tl\n[PROOFSTEP]\nexact IH.cons_cons hd\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p q : α → Bool\nh : ∀ (a : α), p a = true → q a = true\nhd : α\ntl : List α\nIH : filter p tl <+ filter q tl\nhp : ¬p hd = true\n⊢ filter p (hd :: tl) <+ filter q (hd :: tl)\n[PROOFSTEP]\nrw [filter_cons_of_neg _ hp]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p q : α → Bool\nh : ∀ (a : α), p a = true → q a = true\nhd : α\ntl : List α\nIH : filter p tl <+ filter q tl\nhp : ¬p hd = true\n⊢ filter p tl <+ filter q (hd :: tl)\n[PROOFSTEP]\nby_cases hq : q hd\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p q : α → Bool\nh : ∀ (a : α), p a = true → q a = true\nhd : α\ntl : List α\nIH : filter p tl <+ filter q tl\nhp : ¬p hd = true\nhq : q hd = true\n⊢ filter p tl <+ filter q (hd :: tl)\n[PROOFSTEP]\nrw [filter_cons_of_pos _ hq]\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p q : α → Bool\nh : ∀ (a : α), p a = true → q a = true\nhd : α\ntl : List α\nIH : filter p tl <+ filter q tl\nhp : ¬p hd = true\nhq : q hd = true\n⊢ filter p tl <+ hd :: filter q tl\n[PROOFSTEP]\nexact sublist_cons_of_sublist hd IH\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p q : α → Bool\nh : ∀ (a : α), p a = true → q a = true\nhd : α\ntl : List α\nIH : filter p tl <+ filter q tl\nhp : ¬p hd = true\nhq : ¬q hd = true\n⊢ filter p tl <+ filter q (hd :: tl)\n[PROOFSTEP]\nrw [filter_cons_of_neg _ hq]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ p q : α → Bool\nh : ∀ (a : α), p a = true → q a = true\nhd : α\ntl : List α\nIH : filter p tl <+ filter q tl\nhp : ¬p hd = true\nhq : ¬q hd = true\n⊢ filter p tl <+ filter q tl\n[PROOFSTEP]\nexact IH\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\n⊢ filter (fun x => true) l = l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\n⊢ filter (fun x => true) [] = []\n[PROOFSTEP]\nsimp [*, filter]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : filter (fun x => true) tail✝ = tail✝\n⊢ filter (fun x => true) (head✝ :: tail✝) = head✝ :: tail✝\n[PROOFSTEP]\nsimp [*, filter]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\n⊢ filter (fun x => false) l = []\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\n⊢ filter (fun x => false) [] = []\n[PROOFSTEP]\nsimp [*, filter]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : filter (fun x => false) tail✝ = []\n⊢ filter (fun x => false) (head✝ :: tail✝) = []\n[PROOFSTEP]\nsimp [*, filter]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ : List α\np : α → Bool\nl₂ : List α\n⊢ loop p [] l₂ = (reverse l₂ ++ takeWhile p [], dropWhile p [])\n[PROOFSTEP]\nsimp [span.loop, takeWhile, dropWhile]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ : List α\np : α → Bool\na : α\nl l₂ : List α\n⊢ loop p (a :: l) l₂ = (reverse l₂ ++ takeWhile p (a :: l), dropWhile p (a :: l))\n[PROOFSTEP]\ncases hp : p a\n[GOAL]\ncase false\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ : List α\np : α → Bool\na : α\nl l₂ : List α\nhp : p a = false\n⊢ loop p (a :: l) l₂ = (reverse l₂ ++ takeWhile p (a :: l), dropWhile p (a :: l))\n[PROOFSTEP]\nsimp [hp, span.loop, span.loop_eq_take_drop, takeWhile, dropWhile]\n[GOAL]\ncase true\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂✝ : List α\np : α → Bool\na : α\nl l₂ : List α\nhp : p a = true\n⊢ loop p (a :: l) l₂ = (reverse l₂ ++ takeWhile p (a :: l), dropWhile p (a :: l))\n[PROOFSTEP]\nsimp [hp, span.loop, span.loop_eq_take_drop, takeWhile, dropWhile]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\n⊢ span p l = (takeWhile p l, dropWhile p l)\n[PROOFSTEP]\nsimpa using span.loop_eq_take_drop p l []\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nhl : 0 < length (dropWhile p l)\n⊢ ¬p (nthLe (dropWhile p l) 0 hl) = true\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nhl✝ : 0 < length (dropWhile p l)\nhl : 0 < length (dropWhile p [])\n⊢ ¬p (nthLe (dropWhile p []) 0 hl) = true\n[PROOFSTEP]\ncases hl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nhl✝ : 0 < length (dropWhile p l)\nhd : α\ntl : List α\nIH : ∀ (hl : 0 < length (dropWhile p tl)), ¬p (nthLe (dropWhile p tl) 0 hl) = true\nhl : 0 < length (dropWhile p (hd :: tl))\n⊢ ¬p (nthLe (dropWhile p (hd :: tl)) 0 hl) = true\n[PROOFSTEP]\nsimp only [dropWhile]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nhl✝ : 0 < length (dropWhile p l)\nhd : α\ntl : List α\nIH : ∀ (hl : 0 < length (dropWhile p tl)), ¬p (nthLe (dropWhile p tl) 0 hl) = true\nhl : 0 < length (dropWhile p (hd :: tl))\n⊢ ¬p\n        (nthLe\n          (match p hd with\n          | true => dropWhile p tl\n          | false => hd :: tl)\n          0\n          (_ :\n            0 <\n              length\n                (match p hd with\n                | true => dropWhile p tl\n                | false => hd :: tl))) =\n      true\n[PROOFSTEP]\nby_cases hp : p hd\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nhl✝ : 0 < length (dropWhile p l)\nhd : α\ntl : List α\nIH : ∀ (hl : 0 < length (dropWhile p tl)), ¬p (nthLe (dropWhile p tl) 0 hl) = true\nhl : 0 < length (dropWhile p (hd :: tl))\nhp : p hd = true\n⊢ ¬p\n        (nthLe\n          (match p hd with\n          | true => dropWhile p tl\n          | false => hd :: tl)\n          0\n          (_ :\n            0 <\n              length\n                (match p hd with\n                | true => dropWhile p tl\n                | false => hd :: tl))) =\n      true\n[PROOFSTEP]\nsimp [hp, IH]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nhl✝ : 0 < length (dropWhile p l)\nhd : α\ntl : List α\nIH : ∀ (hl : 0 < length (dropWhile p tl)), ¬p (nthLe (dropWhile p tl) 0 hl) = true\nhl : 0 < length (dropWhile p (hd :: tl))\nhp : ¬p hd = true\n⊢ ¬p\n        (nthLe\n          (match p hd with\n          | true => dropWhile p tl\n          | false => hd :: tl)\n          0\n          (_ :\n            0 <\n              length\n                (match p hd with\n                | true => dropWhile p tl\n                | false => hd :: tl))) =\n      true\n[PROOFSTEP]\nsimp [hp, nthLe_cons]\n  -- porting note: How did the Lean 3 proof work,\n  -- without mentioning nthLe_cons?\n  -- Same question for takeWhile_eq_nil_iff below\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\n⊢ dropWhile p l = [] ↔ ∀ (x : α), x ∈ l → p x = true\n[PROOFSTEP]\ninduction' l with x xs IH\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\n⊢ dropWhile p [] = [] ↔ ∀ (x : α), x ∈ [] → p x = true\n[PROOFSTEP]\nsimp [dropWhile]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\nxs : List α\nIH : dropWhile p xs = [] ↔ ∀ (x : α), x ∈ xs → p x = true\n⊢ dropWhile p (x :: xs) = [] ↔ ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1 = true\n[PROOFSTEP]\nby_cases hp : p x\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\nxs : List α\nIH : dropWhile p xs = [] ↔ ∀ (x : α), x ∈ xs → p x = true\nhp : p x = true\n⊢ dropWhile p (x :: xs) = [] ↔ ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1 = true\n[PROOFSTEP]\nsimp [hp, dropWhile, IH]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\nxs : List α\nIH : dropWhile p xs = [] ↔ ∀ (x : α), x ∈ xs → p x = true\nhp : ¬p x = true\n⊢ dropWhile p (x :: xs) = [] ↔ ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1 = true\n[PROOFSTEP]\nsimp [hp, dropWhile, IH]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\n⊢ takeWhile p l = l ↔ ∀ (x : α), x ∈ l → p x = true\n[PROOFSTEP]\ninduction' l with x xs IH\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\n⊢ takeWhile p [] = [] ↔ ∀ (x : α), x ∈ [] → p x = true\n[PROOFSTEP]\nsimp [takeWhile]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\nxs : List α\nIH : takeWhile p xs = xs ↔ ∀ (x : α), x ∈ xs → p x = true\n⊢ takeWhile p (x :: xs) = x :: xs ↔ ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1 = true\n[PROOFSTEP]\nby_cases hp : p x\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\nxs : List α\nIH : takeWhile p xs = xs ↔ ∀ (x : α), x ∈ xs → p x = true\nhp : p x = true\n⊢ takeWhile p (x :: xs) = x :: xs ↔ ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1 = true\n[PROOFSTEP]\nsimp [hp, takeWhile, IH]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\nxs : List α\nIH : takeWhile p xs = xs ↔ ∀ (x : α), x ∈ xs → p x = true\nhp : ¬p x = true\n⊢ takeWhile p (x :: xs) = x :: xs ↔ ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1 = true\n[PROOFSTEP]\nsimp [hp, takeWhile, IH]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\n⊢ takeWhile p l = [] ↔ ∀ (hl : 0 < length l), ¬p (nthLe l 0 hl) = true\n[PROOFSTEP]\ninduction' l with x xs IH\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\n⊢ takeWhile p [] = [] ↔ ∀ (hl : 0 < length []), ¬p (nthLe [] 0 hl) = true\n[PROOFSTEP]\nsimp [takeWhile, true_iff]\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\n⊢ ∀ (hl : 0 < length []), p (nthLe [] 0 hl) = false\n[PROOFSTEP]\nintro h\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nh : 0 < length []\n⊢ p (nthLe [] 0 h) = false\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\nxs : List α\nIH : takeWhile p xs = [] ↔ ∀ (hl : 0 < length xs), ¬p (nthLe xs 0 hl) = true\n⊢ takeWhile p (x :: xs) = [] ↔ ∀ (hl : 0 < length (x :: xs)), ¬p (nthLe (x :: xs) 0 hl) = true\n[PROOFSTEP]\nby_cases hp : p x\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\nxs : List α\nIH : takeWhile p xs = [] ↔ ∀ (hl : 0 < length xs), ¬p (nthLe xs 0 hl) = true\nhp : p x = true\n⊢ takeWhile p (x :: xs) = [] ↔ ∀ (hl : 0 < length (x :: xs)), ¬p (nthLe (x :: xs) 0 hl) = true\n[PROOFSTEP]\nsimp [hp, takeWhile, IH, nthLe_cons]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\nxs : List α\nIH : takeWhile p xs = [] ↔ ∀ (hl : 0 < length xs), ¬p (nthLe xs 0 hl) = true\nhp : ¬p x = true\n⊢ takeWhile p (x :: xs) = [] ↔ ∀ (hl : 0 < length (x :: xs)), ¬p (nthLe (x :: xs) 0 hl) = true\n[PROOFSTEP]\nsimp [hp, takeWhile, IH, nthLe_cons]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\nhx : x ∈ takeWhile p l\n⊢ p x = true\n[PROOFSTEP]\ninduction l with simp [takeWhile] at hx \n| cons hd tl IH =>\n  cases hp : p hd\n  · simp [hp] at hx \n  · rw [hp, mem_cons] at hx \n    rcases hx with (rfl | hx)\n    · exact hp\n    · exact IH hx\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\nhx : x ∈ takeWhile p l\n⊢ p x = true\n[PROOFSTEP]\ninduction l with simp [takeWhile] at hx \n| cons hd tl IH =>\n  cases hp : p hd\n  · simp [hp] at hx \n  · rw [hp, mem_cons] at hx \n    rcases hx with (rfl | hx)\n    · exact hp\n    · exact IH hx\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx hd : α\ntl : List α\nIH : x ∈ takeWhile p tl → p x = true\nhx : x ∈ takeWhile p (hd :: tl)\n⊢ p x = true\n[PROOFSTEP]\nsimp [takeWhile] at hx \n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx hd : α\ntl : List α\nIH : x ∈ takeWhile p tl → p x = true\nhx :\n  x ∈\n    match p hd with\n    | true => hd :: takeWhile p tl\n    | false => []\n⊢ p x = true\n[PROOFSTEP]\n\n| cons hd tl IH =>\n  cases hp : p hd\n  · simp [hp] at hx \n  · rw [hp, mem_cons] at hx \n    rcases hx with (rfl | hx)\n    · exact hp\n    · exact IH hx\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx hd : α\ntl : List α\nIH : x ∈ takeWhile p tl → p x = true\nhx :\n  x ∈\n    match p hd with\n    | true => hd :: takeWhile p tl\n    | false => []\n⊢ p x = true\n[PROOFSTEP]\ncases hp : p hd\n[GOAL]\ncase cons.false\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx hd : α\ntl : List α\nIH : x ∈ takeWhile p tl → p x = true\nhx :\n  x ∈\n    match p hd with\n    | true => hd :: takeWhile p tl\n    | false => []\nhp : p hd = false\n⊢ p x = true\n[PROOFSTEP]\nsimp [hp] at hx \n[GOAL]\ncase cons.true\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx hd : α\ntl : List α\nIH : x ∈ takeWhile p tl → p x = true\nhx :\n  x ∈\n    match p hd with\n    | true => hd :: takeWhile p tl\n    | false => []\nhp : p hd = true\n⊢ p x = true\n[PROOFSTEP]\nrw [hp, mem_cons] at hx \n[GOAL]\ncase cons.true\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx hd : α\ntl : List α\nIH : x ∈ takeWhile p tl → p x = true\nhx : x = hd ∨ x ∈ takeWhile p tl\nhp : p hd = true\n⊢ p x = true\n[PROOFSTEP]\nrcases hx with (rfl | hx)\n[GOAL]\ncase cons.true.inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\ntl : List α\nIH : x ∈ takeWhile p tl → p x = true\nhp : p x = true\n⊢ p x = true\n[PROOFSTEP]\nexact hp\n[GOAL]\ncase cons.true.inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx hd : α\ntl : List α\nIH : x ∈ takeWhile p tl → p x = true\nhp : p hd = true\nhx : x ∈ takeWhile p tl\n⊢ p x = true\n[PROOFSTEP]\nexact IH hx\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\nx : α\nhx : x ∈ takeWhile p []\n⊢ p x = true\n[PROOFSTEP]\nsimp [takeWhile] at hx \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ : α → Bool\nl✝ : List α\np q : α → Bool\nl : List α\n⊢ takeWhile p (takeWhile q l) = takeWhile (fun a => decide (p a = true ∧ q a = true)) l\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ : α → Bool\nl : List α\np q : α → Bool\n⊢ takeWhile p (takeWhile q []) = takeWhile (fun a => decide (p a = true ∧ q a = true)) []\n[PROOFSTEP]\nsimp [takeWhile]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ : α → Bool\nl : List α\np q : α → Bool\nhd : α\ntl : List α\nIH : takeWhile p (takeWhile q tl) = takeWhile (fun a => decide (p a = true ∧ q a = true)) tl\n⊢ takeWhile p (takeWhile q (hd :: tl)) = takeWhile (fun a => decide (p a = true ∧ q a = true)) (hd :: tl)\n[PROOFSTEP]\nby_cases hp : p hd\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ : α → Bool\nl : List α\np q : α → Bool\nhd : α\ntl : List α\nIH : takeWhile p (takeWhile q tl) = takeWhile (fun a => decide (p a = true ∧ q a = true)) tl\nhp : p hd = true\n⊢ takeWhile p (takeWhile q (hd :: tl)) = takeWhile (fun a => decide (p a = true ∧ q a = true)) (hd :: tl)\n[PROOFSTEP]\nby_cases hq : q hd\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ : α → Bool\nl : List α\np q : α → Bool\nhd : α\ntl : List α\nIH : takeWhile p (takeWhile q tl) = takeWhile (fun a => decide (p a = true ∧ q a = true)) tl\nhp : ¬p hd = true\n⊢ takeWhile p (takeWhile q (hd :: tl)) = takeWhile (fun a => decide (p a = true ∧ q a = true)) (hd :: tl)\n[PROOFSTEP]\nby_cases hq : q hd\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ : α → Bool\nl : List α\np q : α → Bool\nhd : α\ntl : List α\nIH : takeWhile p (takeWhile q tl) = takeWhile (fun a => decide (p a = true ∧ q a = true)) tl\nhp : p hd = true\nhq : q hd = true\n⊢ takeWhile p (takeWhile q (hd :: tl)) = takeWhile (fun a => decide (p a = true ∧ q a = true)) (hd :: tl)\n[PROOFSTEP]\nsimp [takeWhile, hp, hq, IH]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ : α → Bool\nl : List α\np q : α → Bool\nhd : α\ntl : List α\nIH : takeWhile p (takeWhile q tl) = takeWhile (fun a => decide (p a = true ∧ q a = true)) tl\nhp : p hd = true\nhq : ¬q hd = true\n⊢ takeWhile p (takeWhile q (hd :: tl)) = takeWhile (fun a => decide (p a = true ∧ q a = true)) (hd :: tl)\n[PROOFSTEP]\nsimp [takeWhile, hp, hq, IH]\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ : α → Bool\nl : List α\np q : α → Bool\nhd : α\ntl : List α\nIH : takeWhile p (takeWhile q tl) = takeWhile (fun a => decide (p a = true ∧ q a = true)) tl\nhp : ¬p hd = true\nhq : q hd = true\n⊢ takeWhile p (takeWhile q (hd :: tl)) = takeWhile (fun a => decide (p a = true ∧ q a = true)) (hd :: tl)\n[PROOFSTEP]\nsimp [takeWhile, hp, hq, IH]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ : α → Bool\nl : List α\np q : α → Bool\nhd : α\ntl : List α\nIH : takeWhile p (takeWhile q tl) = takeWhile (fun a => decide (p a = true ∧ q a = true)) tl\nhp : ¬p hd = true\nhq : ¬q hd = true\n⊢ takeWhile p (takeWhile q (hd :: tl)) = takeWhile (fun a => decide (p a = true ∧ q a = true)) (hd :: tl)\n[PROOFSTEP]\nsimp [takeWhile, hp, hq, IH]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\n⊢ takeWhile p (takeWhile p l) = takeWhile p l\n[PROOFSTEP]\nsimp_rw [takeWhile_takeWhile, and_self_iff, Bool.decide_coe]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np : α → Bool\nl : List α\na : α\nal : a ∈ l\npa : p a = true\n⊢ length (eraseP p l) + 1 = length l\n[PROOFSTEP]\nlet ⟨_, l₁, l₂, _, _, h₁, h₂⟩ := exists_of_eraseP al pa\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\np : α → Bool\nl : List α\na : α\nal : a ∈ l\npa : p a = true\nw✝ : α\nl₁ l₂ : List α\nleft✝¹ : ∀ (b : α), b ∈ l₁ → ¬p b = true\nleft✝ : p w✝ = true\nh₁ : l = l₁ ++ w✝ :: l₂\nh₂ : eraseP p l = l₁ ++ l₂\n⊢ length (eraseP p l) + 1 = length l\n[PROOFSTEP]\nrw [h₂, h₁, length_append, length_append]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\np : α → Bool\nl : List α\na : α\nal : a ∈ l\npa : p a = true\nw✝ : α\nl₁ l₂ : List α\nleft✝¹ : ∀ (b : α), b ∈ l₁ → ¬p b = true\nleft✝ : p w✝ = true\nh₁ : l = l₁ ++ w✝ :: l₂\nh₂ : eraseP p l = l₁ ++ l₂\n⊢ length l₁ + length l₂ + 1 = length l₁ + length (w✝ :: l₂)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\nh : a ∈ l\n⊢ length (List.erase l a) + 1 = length l\n[PROOFSTEP]\nrw [erase_eq_eraseP, length_eraseP_add_one h (decide_eq_true rfl)]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nf : α → β\nfinj : Injective f\na : α\nl : List α\n⊢ map f (List.erase l a) = List.erase (map f l) (f a)\n[PROOFSTEP]\nhave this : Eq a = Eq (f a) ∘ f := by ext b; simp [finj.eq_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nf : α → β\nfinj : Injective f\na : α\nl : List α\n⊢ Eq a = Eq (f a) ∘ f\n[PROOFSTEP]\next b\n[GOAL]\ncase h.a\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nf : α → β\nfinj : Injective f\na : α\nl : List α\nb : α\n⊢ a = b ↔ (Eq (f a) ∘ f) b\n[PROOFSTEP]\nsimp [finj.eq_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nf : α → β\nfinj : Injective f\na : α\nl : List α\nthis : Eq a = Eq (f a) ∘ f\n⊢ map f (List.erase l a) = List.erase (map f l) (f a)\n[PROOFSTEP]\nsimp [erase_eq_eraseP, erase_eq_eraseP, eraseP_map, this]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nf : α → β\nfinj : Injective f\na : α\nl : List α\nthis : Eq a = Eq (f a) ∘ f\n⊢ map f (eraseP (fun b => decide (f a = f b)) l) = map f (eraseP ((fun b => decide (f a = b)) ∘ f) l)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nf : α → β\nfinj : Injective f\nl₁ l₂ : List α\n⊢ map f (foldl List.erase l₁ l₂) = foldl (fun l a => List.erase l (f a)) (map f l₁) l₂\n[PROOFSTEP]\ninduction l₂ generalizing l₁ <;> [rfl; simp only [foldl_cons, map_erase finj, *]]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nf : α → β\nfinj : Injective f\nl₁ l₂ : List α\n⊢ map f (foldl List.erase l₁ l₂) = foldl (fun l a => List.erase l (f a)) (map f l₁) l₂\n[PROOFSTEP]\ninduction l₂ generalizing l₁\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nf : α → β\nfinj : Injective f\nl₁ : List α\n⊢ map f (foldl List.erase l₁ []) = foldl (fun l a => List.erase l (f a)) (map f l₁) []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂ : List α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nf : α → β\nfinj : Injective f\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ {l₁ : List α}, map f (foldl List.erase l₁ tail✝) = foldl (fun l a => List.erase l (f a)) (map f l₁) tail✝\nl₁ : List α\n⊢ map f (foldl List.erase l₁ (head✝ :: tail✝)) = foldl (fun l a => List.erase l (f a)) (map f l₁) (head✝ :: tail✝)\n[PROOFSTEP]\nsimp only [foldl_cons, map_erase finj, *]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nf : α → β\nfinj : Injective f\nl₁ l₂ : List α\n⊢ map f (List.diff l₁ l₂) = List.diff (map f l₁) (map f l₂)\n[PROOFSTEP]\nsimp only [diff_eq_foldl, foldl_map, map_foldl_erase finj]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : b :: l₁ <+ l₂\nheq : b = a\n⊢ List.diff (List.erase l₂ a) (List.erase (b :: l₁) a) <+ List.diff l₂ (b :: l₁)\n[PROOFSTEP]\nsimp only [heq, erase_cons_head, diff_cons]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : b :: l₁ <+ l₂\nheq : b = a\n⊢ List.diff (List.erase l₂ a) l₁ <+ List.diff (List.erase l₂ a) l₁\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : b :: l₁ <+ l₂\nheq : ¬b = a\n⊢ List.diff (List.erase l₂ a) (List.erase (b :: l₁) a) <+ List.diff l₂ (b :: l₁)\n[PROOFSTEP]\nsimp only [erase_cons_head b l₁, erase_cons_tail l₁ heq, diff_cons ((List.erase l₂ a)) (List.erase l₁ a) b,\n  diff_cons l₂ l₁ b, erase_comm a b l₂]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : b :: l₁ <+ l₂\nheq : ¬b = a\n⊢ List.diff (List.erase (List.erase l₂ b) a) (List.erase l₁ a) <+ List.diff (List.erase l₂ b) l₁\n[PROOFSTEP]\nhave h' := h.erase b\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : b :: l₁ <+ l₂\nheq : ¬b = a\nh' : List.erase (b :: l₁) b <+ List.erase l₂ b\n⊢ List.diff (List.erase (List.erase l₂ b) a) (List.erase l₁ a) <+ List.diff (List.erase l₂ b) l₁\n[PROOFSTEP]\nrw [erase_cons_head] at h' \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : b :: l₁ <+ l₂\nheq : ¬b = a\nh' : l₁ <+ List.erase l₂ b\n⊢ List.diff (List.erase (List.erase l₂ b) a) (List.erase l₁ a) <+ List.diff (List.erase l₂ b) l₁\n[PROOFSTEP]\nexact @erase_diff_erase_sublist_of_sublist _ l₁ (l₂.erase b) h'\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\na : α\nl : List α\nm : ℕ\n⊢ (fun a => (n + 1 + m, a)) <$> get? l m = (fun a => (n + (m + 1), a)) <$> get? (a :: l) (m + 1)\n[PROOFSTEP]\nrw [add_right_comm]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\na : α\nl : List α\nm : ℕ\n⊢ (fun a => (n + m + 1, a)) <$> get? l m = (fun a => (n + (m + 1), a)) <$> get? (a :: l) (m + 1)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ ∀ (l : List α) (n : ℕ), get? (enum l) n = (fun a => (n, a)) <$> get? l n\n[PROOFSTEP]\nsimp only [enum, enumFrom_get?, zero_add]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\n⊢ List α → ℕ → True\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nn✝ : ℕ\n⊢ True\n[PROOFSTEP]\ntrivial\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\n⊢ (i, x) ∈ enumFrom j [] → j ≤ i ∧ i < j + length [] ∧ x ∈ []\n[PROOFSTEP]\nsimp [enumFrom]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\ny : α\nys : List α\n⊢ (i, x) ∈ enumFrom j (y :: ys) → j ≤ i ∧ i < j + length (y :: ys) ∧ x ∈ y :: ys\n[PROOFSTEP]\nsuffices i = j ∧ x = y ∨ (i, x) ∈ enumFrom (j + 1) ys → j ≤ i ∧ i < j + (length ys + 1) ∧ (x = y ∨ x ∈ ys) by\n  simpa [enumFrom, mem_enumFrom ys]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\ny : α\nys : List α\nthis : i = j ∧ x = y ∨ (i, x) ∈ enumFrom (j + 1) ys → j ≤ i ∧ i < j + (length ys + 1) ∧ (x = y ∨ x ∈ ys)\n⊢ (i, x) ∈ enumFrom j (y :: ys) → j ≤ i ∧ i < j + length (y :: ys) ∧ x ∈ y :: ys\n[PROOFSTEP]\nsimpa [enumFrom, mem_enumFrom ys]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\ny : α\nys : List α\n⊢ i = j ∧ x = y ∨ (i, x) ∈ enumFrom (j + 1) ys → j ≤ i ∧ i < j + (length ys + 1) ∧ (x = y ∨ x ∈ ys)\n[PROOFSTEP]\nrintro (h | h)\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\ny : α\nys : List α\nh : i = j ∧ x = y\n⊢ j ≤ i ∧ i < j + (length ys + 1) ∧ (x = y ∨ x ∈ ys)\n[PROOFSTEP]\nrefine' ⟨le_of_eq h.1.symm, h.1 ▸ _, Or.inl h.2⟩\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\ny : α\nys : List α\nh : i = j ∧ x = y\n⊢ i < i + (length ys + 1)\n[PROOFSTEP]\napply Nat.lt_add_of_pos_right\n[GOAL]\ncase inl.h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\ny : α\nys : List α\nh : i = j ∧ x = y\n⊢ 0 < length ys + 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\ny : α\nys : List α\nh : (i, x) ∈ enumFrom (j + 1) ys\n⊢ j ≤ i ∧ i < j + (length ys + 1) ∧ (x = y ∨ x ∈ ys)\n[PROOFSTEP]\nhave ⟨hji, hijlen, hmem⟩ := mem_enumFrom _ h\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\ny : α\nys : List α\nh : (i, x) ∈ enumFrom (j + 1) ys\nhji : j + 1 ≤ i\nhijlen : i < j + 1 + length ys\nhmem : x ∈ ys\n⊢ j ≤ i ∧ i < j + (length ys + 1) ∧ (x = y ∨ x ∈ ys)\n[PROOFSTEP]\nrefine' ⟨_, _, _⟩\n[GOAL]\ncase inr.refine'_1\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\ny : α\nys : List α\nh : (i, x) ∈ enumFrom (j + 1) ys\nhji : j + 1 ≤ i\nhijlen : i < j + 1 + length ys\nhmem : x ∈ ys\n⊢ j ≤ i\n[PROOFSTEP]\nexact le_trans (Nat.le_succ _) hji\n[GOAL]\ncase inr.refine'_2\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\ny : α\nys : List α\nh : (i, x) ∈ enumFrom (j + 1) ys\nhji : j + 1 ≤ i\nhijlen : i < j + 1 + length ys\nhmem : x ∈ ys\n⊢ i < j + (length ys + 1)\n[PROOFSTEP]\nconvert hijlen using 1\n[GOAL]\ncase h.e'_4\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\ny : α\nys : List α\nh : (i, x) ∈ enumFrom (j + 1) ys\nhji : j + 1 ≤ i\nhijlen : i < j + 1 + length ys\nhmem : x ∈ ys\n⊢ j + (length ys + 1) = j + 1 + length ys\n[PROOFSTEP]\nac_rfl\n[GOAL]\ncase inr.refine'_3\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ni j : ℕ\ny : α\nys : List α\nh : (i, x) ∈ enumFrom (j + 1) ys\nhji : j + 1 ≤ i\nhijlen : i < j + 1 + length ys\nhmem : x ∈ ys\n⊢ x = y ∨ x ∈ ys\n[PROOFSTEP]\nsimp [hmem]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ xs ys : List α\nn : ℕ\n⊢ enumFrom n (xs ++ ys) = enumFrom n xs ++ enumFrom (n + length xs) ys\n[PROOFSTEP]\ninduction' xs with x xs IH generalizing ys n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ ys✝ : List α\nn✝ : ℕ\nys : List α\nn : ℕ\n⊢ enumFrom n ([] ++ ys) = enumFrom n [] ++ enumFrom (n + length []) ys\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ ys✝ : List α\nn✝ : ℕ\nx : α\nxs : List α\nIH : ∀ (ys : List α) (n : ℕ), enumFrom n (xs ++ ys) = enumFrom n xs ++ enumFrom (n + length xs) ys\nys : List α\nn : ℕ\n⊢ enumFrom n (x :: xs ++ ys) = enumFrom n (x :: xs) ++ enumFrom (n + length (x :: xs)) ys\n[PROOFSTEP]\nrw [cons_append, enumFrom_cons, IH, ← cons_append, ← enumFrom_cons, length, add_right_comm, add_assoc]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ xs ys : List α\n⊢ enum (xs ++ ys) = enum xs ++ enumFrom (length xs) ys\n[PROOFSTEP]\nsimp [enum, enumFrom_append]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn k : ℕ\n⊢ map (Prod.map (fun x => x + n) id) (enumFrom k l) = enumFrom (n + k) l\n[PROOFSTEP]\ninduction' l with hd tl IH generalizing n k\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn✝ k✝ n k : ℕ\n⊢ map (Prod.map (fun x => x + n) id) (enumFrom k []) = enumFrom (n + k) []\n[PROOFSTEP]\nsimp [enumFrom]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn✝ k✝ : ℕ\nhd : α\ntl : List α\nIH : ∀ (n k : ℕ), map (Prod.map (fun x => x + n) id) (enumFrom k tl) = enumFrom (n + k) tl\nn k : ℕ\n⊢ map (Prod.map (fun x => x + n) id) (enumFrom k (hd :: tl)) = enumFrom (n + k) (hd :: tl)\n[PROOFSTEP]\nsimp only [enumFrom, map, zero_add, Prod.map_mk, id.def, eq_self_iff_true, true_and_iff]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn✝ k✝ : ℕ\nhd : α\ntl : List α\nIH : ∀ (n k : ℕ), map (Prod.map (fun x => x + n) id) (enumFrom k tl) = enumFrom (n + k) tl\nn k : ℕ\n⊢ (k + n, hd) :: map (Prod.map (fun x => x + n) id) (enumFrom (k + 1) tl) = (n + k, hd) :: enumFrom (n + k + 1) tl\n[PROOFSTEP]\nsimp [IH, add_comm n k, add_assoc, add_left_comm]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nx : α\nxs : List α\n⊢ enumFrom n (x :: xs) = (n, x) :: map (Prod.map succ id) (enumFrom n xs)\n[PROOFSTEP]\nrw [enumFrom_cons, add_comm, ← map_fst_add_enumFrom_eq_enumFrom]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nl : List α\nf : α → β\n⊢ enumFrom n (map f l) = map (Prod.map id f) (enumFrom n l)\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nf : α → β\n⊢ enumFrom n (map f []) = map (Prod.map id f) (enumFrom n [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nf : α → β\nhd : α\ntl : List α\nIH : enumFrom n (map f tl) = map (Prod.map id f) (enumFrom n tl)\n⊢ enumFrom n (map f (hd :: tl)) = map (Prod.map id f) (enumFrom n (hd :: tl))\n[PROOFSTEP]\nrw [map_cons, enumFrom_cons', enumFrom_cons', map_cons, map_map, IH, map_map]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nn : ℕ\nf : α → β\nhd : α\ntl : List α\nIH : enumFrom n (map f tl) = map (Prod.map id f) (enumFrom n tl)\n⊢ (n, f hd) :: map (Prod.map succ id ∘ Prod.map id f) (enumFrom n tl) =\n    Prod.map id f (n, hd) :: map (Prod.map id f ∘ Prod.map succ id) (enumFrom n tl)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : ℕ\ni : Fin (length (enumFrom n l))\n⊢ ↑i < length l\n[PROOFSTEP]\nsimpa [length_enumFrom] using i.2\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : ℕ\ni : Fin (length (enumFrom n l))\nhi : optParam (↑i < length l) (_ : ↑i < length l)\n⊢ get (enumFrom n l) i = (n + ↑i, get l { val := ↑i, isLt := hi })\n[PROOFSTEP]\nrw [← Option.some_inj, ← get?_eq_get]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn : ℕ\ni : Fin (length (enumFrom n l))\nhi : optParam (↑i < length l) (_ : ↑i < length l)\n⊢ get? (enumFrom n l) ↑i = some (n + ↑i, get l { val := ↑i, isLt := hi })\n[PROOFSTEP]\nsimp [enumFrom_get?, get?_eq_get hi]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nn i : ℕ\nhi' : i < length (enumFrom n l)\n⊢ i < length l\n[PROOFSTEP]\nsimpa [length_enumFrom] using hi'\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\ni : Fin (length (enum l))\n⊢ ↑i < length l\n[PROOFSTEP]\nsimpa [length_enum] using i.2\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\ni : Fin (length (enum l))\nhi : optParam (↑i < length l) (_ : ↑i < length l)\n⊢ get (enum l) i = (↑i, get l { val := ↑i, isLt := hi })\n[PROOFSTEP]\nconvert get_enumFrom _ _ i\n[GOAL]\ncase h.e'_3.h.e'_3\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\ni : Fin (length (enum l))\nhi : optParam (↑i < length l) (_ : ↑i < length l)\n⊢ ↑i = 0 + ↑i\n[PROOFSTEP]\nexact (zero_add _).symm\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\ni : ℕ\nhi' : i < length (enum l)\n⊢ i < length l\n[PROOFSTEP]\nsimpa [length_enum] using hi'\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\nas : List α\n⊢ map₂Left' f as [] = (map (fun a => f a none) as, [])\n[PROOFSTEP]\ncases as\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\n⊢ map₂Left' f [] [] = (map (fun a => f a none) [], [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\nhead✝ : α\ntail✝ : List α\n⊢ map₂Left' f (head✝ :: tail✝) [] = (map (fun a => f a none) (head✝ :: tail✝), [])\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : Option α → β → γ\na : α\nas : List α\nb : β\nbs : List β\n⊢ map₂Right' f [] bs = (map (f none) bs, [])\n[PROOFSTEP]\ncases bs\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : Option α → β → γ\na : α\nas : List α\nb : β\n⊢ map₂Right' f [] [] = (map (f none) [], [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : Option α → β → γ\na : α\nas : List α\nb head✝ : β\ntail✝ : List β\n⊢ map₂Right' f [] (head✝ :: tail✝) = (map (f none) (head✝ :: tail✝), [])\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs : List β\n⊢ zipLeft' as [] = (map (fun a => (a, none)) as, [])\n[PROOFSTEP]\ncases as\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nb : β\nbs : List β\n⊢ zipLeft' [] [] = (map (fun a => (a, none)) [], [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nb : β\nbs : List β\nhead✝ : α\ntail✝ : List α\n⊢ zipLeft' (head✝ :: tail✝) [] = (map (fun a => (a, none)) (head✝ :: tail✝), [])\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs : List β\n⊢ zipRight' [] bs = (map (fun b => (none, b)) bs, [])\n[PROOFSTEP]\ncases bs\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\n⊢ zipRight' [] [] = (map (fun b => (none, b)) [], [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb head✝ : β\ntail✝ : List β\n⊢ zipRight' [] (head✝ :: tail✝) = (map (fun b => (none, b)) (head✝ :: tail✝), [])\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\nas : List α\n⊢ map₂Left f as [] = map (fun a => f a none) as\n[PROOFSTEP]\ncases as\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\n⊢ map₂Left f [] [] = map (fun a => f a none) []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\nhead✝ : α\ntail✝ : List α\n⊢ map₂Left f (head✝ :: tail✝) [] = map (fun a => f a none) (head✝ :: tail✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\nas : List α\nx✝ : List β\n⊢ map₂Left f [] x✝ = (map₂Left' f [] x✝).fst\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\nas✝ : List α\na : α\nas : List α\n⊢ map₂Left f (a :: as) [] = (map₂Left' f (a :: as) []).fst\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\nas✝ : List α\na : α\nas : List α\nb : β\nbs : List β\n⊢ map₂Left f (a :: as) (b :: bs) = (map₂Left' f (a :: as) (b :: bs)).fst\n[PROOFSTEP]\nsimp [map₂Left_eq_map₂Left']\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\nas : List α\nx✝ : length [] ≤ length []\n⊢ map₂Left f [] [] = zipWith (fun a b => f a (some b)) [] []\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\nas : List α\nhead✝ : β\ntail✝ : List β\nx✝ : length [] ≤ length (head✝ :: tail✝)\n⊢ map₂Left f [] (head✝ :: tail✝) = zipWith (fun a b => f a (some b)) [] (head✝ :: tail✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\nas✝ : List α\na : α\nas : List α\nh : length (a :: as) ≤ length []\n⊢ map₂Left f (a :: as) [] = zipWith (fun a b => f a (some b)) (a :: as) []\n[PROOFSTEP]\nsimp at h \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\nas✝ : List α\na : α\nas : List α\nb : β\nbs : List β\nh : length (a :: as) ≤ length (b :: bs)\n⊢ map₂Left f (a :: as) (b :: bs) = zipWith (fun a b => f a (some b)) (a :: as) (b :: bs)\n[PROOFSTEP]\nsimp [Nat.succ_le_succ_iff] at h \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : α → Option β → γ\nas✝ : List α\na : α\nas : List α\nb : β\nbs : List β\nh : length as ≤ length bs\n⊢ map₂Left f (a :: as) (b :: bs) = zipWith (fun a b => f a (some b)) (a :: as) (b :: bs)\n[PROOFSTEP]\nsimp [h, map₂Left_eq_zipWith]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : Option α → β → γ\na : α\nas : List α\nb : β\nbs : List β\n⊢ map₂Right f [] bs = map (f none) bs\n[PROOFSTEP]\ncases bs\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : Option α → β → γ\na : α\nas : List α\nb : β\n⊢ map₂Right f [] [] = map (f none) []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : Option α → β → γ\na : α\nas : List α\nb head✝ : β\ntail✝ : List β\n⊢ map₂Right f [] (head✝ :: tail✝) = map (f none) (head✝ :: tail✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : Option α → β → γ\na : α\nas : List α\nb : β\nbs : List β\n⊢ map₂Right f as bs = (map₂Right' f as bs).fst\n[PROOFSTEP]\nsimp only [map₂Right, map₂Right', map₂Left_eq_map₂Left']\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : Option α → β → γ\na : α\nas : List α\nb : β\nbs : List β\nh : length bs ≤ length as\n⊢ map₂Right f as bs = zipWith (fun a b => f (some a) b) as bs\n[PROOFSTEP]\nhave : (fun a b => flip f a (some b)) = flip fun a b => f (some a) b := rfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nf : Option α → β → γ\na : α\nas : List α\nb : β\nbs : List β\nh : length bs ≤ length as\nthis : (fun a b => flip f a (some b)) = flip fun a b => f (some a) b\n⊢ map₂Right f as bs = zipWith (fun a b => f (some a) b) as bs\n[PROOFSTEP]\nsimp only [map₂Right, map₂Left_eq_zipWith, zipWith_flip, *]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs : List β\n⊢ zipLeft as [] = map (fun a => (a, none)) as\n[PROOFSTEP]\ncases as\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nb : β\nbs : List β\n⊢ zipLeft [] [] = map (fun a => (a, none)) []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nb : β\nbs : List β\nhead✝ : α\ntail✝ : List α\n⊢ zipLeft (head✝ :: tail✝) [] = map (fun a => (a, none)) (head✝ :: tail✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas✝ : List α\nb : β\nbs✝ : List β\nas : List α\nbs : List β\n⊢ zipLeft as bs = (zipLeft' as bs).fst\n[PROOFSTEP]\nrw [zipLeft, zipLeft']\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas✝ : List α\nb : β\nbs✝ : List β\nas : List α\nbs : List β\n⊢ zipWithLeft Prod.mk as bs = (zipWithLeft' Prod.mk as bs).fst\n[PROOFSTEP]\ncases as with\n| nil => rfl\n| cons _ atl =>\n  cases bs with\n  | nil => rfl\n  | cons _ btl => rw [zipWithLeft, zipWithLeft', cons_inj]; exact @zipLeft_eq_zipLeft' atl btl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas✝ : List α\nb : β\nbs✝ : List β\nas : List α\nbs : List β\n⊢ zipWithLeft Prod.mk as bs = (zipWithLeft' Prod.mk as bs).fst\n[PROOFSTEP]\ncases as with\n| nil => rfl\n| cons _ atl =>\n  cases bs with\n  | nil => rfl\n  | cons _ btl => rw [zipWithLeft, zipWithLeft', cons_inj]; exact @zipLeft_eq_zipLeft' atl btl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs✝ bs : List β\n⊢ zipWithLeft Prod.mk [] bs = (zipWithLeft' Prod.mk [] bs).fst\n[PROOFSTEP]\n\n| nil => rfl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs✝ bs : List β\n⊢ zipWithLeft Prod.mk [] bs = (zipWithLeft' Prod.mk [] bs).fst\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs✝ bs : List β\nhead✝ : α\natl : List α\n⊢ zipWithLeft Prod.mk (head✝ :: atl) bs = (zipWithLeft' Prod.mk (head✝ :: atl) bs).fst\n[PROOFSTEP]\n\n| cons _ atl =>\n  cases bs with\n  | nil => rfl\n  | cons _ btl => rw [zipWithLeft, zipWithLeft', cons_inj]; exact @zipLeft_eq_zipLeft' atl btl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs✝ bs : List β\nhead✝ : α\natl : List α\n⊢ zipWithLeft Prod.mk (head✝ :: atl) bs = (zipWithLeft' Prod.mk (head✝ :: atl) bs).fst\n[PROOFSTEP]\ncases bs with\n| nil => rfl\n| cons _ btl => rw [zipWithLeft, zipWithLeft', cons_inj]; exact @zipLeft_eq_zipLeft' atl btl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs✝ bs : List β\nhead✝ : α\natl : List α\n⊢ zipWithLeft Prod.mk (head✝ :: atl) bs = (zipWithLeft' Prod.mk (head✝ :: atl) bs).fst\n[PROOFSTEP]\ncases bs with\n| nil => rfl\n| cons _ btl => rw [zipWithLeft, zipWithLeft', cons_inj]; exact @zipLeft_eq_zipLeft' atl btl\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs : List β\nhead✝ : α\natl : List α\n⊢ zipWithLeft Prod.mk (head✝ :: atl) [] = (zipWithLeft' Prod.mk (head✝ :: atl) []).fst\n[PROOFSTEP]\n\n| nil => rfl\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs : List β\nhead✝ : α\natl : List α\n⊢ zipWithLeft Prod.mk (head✝ :: atl) [] = (zipWithLeft' Prod.mk (head✝ :: atl) []).fst\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs : List β\nhead✝¹ : α\natl : List α\nhead✝ : β\nbtl : List β\n⊢ zipWithLeft Prod.mk (head✝¹ :: atl) (head✝ :: btl) = (zipWithLeft' Prod.mk (head✝¹ :: atl) (head✝ :: btl)).fst\n[PROOFSTEP]\n\n| cons _ btl => rw [zipWithLeft, zipWithLeft', cons_inj]; exact @zipLeft_eq_zipLeft' atl btl\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs : List β\nhead✝¹ : α\natl : List α\nhead✝ : β\nbtl : List β\n⊢ zipWithLeft Prod.mk (head✝¹ :: atl) (head✝ :: btl) = (zipWithLeft' Prod.mk (head✝¹ :: atl) (head✝ :: btl)).fst\n[PROOFSTEP]\nrw [zipWithLeft, zipWithLeft', cons_inj]\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs : List β\nhead✝¹ : α\natl : List α\nhead✝ : β\nbtl : List β\n⊢ zipWithLeft Prod.mk atl btl = (zipWithLeft' Prod.mk atl btl).fst\n[PROOFSTEP]\nexact @zipLeft_eq_zipLeft' atl btl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs : List β\n⊢ zipRight [] bs = map (fun b => (none, b)) bs\n[PROOFSTEP]\ncases bs\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\n⊢ zipRight [] [] = map (fun b => (none, b)) []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb head✝ : β\ntail✝ : List β\n⊢ zipRight [] (head✝ :: tail✝) = map (fun b => (none, b)) (head✝ :: tail✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nas : List α\nb : β\nbs : List β\n⊢ zipRight as bs = (zipRight' as bs).fst\n[PROOFSTEP]\ninduction as generalizing bs\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nb : β\nbs : List β\n⊢ zipRight [] bs = (zipRight' [] bs).fst\n[PROOFSTEP]\ncases bs\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nb : β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (bs : List β), zipRight tail✝ bs = (zipRight' tail✝ bs).fst\nbs : List β\n⊢ zipRight (head✝ :: tail✝) bs = (zipRight' (head✝ :: tail✝) bs).fst\n[PROOFSTEP]\ncases bs\n[GOAL]\ncase nil.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nb : β\n⊢ zipRight [] [] = (zipRight' [] []).fst\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase nil.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nb head✝ : β\ntail✝ : List β\n⊢ zipRight [] (head✝ :: tail✝) = (zipRight' [] (head✝ :: tail✝)).fst\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nb : β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (bs : List β), zipRight tail✝ bs = (zipRight' tail✝ bs).fst\n⊢ zipRight (head✝ :: tail✝) [] = (zipRight' (head✝ :: tail✝) []).fst\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\nb : β\nhead✝¹ : α\ntail✝¹ : List α\ntail_ih✝ : ∀ (bs : List β), zipRight tail✝¹ bs = (zipRight' tail✝¹ bs).fst\nhead✝ : β\ntail✝ : List β\n⊢ zipRight (head✝¹ :: tail✝¹) (head✝ :: tail✝) = (zipRight' (head✝¹ :: tail✝¹) (head✝ :: tail✝)).fst\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np q : α → Prop\nl✝ : List α\nx : α\nl : List α\n⊢ All₂ p (x :: l) ↔ ∀ (x_1 : α), x_1 ∈ x :: l → p x_1\n[PROOFSTEP]\nrw [forall_mem_cons, all₂_cons, all₂_iff_forall]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np q : α → Prop\nl✝ : List α\nh : ∀ (x : α), p x → q x\nx : α\nl : List α\n⊢ All₂ p (x :: l) → All₂ q (x :: l)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np q : α → Prop\nl✝ : List α\nh : ∀ (x : α), p x → q x\nx : α\nl : List α\n⊢ p x → All₂ p l → q x ∧ All₂ q l\n[PROOFSTEP]\nrw [← and_imp]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np q : α → Prop\nl✝ : List α\nh : ∀ (x : α), p x → q x\nx : α\nl : List α\n⊢ p x ∧ All₂ p l → q x ∧ All₂ q l\n[PROOFSTEP]\nexact And.imp (h x) (All₂.imp h)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ q : α → Prop\nl : List α\np : β → Prop\nf : α → β\n⊢ All₂ p (map f l) ↔ All₂ (p ∘ f) l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ q : α → Prop\nl : List α\np : β → Prop\nf : α → β\n⊢ All₂ p (map f []) ↔ All₂ (p ∘ f) []\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\np✝ q : α → Prop\nl : List α\np : β → Prop\nf : α → β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : All₂ p (map f tail✝) ↔ All₂ (p ∘ f) tail✝\n⊢ All₂ p (map f (head✝ :: tail✝)) ↔ All₂ (p ∘ f) (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nhl : reverse l ≠ []\n⊢ 0 < length l\n[PROOFSTEP]\ncontrapose! hl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nhl : length l ≤ 0\n⊢ reverse l = []\n[PROOFSTEP]\nsimpa [length_eq_zero] using hl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nhl : reverse l ≠ []\nhl' : optParam (0 < length l) (_ : 0 < length l)\n⊢ getLast (reverse l) hl = get l { val := 0, isLt := hl' }\n[PROOFSTEP]\nrw [getLast_eq_get, get_reverse']\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nhl : reverse l ≠ []\nhl' : optParam (0 < length l) (_ : 0 < length l)\n⊢ get l\n      {\n        val :=\n          length l - 1 - ↑{ val := length (reverse l) - 1, isLt := (_ : length (reverse l) - 1 < length (reverse l)) },\n        isLt := ?hn' } =\n    get l { val := 0, isLt := hl' }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hn'\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nhl : reverse l ≠ []\nhl' : optParam (0 < length l) (_ : 0 < length l)\n⊢ length l - 1 - ↑{ val := length (reverse l) - 1, isLt := (_ : length (reverse l) - 1 < length (reverse l)) } <\n    length l\n[PROOFSTEP]\nsimpa using hl'\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na : α\n⊢ ilast' a [] ∈ [a]\n[PROOFSTEP]\nsimp [ilast']\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ ilast' a (b :: l) ∈ a :: b :: l\n[PROOFSTEP]\nrw [mem_cons]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ ilast' a (b :: l) = a ∨ ilast' a (b :: l) ∈ b :: l\n[PROOFSTEP]\nexact Or.inr (ilast'_mem b l)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni : Fin (length (attach L))\n⊢ ↑i < length (map Subtype.val (attach L))\n[PROOFSTEP]\nsimpa using i.2\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni : Fin (length (attach L))\n⊢ ↑(get (attach L) i) =\n    get (map Subtype.val (attach L)) { val := ↑i, isLt := (_ : ↑i < length (map Subtype.val (attach L))) }\n[PROOFSTEP]\nrw [get_map]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni : Fin (length (attach L))\n⊢ get (map Subtype.val (attach L)) { val := ↑i, isLt := (_ : ↑i < length (map Subtype.val (attach L))) } =\n    get L { val := ↑i, isLt := (_ : ↑i < length L) }\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.e_2.h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni : Fin (length (attach L))\n⊢ map Subtype.val (attach L) = L\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e_3.e_1\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni : Fin (length (attach L))\n⊢ length (map Subtype.val (attach L)) = length L\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e_3.e_3\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ L : List α\ni : Fin (length (attach L))\n⊢ HEq (_ : ↑i < length (map Subtype.val (attach L))) (_ : ↑i < length L)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ny : β\nxs : List (α × β)\n⊢ (y, x) ∈ map Prod.swap xs ↔ (x, y) ∈ xs\n[PROOFSTEP]\ninduction' xs with x xs xs_ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ny : β\n⊢ (y, x) ∈ map Prod.swap [] ↔ (x, y) ∈ []\n[PROOFSTEP]\nsimp only [not_mem_nil, map_nil]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx✝ : α\ny : β\nx : α × β\nxs : List (α × β)\nxs_ih : (y, x✝) ∈ map Prod.swap xs ↔ (x✝, y) ∈ xs\n⊢ (y, x✝) ∈ map Prod.swap (x :: xs) ↔ (x✝, y) ∈ x :: xs\n[PROOFSTEP]\ncases' x with a b\n[GOAL]\ncase cons.mk\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nx : α\ny : β\nxs : List (α × β)\nxs_ih : (y, x) ∈ map Prod.swap xs ↔ (x, y) ∈ xs\na : α\nb : β\n⊢ (y, x) ∈ map Prod.swap ((a, b) :: xs) ↔ (x, y) ∈ (a, b) :: xs\n[PROOFSTEP]\nsimp only [mem_cons, Prod.mk.inj_iff, map, Prod.swap_prod_mk, Prod.exists, xs_ih, and_comm]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ xs : List α\nn m : ℕ\n⊢ dropSlice n m xs = take n xs ++ drop (n + m) xs\n[PROOFSTEP]\ninduction n generalizing xs\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : ℕ\nxs : List α\n⊢ dropSlice zero m xs = take zero xs ++ drop (zero + m) xs\n[PROOFSTEP]\ncases xs\n[GOAL]\ncase zero.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : ℕ\n⊢ dropSlice zero m [] = take zero [] ++ drop (zero + m) []\n[PROOFSTEP]\nsimp [dropSlice]\n[GOAL]\ncase zero.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm : ℕ\nhead✝ : α\ntail✝ : List α\n⊢ dropSlice zero m (head✝ :: tail✝) = take zero (head✝ :: tail✝) ++ drop (zero + m) (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [dropSlice]\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm n✝ : ℕ\nn_ih✝ : ∀ (xs : List α), dropSlice n✝ m xs = take n✝ xs ++ drop (n✝ + m) xs\nxs : List α\n⊢ dropSlice (succ n✝) m xs = take (succ n✝) xs ++ drop (succ n✝ + m) xs\n[PROOFSTEP]\ncases xs\n[GOAL]\ncase succ.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm n✝ : ℕ\nn_ih✝ : ∀ (xs : List α), dropSlice n✝ m xs = take n✝ xs ++ drop (n✝ + m) xs\n⊢ dropSlice (succ n✝) m [] = take (succ n✝) [] ++ drop (succ n✝ + m) []\n[PROOFSTEP]\nsimp [dropSlice, *, Nat.succ_add]\n[GOAL]\ncase succ.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\nm n✝ : ℕ\nn_ih✝ : ∀ (xs : List α), dropSlice n✝ m xs = take n✝ xs ++ drop (n✝ + m) xs\nhead✝ : α\ntail✝ : List α\n⊢ dropSlice (succ n✝) m (head✝ :: tail✝) = take (succ n✝) (head✝ :: tail✝) ++ drop (succ n✝ + m) (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [dropSlice, *, Nat.succ_add]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\ni j : ℕ\nhj : 0 < j\nxs : List α\nhi : i < length xs\n⊢ sizeOf (dropSlice i j xs) < sizeOf xs\n[PROOFSTEP]\ninduction xs generalizing i j hj with\n| nil => cases hi\n| cons x xs xs_ih =>\n  cases i <;> simp only [List.dropSlice]\n  ·\n    cases j with\n    | zero => contradiction\n    | succ n =>\n      dsimp only [drop]; apply @lt_of_le_of_lt _ _ _ (sizeOf xs)\n      induction xs generalizing n with\n      | nil => rw [drop_nil]\n      | cons _ xs_tl =>\n        cases n\n        · simp\n        · simp [drop]\n          rw [← Nat.zero_add (sizeOf (drop _ xs_tl))]\n          exact Nat.add_le_add (Nat.zero_le _) (drop_sizeOf_le xs_tl _)\n      · simp\n  · simp\n    apply xs_ih _ j hj\n    apply lt_of_succ_lt_succ hi\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\ni j : ℕ\nhj : 0 < j\nxs : List α\nhi : i < length xs\n⊢ sizeOf (dropSlice i j xs) < sizeOf xs\n[PROOFSTEP]\ninduction xs generalizing i j hj with\n| nil => cases hi\n| cons x xs xs_ih =>\n  cases i <;> simp only [List.dropSlice]\n  ·\n    cases j with\n    | zero => contradiction\n    | succ n =>\n      dsimp only [drop]; apply @lt_of_le_of_lt _ _ _ (sizeOf xs)\n      induction xs generalizing n with\n      | nil => rw [drop_nil]\n      | cons _ xs_tl =>\n        cases n\n        · simp\n        · simp [drop]\n          rw [← Nat.zero_add (sizeOf (drop _ xs_tl))]\n          exact Nat.add_le_add (Nat.zero_le _) (drop_sizeOf_le xs_tl _)\n      · simp\n  · simp\n    apply xs_ih _ j hj\n    apply lt_of_succ_lt_succ hi\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\ni j : ℕ\nhj : 0 < j\nhi : i < length []\n⊢ sizeOf (dropSlice i j []) < sizeOf []\n[PROOFSTEP]\n\n| nil => cases hi\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\ni j : ℕ\nhj : 0 < j\nhi : i < length []\n⊢ sizeOf (dropSlice i j []) < sizeOf []\n[PROOFSTEP]\ncases hi\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\ni j : ℕ\nhj : 0 < j\nhi : i < length (x :: xs)\n⊢ sizeOf (dropSlice i j (x :: xs)) < sizeOf (x :: xs)\n[PROOFSTEP]\n\n| cons x xs xs_ih =>\n  cases i <;> simp only [List.dropSlice]\n  ·\n    cases j with\n    | zero => contradiction\n    | succ n =>\n      dsimp only [drop]; apply @lt_of_le_of_lt _ _ _ (sizeOf xs)\n      induction xs generalizing n with\n      | nil => rw [drop_nil]\n      | cons _ xs_tl =>\n        cases n\n        · simp\n        · simp [drop]\n          rw [← Nat.zero_add (sizeOf (drop _ xs_tl))]\n          exact Nat.add_le_add (Nat.zero_le _) (drop_sizeOf_le xs_tl _)\n      · simp\n  · simp\n    apply xs_ih _ j hj\n    apply lt_of_succ_lt_succ hi\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\ni j : ℕ\nhj : 0 < j\nhi : i < length (x :: xs)\n⊢ sizeOf (dropSlice i j (x :: xs)) < sizeOf (x :: xs)\n[PROOFSTEP]\ncases i\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nj : ℕ\nhj : 0 < j\nhi : zero < length (x :: xs)\n⊢ sizeOf (dropSlice zero j (x :: xs)) < sizeOf (x :: xs)\n[PROOFSTEP]\nsimp only [List.dropSlice]\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nj : ℕ\nhj : 0 < j\nn✝ : ℕ\nhi : succ n✝ < length (x :: xs)\n⊢ sizeOf (dropSlice (succ n✝) j (x :: xs)) < sizeOf (x :: xs)\n[PROOFSTEP]\nsimp only [List.dropSlice]\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nj : ℕ\nhj : 0 < j\nhi : zero < length (x :: xs)\n⊢ sizeOf (drop j (x :: xs)) < sizeOf (x :: xs)\n[PROOFSTEP]\ncases j with\n| zero => contradiction\n| succ n =>\n  dsimp only [drop]; apply @lt_of_le_of_lt _ _ _ (sizeOf xs)\n  induction xs generalizing n with\n  | nil => rw [drop_nil]\n  | cons _ xs_tl =>\n    cases n\n    · simp\n    · simp [drop]\n      rw [← Nat.zero_add (sizeOf (drop _ xs_tl))]\n      exact Nat.add_le_add (Nat.zero_le _) (drop_sizeOf_le xs_tl _)\n  · simp\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nj : ℕ\nhj : 0 < j\nhi : zero < length (x :: xs)\n⊢ sizeOf (drop j (x :: xs)) < sizeOf (x :: xs)\n[PROOFSTEP]\ncases j with\n| zero => contradiction\n| succ n =>\n  dsimp only [drop]; apply @lt_of_le_of_lt _ _ _ (sizeOf xs)\n  induction xs generalizing n with\n  | nil => rw [drop_nil]\n  | cons _ xs_tl =>\n    cases n\n    · simp\n    · simp [drop]\n      rw [← Nat.zero_add (sizeOf (drop _ xs_tl))]\n      exact Nat.add_le_add (Nat.zero_le _) (drop_sizeOf_le xs_tl _)\n  · simp\n[GOAL]\ncase cons.zero.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nhi : zero < length (x :: xs)\nhj : 0 < zero\n⊢ sizeOf (drop zero (x :: xs)) < sizeOf (x :: xs)\n[PROOFSTEP]\n\n| zero => contradiction\n[GOAL]\ncase cons.zero.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nhi : zero < length (x :: xs)\nhj : 0 < zero\n⊢ sizeOf (drop zero (x :: xs)) < sizeOf (x :: xs)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons.zero.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nhi : zero < length (x :: xs)\nn : ℕ\nhj : 0 < succ n\n⊢ sizeOf (drop (succ n) (x :: xs)) < sizeOf (x :: xs)\n[PROOFSTEP]\n\n| succ n =>\n  dsimp only [drop]; apply @lt_of_le_of_lt _ _ _ (sizeOf xs)\n  induction xs generalizing n with\n  | nil => rw [drop_nil]\n  | cons _ xs_tl =>\n    cases n\n    · simp\n    · simp [drop]\n      rw [← Nat.zero_add (sizeOf (drop _ xs_tl))]\n      exact Nat.add_le_add (Nat.zero_le _) (drop_sizeOf_le xs_tl _)\n  · simp\n[GOAL]\ncase cons.zero.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nhi : zero < length (x :: xs)\nn : ℕ\nhj : 0 < succ n\n⊢ sizeOf (drop (succ n) (x :: xs)) < sizeOf (x :: xs)\n[PROOFSTEP]\ndsimp only [drop]\n[GOAL]\ncase cons.zero.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nhi : zero < length (x :: xs)\nn : ℕ\nhj : 0 < succ n\n⊢ sizeOf (drop n xs) < sizeOf (x :: xs)\n[PROOFSTEP]\napply @lt_of_le_of_lt _ _ _ (sizeOf xs)\n[GOAL]\ncase cons.zero.succ.a\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nhi : zero < length (x :: xs)\nn : ℕ\nhj : 0 < succ n\n⊢ sizeOf (drop n xs) ≤ sizeOf xs\ncase cons.zero.succ.a\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nhi : zero < length (x :: xs)\nn : ℕ\nhj : 0 < succ n\n⊢ sizeOf xs < sizeOf (x :: xs)\n[PROOFSTEP]\ninduction xs generalizing n with\n| nil => rw [drop_nil]\n| cons _ xs_tl =>\n  cases n\n  · simp\n  · simp [drop]\n    rw [← Nat.zero_add (sizeOf (drop _ xs_tl))]\n    exact Nat.add_le_add (Nat.zero_le _) (drop_sizeOf_le xs_tl _)\n[GOAL]\ncase cons.zero.succ.a\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nhi : zero < length (x :: xs)\nn : ℕ\nhj : 0 < succ n\n⊢ sizeOf (drop n xs) ≤ sizeOf xs\n[PROOFSTEP]\ninduction xs generalizing n with\n| nil => rw [drop_nil]\n| cons _ xs_tl =>\n  cases n\n  · simp\n  · simp [drop]\n    rw [← Nat.zero_add (sizeOf (drop _ xs_tl))]\n    exact Nat.add_le_add (Nat.zero_le _) (drop_sizeOf_le xs_tl _)\n[GOAL]\ncase cons.zero.succ.a.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length [] → sizeOf (dropSlice i j []) < sizeOf []\nhi : zero < length [x]\nn : ℕ\nhj : 0 < succ n\n⊢ sizeOf (drop n []) ≤ sizeOf []\n[PROOFSTEP]\n\n| nil => rw [drop_nil]\n[GOAL]\ncase cons.zero.succ.a.nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length [] → sizeOf (dropSlice i j []) < sizeOf []\nhi : zero < length [x]\nn : ℕ\nhj : 0 < succ n\n⊢ sizeOf (drop n []) ≤ sizeOf []\n[PROOFSTEP]\nrw [drop_nil]\n[GOAL]\ncase cons.zero.succ.a.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx head✝ : α\nxs_tl : List α\ntail_ih✝ :\n  (∀ (i j : ℕ), 0 < j → i < length xs_tl → sizeOf (dropSlice i j xs_tl) < sizeOf xs_tl) →\n    zero < length (x :: xs_tl) → ∀ (n : ℕ), 0 < succ n → sizeOf (drop n xs_tl) ≤ sizeOf xs_tl\nxs_ih :\n  ∀ (i j : ℕ), 0 < j → i < length (head✝ :: xs_tl) → sizeOf (dropSlice i j (head✝ :: xs_tl)) < sizeOf (head✝ :: xs_tl)\nhi : zero < length (x :: head✝ :: xs_tl)\nn : ℕ\nhj : 0 < succ n\n⊢ sizeOf (drop n (head✝ :: xs_tl)) ≤ sizeOf (head✝ :: xs_tl)\n[PROOFSTEP]\n\n| cons _ xs_tl =>\n  cases n\n  · simp\n  · simp [drop]\n    rw [← Nat.zero_add (sizeOf (drop _ xs_tl))]\n    exact Nat.add_le_add (Nat.zero_le _) (drop_sizeOf_le xs_tl _)\n[GOAL]\ncase cons.zero.succ.a.cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx head✝ : α\nxs_tl : List α\ntail_ih✝ :\n  (∀ (i j : ℕ), 0 < j → i < length xs_tl → sizeOf (dropSlice i j xs_tl) < sizeOf xs_tl) →\n    zero < length (x :: xs_tl) → ∀ (n : ℕ), 0 < succ n → sizeOf (drop n xs_tl) ≤ sizeOf xs_tl\nxs_ih :\n  ∀ (i j : ℕ), 0 < j → i < length (head✝ :: xs_tl) → sizeOf (dropSlice i j (head✝ :: xs_tl)) < sizeOf (head✝ :: xs_tl)\nhi : zero < length (x :: head✝ :: xs_tl)\nn : ℕ\nhj : 0 < succ n\n⊢ sizeOf (drop n (head✝ :: xs_tl)) ≤ sizeOf (head✝ :: xs_tl)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero.succ.a.cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx head✝ : α\nxs_tl : List α\ntail_ih✝ :\n  (∀ (i j : ℕ), 0 < j → i < length xs_tl → sizeOf (dropSlice i j xs_tl) < sizeOf xs_tl) →\n    zero < length (x :: xs_tl) → ∀ (n : ℕ), 0 < succ n → sizeOf (drop n xs_tl) ≤ sizeOf xs_tl\nxs_ih :\n  ∀ (i j : ℕ), 0 < j → i < length (head✝ :: xs_tl) → sizeOf (dropSlice i j (head✝ :: xs_tl)) < sizeOf (head✝ :: xs_tl)\nhi : zero < length (x :: head✝ :: xs_tl)\nhj : 0 < succ zero\n⊢ sizeOf (drop zero (head✝ :: xs_tl)) ≤ sizeOf (head✝ :: xs_tl)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.zero.succ.a.cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx head✝ : α\nxs_tl : List α\ntail_ih✝ :\n  (∀ (i j : ℕ), 0 < j → i < length xs_tl → sizeOf (dropSlice i j xs_tl) < sizeOf xs_tl) →\n    zero < length (x :: xs_tl) → ∀ (n : ℕ), 0 < succ n → sizeOf (drop n xs_tl) ≤ sizeOf xs_tl\nxs_ih :\n  ∀ (i j : ℕ), 0 < j → i < length (head✝ :: xs_tl) → sizeOf (dropSlice i j (head✝ :: xs_tl)) < sizeOf (head✝ :: xs_tl)\nhi : zero < length (x :: head✝ :: xs_tl)\nn✝ : ℕ\nhj : 0 < succ (succ n✝)\n⊢ sizeOf (drop (succ n✝) (head✝ :: xs_tl)) ≤ sizeOf (head✝ :: xs_tl)\n[PROOFSTEP]\nsimp [drop]\n[GOAL]\ncase cons.zero.succ.a.cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx head✝ : α\nxs_tl : List α\ntail_ih✝ :\n  (∀ (i j : ℕ), 0 < j → i < length xs_tl → sizeOf (dropSlice i j xs_tl) < sizeOf xs_tl) →\n    zero < length (x :: xs_tl) → ∀ (n : ℕ), 0 < succ n → sizeOf (drop n xs_tl) ≤ sizeOf xs_tl\nxs_ih :\n  ∀ (i j : ℕ), 0 < j → i < length (head✝ :: xs_tl) → sizeOf (dropSlice i j (head✝ :: xs_tl)) < sizeOf (head✝ :: xs_tl)\nhi : zero < length (x :: head✝ :: xs_tl)\nn✝ : ℕ\nhj : 0 < succ (succ n✝)\n⊢ sizeOf (drop n✝ xs_tl) ≤ 1 + sizeOf head✝ + sizeOf xs_tl\n[PROOFSTEP]\nrw [← Nat.zero_add (sizeOf (drop _ xs_tl))]\n[GOAL]\ncase cons.zero.succ.a.cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx head✝ : α\nxs_tl : List α\ntail_ih✝ :\n  (∀ (i j : ℕ), 0 < j → i < length xs_tl → sizeOf (dropSlice i j xs_tl) < sizeOf xs_tl) →\n    zero < length (x :: xs_tl) → ∀ (n : ℕ), 0 < succ n → sizeOf (drop n xs_tl) ≤ sizeOf xs_tl\nxs_ih :\n  ∀ (i j : ℕ), 0 < j → i < length (head✝ :: xs_tl) → sizeOf (dropSlice i j (head✝ :: xs_tl)) < sizeOf (head✝ :: xs_tl)\nhi : zero < length (x :: head✝ :: xs_tl)\nn✝ : ℕ\nhj : 0 < succ (succ n✝)\n⊢ 0 + sizeOf (drop n✝ xs_tl) ≤ 1 + sizeOf head✝ + sizeOf xs_tl\n[PROOFSTEP]\nexact Nat.add_le_add (Nat.zero_le _) (drop_sizeOf_le xs_tl _)\n[GOAL]\ncase cons.zero.succ.a\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nhi : zero < length (x :: xs)\nn : ℕ\nhj : 0 < succ n\n⊢ sizeOf xs < sizeOf (x :: xs)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nj : ℕ\nhj : 0 < j\nn✝ : ℕ\nhi : succ n✝ < length (x :: xs)\n⊢ sizeOf (x :: dropSlice n✝ j xs) < sizeOf (x :: xs)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nj : ℕ\nhj : 0 < j\nn✝ : ℕ\nhi : succ n✝ < length (x :: xs)\n⊢ sizeOf (dropSlice n✝ j xs) < sizeOf xs\n[PROOFSTEP]\napply xs_ih _ j hj\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : SizeOf α\nx : α\nxs : List α\nxs_ih : ∀ (i j : ℕ), 0 < j → i < length xs → sizeOf (dropSlice i j xs) < sizeOf xs\nj : ℕ\nhj : 0 < j\nn✝ : ℕ\nhi : succ n✝ < length (x :: xs)\n⊢ n✝ < length xs\n[PROOFSTEP]\napply lt_of_succ_lt_succ hi\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝ n : ℕ\nhn : n < length l\n⊢ getD l n d = get l { val := n, isLt := hn }\n[PROOFSTEP]\ninduction' l with hd tl IH generalizing n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝¹ n✝ : ℕ\nhn✝ : n✝ < length l\nn : ℕ\nhn : n < length []\n⊢ getD [] n d = get [] { val := n, isLt := hn }\n[PROOFSTEP]\nexact absurd hn (not_lt_of_ge (Nat.zero_le _))\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝¹ n✝ : ℕ\nhn✝ : n✝ < length l\nhd : α\ntl : List α\nIH : ∀ {n : ℕ} (hn : n < length tl), getD tl n d = get tl { val := n, isLt := hn }\nn : ℕ\nhn : n < length (hd :: tl)\n⊢ getD (hd :: tl) n d = get (hd :: tl) { val := n, isLt := hn }\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝ n : ℕ\nhn✝ : n < length l\nhd : α\ntl : List α\nIH : ∀ {n : ℕ} (hn : n < length tl), getD tl n d = get tl { val := n, isLt := hn }\nhn : zero < length (hd :: tl)\n⊢ getD (hd :: tl) zero d = get (hd :: tl) { val := zero, isLt := hn }\n[PROOFSTEP]\nexact getD_cons_zero _ _ _\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝¹ n : ℕ\nhn✝ : n < length l\nhd : α\ntl : List α\nIH : ∀ {n : ℕ} (hn : n < length tl), getD tl n d = get tl { val := n, isLt := hn }\nn✝ : ℕ\nhn : succ n✝ < length (hd :: tl)\n⊢ getD (hd :: tl) (succ n✝) d = get (hd :: tl) { val := succ n✝, isLt := hn }\n[PROOFSTEP]\nexact IH _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝ n : ℕ\nhn : length l ≤ n\n⊢ getD l n d = d\n[PROOFSTEP]\ninduction' l with hd tl IH generalizing n\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝¹ n✝ : ℕ\nhn✝ : length l ≤ n✝\nn : ℕ\nhn : length [] ≤ n\n⊢ getD [] n d = d\n[PROOFSTEP]\nexact getD_nil _ _\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝¹ n✝ : ℕ\nhn✝ : length l ≤ n✝\nhd : α\ntl : List α\nIH : ∀ {n : ℕ}, length tl ≤ n → getD tl n d = d\nn : ℕ\nhn : length (hd :: tl) ≤ n\n⊢ getD (hd :: tl) n d = d\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝ n : ℕ\nhn✝ : length l ≤ n\nhd : α\ntl : List α\nIH : ∀ {n : ℕ}, length tl ≤ n → getD tl n d = d\nhn : length (hd :: tl) ≤ zero\n⊢ getD (hd :: tl) zero d = d\n[PROOFSTEP]\nrefine' absurd (Nat.zero_lt_succ _) (not_lt_of_ge hn)\n[GOAL]\ncase cons.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝¹ n : ℕ\nhn✝ : length l ≤ n\nhd : α\ntl : List α\nIH : ∀ {n : ℕ}, length tl ≤ n → getD tl n d = d\nn✝ : ℕ\nhn : length (hd :: tl) ≤ succ n✝\n⊢ getD (hd :: tl) (succ n✝) d = d\n[PROOFSTEP]\nexact IH (Nat.le_of_succ_le_succ hn)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝ n : ℕ\n⊢ getD [d] n d = d\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn : ℕ\n⊢ getD [d] zero d = d\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn n✝ : ℕ\n⊢ getD [d] (succ n✝) d = d\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝ r n : ℕ\n⊢ getD (replicate r d) n d = d\n[PROOFSTEP]\ninduction' r with r IH generalizing n\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝¹ n✝ n : ℕ\n⊢ getD (replicate zero d) n d = d\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝¹ n✝ r : ℕ\nIH : ∀ (n : ℕ), getD (replicate r d) n d = d\nn : ℕ\n⊢ getD (replicate (succ r) d) n d = d\n[PROOFSTEP]\ncases n\n[GOAL]\ncase succ.zero\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝ n r : ℕ\nIH : ∀ (n : ℕ), getD (replicate r d) n d = d\n⊢ getD (replicate (succ r) d) zero d = d\n[PROOFSTEP]\nsimp [IH]\n[GOAL]\ncase succ.succ\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝¹ n r : ℕ\nIH : ∀ (n : ℕ), getD (replicate r d) n d = d\nn✝ : ℕ\n⊢ getD (replicate (succ r) d) (succ n✝) d = d\n[PROOFSTEP]\nsimp [IH]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nx : α\nxs : List α\nd✝ : α\nn✝ : ℕ\nl l' : List α\nd : α\nn : ℕ\nh : n < length l\nh' : optParam (n < length (l ++ l')) (_ : n < length (l ++ l'))\n⊢ getD (l ++ l') n d = getD l n d\n[PROOFSTEP]\nrw [getD_eq_get _ _ h', get_append _ h, getD_eq_get]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nx : α\nxs : List α\nd✝ : α\nn✝ : ℕ\nl l' : List α\nd : α\nn : ℕ\nh : length l ≤ n\n⊢ getD (l ++ l') n d = getD l' (n - length l) d\n[PROOFSTEP]\ncases' lt_or_le n (l ++ l').length with h' h'\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nx : α\nxs : List α\nd✝ : α\nn✝ : ℕ\nl l' : List α\nd : α\nn : ℕ\nh : length l ≤ n\nh' : n < length (l ++ l')\n⊢ getD (l ++ l') n d = getD l' (n - length l) d\n[PROOFSTEP]\nrw [getD_eq_get (l ++ l') d h', get_append_right, getD_eq_get]\n[GOAL]\ncase inl.hn\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nx : α\nxs : List α\nd✝ : α\nn✝ : ℕ\nl l' : List α\nd : α\nn : ℕ\nh : length l ≤ n\nh' : n < length (l ++ l')\n⊢ n - length l < length l'\n[PROOFSTEP]\nrw [length_append] at h' \n[GOAL]\ncase inl.hn\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nx : α\nxs : List α\nd✝ : α\nn✝ : ℕ\nl l' : List α\nd : α\nn : ℕ\nh : length l ≤ n\nh' : n < length l + length l'\n⊢ n - length l < length l'\n[PROOFSTEP]\nexact Nat.sub_lt_left_of_lt_add h h'\n[GOAL]\ncase inl.h\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nx : α\nxs : List α\nd✝ : α\nn✝ : ℕ\nl l' : List α\nd : α\nn : ℕ\nh : length l ≤ n\nh' : n < length (l ++ l')\n⊢ ¬n < length l\n[PROOFSTEP]\nexact not_lt_of_le h\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nx : α\nxs : List α\nd✝ : α\nn✝ : ℕ\nl l' : List α\nd : α\nn : ℕ\nh : length l ≤ n\nh' : length (l ++ l') ≤ n\n⊢ getD (l ++ l') n d = getD l' (n - length l) d\n[PROOFSTEP]\nrw [getD_eq_default _ _ h', getD_eq_default]\n[GOAL]\ncase inr.hn\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l✝ : List α\nx : α\nxs : List α\nd✝ : α\nn✝ : ℕ\nl l' : List α\nd : α\nn : ℕ\nh : length l ≤ n\nh' : length (l ++ l') ≤ n\n⊢ length l' ≤ n - length l\n[PROOFSTEP]\nrwa [le_tsub_iff_left h, ← length_append]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝ n : ℕ\n⊢ getD l n d = Option.getD (get? l n) d\n[PROOFSTEP]\ncases' lt_or_le n l.length with h h\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝ n : ℕ\nh : n < length l\n⊢ getD l n d = Option.getD (get? l n) d\n[PROOFSTEP]\nrw [getD_eq_get _ _ h, get?_eq_get h, Option.getD_some]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ l : List α\nx : α\nxs : List α\nd : α\nn✝ n : ℕ\nh : length l ≤ n\n⊢ getD l n d = Option.getD (get? l n) d\n[PROOFSTEP]\nrw [getD_eq_default _ _ h, get?_eq_none.mpr h, Option.getD_none]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nl : List α\nx : α\nxs : List α\nn✝ n : ℕ\n⊢ getI l n = Option.iget (get? l n)\n[PROOFSTEP]\nrw [← getD_default_eq_getI, getD_eq_getD_get?, Option.getD_default_eq_iget]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nl : List α\nx : α\nxs : List α\nn : ℕ\n⊢ getI l 0 = headI l\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nx : α\nxs : List α\nn : ℕ\n⊢ getI [] 0 = headI []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\nl₁ l₂ : List α\ninst✝ : Inhabited α\nx : α\nxs : List α\nn : ℕ\nhead✝ : α\ntail✝ : List α\n⊢ getI (head✝ :: tail✝) 0 = headI (head✝ :: tail✝)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Basic", "llama_tokens": 216394, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947290421275, "lm_q2_score": 0.6039318337259583, "lm_q1q2_score": 0.3955117746078767}}
{"text": "[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.598, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\nf : A ⟶ X\ng : B ⟶ Y\nsq : CommSq f i p g\nhip : HasLiftingProperty i p\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\napply hip.sq_hasLift\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\nh : HasLiftingProperty i p\nf : Opposite.op Y ⟶ Opposite.op B\ng : Opposite.op X ⟶ Opposite.op A\nsq : CommSq f p.op i.op g\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nsimp only [CommSq.HasLift.iff_unop, Quiver.Hom.unop_op]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\nh : HasLiftingProperty i p\nf : Opposite.op Y ⟶ Opposite.op B\ng : Opposite.op X ⟶ Opposite.op A\nsq : CommSq f p.op i.op g\n⊢ CommSq.HasLift (_ : CommSq g.unop i p f.unop)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B' X✝ Y✝ Y' : C\ni✝ : A✝ ⟶ B✝\ni' : B✝ ⟶ B'\np✝ : X✝ ⟶ Y✝\np' : Y✝ ⟶ Y'\nA B X Y : Cᵒᵖ\ni : A ⟶ B\np : X ⟶ Y\nh : HasLiftingProperty i p\nf : Y.unop ⟶ B.unop\ng : X.unop ⟶ A.unop\nsq : CommSq f p.unop i.unop g\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nrw [CommSq.HasLift.iff_op]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B' X✝ Y✝ Y' : C\ni✝ : A✝ ⟶ B✝\ni' : B✝ ⟶ B'\np✝ : X✝ ⟶ Y✝\np' : Y✝ ⟶ Y'\nA B X Y : Cᵒᵖ\ni : A ⟶ B\np : X ⟶ Y\nh : HasLiftingProperty i p\nf : Y.unop ⟶ B.unop\ng : X.unop ⟶ A.unop\nsq : CommSq f p.unop i.unop g\n⊢ CommSq.HasLift (_ : CommSq g.op i.unop.op p.unop.op f.op)\n[PROOFSTEP]\nsimp only [Quiver.Hom.op_unop]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B' X✝ Y✝ Y' : C\ni✝ : A✝ ⟶ B✝\ni' : B✝ ⟶ B'\np✝ : X✝ ⟶ Y✝\np' : Y✝ ⟶ Y'\nA B X Y : Cᵒᵖ\ni : A ⟶ B\np : X ⟶ Y\nh : HasLiftingProperty i p\nf : Y.unop ⟶ B.unop\ng : X.unop ⟶ A.unop\nsq : CommSq f p.unop i.unop g\n⊢ CommSq.HasLift (_ : CommSq g.op i p f.op)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.3772, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝ : IsIso i\nf : A ⟶ X\ng : B ⟶ Y\nsq : CommSq f i p g\n⊢ i ≫ inv i ≫ f = f\n[PROOFSTEP]\nsimp only [IsIso.hom_inv_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.3772, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝ : IsIso i\nf : A ⟶ X\ng : B ⟶ Y\nsq : CommSq f i p g\n⊢ (inv i ≫ f) ≫ p = g\n[PROOFSTEP]\nsimp only [sq.w, assoc, IsIso.inv_hom_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.4638, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝ : IsIso p\nf : A ⟶ X\ng : B ⟶ Y\nsq : CommSq f i p g\n⊢ i ≫ g ≫ inv p = f\n[PROOFSTEP]\nsimp only [← sq.w_assoc, IsIso.hom_inv_id, comp_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.4638, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝ : IsIso p\nf : A ⟶ X\ng : B ⟶ Y\nsq : CommSq f i p g\n⊢ (g ≫ inv p) ≫ p = g\n[PROOFSTEP]\nsimp only [assoc, IsIso.inv_hom_id, comp_id]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.5681, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝¹ : HasLiftingProperty i p\ninst✝ : HasLiftingProperty i' p\nf : A ⟶ X\ng : B' ⟶ Y\nsq : CommSq f (i ≫ i') p g\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nhave fac := sq.w\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.5681, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝¹ : HasLiftingProperty i p\ninst✝ : HasLiftingProperty i' p\nf : A ⟶ X\ng : B' ⟶ Y\nsq : CommSq f (i ≫ i') p g\nfac : f ≫ p = (i ≫ i') ≫ g\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nrw [assoc] at fac \n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.5681, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝¹ : HasLiftingProperty i p\ninst✝ : HasLiftingProperty i' p\nf : A ⟶ X\ng : B' ⟶ Y\nsq : CommSq f (i ≫ i') p g\nfac : f ≫ p = i ≫ i' ≫ g\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nexact\n  CommSq.HasLift.mk'\n    { l := (CommSq.mk (CommSq.mk fac).fac_right).lift\n      fac_left := by simp only [assoc, CommSq.fac_left]\n      fac_right := by simp only [CommSq.fac_right] }\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.5681, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝¹ : HasLiftingProperty i p\ninst✝ : HasLiftingProperty i' p\nf : A ⟶ X\ng : B' ⟶ Y\nsq : CommSq f (i ≫ i') p g\nfac : f ≫ p = i ≫ i' ≫ g\n⊢ (i ≫ i') ≫ CommSq.lift (_ : CommSq (CommSq.lift (_ : CommSq f i p (i' ≫ g))) i' p g) = f\n[PROOFSTEP]\nsimp only [assoc, CommSq.fac_left]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.5681, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝¹ : HasLiftingProperty i p\ninst✝ : HasLiftingProperty i' p\nf : A ⟶ X\ng : B' ⟶ Y\nsq : CommSq f (i ≫ i') p g\nfac : f ≫ p = i ≫ i' ≫ g\n⊢ CommSq.lift (_ : CommSq (CommSq.lift (_ : CommSq f i p (i' ≫ g))) i' p g) ≫ p = g\n[PROOFSTEP]\nsimp only [CommSq.fac_right]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.7264, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝¹ : HasLiftingProperty i p\ninst✝ : HasLiftingProperty i p'\nf : A ⟶ X\ng : B ⟶ Y'\nsq : CommSq f i (p ≫ p') g\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nhave fac := sq.w\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.7264, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝¹ : HasLiftingProperty i p\ninst✝ : HasLiftingProperty i p'\nf : A ⟶ X\ng : B ⟶ Y'\nsq : CommSq f i (p ≫ p') g\nfac : f ≫ p ≫ p' = i ≫ g\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nrw [← assoc] at fac \n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.7264, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝¹ : HasLiftingProperty i p\ninst✝ : HasLiftingProperty i p'\nf : A ⟶ X\ng : B ⟶ Y'\nsq : CommSq f i (p ≫ p') g\nfac : (f ≫ p) ≫ p' = i ≫ g\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nlet _ := (CommSq.mk (CommSq.mk fac).fac_left.symm).lift\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.7264, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝¹ : HasLiftingProperty i p\ninst✝ : HasLiftingProperty i p'\nf : A ⟶ X\ng : B ⟶ Y'\nsq : CommSq f i (p ≫ p') g\nfac : (f ≫ p) ≫ p' = i ≫ g\nx✝ : B ⟶ X := CommSq.lift (_ : CommSq f i p (CommSq.lift (_ : CommSq (f ≫ p) i p' g)))\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nexact\n  CommSq.HasLift.mk'\n    { l := (CommSq.mk (CommSq.mk fac).fac_left.symm).lift\n      fac_left := by simp only [CommSq.fac_left]\n      fac_right := by simp only [CommSq.fac_right_assoc, CommSq.fac_right] }\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.7264, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝¹ : HasLiftingProperty i p\ninst✝ : HasLiftingProperty i p'\nf : A ⟶ X\ng : B ⟶ Y'\nsq : CommSq f i (p ≫ p') g\nfac : (f ≫ p) ≫ p' = i ≫ g\nx✝ : B ⟶ X := CommSq.lift (_ : CommSq f i p (CommSq.lift (_ : CommSq (f ≫ p) i p' g)))\n⊢ i ≫ CommSq.lift (_ : CommSq f i p (CommSq.lift (_ : CommSq (f ≫ p) i p' g))) = f\n[PROOFSTEP]\nsimp only [CommSq.fac_left]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.7264, u_1} C\nA B B' X Y Y' : C\ni : A ⟶ B\ni' : B ⟶ B'\np : X ⟶ Y\np' : Y ⟶ Y'\ninst✝¹ : HasLiftingProperty i p\ninst✝ : HasLiftingProperty i p'\nf : A ⟶ X\ng : B ⟶ Y'\nsq : CommSq f i (p ≫ p') g\nfac : (f ≫ p) ≫ p' = i ≫ g\nx✝ : B ⟶ X := CommSq.lift (_ : CommSq f i p (CommSq.lift (_ : CommSq (f ≫ p) i p' g)))\n⊢ CommSq.lift (_ : CommSq f i p (CommSq.lift (_ : CommSq (f ≫ p) i p' g))) ≫ p ≫ p' = g\n[PROOFSTEP]\nsimp only [CommSq.fac_right_assoc, CommSq.fac_right]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B'✝ X✝ Y✝ Y' : C\ni✝ : A✝ ⟶ B✝\ni'✝ : B✝ ⟶ B'✝\np✝ : X✝ ⟶ Y✝\np' : Y✝ ⟶ Y'\nA B A' B' X Y : C\ni : A ⟶ B\ni' : A' ⟶ B'\ne : Arrow.mk i ≅ Arrow.mk i'\np : X ⟶ Y\nhip : HasLiftingProperty i p\n⊢ HasLiftingProperty i' p\n[PROOFSTEP]\nrw [Arrow.iso_w' e]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B'✝ X✝ Y✝ Y' : C\ni✝ : A✝ ⟶ B✝\ni'✝ : B✝ ⟶ B'✝\np✝ : X✝ ⟶ Y✝\np' : Y✝ ⟶ Y'\nA B A' B' X Y : C\ni : A ⟶ B\ni' : A' ⟶ B'\ne : Arrow.mk i ≅ Arrow.mk i'\np : X ⟶ Y\nhip : HasLiftingProperty i p\n⊢ HasLiftingProperty (e.inv.left ≫ i ≫ e.hom.right) p\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B' X✝ Y✝ Y'✝ : C\ni✝ : A✝ ⟶ B✝\ni' : B✝ ⟶ B'\np✝ : X✝ ⟶ Y✝\np'✝ : Y✝ ⟶ Y'✝\nA B X Y X' Y' : C\ni : A ⟶ B\np : X ⟶ Y\np' : X' ⟶ Y'\ne : Arrow.mk p ≅ Arrow.mk p'\nhip : HasLiftingProperty i p\n⊢ HasLiftingProperty i p'\n[PROOFSTEP]\nrw [Arrow.iso_w' e]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B' X✝ Y✝ Y'✝ : C\ni✝ : A✝ ⟶ B✝\ni' : B✝ ⟶ B'\np✝ : X✝ ⟶ Y✝\np'✝ : Y✝ ⟶ Y'✝\nA B X Y X' Y' : C\ni : A ⟶ B\np : X ⟶ Y\np' : X' ⟶ Y'\ne : Arrow.mk p ≅ Arrow.mk p'\nhip : HasLiftingProperty i p\n⊢ HasLiftingProperty i (e.inv.left ≫ p ≫ e.hom.right)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B'✝ X✝ Y✝ Y' : C\ni✝ : A✝ ⟶ B✝\ni'✝ : B✝ ⟶ B'✝\np✝ : X✝ ⟶ Y✝\np' : Y✝ ⟶ Y'\nA B A' B' X Y : C\ni : A ⟶ B\ni' : A' ⟶ B'\ne : Arrow.mk i ≅ Arrow.mk i'\np : X ⟶ Y\n⊢ HasLiftingProperty i p ↔ HasLiftingProperty i' p\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B'✝ X✝ Y✝ Y' : C\ni✝ : A✝ ⟶ B✝\ni'✝ : B✝ ⟶ B'✝\np✝ : X✝ ⟶ Y✝\np' : Y✝ ⟶ Y'\nA B A' B' X Y : C\ni : A ⟶ B\ni' : A' ⟶ B'\ne : Arrow.mk i ≅ Arrow.mk i'\np : X ⟶ Y\n⊢ HasLiftingProperty i p → HasLiftingProperty i' p\n[PROOFSTEP]\nintro\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B'✝ X✝ Y✝ Y' : C\ni✝ : A✝ ⟶ B✝\ni'✝ : B✝ ⟶ B'✝\np✝ : X✝ ⟶ Y✝\np' : Y✝ ⟶ Y'\nA B A' B' X Y : C\ni : A ⟶ B\ni' : A' ⟶ B'\ne : Arrow.mk i ≅ Arrow.mk i'\np : X ⟶ Y\n⊢ HasLiftingProperty i' p → HasLiftingProperty i p\n[PROOFSTEP]\nintro\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B'✝ X✝ Y✝ Y' : C\ni✝ : A✝ ⟶ B✝\ni'✝ : B✝ ⟶ B'✝\np✝ : X✝ ⟶ Y✝\np' : Y✝ ⟶ Y'\nA B A' B' X Y : C\ni : A ⟶ B\ni' : A' ⟶ B'\ne : Arrow.mk i ≅ Arrow.mk i'\np : X ⟶ Y\na✝ : HasLiftingProperty i p\n⊢ HasLiftingProperty i' p\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B'✝ X✝ Y✝ Y' : C\ni✝ : A✝ ⟶ B✝\ni'✝ : B✝ ⟶ B'✝\np✝ : X✝ ⟶ Y✝\np' : Y✝ ⟶ Y'\nA B A' B' X Y : C\ni : A ⟶ B\ni' : A' ⟶ B'\ne : Arrow.mk i ≅ Arrow.mk i'\np : X ⟶ Y\na✝ : HasLiftingProperty i' p\n⊢ HasLiftingProperty i p\n[PROOFSTEP]\nexacts [of_arrow_iso_left e p, of_arrow_iso_left e.symm p]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B' X✝ Y✝ Y'✝ : C\ni✝ : A✝ ⟶ B✝\ni' : B✝ ⟶ B'\np✝ : X✝ ⟶ Y✝\np'✝ : Y✝ ⟶ Y'✝\nA B X Y X' Y' : C\ni : A ⟶ B\np : X ⟶ Y\np' : X' ⟶ Y'\ne : Arrow.mk p ≅ Arrow.mk p'\n⊢ HasLiftingProperty i p ↔ HasLiftingProperty i p'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B' X✝ Y✝ Y'✝ : C\ni✝ : A✝ ⟶ B✝\ni' : B✝ ⟶ B'\np✝ : X✝ ⟶ Y✝\np'✝ : Y✝ ⟶ Y'✝\nA B X Y X' Y' : C\ni : A ⟶ B\np : X ⟶ Y\np' : X' ⟶ Y'\ne : Arrow.mk p ≅ Arrow.mk p'\n⊢ HasLiftingProperty i p → HasLiftingProperty i p'\n[PROOFSTEP]\nintro\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B' X✝ Y✝ Y'✝ : C\ni✝ : A✝ ⟶ B✝\ni' : B✝ ⟶ B'\np✝ : X✝ ⟶ Y✝\np'✝ : Y✝ ⟶ Y'✝\nA B X Y X' Y' : C\ni : A ⟶ B\np : X ⟶ Y\np' : X' ⟶ Y'\ne : Arrow.mk p ≅ Arrow.mk p'\n⊢ HasLiftingProperty i p' → HasLiftingProperty i p\n[PROOFSTEP]\nintro\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B' X✝ Y✝ Y'✝ : C\ni✝ : A✝ ⟶ B✝\ni' : B✝ ⟶ B'\np✝ : X✝ ⟶ Y✝\np'✝ : Y✝ ⟶ Y'✝\nA B X Y X' Y' : C\ni : A ⟶ B\np : X ⟶ Y\np' : X' ⟶ Y'\ne : Arrow.mk p ≅ Arrow.mk p'\na✝ : HasLiftingProperty i p\n⊢ HasLiftingProperty i p'\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nA✝ B✝ B' X✝ Y✝ Y'✝ : C\ni✝ : A✝ ⟶ B✝\ni' : B✝ ⟶ B'\np✝ : X✝ ⟶ Y✝\np'✝ : Y✝ ⟶ Y'✝\nA B X Y X' Y' : C\ni : A ⟶ B\np : X ⟶ Y\np' : X' ⟶ Y'\ne : Arrow.mk p ≅ Arrow.mk p'\na✝ : HasLiftingProperty i p'\n⊢ HasLiftingProperty i p\n[PROOFSTEP]\nexacts [of_arrow_iso_right i e, of_arrow_iso_right i e.symm]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.LiftingProperties.Basic", "llama_tokens": 7054, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6893056040203136, "lm_q2_score": 0.5736784074525098, "lm_q1q2_score": 0.39543974116246383}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝¹ : Star α\ninst✝ : Star β\nA : Matrix n n α\n⊢ (∀ (i j : n), star (A j i) = A i j) → IsHermitian A\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝¹ : Star α\ninst✝ : Star β\nA : Matrix n n α\nh : ∀ (i j : n), star (A j i) = A i j\n⊢ IsHermitian A\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝¹ : Star α\ninst✝ : Star β\nA : Matrix n n α\nh : ∀ (i j : n), star (A j i) = A i j\ni j : n\n⊢ Aᴴ i j = A i j\n[PROOFSTEP]\nexact h i j\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝¹ : Star α\ninst✝ : Star β\nA : Matrix n n α\nh : IsHermitian A\n⊢ IsHermitian Aᵀ\n[PROOFSTEP]\nrw [IsHermitian, conjTranspose, transpose_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝¹ : Star α\ninst✝ : Star β\nA : Matrix n n α\nh : IsHermitian A\n⊢ (Matrix.map Aᵀ star)ᵀ = Aᵀ\n[PROOFSTEP]\nexact congr_arg Matrix.transpose h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝¹ : Star α\ninst✝ : Star β\nA : Matrix n n α\n⊢ IsHermitian Aᵀ → IsHermitian A\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝¹ : Star α\ninst✝ : Star β\nA : Matrix n n α\nh : IsHermitian Aᵀ\n⊢ IsHermitian A\n[PROOFSTEP]\nrw [← transpose_transpose A]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝¹ : Star α\ninst✝ : Star β\nA : Matrix n n α\nh : IsHermitian Aᵀ\n⊢ IsHermitian Aᵀᵀ\n[PROOFSTEP]\nexact IsHermitian.transpose h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝¹ : Star α\ninst✝ : Star β\nA : Matrix n n α\ne : m ≃ n\nh : IsHermitian (submatrix A ↑e ↑e)\n⊢ IsHermitian A\n[PROOFSTEP]\nsimpa using h.submatrix e.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝ : InvolutiveStar α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\nhA : IsHermitian A\nhBC : Bᴴ = C\nhD : IsHermitian D\n⊢ IsHermitian (Matrix.fromBlocks A B C D)\n[PROOFSTEP]\nhave hCB : Cᴴ = B := by rw [← hBC, conjTranspose_conjTranspose]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝ : InvolutiveStar α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\nhA : IsHermitian A\nhBC : Bᴴ = C\nhD : IsHermitian D\n⊢ Cᴴ = B\n[PROOFSTEP]\nrw [← hBC, conjTranspose_conjTranspose]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝ : InvolutiveStar α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\nhA : IsHermitian A\nhBC : Bᴴ = C\nhD : IsHermitian D\nhCB : Cᴴ = B\n⊢ IsHermitian (Matrix.fromBlocks A B C D)\n[PROOFSTEP]\nunfold Matrix.IsHermitian\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝ : InvolutiveStar α\nA : Matrix m m α\nB : Matrix m n α\nC : Matrix n m α\nD : Matrix n n α\nhA : IsHermitian A\nhBC : Bᴴ = C\nhD : IsHermitian D\nhCB : Cᴴ = B\n⊢ (Matrix.fromBlocks A B C D)ᴴ = Matrix.fromBlocks A B C D\n[PROOFSTEP]\nrw [fromBlocks_conjTranspose, hBC, hCB, hA, hD]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝⁴ : NonUnitalSemiring α\ninst✝³ : StarRing α\ninst✝² : NonUnitalSemiring β\ninst✝¹ : StarRing β\ninst✝ : Fintype n\nA : Matrix m n α\n⊢ IsHermitian (A * Aᴴ)\n[PROOFSTEP]\nrw [IsHermitian, conjTranspose_mul, conjTranspose_conjTranspose]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝⁴ : NonUnitalSemiring α\ninst✝³ : StarRing α\ninst✝² : NonUnitalSemiring β\ninst✝¹ : StarRing β\ninst✝ : Fintype m\nA : Matrix m n α\n⊢ IsHermitian (Aᴴ * A)\n[PROOFSTEP]\nrw [IsHermitian, conjTranspose_mul, conjTranspose_conjTranspose]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝⁴ : NonUnitalSemiring α\ninst✝³ : StarRing α\ninst✝² : NonUnitalSemiring β\ninst✝¹ : StarRing β\ninst✝ : Fintype m\nA : Matrix m m α\nB : Matrix m n α\nhA : IsHermitian A\n⊢ IsHermitian (Bᴴ * A * B)\n[PROOFSTEP]\nsimp only [IsHermitian, conjTranspose_mul, conjTranspose_conjTranspose, hA.eq, Matrix.mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝⁴ : NonUnitalSemiring α\ninst✝³ : StarRing α\ninst✝² : NonUnitalSemiring β\ninst✝¹ : StarRing β\ninst✝ : Fintype m\nA : Matrix m m α\nB : Matrix n m α\nhA : IsHermitian A\n⊢ IsHermitian (B * A * Bᴴ)\n[PROOFSTEP]\nsimp only [IsHermitian, conjTranspose_mul, conjTranspose_conjTranspose, hA.eq, Matrix.mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝³ : CommRing α\ninst✝² : StarRing α\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m α\nhA : IsHermitian A\n⊢ IsHermitian A⁻¹\n[PROOFSTEP]\nsimp [IsHermitian, conjTranspose_nonsing_inv, hA.eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝⁴ : CommRing α\ninst✝³ : StarRing α\ninst✝² : Fintype m\ninst✝¹ : DecidableEq m\nA : Matrix m m α\ninst✝ : Invertible A\nh : IsHermitian A⁻¹\n⊢ IsHermitian A\n[PROOFSTEP]\nrw [← inv_inv_of_invertible A]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝⁴ : CommRing α\ninst✝³ : StarRing α\ninst✝² : Fintype m\ninst✝¹ : DecidableEq m\nA : Matrix m m α\ninst✝ : Invertible A\nh : IsHermitian A⁻¹\n⊢ IsHermitian A⁻¹⁻¹\n[PROOFSTEP]\nexact IsHermitian.inv h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝³ : CommRing α\ninst✝² : StarRing α\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nA : Matrix m m α\nhA : IsHermitian A\n⊢ IsHermitian (Matrix.adjugate A)\n[PROOFSTEP]\nsimp [IsHermitian, adjugate_conjTranspose, hA.eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝¹ : IsROrC α\ninst✝ : IsROrC β\nA : Matrix n n α\nh : IsHermitian A\ni : n\n⊢ ↑(↑re (A i i)) = A i i\n[PROOFSTEP]\nrw [← conj_eq_iff_re, ← star_def, ← conjTranspose_apply, h.eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝³ : IsROrC α\ninst✝² : IsROrC β\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n α\n⊢ IsHermitian A ↔ LinearMap.IsSymmetric (↑toEuclideanLin A)\n[PROOFSTEP]\nrw [LinearMap.IsSymmetric, (PiLp.equiv 2 fun _ : n => α).symm.surjective.forall₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝³ : IsROrC α\ninst✝² : IsROrC β\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n α\n⊢ IsHermitian A ↔\n    ∀ (x₁ x₂ : n → α),\n      inner (↑(↑toEuclideanLin A) (↑(PiLp.equiv 2 fun x => α).symm x₁)) (↑(PiLp.equiv 2 fun x => α).symm x₂) =\n        inner (↑(PiLp.equiv 2 fun x => α).symm x₁) (↑(↑toEuclideanLin A) (↑(PiLp.equiv 2 fun x => α).symm x₂))\n[PROOFSTEP]\nsimp only [toEuclideanLin_piLp_equiv_symm, EuclideanSpace.inner_piLp_equiv_symm, toLin'_apply, star_mulVec,\n  dotProduct_mulVec]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝³ : IsROrC α\ninst✝² : IsROrC β\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n α\n⊢ IsHermitian A ↔ ∀ (x₁ x₂ : n → α), vecMul (star x₁) Aᴴ ⬝ᵥ x₂ = vecMul (star x₁) A ⬝ᵥ x₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝³ : IsROrC α\ninst✝² : IsROrC β\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n α\n⊢ IsHermitian A → ∀ (x₁ x₂ : n → α), vecMul (star x₁) Aᴴ ⬝ᵥ x₂ = vecMul (star x₁) A ⬝ᵥ x₂\n[PROOFSTEP]\nrintro (h : Aᴴ = A) x y\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝³ : IsROrC α\ninst✝² : IsROrC β\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n α\nh : Aᴴ = A\nx y : n → α\n⊢ vecMul (star x) Aᴴ ⬝ᵥ y = vecMul (star x) A ⬝ᵥ y\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝³ : IsROrC α\ninst✝² : IsROrC β\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n α\n⊢ (∀ (x₁ x₂ : n → α), vecMul (star x₁) Aᴴ ⬝ᵥ x₂ = vecMul (star x₁) A ⬝ᵥ x₂) → IsHermitian A\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝³ : IsROrC α\ninst✝² : IsROrC β\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n α\nh : ∀ (x₁ x₂ : n → α), vecMul (star x₁) Aᴴ ⬝ᵥ x₂ = vecMul (star x₁) A ⬝ᵥ x₂\n⊢ IsHermitian A\n[PROOFSTEP]\next i j\n[GOAL]\ncase mpr.a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nA✝ : Matrix n n α\ninst✝³ : IsROrC α\ninst✝² : IsROrC β\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n α\nh : ∀ (x₁ x₂ : n → α), vecMul (star x₁) Aᴴ ⬝ᵥ x₂ = vecMul (star x₁) A ⬝ᵥ x₂\ni j : n\n⊢ Aᴴ i j = A i j\n[PROOFSTEP]\nsimpa only [(Pi.single_star i 1).symm, ← star_mulVec, mul_one, dotProduct_single, single_vecMul, star_one,\n  one_mul] using h (Pi.single i 1) (Pi.single j 1)\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Hermitian", "llama_tokens": 4623, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.727975460709318, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.3951911486696774}}
{"text": "[GOAL]\nC D : Cat\nF : C ⟶ D\n⊢ 𝟙 C ≫ F = F\n[PROOFSTEP]\ncases F\n[GOAL]\ncase mk\nC D : Cat\ntoPrefunctor✝ : ↑C ⥤q ↑D\nmap_id✝ : ∀ (X : ↑C), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ :\n  ∀ {X Y Z : ↑C} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\n⊢ 𝟙 C ≫ Functor.mk toPrefunctor✝ = Functor.mk toPrefunctor✝\n[PROOFSTEP]\nrfl\n[GOAL]\nC D : Cat\nF : C ⟶ D\n⊢ F ≫ 𝟙 D = F\n[PROOFSTEP]\ncases F\n[GOAL]\ncase mk\nC D : Cat\ntoPrefunctor✝ : ↑C ⥤q ↑D\nmap_id✝ : ∀ (X : ↑C), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ :\n  ∀ {X Y Z : ↑C} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\n⊢ Functor.mk toPrefunctor✝ ≫ 𝟙 D = Functor.mk toPrefunctor✝\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ∀ {a b c d : Cat} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d), (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nintros\n[GOAL]\na✝ b✝ c✝ d✝ : Cat\nf✝ : a✝ ⟶ b✝\ng✝ : b✝ ⟶ c✝\nh✝ : c✝ ⟶ d✝\n⊢ (f✝ ≫ g✝) ≫ h✝ = f✝ ≫ g✝ ≫ h✝\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y : Type u\nf : X ⟶ Y\n⊢ (fun X => Cat.of (Discrete X)) X ⟶ (fun X => Cat.of (Discrete X)) Y\n[PROOFSTEP]\ndsimp\n[GOAL]\nX Y : Type u\nf : X ⟶ Y\n⊢ Cat.of (Discrete X) ⟶ Cat.of (Discrete Y)\n[PROOFSTEP]\nexact Discrete.functor (Discrete.mk ∘ f)\n[GOAL]\nX : Type u\n⊢ { obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map (𝟙 X) =\n    𝟙 ({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj X)\n[PROOFSTEP]\napply Functor.ext\n[GOAL]\ncase h_map\nX : Type u\n⊢ autoParam\n    (∀\n      (X_1 Y :\n        ↑({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj X))\n      (f : X_1 ⟶ Y),\n      ({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n              (𝟙 X)).map\n          f =\n        eqToHom (_ : ?F.obj X_1 = ?G.obj X_1) ≫\n          (𝟙\n                  ({ obj := fun X => Cat.of (Discrete X),\n                        map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj\n                    X)).map\n              f ≫\n            eqToHom\n              (_ :\n                (𝟙\n                        ({ obj := fun X => Cat.of (Discrete X),\n                              map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj\n                          X)).obj\n                    Y =\n                  ({ obj := fun X => Cat.of (Discrete X),\n                            map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n                        (𝟙 X)).obj\n                    Y))\n    _auto✝\n[PROOFSTEP]\nintro X Y f\n[GOAL]\ncase h_map\nX✝ : Type u\nX Y : ↑({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj X✝)\nf : X ⟶ Y\n⊢ ({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n          (𝟙 X✝)).map\n      f =\n    eqToHom (_ : ?F.obj X = ?G.obj X) ≫\n      (𝟙\n              ({ obj := fun X => Cat.of (Discrete X),\n                    map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj\n                X✝)).map\n          f ≫\n        eqToHom\n          (_ :\n            (𝟙\n                    ({ obj := fun X => Cat.of (Discrete X),\n                          map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj\n                      X✝)).obj\n                Y =\n              ({ obj := fun X => Cat.of (Discrete X),\n                        map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n                    (𝟙 X✝)).obj\n                Y)\n[PROOFSTEP]\ncases f\n[GOAL]\ncase h_map.up\nX✝ : Type u\nX Y : ↑({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj X✝)\ndown✝ : PLift (X.as = Y.as)\n⊢ ({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n          (𝟙 X✝)).map\n      { down := down✝ } =\n    eqToHom (_ : ?F.obj X = ?G.obj X) ≫\n      (𝟙\n              ({ obj := fun X => Cat.of (Discrete X),\n                    map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj\n                X✝)).map\n          { down := down✝ } ≫\n        eqToHom\n          (_ :\n            (𝟙\n                    ({ obj := fun X => Cat.of (Discrete X),\n                          map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj\n                      X✝)).obj\n                Y =\n              ({ obj := fun X => Cat.of (Discrete X),\n                        map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n                    (𝟙 X✝)).obj\n                Y)\n[PROOFSTEP]\nsimp only [id_eq, eqToHom_refl, Cat.id_map, Category.comp_id, Category.id_comp]\n[GOAL]\ncase h_map.up\nX✝ : Type u\nX Y : ↑({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj X✝)\ndown✝ : PLift (X.as = Y.as)\n⊢ (Discrete.functor (Discrete.mk ∘ 𝟙 X✝)).map { down := down✝ } = { down := down✝ }\n[PROOFSTEP]\napply ULift.ext\n[GOAL]\ncase h_map.up.h\nX✝ : Type u\nX Y : ↑({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj X✝)\ndown✝ : PLift (X.as = Y.as)\n⊢ ((Discrete.functor (Discrete.mk ∘ 𝟙 X✝)).map { down := down✝ }).down = { down := down✝ }.down\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase h_obj\nX : Type u\n⊢ ∀\n    (X_1 :\n      ↑({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj X)),\n    ({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n            (𝟙 X)).obj\n        X_1 =\n      (𝟙\n            ({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj\n              X)).obj\n        X_1\n[PROOFSTEP]\naesop_cat\n[GOAL]\nX✝ Y✝ Z✝ : Type u\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map (f ≫ g) =\n    { obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map f ≫\n      { obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map g\n[PROOFSTEP]\napply Functor.ext\n[GOAL]\ncase h_map\nX✝ Y✝ Z✝ : Type u\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ autoParam\n    (∀\n      (X Y :\n        ↑({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj\n            X✝))\n      (f_1 : X ⟶ Y),\n      ({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n              (f ≫ g)).map\n          f_1 =\n        eqToHom (_ : ?F.obj X = ?G.obj X) ≫\n          ({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n                    f ≫\n                  { obj := fun X => Cat.of (Discrete X),\n                        map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n                    g).map\n              f_1 ≫\n            eqToHom\n              (_ :\n                ({ obj := fun X => Cat.of (Discrete X),\n                              map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n                          f ≫\n                        { obj := fun X => Cat.of (Discrete X),\n                              map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n                          g).obj\n                    Y =\n                  ({ obj := fun X => Cat.of (Discrete X),\n                            map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n                        (f ≫ g)).obj\n                    Y))\n    _auto✝\ncase h_obj\nX✝ Y✝ Z✝ : Type u\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ ∀\n    (X :\n      ↑({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.obj X✝)),\n    ({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n            (f ≫ g)).obj\n        X =\n      ({ obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map f ≫\n            { obj := fun X => Cat.of (Discrete X), map := fun {X Y} f => id (Discrete.functor (Discrete.mk ∘ f)) }.map\n              g).obj\n        X\n[PROOFSTEP]\naesop_cat\n[GOAL]\n⊢ ∀ {X Y : Type u} (f : typeToCat.obj X ⟶ typeToCat.obj Y),\n    typeToCat.map ((fun {X Y} F => Discrete.as ∘ F.obj ∘ Discrete.mk) f) = f\n[PROOFSTEP]\nintro X Y F\n[GOAL]\nX Y : Type u\nF : typeToCat.obj X ⟶ typeToCat.obj Y\n⊢ typeToCat.map ((fun {X Y} F => Discrete.as ∘ F.obj ∘ Discrete.mk) F) = F\n[PROOFSTEP]\napply Functor.ext\n[GOAL]\ncase h_map\nX Y : Type u\nF : typeToCat.obj X ⟶ typeToCat.obj Y\n⊢ autoParam\n    (∀ (X_1 Y_1 : ↑(typeToCat.obj X)) (f : X_1 ⟶ Y_1),\n      (typeToCat.map ((fun {X Y} F => Discrete.as ∘ F.obj ∘ Discrete.mk) F)).map f =\n        eqToHom (_ : ?F.obj X_1 = ?G.obj X_1) ≫\n          F.map f ≫\n            eqToHom (_ : F.obj Y_1 = (typeToCat.map ((fun {X Y} F => Discrete.as ∘ F.obj ∘ Discrete.mk) F)).obj Y_1))\n    _auto✝\n[PROOFSTEP]\nintro x y f\n[GOAL]\ncase h_map\nX Y : Type u\nF : typeToCat.obj X ⟶ typeToCat.obj Y\nx y : ↑(typeToCat.obj X)\nf : x ⟶ y\n⊢ (typeToCat.map ((fun {X Y} F => Discrete.as ∘ F.obj ∘ Discrete.mk) F)).map f =\n    eqToHom (_ : ?F.obj x = ?G.obj x) ≫\n      F.map f ≫ eqToHom (_ : F.obj y = (typeToCat.map ((fun {X Y} F => Discrete.as ∘ F.obj ∘ Discrete.mk) F)).obj y)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h_map\nX Y : Type u\nF : typeToCat.obj X ⟶ typeToCat.obj Y\nx y : ↑(typeToCat.obj X)\nf : x ⟶ y\n⊢ (Discrete.functor (Discrete.mk ∘ Discrete.as ∘ F.obj ∘ Discrete.mk)).map f =\n    𝟙 ((Discrete.functor (Discrete.mk ∘ Discrete.as ∘ F.obj ∘ Discrete.mk)).obj x) ≫ F.map f ≫ 𝟙 (F.obj y)\n[PROOFSTEP]\napply ULift.ext\n[GOAL]\ncase h_map.h\nX Y : Type u\nF : typeToCat.obj X ⟶ typeToCat.obj Y\nx y : ↑(typeToCat.obj X)\nf : x ⟶ y\n⊢ ((Discrete.functor (Discrete.mk ∘ Discrete.as ∘ F.obj ∘ Discrete.mk)).map f).down =\n    (𝟙 ((Discrete.functor (Discrete.mk ∘ Discrete.as ∘ F.obj ∘ Discrete.mk)).obj x) ≫ F.map f ≫ 𝟙 (F.obj y)).down\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase h_obj\nX Y : Type u\nF : typeToCat.obj X ⟶ typeToCat.obj Y\n⊢ ∀ (X_1 : ↑(typeToCat.obj X)),\n    (typeToCat.map ((fun {X Y} F => Discrete.as ∘ F.obj ∘ Discrete.mk) F)).obj X_1 = F.obj X_1\n[PROOFSTEP]\nrintro ⟨x⟩\n[GOAL]\ncase h_obj.mk\nX Y : Type u\nF : typeToCat.obj X ⟶ typeToCat.obj Y\nx : X\n⊢ (typeToCat.map ((fun {X Y} F => Discrete.as ∘ F.obj ∘ Discrete.mk) F)).obj { as := x } = F.obj { as := x }\n[PROOFSTEP]\napply Discrete.ext\n[GOAL]\ncase h_obj.mk.as\nX Y : Type u\nF : typeToCat.obj X ⟶ typeToCat.obj Y\nx : X\n⊢ ((typeToCat.map ((fun {X Y} F => Discrete.as ∘ F.obj ∘ Discrete.mk) F)).obj { as := x }).as = (F.obj { as := x }).as\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Category.Cat", "llama_tokens": 4809, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7279754607093178, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.39519114866967736}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns✝ : Finset ι\nf✝ : (i : ι) → i ∈ s✝ → α\ni✝ : ι\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni : ι\n⊢ i ∈ map (Embedding.subtype fun x => x ∈ s) (filter (fun i => f ↑i (_ : ↑i ∈ s) ≠ 0) (attach s)) ↔\n    (fun i => if H : i ∈ s then f i H else 0) i ≠ 0\n[PROOFSTEP]\nclassical simp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns✝ : Finset ι\nf✝ : (i : ι) → i ∈ s✝ → α\ni✝ : ι\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni : ι\n⊢ i ∈ map (Embedding.subtype fun x => x ∈ s) (filter (fun i => f ↑i (_ : ↑i ∈ s) ≠ 0) (attach s)) ↔\n    (fun i => if H : i ∈ s then f i H else 0) i ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni : ι\ninst✝ : DecidableEq ι\n⊢ ↑(indicator s f) i = if hi : i ∈ s then f i hi else 0\n[PROOFSTEP]\nsimp only [indicator, ne_eq, coe_mk]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni : ι\ninst✝ : DecidableEq ι\n⊢ (if H : i ∈ s then f i H else 0) = if hi : i ∈ s then f i hi else 0\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni : ι\n⊢ Injective fun f => indicator s f\n[PROOFSTEP]\nintro a b h\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni : ι\na b : (i : ι) → i ∈ s → α\nh : (fun f => indicator s f) a = (fun f => indicator s f) b\n⊢ a = b\n[PROOFSTEP]\next i hi\n[GOAL]\ncase h.h\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni✝ : ι\na b : (i : ι) → i ∈ s → α\nh : (fun f => indicator s f) a = (fun f => indicator s f) b\ni : ι\nhi : i ∈ s\n⊢ a i hi = b i hi\n[PROOFSTEP]\nrw [← indicator_of_mem hi a, ← indicator_of_mem hi b]\n[GOAL]\ncase h.h\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni✝ : ι\na b : (i : ι) → i ∈ s → α\nh : (fun f => indicator s f) a = (fun f => indicator s f) b\ni : ι\nhi : i ∈ s\n⊢ ↑(indicator s a) i = ↑(indicator s b) i\n[PROOFSTEP]\nexact FunLike.congr_fun h i\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni : ι\n⊢ ↑(indicator s f).support ⊆ ↑s\n[PROOFSTEP]\nintro i hi\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni✝ i : ι\nhi : i ∈ ↑(indicator s f).support\n⊢ i ∈ ↑s\n[PROOFSTEP]\nrw [mem_coe, mem_support_iff] at hi \n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni✝ i : ι\nhi : ↑(indicator s f) i ≠ 0\n⊢ i ∈ ↑s\n[PROOFSTEP]\nby_contra h\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni✝ i : ι\nhi : ↑(indicator s f) i ≠ 0\nh : ¬i ∈ ↑s\n⊢ False\n[PROOFSTEP]\nexact hi (indicator_of_not_mem h _)\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni : ι\nb : α\n⊢ single i b = indicator {i} fun x x => b\n[PROOFSTEP]\nclassical\next j\nsimp [single_apply, indicator_apply, @eq_comm _ j]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni : ι\nb : α\n⊢ single i b = indicator {i} fun x x => b\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\ns : Finset ι\nf : (i : ι) → i ∈ s → α\ni : ι\nb : α\nj : ι\n⊢ ↑(single i b) j = ↑(indicator {i} fun x x => b) j\n[PROOFSTEP]\nsimp [single_apply, indicator_apply, @eq_comm _ j]\n", "meta": {"mathlib_filename": "Mathlib.Data.Finsupp.Indicator", "llama_tokens": 1786, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.658417500561683, "lm_q2_score": 0.600188359260205, "lm_q1q2_score": 0.3951745193703216}}
{"text": "[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ng : ExteriorAlgebra R M →ₐ[R] A\nm : M\n⊢ ↑g (↑(ι R) m) * ↑g (↑(ι R) m) = 0\n[PROOFSTEP]\nrw [← AlgHom.map_mul, ι_sq_zero, AlgHom.map_zero]\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\n⊢ ∀ (a : M →ₗ[R] A),\n    (∀ (m : M), ↑a m * ↑a m = 0) ↔\n      ∀ (m : M), ↑(↑(Equiv.refl (M →ₗ[R] A)) a) m * ↑(↑(Equiv.refl (M →ₗ[R] A)) a) m = ↑(algebraMap R A) (↑0 m)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nm : M\n⊢ ↑0 m * ↑0 m = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : R\n⊢ ↑algebraMapInv (↑(algebraMap R (ExteriorAlgebra R M)) x) = x\n[PROOFSTEP]\nsimp [algebraMapInv]\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\n⊢ ExteriorAlgebra R M →ₗ[R] M\n[PROOFSTEP]\nletI : Module Rᵐᵒᵖ M := Module.compHom _ ((RingHom.id R).fromOpposite mul_comm)\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nthis : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\n⊢ ExteriorAlgebra R M →ₗ[R] M\n[PROOFSTEP]\nhaveI : IsCentralScalar R M := ⟨fun r m => rfl⟩\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nthis✝ : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\nthis : IsCentralScalar R M\n⊢ ExteriorAlgebra R M →ₗ[R] M\n[PROOFSTEP]\nexact (TrivSqZeroExt.sndHom R M).comp toTrivSqZeroExt.toLinearMap\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\n⊢ ↑ιInv.toAddHom (↑(ι R) x) = x\n[PROOFSTEP]\nletI : Module Rᵐᵒᵖ M := Module.compHom _ ((RingHom.id R).fromOpposite mul_comm)\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\nthis : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\n⊢ ↑ιInv.toAddHom (↑(ι R) x) = x\n[PROOFSTEP]\nhaveI : IsCentralScalar R M := ⟨fun r m => rfl⟩\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\nthis✝ : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\nthis : IsCentralScalar R M\n⊢ ↑ιInv.toAddHom (↑(ι R) x) = x\n[PROOFSTEP]\nsimp [ιInv]\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\n⊢ ↑(ι R) x = 0 ↔ x = 0\n[PROOFSTEP]\nrw [← ι_inj R x 0, LinearMap.map_zero]\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\nr : R\n⊢ ↑(ι R) x = ↑(algebraMap R (ExteriorAlgebra R M)) r ↔ x = 0 ∧ r = 0\n[PROOFSTEP]\nrefine' ⟨fun h => _, _⟩\n[GOAL]\ncase refine'_1\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\nr : R\nh : ↑(ι R) x = ↑(algebraMap R (ExteriorAlgebra R M)) r\n⊢ x = 0 ∧ r = 0\n[PROOFSTEP]\nletI : Module Rᵐᵒᵖ M := Module.compHom _ ((RingHom.id R).fromOpposite mul_comm)\n[GOAL]\ncase refine'_1\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\nr : R\nh : ↑(ι R) x = ↑(algebraMap R (ExteriorAlgebra R M)) r\nthis : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\n⊢ x = 0 ∧ r = 0\n[PROOFSTEP]\nhaveI : IsCentralScalar R M := ⟨fun r m => rfl⟩\n[GOAL]\ncase refine'_1\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\nr : R\nh : ↑(ι R) x = ↑(algebraMap R (ExteriorAlgebra R M)) r\nthis✝ : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\nthis : IsCentralScalar R M\n⊢ x = 0 ∧ r = 0\n[PROOFSTEP]\nhave hf0 : toTrivSqZeroExt (ι R x) = (0, x) := toTrivSqZeroExt_ι _\n[GOAL]\ncase refine'_1\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\nr : R\nh : ↑(ι R) x = ↑(algebraMap R (ExteriorAlgebra R M)) r\nthis✝ : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\nthis : IsCentralScalar R M\nhf0 : ↑toTrivSqZeroExt (↑(ι R) x) = (0, x)\n⊢ x = 0 ∧ r = 0\n[PROOFSTEP]\nrw [h, AlgHom.commutes] at hf0 \n[GOAL]\ncase refine'_1\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\nr : R\nh : ↑(ι R) x = ↑(algebraMap R (ExteriorAlgebra R M)) r\nthis✝ : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\nthis : IsCentralScalar R M\nhf0 : ↑(algebraMap R (TrivSqZeroExt R M)) r = (0, x)\n⊢ x = 0 ∧ r = 0\n[PROOFSTEP]\nhave : r = 0 ∧ 0 = x := Prod.ext_iff.1 hf0\n[GOAL]\ncase refine'_1\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\nr : R\nh : ↑(ι R) x = ↑(algebraMap R (ExteriorAlgebra R M)) r\nthis✝¹ : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\nthis✝ : IsCentralScalar R M\nhf0 : ↑(algebraMap R (TrivSqZeroExt R M)) r = (0, x)\nthis : r = 0 ∧ 0 = x\n⊢ x = 0 ∧ r = 0\n[PROOFSTEP]\nexact this.symm.imp_left Eq.symm\n[GOAL]\ncase refine'_2\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\nr : R\n⊢ x = 0 ∧ r = 0 → ↑(ι R) x = ↑(algebraMap R (ExteriorAlgebra R M)) r\n[PROOFSTEP]\nrintro ⟨rfl, rfl⟩\n[GOAL]\ncase refine'_2.intro\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\n⊢ ↑(ι R) 0 = ↑(algebraMap R (ExteriorAlgebra R M)) 0\n[PROOFSTEP]\nrw [LinearMap.map_zero, RingHom.map_zero]\n[GOAL]\nR : Type u1\ninst✝⁵ : CommRing R\nM : Type u2\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nA : Type u_1\ninst✝² : Semiring A\ninst✝¹ : Algebra R A\ninst✝ : Nontrivial R\nx : M\n⊢ ↑(ι R) x ≠ 1\n[PROOFSTEP]\nrw [← (algebraMap R (ExteriorAlgebra R M)).map_one, Ne.def, ι_eq_algebraMap_iff]\n[GOAL]\nR : Type u1\ninst✝⁵ : CommRing R\nM : Type u2\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nA : Type u_1\ninst✝² : Semiring A\ninst✝¹ : Algebra R A\ninst✝ : Nontrivial R\nx : M\n⊢ ¬(x = 0 ∧ 1 = 0)\n[PROOFSTEP]\nexact one_ne_zero ∘ And.right\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\n⊢ Disjoint (LinearMap.range (ι R)) 1\n[PROOFSTEP]\nrw [Submodule.disjoint_def]\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\n⊢ ∀ (x : ExteriorAlgebra R M), x ∈ LinearMap.range (ι R) → x ∈ 1 → x = 0\n[PROOFSTEP]\nrintro _ ⟨x, hx⟩ ⟨r, rfl : algebraMap R (ExteriorAlgebra R M) r = _⟩\n[GOAL]\ncase intro.intro\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\nr : R\nhx : ↑(ι R) x = ↑(algebraMap R (ExteriorAlgebra R M)) r\n⊢ ↑(algebraMap R (ExteriorAlgebra R M)) r = 0\n[PROOFSTEP]\nrw [ι_eq_algebraMap_iff x] at hx \n[GOAL]\ncase intro.intro\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx : M\nr : R\nhx : x = 0 ∧ r = 0\n⊢ ↑(algebraMap R (ExteriorAlgebra R M)) r = 0\n[PROOFSTEP]\nrw [hx.2, RingHom.map_zero]\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx y : M\n⊢ ↑(ι R) x * ↑(ι R) y + ↑(ι R) y * ↑(ι R) x = ↑(ι R) (y + x) * ↑(ι R) (y + x)\n[PROOFSTEP]\nsimp [mul_add, add_mul]\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn : ℕ\nf : Fin n → M\ni : Fin n\n⊢ ↑(ι R) (f i) * List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn : ℕ\nf✝ : Fin n → M\ni✝ : Fin n\nf : Fin Nat.zero → M\ni : Fin Nat.zero\n⊢ ↑(ι R) (f i) * List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\n[PROOFSTEP]\nexact i.elim0\n[GOAL]\ncase succ\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\ni✝ : Fin n✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (i : Fin n), ↑(ι R) (f i) * List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\ni : Fin (Nat.succ n)\n⊢ ↑(ι R) (f i) * List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\n[PROOFSTEP]\nrw [List.ofFn_succ, List.prod_cons, ← mul_assoc]\n[GOAL]\ncase succ\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\ni✝ : Fin n✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (i : Fin n), ↑(ι R) (f i) * List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\ni : Fin (Nat.succ n)\n⊢ ↑(ι R) (f i) * ↑(ι R) (f 0) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n[PROOFSTEP]\nby_cases h : i = 0\n[GOAL]\ncase pos\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\ni✝ : Fin n✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (i : Fin n), ↑(ι R) (f i) * List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\ni : Fin (Nat.succ n)\nh : i = 0\n⊢ ↑(ι R) (f i) * ↑(ι R) (f 0) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n[PROOFSTEP]\nrw [h, ι_sq_zero, zero_mul]\n[GOAL]\ncase neg\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\ni✝ : Fin n✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (i : Fin n), ↑(ι R) (f i) * List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\ni : Fin (Nat.succ n)\nh : ¬i = 0\n⊢ ↑(ι R) (f i) * ↑(ι R) (f 0) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n[PROOFSTEP]\nreplace hn := congr_arg ((· * ·) <| ι R <| f 0) (hn (fun i => f <| Fin.succ i) (i.pred h))\n[GOAL]\ncase neg\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\ni✝ : Fin n✝\nn : ℕ\nf : Fin (Nat.succ n) → M\ni : Fin (Nat.succ n)\nh : ¬i = 0\nhn :\n  (fun x x_1 => x * x_1) (↑(ι R) (f 0))\n      (↑(ι R) (f (Fin.succ (Fin.pred i h))) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i)))) =\n    (fun x x_1 => x * x_1) (↑(ι R) (f 0)) 0\n⊢ ↑(ι R) (f i) * ↑(ι R) (f 0) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n[PROOFSTEP]\nsimp only at hn \n[GOAL]\ncase neg\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\ni✝ : Fin n✝\nn : ℕ\nf : Fin (Nat.succ n) → M\ni : Fin (Nat.succ n)\nh : ¬i = 0\nhn :\n  ↑(ι R) (f 0) * (↑(ι R) (f (Fin.succ (Fin.pred i h))) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i)))) =\n    ↑(ι R) (f 0) * 0\n⊢ ↑(ι R) (f i) * ↑(ι R) (f 0) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n[PROOFSTEP]\nrw [Fin.succ_pred, ← mul_assoc, mul_zero] at hn \n[GOAL]\ncase neg\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\ni✝ : Fin n✝\nn : ℕ\nf : Fin (Nat.succ n) → M\ni : Fin (Nat.succ n)\nh : ¬i = 0\nhn : ↑(ι R) (f 0) * ↑(ι R) (f i) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n⊢ ↑(ι R) (f i) * ↑(ι R) (f 0) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n[PROOFSTEP]\nrefine' (eq_zero_iff_eq_zero_of_add_eq_zero _).mp hn\n[GOAL]\ncase neg\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\ni✝ : Fin n✝\nn : ℕ\nf : Fin (Nat.succ n) → M\ni : Fin (Nat.succ n)\nh : ¬i = 0\nhn : ↑(ι R) (f 0) * ↑(ι R) (f i) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n⊢ ↑(ι R) (f 0) * ↑(ι R) (f i) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) +\n      ↑(ι R) (f i) * ↑(ι R) (f 0) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) =\n    0\n[PROOFSTEP]\nrw [← add_mul, ι_add_mul_swap, zero_mul]\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn : ℕ\nF : MultilinearMap R (fun x => M) (ExteriorAlgebra R M) :=\n  MultilinearMap.compLinearMap (MultilinearMap.mkPiAlgebraFin R n (ExteriorAlgebra R M)) fun x => ι R\nf : Fin n → M\nx y : Fin n\nhfxy : f x = f y\nhxy : x ≠ y\n⊢ MultilinearMap.toFun\n      { toFun := ↑F,\n        map_add' :=\n          (_ :\n            ∀ [inst : DecidableEq (Fin n)] (m : Fin n → M) (i : Fin n) (x y : M),\n              MultilinearMap.toFun F (Function.update m i (x + y)) =\n                MultilinearMap.toFun F (Function.update m i x) + MultilinearMap.toFun F (Function.update m i y)),\n        map_smul' :=\n          (_ :\n            ∀ [inst : DecidableEq (Fin n)] (m : Fin n → M) (i : Fin n) (c : R) (x : M),\n              MultilinearMap.toFun F (Function.update m i (c • x)) =\n                c • MultilinearMap.toFun F (Function.update m i x)) }\n      f =\n    0\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn : ℕ\nF : MultilinearMap R (fun x => M) (ExteriorAlgebra R M) :=\n  MultilinearMap.compLinearMap (MultilinearMap.mkPiAlgebraFin R n (ExteriorAlgebra R M)) fun x => ι R\nf : Fin n → M\nx y : Fin n\nhfxy : f x = f y\nhxy : x ≠ y\n⊢ List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\n[PROOFSTEP]\nclear F\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn : ℕ\nf : Fin n → M\nx y : Fin n\nhfxy : f x = f y\nhxy : x ≠ y\n⊢ List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\n[PROOFSTEP]\nwlog h : x < y\n[GOAL]\ncase inr\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn : ℕ\nf : Fin n → M\nx y : Fin n\nhfxy : f x = f y\nhxy : x ≠ y\nthis :\n  ∀ (R : Type u1) [inst : CommRing R] {M : Type u2} [inst_1 : AddCommGroup M] [inst_2 : Module R M] {A : Type u_1}\n    [inst_3 : Semiring A] [inst_4 : Algebra R A] (n : ℕ) (f : Fin n → M) (x y : Fin n),\n    f x = f y → x ≠ y → x < y → List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nh : ¬x < y\n⊢ List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\n[PROOFSTEP]\nexact this R (A := A) n f y x hfxy.symm hxy.symm (hxy.lt_or_lt.resolve_left h)\n[GOAL]\nR✝ : Type u1\ninst✝⁷ : CommRing R✝\nM✝ : Type u2\ninst✝⁶ : AddCommGroup M✝\ninst✝⁵ : Module R✝ M✝\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn : ℕ\nf : Fin n → M\nx y : Fin n\nhfxy : f x = f y\nhxy : x ≠ y\nh : x < y\n⊢ List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\n[PROOFSTEP]\nclear hxy\n[GOAL]\nR✝ : Type u1\ninst✝⁷ : CommRing R✝\nM✝ : Type u2\ninst✝⁶ : AddCommGroup M✝\ninst✝⁵ : Module R✝ M✝\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn : ℕ\nf : Fin n → M\nx y : Fin n\nhfxy : f x = f y\nh : x < y\n⊢ List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nR✝ : Type u1\ninst✝⁷ : CommRing R✝\nM✝ : Type u2\ninst✝⁶ : AddCommGroup M✝\ninst✝⁵ : Module R✝ M✝\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn : ℕ\nf✝ : Fin n → M\nx✝ y✝ : Fin n\nhfxy✝ : f✝ x✝ = f✝ y✝\nh✝ : x✝ < y✝\nf : Fin Nat.zero → M\nx y : Fin Nat.zero\nhfxy : f x = f y\nh : x < y\n⊢ List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\n[PROOFSTEP]\nexact x.elim0\n[GOAL]\ncase succ\nR✝ : Type u1\ninst✝⁷ : CommRing R✝\nM✝ : Type u2\ninst✝⁶ : AddCommGroup M✝\ninst✝⁵ : Module R✝ M✝\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\nx✝ y✝ : Fin n✝\nhfxy✝ : f✝ x✝ = f✝ y✝\nh✝ : x✝ < y✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\nx y : Fin (Nat.succ n)\nhfxy : f x = f y\nh : x < y\n⊢ List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\n[PROOFSTEP]\nrw [List.ofFn_succ, List.prod_cons]\n[GOAL]\ncase succ\nR✝ : Type u1\ninst✝⁷ : CommRing R✝\nM✝ : Type u2\ninst✝⁶ : AddCommGroup M✝\ninst✝⁵ : Module R✝ M✝\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\nx✝ y✝ : Fin n✝\nhfxy✝ : f✝ x✝ = f✝ y✝\nh✝ : x✝ < y✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\nx y : Fin (Nat.succ n)\nhfxy : f x = f y\nh : x < y\n⊢ ↑(ι R) (f 0) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n[PROOFSTEP]\nby_cases hx :\n  x =\n    0\n      -- one of the repeated terms is on the left\n[GOAL]\ncase pos\nR✝ : Type u1\ninst✝⁷ : CommRing R✝\nM✝ : Type u2\ninst✝⁶ : AddCommGroup M✝\ninst✝⁵ : Module R✝ M✝\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\nx✝ y✝ : Fin n✝\nhfxy✝ : f✝ x✝ = f✝ y✝\nh✝ : x✝ < y✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\nx y : Fin (Nat.succ n)\nhfxy : f x = f y\nh : x < y\nhx : x = 0\n⊢ ↑(ι R) (f 0) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n[PROOFSTEP]\nrw [hx] at hfxy h \n[GOAL]\ncase pos\nR✝ : Type u1\ninst✝⁷ : CommRing R✝\nM✝ : Type u2\ninst✝⁶ : AddCommGroup M✝\ninst✝⁵ : Module R✝ M✝\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\nx✝ y✝ : Fin n✝\nhfxy✝ : f✝ x✝ = f✝ y✝\nh✝ : x✝ < y✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\nx y : Fin (Nat.succ n)\nhfxy : f 0 = f y\nh : 0 < y\nhx : x = 0\n⊢ ↑(ι R) (f 0) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n[PROOFSTEP]\nrw [hfxy, ← Fin.succ_pred y (ne_of_lt h).symm]\n[GOAL]\ncase pos\nR✝ : Type u1\ninst✝⁷ : CommRing R✝\nM✝ : Type u2\ninst✝⁶ : AddCommGroup M✝\ninst✝⁵ : Module R✝ M✝\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\nx✝ y✝ : Fin n✝\nhfxy✝ : f✝ x✝ = f✝ y✝\nh✝ : x✝ < y✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\nx y : Fin (Nat.succ n)\nhfxy : f 0 = f y\nh : 0 < y\nhx : x = 0\n⊢ ↑(ι R) (f (Fin.succ (Fin.pred y (_ : y ≠ 0)))) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n[PROOFSTEP]\nexact\n  ι_mul_prod_list (f ∘ Fin.succ)\n    _\n      -- ignore the left-most term and induct on the remaining ones, decrementing indices\n[GOAL]\ncase neg\nR✝ : Type u1\ninst✝⁷ : CommRing R✝\nM✝ : Type u2\ninst✝⁶ : AddCommGroup M✝\ninst✝⁵ : Module R✝ M✝\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\nx✝ y✝ : Fin n✝\nhfxy✝ : f✝ x✝ = f✝ y✝\nh✝ : x✝ < y✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\nx y : Fin (Nat.succ n)\nhfxy : f x = f y\nh : x < y\nhx : ¬x = 0\n⊢ ↑(ι R) (f 0) * List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n[PROOFSTEP]\nconvert mul_zero (ι R (f 0))\n[GOAL]\ncase h.e'_2.h.e'_6\nR✝ : Type u1\ninst✝⁷ : CommRing R✝\nM✝ : Type u2\ninst✝⁶ : AddCommGroup M✝\ninst✝⁵ : Module R✝ M✝\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\nx✝ y✝ : Fin n✝\nhfxy✝ : f✝ x✝ = f✝ y✝\nh✝ : x✝ < y✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\nx y : Fin (Nat.succ n)\nhfxy : f x = f y\nh : x < y\nhx : ¬x = 0\n⊢ List.prod (List.ofFn fun i => ↑(ι R) (f (Fin.succ i))) = 0\n[PROOFSTEP]\nrefine'\n  hn (fun i => f <| Fin.succ i) (x.pred hx) (y.pred (ne_of_lt <| lt_of_le_of_lt x.zero_le h).symm) _\n    (Fin.pred_lt_pred_iff.mpr h)\n[GOAL]\ncase h.e'_2.h.e'_6\nR✝ : Type u1\ninst✝⁷ : CommRing R✝\nM✝ : Type u2\ninst✝⁶ : AddCommGroup M✝\ninst✝⁵ : Module R✝ M✝\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\nx✝ y✝ : Fin n✝\nhfxy✝ : f✝ x✝ = f✝ y✝\nh✝ : x✝ < y✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\nx y : Fin (Nat.succ n)\nhfxy : f x = f y\nh : x < y\nhx : ¬x = 0\n⊢ (fun i => f (Fin.succ i)) (Fin.pred x hx) = (fun i => f (Fin.succ i)) (Fin.pred y (_ : y ≠ 0))\n[PROOFSTEP]\nsimp only [Fin.succ_pred]\n[GOAL]\ncase h.e'_2.h.e'_6\nR✝ : Type u1\ninst✝⁷ : CommRing R✝\nM✝ : Type u2\ninst✝⁶ : AddCommGroup M✝\ninst✝⁵ : Module R✝ M✝\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn✝ : ℕ\nf✝ : Fin n✝ → M\nx✝ y✝ : Fin n✝\nhfxy✝ : f✝ x✝ = f✝ y✝\nh✝ : x✝ < y✝\nn : ℕ\nhn : ∀ (f : Fin n → M) (x y : Fin n), f x = f y → x < y → List.prod (List.ofFn fun i => ↑(ι R) (f i)) = 0\nf : Fin (Nat.succ n) → M\nx y : Fin (Nat.succ n)\nhfxy : f x = f y\nh : x < y\nhx : ¬x = 0\n⊢ f x = f y\n[PROOFSTEP]\nexact hfxy\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn : ℕ\nm : M\nv : Fin n → M\n⊢ ↑(ι R) (Matrix.vecCons m v 0) * ↑(ιMulti R n) (Matrix.vecTail (Matrix.vecCons m v)) =\n    ↑(↑(LinearMap.compAlternatingMap (LinearMap.mulLeft R (↑(ι R) m))) (ιMulti R n)) v\n[PROOFSTEP]\nsimp_rw [Matrix.tail_cons]\n[GOAL]\nR : Type u1\ninst✝⁴ : CommRing R\nM : Type u2\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nn : ℕ\nm : M\nv : Fin n → M\n⊢ ↑(ι R) (Matrix.vecCons m v 0) * ↑(ιMulti R n) v =\n    ↑(↑(LinearMap.compAlternatingMap (LinearMap.mulLeft R (↑(ι R) m))) (ιMulti R n)) v\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u1\ninst✝² : CommRing R\nM : Type u2\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nm : M\n⊢ ↑toExterior (↑(ι R) m) = ↑(ExteriorAlgebra.ι R) m\n[PROOFSTEP]\nsimp [toExterior]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.ExteriorAlgebra.Basic", "llama_tokens": 13124, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7662936430859597, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.39511626366706515}}
{"text": "[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Add A\nf g : AddMonoidAlgebra R A\na0 b0 : A\nh : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0\n⊢ ↑(f * g) (a0 + b0) = ↑f a0 * ↑g b0\n[PROOFSTEP]\nclassical\nrw [mul_apply]\nrefine' (Finset.sum_eq_single a0 _ _).trans _\n· exact fun b H hb => Finset.sum_eq_zero fun x H1 => if_neg (h H H1 (Or.inl hb))\n· exact fun af0 => by simp [not_mem_support_iff.mp af0]\n· refine' (Finset.sum_eq_single b0 (fun b bg b0 => _) _).trans (if_pos rfl)\n  · by_cases af : a0 ∈ f.support\n    · exact if_neg (h af bg (Or.inr b0))\n    · simp only [not_mem_support_iff.mp af, zero_mul, ite_self]\n  · exact fun bf0 => by simp [not_mem_support_iff.mp bf0]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Add A\nf g : AddMonoidAlgebra R A\na0 b0 : A\nh : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0\n⊢ ↑(f * g) (a0 + b0) = ↑f a0 * ↑g b0\n[PROOFSTEP]\nrw [mul_apply]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Add A\nf g : AddMonoidAlgebra R A\na0 b0 : A\nh : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0\n⊢ (sum f fun a₁ b₁ => sum g fun a₂ b₂ => if a₁ + a₂ = a0 + b0 then b₁ * b₂ else 0) = ↑f a0 * ↑g b0\n[PROOFSTEP]\nrefine' (Finset.sum_eq_single a0 _ _).trans _\n[GOAL]\ncase refine'_1\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Add A\nf g : AddMonoidAlgebra R A\na0 b0 : A\nh : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0\n⊢ ∀ (b : A),\n    b ∈ f.support → b ≠ a0 → (fun a₁ b₁ => sum g fun a₂ b₂ => if a₁ + a₂ = a0 + b0 then b₁ * b₂ else 0) b (↑f b) = 0\n[PROOFSTEP]\nexact fun b H hb => Finset.sum_eq_zero fun x H1 => if_neg (h H H1 (Or.inl hb))\n[GOAL]\ncase refine'_2\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Add A\nf g : AddMonoidAlgebra R A\na0 b0 : A\nh : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0\n⊢ ¬a0 ∈ f.support → (fun a₁ b₁ => sum g fun a₂ b₂ => if a₁ + a₂ = a0 + b0 then b₁ * b₂ else 0) a0 (↑f a0) = 0\n[PROOFSTEP]\nexact fun af0 => by simp [not_mem_support_iff.mp af0]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Add A\nf g : AddMonoidAlgebra R A\na0 b0 : A\nh : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0\naf0 : ¬a0 ∈ f.support\n⊢ (fun a₁ b₁ => sum g fun a₂ b₂ => if a₁ + a₂ = a0 + b0 then b₁ * b₂ else 0) a0 (↑f a0) = 0\n[PROOFSTEP]\nsimp [not_mem_support_iff.mp af0]\n[GOAL]\ncase refine'_3\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Add A\nf g : AddMonoidAlgebra R A\na0 b0 : A\nh : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0\n⊢ (fun a₁ b₁ => sum g fun a₂ b₂ => if a₁ + a₂ = a0 + b0 then b₁ * b₂ else 0) a0 (↑f a0) = ↑f a0 * ↑g b0\n[PROOFSTEP]\nrefine' (Finset.sum_eq_single b0 (fun b bg b0 => _) _).trans (if_pos rfl)\n[GOAL]\ncase refine'_3.refine'_1\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Add A\nf g : AddMonoidAlgebra R A\na0 b0✝ : A\nh : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0✝ → a + b ≠ a0 + b0✝\nb : A\nbg : b ∈ g.support\nb0 : b ≠ b0✝\n⊢ (fun a₂ b₂ => if a0 + a₂ = a0 + b0✝ then ↑f a0 * b₂ else 0) b (↑g b) = 0\n[PROOFSTEP]\nby_cases af : a0 ∈ f.support\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Add A\nf g : AddMonoidAlgebra R A\na0 b0✝ : A\nh : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0✝ → a + b ≠ a0 + b0✝\nb : A\nbg : b ∈ g.support\nb0 : b ≠ b0✝\naf : a0 ∈ f.support\n⊢ (fun a₂ b₂ => if a0 + a₂ = a0 + b0✝ then ↑f a0 * b₂ else 0) b (↑g b) = 0\n[PROOFSTEP]\nexact if_neg (h af bg (Or.inr b0))\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Add A\nf g : AddMonoidAlgebra R A\na0 b0✝ : A\nh : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0✝ → a + b ≠ a0 + b0✝\nb : A\nbg : b ∈ g.support\nb0 : b ≠ b0✝\naf : ¬a0 ∈ f.support\n⊢ (fun a₂ b₂ => if a0 + a₂ = a0 + b0✝ then ↑f a0 * b₂ else 0) b (↑g b) = 0\n[PROOFSTEP]\nsimp only [not_mem_support_iff.mp af, zero_mul, ite_self]\n[GOAL]\ncase refine'_3.refine'_2\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Add A\nf g : AddMonoidAlgebra R A\na0 b0 : A\nh : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0\n⊢ ¬b0 ∈ g.support → (fun a₂ b₂ => if a0 + a₂ = a0 + b0 then ↑f a0 * b₂ else 0) b0 (↑g b0) = 0\n[PROOFSTEP]\nexact fun bf0 => by simp [not_mem_support_iff.mp bf0]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Add A\nf g : AddMonoidAlgebra R A\na0 b0 : A\nh : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0\nbf0 : ¬b0 ∈ g.support\n⊢ (fun a₂ b₂ => if a0 + a₂ = a0 + b0 then ↑f a0 * b₂ else 0) b0 (↑g b0) = 0\n[PROOFSTEP]\nsimp [not_mem_support_iff.mp bf0]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : AddLeftCancelSemigroup A\ng : AddMonoidAlgebra R A\na x : A\nhx : x ∈ (single a 1 * g).support\n⊢ ∃ b, b ∈ g.support ∧ a + b = x\n[PROOFSTEP]\nrwa [support_single_mul _ _ (fun y => by rw [one_mul] : ∀ y : R, 1 * y = 0 ↔ _), Finset.mem_map] at hx \n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : AddLeftCancelSemigroup A\ng : AddMonoidAlgebra R A\na x : A\nhx : x ∈ (single a 1 * g).support\ny : R\n⊢ 1 * y = 0 ↔ y = 0\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : AddRightCancelSemigroup A\nf : AddMonoidAlgebra R A\nb x : A\nhx : x ∈ (f * single b 1).support\n⊢ ∃ a, a ∈ f.support ∧ a + b = x\n[PROOFSTEP]\nrwa [support_mul_single _ _ (fun y => by rw [mul_one] : ∀ y : R, y * 1 = 0 ↔ _), Finset.mem_map] at hx \n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝¹ : Semiring R\ninst✝ : AddRightCancelSemigroup A\nf : AddMonoidAlgebra R A\nb x : A\nhx : x ∈ (f * single b 1).support\ny : R\n⊢ y * 1 = 0 ↔ y = 0\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f * g = 0\n⊢ f = 0 ∨ g = 0\n[PROOFSTEP]\ncontrapose! fg\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\n⊢ f * g ≠ 0\n[PROOFSTEP]\nlet gmin : A := g.support.min' (support_nonempty_iff.mpr fg.2)\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\n⊢ f * g ≠ 0\n[PROOFSTEP]\nrefine' support_nonempty_iff.mp _\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\n⊢ Finset.Nonempty (f * g).support\n[PROOFSTEP]\nobtain ⟨a, ha, H⟩ :=\n  Right.exists_add_of_mem_support_single_mul gmin\n    ((f * single gmin 1 : AddMonoidAlgebra R A).support.min'\n      (by rw [support_mul_single] <;> simp [support_nonempty_iff.mpr fg.1]))\n    (Finset.min'_mem _ _)\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\n⊢ Finset.Nonempty (f * single gmin 1).support\n[PROOFSTEP]\nrw [support_mul_single]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\n⊢ Finset.Nonempty (Finset.map (addRightEmbedding gmin) f.support)\n[PROOFSTEP]\nsimp [support_nonempty_iff.mpr fg.1]\n[GOAL]\ncase hr\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\n⊢ ∀ (y : R), y * 1 = 0 ↔ y = 0\n[PROOFSTEP]\nsimp [support_nonempty_iff.mpr fg.1]\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\n⊢ Finset.Nonempty (f * g).support\n[PROOFSTEP]\nrefine' ⟨a + gmin, mem_support_iff.mpr _⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\n⊢ ↑(f * g) (a + gmin) ≠ 0\n[PROOFSTEP]\nrw [mul_apply_add_eq_mul_of_forall_ne _]\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\n⊢ ↑f a * ↑g gmin ≠ 0\n[PROOFSTEP]\nrefine' mul_ne_zero _ _\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\n⊢ ↑f a ≠ 0\ncase intro.intro.refine'_2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\n⊢ ↑g gmin ≠ 0\n[PROOFSTEP]\nexacts [mem_support_iff.mp ha, mem_support_iff.mp (Finset.min'_mem _ _)]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\n⊢ ∀ {a_1 b : A}, a_1 ∈ f.support → b ∈ g.support → a_1 ≠ a ∨ b ≠ gmin → a_1 + b ≠ a + gmin\n[PROOFSTEP]\nrw [H]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\n⊢ ∀ {a_1 b : A},\n    a_1 ∈ f.support →\n      b ∈ g.support →\n        a_1 ≠ a ∨ b ≠ gmin →\n          a_1 + b ≠ Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\n[PROOFSTEP]\nrintro b c bf cg (hb | hc)\n[GOAL]\ncase inl\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ a\n⊢ b + c ≠ Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\n[PROOFSTEP]\nrefine' ne_of_gt _\n[GOAL]\ncase inr\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ gmin\n⊢ b + c ≠ Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\n[PROOFSTEP]\nrefine' ne_of_gt _\n[GOAL]\ncase inl\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ a\n⊢ Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support) < b + c\n[PROOFSTEP]\nrefine' lt_of_lt_of_le (_ : _ < b + gmin) _\n[GOAL]\ncase inl.refine'_1\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ a\n⊢ Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support) < b + gmin\n[PROOFSTEP]\napply Finset.min'_lt_of_mem_erase_min'\n[GOAL]\ncase inl.refine'_1.ha\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ a\n⊢ b + gmin ∈\n    Finset.erase (f * single gmin 1).support\n      (Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support))\n[PROOFSTEP]\nrw [← H]\n[GOAL]\ncase inl.refine'_1.ha\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ a\n⊢ b + gmin ∈ Finset.erase (f * single gmin 1).support (a + gmin)\n[PROOFSTEP]\napply Finset.mem_erase_of_ne_of_mem\n[GOAL]\ncase inl.refine'_1.ha.a\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ a\n⊢ b + gmin ≠ a + gmin\n[PROOFSTEP]\nsimpa only [Ne.def, add_left_inj]\n[GOAL]\ncase inl.refine'_1.ha.a\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ a\n⊢ b + gmin ∈ (f * single gmin 1).support\n[PROOFSTEP]\nrw [support_mul_single _ _ (fun y => by rw [mul_one] : ∀ y : R, y * 1 = 0 ↔ _)]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ a\ny : R\n⊢ y * 1 = 0 ↔ y = 0\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase inl.refine'_1.ha.a\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ a\n⊢ b + gmin ∈ Finset.map (addRightEmbedding gmin) f.support\n[PROOFSTEP]\nsimpa only [Finset.mem_map, addRightEmbedding_apply, add_left_inj, exists_prop, exists_eq_right]\n[GOAL]\ncase inl.refine'_2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ a\n⊢ b + gmin ≤ b + c\n[PROOFSTEP]\nhaveI : CovariantClass A A (· + ·) (· ≤ ·) := Add.to_covariantClass_left A\n[GOAL]\ncase inl.refine'_2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ a\nthis : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ b + gmin ≤ b + c\n[PROOFSTEP]\nexact add_le_add_left (Finset.min'_le _ _ cg) _\n[GOAL]\ncase inr\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ gmin\n⊢ Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support) < b + c\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (_ : _ ≤ b + gmin) _\n[GOAL]\ncase inr.refine'_1\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ gmin\n⊢ Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support) ≤ b + gmin\n[PROOFSTEP]\napply Finset.min'_le\n[GOAL]\ncase inr.refine'_1.H2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ gmin\n⊢ b + gmin ∈ (f * single gmin 1).support\n[PROOFSTEP]\nrw [support_mul_single _ _ (fun y => by rw [mul_one] : ∀ y : R, y * 1 = 0 ↔ _)]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ gmin\ny : R\n⊢ y * 1 = 0 ↔ y = 0\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase inr.refine'_1.H2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ gmin\n⊢ b + gmin ∈ Finset.map (addRightEmbedding gmin) f.support\n[PROOFSTEP]\nsimp only [bf, Finset.mem_map, addRightEmbedding_apply, add_left_inj, exists_prop, exists_eq_right]\n[GOAL]\ncase inr.refine'_2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ gmin\n⊢ b + gmin < b + c\n[PROOFSTEP]\nrefine' add_lt_add_left _ _\n[GOAL]\ncase inr.refine'_2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddRightCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\ngmin : A := Finset.min' g.support (_ : Finset.Nonempty g.support)\na : A\nha : a ∈ f.support\nH : a + gmin = Finset.min' (f * single gmin 1).support (_ : Finset.Nonempty (f * single gmin 1).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ gmin\n⊢ gmin < c\n[PROOFSTEP]\nexact Finset.min'_lt_of_mem_erase_min' _ _ (Finset.mem_erase.mpr ⟨hc, cg⟩)\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f * g = 0\n⊢ f = 0 ∨ g = 0\n[PROOFSTEP]\ncontrapose! fg\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\n⊢ f * g ≠ 0\n[PROOFSTEP]\nlet fmin : A := f.support.min' (support_nonempty_iff.mpr fg.1)\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\n⊢ f * g ≠ 0\n[PROOFSTEP]\nrefine' support_nonempty_iff.mp _\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\n⊢ Finset.Nonempty (f * g).support\n[PROOFSTEP]\nobtain ⟨a, ha, H⟩ :=\n  Left.exists_add_of_mem_support_single_mul fmin\n    ((single fmin 1 * g : AddMonoidAlgebra R A).support.min'\n      (by rw [support_single_mul] <;> simp [support_nonempty_iff.mpr fg.2]))\n    (Finset.min'_mem _ _)\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\n⊢ Finset.Nonempty (single fmin 1 * g).support\n[PROOFSTEP]\nrw [support_single_mul]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\n⊢ Finset.Nonempty (Finset.map (addLeftEmbedding fmin) g.support)\n[PROOFSTEP]\nsimp [support_nonempty_iff.mpr fg.2]\n[GOAL]\ncase hr\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\n⊢ ∀ (y : R), 1 * y = 0 ↔ y = 0\n[PROOFSTEP]\nsimp [support_nonempty_iff.mpr fg.2]\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\n⊢ Finset.Nonempty (f * g).support\n[PROOFSTEP]\nrefine' ⟨fmin + a, mem_support_iff.mpr _⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\n⊢ ↑(f * g) (fmin + a) ≠ 0\n[PROOFSTEP]\nrw [mul_apply_add_eq_mul_of_forall_ne _]\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\n⊢ ↑f fmin * ↑g a ≠ 0\n[PROOFSTEP]\nrefine' mul_ne_zero _ _\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\n⊢ ↑f fmin ≠ 0\ncase intro.intro.refine'_2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\n⊢ ↑g a ≠ 0\n[PROOFSTEP]\nexacts [mem_support_iff.mp (Finset.min'_mem _ _), mem_support_iff.mp ha]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\n⊢ ∀ {a_1 b : A}, a_1 ∈ f.support → b ∈ g.support → a_1 ≠ fmin ∨ b ≠ a → a_1 + b ≠ fmin + a\n[PROOFSTEP]\nrw [H]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\n⊢ ∀ {a_1 b : A},\n    a_1 ∈ f.support →\n      b ∈ g.support →\n        a_1 ≠ fmin ∨ b ≠ a →\n          a_1 + b ≠ Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\n[PROOFSTEP]\nrintro b c bf cg (hb | hc)\n[GOAL]\ncase inl\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ fmin\n⊢ b + c ≠ Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\n[PROOFSTEP]\nrefine' ne_of_gt _\n[GOAL]\ncase inr\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ a\n⊢ b + c ≠ Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\n[PROOFSTEP]\nrefine' ne_of_gt _\n[GOAL]\ncase inl\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ fmin\n⊢ Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support) < b + c\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (_ : _ ≤ fmin + c) _\n[GOAL]\ncase inl.refine'_1\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ fmin\n⊢ Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support) ≤ fmin + c\n[PROOFSTEP]\napply Finset.min'_le\n[GOAL]\ncase inl.refine'_1.H2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ fmin\n⊢ fmin + c ∈ (single fmin 1 * g).support\n[PROOFSTEP]\nrw [support_single_mul _ _ (fun y => by rw [one_mul] : ∀ y : R, 1 * y = 0 ↔ _)]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ fmin\ny : R\n⊢ 1 * y = 0 ↔ y = 0\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\ncase inl.refine'_1.H2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ fmin\n⊢ fmin + c ∈ Finset.map (addLeftEmbedding fmin) g.support\n[PROOFSTEP]\nsimp only [cg, Finset.mem_map, addLeftEmbedding_apply, add_right_inj, exists_prop, exists_eq_right]\n[GOAL]\ncase inl.refine'_2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ fmin\n⊢ fmin + c < b + c\n[PROOFSTEP]\nrefine' add_lt_add_right _ _\n[GOAL]\ncase inl.refine'_2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhb : b ≠ fmin\n⊢ fmin < b\n[PROOFSTEP]\nexact Finset.min'_lt_of_mem_erase_min' _ _ (Finset.mem_erase.mpr ⟨hb, bf⟩)\n[GOAL]\ncase inr\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ a\n⊢ Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support) < b + c\n[PROOFSTEP]\nrefine' lt_of_lt_of_le (_ : _ < fmin + c) _\n[GOAL]\ncase inr.refine'_1\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ a\n⊢ Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support) < fmin + c\n[PROOFSTEP]\napply Finset.min'_lt_of_mem_erase_min'\n[GOAL]\ncase inr.refine'_1.ha\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ a\n⊢ fmin + c ∈\n    Finset.erase (single fmin 1 * g).support\n      (Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support))\n[PROOFSTEP]\nrw [← H]\n[GOAL]\ncase inr.refine'_1.ha\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ a\n⊢ fmin + c ∈ Finset.erase (single fmin 1 * g).support (fmin + a)\n[PROOFSTEP]\napply Finset.mem_erase_of_ne_of_mem\n[GOAL]\ncase inr.refine'_1.ha.a\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ a\n⊢ fmin + c ≠ fmin + a\n[PROOFSTEP]\nsimpa only [Ne.def, add_right_inj]\n[GOAL]\ncase inr.refine'_1.ha.a\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ a\n⊢ fmin + c ∈ (single fmin 1 * g).support\n[PROOFSTEP]\nrw [support_single_mul _ _ (fun y => by rw [one_mul] : ∀ y : R, 1 * y = 0 ↔ _)]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ a\ny : R\n⊢ 1 * y = 0 ↔ y = 0\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\ncase inr.refine'_1.ha.a\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ a\n⊢ fmin + c ∈ Finset.map (addLeftEmbedding fmin) g.support\n[PROOFSTEP]\nsimpa only [Finset.mem_map, addLeftEmbedding_apply, add_right_inj, exists_prop, exists_eq_right]\n[GOAL]\ncase inr.refine'_2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ a\n⊢ fmin + c ≤ b + c\n[PROOFSTEP]\nhaveI : CovariantClass A A (Function.swap (· + ·)) (· ≤ ·) := Add.to_covariantClass_right A\n[GOAL]\ncase inr.refine'_2\nR : Type u_1\nA : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : NoZeroDivisors R\ninst✝² : AddLeftCancelSemigroup A\ninst✝¹ : LinearOrder A\ninst✝ : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nf g : AddMonoidAlgebra R A\nfg : f ≠ 0 ∧ g ≠ 0\nfmin : A := Finset.min' f.support (_ : Finset.Nonempty f.support)\na : A\nha : a ∈ g.support\nH : fmin + a = Finset.min' (single fmin 1 * g).support (_ : Finset.Nonempty (single fmin 1 * g).support)\nb c : A\nbf : b ∈ f.support\ncg : c ∈ g.support\nhc : c ≠ a\nthis : CovariantClass A A (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ fmin + c ≤ b + c\n[PROOFSTEP]\nexact add_le_add_right (Finset.min'_le _ _ bf) _\n", "meta": {"mathlib_filename": "Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors", "llama_tokens": 21077, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.749087201911703, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.395006059020207}}
{"text": "[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ns : Set α\nφ : ι → Set α\nhs : MeasurableSet s\nae_eventually_mem : ∀ᵐ (x : α) ∂μ, x ∈ s → ∀ᶠ (n : ι) in l, x ∈ φ n\nmeasurable : ∀ (n : ι), MeasurableSet (φ n)\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, ∀ᶠ (i : ι) in l, x ∈ φ i\n[PROOFSTEP]\nrwa [ae_restrict_iff' hs]\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nβ : Type u_3\ninst✝² : MeasurableSpace β\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NeBot l\nf : α → β\nφ : ι → Set α\nhφ : AECover μ l φ\nhfm : ∀ (i : ι), AEMeasurable f\n⊢ AEMeasurable f\n[PROOFSTEP]\nobtain ⟨u, hu⟩ := l.exists_seq_tendsto\n[GOAL]\ncase intro\nα : Type u_1\nι : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nβ : Type u_3\ninst✝² : MeasurableSpace β\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NeBot l\nf : α → β\nφ : ι → Set α\nhφ : AECover μ l φ\nhfm : ∀ (i : ι), AEMeasurable f\nu : ℕ → ι\nhu : Tendsto u atTop l\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave := aemeasurable_iUnion_iff.mpr fun n : ℕ => hfm (u n)\n[GOAL]\ncase intro\nα : Type u_1\nι : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nβ : Type u_3\ninst✝² : MeasurableSpace β\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NeBot l\nf : α → β\nφ : ι → Set α\nhφ : AECover μ l φ\nhfm : ∀ (i : ι), AEMeasurable f\nu : ℕ → ι\nhu : Tendsto u atTop l\nthis : AEMeasurable f\n⊢ AEMeasurable f\n[PROOFSTEP]\nrwa [Measure.restrict_eq_self_of_ae_mem] at this \n[GOAL]\ncase intro.hs\nα : Type u_1\nι : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nβ : Type u_3\ninst✝² : MeasurableSpace β\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NeBot l\nf : α → β\nφ : ι → Set α\nhφ : AECover μ l φ\nhfm : ∀ (i : ι), AEMeasurable f\nu : ℕ → ι\nhu : Tendsto u atTop l\nthis : AEMeasurable f\n⊢ ∀ᵐ (x : α) ∂μ, x ∈ ⋃ (i : ℕ), φ (u i)\n[PROOFSTEP]\nfilter_upwards [hφ.ae_eventually_mem] with x hx using mem_iUnion.mpr (hu.eventually hx).exists\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nβ : Type u_3\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NeBot l\nf : α → β\nφ : ι → Set α\nhφ : AECover μ l φ\nhfm : ∀ (i : ι), AEStronglyMeasurable f (Measure.restrict μ (φ i))\n⊢ AEStronglyMeasurable f μ\n[PROOFSTEP]\nobtain ⟨u, hu⟩ := l.exists_seq_tendsto\n[GOAL]\ncase intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nβ : Type u_3\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NeBot l\nf : α → β\nφ : ι → Set α\nhφ : AECover μ l φ\nhfm : ∀ (i : ι), AEStronglyMeasurable f (Measure.restrict μ (φ i))\nu : ℕ → ι\nhu : Tendsto u atTop l\n⊢ AEStronglyMeasurable f μ\n[PROOFSTEP]\nhave := aestronglyMeasurable_iUnion_iff.mpr fun n : ℕ => hfm (u n)\n[GOAL]\ncase intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nβ : Type u_3\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NeBot l\nf : α → β\nφ : ι → Set α\nhφ : AECover μ l φ\nhfm : ∀ (i : ι), AEStronglyMeasurable f (Measure.restrict μ (φ i))\nu : ℕ → ι\nhu : Tendsto u atTop l\nthis : AEStronglyMeasurable f (Measure.restrict μ (⋃ (i : ℕ), φ (u i)))\n⊢ AEStronglyMeasurable f μ\n[PROOFSTEP]\nrwa [Measure.restrict_eq_self_of_ae_mem] at this \n[GOAL]\ncase intro.hs\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nβ : Type u_3\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NeBot l\nf : α → β\nφ : ι → Set α\nhφ : AECover μ l φ\nhfm : ∀ (i : ι), AEStronglyMeasurable f (Measure.restrict μ (φ i))\nu : ℕ → ι\nhu : Tendsto u atTop l\nthis : AEStronglyMeasurable f (Measure.restrict μ (⋃ (i : ℕ), φ (u i)))\n⊢ ∀ᵐ (x : α) ∂μ, x ∈ ⋃ (i : ℕ), φ (u i)\n[PROOFSTEP]\nfilter_upwards [hφ.ae_eventually_mem] with x hx using mem_iUnion.mpr (hu.eventually hx).exists\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝² : Countable ι\ninst✝¹ : MeasurableSpace α\nμ : Measure α\ninst✝ : Preorder ι\nφ : ι → Set α\nhφ : AECover μ atTop φ\nx : α\nh : ∀ᶠ (i : ι) in atTop, x ∈ φ i\n⊢ ∀ᶠ (i : ι) in atTop, x ∈ ⋂ (k : ι) (_ : k ∈ Ici i), φ k\n[PROOFSTEP]\nsimpa only [mem_iInter, mem_Ici, eventually_forall_ge_atTop]\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nφ : ℕ → Set α\nhφ : AECover μ atTop φ\nf : α → ℝ≥0∞\nhfm : AEMeasurable f\n⊢ Tendsto (fun x => ∫⁻ (x : α) in φ x, f x ∂μ) atTop (𝓝 (∫⁻ (x : α), f x ∂μ))\n[PROOFSTEP]\nhave lim₁ :=\n  lintegral_tendsto_of_monotone_of_nat hφ.biInter_Ici_aecover\n    (fun i j hij => biInter_subset_biInter_left (Ici_subset_Ici.mpr hij)) hfm\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nφ : ℕ → Set α\nhφ : AECover μ atTop φ\nf : α → ℝ≥0∞\nhfm : AEMeasurable f\nlim₁ : Tendsto (fun i => ∫⁻ (x : α) in ⋂ (k : ℕ) (_ : k ∈ Ici i), φ k, f x ∂μ) atTop (𝓝 (∫⁻ (x : α), f x ∂μ))\n⊢ Tendsto (fun x => ∫⁻ (x : α) in φ x, f x ∂μ) atTop (𝓝 (∫⁻ (x : α), f x ∂μ))\n[PROOFSTEP]\nhave lim₂ :=\n  lintegral_tendsto_of_monotone_of_nat hφ.biUnion_Iic_aecover\n    (fun i j hij => biUnion_subset_biUnion_left (Iic_subset_Iic.mpr hij)) hfm\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nφ : ℕ → Set α\nhφ : AECover μ atTop φ\nf : α → ℝ≥0∞\nhfm : AEMeasurable f\nlim₁ : Tendsto (fun i => ∫⁻ (x : α) in ⋂ (k : ℕ) (_ : k ∈ Ici i), φ k, f x ∂μ) atTop (𝓝 (∫⁻ (x : α), f x ∂μ))\nlim₂ : Tendsto (fun i => ∫⁻ (x : α) in ⋃ (k : ℕ) (_ : k ∈ Iic i), φ k, f x ∂μ) atTop (𝓝 (∫⁻ (x : α), f x ∂μ))\n⊢ Tendsto (fun x => ∫⁻ (x : α) in φ x, f x ∂μ) atTop (𝓝 (∫⁻ (x : α), f x ∂μ))\n[PROOFSTEP]\nrefine tendsto_of_tendsto_of_tendsto_of_le_of_le lim₁ lim₂ (fun n ↦ ?_) fun n ↦ ?_\n[GOAL]\ncase refine_1\nα : Type u_1\nι : Type u_2\ninst✝ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nφ : ℕ → Set α\nhφ : AECover μ atTop φ\nf : α → ℝ≥0∞\nhfm : AEMeasurable f\nlim₁ : Tendsto (fun i => ∫⁻ (x : α) in ⋂ (k : ℕ) (_ : k ∈ Ici i), φ k, f x ∂μ) atTop (𝓝 (∫⁻ (x : α), f x ∂μ))\nlim₂ : Tendsto (fun i => ∫⁻ (x : α) in ⋃ (k : ℕ) (_ : k ∈ Iic i), φ k, f x ∂μ) atTop (𝓝 (∫⁻ (x : α), f x ∂μ))\nn : ℕ\n⊢ ∫⁻ (x : α) in ⋂ (k : ℕ) (_ : k ∈ Ici n), φ k, f x ∂μ ≤ ∫⁻ (x : α) in φ n, f x ∂μ\ncase refine_2\nα : Type u_1\nι : Type u_2\ninst✝ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\nφ : ℕ → Set α\nhφ : AECover μ atTop φ\nf : α → ℝ≥0∞\nhfm : AEMeasurable f\nlim₁ : Tendsto (fun i => ∫⁻ (x : α) in ⋂ (k : ℕ) (_ : k ∈ Ici i), φ k, f x ∂μ) atTop (𝓝 (∫⁻ (x : α), f x ∂μ))\nlim₂ : Tendsto (fun i => ∫⁻ (x : α) in ⋃ (k : ℕ) (_ : k ∈ Iic i), φ k, f x ∂μ) atTop (𝓝 (∫⁻ (x : α), f x ∂μ))\nn : ℕ\n⊢ ∫⁻ (x : α) in φ n, f x ∂μ ≤ ∫⁻ (x : α) in ⋃ (k : ℕ) (_ : k ∈ Iic n), φ k, f x ∂μ\n[PROOFSTEP]\nexacts [lintegral_mono_set (biInter_subset_of_mem left_mem_Ici),\n  lintegral_mono_set (subset_biUnion_of_mem right_mem_Iic)]\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : Nonempty ι\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → ℝ≥0∞\nhfm : AEMeasurable f\n⊢ ⨆ (i : ι), ∫⁻ (x : α) in φ i, f x ∂μ = ∫⁻ (x : α), f x ∂μ\n[PROOFSTEP]\nhave := hφ.lintegral_tendsto_of_countably_generated hfm\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : Nonempty ι\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → ℝ≥0∞\nhfm : AEMeasurable f\nthis : Tendsto (fun i => ∫⁻ (x : α) in φ i, f x ∂μ) l (𝓝 (∫⁻ (x : α), f x ∂μ))\n⊢ ⨆ (i : ι), ∫⁻ (x : α) in φ i, f x ∂μ = ∫⁻ (x : α), f x ∂μ\n[PROOFSTEP]\nrefine'\n  ciSup_eq_of_forall_le_of_forall_lt_exists_gt (fun i => lintegral_mono' Measure.restrict_le_self le_rfl) fun w hw => _\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : Nonempty ι\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → ℝ≥0∞\nhfm : AEMeasurable f\nthis : Tendsto (fun i => ∫⁻ (x : α) in φ i, f x ∂μ) l (𝓝 (∫⁻ (x : α), f x ∂μ))\nw : ℝ≥0∞\nhw : w < ∫⁻ (x : α), f x ∂μ\n⊢ ∃ i, w < ∫⁻ (x : α) in φ i, f x ∂μ\n[PROOFSTEP]\nrcases exists_between hw with ⟨m, hm₁, hm₂⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : Nonempty ι\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → ℝ≥0∞\nhfm : AEMeasurable f\nthis : Tendsto (fun i => ∫⁻ (x : α) in φ i, f x ∂μ) l (𝓝 (∫⁻ (x : α), f x ∂μ))\nw : ℝ≥0∞\nhw : w < ∫⁻ (x : α), f x ∂μ\nm : ℝ≥0∞\nhm₁ : w < m\nhm₂ : m < ∫⁻ (x : α), f x ∂μ\n⊢ ∃ i, w < ∫⁻ (x : α) in φ i, f x ∂μ\n[PROOFSTEP]\nrcases(eventually_ge_of_tendsto_gt hm₂ this).exists with ⟨i, hi⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : Nonempty ι\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → ℝ≥0∞\nhfm : AEMeasurable f\nthis : Tendsto (fun i => ∫⁻ (x : α) in φ i, f x ∂μ) l (𝓝 (∫⁻ (x : α), f x ∂μ))\nw : ℝ≥0∞\nhw : w < ∫⁻ (x : α), f x ∂μ\nm : ℝ≥0∞\nhm₁ : w < m\nhm₂ : m < ∫⁻ (x : α), f x ∂μ\ni : ι\nhi : m ≤ ∫⁻ (x : α) in φ i, f x ∂μ\n⊢ ∃ i, w < ∫⁻ (x : α) in φ i, f x ∂μ\n[PROOFSTEP]\nexact ⟨i, lt_of_lt_of_le hm₁ hi⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfm : AEStronglyMeasurable f μ\nhbounded : ∀ᶠ (i : ι) in l, ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ ≤ ENNReal.ofReal I\n⊢ Integrable f\n[PROOFSTEP]\nrefine' ⟨hfm, (le_of_tendsto _ hbounded).trans_lt ENNReal.ofReal_lt_top⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfm : AEStronglyMeasurable f μ\nhbounded : ∀ᶠ (i : ι) in l, ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ ≤ ENNReal.ofReal I\n⊢ Tendsto (fun c => ∫⁻ (x : α) in φ c, ↑‖f x‖₊ ∂μ) l (𝓝 (∫⁻ (a : α), ↑‖f a‖₊ ∂μ))\n[PROOFSTEP]\nexact hφ.lintegral_tendsto_of_countably_generated hfm.ennnorm\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfm : AEStronglyMeasurable f μ\nhtendsto : Tendsto (fun i => ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ) l (𝓝 (ENNReal.ofReal I))\n⊢ Integrable f\n[PROOFSTEP]\nrefine' hφ.integrable_of_lintegral_nnnorm_bounded (max 1 (I + 1)) hfm _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfm : AEStronglyMeasurable f μ\nhtendsto : Tendsto (fun i => ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ) l (𝓝 (ENNReal.ofReal I))\n⊢ ∀ᶠ (i : ι) in l, ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ ≤ ENNReal.ofReal (max 1 (I + 1))\n[PROOFSTEP]\nrefine' htendsto.eventually (ge_mem_nhds _)\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfm : AEStronglyMeasurable f μ\nhtendsto : Tendsto (fun i => ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ) l (𝓝 (ENNReal.ofReal I))\n⊢ ENNReal.ofReal I < ENNReal.ofReal (max 1 (I + 1))\n[PROOFSTEP]\nrefine' (ENNReal.ofReal_lt_ofReal_iff (lt_max_of_lt_left zero_lt_one)).2 _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfm : AEStronglyMeasurable f μ\nhtendsto : Tendsto (fun i => ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ) l (𝓝 (ENNReal.ofReal I))\n⊢ I < max 1 (I + 1)\n[PROOFSTEP]\nexact lt_max_of_lt_right (lt_add_one I)\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ≥0\nhfm : AEStronglyMeasurable f μ\nhbounded : ∀ᶠ (i : ι) in l, ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ ≤ ↑I\n⊢ ∀ᶠ (i : ι) in l, ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ ≤ ENNReal.ofReal ↑I\n[PROOFSTEP]\nsimpa only [ENNReal.ofReal_coe_nnreal] using hbounded\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ≥0\nhfm : AEStronglyMeasurable f μ\nhtendsto : Tendsto (fun i => ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ) l (𝓝 ↑I)\n⊢ Tendsto (fun i => ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ) l (𝓝 (ENNReal.ofReal ↑I))\n[PROOFSTEP]\nsimpa only [ENNReal.ofReal_coe_nnreal] using htendsto\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ∫ (x : α) in φ i, ‖f x‖ ∂μ ≤ I\n⊢ Integrable f\n[PROOFSTEP]\nhave hfm : AEStronglyMeasurable f μ := hφ.aestronglyMeasurable fun i => (hfi i).aestronglyMeasurable\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ∫ (x : α) in φ i, ‖f x‖ ∂μ ≤ I\nhfm : AEStronglyMeasurable f μ\n⊢ Integrable f\n[PROOFSTEP]\nrefine' hφ.integrable_of_lintegral_nnnorm_bounded I hfm _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ∫ (x : α) in φ i, ‖f x‖ ∂μ ≤ I\nhfm : AEStronglyMeasurable f μ\n⊢ ∀ᶠ (i : ι) in l, ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ ≤ ENNReal.ofReal I\n[PROOFSTEP]\nconv at hbounded in integral _ _ =>\n  rw [integral_eq_lintegral_of_nonneg_ae (ae_of_all _ fun x => @norm_nonneg E _ (f x)) hfm.norm.restrict]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ∫ (x : α) in φ i, ‖f x‖ ∂μ ≤ I\nhfm : AEStronglyMeasurable f μ\ni : ι\n| ∫ (x : α) in φ i, ‖f x‖ ∂μ\n[PROOFSTEP]\nrw [integral_eq_lintegral_of_nonneg_ae (ae_of_all _ fun x => @norm_nonneg E _ (f x)) hfm.norm.restrict]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ∫ (x : α) in φ i, ‖f x‖ ∂μ ≤ I\nhfm : AEStronglyMeasurable f μ\ni : ι\n| ∫ (x : α) in φ i, ‖f x‖ ∂μ\n[PROOFSTEP]\nrw [integral_eq_lintegral_of_nonneg_ae (ae_of_all _ fun x => @norm_nonneg E _ (f x)) hfm.norm.restrict]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ∫ (x : α) in φ i, ‖f x‖ ∂μ ≤ I\nhfm : AEStronglyMeasurable f μ\ni : ι\n| ∫ (x : α) in φ i, ‖f x‖ ∂μ\n[PROOFSTEP]\nrw [integral_eq_lintegral_of_nonneg_ae (ae_of_all _ fun x => @norm_nonneg E _ (f x)) hfm.norm.restrict]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ENNReal.toReal (∫⁻ (a : α) in φ i, ENNReal.ofReal ‖f a‖ ∂μ) ≤ I\nhfm : AEStronglyMeasurable f μ\n⊢ ∀ᶠ (i : ι) in l, ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ ≤ ENNReal.ofReal I\n[PROOFSTEP]\nconv at hbounded in ENNReal.ofReal _ =>\n  dsimp\n  rw [← coe_nnnorm]\n  rw [ENNReal.ofReal_coe_nnreal]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ENNReal.toReal (∫⁻ (a : α) in φ i, ENNReal.ofReal ‖f a‖ ∂μ) ≤ I\nhfm : AEStronglyMeasurable f μ\ni : ι\na : α\n| ENNReal.ofReal ‖f a‖\n[PROOFSTEP]\n  dsimp\n  rw [← coe_nnnorm]\n  rw [ENNReal.ofReal_coe_nnreal]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ENNReal.toReal (∫⁻ (a : α) in φ i, ENNReal.ofReal ‖f a‖ ∂μ) ≤ I\nhfm : AEStronglyMeasurable f μ\ni : ι\na : α\n| ENNReal.ofReal ‖f a‖\n[PROOFSTEP]\n  dsimp\n  rw [← coe_nnnorm]\n  rw [ENNReal.ofReal_coe_nnreal]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ENNReal.toReal (∫⁻ (a : α) in φ i, ENNReal.ofReal ‖f a‖ ∂μ) ≤ I\nhfm : AEStronglyMeasurable f μ\ni : ι\na : α\n| ENNReal.ofReal ‖f a‖\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ENNReal.toReal (∫⁻ (a : α) in φ i, ENNReal.ofReal ‖f a‖ ∂μ) ≤ I\nhfm : AEStronglyMeasurable f μ\ni : ι\na : α\n| ENNReal.ofReal ‖f a‖\n[PROOFSTEP]\nrw [← coe_nnnorm]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ENNReal.toReal (∫⁻ (a : α) in φ i, ENNReal.ofReal ‖f a‖ ∂μ) ≤ I\nhfm : AEStronglyMeasurable f μ\ni : ι\na : α\n| ENNReal.ofReal ↑‖f a‖₊\n[PROOFSTEP]\nrw [ENNReal.ofReal_coe_nnreal]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ENNReal.toReal (∫⁻ (a : α) in φ i, ↑‖f a‖₊ ∂μ) ≤ I\nhfm : AEStronglyMeasurable f μ\n⊢ ∀ᶠ (i : ι) in l, ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ ≤ ENNReal.ofReal I\n[PROOFSTEP]\nrefine' hbounded.mono fun i hi => _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ENNReal.toReal (∫⁻ (a : α) in φ i, ↑‖f a‖₊ ∂μ) ≤ I\nhfm : AEStronglyMeasurable f μ\ni : ι\nhi : ENNReal.toReal (∫⁻ (a : α) in φ i, ↑‖f a‖₊ ∂μ) ≤ I\n⊢ ∫⁻ (x : α) in φ i, ↑‖f x‖₊ ∂μ ≤ ENNReal.ofReal I\n[PROOFSTEP]\nrw [← ENNReal.ofReal_toReal (ne_top_of_lt (hfi i).2)]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝³ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NeBot l\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (φ i)\nhbounded : ∀ᶠ (i : ι) in l, ENNReal.toReal (∫⁻ (a : α) in φ i, ↑‖f a‖₊ ∂μ) ≤ I\nhfm : AEStronglyMeasurable f μ\ni : ι\nhi : ENNReal.toReal (∫⁻ (a : α) in φ i, ↑‖f a‖₊ ∂μ) ≤ I\n⊢ ENNReal.ofReal (ENNReal.toReal (∫⁻ (a : α) in φ i, ↑‖f a‖₊ ∂μ)) ≤ ENNReal.ofReal I\n[PROOFSTEP]\napply ENNReal.ofReal_le_ofReal hi\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝⁴ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nhfi : Integrable f\nh : Tendsto (fun i => ∫ (x : α), indicator (φ i) f x ∂μ) l (𝓝 (∫ (x : α), f x ∂μ))\n⊢ Tendsto (fun i => ∫ (x : α) in φ i, f x ∂μ) l (𝓝 (∫ (x : α), f x ∂μ))\n[PROOFSTEP]\nconvert h using 2\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nι : Type u_2\nE : Type u_3\ninst✝⁴ : MeasurableSpace α\nμ : Measure α\nl : Filter ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\ninst✝ : IsCountablyGenerated l\nφ : ι → Set α\nhφ : AECover μ l φ\nf : α → E\nhfi : Integrable f\nh : Tendsto (fun i => ∫ (x : α), indicator (φ i) f x ∂μ) l (𝓝 (∫ (x : α), f x ∂μ))\nx✝ : ι\n⊢ ∫ (x : α) in φ x✝, f x ∂μ = ∫ (x : α), indicator (φ x✝) f x ∂μ\n[PROOFSTEP]\nrw [integral_indicator (hφ.measurableSet _)]\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b : ι → ℝ\nf : ℝ → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) (b i))\nha : Tendsto a l atBot\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b i, ‖f x‖ ∂μ ≤ I\n⊢ Integrable f\n[PROOFSTEP]\nhave hφ : AECover μ l _ := aecover_Ioc ha hb\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b : ι → ℝ\nf : ℝ → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) (b i))\nha : Tendsto a l atBot\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b i, ‖f x‖ ∂μ ≤ I\nhφ : AECover μ l fun i => Ioc (a i) (b i)\n⊢ Integrable f\n[PROOFSTEP]\nrefine' hφ.integrable_of_integral_norm_bounded I hfi (h.mp _)\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b : ι → ℝ\nf : ℝ → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) (b i))\nha : Tendsto a l atBot\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b i, ‖f x‖ ∂μ ≤ I\nhφ : AECover μ l fun i => Ioc (a i) (b i)\n⊢ ∀ᶠ (x : ι) in l, ∫ (x : ℝ) in a x..b x, ‖f x‖ ∂μ ≤ I → ∫ (x : ℝ) in Ioc (a x) (b x), ‖f x‖ ∂μ ≤ I\n[PROOFSTEP]\nfilter_upwards [ha.eventually (eventually_le_atBot 0), hb.eventually (eventually_ge_atTop 0)] with i hai hbi ht\n[GOAL]\ncase h\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b : ι → ℝ\nf : ℝ → E\nI : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) (b i))\nha : Tendsto a l atBot\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b i, ‖f x‖ ∂μ ≤ I\nhφ : AECover μ l fun i => Ioc (a i) (b i)\ni : ι\nhai : a i ≤ 0\nhbi : 0 ≤ b i\nht : ∫ (x : ℝ) in a i..b i, ‖f x‖ ∂μ ≤ I\n⊢ ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ∂μ ≤ I\n[PROOFSTEP]\nrwa [← intervalIntegral.integral_of_le (hai.trans hbi)]\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b✝ : ι → ℝ\nf : ℝ → E\nI b : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) b)\nha : Tendsto a l atBot\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b, ‖f x‖ ∂μ ≤ I\n⊢ IntegrableOn f (Iic b)\n[PROOFSTEP]\nhave hφ : AECover (μ.restrict <| Iic b) l _ := aecover_Ioi ha\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b✝ : ι → ℝ\nf : ℝ → E\nI b : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) b)\nha : Tendsto a l atBot\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Iic b)) l fun i => Ioi (a i)\n⊢ IntegrableOn f (Iic b)\n[PROOFSTEP]\nhave hfi : ∀ i, IntegrableOn f (Ioi (a i)) (μ.restrict <| Iic b) :=\n  by\n  intro i\n  rw [IntegrableOn, Measure.restrict_restrict (hφ.measurableSet i)]\n  exact hfi i\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b✝ : ι → ℝ\nf : ℝ → E\nI b : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) b)\nha : Tendsto a l atBot\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Iic b)) l fun i => Ioi (a i)\n⊢ ∀ (i : ι), IntegrableOn f (Ioi (a i))\n[PROOFSTEP]\nintro i\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b✝ : ι → ℝ\nf : ℝ → E\nI b : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) b)\nha : Tendsto a l atBot\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Iic b)) l fun i => Ioi (a i)\ni : ι\n⊢ IntegrableOn f (Ioi (a i))\n[PROOFSTEP]\nrw [IntegrableOn, Measure.restrict_restrict (hφ.measurableSet i)]\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b✝ : ι → ℝ\nf : ℝ → E\nI b : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) b)\nha : Tendsto a l atBot\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Iic b)) l fun i => Ioi (a i)\ni : ι\n⊢ Integrable f\n[PROOFSTEP]\nexact hfi i\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b✝ : ι → ℝ\nf : ℝ → E\nI b : ℝ\nhfi✝ : ∀ (i : ι), IntegrableOn f (Ioc (a i) b)\nha : Tendsto a l atBot\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Iic b)) l fun i => Ioi (a i)\nhfi : ∀ (i : ι), IntegrableOn f (Ioi (a i))\n⊢ IntegrableOn f (Iic b)\n[PROOFSTEP]\nrefine' hφ.integrable_of_integral_norm_bounded I hfi (h.mp _)\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b✝ : ι → ℝ\nf : ℝ → E\nI b : ℝ\nhfi✝ : ∀ (i : ι), IntegrableOn f (Ioc (a i) b)\nha : Tendsto a l atBot\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Iic b)) l fun i => Ioi (a i)\nhfi : ∀ (i : ι), IntegrableOn f (Ioi (a i))\n⊢ ∀ᶠ (x : ι) in l, ∫ (x : ℝ) in a x..b, ‖f x‖ ∂μ ≤ I → ∫ (x : ℝ) in Ioi (a x), ‖f x‖ ∂Measure.restrict μ (Iic b) ≤ I\n[PROOFSTEP]\nfilter_upwards [ha.eventually (eventually_le_atBot b)] with i hai\n[GOAL]\ncase h\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b✝ : ι → ℝ\nf : ℝ → E\nI b : ℝ\nhfi✝ : ∀ (i : ι), IntegrableOn f (Ioc (a i) b)\nha : Tendsto a l atBot\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Iic b)) l fun i => Ioi (a i)\nhfi : ∀ (i : ι), IntegrableOn f (Ioi (a i))\ni : ι\nhai : a i ≤ b\n⊢ ∫ (x : ℝ) in a i..b, ‖f x‖ ∂μ ≤ I → ∫ (x : ℝ) in Ioi (a i), ‖f x‖ ∂Measure.restrict μ (Iic b) ≤ I\n[PROOFSTEP]\nrw [intervalIntegral.integral_of_le hai, Measure.restrict_restrict (hφ.measurableSet i)]\n[GOAL]\ncase h\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b✝ : ι → ℝ\nf : ℝ → E\nI b : ℝ\nhfi✝ : ∀ (i : ι), IntegrableOn f (Ioc (a i) b)\nha : Tendsto a l atBot\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Iic b)) l fun i => Ioi (a i)\nhfi : ∀ (i : ι), IntegrableOn f (Ioi (a i))\ni : ι\nhai : a i ≤ b\n⊢ ∫ (x : ℝ) in Ioc (a i) b, ‖f x‖ ∂μ ≤ I → ∫ (x : ℝ) in Ioi (a i) ∩ Iic b, ‖f x‖ ∂μ ≤ I\n[PROOFSTEP]\nexact id\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na✝ b : ι → ℝ\nf : ℝ → E\nI a : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc a (b i))\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a..b i, ‖f x‖ ∂μ ≤ I\n⊢ IntegrableOn f (Ioi a)\n[PROOFSTEP]\nhave hφ : AECover (μ.restrict <| Ioi a) l _ := aecover_Iic hb\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na✝ b : ι → ℝ\nf : ℝ → E\nI a : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc a (b i))\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a..b i, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Ioi a)) l fun i => Iic (b i)\n⊢ IntegrableOn f (Ioi a)\n[PROOFSTEP]\nhave hfi : ∀ i, IntegrableOn f (Iic (b i)) (μ.restrict <| Ioi a) :=\n  by\n  intro i\n  rw [IntegrableOn, Measure.restrict_restrict (hφ.measurableSet i), inter_comm]\n  exact hfi i\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na✝ b : ι → ℝ\nf : ℝ → E\nI a : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc a (b i))\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a..b i, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Ioi a)) l fun i => Iic (b i)\n⊢ ∀ (i : ι), IntegrableOn f (Iic (b i))\n[PROOFSTEP]\nintro i\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na✝ b : ι → ℝ\nf : ℝ → E\nI a : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc a (b i))\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a..b i, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Ioi a)) l fun i => Iic (b i)\ni : ι\n⊢ IntegrableOn f (Iic (b i))\n[PROOFSTEP]\nrw [IntegrableOn, Measure.restrict_restrict (hφ.measurableSet i), inter_comm]\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na✝ b : ι → ℝ\nf : ℝ → E\nI a : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc a (b i))\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a..b i, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Ioi a)) l fun i => Iic (b i)\ni : ι\n⊢ Integrable f\n[PROOFSTEP]\nexact hfi i\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na✝ b : ι → ℝ\nf : ℝ → E\nI a : ℝ\nhfi✝ : ∀ (i : ι), IntegrableOn f (Ioc a (b i))\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a..b i, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Ioi a)) l fun i => Iic (b i)\nhfi : ∀ (i : ι), IntegrableOn f (Iic (b i))\n⊢ IntegrableOn f (Ioi a)\n[PROOFSTEP]\nrefine' hφ.integrable_of_integral_norm_bounded I hfi (h.mp _)\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na✝ b : ι → ℝ\nf : ℝ → E\nI a : ℝ\nhfi✝ : ∀ (i : ι), IntegrableOn f (Ioc a (b i))\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a..b i, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Ioi a)) l fun i => Iic (b i)\nhfi : ∀ (i : ι), IntegrableOn f (Iic (b i))\n⊢ ∀ᶠ (x : ι) in l, ∫ (x : ℝ) in a..b x, ‖f x‖ ∂μ ≤ I → ∫ (x : ℝ) in Iic (b x), ‖f x‖ ∂Measure.restrict μ (Ioi a) ≤ I\n[PROOFSTEP]\nfilter_upwards [hb.eventually (eventually_ge_atTop a)] with i hbi\n[GOAL]\ncase h\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na✝ b : ι → ℝ\nf : ℝ → E\nI a : ℝ\nhfi✝ : ∀ (i : ι), IntegrableOn f (Ioc a (b i))\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a..b i, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Ioi a)) l fun i => Iic (b i)\nhfi : ∀ (i : ι), IntegrableOn f (Iic (b i))\ni : ι\nhbi : a ≤ b i\n⊢ ∫ (x : ℝ) in a..b i, ‖f x‖ ∂μ ≤ I → ∫ (x : ℝ) in Iic (b i), ‖f x‖ ∂Measure.restrict μ (Ioi a) ≤ I\n[PROOFSTEP]\nrw [intervalIntegral.integral_of_le hbi, Measure.restrict_restrict (hφ.measurableSet i), inter_comm]\n[GOAL]\ncase h\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na✝ b : ι → ℝ\nf : ℝ → E\nI a : ℝ\nhfi✝ : ∀ (i : ι), IntegrableOn f (Ioc a (b i))\nhb : Tendsto b l atTop\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a..b i, ‖f x‖ ∂μ ≤ I\nhφ : AECover (Measure.restrict μ (Ioi a)) l fun i => Iic (b i)\nhfi : ∀ (i : ι), IntegrableOn f (Iic (b i))\ni : ι\nhbi : a ≤ b i\n⊢ ∫ (x : ℝ) in Ioc a (b i), ‖f x‖ ∂μ ≤ I → ∫ (x : ℝ) in Ioi a ∩ Iic (b i), ‖f x‖ ∂μ ≤ I\n[PROOFSTEP]\nexact id\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b : ι → ℝ\nf : ℝ → E\nI a₀ b₀ : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) (b i))\nha : Tendsto a l (𝓝 a₀)\nhb : Tendsto b l (𝓝 b₀)\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\n⊢ IntegrableOn f (Ioc a₀ b₀)\n[PROOFSTEP]\nrefine\n  (aecover_Ioc_of_Ioc ha hb).integrable_of_integral_norm_bounded I (fun i => (hfi i).restrict measurableSet_Ioc)\n    (h.mono fun i hi ↦ ?_)\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b : ι → ℝ\nf : ℝ → E\nI a₀ b₀ : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) (b i))\nha : Tendsto a l (𝓝 a₀)\nhb : Tendsto b l (𝓝 b₀)\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\ni : ι\nhi : ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\n⊢ ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ∂Measure.restrict volume (Ioc a₀ b₀) ≤ I\n[PROOFSTEP]\nrw [Measure.restrict_restrict measurableSet_Ioc]\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b : ι → ℝ\nf : ℝ → E\nI a₀ b₀ : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) (b i))\nha : Tendsto a l (𝓝 a₀)\nhb : Tendsto b l (𝓝 b₀)\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\ni : ι\nhi : ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\n⊢ ∫ (x : ℝ) in Ioc (a i) (b i) ∩ Ioc a₀ b₀, ‖f x‖ ≤ I\n[PROOFSTEP]\nrefine' le_trans (set_integral_mono_set (hfi i).norm _ _) hi\n[GOAL]\ncase refine'_1\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b : ι → ℝ\nf : ℝ → E\nI a₀ b₀ : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) (b i))\nha : Tendsto a l (𝓝 a₀)\nhb : Tendsto b l (𝓝 b₀)\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\ni : ι\nhi : ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\n⊢ 0 ≤ᵐ[Measure.restrict volume (Ioc (a i) (b i))] fun x => ‖f x‖\n[PROOFSTEP]\napply ae_of_all\n[GOAL]\ncase refine'_2\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b : ι → ℝ\nf : ℝ → E\nI a₀ b₀ : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) (b i))\nha : Tendsto a l (𝓝 a₀)\nhb : Tendsto b l (𝓝 b₀)\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\ni : ι\nhi : ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\n⊢ Ioc (a i) (b i) ∩ Ioc a₀ b₀ ≤ᵐ[volume] Ioc (a i) (b i)\n[PROOFSTEP]\napply ae_of_all\n[GOAL]\ncase refine'_1.a\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b : ι → ℝ\nf : ℝ → E\nI a₀ b₀ : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) (b i))\nha : Tendsto a l (𝓝 a₀)\nhb : Tendsto b l (𝓝 b₀)\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\ni : ι\nhi : ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\n⊢ ∀ (a : ℝ), OfNat.ofNat 0 a ≤ (fun x => ‖f x‖) a\n[PROOFSTEP]\nsimp only [Pi.zero_apply, norm_nonneg, forall_const]\n[GOAL]\ncase refine'_2.a\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b : ι → ℝ\nf : ℝ → E\nI a₀ b₀ : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) (b i))\nha : Tendsto a l (𝓝 a₀)\nhb : Tendsto b l (𝓝 b₀)\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\ni : ι\nhi : ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\n⊢ ∀ (a_1 : ℝ), (Ioc (a i) (b i) ∩ Ioc a₀ b₀) a_1 ≤ Ioc (a i) (b i) a_1\n[PROOFSTEP]\nintro c hc\n[GOAL]\ncase refine'_2.a\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝² : NeBot l\ninst✝¹ : IsCountablyGenerated l\ninst✝ : NormedAddCommGroup E\na b : ι → ℝ\nf : ℝ → E\nI a₀ b₀ : ℝ\nhfi : ∀ (i : ι), IntegrableOn f (Ioc (a i) (b i))\nha : Tendsto a l (𝓝 a₀)\nhb : Tendsto b l (𝓝 b₀)\nh : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\ni : ι\nhi : ∫ (x : ℝ) in Ioc (a i) (b i), ‖f x‖ ≤ I\nc : ℝ\nhc : (Ioc (a i) (b i) ∩ Ioc a₀ b₀) c\n⊢ Ioc (a i) (b i) c\n[PROOFSTEP]\nexact hc.1\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na b : ι → ℝ\nf : ℝ → E\nhfi : Integrable f\nha : Tendsto a l atBot\nhb : Tendsto b l atTop\n⊢ Tendsto (fun i => ∫ (x : ℝ) in a i..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ), f x ∂μ))\n[PROOFSTEP]\nlet φ i := Ioc (a i) (b i)\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na b : ι → ℝ\nf : ℝ → E\nhfi : Integrable f\nha : Tendsto a l atBot\nhb : Tendsto b l atTop\nφ : ι → Set ℝ := fun i => Ioc (a i) (b i)\n⊢ Tendsto (fun i => ∫ (x : ℝ) in a i..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ), f x ∂μ))\n[PROOFSTEP]\nhave hφ : AECover μ l φ := aecover_Ioc ha hb\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na b : ι → ℝ\nf : ℝ → E\nhfi : Integrable f\nha : Tendsto a l atBot\nhb : Tendsto b l atTop\nφ : ι → Set ℝ := fun i => Ioc (a i) (b i)\nhφ : AECover μ l φ\n⊢ Tendsto (fun i => ∫ (x : ℝ) in a i..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ), f x ∂μ))\n[PROOFSTEP]\nrefine' (hφ.integral_tendsto_of_countably_generated hfi).congr' _\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na b : ι → ℝ\nf : ℝ → E\nhfi : Integrable f\nha : Tendsto a l atBot\nhb : Tendsto b l atTop\nφ : ι → Set ℝ := fun i => Ioc (a i) (b i)\nhφ : AECover μ l φ\n⊢ (fun i => ∫ (x : ℝ) in φ i, f x ∂μ) =ᶠ[l] fun i => ∫ (x : ℝ) in a i..b i, f x ∂μ\n[PROOFSTEP]\nfilter_upwards [ha.eventually (eventually_le_atBot 0), hb.eventually (eventually_ge_atTop 0)] with i hai hbi\n[GOAL]\ncase h\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na b : ι → ℝ\nf : ℝ → E\nhfi : Integrable f\nha : Tendsto a l atBot\nhb : Tendsto b l atTop\nφ : ι → Set ℝ := fun i => Ioc (a i) (b i)\nhφ : AECover μ l φ\ni : ι\nhai : a i ≤ 0\nhbi : 0 ≤ b i\n⊢ ∫ (x : ℝ) in Ioc (a i) (b i), f x ∂μ = ∫ (x : ℝ) in a i..b i, f x ∂μ\n[PROOFSTEP]\nexact (intervalIntegral.integral_of_le (hai.trans hbi)).symm\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na b✝ : ι → ℝ\nf : ℝ → E\nb : ℝ\nhfi : IntegrableOn f (Iic b)\nha : Tendsto a l atBot\n⊢ Tendsto (fun i => ∫ (x : ℝ) in a i..b, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Iic b, f x ∂μ))\n[PROOFSTEP]\nlet φ i := Ioi (a i)\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na b✝ : ι → ℝ\nf : ℝ → E\nb : ℝ\nhfi : IntegrableOn f (Iic b)\nha : Tendsto a l atBot\nφ : ι → Set ℝ := fun i => Ioi (a i)\n⊢ Tendsto (fun i => ∫ (x : ℝ) in a i..b, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Iic b, f x ∂μ))\n[PROOFSTEP]\nhave hφ : AECover (μ.restrict <| Iic b) l φ := aecover_Ioi ha\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na b✝ : ι → ℝ\nf : ℝ → E\nb : ℝ\nhfi : IntegrableOn f (Iic b)\nha : Tendsto a l atBot\nφ : ι → Set ℝ := fun i => Ioi (a i)\nhφ : AECover (Measure.restrict μ (Iic b)) l φ\n⊢ Tendsto (fun i => ∫ (x : ℝ) in a i..b, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Iic b, f x ∂μ))\n[PROOFSTEP]\nrefine' (hφ.integral_tendsto_of_countably_generated hfi).congr' _\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na b✝ : ι → ℝ\nf : ℝ → E\nb : ℝ\nhfi : IntegrableOn f (Iic b)\nha : Tendsto a l atBot\nφ : ι → Set ℝ := fun i => Ioi (a i)\nhφ : AECover (Measure.restrict μ (Iic b)) l φ\n⊢ (fun i => ∫ (x : ℝ) in φ i, f x ∂Measure.restrict μ (Iic b)) =ᶠ[l] fun i => ∫ (x : ℝ) in a i..b, f x ∂μ\n[PROOFSTEP]\nfilter_upwards [ha.eventually (eventually_le_atBot <| b)] with i hai\n[GOAL]\ncase h\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na b✝ : ι → ℝ\nf : ℝ → E\nb : ℝ\nhfi : IntegrableOn f (Iic b)\nha : Tendsto a l atBot\nφ : ι → Set ℝ := fun i => Ioi (a i)\nhφ : AECover (Measure.restrict μ (Iic b)) l φ\ni : ι\nhai : a i ≤ b\n⊢ ∫ (x : ℝ) in Ioi (a i), f x ∂Measure.restrict μ (Iic b) = ∫ (x : ℝ) in a i..b, f x ∂μ\n[PROOFSTEP]\nrw [intervalIntegral.integral_of_le hai, Measure.restrict_restrict (hφ.measurableSet i)]\n[GOAL]\ncase h\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na b✝ : ι → ℝ\nf : ℝ → E\nb : ℝ\nhfi : IntegrableOn f (Iic b)\nha : Tendsto a l atBot\nφ : ι → Set ℝ := fun i => Ioi (a i)\nhφ : AECover (Measure.restrict μ (Iic b)) l φ\ni : ι\nhai : a i ≤ b\n⊢ ∫ (x : ℝ) in φ i ∩ Iic b, f x ∂μ = ∫ (x : ℝ) in Ioc (a i) b, f x ∂μ\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na✝ b : ι → ℝ\nf : ℝ → E\na : ℝ\nhfi : IntegrableOn f (Ioi a)\nhb : Tendsto b l atTop\n⊢ Tendsto (fun i => ∫ (x : ℝ) in a..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Ioi a, f x ∂μ))\n[PROOFSTEP]\nlet φ i := Iic (b i)\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na✝ b : ι → ℝ\nf : ℝ → E\na : ℝ\nhfi : IntegrableOn f (Ioi a)\nhb : Tendsto b l atTop\nφ : ι → Set ℝ := fun i => Iic (b i)\n⊢ Tendsto (fun i => ∫ (x : ℝ) in a..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Ioi a, f x ∂μ))\n[PROOFSTEP]\nhave hφ : AECover (μ.restrict <| Ioi a) l φ := aecover_Iic hb\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na✝ b : ι → ℝ\nf : ℝ → E\na : ℝ\nhfi : IntegrableOn f (Ioi a)\nhb : Tendsto b l atTop\nφ : ι → Set ℝ := fun i => Iic (b i)\nhφ : AECover (Measure.restrict μ (Ioi a)) l φ\n⊢ Tendsto (fun i => ∫ (x : ℝ) in a..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Ioi a, f x ∂μ))\n[PROOFSTEP]\nrefine' (hφ.integral_tendsto_of_countably_generated hfi).congr' _\n[GOAL]\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na✝ b : ι → ℝ\nf : ℝ → E\na : ℝ\nhfi : IntegrableOn f (Ioi a)\nhb : Tendsto b l atTop\nφ : ι → Set ℝ := fun i => Iic (b i)\nhφ : AECover (Measure.restrict μ (Ioi a)) l φ\n⊢ (fun i => ∫ (x : ℝ) in φ i, f x ∂Measure.restrict μ (Ioi a)) =ᶠ[l] fun i => ∫ (x : ℝ) in a..b i, f x ∂μ\n[PROOFSTEP]\nfilter_upwards [hb.eventually (eventually_ge_atTop <| a)] with i hbi\n[GOAL]\ncase h\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na✝ b : ι → ℝ\nf : ℝ → E\na : ℝ\nhfi : IntegrableOn f (Ioi a)\nhb : Tendsto b l atTop\nφ : ι → Set ℝ := fun i => Iic (b i)\nhφ : AECover (Measure.restrict μ (Ioi a)) l φ\ni : ι\nhbi : a ≤ b i\n⊢ ∫ (x : ℝ) in Iic (b i), f x ∂Measure.restrict μ (Ioi a) = ∫ (x : ℝ) in a..b i, f x ∂μ\n[PROOFSTEP]\nrw [intervalIntegral.integral_of_le hbi, Measure.restrict_restrict (hφ.measurableSet i), inter_comm]\n[GOAL]\ncase h\nι : Type u_1\nE : Type u_2\nμ : Measure ℝ\nl : Filter ι\ninst✝³ : IsCountablyGenerated l\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\na✝ b : ι → ℝ\nf : ℝ → E\na : ℝ\nhfi : IntegrableOn f (Ioi a)\nhb : Tendsto b l atTop\nφ : ι → Set ℝ := fun i => Iic (b i)\nhφ : AECover (Measure.restrict μ (Ioi a)) l φ\ni : ι\nhbi : a ≤ b i\n⊢ ∫ (x : ℝ) in Ioi a ∩ φ i, f x ∂μ = ∫ (x : ℝ) in Ioc a (b i), f x ∂μ\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn f (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nf'int : IntegrableOn f' (Ioi a)\nhf : Tendsto f atTop (𝓝 m)\n⊢ ∫ (x : ℝ) in Ioi a, f' x = m - f a\n[PROOFSTEP]\nrefine' tendsto_nhds_unique (intervalIntegral_tendsto_integral_Ioi a f'int tendsto_id) _\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn f (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nf'int : IntegrableOn f' (Ioi a)\nhf : Tendsto f atTop (𝓝 m)\n⊢ Tendsto (fun i => ∫ (x : ℝ) in a..id i, f' x) atTop (𝓝 (m - f a))\n[PROOFSTEP]\napply Tendsto.congr' _ (hf.sub_const _)\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn f (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nf'int : IntegrableOn f' (Ioi a)\nhf : Tendsto f atTop (𝓝 m)\n⊢ (fun k => f k - f a) =ᶠ[atTop] fun i => ∫ (x : ℝ) in a..id i, f' x\n[PROOFSTEP]\nfilter_upwards [Ioi_mem_atTop a] with x hx\n[GOAL]\ncase h\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn f (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nf'int : IntegrableOn f' (Ioi a)\nhf : Tendsto f atTop (𝓝 m)\nx : ℝ\nhx : x ∈ Ioi a\n⊢ f x - f a = ∫ (x : ℝ) in a..id x, f' x\n[PROOFSTEP]\nhave h'x : a ≤ id x := le_of_lt hx\n[GOAL]\ncase h\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn f (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nf'int : IntegrableOn f' (Ioi a)\nhf : Tendsto f atTop (𝓝 m)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\n⊢ f x - f a = ∫ (x : ℝ) in a..id x, f' x\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn f (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nf'int : IntegrableOn f' (Ioi a)\nhf : Tendsto f atTop (𝓝 m)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\n⊢ ∫ (x : ℝ) in a..id x, f' x = f x - f a\n[PROOFSTEP]\napply\n  intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le h'x (hcont.mono Icc_subset_Ici_self) fun y hy => hderiv y hy.1\n[GOAL]\ncase h\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn f (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nf'int : IntegrableOn f' (Ioi a)\nhf : Tendsto f atTop (𝓝 m)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\n⊢ IntervalIntegrable (fun y => f' y) volume a (id x)\n[PROOFSTEP]\nrw [intervalIntegrable_iff_integrable_Ioc_of_le h'x]\n[GOAL]\ncase h\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn f (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nf'int : IntegrableOn f' (Ioi a)\nhf : Tendsto f atTop (𝓝 m)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\n⊢ IntegrableOn (fun y => f' y) (Ioc a (id x))\n[PROOFSTEP]\nexact f'int.mono (fun y hy => hy.1) le_rfl\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhderiv : ∀ (x : ℝ), x ∈ Ici a → HasDerivAt f (f' x) x\nf'int : IntegrableOn f' (Ioi a)\nhf : Tendsto f atTop (𝓝 m)\n⊢ ∫ (x : ℝ) in Ioi a, f' x = m - f a\n[PROOFSTEP]\nrefine integral_Ioi_of_hasDerivAt_of_tendsto (fun x hx ↦ ?_) (fun x hx => hderiv x hx.out.le) f'int hf\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhderiv : ∀ (x : ℝ), x ∈ Ici a → HasDerivAt f (f' x) x\nf'int : IntegrableOn f' (Ioi a)\nhf : Tendsto f atTop (𝓝 m)\nx : ℝ\nhx : x ∈ Ici a\n⊢ ContinuousWithinAt f (Ici a) x\n[PROOFSTEP]\nexact (hderiv x hx).continuousAt.continuousWithinAt\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\n⊢ IntegrableOn g' (Ioi a)\n[PROOFSTEP]\nrefine integrableOn_Ioi_of_intervalIntegral_norm_tendsto (l - g a) a (fun x => ?_) tendsto_id ?_\n[GOAL]\ncase refine_1\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\n⊢ IntegrableOn g' (Ioc a (id x))\n[PROOFSTEP]\nexact\n  intervalIntegral.integrableOn_deriv_of_nonneg (hcont.mono Icc_subset_Ici_self) (fun y hy => hderiv y hy.1) fun y hy =>\n    g'pos y hy.1\n[GOAL]\ncase refine_2\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\n⊢ Tendsto (fun i => ∫ (x : ℝ) in a..id i, ‖g' x‖) atTop (𝓝 (l - g a))\n[PROOFSTEP]\napply Tendsto.congr' _ (hg.sub_const _)\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\n⊢ (fun k => g k - g a) =ᶠ[atTop] fun i => ∫ (x : ℝ) in a..id i, ‖g' x‖\n[PROOFSTEP]\nfilter_upwards [Ioi_mem_atTop a] with x hx\n[GOAL]\ncase h\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ioi a\n⊢ g x - g a = ∫ (x : ℝ) in a..id x, ‖g' x‖\n[PROOFSTEP]\nhave h'x : a ≤ id x := le_of_lt hx\n[GOAL]\ncase h\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\n⊢ g x - g a = ∫ (x : ℝ) in a..id x, ‖g' x‖\n[PROOFSTEP]\ncalc\n  g x - g a = ∫ y in a..id x, g' y := by\n    symm\n    apply\n      intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le h'x (hcont.mono Icc_subset_Ici_self) fun y hy =>\n        hderiv y hy.1\n    rw [intervalIntegrable_iff_integrable_Ioc_of_le h'x]\n    exact\n      intervalIntegral.integrableOn_deriv_of_nonneg (hcont.mono Icc_subset_Ici_self) (fun y hy => hderiv y hy.1)\n        fun y hy => g'pos y hy.1\n  _ = ∫ y in a..id x, ‖g' y‖ := by\n    simp_rw [intervalIntegral.integral_of_le h'x]\n    refine' set_integral_congr measurableSet_Ioc fun y hy => _\n    dsimp\n    rw [abs_of_nonneg]\n    exact g'pos _ hy.1\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\n⊢ g x - g a = ∫ (y : ℝ) in a..id x, g' y\n[PROOFSTEP]\nsymm\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\n⊢ ∫ (y : ℝ) in a..id x, g' y = g x - g a\n[PROOFSTEP]\napply\n  intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le h'x (hcont.mono Icc_subset_Ici_self) fun y hy => hderiv y hy.1\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\n⊢ IntervalIntegrable (fun y => g' y) volume a (id x)\n[PROOFSTEP]\nrw [intervalIntegrable_iff_integrable_Ioc_of_le h'x]\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\n⊢ IntegrableOn (fun y => g' y) (Ioc a (id x))\n[PROOFSTEP]\nexact\n  intervalIntegral.integrableOn_deriv_of_nonneg (hcont.mono Icc_subset_Ici_self) (fun y hy => hderiv y hy.1) fun y hy =>\n    g'pos y hy.1\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\n⊢ ∫ (y : ℝ) in a..id x, g' y = ∫ (y : ℝ) in a..id x, ‖g' y‖\n[PROOFSTEP]\nsimp_rw [intervalIntegral.integral_of_le h'x]\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\n⊢ ∫ (y : ℝ) in Ioc a (id x), g' y = ∫ (y : ℝ) in Ioc a (id x), ‖g' y‖\n[PROOFSTEP]\nrefine' set_integral_congr measurableSet_Ioc fun y hy => _\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\ny : ℝ\nhy : y ∈ Ioc a (id x)\n⊢ g' y = ‖g' y‖\n[PROOFSTEP]\ndsimp\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\ny : ℝ\nhy : y ∈ Ioc a (id x)\n⊢ g' y = |g' y|\n[PROOFSTEP]\nrw [abs_of_nonneg]\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ioi a\nh'x : a ≤ id x\ny : ℝ\nhy : y ∈ Ioc a (id x)\n⊢ 0 ≤ g' y\n[PROOFSTEP]\nexact g'pos _ hy.1\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhderiv : ∀ (x : ℝ), x ∈ Ici a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\n⊢ IntegrableOn g' (Ioi a)\n[PROOFSTEP]\nrefine integrableOn_Ioi_deriv_of_nonneg (fun x hx ↦ ?_) (fun x hx => hderiv x hx.out.le) g'pos hg\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhderiv : ∀ (x : ℝ), x ∈ Ici a → HasDerivAt g (g' x) x\ng'pos : ∀ (x : ℝ), x ∈ Ioi a → 0 ≤ g' x\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ici a\n⊢ ContinuousWithinAt g (Ici a) x\n[PROOFSTEP]\nexact (hderiv x hx).continuousAt.continuousWithinAt\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'neg : ∀ (x : ℝ), x ∈ Ioi a → g' x ≤ 0\nhg : Tendsto g atTop (𝓝 l)\n⊢ IntegrableOn g' (Ioi a)\n[PROOFSTEP]\napply integrable_neg_iff.1\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhcont : ContinuousOn g (Ici a)\nhderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\ng'neg : ∀ (x : ℝ), x ∈ Ioi a → g' x ≤ 0\nhg : Tendsto g atTop (𝓝 l)\n⊢ Integrable (-g')\n[PROOFSTEP]\nexact\n  integrableOn_Ioi_deriv_of_nonneg hcont.neg (fun x hx => (hderiv x hx).neg)\n    (fun x hx => neg_nonneg_of_nonpos (g'neg x hx)) hg.neg\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhderiv : ∀ (x : ℝ), x ∈ Ici a → HasDerivAt g (g' x) x\ng'neg : ∀ (x : ℝ), x ∈ Ioi a → g' x ≤ 0\nhg : Tendsto g atTop (𝓝 l)\n⊢ IntegrableOn g' (Ioi a)\n[PROOFSTEP]\nrefine integrableOn_Ioi_deriv_of_nonpos (fun x hx ↦ ?_) (fun x hx ↦ hderiv x hx.out.le) g'neg hg\n[GOAL]\nE : Type u_1\nf f' : ℝ → E\ng g' : ℝ → ℝ\na b l : ℝ\nm : E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nhderiv : ∀ (x : ℝ), x ∈ Ici a → HasDerivAt g (g' x) x\ng'neg : ∀ (x : ℝ), x ∈ Ioi a → g' x ≤ 0\nhg : Tendsto g atTop (𝓝 l)\nx : ℝ\nhx : x ∈ Ici a\n⊢ ContinuousWithinAt g (Ici a) x\n[PROOFSTEP]\nexact (hderiv x hx).continuousAt.continuousWithinAt\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\n⊢ ∫ (x : ℝ) in Ioi a, f' x • (g ∘ f) x = ∫ (u : ℝ) in Ioi (f a), g u\n[PROOFSTEP]\nhave eq : ∀ b : ℝ, a < b → (∫ x in a..b, f' x • (g ∘ f) x) = ∫ u in f a..f b, g u := fun b hb ↦\n  by\n  have i1 : Ioo (min a b) (max a b) ⊆ Ioi a := by\n    rw [min_eq_left hb.le]\n    exact Ioo_subset_Ioi_self\n  have i2 : [[a, b]] ⊆ Ici a := by rw [uIcc_of_le hb.le]; exact Icc_subset_Ici_self\n  refine'\n    intervalIntegral.integral_comp_smul_deriv''' (hf.mono i2) (fun x hx => hff' x <| mem_of_mem_of_subset hx i1)\n      (hg_cont.mono <| image_subset _ _) (hg1.mono_set <| image_subset _ _) (hg2.mono_set i2)\n  · rw [min_eq_left hb.le]; exact Ioo_subset_Ioi_self\n  · rw [uIcc_of_le hb.le]; exact Icc_subset_Ici_self\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\nb : ℝ\nhb : a < b\n⊢ ∫ (x : ℝ) in a..b, f' x • (g ∘ f) x = ∫ (u : ℝ) in f a..f b, g u\n[PROOFSTEP]\nhave i1 : Ioo (min a b) (max a b) ⊆ Ioi a := by\n  rw [min_eq_left hb.le]\n  exact Ioo_subset_Ioi_self\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\nb : ℝ\nhb : a < b\n⊢ Ioo (min a b) (max a b) ⊆ Ioi a\n[PROOFSTEP]\nrw [min_eq_left hb.le]\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\nb : ℝ\nhb : a < b\n⊢ Ioo a (max a b) ⊆ Ioi a\n[PROOFSTEP]\nexact Ioo_subset_Ioi_self\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\nb : ℝ\nhb : a < b\ni1 : Ioo (min a b) (max a b) ⊆ Ioi a\n⊢ ∫ (x : ℝ) in a..b, f' x • (g ∘ f) x = ∫ (u : ℝ) in f a..f b, g u\n[PROOFSTEP]\nhave i2 : [[a, b]] ⊆ Ici a := by rw [uIcc_of_le hb.le]; exact Icc_subset_Ici_self\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\nb : ℝ\nhb : a < b\ni1 : Ioo (min a b) (max a b) ⊆ Ioi a\n⊢ [[a, b]] ⊆ Ici a\n[PROOFSTEP]\nrw [uIcc_of_le hb.le]\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\nb : ℝ\nhb : a < b\ni1 : Ioo (min a b) (max a b) ⊆ Ioi a\n⊢ Icc a b ⊆ Ici a\n[PROOFSTEP]\nexact Icc_subset_Ici_self\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\nb : ℝ\nhb : a < b\ni1 : Ioo (min a b) (max a b) ⊆ Ioi a\ni2 : [[a, b]] ⊆ Ici a\n⊢ ∫ (x : ℝ) in a..b, f' x • (g ∘ f) x = ∫ (u : ℝ) in f a..f b, g u\n[PROOFSTEP]\nrefine'\n  intervalIntegral.integral_comp_smul_deriv''' (hf.mono i2) (fun x hx => hff' x <| mem_of_mem_of_subset hx i1)\n    (hg_cont.mono <| image_subset _ _) (hg1.mono_set <| image_subset _ _) (hg2.mono_set i2)\n[GOAL]\ncase refine'_1\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\nb : ℝ\nhb : a < b\ni1 : Ioo (min a b) (max a b) ⊆ Ioi a\ni2 : [[a, b]] ⊆ Ici a\n⊢ Ioo (min a b) (max a b) ⊆ Ioi a\n[PROOFSTEP]\nrw [min_eq_left hb.le]\n[GOAL]\ncase refine'_1\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\nb : ℝ\nhb : a < b\ni1 : Ioo (min a b) (max a b) ⊆ Ioi a\ni2 : [[a, b]] ⊆ Ici a\n⊢ Ioo a (max a b) ⊆ Ioi a\n[PROOFSTEP]\nexact Ioo_subset_Ioi_self\n[GOAL]\ncase refine'_2\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\nb : ℝ\nhb : a < b\ni1 : Ioo (min a b) (max a b) ⊆ Ioi a\ni2 : [[a, b]] ⊆ Ici a\n⊢ [[a, b]] ⊆ Ici a\n[PROOFSTEP]\nrw [uIcc_of_le hb.le]\n[GOAL]\ncase refine'_2\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\nb : ℝ\nhb : a < b\ni1 : Ioo (min a b) (max a b) ⊆ Ioi a\ni2 : [[a, b]] ⊆ Ici a\n⊢ Icc a b ⊆ Ici a\n[PROOFSTEP]\nexact Icc_subset_Ici_self\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\neq : ∀ (b : ℝ), a < b → ∫ (x : ℝ) in a..b, f' x • (g ∘ f) x = ∫ (u : ℝ) in f a..f b, g u\n⊢ ∫ (x : ℝ) in Ioi a, f' x • (g ∘ f) x = ∫ (u : ℝ) in Ioi (f a), g u\n[PROOFSTEP]\nrw [integrableOn_Ici_iff_integrableOn_Ioi] at hg2 \n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ioi a)\neq : ∀ (b : ℝ), a < b → ∫ (x : ℝ) in a..b, f' x • (g ∘ f) x = ∫ (u : ℝ) in f a..f b, g u\n⊢ ∫ (x : ℝ) in Ioi a, f' x • (g ∘ f) x = ∫ (u : ℝ) in Ioi (f a), g u\n[PROOFSTEP]\nhave t2 := intervalIntegral_tendsto_integral_Ioi _ hg2 tendsto_id\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ioi a)\neq : ∀ (b : ℝ), a < b → ∫ (x : ℝ) in a..b, f' x • (g ∘ f) x = ∫ (u : ℝ) in f a..f b, g u\nt2 : Tendsto (fun i => ∫ (x : ℝ) in a..id i, f' x • (g ∘ f) x) atTop (𝓝 (∫ (x : ℝ) in Ioi a, f' x • (g ∘ f) x))\n⊢ ∫ (x : ℝ) in Ioi a, f' x • (g ∘ f) x = ∫ (u : ℝ) in Ioi (f a), g u\n[PROOFSTEP]\nhave : Ioi (f a) ⊆ f '' Ici a :=\n  Ioi_subset_Ici_self.trans <|\n    IsPreconnected.intermediate_value_Ici isPreconnected_Ici left_mem_Ici (le_principal_iff.mpr <| Ici_mem_atTop _) hf\n      hft\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ioi a)\neq : ∀ (b : ℝ), a < b → ∫ (x : ℝ) in a..b, f' x • (g ∘ f) x = ∫ (u : ℝ) in f a..f b, g u\nt2 : Tendsto (fun i => ∫ (x : ℝ) in a..id i, f' x • (g ∘ f) x) atTop (𝓝 (∫ (x : ℝ) in Ioi a, f' x • (g ∘ f) x))\nthis : Ioi (f a) ⊆ f '' Ici a\n⊢ ∫ (x : ℝ) in Ioi a, f' x • (g ∘ f) x = ∫ (u : ℝ) in Ioi (f a), g u\n[PROOFSTEP]\nhave t1 := (intervalIntegral_tendsto_integral_Ioi _ (hg1.mono_set this) tendsto_id).comp hft\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' : ℝ → ℝ\ng : ℝ → E\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ioi a)\neq : ∀ (b : ℝ), a < b → ∫ (x : ℝ) in a..b, f' x • (g ∘ f) x = ∫ (u : ℝ) in f a..f b, g u\nt2 : Tendsto (fun i => ∫ (x : ℝ) in a..id i, f' x • (g ∘ f) x) atTop (𝓝 (∫ (x : ℝ) in Ioi a, f' x • (g ∘ f) x))\nthis : Ioi (f a) ⊆ f '' Ici a\nt1 : Tendsto ((fun i => ∫ (x : ℝ) in f a..id i, g x) ∘ f) atTop (𝓝 (∫ (x : ℝ) in Ioi (f a), g x))\n⊢ ∫ (x : ℝ) in Ioi a, f' x • (g ∘ f) x = ∫ (u : ℝ) in Ioi (f a), g u\n[PROOFSTEP]\nexact tendsto_nhds_unique (Tendsto.congr' (eventuallyEq_of_mem (Ioi_mem_atTop a) eq) t2) t1\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' g : ℝ → ℝ\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => (g ∘ f) x * f' x) (Ici a)\n⊢ ∫ (x : ℝ) in Ioi a, (g ∘ f) x * f' x = ∫ (u : ℝ) in Ioi (f a), g u\n[PROOFSTEP]\nhave hg2' : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a) := by simpa [mul_comm] using hg2\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' g : ℝ → ℝ\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => (g ∘ f) x * f' x) (Ici a)\n⊢ IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\n[PROOFSTEP]\nsimpa [mul_comm] using hg2\n[GOAL]\nE : Type u_1\nf✝ : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf f' g : ℝ → ℝ\na : ℝ\nhf : ContinuousOn f (Ici a)\nhft : Tendsto f atTop atTop\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivWithinAt f (f' x) (Ioi x) x\nhg_cont : ContinuousOn g (f '' Ioi a)\nhg1 : IntegrableOn g (f '' Ici a)\nhg2 : IntegrableOn (fun x => (g ∘ f) x * f' x) (Ici a)\nhg2' : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)\n⊢ ∫ (x : ℝ) in Ioi a, (g ∘ f) x * f' x = ∫ (u : ℝ) in Ioi (f a), g u\n[PROOFSTEP]\nsimpa [mul_comm] using integral_comp_smul_deriv_Ioi hf hft hff' hg_cont hg1 hg2'\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\n⊢ ∫ (x : ℝ) in Ioi 0, (|p| * x ^ (p - 1)) • g (x ^ p) = ∫ (y : ℝ) in Ioi 0, g y\n[PROOFSTEP]\nlet S := Ioi (0 : ℝ)\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\n⊢ ∫ (x : ℝ) in Ioi 0, (|p| * x ^ (p - 1)) • g (x ^ p) = ∫ (y : ℝ) in Ioi 0, g y\n[PROOFSTEP]\nhave a1 : ∀ x : ℝ, x ∈ S → HasDerivWithinAt (fun t : ℝ => t ^ p) (p * x ^ (p - 1)) S x := fun x hx =>\n  (hasDerivAt_rpow_const (Or.inl (mem_Ioi.mp hx).ne')).hasDerivWithinAt\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\n⊢ ∫ (x : ℝ) in Ioi 0, (|p| * x ^ (p - 1)) • g (x ^ p) = ∫ (y : ℝ) in Ioi 0, g y\n[PROOFSTEP]\nhave a2 : InjOn (fun x : ℝ => x ^ p) S :=\n  by\n  rcases lt_or_gt_of_ne hp with (h | h)\n  · apply StrictAntiOn.injOn\n    intro x hx y hy hxy\n    rw [← inv_lt_inv (rpow_pos_of_pos hx p) (rpow_pos_of_pos hy p), ← rpow_neg (le_of_lt hx), ← rpow_neg (le_of_lt hy)]\n    exact rpow_lt_rpow (le_of_lt hx) hxy (neg_pos.mpr h)\n  exact StrictMonoOn.injOn fun x hx y _ hxy => rpow_lt_rpow (mem_Ioi.mp hx).le hxy h\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\n⊢ InjOn (fun x => x ^ p) S\n[PROOFSTEP]\nrcases lt_or_gt_of_ne hp with (h | h)\n[GOAL]\ncase inl\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\nh : p < 0\n⊢ InjOn (fun x => x ^ p) S\n[PROOFSTEP]\napply StrictAntiOn.injOn\n[GOAL]\ncase inl.H\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\nh : p < 0\n⊢ StrictAntiOn (fun x => x ^ p) S\n[PROOFSTEP]\nintro x hx y hy hxy\n[GOAL]\ncase inl.H\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\nh : p < 0\nx : ℝ\nhx : x ∈ S\ny : ℝ\nhy : y ∈ S\nhxy : x < y\n⊢ (fun x => x ^ p) y < (fun x => x ^ p) x\n[PROOFSTEP]\nrw [← inv_lt_inv (rpow_pos_of_pos hx p) (rpow_pos_of_pos hy p), ← rpow_neg (le_of_lt hx), ← rpow_neg (le_of_lt hy)]\n[GOAL]\ncase inl.H\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\nh : p < 0\nx : ℝ\nhx : x ∈ S\ny : ℝ\nhy : y ∈ S\nhxy : x < y\n⊢ x ^ (-p) < y ^ (-p)\n[PROOFSTEP]\nexact rpow_lt_rpow (le_of_lt hx) hxy (neg_pos.mpr h)\n[GOAL]\ncase inr\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\nh : p > 0\n⊢ InjOn (fun x => x ^ p) S\n[PROOFSTEP]\nexact StrictMonoOn.injOn fun x hx y _ hxy => rpow_lt_rpow (mem_Ioi.mp hx).le hxy h\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\n⊢ ∫ (x : ℝ) in Ioi 0, (|p| * x ^ (p - 1)) • g (x ^ p) = ∫ (y : ℝ) in Ioi 0, g y\n[PROOFSTEP]\nhave a3 : (fun t : ℝ => t ^ p) '' S = S := by\n  ext1 x; rw [mem_image]; constructor\n  · rintro ⟨y, hy, rfl⟩; exact rpow_pos_of_pos hy p\n  · intro hx; refine' ⟨x ^ (1 / p), rpow_pos_of_pos hx _, _⟩\n    rw [← rpow_mul (le_of_lt hx), one_div_mul_cancel hp, rpow_one]\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\n⊢ (fun t => t ^ p) '' S = S\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\nx : ℝ\n⊢ x ∈ (fun t => t ^ p) '' S ↔ x ∈ S\n[PROOFSTEP]\nrw [mem_image]\n[GOAL]\ncase h\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\nx : ℝ\n⊢ (∃ x_1, x_1 ∈ S ∧ x_1 ^ p = x) ↔ x ∈ S\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\nx : ℝ\n⊢ (∃ x_1, x_1 ∈ S ∧ x_1 ^ p = x) → x ∈ S\n[PROOFSTEP]\nrintro ⟨y, hy, rfl⟩\n[GOAL]\ncase h.mp.intro.intro\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\ny : ℝ\nhy : y ∈ S\n⊢ y ^ p ∈ S\n[PROOFSTEP]\nexact rpow_pos_of_pos hy p\n[GOAL]\ncase h.mpr\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\nx : ℝ\n⊢ x ∈ S → ∃ x_1, x_1 ∈ S ∧ x_1 ^ p = x\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase h.mpr\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\nx : ℝ\nhx : x ∈ S\n⊢ ∃ x_1, x_1 ∈ S ∧ x_1 ^ p = x\n[PROOFSTEP]\nrefine' ⟨x ^ (1 / p), rpow_pos_of_pos hx _, _⟩\n[GOAL]\ncase h.mpr\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\nx : ℝ\nhx : x ∈ S\n⊢ (x ^ (1 / p)) ^ p = x\n[PROOFSTEP]\nrw [← rpow_mul (le_of_lt hx), one_div_mul_cancel hp, rpow_one]\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\na3 : (fun t => t ^ p) '' S = S\n⊢ ∫ (x : ℝ) in Ioi 0, (|p| * x ^ (p - 1)) • g (x ^ p) = ∫ (y : ℝ) in Ioi 0, g y\n[PROOFSTEP]\nhave := integral_image_eq_integral_abs_deriv_smul measurableSet_Ioi a1 a2 g\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\na3 : (fun t => t ^ p) '' S = S\nthis : ∫ (x : ℝ) in (fun t => t ^ p) '' Ioi 0, g x = ∫ (x : ℝ) in Ioi 0, |p * x ^ (p - 1)| • g (x ^ p)\n⊢ ∫ (x : ℝ) in Ioi 0, (|p| * x ^ (p - 1)) • g (x ^ p) = ∫ (y : ℝ) in Ioi 0, g y\n[PROOFSTEP]\nrw [a3] at this \n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\na3 : (fun t => t ^ p) '' S = S\nthis : ∫ (x : ℝ) in S, g x = ∫ (x : ℝ) in Ioi 0, |p * x ^ (p - 1)| • g (x ^ p)\n⊢ ∫ (x : ℝ) in Ioi 0, (|p| * x ^ (p - 1)) • g (x ^ p) = ∫ (y : ℝ) in Ioi 0, g y\n[PROOFSTEP]\nrw [this]\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\na3 : (fun t => t ^ p) '' S = S\nthis : ∫ (x : ℝ) in S, g x = ∫ (x : ℝ) in Ioi 0, |p * x ^ (p - 1)| • g (x ^ p)\n⊢ ∫ (x : ℝ) in Ioi 0, (|p| * x ^ (p - 1)) • g (x ^ p) = ∫ (x : ℝ) in Ioi 0, |p * x ^ (p - 1)| • g (x ^ p)\n[PROOFSTEP]\nrefine' set_integral_congr measurableSet_Ioi _\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\na3 : (fun t => t ^ p) '' S = S\nthis : ∫ (x : ℝ) in S, g x = ∫ (x : ℝ) in Ioi 0, |p * x ^ (p - 1)| • g (x ^ p)\n⊢ EqOn (fun x => (|p| * x ^ (p - 1)) • g (x ^ p)) (fun x => |p * x ^ (p - 1)| • g (x ^ p)) (Ioi 0)\n[PROOFSTEP]\nintro x hx\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\na3 : (fun t => t ^ p) '' S = S\nthis : ∫ (x : ℝ) in S, g x = ∫ (x : ℝ) in Ioi 0, |p * x ^ (p - 1)| • g (x ^ p)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ (fun x => (|p| * x ^ (p - 1)) • g (x ^ p)) x = (fun x => |p * x ^ (p - 1)| • g (x ^ p)) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\na3 : (fun t => t ^ p) '' S = S\nthis : ∫ (x : ℝ) in S, g x = ∫ (x : ℝ) in Ioi 0, |p * x ^ (p - 1)| • g (x ^ p)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ (|p| * x ^ (p - 1)) • g (x ^ p) = |p * x ^ (p - 1)| • g (x ^ p)\n[PROOFSTEP]\nrw [abs_mul, abs_of_nonneg (rpow_nonneg_of_nonneg (le_of_lt hx) _)]\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : 0 < p\n⊢ ∫ (x : ℝ) in Ioi 0, (p * x ^ (p - 1)) • g (x ^ p) = ∫ (y : ℝ) in Ioi 0, g y\n[PROOFSTEP]\nconvert integral_comp_rpow_Ioi g hp.ne'\n[GOAL]\ncase h.e'_2.h.e'_7.h.h.e'_5.h.e'_5\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : 0 < p\nx✝ : ℝ\n⊢ p = |p|\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h.e'_2.h.e'_7.h.h.e'_5.h.e'_5\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : 0 < p\nx✝ : ℝ\n⊢ p = |p|\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_2.h.e'_7.h.h.e'_5.h.e'_5\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\np : ℝ\nhp : 0 < p\nx✝ : ℝ\n⊢ p = |p|\n[PROOFSTEP]\nrw [abs_of_nonneg hp.le]\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\na b : ℝ\nhb : 0 < b\n⊢ ∫ (x : ℝ) in Ioi a, g (b * x) = |b⁻¹| • ∫ (x : ℝ) in Ioi (b * a), g x\n[PROOFSTEP]\nhave : ∀ c : ℝ, MeasurableSet (Ioi c) := fun c => measurableSet_Ioi\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\na b : ℝ\nhb : 0 < b\nthis : ∀ (c : ℝ), MeasurableSet (Ioi c)\n⊢ ∫ (x : ℝ) in Ioi a, g (b * x) = |b⁻¹| • ∫ (x : ℝ) in Ioi (b * a), g x\n[PROOFSTEP]\nrw [← integral_indicator (this a), ← integral_indicator (this (b * a)), ← Measure.integral_comp_mul_left]\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\na b : ℝ\nhb : 0 < b\nthis : ∀ (c : ℝ), MeasurableSet (Ioi c)\n⊢ ∫ (x : ℝ), indicator (Ioi a) (fun x => g (b * x)) x = ∫ (x : ℝ), indicator (Ioi (b * a)) (fun x => g x) (b * x)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\na b : ℝ\nhb : 0 < b\nthis : ∀ (c : ℝ), MeasurableSet (Ioi c)\n⊢ (fun x => indicator (Ioi a) (fun x => g (b * x)) x) = fun x => indicator (Ioi (b * a)) (fun x => g x) (b * x)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase e_f.h\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\na b : ℝ\nhb : 0 < b\nthis : ∀ (c : ℝ), MeasurableSet (Ioi c)\nx : ℝ\n⊢ indicator (Ioi a) (fun x => g (b * x)) x = indicator (Ioi (b * a)) (fun x => g x) (b * x)\n[PROOFSTEP]\nrw [← indicator_comp_right, preimage_const_mul_Ioi _ hb, mul_div_cancel_left _ hb.ne']\n[GOAL]\ncase e_f.h\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\na b : ℝ\nhb : 0 < b\nthis : ∀ (c : ℝ), MeasurableSet (Ioi c)\nx : ℝ\n⊢ indicator (Ioi a) (fun x => g (b * x)) x = indicator (Ioi a) ((fun x => g x) ∘ HMul.hMul b) x\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\nf : ℝ → E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ng : ℝ → E\na b : ℝ\nhb : 0 < b\n⊢ ∫ (x : ℝ) in Ioi a, g (x * b) = |b⁻¹| • ∫ (x : ℝ) in Ioi (a * b), g x\n[PROOFSTEP]\nsimpa only [mul_comm] using integral_comp_mul_left_Ioi g a hb\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\n⊢ IntegrableOn (fun x => (|p| * x ^ (p - 1)) • f (x ^ p)) (Ioi 0) ↔ IntegrableOn f (Ioi 0)\n[PROOFSTEP]\nlet S := Ioi (0 : ℝ)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\n⊢ IntegrableOn (fun x => (|p| * x ^ (p - 1)) • f (x ^ p)) (Ioi 0) ↔ IntegrableOn f (Ioi 0)\n[PROOFSTEP]\nhave a1 : ∀ x : ℝ, x ∈ S → HasDerivWithinAt (fun t : ℝ => t ^ p) (p * x ^ (p - 1)) S x := fun x hx =>\n  (hasDerivAt_rpow_const (Or.inl (mem_Ioi.mp hx).ne')).hasDerivWithinAt\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\n⊢ IntegrableOn (fun x => (|p| * x ^ (p - 1)) • f (x ^ p)) (Ioi 0) ↔ IntegrableOn f (Ioi 0)\n[PROOFSTEP]\nhave a2 : InjOn (fun x : ℝ => x ^ p) S :=\n  by\n  rcases lt_or_gt_of_ne hp with (h | h)\n  · apply StrictAntiOn.injOn\n    intro x hx y hy hxy\n    rw [← inv_lt_inv (rpow_pos_of_pos hx p) (rpow_pos_of_pos hy p), ← rpow_neg (le_of_lt hx), ← rpow_neg (le_of_lt hy)]\n    exact rpow_lt_rpow (le_of_lt hx) hxy (neg_pos.mpr h)\n  exact StrictMonoOn.injOn fun x hx y _hy hxy => rpow_lt_rpow (mem_Ioi.mp hx).le hxy h\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\n⊢ InjOn (fun x => x ^ p) S\n[PROOFSTEP]\nrcases lt_or_gt_of_ne hp with (h | h)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\nh : p < 0\n⊢ InjOn (fun x => x ^ p) S\n[PROOFSTEP]\napply StrictAntiOn.injOn\n[GOAL]\ncase inl.H\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\nh : p < 0\n⊢ StrictAntiOn (fun x => x ^ p) S\n[PROOFSTEP]\nintro x hx y hy hxy\n[GOAL]\ncase inl.H\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\nh : p < 0\nx : ℝ\nhx : x ∈ S\ny : ℝ\nhy : y ∈ S\nhxy : x < y\n⊢ (fun x => x ^ p) y < (fun x => x ^ p) x\n[PROOFSTEP]\nrw [← inv_lt_inv (rpow_pos_of_pos hx p) (rpow_pos_of_pos hy p), ← rpow_neg (le_of_lt hx), ← rpow_neg (le_of_lt hy)]\n[GOAL]\ncase inl.H\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\nh : p < 0\nx : ℝ\nhx : x ∈ S\ny : ℝ\nhy : y ∈ S\nhxy : x < y\n⊢ x ^ (-p) < y ^ (-p)\n[PROOFSTEP]\nexact rpow_lt_rpow (le_of_lt hx) hxy (neg_pos.mpr h)\n[GOAL]\ncase inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\nh : p > 0\n⊢ InjOn (fun x => x ^ p) S\n[PROOFSTEP]\nexact StrictMonoOn.injOn fun x hx y _hy hxy => rpow_lt_rpow (mem_Ioi.mp hx).le hxy h\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\n⊢ IntegrableOn (fun x => (|p| * x ^ (p - 1)) • f (x ^ p)) (Ioi 0) ↔ IntegrableOn f (Ioi 0)\n[PROOFSTEP]\nhave a3 : (fun t : ℝ => t ^ p) '' S = S := by\n  ext1 x; rw [mem_image]; constructor\n  · rintro ⟨y, hy, rfl⟩; exact rpow_pos_of_pos hy p\n  · intro hx; refine' ⟨x ^ (1 / p), rpow_pos_of_pos hx _, _⟩\n    rw [← rpow_mul (le_of_lt hx), one_div_mul_cancel hp, rpow_one]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\n⊢ (fun t => t ^ p) '' S = S\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\nx : ℝ\n⊢ x ∈ (fun t => t ^ p) '' S ↔ x ∈ S\n[PROOFSTEP]\nrw [mem_image]\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\nx : ℝ\n⊢ (∃ x_1, x_1 ∈ S ∧ x_1 ^ p = x) ↔ x ∈ S\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\nx : ℝ\n⊢ (∃ x_1, x_1 ∈ S ∧ x_1 ^ p = x) → x ∈ S\n[PROOFSTEP]\nrintro ⟨y, hy, rfl⟩\n[GOAL]\ncase h.mp.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\ny : ℝ\nhy : y ∈ S\n⊢ y ^ p ∈ S\n[PROOFSTEP]\nexact rpow_pos_of_pos hy p\n[GOAL]\ncase h.mpr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\nx : ℝ\n⊢ x ∈ S → ∃ x_1, x_1 ∈ S ∧ x_1 ^ p = x\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase h.mpr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\nx : ℝ\nhx : x ∈ S\n⊢ ∃ x_1, x_1 ∈ S ∧ x_1 ^ p = x\n[PROOFSTEP]\nrefine' ⟨x ^ (1 / p), rpow_pos_of_pos hx _, _⟩\n[GOAL]\ncase h.mpr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\nx : ℝ\nhx : x ∈ S\n⊢ (x ^ (1 / p)) ^ p = x\n[PROOFSTEP]\nrw [← rpow_mul (le_of_lt hx), one_div_mul_cancel hp, rpow_one]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\na3 : (fun t => t ^ p) '' S = S\n⊢ IntegrableOn (fun x => (|p| * x ^ (p - 1)) • f (x ^ p)) (Ioi 0) ↔ IntegrableOn f (Ioi 0)\n[PROOFSTEP]\nhave := integrableOn_image_iff_integrableOn_abs_deriv_smul measurableSet_Ioi a1 a2 f\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\na3 : (fun t => t ^ p) '' S = S\nthis : IntegrableOn f ((fun t => t ^ p) '' Ioi 0) ↔ IntegrableOn (fun x => |p * x ^ (p - 1)| • f (x ^ p)) (Ioi 0)\n⊢ IntegrableOn (fun x => (|p| * x ^ (p - 1)) • f (x ^ p)) (Ioi 0) ↔ IntegrableOn f (Ioi 0)\n[PROOFSTEP]\nrw [a3] at this \n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\na3 : (fun t => t ^ p) '' S = S\nthis : IntegrableOn f S ↔ IntegrableOn (fun x => |p * x ^ (p - 1)| • f (x ^ p)) (Ioi 0)\n⊢ IntegrableOn (fun x => (|p| * x ^ (p - 1)) • f (x ^ p)) (Ioi 0) ↔ IntegrableOn f (Ioi 0)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\na3 : (fun t => t ^ p) '' S = S\nthis : IntegrableOn f S ↔ IntegrableOn (fun x => |p * x ^ (p - 1)| • f (x ^ p)) (Ioi 0)\n⊢ IntegrableOn (fun x => (|p| * x ^ (p - 1)) • f (x ^ p)) (Ioi 0) ↔\n    IntegrableOn (fun x => |p * x ^ (p - 1)| • f (x ^ p)) (Ioi 0)\n[PROOFSTEP]\nrefine' integrableOn_congr_fun (fun x hx => _) measurableSet_Ioi\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\nS : Set ℝ := Ioi 0\na1 : ∀ (x : ℝ), x ∈ S → HasDerivWithinAt (fun t => t ^ p) (p * x ^ (p - 1)) S x\na2 : InjOn (fun x => x ^ p) S\na3 : (fun t => t ^ p) '' S = S\nthis : IntegrableOn f S ↔ IntegrableOn (fun x => |p * x ^ (p - 1)| • f (x ^ p)) (Ioi 0)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ (|p| * x ^ (p - 1)) • f (x ^ p) = |p * x ^ (p - 1)| • f (x ^ p)\n[PROOFSTEP]\nsimp_rw [abs_mul, abs_of_nonneg (rpow_nonneg_of_nonneg (le_of_lt hx) _)]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\np : ℝ\nhp : p ≠ 0\n⊢ IntegrableOn (fun x => x ^ (p - 1) • f (x ^ p)) (Ioi 0) ↔ IntegrableOn f (Ioi 0)\n[PROOFSTEP]\nsimpa only [← integrableOn_Ioi_comp_rpow_iff f hp, mul_smul] using (integrable_smul_iff (abs_pos.mpr hp).ne' _).symm\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\nc a : ℝ\nha : 0 < a\n⊢ IntegrableOn (fun x => f (a * x)) (Ioi c) ↔ IntegrableOn f (Ioi (a * c))\n[PROOFSTEP]\nrw [← integrable_indicator_iff (measurableSet_Ioi : MeasurableSet <| Ioi c)]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\nc a : ℝ\nha : 0 < a\n⊢ Integrable (indicator (Ioi c) fun x => f (a * x)) ↔ IntegrableOn f (Ioi (a * c))\n[PROOFSTEP]\nrw [← integrable_indicator_iff (measurableSet_Ioi : MeasurableSet <| Ioi <| a * c)]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\nc a : ℝ\nha : 0 < a\n⊢ Integrable (indicator (Ioi c) fun x => f (a * x)) ↔ Integrable (indicator (Ioi (a * c)) f)\n[PROOFSTEP]\nconvert integrable_comp_mul_left_iff ((Ioi (a * c)).indicator f) ha.ne' using 2\n[GOAL]\ncase h.e'_1.h.e'_5\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\nc a : ℝ\nha : 0 < a\n⊢ (indicator (Ioi c) fun x => f (a * x)) = fun x => indicator (Ioi (a * c)) f (a * x)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h.e'_1.h.e'_5.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\nc a : ℝ\nha : 0 < a\nx : ℝ\n⊢ indicator (Ioi c) (fun x => f (a * x)) x = indicator (Ioi (a * c)) f (a * x)\n[PROOFSTEP]\nrw [← indicator_comp_right, preimage_const_mul_Ioi _ ha, mul_comm a c, mul_div_cancel _ ha.ne']\n[GOAL]\ncase h.e'_1.h.e'_5.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\nc a : ℝ\nha : 0 < a\nx : ℝ\n⊢ indicator (Ioi c) (fun x => f (a * x)) x = indicator (Ioi c) (f ∘ HMul.hMul a) x\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\nc a : ℝ\nha : 0 < a\n⊢ IntegrableOn (fun x => f (x * a)) (Ioi c) ↔ IntegrableOn f (Ioi (c * a))\n[PROOFSTEP]\nsimpa only [mul_comm, mul_zero] using integrableOn_Ioi_comp_mul_left_iff f c ha\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "llama_tokens": 52046, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7025300698514777, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.394945896436159}}
{"text": "[GOAL]\nX : Type u_2\nY : Type u_1\nZ : Type ?u.666\nW : Type ?u.669\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ne : X ≃ₜ Y\n⊢ IsProperMap ↑e\n[PROOFSTEP]\nrw [isProperMap_iff_clusterPt]\n[GOAL]\nX : Type u_2\nY : Type u_1\nZ : Type ?u.666\nW : Type ?u.669\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ne : X ≃ₜ Y\n⊢ Continuous ↑e ∧ ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ ↑e → ∃ x, ↑e x = y ∧ ClusterPt x ℱ\n[PROOFSTEP]\nrefine ⟨e.continuous, fun ℱ y ↦ ?_⟩\n[GOAL]\nX : Type u_2\nY : Type u_1\nZ : Type ?u.666\nW : Type ?u.669\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ne : X ≃ₜ Y\nℱ : Filter X\ny : Y\n⊢ MapClusterPt y ℱ ↑e → ∃ x, ↑e x = y ∧ ClusterPt x ℱ\n[PROOFSTEP]\nsimp_rw [MapClusterPt, ClusterPt, ← Filter.push_pull', map_neBot_iff, e.comap_nhds_eq, ← e.coe_toEquiv, ←\n  e.eq_symm_apply, exists_eq_left]\n[GOAL]\nX : Type u_2\nY : Type u_1\nZ : Type ?u.666\nW : Type ?u.669\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ne : X ≃ₜ Y\nℱ : Filter X\ny : Y\n⊢ NeBot (𝓝 (↑(Homeomorph.symm e) y) ⊓ ℱ) → NeBot (𝓝 (↑e.symm y) ⊓ ℱ)\n[PROOFSTEP]\nexact id\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type ?u.2964\nW : Type ?u.2967\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nh : IsProperMap f\n⊢ IsClosedMap f\n[PROOFSTEP]\nrw [isClosedMap_iff_clusterPt]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type ?u.2964\nW : Type ?u.2967\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nh : IsProperMap f\n⊢ ∀ (s : Set X) (y : Y), MapClusterPt y (𝓟 s) f → ∃ x, f x = y ∧ ClusterPt x (𝓟 s)\n[PROOFSTEP]\nexact fun s y ↦ h.clusterPt_of_mapClusterPt (ℱ := 𝓟 s) (y := y)\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type ?u.3327\nW : Type ?u.3330\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\n⊢ IsProperMap f ↔ Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrw [isProperMap_iff_clusterPt]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type ?u.3327\nW : Type ?u.3330\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\n⊢ (Continuous f ∧ ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ) ↔\n    Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrefine and_congr_right (fun _ ↦ ?_)\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type ?u.3327\nW : Type ?u.3330\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nx✝ : Continuous f\n⊢ (∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ) ↔\n    ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX : Type u_1\nY : Type u_2\nZ : Type ?u.3327\nW : Type ?u.3330\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nx✝ : Continuous f\n⊢ (∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ) →\n    ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nX : Type u_1\nY : Type u_2\nZ : Type ?u.3327\nW : Type ?u.3330\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nx✝ : Continuous f\n⊢ (∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x) →\n    ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nX : Type u_1\nY : Type u_2\nZ : Type ?u.3327\nW : Type ?u.3330\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nx✝ : Continuous f\nH : ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ\n⊢ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nintro 𝒰 y (hY : (Ultrafilter.map f 𝒰 : Filter Y) ≤ _)\n[GOAL]\ncase mp\nX : Type u_1\nY : Type u_2\nZ : Type ?u.3327\nW : Type ?u.3330\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nx✝ : Continuous f\nH : ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ\n𝒰 : Ultrafilter X\ny : Y\nhY : ↑(Ultrafilter.map f 𝒰) ≤ 𝓝 y\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nsimp_rw [← Ultrafilter.clusterPt_iff] at hY ⊢\n[GOAL]\ncase mp\nX : Type u_1\nY : Type u_2\nZ : Type ?u.3327\nW : Type ?u.3330\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nx✝ : Continuous f\nH : ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ\n𝒰 : Ultrafilter X\ny : Y\nhY : ClusterPt y ↑(Ultrafilter.map f 𝒰)\n⊢ ∃ x, f x = y ∧ ClusterPt x ↑𝒰\n[PROOFSTEP]\nexact H hY\n[GOAL]\ncase mpr\nX : Type u_1\nY : Type u_2\nZ : Type ?u.3327\nW : Type ?u.3330\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nx✝ : Continuous f\nH : ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n⊢ ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ\n[PROOFSTEP]\nsimp_rw [MapClusterPt, ClusterPt, ← Filter.push_pull', map_neBot_iff, ← exists_ultrafilter_iff, forall_exists_index]\n[GOAL]\ncase mpr\nX : Type u_1\nY : Type u_2\nZ : Type ?u.3327\nW : Type ?u.3330\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nx✝ : Continuous f\nH : ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n⊢ ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄ (x : Ultrafilter X), ↑x ≤ comap f (𝓝 y) ⊓ ℱ → ∃ x, f x = y ∧ ∃ u, ↑u ≤ 𝓝 x ⊓ ℱ\n[PROOFSTEP]\nintro ℱ y 𝒰 hy\n[GOAL]\ncase mpr\nX : Type u_1\nY : Type u_2\nZ : Type ?u.3327\nW : Type ?u.3330\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nx✝ : Continuous f\nH : ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nℱ : Filter X\ny : Y\n𝒰 : Ultrafilter X\nhy : ↑𝒰 ≤ comap f (𝓝 y) ⊓ ℱ\n⊢ ∃ x, f x = y ∧ ∃ u, ↑u ≤ 𝓝 x ⊓ ℱ\n[PROOFSTEP]\nrcases H (tendsto_iff_comap.mpr <| hy.trans inf_le_left) with ⟨x, hxy, hx⟩\n[GOAL]\ncase mpr.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type ?u.3327\nW : Type ?u.3330\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nx✝ : Continuous f\nH : ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nℱ : Filter X\ny : Y\n𝒰 : Ultrafilter X\nhy : ↑𝒰 ≤ comap f (𝓝 y) ⊓ ℱ\nx : X\nhxy : f x = y\nhx : ↑𝒰 ≤ 𝓝 x\n⊢ ∃ x, f x = y ∧ ∃ u, ↑u ≤ 𝓝 x ⊓ ℱ\n[PROOFSTEP]\nexact ⟨x, hxy, 𝒰, le_inf hx (hy.trans inf_le_right)⟩\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nW : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ng : Z → W\nhf : IsProperMap f\nhg : IsProperMap g\n⊢ IsProperMap (Prod.map f g)\n[PROOFSTEP]\nsimp_rw [isProperMap_iff_ultrafilter] at hf hg ⊢\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nW : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ng : Z → W\nhf : Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nhg : Continuous g ∧ ∀ ⦃𝒰 : Ultrafilter Z⦄ ⦃y : W⦄, Tendsto g (↑𝒰) (𝓝 y) → ∃ x, g x = y ∧ ↑𝒰 ≤ 𝓝 x\n⊢ Continuous (Prod.map f g) ∧\n    ∀ ⦃𝒰 : Ultrafilter (X × Z)⦄ ⦃y : Y × W⦄, Tendsto (Prod.map f g) (↑𝒰) (𝓝 y) → ∃ x, Prod.map f g x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nconstructor\n  -- Continuity is clear.\n[GOAL]\ncase left\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nW : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ng : Z → W\nhf : Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nhg : Continuous g ∧ ∀ ⦃𝒰 : Ultrafilter Z⦄ ⦃y : W⦄, Tendsto g (↑𝒰) (𝓝 y) → ∃ x, g x = y ∧ ↑𝒰 ≤ 𝓝 x\n⊢ Continuous (Prod.map f g)\n[PROOFSTEP]\nexact\n  hf.1.prod_map\n    hg.1\n      -- Let `𝒰 : Ultrafilter (X × Z)`, and assume that `f × g` tends to some `(y, w) : Y × W`\n        -- along `𝒰`.\n[GOAL]\ncase right\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nW : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ng : Z → W\nhf : Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nhg : Continuous g ∧ ∀ ⦃𝒰 : Ultrafilter Z⦄ ⦃y : W⦄, Tendsto g (↑𝒰) (𝓝 y) → ∃ x, g x = y ∧ ↑𝒰 ≤ 𝓝 x\n⊢ ∀ ⦃𝒰 : Ultrafilter (X × Z)⦄ ⦃y : Y × W⦄, Tendsto (Prod.map f g) (↑𝒰) (𝓝 y) → ∃ x, Prod.map f g x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nintro 𝒰 ⟨y, w⟩ hyw\n[GOAL]\ncase right\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nW : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ng : Z → W\nhf : Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nhg : Continuous g ∧ ∀ ⦃𝒰 : Ultrafilter Z⦄ ⦃y : W⦄, Tendsto g (↑𝒰) (𝓝 y) → ∃ x, g x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter (X × Z)\ny : Y\nw : W\nhyw : Tendsto (Prod.map f g) (↑𝒰) (𝓝 (y, w))\n⊢ ∃ x, Prod.map f g x = (y, w) ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nsimp_rw [nhds_prod_eq, tendsto_prod_iff'] at hyw \n[GOAL]\ncase right\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nW : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ng : Z → W\nhf : Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nhg : Continuous g ∧ ∀ ⦃𝒰 : Ultrafilter Z⦄ ⦃y : W⦄, Tendsto g (↑𝒰) (𝓝 y) → ∃ x, g x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter (X × Z)\ny : Y\nw : W\nhyw : Tendsto (fun n => (Prod.map f g n).fst) (↑𝒰) (𝓝 y) ∧ Tendsto (fun n => (Prod.map f g n).snd) (↑𝒰) (𝓝 w)\n⊢ ∃ x, Prod.map f g x = (y, w) ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrcases hf.2 (show Tendsto f (Ultrafilter.map fst 𝒰) (𝓝 y) by simpa using hyw.1) with ⟨x, hxy, hx⟩\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nW : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ng : Z → W\nhf : Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nhg : Continuous g ∧ ∀ ⦃𝒰 : Ultrafilter Z⦄ ⦃y : W⦄, Tendsto g (↑𝒰) (𝓝 y) → ∃ x, g x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter (X × Z)\ny : Y\nw : W\nhyw : Tendsto (fun n => (Prod.map f g n).fst) (↑𝒰) (𝓝 y) ∧ Tendsto (fun n => (Prod.map f g n).snd) (↑𝒰) (𝓝 w)\n⊢ Tendsto f (↑(Ultrafilter.map fst 𝒰)) (𝓝 y)\n[PROOFSTEP]\nsimpa using hyw.1\n[GOAL]\ncase right.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nW : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ng : Z → W\nhf : Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nhg : Continuous g ∧ ∀ ⦃𝒰 : Ultrafilter Z⦄ ⦃y : W⦄, Tendsto g (↑𝒰) (𝓝 y) → ∃ x, g x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter (X × Z)\ny : Y\nw : W\nhyw : Tendsto (fun n => (Prod.map f g n).fst) (↑𝒰) (𝓝 y) ∧ Tendsto (fun n => (Prod.map f g n).snd) (↑𝒰) (𝓝 w)\nx : X\nhxy : f x = y\nhx : ↑(Ultrafilter.map fst 𝒰) ≤ 𝓝 x\n⊢ ∃ x, Prod.map f g x = (y, w) ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrcases hg.2 (show Tendsto g (Ultrafilter.map snd 𝒰) (𝓝 w) by simpa using hyw.2) with\n  ⟨z, hzw, hz⟩\n    -- By the properties of the product topology, that means that `𝒰` tends to `(x, z)`,\n      -- which completes the proof since `(f × g)(x, z) = (y, w)`.\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nW : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ng : Z → W\nhf : Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nhg : Continuous g ∧ ∀ ⦃𝒰 : Ultrafilter Z⦄ ⦃y : W⦄, Tendsto g (↑𝒰) (𝓝 y) → ∃ x, g x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter (X × Z)\ny : Y\nw : W\nhyw : Tendsto (fun n => (Prod.map f g n).fst) (↑𝒰) (𝓝 y) ∧ Tendsto (fun n => (Prod.map f g n).snd) (↑𝒰) (𝓝 w)\nx : X\nhxy : f x = y\nhx : ↑(Ultrafilter.map fst 𝒰) ≤ 𝓝 x\n⊢ Tendsto g (↑(Ultrafilter.map snd 𝒰)) (𝓝 w)\n[PROOFSTEP]\nsimpa using hyw.2\n[GOAL]\ncase right.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nW : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ng : Z → W\nhf : Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nhg : Continuous g ∧ ∀ ⦃𝒰 : Ultrafilter Z⦄ ⦃y : W⦄, Tendsto g (↑𝒰) (𝓝 y) → ∃ x, g x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter (X × Z)\ny : Y\nw : W\nhyw : Tendsto (fun n => (Prod.map f g n).fst) (↑𝒰) (𝓝 y) ∧ Tendsto (fun n => (Prod.map f g n).snd) (↑𝒰) (𝓝 w)\nx : X\nhxy : f x = y\nhx : ↑(Ultrafilter.map fst 𝒰) ≤ 𝓝 x\nz : Z\nhzw : g z = w\nhz : ↑(Ultrafilter.map snd 𝒰) ≤ 𝓝 z\n⊢ ∃ x, Prod.map f g x = (y, w) ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrefine ⟨⟨x, z⟩, Prod.ext hxy hzw, ?_⟩\n[GOAL]\ncase right.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nW : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ng : Z → W\nhf : Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nhg : Continuous g ∧ ∀ ⦃𝒰 : Ultrafilter Z⦄ ⦃y : W⦄, Tendsto g (↑𝒰) (𝓝 y) → ∃ x, g x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter (X × Z)\ny : Y\nw : W\nhyw : Tendsto (fun n => (Prod.map f g n).fst) (↑𝒰) (𝓝 y) ∧ Tendsto (fun n => (Prod.map f g n).snd) (↑𝒰) (𝓝 w)\nx : X\nhxy : f x = y\nhx : ↑(Ultrafilter.map fst 𝒰) ≤ 𝓝 x\nz : Z\nhzw : g z = w\nhz : ↑(Ultrafilter.map snd 𝒰) ≤ 𝓝 z\n⊢ ↑𝒰 ≤ 𝓝 (x, z)\n[PROOFSTEP]\nrw [nhds_prod_eq, le_prod]\n[GOAL]\ncase right.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nW : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\ng : Z → W\nhf : Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\nhg : Continuous g ∧ ∀ ⦃𝒰 : Ultrafilter Z⦄ ⦃y : W⦄, Tendsto g (↑𝒰) (𝓝 y) → ∃ x, g x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter (X × Z)\ny : Y\nw : W\nhyw : Tendsto (fun n => (Prod.map f g n).fst) (↑𝒰) (𝓝 y) ∧ Tendsto (fun n => (Prod.map f g n).snd) (↑𝒰) (𝓝 w)\nx : X\nhxy : f x = y\nhx : ↑(Ultrafilter.map fst 𝒰) ≤ 𝓝 x\nz : Z\nhzw : g z = w\nhz : ↑(Ultrafilter.map snd 𝒰) ≤ 𝓝 z\n⊢ Tendsto fst (↑𝒰) (𝓝 x) ∧ Tendsto snd (↑𝒰) (𝓝 z)\n[PROOFSTEP]\nexact ⟨hx, hz⟩\n[GOAL]\nX✝ : Type ?u.30436\nY✝ : Type ?u.30439\nZ : Type ?u.30442\nW : Type ?u.30445\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nι : Type u_3\nX : ι → Type u_1\nY : ι → Type u_2\ninst✝¹ : (i : ι) → TopologicalSpace (X i)\ninst✝ : (i : ι) → TopologicalSpace (Y i)\nf : (i : ι) → X i → Y i\nh : ∀ (i : ι), IsProperMap (f i)\n⊢ IsProperMap fun x i => f i (x i)\n[PROOFSTEP]\nsimp_rw [isProperMap_iff_ultrafilter] at h ⊢\n[GOAL]\nX✝ : Type ?u.30436\nY✝ : Type ?u.30439\nZ : Type ?u.30442\nW : Type ?u.30445\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nι : Type u_3\nX : ι → Type u_1\nY : ι → Type u_2\ninst✝¹ : (i : ι) → TopologicalSpace (X i)\ninst✝ : (i : ι) → TopologicalSpace (Y i)\nf : (i : ι) → X i → Y i\nh :\n  ∀ (i : ι),\n    Continuous (f i) ∧ ∀ ⦃𝒰 : Ultrafilter (X i)⦄ ⦃y : Y i⦄, Tendsto (f i) (↑𝒰) (𝓝 y) → ∃ x, f i x = y ∧ ↑𝒰 ≤ 𝓝 x\n⊢ (Continuous fun x i => f i (x i)) ∧\n    ∀ ⦃𝒰 : Ultrafilter ((i : ι) → X i)⦄ ⦃y : (i : ι) → Y i⦄,\n      Tendsto (fun x i => f i (x i)) (↑𝒰) (𝓝 y) → ∃ x, (fun i => f i (x i)) = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nconstructor\n  -- Continuity is clear.\n[GOAL]\ncase left\nX✝ : Type ?u.30436\nY✝ : Type ?u.30439\nZ : Type ?u.30442\nW : Type ?u.30445\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nι : Type u_3\nX : ι → Type u_1\nY : ι → Type u_2\ninst✝¹ : (i : ι) → TopologicalSpace (X i)\ninst✝ : (i : ι) → TopologicalSpace (Y i)\nf : (i : ι) → X i → Y i\nh :\n  ∀ (i : ι),\n    Continuous (f i) ∧ ∀ ⦃𝒰 : Ultrafilter (X i)⦄ ⦃y : Y i⦄, Tendsto (f i) (↑𝒰) (𝓝 y) → ∃ x, f i x = y ∧ ↑𝒰 ≤ 𝓝 x\n⊢ Continuous fun x i => f i (x i)\n[PROOFSTEP]\nexact\n  continuous_pi fun i ↦\n    (h i).1.comp\n      (continuous_apply i)\n        -- Let `𝒰 : Ultrafilter (Π i, X i)`, and assume that `Π i, f i` tends to some `y : Π i, Y i`\n          -- along `𝒰`.\n[GOAL]\ncase right\nX✝ : Type ?u.30436\nY✝ : Type ?u.30439\nZ : Type ?u.30442\nW : Type ?u.30445\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nι : Type u_3\nX : ι → Type u_1\nY : ι → Type u_2\ninst✝¹ : (i : ι) → TopologicalSpace (X i)\ninst✝ : (i : ι) → TopologicalSpace (Y i)\nf : (i : ι) → X i → Y i\nh :\n  ∀ (i : ι),\n    Continuous (f i) ∧ ∀ ⦃𝒰 : Ultrafilter (X i)⦄ ⦃y : Y i⦄, Tendsto (f i) (↑𝒰) (𝓝 y) → ∃ x, f i x = y ∧ ↑𝒰 ≤ 𝓝 x\n⊢ ∀ ⦃𝒰 : Ultrafilter ((i : ι) → X i)⦄ ⦃y : (i : ι) → Y i⦄,\n    Tendsto (fun x i => f i (x i)) (↑𝒰) (𝓝 y) → ∃ x, (fun i => f i (x i)) = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nintro 𝒰 y hy\n[GOAL]\ncase right\nX✝ : Type ?u.30436\nY✝ : Type ?u.30439\nZ : Type ?u.30442\nW : Type ?u.30445\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nι : Type u_3\nX : ι → Type u_1\nY : ι → Type u_2\ninst✝¹ : (i : ι) → TopologicalSpace (X i)\ninst✝ : (i : ι) → TopologicalSpace (Y i)\nf : (i : ι) → X i → Y i\nh :\n  ∀ (i : ι),\n    Continuous (f i) ∧ ∀ ⦃𝒰 : Ultrafilter (X i)⦄ ⦃y : Y i⦄, Tendsto (f i) (↑𝒰) (𝓝 y) → ∃ x, f i x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter ((i : ι) → X i)\ny : (i : ι) → Y i\nhy : Tendsto (fun x i => f i (x i)) (↑𝒰) (𝓝 y)\n⊢ ∃ x, (fun i => f i (x i)) = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nhave : ∀ i, Tendsto (f i) (Ultrafilter.map (eval i) 𝒰) (𝓝 (y i)) := by simpa [tendsto_pi_nhds] using hy\n[GOAL]\nX✝ : Type ?u.30436\nY✝ : Type ?u.30439\nZ : Type ?u.30442\nW : Type ?u.30445\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nι : Type u_3\nX : ι → Type u_1\nY : ι → Type u_2\ninst✝¹ : (i : ι) → TopologicalSpace (X i)\ninst✝ : (i : ι) → TopologicalSpace (Y i)\nf : (i : ι) → X i → Y i\nh :\n  ∀ (i : ι),\n    Continuous (f i) ∧ ∀ ⦃𝒰 : Ultrafilter (X i)⦄ ⦃y : Y i⦄, Tendsto (f i) (↑𝒰) (𝓝 y) → ∃ x, f i x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter ((i : ι) → X i)\ny : (i : ι) → Y i\nhy : Tendsto (fun x i => f i (x i)) (↑𝒰) (𝓝 y)\n⊢ ∀ (i : ι), Tendsto (f i) (↑(Ultrafilter.map (eval i) 𝒰)) (𝓝 (y i))\n[PROOFSTEP]\nsimpa [tendsto_pi_nhds] using hy\n[GOAL]\ncase right\nX✝ : Type ?u.30436\nY✝ : Type ?u.30439\nZ : Type ?u.30442\nW : Type ?u.30445\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nι : Type u_3\nX : ι → Type u_1\nY : ι → Type u_2\ninst✝¹ : (i : ι) → TopologicalSpace (X i)\ninst✝ : (i : ι) → TopologicalSpace (Y i)\nf : (i : ι) → X i → Y i\nh :\n  ∀ (i : ι),\n    Continuous (f i) ∧ ∀ ⦃𝒰 : Ultrafilter (X i)⦄ ⦃y : Y i⦄, Tendsto (f i) (↑𝒰) (𝓝 y) → ∃ x, f i x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter ((i : ι) → X i)\ny : (i : ι) → Y i\nhy : Tendsto (fun x i => f i (x i)) (↑𝒰) (𝓝 y)\nthis : ∀ (i : ι), Tendsto (f i) (↑(Ultrafilter.map (eval i) 𝒰)) (𝓝 (y i))\n⊢ ∃ x, (fun i => f i (x i)) = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nchoose x hxy hx using fun i ↦\n  (h i).2\n    (this i)\n      -- By the properties of the product topology, that means that `𝒰` tends to `x`,\n        -- which completes the proof since `(Π i, f i) x = y`.\n[GOAL]\ncase right\nX✝ : Type ?u.30436\nY✝ : Type ?u.30439\nZ : Type ?u.30442\nW : Type ?u.30445\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nι : Type u_3\nX : ι → Type u_1\nY : ι → Type u_2\ninst✝¹ : (i : ι) → TopologicalSpace (X i)\ninst✝ : (i : ι) → TopologicalSpace (Y i)\nf : (i : ι) → X i → Y i\nh :\n  ∀ (i : ι),\n    Continuous (f i) ∧ ∀ ⦃𝒰 : Ultrafilter (X i)⦄ ⦃y : Y i⦄, Tendsto (f i) (↑𝒰) (𝓝 y) → ∃ x, f i x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter ((i : ι) → X i)\ny : (i : ι) → Y i\nhy : Tendsto (fun x i => f i (x i)) (↑𝒰) (𝓝 y)\nthis : ∀ (i : ι), Tendsto (f i) (↑(Ultrafilter.map (eval i) 𝒰)) (𝓝 (y i))\nx : (i : ι) → X i\nhxy : ∀ (i : ι), f i (x i) = y i\nhx : ∀ (i : ι), ↑(Ultrafilter.map (eval i) 𝒰) ≤ 𝓝 (x i)\n⊢ ∃ x, (fun i => f i (x i)) = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrefine ⟨x, funext hxy, ?_⟩\n[GOAL]\ncase right\nX✝ : Type ?u.30436\nY✝ : Type ?u.30439\nZ : Type ?u.30442\nW : Type ?u.30445\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nι : Type u_3\nX : ι → Type u_1\nY : ι → Type u_2\ninst✝¹ : (i : ι) → TopologicalSpace (X i)\ninst✝ : (i : ι) → TopologicalSpace (Y i)\nf : (i : ι) → X i → Y i\nh :\n  ∀ (i : ι),\n    Continuous (f i) ∧ ∀ ⦃𝒰 : Ultrafilter (X i)⦄ ⦃y : Y i⦄, Tendsto (f i) (↑𝒰) (𝓝 y) → ∃ x, f i x = y ∧ ↑𝒰 ≤ 𝓝 x\n𝒰 : Ultrafilter ((i : ι) → X i)\ny : (i : ι) → Y i\nhy : Tendsto (fun x i => f i (x i)) (↑𝒰) (𝓝 y)\nthis : ∀ (i : ι), Tendsto (f i) (↑(Ultrafilter.map (eval i) 𝒰)) (𝓝 (y i))\nx : (i : ι) → X i\nhxy : ∀ (i : ι), f i (x i) = y i\nhx : ∀ (i : ι), ↑(Ultrafilter.map (eval i) 𝒰) ≤ 𝓝 (x i)\n⊢ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrwa [nhds_pi, le_pi]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36187\nW : Type ?u.36190\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nh : IsProperMap f\nK : Set Y\nhK : IsCompact K\n⊢ IsCompact (f ⁻¹' K)\n[PROOFSTEP]\nrw [isCompact_iff_ultrafilter_le_nhds]\n  -- Let `𝒰 ≤ 𝓟 (f ⁻¹' K)` an ultrafilter.\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36187\nW : Type ?u.36190\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nh : IsProperMap f\nK : Set Y\nhK : IsCompact K\n⊢ ∀ (f_1 : Ultrafilter X), ↑f_1 ≤ 𝓟 (f ⁻¹' K) → ∃ a, a ∈ f ⁻¹' K ∧ ↑f_1 ≤ 𝓝 a\n[PROOFSTEP]\nintro 𝒰 h𝒰\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36187\nW : Type ?u.36190\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nh : IsProperMap f\nK : Set Y\nhK : IsCompact K\n𝒰 : Ultrafilter X\nh𝒰 : ↑𝒰 ≤ 𝓟 (f ⁻¹' K)\n⊢ ∃ a, a ∈ f ⁻¹' K ∧ ↑𝒰 ≤ 𝓝 a\n[PROOFSTEP]\nrw [← comap_principal, ← map_le_iff_le_comap, ← Ultrafilter.coe_map] at h𝒰 \n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36187\nW : Type ?u.36190\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nh : IsProperMap f\nK : Set Y\nhK : IsCompact K\n𝒰 : Ultrafilter X\nh𝒰 : ↑(Ultrafilter.map f 𝒰) ≤ 𝓟 K\n⊢ ∃ a, a ∈ f ⁻¹' K ∧ ↑𝒰 ≤ 𝓝 a\n[PROOFSTEP]\nrcases hK.ultrafilter_le_nhds _ h𝒰 with\n  ⟨y, hyK, hy⟩\n    -- Then, by properness of `f`, that means that `𝒰` tends to some `x ∈ f ⁻¹' {y} ⊆ f ⁻¹' K`,\n      -- which completes the proof.\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36187\nW : Type ?u.36190\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nh : IsProperMap f\nK : Set Y\nhK : IsCompact K\n𝒰 : Ultrafilter X\nh𝒰 : ↑(Ultrafilter.map f 𝒰) ≤ 𝓟 K\ny : Y\nhyK : y ∈ K\nhy : ↑(Ultrafilter.map f 𝒰) ≤ 𝓝 y\n⊢ ∃ a, a ∈ f ⁻¹' K ∧ ↑𝒰 ≤ 𝓝 a\n[PROOFSTEP]\nrcases h.ultrafilter_le_nhds_of_tendsto hy with ⟨x, rfl, hx⟩\n[GOAL]\ncase intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36187\nW : Type ?u.36190\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nh : IsProperMap f\nK : Set Y\nhK : IsCompact K\n𝒰 : Ultrafilter X\nh𝒰 : ↑(Ultrafilter.map f 𝒰) ≤ 𝓟 K\nx : X\nhx : ↑𝒰 ≤ 𝓝 x\nhyK : f x ∈ K\nhy : ↑(Ultrafilter.map f 𝒰) ≤ 𝓝 (f x)\n⊢ ∃ a, a ∈ f ⁻¹' K ∧ ↑𝒰 ≤ 𝓝 a\n[PROOFSTEP]\nexact ⟨x, hyK, hx⟩\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36806\nW : Type ?u.36809\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\n⊢ IsProperMap f ↔ Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36806\nW : Type ?u.36809\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\n⊢ IsProperMap f → Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36806\nW : Type ?u.36809\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\n⊢ (Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})) → IsProperMap f\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36806\nW : Type ?u.36809\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nH : IsProperMap f\n⊢ Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})\n[PROOFSTEP]\nexact ⟨H.continuous, H.isClosedMap, fun y ↦ H.isCompact_preimage isCompact_singleton⟩\n[GOAL]\ncase mpr\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36806\nW : Type ?u.36809\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nH : Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})\n⊢ IsProperMap f\n[PROOFSTEP]\nrw [isProperMap_iff_clusterPt]\n  -- Let `ℱ : Filter X` and `y` some cluster point of `map f ℱ`.\n[GOAL]\ncase mpr\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36806\nW : Type ?u.36809\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nH : Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})\n⊢ Continuous f ∧ ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ\n[PROOFSTEP]\nrefine\n  ⟨H.1, fun ℱ y hy ↦ ?_⟩\n    -- That means that the singleton `pure y` meets the \"closure\" of `map f ℱ`, by which we mean\n      -- `Filter.lift' (map f ℱ) closure`. But `f` is closed, so\n      -- `closure (map f ℱ) = map f (closure ℱ)` (see `IsClosedMap.lift'_closure_map_eq`).\n      -- Thus `map f (closure ℱ ⊓ 𝓟 (f ⁻¹' {y})) = map f (closure ℱ) ⊓ 𝓟 {y} ≠ ⊥`, hence\n      -- `closure ℱ ⊓ 𝓟 (f ⁻¹' {y}) ≠ ⊥`.\n[GOAL]\ncase mpr\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36806\nW : Type ?u.36809\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nH : Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})\nℱ : Filter X\ny : Y\nhy : MapClusterPt y ℱ f\n⊢ ∃ x, f x = y ∧ ClusterPt x ℱ\n[PROOFSTEP]\nrw [H.2.1.mapClusterPt_iff_lift'_closure H.1] at hy \n[GOAL]\ncase mpr\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36806\nW : Type ?u.36809\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nH : Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})\nℱ : Filter X\ny : Y\nhy : NeBot (Filter.lift' ℱ closure ⊓ 𝓟 (f ⁻¹' {y}))\n⊢ ∃ x, f x = y ∧ ClusterPt x ℱ\n[PROOFSTEP]\nrcases H.2.2 y (f := Filter.lift' ℱ closure ⊓ 𝓟 (f ⁻¹' { y })) inf_le_right with ⟨x, hxy, hx⟩\n[GOAL]\ncase mpr.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36806\nW : Type ?u.36809\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nH : Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})\nℱ : Filter X\ny : Y\nhy : NeBot (Filter.lift' ℱ closure ⊓ 𝓟 (f ⁻¹' {y}))\nx : X\nhxy : x ∈ f ⁻¹' {y}\nhx : ClusterPt x (Filter.lift' ℱ closure ⊓ 𝓟 (f ⁻¹' {y}))\n⊢ ∃ x, f x = y ∧ ClusterPt x ℱ\n[PROOFSTEP]\nrefine\n  ⟨x, hxy, ?_⟩\n    -- In particular `x` is a cluster point of `closure ℱ`. Since cluster points of `closure ℱ`\n      -- are exactly cluster points of `ℱ` (see `clusterPt_lift'_closure_iff`), this completes\n      -- the proof.\n[GOAL]\ncase mpr.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36806\nW : Type ?u.36809\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nH : Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})\nℱ : Filter X\ny : Y\nhy : NeBot (Filter.lift' ℱ closure ⊓ 𝓟 (f ⁻¹' {y}))\nx : X\nhxy : x ∈ f ⁻¹' {y}\nhx : ClusterPt x (Filter.lift' ℱ closure ⊓ 𝓟 (f ⁻¹' {y}))\n⊢ ClusterPt x ℱ\n[PROOFSTEP]\nrw [← clusterPt_lift'_closure_iff]\n[GOAL]\ncase mpr.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type ?u.36806\nW : Type ?u.36809\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace W\nf : X → Y\nH : Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})\nℱ : Filter X\ny : Y\nhy : NeBot (Filter.lift' ℱ closure ⊓ 𝓟 (f ⁻¹' {y}))\nx : X\nhxy : x ∈ f ⁻¹' {y}\nhx : ClusterPt x (Filter.lift' ℱ closure ⊓ 𝓟 (f ⁻¹' {y}))\n⊢ ClusterPt x (Filter.lift' ℱ closure)\n[PROOFSTEP]\nexact hx.mono inf_le_left\n[GOAL]\nX : Type u_2\nY : Type u_1\nZ : Type ?u.37764\nW : Type ?u.37767\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace W\nf : X → Y\ninst✝ : T1Space Y\n⊢ IsProperMap f ↔ Continuous f ∧ IsClosedMap f ∧ Tendsto f (cocompact X) cofinite\n[PROOFSTEP]\nsimp_rw [isProperMap_iff_isClosedMap_and_compact_fibers, Tendsto, le_cofinite_iff_compl_singleton_mem, mem_map,\n  preimage_compl]\n[GOAL]\nX : Type u_2\nY : Type u_1\nZ : Type ?u.37764\nW : Type ?u.37767\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace W\nf : X → Y\ninst✝ : T1Space Y\n⊢ (Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})) ↔\n    Continuous f ∧ IsClosedMap f ∧ ∀ (x : Y), (f ⁻¹' {x})ᶜ ∈ cocompact X\n[PROOFSTEP]\nrefine and_congr_right fun f_cont ↦ and_congr_right fun _ ↦ ⟨fun H y ↦ (H y).compl_mem_cocompact, fun H y ↦ ?_⟩\n[GOAL]\nX : Type u_2\nY : Type u_1\nZ : Type ?u.37764\nW : Type ?u.37767\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace W\nf : X → Y\ninst✝ : T1Space Y\nf_cont : Continuous f\nx✝ : IsClosedMap f\nH : ∀ (x : Y), (f ⁻¹' {x})ᶜ ∈ cocompact X\ny : Y\n⊢ IsCompact (f ⁻¹' {y})\n[PROOFSTEP]\nrcases mem_cocompact.mp (H y) with ⟨K, hK, hKy⟩\n[GOAL]\ncase intro.intro\nX : Type u_2\nY : Type u_1\nZ : Type ?u.37764\nW : Type ?u.37767\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace W\nf : X → Y\ninst✝ : T1Space Y\nf_cont : Continuous f\nx✝ : IsClosedMap f\nH : ∀ (x : Y), (f ⁻¹' {x})ᶜ ∈ cocompact X\ny : Y\nK : Set X\nhK : IsCompact K\nhKy : Kᶜ ⊆ (f ⁻¹' {y})ᶜ\n⊢ IsCompact (f ⁻¹' {y})\n[PROOFSTEP]\nexact isCompact_of_isClosed_subset hK (isClosed_singleton.preimage f_cont) (compl_le_compl_iff_le.mp hKy)\n[GOAL]\nX : Type u_2\nY : Type u_1\nZ : Type ?u.39226\nW : Type ?u.39229\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\n⊢ IsProperMap f ↔ Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX : Type u_2\nY : Type u_1\nZ : Type ?u.39226\nW : Type ?u.39229\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\n⊢ IsProperMap f → Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nX : Type u_2\nY : Type u_1\nZ : Type ?u.39226\nW : Type ?u.39229\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\n⊢ (Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)) → IsProperMap f\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nX : Type u_2\nY : Type u_1\nZ : Type ?u.39226\nW : Type ?u.39229\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\nH : IsProperMap f\n⊢ Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)\n[PROOFSTEP]\nexact ⟨H.continuous, fun K hK ↦ H.isCompact_preimage hK⟩\n[GOAL]\ncase mpr\nX : Type u_2\nY : Type u_1\nZ : Type ?u.39226\nW : Type ?u.39229\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\nH : Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)\n⊢ IsProperMap f\n[PROOFSTEP]\nrw [isProperMap_iff_ultrafilter]\n  -- Let `𝒰 : Ultrafilter X`, and assume that `f` tends to some `y` along `𝒰`.\n[GOAL]\ncase mpr\nX : Type u_2\nY : Type u_1\nZ : Type ?u.39226\nW : Type ?u.39229\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\nH : Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)\n⊢ Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrefine\n  ⟨H.1, fun 𝒰 y hy ↦ ?_⟩\n    -- Pick `K` some compact neighborhood of `y`, which exists by local compactness.\n[GOAL]\ncase mpr\nX : Type u_2\nY : Type u_1\nZ : Type ?u.39226\nW : Type ?u.39229\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\nH : Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrcases exists_compact_mem_nhds y with\n  ⟨K, hK, hKy⟩\n    -- Then `map f 𝒰 ≤ 𝓝 y ≤ 𝓟 K`, hence `𝒰 ≤ 𝓟 (f ⁻¹' K)`\n[GOAL]\ncase mpr.intro.intro\nX : Type u_2\nY : Type u_1\nZ : Type ?u.39226\nW : Type ?u.39229\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\nH : Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\nK : Set Y\nhK : IsCompact K\nhKy : K ∈ 𝓝 y\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nhave : 𝒰 ≤ 𝓟 (f ⁻¹' K) := by\n  simpa only [← comap_principal, ← tendsto_iff_comap] using\n    hy.mono_right\n      (le_principal_iff.mpr hKy)\n        -- By compactness of `f ⁻¹' K`, `𝒰` converges to some `x ∈ f ⁻¹' K`.\n[GOAL]\nX : Type u_2\nY : Type u_1\nZ : Type ?u.39226\nW : Type ?u.39229\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\nH : Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\nK : Set Y\nhK : IsCompact K\nhKy : K ∈ 𝓝 y\n⊢ ↑𝒰 ≤ 𝓟 (f ⁻¹' K)\n[PROOFSTEP]\nsimpa only [← comap_principal, ← tendsto_iff_comap] using\n  hy.mono_right\n    (le_principal_iff.mpr hKy)\n      -- By compactness of `f ⁻¹' K`, `𝒰` converges to some `x ∈ f ⁻¹' K`.\n[GOAL]\ncase mpr.intro.intro\nX : Type u_2\nY : Type u_1\nZ : Type ?u.39226\nW : Type ?u.39229\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\nH : Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\nK : Set Y\nhK : IsCompact K\nhKy : K ∈ 𝓝 y\nthis : ↑𝒰 ≤ 𝓟 (f ⁻¹' K)\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrcases(H.2 hK).ultrafilter_le_nhds _ this with\n  ⟨x, -, hx⟩\n    -- Finally, `f` tends to `f x` along `𝒰` by continuity, thus `f x = y`.\n[GOAL]\ncase mpr.intro.intro.intro.intro\nX : Type u_2\nY : Type u_1\nZ : Type ?u.39226\nW : Type ?u.39229\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\nH : Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\nK : Set Y\nhK : IsCompact K\nhKy : K ∈ 𝓝 y\nthis : ↑𝒰 ≤ 𝓟 (f ⁻¹' K)\nx : X\nhx : ↑𝒰 ≤ 𝓝 x\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrefine ⟨x, tendsto_nhds_unique ((H.1.tendsto _).comp hx) hy, hx⟩\n[GOAL]\nX : Type u_2\nY : Type u_1\nZ : Type ?u.49990\nW : Type ?u.49993\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\n⊢ IsProperMap f ↔ Continuous f ∧ Tendsto f (cocompact X) (cocompact Y)\n[PROOFSTEP]\nsimp_rw [isProperMap_iff_isCompact_preimage, hasBasis_cocompact.tendsto_right_iff, ← mem_preimage, eventually_mem_set,\n  preimage_compl]\n[GOAL]\nX : Type u_2\nY : Type u_1\nZ : Type ?u.49990\nW : Type ?u.49993\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\n⊢ (Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)) ↔\n    Continuous f ∧ ∀ (i : Set Y), IsCompact i → (f ⁻¹' i)ᶜ ∈ cocompact X\n[PROOFSTEP]\nrefine and_congr_right fun f_cont ↦ ⟨fun H K hK ↦ (H hK).compl_mem_cocompact, fun H K hK ↦ ?_⟩\n[GOAL]\nX : Type u_2\nY : Type u_1\nZ : Type ?u.49990\nW : Type ?u.49993\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\nf_cont : Continuous f\nH : ∀ (i : Set Y), IsCompact i → (f ⁻¹' i)ᶜ ∈ cocompact X\nK : Set Y\nhK : IsCompact K\n⊢ IsCompact (f ⁻¹' K)\n[PROOFSTEP]\nrcases mem_cocompact.mp (H K hK) with ⟨K', hK', hK'y⟩\n[GOAL]\ncase intro.intro\nX : Type u_2\nY : Type u_1\nZ : Type ?u.49990\nW : Type ?u.49993\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf : X → Y\ninst✝¹ : T2Space Y\ninst✝ : LocallyCompactSpace Y\nf_cont : Continuous f\nH : ∀ (i : Set Y), IsCompact i → (f ⁻¹' i)ᶜ ∈ cocompact X\nK : Set Y\nhK : IsCompact K\nK' : Set X\nhK' : IsCompact K'\nhK'y : K'ᶜ ⊆ (f ⁻¹' K)ᶜ\n⊢ IsCompact (f ⁻¹' K)\n[PROOFSTEP]\nexact isCompact_of_isClosed_subset hK' (hK.isClosed.preimage f_cont) (compl_le_compl_iff_le.mp hK'y)\n[GOAL]\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\n⊢ IsProperMap f ↔ Continuous f ∧ IsClosedMap (Prod.map f id)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\n⊢ IsProperMap f → Continuous f ∧ IsClosedMap (Prod.map f id)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\n⊢ Continuous f ∧ IsClosedMap (Prod.map f id) → IsProperMap f\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : IsProperMap f\n⊢ Continuous f ∧ IsClosedMap (Prod.map f id)\n[PROOFSTEP]\nexact ⟨H.continuous, H.universally_closed _⟩\n[GOAL]\ncase mpr\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n⊢ IsProperMap f\n[PROOFSTEP]\nrw [isProperMap_iff_ultrafilter]\n  -- Let `𝒰 : Ultrafilter X`, and assume that `f` tends to some `y` along `𝒰`.\n[GOAL]\ncase mpr\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n⊢ Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrefine\n  ⟨H.1, fun 𝒰 y hy ↦ ?_⟩\n    -- In `X × Filter X`, consider the closed set `F := closure {(x, ℱ) | ℱ = pure x}`\n[GOAL]\ncase mpr\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nlet F : Set (X × Filter X) :=\n  closure\n    {xℱ | xℱ.2 = pure xℱ.1}\n      -- Since `f × id` is closed, the set `(f × id) '' F` is also closed.\n[GOAL]\ncase mpr\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\nF : Set (X × Filter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nhave := H.2 F isClosed_closure\n[GOAL]\ncase mpr\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\nF : Set (X × Filter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\nthis : IsClosed (Prod.map f id '' F)\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nhave : (y, ↑𝒰) ∈ Prod.map f id '' F :=\n  -- Note that, by the properties of the topology on `Filter X`, the function `pure : X → Filter X`\n    -- tends to the point `𝒰` of `Filter X` along the filter `𝒰` on `X`. Since `f` tends to `y` along\n    -- `𝒰`, we get that the function `(f, pure) : X → (Y, Filter X)` tends to `(y, 𝒰)` along\n    -- `𝒰`. Furthermore, each `(f, pure)(x) = (f × id)(x, pure x)` is clearly an element of\n    -- the closed set `(f × id) '' F`, thus the limit `(y, 𝒰)` also belongs to that set.this.mem_of_tendsto\n    (hy.prod_mk_nhds (Filter.tendsto_pure_self (𝒰 : Filter X)))\n    (eventually_of_forall fun x ↦ ⟨⟨x, pure x⟩, subset_closure rfl, rfl⟩)\n      -- The above shows that `(y, 𝒰) = (f x, 𝒰)`, for some `x : X` such that `(x, 𝒰) ∈ F`.\n[GOAL]\ncase mpr\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\nF : Set (X × Filter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\nthis✝ : IsClosed (Prod.map f id '' F)\nthis : (y, ↑𝒰) ∈ Prod.map f id '' F\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrcases this with\n  ⟨⟨x, _⟩, hx, ⟨_, _⟩⟩\n    -- We already know that `f x = y`, so to finish the proof we just have to check that `𝒰` tends\n      -- to `x`. So, for `U ∈ 𝓝 x` arbitrary, let's show that `U ∈ 𝒰`. Since `𝒰` is a ultrafilter,\n      -- it is enough to show that `Uᶜ` is not in `𝒰`.\n[GOAL]\ncase mpr.intro.mk.intro.refl\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n𝒰 : Ultrafilter X\nF : Set (X × Filter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\nthis : IsClosed (Prod.map f id '' F)\nx : X\nhy : Tendsto f (↑𝒰) (𝓝 (f x))\nhx : (x, 𝒰.1) ∈ F\n⊢ ∃ x_1, f x_1 = f x ∧ ↑𝒰 ≤ 𝓝 x_1\n[PROOFSTEP]\nrefine ⟨x, rfl, fun U hU ↦ Ultrafilter.compl_not_mem_iff.mp fun hUc ↦ ?_⟩\n[GOAL]\ncase mpr.intro.mk.intro.refl\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n𝒰 : Ultrafilter X\nF : Set (X × Filter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\nthis : IsClosed (Prod.map f id '' F)\nx : X\nhy : Tendsto f (↑𝒰) (𝓝 (f x))\nhx : (x, 𝒰.1) ∈ F\nU : Set X\nhU : U ∈ 𝓝 x\nhUc : Uᶜ ∈ 𝒰\n⊢ False\n[PROOFSTEP]\nrw [mem_closure_iff_nhds] at hx \n[GOAL]\ncase mpr.intro.mk.intro.refl\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n𝒰 : Ultrafilter X\nF : Set (X × Filter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\nthis : IsClosed (Prod.map f id '' F)\nx : X\nhy : Tendsto f (↑𝒰) (𝓝 (f x))\nhx : ∀ (t : Set (X × Filter X)), t ∈ 𝓝 (x, 𝒰.1) → Set.Nonempty (t ∩ {xℱ | xℱ.snd = pure xℱ.fst})\nU : Set X\nhU : U ∈ 𝓝 x\nhUc : Uᶜ ∈ 𝒰\n⊢ False\n[PROOFSTEP]\nrcases hx (U ×ˢ {𝒢 | Uᶜ ∈ 𝒢}) (prod_mem_nhds hU (isOpen_setOf_mem.mem_nhds hUc)) with\n  ⟨⟨z, 𝒢⟩, ⟨⟨hz : z ∈ U, hz' : Uᶜ ∈ 𝒢⟩, rfl : 𝒢 = pure z⟩⟩\n[GOAL]\ncase mpr.intro.mk.intro.refl.intro.mk.intro.intro\nX✝ : Type ?u.52247\nY✝ : Type ?u.52250\nZ : Type ?u.52253\nW : Type ?u.52256\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n𝒰 : Ultrafilter X\nF : Set (X × Filter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\nthis : IsClosed (Prod.map f id '' F)\nx : X\nhy : Tendsto f (↑𝒰) (𝓝 (f x))\nhx : ∀ (t : Set (X × Filter X)), t ∈ 𝓝 (x, 𝒰.1) → Set.Nonempty (t ∩ {xℱ | xℱ.snd = pure xℱ.fst})\nU : Set X\nhU : U ∈ 𝓝 x\nhUc : Uᶜ ∈ 𝒰\nz : X\nhz : z ∈ U\nhz' : Uᶜ ∈ pure z\n⊢ False\n[PROOFSTEP]\nexact hz' hz\n[GOAL]\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\n⊢ IsProperMap f ↔ Continuous f ∧ IsClosedMap (Prod.map f id)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\n⊢ IsProperMap f → Continuous f ∧ IsClosedMap (Prod.map f id)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\n⊢ Continuous f ∧ IsClosedMap (Prod.map f id) → IsProperMap f\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : IsProperMap f\n⊢ Continuous f ∧ IsClosedMap (Prod.map f id)\n[PROOFSTEP]\nexact ⟨H.continuous, H.universally_closed _⟩\n[GOAL]\ncase mpr\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n⊢ IsProperMap f\n[PROOFSTEP]\nrw [isProperMap_iff_ultrafilter]\n[GOAL]\ncase mpr\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n⊢ Continuous f ∧ ∀ ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄, Tendsto f (↑𝒰) (𝓝 y) → ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrefine ⟨H.1, fun 𝒰 y hy ↦ ?_⟩\n[GOAL]\ncase mpr\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nlet F : Set (X × Ultrafilter X) := closure {xℱ | xℱ.2 = pure xℱ.1}\n[GOAL]\ncase mpr\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\nF : Set (X × Ultrafilter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nhave := H.2 F isClosed_closure\n[GOAL]\ncase mpr\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\nF : Set (X × Ultrafilter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\nthis : IsClosed (Prod.map f id '' F)\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nhave : (y, 𝒰) ∈ Prod.map f id '' F :=\n  this.mem_of_tendsto (hy.prod_mk_nhds (Ultrafilter.tendsto_pure_self 𝒰))\n    (eventually_of_forall fun x ↦ ⟨⟨x, pure x⟩, subset_closure rfl, rfl⟩)\n[GOAL]\ncase mpr\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\n𝒰 : Ultrafilter X\ny : Y\nhy : Tendsto f (↑𝒰) (𝓝 y)\nF : Set (X × Ultrafilter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\nthis✝ : IsClosed (Prod.map f id '' F)\nthis : (y, 𝒰) ∈ Prod.map f id '' F\n⊢ ∃ x, f x = y ∧ ↑𝒰 ≤ 𝓝 x\n[PROOFSTEP]\nrcases this with ⟨⟨x, _⟩, hx, ⟨_, _⟩⟩\n[GOAL]\ncase mpr.intro.mk.intro.refl\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\nF : Set (X × Ultrafilter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\nthis : IsClosed (Prod.map f id '' F)\nx : X\nsnd✝ : Ultrafilter X\nhx : (x, snd✝) ∈ F\nhy : Tendsto f (↑(id snd✝)) (𝓝 (f x))\n⊢ ∃ x_1, f x_1 = f x ∧ ↑(id snd✝) ≤ 𝓝 x_1\n[PROOFSTEP]\nrefine ⟨x, rfl, fun U hU ↦ Ultrafilter.compl_not_mem_iff.mp fun hUc ↦ ?_⟩\n[GOAL]\ncase mpr.intro.mk.intro.refl\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\nF : Set (X × Ultrafilter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\nthis : IsClosed (Prod.map f id '' F)\nx : X\nsnd✝ : Ultrafilter X\nhx : (x, snd✝) ∈ F\nhy : Tendsto f (↑(id snd✝)) (𝓝 (f x))\nU : Set X\nhU : U ∈ 𝓝 x\nhUc : Uᶜ ∈ id snd✝\n⊢ False\n[PROOFSTEP]\nrw [mem_closure_iff_nhds] at hx \n[GOAL]\ncase mpr.intro.mk.intro.refl\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\nF : Set (X × Ultrafilter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\nthis : IsClosed (Prod.map f id '' F)\nx : X\nsnd✝ : Ultrafilter X\nhx : ∀ (t : Set (X × Ultrafilter X)), t ∈ 𝓝 (x, snd✝) → Set.Nonempty (t ∩ {xℱ | xℱ.snd = pure xℱ.fst})\nhy : Tendsto f (↑(id snd✝)) (𝓝 (f x))\nU : Set X\nhU : U ∈ 𝓝 x\nhUc : Uᶜ ∈ id snd✝\n⊢ False\n[PROOFSTEP]\nrcases hx (U ×ˢ {𝒢 | Uᶜ ∈ 𝒢}) (prod_mem_nhds hU ((ultrafilter_isOpen_basic _).mem_nhds hUc)) with\n  ⟨⟨y, 𝒢⟩, ⟨⟨hy : y ∈ U, hy' : Uᶜ ∈ 𝒢⟩, rfl : 𝒢 = pure y⟩⟩\n[GOAL]\ncase mpr.intro.mk.intro.refl.intro.mk.intro.intro\nX✝ : Type ?u.54240\nY✝ : Type ?u.54243\nZ : Type ?u.54246\nW : Type ?u.54249\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ IsClosedMap (Prod.map f id)\nF : Set (X × Ultrafilter X) := closure {xℱ | xℱ.snd = pure xℱ.fst}\nthis : IsClosed (Prod.map f id '' F)\nx : X\nsnd✝ : Ultrafilter X\nhx : ∀ (t : Set (X × Ultrafilter X)), t ∈ 𝓝 (x, snd✝) → Set.Nonempty (t ∩ {xℱ | xℱ.snd = pure xℱ.fst})\nhy✝ : Tendsto f (↑(id snd✝)) (𝓝 (f x))\nU : Set X\nhU : U ∈ 𝓝 x\nhUc : Uᶜ ∈ id snd✝\ny : X\nhy : y ∈ U\nhy' : Uᶜ ∈ pure y\n⊢ False\n[PROOFSTEP]\nexact hy' hy\n[GOAL]\nX✝ : Type ?u.56079\nY✝ : Type ?u.56082\nZ : Type ?u.56085\nW : Type ?u.56088\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\n⊢ IsProperMap f ↔ Continuous f ∧ ∀ (Z : Type u) [inst : TopologicalSpace Z], IsClosedMap (Prod.map f id)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX✝ : Type ?u.56079\nY✝ : Type ?u.56082\nZ : Type ?u.56085\nW : Type ?u.56088\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\n⊢ IsProperMap f → Continuous f ∧ ∀ (Z : Type u) [inst : TopologicalSpace Z], IsClosedMap (Prod.map f id)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nX✝ : Type ?u.56079\nY✝ : Type ?u.56082\nZ : Type ?u.56085\nW : Type ?u.56088\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\n⊢ (Continuous f ∧ ∀ (Z : Type u) [inst : TopologicalSpace Z], IsClosedMap (Prod.map f id)) → IsProperMap f\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nX✝ : Type ?u.56079\nY✝ : Type ?u.56082\nZ : Type ?u.56085\nW : Type ?u.56088\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : IsProperMap f\n⊢ Continuous f ∧ ∀ (Z : Type u) [inst : TopologicalSpace Z], IsClosedMap (Prod.map f id)\n[PROOFSTEP]\nexact ⟨H.continuous, fun Z ↦ H.universally_closed _⟩\n[GOAL]\ncase mpr\nX✝ : Type ?u.56079\nY✝ : Type ?u.56082\nZ : Type ?u.56085\nW : Type ?u.56088\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ ∀ (Z : Type u) [inst : TopologicalSpace Z], IsClosedMap (Prod.map f id)\n⊢ IsProperMap f\n[PROOFSTEP]\nrw [isProperMap_iff_isClosedMap_ultrafilter]\n[GOAL]\ncase mpr\nX✝ : Type ?u.56079\nY✝ : Type ?u.56082\nZ : Type ?u.56085\nW : Type ?u.56088\ninst✝⁵ : TopologicalSpace X✝\ninst✝⁴ : TopologicalSpace Y✝\ninst✝³ : TopologicalSpace Z\ninst✝² : TopologicalSpace W\nf✝ : X✝ → Y✝\nX : Type u\nY : Type v\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nH : Continuous f ∧ ∀ (Z : Type u) [inst : TopologicalSpace Z], IsClosedMap (Prod.map f id)\n⊢ Continuous f ∧ IsClosedMap (Prod.map f id)\n[PROOFSTEP]\nexact ⟨H.1, H.2 _⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.ProperMap", "llama_tokens": 32009, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.712232184238947, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.39491171035474965}}
{"text": "[GOAL]\nx : PSet\ny : PSet\ninst✝¹ : IsEmpty (Type x)\ninst✝ : IsEmpty (Type y)\n⊢ (∀ (i : Type x), ∃ j, Equiv (Func x i) (Func y j)) ∧ ∀ (j : Type y), ∃ i, Equiv (Func x i) (Func y j)\n[PROOFSTEP]\nsimp\n[GOAL]\nx y z : PSet\nhxy : x ⊆ y\nhyz : y ⊆ z\na : Type x\n⊢ ∃ b, Equiv (Func x a) (Func z b)\n[PROOFSTEP]\ncases' hxy a with b hb\n[GOAL]\ncase intro\nx y z : PSet\nhxy : x ⊆ y\nhyz : y ⊆ z\na : Type x\nb : Type y\nhb : Equiv (Func x a) (Func y b)\n⊢ ∃ b, Equiv (Func x a) (Func z b)\n[PROOFSTEP]\ncases' hyz b with c hc\n[GOAL]\ncase intro.intro\nx y z : PSet\nhxy : x ⊆ y\nhyz : y ⊆ z\na : Type x\nb : Type y\nhb : Equiv (Func x a) (Func y b)\nc : Type z\nhc : Equiv (Func y b) (Func z c)\n⊢ ∃ b, Equiv (Func x a) (Func z b)\n[PROOFSTEP]\nexact ⟨c, hb.trans hc⟩\n[GOAL]\nx : PSet\ni : Type x\n⊢ Func x i ∈ x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα✝ : Type u_1\nA✝ : α✝ → PSet\ni : Type (mk α✝ A✝)\n⊢ Func (mk α✝ A✝) i ∈ mk α✝ A✝\n[PROOFSTEP]\napply Mem.mk\n[GOAL]\nα : Type u\nA : α → PSet\nβ : Type u\nB : β → PSet\nH : Equiv (mk α A) (mk β B)\n⊢ ∀ (y : PSet), y ∈ mk β B → Acc (fun x x_1 => x ∈ x_1) y\n[PROOFSTEP]\nrintro ⟨γ, C⟩ ⟨b, hc⟩\n[GOAL]\ncase mk.intro\nα : Type u\nA : α → PSet\nβ : Type u\nB : β → PSet\nH : Equiv (mk α A) (mk β B)\nγ : Type u\nC : γ → PSet\nb : Type (mk β B)\nhc : Equiv (mk γ C) (Func (mk β B) b)\n⊢ Acc (fun x x_1 => x ∈ x_1) (mk γ C)\n[PROOFSTEP]\ncases' H.exists_right b with a ha\n[GOAL]\ncase mk.intro.intro\nα : Type u\nA : α → PSet\nβ : Type u\nB : β → PSet\nH : Equiv (mk α A) (mk β B)\nγ : Type u\nC : γ → PSet\nb : Type (mk β B)\nhc : Equiv (mk γ C) (Func (mk β B) b)\na : Type (mk α A)\nha : Equiv (Func (mk α A) a) (Func (mk β B) b)\n⊢ Acc (fun x x_1 => x ∈ x_1) (mk γ C)\n[PROOFSTEP]\nhave H := ha.trans hc.symm\n[GOAL]\ncase mk.intro.intro\nα : Type u\nA : α → PSet\nβ : Type u\nB : β → PSet\nH✝ : Equiv (mk α A) (mk β B)\nγ : Type u\nC : γ → PSet\nb : Type (mk β B)\nhc : Equiv (mk γ C) (Func (mk β B) b)\na : Type (mk α A)\nha : Equiv (Func (mk α A) a) (Func (mk β B) b)\nH : Equiv (Func (mk α A) a) (mk γ C)\n⊢ Acc (fun x x_1 => x ∈ x_1) (mk γ C)\n[PROOFSTEP]\nrw [mk_func] at H \n[GOAL]\ncase mk.intro.intro\nα : Type u\nA : α → PSet\nβ : Type u\nB : β → PSet\nH✝ : Equiv (mk α A) (mk β B)\nγ : Type u\nC : γ → PSet\nb : Type (mk β B)\nhc : Equiv (mk γ C) (Func (mk β B) b)\na : Type (mk α A)\nha : Equiv (Func (mk α A) a) (Func (mk β B) b)\nH : Equiv (A a) (mk γ C)\n⊢ Acc (fun x x_1 => x ∈ x_1) (mk γ C)\n[PROOFSTEP]\nexact mem_wf_aux H\n[GOAL]\n⊢ toSet ∅ = ∅\n[PROOFSTEP]\nsimp [toSet]\n[GOAL]\n⊢ ¬PSet.Nonempty ∅\n[PROOFSTEP]\nsimp [PSet.Nonempty]\n[GOAL]\nα : Type u\nA : α → PSet\ny : PSet\nx✝ : y ∈ ⋃₀ mk α A\na : Type (mk α A)\nc : Type (Func (mk α A) a)\ne : Equiv y (Func (A a) c)\nthis : Func (A a) c ∈ mk (Type (A a)) (Func (A a))\n⊢ Func (A a) c ∈ A (?m.26421 α A y x✝ a c e this)\n[PROOFSTEP]\nrwa [eta] at this \n[GOAL]\nα : Type u\nA : α → PSet\ny : PSet\nx✝ : ∃ z, z ∈ mk α A ∧ y ∈ z\nβ : Type u\nB : β → PSet\na : Type (mk α A)\ne : Equiv (mk β B) (A a)\nb : Type (mk β B)\nyb : Equiv y (Func (mk β B) b)\n⊢ y ∈ ⋃₀ mk α A\n[PROOFSTEP]\nrw [← eta (A a)] at e \n[GOAL]\nα : Type u\nA : α → PSet\ny : PSet\nx✝ : ∃ z, z ∈ mk α A ∧ y ∈ z\nβ : Type u\nB : β → PSet\na : Type (mk α A)\ne : Equiv (mk β B) (mk (Type (A a)) (Func (A a)))\nb : Type (mk β B)\nyb : Equiv y (Func (mk β B) b)\n⊢ y ∈ ⋃₀ mk α A\n[PROOFSTEP]\nexact\n  let ⟨βt, _⟩ := e\n  let ⟨c, bc⟩ := βt b\n  ⟨⟨a, c⟩, yb.trans bc⟩\n[GOAL]\nx : PSet\n⊢ toSet (⋃₀ x) = ⋃₀ (toSet '' toSet x)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nx x✝ : PSet\n⊢ x✝ ∈ toSet (⋃₀ x) ↔ x✝ ∈ ⋃₀ (toSet '' toSet x)\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\nF : Arity ZFSet (n + 1)\n⊢ Definable (n + 1) F\n[PROOFSTEP]\nhave I := fun x => allDefinable (F x)\n[GOAL]\nn : ℕ\nF : Arity ZFSet (n + 1)\nI : (x : ZFSet) → Definable (Nat.add n 0) (F x)\n⊢ Definable (n + 1) F\n[PROOFSTEP]\nrefine' @Definable.EqMk (n + 1) ⟨fun x : PSet => (@Definable.Resp _ _ (I ⟦x⟧)).1, _⟩ _ _\n[GOAL]\ncase refine'_1\nn : ℕ\nF : Arity ZFSet (n + 1)\nI : (x : ZFSet) → Definable (Nat.add n 0) (F x)\n⊢ Arity.Equiv (fun x => ↑(Definable.Resp (F (Quotient.mk setoid x)))) fun x =>\n    ↑(Definable.Resp (F (Quotient.mk setoid x)))\n[PROOFSTEP]\ndsimp [Arity.Equiv]\n[GOAL]\ncase refine'_1\nn : ℕ\nF : Arity ZFSet (n + 1)\nI : (x : ZFSet) → Definable (Nat.add n 0) (F x)\n⊢ ∀ (x y : PSet),\n    PSet.Equiv x y →\n      Arity.Equiv ↑(Definable.Resp (F (Quotient.mk setoid x))) ↑(Definable.Resp (F (Quotient.mk setoid y)))\n[PROOFSTEP]\nintro x y h\n[GOAL]\ncase refine'_1\nn : ℕ\nF : Arity ZFSet (n + 1)\nI : (x : ZFSet) → Definable (Nat.add n 0) (F x)\nx y : PSet\nh : PSet.Equiv x y\n⊢ Arity.Equiv ↑(Definable.Resp (F (Quotient.mk setoid x))) ↑(Definable.Resp (F (Quotient.mk setoid y)))\n[PROOFSTEP]\nrw [@Quotient.sound PSet _ _ _ h]\n[GOAL]\ncase refine'_1\nn : ℕ\nF : Arity ZFSet (n + 1)\nI : (x : ZFSet) → Definable (Nat.add n 0) (F x)\nx y : PSet\nh : PSet.Equiv x y\n⊢ Arity.Equiv ↑(Definable.Resp (F (Quotient.mk setoid y))) ↑(Definable.Resp (F (Quotient.mk setoid y)))\n[PROOFSTEP]\nexact (Definable.Resp (F ⟦y⟧)).2\n[GOAL]\ncase refine'_2\nn : ℕ\nF : Arity ZFSet (n + 1)\nI : (x : ZFSet) → Definable (Nat.add n 0) (F x)\n⊢ Resp.eval (n + 1)\n      { val := fun x => ↑(Definable.Resp (F (Quotient.mk setoid x))),\n        property :=\n          (_ :\n            Arity.Equiv (fun x => ↑(Definable.Resp (F (Quotient.mk setoid x)))) fun x =>\n              ↑(Definable.Resp (F (Quotient.mk setoid x)))) } =\n    F\n[PROOFSTEP]\nrefine' funext fun q => Quotient.inductionOn q fun x => _\n[GOAL]\ncase refine'_2\nn : ℕ\nF : Arity ZFSet (n + 1)\nI : (x : ZFSet) → Definable (Nat.add n 0) (F x)\nq : ZFSet\nx : PSet\n⊢ Resp.eval (n + 1)\n      { val := fun x => ↑(Definable.Resp (F (Quotient.mk setoid x))),\n        property :=\n          (_ :\n            Arity.Equiv (fun x => ↑(Definable.Resp (F (Quotient.mk setoid x)))) fun x =>\n              ↑(Definable.Resp (F (Quotient.mk setoid x)))) }\n      (Quotient.mk setoid x) =\n    F (Quotient.mk setoid x)\n[PROOFSTEP]\nsimp_rw [Resp.eval_val, Resp.f]\n[GOAL]\ncase refine'_2\nn : ℕ\nF : Arity ZFSet (n + 1)\nI : (x : ZFSet) → Definable (Nat.add n 0) (F x)\nq : ZFSet\nx : PSet\n⊢ Resp.eval n\n      { val := ↑(Definable.Resp (F (Quotient.mk setoid x))),\n        property :=\n          (_ :\n            Arity.Equiv\n              (↑{ val := fun x => ↑(Definable.Resp (F (Quotient.mk setoid x))),\n                    property :=\n                      (_ :\n                        Arity.Equiv (fun x => ↑(Definable.Resp (F (Quotient.mk setoid x)))) fun x =>\n                          ↑(Definable.Resp (F (Quotient.mk setoid x)))) }\n                x)\n              (↑{ val := fun x => ↑(Definable.Resp (F (Quotient.mk setoid x))),\n                    property :=\n                      (_ :\n                        Arity.Equiv (fun x => ↑(Definable.Resp (F (Quotient.mk setoid x)))) fun x =>\n                          ↑(Definable.Resp (F (Quotient.mk setoid x)))) }\n                x)) } =\n    F (Quotient.mk setoid x)\n[PROOFSTEP]\nexact @Definable.eq _ (F ⟦x⟧) (I ⟦x⟧)\n[GOAL]\nx : ZFSet\na : PSet\n⊢ Small.{u, u + 1} ↑(toSet (Quotient.mk setoid a))\n[PROOFSTEP]\nlet f : a.Type → (mk a).toSet := fun i => ⟨mk <| a.Func i, func_mem a i⟩\n[GOAL]\nx : ZFSet\na : PSet\nf : Type a → ↑(toSet (mk a)) := fun i => { val := mk (Func a i), property := (_ : Func a i ∈ a) }\n⊢ Small.{u, u + 1} ↑(toSet (Quotient.mk setoid a))\n[PROOFSTEP]\nsuffices Function.Surjective f by exact small_of_surjective this\n[GOAL]\nx : ZFSet\na : PSet\nf : Type a → ↑(toSet (mk a)) := fun i => { val := mk (Func a i), property := (_ : Func a i ∈ a) }\nthis : Function.Surjective f\n⊢ Small.{u, u + 1} ↑(toSet (Quotient.mk setoid a))\n[PROOFSTEP]\nexact small_of_surjective this\n[GOAL]\nx : ZFSet\na : PSet\nf : Type a → ↑(toSet (mk a)) := fun i => { val := mk (Func a i), property := (_ : Func a i ∈ a) }\n⊢ Function.Surjective f\n[PROOFSTEP]\nrintro ⟨y, hb⟩\n[GOAL]\ncase mk\nx : ZFSet\na : PSet\nf : Type a → ↑(toSet (mk a)) := fun i => { val := mk (Func a i), property := (_ : Func a i ∈ a) }\ny : ZFSet\nhb : y ∈ toSet (mk a)\n⊢ ∃ a_1, f a_1 = { val := y, property := hb }\n[PROOFSTEP]\ninduction y using Quotient.inductionOn\n[GOAL]\ncase mk.h\nx : ZFSet\na : PSet\nf : Type a → ↑(toSet (mk a)) := fun i => { val := mk (Func a i), property := (_ : Func a i ∈ a) }\na✝ : PSet\nhb : Quotient.mk setoid a✝ ∈ toSet (mk a)\n⊢ ∃ a_1, f a_1 = { val := Quotient.mk setoid a✝, property := hb }\n[PROOFSTEP]\ncases' hb with i h\n[GOAL]\ncase mk.h.intro\nx : ZFSet\na : PSet\nf : Type a → ↑(toSet (mk a)) := fun i => { val := mk (Func a i), property := (_ : Func a i ∈ a) }\na✝ : PSet\ni : Type a\nh : PSet.Equiv a✝ (Func a i)\n⊢ ∃ a_1, f a_1 = { val := Quotient.mk setoid a✝, property := (_ : ∃ b, PSet.Equiv a✝ (Func a b)) }\n[PROOFSTEP]\nexact ⟨i, Subtype.coe_injective (Quotient.sound h.symm)⟩\n[GOAL]\nx y : ZFSet\n⊢ toSet x ⊆ toSet y ↔ x ⊆ y\n[PROOFSTEP]\nsimp [subset_def, Set.subset_def]\n[GOAL]\nx y : ZFSet\nh : x = y\n⊢ ∀ (z : ZFSet), z ∈ x ↔ z ∈ y\n[PROOFSTEP]\nsimp [h]\n[GOAL]\n⊢ toSet ∅ = ∅\n[PROOFSTEP]\nsimp [toSet]\n[GOAL]\n⊢ ¬ZFSet.Nonempty ∅\n[PROOFSTEP]\nsimp [ZFSet.Nonempty]\n[GOAL]\nx : PSet\n⊢ ZFSet.Nonempty (mk x) ↔ PSet.Nonempty x\n[PROOFSTEP]\nrefine' ⟨_, fun ⟨a, h⟩ => ⟨mk a, h⟩⟩\n[GOAL]\nx : PSet\n⊢ ZFSet.Nonempty (mk x) → PSet.Nonempty x\n[PROOFSTEP]\nrintro ⟨a, h⟩\n[GOAL]\ncase intro\nx : PSet\na : ZFSet\nh : a ∈ toSet (mk x)\n⊢ PSet.Nonempty x\n[PROOFSTEP]\ninduction a using Quotient.inductionOn\n[GOAL]\ncase intro.h\nx a✝ : PSet\nh : Quotient.mk setoid a✝ ∈ toSet (mk x)\n⊢ PSet.Nonempty x\n[PROOFSTEP]\nexact ⟨_, h⟩\n[GOAL]\nx : ZFSet\n⊢ x = ∅ ↔ ∀ (y : ZFSet), ¬y ∈ x\n[PROOFSTEP]\nrw [ext_iff]\n[GOAL]\nx : ZFSet\n⊢ (∀ (z : ZFSet), z ∈ x ↔ z ∈ ∅) ↔ ∀ (y : ZFSet), ¬y ∈ x\n[PROOFSTEP]\nsimp\n[GOAL]\nu : ZFSet\n⊢ u = ∅ ∨ ZFSet.Nonempty u\n[PROOFSTEP]\nrw [eq_empty, ← not_exists]\n[GOAL]\nu : ZFSet\n⊢ (¬∃ x, x ∈ u) ∨ ZFSet.Nonempty u\n[PROOFSTEP]\napply em'\n[GOAL]\nx y : ZFSet\n⊢ toSet (insert x y) = insert x (toSet y)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nx y x✝ : ZFSet\n⊢ x✝ ∈ toSet (insert x y) ↔ x✝ ∈ insert x (toSet y)\n[PROOFSTEP]\nsimp\n[GOAL]\nx : ZFSet\n⊢ toSet {x} = {x}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nx x✝ : ZFSet\n⊢ x✝ ∈ toSet {x} ↔ x✝ ∈ {x}\n[PROOFSTEP]\nsimp\n[GOAL]\nx y z : ZFSet\n⊢ x ∈ {y, z} ↔ x = y ∨ x = z\n[PROOFSTEP]\nsimp\n[GOAL]\nn✝ : ZFSet\nx : PSet\nx✝ : Quotient.mk setoid x ∈ omega\nn : ℕ\nh : PSet.Equiv x (Func PSet.omega { down := n })\n⊢ insert (mk x) (mk x) = insert (mk (ofNat n)) (mk (ofNat n))\n[PROOFSTEP]\nrw [ZFSet.sound h]\n[GOAL]\nn✝ : ZFSet\nx : PSet\nx✝ : Quotient.mk setoid x ∈ omega\nn : ℕ\nh : PSet.Equiv x (Func PSet.omega { down := n })\n⊢ insert (mk (Func PSet.omega { down := n })) (mk (Func PSet.omega { down := n })) =\n    insert (mk (ofNat n)) (mk (ofNat n))\n[PROOFSTEP]\nrfl\n[GOAL]\np : ZFSet → Prop\nx✝³ x✝² : PSet\nα : Type ?u.55373\nA : α → PSet\nβ : Type ?u.55373\nB : β → PSet\nx✝¹ : PSet.Equiv (PSet.mk α A) (PSet.mk β B)\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\nβα : ∀ (b : β), ∃ a, PSet.Equiv (A a) (B b)\nx✝ : { a // (fun y => p (mk y)) (Func (PSet.mk α A) a) }\na : Type (PSet.mk α A)\npa : (fun y => p (mk y)) (Func (PSet.mk α A) a)\nb : β\nhb : PSet.Equiv (A a) (B b)\n⊢ (fun y => p (mk y)) (Func (PSet.mk β B) b)\n[PROOFSTEP]\nsimpa only [mk_func, ← ZFSet.sound hb]\n[GOAL]\np : ZFSet → Prop\nx✝³ x✝² : PSet\nα : Type ?u.55373\nA : α → PSet\nβ : Type ?u.55373\nB : β → PSet\nx✝¹ : PSet.Equiv (PSet.mk α A) (PSet.mk β B)\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\nβα : ∀ (b : β), ∃ a, PSet.Equiv (A a) (B b)\nx✝ : { a // (fun y => p (mk y)) (Func (PSet.mk β B) a) }\nb : Type (PSet.mk β B)\npb : (fun y => p (mk y)) (Func (PSet.mk β B) b)\na : α\nha : PSet.Equiv (A a) (B b)\n⊢ (fun y => p (mk y)) (Func (PSet.mk α A) a)\n[PROOFSTEP]\nsimpa only [mk_func, ZFSet.sound ha]\n[GOAL]\np : ZFSet → Prop\nx y✝ : ZFSet\nx✝¹ y : PSet\nα : Type u\nA : α → PSet\nx✝ : Quotient.mk setoid y ∈ ZFSet.sep p (Quotient.mk setoid (PSet.mk α A))\na : Type (PSet.mk α A)\npa : (fun y => p (mk y)) (Func (PSet.mk α A) a)\nh :\n  PSet.Equiv y\n    (Func\n      ↑(Resp.f\n          { val := PSet.sep fun y => p (mk y),\n            property :=\n              (_ :\n                ∀ (x x_1 : PSet),\n                  PSet.Equiv x x_1 → Arity.Equiv (PSet.sep (fun y => p (mk y)) x) (PSet.sep (fun y => p (mk y)) x_1)) }\n          (PSet.mk α A))\n      { val := a, property := pa })\n⊢ p (Quotient.mk setoid y)\n[PROOFSTEP]\nrwa [@Quotient.sound PSet _ _ _ h]\n[GOAL]\np : ZFSet → Prop\nx y✝ : ZFSet\nx✝¹ y : PSet\nα : Type u\nA : α → PSet\nx✝ : Quotient.mk setoid y ∈ Quotient.mk setoid (PSet.mk α A) ∧ p (Quotient.mk setoid y)\na : Type (PSet.mk α A)\nh : PSet.Equiv y (Func (PSet.mk α A) a)\npa : p (Quotient.mk setoid y)\n⊢ (fun y => p (mk y)) (Func (PSet.mk α A) a)\n[PROOFSTEP]\nrw [mk_func] at h \n[GOAL]\np : ZFSet → Prop\nx y✝ : ZFSet\nx✝¹ y : PSet\nα : Type u\nA : α → PSet\nx✝ : Quotient.mk setoid y ∈ Quotient.mk setoid (PSet.mk α A) ∧ p (Quotient.mk setoid y)\na : Type (PSet.mk α A)\nh : PSet.Equiv y (A a)\npa : p (Quotient.mk setoid y)\n⊢ p (mk (Func (PSet.mk α A) a))\n[PROOFSTEP]\nrwa [mk_func, ← ZFSet.sound h]\n[GOAL]\na : ZFSet\np : ZFSet → Prop\n⊢ toSet (ZFSet.sep p a) = {x | x ∈ toSet a ∧ p x}\n[PROOFSTEP]\next\n[GOAL]\ncase h\na : ZFSet\np : ZFSet → Prop\nx✝ : ZFSet\n⊢ x✝ ∈ toSet (ZFSet.sep p a) ↔ x✝ ∈ {x | x ∈ toSet a ∧ p x}\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ZFSet\nx✝¹ x✝ : PSet\nα : Type u\nA : α → PSet\nβ : Type u\nB : β → PSet\n⊢ PSet.mk β B ∈ PSet.powerset (PSet.mk α A) ↔ Quotient.mk setoid (PSet.mk β B) ⊆ Quotient.mk setoid (PSet.mk α A)\n[PROOFSTEP]\nsimp [mem_powerset, subset_iff]\n[GOAL]\nα β : Type u\nA : α → PSet\nB : β → PSet\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\na : Type (PSet.mk α A)\nc : Type (Func (PSet.mk α A) a)\n⊢ ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\n[PROOFSTEP]\nlet ⟨b, hb⟩ := αβ a\n[GOAL]\nα β : Type u\nA : α → PSet\nB : β → PSet\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\na : Type (PSet.mk α A)\nc : Type (Func (PSet.mk α A) a)\nb : β\nhb : PSet.Equiv (A a) (B b)\n⊢ ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\n[PROOFSTEP]\ninduction' ea : A a with γ Γ\n[GOAL]\ncase mk\nα β : Type u\nA : α → PSet\nB : β → PSet\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\na : Type (PSet.mk α A)\nc : Type (Func (PSet.mk α A) a)\nb : β\nhb : PSet.Equiv (A a) (B b)\nx✝ : PSet\nea✝ : A a = x✝\nγ : Type u\nΓ : γ → PSet\nA_ih✝ :\n  ∀ (a_1 : γ), A a = Γ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\nea : A a = PSet.mk γ Γ\n⊢ ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\n[PROOFSTEP]\ninduction' eb : B b with δ Δ\n[GOAL]\ncase mk.mk\nα β : Type u\nA : α → PSet\nB : β → PSet\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\na : Type (PSet.mk α A)\nc : Type (Func (PSet.mk α A) a)\nb : β\nhb : PSet.Equiv (A a) (B b)\nx✝¹ : PSet\nea✝ : A a = x✝¹\nγ : Type u\nΓ : γ → PSet\nA_ih✝¹ :\n  ∀ (a_1 : γ), A a = Γ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\nea : A a = PSet.mk γ Γ\nx✝ : PSet\neb✝ : B b = x✝\nδ : Type u\nΔ : δ → PSet\nA_ih✝ :\n  ∀ (a_1 : δ), B b = Δ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\neb : B b = PSet.mk δ Δ\n⊢ ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\n[PROOFSTEP]\nrw [ea, eb] at hb \n[GOAL]\ncase mk.mk\nα β : Type u\nA : α → PSet\nB : β → PSet\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\na : Type (PSet.mk α A)\nc : Type (Func (PSet.mk α A) a)\nb : β\nx✝¹ : PSet\nea✝ : A a = x✝¹\nγ : Type u\nΓ : γ → PSet\nA_ih✝¹ :\n  ∀ (a_1 : γ), A a = Γ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\nea : A a = PSet.mk γ Γ\nx✝ : PSet\neb✝ : B b = x✝\nδ : Type u\nΔ : δ → PSet\nhb : PSet.Equiv (PSet.mk γ Γ) (PSet.mk δ Δ)\nA_ih✝ :\n  ∀ (a_1 : δ), B b = Δ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\neb : B b = PSet.mk δ Δ\n⊢ ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\n[PROOFSTEP]\ncases' hb with γδ δγ\n[GOAL]\ncase mk.mk.intro\nα β : Type u\nA : α → PSet\nB : β → PSet\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\na : Type (PSet.mk α A)\nc : Type (Func (PSet.mk α A) a)\nb : β\nx✝¹ : PSet\nea✝ : A a = x✝¹\nγ : Type u\nΓ : γ → PSet\nA_ih✝¹ :\n  ∀ (a_1 : γ), A a = Γ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\nea : A a = PSet.mk γ Γ\nx✝ : PSet\neb✝ : B b = x✝\nδ : Type u\nΔ : δ → PSet\nA_ih✝ :\n  ∀ (a_1 : δ), B b = Δ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\neb : B b = PSet.mk δ Δ\nγδ : ∀ (a : γ), ∃ b, PSet.Equiv (Γ a) (Δ b)\nδγ : ∀ (b : δ), ∃ a, PSet.Equiv (Γ a) (Δ b)\n⊢ ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c }) (Func (⋃₀ PSet.mk β B) b)\n[PROOFSTEP]\nlet c : (A a).Type := c\n[GOAL]\ncase mk.mk.intro\nα β : Type u\nA : α → PSet\nB : β → PSet\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\na : Type (PSet.mk α A)\nc✝ : Type (Func (PSet.mk α A) a)\nb : β\nx✝¹ : PSet\nea✝ : A a = x✝¹\nγ : Type u\nΓ : γ → PSet\nA_ih✝¹ :\n  ∀ (a_1 : γ), A a = Γ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\nea : A a = PSet.mk γ Γ\nx✝ : PSet\neb✝ : B b = x✝\nδ : Type u\nΔ : δ → PSet\nA_ih✝ :\n  ∀ (a_1 : δ), B b = Δ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\neb : B b = PSet.mk δ Δ\nγδ : ∀ (a : γ), ∃ b, PSet.Equiv (Γ a) (Δ b)\nδγ : ∀ (b : δ), ∃ a, PSet.Equiv (Γ a) (Δ b)\nc : Type (A a) := c✝\n⊢ ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\n[PROOFSTEP]\nlet ⟨d, hd⟩ := γδ (by rwa [ea] at c )\n[GOAL]\nα β : Type u\nA : α → PSet\nB : β → PSet\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\na : Type (PSet.mk α A)\nc✝ : Type (Func (PSet.mk α A) a)\nb : β\nx✝¹ : PSet\nea✝ : A a = x✝¹\nγ : Type u\nΓ : γ → PSet\nA_ih✝¹ :\n  ∀ (a_1 : γ), A a = Γ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\nea : A a = PSet.mk γ Γ\nx✝ : PSet\neb✝ : B b = x✝\nδ : Type u\nΔ : δ → PSet\nA_ih✝ :\n  ∀ (a_1 : δ), B b = Δ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\neb : B b = PSet.mk δ Δ\nγδ : ∀ (a : γ), ∃ b, PSet.Equiv (Γ a) (Δ b)\nδγ : ∀ (b : δ), ∃ a, PSet.Equiv (Γ a) (Δ b)\nc : Type (A a) := c✝\n⊢ γ\n[PROOFSTEP]\nrwa [ea] at c \n[GOAL]\ncase mk.mk.intro\nα β : Type u\nA : α → PSet\nB : β → PSet\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\na : Type (PSet.mk α A)\nc✝ : Type (Func (PSet.mk α A) a)\nb : β\nx✝¹ : PSet\nea✝ : A a = x✝¹\nγ : Type u\nΓ : γ → PSet\nA_ih✝¹ :\n  ∀ (a_1 : γ), A a = Γ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\nea : A a = PSet.mk γ Γ\nx✝ : PSet\neb✝ : B b = x✝\nδ : Type u\nΔ : δ → PSet\nA_ih✝ :\n  ∀ (a_1 : δ), B b = Δ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\neb : B b = PSet.mk δ Δ\nγδ : ∀ (a : γ), ∃ b, PSet.Equiv (Γ a) (Δ b)\nδγ : ∀ (b : δ), ∃ a, PSet.Equiv (Γ a) (Δ b)\nc : Type (A a) := c✝\nd : δ\nhd : PSet.Equiv (Γ (Eq.mp (_ : Type (A a) = Type (PSet.mk γ Γ)) c)) (Δ d)\n⊢ ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\n[PROOFSTEP]\nuse⟨b, Eq.ndrec d (Eq.symm eb)⟩\n[GOAL]\ncase h\nα β : Type u\nA : α → PSet\nB : β → PSet\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\na : Type (PSet.mk α A)\nc✝ : Type (Func (PSet.mk α A) a)\nb : β\nx✝¹ : PSet\nea✝ : A a = x✝¹\nγ : Type u\nΓ : γ → PSet\nA_ih✝¹ :\n  ∀ (a_1 : γ), A a = Γ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\nea : A a = PSet.mk γ Γ\nx✝ : PSet\neb✝ : B b = x✝\nδ : Type u\nΔ : δ → PSet\nA_ih✝ :\n  ∀ (a_1 : δ), B b = Δ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\neb : B b = PSet.mk δ Δ\nγδ : ∀ (a : γ), ∃ b, PSet.Equiv (Γ a) (Δ b)\nδγ : ∀ (b : δ), ∃ a, PSet.Equiv (Γ a) (Δ b)\nc : Type (A a) := c✝\nd : δ\nhd : PSet.Equiv (Γ (Eq.mp (_ : Type (A a) = Type (PSet.mk γ Γ)) c)) (Δ d)\n⊢ PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ })\n    (Func (⋃₀ PSet.mk β B) { fst := b, snd := (_ : PSet.mk δ Δ = Func (PSet.mk β B) b) ▸ d })\n[PROOFSTEP]\nchange PSet.Equiv ((A a).Func c) ((B b).Func (Eq.ndrec d eb.symm))\n[GOAL]\ncase h\nα β : Type u\nA : α → PSet\nB : β → PSet\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\na : Type (PSet.mk α A)\nc✝ : Type (Func (PSet.mk α A) a)\nb : β\nx✝¹ : PSet\nea✝ : A a = x✝¹\nγ : Type u\nΓ : γ → PSet\nA_ih✝¹ :\n  ∀ (a_1 : γ), A a = Γ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\nea : A a = PSet.mk γ Γ\nx✝ : PSet\neb✝ : B b = x✝\nδ : Type u\nΔ : δ → PSet\nA_ih✝ :\n  ∀ (a_1 : δ), B b = Δ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\neb : B b = PSet.mk δ Δ\nγδ : ∀ (a : γ), ∃ b, PSet.Equiv (Γ a) (Δ b)\nδγ : ∀ (b : δ), ∃ a, PSet.Equiv (Γ a) (Δ b)\nc : Type (A a) := c✝\nd : δ\nhd : PSet.Equiv (Γ (Eq.mp (_ : Type (A a) = Type (PSet.mk γ Γ)) c)) (Δ d)\n⊢ PSet.Equiv (Func (A a) c) (Func (B b) ((_ : PSet.mk δ Δ = B b) ▸ d))\n[PROOFSTEP]\nmatch A a, B b, ea, eb, c, d, hd with\n| _, _, rfl, rfl, _, _, hd => exact hd\n[GOAL]\nα β : Type u\nA : α → PSet\nB : β → PSet\nαβ : ∀ (a : α), ∃ b, PSet.Equiv (A a) (B b)\na : Type (PSet.mk α A)\nc✝ : Type (Func (PSet.mk α A) a)\nb : β\nx✝³ : PSet\nea✝ : A a = x✝³\nγ : Type u\nΓ : γ → PSet\nA_ih✝¹ :\n  ∀ (a_1 : γ), A a = Γ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\nea : A a = PSet.mk γ Γ\nx✝² : PSet\neb✝ : B b = x✝²\nδ : Type u\nΔ : δ → PSet\nA_ih✝ :\n  ∀ (a_1 : δ), B b = Δ a_1 → ∃ b, PSet.Equiv (Func (⋃₀ PSet.mk α A) { fst := a, snd := c✝ }) (Func (⋃₀ PSet.mk β B) b)\neb : B b = PSet.mk δ Δ\nγδ : ∀ (a : γ), ∃ b, PSet.Equiv (Γ a) (Δ b)\nδγ : ∀ (b : δ), ∃ a, PSet.Equiv (Γ a) (Δ b)\nc : Type (A a) := c✝\nd : δ\nhd✝ : PSet.Equiv (Γ (Eq.mp (_ : Type (A a) = Type (PSet.mk γ Γ)) c)) (Δ d)\nx✝¹ : Type (PSet.mk γ Γ)\nx✝ : δ\nhd : PSet.Equiv (Γ (Eq.mp (_ : Type (PSet.mk γ Γ) = Type (PSet.mk γ Γ)) x✝¹)) (Δ x✝)\n⊢ PSet.Equiv (Func (PSet.mk γ Γ) x✝¹) (Func (PSet.mk δ Δ) ((_ : PSet.mk δ Δ = PSet.mk δ Δ) ▸ x✝))\n[PROOFSTEP]\nexact hd\n[GOAL]\nx : ZFSet\n⊢ ZFSet\n[PROOFSTEP]\nclassical exact if h : x.Nonempty then ZFSet.sep (fun y => ∀ z ∈ x, y ∈ z) h.some else ∅\n[GOAL]\nx : ZFSet\n⊢ ZFSet\n[PROOFSTEP]\nexact if h : x.Nonempty then ZFSet.sep (fun y => ∀ z ∈ x, y ∈ z) h.some else ∅\n[GOAL]\nx y : ZFSet\nh : ZFSet.Nonempty x\n⊢ y ∈ ⋂₀ x ↔ ∀ (z : ZFSet), z ∈ x → y ∈ z\n[PROOFSTEP]\nrw [sInter, dif_pos h]\n[GOAL]\nx y : ZFSet\nh : ZFSet.Nonempty x\n⊢ y ∈ ZFSet.sep (fun y => ∀ (z : ZFSet), z ∈ x → y ∈ z) (Set.Nonempty.some h) ↔ ∀ (z : ZFSet), z ∈ x → y ∈ z\n[PROOFSTEP]\nsimp only [mem_toSet, mem_sep, and_iff_right_iff_imp]\n[GOAL]\nx y : ZFSet\nh : ZFSet.Nonempty x\n⊢ (∀ (z : ZFSet), z ∈ x → y ∈ z) → y ∈ Set.Nonempty.some h\n[PROOFSTEP]\nexact fun H => H _ h.some_mem\n[GOAL]\n⊢ ⋃₀ ∅ = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase a\nz✝ : ZFSet\n⊢ z✝ ∈ ⋃₀ ∅ ↔ z✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ ¬ZFSet.Nonempty ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nx y z : ZFSet\nhy : y ∈ ⋂₀ x\nhz : z ∈ x\n⊢ y ∈ z\n[PROOFSTEP]\nrcases eq_empty_or_nonempty x with (rfl | hx)\n[GOAL]\ncase inl\ny z : ZFSet\nhy : y ∈ ⋂₀ ∅\nhz : z ∈ ∅\n⊢ y ∈ z\n[PROOFSTEP]\nexact (not_mem_empty z hz).elim\n[GOAL]\ncase inr\nx y z : ZFSet\nhy : y ∈ ⋂₀ x\nhz : z ∈ x\nhx : ZFSet.Nonempty x\n⊢ y ∈ z\n[PROOFSTEP]\nexact (mem_sInter hx).1 hy z hz\n[GOAL]\nx y : ZFSet\n⊢ y ∈ ⋃₀ {x} ↔ y ∈ x\n[PROOFSTEP]\nsimp_rw [mem_sUnion, mem_singleton, exists_eq_left]\n[GOAL]\nx y : ZFSet\n⊢ y ∈ ⋂₀ {x} ↔ y ∈ x\n[PROOFSTEP]\nsimp_rw [mem_sInter (singleton_nonempty x), mem_singleton, forall_eq]\n[GOAL]\nx : ZFSet\n⊢ toSet (⋃₀ x) = ⋃₀ (toSet '' toSet x)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nx x✝ : ZFSet\n⊢ x✝ ∈ toSet (⋃₀ x) ↔ x✝ ∈ ⋃₀ (toSet '' toSet x)\n[PROOFSTEP]\nsimp\n[GOAL]\nx : ZFSet\nh : ZFSet.Nonempty x\n⊢ toSet (⋂₀ x) = ⋂₀ (toSet '' toSet x)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nx : ZFSet\nh : ZFSet.Nonempty x\nx✝ : ZFSet\n⊢ x✝ ∈ toSet (⋂₀ x) ↔ x✝ ∈ ⋂₀ (toSet '' toSet x)\n[PROOFSTEP]\nsimp [mem_sInter h]\n[GOAL]\nx y : ZFSet\nH : {x} = {y}\n⊢ x = y\n[PROOFSTEP]\nlet this := congr_arg sUnion H\n[GOAL]\nx y : ZFSet\nH : {x} = {y}\nthis : ⋃₀ {x} = ⋃₀ {y} := congr_arg sUnion H\n⊢ x = y\n[PROOFSTEP]\nrwa [sUnion_singleton, sUnion_singleton] at this \n[GOAL]\nx y : ZFSet\n⊢ toSet (x ∪ y) = toSet x ∪ toSet y\n[PROOFSTEP]\nchange (⋃₀ { x, y }).toSet = _\n[GOAL]\nx y : ZFSet\n⊢ toSet (⋃₀ {x, y}) = toSet x ∪ toSet y\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ZFSet\n⊢ toSet (x ∩ y) = toSet x ∩ toSet y\n[PROOFSTEP]\nchange (ZFSet.sep (fun z => z ∈ y) x).toSet = _\n[GOAL]\nx y : ZFSet\n⊢ toSet (ZFSet.sep (fun z => z ∈ y) x) = toSet x ∩ toSet y\n[PROOFSTEP]\next\n[GOAL]\ncase h\nx y x✝ : ZFSet\n⊢ x✝ ∈ toSet (ZFSet.sep (fun z => z ∈ y) x) ↔ x✝ ∈ toSet x ∩ toSet y\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ZFSet\n⊢ toSet (x \\ y) = toSet x \\ toSet y\n[PROOFSTEP]\nchange (ZFSet.sep (fun z => z ∉ y) x).toSet = _\n[GOAL]\nx y : ZFSet\n⊢ toSet (ZFSet.sep (fun z => ¬z ∈ y) x) = toSet x \\ toSet y\n[PROOFSTEP]\next\n[GOAL]\ncase h\nx y x✝ : ZFSet\n⊢ x✝ ∈ toSet (ZFSet.sep (fun z => ¬z ∈ y) x) ↔ x✝ ∈ toSet x \\ toSet y\n[PROOFSTEP]\nsimp\n[GOAL]\nx y z : ZFSet\n⊢ z ∈ x ∪ y ↔ z ∈ x ∨ z ∈ y\n[PROOFSTEP]\nrw [← mem_toSet]\n[GOAL]\nx y z : ZFSet\n⊢ z ∈ toSet (x ∪ y) ↔ z ∈ x ∨ z ∈ y\n[PROOFSTEP]\nsimp\n[GOAL]\nf : ZFSet → ZFSet\nH : Definable 1 f\nx : ZFSet\n⊢ toSet (image f x) = f '' toSet x\n[PROOFSTEP]\next\n[GOAL]\ncase h\nf : ZFSet → ZFSet\nH : Definable 1 f\nx x✝ : ZFSet\n⊢ x✝ ∈ toSet (image f x) ↔ x✝ ∈ f '' toSet x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nf : α → ZFSet\nx : ZFSet\ny : PSet\n⊢ Quotient.mk setoid y ∈ range f ↔ Quotient.mk setoid y ∈ Set.range f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nf : α → ZFSet\nx : ZFSet\ny : PSet\n⊢ Quotient.mk setoid y ∈ range f → Quotient.mk setoid y ∈ Set.range f\n[PROOFSTEP]\nrintro ⟨z, hz⟩\n[GOAL]\ncase mp.intro\nα : Type u\nf : α → ZFSet\nx : ZFSet\ny : PSet\nz : Type (PSet.mk (ULift α) (Quotient.out ∘ f ∘ ULift.down))\nhz : PSet.Equiv y (Func (PSet.mk (ULift α) (Quotient.out ∘ f ∘ ULift.down)) z)\n⊢ Quotient.mk setoid y ∈ Set.range f\n[PROOFSTEP]\nexact ⟨z.down, Quotient.eq_mk_iff_out.2 hz.symm⟩\n[GOAL]\ncase mpr\nα : Type u\nf : α → ZFSet\nx : ZFSet\ny : PSet\n⊢ Quotient.mk setoid y ∈ Set.range f → Quotient.mk setoid y ∈ range f\n[PROOFSTEP]\nrintro ⟨z, hz⟩\n[GOAL]\ncase mpr.intro\nα : Type u\nf : α → ZFSet\nx : ZFSet\ny : PSet\nz : α\nhz : f z = Quotient.mk setoid y\n⊢ Quotient.mk setoid y ∈ range f\n[PROOFSTEP]\nuse ULift.up z\n[GOAL]\ncase h\nα : Type u\nf : α → ZFSet\nx : ZFSet\ny : PSet\nz : α\nhz : f z = Quotient.mk setoid y\n⊢ PSet.Equiv y (Func (PSet.mk (ULift α) (Quotient.out ∘ f ∘ ULift.down)) { down := z })\n[PROOFSTEP]\nsimpa [hz] using PSet.Equiv.symm (Quotient.mk_out y)\n[GOAL]\nα : Type u\nf : α → ZFSet\n⊢ toSet (range f) = Set.range f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u\nf : α → ZFSet\nx✝ : ZFSet\n⊢ x✝ ∈ toSet (range f) ↔ x✝ ∈ Set.range f\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ZFSet\n⊢ toSet (pair x y) = {{x}, {x, y}}\n[PROOFSTEP]\nsimp [pair]\n[GOAL]\np : ZFSet → ZFSet → Prop\nx y z : ZFSet\n⊢ z ∈ pairSep p x y ↔ ∃ a, a ∈ x ∧ ∃ b, b ∈ y ∧ z = pair a b ∧ p a b\n[PROOFSTEP]\nrefine' mem_sep.trans ⟨And.right, fun e => ⟨_, e⟩⟩\n[GOAL]\np : ZFSet → ZFSet → Prop\nx y z : ZFSet\ne : ∃ a, a ∈ x ∧ ∃ b, b ∈ y ∧ z = pair a b ∧ p a b\n⊢ z ∈ powerset (powerset (x ∪ y))\n[PROOFSTEP]\nrcases e with ⟨a, ax, b, bY, rfl, pab⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\np : ZFSet → ZFSet → Prop\nx y a : ZFSet\nax : a ∈ x\nb : ZFSet\nbY : b ∈ y\npab : p a b\n⊢ pair a b ∈ powerset (powerset (x ∪ y))\n[PROOFSTEP]\nsimp only [mem_powerset, subset_def, mem_union, pair, mem_pair]\n[GOAL]\ncase intro.intro.intro.intro.intro\np : ZFSet → ZFSet → Prop\nx y a : ZFSet\nax : a ∈ x\nb : ZFSet\nbY : b ∈ y\npab : p a b\n⊢ ∀ ⦃z : ZFSet⦄, z = {a} ∨ z = {a, b} → ∀ ⦃z_1 : ZFSet⦄, z_1 ∈ z → z_1 ∈ x ∨ z_1 ∈ y\n[PROOFSTEP]\nrintro u (rfl | rfl) v\n[GOAL]\ncase intro.intro.intro.intro.intro.inl\np : ZFSet → ZFSet → Prop\nx y a : ZFSet\nax : a ∈ x\nb : ZFSet\nbY : b ∈ y\npab : p a b\nv : ZFSet\n⊢ v ∈ {a} → v ∈ x ∨ v ∈ y\n[PROOFSTEP]\nsimp only [mem_singleton, mem_pair]\n[GOAL]\ncase intro.intro.intro.intro.intro.inr\np : ZFSet → ZFSet → Prop\nx y a : ZFSet\nax : a ∈ x\nb : ZFSet\nbY : b ∈ y\npab : p a b\nv : ZFSet\n⊢ v ∈ {a, b} → v ∈ x ∨ v ∈ y\n[PROOFSTEP]\nsimp only [mem_singleton, mem_pair]\n[GOAL]\ncase intro.intro.intro.intro.intro.inl\np : ZFSet → ZFSet → Prop\nx y a : ZFSet\nax : a ∈ x\nb : ZFSet\nbY : b ∈ y\npab : p a b\nv : ZFSet\n⊢ v = a → v ∈ x ∨ v ∈ y\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro.intro.intro.intro.intro.inl\np : ZFSet → ZFSet → Prop\nx y b : ZFSet\nbY : b ∈ y\nv : ZFSet\nax : v ∈ x\npab : p v b\n⊢ v ∈ x ∨ v ∈ y\n[PROOFSTEP]\nexact Or.inl ax\n[GOAL]\ncase intro.intro.intro.intro.intro.inr\np : ZFSet → ZFSet → Prop\nx y a : ZFSet\nax : a ∈ x\nb : ZFSet\nbY : b ∈ y\npab : p a b\nv : ZFSet\n⊢ v = a ∨ v = b → v ∈ x ∨ v ∈ y\n[PROOFSTEP]\nrintro (rfl | rfl) <;> [left; right]\n[GOAL]\ncase intro.intro.intro.intro.intro.inr\np : ZFSet → ZFSet → Prop\nx y a : ZFSet\nax : a ∈ x\nb : ZFSet\nbY : b ∈ y\npab : p a b\nv : ZFSet\n⊢ v = a ∨ v = b → v ∈ x ∨ v ∈ y\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.inl\np : ZFSet → ZFSet → Prop\nx y b : ZFSet\nbY : b ∈ y\nv : ZFSet\nax : v ∈ x\npab : p v b\n⊢ v ∈ x ∨ v ∈ y\n[PROOFSTEP]\nleft\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.inr\np : ZFSet → ZFSet → Prop\nx y a : ZFSet\nax : a ∈ x\nv : ZFSet\nbY : v ∈ y\npab : p a v\n⊢ v ∈ x ∨ v ∈ y\n[PROOFSTEP]\nright\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.inl.h\np : ZFSet → ZFSet → Prop\nx y b : ZFSet\nbY : b ∈ y\nv : ZFSet\nax : v ∈ x\npab : p v b\n⊢ v ∈ x\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.inr.h\np : ZFSet → ZFSet → Prop\nx y a : ZFSet\nax : a ∈ x\nv : ZFSet\nbY : v ∈ y\npab : p a v\n⊢ v ∈ y\n[PROOFSTEP]\nassumption\n[GOAL]\nx x' y y' : ZFSet\nH : pair x y = pair x' y'\n⊢ x = x' ∧ y = y'\n[PROOFSTEP]\nhave ae := ext_iff.1 H\n[GOAL]\nx x' y y' : ZFSet\nH : pair x y = pair x' y'\nae : ∀ (z : ZFSet), z ∈ pair x y ↔ z ∈ pair x' y'\n⊢ x = x' ∧ y = y'\n[PROOFSTEP]\nsimp only [pair, mem_pair] at ae \n[GOAL]\nx x' y y' : ZFSet\nH : pair x y = pair x' y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x'} ∨ z = {x', y'}\n⊢ x = x' ∧ y = y'\n[PROOFSTEP]\nobtain rfl : x = x' := by\n  cases' (ae { x }).1 (by simp) with h h\n  · exact singleton_injective h\n  · have m : x' ∈ ({ x } : ZFSet) := by simp [h]\n    rw [mem_singleton.mp m]\n[GOAL]\nx x' y y' : ZFSet\nH : pair x y = pair x' y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x'} ∨ z = {x', y'}\n⊢ x = x'\n[PROOFSTEP]\ncases' (ae { x }).1 (by simp) with h h\n[GOAL]\nx x' y y' : ZFSet\nH : pair x y = pair x' y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x'} ∨ z = {x', y'}\n⊢ {x} = {x} ∨ {x} = {x, y}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl\nx x' y y' : ZFSet\nH : pair x y = pair x' y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x'} ∨ z = {x', y'}\nh : {x} = {x'}\n⊢ x = x'\n[PROOFSTEP]\nexact singleton_injective h\n[GOAL]\ncase inr\nx x' y y' : ZFSet\nH : pair x y = pair x' y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x'} ∨ z = {x', y'}\nh : {x} = {x', y'}\n⊢ x = x'\n[PROOFSTEP]\nhave m : x' ∈ ({ x } : ZFSet) := by simp [h]\n[GOAL]\nx x' y y' : ZFSet\nH : pair x y = pair x' y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x'} ∨ z = {x', y'}\nh : {x} = {x', y'}\n⊢ x' ∈ {x}\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr\nx x' y y' : ZFSet\nH : pair x y = pair x' y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x'} ∨ z = {x', y'}\nh : {x} = {x', y'}\nm : x' ∈ {x}\n⊢ x = x'\n[PROOFSTEP]\nrw [mem_singleton.mp m]\n[GOAL]\nx y y' : ZFSet\nH : pair x y = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x} ∨ z = {x, y'}\n⊢ x = x ∧ y = y'\n[PROOFSTEP]\nhave he : x = y → y = y' := by\n  rintro rfl\n  cases' (ae { x, y' }).2 (by simp only [eq_self_iff_true, or_true_iff]) with xy'x xy'xx\n  · rw [eq_comm, ← mem_singleton, ← xy'x, mem_pair]\n    exact Or.inr rfl\n  · simpa [eq_comm] using (ext_iff.1 xy'xx y').1 (by simp)\n[GOAL]\nx y y' : ZFSet\nH : pair x y = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x} ∨ z = {x, y'}\n⊢ x = y → y = y'\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nx y' : ZFSet\nH : pair x x = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, x} ↔ z = {x} ∨ z = {x, y'}\n⊢ x = y'\n[PROOFSTEP]\ncases' (ae { x, y' }).2 (by simp only [eq_self_iff_true, or_true_iff]) with xy'x xy'xx\n[GOAL]\nx y' : ZFSet\nH : pair x x = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, x} ↔ z = {x} ∨ z = {x, y'}\n⊢ {x, y'} = {x} ∨ {x, y'} = {x, y'}\n[PROOFSTEP]\nsimp only [eq_self_iff_true, or_true_iff]\n[GOAL]\ncase inl\nx y' : ZFSet\nH : pair x x = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, x} ↔ z = {x} ∨ z = {x, y'}\nxy'x : {x, y'} = {x}\n⊢ x = y'\n[PROOFSTEP]\nrw [eq_comm, ← mem_singleton, ← xy'x, mem_pair]\n[GOAL]\ncase inl\nx y' : ZFSet\nH : pair x x = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, x} ↔ z = {x} ∨ z = {x, y'}\nxy'x : {x, y'} = {x}\n⊢ y' = x ∨ y' = y'\n[PROOFSTEP]\nexact Or.inr rfl\n[GOAL]\ncase inr\nx y' : ZFSet\nH : pair x x = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, x} ↔ z = {x} ∨ z = {x, y'}\nxy'xx : {x, y'} = {x, x}\n⊢ x = y'\n[PROOFSTEP]\nsimpa [eq_comm] using (ext_iff.1 xy'xx y').1 (by simp)\n[GOAL]\nx y' : ZFSet\nH : pair x x = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, x} ↔ z = {x} ∨ z = {x, y'}\nxy'xx : {x, y'} = {x, x}\n⊢ y' ∈ {x, y'}\n[PROOFSTEP]\nsimp\n[GOAL]\nx y y' : ZFSet\nH : pair x y = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x} ∨ z = {x, y'}\nhe : x = y → y = y'\n⊢ x = x ∧ y = y'\n[PROOFSTEP]\nobtain xyx | xyy' := (ae { x, y }).1 (by simp)\n[GOAL]\nx y y' : ZFSet\nH : pair x y = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x} ∨ z = {x, y'}\nhe : x = y → y = y'\n⊢ {x, y} = {x} ∨ {x, y} = {x, y}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl\nx y y' : ZFSet\nH : pair x y = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x} ∨ z = {x, y'}\nhe : x = y → y = y'\nxyx : {x, y} = {x}\n⊢ x = x ∧ y = y'\n[PROOFSTEP]\nobtain rfl := mem_singleton.mp ((ext_iff.1 xyx y).1 <| by simp)\n[GOAL]\nx y y' : ZFSet\nH : pair x y = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x} ∨ z = {x, y'}\nhe : x = y → y = y'\nxyx : {x, y} = {x}\n⊢ y ∈ {x, y}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl\ny y' : ZFSet\nH : pair y y = pair y y'\nae : ∀ (z : ZFSet), z = {y} ∨ z = {y, y} ↔ z = {y} ∨ z = {y, y'}\nhe : y = y → y = y'\nxyx : {y, y} = {y}\n⊢ y = y ∧ y = y'\n[PROOFSTEP]\nsimp [he rfl]\n[GOAL]\ncase inr\nx y y' : ZFSet\nH : pair x y = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x} ∨ z = {x, y'}\nhe : x = y → y = y'\nxyy' : {x, y} = {x, y'}\n⊢ x = x ∧ y = y'\n[PROOFSTEP]\nobtain rfl | yy' := mem_pair.mp ((ext_iff.1 xyy' y).1 <| by simp)\n[GOAL]\nx y y' : ZFSet\nH : pair x y = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x} ∨ z = {x, y'}\nhe : x = y → y = y'\nxyy' : {x, y} = {x, y'}\n⊢ y ∈ {x, y}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inl\ny y' : ZFSet\nH : pair y y = pair y y'\nae : ∀ (z : ZFSet), z = {y} ∨ z = {y, y} ↔ z = {y} ∨ z = {y, y'}\nhe : y = y → y = y'\nxyy' : {y, y} = {y, y'}\n⊢ y = y ∧ y = y'\n[PROOFSTEP]\nsimp [he rfl]\n[GOAL]\ncase inr.inr\nx y y' : ZFSet\nH : pair x y = pair x y'\nae : ∀ (z : ZFSet), z = {x} ∨ z = {x, y} ↔ z = {x} ∨ z = {x, y'}\nhe : x = y → y = y'\nxyy' : {x, y} = {x, y'}\nyy' : y = y'\n⊢ x = x ∧ y = y'\n[PROOFSTEP]\nsimp [yy']\n[GOAL]\nx y z : ZFSet\n⊢ z ∈ prod x y ↔ ∃ a, a ∈ x ∧ ∃ b, b ∈ y ∧ z = pair a b\n[PROOFSTEP]\nsimp [prod]\n[GOAL]\nx y a b : ZFSet\n⊢ pair a b ∈ prod x y ↔ a ∈ x ∧ b ∈ y\n[PROOFSTEP]\nsimp\n[GOAL]\nx y f : ZFSet\n⊢ f ∈ funs x y ↔ IsFunc x y f\n[PROOFSTEP]\nsimp [funs, IsFunc]\n[GOAL]\nf : ZFSet → ZFSet\nH : Definable 1 f\nx z : ZFSet\nzx : z ∈ x\ny : ZFSet\nyx : (fun w => pair z w ∈ map f x) y\n⊢ y = f z\n[PROOFSTEP]\nlet ⟨w, _, we⟩ := mem_image.1 yx\n[GOAL]\nf : ZFSet → ZFSet\nH : Definable 1 f\nx z : ZFSet\nzx : z ∈ x\ny : ZFSet\nyx : (fun w => pair z w ∈ map f x) y\nw : ZFSet\nleft✝ : w ∈ x\nwe : pair w (f w) = pair z y\n⊢ y = f z\n[PROOFSTEP]\nlet ⟨wz, fy⟩ := pair_injective we\n[GOAL]\nf : ZFSet → ZFSet\nH : Definable 1 f\nx z : ZFSet\nzx : z ∈ x\ny : ZFSet\nyx : (fun w => pair z w ∈ map f x) y\nw : ZFSet\nleft✝ : w ∈ x\nwe : pair w (f w) = pair z y\nwz : w = z\nfy : f w = y\n⊢ y = f z\n[PROOFSTEP]\nrw [← fy, wz]\n[GOAL]\np : ZFSet → Prop\nx y : ZFSet\n⊢ Hereditarily p x ↔ p x ∧ ∀ (y : ZFSet), y ∈ x → Hereditarily p y\n[PROOFSTEP]\nrw [← Hereditarily]\n[GOAL]\np : ZFSet → Prop\nx y : ZFSet\n⊢ Hereditarily p x → p ∅\n[PROOFSTEP]\napply @ZFSet.inductionOn _ x\n[GOAL]\np : ZFSet → Prop\nx y : ZFSet\n⊢ ∀ (x : ZFSet), (∀ (y : ZFSet), y ∈ x → Hereditarily p y → p ∅) → Hereditarily p x → p ∅\n[PROOFSTEP]\nintro y IH h\n[GOAL]\np : ZFSet → Prop\nx y✝ y : ZFSet\nIH : ∀ (y_1 : ZFSet), y_1 ∈ y → Hereditarily p y_1 → p ∅\nh : Hereditarily p y\n⊢ p ∅\n[PROOFSTEP]\nrcases ZFSet.eq_empty_or_nonempty y with (rfl | ⟨a, ha⟩)\n[GOAL]\ncase inl\np : ZFSet → Prop\nx y : ZFSet\nIH : ∀ (y : ZFSet), y ∈ ∅ → Hereditarily p y → p ∅\nh : Hereditarily p ∅\n⊢ p ∅\n[PROOFSTEP]\nexact h.self\n[GOAL]\ncase inr.intro\np : ZFSet → Prop\nx y✝ y : ZFSet\nIH : ∀ (y_1 : ZFSet), y_1 ∈ y → Hereditarily p y_1 → p ∅\nh : Hereditarily p y\na : ZFSet\nha : a ∈ toSet y\n⊢ p ∅\n[PROOFSTEP]\nexact IH a ha (h.mem ha)\n[GOAL]\n⊢ ∀ (a : Class), Acc (fun x x_1 => x ∈ x_1) a\n[PROOFSTEP]\nhave H : ∀ x : ZFSet.{u}, @Acc Class.{u} (· ∈ ·) ↑x :=\n  by\n  refine' fun a => ZFSet.inductionOn a fun x IH => ⟨_, _⟩\n  rintro A ⟨z, rfl, hz⟩\n  exact IH z hz\n[GOAL]\n⊢ ∀ (x : ZFSet), Acc (fun x x_1 => x ∈ x_1) ↑x\n[PROOFSTEP]\nrefine' fun a => ZFSet.inductionOn a fun x IH => ⟨_, _⟩\n[GOAL]\na x : ZFSet\nIH : ∀ (y : ZFSet), y ∈ x → Acc (fun x x_1 => x ∈ x_1) ↑y\n⊢ ∀ (y : Class), y ∈ ↑x → Acc (fun x x_1 => x ∈ x_1) y\n[PROOFSTEP]\nrintro A ⟨z, rfl, hz⟩\n[GOAL]\ncase intro.intro\na x : ZFSet\nIH : ∀ (y : ZFSet), y ∈ x → Acc (fun x x_1 => x ∈ x_1) ↑y\nz : ZFSet\nhz : ↑x z\n⊢ Acc (fun x x_1 => x ∈ x_1) ↑z\n[PROOFSTEP]\nexact IH z hz\n[GOAL]\nH : ∀ (x : ZFSet), Acc (fun x x_1 => x ∈ x_1) ↑x\n⊢ ∀ (a : Class), Acc (fun x x_1 => x ∈ x_1) a\n[PROOFSTEP]\nrefine' fun A => ⟨A, _⟩\n[GOAL]\nH : ∀ (x : ZFSet), Acc (fun x x_1 => x ∈ x_1) ↑x\nA : Class\n⊢ ∀ (y : Class), y ∈ A → Acc (fun x x_1 => x ∈ x_1) y\n[PROOFSTEP]\nrintro B ⟨x, rfl, _⟩\n[GOAL]\ncase intro.intro\nH : ∀ (x : ZFSet), Acc (fun x x_1 => x ∈ x_1) ↑x\nA : Class\nx : ZFSet\nright✝ : A x\n⊢ Acc (fun x x_1 => x ∈ x_1) ↑x\n[PROOFSTEP]\nexact H x\n[GOAL]\n⊢ congToClass ∅ = ∅\n[PROOFSTEP]\next z\n[GOAL]\ncase a\nz : ZFSet\n⊢ congToClass ∅ z ↔ ∅ z\n[PROOFSTEP]\nsimp only [congToClass, not_empty_hom, iff_false_iff]\n[GOAL]\ncase a\nz : ZFSet\n⊢ ¬setOf (fun y => ↑y ∈ ∅) z\n[PROOFSTEP]\nexact Set.not_mem_empty z\n[GOAL]\n⊢ classToCong ∅ = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase h\nx✝ : Class\n⊢ x✝ ∈ classToCong ∅ ↔ x✝ ∈ ∅\n[PROOFSTEP]\nsimp [classToCong]\n[GOAL]\nx y : ZFSet\nh : ↑x = ↑y\nz : ZFSet\n⊢ z ∈ x ↔ z ∈ y\n[PROOFSTEP]\nchange (x : Class.{u}) z ↔ (y : Class.{u}) z\n[GOAL]\nx y : ZFSet\nh : ↑x = ↑y\nz : ZFSet\n⊢ ↑x z ↔ ↑y z\n[PROOFSTEP]\nrw [h]\n[GOAL]\nA : Class\nx : ZFSet\nx✝ : ToSet A ↑x\ny : ZFSet\nyx : ↑y = ↑x\npy : A y\n⊢ A x\n[PROOFSTEP]\nrwa [ofSet.inj yx] at py \n[GOAL]\nx : Class\ny : ZFSet\n⊢ (⋃₀ x) y ↔ ∃ z, x z ∧ y ∈ z\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nx : Class\ny : ZFSet\n⊢ (⋃₀ x) y → ∃ z, x z ∧ y ∈ z\n[PROOFSTEP]\nrintro ⟨-, ⟨z, rfl, hxz⟩, hyz⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nx : Class\ny z : ZFSet\nhxz : x z\nhyz : y ∈ ↑z\n⊢ ∃ z, x z ∧ y ∈ z\n[PROOFSTEP]\nexact ⟨z, hxz, hyz⟩\n[GOAL]\ncase mpr\nx : Class\ny : ZFSet\n⊢ (∃ z, x z ∧ y ∈ z) → (⋃₀ x) y\n[PROOFSTEP]\nexact fun ⟨z, hxz, hyz⟩ => ⟨_, coe_mem.2 hxz, hyz⟩\n[GOAL]\nx y : ZFSet\n⊢ (∃ z, ↑x z ∧ y ∈ z) ↔ ∃ z, z ∈ x ∧ y ∈ z\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : Class\n⊢ y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nx y : Class\n⊢ y ∈ ⋃₀ x → ∃ z, z ∈ x ∧ y ∈ z\n[PROOFSTEP]\nrintro ⟨w, rfl, z, hzx, hwz⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nx : Class\nw : ZFSet\nz : Set ZFSet\nhzx : z ∈ classToCong x\nhwz : w ∈ z\n⊢ ∃ z, z ∈ x ∧ ↑w ∈ z\n[PROOFSTEP]\nexact ⟨z, hzx, coe_mem.2 hwz⟩\n[GOAL]\ncase mpr\nx y : Class\n⊢ (∃ z, z ∈ x ∧ y ∈ z) → y ∈ ⋃₀ x\n[PROOFSTEP]\nrintro ⟨w, hwx, z, rfl, hwz⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nx w : Class\nhwx : w ∈ x\nz : ZFSet\nhwz : w z\n⊢ ↑z ∈ ⋃₀ x\n[PROOFSTEP]\nexact ⟨z, rfl, w, hwx, hwz⟩\n[GOAL]\nx : Class\ny : ZFSet\n⊢ (⋂₀ x) y ↔ ∀ (z : ZFSet), x z → y ∈ z\n[PROOFSTEP]\nrefine' ⟨fun hxy z hxz => hxy _ ⟨z, rfl, hxz⟩, _⟩\n[GOAL]\nx : Class\ny : ZFSet\n⊢ (∀ (z : ZFSet), x z → y ∈ z) → (⋂₀ x) y\n[PROOFSTEP]\nrintro H - ⟨z, rfl, hxz⟩\n[GOAL]\ncase intro.intro\nx : Class\ny : ZFSet\nH : ∀ (z : ZFSet), x z → y ∈ z\nz : ZFSet\nhxz : x z\n⊢ y ∈ ↑z\n[PROOFSTEP]\nexact H _ hxz\n[GOAL]\nx y z : Class\nhy : y ∈ ⋂₀ x\nhz : z ∈ x\n⊢ y ∈ z\n[PROOFSTEP]\nobtain ⟨w, rfl, hw⟩ := hy\n[GOAL]\ncase intro.intro\nx z : Class\nhz : z ∈ x\nw : ZFSet\nhw : (⋂₀ x) w\n⊢ ↑w ∈ z\n[PROOFSTEP]\nexact coe_mem.2 (hw z hz)\n[GOAL]\nx y : Class\nh : Set.Nonempty x\n⊢ y ∈ ⋂₀ x ↔ ∀ (z : Class), z ∈ x → y ∈ z\n[PROOFSTEP]\nrefine' ⟨fun hy z => mem_of_mem_sInter hy, fun H => _⟩\n[GOAL]\nx y : Class\nh : Set.Nonempty x\nH : ∀ (z : Class), z ∈ x → y ∈ z\n⊢ y ∈ ⋂₀ x\n[PROOFSTEP]\nsimp_rw [mem_def, sInter_apply]\n[GOAL]\nx y : Class\nh : Set.Nonempty x\nH : ∀ (z : Class), z ∈ x → y ∈ z\n⊢ ∃ x_1, ↑x_1 = y ∧ ∀ (z : ZFSet), x z → x_1 ∈ z\n[PROOFSTEP]\nobtain ⟨z, hz⟩ := h\n[GOAL]\ncase intro\nx y : Class\nH : ∀ (z : Class), z ∈ x → y ∈ z\nz : ZFSet\nhz : z ∈ x\n⊢ ∃ x_1, ↑x_1 = y ∧ ∀ (z : ZFSet), x z → x_1 ∈ z\n[PROOFSTEP]\nobtain ⟨y, rfl, _⟩ := H z (coe_mem.2 hz)\n[GOAL]\ncase intro.intro.intro\nx : Class\nz : ZFSet\nhz : z ∈ x\ny : ZFSet\nright✝ : ↑z y\nH : ∀ (z : Class), z ∈ x → ↑y ∈ z\n⊢ ∃ x_1, ↑x_1 = ↑y ∧ ∀ (z : ZFSet), x z → x_1 ∈ z\n[PROOFSTEP]\nrefine' ⟨y, rfl, fun w hxw => _⟩\n[GOAL]\ncase intro.intro.intro\nx : Class\nz : ZFSet\nhz : z ∈ x\ny : ZFSet\nright✝ : ↑z y\nH : ∀ (z : Class), z ∈ x → ↑y ∈ z\nw : ZFSet\nhxw : x w\n⊢ y ∈ w\n[PROOFSTEP]\nsimpa only [coe_mem, coe_apply] using H w (coe_mem.2 hxw)\n[GOAL]\n⊢ ⋃₀ ∅ = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase a\nz✝ : ZFSet\n⊢ (⋃₀ ∅) z✝ ↔ ∅ z✝\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ ⋂₀ ∅ = univ\n[PROOFSTEP]\nrw [sInter, classToCong_empty, Set.sInter_empty, univ]\n[GOAL]\nA : Class\nhA : powerset A ⊆ A\n⊢ ∀ (x : ZFSet), A x\n[PROOFSTEP]\nby_contra' hnA\n[GOAL]\nA : Class\nhA : powerset A ⊆ A\nhnA : ∃ x, ¬A x\n⊢ False\n[PROOFSTEP]\nexact\n  WellFounded.min_mem ZFSet.mem_wf _ hnA\n    (hA fun x hx => Classical.not_not.1 fun hB => WellFounded.not_lt_min ZFSet.mem_wf _ hnA hB <| coe_apply.1 hx)\n[GOAL]\nA : Class\nx : ZFSet\nH : ∀ (y : ZFSet), A y ↔ y = x\ny : ZFSet\nx✝ : iota A y\nx' : ZFSet\nh : setOf (fun x => ∀ (y : ZFSet), A y ↔ y = x) x'\nyx' : y ∈ ↑x'\n⊢ ↑x y\n[PROOFSTEP]\nrwa [← (H x').1 <| (h x').2 rfl]\n[GOAL]\nf : ZFSet → ZFSet\nH : PSet.Definable 1 f\nx y : ZFSet\nh : y ∈ x\nz : ZFSet\n⊢ Class.ToSet (fun x_1 => ↑(map f x) (pair x_1 z)) ↑y ↔ z = f y\n[PROOFSTEP]\nrw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]\n[GOAL]\nf : ZFSet → ZFSet\nH : PSet.Definable 1 f\nx y : ZFSet\nh : y ∈ x\nz : ZFSet\n⊢ (∃ z_1, z_1 ∈ x ∧ pair z_1 (f z_1) = pair y z) ↔ z = f y\n[PROOFSTEP]\nexact\n  ⟨fun ⟨w, _, pr⟩ => by\n    let ⟨wy, fw⟩ := ZFSet.pair_injective pr\n    rw [← fw, wy], fun e => by\n    subst e\n    exact ⟨_, h, rfl⟩⟩\n[GOAL]\nf : ZFSet → ZFSet\nH : PSet.Definable 1 f\nx y : ZFSet\nh : y ∈ x\nz : ZFSet\nx✝ : ∃ z_1, z_1 ∈ x ∧ pair z_1 (f z_1) = pair y z\nw : ZFSet\nleft✝ : w ∈ x\npr : pair w (f w) = pair y z\n⊢ z = f y\n[PROOFSTEP]\nlet ⟨wy, fw⟩ := ZFSet.pair_injective pr\n[GOAL]\nf : ZFSet → ZFSet\nH : PSet.Definable 1 f\nx y : ZFSet\nh : y ∈ x\nz : ZFSet\nx✝ : ∃ z_1, z_1 ∈ x ∧ pair z_1 (f z_1) = pair y z\nw : ZFSet\nleft✝ : w ∈ x\npr : pair w (f w) = pair y z\nwy : w = y\nfw : f w = z\n⊢ z = f y\n[PROOFSTEP]\nrw [← fw, wy]\n[GOAL]\nf : ZFSet → ZFSet\nH : PSet.Definable 1 f\nx y : ZFSet\nh : y ∈ x\nz : ZFSet\ne : z = f y\n⊢ ∃ z_1, z_1 ∈ x ∧ pair z_1 (f z_1) = pair y z\n[PROOFSTEP]\nsubst e\n[GOAL]\nf : ZFSet → ZFSet\nH : PSet.Definable 1 f\nx y : ZFSet\nh : y ∈ x\n⊢ ∃ z, z ∈ x ∧ pair z (f z) = pair y (f y)\n[PROOFSTEP]\nexact ⟨_, h, rfl⟩\n[GOAL]\nx : ZFSet\nh : ¬∅ ∈ x\ny : ZFSet\nyx : y ∈ x\nn : ¬∃ y_1, y_1 ∈ y\n⊢ ∅ ∈ x\n[PROOFSTEP]\nrwa [← (eq_empty y).2 fun z zx => n ⟨z, zx⟩]\n[GOAL]\nx : ZFSet\nh : ¬∅ ∈ x\ny : ZFSet\nyx : y ∈ x\n⊢ ↑(choice x) ′ ↑y ∈ ↑y\n[PROOFSTEP]\ndelta choice\n[GOAL]\nx : ZFSet\nh : ¬∅ ∈ x\ny : ZFSet\nyx : y ∈ x\n⊢ ↑(map (fun y => Classical.epsilon fun z => z ∈ y) x) ′ ↑y ∈ ↑y\n[PROOFSTEP]\nrw [@map_fval _ (Classical.allDefinable _) x y yx, Class.coe_mem, Class.coe_apply]\n[GOAL]\nx : ZFSet\nh : ¬∅ ∈ x\ny : ZFSet\nyx : y ∈ x\n⊢ (Classical.epsilon fun z => z ∈ y) ∈ y\n[PROOFSTEP]\nexact choice_mem_aux x h y yx\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.ZFC.Basic", "llama_tokens": 24506, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7431680086124812, "lm_q2_score": 0.5312093733737562, "lm_q1q2_score": 0.3947778121664584}}
{"text": "[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : Fintype R\nR' : Type v\ninst✝ : CommRing R'\nχ : MulChar R R'\nψ : AddChar R R'\na : Rˣ\n⊢ ↑χ ↑a * gaussSum χ (mulShift ψ ↑a) = gaussSum χ ψ\n[PROOFSTEP]\nsimp only [gaussSum, mulShift_apply, Finset.mul_sum]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : Fintype R\nR' : Type v\ninst✝ : CommRing R'\nχ : MulChar R R'\nψ : AddChar R R'\na : Rˣ\n⊢ ∑ x : R, ↑χ ↑a * (↑χ x * ↑ψ (↑a * x)) = ∑ x : R, ↑χ x * ↑ψ x\n[PROOFSTEP]\nsimp_rw [← mul_assoc, ← map_mul]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : Fintype R\nR' : Type v\ninst✝ : CommRing R'\nχ : MulChar R R'\nψ : AddChar R R'\na : Rˣ\n⊢ ∑ x : R, ↑χ (↑a * x) * ↑ψ (↑a * x) = ∑ x : R, ↑χ x * ↑ψ x\n[PROOFSTEP]\nexact Fintype.sum_bijective _ a.mulLeft_bijective _ _ fun x => rfl\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nb : R\n⊢ ∑ a : R, ↑χ (a * b⁻¹) * ↑ψ (a - b) = ∑ c : R, ↑χ c * ↑ψ (b * (c - 1))\n[PROOFSTEP]\ncases' eq_or_ne b 0 with hb hb\n[GOAL]\ncase inl\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nb : R\nhb : b = 0\n⊢ ∑ a : R, ↑χ (a * b⁻¹) * ↑ψ (a - b) = ∑ c : R, ↑χ c * ↑ψ (b * (c - 1))\n[PROOFSTEP]\nsimp only [hb, inv_zero, mul_zero, MulChar.map_zero, zero_mul, Finset.sum_const_zero, map_zero_one, mul_one]\n[GOAL]\ncase inl\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nb : R\nhb : b = 0\n⊢ 0 = ∑ x : R, ↑χ x\n[PROOFSTEP]\nexact (hχ.sum_eq_zero).symm\n[GOAL]\ncase inr\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nb : R\nhb : b ≠ 0\n⊢ ∑ a : R, ↑χ (a * b⁻¹) * ↑ψ (a - b) = ∑ c : R, ↑χ c * ↑ψ (b * (c - 1))\n[PROOFSTEP]\nrefine' (Fintype.sum_bijective _ (mulLeft_bijective₀ b hb) _ _ fun x => _).symm\n[GOAL]\ncase inr\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nb : R\nhb : b ≠ 0\nx : R\n⊢ ↑χ x * ↑ψ (b * (x - 1)) = ↑χ ((fun x x_1 => x * x_1) b x * b⁻¹) * ↑ψ ((fun x x_1 => x * x_1) b x - b)\n[PROOFSTEP]\nrw [mul_assoc, mul_comm x, ← mul_assoc, mul_inv_cancel hb, one_mul, mul_sub, mul_one]\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n⊢ gaussSum χ ψ * gaussSum χ⁻¹ ψ⁻¹ = ↑(Fintype.card R)\n[PROOFSTEP]\nsimp only [gaussSum, AddChar.inv_apply, Finset.sum_mul, Finset.mul_sum, MulChar.inv_apply']\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n⊢ ∑ x : R, ∑ x_1 : R, ↑χ x_1 * ↑ψ x_1 * (↑χ x⁻¹ * ↑ψ (-x)) = ↑(Fintype.card R)\n[PROOFSTEP]\nconv =>\n  lhs; congr; next => skip\n  ext; congr; next => skip\n  ext\n  rw [mul_mul_mul_comm, ← map_mul, ← map_add_mul, ← sub_eq_add_neg]\n    --  conv in _ * _ * (_ * _) => rw [mul_mul_mul_comm, ← map_mul, ← map_add_mul, ← sub_eq_add_neg]\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n| ∑ x : R, ∑ x_1 : R, ↑χ x_1 * ↑ψ x_1 * (↑χ x⁻¹ * ↑ψ (-x)) = ↑(Fintype.card R)\n[PROOFSTEP]\n  lhs; congr; next => skip\n  ext; congr; next => skip\n  ext\n  rw [mul_mul_mul_comm, ← map_mul, ← map_add_mul, ← sub_eq_add_neg]\n    --  conv in _ * _ * (_ * _) => rw [mul_mul_mul_comm, ← map_mul, ← map_add_mul, ← sub_eq_add_neg]\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n| ∑ x : R, ∑ x_1 : R, ↑χ x_1 * ↑ψ x_1 * (↑χ x⁻¹ * ↑ψ (-x)) = ↑(Fintype.card R)\n[PROOFSTEP]\n  lhs; congr; next => skip\n  ext; congr; next => skip\n  ext\n  rw [mul_mul_mul_comm, ← map_mul, ← map_add_mul, ← sub_eq_add_neg]\n    --  conv in _ * _ * (_ * _) => rw [mul_mul_mul_comm, ← map_mul, ← map_add_mul, ← sub_eq_add_neg]\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n| ∑ x : R, ∑ x_1 : R, ↑χ x_1 * ↑ψ x_1 * (↑χ x⁻¹ * ↑ψ (-x)) = ↑(Fintype.card R)\n[PROOFSTEP]\nlhs\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n| ∑ x : R, ∑ x_1 : R, ↑χ x_1 * ↑ψ x_1 * (↑χ x⁻¹ * ↑ψ (-x))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase s\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n| Finset.univ\ncase f\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n| fun x => ∑ x_1 : R, ↑χ x_1 * ↑ψ x_1 * (↑χ x⁻¹ * ↑ψ (-x))\n[PROOFSTEP]\nnext => skip\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n| Finset.univ\n[PROOFSTEP]\nskip\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n| Finset.univ\n[PROOFSTEP]\nskip\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n| Finset.univ\n[PROOFSTEP]\nskip\n[GOAL]\ncase f\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n| fun x => ∑ x_1 : R, ↑χ x_1 * ↑ψ x_1 * (↑χ x⁻¹ * ↑ψ (-x))\n[PROOFSTEP]\next\n[GOAL]\ncase f.h\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\nx✝ : R\n| ∑ x : R, ↑χ x * ↑ψ x * (↑χ x✝⁻¹ * ↑ψ (-x✝))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase f.h.s\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\nx✝ : R\n| Finset.univ\ncase f.h.f\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\nx✝ : R\n| fun x => ↑χ x * ↑ψ x * (↑χ x✝⁻¹ * ↑ψ (-x✝))\n[PROOFSTEP]\nnext => skip\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\nx✝ : R\n| Finset.univ\n[PROOFSTEP]\nskip\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\nx✝ : R\n| Finset.univ\n[PROOFSTEP]\nskip\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\nx✝ : R\n| Finset.univ\n[PROOFSTEP]\nskip\n[GOAL]\ncase f.h.f\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\nx✝ : R\n| fun x => ↑χ x * ↑ψ x * (↑χ x✝⁻¹ * ↑ψ (-x✝))\n[PROOFSTEP]\next\n[GOAL]\ncase f.h.f.h\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\nx✝¹ x✝ : R\n| ↑χ x✝ * ↑ψ x✝ * (↑χ x✝¹⁻¹ * ↑ψ (-x✝¹))\n[PROOFSTEP]\nrw [mul_mul_mul_comm, ← map_mul, ← map_add_mul, ← sub_eq_add_neg]\n  --  conv in _ * _ * (_ * _) => rw [mul_mul_mul_comm, ← map_mul, ← map_add_mul, ← sub_eq_add_neg]\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n⊢ ∑ x : R, ∑ x_1 : R, ↑χ (x_1 * x⁻¹) * ↑ψ (x_1 - x) = ↑(Fintype.card R)\n[PROOFSTEP]\nsimp_rw [gaussSum_mul_aux hχ ψ]\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n⊢ ∑ x : R, ∑ x_1 : R, ↑χ x_1 * ↑ψ (x * (x_1 - 1)) = ↑(Fintype.card R)\n[PROOFSTEP]\nrw [Finset.sum_comm]\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n⊢ ∑ y : R, ∑ x : R, ↑χ y * ↑ψ (x * (y - 1)) = ↑(Fintype.card R)\n[PROOFSTEP]\nclassical\n  -- to get `[DecidableEq R]` for `sum_mulShift`\nsimp_rw [← Finset.mul_sum, sum_mulShift _ hψ, sub_eq_zero, apply_ite, Nat.cast_zero, mul_zero]\nrw [Finset.sum_ite_eq' Finset.univ (1 : R)]\nsimp only [Finset.mem_univ, map_one, one_mul, if_true]\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n⊢ ∑ y : R, ∑ x : R, ↑χ y * ↑ψ (x * (y - 1)) = ↑(Fintype.card R)\n[PROOFSTEP]\nsimp_rw [← Finset.mul_sum, sum_mulShift _ hψ, sub_eq_zero, apply_ite, Nat.cast_zero, mul_zero]\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n⊢ (∑ x : R, if x = 1 then ↑χ x * ↑(Fintype.card R) else 0) = ↑(Fintype.card R)\n[PROOFSTEP]\nrw [Finset.sum_ite_eq' Finset.univ (1 : R)]\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : MulChar.IsNontrivial χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n⊢ (if 1 ∈ Finset.univ then ↑χ 1 * ↑(Fintype.card R) else 0) = ↑(Fintype.card R)\n[PROOFSTEP]\nsimp only [Finset.mem_univ, map_one, one_mul, if_true]\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n⊢ gaussSum χ ψ ^ 2 = ↑χ (-1) * ↑(Fintype.card R)\n[PROOFSTEP]\nrw [pow_two, ← gaussSum_mul_gaussSum_eq_card hχ₁ hψ, hχ₂.inv, mul_rotate']\n[GOAL]\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n⊢ gaussSum χ ψ * gaussSum χ ψ = gaussSum χ ψ * (gaussSum χ ψ⁻¹ * ↑χ (-1))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n⊢ gaussSum χ ψ = gaussSum χ ψ⁻¹ * ↑χ (-1)\n[PROOFSTEP]\nrw [mul_comm, ← gaussSum_mulShift _ _ (-1 : Rˣ), inv_mulShift]\n[GOAL]\ncase e_a\nR : Type u\ninst✝³ : Field R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nψ : AddChar R R'\nhψ : IsPrimitive ψ\n⊢ ↑χ ↑(-1) * gaussSum χ (mulShift ψ ↑(-1)) = ↑χ (-1) * gaussSum χ (mulShift ψ (-1))\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : Fintype R\nR' : Type v\ninst✝ : CommRing R'\np : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nχ : MulChar R R'\nψ : AddChar R R'\n⊢ gaussSum χ ψ ^ p = gaussSum (χ ^ p) (ψ ^ p)\n[PROOFSTEP]\nrw [← frobenius_def, gaussSum, gaussSum, map_sum]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : Fintype R\nR' : Type v\ninst✝ : CommRing R'\np : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nχ : MulChar R R'\nψ : AddChar R R'\n⊢ ∑ x : R, ↑(frobenius R' p) (↑χ x * ↑ψ x) = ∑ a : R, ↑(χ ^ p) a * ↑(ψ ^ p) a\n[PROOFSTEP]\nsimp_rw [pow_apply' χ fp.1.pos, map_mul, frobenius_def]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : Fintype R\nR' : Type v\ninst✝ : CommRing R'\np : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nχ : MulChar R R'\nψ : AddChar R R'\n⊢ ∑ x : R, ↑χ x ^ p * ↑ψ x ^ p = ∑ x : R, ↑χ x ^ p * ↑(ψ ^ p) x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : Fintype R\nR' : Type v\ninst✝ : CommRing R'\np : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nhp : IsUnit ↑p\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\n⊢ gaussSum χ ψ ^ p = ↑χ ↑p * gaussSum χ ψ\n[PROOFSTEP]\nrw [gaussSum_frob, pow_mulShift, hχ.pow_char p, ← gaussSum_mulShift χ ψ hp.unit, ← mul_assoc, hp.unit_spec, ← pow_two, ←\n  pow_apply' _ (by norm_num : 0 < 2), hχ.sq_eq_one, ← hp.unit_spec, one_apply_coe, one_mul]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : Fintype R\nR' : Type v\ninst✝ : CommRing R'\np : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nhp : IsUnit ↑p\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\n⊢ 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : Fintype R\nR' : Type v\ninst✝ : CommRing R'\np : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nn : ℕ\nhp : IsUnit ↑p\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\n⊢ gaussSum χ ψ ^ p ^ n = ↑χ (↑p ^ n) * gaussSum χ ψ\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : Fintype R\nR' : Type v\ninst✝ : CommRing R'\np : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nhp : IsUnit ↑p\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\n⊢ gaussSum χ ψ ^ p ^ Nat.zero = ↑χ (↑p ^ Nat.zero) * gaussSum χ ψ\n[PROOFSTEP]\nrw [pow_zero, pow_one, pow_zero, MulChar.map_one, one_mul]\n[GOAL]\ncase succ\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : Fintype R\nR' : Type v\ninst✝ : CommRing R'\np : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nhp : IsUnit ↑p\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\nn : ℕ\nih : gaussSum χ ψ ^ p ^ n = ↑χ (↑p ^ n) * gaussSum χ ψ\n⊢ gaussSum χ ψ ^ p ^ Nat.succ n = ↑χ (↑p ^ Nat.succ n) * gaussSum χ ψ\n[PROOFSTEP]\nrw [pow_succ, mul_comm p, pow_mul, ih, mul_pow, hχ.gaussSum_frob _ hp, ← mul_assoc, pow_succ, mul_comm (p : R), map_mul,\n  ← pow_apply' χ fp.1.pos ((p : R) ^ n), hχ.pow_char p]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\np n : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nhp : IsUnit ↑p\nhp' : p ≠ 2\nhg : gaussSum χ ψ ^ 2 = ↑χ (-1) * ↑(Fintype.card R)\n⊢ (↑χ (-1) * ↑(Fintype.card R)) ^ (p ^ n / 2) = ↑χ (↑p ^ n)\n[PROOFSTEP]\nhave : gaussSum χ ψ ≠ 0 := by\n  intro hf; rw [hf, zero_pow (by norm_num : 0 < 2), eq_comm, mul_eq_zero] at hg \n  exact\n    not_isUnit_prime_of_dvd_card p\n      ((CharP.cast_eq_zero_iff R' p _).mp <| hg.resolve_left (isUnit_one.neg.map χ).ne_zero) hp\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\np n : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nhp : IsUnit ↑p\nhp' : p ≠ 2\nhg : gaussSum χ ψ ^ 2 = ↑χ (-1) * ↑(Fintype.card R)\n⊢ gaussSum χ ψ ≠ 0\n[PROOFSTEP]\nintro hf\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\np n : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nhp : IsUnit ↑p\nhp' : p ≠ 2\nhg : gaussSum χ ψ ^ 2 = ↑χ (-1) * ↑(Fintype.card R)\nhf : gaussSum χ ψ = 0\n⊢ False\n[PROOFSTEP]\nrw [hf, zero_pow (by norm_num : 0 < 2), eq_comm, mul_eq_zero] at hg \n[GOAL]\nR : Type u\ninst✝³ : CommRing R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\np n : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nhp : IsUnit ↑p\nhp' : p ≠ 2\nhg : 0 ^ 2 = ↑χ (-1) * ↑(Fintype.card R)\nhf : gaussSum χ ψ = 0\n⊢ 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\np n : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nhp : IsUnit ↑p\nhp' : p ≠ 2\nhg : ↑χ (-1) = 0 ∨ ↑(Fintype.card R) = 0\nhf : gaussSum χ ψ = 0\n⊢ False\n[PROOFSTEP]\nexact\n  not_isUnit_prime_of_dvd_card p ((CharP.cast_eq_zero_iff R' p _).mp <| hg.resolve_left (isUnit_one.neg.map χ).ne_zero)\n    hp\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\np n : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nhp : IsUnit ↑p\nhp' : p ≠ 2\nhg : gaussSum χ ψ ^ 2 = ↑χ (-1) * ↑(Fintype.card R)\nthis : gaussSum χ ψ ≠ 0\n⊢ (↑χ (-1) * ↑(Fintype.card R)) ^ (p ^ n / 2) = ↑χ (↑p ^ n)\n[PROOFSTEP]\nrw [← hg]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\np n : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nhp : IsUnit ↑p\nhp' : p ≠ 2\nhg : gaussSum χ ψ ^ 2 = ↑χ (-1) * ↑(Fintype.card R)\nthis : gaussSum χ ψ ≠ 0\n⊢ (gaussSum χ ψ ^ 2) ^ (p ^ n / 2) = ↑χ (↑p ^ n)\n[PROOFSTEP]\napply mul_right_cancel₀ this\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\ninst✝² : Fintype R\nR' : Type v\ninst✝¹ : CommRing R'\ninst✝ : IsDomain R'\nχ : MulChar R R'\nhχ : IsQuadratic χ\nψ : AddChar R R'\np n : ℕ\nfp : Fact (Nat.Prime p)\nhch : CharP R' p\nhp : IsUnit ↑p\nhp' : p ≠ 2\nhg : gaussSum χ ψ ^ 2 = ↑χ (-1) * ↑(Fintype.card R)\nthis : gaussSum χ ψ ≠ 0\n⊢ (gaussSum χ ψ ^ 2) ^ (p ^ n / 2) * gaussSum χ ψ = ↑χ (↑p ^ n) * gaussSum χ ψ\n[PROOFSTEP]\nrw [← hχ.gaussSum_frob_iter p n hp ψ, ← pow_mul, mul_comm, ← pow_succ,\n  Nat.two_mul_div_two_add_one_of_odd (fp.1.eq_two_or_odd'.resolve_left hp').pow]\n[GOAL]\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\n⊢ (↑χ (-1) * ↑(Fintype.card F)) ^ (Fintype.card F' / 2) = ↑χ ↑(Fintype.card F')\n[PROOFSTEP]\nobtain ⟨n, hp, hc⟩ := FiniteField.card F (ringChar F)\n[GOAL]\ncase intro.intro\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\n⊢ (↑χ (-1) * ↑(Fintype.card F)) ^ (Fintype.card F' / 2) = ↑χ ↑(Fintype.card F')\n[PROOFSTEP]\nobtain ⟨n', hp', hc'⟩ := FiniteField.card F' (ringChar F')\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime (ringChar F')\nhc' : Fintype.card F' = ringChar F' ^ ↑n'\n⊢ (↑χ (-1) * ↑(Fintype.card F)) ^ (Fintype.card F' / 2) = ↑χ ↑(Fintype.card F')\n[PROOFSTEP]\nlet ψ := primitiveCharFiniteField F F' hch₁\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime (ringChar F')\nhc' : Fintype.card F' = ringChar F' ^ ↑n'\nψ : PrimitiveAddChar F F' := primitiveCharFiniteField F F' hch₁\n⊢ (↑χ (-1) * ↑(Fintype.card F)) ^ (Fintype.card F' / 2) = ↑χ ↑(Fintype.card F')\n[PROOFSTEP]\nset FF' := CyclotomicField ψ.n F' with FF'_def\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime (ringChar F')\nhc' : Fintype.card F' = ringChar F' ^ ↑n'\nψ : PrimitiveAddChar F F' := primitiveCharFiniteField F F' hch₁\nFF' : Type u_2 := CyclotomicField (PrimitiveAddChar.n ψ) F'\nFF'_def : FF' = CyclotomicField (PrimitiveAddChar.n ψ) F'\n⊢ (↑χ (-1) * ↑(Fintype.card F)) ^ (Fintype.card F' / 2) = ↑χ ↑(Fintype.card F')\n[PROOFSTEP]\nhave hchar := Algebra.ringChar_eq F' FF'\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime (ringChar F')\nhc' : Fintype.card F' = ringChar F' ^ ↑n'\nψ : PrimitiveAddChar F F' := primitiveCharFiniteField F F' hch₁\nFF' : Type u_2 := CyclotomicField (PrimitiveAddChar.n ψ) F'\nFF'_def : FF' = CyclotomicField (PrimitiveAddChar.n ψ) F'\nhchar : ringChar F' = ringChar FF'\n⊢ (↑χ (-1) * ↑(Fintype.card F)) ^ (Fintype.card F' / 2) = ↑χ ↑(Fintype.card F')\n[PROOFSTEP]\napply (algebraMap F' FF').injective\n[GOAL]\ncase intro.intro.intro.intro.a\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime (ringChar F')\nhc' : Fintype.card F' = ringChar F' ^ ↑n'\nψ : PrimitiveAddChar F F' := primitiveCharFiniteField F F' hch₁\nFF' : Type u_2 := CyclotomicField (PrimitiveAddChar.n ψ) F'\nFF'_def : FF' = CyclotomicField (PrimitiveAddChar.n ψ) F'\nhchar : ringChar F' = ringChar FF'\n⊢ ↑(algebraMap F' FF') ((↑χ (-1) * ↑(Fintype.card F)) ^ (Fintype.card F' / 2)) =\n    ↑(algebraMap F' FF') (↑χ ↑(Fintype.card F'))\n[PROOFSTEP]\nrw [map_pow, map_mul, map_natCast, hc', hchar, Nat.cast_pow]\n[GOAL]\ncase intro.intro.intro.intro.a\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime (ringChar F')\nhc' : Fintype.card F' = ringChar F' ^ ↑n'\nψ : PrimitiveAddChar F F' := primitiveCharFiniteField F F' hch₁\nFF' : Type u_2 := CyclotomicField (PrimitiveAddChar.n ψ) F'\nFF'_def : FF' = CyclotomicField (PrimitiveAddChar.n ψ) F'\nhchar : ringChar F' = ringChar FF'\n⊢ (↑(algebraMap F' FF') (↑χ (-1)) * ↑(Fintype.card F)) ^ (ringChar FF' ^ ↑n' / 2) =\n    ↑(algebraMap F' FF') (↑χ (↑(ringChar FF') ^ ↑n'))\n[PROOFSTEP]\nsimp only [← MulChar.ringHomComp_apply]\n[GOAL]\ncase intro.intro.intro.intro.a\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime (ringChar F')\nhc' : Fintype.card F' = ringChar F' ^ ↑n'\nψ : PrimitiveAddChar F F' := primitiveCharFiniteField F F' hch₁\nFF' : Type u_2 := CyclotomicField (PrimitiveAddChar.n ψ) F'\nFF'_def : FF' = CyclotomicField (PrimitiveAddChar.n ψ) F'\nhchar : ringChar F' = ringChar FF'\n⊢ (↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁)) F')))\n          (-1) *\n        ↑(Fintype.card F)) ^\n      (ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁)) F') ^ ↑n' / 2) =\n    ↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁)) F')))\n      (↑(ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁)) F')) ^ ↑n')\n[PROOFSTEP]\nhaveI := Fact.mk hp'\n[GOAL]\ncase intro.intro.intro.intro.a\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime (ringChar F')\nhc' : Fintype.card F' = ringChar F' ^ ↑n'\nψ : PrimitiveAddChar F F' := primitiveCharFiniteField F F' hch₁\nFF' : Type u_2 := CyclotomicField (PrimitiveAddChar.n ψ) F'\nFF'_def : FF' = CyclotomicField (PrimitiveAddChar.n ψ) F'\nhchar : ringChar F' = ringChar FF'\nthis : Fact (Nat.Prime (ringChar F'))\n⊢ (↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁)) F')))\n          (-1) *\n        ↑(Fintype.card F)) ^\n      (ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁)) F') ^ ↑n' / 2) =\n    ↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁)) F')))\n      (↑(ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁)) F')) ^ ↑n')\n[PROOFSTEP]\nhaveI := Fact.mk (hchar.subst hp')\n[GOAL]\ncase intro.intro.intro.intro.a\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime (ringChar F')\nhc' : Fintype.card F' = ringChar F' ^ ↑n'\nψ : PrimitiveAddChar F F' := primitiveCharFiniteField F F' hch₁\nFF' : Type u_2 := CyclotomicField (PrimitiveAddChar.n ψ) F'\nFF'_def : FF' = CyclotomicField (PrimitiveAddChar.n ψ) F'\nhchar : ringChar F' = ringChar FF'\nthis✝ : Fact (Nat.Prime (ringChar F'))\nthis : Fact (Nat.Prime (ringChar FF'))\n⊢ (↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁)) F')))\n          (-1) *\n        ↑(Fintype.card F)) ^\n      (ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁)) F') ^ ↑n' / 2) =\n    ↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁)) F')))\n      (↑(ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁)) F')) ^ ↑n')\n[PROOFSTEP]\nrw [Ne, ← Nat.prime_dvd_prime_iff_eq hp' hp, ← isUnit_iff_not_dvd_char, hchar] at hch₁ \n[GOAL]\ncase intro.intro.intro.intro.a\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁✝ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime (ringChar F')\nhc' : Fintype.card F' = ringChar F' ^ ↑n'\nψ : PrimitiveAddChar F F' := primitiveCharFiniteField F F' hch₁✝\nFF' : Type u_2 := CyclotomicField (PrimitiveAddChar.n ψ) F'\nhch₁ : IsUnit ↑(ringChar FF')\nFF'_def : FF' = CyclotomicField (PrimitiveAddChar.n ψ) F'\nhchar : ringChar F' = ringChar FF'\nthis✝ : Fact (Nat.Prime (ringChar F'))\nthis : Fact (Nat.Prime (ringChar FF'))\n⊢ (↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F')))\n          (-1) *\n        ↑(Fintype.card F)) ^\n      (ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F') ^ ↑n' / 2) =\n    ↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F')))\n      (↑(ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F')) ^ ↑n')\n[PROOFSTEP]\nhave :=\n  Char.card_pow_char_pow (hχ₂.comp (algebraMap F' FF')) ψ.char (ringChar FF') n' hch₁ (hchar ▸ hch₂)\n    (gaussSum_sq (hχ₁.comp <| RingHom.injective _) (hχ₂.comp _) ψ.prim)\n[GOAL]\ncase intro.intro.intro.intro.a\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁✝ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime (ringChar F')\nhc' : Fintype.card F' = ringChar F' ^ ↑n'\nψ : PrimitiveAddChar F F' := primitiveCharFiniteField F F' hch₁✝\nFF' : Type u_2 := CyclotomicField (PrimitiveAddChar.n ψ) F'\nhch₁ : IsUnit ↑(ringChar FF')\nFF'_def : FF' = CyclotomicField (PrimitiveAddChar.n ψ) F'\nhchar : ringChar F' = ringChar FF'\nthis✝¹ : Fact (Nat.Prime (ringChar F'))\nthis✝ : Fact (Nat.Prime (ringChar FF'))\nthis :\n  (↑(ringHomComp χ (algebraMap F' FF')) (-1) * ↑(Fintype.card F)) ^ (ringChar FF' ^ ↑n' / 2) =\n    ↑(ringHomComp χ (algebraMap F' FF')) (↑(ringChar FF') ^ ↑n')\n⊢ (↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F')))\n          (-1) *\n        ↑(Fintype.card F)) ^\n      (ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F') ^ ↑n' / 2) =\n    ↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F')))\n      (↑(ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F')) ^ ↑n')\n[PROOFSTEP]\nsimp_rw [FF'_def] at this \n[GOAL]\ncase intro.intro.intro.intro.a\nR : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : Fintype R\nR' : Type v\ninst✝⁵ : CommRing R'\ninst✝⁴ : IsDomain R'\nF : Type u_1\ninst✝³ : Field F\ninst✝² : Fintype F\nF' : Type u_2\ninst✝¹ : Field F'\ninst✝ : Fintype F'\nχ : MulChar F F'\nhχ₁ : MulChar.IsNontrivial χ\nhχ₂ : IsQuadratic χ\nhch₁✝ : ringChar F' ≠ ringChar F\nhch₂ : ringChar F' ≠ 2\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nn' : ℕ+\nhp' : Nat.Prime (ringChar F')\nhc' : Fintype.card F' = ringChar F' ^ ↑n'\nψ : PrimitiveAddChar F F' := primitiveCharFiniteField F F' hch₁✝\nFF' : Type u_2 := CyclotomicField (PrimitiveAddChar.n ψ) F'\nhch₁ : IsUnit ↑(ringChar FF')\nFF'_def : FF' = CyclotomicField (PrimitiveAddChar.n ψ) F'\nhchar : ringChar F' = ringChar FF'\nthis✝¹ : Fact (Nat.Prime (ringChar F'))\nthis✝ : Fact (Nat.Prime (ringChar FF'))\nthis :\n  (↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F')))\n          (-1) *\n        ↑(Fintype.card F)) ^\n      (ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F') ^ ↑n' / 2) =\n    ↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F')))\n      (↑(ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F')) ^ ↑n')\n⊢ (↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F')))\n          (-1) *\n        ↑(Fintype.card F)) ^\n      (ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F') ^ ↑n' / 2) =\n    ↑(ringHomComp χ (algebraMap F' (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F')))\n      (↑(ringChar (CyclotomicField (PrimitiveAddChar.n (primitiveCharFiniteField F F' hch₁✝)) F')) ^ ↑n')\n[PROOFSTEP]\nexact this\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhave hp2 : ∀ n : ℕ, (2 ^ n : F) ≠ 0 := fun n => pow_ne_zero n (Ring.two_ne_zero hF)\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nobtain ⟨n, hp, hc⟩ :=\n  FiniteField.card F\n    (ringChar F)\n      -- we work in `FF`, the eighth cyclotomic field extension of `F`\n        -- Porting note: was\n        -- let FF := (Polynomial.cyclotomic 8 F).SplittingField\n        -- but we want to unify with `CyclotomicField` below.\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nlet FF := CyclotomicField 8 F\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhaveI : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F) := Polynomial.IsSplittingField.splittingField _\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhaveI : FiniteDimensional F FF := Polynomial.IsSplittingField.finiteDimensional FF (Polynomial.cyclotomic 8 F)\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝ : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis : FiniteDimensional F FF\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhaveI : Fintype FF := FiniteDimensional.fintypeOfFintype F FF\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝¹ : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝ : FiniteDimensional F FF\nthis : Fintype FF\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhave hchar := Algebra.ringChar_eq F FF\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝¹ : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝ : FiniteDimensional F FF\nthis : Fintype FF\nhchar : ringChar F = ringChar FF\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhave FFp := hchar.subst hp\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝¹ : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝ : FiniteDimensional F FF\nthis : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhaveI := Fact.mk FFp\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhave hFF := ne_of_eq_of_ne hchar.symm hF\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhave hu : IsUnit (ringChar FF : ZMod 8) :=\n  by\n  rw [isUnit_iff_not_dvd_char, ringChar_zmod_n]\n  rw [Ne, ← Nat.prime_dvd_prime_iff_eq FFp Nat.prime_two] at hFF \n  change ¬_ ∣ 2 ^ 3\n  exact mt FFp.dvd_of_dvd_pow hFF\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\n⊢ IsUnit ↑(ringChar FF)\n[PROOFSTEP]\nrw [isUnit_iff_not_dvd_char, ringChar_zmod_n]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\n⊢ ¬ringChar FF ∣ 8\n[PROOFSTEP]\nrw [Ne, ← Nat.prime_dvd_prime_iff_eq FFp Nat.prime_two] at hFF \n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ¬ringChar FF ∣ 2\n⊢ ¬ringChar FF ∣ 8\n[PROOFSTEP]\nchange ¬_ ∣ 2 ^ 3\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ¬ringChar FF ∣ 2\n⊢ ¬ringChar FF ∣ 2 ^ 3\n[PROOFSTEP]\nexact mt FFp.dvd_of_dvd_pow hFF\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nlet ψ₈ : PrimitiveAddChar (ZMod 8) F :=\n  primitiveZModChar 8 F\n    (by convert hp2 3 using 1; norm_cast)\n      -- Porting note: unifying this is very slow, so only do it once.\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\n⊢ ↑↑8 ≠ 0\n[PROOFSTEP]\nconvert hp2 3 using 1\n[GOAL]\ncase h.e'_2\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\n⊢ ↑↑8 = 2 ^ 3\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nlet ψ₈char : AddChar (ZMod 8) FF := ψ₈.char\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nlet τ : FF := ψ₈char 1\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhave τ_spec : τ ^ 4 = -1 := by\n  refine (sq_eq_one_iff.1 ?_).resolve_left ?_\n  · rw [← pow_mul, ← map_nsmul_pow ψ₈char, AddChar.IsPrimitive.zmod_char_eq_one_iff 8 ψ₈.prim]\n    decide\n  · rw [← map_nsmul_pow ψ₈char, AddChar.IsPrimitive.zmod_char_eq_one_iff 8 ψ₈.prim]\n    decide\n      -- we consider `χ₈` as a multiplicative character `ℤ/8ℤ → FF`\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\n⊢ τ ^ 4 = -1\n[PROOFSTEP]\nrefine (sq_eq_one_iff.1 ?_).resolve_left ?_\n[GOAL]\ncase refine_1\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\n⊢ (τ ^ 4) ^ 2 = 1\n[PROOFSTEP]\nrw [← pow_mul, ← map_nsmul_pow ψ₈char, AddChar.IsPrimitive.zmod_char_eq_one_iff 8 ψ₈.prim]\n[GOAL]\ncase refine_1\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\n⊢ (4 * 2) • 1 = 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase refine_2\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\n⊢ ¬τ ^ 4 = 1\n[PROOFSTEP]\nrw [← map_nsmul_pow ψ₈char, AddChar.IsPrimitive.zmod_char_eq_one_iff 8 ψ₈.prim]\n[GOAL]\ncase refine_2\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\n⊢ ¬4 • 1 = 0\n[PROOFSTEP]\ndecide\n  -- we consider `χ₈` as a multiplicative character `ℤ/8ℤ → FF`\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nlet χ := χ₈.ringHomComp (Int.castRingHom FF)\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhave hχ : χ (-1) = 1 := Int.cast_one\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhave hq : IsQuadratic χ :=\n  isQuadratic_χ₈.comp\n    _\n      -- we now show that the Gauss sum of `χ` and `ψ₈` has the relevant property\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhave hg : gaussSum χ ψ₈char ^ 2 = χ (-1) * Fintype.card (ZMod 8) :=\n  by\n  have _ := congr_arg (· ^ 2) (Fin.sum_univ_eight fun x => (χ₈ x : FF) * τ ^ x.1)\n  have h₁ : (fun i : Fin 8 => ↑(χ₈ i) * τ ^ i.val) = (fun a : ZMod 8 => χ a * ↑(ψ₈char a)) := by\n    -- Porting note: original proof\n          -- ext; congr; apply pow_oneext (x : Fin 8); rw [← map_nsmul_pow ψ₈char]; congr 2;\n    rw [Nat.smul_one_eq_coe, Fin.cast_val_eq_self x]\n  have h₂ :\n    (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n      8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) :=\n    by ring\n  have h₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = ↑8 := by rw [τ_spec]; norm_num\n  have h₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = ↑8 := by rw [← h₃, ← h₂]\n  have h₅ :\n    (↑(χ₈ 0) * τ ^ 0 + ↑(χ₈ 1) * τ ^ 1 + ↑(χ₈ 2) * τ ^ 2 + ↑(χ₈ 3) * τ ^ 3 + ↑(χ₈ 4) * τ ^ 4 + ↑(χ₈ 5) * τ ^ 5 +\n            ↑(χ₈ 6) * τ ^ 6 +\n          ↑(χ₈ 7) * τ ^ 7) ^\n        2 =\n      8 :=\n    by\n    -- Porting note: original proof\n          --  simp [← h₄, χ₈_apply, Matrix.cons_val_zero, algebraMap.coe_zero, zero_mul,\n          -- Matrix.cons_val_one, Matrix.head_cons, algebraMap.coe_one, Matrix.cons_vec_bit0_eq_alt0,\n          -- Matrix.cons_vecAppend, Matrix.cons_vecAlt0, Matrix.cons_vec_bit1_eq_alt1,\n          -- Matrix.cons_vecAlt1, Int.cast_neg]\n    simp_rw [χ₈_apply]\n    rw [← h₄]\n    dsimp only\n    congr\n    · rw [Matrix.cons_val_zero]; simp\n    · simp only [Matrix.vecCons, ne_eq, Nat.cast_ofNat, id_eq, eq_mpr_eq_cast, mul_eq_zero, zero_lt_two,\n        pow_eq_zero_iff]\n      left\n      rw [← Int.cast_zero (R := FF)]\n      exact congr_arg Int.cast rfl\n    · simp only [Matrix.vecCons]\n      rw [show (-1 : FF) = ↑(-1 : ℤ) by simp only [Int.cast_neg, Int.cast_one]]\n      exact congr_arg Int.cast rfl\n    · simp only [Matrix.vecCons, ne_eq, Nat.cast_ofNat, id_eq, eq_mpr_eq_cast, mul_eq_zero, zero_lt_two,\n        pow_eq_zero_iff]\n      left\n      rw [← Int.cast_zero (R := FF)]\n      exact congr_arg Int.cast rfl\n    · simp only [Matrix.vecCons]\n      rw [show (-1 : FF) = ↑(-1 : ℤ) by simp only [Int.cast_neg, Int.cast_one]]\n      exact congr_arg Int.cast rfl\n    · simp only [Matrix.vecCons, ne_eq, Nat.cast_ofNat, id_eq, eq_mpr_eq_cast, mul_eq_zero, zero_lt_two,\n        pow_eq_zero_iff]\n      left\n      rw [← Int.cast_zero (R := FF)]\n      exact congr_arg Int.cast rfl\n  rw [gaussSum, hχ, one_mul, ZMod.card, Nat.cast_ofNat, ← h₅]\n  simp_rw [← h₁]\n  rw [Fin.sum_univ_eight]\n  rfl\n    -- this allows us to apply `card_pow_char_pow` to our situation\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\n⊢ gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\n[PROOFSTEP]\nhave _ := congr_arg (· ^ 2) (Fin.sum_univ_eight fun x => (χ₈ x : FF) * τ ^ x.1)\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\n⊢ gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\n[PROOFSTEP]\nhave h₁ : (fun i : Fin 8 => ↑(χ₈ i) * τ ^ i.val) = (fun a : ZMod 8 => χ a * ↑(ψ₈char a)) := by\n  -- Porting note: original proof\n        -- ext; congr; apply pow_oneext (x : Fin 8); rw [← map_nsmul_pow ψ₈char]; congr 2;\n  rw [Nat.smul_one_eq_coe, Fin.cast_val_eq_self x]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\n⊢ (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\n[PROOFSTEP]\next (x : Fin 8)\n[GOAL]\ncase h\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nx : Fin 8\n⊢ ↑(↑χ₈ x) * τ ^ ↑x = ↑χ x * ↑ψ₈char x\n[PROOFSTEP]\nrw [← map_nsmul_pow ψ₈char]\n[GOAL]\ncase h\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nx : Fin 8\n⊢ ↑(↑χ₈ x) * ↑ψ₈char (↑x • 1) = ↑χ x * ↑ψ₈char x\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.e_a.e_x\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nx : Fin 8\n⊢ ↑x • 1 = x\n[PROOFSTEP]\nrw [Nat.smul_one_eq_coe, Fin.cast_val_eq_self x]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\n⊢ gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\n[PROOFSTEP]\nhave h₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) :=\n  by ring\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\n⊢ (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\n[PROOFSTEP]\nring\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\n⊢ gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\n[PROOFSTEP]\nhave h₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = ↑8 := by rw [τ_spec]; norm_num\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\n⊢ 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\n[PROOFSTEP]\nrw [τ_spec]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\n⊢ 8 + (-1 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * -1 + τ ^ 2 - 8) = 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\n⊢ gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\n[PROOFSTEP]\nhave h₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = ↑8 := by rw [← h₃, ← h₂]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\n⊢ (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n[PROOFSTEP]\nrw [← h₃, ← h₂]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\n[PROOFSTEP]\nhave h₅ :\n  (↑(χ₈ 0) * τ ^ 0 + ↑(χ₈ 1) * τ ^ 1 + ↑(χ₈ 2) * τ ^ 2 + ↑(χ₈ 3) * τ ^ 3 + ↑(χ₈ 4) * τ ^ 4 + ↑(χ₈ 5) * τ ^ 5 +\n          ↑(χ₈ 6) * τ ^ 6 +\n        ↑(χ₈ 7) * τ ^ 7) ^\n      2 =\n    8 :=\n  by\n  -- Porting note: original proof\n        --  simp [← h₄, χ₈_apply, Matrix.cons_val_zero, algebraMap.coe_zero, zero_mul,\n        -- Matrix.cons_val_one, Matrix.head_cons, algebraMap.coe_one, Matrix.cons_vec_bit0_eq_alt0,\n        -- Matrix.cons_vecAppend, Matrix.cons_vecAlt0, Matrix.cons_vec_bit1_eq_alt1,\n        -- Matrix.cons_vecAlt1, Int.cast_neg]\n  simp_rw [χ₈_apply]\n  rw [← h₄]\n  dsimp only\n  congr\n  · rw [Matrix.cons_val_zero]; simp\n  · simp only [Matrix.vecCons, ne_eq, Nat.cast_ofNat, id_eq, eq_mpr_eq_cast, mul_eq_zero, zero_lt_two, pow_eq_zero_iff]\n    left\n    rw [← Int.cast_zero (R := FF)]\n    exact congr_arg Int.cast rfl\n  · simp only [Matrix.vecCons]\n    rw [show (-1 : FF) = ↑(-1 : ℤ) by simp only [Int.cast_neg, Int.cast_one]]\n    exact congr_arg Int.cast rfl\n  · simp only [Matrix.vecCons, ne_eq, Nat.cast_ofNat, id_eq, eq_mpr_eq_cast, mul_eq_zero, zero_lt_two, pow_eq_zero_iff]\n    left\n    rw [← Int.cast_zero (R := FF)]\n    exact congr_arg Int.cast rfl\n  · simp only [Matrix.vecCons]\n    rw [show (-1 : FF) = ↑(-1 : ℤ) by simp only [Int.cast_neg, Int.cast_one]]\n    exact congr_arg Int.cast rfl\n  · simp only [Matrix.vecCons, ne_eq, Nat.cast_ofNat, id_eq, eq_mpr_eq_cast, mul_eq_zero, zero_lt_two, pow_eq_zero_iff]\n    left\n    rw [← Int.cast_zero (R := FF)]\n    exact congr_arg Int.cast rfl\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ (↑(↑χ₈ 0) * τ ^ 0 + ↑(↑χ₈ 1) * τ ^ 1 + ↑(↑χ₈ 2) * τ ^ 2 + ↑(↑χ₈ 3) * τ ^ 3 + ↑(↑χ₈ 4) * τ ^ 4 + ↑(↑χ₈ 5) * τ ^ 5 +\n          ↑(↑χ₈ 6) * τ ^ 6 +\n        ↑(↑χ₈ 7) * τ ^ 7) ^\n      2 =\n    8\n[PROOFSTEP]\nsimp_rw [χ₈_apply]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ (↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 0) *\n                      ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 0 +\n                    ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) *\n                      ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 1 +\n                  ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 2) *\n                    ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 2 +\n                ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 3) *\n                  ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 3 +\n              ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 4) *\n                ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 4 +\n            ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 5) *\n              ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 5 +\n          ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 6) *\n            ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 6 +\n        ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 7) *\n          ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 7) ^\n      2 =\n    8\n[PROOFSTEP]\nrw [← h₄]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ (↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 0) *\n                      ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 0 +\n                    ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) *\n                      ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 1 +\n                  ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 2) *\n                    ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 2 +\n                ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 3) *\n                  ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 3 +\n              ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 4) *\n                ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 4 +\n            ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 5) *\n              ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 5 +\n          ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 6) *\n            ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 6 +\n        ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 7) *\n          ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 7) ^\n      2 =\n    (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2\n[PROOFSTEP]\ndsimp only\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ (↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 0) *\n                      ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 0 +\n                    ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) *\n                      ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 1 +\n                  ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 2) *\n                    ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 2 +\n                ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 3) *\n                  ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 3 +\n              ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 4) *\n                ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 4 +\n            ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 5) *\n              ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 5 +\n          ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 6) *\n            ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 6 +\n        ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 7) *\n          ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 7) ^\n      2 =\n    (0 + 1 * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 1 + 0 +\n                -1 * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 3 +\n              0 +\n            -1 * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 5 +\n          0 +\n        1 * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 7) ^\n      2\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a.e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 0) *\n      ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 0 =\n    0\n[PROOFSTEP]\nrw [Matrix.cons_val_zero]\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a.e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑0 * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 2) *\n      ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 2 =\n    0\n[PROOFSTEP]\nsimp only [Matrix.vecCons, ne_eq, Nat.cast_ofNat, id_eq, eq_mpr_eq_cast, mul_eq_zero, zero_lt_two, pow_eq_zero_iff]\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 2) =\n      0 ∨\n    ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ¬↑↑8 = 0))) 1 = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a.e_a.e_a.h\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 2) =\n    0\n[PROOFSTEP]\nrw [← Int.cast_zero (R := FF)]\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a.e_a.e_a.h\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 2) =\n    ↑0\n[PROOFSTEP]\nexact congr_arg Int.cast rfl\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 3) = -1\n[PROOFSTEP]\nsimp only [Matrix.vecCons]\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 3) =\n    -1\n[PROOFSTEP]\nrw [show (-1 : FF) = ↑(-1 : ℤ) by simp only [Int.cast_neg, Int.cast_one]]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ -1 = ↑(-1)\n[PROOFSTEP]\nsimp only [Int.cast_neg, Int.cast_one]\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 3) =\n    ↑(-1)\n[PROOFSTEP]\nexact congr_arg Int.cast rfl\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 4) *\n      ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 4 =\n    0\n[PROOFSTEP]\nsimp only [Matrix.vecCons, ne_eq, Nat.cast_ofNat, id_eq, eq_mpr_eq_cast, mul_eq_zero, zero_lt_two, pow_eq_zero_iff]\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 4) =\n      0 ∨\n    ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ¬↑↑8 = 0))) 1 = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a.h\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 4) =\n    0\n[PROOFSTEP]\nrw [← Int.cast_zero (R := FF)]\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a.h\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 4) =\n    ↑0\n[PROOFSTEP]\nexact congr_arg Int.cast rfl\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 5) = -1\n[PROOFSTEP]\nsimp only [Matrix.vecCons]\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 5) =\n    -1\n[PROOFSTEP]\nrw [show (-1 : FF) = ↑(-1 : ℤ) by simp only [Int.cast_neg, Int.cast_one]]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ -1 = ↑(-1)\n[PROOFSTEP]\nsimp only [Int.cast_neg, Int.cast_one]\n[GOAL]\ncase e_a.e_a.e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 5) =\n    ↑(-1)\n[PROOFSTEP]\nexact congr_arg Int.cast rfl\n[GOAL]\ncase e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 6) *\n      ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 6 =\n    0\n[PROOFSTEP]\nsimp only [Matrix.vecCons, ne_eq, Nat.cast_ofNat, id_eq, eq_mpr_eq_cast, mul_eq_zero, zero_lt_two, pow_eq_zero_iff]\n[GOAL]\ncase e_a.e_a.e_a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 6) =\n      0 ∨\n    ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ¬↑↑8 = 0))) 1 = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase e_a.e_a.e_a.h\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 6) =\n    0\n[PROOFSTEP]\nrw [← Int.cast_zero (R := FF)]\n[GOAL]\ncase e_a.e_a.e_a.h\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\n⊢ ↑(Fin.cons 0 (Fin.cons 1 (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons (-1) (Fin.cons 0 (Fin.cons 1 ![]))))))) 6) =\n    ↑0\n[PROOFSTEP]\nexact congr_arg Int.cast rfl\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\nh₅ :\n  (↑(↑χ₈ 0) * τ ^ 0 + ↑(↑χ₈ 1) * τ ^ 1 + ↑(↑χ₈ 2) * τ ^ 2 + ↑(↑χ₈ 3) * τ ^ 3 + ↑(↑χ₈ 4) * τ ^ 4 + ↑(↑χ₈ 5) * τ ^ 5 +\n          ↑(↑χ₈ 6) * τ ^ 6 +\n        ↑(↑χ₈ 7) * τ ^ 7) ^\n      2 =\n    8\n⊢ gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\n[PROOFSTEP]\nrw [gaussSum, hχ, one_mul, ZMod.card, Nat.cast_ofNat, ← h₅]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\nh₅ :\n  (↑(↑χ₈ 0) * τ ^ 0 + ↑(↑χ₈ 1) * τ ^ 1 + ↑(↑χ₈ 2) * τ ^ 2 + ↑(↑χ₈ 3) * τ ^ 3 + ↑(↑χ₈ 4) * τ ^ 4 + ↑(↑χ₈ 5) * τ ^ 5 +\n          ↑(↑χ₈ 6) * τ ^ 6 +\n        ↑(↑χ₈ 7) * τ ^ 7) ^\n      2 =\n    8\n⊢ (∑ a : ZMod 8, ↑χ a * ↑ψ₈char a) ^ 2 =\n    (↑(↑χ₈ 0) * τ ^ 0 + ↑(↑χ₈ 1) * τ ^ 1 + ↑(↑χ₈ 2) * τ ^ 2 + ↑(↑χ₈ 3) * τ ^ 3 + ↑(↑χ₈ 4) * τ ^ 4 + ↑(↑χ₈ 5) * τ ^ 5 +\n          ↑(↑χ₈ 6) * τ ^ 6 +\n        ↑(↑χ₈ 7) * τ ^ 7) ^\n      2\n[PROOFSTEP]\nsimp_rw [← h₁]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\nh₅ :\n  (↑(↑χ₈ 0) * τ ^ 0 + ↑(↑χ₈ 1) * τ ^ 1 + ↑(↑χ₈ 2) * τ ^ 2 + ↑(↑χ₈ 3) * τ ^ 3 + ↑(↑χ₈ 4) * τ ^ 4 + ↑(↑χ₈ 5) * τ ^ 5 +\n          ↑(↑χ₈ 6) * τ ^ 6 +\n        ↑(↑χ₈ 7) * τ ^ 7) ^\n      2 =\n    8\n⊢ (∑ i : ZMod 8, ↑(↑χ₈ i) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ ↑i) ^ 2 =\n    (↑(↑χ₈ 0) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 0 +\n                    ↑(↑χ₈ 1) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 1 +\n                  ↑(↑χ₈ 2) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 2 +\n                ↑(↑χ₈ 3) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 3 +\n              ↑(↑χ₈ 4) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 4 +\n            ↑(↑χ₈ 5) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 5 +\n          ↑(↑χ₈ 6) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 6 +\n        ↑(↑χ₈ 7) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 7) ^\n      2\n[PROOFSTEP]\nrw [Fin.sum_univ_eight]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nx✝ :\n  (fun x => x ^ 2) (∑ i : Fin 8, ↑(↑χ₈ i) * τ ^ ↑i) =\n    (fun x => x ^ 2)\n      (↑(↑χ₈ 0) * τ ^ ↑0 + ↑(↑χ₈ 1) * τ ^ ↑1 + ↑(↑χ₈ 2) * τ ^ ↑2 + ↑(↑χ₈ 3) * τ ^ ↑3 + ↑(↑χ₈ 4) * τ ^ ↑4 +\n            ↑(↑χ₈ 5) * τ ^ ↑5 +\n          ↑(↑χ₈ 6) * τ ^ ↑6 +\n        ↑(↑χ₈ 7) * τ ^ ↑7)\nh₁ : (fun i => ↑(↑χ₈ i) * τ ^ ↑i) = fun a => ↑χ a * ↑ψ₈char a\nh₂ :\n  (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 =\n    8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8)\nh₃ : 8 + (τ ^ 4 + 1) * (τ ^ 10 - 2 * τ ^ 8 - 2 * τ ^ 6 + 6 * τ ^ 4 + τ ^ 2 - 8) = 8\nh₄ : (0 + 1 * τ ^ 1 + 0 + -1 * τ ^ 3 + 0 + -1 * τ ^ 5 + 0 + 1 * τ ^ 7) ^ 2 = 8\nh₅ :\n  (↑(↑χ₈ 0) * τ ^ 0 + ↑(↑χ₈ 1) * τ ^ 1 + ↑(↑χ₈ 2) * τ ^ 2 + ↑(↑χ₈ 3) * τ ^ 3 + ↑(↑χ₈ 4) * τ ^ 4 + ↑(↑χ₈ 5) * τ ^ 5 +\n          ↑(↑χ₈ 6) * τ ^ 6 +\n        ↑(↑χ₈ 7) * τ ^ 7) ^\n      2 =\n    8\n⊢ (↑(↑χ₈ 0) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ ↑0 +\n                    ↑(↑χ₈ 1) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ ↑1 +\n                  ↑(↑χ₈ 2) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ ↑2 +\n                ↑(↑χ₈ 3) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ ↑3 +\n              ↑(↑χ₈ 4) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ ↑4 +\n            ↑(↑χ₈ 5) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ ↑5 +\n          ↑(↑χ₈ 6) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ ↑6 +\n        ↑(↑χ₈ 7) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ ↑7) ^\n      2 =\n    (↑(↑χ₈ 0) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 0 +\n                    ↑(↑χ₈ 1) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 1 +\n                  ↑(↑χ₈ 2) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 2 +\n                ↑(↑χ₈ 3) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 3 +\n              ↑(↑χ₈ 4) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 4 +\n            ↑(↑χ₈ 5) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 5 +\n          ↑(↑χ₈ 6) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 6 +\n        ↑(↑χ₈ 7) * ↑(PrimitiveAddChar.char (primitiveZModChar 8 F (_ : ↑↑8 ≠ 0))) 1 ^ 7) ^\n      2\n[PROOFSTEP]\nrfl\n  -- this allows us to apply `card_pow_char_pow` to our situation\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nhg : gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nhave h := Char.card_pow_char_pow (R := ZMod 8) hq ψ₈char (ringChar FF) n hu hFF hg\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nhg : gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\nh : (↑χ (-1) * ↑(Fintype.card (ZMod 8))) ^ (ringChar FF ^ ↑n / 2) = ↑χ (↑(ringChar FF) ^ ↑n)\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nrw [ZMod.card, ← hchar, hχ, one_mul, ← hc, ← Nat.cast_pow (ringChar F), ← hc] at h \n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nhg : gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\nh : ↑8 ^ (Fintype.card F / 2) = ↑χ ↑(Fintype.card F)\n⊢ 2 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nconvert_to (8 : F) ^ (Fintype.card F / 2) = _\n[GOAL]\ncase h.e'_2\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nhg : gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\nh : ↑8 ^ (Fintype.card F / 2) = ↑χ ↑(Fintype.card F)\n⊢ 2 ^ (Fintype.card F / 2) = 8 ^ (Fintype.card F / 2)\n[PROOFSTEP]\nrw [(by norm_num : (8 : F) = 2 ^ 2 * 2), mul_pow, (FiniteField.isSquare_iff hF <| hp2 2).mp ⟨2, pow_two 2⟩, one_mul]\n[GOAL]\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nhg : gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\nh : ↑8 ^ (Fintype.card F / 2) = ↑χ ↑(Fintype.card F)\n⊢ 8 = 2 ^ 2 * 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.intro.convert_2\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nhg : gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\nh : ↑8 ^ (Fintype.card F / 2) = ↑χ ↑(Fintype.card F)\n⊢ 8 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\napply (algebraMap F FF).injective\n[GOAL]\ncase intro.intro.convert_2.a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nhg : gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\nh : ↑8 ^ (Fintype.card F / 2) = ↑χ ↑(Fintype.card F)\n⊢ ↑(algebraMap F FF) (8 ^ (Fintype.card F / 2)) = ↑(algebraMap F FF) ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nsimp only [map_pow, map_ofNat, map_intCast]\n[GOAL]\ncase intro.intro.convert_2.a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nhg : gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\nh : ↑8 ^ (Fintype.card F / 2) = ↑χ ↑(Fintype.card F)\n⊢ 8 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nsimp only [Nat.cast_ofNat, ringHomComp_apply, eq_intCast] at h \n[GOAL]\ncase intro.intro.convert_2.a\nF : Type u_1\ninst✝¹ : Fintype F\ninst✝ : Field F\nhF : ringChar F ≠ 2\nhp2 : ∀ (n : ℕ), 2 ^ n ≠ 0\nn : ℕ+\nhp : Nat.Prime (ringChar F)\nhc : Fintype.card F = ringChar F ^ ↑n\nFF : Type u_1 := CyclotomicField 8 F\nthis✝² : Polynomial.IsSplittingField F FF (Polynomial.cyclotomic 8 F)\nthis✝¹ : FiniteDimensional F FF\nthis✝ : Fintype FF\nhchar : ringChar F = ringChar FF\nFFp : Nat.Prime (ringChar FF)\nthis : Fact (Nat.Prime (ringChar FF))\nhFF : ringChar FF ≠ 2\nhu : IsUnit ↑(ringChar FF)\nψ₈ : PrimitiveAddChar (ZMod 8) F := primitiveZModChar 8 F (_ : ↑↑8 ≠ 0)\nψ₈char : AddChar (ZMod 8) FF := PrimitiveAddChar.char ψ₈\nτ : FF := ↑ψ₈char 1\nτ_spec : τ ^ 4 = -1\nχ : MulChar (ZMod 8) FF := ringHomComp χ₈ (Int.castRingHom FF)\nhχ : ↑χ (-1) = 1\nhq : IsQuadratic χ\nhg : gaussSum χ ψ₈char ^ 2 = ↑χ (-1) * ↑(Fintype.card (ZMod 8))\nh : 8 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n⊢ 8 ^ (Fintype.card F / 2) = ↑(↑χ₈ ↑(Fintype.card F))\n[PROOFSTEP]\nexact h\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.LegendreSymbol.GaussSum", "llama_tokens": 73854, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.743167997235783, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.39477780612304975}}
{"text": "[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ _root_.Equivalence fun a b => ∃ Z z fst snd, fst ≫ π a.fst = snd ≫ π b.fst ∧ ↑fst z = a.snd ∧ ↑snd z = b.snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase refl\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ ∀ (x : ↑(finiteCoproduct X).toTop), ∃ Z z fst snd, fst ≫ π x.fst = snd ≫ π x.fst ∧ ↑fst z = x.snd ∧ ↑snd z = x.snd\n[PROOFSTEP]\nrintro ⟨a, x⟩\n[GOAL]\ncase refl.mk\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑(X a).toTop\n⊢ ∃ Z z fst snd,\n    fst ≫ π { fst := a, snd := x }.fst = snd ≫ π { fst := a, snd := x }.fst ∧\n      ↑fst z = { fst := a, snd := x }.snd ∧ ↑snd z = { fst := a, snd := x }.snd\n[PROOFSTEP]\nrefine ⟨X a, x, 𝟙 _, 𝟙 _, by simp, rfl, rfl⟩\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑(X a).toTop\n⊢ 𝟙 (X a) ≫ π { fst := a, snd := x }.fst = 𝟙 (X a) ≫ π { fst := a, snd := x }.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase symm\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ ∀ {x y : ↑(finiteCoproduct X).toTop},\n    (∃ Z z fst snd, fst ≫ π x.fst = snd ≫ π y.fst ∧ ↑fst z = x.snd ∧ ↑snd z = y.snd) →\n      ∃ Z z fst snd, fst ≫ π y.fst = snd ≫ π x.fst ∧ ↑fst z = y.snd ∧ ↑snd z = x.snd\n[PROOFSTEP]\nrintro ⟨a, x⟩ ⟨b, y⟩ ⟨Z, z, fst, snd, w, h1, h2⟩\n[GOAL]\ncase symm.mk.mk.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑(X a).toTop\nb : α\ny : ↑(X b).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfst : Z ⟶ X { fst := a, snd := x }.fst\nsnd : Z ⟶ X { fst := b, snd := y }.fst\nw : fst ≫ π { fst := a, snd := x }.fst = snd ≫ π { fst := b, snd := y }.fst\nh1 : ↑fst z = { fst := a, snd := x }.snd\nh2 : ↑snd z = { fst := b, snd := y }.snd\n⊢ ∃ Z z fst snd,\n    fst ≫ π { fst := b, snd := y }.fst = snd ≫ π { fst := a, snd := x }.fst ∧\n      ↑fst z = { fst := b, snd := y }.snd ∧ ↑snd z = { fst := a, snd := x }.snd\n[PROOFSTEP]\nexact ⟨Z, z, snd, fst, w.symm, h2, h1⟩\n[GOAL]\ncase trans\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ ∀ {x y z : ↑(finiteCoproduct X).toTop},\n    (∃ Z z fst snd, fst ≫ π x.fst = snd ≫ π y.fst ∧ ↑fst z = x.snd ∧ ↑snd z = y.snd) →\n      (∃ Z z_1 fst snd, fst ≫ π y.fst = snd ≫ π z.fst ∧ ↑fst z_1 = y.snd ∧ ↑snd z_1 = z.snd) →\n        ∃ Z z_1 fst snd, fst ≫ π x.fst = snd ≫ π z.fst ∧ ↑fst z_1 = x.snd ∧ ↑snd z_1 = z.snd\n[PROOFSTEP]\nrintro ⟨a, x⟩ ⟨b, y⟩ ⟨z, c⟩ ⟨Z, z, fstZ, sndZ, hZ, hZ1, hZ2⟩ ⟨W, w, fstW, sndW, hW, hW1, hW2⟩\n[GOAL]\ncase trans.mk.mk.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑(X a).toTop\nb : α\ny : ↑(X b).toTop\nz✝ : α\nc : ↑(X z✝).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfstZ : Z ⟶ X { fst := a, snd := x }.fst\nsndZ : Z ⟶ X { fst := b, snd := y }.fst\nhZ : fstZ ≫ π { fst := a, snd := x }.fst = sndZ ≫ π { fst := b, snd := y }.fst\nhZ1 : ↑fstZ z = { fst := a, snd := x }.snd\nhZ2 : ↑sndZ z = { fst := b, snd := y }.snd\nW : CompHaus\nw : ↑W.toTop\nfstW : W ⟶ X { fst := b, snd := y }.fst\nsndW : W ⟶ X { fst := z✝, snd := c }.fst\nhW : fstW ≫ π { fst := b, snd := y }.fst = sndW ≫ π { fst := z✝, snd := c }.fst\nhW1 : ↑fstW w = { fst := b, snd := y }.snd\nhW2 : ↑sndW w = { fst := z✝, snd := c }.snd\n⊢ ∃ Z z fst snd,\n    fst ≫ π { fst := a, snd := x }.fst = snd ≫ π { fst := z✝, snd := c }.fst ∧\n      ↑fst z = { fst := a, snd := x }.snd ∧ ↑snd z = { fst := z✝, snd := c }.snd\n[PROOFSTEP]\nrefine\n  ⟨pullback sndZ fstW, ⟨⟨z, w⟩, by dsimp; rw [hZ2, hW1]⟩, pullback.fst _ _ ≫ fstZ, pullback.snd _ _ ≫ sndW, ?_, hZ1,\n    hW2⟩\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑(X a).toTop\nb : α\ny : ↑(X b).toTop\nz✝ : α\nc : ↑(X z✝).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfstZ : Z ⟶ X { fst := a, snd := x }.fst\nsndZ : Z ⟶ X { fst := b, snd := y }.fst\nhZ : fstZ ≫ π { fst := a, snd := x }.fst = sndZ ≫ π { fst := b, snd := y }.fst\nhZ1 : ↑fstZ z = { fst := a, snd := x }.snd\nhZ2 : ↑sndZ z = { fst := b, snd := y }.snd\nW : CompHaus\nw : ↑W.toTop\nfstW : W ⟶ X { fst := b, snd := y }.fst\nsndW : W ⟶ X { fst := z✝, snd := c }.fst\nhW : fstW ≫ π { fst := b, snd := y }.fst = sndW ≫ π { fst := z✝, snd := c }.fst\nhW1 : ↑fstW w = { fst := b, snd := y }.snd\nhW2 : ↑sndW w = { fst := z✝, snd := c }.snd\n⊢ (z, w) ∈ {xy | ↑sndZ xy.fst = ↑fstW xy.snd}\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑(X a).toTop\nb : α\ny : ↑(X b).toTop\nz✝ : α\nc : ↑(X z✝).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfstZ : Z ⟶ X { fst := a, snd := x }.fst\nsndZ : Z ⟶ X { fst := b, snd := y }.fst\nhZ : fstZ ≫ π { fst := a, snd := x }.fst = sndZ ≫ π { fst := b, snd := y }.fst\nhZ1 : ↑fstZ z = { fst := a, snd := x }.snd\nhZ2 : ↑sndZ z = { fst := b, snd := y }.snd\nW : CompHaus\nw : ↑W.toTop\nfstW : W ⟶ X { fst := b, snd := y }.fst\nsndW : W ⟶ X { fst := z✝, snd := c }.fst\nhW : fstW ≫ π { fst := b, snd := y }.fst = sndW ≫ π { fst := z✝, snd := c }.fst\nhW1 : ↑fstW w = { fst := b, snd := y }.snd\nhW2 : ↑sndW w = { fst := z✝, snd := c }.snd\n⊢ ↑sndZ z = ↑fstW w\n[PROOFSTEP]\nrw [hZ2, hW1]\n[GOAL]\ncase trans.mk.mk.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑(X a).toTop\nb : α\ny : ↑(X b).toTop\nz✝ : α\nc : ↑(X z✝).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfstZ : Z ⟶ X { fst := a, snd := x }.fst\nsndZ : Z ⟶ X { fst := b, snd := y }.fst\nhZ : fstZ ≫ π { fst := a, snd := x }.fst = sndZ ≫ π { fst := b, snd := y }.fst\nhZ1 : ↑fstZ z = { fst := a, snd := x }.snd\nhZ2 : ↑sndZ z = { fst := b, snd := y }.snd\nW : CompHaus\nw : ↑W.toTop\nfstW : W ⟶ X { fst := b, snd := y }.fst\nsndW : W ⟶ X { fst := z✝, snd := c }.fst\nhW : fstW ≫ π { fst := b, snd := y }.fst = sndW ≫ π { fst := z✝, snd := c }.fst\nhW1 : ↑fstW w = { fst := b, snd := y }.snd\nhW2 : ↑sndW w = { fst := z✝, snd := c }.snd\n⊢ (pullback.fst sndZ fstW ≫ fstZ) ≫ π { fst := a, snd := x }.fst =\n    (pullback.snd sndZ fstW ≫ sndW) ≫ π { fst := z✝, snd := c }.fst\n[PROOFSTEP]\ndsimp at *\n[GOAL]\ncase trans.mk.mk.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑(X a).toTop\nb : α\ny : ↑(X b).toTop\nz✝ : α\nc : ↑(X z✝).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfstZ : Z ⟶ X { fst := a, snd := x }.fst\nsndZ : Z ⟶ X { fst := b, snd := y }.fst\nhZ : fstZ ≫ π a = sndZ ≫ π b\nhZ1 : ↑fstZ z = x\nhZ2 : ↑sndZ z = y\nW : CompHaus\nw : ↑W.toTop\nfstW : W ⟶ X { fst := b, snd := y }.fst\nsndW : W ⟶ X { fst := z✝, snd := c }.fst\nhW : fstW ≫ π b = sndW ≫ π z✝\nhW1 : ↑fstW w = y\nhW2 : ↑sndW w = c\n⊢ (pullback.fst sndZ fstW ≫ fstZ) ≫ π a = (pullback.snd sndZ fstW ≫ sndW) ≫ π z✝\n[PROOFSTEP]\nsimp only [Category.assoc, hZ, ← hW]\n[GOAL]\ncase trans.mk.mk.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑(X a).toTop\nb : α\ny : ↑(X b).toTop\nz✝ : α\nc : ↑(X z✝).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfstZ : Z ⟶ X { fst := a, snd := x }.fst\nsndZ : Z ⟶ X { fst := b, snd := y }.fst\nhZ : fstZ ≫ π a = sndZ ≫ π b\nhZ1 : ↑fstZ z = x\nhZ2 : ↑sndZ z = y\nW : CompHaus\nw : ↑W.toTop\nfstW : W ⟶ X { fst := b, snd := y }.fst\nsndW : W ⟶ X { fst := z✝, snd := c }.fst\nhW : fstW ≫ π b = sndW ≫ π z✝\nhW1 : ↑fstW w = y\nhW2 : ↑sndW w = c\n⊢ pullback.fst sndZ fstW ≫ sndZ ≫ π b = pullback.snd sndZ fstW ≫ fstW ≫ π b\n[PROOFSTEP]\napply ContinuousMap.ext\n[GOAL]\ncase trans.mk.mk.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.h\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑(X a).toTop\nb : α\ny : ↑(X b).toTop\nz✝ : α\nc : ↑(X z✝).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfstZ : Z ⟶ X { fst := a, snd := x }.fst\nsndZ : Z ⟶ X { fst := b, snd := y }.fst\nhZ : fstZ ≫ π a = sndZ ≫ π b\nhZ1 : ↑fstZ z = x\nhZ2 : ↑sndZ z = y\nW : CompHaus\nw : ↑W.toTop\nfstW : W ⟶ X { fst := b, snd := y }.fst\nsndW : W ⟶ X { fst := z✝, snd := c }.fst\nhW : fstW ≫ π b = sndW ≫ π z✝\nhW1 : ↑fstW w = y\nhW2 : ↑sndW w = c\n⊢ ∀ (a : ↑(pullback sndZ fstW).toTop),\n    ↑(pullback.fst sndZ fstW ≫ sndZ ≫ π b) a = ↑(pullback.snd sndZ fstW ≫ fstW ≫ π b) a\n[PROOFSTEP]\nrintro ⟨⟨u, v⟩, h⟩\n[GOAL]\ncase trans.mk.mk.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.h.mk.mk\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑(X a).toTop\nb : α\ny : ↑(X b).toTop\nz✝ : α\nc : ↑(X z✝).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfstZ : Z ⟶ X { fst := a, snd := x }.fst\nsndZ : Z ⟶ X { fst := b, snd := y }.fst\nhZ : fstZ ≫ π a = sndZ ≫ π b\nhZ1 : ↑fstZ z = x\nhZ2 : ↑sndZ z = y\nW : CompHaus\nw : ↑W.toTop\nfstW : W ⟶ X { fst := b, snd := y }.fst\nsndW : W ⟶ X { fst := z✝, snd := c }.fst\nhW : fstW ≫ π b = sndW ≫ π z✝\nhW1 : ↑fstW w = y\nhW2 : ↑sndW w = c\nu : ↑Z.toTop\nv : ↑W.toTop\nh : (u, v) ∈ {xy | ↑sndZ xy.fst = ↑fstW xy.snd}\n⊢ ↑(pullback.fst sndZ fstW ≫ sndZ ≫ π b) { val := (u, v), property := h } =\n    ↑(pullback.snd sndZ fstW ≫ fstW ≫ π b) { val := (u, v), property := h }\n[PROOFSTEP]\nchange π b (sndZ u) = π b (fstW v)\n[GOAL]\ncase trans.mk.mk.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.h.mk.mk\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑(X a).toTop\nb : α\ny : ↑(X b).toTop\nz✝ : α\nc : ↑(X z✝).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfstZ : Z ⟶ X { fst := a, snd := x }.fst\nsndZ : Z ⟶ X { fst := b, snd := y }.fst\nhZ : fstZ ≫ π a = sndZ ≫ π b\nhZ1 : ↑fstZ z = x\nhZ2 : ↑sndZ z = y\nW : CompHaus\nw : ↑W.toTop\nfstW : W ⟶ X { fst := b, snd := y }.fst\nsndW : W ⟶ X { fst := z✝, snd := c }.fst\nhW : fstW ≫ π b = sndW ≫ π z✝\nhW1 : ↑fstW w = y\nhW2 : ↑sndW w = c\nu : ↑Z.toTop\nv : ↑W.toTop\nh : (u, v) ∈ {xy | ↑sndZ xy.fst = ↑fstW xy.snd}\n⊢ ↑(π b) (↑sndZ u) = ↑(π b) (↑fstW v)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ ∀ (a b : ↑(finiteCoproduct fun a => X a).toTop),\n    a ≈ b →\n      (fun x =>\n            match x with\n            | { fst := a, snd := x } => ↑(π a) x)\n          a =\n        (fun x =>\n            match x with\n            | { fst := a, snd := x } => ↑(π a) x)\n          b\n[PROOFSTEP]\nrintro ⟨a, x⟩ ⟨b, y⟩ ⟨Z, z, fst, snd, h, hx, hy⟩\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑((fun a => X a) a).toTop\nb : α\ny : ↑((fun a => X a) b).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfst : Z ⟶ (fun a => X a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => X a) { fst := b, snd := y }.fst\nh : fst ≫ π { fst := a, snd := x }.fst = snd ≫ π { fst := b, snd := y }.fst\nhx : ↑fst z = { fst := a, snd := x }.snd\nhy : ↑snd z = { fst := b, snd := y }.snd\n⊢ (fun x =>\n        match x with\n        | { fst := a, snd := x } => ↑(π a) x)\n      { fst := a, snd := x } =\n    (fun x =>\n        match x with\n        | { fst := a, snd := x } => ↑(π a) x)\n      { fst := b, snd := y }\n[PROOFSTEP]\ndsimp at *\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑((fun a => X a) a).toTop\nb : α\ny : ↑((fun a => X a) b).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfst : Z ⟶ (fun a => X a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => X a) { fst := b, snd := y }.fst\nh : fst ≫ π a = snd ≫ π b\nhx : ↑fst z = x\nhy : ↑snd z = y\n⊢ ↑(π a) x = ↑(π b) y\n[PROOFSTEP]\nrw [← hx, ← hy]\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑((fun a => X a) a).toTop\nb : α\ny : ↑((fun a => X a) b).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfst : Z ⟶ (fun a => X a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => X a) { fst := b, snd := y }.fst\nh : fst ≫ π a = snd ≫ π b\nhx : ↑fst z = x\nhy : ↑snd z = y\n⊢ ↑(π a) (↑fst z) = ↑(π b) (↑snd z)\n[PROOFSTEP]\napply_fun (fun t => t z) at h \n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx : ↑((fun a => X a) a).toTop\nb : α\ny : ↑((fun a => X a) b).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfst : Z ⟶ (fun a => X a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => X a) { fst := b, snd := y }.fst\nhx : ↑fst z = x\nhy : ↑snd z = y\nh : ↑(fst ≫ π a) z = ↑(snd ≫ π b) z\n⊢ ↑(π a) (↑fst z) = ↑(π b) (↑snd z)\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ Continuous (ιFun π)\n[PROOFSTEP]\napply Continuous.quotient_lift\n[GOAL]\ncase h\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ Continuous fun x =>\n    match x with\n    | { fst := a, snd := x } => ↑(π a) x\n[PROOFSTEP]\napply continuous_sigma\n[GOAL]\ncase h.hf\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ ∀ (i : α),\n    Continuous fun a =>\n      match { fst := i, snd := a } with\n      | { fst := a, snd := x } => ↑(π a) x\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h.hf\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\n⊢ Continuous fun a_1 =>\n    match { fst := a, snd := a_1 } with\n    | { fst := a, snd := x } => ↑(π a) x\n[PROOFSTEP]\nexact (π a).continuous\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ Function.Injective (ιFun π)\n[PROOFSTEP]\nrintro ⟨⟨a, x⟩⟩ ⟨⟨b, y⟩⟩ (h : π _ _ = π _ _)\n[GOAL]\ncase mk.mk.mk.mk\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na₁✝ : Quotient (relation π)\na : α\nx : ↑((fun a => X a) a).toTop\na₂✝ : Quotient (relation π)\nb : α\ny : ↑((fun a => X a) b).toTop\nh : ↑(π a) x = ↑(π b) y\n⊢ Quot.mk Setoid.r { fst := a, snd := x } = Quot.mk Setoid.r { fst := b, snd := y }\n[PROOFSTEP]\napply Quotient.sound'\n[GOAL]\ncase mk.mk.mk.mk.a\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na₁✝ : Quotient (relation π)\na : α\nx : ↑((fun a => X a) a).toTop\na₂✝ : Quotient (relation π)\nb : α\ny : ↑((fun a => X a) b).toTop\nh : ↑(π a) x = ↑(π b) y\n⊢ Setoid.r { fst := a, snd := x } { fst := b, snd := y }\n[PROOFSTEP]\nrefine ⟨pullback (π a) (π b), ⟨⟨x, y⟩, h⟩, pullback.fst _ _, pullback.snd _ _, ?_, rfl, rfl⟩\n[GOAL]\ncase mk.mk.mk.mk.a\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na₁✝ : Quotient (relation π)\na : α\nx : ↑((fun a => X a) a).toTop\na₂✝ : Quotient (relation π)\nb : α\ny : ↑((fun a => X a) b).toTop\nh : ↑(π a) x = ↑(π b) y\n⊢ pullback.fst (π a) (π b) ≫ π { fst := a, snd := x }.fst = pullback.snd (π a) (π b) ≫ π { fst := b, snd := y }.fst\n[PROOFSTEP]\next ⟨_, h⟩\n[GOAL]\ncase mk.mk.mk.mk.a.w.mk\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na₁✝ : Quotient (relation π)\na : α\nx : ↑((fun a => X a) a).toTop\na₂✝ : Quotient (relation π)\nb : α\ny : ↑((fun a => X a) b).toTop\nh✝ : ↑(π a) x = ↑(π b) y\nval✝ : ↑(X a).toTop × ↑(X b).toTop\nh : val✝ ∈ {xy | ↑(π a) xy.fst = ↑(π b) xy.snd}\n⊢ ↑(pullback.fst (π a) (π b) ≫ π { fst := a, snd := x }.fst) { val := val✝, property := h } =\n    ↑(pullback.snd (π a) (π b) ≫ π { fst := b, snd := y }.fst) { val := val✝, property := h }\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ IsIso (ιHom π)\n[PROOFSTEP]\napply isIso_of_bijective\n[GOAL]\ncase bij\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ Function.Bijective ↑(ιHom π)\n[PROOFSTEP]\nrefine ⟨ιFun_injective _, ?_⟩\n[GOAL]\ncase bij\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ Function.Surjective ↑(ιHom π)\n[PROOFSTEP]\nintro b\n[GOAL]\ncase bij\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nb : (forget CompHaus).obj B\n⊢ ∃ a, ↑(ιHom π) a = b\n[PROOFSTEP]\nobtain ⟨a, x, h⟩ := surj b\n[GOAL]\ncase bij.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nb : (forget CompHaus).obj B\na : α\nx : ↑(X a).toTop\nh : ↑(π a) x = b\n⊢ ∃ a, ↑(ιHom π) a = b\n[PROOFSTEP]\nrefine ⟨Quotient.mk _ ⟨a, x⟩, h⟩\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\n⊢ Continuous fun x => Quotient.mk (relation π) { fst := a, snd := x }\n[PROOFSTEP]\napply Continuous.comp\n[GOAL]\ncase hg\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\n⊢ Continuous (Quot.mk Setoid.r)\ncase hf\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\n⊢ Continuous fun x => { fst := a, snd := x }\n[PROOFSTEP]\napply continuous_quot_mk\n[GOAL]\ncase hf\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\n⊢ Continuous fun x => { fst := a, snd := x }\n[PROOFSTEP]\napply continuous_sigmaMk (σ := fun a => X a)\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\n⊢ ∀ (a b : ↑(finiteCoproduct fun a => (fun a => X a) a).toTop),\n    a ≈ b →\n      (fun x =>\n            match x with\n            | { fst := a, snd := x } => ↑(e a) x)\n          a =\n        (fun x =>\n            match x with\n            | { fst := a, snd := x } => ↑(e a) x)\n          b\n[PROOFSTEP]\nrintro ⟨a, x⟩ ⟨b, y⟩ ⟨Z, z, fst, snd, hh, hx, hy⟩\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nx : ↑((fun a => (fun a => X a) a) a).toTop\nb : α\ny : ↑((fun a => (fun a => X a) a) b).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfst : Z ⟶ (fun a => (fun a => X a) a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => (fun a => X a) a) { fst := b, snd := y }.fst\nhh : fst ≫ π { fst := a, snd := x }.fst = snd ≫ π { fst := b, snd := y }.fst\nhx : ↑fst z = { fst := a, snd := x }.snd\nhy : ↑snd z = { fst := b, snd := y }.snd\n⊢ (fun x =>\n        match x with\n        | { fst := a, snd := x } => ↑(e a) x)\n      { fst := a, snd := x } =\n    (fun x =>\n        match x with\n        | { fst := a, snd := x } => ↑(e a) x)\n      { fst := b, snd := y }\n[PROOFSTEP]\ndsimp at *\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nx : ↑((fun a => (fun a => X a) a) a).toTop\nb : α\ny : ↑((fun a => (fun a => X a) a) b).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfst : Z ⟶ (fun a => (fun a => X a) a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => (fun a => X a) a) { fst := b, snd := y }.fst\nhh : fst ≫ π a = snd ≫ π b\nhx : ↑fst z = x\nhy : ↑snd z = y\n⊢ ↑(e a) x = ↑(e b) y\n[PROOFSTEP]\nrw [← hx, ← hy]\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nx : ↑((fun a => (fun a => X a) a) a).toTop\nb : α\ny : ↑((fun a => (fun a => X a) a) b).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfst : Z ⟶ (fun a => (fun a => X a) a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => (fun a => X a) a) { fst := b, snd := y }.fst\nhh : fst ≫ π a = snd ≫ π b\nhx : ↑fst z = x\nhy : ↑snd z = y\n⊢ ↑(e a) (↑fst z) = ↑(e b) (↑snd z)\n[PROOFSTEP]\nspecialize h _ _ fst snd ?_\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nx : ↑((fun a => (fun a => X a) a) a).toTop\nb : α\ny : ↑((fun a => (fun a => X a) a) b).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfst : Z ⟶ (fun a => (fun a => X a) a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => (fun a => X a) a) { fst := b, snd := y }.fst\nhh : fst ≫ π a = snd ≫ π b\nhx : ↑fst z = x\nhy : ↑snd z = y\n⊢ fst ≫ π' π { fst := a, snd := x }.fst = snd ≫ π' π { fst := b, snd := y }.fst\n[PROOFSTEP]\next z\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro.w\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nx : ↑((fun a => (fun a => X a) a) a).toTop\nb : α\ny : ↑((fun a => (fun a => X a) a) b).toTop\nZ : CompHaus\nz✝ : ↑Z.toTop\nfst : Z ⟶ (fun a => (fun a => X a) a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => (fun a => X a) a) { fst := b, snd := y }.fst\nhh : fst ≫ π a = snd ≫ π b\nhx : ↑fst z✝ = x\nhy : ↑snd z✝ = y\nz : (forget CompHaus).obj Z\n⊢ ↑(fst ≫ π' π { fst := a, snd := x }.fst) z = ↑(snd ≫ π' π { fst := b, snd := y }.fst) z\n[PROOFSTEP]\napply ιFun_injective\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro.w.a\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nx : ↑((fun a => (fun a => X a) a) a).toTop\nb : α\ny : ↑((fun a => (fun a => X a) a) b).toTop\nZ : CompHaus\nz✝ : ↑Z.toTop\nfst : Z ⟶ (fun a => (fun a => X a) a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => (fun a => X a) a) { fst := b, snd := y }.fst\nhh : fst ≫ π a = snd ≫ π b\nhx : ↑fst z✝ = x\nhy : ↑snd z✝ = y\nz : (forget CompHaus).obj Z\n⊢ ιFun π (↑(fst ≫ π' π { fst := a, snd := x }.fst) z) = ιFun π (↑(snd ≫ π' π { fst := b, snd := y }.fst) z)\n[PROOFSTEP]\napply_fun (fun q => q z) at hh \n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro.w.a\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nx : ↑((fun a => (fun a => X a) a) a).toTop\nb : α\ny : ↑((fun a => (fun a => X a) a) b).toTop\nZ : CompHaus\nz✝ : ↑Z.toTop\nfst : Z ⟶ (fun a => (fun a => X a) a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => (fun a => X a) a) { fst := b, snd := y }.fst\nhx : ↑fst z✝ = x\nhy : ↑snd z✝ = y\nz : (forget CompHaus).obj Z\nhh : ↑(fst ≫ π a) z = ↑(snd ≫ π b) z\n⊢ ιFun π (↑(fst ≫ π' π { fst := a, snd := x }.fst) z) = ιFun π (↑(snd ≫ π' π { fst := b, snd := y }.fst) z)\n[PROOFSTEP]\nexact hh\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\na : α\nx : ↑((fun a => (fun a => X a) a) a).toTop\nb : α\ny : ↑((fun a => (fun a => X a) a) b).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfst : Z ⟶ (fun a => (fun a => X a) a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => (fun a => X a) a) { fst := b, snd := y }.fst\nhh : fst ≫ π a = snd ≫ π b\nhx : ↑fst z = x\nhy : ↑snd z = y\nh : fst ≫ e { fst := a, snd := x }.fst = snd ≫ e { fst := b, snd := y }.fst\n⊢ ↑(e a) (↑fst z) = ↑(e b) (↑snd z)\n[PROOFSTEP]\napply_fun (fun q => q z) at h \n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\na : α\nx : ↑((fun a => (fun a => X a) a) a).toTop\nb : α\ny : ↑((fun a => (fun a => X a) a) b).toTop\nZ : CompHaus\nz : ↑Z.toTop\nfst : Z ⟶ (fun a => (fun a => X a) a) { fst := a, snd := x }.fst\nsnd : Z ⟶ (fun a => (fun a => X a) a) { fst := b, snd := y }.fst\nhh : fst ≫ π a = snd ≫ π b\nhx : ↑fst z = x\nhy : ↑snd z = y\nh : ↑(fst ≫ e { fst := a, snd := x }.fst) z = ↑(snd ≫ e { fst := b, snd := y }.fst) z\n⊢ ↑(e a) (↑fst z) = ↑(e b) (↑snd z)\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\n⊢ Continuous\n    (Quotient.lift\n      (fun x =>\n        match x with\n        | { fst := a, snd := x } => ↑(e a) x)\n      (_ :\n        ∀ (a b : ↑(finiteCoproduct fun a => (fun a => X a) a).toTop),\n          a ≈ b →\n            (fun x =>\n                  match x with\n                  | { fst := a, snd := x } => ↑(e a) x)\n                a =\n              (fun x =>\n                  match x with\n                  | { fst := a, snd := x } => ↑(e a) x)\n                b))\n[PROOFSTEP]\napply Continuous.quotient_lift\n[GOAL]\ncase h\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\n⊢ Continuous fun x =>\n    match x with\n    | { fst := a, snd := x } => ↑(e a) x\n[PROOFSTEP]\napply continuous_sigma\n[GOAL]\ncase h.hf\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\n⊢ ∀ (i : α),\n    Continuous fun a =>\n      match { fst := i, snd := a } with\n      | { fst := a, snd := x } => ↑(e a) x\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h.hf\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n⊢ Continuous fun a_1 =>\n    match { fst := a, snd := a_1 } with\n    | { fst := a, snd := x } => ↑(e a) x\n[PROOFSTEP]\nexact (e a).continuous\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ ∀ {W : CompHaus} (e : (a : α) → X a ⟶ W)\n    (h :\n      ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n    (a : α),\n    π' π a ≫\n        (fun {W} e h =>\n            ContinuousMap.mk\n              (Quotient.lift\n                (fun x =>\n                  match x with\n                  | { fst := a, snd := x } => ↑(e a) x)\n                (_ :\n                  ∀ (a b : ↑(finiteCoproduct fun a => (fun a => X a) a).toTop),\n                    a ≈ b →\n                      (fun x =>\n                            match x with\n                            | { fst := a, snd := x } => ↑(e a) x)\n                          a =\n                        (fun x =>\n                            match x with\n                            | { fst := a, snd := x } => ↑(e a) x)\n                          b)))\n          e\n          (_ :\n            ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n              g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) =\n      e a\n[PROOFSTEP]\nintro Z e h a\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nZ : CompHaus\ne : (a : α) → X a ⟶ Z\nh :\n  ∀ {Z_1 : CompHaus} (a₁ a₂ : α) (g₁ : Z_1 ⟶ X a₁) (g₂ : Z_1 ⟶ X a₂),\n    g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n⊢ π' π a ≫\n      (fun {W} e h =>\n          ContinuousMap.mk\n            (Quotient.lift\n              (fun x =>\n                match x with\n                | { fst := a, snd := x } => ↑(e a) x)\n              (_ :\n                ∀ (a b : ↑(finiteCoproduct fun a => (fun a => X a) a).toTop),\n                  a ≈ b →\n                    (fun x =>\n                          match x with\n                          | { fst := a, snd := x } => ↑(e a) x)\n                        a =\n                      (fun x =>\n                          match x with\n                          | { fst := a, snd := x } => ↑(e a) x)\n                        b)))\n        e\n        (_ :\n          ∀ {Z_1 : CompHaus} (a₁ a₂ : α) (g₁ : Z_1 ⟶ X a₁) (g₂ : Z_1 ⟶ X a₂),\n            g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) =\n    e a\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nZ : CompHaus\ne : (a : α) → X a ⟶ Z\nh :\n  ∀ {Z_1 : CompHaus} (a₁ a₂ : α) (g₁ : Z_1 ⟶ X a₁) (g₂ : Z_1 ⟶ X a₂),\n    g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nx✝ : (forget CompHaus).obj (X a)\n⊢ ↑(π' π a ≫\n          (fun {W} e h =>\n              ContinuousMap.mk\n                (Quotient.lift\n                  (fun x =>\n                    match x with\n                    | { fst := a, snd := x } => ↑(e a) x)\n                  (_ :\n                    ∀ (a b : ↑(finiteCoproduct fun a => (fun a => X a) a).toTop),\n                      a ≈ b →\n                        (fun x =>\n                              match x with\n                              | { fst := a, snd := x } => ↑(e a) x)\n                            a =\n                          (fun x =>\n                              match x with\n                              | { fst := a, snd := x } => ↑(e a) x)\n                            b)))\n            e\n            (_ :\n              ∀ {Z_1 : CompHaus} (a₁ a₂ : α) (g₁ : Z_1 ⟶ X a₁) (g₂ : Z_1 ⟶ X a₂),\n                g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂))\n      x✝ =\n    ↑(e a) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ ∀ {W : CompHaus} (e : (a : α) → X a ⟶ W)\n    (h :\n      ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n    (m : QB π ⟶ W),\n    (∀ (a : α), π' π a ≫ m = e a) →\n      m =\n        (fun {W} e h =>\n            ContinuousMap.mk\n              (Quotient.lift\n                (fun x =>\n                  match x with\n                  | { fst := a, snd := x } => ↑(e a) x)\n                (_ :\n                  ∀ (a b : ↑(finiteCoproduct fun a => (fun a => X a) a).toTop),\n                    a ≈ b →\n                      (fun x =>\n                            match x with\n                            | { fst := a, snd := x } => ↑(e a) x)\n                          a =\n                        (fun x =>\n                            match x with\n                            | { fst := a, snd := x } => ↑(e a) x)\n                          b)))\n          e\n          (_ :\n            ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n              g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n[PROOFSTEP]\nintro Z e h m hm\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nZ : CompHaus\ne : (a : α) → X a ⟶ Z\nh :\n  ∀ {Z_1 : CompHaus} (a₁ a₂ : α) (g₁ : Z_1 ⟶ X a₁) (g₂ : Z_1 ⟶ X a₂),\n    g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : QB π ⟶ Z\nhm : ∀ (a : α), π' π a ≫ m = e a\n⊢ m =\n    (fun {W} e h =>\n        ContinuousMap.mk\n          (Quotient.lift\n            (fun x =>\n              match x with\n              | { fst := a, snd := x } => ↑(e a) x)\n            (_ :\n              ∀ (a b : ↑(finiteCoproduct fun a => (fun a => X a) a).toTop),\n                a ≈ b →\n                  (fun x =>\n                        match x with\n                        | { fst := a, snd := x } => ↑(e a) x)\n                      a =\n                    (fun x =>\n                        match x with\n                        | { fst := a, snd := x } => ↑(e a) x)\n                      b)))\n      e\n      (_ :\n        ∀ {Z_1 : CompHaus} (a₁ a₂ : α) (g₁ : Z_1 ⟶ X a₁) (g₂ : Z_1 ⟶ X a₂),\n          g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n[PROOFSTEP]\next ⟨⟨a, x⟩⟩\n[GOAL]\ncase w.mk.mk\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nZ : CompHaus\ne : (a : α) → X a ⟶ Z\nh :\n  ∀ {Z_1 : CompHaus} (a₁ a₂ : α) (g₁ : Z_1 ⟶ X a₁) (g₂ : Z_1 ⟶ X a₂),\n    g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : QB π ⟶ Z\nhm : ∀ (a : α), π' π a ≫ m = e a\nx✝ : (forget CompHaus).obj (QB π)\na : α\nx : ↑((fun a => (fun a => X a) a) a).toTop\n⊢ ↑m (Quot.mk Setoid.r { fst := a, snd := x }) =\n    ↑((fun {W} e h =>\n            ContinuousMap.mk\n              (Quotient.lift\n                (fun x =>\n                  match x with\n                  | { fst := a, snd := x } => ↑(e a) x)\n                (_ :\n                  ∀ (a b : ↑(finiteCoproduct fun a => (fun a => X a) a).toTop),\n                    a ≈ b →\n                      (fun x =>\n                            match x with\n                            | { fst := a, snd := x } => ↑(e a) x)\n                          a =\n                        (fun x =>\n                            match x with\n                            | { fst := a, snd := x } => ↑(e a) x)\n                          b)))\n          e\n          (_ :\n            ∀ {Z_1 : CompHaus} (a₁ a₂ : α) (g₁ : Z_1 ⟶ X a₁) (g₂ : Z_1 ⟶ X a₂),\n              g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂))\n      (Quot.mk Setoid.r { fst := a, snd := x })\n[PROOFSTEP]\nspecialize hm a\n[GOAL]\ncase w.mk.mk\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nZ : CompHaus\ne : (a : α) → X a ⟶ Z\nh :\n  ∀ {Z_1 : CompHaus} (a₁ a₂ : α) (g₁ : Z_1 ⟶ X a₁) (g₂ : Z_1 ⟶ X a₂),\n    g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : QB π ⟶ Z\nx✝ : (forget CompHaus).obj (QB π)\na : α\nx : ↑((fun a => (fun a => X a) a) a).toTop\nhm : π' π a ≫ m = e a\n⊢ ↑m (Quot.mk Setoid.r { fst := a, snd := x }) =\n    ↑((fun {W} e h =>\n            ContinuousMap.mk\n              (Quotient.lift\n                (fun x =>\n                  match x with\n                  | { fst := a, snd := x } => ↑(e a) x)\n                (_ :\n                  ∀ (a b : ↑(finiteCoproduct fun a => (fun a => X a) a).toTop),\n                    a ≈ b →\n                      (fun x =>\n                            match x with\n                            | { fst := a, snd := x } => ↑(e a) x)\n                          a =\n                        (fun x =>\n                            match x with\n                            | { fst := a, snd := x } => ↑(e a) x)\n                          b)))\n          e\n          (_ :\n            ∀ {Z_1 : CompHaus} (a₁ a₂ : α) (g₁ : Z_1 ⟶ X a₁) (g₂ : Z_1 ⟶ X a₂),\n              g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂))\n      (Quot.mk Setoid.r { fst := a, snd := x })\n[PROOFSTEP]\napply_fun (fun q => q x) at hm \n[GOAL]\ncase w.mk.mk\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nZ : CompHaus\ne : (a : α) → X a ⟶ Z\nh :\n  ∀ {Z_1 : CompHaus} (a₁ a₂ : α) (g₁ : Z_1 ⟶ X a₁) (g₂ : Z_1 ⟶ X a₂),\n    g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : QB π ⟶ Z\nx✝ : (forget CompHaus).obj (QB π)\na : α\nx : ↑((fun a => (fun a => X a) a) a).toTop\nhm : ↑(π' π a ≫ m) x = ↑(e a) x\n⊢ ↑m (Quot.mk Setoid.r { fst := a, snd := x }) =\n    ↑((fun {W} e h =>\n            ContinuousMap.mk\n              (Quotient.lift\n                (fun x =>\n                  match x with\n                  | { fst := a, snd := x } => ↑(e a) x)\n                (_ :\n                  ∀ (a b : ↑(finiteCoproduct fun a => (fun a => X a) a).toTop),\n                    a ≈ b →\n                      (fun x =>\n                            match x with\n                            | { fst := a, snd := x } => ↑(e a) x)\n                          a =\n                        (fun x =>\n                            match x with\n                            | { fst := a, snd := x } => ↑(e a) x)\n                          b)))\n          e\n          (_ :\n            ∀ {Z_1 : CompHaus} (a₁ a₂ : α) (g₁ : Z_1 ⟶ X a₁) (g₂ : Z_1 ⟶ X a₂),\n              g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂))\n      (Quot.mk Setoid.r { fst := a, snd := x })\n[PROOFSTEP]\nexact hm\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\n⊢ π' π a ≫ (ι (fun a => π a) surj).hom = π a\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\nx✝ : (forget CompHaus).obj (X a)\n⊢ ↑(π' π a ≫ (ι (fun a => π a) surj).hom) x✝ = ↑(π a) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\n⊢ π a ≫ (ι (fun a => π a) surj).inv = π' π a\n[PROOFSTEP]\nrw [Iso.comp_inv_eq]\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\na : α\n⊢ π a = π' π a ≫ (ι (fun a => π a) surj).hom\n[PROOFSTEP]\nexact\n  π'_comp_ι_hom _ surj\n    _\n      -- TODO: Make a general construction for transferring such structs along isomorphisms.\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nZ : CompHaus\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nhh : g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂\n⊢ g₁ ≫ e a₁ = g₂ ≫ e a₂\n[PROOFSTEP]\napply h\n[GOAL]\ncase a\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nZ : CompHaus\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nhh : g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂\n⊢ g₁ ≫ π a₁ = g₂ ≫ π a₂\n[PROOFSTEP]\nrw [← cancel_mono (ι _ surj).inv]\n[GOAL]\ncase a\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nZ : CompHaus\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nhh : g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂\n⊢ (g₁ ≫ π a₁) ≫ (ι (fun a => π a) surj).inv = (g₂ ≫ π a₂) ≫ (ι (fun a => π a) surj).inv\n[PROOFSTEP]\nsimpa only [Category.assoc, π_comp_ι_inv]\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ ∀ {W : CompHaus} (e : (a : α) → X a ⟶ W)\n    (h : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n    (a : α),\n    π a ≫\n        (fun {W} e h =>\n            (ι π surj).inv ≫\n              EffectiveEpiFamilyStruct.desc (structAux π) e\n                (_ :\n                  ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n                    g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂))\n          e\n          (_ :\n            ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n              g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) =\n      e a\n[PROOFSTEP]\nintro W e h a\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n⊢ π a ≫\n      (fun {W} e h =>\n          (ι π surj).inv ≫\n            EffectiveEpiFamilyStruct.desc (structAux π) e\n              (_ :\n                ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n                  g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂))\n        e\n        (_ :\n          ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) =\n    e a\n[PROOFSTEP]\nsimp only [Eq.ndrec, id_eq, eq_mpr_eq_cast, π_comp_ι_inv_assoc, (structAux π).fac]\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ ∀ {W : CompHaus} (e : (a : α) → X a ⟶ W)\n    (h : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n    (m : B ⟶ W),\n    (∀ (a : α), π a ≫ m = e a) →\n      m =\n        (fun {W} e h =>\n            (ι π surj).inv ≫\n              EffectiveEpiFamilyStruct.desc (structAux π) e\n                (_ :\n                  ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n                    g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂))\n          e\n          (_ :\n            ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n[PROOFSTEP]\nintro W e h m hm\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : B ⟶ W\nhm : ∀ (a : α), π a ≫ m = e a\n⊢ m =\n    (fun {W} e h =>\n        (ι π surj).inv ≫\n          EffectiveEpiFamilyStruct.desc (structAux π) e\n            (_ :\n              ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n                g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂))\n      e\n      (_ : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : B ⟶ W\nhm : ∀ (a : α), π a ≫ m = e a\n⊢ m =\n    (ι π surj).inv ≫\n      EffectiveEpiFamilyStruct.desc (structAux π) e\n        (_ :\n          ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n            g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n[PROOFSTEP]\nrw [Iso.eq_inv_comp]\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : B ⟶ W\nhm : ∀ (a : α), π a ≫ m = e a\n⊢ (ι π surj).hom ≫ m =\n    EffectiveEpiFamilyStruct.desc (structAux π) e\n      (_ :\n        ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n          g₁ ≫ π' π a₁ = g₂ ≫ π' π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n[PROOFSTEP]\napply (structAux π).uniq\n[GOAL]\ncase a\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : B ⟶ W\nhm : ∀ (a : α), π a ≫ m = e a\n⊢ ∀ (a : α), π' π a ≫ (ι π surj).hom ≫ m = e a\n[PROOFSTEP]\nintro a\n[GOAL]\ncase a\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\nsurj : ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\nW : CompHaus\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : CompHaus} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : B ⟶ W\nhm : ∀ (a : α), π a ≫ m = e a\na : α\n⊢ π' π a ≫ (ι π surj).hom ≫ m = e a\n[PROOFSTEP]\nsimpa using hm a\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\n⊢ TFAE [EffectiveEpiFamily X π, Epi (Sigma.desc π), ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b]\n[PROOFSTEP]\ntfae_have 1 → 2\n[GOAL]\ncase tfae_1_to_2\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\n⊢ EffectiveEpiFamily X π → Epi (Sigma.desc π)\n[PROOFSTEP]\nintro\n[GOAL]\ncase tfae_1_to_2\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\n✝ : EffectiveEpiFamily X π\n⊢ Epi (Sigma.desc π)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\n⊢ TFAE [EffectiveEpiFamily X π, Epi (Sigma.desc π), ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b]\n[PROOFSTEP]\ntfae_have 2 → 3\n[GOAL]\ncase tfae_2_to_3\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\n⊢ Epi (Sigma.desc π) → ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n[PROOFSTEP]\nintro e\n[GOAL]\ncase tfae_2_to_3\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Epi (Sigma.desc π)\n⊢ ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n[PROOFSTEP]\nrw [epi_iff_surjective] at e \n[GOAL]\ncase tfae_2_to_3\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\n⊢ ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n[PROOFSTEP]\nlet i : ∐ X ≅ finiteCoproduct X := (colimit.isColimit _).coconePointUniqueUpToIso (finiteCoproduct.isColimit _)\n[GOAL]\ncase tfae_2_to_3\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\n⊢ ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n[PROOFSTEP]\nintro b\n[GOAL]\ncase tfae_2_to_3\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nb : ↑B.toTop\n⊢ ∃ a x, ↑(π a) x = b\n[PROOFSTEP]\nobtain ⟨t, rfl⟩ := e b\n[GOAL]\ncase tfae_2_to_3.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\n⊢ ∃ a x, ↑(π a) x = ↑(Sigma.desc π) t\n[PROOFSTEP]\nlet q := i.hom t\n[GOAL]\ncase tfae_2_to_3.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\n⊢ ∃ a x, ↑(π a) x = ↑(Sigma.desc π) t\n[PROOFSTEP]\nrefine ⟨q.1, q.2, ?_⟩\n[GOAL]\ncase tfae_2_to_3.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\n⊢ ↑(π q.fst) q.snd = ↑(Sigma.desc π) t\n[PROOFSTEP]\nhave : t = i.inv (i.hom t) := show t = (i.hom ≫ i.inv) t by simp only [i.hom_inv_id]; rfl\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\n⊢ t = ↑(i.hom ≫ i.inv) t\n[PROOFSTEP]\nsimp only [i.hom_inv_id]\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\n⊢ t = ↑(𝟙 (∐ X)) t\n[PROOFSTEP]\nrfl\n[GOAL]\ncase tfae_2_to_3.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\nthis : t = ↑i.inv (↑i.hom t)\n⊢ ↑(π q.fst) q.snd = ↑(Sigma.desc π) t\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase tfae_2_to_3.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\nthis : t = ↑i.inv (↑i.hom t)\n⊢ ↑(π q.fst) q.snd = ↑(Sigma.desc π) (↑i.inv (↑i.hom t))\n[PROOFSTEP]\nshow _ = (i.inv ≫ Sigma.desc π) (i.hom t)\n[GOAL]\ncase tfae_2_to_3.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\nthis : t = ↑i.inv (↑i.hom t)\n⊢ ↑(π q.fst) q.snd = ↑(i.inv ≫ Sigma.desc π) (↑i.hom t)\n[PROOFSTEP]\nsuffices i.inv ≫ Sigma.desc π = finiteCoproduct.desc X π by rw [this]; rfl\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\nthis✝ : t = ↑i.inv (↑i.hom t)\nthis : i.inv ≫ Sigma.desc π = finiteCoproduct.desc X π\n⊢ ↑(π q.fst) q.snd = ↑(i.inv ≫ Sigma.desc π) (↑i.hom t)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\nthis✝ : t = ↑i.inv (↑i.hom t)\nthis : i.inv ≫ Sigma.desc π = finiteCoproduct.desc X π\n⊢ ↑(π q.fst) q.snd = ↑(finiteCoproduct.desc X π) (↑i.hom t)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase tfae_2_to_3.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\nthis : t = ↑i.inv (↑i.hom t)\n⊢ i.inv ≫ Sigma.desc π = finiteCoproduct.desc X π\n[PROOFSTEP]\nrw [Iso.inv_comp_eq]\n[GOAL]\ncase tfae_2_to_3.intro\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\nthis : t = ↑i.inv (↑i.hom t)\n⊢ Sigma.desc π = i.hom ≫ finiteCoproduct.desc X π\n[PROOFSTEP]\napply colimit.hom_ext\n[GOAL]\ncase tfae_2_to_3.intro.w\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\nthis : t = ↑i.inv (↑i.hom t)\n⊢ ∀ (j : Discrete α),\n    colimit.ι (Discrete.functor X) j ≫ Sigma.desc π =\n      colimit.ι (Discrete.functor X) j ≫ i.hom ≫ finiteCoproduct.desc X π\n[PROOFSTEP]\nrintro ⟨a⟩\n[GOAL]\ncase tfae_2_to_3.intro.w.mk\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\nthis : t = ↑i.inv (↑i.hom t)\na : α\n⊢ colimit.ι (Discrete.functor X) { as := a } ≫ Sigma.desc π =\n    colimit.ι (Discrete.functor X) { as := a } ≫ i.hom ≫ finiteCoproduct.desc X π\n[PROOFSTEP]\nsimp only [Discrete.functor_obj, colimit.ι_desc, Cofan.mk_pt, Cofan.mk_ι_app,\n  colimit.comp_coconePointUniqueUpToIso_hom_assoc]\n[GOAL]\ncase tfae_2_to_3.intro.w.mk\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\nthis : t = ↑i.inv (↑i.hom t)\na : α\n⊢ π a = NatTrans.app (finiteCoproduct.cocone X).ι { as := a } ≫ finiteCoproduct.desc X π\n[PROOFSTEP]\next\n[GOAL]\ncase tfae_2_to_3.intro.w.mk.w\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ne : Function.Surjective ↑(Sigma.desc π)\ni : ∐ X ≅ finiteCoproduct X :=\n  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)\nt : (forget CompHaus).obj (∐ fun b => X b)\nq : (fun x => (forget CompHaus).obj (finiteCoproduct X)) t := ↑i.hom t\nthis : t = ↑i.inv (↑i.hom t)\na : α\nx✝ : (forget CompHaus).obj (X a)\n⊢ ↑(π a) x✝ = ↑(NatTrans.app (finiteCoproduct.cocone X).ι { as := a } ≫ finiteCoproduct.desc X π) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ntfae_2_to_3 : Epi (Sigma.desc π) → ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ TFAE [EffectiveEpiFamily X π, Epi (Sigma.desc π), ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b]\n[PROOFSTEP]\ntfae_have 3 → 1\n[GOAL]\ncase tfae_3_to_1\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ntfae_2_to_3 : Epi (Sigma.desc π) → ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\n⊢ (∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b) → EffectiveEpiFamily X π\n[PROOFSTEP]\napply effectiveEpiFamily_of_jointly_surjective\n[GOAL]\nα : Type\ninst✝ : Fintype α\nB : CompHaus\nX : α → CompHaus\nπ : (a : α) → X a ⟶ B\ntfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)\ntfae_2_to_3 : Epi (Sigma.desc π) → ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b\ntfae_3_to_1 : (∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b) → EffectiveEpiFamily X π\n⊢ TFAE [EffectiveEpiFamily X π, Epi (Sigma.desc π), ∀ (b : ↑B.toTop), ∃ a x, ↑(π a) x = b]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\n⊢ Precoherent CompHaus\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase pullback\n⊢ ∀ {B₁ B₂ : CompHaus} (f : B₂ ⟶ B₁) (α : Type) [inst : Fintype α] (X₁ : α → CompHaus) (π₁ : (a : α) → X₁ a ⟶ B₁),\n    EffectiveEpiFamily X₁ π₁ → ∃ β x X₂ π₂, EffectiveEpiFamily X₂ π₂ ∧ ∃ i ι, ∀ (b : β), ι b ≫ π₁ (i b) = π₂ b ≫ f\n[PROOFSTEP]\nintro B₁ B₂ f α _ X₁ π₁ h₁\n[GOAL]\ncase pullback\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : EffectiveEpiFamily X₁ π₁\n⊢ ∃ β x X₂ π₂, EffectiveEpiFamily X₂ π₂ ∧ ∃ i ι, ∀ (b : β), ι b ≫ π₁ (i b) = π₂ b ≫ f\n[PROOFSTEP]\nrefine ⟨α, inferInstance, fun a => pullback f (π₁ a), fun a => pullback.fst _ _, ?_, id, fun a => pullback.snd _ _, ?_⟩\n[GOAL]\ncase pullback.refine_1\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : EffectiveEpiFamily X₁ π₁\n⊢ EffectiveEpiFamily (fun a => pullback f (π₁ a)) fun a => pullback.fst f (π₁ a)\n[PROOFSTEP]\nhave := (effectiveEpiFamily_tfae _ π₁).out 0 2\n[GOAL]\ncase pullback.refine_1\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : EffectiveEpiFamily X₁ π₁\nthis : EffectiveEpiFamily (fun a => X₁ a) π₁ ↔ ∀ (b : ↑B₁.toTop), ∃ a x, ↑(π₁ a) x = b\n⊢ EffectiveEpiFamily (fun a => pullback f (π₁ a)) fun a => pullback.fst f (π₁ a)\n[PROOFSTEP]\nrw [this] at h₁ \n[GOAL]\ncase pullback.refine_1\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : ∀ (b : ↑B₁.toTop), ∃ a x, ↑(π₁ a) x = b\nthis : EffectiveEpiFamily (fun a => X₁ a) π₁ ↔ ∀ (b : ↑B₁.toTop), ∃ a x, ↑(π₁ a) x = b\n⊢ EffectiveEpiFamily (fun a => pullback f (π₁ a)) fun a => pullback.fst f (π₁ a)\n[PROOFSTEP]\nclear this\n[GOAL]\ncase pullback.refine_1\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : ∀ (b : ↑B₁.toTop), ∃ a x, ↑(π₁ a) x = b\n⊢ EffectiveEpiFamily (fun a => pullback f (π₁ a)) fun a => pullback.fst f (π₁ a)\n[PROOFSTEP]\nhave := (effectiveEpiFamily_tfae _ (fun a => pullback.fst f (π₁ a))).out 0 2\n[GOAL]\ncase pullback.refine_1\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : ∀ (b : ↑B₁.toTop), ∃ a x, ↑(π₁ a) x = b\nthis :\n  (EffectiveEpiFamily (fun a => pullback f (π₁ a)) fun a => pullback.fst f (π₁ a)) ↔\n    ∀ (b : ↑B₂.toTop), ∃ a x, ↑(pullback.fst f (π₁ a)) x = b\n⊢ EffectiveEpiFamily (fun a => pullback f (π₁ a)) fun a => pullback.fst f (π₁ a)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase pullback.refine_1\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : ∀ (b : ↑B₁.toTop), ∃ a x, ↑(π₁ a) x = b\nthis :\n  (EffectiveEpiFamily (fun a => pullback f (π₁ a)) fun a => pullback.fst f (π₁ a)) ↔\n    ∀ (b : ↑B₂.toTop), ∃ a x, ↑(pullback.fst f (π₁ a)) x = b\n⊢ ∀ (b : ↑B₂.toTop), ∃ a x, ↑(pullback.fst f (π₁ a)) x = b\n[PROOFSTEP]\nclear this\n[GOAL]\ncase pullback.refine_1\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : ∀ (b : ↑B₁.toTop), ∃ a x, ↑(π₁ a) x = b\n⊢ ∀ (b : ↑B₂.toTop), ∃ a x, ↑(pullback.fst f (π₁ a)) x = b\n[PROOFSTEP]\nintro b₂\n[GOAL]\ncase pullback.refine_1\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : ∀ (b : ↑B₁.toTop), ∃ a x, ↑(π₁ a) x = b\nb₂ : ↑B₂.toTop\n⊢ ∃ a x, ↑(pullback.fst f (π₁ a)) x = b₂\n[PROOFSTEP]\nobtain ⟨a, x, h⟩ := h₁ (f b₂)\n[GOAL]\ncase pullback.refine_1.intro.intro\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : ∀ (b : ↑B₁.toTop), ∃ a x, ↑(π₁ a) x = b\nb₂ : ↑B₂.toTop\na : α\nx : ↑(X₁ a).toTop\nh : ↑(π₁ a) x = ↑f b₂\n⊢ ∃ a x, ↑(pullback.fst f (π₁ a)) x = b₂\n[PROOFSTEP]\nrefine ⟨a, ⟨⟨b₂, x⟩, h.symm⟩, rfl⟩\n[GOAL]\ncase pullback.refine_2\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : EffectiveEpiFamily X₁ π₁\n⊢ ∀ (b : α), (fun a => pullback.snd f (π₁ a)) b ≫ π₁ (id b) = (fun a => pullback.fst f (π₁ a)) b ≫ f\n[PROOFSTEP]\nintro a\n[GOAL]\ncase pullback.refine_2\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : EffectiveEpiFamily X₁ π₁\na : α\n⊢ (fun a => pullback.snd f (π₁ a)) a ≫ π₁ (id a) = (fun a => pullback.fst f (π₁ a)) a ≫ f\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase pullback.refine_2\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : EffectiveEpiFamily X₁ π₁\na : α\n⊢ pullback.snd f (π₁ a) ≫ π₁ a = pullback.fst f (π₁ a) ≫ f\n[PROOFSTEP]\next ⟨⟨_, _⟩, h⟩\n[GOAL]\ncase pullback.refine_2.w.mk.mk\nB₁ B₂ : CompHaus\nf : B₂ ⟶ B₁\nα : Type\ninst✝ : Fintype α\nX₁ : α → CompHaus\nπ₁ : (a : α) → X₁ a ⟶ B₁\nh₁ : EffectiveEpiFamily X₁ π₁\na : α\nfst✝ : ↑B₂.toTop\nsnd✝ : ↑(X₁ a).toTop\nh : (fst✝, snd✝) ∈ {xy | ↑f xy.fst = ↑(π₁ a) xy.snd}\n⊢ ↑(pullback.snd f (π₁ a) ≫ π₁ a) { val := (fst✝, snd✝), property := h } =\n    ↑(pullback.fst f (π₁ a) ≫ f) { val := (fst✝, snd✝), property := h }\n[PROOFSTEP]\nexact h.symm\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.CompHaus.EffectiveEpi", "llama_tokens": 34078, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419831347361, "lm_q2_score": 0.5698526514141572, "lm_q1q2_score": 0.3947038705700893}}
{"text": "[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\n⊢ Submonoid.map (algebraMap R S) M ≤ IsUnit.submonoid S\n[PROOFSTEP]\nrintro _ ⟨a, ha, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\na : R\nha : a ∈ ↑M\n⊢ ↑(algebraMap R S) a ∈ IsUnit.submonoid S\n[PROOFSTEP]\nexact IsLocalization.map_units S ⟨_, ha⟩\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nm : { x // x ∈ M }\n⊢ m • ↑(↑(toInvSubmonoid M S) m) = 1\n[PROOFSTEP]\nconvert mul_toInvSubmonoid M S m\n[GOAL]\ncase h.e'_2.h.e\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nm : { x // x ∈ M }\n⊢ HSMul.hSMul m = HMul.hMul (↑(algebraMap R S) ↑m)\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_2.h.e.h\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nm : { x // x ∈ M }\nx✝ : S\n⊢ m • x✝ = ↑(algebraMap R S) ↑m * x✝\n[PROOFSTEP]\nrw [← Algebra.smul_def]\n[GOAL]\ncase h.e'_2.h.e.h\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nm : { x // x ∈ M }\nx✝ : S\n⊢ m • x✝ = ↑m • x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nz : S\n⊢ ∃ r m, z = r • ↑(↑(toInvSubmonoid M S) m)\n[PROOFSTEP]\nrcases IsLocalization.surj M z with ⟨⟨r, m⟩, e : z * _ = algebraMap R S r⟩\n[GOAL]\ncase intro.mk\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nz : S\nr : R\nm : { x // x ∈ M }\ne : z * ↑(algebraMap R S) ↑(r, m).snd = ↑(algebraMap R S) r\n⊢ ∃ r m, z = r • ↑(↑(toInvSubmonoid M S) m)\n[PROOFSTEP]\nrefine' ⟨r, m, _⟩\n[GOAL]\ncase intro.mk\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nz : S\nr : R\nm : { x // x ∈ M }\ne : z * ↑(algebraMap R S) ↑(r, m).snd = ↑(algebraMap R S) r\n⊢ z = r • ↑(↑(toInvSubmonoid M S) m)\n[PROOFSTEP]\nrw [Algebra.smul_def, ← e, mul_assoc]\n[GOAL]\ncase intro.mk\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nz : S\nr : R\nm : { x // x ∈ M }\ne : z * ↑(algebraMap R S) ↑(r, m).snd = ↑(algebraMap R S) r\n⊢ z = z * (↑(algebraMap R S) ↑(r, m).snd * ↑(↑(toInvSubmonoid M S) m))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nx : { x // x ∈ M }\n⊢ ↑(↑(toInvSubmonoid M S) x) = mk' S 1 x\n[PROOFSTEP]\nrw [← (IsLocalization.map_units S x).mul_left_inj]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nx : { x // x ∈ M }\n⊢ ↑(↑(toInvSubmonoid M S) x) * ↑(algebraMap R S) ↑x = mk' S 1 x * ↑(algebraMap R S) ↑x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nx : S\n⊢ x ∈ invSubmonoid M S ↔ ∃ m, mk' S 1 m = x\n[PROOFSTEP]\nsimp_rw [← toInvSubmonoid_eq_mk']\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nx : S\n⊢ x ∈ invSubmonoid M S ↔ ∃ m, ↑(↑(toInvSubmonoid M S) m) = x\n[PROOFSTEP]\nexact\n  ⟨fun h => ⟨_, congr_arg Subtype.val (toInvSubmonoid_surjective M S ⟨x, h⟩).choose_spec⟩, fun h =>\n    h.choose_spec ▸ (toInvSubmonoid M S h.choose).prop⟩\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\n⊢ Submodule.span R ↑(invSubmonoid M S) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\n⊢ ⊤ ≤ Submodule.span R ↑(invSubmonoid M S)\n[PROOFSTEP]\nrintro x -\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nx : S\n⊢ x ∈ Submodule.span R ↑(invSubmonoid M S)\n[PROOFSTEP]\nrcases IsLocalization.surj'' M x with ⟨r, m, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nr : R\nm : { x // x ∈ M }\n⊢ r • ↑(↑(toInvSubmonoid M S) m) ∈ Submodule.span R ↑(invSubmonoid M S)\n[PROOFSTEP]\nexact Submodule.smul_mem _ _ (Submodule.subset_span (toInvSubmonoid M S m).prop)\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : Monoid.FG { x // x ∈ M }\n⊢ Algebra.FiniteType R S\n[PROOFSTEP]\nhave := Monoid.fg_of_surjective _ (toInvSubmonoid_surjective M S)\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : Monoid.FG { x // x ∈ M }\nthis : Monoid.FG { x // x ∈ invSubmonoid M S }\n⊢ Algebra.FiniteType R S\n[PROOFSTEP]\nrw [Monoid.fg_iff_submonoid_fg] at this \n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : Monoid.FG { x // x ∈ M }\nthis : Submonoid.FG (invSubmonoid M S)\n⊢ Algebra.FiniteType R S\n[PROOFSTEP]\nrcases this with ⟨s, hs⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : Monoid.FG { x // x ∈ M }\ns : Finset S\nhs : Submonoid.closure ↑s = invSubmonoid M S\n⊢ Algebra.FiniteType R S\n[PROOFSTEP]\nrefine' ⟨⟨s, _⟩⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : Monoid.FG { x // x ∈ M }\ns : Finset S\nhs : Submonoid.closure ↑s = invSubmonoid M S\n⊢ Algebra.adjoin R ↑s = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : Monoid.FG { x // x ∈ M }\ns : Finset S\nhs : Submonoid.closure ↑s = invSubmonoid M S\n⊢ ⊤ ≤ Algebra.adjoin R ↑s\n[PROOFSTEP]\nrintro x -\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : Monoid.FG { x // x ∈ M }\ns : Finset S\nhs : Submonoid.closure ↑s = invSubmonoid M S\nx : S\n⊢ x ∈ Algebra.adjoin R ↑s\n[PROOFSTEP]\nchange x ∈ (Subalgebra.toSubmodule (Algebra.adjoin R _ : Subalgebra R S) : Set S)\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : Monoid.FG { x // x ∈ M }\ns : Finset S\nhs : Submonoid.closure ↑s = invSubmonoid M S\nx : S\n⊢ x ∈ ↑(↑Subalgebra.toSubmodule (Algebra.adjoin R ↑s))\n[PROOFSTEP]\nrw [Algebra.adjoin_eq_span, hs, span_invSubmonoid]\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : Monoid.FG { x // x ∈ M }\ns : Finset S\nhs : Submonoid.closure ↑s = invSubmonoid M S\nx : S\n⊢ x ∈ ↑⊤\n[PROOFSTEP]\ntrivial\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Localization.InvSubmonoid", "llama_tokens": 4398, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7217432062975979, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.3946045468185986}}
{"text": "[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nA : Type v\ninst✝ : CommRing A\nφ : R →+* A\n⊢ IsWeaklyEisensteinAt (Polynomial.map φ f) (Ideal.map φ 𝓟)\n[PROOFSTEP]\nrefine' (IsWeaklyEisensteinAt_iff _ _).2 fun hn => _\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nA : Type v\ninst✝ : CommRing A\nφ : R →+* A\nn✝ : ℕ\nhn : n✝ < natDegree (Polynomial.map φ f)\n⊢ coeff (Polynomial.map φ f) n✝ ∈ Ideal.map φ 𝓟\n[PROOFSTEP]\nrw [coeff_map]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nA : Type v\ninst✝ : CommRing A\nφ : R →+* A\nn✝ : ℕ\nhn : n✝ < natDegree (Polynomial.map φ f)\n⊢ ↑φ (coeff f n✝) ∈ Ideal.map φ 𝓟\n[PROOFSTEP]\nexact mem_map_of_mem _ (hf.mem (lt_of_lt_of_le hn (natDegree_map_le _ _)))\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\n⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f)\n[PROOFSTEP]\nrw [aeval_def, Polynomial.eval₂_eq_eval_map, eval_eq_sum_range, range_add_one, sum_insert not_mem_range_self, sum_range,\n  (hmo.map (algebraMap R S)).coeff_natDegree, one_mul] at hx \n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) +\n      ∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i =\n    0\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\n⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f)\n[PROOFSTEP]\nreplace hx := eq_neg_of_add_eq_zero_left hx\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\n⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f)\n[PROOFSTEP]\nhave : ∀ n < f.natDegree, p ∣ f.coeff n := by\n  intro n hn\n  refine' mem_span_singleton.1 (by simpa using hf.mem hn)\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\n⊢ ∀ (n : ℕ), n < natDegree f → p ∣ coeff f n\n[PROOFSTEP]\nintro n hn\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nn : ℕ\nhn : n < natDegree f\n⊢ p ∣ coeff f n\n[PROOFSTEP]\nrefine' mem_span_singleton.1 (by simpa using hf.mem hn)\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nn : ℕ\nhn : n < natDegree f\n⊢ coeff f n ∈ span {p}\n[PROOFSTEP]\nsimpa using hf.mem hn\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nthis : ∀ (n : ℕ), n < natDegree f → p ∣ coeff f n\n⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f)\n[PROOFSTEP]\nchoose! φ hφ using this\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nφ : ℕ → R\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f)\n[PROOFSTEP]\nconv_rhs at hx =>\n  congr\n  congr\n  ·skip\n  ext i\n  rw [coeff_map, hφ i.1 (lt_of_lt_of_le i.2 (natDegree_map_le _ _)), RingHom.map_mul, mul_assoc]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nφ : ℕ → R\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n| -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\n[PROOFSTEP]\n  congr\n  congr\n  ·skip\n  ext i\n  rw [coeff_map, hφ i.1 (lt_of_lt_of_le i.2 (natDegree_map_le _ _)), RingHom.map_mul, mul_assoc]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nφ : ℕ → R\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n| -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\n[PROOFSTEP]\n  congr\n  congr\n  ·skip\n  ext i\n  rw [coeff_map, hφ i.1 (lt_of_lt_of_le i.2 (natDegree_map_le _ _)), RingHom.map_mul, mul_assoc]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nφ : ℕ → R\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n| -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nφ : ℕ → R\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n| ∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.s\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nφ : ℕ → R\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n| univ\ncase a.f\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nφ : ℕ → R\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n| fun i => coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\n[PROOFSTEP]\n·skip\n[GOAL]\ncase a.s\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nφ : ℕ → R\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n| univ\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.s\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nφ : ℕ → R\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n| univ\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.s\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nφ : ℕ → R\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n| univ\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.f\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nφ : ℕ → R\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n| fun i => coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\n[PROOFSTEP]\next i\n[GOAL]\ncase a.f.h\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\nφ : ℕ → R\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\ni : Fin (natDegree (Polynomial.map (algebraMap R S) f))\n| coeff (Polynomial.map (algebraMap R S) f) ↑i * x ^ ↑i\n[PROOFSTEP]\nrw [coeff_map, hφ i.1 (lt_of_lt_of_le i.2 (natDegree_map_le _ _)), RingHom.map_mul, mul_assoc]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nφ : ℕ → R\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)),\n        ↑(algebraMap R S) p * (↑(algebraMap R S) (φ ↑i) * x ^ ↑i)\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f)\n[PROOFSTEP]\nrw [hx, ← mul_sum, neg_eq_neg_one_mul, ← mul_assoc (-1 : S), mul_comm (-1 : S), mul_assoc]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nφ : ℕ → R\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)),\n        ↑(algebraMap R S) p * (↑(algebraMap R S) (φ ↑i) * x ^ ↑i)\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n⊢ ∃ y,\n    y ∈ adjoin R {x} ∧\n      ↑(algebraMap R S) p * y =\n        ↑(algebraMap R S) p *\n          (-1 * ∑ x_1 : Fin (natDegree (Polynomial.map (algebraMap R S) f)), ↑(algebraMap R S) (φ ↑x_1) * x ^ ↑x_1)\n[PROOFSTEP]\nrefine' ⟨-1 * ∑ i : Fin (f.map (algebraMap R S)).natDegree, (algebraMap R S) (φ i.1) * x ^ i.1, _, rfl⟩\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\nφ : ℕ → R\nhx :\n  x ^ natDegree (Polynomial.map (algebraMap R S) f) =\n    -∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)),\n        ↑(algebraMap R S) p * (↑(algebraMap R S) (φ ↑i) * x ^ ↑i)\nhφ : ∀ (n : ℕ), n < natDegree f → coeff f n = p * φ n\n⊢ -1 * ∑ i : Fin (natDegree (Polynomial.map (algebraMap R S) f)), ↑(algebraMap R S) (φ ↑i) * x ^ ↑i ∈ adjoin R {x}\n[PROOFSTEP]\nexact\n  Subalgebra.mul_mem _ (Subalgebra.neg_mem _ (Subalgebra.one_mem _))\n    (Subalgebra.sum_mem _ fun i _ =>\n      Subalgebra.mul_mem _ (Subalgebra.algebraMap_mem _ _)\n        (Subalgebra.pow_mem _ (subset_adjoin (Set.mem_singleton x)) _))\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\n⊢ ∀ (i : ℕ), natDegree (Polynomial.map (algebraMap R S) f) ≤ i → ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ i\n[PROOFSTEP]\nintro i hi\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\ni : ℕ\nhi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i\n⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ i\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := exists_add_of_le hi\n[GOAL]\ncase intro\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\ni : ℕ\nhi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i\nk : ℕ\nhk : i = natDegree (Polynomial.map (algebraMap R S) f) + k\n⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ i\n[PROOFSTEP]\nrw [hk, pow_add]\n[GOAL]\ncase intro\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\ni : ℕ\nhi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i\nk : ℕ\nhk : i = natDegree (Polynomial.map (algebraMap R S) f) + k\n⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f) * x ^ k\n[PROOFSTEP]\nobtain ⟨y, hy, H⟩ := exists_mem_adjoin_mul_eq_pow_natDegree hx hmo hf\n[GOAL]\ncase intro.intro.intro\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\ni : ℕ\nhi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i\nk : ℕ\nhk : i = natDegree (Polynomial.map (algebraMap R S) f) + k\ny : S\nhy : y ∈ adjoin R {x}\nH : ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f)\n⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f) * x ^ k\n[PROOFSTEP]\nrefine' ⟨y * x ^ k, _, _⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\ni : ℕ\nhi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i\nk : ℕ\nhk : i = natDegree (Polynomial.map (algebraMap R S) f) + k\ny : S\nhy : y ∈ adjoin R {x}\nH : ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f)\n⊢ y * x ^ k ∈ adjoin R {x}\n[PROOFSTEP]\nexact Subalgebra.mul_mem _ hy (Subalgebra.pow_mem _ (subset_adjoin (Set.mem_singleton x)) _)\n[GOAL]\ncase intro.intro.intro.refine'_2\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\np : R\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\nhf : IsWeaklyEisensteinAt f (Submodule.span R {p})\ni : ℕ\nhi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i\nk : ℕ\nhk : i = natDegree (Polynomial.map (algebraMap R S) f) + k\ny : S\nhy : y ∈ adjoin R {x}\nH : ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f)\n⊢ ↑(algebraMap R S) p * (y * x ^ k) = x ^ natDegree (Polynomial.map (algebraMap R S) f) * x ^ k\n[PROOFSTEP]\nrw [← mul_assoc _ y, H]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : R\nhroot : IsRoot f x\nhmo : Monic f\n⊢ ∀ (i : ℕ), natDegree f ≤ i → x ^ i ∈ 𝓟\n[PROOFSTEP]\nintro i hi\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : R\nhroot : IsRoot f x\nhmo : Monic f\ni : ℕ\nhi : natDegree f ≤ i\n⊢ x ^ i ∈ 𝓟\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := exists_add_of_le hi\n[GOAL]\ncase intro\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : R\nhroot : IsRoot f x\nhmo : Monic f\ni : ℕ\nhi : natDegree f ≤ i\nk : ℕ\nhk : i = natDegree f + k\n⊢ x ^ i ∈ 𝓟\n[PROOFSTEP]\nrw [hk, pow_add]\n[GOAL]\ncase intro\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : R\nhroot : IsRoot f x\nhmo : Monic f\ni : ℕ\nhi : natDegree f ≤ i\nk : ℕ\nhk : i = natDegree f + k\n⊢ x ^ natDegree f * x ^ k ∈ 𝓟\n[PROOFSTEP]\nsuffices x ^ f.natDegree ∈ 𝓟 by exact mul_mem_right (x ^ k) 𝓟 this\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : R\nhroot : IsRoot f x\nhmo : Monic f\ni : ℕ\nhi : natDegree f ≤ i\nk : ℕ\nhk : i = natDegree f + k\nthis : x ^ natDegree f ∈ 𝓟\n⊢ x ^ natDegree f * x ^ k ∈ 𝓟\n[PROOFSTEP]\nexact mul_mem_right (x ^ k) 𝓟 this\n[GOAL]\ncase intro\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : R\nhroot : IsRoot f x\nhmo : Monic f\ni : ℕ\nhi : natDegree f ≤ i\nk : ℕ\nhk : i = natDegree f + k\n⊢ x ^ natDegree f ∈ 𝓟\n[PROOFSTEP]\nrw [IsRoot.def, eval_eq_sum_range, Finset.range_add_one, Finset.sum_insert Finset.not_mem_range_self, Finset.sum_range,\n  hmo.coeff_natDegree, one_mul] at *\n[GOAL]\ncase intro\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : R\nhroot : x ^ natDegree f + ∑ i : Fin (natDegree f), coeff f ↑i * x ^ ↑i = 0\nhmo : Monic f\ni : ℕ\nhi : natDegree f ≤ i\nk : ℕ\nhk : i = natDegree f + k\n⊢ x ^ natDegree f ∈ 𝓟\n[PROOFSTEP]\nrw [eq_neg_of_add_eq_zero_left hroot, Ideal.neg_mem_iff]\n[GOAL]\ncase intro\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : R\nhroot : x ^ natDegree f + ∑ i : Fin (natDegree f), coeff f ↑i * x ^ ↑i = 0\nhmo : Monic f\ni : ℕ\nhi : natDegree f ≤ i\nk : ℕ\nhk : i = natDegree f + k\n⊢ ∑ i : Fin (natDegree f), coeff f ↑i * x ^ ↑i ∈ 𝓟\n[PROOFSTEP]\nrefine' Submodule.sum_mem _ fun i _ => mul_mem_right _ _ (hf.mem (Fin.is_lt i))\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\n⊢ ∀ (i : ℕ), natDegree (Polynomial.map (algebraMap R S) f) ≤ i → x ^ i ∈ Ideal.map (algebraMap R S) 𝓟\n[PROOFSTEP]\nsuffices x ^ (f.map (algebraMap R S)).natDegree ∈ 𝓟.map (algebraMap R S)\n  by\n  intro i hi\n  obtain ⟨k, hk⟩ := exists_add_of_le hi\n  rw [hk, pow_add]\n  refine' mul_mem_right _ _ this\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\nthis : x ^ natDegree (Polynomial.map (algebraMap R S) f) ∈ Ideal.map (algebraMap R S) 𝓟\n⊢ ∀ (i : ℕ), natDegree (Polynomial.map (algebraMap R S) f) ≤ i → x ^ i ∈ Ideal.map (algebraMap R S) 𝓟\n[PROOFSTEP]\nintro i hi\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\nthis : x ^ natDegree (Polynomial.map (algebraMap R S) f) ∈ Ideal.map (algebraMap R S) 𝓟\ni : ℕ\nhi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i\n⊢ x ^ i ∈ Ideal.map (algebraMap R S) 𝓟\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := exists_add_of_le hi\n[GOAL]\ncase intro\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\nthis : x ^ natDegree (Polynomial.map (algebraMap R S) f) ∈ Ideal.map (algebraMap R S) 𝓟\ni : ℕ\nhi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i\nk : ℕ\nhk : i = natDegree (Polynomial.map (algebraMap R S) f) + k\n⊢ x ^ i ∈ Ideal.map (algebraMap R S) 𝓟\n[PROOFSTEP]\nrw [hk, pow_add]\n[GOAL]\ncase intro\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\nthis : x ^ natDegree (Polynomial.map (algebraMap R S) f) ∈ Ideal.map (algebraMap R S) 𝓟\ni : ℕ\nhi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i\nk : ℕ\nhk : i = natDegree (Polynomial.map (algebraMap R S) f) + k\n⊢ x ^ natDegree (Polynomial.map (algebraMap R S) f) * x ^ k ∈ Ideal.map (algebraMap R S) 𝓟\n[PROOFSTEP]\nrefine' mul_mem_right _ _ this\n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\nhx : ↑(aeval x) f = 0\nhmo : Monic f\n⊢ x ^ natDegree (Polynomial.map (algebraMap R S) f) ∈ Ideal.map (algebraMap R S) 𝓟\n[PROOFSTEP]\nrw [aeval_def, eval₂_eq_eval_map, ← IsRoot.def] at hx \n[GOAL]\nR : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf : IsWeaklyEisensteinAt f 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\nhx : IsRoot (Polynomial.map (algebraMap R S) f) x\nhmo : Monic f\n⊢ x ^ natDegree (Polynomial.map (algebraMap R S) f) ∈ Ideal.map (algebraMap R S) 𝓟\n[PROOFSTEP]\nrefine' pow_natDegree_le_of_root_of_monic_mem (hf.map _) hx (hmo.map _) _ rfl.le\n[GOAL]\nR : Type u\nA : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing A\np : R[X]\nx : R\nP : Ideal R\nhP : x ∈ P\n⊢ IsWeaklyEisensteinAt (scaleRoots p x) P\n[PROOFSTEP]\nrefine' ⟨fun i => _⟩\n[GOAL]\nR : Type u\nA : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing A\np : R[X]\nx : R\nP : Ideal R\nhP : x ∈ P\nn✝ : ℕ\ni : n✝ < natDegree (scaleRoots p x)\n⊢ coeff (scaleRoots p x) n✝ ∈ P\n[PROOFSTEP]\nrw [coeff_scaleRoots]\n[GOAL]\nR : Type u\nA : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing A\np : R[X]\nx : R\nP : Ideal R\nhP : x ∈ P\nn✝ : ℕ\ni : n✝ < natDegree (scaleRoots p x)\n⊢ coeff p n✝ * x ^ (natDegree p - n✝) ∈ P\n[PROOFSTEP]\nrw [natDegree_scaleRoots, ← tsub_pos_iff_lt] at i \n[GOAL]\nR : Type u\nA : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing A\np : R[X]\nx : R\nP : Ideal R\nhP : x ∈ P\nn✝ : ℕ\ni✝ : n✝ < natDegree p\ni : 0 < natDegree p - n✝\n⊢ coeff p n✝ * x ^ (natDegree p - n✝) ∈ P\n[PROOFSTEP]\nexact Ideal.mul_mem_left _ _ (Ideal.pow_mem_of_mem P hP _ i)\n[GOAL]\nR : Type u\nA : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing A\nf : R →+* A\nhf : Function.Injective ↑f\np : R[X]\nhp : Monic p\nx y : R\nz : A\nh : eval₂ f z p = 0\nhz : ↑f x * z = ↑f y\n⊢ x ∣ y ^ natDegree p\n[PROOFSTEP]\nrw [← natDegree_scaleRoots p x, ← Ideal.mem_span_singleton]\n[GOAL]\nR : Type u\nA : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing A\nf : R →+* A\nhf : Function.Injective ↑f\np : R[X]\nhp : Monic p\nx y : R\nz : A\nh : eval₂ f z p = 0\nhz : ↑f x * z = ↑f y\n⊢ y ^ natDegree (scaleRoots p x) ∈ span {x}\n[PROOFSTEP]\nrefine'\n  (scaleRoots.isWeaklyEisensteinAt _ (Ideal.mem_span_singleton.mpr <| dvd_refl x)).pow_natDegree_le_of_root_of_monic_mem\n    _ ((monic_scaleRoots_iff x).mpr hp) _ le_rfl\n[GOAL]\nR : Type u\nA : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing A\nf : R →+* A\nhf : Function.Injective ↑f\np : R[X]\nhp : Monic p\nx y : R\nz : A\nh : eval₂ f z p = 0\nhz : ↑f x * z = ↑f y\n⊢ IsRoot (scaleRoots p x) y\n[PROOFSTEP]\nrw [injective_iff_map_eq_zero'] at hf \n[GOAL]\nR : Type u\nA : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing A\nf : R →+* A\nhf : ∀ (a : R), ↑f a = 0 ↔ a = 0\np : R[X]\nhp : Monic p\nx y : R\nz : A\nh : eval₂ f z p = 0\nhz : ↑f x * z = ↑f y\n⊢ IsRoot (scaleRoots p x) y\n[PROOFSTEP]\nhave : eval₂ _ _ (p.scaleRoots x) = 0 := scaleRoots_eval₂_eq_zero f h\n[GOAL]\nR : Type u\nA : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing A\nf : R →+* A\nhf : ∀ (a : R), ↑f a = 0 ↔ a = 0\np : R[X]\nhp : Monic p\nx y : R\nz : A\nh : eval₂ f z p = 0\nhz : ↑f x * z = ↑f y\nthis : eval₂ f (↑f x * z) (scaleRoots p x) = 0\n⊢ IsRoot (scaleRoots p x) y\n[PROOFSTEP]\nrwa [hz, Polynomial.eval₂_at_apply, hf] at this \n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\n𝓟 : Ideal R\nf : R[X]\nhf : IsEisensteinAt f 𝓟\nn : ℕ\nhn : n ≠ natDegree f\n⊢ coeff f n ∈ 𝓟\n[PROOFSTEP]\ncases' ne_iff_lt_or_gt.1 hn with h₁ h₂\n[GOAL]\ncase inl\nR : Type u\ninst✝ : CommSemiring R\n𝓟 : Ideal R\nf : R[X]\nhf : IsEisensteinAt f 𝓟\nn : ℕ\nhn : n ≠ natDegree f\nh₁ : n < natDegree f\n⊢ coeff f n ∈ 𝓟\n[PROOFSTEP]\nexact hf.mem h₁\n[GOAL]\ncase inr\nR : Type u\ninst✝ : CommSemiring R\n𝓟 : Ideal R\nf : R[X]\nhf : IsEisensteinAt f 𝓟\nn : ℕ\nhn : n ≠ natDegree f\nh₂ : n > natDegree f\n⊢ coeff f n ∈ 𝓟\n[PROOFSTEP]\nrw [coeff_eq_zero_of_natDegree_lt h₂]\n[GOAL]\ncase inr\nR : Type u\ninst✝ : CommSemiring R\n𝓟 : Ideal R\nf : R[X]\nhf : IsEisensteinAt f 𝓟\nn : ℕ\nhn : n ≠ natDegree f\nh₂ : n > natDegree f\n⊢ 0 ∈ 𝓟\n[PROOFSTEP]\nexact Ideal.zero_mem _\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.Eisenstein.Basic", "llama_tokens": 13917, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7217431943271999, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.39460454027392533}}
{"text": "[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃⁱ[𝕜] P₂\n⊢ f.linear = (AffineIsometry.linearIsometry f).toLinearMap\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃⁱ[𝕜] P₂\nx✝ : V\n⊢ ↑f.linear x✝ = ↑(AffineIsometry.linearIsometry f).toLinearMap x✝\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf✝ f g : P →ᵃⁱ[𝕜] P₂\n⊢ (fun f => f.toFun) f = (fun f => f.toFun) g → f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf g : P →ᵃⁱ[𝕜] P₂\ntoAffineMap✝ : P →ᵃ[𝕜] P₂\nnorm_map✝ : ∀ (x : V), ‖↑toAffineMap✝.linear x‖ = ‖x‖\n⊢ (fun f => f.toFun) { toAffineMap := toAffineMap✝, norm_map := norm_map✝ } = (fun f => f.toFun) g →\n    { toAffineMap := toAffineMap✝, norm_map := norm_map✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃⁱ[𝕜] P₂\ntoAffineMap✝¹ : P →ᵃ[𝕜] P₂\nnorm_map✝¹ : ∀ (x : V), ‖↑toAffineMap✝¹.linear x‖ = ‖x‖\ntoAffineMap✝ : P →ᵃ[𝕜] P₂\nnorm_map✝ : ∀ (x : V), ‖↑toAffineMap✝.linear x‖ = ‖x‖\n⊢ (fun f => f.toFun) { toAffineMap := toAffineMap✝¹, norm_map := norm_map✝¹ } =\n      (fun f => f.toFun) { toAffineMap := toAffineMap✝, norm_map := norm_map✝ } →\n    { toAffineMap := toAffineMap✝¹, norm_map := norm_map✝¹ } = { toAffineMap := toAffineMap✝, norm_map := norm_map✝ }\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃⁱ[𝕜] P₂\n⊢ ↑f.toAffineMap = ↑f\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃⁱ[𝕜] P₂\n⊢ Injective toAffineMap\n[PROOFSTEP]\nrintro ⟨f, _⟩ ⟨g, _⟩ rfl\n[GOAL]\ncase mk.mk\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf✝ : P →ᵃⁱ[𝕜] P₂\nf : P →ᵃ[𝕜] P₂\nnorm_map✝¹ : ∀ (x : V), ‖↑f.linear x‖ = ‖x‖\nnorm_map✝ : ∀ (x : V), ‖↑{ toAffineMap := f, norm_map := norm_map✝¹ }.toAffineMap.linear x‖ = ‖x‖\n⊢ { toAffineMap := f, norm_map := norm_map✝¹ } =\n    { toAffineMap := { toAffineMap := f, norm_map := norm_map✝¹ }.toAffineMap, norm_map := norm_map✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : V →ₗᵢ[𝕜] V₂\n⊢ AffineIsometry.linearIsometry (toAffineIsometry f) = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : V →ₗᵢ[𝕜] V₂\nx✝ : V\n⊢ ↑(AffineIsometry.linearIsometry (toAffineIsometry f)) x✝ = ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃⁱ[𝕜] P₂\nf₁ : P₁ →ᵃⁱ[𝕜] P₂\nx y : P\n⊢ dist (↑f x) (↑f y) = dist x y\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V₂, dist_eq_norm_vsub V, ← map_vsub, f.linearIsometry.norm_map]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃⁱ[𝕜] P₂\nf₁ : P₁ →ᵃⁱ[𝕜] P₂\nx y : P\n⊢ nndist (↑f x) (↑f y) = nndist x y\n[PROOFSTEP]\nsimp [nndist_dist, (dist_map)]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃⁱ[𝕜] P₂\nf₁ : P₁ →ᵃⁱ[𝕜] P₂\nx y : P\n⊢ edist (↑f x) (↑f y) = edist x y\n[PROOFSTEP]\nsimp [edist_dist, (dist_map)]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne : P ≃ᵃⁱ[𝕜] P₂\n⊢ e.linear = (AffineIsometryEquiv.linearIsometryEquiv e).toLinearEquiv\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne : P ≃ᵃⁱ[𝕜] P₂\nx✝ : V\n⊢ ↑e.linear x✝ = ↑(AffineIsometryEquiv.linearIsometryEquiv e).toLinearEquiv x✝\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne f g : P ≃ᵃⁱ[𝕜] P₂\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\nx✝ : (fun f => f.invFun) f = (fun f => f.invFun) g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne g : P ≃ᵃⁱ[𝕜] P₂\ntoAffineEquiv✝ : P ≃ᵃ[𝕜] P₂\nnorm_map✝ : ∀ (x : V), ‖↑toAffineEquiv✝.linear x‖ = ‖x‖\nh : (fun f => f.toFun) { toAffineEquiv := toAffineEquiv✝, norm_map := norm_map✝ } = (fun f => f.toFun) g\nx✝ : (fun f => f.invFun) { toAffineEquiv := toAffineEquiv✝, norm_map := norm_map✝ } = (fun f => f.invFun) g\n⊢ { toAffineEquiv := toAffineEquiv✝, norm_map := norm_map✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne : P ≃ᵃⁱ[𝕜] P₂\ntoAffineEquiv✝¹ : P ≃ᵃ[𝕜] P₂\nnorm_map✝¹ : ∀ (x : V), ‖↑toAffineEquiv✝¹.linear x‖ = ‖x‖\ntoAffineEquiv✝ : P ≃ᵃ[𝕜] P₂\nnorm_map✝ : ∀ (x : V), ‖↑toAffineEquiv✝.linear x‖ = ‖x‖\nh :\n  (fun f => f.toFun) { toAffineEquiv := toAffineEquiv✝¹, norm_map := norm_map✝¹ } =\n    (fun f => f.toFun) { toAffineEquiv := toAffineEquiv✝, norm_map := norm_map✝ }\nx✝ :\n  (fun f => f.invFun) { toAffineEquiv := toAffineEquiv✝¹, norm_map := norm_map✝¹ } =\n    (fun f => f.invFun) { toAffineEquiv := toAffineEquiv✝, norm_map := norm_map✝ }\n⊢ { toAffineEquiv := toAffineEquiv✝¹, norm_map := norm_map✝¹ } =\n    { toAffineEquiv := toAffineEquiv✝, norm_map := norm_map✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_toAffineEquiv\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne : P ≃ᵃⁱ[𝕜] P₂\ntoAffineEquiv✝¹ : P ≃ᵃ[𝕜] P₂\nnorm_map✝¹ : ∀ (x : V), ‖↑toAffineEquiv✝¹.linear x‖ = ‖x‖\ntoAffineEquiv✝ : P ≃ᵃ[𝕜] P₂\nnorm_map✝ : ∀ (x : V), ‖↑toAffineEquiv✝.linear x‖ = ‖x‖\nh :\n  (fun f => f.toFun) { toAffineEquiv := toAffineEquiv✝¹, norm_map := norm_map✝¹ } =\n    (fun f => f.toFun) { toAffineEquiv := toAffineEquiv✝, norm_map := norm_map✝ }\nx✝ :\n  (fun f => f.invFun) { toAffineEquiv := toAffineEquiv✝¹, norm_map := norm_map✝¹ } =\n    (fun f => f.invFun) { toAffineEquiv := toAffineEquiv✝, norm_map := norm_map✝ }\n⊢ toAffineEquiv✝¹ = toAffineEquiv✝\n[PROOFSTEP]\nsimpa [FunLike.coe_injective.eq_iff] using h\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne✝ : P ≃ᵃⁱ[𝕜] P₂\ne : P₁ → P₂\ne' : V₁ ≃ₗᵢ[𝕜] V₂\np : P₁\nh : ∀ (p' : P₁), e p' = ↑e' (p' -ᵥ p) +ᵥ e p\n⊢ AffineIsometryEquiv.linearIsometryEquiv (mk' e e' p h) = e'\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne✝ : P ≃ᵃⁱ[𝕜] P₂\ne : P₁ → P₂\ne' : V₁ ≃ₗᵢ[𝕜] V₂\np : P₁\nh : ∀ (p' : P₁), e p' = ↑e' (p' -ᵥ p) +ᵥ e p\nx✝ : V₁\n⊢ ↑(AffineIsometryEquiv.linearIsometryEquiv (mk' e e' p h)) x✝ = ↑e' x✝\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne : V ≃ₗᵢ[𝕜] V₂\n⊢ ↑(toAffineIsometryEquiv e) = ↑e\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne : V ≃ₗᵢ[𝕜] V₂\n⊢ AffineIsometryEquiv.linearIsometryEquiv (toAffineIsometryEquiv e) = e\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne : V ≃ₗᵢ[𝕜] V₂\nx✝ : V\n⊢ ↑(AffineIsometryEquiv.linearIsometryEquiv (toAffineIsometryEquiv e)) x✝ = ↑e x✝\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne✝ e : P ≃ᵃⁱ[𝕜] P₂\n⊢ range ↑e = univ\n[PROOFSTEP]\nrw [← coe_toIsometryEquiv]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\ne✝ e : P ≃ᵃⁱ[𝕜] P₂\n⊢ range ↑(toIsometryEquiv e) = univ\n[PROOFSTEP]\nexact IsometryEquiv.range_eq_univ _\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²¹ : NormedField 𝕜\ninst✝²⁰ : SeminormedAddCommGroup V\ninst✝¹⁹ : SeminormedAddCommGroup V₁\ninst✝¹⁸ : SeminormedAddCommGroup V₂\ninst✝¹⁷ : SeminormedAddCommGroup V₃\ninst✝¹⁶ : SeminormedAddCommGroup V₄\ninst✝¹⁵ : NormedSpace 𝕜 V\ninst✝¹⁴ : NormedSpace 𝕜 V₁\ninst✝¹³ : NormedSpace 𝕜 V₂\ninst✝¹² : NormedSpace 𝕜 V₃\ninst✝¹¹ : NormedSpace 𝕜 V₄\ninst✝¹⁰ : PseudoMetricSpace P\ninst✝⁹ : MetricSpace P₁\ninst✝⁸ : PseudoMetricSpace P₂\ninst✝⁷ : PseudoMetricSpace P₃\ninst✝⁶ : PseudoMetricSpace P₄\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddTorsor V₁ P₁\ninst✝³ : NormedAddTorsor V₂ P₂\ninst✝² : NormedAddTorsor V₃ P₃\ninst✝¹ : NormedAddTorsor V₄ P₄\ne : P ≃ᵃⁱ[𝕜] P₂\nα : Type u_12\ninst✝ : TopologicalSpace α\np : P\n⊢ symm (constVSub 𝕜 p) = trans (LinearIsometryEquiv.toAffineIsometryEquiv (LinearIsometryEquiv.neg 𝕜)) (vaddConst 𝕜 p)\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²¹ : NormedField 𝕜\ninst✝²⁰ : SeminormedAddCommGroup V\ninst✝¹⁹ : SeminormedAddCommGroup V₁\ninst✝¹⁸ : SeminormedAddCommGroup V₂\ninst✝¹⁷ : SeminormedAddCommGroup V₃\ninst✝¹⁶ : SeminormedAddCommGroup V₄\ninst✝¹⁵ : NormedSpace 𝕜 V\ninst✝¹⁴ : NormedSpace 𝕜 V₁\ninst✝¹³ : NormedSpace 𝕜 V₂\ninst✝¹² : NormedSpace 𝕜 V₃\ninst✝¹¹ : NormedSpace 𝕜 V₄\ninst✝¹⁰ : PseudoMetricSpace P\ninst✝⁹ : MetricSpace P₁\ninst✝⁸ : PseudoMetricSpace P₂\ninst✝⁷ : PseudoMetricSpace P₃\ninst✝⁶ : PseudoMetricSpace P₄\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddTorsor V₁ P₁\ninst✝³ : NormedAddTorsor V₂ P₂\ninst✝² : NormedAddTorsor V₃ P₃\ninst✝¹ : NormedAddTorsor V₄ P₄\ne : P ≃ᵃⁱ[𝕜] P₂\nα : Type u_12\ninst✝ : TopologicalSpace α\np : P\nx✝ : V\n⊢ ↑(symm (constVSub 𝕜 p)) x✝ =\n    ↑(trans (LinearIsometryEquiv.toAffineIsometryEquiv (LinearIsometryEquiv.neg 𝕜)) (vaddConst 𝕜 p)) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²¹ : NormedField 𝕜\ninst✝²⁰ : SeminormedAddCommGroup V\ninst✝¹⁹ : SeminormedAddCommGroup V₁\ninst✝¹⁸ : SeminormedAddCommGroup V₂\ninst✝¹⁷ : SeminormedAddCommGroup V₃\ninst✝¹⁶ : SeminormedAddCommGroup V₄\ninst✝¹⁵ : NormedSpace 𝕜 V\ninst✝¹⁴ : NormedSpace 𝕜 V₁\ninst✝¹³ : NormedSpace 𝕜 V₂\ninst✝¹² : NormedSpace 𝕜 V₃\ninst✝¹¹ : NormedSpace 𝕜 V₄\ninst✝¹⁰ : PseudoMetricSpace P\ninst✝⁹ : MetricSpace P₁\ninst✝⁸ : PseudoMetricSpace P₂\ninst✝⁷ : PseudoMetricSpace P₃\ninst✝⁶ : PseudoMetricSpace P₄\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddTorsor V₁ P₁\ninst✝³ : NormedAddTorsor V₂ P₂\ninst✝² : NormedAddTorsor V₃ P₃\ninst✝¹ : NormedAddTorsor V₄ P₄\ne : P ≃ᵃⁱ[𝕜] P₂\nα : Type u_12\ninst✝ : TopologicalSpace α\nf : P → P₂\nhf : Isometry f\np : P\ng : V → V₂\nhg : ∀ (v : V), g v = f (v +ᵥ p) -ᵥ f p\n⊢ Isometry g\n[PROOFSTEP]\nconvert (vaddConst 𝕜 (f p)).symm.isometry.comp (hf.comp (vaddConst 𝕜 p).isometry)\n[GOAL]\ncase h.e'_5\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²¹ : NormedField 𝕜\ninst✝²⁰ : SeminormedAddCommGroup V\ninst✝¹⁹ : SeminormedAddCommGroup V₁\ninst✝¹⁸ : SeminormedAddCommGroup V₂\ninst✝¹⁷ : SeminormedAddCommGroup V₃\ninst✝¹⁶ : SeminormedAddCommGroup V₄\ninst✝¹⁵ : NormedSpace 𝕜 V\ninst✝¹⁴ : NormedSpace 𝕜 V₁\ninst✝¹³ : NormedSpace 𝕜 V₂\ninst✝¹² : NormedSpace 𝕜 V₃\ninst✝¹¹ : NormedSpace 𝕜 V₄\ninst✝¹⁰ : PseudoMetricSpace P\ninst✝⁹ : MetricSpace P₁\ninst✝⁸ : PseudoMetricSpace P₂\ninst✝⁷ : PseudoMetricSpace P₃\ninst✝⁶ : PseudoMetricSpace P₄\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddTorsor V₁ P₁\ninst✝³ : NormedAddTorsor V₂ P₂\ninst✝² : NormedAddTorsor V₃ P₃\ninst✝¹ : NormedAddTorsor V₄ P₄\ne : P ≃ᵃⁱ[𝕜] P₂\nα : Type u_12\ninst✝ : TopologicalSpace α\nf : P → P₂\nhf : Isometry f\np : P\ng : V → V₂\nhg : ∀ (v : V), g v = f (v +ᵥ p) -ᵥ f p\n⊢ g = ↑(symm (vaddConst 𝕜 (f p))) ∘ f ∘ ↑(vaddConst 𝕜 p)\n[PROOFSTEP]\nexact funext hg\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²¹ : NormedField 𝕜\ninst✝²⁰ : SeminormedAddCommGroup V\ninst✝¹⁹ : SeminormedAddCommGroup V₁\ninst✝¹⁸ : SeminormedAddCommGroup V₂\ninst✝¹⁷ : SeminormedAddCommGroup V₃\ninst✝¹⁶ : SeminormedAddCommGroup V₄\ninst✝¹⁵ : NormedSpace 𝕜 V\ninst✝¹⁴ : NormedSpace 𝕜 V₁\ninst✝¹³ : NormedSpace 𝕜 V₂\ninst✝¹² : NormedSpace 𝕜 V₃\ninst✝¹¹ : NormedSpace 𝕜 V₄\ninst✝¹⁰ : PseudoMetricSpace P\ninst✝⁹ : MetricSpace P₁\ninst✝⁸ : PseudoMetricSpace P₂\ninst✝⁷ : PseudoMetricSpace P₃\ninst✝⁶ : PseudoMetricSpace P₄\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddTorsor V₁ P₁\ninst✝³ : NormedAddTorsor V₂ P₂\ninst✝² : NormedAddTorsor V₃ P₃\ninst✝¹ : NormedAddTorsor V₄ P₄\ne : P ≃ᵃⁱ[𝕜] P₂\nα : Type u_12\ninst✝ : TopologicalSpace α\nx y : P\n⊢ dist (↑(pointReflection 𝕜 x) y) x = dist y x\n[PROOFSTEP]\nrw [← (pointReflection 𝕜 x).dist_map y x, pointReflection_self]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²¹ : NormedField 𝕜\ninst✝²⁰ : SeminormedAddCommGroup V\ninst✝¹⁹ : SeminormedAddCommGroup V₁\ninst✝¹⁸ : SeminormedAddCommGroup V₂\ninst✝¹⁷ : SeminormedAddCommGroup V₃\ninst✝¹⁶ : SeminormedAddCommGroup V₄\ninst✝¹⁵ : NormedSpace 𝕜 V\ninst✝¹⁴ : NormedSpace 𝕜 V₁\ninst✝¹³ : NormedSpace 𝕜 V₂\ninst✝¹² : NormedSpace 𝕜 V₃\ninst✝¹¹ : NormedSpace 𝕜 V₄\ninst✝¹⁰ : PseudoMetricSpace P\ninst✝⁹ : MetricSpace P₁\ninst✝⁸ : PseudoMetricSpace P₂\ninst✝⁷ : PseudoMetricSpace P₃\ninst✝⁶ : PseudoMetricSpace P₄\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddTorsor V₁ P₁\ninst✝³ : NormedAddTorsor V₂ P₂\ninst✝² : NormedAddTorsor V₃ P₃\ninst✝¹ : NormedAddTorsor V₄ P₄\ne : P ≃ᵃⁱ[𝕜] P₂\nα : Type u_12\ninst✝ : TopologicalSpace α\nx y : P\n⊢ dist (↑(pointReflection 𝕜 x) y) y = ‖bit0 (x -ᵥ y)‖\n[PROOFSTEP]\nrw [pointReflection_apply, dist_eq_norm_vsub V, vadd_vsub_assoc, bit0]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²¹ : NormedField 𝕜\ninst✝²⁰ : SeminormedAddCommGroup V\ninst✝¹⁹ : SeminormedAddCommGroup V₁\ninst✝¹⁸ : SeminormedAddCommGroup V₂\ninst✝¹⁷ : SeminormedAddCommGroup V₃\ninst✝¹⁶ : SeminormedAddCommGroup V₄\ninst✝¹⁵ : NormedSpace 𝕜 V\ninst✝¹⁴ : NormedSpace 𝕜 V₁\ninst✝¹³ : NormedSpace 𝕜 V₂\ninst✝¹² : NormedSpace 𝕜 V₃\ninst✝¹¹ : NormedSpace 𝕜 V₄\ninst✝¹⁰ : PseudoMetricSpace P\ninst✝⁹ : MetricSpace P₁\ninst✝⁸ : PseudoMetricSpace P₂\ninst✝⁷ : PseudoMetricSpace P₃\ninst✝⁶ : PseudoMetricSpace P₄\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddTorsor V₁ P₁\ninst✝³ : NormedAddTorsor V₂ P₂\ninst✝² : NormedAddTorsor V₃ P₃\ninst✝¹ : NormedAddTorsor V₄ P₄\ne : P ≃ᵃⁱ[𝕜] P₂\nα : Type u_12\ninst✝ : TopologicalSpace α\nx y : P\n⊢ dist (↑(pointReflection 𝕜 x) y) y = ‖2‖ * dist x y\n[PROOFSTEP]\nrw [dist_pointReflection_self', ← two_smul' 𝕜 (x -ᵥ y), norm_smul, ← dist_eq_norm_vsub V]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²² : NormedField 𝕜\ninst✝²¹ : SeminormedAddCommGroup V\ninst✝²⁰ : SeminormedAddCommGroup V₁\ninst✝¹⁹ : SeminormedAddCommGroup V₂\ninst✝¹⁸ : SeminormedAddCommGroup V₃\ninst✝¹⁷ : SeminormedAddCommGroup V₄\ninst✝¹⁶ : NormedSpace 𝕜 V\ninst✝¹⁵ : NormedSpace 𝕜 V₁\ninst✝¹⁴ : NormedSpace 𝕜 V₂\ninst✝¹³ : NormedSpace 𝕜 V₃\ninst✝¹² : NormedSpace 𝕜 V₄\ninst✝¹¹ : PseudoMetricSpace P\ninst✝¹⁰ : MetricSpace P₁\ninst✝⁹ : PseudoMetricSpace P₂\ninst✝⁸ : PseudoMetricSpace P₃\ninst✝⁷ : PseudoMetricSpace P₄\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddTorsor V₁ P₁\ninst✝⁴ : NormedAddTorsor V₂ P₂\ninst✝³ : NormedAddTorsor V₃ P₃\ninst✝² : NormedAddTorsor V₄ P₄\ne : P ≃ᵃⁱ[𝕜] P₂\nα : Type u_12\ninst✝¹ : TopologicalSpace α\ninst✝ : NormedSpace ℝ V\nx y : P\n⊢ dist (↑(pointReflection ℝ x) y) y = 2 * dist x y\n[PROOFSTEP]\nrw [dist_pointReflection_self, Real.norm_two]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃ[𝕜] P₂\n⊢ Continuous ↑f.linear ↔ Continuous ↑f\n[PROOFSTEP]\ninhabit P\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃ[𝕜] P₂\ninhabited_h : Inhabited P\n⊢ Continuous ↑f.linear ↔ Continuous ↑f\n[PROOFSTEP]\nhave :\n  (f.linear : V → V₂) =\n    (AffineIsometryEquiv.vaddConst 𝕜 <| f default).toHomeomorph.symm ∘\n      f ∘ (AffineIsometryEquiv.vaddConst 𝕜 default).toHomeomorph :=\n  by\n  ext v\n  simp only [(AffineIsometryEquiv.coe_toHomeomorph), Function.comp_apply, (AffineMap.map_vadd), eq_self_iff_true,\n    (AffineIsometryEquiv.toHomeomorph_symm), (AffineIsometryEquiv.coe_vaddConst), (vadd_vsub),\n    (AffineIsometryEquiv.coe_vaddConst_symm)]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃ[𝕜] P₂\ninhabited_h : Inhabited P\n⊢ ↑f.linear =\n    ↑(Homeomorph.symm (AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 (↑f default)))) ∘\n      ↑f ∘ ↑(AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 default))\n[PROOFSTEP]\next v\n[GOAL]\ncase h\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃ[𝕜] P₂\ninhabited_h : Inhabited P\nv : V\n⊢ ↑f.linear v =\n    (↑(Homeomorph.symm (AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 (↑f default)))) ∘\n        ↑f ∘ ↑(AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 default)))\n      v\n[PROOFSTEP]\nsimp only [(AffineIsometryEquiv.coe_toHomeomorph), Function.comp_apply, (AffineMap.map_vadd), eq_self_iff_true,\n  (AffineIsometryEquiv.toHomeomorph_symm), (AffineIsometryEquiv.coe_vaddConst), (vadd_vsub),\n  (AffineIsometryEquiv.coe_vaddConst_symm)]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃ[𝕜] P₂\ninhabited_h : Inhabited P\nthis :\n  ↑f.linear =\n    ↑(Homeomorph.symm (AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 (↑f default)))) ∘\n      ↑f ∘ ↑(AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 default))\n⊢ Continuous ↑f.linear ↔ Continuous ↑f\n[PROOFSTEP]\nrw [this]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃ[𝕜] P₂\ninhabited_h : Inhabited P\nthis :\n  ↑f.linear =\n    ↑(Homeomorph.symm (AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 (↑f default)))) ∘\n      ↑f ∘ ↑(AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 default))\n⊢ Continuous\n      (↑(Homeomorph.symm (AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 (↑f default)))) ∘\n        ↑f ∘ ↑(AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 default))) ↔\n    Continuous ↑f\n[PROOFSTEP]\nsimp only [Homeomorph.comp_continuous_iff, Homeomorph.comp_continuous_iff']\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃ[𝕜] P₂\n⊢ IsOpenMap ↑f.linear ↔ IsOpenMap ↑f\n[PROOFSTEP]\ninhabit P\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃ[𝕜] P₂\ninhabited_h : Inhabited P\n⊢ IsOpenMap ↑f.linear ↔ IsOpenMap ↑f\n[PROOFSTEP]\nhave :\n  (f.linear : V → V₂) =\n    (AffineIsometryEquiv.vaddConst 𝕜 <| f default).toHomeomorph.symm ∘\n      f ∘ (AffineIsometryEquiv.vaddConst 𝕜 default).toHomeomorph :=\n  by\n  ext v\n  simp only [(AffineIsometryEquiv.coe_toHomeomorph), Function.comp_apply, (AffineMap.map_vadd), eq_self_iff_true,\n    (AffineIsometryEquiv.toHomeomorph_symm), (AffineIsometryEquiv.coe_vaddConst), (vadd_vsub),\n    (AffineIsometryEquiv.coe_vaddConst_symm)]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃ[𝕜] P₂\ninhabited_h : Inhabited P\n⊢ ↑f.linear =\n    ↑(Homeomorph.symm (AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 (↑f default)))) ∘\n      ↑f ∘ ↑(AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 default))\n[PROOFSTEP]\next v\n[GOAL]\ncase h\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃ[𝕜] P₂\ninhabited_h : Inhabited P\nv : V\n⊢ ↑f.linear v =\n    (↑(Homeomorph.symm (AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 (↑f default)))) ∘\n        ↑f ∘ ↑(AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 default)))\n      v\n[PROOFSTEP]\nsimp only [(AffineIsometryEquiv.coe_toHomeomorph), Function.comp_apply, (AffineMap.map_vadd), eq_self_iff_true,\n  (AffineIsometryEquiv.toHomeomorph_symm), (AffineIsometryEquiv.coe_vaddConst), (vadd_vsub),\n  (AffineIsometryEquiv.coe_vaddConst_symm)]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃ[𝕜] P₂\ninhabited_h : Inhabited P\nthis :\n  ↑f.linear =\n    ↑(Homeomorph.symm (AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 (↑f default)))) ∘\n      ↑f ∘ ↑(AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 default))\n⊢ IsOpenMap ↑f.linear ↔ IsOpenMap ↑f\n[PROOFSTEP]\nrw [this]\n[GOAL]\n𝕜 : Type u_1\nV : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\nV₄ : Type u_6\nP₁ : Type u_7\nP : Type u_8\nP₂ : Type u_9\nP₃ : Type u_10\nP₄ : Type u_11\ninst✝²⁰ : NormedField 𝕜\ninst✝¹⁹ : SeminormedAddCommGroup V\ninst✝¹⁸ : SeminormedAddCommGroup V₁\ninst✝¹⁷ : SeminormedAddCommGroup V₂\ninst✝¹⁶ : SeminormedAddCommGroup V₃\ninst✝¹⁵ : SeminormedAddCommGroup V₄\ninst✝¹⁴ : NormedSpace 𝕜 V\ninst✝¹³ : NormedSpace 𝕜 V₁\ninst✝¹² : NormedSpace 𝕜 V₂\ninst✝¹¹ : NormedSpace 𝕜 V₃\ninst✝¹⁰ : NormedSpace 𝕜 V₄\ninst✝⁹ : PseudoMetricSpace P\ninst✝⁸ : MetricSpace P₁\ninst✝⁷ : PseudoMetricSpace P₂\ninst✝⁶ : PseudoMetricSpace P₃\ninst✝⁵ : PseudoMetricSpace P₄\ninst✝⁴ : NormedAddTorsor V P\ninst✝³ : NormedAddTorsor V₁ P₁\ninst✝² : NormedAddTorsor V₂ P₂\ninst✝¹ : NormedAddTorsor V₃ P₃\ninst✝ : NormedAddTorsor V₄ P₄\nf : P →ᵃ[𝕜] P₂\ninhabited_h : Inhabited P\nthis :\n  ↑f.linear =\n    ↑(Homeomorph.symm (AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 (↑f default)))) ∘\n      ↑f ∘ ↑(AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 default))\n⊢ IsOpenMap\n      (↑(Homeomorph.symm (AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 (↑f default)))) ∘\n        ↑f ∘ ↑(AffineIsometryEquiv.toHomeomorph (AffineIsometryEquiv.vaddConst 𝕜 default))) ↔\n    IsOpenMap ↑f\n[PROOFSTEP]\nsimp only [Homeomorph.comp_isOpenMap_iff, Homeomorph.comp_isOpenMap_iff']\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.AffineIsometry", "llama_tokens": 24801, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7371581741774411, "lm_q2_score": 0.5350984286266116, "lm_q1q2_score": 0.3944521806516108}}
{"text": "[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\n⊢ ↑frobenius (↑verschiebung x) = x * ↑p\n[PROOFSTEP]\nsimp only []\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\n⊢ ↑frobenius (↑verschiebung x) = x * ↑p\n[PROOFSTEP]\nhave : IsPoly p fun {R} [CommRing R] x ↦ frobenius (verschiebung x) :=\n  IsPoly.comp (hg := frobenius_isPoly p) (hf := verschiebung_isPoly)\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nthis : IsPoly p fun {R} [CommRing R] x => ↑frobenius (↑verschiebung x)\n⊢ ↑frobenius (↑verschiebung x) = x * ↑p\n[PROOFSTEP]\nhave : IsPoly p fun {R} [CommRing R] x ↦ x * p := mulN_isPoly p p\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nthis✝ : IsPoly p fun {R} [CommRing R] x => ↑frobenius (↑verschiebung x)\nthis : IsPoly p fun {R} [CommRing R] x => x * ↑p\n⊢ ↑frobenius (↑verschiebung x) = x * ↑p\n[PROOFSTEP]\nghost_calc x\n[GOAL]\ncase refine_3\np : ℕ\nhp : Fact (Nat.Prime p)\nthis✝ : IsPoly p fun {R} [CommRing R] x => ↑frobenius (↑verschiebung x)\nthis : IsPoly p fun {R} [CommRing R] x => x * ↑p\nR : Type u_1\nR._inst : CommRing R\nx : 𝕎 R\n⊢ ∀ (n : ℕ), ↑(ghostComponent n) (↑frobenius (↑verschiebung x)) = ↑(ghostComponent n) (x * ↑p)\n[PROOFSTEP]\nghost_simp [mul_comm]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 (ZMod p)\n⊢ ↑verschiebung x = x * ↑p\n[PROOFSTEP]\nrw [← frobenius_verschiebung, frobenius_zmodp]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\n⊢ coeff (↑p ^ i) i = 1\n[PROOFSTEP]\ninduction' i with i h\n[GOAL]\ncase zero\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\n⊢ coeff (↑p ^ Nat.zero) Nat.zero = 1\n[PROOFSTEP]\nsimp only [Nat.zero_eq, one_coeff_zero, Ne.def, pow_zero]\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nh : coeff (↑p ^ i) i = 1\n⊢ coeff (↑p ^ Nat.succ i) (Nat.succ i) = 1\n[PROOFSTEP]\nrw [pow_succ', ← frobenius_verschiebung, coeff_frobenius_charP, verschiebung_coeff_succ, h, one_pow]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni j : ℕ\nhj : j ≠ i\n⊢ coeff (↑p ^ i) j = 0\n[PROOFSTEP]\ninduction' i with i hi generalizing j\n[GOAL]\ncase zero\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni j✝ : ℕ\nhj✝ : j✝ ≠ i\nj : ℕ\nhj : j ≠ Nat.zero\n⊢ coeff (↑p ^ Nat.zero) j = 0\n[PROOFSTEP]\nrw [Nat.zero_eq, pow_zero, one_coeff_eq_of_pos]\n[GOAL]\ncase zero.hn\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni j✝ : ℕ\nhj✝ : j✝ ≠ i\nj : ℕ\nhj : j ≠ Nat.zero\n⊢ 0 < j\n[PROOFSTEP]\nexact Nat.pos_of_ne_zero hj\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni✝ j✝ : ℕ\nhj✝ : j✝ ≠ i✝\ni : ℕ\nhi : ∀ {j : ℕ}, j ≠ i → coeff (↑p ^ i) j = 0\nj : ℕ\nhj : j ≠ Nat.succ i\n⊢ coeff (↑p ^ Nat.succ i) j = 0\n[PROOFSTEP]\nrw [pow_succ', ← frobenius_verschiebung, coeff_frobenius_charP]\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni✝ j✝ : ℕ\nhj✝ : j✝ ≠ i✝\ni : ℕ\nhi : ∀ {j : ℕ}, j ≠ i → coeff (↑p ^ i) j = 0\nj : ℕ\nhj : j ≠ Nat.succ i\n⊢ coeff (↑verschiebung (↑p ^ i)) j ^ p = 0\n[PROOFSTEP]\ncases j\n[GOAL]\ncase succ.zero\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni✝ j : ℕ\nhj✝ : j ≠ i✝\ni : ℕ\nhi : ∀ {j : ℕ}, j ≠ i → coeff (↑p ^ i) j = 0\nhj : Nat.zero ≠ Nat.succ i\n⊢ coeff (↑verschiebung (↑p ^ i)) Nat.zero ^ p = 0\n[PROOFSTEP]\nrw [verschiebung_coeff_zero, zero_pow]\n[GOAL]\ncase succ.zero\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni✝ j : ℕ\nhj✝ : j ≠ i✝\ni : ℕ\nhi : ∀ {j : ℕ}, j ≠ i → coeff (↑p ^ i) j = 0\nhj : Nat.zero ≠ Nat.succ i\n⊢ 0 < p\n[PROOFSTEP]\nexact Nat.Prime.pos hp.out\n[GOAL]\ncase succ.succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni✝ j : ℕ\nhj✝ : j ≠ i✝\ni : ℕ\nhi : ∀ {j : ℕ}, j ≠ i → coeff (↑p ^ i) j = 0\nn✝ : ℕ\nhj : Nat.succ n✝ ≠ Nat.succ i\n⊢ coeff (↑verschiebung (↑p ^ i)) (Nat.succ n✝) ^ p = 0\n[PROOFSTEP]\nrw [verschiebung_coeff_succ, hi, zero_pow]\n[GOAL]\ncase succ.succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni✝ j : ℕ\nhj✝ : j ≠ i✝\ni : ℕ\nhi : ∀ {j : ℕ}, j ≠ i → coeff (↑p ^ i) j = 0\nn✝ : ℕ\nhj : Nat.succ n✝ ≠ Nat.succ i\n⊢ 0 < p\n[PROOFSTEP]\nexact Nat.Prime.pos hp.out\n[GOAL]\ncase succ.succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni✝ j : ℕ\nhj✝ : j ≠ i✝\ni : ℕ\nhi : ∀ {j : ℕ}, j ≠ i → coeff (↑p ^ i) j = 0\nn✝ : ℕ\nhj : Nat.succ n✝ ≠ Nat.succ i\n⊢ n✝ ≠ i\n[PROOFSTEP]\nexact ne_of_apply_ne (fun j : ℕ => j.succ) hj\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\n⊢ coeff (↑p) i = if i = 1 then 1 else 0\n[PROOFSTEP]\nsplit_ifs with hi\n[GOAL]\ncase pos\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhi : i = 1\n⊢ coeff (↑p) i = 1\n[PROOFSTEP]\nsimpa only [hi, pow_one] using coeff_p_pow p R 1\n[GOAL]\ncase neg\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhi : ¬i = 1\n⊢ coeff (↑p) i = 0\n[PROOFSTEP]\nsimpa only [pow_one] using coeff_p_pow_eq_zero p R hi\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\n⊢ coeff (↑p) 0 = 0\n[PROOFSTEP]\nrw [coeff_p, if_neg]\n[GOAL]\ncase hnc\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\n⊢ ¬0 = 1\n[PROOFSTEP]\nexact zero_ne_one\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\n⊢ coeff (↑p) 1 = 1\n[PROOFSTEP]\nrw [coeff_p, if_pos rfl]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : Nontrivial R\ninst✝ : CharP R p\n⊢ ↑p ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : Nontrivial R\ninst✝ : CharP R p\nh : ↑p = 0\n⊢ False\n[PROOFSTEP]\nsimpa only [h, zero_coeff, zero_ne_one] using coeff_p_one p R\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : Nontrivial R\ninst✝ : CharP R p\n⊢ ↑p ≠ 0\n[PROOFSTEP]\nsimpa using (IsFractionRing.injective (𝕎 R) (FractionRing (𝕎 R))).ne (WittVector.p_nonzero _ _)\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y : 𝕎 R\n⊢ ↑verschiebung (x * ↑frobenius y) = ↑verschiebung x * y\n[PROOFSTEP]\nsimp only []\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y : 𝕎 R\n⊢ ↑verschiebung (x * ↑frobenius y) = ↑verschiebung x * y\n[PROOFSTEP]\nhave : IsPoly₂ p fun {R} [Rcr : CommRing R] x y ↦ verschiebung (x * frobenius y) :=\n  IsPoly.comp₂ (hg := verschiebung_isPoly) (hf :=\n    IsPoly₂.comp (hh := mulIsPoly₂) (hf := idIsPolyI' p) (hg := frobenius_isPoly p))\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y : 𝕎 R\nthis : IsPoly₂ p fun {R} [CommRing R] x y => ↑verschiebung (x * ↑frobenius y)\n⊢ ↑verschiebung (x * ↑frobenius y) = ↑verschiebung x * y\n[PROOFSTEP]\nhave : IsPoly₂ p fun {R} [CommRing R] x y ↦ verschiebung x * y :=\n  IsPoly₂.comp (hh := mulIsPoly₂) (hf := verschiebung_isPoly) (hg := idIsPolyI' p)\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y : 𝕎 R\nthis✝ : IsPoly₂ p fun {R} [CommRing R] x y => ↑verschiebung (x * ↑frobenius y)\nthis : IsPoly₂ p fun {R} [CommRing R] x y => ↑verschiebung x * y\n⊢ ↑verschiebung (x * ↑frobenius y) = ↑verschiebung x * y\n[PROOFSTEP]\nghost_calc x y\n[GOAL]\ncase refine_3\np : ℕ\nhp : Fact (Nat.Prime p)\nthis✝ : IsPoly₂ p fun {R} [CommRing R] x y => ↑verschiebung (x * ↑frobenius y)\nthis : IsPoly₂ p fun {R} [CommRing R] x y => ↑verschiebung x * y\nR : Type u_1\nR._inst : CommRing R\nx y : 𝕎 R\n⊢ ∀ (n : ℕ), ↑(ghostComponent n) (↑verschiebung (x * ↑frobenius y)) = ↑(ghostComponent n) (↑verschiebung x * y)\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase refine_3.zero\np : ℕ\nhp : Fact (Nat.Prime p)\nthis✝ : IsPoly₂ p fun {R} [CommRing R] x y => ↑verschiebung (x * ↑frobenius y)\nthis : IsPoly₂ p fun {R} [CommRing R] x y => ↑verschiebung x * y\nR : Type u_1\nR._inst : CommRing R\nx y : 𝕎 R\n⊢ ↑(ghostComponent Nat.zero) (↑verschiebung (x * ↑frobenius y)) = ↑(ghostComponent Nat.zero) (↑verschiebung x * y)\n[PROOFSTEP]\nghost_simp [mul_assoc]\n[GOAL]\ncase refine_3.succ\np : ℕ\nhp : Fact (Nat.Prime p)\nthis✝ : IsPoly₂ p fun {R} [CommRing R] x y => ↑verschiebung (x * ↑frobenius y)\nthis : IsPoly₂ p fun {R} [CommRing R] x y => ↑verschiebung x * y\nR : Type u_1\nR._inst : CommRing R\nx y : 𝕎 R\nn✝ : ℕ\n⊢ ↑(ghostComponent (Nat.succ n✝)) (↑verschiebung (x * ↑frobenius y)) =\n    ↑(ghostComponent (Nat.succ n✝)) (↑verschiebung x * y)\n[PROOFSTEP]\nghost_simp [mul_assoc]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx : 𝕎 R\n⊢ coeff (x * ↑p) 0 = 0\n[PROOFSTEP]\nrw [← frobenius_verschiebung, coeff_frobenius_charP, verschiebung_coeff_zero, zero_pow]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx : 𝕎 R\n⊢ 0 < p\n[PROOFSTEP]\nexact Nat.Prime.pos hp.out\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx : 𝕎 R\ni : ℕ\n⊢ coeff (x * ↑p) (i + 1) = coeff x i ^ p\n[PROOFSTEP]\nrw [← frobenius_verschiebung, coeff_frobenius_charP, verschiebung_coeff_succ]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx : 𝕎 R\n⊢ ↑verschiebung (↑frobenius x) = x * ↑p\n[PROOFSTEP]\next ⟨i⟩\n[GOAL]\ncase h.zero\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx : 𝕎 R\n⊢ coeff (↑verschiebung (↑frobenius x)) Nat.zero = coeff (x * ↑p) Nat.zero\n[PROOFSTEP]\nrw [mul_charP_coeff_zero, verschiebung_coeff_zero]\n[GOAL]\ncase h.succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx : 𝕎 R\nn✝ : ℕ\n⊢ coeff (↑verschiebung (↑frobenius x)) (Nat.succ n✝) = coeff (x * ↑p) (Nat.succ n✝)\n[PROOFSTEP]\nrw [mul_charP_coeff_succ, verschiebung_coeff_succ, coeff_frobenius_charP]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx : 𝕎 R\n⊢ ↑verschiebung (↑frobenius x) = ↑frobenius (↑verschiebung x)\n[PROOFSTEP]\nrw [verschiebung_frobenius, frobenius_verschiebung]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nn k : ℕ\n⊢ coeff ((↑verschiebung)^[n] x) (k + n) = coeff x k\n[PROOFSTEP]\ninduction' n with k ih\n[GOAL]\ncase zero\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nk : ℕ\n⊢ coeff ((↑verschiebung)^[Nat.zero] x) (k + Nat.zero) = coeff x k\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nk✝ k : ℕ\nih : coeff ((↑verschiebung)^[k] x) (k✝ + k) = coeff x k✝\n⊢ coeff ((↑verschiebung)^[Nat.succ k] x) (k✝ + Nat.succ k) = coeff x k✝\n[PROOFSTEP]\nrw [iterate_succ_apply', Nat.add_succ, verschiebung_coeff_succ]\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nk✝ k : ℕ\nih : coeff ((↑verschiebung)^[k] x) (k✝ + k) = coeff x k✝\n⊢ coeff ((↑verschiebung)^[k] x) (k✝ + k) = coeff x k✝\n[PROOFSTEP]\nexact ih\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y : 𝕎 R\ni : ℕ\n⊢ (↑verschiebung)^[i] x * y = (↑verschiebung)^[i] (x * (↑frobenius)^[i] y)\n[PROOFSTEP]\ninduction' i with i ih generalizing y\n[GOAL]\ncase zero\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y✝ y : 𝕎 R\n⊢ (↑verschiebung)^[Nat.zero] x * y = (↑verschiebung)^[Nat.zero] (x * (↑frobenius)^[Nat.zero] y)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y✝ : 𝕎 R\ni : ℕ\nih : ∀ (y : 𝕎 R), (↑verschiebung)^[i] x * y = (↑verschiebung)^[i] (x * (↑frobenius)^[i] y)\ny : 𝕎 R\n⊢ (↑verschiebung)^[Nat.succ i] x * y = (↑verschiebung)^[Nat.succ i] (x * (↑frobenius)^[Nat.succ i] y)\n[PROOFSTEP]\nrw [iterate_succ_apply', ← verschiebung_mul_frobenius, ih, iterate_succ_apply']\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y✝ : 𝕎 R\ni : ℕ\nih : ∀ (y : 𝕎 R), (↑verschiebung)^[i] x * y = (↑verschiebung)^[i] (x * (↑frobenius)^[i] y)\ny : 𝕎 R\n⊢ ↑verschiebung ((↑verschiebung)^[i] (x * (↑frobenius)^[i] (↑frobenius y))) =\n    ↑verschiebung ((↑verschiebung)^[i] (x * (↑frobenius)^[Nat.succ i] y))\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ (↑verschiebung)^[i] x * (↑verschiebung)^[j] y = (↑verschiebung)^[i + j] ((↑frobenius)^[j] x * (↑frobenius)^[i] y)\n[PROOFSTEP]\ncalc\n  _ = verschiebung^[i] (x * frobenius^[i] (verschiebung^[j] y)) := ?_\n  _ = verschiebung^[i] (x * verschiebung^[j] (frobenius^[i] y)) := ?_\n  _ = verschiebung^[i] (verschiebung^[j] (frobenius^[i] y) * x) := ?_\n  _ = verschiebung^[i] (verschiebung^[j] (frobenius^[i] y * frobenius^[j] x)) := ?_\n  _ = verschiebung^[i + j] (frobenius^[i] y * frobenius^[j] x) := ?_\n  _ = _ := ?_\n[GOAL]\ncase calc_1\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ (↑verschiebung)^[i] x * (↑verschiebung)^[j] y = (↑verschiebung)^[i] (x * (↑frobenius)^[i] ((↑verschiebung)^[j] y))\n[PROOFSTEP]\napply iterate_verschiebung_mul_left\n[GOAL]\ncase calc_2\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ (↑verschiebung)^[i] (x * (↑frobenius)^[i] ((↑verschiebung)^[j] y)) =\n    (↑verschiebung)^[i] (x * (↑verschiebung)^[j] ((↑frobenius)^[i] y))\n[PROOFSTEP]\nrw [verschiebung_frobenius_comm.iterate_iterate]\n[GOAL]\ncase calc_3\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ (↑verschiebung)^[i] (x * (↑verschiebung)^[j] ((↑frobenius)^[i] y)) =\n    (↑verschiebung)^[i] ((↑verschiebung)^[j] ((↑frobenius)^[i] y) * x)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase calc_4\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ (↑verschiebung)^[i] ((↑verschiebung)^[j] ((↑frobenius)^[i] y) * x) =\n    (↑verschiebung)^[i] ((↑verschiebung)^[j] ((↑frobenius)^[i] y * (↑frobenius)^[j] x))\n[PROOFSTEP]\nrw [iterate_verschiebung_mul_left]\n[GOAL]\ncase calc_5\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ (↑verschiebung)^[i] ((↑verschiebung)^[j] ((↑frobenius)^[i] y * (↑frobenius)^[j] x)) =\n    (↑verschiebung)^[i + j] ((↑frobenius)^[i] y * (↑frobenius)^[j] x)\n[PROOFSTEP]\nrw [iterate_add_apply]\n[GOAL]\ncase calc_6\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ (↑verschiebung)^[i + j] ((↑frobenius)^[i] y * (↑frobenius)^[j] x) =\n    (↑verschiebung)^[i + j] ((↑frobenius)^[j] x * (↑frobenius)^[i] y)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx : 𝕎 R\ni k : ℕ\n⊢ coeff ((↑frobenius)^[i] x) k = coeff x k ^ p ^ i\n[PROOFSTEP]\ninduction' i with i ih\n[GOAL]\ncase zero\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx : 𝕎 R\nk : ℕ\n⊢ coeff ((↑frobenius)^[Nat.zero] x) k = coeff x k ^ p ^ Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx : 𝕎 R\nk i : ℕ\nih : coeff ((↑frobenius)^[i] x) k = coeff x k ^ p ^ i\n⊢ coeff ((↑frobenius)^[Nat.succ i] x) k = coeff x k ^ p ^ Nat.succ i\n[PROOFSTEP]\nrw [iterate_succ_apply', coeff_frobenius_charP, ih, Nat.pow_succ]\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx : 𝕎 R\nk i : ℕ\nih : coeff ((↑frobenius)^[i] x) k = coeff x k ^ p ^ i\n⊢ (coeff x k ^ p ^ i) ^ p = coeff x k ^ (p ^ i * p)\n[PROOFSTEP]\nring_nf\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ coeff ((↑verschiebung)^[i] x * (↑verschiebung)^[j] y) (i + j) = coeff x 0 ^ p ^ j * coeff y 0 ^ p ^ i\n[PROOFSTEP]\ncalc\n  _ = (verschiebung^[i + j] (frobenius^[j] x * frobenius^[i] y)).coeff (i + j) := ?_\n  _ = (frobenius^[j] x * frobenius^[i] y).coeff 0 := ?_\n  _ = (frobenius^[j] x).coeff 0 * (frobenius^[i] y).coeff 0 := ?_\n  _ = _ := ?_\n[GOAL]\ncase calc_1\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ coeff ((↑verschiebung)^[i] x * (↑verschiebung)^[j] y) (i + j) =\n    coeff ((↑verschiebung)^[i + j] ((↑frobenius)^[j] x * (↑frobenius)^[i] y)) (i + j)\n[PROOFSTEP]\nrw [iterate_verschiebung_mul]\n[GOAL]\ncase calc_2\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ coeff ((↑verschiebung)^[i + j] ((↑frobenius)^[j] x * (↑frobenius)^[i] y)) (i + j) =\n    coeff ((↑frobenius)^[j] x * (↑frobenius)^[i] y) 0\n[PROOFSTEP]\nconvert iterate_verschiebung_coeff (p := p) (R := R) _ _ _ using 2\n[GOAL]\ncase h.e'_2.h.e'_4\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ i + j = 0 + (i + j)\n[PROOFSTEP]\nrw [zero_add]\n[GOAL]\ncase calc_3\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ coeff ((↑frobenius)^[j] x * (↑frobenius)^[i] y) 0 = coeff ((↑frobenius)^[j] x) 0 * coeff ((↑frobenius)^[i] y) 0\n[PROOFSTEP]\napply mul_coeff_zero\n[GOAL]\ncase calc_4\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝¹ : CommRing R\ninst✝ : CharP R p\nx y : 𝕎 R\ni j : ℕ\n⊢ coeff ((↑frobenius)^[j] x) 0 * coeff ((↑frobenius)^[i] y) 0 = coeff x 0 ^ p ^ j * coeff y 0 ^ p ^ i\n[PROOFSTEP]\nsimp only [iterate_frobenius_coeff]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.WittVector.Identities", "llama_tokens": 9631, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7371581510799253, "lm_q2_score": 0.5350984286266116, "lm_q1q2_score": 0.3944521682921664}}
{"text": "[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.962\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : OrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nhf : ConvexOn 𝕜 s f\nh₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nh₁ : 0 < ∑ i in t, w i\nhmem : ∀ (i : ι), i ∈ t → p i ∈ s\n⊢ f (centerMass t w p) ≤ centerMass t w (f ∘ p)\n[PROOFSTEP]\nhave hmem' : ∀ i ∈ t, (p i, (f ∘ p) i) ∈ {p : E × β | p.1 ∈ s ∧ f p.1 ≤ p.2} := fun i hi => ⟨hmem i hi, le_rfl⟩\n[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.962\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : OrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nhf : ConvexOn 𝕜 s f\nh₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nh₁ : 0 < ∑ i in t, w i\nhmem : ∀ (i : ι), i ∈ t → p i ∈ s\nhmem' : ∀ (i : ι), i ∈ t → (p i, (f ∘ p) i) ∈ {p | p.fst ∈ s ∧ f p.fst ≤ p.snd}\n⊢ f (centerMass t w p) ≤ centerMass t w (f ∘ p)\n[PROOFSTEP]\nconvert (hf.convex_epigraph.centerMass_mem h₀ h₁ hmem').2\n[GOAL]\ncase h.e'_3.h.e'_1\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.962\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : OrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nhf : ConvexOn 𝕜 s f\nh₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nh₁ : 0 < ∑ i in t, w i\nhmem : ∀ (i : ι), i ∈ t → p i ∈ s\nhmem' : ∀ (i : ι), i ∈ t → (p i, (f ∘ p) i) ∈ {p | p.fst ∈ s ∧ f p.fst ≤ p.snd}\n⊢ centerMass t w p = (centerMass t (fun i => w i) fun i => (p i, (f ∘ p) i)).fst\n[PROOFSTEP]\nsimp only [centerMass, Function.comp, Prod.smul_fst, Prod.fst_sum, Prod.smul_snd, Prod.snd_sum]\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.962\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : OrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nhf : ConvexOn 𝕜 s f\nh₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nh₁ : 0 < ∑ i in t, w i\nhmem : ∀ (i : ι), i ∈ t → p i ∈ s\nhmem' : ∀ (i : ι), i ∈ t → (p i, (f ∘ p) i) ∈ {p | p.fst ∈ s ∧ f p.fst ≤ p.snd}\n⊢ centerMass t w (f ∘ p) = (centerMass t (fun i => w i) fun i => (p i, (f ∘ p) i)).snd\n[PROOFSTEP]\nsimp only [centerMass, Function.comp, Prod.smul_fst, Prod.fst_sum, Prod.smul_snd, Prod.snd_sum]\n[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.21511\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : OrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nhf : ConvexOn 𝕜 s f\nh₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nh₁ : ∑ i in t, w i = 1\nhmem : ∀ (i : ι), i ∈ t → p i ∈ s\n⊢ f (∑ i in t, w i • p i) ≤ ∑ i in t, w i • f (p i)\n[PROOFSTEP]\nsimpa only [centerMass, h₁, inv_one, one_smul] using hf.map_centerMass_le h₀ (h₁.symm ▸ zero_lt_one) hmem\n[GOAL]\n𝕜 : Type u_3\nE : Type u_1\nF : Type ?u.35782\nβ : Type u_2\nι : Type ?u.35788\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns✝ : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx : E\ns : Finset E\nhf : ConvexOn 𝕜 (↑(convexHull 𝕜) ↑s) f\nhx : x ∈ ↑(convexHull 𝕜) ↑s\n⊢ f x ≤ sup' s (_ : Finset.Nonempty s) f\n[PROOFSTEP]\nobtain ⟨w, hw₀, hw₁, rfl⟩ := mem_convexHull.1 hx\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_3\nE : Type u_1\nF : Type ?u.35782\nβ : Type u_2\nι : Type ?u.35788\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns✝ : Set E\nf : E → β\nt : Finset ι\nw✝ : ι → 𝕜\np : ι → E\ns : Finset E\nhf : ConvexOn 𝕜 (↑(convexHull 𝕜) ↑s) f\nw : E → 𝕜\nhw₀ : ∀ (y : E), y ∈ s → 0 ≤ w y\nhw₁ : ∑ y in s, w y = 1\nhx : centerMass s w _root_.id ∈ ↑(convexHull 𝕜) ↑s\n⊢ f (centerMass s w _root_.id) ≤ sup' s (_ : Finset.Nonempty s) f\n[PROOFSTEP]\nexact (hf.map_centerMass_le hw₀ (by positivity) <| subset_convexHull _ _).trans (centerMass_le_sup hw₀ <| by positivity)\n[GOAL]\n𝕜 : Type u_3\nE : Type u_1\nF : Type ?u.35782\nβ : Type u_2\nι : Type ?u.35788\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns✝ : Set E\nf : E → β\nt : Finset ι\nw✝ : ι → 𝕜\np : ι → E\ns : Finset E\nhf : ConvexOn 𝕜 (↑(convexHull 𝕜) ↑s) f\nw : E → 𝕜\nhw₀ : ∀ (y : E), y ∈ s → 0 ≤ w y\nhw₁ : ∑ y in s, w y = 1\nhx : centerMass s w _root_.id ∈ ↑(convexHull 𝕜) ↑s\n⊢ 0 < ∑ i in s, w i\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_3\nE : Type u_1\nF : Type ?u.35782\nβ : Type u_2\nι : Type ?u.35788\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns✝ : Set E\nf : E → β\nt : Finset ι\nw✝ : ι → 𝕜\np : ι → E\ns : Finset E\nhf : ConvexOn 𝕜 (↑(convexHull 𝕜) ↑s) f\nw : E → 𝕜\nhw₀ : ∀ (y : E), y ∈ s → 0 ≤ w y\nhw₁ : ∑ y in s, w y = 1\nhx : centerMass s w _root_.id ∈ ↑(convexHull 𝕜) ↑s\n⊢ 0 < ∑ i in s, w i\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.90866\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx : E\nh : ConvexOn 𝕜 s f\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : 0 < ∑ i in t, w i\nhp : ∀ (i : ι), i ∈ t → p i ∈ s\n⊢ ∃ i, i ∈ t ∧ f (centerMass t w p) ≤ f (p i)\n[PROOFSTEP]\nset y := t.centerMass w p\n[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.90866\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx : E\nh : ConvexOn 𝕜 s f\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : 0 < ∑ i in t, w i\nhp : ∀ (i : ι), i ∈ t → p i ∈ s\ny : E := centerMass t w p\n⊢ ∃ i, i ∈ t ∧ f y ≤ f (p i)\n[PROOFSTEP]\nobtain ⟨i, hi, hfi⟩ : ∃ i ∈ t.filter fun i => w i ≠ 0, w i • f y ≤ w i • (f ∘ p) i\n[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.90866\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx : E\nh : ConvexOn 𝕜 s f\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : 0 < ∑ i in t, w i\nhp : ∀ (i : ι), i ∈ t → p i ∈ s\ny : E := centerMass t w p\n⊢ ∃ i, i ∈ filter (fun i => w i ≠ 0) t ∧ w i • f y ≤ w i • (f ∘ p) i\ncase intro.intro\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.90866\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx : E\nh : ConvexOn 𝕜 s f\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : 0 < ∑ i in t, w i\nhp : ∀ (i : ι), i ∈ t → p i ∈ s\ny : E := centerMass t w p\ni : ι\nhi : i ∈ filter (fun i => w i ≠ 0) t\nhfi : w i • f y ≤ w i • (f ∘ p) i\n⊢ ∃ i, i ∈ t ∧ f y ≤ f (p i)\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase intro.intro\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.90866\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx : E\nh : ConvexOn 𝕜 s f\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : 0 < ∑ i in t, w i\nhp : ∀ (i : ι), i ∈ t → p i ∈ s\ny : E := centerMass t w p\ni : ι\nhi : i ∈ filter (fun i => w i ≠ 0) t\nhfi : w i • f y ≤ w i • (f ∘ p) i\n⊢ ∃ i, i ∈ t ∧ f y ≤ f (p i)\n[PROOFSTEP]\nrw [mem_filter] at hi \n[GOAL]\ncase intro.intro\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.90866\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx : E\nh : ConvexOn 𝕜 s f\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : 0 < ∑ i in t, w i\nhp : ∀ (i : ι), i ∈ t → p i ∈ s\ny : E := centerMass t w p\ni : ι\nhi : i ∈ t ∧ w i ≠ 0\nhfi : w i • f y ≤ w i • (f ∘ p) i\n⊢ ∃ i, i ∈ t ∧ f y ≤ f (p i)\n[PROOFSTEP]\nexact ⟨i, hi.1, (smul_le_smul_iff_of_pos <| (hw₀ i hi.1).lt_of_ne hi.2.symm).1 hfi⟩\n[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.90866\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx : E\nh : ConvexOn 𝕜 s f\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : 0 < ∑ i in t, w i\nhp : ∀ (i : ι), i ∈ t → p i ∈ s\ny : E := centerMass t w p\n⊢ ∃ i, i ∈ filter (fun i => w i ≠ 0) t ∧ w i • f y ≤ w i • (f ∘ p) i\n[PROOFSTEP]\nhave hw' : (0 : 𝕜) < ∑ i in filter (fun i => w i ≠ 0) t, w i := by rwa [sum_filter_ne_zero]\n[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.90866\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx : E\nh : ConvexOn 𝕜 s f\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : 0 < ∑ i in t, w i\nhp : ∀ (i : ι), i ∈ t → p i ∈ s\ny : E := centerMass t w p\n⊢ 0 < ∑ i in filter (fun i => w i ≠ 0) t, w i\n[PROOFSTEP]\nrwa [sum_filter_ne_zero]\n[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.90866\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx : E\nh : ConvexOn 𝕜 s f\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : 0 < ∑ i in t, w i\nhp : ∀ (i : ι), i ∈ t → p i ∈ s\ny : E := centerMass t w p\nhw' : 0 < ∑ i in filter (fun i => w i ≠ 0) t, w i\n⊢ ∃ i, i ∈ filter (fun i => w i ≠ 0) t ∧ w i • f y ≤ w i • (f ∘ p) i\n[PROOFSTEP]\nrefine' exists_le_of_sum_le (nonempty_of_sum_ne_zero hw'.ne') _\n[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.90866\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx : E\nh : ConvexOn 𝕜 s f\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : 0 < ∑ i in t, w i\nhp : ∀ (i : ι), i ∈ t → p i ∈ s\ny : E := centerMass t w p\nhw' : 0 < ∑ i in filter (fun i => w i ≠ 0) t, w i\n⊢ ∑ i in filter (fun i => w i ≠ 0) t, w i • f y ≤ ∑ i in filter (fun i => w i ≠ 0) t, w i • (f ∘ p) i\n[PROOFSTEP]\nrw [← sum_smul, ← smul_le_smul_iff_of_pos (inv_pos.2 hw'), inv_smul_smul₀ hw'.ne', ← Finset.centerMass,\n  Finset.centerMass_filter_ne_zero]\n[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.90866\nβ : Type u_1\nι : Type u_4\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx : E\nh : ConvexOn 𝕜 s f\nhw₀ : ∀ (i : ι), i ∈ t → 0 ≤ w i\nhw₁ : 0 < ∑ i in t, w i\nhp : ∀ (i : ι), i ∈ t → p i ∈ s\ny : E := centerMass t w p\nhw' : 0 < ∑ i in filter (fun i => w i ≠ 0) t, w i\n⊢ f y ≤ centerMass t (fun i => w i) fun i => (f ∘ p) i\n[PROOFSTEP]\nexact h.map_centerMass_le hw₀ hw₁ hp\n[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.105120\nβ : Type u_1\nι : Type ?u.105126\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx✝ : E\nhf : ConvexOn 𝕜 (↑(convexHull 𝕜) s) f\nx : E\nhx : x ∈ ↑(convexHull 𝕜) s\n⊢ ∃ y, y ∈ s ∧ f x ≤ f y\n[PROOFSTEP]\nrw [_root_.convexHull_eq] at hx \n[GOAL]\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.105120\nβ : Type u_1\nι : Type ?u.105126\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt : Finset ι\nw : ι → 𝕜\np : ι → E\nx✝ : E\nhf : ConvexOn 𝕜 (↑(convexHull 𝕜) s) f\nx : E\nhx : x ∈ {x | ∃ ι t w z x_1 x_2 x_3, centerMass t w z = x}\n⊢ ∃ y, y ∈ s ∧ f x ≤ f y\n[PROOFSTEP]\nobtain ⟨α, t, w, p, hw₀, hw₁, hp, rfl⟩ := hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.105120\nβ : Type u_1\nι : Type ?u.105126\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt✝ : Finset ι\nw✝ : ι → 𝕜\np✝ : ι → E\nx : E\nhf : ConvexOn 𝕜 (↑(convexHull 𝕜) s) f\nα : Type\nt : Finset α\nw : α → 𝕜\np : α → E\nhw₀ : ∀ (i : α), i ∈ t → 0 ≤ w i\nhw₁ : ∑ i in t, w i = 1\nhp : ∀ (i : α), i ∈ t → p i ∈ s\n⊢ ∃ y, y ∈ s ∧ f (centerMass t w p) ≤ f y\n[PROOFSTEP]\nrcases hf.exists_ge_of_centerMass hw₀ (hw₁.symm ▸ zero_lt_one) fun i hi => subset_convexHull 𝕜 s (hp i hi) with\n  ⟨i, hit, Hi⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_3\nE : Type u_2\nF : Type ?u.105120\nβ : Type u_1\nι : Type ?u.105126\ninst✝⁵ : LinearOrderedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 β\ninst✝ : OrderedSMul 𝕜 β\ns : Set E\nf : E → β\nt✝ : Finset ι\nw✝ : ι → 𝕜\np✝ : ι → E\nx : E\nhf : ConvexOn 𝕜 (↑(convexHull 𝕜) s) f\nα : Type\nt : Finset α\nw : α → 𝕜\np : α → E\nhw₀ : ∀ (i : α), i ∈ t → 0 ≤ w i\nhw₁ : ∑ i in t, w i = 1\nhp : ∀ (i : α), i ∈ t → p i ∈ s\ni : α\nhit : i ∈ t\nHi : f (centerMass t (fun i => w i) fun i => p i) ≤ f (p i)\n⊢ ∃ y, y ∈ s ∧ f (centerMass t w p) ≤ f y\n[PROOFSTEP]\nexact ⟨p i, hp i hit, Hi⟩\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Jensen", "llama_tokens": 7815, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6654105454764747, "lm_q2_score": 0.5926665999540698, "lm_q1q2_score": 0.3943666055611252}}
{"text": "[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (i : ι) → M i →ₗ[R] N\nc : R\nf : Π₀ (i : ι), M i\n⊢ AddHom.toFun\n      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n        map_add' :=\n          (_ :\n            ∀ (a b : Π₀ (i : ι), M i),\n              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n      (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n          map_add' :=\n            (_ :\n              ∀ (a b : Π₀ (i : ι), M i),\n                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n        f\n[PROOFSTEP]\ndsimp\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (i : ι) → M i →ₗ[R] N\nc : R\nf : Π₀ (i : ι), M i\n⊢ ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (c • f) =\n    c • ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) f\n[PROOFSTEP]\napply DFinsupp.induction f\n[GOAL]\ncase h0\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (i : ι) → M i →ₗ[R] N\nc : R\nf : Π₀ (i : ι), M i\n⊢ ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (c • 0) =\n    c • ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) 0\n[PROOFSTEP]\nrw [smul_zero, AddMonoidHom.map_zero, smul_zero]\n[GOAL]\ncase ha\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (i : ι) → M i →ₗ[R] N\nc : R\nf : Π₀ (i : ι), M i\n⊢ ∀ (i : ι) (b : M i) (f : Π₀ (i : ι), M i),\n    ↑f i = 0 →\n      b ≠ 0 →\n        ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (c • f) =\n            c • ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) f →\n          ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (c • (single i b + f)) =\n            c • ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (single i b + f)\n[PROOFSTEP]\nintro a b f _ _ hf\n[GOAL]\ncase ha\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (i : ι) → M i →ₗ[R] N\nc : R\nf✝ : Π₀ (i : ι), M i\na : ι\nb : M a\nf : Π₀ (i : ι), M i\na✝¹ : ↑f a = 0\na✝ : b ≠ 0\nhf :\n  ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (c • f) =\n    c • ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) f\n⊢ ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (c • (single a b + f)) =\n    c • ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)) (single a b + f)\n[PROOFSTEP]\nrw [smul_add, AddMonoidHom.map_add, AddMonoidHom.map_add, smul_add, hf, ← single_smul, sumAddHom_single,\n  sumAddHom_single, LinearMap.toAddMonoidHom_coe, LinearMap.map_smul]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF G : (i : ι) → M i →ₗ[R] N\n⊢ (fun F =>\n        {\n          toAddHom :=\n            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n              map_add' :=\n                (_ :\n                  ∀ (a b : Π₀ (i : ι), M i),\n                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n          map_smul' :=\n            (_ :\n              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                AddHom.toFun\n                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : Π₀ (i : ι), M i),\n                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                    (c • f) =\n                  ↑(RingHom.id R) c •\n                    AddHom.toFun\n                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : Π₀ (i : ι), M i),\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                      f) })\n      (F + G) =\n    (fun F =>\n          {\n            toAddHom :=\n              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                map_add' :=\n                  (_ :\n                    ∀ (a b : Π₀ (i : ι), M i),\n                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                  AddHom.toFun\n                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : Π₀ (i : ι), M i),\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                      (c • f) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                          map_add' :=\n                            (_ :\n                              ∀ (a b : Π₀ (i : ι), M i),\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                        f) })\n        F +\n      (fun F =>\n          {\n            toAddHom :=\n              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                map_add' :=\n                  (_ :\n                    ∀ (a b : Π₀ (i : ι), M i),\n                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                  AddHom.toFun\n                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : Π₀ (i : ι), M i),\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                      (c • f) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                          map_add' :=\n                            (_ :\n                              ∀ (a b : Π₀ (i : ι), M i),\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                        f) })\n        G\n[PROOFSTEP]\nrefine DFinsupp.lhom_ext' (fun i ↦ ?_)\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF G : (i : ι) → M i →ₗ[R] N\ni : ι\n⊢ LinearMap.comp\n      ((fun F =>\n          {\n            toAddHom :=\n              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                map_add' :=\n                  (_ :\n                    ∀ (a b : Π₀ (i : ι), M i),\n                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                  AddHom.toFun\n                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : Π₀ (i : ι), M i),\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                      (c • f) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                          map_add' :=\n                            (_ :\n                              ∀ (a b : Π₀ (i : ι), M i),\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                        f) })\n        (F + G))\n      (lsingle i) =\n    LinearMap.comp\n      ((fun F =>\n            {\n              toAddHom :=\n                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                  map_add' :=\n                    (_ :\n                      ∀ (a b : Π₀ (i : ι), M i),\n                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n              map_smul' :=\n                (_ :\n                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                    AddHom.toFun\n                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                          map_add' :=\n                            (_ :\n                              ∀ (a b : Π₀ (i : ι), M i),\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                        (c • f) =\n                      ↑(RingHom.id R) c •\n                        AddHom.toFun\n                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : Π₀ (i : ι), M i),\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                          f) })\n          F +\n        (fun F =>\n            {\n              toAddHom :=\n                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                  map_add' :=\n                    (_ :\n                      ∀ (a b : Π₀ (i : ι), M i),\n                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n              map_smul' :=\n                (_ :\n                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                    AddHom.toFun\n                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                          map_add' :=\n                            (_ :\n                              ∀ (a b : Π₀ (i : ι), M i),\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                        (c • f) =\n                      ↑(RingHom.id R) c •\n                        AddHom.toFun\n                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : Π₀ (i : ι), M i),\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                          f) })\n          G)\n      (lsingle i)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF G : (i : ι) → M i →ₗ[R] N\ni : ι\nx✝ : M i\n⊢ ↑(LinearMap.comp\n          ((fun F =>\n              {\n                toAddHom :=\n                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                    map_add' :=\n                      (_ :\n                        ∀ (a b : Π₀ (i : ι), M i),\n                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                map_smul' :=\n                  (_ :\n                    ∀ (c : R) (f : Π₀ (i : ι), M i),\n                      AddHom.toFun\n                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : Π₀ (i : ι), M i),\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                          (c • f) =\n                        ↑(RingHom.id R) c •\n                          AddHom.toFun\n                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : Π₀ (i : ι), M i),\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                            f) })\n            (F + G))\n          (lsingle i))\n      x✝ =\n    ↑(LinearMap.comp\n          ((fun F =>\n                {\n                  toAddHom :=\n                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : Π₀ (i : ι), M i),\n                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (c : R) (f : Π₀ (i : ι), M i),\n                        AddHom.toFun\n                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : Π₀ (i : ι), M i),\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                            (c • f) =\n                          ↑(RingHom.id R) c •\n                            AddHom.toFun\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                              f) })\n              F +\n            (fun F =>\n                {\n                  toAddHom :=\n                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : Π₀ (i : ι), M i),\n                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (c : R) (f : Π₀ (i : ι), M i),\n                        AddHom.toFun\n                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : Π₀ (i : ι), M i),\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                            (c • f) =\n                          ↑(RingHom.id R) c •\n                            AddHom.toFun\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                              f) })\n              G)\n          (lsingle i))\n      x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nc : S\nF : (i : ι) → M i →ₗ[R] N\n⊢ AddHom.toFun\n      {\n        toFun := fun F =>\n          {\n            toAddHom :=\n              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                map_add' :=\n                  (_ :\n                    ∀ (a b : Π₀ (i : ι), M i),\n                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                  AddHom.toFun\n                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : Π₀ (i : ι), M i),\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                      (c • f) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                          map_add' :=\n                            (_ :\n                              ∀ (a b : Π₀ (i : ι), M i),\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                        f) },\n        map_add' :=\n          (_ :\n            ∀ (F G : (i : ι) → M i →ₗ[R] N),\n              (fun F =>\n                    {\n                      toAddHom :=\n                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                          map_add' :=\n                            (_ :\n                              ∀ (a b : Π₀ (i : ι), M i),\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                      map_smul' :=\n                        (_ :\n                          ∀ (c : R) (f : Π₀ (i : ι), M i),\n                            AddHom.toFun\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                (c • f) =\n                              ↑(RingHom.id R) c •\n                                AddHom.toFun\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                  f) })\n                  (F + G) =\n                (fun F =>\n                      {\n                        toAddHom :=\n                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : Π₀ (i : ι), M i),\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                              AddHom.toFun\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                  (c • f) =\n                                ↑(RingHom.id R) c •\n                                  AddHom.toFun\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                    f) })\n                    F +\n                  (fun F =>\n                      {\n                        toAddHom :=\n                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : Π₀ (i : ι), M i),\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                              AddHom.toFun\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                  (c • f) =\n                                ↑(RingHom.id R) c •\n                                  AddHom.toFun\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                    f) })\n                    G) }\n      (c • F) =\n    ↑(RingHom.id S) c •\n      AddHom.toFun\n        {\n          toFun := fun F =>\n            {\n              toAddHom :=\n                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                  map_add' :=\n                    (_ :\n                      ∀ (a b : Π₀ (i : ι), M i),\n                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n              map_smul' :=\n                (_ :\n                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                    AddHom.toFun\n                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                          map_add' :=\n                            (_ :\n                              ∀ (a b : Π₀ (i : ι), M i),\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                        (c • f) =\n                      ↑(RingHom.id R) c •\n                        AddHom.toFun\n                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : Π₀ (i : ι), M i),\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                          f) },\n          map_add' :=\n            (_ :\n              ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                (fun F =>\n                      {\n                        toAddHom :=\n                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : Π₀ (i : ι), M i),\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                              AddHom.toFun\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                  (c • f) =\n                                ↑(RingHom.id R) c •\n                                  AddHom.toFun\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                    f) })\n                    (F + G) =\n                  (fun F =>\n                        {\n                          toAddHom :=\n                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : Π₀ (i : ι), M i),\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                AddHom.toFun\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                    (c • f) =\n                                  ↑(RingHom.id R) c •\n                                    AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      f) })\n                      F +\n                    (fun F =>\n                        {\n                          toAddHom :=\n                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : Π₀ (i : ι), M i),\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                AddHom.toFun\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                    (c • f) =\n                                  ↑(RingHom.id R) c •\n                                    AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      f) })\n                      G) }\n        F\n[PROOFSTEP]\nrefine DFinsupp.lhom_ext' (fun i ↦ ?_)\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nc : S\nF : (i : ι) → M i →ₗ[R] N\ni : ι\n⊢ LinearMap.comp\n      (AddHom.toFun\n        {\n          toFun := fun F =>\n            {\n              toAddHom :=\n                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                  map_add' :=\n                    (_ :\n                      ∀ (a b : Π₀ (i : ι), M i),\n                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n              map_smul' :=\n                (_ :\n                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                    AddHom.toFun\n                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                          map_add' :=\n                            (_ :\n                              ∀ (a b : Π₀ (i : ι), M i),\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                        (c • f) =\n                      ↑(RingHom.id R) c •\n                        AddHom.toFun\n                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : Π₀ (i : ι), M i),\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                          f) },\n          map_add' :=\n            (_ :\n              ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                (fun F =>\n                      {\n                        toAddHom :=\n                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : Π₀ (i : ι), M i),\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                              AddHom.toFun\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                  (c • f) =\n                                ↑(RingHom.id R) c •\n                                  AddHom.toFun\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                    f) })\n                    (F + G) =\n                  (fun F =>\n                        {\n                          toAddHom :=\n                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : Π₀ (i : ι), M i),\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                AddHom.toFun\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                    (c • f) =\n                                  ↑(RingHom.id R) c •\n                                    AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      f) })\n                      F +\n                    (fun F =>\n                        {\n                          toAddHom :=\n                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : Π₀ (i : ι), M i),\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                AddHom.toFun\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                    (c • f) =\n                                  ↑(RingHom.id R) c •\n                                    AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      f) })\n                      G) }\n        (c • F))\n      (lsingle i) =\n    LinearMap.comp\n      (↑(RingHom.id S) c •\n        AddHom.toFun\n          {\n            toFun := fun F =>\n              {\n                toAddHom :=\n                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                    map_add' :=\n                      (_ :\n                        ∀ (a b : Π₀ (i : ι), M i),\n                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                map_smul' :=\n                  (_ :\n                    ∀ (c : R) (f : Π₀ (i : ι), M i),\n                      AddHom.toFun\n                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : Π₀ (i : ι), M i),\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                          (c • f) =\n                        ↑(RingHom.id R) c •\n                          AddHom.toFun\n                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : Π₀ (i : ι), M i),\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                            f) },\n            map_add' :=\n              (_ :\n                ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                  (fun F =>\n                        {\n                          toAddHom :=\n                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : Π₀ (i : ι), M i),\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                AddHom.toFun\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                    (c • f) =\n                                  ↑(RingHom.id R) c •\n                                    AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      f) })\n                      (F + G) =\n                    (fun F =>\n                          {\n                            toAddHom :=\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                  AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      (c • f) =\n                                    ↑(RingHom.id R) c •\n                                      AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        f) })\n                        F +\n                      (fun F =>\n                          {\n                            toAddHom :=\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                  AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      (c • f) =\n                                    ↑(RingHom.id R) c •\n                                      AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        f) })\n                        G) }\n          F)\n      (lsingle i)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nc : S\nF : (i : ι) → M i →ₗ[R] N\ni : ι\nx✝ : M i\n⊢ ↑(LinearMap.comp\n          (AddHom.toFun\n            {\n              toFun := fun F =>\n                {\n                  toAddHom :=\n                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : Π₀ (i : ι), M i),\n                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (c : R) (f : Π₀ (i : ι), M i),\n                        AddHom.toFun\n                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : Π₀ (i : ι), M i),\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                            (c • f) =\n                          ↑(RingHom.id R) c •\n                            AddHom.toFun\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                              f) },\n              map_add' :=\n                (_ :\n                  ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                    (fun F =>\n                          {\n                            toAddHom :=\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                  AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      (c • f) =\n                                    ↑(RingHom.id R) c •\n                                      AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        f) })\n                        (F + G) =\n                      (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                    AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        (c • f) =\n                                      ↑(RingHom.id R) c •\n                                        AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          f) })\n                          F +\n                        (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                    AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        (c • f) =\n                                      ↑(RingHom.id R) c •\n                                        AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          f) })\n                          G) }\n            (c • F))\n          (lsingle i))\n      x✝ =\n    ↑(LinearMap.comp\n          (↑(RingHom.id S) c •\n            AddHom.toFun\n              {\n                toFun := fun F =>\n                  {\n                    toAddHom :=\n                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : Π₀ (i : ι), M i),\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (c : R) (f : Π₀ (i : ι), M i),\n                          AddHom.toFun\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                              (c • f) =\n                            ↑(RingHom.id R) c •\n                              AddHom.toFun\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                f) },\n                map_add' :=\n                  (_ :\n                    ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                      (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                    AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        (c • f) =\n                                      ↑(RingHom.id R) c •\n                                        AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          f) })\n                          (F + G) =\n                        (fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                      AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          (c • f) =\n                                        ↑(RingHom.id R) c •\n                                          AddHom.toFun\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                            f) })\n                            F +\n                          (fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                      AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          (c • f) =\n                                        ↑(RingHom.id R) c •\n                                          AddHom.toFun\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                            f) })\n                            G) }\n              F)\n          (lsingle i))\n      x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (i : ι) → M i →ₗ[R] N\n⊢ (fun F i => LinearMap.comp F (lsingle i))\n      (AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun F =>\n                  {\n                    toAddHom :=\n                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : Π₀ (i : ι), M i),\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (c : R) (f : Π₀ (i : ι), M i),\n                          AddHom.toFun\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                              (c • f) =\n                            ↑(RingHom.id R) c •\n                              AddHom.toFun\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                f) },\n                map_add' :=\n                  (_ :\n                    ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                      (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                    AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        (c • f) =\n                                      ↑(RingHom.id R) c •\n                                        AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          f) })\n                          (F + G) =\n                        (fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                      AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          (c • f) =\n                                        ↑(RingHom.id R) c •\n                                          AddHom.toFun\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                            f) })\n                            F +\n                          (fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                      AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          (c • f) =\n                                        ↑(RingHom.id R) c •\n                                          AddHom.toFun\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                            f) })\n                            G) },\n            map_smul' :=\n              (_ :\n                ∀ (c : S) (F : (i : ι) → M i →ₗ[R] N),\n                  AddHom.toFun\n                      {\n                        toFun := fun F =>\n                          {\n                            toAddHom :=\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                  AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      (c • f) =\n                                    ↑(RingHom.id R) c •\n                                      AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        f) },\n                        map_add' :=\n                          (_ :\n                            ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                              (fun F =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                            AddHom.toFun\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                                (c • f) =\n                                              ↑(RingHom.id R) c •\n                                                AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  f) })\n                                  (F + G) =\n                                (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                              AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  (c • f) =\n                                                ↑(RingHom.id R) c •\n                                                  AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    f) })\n                                    F +\n                                  (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                              AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  (c • f) =\n                                                ↑(RingHom.id R) c •\n                                                  AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    f) })\n                                    G) }\n                      (c • F) =\n                    ↑(RingHom.id S) c •\n                      AddHom.toFun\n                        {\n                          toFun := fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                    AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        (c • f) =\n                                      ↑(RingHom.id R) c •\n                                        AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          f) },\n                          map_add' :=\n                            (_ :\n                              ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                                (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                              AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  (c • f) =\n                                                ↑(RingHom.id R) c •\n                                                  AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    f) })\n                                    (F + G) =\n                                  (fun F =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    (c • f) =\n                                                  ↑(RingHom.id R) c •\n                                                    AddHom.toFun\n                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                        map_add' :=\n                                                          (_ :\n                                                            ∀ (a b : Π₀ (i : ι), M i),\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  (a + b) =\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    a +\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    b) }\n                                                      f) })\n                                      F +\n                                    (fun F =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    (c • f) =\n                                                  ↑(RingHom.id R) c •\n                                                    AddHom.toFun\n                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                        map_add' :=\n                                                          (_ :\n                                                            ∀ (a b : Π₀ (i : ι), M i),\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  (a + b) =\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    a +\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    b) }\n                                                      f) })\n                                      G) }\n                        F) }.toAddHom\n        F) =\n    F\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (i : ι) → M i →ₗ[R] N\nx✝¹ : ι\nx✝ : M x✝¹\n⊢ ↑((fun F i => LinearMap.comp F (lsingle i))\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  {\n                    toFun := fun F =>\n                      {\n                        toAddHom :=\n                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : Π₀ (i : ι), M i),\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                              AddHom.toFun\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                  (c • f) =\n                                ↑(RingHom.id R) c •\n                                  AddHom.toFun\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                    f) },\n                    map_add' :=\n                      (_ :\n                        ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                          (fun F =>\n                                {\n                                  toAddHom :=\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                        AddHom.toFun\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                            (c • f) =\n                                          ↑(RingHom.id R) c •\n                                            AddHom.toFun\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                              f) })\n                              (F + G) =\n                            (fun F =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                          AddHom.toFun\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                              (c • f) =\n                                            ↑(RingHom.id R) c •\n                                              AddHom.toFun\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                                f) })\n                                F +\n                              (fun F =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                          AddHom.toFun\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                              (c • f) =\n                                            ↑(RingHom.id R) c •\n                                              AddHom.toFun\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                                f) })\n                                G) },\n                map_smul' :=\n                  (_ :\n                    ∀ (c : S) (F : (i : ι) → M i →ₗ[R] N),\n                      AddHom.toFun\n                          {\n                            toFun := fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                      AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          (c • f) =\n                                        ↑(RingHom.id R) c •\n                                          AddHom.toFun\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                            f) },\n                            map_add' :=\n                              (_ :\n                                ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                                  (fun F =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    (c • f) =\n                                                  ↑(RingHom.id R) c •\n                                                    AddHom.toFun\n                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                        map_add' :=\n                                                          (_ :\n                                                            ∀ (a b : Π₀ (i : ι), M i),\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  (a + b) =\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    a +\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    b) }\n                                                      f) })\n                                      (F + G) =\n                                    (fun F =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                  AddHom.toFun\n                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                        map_add' :=\n                                                          (_ :\n                                                            ∀ (a b : Π₀ (i : ι), M i),\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  (a + b) =\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    a +\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    b) }\n                                                      (c • f) =\n                                                    ↑(RingHom.id R) c •\n                                                      AddHom.toFun\n                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                          map_add' :=\n                                                            (_ :\n                                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    (a + b) =\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      a +\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                          LinearMap.toAddMonoidHom (F i))\n                                                                      b) }\n                                                        f) })\n                                        F +\n                                      (fun F =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                  AddHom.toFun\n                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                        map_add' :=\n                                                          (_ :\n                                                            ∀ (a b : Π₀ (i : ι), M i),\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  (a + b) =\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    a +\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    b) }\n                                                      (c • f) =\n                                                    ↑(RingHom.id R) c •\n                                                      AddHom.toFun\n                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                          map_add' :=\n                                                            (_ :\n                                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    (a + b) =\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      a +\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                          LinearMap.toAddMonoidHom (F i))\n                                                                      b) }\n                                                        f) })\n                                        G) }\n                          (c • F) =\n                        ↑(RingHom.id S) c •\n                          AddHom.toFun\n                            {\n                              toFun := fun F =>\n                                {\n                                  toAddHom :=\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                        AddHom.toFun\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                            (c • f) =\n                                          ↑(RingHom.id R) c •\n                                            AddHom.toFun\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                              f) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                                    (fun F =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                  AddHom.toFun\n                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                        map_add' :=\n                                                          (_ :\n                                                            ∀ (a b : Π₀ (i : ι), M i),\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  (a + b) =\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    a +\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    b) }\n                                                      (c • f) =\n                                                    ↑(RingHom.id R) c •\n                                                      AddHom.toFun\n                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                          map_add' :=\n                                                            (_ :\n                                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    (a + b) =\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      a +\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                          LinearMap.toAddMonoidHom (F i))\n                                                                      b) }\n                                                        f) })\n                                        (F + G) =\n                                      (fun F =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                    AddHom.toFun\n                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                          map_add' :=\n                                                            (_ :\n                                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    (a + b) =\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      a +\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                          LinearMap.toAddMonoidHom (F i))\n                                                                      b) }\n                                                        (c • f) =\n                                                      ↑(RingHom.id R) c •\n                                                        AddHom.toFun\n                                                          {\n                                                            toFun :=\n                                                              ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                            map_add' :=\n                                                              (_ :\n                                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      (a + b) =\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                            LinearMap.toAddMonoidHom (F i))\n                                                                        a +\n                                                                      ↑(↑liftAddHom fun i =>\n                                                                            LinearMap.toAddMonoidHom (F i))\n                                                                        b) }\n                                                          f) })\n                                          F +\n                                        (fun F =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                    AddHom.toFun\n                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                          map_add' :=\n                                                            (_ :\n                                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    (a + b) =\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      a +\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                          LinearMap.toAddMonoidHom (F i))\n                                                                      b) }\n                                                        (c • f) =\n                                                      ↑(RingHom.id R) c •\n                                                        AddHom.toFun\n                                                          {\n                                                            toFun :=\n                                                              ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                            map_add' :=\n                                                              (_ :\n                                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      (a + b) =\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                            LinearMap.toAddMonoidHom (F i))\n                                                                        a +\n                                                                      ↑(↑liftAddHom fun i =>\n                                                                            LinearMap.toAddMonoidHom (F i))\n                                                                        b) }\n                                                          f) })\n                                          G) }\n                            F) }.toAddHom\n            F)\n          x✝¹)\n      x✝ =\n    ↑(F x✝¹) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (Π₀ (i : ι), M i) →ₗ[R] N\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            {\n              toFun := fun F =>\n                {\n                  toAddHom :=\n                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : Π₀ (i : ι), M i),\n                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (c : R) (f : Π₀ (i : ι), M i),\n                        AddHom.toFun\n                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : Π₀ (i : ι), M i),\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                            (c • f) =\n                          ↑(RingHom.id R) c •\n                            AddHom.toFun\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                              f) },\n              map_add' :=\n                (_ :\n                  ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                    (fun F =>\n                          {\n                            toAddHom :=\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                  AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      (c • f) =\n                                    ↑(RingHom.id R) c •\n                                      AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        f) })\n                        (F + G) =\n                      (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                    AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        (c • f) =\n                                      ↑(RingHom.id R) c •\n                                        AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          f) })\n                          F +\n                        (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                    AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        (c • f) =\n                                      ↑(RingHom.id R) c •\n                                        AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          f) })\n                          G) },\n          map_smul' :=\n            (_ :\n              ∀ (c : S) (F : (i : ι) → M i →ₗ[R] N),\n                AddHom.toFun\n                    {\n                      toFun := fun F =>\n                        {\n                          toAddHom :=\n                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : Π₀ (i : ι), M i),\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                AddHom.toFun\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                    (c • f) =\n                                  ↑(RingHom.id R) c •\n                                    AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      f) },\n                      map_add' :=\n                        (_ :\n                          ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                            (fun F =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                          AddHom.toFun\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                              (c • f) =\n                                            ↑(RingHom.id R) c •\n                                              AddHom.toFun\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                                f) })\n                                (F + G) =\n                              (fun F =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                            AddHom.toFun\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                                (c • f) =\n                                              ↑(RingHom.id R) c •\n                                                AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  f) })\n                                  F +\n                                (fun F =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                            AddHom.toFun\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                                (c • f) =\n                                              ↑(RingHom.id R) c •\n                                                AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  f) })\n                                  G) }\n                    (c • F) =\n                  ↑(RingHom.id S) c •\n                    AddHom.toFun\n                      {\n                        toFun := fun F =>\n                          {\n                            toAddHom :=\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                  AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      (c • f) =\n                                    ↑(RingHom.id R) c •\n                                      AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        f) },\n                        map_add' :=\n                          (_ :\n                            ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                              (fun F =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                            AddHom.toFun\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                                (c • f) =\n                                              ↑(RingHom.id R) c •\n                                                AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  f) })\n                                  (F + G) =\n                                (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                              AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  (c • f) =\n                                                ↑(RingHom.id R) c •\n                                                  AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    f) })\n                                    F +\n                                  (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                              AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  (c • f) =\n                                                ↑(RingHom.id R) c •\n                                                  AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    f) })\n                                    G) }\n                      F) }.toAddHom\n      ((fun F i => LinearMap.comp F (lsingle i)) F) =\n    F\n[PROOFSTEP]\nrefine DFinsupp.lhom_ext' (fun i ↦ ?_)\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (Π₀ (i : ι), M i) →ₗ[R] N\ni : ι\n⊢ LinearMap.comp\n      (AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun F =>\n                  {\n                    toAddHom :=\n                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : Π₀ (i : ι), M i),\n                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (c : R) (f : Π₀ (i : ι), M i),\n                          AddHom.toFun\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                              (c • f) =\n                            ↑(RingHom.id R) c •\n                              AddHom.toFun\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                f) },\n                map_add' :=\n                  (_ :\n                    ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                      (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                    AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        (c • f) =\n                                      ↑(RingHom.id R) c •\n                                        AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          f) })\n                          (F + G) =\n                        (fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                      AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          (c • f) =\n                                        ↑(RingHom.id R) c •\n                                          AddHom.toFun\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                            f) })\n                            F +\n                          (fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                      AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          (c • f) =\n                                        ↑(RingHom.id R) c •\n                                          AddHom.toFun\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                            f) })\n                            G) },\n            map_smul' :=\n              (_ :\n                ∀ (c : S) (F : (i : ι) → M i →ₗ[R] N),\n                  AddHom.toFun\n                      {\n                        toFun := fun F =>\n                          {\n                            toAddHom :=\n                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : Π₀ (i : ι), M i),\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                  AddHom.toFun\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                      (c • f) =\n                                    ↑(RingHom.id R) c •\n                                      AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        f) },\n                        map_add' :=\n                          (_ :\n                            ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                              (fun F =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                            AddHom.toFun\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                                (c • f) =\n                                              ↑(RingHom.id R) c •\n                                                AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  f) })\n                                  (F + G) =\n                                (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                              AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  (c • f) =\n                                                ↑(RingHom.id R) c •\n                                                  AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    f) })\n                                    F +\n                                  (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                              AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  (c • f) =\n                                                ↑(RingHom.id R) c •\n                                                  AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    f) })\n                                    G) }\n                      (c • F) =\n                    ↑(RingHom.id S) c •\n                      AddHom.toFun\n                        {\n                          toFun := fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : Π₀ (i : ι), M i),\n                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                    AddHom.toFun\n                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                        (c • f) =\n                                      ↑(RingHom.id R) c •\n                                        AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          f) },\n                          map_add' :=\n                            (_ :\n                              ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                                (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                              AddHom.toFun\n                                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                    map_add' :=\n                                                      (_ :\n                                                        ∀ (a b : Π₀ (i : ι), M i),\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                              (a + b) =\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                b) }\n                                                  (c • f) =\n                                                ↑(RingHom.id R) c •\n                                                  AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    f) })\n                                    (F + G) =\n                                  (fun F =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    (c • f) =\n                                                  ↑(RingHom.id R) c •\n                                                    AddHom.toFun\n                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                        map_add' :=\n                                                          (_ :\n                                                            ∀ (a b : Π₀ (i : ι), M i),\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  (a + b) =\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    a +\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    b) }\n                                                      f) })\n                                      F +\n                                    (fun F =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    (c • f) =\n                                                  ↑(RingHom.id R) c •\n                                                    AddHom.toFun\n                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                        map_add' :=\n                                                          (_ :\n                                                            ∀ (a b : Π₀ (i : ι), M i),\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  (a + b) =\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    a +\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    b) }\n                                                      f) })\n                                      G) }\n                        F) }.toAddHom\n        ((fun F i => LinearMap.comp F (lsingle i)) F))\n      (lsingle i) =\n    LinearMap.comp F (lsingle i)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (Π₀ (i : ι), M i) →ₗ[R] N\ni : ι\nx✝ : M i\n⊢ ↑(LinearMap.comp\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  {\n                    toFun := fun F =>\n                      {\n                        toAddHom :=\n                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : Π₀ (i : ι), M i),\n                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (c : R) (f : Π₀ (i : ι), M i),\n                              AddHom.toFun\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                  (c • f) =\n                                ↑(RingHom.id R) c •\n                                  AddHom.toFun\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                    f) },\n                    map_add' :=\n                      (_ :\n                        ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                          (fun F =>\n                                {\n                                  toAddHom :=\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                        AddHom.toFun\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                            (c • f) =\n                                          ↑(RingHom.id R) c •\n                                            AddHom.toFun\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                              f) })\n                              (F + G) =\n                            (fun F =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                          AddHom.toFun\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                              (c • f) =\n                                            ↑(RingHom.id R) c •\n                                              AddHom.toFun\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                                f) })\n                                F +\n                              (fun F =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : Π₀ (i : ι), M i),\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                          AddHom.toFun\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                              (c • f) =\n                                            ↑(RingHom.id R) c •\n                                              AddHom.toFun\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                                f) })\n                                G) },\n                map_smul' :=\n                  (_ :\n                    ∀ (c : S) (F : (i : ι) → M i →ₗ[R] N),\n                      AddHom.toFun\n                          {\n                            toFun := fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : Π₀ (i : ι), M i),\n                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                      AddHom.toFun\n                                          { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                          (c • f) =\n                                        ↑(RingHom.id R) c •\n                                          AddHom.toFun\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                            f) },\n                            map_add' :=\n                              (_ :\n                                ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                                  (fun F =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                AddHom.toFun\n                                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                      map_add' :=\n                                                        (_ :\n                                                          ∀ (a b : Π₀ (i : ι), M i),\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                (a + b) =\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  b) }\n                                                    (c • f) =\n                                                  ↑(RingHom.id R) c •\n                                                    AddHom.toFun\n                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                        map_add' :=\n                                                          (_ :\n                                                            ∀ (a b : Π₀ (i : ι), M i),\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  (a + b) =\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    a +\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    b) }\n                                                      f) })\n                                      (F + G) =\n                                    (fun F =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                  AddHom.toFun\n                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                        map_add' :=\n                                                          (_ :\n                                                            ∀ (a b : Π₀ (i : ι), M i),\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  (a + b) =\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    a +\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    b) }\n                                                      (c • f) =\n                                                    ↑(RingHom.id R) c •\n                                                      AddHom.toFun\n                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                          map_add' :=\n                                                            (_ :\n                                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    (a + b) =\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      a +\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                          LinearMap.toAddMonoidHom (F i))\n                                                                      b) }\n                                                        f) })\n                                        F +\n                                      (fun F =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                  AddHom.toFun\n                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                        map_add' :=\n                                                          (_ :\n                                                            ∀ (a b : Π₀ (i : ι), M i),\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  (a + b) =\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    a +\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    b) }\n                                                      (c • f) =\n                                                    ↑(RingHom.id R) c •\n                                                      AddHom.toFun\n                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                          map_add' :=\n                                                            (_ :\n                                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    (a + b) =\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      a +\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                          LinearMap.toAddMonoidHom (F i))\n                                                                      b) }\n                                                        f) })\n                                        G) }\n                          (c • F) =\n                        ↑(RingHom.id S) c •\n                          AddHom.toFun\n                            {\n                              toFun := fun F =>\n                                {\n                                  toAddHom :=\n                                    { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : Π₀ (i : ι), M i),\n                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                        AddHom.toFun\n                                            { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : Π₀ (i : ι), M i),\n                                                    ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                            (c • f) =\n                                          ↑(RingHom.id R) c •\n                                            AddHom.toFun\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) }\n                                              f) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (F G : (i : ι) → M i →ₗ[R] N),\n                                    (fun F =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : Π₀ (i : ι), M i),\n                                                      ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                  AddHom.toFun\n                                                      { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                        map_add' :=\n                                                          (_ :\n                                                            ∀ (a b : Π₀ (i : ι), M i),\n                                                              ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                  (a + b) =\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    a +\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    b) }\n                                                      (c • f) =\n                                                    ↑(RingHom.id R) c •\n                                                      AddHom.toFun\n                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                          map_add' :=\n                                                            (_ :\n                                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    (a + b) =\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      a +\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                          LinearMap.toAddMonoidHom (F i))\n                                                                      b) }\n                                                        f) })\n                                        (F + G) =\n                                      (fun F =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                    AddHom.toFun\n                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                          map_add' :=\n                                                            (_ :\n                                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    (a + b) =\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      a +\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                          LinearMap.toAddMonoidHom (F i))\n                                                                      b) }\n                                                        (c • f) =\n                                                      ↑(RingHom.id R) c •\n                                                        AddHom.toFun\n                                                          {\n                                                            toFun :=\n                                                              ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                            map_add' :=\n                                                              (_ :\n                                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      (a + b) =\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                            LinearMap.toAddMonoidHom (F i))\n                                                                        a +\n                                                                      ↑(↑liftAddHom fun i =>\n                                                                            LinearMap.toAddMonoidHom (F i))\n                                                                        b) }\n                                                          f) })\n                                          F +\n                                        (fun F =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : Π₀ (i : ι), M i),\n                                                        ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) (a + b) =\n                                                          ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) a +\n                                                            ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i)) b) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (c : R) (f : Π₀ (i : ι), M i),\n                                                    AddHom.toFun\n                                                        { toFun := ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                          map_add' :=\n                                                            (_ :\n                                                              ∀ (a b : Π₀ (i : ι), M i),\n                                                                ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                    (a + b) =\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      a +\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                          LinearMap.toAddMonoidHom (F i))\n                                                                      b) }\n                                                        (c • f) =\n                                                      ↑(RingHom.id R) c •\n                                                        AddHom.toFun\n                                                          {\n                                                            toFun :=\n                                                              ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (F i)),\n                                                            map_add' :=\n                                                              (_ :\n                                                                ∀ (a b : Π₀ (i : ι), M i),\n                                                                  ↑(↑liftAddHom fun i => LinearMap.toAddMonoidHom (F i))\n                                                                      (a + b) =\n                                                                    ↑(↑liftAddHom fun i =>\n                                                                            LinearMap.toAddMonoidHom (F i))\n                                                                        a +\n                                                                      ↑(↑liftAddHom fun i =>\n                                                                            LinearMap.toAddMonoidHom (F i))\n                                                                        b) }\n                                                          f) })\n                                          G) }\n                            F) }.toAddHom\n            ((fun F i => LinearMap.comp F (lsingle i)) F))\n          (lsingle i))\n      x✝ =\n    ↑(LinearMap.comp F (lsingle i)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M i)\ninst✝⁵ : (i : ι) → Module R (M i)\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : Semiring S\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (i : ι) → M i →ₗ[R] N\ni : ι\nx : M i\n⊢ ↑(↑(lsum S) F) (single i x) = ↑(F i) x\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : ι) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → Module R (M i)\ninst✝⁷ : AddCommMonoid N\ninst✝⁶ : Module R N\nβ : ι → Type u_6\nβ₁ : ι → Type u_7\nβ₂ : ι → Type u_8\ninst✝⁵ : (i : ι) → AddCommMonoid (β i)\ninst✝⁴ : (i : ι) → AddCommMonoid (β₁ i)\ninst✝³ : (i : ι) → AddCommMonoid (β₂ i)\ninst✝² : (i : ι) → Module R (β i)\ninst✝¹ : (i : ι) → Module R (β₁ i)\ninst✝ : (i : ι) → Module R (β₂ i)\nf : (i : ι) → β₁ i → β₂ i\nhf : ∀ (i : ι), f i 0 = 0\nr : R\nhf' : ∀ (i : ι) (x : β₁ i), f i (r • x) = r • f i x\ng : Π₀ (i : ι), β₁ i\n⊢ mapRange f hf (r • g) = r • mapRange f hf g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : ι) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → Module R (M i)\ninst✝⁷ : AddCommMonoid N\ninst✝⁶ : Module R N\nβ : ι → Type u_6\nβ₁ : ι → Type u_7\nβ₂ : ι → Type u_8\ninst✝⁵ : (i : ι) → AddCommMonoid (β i)\ninst✝⁴ : (i : ι) → AddCommMonoid (β₁ i)\ninst✝³ : (i : ι) → AddCommMonoid (β₂ i)\ninst✝² : (i : ι) → Module R (β i)\ninst✝¹ : (i : ι) → Module R (β₁ i)\ninst✝ : (i : ι) → Module R (β₂ i)\nf : (i : ι) → β₁ i → β₂ i\nhf : ∀ (i : ι), f i 0 = 0\nr : R\nhf' : ∀ (i : ι) (x : β₁ i), f i (r • x) = r • f i x\ng : Π₀ (i : ι), β₁ i\ni✝ : ι\n⊢ ↑(mapRange f hf (r • g)) i✝ = ↑(r • mapRange f hf g) i✝\n[PROOFSTEP]\nsimp only [mapRange_apply f, coe_smul, Pi.smul_apply, hf']\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : ι) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → Module R (M i)\ninst✝⁷ : AddCommMonoid N\ninst✝⁶ : Module R N\nβ : ι → Type u_6\nβ₁ : ι → Type u_7\nβ₂ : ι → Type u_8\ninst✝⁵ : (i : ι) → AddCommMonoid (β i)\ninst✝⁴ : (i : ι) → AddCommMonoid (β₁ i)\ninst✝³ : (i : ι) → AddCommMonoid (β₂ i)\ninst✝² : (i : ι) → Module R (β i)\ninst✝¹ : (i : ι) → Module R (β₁ i)\ninst✝ : (i : ι) → Module R (β₂ i)\n⊢ (linearMap fun i => LinearMap.id) = LinearMap.id\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : ι) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → Module R (M i)\ninst✝⁷ : AddCommMonoid N\ninst✝⁶ : Module R N\nβ : ι → Type u_6\nβ₁ : ι → Type u_7\nβ₂ : ι → Type u_8\ninst✝⁵ : (i : ι) → AddCommMonoid (β i)\ninst✝⁴ : (i : ι) → AddCommMonoid (β₁ i)\ninst✝³ : (i : ι) → AddCommMonoid (β₂ i)\ninst✝² : (i : ι) → Module R (β i)\ninst✝¹ : (i : ι) → Module R (β₁ i)\ninst✝ : (i : ι) → Module R (β₂ i)\ni✝¹ : ι\nx✝ : β₂ i✝¹\ni✝ : ι\n⊢ ↑(↑(LinearMap.comp (linearMap fun i => LinearMap.id) (lsingle i✝¹)) x✝) i✝ =\n    ↑(↑(LinearMap.comp LinearMap.id (lsingle i✝¹)) x✝) i✝\n[PROOFSTEP]\nsimp [linearMap]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : ι) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → Module R (M i)\ninst✝⁷ : AddCommMonoid N\ninst✝⁶ : Module R N\nβ : ι → Type u_6\nβ₁ : ι → Type u_7\nβ₂ : ι → Type u_8\ninst✝⁵ : (i : ι) → AddCommMonoid (β i)\ninst✝⁴ : (i : ι) → AddCommMonoid (β₁ i)\ninst✝³ : (i : ι) → AddCommMonoid (β₂ i)\ninst✝² : (i : ι) → Module R (β i)\ninst✝¹ : (i : ι) → Module R (β₁ i)\ninst✝ : (i : ι) → Module R (β₂ i)\nf : (i : ι) → β₁ i →ₗ[R] β₂ i\nf₂ : (i : ι) → β i →ₗ[R] β₁ i\n⊢ ∀ (i : ι), ((fun i x => ↑(f i) x) i ∘ (fun i x => ↑(f₂ i) x) i) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : ι) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → Module R (M i)\ninst✝⁹ : AddCommMonoid N\ninst✝⁸ : Module R N\nβ : ι → Type u_6\nβ₁ : ι → Type u_7\nβ₂ : ι → Type u_8\ninst✝⁷ : (i : ι) → AddCommMonoid (β i)\ninst✝⁶ : (i : ι) → AddCommMonoid (β₁ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (β₂ i)\ninst✝⁴ : (i : ι) → Module R (β i)\ninst✝³ : (i : ι) → Module R (β₁ i)\ninst✝² : (i : ι) → Module R (β₂ i)\ninst✝¹ : (i : ι) → (x : β₁ i) → Decidable (x ≠ 0)\ninst✝ : (i : ι) → (x : β₂ i) → Decidable (x ≠ 0)\nf : (i : ι) → β₁ i →ₗ[R] β₂ i\nh : (i : ι) → β₂ i →ₗ[R] N\nl : Π₀ (i : ι), β₁ i\n⊢ ↑(↑(lsum ℕ) h) (↑(mapRange.linearMap f) l) = ↑(↑(lsum ℕ) fun i => LinearMap.comp (h i) (f i)) l\n[PROOFSTEP]\nsimpa [DFinsupp.sumAddHom_apply] using sum_mapRange_index fun i => by simp\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : ι) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → Module R (M i)\ninst✝⁹ : AddCommMonoid N\ninst✝⁸ : Module R N\nβ : ι → Type u_6\nβ₁ : ι → Type u_7\nβ₂ : ι → Type u_8\ninst✝⁷ : (i : ι) → AddCommMonoid (β i)\ninst✝⁶ : (i : ι) → AddCommMonoid (β₁ i)\ninst✝⁵ : (i : ι) → AddCommMonoid (β₂ i)\ninst✝⁴ : (i : ι) → Module R (β i)\ninst✝³ : (i : ι) → Module R (β₁ i)\ninst✝² : (i : ι) → Module R (β₂ i)\ninst✝¹ : (i : ι) → (x : β₁ i) → Decidable (x ≠ 0)\ninst✝ : (i : ι) → (x : β₂ i) → Decidable (x ≠ 0)\nf : (i : ι) → β₁ i →ₗ[R] β₂ i\nh : (i : ι) → β₂ i →ₗ[R] N\nl : Π₀ (i : ι), β₁ i\ni : ι\n⊢ ↑(h i) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : ι) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → Module R (M i)\ninst✝⁷ : AddCommMonoid N\ninst✝⁶ : Module R N\nβ : ι → Type u_6\nβ₁ : ι → Type u_7\nβ₂ : ι → Type u_8\ninst✝⁵ : (i : ι) → AddCommMonoid (β i)\ninst✝⁴ : (i : ι) → AddCommMonoid (β₁ i)\ninst✝³ : (i : ι) → AddCommMonoid (β₂ i)\ninst✝² : (i : ι) → Module R (β i)\ninst✝¹ : (i : ι) → Module R (β₁ i)\ninst✝ : (i : ι) → Module R (β₂ i)\nf : (i : ι) → β i ≃ₗ[R] β₁ i\nf₂ : (i : ι) → β₁ i ≃ₗ[R] β₂ i\n⊢ ∀ (i : ι), ((fun i x => ↑(f₂ i) x) i ∘ (fun i x => ↑(f i) x) i) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝⁶ : Semiring R\ninst✝⁵ : (i : ι) → AddCommMonoid (M i)\ninst✝⁴ : (i : ι) → Module R (M i)\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : DecidableEq ι\ninst✝ : (x : N) → Decidable (x ≠ 0)\nf : (i : ι) → M i →ₗ[R] N\ni : ι\nx : M i\n⊢ ↑(coprodMap f) (single i x) = ↑(f i) x\n[PROOFSTEP]\nsimp [coprodMap_apply]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\n⊢ iSup p = LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i))\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\n⊢ iSup p ≤ LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i))\n[PROOFSTEP]\napply iSup_le _\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\n⊢ ∀ (i : ι), p i ≤ LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i))\n[PROOFSTEP]\nintro i y hy\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\ni : ι\ny : N\nhy : y ∈ p i\n⊢ y ∈ LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i))\n[PROOFSTEP]\nsimp only [LinearMap.mem_range, lsum_apply_apply]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\ni : ι\ny : N\nhy : y ∈ p i\n⊢ ∃ y_1, ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (Submodule.subtype (p i))) y_1 = y\n[PROOFSTEP]\nexact ⟨DFinsupp.single i ⟨y, hy⟩, DFinsupp.sumAddHom_single _ _ _⟩\n[GOAL]\ncase a\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\n⊢ LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i)) ≤ iSup p\n[PROOFSTEP]\nrintro x ⟨v, rfl⟩\n[GOAL]\ncase a.intro\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\nv : Π₀ (i : ι), { x // x ∈ p i }\n⊢ ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) v ∈ iSup p\n[PROOFSTEP]\nexact dfinsupp_sumAddHom_mem _ v _ fun i _ => (le_iSup p i : p i ≤ _) (v i).2\n[GOAL]\nι : Type u_1\nR : Type u_2\nS✝ : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\np : ι → Prop\ninst✝ : DecidablePred p\nS : ι → Submodule R N\n⊢ ⨆ (i : ι) (_ : p i), S i =\n    LinearMap.range\n      (LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (S i)) (filterLinearMap R (fun i => { x // x ∈ S i }) p))\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nι : Type u_1\nR : Type u_2\nS✝ : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\np : ι → Prop\ninst✝ : DecidablePred p\nS : ι → Submodule R N\n⊢ ⨆ (i : ι) (_ : p i), S i ≤\n    LinearMap.range\n      (LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (S i)) (filterLinearMap R (fun i => { x // x ∈ S i }) p))\n[PROOFSTEP]\nrefine' iSup₂_le fun i hi y hy => ⟨DFinsupp.single i ⟨y, hy⟩, _⟩\n[GOAL]\ncase a\nι : Type u_1\nR : Type u_2\nS✝ : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\np : ι → Prop\ninst✝ : DecidablePred p\nS : ι → Submodule R N\ni : ι\nhi : p i\ny : N\nhy : y ∈ S i\n⊢ ↑(LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (S i)) (filterLinearMap R (fun i => { x // x ∈ S i }) p))\n      (single i { val := y, property := hy }) =\n    y\n[PROOFSTEP]\nrw [LinearMap.comp_apply, filterLinearMap_apply, filter_single_pos _ _ hi]\n[GOAL]\ncase a\nι : Type u_1\nR : Type u_2\nS✝ : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\np : ι → Prop\ninst✝ : DecidablePred p\nS : ι → Submodule R N\ni : ι\nhi : p i\ny : N\nhy : y ∈ S i\n⊢ ↑(↑(lsum ℕ) fun i => Submodule.subtype (S i)) (single i { val := y, property := hy }) = y\n[PROOFSTEP]\nsimp only [lsum_apply_apply, sumAddHom_single, LinearMap.toAddMonoidHom_coe, coeSubtype]\n[GOAL]\ncase a\nι : Type u_1\nR : Type u_2\nS✝ : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\np : ι → Prop\ninst✝ : DecidablePred p\nS : ι → Submodule R N\n⊢ LinearMap.range\n      (LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (S i)) (filterLinearMap R (fun i => { x // x ∈ S i }) p)) ≤\n    ⨆ (i : ι) (_ : p i), S i\n[PROOFSTEP]\nrintro x ⟨v, rfl⟩\n[GOAL]\ncase a.intro\nι : Type u_1\nR : Type u_2\nS✝ : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\np : ι → Prop\ninst✝ : DecidablePred p\nS : ι → Submodule R N\nv : Π₀ (i : ι), { x // x ∈ S i }\n⊢ ↑(LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (S i)) (filterLinearMap R (fun i => { x // x ∈ S i }) p)) v ∈\n    ⨆ (i : ι) (_ : p i), S i\n[PROOFSTEP]\nrefine' dfinsupp_sumAddHom_mem _ _ _ fun i _ => _\n[GOAL]\ncase a.intro\nι : Type u_1\nR : Type u_2\nS✝ : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\np : ι → Prop\ninst✝ : DecidablePred p\nS : ι → Submodule R N\nv : Π₀ (i : ι), { x // x ∈ S i }\ni : ι\nx✝ : ↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i ≠ 0\n⊢ ↑((fun i => LinearMap.toAddMonoidHom ((fun i => Submodule.subtype (S i)) i)) i)\n      (↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i) ∈\n    ⨆ (i : ι) (_ : p i), S i\n[PROOFSTEP]\nrefine' mem_iSup_of_mem i _\n[GOAL]\ncase a.intro\nι : Type u_1\nR : Type u_2\nS✝ : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\np : ι → Prop\ninst✝ : DecidablePred p\nS : ι → Submodule R N\nv : Π₀ (i : ι), { x // x ∈ S i }\ni : ι\nx✝ : ↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i ≠ 0\n⊢ ↑((fun i => LinearMap.toAddMonoidHom ((fun i => Submodule.subtype (S i)) i)) i)\n      (↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i) ∈\n    ⨆ (_ : p i), S i\n[PROOFSTEP]\nby_cases hp : p i\n[GOAL]\ncase pos\nι : Type u_1\nR : Type u_2\nS✝ : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\np : ι → Prop\ninst✝ : DecidablePred p\nS : ι → Submodule R N\nv : Π₀ (i : ι), { x // x ∈ S i }\ni : ι\nx✝ : ↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i ≠ 0\nhp : p i\n⊢ ↑((fun i => LinearMap.toAddMonoidHom ((fun i => Submodule.subtype (S i)) i)) i)\n      (↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i) ∈\n    ⨆ (_ : p i), S i\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase neg\nι : Type u_1\nR : Type u_2\nS✝ : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\np : ι → Prop\ninst✝ : DecidablePred p\nS : ι → Submodule R N\nv : Π₀ (i : ι), { x // x ∈ S i }\ni : ι\nx✝ : ↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i ≠ 0\nhp : ¬p i\n⊢ ↑((fun i => LinearMap.toAddMonoidHom ((fun i => Submodule.subtype (S i)) i)) i)\n      (↑(↑(filterLinearMap R (fun i => { x // x ∈ S i }) p) v) i) ∈\n    ⨆ (_ : p i), S i\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\np : ι → Submodule R N\ninst✝ : (i : ι) → (x : { x // x ∈ p i }) → Decidable (x ≠ 0)\nx : N\n⊢ x ∈ iSup p ↔ ∃ f, (sum f fun i xi => ↑xi) = x\n[PROOFSTEP]\nrw [mem_iSup_iff_exists_dfinsupp]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\np : ι → Submodule R N\ninst✝ : (i : ι) → (x : { x // x ∈ p i }) → Decidable (x ≠ 0)\nx : N\n⊢ (∃ f, ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) f = x) ↔ ∃ f, (sum f fun i xi => ↑xi) = x\n[PROOFSTEP]\nsimp_rw [DFinsupp.lsum_apply_apply, DFinsupp.sumAddHom_apply, LinearMap.toAddMonoidHom_coe, coeSubtype]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\n⊢ a ∈ ⨆ (i : ι) (_ : i ∈ s), p i ↔ ∃ μ, ∑ i in s, ↑(μ i) = a\n[PROOFSTEP]\nclassical\nrw [Submodule.mem_iSup_iff_exists_dfinsupp']\nconstructor <;> rintro ⟨μ, hμ⟩\n· use fun i => ⟨μ i, (iSup_const_le : _ ≤ p i) (coe_mem <| μ i)⟩\n  rw [← hμ]\n  symm\n  apply Finset.sum_subset\n  · intro x\n    contrapose\n    intro hx\n    rw [mem_support_iff, not_ne_iff]\n    ext\n    rw [coe_zero, ← mem_bot R]\n    suffices : ⊥ = ⨆ (_ : x ∈ s), p x\n    · exact this.symm ▸ coe_mem (μ x)\n    exact (iSup_neg hx).symm\n  · intro x _ hx\n    rw [mem_support_iff, not_ne_iff] at hx \n    rw [hx]\n    rfl\n· refine' ⟨DFinsupp.mk s _, _⟩\n  · rintro ⟨i, hi⟩\n    refine' ⟨μ i, _⟩\n    rw [iSup_pos]\n    · exact coe_mem _\n    · exact hi\n  simp only [DFinsupp.sum]\n  rw [Finset.sum_subset support_mk_subset, ← hμ]\n  exact Finset.sum_congr rfl fun x hx => congr_arg Subtype.val <| mk_of_mem hx\n  · intro x _ hx\n    rw [mem_support_iff, not_ne_iff] at hx \n    rw [hx]\n    rfl\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\n⊢ a ∈ ⨆ (i : ι) (_ : i ∈ s), p i ↔ ∃ μ, ∑ i in s, ↑(μ i) = a\n[PROOFSTEP]\nrw [Submodule.mem_iSup_iff_exists_dfinsupp']\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\n⊢ (∃ f, (sum f fun i xi => ↑xi) = a) ↔ ∃ μ, ∑ i in s, ↑(μ i) = a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\n⊢ (∃ f, (sum f fun i xi => ↑xi) = a) → ∃ μ, ∑ i in s, ↑(μ i) = a\n[PROOFSTEP]\nrintro ⟨μ, hμ⟩\n[GOAL]\ncase mpr\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\n⊢ (∃ μ, ∑ i in s, ↑(μ i) = a) → ∃ f, (sum f fun i xi => ↑xi) = a\n[PROOFSTEP]\nrintro ⟨μ, hμ⟩\n[GOAL]\ncase mp.intro\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\n⊢ ∃ μ, ∑ i in s, ↑(μ i) = a\n[PROOFSTEP]\nuse fun i => ⟨μ i, (iSup_const_le : _ ≤ p i) (coe_mem <| μ i)⟩\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\n⊢ ∑ i in s, ↑{ val := ↑(↑μ i), property := (_ : ↑(↑μ i) ∈ p i) } = a\n[PROOFSTEP]\nrw [← hμ]\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\n⊢ ∑ i in s, ↑{ val := ↑(↑μ i), property := (_ : ↑(↑μ i) ∈ p i) } = sum μ fun i xi => ↑xi\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\n⊢ (sum μ fun i xi => ↑xi) = ∑ i in s, ↑{ val := ↑(↑μ i), property := (_ : ↑(↑μ i) ∈ p i) }\n[PROOFSTEP]\napply Finset.sum_subset\n[GOAL]\ncase h.h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\n⊢ support μ ⊆ s\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h.h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\nx : ι\n⊢ x ∈ support μ → x ∈ s\n[PROOFSTEP]\ncontrapose\n[GOAL]\ncase h.h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\nx : ι\n⊢ ¬x ∈ s → ¬x ∈ support μ\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase h.h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\nx : ι\nhx : ¬x ∈ s\n⊢ ¬x ∈ support μ\n[PROOFSTEP]\nrw [mem_support_iff, not_ne_iff]\n[GOAL]\ncase h.h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\nx : ι\nhx : ¬x ∈ s\n⊢ ↑μ x = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.a\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\nx : ι\nhx : ¬x ∈ s\n⊢ ↑(↑μ x) = ↑0\n[PROOFSTEP]\nrw [coe_zero, ← mem_bot R]\n[GOAL]\ncase h.h.a\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\nx : ι\nhx : ¬x ∈ s\n⊢ ↑(↑μ x) ∈ ⊥\n[PROOFSTEP]\nsuffices : ⊥ = ⨆ (_ : x ∈ s), p x\n[GOAL]\ncase h.h.a\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\nx : ι\nhx : ¬x ∈ s\nthis : ⊥ = ⨆ (_ : x ∈ s), p x\n⊢ ↑(↑μ x) ∈ ⊥\n[PROOFSTEP]\nexact this.symm ▸ coe_mem (μ x)\n[GOAL]\ncase this\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\nx : ι\nhx : ¬x ∈ s\n⊢ ⊥ = ⨆ (_ : x ∈ s), p x\n[PROOFSTEP]\nexact (iSup_neg hx).symm\n[GOAL]\ncase h.hf\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\n⊢ ∀ (x : ι), x ∈ s → ¬x ∈ support μ → (fun i xi => ↑xi) x (↑μ x) = 0\n[PROOFSTEP]\nintro x _ hx\n[GOAL]\ncase h.hf\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\nx : ι\na✝ : x ∈ s\nhx : ¬x ∈ support μ\n⊢ (fun i xi => ↑xi) x (↑μ x) = 0\n[PROOFSTEP]\nrw [mem_support_iff, not_ne_iff] at hx \n[GOAL]\ncase h.hf\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\nx : ι\na✝ : x ∈ s\nhx : ↑μ x = 0\n⊢ (fun i xi => ↑xi) x (↑μ x) = 0\n[PROOFSTEP]\nrw [hx]\n[GOAL]\ncase h.hf\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : Π₀ (i : ι), { x // x ∈ ⨆ (_ : i ∈ s), p i }\nhμ : (sum μ fun i xi => ↑xi) = a\nx : ι\na✝ : x ∈ s\nhx : ↑μ x = 0\n⊢ (fun i xi => ↑xi) x 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr.intro\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\n⊢ ∃ f, (sum f fun i xi => ↑xi) = a\n[PROOFSTEP]\nrefine' ⟨DFinsupp.mk s _, _⟩\n[GOAL]\ncase mpr.intro.refine'_1\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\n⊢ (i : ↑↑s) → { x // x ∈ ⨆ (_ : ↑i ∈ s), p ↑i }\n[PROOFSTEP]\nrintro ⟨i, hi⟩\n[GOAL]\ncase mpr.intro.refine'_1.mk\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\ni : ι\nhi : i ∈ ↑s\n⊢ { x // x ∈ ⨆ (_ : ↑{ val := i, property := hi } ∈ s), p ↑{ val := i, property := hi } }\n[PROOFSTEP]\nrefine' ⟨μ i, _⟩\n[GOAL]\ncase mpr.intro.refine'_1.mk\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\ni : ι\nhi : i ∈ ↑s\n⊢ ↑(μ i) ∈ ⨆ (_ : ↑{ val := i, property := hi } ∈ s), p ↑{ val := i, property := hi }\n[PROOFSTEP]\nrw [iSup_pos]\n[GOAL]\ncase mpr.intro.refine'_1.mk\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\ni : ι\nhi : i ∈ ↑s\n⊢ ↑(μ i) ∈ p ↑{ val := i, property := hi }\n[PROOFSTEP]\nexact coe_mem _\n[GOAL]\ncase mpr.intro.refine'_1.mk\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\ni : ι\nhi : i ∈ ↑s\n⊢ ↑{ val := i, property := hi } ∈ s\n[PROOFSTEP]\nexact hi\n[GOAL]\ncase mpr.intro.refine'_2\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\n⊢ (sum\n      (DFinsupp.mk s fun i =>\n        Subtype.casesOn i fun i hi =>\n          { val := ↑(μ i),\n            property := (_ : ↑(μ i) ∈ ⨆ (_ : ↑{ val := i, property := hi } ∈ s), p ↑{ val := i, property := hi }) })\n      fun i xi => ↑xi) =\n    a\n[PROOFSTEP]\nsimp only [DFinsupp.sum]\n[GOAL]\ncase mpr.intro.refine'_2\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\n⊢ ∑ x in\n      support\n        (DFinsupp.mk s fun i =>\n          { val := ↑(μ ↑i),\n            property :=\n              (_ :\n                ↑(μ ↑i) ∈\n                  ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),\n                    p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) }),\n      ↑(↑(DFinsupp.mk s fun i =>\n              { val := ↑(μ ↑i),\n                property :=\n                  (_ :\n                    ↑(μ ↑i) ∈\n                      ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),\n                        p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })\n          x) =\n    a\n[PROOFSTEP]\nrw [Finset.sum_subset support_mk_subset, ← hμ]\n[GOAL]\ncase mpr.intro.refine'_2\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\n⊢ ∑ x in s,\n      ↑(↑(DFinsupp.mk s fun i =>\n              { val := ↑(μ ↑i),\n                property :=\n                  (_ :\n                    ↑(μ ↑i) ∈\n                      ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),\n                        p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })\n          x) =\n    ∑ i in s, ↑(μ i)\ncase mpr.intro.refine'_2\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\n⊢ ∀ (x : ι),\n    x ∈ s →\n      ¬x ∈\n            support\n              (DFinsupp.mk s fun i =>\n                { val := ↑(μ ↑i),\n                  property :=\n                    (_ :\n                      ↑(μ ↑i) ∈\n                        ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),\n                          p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) }) →\n        ↑(↑(DFinsupp.mk s fun i =>\n                  { val := ↑(μ ↑i),\n                    property :=\n                      (_ :\n                        ↑(μ ↑i) ∈\n                          ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),\n                            p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })\n              x) =\n          0\n[PROOFSTEP]\nexact Finset.sum_congr rfl fun x hx => congr_arg Subtype.val <| mk_of_mem hx\n[GOAL]\ncase mpr.intro.refine'_2\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\n⊢ ∀ (x : ι),\n    x ∈ s →\n      ¬x ∈\n            support\n              (DFinsupp.mk s fun i =>\n                { val := ↑(μ ↑i),\n                  property :=\n                    (_ :\n                      ↑(μ ↑i) ∈\n                        ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),\n                          p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) }) →\n        ↑(↑(DFinsupp.mk s fun i =>\n                  { val := ↑(μ ↑i),\n                    property :=\n                      (_ :\n                        ↑(μ ↑i) ∈\n                          ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),\n                            p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })\n              x) =\n          0\n[PROOFSTEP]\nintro x _ hx\n[GOAL]\ncase mpr.intro.refine'_2\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\nx : ι\na✝ : x ∈ s\nhx :\n  ¬x ∈\n      support\n        (DFinsupp.mk s fun i =>\n          { val := ↑(μ ↑i),\n            property :=\n              (_ :\n                ↑(μ ↑i) ∈\n                  ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s), p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })\n⊢ ↑(↑(DFinsupp.mk s fun i =>\n            { val := ↑(μ ↑i),\n              property :=\n                (_ :\n                  ↑(μ ↑i) ∈\n                    ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),\n                      p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })\n        x) =\n    0\n[PROOFSTEP]\nrw [mem_support_iff, not_ne_iff] at hx \n[GOAL]\ncase mpr.intro.refine'_2\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\nx : ι\na✝ : x ∈ s\nhx :\n  ↑(DFinsupp.mk s fun i =>\n          { val := ↑(μ ↑i),\n            property :=\n              (_ :\n                ↑(μ ↑i) ∈\n                  ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s), p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })\n      x =\n    0\n⊢ ↑(↑(DFinsupp.mk s fun i =>\n            { val := ↑(μ ↑i),\n              property :=\n                (_ :\n                  ↑(μ ↑i) ∈\n                    ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s),\n                      p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })\n        x) =\n    0\n[PROOFSTEP]\nrw [hx]\n[GOAL]\ncase mpr.intro.refine'_2\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset ι\np : ι → Submodule R N\na : N\nμ : (i : ι) → { x // x ∈ p i }\nhμ : ∑ i in s, ↑(μ i) = a\nx : ι\na✝ : x ∈ s\nhx :\n  ↑(DFinsupp.mk s fun i =>\n          { val := ↑(μ ↑i),\n            property :=\n              (_ :\n                ↑(μ ↑i) ∈\n                  ⨆ (_ : ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) } ∈ s), p ↑{ val := ↑i, property := (_ : ↑i ∈ ↑s) }) })\n      x =\n    0\n⊢ ↑0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\n⊢ Independent p ↔\n    ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n      ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\n[PROOFSTEP]\nsimp_rw [CompleteLattice.independent_def, Submodule.disjoint_def, Submodule.mem_biSup_iff_exists_dfinsupp, exists_imp,\n  filter_ne_eq_erase]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\n⊢ (∀ (i : ι) (x : N),\n      x ∈ p i →\n        ∀ (x_1 : Π₀ (i : ι), { x // x ∈ p i }),\n          ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i x_1) = x → x = 0) ↔\n    ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n      ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\n[PROOFSTEP]\nrefine' forall_congr' fun i => Subtype.forall'.trans _\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\ni : ι\n⊢ (∀ (x : { a // a ∈ p i }) (x_1 : Π₀ (i : ι), { x // x ∈ p i }),\n      ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i x_1) = ↑x → ↑x = 0) ↔\n    ∀ (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n      ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\n[PROOFSTEP]\nsimp_rw [Submodule.coe_eq_zero]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\nh : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))\n⊢ Independent p\n[PROOFSTEP]\nrw [independent_iff_forall_dfinsupp]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\nh : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))\n⊢ ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\n[PROOFSTEP]\nintro i x v hv\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\nh : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))\ni : ι\nx : { x // x ∈ p i }\nv : Π₀ (i : ι), { x // x ∈ p i }\nhv : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x\n⊢ x = 0\n[PROOFSTEP]\nreplace hv :\n  lsum ℕ (M := fun i ↦ ↥(p i)) (fun i => (p i).subtype) (erase i v) =\n    lsum ℕ (M := fun i ↦ ↥(p i)) (fun i => (p i).subtype) (single i x)\n[GOAL]\ncase hv\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\nh : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))\ni : ι\nx : { x // x ∈ p i }\nv : Π₀ (i : ι), { x // x ∈ p i }\nhv : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x\n⊢ ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (single i x)\n[PROOFSTEP]\nsimpa only [lsum_single] using hv\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\nh : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))\ni : ι\nx : { x // x ∈ p i }\nv : Π₀ (i : ι), { x // x ∈ p i }\nhv :\n  ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (single i x)\n⊢ x = 0\n[PROOFSTEP]\nhave := FunLike.ext_iff.mp (h hv) i\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → Submodule R N\nh : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))\ni : ι\nx : { x // x ∈ p i }\nv : Π₀ (i : ι), { x // x ∈ p i }\nhv :\n  ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (single i x)\nthis : ↑(erase i v) i = ↑(single i x) i\n⊢ x = 0\n[PROOFSTEP]\nsimpa [eq_comm] using this\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → AddSubmonoid N\nh : Function.Injective ↑(sumAddHom fun i => AddSubmonoid.subtype (p i))\n⊢ Independent p\n[PROOFSTEP]\nrw [← independent_map_orderIso_iff (AddSubmonoid.toNatSubmodule : AddSubmonoid N ≃o _)]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\np : ι → AddSubmonoid N\nh : Function.Injective ↑(sumAddHom fun i => AddSubmonoid.subtype (p i))\n⊢ Independent (↑AddSubmonoid.toNatSubmodule ∘ p)\n[PROOFSTEP]\nexact independent_of_dfinsupp_lsum_injective _ h\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\ninst✝ : (m : R) → Decidable (m ≠ 0)\np : ι → Submodule R N\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\n⊢ LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (p i))\n      (LinearMap.comp\n        (mapRange.linearMap fun i =>\n          LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })\n        ↑(finsuppLequivDFinsupp R)) =\n    Finsupp.total ι N R v\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\ninst✝ : (m : R) → Decidable (m ≠ 0)\np : ι → Submodule R N\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\na✝ : ι\n⊢ ↑(LinearMap.comp\n          (LinearMap.comp (↑(lsum ℕ) fun i => Submodule.subtype (p i))\n            (LinearMap.comp\n              (mapRange.linearMap fun i =>\n                LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })\n              ↑(finsuppLequivDFinsupp R)))\n          (Finsupp.lsingle a✝))\n      1 =\n    ↑(LinearMap.comp (Finsupp.total ι N R v) (Finsupp.lsingle a✝)) 1\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → AddSubgroup N\nh : Function.Injective ↑(sumAddHom fun i => AddSubgroup.subtype (p i))\n⊢ Independent p\n[PROOFSTEP]\nrw [← independent_map_orderIso_iff (AddSubgroup.toIntSubmodule : AddSubgroup N ≃o _)]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → AddSubgroup N\nh : Function.Injective ↑(sumAddHom fun i => AddSubgroup.subtype (p i))\n⊢ Independent (↑AddSubgroup.toIntSubmodule ∘ p)\n[PROOFSTEP]\nexact independent_of_dfinsupp_lsum_injective _ h\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → Submodule R N\nh : Independent p\n⊢ Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))\n[PROOFSTEP]\nrw [independent_iff_forall_dfinsupp] at h \n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → Submodule R N\nh✝ : Independent p\nh :\n  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\n⊢ Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))\n[PROOFSTEP]\nsuffices LinearMap.ker (lsum ℕ (M := fun i ↦ ↥(p i)) fun i => (p i).subtype) = ⊥ by\n  -- Lean can't find this without our help\n  letI thisI : AddCommGroup (Π₀ i, p i) := inferInstance\n  rw [LinearMap.ker_eq_bot] at this \n  exact this\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → Submodule R N\nh✝ : Independent p\nh :\n  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\nthis : LinearMap.ker (↑(lsum ℕ) fun i => Submodule.subtype (p i)) = ⊥\n⊢ Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))\n[PROOFSTEP]\nletI thisI : AddCommGroup (Π₀ i, p i) := inferInstance\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → Submodule R N\nh✝ : Independent p\nh :\n  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\nthis : LinearMap.ker (↑(lsum ℕ) fun i => Submodule.subtype (p i)) = ⊥\nthisI : AddCommGroup (Π₀ (i : ι), { x // x ∈ p i }) := inferInstance\n⊢ Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))\n[PROOFSTEP]\nrw [LinearMap.ker_eq_bot] at this \n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → Submodule R N\nh✝ : Independent p\nh :\n  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\nthisI : AddCommGroup (Π₀ (i : ι), { x // x ∈ p i }) := inferInstance\nthis : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))\n⊢ Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))\n[PROOFSTEP]\nexact this\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → Submodule R N\nh✝ : Independent p\nh :\n  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\n⊢ LinearMap.ker (↑(lsum ℕ) fun i => Submodule.subtype (p i)) = ⊥\n[PROOFSTEP]\nrw [LinearMap.ker_eq_bot']\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → Submodule R N\nh✝ : Independent p\nh :\n  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\n⊢ ∀ (m : Π₀ (i : ι), { x // x ∈ p i }), ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) m = 0 → m = 0\n[PROOFSTEP]\nintro m hm\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → Submodule R N\nh✝ : Independent p\nh :\n  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\nm : Π₀ (i : ι), { x // x ∈ p i }\nhm : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) m = 0\n⊢ m = 0\n[PROOFSTEP]\next i : 1\n  -- split `m` into the piece at `i` and the pieces elsewhere, to match `h`\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → Submodule R N\nh✝ : Independent p\nh :\n  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\nm : Π₀ (i : ι), { x // x ∈ p i }\nhm : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) m = 0\ni : ι\n⊢ ↑m i = ↑0 i\n[PROOFSTEP]\nrw [DFinsupp.zero_apply, ← neg_eq_zero]\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → Submodule R N\nh✝ : Independent p\nh :\n  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\nm : Π₀ (i : ι), { x // x ∈ p i }\nhm : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) m = 0\ni : ι\n⊢ -↑m i = 0\n[PROOFSTEP]\nrefine' h i (-m i) m _\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → Submodule R N\nh✝ : Independent p\nh :\n  ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),\n    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0\nm : Π₀ (i : ι), { x // x ∈ p i }\nhm : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) m = 0\ni : ι\n⊢ ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i m) = ↑(-↑m i)\n[PROOFSTEP]\nrwa [← erase_add_single i m, LinearMap.map_add, lsum_single, Submodule.subtype_apply, add_eq_zero_iff_eq_neg, ←\n  Submodule.coe_neg] at hm \n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → AddSubgroup N\nh : Independent p\n⊢ Function.Injective ↑(sumAddHom fun i => AddSubgroup.subtype (p i))\n[PROOFSTEP]\nrw [← independent_map_orderIso_iff (AddSubgroup.toIntSubmodule : AddSubgroup N ≃o _)] at h \n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝² : Ring R\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\np : ι → AddSubgroup N\nh : Independent (↑AddSubgroup.toIntSubmodule ∘ p)\n⊢ Function.Injective ↑(sumAddHom fun i => AddSubgroup.subtype (p i))\n[PROOFSTEP]\nexact h.dfinsupp_lsum_injective\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\n⊢ LinearIndependent R v\n[PROOFSTEP]\nlet _ := Classical.decEq ι\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\nx✝ : DecidableEq ι := Classical.decEq ι\n⊢ LinearIndependent R v\n[PROOFSTEP]\nlet _ := Classical.decEq R\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\nx✝¹ : DecidableEq ι := Classical.decEq ι\nx✝ : DecidableEq R := Classical.decEq R\n⊢ LinearIndependent R v\n[PROOFSTEP]\nrw [linearIndependent_iff]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\nx✝¹ : DecidableEq ι := Classical.decEq ι\nx✝ : DecidableEq R := Classical.decEq R\n⊢ ∀ (l : ι →₀ R), ↑(Finsupp.total ι N R v) l = 0 → l = 0\n[PROOFSTEP]\nintro l hl\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\nx✝¹ : DecidableEq ι := Classical.decEq ι\nx✝ : DecidableEq R := Classical.decEq R\nl : ι →₀ R\nhl : ↑(Finsupp.total ι N R v) l = 0\n⊢ l = 0\n[PROOFSTEP]\nlet a := DFinsupp.mapRange.linearMap (fun i => LinearMap.toSpanSingleton R (p i) ⟨v i, hv i⟩) l.toDFinsupp\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\nx✝¹ : DecidableEq ι := Classical.decEq ι\nx✝ : DecidableEq R := Classical.decEq R\nl : ι →₀ R\nhl : ↑(Finsupp.total ι N R v) l = 0\na : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=\n  ↑(mapRange.linearMap fun i =>\n        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })\n    (Finsupp.toDFinsupp l)\n⊢ l = 0\n[PROOFSTEP]\nhave ha : a = 0 := by\n  apply hp.dfinsupp_lsum_injective\n  rwa [← lsum_comp_mapRange_toSpanSingleton _ hv] at hl \n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\nx✝¹ : DecidableEq ι := Classical.decEq ι\nx✝ : DecidableEq R := Classical.decEq R\nl : ι →₀ R\nhl : ↑(Finsupp.total ι N R v) l = 0\na : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=\n  ↑(mapRange.linearMap fun i =>\n        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })\n    (Finsupp.toDFinsupp l)\n⊢ a = 0\n[PROOFSTEP]\napply hp.dfinsupp_lsum_injective\n[GOAL]\ncase a\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\nx✝¹ : DecidableEq ι := Classical.decEq ι\nx✝ : DecidableEq R := Classical.decEq R\nl : ι →₀ R\nhl : ↑(Finsupp.total ι N R v) l = 0\na : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=\n  ↑(mapRange.linearMap fun i =>\n        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })\n    (Finsupp.toDFinsupp l)\n⊢ ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) a = ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) 0\n[PROOFSTEP]\nrwa [← lsum_comp_mapRange_toSpanSingleton _ hv] at hl \n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\nx✝¹ : DecidableEq ι := Classical.decEq ι\nx✝ : DecidableEq R := Classical.decEq R\nl : ι →₀ R\nhl : ↑(Finsupp.total ι N R v) l = 0\na : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=\n  ↑(mapRange.linearMap fun i =>\n        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })\n    (Finsupp.toDFinsupp l)\nha : a = 0\n⊢ l = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\nx✝¹ : DecidableEq ι := Classical.decEq ι\nx✝ : DecidableEq R := Classical.decEq R\nl : ι →₀ R\nhl : ↑(Finsupp.total ι N R v) l = 0\na : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=\n  ↑(mapRange.linearMap fun i =>\n        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })\n    (Finsupp.toDFinsupp l)\nha : a = 0\ni : ι\n⊢ ↑l i = ↑0 i\n[PROOFSTEP]\napply smul_left_injective R (hv' i)\n[GOAL]\ncase h.a\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\nx✝¹ : DecidableEq ι := Classical.decEq ι\nx✝ : DecidableEq R := Classical.decEq R\nl : ι →₀ R\nhl : ↑(Finsupp.total ι N R v) l = 0\na : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=\n  ↑(mapRange.linearMap fun i =>\n        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })\n    (Finsupp.toDFinsupp l)\nha : a = 0\ni : ι\n⊢ (fun c => c • v i) (↑l i) = (fun c => c • v i) (↑0 i)\n[PROOFSTEP]\nhave : l i • v i = a i := rfl\n[GOAL]\ncase h.a\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\nx✝¹ : DecidableEq ι := Classical.decEq ι\nx✝ : DecidableEq R := Classical.decEq R\nl : ι →₀ R\nhl : ↑(Finsupp.total ι N R v) l = 0\na : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=\n  ↑(mapRange.linearMap fun i =>\n        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })\n    (Finsupp.toDFinsupp l)\nha : a = 0\ni : ι\nthis : ↑l i • v i = ↑(↑a i)\n⊢ (fun c => c • v i) (↑l i) = (fun c => c • v i) (↑0 i)\n[PROOFSTEP]\nsimp only [coe_zero, Pi.zero_apply, ZeroMemClass.coe_zero, smul_eq_zero, ha] at this \n[GOAL]\ncase h.a\nι : Type u_1\nR : Type u_2\nS : Type u_3\nM : ι → Type u_4\nN : Type u_5\ndec_ι : DecidableEq ι\ninst✝³ : Ring R\ninst✝² : AddCommGroup N\ninst✝¹ : Module R N\ninst✝ : NoZeroSMulDivisors R N\np : ι → Submodule R N\nhp : Independent p\nv : ι → N\nhv : ∀ (i : ι), v i ∈ p i\nhv' : ∀ (i : ι), v i ≠ 0\nx✝¹ : DecidableEq ι := Classical.decEq ι\nx✝ : DecidableEq R := Classical.decEq R\nl : ι →₀ R\nhl : ↑(Finsupp.total ι N R v) l = 0\na : (fun x => Π₀ (i : ι), { x // x ∈ p i }) (Finsupp.toDFinsupp l) :=\n  ↑(mapRange.linearMap fun i =>\n        LinearMap.toSpanSingleton R { x // x ∈ p i } { val := v i, property := (_ : v i ∈ p i) })\n    (Finsupp.toDFinsupp l)\nha : a = 0\ni : ι\nthis : ↑l i = 0 ∨ v i = 0\n⊢ (fun c => c • v i) (↑l i) = (fun c => c • v i) (↑0 i)\n[PROOFSTEP]\nsimpa\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.DFinsupp", "llama_tokens": 90178, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.8479677660619633, "lm_q2_score": 0.46490157137338844, "lm_q1q2_score": 0.3942215469161886}}
{"text": "[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nt : Finset ι\nh : Finset.Nonempty t\nI : ι → Ideal R\n⊢ ⨆ (i : ι) (_ : i ∈ t), ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j = ⊤ ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\n[PROOFSTEP]\nhaveI : DecidableEq ι := Classical.decEq ι\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nt : Finset ι\nh : Finset.Nonempty t\nI : ι → Ideal R\nthis : DecidableEq ι\n⊢ ⨆ (i : ι) (_ : i ∈ t), ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j = ⊤ ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\n[PROOFSTEP]\nrw [eq_top_iff_one, Submodule.mem_iSup_finset_iff_exists_sum]\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nt : Finset ι\nh : Finset.Nonempty t\nI : ι → Ideal R\nthis : DecidableEq ι\n⊢ (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\n[PROOFSTEP]\nrefine' h.cons_induction _ _\n[GOAL]\ncase refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nt : Finset ι\nh : Finset.Nonempty t\nI : ι → Ideal R\nthis : DecidableEq ι\n⊢ ∀ (a : ι), (∃ μ, (Finset.sum {a} fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑{a} fun i j => I i ⊔ I j = ⊤\n[PROOFSTEP]\nclear t h\n[GOAL]\ncase refine'_2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nt : Finset ι\nh : Finset.Nonempty t\nI : ι → Ideal R\nthis : DecidableEq ι\n⊢ ∀ ⦃a : ι⦄ (s : Finset ι) (h : ¬a ∈ s),\n    Finset.Nonempty s →\n      ((∃ μ, (Finset.sum s fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑s fun i j => I i ⊔ I j = ⊤) →\n        ((∃ μ, (Finset.sum (Finset.cons a s h) fun i => ↑(μ i)) = 1) ↔\n          Set.Pairwise ↑(Finset.cons a s h) fun i j => I i ⊔ I j = ⊤)\n[PROOFSTEP]\nclear t h\n[GOAL]\ncase refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\n⊢ ∀ (a : ι), (∃ μ, (Finset.sum {a} fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑{a} fun i j => I i ⊔ I j = ⊤\n[PROOFSTEP]\nsimp only [Finset.sum_singleton, Finset.coe_singleton, Set.pairwise_singleton, iff_true_iff]\n[GOAL]\ncase refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\n⊢ ∀ (a : ι), ∃ μ, ↑(μ a) = 1\n[PROOFSTEP]\nrefine' fun a => ⟨fun i => if h : i = a then ⟨1, _⟩ else 0, _⟩\n[GOAL]\ncase refine'_1.refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na i : ι\nh : i = a\n⊢ 1 ∈ ⨅ (j : ι) (_ : j ∈ {a}) (_ : j ≠ i), I j\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase refine'_1.refine'_2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\n⊢ ↑((fun i => if h : i = a then { val := 1, property := (_ : 1 ∈ ⨅ (x : ι) (_ : x ∈ {a}) (_ : x ≠ i), I x) } else 0)\n        a) =\n    1\n[PROOFSTEP]\nsimp only [dif_pos, dif_ctx_congr, Submodule.coe_mk, eq_self_iff_true]\n[GOAL]\ncase refine'_2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\n⊢ ∀ ⦃a : ι⦄ (s : Finset ι) (h : ¬a ∈ s),\n    Finset.Nonempty s →\n      ((∃ μ, (Finset.sum s fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑s fun i j => I i ⊔ I j = ⊤) →\n        ((∃ μ, (Finset.sum (Finset.cons a s h) fun i => ↑(μ i)) = 1) ↔\n          Set.Pairwise ↑(Finset.cons a s h) fun i j => I i ⊔ I j = ⊤)\n[PROOFSTEP]\nintro a t hat h ih\n[GOAL]\ncase refine'_2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\n⊢ (∃ μ, (Finset.sum (Finset.cons a t hat) fun i => ↑(μ i)) = 1) ↔\n    Set.Pairwise ↑(Finset.cons a t hat) fun i j => I i ⊔ I j = ⊤\n[PROOFSTEP]\nrw [Finset.coe_cons, Set.pairwise_insert_of_symmetric fun i j (h : I i ⊔ I j = ⊤) => sup_comm.trans h]\n[GOAL]\ncase refine'_2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\n⊢ (∃ μ, (Finset.sum (Finset.cons a t hat) fun i => ↑(μ i)) = 1) ↔\n    (Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤) ∧ ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase refine'_2.mp\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\n⊢ (∃ μ, (Finset.sum (Finset.cons a t hat) fun i => ↑(μ i)) = 1) →\n    (Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤) ∧ ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\n[PROOFSTEP]\nrintro ⟨μ, hμ⟩\n[GOAL]\ncase refine'_2.mp.intro\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (Finset.sum (Finset.cons a t hat) fun i => ↑(μ i)) = 1\n⊢ (Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤) ∧ ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\n[PROOFSTEP]\nrw [Finset.sum_cons] at hμ \n[GOAL]\ncase refine'_2.mp.intro\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\n⊢ (Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤) ∧ ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\n[PROOFSTEP]\nrefine ⟨ih.mp ⟨Pi.single h.choose ⟨μ a, ?a1⟩ + fun i => ⟨μ i, ?a2⟩, ?a3⟩, fun b hb ab => ?a4⟩\n[GOAL]\ncase a3\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\n⊢ (Finset.sum t fun i => ↑((Pi.single (Exists.choose h) { val := ↑(μ a), property := ?a1 } + fun i => ?m.8605 i) i)) = 1\ncase a4\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\n⊢ I a ⊔ I b = ⊤\ncase a1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\n⊢ ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j\ncase a2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\ni : ι\n⊢ ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j\n[PROOFSTEP]\ncase a1 =>\n  have := Submodule.coe_mem (μ a)\n  rw [mem_iInf] at this ⊢\n    --for some reason `simp only [mem_iInf]` times out\n  intro i\n  specialize this i\n  rw [mem_iInf, mem_iInf] at this ⊢\n  intro hi _\n  apply this (Finset.subset_cons _ hi)\n  rintro rfl\n  exact hat hi\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\n⊢ ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j\n[PROOFSTEP]\ncase a1 =>\n  have := Submodule.coe_mem (μ a)\n  rw [mem_iInf] at this ⊢\n    --for some reason `simp only [mem_iInf]` times out\n  intro i\n  specialize this i\n  rw [mem_iInf, mem_iInf] at this ⊢\n  intro hi _\n  apply this (Finset.subset_cons _ hi)\n  rintro rfl\n  exact hat hi\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\n⊢ ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j\n[PROOFSTEP]\nhave := Submodule.coe_mem (μ a)\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nthis : ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ a), I j\n⊢ ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j\n[PROOFSTEP]\nrw [mem_iInf] at this ⊢\n  --for some reason `simp only [mem_iInf]` times out\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nthis : ∀ (i : ι), ↑(μ a) ∈ ⨅ (_ : i ∈ Finset.cons a t hat) (_ : i ≠ a), I i\n⊢ ∀ (i : ι), ↑(μ a) ∈ ⨅ (_ : i ∈ t) (_ : i ≠ Exists.choose h), I i\n[PROOFSTEP]\nintro i\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nthis : ∀ (i : ι), ↑(μ a) ∈ ⨅ (_ : i ∈ Finset.cons a t hat) (_ : i ≠ a), I i\ni : ι\n⊢ ↑(μ a) ∈ ⨅ (_ : i ∈ t) (_ : i ≠ Exists.choose h), I i\n[PROOFSTEP]\nspecialize this i\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\ni : ι\nthis : ↑(μ a) ∈ ⨅ (_ : i ∈ Finset.cons a t hat) (_ : i ≠ a), I i\n⊢ ↑(μ a) ∈ ⨅ (_ : i ∈ t) (_ : i ≠ Exists.choose h), I i\n[PROOFSTEP]\nrw [mem_iInf, mem_iInf] at this ⊢\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\ni : ι\nthis : i ∈ Finset.cons a t hat → i ≠ a → ↑(μ a) ∈ I i\n⊢ i ∈ t → i ≠ Exists.choose h → ↑(μ a) ∈ I i\n[PROOFSTEP]\nintro hi _\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\ni : ι\nthis : i ∈ Finset.cons a t hat → i ≠ a → ↑(μ a) ∈ I i\nhi : i ∈ t\ni✝ : i ≠ Exists.choose h\n⊢ ↑(μ a) ∈ I i\n[PROOFSTEP]\napply this (Finset.subset_cons _ hi)\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\ni : ι\nthis : i ∈ Finset.cons a t hat → i ≠ a → ↑(μ a) ∈ I i\nhi : i ∈ t\ni✝ : i ≠ Exists.choose h\n⊢ i ≠ a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\nt : Finset ι\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\ni : ι\nhi : i ∈ t\ni✝ : i ≠ Exists.choose h\nhat : ¬i ∈ t\nμ : (i_1 : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons i t hat) (_ : j ≠ i_1), I j }\nhμ : (↑(μ i) + Finset.sum t fun x => ↑(μ x)) = 1\nthis : i ∈ Finset.cons i t hat → i ≠ i → ↑(μ i) ∈ I i\n⊢ False\n[PROOFSTEP]\nexact hat hi\n[GOAL]\ncase a3\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\n⊢ (Finset.sum t fun i =>\n      ↑((Pi.single (Exists.choose h)\n              { val := ↑(μ a), property := (_ : ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j) } +\n            fun i => ?m.8605 i)\n          i)) =\n    1\ncase a4\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\n⊢ I a ⊔ I b = ⊤\ncase a2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\ni : ι\n⊢ ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j\n[PROOFSTEP]\ncase a2 =>\n  have := Submodule.coe_mem (μ i)\n  simp only [mem_iInf] at this ⊢\n  intro j hj ij\n  exact this _ (Finset.subset_cons _ hj) ij\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\ni : ι\n⊢ ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j\n[PROOFSTEP]\ncase a2 =>\n  have := Submodule.coe_mem (μ i)\n  simp only [mem_iInf] at this ⊢\n  intro j hj ij\n  exact this _ (Finset.subset_cons _ hj) ij\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\ni : ι\n⊢ ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j\n[PROOFSTEP]\nhave := Submodule.coe_mem (μ i)\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\ni : ι\nthis : ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j\n⊢ ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j\n[PROOFSTEP]\nsimp only [mem_iInf] at this ⊢\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\ni : ι\nthis : ∀ (i_1 : ι), i_1 ∈ Finset.cons a t hat → i_1 ≠ i → ↑(μ i) ∈ I i_1\n⊢ ∀ (i_1 : ι), i_1 ∈ t → i_1 ≠ i → ↑(μ i) ∈ I i_1\n[PROOFSTEP]\nintro j hj ij\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\ni : ι\nthis : ∀ (i_1 : ι), i_1 ∈ Finset.cons a t hat → i_1 ≠ i → ↑(μ i) ∈ I i_1\nj : ι\nhj : j ∈ t\nij : j ≠ i\n⊢ ↑(μ i) ∈ I j\n[PROOFSTEP]\nexact this _ (Finset.subset_cons _ hj) ij\n[GOAL]\ncase a3\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\n⊢ (Finset.sum t fun i =>\n      ↑((Pi.single (Exists.choose h)\n              { val := ↑(μ a), property := (_ : ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j) } +\n            fun i => { val := ↑(μ i), property := (_ : ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j) })\n          i)) =\n    1\ncase a4\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\n⊢ I a ⊔ I b = ⊤\n[PROOFSTEP]\ncase a3 =>\n  rw [← @if_pos _ _ h.choose_spec R (μ a) 0, ← Finset.sum_pi_single', ← Finset.sum_add_distrib] at hμ \n  convert hμ\n  rename_i i _\n  rw [Pi.add_apply, Submodule.coe_add, Submodule.coe_mk]\n  by_cases hi : i = h.choose\n  · rw [hi, Pi.single_eq_same, Pi.single_eq_same, Submodule.coe_mk]\n  · rw [Pi.single_eq_of_ne hi, Pi.single_eq_of_ne hi, Submodule.coe_zero]\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\n⊢ (Finset.sum t fun i =>\n      ↑((Pi.single (Exists.choose h)\n              { val := ↑(μ a), property := (_ : ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j) } +\n            fun i => { val := ↑(μ i), property := (_ : ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j) })\n          i)) =\n    1\n[PROOFSTEP]\ncase a3 =>\n  rw [← @if_pos _ _ h.choose_spec R (μ a) 0, ← Finset.sum_pi_single', ← Finset.sum_add_distrib] at hμ \n  convert hμ\n  rename_i i _\n  rw [Pi.add_apply, Submodule.coe_add, Submodule.coe_mk]\n  by_cases hi : i = h.choose\n  · rw [hi, Pi.single_eq_same, Pi.single_eq_same, Submodule.coe_mk]\n  · rw [Pi.single_eq_of_ne hi, Pi.single_eq_of_ne hi, Submodule.coe_zero]\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\n⊢ (Finset.sum t fun i =>\n      ↑((Pi.single (Exists.choose h)\n              { val := ↑(μ a), property := (_ : ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j) } +\n            fun i => { val := ↑(μ i), property := (_ : ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j) })\n          i)) =\n    1\n[PROOFSTEP]\nrw [← @if_pos _ _ h.choose_spec R (μ a) 0, ← Finset.sum_pi_single', ← Finset.sum_add_distrib] at hμ \n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ✝ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nhμ : (Finset.sum t fun x => Pi.single (Exists.choose h) (↑(μ a)) x + ↑(μ x)) = 1\n⊢ (Finset.sum t fun i =>\n      ↑((Pi.single (Exists.choose h)\n              { val := ↑(μ a), property := (_ : ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j) } +\n            fun i => { val := ↑(μ i), property := (_ : ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j) })\n          i)) =\n    1\n[PROOFSTEP]\nconvert hμ\n[GOAL]\ncase h.e'_2.a\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ✝ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nhμ : (Finset.sum t fun x => Pi.single (Exists.choose h) (↑(μ a)) x + ↑(μ x)) = 1\nx✝ : ι\na✝ : x✝ ∈ t\n⊢ ↑((Pi.single (Exists.choose h)\n            { val := ↑(μ a), property := (_ : ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j) } +\n          fun i => { val := ↑(μ i), property := (_ : ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j) })\n        x✝) =\n    Pi.single (Exists.choose h) (↑(μ a)) x✝ + ↑(μ x✝)\n[PROOFSTEP]\nrename_i i _\n[GOAL]\ncase h.e'_2.a\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ✝ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nhμ : (Finset.sum t fun x => Pi.single (Exists.choose h) (↑(μ a)) x + ↑(μ x)) = 1\ni : ι\na✝ : i ∈ t\n⊢ ↑((Pi.single (Exists.choose h)\n            { val := ↑(μ a), property := (_ : ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j) } +\n          fun i => { val := ↑(μ i), property := (_ : ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j) })\n        i) =\n    Pi.single (Exists.choose h) (↑(μ a)) i + ↑(μ i)\n[PROOFSTEP]\nrw [Pi.add_apply, Submodule.coe_add, Submodule.coe_mk]\n[GOAL]\ncase h.e'_2.a\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ✝ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nhμ : (Finset.sum t fun x => Pi.single (Exists.choose h) (↑(μ a)) x + ↑(μ x)) = 1\ni : ι\na✝ : i ∈ t\n⊢ ↑(Pi.single (Exists.choose h)\n          { val := ↑(μ a), property := (_ : ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j) } i) +\n      ↑{ val := ↑(μ i), property := (_ : ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j) } =\n    Pi.single (Exists.choose h) (↑(μ a)) i + ↑(μ i)\n[PROOFSTEP]\nby_cases hi : i = h.choose\n[GOAL]\ncase pos\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ✝ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nhμ : (Finset.sum t fun x => Pi.single (Exists.choose h) (↑(μ a)) x + ↑(μ x)) = 1\ni : ι\na✝ : i ∈ t\nhi : i = Exists.choose h\n⊢ ↑(Pi.single (Exists.choose h)\n          { val := ↑(μ a), property := (_ : ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j) } i) +\n      ↑{ val := ↑(μ i), property := (_ : ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j) } =\n    Pi.single (Exists.choose h) (↑(μ a)) i + ↑(μ i)\n[PROOFSTEP]\nrw [hi, Pi.single_eq_same, Pi.single_eq_same, Submodule.coe_mk]\n[GOAL]\ncase neg\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ✝ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nhμ : (Finset.sum t fun x => Pi.single (Exists.choose h) (↑(μ a)) x + ↑(μ x)) = 1\ni : ι\na✝ : i ∈ t\nhi : ¬i = Exists.choose h\n⊢ ↑(Pi.single (Exists.choose h)\n          { val := ↑(μ a), property := (_ : ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ Exists.choose h), I j) } i) +\n      ↑{ val := ↑(μ i), property := (_ : ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j) } =\n    Pi.single (Exists.choose h) (↑(μ a)) i + ↑(μ i)\n[PROOFSTEP]\nrw [Pi.single_eq_of_ne hi, Pi.single_eq_of_ne hi, Submodule.coe_zero]\n[GOAL]\ncase a4\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\n⊢ I a ⊔ I b = ⊤\n[PROOFSTEP]\ncase a4 =>\n  rw [eq_top_iff_one, Submodule.mem_sup]\n  rw [add_comm] at hμ \n  refine' ⟨_, _, _, _, hμ⟩\n  · refine' sum_mem _ fun x hx => _\n    have := Submodule.coe_mem (μ x)\n    simp only [mem_iInf] at this \n    apply this _ (Finset.mem_cons_self _ _)\n    rintro rfl\n    exact hat hx\n  · have := Submodule.coe_mem (μ a)\n    simp only [mem_iInf] at this \n    exact this _ (Finset.subset_cons _ hb) ab.symm\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\n⊢ I a ⊔ I b = ⊤\n[PROOFSTEP]\ncase a4 =>\n  rw [eq_top_iff_one, Submodule.mem_sup]\n  rw [add_comm] at hμ \n  refine' ⟨_, _, _, _, hμ⟩\n  · refine' sum_mem _ fun x hx => _\n    have := Submodule.coe_mem (μ x)\n    simp only [mem_iInf] at this \n    apply this _ (Finset.mem_cons_self _ _)\n    rintro rfl\n    exact hat hx\n  · have := Submodule.coe_mem (μ a)\n    simp only [mem_iInf] at this \n    exact this _ (Finset.subset_cons _ hb) ab.symm\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\n⊢ I a ⊔ I b = ⊤\n[PROOFSTEP]\nrw [eq_top_iff_one, Submodule.mem_sup]\n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (↑(μ a) + Finset.sum t fun x => ↑(μ x)) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\n⊢ ∃ y, y ∈ I a ∧ ∃ z, z ∈ I b ∧ y + z = 1\n[PROOFSTEP]\nrw [add_comm] at hμ \n[GOAL]\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun x => ↑(μ x)) + ↑(μ a) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\n⊢ ∃ y, y ∈ I a ∧ ∃ z, z ∈ I b ∧ y + z = 1\n[PROOFSTEP]\nrefine' ⟨_, _, _, _, hμ⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun x => ↑(μ x)) + ↑(μ a) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\n⊢ (Finset.sum t fun x => ↑(μ x)) ∈ I a\n[PROOFSTEP]\nrefine' sum_mem _ fun x hx => _\n[GOAL]\ncase refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun x => ↑(μ x)) + ↑(μ a) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\nx : ι\nhx : x ∈ t\n⊢ ↑(μ x) ∈ I a\n[PROOFSTEP]\nhave := Submodule.coe_mem (μ x)\n[GOAL]\ncase refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun x => ↑(μ x)) + ↑(μ a) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\nx : ι\nhx : x ∈ t\nthis : ↑(μ x) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ x), I j\n⊢ ↑(μ x) ∈ I a\n[PROOFSTEP]\nsimp only [mem_iInf] at this \n[GOAL]\ncase refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun x => ↑(μ x)) + ↑(μ a) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\nx : ι\nhx : x ∈ t\nthis : ∀ (i : ι), i ∈ Finset.cons a t hat → i ≠ x → ↑(μ x) ∈ I i\n⊢ ↑(μ x) ∈ I a\n[PROOFSTEP]\napply this _ (Finset.mem_cons_self _ _)\n[GOAL]\ncase refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun x => ↑(μ x)) + ↑(μ a) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\nx : ι\nhx : x ∈ t\nthis : ∀ (i : ι), i ∈ Finset.cons a t hat → i ≠ x → ↑(μ x) ∈ I i\n⊢ a ≠ x\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun x => ↑(μ x)) + ↑(μ a) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\nhx : a ∈ t\nthis : ∀ (i : ι), i ∈ Finset.cons a t hat → i ≠ a → ↑(μ a) ∈ I i\n⊢ False\n[PROOFSTEP]\nexact hat hx\n[GOAL]\ncase refine'_2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun x => ↑(μ x)) + ↑(μ a) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\n⊢ ↑(μ a) ∈ I b\n[PROOFSTEP]\nhave := Submodule.coe_mem (μ a)\n[GOAL]\ncase refine'_2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun x => ↑(μ x)) + ↑(μ a) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\nthis : ↑(μ a) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ a), I j\n⊢ ↑(μ a) ∈ I b\n[PROOFSTEP]\nsimp only [mem_iInf] at this \n[GOAL]\ncase refine'_2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun x => ↑(μ x)) + ↑(μ a) = 1\nb : ι\nhb : b ∈ ↑t\nab : a ≠ b\nthis : ∀ (i : ι), i ∈ Finset.cons a t hat → i ≠ a → ↑(μ a) ∈ I i\n⊢ ↑(μ a) ∈ I b\n[PROOFSTEP]\nexact this _ (Finset.subset_cons _ hb) ab.symm\n[GOAL]\ncase refine'_2.mpr\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\n⊢ ((Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤) ∧ ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤) →\n    ∃ μ, (Finset.sum (Finset.cons a t hat) fun i => ↑(μ i)) = 1\n[PROOFSTEP]\nrintro ⟨hs, Hb⟩\n[GOAL]\ncase refine'_2.mpr.intro\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\n⊢ ∃ μ, (Finset.sum (Finset.cons a t hat) fun i => ↑(μ i)) = 1\n[PROOFSTEP]\nobtain ⟨μ, hμ⟩ := ih.mpr hs\n[GOAL]\ncase refine'_2.mpr.intro.intro\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\n⊢ ∃ μ, (Finset.sum (Finset.cons a t hat) fun i => ↑(μ i)) = 1\n[PROOFSTEP]\nhave := sup_iInf_eq_top fun b hb => Hb b hb (ne_of_mem_of_not_mem hb hat).symm\n[GOAL]\ncase refine'_2.mpr.intro.intro\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nthis : I a ⊔ ⨅ (i : ι) (_ : i ∈ t), I i = ⊤\n⊢ ∃ μ, (Finset.sum (Finset.cons a t hat) fun i => ↑(μ i)) = 1\n[PROOFSTEP]\nrw [eq_top_iff_one, Submodule.mem_sup] at this \n[GOAL]\ncase refine'_2.mpr.intro.intro\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nthis : ∃ y, y ∈ I a ∧ ∃ z, z ∈ ⨅ (i : ι) (_ : i ∈ t), I i ∧ y + z = 1\n⊢ ∃ μ, (Finset.sum (Finset.cons a t hat) fun i => ↑(μ i)) = 1\n[PROOFSTEP]\nobtain ⟨u, hu, v, hv, huv⟩ := this\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u + v = 1\n⊢ ∃ μ, (Finset.sum (Finset.cons a t hat) fun i => ↑(μ i)) = 1\n[PROOFSTEP]\nrefine' ⟨fun i => if hi : i = a then ⟨v, _⟩ else ⟨u * μ i, _⟩, _⟩\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u + v = 1\ni : ι\nhi : i = a\n⊢ v ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j\n[PROOFSTEP]\nsimp only [mem_iInf] at hv ⊢\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhuv : u + v = 1\ni : ι\nhi : i = a\nhv : ∀ (i : ι), i ∈ t → v ∈ I i\n⊢ ∀ (i_1 : ι), i_1 ∈ Finset.cons a t hat → i_1 ≠ i → v ∈ I i_1\n[PROOFSTEP]\nintro j hj ij\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhuv : u + v = 1\ni : ι\nhi : i = a\nhv : ∀ (i : ι), i ∈ t → v ∈ I i\nj : ι\nhj : j ∈ Finset.cons a t hat\nij : j ≠ i\n⊢ v ∈ I j\n[PROOFSTEP]\nrw [Finset.mem_cons, ← hi] at hj \n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhuv : u + v = 1\ni : ι\nhi : i = a\nhv : ∀ (i : ι), i ∈ t → v ∈ I i\nj : ι\nhj : j = i ∨ j ∈ t\nij : j ≠ i\n⊢ v ∈ I j\n[PROOFSTEP]\nexact hv _ (hj.resolve_left ij)\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u + v = 1\ni : ι\nhi : ¬i = a\n⊢ u * ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j\n[PROOFSTEP]\nhave := Submodule.coe_mem (μ i)\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u + v = 1\ni : ι\nhi : ¬i = a\nthis : ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j\n⊢ u * ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j\n[PROOFSTEP]\nsimp only [mem_iInf] at this ⊢\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u + v = 1\ni : ι\nhi : ¬i = a\nthis : ∀ (i_1 : ι), i_1 ∈ t → i_1 ≠ i → ↑(μ i) ∈ I i_1\n⊢ ∀ (i_1 : ι), i_1 ∈ Finset.cons a t hat → i_1 ≠ i → u * ↑(μ i) ∈ I i_1\n[PROOFSTEP]\nintro j hj ij\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u + v = 1\ni : ι\nhi : ¬i = a\nthis : ∀ (i_1 : ι), i_1 ∈ t → i_1 ≠ i → ↑(μ i) ∈ I i_1\nj : ι\nhj : j ∈ Finset.cons a t hat\nij : j ≠ i\n⊢ u * ↑(μ i) ∈ I j\n[PROOFSTEP]\nrcases Finset.mem_cons.mp hj with (rfl | hj)\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_2.inl\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\nt : Finset ι\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu v : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u + v = 1\ni : ι\nthis : ∀ (i_1 : ι), i_1 ∈ t → i_1 ≠ i → ↑(μ i) ∈ I i_1\nj : ι\nij : j ≠ i\nhat : ¬j ∈ t\nHb : ∀ (b : ι), b ∈ ↑t → j ≠ b → I j ⊔ I b = ⊤\nhu : u ∈ I j\nhi : ¬i = j\nhj : j ∈ Finset.cons j t hat\n⊢ u * ↑(μ i) ∈ I j\n[PROOFSTEP]\nexact mul_mem_right _ _ hu\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_2.inr\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis✝ : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u + v = 1\ni : ι\nhi : ¬i = a\nthis : ∀ (i_1 : ι), i_1 ∈ t → i_1 ≠ i → ↑(μ i) ∈ I i_1\nj : ι\nhj✝ : j ∈ Finset.cons a t hat\nij : j ≠ i\nhj : j ∈ t\n⊢ u * ↑(μ i) ∈ I j\n[PROOFSTEP]\nexact mul_mem_left _ _ (this _ hj ij)\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u + v = 1\n⊢ (Finset.sum (Finset.cons a t hat) fun i =>\n      ↑((fun i =>\n            if hi : i = a then\n              { val := v, property := (_ : v ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j) }\n            else\n              { val := u * ↑(μ i),\n                property := (_ : u * ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j) })\n          i)) =\n    1\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u + v = 1\n⊢ (Finset.sum (Finset.cons a t hat) fun i =>\n      ↑(if hi : i = a then { val := v, property := (_ : v ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j) }\n        else\n          { val := u * ↑(μ i),\n            property := (_ : u * ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ i), I j) })) =\n    1\n[PROOFSTEP]\nrw [Finset.sum_cons, dif_pos rfl, add_comm]\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u + v = 1\n⊢ (Finset.sum t fun x =>\n        ↑(if hi : x = a then\n            { val := v, property := (_ : v ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ x), I j) }\n          else\n            { val := u * ↑(μ x),\n              property := (_ : u * ↑(μ x) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ x), I j) })) +\n      ↑{ val := v, property := (_ : v ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ a), I j) } =\n    1\n[PROOFSTEP]\nrw [← mul_one u] at huv \n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u * 1 + v = 1\n⊢ (Finset.sum t fun x =>\n        ↑(if hi : x = a then\n            { val := v, property := (_ : v ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ x), I j) }\n          else\n            { val := u * ↑(μ x),\n              property := (_ : u * ↑(μ x) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ x), I j) })) +\n      ↑{ val := v, property := (_ : v ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ a), I j) } =\n    1\n[PROOFSTEP]\nrw [← huv, ← hμ, Finset.mul_sum]\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u * 1 + v = 1\n⊢ (Finset.sum t fun x =>\n        ↑(if hi : x = a then\n            { val := v, property := (_ : v ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ x), I j) }\n          else\n            { val := u * ↑(μ x),\n              property := (_ : u * ↑(μ x) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ x), I j) })) +\n      ↑{ val := v, property := (_ : v ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ a), I j) } =\n    (Finset.sum t fun x => u * ↑(μ x)) + v\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_3.e_a\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u * 1 + v = 1\n⊢ (Finset.sum t fun x =>\n      ↑(if hi : x = a then { val := v, property := (_ : v ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ x), I j) }\n        else\n          { val := u * ↑(μ x),\n            property := (_ : u * ↑(μ x) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ x), I j) })) =\n    Finset.sum t fun x => u * ↑(μ x)\n[PROOFSTEP]\napply Finset.sum_congr rfl\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_3.e_a\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u * 1 + v = 1\n⊢ ∀ (x : ι),\n    x ∈ t →\n      ↑(if hi : x = a then { val := v, property := (_ : v ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ x), I j) }\n          else\n            { val := u * ↑(μ x),\n              property := (_ : u * ↑(μ x) ∈ ⨅ (j : ι) (_ : j ∈ Finset.cons a t hat) (_ : j ≠ x), I j) }) =\n        u * ↑(μ x)\n[PROOFSTEP]\nintro j hj\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_3.e_a\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u * 1 + v = 1\nj : ι\nhj : j ∈ t\n⊢ ↑(if hi : j = a then\n        { val := v, property := (_ : v ∈ ⨅ (j_1 : ι) (_ : j_1 ∈ Finset.cons a t hat) (_ : j_1 ≠ j), I j_1) }\n      else\n        { val := u * ↑(μ j),\n          property := (_ : u * ↑(μ j) ∈ ⨅ (j_1 : ι) (_ : j_1 ∈ Finset.cons a t hat) (_ : j_1 ≠ j), I j_1) }) =\n    u * ↑(μ j)\n[PROOFSTEP]\nrw [dif_neg]\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_3.e_a.hnc\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nHb : ∀ (b : ι), b ∈ ↑t → a ≠ b → I a ⊔ I b = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu : R\nhu : u ∈ I a\nv : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u * 1 + v = 1\nj : ι\nhj : j ∈ t\n⊢ ¬j = a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_2.mpr.intro.intro.intro.intro.intro.intro.refine'_3.e_a.hnc\nι : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nI : ι → Ideal R\nthis : DecidableEq ι\nt : Finset ι\nh : Finset.Nonempty t\nih : (∃ μ, (Finset.sum t fun i => ↑(μ i)) = 1) ↔ Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nhs : Set.Pairwise ↑t fun i j => I i ⊔ I j = ⊤\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ t) (_ : j ≠ i), I j }\nhμ : (Finset.sum t fun i => ↑(μ i)) = 1\nu v : R\nhv : v ∈ ⨅ (i : ι) (_ : i ∈ t), I i\nhuv : u * 1 + v = 1\nj : ι\nhj : j ∈ t\nhat : ¬j ∈ t\nHb : ∀ (b : ι), b ∈ ↑t → j ≠ b → I j ⊔ I b = ⊤\nhu : u ∈ I j\n⊢ False\n[PROOFSTEP]\nexact hat hj\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Coprime.Ideal", "llama_tokens": 29383, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850278370112, "lm_q2_score": 0.5583269943353745, "lm_q1q2_score": 0.3940588332391471}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\nx✝ : Set.Nonempty ∅\nw✝ : E\nhx : w✝ ∈ ∅\n⊢ ∃ l, ∅ = {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\nx✝ : Set.Nonempty ∅\nw✝ : E\nhx : w✝ ∈ ∅\n⊢ False\n[PROOFSTEP]\nexact hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\nhAB : IsExposed 𝕜 A B\n⊢ B ⊆ A\n[PROOFSTEP]\nrintro x hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx✝ : E\nhAB : IsExposed 𝕜 A B\nx : E\nhx : x ∈ B\n⊢ x ∈ A\n[PROOFSTEP]\nobtain ⟨_, rfl⟩ := hAB ⟨x, hx⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA C : Set E\nX : Finset E\nx✝ x : E\nw✝ : E →L[𝕜] 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑w✝ y ≤ ↑w✝ x}\nhx : x ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑w✝ y ≤ ↑w✝ x}\n⊢ x ∈ A\n[PROOFSTEP]\nexact hx.1\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\nhC : IsExposed 𝕜 A C\nhBA : B ⊆ A\nhCB : C ⊆ B\n⊢ IsExposed 𝕜 B C\n[PROOFSTEP]\nrintro ⟨w, hw⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\nhC : IsExposed 𝕜 A C\nhBA : B ⊆ A\nhCB : C ⊆ B\nw : E\nhw : w ∈ C\n⊢ ∃ l, C = {x | x ∈ B ∧ ∀ (y : E), y ∈ B → ↑l y ≤ ↑l x}\n[PROOFSTEP]\nobtain ⟨l, rfl⟩ := hC ⟨w, hw⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl✝ : E →L[𝕜] 𝕜\nA B : Set E\nX : Finset E\nx : E\nhBA : B ⊆ A\nw : E\nl : E →L[𝕜] 𝕜\nhC : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhCB : {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} ⊆ B\nhw : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n⊢ ∃ l_1, {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} = {x | x ∈ B ∧ ∀ (y : E), y ∈ B → ↑l_1 y ≤ ↑l_1 x}\n[PROOFSTEP]\nexact\n  ⟨l,\n    Subset.antisymm (fun x hx => ⟨hCB hx, fun y hy => hx.2 y (hBA hy)⟩) fun x hx =>\n      ⟨hBA hx.1, fun y hy => (hw.2 y hy).trans (hx.2 w (hCB hw))⟩⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B✝ C : Set E\nX : Finset E\nx : E\nA B : Set E\nhAB : IsExposed 𝕜 A B\nhB : Set.Nonempty B\n⊢ ∃ l a, B = {x | x ∈ A ∧ a ≤ ↑l x}\n[PROOFSTEP]\nobtain ⟨l, rfl⟩ := hAB hB\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl✝ : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx : E\nA : Set E\nl : E →L[𝕜] 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhB : Set.Nonempty {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n⊢ ∃ l_1 a, {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} = {x | x ∈ A ∧ a ≤ ↑l_1 x}\n[PROOFSTEP]\nobtain ⟨w, hw⟩ := hB\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl✝ : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx : E\nA : Set E\nl : E →L[𝕜] 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nw : E\nhw : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n⊢ ∃ l_1 a, {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} = {x | x ∈ A ∧ a ≤ ↑l_1 x}\n[PROOFSTEP]\nexact ⟨l, l w, Subset.antisymm (fun x hx => ⟨hx.1, hx.2 w hw.1⟩) fun x hx => ⟨hx.1, fun y hy => (hw.2 y hy).trans hx.2⟩⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B✝ C : Set E\nX : Finset E\nx : E\ninst✝ : Nontrivial 𝕜\nA B : Set E\nhAB : IsExposed 𝕜 A B\n⊢ ∃ l a, B = {x | x ∈ A ∧ a ≤ ↑l x}\n[PROOFSTEP]\nobtain rfl | hB := B.eq_empty_or_nonempty\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx : E\ninst✝ : Nontrivial 𝕜\nA : Set E\nhAB : IsExposed 𝕜 A ∅\n⊢ ∃ l a, ∅ = {x | x ∈ A ∧ a ≤ ↑l x}\n[PROOFSTEP]\nrefine' ⟨0, 1, _⟩\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx : E\ninst✝ : Nontrivial 𝕜\nA : Set E\nhAB : IsExposed 𝕜 A ∅\n⊢ ∅ = {x | x ∈ A ∧ 1 ≤ ↑0 x}\n[PROOFSTEP]\nrw [eq_comm, eq_empty_iff_forall_not_mem]\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx : E\ninst✝ : Nontrivial 𝕜\nA : Set E\nhAB : IsExposed 𝕜 A ∅\n⊢ ∀ (x : E), ¬x ∈ {x | x ∈ A ∧ 1 ≤ ↑0 x}\n[PROOFSTEP]\nrintro x ⟨-, h⟩\n[GOAL]\ncase inl.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx✝ : E\ninst✝ : Nontrivial 𝕜\nA : Set E\nhAB : IsExposed 𝕜 A ∅\nx : E\nh : 1 ≤ ↑0 x\n⊢ False\n[PROOFSTEP]\nrw [ContinuousLinearMap.zero_apply] at h \n[GOAL]\ncase inl.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx✝ : E\ninst✝ : Nontrivial 𝕜\nA : Set E\nhAB : IsExposed 𝕜 A ∅\nx : E\nh : 1 ≤ 0\n⊢ False\n[PROOFSTEP]\nhave : ¬(1 : 𝕜) ≤ 0 := not_le_of_lt zero_lt_one\n[GOAL]\ncase inl.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx✝ : E\ninst✝ : Nontrivial 𝕜\nA : Set E\nhAB : IsExposed 𝕜 A ∅\nx : E\nh : 1 ≤ 0\nthis : ¬1 ≤ 0\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B✝ C : Set E\nX : Finset E\nx : E\ninst✝ : Nontrivial 𝕜\nA B : Set E\nhAB : IsExposed 𝕜 A B\nhB : Set.Nonempty B\n⊢ ∃ l a, B = {x | x ∈ A ∧ a ≤ ↑l x}\n[PROOFSTEP]\nexact hAB.eq_inter_halfspace' hB\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B✝ C✝ : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nA B C : Set E\nhB : IsExposed 𝕜 A B\nhC : IsExposed 𝕜 A C\n⊢ IsExposed 𝕜 A (B ∩ C)\n[PROOFSTEP]\nrintro ⟨w, hwB, hwC⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B✝ C✝ : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nA B C : Set E\nhB : IsExposed 𝕜 A B\nhC : IsExposed 𝕜 A C\nw : E\nhwB : w ∈ B\nhwC : w ∈ C\n⊢ ∃ l, B ∩ C = {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n[PROOFSTEP]\nobtain ⟨l₁, rfl⟩ := hB ⟨w, hwB⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C✝ : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nA C : Set E\nhC : IsExposed 𝕜 A C\nw : E\nhwC : w ∈ C\nl₁ : E →L[𝕜] 𝕜\nhB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nhwB : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\n⊢ ∃ l, {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x} ∩ C = {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n[PROOFSTEP]\nobtain ⟨l₂, rfl⟩ := hC ⟨w, hwC⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nA : Set E\nw : E\nl₁ : E →L[𝕜] 𝕜\nhB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nhwB : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nl₂ : E →L[𝕜] 𝕜\nhC : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\nhwC : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\n⊢ ∃ l,\n    {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x} ∩ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x} =\n      {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n[PROOFSTEP]\nrefine' ⟨l₁ + l₂, Subset.antisymm _ _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nA : Set E\nw : E\nl₁ : E →L[𝕜] 𝕜\nhB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nhwB : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nl₂ : E →L[𝕜] 𝕜\nhC : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\nhwC : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\n⊢ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x} ∩ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x} ⊆\n    {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑(l₁ + l₂) y ≤ ↑(l₁ + l₂) x}\n[PROOFSTEP]\nrintro x ⟨⟨hxA, hxB⟩, ⟨-, hxC⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx✝ : E\ninst✝ : ContinuousAdd 𝕜\nA : Set E\nw : E\nl₁ : E →L[𝕜] 𝕜\nhB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nhwB : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nl₂ : E →L[𝕜] 𝕜\nhC : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\nhwC : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\nx : E\nhxA : x ∈ A\nhxB : ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x\nhxC : ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x\n⊢ x ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑(l₁ + l₂) y ≤ ↑(l₁ + l₂) x}\n[PROOFSTEP]\nexact ⟨hxA, fun z hz => add_le_add (hxB z hz) (hxC z hz)⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nA : Set E\nw : E\nl₁ : E →L[𝕜] 𝕜\nhB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nhwB : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nl₂ : E →L[𝕜] 𝕜\nhC : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\nhwC : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\n⊢ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑(l₁ + l₂) y ≤ ↑(l₁ + l₂) x} ⊆\n    {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x} ∩ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\n[PROOFSTEP]\nrintro x ⟨hxA, hx⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx✝ : E\ninst✝ : ContinuousAdd 𝕜\nA : Set E\nw : E\nl₁ : E →L[𝕜] 𝕜\nhB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nhwB : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nl₂ : E →L[𝕜] 𝕜\nhC : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\nhwC : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\nx : E\nhxA : x ∈ A\nhx : ∀ (y : E), y ∈ A → ↑(l₁ + l₂) y ≤ ↑(l₁ + l₂) x\n⊢ x ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x} ∩ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\n[PROOFSTEP]\nrefine' ⟨⟨hxA, fun y hy => _⟩, hxA, fun y hy => _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx✝ : E\ninst✝ : ContinuousAdd 𝕜\nA : Set E\nw : E\nl₁ : E →L[𝕜] 𝕜\nhB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nhwB : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nl₂ : E →L[𝕜] 𝕜\nhC : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\nhwC : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\nx : E\nhxA : x ∈ A\nhx : ∀ (y : E), y ∈ A → ↑(l₁ + l₂) y ≤ ↑(l₁ + l₂) x\ny : E\nhy : y ∈ A\n⊢ ↑l₁ y ≤ ↑l₁ x\n[PROOFSTEP]\nexact (add_le_add_iff_right (l₂ x)).1 ((add_le_add (hwB.2 y hy) (hwC.2 x hxA)).trans (hx w hwB.1))\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx✝ : E\ninst✝ : ContinuousAdd 𝕜\nA : Set E\nw : E\nl₁ : E →L[𝕜] 𝕜\nhB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nhwB : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₁ y ≤ ↑l₁ x}\nl₂ : E →L[𝕜] 𝕜\nhC : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\nhwC : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l₂ y ≤ ↑l₂ x}\nx : E\nhxA : x ∈ A\nhx : ∀ (y : E), y ∈ A → ↑(l₁ + l₂) y ≤ ↑(l₁ + l₂) x\ny : E\nhy : y ∈ A\n⊢ ↑l₂ y ≤ ↑l₂ x\n[PROOFSTEP]\nexact (add_le_add_iff_left (l₁ x)).1 (le_trans (add_le_add (hwB.2 x hxA) (hwC.2 y hy)) (hx w hwB.1))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nF : Finset (Set E)\nhF : Finset.Nonempty F\nhAF : ∀ (B : Set E), B ∈ F → IsExposed 𝕜 A B\n⊢ IsExposed 𝕜 A (⋂₀ ↑F)\n[PROOFSTEP]\ninduction F using Finset.induction with\n| empty => exfalso; exact Finset.not_nonempty_empty hF\n| @insert C F _ hF' =>\n  rw [Finset.coe_insert, sInter_insert]\n  obtain rfl | hFnemp := F.eq_empty_or_nonempty\n  · rw [Finset.coe_empty, sInter_empty, inter_univ]\n    exact hAF C (Finset.mem_singleton_self C)\n  · exact (hAF C (Finset.mem_insert_self C F)).inter (hF' hFnemp fun B hB => hAF B (Finset.mem_insert_of_mem hB))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nF : Finset (Set E)\nhF : Finset.Nonempty F\nhAF : ∀ (B : Set E), B ∈ F → IsExposed 𝕜 A B\n⊢ IsExposed 𝕜 A (⋂₀ ↑F)\n[PROOFSTEP]\ninduction F using Finset.induction with\n| empty => exfalso; exact Finset.not_nonempty_empty hF\n| @insert C F _ hF' =>\n  rw [Finset.coe_insert, sInter_insert]\n  obtain rfl | hFnemp := F.eq_empty_or_nonempty\n  · rw [Finset.coe_empty, sInter_empty, inter_univ]\n    exact hAF C (Finset.mem_singleton_self C)\n  · exact (hAF C (Finset.mem_insert_self C F)).inter (hF' hFnemp fun B hB => hAF B (Finset.mem_insert_of_mem hB))\n[GOAL]\ncase empty\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nhF : Finset.Nonempty ∅\nhAF : ∀ (B : Set E), B ∈ ∅ → IsExposed 𝕜 A B\n⊢ IsExposed 𝕜 A (⋂₀ ↑∅)\n[PROOFSTEP]\n\n| empty => exfalso; exact Finset.not_nonempty_empty hF\n[GOAL]\ncase empty\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nhF : Finset.Nonempty ∅\nhAF : ∀ (B : Set E), B ∈ ∅ → IsExposed 𝕜 A B\n⊢ IsExposed 𝕜 A (⋂₀ ↑∅)\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase empty.h\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nhF : Finset.Nonempty ∅\nhAF : ∀ (B : Set E), B ∈ ∅ → IsExposed 𝕜 A B\n⊢ False\n[PROOFSTEP]\nexact Finset.not_nonempty_empty hF\n[GOAL]\ncase insert\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C✝ : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nC : Set E\nF : Finset (Set E)\na✝ : ¬C ∈ F\nhF' : Finset.Nonempty F → (∀ (B : Set E), B ∈ F → IsExposed 𝕜 A B) → IsExposed 𝕜 A (⋂₀ ↑F)\nhF : Finset.Nonempty (insert C F)\nhAF : ∀ (B : Set E), B ∈ insert C F → IsExposed 𝕜 A B\n⊢ IsExposed 𝕜 A (⋂₀ ↑(insert C F))\n[PROOFSTEP]\n\n| @insert C F _ hF' =>\n  rw [Finset.coe_insert, sInter_insert]\n  obtain rfl | hFnemp := F.eq_empty_or_nonempty\n  · rw [Finset.coe_empty, sInter_empty, inter_univ]\n    exact hAF C (Finset.mem_singleton_self C)\n  · exact (hAF C (Finset.mem_insert_self C F)).inter (hF' hFnemp fun B hB => hAF B (Finset.mem_insert_of_mem hB))\n[GOAL]\ncase insert\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C✝ : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nC : Set E\nF : Finset (Set E)\na✝ : ¬C ∈ F\nhF' : Finset.Nonempty F → (∀ (B : Set E), B ∈ F → IsExposed 𝕜 A B) → IsExposed 𝕜 A (⋂₀ ↑F)\nhF : Finset.Nonempty (insert C F)\nhAF : ∀ (B : Set E), B ∈ insert C F → IsExposed 𝕜 A B\n⊢ IsExposed 𝕜 A (⋂₀ ↑(insert C F))\n[PROOFSTEP]\nrw [Finset.coe_insert, sInter_insert]\n[GOAL]\ncase insert\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C✝ : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nC : Set E\nF : Finset (Set E)\na✝ : ¬C ∈ F\nhF' : Finset.Nonempty F → (∀ (B : Set E), B ∈ F → IsExposed 𝕜 A B) → IsExposed 𝕜 A (⋂₀ ↑F)\nhF : Finset.Nonempty (insert C F)\nhAF : ∀ (B : Set E), B ∈ insert C F → IsExposed 𝕜 A B\n⊢ IsExposed 𝕜 A (C ∩ ⋂₀ ↑F)\n[PROOFSTEP]\nobtain rfl | hFnemp := F.eq_empty_or_nonempty\n[GOAL]\ncase insert.inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C✝ : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nC : Set E\na✝ : ¬C ∈ ∅\nhF' : Finset.Nonempty ∅ → (∀ (B : Set E), B ∈ ∅ → IsExposed 𝕜 A B) → IsExposed 𝕜 A (⋂₀ ↑∅)\nhF : Finset.Nonempty (insert C ∅)\nhAF : ∀ (B : Set E), B ∈ insert C ∅ → IsExposed 𝕜 A B\n⊢ IsExposed 𝕜 A (C ∩ ⋂₀ ↑∅)\n[PROOFSTEP]\nrw [Finset.coe_empty, sInter_empty, inter_univ]\n[GOAL]\ncase insert.inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C✝ : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nC : Set E\na✝ : ¬C ∈ ∅\nhF' : Finset.Nonempty ∅ → (∀ (B : Set E), B ∈ ∅ → IsExposed 𝕜 A B) → IsExposed 𝕜 A (⋂₀ ↑∅)\nhF : Finset.Nonempty (insert C ∅)\nhAF : ∀ (B : Set E), B ∈ insert C ∅ → IsExposed 𝕜 A B\n⊢ IsExposed 𝕜 A C\n[PROOFSTEP]\nexact hAF C (Finset.mem_singleton_self C)\n[GOAL]\ncase insert.inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C✝ : Set E\nX : Finset E\nx : E\ninst✝ : ContinuousAdd 𝕜\nC : Set E\nF : Finset (Set E)\na✝ : ¬C ∈ F\nhF' : Finset.Nonempty F → (∀ (B : Set E), B ∈ F → IsExposed 𝕜 A B) → IsExposed 𝕜 A (⋂₀ ↑F)\nhF : Finset.Nonempty (insert C F)\nhAF : ∀ (B : Set E), B ∈ insert C F → IsExposed 𝕜 A B\nhFnemp : Finset.Nonempty F\n⊢ IsExposed 𝕜 A (C ∩ ⋂₀ ↑F)\n[PROOFSTEP]\nexact (hAF C (Finset.mem_insert_self C F)).inter (hF' hFnemp fun B hB => hAF B (Finset.mem_insert_of_mem hB))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\nhC : IsExposed 𝕜 A C\nhCB : C ⊆ B\n⊢ IsExposed 𝕜 (A ∩ B) C\n[PROOFSTEP]\nrintro ⟨w, hw⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\nhC : IsExposed 𝕜 A C\nhCB : C ⊆ B\nw : E\nhw : w ∈ C\n⊢ ∃ l, C = {x | x ∈ A ∩ B ∧ ∀ (y : E), y ∈ A ∩ B → ↑l y ≤ ↑l x}\n[PROOFSTEP]\nobtain ⟨l, rfl⟩ := hC ⟨w, hw⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl✝ : E →L[𝕜] 𝕜\nA B : Set E\nX : Finset E\nx w : E\nl : E →L[𝕜] 𝕜\nhC : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhCB : {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} ⊆ B\nhw : w ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n⊢ ∃ l_1, {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} = {x | x ∈ A ∩ B ∧ ∀ (y : E), y ∈ A ∩ B → ↑l_1 y ≤ ↑l_1 x}\n[PROOFSTEP]\nexact\n  ⟨l,\n    Subset.antisymm (fun x hx => ⟨⟨hx.1, hCB hx⟩, fun y hy => hx.2 y hy.1⟩) fun x ⟨⟨hxC, _⟩, hx⟩ =>\n      ⟨hxC, fun y hy => (hw.2 y hy).trans (hx w ⟨hC.subset hw, hCB hw⟩)⟩⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\nhC : IsExposed 𝕜 B C\nhCA : C ⊆ A\n⊢ IsExposed 𝕜 (A ∩ B) C\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\nhC : IsExposed 𝕜 B C\nhCA : C ⊆ A\n⊢ IsExposed 𝕜 (B ∩ A) C\n[PROOFSTEP]\nexact hC.inter_left hCA\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B✝ C : Set E\nX : Finset E\nx : E\ninst✝ : OrderClosedTopology 𝕜\nA B : Set E\nhAB : IsExposed 𝕜 A B\nhA : IsClosed A\n⊢ IsClosed B\n[PROOFSTEP]\nobtain rfl | hB := B.eq_empty_or_nonempty\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx : E\ninst✝ : OrderClosedTopology 𝕜\nA : Set E\nhA : IsClosed A\nhAB : IsExposed 𝕜 A ∅\n⊢ IsClosed ∅\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA✝ B✝ C : Set E\nX : Finset E\nx : E\ninst✝ : OrderClosedTopology 𝕜\nA B : Set E\nhAB : IsExposed 𝕜 A B\nhA : IsClosed A\nhB : Set.Nonempty B\n⊢ IsClosed B\n[PROOFSTEP]\nobtain ⟨l, a, rfl⟩ := hAB.eq_inter_halfspace' hB\n[GOAL]\ncase inr.intro.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : OrderedRing 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : TopologicalSpace E\ninst✝¹ : Module 𝕜 E\nl✝ : E →L[𝕜] 𝕜\nA✝ B C : Set E\nX : Finset E\nx : E\ninst✝ : OrderClosedTopology 𝕜\nA : Set E\nhA : IsClosed A\nl : E →L[𝕜] 𝕜\na : 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ a ≤ ↑l x}\nhB : Set.Nonempty {x | x ∈ A ∧ a ≤ ↑l x}\n⊢ IsClosed {x | x ∈ A ∧ a ≤ ↑l x}\n[PROOFSTEP]\nexact hA.isClosed_le continuousOn_const l.continuous.continuousOn\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\n⊢ x ∈ exposedPoints 𝕜 A ↔ IsExposed 𝕜 A {x}\n[PROOFSTEP]\nuse fun ⟨hxA, l, hl⟩ _ =>\n  ⟨l, Eq.symm <| eq_singleton_iff_unique_mem.2 ⟨⟨hxA, fun y hy => (hl y hy).1⟩, fun z hz => (hl z hz.1).2 (hz.2 x hxA)⟩⟩\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\n⊢ IsExposed 𝕜 A {x} → x ∈ exposedPoints 𝕜 A\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\nh : IsExposed 𝕜 A {x}\n⊢ x ∈ exposedPoints 𝕜 A\n[PROOFSTEP]\nobtain ⟨l, hl⟩ := h ⟨x, mem_singleton _⟩\n[GOAL]\ncase mpr.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl✝ : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\nh : IsExposed 𝕜 A {x}\nl : E →L[𝕜] 𝕜\nhl : {x} = {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n⊢ x ∈ exposedPoints 𝕜 A\n[PROOFSTEP]\nrw [eq_comm, eq_singleton_iff_unique_mem] at hl \n[GOAL]\ncase mpr.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : OrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nl✝ : E →L[𝕜] 𝕜\nA B C : Set E\nX : Finset E\nx : E\nh : IsExposed 𝕜 A {x}\nl : E →L[𝕜] 𝕜\nhl :\n  x ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} ∧\n    ∀ (x_1 : E), x_1 ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} → x_1 = x\n⊢ x ∈ exposedPoints 𝕜 A\n[PROOFSTEP]\nexact ⟨hl.1.1, l, fun y hy => ⟨hl.1.2 y hy, fun hxy => hl.2 y ⟨hy, fun z hz => (hl.1.2 z hz).trans hxy⟩⟩⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA B C : Set E\nhAB : IsExposed 𝕜 A B\nhA : Convex 𝕜 A\n⊢ Convex 𝕜 B\n[PROOFSTEP]\nobtain rfl | hB := B.eq_empty_or_nonempty\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA C : Set E\nhA : Convex 𝕜 A\nhAB : IsExposed 𝕜 A ∅\n⊢ Convex 𝕜 ∅\n[PROOFSTEP]\nexact convex_empty\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA B C : Set E\nhAB : IsExposed 𝕜 A B\nhA : Convex 𝕜 A\nhB : Set.Nonempty B\n⊢ Convex 𝕜 B\n[PROOFSTEP]\nobtain ⟨l, rfl⟩ := hAB hB\n[GOAL]\ncase inr.intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA C : Set E\nhA : Convex 𝕜 A\nl : E →L[𝕜] 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhB : Set.Nonempty {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n⊢ Convex 𝕜 {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n[PROOFSTEP]\nexact fun x₁ hx₁ x₂ hx₂ a b ha hb hab =>\n  ⟨hA hx₁.1 hx₂.1 ha hb hab, fun y hy =>\n    ((l.toLinearMap.concaveOn convex_univ).convex_ge _ ⟨mem_univ _, hx₁.2 y hy⟩ ⟨mem_univ _, hx₂.2 y hy⟩ ha hb hab).2⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA B C : Set E\nhAB : IsExposed 𝕜 A B\n⊢ IsExtreme 𝕜 A B\n[PROOFSTEP]\nrefine' ⟨hAB.subset, fun x₁ hx₁A x₂ hx₂A x hxB hx => _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA B C : Set E\nhAB : IsExposed 𝕜 A B\nx₁ : E\nhx₁A : x₁ ∈ A\nx₂ : E\nhx₂A : x₂ ∈ A\nx : E\nhxB : x ∈ B\nhx : x ∈ openSegment 𝕜 x₁ x₂\n⊢ x₁ ∈ B ∧ x₂ ∈ B\n[PROOFSTEP]\nobtain ⟨l, rfl⟩ := hAB ⟨x, hxB⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA C : Set E\nx₁ : E\nhx₁A : x₁ ∈ A\nx₂ : E\nhx₂A : x₂ ∈ A\nx : E\nhx : x ∈ openSegment 𝕜 x₁ x₂\nl : E →L[𝕜] 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhxB : x ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n⊢ x₁ ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} ∧ x₂ ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n[PROOFSTEP]\nhave hl : ConvexOn 𝕜 univ l := l.toLinearMap.convexOn convex_univ\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA C : Set E\nx₁ : E\nhx₁A : x₁ ∈ A\nx₂ : E\nhx₂A : x₂ ∈ A\nx : E\nhx : x ∈ openSegment 𝕜 x₁ x₂\nl : E →L[𝕜] 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhxB : x ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhl : ConvexOn 𝕜 univ ↑l\n⊢ x₁ ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} ∧ x₂ ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n[PROOFSTEP]\nhave hlx₁ := hxB.2 x₁ hx₁A\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA C : Set E\nx₁ : E\nhx₁A : x₁ ∈ A\nx₂ : E\nhx₂A : x₂ ∈ A\nx : E\nhx : x ∈ openSegment 𝕜 x₁ x₂\nl : E →L[𝕜] 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhxB : x ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhl : ConvexOn 𝕜 univ ↑l\nhlx₁ : ↑l x₁ ≤ ↑l x\n⊢ x₁ ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} ∧ x₂ ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n[PROOFSTEP]\nhave hlx₂ := hxB.2 x₂ hx₂A\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA C : Set E\nx₁ : E\nhx₁A : x₁ ∈ A\nx₂ : E\nhx₂A : x₂ ∈ A\nx : E\nhx : x ∈ openSegment 𝕜 x₁ x₂\nl : E →L[𝕜] 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhxB : x ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhl : ConvexOn 𝕜 univ ↑l\nhlx₁ : ↑l x₁ ≤ ↑l x\nhlx₂ : ↑l x₂ ≤ ↑l x\n⊢ x₁ ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x} ∧ x₂ ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\n[PROOFSTEP]\nrefine' ⟨⟨hx₁A, fun y hy => _⟩, ⟨hx₂A, fun y hy => _⟩⟩\n[GOAL]\ncase intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA C : Set E\nx₁ : E\nhx₁A : x₁ ∈ A\nx₂ : E\nhx₂A : x₂ ∈ A\nx : E\nhx : x ∈ openSegment 𝕜 x₁ x₂\nl : E →L[𝕜] 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhxB : x ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhl : ConvexOn 𝕜 univ ↑l\nhlx₁ : ↑l x₁ ≤ ↑l x\nhlx₂ : ↑l x₂ ≤ ↑l x\ny : E\nhy : y ∈ A\n⊢ ↑l y ≤ ↑l x₁\n[PROOFSTEP]\nrw [hlx₁.antisymm (hl.le_left_of_right_le (mem_univ _) (mem_univ _) hx hlx₂)]\n[GOAL]\ncase intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA C : Set E\nx₁ : E\nhx₁A : x₁ ∈ A\nx₂ : E\nhx₂A : x₂ ∈ A\nx : E\nhx : x ∈ openSegment 𝕜 x₁ x₂\nl : E →L[𝕜] 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhxB : x ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhl : ConvexOn 𝕜 univ ↑l\nhlx₁ : ↑l x₁ ≤ ↑l x\nhlx₂ : ↑l x₂ ≤ ↑l x\ny : E\nhy : y ∈ A\n⊢ ↑l y ≤ ↑l x\n[PROOFSTEP]\nexact hxB.2 y hy\n[GOAL]\ncase intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA C : Set E\nx₁ : E\nhx₁A : x₁ ∈ A\nx₂ : E\nhx₂A : x₂ ∈ A\nx : E\nhx : x ∈ openSegment 𝕜 x₁ x₂\nl : E →L[𝕜] 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhxB : x ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhl : ConvexOn 𝕜 univ ↑l\nhlx₁ : ↑l x₁ ≤ ↑l x\nhlx₂ : ↑l x₂ ≤ ↑l x\ny : E\nhy : y ∈ A\n⊢ ↑l y ≤ ↑l x₂\n[PROOFSTEP]\nrw [hlx₂.antisymm (hl.le_right_of_left_le (mem_univ _) (mem_univ _) hx hlx₁)]\n[GOAL]\ncase intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommMonoid E\ninst✝¹ : TopologicalSpace E\ninst✝ : Module 𝕜 E\nA C : Set E\nx₁ : E\nhx₁A : x₁ ∈ A\nx₂ : E\nhx₂A : x₂ ∈ A\nx : E\nhx : x ∈ openSegment 𝕜 x₁ x₂\nl : E →L[𝕜] 𝕜\nhAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhxB : x ∈ {x | x ∈ A ∧ ∀ (y : E), y ∈ A → ↑l y ≤ ↑l x}\nhl : ConvexOn 𝕜 univ ↑l\nhlx₁ : ↑l x₁ ≤ ↑l x\nhlx₂ : ↑l x₂ ≤ ↑l x\ny : E\nhy : y ∈ A\n⊢ ↑l y ≤ ↑l x\n[PROOFSTEP]\nexact hxB.2 y hy\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Exposed", "llama_tokens": 18358, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7310585786300049, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.3940283072213606}}
{"text": "[GOAL]\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\n⊢ dualMap id = id\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nx✝¹ : Dual R M₁\nx✝ : M₁\n⊢ ↑(↑(dualMap id) x✝¹) x✝ = ↑(↑id x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nhf : Function.Surjective ↑f\n⊢ Function.Injective ↑(dualMap f)\n[PROOFSTEP]\nintro φ ψ h\n[GOAL]\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nhf : Function.Surjective ↑f\nφ ψ : Dual R M₂\nh : ↑(dualMap f) φ = ↑(dualMap f) ψ\n⊢ φ = ψ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nhf : Function.Surjective ↑f\nφ ψ : Dual R M₂\nh : ↑(dualMap f) φ = ↑(dualMap f) ψ\nx : M₂\n⊢ ↑φ x = ↑ψ x\n[PROOFSTEP]\nobtain ⟨y, rfl⟩ := hf x\n[GOAL]\ncase h.intro\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nhf : Function.Surjective ↑f\nφ ψ : Dual R M₂\nh : ↑(dualMap f) φ = ↑(dualMap f) ψ\ny : M₁\n⊢ ↑φ (↑f y) = ↑ψ (↑f y)\n[PROOFSTEP]\nexact congr_arg (fun g : Module.Dual R M₁ => g y) h\n[GOAL]\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ ≃ₗ[R] M₂\nsrc✝ : Dual R M₂ →ₗ[R] Dual R M₁ := LinearMap.dualMap ↑f\n⊢ Function.LeftInverse ↑(LinearMap.dualMap ↑(symm f))\n    { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : Dual R M₂),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom.toFun\n[PROOFSTEP]\nintro φ\n[GOAL]\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ ≃ₗ[R] M₂\nsrc✝ : Dual R M₂ →ₗ[R] Dual R M₁ := LinearMap.dualMap ↑f\nφ : Dual R M₂\n⊢ ↑(LinearMap.dualMap ↑(symm f))\n      (AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : Dual R M₂),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        φ) =\n    φ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ ≃ₗ[R] M₂\nsrc✝ : Dual R M₂ →ₗ[R] Dual R M₁ := LinearMap.dualMap ↑f\nφ : Dual R M₂\nx : M₂\n⊢ ↑(↑(LinearMap.dualMap ↑(symm f))\n          (AddHom.toFun\n            { toAddHom := src✝.toAddHom,\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (x : Dual R M₂),\n                      AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n            φ))\n      x =\n    ↑φ x\n[PROOFSTEP]\nsimp only [LinearMap.dualMap_apply, LinearEquiv.coe_toLinearMap, LinearMap.toFun_eq_coe, LinearEquiv.apply_symm_apply]\n[GOAL]\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ ≃ₗ[R] M₂\nsrc✝ : Dual R M₂ →ₗ[R] Dual R M₁ := LinearMap.dualMap ↑f\n⊢ Function.RightInverse ↑(LinearMap.dualMap ↑(symm f))\n    { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : Dual R M₂),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom.toFun\n[PROOFSTEP]\nintro φ\n[GOAL]\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ ≃ₗ[R] M₂\nsrc✝ : Dual R M₂ →ₗ[R] Dual R M₁ := LinearMap.dualMap ↑f\nφ : Dual R M₁\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : Dual R M₂),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      (↑(LinearMap.dualMap ↑(symm f)) φ) =\n    φ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ ≃ₗ[R] M₂\nsrc✝ : Dual R M₂ →ₗ[R] Dual R M₁ := LinearMap.dualMap ↑f\nφ : Dual R M₁\nx : M₁\n⊢ ↑(AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : Dual R M₂),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          (↑(LinearMap.dualMap ↑(symm f)) φ))\n      x =\n    ↑φ x\n[PROOFSTEP]\nsimp only [LinearMap.dualMap_apply, LinearEquiv.coe_toLinearMap, LinearMap.toFun_eq_coe, LinearEquiv.symm_apply_apply]\n[GOAL]\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\n⊢ dualMap (refl R M₁) = refl R (Dual R M₁)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nx✝¹ : Dual R M₁\nx✝ : M₁\n⊢ ↑(↑(dualMap (refl R M₁)) x✝¹) x✝ = ↑(↑(refl R (Dual R M₁)) x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\ni j : ι\n⊢ ↑(↑(toDual b) (↑b i)) (↑b j) = if i = j then 1 else 0\n[PROOFSTEP]\nerw [constr_basis b, constr_basis b]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\ni j : ι\n⊢ (if j = i then 1 else 0) = if i = j then 1 else 0\n[PROOFSTEP]\nsimp only [eq_comm]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nf : ι →₀ R\ni : ι\n⊢ ↑(↑(toDual b) (↑(Finsupp.total ι M R ↑b) f)) (↑b i) = ↑f i\n[PROOFSTEP]\nrw [Finsupp.total_apply, Finsupp.sum, LinearMap.map_sum, LinearMap.sum_apply]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nf : ι →₀ R\ni : ι\n⊢ ∑ d in f.support, ↑(↑(toDual b) (↑f d • ↑b d)) (↑b i) = ↑f i\n[PROOFSTEP]\nsimp_rw [LinearMap.map_smul, LinearMap.smul_apply, toDual_apply, smul_eq_mul, mul_boole, Finset.sum_ite_eq']\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nf : ι →₀ R\ni : ι\n⊢ (if i ∈ f.support then ↑f i else 0) = ↑f i\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nf : ι →₀ R\ni : ι\nh : i ∈ f.support\n⊢ ↑f i = ↑f i\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nf : ι →₀ R\ni : ι\nh : ¬i ∈ f.support\n⊢ 0 = ↑f i\n[PROOFSTEP]\nrw [Finsupp.not_mem_support_iff.mp h]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nf : ι →₀ R\ni : ι\n⊢ ↑(↑(toDual b) (↑b i)) (↑(Finsupp.total ι M R ↑b) f) = ↑f i\n[PROOFSTEP]\nrw [Finsupp.total_apply, Finsupp.sum, LinearMap.map_sum]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nf : ι →₀ R\ni : ι\n⊢ ∑ i_1 in f.support, ↑(↑(toDual b) (↑b i)) (↑f i_1 • ↑b i_1) = ↑f i\n[PROOFSTEP]\nsimp_rw [LinearMap.map_smul, toDual_apply, smul_eq_mul, mul_boole, Finset.sum_ite_eq]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nf : ι →₀ R\ni : ι\n⊢ (if i ∈ f.support then ↑f i else 0) = ↑f i\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nf : ι →₀ R\ni : ι\nh : i ∈ f.support\n⊢ ↑f i = ↑f i\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nf : ι →₀ R\ni : ι\nh : ¬i ∈ f.support\n⊢ 0 = ↑f i\n[PROOFSTEP]\nrw [Finsupp.not_mem_support_iff.mp h]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nm : M\ni : ι\n⊢ ↑(↑(toDual b) m) (↑b i) = ↑(↑b.repr m) i\n[PROOFSTEP]\nrw [← b.toDual_total_left, b.total_repr]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\ni : ι\nm : M\n⊢ ↑(↑(toDual b) (↑b i)) m = ↑(↑b.repr m) i\n[PROOFSTEP]\nrw [← b.toDual_total_right, b.total_repr]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\ni : ι\n⊢ ↑(toDual b) (↑b i) = coord b i\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\ni : ι\nx✝ : M\n⊢ ↑(↑(toDual b) (↑b i)) x✝ = ↑(coord b i) x✝\n[PROOFSTEP]\napply toDual_apply_right\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : Fintype ι\nm : M\ni : ι\n⊢ ↑(↑(toDual b) m) (↑b i) = ↑(equivFun b) m i\n[PROOFSTEP]\nrw [b.equivFun_apply, toDual_eq_repr]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nm : M\na : ↑(toDual b) m = 0\n⊢ m = 0\n[PROOFSTEP]\nrw [← mem_bot R, ← b.repr.ker, mem_ker, LinearEquiv.coe_coe]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nm : M\na : ↑(toDual b) m = 0\n⊢ ↑b.repr m = 0\n[PROOFSTEP]\napply Finsupp.ext\n[GOAL]\ncase h\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb : Basis ι R M\nm : M\na : ↑(toDual b) m = 0\n⊢ ∀ (a : ι), ↑(↑b.repr m) a = ↑0 a\n[PROOFSTEP]\nintro b\n[GOAL]\ncase h\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb✝ : Basis ι R M\nm : M\na : ↑(toDual b✝) m = 0\nb : ι\n⊢ ↑(↑b✝.repr m) b = ↑0 b\n[PROOFSTEP]\nrw [← toDual_eq_repr, a]\n[GOAL]\ncase h\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι\nb✝ : Basis ι R M\nm : M\na : ↑(toDual b✝) m = 0\nb : ι\n⊢ ↑0 (↑b✝ b) = ↑0 b\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\n⊢ range (toDual b) = ⊤\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\nval✝ : Fintype ι\n⊢ range (toDual b) = ⊤\n[PROOFSTEP]\nrefine' eq_top_iff'.2 fun f => _\n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\nval✝ : Fintype ι\nf : Dual R M\n⊢ f ∈ range (toDual b)\n[PROOFSTEP]\nrw [LinearMap.mem_range]\n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\nval✝ : Fintype ι\nf : Dual R M\n⊢ ∃ y, ↑(toDual b) y = f\n[PROOFSTEP]\nlet lin_comb : ι →₀ R := Finsupp.equivFunOnFinite.symm fun i => f.toFun (b i)\n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\nval✝ : Fintype ι\nf : Dual R M\nlin_comb : ι →₀ R := ↑Finsupp.equivFunOnFinite.symm fun i => AddHom.toFun f.toAddHom (↑b i)\n⊢ ∃ y, ↑(toDual b) y = f\n[PROOFSTEP]\nrefine' ⟨Finsupp.total ι M R b lin_comb, b.ext fun i => _⟩\n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\nval✝ : Fintype ι\nf : Dual R M\nlin_comb : ι →₀ R := ↑Finsupp.equivFunOnFinite.symm fun i => AddHom.toFun f.toAddHom (↑b i)\ni : ι\n⊢ ↑(↑(toDual b) (↑(Finsupp.total ι M R ↑b) lin_comb)) (↑b i) = ↑f (↑b i)\n[PROOFSTEP]\nrw [b.toDual_eq_repr _ i, repr_total b]\n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\nval✝ : Fintype ι\nf : Dual R M\nlin_comb : ι →₀ R := ↑Finsupp.equivFunOnFinite.symm fun i => AddHom.toFun f.toAddHom (↑b i)\ni : ι\n⊢ ↑lin_comb i = ↑f (↑b i)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : Fintype ι\nb : Basis ι R M\nf : Dual R M\n⊢ ∑ x : ι, ↑f (↑b x) • coord b x = f\n[PROOFSTEP]\next m\n[GOAL]\ncase h\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : Fintype ι\nb : Basis ι R M\nf : Dual R M\nm : M\n⊢ ↑(∑ x : ι, ↑f (↑b x) • coord b x) m = ↑f m\n[PROOFSTEP]\nsimp_rw [LinearMap.sum_apply, LinearMap.smul_apply, smul_eq_mul, mul_comm (f _), ← smul_eq_mul, ← f.map_smul, ←\n  f.map_sum, Basis.coord_apply, Basis.sum_repr]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\ni j : ι\n⊢ ↑(↑(dualBasis b) i) (↑b j) = if j = i then 1 else 0\n[PROOFSTEP]\nconvert b.toDual_apply i j using 2\n[GOAL]\ncase h.e'_3.h₁.a\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\ni j : ι\n⊢ j = i ↔ i = j\n[PROOFSTEP]\nrw [@eq_comm _ j i]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\nf : ι →₀ R\ni : ι\n⊢ ↑(↑(Finsupp.total ι (Dual R M) R ↑(dualBasis b)) f) (↑b i) = ↑f i\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\nf : ι →₀ R\ni : ι\nval✝ : Fintype ι\n⊢ ↑(↑(Finsupp.total ι (Dual R M) R ↑(dualBasis b)) f) (↑b i) = ↑f i\n[PROOFSTEP]\nrw [Finsupp.total_apply, Finsupp.sum_fintype, LinearMap.sum_apply]\n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\nf : ι →₀ R\ni : ι\nval✝ : Fintype ι\n⊢ ∑ d : ι, ↑(↑f d • ↑(dualBasis b) d) (↑b i) = ↑f i\n[PROOFSTEP]\nsimp_rw [LinearMap.smul_apply, smul_eq_mul, dualBasis_apply_self, mul_boole, Finset.sum_ite_eq,\n  if_pos (Finset.mem_univ i)]\n[GOAL]\ncase intro.h\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\nf : ι →₀ R\ni : ι\nval✝ : Fintype ι\n⊢ ∀ (i : ι), 0 • ↑(dualBasis b) i = 0\n[PROOFSTEP]\nintro\n[GOAL]\ncase intro.h\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\nf : ι →₀ R\ni : ι\nval✝ : Fintype ι\ni✝ : ι\n⊢ 0 • ↑(dualBasis b) i✝ = 0\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\nl : Dual R M\ni : ι\n⊢ ↑(↑(dualBasis b).repr l) i = ↑l (↑b i)\n[PROOFSTEP]\nrw [← total_dualBasis b, Basis.total_repr b.dualBasis l]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\n⊢ ↑(dualBasis b) = coord b\n[PROOFSTEP]\next i x\n[GOAL]\ncase h.h\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\ni : ι\nx : M\n⊢ ↑(↑(dualBasis b) i) x = ↑(coord b i) x\n[PROOFSTEP]\napply dualBasis_apply\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\n⊢ LinearMap.comp (toDual (dualBasis b)) (toDual b) = Dual.eval R M\n[PROOFSTEP]\nrefine' b.ext fun i => b.dualBasis.ext fun j => _\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : _root_.Finite ι\ni j : ι\n⊢ ↑(↑(LinearMap.comp (toDual (dualBasis b)) (toDual b)) (↑b i)) (↑(dualBasis b) j) =\n    ↑(↑(Dual.eval R M) (↑b i)) (↑(dualBasis b) j)\n[PROOFSTEP]\nrw [LinearMap.comp_apply, toDual_apply_left, coe_toDual_self, ← coe_dualBasis, Dual.eval_apply, Basis.repr_self,\n  Finsupp.single_apply, dualBasis_apply_self]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι\nb : Basis ι R M\ninst✝ : Fintype ι\nl : Dual R M\ni : ι\n⊢ ↑(equivFun (dualBasis b)) l i = ↑l (↑b i)\n[PROOFSTEP]\nrw [Basis.equivFun_apply, dualBasis_repr]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι✝ : Type w\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι✝\nb✝ : Basis ι✝ R M\nι : Type u_1\nb : Basis ι R M\n⊢ ker (Dual.eval R M) = ⊥\n[PROOFSTEP]\nrw [ker_eq_bot']\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι✝ : Type w\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι✝\nb✝ : Basis ι✝ R M\nι : Type u_1\nb : Basis ι R M\n⊢ ∀ (m : M), ↑(Dual.eval R M) m = 0 → m = 0\n[PROOFSTEP]\nintro m hm\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι✝ : Type w\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι✝\nb✝ : Basis ι✝ R M\nι : Type u_1\nb : Basis ι R M\nm : M\nhm : ↑(Dual.eval R M) m = 0\n⊢ m = 0\n[PROOFSTEP]\nsimp_rw [LinearMap.ext_iff, Dual.eval_apply, zero_apply] at hm \n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι✝ : Type w\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ninst✝ : DecidableEq ι✝\nb✝ : Basis ι✝ R M\nι : Type u_1\nb : Basis ι R M\nm : M\nhm : ∀ (x : Dual R M), ↑x m = 0\n⊢ m = 0\n[PROOFSTEP]\nexact (Basis.forall_coord_eq_zero_iff _).mp fun i => hm (b.coord i)\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι✝ : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι✝\nb✝ : Basis ι✝ R M\nι : Type u_1\ninst✝ : _root_.Finite ι\nb : Basis ι R M\n⊢ range (Dual.eval R M) = ⊤\n[PROOFSTEP]\nclassical\ncases nonempty_fintype ι\nrw [← b.toDual_toDual, range_comp, b.toDual_range, Submodule.map_top, toDual_range _]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι✝ : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι✝\nb✝ : Basis ι✝ R M\nι : Type u_1\ninst✝ : _root_.Finite ι\nb : Basis ι R M\n⊢ range (Dual.eval R M) = ⊤\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι✝ : Type w\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : DecidableEq ι✝\nb✝ : Basis ι✝ R M\nι : Type u_1\ninst✝ : _root_.Finite ι\nb : Basis ι R M\nval✝ : Fintype ι\n⊢ range (Dual.eval R M) = ⊤\n[PROOFSTEP]\nrw [← b.toDual_toDual, range_comp, b.toDual_range, Submodule.map_top, toDual_range _]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ninst✝ : _root_.Finite ι\nb : Basis ι R M\nf : ι →₀ R\ni : ι\n⊢ ↑(↑(Finsupp.total ι (Dual R M) R (coord b)) f) (↑b i) = ↑f i\n[PROOFSTEP]\nhaveI := Classical.decEq ι\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ninst✝ : _root_.Finite ι\nb : Basis ι R M\nf : ι →₀ R\ni : ι\nthis : DecidableEq ι\n⊢ ↑(↑(Finsupp.total ι (Dual R M) R (coord b)) f) (↑b i) = ↑f i\n[PROOFSTEP]\nrw [← coe_dualBasis, total_dualBasis]\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : _root_.Finite ι\nb : Basis ι K V\n⊢ lift (Module.rank K V) = Module.rank K (Dual K V)\n[PROOFSTEP]\nclassical\ncases nonempty_fintype ι\nhave := LinearEquiv.lift_rank_eq b.toDualEquiv\nrw [Cardinal.lift_umax.{u₂, u₁}] at this \nrw [this, ← Cardinal.lift_umax]\napply Cardinal.lift_id\n[GOAL]\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : _root_.Finite ι\nb : Basis ι K V\n⊢ lift (Module.rank K V) = Module.rank K (Dual K V)\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : _root_.Finite ι\nb : Basis ι K V\nval✝ : Fintype ι\n⊢ lift (Module.rank K V) = Module.rank K (Dual K V)\n[PROOFSTEP]\nhave := LinearEquiv.lift_rank_eq b.toDualEquiv\n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : _root_.Finite ι\nb : Basis ι K V\nval✝ : Fintype ι\nthis : lift (Module.rank K V) = lift (Module.rank K (Dual K V))\n⊢ lift (Module.rank K V) = Module.rank K (Dual K V)\n[PROOFSTEP]\nrw [Cardinal.lift_umax.{u₂, u₁}] at this \n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : _root_.Finite ι\nb : Basis ι K V\nval✝ : Fintype ι\nthis : lift (Module.rank K V) = lift (Module.rank K (Dual K V))\n⊢ lift (Module.rank K V) = Module.rank K (Dual K V)\n[PROOFSTEP]\nrw [this, ← Cardinal.lift_umax]\n[GOAL]\ncase intro\nR : Type u\nM : Type v\nK : Type u₁\nV : Type u₂\nι : Type w\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : _root_.Finite ι\nb : Basis ι K V\nval✝ : Fintype ι\nthis : lift (Module.rank K V) = lift (Module.rank K (Dual K V))\n⊢ lift (Module.rank K (Dual K V)) = Module.rank K (Dual K V)\n[PROOFSTEP]\napply Cardinal.lift_id\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\n⊢ ker (eval K V) = ⊥\n[PROOFSTEP]\nclassical exact (Module.Free.chooseBasis K V).eval_ker\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\n⊢ ker (eval K V) = ⊥\n[PROOFSTEP]\nexact (Module.Free.chooseBasis K V).eval_ker\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\n⊢ Function.Injective (Submodule.map (eval K V))\n[PROOFSTEP]\napply Submodule.map_injective_of_injective\n[GOAL]\ncase hf\nK : Type u₁\nV : Type u₂\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\n⊢ Function.Injective ↑(eval K V)\n[PROOFSTEP]\nrw [← LinearMap.ker_eq_bot]\n[GOAL]\ncase hf\nK : Type u₁\nV : Type u₂\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\n⊢ ker (eval K V) = ⊥\n[PROOFSTEP]\napply eval_ker K V\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\n⊢ Function.Surjective (Submodule.comap (eval K V))\n[PROOFSTEP]\napply Submodule.comap_surjective_of_injective\n[GOAL]\ncase hf\nK : Type u₁\nV : Type u₂\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\n⊢ Function.Injective ↑(eval K V)\n[PROOFSTEP]\nrw [← LinearMap.ker_eq_bot]\n[GOAL]\ncase hf\nK : Type u₁\nV : Type u₂\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\n⊢ ker (eval K V) = ⊥\n[PROOFSTEP]\napply eval_ker K V\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\nv : V\n⊢ ↑(eval K V) v = 0 ↔ v = 0\n[PROOFSTEP]\nsimpa only using SetLike.ext_iff.mp (eval_ker K V) v\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\nv : V\n⊢ (∀ (φ : Dual K V), ↑φ v = 0) ↔ v = 0\n[PROOFSTEP]\nrw [← eval_apply_eq_zero_iff K v, LinearMap.ext_iff]\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝³ : CommRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\nv : V\n⊢ (∀ (φ : Dual K V), ↑φ v = 0) ↔ ∀ (x : Dual K V), ↑(↑(eval K V) v) x = ↑0 x\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝⁹ : CommRing K\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module K V\ninst✝⁶ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : AddCommGroup N\ninst✝² : Module R M\ninst✝¹ : Module R N\ninst✝ : IsReflexive R M\nf : Dual R M\ng : Dual R (Dual R M)\n⊢ ↑f (↑(LinearEquiv.symm (evalEquiv R M)) g) = ↑g f\n[PROOFSTEP]\nset m := (evalEquiv R M).symm g\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝⁹ : CommRing K\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module K V\ninst✝⁶ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : AddCommGroup N\ninst✝² : Module R M\ninst✝¹ : Module R N\ninst✝ : IsReflexive R M\nf : Dual R M\ng : Dual R (Dual R M)\nm : M := ↑(LinearEquiv.symm (evalEquiv R M)) g\n⊢ ↑f m = ↑g f\n[PROOFSTEP]\nrw [← (evalEquiv R M).apply_symm_apply g, evalEquiv_apply, Dual.eval_apply]\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝⁹ : CommRing K\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module K V\ninst✝⁶ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : AddCommGroup N\ninst✝² : Module R M\ninst✝¹ : Module R N\ninst✝ : IsReflexive R M\n⊢ ↑(LinearEquiv.dualMap (LinearEquiv.symm (evalEquiv R M))) = Dual.eval R (Dual R M)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nK : Type u₁\nV : Type u₂\ninst✝⁹ : CommRing K\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module K V\ninst✝⁶ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : AddCommGroup N\ninst✝² : Module R M\ninst✝¹ : Module R N\ninst✝ : IsReflexive R M\nx✝¹ : Dual R M\nx✝ : Dual R (Dual R M)\n⊢ ↑(↑↑(LinearEquiv.dualMap (LinearEquiv.symm (evalEquiv R M))) x✝¹) x✝ = ↑(↑(Dual.eval R (Dual R M)) x✝¹) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝⁹ : CommRing K\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module K V\ninst✝⁶ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : AddCommGroup N\ninst✝² : Module R M\ninst✝¹ : Module R N\ninst✝ : IsReflexive R M\n⊢ Bijective ↑(eval R (Dual R M))\n[PROOFSTEP]\nsimpa only [← symm_dualMap_evalEquiv] using (evalEquiv R M).dualMap.symm.bijective\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ : IsReflexive R M\ninst✝ : IsReflexive R N\n⊢ Bijective ↑(Dual.eval R (M × N))\n[PROOFSTEP]\nlet e : Dual R (Dual R (M × N)) ≃ₗ[R] Dual R (Dual R M) × Dual R (Dual R N) :=\n  (dualProdDualEquivDual R M N).dualMap.trans (dualProdDualEquivDual R (Dual R M) (Dual R N)).symm\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ : IsReflexive R M\ninst✝ : IsReflexive R N\ne : Dual R (Dual R (M × N)) ≃ₗ[R] Dual R (Dual R M) × Dual R (Dual R N) :=\n  LinearEquiv.trans (LinearEquiv.dualMap (dualProdDualEquivDual R M N))\n    (LinearEquiv.symm (dualProdDualEquivDual R (Dual R M) (Dual R N)))\n⊢ Bijective ↑(Dual.eval R (M × N))\n[PROOFSTEP]\nhave : Dual.eval R (M × N) = e.symm.comp ((Dual.eval R M).prodMap (Dual.eval R N)) := by ext m f <;> simp\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ : IsReflexive R M\ninst✝ : IsReflexive R N\ne : Dual R (Dual R (M × N)) ≃ₗ[R] Dual R (Dual R M) × Dual R (Dual R N) :=\n  LinearEquiv.trans (LinearEquiv.dualMap (dualProdDualEquivDual R M N))\n    (LinearEquiv.symm (dualProdDualEquivDual R (Dual R M) (Dual R N)))\n⊢ Dual.eval R (M × N) = LinearMap.comp (↑(LinearEquiv.symm e)) (prodMap (Dual.eval R M) (Dual.eval R N))\n[PROOFSTEP]\next m f\n[GOAL]\ncase hl.h.h\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ : IsReflexive R M\ninst✝ : IsReflexive R N\ne : Dual R (Dual R (M × N)) ≃ₗ[R] Dual R (Dual R M) × Dual R (Dual R N) :=\n  LinearEquiv.trans (LinearEquiv.dualMap (dualProdDualEquivDual R M N))\n    (LinearEquiv.symm (dualProdDualEquivDual R (Dual R M) (Dual R N)))\nm : M\nf : Dual R (M × N)\n⊢ ↑(↑(LinearMap.comp (Dual.eval R (M × N)) (inl R M N)) m) f =\n    ↑(↑(LinearMap.comp (LinearMap.comp (↑(LinearEquiv.symm e)) (prodMap (Dual.eval R M) (Dual.eval R N))) (inl R M N))\n          m)\n      f\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hr.h.h\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ : IsReflexive R M\ninst✝ : IsReflexive R N\ne : Dual R (Dual R (M × N)) ≃ₗ[R] Dual R (Dual R M) × Dual R (Dual R N) :=\n  LinearEquiv.trans (LinearEquiv.dualMap (dualProdDualEquivDual R M N))\n    (LinearEquiv.symm (dualProdDualEquivDual R (Dual R M) (Dual R N)))\nm : N\nf : Dual R (M × N)\n⊢ ↑(↑(LinearMap.comp (Dual.eval R (M × N)) (inr R M N)) m) f =\n    ↑(↑(LinearMap.comp (LinearMap.comp (↑(LinearEquiv.symm e)) (prodMap (Dual.eval R M) (Dual.eval R N))) (inr R M N))\n          m)\n      f\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ : IsReflexive R M\ninst✝ : IsReflexive R N\ne : Dual R (Dual R (M × N)) ≃ₗ[R] Dual R (Dual R M) × Dual R (Dual R N) :=\n  LinearEquiv.trans (LinearEquiv.dualMap (dualProdDualEquivDual R M N))\n    (LinearEquiv.symm (dualProdDualEquivDual R (Dual R M) (Dual R N)))\nthis : Dual.eval R (M × N) = LinearMap.comp (↑(LinearEquiv.symm e)) (prodMap (Dual.eval R M) (Dual.eval R N))\n⊢ Bijective ↑(Dual.eval R (M × N))\n[PROOFSTEP]\nsimp only [this, LinearEquiv.trans_symm, LinearEquiv.symm_symm, LinearEquiv.dualMap_symm, coe_comp, LinearEquiv.coe_coe,\n  EquivLike.comp_bijective]\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ : IsReflexive R M\ninst✝ : IsReflexive R N\ne : Dual R (Dual R (M × N)) ≃ₗ[R] Dual R (Dual R M) × Dual R (Dual R N) :=\n  LinearEquiv.trans (LinearEquiv.dualMap (dualProdDualEquivDual R M N))\n    (LinearEquiv.symm (dualProdDualEquivDual R (Dual R M) (Dual R N)))\nthis : Dual.eval R (M × N) = LinearMap.comp (↑(LinearEquiv.symm e)) (prodMap (Dual.eval R M) (Dual.eval R N))\n⊢ Bijective ↑(prodMap (Dual.eval R M) (Dual.eval R N))\n[PROOFSTEP]\nexact Bijective.Prod_map (bijective_dual_eval R M) (bijective_dual_eval R N)\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ inst✝ : IsReflexive R M\ne : M ≃ₗ[R] N\n⊢ Bijective ↑(Dual.eval R N)\n[PROOFSTEP]\nlet ed : Dual R (Dual R N) ≃ₗ[R] Dual R (Dual R M) := e.symm.dualMap.dualMap\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ inst✝ : IsReflexive R M\ne : M ≃ₗ[R] N\ned : Dual R (Dual R N) ≃ₗ[R] Dual R (Dual R M) := LinearEquiv.dualMap (LinearEquiv.dualMap (LinearEquiv.symm e))\n⊢ Bijective ↑(Dual.eval R N)\n[PROOFSTEP]\nhave : Dual.eval R N = ed.symm.comp ((Dual.eval R M).comp e.symm.toLinearMap) :=\n  by\n  ext m f\n  exact FunLike.congr_arg f (e.apply_symm_apply m).symm\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ inst✝ : IsReflexive R M\ne : M ≃ₗ[R] N\ned : Dual R (Dual R N) ≃ₗ[R] Dual R (Dual R M) := LinearEquiv.dualMap (LinearEquiv.dualMap (LinearEquiv.symm e))\n⊢ Dual.eval R N = LinearMap.comp (↑(LinearEquiv.symm ed)) (LinearMap.comp (Dual.eval R M) ↑(LinearEquiv.symm e))\n[PROOFSTEP]\next m f\n[GOAL]\ncase h.h\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ inst✝ : IsReflexive R M\ne : M ≃ₗ[R] N\ned : Dual R (Dual R N) ≃ₗ[R] Dual R (Dual R M) := LinearEquiv.dualMap (LinearEquiv.dualMap (LinearEquiv.symm e))\nm : N\nf : Dual R N\n⊢ ↑(↑(Dual.eval R N) m) f =\n    ↑(↑(LinearMap.comp (↑(LinearEquiv.symm ed)) (LinearMap.comp (Dual.eval R M) ↑(LinearEquiv.symm e))) m) f\n[PROOFSTEP]\nexact FunLike.congr_arg f (e.apply_symm_apply m).symm\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ inst✝ : IsReflexive R M\ne : M ≃ₗ[R] N\ned : Dual R (Dual R N) ≃ₗ[R] Dual R (Dual R M) := LinearEquiv.dualMap (LinearEquiv.dualMap (LinearEquiv.symm e))\nthis : Dual.eval R N = LinearMap.comp (↑(LinearEquiv.symm ed)) (LinearMap.comp (Dual.eval R M) ↑(LinearEquiv.symm e))\n⊢ Bijective ↑(Dual.eval R N)\n[PROOFSTEP]\nsimp only [this, LinearEquiv.trans_symm, LinearEquiv.symm_symm, LinearEquiv.dualMap_symm, coe_comp, LinearEquiv.coe_coe,\n  EquivLike.comp_bijective]\n[GOAL]\nK : Type u₁\nV : Type u₂\ninst✝¹⁰ : CommRing K\ninst✝⁹ : AddCommGroup V\ninst✝⁸ : Module K V\ninst✝⁷ : Free K V\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup N\ninst✝³ : Module R M\ninst✝² : Module R N\ninst✝¹ inst✝ : IsReflexive R M\ne : M ≃ₗ[R] N\ned : Dual R (Dual R N) ≃ₗ[R] Dual R (Dual R M) := LinearEquiv.dualMap (LinearEquiv.dualMap (LinearEquiv.symm e))\nthis : Dual.eval R N = LinearMap.comp (↑(LinearEquiv.symm ed)) (LinearMap.comp (Dual.eval R M) ↑(LinearEquiv.symm e))\n⊢ Bijective (↑(Dual.eval R M) ∘ ↑(LinearEquiv.symm e))\n[PROOFSTEP]\nrefine Bijective.comp (bijective_dual_eval R M) (LinearEquiv.bijective _)\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nm : M\n⊢ ∀ (a : ι), a ∈ Set.Finite.toFinset (_ : Set.Finite {i | ↑(ε i) m ≠ 0}) ↔ (fun i => ↑(ε i) m) a ≠ 0\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nm : M\ni : ι\n⊢ i ∈ Set.Finite.toFinset (_ : Set.Finite {i | ↑(ε i) m ≠ 0}) ↔ (fun i => ↑(ε i) m) i ≠ 0\n[PROOFSTEP]\nrw [Set.Finite.mem_toFinset, Set.mem_setOf_eq]\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nl : ι →₀ R\ni : ι\n⊢ ↑(ε i) (lc e l) = ↑l i\n[PROOFSTEP]\nerw [LinearMap.map_sum]\n  -- Porting note: cannot get at •\n    -- simp only [h.eval, map_smul, smul_eq_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nl : ι →₀ R\ni : ι\n⊢ (Finset.sum l.support fun i_1 => ↑(ε i) ((fun i a => a • e i) i_1 (↑l i_1))) = ↑l i\n[PROOFSTEP]\nrw [Finset.sum_eq_single i]\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nl : ι →₀ R\ni : ι\n⊢ ↑(ε i) ((fun i a => a • e i) i (↑l i)) = ↑l i\n[PROOFSTEP]\nsimp [h.eval, smul_eq_mul]\n[GOAL]\ncase h₀\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nl : ι →₀ R\ni : ι\n⊢ ∀ (b : ι), b ∈ l.support → b ≠ i → ↑(ε i) ((fun i a => a • e i) b (↑l b)) = 0\n[PROOFSTEP]\nintro q _ q_ne\n[GOAL]\ncase h₀\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nl : ι →₀ R\ni q : ι\na✝ : q ∈ l.support\nq_ne : q ≠ i\n⊢ ↑(ε i) ((fun i a => a • e i) q (↑l q)) = 0\n[PROOFSTEP]\nsimp [q_ne.symm, h.eval, smul_eq_mul]\n[GOAL]\ncase h₁\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nl : ι →₀ R\ni : ι\n⊢ ¬i ∈ l.support → ↑(ε i) ((fun i a => a • e i) i (↑l i)) = 0\n[PROOFSTEP]\nintro p_not_in\n[GOAL]\ncase h₁\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nl : ι →₀ R\ni : ι\np_not_in : ¬i ∈ l.support\n⊢ ↑(ε i) ((fun i a => a • e i) i (↑l i)) = 0\n[PROOFSTEP]\nsimp [Finsupp.not_mem_support_iff.1 p_not_in]\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nl : ι →₀ R\n⊢ coeffs h (lc e l) = l\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nl : ι →₀ R\ni : ι\n⊢ ↑(coeffs h (lc e l)) i = ↑l i\n[PROOFSTEP]\nrw [h.coeffs_apply, h.dual_lc]\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nm : M\n⊢ lc e (coeffs h m) = m\n[PROOFSTEP]\nrefine' eq_of_sub_eq_zero (h.Total _)\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nm : M\n⊢ ∀ (i : ι), ↑(ε i) (lc e (coeffs h m) - m) = 0\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nm : M\ni : ι\n⊢ ↑(ε i) (lc e (coeffs h m) - m) = 0\n[PROOFSTEP]\nsimp [LinearMap.map_sub, h.dual_lc, sub_eq_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nv w : M\n⊢ coeffs h (v + w) = coeffs h v + coeffs h w\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nv w : M\ni : ι\n⊢ ↑(coeffs h (v + w)) i = ↑(coeffs h v + coeffs h w) i\n[PROOFSTEP]\nexact (ε i).map_add v w\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nc : R\nv : M\n⊢ AddHom.toFun { toFun := coeffs h, map_add' := (_ : ∀ (v w : M), coeffs h (v + w) = coeffs h v + coeffs h w) }\n      (c • v) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun { toFun := coeffs h, map_add' := (_ : ∀ (v w : M), coeffs h (v + w) = coeffs h v + coeffs h w) } v\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nc : R\nv : M\ni : ι\n⊢ ↑(AddHom.toFun { toFun := coeffs h, map_add' := (_ : ∀ (v w : M), coeffs h (v + w) = coeffs h v + coeffs h w) }\n          (c • v))\n      i =\n    ↑(↑(RingHom.id R) c •\n          AddHom.toFun { toFun := coeffs h, map_add' := (_ : ∀ (v w : M), coeffs h (v + w) = coeffs h v + coeffs h w) }\n            v)\n      i\n[PROOFSTEP]\nexact (ε i).map_smul c v\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\n⊢ ↑(basis h) = e\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\ni : ι\n⊢ ↑(basis h) i = e i\n[PROOFSTEP]\nrw [Basis.apply_eq_iff]\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\ni : ι\n⊢ ↑(basis h).repr (e i) = Finsupp.single i 1\n[PROOFSTEP]\next j\n[GOAL]\ncase h.h\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\ni j : ι\n⊢ ↑(↑(basis h).repr (e i)) j = ↑(Finsupp.single i 1) j\n[PROOFSTEP]\nrw [h.basis_repr_apply, coeffs_apply, h.eval, Finsupp.single_apply]\n[GOAL]\ncase h.h\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\ni j : ι\n⊢ (if j = i then 1 else 0) = if i = j then 1 else 0\n[PROOFSTEP]\nconvert if_congr (eq_comm (a := j) (b := i)) rfl rfl\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nH : Set ι\nx : M\nhmem : x ∈ Submodule.span R (e '' H)\n⊢ ∀ (i : ι), ↑(ε i) x ≠ 0 → i ∈ H\n[PROOFSTEP]\nintro i hi\n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nH : Set ι\nx : M\nhmem : x ∈ Submodule.span R (e '' H)\ni : ι\nhi : ↑(ε i) x ≠ 0\n⊢ i ∈ H\n[PROOFSTEP]\nrcases(Finsupp.mem_span_image_iff_total _).mp hmem with ⟨l, supp_l, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nH : Set ι\ni : ι\nl : ι →₀ R\nsupp_l : l ∈ Finsupp.supported R R H\nhmem : ↑(Finsupp.total ι M R e) l ∈ Submodule.span R (e '' H)\nhi : ↑(ε i) (↑(Finsupp.total ι M R e) l) ≠ 0\n⊢ i ∈ H\n[PROOFSTEP]\napply not_imp_comm.mp ((Finsupp.mem_supported' _ _).mp supp_l i)\n[GOAL]\ncase intro.intro\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝ : DecidableEq ι\nh : DualBases e ε\nH : Set ι\ni : ι\nl : ι →₀ R\nsupp_l : l ∈ Finsupp.supported R R H\nhmem : ↑(Finsupp.total ι M R e) l ∈ Submodule.span R (e '' H)\nhi : ↑(ε i) (↑(Finsupp.total ι M R e) l) ≠ 0\n⊢ ¬↑l i = 0\n[PROOFSTEP]\nrwa [← lc_def, h.dual_lc] at hi \n[GOAL]\nR : Type u_1\nM : Type u_2\nι : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ne : ι → M\nε : ι → Dual R M\ninst✝¹ : DecidableEq ι\nh : DualBases e ε\ninst✝ : Fintype ι\ni j : ι\n⊢ ↑(↑(Basis.dualBasis (basis h)) i) (↑(basis h) j) = ↑(ε i) (↑(basis h) j)\n[PROOFSTEP]\nrw [h.basis.dualBasis_apply_self, h.coe_basis, h.eval, if_congr eq_comm rfl rfl]\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW : Submodule R M\nφ : Module.Dual R M\n⊢ φ ∈ dualAnnihilator W ↔ ∀ (w : M), w ∈ W → ↑φ w = 0\n[PROOFSTEP]\nrefine' LinearMap.mem_ker.trans _\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW : Submodule R M\nφ : Module.Dual R M\n⊢ ↑(dualRestrict W) φ = 0 ↔ ∀ (w : M), w ∈ W → ↑φ w = 0\n[PROOFSTEP]\nsimp_rw [LinearMap.ext_iff, dualRestrict_apply]\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW : Submodule R M\nφ : Module.Dual R M\n⊢ (∀ (x : { x // x ∈ W }), ↑φ ↑x = ↑0 x) ↔ ∀ (w : M), w ∈ W → ↑φ w = 0\n[PROOFSTEP]\nexact ⟨fun h w hw => h ⟨w, hw⟩, fun h w => h w.1 w.2⟩\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW : Submodule R M\nΦ : Submodule R (Module.Dual R M)\nx : M\n⊢ x ∈ dualCoannihilator Φ ↔ ∀ (φ : Module.Dual R M), φ ∈ Φ → ↑φ x = 0\n[PROOFSTEP]\nsimp_rw [dualCoannihilator, mem_comap, mem_dualAnnihilator, Module.Dual.eval_apply]\n[GOAL]\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ GaloisConnection (↑OrderDual.toDual ∘ dualAnnihilator) (dualCoannihilator ∘ ↑OrderDual.ofDual)\n[PROOFSTEP]\nintro a b\n[GOAL]\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\nb : (Submodule R (Module.Dual R M))ᵒᵈ\n⊢ (↑OrderDual.toDual ∘ dualAnnihilator) a ≤ b ↔ a ≤ (dualCoannihilator ∘ ↑OrderDual.ofDual) b\n[PROOFSTEP]\ninduction b using OrderDual.rec\n[GOAL]\ncase h₂\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\n⊢ (↑OrderDual.toDual ∘ dualAnnihilator) a ≤ ↑OrderDual.toDual a✝ ↔\n    a ≤ (dualCoannihilator ∘ ↑OrderDual.ofDual) (↑OrderDual.toDual a✝)\n[PROOFSTEP]\nsimp only [Function.comp_apply, OrderDual.toDual_le_toDual, OrderDual.ofDual_toDual]\n[GOAL]\ncase h₂\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\n⊢ a✝ ≤ dualAnnihilator a ↔ a ≤ dualCoannihilator a✝\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h₂.mp\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\n⊢ a✝ ≤ dualAnnihilator a → a ≤ dualCoannihilator a✝\n[PROOFSTEP]\nintro h x hx\n[GOAL]\ncase h₂.mp\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\nh : a✝ ≤ dualAnnihilator a\nx : M\nhx : x ∈ a\n⊢ x ∈ dualCoannihilator a✝\n[PROOFSTEP]\nsimp only [mem_dualAnnihilator, mem_dualCoannihilator]\n[GOAL]\ncase h₂.mp\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\nh : a✝ ≤ dualAnnihilator a\nx : M\nhx : x ∈ a\n⊢ ∀ (φ : Module.Dual R M), φ ∈ a✝ → ↑φ x = 0\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase h₂.mp\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\nh : a✝ ≤ dualAnnihilator a\nx : M\nhx : x ∈ a\ny : Module.Dual R M\nhy : y ∈ a✝\n⊢ ↑y x = 0\n[PROOFSTEP]\nhave := h hy\n[GOAL]\ncase h₂.mp\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\nh : a✝ ≤ dualAnnihilator a\nx : M\nhx : x ∈ a\ny : Module.Dual R M\nhy : y ∈ a✝\nthis : y ∈ dualAnnihilator a\n⊢ ↑y x = 0\n[PROOFSTEP]\nsimp only [mem_dualAnnihilator, mem_dualCoannihilator] at this \n[GOAL]\ncase h₂.mp\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\nh : a✝ ≤ dualAnnihilator a\nx : M\nhx : x ∈ a\ny : Module.Dual R M\nhy : y ∈ a✝\nthis : ∀ (w : M), w ∈ a → ↑y w = 0\n⊢ ↑y x = 0\n[PROOFSTEP]\nexact this x hx\n[GOAL]\ncase h₂.mpr\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\n⊢ a ≤ dualCoannihilator a✝ → a✝ ≤ dualAnnihilator a\n[PROOFSTEP]\nintro h x hx\n[GOAL]\ncase h₂.mpr\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\nh : a ≤ dualCoannihilator a✝\nx : Module.Dual R M\nhx : x ∈ a✝\n⊢ x ∈ dualAnnihilator a\n[PROOFSTEP]\nsimp only [mem_dualAnnihilator, mem_dualCoannihilator]\n[GOAL]\ncase h₂.mpr\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\nh : a ≤ dualCoannihilator a✝\nx : Module.Dual R M\nhx : x ∈ a✝\n⊢ ∀ (w : M), w ∈ a → ↑x w = 0\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase h₂.mpr\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\nh : a ≤ dualCoannihilator a✝\nx : Module.Dual R M\nhx : x ∈ a✝\ny : M\nhy : y ∈ a\n⊢ ↑x y = 0\n[PROOFSTEP]\nhave := h hy\n[GOAL]\ncase h₂.mpr\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\nh : a ≤ dualCoannihilator a✝\nx : Module.Dual R M\nhx : x ∈ a✝\ny : M\nhy : y ∈ a\nthis : y ∈ dualCoannihilator a✝\n⊢ ↑x y = 0\n[PROOFSTEP]\nsimp only [mem_dualAnnihilator, mem_dualCoannihilator] at this \n[GOAL]\ncase h₂.mpr\nR✝ : Type u\nM✝ : Type v\ninst✝⁵ : CommSemiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nW : Submodule R✝ M✝\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\na : Submodule R M\na✝ : Submodule R (Module.Dual R M)\nh : a ≤ dualCoannihilator a✝\nx : Module.Dual R M\nhx : x ∈ a✝\ny : M\nhy : y ∈ a\nthis : ∀ (φ : Module.Dual R M), φ ∈ a✝ → ↑φ y = 0\n⊢ ↑x y = 0\n[PROOFSTEP]\nexact this x hx\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW : Submodule R M\n⊢ dualAnnihilator ⊤ = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW : Submodule R M\n⊢ dualAnnihilator ⊤ ≤ ⊥\n[PROOFSTEP]\nintro v\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW : Submodule R M\nv : Module.Dual R M\n⊢ v ∈ dualAnnihilator ⊤ → v ∈ ⊥\n[PROOFSTEP]\nsimp_rw [mem_dualAnnihilator, mem_bot, mem_top, forall_true_left]\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW : Submodule R M\nv : Module.Dual R M\n⊢ (∀ (w : M), ↑v w = 0) → v = 0\n[PROOFSTEP]\nexact fun h => LinearMap.ext h\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW U V : Submodule R M\n⊢ dualAnnihilator U ⊔ dualAnnihilator V ≤ dualAnnihilator (U ⊓ V)\n[PROOFSTEP]\nrw [le_dualAnnihilator_iff_le_dualCoannihilator, dualCoannihilator_sup_eq]\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW U V : Submodule R M\n⊢ U ⊓ V ≤ dualCoannihilator (dualAnnihilator U) ⊓ dualCoannihilator (dualAnnihilator V)\n[PROOFSTEP]\napply inf_le_inf\n[GOAL]\ncase h₁\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW U V : Submodule R M\n⊢ U ≤ dualCoannihilator (dualAnnihilator U)\n[PROOFSTEP]\nexact le_dualAnnihilator_dualCoannihilator _\n[GOAL]\ncase h₂\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW U V : Submodule R M\n⊢ V ≤ dualCoannihilator (dualAnnihilator V)\n[PROOFSTEP]\nexact le_dualAnnihilator_dualCoannihilator _\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW : Submodule R M\nι : Type u_1\nU : ι → Submodule R M\n⊢ ⨆ (i : ι), dualAnnihilator (U i) ≤ dualAnnihilator (⨅ (i : ι), U i)\n[PROOFSTEP]\nrw [le_dualAnnihilator_iff_le_dualCoannihilator, dualCoannihilator_iSup_eq]\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW : Submodule R M\nι : Type u_1\nU : ι → Submodule R M\n⊢ ⨅ (i : ι), U i ≤ ⨅ (i : ι), dualCoannihilator (dualAnnihilator (U i))\n[PROOFSTEP]\napply iInf_mono\n[GOAL]\ncase h\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nW : Submodule R M\nι : Type u_1\nU : ι → Submodule R M\n⊢ ∀ (i : ι), U i ≤ dualCoannihilator (dualAnnihilator (U i))\n[PROOFSTEP]\nexact fun i : ι => le_dualAnnihilator_dualCoannihilator (U i)\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\n⊢ dualCoannihilator ⊤ = ⊥\n[PROOFSTEP]\nrw [dualCoannihilator, dualAnnihilator_top, comap_bot, Module.eval_ker]\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\n⊢ dualCoannihilator (dualAnnihilator W) = W\n[PROOFSTEP]\nrefine' le_antisymm _ (le_dualAnnihilator_dualCoannihilator _)\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\n⊢ dualCoannihilator (dualAnnihilator W) ≤ W\n[PROOFSTEP]\nintro v\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nv : V\n⊢ v ∈ dualCoannihilator (dualAnnihilator W) → v ∈ W\n[PROOFSTEP]\nsimp only [mem_dualAnnihilator, mem_dualCoannihilator]\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nv : V\n⊢ (∀ (φ : Module.Dual K V), (∀ (w : V), w ∈ W → ↑φ w = 0) → ↑φ v = 0) → v ∈ W\n[PROOFSTEP]\ncontrapose!\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nv : V\n⊢ ¬v ∈ W → ∃ φ, (∀ (w : V), w ∈ W → ↑φ w = 0) ∧ ↑φ v ≠ 0\n[PROOFSTEP]\nintro hv\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nv : V\nhv : ¬v ∈ W\n⊢ ∃ φ, (∀ (w : V), w ∈ W → ↑φ w = 0) ∧ ↑φ v ≠ 0\n[PROOFSTEP]\nobtain ⟨W', hW⟩ := Submodule.exists_isCompl W\n[GOAL]\ncase intro\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nv : V\nhv : ¬v ∈ W\nW' : Submodule K V\nhW : IsCompl W W'\n⊢ ∃ φ, (∀ (w : V), w ∈ W → ↑φ w = 0) ∧ ↑φ v ≠ 0\n[PROOFSTEP]\nobtain ⟨⟨w, w'⟩, rfl, -⟩ := existsUnique_add_of_isCompl_prod hW v\n[GOAL]\ncase intro.intro.mk.intro\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv : ¬↑(w, w').fst + ↑(w, w').snd ∈ W\n⊢ ∃ φ, (∀ (w : V), w ∈ W → ↑φ w = 0) ∧ ↑φ (↑(w, w').fst + ↑(w, w').snd) ≠ 0\n[PROOFSTEP]\nhave hw'n : (w' : V) ∉ W := by\n  contrapose! hv\n  exact Submodule.add_mem W w.2 hv\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv : ¬↑(w, w').fst + ↑(w, w').snd ∈ W\n⊢ ¬↑w' ∈ W\n[PROOFSTEP]\ncontrapose! hv\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv : ↑w' ∈ W\n⊢ ↑w + ↑w' ∈ W\n[PROOFSTEP]\nexact Submodule.add_mem W w.2 hv\n[GOAL]\ncase intro.intro.mk.intro\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv : ¬↑(w, w').fst + ↑(w, w').snd ∈ W\nhw'n : ¬↑w' ∈ W\n⊢ ∃ φ, (∀ (w : V), w ∈ W → ↑φ w = 0) ∧ ↑φ (↑(w, w').fst + ↑(w, w').snd) ≠ 0\n[PROOFSTEP]\nhave hw'nz : w' ≠ 0 := by\n  rintro rfl\n  exact hw'n (Submodule.zero_mem W)\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv : ¬↑(w, w').fst + ↑(w, w').snd ∈ W\nhw'n : ¬↑w' ∈ W\n⊢ w' ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nhv : ¬↑(w, 0).fst + ↑(w, 0).snd ∈ W\nhw'n : ¬↑0 ∈ W\n⊢ False\n[PROOFSTEP]\nexact hw'n (Submodule.zero_mem W)\n[GOAL]\ncase intro.intro.mk.intro\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv : ¬↑(w, w').fst + ↑(w, w').snd ∈ W\nhw'n : ¬↑w' ∈ W\nhw'nz : w' ≠ 0\n⊢ ∃ φ, (∀ (w : V), w ∈ W → ↑φ w = 0) ∧ ↑φ (↑(w, w').fst + ↑(w, w').snd) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, ← Module.forall_dual_apply_eq_zero_iff K w'] at hw'nz \n[GOAL]\ncase intro.intro.mk.intro\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv : ¬↑(w, w').fst + ↑(w, w').snd ∈ W\nhw'n : ¬↑w' ∈ W\nhw'nz : ¬∀ (φ : Module.Dual K { x // x ∈ W' }), ↑φ w' = 0\n⊢ ∃ φ, (∀ (w : V), w ∈ W → ↑φ w = 0) ∧ ↑φ (↑(w, w').fst + ↑(w, w').snd) ≠ 0\n[PROOFSTEP]\npush_neg at hw'nz \n[GOAL]\ncase intro.intro.mk.intro\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv : ¬↑(w, w').fst + ↑(w, w').snd ∈ W\nhw'n : ¬↑w' ∈ W\nhw'nz : ∃ φ, ↑φ w' ≠ 0\n⊢ ∃ φ, (∀ (w : V), w ∈ W → ↑φ w = 0) ∧ ↑φ (↑(w, w').fst + ↑(w, w').snd) ≠ 0\n[PROOFSTEP]\nobtain ⟨φ, hφ⟩ := hw'nz\n[GOAL]\ncase intro.intro.mk.intro.intro\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv : ¬↑(w, w').fst + ↑(w, w').snd ∈ W\nhw'n : ¬↑w' ∈ W\nφ : Module.Dual K { x // x ∈ W' }\nhφ : ↑φ w' ≠ 0\n⊢ ∃ φ, (∀ (w : V), w ∈ W → ↑φ w = 0) ∧ ↑φ (↑(w, w').fst + ↑(w, w').snd) ≠ 0\n[PROOFSTEP]\nexists ((LinearMap.ofIsComplProd hW).comp (LinearMap.inr _ _ _)) φ\n[GOAL]\ncase intro.intro.mk.intro.intro\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv : ¬↑(w, w').fst + ↑(w, w').snd ∈ W\nhw'n : ¬↑w' ∈ W\nφ : Module.Dual K { x // x ∈ W' }\nhφ : ↑φ w' ≠ 0\n⊢ (∀ (w : V),\n      w ∈ W → ↑(↑(comp (ofIsComplProd hW) (inr K ({ x // x ∈ W } →ₗ[K] K) ({ x // x ∈ W' } →ₗ[K] K))) φ) w = 0) ∧\n    ↑(↑(comp (ofIsComplProd hW) (inr K ({ x // x ∈ W } →ₗ[K] K) ({ x // x ∈ W' } →ₗ[K] K))) φ)\n        (↑(w, w').fst + ↑(w, w').snd) ≠\n      0\n[PROOFSTEP]\nsimp only [coe_comp, coe_inr, Function.comp_apply, ofIsComplProd_apply, map_add, ofIsCompl_left_apply, zero_apply,\n  ofIsCompl_right_apply, zero_add, Ne.def]\n[GOAL]\ncase intro.intro.mk.intro.intro\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv : ¬↑(w, w').fst + ↑(w, w').snd ∈ W\nhw'n : ¬↑w' ∈ W\nφ : Module.Dual K { x // x ∈ W' }\nhφ : ↑φ w' ≠ 0\n⊢ (∀ (w : V), w ∈ W → ↑(ofIsCompl hW 0 φ) w = 0) ∧ ¬↑φ w' = 0\n[PROOFSTEP]\nrefine' ⟨_, hφ⟩\n[GOAL]\ncase intro.intro.mk.intro.intro\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv : ¬↑(w, w').fst + ↑(w, w').snd ∈ W\nhw'n : ¬↑w' ∈ W\nφ : Module.Dual K { x // x ∈ W' }\nhφ : ↑φ w' ≠ 0\n⊢ ∀ (w : V), w ∈ W → ↑(ofIsCompl hW 0 φ) w = 0\n[PROOFSTEP]\nintro v hv\n[GOAL]\ncase intro.intro.mk.intro.intro\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nW' : Submodule K V\nhW : IsCompl W W'\nw : { x // x ∈ W }\nw' : { x // x ∈ W' }\nhv✝ : ¬↑(w, w').fst + ↑(w, w').snd ∈ W\nhw'n : ¬↑w' ∈ W\nφ : Module.Dual K { x // x ∈ W' }\nhφ : ↑φ w' ≠ 0\nv : V\nhv : v ∈ W\n⊢ ↑(ofIsCompl hW 0 φ) v = 0\n[PROOFSTEP]\napply LinearMap.ofIsCompl_left_apply hW ⟨v, hv⟩\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nv : V\n⊢ (∀ (φ : Module.Dual K V), φ ∈ dualAnnihilator W → ↑φ v = 0) ↔ v ∈ W\n[PROOFSTEP]\nrw [← SetLike.ext_iff.mp dualAnnihilator_dualCoannihilator_eq v, mem_dualCoannihilator]\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW W' : Subspace K V\n⊢ dualAnnihilator W = dualAnnihilator W' ↔ W = W'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW W' : Subspace K V\n⊢ dualAnnihilator W = dualAnnihilator W' → W = W'\n[PROOFSTEP]\napply (dualAnnihilatorGci K V).l_injective\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW W' : Subspace K V\n⊢ W = W' → dualAnnihilator W = dualAnnihilator W'\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\n⊢ dualAnnihilator W = dualAnnihilator W\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nφ : Module.Dual K { x // x ∈ W }\nw : { x // x ∈ W }\n⊢ ↑(↑(dualLift W) φ) ↑w = ↑φ w\n[PROOFSTEP]\nerw [ofIsCompl_left_apply _ w]\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nφ : Module.Dual K { x // x ∈ W }\nw : { x // x ∈ W }\n⊢ ↑(↑(inl K (Module.Dual K { x // x ∈ W })\n                ({ x // x ∈ ↑(Classical.indefiniteDescription (fun x => IsCompl W x) (_ : ∃ q, IsCompl W q)) } →ₗ[K] K))\n            φ).fst\n      w =\n    ↑φ w\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW : Subspace K V\nφ : Module.Dual K { x // x ∈ W }\nw : V\nhw : w ∈ W\n⊢ ↑(↑(dualLift W) φ) w = ↑φ { val := w, property := hw }\n[PROOFSTEP]\nconvert dualLift_of_subtype ⟨w, hw⟩\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW✝ W : Subspace K V\n⊢ comp (dualRestrict W) (dualLift W) = 1\n[PROOFSTEP]\next φ x\n[GOAL]\ncase h.h\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW✝ W : Subspace K V\nφ : Module.Dual K { x // x ∈ W }\nx : { x // x ∈ W }\n⊢ ↑(↑(comp (dualRestrict W) (dualLift W)) φ) x = ↑(↑1 φ) x\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW✝ W : Subspace K V\nx : Module.Dual K { x // x ∈ W }\n⊢ ↑(comp (dualRestrict W) (dualLift W)) x = x\n[PROOFSTEP]\nrw [dualRestrict_comp_dualLift]\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW✝ W : Subspace K V\nx : Module.Dual K { x // x ∈ W }\n⊢ ↑1 x = x\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW✝ W : Subspace K V\nφ : Module.Dual K V\n⊢ ↑(quotAnnihilatorEquiv W) (Submodule.Quotient.mk φ) = ↑(dualRestrict W) φ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nK : Type u\nV : Type v\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nW✝ W : Subspace K V\nφ : Module.Dual K V\nx✝ : { x // x ∈ W }\n⊢ ↑(↑(quotAnnihilatorEquiv W) (Submodule.Quotient.mk φ)) x✝ = ↑(↑(dualRestrict W) φ) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nW : Subspace K V\nV₁ : Type u_1\ninst✝¹ : AddCommGroup V₁\ninst✝ : Module K V₁\nH : FiniteDimensional K V\n⊢ FiniteDimensional K (Module.Dual K V)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nW✝ : Subspace K V\nV₁ : Type u_1\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : FiniteDimensional K V\ninst✝ : FiniteDimensional K V₁\nW : Subspace K V\n⊢ dualAnnihilator (dualAnnihilator W) = ↑(Module.mapEvalEquiv K V) W\n[PROOFSTEP]\nhave : _ = W := Subspace.dualAnnihilator_dualCoannihilator_eq\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nW✝ : Subspace K V\nV₁ : Type u_1\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : FiniteDimensional K V\ninst✝ : FiniteDimensional K V₁\nW : Subspace K V\nthis : dualCoannihilator (dualAnnihilator W) = W\n⊢ dualAnnihilator (dualAnnihilator W) = ↑(Module.mapEvalEquiv K V) W\n[PROOFSTEP]\nrw [dualCoannihilator, ← Module.mapEvalEquiv_symm_apply] at this \n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nW✝ : Subspace K V\nV₁ : Type u_1\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : FiniteDimensional K V\ninst✝ : FiniteDimensional K V₁\nW : Subspace K V\nthis : ↑(OrderIso.symm (Module.mapEvalEquiv K V)) (dualAnnihilator (dualAnnihilator W)) = W\n⊢ dualAnnihilator (dualAnnihilator W) = ↑(Module.mapEvalEquiv K V) W\n[PROOFSTEP]\nrwa [← OrderIso.symm_apply_eq]\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nW : Subspace K V\nV₁ : Type u_1\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : FiniteDimensional K V\ninst✝ : FiniteDimensional K V₁\n⊢ finrank K (Module.Dual K V) = finrank K V\n[PROOFSTEP]\nclassical exact LinearEquiv.finrank_eq (Basis.ofVectorSpace K V).toDualEquiv.symm\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nW : Subspace K V\nV₁ : Type u_1\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : FiniteDimensional K V\ninst✝ : FiniteDimensional K V₁\n⊢ finrank K (Module.Dual K V) = finrank K V\n[PROOFSTEP]\nexact LinearEquiv.finrank_eq (Basis.ofVectorSpace K V).toDualEquiv.symm\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nW : Subspace K V\nV₁ : Type u_1\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : FiniteDimensional K V\ninst✝ : FiniteDimensional K V₁\nΦ : Subspace K (Module.Dual K V)\n⊢ finrank K { x // x ∈ dualCoannihilator Φ } = finrank K { x // x ∈ dualAnnihilator Φ }\n[PROOFSTEP]\nrw [Submodule.dualCoannihilator, ← Module.evalEquiv_toLinearMap]\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nW : Subspace K V\nV₁ : Type u_1\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : FiniteDimensional K V\ninst✝ : FiniteDimensional K V₁\nΦ : Subspace K (Module.Dual K V)\n⊢ finrank K { x // x ∈ comap (↑(Module.evalEquiv K V)) (dualAnnihilator Φ) } = finrank K { x // x ∈ dualAnnihilator Φ }\n[PROOFSTEP]\nexact LinearEquiv.finrank_eq (LinearEquiv.ofSubmodule' _ _)\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nW✝ : Subspace K V\nV₁ : Type u_1\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : FiniteDimensional K V\ninst✝ : FiniteDimensional K V₁\nW : Subspace K (Module.Dual K V)\n⊢ finrank K { x // x ∈ W } + finrank K { x // x ∈ dualCoannihilator W } = finrank K V\n[PROOFSTEP]\nrw [finrank_dualCoannihilator_eq]\n  -- Porting note: LinearEquiv.finrank_eq needs help\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nW✝ : Subspace K V\nV₁ : Type u_1\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : FiniteDimensional K V\ninst✝ : FiniteDimensional K V₁\nW : Subspace K (Module.Dual K V)\n⊢ finrank K { x // x ∈ W } + finrank K { x // x ∈ dualAnnihilator W } = finrank K V\n[PROOFSTEP]\nlet equiv := W.quotEquivAnnihilator\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nW✝ : Subspace K V\nV₁ : Type u_1\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : FiniteDimensional K V\ninst✝ : FiniteDimensional K V₁\nW : Subspace K (Module.Dual K V)\nequiv : (Module.Dual K V ⧸ W) ≃ₗ[K] { x // x ∈ dualAnnihilator W } := quotEquivAnnihilator W\n⊢ finrank K { x // x ∈ W } + finrank K { x // x ∈ dualAnnihilator W } = finrank K V\n[PROOFSTEP]\nhave eq := LinearEquiv.finrank_eq (R := K) (M := (Module.Dual K V) ⧸ W) (M₂ := { x // x ∈ dualAnnihilator W }) equiv\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nW✝ : Subspace K V\nV₁ : Type u_1\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : FiniteDimensional K V\ninst✝ : FiniteDimensional K V₁\nW : Subspace K (Module.Dual K V)\nequiv : (Module.Dual K V ⧸ W) ≃ₗ[K] { x // x ∈ dualAnnihilator W } := quotEquivAnnihilator W\neq : finrank K (Module.Dual K V ⧸ W) = finrank K { x // x ∈ dualAnnihilator W }\n⊢ finrank K { x // x ∈ W } + finrank K { x // x ∈ dualAnnihilator W } = finrank K V\n[PROOFSTEP]\nrw [eq.symm, add_comm, Submodule.finrank_quotient_add_finrank, Subspace.dual_finrank_eq]\n[GOAL]\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\n⊢ ker (dualMap f) = Submodule.dualAnnihilator (range f)\n[PROOFSTEP]\next φ\n[GOAL]\ncase h\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nφ : Dual R M₂\n⊢ φ ∈ ker (dualMap f) ↔ φ ∈ Submodule.dualAnnihilator (range f)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nφ : Dual R M₂\n⊢ φ ∈ ker (dualMap f) → φ ∈ Submodule.dualAnnihilator (range f)\n[PROOFSTEP]\nintro hφ\n[GOAL]\ncase h.mpr\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nφ : Dual R M₂\n⊢ φ ∈ Submodule.dualAnnihilator (range f) → φ ∈ ker (dualMap f)\n[PROOFSTEP]\nintro hφ\n[GOAL]\ncase h.mp\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nφ : Dual R M₂\nhφ : φ ∈ ker (dualMap f)\n⊢ φ ∈ Submodule.dualAnnihilator (range f)\n[PROOFSTEP]\nrw [mem_ker] at hφ \n[GOAL]\ncase h.mp\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nφ : Dual R M₂\nhφ : ↑(dualMap f) φ = 0\n⊢ φ ∈ Submodule.dualAnnihilator (range f)\n[PROOFSTEP]\nrw [Submodule.mem_dualAnnihilator]\n[GOAL]\ncase h.mp\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nφ : Dual R M₂\nhφ : ↑(dualMap f) φ = 0\n⊢ ∀ (w : M₂), w ∈ range f → ↑φ w = 0\n[PROOFSTEP]\nrintro y ⟨x, rfl⟩\n[GOAL]\ncase h.mp.intro\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nφ : Dual R M₂\nhφ : ↑(dualMap f) φ = 0\nx : M₁\n⊢ ↑φ (↑f x) = 0\n[PROOFSTEP]\nrw [← dualMap_apply, hφ, zero_apply]\n[GOAL]\ncase h.mpr\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nφ : Dual R M₂\nhφ : φ ∈ Submodule.dualAnnihilator (range f)\n⊢ φ ∈ ker (dualMap f)\n[PROOFSTEP]\next x\n[GOAL]\ncase h.mpr.h\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nφ : Dual R M₂\nhφ : φ ∈ Submodule.dualAnnihilator (range f)\nx : M₁\n⊢ ↑(↑(dualMap f) φ) x = ↑0 x\n[PROOFSTEP]\nrw [dualMap_apply]\n[GOAL]\ncase h.mpr.h\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nφ : Dual R M₂\nhφ : φ ∈ Submodule.dualAnnihilator (range f)\nx : M₁\n⊢ ↑φ (↑f x) = ↑0 x\n[PROOFSTEP]\nrw [Submodule.mem_dualAnnihilator] at hφ \n[GOAL]\ncase h.mpr.h\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nφ : Dual R M₂\nhφ : ∀ (w : M₂), w ∈ range f → ↑φ w = 0\nx : M₁\n⊢ ↑φ (↑f x) = ↑0 x\n[PROOFSTEP]\nexact hφ (f x) ⟨x, rfl⟩\n[GOAL]\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\n⊢ range (dualMap f) ≤ Submodule.dualAnnihilator (ker f)\n[PROOFSTEP]\nrintro _ ⟨ψ, rfl⟩\n[GOAL]\ncase intro\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nψ : Dual R M₂\n⊢ ↑(dualMap f) ψ ∈ Submodule.dualAnnihilator (ker f)\n[PROOFSTEP]\nsimp_rw [Submodule.mem_dualAnnihilator, mem_ker]\n[GOAL]\ncase intro\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nψ : Dual R M₂\n⊢ ∀ (w : M₁), ↑f w = 0 → ↑(↑(dualMap f) ψ) w = 0\n[PROOFSTEP]\nrintro x hx\n[GOAL]\ncase intro\nR : Type u\ninst✝⁴ : CommSemiring R\nM₁ : Type v\nM₂ : Type v'\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nf : M₁ →ₗ[R] M₂\nψ : Dual R M₂\nx : M₁\nhx : ↑f x = 0\n⊢ ↑(↑(dualMap f) ψ) x = 0\n[PROOFSTEP]\nrw [dualMap_apply, hx, map_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\n⊢ W ≤ LinearMap.ker (LinearMap.flip (LinearMap.domRestrict (dualPairing R M) (dualAnnihilator W)))\n[PROOFSTEP]\nintro w hw\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nw : M\nhw : w ∈ W\n⊢ w ∈ LinearMap.ker (LinearMap.flip (LinearMap.domRestrict (dualPairing R M) (dualAnnihilator W)))\n[PROOFSTEP]\next ⟨φ, hφ⟩\n[GOAL]\ncase h.mk\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nw : M\nhw : w ∈ W\nφ : Dual R M\nhφ : φ ∈ dualAnnihilator W\n⊢ ↑(↑(LinearMap.flip (LinearMap.domRestrict (dualPairing R M) (dualAnnihilator W))) w) { val := φ, property := hφ } =\n    ↑0 { val := φ, property := hφ }\n[PROOFSTEP]\nexact (mem_dualAnnihilator φ).mp hφ w hw\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nφ ψ : { x // x ∈ dualAnnihilator W }\nh : (fun φ => ↑↑φ) φ = (fun φ => ↑↑φ) ψ\n⊢ φ = ψ\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nφ ψ : { x // x ∈ dualAnnihilator W }\nh : (fun φ => ↑↑φ) φ = (fun φ => ↑↑φ) ψ\nx✝ : M\n⊢ ↑↑φ x✝ = ↑↑ψ x✝\n[PROOFSTEP]\nsimp only [Function.funext_iff] at h \n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nφ ψ : { x // x ∈ dualAnnihilator W }\nx✝ : M\nh : ∀ (a : M), ↑↑φ a = ↑↑ψ a\n⊢ ↑↑φ x✝ = ↑↑ψ x✝\n[PROOFSTEP]\nexact h _\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\n⊢ LinearMap.range (LinearMap.dualMap (mkQ W)) = dualAnnihilator W\n[PROOFSTEP]\next φ\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nφ : Dual R M\n⊢ φ ∈ LinearMap.range (LinearMap.dualMap (mkQ W)) ↔ φ ∈ dualAnnihilator W\n[PROOFSTEP]\nrw [LinearMap.mem_range]\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nφ : Dual R M\n⊢ (∃ y, ↑(LinearMap.dualMap (mkQ W)) y = φ) ↔ φ ∈ dualAnnihilator W\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nφ : Dual R M\n⊢ (∃ y, ↑(LinearMap.dualMap (mkQ W)) y = φ) → φ ∈ dualAnnihilator W\n[PROOFSTEP]\nrintro ⟨ψ, rfl⟩\n[GOAL]\ncase h.mp.intro\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nψ : Dual R (M ⧸ W)\n⊢ ↑(LinearMap.dualMap (mkQ W)) ψ ∈ dualAnnihilator W\n[PROOFSTEP]\nhave := LinearMap.mem_range_self W.mkQ.dualMap ψ\n[GOAL]\ncase h.mp.intro\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nψ : Dual R (M ⧸ W)\nthis : ↑(LinearMap.dualMap (mkQ W)) ψ ∈ LinearMap.range (LinearMap.dualMap (mkQ W))\n⊢ ↑(LinearMap.dualMap (mkQ W)) ψ ∈ dualAnnihilator W\n[PROOFSTEP]\nsimpa only [ker_mkQ] using LinearMap.range_dualMap_le_dualAnnihilator_ker W.mkQ this\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nφ : Dual R M\n⊢ φ ∈ dualAnnihilator W → ∃ y, ↑(LinearMap.dualMap (mkQ W)) y = φ\n[PROOFSTEP]\nintro hφ\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nφ : Dual R M\nhφ : φ ∈ dualAnnihilator W\n⊢ ∃ y, ↑(LinearMap.dualMap (mkQ W)) y = φ\n[PROOFSTEP]\nexists W.dualCopairing ⟨φ, hφ⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\n⊢ LinearMap.comp\n      (LinearMap.codRestrict (dualAnnihilator W) (LinearMap.dualMap (mkQ W))\n        (_ : ∀ (φ : Dual R (M ⧸ W)), ↑(LinearMap.dualMap (mkQ W)) φ ∈ dualAnnihilator W))\n      (dualCopairing W) =\n    LinearMap.id\n[PROOFSTEP]\next\n[GOAL]\ncase h.a.h\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nx✝¹ : { x // x ∈ dualAnnihilator W }\nx✝ : M\n⊢ ↑↑(↑(LinearMap.comp\n                (LinearMap.codRestrict (dualAnnihilator W) (LinearMap.dualMap (mkQ W))\n                  (_ : ∀ (φ : Dual R (M ⧸ W)), ↑(LinearMap.dualMap (mkQ W)) φ ∈ dualAnnihilator W))\n                (dualCopairing W))\n            x✝¹)\n      x✝ =\n    ↑↑(↑LinearMap.id x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\n⊢ LinearMap.comp (dualCopairing W)\n      (LinearMap.codRestrict (dualAnnihilator W) (LinearMap.dualMap (mkQ W))\n        (_ : ∀ (φ : Dual R (M ⧸ W)), ↑(LinearMap.dualMap (mkQ W)) φ ∈ dualAnnihilator W)) =\n    LinearMap.id\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.h\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nW : Submodule R M\nx✝¹ : Dual R (M ⧸ W)\nx✝ : M\n⊢ ↑(LinearMap.comp\n          (↑(LinearMap.comp (dualCopairing W)\n                (LinearMap.codRestrict (dualAnnihilator W) (LinearMap.dualMap (mkQ W))\n                  (_ : ∀ (φ : Dual R (M ⧸ W)), ↑(LinearMap.dualMap (mkQ W)) φ ∈ dualAnnihilator W)))\n            x✝¹)\n          (mkQ W))\n      x✝ =\n    ↑(LinearMap.comp (↑LinearMap.id x✝¹) (mkQ W)) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑f\n⊢ range (dualMap f) = dualAnnihilator (ker f)\n[PROOFSTEP]\nrw [← f.ker.range_dualMap_mkQ_eq]\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑f\n⊢ range (dualMap f) = range (dualMap (mkQ (ker f)))\n[PROOFSTEP]\nlet f' := LinearMap.quotKerEquivOfSurjective f hf\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑f\nf' : (M ⧸ ker f) ≃ₗ[R] M' := quotKerEquivOfSurjective f hf\n⊢ range (dualMap f) = range (dualMap (mkQ (ker f)))\n[PROOFSTEP]\ntrans LinearMap.range (f.dualMap.comp f'.symm.dualMap.toLinearMap)\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑f\nf' : (M ⧸ ker f) ≃ₗ[R] M' := quotKerEquivOfSurjective f hf\n⊢ range (dualMap f) = range (comp (dualMap f) ↑(LinearEquiv.dualMap (LinearEquiv.symm f')))\n[PROOFSTEP]\nrw [LinearMap.range_comp_of_range_eq_top]\n[GOAL]\ncase hf\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑f\nf' : (M ⧸ ker f) ≃ₗ[R] M' := quotKerEquivOfSurjective f hf\n⊢ range ↑(LinearEquiv.dualMap (LinearEquiv.symm f')) = ⊤\n[PROOFSTEP]\napply LinearEquiv.range\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑f\nf' : (M ⧸ ker f) ≃ₗ[R] M' := quotKerEquivOfSurjective f hf\n⊢ range (comp (dualMap f) ↑(LinearEquiv.dualMap (LinearEquiv.symm f'))) = range (dualMap (mkQ (ker f)))\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑f\nf' : (M ⧸ ker f) ≃ₗ[R] M' := quotKerEquivOfSurjective f hf\n⊢ comp (dualMap f) ↑(LinearEquiv.dualMap (LinearEquiv.symm f')) = dualMap (mkQ (ker f))\n[PROOFSTEP]\next φ x\n[GOAL]\ncase h.h.h\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑f\nf' : (M ⧸ ker f) ≃ₗ[R] M' := quotKerEquivOfSurjective f hf\nφ : Dual R (M ⧸ ker f)\nx : M\n⊢ ↑(↑(comp (dualMap f) ↑(LinearEquiv.dualMap (LinearEquiv.symm f'))) φ) x = ↑(↑(dualMap (mkQ (ker f))) φ) x\n[PROOFSTEP]\nsimp only [LinearMap.coe_comp, LinearEquiv.coe_toLinearMap, LinearMap.dualMap_apply, LinearEquiv.dualMap_apply,\n  mkQ_apply, LinearMap.quotKerEquivOfSurjective, LinearEquiv.trans_symm, LinearEquiv.trans_apply,\n  LinearEquiv.ofTop_symm_apply, LinearMap.quotKerEquivRange_symm_apply_image, mkQ_apply, Function.comp]\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑(dualMap (Submodule.subtype (range f)))\n⊢ range (dualMap f) = dualAnnihilator (ker f)\n[PROOFSTEP]\nhave rr_surj : Function.Surjective f.rangeRestrict := by rw [← LinearMap.range_eq_top, LinearMap.range_rangeRestrict]\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑(dualMap (Submodule.subtype (range f)))\n⊢ Function.Surjective ↑(rangeRestrict f)\n[PROOFSTEP]\nrw [← LinearMap.range_eq_top, LinearMap.range_rangeRestrict]\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑(dualMap (Submodule.subtype (range f)))\nrr_surj : Function.Surjective ↑(rangeRestrict f)\n⊢ range (dualMap f) = dualAnnihilator (ker f)\n[PROOFSTEP]\nhave := range_dualMap_eq_dualAnnihilator_ker_of_surjective f.rangeRestrict rr_surj\n[GOAL]\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑(dualMap (Submodule.subtype (range f)))\nrr_surj : Function.Surjective ↑(rangeRestrict f)\nthis : range (dualMap (rangeRestrict f)) = dualAnnihilator (ker (rangeRestrict f))\n⊢ range (dualMap f) = dualAnnihilator (ker f)\n[PROOFSTEP]\nconvert this using 1\n  -- Porting note: broken dot notation lean4#1910\n[GOAL]\ncase h.e'_2\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑(dualMap (Submodule.subtype (range f)))\nrr_surj : Function.Surjective ↑(rangeRestrict f)\nthis : range (dualMap (rangeRestrict f)) = dualAnnihilator (ker (rangeRestrict f))\n⊢ range (dualMap f) = range (dualMap (rangeRestrict f))\n[PROOFSTEP]\nchange LinearMap.range ((Submodule.subtype <| LinearMap.range f).comp f.rangeRestrict).dualMap = _\n[GOAL]\ncase h.e'_2\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑(dualMap (Submodule.subtype (range f)))\nrr_surj : Function.Surjective ↑(rangeRestrict f)\nthis : range (dualMap (rangeRestrict f)) = dualAnnihilator (ker (rangeRestrict f))\n⊢ range (dualMap (comp (Submodule.subtype (range f)) (rangeRestrict f))) = range (dualMap (rangeRestrict f))\n[PROOFSTEP]\nrw [← LinearMap.dualMap_comp_dualMap, LinearMap.range_comp_of_range_eq_top]\n[GOAL]\ncase h.e'_2.hf\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑(dualMap (Submodule.subtype (range f)))\nrr_surj : Function.Surjective ↑(rangeRestrict f)\nthis : range (dualMap (rangeRestrict f)) = dualAnnihilator (ker (rangeRestrict f))\n⊢ range (dualMap (Submodule.subtype (range f))) = ⊤\n[PROOFSTEP]\nrwa [LinearMap.range_eq_top]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑(dualMap (Submodule.subtype (range f)))\nrr_surj : Function.Surjective ↑(rangeRestrict f)\nthis : range (dualMap (rangeRestrict f)) = dualAnnihilator (ker (rangeRestrict f))\n⊢ dualAnnihilator (ker f) = dualAnnihilator (ker (rangeRestrict f))\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h.e'_3.h\nR : Type u_1\nM : Type u_2\nM' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nhf : Function.Surjective ↑(dualMap (Submodule.subtype (range f)))\nrr_surj : Function.Surjective ↑(rangeRestrict f)\nthis : range (dualMap (rangeRestrict f)) = dualAnnihilator (ker (rangeRestrict f))\n⊢ ker f = ker (rangeRestrict f)\n[PROOFSTEP]\nexact (LinearMap.ker_rangeRestrict f).symm\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nf : V₁ →ₗ[K] V₂\nhf : Function.Injective ↑f\n⊢ Function.Surjective ↑(dualMap f)\n[PROOFSTEP]\nintro φ\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nf : V₁ →ₗ[K] V₂\nhf : Function.Injective ↑f\nφ : Dual K V₁\n⊢ ∃ a, ↑(dualMap f) a = φ\n[PROOFSTEP]\nlet f' := LinearEquiv.ofInjective f hf\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nf : V₁ →ₗ[K] V₂\nhf : Function.Injective ↑f\nφ : Dual K V₁\nf' : V₁ ≃ₗ[K] { x // x ∈ range f } := LinearEquiv.ofInjective f hf\n⊢ ∃ a, ↑(dualMap f) a = φ\n[PROOFSTEP]\nuse Subspace.dualLift (range f) (f'.symm.dualMap φ)\n[GOAL]\ncase h\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nf : V₁ →ₗ[K] V₂\nhf : Function.Injective ↑f\nφ : Dual K V₁\nf' : V₁ ≃ₗ[K] { x // x ∈ range f } := LinearEquiv.ofInjective f hf\n⊢ ↑(dualMap f) (↑(Subspace.dualLift (range f)) (↑(LinearEquiv.dualMap (LinearEquiv.symm f')) φ)) = φ\n[PROOFSTEP]\next x\n[GOAL]\ncase h.h\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nf : V₁ →ₗ[K] V₂\nhf : Function.Injective ↑f\nφ : Dual K V₁\nf' : V₁ ≃ₗ[K] { x // x ∈ range f } := LinearEquiv.ofInjective f hf\nx : V₁\n⊢ ↑(↑(dualMap f) (↑(Subspace.dualLift (range f)) (↑(LinearEquiv.dualMap (LinearEquiv.symm f')) φ))) x = ↑φ x\n[PROOFSTEP]\nrw [LinearMap.dualMap_apply, Subspace.dualLift_of_mem (mem_range_self f x), LinearEquiv.dualMap_apply]\n[GOAL]\ncase h.h\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nf : V₁ →ₗ[K] V₂\nhf : Function.Injective ↑f\nφ : Dual K V₁\nf' : V₁ ≃ₗ[K] { x // x ∈ range f } := LinearEquiv.ofInjective f hf\nx : V₁\n⊢ ↑φ (↑(LinearEquiv.symm f') { val := ↑f x, property := (_ : ↑f x ∈ range f) }) = ↑φ x\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.h.h.e_6.h\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nf : V₁ →ₗ[K] V₂\nhf : Function.Injective ↑f\nφ : Dual K V₁\nf' : V₁ ≃ₗ[K] { x // x ∈ range f } := LinearEquiv.ofInjective f hf\nx : V₁\n⊢ ↑(LinearEquiv.symm f') { val := ↑f x, property := (_ : ↑f x ∈ range f) } = x\n[PROOFSTEP]\nexact LinearEquiv.symm_apply_apply f' x\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nf : V₁ →ₗ[K] V₂\n⊢ Function.Surjective ↑(dualMap f) ↔ Function.Injective ↑f\n[PROOFSTEP]\nrw [← LinearMap.range_eq_top, range_dualMap_eq_dualAnnihilator_ker, ← Submodule.dualAnnihilator_bot,\n  Subspace.dualAnnihilator_inj, LinearMap.ker_eq_bot]\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\n⊢ Submodule.dualPairing W = ↑(quotAnnihilatorEquiv W)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.h\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\nx✝¹ : Dual K V₁\nx✝ : { x // x ∈ W }\n⊢ ↑(↑(LinearMap.comp (Submodule.dualPairing W) (mkQ (dualAnnihilator W))) x✝¹) x✝ =\n    ↑(↑(LinearMap.comp (↑(quotAnnihilatorEquiv W)) (mkQ (dualAnnihilator W))) x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\n⊢ LinearMap.Nondegenerate (Submodule.dualPairing W)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\n⊢ LinearMap.SeparatingLeft (Submodule.dualPairing W)\n[PROOFSTEP]\nrw [LinearMap.separatingLeft_iff_ker_eq_bot, dualPairing_eq]\n[GOAL]\ncase left\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\n⊢ LinearMap.ker ↑(quotAnnihilatorEquiv W) = ⊥\n[PROOFSTEP]\napply LinearEquiv.ker\n[GOAL]\ncase right\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\n⊢ LinearMap.SeparatingRight (Submodule.dualPairing W)\n[PROOFSTEP]\nintro x h\n[GOAL]\ncase right\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\nx : { x // x ∈ W }\nh : ∀ (x_1 : Dual K V₁ ⧸ dualAnnihilator W), ↑(↑(Submodule.dualPairing W) x_1) x = 0\n⊢ x = 0\n[PROOFSTEP]\nrw [← forall_dual_apply_eq_zero_iff K x]\n[GOAL]\ncase right\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\nx : { x // x ∈ W }\nh : ∀ (x_1 : Dual K V₁ ⧸ dualAnnihilator W), ↑(↑(Submodule.dualPairing W) x_1) x = 0\n⊢ ∀ (φ : Dual K { x // x ∈ W }), ↑φ x = 0\n[PROOFSTEP]\nintro φ\n[GOAL]\ncase right\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\nx : { x // x ∈ W }\nh : ∀ (x_1 : Dual K V₁ ⧸ dualAnnihilator W), ↑(↑(Submodule.dualPairing W) x_1) x = 0\nφ : Dual K { x // x ∈ W }\n⊢ ↑φ x = 0\n[PROOFSTEP]\nsimpa only [Submodule.dualPairing_apply, dualLift_of_subtype] using h (Submodule.Quotient.mk (W.dualLift φ))\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\n⊢ LinearMap.Nondegenerate (dualCopairing W)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\n⊢ LinearMap.SeparatingLeft (dualCopairing W)\n[PROOFSTEP]\nrw [LinearMap.separatingLeft_iff_ker_eq_bot, dualCopairing_eq]\n[GOAL]\ncase left\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\n⊢ LinearMap.ker ↑(LinearEquiv.symm (dualQuotEquivDualAnnihilator W)) = ⊥\n[PROOFSTEP]\napply LinearEquiv.ker\n[GOAL]\ncase right\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\n⊢ LinearMap.SeparatingRight (dualCopairing W)\n[PROOFSTEP]\nrintro ⟨x⟩\n[GOAL]\ncase right.mk\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\ny✝ : V₁ ⧸ W\nx : V₁\n⊢ (∀ (x_1 : { x // x ∈ dualAnnihilator W }), ↑(↑(dualCopairing W) x_1) (Quot.mk Setoid.r x) = 0) →\n    Quot.mk Setoid.r x = 0\n[PROOFSTEP]\nsimp only [Quotient.quot_mk_eq_mk, dualCopairing_apply, Quotient.mk_eq_zero]\n[GOAL]\ncase right.mk\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\ny✝ : V₁ ⧸ W\nx : V₁\n⊢ (∀ (x_1 : { x // x ∈ dualAnnihilator W }), ↑x_1 x = 0) → x ∈ W\n[PROOFSTEP]\nrw [← forall_mem_dualAnnihilator_apply_eq_zero_iff, SetLike.forall]\n[GOAL]\ncase right.mk\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : Subspace K V₁\ny✝ : V₁ ⧸ W\nx : V₁\n⊢ (∀ (x_1 : Dual K V₁) (h : x_1 ∈ dualAnnihilator W), ↑{ val := x_1, property := h } x = 0) →\n    ∀ (φ : Dual K V₁), φ ∈ dualAnnihilator W → ↑φ x = 0\n[PROOFSTEP]\nexact id\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\n⊢ dualAnnihilator (W ⊓ W') = dualAnnihilator W ⊔ dualAnnihilator W'\n[PROOFSTEP]\nrefine' le_antisymm _ (sup_dualAnnihilator_le_inf W W')\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\n⊢ dualAnnihilator (W ⊓ W') ≤ dualAnnihilator W ⊔ dualAnnihilator W'\n[PROOFSTEP]\nlet F : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' :=\n  (Submodule.mkQ W).prod\n    (Submodule.mkQ W')\n      -- Porting note: broken dot notation lean4#1910 LinearMap.ker\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nF : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' := LinearMap.prod (mkQ W) (mkQ W')\n⊢ dualAnnihilator (W ⊓ W') ≤ dualAnnihilator W ⊔ dualAnnihilator W'\n[PROOFSTEP]\nhave : LinearMap.ker F = W ⊓ W' := by simp only [LinearMap.ker_prod, ker_mkQ]\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nF : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' := LinearMap.prod (mkQ W) (mkQ W')\n⊢ LinearMap.ker F = W ⊓ W'\n[PROOFSTEP]\nsimp only [LinearMap.ker_prod, ker_mkQ]\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nF : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' := LinearMap.prod (mkQ W) (mkQ W')\nthis : LinearMap.ker F = W ⊓ W'\n⊢ dualAnnihilator (W ⊓ W') ≤ dualAnnihilator W ⊔ dualAnnihilator W'\n[PROOFSTEP]\nrw [← this, ← LinearMap.range_dualMap_eq_dualAnnihilator_ker]\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nF : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' := LinearMap.prod (mkQ W) (mkQ W')\nthis : LinearMap.ker F = W ⊓ W'\n⊢ LinearMap.range (LinearMap.dualMap F) ≤ dualAnnihilator W ⊔ dualAnnihilator W'\n[PROOFSTEP]\nintro φ\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nF : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' := LinearMap.prod (mkQ W) (mkQ W')\nthis : LinearMap.ker F = W ⊓ W'\nφ : Dual K V₁\n⊢ φ ∈ LinearMap.range (LinearMap.dualMap F) → φ ∈ dualAnnihilator W ⊔ dualAnnihilator W'\n[PROOFSTEP]\nrw [LinearMap.mem_range]\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nF : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' := LinearMap.prod (mkQ W) (mkQ W')\nthis : LinearMap.ker F = W ⊓ W'\nφ : Dual K V₁\n⊢ (∃ y, ↑(LinearMap.dualMap F) y = φ) → φ ∈ dualAnnihilator W ⊔ dualAnnihilator W'\n[PROOFSTEP]\nrintro ⟨x, rfl⟩\n[GOAL]\ncase intro\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nF : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' := LinearMap.prod (mkQ W) (mkQ W')\nthis : LinearMap.ker F = W ⊓ W'\nx : Dual K ((V₁ ⧸ W) × V₁ ⧸ W')\n⊢ ↑(LinearMap.dualMap F) x ∈ dualAnnihilator W ⊔ dualAnnihilator W'\n[PROOFSTEP]\nrw [Submodule.mem_sup]\n[GOAL]\ncase intro\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nF : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' := LinearMap.prod (mkQ W) (mkQ W')\nthis : LinearMap.ker F = W ⊓ W'\nx : Dual K ((V₁ ⧸ W) × V₁ ⧸ W')\n⊢ ∃ y, y ∈ dualAnnihilator W ∧ ∃ z, z ∈ dualAnnihilator W' ∧ y + z = ↑(LinearMap.dualMap F) x\n[PROOFSTEP]\nobtain ⟨⟨a, b⟩, rfl⟩ := (dualProdDualEquivDual K (V₁ ⧸ W) (V₁ ⧸ W')).surjective x\n[GOAL]\ncase intro.intro.mk\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nF : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' := LinearMap.prod (mkQ W) (mkQ W')\nthis : LinearMap.ker F = W ⊓ W'\na : Dual K (V₁ ⧸ W)\nb : Dual K (V₁ ⧸ W')\n⊢ ∃ y,\n    y ∈ dualAnnihilator W ∧\n      ∃ z,\n        z ∈ dualAnnihilator W' ∧ y + z = ↑(LinearMap.dualMap F) (↑(dualProdDualEquivDual K (V₁ ⧸ W) (V₁ ⧸ W')) (a, b))\n[PROOFSTEP]\nobtain ⟨a', rfl⟩ := (dualQuotEquivDualAnnihilator W).symm.surjective a\n[GOAL]\ncase intro.intro.mk.intro\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nF : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' := LinearMap.prod (mkQ W) (mkQ W')\nthis : LinearMap.ker F = W ⊓ W'\nb : Dual K (V₁ ⧸ W')\na' : { x // x ∈ dualAnnihilator W }\n⊢ ∃ y,\n    y ∈ dualAnnihilator W ∧\n      ∃ z,\n        z ∈ dualAnnihilator W' ∧\n          y + z =\n            ↑(LinearMap.dualMap F)\n              (↑(dualProdDualEquivDual K (V₁ ⧸ W) (V₁ ⧸ W'))\n                (↑(LinearEquiv.symm (dualQuotEquivDualAnnihilator W)) a', b))\n[PROOFSTEP]\nobtain ⟨b', rfl⟩ := (dualQuotEquivDualAnnihilator W').symm.surjective b\n[GOAL]\ncase intro.intro.mk.intro.intro\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nF : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' := LinearMap.prod (mkQ W) (mkQ W')\nthis : LinearMap.ker F = W ⊓ W'\na' : { x // x ∈ dualAnnihilator W }\nb' : { x // x ∈ dualAnnihilator W' }\n⊢ ∃ y,\n    y ∈ dualAnnihilator W ∧\n      ∃ z,\n        z ∈ dualAnnihilator W' ∧\n          y + z =\n            ↑(LinearMap.dualMap F)\n              (↑(dualProdDualEquivDual K (V₁ ⧸ W) (V₁ ⧸ W'))\n                (↑(LinearEquiv.symm (dualQuotEquivDualAnnihilator W)) a',\n                  ↑(LinearEquiv.symm (dualQuotEquivDualAnnihilator W')) b'))\n[PROOFSTEP]\nuse a', a'.property, b', b'.property\n[GOAL]\ncase right\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nF : V₁ →ₗ[K] (V₁ ⧸ W) × V₁ ⧸ W' := LinearMap.prod (mkQ W) (mkQ W')\nthis : LinearMap.ker F = W ⊓ W'\na' : { x // x ∈ dualAnnihilator W }\nb' : { x // x ∈ dualAnnihilator W' }\n⊢ ↑a' + ↑b' =\n    ↑(LinearMap.dualMap F)\n      (↑(dualProdDualEquivDual K (V₁ ⧸ W) (V₁ ⧸ W'))\n        (↑(LinearEquiv.symm (dualQuotEquivDualAnnihilator W)) a',\n          ↑(LinearEquiv.symm (dualQuotEquivDualAnnihilator W')) b'))\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\nι : Type u_1\ninst✝ : _root_.Finite ι\nW : ι → Subspace K V₁\n⊢ dualAnnihilator (⨅ (i : ι), W i) = ⨆ (i : ι), dualAnnihilator (W i)\n[PROOFSTEP]\nrevert ι\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\n⊢ ∀ {ι : Type u_1} [inst : _root_.Finite ι] (W : ι → Subspace K V₁),\n    dualAnnihilator (⨅ (i : ι), W i) = ⨆ (i : ι), dualAnnihilator (W i)\n[PROOFSTEP]\nrefine' @Finite.induction_empty_option _ _ _ _\n[GOAL]\ncase refine'_1\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\n⊢ ∀ {α β : Type u_1},\n    α ≃ β →\n      (∀ (W : α → Subspace K V₁), dualAnnihilator (⨅ (i : α), W i) = ⨆ (i : α), dualAnnihilator (W i)) →\n        ∀ (W : β → Subspace K V₁), dualAnnihilator (⨅ (i : β), W i) = ⨆ (i : β), dualAnnihilator (W i)\n[PROOFSTEP]\nintro α β h hyp W\n[GOAL]\ncase refine'_1\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nα β : Type u_1\nh : α ≃ β\nhyp : ∀ (W : α → Subspace K V₁), dualAnnihilator (⨅ (i : α), W i) = ⨆ (i : α), dualAnnihilator (W i)\nW : β → Subspace K V₁\n⊢ dualAnnihilator (⨅ (i : β), W i) = ⨆ (i : β), dualAnnihilator (W i)\n[PROOFSTEP]\nrw [← h.iInf_comp, hyp _, ← h.iSup_comp]\n[GOAL]\ncase refine'_2\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\n⊢ ∀ (W : PEmpty → Subspace K V₁), dualAnnihilator (⨅ (i : PEmpty), W i) = ⨆ (i : PEmpty), dualAnnihilator (W i)\n[PROOFSTEP]\nintro W\n[GOAL]\ncase refine'_2\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW : PEmpty → Subspace K V₁\n⊢ dualAnnihilator (⨅ (i : PEmpty), W i) = ⨆ (i : PEmpty), dualAnnihilator (W i)\n[PROOFSTEP]\nrw [iSup_of_empty', iInf_of_empty', sInf_empty, sSup_empty, dualAnnihilator_top]\n[GOAL]\ncase refine'_3\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\n⊢ ∀ {α : Type u_1} [inst : Fintype α],\n    (∀ (W : α → Subspace K V₁), dualAnnihilator (⨅ (i : α), W i) = ⨆ (i : α), dualAnnihilator (W i)) →\n      ∀ (W : Option α → Subspace K V₁),\n        dualAnnihilator (⨅ (i : Option α), W i) = ⨆ (i : Option α), dualAnnihilator (W i)\n[PROOFSTEP]\nintro α _ h W\n[GOAL]\ncase refine'_3\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\nα : Type u_1\ninst✝ : Fintype α\nh : ∀ (W : α → Subspace K V₁), dualAnnihilator (⨅ (i : α), W i) = ⨆ (i : α), dualAnnihilator (W i)\nW : Option α → Subspace K V₁\n⊢ dualAnnihilator (⨅ (i : Option α), W i) = ⨆ (i : Option α), dualAnnihilator (W i)\n[PROOFSTEP]\nrw [iInf_option, iSup_option, dualAnnihilator_inf_eq, h]\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nh : IsCompl W W'\n⊢ IsCompl (dualAnnihilator W) (dualAnnihilator W')\n[PROOFSTEP]\nrw [isCompl_iff, disjoint_iff, codisjoint_iff] at h ⊢\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nh : W ⊓ W' = ⊥ ∧ W ⊔ W' = ⊤\n⊢ dualAnnihilator W ⊓ dualAnnihilator W' = ⊥ ∧ dualAnnihilator W ⊔ dualAnnihilator W' = ⊤\n[PROOFSTEP]\nrw [← dualAnnihilator_inf_eq, ← dualAnnihilator_sup_eq, h.1, h.2, dualAnnihilator_top, dualAnnihilator_bot]\n[GOAL]\nK : Type u\ninst✝⁴ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝³ : AddCommGroup V₁\ninst✝² : Module K V₁\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nW W' : Subspace K V₁\nh : W ⊓ W' = ⊥ ∧ W ⊔ W' = ⊤\n⊢ ⊥ = ⊥ ∧ ⊤ = ⊤\n[PROOFSTEP]\nexact ⟨rfl, rfl⟩\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\n⊢ finrank K { x // x ∈ range (dualMap f) } = finrank K { x // x ∈ range f }\n[PROOFSTEP]\nhave that :=\n  Submodule.finrank_quotient_add_finrank\n    (LinearMap.range f)\n      -- Porting note: Again LinearEquiv.finrank_eq needs help\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nthat : finrank K (V₂ ⧸ range f) + finrank K { x // x ∈ range f } = finrank K V₂\n⊢ finrank K { x // x ∈ range (dualMap f) } = finrank K { x // x ∈ range f }\n[PROOFSTEP]\nlet equiv := (Subspace.quotEquivAnnihilator <| LinearMap.range f)\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nthat : finrank K (V₂ ⧸ range f) + finrank K { x // x ∈ range f } = finrank K V₂\nequiv : (V₂ ⧸ range f) ≃ₗ[K] { x // x ∈ Submodule.dualAnnihilator (range f) } := Subspace.quotEquivAnnihilator (range f)\n⊢ finrank K { x // x ∈ range (dualMap f) } = finrank K { x // x ∈ range f }\n[PROOFSTEP]\nhave eq :=\n  LinearEquiv.finrank_eq (R := K) (M := (V₂ ⧸ range f)) (M₂ := { x // x ∈ Submodule.dualAnnihilator (range f) }) equiv\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nthat : finrank K (V₂ ⧸ range f) + finrank K { x // x ∈ range f } = finrank K V₂\nequiv : (V₂ ⧸ range f) ≃ₗ[K] { x // x ∈ Submodule.dualAnnihilator (range f) } := Subspace.quotEquivAnnihilator (range f)\neq : finrank K (V₂ ⧸ range f) = finrank K { x // x ∈ Submodule.dualAnnihilator (range f) }\n⊢ finrank K { x // x ∈ range (dualMap f) } = finrank K { x // x ∈ range f }\n[PROOFSTEP]\nrw [eq, ← ker_dualMap_eq_dualAnnihilator_range] at that \n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nthat : finrank K { x // x ∈ ker (dualMap f) } + finrank K { x // x ∈ range f } = finrank K V₂\nequiv : (V₂ ⧸ range f) ≃ₗ[K] { x // x ∈ Submodule.dualAnnihilator (range f) } := Subspace.quotEquivAnnihilator (range f)\neq : finrank K (V₂ ⧸ range f) = finrank K { x // x ∈ Submodule.dualAnnihilator (range f) }\n⊢ finrank K { x // x ∈ range (dualMap f) } = finrank K { x // x ∈ range f }\n[PROOFSTEP]\nconv_rhs at that => rw [← Subspace.dual_finrank_eq]\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nthat : finrank K { x // x ∈ ker (dualMap f) } + finrank K { x // x ∈ range f } = finrank K V₂\nequiv : (V₂ ⧸ range f) ≃ₗ[K] { x // x ∈ Submodule.dualAnnihilator (range f) } := Subspace.quotEquivAnnihilator (range f)\neq : finrank K (V₂ ⧸ range f) = finrank K { x // x ∈ Submodule.dualAnnihilator (range f) }\n| finrank K V₂\n[PROOFSTEP]\nrw [← Subspace.dual_finrank_eq]\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nthat : finrank K { x // x ∈ ker (dualMap f) } + finrank K { x // x ∈ range f } = finrank K V₂\nequiv : (V₂ ⧸ range f) ≃ₗ[K] { x // x ∈ Submodule.dualAnnihilator (range f) } := Subspace.quotEquivAnnihilator (range f)\neq : finrank K (V₂ ⧸ range f) = finrank K { x // x ∈ Submodule.dualAnnihilator (range f) }\n| finrank K V₂\n[PROOFSTEP]\nrw [← Subspace.dual_finrank_eq]\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nthat : finrank K { x // x ∈ ker (dualMap f) } + finrank K { x // x ∈ range f } = finrank K V₂\nequiv : (V₂ ⧸ range f) ≃ₗ[K] { x // x ∈ Submodule.dualAnnihilator (range f) } := Subspace.quotEquivAnnihilator (range f)\neq : finrank K (V₂ ⧸ range f) = finrank K { x // x ∈ Submodule.dualAnnihilator (range f) }\n| finrank K V₂\n[PROOFSTEP]\nrw [← Subspace.dual_finrank_eq]\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nthat : finrank K { x // x ∈ ker (dualMap f) } + finrank K { x // x ∈ range f } = finrank K (Dual K V₂)\nequiv : (V₂ ⧸ range f) ≃ₗ[K] { x // x ∈ Submodule.dualAnnihilator (range f) } := Subspace.quotEquivAnnihilator (range f)\neq : finrank K (V₂ ⧸ range f) = finrank K { x // x ∈ Submodule.dualAnnihilator (range f) }\n⊢ finrank K { x // x ∈ range (dualMap f) } = finrank K { x // x ∈ range f }\n[PROOFSTEP]\nrefine' add_left_injective (finrank K <| LinearMap.ker f.dualMap) _\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nthat : finrank K { x // x ∈ ker (dualMap f) } + finrank K { x // x ∈ range f } = finrank K (Dual K V₂)\nequiv : (V₂ ⧸ range f) ≃ₗ[K] { x // x ∈ Submodule.dualAnnihilator (range f) } := Subspace.quotEquivAnnihilator (range f)\neq : finrank K (V₂ ⧸ range f) = finrank K { x // x ∈ Submodule.dualAnnihilator (range f) }\n⊢ (fun x => x + finrank K { x // x ∈ ker (dualMap f) }) (finrank K { x // x ∈ range (dualMap f) }) =\n    (fun x => x + finrank K { x // x ∈ ker (dualMap f) }) (finrank K { x // x ∈ range f })\n[PROOFSTEP]\nchange _ + _ = _ + _\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nthat : finrank K { x // x ∈ ker (dualMap f) } + finrank K { x // x ∈ range f } = finrank K (Dual K V₂)\nequiv : (V₂ ⧸ range f) ≃ₗ[K] { x // x ∈ Submodule.dualAnnihilator (range f) } := Subspace.quotEquivAnnihilator (range f)\neq : finrank K (V₂ ⧸ range f) = finrank K { x // x ∈ Submodule.dualAnnihilator (range f) }\n⊢ finrank K { x // x ∈ range (dualMap f) } + finrank K { x // x ∈ ker (dualMap f) } =\n    finrank K { x // x ∈ range f } + finrank K { x // x ∈ ker (dualMap f) }\n[PROOFSTEP]\nrw [finrank_range_add_finrank_ker f.dualMap, add_comm, that]\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\n⊢ Function.Injective ↑(dualMap f) ↔ Function.Surjective ↑f\n[PROOFSTEP]\nrefine' ⟨_, fun h => dualMap_injective_of_surjective h⟩\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\n⊢ Function.Injective ↑(dualMap f) → Function.Surjective ↑f\n[PROOFSTEP]\nrw [← range_eq_top, ← ker_eq_bot]\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\n⊢ ker (dualMap f) = ⊥ → range f = ⊤\n[PROOFSTEP]\nintro h\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nh : ker (dualMap f) = ⊥\n⊢ range f = ⊤\n[PROOFSTEP]\napply Submodule.eq_top_of_finrank_eq\n[GOAL]\ncase h\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nh : ker (dualMap f) = ⊥\n⊢ finrank K { x // x ∈ range f } = finrank K V₂\n[PROOFSTEP]\nrw [← finrank_eq_zero] at h \n[GOAL]\ncase h\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\nh : finrank K { x // x ∈ ker (dualMap f) } = 0\n⊢ finrank K { x // x ∈ range f } = finrank K V₂\n[PROOFSTEP]\nrw [← add_zero (FiniteDimensional.finrank K <| LinearMap.range f), ← h, ←\n  LinearMap.finrank_range_dualMap_eq_finrank_range, LinearMap.finrank_range_add_finrank_ker, Subspace.dual_finrank_eq]\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\nV₁ : Type v'\nV₂ : Type v''\ninst✝⁴ : AddCommGroup V₁\ninst✝³ : Module K V₁\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : FiniteDimensional K V₂\nf : V₁ →ₗ[K] V₂\n⊢ Function.Bijective ↑(dualMap f) ↔ Function.Bijective ↑f\n[PROOFSTEP]\nsimp_rw [Function.Bijective, dualMap_surjective_iff, dualMap_injective_iff, and_comm]\n[GOAL]\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\nf : Dual R (M ⊗[R] N)\n⊢ ↑(dualDistribInvOfBasis b c) f =\n    ∑ i : ι, ∑ j : κ, ↑f (↑b i ⊗ₜ[R] ↑c j) • ↑(Basis.dualBasis b) i ⊗ₜ[R] ↑(Basis.dualBasis c) j\n[PROOFSTEP]\nsimp [dualDistribInvOfBasis]\n[GOAL]\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\n⊢ comp (dualDistrib R M N) (dualDistribInvOfBasis b c) = LinearMap.id\n[PROOFSTEP]\napply (b.tensorProduct c).dualBasis.ext\n[GOAL]\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\n⊢ ∀ (i : ι × κ),\n    ↑(comp (dualDistrib R M N) (dualDistribInvOfBasis b c)) (↑(Basis.dualBasis (Basis.tensorProduct b c)) i) =\n      ↑LinearMap.id (↑(Basis.dualBasis (Basis.tensorProduct b c)) i)\n[PROOFSTEP]\nrintro ⟨i, j⟩\n[GOAL]\ncase mk\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ↑(comp (dualDistrib R M N) (dualDistribInvOfBasis b c)) (↑(Basis.dualBasis (Basis.tensorProduct b c)) (i, j)) =\n    ↑LinearMap.id (↑(Basis.dualBasis (Basis.tensorProduct b c)) (i, j))\n[PROOFSTEP]\napply (b.tensorProduct c).ext\n[GOAL]\ncase mk\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ∀ (i_1 : ι × κ),\n    ↑(↑(comp (dualDistrib R M N) (dualDistribInvOfBasis b c)) (↑(Basis.dualBasis (Basis.tensorProduct b c)) (i, j)))\n        (↑(Basis.tensorProduct b c) i_1) =\n      ↑(↑LinearMap.id (↑(Basis.dualBasis (Basis.tensorProduct b c)) (i, j))) (↑(Basis.tensorProduct b c) i_1)\n[PROOFSTEP]\nrintro ⟨i', j'⟩\n[GOAL]\ncase mk.mk\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ↑(↑(comp (dualDistrib R M N) (dualDistribInvOfBasis b c)) (↑(Basis.dualBasis (Basis.tensorProduct b c)) (i, j)))\n      (↑(Basis.tensorProduct b c) (i', j')) =\n    ↑(↑LinearMap.id (↑(Basis.dualBasis (Basis.tensorProduct b c)) (i, j))) (↑(Basis.tensorProduct b c) (i', j'))\n[PROOFSTEP]\nsimp only [dualDistrib, Basis.coe_dualBasis, coe_comp, Function.comp_apply, dualDistribInvOfBasis_apply,\n  Basis.coord_apply, Basis.tensorProduct_repr_tmul_apply, Basis.repr_self, ne_eq, LinearMap.map_sum, map_smul,\n  homTensorHomMap_apply, compRight_apply, Basis.tensorProduct_apply, coeFn_sum, Finset.sum_apply, smul_apply,\n  LinearEquiv.coe_coe, map_tmul, lid_tmul, smul_eq_mul, id_coe, id_eq]\n[GOAL]\ncase mk.mk\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ∑ x : ι,\n      ∑ x_1 : κ,\n        ↑(Finsupp.single x 1) i * ↑(Finsupp.single x_1 1) j * (↑(Finsupp.single i' 1) x * ↑(Finsupp.single j' 1) x_1) =\n    ↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) j\n[PROOFSTEP]\nrw [Finset.sum_eq_single i, Finset.sum_eq_single j]\n[GOAL]\ncase mk.mk\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ↑(Finsupp.single i 1) i * ↑(Finsupp.single j 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) j) =\n    ↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) j\ncase mk.mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ∀ (b : κ),\n    b ∈ Finset.univ →\n      b ≠ j →\n        ↑(Finsupp.single i 1) i * ↑(Finsupp.single b 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) b) = 0\ncase mk.mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ¬j ∈ Finset.univ →\n    ↑(Finsupp.single i 1) i * ↑(Finsupp.single j 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) j) = 0\ncase mk.mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ∀ (b : ι),\n    b ∈ Finset.univ →\n      b ≠ i →\n        ∑ x : κ,\n            ↑(Finsupp.single b 1) i * ↑(Finsupp.single x 1) j * (↑(Finsupp.single i' 1) b * ↑(Finsupp.single j' 1) x) =\n          0\ncase mk.mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ¬i ∈ Finset.univ →\n    ∑ x : κ, ↑(Finsupp.single i 1) i * ↑(Finsupp.single x 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) x) =\n      0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ∀ (b : κ),\n    b ∈ Finset.univ →\n      b ≠ j →\n        ↑(Finsupp.single i 1) i * ↑(Finsupp.single b 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) b) = 0\ncase mk.mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ¬j ∈ Finset.univ →\n    ↑(Finsupp.single i 1) i * ↑(Finsupp.single j 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) j) = 0\ncase mk.mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ∀ (b : ι),\n    b ∈ Finset.univ →\n      b ≠ i →\n        ∑ x : κ,\n            ↑(Finsupp.single b 1) i * ↑(Finsupp.single x 1) j * (↑(Finsupp.single i' 1) b * ↑(Finsupp.single j' 1) x) =\n          0\ncase mk.mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ¬i ∈ Finset.univ →\n    ∑ x : κ, ↑(Finsupp.single i 1) i * ↑(Finsupp.single x 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) x) =\n      0\n[PROOFSTEP]\nall_goals {intros; simp [*] at *\n}\n-- Porting note: introduced to help with timeout in dualDistribEquivOfBasis\n[GOAL]\ncase mk.mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ∀ (b : κ),\n    b ∈ Finset.univ →\n      b ≠ j →\n        ↑(Finsupp.single i 1) i * ↑(Finsupp.single b 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) b) = 0\n[PROOFSTEP]\n{intros; simp [*] at *\n}\n-- Porting note: introduced to help with timeout in dualDistribEquivOfBasis\n[GOAL]\ncase mk.mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ∀ (b : κ),\n    b ∈ Finset.univ →\n      b ≠ j →\n        ↑(Finsupp.single i 1) i * ↑(Finsupp.single b 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) b) = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase mk.mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' b✝ : κ\na✝¹ : b✝ ∈ Finset.univ\na✝ : b✝ ≠ j\n⊢ ↑(Finsupp.single i 1) i * ↑(Finsupp.single b✝ 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) b✝) = 0\n[PROOFSTEP]\nsimp [*] at *\n[GOAL]\ncase mk.mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ¬j ∈ Finset.univ →\n    ↑(Finsupp.single i 1) i * ↑(Finsupp.single j 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) j) = 0\n[PROOFSTEP]\n{intros; simp [*] at *\n}\n-- Porting note: introduced to help with timeout in dualDistribEquivOfBasis\n[GOAL]\ncase mk.mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ¬j ∈ Finset.univ →\n    ↑(Finsupp.single i 1) i * ↑(Finsupp.single j 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) j) = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase mk.mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\na✝ : ¬j ∈ Finset.univ\n⊢ ↑(Finsupp.single i 1) i * ↑(Finsupp.single j 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) j) = 0\n[PROOFSTEP]\nsimp [*] at *\n[GOAL]\ncase mk.mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ∀ (b : ι),\n    b ∈ Finset.univ →\n      b ≠ i →\n        ∑ x : κ,\n            ↑(Finsupp.single b 1) i * ↑(Finsupp.single x 1) j * (↑(Finsupp.single i' 1) b * ↑(Finsupp.single j' 1) x) =\n          0\n[PROOFSTEP]\n{intros; simp [*] at *\n}\n-- Porting note: introduced to help with timeout in dualDistribEquivOfBasis\n[GOAL]\ncase mk.mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ∀ (b : ι),\n    b ∈ Finset.univ →\n      b ≠ i →\n        ∑ x : κ,\n            ↑(Finsupp.single b 1) i * ↑(Finsupp.single x 1) j * (↑(Finsupp.single i' 1) b * ↑(Finsupp.single j' 1) x) =\n          0\n[PROOFSTEP]\nintros\n[GOAL]\ncase mk.mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\nb✝ : ι\na✝¹ : b✝ ∈ Finset.univ\na✝ : b✝ ≠ i\n⊢ ∑ x : κ, ↑(Finsupp.single b✝ 1) i * ↑(Finsupp.single x 1) j * (↑(Finsupp.single i' 1) b✝ * ↑(Finsupp.single j' 1) x) =\n    0\n[PROOFSTEP]\nsimp [*] at *\n[GOAL]\ncase mk.mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ¬i ∈ Finset.univ →\n    ∑ x : κ, ↑(Finsupp.single i 1) i * ↑(Finsupp.single x 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) x) =\n      0\n[PROOFSTEP]\n{intros; simp [*] at *\n}\n-- Porting note: introduced to help with timeout in dualDistribEquivOfBasis\n[GOAL]\ncase mk.mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\n⊢ ¬i ∈ Finset.univ →\n    ∑ x : κ, ↑(Finsupp.single i 1) i * ↑(Finsupp.single x 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) x) =\n      0\n[PROOFSTEP]\nintros\n[GOAL]\ncase mk.mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\ni' : ι\nj' : κ\na✝ : ¬i ∈ Finset.univ\n⊢ ∑ x : κ, ↑(Finsupp.single i 1) i * ↑(Finsupp.single x 1) j * (↑(Finsupp.single i' 1) i * ↑(Finsupp.single j' 1) x) = 0\n[PROOFSTEP]\nsimp [*] at *\n[GOAL]\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\n⊢ comp (dualDistribInvOfBasis b c) (dualDistrib R M N) = LinearMap.id\n[PROOFSTEP]\napply (b.dualBasis.tensorProduct c.dualBasis).ext\n[GOAL]\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\n⊢ ∀ (i : ι × κ),\n    ↑(comp (dualDistribInvOfBasis b c) (dualDistrib R M N))\n        (↑(Basis.tensorProduct (Basis.dualBasis b) (Basis.dualBasis c)) i) =\n      ↑LinearMap.id (↑(Basis.tensorProduct (Basis.dualBasis b) (Basis.dualBasis c)) i)\n[PROOFSTEP]\nrintro ⟨i, j⟩\n[GOAL]\ncase mk\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ↑(comp (dualDistribInvOfBasis b c) (dualDistrib R M N))\n      (↑(Basis.tensorProduct (Basis.dualBasis b) (Basis.dualBasis c)) (i, j)) =\n    ↑LinearMap.id (↑(Basis.tensorProduct (Basis.dualBasis b) (Basis.dualBasis c)) (i, j))\n[PROOFSTEP]\nsimp only [Basis.tensorProduct_apply, Basis.coe_dualBasis, coe_comp, Function.comp_apply, dualDistribInvOfBasis_apply,\n  dualDistrib_apply, Basis.coord_apply, Basis.repr_self, ne_eq, id_coe, id_eq]\n[GOAL]\ncase mk\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ∑ x : ι, ∑ x_1 : κ, (↑(Finsupp.single x 1) i * ↑(Finsupp.single x_1 1) j) • Basis.coord b x ⊗ₜ[R] Basis.coord c x_1 =\n    Basis.coord b i ⊗ₜ[R] Basis.coord c j\n[PROOFSTEP]\nrw [Finset.sum_eq_single i, Finset.sum_eq_single j]\n[GOAL]\ncase mk\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ (↑(Finsupp.single i 1) i * ↑(Finsupp.single j 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c j =\n    Basis.coord b i ⊗ₜ[R] Basis.coord c j\ncase mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ∀ (b_1 : κ),\n    b_1 ∈ Finset.univ →\n      b_1 ≠ j → (↑(Finsupp.single i 1) i * ↑(Finsupp.single b_1 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c b_1 = 0\ncase mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ¬j ∈ Finset.univ → (↑(Finsupp.single i 1) i * ↑(Finsupp.single j 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c j = 0\ncase mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ∀ (b_1 : ι),\n    b_1 ∈ Finset.univ →\n      b_1 ≠ i →\n        ∑ x : κ, (↑(Finsupp.single b_1 1) i * ↑(Finsupp.single x 1) j) • Basis.coord b b_1 ⊗ₜ[R] Basis.coord c x = 0\ncase mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ¬i ∈ Finset.univ →\n    ∑ x : κ, (↑(Finsupp.single i 1) i * ↑(Finsupp.single x 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c x = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ∀ (b_1 : κ),\n    b_1 ∈ Finset.univ →\n      b_1 ≠ j → (↑(Finsupp.single i 1) i * ↑(Finsupp.single b_1 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c b_1 = 0\ncase mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ¬j ∈ Finset.univ → (↑(Finsupp.single i 1) i * ↑(Finsupp.single j 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c j = 0\ncase mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ∀ (b_1 : ι),\n    b_1 ∈ Finset.univ →\n      b_1 ≠ i →\n        ∑ x : κ, (↑(Finsupp.single b_1 1) i * ↑(Finsupp.single x 1) j) • Basis.coord b b_1 ⊗ₜ[R] Basis.coord c x = 0\ncase mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ¬i ∈ Finset.univ →\n    ∑ x : κ, (↑(Finsupp.single i 1) i * ↑(Finsupp.single x 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c x = 0\n[PROOFSTEP]\nall_goals {intros; simp [*] at *\n}\n[GOAL]\ncase mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ∀ (b_1 : κ),\n    b_1 ∈ Finset.univ →\n      b_1 ≠ j → (↑(Finsupp.single i 1) i * ↑(Finsupp.single b_1 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c b_1 = 0\n[PROOFSTEP]\n{intros; simp [*] at *\n}\n[GOAL]\ncase mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ∀ (b_1 : κ),\n    b_1 ∈ Finset.univ →\n      b_1 ≠ j → (↑(Finsupp.single i 1) i * ↑(Finsupp.single b_1 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c b_1 = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj b✝ : κ\na✝¹ : b✝ ∈ Finset.univ\na✝ : b✝ ≠ j\n⊢ (↑(Finsupp.single i 1) i * ↑(Finsupp.single b✝ 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c b✝ = 0\n[PROOFSTEP]\nsimp [*] at *\n[GOAL]\ncase mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ¬j ∈ Finset.univ → (↑(Finsupp.single i 1) i * ↑(Finsupp.single j 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c j = 0\n[PROOFSTEP]\n{intros; simp [*] at *\n}\n[GOAL]\ncase mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ¬j ∈ Finset.univ → (↑(Finsupp.single i 1) i * ↑(Finsupp.single j 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c j = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\na✝ : ¬j ∈ Finset.univ\n⊢ (↑(Finsupp.single i 1) i * ↑(Finsupp.single j 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c j = 0\n[PROOFSTEP]\nsimp [*] at *\n[GOAL]\ncase mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ∀ (b_1 : ι),\n    b_1 ∈ Finset.univ →\n      b_1 ≠ i →\n        ∑ x : κ, (↑(Finsupp.single b_1 1) i * ↑(Finsupp.single x 1) j) • Basis.coord b b_1 ⊗ₜ[R] Basis.coord c x = 0\n[PROOFSTEP]\n{intros; simp [*] at *\n}\n[GOAL]\ncase mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ∀ (b_1 : ι),\n    b_1 ∈ Finset.univ →\n      b_1 ≠ i →\n        ∑ x : κ, (↑(Finsupp.single b_1 1) i * ↑(Finsupp.single x 1) j) • Basis.coord b b_1 ⊗ₜ[R] Basis.coord c x = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase mk.h₀\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\nb✝ : ι\na✝¹ : b✝ ∈ Finset.univ\na✝ : b✝ ≠ i\n⊢ ∑ x : κ, (↑(Finsupp.single b✝ 1) i * ↑(Finsupp.single x 1) j) • Basis.coord b b✝ ⊗ₜ[R] Basis.coord c x = 0\n[PROOFSTEP]\nsimp [*] at *\n[GOAL]\ncase mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ¬i ∈ Finset.univ →\n    ∑ x : κ, (↑(Finsupp.single i 1) i * ↑(Finsupp.single x 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c x = 0\n[PROOFSTEP]\n{intros; simp [*] at *\n}\n[GOAL]\ncase mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\n⊢ ¬i ∈ Finset.univ →\n    ∑ x : κ, (↑(Finsupp.single i 1) i * ↑(Finsupp.single x 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c x = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase mk.h₁\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\ni : ι\nj : κ\na✝ : ¬i ∈ Finset.univ\n⊢ ∑ x : κ, (↑(Finsupp.single i 1) i * ↑(Finsupp.single x 1) j) • Basis.coord b i ⊗ₜ[R] Basis.coord c x = 0\n[PROOFSTEP]\nsimp [*] at *\n[GOAL]\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\n⊢ Dual R M ⊗[R] Dual R N ≃ₗ[R] Dual R (M ⊗[R] N)\n[PROOFSTEP]\nrefine' LinearEquiv.ofLinear (dualDistrib R M N) (dualDistribInvOfBasis b c) _ _\n[GOAL]\ncase refine'_1\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\n⊢ comp (dualDistrib R M N) (dualDistribInvOfBasis b c) = LinearMap.id\n[PROOFSTEP]\nexact dualDistrib_dualDistribInvOfBasis_left_inverse _ _\n[GOAL]\ncase refine'_2\nR : Type u_1\nA : Type u_2\nM : Type u_3\nN : Type u_4\nι : Type u_5\nκ : Type u_6\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : DecidableEq κ\ninst✝⁶ : Fintype ι\ninst✝⁵ : Fintype κ\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nb : Basis ι R M\nc : Basis κ R N\n⊢ comp (dualDistribInvOfBasis b c) (dualDistrib R M N) = LinearMap.id\n[PROOFSTEP]\nexact dualDistrib_dualDistribInvOfBasis_right_inverse _ _\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Dual", "llama_tokens": 76733, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583250334526, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.3939253116929671}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\ninst✝ : AddCommGroup β\nf : α → β\nx : α\n⊢ ↑(↑lift f) (of x) = f x\n[PROOFSTEP]\nconvert Abelianization.lift.of (FreeGroup.lift f (β := Multiplicative β)) (FreeGroup.of x) using 1\n[GOAL]\ncase h.e'_3.h\nα : Type u\nβ : Type v\ninst✝ : AddCommGroup β\nf : α → β\nx : α\ne_1✝ : (fun x => β) (of x) = (fun x => Multiplicative β) (↑Abelianization.of (FreeGroup.of x))\n⊢ f x = ↑(↑FreeGroup.lift f) (FreeGroup.of x)\n[PROOFSTEP]\nexact (FreeGroup.lift.of (β := Multiplicative β)).symm\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\ninst✝² : AddCommGroup β✝\nf✝ : α✝ → β✝\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : AddCommGroup β\ninst✝ : AddCommGroup γ\na : FreeAbelianGroup α\nf : α → β\ng : β →+ γ\n⊢ ↑g (↑(↑lift f) a) = ↑(↑lift (↑g ∘ f)) a\n[PROOFSTEP]\nshow (g.comp (lift f)) a = lift (g ∘ f) a\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\ninst✝² : AddCommGroup β✝\nf✝ : α✝ → β✝\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : AddCommGroup β\ninst✝ : AddCommGroup γ\na : FreeAbelianGroup α\nf : α → β\ng : β →+ γ\n⊢ ↑(AddMonoidHom.comp g (↑lift f)) a = ↑(↑lift (↑g ∘ f)) a\n[PROOFSTEP]\napply lift.unique\n[GOAL]\ncase hg\nα✝ : Type u\nβ✝ : Type v\ninst✝² : AddCommGroup β✝\nf✝ : α✝ → β✝\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : AddCommGroup β\ninst✝ : AddCommGroup γ\na : FreeAbelianGroup α\nf : α → β\ng : β →+ γ\n⊢ ∀ (x : α), ↑(AddMonoidHom.comp g (↑lift f)) (of x) = (↑g ∘ f) x\n[PROOFSTEP]\nintro a\n[GOAL]\ncase hg\nα✝ : Type u\nβ✝ : Type v\ninst✝² : AddCommGroup β✝\nf✝ : α✝ → β✝\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : AddCommGroup β\ninst✝ : AddCommGroup γ\na✝ : FreeAbelianGroup α\nf : α → β\ng : β →+ γ\na : α\n⊢ ↑(AddMonoidHom.comp g (↑lift f)) (of a) = (↑g ∘ f) a\n[PROOFSTEP]\nshow g ((lift f) (of a)) = g (f a)\n[GOAL]\ncase hg\nα✝ : Type u\nβ✝ : Type v\ninst✝² : AddCommGroup β✝\nf✝ : α✝ → β✝\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : AddCommGroup β\ninst✝ : AddCommGroup γ\na✝ : FreeAbelianGroup α\nf : α → β\ng : β →+ γ\na : α\n⊢ ↑g (↑(↑lift f) (of a)) = ↑g (f a)\n[PROOFSTEP]\nsimp only [(· ∘ ·), lift.of]\n[GOAL]\nα✝ : Type u\nα : Type u_1\nβ : Type u_2\ninst✝ : AddCommGroup β\na : FreeAbelianGroup α\nf g : α → β\n⊢ ↑(↑lift (f + g)) a = ↑(↑lift f) a + ↑(↑lift g) a\n[PROOFSTEP]\nrefine' FreeAbelianGroup.induction_on a _ _ _ _\n[GOAL]\ncase refine'_1\nα✝ : Type u\nα : Type u_1\nβ : Type u_2\ninst✝ : AddCommGroup β\na : FreeAbelianGroup α\nf g : α → β\n⊢ ↑(↑lift (f + g)) 0 = ↑(↑lift f) 0 + ↑(↑lift g) 0\n[PROOFSTEP]\nsimp only [(lift _).map_zero, zero_add]\n[GOAL]\ncase refine'_2\nα✝ : Type u\nα : Type u_1\nβ : Type u_2\ninst✝ : AddCommGroup β\na : FreeAbelianGroup α\nf g : α → β\n⊢ ∀ (x : α), ↑(↑lift (f + g)) (of x) = ↑(↑lift f) (of x) + ↑(↑lift g) (of x)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_2\nα✝ : Type u\nα : Type u_1\nβ : Type u_2\ninst✝ : AddCommGroup β\na : FreeAbelianGroup α\nf g : α → β\nx : α\n⊢ ↑(↑lift (f + g)) (of x) = ↑(↑lift f) (of x) + ↑(↑lift g) (of x)\n[PROOFSTEP]\nsimp only [lift.of, Pi.add_apply]\n[GOAL]\ncase refine'_3\nα✝ : Type u\nα : Type u_1\nβ : Type u_2\ninst✝ : AddCommGroup β\na : FreeAbelianGroup α\nf g : α → β\n⊢ ∀ (x : α),\n    ↑(↑lift (f + g)) (of x) = ↑(↑lift f) (of x) + ↑(↑lift g) (of x) →\n      ↑(↑lift (f + g)) (-of x) = ↑(↑lift f) (-of x) + ↑(↑lift g) (-of x)\n[PROOFSTEP]\nintro x _\n[GOAL]\ncase refine'_3\nα✝ : Type u\nα : Type u_1\nβ : Type u_2\ninst✝ : AddCommGroup β\na : FreeAbelianGroup α\nf g : α → β\nx : α\na✝ : ↑(↑lift (f + g)) (of x) = ↑(↑lift f) (of x) + ↑(↑lift g) (of x)\n⊢ ↑(↑lift (f + g)) (-of x) = ↑(↑lift f) (-of x) + ↑(↑lift g) (-of x)\n[PROOFSTEP]\nsimp only [map_neg, lift.of, Pi.add_apply, neg_add]\n[GOAL]\ncase refine'_4\nα✝ : Type u\nα : Type u_1\nβ : Type u_2\ninst✝ : AddCommGroup β\na : FreeAbelianGroup α\nf g : α → β\n⊢ ∀ (x y : FreeAbelianGroup α),\n    ↑(↑lift (f + g)) x = ↑(↑lift f) x + ↑(↑lift g) x →\n      ↑(↑lift (f + g)) y = ↑(↑lift f) y + ↑(↑lift g) y →\n        ↑(↑lift (f + g)) (x + y) = ↑(↑lift f) (x + y) + ↑(↑lift g) (x + y)\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase refine'_4\nα✝ : Type u\nα : Type u_1\nβ : Type u_2\ninst✝ : AddCommGroup β\na : FreeAbelianGroup α\nf g : α → β\nx y : FreeAbelianGroup α\nhx : ↑(↑lift (f + g)) x = ↑(↑lift f) x + ↑(↑lift g) x\nhy : ↑(↑lift (f + g)) y = ↑(↑lift f) y + ↑(↑lift g) y\n⊢ ↑(↑lift (f + g)) (x + y) = ↑(↑lift f) (x + y) + ↑(↑lift g) (x + y)\n[PROOFSTEP]\nsimp only [(lift _).map_add, hx, hy, add_add_add_comm]\n[GOAL]\nα β : Type u\nf : FreeAbelianGroup (α → β)\nx y : FreeAbelianGroup α\n⊢ ↑(↑lift fun x_1 => x_1 <$> (x + y)) f =\n    (fun x x_1 => Seq.seq x fun x => x_1) f x + (fun x x_1 => Seq.seq x fun x => x_1) f y\n[PROOFSTEP]\nsimp only [FreeAbelianGroup.map_add]\n[GOAL]\nα β : Type u\nf : FreeAbelianGroup (α → β)\nx y : FreeAbelianGroup α\n⊢ ↑(↑lift fun x_1 => x_1 <$> x + x_1 <$> y) f = (Seq.seq f fun x_1 => x) + Seq.seq f fun x => y\n[PROOFSTEP]\nexact lift.add' f _ _\n[GOAL]\nα β α✝ : Type u\nx✝ : FreeAbelianGroup α✝\nx : α✝\nih : id <$> pure x = pure x\n⊢ id <$> (-pure x) = -pure x\n[PROOFSTEP]\nrw [FreeAbelianGroup.map_neg, ih]\n[GOAL]\nα β α✝ : Type u\nx✝ x y : FreeAbelianGroup α✝\nihx : id <$> x = x\nihy : id <$> y = y\n⊢ id <$> (x + y) = x + y\n[PROOFSTEP]\nrw [FreeAbelianGroup.map_add, ihx, ihy]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\n⊢ 0 >>= f >>= g = 0 >>= fun x => f x >>= g\n[PROOFSTEP]\niterate 3 rw [zero_bind]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\n⊢ 0 >>= f >>= g = 0 >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [zero_bind]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\n⊢ 0 >>= g = 0 >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [zero_bind]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\n⊢ 0 = 0 >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [zero_bind]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx : α✝\n⊢ pure x >>= f >>= g = pure x >>= fun x => f x >>= g\n[PROOFSTEP]\niterate 2 rw [pure_bind]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx : α✝\n⊢ pure x >>= f >>= g = pure x >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [pure_bind]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx : α✝\n⊢ f x >>= g = pure x >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [pure_bind]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx : α✝\nih : pure x >>= f >>= g = pure x >>= fun x => f x >>= g\n⊢ -pure x >>= f >>= g = -pure x >>= fun x => f x >>= g\n[PROOFSTEP]\niterate 3 rw [neg_bind] <;> try rw [ih]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx : α✝\nih : pure x >>= f >>= g = pure x >>= fun x => f x >>= g\n⊢ -pure x >>= f >>= g = -pure x >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [neg_bind]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx : α✝\nih : pure x >>= f >>= g = pure x >>= fun x => f x >>= g\n⊢ -(pure x >>= f) >>= g = -pure x >>= fun x => f x >>= g\n[PROOFSTEP]\ntry rw [ih]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx : α✝\nih : pure x >>= f >>= g = pure x >>= fun x => f x >>= g\n⊢ -(pure x >>= f) >>= g = -pure x >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [ih]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx : α✝\nih : pure x >>= f >>= g = pure x >>= fun x => f x >>= g\n⊢ -(pure x >>= f) >>= g = -pure x >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [neg_bind]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx : α✝\nih : pure x >>= f >>= g = pure x >>= fun x => f x >>= g\n⊢ -(pure x >>= f >>= g) = -pure x >>= fun x => f x >>= g\n[PROOFSTEP]\ntry rw [ih]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx : α✝\nih : pure x >>= f >>= g = pure x >>= fun x => f x >>= g\n⊢ -(pure x >>= f >>= g) = -pure x >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [ih]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx : α✝\nih : pure x >>= f >>= g = pure x >>= fun x => f x >>= g\n⊢ -(pure x >>= fun x => f x >>= g) = -pure x >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [neg_bind]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx y : FreeAbelianGroup α✝\nihx : x >>= f >>= g = x >>= fun x => f x >>= g\nihy : y >>= f >>= g = y >>= fun x => f x >>= g\n⊢ x + y >>= f >>= g = x + y >>= fun x => f x >>= g\n[PROOFSTEP]\niterate 3 rw [add_bind] <;> try rw [ihx, ihy]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx y : FreeAbelianGroup α✝\nihx : x >>= f >>= g = x >>= fun x => f x >>= g\nihy : y >>= f >>= g = y >>= fun x => f x >>= g\n⊢ x + y >>= f >>= g = x + y >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [add_bind]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx y : FreeAbelianGroup α✝\nihx : x >>= f >>= g = x >>= fun x => f x >>= g\nihy : y >>= f >>= g = y >>= fun x => f x >>= g\n⊢ (x >>= f) + (y >>= f) >>= g = x + y >>= fun x => f x >>= g\n[PROOFSTEP]\ntry rw [ihx, ihy]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx y : FreeAbelianGroup α✝\nihx : x >>= f >>= g = x >>= fun x => f x >>= g\nihy : y >>= f >>= g = y >>= fun x => f x >>= g\n⊢ (x >>= f) + (y >>= f) >>= g = x + y >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [ihx, ihy]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx y : FreeAbelianGroup α✝\nihx : x >>= f >>= g = x >>= fun x => f x >>= g\nihy : y >>= f >>= g = y >>= fun x => f x >>= g\n⊢ (x >>= f) + (y >>= f) >>= g = x + y >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [add_bind]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx y : FreeAbelianGroup α✝\nihx : x >>= f >>= g = x >>= fun x => f x >>= g\nihy : y >>= f >>= g = y >>= fun x => f x >>= g\n⊢ (x >>= f >>= g) + (y >>= f >>= g) = x + y >>= fun x => f x >>= g\n[PROOFSTEP]\ntry rw [ihx, ihy]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx y : FreeAbelianGroup α✝\nihx : x >>= f >>= g = x >>= fun x => f x >>= g\nihy : y >>= f >>= g = y >>= fun x => f x >>= g\n⊢ (x >>= f >>= g) + (y >>= f >>= g) = x + y >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [ihx, ihy]\n[GOAL]\nα β α✝ β✝ γ✝ : Type u\nx✝ : FreeAbelianGroup α✝\nf : α✝ → FreeAbelianGroup β✝\ng : β✝ → FreeAbelianGroup γ✝\nx y : FreeAbelianGroup α✝\nihx : x >>= f >>= g = x >>= fun x => f x >>= g\nihy : y >>= f >>= g = y >>= fun x => f x >>= g\n⊢ (x >>= fun x => f x >>= g) + (y >>= fun x => f x >>= g) = x + y >>= fun x => f x >>= g\n[PROOFSTEP]\nrw [add_bind]\n[GOAL]\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\n⊢ (Seq.seq (Prod.mk <$> x) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x_1 => x\n[PROOFSTEP]\nrefine' FreeAbelianGroup.induction_on' x _ _ _ _\n[GOAL]\ncase refine'_1\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\n⊢ (Seq.seq (Prod.mk <$> 0) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x => 0\n[PROOFSTEP]\nrw [FreeAbelianGroup.map_zero, zero_seq, seq_zero]\n[GOAL]\ncase refine'_2\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\n⊢ ∀ (x : α✝), (Seq.seq (Prod.mk <$> pure x) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x_1 => pure x\n[PROOFSTEP]\nintro p\n[GOAL]\ncase refine'_2\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\np : α✝\n⊢ (Seq.seq (Prod.mk <$> pure p) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x => pure p\n[PROOFSTEP]\nrw [map_pure, pure_seq]\n[GOAL]\ncase refine'_2\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\np : α✝\n⊢ Prod.mk p <$> y = Seq.seq ((fun b a => (a, b)) <$> y) fun x => pure p\n[PROOFSTEP]\nexact\n  FreeAbelianGroup.induction_on' y (by rw [FreeAbelianGroup.map_zero, FreeAbelianGroup.map_zero, zero_seq])\n    (fun q ↦ by rw [map_pure, map_pure, pure_seq, map_pure])\n    (fun q ih ↦ by rw [FreeAbelianGroup.map_neg, FreeAbelianGroup.map_neg, neg_seq, ih]) fun y₁ y₂ ih1 ih2 ↦ by\n    rw [FreeAbelianGroup.map_add, FreeAbelianGroup.map_add, add_seq, ih1, ih2]\n[GOAL]\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\np : α✝\n⊢ Prod.mk p <$> 0 = Seq.seq ((fun b a => (a, b)) <$> 0) fun x => pure p\n[PROOFSTEP]\nrw [FreeAbelianGroup.map_zero, FreeAbelianGroup.map_zero, zero_seq]\n[GOAL]\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\np : α✝\nq : β✝\n⊢ Prod.mk p <$> pure q = Seq.seq ((fun b a => (a, b)) <$> pure q) fun x => pure p\n[PROOFSTEP]\nrw [map_pure, map_pure, pure_seq, map_pure]\n[GOAL]\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\np : α✝\nq : β✝\nih : Prod.mk p <$> pure q = Seq.seq ((fun b a => (a, b)) <$> pure q) fun x => pure p\n⊢ Prod.mk p <$> (-pure q) = Seq.seq ((fun b a => (a, b)) <$> (-pure q)) fun x => pure p\n[PROOFSTEP]\nrw [FreeAbelianGroup.map_neg, FreeAbelianGroup.map_neg, neg_seq, ih]\n[GOAL]\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\np : α✝\ny₁ y₂ : FreeAbelianGroup β✝\nih1 : Prod.mk p <$> y₁ = Seq.seq ((fun b a => (a, b)) <$> y₁) fun x => pure p\nih2 : Prod.mk p <$> y₂ = Seq.seq ((fun b a => (a, b)) <$> y₂) fun x => pure p\n⊢ Prod.mk p <$> (y₁ + y₂) = Seq.seq ((fun b a => (a, b)) <$> (y₁ + y₂)) fun x => pure p\n[PROOFSTEP]\nrw [FreeAbelianGroup.map_add, FreeAbelianGroup.map_add, add_seq, ih1, ih2]\n[GOAL]\ncase refine'_3\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\n⊢ ∀ (x : α✝),\n    ((Seq.seq (Prod.mk <$> pure x) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x_1 => pure x) →\n      (Seq.seq (Prod.mk <$> (-pure x)) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x_1 => -pure x\n[PROOFSTEP]\nintro p ih\n[GOAL]\ncase refine'_3\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\np : α✝\nih : (Seq.seq (Prod.mk <$> pure p) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x => pure p\n⊢ (Seq.seq (Prod.mk <$> (-pure p)) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x => -pure p\n[PROOFSTEP]\nrw [FreeAbelianGroup.map_neg, neg_seq, seq_neg, ih]\n[GOAL]\ncase refine'_4\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\n⊢ ∀ (x y_1 : FreeAbelianGroup α✝),\n    ((Seq.seq (Prod.mk <$> x) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x_1 => x) →\n      ((Seq.seq (Prod.mk <$> y_1) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x => y_1) →\n        (Seq.seq (Prod.mk <$> (x + y_1)) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x_1 => x + y_1\n[PROOFSTEP]\nintro x₁ x₂ ih1 ih2\n[GOAL]\ncase refine'_4\nα β α✝ β✝ : Type u\nx : FreeAbelianGroup α✝\ny : FreeAbelianGroup β✝\nx₁ x₂ : FreeAbelianGroup α✝\nih1 : (Seq.seq (Prod.mk <$> x₁) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x => x₁\nih2 : (Seq.seq (Prod.mk <$> x₂) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x => x₂\n⊢ (Seq.seq (Prod.mk <$> (x₁ + x₂)) fun x => y) = Seq.seq ((fun b a => (a, b)) <$> y) fun x => x₁ + x₂\n[PROOFSTEP]\nrw [FreeAbelianGroup.map_add, add_seq, seq_add, ih1, ih2]\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : AddCommGroup γ\nf : α → β\ng : β → γ\nx : FreeAbelianGroup α\n⊢ ↑(↑lift (g ∘ f)) x = ↑(↑lift g) (↑(map f) x)\n[PROOFSTEP]\napply FreeAbelianGroup.induction_on (C := fun x ↦ lift (g ∘ f) x = lift g (map f x)) x\n[GOAL]\ncase C0\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : AddCommGroup γ\nf : α → β\ng : β → γ\nx : FreeAbelianGroup α\n⊢ ↑(↑lift (g ∘ f)) 0 = ↑(↑lift g) (↑(map f) 0)\n[PROOFSTEP]\nsimp only [map_zero]\n[GOAL]\ncase C1\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : AddCommGroup γ\nf : α → β\ng : β → γ\nx : FreeAbelianGroup α\n⊢ ∀ (x : α), ↑(↑lift (g ∘ f)) (of x) = ↑(↑lift g) (↑(map f) (of x))\n[PROOFSTEP]\nintro _\n[GOAL]\ncase C1\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : AddCommGroup γ\nf : α → β\ng : β → γ\nx : FreeAbelianGroup α\nx✝ : α\n⊢ ↑(↑lift (g ∘ f)) (of x✝) = ↑(↑lift g) (↑(map f) (of x✝))\n[PROOFSTEP]\nsimp only [lift.of, map, Function.comp]\n[GOAL]\ncase Cn\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : AddCommGroup γ\nf : α → β\ng : β → γ\nx : FreeAbelianGroup α\n⊢ ∀ (x : α),\n    ↑(↑lift (g ∘ f)) (of x) = ↑(↑lift g) (↑(map f) (of x)) → ↑(↑lift (g ∘ f)) (-of x) = ↑(↑lift g) (↑(map f) (-of x))\n[PROOFSTEP]\nintro _ h\n[GOAL]\ncase Cn\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : AddCommGroup γ\nf : α → β\ng : β → γ\nx : FreeAbelianGroup α\nx✝ : α\nh : ↑(↑lift (g ∘ f)) (of x✝) = ↑(↑lift g) (↑(map f) (of x✝))\n⊢ ↑(↑lift (g ∘ f)) (-of x✝) = ↑(↑lift g) (↑(map f) (-of x✝))\n[PROOFSTEP]\nsimp only [h, AddMonoidHom.map_neg]\n[GOAL]\ncase Cp\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : AddCommGroup γ\nf : α → β\ng : β → γ\nx : FreeAbelianGroup α\n⊢ ∀ (x y : FreeAbelianGroup α),\n    ↑(↑lift (g ∘ f)) x = ↑(↑lift g) (↑(map f) x) →\n      ↑(↑lift (g ∘ f)) y = ↑(↑lift g) (↑(map f) y) → ↑(↑lift (g ∘ f)) (x + y) = ↑(↑lift g) (↑(map f) (x + y))\n[PROOFSTEP]\nintro _ _ h₁ h₂\n[GOAL]\ncase Cp\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : AddCommGroup γ\nf : α → β\ng : β → γ\nx x✝ y✝ : FreeAbelianGroup α\nh₁ : ↑(↑lift (g ∘ f)) x✝ = ↑(↑lift g) (↑(map f) x✝)\nh₂ : ↑(↑lift (g ∘ f)) y✝ = ↑(↑lift g) (↑(map f) y✝)\n⊢ ↑(↑lift (g ∘ f)) (x✝ + y✝) = ↑(↑lift g) (↑(map f) (x✝ + y✝))\n[PROOFSTEP]\nsimp only [h₁, h₂, AddMonoidHom.map_add]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nx : FreeAbelianGroup α\n⊢ ↑(map id) x = x\n[PROOFSTEP]\nrw [map_id]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nx : FreeAbelianGroup α\n⊢ ↑(AddMonoidHom.id (FreeAbelianGroup α)) x = x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\nx✝ : α\n⊢ ↑(AddMonoidHom.comp (map g) (map f)) (of x✝) = ↑(map (g ∘ f)) (of x✝)\n[PROOFSTEP]\nsimp [map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\nx : FreeAbelianGroup α\n⊢ ↑(map (g ∘ f)) x = ↑(map g) (↑(map f) x)\n[PROOFSTEP]\nrw [map_comp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\nx : FreeAbelianGroup α\n⊢ ↑(AddMonoidHom.comp (map g) (map f)) x = ↑(map g) (↑(map f) x)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Mul α\nx y : α\n⊢ of x * of y = of (x * y)\n[PROOFSTEP]\nrw [mul_def, lift.of, lift.of]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Mul α\nsrc✝¹ : Mul (FreeAbelianGroup α) := mul α\nsrc✝ : AddCommGroup (FreeAbelianGroup α) := addCommGroup α\nx y z : FreeAbelianGroup α\n⊢ (x + y) * z = x * z + y * z\n[PROOFSTEP]\nsimp only [(· * ·), Mul.mul, map_add, ← Pi.add_def, lift.add']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Mul α\nsrc✝¹ : Distrib (FreeAbelianGroup α) := distrib\nsrc✝ : AddCommGroup (FreeAbelianGroup α) := addCommGroup α\na : FreeAbelianGroup α\n⊢ 0 * a = 0\n[PROOFSTEP]\nhave h : 0 * a + 0 * a = 0 * a := by simp [← add_mul]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Mul α\nsrc✝¹ : Distrib (FreeAbelianGroup α) := distrib\nsrc✝ : AddCommGroup (FreeAbelianGroup α) := addCommGroup α\na : FreeAbelianGroup α\n⊢ 0 * a + 0 * a = 0 * a\n[PROOFSTEP]\nsimp [← add_mul]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Mul α\nsrc✝¹ : Distrib (FreeAbelianGroup α) := distrib\nsrc✝ : AddCommGroup (FreeAbelianGroup α) := addCommGroup α\na : FreeAbelianGroup α\nh : 0 * a + 0 * a = 0 * a\n⊢ 0 * a = 0\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z : FreeAbelianGroup α\n⊢ x * y * z = x * (y * z)\n[PROOFSTEP]\nrefine' FreeAbelianGroup.induction_on z (by simp only [mul_zero]) (fun L3 ↦ _) (fun L3 ih ↦ _) fun z₁ z₂ ih₁ ih₂ ↦ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z : FreeAbelianGroup α\n⊢ x * y * 0 = x * (y * 0)\n[PROOFSTEP]\nsimp only [mul_zero]\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z : FreeAbelianGroup α\nL3 : α\n⊢ x * y * of L3 = x * (y * of L3)\n[PROOFSTEP]\nrefine'\n  FreeAbelianGroup.induction_on y (by simp only [mul_zero, zero_mul]) (fun L2 ↦ _) (fun L2 ih ↦ _) fun y₁ y₂ ih₁ ih₂ ↦ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z : FreeAbelianGroup α\nL3 : α\n⊢ x * 0 * of L3 = x * (0 * of L3)\n[PROOFSTEP]\nsimp only [mul_zero, zero_mul]\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z : FreeAbelianGroup α\nL3 L2 : α\n⊢ x * of L2 * of L3 = x * (of L2 * of L3)\n[PROOFSTEP]\nrefine' FreeAbelianGroup.induction_on x (by simp only [zero_mul]) (fun L1 ↦ _) (fun L1 ih ↦ _) fun x₁ x₂ ih₁ ih₂ ↦ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z : FreeAbelianGroup α\nL3 L2 : α\n⊢ 0 * of L2 * of L3 = 0 * (of L2 * of L3)\n[PROOFSTEP]\nsimp only [zero_mul]\n[GOAL]\ncase refine'_1.refine'_1.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z : FreeAbelianGroup α\nL3 L2 L1 : α\n⊢ of L1 * of L2 * of L3 = of L1 * (of L2 * of L3)\n[PROOFSTEP]\nrw [of_mul_of, of_mul_of, of_mul_of, of_mul_of, mul_assoc]\n[GOAL]\ncase refine'_1.refine'_1.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z : FreeAbelianGroup α\nL3 L2 L1 : α\nih : of L1 * of L2 * of L3 = of L1 * (of L2 * of L3)\n⊢ -of L1 * of L2 * of L3 = -of L1 * (of L2 * of L3)\n[PROOFSTEP]\nrw [neg_mul, neg_mul, neg_mul, ih]\n[GOAL]\ncase refine'_1.refine'_1.refine'_3\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z : FreeAbelianGroup α\nL3 L2 : α\nx₁ x₂ : FreeAbelianGroup α\nih₁ : x₁ * of L2 * of L3 = x₁ * (of L2 * of L3)\nih₂ : x₂ * of L2 * of L3 = x₂ * (of L2 * of L3)\n⊢ (x₁ + x₂) * of L2 * of L3 = (x₁ + x₂) * (of L2 * of L3)\n[PROOFSTEP]\nrw [add_mul, add_mul, add_mul, ih₁, ih₂]\n[GOAL]\ncase refine'_1.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z : FreeAbelianGroup α\nL3 L2 : α\nih : x * of L2 * of L3 = x * (of L2 * of L3)\n⊢ x * -of L2 * of L3 = x * (-of L2 * of L3)\n[PROOFSTEP]\nrw [neg_mul, mul_neg, mul_neg, neg_mul, ih]\n[GOAL]\ncase refine'_1.refine'_3\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z : FreeAbelianGroup α\nL3 : α\ny₁ y₂ : FreeAbelianGroup α\nih₁ : x * y₁ * of L3 = x * (y₁ * of L3)\nih₂ : x * y₂ * of L3 = x * (y₂ * of L3)\n⊢ x * (y₁ + y₂) * of L3 = x * ((y₁ + y₂) * of L3)\n[PROOFSTEP]\nrw [add_mul, mul_add, mul_add, add_mul, ih₁, ih₂]\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z : FreeAbelianGroup α\nL3 : α\nih : x * y * of L3 = x * (y * of L3)\n⊢ x * y * -of L3 = x * (y * -of L3)\n[PROOFSTEP]\nrw [mul_neg, mul_neg, mul_neg, ih]\n[GOAL]\ncase refine'_3\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : Semigroup α\nsrc✝ : NonUnitalNonAssocRing (FreeAbelianGroup α) := nonUnitalNonAssocRing\nx y z z₁ z₂ : FreeAbelianGroup α\nih₁ : x * y * z₁ = x * (y * z₁)\nih₂ : x * y * z₂ = x * (y * z₂)\n⊢ x * y * (z₁ + z₂) = x * (y * (z₁ + z₂))\n[PROOFSTEP]\nrw [mul_add, mul_add, mul_add, ih₁, ih₂]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\n⊢ 1 * x = x\n[PROOFSTEP]\ndsimp only [(· * ·), Mul.mul, OfNat.ofNat, One.one]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\n⊢ ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) x = x\n[PROOFSTEP]\nrefine' FreeAbelianGroup.induction_on x rfl _ _ _\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\n⊢ ∀ (x : α), ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) (of x) = of x\n[PROOFSTEP]\nintro L\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\nL : α\n⊢ ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) (of L) = of L\n[PROOFSTEP]\nrw [lift.of, lift.of]\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\nL : α\n⊢ of (Mul.mul One.one L) = of L\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase refine'_1.e_x\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\nL : α\n⊢ Mul.mul One.one L = L\n[PROOFSTEP]\nexact one_mul L\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\n⊢ ∀ (x : α),\n    ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) (of x) = of x →\n      ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) (-of x) = -of x\n[PROOFSTEP]\nintro L ih\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\nL : α\nih : ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) (of L) = of L\n⊢ ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) (-of L) = -of L\n[PROOFSTEP]\nrw [map_neg, ih]\n[GOAL]\ncase refine'_3\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\n⊢ ∀ (x y : FreeAbelianGroup α),\n    ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) x = x →\n      ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) y = y →\n        ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) (x + y) = x + y\n[PROOFSTEP]\nintro x1 x2 ih1 ih2\n[GOAL]\ncase refine'_3\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx x1 x2 : FreeAbelianGroup α\nih1 : ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) x1 = x1\nih2 : ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) x2 = x2\n⊢ ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of One.one)) (x1 + x2) = x1 + x2\n[PROOFSTEP]\nrw [map_add, ih1, ih2]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\n⊢ x * 1 = x\n[PROOFSTEP]\ndsimp only [(· * ·), Mul.mul, OfNat.ofNat, One.one]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\n⊢ ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) x) (of One.one) = x\n[PROOFSTEP]\nrw [lift.of]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\n⊢ ↑(↑lift fun x₁ => of (Mul.mul x₁ One.one)) x = x\n[PROOFSTEP]\nrefine' FreeAbelianGroup.induction_on x rfl (fun L ↦ _) (fun L ih ↦ _) fun x1 x2 ih1 ih2 ↦ _\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\nL : α\n⊢ ↑(↑lift fun x₁ => of (Mul.mul x₁ One.one)) (of L) = of L\n[PROOFSTEP]\nerw [lift.of]\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\nL : α\n⊢ of (Mul.mul L One.one) = of L\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase refine'_1.e_x\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\nL : α\n⊢ Mul.mul L One.one = L\n[PROOFSTEP]\nexact mul_one L\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx : FreeAbelianGroup α\nL : α\nih : ↑(↑lift fun x₁ => of (Mul.mul x₁ One.one)) (of L) = of L\n⊢ ↑(↑lift fun x₁ => of (Mul.mul x₁ One.one)) (-of L) = -of L\n[PROOFSTEP]\nrw [map_neg, ih]\n[GOAL]\ncase refine'_3\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nsrc✝¹ : NonUnitalRing (FreeAbelianGroup α) := nonUnitalRing α\nsrc✝ : One (FreeAbelianGroup α) := one α\nx x1 x2 : FreeAbelianGroup α\nih1 : ↑(↑lift fun x₁ => of (Mul.mul x₁ One.one)) x1 = x1\nih2 : ↑(↑lift fun x₁ => of (Mul.mul x₁ One.one)) x2 = x2\n⊢ ↑(↑lift fun x₁ => of (Mul.mul x₁ One.one)) (x1 + x2) = x1 + x2\n[PROOFSTEP]\nrw [map_add, ih1, ih2]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\n⊢ OneHom.toFun { toFun := ↑(↑lift ↑f), map_one' := (_ : ↑(↑lift ↑f) (of 1) = 1) } (x * y) =\n    OneHom.toFun { toFun := ↑(↑lift ↑f), map_one' := (_ : ↑(↑lift ↑f) (of 1) = 1) } x *\n      OneHom.toFun { toFun := ↑(↑lift ↑f), map_one' := (_ : ↑(↑lift ↑f) (of 1) = 1) } y\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\n⊢ ↑(↑lift ↑f) (x * y) = ↑(↑lift ↑f) x * ↑(↑lift ↑f) y\n[PROOFSTEP]\nrefine' FreeAbelianGroup.induction_on y (by simp only [mul_zero, map_zero]) (fun L2 ↦ _) (fun L2 ih ↦ _) _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\n⊢ ↑(↑lift ↑f) (x * 0) = ↑(↑lift ↑f) x * ↑(↑lift ↑f) 0\n[PROOFSTEP]\nsimp only [mul_zero, map_zero]\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\nL2 : α\n⊢ ↑(↑lift ↑f) (x * of L2) = ↑(↑lift ↑f) x * ↑(↑lift ↑f) (of L2)\n[PROOFSTEP]\nrefine' FreeAbelianGroup.induction_on x (by simp only [zero_mul, map_zero]) (fun L1 ↦ _) (fun L1 ih ↦ _) _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\nL2 : α\n⊢ ↑(↑lift ↑f) (0 * of L2) = ↑(↑lift ↑f) 0 * ↑(↑lift ↑f) (of L2)\n[PROOFSTEP]\nsimp only [zero_mul, map_zero]\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\nL2 L1 : α\n⊢ ↑(↑lift ↑f) (of L1 * of L2) = ↑(↑lift ↑f) (of L1) * ↑(↑lift ↑f) (of L2)\n[PROOFSTEP]\nsimp_rw [of_mul_of, lift.of]\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\nL2 L1 : α\n⊢ ↑f (L1 * L2) = ↑f L1 * ↑f L2\n[PROOFSTEP]\nexact f.map_mul _ _\n[GOAL]\ncase refine'_1.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\nL2 L1 : α\nih : ↑(↑lift ↑f) (of L1 * of L2) = ↑(↑lift ↑f) (of L1) * ↑(↑lift ↑f) (of L2)\n⊢ ↑(↑lift ↑f) (-of L1 * of L2) = ↑(↑lift ↑f) (-of L1) * ↑(↑lift ↑f) (of L2)\n[PROOFSTEP]\nsimp_rw [neg_mul, map_neg, neg_mul]\n[GOAL]\ncase refine'_1.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\nL2 L1 : α\nih : ↑(↑lift ↑f) (of L1 * of L2) = ↑(↑lift ↑f) (of L1) * ↑(↑lift ↑f) (of L2)\n⊢ -↑(↑lift ↑f) (of L1 * of L2) = -(↑(↑lift ↑f) (of L1) * ↑(↑lift ↑f) (of L2))\n[PROOFSTEP]\nexact congr_arg Neg.neg ih\n[GOAL]\ncase refine'_1.refine'_3\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\nL2 : α\n⊢ ∀ (x y : FreeAbelianGroup α),\n    ↑(↑lift ↑f) (x * of L2) = ↑(↑lift ↑f) x * ↑(↑lift ↑f) (of L2) →\n      ↑(↑lift ↑f) (y * of L2) = ↑(↑lift ↑f) y * ↑(↑lift ↑f) (of L2) →\n        ↑(↑lift ↑f) ((x + y) * of L2) = ↑(↑lift ↑f) (x + y) * ↑(↑lift ↑f) (of L2)\n[PROOFSTEP]\nintro x1 x2 ih1 ih2\n[GOAL]\ncase refine'_1.refine'_3\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\nL2 : α\nx1 x2 : FreeAbelianGroup α\nih1 : ↑(↑lift ↑f) (x1 * of L2) = ↑(↑lift ↑f) x1 * ↑(↑lift ↑f) (of L2)\nih2 : ↑(↑lift ↑f) (x2 * of L2) = ↑(↑lift ↑f) x2 * ↑(↑lift ↑f) (of L2)\n⊢ ↑(↑lift ↑f) ((x1 + x2) * of L2) = ↑(↑lift ↑f) (x1 + x2) * ↑(↑lift ↑f) (of L2)\n[PROOFSTEP]\nsimp only [add_mul, map_add, ih1, ih2]\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\nL2 : α\nih : ↑(↑lift ↑f) (x * of L2) = ↑(↑lift ↑f) x * ↑(↑lift ↑f) (of L2)\n⊢ ↑(↑lift ↑f) (x * -of L2) = ↑(↑lift ↑f) x * ↑(↑lift ↑f) (-of L2)\n[PROOFSTEP]\nrw [mul_neg, map_neg, map_neg, mul_neg, ih]\n[GOAL]\ncase refine'_3\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y : FreeAbelianGroup α\n⊢ ∀ (x_1 y : FreeAbelianGroup α),\n    ↑(↑lift ↑f) (x * x_1) = ↑(↑lift ↑f) x * ↑(↑lift ↑f) x_1 →\n      ↑(↑lift ↑f) (x * y) = ↑(↑lift ↑f) x * ↑(↑lift ↑f) y →\n        ↑(↑lift ↑f) (x * (x_1 + y)) = ↑(↑lift ↑f) x * ↑(↑lift ↑f) (x_1 + y)\n[PROOFSTEP]\nintro y1 y2 ih1 ih2\n[GOAL]\ncase refine'_3\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\nsrc✝ : (fun x => FreeAbelianGroup α →+ R) ↑f := ↑lift ↑f\nx y y1 y2 : FreeAbelianGroup α\nih1 : ↑(↑lift ↑f) (x * y1) = ↑(↑lift ↑f) x * ↑(↑lift ↑f) y1\nih2 : ↑(↑lift ↑f) (x * y2) = ↑(↑lift ↑f) x * ↑(↑lift ↑f) y2\n⊢ ↑(↑lift ↑f) (x * (y1 + y2)) = ↑(↑lift ↑f) x * ↑(↑lift ↑f) (y1 + y2)\n[PROOFSTEP]\nrw [mul_add, map_add, map_add, mul_add, ih1, ih2]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nf : α →* R\n⊢ ∀ (x : α),\n    ↑((fun F => MonoidHom.comp (↑F) ofMulHom)\n            ((fun f =>\n                let src := ↑lift ↑f;\n                {\n                  toMonoidHom :=\n                    { toOneHom := { toFun := ↑(↑lift ↑f), map_one' := (_ : ↑(↑lift ↑f) (of 1) = 1) },\n                      map_mul' :=\n                        (_ :\n                          ∀ (x y : FreeAbelianGroup α),\n                            OneHom.toFun { toFun := ↑(↑lift ↑f), map_one' := (_ : ↑(↑lift ↑f) (of 1) = 1) } (x * y) =\n                              OneHom.toFun { toFun := ↑(↑lift ↑f), map_one' := (_ : ↑(↑lift ↑f) (of 1) = 1) } x *\n                                OneHom.toFun { toFun := ↑(↑lift ↑f), map_one' := (_ : ↑(↑lift ↑f) (of 1) = 1) } y) },\n                  map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : FreeAbelianGroup α),\n                        ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n              f))\n        x =\n      ↑f x\n[PROOFSTEP]\nsimp only [RingHom.coe_monoidHom_mk, MonoidHom.coe_comp, MonoidHom.coe_mk, OneHom.coe_mk, ofMulHom_coe,\n  Function.comp_apply, lift.of, forall_const]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nF : FreeAbelianGroup α →+* R\n⊢ (fun f => ↑f)\n      ((fun f =>\n          let src := ↑lift ↑f;\n          {\n            toMonoidHom :=\n              { toOneHom := { toFun := ↑(↑lift ↑f), map_one' := (_ : ↑(↑lift ↑f) (of 1) = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : FreeAbelianGroup α),\n                      OneHom.toFun { toFun := ↑(↑lift ↑f), map_one' := (_ : ↑(↑lift ↑f) (of 1) = 1) } (x * y) =\n                        OneHom.toFun { toFun := ↑(↑lift ↑f), map_one' := (_ : ↑(↑lift ↑f) (of 1) = 1) } x *\n                          OneHom.toFun { toFun := ↑(↑lift ↑f), map_one' := (_ : ↑(↑lift ↑f) (of 1) = 1) } y) },\n            map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : FreeAbelianGroup α),\n                  ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n        ((fun F => MonoidHom.comp (↑F) ofMulHom) F)) =\n    (fun f => ↑f) F\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nF : FreeAbelianGroup α →+* R\n⊢ ↑{\n        toMonoidHom :=\n          {\n            toOneHom :=\n              { toFun := ↑(↑lift ↑(MonoidHom.comp (↑F) ofMulHom)),\n                map_one' := (_ : ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)) (of 1) = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : FreeAbelianGroup α),\n                  OneHom.toFun\n                      { toFun := ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)),\n                        map_one' := (_ : ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)) (of 1) = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)),\n                          map_one' := (_ : ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)) (of 1) = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)),\n                          map_one' := (_ : ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)) (of 1) = 1) }\n                        y) },\n        map_zero' := (_ : ZeroHom.toFun (↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F))) 0 = 0),\n        map_add' :=\n          (_ :\n            ∀ (x y : FreeAbelianGroup α),\n              ZeroHom.toFun (↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F))) (x + y) =\n                ZeroHom.toFun (↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F))) x +\n                  ZeroHom.toFun (↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F))) y) } =\n    ↑F\n[PROOFSTEP]\nrw [← lift.apply_symm_apply (↑F : FreeAbelianGroup α →+ R)]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type u_1\ninst✝¹ : Monoid α\ninst✝ : Ring R\nF : FreeAbelianGroup α →+* R\n⊢ ↑{\n        toMonoidHom :=\n          {\n            toOneHom :=\n              { toFun := ↑(↑lift ↑(MonoidHom.comp (↑F) ofMulHom)),\n                map_one' := (_ : ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)) (of 1) = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : FreeAbelianGroup α),\n                  OneHom.toFun\n                      { toFun := ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)),\n                        map_one' := (_ : ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)) (of 1) = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)),\n                          map_one' := (_ : ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)) (of 1) = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)),\n                          map_one' := (_ : ↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F)) (of 1) = 1) }\n                        y) },\n        map_zero' := (_ : ZeroHom.toFun (↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F))) 0 = 0),\n        map_add' :=\n          (_ :\n            ∀ (x y : FreeAbelianGroup α),\n              ZeroHom.toFun (↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F))) (x + y) =\n                ZeroHom.toFun (↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F))) x +\n                  ZeroHom.toFun (↑(↑lift ↑((fun F => MonoidHom.comp (↑F) ofMulHom) F))) y) } =\n    ↑lift (↑lift.symm ↑F)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\n⊢ x * y = y * x\n[PROOFSTEP]\nrefine' FreeAbelianGroup.induction_on x (zero_mul y) _ _ _\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\n⊢ ∀ (x : α), of x * y = y * of x\n[PROOFSTEP]\nintro s\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns : α\n⊢ of s * y = y * of s\n[PROOFSTEP]\nrefine' FreeAbelianGroup.induction_on y (zero_mul _).symm _ _ _\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns : α\n⊢ ∀ (x : α), of s * of x = of x * of s\n[PROOFSTEP]\nintro t\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns t : α\n⊢ of s * of t = of t * of s\n[PROOFSTEP]\ndsimp only [(· * ·), Mul.mul]\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns t : α\n⊢ ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of s)) (of t) =\n    ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of t)) (of s)\n[PROOFSTEP]\niterate 4 rw [lift.of]\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns t : α\n⊢ ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of s)) (of t) =\n    ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of t)) (of s)\n[PROOFSTEP]\nrw [lift.of]\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns t : α\n⊢ ↑(↑lift fun x₁ => of (Mul.mul x₁ t)) (of s) = ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of t)) (of s)\n[PROOFSTEP]\nrw [lift.of]\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns t : α\n⊢ of (Mul.mul s t) = ↑(↑lift fun x₂ => ↑(↑lift fun x₁ => of (Mul.mul x₁ x₂)) (of t)) (of s)\n[PROOFSTEP]\nrw [lift.of]\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns t : α\n⊢ of (Mul.mul s t) = ↑(↑lift fun x₁ => of (Mul.mul x₁ s)) (of t)\n[PROOFSTEP]\nrw [lift.of]\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns t : α\n⊢ of (Mul.mul s t) = of (Mul.mul t s)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase refine'_1.refine'_1.e_x\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns t : α\n⊢ Mul.mul s t = Mul.mul t s\n[PROOFSTEP]\nexact mul_comm _ _\n[GOAL]\ncase refine'_1.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns : α\n⊢ ∀ (x : α), of s * of x = of x * of s → of s * -of x = -of x * of s\n[PROOFSTEP]\nintro t ih\n[GOAL]\ncase refine'_1.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns t : α\nih : of s * of t = of t * of s\n⊢ of s * -of t = -of t * of s\n[PROOFSTEP]\nrw [mul_neg, ih, neg_mul_eq_neg_mul]\n[GOAL]\ncase refine'_1.refine'_3\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns : α\n⊢ ∀ (x y : FreeAbelianGroup α), of s * x = x * of s → of s * y = y * of s → of s * (x + y) = (x + y) * of s\n[PROOFSTEP]\nintro y1 y2 ih1 ih2\n[GOAL]\ncase refine'_1.refine'_3\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns : α\ny1 y2 : FreeAbelianGroup α\nih1 : of s * y1 = y1 * of s\nih2 : of s * y2 = y2 * of s\n⊢ of s * (y1 + y2) = (y1 + y2) * of s\n[PROOFSTEP]\nrw [mul_add, add_mul, ih1, ih2]\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\n⊢ ∀ (x : α), of x * y = y * of x → -of x * y = y * -of x\n[PROOFSTEP]\nintro s ih\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\ns : α\nih : of s * y = y * of s\n⊢ -of s * y = y * -of s\n[PROOFSTEP]\nrw [neg_mul, ih, neg_mul_eq_mul_neg]\n[GOAL]\ncase refine'_3\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y : FreeAbelianGroup α\n⊢ ∀ (x y_1 : FreeAbelianGroup α), x * y = y * x → y_1 * y = y * y_1 → (x + y_1) * y = y * (x + y_1)\n[PROOFSTEP]\nintro x1 x2 ih1 ih2\n[GOAL]\ncase refine'_3\nα : Type u\nβ : Type v\nγ : Type w\ninst✝ : CommMonoid α\nsrc✝ : Ring (FreeAbelianGroup α) := ring α\nx y x1 x2 : FreeAbelianGroup α\nih1 : x1 * y = y * x1\nih2 : x2 * y = y * x2\n⊢ (x1 + x2) * y = y * (x1 + x2)\n[PROOFSTEP]\nrw [add_mul, mul_add, ih1, ih2]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nx : FreeAbelianGroup PEmpty\n⊢ ∀ (x y : FreeAbelianGroup PEmpty), x = default → y = default → x + y = default\n[PROOFSTEP]\nrintro - - rfl rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nx : FreeAbelianGroup PEmpty\n⊢ default + default = default\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nT : Type u_1\ninst✝ : Unique T\nz : FreeAbelianGroup T\n⊢ (fun n => n • of default) (↑(↑lift fun x => 1) 0) = 0\n[PROOFSTEP]\nsimp only [zero_smul, AddMonoidHom.map_zero]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nT : Type u_1\ninst✝ : Unique T\nz : FreeAbelianGroup T\n⊢ (fun n => n • of default) (↑(↑lift fun x => 1) (of default)) = of default\n[PROOFSTEP]\nsimp only [one_smul, lift.of]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nT : Type u_1\ninst✝ : Unique T\nz : FreeAbelianGroup T\n⊢ (fun n => n • of default) (↑(↑lift fun x => 1) (of default)) = of default →\n    (fun n => n • of default) (↑(↑lift fun x => 1) (-of default)) = -of default\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nT : Type u_1\ninst✝ : Unique T\nz x y : FreeAbelianGroup T\nhx : (fun n => n • of default) (↑(↑lift fun x => 1) x) = x\nhy : (fun n => n • of default) (↑(↑lift fun x => 1) y) = y\n⊢ (fun n => n • of default) (↑(↑lift fun x => 1) (x + y)) = x + y\n[PROOFSTEP]\nsimp only [AddMonoidHom.map_add, add_smul] at *\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nT : Type u_1\ninst✝ : Unique T\nz x y : FreeAbelianGroup T\nhx : ↑(↑lift fun x => 1) x • of default = x\nhy : ↑(↑lift fun x => 1) y • of default = y\n⊢ ↑(↑lift fun x => 1) x • of default + ↑(↑lift fun x => 1) y • of default = x + y\n[PROOFSTEP]\nrw [hx, hy]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nT : Type u_1\ninst✝ : Unique T\nn : ℤ\n⊢ ↑(↑lift fun x => 1) ((fun n => n • of default) n) = n\n[PROOFSTEP]\nrw [AddMonoidHom.map_zsmul, lift.of]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nT : Type u_1\ninst✝ : Unique T\nn : ℤ\n⊢ n • 1 = n\n[PROOFSTEP]\nexact zsmul_int_one n\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nα : Type u_1\nβ : Type u_2\nf : α ≃ β\n⊢ Function.LeftInverse ↑(map ↑f.symm) ↑(map ↑f)\n[PROOFSTEP]\nintro x\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nα : Type u_1\nβ : Type u_2\nf : α ≃ β\nx : FreeAbelianGroup α\n⊢ ↑(map ↑f.symm) (↑(map ↑f) x) = x\n[PROOFSTEP]\nrw [← map_comp_apply, Equiv.symm_comp_self, map_id]\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nα : Type u_1\nβ : Type u_2\nf : α ≃ β\nx : FreeAbelianGroup α\n⊢ ↑(AddMonoidHom.id (FreeAbelianGroup α)) x = x\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nα : Type u_1\nβ : Type u_2\nf : α ≃ β\n⊢ Function.RightInverse ↑(map ↑f.symm) ↑(map ↑f)\n[PROOFSTEP]\nintro x\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nα : Type u_1\nβ : Type u_2\nf : α ≃ β\nx : FreeAbelianGroup β\n⊢ ↑(map ↑f) (↑(map ↑f.symm) x) = x\n[PROOFSTEP]\nrw [← map_comp_apply, Equiv.self_comp_symm, map_id]\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nα : Type u_1\nβ : Type u_2\nf : α ≃ β\nx : FreeAbelianGroup β\n⊢ ↑(AddMonoidHom.id (FreeAbelianGroup β)) x = x\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.FreeAbelianGroup", "llama_tokens": 25559, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7154239836484144, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.39391771487738036}}
{"text": "[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id r with rs\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id l with ls ll lx lr\n[GOAL]\ncase nil.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact ι x\n[GOAL]\ncase nil.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id ll with lls\n[GOAL]\ncase nil.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' lr with _ _ lrx\n[GOAL]\ncase nil.node.nil.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node 2 l x nil\n[GOAL]\ncase nil.node.nil.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nlrx : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node 3 (ι lx) lrx ι x\n[GOAL]\ncase nil.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nlls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id lr with lrs lrl lrx lrr\n[GOAL]\ncase nil.node.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nlls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node 3 ll lx ι x\n[GOAL]\ncase nil.node.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nlls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact\n  if lrs < ratio * lls then node (ls + 1) ll lx (node (lrs + 1) lr x nil)\n  else node (ls + 1) (node (lls + size lrl + 1) ll lx lrl) lrx (node (size lrr + 1) lrr x nil)\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id l with ls ll lx lr\n[GOAL]\ncase node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node (rs + 1) nil x r\n[GOAL]\ncase node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nrefine' if ls > delta * rs then _ else node (ls + rs + 1) l x r\n[GOAL]\ncase node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id ll with lls\n[GOAL]\ncase node.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact nil\n[GOAL]\ncase node.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nl✝¹ : Ordnode α\nx✝¹ : α\nr✝¹ : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nlls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id lr with lrs lrl lrx lrr\n[GOAL]\ncase node.node.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nl✝¹ : Ordnode α\nx✝¹ : α\nr✝¹ : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nlls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact nil\n[GOAL]\ncase node.node.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nl✝¹ : Ordnode α\nx✝¹ : α\nr✝¹ : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nlls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact\n  if lrs < ratio * lls then node (ls + rs + 1) ll lx (node (rs + lrs + 1) lr x r)\n  else node (ls + rs + 1) (node (lls + size lrl + 1) ll lx lrl) lrx (node (size lrr + rs + 1) lrr x r)\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id l with ls\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id r with rs rl rx rr\n[GOAL]\ncase nil.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact ι x\n[GOAL]\ncase nil.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id rr with rrs\n[GOAL]\ncase nil.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' rl with _ _ rlx\n[GOAL]\ncase nil.node.nil.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node 2 nil x r\n[GOAL]\ncase nil.node.nil.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrx : α\nrr : Ordnode α\nsize✝ : ℕ\nl✝ : Ordnode α\nrlx : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node 3 (ι x) rlx ι rx\n[GOAL]\ncase nil.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nrrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id rl with rls rll rlx rlr\n[GOAL]\ncase nil.node.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nrrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node 3 (ι x) rx rr\n[GOAL]\ncase nil.node.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nrrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact\n  if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n  else node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr)\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id r with rs rl rx rr\n[GOAL]\ncase node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node (ls + 1) l x nil\n[GOAL]\ncase node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nrefine' if rs > delta * ls then _ else node (ls + rs + 1) l x r\n[GOAL]\ncase node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id rr with rrs\n[GOAL]\ncase node.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact nil\n[GOAL]\ncase node.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nl✝¹ : Ordnode α\nx✝¹ : α\nr✝¹ : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nrrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id rl with rls rll rlx rlr\n[GOAL]\ncase node.node.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nl✝¹ : Ordnode α\nx✝¹ : α\nr✝¹ : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nrrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact nil\n[GOAL]\ncase node.node.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nl✝¹ : Ordnode α\nx✝¹ : α\nr✝¹ : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nrrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact\n  if rls < ratio * rrs then node (ls + rs + 1) (node (ls + rls + 1) l x rl) rx rr\n  else node (ls + rs + 1) (node (ls + size rll + 1) l x rll) rlx (node (size rlr + rrs + 1) rlr rx rr)\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id l with ls ll lx lr\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id r with rs rl rx rr\n[GOAL]\ncase nil.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact ι x\n[GOAL]\ncase nil.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id rl with rls rll rlx rlr\n[GOAL]\ncase nil.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases id rr\n[GOAL]\ncase nil.node.nil.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node 2 nil x r\n[GOAL]\ncase nil.node.nil.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node 3 (ι x) rx rr\n[GOAL]\ncase nil.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id rr with rrs\n[GOAL]\ncase nil.node.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node 3 (ι x) rlx ι rx\n[GOAL]\ncase nil.node.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact\n  if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n  else node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr)\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id r with rs rl rx rr\n[GOAL]\ncase node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id ll with lls\n[GOAL]\ncase node.nil.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' lr with _ _ lrx\n[GOAL]\ncase node.nil.nil.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node 2 l x nil\n[GOAL]\ncase node.nil.nil.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nlrx : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node 3 (ι lx) lrx ι x\n[GOAL]\ncase node.nil.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nlls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id lr with lrs lrl lrx lrr\n[GOAL]\ncase node.nil.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nlls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact node 3 ll lx ι x\n[GOAL]\ncase node.nil.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nlls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact\n  if lrs < ratio * lls then node (ls + 1) ll lx (node (lrs + 1) lr x nil)\n  else node (ls + 1) (node (lls + size lrl + 1) ll lx lrl) lrx (node (size lrr + 1) lrr x nil)\n[GOAL]\ncase node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nrefine' if delta * ls < rs then _ else if delta * rs < ls then _ else node (ls + rs + 1) l x r\n[GOAL]\ncase node.node.refine'_1\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id rl with rls rll rlx rlr\n[GOAL]\ncase node.node.refine'_1.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact nil\n[GOAL]\ncase node.node.refine'_1.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id rr with rrs\n[GOAL]\ncase node.node.refine'_1.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact nil\n[GOAL]\ncase node.node.refine'_1.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact\n  if rls < ratio * rrs then node (ls + rs + 1) (node (ls + rls + 1) l x rl) rx rr\n  else node (ls + rs + 1) (node (ls + size rll + 1) l x rll) rlx (node (size rlr + rrs + 1) rlr rx rr)\n[GOAL]\ncase node.node.refine'_2\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id ll with lls\n[GOAL]\ncase node.node.refine'_2.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact nil\n[GOAL]\ncase node.node.refine'_2.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nlls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\ncases' id lr with lrs lrl lrx lrr\n[GOAL]\ncase node.node.refine'_2.node.nil\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nlls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact nil\n[GOAL]\ncase node.node.refine'_2.node.node\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nlls : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ Ordnode α\n[PROOFSTEP]\nexact\n  if lrs < ratio * lls then node (ls + rs + 1) ll lx (node (lrs + rs + 1) lr x r)\n  else node (ls + rs + 1) (node (lls + size lrl + 1) ll lx lrl) lrx (node (size lrr + rs + 1) lrr x r)\n[GOAL]\nα : Type u_1\nx : α\ninst✝ : DecidableEq α\n⊢ (t : Ordnode α) → Decidable (Emem x t)\n[PROOFSTEP]\ndsimp [Emem]\n[GOAL]\nα : Type u_1\nx : α\ninst✝ : DecidableEq α\n⊢ (t : Ordnode α) → Decidable (Any (Eq x) t)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\ninst✝¹ : LE α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\n⊢ (t : Ordnode α) → Decidable (Amem x t)\n[PROOFSTEP]\ndsimp [Amem]\n[GOAL]\nα : Type u_1\ninst✝¹ : LE α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\n⊢ (t : Ordnode α) → Decidable (Any (fun y => x ≤ y ∧ y ≤ x) t)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Data.Ordmap.Ordnode", "llama_tokens": 7590, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802603710086, "lm_q2_score": 0.588889130767832, "lm_q1q2_score": 0.3938963151176444}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : TopologicalSpace G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nK : PositiveCompacts G\n⊢ LocallyCompactSpace G\n[PROOFSTEP]\nrefine' locally_compact_of_compact_nhds fun x => _\n[GOAL]\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : TopologicalSpace G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nK : PositiveCompacts G\nx : G\n⊢ ∃ s, s ∈ 𝓝 x ∧ IsCompact s\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := K.interior_nonempty\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : TopologicalSpace G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nK : PositiveCompacts G\nx y : G\nhy : y ∈ interior ↑K\n⊢ ∃ s, s ∈ 𝓝 x ∧ IsCompact s\n[PROOFSTEP]\nlet F := Homeomorph.mulLeft (x * y⁻¹)\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : TopologicalSpace G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nK : PositiveCompacts G\nx y : G\nhy : y ∈ interior ↑K\nF : G ≃ₜ G := Homeomorph.mulLeft (x * y⁻¹)\n⊢ ∃ s, s ∈ 𝓝 x ∧ IsCompact s\n[PROOFSTEP]\nrefine' ⟨F '' K, _, K.isCompact.image F.continuous⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : TopologicalSpace G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nK : PositiveCompacts G\nx y : G\nhy : y ∈ interior ↑K\nF : G ≃ₜ G := Homeomorph.mulLeft (x * y⁻¹)\n⊢ ↑F '' ↑K ∈ 𝓝 x\n[PROOFSTEP]\nsuffices F.symm ⁻¹' K ∈ 𝓝 x by\n  convert this using 1\n  apply Equiv.image_eq_preimage\n[GOAL]\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : TopologicalSpace G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nK : PositiveCompacts G\nx y : G\nhy : y ∈ interior ↑K\nF : G ≃ₜ G := Homeomorph.mulLeft (x * y⁻¹)\nthis : ↑(Homeomorph.symm F) ⁻¹' ↑K ∈ 𝓝 x\n⊢ ↑F '' ↑K ∈ 𝓝 x\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_4\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : TopologicalSpace G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nK : PositiveCompacts G\nx y : G\nhy : y ∈ interior ↑K\nF : G ≃ₜ G := Homeomorph.mulLeft (x * y⁻¹)\nthis : ↑(Homeomorph.symm F) ⁻¹' ↑K ∈ 𝓝 x\n⊢ ↑F '' ↑K = ↑(Homeomorph.symm F) ⁻¹' ↑K\n[PROOFSTEP]\napply Equiv.image_eq_preimage\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : TopologicalSpace G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nK : PositiveCompacts G\nx y : G\nhy : y ∈ interior ↑K\nF : G ≃ₜ G := Homeomorph.mulLeft (x * y⁻¹)\n⊢ ↑(Homeomorph.symm F) ⁻¹' ↑K ∈ 𝓝 x\n[PROOFSTEP]\napply ContinuousAt.preimage_mem_nhds F.symm.continuous.continuousAt\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : TopologicalSpace G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nK : PositiveCompacts G\nx y : G\nhy : y ∈ interior ↑K\nF : G ≃ₜ G := Homeomorph.mulLeft (x * y⁻¹)\n⊢ ↑K ∈ 𝓝 (↑(Homeomorph.symm F) x)\n[PROOFSTEP]\nhave : F.symm x = y := by\n  simp only [Homeomorph.mulLeft_symm, mul_inv_rev, inv_inv, Homeomorph.coe_mulLeft, inv_mul_cancel_right]\n[GOAL]\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : TopologicalSpace G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nK : PositiveCompacts G\nx y : G\nhy : y ∈ interior ↑K\nF : G ≃ₜ G := Homeomorph.mulLeft (x * y⁻¹)\n⊢ ↑(Homeomorph.symm F) x = y\n[PROOFSTEP]\nsimp only [Homeomorph.mulLeft_symm, mul_inv_rev, inv_inv, Homeomorph.coe_mulLeft, inv_mul_cancel_right]\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : TopologicalSpace G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nK : PositiveCompacts G\nx y : G\nhy : y ∈ interior ↑K\nF : G ≃ₜ G := Homeomorph.mulLeft (x * y⁻¹)\nthis : ↑(Homeomorph.symm F) x = y\n⊢ ↑K ∈ 𝓝 (↑(Homeomorph.symm F) x)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : TopologicalSpace G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nK : PositiveCompacts G\nx y : G\nhy : y ∈ interior ↑K\nF : G ≃ₜ G := Homeomorph.mulLeft (x * y⁻¹)\nthis : ↑(Homeomorph.symm F) x = y\n⊢ ↑K ∈ 𝓝 y\n[PROOFSTEP]\nexact mem_interior_iff_mem_nhds.1 hy\n[GOAL]\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : Group G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalGroup G\nΓ : Subgroup G\ninst✝ : LocallyCompactSpace G\n⊢ Continuous fun p => p.fst • p.snd\n[PROOFSTEP]\nlet F : G × G ⧸ Γ → G ⧸ Γ := fun p => p.1 • p.2\n[GOAL]\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : Group G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalGroup G\nΓ : Subgroup G\ninst✝ : LocallyCompactSpace G\nF : G × G ⧸ Γ → G ⧸ Γ := fun p => p.fst • p.snd\n⊢ Continuous fun p => p.fst • p.snd\n[PROOFSTEP]\nchange Continuous F\n[GOAL]\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : Group G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalGroup G\nΓ : Subgroup G\ninst✝ : LocallyCompactSpace G\nF : G × G ⧸ Γ → G ⧸ Γ := fun p => p.fst • p.snd\n⊢ Continuous F\n[PROOFSTEP]\nhave H : Continuous (F ∘ fun p : G × G => (p.1, QuotientGroup.mk p.2)) :=\n  by\n  change Continuous fun p : G × G => QuotientGroup.mk (p.1 * p.2)\n  refine' continuous_coinduced_rng.comp continuous_mul\n[GOAL]\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : Group G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalGroup G\nΓ : Subgroup G\ninst✝ : LocallyCompactSpace G\nF : G × G ⧸ Γ → G ⧸ Γ := fun p => p.fst • p.snd\n⊢ Continuous (F ∘ fun p => (p.fst, ↑p.snd))\n[PROOFSTEP]\nchange Continuous fun p : G × G => QuotientGroup.mk (p.1 * p.2)\n[GOAL]\nα : Type u\nβ : Type v\nG : Type w\nH : Type x\ninst✝³ : Group G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalGroup G\nΓ : Subgroup G\ninst✝ : LocallyCompactSpace G\nF : G × G ⧸ Γ → G ⧸ Γ := fun p => p.fst • p.snd\n⊢ Continuous fun p => ↑(p.fst * p.snd)\n[PROOFSTEP]\nrefine' continuous_coinduced_rng.comp continuous_mul\n[GOAL]\nα : Type u\nβ : Type v\nG : Type w\nH✝ : Type x\ninst✝³ : Group G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalGroup G\nΓ : Subgroup G\ninst✝ : LocallyCompactSpace G\nF : G × G ⧸ Γ → G ⧸ Γ := fun p => p.fst • p.snd\nH : Continuous (F ∘ fun p => (p.fst, ↑p.snd))\n⊢ Continuous F\n[PROOFSTEP]\nexact QuotientMap.continuous_lift_prod_right quotientMap_quotient_mk' H\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Group.Compact", "llama_tokens": 2901, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6113819732941511, "lm_q2_score": 0.6442250928250375, "lm_q1q2_score": 0.3938676084969791}}
{"text": "[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\n⊢ ↑↑μ Eᶜ ≤ liminf (fun i => ↑↑(μs i) Eᶜ) L\n[PROOFSTEP]\nrcases L.eq_or_neBot with rfl | hne\n[GOAL]\ncase inl\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) ⊥ ≤ ↑↑μ E\n⊢ ↑↑μ Eᶜ ≤ liminf (fun i => ↑↑(μs i) Eᶜ) ⊥\n[PROOFSTEP]\nsimp only [liminf_bot, le_top]\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\nhne : NeBot L\n⊢ ↑↑μ Eᶜ ≤ liminf (fun i => ↑↑(μs i) Eᶜ) L\n[PROOFSTEP]\nhave meas_Ec : μ Eᶜ = 1 - μ E := by simpa only [measure_univ] using measure_compl E_mble (measure_lt_top μ E).ne\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\nhne : NeBot L\n⊢ ↑↑μ Eᶜ = 1 - ↑↑μ E\n[PROOFSTEP]\nsimpa only [measure_univ] using measure_compl E_mble (measure_lt_top μ E).ne\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\n⊢ ↑↑μ Eᶜ ≤ liminf (fun i => ↑↑(μs i) Eᶜ) L\n[PROOFSTEP]\nhave meas_i_Ec : ∀ i, μs i Eᶜ = 1 - μs i E := by\n  intro i\n  simpa only [measure_univ] using measure_compl E_mble (measure_lt_top (μs i) E).ne\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\n⊢ ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\n[PROOFSTEP]\nintro i\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\ni : ι\n⊢ ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\n[PROOFSTEP]\nsimpa only [measure_univ] using measure_compl E_mble (measure_lt_top (μs i) E).ne\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\n⊢ ↑↑μ Eᶜ ≤ liminf (fun i => ↑↑(μs i) Eᶜ) L\n[PROOFSTEP]\nsimp_rw [meas_Ec, meas_i_Ec]\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\n⊢ 1 - ↑↑μ E ≤ liminf (fun i => 1 - ↑↑(μs i) E) L\n[PROOFSTEP]\nhave obs : (L.liminf fun i : ι => 1 - μs i E) = L.liminf ((fun x => 1 - x) ∘ fun i : ι => μs i E) := by rfl\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\n⊢ liminf (fun i => 1 - ↑↑(μs i) E) L = liminf ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\nobs : liminf (fun i => 1 - ↑↑(μs i) E) L = liminf ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\n⊢ 1 - ↑↑μ E ≤ liminf (fun i => 1 - ↑↑(μs i) E) L\n[PROOFSTEP]\nrw [obs]\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\nobs : liminf (fun i => 1 - ↑↑(μs i) E) L = liminf ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\n⊢ 1 - ↑↑μ E ≤ liminf ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\n[PROOFSTEP]\nhave :=\n  antitone_const_tsub.map_limsup_of_continuousAt (F := L) (fun i => μs i E)\n    (ENNReal.continuous_sub_left ENNReal.one_ne_top).continuousAt\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\nobs : liminf (fun i => 1 - ↑↑(μs i) E) L = liminf ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\nthis : 1 - limsup (fun i => ↑↑(μs i) E) L = liminf ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\n⊢ 1 - ↑↑μ E ≤ liminf ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\n[PROOFSTEP]\nsimp_rw [← this]\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\nobs : liminf (fun i => 1 - ↑↑(μs i) E) L = liminf ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\nthis : 1 - limsup (fun i => ↑↑(μs i) E) L = liminf ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\n⊢ 1 - ↑↑μ E ≤ 1 - limsup (fun i => ↑↑(μs i) E) L\n[PROOFSTEP]\nexact antitone_const_tsub h\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\n⊢ limsup (fun i => ↑↑(μs i) Eᶜ) L ≤ ↑↑μ Eᶜ\n[PROOFSTEP]\nrcases L.eq_or_neBot with rfl | hne\n[GOAL]\ncase inl\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) ⊥\n⊢ limsup (fun i => ↑↑(μs i) Eᶜ) ⊥ ≤ ↑↑μ Eᶜ\n[PROOFSTEP]\nsimp only [limsup_bot, bot_le]\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\nhne : NeBot L\n⊢ limsup (fun i => ↑↑(μs i) Eᶜ) L ≤ ↑↑μ Eᶜ\n[PROOFSTEP]\nhave meas_Ec : μ Eᶜ = 1 - μ E := by simpa only [measure_univ] using measure_compl E_mble (measure_lt_top μ E).ne\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\nhne : NeBot L\n⊢ ↑↑μ Eᶜ = 1 - ↑↑μ E\n[PROOFSTEP]\nsimpa only [measure_univ] using measure_compl E_mble (measure_lt_top μ E).ne\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\n⊢ limsup (fun i => ↑↑(μs i) Eᶜ) L ≤ ↑↑μ Eᶜ\n[PROOFSTEP]\nhave meas_i_Ec : ∀ i, μs i Eᶜ = 1 - μs i E := by\n  intro i\n  simpa only [measure_univ] using measure_compl E_mble (measure_lt_top (μs i) E).ne\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\n⊢ ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\n[PROOFSTEP]\nintro i\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\ni : ι\n⊢ ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\n[PROOFSTEP]\nsimpa only [measure_univ] using measure_compl E_mble (measure_lt_top (μs i) E).ne\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\n⊢ limsup (fun i => ↑↑(μs i) Eᶜ) L ≤ ↑↑μ Eᶜ\n[PROOFSTEP]\nsimp_rw [meas_Ec, meas_i_Ec]\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\n⊢ limsup (fun i => 1 - ↑↑(μs i) E) L ≤ 1 - ↑↑μ E\n[PROOFSTEP]\nhave obs : (L.limsup fun i : ι => 1 - μs i E) = L.limsup ((fun x => 1 - x) ∘ fun i : ι => μs i E) := by rfl\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\n⊢ limsup (fun i => 1 - ↑↑(μs i) E) L = limsup ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\nobs : limsup (fun i => 1 - ↑↑(μs i) E) L = limsup ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\n⊢ limsup (fun i => 1 - ↑↑(μs i) E) L ≤ 1 - ↑↑μ E\n[PROOFSTEP]\nrw [obs]\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\nobs : limsup (fun i => 1 - ↑↑(μs i) E) L = limsup ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\n⊢ limsup ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L ≤ 1 - ↑↑μ E\n[PROOFSTEP]\nhave :=\n  antitone_const_tsub.map_liminf_of_continuousAt (F := L) (fun i => μs i E)\n    (ENNReal.continuous_sub_left ENNReal.one_ne_top).continuousAt\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\nobs : limsup (fun i => 1 - ↑↑(μs i) E) L = limsup ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\nthis : 1 - liminf (fun i => ↑↑(μs i) E) L = limsup ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\n⊢ limsup ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L ≤ 1 - ↑↑μ E\n[PROOFSTEP]\nsimp_rw [← this]\n[GOAL]\ncase inr\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nE : Set Ω\nE_mble : MeasurableSet E\nh : ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\nhne : NeBot L\nmeas_Ec : ↑↑μ Eᶜ = 1 - ↑↑μ E\nmeas_i_Ec : ∀ (i : ι), ↑↑(μs i) Eᶜ = 1 - ↑↑(μs i) E\nobs : limsup (fun i => 1 - ↑↑(μs i) E) L = limsup ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\nthis : 1 - liminf (fun i => ↑↑(μs i) E) L = limsup ((fun x => 1 - x) ∘ fun i => ↑↑(μs i) E) L\n⊢ 1 - liminf (fun i => ↑↑(μs i) E) L ≤ 1 - ↑↑μ E\n[PROOFSTEP]\nexact antitone_const_tsub h\n[GOAL]\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\ninst✝³ : TopologicalSpace Ω\ninst✝² : OpensMeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\n⊢ (∀ (F : Set Ω), IsClosed F → limsup (fun i => ↑↑(μs i) F) L ≤ ↑↑μ F) ↔\n    ∀ (G : Set Ω), IsOpen G → ↑↑μ G ≤ liminf (fun i => ↑↑(μs i) G) L\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\ninst✝³ : TopologicalSpace Ω\ninst✝² : OpensMeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\n⊢ (∀ (F : Set Ω), IsClosed F → limsup (fun i => ↑↑(μs i) F) L ≤ ↑↑μ F) →\n    ∀ (G : Set Ω), IsOpen G → ↑↑μ G ≤ liminf (fun i => ↑↑(μs i) G) L\n[PROOFSTEP]\nintro h G G_open\n[GOAL]\ncase mp\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\ninst✝³ : TopologicalSpace Ω\ninst✝² : OpensMeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nh : ∀ (F : Set Ω), IsClosed F → limsup (fun i => ↑↑(μs i) F) L ≤ ↑↑μ F\nG : Set Ω\nG_open : IsOpen G\n⊢ ↑↑μ G ≤ liminf (fun i => ↑↑(μs i) G) L\n[PROOFSTEP]\nexact le_measure_liminf_of_limsup_measure_compl_le G_open.measurableSet (h Gᶜ (isClosed_compl_iff.mpr G_open))\n[GOAL]\ncase mpr\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\ninst✝³ : TopologicalSpace Ω\ninst✝² : OpensMeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\n⊢ (∀ (G : Set Ω), IsOpen G → ↑↑μ G ≤ liminf (fun i => ↑↑(μs i) G) L) →\n    ∀ (F : Set Ω), IsClosed F → limsup (fun i => ↑↑(μs i) F) L ≤ ↑↑μ F\n[PROOFSTEP]\nintro h F F_closed\n[GOAL]\ncase mpr\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\ninst✝³ : TopologicalSpace Ω\ninst✝² : OpensMeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\ninst✝¹ : IsProbabilityMeasure μ\ninst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)\nh : ∀ (G : Set Ω), IsOpen G → ↑↑μ G ≤ liminf (fun i => ↑↑(μs i) G) L\nF : Set Ω\nF_closed : IsClosed F\n⊢ limsup (fun i => ↑↑(μs i) F) L ≤ ↑↑μ F\n[PROOFSTEP]\nexact limsup_measure_le_of_le_liminf_measure_compl F_closed.measurableSet (h Fᶜ (isOpen_compl_iff.mpr F_closed))\n[GOAL]\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\nE₀ E E₁ : Set Ω\nE₀_subset : E₀ ⊆ E\nsubset_E₁ : E ⊆ E₁\nnulldiff : ↑↑μ (E₁ \\ E₀) = 0\nh_E₀ : ↑↑μ E₀ ≤ liminf (fun i => ↑↑(μs i) E₀) L\nh_E₁ : limsup (fun i => ↑↑(μs i) E₁) L ≤ ↑↑μ E₁\n⊢ Tendsto (fun i => ↑↑(μs i) E) L (𝓝 (↑↑μ E))\n[PROOFSTEP]\napply tendsto_of_le_liminf_of_limsup_le\n[GOAL]\ncase hinf\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\nE₀ E E₁ : Set Ω\nE₀_subset : E₀ ⊆ E\nsubset_E₁ : E ⊆ E₁\nnulldiff : ↑↑μ (E₁ \\ E₀) = 0\nh_E₀ : ↑↑μ E₀ ≤ liminf (fun i => ↑↑(μs i) E₀) L\nh_E₁ : limsup (fun i => ↑↑(μs i) E₁) L ≤ ↑↑μ E₁\n⊢ ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\n[PROOFSTEP]\nhave E₀_ae_eq_E : E₀ =ᵐ[μ] E :=\n  EventuallyLE.antisymm E₀_subset.eventuallyLE (subset_E₁.eventuallyLE.trans (ae_le_set.mpr nulldiff))\n[GOAL]\ncase hinf\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\nE₀ E E₁ : Set Ω\nE₀_subset : E₀ ⊆ E\nsubset_E₁ : E ⊆ E₁\nnulldiff : ↑↑μ (E₁ \\ E₀) = 0\nh_E₀ : ↑↑μ E₀ ≤ liminf (fun i => ↑↑(μs i) E₀) L\nh_E₁ : limsup (fun i => ↑↑(μs i) E₁) L ≤ ↑↑μ E₁\nE₀_ae_eq_E : E₀ =ᵐ[μ] E\n⊢ ↑↑μ E ≤ liminf (fun i => ↑↑(μs i) E) L\n[PROOFSTEP]\ncalc\n  μ E = μ E₀ := measure_congr E₀_ae_eq_E.symm\n  _ ≤ L.liminf fun i => μs i E₀ := h_E₀\n  _ ≤ L.liminf fun i => μs i E := liminf_le_liminf (eventually_of_forall fun _ => measure_mono E₀_subset)\n[GOAL]\ncase hsup\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\nE₀ E E₁ : Set Ω\nE₀_subset : E₀ ⊆ E\nsubset_E₁ : E ⊆ E₁\nnulldiff : ↑↑μ (E₁ \\ E₀) = 0\nh_E₀ : ↑↑μ E₀ ≤ liminf (fun i => ↑↑(μs i) E₀) L\nh_E₁ : limsup (fun i => ↑↑(μs i) E₁) L ≤ ↑↑μ E₁\n⊢ limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\n[PROOFSTEP]\nhave E_ae_eq_E₁ : E =ᵐ[μ] E₁ :=\n  EventuallyLE.antisymm subset_E₁.eventuallyLE ((ae_le_set.mpr nulldiff).trans E₀_subset.eventuallyLE)\n[GOAL]\ncase hsup\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\nE₀ E E₁ : Set Ω\nE₀_subset : E₀ ⊆ E\nsubset_E₁ : E ⊆ E₁\nnulldiff : ↑↑μ (E₁ \\ E₀) = 0\nh_E₀ : ↑↑μ E₀ ≤ liminf (fun i => ↑↑(μs i) E₀) L\nh_E₁ : limsup (fun i => ↑↑(μs i) E₁) L ≤ ↑↑μ E₁\nE_ae_eq_E₁ : E =ᵐ[μ] E₁\n⊢ limsup (fun i => ↑↑(μs i) E) L ≤ ↑↑μ E\n[PROOFSTEP]\ncalc\n  (L.limsup fun i => μs i E) ≤ L.limsup fun i => μs i E₁ :=\n    limsup_le_limsup (eventually_of_forall fun _ => measure_mono subset_E₁)\n  _ ≤ μ E₁ := h_E₁\n  _ = μ E := measure_congr E_ae_eq_E₁.symm\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\nE₀ E E₁ : Set Ω\nE₀_subset : E₀ ⊆ E\nsubset_E₁ : E ⊆ E₁\nnulldiff : ↑↑μ (E₁ \\ E₀) = 0\nh_E₀ : ↑↑μ E₀ ≤ liminf (fun i => ↑↑(μs i) E₀) L\nh_E₁ : limsup (fun i => ↑↑(μs i) E₁) L ≤ ↑↑μ E₁\n⊢ autoParam (IsBoundedUnder (fun x x_1 => x ≤ x_1) L fun i => ↑↑(μs i) E) _auto✝\n[PROOFSTEP]\ninfer_param\n[GOAL]\ncase h'\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\nμ : Measure Ω\nμs : ι → Measure Ω\nE₀ E E₁ : Set Ω\nE₀_subset : E₀ ⊆ E\nsubset_E₁ : E ⊆ E₁\nnulldiff : ↑↑μ (E₁ \\ E₀) = 0\nh_E₀ : ↑↑μ E₀ ≤ liminf (fun i => ↑↑(μs i) E₀) L\nh_E₁ : limsup (fun i => ↑↑(μs i) E₁) L ≤ ↑↑μ E₁\n⊢ autoParam (IsBoundedUnder (fun x x_1 => x ≥ x_1) L fun i => ↑↑(μs i) E) _auto✝\n[PROOFSTEP]\ninfer_param\n[GOAL]\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\ninst✝³ : IsCountablyGenerated L\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nc : ℝ≥0\nE : Set Ω\nE_mble : MeasurableSet E\nfs : ι → Ω →ᵇ ℝ≥0\nfs_bdd : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂μ, ↑(fs i) ω ≤ c\nfs_lim : ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun i => ↑(fs i) ω) L (𝓝 (indicator E (fun x => 1) ω))\n⊢ Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(fs n) ω) ∂μ) L (𝓝 (↑↑μ E))\n[PROOFSTEP]\nconvert FiniteMeasure.tendsto_lintegral_nn_filter_of_le_const μ fs_bdd fs_lim\n[GOAL]\ncase h.e'_5.h.e'_3\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\ninst✝³ : IsCountablyGenerated L\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nc : ℝ≥0\nE : Set Ω\nE_mble : MeasurableSet E\nfs : ι → Ω →ᵇ ℝ≥0\nfs_bdd : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂μ, ↑(fs i) ω ≤ c\nfs_lim : ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun i => ↑(fs i) ω) L (𝓝 (indicator E (fun x => 1) ω))\n⊢ ↑↑μ E = ∫⁻ (ω : Ω), ↑(indicator E (fun x => 1) ω) ∂μ\n[PROOFSTEP]\nhave aux : ∀ ω, indicator E (fun _ => (1 : ℝ≥0∞)) ω = ↑(indicator E (fun _ => (1 : ℝ≥0)) ω) := fun ω => by\n  simp only [ENNReal.coe_indicator, ENNReal.coe_one]\n[GOAL]\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\ninst✝³ : IsCountablyGenerated L\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nc : ℝ≥0\nE : Set Ω\nE_mble : MeasurableSet E\nfs : ι → Ω →ᵇ ℝ≥0\nfs_bdd : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂μ, ↑(fs i) ω ≤ c\nfs_lim : ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun i => ↑(fs i) ω) L (𝓝 (indicator E (fun x => 1) ω))\nω : Ω\n⊢ indicator E (fun x => 1) ω = ↑(indicator E (fun x => 1) ω)\n[PROOFSTEP]\nsimp only [ENNReal.coe_indicator, ENNReal.coe_one]\n[GOAL]\ncase h.e'_5.h.e'_3\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\ninst✝³ : IsCountablyGenerated L\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nc : ℝ≥0\nE : Set Ω\nE_mble : MeasurableSet E\nfs : ι → Ω →ᵇ ℝ≥0\nfs_bdd : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂μ, ↑(fs i) ω ≤ c\nfs_lim : ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun i => ↑(fs i) ω) L (𝓝 (indicator E (fun x => 1) ω))\naux : ∀ (ω : Ω), indicator E (fun x => 1) ω = ↑(indicator E (fun x => 1) ω)\n⊢ ↑↑μ E = ∫⁻ (ω : Ω), ↑(indicator E (fun x => 1) ω) ∂μ\n[PROOFSTEP]\nsimp_rw [← aux, lintegral_indicator _ E_mble]\n[GOAL]\ncase h.e'_5.h.e'_3\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nι : Type u_2\nL : Filter ι\ninst✝³ : IsCountablyGenerated L\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nc : ℝ≥0\nE : Set Ω\nE_mble : MeasurableSet E\nfs : ι → Ω →ᵇ ℝ≥0\nfs_bdd : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂μ, ↑(fs i) ω ≤ c\nfs_lim : ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun i => ↑(fs i) ω) L (𝓝 (indicator E (fun x => 1) ω))\naux : ∀ (ω : Ω), indicator E (fun x => 1) ω = ↑(indicator E (fun x => 1) ω)\n⊢ ↑↑μ E = ∫⁻ (x : Ω) in E, 1 ∂μ\n[PROOFSTEP]\nsimp only [lintegral_one, Measure.restrict_apply, MeasurableSet.univ, univ_inter]\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nc : ℝ≥0\nE : Set Ω\nE_mble : MeasurableSet E\nfs : ℕ → Ω →ᵇ ℝ≥0\nfs_bdd : ∀ (n : ℕ) (ω : Ω), ↑(fs n) ω ≤ c\nfs_lim : Tendsto (fun n => ↑(fs n)) atTop (𝓝 (indicator E fun x => 1))\n⊢ Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(fs n) ω) ∂μ) atTop (𝓝 (↑↑μ E))\n[PROOFSTEP]\nhave fs_lim' : ∀ ω, Tendsto (fun n : ℕ => (fs n ω : ℝ≥0)) atTop (𝓝 (indicator E (fun _ => (1 : ℝ≥0)) ω)) :=\n  by\n  rw [tendsto_pi_nhds] at fs_lim \n  exact fun ω => fs_lim ω\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nc : ℝ≥0\nE : Set Ω\nE_mble : MeasurableSet E\nfs : ℕ → Ω →ᵇ ℝ≥0\nfs_bdd : ∀ (n : ℕ) (ω : Ω), ↑(fs n) ω ≤ c\nfs_lim : Tendsto (fun n => ↑(fs n)) atTop (𝓝 (indicator E fun x => 1))\n⊢ ∀ (ω : Ω), Tendsto (fun n => ↑(fs n) ω) atTop (𝓝 (indicator E (fun x => 1) ω))\n[PROOFSTEP]\nrw [tendsto_pi_nhds] at fs_lim \n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nc : ℝ≥0\nE : Set Ω\nE_mble : MeasurableSet E\nfs : ℕ → Ω →ᵇ ℝ≥0\nfs_bdd : ∀ (n : ℕ) (ω : Ω), ↑(fs n) ω ≤ c\nfs_lim : ∀ (x : Ω), Tendsto (fun i => ↑(fs i) x) atTop (𝓝 (indicator E (fun x => 1) x))\n⊢ ∀ (ω : Ω), Tendsto (fun n => ↑(fs n) ω) atTop (𝓝 (indicator E (fun x => 1) ω))\n[PROOFSTEP]\nexact fun ω => fs_lim ω\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nc : ℝ≥0\nE : Set Ω\nE_mble : MeasurableSet E\nfs : ℕ → Ω →ᵇ ℝ≥0\nfs_bdd : ∀ (n : ℕ) (ω : Ω), ↑(fs n) ω ≤ c\nfs_lim : Tendsto (fun n => ↑(fs n)) atTop (𝓝 (indicator E fun x => 1))\nfs_lim' : ∀ (ω : Ω), Tendsto (fun n => ↑(fs n) ω) atTop (𝓝 (indicator E (fun x => 1) ω))\n⊢ Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(fs n) ω) ∂μ) atTop (𝓝 (↑↑μ E))\n[PROOFSTEP]\napply\n  measure_of_cont_bdd_of_tendsto_filter_indicator μ E_mble fs\n    (eventually_of_forall fun n => eventually_of_forall (fs_bdd n)) (eventually_of_forall fs_lim')\n[GOAL]\nΩ✝ : Type u_1\ninst✝⁴ : MeasurableSpace Ω✝\nΩ : Type u_2\ninst✝³ : MeasurableSpace Ω\ninst✝² : PseudoEMetricSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nF : Set Ω\nF_closed : IsClosed F\nδs : ℕ → ℝ\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\n⊢ Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂μ) atTop (𝓝 (↑↑μ F))\n[PROOFSTEP]\napply\n  measure_of_cont_bdd_of_tendsto_indicator μ F_closed.measurableSet (fun n => thickenedIndicator (δs_pos n) F)\n    fun n ω => thickenedIndicator_le_one (δs_pos n) F ω\n[GOAL]\nΩ✝ : Type u_1\ninst✝⁴ : MeasurableSpace Ω✝\nΩ : Type u_2\ninst✝³ : MeasurableSpace Ω\ninst✝² : PseudoEMetricSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nF : Set Ω\nF_closed : IsClosed F\nδs : ℕ → ℝ\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\n⊢ Tendsto (fun n => ↑(thickenedIndicator (_ : 0 < δs n) F)) atTop (𝓝 (indicator F fun x => 1))\n[PROOFSTEP]\nhave key := thickenedIndicator_tendsto_indicator_closure δs_pos δs_lim F\n[GOAL]\nΩ✝ : Type u_1\ninst✝⁴ : MeasurableSpace Ω✝\nΩ : Type u_2\ninst✝³ : MeasurableSpace Ω\ninst✝² : PseudoEMetricSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nF : Set Ω\nF_closed : IsClosed F\nδs : ℕ → ℝ\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey : Tendsto (fun n => ↑(thickenedIndicator (_ : 0 < δs n) F)) atTop (𝓝 (indicator (closure F) fun x => 1))\n⊢ Tendsto (fun n => ↑(thickenedIndicator (_ : 0 < δs n) F)) atTop (𝓝 (indicator F fun x => 1))\n[PROOFSTEP]\nrwa [F_closed.closure_eq] at key \n[GOAL]\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F\n[PROOFSTEP]\nrcases L.eq_or_neBot with rfl | hne\n[GOAL]\ncase inl\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nF : Set Ω\nF_closed : IsClosed F\nμs_lim : Tendsto μs ⊥ (𝓝 μ)\n⊢ limsup (fun i => ↑↑↑(μs i) F) ⊥ ≤ ↑↑↑μ F\n[PROOFSTEP]\nsimp only [limsup_bot, bot_le]\n[GOAL]\ncase inr\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F\n[PROOFSTEP]\napply ENNReal.le_of_forall_pos_le_add\n[GOAL]\ncase inr.h\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\n⊢ ∀ (ε : ℝ≥0), 0 < ε → ↑↑↑μ F < ⊤ → limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nintro ε ε_pos _\n[GOAL]\ncase inr.h\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nlet δs := fun n : ℕ => (1 : ℝ) / (n + 1)\n[GOAL]\ncase inr.h\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nhave δs_pos : ∀ n, 0 < δs n := fun n => Nat.one_div_pos_of_nat\n[GOAL]\ncase inr.h\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nhave δs_lim : Tendsto δs atTop (𝓝 0) := tendsto_one_div_add_atTop_nhds_0_nat\n[GOAL]\ncase inr.h\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nhave key₁ := tendsto_lintegral_thickenedIndicator_of_isClosed (μ : Measure Ω) F_closed δs_pos δs_lim\n[GOAL]\ncase inr.h\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey₁ : Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂↑μ) atTop (𝓝 (↑↑↑μ F))\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nhave room₁ : (μ : Measure Ω) F < (μ : Measure Ω) F + ε / 2 := by\n  apply\n    ENNReal.lt_add_right (measure_lt_top (μ : Measure Ω) F).ne\n      (ENNReal.div_pos_iff.mpr ⟨(ENNReal.coe_pos.mpr ε_pos).ne.symm, ENNReal.two_ne_top⟩).ne.symm\n[GOAL]\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey₁ : Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂↑μ) atTop (𝓝 (↑↑↑μ F))\n⊢ ↑↑↑μ F < ↑↑↑μ F + ↑ε / 2\n[PROOFSTEP]\napply\n  ENNReal.lt_add_right (measure_lt_top (μ : Measure Ω) F).ne\n    (ENNReal.div_pos_iff.mpr ⟨(ENNReal.coe_pos.mpr ε_pos).ne.symm, ENNReal.two_ne_top⟩).ne.symm\n[GOAL]\ncase inr.h\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey₁ : Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂↑μ) atTop (𝓝 (↑↑↑μ F))\nroom₁ : ↑↑↑μ F < ↑↑↑μ F + ↑ε / 2\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nrcases eventually_atTop.mp (eventually_lt_of_tendsto_lt room₁ key₁) with ⟨M, hM⟩\n[GOAL]\ncase inr.h.intro\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey₁ : Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂↑μ) atTop (𝓝 (↑↑↑μ F))\nroom₁ : ↑↑↑μ F < ↑↑↑μ F + ↑ε / 2\nM : ℕ\nhM : ∀ (b : ℕ), b ≥ M → ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs b) F) ω) ∂↑μ < ↑↑↑μ F + ↑ε / 2\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nhave key₂ := FiniteMeasure.tendsto_iff_forall_lintegral_tendsto.mp μs_lim (thickenedIndicator (δs_pos M) F)\n[GOAL]\ncase inr.h.intro\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey₁ : Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂↑μ) atTop (𝓝 (↑↑↑μ F))\nroom₁ : ↑↑↑μ F < ↑↑↑μ F + ↑ε / 2\nM : ℕ\nhM : ∀ (b : ℕ), b ≥ M → ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs b) F) ω) ∂↑μ < ↑↑↑μ F + ↑ε / 2\nkey₂ :\n  Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs i)) L\n    (𝓝 (∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑μ))\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nhave room₂ :\n  (lintegral (μ : Measure Ω) fun a => thickenedIndicator (δs_pos M) F a) <\n    (lintegral (μ : Measure Ω) fun a => thickenedIndicator (δs_pos M) F a) + ε / 2 :=\n  by\n  apply\n    ENNReal.lt_add_right (lintegral_lt_top_of_boundedContinuous_to_nnreal (μ : Measure Ω) _).ne\n      (ENNReal.div_pos_iff.mpr ⟨(ENNReal.coe_pos.mpr ε_pos).ne.symm, ENNReal.two_ne_top⟩).ne.symm\n[GOAL]\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey₁ : Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂↑μ) atTop (𝓝 (↑↑↑μ F))\nroom₁ : ↑↑↑μ F < ↑↑↑μ F + ↑ε / 2\nM : ℕ\nhM : ∀ (b : ℕ), b ≥ M → ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs b) F) ω) ∂↑μ < ↑↑↑μ F + ↑ε / 2\nkey₂ :\n  Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs i)) L\n    (𝓝 (∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑μ))\n⊢ ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ <\n    ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\n[PROOFSTEP]\napply\n  ENNReal.lt_add_right (lintegral_lt_top_of_boundedContinuous_to_nnreal (μ : Measure Ω) _).ne\n    (ENNReal.div_pos_iff.mpr ⟨(ENNReal.coe_pos.mpr ε_pos).ne.symm, ENNReal.two_ne_top⟩).ne.symm\n[GOAL]\ncase inr.h.intro\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey₁ : Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂↑μ) atTop (𝓝 (↑↑↑μ F))\nroom₁ : ↑↑↑μ F < ↑↑↑μ F + ↑ε / 2\nM : ℕ\nhM : ∀ (b : ℕ), b ≥ M → ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs b) F) ω) ∂↑μ < ↑↑↑μ F + ↑ε / 2\nkey₂ :\n  Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs i)) L\n    (𝓝 (∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑μ))\nroom₂ :\n  ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ <\n    ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nhave ev_near := Eventually.mono (eventually_lt_of_tendsto_lt room₂ key₂) fun n => le_of_lt\n[GOAL]\ncase inr.h.intro\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey₁ : Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂↑μ) atTop (𝓝 (↑↑↑μ F))\nroom₁ : ↑↑↑μ F < ↑↑↑μ F + ↑ε / 2\nM : ℕ\nhM : ∀ (b : ℕ), b ≥ M → ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs b) F) ω) ∂↑μ < ↑↑↑μ F + ↑ε / 2\nkey₂ :\n  Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs i)) L\n    (𝓝 (∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑μ))\nroom₂ :\n  ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ <\n    ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\nev_near :\n  ∀ᶠ (x : ι) in L,\n    ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs x) ≤\n      ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nhave ev_near' :=\n  Eventually.mono ev_near fun n =>\n    le_trans (measure_le_lintegral_thickenedIndicator (μs n : Measure Ω) F_closed.measurableSet (δs_pos M))\n[GOAL]\ncase inr.h.intro\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey₁ : Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂↑μ) atTop (𝓝 (↑↑↑μ F))\nroom₁ : ↑↑↑μ F < ↑↑↑μ F + ↑ε / 2\nM : ℕ\nhM : ∀ (b : ℕ), b ≥ M → ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs b) F) ω) ∂↑μ < ↑↑↑μ F + ↑ε / 2\nkey₂ :\n  Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs i)) L\n    (𝓝 (∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑μ))\nroom₂ :\n  ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ <\n    ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\nev_near :\n  ∀ᶠ (x : ι) in L,\n    ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs x) ≤\n      ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\nev_near' : ∀ᶠ (x : ι) in L, ↑↑↑(μs x) F ≤ ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\napply (Filter.limsup_le_limsup ev_near').trans\n[GOAL]\ncase inr.h.intro\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey₁ : Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂↑μ) atTop (𝓝 (↑↑↑μ F))\nroom₁ : ↑↑↑μ F < ↑↑↑μ F + ↑ε / 2\nM : ℕ\nhM : ∀ (b : ℕ), b ≥ M → ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs b) F) ω) ∂↑μ < ↑↑↑μ F + ↑ε / 2\nkey₂ :\n  Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs i)) L\n    (𝓝 (∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑μ))\nroom₂ :\n  ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ <\n    ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\nev_near :\n  ∀ᶠ (x : ι) in L,\n    ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs x) ≤\n      ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\nev_near' : ∀ᶠ (x : ι) in L, ↑↑↑(μs x) F ≤ ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\n⊢ limsup (fun x => ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2) L ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nrw [limsup_const]\n[GOAL]\ncase inr.h.intro\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey₁ : Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂↑μ) atTop (𝓝 (↑↑↑μ F))\nroom₁ : ↑↑↑μ F < ↑↑↑μ F + ↑ε / 2\nM : ℕ\nhM : ∀ (b : ℕ), b ≥ M → ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs b) F) ω) ∂↑μ < ↑↑↑μ F + ↑ε / 2\nkey₂ :\n  Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs i)) L\n    (𝓝 (∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑μ))\nroom₂ :\n  ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ <\n    ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\nev_near :\n  ∀ᶠ (x : ι) in L,\n    ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs x) ≤\n      ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\nev_near' : ∀ᶠ (x : ι) in L, ↑↑↑(μs x) F ≤ ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\n⊢ ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2 ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\napply le_trans (add_le_add (hM M rfl.le).le (le_refl (ε / 2 : ℝ≥0∞)))\n[GOAL]\ncase inr.h.intro\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nμs : ι → FiniteMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\nhne : NeBot L\nε : ℝ≥0\nε_pos : 0 < ε\na✝ : ↑↑↑μ F < ⊤\nδs : ℕ → ℝ := fun n => 1 / (↑n + 1)\nδs_pos : ∀ (n : ℕ), 0 < δs n\nδs_lim : Tendsto δs atTop (𝓝 0)\nkey₁ : Tendsto (fun n => ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs n) F) ω) ∂↑μ) atTop (𝓝 (↑↑↑μ F))\nroom₁ : ↑↑↑μ F < ↑↑↑μ F + ↑ε / 2\nM : ℕ\nhM : ∀ (b : ℕ), b ≥ M → ∫⁻ (ω : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs b) F) ω) ∂↑μ < ↑↑↑μ F + ↑ε / 2\nkey₂ :\n  Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs i)) L\n    (𝓝 (∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑μ))\nroom₂ :\n  ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ <\n    ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\nev_near :\n  ∀ᶠ (x : ι) in L,\n    ∫⁻ (x : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) x) ∂↑(μs x) ≤\n      ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\nev_near' : ∀ᶠ (x : ι) in L, ↑↑↑(μs x) F ≤ ∫⁻ (a : Ω), ↑(↑(thickenedIndicator (_ : 0 < δs M) F) a) ∂↑μ + ↑ε / 2\n⊢ ↑↑↑μ F + ↑ε / 2 + ↑ε / 2 ≤ ↑↑↑μ F + ↑ε\n[PROOFSTEP]\nsimp only [add_assoc, ENNReal.add_halves, le_refl]\n[GOAL]\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : ProbabilityMeasure Ω\nμs : ι → ProbabilityMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nF : Set Ω\nF_closed : IsClosed F\n⊢ limsup (fun i => ↑↑↑(μs i) F) L ≤ ↑↑↑μ F\n[PROOFSTEP]\napply\n  FiniteMeasure.limsup_measure_closed_le_of_tendsto\n    ((ProbabilityMeasure.tendsto_nhds_iff_toFiniteMeasure_tendsto_nhds L).mp μs_lim) F_closed\n[GOAL]\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : ProbabilityMeasure Ω\nμs : ι → ProbabilityMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nE : Set Ω\nE_nullbdry : (fun s => ENNReal.toNNReal (↑↑↑μ s)) (frontier E) = 0\n⊢ Tendsto (fun i => (fun s => ENNReal.toNNReal (↑↑↑(μs i) s)) E) L (𝓝 ((fun s => ENNReal.toNNReal (↑↑↑μ s)) E))\n[PROOFSTEP]\nhave E_nullbdry' : (μ : Measure Ω) (frontier E) = 0 := by\n  rw [← ProbabilityMeasure.ennreal_coeFn_eq_coeFn_toMeasure, E_nullbdry, ENNReal.coe_zero]\n[GOAL]\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : ProbabilityMeasure Ω\nμs : ι → ProbabilityMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nE : Set Ω\nE_nullbdry : (fun s => ENNReal.toNNReal (↑↑↑μ s)) (frontier E) = 0\n⊢ ↑↑↑μ (frontier E) = 0\n[PROOFSTEP]\nrw [← ProbabilityMeasure.ennreal_coeFn_eq_coeFn_toMeasure, E_nullbdry, ENNReal.coe_zero]\n[GOAL]\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : ProbabilityMeasure Ω\nμs : ι → ProbabilityMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nE : Set Ω\nE_nullbdry : (fun s => ENNReal.toNNReal (↑↑↑μ s)) (frontier E) = 0\nE_nullbdry' : ↑↑↑μ (frontier E) = 0\n⊢ Tendsto (fun i => (fun s => ENNReal.toNNReal (↑↑↑(μs i) s)) E) L (𝓝 ((fun s => ENNReal.toNNReal (↑↑↑μ s)) E))\n[PROOFSTEP]\nhave key := ProbabilityMeasure.tendsto_measure_of_null_frontier_of_tendsto' μs_lim E_nullbdry'\n[GOAL]\nΩ✝ : Type u_1\ninst✝³ : MeasurableSpace Ω✝\nΩ : Type u_2\nι : Type u_3\nL : Filter ι\ninst✝² : MeasurableSpace Ω\ninst✝¹ : PseudoEMetricSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : ProbabilityMeasure Ω\nμs : ι → ProbabilityMeasure Ω\nμs_lim : Tendsto μs L (𝓝 μ)\nE : Set Ω\nE_nullbdry : (fun s => ENNReal.toNNReal (↑↑↑μ s)) (frontier E) = 0\nE_nullbdry' : ↑↑↑μ (frontier E) = 0\nkey : Tendsto (fun i => ↑↑↑(μs i) E) L (𝓝 (↑↑↑μ E))\n⊢ Tendsto (fun i => (fun s => ENNReal.toNNReal (↑↑↑(μs i) s)) E) L (𝓝 ((fun s => ENNReal.toNNReal (↑↑↑μ s)) E))\n[PROOFSTEP]\nexact (ENNReal.tendsto_toNNReal (measure_ne_top (↑μ) E)).comp key\n[GOAL]\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\na b : ℝ\nhab : a < b\n⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0\n[PROOFSTEP]\nhave mbles : ∀ r : ℝ, MeasurableSet (frontier (Metric.thickening r s)) := fun r => isClosed_frontier.measurableSet\n[GOAL]\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\na b : ℝ\nhab : a < b\nmbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))\n⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0\n[PROOFSTEP]\nhave disjs := Metric.frontier_thickening_disjoint s\n[GOAL]\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\na b : ℝ\nhab : a < b\nmbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))\ndisjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))\n⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0\n[PROOFSTEP]\nhave key := @Measure.countable_meas_pos_of_disjoint_iUnion Ω _ _ μ _ _ mbles disjs\n[GOAL]\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\na b : ℝ\nhab : a < b\nmbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))\ndisjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))\nkey : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}\n⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0\n[PROOFSTEP]\nhave aux := @measure_diff_null ℝ _ volume (Ioo a b) _ (Set.Countable.measure_zero key volume)\n[GOAL]\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\na b : ℝ\nhab : a < b\nmbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))\ndisjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))\nkey : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}\naux : ↑↑volume (Ioo a b \\ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}) = ↑↑volume (Ioo a b)\n⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0\n[PROOFSTEP]\nhave len_pos : 0 < ENNReal.ofReal (b - a) := by simp only [hab, ENNReal.ofReal_pos, sub_pos]\n[GOAL]\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\na b : ℝ\nhab : a < b\nmbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))\ndisjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))\nkey : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}\naux : ↑↑volume (Ioo a b \\ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}) = ↑↑volume (Ioo a b)\n⊢ 0 < ENNReal.ofReal (b - a)\n[PROOFSTEP]\nsimp only [hab, ENNReal.ofReal_pos, sub_pos]\n[GOAL]\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\na b : ℝ\nhab : a < b\nmbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))\ndisjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))\nkey : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}\naux : ↑↑volume (Ioo a b \\ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}) = ↑↑volume (Ioo a b)\nlen_pos : 0 < ENNReal.ofReal (b - a)\n⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0\n[PROOFSTEP]\nrw [← Real.volume_Ioo, ← aux] at len_pos \n[GOAL]\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\na b : ℝ\nhab : a < b\nmbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))\ndisjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))\nkey : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}\naux : ↑↑volume (Ioo a b \\ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}) = ↑↑volume (Ioo a b)\nlen_pos : 0 < ↑↑volume (Ioo a b \\ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))})\n⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0\n[PROOFSTEP]\nrcases nonempty_of_measure_ne_zero len_pos.ne.symm with ⟨r, ⟨r_in_Ioo, hr⟩⟩\n[GOAL]\ncase intro.intro\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\na b : ℝ\nhab : a < b\nmbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))\ndisjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))\nkey : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}\naux : ↑↑volume (Ioo a b \\ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}) = ↑↑volume (Ioo a b)\nlen_pos : 0 < ↑↑volume (Ioo a b \\ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))})\nr : ℝ\nr_in_Ioo : r ∈ Ioo a b\nhr : ¬r ∈ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}\n⊢ ∃ r, r ∈ Ioo a b ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0\n[PROOFSTEP]\nrefine' ⟨r, r_in_Ioo, _⟩\n[GOAL]\ncase intro.intro\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\na b : ℝ\nhab : a < b\nmbles : ∀ (r : ℝ), MeasurableSet (frontier (Metric.thickening r s))\ndisjs : Pairwise (Disjoint on fun r => frontier (Metric.thickening r s))\nkey : Set.Countable {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}\naux : ↑↑volume (Ioo a b \\ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}) = ↑↑volume (Ioo a b)\nlen_pos : 0 < ↑↑volume (Ioo a b \\ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))})\nr : ℝ\nr_in_Ioo : r ∈ Ioo a b\nhr : ¬r ∈ {i | 0 < ↑↑μ (frontier (Metric.thickening i s))}\n⊢ ↑↑μ (frontier (Metric.thickening r s)) = 0\n[PROOFSTEP]\nsimpa only [mem_setOf_eq, not_lt, le_zero_iff] using hr\n[GOAL]\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\n⊢ ∃ rs, Tendsto rs atTop (𝓝 0) ∧ ∀ (n : ℕ), 0 < rs n ∧ ↑↑μ (frontier (Metric.thickening (rs n) s)) = 0\n[PROOFSTEP]\nrcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨Rs, ⟨_, ⟨Rs_pos, Rs_lim⟩⟩⟩\n[GOAL]\ncase intro.intro.intro\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\nRs : ℕ → ℝ\nleft✝ : StrictAnti Rs\nRs_pos : ∀ (n : ℕ), 0 < Rs n\nRs_lim : Tendsto Rs atTop (𝓝 0)\n⊢ ∃ rs, Tendsto rs atTop (𝓝 0) ∧ ∀ (n : ℕ), 0 < rs n ∧ ↑↑μ (frontier (Metric.thickening (rs n) s)) = 0\n[PROOFSTEP]\nhave obs := fun n : ℕ => exists_null_frontier_thickening μ s (Rs_pos n)\n[GOAL]\ncase intro.intro.intro\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\nRs : ℕ → ℝ\nleft✝ : StrictAnti Rs\nRs_pos : ∀ (n : ℕ), 0 < Rs n\nRs_lim : Tendsto Rs atTop (𝓝 0)\nobs : ∀ (n : ℕ), ∃ r, r ∈ Ioo 0 (Rs n) ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0\n⊢ ∃ rs, Tendsto rs atTop (𝓝 0) ∧ ∀ (n : ℕ), 0 < rs n ∧ ↑↑μ (frontier (Metric.thickening (rs n) s)) = 0\n[PROOFSTEP]\nrefine' ⟨fun n : ℕ => (obs n).choose, ⟨_, _⟩⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\nRs : ℕ → ℝ\nleft✝ : StrictAnti Rs\nRs_pos : ∀ (n : ℕ), 0 < Rs n\nRs_lim : Tendsto Rs atTop (𝓝 0)\nobs : ∀ (n : ℕ), ∃ r, r ∈ Ioo 0 (Rs n) ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0\n⊢ Tendsto (fun n => Exists.choose (_ : ∃ r, r ∈ Ioo 0 (Rs n) ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0)) atTop (𝓝 0)\n[PROOFSTEP]\nexact\n  tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds Rs_lim (fun n => (obs n).choose_spec.1.1.le) fun n =>\n    (obs n).choose_spec.1.2.le\n[GOAL]\ncase intro.intro.intro.refine'_2\nΩ : Type u_1\ninst✝³ : PseudoEMetricSpace Ω\ninst✝² : MeasurableSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : SigmaFinite μ\ns : Set Ω\nRs : ℕ → ℝ\nleft✝ : StrictAnti Rs\nRs_pos : ∀ (n : ℕ), 0 < Rs n\nRs_lim : Tendsto Rs atTop (𝓝 0)\nobs : ∀ (n : ℕ), ∃ r, r ∈ Ioo 0 (Rs n) ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0\n⊢ ∀ (n : ℕ),\n    0 < (fun n => Exists.choose (_ : ∃ r, r ∈ Ioo 0 (Rs n) ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0)) n ∧\n      ↑↑μ\n          (frontier\n            (Metric.thickening\n              ((fun n => Exists.choose (_ : ∃ r, r ∈ Ioo 0 (Rs n) ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0)) n)\n              s)) =\n        0\n[PROOFSTEP]\nexact fun n => ⟨(obs n).choose_spec.1.1, (obs n).choose_spec.2⟩\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.Portmanteau", "llama_tokens": 30201, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943603346811, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.3936903278489142}}
{"text": "[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nby_cases hm : m ≤ m0\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : ¬m ≤ m0\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : ¬m ≤ m0\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nsimp_rw [condexp_of_not_le hm]\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : ¬m ≤ m0\n⊢ 0 =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nby_cases hμm : SigmaFinite (μ.trim hm)\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm : ¬SigmaFinite (Measure.trim μ hm)\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm : ¬SigmaFinite (Measure.trim μ hm)\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nsimp_rw [condexp_of_not_sigmaFinite hm hμm]\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm : ¬SigmaFinite (Measure.trim μ hm)\n⊢ 0 =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nhaveI : SigmaFinite (μ.trim hm) := hμm\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nhave : SigmaFinite ((μ.restrict s).trim hm) :=\n  by\n  rw [← restrict_trim hm _ hs]\n  exact Restrict.sigmaFinite _ s\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\n⊢ SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\n[PROOFSTEP]\nrw [← restrict_trim hm _ hs]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\n⊢ SigmaFinite (Measure.restrict (Measure.trim μ hm) s)\n[PROOFSTEP]\nexact Restrict.sigmaFinite _ s\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nby_cases hf_int : Integrable f μ\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nhf_int : Integrable f\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nhf_int : ¬Integrable f\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nhf_int : ¬Integrable f\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nrw [condexp_undef hf_int]\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nhf_int : Integrable f\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nrefine' ae_eq_of_forall_set_integral_eq_of_sigmaFinite' hm _ _ _ _ _\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nhf_int : Integrable f\n⊢ ∀ (s_1 : Set α), MeasurableSet s_1 → ↑↑(Measure.restrict μ s) s_1 < ⊤ → IntegrableOn (μ[f|m]) s_1\n[PROOFSTEP]\nexact fun t _ _ => integrable_condexp.integrableOn.integrableOn\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nhf_int : Integrable f\n⊢ ∀ (s_1 : Set α), MeasurableSet s_1 → ↑↑(Measure.restrict μ s) s_1 < ⊤ → IntegrableOn 0 s_1\n[PROOFSTEP]\nexact fun t _ _ => (integrable_zero _ _ _).integrableOn\n[GOAL]\ncase pos.refine'_3\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nhf_int : Integrable f\n⊢ ∀ (s_1 : Set α),\n    MeasurableSet s_1 →\n      ↑↑(Measure.restrict μ s) s_1 < ⊤ →\n        ∫ (x : α) in s_1, (μ[f|m]) x ∂Measure.restrict μ s = ∫ (x : α) in s_1, OfNat.ofNat 0 x ∂Measure.restrict μ s\n[PROOFSTEP]\nintro t ht _\n[GOAL]\ncase pos.refine'_3\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑(Measure.restrict μ s) t < ⊤\n⊢ ∫ (x : α) in t, (μ[f|m]) x ∂Measure.restrict μ s = ∫ (x : α) in t, OfNat.ofNat 0 x ∂Measure.restrict μ s\n[PROOFSTEP]\nrw [Measure.restrict_restrict (hm _ ht), set_integral_condexp hm hf_int (ht.inter hs), ←\n  Measure.restrict_restrict (hm _ ht)]\n[GOAL]\ncase pos.refine'_3\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑(Measure.restrict μ s) t < ⊤\n⊢ ∫ (x : α) in t, f x ∂Measure.restrict μ s = ∫ (x : α) in t, OfNat.ofNat 0 x ∂Measure.restrict μ s\n[PROOFSTEP]\nrefine' set_integral_congr_ae (hm _ ht) _\n[GOAL]\ncase pos.refine'_3\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑(Measure.restrict μ s) t < ⊤\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, x ∈ t → f x = OfNat.ofNat 0 x\n[PROOFSTEP]\nfilter_upwards [hf] with x hx _ using hx\n[GOAL]\ncase pos.refine'_4\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nhf_int : Integrable f\n⊢ AEStronglyMeasurable' m (μ[f|m]) (Measure.restrict μ s)\n[PROOFSTEP]\nexact stronglyMeasurable_condexp.aeStronglyMeasurable'\n[GOAL]\ncase pos.refine'_5\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ s] 0\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nhf_int : Integrable f\n⊢ AEStronglyMeasurable' m 0 (Measure.restrict μ s)\n[PROOFSTEP]\nexact stronglyMeasurable_zero.aeStronglyMeasurable'\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ sᶜ] 0\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nby_cases hm : m ≤ m0\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ sᶜ] 0\nhm : m ≤ m0\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ sᶜ] 0\nhm : ¬m ≤ m0\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ sᶜ] 0\nhm : ¬m ≤ m0\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nsimp_rw [condexp_of_not_le hm, Set.indicator_zero']\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ sᶜ] 0\nhm : ¬m ≤ m0\n⊢ 0 =ᵐ[μ] 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ sᶜ] 0\nhm : m ≤ m0\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nhave hsf_zero : ∀ g : α → E, g =ᵐ[μ.restrict sᶜ] 0 → s.indicator g =ᵐ[μ] g := fun g =>\n  indicator_ae_eq_of_restrict_compl_ae_eq_zero (hm _ hs)\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ sᶜ] 0\nhm : m ≤ m0\nhsf_zero : ∀ (g : α → E), g =ᵐ[Measure.restrict μ sᶜ] 0 → Set.indicator s g =ᵐ[μ] g\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nrefine' ((hsf_zero (μ[f|m]) (condexp_ae_eq_restrict_zero hs.compl hf)).trans _).symm\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhs : MeasurableSet s\nhf : f =ᵐ[Measure.restrict μ sᶜ] 0\nhm : m ≤ m0\nhsf_zero : ∀ (g : α → E), g =ᵐ[Measure.restrict μ sᶜ] 0 → Set.indicator s g =ᵐ[μ] g\n⊢ μ[f|m] =ᵐ[μ] μ[Set.indicator s f|m]\n[PROOFSTEP]\nexact condexp_congr_ae (hsf_zero f hf).symm\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nby_cases hm : m ≤ m0\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : ¬m ≤ m0\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : ¬m ≤ m0\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nsimp_rw [condexp_of_not_le hm, Set.indicator_zero']\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : ¬m ≤ m0\n⊢ 0 =ᵐ[μ] 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nby_cases hμm : SigmaFinite (μ.trim hm)\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm : ¬SigmaFinite (Measure.trim μ hm)\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm : ¬SigmaFinite (Measure.trim μ hm)\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nsimp_rw [condexp_of_not_sigmaFinite hm hμm, Set.indicator_zero']\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm : ¬SigmaFinite (Measure.trim μ hm)\n⊢ 0 =ᵐ[μ] 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm : SigmaFinite (Measure.trim μ hm)\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nhaveI : SigmaFinite (μ.trim hm) := hμm\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nhave : s.indicator (μ[f|m]) =ᵐ[μ] s.indicator (μ[s.indicator f + sᶜ.indicator f|m]) := by\n  rw [Set.indicator_self_add_compl s f]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this : SigmaFinite (Measure.trim μ hm)\n⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n[PROOFSTEP]\nrw [Set.indicator_self_add_compl s f]\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nrefine' (this.trans _).symm\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n⊢ Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m]) =ᵐ[μ] μ[Set.indicator s f|m]\n[PROOFSTEP]\ncalc\n  s.indicator (μ[s.indicator f + sᶜ.indicator f|m]) =ᵐ[μ] s.indicator (μ[s.indicator f|m] + μ[sᶜ.indicator f|m]) :=\n    by\n    have : μ[s.indicator f + sᶜ.indicator f|m] =ᵐ[μ] μ[s.indicator f|m] + μ[sᶜ.indicator f|m] :=\n      condexp_add (hf_int.indicator (hm _ hs)) (hf_int.indicator (hm _ hs.compl))\n    filter_upwards [this] with x hx\n    classical rw [Set.indicator_apply, Set.indicator_apply, hx]\n  _ = s.indicator (μ[s.indicator f|m]) + s.indicator (μ[sᶜ.indicator f|m]) := (s.indicator_add' _ _)\n  _ =ᵐ[μ] s.indicator (μ[s.indicator f|m]) + s.indicator (sᶜ.indicator (μ[sᶜ.indicator f|m])) :=\n    by\n    refine' Filter.EventuallyEq.rfl.add _\n    have : sᶜ.indicator (μ[sᶜ.indicator f|m]) =ᵐ[μ] μ[sᶜ.indicator f|m] :=\n      by\n      refine' (condexp_indicator_aux hs.compl _).symm.trans _\n      · exact indicator_ae_eq_restrict_compl (hm _ hs.compl)\n      · rw [Set.indicator_indicator, Set.inter_self]\n    filter_upwards [this] with x hx\n    by_cases hxs : x ∈ s\n    · simp only [hx, hxs, Set.indicator_of_mem]\n    · simp only [hxs, Set.indicator_of_not_mem, not_false_iff]\n  _ =ᵐ[μ] s.indicator (μ[s.indicator f|m]) := by\n    rw [Set.indicator_indicator, Set.inter_compl_self, Set.indicator_empty', add_zero]\n  _ =ᵐ[μ] μ[s.indicator f|m] := by\n    refine' (condexp_indicator_aux hs _).symm.trans _\n    · exact indicator_ae_eq_restrict_compl (hm _ hs)\n    · rw [Set.indicator_indicator, Set.inter_self]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n⊢ Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m]) =ᵐ[μ]\n    Set.indicator s (μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m])\n[PROOFSTEP]\nhave : μ[s.indicator f + sᶜ.indicator f|m] =ᵐ[μ] μ[s.indicator f|m] + μ[sᶜ.indicator f|m] :=\n  condexp_add (hf_int.indicator (hm _ hs)) (hf_int.indicator (hm _ hs.compl))\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝¹ : SigmaFinite (Measure.trim μ hm)\nthis✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\nthis : μ[Set.indicator s f + Set.indicator sᶜ f|m] =ᵐ[μ] μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]\n⊢ Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m]) =ᵐ[μ]\n    Set.indicator s (μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m])\n[PROOFSTEP]\nfilter_upwards [this] with x hx\n[GOAL]\ncase h\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝¹ : SigmaFinite (Measure.trim μ hm)\nthis✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\nthis : μ[Set.indicator s f + Set.indicator sᶜ f|m] =ᵐ[μ] μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]\nx : α\nhx : (μ[Set.indicator s f + Set.indicator sᶜ f|m]) x = (μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]) x\n⊢ Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m]) x =\n    Set.indicator s (μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]) x\n[PROOFSTEP]\nclassical rw [Set.indicator_apply, Set.indicator_apply, hx]\n[GOAL]\ncase h\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝¹ : SigmaFinite (Measure.trim μ hm)\nthis✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\nthis : μ[Set.indicator s f + Set.indicator sᶜ f|m] =ᵐ[μ] μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]\nx : α\nhx : (μ[Set.indicator s f + Set.indicator sᶜ f|m]) x = (μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]) x\n⊢ Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m]) x =\n    Set.indicator s (μ[Set.indicator s f|m] + μ[Set.indicator sᶜ f|m]) x\n[PROOFSTEP]\nrw [Set.indicator_apply, Set.indicator_apply, hx]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n⊢ Set.indicator s (μ[Set.indicator s f|m]) + Set.indicator s (μ[Set.indicator sᶜ f|m]) =ᵐ[μ]\n    Set.indicator s (μ[Set.indicator s f|m]) + Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]))\n[PROOFSTEP]\nrefine' Filter.EventuallyEq.rfl.add _\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n⊢ (fun x => Set.indicator s (μ[Set.indicator sᶜ f|m]) x) =ᵐ[μ] fun x =>\n    Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m])) x\n[PROOFSTEP]\nhave : sᶜ.indicator (μ[sᶜ.indicator f|m]) =ᵐ[μ] μ[sᶜ.indicator f|m] :=\n  by\n  refine' (condexp_indicator_aux hs.compl _).symm.trans _\n  · exact indicator_ae_eq_restrict_compl (hm _ hs.compl)\n  · rw [Set.indicator_indicator, Set.inter_self]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n⊢ Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) =ᵐ[μ] μ[Set.indicator sᶜ f|m]\n[PROOFSTEP]\nrefine' (condexp_indicator_aux hs.compl _).symm.trans _\n[GOAL]\ncase refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n⊢ Set.indicator sᶜ f =ᵐ[Measure.restrict μ sᶜᶜ] 0\n[PROOFSTEP]\nexact indicator_ae_eq_restrict_compl (hm _ hs.compl)\n[GOAL]\ncase refine'_2\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n⊢ μ[Set.indicator sᶜ (Set.indicator sᶜ f)|m] =ᵐ[μ] μ[Set.indicator sᶜ f|m]\n[PROOFSTEP]\nrw [Set.indicator_indicator, Set.inter_self]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝¹ : SigmaFinite (Measure.trim μ hm)\nthis✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\nthis : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) =ᵐ[μ] μ[Set.indicator sᶜ f|m]\n⊢ (fun x => Set.indicator s (μ[Set.indicator sᶜ f|m]) x) =ᵐ[μ] fun x =>\n    Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m])) x\n[PROOFSTEP]\nfilter_upwards [this] with x hx\n[GOAL]\ncase h\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝¹ : SigmaFinite (Measure.trim μ hm)\nthis✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\nthis : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) =ᵐ[μ] μ[Set.indicator sᶜ f|m]\nx : α\nhx : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) x = (μ[Set.indicator sᶜ f|m]) x\n⊢ Set.indicator s (μ[Set.indicator sᶜ f|m]) x = Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m])) x\n[PROOFSTEP]\nby_cases hxs : x ∈ s\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝¹ : SigmaFinite (Measure.trim μ hm)\nthis✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\nthis : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) =ᵐ[μ] μ[Set.indicator sᶜ f|m]\nx : α\nhx : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) x = (μ[Set.indicator sᶜ f|m]) x\nhxs : x ∈ s\n⊢ Set.indicator s (μ[Set.indicator sᶜ f|m]) x = Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m])) x\n[PROOFSTEP]\nsimp only [hx, hxs, Set.indicator_of_mem]\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝¹ : SigmaFinite (Measure.trim μ hm)\nthis✝ : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\nthis : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) =ᵐ[μ] μ[Set.indicator sᶜ f|m]\nx : α\nhx : Set.indicator sᶜ (μ[Set.indicator sᶜ f|m]) x = (μ[Set.indicator sᶜ f|m]) x\nhxs : ¬x ∈ s\n⊢ Set.indicator s (μ[Set.indicator sᶜ f|m]) x = Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m])) x\n[PROOFSTEP]\nsimp only [hxs, Set.indicator_of_not_mem, not_false_iff]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n⊢ Set.indicator s (μ[Set.indicator s f|m]) + Set.indicator s (Set.indicator sᶜ (μ[Set.indicator sᶜ f|m])) =ᵐ[μ]\n    Set.indicator s (μ[Set.indicator s f|m])\n[PROOFSTEP]\nrw [Set.indicator_indicator, Set.inter_compl_self, Set.indicator_empty', add_zero]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n⊢ Set.indicator s (μ[Set.indicator s f|m]) =ᵐ[μ] μ[Set.indicator s f|m]\n[PROOFSTEP]\nrefine' (condexp_indicator_aux hs _).symm.trans _\n[GOAL]\ncase refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n⊢ Set.indicator s f =ᵐ[Measure.restrict μ sᶜ] 0\n[PROOFSTEP]\nexact indicator_ae_eq_restrict_compl (hm _ hs)\n[GOAL]\ncase refine'_2\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhf_int : Integrable f\nhs : MeasurableSet s\nhm : m ≤ m0\nhμm this✝ : SigmaFinite (Measure.trim μ hm)\nthis : Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[Set.indicator s f + Set.indicator sᶜ f|m])\n⊢ μ[Set.indicator s (Set.indicator s f)|m] =ᵐ[μ] μ[Set.indicator s f|m]\n[PROOFSTEP]\nrw [Set.indicator_indicator, Set.inter_self]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\n⊢ Measure.restrict μ s[f|m] =ᵐ[Measure.restrict μ s] μ[f|m]\n[PROOFSTEP]\nhave : SigmaFinite ((μ.restrict s).trim hm) := by rw [← restrict_trim hm _ hs_m]; infer_instance\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\n⊢ SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\n[PROOFSTEP]\nrw [← restrict_trim hm _ hs_m]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\n⊢ SigmaFinite (Measure.restrict (Measure.trim μ hm) s)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\n⊢ Measure.restrict μ s[f|m] =ᵐ[Measure.restrict μ s] μ[f|m]\n[PROOFSTEP]\nrw [ae_eq_restrict_iff_indicator_ae_eq (hm _ hs_m)]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\n⊢ Set.indicator s (Measure.restrict μ s[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m])\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (condexp_indicator hf_int hs_m)\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\n⊢ Set.indicator s (Measure.restrict μ s[f|m]) =ᵐ[μ] μ[Set.indicator s f|m]\n[PROOFSTEP]\nrefine' ae_eq_condexp_of_forall_set_integral_eq hm (hf_int.indicator (hm _ hs_m)) _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\n⊢ ∀ (s_1 : Set α), MeasurableSet s_1 → ↑↑μ s_1 < ⊤ → IntegrableOn (Set.indicator s (Measure.restrict μ s[f|m])) s_1\n[PROOFSTEP]\nintro t ht _\n[GOAL]\ncase refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ IntegrableOn (Set.indicator s (Measure.restrict μ s[f|m])) t\n[PROOFSTEP]\nrw [← integrable_indicator_iff (hm _ ht), Set.indicator_indicator, Set.inter_comm, ← Set.indicator_indicator]\n[GOAL]\ncase refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ Integrable (Set.indicator s (Set.indicator t (Measure.restrict μ s[f|m])))\n[PROOFSTEP]\nsuffices h_int_restrict : Integrable (t.indicator ((μ.restrict s)[f|m])) (μ.restrict s)\n[GOAL]\ncase refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\nh_int_restrict : Integrable (Set.indicator t (Measure.restrict μ s[f|m]))\n⊢ Integrable (Set.indicator s (Set.indicator t (Measure.restrict μ s[f|m])))\n[PROOFSTEP]\nrw [integrable_indicator_iff (hm _ hs_m), IntegrableOn]\n[GOAL]\ncase refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\nh_int_restrict : Integrable (Set.indicator t (Measure.restrict μ s[f|m]))\n⊢ Integrable (Set.indicator t (Measure.restrict μ s[f|m]))\n[PROOFSTEP]\nrw [integrable_indicator_iff (hm _ ht), IntegrableOn] at h_int_restrict ⊢\n[GOAL]\ncase refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\nh_int_restrict : Integrable (Measure.restrict μ s[f|m])\n⊢ Integrable (Measure.restrict μ s[f|m])\n[PROOFSTEP]\nexact h_int_restrict\n[GOAL]\ncase h_int_restrict\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ Integrable (Set.indicator t (Measure.restrict μ s[f|m]))\n[PROOFSTEP]\nexact integrable_condexp.indicator (hm _ ht)\n[GOAL]\ncase refine'_2\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\n⊢ ∀ (s_1 : Set α),\n    MeasurableSet s_1 →\n      ↑↑μ s_1 < ⊤ →\n        ∫ (x : α) in s_1, Set.indicator s (Measure.restrict μ s[f|m]) x ∂μ = ∫ (x : α) in s_1, Set.indicator s f x ∂μ\n[PROOFSTEP]\nintro t ht _\n[GOAL]\ncase refine'_2\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ ∫ (x : α) in t, Set.indicator s (Measure.restrict μ s[f|m]) x ∂μ = ∫ (x : α) in t, Set.indicator s f x ∂μ\n[PROOFSTEP]\ncalc\n  ∫ x in t, s.indicator ((μ.restrict s)[f|m]) x ∂μ = ∫ x in t, ((μ.restrict s)[f|m]) x ∂μ.restrict s := by\n    rw [integral_indicator (hm _ hs_m), Measure.restrict_restrict (hm _ hs_m), Measure.restrict_restrict (hm _ ht),\n      Set.inter_comm]\n  _ = ∫ x in t, f x ∂μ.restrict s := (set_integral_condexp hm hf_int.integrableOn ht)\n  _ = ∫ x in t, s.indicator f x ∂μ := by\n    rw [integral_indicator (hm _ hs_m), Measure.restrict_restrict (hm _ hs_m), Measure.restrict_restrict (hm _ ht),\n      Set.inter_comm]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ ∫ (x : α) in t, Set.indicator s (Measure.restrict μ s[f|m]) x ∂μ =\n    ∫ (x : α) in t, (Measure.restrict μ s[f|m]) x ∂Measure.restrict μ s\n[PROOFSTEP]\nrw [integral_indicator (hm _ hs_m), Measure.restrict_restrict (hm _ hs_m), Measure.restrict_restrict (hm _ ht),\n  Set.inter_comm]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ ∫ (x : α) in t, f x ∂Measure.restrict μ s = ∫ (x : α) in t, Set.indicator s f x ∂μ\n[PROOFSTEP]\nrw [integral_indicator (hm _ hs_m), Measure.restrict_restrict (hm _ hs_m), Measure.restrict_restrict (hm _ ht),\n  Set.inter_comm]\n[GOAL]\ncase refine'_3\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm m0 : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nf : α → E\ns : Set α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs_m : MeasurableSet s\nhf_int : Integrable f\nthis : SigmaFinite (Measure.trim (Measure.restrict μ s) hm)\n⊢ AEStronglyMeasurable' m (Set.indicator s (Measure.restrict μ s[f|m])) μ\n[PROOFSTEP]\nexact (stronglyMeasurable_condexp.indicator hs_m).aeStronglyMeasurable'\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\n⊢ μ[f|m] =ᵐ[Measure.restrict μ s] μ[f|m₂]\n[PROOFSTEP]\nrw [ae_eq_restrict_iff_indicator_ae_eq (hm _ hs_m)]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\n⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m₂])\n[PROOFSTEP]\nhave hs_m₂ : MeasurableSet[m₂] s := by rwa [← Set.inter_univ s, ← hs Set.univ, Set.inter_univ]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\n⊢ MeasurableSet s\n[PROOFSTEP]\nrwa [← Set.inter_univ s, ← hs Set.univ, Set.inter_univ]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\n⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m₂])\n[PROOFSTEP]\nby_cases hf_int : Integrable f μ\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\n⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m₂])\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : ¬Integrable f\n⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m₂])\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : ¬Integrable f\n⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m₂])\n[PROOFSTEP]\nsimp_rw [condexp_undef hf_int]\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : ¬Integrable f\n⊢ Set.indicator s 0 =ᵐ[μ] Set.indicator s 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\n⊢ Set.indicator s (μ[f|m]) =ᵐ[μ] Set.indicator s (μ[f|m₂])\n[PROOFSTEP]\nrefine' ((condexp_indicator hf_int hs_m).symm.trans _).trans (condexp_indicator hf_int hs_m₂)\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\n⊢ μ[Set.indicator s f|m] =ᵐ[μ] μ[Set.indicator s f|m₂]\n[PROOFSTEP]\nrefine'\n  ae_eq_of_forall_set_integral_eq_of_sigmaFinite' hm₂ (fun s _ _ => integrable_condexp.integrableOn)\n    (fun s _ _ => integrable_condexp.integrableOn) _ _ stronglyMeasurable_condexp.aeStronglyMeasurable'\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\n⊢ ∀ (s_1 : Set α),\n    MeasurableSet s_1 →\n      ↑↑μ s_1 < ⊤ → ∫ (x : α) in s_1, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in s_1, (μ[Set.indicator s f|m₂]) x ∂μ\ncase pos.refine'_2\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\n⊢ AEStronglyMeasurable' m₂ (μ[Set.indicator s f|m]) μ\n[PROOFSTEP]\nswap\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\n⊢ AEStronglyMeasurable' m₂ (μ[Set.indicator s f|m]) μ\n[PROOFSTEP]\nhave : StronglyMeasurable[m] (μ[s.indicator f|m]) := stronglyMeasurable_condexp\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nthis : StronglyMeasurable (μ[Set.indicator s f|m])\n⊢ AEStronglyMeasurable' m₂ (μ[Set.indicator s f|m]) μ\n[PROOFSTEP]\nrefine' this.aeStronglyMeasurable'.aeStronglyMeasurable'_of_measurableSpace_le_on hm hs_m (fun t => (hs t).mp) _\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nthis : StronglyMeasurable (μ[Set.indicator s f|m])\n⊢ μ[Set.indicator s f|m] =ᵐ[Measure.restrict μ sᶜ] 0\n[PROOFSTEP]\nexact condexp_ae_eq_restrict_zero hs_m.compl (indicator_ae_eq_restrict_compl (hm _ hs_m))\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\n⊢ ∀ (s_1 : Set α),\n    MeasurableSet s_1 →\n      ↑↑μ s_1 < ⊤ → ∫ (x : α) in s_1, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in s_1, (μ[Set.indicator s f|m₂]) x ∂μ\n[PROOFSTEP]\nintro t ht _\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in t, (μ[Set.indicator s f|m₂]) x ∂μ\n[PROOFSTEP]\nhave : ∫ x in t, (μ[s.indicator f|m]) x ∂μ = ∫ x in s ∩ t, (μ[s.indicator f|m]) x ∂μ :=\n  by\n  rw [← integral_add_compl (hm _ hs_m) integrable_condexp.integrableOn]\n  suffices ∫ x in sᶜ, (μ[s.indicator f|m]) x ∂μ.restrict t = 0 by\n    rw [this, add_zero, Measure.restrict_restrict (hm _ hs_m)]\n  rw [Measure.restrict_restrict (MeasurableSet.compl (hm _ hs_m))]\n  suffices μ[s.indicator f|m] =ᵐ[μ.restrict sᶜ] 0\n    by\n    rw [Set.inter_comm, ← Measure.restrict_restrict (hm₂ _ ht)]\n    calc\n      ∫ x : α in t, (μ[s.indicator f|m]) x ∂μ.restrict sᶜ = ∫ x : α in t, 0 ∂μ.restrict sᶜ :=\n        by\n        refine' set_integral_congr_ae (hm₂ _ ht) _\n        filter_upwards [this] with x hx _ using hx\n      _ = 0 := integral_zero _ _\n  refine' condexp_ae_eq_restrict_zero hs_m.compl _\n  exact indicator_ae_eq_restrict_compl (hm _ hs_m)\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in s ∩ t, (μ[Set.indicator s f|m]) x ∂μ\n[PROOFSTEP]\nrw [← integral_add_compl (hm _ hs_m) integrable_condexp.integrableOn]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ ∫ (x : α) in s, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ t +\n      ∫ (x : α) in sᶜ, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ t =\n    ∫ (x : α) in s ∩ t, (μ[Set.indicator s f|m]) x ∂μ\n[PROOFSTEP]\nsuffices ∫ x in sᶜ, (μ[s.indicator f|m]) x ∂μ.restrict t = 0 by\n  rw [this, add_zero, Measure.restrict_restrict (hm _ hs_m)]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\nthis : ∫ (x : α) in sᶜ, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ t = 0\n⊢ ∫ (x : α) in s, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ t +\n      ∫ (x : α) in sᶜ, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ t =\n    ∫ (x : α) in s ∩ t, (μ[Set.indicator s f|m]) x ∂μ\n[PROOFSTEP]\nrw [this, add_zero, Measure.restrict_restrict (hm _ hs_m)]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ ∫ (x : α) in sᶜ, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ t = 0\n[PROOFSTEP]\nrw [Measure.restrict_restrict (MeasurableSet.compl (hm _ hs_m))]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ ∫ (x : α) in sᶜ ∩ t, (μ[Set.indicator s f|m]) x ∂μ = 0\n[PROOFSTEP]\nsuffices μ[s.indicator f|m] =ᵐ[μ.restrict sᶜ] 0\n  by\n  rw [Set.inter_comm, ← Measure.restrict_restrict (hm₂ _ ht)]\n  calc\n    ∫ x : α in t, (μ[s.indicator f|m]) x ∂μ.restrict sᶜ = ∫ x : α in t, 0 ∂μ.restrict sᶜ :=\n      by\n      refine' set_integral_congr_ae (hm₂ _ ht) _\n      filter_upwards [this] with x hx _ using hx\n    _ = 0 := integral_zero _ _\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\nthis : μ[Set.indicator s f|m] =ᵐ[Measure.restrict μ sᶜ] 0\n⊢ ∫ (x : α) in sᶜ ∩ t, (μ[Set.indicator s f|m]) x ∂μ = 0\n[PROOFSTEP]\nrw [Set.inter_comm, ← Measure.restrict_restrict (hm₂ _ ht)]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\nthis : μ[Set.indicator s f|m] =ᵐ[Measure.restrict μ sᶜ] 0\n⊢ ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ sᶜ = 0\n[PROOFSTEP]\ncalc\n  ∫ x : α in t, (μ[s.indicator f|m]) x ∂μ.restrict sᶜ = ∫ x : α in t, 0 ∂μ.restrict sᶜ :=\n    by\n    refine' set_integral_congr_ae (hm₂ _ ht) _\n    filter_upwards [this] with x hx _ using hx\n  _ = 0 := integral_zero _ _\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\nthis : μ[Set.indicator s f|m] =ᵐ[Measure.restrict μ sᶜ] 0\n⊢ ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂Measure.restrict μ sᶜ = ∫ (x : α) in t, 0 ∂Measure.restrict μ sᶜ\n[PROOFSTEP]\nrefine' set_integral_congr_ae (hm₂ _ ht) _\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\nthis : μ[Set.indicator s f|m] =ᵐ[Measure.restrict μ sᶜ] 0\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ sᶜ, x ∈ t → (μ[Set.indicator s f|m]) x = 0\n[PROOFSTEP]\nfilter_upwards [this] with x hx _ using hx\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ μ[Set.indicator s f|m] =ᵐ[Measure.restrict μ sᶜ] 0\n[PROOFSTEP]\nrefine' condexp_ae_eq_restrict_zero hs_m.compl _\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ Set.indicator s f =ᵐ[Measure.restrict μ sᶜ] 0\n[PROOFSTEP]\nexact indicator_ae_eq_restrict_compl (hm _ hs_m)\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\nthis : ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in s ∩ t, (μ[Set.indicator s f|m]) x ∂μ\n⊢ ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in t, (μ[Set.indicator s f|m₂]) x ∂μ\n[PROOFSTEP]\nhave hst_m : MeasurableSet[m] (s ∩ t) := (hs _).mpr (hs_m₂.inter ht)\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nm✝ m0✝ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nμ✝ : Measure α\nf : α → E\ns : Set α\nm m₂ m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nhm₂ : m₂ ≤ m0\ninst✝¹ : SigmaFinite (Measure.trim μ hm)\ninst✝ : SigmaFinite (Measure.trim μ hm₂)\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) ↔ MeasurableSet (s ∩ t)\nhs_m₂ : MeasurableSet s\nhf_int : Integrable f\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\nthis : ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in s ∩ t, (μ[Set.indicator s f|m]) x ∂μ\nhst_m : MeasurableSet (s ∩ t)\n⊢ ∫ (x : α) in t, (μ[Set.indicator s f|m]) x ∂μ = ∫ (x : α) in t, (μ[Set.indicator s f|m₂]) x ∂μ\n[PROOFSTEP]\nsimp_rw [this, set_integral_condexp hm₂ (hf_int.indicator (hm _ hs_m)) ht,\n  set_integral_condexp hm (hf_int.indicator (hm _ hs_m)) hst_m, integral_indicator (hm _ hs_m),\n  Measure.restrict_restrict (hm _ hs_m), ← Set.inter_assoc, Set.inter_self]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.ConditionalExpectation.Indicator", "llama_tokens": 32378, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7520125737597971, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.39361868376185616}}
{"text": "[GOAL]\np n k : ℕ\n⊢ ↑(factorization (choose n k)) p ≤ log p n\n[PROOFSTEP]\nby_cases h : (choose n k).factorization p = 0\n[GOAL]\ncase pos\np n k : ℕ\nh : ↑(factorization (choose n k)) p = 0\n⊢ ↑(factorization (choose n k)) p ≤ log p n\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\np n k : ℕ\nh : ¬↑(factorization (choose n k)) p = 0\n⊢ ↑(factorization (choose n k)) p ≤ log p n\n[PROOFSTEP]\nhave hp : p.Prime := Not.imp_symm (choose n k).factorization_eq_zero_of_non_prime h\n[GOAL]\ncase neg\np n k : ℕ\nh : ¬↑(factorization (choose n k)) p = 0\nhp : Prime p\n⊢ ↑(factorization (choose n k)) p ≤ log p n\n[PROOFSTEP]\nhave hkn : k ≤ n := by\n  refine' le_of_not_lt fun hnk => h _\n  simp [choose_eq_zero_of_lt hnk]\n[GOAL]\np n k : ℕ\nh : ¬↑(factorization (choose n k)) p = 0\nhp : Prime p\n⊢ k ≤ n\n[PROOFSTEP]\nrefine' le_of_not_lt fun hnk => h _\n[GOAL]\np n k : ℕ\nh : ¬↑(factorization (choose n k)) p = 0\nhp : Prime p\nhnk : n < k\n⊢ ↑(factorization (choose n k)) p = 0\n[PROOFSTEP]\nsimp [choose_eq_zero_of_lt hnk]\n[GOAL]\ncase neg\np n k : ℕ\nh : ¬↑(factorization (choose n k)) p = 0\nhp : Prime p\nhkn : k ≤ n\n⊢ ↑(factorization (choose n k)) p ≤ log p n\n[PROOFSTEP]\nrw [factorization_def _ hp, @padicValNat_def _ ⟨hp⟩ _ (choose_pos hkn)]\n[GOAL]\ncase neg\np n k : ℕ\nh : ¬↑(factorization (choose n k)) p = 0\nhp : Prime p\nhkn : k ≤ n\n⊢ Part.get (multiplicity p (choose n k)) (_ : multiplicity.Finite p (choose n k)) ≤ log p n\n[PROOFSTEP]\nsimp only [hp.multiplicity_choose hkn (lt_add_one _), PartENat.get_natCast]\n[GOAL]\ncase neg\np n k : ℕ\nh : ¬↑(factorization (choose n k)) p = 0\nhp : Prime p\nhkn : k ≤ n\n⊢ Finset.card (Finset.filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Finset.Ico 1 (log p n + 1))) ≤ log p n\n[PROOFSTEP]\nrefine (Finset.card_filter_le _ _).trans (le_of_eq (Nat.card_Ico _ _))\n[GOAL]\np n k : ℕ\np_large : n < p ^ 2\n⊢ ↑(factorization (choose n k)) p ≤ 1\n[PROOFSTEP]\napply factorization_choose_le_log.trans\n[GOAL]\np n k : ℕ\np_large : n < p ^ 2\n⊢ log p n ≤ 1\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn0)\n[GOAL]\ncase inl\np k : ℕ\np_large : 0 < p ^ 2\n⊢ log p 0 ≤ 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\np n k : ℕ\np_large : n < p ^ 2\nhn0 : n ≠ 0\n⊢ log p n ≤ 1\n[PROOFSTEP]\nexact lt_succ_iff.1 (log_lt_of_lt_pow hn0 p_large)\n[GOAL]\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\n⊢ ↑(factorization (choose n k)) p = 0\n[PROOFSTEP]\ncases' em' p.Prime with hp hp\n[GOAL]\ncase inl\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : ¬Prime p\n⊢ ↑(factorization (choose n k)) p = 0\n[PROOFSTEP]\nexact factorization_eq_zero_of_non_prime (choose n k) hp\n[GOAL]\ncase inr\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : Prime p\n⊢ ↑(factorization (choose n k)) p = 0\n[PROOFSTEP]\ncases' lt_or_le n k with hnk hkn\n[GOAL]\ncase inr.inl\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : Prime p\nhnk : n < k\n⊢ ↑(factorization (choose n k)) p = 0\n[PROOFSTEP]\nsimp [choose_eq_zero_of_lt hnk]\n[GOAL]\ncase inr.inr\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : Prime p\nhkn : k ≤ n\n⊢ ↑(factorization (choose n k)) p = 0\n[PROOFSTEP]\nrw [factorization_def _ hp, @padicValNat_def _ ⟨hp⟩ _ (choose_pos hkn)]\n[GOAL]\ncase inr.inr\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : Prime p\nhkn : k ≤ n\n⊢ Part.get (multiplicity p (choose n k)) (_ : multiplicity.Finite p (choose n k)) = 0\n[PROOFSTEP]\nsimp only [hp.multiplicity_choose hkn (lt_add_one _), PartENat.get_natCast, Finset.card_eq_zero,\n  Finset.filter_eq_empty_iff, not_le]\n[GOAL]\ncase inr.inr\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : Prime p\nhkn : k ≤ n\n⊢ ∀ (x : ℕ), x ∈ Finset.Ico 1 (log p n + 1) → k % p ^ x + (n - k) % p ^ x < p ^ x\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase inr.inr\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : Prime p\nhkn : k ≤ n\ni : ℕ\nhi : i ∈ Finset.Ico 1 (log p n + 1)\n⊢ k % p ^ i + (n - k) % p ^ i < p ^ i\n[PROOFSTEP]\nrcases eq_or_lt_of_le (Finset.mem_Ico.mp hi).1 with (rfl | hi)\n[GOAL]\ncase inr.inr.inl\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : Prime p\nhkn : k ≤ n\nhi : 1 ∈ Finset.Ico 1 (log p n + 1)\n⊢ k % p ^ 1 + (n - k) % p ^ 1 < p ^ 1\n[PROOFSTEP]\nrw [pow_one, ← add_lt_add_iff_left (2 * p), ← succ_mul, two_mul, add_add_add_comm]\n[GOAL]\ncase inr.inr.inl\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : Prime p\nhkn : k ≤ n\nhi : 1 ∈ Finset.Ico 1 (log p n + 1)\n⊢ p + k % p + (p + (n - k) % p) < succ 2 * p\n[PROOFSTEP]\nexact\n  lt_of_le_of_lt\n    (add_le_add (add_le_add_right (le_mul_of_one_le_right' ((one_le_div_iff hp.pos).mpr hk)) (k % p))\n      (add_le_add_right (le_mul_of_one_le_right' ((one_le_div_iff hp.pos).mpr hk')) ((n - k) % p)))\n    (by rwa [div_add_mod, div_add_mod, add_tsub_cancel_of_le hkn])\n[GOAL]\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : Prime p\nhkn : k ≤ n\nhi : 1 ∈ Finset.Ico 1 (log p n + 1)\n⊢ p * (k / p) + k % p + (p * ((n - k) / p) + (n - k) % p) < succ 2 * p\n[PROOFSTEP]\nrwa [div_add_mod, div_add_mod, add_tsub_cancel_of_le hkn]\n[GOAL]\ncase inr.inr.inr\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : Prime p\nhkn : k ≤ n\ni : ℕ\nhi✝ : i ∈ Finset.Ico 1 (log p n + 1)\nhi : 1 < i\n⊢ k % p ^ i + (n - k) % p ^ i < p ^ i\n[PROOFSTEP]\nreplace hn : n < p ^ i\n[GOAL]\ncase hn\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : Prime p\nhkn : k ≤ n\ni : ℕ\nhi✝ : i ∈ Finset.Ico 1 (log p n + 1)\nhi : 1 < i\n⊢ n < p ^ i\ncase inr.inr.inr\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhp : Prime p\nhkn : k ≤ n\ni : ℕ\nhi✝ : i ∈ Finset.Ico 1 (log p n + 1)\nhi : 1 < i\nhn : n < p ^ i\n⊢ k % p ^ i + (n - k) % p ^ i < p ^ i\n[PROOFSTEP]\nhave : 3 ≤ p := lt_of_le_of_ne hp.two_le hp'.symm\n[GOAL]\ncase hn\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhn : n < 3 * p\nhp : Prime p\nhkn : k ≤ n\ni : ℕ\nhi✝ : i ∈ Finset.Ico 1 (log p n + 1)\nhi : 1 < i\nthis : 3 ≤ p\n⊢ n < p ^ i\n[PROOFSTEP]\ncalc\n  n < 3 * p := hn\n  _ ≤ p * p := (mul_le_mul_right' this p)\n  _ = p ^ 2 := (sq p).symm\n  _ ≤ p ^ i := pow_le_pow hp.one_lt.le hi\n[GOAL]\ncase inr.inr.inr\np n k : ℕ\nhp' : p ≠ 2\nhk : p ≤ k\nhk' : p ≤ n - k\nhp : Prime p\nhkn : k ≤ n\ni : ℕ\nhi✝ : i ∈ Finset.Ico 1 (log p n + 1)\nhi : 1 < i\nhn : n < p ^ i\n⊢ k % p ^ i + (n - k) % p ^ i < p ^ i\n[PROOFSTEP]\nrwa [mod_eq_of_lt (lt_of_le_of_lt hkn hn), mod_eq_of_lt (lt_of_le_of_lt tsub_le_self hn), add_tsub_cancel_of_le hkn]\n[GOAL]\np n k : ℕ\nn_big : 2 < n\np_le_n : p ≤ n\nbig : 2 * n < 3 * p\n⊢ ↑(factorization (centralBinom n)) p = 0\n[PROOFSTEP]\nrefine' factorization_choose_of_lt_three_mul _ p_le_n (p_le_n.trans _) big\n[GOAL]\ncase refine'_1\np n k : ℕ\nn_big : 2 < n\np_le_n : p ≤ n\nbig : 2 * n < 3 * p\n⊢ p ≠ 2\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\nn k : ℕ\nn_big : 2 < n\np_le_n : 2 ≤ n\nbig : 2 * n < 3 * 2\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_2\np n k : ℕ\nn_big : 2 < n\np_le_n : p ≤ n\nbig : 2 * n < 3 * p\n⊢ n ≤ 2 * n - n\n[PROOFSTEP]\nrw [two_mul, add_tsub_cancel_left]\n[GOAL]\np n k : ℕ\nh : n < p\n⊢ ↑(factorization n !) p = 0\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\np n k : ℕ\nh✝ : n < p\nh : zero < p\n⊢ ↑(factorization zero !) p = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\np n✝ k : ℕ\nh✝ : n✝ < p\nn : ℕ\nhn : n < p → ↑(factorization n !) p = 0\nh : succ n < p\n⊢ ↑(factorization (succ n)!) p = 0\n[PROOFSTEP]\nrw [factorial_succ, factorization_mul n.succ_ne_zero n.factorial_ne_zero, Finsupp.coe_add, Pi.add_apply,\n  hn (lt_of_succ_lt h), add_zero, factorization_eq_zero_of_lt h]\n[GOAL]\np n k : ℕ\nh : n < p\n⊢ ↑(factorization (choose n k)) p = 0\n[PROOFSTEP]\nby_cases hnk : n < k\n[GOAL]\ncase pos\np n k : ℕ\nh : n < p\nhnk : n < k\n⊢ ↑(factorization (choose n k)) p = 0\n[PROOFSTEP]\nsimp [choose_eq_zero_of_lt hnk]\n[GOAL]\ncase neg\np n k : ℕ\nh : n < p\nhnk : ¬n < k\n⊢ ↑(factorization (choose n k)) p = 0\n[PROOFSTEP]\nrw [choose_eq_factorial_div_factorial (le_of_not_lt hnk),\n  factorization_div (factorial_mul_factorial_dvd_factorial (le_of_not_lt hnk)), Finsupp.coe_tsub, Pi.sub_apply,\n  factorization_factorial_eq_zero_of_lt h, zero_tsub]\n[GOAL]\np n✝ k✝ n k : ℕ\nhkn : k ≤ n\n⊢ ∏ p in Finset.range (n + 1), p ^ ↑(factorization (choose n k)) p = choose n k\n[PROOFSTEP]\nconv =>\n  -- Porting note: was `nth_rw_rhs`\n  rhs\n  rw [← factorization_prod_pow_eq_self (choose_pos hkn).ne']\n[GOAL]\np n✝ k✝ n k : ℕ\nhkn : k ≤ n\n| ∏ p in Finset.range (n + 1), p ^ ↑(factorization (choose n k)) p = choose n k\n[PROOFSTEP]\n  rhs\n  rw [← factorization_prod_pow_eq_self (choose_pos hkn).ne']\n[GOAL]\np n✝ k✝ n k : ℕ\nhkn : k ≤ n\n| ∏ p in Finset.range (n + 1), p ^ ↑(factorization (choose n k)) p = choose n k\n[PROOFSTEP]\n  rhs\n  rw [← factorization_prod_pow_eq_self (choose_pos hkn).ne']\n[GOAL]\np n✝ k✝ n k : ℕ\nhkn : k ≤ n\n| ∏ p in Finset.range (n + 1), p ^ ↑(factorization (choose n k)) p = choose n k\n[PROOFSTEP]\nrhs\n[GOAL]\np n✝ k✝ n k : ℕ\nhkn : k ≤ n\n| choose n k\n[PROOFSTEP]\nrw [← factorization_prod_pow_eq_self (choose_pos hkn).ne']\n[GOAL]\np n✝ k✝ n k : ℕ\nhkn : k ≤ n\n⊢ ∏ p in Finset.range (n + 1), p ^ ↑(factorization (choose n k)) p =\n    Finsupp.prod (factorization (choose n k)) fun x x_1 => x ^ x_1\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\np n✝ k✝ n k : ℕ\nhkn : k ≤ n\n⊢ (Finsupp.prod (factorization (choose n k)) fun x x_1 => x ^ x_1) =\n    ∏ p in Finset.range (n + 1), p ^ ↑(factorization (choose n k)) p\n[PROOFSTEP]\napply Finset.prod_subset\n[GOAL]\ncase h\np n✝ k✝ n k : ℕ\nhkn : k ≤ n\n⊢ (factorization (choose n k)).support ⊆ Finset.range (n + 1)\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase h\np✝ n✝ k✝ n k : ℕ\nhkn : k ≤ n\np : ℕ\nhp : p ∈ (factorization (choose n k)).support\n⊢ p ∈ Finset.range (n + 1)\n[PROOFSTEP]\nrw [Finset.mem_range]\n[GOAL]\ncase h\np✝ n✝ k✝ n k : ℕ\nhkn : k ≤ n\np : ℕ\nhp : p ∈ (factorization (choose n k)).support\n⊢ p < n + 1\n[PROOFSTEP]\ncontrapose! hp\n[GOAL]\ncase h\np✝ n✝ k✝ n k : ℕ\nhkn : k ≤ n\np : ℕ\nhp : n + 1 ≤ p\n⊢ ¬p ∈ (factorization (choose n k)).support\n[PROOFSTEP]\nrw [Finsupp.mem_support_iff, Classical.not_not, factorization_choose_eq_zero_of_lt hp]\n[GOAL]\ncase hf\np n✝ k✝ n k : ℕ\nhkn : k ≤ n\n⊢ ∀ (x : ℕ),\n    x ∈ Finset.range (n + 1) →\n      ¬x ∈ (factorization (choose n k)).support → (fun x x_1 => x ^ x_1) x (↑(factorization (choose n k)) x) = 1\n[PROOFSTEP]\nintro p _ h2\n[GOAL]\ncase hf\np✝ n✝ k✝ n k : ℕ\nhkn : k ≤ n\np : ℕ\na✝ : p ∈ Finset.range (n + 1)\nh2 : ¬p ∈ (factorization (choose n k)).support\n⊢ (fun x x_1 => x ^ x_1) p (↑(factorization (choose n k)) p) = 1\n[PROOFSTEP]\nsimp [Classical.not_not.1 (mt Finsupp.mem_support_iff.2 h2)]\n[GOAL]\np n✝ k n : ℕ\n⊢ ∏ p in Finset.range (2 * n + 1), p ^ ↑(factorization (centralBinom n)) p = centralBinom n\n[PROOFSTEP]\napply prod_pow_factorization_choose\n[GOAL]\ncase hkn\np n✝ k n : ℕ\n⊢ n ≤ 2 * n\n[PROOFSTEP]\nlinarith\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Choose.Factorization", "llama_tokens": 5651, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7520125737597972, "lm_q2_score": 0.5234203489363239, "lm_q1q2_score": 0.3936186837618561}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\np✝ : R[X]\ninst✝ : Semiring S\np : S[X]\nf : S →+* R\n⊢ Continuous fun x => eval₂ f x p\n[PROOFSTEP]\nsimp only [eval₂_eq_sum, Finsupp.sum]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\np✝ : R[X]\ninst✝ : Semiring S\np : S[X]\nf : S →+* R\n⊢ Continuous fun x => sum p fun e a => ↑f a * x ^ e\n[PROOFSTEP]\nexact continuous_finset_sum _ fun c _ => continuous_const.mul (continuous_pow _)\n[GOAL]\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\np : R[X]\nhd : 0 < degree p\nhf : ↑f (leadingCoeff p) ≠ 0\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\n⊢ Tendsto (fun x => abv (eval₂ f (z x) p)) l atTop\n[PROOFSTEP]\nrevert hf\n[GOAL]\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\np : R[X]\nhd : 0 < degree p\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\n⊢ ↑f (leadingCoeff p) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) p)) l atTop\n[PROOFSTEP]\nrefine' degree_pos_induction_on p hd _ _ _\n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\np : R[X]\nhd : 0 < degree p\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\n⊢ ∀ {a : R}, a ≠ 0 → ↑f (leadingCoeff (↑C a * X)) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) (↑C a * X))) l atTop\n[PROOFSTEP]\nclear hd p\n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\np : R[X]\nhd : 0 < degree p\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\n⊢ ∀ {p : R[X]},\n    0 < degree p →\n      (↑f (leadingCoeff p) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) p)) l atTop) →\n        ↑f (leadingCoeff (p * X)) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) (p * X))) l atTop\n[PROOFSTEP]\nclear hd p\n[GOAL]\ncase refine'_3\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\np : R[X]\nhd : 0 < degree p\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\n⊢ ∀ {p : R[X]} {a : R},\n    0 < degree p →\n      (↑f (leadingCoeff p) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) p)) l atTop) →\n        ↑f (leadingCoeff (p + ↑C a)) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) (p + ↑C a))) l atTop\n[PROOFSTEP]\nclear hd p\n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\n⊢ ∀ {a : R}, a ≠ 0 → ↑f (leadingCoeff (↑C a * X)) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) (↑C a * X))) l atTop\n[PROOFSTEP]\nrintro _ - hc\n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\na✝ : R\nhc : ↑f (leadingCoeff (↑C a✝ * X)) ≠ 0\n⊢ Tendsto (fun x => abv (eval₂ f (z x) (↑C a✝ * X))) l atTop\n[PROOFSTEP]\nrw [leadingCoeff_mul_X, leadingCoeff_C] at hc \n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\na✝ : R\nhc : ↑f a✝ ≠ 0\n⊢ Tendsto (fun x => abv (eval₂ f (z x) (↑C a✝ * X))) l atTop\n[PROOFSTEP]\nsimpa [abv_mul abv] using hz.const_mul_atTop ((abv_pos abv).2 hc)\n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\n⊢ ∀ {p : R[X]},\n    0 < degree p →\n      (↑f (leadingCoeff p) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) p)) l atTop) →\n        ↑f (leadingCoeff (p * X)) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) (p * X))) l atTop\n[PROOFSTEP]\nintro _ _ ihp hf\n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\np✝ : R[X]\na✝ : 0 < degree p✝\nihp : ↑f (leadingCoeff p✝) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) p✝)) l atTop\nhf : ↑f (leadingCoeff (p✝ * X)) ≠ 0\n⊢ Tendsto (fun x => abv (eval₂ f (z x) (p✝ * X))) l atTop\n[PROOFSTEP]\nrw [leadingCoeff_mul_X] at hf \n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\np✝ : R[X]\na✝ : 0 < degree p✝\nihp : ↑f (leadingCoeff p✝) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) p✝)) l atTop\nhf : ↑f (leadingCoeff p✝) ≠ 0\n⊢ Tendsto (fun x => abv (eval₂ f (z x) (p✝ * X))) l atTop\n[PROOFSTEP]\nsimpa [abv_mul abv] using (ihp hf).atTop_mul_atTop hz\n[GOAL]\ncase refine'_3\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\n⊢ ∀ {p : R[X]} {a : R},\n    0 < degree p →\n      (↑f (leadingCoeff p) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) p)) l atTop) →\n        ↑f (leadingCoeff (p + ↑C a)) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) (p + ↑C a))) l atTop\n[PROOFSTEP]\nintro _ a hd ihp hf\n[GOAL]\ncase refine'_3\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\np✝ : R[X]\na : R\nhd : 0 < degree p✝\nihp : ↑f (leadingCoeff p✝) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) p✝)) l atTop\nhf : ↑f (leadingCoeff (p✝ + ↑C a)) ≠ 0\n⊢ Tendsto (fun x => abv (eval₂ f (z x) (p✝ + ↑C a))) l atTop\n[PROOFSTEP]\nrw [add_comm, leadingCoeff_add_of_degree_lt (degree_C_le.trans_lt hd)] at hf \n[GOAL]\ncase refine'_3\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\np✝ : R[X]\na : R\nhd : 0 < degree p✝\nihp : ↑f (leadingCoeff p✝) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) p✝)) l atTop\nhf : ↑f (leadingCoeff p✝) ≠ 0\n⊢ Tendsto (fun x => abv (eval₂ f (z x) (p✝ + ↑C a))) l atTop\n[PROOFSTEP]\nrefine' tendsto_atTop_of_add_const_right (abv (-f a)) _\n[GOAL]\ncase refine'_3\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\np✝ : R[X]\na : R\nhd : 0 < degree p✝\nihp : ↑f (leadingCoeff p✝) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) p✝)) l atTop\nhf : ↑f (leadingCoeff p✝) ≠ 0\n⊢ Tendsto (fun x => abv (eval₂ f (z x) (p✝ + ↑C a)) + abv (-↑f a)) l atTop\n[PROOFSTEP]\nrefine' tendsto_atTop_mono (fun _ => abv_add abv _ _) _\n[GOAL]\ncase refine'_3\nR : Type u_1\nS : Type u_2\nk : Type u_3\nα : Type u_4\ninst✝³ : Semiring R\ninst✝² : Ring S\ninst✝¹ : LinearOrderedField k\nf : R →+* S\nabv : S → k\ninst✝ : IsAbsoluteValue abv\nl : Filter α\nz : α → S\nhz : Tendsto (abv ∘ z) l atTop\np✝ : R[X]\na : R\nhd : 0 < degree p✝\nihp : ↑f (leadingCoeff p✝) ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) p✝)) l atTop\nhf : ↑f (leadingCoeff p✝) ≠ 0\n⊢ Tendsto (fun x => abv (eval₂ f (z x) (p✝ + ↑C a) + -↑f a)) l atTop\n[PROOFSTEP]\nsimpa using ihp hf\n[GOAL]\nR : Type u_1\nk : Type u_2\nα : Type u_3\ninst✝² : Ring R\ninst✝¹ : LinearOrderedField k\nabv : R → k\ninst✝ : IsAbsoluteValue abv\np : R[X]\nh : 0 < degree p\nl : Filter α\nz : α → R\nhz : Tendsto (abv ∘ z) l atTop\n⊢ Tendsto (fun x => abv (eval (z x) p)) l atTop\n[PROOFSTEP]\napply tendsto_abv_eval₂_atTop _ _ _ h _ hz\n[GOAL]\nR : Type u_1\nk : Type u_2\nα : Type u_3\ninst✝² : Ring R\ninst✝¹ : LinearOrderedField k\nabv : R → k\ninst✝ : IsAbsoluteValue abv\np : R[X]\nh : 0 < degree p\nl : Filter α\nz : α → R\nhz : Tendsto (abv ∘ z) l atTop\n⊢ ↑(RingHom.id R) (leadingCoeff p) ≠ 0\n[PROOFSTEP]\nexact (mt leadingCoeff_eq_zero.1 (ne_zero_of_degree_gt h))\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝² : NormedRing R\ninst✝¹ : IsAbsoluteValue norm\ninst✝ : ProperSpace R\np : R[X]\nhp0 : ¬0 < degree p\n⊢ ∀ (y : R), ‖eval (coeff p 0) p‖ ≤ ‖eval y p‖\n[PROOFSTEP]\nrw [eq_C_of_degree_le_zero (le_of_not_gt hp0)]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝² : NormedRing R\ninst✝¹ : IsAbsoluteValue norm\ninst✝ : ProperSpace R\np : R[X]\nhp0 : ¬0 < degree p\n⊢ ∀ (y : R), ‖eval (coeff (↑C (coeff p 0)) 0) (↑C (coeff p 0))‖ ≤ ‖eval y (↑C (coeff p 0))‖\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\nhB : B < 0\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\n⊢ natDegree p = 0\n[PROOFSTEP]\ncontrapose! hB\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : natDegree p ≠ 0\n⊢ 0 ≤ B\n[PROOFSTEP]\nrw [← h1.natDegree_map f, natDegree_eq_card_roots' h2] at hB \n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : ↑card (roots (map f p)) ≠ 0\n⊢ 0 ≤ B\n[PROOFSTEP]\nobtain ⟨z, hz⟩ := card_pos_iff_exists_mem.mp (zero_lt_iff.mpr hB)\n[GOAL]\ncase intro\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : ↑card (roots (map f p)) ≠ 0\nz : K\nhz : z ∈ roots (map f p)\n⊢ 0 ≤ B\n[PROOFSTEP]\nexact le_trans (norm_nonneg _) (h3 z hz)\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\n⊢ ‖coeff (map f p) i‖ ≤ B ^ (natDegree p - i) * ↑(Nat.choose (natDegree p) i)\n[PROOFSTEP]\nobtain hB | hB := lt_or_le B 0\n[GOAL]\ncase inl\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : B < 0\n⊢ ‖coeff (map f p) i‖ ≤ B ^ (natDegree p - i) * ↑(Nat.choose (natDegree p) i)\n[PROOFSTEP]\nrw [eq_one_of_roots_le hB h1 h2 h3, Polynomial.map_one, natDegree_one, zero_tsub, pow_zero, one_mul, coeff_one]\n[GOAL]\ncase inl\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : B < 0\n⊢ ‖if 0 = i then 1 else 0‖ ≤ ↑(Nat.choose 0 i)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : B < 0\nh✝ : 0 = i\n⊢ ‖1‖ ≤ ↑(Nat.choose 0 i)\n[PROOFSTEP]\nnorm_num [h]\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : B < 0\nh✝ : ¬0 = i\n⊢ ‖0‖ ≤ ↑(Nat.choose 0 i)\n[PROOFSTEP]\nnorm_num [h]\n[GOAL]\ncase pos\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : B < 0\nh✝ : 0 = i\n⊢ 1 ≤ Nat.choose 0 i\n[PROOFSTEP]\nsimp [‹0 = i›]\n[GOAL]\ncase inr\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : 0 ≤ B\n⊢ ‖coeff (map f p) i‖ ≤ B ^ (natDegree p - i) * ↑(Nat.choose (natDegree p) i)\n[PROOFSTEP]\nrw [← h1.natDegree_map f]\n[GOAL]\ncase inr\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : 0 ≤ B\n⊢ ‖coeff (map f p) i‖ ≤ B ^ (natDegree (map f p) - i) * ↑(Nat.choose (natDegree (map f p)) i)\n[PROOFSTEP]\nobtain hi | hi := lt_or_le (map f p).natDegree i\n[GOAL]\ncase inr.inl\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : 0 ≤ B\nhi : natDegree (map f p) < i\n⊢ ‖coeff (map f p) i‖ ≤ B ^ (natDegree (map f p) - i) * ↑(Nat.choose (natDegree (map f p)) i)\n[PROOFSTEP]\nrw [coeff_eq_zero_of_natDegree_lt hi, norm_zero]\n[GOAL]\ncase inr.inl\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : 0 ≤ B\nhi : natDegree (map f p) < i\n⊢ 0 ≤ B ^ (natDegree (map f p) - i) * ↑(Nat.choose (natDegree (map f p)) i)\n[PROOFSTEP]\npositivity\n[GOAL]\ncase inr.inr\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : 0 ≤ B\nhi : i ≤ natDegree (map f p)\n⊢ ‖coeff (map f p) i‖ ≤ B ^ (natDegree (map f p) - i) * ↑(Nat.choose (natDegree (map f p)) i)\n[PROOFSTEP]\nrw [coeff_eq_esymm_roots_of_splits ((splits_id_iff_splits f).2 h2) hi, (h1.map _).leadingCoeff, one_mul, norm_mul,\n  norm_pow, norm_neg, norm_one, one_pow, one_mul]\n[GOAL]\ncase inr.inr\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : 0 ≤ B\nhi : i ≤ natDegree (map f p)\n⊢ ‖esymm (roots (map f p)) (natDegree (map f p) - i)‖ ≤\n    B ^ (natDegree (map f p) - i) * ↑(Nat.choose (natDegree (map f p)) i)\n[PROOFSTEP]\napply ((norm_multiset_sum_le _).trans <| sum_le_card_nsmul _ _ fun r hr => _).trans\n[GOAL]\ncase inr.inr\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : 0 ≤ B\nhi : i ≤ natDegree (map f p)\n⊢ ↑card (Multiset.map (fun x => ‖x‖) (Multiset.map prod (powersetLen (natDegree (map f p) - i) (roots (map f p))))) •\n      ?m.209879 ≤\n    B ^ (natDegree (map f p) - i) * ↑(Nat.choose (natDegree (map f p)) i)\n[PROOFSTEP]\nrw [Multiset.map_map, card_map, card_powersetLen, ← natDegree_eq_card_roots' h2, Nat.choose_symm hi, mul_comm,\n  nsmul_eq_mul]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : 0 ≤ B\nhi : i ≤ natDegree (map f p)\n⊢ ∀ (r : ℝ),\n    r ∈ Multiset.map (fun x => ‖x‖) (Multiset.map prod (powersetLen (natDegree (map f p) - i) (roots (map f p)))) →\n      r ≤ B ^ (natDegree (map f p) - i)\n[PROOFSTEP]\nintro r hr\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : 0 ≤ B\nhi : i ≤ natDegree (map f p)\nr : ℝ\nhr : r ∈ Multiset.map (fun x => ‖x‖) (Multiset.map prod (powersetLen (natDegree (map f p) - i) (roots (map f p))))\n⊢ r ≤ B ^ (natDegree (map f p) - i)\n[PROOFSTEP]\nsimp_rw [Multiset.mem_map] at hr \n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : 0 ≤ B\nhi : i ≤ natDegree (map f p)\nr : ℝ\nhr : ∃ a, (∃ a_1, a_1 ∈ powersetLen (natDegree (map f p) - i) (roots (map f p)) ∧ prod a_1 = a) ∧ ‖a‖ = r\n⊢ r ≤ B ^ (natDegree (map f p) - i)\n[PROOFSTEP]\nobtain ⟨_, ⟨s, hs, rfl⟩, rfl⟩ := hr\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : 0 ≤ B\nhi : i ≤ natDegree (map f p)\ns : Multiset K\nhs : s ∈ powersetLen (natDegree (map f p) - i) (roots (map f p))\n⊢ ‖prod s‖ ≤ B ^ (natDegree (map f p) - i)\n[PROOFSTEP]\nrw [mem_powersetLen] at hs \n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\nB : ℝ\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\nhB : 0 ≤ B\nhi : i ≤ natDegree (map f p)\ns : Multiset K\nhs : s ≤ roots (map f p) ∧ ↑card s = natDegree (map f p) - i\n⊢ ‖prod s‖ ≤ B ^ (natDegree (map f p) - i)\n[PROOFSTEP]\nlift B to ℝ≥0 using hB\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nhi : i ≤ natDegree (map f p)\ns : Multiset K\nhs : s ≤ roots (map f p) ∧ ↑card s = natDegree (map f p) - i\nB : ℝ≥0\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ ↑B\n⊢ ‖prod s‖ ≤ ↑B ^ (natDegree (map f p) - i)\n[PROOFSTEP]\nrw [← coe_nnnorm, ← NNReal.coe_pow, NNReal.coe_le_coe, ← nnnormHom_apply, ← MonoidHom.coe_coe,\n  MonoidHom.map_multiset_prod]\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nhi : i ≤ natDegree (map f p)\ns : Multiset K\nhs : s ≤ roots (map f p) ∧ ↑card s = natDegree (map f p) - i\nB : ℝ≥0\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ ↑B\n⊢ prod (Multiset.map (↑↑nnnormHom) s) ≤ B ^ (natDegree (map f p) - i)\n[PROOFSTEP]\nrefine' (prod_le_pow_card _ B fun x hx => _).trans_eq (by rw [card_map, hs.2])\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nhi : i ≤ natDegree (map f p)\ns : Multiset K\nhs : s ≤ roots (map f p) ∧ ↑card s = natDegree (map f p) - i\nB : ℝ≥0\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ ↑B\n⊢ B ^ ↑card (Multiset.map (↑↑nnnormHom) s) = B ^ (natDegree (map f p) - i)\n[PROOFSTEP]\nrw [card_map, hs.2]\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nhi : i ≤ natDegree (map f p)\ns : Multiset K\nhs : s ≤ roots (map f p) ∧ ↑card s = natDegree (map f p) - i\nB : ℝ≥0\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ ↑B\nx : ℝ≥0\nhx : x ∈ Multiset.map (↑↑nnnormHom) s\n⊢ x ≤ B\n[PROOFSTEP]\nobtain ⟨z, hz, rfl⟩ := Multiset.mem_map.1 hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\np : F[X]\nf : F →+* K\ni : ℕ\nh1 : Monic p\nh2 : Splits f p\nhi : i ≤ natDegree (map f p)\ns : Multiset K\nhs : s ≤ roots (map f p) ∧ ↑card s = natDegree (map f p) - i\nB : ℝ≥0\nh3 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ ↑B\nz : K\nhz : z ∈ s\nhx : ↑↑nnnormHom z ∈ Multiset.map (↑↑nnnormHom) s\n⊢ ↑↑nnnormHom z ≤ B\n[PROOFSTEP]\nexact h3 z (mem_of_le hs.1 hz)\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\n⊢ ‖coeff (map f p) i‖ ≤ max B 1 ^ d * ↑(Nat.choose d (d / 2))\n[PROOFSTEP]\nobtain hB | hB := le_or_lt 0 B\n[GOAL]\ncase inl\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : 0 ≤ B\n⊢ ‖coeff (map f p) i‖ ≤ max B 1 ^ d * ↑(Nat.choose d (d / 2))\n[PROOFSTEP]\napply (coeff_le_of_roots_le i h1 h2 h4).trans\n[GOAL]\ncase inl\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : 0 ≤ B\n⊢ B ^ (natDegree p - i) * ↑(Nat.choose (natDegree p) i) ≤ max B 1 ^ d * ↑(Nat.choose d (d / 2))\n[PROOFSTEP]\ncalc\n  _ ≤ max B 1 ^ (p.natDegree - i) * p.natDegree.choose i := by gcongr; apply le_max_left\n  _ ≤ max B 1 ^ d * p.natDegree.choose i := by gcongr; apply le_max_right; exact le_trans (Nat.sub_le _ _) h3\n  _ ≤ max B 1 ^ d * d.choose (d / 2) := by gcongr; exact (i.choose_mono h3).trans (i.choose_le_middle d)\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : 0 ≤ B\n⊢ B ^ (natDegree p - i) * ↑(Nat.choose (natDegree p) i) ≤ max B 1 ^ (natDegree p - i) * ↑(Nat.choose (natDegree p) i)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.hab\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : 0 ≤ B\n⊢ B ≤ max B 1\n[PROOFSTEP]\napply le_max_left\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : 0 ≤ B\n⊢ max B 1 ^ (natDegree p - i) * ↑(Nat.choose (natDegree p) i) ≤ max B 1 ^ d * ↑(Nat.choose (natDegree p) i)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.ha\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : 0 ≤ B\n⊢ 1 ≤ max B 1\ncase h.h\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : 0 ≤ B\n⊢ natDegree p - i ≤ d\n[PROOFSTEP]\napply le_max_right\n[GOAL]\ncase h.h\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : 0 ≤ B\n⊢ natDegree p - i ≤ d\n[PROOFSTEP]\nexact le_trans (Nat.sub_le _ _) h3\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : 0 ≤ B\n⊢ max B 1 ^ d * ↑(Nat.choose (natDegree p) i) ≤ max B 1 ^ d * ↑(Nat.choose d (d / 2))\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.h\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : 0 ≤ B\n⊢ Nat.choose (natDegree p) i ≤ Nat.choose d (d / 2)\n[PROOFSTEP]\nexact (i.choose_mono h3).trans (i.choose_le_middle d)\n[GOAL]\ncase inr\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : B < 0\n⊢ ‖coeff (map f p) i‖ ≤ max B 1 ^ d * ↑(Nat.choose d (d / 2))\n[PROOFSTEP]\nrw [eq_one_of_roots_le hB h1 h2 h4, Polynomial.map_one, coeff_one]\n[GOAL]\ncase inr\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : B < 0\n⊢ ‖if 0 = i then 1 else 0‖ ≤ max B 1 ^ d * ↑(Nat.choose d (d / 2))\n[PROOFSTEP]\nrefine' _root_.trans _ (one_le_mul_of_one_le_of_one_le (one_le_pow_of_one_le (le_max_right B 1) d) _)\n[GOAL]\ncase inr.refine'_1\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : B < 0\n⊢ ‖if 0 = i then 1 else 0‖ ≤ 1\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : B < 0\nh✝ : 0 = i\n⊢ ‖1‖ ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : B < 0\nh✝ : ¬0 = i\n⊢ ‖0‖ ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase inr.refine'_2\nα : Type u_1\nR : Type u_2\ninst✝³ : NormedRing R\ninst✝² : IsAbsoluteValue norm\nF : Type u_3\nK : Type u_4\ninst✝¹ : CommRing F\ninst✝ : NormedField K\nB : ℝ\nd : ℕ\nf : F →+* K\np : F[X]\nh1 : Monic p\nh2 : Splits f p\nh3 : natDegree p ≤ d\nh4 : ∀ (z : K), z ∈ roots (map f p) → ‖z‖ ≤ B\ni : ℕ\nhB : B < 0\n⊢ 1 ≤ ↑(Nat.choose d (d / 2))\n[PROOFSTEP]\nexact_mod_cast Nat.succ_le_iff.mpr (Nat.choose_pos (d.div_le_self 2))\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Polynomial", "llama_tokens": 15579, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.685949467848392, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.393514398308162}}
{"text": "[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nn : ℕ\np : MvPolynomial (Fin n) R\nh : ∀ (x : Fin n → R), ↑(eval x) p = 0\n⊢ p = 0\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nn : ℕ\np✝ : MvPolynomial (Fin n) R\nh✝ : ∀ (x : Fin n → R), ↑(eval x) p✝ = 0\np : MvPolynomial (Fin Nat.zero) R\nh : ∀ (x : Fin Nat.zero → R), ↑(eval x) p = 0\n⊢ p = 0\n[PROOFSTEP]\napply (MvPolynomial.isEmptyRingEquiv R (Fin 0)).injective\n[GOAL]\ncase zero.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nn : ℕ\np✝ : MvPolynomial (Fin n) R\nh✝ : ∀ (x : Fin n → R), ↑(eval x) p✝ = 0\np : MvPolynomial (Fin Nat.zero) R\nh : ∀ (x : Fin Nat.zero → R), ↑(eval x) p = 0\n⊢ ↑(isEmptyRingEquiv R (Fin 0)) p = ↑(isEmptyRingEquiv R (Fin 0)) 0\n[PROOFSTEP]\nrw [RingEquiv.map_zero]\n[GOAL]\ncase zero.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nn : ℕ\np✝ : MvPolynomial (Fin n) R\nh✝ : ∀ (x : Fin n → R), ↑(eval x) p✝ = 0\np : MvPolynomial (Fin Nat.zero) R\nh : ∀ (x : Fin Nat.zero → R), ↑(eval x) p = 0\n⊢ ↑(isEmptyRingEquiv R (Fin 0)) p = 0\n[PROOFSTEP]\nconvert h finZeroElim\n[GOAL]\ncase succ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nn✝ : ℕ\np✝ : MvPolynomial (Fin n✝) R\nh✝ : ∀ (x : Fin n✝ → R), ↑(eval x) p✝ = 0\nn : ℕ\nih : ∀ {p : MvPolynomial (Fin n) R}, (∀ (x : Fin n → R), ↑(eval x) p = 0) → p = 0\np : MvPolynomial (Fin (Nat.succ n)) R\nh : ∀ (x : Fin (Nat.succ n) → R), ↑(eval x) p = 0\n⊢ p = 0\n[PROOFSTEP]\napply (finSuccEquiv R n).injective\n[GOAL]\ncase succ.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nn✝ : ℕ\np✝ : MvPolynomial (Fin n✝) R\nh✝ : ∀ (x : Fin n✝ → R), ↑(eval x) p✝ = 0\nn : ℕ\nih : ∀ {p : MvPolynomial (Fin n) R}, (∀ (x : Fin n → R), ↑(eval x) p = 0) → p = 0\np : MvPolynomial (Fin (Nat.succ n)) R\nh : ∀ (x : Fin (Nat.succ n) → R), ↑(eval x) p = 0\n⊢ ↑(finSuccEquiv R n) p = ↑(finSuccEquiv R n) 0\n[PROOFSTEP]\nsimp only [AlgEquiv.map_zero]\n[GOAL]\ncase succ.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nn✝ : ℕ\np✝ : MvPolynomial (Fin n✝) R\nh✝ : ∀ (x : Fin n✝ → R), ↑(eval x) p✝ = 0\nn : ℕ\nih : ∀ {p : MvPolynomial (Fin n) R}, (∀ (x : Fin n → R), ↑(eval x) p = 0) → p = 0\np : MvPolynomial (Fin (Nat.succ n)) R\nh : ∀ (x : Fin (Nat.succ n) → R), ↑(eval x) p = 0\n⊢ ↑(finSuccEquiv R n) p = 0\n[PROOFSTEP]\nrefine Polynomial.funext fun q => ?_\n[GOAL]\ncase succ.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nn✝ : ℕ\np✝ : MvPolynomial (Fin n✝) R\nh✝ : ∀ (x : Fin n✝ → R), ↑(eval x) p✝ = 0\nn : ℕ\nih : ∀ {p : MvPolynomial (Fin n) R}, (∀ (x : Fin n → R), ↑(eval x) p = 0) → p = 0\np : MvPolynomial (Fin (Nat.succ n)) R\nh : ∀ (x : Fin (Nat.succ n) → R), ↑(eval x) p = 0\nq : MvPolynomial (Fin n) R\n⊢ Polynomial.eval q (↑(finSuccEquiv R n) p) = Polynomial.eval q 0\n[PROOFSTEP]\nrw [Polynomial.eval_zero]\n[GOAL]\ncase succ.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nn✝ : ℕ\np✝ : MvPolynomial (Fin n✝) R\nh✝ : ∀ (x : Fin n✝ → R), ↑(eval x) p✝ = 0\nn : ℕ\nih : ∀ {p : MvPolynomial (Fin n) R}, (∀ (x : Fin n → R), ↑(eval x) p = 0) → p = 0\np : MvPolynomial (Fin (Nat.succ n)) R\nh : ∀ (x : Fin (Nat.succ n) → R), ↑(eval x) p = 0\nq : MvPolynomial (Fin n) R\n⊢ Polynomial.eval q (↑(finSuccEquiv R n) p) = 0\n[PROOFSTEP]\napply ih fun x => ?_\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nn✝ : ℕ\np✝ : MvPolynomial (Fin n✝) R\nh✝ : ∀ (x : Fin n✝ → R), ↑(eval x) p✝ = 0\nn : ℕ\nih : ∀ {p : MvPolynomial (Fin n) R}, (∀ (x : Fin n → R), ↑(eval x) p = 0) → p = 0\np : MvPolynomial (Fin (Nat.succ n)) R\nh : ∀ (x : Fin (Nat.succ n) → R), ↑(eval x) p = 0\nq : MvPolynomial (Fin n) R\nx : Fin n → R\n⊢ ↑(eval x) (Polynomial.eval q (↑(finSuccEquiv R n) p)) = 0\n[PROOFSTEP]\ncalc\n  _ = _ := eval_polynomial_eval_finSuccEquiv p _\n  _ = 0 := h _\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\np q : MvPolynomial σ R\nh : ∀ (x : σ → R), ↑(eval x) p = ↑(eval x) q\n⊢ p = q\n[PROOFSTEP]\nsuffices ∀ p, (∀ x : σ → R, eval x p = 0) → p = 0\n  by\n  rw [← sub_eq_zero, this (p - q)]\n  simp only [h, RingHom.map_sub, forall_const, sub_self]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\np q : MvPolynomial σ R\nh : ∀ (x : σ → R), ↑(eval x) p = ↑(eval x) q\nthis : ∀ (p : MvPolynomial σ R), (∀ (x : σ → R), ↑(eval x) p = 0) → p = 0\n⊢ p = q\n[PROOFSTEP]\nrw [← sub_eq_zero, this (p - q)]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\np q : MvPolynomial σ R\nh : ∀ (x : σ → R), ↑(eval x) p = ↑(eval x) q\nthis : ∀ (p : MvPolynomial σ R), (∀ (x : σ → R), ↑(eval x) p = 0) → p = 0\n⊢ ∀ (x : σ → R), ↑(eval x) (p - q) = 0\n[PROOFSTEP]\nsimp only [h, RingHom.map_sub, forall_const, sub_self]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\np q : MvPolynomial σ R\nh : ∀ (x : σ → R), ↑(eval x) p = ↑(eval x) q\n⊢ ∀ (p : MvPolynomial σ R), (∀ (x : σ → R), ↑(eval x) p = 0) → p = 0\n[PROOFSTEP]\nclear h p q\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\n⊢ ∀ (p : MvPolynomial σ R), (∀ (x : σ → R), ↑(eval x) p = 0) → p = 0\n[PROOFSTEP]\nintro p h\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\np : MvPolynomial σ R\nh : ∀ (x : σ → R), ↑(eval x) p = 0\n⊢ p = 0\n[PROOFSTEP]\nobtain ⟨n, f, hf, p, rfl⟩ := exists_fin_rename p\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\nn : ℕ\nf : Fin n → σ\nhf : Function.Injective f\np : MvPolynomial (Fin n) R\nh : ∀ (x : σ → R), ↑(eval x) (↑(rename f) p) = 0\n⊢ ↑(rename f) p = 0\n[PROOFSTEP]\nsuffices p = 0 by rw [this, AlgHom.map_zero]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\nn : ℕ\nf : Fin n → σ\nhf : Function.Injective f\np : MvPolynomial (Fin n) R\nh : ∀ (x : σ → R), ↑(eval x) (↑(rename f) p) = 0\nthis : p = 0\n⊢ ↑(rename f) p = 0\n[PROOFSTEP]\nrw [this, AlgHom.map_zero]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\nn : ℕ\nf : Fin n → σ\nhf : Function.Injective f\np : MvPolynomial (Fin n) R\nh : ∀ (x : σ → R), ↑(eval x) (↑(rename f) p) = 0\n⊢ p = 0\n[PROOFSTEP]\napply funext_fin\n[GOAL]\ncase intro.intro.intro.intro.h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\nn : ℕ\nf : Fin n → σ\nhf : Function.Injective f\np : MvPolynomial (Fin n) R\nh : ∀ (x : σ → R), ↑(eval x) (↑(rename f) p) = 0\n⊢ ∀ (x : Fin n → R), ↑(eval x) p = 0\n[PROOFSTEP]\nintro x\n[GOAL]\ncase intro.intro.intro.intro.h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\nn : ℕ\nf : Fin n → σ\nhf : Function.Injective f\np : MvPolynomial (Fin n) R\nh : ∀ (x : σ → R), ↑(eval x) (↑(rename f) p) = 0\nx : Fin n → R\n⊢ ↑(eval x) p = 0\n[PROOFSTEP]\nclassical\nconvert h (Function.extend f x 0)\nsimp only [eval, eval₂Hom_rename, Function.extend_comp hf]\n[GOAL]\ncase intro.intro.intro.intro.h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\nn : ℕ\nf : Fin n → σ\nhf : Function.Injective f\np : MvPolynomial (Fin n) R\nh : ∀ (x : σ → R), ↑(eval x) (↑(rename f) p) = 0\nx : Fin n → R\n⊢ ↑(eval x) p = 0\n[PROOFSTEP]\nconvert h (Function.extend f x 0)\n[GOAL]\ncase h.e'_2\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\nn : ℕ\nf : Fin n → σ\nhf : Function.Injective f\np : MvPolynomial (Fin n) R\nh : ∀ (x : σ → R), ↑(eval x) (↑(rename f) p) = 0\nx : Fin n → R\n⊢ ↑(eval x) p = ↑(eval (Function.extend f x 0)) (↑(rename f) p)\n[PROOFSTEP]\nsimp only [eval, eval₂Hom_rename, Function.extend_comp hf]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\np q : MvPolynomial σ R\n⊢ p = q → ∀ (x : σ → R), ↑(eval x) p = ↑(eval x) q\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Infinite R\nσ : Type u_2\np : MvPolynomial σ R\n⊢ ∀ (x : σ → R), ↑(eval x) p = ↑(eval x) p\n[PROOFSTEP]\nsimp only [forall_const, eq_self_iff_true]\n", "meta": {"mathlib_filename": "Mathlib.Data.MvPolynomial.Funext", "llama_tokens": 4378, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6859494550081925, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.3935143909420168}}
{"text": "[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk l : ℕ\n⊢ D (k + l) I = D k (D l I)\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nl : ℕ\n⊢ D (Nat.zero + l) I = D Nat.zero (D l I)\n[PROOFSTEP]\nrw [Nat.zero_add, derivedSeriesOfIdeal_zero]\n[GOAL]\ncase succ\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nl k : ℕ\nih : D (k + l) I = D k (D l I)\n⊢ D (Nat.succ k + l) I = D (Nat.succ k) (D l I)\n[PROOFSTEP]\nrw [Nat.succ_add k l, derivedSeriesOfIdeal_succ, derivedSeriesOfIdeal_succ, ih]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nk l : ℕ\nh₁ : I ≤ J\nh₂ : l ≤ k\n⊢ D k I ≤ D l J\n[PROOFSTEP]\nrevert l\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nk : ℕ\nh₁ : I ≤ J\n⊢ ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nh₁ : I ≤ J\n⊢ ∀ {l : ℕ}, l ≤ Nat.zero → D Nat.zero I ≤ D l J\n[PROOFSTEP]\nintro l h₂\n[GOAL]\ncase succ\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nh₁ : I ≤ J\nk : ℕ\nih : ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J\n⊢ ∀ {l : ℕ}, l ≤ Nat.succ k → D (Nat.succ k) I ≤ D l J\n[PROOFSTEP]\nintro l h₂\n[GOAL]\ncase zero\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nh₁ : I ≤ J\nl : ℕ\nh₂ : l ≤ Nat.zero\n⊢ D Nat.zero I ≤ D l J\n[PROOFSTEP]\nrw [Nat.zero_eq, le_zero_iff] at h₂ \n[GOAL]\ncase zero\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nh₁ : I ≤ J\nl : ℕ\nh₂ : l = 0\n⊢ D Nat.zero I ≤ D l J\n[PROOFSTEP]\nrw [h₂, derivedSeriesOfIdeal_zero]\n[GOAL]\ncase zero\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nh₁ : I ≤ J\nl : ℕ\nh₂ : l = 0\n⊢ I ≤ D 0 J\n[PROOFSTEP]\nexact h₁\n[GOAL]\ncase succ\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nh₁ : I ≤ J\nk : ℕ\nih : ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J\nl : ℕ\nh₂ : l ≤ Nat.succ k\n⊢ D (Nat.succ k) I ≤ D l J\n[PROOFSTEP]\nhave h : l = k.succ ∨ l ≤ k := by rwa [le_iff_eq_or_lt, Nat.lt_succ_iff] at h₂ \n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nh₁ : I ≤ J\nk : ℕ\nih : ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J\nl : ℕ\nh₂ : l ≤ Nat.succ k\n⊢ l = Nat.succ k ∨ l ≤ k\n[PROOFSTEP]\nrwa [le_iff_eq_or_lt, Nat.lt_succ_iff] at h₂ \n[GOAL]\ncase succ\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nh₁ : I ≤ J\nk : ℕ\nih : ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J\nl : ℕ\nh₂ : l ≤ Nat.succ k\nh : l = Nat.succ k ∨ l ≤ k\n⊢ D (Nat.succ k) I ≤ D l J\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase succ.inl\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nh₁ : I ≤ J\nk : ℕ\nih : ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J\nl : ℕ\nh₂ : l ≤ Nat.succ k\nh : l = Nat.succ k\n⊢ D (Nat.succ k) I ≤ D l J\n[PROOFSTEP]\nrw [h, derivedSeriesOfIdeal_succ, derivedSeriesOfIdeal_succ]\n[GOAL]\ncase succ.inl\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nh₁ : I ≤ J\nk : ℕ\nih : ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J\nl : ℕ\nh₂ : l ≤ Nat.succ k\nh : l = Nat.succ k\n⊢ ⁅D k I, D k I⁆ ≤ ⁅D k J, D k J⁆\n[PROOFSTEP]\nexact LieSubmodule.mono_lie _ _ _ _ (ih (le_refl k)) (ih (le_refl k))\n[GOAL]\ncase succ.inr\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nh₁ : I ≤ J\nk : ℕ\nih : ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J\nl : ℕ\nh₂ : l ≤ Nat.succ k\nh : l ≤ k\n⊢ D (Nat.succ k) I ≤ D l J\n[PROOFSTEP]\nrw [derivedSeriesOfIdeal_succ]\n[GOAL]\ncase succ.inr\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nh₁ : I ≤ J\nk : ℕ\nih : ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J\nl : ℕ\nh₂ : l ≤ Nat.succ k\nh : l ≤ k\n⊢ ⁅D k I, D k I⁆ ≤ D l J\n[PROOFSTEP]\nexact le_trans (LieSubmodule.lie_le_left _ _) (ih h)\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nJ : LieIdeal R L\nk l : ℕ\n⊢ D (k + l) (I + J) ≤ D k I + D l J\n[PROOFSTEP]\nlet D₁ : LieIdeal R L →o LieIdeal R L :=\n  { toFun := fun I => ⁅I, I⁆\n    monotone' := fun I J h => LieSubmodule.mono_lie I J I J h h }\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nJ : LieIdeal R L\nk l : ℕ\nD₁ : LieIdeal R L →o LieIdeal R L :=\n  { toFun := fun I => ⁅I, I⁆, monotone' := (_ : ∀ (I J : LieIdeal R L), I ≤ J → ⁅I, I⁆ ≤ ⁅J, J⁆) }\n⊢ D (k + l) (I + J) ≤ D k I + D l J\n[PROOFSTEP]\nhave h₁ : ∀ I J : LieIdeal R L, D₁ (I ⊔ J) ≤ D₁ I ⊔ J := by\n  simp [LieSubmodule.lie_le_right, LieSubmodule.lie_le_left, le_sup_of_le_right]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nJ : LieIdeal R L\nk l : ℕ\nD₁ : LieIdeal R L →o LieIdeal R L :=\n  { toFun := fun I => ⁅I, I⁆, monotone' := (_ : ∀ (I J : LieIdeal R L), I ≤ J → ⁅I, I⁆ ≤ ⁅J, J⁆) }\n⊢ ∀ (I J : LieIdeal R L), ↑D₁ (I ⊔ J) ≤ ↑D₁ I ⊔ J\n[PROOFSTEP]\nsimp [LieSubmodule.lie_le_right, LieSubmodule.lie_le_left, le_sup_of_le_right]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nJ : LieIdeal R L\nk l : ℕ\nD₁ : LieIdeal R L →o LieIdeal R L :=\n  { toFun := fun I => ⁅I, I⁆, monotone' := (_ : ∀ (I J : LieIdeal R L), I ≤ J → ⁅I, I⁆ ≤ ⁅J, J⁆) }\nh₁ : ∀ (I J : LieIdeal R L), ↑D₁ (I ⊔ J) ≤ ↑D₁ I ⊔ J\n⊢ D (k + l) (I + J) ≤ D k I + D l J\n[PROOFSTEP]\nrw [← D₁.iterate_sup_le_sup_iff] at h₁ \n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nJ : LieIdeal R L\nk l : ℕ\nD₁ : LieIdeal R L →o LieIdeal R L :=\n  { toFun := fun I => ⁅I, I⁆, monotone' := (_ : ∀ (I J : LieIdeal R L), I ≤ J → ⁅I, I⁆ ≤ ⁅J, J⁆) }\nh₁ : ∀ (n₁ n₂ : ℕ) (a₁ a₂ : LieIdeal R L), (↑D₁)^[n₁ + n₂] (a₁ ⊔ a₂) ≤ (↑D₁)^[n₁] a₁ ⊔ (↑D₁)^[n₂] a₂\n⊢ D (k + l) (I + J) ≤ D k I + D l J\n[PROOFSTEP]\nexact h₁ k l I J\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\n⊢ D k ⊥ = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\n⊢ D k ⊥ ≤ ⊥\n[PROOFSTEP]\nexact derivedSeriesOfIdeal_le_self ⊥ k\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\n⊢ IsLieAbelian { x // x ∈ ↑I } ↔ D 1 I = ⊥\n[PROOFSTEP]\nrw [derivedSeriesOfIdeal_succ, derivedSeriesOfIdeal_zero, LieSubmodule.lie_abelian_iff_lie_self_eq_bot]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\n⊢ IsLieAbelian { x // x ∈ ↑(D k I) } ↔ D (k + 1) I = ⊥\n[PROOFSTEP]\nrw [add_comm, derivedSeriesOfIdeal_add I 1 k, abelian_iff_derived_one_eq_bot]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\n⊢ derivedSeries R { x // x ∈ ↑I } k = comap (incl I) (derivedSeriesOfIdeal R L k I)\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\n⊢ derivedSeries R { x // x ∈ ↑I } Nat.zero = comap (incl I) (derivedSeriesOfIdeal R L Nat.zero I)\n[PROOFSTEP]\nsimp only [Nat.zero_eq, derivedSeries_def, comap_incl_self, derivedSeriesOfIdeal_zero]\n[GOAL]\ncase succ\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\nih : derivedSeries R { x // x ∈ ↑I } k = comap (incl I) (derivedSeriesOfIdeal R L k I)\n⊢ derivedSeries R { x // x ∈ ↑I } (Nat.succ k) = comap (incl I) (derivedSeriesOfIdeal R L (Nat.succ k) I)\n[PROOFSTEP]\nsimp only [derivedSeries_def, derivedSeriesOfIdeal_succ] at ih ⊢\n[GOAL]\ncase succ\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\nih : derivedSeriesOfIdeal R { x // x ∈ ↑I } k ⊤ = comap (incl I) (derivedSeriesOfIdeal R L k I)\n⊢ ⁅derivedSeriesOfIdeal R { x // x ∈ ↑I } k ⊤, derivedSeriesOfIdeal R { x // x ∈ ↑I } k ⊤⁆ =\n    comap (incl I) ⁅derivedSeriesOfIdeal R L k I, derivedSeriesOfIdeal R L k I⁆\n[PROOFSTEP]\nrw [ih]\n[GOAL]\ncase succ\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\nih : derivedSeriesOfIdeal R { x // x ∈ ↑I } k ⊤ = comap (incl I) (derivedSeriesOfIdeal R L k I)\n⊢ ⁅comap (incl I) (derivedSeriesOfIdeal R L k I), comap (incl I) (derivedSeriesOfIdeal R L k I)⁆ =\n    comap (incl I) ⁅derivedSeriesOfIdeal R L k I, derivedSeriesOfIdeal R L k I⁆\n[PROOFSTEP]\nexact comap_bracket_incl_of_le I (derivedSeriesOfIdeal_le_self I k) (derivedSeriesOfIdeal_le_self I k)\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\n⊢ map (incl I) (derivedSeries R { x // x ∈ ↑I } k) = derivedSeriesOfIdeal R L k I\n[PROOFSTEP]\nrw [derivedSeries_eq_derivedSeriesOfIdeal_comap, map_comap_incl, inf_eq_right]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\n⊢ derivedSeriesOfIdeal R L k I ≤ I\n[PROOFSTEP]\napply derivedSeriesOfIdeal_le_self\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\n⊢ derivedSeries R { x // x ∈ ↑I } k = ⊥ ↔ derivedSeriesOfIdeal R L k I = ⊥\n[PROOFSTEP]\nrw [← derivedSeries_eq_derivedSeriesOfIdeal_map, map_eq_bot_iff, ker_incl, eq_bot_iff]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk l : ℕ\nI J : LieIdeal R L\nhI : derivedSeries R { x // x ∈ ↑I } k = ⊥\nhJ : derivedSeries R { x // x ∈ ↑J } l = ⊥\n⊢ derivedSeries R { x // x ∈ ↑(I + J) } (k + l) = ⊥\n[PROOFSTEP]\nrw [LieIdeal.derivedSeries_eq_bot_iff] at hI hJ ⊢\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk l : ℕ\nI J : LieIdeal R L\nhI : derivedSeriesOfIdeal R L k I = ⊥\nhJ : derivedSeriesOfIdeal R L l J = ⊥\n⊢ derivedSeriesOfIdeal R L (k + l) (I + J) = ⊥\n[PROOFSTEP]\nrw [← le_bot_iff]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk l : ℕ\nI J : LieIdeal R L\nhI : derivedSeriesOfIdeal R L k I = ⊥\nhJ : derivedSeriesOfIdeal R L l J = ⊥\n⊢ derivedSeriesOfIdeal R L (k + l) (I + J) ≤ ⊥\n[PROOFSTEP]\nlet D := derivedSeriesOfIdeal R L\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk l : ℕ\nI J : LieIdeal R L\nhI : derivedSeriesOfIdeal R L k I = ⊥\nhJ : derivedSeriesOfIdeal R L l J = ⊥\nD : ℕ → LieIdeal R L → LieIdeal R L := derivedSeriesOfIdeal R L\n⊢ derivedSeriesOfIdeal R L (k + l) (I + J) ≤ ⊥\n[PROOFSTEP]\nchange D k I = ⊥ at hI \n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk l : ℕ\nI J : LieIdeal R L\nhJ : derivedSeriesOfIdeal R L l J = ⊥\nD : ℕ → LieIdeal R L → LieIdeal R L := derivedSeriesOfIdeal R L\nhI : D k I = ⊥\n⊢ derivedSeriesOfIdeal R L (k + l) (I + J) ≤ ⊥\n[PROOFSTEP]\nchange D l J = ⊥ at hJ \n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk l : ℕ\nI J : LieIdeal R L\nD : ℕ → LieIdeal R L → LieIdeal R L := derivedSeriesOfIdeal R L\nhI : D k I = ⊥\nhJ : D l J = ⊥\n⊢ derivedSeriesOfIdeal R L (k + l) (I + J) ≤ ⊥\n[PROOFSTEP]\ncalc\n  D (k + l) (I + J) ≤ D k I + D l J := derivedSeriesOfIdeal_add_le_add I J k l\n  _ ≤ ⊥ := by rw [hI, hJ]; simp\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk l : ℕ\nI J : LieIdeal R L\nD : ℕ → LieIdeal R L → LieIdeal R L := derivedSeriesOfIdeal R L\nhI : D k I = ⊥\nhJ : D l J = ⊥\n⊢ D k I + D l J ≤ ⊥\n[PROOFSTEP]\nrw [hI, hJ]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk l : ℕ\nI J : LieIdeal R L\nD : ℕ → LieIdeal R L → LieIdeal R L := derivedSeriesOfIdeal R L\nhI : D k I = ⊥\nhJ : D l J = ⊥\n⊢ ⊥ + ⊥ ≤ ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\n⊢ map f (derivedSeries R L' k) ≤ derivedSeries R L k\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\n⊢ map f (derivedSeries R L' Nat.zero) ≤ derivedSeries R L Nat.zero\n[PROOFSTEP]\nsimp only [Nat.zero_eq, derivedSeries_def, derivedSeriesOfIdeal_zero, le_top]\n[GOAL]\ncase succ\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\nih : map f (derivedSeries R L' k) ≤ derivedSeries R L k\n⊢ map f (derivedSeries R L' (Nat.succ k)) ≤ derivedSeries R L (Nat.succ k)\n[PROOFSTEP]\nsimp only [derivedSeries_def, derivedSeriesOfIdeal_succ] at ih ⊢\n[GOAL]\ncase succ\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\nih : map f (derivedSeriesOfIdeal R L' k ⊤) ≤ derivedSeriesOfIdeal R L k ⊤\n⊢ map f ⁅derivedSeriesOfIdeal R L' k ⊤, derivedSeriesOfIdeal R L' k ⊤⁆ ≤\n    ⁅derivedSeriesOfIdeal R L k ⊤, derivedSeriesOfIdeal R L k ⊤⁆\n[PROOFSTEP]\nexact le_trans (map_bracket_le f) (LieSubmodule.mono_lie _ _ _ _ ih ih)\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nk : ℕ\nh : Function.Surjective ↑f\n⊢ map f (derivedSeries R L' k) = derivedSeries R L k\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh : Function.Surjective ↑f\n⊢ map f (derivedSeries R L' Nat.zero) = derivedSeries R L Nat.zero\n[PROOFSTEP]\nchange (⊤ : LieIdeal R L').map f = ⊤\n[GOAL]\ncase zero\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh : Function.Surjective ↑f\n⊢ map f ⊤ = ⊤\n[PROOFSTEP]\nrw [← f.idealRange_eq_map]\n[GOAL]\ncase zero\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh : Function.Surjective ↑f\n⊢ LieHom.idealRange f = ⊤\n[PROOFSTEP]\nexact f.idealRange_eq_top_of_surjective h\n[GOAL]\ncase succ\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh : Function.Surjective ↑f\nk : ℕ\nih : map f (derivedSeries R L' k) = derivedSeries R L k\n⊢ map f (derivedSeries R L' (Nat.succ k)) = derivedSeries R L (Nat.succ k)\n[PROOFSTEP]\nsimp only [derivedSeries_def, map_bracket_eq f h, ih, derivedSeriesOfIdeal_succ]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nhI : IsSolvable R { x // x ∈ ↑I }\nhJ : IsSolvable R { x // x ∈ ↑J }\n⊢ IsSolvable R { x // x ∈ I + J }\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := id hI\n[GOAL]\ncase mk.intro\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nhI : IsSolvable R { x // x ∈ ↑I }\nhJ : IsSolvable R { x // x ∈ ↑J }\nk : ℕ\nhk : derivedSeries R { x // x ∈ ↑I } k = ⊥\n⊢ IsSolvable R { x // x ∈ I + J }\n[PROOFSTEP]\nobtain ⟨l, hl⟩ := id hJ\n[GOAL]\ncase mk.intro.mk.intro\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI J : LieIdeal R L\nhI : IsSolvable R { x // x ∈ ↑I }\nhJ : IsSolvable R { x // x ∈ ↑J }\nk : ℕ\nhk : derivedSeries R { x // x ∈ ↑I } k = ⊥\nl : ℕ\nhl : derivedSeries R { x // x ∈ ↑J } l = ⊥\n⊢ IsSolvable R { x // x ∈ I + J }\n[PROOFSTEP]\nexact ⟨⟨k + l, LieIdeal.derivedSeries_add_eq_bot hk hl⟩⟩\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh₁ : IsSolvable R L\nh₂ : Injective ↑f\n⊢ IsSolvable R L'\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := id h₁\n[GOAL]\ncase mk.intro\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh₁ : IsSolvable R L\nh₂ : Injective ↑f\nk : ℕ\nhk : derivedSeries R L k = ⊥\n⊢ IsSolvable R L'\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh₁ : IsSolvable R L\nh₂ : Injective ↑f\nk : ℕ\nhk : derivedSeries R L k = ⊥\n⊢ derivedSeries R L' k = ⊥\n[PROOFSTEP]\napply LieIdeal.bot_of_map_eq_bot h₂\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh₁ : IsSolvable R L\nh₂ : Injective ↑f\nk : ℕ\nhk : derivedSeries R L k = ⊥\n⊢ LieIdeal.map f (derivedSeries R L' k) = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff, ← hk]\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh₁ : IsSolvable R L\nh₂ : Injective ↑f\nk : ℕ\nhk : derivedSeries R L k = ⊥\n⊢ LieIdeal.map f (derivedSeries R L' k) ≤ derivedSeries R L k\n[PROOFSTEP]\napply LieIdeal.derivedSeries_map_le\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh₁ : IsSolvable R L'\nh₂ : Surjective ↑f\n⊢ IsSolvable R L\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := id h₁\n[GOAL]\ncase mk.intro\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh₁ : IsSolvable R L'\nh₂ : Surjective ↑f\nk : ℕ\nhk : derivedSeries R L' k = ⊥\n⊢ IsSolvable R L\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh₁ : IsSolvable R L'\nh₂ : Surjective ↑f\nk : ℕ\nhk : derivedSeries R L' k = ⊥\n⊢ derivedSeries R L k = ⊥\n[PROOFSTEP]\nrw [← LieIdeal.derivedSeries_map_eq k h₂, hk]\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nh₁ : IsSolvable R L'\nh₂ : Surjective ↑f\nk : ℕ\nhk : derivedSeries R L' k = ⊥\n⊢ LieIdeal.map f ⊥ = ⊥\n[PROOFSTEP]\nsimp only [LieIdeal.map_eq_bot_iff, bot_le]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ne : L' ≃ₗ⁅R⁆ L\n⊢ IsSolvable R L' ↔ IsSolvable R L\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ne : L' ≃ₗ⁅R⁆ L\n⊢ IsSolvable R L' → IsSolvable R L\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ne : L' ≃ₗ⁅R⁆ L\n⊢ IsSolvable R L → IsSolvable R L'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ne : L' ≃ₗ⁅R⁆ L\nh : IsSolvable R L'\n⊢ IsSolvable R L\n[PROOFSTEP]\nexact e.symm.injective.lieAlgebra_isSolvable\n[GOAL]\ncase mpr\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ne : L' ≃ₗ⁅R⁆ L\nh : IsSolvable R L\n⊢ IsSolvable R L'\n[PROOFSTEP]\nexact e.injective.lieAlgebra_isSolvable\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁵ : CommRing R\ninst✝⁴ : LieRing L\ninst✝³ : LieAlgebra R L\ninst✝² : LieRing L'\ninst✝¹ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ninst✝ : IsLieAbelian L\n⊢ IsSolvable R L\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁵ : CommRing R\ninst✝⁴ : LieRing L\ninst✝³ : LieAlgebra R L\ninst✝² : LieRing L'\ninst✝¹ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ninst✝ : IsLieAbelian L\n⊢ derivedSeries R L 1 = ⊥\n[PROOFSTEP]\nrw [← abelian_iff_derived_one_eq_bot, lie_abelian_iff_equiv_lie_abelian LieIdeal.topEquiv]\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁵ : CommRing R\ninst✝⁴ : LieRing L\ninst✝³ : LieAlgebra R L\ninst✝² : LieRing L'\ninst✝¹ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ninst✝ : IsLieAbelian L\n⊢ IsLieAbelian L\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁵ : CommRing R\ninst✝⁴ : LieRing L\ninst✝³ : LieAlgebra R L\ninst✝² : LieRing L'\ninst✝¹ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ninst✝ : IsNoetherian R L\n⊢ IsSolvable R { x // x ∈ ↑(radical R L) }\n[PROOFSTEP]\nhave hwf := LieSubmodule.wellFounded_of_noetherian R L L\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁵ : CommRing R\ninst✝⁴ : LieRing L\ninst✝³ : LieAlgebra R L\ninst✝² : LieRing L'\ninst✝¹ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ninst✝ : IsNoetherian R L\nhwf : WellFounded fun x x_1 => x > x_1\n⊢ IsSolvable R { x // x ∈ ↑(radical R L) }\n[PROOFSTEP]\nrw [← CompleteLattice.isSupClosedCompact_iff_wellFounded] at hwf \n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁵ : CommRing R\ninst✝⁴ : LieRing L\ninst✝³ : LieAlgebra R L\ninst✝² : LieRing L'\ninst✝¹ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ninst✝ : IsNoetherian R L\nhwf : CompleteLattice.IsSupClosedCompact (LieSubmodule R L L)\n⊢ IsSolvable R { x // x ∈ ↑(radical R L) }\n[PROOFSTEP]\nrefine' hwf {I : LieIdeal R L | IsSolvable R I} ⟨⊥, _⟩ fun I hI J hJ => _\n[GOAL]\ncase refine'_1\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁵ : CommRing R\ninst✝⁴ : LieRing L\ninst✝³ : LieAlgebra R L\ninst✝² : LieRing L'\ninst✝¹ : LieAlgebra R L'\nI J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ninst✝ : IsNoetherian R L\nhwf : CompleteLattice.IsSupClosedCompact (LieSubmodule R L L)\n⊢ ⊥ ∈ {I | IsSolvable R { x // x ∈ ↑I }}\n[PROOFSTEP]\nexact LieAlgebra.isSolvableBot R L\n[GOAL]\ncase refine'_2\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁵ : CommRing R\ninst✝⁴ : LieRing L\ninst✝³ : LieAlgebra R L\ninst✝² : LieRing L'\ninst✝¹ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ninst✝ : IsNoetherian R L\nhwf : CompleteLattice.IsSupClosedCompact (LieSubmodule R L L)\nI : LieSubmodule R L L\nhI : I ∈ {I | IsSolvable R { x // x ∈ ↑I }}\nJ : LieSubmodule R L L\nhJ : J ∈ {I | IsSolvable R { x // x ∈ ↑I }}\n⊢ I ⊔ J ∈ {I | IsSolvable R { x // x ∈ ↑I }}\n[PROOFSTEP]\nrw [Set.mem_setOf_eq] at hI hJ ⊢\n[GOAL]\ncase refine'_2\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁵ : CommRing R\ninst✝⁴ : LieRing L\ninst✝³ : LieAlgebra R L\ninst✝² : LieRing L'\ninst✝¹ : LieAlgebra R L'\nI✝ J✝ : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\ninst✝ : IsNoetherian R L\nhwf : CompleteLattice.IsSupClosedCompact (LieSubmodule R L L)\nI : LieSubmodule R L L\nhI : IsSolvable R { x // x ∈ ↑I }\nJ : LieSubmodule R L L\nhJ : IsSolvable R { x // x ∈ ↑J }\n⊢ IsSolvable R { x // x ∈ ↑(I ⊔ J) }\n[PROOFSTEP]\napply LieAlgebra.isSolvableAdd R L\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\n⊢ derivedLengthOfIdeal R L I = k + 1 ↔\n    IsLieAbelian { x // x ∈ ↑(derivedSeriesOfIdeal R L k I) } ∧ derivedSeriesOfIdeal R L k I ≠ ⊥\n[PROOFSTEP]\nrw [abelian_iff_derived_succ_eq_bot]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\n⊢ derivedLengthOfIdeal R L I = k + 1 ↔ derivedSeriesOfIdeal R L (k + 1) I = ⊥ ∧ derivedSeriesOfIdeal R L k I ≠ ⊥\n[PROOFSTEP]\nlet s := {k | derivedSeriesOfIdeal R L k I = ⊥}\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\n⊢ derivedLengthOfIdeal R L I = k + 1 ↔ derivedSeriesOfIdeal R L (k + 1) I = ⊥ ∧ derivedSeriesOfIdeal R L k I ≠ ⊥\n[PROOFSTEP]\nchange sInf s = k + 1 ↔ k + 1 ∈ s ∧ k ∉ s\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\n⊢ sInf s = k + 1 ↔ k + 1 ∈ s ∧ ¬k ∈ s\n[PROOFSTEP]\nhave hs : ∀ k₁ k₂ : ℕ, k₁ ≤ k₂ → k₁ ∈ s → k₂ ∈ s :=\n  by\n  intro k₁ k₂ h₁₂ h₁\n  suffices derivedSeriesOfIdeal R L k₂ I ≤ ⊥ by exact eq_bot_iff.mpr this\n  change derivedSeriesOfIdeal R L k₁ I = ⊥ at h₁ ; rw [← h₁]\n  exact derivedSeriesOfIdeal_antitone I h₁₂\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\n⊢ ∀ (k₁ k₂ : ℕ), k₁ ≤ k₂ → k₁ ∈ s → k₂ ∈ s\n[PROOFSTEP]\nintro k₁ k₂ h₁₂ h₁\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\nk₁ k₂ : ℕ\nh₁₂ : k₁ ≤ k₂\nh₁ : k₁ ∈ s\n⊢ k₂ ∈ s\n[PROOFSTEP]\nsuffices derivedSeriesOfIdeal R L k₂ I ≤ ⊥ by exact eq_bot_iff.mpr this\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\nk₁ k₂ : ℕ\nh₁₂ : k₁ ≤ k₂\nh₁ : k₁ ∈ s\nthis : derivedSeriesOfIdeal R L k₂ I ≤ ⊥\n⊢ k₂ ∈ s\n[PROOFSTEP]\nexact eq_bot_iff.mpr this\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\nk₁ k₂ : ℕ\nh₁₂ : k₁ ≤ k₂\nh₁ : k₁ ∈ s\n⊢ derivedSeriesOfIdeal R L k₂ I ≤ ⊥\n[PROOFSTEP]\nchange derivedSeriesOfIdeal R L k₁ I = ⊥ at h₁ \n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\nk₁ k₂ : ℕ\nh₁₂ : k₁ ≤ k₂\nh₁ : derivedSeriesOfIdeal R L k₁ I = ⊥\n⊢ derivedSeriesOfIdeal R L k₂ I ≤ ⊥\n[PROOFSTEP]\nrw [← h₁]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\nk₁ k₂ : ℕ\nh₁₂ : k₁ ≤ k₂\nh₁ : derivedSeriesOfIdeal R L k₁ I = ⊥\n⊢ derivedSeriesOfIdeal R L k₂ I ≤ derivedSeriesOfIdeal R L k₁ I\n[PROOFSTEP]\nexact derivedSeriesOfIdeal_antitone I h₁₂\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\nhs : ∀ (k₁ k₂ : ℕ), k₁ ≤ k₂ → k₁ ∈ s → k₂ ∈ s\n⊢ sInf s = k + 1 ↔ k + 1 ∈ s ∧ ¬k ∈ s\n[PROOFSTEP]\nexact Nat.sInf_upward_closed_eq_succ_iff hs k\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\n⊢ derivedLength R { x // x ∈ ↑I } = derivedLengthOfIdeal R L I\n[PROOFSTEP]\nlet s₁ := {k | derivedSeries R I k = ⊥}\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\ns₁ : Set ℕ := {k | derivedSeries R { x // x ∈ ↑I } k = ⊥}\n⊢ derivedLength R { x // x ∈ ↑I } = derivedLengthOfIdeal R L I\n[PROOFSTEP]\nlet s₂ := {k | derivedSeriesOfIdeal R L k I = ⊥}\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\ns₁ : Set ℕ := {k | derivedSeries R { x // x ∈ ↑I } k = ⊥}\ns₂ : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\n⊢ derivedLength R { x // x ∈ ↑I } = derivedLengthOfIdeal R L I\n[PROOFSTEP]\nchange sInf s₁ = sInf s₂\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\ns₁ : Set ℕ := {k | derivedSeries R { x // x ∈ ↑I } k = ⊥}\ns₂ : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\n⊢ sInf s₁ = sInf s₂\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\ns₁ : Set ℕ := {k | derivedSeries R { x // x ∈ ↑I } k = ⊥}\ns₂ : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\n⊢ s₁ = s₂\n[PROOFSTEP]\next k\n[GOAL]\ncase e_a.h\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\ns₁ : Set ℕ := {k | derivedSeries R { x // x ∈ ↑I } k = ⊥}\ns₂ : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\nk : ℕ\n⊢ k ∈ s₁ ↔ k ∈ s₂\n[PROOFSTEP]\nexact I.derivedSeries_eq_bot_iff k\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\n⊢ IsLieAbelian { x // x ∈ ↑(derivedAbelianOfIdeal I) }\n[PROOFSTEP]\ndsimp only [derivedAbelianOfIdeal]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\n⊢ IsLieAbelian\n    { x //\n      x ∈\n        ↑(match derivedLengthOfIdeal R L I with\n          | 0 => ⊥\n          | Nat.succ k => derivedSeriesOfIdeal R L k I) }\n[PROOFSTEP]\ncases' h : derivedLengthOfIdeal R L I with k\n[GOAL]\ncase zero\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh : derivedLengthOfIdeal R L I = Nat.zero\n⊢ IsLieAbelian\n    { x //\n      x ∈\n        ↑(match Nat.zero with\n          | 0 => ⊥\n          | Nat.succ k => derivedSeriesOfIdeal R L k I) }\n[PROOFSTEP]\nexact isLieAbelian_bot R L\n[GOAL]\ncase succ\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\nh : derivedLengthOfIdeal R L I = Nat.succ k\n⊢ IsLieAbelian\n    { x //\n      x ∈\n        ↑(match Nat.succ k with\n          | 0 => ⊥\n          | Nat.succ k => derivedSeriesOfIdeal R L k I) }\n[PROOFSTEP]\nrw [derivedSeries_of_derivedLength_succ] at h \n[GOAL]\ncase succ\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nk : ℕ\nh : IsLieAbelian { x // x ∈ ↑(derivedSeriesOfIdeal R L k I) } ∧ derivedSeriesOfIdeal R L k I ≠ ⊥\n⊢ IsLieAbelian\n    { x //\n      x ∈\n        ↑(match Nat.succ k with\n          | 0 => ⊥\n          | Nat.succ k => derivedSeriesOfIdeal R L k I) }\n[PROOFSTEP]\nexact h.1\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nhI : IsSolvable R { x // x ∈ ↑I }\n⊢ derivedLengthOfIdeal R L I = 0 ↔ I = ⊥\n[PROOFSTEP]\nlet s := {k | derivedSeriesOfIdeal R L k I = ⊥}\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nhI : IsSolvable R { x // x ∈ ↑I }\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\n⊢ derivedLengthOfIdeal R L I = 0 ↔ I = ⊥\n[PROOFSTEP]\nchange sInf s = 0 ↔ _\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nhI : IsSolvable R { x // x ∈ ↑I }\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\n⊢ sInf s = 0 ↔ I = ⊥\n[PROOFSTEP]\nhave hne : s ≠ ∅ := by\n  obtain ⟨k, hk⟩ := id hI\n  refine' Set.Nonempty.ne_empty ⟨k, _⟩\n  rw [derivedSeries_def, LieIdeal.derivedSeries_eq_bot_iff] at hk ; exact hk\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nhI : IsSolvable R { x // x ∈ ↑I }\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\n⊢ s ≠ ∅\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := id hI\n[GOAL]\ncase mk.intro\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nhI : IsSolvable R { x // x ∈ ↑I }\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\nk : ℕ\nhk : derivedSeries R { x // x ∈ ↑I } k = ⊥\n⊢ s ≠ ∅\n[PROOFSTEP]\nrefine' Set.Nonempty.ne_empty ⟨k, _⟩\n[GOAL]\ncase mk.intro\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nhI : IsSolvable R { x // x ∈ ↑I }\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\nk : ℕ\nhk : derivedSeries R { x // x ∈ ↑I } k = ⊥\n⊢ k ∈ s\n[PROOFSTEP]\nrw [derivedSeries_def, LieIdeal.derivedSeries_eq_bot_iff] at hk \n[GOAL]\ncase mk.intro\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nhI : IsSolvable R { x // x ∈ ↑I }\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\nk : ℕ\nhk : derivedSeriesOfIdeal R L k I = ⊥\n⊢ k ∈ s\n[PROOFSTEP]\nexact hk\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nhI : IsSolvable R { x // x ∈ ↑I }\ns : Set ℕ := {k | derivedSeriesOfIdeal R L k I = ⊥}\nhne : s ≠ ∅\n⊢ sInf s = 0 ↔ I = ⊥\n[PROOFSTEP]\nsimp [hne]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh : IsSolvable R { x // x ∈ ↑I }\n⊢ derivedAbelianOfIdeal I = ⊥ ↔ I = ⊥\n[PROOFSTEP]\ndsimp only [derivedAbelianOfIdeal]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh : IsSolvable R { x // x ∈ ↑I }\n⊢ (match derivedLengthOfIdeal R L I with\n      | 0 => ⊥\n      | Nat.succ k => derivedSeriesOfIdeal R L k I) =\n      ⊥ ↔\n    I = ⊥\n[PROOFSTEP]\nsplit\n  -- Porting note: Original tactic was `cases' h : derivedAbelianOfIdeal R L I with k`\n[GOAL]\ncase h_1\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh : IsSolvable R { x // x ∈ ↑I }\nx✝ : ℕ\nheq✝ : derivedLengthOfIdeal R L I = 0\n⊢ ⊥ = ⊥ ↔ I = ⊥\n[PROOFSTEP]\nrename_i h\n[GOAL]\ncase h_1\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh✝ : IsSolvable R { x // x ∈ ↑I }\nx✝ : ℕ\nh : derivedLengthOfIdeal R L I = 0\n⊢ ⊥ = ⊥ ↔ I = ⊥\n[PROOFSTEP]\nrw [derivedLength_zero] at h \n[GOAL]\ncase h_1\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh✝ : IsSolvable R { x // x ∈ ↑I }\nx✝ : ℕ\nh : I = ⊥\n⊢ ⊥ = ⊥ ↔ I = ⊥\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h_2\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh : IsSolvable R { x // x ∈ ↑I }\nx✝ k✝ : ℕ\nheq✝ : derivedLengthOfIdeal R L I = Nat.succ k✝\n⊢ derivedSeriesOfIdeal R L k✝ I = ⊥ ↔ I = ⊥\n[PROOFSTEP]\nrename_i k h\n[GOAL]\ncase h_2\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh✝ : IsSolvable R { x // x ∈ ↑I }\nx✝ k : ℕ\nh : derivedLengthOfIdeal R L I = Nat.succ k\n⊢ derivedSeriesOfIdeal R L k I = ⊥ ↔ I = ⊥\n[PROOFSTEP]\nobtain ⟨_, h₂⟩ := (derivedSeries_of_derivedLength_succ R L I k).mp h\n[GOAL]\ncase h_2.intro\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh✝ : IsSolvable R { x // x ∈ ↑I }\nx✝ k : ℕ\nh : derivedLengthOfIdeal R L I = Nat.succ k\nleft✝ : IsLieAbelian { x // x ∈ ↑(derivedSeriesOfIdeal R L k I) }\nh₂ : derivedSeriesOfIdeal R L k I ≠ ⊥\n⊢ derivedSeriesOfIdeal R L k I = ⊥ ↔ I = ⊥\n[PROOFSTEP]\nhave h₃ : I ≠ ⊥ := by intro contra; apply h₂; rw [contra]; apply derivedSeries_of_bot_eq_bot\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh✝ : IsSolvable R { x // x ∈ ↑I }\nx✝ k : ℕ\nh : derivedLengthOfIdeal R L I = Nat.succ k\nleft✝ : IsLieAbelian { x // x ∈ ↑(derivedSeriesOfIdeal R L k I) }\nh₂ : derivedSeriesOfIdeal R L k I ≠ ⊥\n⊢ I ≠ ⊥\n[PROOFSTEP]\nintro contra\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh✝ : IsSolvable R { x // x ∈ ↑I }\nx✝ k : ℕ\nh : derivedLengthOfIdeal R L I = Nat.succ k\nleft✝ : IsLieAbelian { x // x ∈ ↑(derivedSeriesOfIdeal R L k I) }\nh₂ : derivedSeriesOfIdeal R L k I ≠ ⊥\ncontra : I = ⊥\n⊢ False\n[PROOFSTEP]\napply h₂\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh✝ : IsSolvable R { x // x ∈ ↑I }\nx✝ k : ℕ\nh : derivedLengthOfIdeal R L I = Nat.succ k\nleft✝ : IsLieAbelian { x // x ∈ ↑(derivedSeriesOfIdeal R L k I) }\nh₂ : derivedSeriesOfIdeal R L k I ≠ ⊥\ncontra : I = ⊥\n⊢ derivedSeriesOfIdeal R L k I = ⊥\n[PROOFSTEP]\nrw [contra]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh✝ : IsSolvable R { x // x ∈ ↑I }\nx✝ k : ℕ\nh : derivedLengthOfIdeal R L I = Nat.succ k\nleft✝ : IsLieAbelian { x // x ∈ ↑(derivedSeriesOfIdeal R L k I) }\nh₂ : derivedSeriesOfIdeal R L k I ≠ ⊥\ncontra : I = ⊥\n⊢ derivedSeriesOfIdeal R L k ⊥ = ⊥\n[PROOFSTEP]\napply derivedSeries_of_bot_eq_bot\n[GOAL]\ncase h_2.intro\nR : Type u\nL : Type v\nM : Type w\nL' : Type w₁\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nI✝ J : LieIdeal R L\nf : L' →ₗ⁅R⁆ L\nI : LieIdeal R L\nh✝ : IsSolvable R { x // x ∈ ↑I }\nx✝ k : ℕ\nh : derivedLengthOfIdeal R L I = Nat.succ k\nleft✝ : IsLieAbelian { x // x ∈ ↑(derivedSeriesOfIdeal R L k I) }\nh₂ : derivedSeriesOfIdeal R L k I ≠ ⊥\nh₃ : I ≠ ⊥\n⊢ derivedSeriesOfIdeal R L k I = ⊥ ↔ I = ⊥\n[PROOFSTEP]\nsimp only [h₂, h₃]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.Solvable", "llama_tokens": 25280, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6859494421679929, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.39351438357587154}}
{"text": "[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : Add ι\ninst✝¹ : (i : ι) → AddCommMonoid (A i)\ninst✝ : GNonUnitalNonAssocSemiring A\nsrc✝ : AddCommMonoid (⨁ (i : ι), A i) := inferInstance\nx✝² x✝¹ x✝ : ⨁ (i : ι), A i\n⊢ x✝² * (x✝¹ + x✝) = x✝² * x✝¹ + x✝² * x✝\n[PROOFSTEP]\nsimp only [HMul.hMul, AddMonoidHom.map_add]\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : Add ι\ninst✝¹ : (i : ι) → AddCommMonoid (A i)\ninst✝ : GNonUnitalNonAssocSemiring A\nsrc✝ : AddCommMonoid (⨁ (i : ι), A i) := inferInstance\nx✝² x✝¹ x✝ : ⨁ (i : ι), A i\n⊢ (x✝² + x✝¹) * x✝ = x✝² * x✝ + x✝¹ * x✝\n[PROOFSTEP]\nsimp only [HMul.hMul, AddMonoidHom.map_add, AddMonoidHom.add_apply]\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : Add ι\ninst✝¹ : (i : ι) → AddCommMonoid (A i)\ninst✝ : GNonUnitalNonAssocSemiring A\nsrc✝ : AddCommMonoid (⨁ (i : ι), A i) := inferInstance\nx✝ : ⨁ (i : ι), A i\n⊢ 0 * x✝ = 0\n[PROOFSTEP]\nsimp only [HMul.hMul, map_zero, AddMonoidHom.zero_apply]\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : Add ι\ninst✝¹ : (i : ι) → AddCommMonoid (A i)\ninst✝ : GNonUnitalNonAssocSemiring A\nsrc✝ : AddCommMonoid (⨁ (i : ι), A i) := inferInstance\nx✝ : ⨁ (i : ι), A i\n⊢ x✝ * 0 = 0\n[PROOFSTEP]\nsimp only [HMul.hMul, AddMonoidHom.map_zero]\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : Add ι\ninst✝¹ : (i : ι) → AddCommMonoid (A i)\ninst✝ : GNonUnitalNonAssocSemiring A\ni j : ι\na : A i\nb : A j\n⊢ ↑(↑(mulHom A) (↑(of A i) a)) (↑(of A j) b) = ↑(of A (i + j)) (GradedMonoid.GMul.mul a b)\n[PROOFSTEP]\nunfold mulHom\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : Add ι\ninst✝¹ : (i : ι) → AddCommMonoid (A i)\ninst✝ : GNonUnitalNonAssocSemiring A\ni j : ι\na : A i\nb : A j\n⊢ ↑(↑(toAddMonoid fun x =>\n              AddMonoidHom.flip\n                (toAddMonoid fun x_1 => AddMonoidHom.flip (AddMonoidHom.comp (↑compHom (of A (x + x_1))) (gMulHom A))))\n          (↑(of A i) a))\n      (↑(of A j) b) =\n    ↑(of A (i + j)) (GradedMonoid.GMul.mul a b)\n[PROOFSTEP]\nsimp only [toAddMonoid_of, flip_apply, coe_comp, Function.comp_apply]\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : Add ι\ninst✝¹ : (i : ι) → AddCommMonoid (A i)\ninst✝ : GNonUnitalNonAssocSemiring A\ni j : ι\na : A i\nb : A j\n⊢ ↑(↑(↑compHom (of A (i + j))) (↑(gMulHom A) a)) b = ↑(of A (i + j)) (GradedMonoid.GMul.mul a b)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nx : ⨁ (i : ι), A i\n⊢ 1 * x = x\n[PROOFSTEP]\nsuffices mulHom A One.one = AddMonoidHom.id (⨁ i, A i) from FunLike.congr_fun this x\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nx : ⨁ (i : ι), A i\n⊢ ↑(mulHom A) One.one = AddMonoidHom.id (⨁ (i : ι), A i)\n[PROOFSTEP]\napply addHom_ext\n[GOAL]\ncase H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nx : ⨁ (i : ι), A i\n⊢ ∀ (i : ι) (y : A i),\n    ↑(↑(mulHom A) One.one) (↑(of (fun i => A i) i) y) = ↑(AddMonoidHom.id (⨁ (i : ι), A i)) (↑(of (fun i => A i) i) y)\n[PROOFSTEP]\nintro i xi\n[GOAL]\ncase H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nx : ⨁ (i : ι), A i\ni : ι\nxi : A i\n⊢ ↑(↑(mulHom A) One.one) (↑(of (fun i => A i) i) xi) = ↑(AddMonoidHom.id (⨁ (i : ι), A i)) (↑(of (fun i => A i) i) xi)\n[PROOFSTEP]\nsimp only [One.one]\n[GOAL]\ncase H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nx : ⨁ (i : ι), A i\ni : ι\nxi : A i\n⊢ ↑(↑(mulHom A) (↑(of (fun i => A i) 0) GradedMonoid.GOne.one)) (↑(of (fun i => A i) i) xi) =\n    ↑(AddMonoidHom.id (⨁ (i : ι), A i)) (↑(of (fun i => A i) i) xi)\n[PROOFSTEP]\nrw [mulHom_of_of]\n[GOAL]\ncase H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nx : ⨁ (i : ι), A i\ni : ι\nxi : A i\n⊢ ↑(of A (0 + i)) (GradedMonoid.GMul.mul GradedMonoid.GOne.one xi) =\n    ↑(AddMonoidHom.id (⨁ (i : ι), A i)) (↑(of (fun i => A i) i) xi)\n[PROOFSTEP]\nexact of_eq_of_gradedMonoid_eq (one_mul <| GradedMonoid.mk i xi)\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nx : ⨁ (i : ι), A i\n⊢ x * 1 = x\n[PROOFSTEP]\nsuffices (mulHom A).flip One.one = AddMonoidHom.id (⨁ i, A i) from FunLike.congr_fun this x\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nx : ⨁ (i : ι), A i\n⊢ ↑(AddMonoidHom.flip (mulHom A)) One.one = AddMonoidHom.id (⨁ (i : ι), A i)\n[PROOFSTEP]\napply addHom_ext\n[GOAL]\ncase H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nx : ⨁ (i : ι), A i\n⊢ ∀ (i : ι) (y : A i),\n    ↑(↑(AddMonoidHom.flip (mulHom A)) One.one) (↑(of (fun i => A i) i) y) =\n      ↑(AddMonoidHom.id (⨁ (i : ι), A i)) (↑(of (fun i => A i) i) y)\n[PROOFSTEP]\nintro i xi\n[GOAL]\ncase H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nx : ⨁ (i : ι), A i\ni : ι\nxi : A i\n⊢ ↑(↑(AddMonoidHom.flip (mulHom A)) One.one) (↑(of (fun i => A i) i) xi) =\n    ↑(AddMonoidHom.id (⨁ (i : ι), A i)) (↑(of (fun i => A i) i) xi)\n[PROOFSTEP]\nsimp only [One.one]\n[GOAL]\ncase H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nx : ⨁ (i : ι), A i\ni : ι\nxi : A i\n⊢ ↑(↑(AddMonoidHom.flip (mulHom A)) (↑(of (fun i => A i) 0) GradedMonoid.GOne.one)) (↑(of (fun i => A i) i) xi) =\n    ↑(AddMonoidHom.id (⨁ (i : ι), A i)) (↑(of (fun i => A i) i) xi)\n[PROOFSTEP]\nrw [flip_apply, mulHom_of_of]\n[GOAL]\ncase H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nx : ⨁ (i : ι), A i\ni : ι\nxi : A i\n⊢ ↑(of A (i + 0)) (GradedMonoid.GMul.mul xi GradedMonoid.GOne.one) =\n    ↑(AddMonoidHom.id (⨁ (i : ι), A i)) (↑(of (fun i => A i) i) xi)\n[PROOFSTEP]\nexact of_eq_of_gradedMonoid_eq (mul_one <| GradedMonoid.mk i xi)\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\na b c : ⨁ (i : ι), A i\n⊢ a * b * c = a * (b * c)\n[PROOFSTEP]\nsuffices\n  (mulHom A).compHom.comp (mulHom A) = (AddMonoidHom.compHom flipHom <| (mulHom A).flip.compHom.comp (mulHom A)).flip\n  by\n  have sol := FunLike.congr_fun (FunLike.congr_fun (FunLike.congr_fun this a) b) c\n  have aux : ∀ a b, (mulHom A) a b = a * b := fun _ _ ↦ rfl\n  simp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, aux, flip_apply,\n    AddMonoidHom.flipHom_apply] at sol \n  exact sol\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\na b c : ⨁ (i : ι), A i\nthis :\n  AddMonoidHom.comp (↑compHom (mulHom A)) (mulHom A) =\n    AddMonoidHom.flip (↑(↑compHom flipHom) (AddMonoidHom.comp (↑compHom (AddMonoidHom.flip (mulHom A))) (mulHom A)))\n⊢ a * b * c = a * (b * c)\n[PROOFSTEP]\nhave sol := FunLike.congr_fun (FunLike.congr_fun (FunLike.congr_fun this a) b) c\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\na b c : ⨁ (i : ι), A i\nthis :\n  AddMonoidHom.comp (↑compHom (mulHom A)) (mulHom A) =\n    AddMonoidHom.flip (↑(↑compHom flipHom) (AddMonoidHom.comp (↑compHom (AddMonoidHom.flip (mulHom A))) (mulHom A)))\nsol :\n  ↑(↑(↑(AddMonoidHom.comp (↑compHom (mulHom A)) (mulHom A)) a) b) c =\n    ↑(↑(↑(AddMonoidHom.flip\n                  (↑(↑compHom flipHom) (AddMonoidHom.comp (↑compHom (AddMonoidHom.flip (mulHom A))) (mulHom A))))\n              a)\n          b)\n      c\n⊢ a * b * c = a * (b * c)\n[PROOFSTEP]\nhave aux : ∀ a b, (mulHom A) a b = a * b := fun _ _ ↦ rfl\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\na b c : ⨁ (i : ι), A i\nthis :\n  AddMonoidHom.comp (↑compHom (mulHom A)) (mulHom A) =\n    AddMonoidHom.flip (↑(↑compHom flipHom) (AddMonoidHom.comp (↑compHom (AddMonoidHom.flip (mulHom A))) (mulHom A)))\nsol :\n  ↑(↑(↑(AddMonoidHom.comp (↑compHom (mulHom A)) (mulHom A)) a) b) c =\n    ↑(↑(↑(AddMonoidHom.flip\n                  (↑(↑compHom flipHom) (AddMonoidHom.comp (↑compHom (AddMonoidHom.flip (mulHom A))) (mulHom A))))\n              a)\n          b)\n      c\naux : ∀ (a b : ⨁ (i : ι), A i), ↑(↑(mulHom A) a) b = a * b\n⊢ a * b * c = a * (b * c)\n[PROOFSTEP]\nsimp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, aux, flip_apply,\n  AddMonoidHom.flipHom_apply] at sol \n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\na b c : ⨁ (i : ι), A i\nthis :\n  AddMonoidHom.comp (↑compHom (mulHom A)) (mulHom A) =\n    AddMonoidHom.flip (↑(↑compHom flipHom) (AddMonoidHom.comp (↑compHom (AddMonoidHom.flip (mulHom A))) (mulHom A)))\naux : ∀ (a b : ⨁ (i : ι), A i), ↑(↑(mulHom A) a) b = a * b\nsol : a * b * c = a * (b * c)\n⊢ a * b * c = a * (b * c)\n[PROOFSTEP]\nexact sol\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\na b c : ⨁ (i : ι), A i\n⊢ AddMonoidHom.comp (↑compHom (mulHom A)) (mulHom A) =\n    AddMonoidHom.flip (↑(↑compHom flipHom) (AddMonoidHom.comp (↑compHom (AddMonoidHom.flip (mulHom A))) (mulHom A)))\n[PROOFSTEP]\next ai ax bi bx ci cx\n[GOAL]\ncase H.h.H.h.H.h\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\na b c : ⨁ (i : ι), A i\nai : ι\nax : A ai\nbi : ι\nbx : A bi\nci : ι\ncx : A ci\n⊢ ↑(AddMonoidHom.comp\n          (↑(AddMonoidHom.comp\n                (↑(AddMonoidHom.comp (AddMonoidHom.comp (↑compHom (mulHom A)) (mulHom A)) (of (fun i => A i) ai)) ax)\n                (of (fun i => A i) bi))\n            bx)\n          (of (fun i => A i) ci))\n      cx =\n    ↑(AddMonoidHom.comp\n          (↑(AddMonoidHom.comp\n                (↑(AddMonoidHom.comp\n                      (AddMonoidHom.flip\n                        (↑(↑compHom flipHom) (AddMonoidHom.comp (↑compHom (AddMonoidHom.flip (mulHom A))) (mulHom A))))\n                      (of (fun i => A i) ai))\n                  ax)\n                (of (fun i => A i) bi))\n            bx)\n          (of (fun i => A i) ci))\n      cx\n[PROOFSTEP]\ndsimp only [coe_comp, Function.comp_apply, AddMonoidHom.compHom_apply_apply, flip_apply, AddMonoidHom.flipHom_apply]\n[GOAL]\ncase H.h.H.h.H.h\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\na b c : ⨁ (i : ι), A i\nai : ι\nax : A ai\nbi : ι\nbx : A bi\nci : ι\ncx : A ci\n⊢ ↑(↑(mulHom A) (↑(↑(mulHom A) (↑(of (fun i => A i) ai) ax)) (↑(of (fun i => A i) bi) bx)))\n      (↑(of (fun i => A i) ci) cx) =\n    ↑(↑(mulHom A) (↑(of (fun i => A i) ai) ax))\n      (↑(↑(mulHom A) (↑(of (fun i => A i) bi) bx)) (↑(of (fun i => A i) ci) cx))\n[PROOFSTEP]\nsimp_rw [mulHom_of_of]\n[GOAL]\ncase H.h.H.h.H.h\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\na b c : ⨁ (i : ι), A i\nai : ι\nax : A ai\nbi : ι\nbx : A bi\nci : ι\ncx : A ci\n⊢ ↑(of A (ai + bi + ci)) (GradedMonoid.GMul.mul (GradedMonoid.GMul.mul ax bx) cx) =\n    ↑(of A (ai + (bi + ci))) (GradedMonoid.GMul.mul ax (GradedMonoid.GMul.mul bx cx))\n[PROOFSTEP]\nexact of_eq_of_gradedMonoid_eq (_root_.mul_assoc (GradedMonoid.mk ai ax) ⟨bi, bx⟩ ⟨ci, cx⟩)\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nsrc✝ : NonUnitalNonAssocSemiring (⨁ (i : ι), A i) := inferInstance\n⊢ NatCast.natCast 0 = 0\n[PROOFSTEP]\nsimp only [GSemiring.natCast_zero, map_zero]\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nsrc✝ : NonUnitalNonAssocSemiring (⨁ (i : ι), A i) := inferInstance\nn : ℕ\n⊢ NatCast.natCast (n + 1) = NatCast.natCast n + 1\n[PROOFSTEP]\nsimp_rw [GSemiring.natCast_succ]\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nsrc✝ : NonUnitalNonAssocSemiring (⨁ (i : ι), A i) := inferInstance\nn : ℕ\n⊢ ↑(of (fun i => A i) 0) (GSemiring.natCast n + GradedMonoid.GOne.one) =\n    ↑(of (fun i => A i) 0) (GSemiring.natCast n) + 1\n[PROOFSTEP]\nrw [map_add]\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nsrc✝ : NonUnitalNonAssocSemiring (⨁ (i : ι), A i) := inferInstance\nn : ℕ\n⊢ ↑(of (fun i => A i) 0) (GSemiring.natCast n) + ↑(of (fun i => A i) 0) GradedMonoid.GOne.one =\n    ↑(of (fun i => A i) 0) (GSemiring.natCast n) + 1\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\ni : ι\na : A i\nn : ℕ\n⊢ ↑(of A i) a ^ n = ↑(of A (n • i)) (GradedMonoid.GMonoid.gnpow n a)\n[PROOFSTEP]\ninduction' n with n n_ih\n[GOAL]\ncase zero\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\ni : ι\na : A i\n⊢ ↑(of A i) a ^ Nat.zero = ↑(of A (Nat.zero • i)) (GradedMonoid.GMonoid.gnpow Nat.zero a)\n[PROOFSTEP]\nexact of_eq_of_gradedMonoid_eq (pow_zero <| GradedMonoid.mk _ a).symm\n[GOAL]\ncase succ\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\ni : ι\na : A i\nn : ℕ\nn_ih : ↑(of A i) a ^ n = ↑(of A (n • i)) (GradedMonoid.GMonoid.gnpow n a)\n⊢ ↑(of A i) a ^ Nat.succ n = ↑(of A (Nat.succ n • i)) (GradedMonoid.GMonoid.gnpow (Nat.succ n) a)\n[PROOFSTEP]\nrw [pow_succ, n_ih, of_mul_of a]\n[GOAL]\ncase succ\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\ni : ι\na : A i\nn : ℕ\nn_ih : ↑(of A i) a ^ n = ↑(of A (n • i)) (GradedMonoid.GMonoid.gnpow n a)\n⊢ ↑(of A (i + n • i)) (GradedMonoid.GMul.mul a (GradedMonoid.GMonoid.gnpow n a)) =\n    ↑(of A (Nat.succ n • i)) (GradedMonoid.GMonoid.gnpow (Nat.succ n) a)\n[PROOFSTEP]\nexact of_eq_of_gradedMonoid_eq (pow_succ (GradedMonoid.mk _ a) n).symm\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nα : Type u_3\nl : List α\nfι : α → ι\nfA : (a : α) → A (fι a)\n⊢ ↑(of A (List.dProdIndex l fι)) (List.dProd l fι fA) = List.prod (List.map (fun a => ↑(of A (fι a)) (fA a)) l)\n[PROOFSTEP]\ninduction' l with head tail\n[GOAL]\ncase nil\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nα : Type u_3\nfι : α → ι\nfA : (a : α) → A (fι a)\n⊢ ↑(of A (List.dProdIndex [] fι)) (List.dProd [] fι fA) = List.prod (List.map (fun a => ↑(of A (fι a)) (fA a)) [])\n[PROOFSTEP]\nsimp only [List.map_nil, List.prod_nil, List.dProd_nil]\n[GOAL]\ncase nil\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nα : Type u_3\nfι : α → ι\nfA : (a : α) → A (fι a)\n⊢ ↑(of A (List.dProdIndex [] fι)) GradedMonoid.GOne.one = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nα : Type u_3\nfι : α → ι\nfA : (a : α) → A (fι a)\nhead : α\ntail : List α\ntail_ih✝ :\n  ↑(of A (List.dProdIndex tail fι)) (List.dProd tail fι fA) = List.prod (List.map (fun a => ↑(of A (fι a)) (fA a)) tail)\n⊢ ↑(of A (List.dProdIndex (head :: tail) fι)) (List.dProd (head :: tail) fι fA) =\n    List.prod (List.map (fun a => ↑(of A (fι a)) (fA a)) (head :: tail))\n[PROOFSTEP]\nrename_i ih\n[GOAL]\ncase cons\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nα : Type u_3\nfι : α → ι\nfA : (a : α) → A (fι a)\nhead : α\ntail : List α\nih :\n  ↑(of A (List.dProdIndex tail fι)) (List.dProd tail fι fA) = List.prod (List.map (fun a => ↑(of A (fι a)) (fA a)) tail)\n⊢ ↑(of A (List.dProdIndex (head :: tail) fι)) (List.dProd (head :: tail) fι fA) =\n    List.prod (List.map (fun a => ↑(of A (fι a)) (fA a)) (head :: tail))\n[PROOFSTEP]\nsimp only [List.map_cons, List.prod_cons, List.dProd_cons, ← ih]\n[GOAL]\ncase cons\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nα : Type u_3\nfι : α → ι\nfA : (a : α) → A (fι a)\nhead : α\ntail : List α\nih :\n  ↑(of A (List.dProdIndex tail fι)) (List.dProd tail fι fA) = List.prod (List.map (fun a => ↑(of A (fι a)) (fA a)) tail)\n⊢ ↑(of A (List.dProdIndex (head :: tail) fι)) (GradedMonoid.GMul.mul (fA head) (List.dProd tail fι fA)) =\n    ↑(of A (fι head)) (fA head) * ↑(of A (List.dProdIndex tail fι)) (List.dProd tail fι fA)\n[PROOFSTEP]\nrw [DirectSum.of_mul_of (fA head)]\n[GOAL]\ncase cons\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nα : Type u_3\nfι : α → ι\nfA : (a : α) → A (fι a)\nhead : α\ntail : List α\nih :\n  ↑(of A (List.dProdIndex tail fι)) (List.dProd tail fι fA) = List.prod (List.map (fun a => ↑(of A (fι a)) (fA a)) tail)\n⊢ ↑(of A (List.dProdIndex (head :: tail) fι)) (GradedMonoid.GMul.mul (fA head) (List.dProd tail fι fA)) =\n    ↑(of A (fι head + List.dProdIndex tail fι)) (GradedMonoid.GMul.mul (fA head) (List.dProd tail fι fA))\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\nn : ℕ\nfι : Fin n → ι\nfA : (a : Fin n) → A (fι a)\n⊢ List.prod (List.ofFn fun a => ↑(of A (fι a)) (fA a)) =\n    ↑(of A (List.dProdIndex (List.finRange n) fι)) (List.dProd (List.finRange n) fι fA)\n[PROOFSTEP]\nrw [List.ofFn_eq_map, ofList_dProd]\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)\na a' : ⨁ (i : ι), A i\n⊢ a * a' = DFinsupp.sum a fun i ai => DFinsupp.sum a' fun j aj => ↑(of A (i + j)) (GradedMonoid.GMul.mul ai aj)\n[PROOFSTEP]\nchange\n  mulHom _ a a' =\n    _\n      -- Porting note: I have no idea how the proof from ml3 worked it used to be\n        -- simpa only [mul_hom, to_add_monoid, dfinsupp.lift_add_hom_apply, dfinsupp.sum_add_hom_apply,\n        -- add_monoid_hom.dfinsupp_sum_apply, flip_apply, add_monoid_hom.dfinsupp_sum_add_hom_apply],\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)\na a' : ⨁ (i : ι), A i\n⊢ ↑(↑(mulHom fun i => A i) a) a' =\n    DFinsupp.sum a fun i ai => DFinsupp.sum a' fun j aj => ↑(of A (i + j)) (GradedMonoid.GMul.mul ai aj)\n[PROOFSTEP]\nrw [mulHom, toAddMonoid, DFinsupp.liftAddHom_apply, DFinsupp.sumAddHom_apply, AddMonoidHom.dfinsupp_sum_apply]\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)\na a' : ⨁ (i : ι), A i\n⊢ (DFinsupp.sum a fun a b =>\n      ↑(↑(AddMonoidHom.flip\n                (toAddMonoid fun x =>\n                  AddMonoidHom.flip (AddMonoidHom.comp (↑compHom (of (fun i => A i) (a + x))) (gMulHom fun i => A i))))\n            b)\n        a') =\n    DFinsupp.sum a fun i ai => DFinsupp.sum a' fun j aj => ↑(of A (i + j)) (GradedMonoid.GMul.mul ai aj)\n[PROOFSTEP]\napply congrArg _\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)\na a' : ⨁ (i : ι), A i\n⊢ (fun a b =>\n      ↑(↑(AddMonoidHom.flip\n                (toAddMonoid fun x =>\n                  AddMonoidHom.flip (AddMonoidHom.comp (↑compHom (of (fun i => A i) (a + x))) (gMulHom fun i => A i))))\n            b)\n        a') =\n    fun i ai => DFinsupp.sum a' fun j aj => ↑(of A (i + j)) (GradedMonoid.GMul.mul ai aj)\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)\na a' : ⨁ (i : ι), A i\nx : ι\n⊢ (fun b =>\n      ↑(↑(AddMonoidHom.flip\n                (toAddMonoid fun x_1 =>\n                  AddMonoidHom.flip\n                    (AddMonoidHom.comp (↑compHom (of (fun i => A i) (x + x_1))) (gMulHom fun i => A i))))\n            b)\n        a') =\n    fun ai => DFinsupp.sum a' fun j aj => ↑(of A (x + j)) (GradedMonoid.GMul.mul ai aj)\n[PROOFSTEP]\nsimp_rw [flip_apply]\n[GOAL]\ncase h\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)\na a' : ⨁ (i : ι), A i\nx : ι\n⊢ (fun b =>\n      ↑(↑(toAddMonoid fun x_1 =>\n                AddMonoidHom.flip (AddMonoidHom.comp (↑compHom (of (fun i => A i) (x + x_1))) (gMulHom fun i => A i)))\n            a')\n        b) =\n    fun ai => DFinsupp.sum a' fun j aj => ↑(of A (x + j)) (GradedMonoid.GMul.mul ai aj)\n[PROOFSTEP]\nerw [DFinsupp.sumAddHom_apply]\n[GOAL]\ncase h\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)\na a' : ⨁ (i : ι), A i\nx : ι\n⊢ (fun b =>\n      ↑(DFinsupp.sum a' fun x_1 =>\n            ↑((fun x_2 =>\n                  AddMonoidHom.flip (AddMonoidHom.comp (↑compHom (of (fun i => A i) (x + x_2))) (gMulHom fun i => A i)))\n                x_1))\n        b) =\n    fun ai => DFinsupp.sum a' fun j aj => ↑(of A (x + j)) (GradedMonoid.GMul.mul ai aj)\n[PROOFSTEP]\nsimp only [gMulHom, AddMonoidHom.dfinsupp_sum_apply, flip_apply, coe_comp, AddMonoidHom.coe_mk, ZeroHom.coe_mk,\n  Function.comp_apply, AddMonoidHom.compHom_apply_apply]\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : (i : ι) → (x : A i) → Decidable (x ≠ 0)\na a' : ⨁ (i : ι), A i\n⊢ a * a' =\n    ∑ ij in DFinsupp.support a ×ˢ DFinsupp.support a',\n      ↑(of (fun i => (fun i => A i) i) (ij.fst + ij.snd)) (GradedMonoid.GMul.mul (↑a ij.fst) (↑a' ij.snd))\n[PROOFSTEP]\nsimp only [mul_eq_dfinsupp_sum, DFinsupp.sum, Finset.sum_product]\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddCommMonoid ι\ninst✝ : GCommSemiring A\na b : ⨁ (i : ι), A i\n⊢ a * b = b * a\n[PROOFSTEP]\nsuffices mulHom A = (mulHom A).flip by rw [← mulHom_apply, this, AddMonoidHom.flip_apply, mulHom_apply]\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddCommMonoid ι\ninst✝ : GCommSemiring A\na b : ⨁ (i : ι), A i\nthis : mulHom A = AddMonoidHom.flip (mulHom A)\n⊢ a * b = b * a\n[PROOFSTEP]\nrw [← mulHom_apply, this, AddMonoidHom.flip_apply, mulHom_apply]\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddCommMonoid ι\ninst✝ : GCommSemiring A\na b : ⨁ (i : ι), A i\n⊢ mulHom A = AddMonoidHom.flip (mulHom A)\n[PROOFSTEP]\napply addHom_ext\n[GOAL]\ncase H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddCommMonoid ι\ninst✝ : GCommSemiring A\na b : ⨁ (i : ι), A i\n⊢ ∀ (i : ι) (y : A i),\n    ↑(mulHom A) (↑(of (fun i => A i) i) y) = ↑(AddMonoidHom.flip (mulHom A)) (↑(of (fun i => A i) i) y)\n[PROOFSTEP]\nintro ai ax\n[GOAL]\ncase H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddCommMonoid ι\ninst✝ : GCommSemiring A\na b : ⨁ (i : ι), A i\nai : ι\nax : A ai\n⊢ ↑(mulHom A) (↑(of (fun i => A i) ai) ax) = ↑(AddMonoidHom.flip (mulHom A)) (↑(of (fun i => A i) ai) ax)\n[PROOFSTEP]\napply addHom_ext\n[GOAL]\ncase H.H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddCommMonoid ι\ninst✝ : GCommSemiring A\na b : ⨁ (i : ι), A i\nai : ι\nax : A ai\n⊢ ∀ (i : ι) (y : A i),\n    ↑(↑(mulHom A) (↑(of (fun i => A i) ai) ax)) (↑(of (fun i => A i) i) y) =\n      ↑(↑(AddMonoidHom.flip (mulHom A)) (↑(of (fun i => A i) ai) ax)) (↑(of (fun i => A i) i) y)\n[PROOFSTEP]\nintro bi bx\n[GOAL]\ncase H.H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddCommMonoid ι\ninst✝ : GCommSemiring A\na b : ⨁ (i : ι), A i\nai : ι\nax : A ai\nbi : ι\nbx : A bi\n⊢ ↑(↑(mulHom A) (↑(of (fun i => A i) ai) ax)) (↑(of (fun i => A i) bi) bx) =\n    ↑(↑(AddMonoidHom.flip (mulHom A)) (↑(of (fun i => A i) ai) ax)) (↑(of (fun i => A i) bi) bx)\n[PROOFSTEP]\nrw [AddMonoidHom.flip_apply, mulHom_of_of, mulHom_of_of]\n[GOAL]\ncase H.H\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddCommMonoid ι\ninst✝ : GCommSemiring A\na b : ⨁ (i : ι), A i\nai : ι\nax : A ai\nbi : ι\nbx : A bi\n⊢ ↑(of A (ai + bi)) (GradedMonoid.GMul.mul ax bx) = ↑(of A (bi + ai)) (GradedMonoid.GMul.mul bx ax)\n[PROOFSTEP]\nexact of_eq_of_gradedMonoid_eq (GCommSemiring.mul_comm ⟨ai, ax⟩ ⟨bi, bx⟩)\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : AddZeroClass ι\ninst✝¹ : (i : ι) → AddCommMonoid (A i)\ninst✝ : GNonUnitalNonAssocSemiring A\ni : ι\n⊢ SMulWithZero (A 0) (A i)\n[PROOFSTEP]\nletI := SMulWithZero.compHom (⨁ i, A i) (of A 0).toZeroHom\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : AddZeroClass ι\ninst✝¹ : (i : ι) → AddCommMonoid (A i)\ninst✝ : GNonUnitalNonAssocSemiring A\ni : ι\nthis : SMulWithZero (A 0) (⨁ (i : ι), A i) := SMulWithZero.compHom (⨁ (i : ι), A i) ↑(of A 0)\n⊢ SMulWithZero (A 0) (A i)\n[PROOFSTEP]\nexact Function.Injective.smulWithZero (of A i).toZeroHom DFinsupp.single_injective (of_zero_smul A)\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\na : A 0\n⊢ ↑(of A 0) (a ^ 0) = ↑(of A 0) a ^ 0\n[PROOFSTEP]\nrw [pow_zero, pow_zero, DirectSum.of_zero_one]\n  -- Porting note: Lean doesn't think this terminates if we only use `of_zero_pow` alone\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GSemiring A\na : A 0\nn : ℕ\n⊢ ↑(of A 0) (a ^ (n + 1)) = ↑(of A 0) a ^ (n + 1)\n[PROOFSTEP]\nrw [pow_succ, pow_succ, of_zero_mul, of_zero_pow _ n]\n[GOAL]\nι : Type u_1\ninst✝³ : DecidableEq ι\nA : ι → Type u_2\ninst✝² : (i : ι) → AddCommGroup (A i)\ninst✝¹ : AddMonoid ι\ninst✝ : GRing A\nn : ℤ\n⊢ ↑(of A 0) ↑n = ↑n\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nf : (i : ι) → A i →+ R\nhone : ↑(f 0) GradedMonoid.GOne.one = 1\nhmul : ∀ {i j : ι} (ai : A i) (aj : A j), ↑(f (i + j)) (GradedMonoid.GMul.mul ai aj) = ↑(f i) ai * ↑(f j) aj\nsrc✝ : (⨁ (i : ι), A i) →+ R := toAddMonoid f\n⊢ ↑(toAddMonoid f) 1 = 1\n[PROOFSTEP]\nchange (toAddMonoid f) (of _ 0 _) = 1\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nf : (i : ι) → A i →+ R\nhone : ↑(f 0) GradedMonoid.GOne.one = 1\nhmul : ∀ {i j : ι} (ai : A i) (aj : A j), ↑(f (i + j)) (GradedMonoid.GMul.mul ai aj) = ↑(f i) ai * ↑(f j) aj\nsrc✝ : (⨁ (i : ι), A i) →+ R := toAddMonoid f\n⊢ ↑(toAddMonoid f) (↑(of (fun i => A i) 0) GradedMonoid.GOne.one) = 1\n[PROOFSTEP]\nrw [toAddMonoid_of]\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nf : (i : ι) → A i →+ R\nhone : ↑(f 0) GradedMonoid.GOne.one = 1\nhmul : ∀ {i j : ι} (ai : A i) (aj : A j), ↑(f (i + j)) (GradedMonoid.GMul.mul ai aj) = ↑(f i) ai * ↑(f j) aj\nsrc✝ : (⨁ (i : ι), A i) →+ R := toAddMonoid f\n⊢ ↑(f 0) GradedMonoid.GOne.one = 1\n[PROOFSTEP]\nexact hone\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nf : (i : ι) → A i →+ R\nhone : ↑(f 0) GradedMonoid.GOne.one = 1\nhmul : ∀ {i j : ι} (ai : A i) (aj : A j), ↑(f (i + j)) (GradedMonoid.GMul.mul ai aj) = ↑(f i) ai * ↑(f j) aj\nsrc✝ : (⨁ (i : ι), A i) →+ R := toAddMonoid f\n⊢ ∀ (x y : ⨁ (i : ι), A i),\n    OneHom.toFun\n        { toFun := ↑(toAddMonoid f),\n          map_one' := (_ : ↑(toAddMonoid f) (↑(of (fun i => A i) 0) GradedMonoid.GOne.one) = 1) }\n        (x * y) =\n      OneHom.toFun\n          { toFun := ↑(toAddMonoid f),\n            map_one' := (_ : ↑(toAddMonoid f) (↑(of (fun i => A i) 0) GradedMonoid.GOne.one) = 1) }\n          x *\n        OneHom.toFun\n          { toFun := ↑(toAddMonoid f),\n            map_one' := (_ : ↑(toAddMonoid f) (↑(of (fun i => A i) 0) GradedMonoid.GOne.one) = 1) }\n          y\n[PROOFSTEP]\nrw [(toAddMonoid f).map_mul_iff]\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nf : (i : ι) → A i →+ R\nhone : ↑(f 0) GradedMonoid.GOne.one = 1\nhmul : ∀ {i j : ι} (ai : A i) (aj : A j), ↑(f (i + j)) (GradedMonoid.GMul.mul ai aj) = ↑(f i) ai * ↑(f j) aj\nsrc✝ : (⨁ (i : ι), A i) →+ R := toAddMonoid f\n⊢ AddMonoidHom.compr₂ AddMonoidHom.mul (toAddMonoid f) =\n    AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul (toAddMonoid f)) (toAddMonoid f)\n[PROOFSTEP]\nrefine DirectSum.addHom_ext' (fun xi ↦ AddMonoidHom.ext (fun xv ↦ ?_))\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nf : (i : ι) → A i →+ R\nhone : ↑(f 0) GradedMonoid.GOne.one = 1\nhmul : ∀ {i j : ι} (ai : A i) (aj : A j), ↑(f (i + j)) (GradedMonoid.GMul.mul ai aj) = ↑(f i) ai * ↑(f j) aj\nsrc✝ : (⨁ (i : ι), A i) →+ R := toAddMonoid f\nxi : ι\nxv : A xi\n⊢ ↑(AddMonoidHom.comp (AddMonoidHom.compr₂ AddMonoidHom.mul (toAddMonoid f)) (of (fun i => A i) xi)) xv =\n    ↑(AddMonoidHom.comp (AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul (toAddMonoid f)) (toAddMonoid f))\n          (of (fun i => A i) xi))\n      xv\n[PROOFSTEP]\nrefine DirectSum.addHom_ext' (fun yi ↦ AddMonoidHom.ext (fun yv ↦ ?_))\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nf : (i : ι) → A i →+ R\nhone : ↑(f 0) GradedMonoid.GOne.one = 1\nhmul : ∀ {i j : ι} (ai : A i) (aj : A j), ↑(f (i + j)) (GradedMonoid.GMul.mul ai aj) = ↑(f i) ai * ↑(f j) aj\nsrc✝ : (⨁ (i : ι), A i) →+ R := toAddMonoid f\nxi : ι\nxv : A xi\nyi : ι\nyv : A yi\n⊢ ↑(AddMonoidHom.comp\n          (↑(AddMonoidHom.comp (AddMonoidHom.compr₂ AddMonoidHom.mul (toAddMonoid f)) (of (fun i => A i) xi)) xv)\n          (of (fun i => A i) yi))\n      yv =\n    ↑(AddMonoidHom.comp\n          (↑(AddMonoidHom.comp\n                (AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul (toAddMonoid f)) (toAddMonoid f))\n                (of (fun i => A i) xi))\n            xv)\n          (of (fun i => A i) yi))\n      yv\n[PROOFSTEP]\nshow toAddMonoid f (of A xi xv * of A yi yv) = toAddMonoid f (of A xi xv) * toAddMonoid f (of A yi yv)\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nf : (i : ι) → A i →+ R\nhone : ↑(f 0) GradedMonoid.GOne.one = 1\nhmul : ∀ {i j : ι} (ai : A i) (aj : A j), ↑(f (i + j)) (GradedMonoid.GMul.mul ai aj) = ↑(f i) ai * ↑(f j) aj\nsrc✝ : (⨁ (i : ι), A i) →+ R := toAddMonoid f\nxi : ι\nxv : A xi\nyi : ι\nyv : A yi\n⊢ ↑(toAddMonoid f) (↑(of A xi) xv * ↑(of A yi) yv) = ↑(toAddMonoid f) (↑(of A xi) xv) * ↑(toAddMonoid f) (↑(of A yi) yv)\n[PROOFSTEP]\nsimp_rw [of_mul_of, toAddMonoid_of]\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nf : (i : ι) → A i →+ R\nhone : ↑(f 0) GradedMonoid.GOne.one = 1\nhmul : ∀ {i j : ι} (ai : A i) (aj : A j), ↑(f (i + j)) (GradedMonoid.GMul.mul ai aj) = ↑(f i) ai * ↑(f j) aj\nsrc✝ : (⨁ (i : ι), A i) →+ R := toAddMonoid f\nxi : ι\nxv : A xi\nyi : ι\nyv : A yi\n⊢ ↑(f (xi + yi)) (GradedMonoid.GMul.mul xv yv) = ↑(f xi) xv * ↑(f yi) yv\n[PROOFSTEP]\nexact hmul _ _\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nF : (⨁ (i : ι), A i) →+* R\n⊢ {i : ι} → A i →+ R\n[PROOFSTEP]\nintro i\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nF : (⨁ (i : ι), A i) →+* R\ni : ι\n⊢ A i →+ R\n[PROOFSTEP]\nexact (F : (⨁ i, A i) →+ R).comp (of _ i)\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nF : (⨁ (i : ι), A i) →+* R\n⊢ ↑(AddMonoidHom.comp (↑F) (of A 0)) GradedMonoid.GOne.one = 1\n[PROOFSTEP]\nsimp only [AddMonoidHom.comp_apply]\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nF : (⨁ (i : ι), A i) →+* R\n⊢ ↑↑F (↑(of A 0) GradedMonoid.GOne.one) = 1\n[PROOFSTEP]\nrw [← F.map_one]\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nF : (⨁ (i : ι), A i) →+* R\n⊢ ↑↑F (↑(of A 0) GradedMonoid.GOne.one) = ↑F 1\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nF : (⨁ (i : ι), A i) →+* R\n⊢ ∀ {i j : ι} (ai : A i) (aj : A j),\n    ↑(AddMonoidHom.comp (↑F) (of A (i + j))) (GradedMonoid.GMul.mul ai aj) =\n      ↑(AddMonoidHom.comp (↑F) (of A i)) ai * ↑(AddMonoidHom.comp (↑F) (of A j)) aj\n[PROOFSTEP]\nintros i j ai aj\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nF : (⨁ (i : ι), A i) →+* R\ni j : ι\nai : A i\naj : A j\n⊢ ↑(AddMonoidHom.comp (↑F) (of A (i + j))) (GradedMonoid.GMul.mul ai aj) =\n    ↑(AddMonoidHom.comp (↑F) (of A i)) ai * ↑(AddMonoidHom.comp (↑F) (of A j)) aj\n[PROOFSTEP]\nsimp [AddMonoidHom.comp_apply]\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nF : (⨁ (i : ι), A i) →+* R\ni j : ι\nai : A i\naj : A j\n⊢ ↑F (↑(of A (i + j)) (GradedMonoid.GMul.mul ai aj)) = ↑F (↑(of A i) ai) * ↑F (↑(of A j) aj)\n[PROOFSTEP]\nrw [← F.map_mul (of A i ai), of_mul_of ai]\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nf :\n  { f //\n    ↑f GradedMonoid.GOne.one = 1 ∧ ∀ {i j : ι} (ai : A i) (aj : A j), ↑f (GradedMonoid.GMul.mul ai aj) = ↑f ai * ↑f aj }\n⊢ (fun F =>\n        { val := fun {i} => AddMonoidHom.comp (↑F) (of A i),\n          property :=\n            (_ :\n              (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) GradedMonoid.GOne.one = 1 ∧\n                ∀ {i j : ι} (ai : A i) (aj : A j),\n                  (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) (GradedMonoid.GMul.mul ai aj) =\n                    (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) ai *\n                      (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) aj) })\n      ((fun f =>\n          toSemiring (fun x => ↑f) (_ : ↑↑f GradedMonoid.GOne.one = 1)\n            (_ : ∀ {i j : ι} (ai : A i) (aj : A j), ↑↑f (GradedMonoid.GMul.mul ai aj) = ↑↑f ai * ↑↑f aj))\n        f) =\n    f\n[PROOFSTEP]\next xi xv\n[GOAL]\ncase a.h.h\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nf :\n  { f //\n    ↑f GradedMonoid.GOne.one = 1 ∧ ∀ {i j : ι} (ai : A i) (aj : A j), ↑f (GradedMonoid.GMul.mul ai aj) = ↑f ai * ↑f aj }\nxi : ι\nxv : A xi\n⊢ ↑↑((fun F =>\n              { val := fun {i} => AddMonoidHom.comp (↑F) (of A i),\n                property :=\n                  (_ :\n                    (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) GradedMonoid.GOne.one = 1 ∧\n                      ∀ {i j : ι} (ai : A i) (aj : A j),\n                        (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) (GradedMonoid.GMul.mul ai aj) =\n                          (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) ai *\n                            (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) aj) })\n            ((fun f =>\n                toSemiring (fun x => ↑f) (_ : ↑↑f GradedMonoid.GOne.one = 1)\n                  (_ : ∀ {i j : ι} (ai : A i) (aj : A j), ↑↑f (GradedMonoid.GMul.mul ai aj) = ↑↑f ai * ↑↑f aj))\n              f))\n      xv =\n    ↑↑f xv\n[PROOFSTEP]\nexact toAddMonoid_of (fun _ => f.1) xi xv\n[GOAL]\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nF : (⨁ (i : ι), A i) →+* R\n⊢ (fun f =>\n        toSemiring (fun x => ↑f) (_ : ↑↑f GradedMonoid.GOne.one = 1)\n          (_ : ∀ {i j : ι} (ai : A i) (aj : A j), ↑↑f (GradedMonoid.GMul.mul ai aj) = ↑↑f ai * ↑↑f aj))\n      ((fun F =>\n          { val := fun {i} => AddMonoidHom.comp (↑F) (of A i),\n            property :=\n              (_ :\n                (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) GradedMonoid.GOne.one = 1 ∧\n                  ∀ {i j : ι} (ai : A i) (aj : A j),\n                    (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) (GradedMonoid.GMul.mul ai aj) =\n                      (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) ai *\n                        (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) aj) })\n        F) =\n    F\n[PROOFSTEP]\napply RingHom.coe_addMonoidHom_injective\n[GOAL]\ncase a\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nF : (⨁ (i : ι), A i) →+* R\n⊢ (fun f => ↑f)\n      ((fun f =>\n          toSemiring (fun x => ↑f) (_ : ↑↑f GradedMonoid.GOne.one = 1)\n            (_ : ∀ {i j : ι} (ai : A i) (aj : A j), ↑↑f (GradedMonoid.GMul.mul ai aj) = ↑↑f ai * ↑↑f aj))\n        ((fun F =>\n            { val := fun {i} => AddMonoidHom.comp (↑F) (of A i),\n              property :=\n                (_ :\n                  (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) GradedMonoid.GOne.one = 1 ∧\n                    ∀ {i j : ι} (ai : A i) (aj : A j),\n                      (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) (GradedMonoid.GMul.mul ai aj) =\n                        (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) ai *\n                          (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) aj) })\n          F)) =\n    (fun f => ↑f) F\n[PROOFSTEP]\nrefine DirectSum.addHom_ext' (fun xi ↦ AddMonoidHom.ext (fun xv ↦ ?_))\n[GOAL]\ncase a\nι : Type u_1\ninst✝⁴ : DecidableEq ι\nA : ι → Type u_2\nR : Type u_3\ninst✝³ : (i : ι) → AddCommMonoid (A i)\ninst✝² : AddMonoid ι\ninst✝¹ : GSemiring A\ninst✝ : Semiring R\nF : (⨁ (i : ι), A i) →+* R\nxi : ι\nxv : A xi\n⊢ ↑(AddMonoidHom.comp\n          ((fun f => ↑f)\n            ((fun f =>\n                toSemiring (fun x => ↑f) (_ : ↑↑f GradedMonoid.GOne.one = 1)\n                  (_ : ∀ {i j : ι} (ai : A i) (aj : A j), ↑↑f (GradedMonoid.GMul.mul ai aj) = ↑↑f ai * ↑↑f aj))\n              ((fun F =>\n                  { val := fun {i} => AddMonoidHom.comp (↑F) (of A i),\n                    property :=\n                      (_ :\n                        (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) GradedMonoid.GOne.one = 1 ∧\n                          ∀ {i j : ι} (ai : A i) (aj : A j),\n                            (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) (GradedMonoid.GMul.mul ai aj) =\n                              (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) ai *\n                                (↑fun {i} => AddMonoidHom.comp (↑F) (of A i)) aj) })\n                F)))\n          (of (fun i => A i) xi))\n      xv =\n    ↑(AddMonoidHom.comp ((fun f => ↑f) F) (of (fun i => A i) xi)) xv\n[PROOFSTEP]\nsimp only [RingHom.coe_addMonoidHom_mk, DirectSum.toAddMonoid_of, AddMonoidHom.mk_coe, AddMonoidHom.comp_apply,\n  toSemiring_coe_addMonoidHom]\n[GOAL]\nι : Type u_1\ninst✝² : DecidableEq ι\nR : Type u_2\ninst✝¹ : AddMonoid ι\ninst✝ : Semiring R\ni j : ι\na b : R\n⊢ ↑(of (fun x => R) i) a * ↑(of (fun i => R) j) b = ↑(of (fun i => R) (i + j)) (a * b)\n[PROOFSTEP]\nrw [DirectSum.of_mul_of, Mul.gMul_mul]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.DirectSum.Ring", "llama_tokens": 21896, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7461389930307512, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.39345141976290676}}
{"text": "[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed K\nf : k →+* K\np : k[X]\nh : Separable p\n⊢ Splits f p\n[PROOFSTEP]\nconvert IsSepClosed.splits_of_separable (p.map f) (Separable.map h)\n[GOAL]\ncase a\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed K\nf : k →+* K\np : k[X]\nh : Separable p\n⊢ Splits f p ↔ Splits (RingHom.id K) (map f p)\n[PROOFSTEP]\nsimp [splits_map_iff]\n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nn : ℕ\nhn : NeZero ↑n\n⊢ ∃ z, z ^ n = x\n[PROOFSTEP]\nhave hn' : 0 < n :=\n  Nat.pos_of_ne_zero <| fun h => by\n    rw [h, Nat.cast_zero] at hn \n    exact hn.out rfl\n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nn : ℕ\nhn : NeZero ↑n\nh : n = 0\n⊢ False\n[PROOFSTEP]\nrw [h, Nat.cast_zero] at hn \n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nn : ℕ\nhn : NeZero 0\nh : n = 0\n⊢ False\n[PROOFSTEP]\nexact hn.out rfl\n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nn : ℕ\nhn : NeZero ↑n\nhn' : 0 < n\n⊢ ∃ z, z ^ n = x\n[PROOFSTEP]\nhave : degree (X ^ n - C x) ≠ 0 := by\n  rw [degree_X_pow_sub_C hn' x]\n  exact (WithBot.coe_lt_coe.2 hn').ne'\n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nn : ℕ\nhn : NeZero ↑n\nhn' : 0 < n\n⊢ degree (X ^ n - ↑C x) ≠ 0\n[PROOFSTEP]\nrw [degree_X_pow_sub_C hn' x]\n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nn : ℕ\nhn : NeZero ↑n\nhn' : 0 < n\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nexact (WithBot.coe_lt_coe.2 hn').ne'\n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nn : ℕ\nhn : NeZero ↑n\nhn' : 0 < n\nthis : degree (X ^ n - ↑C x) ≠ 0\n⊢ ∃ z, z ^ n = x\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nn : ℕ\nhn : NeZero ↑n\nhn' : 0 < n\nthis : degree (X ^ n - ↑C x) ≠ 0\nhx : x = 0\n⊢ ∃ z, z ^ n = x\n[PROOFSTEP]\nexact ⟨0, by rw [hx, pow_eq_zero_iff hn']⟩\n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nn : ℕ\nhn : NeZero ↑n\nhn' : 0 < n\nthis : degree (X ^ n - ↑C x) ≠ 0\nhx : x = 0\n⊢ 0 ^ n = x\n[PROOFSTEP]\nrw [hx, pow_eq_zero_iff hn']\n[GOAL]\ncase neg\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nn : ℕ\nhn : NeZero ↑n\nhn' : 0 < n\nthis : degree (X ^ n - ↑C x) ≠ 0\nhx : ¬x = 0\n⊢ ∃ z, z ^ n = x\n[PROOFSTEP]\nobtain ⟨z, hz⟩ := exists_root _ this <| separable_X_pow_sub_C x hn.out hx\n[GOAL]\ncase neg.intro\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nn : ℕ\nhn : NeZero ↑n\nhn' : 0 < n\nthis : degree (X ^ n - ↑C x) ≠ 0\nhx : ¬x = 0\nz : k\nhz : IsRoot (X ^ n - ↑C x) z\n⊢ ∃ z, z ^ n = x\n[PROOFSTEP]\nuse z\n[GOAL]\ncase h\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nn : ℕ\nhn : NeZero ↑n\nhn' : 0 < n\nthis : degree (X ^ n - ↑C x) ≠ 0\nhx : ¬x = 0\nz : k\nhz : IsRoot (X ^ n - ↑C x) z\n⊢ z ^ n = x\n[PROOFSTEP]\nsimpa [eval_C, eval_X, eval_pow, eval_sub, IsRoot.def, sub_eq_zero] using hz\n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nx : k\nh2 : NeZero 2\n⊢ ∃ z, x = z * z\n[PROOFSTEP]\nrcases exists_pow_nat_eq x 2 with ⟨z, rfl⟩\n[GOAL]\ncase intro\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\nh2 : NeZero 2\nz : k\n⊢ ∃ z_1, z ^ 2 = z_1 * z_1\n[PROOFSTEP]\nexact ⟨z, sq z⟩\n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\np : k[X]\nhsep : Separable p\n⊢ roots p = 0 ↔ p = ↑C (coeff p 0)\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun hp => by rw [hp, roots_C]⟩\n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\np : k[X]\nhsep : Separable p\nhp : p = ↑C (coeff p 0)\n⊢ roots p = 0\n[PROOFSTEP]\nrw [hp, roots_C]\n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\np : k[X]\nhsep : Separable p\nh : roots p = 0\n⊢ p = ↑C (coeff p 0)\n[PROOFSTEP]\ncases' le_or_lt (degree p) 0 with hd hd\n[GOAL]\ncase inl\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\np : k[X]\nhsep : Separable p\nh : roots p = 0\nhd : degree p ≤ 0\n⊢ p = ↑C (coeff p 0)\n[PROOFSTEP]\nexact eq_C_of_degree_le_zero hd\n[GOAL]\ncase inr\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\np : k[X]\nhsep : Separable p\nh : roots p = 0\nhd : 0 < degree p\n⊢ p = ↑C (coeff p 0)\n[PROOFSTEP]\nobtain ⟨z, hz⟩ := IsSepClosed.exists_root p hd.ne' hsep\n[GOAL]\ncase inr.intro\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\np : k[X]\nhsep : Separable p\nh : roots p = 0\nhd : 0 < degree p\nz : k\nhz : IsRoot p z\n⊢ p = ↑C (coeff p 0)\n[PROOFSTEP]\nrw [← mem_roots (ne_zero_of_degree_gt hd), h] at hz \n[GOAL]\ncase inr.intro\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed k\np : k[X]\nhsep : Separable p\nh : roots p = 0\nhd : 0 < degree p\nz : k\nhz : z ∈ 0\n⊢ p = ↑C (coeff p 0)\n[PROOFSTEP]\nsimp at hz \n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed K\nf : k →+* K\np : k[X]\nhp : degree p ≠ 0\nhsep : Separable p\n⊢ degree (map f p) ≠ 0\n[PROOFSTEP]\nrwa [degree_map_eq_of_injective f.injective]\n[GOAL]\nk : Type u\ninst✝² : Field k\nK : Type v\ninst✝¹ : Field K\ninst✝ : IsSepClosed K\nf : k →+* K\np : k[X]\nhp : degree p ≠ 0\nhsep : Separable p\nx : K\nhx : IsRoot (map f p) x\n⊢ eval₂ f x p = 0\n[PROOFSTEP]\nrwa [eval₂_eq_eval_map, ← IsRoot]\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nK : Type v\ninst✝ : Field K\nH : ∀ (p : k[X]), Monic p → Irreducible p → Separable p → ∃ x, eval x p = 0\n⊢ IsSepClosed k\n[PROOFSTEP]\nrefine ⟨fun p hsep ↦ Or.inr ?_⟩\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nK : Type v\ninst✝ : Field K\nH : ∀ (p : k[X]), Monic p → Irreducible p → Separable p → ∃ x, eval x p = 0\np : k[X]\nhsep : Separable p\n⊢ ∀ {g : k[X]}, Irreducible g → g ∣ map (RingHom.id k) p → degree g = 1\n[PROOFSTEP]\nintro q hq hdvd\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nK : Type v\ninst✝ : Field K\nH : ∀ (p : k[X]), Monic p → Irreducible p → Separable p → ∃ x, eval x p = 0\np : k[X]\nhsep : Separable p\nq : k[X]\nhq : Irreducible q\nhdvd : q ∣ map (RingHom.id k) p\n⊢ degree q = 1\n[PROOFSTEP]\nsimp only [map_id] at hdvd \n[GOAL]\nk : Type u\ninst✝¹ : Field k\nK : Type v\ninst✝ : Field K\nH : ∀ (p : k[X]), Monic p → Irreducible p → Separable p → ∃ x, eval x p = 0\np : k[X]\nhsep : Separable p\nq : k[X]\nhq : Irreducible q\nhdvd : q ∣ p\n⊢ degree q = 1\n[PROOFSTEP]\nhave hlc : IsUnit (leadingCoeff q)⁻¹ := IsUnit.inv <| Ne.isUnit <| leadingCoeff_ne_zero.2 <| Irreducible.ne_zero hq\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nK : Type v\ninst✝ : Field K\nH : ∀ (p : k[X]), Monic p → Irreducible p → Separable p → ∃ x, eval x p = 0\np : k[X]\nhsep : Separable p\nq : k[X]\nhq : Irreducible q\nhdvd : q ∣ p\nhlc : IsUnit (leadingCoeff q)⁻¹\n⊢ degree q = 1\n[PROOFSTEP]\nhave hsep' : Separable (q * C (leadingCoeff q)⁻¹) :=\n  Separable.mul (Separable.of_dvd hsep hdvd) ((separable_C _).2 hlc)\n    (by simpa only [← isCoprime_mul_unit_right_right (isUnit_C.2 hlc) q 1, one_mul] using isCoprime_one_right (x := q))\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nK : Type v\ninst✝ : Field K\nH : ∀ (p : k[X]), Monic p → Irreducible p → Separable p → ∃ x, eval x p = 0\np : k[X]\nhsep : Separable p\nq : k[X]\nhq : Irreducible q\nhdvd : q ∣ p\nhlc : IsUnit (leadingCoeff q)⁻¹\n⊢ IsCoprime q (↑C (leadingCoeff q)⁻¹)\n[PROOFSTEP]\nsimpa only [← isCoprime_mul_unit_right_right (isUnit_C.2 hlc) q 1, one_mul] using isCoprime_one_right (x := q)\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nK : Type v\ninst✝ : Field K\nH : ∀ (p : k[X]), Monic p → Irreducible p → Separable p → ∃ x, eval x p = 0\np : k[X]\nhsep : Separable p\nq : k[X]\nhq : Irreducible q\nhdvd : q ∣ p\nhlc : IsUnit (leadingCoeff q)⁻¹\nhsep' : Separable (q * ↑C (leadingCoeff q)⁻¹)\n⊢ degree q = 1\n[PROOFSTEP]\nhave hirr' := hq\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nK : Type v\ninst✝ : Field K\nH : ∀ (p : k[X]), Monic p → Irreducible p → Separable p → ∃ x, eval x p = 0\np : k[X]\nhsep : Separable p\nq : k[X]\nhq : Irreducible q\nhdvd : q ∣ p\nhlc : IsUnit (leadingCoeff q)⁻¹\nhsep' : Separable (q * ↑C (leadingCoeff q)⁻¹)\nhirr' : Irreducible q\n⊢ degree q = 1\n[PROOFSTEP]\nrw [← irreducible_mul_isUnit (isUnit_C.2 hlc)] at hirr' \n[GOAL]\nk : Type u\ninst✝¹ : Field k\nK : Type v\ninst✝ : Field K\nH : ∀ (p : k[X]), Monic p → Irreducible p → Separable p → ∃ x, eval x p = 0\np : k[X]\nhsep : Separable p\nq : k[X]\nhq : Irreducible q\nhdvd : q ∣ p\nhlc : IsUnit (leadingCoeff q)⁻¹\nhsep' : Separable (q * ↑C (leadingCoeff q)⁻¹)\nhirr' : Irreducible (q * ↑C (leadingCoeff q)⁻¹)\n⊢ degree q = 1\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := H (q * C (leadingCoeff q)⁻¹) (monic_mul_leadingCoeff_inv hq.ne_zero) hirr' hsep'\n[GOAL]\ncase intro\nk : Type u\ninst✝¹ : Field k\nK : Type v\ninst✝ : Field K\nH : ∀ (p : k[X]), Monic p → Irreducible p → Separable p → ∃ x, eval x p = 0\np : k[X]\nhsep : Separable p\nq : k[X]\nhq : Irreducible q\nhdvd : q ∣ p\nhlc : IsUnit (leadingCoeff q)⁻¹\nhsep' : Separable (q * ↑C (leadingCoeff q)⁻¹)\nhirr' : Irreducible (q * ↑C (leadingCoeff q)⁻¹)\nx : k\nhx : eval x (q * ↑C (leadingCoeff q)⁻¹) = 0\n⊢ degree q = 1\n[PROOFSTEP]\nexact degree_mul_leadingCoeff_inv q hq.ne_zero ▸ degree_eq_one_of_irreducible_of_root hirr' hx\n[GOAL]\nk : Type u\ninst✝⁴ : Field k\nK : Type v\ninst✝³ : Field K\ninst✝² : IsSepClosed k\ninst✝¹ : Algebra k K\ninst✝ : IsSeparable k K\n⊢ Function.Surjective ↑(algebraMap k K)\n[PROOFSTEP]\nrefine fun x => ⟨-(minpoly k x).coeff 0, ?_⟩\n[GOAL]\nk : Type u\ninst✝⁴ : Field k\nK : Type v\ninst✝³ : Field K\ninst✝² : IsSepClosed k\ninst✝¹ : Algebra k K\ninst✝ : IsSeparable k K\nx : K\n⊢ ↑(algebraMap k K) (-coeff (minpoly k x) 0) = x\n[PROOFSTEP]\nhave hq : (minpoly k x).leadingCoeff = 1 := minpoly.monic (IsSeparable.isIntegral k x)\n[GOAL]\nk : Type u\ninst✝⁴ : Field k\nK : Type v\ninst✝³ : Field K\ninst✝² : IsSepClosed k\ninst✝¹ : Algebra k K\ninst✝ : IsSeparable k K\nx : K\nhq : leadingCoeff (minpoly k x) = 1\n⊢ ↑(algebraMap k K) (-coeff (minpoly k x) 0) = x\n[PROOFSTEP]\nhave hsep : (minpoly k x).Separable := IsSeparable.separable k x\n[GOAL]\nk : Type u\ninst✝⁴ : Field k\nK : Type v\ninst✝³ : Field K\ninst✝² : IsSepClosed k\ninst✝¹ : Algebra k K\ninst✝ : IsSeparable k K\nx : K\nhq : leadingCoeff (minpoly k x) = 1\nhsep : Separable (minpoly k x)\n⊢ ↑(algebraMap k K) (-coeff (minpoly k x) 0) = x\n[PROOFSTEP]\nhave h : (minpoly k x).degree = 1 :=\n  degree_eq_one_of_irreducible k (minpoly.irreducible (IsSeparable.isIntegral k x)) hsep\n[GOAL]\nk : Type u\ninst✝⁴ : Field k\nK : Type v\ninst✝³ : Field K\ninst✝² : IsSepClosed k\ninst✝¹ : Algebra k K\ninst✝ : IsSeparable k K\nx : K\nhq : leadingCoeff (minpoly k x) = 1\nhsep : Separable (minpoly k x)\nh : degree (minpoly k x) = 1\n⊢ ↑(algebraMap k K) (-coeff (minpoly k x) 0) = x\n[PROOFSTEP]\nhave : aeval x (minpoly k x) = 0 := minpoly.aeval k x\n[GOAL]\nk : Type u\ninst✝⁴ : Field k\nK : Type v\ninst✝³ : Field K\ninst✝² : IsSepClosed k\ninst✝¹ : Algebra k K\ninst✝ : IsSeparable k K\nx : K\nhq : leadingCoeff (minpoly k x) = 1\nhsep : Separable (minpoly k x)\nh : degree (minpoly k x) = 1\nthis : ↑(aeval x) (minpoly k x) = 0\n⊢ ↑(algebraMap k K) (-coeff (minpoly k x) 0) = x\n[PROOFSTEP]\nrw [eq_X_add_C_of_degree_eq_one h, hq, C_1, one_mul, aeval_add, aeval_X, aeval_C, add_eq_zero_iff_eq_neg] at this \n[GOAL]\nk : Type u\ninst✝⁴ : Field k\nK : Type v\ninst✝³ : Field K\ninst✝² : IsSepClosed k\ninst✝¹ : Algebra k K\ninst✝ : IsSeparable k K\nx : K\nhq : leadingCoeff (minpoly k x) = 1\nhsep : Separable (minpoly k x)\nh : degree (minpoly k x) = 1\nthis : x = -↑(algebraMap k K) (coeff (minpoly k x) 0)\n⊢ ↑(algebraMap k K) (-coeff (minpoly k x) 0) = x\n[PROOFSTEP]\nexact (RingHom.map_neg (algebraMap k K) ((minpoly k x).coeff 0)).symm ▸ this.symm\n[GOAL]\nk : Type u\ninst✝³ : Field k\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra k K\ninst✝ : IsSepClosure k K\nx : K\n⊢ IsAlgebraic k x\n[PROOFSTEP]\napply IsIntegral.isAlgebraic\n[GOAL]\ncase a\nk : Type u\ninst✝³ : Field k\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra k K\ninst✝ : IsSepClosure k K\nx : K\n⊢ IsIntegral k x\n[PROOFSTEP]\nexact IsSepClosure.separable.isIntegral' x\n[GOAL]\nk : Type u\ninst✝³ : Field k\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra k K\ninst✝ : IsSepClosure k K\nx : K\n⊢ Separable (minpoly k x)\n[PROOFSTEP]\nhave : IsSeparable k K := IsSepClosure.separable\n[GOAL]\nk : Type u\ninst✝³ : Field k\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra k K\ninst✝ : IsSepClosure k K\nx : K\nthis : IsSeparable k K\n⊢ Separable (minpoly k x)\n[PROOFSTEP]\nexact IsSeparable.separable k x\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.IsSepClosed", "llama_tokens": 6437, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191460821871, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.3931301755940354}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nf : E →ₗ[𝕜] 𝕜\nr : ℝ\n⊢ Seminorm.ball (toSeminorm f) 0 r = {x | ‖↑f x‖ < r}\n[PROOFSTEP]\nsimp only [Seminorm.ball_zero_eq, toSeminorm_apply]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nf : F →ₗ[𝕜] 𝕜\ng : E →ₗ[𝕜] F\n⊢ Seminorm.comp (toSeminorm f) g = toSeminorm (comp f g)\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁴ : NormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nf : F →ₗ[𝕜] 𝕜\ng : E →ₗ[𝕜] F\nx✝ : E\n⊢ ↑(Seminorm.comp (toSeminorm f) g) x✝ = ↑(toSeminorm (comp f g)) x✝\n[PROOFSTEP]\nsimp only [Seminorm.comp_apply, toSeminorm_apply, coe_comp, Function.comp_apply]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\n⊢ Filter.HasBasis (𝓝 0) (SeminormFamily.basisSets (toSeminormFamily B)) _root_.id\n[PROOFSTEP]\nlet p := B.toSeminormFamily\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\n⊢ Filter.HasBasis (𝓝 0) (SeminormFamily.basisSets (toSeminormFamily B)) _root_.id\n[PROOFSTEP]\nrw [nhds_induced, nhds_pi]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\n⊢ Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun i => 𝓝 (↑(↑B 0) i)))\n    (SeminormFamily.basisSets (toSeminormFamily B)) _root_.id\n[PROOFSTEP]\nsimp only [map_zero, LinearMap.zero_apply]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\n⊢ Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun i => 𝓝 0))\n    (SeminormFamily.basisSets (toSeminormFamily B)) _root_.id\n[PROOFSTEP]\nhave h := @Metric.nhds_basis_ball 𝕜 _ 0\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\n⊢ Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun i => 𝓝 0))\n    (SeminormFamily.basisSets (toSeminormFamily B)) _root_.id\n[PROOFSTEP]\nhave h' := Filter.hasBasis_pi fun _ : F => h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\n⊢ Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun i => 𝓝 0))\n    (SeminormFamily.basisSets (toSeminormFamily B)) _root_.id\n[PROOFSTEP]\nhave h'' := Filter.HasBasis.comap (fun x y => B x y) h'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\n⊢ Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun i => 𝓝 0))\n    (SeminormFamily.basisSets (toSeminormFamily B)) _root_.id\n[PROOFSTEP]\nrefine' h''.to_hasBasis _ _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\n⊢ ∀ (i : Set F × (F → ℝ)),\n    (Set.Finite i.fst ∧ ∀ (i_1 : F), i_1 ∈ i.fst → 0 < Prod.snd i i_1) →\n      ∃ i',\n        SeminormFamily.basisSets (toSeminormFamily B) i' ∧\n          _root_.id i' ⊆ (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\n[PROOFSTEP]\nrintro (U : Set F × (F → ℝ)) hU\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU : Set.Finite U.fst ∧ ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\n⊢ ∃ i',\n    SeminormFamily.basisSets (toSeminormFamily B) i' ∧\n      _root_.id i' ⊆ (fun x y => ↑(↑B x) y) ⁻¹' Set.pi U.fst fun i => Metric.ball 0 (Prod.snd U i)\n[PROOFSTEP]\ncases' hU with hU₁ hU₂\n[GOAL]\ncase refine'_1.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\n⊢ ∃ i',\n    SeminormFamily.basisSets (toSeminormFamily B) i' ∧\n      _root_.id i' ⊆ (fun x y => ↑(↑B x) y) ⁻¹' Set.pi U.fst fun i => Metric.ball 0 (Prod.snd U i)\n[PROOFSTEP]\nsimp only [id.def]\n[GOAL]\ncase refine'_1.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\n⊢ ∃ i',\n    SeminormFamily.basisSets (toSeminormFamily B) i' ∧\n      i' ⊆ (fun x y => ↑(↑B x) y) ⁻¹' Set.pi U.fst fun i => Metric.ball 0 (Prod.snd U i)\n[PROOFSTEP]\nlet U' := hU₁.toFinset\n[GOAL]\ncase refine'_1.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\n⊢ ∃ i',\n    SeminormFamily.basisSets (toSeminormFamily B) i' ∧\n      i' ⊆ (fun x y => ↑(↑B x) y) ⁻¹' Set.pi U.fst fun i => Metric.ball 0 (Prod.snd U i)\n[PROOFSTEP]\nby_cases hU₃ : U.fst.Nonempty\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\nhU₃ : Set.Nonempty U.fst\n⊢ ∃ i',\n    SeminormFamily.basisSets (toSeminormFamily B) i' ∧\n      i' ⊆ (fun x y => ↑(↑B x) y) ⁻¹' Set.pi U.fst fun i => Metric.ball 0 (Prod.snd U i)\n[PROOFSTEP]\nhave hU₃' : U'.Nonempty := hU₁.toFinset_nonempty.mpr hU₃\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\nhU₃ : Set.Nonempty U.fst\nhU₃' : Finset.Nonempty U'\n⊢ ∃ i',\n    SeminormFamily.basisSets (toSeminormFamily B) i' ∧\n      i' ⊆ (fun x y => ↑(↑B x) y) ⁻¹' Set.pi U.fst fun i => Metric.ball 0 (Prod.snd U i)\n[PROOFSTEP]\nrefine'\n  ⟨(U'.sup p).ball 0 <| U'.inf' hU₃' U.snd,\n    p.basisSets_mem _ <| (Finset.lt_inf'_iff _).2 fun y hy => hU₂ y <| hU₁.mem_toFinset.mp hy, fun x hx y hy => _⟩\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\nhU₃ : Set.Nonempty U.fst\nhU₃' : Finset.Nonempty U'\nx : E\nhx : x ∈ Seminorm.ball (Finset.sup U' p) 0 (Finset.inf' U' hU₃' U.snd)\ny : F\nhy : y ∈ U.fst\n⊢ (fun x y => ↑(↑B x) y) x y ∈ (fun i => Metric.ball 0 (Prod.snd U i)) y\n[PROOFSTEP]\nsimp only [Set.mem_preimage, Set.mem_pi, mem_ball_zero_iff]\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\nhU₃ : Set.Nonempty U.fst\nhU₃' : Finset.Nonempty U'\nx : E\nhx : x ∈ Seminorm.ball (Finset.sup U' p) 0 (Finset.inf' U' hU₃' U.snd)\ny : F\nhy : y ∈ U.fst\n⊢ ‖↑(↑B x) y‖ < Prod.snd U y\n[PROOFSTEP]\nrw [Seminorm.mem_ball_zero] at hx \n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\nhU₃ : Set.Nonempty U.fst\nhU₃' : Finset.Nonempty U'\nx : E\nhx : ↑(Finset.sup U' p) x < Finset.inf' U' hU₃' U.snd\ny : F\nhy : y ∈ U.fst\n⊢ ‖↑(↑B x) y‖ < Prod.snd U y\n[PROOFSTEP]\nrw [← LinearMap.toSeminormFamily_apply]\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\nhU₃ : Set.Nonempty U.fst\nhU₃' : Finset.Nonempty U'\nx : E\nhx : ↑(Finset.sup U' p) x < Finset.inf' U' hU₃' U.snd\ny : F\nhy : y ∈ U.fst\n⊢ ↑(toSeminormFamily B y) x < Prod.snd U y\n[PROOFSTEP]\nhave hyU' : y ∈ U' := (Set.Finite.mem_toFinset hU₁).mpr hy\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\nhU₃ : Set.Nonempty U.fst\nhU₃' : Finset.Nonempty U'\nx : E\nhx : ↑(Finset.sup U' p) x < Finset.inf' U' hU₃' U.snd\ny : F\nhy : y ∈ U.fst\nhyU' : y ∈ U'\n⊢ ↑(toSeminormFamily B y) x < Prod.snd U y\n[PROOFSTEP]\nhave hp : p y ≤ U'.sup p := Finset.le_sup hyU'\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\nhU₃ : Set.Nonempty U.fst\nhU₃' : Finset.Nonempty U'\nx : E\nhx : ↑(Finset.sup U' p) x < Finset.inf' U' hU₃' U.snd\ny : F\nhy : y ∈ U.fst\nhyU' : y ∈ U'\nhp : p y ≤ Finset.sup U' p\n⊢ ↑(toSeminormFamily B y) x < Prod.snd U y\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (hp x) (lt_of_lt_of_le hx _)\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\nhU₃ : Set.Nonempty U.fst\nhU₃' : Finset.Nonempty U'\nx : E\nhx : ↑(Finset.sup U' p) x < Finset.inf' U' hU₃' U.snd\ny : F\nhy : y ∈ U.fst\nhyU' : y ∈ U'\nhp : p y ≤ Finset.sup U' p\n⊢ Finset.inf' U' hU₃' U.snd ≤ Prod.snd U y\n[PROOFSTEP]\nexact Finset.inf'_le _ hyU'\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\nhU₃ : ¬Set.Nonempty U.fst\n⊢ ∃ i',\n    SeminormFamily.basisSets (toSeminormFamily B) i' ∧\n      i' ⊆ (fun x y => ↑(↑B x) y) ⁻¹' Set.pi U.fst fun i => Metric.ball 0 (Prod.snd U i)\n[PROOFSTEP]\nrw [Set.not_nonempty_iff_eq_empty.mp hU₃]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\nhU₃ : ¬Set.Nonempty U.fst\n⊢ ∃ i',\n    SeminormFamily.basisSets (toSeminormFamily B) i' ∧\n      i' ⊆ (fun x y => ↑(↑B x) y) ⁻¹' Set.pi ∅ fun i => Metric.ball 0 (Prod.snd U i)\n[PROOFSTEP]\nsimp only [Set.empty_pi, Set.preimage_univ, Set.subset_univ, and_true_iff]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set F × (F → ℝ)\nhU₁ : Set.Finite U.fst\nhU₂ : ∀ (i : F), i ∈ U.fst → 0 < Prod.snd U i\nU' : Finset F := Set.Finite.toFinset hU₁\nhU₃ : ¬Set.Nonempty U.fst\n⊢ ∃ i', SeminormFamily.basisSets (toSeminormFamily B) i'\n[PROOFSTEP]\nexact Exists.intro ((p 0).ball 0 1) (p.basisSets_singleton_mem 0 one_pos)\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\n⊢ ∀ (i' : Set E),\n    SeminormFamily.basisSets (toSeminormFamily B) i' →\n      ∃ i,\n        (Set.Finite i.fst ∧ ∀ (i_1 : F), i_1 ∈ i.fst → 0 < Prod.snd i i_1) ∧\n          ((fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)) ⊆ _root_.id i'\n[PROOFSTEP]\nrintro U (hU : U ∈ p.basisSets)\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set E\nhU : U ∈ SeminormFamily.basisSets p\n⊢ ∃ i,\n    (Set.Finite i.fst ∧ ∀ (i_1 : F), i_1 ∈ i.fst → 0 < Prod.snd i i_1) ∧\n      ((fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)) ⊆ _root_.id U\n[PROOFSTEP]\nrw [SeminormFamily.basisSets_iff] at hU \n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set E\nhU : ∃ i r x, U = Seminorm.ball (Finset.sup i p) 0 r\n⊢ ∃ i,\n    (Set.Finite i.fst ∧ ∀ (i_1 : F), i_1 ∈ i.fst → 0 < Prod.snd i i_1) ∧\n      ((fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)) ⊆ _root_.id U\n[PROOFSTEP]\nrcases hU with ⟨s, r, hr, hU⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set E\ns : Finset F\nr : ℝ\nhr : 0 < r\nhU : U = Seminorm.ball (Finset.sup s p) 0 r\n⊢ ∃ i,\n    (Set.Finite i.fst ∧ ∀ (i_1 : F), i_1 ∈ i.fst → 0 < Prod.snd i i_1) ∧\n      ((fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)) ⊆ _root_.id U\n[PROOFSTEP]\nrw [hU]\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set E\ns : Finset F\nr : ℝ\nhr : 0 < r\nhU : U = Seminorm.ball (Finset.sup s p) 0 r\n⊢ ∃ i,\n    (Set.Finite i.fst ∧ ∀ (i_1 : F), i_1 ∈ i.fst → 0 < Prod.snd i i_1) ∧\n      ((fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)) ⊆\n        _root_.id (Seminorm.ball (Finset.sup s p) 0 r)\n[PROOFSTEP]\nrefine' ⟨(s, fun _ => r), ⟨by simp only [s.finite_toSet], fun y _ => hr⟩, fun x hx => _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set E\ns : Finset F\nr : ℝ\nhr : 0 < r\nhU : U = Seminorm.ball (Finset.sup s p) 0 r\n⊢ Set.Finite (↑s, fun x => r).fst\n[PROOFSTEP]\nsimp only [s.finite_toSet]\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set E\ns : Finset F\nr : ℝ\nhr : 0 < r\nhU : U = Seminorm.ball (Finset.sup s p) 0 r\nx : E\nhx : x ∈ (fun x y => ↑(↑B x) y) ⁻¹' Set.pi (↑s, fun x => r).fst fun i => Metric.ball 0 (Prod.snd (↑s, fun x => r) i)\n⊢ x ∈ _root_.id (Seminorm.ball (Finset.sup s p) 0 r)\n[PROOFSTEP]\nsimp only [Set.mem_preimage, Set.mem_pi, Finset.mem_coe, mem_ball_zero_iff] at hx \n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set E\ns : Finset F\nr : ℝ\nhr : 0 < r\nhU : U = Seminorm.ball (Finset.sup s p) 0 r\nx : E\nhx : ∀ (i : F), i ∈ s → ‖↑(↑B x) i‖ < r\n⊢ x ∈ _root_.id (Seminorm.ball (Finset.sup s p) 0 r)\n[PROOFSTEP]\nsimp only [id.def, Seminorm.mem_ball, sub_zero]\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set E\ns : Finset F\nr : ℝ\nhr : 0 < r\nhU : U = Seminorm.ball (Finset.sup s p) 0 r\nx : E\nhx : ∀ (i : F), i ∈ s → ‖↑(↑B x) i‖ < r\n⊢ ↑(Finset.sup s (toSeminormFamily B)) x < r\n[PROOFSTEP]\nrefine' Seminorm.finset_sup_apply_lt hr fun y hy => _\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set E\ns : Finset F\nr : ℝ\nhr : 0 < r\nhU : U = Seminorm.ball (Finset.sup s p) 0 r\nx : E\nhx : ∀ (i : F), i ∈ s → ‖↑(↑B x) i‖ < r\ny : F\nhy : y ∈ s\n⊢ ↑(toSeminormFamily B y) x < r\n[PROOFSTEP]\nrw [LinearMap.toSeminormFamily_apply]\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nι : Type u_4\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 F\ninst✝ : Nonempty ι\nB✝ B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜\np : SeminormFamily 𝕜 E F := toSeminormFamily B\nh : Filter.HasBasis (𝓝 0) (fun x => 0 < x) (Metric.ball 0)\nh' :\n  Filter.HasBasis (Filter.pi fun x => 𝓝 0) (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i)\n    fun If => Set.pi If.fst fun i => Metric.ball 0 (Prod.snd If i)\nh'' :\n  Filter.HasBasis (Filter.comap (fun x y => ↑(↑B x) y) (Filter.pi fun x => 𝓝 0))\n    (fun If => Set.Finite If.fst ∧ ∀ (i : F), i ∈ If.fst → 0 < Prod.snd If i) fun i =>\n    (fun x y => ↑(↑B x) y) ⁻¹' Set.pi i.fst fun i_1 => Metric.ball 0 (Prod.snd i i_1)\nU : Set E\ns : Finset F\nr : ℝ\nhr : 0 < r\nhU : U = Seminorm.ball (Finset.sup s p) 0 r\nx : E\nhx : ∀ (i : F), i ∈ s → ‖↑(↑B x) i‖ < r\ny : F\nhy : y ∈ s\n⊢ ‖↑(↑B x) y‖ < r\n[PROOFSTEP]\nexact hx y hy\n", "meta": {"mathlib_filename": "Mathlib.Analysis.LocallyConvex.WeakDual", "llama_tokens": 18674, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191337850932, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.39313016877566004}}
{"text": "[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : MulOneClass M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\na : SubMulAction R M\n⊢ 1 * a = a\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : MulOneClass M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\na : SubMulAction R M\nx : M\n⊢ x ∈ 1 * a ↔ x ∈ a\n[PROOFSTEP]\nsimp only [mem_mul, mem_one, smul_mul_assoc, exists_and_left, exists_exists_eq_and, one_mul]\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : MulOneClass M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\na : SubMulAction R M\nx : M\n⊢ (∃ a_1 x_1, x_1 ∈ a ∧ a_1 • x_1 = x) ↔ x ∈ a\n[PROOFSTEP]\nrefine' ⟨_, fun hx => ⟨1, x, hx, one_smul _ _⟩⟩\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : MulOneClass M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\na : SubMulAction R M\nx : M\n⊢ (∃ a_1 x_1, x_1 ∈ a ∧ a_1 • x_1 = x) → x ∈ a\n[PROOFSTEP]\nrintro ⟨r, y, hy, rfl⟩\n[GOAL]\ncase h.intro.intro.intro\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : MulOneClass M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\na : SubMulAction R M\nr : R\ny : M\nhy : y ∈ a\n⊢ r • y ∈ a\n[PROOFSTEP]\nexact smul_mem _ _ hy\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : MulOneClass M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\na : SubMulAction R M\n⊢ a * 1 = a\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : MulOneClass M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\na : SubMulAction R M\nx : M\n⊢ x ∈ a * 1 ↔ x ∈ a\n[PROOFSTEP]\nsimp only [mem_mul, mem_one, mul_smul_comm, exists_and_left, exists_exists_eq_and, mul_one]\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : MulOneClass M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\na : SubMulAction R M\nx : M\n⊢ (∃ y, y ∈ a ∧ ∃ a, a • y = x) ↔ x ∈ a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : MulOneClass M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\na : SubMulAction R M\nx : M\n⊢ (∃ y, y ∈ a ∧ ∃ a, a • y = x) → x ∈ a\n[PROOFSTEP]\nrintro ⟨y, hy, r, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : MulOneClass M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\na : SubMulAction R M\ny : M\nhy : y ∈ a\nr : R\n⊢ r • y ∈ a\n[PROOFSTEP]\nexact smul_mem _ _ hy\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : MulOneClass M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\na : SubMulAction R M\nx : M\n⊢ x ∈ a → ∃ y, y ∈ a ∧ ∃ a, a • y = x\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase h.mpr\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : MulOneClass M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\na : SubMulAction R M\nx : M\nhx : x ∈ a\n⊢ ∃ y, y ∈ a ∧ ∃ a, a • y = x\n[PROOFSTEP]\nexact ⟨x, hx, 1, one_smul _ _⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : Monoid M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\np : SubMulAction R M\nx✝ : 1 ≠ 0\n⊢ ↑(p ^ 1) = ↑p ^ 1\n[PROOFSTEP]\nrw [pow_one, pow_one]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : Monoid M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\np : SubMulAction R M\nn : ℕ\nx✝ : n + 2 ≠ 0\n⊢ ↑(p ^ (n + 2)) = ↑p ^ (n + 2)\n[PROOFSTEP]\nrw [pow_succ _ (n + 1), pow_succ _ (n + 1), coe_mul, coe_pow _ n.succ_ne_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : Monoid M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\np : SubMulAction R M\n⊢ ↑p ^ 0 ⊆ ↑(p ^ 0)\n[PROOFSTEP]\nrw [pow_zero, pow_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : Monoid M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\np : SubMulAction R M\n⊢ 1 ⊆ ↑1\n[PROOFSTEP]\nexact subset_coe_one\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Monoid R\ninst✝³ : MulAction R M\ninst✝² : Monoid M\ninst✝¹ : IsScalarTower R M M\ninst✝ : SMulCommClass R M M\np : SubMulAction R M\nn : ℕ\n⊢ ↑p ^ (n + 1) ⊆ ↑(p ^ (n + 1))\n[PROOFSTEP]\nrw [← Nat.succ_eq_add_one, coe_pow _ n.succ_ne_zero]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.GroupAction.SubMulAction.Pointwise", "llama_tokens": 2380, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947425132315, "lm_q2_score": 0.600188359260205, "lm_q1q2_score": 0.39306020099715083}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : CocompactMap α β\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\nobtain ⟨⟨_, _⟩, _⟩ := f\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : CocompactMap α β\ntoFun✝ : α → β\ncontinuous_toFun✝ : Continuous toFun✝\ncocompact_tendsto'✝ : Tendsto (ContinuousMap.mk toFun✝).toFun (cocompact α) (cocompact β)\nh :\n  (fun f => f.toFun) { toContinuousMap := ContinuousMap.mk toFun✝, cocompact_tendsto' := cocompact_tendsto'✝ } =\n    (fun f => f.toFun) g\n⊢ { toContinuousMap := ContinuousMap.mk toFun✝, cocompact_tendsto' := cocompact_tendsto'✝ } = g\n[PROOFSTEP]\nobtain ⟨⟨_, _⟩, _⟩ := g\n[GOAL]\ncase mk.mk.mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ntoFun✝¹ : α → β\ncontinuous_toFun✝¹ : Continuous toFun✝¹\ncocompact_tendsto'✝¹ : Tendsto (ContinuousMap.mk toFun✝¹).toFun (cocompact α) (cocompact β)\ntoFun✝ : α → β\ncontinuous_toFun✝ : Continuous toFun✝\ncocompact_tendsto'✝ : Tendsto (ContinuousMap.mk toFun✝).toFun (cocompact α) (cocompact β)\nh :\n  (fun f => f.toFun) { toContinuousMap := ContinuousMap.mk toFun✝¹, cocompact_tendsto' := cocompact_tendsto'✝¹ } =\n    (fun f => f.toFun) { toContinuousMap := ContinuousMap.mk toFun✝, cocompact_tendsto' := cocompact_tendsto'✝ }\n⊢ { toContinuousMap := ContinuousMap.mk toFun✝¹, cocompact_tendsto' := cocompact_tendsto'✝¹ } =\n    { toContinuousMap := ContinuousMap.mk toFun✝, cocompact_tendsto' := cocompact_tendsto'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : CocompactMap α β\nf' : α → β\nh : f' = ↑f\n⊢ Continuous f'\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : CocompactMap α β\nf' : α → β\nh : f' = ↑f\n⊢ Continuous ↑f\n[PROOFSTEP]\nexact f.continuous_toFun\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : CocompactMap α β\nf' : α → β\nh : f' = ↑f\n⊢ Tendsto (ContinuousMap.mk f').toFun (cocompact α) (cocompact β)\n[PROOFSTEP]\nsimp_rw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : CocompactMap α β\nf' : α → β\nh : f' = ↑f\n⊢ Tendsto (↑f) (cocompact α) (cocompact β)\n[PROOFSTEP]\nexact f.cocompact_tendsto'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α → β\nh : ∀ (s : Set β), IsCompact s → IsCompact (f ⁻¹' s)\ns : Set β\nhs : s ∈ cocompact β\nt : Set β\nht : IsCompact t\nhts : tᶜ ⊆ s\n⊢ (f ⁻¹' t)ᶜ ⊆ f ⁻¹' s\n[PROOFSTEP]\nsimpa using preimage_mono hts\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : TopologicalSpace δ\ninst✝ : T2Space β\nf : CocompactMap α β\ns : Set β\nhs : IsCompact s\n⊢ IsCompact (↑f ⁻¹' s)\n[PROOFSTEP]\nobtain ⟨t, ht, hts⟩ :=\n  mem_cocompact'.mp\n    (by\n      simpa only [preimage_image_preimage, preimage_compl] using\n        mem_map.mp\n          (cocompact_tendsto f <| mem_cocompact.mpr ⟨s, hs, compl_subset_compl.mpr (image_preimage_subset f _)⟩))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : TopologicalSpace δ\ninst✝ : T2Space β\nf : CocompactMap α β\ns : Set β\nhs : IsCompact s\n⊢ ?m.10429 ∈ cocompact ?m.10404\n[PROOFSTEP]\nsimpa only [preimage_image_preimage, preimage_compl] using\n  mem_map.mp (cocompact_tendsto f <| mem_cocompact.mpr ⟨s, hs, compl_subset_compl.mpr (image_preimage_subset f _)⟩)\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : TopologicalSpace δ\ninst✝ : T2Space β\nf : CocompactMap α β\ns : Set β\nhs : IsCompact s\nt : Set α\nht : IsCompact t\nhts : (↑f ⁻¹' s)ᶜᶜ ⊆ t\n⊢ IsCompact (↑f ⁻¹' s)\n[PROOFSTEP]\nexact isCompact_of_isClosed_subset ht (hs.isClosed.preimage <| map_continuous f) (by simpa using hts)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : TopologicalSpace δ\ninst✝ : T2Space β\nf : CocompactMap α β\ns : Set β\nhs : IsCompact s\nt : Set α\nht : IsCompact t\nhts : (↑f ⁻¹' s)ᶜᶜ ⊆ t\n⊢ ↑f ⁻¹' s ⊆ t\n[PROOFSTEP]\nsimpa using hts\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α ≃ₜ β\n⊢ Tendsto (ContinuousMap.mk ↑f).toFun (cocompact α) (cocompact β)\n[PROOFSTEP]\nrefine' CocompactMap.tendsto_of_forall_preimage fun K hK => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α ≃ₜ β\nK : Set β\nhK : IsCompact K\n⊢ IsCompact ((ContinuousMap.mk ↑f).toFun ⁻¹' K)\n[PROOFSTEP]\nerw [K.preimage_equiv_eq_image_symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α ≃ₜ β\nK : Set β\nhK : IsCompact K\n⊢ IsCompact (↑f.symm '' K)\n[PROOFSTEP]\nexact hK.image f.symm.continuous\n", "meta": {"mathlib_filename": "Mathlib.Topology.ContinuousFunction.CocompactMap", "llama_tokens": 2805, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7185943925708562, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.39288297022069607}}
{"text": "[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.28, u_1} C\ninst✝ : Abelian C\n⊢ Abelian Cᵒᵖ\n[PROOFSTEP]\nexact\n  { normalMonoOfMono := fun f => normalMonoOfNormalEpiUnop _ (normalEpiOfEpi f.unop)\n    normalEpiOfEpi := fun f => normalEpiOfNormalMonoUnop _ (normalMonoOfMono f.unop) }\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.2286, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (cokernel.π f).op ≫ f.op = 0\n[PROOFSTEP]\nsimp [← op_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.2286, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ f ≫ (kernel.ι f.op).unop = 0\n[PROOFSTEP]\nrw [← f.unop_op, ← unop_comp, f.unop_op]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.2286, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (kernel.ι f.op ≫ f.op).unop = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.2286, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (kernel.lift f.op (cokernel.π f).op (_ : (f ≫ cokernel.π f).op = 0)).unop ≫\n      cokernel.desc f (kernel.ι f.op).unop (_ : f ≫ (kernel.ι f.op).unop = 0) =\n    𝟙 (kernel f.op).unop\n[PROOFSTEP]\nrw [← unop_id, ← (cokernel.desc f _ _).unop_op, ← unop_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.2286, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ ((cokernel.desc f (kernel.ι f.op).unop (_ : f ≫ (kernel.ι f.op).unop = 0)).op ≫\n        kernel.lift f.op (cokernel.π f).op (_ : (f ≫ cokernel.π f).op = 0)).unop =\n    (𝟙 (kernel f.op)).unop\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nC : Type u_1\ninst✝¹ : Category.{?u.2286, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (cokernel.desc f (kernel.ι f.op).unop (_ : f ≫ (kernel.ι f.op).unop = 0)).op ≫\n      kernel.lift f.op (cokernel.π f).op (_ : (f ≫ cokernel.π f).op = 0) =\n    𝟙 (kernel f.op)\n[PROOFSTEP]\next\n[GOAL]\ncase e_f.h\nC : Type u_1\ninst✝¹ : Category.{?u.2286, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ ((cokernel.desc f (kernel.ι f.op).unop (_ : f ≫ (kernel.ι f.op).unop = 0)).op ≫\n        kernel.lift f.op (cokernel.π f).op (_ : (f ≫ cokernel.π f).op = 0)) ≫\n      equalizer.ι f.op 0 =\n    𝟙 (kernel f.op) ≫ equalizer.ι f.op 0\n[PROOFSTEP]\nsimp [← op_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.2286, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ cokernel.desc f (kernel.ι f.op).unop (_ : f ≫ (kernel.ι f.op).unop = 0) ≫\n      (kernel.lift f.op (cokernel.π f).op (_ : (f ≫ cokernel.π f).op = 0)).unop =\n    𝟙 (cokernel f)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u_1\ninst✝¹ : Category.{?u.2286, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ coequalizer.π f 0 ≫\n      cokernel.desc f (kernel.ι f.op).unop (_ : f ≫ (kernel.ι f.op).unop = 0) ≫\n        (kernel.lift f.op (cokernel.π f).op (_ : (f ≫ cokernel.π f).op = 0)).unop =\n    coequalizer.π f 0 ≫ 𝟙 (cokernel f)\n[PROOFSTEP]\nsimp [← unop_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.7588, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (cokernel.π f.op).unop ≫ f = 0\n[PROOFSTEP]\nrw [← f.unop_op, ← unop_comp, f.unop_op]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.7588, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (f.op ≫ cokernel.π f.op).unop = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.7588, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ f.op ≫ (kernel.ι f).op = 0\n[PROOFSTEP]\nsimp [← op_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.7588, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ kernel.lift f (cokernel.π f.op).unop (_ : (cokernel.π f.op).unop ≫ f = 0) ≫\n      (cokernel.desc f.op (kernel.ι f).op (_ : (kernel.ι f ≫ f).op = 0)).unop =\n    𝟙 (cokernel f.op).unop\n[PROOFSTEP]\nrw [← unop_id, ← (kernel.lift f _ _).unop_op, ← unop_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.7588, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (cokernel.desc f.op (kernel.ι f).op (_ : (kernel.ι f ≫ f).op = 0) ≫\n        (kernel.lift f (cokernel.π f.op).unop (_ : (cokernel.π f.op).unop ≫ f = 0)).op).unop =\n    (𝟙 (cokernel f.op)).unop\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nC : Type u_1\ninst✝¹ : Category.{?u.7588, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ cokernel.desc f.op (kernel.ι f).op (_ : (kernel.ι f ≫ f).op = 0) ≫\n      (kernel.lift f (cokernel.π f.op).unop (_ : (cokernel.π f.op).unop ≫ f = 0)).op =\n    𝟙 (cokernel f.op)\n[PROOFSTEP]\next\n[GOAL]\ncase e_f.h\nC : Type u_1\ninst✝¹ : Category.{?u.7588, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ coequalizer.π f.op 0 ≫\n      cokernel.desc f.op (kernel.ι f).op (_ : (kernel.ι f ≫ f).op = 0) ≫\n        (kernel.lift f (cokernel.π f.op).unop (_ : (cokernel.π f.op).unop ≫ f = 0)).op =\n    coequalizer.π f.op 0 ≫ 𝟙 (cokernel f.op)\n[PROOFSTEP]\nsimp [← op_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.7588, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (cokernel.desc f.op (kernel.ι f).op (_ : (kernel.ι f ≫ f).op = 0)).unop ≫\n      kernel.lift f (cokernel.π f.op).unop (_ : (cokernel.π f.op).unop ≫ f = 0) =\n    𝟙 (kernel f)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u_1\ninst✝¹ : Category.{?u.7588, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ ((cokernel.desc f.op (kernel.ι f).op (_ : (kernel.ι f ≫ f).op = 0)).unop ≫\n        kernel.lift f (cokernel.π f.op).unop (_ : (cokernel.π f.op).unop ≫ f = 0)) ≫\n      equalizer.ι f 0 =\n    𝟙 (kernel f) ≫ equalizer.ι f 0\n[PROOFSTEP]\nsimp [← unop_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (cokernel.π f.op).unop = (cokernelOpUnop f).hom ≫ kernel.ι f ≫ eqToHom (_ : X = (Opposite.op X).unop)\n[PROOFSTEP]\nsimp [cokernelOpUnop]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (kernel.ι f.op).unop = eqToHom (_ : (Opposite.op Y).unop = Y) ≫ cokernel.π f ≫ (kernelOpUnop f).inv\n[PROOFSTEP]\nsimp [kernelOpUnop]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (kernel.ι g.unop).op = eqToHom (_ : Opposite.op B.unop = B) ≫ cokernel.π g ≫ (kernelUnopOp g).inv\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (cokernel.π g.unop).op = (cokernelUnopOp g).hom ≫ kernel.ι g ≫ eqToHom (_ : A = Opposite.op A.unop)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (image.ι g.unop).op ≫ (imageUnopOp g).hom = factorThruImage g\n[PROOFSTEP]\nsimp only [imageUnopOp, Iso.trans, Iso.symm, Iso.op, cokernelOpOp_inv, cokernelEpiComp_hom, cokernelCompIsIso_hom,\n  Abelian.coimageIsoImage'_hom, ← Category.assoc, ← op_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (((((kernel.lift (cokernel.π g.unop) (cokernel.π (cokernel.π g.unop).op).unop\n                    (_ : (cokernel.π (cokernel.π g.unop).op).unop ≫ cokernel.π g.unop = 0) ≫\n                  (Abelian.imageIsoImage g.unop).hom) ≫\n                image.ι g.unop).op ≫\n            (cokernelIsoOfEq\n                (_ :\n                  (cokernel.π g.unop).op =\n                    (cokernelUnopOp g).hom ≫ kernel.ι g ≫ eqToHom (_ : A = Opposite.op A.unop))).hom) ≫\n          cokernel.desc ((cokernelUnopOp g).hom ≫ kernel.ι g ≫ eqToHom (_ : A = Opposite.op A.unop))\n            (cokernel.π (kernel.ι g ≫ eqToHom (_ : A = Opposite.op A.unop)))\n            (_ :\n              ((cokernelUnopOp g).hom ≫ kernel.ι g ≫ eqToHom (_ : A = Opposite.op A.unop)) ≫\n                  cokernel.π (kernel.ι g ≫ eqToHom (_ : A = Opposite.op A.unop)) =\n                0)) ≫\n        cokernel.desc (kernel.ι g ≫ eqToHom (_ : A = Opposite.op A.unop))\n          (inv (eqToHom (_ : A = Opposite.op A.unop)) ≫ cokernel.π (kernel.ι g))\n          (_ :\n            (kernel.ι g ≫ eqToHom (_ : A = Opposite.op A.unop)) ≫\n                inv (eqToHom (_ : A = Opposite.op A.unop)) ≫ cokernel.π (kernel.ι g) =\n              0)) ≫\n      cokernel.desc (kernel.ι g) (factorThruImage g) (_ : kernel.ι g ≫ factorThruImage g = 0) =\n    factorThruImage g\n[PROOFSTEP]\nsimp only [Category.assoc, Abelian.imageIsoImage_hom_comp_image_ι, kernel.lift_ι, Quiver.Hom.op_unop,\n  cokernelIsoOfEq_hom_comp_desc_assoc, cokernel.π_desc_assoc, cokernel.π_desc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ inv (eqToHom (_ : A = Opposite.op A.unop)) ≫ factorThruImage g = factorThruImage g\n[PROOFSTEP]\nsimp only [eqToHom_refl]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ inv (𝟙 A) ≫ factorThruImage g = factorThruImage g\n[PROOFSTEP]\nerw [IsIso.inv_id, Category.id_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (imageUnopOp g).hom ≫ image.ι g = (factorThruImage g.unop).op\n[PROOFSTEP]\nsimp only [← cancel_epi (image.ι g.unop).op, ← Category.assoc, image_ι_op_comp_imageUnopOp_hom, ← op_comp, image.fac,\n  Quiver.Hom.op_unop]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ factorThruImage g ≫ (imageUnopOp g).inv = (image.ι g.unop).op\n[PROOFSTEP]\nrw [Iso.comp_inv_eq, image_ι_op_comp_imageUnopOp_hom]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Abelian C\nX Y : C\nf : X ⟶ Y\nA B : Cᵒᵖ\ng : A ⟶ B\n⊢ (imageUnopOp g).inv ≫ (factorThruImage g.unop).op = image.ι g\n[PROOFSTEP]\nrw [Iso.inv_comp_eq, imageUnopOp_hom_comp_image_ι]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Abelian.Opposite", "llama_tokens": 5202, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757645879592641, "lm_q2_score": 0.5813030906443133, "lm_q1q2_score": 0.3928240435287011}}
{"text": "[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni✝ : I\nα : Type u_1\ninst✝² : (i : I) → SMul α (f i)\ninst✝¹ : ∀ (i : I), Nonempty (f i)\ni : I\ninst✝ : FaithfulSMul α (f i)\nm₁✝ m₂✝ : α\nh : ∀ (a : (i : I) → f i), m₁✝ • a = m₂✝ • a\na : f i\n⊢ m₁✝ • a = m₂✝ • a\n[PROOFSTEP]\nclassical\nhave := congr_fun (h <| Function.update (fun j => Classical.choice (‹∀ i, Nonempty (f i)› j)) i a) i\nsimpa using this\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni✝ : I\nα : Type u_1\ninst✝² : (i : I) → SMul α (f i)\ninst✝¹ : ∀ (i : I), Nonempty (f i)\ni : I\ninst✝ : FaithfulSMul α (f i)\nm₁✝ m₂✝ : α\nh : ∀ (a : (i : I) → f i), m₁✝ • a = m₂✝ • a\na : f i\n⊢ m₁✝ • a = m₂✝ • a\n[PROOFSTEP]\nhave := congr_fun (h <| Function.update (fun j => Classical.choice (‹∀ i, Nonempty (f i)› j)) i a) i\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni✝ : I\nα : Type u_1\ninst✝² : (i : I) → SMul α (f i)\ninst✝¹ : ∀ (i : I), Nonempty (f i)\ni : I\ninst✝ : FaithfulSMul α (f i)\nm₁✝ m₂✝ : α\nh : ∀ (a : (i : I) → f i), m₁✝ • a = m₂✝ • a\na : f i\nthis :\n  (m₁✝ • Function.update (fun j => Classical.choice (_ : Nonempty (f j))) i a) i =\n    (m₂✝ • Function.update (fun j => Classical.choice (_ : Nonempty (f j))) i a) i\n⊢ m₁✝ • a = m₂✝ • a\n[PROOFSTEP]\nsimpa using this\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nn : (i : I) → Zero (g i)\ninst✝ : (i : I) → SMulZeroClass (f i) (g i)\n⊢ ∀ (a : (i : I) → f i), a • 0 = 0\n[PROOFSTEP]\nintros\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nn : (i : I) → Zero (g i)\ninst✝ : (i : I) → SMulZeroClass (f i) (g i)\na✝ : (i : I) → f i\n⊢ a✝ • 0 = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nI : Type u\nf : I → Type v\nx✝ y : (i : I) → f i\ni : I\ng : I → Type u_1\nn : (i : I) → Zero (g i)\ninst✝ : (i : I) → SMulZeroClass (f i) (g i)\na✝ : (i : I) → f i\nx : I\n⊢ (a✝ • 0) x = OfNat.ofNat 0 x\n[PROOFSTEP]\nexact smul_zero _\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nn : (i : I) → AddZeroClass (g i)\ninst✝ : (i : I) → DistribSMul (f i) (g i)\n⊢ ∀ (a : (i : I) → f i), a • 0 = 0\n[PROOFSTEP]\nintros\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nn : (i : I) → AddZeroClass (g i)\ninst✝ : (i : I) → DistribSMul (f i) (g i)\na✝ : (i : I) → f i\n⊢ a✝ • 0 = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nI : Type u\nf : I → Type v\nx✝ y : (i : I) → f i\ni : I\ng : I → Type u_1\nn : (i : I) → AddZeroClass (g i)\ninst✝ : (i : I) → DistribSMul (f i) (g i)\na✝ : (i : I) → f i\nx : I\n⊢ (a✝ • 0) x = OfNat.ofNat 0 x\n[PROOFSTEP]\nexact smul_zero _\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nn : (i : I) → AddZeroClass (g i)\ninst✝ : (i : I) → DistribSMul (f i) (g i)\n⊢ ∀ (a : (i : I) → f i) (x y : (i : I) → g i), a • (x + y) = a • x + a • y\n[PROOFSTEP]\nintros\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nn : (i : I) → AddZeroClass (g i)\ninst✝ : (i : I) → DistribSMul (f i) (g i)\na✝ : (i : I) → f i\nx✝ y✝ : (i : I) → g i\n⊢ a✝ • (x✝ + y✝) = a✝ • x✝ + a✝ • y✝\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nI : Type u\nf : I → Type v\nx✝¹ y : (i : I) → f i\ni : I\ng : I → Type u_1\nn : (i : I) → AddZeroClass (g i)\ninst✝ : (i : I) → DistribSMul (f i) (g i)\na✝ : (i : I) → f i\nx✝ y✝ : (i : I) → g i\nx : I\n⊢ (a✝ • (x✝ + y✝)) x = (a✝ • x✝ + a✝ • y✝) x\n[PROOFSTEP]\nexact smul_add _ _ _\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nm : (i : I) → Monoid (f i)\nn : (i : I) → Monoid (g i)\ninst✝ : (i : I) → MulDistribMulAction (f i) (g i)\n⊢ ∀ (r : (i : I) → f i) (x y : (i : I) → g i), r • (x * y) = r • x * r • y\n[PROOFSTEP]\nintros\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nm : (i : I) → Monoid (f i)\nn : (i : I) → Monoid (g i)\ninst✝ : (i : I) → MulDistribMulAction (f i) (g i)\nr✝ : (i : I) → f i\nx✝ y✝ : (i : I) → g i\n⊢ r✝ • (x✝ * y✝) = r✝ • x✝ * r✝ • y✝\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nI : Type u\nf : I → Type v\nx✝¹ y : (i : I) → f i\ni : I\ng : I → Type u_1\nm : (i : I) → Monoid (f i)\nn : (i : I) → Monoid (g i)\ninst✝ : (i : I) → MulDistribMulAction (f i) (g i)\nr✝ : (i : I) → f i\nx✝ y✝ : (i : I) → g i\nx : I\n⊢ (r✝ • (x✝ * y✝)) x = (r✝ • x✝ * r✝ • y✝) x\n[PROOFSTEP]\napply smul_mul'\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nm : (i : I) → Monoid (f i)\nn : (i : I) → Monoid (g i)\ninst✝ : (i : I) → MulDistribMulAction (f i) (g i)\n⊢ ∀ (r : (i : I) → f i), r • 1 = 1\n[PROOFSTEP]\nintros\n[GOAL]\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni : I\ng : I → Type u_1\nm : (i : I) → Monoid (f i)\nn : (i : I) → Monoid (g i)\ninst✝ : (i : I) → MulDistribMulAction (f i) (g i)\nr✝ : (i : I) → f i\n⊢ r✝ • 1 = 1\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nI : Type u\nf : I → Type v\nx✝ y : (i : I) → f i\ni : I\ng : I → Type u_1\nm : (i : I) → Monoid (f i)\nn : (i : I) → Monoid (g i)\ninst✝ : (i : I) → MulDistribMulAction (f i) (g i)\nr✝ : (i : I) → f i\nx : I\n⊢ (r✝ • 1) x = OfNat.ofNat 1 x\n[PROOFSTEP]\napply smul_one\n[GOAL]\nI : Type u\nf✝ : I → Type v\nx✝ y : (i : I) → f✝ i\ni : I\nR : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : SMul R γ\nr : R\nf : α → β\ng : α → γ\ne : β → γ\nx : β\n⊢ extend f (r • g) (r • e) x = (r • extend f g e) x\n[PROOFSTEP]\nhaveI : Decidable (∃ a : α, f a = x) := Classical.propDecidable _\n[GOAL]\nI : Type u\nf✝ : I → Type v\nx✝ y : (i : I) → f✝ i\ni : I\nR : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : SMul R γ\nr : R\nf : α → β\ng : α → γ\ne : β → γ\nx : β\nthis : Decidable (∃ a, f a = x)\n⊢ extend f (r • g) (r • e) x = (r • extend f g e) x\n[PROOFSTEP]\nrw [extend_def, Pi.smul_apply, Pi.smul_apply, extend_def]\n[GOAL]\nI : Type u\nf✝ : I → Type v\nx✝ y : (i : I) → f✝ i\ni : I\nR : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : SMul R γ\nr : R\nf : α → β\ng : α → γ\ne : β → γ\nx : β\nthis : Decidable (∃ a, f a = x)\n⊢ (if h : ∃ a, f a = x then (r • g) (Classical.choose h) else r • e x) =\n    r • if h : ∃ a, f a = x then g (Classical.choose h) else e x\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nI : Type u\nf✝ : I → Type v\nx✝ y : (i : I) → f✝ i\ni : I\nR : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : SMul R γ\nr : R\nf : α → β\ng : α → γ\ne : β → γ\nx : β\nthis : Decidable (∃ a, f a = x)\nh✝ : ∃ a, f a = x\n⊢ (r • g) (Classical.choose h✝) = r • g (Classical.choose h✝)\n[PROOFSTEP]\nrfl\n  -- convert (apply_dite (fun c : γ => r • c) _ _ _).symm\n[GOAL]\ncase neg\nI : Type u\nf✝ : I → Type v\nx✝ y : (i : I) → f✝ i\ni : I\nR : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : SMul R γ\nr : R\nf : α → β\ng : α → γ\ne : β → γ\nx : β\nthis : Decidable (∃ a, f a = x)\nh✝ : ¬∃ a, f a = x\n⊢ r • e x = r • e x\n[PROOFSTEP]\nrfl\n  -- convert (apply_dite (fun c : γ => r • c) _ _ _).symm\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.GroupAction.Pi", "llama_tokens": 3831, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6893056167854461, "lm_q2_score": 0.5698526514141572, "lm_q1q2_score": 0.39280263335985743}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t✝ s : Set α\nt : Set β\ninst✝² : Fintype ↑s\ninst✝¹ : Fintype ↑t\ninst✝ : Fintype ↑(s ×ˢ t)\n⊢ toFinset (s ×ˢ t) = toFinset s ×ˢ toFinset t\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t✝ s : Set α\nt : Set β\ninst✝² : Fintype ↑s\ninst✝¹ : Fintype ↑t\ninst✝ : Fintype ↑(s ×ˢ t)\na✝ : α × β\n⊢ a✝ ∈ toFinset (s ×ˢ t) ↔ a✝ ∈ toFinset s ×ˢ toFinset t\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t s : Set α\ninst✝² : DecidableEq α\ninst✝¹ : Fintype ↑s\ninst✝ : Fintype ↑(offDiag s)\n⊢ ∀ (a : α × α), a ∈ toFinset (offDiag s) ↔ a ∈ Finset.offDiag (toFinset s)\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nx✝ : α × β\na : α\nb : β\n⊢ (a, b) ∈ univ ×ˢ univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ Infinite (α × β) ↔ Infinite α ∧ Nonempty β ∨ Nonempty α ∧ Infinite β\n[PROOFSTEP]\nrefine'\n  ⟨fun H => _, fun H => H.elim (and_imp.2 <| @Prod.infinite_of_left α β) (and_imp.2 <| @Prod.infinite_of_right α β)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nH : Infinite (α × β)\n⊢ Infinite α ∧ Nonempty β ∨ Nonempty α ∧ Infinite β\n[PROOFSTEP]\nrw [and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nH : Infinite (α × β)\n⊢ Nonempty β ∧ Infinite α ∨ Nonempty α ∧ Infinite β\n[PROOFSTEP]\ncontrapose! H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nH : (Nonempty β → ¬Infinite α) ∧ (Nonempty α → ¬Infinite β)\n⊢ ¬Infinite (α × β)\n[PROOFSTEP]\nintro H'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nH : (Nonempty β → ¬Infinite α) ∧ (Nonempty α → ¬Infinite β)\nH' : Infinite (α × β)\n⊢ False\n[PROOFSTEP]\nrcases Infinite.nonempty (α × β) with ⟨a, b⟩\n[GOAL]\ncase intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nH : (Nonempty β → ¬Infinite α) ∧ (Nonempty α → ¬Infinite β)\nH' : Infinite (α × β)\na : α\nb : β\n⊢ False\n[PROOFSTEP]\nhaveI := fintypeOfNotInfinite (H.1 ⟨b⟩)\n[GOAL]\ncase intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nH : (Nonempty β → ¬Infinite α) ∧ (Nonempty α → ¬Infinite β)\nH' : Infinite (α × β)\na : α\nb : β\nthis : Fintype α\n⊢ False\n[PROOFSTEP]\nhaveI := fintypeOfNotInfinite (H.2 ⟨a⟩)\n[GOAL]\ncase intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nH : (Nonempty β → ¬Infinite α) ∧ (Nonempty α → ¬Infinite β)\nH' : Infinite (α × β)\na : α\nb : β\nthis✝ : Fintype α\nthis : Fintype β\n⊢ False\n[PROOFSTEP]\nexact H'.false\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nπ : ι → Type ?u.4746\ninst✝¹ : ∀ (i : ι), Nontrivial (π i)\ninst✝ : Infinite ι\n⊢ Infinite ((i : ι) → π i)\n[PROOFSTEP]\nchoose m n hm using fun i => exists_pair_ne (π i)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nπ : ι → Type ?u.4746\ninst✝¹ : ∀ (i : ι), Nontrivial (π i)\ninst✝ : Infinite ι\nm n : (i : ι) → π i\nhm : ∀ (i : ι), m i ≠ n i\n⊢ Infinite ((i : ι) → π i)\n[PROOFSTEP]\nrefine' Infinite.of_injective (fun i => update m i (n i)) fun x y h => of_not_not fun hne => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nπ : ι → Type ?u.4746\ninst✝¹ : ∀ (i : ι), Nontrivial (π i)\ninst✝ : Infinite ι\nm n : (i : ι) → π i\nhm : ∀ (i : ι), m i ≠ n i\nx y : ι\nh : (fun i => update m i (n i)) x = (fun i => update m i (n i)) y\nhne : ¬x = y\n⊢ False\n[PROOFSTEP]\nsimp_rw [update_eq_iff, update_noteq hne] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nπ : ι → Type ?u.4746\ninst✝¹ : ∀ (i : ι), Nontrivial (π i)\ninst✝ : Infinite ι\nm n : (i : ι) → π i\nhm : ∀ (i : ι), m i ≠ n i\nx y : ι\nhne : ¬x = y\nh : n x = m x ∧ ∀ (x_1 : ι), x_1 ≠ x → m x_1 = update m y (n y) x_1\n⊢ False\n[PROOFSTEP]\nexact (hm x h.1.symm).elim\n", "meta": {"mathlib_filename": "Mathlib.Data.Fintype.Prod", "llama_tokens": 1967, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6893056167854461, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.3928026333598574}}
{"text": "[GOAL]\n⊢ (fun n => Real.log ↑n) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ ↑Λ 1 = 0\n[PROOFSTEP]\nsimp [vonMangoldt_apply]\n[GOAL]\nn : ℕ\n⊢ 0 ≤ ↑Λ n\n[PROOFSTEP]\nrw [vonMangoldt_apply]\n[GOAL]\nn : ℕ\n⊢ 0 ≤ if IsPrimePow n then Real.log ↑(minFac n) else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nn : ℕ\nh✝ : IsPrimePow n\n⊢ 0 ≤ Real.log ↑(minFac n)\n[PROOFSTEP]\nexact Real.log_nonneg (one_le_cast.2 (Nat.minFac_pos n))\n[GOAL]\ncase neg\nn : ℕ\nh✝ : ¬IsPrimePow n\n⊢ 0 ≤ 0\n[PROOFSTEP]\nrfl\n[GOAL]\nn k : ℕ\nhk : k ≠ 0\n⊢ ↑Λ (n ^ k) = ↑Λ n\n[PROOFSTEP]\nsimp only [vonMangoldt_apply, isPrimePow_pow_iff hk, pow_minFac hk]\n[GOAL]\np : ℕ\nhp : Prime p\n⊢ ↑Λ p = Real.log ↑p\n[PROOFSTEP]\nrw [vonMangoldt_apply, Prime.minFac_eq hp, if_pos hp.prime.isPrimePow]\n[GOAL]\nn : ℕ\n⊢ ↑Λ n ≠ 0 ↔ IsPrimePow n\n[PROOFSTEP]\nrcases eq_or_ne n 1 with (rfl | hn)\n[GOAL]\ncase inl\n⊢ ↑Λ 1 ≠ 0 ↔ IsPrimePow 1\n[PROOFSTEP]\nsimp [not_isPrimePow_one]\n[GOAL]\ncase inr\nn : ℕ\nhn : n ≠ 1\n⊢ ↑Λ n ≠ 0 ↔ IsPrimePow n\n[PROOFSTEP]\nexact (Real.log_pos (one_lt_cast.2 (minFac_prime hn).one_lt)).ne'.ite_ne_right_iff\n[GOAL]\nn : ℕ\n⊢ ∑ i in divisors n, ↑Λ i = Real.log ↑n\n[PROOFSTEP]\nrefine' recOnPrimeCoprime _ _ _ n\n[GOAL]\ncase refine'_1\nn : ℕ\n⊢ ∑ i in divisors 0, ↑Λ i = Real.log ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nn : ℕ\n⊢ ∀ (p n : ℕ), Prime p → ∑ i in divisors (p ^ n), ↑Λ i = Real.log ↑(p ^ n)\n[PROOFSTEP]\nintro p k hp\n[GOAL]\ncase refine'_2\nn p k : ℕ\nhp : Prime p\n⊢ ∑ i in divisors (p ^ k), ↑Λ i = Real.log ↑(p ^ k)\n[PROOFSTEP]\nrw [sum_divisors_prime_pow hp, cast_pow, Real.log_pow, Finset.sum_range_succ', pow_zero, vonMangoldt_apply_one]\n[GOAL]\ncase refine'_2\nn p k : ℕ\nhp : Prime p\n⊢ ∑ k in range k, ↑Λ (p ^ (k + 1)) + 0 = ↑k * Real.log ↑p\n[PROOFSTEP]\nsimp [vonMangoldt_apply_pow (Nat.succ_ne_zero _), vonMangoldt_apply_prime hp]\n[GOAL]\ncase refine'_3\nn : ℕ\n⊢ ∀ (a b : ℕ),\n    1 < a →\n      1 < b →\n        coprime a b →\n          ∑ i in divisors a, ↑Λ i = Real.log ↑a →\n            ∑ i in divisors b, ↑Λ i = Real.log ↑b → ∑ i in divisors (a * b), ↑Λ i = Real.log ↑(a * b)\n[PROOFSTEP]\nintro a b ha' hb' hab ha hb\n[GOAL]\ncase refine'_3\nn a b : ℕ\nha' : 1 < a\nhb' : 1 < b\nhab : coprime a b\nha : ∑ i in divisors a, ↑Λ i = Real.log ↑a\nhb : ∑ i in divisors b, ↑Λ i = Real.log ↑b\n⊢ ∑ i in divisors (a * b), ↑Λ i = Real.log ↑(a * b)\n[PROOFSTEP]\nsimp only [vonMangoldt_apply, ← sum_filter] at ha hb ⊢\n[GOAL]\ncase refine'_3\nn a b : ℕ\nha' : 1 < a\nhb' : 1 < b\nhab : coprime a b\nha : ∑ a in filter (fun a => IsPrimePow a) (divisors a), Real.log ↑(minFac a) = Real.log ↑a\nhb : ∑ a in filter (fun a => IsPrimePow a) (divisors b), Real.log ↑(minFac a) = Real.log ↑b\n⊢ ∑ a in filter (fun a => IsPrimePow a) (divisors (a * b)), Real.log ↑(minFac a) = Real.log ↑(a * b)\n[PROOFSTEP]\nrw [mul_divisors_filter_prime_pow hab, filter_union, sum_union (disjoint_divisors_filter_isPrimePow hab), ha, hb,\n  Nat.cast_mul, Real.log_mul (cast_ne_zero.2 (pos_of_gt ha').ne') (cast_ne_zero.2 (pos_of_gt hb').ne')]\n[GOAL]\n⊢ Λ * ↑ζ = log\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nn : ℕ\n⊢ ↑(Λ * ↑ζ) n = ↑log n\n[PROOFSTEP]\nrw [coe_mul_zeta_apply, vonMangoldt_sum]\n[GOAL]\ncase h\nn : ℕ\n⊢ Real.log ↑n = ↑log n\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑ζ * Λ = log\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\n⊢ Λ * ↑ζ = log\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ log * ↑μ = Λ\n[PROOFSTEP]\nrw [← vonMangoldt_mul_zeta, mul_assoc, coe_zeta_mul_coe_moebius, mul_one]\n[GOAL]\n⊢ ↑μ * log = Λ\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\n⊢ log * ↑μ = Λ\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ ∑ d in divisors n, ↑(↑μ d) * ↑log d = -↑Λ n\n[PROOFSTEP]\nsimp only [← log_mul_moebius_eq_vonMangoldt, mul_comm log, mul_apply, log_apply, intCoe_apply, ← Finset.sum_neg_distrib,\n  neg_mul_eq_mul_neg]\n[GOAL]\nn : ℕ\n⊢ ∑ x in divisors n, ↑(↑μ x) * Real.log ↑x = ∑ x in divisorsAntidiagonal n, ↑(↑μ x.fst) * -Real.log ↑x.snd\n[PROOFSTEP]\nrw [sum_divisorsAntidiagonal fun i j => (μ i : ℝ) * -Real.log j]\n[GOAL]\nn : ℕ\n⊢ ∑ x in divisors n, ↑(↑μ x) * Real.log ↑x = ∑ i in divisors n, ↑(↑μ i) * -Real.log ↑(n / i)\n[PROOFSTEP]\nhave :\n  (∑ i : ℕ in n.divisors, (μ i : ℝ) * -Real.log (n / i : ℕ)) =\n    ∑ i : ℕ in n.divisors, ((μ i : ℝ) * Real.log i - μ i * Real.log n) :=\n  by\n  apply sum_congr rfl\n  simp only [and_imp, Int.cast_eq_zero, mul_eq_mul_left_iff, Ne.def, neg_inj, mem_divisors]\n  intro m mn hn\n  have : (m : ℝ) ≠ 0 := by\n    rw [cast_ne_zero]\n    rintro rfl\n    exact hn (by simpa using mn)\n  rw [Nat.cast_div mn this, Real.log_div (cast_ne_zero.2 hn) this, neg_sub, mul_sub]\n[GOAL]\nn : ℕ\n⊢ ∑ i in divisors n, ↑(↑μ i) * -Real.log ↑(n / i) = ∑ i in divisors n, (↑(↑μ i) * Real.log ↑i - ↑(↑μ i) * Real.log ↑n)\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\nn : ℕ\n⊢ ∀ (x : ℕ), x ∈ divisors n → ↑(↑μ x) * -Real.log ↑(n / x) = ↑(↑μ x) * Real.log ↑x - ↑(↑μ x) * Real.log ↑n\n[PROOFSTEP]\nsimp only [and_imp, Int.cast_eq_zero, mul_eq_mul_left_iff, Ne.def, neg_inj, mem_divisors]\n[GOAL]\nn : ℕ\n⊢ ∀ (x : ℕ), x ∣ n → ¬n = 0 → ↑(↑μ x) * -Real.log ↑(n / x) = ↑(↑μ x) * Real.log ↑x - ↑(↑μ x) * Real.log ↑n\n[PROOFSTEP]\nintro m mn hn\n[GOAL]\nn m : ℕ\nmn : m ∣ n\nhn : ¬n = 0\n⊢ ↑(↑μ m) * -Real.log ↑(n / m) = ↑(↑μ m) * Real.log ↑m - ↑(↑μ m) * Real.log ↑n\n[PROOFSTEP]\nhave : (m : ℝ) ≠ 0 := by\n  rw [cast_ne_zero]\n  rintro rfl\n  exact hn (by simpa using mn)\n[GOAL]\nn m : ℕ\nmn : m ∣ n\nhn : ¬n = 0\n⊢ ↑m ≠ 0\n[PROOFSTEP]\nrw [cast_ne_zero]\n[GOAL]\nn m : ℕ\nmn : m ∣ n\nhn : ¬n = 0\n⊢ m ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nn : ℕ\nhn : ¬n = 0\nmn : 0 ∣ n\n⊢ False\n[PROOFSTEP]\nexact hn (by simpa using mn)\n[GOAL]\nn : ℕ\nhn : ¬n = 0\nmn : 0 ∣ n\n⊢ n = 0\n[PROOFSTEP]\nsimpa using mn\n[GOAL]\nn m : ℕ\nmn : m ∣ n\nhn : ¬n = 0\nthis : ↑m ≠ 0\n⊢ ↑(↑μ m) * -Real.log ↑(n / m) = ↑(↑μ m) * Real.log ↑m - ↑(↑μ m) * Real.log ↑n\n[PROOFSTEP]\nrw [Nat.cast_div mn this, Real.log_div (cast_ne_zero.2 hn) this, neg_sub, mul_sub]\n[GOAL]\nn : ℕ\nthis :\n  ∑ i in divisors n, ↑(↑μ i) * -Real.log ↑(n / i) = ∑ i in divisors n, (↑(↑μ i) * Real.log ↑i - ↑(↑μ i) * Real.log ↑n)\n⊢ ∑ x in divisors n, ↑(↑μ x) * Real.log ↑x = ∑ i in divisors n, ↑(↑μ i) * -Real.log ↑(n / i)\n[PROOFSTEP]\nrw [this, sum_sub_distrib, ← sum_mul, ← Int.cast_sum, ← coe_mul_zeta_apply, eq_comm, sub_eq_self, moebius_mul_coe_zeta]\n[GOAL]\nn : ℕ\nthis :\n  ∑ i in divisors n, ↑(↑μ i) * -Real.log ↑(n / i) = ∑ i in divisors n, (↑(↑μ i) * Real.log ↑i - ↑(↑μ i) * Real.log ↑n)\n⊢ ↑(↑1 n) * Real.log ↑n = 0\n[PROOFSTEP]\nrcases eq_or_ne n 1 with (hn | hn)\n[GOAL]\ncase inl\nn : ℕ\nthis :\n  ∑ i in divisors n, ↑(↑μ i) * -Real.log ↑(n / i) = ∑ i in divisors n, (↑(↑μ i) * Real.log ↑i - ↑(↑μ i) * Real.log ↑n)\nhn : n = 1\n⊢ ↑(↑1 n) * Real.log ↑n = 0\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase inr\nn : ℕ\nthis :\n  ∑ i in divisors n, ↑(↑μ i) * -Real.log ↑(n / i) = ∑ i in divisors n, (↑(↑μ i) * Real.log ↑i - ↑(↑μ i) * Real.log ↑n)\nhn : n ≠ 1\n⊢ ↑(↑1 n) * Real.log ↑n = 0\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\n⊢ ↑Λ 0 ≤ Real.log ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ ↑Λ (n + 1) ≤ Real.log ↑(n + 1)\n[PROOFSTEP]\nrw [← vonMangoldt_sum]\n[GOAL]\nn : ℕ\n⊢ ↑Λ (n + 1) ≤ ∑ i in divisors (n + 1), ↑Λ i\n[PROOFSTEP]\nexact single_le_sum (by exact fun _ _ => vonMangoldt_nonneg) (mem_divisors_self _ n.succ_ne_zero)\n[GOAL]\nn : ℕ\n⊢ ∀ (i : ℕ), i ∈ divisors (n + 1) → 0 ≤ ↑Λ i\n[PROOFSTEP]\nexact fun _ _ => vonMangoldt_nonneg\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.VonMangoldt", "llama_tokens": 3901, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.5926665999540698, "lm_q1q2_score": 0.3922995802618359}}
{"text": "[GOAL]\nα : Type u_1\np q : ℚ≥0\nh : q ≤ p\n⊢ ↑q ≤ ↑p - 0\n[PROOFSTEP]\nrwa [sub_zero]\n[GOAL]\nα : Type u_1\np q : ℚ≥0\n⊢ ↑q = 0 ↔ q = 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nα : Type u_1\np q : ℚ≥0\nn : ℕ\n⊢ ↑(toNNRat ↑n) = ↑↑n\n[PROOFSTEP]\nsimp only [Nat.cast_nonneg, Rat.coe_toNNRat]\n[GOAL]\nα : Type u_1\np q : ℚ≥0\nn : ℕ\n⊢ ↑n = ↑↑n\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\np q : ℚ≥0\ns : Finset α\nf : α → ℚ\nhf : ∀ (a : α), a ∈ s → 0 ≤ f a\n⊢ toNNRat (∑ a in s, f a) = ∑ a in s, toNNRat (f a)\n[PROOFSTEP]\nrw [← coe_inj, coe_sum, Rat.coe_toNNRat _ (Finset.sum_nonneg hf)]\n[GOAL]\nα : Type u_1\np q : ℚ≥0\ns : Finset α\nf : α → ℚ\nhf : ∀ (a : α), a ∈ s → 0 ≤ f a\n⊢ ∑ i in s, f i = ∑ a in s, ↑(toNNRat (f a))\n[PROOFSTEP]\nexact Finset.sum_congr rfl fun x hxs ↦ by rw [Rat.coe_toNNRat _ (hf x hxs)]\n[GOAL]\nα : Type u_1\np q : ℚ≥0\ns : Finset α\nf : α → ℚ\nhf : ∀ (a : α), a ∈ s → 0 ≤ f a\nx : α\nhxs : x ∈ s\n⊢ f x = ↑(toNNRat (f x))\n[PROOFSTEP]\nrw [Rat.coe_toNNRat _ (hf x hxs)]\n[GOAL]\nα : Type u_1\np q : ℚ≥0\ns : Finset α\nf : α → ℚ\nhf : ∀ (a : α), a ∈ s → 0 ≤ f a\n⊢ toNNRat (∏ a in s, f a) = ∏ a in s, toNNRat (f a)\n[PROOFSTEP]\nrw [← coe_inj, coe_prod, Rat.coe_toNNRat _ (Finset.prod_nonneg hf)]\n[GOAL]\nα : Type u_1\np q : ℚ≥0\ns : Finset α\nf : α → ℚ\nhf : ∀ (a : α), a ∈ s → 0 ≤ f a\n⊢ ∏ i in s, f i = ∏ a in s, ↑(toNNRat (f a))\n[PROOFSTEP]\nexact Finset.prod_congr rfl fun x hxs ↦ by rw [Rat.coe_toNNRat _ (hf x hxs)]\n[GOAL]\nα : Type u_1\np q : ℚ≥0\ns : Finset α\nf : α → ℚ\nhf : ∀ (a : α), a ∈ s → 0 ≤ f a\nx : α\nhxs : x ∈ s\n⊢ f x = ↑(toNNRat (f x))\n[PROOFSTEP]\nrw [Rat.coe_toNNRat _ (hf x hxs)]\n[GOAL]\np q : ℚ\n⊢ 0 < toNNRat q ↔ 0 < q\n[PROOFSTEP]\nsimp [toNNRat, ← coe_lt_coe]\n[GOAL]\np q : ℚ\n⊢ toNNRat q = 0 ↔ q ≤ 0\n[PROOFSTEP]\nsimpa [-toNNRat_pos] using (@toNNRat_pos q).not\n[GOAL]\np q : ℚ\nhp : 0 ≤ p\n⊢ toNNRat q ≤ toNNRat p ↔ q ≤ p\n[PROOFSTEP]\nsimp [← coe_le_coe, toNNRat, hp]\n[GOAL]\np q : ℚ\n⊢ toNNRat q < toNNRat p ↔ q < p ∧ 0 < p\n[PROOFSTEP]\nsimp [← coe_lt_coe, toNNRat, lt_irrefl]\n[GOAL]\np q : ℚ\nhq : 0 ≤ q\nhp : 0 ≤ p\n⊢ ↑(toNNRat (q + p)) = ↑(toNNRat q + toNNRat p)\n[PROOFSTEP]\nsimp [toNNRat, hq, hp, add_nonneg]\n[GOAL]\np q✝ : ℚ\nq : ℚ≥0\nhp : 0 ≤ p\n⊢ q ≤ toNNRat p ↔ ↑q ≤ p\n[PROOFSTEP]\nrw [← coe_le_coe, Rat.coe_toNNRat p hp]\n[GOAL]\np q✝ : ℚ\nq : ℚ≥0\nhq : 0 < q\nhp : p < 0\n⊢ q ≤ toNNRat p ↔ ↑q ≤ p\n[PROOFSTEP]\nsimp only [(hp.trans_le q.coe_nonneg).not_le, toNNRat_eq_zero.2 hp.le, hq.not_le]\n[GOAL]\np✝ q : ℚ\np : ℚ≥0\nhq : 0 ≤ q\n⊢ toNNRat q < p ↔ q < ↑p\n[PROOFSTEP]\nrw [← coe_lt_coe, Rat.coe_toNNRat q hq]\n[GOAL]\np q : ℚ\nhp : 0 ≤ p\n⊢ toNNRat (p * q) = toNNRat p * toNNRat q\n[PROOFSTEP]\ncases' le_total 0 q with hq hq\n[GOAL]\ncase inl\np q : ℚ\nhp : 0 ≤ p\nhq : 0 ≤ q\n⊢ toNNRat (p * q) = toNNRat p * toNNRat q\n[PROOFSTEP]\next\n[GOAL]\ncase inl.a.num\np q : ℚ\nhp : 0 ≤ p\nhq : 0 ≤ q\n⊢ (↑(toNNRat (p * q))).num = (↑(toNNRat p * toNNRat q)).num\n[PROOFSTEP]\nsimp [toNNRat, hp, hq, max_eq_left, mul_nonneg]\n[GOAL]\ncase inl.a.den\np q : ℚ\nhp : 0 ≤ p\nhq : 0 ≤ q\n⊢ (↑(toNNRat (p * q))).den = (↑(toNNRat p * toNNRat q)).den\n[PROOFSTEP]\nsimp [toNNRat, hp, hq, max_eq_left, mul_nonneg]\n[GOAL]\ncase inr\np q : ℚ\nhp : 0 ≤ p\nhq : q ≤ 0\n⊢ toNNRat (p * q) = toNNRat p * toNNRat q\n[PROOFSTEP]\nhave hpq := mul_nonpos_of_nonneg_of_nonpos hp hq\n[GOAL]\ncase inr\np q : ℚ\nhp : 0 ≤ p\nhq : q ≤ 0\nhpq : p * q ≤ 0\n⊢ toNNRat (p * q) = toNNRat p * toNNRat q\n[PROOFSTEP]\nrw [toNNRat_eq_zero.2 hq, toNNRat_eq_zero.2 hpq, mul_zero]\n[GOAL]\np q✝ q : ℚ\n⊢ toNNRat q⁻¹ = (toNNRat q)⁻¹\n[PROOFSTEP]\nobtain hq | hq := le_total q 0\n[GOAL]\ncase inl\np q✝ q : ℚ\nhq : q ≤ 0\n⊢ toNNRat q⁻¹ = (toNNRat q)⁻¹\n[PROOFSTEP]\nrw [toNNRat_eq_zero.mpr hq, inv_zero, toNNRat_eq_zero.mpr (inv_nonpos.mpr hq)]\n[GOAL]\ncase inr\np q✝ q : ℚ\nhq : 0 ≤ q\n⊢ toNNRat q⁻¹ = (toNNRat q)⁻¹\n[PROOFSTEP]\nnth_rw 1 [← Rat.coe_toNNRat q hq]\n[GOAL]\ncase inr\np q✝ q : ℚ\nhq : 0 ≤ q\n⊢ toNNRat (↑(toNNRat q))⁻¹ = (toNNRat q)⁻¹\n[PROOFSTEP]\nrw [← coe_inv, toNNRat_coe]\n[GOAL]\np q : ℚ\nhp : 0 ≤ p\n⊢ toNNRat (p / q) = toNNRat p / toNNRat q\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv, ← toNNRat_inv, ← toNNRat_mul hp]\n[GOAL]\np q : ℚ\nhq : 0 ≤ q\n⊢ toNNRat (p / q) = toNNRat p / toNNRat q\n[PROOFSTEP]\nrw [div_eq_inv_mul, div_eq_inv_mul, toNNRat_mul (inv_nonneg.2 hq), toNNRat_inv]\n[GOAL]\np q : ℚ≥0\nhn : num p = num q\nhd : den p = den q\n⊢ p = q\n[PROOFSTEP]\next\n[GOAL]\ncase a.num\np q : ℚ≥0\nhn : num p = num q\nhd : den p = den q\n⊢ (↑p).num = (↑q).num\n[PROOFSTEP]\napply (Int.natAbs_inj_of_nonneg_of_nonneg _ _).1 hn\n[GOAL]\np q : ℚ≥0\nhn : num p = num q\nhd : den p = den q\n⊢ 0 ≤ (↑p).num\np q : ℚ≥0 hn : num p = num q hd : den p = den q ⊢ 0 ≤ (↑q).num\n[PROOFSTEP]\nexact Rat.num_nonneg_iff_zero_le.2 p.2\n[GOAL]\np q : ℚ≥0\nhn : num p = num q\nhd : den p = den q\n⊢ 0 ≤ (↑q).num\n[PROOFSTEP]\nexact Rat.num_nonneg_iff_zero_le.2 q.2\n[GOAL]\ncase a.den\np q : ℚ≥0\nhn : num p = num q\nhd : den p = den q\n⊢ (↑p).den = (↑q).den\n[PROOFSTEP]\nexact hd\n[GOAL]\np q : ℚ≥0\n⊢ p = q → num p = num q ∧ den p = den q\n[PROOFSTEP]\nrintro rfl\n[GOAL]\np : ℚ≥0\n⊢ num p = num p ∧ den p = den p\n[PROOFSTEP]\nexact ⟨rfl, rfl⟩\n[GOAL]\np q✝ q : ℚ≥0\n⊢ ↑(num q) / ↑(den q) = q\n[PROOFSTEP]\next1\n[GOAL]\ncase a\np q✝ q : ℚ≥0\n⊢ ↑(↑(num q) / ↑(den q)) = ↑q\n[PROOFSTEP]\nrw [coe_div, coe_natCast, coe_natCast, num, ← Int.cast_ofNat,\n  Int.natAbs_of_nonneg (Rat.num_nonneg_iff_zero_le.2 q.prop)]\n[GOAL]\ncase a\np q✝ q : ℚ≥0\n⊢ ↑(↑q).num / ↑(den q) = ↑q\n[PROOFSTEP]\nexact Rat.num_div_den q\n[GOAL]\np q✝ : ℚ≥0\nα : ℚ≥0 → Sort u_1\nh : (m n : ℕ) → α (↑m / ↑n)\nq : ℚ≥0\n⊢ α q\n[PROOFSTEP]\nrw [← num_div_den q]\n[GOAL]\np q✝ : ℚ≥0\nα : ℚ≥0 → Sort u_1\nh : (m n : ℕ) → α (↑m / ↑n)\nq : ℚ≥0\n⊢ α (↑(num q) / ↑(den q))\n[PROOFSTEP]\napply h\n", "meta": {"mathlib_filename": "Mathlib.Data.Rat.NNRat", "llama_tokens": 3388, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7025300449389326, "lm_q2_score": 0.5583269943353745, "lm_q1q2_score": 0.3922414884210498}}
{"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\n⊢ G.map h ≫ G.map f = G.map k ≫ G.map g\n[PROOFSTEP]\nsimp only [← G.map_comp, comm]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\n⊢ ∀ (j : WalkingCospan),\n    NatTrans.app\n        ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ G)).hom).obj (G.mapCone (PullbackCone.mk h k comm))).π j =\n      (Iso.refl\n            ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ G)).hom).obj\n                (G.mapCone (PullbackCone.mk h k comm))).pt).hom ≫\n        NatTrans.app (PullbackCone.mk (G.map h) (G.map k) (_ : G.map h ≫ G.map f = G.map k ≫ G.map g)).π j\n[PROOFSTEP]\nrintro (_ | _ | _)\n[GOAL]\ncase none\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\n⊢ NatTrans.app\n      ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ G)).hom).obj (G.mapCone (PullbackCone.mk h k comm))).π none =\n    (Iso.refl\n          ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ G)).hom).obj\n              (G.mapCone (PullbackCone.mk h k comm))).pt).hom ≫\n      NatTrans.app (PullbackCone.mk (G.map h) (G.map k) (_ : G.map h ≫ G.map f = G.map k ≫ G.map g)).π none\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some.left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\n⊢ NatTrans.app\n      ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ G)).hom).obj (G.mapCone (PullbackCone.mk h k comm))).π\n      (some WalkingPair.left) =\n    (Iso.refl\n          ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ G)).hom).obj\n              (G.mapCone (PullbackCone.mk h k comm))).pt).hom ≫\n      NatTrans.app (PullbackCone.mk (G.map h) (G.map k) (_ : G.map h ≫ G.map f = G.map k ≫ G.map g)).π\n        (some WalkingPair.left)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some.right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\n⊢ NatTrans.app\n      ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ G)).hom).obj (G.mapCone (PullbackCone.mk h k comm))).π\n      (some WalkingPair.right) =\n    (Iso.refl\n          ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ G)).hom).obj\n              (G.mapCone (PullbackCone.mk h k comm))).pt).hom ≫\n      NatTrans.app (PullbackCone.mk (G.map h) (G.map k) (_ : G.map h ≫ G.map f = G.map k ≫ G.map g)).π\n        (some WalkingPair.right)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase none\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\n⊢ G.map (h ≫ f) ≫ 𝟙 (G.obj Z) = 𝟙 (G.obj W) ≫ G.map h ≫ G.map f\n[PROOFSTEP]\nsimp only [comp_id, id_comp, G.map_comp]\n[GOAL]\ncase some.left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\n⊢ G.map h ≫ 𝟙 (G.obj X) = 𝟙 (G.obj W) ≫ G.map h\n[PROOFSTEP]\nsimp only [comp_id, id_comp, G.map_comp]\n[GOAL]\ncase some.right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\n⊢ G.map k ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj W) ≫ G.map k\n[PROOFSTEP]\nsimp only [comp_id, id_comp, G.map_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\nl : IsLimit (PullbackCone.mk h k comm)\n⊢ G.map h ≫ G.map f = G.map k ≫ G.map g\n[PROOFSTEP]\nrw [← G.map_comp, ← G.map_comp, comm]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : ReflectsLimit (cospan f g) G\n⊢ G.map h ≫ G.map f = G.map k ≫ G.map g\n[PROOFSTEP]\nsimp only [← G.map_comp, comm]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\ni : HasPullback f g\n⊢ G.map pullback.fst ≫ G.map f = G.map pullback.snd ≫ G.map g\n[PROOFSTEP]\nsimp only [← G.map_comp, pullback.condition]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\nc : Cone (cospan g f)\nhc : IsLimit c\n⊢ IsLimit (G.mapCone c)\n[PROOFSTEP]\napply (IsLimit.postcomposeHomEquiv (diagramIsoCospan.{v₂} _) _).toFun\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\nc : Cone (cospan g f)\nhc : IsLimit c\n⊢ IsLimit ((Cones.postcompose (diagramIsoCospan (cospan g f ⋙ G)).hom).obj (G.mapCone c))\n[PROOFSTEP]\napply IsLimit.ofIsoLimit _ (PullbackCone.isoMk _).symm\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\nc : Cone (cospan g f)\nhc : IsLimit c\n⊢ IsLimit\n    (PullbackCone.mk (NatTrans.app (G.mapCone c).π WalkingCospan.left)\n      (NatTrans.app (G.mapCone c).π WalkingCospan.right)\n      (_ :\n        NatTrans.app (G.mapCone c).π WalkingCospan.left ≫ (cospan g f ⋙ G).map WalkingCospan.Hom.inl =\n          NatTrans.app (G.mapCone c).π WalkingCospan.right ≫ (cospan g f ⋙ G).map WalkingCospan.Hom.inr))\n[PROOFSTEP]\napply PullbackCone.flipIsLimit\n[GOAL]\ncase t\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\nc : Cone (cospan g f)\nhc : IsLimit c\n⊢ IsLimit\n    (PullbackCone.mk (NatTrans.app (G.mapCone c).π WalkingCospan.right)\n      (NatTrans.app (G.mapCone c).π WalkingCospan.left)\n      (_ :\n        NatTrans.app (G.mapCone c).π WalkingCospan.right ≫ (cospan g f ⋙ G).map WalkingCospan.Hom.inr =\n          NatTrans.app (G.mapCone c).π WalkingCospan.left ≫ (cospan g f ⋙ G).map WalkingCospan.Hom.inl))\n[PROOFSTEP]\napply (isLimitMapConePullbackConeEquiv _ _).toFun\n[GOAL]\ncase t\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\nc : Cone (cospan g f)\nhc : IsLimit c\n⊢ IsLimit\n    (G.mapCone (PullbackCone.mk (NatTrans.app c.π WalkingCospan.right) (NatTrans.app c.π WalkingCospan.left) ?m.19346))\n[PROOFSTEP]\nrefine @PreservesLimit.preserves _ _ _ _ _ _ _ _ ?_ _ ?_\n[GOAL]\ncase t.refine_1\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\nc : Cone (cospan g f)\nhc : IsLimit c\n⊢ PreservesLimit (cospan ((cospan g f).map WalkingCospan.Hom.inr) ((cospan g f).map WalkingCospan.Hom.inl)) G\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase t.refine_1\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\nc : Cone (cospan g f)\nhc : IsLimit c\n⊢ PreservesLimit (cospan f g) G\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase t.refine_2\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\nc : Cone (cospan g f)\nhc : IsLimit c\n⊢ IsLimit (PullbackCone.mk (NatTrans.app c.π WalkingCospan.right) (NatTrans.app c.π WalkingCospan.left) ?m.19346)\n[PROOFSTEP]\napply PullbackCone.flipIsLimit\n[GOAL]\ncase t.refine_2.t\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\nc : Cone (cospan g f)\nhc : IsLimit c\n⊢ IsLimit\n    (PullbackCone.mk (NatTrans.app c.π WalkingCospan.left) (NatTrans.app c.π WalkingCospan.right)\n      (_ :\n        NatTrans.app c.π WalkingCospan.left ≫ (cospan g f).map WalkingCospan.Hom.inl =\n          NatTrans.app c.π WalkingCospan.right ≫ (cospan g f).map WalkingCospan.Hom.inr))\n[PROOFSTEP]\napply IsLimit.ofIsoLimit _ (PullbackCone.isoMk _)\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\nc : Cone (cospan g f)\nhc : IsLimit c\n⊢ IsLimit ((Cones.postcompose (diagramIsoCospan (cospan g f)).hom).obj c)\n[PROOFSTEP]\nexact (IsLimit.postcomposeHomEquiv (diagramIsoCospan.{v₁} _) _).invFun hc\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝ : PreservesLimit (cospan f g) G\nc : Cone (cospan g f)\nhc : IsLimit c\n⊢ NatTrans.app c.π WalkingCospan.right ≫ (cospan g f).map WalkingCospan.Hom.inr =\n    NatTrans.app c.π WalkingCospan.left ≫ (cospan g f).map WalkingCospan.Hom.inl\n[PROOFSTEP]\nexact (c.π.naturality WalkingCospan.Hom.inr).symm.trans (c.π.naturality WalkingCospan.Hom.inl : _)\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝² : PreservesLimit (cospan f g) G\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback (G.map f) (G.map g)\n⊢ (iso G f g).hom ≫ pullback.fst = G.map pullback.fst\n[PROOFSTEP]\nsimp [PreservesPullback.iso]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝² : PreservesLimit (cospan f g) G\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback (G.map f) (G.map g)\n⊢ (iso G f g).hom ≫ pullback.snd = G.map pullback.snd\n[PROOFSTEP]\nsimp [PreservesPullback.iso]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝² : PreservesLimit (cospan f g) G\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback (G.map f) (G.map g)\n⊢ (iso G f g).inv ≫ G.map pullback.fst = pullback.fst\n[PROOFSTEP]\nsimp [PreservesPullback.iso, Iso.inv_comp_eq]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\nh : W ⟶ X\nk : W ⟶ Y\ncomm : h ≫ f = k ≫ g\ninst✝² : PreservesLimit (cospan f g) G\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback (G.map f) (G.map g)\n⊢ (iso G f g).inv ≫ G.map pullback.snd = pullback.snd\n[PROOFSTEP]\nsimp [PreservesPullback.iso, Iso.inv_comp_eq]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\n⊢ G.map f ≫ G.map h = G.map g ≫ G.map k\n[PROOFSTEP]\nsimp only [← G.map_comp, comm]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\n⊢ ∀ (j : WalkingSpan),\n    NatTrans.app\n          ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj\n              (G.mapCocone (PushoutCocone.mk h k comm))).ι\n          j ≫\n        (Iso.refl\n            ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj\n                (G.mapCocone (PushoutCocone.mk h k comm))).pt).hom =\n      NatTrans.app (PushoutCocone.mk (G.map h) (G.map k) (_ : G.map f ≫ G.map h = G.map g ≫ G.map k)).ι j\n[PROOFSTEP]\nrintro (_ | _ | _)\n[GOAL]\ncase none\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\n⊢ NatTrans.app\n        ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ι\n        none ≫\n      (Iso.refl\n          ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj\n              (G.mapCocone (PushoutCocone.mk h k comm))).pt).hom =\n    NatTrans.app (PushoutCocone.mk (G.map h) (G.map k) (_ : G.map f ≫ G.map h = G.map g ≫ G.map k)).ι none\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some.left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\n⊢ NatTrans.app\n        ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ι\n        (some WalkingPair.left) ≫\n      (Iso.refl\n          ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj\n              (G.mapCocone (PushoutCocone.mk h k comm))).pt).hom =\n    NatTrans.app (PushoutCocone.mk (G.map h) (G.map k) (_ : G.map f ≫ G.map h = G.map g ≫ G.map k)).ι\n      (some WalkingPair.left)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some.right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\n⊢ NatTrans.app\n        ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ι\n        (some WalkingPair.right) ≫\n      (Iso.refl\n          ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj\n              (G.mapCocone (PushoutCocone.mk h k comm))).pt).hom =\n    NatTrans.app (PushoutCocone.mk (G.map h) (G.map k) (_ : G.map f ≫ G.map h = G.map g ≫ G.map k)).ι\n      (some WalkingPair.right)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase none\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\n⊢ (𝟙 (G.obj W) ≫ G.map (f ≫ h)) ≫ 𝟙 (G.obj Z) = G.map f ≫ G.map h\n[PROOFSTEP]\nsimp only [Category.comp_id, Category.id_comp, ← G.map_comp]\n[GOAL]\ncase some.left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\n⊢ (𝟙 (G.obj X) ≫ G.map h) ≫ 𝟙 (G.obj Z) = G.map h\n[PROOFSTEP]\nsimp only [Category.comp_id, Category.id_comp, ← G.map_comp]\n[GOAL]\ncase some.right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\n⊢ (𝟙 (G.obj Y) ≫ G.map k) ≫ 𝟙 (G.obj Z) = G.map k\n[PROOFSTEP]\nsimp only [Category.comp_id, Category.id_comp, ← G.map_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\nl : IsColimit (PushoutCocone.mk h k comm)\n⊢ G.map f ≫ G.map h = G.map g ≫ G.map k\n[PROOFSTEP]\nsimp only [← G.map_comp, comm]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : ReflectsColimit (span f g) G\n⊢ G.map f ≫ G.map h = G.map g ≫ G.map k\n[PROOFSTEP]\nsimp only [← G.map_comp, comm]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\ni : HasPushout f g\n⊢ G.map f ≫ G.map pushout.inl = G.map g ≫ G.map pushout.inr\n[PROOFSTEP]\nsimp only [← G.map_comp, pushout.condition]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\nc : Cocone (span g f)\nhc : IsColimit c\n⊢ IsColimit (G.mapCocone c)\n[PROOFSTEP]\napply (IsColimit.precomposeHomEquiv (diagramIsoSpan.{v₂} _).symm _).toFun\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\nc : Cocone (span g f)\nhc : IsColimit c\n⊢ IsColimit ((Cocones.precompose (diagramIsoSpan (span g f ⋙ G)).symm.hom).obj (G.mapCocone c))\n[PROOFSTEP]\napply IsColimit.ofIsoColimit _ (PushoutCocone.isoMk _).symm\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\nc : Cocone (span g f)\nhc : IsColimit c\n⊢ IsColimit\n    (PushoutCocone.mk (NatTrans.app (G.mapCocone c).ι WalkingSpan.left)\n      (NatTrans.app (G.mapCocone c).ι WalkingSpan.right)\n      (_ :\n        (span g f ⋙ G).map WalkingSpan.Hom.fst ≫ NatTrans.app (G.mapCocone c).ι WalkingSpan.left =\n          (span g f ⋙ G).map WalkingSpan.Hom.snd ≫ NatTrans.app (G.mapCocone c).ι WalkingSpan.right))\n[PROOFSTEP]\napply PushoutCocone.flipIsColimit\n[GOAL]\ncase t\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\nc : Cocone (span g f)\nhc : IsColimit c\n⊢ IsColimit\n    (PushoutCocone.mk (NatTrans.app (G.mapCocone c).ι WalkingSpan.right)\n      (NatTrans.app (G.mapCocone c).ι WalkingSpan.left)\n      (_ :\n        (span g f ⋙ G).map WalkingSpan.Hom.snd ≫ NatTrans.app (G.mapCocone c).ι WalkingSpan.right =\n          (span g f ⋙ G).map WalkingSpan.Hom.fst ≫ NatTrans.app (G.mapCocone c).ι WalkingSpan.left))\n[PROOFSTEP]\napply (isColimitMapCoconePushoutCoconeEquiv _ _).toFun\n[GOAL]\ncase t\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\nc : Cocone (span g f)\nhc : IsColimit c\n⊢ IsColimit\n    (G.mapCocone (PushoutCocone.mk (NatTrans.app c.ι WalkingSpan.right) (NatTrans.app c.ι WalkingSpan.left) ?m.60067))\n[PROOFSTEP]\nrefine\n  @PreservesColimit.preserves _ _ _ _ _ _ _ _ ?_ _\n    ?_\n      -- Porting note: more TC coddling\n[GOAL]\ncase t.refine_1\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\nc : Cocone (span g f)\nhc : IsColimit c\n⊢ PreservesColimit (span ((span g f).map WalkingSpan.Hom.snd) ((span g f).map WalkingSpan.Hom.fst)) G\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase t.refine_1\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\nc : Cocone (span g f)\nhc : IsColimit c\n⊢ PreservesColimit (span f g) G\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase t.refine_2\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\nc : Cocone (span g f)\nhc : IsColimit c\n⊢ IsColimit (PushoutCocone.mk (NatTrans.app c.ι WalkingSpan.right) (NatTrans.app c.ι WalkingSpan.left) ?m.60067)\n[PROOFSTEP]\napply PushoutCocone.flipIsColimit\n[GOAL]\ncase t.refine_2.t\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\nc : Cocone (span g f)\nhc : IsColimit c\n⊢ IsColimit\n    (PushoutCocone.mk (NatTrans.app c.ι WalkingSpan.left) (NatTrans.app c.ι WalkingSpan.right)\n      (_ :\n        (span g f).map WalkingSpan.Hom.fst ≫ NatTrans.app c.ι WalkingSpan.left =\n          (span g f).map WalkingSpan.Hom.snd ≫ NatTrans.app c.ι WalkingSpan.right))\n[PROOFSTEP]\napply IsColimit.ofIsoColimit _ (PushoutCocone.isoMk _)\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\nc : Cocone (span g f)\nhc : IsColimit c\n⊢ IsColimit ((Cocones.precompose (diagramIsoSpan (span g f)).inv).obj c)\n[PROOFSTEP]\nexact (IsColimit.precomposeHomEquiv (diagramIsoSpan.{v₁} _) _).invFun hc\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝ : PreservesColimit (span f g) G\nc : Cocone (span g f)\nhc : IsColimit c\n⊢ (span g f).map WalkingSpan.Hom.snd ≫ NatTrans.app c.ι WalkingSpan.right =\n    (span g f).map WalkingSpan.Hom.fst ≫ NatTrans.app c.ι WalkingSpan.left\n[PROOFSTEP]\nexact (c.ι.naturality WalkingSpan.Hom.snd).trans (c.ι.naturality WalkingSpan.Hom.fst).symm\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝² : PreservesColimit (span f g) G\ninst✝¹ : HasPushout f g\ninst✝ : HasPushout (G.map f) (G.map g)\n⊢ pushout.inl ≫ (iso G f g).hom = G.map pushout.inl\n[PROOFSTEP]\ndelta PreservesPushout.iso\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝² : PreservesColimit (span f g) G\ninst✝¹ : HasPushout f g\ninst✝ : HasPushout (G.map f) (G.map g)\n⊢ pushout.inl ≫\n      (IsColimit.coconePointUniqueUpToIso (colimit.isColimit (span (G.map f) (G.map g)))\n          (isColimitOfHasPushoutOfPreservesColimit G f g)).hom =\n    G.map pushout.inl\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝² : PreservesColimit (span f g) G\ninst✝¹ : HasPushout f g\ninst✝ : HasPushout (G.map f) (G.map g)\n⊢ pushout.inr ≫ (iso G f g).hom = G.map pushout.inr\n[PROOFSTEP]\ndelta PreservesPushout.iso\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝² : PreservesColimit (span f g) G\ninst✝¹ : HasPushout f g\ninst✝ : HasPushout (G.map f) (G.map g)\n⊢ pushout.inr ≫\n      (IsColimit.coconePointUniqueUpToIso (colimit.isColimit (span (G.map f) (G.map g)))\n          (isColimitOfHasPushoutOfPreservesColimit G f g)).hom =\n    G.map pushout.inr\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝² : PreservesColimit (span f g) G\ninst✝¹ : HasPushout f g\ninst✝ : HasPushout (G.map f) (G.map g)\n⊢ G.map pushout.inl ≫ (iso G f g).inv = pushout.inl\n[PROOFSTEP]\nsimp [PreservesPushout.iso, Iso.comp_inv_eq]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nW X Y Z : C\nh : X ⟶ Z\nk : Y ⟶ Z\nf : W ⟶ X\ng : W ⟶ Y\ncomm : f ≫ h = g ≫ k\ninst✝² : PreservesColimit (span f g) G\ninst✝¹ : HasPushout f g\ninst✝ : HasPushout (G.map f) (G.map g)\n⊢ G.map pushout.inr ≫ (iso G f g).inv = pushout.inr\n[PROOFSTEP]\nsimp [PreservesPushout.iso, Iso.comp_inv_eq]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\nG : C ⥤ D\nX Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback (G.map f) (G.map g)\ni : IsIso (pullbackComparison G f g)\n⊢ PreservesLimit (cospan f g) G\n[PROOFSTEP]\napply preservesLimitOfPreservesLimitCone (pullbackIsPullback f g)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\nG : C ⥤ D\nX Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback (G.map f) (G.map g)\ni : IsIso (pullbackComparison G f g)\n⊢ IsLimit (G.mapCone (PullbackCone.mk pullback.fst pullback.snd (_ : pullback.fst ≫ f = pullback.snd ≫ g)))\n[PROOFSTEP]\napply (isLimitMapConePullbackConeEquiv _ _).symm _\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\nG : C ⥤ D\nX Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback (G.map f) (G.map g)\ni : IsIso (pullbackComparison G f g)\n⊢ IsLimit\n    (PullbackCone.mk (G.map pullback.fst) (G.map pullback.snd)\n      (_ : G.map pullback.fst ≫ G.map f = G.map pullback.snd ≫ G.map g))\n[PROOFSTEP]\nrefine @IsLimit.ofPointIso _ _ _ _ _ _ _ (limit.isLimit (cospan (G.map f) (G.map g))) ?_\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\nG : C ⥤ D\nX Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback (G.map f) (G.map g)\ni : IsIso (pullbackComparison G f g)\n⊢ IsIso\n    (IsLimit.lift (limit.isLimit (cospan (G.map f) (G.map g)))\n      (PullbackCone.mk (G.map pullback.fst) (G.map pullback.snd)\n        (_ : G.map pullback.fst ≫ G.map f = G.map pullback.snd ≫ G.map g)))\n[PROOFSTEP]\napply i\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₁, u₂} D\nG : C ⥤ D\nX Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\ninst✝² : HasPullback f g\ninst✝¹ : HasPullback (G.map f) (G.map g)\ninst✝ : PreservesLimit (cospan f g) G\n⊢ IsIso (pullbackComparison G f g)\n[PROOFSTEP]\nrw [← PreservesPullback.iso_hom]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₁, u₂} D\nG : C ⥤ D\nX Y Z : C\nf : X ⟶ Z\ng : Y ⟶ Z\ninst✝² : HasPullback f g\ninst✝¹ : HasPullback (G.map f) (G.map g)\ninst✝ : PreservesLimit (cospan f g) G\n⊢ IsIso (PreservesPullback.iso G f g).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\nG : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : X ⟶ Z\ninst✝¹ : HasPushout f g\ninst✝ : HasPushout (G.map f) (G.map g)\ni : IsIso (pushoutComparison G f g)\n⊢ PreservesColimit (span f g) G\n[PROOFSTEP]\napply preservesColimitOfPreservesColimitCocone (pushoutIsPushout f g)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\nG : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : X ⟶ Z\ninst✝¹ : HasPushout f g\ninst✝ : HasPushout (G.map f) (G.map g)\ni : IsIso (pushoutComparison G f g)\n⊢ IsColimit (G.mapCocone (PushoutCocone.mk pushout.inl pushout.inr (_ : f ≫ pushout.inl = g ≫ pushout.inr)))\n[PROOFSTEP]\napply\n  (isColimitMapCoconePushoutCoconeEquiv _ _).symm\n    _\n      -- Porting note: apply no longer creates goals for instances\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\nG : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : X ⟶ Z\ninst✝¹ : HasPushout f g\ninst✝ : HasPushout (G.map f) (G.map g)\ni : IsIso (pushoutComparison G f g)\n⊢ IsColimit\n    (PushoutCocone.mk (G.map pushout.inl) (G.map pushout.inr)\n      (_ : G.map f ≫ G.map pushout.inl = G.map g ≫ G.map pushout.inr))\n[PROOFSTEP]\nrefine @IsColimit.ofPointIso _ _ _ _ _ _ _ (colimit.isColimit (span (G.map f) (G.map g))) ?_\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\nG : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : X ⟶ Z\ninst✝¹ : HasPushout f g\ninst✝ : HasPushout (G.map f) (G.map g)\ni : IsIso (pushoutComparison G f g)\n⊢ IsIso\n    (IsColimit.desc (colimit.isColimit (span (G.map f) (G.map g)))\n      (PushoutCocone.mk (G.map pushout.inl) (G.map pushout.inr)\n        (_ : G.map f ≫ G.map pushout.inl = G.map g ≫ G.map pushout.inr)))\n[PROOFSTEP]\napply i\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₁, u₂} D\nG : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : X ⟶ Z\ninst✝² : HasPushout f g\ninst✝¹ : HasPushout (G.map f) (G.map g)\ninst✝ : PreservesColimit (span f g) G\n⊢ IsIso (pushoutComparison G f g)\n[PROOFSTEP]\nrw [← PreservesPushout.iso_hom]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₁, u₂} D\nG : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : X ⟶ Z\ninst✝² : HasPushout f g\ninst✝¹ : HasPushout (G.map f) (G.map g)\ninst✝ : PreservesColimit (span f g) G\n⊢ IsIso (PreservesPushout.iso G f g).hom\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Preserves.Shapes.Pullbacks", "llama_tokens": 14625, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506526772884, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.39220662542812024}}
{"text": "[GOAL]\nα : Type u_1\ninst✝³ : CompleteLattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ns✝ t s : Set α\n⊢ sSup s⁻¹ = (sInf s)⁻¹\n[PROOFSTEP]\nrw [← image_inv, sSup_image]\n[GOAL]\nα : Type u_1\ninst✝³ : CompleteLattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ns✝ t s : Set α\n⊢ ⨆ (a : α) (_ : a ∈ s), a⁻¹ = (sInf s)⁻¹\n[PROOFSTEP]\nexact ((OrderIso.inv α).map_sInf _).symm\n[GOAL]\nα : Type u_1\ninst✝³ : CompleteLattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ns✝ t s : Set α\n⊢ sInf s⁻¹ = (sSup s)⁻¹\n[PROOFSTEP]\nrw [← image_inv, sInf_image]\n[GOAL]\nα : Type u_1\ninst✝³ : CompleteLattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ns✝ t s : Set α\n⊢ ⨅ (a : α) (_ : a ∈ s), a⁻¹ = (sSup s)⁻¹\n[PROOFSTEP]\nexact ((OrderIso.inv α).map_sSup _).symm\n[GOAL]\nα : Type u_1\ninst✝³ : CompleteLattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ns t : Set α\n⊢ sSup (s / t) = sSup s / sInf t\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, sSup_mul, sSup_inv]\n[GOAL]\nα : Type u_1\ninst✝³ : CompleteLattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ns t : Set α\n⊢ sInf (s / t) = sInf s / sSup t\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, sInf_mul, sInf_inv]\n[GOAL]\nα : Type u_1\ninst✝³ : ConditionallyCompleteLattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ns t : Set α\nhs₀ : Set.Nonempty s\nhs₁ : BddBelow s\n⊢ sSup s⁻¹ = (sInf s)⁻¹\n[PROOFSTEP]\nrw [← image_inv]\n[GOAL]\nα : Type u_1\ninst✝³ : ConditionallyCompleteLattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ns t : Set α\nhs₀ : Set.Nonempty s\nhs₁ : BddBelow s\n⊢ sSup (Inv.inv '' s) = (sInf s)⁻¹\n[PROOFSTEP]\nexact ((OrderIso.inv α).map_csInf' hs₀ hs₁).symm\n[GOAL]\nα : Type u_1\ninst✝³ : ConditionallyCompleteLattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ns t : Set α\nhs₀ : Set.Nonempty s\nhs₁ : BddAbove s\n⊢ sInf s⁻¹ = (sSup s)⁻¹\n[PROOFSTEP]\nrw [← image_inv]\n[GOAL]\nα : Type u_1\ninst✝³ : ConditionallyCompleteLattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ns t : Set α\nhs₀ : Set.Nonempty s\nhs₁ : BddAbove s\n⊢ sInf (Inv.inv '' s) = (sSup s)⁻¹\n[PROOFSTEP]\nexact ((OrderIso.inv α).map_csSup' hs₀ hs₁).symm\n[GOAL]\nα : Type u_1\ninst✝³ : ConditionallyCompleteLattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ns t : Set α\nhs₀ : Set.Nonempty s\nhs₁ : BddAbove s\nht₀ : Set.Nonempty t\nht₁ : BddBelow t\n⊢ sSup (s / t) = sSup s / sInf t\n[PROOFSTEP]\nrw [div_eq_mul_inv, csSup_mul hs₀ hs₁ ht₀.inv ht₁.inv, csSup_inv ht₀ ht₁, div_eq_mul_inv]\n[GOAL]\nα : Type u_1\ninst✝³ : ConditionallyCompleteLattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ns t : Set α\nhs₀ : Set.Nonempty s\nhs₁ : BddBelow s\nht₀ : Set.Nonempty t\nht₁ : BddAbove t\n⊢ sInf (s / t) = sInf s / sSup t\n[PROOFSTEP]\nrw [div_eq_mul_inv, csInf_mul hs₀ hs₁ ht₀.inv ht₁.inv, csInf_inv ht₀ ht₁, div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\n⊢ r • Ioo a b = Ioo (r • a) (r • b)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ x ∈ r • Ioo a b ↔ x ∈ Ioo (r • a) (r • b)\n[PROOFSTEP]\nsimp only [mem_smul_set, smul_eq_mul, mem_Ioo]\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, (a < y ∧ y < b) ∧ r * y = x) ↔ r * a < x ∧ x < r * b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, (a < y ∧ y < b) ∧ r * y = x) → r * a < x ∧ x < r * b\n[PROOFSTEP]\nrintro ⟨a, ⟨a_h_left_left, a_h_left_right⟩, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ < a\na_h_left_right : a < b\n⊢ r * a✝ < r * a ∧ r * a < r * b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp.intro.intro.intro.left\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ < a\na_h_left_right : a < b\n⊢ r * a✝ < r * a\ncase h.mp.intro.intro.intro.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ < a\na_h_left_right : a < b\n⊢ r * a < r * b\n[PROOFSTEP]\nexact (mul_lt_mul_left hr).mpr a_h_left_left\n[GOAL]\ncase h.mp.intro.intro.intro.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ < a\na_h_left_right : a < b\n⊢ r * a < r * b\n[PROOFSTEP]\nexact (mul_lt_mul_left hr).mpr a_h_left_right\n[GOAL]\ncase h.mpr\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ r * a < x ∧ x < r * b → ∃ y, (a < y ∧ y < b) ∧ r * y = x\n[PROOFSTEP]\nrintro ⟨a_left, a_right⟩\n[GOAL]\ncase h.mpr.intro\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\na_left : r * a < x\na_right : x < r * b\n⊢ ∃ y, (a < y ∧ y < b) ∧ r * y = x\n[PROOFSTEP]\nuse x / r\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\na_left : r * a < x\na_right : x < r * b\n⊢ (a < x / r ∧ x / r < b) ∧ r * (x / r) = x\n[PROOFSTEP]\nrefine' ⟨⟨(lt_div_iff' hr).mpr a_left, (div_lt_iff' hr).mpr a_right⟩, _⟩\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\na_left : r * a < x\na_right : x < r * b\n⊢ r * (x / r) = x\n[PROOFSTEP]\nrw [mul_div_cancel' _ (ne_of_gt hr)]\n[GOAL]\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\n⊢ r • Icc a b = Icc (r • a) (r • b)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ x ∈ r • Icc a b ↔ x ∈ Icc (r • a) (r • b)\n[PROOFSTEP]\nsimp only [mem_smul_set, smul_eq_mul, mem_Icc]\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, (a ≤ y ∧ y ≤ b) ∧ r * y = x) ↔ r * a ≤ x ∧ x ≤ r * b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, (a ≤ y ∧ y ≤ b) ∧ r * y = x) → r * a ≤ x ∧ x ≤ r * b\n[PROOFSTEP]\nrintro ⟨a, ⟨a_h_left_left, a_h_left_right⟩, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ ≤ a\na_h_left_right : a ≤ b\n⊢ r * a✝ ≤ r * a ∧ r * a ≤ r * b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp.intro.intro.intro.left\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ ≤ a\na_h_left_right : a ≤ b\n⊢ r * a✝ ≤ r * a\ncase h.mp.intro.intro.intro.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ ≤ a\na_h_left_right : a ≤ b\n⊢ r * a ≤ r * b\n[PROOFSTEP]\nexact (mul_le_mul_left hr).mpr a_h_left_left\n[GOAL]\ncase h.mp.intro.intro.intro.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ ≤ a\na_h_left_right : a ≤ b\n⊢ r * a ≤ r * b\n[PROOFSTEP]\nexact (mul_le_mul_left hr).mpr a_h_left_right\n[GOAL]\ncase h.mpr\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ r * a ≤ x ∧ x ≤ r * b → ∃ y, (a ≤ y ∧ y ≤ b) ∧ r * y = x\n[PROOFSTEP]\nrintro ⟨a_left, a_right⟩\n[GOAL]\ncase h.mpr.intro\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\na_left : r * a ≤ x\na_right : x ≤ r * b\n⊢ ∃ y, (a ≤ y ∧ y ≤ b) ∧ r * y = x\n[PROOFSTEP]\nuse x / r\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\na_left : r * a ≤ x\na_right : x ≤ r * b\n⊢ (a ≤ x / r ∧ x / r ≤ b) ∧ r * (x / r) = x\n[PROOFSTEP]\nrefine' ⟨⟨(le_div_iff' hr).mpr a_left, (div_le_iff' hr).mpr a_right⟩, _⟩\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\na_left : r * a ≤ x\na_right : x ≤ r * b\n⊢ r * (x / r) = x\n[PROOFSTEP]\nrw [mul_div_cancel' _ (ne_of_gt hr)]\n[GOAL]\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\n⊢ r • Ico a b = Ico (r • a) (r • b)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ x ∈ r • Ico a b ↔ x ∈ Ico (r • a) (r • b)\n[PROOFSTEP]\nsimp only [mem_smul_set, smul_eq_mul, mem_Ico]\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, (a ≤ y ∧ y < b) ∧ r * y = x) ↔ r * a ≤ x ∧ x < r * b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, (a ≤ y ∧ y < b) ∧ r * y = x) → r * a ≤ x ∧ x < r * b\n[PROOFSTEP]\nrintro ⟨a, ⟨a_h_left_left, a_h_left_right⟩, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ ≤ a\na_h_left_right : a < b\n⊢ r * a✝ ≤ r * a ∧ r * a < r * b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp.intro.intro.intro.left\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ ≤ a\na_h_left_right : a < b\n⊢ r * a✝ ≤ r * a\ncase h.mp.intro.intro.intro.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ ≤ a\na_h_left_right : a < b\n⊢ r * a < r * b\n[PROOFSTEP]\nexact (mul_le_mul_left hr).mpr a_h_left_left\n[GOAL]\ncase h.mp.intro.intro.intro.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ ≤ a\na_h_left_right : a < b\n⊢ r * a < r * b\n[PROOFSTEP]\nexact (mul_lt_mul_left hr).mpr a_h_left_right\n[GOAL]\ncase h.mpr\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ r * a ≤ x ∧ x < r * b → ∃ y, (a ≤ y ∧ y < b) ∧ r * y = x\n[PROOFSTEP]\nrintro ⟨a_left, a_right⟩\n[GOAL]\ncase h.mpr.intro\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\na_left : r * a ≤ x\na_right : x < r * b\n⊢ ∃ y, (a ≤ y ∧ y < b) ∧ r * y = x\n[PROOFSTEP]\nuse x / r\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\na_left : r * a ≤ x\na_right : x < r * b\n⊢ (a ≤ x / r ∧ x / r < b) ∧ r * (x / r) = x\n[PROOFSTEP]\nrefine' ⟨⟨(le_div_iff' hr).mpr a_left, (div_lt_iff' hr).mpr a_right⟩, _⟩\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\na_left : r * a ≤ x\na_right : x < r * b\n⊢ r * (x / r) = x\n[PROOFSTEP]\nrw [mul_div_cancel' _ (ne_of_gt hr)]\n[GOAL]\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\n⊢ r • Ioc a b = Ioc (r • a) (r • b)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ x ∈ r • Ioc a b ↔ x ∈ Ioc (r • a) (r • b)\n[PROOFSTEP]\nsimp only [mem_smul_set, smul_eq_mul, mem_Ioc]\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, (a < y ∧ y ≤ b) ∧ r * y = x) ↔ r * a < x ∧ x ≤ r * b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, (a < y ∧ y ≤ b) ∧ r * y = x) → r * a < x ∧ x ≤ r * b\n[PROOFSTEP]\nrintro ⟨a, ⟨a_h_left_left, a_h_left_right⟩, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ < a\na_h_left_right : a ≤ b\n⊢ r * a✝ < r * a ∧ r * a ≤ r * b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp.intro.intro.intro.left\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ < a\na_h_left_right : a ≤ b\n⊢ r * a✝ < r * a\ncase h.mp.intro.intro.intro.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ < a\na_h_left_right : a ≤ b\n⊢ r * a ≤ r * b\n[PROOFSTEP]\nexact (mul_lt_mul_left hr).mpr a_h_left_left\n[GOAL]\ncase h.mp.intro.intro.intro.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na✝ b r : K\nhr : 0 < r\na : K\na_h_left_left : a✝ < a\na_h_left_right : a ≤ b\n⊢ r * a ≤ r * b\n[PROOFSTEP]\nexact (mul_le_mul_left hr).mpr a_h_left_right\n[GOAL]\ncase h.mpr\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ r * a < x ∧ x ≤ r * b → ∃ y, (a < y ∧ y ≤ b) ∧ r * y = x\n[PROOFSTEP]\nrintro ⟨a_left, a_right⟩\n[GOAL]\ncase h.mpr.intro\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\na_left : r * a < x\na_right : x ≤ r * b\n⊢ ∃ y, (a < y ∧ y ≤ b) ∧ r * y = x\n[PROOFSTEP]\nuse x / r\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\na_left : r * a < x\na_right : x ≤ r * b\n⊢ (a < x / r ∧ x / r ≤ b) ∧ r * (x / r) = x\n[PROOFSTEP]\nrefine' ⟨⟨(lt_div_iff' hr).mpr a_left, (div_le_iff' hr).mpr a_right⟩, _⟩\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\na_left : r * a < x\na_right : x ≤ r * b\n⊢ r * (x / r) = x\n[PROOFSTEP]\nrw [mul_div_cancel' _ (ne_of_gt hr)]\n[GOAL]\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\n⊢ r • Ioi a = Ioi (r • a)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ x ∈ r • Ioi a ↔ x ∈ Ioi (r • a)\n[PROOFSTEP]\nsimp only [mem_smul_set, smul_eq_mul, mem_Ioi]\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, a < y ∧ r * y = x) ↔ r * a < x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, a < y ∧ r * y = x) → r * a < x\n[PROOFSTEP]\nrintro ⟨a_w, a_h_left, rfl⟩\n[GOAL]\ncase h.mp.intro.intro\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\na_w : K\na_h_left : a < a_w\n⊢ r * a < r * a_w\n[PROOFSTEP]\nexact (mul_lt_mul_left hr).mpr a_h_left\n[GOAL]\ncase h.mpr\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ r * a < x → ∃ y, a < y ∧ r * y = x\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase h.mpr\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : r * a < x\n⊢ ∃ y, a < y ∧ r * y = x\n[PROOFSTEP]\nuse x / r\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : r * a < x\n⊢ a < x / r ∧ r * (x / r) = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : r * a < x\n⊢ a < x / r\ncase h.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : r * a < x\n⊢ r * (x / r) = x\n[PROOFSTEP]\nexact (lt_div_iff' hr).mpr h\n[GOAL]\ncase h.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : r * a < x\n⊢ r * (x / r) = x\n[PROOFSTEP]\nexact mul_div_cancel' _ (ne_of_gt hr)\n[GOAL]\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\n⊢ r • Iio a = Iio (r • a)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ x ∈ r • Iio a ↔ x ∈ Iio (r • a)\n[PROOFSTEP]\nsimp only [mem_smul_set, smul_eq_mul, mem_Iio]\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, y < a ∧ r * y = x) ↔ x < r * a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, y < a ∧ r * y = x) → x < r * a\n[PROOFSTEP]\nrintro ⟨a_w, a_h_left, rfl⟩\n[GOAL]\ncase h.mp.intro.intro\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\na_w : K\na_h_left : a_w < a\n⊢ r * a_w < r * a\n[PROOFSTEP]\nexact (mul_lt_mul_left hr).mpr a_h_left\n[GOAL]\ncase h.mpr\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ x < r * a → ∃ y, y < a ∧ r * y = x\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase h.mpr\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x < r * a\n⊢ ∃ y, y < a ∧ r * y = x\n[PROOFSTEP]\nuse x / r\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x < r * a\n⊢ x / r < a ∧ r * (x / r) = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x < r * a\n⊢ x / r < a\ncase h.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x < r * a\n⊢ r * (x / r) = x\n[PROOFSTEP]\nexact (div_lt_iff' hr).mpr h\n[GOAL]\ncase h.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x < r * a\n⊢ r * (x / r) = x\n[PROOFSTEP]\nexact mul_div_cancel' _ (ne_of_gt hr)\n[GOAL]\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\n⊢ r • Ici a = Ici (r • a)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ x ∈ r • Ici a ↔ x ∈ Ici (r • a)\n[PROOFSTEP]\nsimp only [mem_smul_set, smul_eq_mul, mem_Ioi]\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, y ∈ Ici a ∧ r * y = x) ↔ x ∈ Ici (r * a)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, y ∈ Ici a ∧ r * y = x) → x ∈ Ici (r * a)\n[PROOFSTEP]\nrintro ⟨a_w, a_h_left, rfl⟩\n[GOAL]\ncase h.mp.intro.intro\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\na_w : K\na_h_left : a_w ∈ Ici a\n⊢ r * a_w ∈ Ici (r * a)\n[PROOFSTEP]\nexact (mul_le_mul_left hr).mpr a_h_left\n[GOAL]\ncase h.mpr\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ x ∈ Ici (r * a) → ∃ y, y ∈ Ici a ∧ r * y = x\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase h.mpr\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x ∈ Ici (r * a)\n⊢ ∃ y, y ∈ Ici a ∧ r * y = x\n[PROOFSTEP]\nuse x / r\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x ∈ Ici (r * a)\n⊢ x / r ∈ Ici a ∧ r * (x / r) = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x ∈ Ici (r * a)\n⊢ x / r ∈ Ici a\ncase h.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x ∈ Ici (r * a)\n⊢ r * (x / r) = x\n[PROOFSTEP]\nexact (le_div_iff' hr).mpr h\n[GOAL]\ncase h.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x ∈ Ici (r * a)\n⊢ r * (x / r) = x\n[PROOFSTEP]\nexact mul_div_cancel' _ (ne_of_gt hr)\n[GOAL]\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\n⊢ r • Iic a = Iic (r • a)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ x ∈ r • Iic a ↔ x ∈ Iic (r • a)\n[PROOFSTEP]\nsimp only [mem_smul_set, smul_eq_mul, mem_Iio]\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, y ∈ Iic a ∧ r * y = x) ↔ x ∈ Iic (r * a)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ (∃ y, y ∈ Iic a ∧ r * y = x) → x ∈ Iic (r * a)\n[PROOFSTEP]\nrintro ⟨a_w, a_h_left, rfl⟩\n[GOAL]\ncase h.mp.intro.intro\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\na_w : K\na_h_left : a_w ∈ Iic a\n⊢ r * a_w ∈ Iic (r * a)\n[PROOFSTEP]\nexact (mul_le_mul_left hr).mpr a_h_left\n[GOAL]\ncase h.mpr\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\n⊢ x ∈ Iic (r * a) → ∃ y, y ∈ Iic a ∧ r * y = x\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase h.mpr\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x ∈ Iic (r * a)\n⊢ ∃ y, y ∈ Iic a ∧ r * y = x\n[PROOFSTEP]\nuse x / r\n[GOAL]\ncase h\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x ∈ Iic (r * a)\n⊢ x / r ∈ Iic a ∧ r * (x / r) = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x ∈ Iic (r * a)\n⊢ x / r ∈ Iic a\ncase h.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x ∈ Iic (r * a)\n⊢ r * (x / r) = x\n[PROOFSTEP]\nexact (div_le_iff' hr).mpr h\n[GOAL]\ncase h.right\nα : Type u_1\nK : Type u_2\ninst✝ : LinearOrderedField K\na b r : K\nhr : 0 < r\nx : K\nh : x ∈ Iic (r * a)\n⊢ r * (x / r) = x\n[PROOFSTEP]\nexact mul_div_cancel' _ (ne_of_gt hr)\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Pointwise", "llama_tokens": 11612, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7549149868676283, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.3921944319389172}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\n⊢ IsChain r univ ↔ IsTrichotomous α r\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨fun a b => _⟩, fun h => @isChain_of_trichotomous _ _ h univ⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na✝ b✝ x y : α\nh : IsChain r univ\na b : α\n⊢ r a b ∨ a = b ∨ r b a\n[PROOFSTEP]\nrw [or_left_comm, or_iff_not_imp_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na✝ b✝ x y : α\nh : IsChain r univ\na b : α\n⊢ ¬a = b → r a b ∨ r b a\n[PROOFSTEP]\nexact h trivial trivial\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\nf : α → β\nhf : Monotone f\n⊢ IsChain (fun x x_1 => x ≤ x_1) (range f)\n[PROOFSTEP]\nrw [← image_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\nf : α → β\nhf : Monotone f\n⊢ IsChain (fun x x_1 => x ≤ x_1) (f '' univ)\n[PROOFSTEP]\nexact (isChain_of_trichotomous _).image (· ≤ ·) _ _ hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc✝ c₁ c₂ c₃ s t : Set α\na✝ b✝ x y : α\ninst✝ : IsRefl α r\nf : β → α\nc : Set β\nh : IsChain (f ⁻¹'o r) c\nx✝¹ x✝ : { a // a ∈ c }\na : β\nha : a ∈ c\nb : β\nhb : b ∈ c\nhab : a = b\n⊢ ∃ z,\n    r ((fun x => f ↑x) { val := a, property := ha }) ((fun x => f ↑x) z) ∧\n      r ((fun x => f ↑x) { val := b, property := hb }) ((fun x => f ↑x) z)\n[PROOFSTEP]\nsimp only [hab, exists_prop, and_self_iff, Subtype.exists]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc✝ c₁ c₂ c₃ s t : Set α\na✝ b✝ x y : α\ninst✝ : IsRefl α r\nf : β → α\nc : Set β\nh : IsChain (f ⁻¹'o r) c\nx✝¹ x✝ : { a // a ∈ c }\na : β\nha : a ∈ c\nb : β\nhb : b ∈ c\nhab : a = b\n⊢ ∃ a, a ∈ c ∧ r (f b) (f a)\n[PROOFSTEP]\nexact ⟨b, hb, refl _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc✝ c₁ c₂ c₃ s t : Set α\na✝ b✝ x y : α\ninst✝¹ : IsRefl α r\nhchain : IsChain r s\ninst✝ : IsTrans α r\na b c : α\nmem1 : a ∈ s\nmem2 : b ∈ s\nmem3 : c ∈ s\n⊢ ∃ z x, r a z ∧ r b z ∧ r c z\n[PROOFSTEP]\nrcases directedOn_iff_directed.mpr (IsChain.directed hchain) a mem1 b mem2 with ⟨z, mem4, H1, H2⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc✝ c₁ c₂ c₃ s t : Set α\na✝ b✝ x y : α\ninst✝¹ : IsRefl α r\nhchain : IsChain r s\ninst✝ : IsTrans α r\na b c : α\nmem1 : a ∈ s\nmem2 : b ∈ s\nmem3 : c ∈ s\nz : α\nmem4 : z ∈ s\nH1 : r a z\nH2 : r b z\n⊢ ∃ z x, r a z ∧ r b z ∧ r c z\n[PROOFSTEP]\nrcases directedOn_iff_directed.mpr (IsChain.directed hchain) z mem4 c mem3 with ⟨z', mem5, H3, H4⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc✝ c₁ c₂ c₃ s t : Set α\na✝ b✝ x y : α\ninst✝¹ : IsRefl α r\nhchain : IsChain r s\ninst✝ : IsTrans α r\na b c : α\nmem1 : a ∈ s\nmem2 : b ∈ s\nmem3 : c ∈ s\nz : α\nmem4 : z ∈ s\nH1 : r a z\nH2 : r b z\nz' : α\nmem5 : z' ∈ s\nH3 : r z z'\nH4 : r c z'\n⊢ ∃ z x, r a z ∧ r b z ∧ r c z\n[PROOFSTEP]\nexact ⟨z', mem5, _root_.trans H1 H3, _root_.trans H2 H3, H4⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nh : ∃ t, IsChain r s ∧ SuperChain r s t\n⊢ SuperChain r s (SuccChain r s)\n[PROOFSTEP]\nhave : IsChain r s ∧ SuperChain r s (choose h) := @choose_spec _ (fun t => IsChain r s ∧ SuperChain r s t) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nh : ∃ t, IsChain r s ∧ SuperChain r s t\nthis : IsChain r s ∧ SuperChain r s (choose h)\n⊢ SuperChain r s (SuccChain r s)\n[PROOFSTEP]\nsimpa [SuccChain, dif_pos, exists_and_left.mp h] using this.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhs : IsChain r s\nh : ¬∃ t, IsChain r s ∧ SuperChain r s t\n⊢ IsChain r (SuccChain r s)\n[PROOFSTEP]\nrw [exists_and_left] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhs : IsChain r s\nh : ¬(IsChain r s ∧ ∃ x, SuperChain r s x)\n⊢ IsChain r (SuccChain r s)\n[PROOFSTEP]\nsimpa [SuccChain, dif_neg, h] using hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhs₁ : IsChain r s\nhs₂ : ¬IsMaxChain r s\n⊢ SuperChain r s (SuccChain r s)\n[PROOFSTEP]\nsimp only [IsMaxChain, not_and, not_forall, exists_prop, exists_and_left] at hs₂ \n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhs₁ : IsChain r s\nhs₂ : IsChain r s → ∃ x, IsChain r x ∧ s ⊆ x ∧ ¬s = x\n⊢ SuperChain r s (SuccChain r s)\n[PROOFSTEP]\nobtain ⟨t, ht, hst⟩ := hs₂ hs₁\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t✝ : Set α\na b x y : α\nhs₁ : IsChain r s\nhs₂ : IsChain r s → ∃ x, IsChain r x ∧ s ⊆ x ∧ ¬s = x\nt : Set α\nht : IsChain r t\nhst : s ⊆ t ∧ ¬s = t\n⊢ SuperChain r s (SuccChain r s)\n[PROOFSTEP]\nexact succChain_spec ⟨t, hs₁, ht, ssubset_iff_subset_ne.2 hst⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nh : ¬∃ t, IsChain r s ∧ SuperChain r s t\n⊢ s ⊆ SuccChain r s\n[PROOFSTEP]\nrw [exists_and_left] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nh : ¬(IsChain r s ∧ ∃ x, SuperChain r s x)\n⊢ s ⊆ SuccChain r s\n[PROOFSTEP]\nsimp [SuccChain, dif_neg, h, Subset.rfl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\n⊢ ChainClosure r ∅\n[PROOFSTEP]\nhave : ChainClosure r (⋃₀ ∅) := ChainClosure.union fun a h => False.rec h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nthis : ChainClosure r (⋃₀ ∅)\n⊢ ChainClosure r ∅\n[PROOFSTEP]\nsimpa using this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhc₁ : ChainClosure r c₁\nh : ∀ ⦃c₃ : Set α⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂\n⊢ SuccChain r c₂ ⊆ c₁ ∨ c₁ ⊆ c₂\n[PROOFSTEP]\ninduction hc₁\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nh : ∀ ⦃c₃ : Set α⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂\ns✝ : Set α\na✝ : ChainClosure r s✝\na_ih✝ : SuccChain r c₂ ⊆ s✝ ∨ s✝ ⊆ c₂\n⊢ SuccChain r c₂ ⊆ SuccChain r s✝ ∨ SuccChain r s✝ ⊆ c₂\ncase union\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nh : ∀ ⦃c₃ : Set α⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂\ns✝ : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s✝ → ChainClosure r a\na_ih✝ : ∀ (a : Set α), a ∈ s✝ → SuccChain r c₂ ⊆ a ∨ a ⊆ c₂\n⊢ SuccChain r c₂ ⊆ ⋃₀ s✝ ∨ ⋃₀ s✝ ⊆ c₂\n[PROOFSTEP]\ncase succ c₃ hc₃ ih =>\n  cases' ih with ih ih\n  · exact Or.inl (ih.trans subset_succChain)\n  · exact (h hc₃ ih).imp_left fun (h : c₂ = c₃) => h ▸ Subset.rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃✝ s t : Set α\na b x y : α\nh : ∀ ⦃c₃ : Set α⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂\nc₃ : Set α\nhc₃ : ChainClosure r c₃\nih : SuccChain r c₂ ⊆ c₃ ∨ c₃ ⊆ c₂\n⊢ SuccChain r c₂ ⊆ SuccChain r c₃ ∨ SuccChain r c₃ ⊆ c₂\n[PROOFSTEP]\ncase succ c₃ hc₃ ih =>\n  cases' ih with ih ih\n  · exact Or.inl (ih.trans subset_succChain)\n  · exact (h hc₃ ih).imp_left fun (h : c₂ = c₃) => h ▸ Subset.rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃✝ s t : Set α\na b x y : α\nh : ∀ ⦃c₃ : Set α⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂\nc₃ : Set α\nhc₃ : ChainClosure r c₃\nih : SuccChain r c₂ ⊆ c₃ ∨ c₃ ⊆ c₂\n⊢ SuccChain r c₂ ⊆ SuccChain r c₃ ∨ SuccChain r c₃ ⊆ c₂\n[PROOFSTEP]\ncases' ih with ih ih\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃✝ s t : Set α\na b x y : α\nh : ∀ ⦃c₃ : Set α⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂\nc₃ : Set α\nhc₃ : ChainClosure r c₃\nih : SuccChain r c₂ ⊆ c₃\n⊢ SuccChain r c₂ ⊆ SuccChain r c₃ ∨ SuccChain r c₃ ⊆ c₂\n[PROOFSTEP]\nexact Or.inl (ih.trans subset_succChain)\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃✝ s t : Set α\na b x y : α\nh : ∀ ⦃c₃ : Set α⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂\nc₃ : Set α\nhc₃ : ChainClosure r c₃\nih : c₃ ⊆ c₂\n⊢ SuccChain r c₂ ⊆ SuccChain r c₃ ∨ SuccChain r c₃ ⊆ c₂\n[PROOFSTEP]\nexact (h hc₃ ih).imp_left fun (h : c₂ = c₃) => h ▸ Subset.rfl\n[GOAL]\ncase union\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nh : ∀ ⦃c₃ : Set α⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂\ns✝ : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s✝ → ChainClosure r a\na_ih✝ : ∀ (a : Set α), a ∈ s✝ → SuccChain r c₂ ⊆ a ∨ a ⊆ c₂\n⊢ SuccChain r c₂ ⊆ ⋃₀ s✝ ∨ ⋃₀ s✝ ⊆ c₂\n[PROOFSTEP]\ncase union s _ ih =>\n  refine' or_iff_not_imp_left.2 fun hn => sUnion_subset fun a ha => _\n  exact (ih a ha).resolve_left fun h => hn <| h.trans <| subset_sUnion_of_mem ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s✝ t : Set α\na b x y : α\nh : ∀ ⦃c₃ : Set α⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → SuccChain r c₂ ⊆ a ∨ a ⊆ c₂\n⊢ SuccChain r c₂ ⊆ ⋃₀ s ∨ ⋃₀ s ⊆ c₂\n[PROOFSTEP]\ncase union s _ ih =>\n  refine' or_iff_not_imp_left.2 fun hn => sUnion_subset fun a ha => _\n  exact (ih a ha).resolve_left fun h => hn <| h.trans <| subset_sUnion_of_mem ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s✝ t : Set α\na b x y : α\nh : ∀ ⦃c₃ : Set α⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → SuccChain r c₂ ⊆ a ∨ a ⊆ c₂\n⊢ SuccChain r c₂ ⊆ ⋃₀ s ∨ ⋃₀ s ⊆ c₂\n[PROOFSTEP]\nrefine' or_iff_not_imp_left.2 fun hn => sUnion_subset fun a ha => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s✝ t : Set α\na✝¹ b x y : α\nh : ∀ ⦃c₃ : Set α⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → SuccChain r c₂ ⊆ a ∨ a ⊆ c₂\nhn : ¬SuccChain r c₂ ⊆ ⋃₀ s\na : Set α\nha : a ∈ s\n⊢ a ⊆ c₂\n[PROOFSTEP]\nexact (ih a ha).resolve_left fun h => hn <| h.trans <| subset_sUnion_of_mem ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhc₁ : ChainClosure r c₁\nhc₂ : ChainClosure r c₂\nh : c₁ ⊆ c₂\n⊢ c₂ = c₁ ∨ SuccChain r c₁ ⊆ c₂\n[PROOFSTEP]\ninduction hc₂ generalizing c₁ hc₁\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃ s t : Set α\na b x y : α\ns✝ : Set α\na✝ : ChainClosure r s✝\na_ih✝ : ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ s✝ → s✝ = c₁ ∨ SuccChain r c₁ ⊆ s✝\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ SuccChain r s✝\n⊢ SuccChain r s✝ = c₁ ∨ SuccChain r c₁ ⊆ SuccChain r s✝\ncase union\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃ s t : Set α\na b x y : α\ns✝ : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s✝ → ChainClosure r a\na_ih✝ : ∀ (a : Set α), a ∈ s✝ → ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ a → a = c₁ ∨ SuccChain r c₁ ⊆ a\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ ⋃₀ s✝\n⊢ ⋃₀ s✝ = c₁ ∨ SuccChain r c₁ ⊆ ⋃₀ s✝\n[PROOFSTEP]\ncase succ c₂ _\n  ih =>\n  refine' ((chainClosure_succ_total_aux hc₁) fun c₁ => ih).imp h.antisymm' fun h₁ => _\n  obtain rfl | h₂ := ih hc₁ h₁\n  · exact Subset.rfl\n  · exact h₂.trans subset_succChain\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂✝ c₃ s t : Set α\na b x y : α\nc₂ : Set α\na✝ : ChainClosure r c₂\nih : ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ c₂ → c₂ = c₁ ∨ SuccChain r c₁ ⊆ c₂\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ SuccChain r c₂\n⊢ SuccChain r c₂ = c₁ ∨ SuccChain r c₁ ⊆ SuccChain r c₂\n[PROOFSTEP]\ncase succ c₂ _\n  ih =>\n  refine' ((chainClosure_succ_total_aux hc₁) fun c₁ => ih).imp h.antisymm' fun h₁ => _\n  obtain rfl | h₂ := ih hc₁ h₁\n  · exact Subset.rfl\n  · exact h₂.trans subset_succChain\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂✝ c₃ s t : Set α\na b x y : α\nc₂ : Set α\na✝ : ChainClosure r c₂\nih : ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ c₂ → c₂ = c₁ ∨ SuccChain r c₁ ⊆ c₂\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ SuccChain r c₂\n⊢ SuccChain r c₂ = c₁ ∨ SuccChain r c₁ ⊆ SuccChain r c₂\n[PROOFSTEP]\nrefine' ((chainClosure_succ_total_aux hc₁) fun c₁ => ih).imp h.antisymm' fun h₁ => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂✝ c₃ s t : Set α\na b x y : α\nc₂ : Set α\na✝ : ChainClosure r c₂\nih : ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ c₂ → c₂ = c₁ ∨ SuccChain r c₁ ⊆ c₂\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ SuccChain r c₂\nh₁ : c₁ ⊆ c₂\n⊢ SuccChain r c₁ ⊆ SuccChain r c₂\n[PROOFSTEP]\nobtain rfl | h₂ := ih hc₁ h₁\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂✝ c₃ s t : Set α\na b x y : α\nc₂ : Set α\na✝ : ChainClosure r c₂\nih : ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ c₂ → c₂ = c₁ ∨ SuccChain r c₁ ⊆ c₂\nhc₁ : ChainClosure r c₂\nh : c₂ ⊆ SuccChain r c₂\nh₁ : c₂ ⊆ c₂\n⊢ SuccChain r c₂ ⊆ SuccChain r c₂\n[PROOFSTEP]\nexact Subset.rfl\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂✝ c₃ s t : Set α\na b x y : α\nc₂ : Set α\na✝ : ChainClosure r c₂\nih : ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ c₂ → c₂ = c₁ ∨ SuccChain r c₁ ⊆ c₂\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ SuccChain r c₂\nh₁ : c₁ ⊆ c₂\nh₂ : SuccChain r c₁ ⊆ c₂\n⊢ SuccChain r c₁ ⊆ SuccChain r c₂\n[PROOFSTEP]\nexact h₂.trans subset_succChain\n[GOAL]\ncase union\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃ s t : Set α\na b x y : α\ns✝ : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s✝ → ChainClosure r a\na_ih✝ : ∀ (a : Set α), a ∈ s✝ → ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ a → a = c₁ ∨ SuccChain r c₁ ⊆ a\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ ⋃₀ s✝\n⊢ ⋃₀ s✝ = c₁ ∨ SuccChain r c₁ ⊆ ⋃₀ s✝\n[PROOFSTEP]\ncase union s _ ih =>\n  apply Or.imp_left h.antisymm'\n  apply by_contradiction\n  simp only [sUnion_subset_iff, not_or, not_forall, exists_prop, and_imp, forall_exists_index]\n  intro c₃ hc₃ h₁ h₂\n  obtain h | h := chainClosure_succ_total_aux hc₁ fun c₄ => ih _ hc₃\n  · exact h₁ (subset_succChain.trans h)\n  obtain h' | h' := ih c₃ hc₃ hc₁ h\n  · exact h₁ h'.subset\n  · exact h₂ (h'.trans <| subset_sUnion_of_mem hc₃)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃ s✝ t : Set α\na b x y : α\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ a → a = c₁ ∨ SuccChain r c₁ ⊆ a\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ ⋃₀ s\n⊢ ⋃₀ s = c₁ ∨ SuccChain r c₁ ⊆ ⋃₀ s\n[PROOFSTEP]\ncase union s _ ih =>\n  apply Or.imp_left h.antisymm'\n  apply by_contradiction\n  simp only [sUnion_subset_iff, not_or, not_forall, exists_prop, and_imp, forall_exists_index]\n  intro c₃ hc₃ h₁ h₂\n  obtain h | h := chainClosure_succ_total_aux hc₁ fun c₄ => ih _ hc₃\n  · exact h₁ (subset_succChain.trans h)\n  obtain h' | h' := ih c₃ hc₃ hc₁ h\n  · exact h₁ h'.subset\n  · exact h₂ (h'.trans <| subset_sUnion_of_mem hc₃)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃ s✝ t : Set α\na b x y : α\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ a → a = c₁ ∨ SuccChain r c₁ ⊆ a\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ ⋃₀ s\n⊢ ⋃₀ s = c₁ ∨ SuccChain r c₁ ⊆ ⋃₀ s\n[PROOFSTEP]\napply Or.imp_left h.antisymm'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃ s✝ t : Set α\na b x y : α\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ a → a = c₁ ∨ SuccChain r c₁ ⊆ a\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ ⋃₀ s\n⊢ ⋃₀ s ⊆ c₁ ∨ SuccChain r c₁ ⊆ ⋃₀ s\n[PROOFSTEP]\napply by_contradiction\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃ s✝ t : Set α\na b x y : α\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ a → a = c₁ ∨ SuccChain r c₁ ⊆ a\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ ⋃₀ s\n⊢ ¬(⋃₀ s ⊆ c₁ ∨ SuccChain r c₁ ⊆ ⋃₀ s) → False\n[PROOFSTEP]\nsimp only [sUnion_subset_iff, not_or, not_forall, exists_prop, and_imp, forall_exists_index]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃ s✝ t : Set α\na b x y : α\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ a → a = c₁ ∨ SuccChain r c₁ ⊆ a\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ ⋃₀ s\n⊢ ∀ (x : Set α), x ∈ s → ¬x ⊆ c₁ → ¬SuccChain r c₁ ⊆ ⋃₀ s → False\n[PROOFSTEP]\nintro c₃ hc₃ h₁ h₂\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃✝ s✝ t : Set α\na b x y : α\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ a → a = c₁ ∨ SuccChain r c₁ ⊆ a\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh : c₁ ⊆ ⋃₀ s\nc₃ : Set α\nhc₃ : c₃ ∈ s\nh₁ : ¬c₃ ⊆ c₁\nh₂ : ¬SuccChain r c₁ ⊆ ⋃₀ s\n⊢ False\n[PROOFSTEP]\nobtain h | h := chainClosure_succ_total_aux hc₁ fun c₄ => ih _ hc₃\n[GOAL]\ncase a.inl\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃✝ s✝ t : Set α\na b x y : α\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ a → a = c₁ ∨ SuccChain r c₁ ⊆ a\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh✝ : c₁ ⊆ ⋃₀ s\nc₃ : Set α\nhc₃ : c₃ ∈ s\nh₁ : ¬c₃ ⊆ c₁\nh₂ : ¬SuccChain r c₁ ⊆ ⋃₀ s\nh : SuccChain r c₃ ⊆ c₁\n⊢ False\n[PROOFSTEP]\nexact h₁ (subset_succChain.trans h)\n[GOAL]\ncase a.inr\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃✝ s✝ t : Set α\na b x y : α\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ a → a = c₁ ∨ SuccChain r c₁ ⊆ a\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh✝ : c₁ ⊆ ⋃₀ s\nc₃ : Set α\nhc₃ : c₃ ∈ s\nh₁ : ¬c₃ ⊆ c₁\nh₂ : ¬SuccChain r c₁ ⊆ ⋃₀ s\nh : c₁ ⊆ c₃\n⊢ False\n[PROOFSTEP]\nobtain h' | h' := ih c₃ hc₃ hc₁ h\n[GOAL]\ncase a.inr.inl\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃✝ s✝ t : Set α\na b x y : α\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ a → a = c₁ ∨ SuccChain r c₁ ⊆ a\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh✝ : c₁ ⊆ ⋃₀ s\nc₃ : Set α\nhc₃ : c₃ ∈ s\nh₁ : ¬c₃ ⊆ c₁\nh₂ : ¬SuccChain r c₁ ⊆ ⋃₀ s\nh : c₁ ⊆ c₃\nh' : c₃ = c₁\n⊢ False\n[PROOFSTEP]\nexact h₁ h'.subset\n[GOAL]\ncase a.inr.inr\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₂ c₃✝ s✝ t : Set α\na b x y : α\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → ∀ {c₁ : Set α}, ChainClosure r c₁ → c₁ ⊆ a → a = c₁ ∨ SuccChain r c₁ ⊆ a\nc₁ : Set α\nhc₁ : ChainClosure r c₁\nh✝ : c₁ ⊆ ⋃₀ s\nc₃ : Set α\nhc₃ : c₃ ∈ s\nh₁ : ¬c₃ ⊆ c₁\nh₂ : ¬SuccChain r c₁ ⊆ ⋃₀ s\nh : c₁ ⊆ c₃\nh' : SuccChain r c₁ ⊆ c₃\n⊢ False\n[PROOFSTEP]\nexact h₂ (h'.trans <| subset_sUnion_of_mem hc₃)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhc₁ : ChainClosure r c₁\nhc₂ : ChainClosure r c₂\nhc : SuccChain r c₂ = c₂\n⊢ c₁ ⊆ c₂\n[PROOFSTEP]\ninduction hc₁\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhc₂ : ChainClosure r c₂\nhc : SuccChain r c₂ = c₂\ns✝ : Set α\na✝ : ChainClosure r s✝\na_ih✝ : s✝ ⊆ c₂\n⊢ SuccChain r s✝ ⊆ c₂\ncase union\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhc₂ : ChainClosure r c₂\nhc : SuccChain r c₂ = c₂\ns✝ : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s✝ → ChainClosure r a\na_ih✝ : ∀ (a : Set α), a ∈ s✝ → a ⊆ c₂\n⊢ ⋃₀ s✝ ⊆ c₂\n[PROOFSTEP]\ncase succ s₁ hc₁ h => exact (chainClosure_succ_total hc₁ hc₂ h).elim (fun h => h ▸ hc.subset) id\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhc₂ : ChainClosure r c₂\nhc : SuccChain r c₂ = c₂\ns₁ : Set α\nhc₁ : ChainClosure r s₁\nh : s₁ ⊆ c₂\n⊢ SuccChain r s₁ ⊆ c₂\n[PROOFSTEP]\ncase succ s₁ hc₁ h => exact (chainClosure_succ_total hc₁ hc₂ h).elim (fun h => h ▸ hc.subset) id\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhc₂ : ChainClosure r c₂\nhc : SuccChain r c₂ = c₂\ns₁ : Set α\nhc₁ : ChainClosure r s₁\nh : s₁ ⊆ c₂\n⊢ SuccChain r s₁ ⊆ c₂\n[PROOFSTEP]\nexact (chainClosure_succ_total hc₁ hc₂ h).elim (fun h => h ▸ hc.subset) id\n[GOAL]\ncase union\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhc₂ : ChainClosure r c₂\nhc : SuccChain r c₂ = c₂\ns✝ : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s✝ → ChainClosure r a\na_ih✝ : ∀ (a : Set α), a ∈ s✝ → a ⊆ c₂\n⊢ ⋃₀ s✝ ⊆ c₂\n[PROOFSTEP]\ncase union s _ ih => exact sUnion_subset ih\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s✝ t : Set α\na b x y : α\nhc₂ : ChainClosure r c₂\nhc : SuccChain r c₂ = c₂\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → a ⊆ c₂\n⊢ ⋃₀ s ⊆ c₂\n[PROOFSTEP]\ncase union s _ ih => exact sUnion_subset ih\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s✝ t : Set α\na b x y : α\nhc₂ : ChainClosure r c₂\nhc : SuccChain r c₂ = c₂\ns : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s → ChainClosure r a\nih : ∀ (a : Set α), a ∈ s → a ⊆ c₂\n⊢ ⋃₀ s ⊆ c₂\n[PROOFSTEP]\nexact sUnion_subset ih\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\nhc : ChainClosure r c\n⊢ IsChain r c\n[PROOFSTEP]\ninduction hc\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\ns✝ : Set α\na✝ : ChainClosure r s✝\na_ih✝ : IsChain r s✝\n⊢ IsChain r (SuccChain r s✝)\ncase union\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\ns✝ : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s✝ → ChainClosure r a\na_ih✝ : ∀ (a : Set α), a ∈ s✝ → IsChain r a\n⊢ IsChain r (⋃₀ s✝)\n[PROOFSTEP]\ncase succ c _ h => exact h.succ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc✝ c₁ c₂ c₃ s t : Set α\na b x y : α\nc : Set α\na✝ : ChainClosure r c\nh : IsChain r c\n⊢ IsChain r (SuccChain r c)\n[PROOFSTEP]\ncase succ c _ h => exact h.succ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc✝ c₁ c₂ c₃ s t : Set α\na b x y : α\nc : Set α\na✝ : ChainClosure r c\nh : IsChain r c\n⊢ IsChain r (SuccChain r c)\n[PROOFSTEP]\nexact h.succ\n[GOAL]\ncase union\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s t : Set α\na b x y : α\ns✝ : Set (Set α)\na✝ : ∀ (a : Set α), a ∈ s✝ → ChainClosure r a\na_ih✝ : ∀ (a : Set α), a ∈ s✝ → IsChain r a\n⊢ IsChain r (⋃₀ s✝)\n[PROOFSTEP]\ncase union s hs h =>\n  exact fun c₁ ⟨t₁, ht₁, (hc₁ : c₁ ∈ t₁)⟩ c₂ ⟨t₂, ht₂, (hc₂ : c₂ ∈ t₂)⟩ hneq =>\n    ((hs _ ht₁).total <| hs _ ht₂).elim (fun ht => h t₂ ht₂ (ht hc₁) hc₂ hneq) fun ht => h t₁ ht₁ hc₁ (ht hc₂) hneq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s✝ t : Set α\na b x y : α\ns : Set (Set α)\nhs : ∀ (a : Set α), a ∈ s → ChainClosure r a\nh : ∀ (a : Set α), a ∈ s → IsChain r a\n⊢ IsChain r (⋃₀ s)\n[PROOFSTEP]\ncase union s hs h =>\n  exact fun c₁ ⟨t₁, ht₁, (hc₁ : c₁ ∈ t₁)⟩ c₂ ⟨t₂, ht₂, (hc₂ : c₂ ∈ t₂)⟩ hneq =>\n    ((hs _ ht₁).total <| hs _ ht₂).elim (fun ht => h t₂ ht₂ (ht hc₁) hc₂ hneq) fun ht => h t₁ ht₁ hc₁ (ht hc₂) hneq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\nc c₁ c₂ c₃ s✝ t : Set α\na b x y : α\ns : Set (Set α)\nhs : ∀ (a : Set α), a ∈ s → ChainClosure r a\nh : ∀ (a : Set α), a ∈ s → IsChain r a\n⊢ IsChain r (⋃₀ s)\n[PROOFSTEP]\nexact fun c₁ ⟨t₁, ht₁, (hc₁ : c₁ ∈ t₁)⟩ c₂ ⟨t₂, ht₂, (hc₂ : c₂ ∈ t₂)⟩ hneq =>\n  ((hs _ ht₁).total <| hs _ ht₂).elim (fun ht => h t₂ ht₂ (ht hc₁) hc₂ hneq) fun ht => h t₁ ht₁ hc₁ (ht hc₂) hneq\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LE α\ns✝ t✝ : Flag α\na : α\ns t : Flag α\nh : s.carrier = t.carrier\n⊢ s = t\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\ninst✝ : LE α\ns t✝ : Flag α\na : α\nt : Flag α\ncarrier✝ : Set α\nChain'✝ : IsChain (fun x x_1 => x ≤ x_1) carrier✝\nmax_chain'✝ : ∀ ⦃s : Set α⦄, IsChain (fun x x_1 => x ≤ x_1) s → carrier✝ ⊆ s → carrier✝ = s\nh : { carrier := carrier✝, Chain' := Chain'✝, max_chain' := max_chain'✝ }.carrier = t.carrier\n⊢ { carrier := carrier✝, Chain' := Chain'✝, max_chain' := max_chain'✝ } = t\n[PROOFSTEP]\ncases t\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\ninst✝ : LE α\ns t : Flag α\na : α\ncarrier✝¹ : Set α\nChain'✝¹ : IsChain (fun x x_1 => x ≤ x_1) carrier✝¹\nmax_chain'✝¹ : ∀ ⦃s : Set α⦄, IsChain (fun x x_1 => x ≤ x_1) s → carrier✝¹ ⊆ s → carrier✝¹ = s\ncarrier✝ : Set α\nChain'✝ : IsChain (fun x x_1 => x ≤ x_1) carrier✝\nmax_chain'✝ : ∀ ⦃s : Set α⦄, IsChain (fun x x_1 => x ≤ x_1) s → carrier✝ ⊆ s → carrier✝ = s\nh :\n  { carrier := carrier✝¹, Chain' := Chain'✝¹, max_chain' := max_chain'✝¹ }.carrier =\n    { carrier := carrier✝, Chain' := Chain'✝, max_chain' := max_chain'✝ }.carrier\n⊢ { carrier := carrier✝¹, Chain' := Chain'✝¹, max_chain' := max_chain'✝¹ } =\n    { carrier := carrier✝, Chain' := Chain'✝, max_chain' := max_chain'✝ }\n[PROOFSTEP]\ncongr\n", "meta": {"mathlib_filename": "Mathlib.Order.Chain", "llama_tokens": 13383, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419831347361, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.3920482007092462}}
{"text": "[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\n⊢ ↑{ val := 0, property := (_ : 0 ≤ 0 ∧ 0 ≤ 0) } ∈ Icc 0 0\n[PROOFSTEP]\nrw [Subtype.coe_mk, Icc_self]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\n⊢ 0 ∈ {0}\n[PROOFSTEP]\nexact mem_singleton _\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nx✝¹ : E\nx✝ : x✝¹ ∈ closedBall 0 ↑0\n⊢ ContinuousOn (fun t => OfNat.ofNat 0 t x✝¹) (Icc 0 0)\n[PROOFSTEP]\nsimpa only [Pi.zero_apply] using continuousOn_const\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nt : ↑(Icc v.tMin v.tMax)\n⊢ dist t v.t₀ ≤ tDist v\n[PROOFSTEP]\nrw [Subtype.dist_eq, Real.dist_eq]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nt : ↑(Icc v.tMin v.tMax)\n⊢ |↑t - ↑v.t₀| ≤ tDist v\n[PROOFSTEP]\ncases' le_total t v.t₀ with ht ht\n[GOAL]\ncase inl\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nt : ↑(Icc v.tMin v.tMax)\nht : t ≤ v.t₀\n⊢ |↑t - ↑v.t₀| ≤ tDist v\n[PROOFSTEP]\nrw [abs_of_nonpos (sub_nonpos.2 <| Subtype.coe_le_coe.2 ht), neg_sub]\n[GOAL]\ncase inl\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nt : ↑(Icc v.tMin v.tMax)\nht : t ≤ v.t₀\n⊢ ↑v.t₀ - ↑t ≤ tDist v\n[PROOFSTEP]\nexact (sub_le_sub_left t.2.1 _).trans (le_max_right _ _)\n[GOAL]\ncase inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nt : ↑(Icc v.tMin v.tMax)\nht : v.t₀ ≤ t\n⊢ |↑t - ↑v.t₀| ≤ tDist v\n[PROOFSTEP]\nrw [abs_of_nonneg (sub_nonneg.2 <| Subtype.coe_le_coe.2 ht)]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nt : ↑(Icc v.tMin v.tMax)\nht : v.t₀ ≤ t\n⊢ ↑t - ↑v.t₀ ≤ tDist v\n[PROOFSTEP]\nexact (sub_le_sub_right t.2.2 _).trans (le_max_left _ _)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nt : ℝ\nht : t ∈ Icc v.tMin v.tMax\n⊢ ↑(proj v t) = t\n[PROOFSTEP]\nsimp only [proj, projIcc_of_mem v.tMin_le_tMax ht]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf✝ f g : FunSpace v\nh : (fun f => ContinuousMap.mk f.toFun) f = (fun f => ContinuousMap.mk f.toFun) g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf g : FunSpace v\ntoFun✝ : ↑(Icc v.tMin v.tMax) → E\nmap_t₀'✝ : toFun✝ v.t₀ = v.x₀\nlipschitz'✝ : LipschitzWith v.C toFun✝\nh :\n  (fun f => ContinuousMap.mk f.toFun) { toFun := toFun✝, map_t₀' := map_t₀'✝, lipschitz' := lipschitz'✝ } =\n    (fun f => ContinuousMap.mk f.toFun) g\n⊢ { toFun := toFun✝, map_t₀' := map_t₀'✝, lipschitz' := lipschitz'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ntoFun✝¹ : ↑(Icc v.tMin v.tMax) → E\nmap_t₀'✝¹ : toFun✝¹ v.t₀ = v.x₀\nlipschitz'✝¹ : LipschitzWith v.C toFun✝¹\ntoFun✝ : ↑(Icc v.tMin v.tMax) → E\nmap_t₀'✝ : toFun✝ v.t₀ = v.x₀\nlipschitz'✝ : LipschitzWith v.C toFun✝\nh :\n  (fun f => ContinuousMap.mk f.toFun) { toFun := toFun✝¹, map_t₀' := map_t₀'✝¹, lipschitz' := lipschitz'✝¹ } =\n    (fun f => ContinuousMap.mk f.toFun) { toFun := toFun✝, map_t₀' := map_t₀'✝, lipschitz' := lipschitz'✝ }\n⊢ { toFun := toFun✝¹, map_t₀' := map_t₀'✝¹, lipschitz' := lipschitz'✝¹ } =\n    { toFun := toFun✝, map_t₀' := map_t₀'✝, lipschitz' := lipschitz'✝ }\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\n⊢ range ↑toContinuousMap = {f | ↑f v.t₀ = v.x₀ ∧ LipschitzWith v.C ↑f}\n[PROOFSTEP]\next f\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf✝ : FunSpace v\nf : C(↑(Icc v.tMin v.tMax), E)\n⊢ f ∈ range ↑toContinuousMap ↔ f ∈ {f | ↑f v.t₀ = v.x₀ ∧ LipschitzWith v.C ↑f}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf✝ : FunSpace v\nf : C(↑(Icc v.tMin v.tMax), E)\n⊢ f ∈ range ↑toContinuousMap → f ∈ {f | ↑f v.t₀ = v.x₀ ∧ LipschitzWith v.C ↑f}\n[PROOFSTEP]\nrintro ⟨⟨f, hf₀, hf_lip⟩, rfl⟩\n[GOAL]\ncase h.mp.intro.mk\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf✝ : FunSpace v\nf : ↑(Icc v.tMin v.tMax) → E\nhf₀ : f v.t₀ = v.x₀\nhf_lip : LipschitzWith v.C f\n⊢ ↑toContinuousMap { toFun := f, map_t₀' := hf₀, lipschitz' := hf_lip } ∈ {f | ↑f v.t₀ = v.x₀ ∧ LipschitzWith v.C ↑f}\n[PROOFSTEP]\nexact ⟨hf₀, hf_lip⟩\n[GOAL]\ncase h.mpr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf✝ : FunSpace v\nf : C(↑(Icc v.tMin v.tMax), E)\n⊢ f ∈ {f | ↑f v.t₀ = v.x₀ ∧ LipschitzWith v.C ↑f} → f ∈ range ↑toContinuousMap\n[PROOFSTEP]\nrcases f with ⟨f, hf⟩\n[GOAL]\ncase h.mpr.mk\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf✝ : FunSpace v\nf : ↑(Icc v.tMin v.tMax) → E\nhf : Continuous f\n⊢ ContinuousMap.mk f ∈ {f | ↑f v.t₀ = v.x₀ ∧ LipschitzWith v.C ↑f} → ContinuousMap.mk f ∈ range ↑toContinuousMap\n[PROOFSTEP]\nrintro ⟨hf₀, hf_lip⟩\n[GOAL]\ncase h.mpr.mk.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf✝ : FunSpace v\nf : ↑(Icc v.tMin v.tMax) → E\nhf : Continuous f\nhf₀ : ↑(ContinuousMap.mk f) v.t₀ = v.x₀\nhf_lip : LipschitzWith v.C ↑(ContinuousMap.mk f)\n⊢ ContinuousMap.mk f ∈ range ↑toContinuousMap\n[PROOFSTEP]\nexact ⟨⟨f, hf₀, hf_lip⟩, rfl⟩\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\nt : ↑(Icc v.tMin v.tMax)\n⊢ dist (toFun f t) v.x₀ = dist (toFun f t) (toFun f v.t₀)\n[PROOFSTEP]\nrw [f.map_t₀']\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\nt : ↑(Icc v.tMin v.tMax)\n⊢ vComp f ↑t = PicardLindelof.toFun v (↑t) (toFun f t)\n[PROOFSTEP]\nsimp only [vComp, proj_coe]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\n⊢ Continuous (vComp f)\n[PROOFSTEP]\nhave := (continuous_subtype_val.prod_mk f.continuous).comp v.continuous_proj\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\nthis : Continuous ((fun x => (↑x, toFun f x)) ∘ proj v)\n⊢ Continuous (vComp f)\n[PROOFSTEP]\nrefine' ContinuousOn.comp_continuous v.continuousOn this fun x => _\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\nthis : Continuous ((fun x => (↑x, toFun f x)) ∘ proj v)\nx : ℝ\n⊢ ((fun x => (↑x, toFun f x)) ∘ proj v) x ∈ Icc v.tMin v.tMax ×ˢ closedBall v.x₀ ↑v.R\n[PROOFSTEP]\nexact ⟨(v.proj x).2, f.mem_closedBall _⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\n⊢ CompleteSpace (FunSpace v)\n[PROOFSTEP]\nrefine' (completeSpace_iff_isComplete_range uniformInducing_toContinuousMap).2 (IsClosed.isComplete _)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\n⊢ IsClosed (range ↑toContinuousMap)\n[PROOFSTEP]\nrw [range_toContinuousMap, setOf_and]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\n⊢ IsClosed ({a | ↑a v.t₀ = v.x₀} ∩ {a | LipschitzWith v.C ↑a})\n[PROOFSTEP]\nrefine' (isClosed_eq (ContinuousMap.continuous_eval_const _) continuous_const).inter _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\n⊢ IsClosed {a | LipschitzWith v.C ↑a}\n[PROOFSTEP]\nhave : IsClosed {f : Icc v.tMin v.tMax → E | LipschitzWith v.C f} := isClosed_setOf_lipschitzWith v.C\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nthis : IsClosed {f | LipschitzWith v.C f}\n⊢ IsClosed {a | LipschitzWith v.C ↑a}\n[PROOFSTEP]\nexact this.preimage ContinuousMap.continuous_coe\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf✝ : FunSpace v\ninst✝ : CompleteSpace E\nf : FunSpace v\n⊢ (fun t => v.x₀ + ∫ (τ : ℝ) in ↑v.t₀..↑t, vComp f τ) v.t₀ = v.x₀\n[PROOFSTEP]\nsimp only [integral_same, add_zero]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf✝ : FunSpace v\ninst✝ : CompleteSpace E\nf : FunSpace v\nt₁ t₂ : ↑(Icc v.tMin v.tMax)\n⊢ dist (v.x₀ + ∫ (τ : ℝ) in ↑v.t₀..↑t₁, vComp f τ) (v.x₀ + ∫ (τ : ℝ) in ↑v.t₀..↑t₂, vComp f τ) ≤ ↑v.C * dist t₁ t₂\n[PROOFSTEP]\nrw [dist_add_left, dist_eq_norm,\n  integral_interval_sub_left (f.intervalIntegrable_vComp _ _) (f.intervalIntegrable_vComp _ _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf✝ : FunSpace v\ninst✝ : CompleteSpace E\nf : FunSpace v\nt₁ t₂ : ↑(Icc v.tMin v.tMax)\n⊢ ‖∫ (x : ℝ) in ↑t₂..↑t₁, vComp f x‖ ≤ ↑v.C * dist t₁ t₂\n[PROOFSTEP]\nexact norm_integral_le_of_norm_le_const fun t _ => f.norm_vComp_le _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nt : ↑(Icc v.tMin v.tMax)\n⊢ HasDerivWithinAt ((next f).toFun ∘ proj v) (PicardLindelof.toFun v (↑t) (toFun f t)) (Icc v.tMin v.tMax) ↑t\n[PROOFSTEP]\nhaveI : Fact ((t : ℝ) ∈ Icc v.tMin v.tMax) := ⟨t.2⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nt : ↑(Icc v.tMin v.tMax)\nthis : Fact (↑t ∈ Icc v.tMin v.tMax)\n⊢ HasDerivWithinAt ((next f).toFun ∘ proj v) (PicardLindelof.toFun v (↑t) (toFun f t)) (Icc v.tMin v.tMax) ↑t\n[PROOFSTEP]\nsimp only [(· ∘ ·), next_apply]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nt : ↑(Icc v.tMin v.tMax)\nthis : Fact (↑t ∈ Icc v.tMin v.tMax)\n⊢ HasDerivWithinAt (fun x => v.x₀ + ∫ (τ : ℝ) in ↑v.t₀..↑(proj v x), vComp f τ)\n    (PicardLindelof.toFun v (↑t) (toFun f t)) (Icc v.tMin v.tMax) ↑t\n[PROOFSTEP]\nrefine' HasDerivWithinAt.const_add _ _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nt : ↑(Icc v.tMin v.tMax)\nthis : Fact (↑t ∈ Icc v.tMin v.tMax)\n⊢ HasDerivWithinAt (fun x => ∫ (τ : ℝ) in ↑v.t₀..↑(proj v x), vComp f τ) (PicardLindelof.toFun v (↑t) (toFun f t))\n    (Icc v.tMin v.tMax) ↑t\n[PROOFSTEP]\nhave : HasDerivWithinAt (∫ τ in v.t₀..·, f.vComp τ) (f.vComp t) (Icc v.tMin v.tMax) t :=\n  integral_hasDerivWithinAt_right (f.intervalIntegrable_vComp _ _) (f.continuous_vComp.stronglyMeasurableAtFilter _ _)\n    f.continuous_vComp.continuousWithinAt\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nt : ↑(Icc v.tMin v.tMax)\nthis✝ : Fact (↑t ∈ Icc v.tMin v.tMax)\nthis : HasDerivWithinAt (fun x => ∫ (τ : ℝ) in ↑v.t₀..x, vComp f τ) (vComp f ↑t) (Icc v.tMin v.tMax) ↑t\n⊢ HasDerivWithinAt (fun x => ∫ (τ : ℝ) in ↑v.t₀..↑(proj v x), vComp f τ) (PicardLindelof.toFun v (↑t) (toFun f t))\n    (Icc v.tMin v.tMax) ↑t\n[PROOFSTEP]\nrw [vComp_apply_coe] at this \n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nt : ↑(Icc v.tMin v.tMax)\nthis✝ : Fact (↑t ∈ Icc v.tMin v.tMax)\nthis :\n  HasDerivWithinAt (fun x => ∫ (τ : ℝ) in ↑v.t₀..x, vComp f τ) (PicardLindelof.toFun v (↑t) (toFun f t))\n    (Icc v.tMin v.tMax) ↑t\n⊢ HasDerivWithinAt (fun x => ∫ (τ : ℝ) in ↑v.t₀..↑(proj v x), vComp f τ) (PicardLindelof.toFun v (↑t) (toFun f t))\n    (Icc v.tMin v.tMax) ↑t\n[PROOFSTEP]\nrefine' this.congr_of_eventuallyEq_of_mem _ t.coe_prop\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nt : ↑(Icc v.tMin v.tMax)\nthis✝ : Fact (↑t ∈ Icc v.tMin v.tMax)\nthis :\n  HasDerivWithinAt (fun x => ∫ (τ : ℝ) in ↑v.t₀..x, vComp f τ) (PicardLindelof.toFun v (↑t) (toFun f t))\n    (Icc v.tMin v.tMax) ↑t\n⊢ (fun x => ∫ (τ : ℝ) in ↑v.t₀..↑(proj v x), vComp f τ) =ᶠ[𝓝[Icc v.tMin v.tMax] ↑t] fun x =>\n    ∫ (τ : ℝ) in ↑v.t₀..x, vComp f τ\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin] with _ ht'\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nt : ↑(Icc v.tMin v.tMax)\nthis✝ : Fact (↑t ∈ Icc v.tMin v.tMax)\nthis :\n  HasDerivWithinAt (fun x => ∫ (τ : ℝ) in ↑v.t₀..x, vComp f τ) (PicardLindelof.toFun v (↑t) (toFun f t))\n    (Icc v.tMin v.tMax) ↑t\na✝ : ℝ\nht' : a✝ ∈ Icc v.tMin v.tMax\n⊢ ∫ (τ : ℝ) in ↑v.t₀..↑(proj v a✝), vComp f τ = ∫ (τ : ℝ) in ↑v.t₀..a✝, vComp f τ\n[PROOFSTEP]\nrw [v.proj_of_mem ht']\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nd : ℝ\nh : ∀ (t : ↑(Icc v.tMin v.tMax)), dist (toFun f₁ t) (toFun f₂ t) ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * d\nt : ↑(Icc v.tMin v.tMax)\n⊢ dist (toFun (next f₁) t) (toFun (next f₂) t) ≤ (↑v.L * |↑t - ↑v.t₀|) ^ (n + 1) / ↑(n + 1)! * d\n[PROOFSTEP]\nsimp only [dist_eq_norm, next_apply, add_sub_add_left_eq_sub, ←\n  intervalIntegral.integral_sub (intervalIntegrable_vComp _ _ _) (intervalIntegrable_vComp _ _ _),\n  norm_integral_eq_norm_integral_Ioc] at *\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nd : ℝ\nt : ↑(Icc v.tMin v.tMax)\nh : ∀ (t : ↑(Icc v.tMin v.tMax)), ‖toFun f₁ t - toFun f₂ t‖ ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * d\n⊢ ‖∫ (x : ℝ) in Ι ↑v.t₀ ↑t, vComp f₁ x - vComp f₂ x‖ ≤ (↑v.L * |↑t - ↑v.t₀|) ^ (n + 1) / ↑(n + 1)! * d\n[PROOFSTEP]\ncalc\n  ‖∫ τ in Ι (v.t₀ : ℝ) t, f₁.vComp τ - f₂.vComp τ‖ ≤ ∫ τ in Ι (v.t₀ : ℝ) t, v.L * ((v.L * |τ - v.t₀|) ^ n / n ! * d) :=\n    by\n    refine' norm_integral_le_of_norm_le (Continuous.integrableOn_uIoc _) _\n    ·\n      -- porting note: was `continuity`\n      refine .mul continuous_const <| .mul (.div_const ?_ _) continuous_const\n      refine .pow (.mul continuous_const <| .abs <| ?_) _\n      exact .sub continuous_id continuous_const\n    · refine' (ae_restrict_mem measurableSet_Ioc).mono fun τ hτ => _\n      refine'\n        (v.lipschitzOnWith (v.proj τ).2).norm_sub_le_of_le (f₁.mem_closedBall _) (f₂.mem_closedBall _)\n          ((h _).trans_eq _)\n      rw [v.proj_of_mem]\n      exact uIcc_subset_Icc v.t₀.2 t.2 <| Ioc_subset_Icc_self hτ\n  _ = (v.L * |t.1 - v.t₀|) ^ (n + 1) / (n + 1)! * d := by\n    simp_rw [mul_pow, div_eq_mul_inv, mul_assoc, MeasureTheory.integral_mul_left, MeasureTheory.integral_mul_right,\n      integral_pow_abs_sub_uIoc, div_eq_mul_inv, pow_succ (v.L : ℝ), Nat.factorial_succ, Nat.cast_mul, Nat.cast_succ,\n      mul_inv, mul_assoc]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nd : ℝ\nt : ↑(Icc v.tMin v.tMax)\nh : ∀ (t : ↑(Icc v.tMin v.tMax)), ‖toFun f₁ t - toFun f₂ t‖ ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * d\n⊢ ‖∫ (τ : ℝ) in Ι ↑v.t₀ ↑t, vComp f₁ τ - vComp f₂ τ‖ ≤\n    ∫ (τ : ℝ) in Ι ↑v.t₀ ↑t, ↑v.L * ((↑v.L * |τ - ↑v.t₀|) ^ n / ↑n ! * d)\n[PROOFSTEP]\nrefine' norm_integral_le_of_norm_le (Continuous.integrableOn_uIoc _) _\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nd : ℝ\nt : ↑(Icc v.tMin v.tMax)\nh : ∀ (t : ↑(Icc v.tMin v.tMax)), ‖toFun f₁ t - toFun f₂ t‖ ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * d\n⊢ Continuous fun τ => ↑v.L * ((↑v.L * |τ - ↑v.t₀|) ^ n / ↑n ! * d)\n[PROOFSTEP]\nrefine .mul continuous_const <| .mul (.div_const ?_ _) continuous_const\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nd : ℝ\nt : ↑(Icc v.tMin v.tMax)\nh : ∀ (t : ↑(Icc v.tMin v.tMax)), ‖toFun f₁ t - toFun f₂ t‖ ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * d\n⊢ Continuous fun τ => (↑v.L * |τ - ↑v.t₀|) ^ n\n[PROOFSTEP]\nrefine .pow (.mul continuous_const <| .abs <| ?_) _\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nd : ℝ\nt : ↑(Icc v.tMin v.tMax)\nh : ∀ (t : ↑(Icc v.tMin v.tMax)), ‖toFun f₁ t - toFun f₂ t‖ ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * d\n⊢ Continuous fun τ => τ - ↑v.t₀\n[PROOFSTEP]\nexact .sub continuous_id continuous_const\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nd : ℝ\nt : ↑(Icc v.tMin v.tMax)\nh : ∀ (t : ↑(Icc v.tMin v.tMax)), ‖toFun f₁ t - toFun f₂ t‖ ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * d\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict volume (Ι ↑v.t₀ ↑t),\n    ‖vComp f₁ x - vComp f₂ x‖ ≤ ↑v.L * ((↑v.L * |x - ↑v.t₀|) ^ n / ↑n ! * d)\n[PROOFSTEP]\nrefine' (ae_restrict_mem measurableSet_Ioc).mono fun τ hτ => _\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nd : ℝ\nt : ↑(Icc v.tMin v.tMax)\nh : ∀ (t : ↑(Icc v.tMin v.tMax)), ‖toFun f₁ t - toFun f₂ t‖ ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * d\nτ : ℝ\nhτ : τ ∈ Ioc (min ↑v.t₀ ↑t) (max ↑v.t₀ ↑t)\n⊢ ‖vComp f₁ τ - vComp f₂ τ‖ ≤ ↑v.L * ((↑v.L * |τ - ↑v.t₀|) ^ n / ↑n ! * d)\n[PROOFSTEP]\nrefine'\n  (v.lipschitzOnWith (v.proj τ).2).norm_sub_le_of_le (f₁.mem_closedBall _) (f₂.mem_closedBall _) ((h _).trans_eq _)\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nd : ℝ\nt : ↑(Icc v.tMin v.tMax)\nh : ∀ (t : ↑(Icc v.tMin v.tMax)), ‖toFun f₁ t - toFun f₂ t‖ ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * d\nτ : ℝ\nhτ : τ ∈ Ioc (min ↑v.t₀ ↑t) (max ↑v.t₀ ↑t)\n⊢ (↑v.L * |↑(proj v τ) - ↑v.t₀|) ^ n / ↑n ! * d = (↑v.L * |τ - ↑v.t₀|) ^ n / ↑n ! * d\n[PROOFSTEP]\nrw [v.proj_of_mem]\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nd : ℝ\nt : ↑(Icc v.tMin v.tMax)\nh : ∀ (t : ↑(Icc v.tMin v.tMax)), ‖toFun f₁ t - toFun f₂ t‖ ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * d\nτ : ℝ\nhτ : τ ∈ Ioc (min ↑v.t₀ ↑t) (max ↑v.t₀ ↑t)\n⊢ τ ∈ Icc v.tMin v.tMax\n[PROOFSTEP]\nexact uIcc_subset_Icc v.t₀.2 t.2 <| Ioc_subset_Icc_self hτ\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nd : ℝ\nt : ↑(Icc v.tMin v.tMax)\nh : ∀ (t : ↑(Icc v.tMin v.tMax)), ‖toFun f₁ t - toFun f₂ t‖ ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * d\n⊢ ∫ (τ : ℝ) in Ι ↑v.t₀ ↑t, ↑v.L * ((↑v.L * |τ - ↑v.t₀|) ^ n / ↑n ! * d) =\n    (↑v.L * |↑t - ↑v.t₀|) ^ (n + 1) / ↑(n + 1)! * d\n[PROOFSTEP]\nsimp_rw [mul_pow, div_eq_mul_inv, mul_assoc, MeasureTheory.integral_mul_left, MeasureTheory.integral_mul_right,\n  integral_pow_abs_sub_uIoc, div_eq_mul_inv, pow_succ (v.L : ℝ), Nat.factorial_succ, Nat.cast_mul, Nat.cast_succ,\n  mul_inv, mul_assoc]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nt : ↑(Icc v.tMin v.tMax)\n⊢ dist (toFun (next^[n] f₁) t) (toFun (next^[n] f₂) t) ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * dist f₁ f₂\n[PROOFSTEP]\ninduction' n with n ihn generalizing t\n[GOAL]\ncase zero\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nt✝ t : ↑(Icc v.tMin v.tMax)\n⊢ dist (toFun (next^[Nat.zero] f₁) t) (toFun (next^[Nat.zero] f₂) t) ≤\n    (↑v.L * |↑t - ↑v.t₀|) ^ Nat.zero / ↑Nat.zero ! * dist f₁ f₂\n[PROOFSTEP]\nrw [Nat.zero_eq, pow_zero, Nat.factorial_zero, Nat.cast_one, div_one, one_mul]\n[GOAL]\ncase zero\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nt✝ t : ↑(Icc v.tMin v.tMax)\n⊢ dist (toFun (next^[0] f₁) t) (toFun (next^[0] f₂) t) ≤ dist f₁ f₂\n[PROOFSTEP]\nexact dist_apply_le_dist f₁ f₂ t\n[GOAL]\ncase succ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nt✝ : ↑(Icc v.tMin v.tMax)\nn : ℕ\nihn :\n  ∀ (t : ↑(Icc v.tMin v.tMax)),\n    dist (toFun (next^[n] f₁) t) (toFun (next^[n] f₂) t) ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * dist f₁ f₂\nt : ↑(Icc v.tMin v.tMax)\n⊢ dist (toFun (next^[Nat.succ n] f₁) t) (toFun (next^[Nat.succ n] f₂) t) ≤\n    (↑v.L * |↑t - ↑v.t₀|) ^ Nat.succ n / ↑(Nat.succ n)! * dist f₁ f₂\n[PROOFSTEP]\nrw [iterate_succ_apply', iterate_succ_apply']\n[GOAL]\ncase succ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nt✝ : ↑(Icc v.tMin v.tMax)\nn : ℕ\nihn :\n  ∀ (t : ↑(Icc v.tMin v.tMax)),\n    dist (toFun (next^[n] f₁) t) (toFun (next^[n] f₂) t) ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * dist f₁ f₂\nt : ↑(Icc v.tMin v.tMax)\n⊢ dist (toFun (next (next^[n] f₁)) t) (toFun (next (next^[n] f₂)) t) ≤\n    (↑v.L * |↑t - ↑v.t₀|) ^ Nat.succ n / ↑(Nat.succ n)! * dist f₁ f₂\n[PROOFSTEP]\nexact dist_next_apply_le_of_le ihn _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\n⊢ dist (next^[n] f₁) (next^[n] f₂) ≤ (↑v.L * tDist v) ^ n / ↑n ! * dist f₁ f₂\n[PROOFSTEP]\nrefine' dist_le_of_forall fun t => (dist_iterate_next_apply_le _ _ _ _).trans _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nt : ↑(Icc v.tMin v.tMax)\n⊢ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * dist f₁ f₂ ≤ (↑v.L * tDist v) ^ n / ↑n ! * dist f₁ f₂\n[PROOFSTEP]\nhave : |(t - v.t₀ : ℝ)| ≤ v.tDist := v.dist_t₀_le t\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\nf : FunSpace v\ninst✝ : CompleteSpace E\nf₁ f₂ : FunSpace v\nn : ℕ\nt : ↑(Icc v.tMin v.tMax)\nthis : |↑t - ↑v.t₀| ≤ tDist v\n⊢ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * dist f₁ f₂ ≤ (↑v.L * tDist v) ^ n / ↑n ! * dist f₁ f₂\n[PROOFSTEP]\ngcongr\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\ninst✝ : CompleteSpace E\n⊢ ∃ N K, ContractingWith K FunSpace.next^[N]\n[PROOFSTEP]\nrcases((Real.tendsto_pow_div_factorial_atTop (v.L * v.tDist)).eventually (gt_mem_nhds zero_lt_one)).exists with ⟨N, hN⟩\n[GOAL]\ncase intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\ninst✝ : CompleteSpace E\nN : ℕ\nhN : (↑v.L * tDist v) ^ N / ↑N ! < 1\n⊢ ∃ N K, ContractingWith K FunSpace.next^[N]\n[PROOFSTEP]\nhave : (0 : ℝ) ≤ (v.L * v.tDist) ^ N / N ! :=\n  div_nonneg (pow_nonneg (mul_nonneg v.L.2 v.tDist_nonneg) _) (Nat.cast_nonneg _)\n[GOAL]\ncase intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\ninst✝ : CompleteSpace E\nN : ℕ\nhN : (↑v.L * tDist v) ^ N / ↑N ! < 1\nthis : 0 ≤ (↑v.L * tDist v) ^ N / ↑N !\n⊢ ∃ N K, ContractingWith K FunSpace.next^[N]\n[PROOFSTEP]\nexact ⟨N, ⟨_, this⟩, hN, LipschitzWith.of_dist_le_mul fun f g => FunSpace.dist_iterate_next_le f g N⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\ninst✝ : CompleteSpace E\n⊢ ∃ f, f ↑v.t₀ = v.x₀ ∧ ∀ (t : ℝ), t ∈ Icc v.tMin v.tMax → HasDerivWithinAt f (toFun v t (f t)) (Icc v.tMin v.tMax) t\n[PROOFSTEP]\nrcases v.exists_fixed with ⟨f, hf⟩\n[GOAL]\ncase intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\ninst✝ : CompleteSpace E\nf : FunSpace v\nhf : FunSpace.next f = f\n⊢ ∃ f, f ↑v.t₀ = v.x₀ ∧ ∀ (t : ℝ), t ∈ Icc v.tMin v.tMax → HasDerivWithinAt f (toFun v t (f t)) (Icc v.tMin v.tMax) t\n[PROOFSTEP]\nrefine' ⟨f ∘ v.proj, _, fun t ht => _⟩\n[GOAL]\ncase intro.refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\ninst✝ : CompleteSpace E\nf : FunSpace v\nhf : FunSpace.next f = f\n⊢ (f.toFun ∘ proj v) ↑v.t₀ = v.x₀\n[PROOFSTEP]\nsimp only [(· ∘ ·), proj_coe, f.map_t₀]\n[GOAL]\ncase intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\ninst✝ : CompleteSpace E\nf : FunSpace v\nhf : FunSpace.next f = f\nt : ℝ\nht : t ∈ Icc v.tMin v.tMax\n⊢ HasDerivWithinAt (f.toFun ∘ proj v) (toFun v t ((f.toFun ∘ proj v) t)) (Icc v.tMin v.tMax) t\n[PROOFSTEP]\nsimp only [(· ∘ ·), v.proj_of_mem ht]\n[GOAL]\ncase intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\ninst✝ : CompleteSpace E\nf : FunSpace v\nhf : FunSpace.next f = f\nt : ℝ\nht : t ∈ Icc v.tMin v.tMax\n⊢ HasDerivWithinAt (fun x => FunSpace.toFun f (proj v x)) (toFun v t (FunSpace.toFun f (proj v t))) (Icc v.tMin v.tMax)\n    t\n[PROOFSTEP]\nlift t to Icc v.tMin v.tMax using ht\n[GOAL]\ncase intro.refine'_2.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nv : PicardLindelof E\ninst✝ : CompleteSpace E\nf : FunSpace v\nhf : FunSpace.next f = f\nt : { x // x ∈ Icc v.tMin v.tMax }\n⊢ HasDerivWithinAt (fun x => FunSpace.toFun f (proj v x)) (toFun v (↑t) (FunSpace.toFun f (proj v ↑t)))\n    (Icc v.tMin v.tMax) ↑t\n[PROOFSTEP]\nsimpa only [hf, v.proj_coe] using f.hasDerivWithinAt_next t\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nv : ℝ → E → E\ntMin t₀ tMax : ℝ\nx₀ : E\nC R : ℝ\nL : ℝ≥0\nhpl : IsPicardLindelof v tMin t₀ tMax x₀ L R C\n⊢ ∃ f, f t₀ = x₀ ∧ ∀ (t : ℝ), t ∈ Icc tMin tMax → HasDerivWithinAt f (v t (f t)) (Icc tMin tMax) t\n[PROOFSTEP]\nlift C to ℝ≥0 using (norm_nonneg _).trans hpl.norm_le₀\n[GOAL]\ncase intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nv : ℝ → E → E\ntMin t₀ tMax : ℝ\nx₀ : E\nR : ℝ\nL C : ℝ≥0\nhpl : IsPicardLindelof v tMin t₀ tMax x₀ L R ↑C\n⊢ ∃ f, f t₀ = x₀ ∧ ∀ (t : ℝ), t ∈ Icc tMin tMax → HasDerivWithinAt f (v t (f t)) (Icc tMin tMax) t\n[PROOFSTEP]\nlift t₀ to Icc tMin tMax using hpl.ht₀\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nv : ℝ → E → E\ntMin tMax : ℝ\nx₀ : E\nR : ℝ\nL C : ℝ≥0\nt₀ : { x // x ∈ Icc tMin tMax }\nhpl : IsPicardLindelof v tMin (↑t₀) tMax x₀ L R ↑C\n⊢ ∃ f, f ↑t₀ = x₀ ∧ ∀ (t : ℝ), t ∈ Icc tMin tMax → HasDerivWithinAt f (v t (f t)) (Icc tMin tMax) t\n[PROOFSTEP]\nexact PicardLindelof.exists_solution ⟨v, tMin, tMax, t₀, x₀, C, ⟨R, hpl.hR⟩, L, { hpl with ht₀ := t₀.property }⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\n⊢ ∃ ε, ε > 0 ∧ ∃ L R C, IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\n[PROOFSTEP]\nobtain ⟨L, s', hs', hlip⟩ :=\n  ContDiffAt.exists_lipschitzOnWith\n    ((hv.contDiffWithinAt (mem_of_mem_nhds hs)).contDiffAt hs)\n      -- radius of closed ball in which v is bounded\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\n⊢ ∃ ε, ε > 0 ∧ ∃ L R C, IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\n[PROOFSTEP]\nobtain ⟨r, hr : 0 < r, hball⟩ := Metric.mem_nhds_iff.mp (inter_sets (𝓝 x₀) hs hs')\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\n⊢ ∃ ε, ε > 0 ∧ ∃ L R C, IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\n[PROOFSTEP]\nhave hr' := (half_pos hr).le\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\n⊢ ∃ ε, ε > 0 ∧ ∃ L R C, IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\n[PROOFSTEP]\nobtain ⟨C, hC⟩ :=\n  (isCompact_closedBall x₀ (r / 2)).bddAbove_image <|\n    hv.continuousOn.norm.mono (subset_inter_iff.mp ((closedBall_subset_ball (half_lt_self hr)).trans hball)).left\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\n⊢ ∃ ε, ε > 0 ∧ ∃ L R C, IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\n[PROOFSTEP]\nhave hC' : 0 ≤ C := by\n  apply (norm_nonneg (v x₀)).trans\n  apply hC\n  exact ⟨x₀, ⟨mem_closedBall_self hr', rfl⟩⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\n⊢ 0 ≤ C\n[PROOFSTEP]\napply (norm_nonneg (v x₀)).trans\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\n⊢ ‖v x₀‖ ≤ C\n[PROOFSTEP]\napply hC\n[GOAL]\ncase a\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\n⊢ ‖v x₀‖ ∈ (fun x => ‖v x‖) '' closedBall x₀ (r / 2)\n[PROOFSTEP]\nexact ⟨x₀, ⟨mem_closedBall_self hr', rfl⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\n⊢ ∃ ε, ε > 0 ∧ ∃ L R C, IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\n[PROOFSTEP]\nset ε := if C = 0 then 1 else r / 2 / C with hε\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\n⊢ ∃ ε, ε > 0 ∧ ∃ L R C, IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\n[PROOFSTEP]\nhave hε0 : 0 < ε := by\n  rw [hε]\n  split_ifs with h\n  · exact zero_lt_one\n  · exact div_pos (half_pos hr) (lt_of_le_of_ne hC' (Ne.symm h))\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\n⊢ 0 < ε\n[PROOFSTEP]\nrw [hε]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\n⊢ 0 < if C = 0 then 1 else r / 2 / C\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\nh : C = 0\n⊢ 0 < 1\n[PROOFSTEP]\nexact zero_lt_one\n[GOAL]\ncase neg\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\nh : ¬C = 0\n⊢ 0 < r / 2 / C\n[PROOFSTEP]\nexact div_pos (half_pos hr) (lt_of_le_of_ne hC' (Ne.symm h))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\nhε0 : 0 < ε\n⊢ ∃ ε, ε > 0 ∧ ∃ L R C, IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\n[PROOFSTEP]\nrefine' ⟨ε, hε0, L, r / 2, C, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\nhε0 : 0 < ε\n⊢ IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L (r / 2) C\n[PROOFSTEP]\nexact\n  { ht₀ := by rw [← Real.closedBall_eq_Icc]; exact mem_closedBall_self hε0.le\n    hR := (half_pos hr).le\n    lipschitz := fun t _ =>\n      hlip.mono (subset_inter_iff.mp (Subset.trans (closedBall_subset_ball (half_lt_self hr)) hball)).2\n    cont := fun x _ => continuousOn_const\n    norm_le := fun t _ x hx => hC ⟨x, hx, rfl⟩\n    C_mul_le_R := by\n      rw [add_sub_cancel', sub_sub_cancel, max_self, mul_ite, mul_one]\n      split_ifs with h\n      · rwa [← h] at hr' \n      · exact (mul_div_cancel' (r / 2) h).le }\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\nhε0 : 0 < ε\n⊢ t₀ ∈ Icc (t₀ - ε) (t₀ + ε)\n[PROOFSTEP]\nrw [← Real.closedBall_eq_Icc]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\nhε0 : 0 < ε\n⊢ t₀ ∈ closedBall t₀ ε\n[PROOFSTEP]\nexact mem_closedBall_self hε0.le\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\nhε0 : 0 < ε\n⊢ C * max (t₀ + ε - t₀) (t₀ - (t₀ - ε)) ≤ r / 2\n[PROOFSTEP]\nrw [add_sub_cancel', sub_sub_cancel, max_self, mul_ite, mul_one]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\nhε0 : 0 < ε\n⊢ (if C = 0 then C else C * (r / 2 / C)) ≤ r / 2\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\nhε0 : 0 < ε\nh : C = 0\n⊢ C ≤ r / 2\n[PROOFSTEP]\nrwa [← h] at hr' \n[GOAL]\ncase neg\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nL : ℝ≥0\ns' : Set E\nhs' : s' ∈ 𝓝 x₀\nhlip : LipschitzOnWith L v s'\nr : ℝ\nhr : 0 < r\nhball : ball x₀ r ⊆ s ∩ s'\nhr' : 0 ≤ r / 2\nC : ℝ\nhC : C ∈ upperBounds ((fun x => ‖v x‖) '' closedBall x₀ (r / 2))\nhC' : 0 ≤ C\nε : ℝ := if C = 0 then 1 else r / 2 / C\nhε : ε = if C = 0 then 1 else r / 2 / C\nhε0 : 0 < ε\nh : ¬C = 0\n⊢ C * (r / 2 / C) ≤ r / 2\n[PROOFSTEP]\nexact (mul_div_cancel' (r / 2) h).le\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\n⊢ ∃ ε, ε > 0 ∧ ∃ f, f t₀ = x₀ ∧ ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → f t ∈ s ∧ HasDerivAt f (v (f t)) t\n[PROOFSTEP]\nobtain ⟨ε, hε, L, R, C, hpl⟩ := exists_isPicardLindelof_const_of_contDiffOn_nhds t₀ x₀ hv hs\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\n⊢ ∃ ε, ε > 0 ∧ ∃ f, f t₀ = x₀ ∧ ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → f t ∈ s ∧ HasDerivAt f (v (f t)) t\n[PROOFSTEP]\nobtain ⟨f, hf1, hf2⟩ := hpl.exists_forall_hasDerivWithinAt_Icc_eq x₀\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\n⊢ ∃ ε, ε > 0 ∧ ∃ f, f t₀ = x₀ ∧ ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → f t ∈ s ∧ HasDerivAt f (v (f t)) t\n[PROOFSTEP]\nhave hf2' : ∀ t ∈ Ioo (t₀ - ε) (t₀ + ε), HasDerivAt f (v (f t)) t := fun t ht =>\n  (hf2 t (Ioo_subset_Icc_self ht)).hasDerivAt (Icc_mem_nhds ht.1 ht.2)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\n⊢ ∃ ε, ε > 0 ∧ ∃ f, f t₀ = x₀ ∧ ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → f t ∈ s ∧ HasDerivAt f (v (f t)) t\n[PROOFSTEP]\nhave h : f ⁻¹' s ∈ 𝓝 t₀ :=\n  by\n  have := hf2' t₀ (mem_Ioo.mpr ⟨sub_lt_self _ hε, lt_add_of_pos_right _ hε⟩)\n  apply ContinuousAt.preimage_mem_nhds this.continuousAt\n  rw [hf1]\n  exact hs\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\n⊢ f ⁻¹' s ∈ 𝓝 t₀\n[PROOFSTEP]\nhave := hf2' t₀ (mem_Ioo.mpr ⟨sub_lt_self _ hε, lt_add_of_pos_right _ hε⟩)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\nthis : HasDerivAt f (v (f t₀)) t₀\n⊢ f ⁻¹' s ∈ 𝓝 t₀\n[PROOFSTEP]\napply ContinuousAt.preimage_mem_nhds this.continuousAt\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\nthis : HasDerivAt f (v (f t₀)) t₀\n⊢ s ∈ 𝓝 (f t₀)\n[PROOFSTEP]\nrw [hf1]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\nthis : HasDerivAt f (v (f t₀)) t₀\n⊢ s ∈ 𝓝 x₀\n[PROOFSTEP]\nexact hs\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\nh : f ⁻¹' s ∈ 𝓝 t₀\n⊢ ∃ ε, ε > 0 ∧ ∃ f, f t₀ = x₀ ∧ ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → f t ∈ s ∧ HasDerivAt f (v (f t)) t\n[PROOFSTEP]\nrw [Metric.mem_nhds_iff] at h \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\nh : ∃ ε, ε > 0 ∧ ball t₀ ε ⊆ f ⁻¹' s\n⊢ ∃ ε, ε > 0 ∧ ∃ f, f t₀ = x₀ ∧ ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → f t ∈ s ∧ HasDerivAt f (v (f t)) t\n[PROOFSTEP]\nobtain ⟨r, hr1, hr2⟩ := h\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\nr : ℝ\nhr1 : r > 0\nhr2 : ball t₀ r ⊆ f ⁻¹' s\n⊢ ∃ ε, ε > 0 ∧ ∃ f, f t₀ = x₀ ∧ ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → f t ∈ s ∧ HasDerivAt f (v (f t)) t\n[PROOFSTEP]\nrefine\n  ⟨min r ε, lt_min hr1 hε, f, hf1, fun t ht =>\n    ⟨?_,\n      hf2' t\n        (mem_of_mem_of_subset ht\n          (Ioo_subset_Ioo (sub_le_sub_left (min_le_right _ _) _) (add_le_add_left (min_le_right _ _) _)))⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\nr : ℝ\nhr1 : r > 0\nhr2 : ball t₀ r ⊆ f ⁻¹' s\nt : ℝ\nht : t ∈ Ioo (t₀ - min r ε) (t₀ + min r ε)\n⊢ f t ∈ s\n[PROOFSTEP]\nrw [← Set.mem_preimage]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\nr : ℝ\nhr1 : r > 0\nhr2 : ball t₀ r ⊆ f ⁻¹' s\nt : ℝ\nht : t ∈ Ioo (t₀ - min r ε) (t₀ + min r ε)\n⊢ t ∈ f ⁻¹' s\n[PROOFSTEP]\napply Set.mem_of_mem_of_subset _ hr2\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\nr : ℝ\nhr1 : r > 0\nhr2 : ball t₀ r ⊆ f ⁻¹' s\nt : ℝ\nht : t ∈ Ioo (t₀ - min r ε) (t₀ + min r ε)\n⊢ t ∈ ball t₀ r\n[PROOFSTEP]\napply Set.mem_of_mem_of_subset ht\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\nr : ℝ\nhr1 : r > 0\nhr2 : ball t₀ r ⊆ f ⁻¹' s\nt : ℝ\nht : t ∈ Ioo (t₀ - min r ε) (t₀ + min r ε)\n⊢ Ioo (t₀ - min r ε) (t₀ + min r ε) ⊆ ball t₀ r\n[PROOFSTEP]\nrw [← Real.ball_eq_Ioo]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : ProperSpace E\nv : E → E\nt₀ : ℝ\nx₀ : E\ns : Set E\nhv : ContDiffOn ℝ 1 v s\nhs : s ∈ 𝓝 x₀\nε : ℝ\nhε : ε > 0\nL : ℝ≥0\nR C : ℝ\nhpl : IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C\nf : ℝ → E\nhf1 : f t₀ = x₀\nhf2 : ∀ (t : ℝ), t ∈ Icc (t₀ - ε) (t₀ + ε) → HasDerivWithinAt f (v (f t)) (Icc (t₀ - ε) (t₀ + ε)) t\nhf2' : ∀ (t : ℝ), t ∈ Ioo (t₀ - ε) (t₀ + ε) → HasDerivAt f (v (f t)) t\nr : ℝ\nhr1 : r > 0\nhr2 : ball t₀ r ⊆ f ⁻¹' s\nt : ℝ\nht : t ∈ Ioo (t₀ - min r ε) (t₀ + min r ε)\n⊢ ball t₀ (min r ε) ⊆ ball t₀ r\n[PROOFSTEP]\nexact Metric.ball_subset_ball (min_le_left _ _)\n", "meta": {"mathlib_filename": "Mathlib.Analysis.ODE.PicardLindelof", "llama_tokens": 27151, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419831347361, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.3920482007092462}}
{"text": "[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.34375, u_1} C\n⊢ Category.{?u.34397, max (max (?u.34414 + 1) ?u.34375) u_1} (InducedCategory (PresheafedSpace C) toPresheafedSpace)\n[PROOFSTEP]\ninfer_instance\n  -- Porting note: adding an ext lemma.\n  -- See https://github.com/leanprover-community/mathlib4/issues/5229\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.34683, u_1} C\nX Y : SheafedSpace C\nα β : X ⟶ Y\nw : α.base = β.base\n⊢ (Opens.map α.base).op = (Opens.map β.base).op\n[PROOFSTEP]\nrw [w]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.158005, u_1} C\nX : SheafedSpace C\nU : (Opens ↑↑X.toPresheafedSpace)ᵒᵖ\n⊢ X.presheaf.obj U = ((𝟙 X).base _* X.presheaf).obj U\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX : SheafedSpace C\nU : (Opens ↑↑X.toPresheafedSpace)ᵒᵖ\n⊢ NatTrans.app (𝟙 X).c U =\n    eqToHom (_ : X.presheaf.obj U = X.presheaf.obj ((Opens.map (𝟙 ↑X.toPresheafedSpace)).op.obj U))\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.162894, u_1} C\nX Y : SheafedSpace C\nα β : X ⟶ Y\nh : α = β\nU : (Opens ↑↑Y.toPresheafedSpace)ᵒᵖ\n⊢ (Opens.map β.base).op.obj U = (Opens.map α.base).op.obj U\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.162894, u_1} C\nX Y : SheafedSpace C\nα : X ⟶ Y\nU : (Opens ↑↑Y.toPresheafedSpace)ᵒᵖ\n⊢ (Opens.map α.base).op.obj U = (Opens.map α.base).op.obj U\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.SheafedSpace", "llama_tokens": 735, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6334102775181399, "lm_q2_score": 0.6187804337438501, "lm_q1q2_score": 0.3919418862604871}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ne : α ≃ β\nf : Perm α\n⊢ ∀ {x : α}, ↑f x ≠ x ↔ ↑(↑(permCongr e) f) (↑e x) ≠ ↑e x\n[PROOFSTEP]\nintro b\n[GOAL]\nα : Type u_1\nβ : Type u_2\ne : α ≃ β\nf : Perm α\nb : α\n⊢ ↑f b ≠ b ↔ ↑(↑(permCongr e) f) (↑e b) ≠ ↑e b\n[PROOFSTEP]\nsimp only [ne_eq, permCongr_apply, symm_apply_apply, EmbeddingLike.apply_eq_iff_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\np : α → Prop\ninst✝ : DecidablePred p\n⊢ ↑(derangements (Subtype p)) ≃ { f // ∀ (a : α), a ∈ fixedPoints ↑↑f → ¬p a }\n[PROOFSTEP]\nrefine' (Perm.subtypeEquivSubtypePerm p).subtypeEquiv fun f => ⟨fun hf a hfa ha => _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\np : α → Prop\ninst✝ : DecidablePred p\nf : Perm (Subtype p)\nhf : f ∈ derangements (Subtype p)\na : α\nhfa : a ∈ fixedPoints ↑↑(↑(Perm.subtypeEquivSubtypePerm p) f)\nha : p a\n⊢ False\n[PROOFSTEP]\nrefine' hf ⟨a, ha⟩ (Subtype.ext _)\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\np : α → Prop\ninst✝ : DecidablePred p\nf : Perm (Subtype p)\nhf : f ∈ derangements (Subtype p)\na : α\nhfa : a ∈ fixedPoints ↑↑(↑(Perm.subtypeEquivSubtypePerm p) f)\nha : p a\n⊢ ↑(↑f { val := a, property := ha }) = ↑{ val := a, property := ha }\n[PROOFSTEP]\nsimp_rw [mem_fixedPoints, IsFixedPt, Perm.subtypeEquivSubtypePerm, Equiv.coe_fn_mk, Perm.ofSubtype_apply_of_mem _ ha] at\n  hfa \n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\np : α → Prop\ninst✝ : DecidablePred p\nf : Perm (Subtype p)\nhf : f ∈ derangements (Subtype p)\na : α\nha : p a\nhfa : ↑(↑f { val := a, property := ha }) = a\n⊢ ↑(↑f { val := a, property := ha }) = ↑{ val := a, property := ha }\n[PROOFSTEP]\nassumption\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\np : α → Prop\ninst✝ : DecidablePred p\nf : Perm (Subtype p)\n⊢ (∀ (a : α), a ∈ fixedPoints ↑↑(↑(Perm.subtypeEquivSubtypePerm p) f) → ¬p a) → f ∈ derangements (Subtype p)\n[PROOFSTEP]\nrintro hf ⟨a, ha⟩ hfa\n[GOAL]\ncase refine'_2.mk\nα : Type u_1\nβ : Type u_2\np : α → Prop\ninst✝ : DecidablePred p\nf : Perm (Subtype p)\nhf : ∀ (a : α), a ∈ fixedPoints ↑↑(↑(Perm.subtypeEquivSubtypePerm p) f) → ¬p a\na : α\nha : p a\nhfa : ↑f { val := a, property := ha } = { val := a, property := ha }\n⊢ False\n[PROOFSTEP]\nrefine' hf _ _ ha\n[GOAL]\ncase refine'_2.mk\nα : Type u_1\nβ : Type u_2\np : α → Prop\ninst✝ : DecidablePred p\nf : Perm (Subtype p)\nhf : ∀ (a : α), a ∈ fixedPoints ↑↑(↑(Perm.subtypeEquivSubtypePerm p) f) → ¬p a\na : α\nha : p a\nhfa : ↑f { val := a, property := ha } = { val := a, property := ha }\n⊢ a ∈ fixedPoints ↑↑(↑(Perm.subtypeEquivSubtypePerm p) f)\n[PROOFSTEP]\nsimp only [Perm.subtypeEquivSubtypePerm_apply_coe, mem_fixedPoints]\n[GOAL]\ncase refine'_2.mk\nα : Type u_1\nβ : Type u_2\np : α → Prop\ninst✝ : DecidablePred p\nf : Perm (Subtype p)\nhf : ∀ (a : α), a ∈ fixedPoints ↑↑(↑(Perm.subtypeEquivSubtypePerm p) f) → ¬p a\na : α\nha : p a\nhfa : ↑f { val := a, property := ha } = { val := a, property := ha }\n⊢ IsFixedPt (↑(↑Perm.ofSubtype f)) a\n[PROOFSTEP]\ndsimp [IsFixedPt]\n[GOAL]\ncase refine'_2.mk\nα : Type u_1\nβ : Type u_2\np : α → Prop\ninst✝ : DecidablePred p\nf : Perm (Subtype p)\nhf : ∀ (a : α), a ∈ fixedPoints ↑↑(↑(Perm.subtypeEquivSubtypePerm p) f) → ¬p a\na : α\nha : p a\nhfa : ↑f { val := a, property := ha } = { val := a, property := ha }\n⊢ ↑(↑Perm.ofSubtype f) a = a\n[PROOFSTEP]\nsimp_rw [Perm.ofSubtype_apply_of_mem _ ha, hfa]\n[GOAL]\nα : Type u_1\nβ : Type u_2\np : α → Prop\ninst✝ : DecidablePred p\nf : Perm α\n⊢ (∃ _h, ∀ (a : α), a ∈ fixedPoints ↑f → ¬p a) ↔ ∀ (a : α), ¬p a ↔ a ∈ fixedPoints ↑f\n[PROOFSTEP]\nsimp_rw [exists_prop, ← forall_and, ← iff_iff_implies_and_implies]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\n⊢ { f // a ∈ fixedPoints ↑↑f } ⊕ { f // ¬a ∈ fixedPoints ↑↑f } ≃\n    { f // fixedPoints ↑f ⊆ {a} ∧ a ∈ fixedPoints ↑f } ⊕ { f // fixedPoints ↑f ⊆ {a} ∧ ¬a ∈ fixedPoints ↑f }\n[PROOFSTEP]\nrefine' Equiv.sumCongr _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\n⊢ { f // a ∈ fixedPoints ↑↑f } ≃ { f // fixedPoints ↑f ⊆ {a} ∧ a ∈ fixedPoints ↑f }\n[PROOFSTEP]\nexact subtypeSubtypeEquivSubtypeInter (fun x : Perm α => fixedPoints x ⊆ { a }) (a ∈ fixedPoints ·)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\n⊢ { f // ¬a ∈ fixedPoints ↑↑f } ≃ { f // fixedPoints ↑f ⊆ {a} ∧ ¬a ∈ fixedPoints ↑f }\n[PROOFSTEP]\nexact subtypeSubtypeEquivSubtypeInter (fun x : Perm α => fixedPoints x ⊆ { a }) (¬a ∈ fixedPoints ·)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\n⊢ { f // fixedPoints ↑f ⊆ {a} ∧ a ∈ fixedPoints ↑f } ⊕ { f // fixedPoints ↑f ⊆ {a} ∧ ¬a ∈ fixedPoints ↑f } ≃\n    { f // fixedPoints ↑f = {a} } ⊕ { f // fixedPoints ↑f = ∅ }\n[PROOFSTEP]\nrefine' Equiv.sumCongr (subtypeEquivRight fun f => _) (subtypeEquivRight fun f => _)\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\n⊢ fixedPoints ↑f ⊆ {a} ∧ a ∈ fixedPoints ↑f ↔ fixedPoints ↑f = {a}\n[PROOFSTEP]\nrw [Set.eq_singleton_iff_unique_mem, and_comm]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\n⊢ a ∈ fixedPoints ↑f ∧ fixedPoints ↑f ⊆ {a} ↔ a ∈ fixedPoints ↑f ∧ ∀ (x : α), x ∈ fixedPoints ↑f → x = a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\n⊢ fixedPoints ↑f ⊆ {a} ∧ ¬a ∈ fixedPoints ↑f ↔ fixedPoints ↑f = ∅\n[PROOFSTEP]\nrw [Set.eq_empty_iff_forall_not_mem]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\n⊢ fixedPoints ↑f ⊆ {a} ∧ ¬a ∈ fixedPoints ↑f ↔ ∀ (x : α), ¬x ∈ fixedPoints ↑f\n[PROOFSTEP]\nrefine' ⟨fun h x hx => h.2 (h.1 hx ▸ hx), fun h => ⟨fun x hx => (h _ hx).elim, h _⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\n⊢ { f // fixedPoints ↑f = {a} } ⊕ { f // fixedPoints ↑f = ∅ } ≃ ↑(derangements ↑{a}ᶜ) ⊕ ↑(derangements α)\n[PROOFSTEP]\nrefine'\n  Equiv.sumCongr ((derangements.subtypeEquiv (· ∈ ({ a }ᶜ : Set α))).trans <| subtypeEquivRight fun x => _).symm\n    (subtypeEquivRight fun f => mem_derangements_iff_fixedPoints_eq_empty.symm)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nx : Perm α\n⊢ (∀ (a_1 : α), ¬a_1 ∈ {a}ᶜ ↔ a_1 ∈ fixedPoints ↑x) ↔ fixedPoints ↑x = {a}\n[PROOFSTEP]\nrw [eq_comm, Set.ext_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nx : Perm α\n⊢ (∀ (a_1 : α), ¬a_1 ∈ {a}ᶜ ↔ a_1 ∈ fixedPoints ↑x) ↔ ∀ (x_1 : α), x_1 ∈ {a} ↔ x_1 ∈ fixedPoints ↑x\n[PROOFSTEP]\nsimp_rw [Set.mem_compl_iff, Classical.not_not]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : Option α\nf : Perm α\n⊢ f ∈ fiber a ↔ ∃ F, F ∈ derangements (Option α) ∧ ↑F none = a ∧ removeNone F = f\n[PROOFSTEP]\nsimp [RemoveNone.fiber, derangements]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\n⊢ fiber none = ∅\n[PROOFSTEP]\nrw [Set.eq_empty_iff_forall_not_mem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\n⊢ ∀ (x : Perm α), ¬x ∈ fiber none\n[PROOFSTEP]\nintro f hyp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\nf : Perm α\nhyp : f ∈ fiber none\n⊢ False\n[PROOFSTEP]\nrw [RemoveNone.mem_fiber] at hyp \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\nf : Perm α\nhyp : ∃ F, F ∈ derangements (Option α) ∧ ↑F none = none ∧ removeNone F = f\n⊢ False\n[PROOFSTEP]\nrcases hyp with ⟨F, F_derangement, F_none, _⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\nf : Perm α\nF : Perm (Option α)\nF_derangement : F ∈ derangements (Option α)\nF_none : ↑F none = none\nright✝ : removeNone F = f\n⊢ False\n[PROOFSTEP]\nexact F_derangement none F_none\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\n⊢ fiber (some a) = {f | fixedPoints ↑f ⊆ {a}}\n[PROOFSTEP]\next f\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\n⊢ f ∈ fiber (some a) ↔ f ∈ {f | fixedPoints ↑f ⊆ {a}}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\n⊢ f ∈ fiber (some a) → f ∈ {f | fixedPoints ↑f ⊆ {a}}\n[PROOFSTEP]\nrw [RemoveNone.mem_fiber]\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\n⊢ (∃ F, F ∈ derangements (Option α) ∧ ↑F none = some a ∧ removeNone F = f) → f ∈ {f | fixedPoints ↑f ⊆ {a}}\n[PROOFSTEP]\nrintro ⟨F, F_derangement, F_none, rfl⟩ x x_fixed\n[GOAL]\ncase h.mp.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nF : Perm (Option α)\nF_derangement : F ∈ derangements (Option α)\nF_none : ↑F none = some a\nx : α\nx_fixed : x ∈ fixedPoints ↑(removeNone F)\n⊢ x ∈ {a}\n[PROOFSTEP]\nrw [mem_fixedPoints_iff] at x_fixed \n[GOAL]\ncase h.mp.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nF : Perm (Option α)\nF_derangement : F ∈ derangements (Option α)\nF_none : ↑F none = some a\nx : α\nx_fixed : ↑(removeNone F) x = x\n⊢ x ∈ {a}\n[PROOFSTEP]\napply_fun some at x_fixed \n[GOAL]\ncase h.mp.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nF : Perm (Option α)\nF_derangement : F ∈ derangements (Option α)\nF_none : ↑F none = some a\nx : α\nx_fixed : some (↑(removeNone F) x) = some x\n⊢ x ∈ {a}\n[PROOFSTEP]\ncases' Fx : F (some x) with y\n[GOAL]\ncase h.mp.intro.intro.intro.none\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nF : Perm (Option α)\nF_derangement : F ∈ derangements (Option α)\nF_none : ↑F none = some a\nx : α\nx_fixed : some (↑(removeNone F) x) = some x\nFx : ↑F (some x) = none\n⊢ x ∈ {a}\n[PROOFSTEP]\nrwa [removeNone_none F Fx, F_none, Option.some_inj, eq_comm] at x_fixed \n[GOAL]\ncase h.mp.intro.intro.intro.some\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nF : Perm (Option α)\nF_derangement : F ∈ derangements (Option α)\nF_none : ↑F none = some a\nx : α\nx_fixed : some (↑(removeNone F) x) = some x\ny : α\nFx : ↑F (some x) = some y\n⊢ x ∈ {a}\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h.mp.intro.intro.intro.some.h\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nF : Perm (Option α)\nF_derangement : F ∈ derangements (Option α)\nF_none : ↑F none = some a\nx : α\nx_fixed : some (↑(removeNone F) x) = some x\ny : α\nFx : ↑F (some x) = some y\n⊢ False\n[PROOFSTEP]\nrw [removeNone_some F ⟨y, Fx⟩] at x_fixed \n[GOAL]\ncase h.mp.intro.intro.intro.some.h\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nF : Perm (Option α)\nF_derangement : F ∈ derangements (Option α)\nF_none : ↑F none = some a\nx : α\nx_fixed : ↑F (some x) = some x\ny : α\nFx : ↑F (some x) = some y\n⊢ False\n[PROOFSTEP]\nexact F_derangement _ x_fixed\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\n⊢ f ∈ {f | fixedPoints ↑f ⊆ {a}} → f ∈ fiber (some a)\n[PROOFSTEP]\nintro h_opfp\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\n⊢ f ∈ fiber (some a)\n[PROOFSTEP]\nuse Equiv.Perm.decomposeOption.symm (some a, f)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\n⊢ ↑Perm.decomposeOption.symm (some a, f) ∈ derangements (Option α) ∧\n    ↑Perm.decomposeOption (↑Perm.decomposeOption.symm (some a, f)) = (some a, f)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\n⊢ ↑Perm.decomposeOption.symm (some a, f) ∈ derangements (Option α)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h.left\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\nx : Option α\n⊢ ↑(↑Perm.decomposeOption.symm (some a, f)) x ≠ x\n[PROOFSTEP]\napply_fun fun x => Equiv.swap none (some a) x\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\nx : Option α\n⊢ (fun x => ↑(Equiv.swap none (some a)) x) (↑(↑Perm.decomposeOption.symm (some a, f)) x) ≠\n    (fun x => ↑(Equiv.swap none (some a)) x) x\n[PROOFSTEP]\nsimp only [Perm.decomposeOption_symm_apply, swap_apply_self, Perm.coe_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\nx : Option α\n⊢ ↑(Equiv.swap none (some a)) ((↑(Equiv.swap none (some a)) ∘ ↑(optionCongr f)) x) ≠ ↑(Equiv.swap none (some a)) x\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\n⊢ ↑(Equiv.swap none (some a)) ((↑(Equiv.swap none (some a)) ∘ ↑(optionCongr f)) none) ≠ ↑(Equiv.swap none (some a)) none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\nx : α\n⊢ ↑(Equiv.swap none (some a)) ((↑(Equiv.swap none (some a)) ∘ ↑(optionCongr f)) (some x)) ≠\n    ↑(Equiv.swap none (some a)) (some x)\n[PROOFSTEP]\nsimp only [comp, optionCongr_apply, Option.map_some', swap_apply_self]\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\nx : α\n⊢ some (↑f x) ≠ ↑(Equiv.swap none (some a)) (some x)\n[PROOFSTEP]\nby_cases x_vs_a : x = a\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\nx : α\nx_vs_a : x = a\n⊢ some (↑f x) ≠ ↑(Equiv.swap none (some a)) (some x)\n[PROOFSTEP]\nrw [x_vs_a, swap_apply_right]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\nx : α\nx_vs_a : x = a\n⊢ some (↑f a) ≠ none\n[PROOFSTEP]\napply Option.some_ne_none\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\nx : α\nx_vs_a : ¬x = a\n⊢ some (↑f x) ≠ ↑(Equiv.swap none (some a)) (some x)\n[PROOFSTEP]\nhave ne_1 : some x ≠ none := Option.some_ne_none _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\nx : α\nx_vs_a : ¬x = a\nne_1 : some x ≠ none\n⊢ some (↑f x) ≠ ↑(Equiv.swap none (some a)) (some x)\n[PROOFSTEP]\nhave ne_2 : some x ≠ some a := (Option.some_injective α).ne_iff.mpr x_vs_a\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\nx : α\nx_vs_a : ¬x = a\nne_1 : some x ≠ none\nne_2 : some x ≠ some a\n⊢ some (↑f x) ≠ ↑(Equiv.swap none (some a)) (some x)\n[PROOFSTEP]\nrw [swap_apply_of_ne_of_ne ne_1 ne_2, (Option.some_injective α).ne_iff]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\nx : α\nx_vs_a : ¬x = a\nne_1 : some x ≠ none\nne_2 : some x ≠ some a\n⊢ ↑f x ≠ x\n[PROOFSTEP]\nintro contra\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\nx : α\nx_vs_a : ¬x = a\nne_1 : some x ≠ none\nne_2 : some x ≠ some a\ncontra : ↑f x = x\n⊢ False\n[PROOFSTEP]\nexact x_vs_a (h_opfp contra)\n[GOAL]\ncase h.right\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\na : α\nf : Perm α\nh_opfp : f ∈ {f | fixedPoints ↑f ⊆ {a}}\n⊢ ↑Perm.decomposeOption (↑Perm.decomposeOption.symm (some a, f)) = (some a, f)\n[PROOFSTEP]\nrw [apply_symm_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\n⊢ ↑(derangements (Option α)) ≃ (a : α) × ↑{f | fixedPoints ↑f ⊆ {a}}\n[PROOFSTEP]\nhave fiber_none_is_false : Equiv.RemoveNone.fiber (@none α) → False :=\n  by\n  rw [Equiv.RemoveNone.fiber_none]\n  exact IsEmpty.false\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\n⊢ ↑(Equiv.RemoveNone.fiber none) → False\n[PROOFSTEP]\nrw [Equiv.RemoveNone.fiber_none]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\n⊢ ↑∅ → False\n[PROOFSTEP]\nexact IsEmpty.false\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\nfiber_none_is_false : ↑(Equiv.RemoveNone.fiber none) → False\n⊢ ↑(derangements (Option α)) ≃ (a : α) × ↑{f | fixedPoints ↑f ⊆ {a}}\n[PROOFSTEP]\ncalc\n  derangements (Option α) ≃ Equiv.Perm.decomposeOption '' derangements (Option α) := Equiv.image _ _\n  _ ≃ Σ a : Option α, ↥(Equiv.RemoveNone.fiber a) := (setProdEquivSigma _)\n  _ ≃ Σ a : α, ↥(Equiv.RemoveNone.fiber (some a)) := (sigmaOptionEquivOfSome _ fiber_none_is_false)\n  _ ≃ Σ a : α, {f : Perm α | fixedPoints f ⊆ { a }} :=\n    by\n    simp_rw [Equiv.RemoveNone.fiber_some]\n    rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\nfiber_none_is_false : ↑(Equiv.RemoveNone.fiber none) → False\n⊢ (a : α) × ↑(Equiv.RemoveNone.fiber (some a)) ≃ (a : α) × ↑{f | fixedPoints ↑f ⊆ {a}}\n[PROOFSTEP]\nsimp_rw [Equiv.RemoveNone.fiber_some]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\nfiber_none_is_false : ↑(Equiv.RemoveNone.fiber none) → False\n⊢ (a : α) × ↑{f | fixedPoints ↑f ⊆ {a}} ≃ (a : α) × ↑{f | fixedPoints ↑f ⊆ {a}}\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Derangements.Basic", "llama_tokens": 8025, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6334102775181399, "lm_q2_score": 0.6187804337438501, "lm_q1q2_score": 0.3919418862604871}}
{"text": "[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\n⊢ ∑ x : σ → K, ↑(eval x) f = 0\n[PROOFSTEP]\nhaveI : DecidableEq K := Classical.decEq K\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\n⊢ ∑ x : σ → K, ↑(eval x) f = 0\n[PROOFSTEP]\ncalc\n  ∑ x, eval x f = ∑ x : σ → K, ∑ d in f.support, f.coeff d * ∏ i, x i ^ d i := by simp only [eval_eq']\n  _ = ∑ d in f.support, ∑ x : σ → K, f.coeff d * ∏ i, x i ^ d i := sum_comm\n  _ = 0 := sum_eq_zero ?_\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\n⊢ ∑ x : σ → K, ↑(eval x) f = ∑ x : σ → K, ∑ d in support f, coeff d f * ∏ i : σ, x i ^ ↑d i\n[PROOFSTEP]\nsimp only [eval_eq']\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\n⊢ ∀ (x : σ →₀ ℕ), x ∈ support f → ∑ x_1 : σ → K, coeff x f * ∏ i : σ, x_1 i ^ ↑x i = 0\n[PROOFSTEP]\nintro d hd\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\n⊢ ∑ x : σ → K, coeff d f * ∏ i : σ, x i ^ ↑d i = 0\n[PROOFSTEP]\nobtain ⟨i, hi⟩ : ∃ i, d i < q - 1\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\n⊢ ∃ i, ↑d i < q - 1\ncase intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\n⊢ ∑ x : σ → K, coeff d f * ∏ i : σ, x i ^ ↑d i = 0\n[PROOFSTEP]\nexact f.exists_degree_lt (q - 1) h hd\n[GOAL]\ncase intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\n⊢ ∑ x : σ → K, coeff d f * ∏ i : σ, x i ^ ↑d i = 0\n[PROOFSTEP]\ncalc\n  (∑ x : σ → K, f.coeff d * ∏ i, x i ^ d i) = f.coeff d * ∑ x : σ → K, ∏ i, x i ^ d i := mul_sum.symm\n  _ = 0 := (mul_eq_zero.mpr ∘ Or.inr) ?_\n[GOAL]\ncase intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\n⊢ ∑ x : σ → K, ∏ i : σ, x i ^ ↑d i = 0\n[PROOFSTEP]\ncalc\n  (∑ x : σ → K, ∏ i, x i ^ d i) =\n      ∑ x₀ : { j // j ≠ i } → K, ∑ x : { x : σ → K // x ∘ (↑) = x₀ }, ∏ j, (x : σ → K) j ^ d j :=\n    (Fintype.sum_fiberwise _ _).symm\n  _ = 0 := Fintype.sum_eq_zero _ ?_\n[GOAL]\ncase intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\n⊢ ∀ (a : { j // j ≠ i } → K), ∑ x : { x // x ∘ Subtype.val = a }, ∏ j : σ, ↑x j ^ ↑d j = 0\n[PROOFSTEP]\nintro x₀\n[GOAL]\ncase intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\n⊢ ∑ x : { x // x ∘ Subtype.val = x₀ }, ∏ j : σ, ↑x j ^ ↑d j = 0\n[PROOFSTEP]\nlet e : K ≃ { x // x ∘ ((↑) : _ → σ) = x₀ } := (Equiv.subtypeEquivCodomain _).symm\n[GOAL]\ncase intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\n⊢ ∑ x : { x // x ∘ Subtype.val = x₀ }, ∏ j : σ, ↑x j ^ ↑d j = 0\n[PROOFSTEP]\ncalc\n  (∑ x : { x : σ → K // x ∘ (↑) = x₀ }, ∏ j, (x : σ → K) j ^ d j) = ∑ a : K, ∏ j : σ, (e a : σ → K) j ^ d j :=\n    (e.sum_comp _).symm\n  _ = ∑ a : K, (∏ j, x₀ j ^ d j) * a ^ d i := (Fintype.sum_congr _ _ ?_)\n  _ = (∏ j, x₀ j ^ d j) * ∑ a : K, a ^ d i := by rw [mul_sum]\n  _ = 0 := by rw [sum_pow_lt_card_sub_one K _ hi, mul_zero]\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\n⊢ ∑ a : K, (∏ j : { j // j ≠ i }, x₀ j ^ ↑d ↑j) * a ^ ↑d i = (∏ j : { j // j ≠ i }, x₀ j ^ ↑d ↑j) * ∑ a : K, a ^ ↑d i\n[PROOFSTEP]\nrw [mul_sum]\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\n⊢ (∏ j : { j // j ≠ i }, x₀ j ^ ↑d ↑j) * ∑ a : K, a ^ ↑d i = 0\n[PROOFSTEP]\nrw [sum_pow_lt_card_sub_one K _ hi, mul_zero]\n[GOAL]\ncase intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\n⊢ ∀ (a : K), ∏ j : σ, ↑(↑e a) j ^ ↑d j = (∏ j : { j // j ≠ i }, x₀ j ^ ↑d ↑j) * a ^ ↑d i\n[PROOFSTEP]\nintro a\n[GOAL]\ncase intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\na : K\n⊢ ∏ j : σ, ↑(↑e a) j ^ ↑d j = (∏ j : { j // j ≠ i }, x₀ j ^ ↑d ↑j) * a ^ ↑d i\n[PROOFSTEP]\nlet e' : Sum { j // j = i } { j // j ≠ i } ≃ σ := Equiv.sumCompl _\n[GOAL]\ncase intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\na : K\ne' : { j // j = i } ⊕ { j // j ≠ i } ≃ σ := Equiv.sumCompl fun j => j = i\n⊢ ∏ j : σ, ↑(↑e a) j ^ ↑d j = (∏ j : { j // j ≠ i }, x₀ j ^ ↑d ↑j) * a ^ ↑d i\n[PROOFSTEP]\nletI : Unique { j // j = i } :=\n  { default := ⟨i, rfl⟩\n    uniq := fun ⟨j, h⟩ => Subtype.val_injective h }\n[GOAL]\ncase intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis✝ : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\na : K\ne' : { j // j = i } ⊕ { j // j ≠ i } ≃ σ := Equiv.sumCompl fun j => j = i\nthis : Unique { j // j = i } :=\n  { toInhabited := { default := { val := i, property := (_ : i = i) } },\n    uniq := (_ : ∀ (x : { j // j = i }), x = default) }\n⊢ ∏ j : σ, ↑(↑e a) j ^ ↑d j = (∏ j : { j // j ≠ i }, x₀ j ^ ↑d ↑j) * a ^ ↑d i\n[PROOFSTEP]\ncalc\n  (∏ j : σ, (e a : σ → K) j ^ d j) = (e a : σ → K) i ^ d i * ∏ j : { j // j ≠ i }, (e a : σ → K) j ^ d j := by\n    rw [← e'.prod_comp, Fintype.prod_sum_type, univ_unique, prod_singleton]; rfl\n  _ = a ^ d i * ∏ j : { j // j ≠ i }, (e a : σ → K) j ^ d j := by rw [Equiv.subtypeEquivCodomain_symm_apply_eq]\n  _ = a ^ d i * ∏ j, x₀ j ^ d j :=\n    (congr_arg _ (Fintype.prod_congr _ _ ?_))\n      -- see below\n  _ = (∏ j, x₀ j ^ d j) * a ^ d i := mul_comm _ _\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis✝ : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\na : K\ne' : { j // j = i } ⊕ { j // j ≠ i } ≃ σ := Equiv.sumCompl fun j => j = i\nthis : Unique { j // j = i } :=\n  { toInhabited := { default := { val := i, property := (_ : i = i) } },\n    uniq := (_ : ∀ (x : { j // j = i }), x = default) }\n⊢ ∏ j : σ, ↑(↑e a) j ^ ↑d j = ↑(↑e a) i ^ ↑d i * ∏ j : { j // j ≠ i }, ↑(↑e a) ↑j ^ ↑d ↑j\n[PROOFSTEP]\nrw [← e'.prod_comp, Fintype.prod_sum_type, univ_unique, prod_singleton]\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis✝ : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\na : K\ne' : { j // j = i } ⊕ { j // j ≠ i } ≃ σ := Equiv.sumCompl fun j => j = i\nthis : Unique { j // j = i } :=\n  { toInhabited := { default := { val := i, property := (_ : i = i) } },\n    uniq := (_ : ∀ (x : { j // j = i }), x = default) }\n⊢ ↑(↑e a) (↑e' (Sum.inl default)) ^ ↑d (↑e' (Sum.inl default)) *\n      ∏ a₂ : { j // j ≠ i }, ↑(↑e a) (↑e' (Sum.inr a₂)) ^ ↑d (↑e' (Sum.inr a₂)) =\n    ↑(↑e a) i ^ ↑d i * ∏ j : { j // j ≠ i }, ↑(↑e a) ↑j ^ ↑d ↑j\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis✝ : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\na : K\ne' : { j // j = i } ⊕ { j // j ≠ i } ≃ σ := Equiv.sumCompl fun j => j = i\nthis : Unique { j // j = i } :=\n  { toInhabited := { default := { val := i, property := (_ : i = i) } },\n    uniq := (_ : ∀ (x : { j // j = i }), x = default) }\n⊢ ↑(↑e a) i ^ ↑d i * ∏ j : { j // j ≠ i }, ↑(↑e a) ↑j ^ ↑d ↑j = a ^ ↑d i * ∏ j : { j // j ≠ i }, ↑(↑e a) ↑j ^ ↑d ↑j\n[PROOFSTEP]\nrw [Equiv.subtypeEquivCodomain_symm_apply_eq]\n[GOAL]\ncase intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis✝ : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\na : K\ne' : { j // j = i } ⊕ { j // j ≠ i } ≃ σ := Equiv.sumCompl fun j => j = i\nthis : Unique { j // j = i } :=\n  { toInhabited := { default := { val := i, property := (_ : i = i) } },\n    uniq := (_ : ∀ (x : { j // j = i }), x = default) }\n⊢ ∀ (a_1 : { j // j ≠ i }), ↑(↑e a) ↑a_1 ^ ↑d ↑a_1 = x₀ a_1 ^ ↑d ↑a_1\n[PROOFSTEP]\nrintro ⟨j, hj⟩\n[GOAL]\ncase intro.mk\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis✝ : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\na : K\ne' : { j // j = i } ⊕ { j // j ≠ i } ≃ σ := Equiv.sumCompl fun j => j = i\nthis : Unique { j // j = i } :=\n  { toInhabited := { default := { val := i, property := (_ : i = i) } },\n    uniq := (_ : ∀ (x : { j // j = i }), x = default) }\nj : σ\nhj : j ≠ i\n⊢ ↑(↑e a) ↑{ val := j, property := hj } ^ ↑d ↑{ val := j, property := hj } =\n    x₀ { val := j, property := hj } ^ ↑d ↑{ val := j, property := hj }\n[PROOFSTEP]\nshow (e a : σ → K) j ^ d j = x₀ ⟨j, hj⟩ ^ d j\n[GOAL]\ncase intro.mk\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝³ : Fintype K\ninst✝² : Field K\ninst✝¹ : Fintype σ\ninst✝ : DecidableEq σ\nf : MvPolynomial σ K\nh : totalDegree f < (q - 1) * Fintype.card σ\nthis✝ : DecidableEq K\nd : σ →₀ ℕ\nhd : d ∈ support f\ni : σ\nhi : ↑d i < q - 1\nx₀ : { j // j ≠ i } → K\ne : K ≃ { x // x ∘ Subtype.val = x₀ } := (Equiv.subtypeEquivCodomain x₀).symm\na : K\ne' : { j // j = i } ⊕ { j // j ≠ i } ≃ σ := Equiv.sumCompl fun j => j = i\nthis : Unique { j // j = i } :=\n  { toInhabited := { default := { val := i, property := (_ : i = i) } },\n    uniq := (_ : ∀ (x : { j // j = i }), x = default) }\nj : σ\nhj : j ≠ i\n⊢ ↑(↑e a) j ^ ↑d j = x₀ { val := j, property := hj } ^ ↑d j\n[PROOFSTEP]\nrw [Equiv.subtypeEquivCodomain_symm_apply_ne]\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\n⊢ p ∣ Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 }\n[PROOFSTEP]\nhave hq : 0 < q - 1 := by rw [← Fintype.card_units, Fintype.card_pos_iff]; exact ⟨1⟩\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\n⊢ 0 < q - 1\n[PROOFSTEP]\nrw [← Fintype.card_units, Fintype.card_pos_iff]\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\n⊢ Nonempty Kˣ\n[PROOFSTEP]\nexact ⟨1⟩\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\n⊢ p ∣ Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 }\n[PROOFSTEP]\nlet S : Finset (σ → K) := {x ∈ univ | ∀ i ∈ s, eval x (f i) = 0}.toFinset\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\n⊢ p ∣ Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 }\n[PROOFSTEP]\nhave hS : ∀ x : σ → K, x ∈ S ↔ ∀ i : ι, i ∈ s → eval x (f i) = 0 :=\n  by\n  intro x\n  simp only [Set.toFinset_setOf, mem_univ, true_and, mem_filter]\n    /- The polynomial `F = ∏ i in s, (1 - (f i)^(q - 1))` has the nice property\n        that it takes the value `1` on elements of `{x : σ → K // ∀ i ∈ s, (f i).eval x = 0}`\n        while it is `0` outside that locus.\n        Hence the sum of its values is equal to the cardinality of\n        `{x : σ → K // ∀ i ∈ s, (f i).eval x = 0}` modulo `p`. -/\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\n⊢ ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\n[PROOFSTEP]\nintro x\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nx : σ → K\n⊢ x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\n[PROOFSTEP]\nsimp only [Set.toFinset_setOf, mem_univ, true_and, mem_filter]\n  /- The polynomial `F = ∏ i in s, (1 - (f i)^(q - 1))` has the nice property\n      that it takes the value `1` on elements of `{x : σ → K // ∀ i ∈ s, (f i).eval x = 0}`\n      while it is `0` outside that locus.\n      Hence the sum of its values is equal to the cardinality of\n      `{x : σ → K // ∀ i ∈ s, (f i).eval x = 0}` modulo `p`. -/\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\n⊢ p ∣ Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 }\n[PROOFSTEP]\nlet F : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\n⊢ p ∣ Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 }\n[PROOFSTEP]\nhave hF : ∀ x, eval x F = if x ∈ S then 1 else 0 := by\n  intro x\n  calc\n    eval x F = ∏ i in s, eval x (1 - f i ^ (q - 1)) := eval_prod s _ x\n    _ = if x ∈ S then 1 else 0 := ?_\n  simp only [(eval x).map_sub, (eval x).map_pow, (eval x).map_one]\n  split_ifs with hx\n  · apply Finset.prod_eq_one\n    intro i hi\n    rw [hS] at hx \n    rw [hx i hi, zero_pow hq, sub_zero]\n  · obtain ⟨i, hi, hx⟩ : ∃ i : ι, i ∈ s ∧ eval x (f i) ≠ 0 := by simpa only [hS, not_forall, not_imp] using hx\n    apply Finset.prod_eq_zero hi\n    rw [pow_card_sub_one_eq_one (eval x (f i)) hx, sub_self]\n      -- In particular, we can now show:\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\n⊢ ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\n[PROOFSTEP]\nintro x\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nx : σ → K\n⊢ ↑(eval x) F = if x ∈ S then 1 else 0\n[PROOFSTEP]\ncalc\n  eval x F = ∏ i in s, eval x (1 - f i ^ (q - 1)) := eval_prod s _ x\n  _ = if x ∈ S then 1 else 0 := ?_\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nx : σ → K\n⊢ ∏ i in s, ↑(eval x) (1 - f i ^ (q - 1)) = if x ∈ S then 1 else 0\n[PROOFSTEP]\nsimp only [(eval x).map_sub, (eval x).map_pow, (eval x).map_one]\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nx : σ → K\n⊢ ∏ x_1 in s, (1 - ↑(eval x) (f x_1) ^ (q - 1)) =\n    if x ∈ Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0} then 1 else 0\n[PROOFSTEP]\nsplit_ifs with hx\n[GOAL]\ncase pos\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nx : σ → K\nhx : x ∈ Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\n⊢ ∏ x_1 in s, (1 - ↑(eval x) (f x_1) ^ (q - 1)) = 1\n[PROOFSTEP]\napply Finset.prod_eq_one\n[GOAL]\ncase pos.h\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nx : σ → K\nhx : x ∈ Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\n⊢ ∀ (x_1 : ι), x_1 ∈ s → 1 - ↑(eval x) (f x_1) ^ (q - 1) = 1\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase pos.h\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nx : σ → K\nhx : x ∈ Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\ni : ι\nhi : i ∈ s\n⊢ 1 - ↑(eval x) (f i) ^ (q - 1) = 1\n[PROOFSTEP]\nrw [hS] at hx \n[GOAL]\ncase pos.h\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nx : σ → K\nhx : ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\ni : ι\nhi : i ∈ s\n⊢ 1 - ↑(eval x) (f i) ^ (q - 1) = 1\n[PROOFSTEP]\nrw [hx i hi, zero_pow hq, sub_zero]\n[GOAL]\ncase neg\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nx : σ → K\nhx : ¬x ∈ Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\n⊢ ∏ x_1 in s, (1 - ↑(eval x) (f x_1) ^ (q - 1)) = 0\n[PROOFSTEP]\nobtain ⟨i, hi, hx⟩ : ∃ i : ι, i ∈ s ∧ eval x (f i) ≠ 0 := by simpa only [hS, not_forall, not_imp] using hx\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nx : σ → K\nhx : ¬x ∈ Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\n⊢ ∃ i, i ∈ s ∧ ↑(eval x) (f i) ≠ 0\n[PROOFSTEP]\nsimpa only [hS, not_forall, not_imp] using hx\n[GOAL]\ncase neg.intro.intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nx : σ → K\nhx✝ : ¬x ∈ Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\ni : ι\nhi : i ∈ s\nhx : ↑(eval x) (f i) ≠ 0\n⊢ ∏ x_1 in s, (1 - ↑(eval x) (f x_1) ^ (q - 1)) = 0\n[PROOFSTEP]\napply Finset.prod_eq_zero hi\n[GOAL]\ncase neg.intro.intro\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nx : σ → K\nhx✝ : ¬x ∈ Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\ni : ι\nhi : i ∈ s\nhx : ↑(eval x) (f i) ≠ 0\n⊢ 1 - ↑(eval x) (f i) ^ (q - 1) = 0\n[PROOFSTEP]\nrw [pow_card_sub_one_eq_one (eval x (f i)) hx, sub_self]\n  -- In particular, we can now show:\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\n⊢ p ∣ Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 }\n[PROOFSTEP]\nhave key : ∑ x, eval x F = Fintype.card { x : σ → K // ∀ i ∈ s, eval x (f i) = 0 }\n[GOAL]\ncase key\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\n⊢ ∑ x : σ → K, ↑(eval x) F = ↑(Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 })\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\nkey : ∑ x : σ → K, ↑(eval x) F = ↑(Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 })\n⊢ p ∣ Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 }\n[PROOFSTEP]\nrw [Fintype.card_of_subtype S hS, card_eq_sum_ones, Nat.cast_sum, Nat.cast_one, ← Fintype.sum_extend_by_zero S,\n  sum_congr rfl fun x _ => hF x]\n  -- With these preparations under our belt, we will approach the main goal.\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\nkey : ∑ x : σ → K, ↑(eval x) F = ↑(Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 })\n⊢ p ∣ Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 }\n[PROOFSTEP]\nshow p ∣ Fintype.card { x // ∀ i : ι, i ∈ s → eval x (f i) = 0 }\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\nkey : ∑ x : σ → K, ↑(eval x) F = ↑(Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 })\n⊢ p ∣ Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 }\n[PROOFSTEP]\nrw [← CharP.cast_eq_zero_iff K, ← key]\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\nkey : ∑ x : σ → K, ↑(eval x) F = ↑(Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 })\n⊢ ∑ x : σ → K, ↑(eval x) F = 0\n[PROOFSTEP]\nshow\n  (∑ x, eval x F) =\n    0\n      -- We are now ready to apply the main machine, proven before.\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\nkey : ∑ x : σ → K, ↑(eval x) F = ↑(Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 })\n⊢ ∑ x : σ → K, ↑(eval x) F = 0\n[PROOFSTEP]\napply F.sum_eval_eq_zero\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\nkey : ∑ x : σ → K, ↑(eval x) F = ↑(Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 })\n⊢ totalDegree F < (q - 1) * Fintype.card σ\n[PROOFSTEP]\nshow F.totalDegree < (q - 1) * Fintype.card σ\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\nkey : ∑ x : σ → K, ↑(eval x) F = ↑(Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 })\n⊢ totalDegree F < (q - 1) * Fintype.card σ\n[PROOFSTEP]\ncalc\n  F.totalDegree ≤ ∑ i in s, (1 - f i ^ (q - 1)).totalDegree := totalDegree_finset_prod s _\n  _ ≤ ∑ i in s, (q - 1) * (f i).totalDegree :=\n    (sum_le_sum fun i _ => ?_)\n      -- see ↓\n  _ = (q - 1) * ∑ i in s, (f i).totalDegree := mul_sum.symm\n  _ < (q - 1) * Fintype.card σ := by\n    rwa [mul_lt_mul_left hq]\n      -- Now we prove the remaining step from the preceding calculation\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\nkey : ∑ x : σ → K, ↑(eval x) F = ↑(Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 })\n⊢ (q - 1) * ∑ i in s, totalDegree (f i) < (q - 1) * Fintype.card σ\n[PROOFSTEP]\nrwa [mul_lt_mul_left hq]\n  -- Now we prove the remaining step from the preceding calculation\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\nkey : ∑ x : σ → K, ↑(eval x) F = ↑(Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 })\ni : ι\nx✝ : i ∈ s\n⊢ totalDegree (1 - f i ^ (q - 1)) ≤ (q - 1) * totalDegree (f i)\n[PROOFSTEP]\nshow (1 - f i ^ (q - 1)).totalDegree ≤ (q - 1) * (f i).totalDegree\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\nkey : ∑ x : σ → K, ↑(eval x) F = ↑(Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 })\ni : ι\nx✝ : i ∈ s\n⊢ totalDegree (1 - f i ^ (q - 1)) ≤ (q - 1) * totalDegree (f i)\n[PROOFSTEP]\ncalc\n  (1 - f i ^ (q - 1)).totalDegree ≤ max (1 : MvPolynomial σ K).totalDegree (f i ^ (q - 1)).totalDegree :=\n    totalDegree_sub _ _\n  _ ≤ (f i ^ (q - 1)).totalDegree := by simp\n  _ ≤ (q - 1) * (f i).totalDegree := totalDegree_pow _ _\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\ns : Finset ι\nf : ι → MvPolynomial σ K\nh : ∑ i in s, totalDegree (f i) < Fintype.card σ\nhq : 0 < q - 1\nS : Finset (σ → K) := Set.toFinset {x | x ∈ univ ∧ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0}\nhS : ∀ (x : σ → K), x ∈ S ↔ ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0\nF : MvPolynomial σ K := ∏ i in s, (1 - f i ^ (q - 1))\nhF : ∀ (x : σ → K), ↑(eval x) F = if x ∈ S then 1 else 0\nkey : ∑ x : σ → K, ↑(eval x) F = ↑(Fintype.card { x // ∀ (i : ι), i ∈ s → ↑(eval x) (f i) = 0 })\ni : ι\nx✝ : i ∈ s\n⊢ max (totalDegree 1) (totalDegree (f i ^ (q - 1))) ≤ totalDegree (f i ^ (q - 1))\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁶ : Fintype K\ninst✝⁵ : Field K\ninst✝⁴ : Fintype σ\ninst✝³ : DecidableEq σ\ninst✝² : DecidableEq K\np : ℕ\ninst✝¹ : CharP K p\ninst✝ : Fintype ι\nf : ι → MvPolynomial σ K\nh : ∑ i : ι, totalDegree (f i) < Fintype.card σ\n⊢ p ∣ Fintype.card { x // ∀ (i : ι), ↑(eval x) (f i) = 0 }\n[PROOFSTEP]\nsimpa using char_dvd_card_solutions_of_sum_lt p h\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\nf : MvPolynomial σ K\nh : totalDegree f < Fintype.card σ\n⊢ p ∣ Fintype.card { x // ↑(eval x) f = 0 }\n[PROOFSTEP]\nlet F : Unit → MvPolynomial σ K := fun _ => f\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\nf : MvPolynomial σ K\nh : totalDegree f < Fintype.card σ\nF : Unit → MvPolynomial σ K := fun x => f\n⊢ p ∣ Fintype.card { x // ↑(eval x) f = 0 }\n[PROOFSTEP]\nhave : (∑ i : Unit, (F i).totalDegree) < Fintype.card σ := h\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\nf : MvPolynomial σ K\nh : totalDegree f < Fintype.card σ\nF : Unit → MvPolynomial σ K := fun x => f\nthis : ∑ i : Unit, totalDegree (F i) < Fintype.card σ\n⊢ p ∣ Fintype.card { x // ↑(eval x) f = 0 }\n[PROOFSTEP]\nconvert char_dvd_card_solutions_of_sum_lt p this\n[GOAL]\ncase h.e'_4.h.h.e'_2.h.a\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\nf : MvPolynomial σ K\nh : totalDegree f < Fintype.card σ\nF : Unit → MvPolynomial σ K := fun x => f\nthis : ∑ i : Unit, totalDegree (F i) < Fintype.card σ\nx✝ : σ → K\n⊢ ↑(eval x✝) f = 0 ↔ ∀ (i : Unit), i ∈ univ → ↑(eval x✝) (F i) = 0\n[PROOFSTEP]\naesop\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\nf₁ f₂ : MvPolynomial σ K\nh : totalDegree f₁ + totalDegree f₂ < Fintype.card σ\n⊢ p ∣ Fintype.card { x // ↑(eval x) f₁ = 0 ∧ ↑(eval x) f₂ = 0 }\n[PROOFSTEP]\nlet F : Bool → MvPolynomial σ K := fun b => cond b f₂ f₁\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\nf₁ f₂ : MvPolynomial σ K\nh : totalDegree f₁ + totalDegree f₂ < Fintype.card σ\nF : Bool → MvPolynomial σ K := fun b => bif b then f₂ else f₁\n⊢ p ∣ Fintype.card { x // ↑(eval x) f₁ = 0 ∧ ↑(eval x) f₂ = 0 }\n[PROOFSTEP]\nhave : (∑ b : Bool, (F b).totalDegree) < Fintype.card σ := (add_comm _ _).trans_lt h\n[GOAL]\nK : Type u_1\nσ : Type u_2\nι : Type u_3\ninst✝⁵ : Fintype K\ninst✝⁴ : Field K\ninst✝³ : Fintype σ\ninst✝² : DecidableEq σ\ninst✝¹ : DecidableEq K\np : ℕ\ninst✝ : CharP K p\nf₁ f₂ : MvPolynomial σ K\nh : totalDegree f₁ + totalDegree f₂ < Fintype.card σ\nF : Bool → MvPolynomial σ K := fun b => bif b then f₂ else f₁\nthis : ∑ b : Bool, totalDegree (F b) < Fintype.card σ\n⊢ p ∣ Fintype.card { x // ↑(eval x) f₁ = 0 ∧ ↑(eval x) f₂ = 0 }\n[PROOFSTEP]\nsimpa only [Bool.forall_bool] using char_dvd_card_solutions_of_fintype_sum_lt p this\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.ChevalleyWarning", "llama_tokens": 22756, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.743168019989179, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.39188477658757054}}
{"text": "[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : DecidableEq R\n⊢ Decidable (Monic p)\n[PROOFSTEP]\nunfold Monic\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : DecidableEq R\n⊢ Decidable (leadingCoeff p = 1)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Subsingleton R\n⊢ degree p = ⊥\n[PROOFSTEP]\nrw [Subsingleton.elim p 0, degree_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Subsingleton R\n⊢ natDegree p = 0\n[PROOFSTEP]\nrw [Subsingleton.elim p 0, natDegree_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : p ≠ 0\n⊢ degree p = ↑(natDegree p)\n[PROOFSTEP]\nlet ⟨n, hn⟩ := not_forall.1 (mt Option.eq_none_iff_forall_not_mem.2 (mt degree_eq_bot.1 hp))\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : p ≠ 0\nn : ℕ\nhn : ¬¬n ∈ degree p\n⊢ degree p = ↑(natDegree p)\n[PROOFSTEP]\nhave hn : degree p = some n := Classical.not_not.1 hn\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : p ≠ 0\nn : ℕ\nhn✝ : ¬¬n ∈ degree p\nhn : degree p = Option.some n\n⊢ degree p = ↑(natDegree p)\n[PROOFSTEP]\nrw [natDegree, hn]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : p ≠ 0\nn : ℕ\nhn✝ : ¬¬n ∈ degree p\nhn : degree p = Option.some n\n⊢ Option.some n = ↑(WithBot.unbot' 0 (Option.some n))\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhp : p ≠ 0\n⊢ degree p = ↑n ↔ natDegree p = n\n[PROOFSTEP]\nrw [degree_eq_natDegree hp]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhp : p ≠ 0\n⊢ ↑(natDegree p) = ↑n ↔ natDegree p = n\n[PROOFSTEP]\nexact WithBot.coe_eq_coe\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\n⊢ degree p = ↑n ↔ natDegree p = n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\n⊢ degree p = ↑n → natDegree p = n\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\nH : degree p = ↑n\n⊢ natDegree p = n\n[PROOFSTEP]\nrwa [← degree_eq_iff_natDegree_eq]\n[GOAL]\ncase mp\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\nH : degree p = ↑n\n⊢ p ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : 0 < n\nH : degree 0 = ↑n\n⊢ False\n[PROOFSTEP]\nrw [degree_zero] at H \n[GOAL]\ncase mp\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : 0 < n\nH : ⊥ = ↑n\n⊢ False\n[PROOFSTEP]\nexact Option.noConfusion H\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\n⊢ natDegree p = n → degree p = ↑n\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\nH : natDegree p = n\n⊢ degree p = ↑n\n[PROOFSTEP]\nrwa [degree_eq_iff_natDegree_eq]\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\nH : natDegree p = n\n⊢ p ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : 0 < n\nH : natDegree 0 = n\n⊢ False\n[PROOFSTEP]\nrw [natDegree_zero] at H \n[GOAL]\ncase mpr\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : 0 < n\nH : 0 = n\n⊢ False\n[PROOFSTEP]\nrw [H] at hn \n[GOAL]\ncase mpr\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : n < n\nH : 0 = n\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ hn\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : degree p = ↑n\n⊢ natDegree p = n\n[PROOFSTEP]\nrw [natDegree, h, Nat.cast_withBot, WithBot.unbot'_coe]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\np q✝ r : R[X]\ninst✝ : Semiring S\nq : S[X]\nh : degree p = degree q\n⊢ natDegree p = natDegree q\n[PROOFSTEP]\nunfold natDegree\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\np q✝ r : R[X]\ninst✝ : Semiring S\nq : S[X]\nh : degree p = degree q\n⊢ WithBot.unbot' 0 (degree p) = WithBot.unbot' 0 (degree q)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff p n ≠ 0\n⊢ n ≤ natDegree p\n[PROOFSTEP]\nrw [← Nat.cast_le (α := WithBot ℕ), ← degree_eq_natDegree]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff p n ≠ 0\n⊢ ↑n ≤ degree p\nR : Type u S : Type v a b c d : R n m : ℕ inst✝ : Semiring R p q r : R[X] h : coeff p n ≠ 0 ⊢ p ≠ 0\n[PROOFSTEP]\nexact le_degree_of_ne_zero h\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff p n ≠ 0\n⊢ p ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\nq r : R[X]\nh : coeff 0 n ≠ 0\n⊢ False\n[PROOFSTEP]\nexact h rfl\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff q (natDegree p) ≠ 0\n⊢ degree p ≤ degree q\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff q (natDegree p) ≠ 0\nhp : p = 0\n⊢ degree p ≤ degree q\n[PROOFSTEP]\nrw [hp]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff q (natDegree p) ≠ 0\nhp : p = 0\n⊢ degree 0 ≤ degree q\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff q (natDegree p) ≠ 0\nhp : ¬p = 0\n⊢ degree p ≤ degree q\n[PROOFSTEP]\nrw [degree_eq_natDegree hp]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff q (natDegree p) ≠ 0\nhp : ¬p = 0\n⊢ ↑(natDegree p) ≤ degree q\n[PROOFSTEP]\nexact le_degree_of_ne_zero h\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ r p q : R[X]\nhp : p ≠ 0\nhpq : degree p < degree q\n⊢ natDegree p < natDegree q\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ r p q : R[X]\nhp : p ≠ 0\nhpq : degree p < degree q\nhq : q = 0\n⊢ natDegree p < natDegree q\n[PROOFSTEP]\nexact (not_lt_bot <| hq ▸ hpq).elim\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ r p q : R[X]\nhp : p ≠ 0\nhpq : degree p < degree q\nhq : ¬q = 0\n⊢ natDegree p < natDegree q\n[PROOFSTEP]\nrwa [degree_eq_natDegree hp, degree_eq_natDegree hq, Nat.cast_lt] at hpq \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nha : a ≠ 0\n⊢ degree (↑C a) = 0\n[PROOFSTEP]\nrw [degree, ← monomial_zero_left, support_monomial 0 ha, max_eq_sup_coe, sup_singleton, WithBot.coe_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ degree (↑C a) ≤ 0\n[PROOFSTEP]\nby_cases h : a = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : a = 0\n⊢ degree (↑C a) ≤ 0\n[PROOFSTEP]\nrw [h, C_0]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : a = 0\n⊢ degree 0 ≤ 0\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : ¬a = 0\n⊢ degree (↑C a) ≤ 0\n[PROOFSTEP]\nrw [degree_C h]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ degree 1 ≤ 0\n[PROOFSTEP]\nrw [← C_1]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ degree (↑C 1) ≤ 0\n[PROOFSTEP]\nexact degree_C_le\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\na : R\n⊢ natDegree (↑C a) = 0\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\na : R\nha : a = 0\n⊢ natDegree (↑C a) = 0\n[PROOFSTEP]\nhave : C a = 0 := by rw [ha, C_0]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\na : R\nha : a = 0\n⊢ ↑C a = 0\n[PROOFSTEP]\nrw [ha, C_0]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\na : R\nha : a = 0\nthis : ↑C a = 0\n⊢ natDegree (↑C a) = 0\n[PROOFSTEP]\nrw [natDegree, degree_eq_bot.2 this]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\na : R\nha : a = 0\nthis : ↑C a = 0\n⊢ WithBot.unbot' 0 ⊥ = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\na : R\nha : ¬a = 0\n⊢ natDegree (↑C a) = 0\n[PROOFSTEP]\nrw [natDegree, degree_C ha]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\na : R\nha : ¬a = 0\n⊢ WithBot.unbot' 0 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\n⊢ natDegree ↑n = 0\n[PROOFSTEP]\nsimp only [← C_eq_nat_cast, natDegree_C]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\n⊢ natDegree ↑n ≤ Zero.zero\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nha : a ≠ 0\n⊢ degree (↑(monomial n) a) = ↑n\n[PROOFSTEP]\nrw [degree, support_monomial n ha]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nha : a ≠ 0\n⊢ Finset.max {n} = ↑n\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nha : a ≠ 0\n⊢ degree (↑C a * X ^ n) = ↑n\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial, degree_monomial n ha]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nha : a ≠ 0\n⊢ degree (↑C a * X) = 1\n[PROOFSTEP]\nsimpa only [pow_one] using degree_C_mul_X_pow 1 ha\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\na : R\nh : a = 0\n⊢ degree (↑(monomial n) a) ≤ ↑n\n[PROOFSTEP]\nrw [h, (monomial n).map_zero]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\na : R\nh : a = 0\n⊢ degree 0 ≤ ↑n\n[PROOFSTEP]\nexact bot_le\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\na : R\n⊢ degree (↑C a * X ^ n) ≤ ↑n\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\na : R\n⊢ degree (↑(monomial n) a) ≤ ↑n\n[PROOFSTEP]\napply degree_monomial_le\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\na : R\n⊢ degree (↑C a * X) ≤ 1\n[PROOFSTEP]\nsimpa only [pow_one] using degree_C_mul_X_pow_le 1 a\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\na : R\nha : a ≠ 0\n⊢ natDegree (↑C a * X) = 1\n[PROOFSTEP]\nsimpa only [pow_one] using natDegree_C_mul_X_pow 1 a ha\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\ninst✝ : DecidableEq R\ni : ℕ\nr : R\n⊢ natDegree (↑(monomial i) r) = if r = 0 then 0 else i\n[PROOFSTEP]\nsplit_ifs with hr\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\ninst✝ : DecidableEq R\ni : ℕ\nr : R\nhr : r = 0\n⊢ natDegree (↑(monomial i) r) = 0\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\np q r✝ : R[X]\ninst✝ : DecidableEq R\ni : ℕ\nr : R\nhr : ¬r = 0\n⊢ natDegree (↑(monomial i) r) = i\n[PROOFSTEP]\nrw [← C_mul_X_pow_eq_monomial, natDegree_C_mul_X_pow i r hr]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\na : R\nm : ℕ\n⊢ natDegree (↑(monomial m) a) ≤ m\n[PROOFSTEP]\nrw [Polynomial.natDegree_monomial]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\na : R\nm : ℕ\n⊢ (if a = 0 then 0 else m) ≤ m\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na✝ b c d : R\nn m✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\na : R\nm : ℕ\nh✝ : a = 0\n⊢ 0 ≤ m\ncase neg R : Type u S : Type v a✝ b c d : R n m✝ : ℕ inst✝ : Semiring R p q r : R[X] a : R m : ℕ h✝ : ¬a = 0 ⊢ m ≤ m\n[PROOFSTEP]\nexacts [Nat.zero_le _, rfl.le]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : natDegree p < n\n⊢ coeff p n = 0\n[PROOFSTEP]\napply coeff_eq_zero_of_degree_lt\n[GOAL]\ncase h\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : natDegree p < n\n⊢ degree p < ↑n\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : natDegree p < n\nhp : p = 0\n⊢ degree p < ↑n\n[PROOFSTEP]\nsubst hp\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nh : natDegree 0 < n\n⊢ degree 0 < ↑n\n[PROOFSTEP]\nexact WithBot.bot_lt_coe n\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : natDegree p < n\nhp : ¬p = 0\n⊢ degree p < ↑n\n[PROOFSTEP]\nrwa [degree_eq_natDegree hp, Nat.cast_lt]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q✝ r p q : R[X]\nn : ℕ\nhp : natDegree p ≤ n\nhq : natDegree q ≤ n\n⊢ p = q ↔ ∀ (i : ℕ), i ≤ n → coeff p i = coeff q i\n[PROOFSTEP]\nrefine' Iff.trans Polynomial.ext_iff _\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q✝ r p q : R[X]\nn : ℕ\nhp : natDegree p ≤ n\nhq : natDegree q ≤ n\n⊢ (∀ (n : ℕ), coeff p n = coeff q n) ↔ ∀ (i : ℕ), i ≤ n → coeff p i = coeff q i\n[PROOFSTEP]\nrefine' forall_congr' fun i => ⟨fun h _ => h, fun h => _⟩\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q✝ r p q : R[X]\nn : ℕ\nhp : natDegree p ≤ n\nhq : natDegree q ≤ n\ni : ℕ\nh : i ≤ n → coeff p i = coeff q i\n⊢ coeff p i = coeff q i\n[PROOFSTEP]\nrefine' (le_or_lt i n).elim h fun k => _\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q✝ r p q : R[X]\nn : ℕ\nhp : natDegree p ≤ n\nhq : natDegree q ≤ n\ni : ℕ\nh : i ≤ n → coeff p i = coeff q i\nk : n < i\n⊢ coeff p i = coeff q i\n[PROOFSTEP]\nexact (coeff_eq_zero_of_natDegree_lt (hp.trans_lt k)).trans (coeff_eq_zero_of_natDegree_lt (hq.trans_lt k)).symm\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nI : Decidable (n < 1 + natDegree p)\n⊢ (if n < 1 + natDegree p then coeff p n else 0) = coeff p n\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nI : Decidable (n < 1 + natDegree p)\nh : n < 1 + natDegree p\n⊢ coeff p n = coeff p n\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nI : Decidable (n < 1 + natDegree p)\nh : ¬n < 1 + natDegree p\n⊢ 0 = coeff p n\n[PROOFSTEP]\nexact (coeff_eq_zero_of_natDegree_lt (not_le.1 fun w => h (Nat.lt_one_add_iff.2 w))).symm\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\n⊢ ∑ i in support p, ↑(monomial i) (coeff p i) = ∑ i in support p, ↑C (coeff p i) * X ^ i\n[PROOFSTEP]\nsimp only [C_mul_X_pow_eq_monomial]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : AddCommMonoid S\np : R[X]\nf : ℕ → R → S\nh : ∀ (n : ℕ), f n 0 = 0\nn : ℕ\nw : natDegree p < n\n⊢ sum p f = ∑ a in range n, f a (coeff p a)\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : AddCommMonoid S\nf : ℕ → R → S\nh : ∀ (n : ℕ), f n 0 = 0\nn : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\nw : natDegree { toFinsupp := toFinsupp✝ } < n\n⊢ sum { toFinsupp := toFinsupp✝ } f = ∑ a in range n, f a (coeff { toFinsupp := toFinsupp✝ } a)\n[PROOFSTEP]\nhave := supp_subset_range w\n[GOAL]\ncase ofFinsupp\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : AddCommMonoid S\nf : ℕ → R → S\nh : ∀ (n : ℕ), f n 0 = 0\nn : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\nw : natDegree { toFinsupp := toFinsupp✝ } < n\nthis : support { toFinsupp := toFinsupp✝ } ⊆ range n\n⊢ sum { toFinsupp := toFinsupp✝ } f = ∑ a in range n, f a (coeff { toFinsupp := toFinsupp✝ } a)\n[PROOFSTEP]\nsimp only [Polynomial.sum, support, coeff, natDegree, degree] at this ⊢\n[GOAL]\ncase ofFinsupp\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : AddCommMonoid S\nf : ℕ → R → S\nh : ∀ (n : ℕ), f n 0 = 0\nn : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\nw : natDegree { toFinsupp := toFinsupp✝ } < n\nthis : toFinsupp✝.support ⊆ range n\n⊢ ∑ x in toFinsupp✝.support, f x (↑toFinsupp✝ x) = ∑ x in range n, f x (↑toFinsupp✝ x)\n[PROOFSTEP]\nexact Finsupp.sum_of_support_subset _ this _ fun n _hn => h n\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : AddCommMonoid S\nf : ℕ → R → S\nhf : ∀ (i : ℕ), f i 0 = 0\nn : ℕ\np : R[X]\nhn : degree p < ↑n\n⊢ ∑ i : Fin n, f (↑i) (coeff p ↑i) = sum p f\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : AddCommMonoid S\nf : ℕ → R → S\nhf : ∀ (i : ℕ), f i 0 = 0\nn : ℕ\np : R[X]\nhn : degree p < ↑n\nhp : p = 0\n⊢ ∑ i : Fin n, f (↑i) (coeff p ↑i) = sum p f\n[PROOFSTEP]\nrw [hp, sum_zero_index, Finset.sum_eq_zero]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : AddCommMonoid S\nf : ℕ → R → S\nhf : ∀ (i : ℕ), f i 0 = 0\nn : ℕ\np : R[X]\nhn : degree p < ↑n\nhp : p = 0\n⊢ ∀ (x : Fin n), x ∈ univ → f (↑x) (coeff 0 ↑x) = 0\n[PROOFSTEP]\nintro i _\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : AddCommMonoid S\nf : ℕ → R → S\nhf : ∀ (i : ℕ), f i 0 = 0\nn : ℕ\np : R[X]\nhn : degree p < ↑n\nhp : p = 0\ni : Fin n\na✝ : i ∈ univ\n⊢ f (↑i) (coeff 0 ↑i) = 0\n[PROOFSTEP]\nexact hf i\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Semiring R\np✝ q r : R[X]\ninst✝ : AddCommMonoid S\nf : ℕ → R → S\nhf : ∀ (i : ℕ), f i 0 = 0\nn : ℕ\np : R[X]\nhn : degree p < ↑n\nhp : ¬p = 0\n⊢ ∑ i : Fin n, f (↑i) (coeff p ↑i) = sum p f\n[PROOFSTEP]\nrw [sum_over_range' _ hf n ((natDegree_lt_iff_degree_lt hp).mpr hn), Fin.sum_univ_eq_sum_range fun i => f i (p.coeff i)]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\n⊢ ∑ i in range (natDegree p + 1), ↑(monomial i) (coeff p i) = ∑ i in range (natDegree p + 1), ↑C (coeff p i) * X ^ i\n[PROOFSTEP]\nsimp only [C_mul_X_pow_eq_monomial]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : degree p ≤ 1\nn : ℕ\n⊢ coeff p Nat.zero = coeff (↑C (coeff p 1) * X + ↑C (coeff p 0)) Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝¹ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : degree p ≤ 1\nn✝ n : ℕ\n⊢ coeff p (Nat.succ Nat.zero) = coeff (↑C (coeff p 1) * X + ↑C (coeff p 0)) (Nat.succ Nat.zero)\n[PROOFSTEP]\nsimp [coeff_C]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝¹ m✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : degree p ≤ 1\nn✝ n m : ℕ\n⊢ coeff p (Nat.succ (Nat.succ m)) = coeff (↑C (coeff p 1) * X + ↑C (coeff p 0)) (Nat.succ (Nat.succ m))\n[PROOFSTEP]\nhave : degree p < m.succ.succ := lt_of_le_of_lt h (Iff.mpr WithBot.coe_lt_coe <| Nat.succ_lt_succ <| Nat.zero_lt_succ m)\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝¹ m✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : degree p ≤ 1\nn✝ n m : ℕ\nthis : degree p < ↑(Nat.succ (Nat.succ m))\n⊢ coeff p (Nat.succ (Nat.succ m)) = coeff (↑C (coeff p 1) * X + ↑C (coeff p 0)) (Nat.succ (Nat.succ m))\n[PROOFSTEP]\nsimp [coeff_eq_zero_of_degree_lt this, coeff_C, Nat.succ_ne_zero, coeff_X, Nat.succ_inj', @eq_comm ℕ 0]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : degree p = 1\n⊢ ↑C (coeff p 1) * X + ↑C (coeff p 0) = ↑C (leadingCoeff p) * X + ↑C (coeff p 0)\n[PROOFSTEP]\nsimp only [leadingCoeff, natDegree_eq_of_degree_eq_some h]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : degree p = 1\n⊢ ↑C (coeff p 1) * X + ↑C (coeff p 0) = ↑C (coeff p One.one) * X + ↑C (coeff p 0)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhm : Monic p\nhnd : natDegree p = 1\n⊢ p = X + ↑C (coeff p 0)\n[PROOFSTEP]\nrw [← one_mul X, ← C_1, ← hm.coeff_natDegree, hnd, ← eq_X_add_C_of_natDegree_le_one hnd.le]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\n⊢ degree (X ^ n) ≤ ↑n\n[PROOFSTEP]\nsimpa only [C_1, one_mul] using degree_C_mul_X_pow_le n (1 : R)\n[GOAL]\nR : Type u\nS : Type v\na b c✝ d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nc : R\nn : ℕ\n⊢ card (support (↑C c * X ^ n)) ≤ 1\n[PROOFSTEP]\nrw [← card_singleton n]\n[GOAL]\nR : Type u\nS : Type v\na b c✝ d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nc : R\nn : ℕ\n⊢ card (support (↑C c * X ^ n)) ≤ card {n}\n[PROOFSTEP]\napply card_le_of_subset (support_C_mul_X_pow' n c)\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\n⊢ card (support p) ≤ natDegree p + 1\n[PROOFSTEP]\nrw [← Finset.card_range (p.natDegree + 1)]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\n⊢ card (support p) ≤ card (range (natDegree p + 1))\n[PROOFSTEP]\nexact Finset.card_le_of_subset supp_subset_range_natDegree_succ\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ Finset.Nonempty (support p) ↔ p ≠ 0\n[PROOFSTEP]\nrw [Ne.def, nonempty_iff_ne_empty, Ne.def, ← support_eq_empty]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Ring R\np : R[X]\nr : R\na : ℕ\n⊢ coeff (p * (X - ↑C r)) (a + 1) = coeff p a - coeff p (a + 1) * r\n[PROOFSTEP]\nsimp [mul_sub]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np : R[X]\n⊢ degree (-p) = degree p\n[PROOFSTEP]\nunfold degree\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np : R[X]\n⊢ Finset.max (support (-p)) = Finset.max (support p)\n[PROOFSTEP]\nrw [support_neg]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np : R[X]\n⊢ natDegree (-p) = natDegree p\n[PROOFSTEP]\nsimp [natDegree]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Ring R\nn : ℤ\n⊢ natDegree ↑n = 0\n[PROOFSTEP]\nrw [← C_eq_int_cast, natDegree_C]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Ring R\nn : ℤ\n⊢ natDegree ↑n ≤ Zero.zero\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np : R[X]\n⊢ leadingCoeff (-p) = -leadingCoeff p\n[PROOFSTEP]\nrw [leadingCoeff, leadingCoeff, natDegree_neg, coeff_neg]\n[GOAL]\nR : Type u\nS : Type v\na b c✝ d : R\nn m : ℕ\ninst✝ : Semiring R\nc : R\n⊢ nextCoeff (↑C c) = 0\n[PROOFSTEP]\nrw [nextCoeff]\n[GOAL]\nR : Type u\nS : Type v\na b c✝ d : R\nn m : ℕ\ninst✝ : Semiring R\nc : R\n⊢ (if natDegree (↑C c) = 0 then 0 else coeff (↑C c) (natDegree (↑C c) - 1)) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np : R[X]\nhp : 0 < natDegree p\n⊢ nextCoeff p = coeff p (natDegree p - 1)\n[PROOFSTEP]\nrw [nextCoeff, if_neg]\n[GOAL]\ncase hnc\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np : R[X]\nhp : 0 < natDegree p\n⊢ ¬natDegree p = 0\n[PROOFSTEP]\ncontrapose! hp\n[GOAL]\ncase hnc\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np : R[X]\nhp : natDegree p = 0\n⊢ natDegree p ≤ 0\n[PROOFSTEP]\nsimpa\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhpq : degree p ≤ degree q\nhp : p ≠ 0\n⊢ degree p ≠ ⊥\n[PROOFSTEP]\nrwa [Ne.def, Polynomial.degree_eq_bot]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : n < natDegree p\nH : p = 0\n⊢ False\n[PROOFSTEP]\nsimp [H, Nat.not_lt_zero] at h \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : natDegree p < natDegree q\n⊢ degree p < degree q\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : natDegree p < natDegree q\nhp : p = 0\n⊢ degree p < degree q\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : natDegree p < natDegree q\nhp : p = 0\n⊢ ⊥ < degree q\n[PROOFSTEP]\nrw [bot_lt_iff_ne_bot]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : natDegree p < natDegree q\nhp : p = 0\n⊢ degree q ≠ ⊥\n[PROOFSTEP]\nintro hq\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : natDegree p < natDegree q\nhp : p = 0\nhq : degree q = ⊥\n⊢ False\n[PROOFSTEP]\nsimp [hp, degree_eq_bot.mp hq, lt_irrefl] at h \n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : natDegree p < natDegree q\nhp : ¬p = 0\n⊢ degree p < degree q\n[PROOFSTEP]\nrwa [degree_eq_natDegree hp, degree_eq_natDegree <| ne_zero_of_natDegree_gt h, Nat.cast_lt]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhp : p ≠ 0\nh : degree p < degree q\n⊢ natDegree p < natDegree q\n[PROOFSTEP]\nhave hq : q ≠ 0 := ne_zero_of_degree_gt h\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhp : p ≠ 0\nh : degree p < degree q\nhq : q ≠ 0\n⊢ natDegree p < natDegree q\n[PROOFSTEP]\nrwa [degree_eq_natDegree hp, degree_eq_natDegree hq, Nat.cast_lt] at h \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree p ≤ 0\n⊢ p = ↑C (coeff p 0)\n[PROOFSTEP]\next (_ | n)\n[GOAL]\ncase a.zero\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree p ≤ 0\n⊢ coeff p Nat.zero = coeff (↑C (coeff p 0)) Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.succ\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree p ≤ 0\nn : ℕ\n⊢ coeff p (Nat.succ n) = coeff (↑C (coeff p 0)) (Nat.succ n)\n[PROOFSTEP]\nrw [coeff_C, if_neg (Nat.succ_ne_zero _), coeff_eq_zero_of_degree_lt]\n[GOAL]\ncase a.succ\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree p ≤ 0\nn : ℕ\n⊢ degree p < ↑(Nat.succ n)\n[PROOFSTEP]\nexact h.trans_lt (WithBot.some_lt_some.2 n.succ_pos)\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\n⊢ degree (p + q) ≤ max (degree p) (degree q)\n[PROOFSTEP]\nsimpa only [degree, ← support_toFinsupp, toFinsupp_add] using AddMonoidAlgebra.sup_support_add_le _ _ _\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\n⊢ natDegree (p + q) ≤ max (natDegree p) (natDegree q)\n[PROOFSTEP]\ncases' le_max_iff.1 (degree_add_le p q) with h h\n[GOAL]\ncase inl\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nh : degree (p + q) ≤ degree p\n⊢ natDegree (p + q) ≤ max (natDegree p) (natDegree q)\n[PROOFSTEP]\nsimp [natDegree_le_natDegree h]\n[GOAL]\ncase inr\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nh : degree (p + q) ≤ degree q\n⊢ natDegree (p + q) ≤ max (natDegree p) (natDegree q)\n[PROOFSTEP]\nsimp [natDegree_le_natDegree h]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\n⊢ leadingCoeff p ≠ 0 ↔ p ≠ 0\n[PROOFSTEP]\nrw [Ne.def, leadingCoeff_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\n⊢ leadingCoeff p = 0 ↔ degree p = ⊥\n[PROOFSTEP]\nrw [leadingCoeff_eq_zero, degree_eq_bot]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nH : p ≠ 0\n⊢ natDegree p ∈ support p\n[PROOFSTEP]\nrw [mem_support_iff]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nH : p ≠ 0\n⊢ coeff p (natDegree p) ≠ 0\n[PROOFSTEP]\nexact (not_congr leadingCoeff_eq_zero).mpr H\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree q < degree p\n⊢ coeff (p + q) (natDegree p) ≠ 0\n[PROOFSTEP]\nrw [coeff_add, coeff_natDegree_eq_zero_of_degree_lt h, add_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree q < degree p\n⊢ coeff p (natDegree p) ≠ 0\n[PROOFSTEP]\nexact mt leadingCoeff_eq_zero.1 (ne_zero_of_degree_gt h)\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree p < degree q\n⊢ degree (p + q) = degree q\n[PROOFSTEP]\nrw [add_comm, degree_add_eq_left_of_degree_lt h]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : R\n⊢ natDegree (p + ↑C a) = natDegree p\n[PROOFSTEP]\nrcases eq_or_ne p 0 with rfl | hp\n[GOAL]\ncase inl\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\nq : R[X]\nι : Type u_1\na : R\n⊢ natDegree (0 + ↑C a) = natDegree 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : R\nhp : p ≠ 0\n⊢ natDegree (p + ↑C a) = natDegree p\n[PROOFSTEP]\nby_cases hpd : p.degree ≤ 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : R\nhp : p ≠ 0\nhpd : degree p ≤ 0\n⊢ natDegree (p + ↑C a) = natDegree p\n[PROOFSTEP]\nrw [eq_C_of_degree_le_zero hpd, ← C_add, natDegree_C, natDegree_C]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : R\nhp : p ≠ 0\nhpd : ¬degree p ≤ 0\n⊢ natDegree (p + ↑C a) = natDegree p\n[PROOFSTEP]\nrw [not_le, degree_eq_natDegree hp, Nat.cast_pos, ← natDegree_C a] at hpd \n[GOAL]\ncase neg\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : R\nhp : p ≠ 0\nhpd : natDegree (↑C a) < natDegree p\n⊢ natDegree (p + ↑C a) = natDegree p\n[PROOFSTEP]\nexact natDegree_add_eq_left_of_natDegree_lt hpd\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : R\n⊢ natDegree (↑C a + p) = natDegree p\n[PROOFSTEP]\nsimp [add_comm _ p]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p + leadingCoeff q ≠ 0\nhlt : degree p < degree q\n⊢ max (degree p) (degree q) ≤ degree (p + q)\n[PROOFSTEP]\nrw [degree_add_eq_right_of_degree_lt hlt, max_eq_right_of_lt hlt]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p + leadingCoeff q ≠ 0\nHEq : degree p = degree q\nhlt : max (degree p) (degree q) > degree (p + q)\n⊢ leadingCoeff p + leadingCoeff q = 0\n[PROOFSTEP]\nrw [HEq, max_self] at hlt \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p + leadingCoeff q ≠ 0\nHEq : degree p = degree q\nhlt : degree q > degree (p + q)\n⊢ leadingCoeff p + leadingCoeff q = 0\n[PROOFSTEP]\nrw [leadingCoeff, leadingCoeff, natDegree_eq_of_degree_eq HEq, ← coeff_add]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p + leadingCoeff q ≠ 0\nHEq : degree p = degree q\nhlt : degree q > degree (p + q)\n⊢ coeff (p + q) (natDegree q) = 0\n[PROOFSTEP]\nexact coeff_natDegree_eq_zero_of_degree_lt hlt\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p + leadingCoeff q ≠ 0\nhlt : degree q < degree p\n⊢ max (degree p) (degree q) ≤ degree (p + q)\n[PROOFSTEP]\nrw [degree_add_eq_left_of_degree_lt hlt, max_eq_left_of_lt hlt]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nn : ℕ\n⊢ degree (erase n p) ≤ degree p\n[PROOFSTEP]\nrcases p with ⟨p⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\nn : ℕ\np : AddMonoidAlgebra R ℕ\n⊢ degree (erase n { toFinsupp := p }) ≤ degree { toFinsupp := p }\n[PROOFSTEP]\nsimp only [erase_def, degree, coeff, support]\n  -- Porting note: simpler convert-free proof to be explicit about definition unfolding\n[GOAL]\ncase ofFinsupp\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\nn : ℕ\np : AddMonoidAlgebra R ℕ\n⊢ Finset.max (Finsupp.erase n p).support ≤ Finset.max p.support\n[PROOFSTEP]\napply sup_mono\n[GOAL]\ncase ofFinsupp.h\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\nn : ℕ\np : AddMonoidAlgebra R ℕ\n⊢ (Finsupp.erase n p).support ⊆ p.support\n[PROOFSTEP]\nrw [Finsupp.support_erase]\n[GOAL]\ncase ofFinsupp.h\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\nn : ℕ\np : AddMonoidAlgebra R ℕ\n⊢ Finset.erase p.support n ⊆ p.support\n[PROOFSTEP]\napply Finset.erase_subset\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhp : p ≠ 0\n⊢ degree (erase (natDegree p) p) < degree p\n[PROOFSTEP]\napply lt_of_le_of_ne (degree_erase_le _ _)\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhp : p ≠ 0\n⊢ degree (erase (natDegree p) p) ≠ degree p\n[PROOFSTEP]\nrw [degree_eq_natDegree hp, degree, support_erase]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhp : p ≠ 0\n⊢ Finset.max (Finset.erase (support p) (natDegree p)) ≠ ↑(natDegree p)\n[PROOFSTEP]\nexact fun h => not_mem_erase _ _ (mem_of_max h)\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nn : ℕ\na : R\n⊢ degree (update p n a) ≤ max (degree p) ↑n\n[PROOFSTEP]\nrw [degree, support_update]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nn : ℕ\na : R\n⊢ Finset.max (if a = 0 then Finset.erase (support p) n else insert n (support p)) ≤ max (degree p) ↑n\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nn : ℕ\na : R\nh✝ : a = 0\n⊢ Finset.max (Finset.erase (support p) n) ≤ max (degree p) ↑n\n[PROOFSTEP]\nexact (Finset.max_mono (erase_subset _ _)).trans (le_max_left _ _)\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nn : ℕ\na : R\nh✝ : ¬a = 0\n⊢ Finset.max (insert n (support p)) ≤ max (degree p) ↑n\n[PROOFSTEP]\nrw [max_insert, max_comm]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nn : ℕ\na : R\nh✝ : ¬a = 0\n⊢ max (Finset.max (support p)) ↑n ≤ max (degree p) ↑n\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\ns : Finset ι\nf : ι → R[X]\n⊢ degree (∑ i in ∅, f i) ≤ sup ∅ fun b => degree (f b)\n[PROOFSTEP]\nsimp only [sum_empty, sup_empty, degree_zero, le_refl]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\ns✝ : Finset ι\nf : ι → R[X]\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : degree (∑ i in s, f i) ≤ sup s fun b => degree (f b)\n⊢ degree (∑ i in insert a s, f i) ≤ max (degree (f a)) (degree (∑ i in s, f i))\n[PROOFSTEP]\nrw [sum_insert has]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\ns✝ : Finset ι\nf : ι → R[X]\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : degree (∑ i in s, f i) ≤ sup s fun b => degree (f b)\n⊢ degree (f a + ∑ x in s, f x) ≤ max (degree (f a)) (degree (∑ i in s, f i))\n[PROOFSTEP]\nexact degree_add_le _ _\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\ns✝ : Finset ι\nf : ι → R[X]\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : degree (∑ i in s, f i) ≤ sup s fun b => degree (f b)\n⊢ max (degree (f a)) (degree (∑ i in s, f i)) ≤ sup (insert a s) fun b => degree (f b)\n[PROOFSTEP]\nrw [sup_insert, sup_eq_max]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\ns✝ : Finset ι\nf : ι → R[X]\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : degree (∑ i in s, f i) ≤ sup s fun b => degree (f b)\n⊢ max (degree (f a)) (degree (∑ i in s, f i)) ≤ max (degree (f a)) (sup s fun b => degree (f b))\n[PROOFSTEP]\nexact max_le_max le_rfl ih\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\n⊢ degree (p * q) ≤ degree p + degree q\n[PROOFSTEP]\nsimpa only [degree, ← support_toFinsupp, toFinsupp_mul] using\n  AddMonoidAlgebra.sup_support_mul_le (WithBot.coe_add _ _).le _ _\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\n⊢ degree (p ^ 0) ≤ 0 • degree p\n[PROOFSTEP]\nrw [pow_zero, zero_nsmul]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\n⊢ degree 1 ≤ 0\n[PROOFSTEP]\nexact degree_one_le\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nn : ℕ\n⊢ degree (p ^ (n + 1)) ≤ degree p + degree (p ^ n)\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nn : ℕ\n⊢ degree (p * p ^ n) ≤ degree p + degree (p ^ n)\n[PROOFSTEP]\nexact degree_mul_le _ _\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nn : ℕ\n⊢ degree p + degree (p ^ n) ≤ (n + 1) • degree p\n[PROOFSTEP]\nrw [succ_nsmul]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nn : ℕ\n⊢ degree p + degree (p ^ n) ≤ degree p + n • degree p\n[PROOFSTEP]\nexact add_le_add le_rfl (degree_pow_le _ _)\n[GOAL]\nR : Type u\nS : Type v\na✝ b✝ c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : WithBot ℕ\nb : ℕ\nhp : degree p ≤ a\n⊢ degree (p ^ b) ≤ ↑b * a\n[PROOFSTEP]\ninduction b with\n| zero => simp [degree_one_le]\n| succ n hn =>\n  rw [Nat.cast_succ, add_mul, one_mul, pow_succ']\n  exact degree_mul_le_of_le hn hp\n[GOAL]\nR : Type u\nS : Type v\na✝ b✝ c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : WithBot ℕ\nb : ℕ\nhp : degree p ≤ a\n⊢ degree (p ^ b) ≤ ↑b * a\n[PROOFSTEP]\ninduction b with\n| zero => simp [degree_one_le]\n| succ n hn =>\n  rw [Nat.cast_succ, add_mul, one_mul, pow_succ']\n  exact degree_mul_le_of_le hn hp\n[GOAL]\ncase zero\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : WithBot ℕ\nhp : degree p ≤ a\n⊢ degree (p ^ Nat.zero) ≤ ↑Nat.zero * a\n[PROOFSTEP]\n\n| zero => simp [degree_one_le]\n[GOAL]\ncase zero\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : WithBot ℕ\nhp : degree p ≤ a\n⊢ degree (p ^ Nat.zero) ≤ ↑Nat.zero * a\n[PROOFSTEP]\nsimp [degree_one_le]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : WithBot ℕ\nhp : degree p ≤ a\nn : ℕ\nhn : degree (p ^ n) ≤ ↑n * a\n⊢ degree (p ^ Nat.succ n) ≤ ↑(Nat.succ n) * a\n[PROOFSTEP]\n\n| succ n hn =>\n  rw [Nat.cast_succ, add_mul, one_mul, pow_succ']\n  exact degree_mul_le_of_le hn hp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : WithBot ℕ\nhp : degree p ≤ a\nn : ℕ\nhn : degree (p ^ n) ≤ ↑n * a\n⊢ degree (p ^ Nat.succ n) ≤ ↑(Nat.succ n) * a\n[PROOFSTEP]\nrw [Nat.cast_succ, add_mul, one_mul, pow_succ']\n[GOAL]\ncase succ\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : WithBot ℕ\nhp : degree p ≤ a\nn : ℕ\nhn : degree (p ^ n) ≤ ↑n * a\n⊢ degree (p ^ n * p) ≤ ↑n * a + a\n[PROOFSTEP]\nexact degree_mul_le_of_le hn hp\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : R\nn : ℕ\n⊢ leadingCoeff (↑(monomial n) a) = a\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : R\nn : ℕ\nha : a = 0\n⊢ leadingCoeff (↑(monomial n) a) = a\n[PROOFSTEP]\nsimp only [ha, (monomial n).map_zero, leadingCoeff_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : R\nn : ℕ\nha : ¬a = 0\n⊢ leadingCoeff (↑(monomial n) a) = a\n[PROOFSTEP]\nrw [leadingCoeff, natDegree_monomial, if_neg ha, coeff_monomial]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : R\nn : ℕ\nha : ¬a = 0\n⊢ (if n = n then a else 0) = a\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : R\nn : ℕ\n⊢ leadingCoeff (↑C a * X ^ n) = a\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial, leadingCoeff_monomial]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\na : R\n⊢ leadingCoeff (↑C a * X) = a\n[PROOFSTEP]\nsimpa only [pow_one] using leadingCoeff_C_mul_X_pow a 1\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\n⊢ leadingCoeff (X ^ n) = 1\n[PROOFSTEP]\nsimpa only [C_1, one_mul] using leadingCoeff_C_mul_X_pow (1 : R) n\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\n⊢ leadingCoeff X = 1\n[PROOFSTEP]\nsimpa only [pow_one] using @leadingCoeff_X_pow R _ 1\n[GOAL]\nR✝ : Type u\nS : Type v\na b c d : R✝\nn m : ℕ\ninst✝² : Semiring R✝\np✝ q : R✝[X]\nι : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\np : R[X]\nhp : Monic p\n⊢ p ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR✝ : Type u\nS : Type v\na b c d : R✝\nn m : ℕ\ninst✝² : Semiring R✝\np q : R✝[X]\nι : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\nhp : Monic 0\n⊢ False\n[PROOFSTEP]\nsimp [Monic] at hp \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\nh : 0 ≠ 1\np : R[X]\nhp : Monic p\n⊢ p ≠ 0\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\np✝ q : R[X]\nι : Type u_1\nh : 0 ≠ 1\np : R[X]\nhp : Monic p\ninst✝ : Nontrivial R\n⊢ p ≠ 0\n[PROOFSTEP]\nexact hp.ne_zero\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\npn : natDegree p ≤ n\np1 : coeff p n = 1\n⊢ Monic p\n[PROOFSTEP]\nunfold Monic\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\npn : natDegree p ≤ n\np1 : coeff p n = 1\n⊢ leadingCoeff p = 1\n[PROOFSTEP]\nnontriviality\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\npn : natDegree p ≤ n\np1 : coeff p n = 1\n✝ : Nontrivial R\n⊢ leadingCoeff p = 1\n[PROOFSTEP]\nrefine' (congr_arg _ <| natDegree_eq_of_le_of_coeff_ne_zero pn _).trans p1\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\npn : natDegree p ≤ n\np1 : coeff p n = 1\n✝ : Nontrivial R\n⊢ coeff p n ≠ 0\n[PROOFSTEP]\nexact ne_of_eq_of_ne p1 one_ne_zero\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree p < degree q\n⊢ leadingCoeff (p + q) = leadingCoeff q\n[PROOFSTEP]\nhave : coeff p (natDegree q) = 0 := coeff_natDegree_eq_zero_of_degree_lt h\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree p < degree q\nthis : coeff p (natDegree q) = 0\n⊢ leadingCoeff (p + q) = leadingCoeff q\n[PROOFSTEP]\nsimp only [leadingCoeff, natDegree_eq_of_degree_eq (degree_add_eq_right_of_degree_lt h), this, coeff_add, zero_add]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree q < degree p\n⊢ leadingCoeff (p + q) = leadingCoeff p\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree q < degree p\n⊢ leadingCoeff (q + p) = leadingCoeff p\n[PROOFSTEP]\nexact leadingCoeff_add_of_degree_lt h\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree p = degree q\nhlc : leadingCoeff p + leadingCoeff q ≠ 0\n⊢ leadingCoeff (p + q) = leadingCoeff p + leadingCoeff q\n[PROOFSTEP]\nhave : natDegree (p + q) = natDegree p := by\n  apply natDegree_eq_of_degree_eq\n  rw [degree_add_eq_of_leadingCoeff_add_ne_zero hlc, h, max_self]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree p = degree q\nhlc : leadingCoeff p + leadingCoeff q ≠ 0\n⊢ natDegree (p + q) = natDegree p\n[PROOFSTEP]\napply natDegree_eq_of_degree_eq\n[GOAL]\ncase h\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree p = degree q\nhlc : leadingCoeff p + leadingCoeff q ≠ 0\n⊢ degree (p + q) = degree p\n[PROOFSTEP]\nrw [degree_add_eq_of_leadingCoeff_add_ne_zero hlc, h, max_self]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : degree p = degree q\nhlc : leadingCoeff p + leadingCoeff q ≠ 0\nthis : natDegree (p + q) = natDegree p\n⊢ leadingCoeff (p + q) = leadingCoeff p + leadingCoeff q\n[PROOFSTEP]\nsimp only [leadingCoeff, this, natDegree_eq_of_degree_eq h, coeff_add]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\n⊢ ∑ x in Nat.antidiagonal (natDegree p + natDegree q), coeff p x.fst * coeff q x.snd =\n    coeff p (natDegree p) * coeff q (natDegree q)\n[PROOFSTEP]\nrefine' Finset.sum_eq_single (natDegree p, natDegree q) _ _\n[GOAL]\ncase refine'_1\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\n⊢ ∀ (b : ℕ × ℕ),\n    b ∈ Nat.antidiagonal (natDegree p + natDegree q) →\n      b ≠ (natDegree p, natDegree q) → coeff p b.fst * coeff q b.snd = 0\n[PROOFSTEP]\nrintro ⟨i, j⟩ h₁ h₂\n[GOAL]\ncase refine'_1.mk\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\ni j : ℕ\nh₁ : (i, j) ∈ Nat.antidiagonal (natDegree p + natDegree q)\nh₂ : (i, j) ≠ (natDegree p, natDegree q)\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nrw [Nat.mem_antidiagonal] at h₁ \n[GOAL]\ncase refine'_1.mk\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natDegree p + natDegree q\nh₂ : (i, j) ≠ (natDegree p, natDegree q)\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nby_cases H : natDegree p < i\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natDegree p + natDegree q\nh₂ : (i, j) ≠ (natDegree p, natDegree q)\nH : natDegree p < i\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nrw [coeff_eq_zero_of_degree_lt (lt_of_le_of_lt degree_le_natDegree (WithBot.coe_lt_coe.2 H)), zero_mul]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natDegree p + natDegree q\nh₂ : (i, j) ≠ (natDegree p, natDegree q)\nH : ¬natDegree p < i\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nrw [not_lt_iff_eq_or_lt] at H \n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natDegree p + natDegree q\nh₂ : (i, j) ≠ (natDegree p, natDegree q)\nH : natDegree p = i ∨ i < natDegree p\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\ncases' H with H H\n[GOAL]\ncase neg.inl\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natDegree p + natDegree q\nh₂ : (i, j) ≠ (natDegree p, natDegree q)\nH : natDegree p = i\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nsubst H\n[GOAL]\ncase neg.inl\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nj : ℕ\nh₁ : (natDegree p, j).fst + (natDegree p, j).snd = natDegree p + natDegree q\nh₂ : (natDegree p, j) ≠ (natDegree p, natDegree q)\n⊢ coeff p (natDegree p, j).fst * coeff q (natDegree p, j).snd = 0\n[PROOFSTEP]\nrw [add_left_cancel_iff] at h₁ \n[GOAL]\ncase neg.inl\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nj : ℕ\nh₁ : (natDegree p, j).snd = natDegree q\nh₂ : (natDegree p, j) ≠ (natDegree p, natDegree q)\n⊢ coeff p (natDegree p, j).fst * coeff q (natDegree p, j).snd = 0\n[PROOFSTEP]\ndsimp at h₁ \n[GOAL]\ncase neg.inl\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nj : ℕ\nh₁ : j = natDegree q\nh₂ : (natDegree p, j) ≠ (natDegree p, natDegree q)\n⊢ coeff p (natDegree p, j).fst * coeff q (natDegree p, j).snd = 0\n[PROOFSTEP]\nsubst h₁\n[GOAL]\ncase neg.inl\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nh₂ : (natDegree p, natDegree q) ≠ (natDegree p, natDegree q)\n⊢ coeff p (natDegree p, natDegree q).fst * coeff q (natDegree p, natDegree q).snd = 0\n[PROOFSTEP]\nexact (h₂ rfl).elim\n[GOAL]\ncase neg.inr\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natDegree p + natDegree q\nh₂ : (i, j) ≠ (natDegree p, natDegree q)\nH : i < natDegree p\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nsuffices natDegree q < j by\n  rw [coeff_eq_zero_of_degree_lt (lt_of_le_of_lt degree_le_natDegree (WithBot.coe_lt_coe.2 this)), mul_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natDegree p + natDegree q\nh₂ : (i, j) ≠ (natDegree p, natDegree q)\nH : i < natDegree p\nthis : natDegree q < j\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nrw [coeff_eq_zero_of_degree_lt (lt_of_le_of_lt degree_le_natDegree (WithBot.coe_lt_coe.2 this)), mul_zero]\n[GOAL]\ncase neg.inr\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natDegree p + natDegree q\nh₂ : (i, j) ≠ (natDegree p, natDegree q)\nH : i < natDegree p\n⊢ natDegree q < j\n[PROOFSTEP]\nby_contra' H'\n[GOAL]\ncase neg.inr\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natDegree p + natDegree q\nh₂ : (i, j) ≠ (natDegree p, natDegree q)\nH : i < natDegree p\nH' : j ≤ natDegree q\n⊢ False\n[PROOFSTEP]\nexact ne_of_lt (Nat.lt_of_lt_of_le (Nat.add_lt_add_right H j) (Nat.add_le_add_left H' _)) h₁\n[GOAL]\ncase refine'_2\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\n⊢ ¬(natDegree p, natDegree q) ∈ Nat.antidiagonal (natDegree p + natDegree q) →\n    coeff p (natDegree p, natDegree q).fst * coeff q (natDegree p, natDegree q).snd = 0\n[PROOFSTEP]\nintro H\n[GOAL]\ncase refine'_2\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nH : ¬(natDegree p, natDegree q) ∈ Nat.antidiagonal (natDegree p + natDegree q)\n⊢ coeff p (natDegree p, natDegree q).fst * coeff q (natDegree p, natDegree q).snd = 0\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase refine'_2.h\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nH : ¬(natDegree p, natDegree q) ∈ Nat.antidiagonal (natDegree p + natDegree q)\n⊢ False\n[PROOFSTEP]\napply H\n[GOAL]\ncase refine'_2.h\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nH : ¬(natDegree p, natDegree q) ∈ Nat.antidiagonal (natDegree p + natDegree q)\n⊢ (natDegree p, natDegree q) ∈ Nat.antidiagonal (natDegree p + natDegree q)\n[PROOFSTEP]\nrw [Nat.mem_antidiagonal]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\n⊢ p ≠ 0\n[PROOFSTEP]\nrefine' mt _ h\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\n⊢ p = 0 → leadingCoeff p * leadingCoeff q = 0\n[PROOFSTEP]\nexact fun hp => by rw [hp, leadingCoeff_zero, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\nhp : p = 0\n⊢ leadingCoeff p * leadingCoeff q = 0\n[PROOFSTEP]\nrw [hp, leadingCoeff_zero, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\nhp : p ≠ 0\n⊢ q ≠ 0\n[PROOFSTEP]\nrefine' mt _ h\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\nhp : p ≠ 0\n⊢ q = 0 → leadingCoeff p * leadingCoeff q = 0\n[PROOFSTEP]\nexact fun hq => by rw [hq, leadingCoeff_zero, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q = 0\n⊢ leadingCoeff p * leadingCoeff q = 0\n[PROOFSTEP]\nrw [hq, leadingCoeff_zero, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ degree p + degree q ≤ degree (p * q)\n[PROOFSTEP]\nrw [degree_eq_natDegree hp, degree_eq_natDegree hq]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ ↑(natDegree p) + ↑(natDegree q) ≤ degree (p * q)\n[PROOFSTEP]\nrefine le_degree_of_ne_zero (n := natDegree p + natDegree q) ?_\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ coeff (p * q) (natDegree p + natDegree q) ≠ 0\n[PROOFSTEP]\nrwa [coeff_mul_degree_add_degree]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhq : Monic q\nhp : p = 0\n⊢ degree (p * q) = degree p + degree q\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhq : Monic q\nhp : ¬p = 0\n⊢ Polynomial.leadingCoeff p * Polynomial.leadingCoeff q ≠ 0\n[PROOFSTEP]\nrwa [hq.leadingCoeff, mul_one, Ne.def, leadingCoeff_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\nh₁ : leadingCoeff p = 0\n⊢ leadingCoeff p * leadingCoeff q = 0\n[PROOFSTEP]\nrw [h₁, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\nhp : p ≠ 0\nh₁ : leadingCoeff q = 0\n⊢ leadingCoeff p * leadingCoeff q = 0\n[PROOFSTEP]\nrw [h₁, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ degree (p * q) = ↑(natDegree p + natDegree q)\n[PROOFSTEP]\nrw [degree_mul' h, Nat.cast_add, degree_eq_natDegree hp, degree_eq_natDegree hq]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\n⊢ leadingCoeff (p * q) = leadingCoeff p * leadingCoeff q\n[PROOFSTEP]\nunfold leadingCoeff\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\n⊢ coeff (p * q) (natDegree (p * q)) = coeff p (natDegree p) * coeff q (natDegree q)\n[PROOFSTEP]\nrw [natDegree_mul' h, coeff_mul_degree_add_degree]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p * leadingCoeff q ≠ 0\n⊢ leadingCoeff p * leadingCoeff q = coeff p (natDegree p) * coeff q (natDegree q)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : card (support p) ≤ 1\n⊢ ↑(monomial (natDegree p)) (leadingCoeff p) = p\n[PROOFSTEP]\nrcases card_support_le_one_iff_monomial.1 h with ⟨n, a, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\nq : R[X]\nι : Type u_1\nn : ℕ\na : R\nh : card (support (↑(monomial n) a)) ≤ 1\n⊢ ↑(monomial (natDegree (↑(monomial n) a))) (leadingCoeff (↑(monomial n) a)) = ↑(monomial n) a\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\nq : R[X]\nι : Type u_1\nn : ℕ\na : R\nh : card (support (↑(monomial n) a)) ≤ 1\nha : a = 0\n⊢ ↑(monomial (natDegree (↑(monomial n) a))) (leadingCoeff (↑(monomial n) a)) = ↑(monomial n) a\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\nq : R[X]\nι : Type u_1\nn : ℕ\na : R\nh : card (support (↑(monomial n) a)) ≤ 1\nha : ¬a = 0\n⊢ ↑(monomial (natDegree (↑(monomial n) a))) (leadingCoeff (↑(monomial n) a)) = ↑(monomial n) a\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : card (support p) ≤ 1\n⊢ ↑C (leadingCoeff p) * X ^ natDegree p = p\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial, monomial_natDegree_leadingCoeff_eq_self h]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\n⊢ leadingCoeff p ^ Nat.zero ≠ 0 → leadingCoeff (p ^ Nat.zero) = leadingCoeff p ^ Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nih : leadingCoeff p ^ n ≠ 0 → leadingCoeff (p ^ n) = leadingCoeff p ^ n\nh : leadingCoeff p ^ Nat.succ n ≠ 0\n⊢ leadingCoeff (p ^ Nat.succ n) = leadingCoeff p ^ Nat.succ n\n[PROOFSTEP]\nhave h₁ : leadingCoeff p ^ n ≠ 0 := fun h₁ => h <| by rw [pow_succ, h₁, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nih : leadingCoeff p ^ n ≠ 0 → leadingCoeff (p ^ n) = leadingCoeff p ^ n\nh : leadingCoeff p ^ Nat.succ n ≠ 0\nh₁ : leadingCoeff p ^ n = 0\n⊢ leadingCoeff p ^ Nat.succ n = 0\n[PROOFSTEP]\nrw [pow_succ, h₁, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nih : leadingCoeff p ^ n ≠ 0 → leadingCoeff (p ^ n) = leadingCoeff p ^ n\nh : leadingCoeff p ^ Nat.succ n ≠ 0\nh₁ : leadingCoeff p ^ n ≠ 0\n⊢ leadingCoeff (p ^ Nat.succ n) = leadingCoeff p ^ Nat.succ n\n[PROOFSTEP]\nhave h₂ : leadingCoeff p * leadingCoeff (p ^ n) ≠ 0 := by rwa [pow_succ, ← ih h₁] at h \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nih : leadingCoeff p ^ n ≠ 0 → leadingCoeff (p ^ n) = leadingCoeff p ^ n\nh : leadingCoeff p ^ Nat.succ n ≠ 0\nh₁ : leadingCoeff p ^ n ≠ 0\n⊢ leadingCoeff p * leadingCoeff (p ^ n) ≠ 0\n[PROOFSTEP]\nrwa [pow_succ, ← ih h₁] at h \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nih : leadingCoeff p ^ n ≠ 0 → leadingCoeff (p ^ n) = leadingCoeff p ^ n\nh : leadingCoeff p ^ Nat.succ n ≠ 0\nh₁ : leadingCoeff p ^ n ≠ 0\nh₂ : leadingCoeff p * leadingCoeff (p ^ n) ≠ 0\n⊢ leadingCoeff (p ^ Nat.succ n) = leadingCoeff p ^ Nat.succ n\n[PROOFSTEP]\nrw [pow_succ, pow_succ, leadingCoeff_mul' h₂, ih h₁]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : leadingCoeff p ^ 0 ≠ 0\n⊢ degree (p ^ 0) = 0 • degree p\n[PROOFSTEP]\nrw [pow_zero, ← C_1] at *\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : 1 ≠ 0\n⊢ degree (↑C 1) = 0 • degree p\n[PROOFSTEP]\nrw [degree_C h, zero_nsmul]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : leadingCoeff p ^ (n + 1) ≠ 0\n⊢ degree (p ^ (n + 1)) = (n + 1) • degree p\n[PROOFSTEP]\nhave h₁ : leadingCoeff p ^ n ≠ 0 := fun h₁ => h <| by rw [pow_succ, h₁, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : leadingCoeff p ^ (n + 1) ≠ 0\nh₁ : leadingCoeff p ^ n = 0\n⊢ leadingCoeff p ^ (n + 1) = 0\n[PROOFSTEP]\nrw [pow_succ, h₁, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : leadingCoeff p ^ (n + 1) ≠ 0\nh₁ : leadingCoeff p ^ n ≠ 0\n⊢ degree (p ^ (n + 1)) = (n + 1) • degree p\n[PROOFSTEP]\nhave h₂ : leadingCoeff p * leadingCoeff (p ^ n) ≠ 0 := by rwa [pow_succ, ← leadingCoeff_pow' h₁] at h \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : leadingCoeff p ^ (n + 1) ≠ 0\nh₁ : leadingCoeff p ^ n ≠ 0\n⊢ leadingCoeff p * leadingCoeff (p ^ n) ≠ 0\n[PROOFSTEP]\nrwa [pow_succ, ← leadingCoeff_pow' h₁] at h \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : leadingCoeff p ^ (n + 1) ≠ 0\nh₁ : leadingCoeff p ^ n ≠ 0\nh₂ : leadingCoeff p * leadingCoeff (p ^ n) ≠ 0\n⊢ degree (p ^ (n + 1)) = (n + 1) • degree p\n[PROOFSTEP]\nrw [pow_succ, degree_mul' h₂, succ_nsmul, degree_pow' h₁]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : leadingCoeff p ^ n ≠ 0\nhp0 : p = 0\nhn0 : n = 0\n⊢ natDegree (p ^ n) = n * natDegree p\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : leadingCoeff p ^ n ≠ 0\nhp0 : p = 0\nhn0 : ¬n = 0\n⊢ natDegree (p ^ n) = n * natDegree p\n[PROOFSTEP]\nrw [hp0, zero_pow (Nat.pos_of_ne_zero hn0)]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : leadingCoeff p ^ n ≠ 0\nhp0 : p = 0\nhn0 : ¬n = 0\n⊢ natDegree 0 = n * natDegree 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : leadingCoeff p ^ n ≠ 0\nhp0 : ¬p = 0\nhpn0 : p ^ n = 0\n⊢ False\n[PROOFSTEP]\nhave h1 := h\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : leadingCoeff p ^ n ≠ 0\nhp0 : ¬p = 0\nhpn0 : p ^ n = 0\nh1 : leadingCoeff p ^ n ≠ 0\n⊢ False\n[PROOFSTEP]\nrw [← leadingCoeff_pow' h1, hpn0, leadingCoeff_zero] at h \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : 0 ≠ 0\nhp0 : ¬p = 0\nhpn0 : p ^ n = 0\nh1 : leadingCoeff p ^ n ≠ 0\n⊢ False\n[PROOFSTEP]\nexact h rfl\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : leadingCoeff p ^ n ≠ 0\nhp0 : ¬p = 0\nhpn : p ^ n ≠ 0\n⊢ ↑(natDegree (p ^ n)) = ↑(n * natDegree p)\n[PROOFSTEP]\nrw [← degree_eq_natDegree hpn, degree_pow' h, degree_eq_natDegree hp0]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ\nh : leadingCoeff p ^ n ≠ 0\nhp0 : ¬p = 0\nhpn : p ^ n ≠ 0\n⊢ n • ↑(natDegree p) = ↑(n * natDegree p)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nhp : Monic p\n⊢ leadingCoeff (p * q) = leadingCoeff q\n[PROOFSTEP]\nrcases eq_or_ne q 0 with (rfl | H)\n[GOAL]\ncase inl\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nhp : Monic p\n⊢ leadingCoeff (p * 0) = leadingCoeff 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nhp : Monic p\nH : q ≠ 0\n⊢ leadingCoeff (p * q) = leadingCoeff q\n[PROOFSTEP]\nrw [leadingCoeff_mul', hp.leadingCoeff, one_mul]\n[GOAL]\ncase inr\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nhp : Monic p\nH : q ≠ 0\n⊢ leadingCoeff p * leadingCoeff q ≠ 0\n[PROOFSTEP]\nrwa [hp.leadingCoeff, one_mul, Ne.def, leadingCoeff_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nhq : Monic q\nH : leadingCoeff p = 0\n⊢ leadingCoeff (p * q) = leadingCoeff p\n[PROOFSTEP]\nrw [H, leadingCoeff_eq_zero.1 H, zero_mul, leadingCoeff_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nhq : Monic q\nH : leadingCoeff p ≠ 0\n⊢ leadingCoeff (p * q) = leadingCoeff p\n[PROOFSTEP]\nrw [leadingCoeff_mul', hq.leadingCoeff, mul_one]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\nhq : Monic q\nH : leadingCoeff p ≠ 0\n⊢ leadingCoeff p * leadingCoeff q ≠ 0\n[PROOFSTEP]\nrwa [hq.leadingCoeff, mul_one]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\n⊢ natDegree (p * q) ≤ natDegree p + natDegree q\n[PROOFSTEP]\napply natDegree_le_of_degree_le\n[GOAL]\ncase a\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\n⊢ degree (p * q) ≤ ↑(natDegree p + natDegree q)\n[PROOFSTEP]\napply le_trans (degree_mul_le p q)\n[GOAL]\ncase a\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\n⊢ degree p + degree q ≤ ↑(natDegree p + natDegree q)\n[PROOFSTEP]\nrw [Nat.cast_add]\n[GOAL]\ncase a\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\n⊢ degree p + degree q ≤ ↑(natDegree p) + ↑(natDegree q)\n[PROOFSTEP]\napply add_le_add\n[GOAL]\ncase a.h₁\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\n⊢ degree p ≤ ↑(natDegree p)\n[PROOFSTEP]\napply degree_le_natDegree\n[GOAL]\ncase a.h₂\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\nι : Type u_1\np q : R[X]\n⊢ degree q ≤ ↑(natDegree q)\n[PROOFSTEP]\napply degree_le_natDegree\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nn : ℕ\n⊢ natDegree (p ^ n) ≤ n * natDegree p\n[PROOFSTEP]\ninduction' n with i hi\n[GOAL]\ncase zero\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\n⊢ natDegree (p ^ Nat.zero) ≤ Nat.zero * natDegree p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : natDegree (p ^ i) ≤ i * natDegree p\n⊢ natDegree (p ^ Nat.succ i) ≤ Nat.succ i * natDegree p\n[PROOFSTEP]\nrw [pow_succ, Nat.succ_mul, add_comm]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : natDegree (p ^ i) ≤ i * natDegree p\n⊢ natDegree (p * p ^ i) ≤ natDegree p + i * natDegree p\n[PROOFSTEP]\napply le_trans natDegree_mul_le\n[GOAL]\ncase succ\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : natDegree (p ^ i) ≤ i * natDegree p\n⊢ natDegree p + natDegree (p ^ i) ≤ natDegree p + i * natDegree p\n[PROOFSTEP]\nexact add_le_add_left hi _\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\nn : ℕ\n⊢ coeff (p ^ n) (n * natDegree p) = leadingCoeff p ^ n\n[PROOFSTEP]\ninduction' n with i hi\n[GOAL]\ncase zero\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\n⊢ coeff (p ^ Nat.zero) (Nat.zero * natDegree p) = leadingCoeff p ^ Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (i * natDegree p) = leadingCoeff p ^ i\n⊢ coeff (p ^ Nat.succ i) (Nat.succ i * natDegree p) = leadingCoeff p ^ Nat.succ i\n[PROOFSTEP]\nrw [pow_succ', pow_succ', Nat.succ_mul]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (i * natDegree p) = leadingCoeff p ^ i\n⊢ coeff (p ^ i * p) (i * natDegree p + natDegree p) = leadingCoeff p ^ i * leadingCoeff p\n[PROOFSTEP]\nby_cases hp1 : p.leadingCoeff ^ i = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (i * natDegree p) = leadingCoeff p ^ i\nhp1 : leadingCoeff p ^ i = 0\n⊢ coeff (p ^ i * p) (i * natDegree p + natDegree p) = leadingCoeff p ^ i * leadingCoeff p\n[PROOFSTEP]\nrw [hp1, zero_mul]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (i * natDegree p) = leadingCoeff p ^ i\nhp1 : leadingCoeff p ^ i = 0\n⊢ coeff (p ^ i * p) (i * natDegree p + natDegree p) = 0\n[PROOFSTEP]\nby_cases hp2 : p ^ i = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (i * natDegree p) = leadingCoeff p ^ i\nhp1 : leadingCoeff p ^ i = 0\nhp2 : p ^ i = 0\n⊢ coeff (p ^ i * p) (i * natDegree p + natDegree p) = 0\n[PROOFSTEP]\nrw [hp2, zero_mul, coeff_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (i * natDegree p) = leadingCoeff p ^ i\nhp1 : leadingCoeff p ^ i = 0\nhp2 : ¬p ^ i = 0\n⊢ coeff (p ^ i * p) (i * natDegree p + natDegree p) = 0\n[PROOFSTEP]\napply coeff_eq_zero_of_natDegree_lt\n[GOAL]\ncase neg.h\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (i * natDegree p) = leadingCoeff p ^ i\nhp1 : leadingCoeff p ^ i = 0\nhp2 : ¬p ^ i = 0\n⊢ natDegree (p ^ i * p) < i * natDegree p + natDegree p\n[PROOFSTEP]\nhave h1 : (p ^ i).natDegree < i * p.natDegree :=\n  by\n  refine lt_of_le_of_ne natDegree_pow_le fun h => hp2 ?_\n  rw [← h, hp1] at hi \n  exact leadingCoeff_eq_zero.mp hi\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (i * natDegree p) = leadingCoeff p ^ i\nhp1 : leadingCoeff p ^ i = 0\nhp2 : ¬p ^ i = 0\n⊢ natDegree (p ^ i) < i * natDegree p\n[PROOFSTEP]\nrefine lt_of_le_of_ne natDegree_pow_le fun h => hp2 ?_\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (i * natDegree p) = leadingCoeff p ^ i\nhp1 : leadingCoeff p ^ i = 0\nhp2 : ¬p ^ i = 0\nh : natDegree (p ^ i) = i * natDegree p\n⊢ p ^ i = 0\n[PROOFSTEP]\nrw [← h, hp1] at hi \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (natDegree (p ^ i)) = 0\nhp1 : leadingCoeff p ^ i = 0\nhp2 : ¬p ^ i = 0\nh : natDegree (p ^ i) = i * natDegree p\n⊢ p ^ i = 0\n[PROOFSTEP]\nexact leadingCoeff_eq_zero.mp hi\n[GOAL]\ncase neg.h\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (i * natDegree p) = leadingCoeff p ^ i\nhp1 : leadingCoeff p ^ i = 0\nhp2 : ¬p ^ i = 0\nh1 : natDegree (p ^ i) < i * natDegree p\n⊢ natDegree (p ^ i * p) < i * natDegree p + natDegree p\n[PROOFSTEP]\ncalc\n  (p ^ i * p).natDegree ≤ (p ^ i).natDegree + p.natDegree := natDegree_mul_le\n  _ < i * p.natDegree + p.natDegree := add_lt_add_right h1 _\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (i * natDegree p) = leadingCoeff p ^ i\nhp1 : ¬leadingCoeff p ^ i = 0\n⊢ coeff (p ^ i * p) (i * natDegree p + natDegree p) = leadingCoeff p ^ i * leadingCoeff p\n[PROOFSTEP]\nrw [← natDegree_pow' hp1, ← leadingCoeff_pow' hp1]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\np : R[X]\ni : ℕ\nhi : coeff (p ^ i) (i * natDegree p) = leadingCoeff p ^ i\nhp1 : ¬leadingCoeff p ^ i = 0\n⊢ coeff (p ^ i * p) (natDegree (p ^ i) + natDegree p) = leadingCoeff (p ^ i) * leadingCoeff p\n[PROOFSTEP]\nexact coeff_mul_degree_add_degree _ _\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nf : R[X]\ndf dg : ℕ\ng : R[X]\nhdf : natDegree f ≤ df\nhdg : natDegree g ≤ dg\n⊢ coeff (f * g) (df + dg) = coeff f df * coeff g dg\n[PROOFSTEP]\nrw [coeff_mul, Finset.sum_eq_single_of_mem (df, dg)]\n[GOAL]\ncase h\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nf : R[X]\ndf dg : ℕ\ng : R[X]\nhdf : natDegree f ≤ df\nhdg : natDegree g ≤ dg\n⊢ (df, dg) ∈ Nat.antidiagonal (df + dg)\n[PROOFSTEP]\nrw [Finset.Nat.mem_antidiagonal]\n[GOAL]\ncase h₀\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nf : R[X]\ndf dg : ℕ\ng : R[X]\nhdf : natDegree f ≤ df\nhdg : natDegree g ≤ dg\n⊢ ∀ (b : ℕ × ℕ), b ∈ Nat.antidiagonal (df + dg) → b ≠ (df, dg) → coeff f b.fst * coeff g b.snd = 0\n[PROOFSTEP]\nrintro ⟨df', dg'⟩ hmem hne\n[GOAL]\ncase h₀.mk\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nf : R[X]\ndf dg : ℕ\ng : R[X]\nhdf : natDegree f ≤ df\nhdg : natDegree g ≤ dg\ndf' dg' : ℕ\nhmem : (df', dg') ∈ Nat.antidiagonal (df + dg)\nhne : (df', dg') ≠ (df, dg)\n⊢ coeff f (df', dg').fst * coeff g (df', dg').snd = 0\n[PROOFSTEP]\nobtain h | hdf' := lt_or_le df df'\n[GOAL]\ncase h₀.mk.inl\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nf : R[X]\ndf dg : ℕ\ng : R[X]\nhdf : natDegree f ≤ df\nhdg : natDegree g ≤ dg\ndf' dg' : ℕ\nhmem : (df', dg') ∈ Nat.antidiagonal (df + dg)\nhne : (df', dg') ≠ (df, dg)\nh : df < df'\n⊢ coeff f (df', dg').fst * coeff g (df', dg').snd = 0\n[PROOFSTEP]\nrw [coeff_eq_zero_of_natDegree_lt (hdf.trans_lt h), zero_mul]\n[GOAL]\ncase h₀.mk.inr\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nf : R[X]\ndf dg : ℕ\ng : R[X]\nhdf : natDegree f ≤ df\nhdg : natDegree g ≤ dg\ndf' dg' : ℕ\nhmem : (df', dg') ∈ Nat.antidiagonal (df + dg)\nhne : (df', dg') ≠ (df, dg)\nhdf' : df' ≤ df\n⊢ coeff f (df', dg').fst * coeff g (df', dg').snd = 0\n[PROOFSTEP]\nobtain h | hdg' := lt_or_le dg dg'\n[GOAL]\ncase h₀.mk.inr.inl\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nf : R[X]\ndf dg : ℕ\ng : R[X]\nhdf : natDegree f ≤ df\nhdg : natDegree g ≤ dg\ndf' dg' : ℕ\nhmem : (df', dg') ∈ Nat.antidiagonal (df + dg)\nhne : (df', dg') ≠ (df, dg)\nhdf' : df' ≤ df\nh : dg < dg'\n⊢ coeff f (df', dg').fst * coeff g (df', dg').snd = 0\n[PROOFSTEP]\nrw [coeff_eq_zero_of_natDegree_lt (hdg.trans_lt h), mul_zero]\n[GOAL]\ncase h₀.mk.inr.inr\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nf : R[X]\ndf dg : ℕ\ng : R[X]\nhdf : natDegree f ≤ df\nhdg : natDegree g ≤ dg\ndf' dg' : ℕ\nhmem : (df', dg') ∈ Nat.antidiagonal (df + dg)\nhne : (df', dg') ≠ (df, dg)\nhdf' : df' ≤ df\nhdg' : dg' ≤ dg\n⊢ coeff f (df', dg').fst * coeff g (df', dg').snd = 0\n[PROOFSTEP]\nobtain ⟨rfl, rfl⟩ := eq_and_eq_of_le_of_le_of_add_le hdf' hdg' (Finset.Nat.mem_antidiagonal.1 hmem).ge\n[GOAL]\ncase h₀.mk.inr.inr.intro\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nf : R[X]\ndf dg : ℕ\ng : R[X]\nhdf : natDegree f ≤ df\nhdg : natDegree g ≤ dg\nhdf' : df ≤ df\nhdg' : dg ≤ dg\nhmem : (df, dg) ∈ Nat.antidiagonal (df + dg)\nhne : (df, dg) ≠ (df, dg)\n⊢ coeff f (df, dg).fst * coeff g (df, dg).snd = 0\n[PROOFSTEP]\nexact (hne rfl).elim\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\n⊢ 0 ≤ degree p ↔ p ≠ 0\n[PROOFSTEP]\nrw [← not_lt, Nat.WithBot.lt_zero_iff, degree_eq_bot]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\n⊢ natDegree p = 0 ↔ degree p ≤ 0\n[PROOFSTEP]\nrw [← nonpos_iff_eq_zero, natDegree_le_iff_degree_le, Nat.cast_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nf : R[X]\nn : WithBot ℕ\n⊢ degree f ≤ n ↔ ∀ (m : ℕ), n < ↑m → coeff f m = 0\n[PROOFSTEP]\nsimp only [degree, Finset.max, Finset.sup_le_iff, mem_support_iff, Ne.def, ← not_le, not_imp_comm, Nat.cast_withBot]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nf : R[X]\nn : ℕ\n⊢ degree f < ↑n ↔ ∀ (m : ℕ), n ≤ m → coeff f m = 0\n[PROOFSTEP]\nsimp only [degree, Finset.sup_lt_iff (WithBot.bot_lt_coe n), mem_support_iff, WithBot.coe_lt_coe, ← @not_le ℕ,\n  max_eq_sup_coe, Nat.cast_withBot, Ne.def, not_imp_not]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\na : R\np : R[X]\n⊢ degree (a • p) ≤ degree p\n[PROOFSTEP]\nrefine (degree_le_iff_coeff_zero _ _).2 fun m hm => ?_\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m✝ : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\na : R\np : R[X]\nm : ℕ\nhm : degree p < ↑m\n⊢ coeff (a • p) m = 0\n[PROOFSTEP]\nrw [degree_lt_iff_coeff_zero] at hm \n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m✝ : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nι : Type u_1\na : R\np : R[X]\nm : ℕ\nhm : ∀ (m_1 : ℕ), m ≤ m_1 → coeff p m_1 = 0\n⊢ coeff (a • p) m = 0\n[PROOFSTEP]\nsimp [hm m le_rfl]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhp : p ≠ 0\n⊢ degree p < degree (p * X)\n[PROOFSTEP]\nhaveI := Nontrivial.of_polynomial_ne hp\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhp : p ≠ 0\nthis : Nontrivial R\n⊢ degree p < degree (p * X)\n[PROOFSTEP]\nhave : leadingCoeff p * leadingCoeff X ≠ 0 := by simpa\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhp : p ≠ 0\nthis : Nontrivial R\n⊢ leadingCoeff p * leadingCoeff X ≠ 0\n[PROOFSTEP]\nsimpa\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhp : p ≠ 0\nthis✝ : Nontrivial R\nthis : leadingCoeff p * leadingCoeff X ≠ 0\n⊢ degree p < degree (p * X)\n[PROOFSTEP]\nerw [degree_mul' this, degree_eq_natDegree hp, degree_X, ← WithBot.coe_one, ← WithBot.coe_add, WithBot.coe_lt_coe]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhp : p ≠ 0\nthis✝ : Nontrivial R\nthis : leadingCoeff p * leadingCoeff X ≠ 0\n⊢ ↑(natDegree p) < ↑(natDegree p) + 1\n[PROOFSTEP]\nexact Nat.lt_succ_self _\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nh : p = ↑C (coeff p 0)\n⊢ natDegree p = 0\n[PROOFSTEP]\nrw [h, natDegree_C]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nhdeg : ↑n ≤ degree p\n⊢ ↑n ≤ ↑(natDegree p)\n[PROOFSTEP]\nrwa [degree_eq_natDegree <| ne_zero_of_coe_le_degree hdeg] at hdeg \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nha : a ≠ 0\n⊢ degree (↑C b) < degree (↑C a * X)\n[PROOFSTEP]\nsimpa only [degree_C_mul_X ha] using degree_C_lt\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nha : a ≠ 0\n⊢ degree (↑C a * X + ↑C b) = 1\n[PROOFSTEP]\nrw [degree_add_eq_left_of_degree_lt <| degree_C_lt_degree_C_mul_X ha, degree_C_mul_X ha]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nha : a ≠ 0\n⊢ natDegree (↑C a * X + ↑C b) = 1\n[PROOFSTEP]\nrw [natDegree_add_C, natDegree_C_mul_X a ha]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nha : a ≠ 0\n⊢ leadingCoeff (↑C a * X + ↑C b) = a\n[PROOFSTEP]\nrw [add_comm, leadingCoeff_add_of_degree_lt (degree_C_lt_degree_C_mul_X ha), leadingCoeff_C_mul_X]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\n⊢ degree (↑C a * X ^ 2 + ↑C b * X + ↑C c) ≤ 2\n[PROOFSTEP]\nsimpa only [add_assoc] using\n  degree_add_le_of_degree_le (degree_C_mul_X_pow_le 2 a)\n    (le_trans degree_linear_le <| WithBot.coe_le_coe.mpr one_le_two)\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nha : a ≠ 0\n⊢ degree (↑C b * X + ↑C c) < degree (↑C a * X ^ 2)\n[PROOFSTEP]\nsimpa only [degree_C_mul_X_pow 2 ha] using degree_linear_lt\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nha : a ≠ 0\n⊢ degree (↑C a * X ^ 2 + ↑C b * X + ↑C c) = 2\n[PROOFSTEP]\nrw [add_assoc, degree_add_eq_left_of_degree_lt <| degree_linear_lt_degree_C_mul_X_sq ha, degree_C_mul_X_pow 2 ha]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nha : a ≠ 0\n⊢ ↑2 = 2\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nha : a ≠ 0\n⊢ leadingCoeff (↑C a * X ^ 2 + ↑C b * X + ↑C c) = a\n[PROOFSTEP]\nrw [add_assoc, add_comm, leadingCoeff_add_of_degree_lt <| degree_linear_lt_degree_C_mul_X_sq ha,\n  leadingCoeff_C_mul_X_pow]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\n⊢ degree (↑C a * X ^ 3 + ↑C b * X ^ 2 + ↑C c * X + ↑C d) ≤ 3\n[PROOFSTEP]\nsimpa only [add_assoc] using\n  degree_add_le_of_degree_le (degree_C_mul_X_pow_le 3 a)\n    (le_trans degree_quadratic_le <| WithBot.coe_le_coe.mpr <| Nat.le_succ 2)\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nha : a ≠ 0\n⊢ degree (↑C b * X ^ 2 + ↑C c * X + ↑C d) < degree (↑C a * X ^ 3)\n[PROOFSTEP]\nsimpa only [degree_C_mul_X_pow 3 ha] using degree_quadratic_lt\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nha : a ≠ 0\n⊢ degree (↑C a * X ^ 3 + ↑C b * X ^ 2 + ↑C c * X + ↑C d) = 3\n[PROOFSTEP]\nrw [add_assoc, add_assoc, ← add_assoc (C b * X ^ 2),\n  degree_add_eq_left_of_degree_lt <| degree_quadratic_lt_degree_C_mul_X_cb ha, degree_C_mul_X_pow 3 ha]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nha : a ≠ 0\n⊢ ↑3 = 3\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nha : a ≠ 0\n⊢ leadingCoeff (↑C a * X ^ 3 + ↑C b * X ^ 2 + ↑C c * X + ↑C d) = a\n[PROOFSTEP]\nrw [add_assoc, add_assoc, ← add_assoc (C b * X ^ 2), add_comm,\n  leadingCoeff_add_of_degree_lt <| degree_quadratic_lt_degree_C_mul_X_cb ha, leadingCoeff_C_mul_X_pow]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\np q : R[X]\nn : ℕ\n⊢ degree (X ^ n) = ↑n\n[PROOFSTEP]\nrw [X_pow_eq_monomial, degree_monomial _ (one_ne_zero' R)]\n[GOAL]\nR✝ : Type u\nS : Type v\na b c d : R✝\nn✝ m : ℕ\ninst✝² : Semiring R✝\ninst✝¹ : Nontrivial R✝\np q : R✝[X]\nR : Type u_1\ninst✝ : Semiring R\nn : ℕ\n⊢ natDegree (X ^ n) ≤ n\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR✝ : Type u\nS : Type v\na b c d : R✝\nn✝ m : ℕ\ninst✝² : Semiring R✝\ninst✝¹ : Nontrivial R✝\np q : R✝[X]\nR : Type u_1\ninst✝ : Semiring R\nn : ℕ\n✝ : Nontrivial R\n⊢ natDegree (X ^ n) ≤ n\n[PROOFSTEP]\nrw [Polynomial.natDegree_X_pow]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\np q : R[X]\nx✝ : IsUnit X\ng : R[X]\n_hfg : ↑(monomial 1) 1 * g = 1\nhgf : g * ↑(monomial 1) 1 = 1\n⊢ 0 = 1\n[PROOFSTEP]\nrw [← coeff_one_zero, ← hgf]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\np q : R[X]\nx✝ : IsUnit X\ng : R[X]\n_hfg : ↑(monomial 1) 1 * g = 1\nhgf : g * ↑(monomial 1) 1 = 1\n⊢ 0 = coeff (g * ↑(monomial 1) 1) 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\np q : R[X]\n⊢ degree (p * X) = degree p + 1\n[PROOFSTEP]\nsimp [monic_X.degree_mul]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\np q : R[X]\n⊢ degree (p * X ^ n) = degree p + ↑n\n[PROOFSTEP]\nsimp [(monic_X_pow n).degree_mul]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np✝ q✝ p q : R[X]\n⊢ degree (p - q) ≤ max (degree p) (degree q)\n[PROOFSTEP]\nsimpa only [degree_neg q] using degree_add_le p (-q)\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nh : degree q < degree p\n⊢ leadingCoeff (p - q) = leadingCoeff p\n[PROOFSTEP]\nrw [← q.degree_neg] at h \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nh : degree (-q) < degree p\n⊢ leadingCoeff (p - q) = leadingCoeff p\n[PROOFSTEP]\nrw [sub_eq_add_neg, leadingCoeff_add_of_degree_lt' h]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nh : degree p < degree q\n⊢ leadingCoeff (p - q) = -leadingCoeff q\n[PROOFSTEP]\nrw [← q.degree_neg] at h \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nh : degree p < degree (-q)\n⊢ leadingCoeff (p - q) = -leadingCoeff q\n[PROOFSTEP]\nrw [sub_eq_add_neg, leadingCoeff_add_of_degree_lt h, leadingCoeff_neg]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nh : degree p = degree q\nhlc : leadingCoeff p ≠ leadingCoeff q\n⊢ leadingCoeff (p - q) = leadingCoeff p - leadingCoeff q\n[PROOFSTEP]\nreplace h : degree p = degree (-q) := by rwa [q.degree_neg]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nh : degree p = degree q\nhlc : leadingCoeff p ≠ leadingCoeff q\n⊢ degree p = degree (-q)\n[PROOFSTEP]\nrwa [q.degree_neg]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nhlc : leadingCoeff p ≠ leadingCoeff q\nh : degree p = degree (-q)\n⊢ leadingCoeff (p - q) = leadingCoeff p - leadingCoeff q\n[PROOFSTEP]\nreplace hlc : leadingCoeff p + leadingCoeff (-q) ≠ 0 := by\n  rwa [← sub_ne_zero, sub_eq_add_neg, ← q.leadingCoeff_neg] at hlc \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nhlc : leadingCoeff p ≠ leadingCoeff q\nh : degree p = degree (-q)\n⊢ leadingCoeff p + leadingCoeff (-q) ≠ 0\n[PROOFSTEP]\nrwa [← sub_ne_zero, sub_eq_add_neg, ← q.leadingCoeff_neg] at hlc \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nh : degree p = degree (-q)\nhlc : leadingCoeff p + leadingCoeff (-q) ≠ 0\n⊢ leadingCoeff (p - q) = leadingCoeff p - leadingCoeff q\n[PROOFSTEP]\nrw [sub_eq_add_neg, leadingCoeff_add_of_degree_eq h hlc, leadingCoeff_neg, sub_eq_add_neg]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np✝ q✝ p q : R[X]\n⊢ natDegree (p - q) ≤ max (natDegree p) (natDegree q)\n[PROOFSTEP]\nsimpa only [← natDegree_neg q] using natDegree_add_le p (-q)\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nhd : degree p = degree q\nhp0 : p ≠ 0\nhlc : leadingCoeff p = leadingCoeff q\nhp : ↑(monomial (natDegree p)) (leadingCoeff p) + erase (natDegree p) p = p\nhq : ↑(monomial (natDegree q)) (leadingCoeff q) + erase (natDegree q) q = q\n⊢ natDegree p = natDegree q\n[PROOFSTEP]\nunfold natDegree\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nhd : degree p = degree q\nhp0 : p ≠ 0\nhlc : leadingCoeff p = leadingCoeff q\nhp : ↑(monomial (natDegree p)) (leadingCoeff p) + erase (natDegree p) p = p\nhq : ↑(monomial (natDegree q)) (leadingCoeff q) + erase (natDegree q) q = q\n⊢ WithBot.unbot' 0 (degree p) = WithBot.unbot' 0 (degree q)\n[PROOFSTEP]\nrw [hd]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nhd : degree p = degree q\nhp0 : p ≠ 0\nhlc : leadingCoeff p = leadingCoeff q\nhp : ↑(monomial (natDegree p)) (leadingCoeff p) + erase (natDegree p) p = p\nhq : ↑(monomial (natDegree q)) (leadingCoeff q) + erase (natDegree q) q = q\nhd' : natDegree p = natDegree q\nhq0 : q ≠ 0\n⊢ degree (p - q) = degree (erase (natDegree q) p + -erase (natDegree q) q)\n[PROOFSTEP]\nconv =>\n  lhs\n  rw [← hp, ← hq, hlc, hd', add_sub_add_left_eq_sub, sub_eq_add_neg]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nhd : degree p = degree q\nhp0 : p ≠ 0\nhlc : leadingCoeff p = leadingCoeff q\nhp : ↑(monomial (natDegree p)) (leadingCoeff p) + erase (natDegree p) p = p\nhq : ↑(monomial (natDegree q)) (leadingCoeff q) + erase (natDegree q) q = q\nhd' : natDegree p = natDegree q\nhq0 : q ≠ 0\n| degree (p - q) = degree (erase (natDegree q) p + -erase (natDegree q) q)\n[PROOFSTEP]\n  lhs\n  rw [← hp, ← hq, hlc, hd', add_sub_add_left_eq_sub, sub_eq_add_neg]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nhd : degree p = degree q\nhp0 : p ≠ 0\nhlc : leadingCoeff p = leadingCoeff q\nhp : ↑(monomial (natDegree p)) (leadingCoeff p) + erase (natDegree p) p = p\nhq : ↑(monomial (natDegree q)) (leadingCoeff q) + erase (natDegree q) q = q\nhd' : natDegree p = natDegree q\nhq0 : q ≠ 0\n| degree (p - q) = degree (erase (natDegree q) p + -erase (natDegree q) q)\n[PROOFSTEP]\n  lhs\n  rw [← hp, ← hq, hlc, hd', add_sub_add_left_eq_sub, sub_eq_add_neg]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nhd : degree p = degree q\nhp0 : p ≠ 0\nhlc : leadingCoeff p = leadingCoeff q\nhp : ↑(monomial (natDegree p)) (leadingCoeff p) + erase (natDegree p) p = p\nhq : ↑(monomial (natDegree q)) (leadingCoeff q) + erase (natDegree q) q = q\nhd' : natDegree p = natDegree q\nhq0 : q ≠ 0\n| degree (p - q) = degree (erase (natDegree q) p + -erase (natDegree q) q)\n[PROOFSTEP]\nlhs\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nhd : degree p = degree q\nhp0 : p ≠ 0\nhlc : leadingCoeff p = leadingCoeff q\nhp : ↑(monomial (natDegree p)) (leadingCoeff p) + erase (natDegree p) p = p\nhq : ↑(monomial (natDegree q)) (leadingCoeff q) + erase (natDegree q) q = q\nhd' : natDegree p = natDegree q\nhq0 : q ≠ 0\n| degree (p - q)\n[PROOFSTEP]\nrw [← hp, ← hq, hlc, hd', add_sub_add_left_eq_sub, sub_eq_add_neg]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nh : degree q < degree p\n⊢ degree (p - q) = degree p\n[PROOFSTEP]\nrw [← degree_neg q] at h \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nh : degree (-q) < degree p\n⊢ degree (p - q) = degree p\n[PROOFSTEP]\nrw [sub_eq_add_neg, degree_add_eq_left_of_degree_lt h]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nh : degree p < degree q\n⊢ degree (p - q) = degree q\n[PROOFSTEP]\nrw [← degree_neg q] at h \n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Ring R\np q : R[X]\nh : degree p < degree (-q)\n⊢ degree (p - q) = degree q\n[PROOFSTEP]\nrw [sub_eq_add_neg, degree_add_eq_right_of_degree_lt h, degree_neg]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝¹ : Nontrivial R\ninst✝ : Semiring R\na : R\n⊢ degree (X + ↑C a) = 1\n[PROOFSTEP]\nhave : degree (C a) < degree (X : R[X]) :=\n  calc\n    degree (C a) ≤ 0 := degree_C_le\n    _ < 1 := (WithBot.some_lt_some.mpr zero_lt_one)\n    _ = degree X := degree_X.symm\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝¹ : Nontrivial R\ninst✝ : Semiring R\na : R\nthis : degree (↑C a) < degree X\n⊢ degree (X + ↑C a) = 1\n[PROOFSTEP]\nrw [degree_add_eq_left_of_degree_lt this, degree_X]\n[GOAL]\nR : Type u\nS : Type v\na b c✝ d : R\nn m : ℕ\ninst✝² : Nontrivial R\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nc : S\n⊢ nextCoeff (X + ↑C c) = c\n[PROOFSTEP]\nnontriviality S\n[GOAL]\nR : Type u\nS : Type v\na b c✝ d : R\nn m : ℕ\ninst✝² : Nontrivial R\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nc : S\n✝ : Nontrivial S\n⊢ nextCoeff (X + ↑C c) = c\n[PROOFSTEP]\nsimp [nextCoeff_of_pos_natDegree]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝¹ : Nontrivial R\ninst✝ : Semiring R\nn : ℕ\nhn : 0 < n\na : R\n⊢ degree (X ^ n + ↑C a) = ↑n\n[PROOFSTEP]\nhave : degree (C a) < degree ((X : R[X]) ^ n) := degree_C_le.trans_lt <| by rwa [degree_X_pow, Nat.cast_pos]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝¹ : Nontrivial R\ninst✝ : Semiring R\nn : ℕ\nhn : 0 < n\na : R\n⊢ 0 < degree (X ^ n)\n[PROOFSTEP]\nrwa [degree_X_pow, Nat.cast_pos]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝¹ : Nontrivial R\ninst✝ : Semiring R\nn : ℕ\nhn : 0 < n\na : R\nthis : degree (↑C a) < degree (X ^ n)\n⊢ degree (X ^ n + ↑C a) = ↑n\n[PROOFSTEP]\nrw [degree_add_eq_left_of_degree_lt this, degree_X_pow]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝¹ : Nontrivial R\ninst✝ : Semiring R\nn : ℕ\nhn : 0 < n\na : R\n⊢ degree (X ^ n + ↑C a) ≠ ⊥\n[PROOFSTEP]\nrw [degree_X_pow_add_C hn a]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝¹ : Nontrivial R\ninst✝ : Semiring R\nn : ℕ\nhn : 0 < n\na : R\n⊢ ↑n ≠ ⊥\n[PROOFSTEP]\nexact WithBot.coe_ne_bot\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Nontrivial R\ninst✝ : Semiring R\nn : ℕ\nr : R\n⊢ natDegree (X ^ n + ↑C r) = n\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Nontrivial R\ninst✝ : Semiring R\nn : ℕ\nr : R\nhn : n = 0\n⊢ natDegree (X ^ n + ↑C r) = n\n[PROOFSTEP]\nrw [hn, pow_zero, ← C_1, ← RingHom.map_add, natDegree_C]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Nontrivial R\ninst✝ : Semiring R\nn : ℕ\nr : R\nhn : ¬n = 0\n⊢ natDegree (X ^ n + ↑C r) = n\n[PROOFSTEP]\nexact natDegree_eq_of_degree_eq_some (degree_X_pow_add_C (pos_iff_ne_zero.mpr hn) r)\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝¹ : Nontrivial R\ninst✝ : Semiring R\nn : ℕ\nhn : 0 < n\na : R\nh : X ^ n + ↑C a = 1\n⊢ n = 0\n[PROOFSTEP]\nsimpa only [natDegree_X_pow_add_C, natDegree_one] using congr_arg natDegree h\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\nn : ℕ\nhn : 0 < n\nr : R\n⊢ leadingCoeff (X ^ n + ↑C r) = 1\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Semiring R\nn : ℕ\nhn : 0 < n\nr : R\n✝ : Nontrivial R\n⊢ leadingCoeff (X ^ n + ↑C r) = 1\n[PROOFSTEP]\nrw [leadingCoeff, natDegree_X_pow_add_C, coeff_add, coeff_X_pow_self, coeff_C, if_neg (pos_iff_ne_zero.mp hn), add_zero]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nr : S\n⊢ leadingCoeff (X + ↑C r) = 1\n[PROOFSTEP]\nrw [← pow_one (X : S[X]), leadingCoeff_X_pow_add_C zero_lt_one]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\nr : R\ni : ℕ\n⊢ leadingCoeff ((X + ↑C r) ^ i) = 1\n[PROOFSTEP]\nnontriviality\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\nr : R\ni : ℕ\n✝ : Nontrivial R\n⊢ leadingCoeff ((X + ↑C r) ^ i) = 1\n[PROOFSTEP]\nrw [leadingCoeff_pow']\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\nr : R\ni : ℕ\n✝ : Nontrivial R\n⊢ leadingCoeff (X + ↑C r) ^ i = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝ : Semiring R\nr : R\ni : ℕ\n✝ : Nontrivial R\n⊢ leadingCoeff (X + ↑C r) ^ i ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝ : Ring R\nn : ℕ\nhn : 0 < n\nr : R\n⊢ leadingCoeff (X ^ n - ↑C r) = 1\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← map_neg C r, leadingCoeff_X_pow_add_C hn]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn m : ℕ\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\na : R\n⊢ degree (X - ↑C a) = 1\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← map_neg C a, degree_X_add_C]\n[GOAL]\nR : Type u\nS : Type v\na b c✝ d : R\nn m : ℕ\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : Ring S\nc : S\n⊢ nextCoeff (X - ↑C c) = -c\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← map_neg C c, nextCoeff_X_add_C]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\nn : ℕ\nhn : 0 < n\na : R\n⊢ degree (X ^ n - ↑C a) = ↑n\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← map_neg C a, degree_X_pow_add_C hn]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\nn : ℕ\nhn : 0 < n\na : R\n⊢ X ^ n - ↑C a ≠ 0\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← map_neg C a]\n[GOAL]\nR : Type u\nS : Type v\na✝ b c d : R\nn✝ m : ℕ\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\nn : ℕ\nhn : 0 < n\na : R\n⊢ X ^ n + ↑C (-a) ≠ 0\n[PROOFSTEP]\nexact X_pow_add_C_ne_zero hn _\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn✝ m : ℕ\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\nn : ℕ\nr : R\n⊢ natDegree (X ^ n - ↑C r) = n\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← map_neg C r, natDegree_X_pow_add_C]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝² : Ring R\ninst✝¹ : Nontrivial R\ninst✝ : Ring S\nr : S\n⊢ leadingCoeff (X - ↑C r) = 1\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← map_neg C r, leadingCoeff_X_add_C]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp0 : p = 0\n⊢ degree (p * q) = degree p + degree q\n[PROOFSTEP]\nsimp only [hp0, degree_zero, zero_mul, WithBot.bot_add]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp0 : ¬p = 0\nhq0 : q = 0\n⊢ degree (p * q) = degree p + degree q\n[PROOFSTEP]\nsimp only [hq0, degree_zero, mul_zero, WithBot.add_bot]\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\n⊢ leadingCoeff (p * q) = leadingCoeff p * leadingCoeff q\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nhp : p = 0\n⊢ leadingCoeff (p * q) = leadingCoeff p * leadingCoeff q\n[PROOFSTEP]\nsimp only [hp, zero_mul, leadingCoeff_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nhp : ¬p = 0\n⊢ leadingCoeff (p * q) = leadingCoeff p * leadingCoeff q\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nhp : ¬p = 0\nhq : q = 0\n⊢ leadingCoeff (p * q) = leadingCoeff p * leadingCoeff q\n[PROOFSTEP]\nsimp only [hq, mul_zero, leadingCoeff_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nhp : ¬p = 0\nhq : ¬q = 0\n⊢ leadingCoeff (p * q) = leadingCoeff p * leadingCoeff q\n[PROOFSTEP]\nrw [leadingCoeff_mul']\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nhp : ¬p = 0\nhq : ¬q = 0\n⊢ leadingCoeff p * leadingCoeff q ≠ 0\n[PROOFSTEP]\nexact mul_ne_zero (mt leadingCoeff_eq_zero.1 hp) (mt leadingCoeff_eq_zero.1 hq)\n[GOAL]\nR : Type u\nS : Type v\na b c d : R\nn m : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\n⊢ leadingCoeff 1 = 1\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.Degree.Definitions", "llama_tokens": 52594, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.665410572017153, "lm_q2_score": 0.588889130767832, "lm_q1q2_score": 0.39185305335890713}}
{"text": "[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\n⊢ IsOpen (imageOfDf f)\n[PROOFSTEP]\nrw [imageOfDf, setOf_exists fun i (x : PrimeSpectrum R) => coeff f i ∉ x.asIdeal]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\n⊢ IsOpen (⋃ (i : ℕ), {x | ¬coeff f i ∈ x.asIdeal})\n[PROOFSTEP]\nexact isOpen_iUnion fun i => isOpen_basicOpen\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\n⊢ imageOfDf f = ↑(PrimeSpectrum.comap C) '' (zeroLocus {f})ᶜ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nx : PrimeSpectrum R\n⊢ x ∈ imageOfDf f ↔ x ∈ ↑(PrimeSpectrum.comap C) '' (zeroLocus {f})ᶜ\n[PROOFSTEP]\nrefine' ⟨fun hx => ⟨⟨map C x.asIdeal, isPrime_map_C_of_isPrime x.IsPrime⟩, ⟨_, _⟩⟩, _⟩\n[GOAL]\ncase h.refine'_1\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nx : PrimeSpectrum R\nhx : x ∈ imageOfDf f\n⊢ { asIdeal := Ideal.map C x.asIdeal, IsPrime := (_ : Ideal.IsPrime (Ideal.map C x.asIdeal)) } ∈ (zeroLocus {f})ᶜ\n[PROOFSTEP]\nrw [mem_compl_iff, mem_zeroLocus, singleton_subset_iff]\n[GOAL]\ncase h.refine'_1\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nx : PrimeSpectrum R\nhx : x ∈ imageOfDf f\n⊢ ¬f ∈ ↑{ asIdeal := Ideal.map C x.asIdeal, IsPrime := (_ : Ideal.IsPrime (Ideal.map C x.asIdeal)) }.asIdeal\n[PROOFSTEP]\ncases' hx with i hi\n[GOAL]\ncase h.refine'_1.intro\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nx : PrimeSpectrum R\ni : ℕ\nhi : ¬coeff f i ∈ x.asIdeal\n⊢ ¬f ∈ ↑{ asIdeal := Ideal.map C x.asIdeal, IsPrime := (_ : Ideal.IsPrime (Ideal.map C x.asIdeal)) }.asIdeal\n[PROOFSTEP]\nexact fun a => hi (mem_map_C_iff.mp a i)\n[GOAL]\ncase h.refine'_2\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nx : PrimeSpectrum R\nhx : x ∈ imageOfDf f\n⊢ ↑(PrimeSpectrum.comap C)\n      { asIdeal := Ideal.map C x.asIdeal, IsPrime := (_ : Ideal.IsPrime (Ideal.map C x.asIdeal)) } =\n    x\n[PROOFSTEP]\next x\n[GOAL]\ncase h.refine'_2.asIdeal.h\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nx✝ : PrimeSpectrum R\nhx : x✝ ∈ imageOfDf f\nx : R\n⊢ x ∈\n      (↑(PrimeSpectrum.comap C)\n          { asIdeal := Ideal.map C x✝.asIdeal, IsPrime := (_ : Ideal.IsPrime (Ideal.map C x✝.asIdeal)) }).asIdeal ↔\n    x ∈ x✝.asIdeal\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => subset_span (mem_image_of_mem C.1 h)⟩\n[GOAL]\ncase h.refine'_2.asIdeal.h\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nx✝ : PrimeSpectrum R\nhx : x✝ ∈ imageOfDf f\nx : R\nh :\n  x ∈\n    (↑(PrimeSpectrum.comap C)\n        { asIdeal := Ideal.map C x✝.asIdeal, IsPrime := (_ : Ideal.IsPrime (Ideal.map C x✝.asIdeal)) }).asIdeal\n⊢ x ∈ x✝.asIdeal\n[PROOFSTEP]\nrw [← @coeff_C_zero R x _]\n[GOAL]\ncase h.refine'_2.asIdeal.h\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nx✝ : PrimeSpectrum R\nhx : x✝ ∈ imageOfDf f\nx : R\nh :\n  x ∈\n    (↑(PrimeSpectrum.comap C)\n        { asIdeal := Ideal.map C x✝.asIdeal, IsPrime := (_ : Ideal.IsPrime (Ideal.map C x✝.asIdeal)) }).asIdeal\n⊢ coeff (↑C x) 0 ∈ x✝.asIdeal\n[PROOFSTEP]\nexact mem_map_C_iff.mp h 0\n[GOAL]\ncase h.refine'_3\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nx : PrimeSpectrum R\n⊢ x ∈ ↑(PrimeSpectrum.comap C) '' (zeroLocus {f})ᶜ → x ∈ imageOfDf f\n[PROOFSTEP]\nrintro ⟨xli, complement, rfl⟩\n[GOAL]\ncase h.refine'_3.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nxli : PrimeSpectrum R[X]\ncomplement : xli ∈ (zeroLocus {f})ᶜ\n⊢ ↑(PrimeSpectrum.comap C) xli ∈ imageOfDf f\n[PROOFSTEP]\nexact comap_C_mem_imageOfDf complement\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\n⊢ IsOpenMap ↑(PrimeSpectrum.comap C)\n[PROOFSTEP]\nrintro U ⟨s, z⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nU : Set (PrimeSpectrum R[X])\ns : Set R[X]\nz : zeroLocus s = Uᶜ\n⊢ IsOpen (↑(PrimeSpectrum.comap C) '' U)\n[PROOFSTEP]\nrw [← compl_compl U, ← z, ← iUnion_of_singleton_coe s, zeroLocus_iUnion, compl_iInter, image_iUnion]\n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nU : Set (PrimeSpectrum R[X])\ns : Set R[X]\nz : zeroLocus s = Uᶜ\n⊢ IsOpen (⋃ (i : ↑s), ↑(PrimeSpectrum.comap C) '' (zeroLocus {↑i})ᶜ)\n[PROOFSTEP]\nsimp_rw [← imageOfDf_eq_comap_C_compl_zeroLocus]\n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nU : Set (PrimeSpectrum R[X])\ns : Set R[X]\nz : zeroLocus s = Uᶜ\n⊢ IsOpen (⋃ (i : ↑s), imageOfDf ↑i)\n[PROOFSTEP]\nexact isOpen_iUnion fun f => isOpen_imageOfDf\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.PrimeSpectrum.IsOpenComapC", "llama_tokens": 2207, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6150878696277513, "lm_q2_score": 0.6370308013713525, "lm_q1q2_score": 0.3918299185027644}}
{"text": "[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nα β : PartialFun\ne : α ≃ β\n⊢ ↑((fun x => ↑e.symm x) ∘ fun x => ↑e x) = 𝟙 α\n[PROOFSTEP]\nsimp only [Equiv.symm_comp_self, PFun.coe_id]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nα β : PartialFun\ne : α ≃ β\n⊢ PFun.id α = 𝟙 α\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nα β : PartialFun\ne : α ≃ β\n⊢ ↑((fun x => ↑e x) ∘ fun x => ↑e.symm x) = 𝟙 β\n[PROOFSTEP]\nsimp only [Equiv.self_comp_symm, PFun.coe_id]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nα β : PartialFun\ne : α ≃ β\n⊢ PFun.id β = 𝟙 β\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ Z✝ : Pointed\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun X => { x // x ≠ X.point },\n          map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n      (f ≫ g) =\n    { obj := fun X => { x // x ≠ X.point },\n            map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n        f ≫\n      { obj := fun X => { x // x ≠ X.point },\n            map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n        g\n[PROOFSTEP]\napply PFun.ext _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ Z✝ : Pointed\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ ∀\n    (a :\n      { obj := fun X => { x // x ≠ X.point },\n            map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.obj\n        X✝)\n    (b :\n      { obj := fun X => { x // x ≠ X.point },\n            map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.obj\n        Z✝),\n    b ∈\n        { obj := fun X => { x // x ≠ X.point },\n              map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n          (f ≫ g) a ↔\n      b ∈\n        ({ obj := fun X => { x // x ≠ X.point },\n                  map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n              f ≫\n            { obj := fun X => { x // x ≠ X.point },\n                  map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n              g)\n          a\n[PROOFSTEP]\nrintro ⟨a, ha⟩ ⟨c, hc⟩\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ Z✝ : Pointed\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\na : X✝.X\nha : a ≠ X✝.point\nc : Z✝.X\nhc : c ≠ Z✝.point\n⊢ { val := c, property := hc } ∈\n      { obj := fun X => { x // x ≠ X.point },\n            map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n        (f ≫ g) { val := a, property := ha } ↔\n    { val := c, property := hc } ∈\n      ({ obj := fun X => { x // x ≠ X.point },\n                map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n            f ≫\n          { obj := fun X => { x // x ≠ X.point },\n                map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n            g)\n        { val := a, property := ha }\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.mk.mp\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ Z✝ : Pointed\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\na : X✝.X\nha : a ≠ X✝.point\nc : Z✝.X\nhc : c ≠ Z✝.point\n⊢ { val := c, property := hc } ∈\n      { obj := fun X => { x // x ≠ X.point },\n            map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n        (f ≫ g) { val := a, property := ha } →\n    { val := c, property := hc } ∈\n      ({ obj := fun X => { x // x ≠ X.point },\n                map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n            f ≫\n          { obj := fun X => { x // x ≠ X.point },\n                map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n            g)\n        { val := a, property := ha }\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase mk.mk.mp.intro\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ Z✝ : Pointed\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\na : X✝.X\nha : a ≠ X✝.point\nc : Z✝.X\nhc : c ≠ Z✝.point\nh₁ :\n  ({ obj := fun X => { x // x ≠ X.point },\n          map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n      (f ≫ g) { val := a, property := ha }).Dom\nh₂ :\n  Part.get\n      ({ obj := fun X => { x // x ≠ X.point },\n            map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n        (f ≫ g) { val := a, property := ha })\n      h₁ =\n    { val := c, property := hc }\n⊢ { val := c, property := hc } ∈\n    ({ obj := fun X => { x // x ≠ X.point },\n              map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n          f ≫\n        { obj := fun X => { x // x ≠ X.point },\n              map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n          g)\n      { val := a, property := ha }\n[PROOFSTEP]\nexact ⟨⟨fun h₀ => h₁ ((congr_arg g.toFun h₀).trans g.map_point), h₁⟩, h₂⟩\n[GOAL]\ncase mk.mk.mpr\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ Z✝ : Pointed\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\na : X✝.X\nha : a ≠ X✝.point\nc : Z✝.X\nhc : c ≠ Z✝.point\n⊢ { val := c, property := hc } ∈\n      ({ obj := fun X => { x // x ≠ X.point },\n                map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n            f ≫\n          { obj := fun X => { x // x ≠ X.point },\n                map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n            g)\n        { val := a, property := ha } →\n    { val := c, property := hc } ∈\n      { obj := fun X => { x // x ≠ X.point },\n            map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n        (f ≫ g) { val := a, property := ha }\n[PROOFSTEP]\nrintro ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mpr.intro.refl\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ Z✝ : Pointed\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\na : X✝.X\nha : a ≠ X✝.point\nw✝ :\n  (({ obj := fun X => { x // x ≠ X.point },\n              map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n          f ≫\n        { obj := fun X => { x // x ≠ X.point },\n              map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n          g)\n      { val := a, property := ha }).Dom\nhc :\n  Pointed.Hom.toFun g\n      ↑(Part.get\n          ({ obj := fun X => { x // x ≠ X.point },\n                map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n            f { val := a, property := ha })\n          (_ :\n            ({ obj := fun X => { x // x ≠ X.point },\n                    map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n                f { val := a, property := ha }).Dom)) ≠\n    Z✝.point\n⊢ {\n      val :=\n        Pointed.Hom.toFun g\n          ↑(Part.get\n              ({ obj := fun X => { x // x ≠ X.point },\n                    map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n                f { val := a, property := ha })\n              (_ :\n                ({ obj := fun X => { x // x ≠ X.point },\n                        map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n                    f { val := a, property := ha }).Dom)),\n      property := hc } ∈\n    { obj := fun X => { x // x ≠ X.point },\n          map := fun {X Y} f => PFun.toSubtype (fun x => x ≠ Y.point) f.toFun ∘ Subtype.val }.map\n      (f ≫ g) { val := a, property := ha }\n[PROOFSTEP]\nexact ⟨_, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\n⊢ PartialFun ⥤ Pointed\n[PROOFSTEP]\nclassical exact\n  { obj := fun X => ⟨Option X, none⟩\n    map := fun f => ⟨Option.elim' none fun a => (f a).toOption, rfl⟩\n    map_id := fun X =>\n      Pointed.Hom.ext _ _ <|\n        funext fun o =>\n          Option.recOn o rfl fun a =>\n            (by\n              dsimp [CategoryStruct.id]\n              convert Part.some_toOption a)\n    map_comp := fun f g =>\n      Pointed.Hom.ext _ _ <|\n        funext fun o =>\n          Option.recOn o rfl fun a => by\n            dsimp [CategoryStruct.comp]\n            rw [Part.bind_toOption g (f a), Option.elim'_eq_elim] }\n[GOAL]\nα : Type u_1\nβ : Type u_2\n⊢ PartialFun ⥤ Pointed\n[PROOFSTEP]\nexact\n  { obj := fun X => ⟨Option X, none⟩\n    map := fun f => ⟨Option.elim' none fun a => (f a).toOption, rfl⟩\n    map_id := fun X =>\n      Pointed.Hom.ext _ _ <|\n        funext fun o =>\n          Option.recOn o rfl fun a =>\n            (by\n              dsimp [CategoryStruct.id]\n              convert Part.some_toOption a)\n    map_comp := fun f g =>\n      Pointed.Hom.ext _ _ <|\n        funext fun o =>\n          Option.recOn o rfl fun a => by\n            dsimp [CategoryStruct.comp]\n            rw [Part.bind_toOption g (f a), Option.elim'_eq_elim] }\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX : PartialFun\no :\n  ({ obj := fun X => { X := Option X, point := none },\n          map := fun {X Y} f =>\n            { toFun := Option.elim' none fun a => Part.toOption (f a),\n              map_point :=\n                (_ :\n                  Option.elim' none (fun a => Part.toOption (f a))\n                      ((fun X => { X := Option X, point := none }) X).point =\n                    Option.elim' none (fun a => Part.toOption (f a))\n                      ((fun X => { X := Option X, point := none }) X).point) } }.obj\n      X).X\na : X\n⊢ Pointed.Hom.toFun\n      ({ obj := fun X => { X := Option X, point := none },\n            map := fun {X Y} f =>\n              { toFun := Option.elim' none fun a => Part.toOption (f a),\n                map_point :=\n                  (_ :\n                    Option.elim' none (fun a => Part.toOption (f a))\n                        ((fun X => { X := Option X, point := none }) X).point =\n                      Option.elim' none (fun a => Part.toOption (f a))\n                        ((fun X => { X := Option X, point := none }) X).point) } }.map\n        (𝟙 X))\n      (some a) =\n    Pointed.Hom.toFun\n      (𝟙\n        ({ obj := fun X => { X := Option X, point := none },\n              map := fun {X Y} f =>\n                { toFun := Option.elim' none fun a => Part.toOption (f a),\n                  map_point :=\n                    (_ :\n                      Option.elim' none (fun a => Part.toOption (f a))\n                          ((fun X => { X := Option X, point := none }) X).point =\n                        Option.elim' none (fun a => Part.toOption (f a))\n                          ((fun X => { X := Option X, point := none }) X).point) } }.obj\n          X))\n      (some a)\n[PROOFSTEP]\ndsimp [CategoryStruct.id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX : PartialFun\no :\n  ({ obj := fun X => { X := Option X, point := none },\n          map := fun {X Y} f =>\n            { toFun := Option.elim' none fun a => Part.toOption (f a),\n              map_point :=\n                (_ :\n                  Option.elim' none (fun a => Part.toOption (f a))\n                      ((fun X => { X := Option X, point := none }) X).point =\n                    Option.elim' none (fun a => Part.toOption (f a))\n                      ((fun X => { X := Option X, point := none }) X).point) } }.obj\n      X).X\na : X\n⊢ Part.toOption (Part.some a) = some a\n[PROOFSTEP]\nconvert Part.some_toOption a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ Z✝ : PartialFun\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\no :\n  ({ obj := fun X => { X := Option X, point := none },\n          map := fun {X Y} f =>\n            { toFun := Option.elim' none fun a => Part.toOption (f a),\n              map_point :=\n                (_ :\n                  Option.elim' none (fun a => Part.toOption (f a))\n                      ((fun X => { X := Option X, point := none }) X).point =\n                    Option.elim' none (fun a => Part.toOption (f a))\n                      ((fun X => { X := Option X, point := none }) X).point) } }.obj\n      X✝).X\na : X✝\n⊢ Pointed.Hom.toFun\n      ({ obj := fun X => { X := Option X, point := none },\n            map := fun {X Y} f =>\n              { toFun := Option.elim' none fun a => Part.toOption (f a),\n                map_point :=\n                  (_ :\n                    Option.elim' none (fun a => Part.toOption (f a))\n                        ((fun X => { X := Option X, point := none }) X).point =\n                      Option.elim' none (fun a => Part.toOption (f a))\n                        ((fun X => { X := Option X, point := none }) X).point) } }.map\n        (f ≫ g))\n      (some a) =\n    Pointed.Hom.toFun\n      ({ obj := fun X => { X := Option X, point := none },\n              map := fun {X Y} f =>\n                { toFun := Option.elim' none fun a => Part.toOption (f a),\n                  map_point :=\n                    (_ :\n                      Option.elim' none (fun a => Part.toOption (f a))\n                          ((fun X => { X := Option X, point := none }) X).point =\n                        Option.elim' none (fun a => Part.toOption (f a))\n                          ((fun X => { X := Option X, point := none }) X).point) } }.map\n          f ≫\n        { obj := fun X => { X := Option X, point := none },\n              map := fun {X Y} f =>\n                { toFun := Option.elim' none fun a => Part.toOption (f a),\n                  map_point :=\n                    (_ :\n                      Option.elim' none (fun a => Part.toOption (f a))\n                          ((fun X => { X := Option X, point := none }) X).point =\n                        Option.elim' none (fun a => Part.toOption (f a))\n                          ((fun X => { X := Option X, point := none }) X).point) } }.map\n          g)\n      (some a)\n[PROOFSTEP]\ndsimp [CategoryStruct.comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ Z✝ : PartialFun\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\no :\n  ({ obj := fun X => { X := Option X, point := none },\n          map := fun {X Y} f =>\n            { toFun := Option.elim' none fun a => Part.toOption (f a),\n              map_point :=\n                (_ :\n                  Option.elim' none (fun a => Part.toOption (f a))\n                      ((fun X => { X := Option X, point := none }) X).point =\n                    Option.elim' none (fun a => Part.toOption (f a))\n                      ((fun X => { X := Option X, point := none }) X).point) } }.obj\n      X✝).X\na : X✝\n⊢ Part.toOption (Part.bind (f a) g) = Option.elim' none (fun a => Part.toOption (g a)) (Part.toOption (f a))\n[PROOFSTEP]\nrw [Part.bind_toOption g (f a), Option.elim'_eq_elim]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX : PartialFun\na : (partialFunToPointed ⋙ pointedToPartialFun).obj X\n⊢ (fun a => { val := some a, property := (_ : some a ≠ none) }) ((fun a => Option.get ↑a (_ : isSome ↑a = true)) a) = a\n[PROOFSTEP]\nsimp only [some_get, Subtype.coe_eta]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : (partialFunToPointed ⋙ pointedToPartialFun).obj Y✝\n⊢ b ∈\n      ((𝟭 PartialFun).map f ≫\n          ((fun X =>\n                PartialFun.Iso.mk\n                  { toFun := fun a => { val := some a, property := (_ : some a ≠ none) },\n                    invFun := fun a => Option.get ↑a (_ : isSome ↑a = true),\n                    left_inv :=\n                      (_ :\n                        ∀ (a : (𝟭 PartialFun).obj X),\n                          Option.get (some a)\n                              (_ : isSome ↑((fun a => { val := some a, property := (_ : some a ≠ none) }) a) = true) =\n                            a),\n                    right_inv :=\n                      (_ :\n                        ∀ (a : (partialFunToPointed ⋙ pointedToPartialFun).obj X),\n                          { val := some ((fun a => Option.get ↑a (_ : isSome ↑a = true)) a),\n                              property := (_ : some ((fun a => Option.get ↑a (_ : isSome ↑a = true)) a) ≠ none) } =\n                            a) })\n              Y✝).hom)\n        a ↔\n    b ∈\n      (((fun X =>\n                PartialFun.Iso.mk\n                  { toFun := fun a => { val := some a, property := (_ : some a ≠ none) },\n                    invFun := fun a => Option.get ↑a (_ : isSome ↑a = true),\n                    left_inv :=\n                      (_ :\n                        ∀ (a : (𝟭 PartialFun).obj X),\n                          Option.get (some a)\n                              (_ : isSome ↑((fun a => { val := some a, property := (_ : some a ≠ none) }) a) = true) =\n                            a),\n                    right_inv :=\n                      (_ :\n                        ∀ (a : (partialFunToPointed ⋙ pointedToPartialFun).obj X),\n                          { val := some ((fun a => Option.get ↑a (_ : isSome ↑a = true)) a),\n                              property := (_ : some ((fun a => Option.get ↑a (_ : isSome ↑a = true)) a) ≠ none) } =\n                            a) })\n              X✝).hom ≫\n          (partialFunToPointed ⋙ pointedToPartialFun).map f)\n        a\n[PROOFSTEP]\ndsimp [PartialFun.Iso.mk, CategoryStruct.comp, pointedToPartialFun]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : (partialFunToPointed ⋙ pointedToPartialFun).obj Y✝\n⊢ (b ∈ Part.bind (f a) fun x => Part.some { val := some x, property := (_ : some x ≠ none) }) ↔\n    b ∈\n      Part.bind (Part.some { val := some a, property := (_ : some a ≠ none) })\n        (PFun.toSubtype (fun x => ¬x = (partialFunToPointed.obj Y✝).point)\n            (Option.elim' none fun a => Part.toOption (f a)) ∘\n          Subtype.val)\n[PROOFSTEP]\nrw [Part.bind_some]\n  -- porting note: the proof below has changed a lot because\n            -- `Part.mem_bind_iff` means that `b ∈ Part.bind f g` is equivalent\n            -- to `∃ (a : α), a ∈ f ∧ b ∈ g a`, while in mathlib3 it was equivalent\n            -- to `∃ (a : α) (H : a ∈ f), b ∈ g a`\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : (partialFunToPointed ⋙ pointedToPartialFun).obj Y✝\n⊢ (b ∈ Part.bind (f a) fun x => Part.some { val := some x, property := (_ : some x ≠ none) }) ↔\n    b ∈\n      (PFun.toSubtype (fun x => ¬x = (partialFunToPointed.obj Y✝).point)\n            (Option.elim' none fun a => Part.toOption (f a)) ∘\n          Subtype.val)\n        { val := some a, property := (_ : some a ≠ none) }\n[PROOFSTEP]\nrefine' (Part.mem_bind_iff.trans _).trans PFun.mem_toSubtype_iff.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : (partialFunToPointed ⋙ pointedToPartialFun).obj Y✝\n⊢ (∃ a_1, a_1 ∈ f a ∧ b ∈ Part.some { val := some a_1, property := (_ : some a_1 ≠ none) }) ↔\n    ↑b = Option.elim' none (fun a => Part.toOption (f a)) ↑{ val := some a, property := (_ : some a ≠ none) }\n[PROOFSTEP]\nobtain ⟨b | b, hb⟩ := b\n[GOAL]\ncase mk.none\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nhb : none ≠ (partialFunToPointed.obj Y✝).point\n⊢ (∃ a_1,\n      a_1 ∈ f a ∧ { val := none, property := hb } ∈ Part.some { val := some a_1, property := (_ : some a_1 ≠ none) }) ↔\n    ↑{ val := none, property := hb } =\n      Option.elim' none (fun a => Part.toOption (f a)) ↑{ val := some a, property := (_ : some a ≠ none) }\n[PROOFSTEP]\nexact (hb rfl).elim\n[GOAL]\ncase mk.some\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : Y✝\nhb : some b ≠ (partialFunToPointed.obj Y✝).point\n⊢ (∃ a_1,\n      a_1 ∈ f a ∧\n        { val := some b, property := hb } ∈ Part.some { val := some a_1, property := (_ : some a_1 ≠ none) }) ↔\n    ↑{ val := some b, property := hb } =\n      Option.elim' none (fun a => Part.toOption (f a)) ↑{ val := some a, property := (_ : some a ≠ none) }\n[PROOFSTEP]\ndsimp [Part.toOption]\n[GOAL]\ncase mk.some\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : Y✝\nhb : some b ≠ (partialFunToPointed.obj Y✝).point\n⊢ (∃ a_1,\n      a_1 ∈ f a ∧\n        { val := some b, property := hb } ∈ Part.some { val := some a_1, property := (_ : some a_1 ≠ none) }) ↔\n    some b = if h : (f a).Dom then some (Part.get (f a) h) else none\n[PROOFSTEP]\nsimp_rw [Part.mem_some_iff, Subtype.mk_eq_mk]\n[GOAL]\ncase mk.some\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : Y✝\nhb : some b ≠ (partialFunToPointed.obj Y✝).point\n⊢ (∃ a_1, a_1 ∈ f a ∧ some b = some a_1) ↔ some b = if h : (f a).Dom then some (Part.get (f a) h) else none\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.some.mp\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : Y✝\nhb : some b ≠ (partialFunToPointed.obj Y✝).point\n⊢ (∃ a_1, a_1 ∈ f a ∧ some b = some a_1) → some b = if h : (f a).Dom then some (Part.get (f a) h) else none\n[PROOFSTEP]\nrintro ⟨_, ⟨h₁, h₂⟩, h₃⟩\n[GOAL]\ncase mk.some.mp.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : Y✝\nhb : some b ≠ (partialFunToPointed.obj Y✝).point\nw✝ : Y✝\nh₃ : some b = some w✝\nh₁ : (f a).Dom\nh₂ : Part.get (f a) h₁ = w✝\n⊢ some b = if h : (f a).Dom then some (Part.get (f a) h) else none\n[PROOFSTEP]\nrw [h₃, ← h₂, dif_pos h₁]\n[GOAL]\ncase mk.some.mpr\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : Y✝\nhb : some b ≠ (partialFunToPointed.obj Y✝).point\n⊢ (some b = if h : (f a).Dom then some (Part.get (f a) h) else none) → ∃ a_2, a_2 ∈ f a ∧ some b = some a_2\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mk.some.mpr\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : Y✝\nhb : some b ≠ (partialFunToPointed.obj Y✝).point\nh : some b = if h : (f a).Dom then some (Part.get (f a) h) else none\n⊢ ∃ a_1, a_1 ∈ f a ∧ some b = some a_1\n[PROOFSTEP]\nsplit_ifs at h  with ha\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : Y✝\nhb : some b ≠ (partialFunToPointed.obj Y✝).point\nha : (f a).Dom\nh : some b = some (Part.get (f a) ha)\n⊢ ∃ a_1, a_1 ∈ f a ∧ some b = some a_1\n[PROOFSTEP]\nrw [some_inj] at h \n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : PartialFun\nf : X✝ ⟶ Y✝\na : (𝟭 PartialFun).obj X✝\nb : Y✝\nhb : some b ≠ (partialFunToPointed.obj Y✝).point\nha : (f a).Dom\nh : b = Part.get (f a) ha\n⊢ ∃ a_1, a_1 ∈ f a ∧ some b = some a_1\n[PROOFSTEP]\nrefine' ⟨b, ⟨ha, h.symm⟩, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX : Pointed\na : ((𝟭 Pointed).obj X).X\n⊢ ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X\n[PROOFSTEP]\nclassical exact if h : a = X.point then none else some ⟨_, h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX : Pointed\na : ((𝟭 Pointed).obj X).X\n⊢ ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X\n[PROOFSTEP]\nexact if h : a = X.point then none else some ⟨_, h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX : Pointed\na✝ : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X\na : pointedToPartialFun.obj X\n⊢ (fun a => if h : a = X.point then none else some { val := a, property := h })\n      (Option.elim' X.point Subtype.val (some a)) =\n    some a\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX : Pointed\na✝ : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X\na : pointedToPartialFun.obj X\n⊢ (if h : ↑a = X.point then none else some { val := ↑a, property := h }) = some a\n[PROOFSTEP]\nrw [dif_neg a.2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX : Pointed\na✝ : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X\na : pointedToPartialFun.obj X\n⊢ some { val := ↑a, property := (_ : ↑a ≠ X.point) } = some a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX : Pointed\na : ((𝟭 Pointed).obj X).X\n⊢ Option.elim' X.point Subtype.val ((fun a => if h : a = X.point then none else some { val := a, property := h }) a) = a\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX : Pointed\na : ((𝟭 Pointed).obj X).X\n⊢ Option.elim' X.point Subtype.val (if h : a = X.point then none else some { val := a, property := h }) = a\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nX : Pointed\na : ((𝟭 Pointed).obj X).X\nh : a = X.point\n⊢ Option.elim' X.point Subtype.val none = a\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nX : Pointed\na : ((𝟭 Pointed).obj X).X\nh : a = X.point\n⊢ Option.elim' X.point Subtype.val none = X.point\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nX : Pointed\na : ((𝟭 Pointed).obj X).X\nh : ¬a = X.point\n⊢ Option.elim' X.point Subtype.val (some { val := a, property := h }) = a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX Y : Pointed\nf : X ⟶ Y\na : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X\n⊢ ∀ (val : pointedToPartialFun.obj X),\n    Pointed.Hom.toFun\n        ((pointedToPartialFun ⋙ partialFunToPointed).map f ≫\n          ((fun X =>\n                Pointed.Iso.mk\n                  { toFun := Option.elim' X.point Subtype.val,\n                    invFun := fun a => if h : a = X.point then none else some { val := a, property := h },\n                    left_inv :=\n                      (_ :\n                        ∀ (a : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X),\n                          (fun a => if h : a = X.point then none else some { val := a, property := h })\n                              (Option.elim' X.point Subtype.val a) =\n                            a),\n                    right_inv :=\n                      (_ :\n                        ∀ (a : ((𝟭 Pointed).obj X).X),\n                          Option.elim' X.point Subtype.val\n                              ((fun a => if h : a = X.point then none else some { val := a, property := h }) a) =\n                            a) }\n                  (_ :\n                    ↑{ toFun := Option.elim' X.point Subtype.val,\n                            invFun := fun a => if h : a = X.point then none else some { val := a, property := h },\n                            left_inv :=\n                              (_ :\n                                ∀ (a : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X),\n                                  (fun a => if h : a = X.point then none else some { val := a, property := h })\n                                      (Option.elim' X.point Subtype.val a) =\n                                    a),\n                            right_inv :=\n                              (_ :\n                                ∀ (a : ((𝟭 Pointed).obj X).X),\n                                  Option.elim' X.point Subtype.val\n                                      ((fun a => if h : a = X.point then none else some { val := a, property := h })\n                                        a) =\n                                    a) }\n                        ((pointedToPartialFun ⋙ partialFunToPointed).obj X).point =\n                      ↑{ toFun := Option.elim' X.point Subtype.val,\n                            invFun := fun a => if h : a = X.point then none else some { val := a, property := h },\n                            left_inv :=\n                              (_ :\n                                ∀ (a : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X),\n                                  (fun a => if h : a = X.point then none else some { val := a, property := h })\n                                      (Option.elim' X.point Subtype.val a) =\n                                    a),\n                            right_inv :=\n                              (_ :\n                                ∀ (a : ((𝟭 Pointed).obj X).X),\n                                  Option.elim' X.point Subtype.val\n                                      ((fun a => if h : a = X.point then none else some { val := a, property := h })\n                                        a) =\n                                    a) }\n                        ((pointedToPartialFun ⋙ partialFunToPointed).obj X).point))\n              Y).hom)\n        (some val) =\n      Pointed.Hom.toFun\n        (((fun X =>\n                Pointed.Iso.mk\n                  { toFun := Option.elim' X.point Subtype.val,\n                    invFun := fun a => if h : a = X.point then none else some { val := a, property := h },\n                    left_inv :=\n                      (_ :\n                        ∀ (a : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X),\n                          (fun a => if h : a = X.point then none else some { val := a, property := h })\n                              (Option.elim' X.point Subtype.val a) =\n                            a),\n                    right_inv :=\n                      (_ :\n                        ∀ (a : ((𝟭 Pointed).obj X).X),\n                          Option.elim' X.point Subtype.val\n                              ((fun a => if h : a = X.point then none else some { val := a, property := h }) a) =\n                            a) }\n                  (_ :\n                    ↑{ toFun := Option.elim' X.point Subtype.val,\n                            invFun := fun a => if h : a = X.point then none else some { val := a, property := h },\n                            left_inv :=\n                              (_ :\n                                ∀ (a : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X),\n                                  (fun a => if h : a = X.point then none else some { val := a, property := h })\n                                      (Option.elim' X.point Subtype.val a) =\n                                    a),\n                            right_inv :=\n                              (_ :\n                                ∀ (a : ((𝟭 Pointed).obj X).X),\n                                  Option.elim' X.point Subtype.val\n                                      ((fun a => if h : a = X.point then none else some { val := a, property := h })\n                                        a) =\n                                    a) }\n                        ((pointedToPartialFun ⋙ partialFunToPointed).obj X).point =\n                      ↑{ toFun := Option.elim' X.point Subtype.val,\n                            invFun := fun a => if h : a = X.point then none else some { val := a, property := h },\n                            left_inv :=\n                              (_ :\n                                ∀ (a : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X),\n                                  (fun a => if h : a = X.point then none else some { val := a, property := h })\n                                      (Option.elim' X.point Subtype.val a) =\n                                    a),\n                            right_inv :=\n                              (_ :\n                                ∀ (a : ((𝟭 Pointed).obj X).X),\n                                  Option.elim' X.point Subtype.val\n                                      ((fun a => if h : a = X.point then none else some { val := a, property := h })\n                                        a) =\n                                    a) }\n                        ((pointedToPartialFun ⋙ partialFunToPointed).obj X).point))\n              X).hom ≫\n          (𝟭 Pointed).map f)\n        (some val)\n[PROOFSTEP]\nrintro ⟨a, ha⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nX Y : Pointed\nf : X ⟶ Y\na✝ : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X\na : X.X\nha : a ≠ X.point\n⊢ Pointed.Hom.toFun\n      ((pointedToPartialFun ⋙ partialFunToPointed).map f ≫\n        ((fun X =>\n              Pointed.Iso.mk\n                { toFun := Option.elim' X.point Subtype.val,\n                  invFun := fun a => if h : a = X.point then none else some { val := a, property := h },\n                  left_inv :=\n                    (_ :\n                      ∀ (a : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X),\n                        (fun a => if h : a = X.point then none else some { val := a, property := h })\n                            (Option.elim' X.point Subtype.val a) =\n                          a),\n                  right_inv :=\n                    (_ :\n                      ∀ (a : ((𝟭 Pointed).obj X).X),\n                        Option.elim' X.point Subtype.val\n                            ((fun a => if h : a = X.point then none else some { val := a, property := h }) a) =\n                          a) }\n                (_ :\n                  ↑{ toFun := Option.elim' X.point Subtype.val,\n                          invFun := fun a => if h : a = X.point then none else some { val := a, property := h },\n                          left_inv :=\n                            (_ :\n                              ∀ (a : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X),\n                                (fun a => if h : a = X.point then none else some { val := a, property := h })\n                                    (Option.elim' X.point Subtype.val a) =\n                                  a),\n                          right_inv :=\n                            (_ :\n                              ∀ (a : ((𝟭 Pointed).obj X).X),\n                                Option.elim' X.point Subtype.val\n                                    ((fun a => if h : a = X.point then none else some { val := a, property := h }) a) =\n                                  a) }\n                      ((pointedToPartialFun ⋙ partialFunToPointed).obj X).point =\n                    ↑{ toFun := Option.elim' X.point Subtype.val,\n                          invFun := fun a => if h : a = X.point then none else some { val := a, property := h },\n                          left_inv :=\n                            (_ :\n                              ∀ (a : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X),\n                                (fun a => if h : a = X.point then none else some { val := a, property := h })\n                                    (Option.elim' X.point Subtype.val a) =\n                                  a),\n                          right_inv :=\n                            (_ :\n                              ∀ (a : ((𝟭 Pointed).obj X).X),\n                                Option.elim' X.point Subtype.val\n                                    ((fun a => if h : a = X.point then none else some { val := a, property := h }) a) =\n                                  a) }\n                      ((pointedToPartialFun ⋙ partialFunToPointed).obj X).point))\n            Y).hom)\n      (some { val := a, property := ha }) =\n    Pointed.Hom.toFun\n      (((fun X =>\n              Pointed.Iso.mk\n                { toFun := Option.elim' X.point Subtype.val,\n                  invFun := fun a => if h : a = X.point then none else some { val := a, property := h },\n                  left_inv :=\n                    (_ :\n                      ∀ (a : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X),\n                        (fun a => if h : a = X.point then none else some { val := a, property := h })\n                            (Option.elim' X.point Subtype.val a) =\n                          a),\n                  right_inv :=\n                    (_ :\n                      ∀ (a : ((𝟭 Pointed).obj X).X),\n                        Option.elim' X.point Subtype.val\n                            ((fun a => if h : a = X.point then none else some { val := a, property := h }) a) =\n                          a) }\n                (_ :\n                  ↑{ toFun := Option.elim' X.point Subtype.val,\n                          invFun := fun a => if h : a = X.point then none else some { val := a, property := h },\n                          left_inv :=\n                            (_ :\n                              ∀ (a : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X),\n                                (fun a => if h : a = X.point then none else some { val := a, property := h })\n                                    (Option.elim' X.point Subtype.val a) =\n                                  a),\n                          right_inv :=\n                            (_ :\n                              ∀ (a : ((𝟭 Pointed).obj X).X),\n                                Option.elim' X.point Subtype.val\n                                    ((fun a => if h : a = X.point then none else some { val := a, property := h }) a) =\n                                  a) }\n                      ((pointedToPartialFun ⋙ partialFunToPointed).obj X).point =\n                    ↑{ toFun := Option.elim' X.point Subtype.val,\n                          invFun := fun a => if h : a = X.point then none else some { val := a, property := h },\n                          left_inv :=\n                            (_ :\n                              ∀ (a : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X),\n                                (fun a => if h : a = X.point then none else some { val := a, property := h })\n                                    (Option.elim' X.point Subtype.val a) =\n                                  a),\n                          right_inv :=\n                            (_ :\n                              ∀ (a : ((𝟭 Pointed).obj X).X),\n                                Option.elim' X.point Subtype.val\n                                    ((fun a => if h : a = X.point then none else some { val := a, property := h }) a) =\n                                  a) }\n                      ((pointedToPartialFun ⋙ partialFunToPointed).obj X).point))\n            X).hom ≫\n        (𝟭 Pointed).map f)\n      (some { val := a, property := ha })\n[PROOFSTEP]\nchange Option.elim' _ _ _ = f.toFun a\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nX Y : Pointed\nf : X ⟶ Y\na✝ : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X\na : X.X\nha : a ≠ X.point\n⊢ Option.elim' Y.point (fun a => ↑a)\n      (Pointed.Hom.toFun ((pointedToPartialFun ⋙ partialFunToPointed).map f) (some { val := a, property := ha })) =\n    Pointed.Hom.toFun f a\n[PROOFSTEP]\ndsimp\n  -- porting note: `rw [Part.elim_toOption]` does not work because there are\n              -- conflicting `Decidable` instances\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nX Y : Pointed\nf : X ⟶ Y\na✝ : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X\na : X.X\nha : a ≠ X.point\n⊢ Option.elim' Y.point (fun a => ↑a)\n      (Part.toOption { Dom := ¬Pointed.Hom.toFun f a = Y.point, get := Subtype.mk (Pointed.Hom.toFun f a) }) =\n    Pointed.Hom.toFun f a\n[PROOFSTEP]\nrw [Option.elim'_eq_elim, @Part.elim_toOption _ _ _ (Classical.propDecidable _)]\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nX Y : Pointed\nf : X ⟶ Y\na✝ : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X\na : X.X\nha : a ≠ X.point\n⊢ (if h : { Dom := ¬Pointed.Hom.toFun f a = Y.point, get := Subtype.mk (Pointed.Hom.toFun f a) }.Dom then\n      ↑(Part.get { Dom := ¬Pointed.Hom.toFun f a = Y.point, get := Subtype.mk (Pointed.Hom.toFun f a) } h)\n    else Y.point) =\n    Pointed.Hom.toFun f a\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nX Y : Pointed\nf : X ⟶ Y\na✝ : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X\na : X.X\nha : a ≠ X.point\nh : { Dom := ¬Pointed.Hom.toFun f a = Y.point, get := Subtype.mk (Pointed.Hom.toFun f a) }.Dom\n⊢ ↑(Part.get { Dom := ¬Pointed.Hom.toFun f a = Y.point, get := Subtype.mk (Pointed.Hom.toFun f a) } h) =\n    Pointed.Hom.toFun f a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nX Y : Pointed\nf : X ⟶ Y\na✝ : ((pointedToPartialFun ⋙ partialFunToPointed).obj X).X\na : X.X\nha : a ≠ X.point\nh : ¬{ Dom := ¬Pointed.Hom.toFun f a = Y.point, get := Subtype.mk (Pointed.Hom.toFun f a) }.Dom\n⊢ Y.point = Pointed.Hom.toFun f a\n[PROOFSTEP]\nexact Eq.symm (of_not_not h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : Type ?u.22242\nf : X✝ ⟶ Y✝\na✝ : ((typeToPartialFun ⋙ partialFunToPointed).obj X✝).X\na : typeToPartialFun.obj X✝\n⊢ Pointed.Hom.toFun\n      ((typeToPartialFun ⋙ partialFunToPointed).map f ≫\n        ((fun X =>\n              Iso.mk\n                { toFun := id,\n                  map_point :=\n                    (_ :\n                      id ((typeToPartialFun ⋙ partialFunToPointed).obj X).point =\n                        id ((typeToPartialFun ⋙ partialFunToPointed).obj X).point) }\n                { toFun := id, map_point := (_ : id (typeToPointed.obj X).point = id (typeToPointed.obj X).point) })\n            Y✝).hom)\n      (some a) =\n    Pointed.Hom.toFun\n      (((fun X =>\n              Iso.mk\n                { toFun := id,\n                  map_point :=\n                    (_ :\n                      id ((typeToPartialFun ⋙ partialFunToPointed).obj X).point =\n                        id ((typeToPartialFun ⋙ partialFunToPointed).obj X).point) }\n                { toFun := id, map_point := (_ : id (typeToPointed.obj X).point = id (typeToPointed.obj X).point) })\n            X✝).hom ≫\n        typeToPointed.map f)\n      (some a)\n[PROOFSTEP]\nclassical convert Part.some_toOption _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX✝ Y✝ : Type ?u.22242\nf : X✝ ⟶ Y✝\na✝ : ((typeToPartialFun ⋙ partialFunToPointed).obj X✝).X\na : typeToPartialFun.obj X✝\n⊢ Pointed.Hom.toFun\n      ((typeToPartialFun ⋙ partialFunToPointed).map f ≫\n        ((fun X =>\n              Iso.mk\n                { toFun := id,\n                  map_point :=\n                    (_ :\n                      id ((typeToPartialFun ⋙ partialFunToPointed).obj X).point =\n                        id ((typeToPartialFun ⋙ partialFunToPointed).obj X).point) }\n                { toFun := id, map_point := (_ : id (typeToPointed.obj X).point = id (typeToPointed.obj X).point) })\n            Y✝).hom)\n      (some a) =\n    Pointed.Hom.toFun\n      (((fun X =>\n              Iso.mk\n                { toFun := id,\n                  map_point :=\n                    (_ :\n                      id ((typeToPartialFun ⋙ partialFunToPointed).obj X).point =\n                        id ((typeToPartialFun ⋙ partialFunToPointed).obj X).point) }\n                { toFun := id, map_point := (_ : id (typeToPointed.obj X).point = id (typeToPointed.obj X).point) })\n            X✝).hom ≫\n        typeToPointed.map f)\n      (some a)\n[PROOFSTEP]\nconvert Part.some_toOption _\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Category.PartialFun", "llama_tokens": 15243, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7217431943271999, "lm_q2_score": 0.5428632831725051, "lm_q1q2_score": 0.3918078800798751}}
{"text": "[GOAL]\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : IsConnected J\nB : C\nF : J ⥤ Over B\nc : Cone (F ⋙ forget B)\n⊢ ∀ ⦃X Y : J⦄ (f : X ⟶ Y),\n    ((Functor.const J).obj (mk (NatTrans.app c.π (Classical.arbitrary J) ≫ (F.obj (Classical.arbitrary J)).hom))).map\n          f ≫\n        (fun j => homMk (NatTrans.app c.π j)) Y =\n      (fun j => homMk (NatTrans.app c.π j)) X ≫ F.map f\n[PROOFSTEP]\nintro X Y f\n[GOAL]\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ : C\ninst✝ : IsConnected J\nB : C\nF : J ⥤ Over B\nc : Cone (F ⋙ forget B)\nX Y : J\nf : X ⟶ Y\n⊢ ((Functor.const J).obj (mk (NatTrans.app c.π (Classical.arbitrary J) ≫ (F.obj (Classical.arbitrary J)).hom))).map f ≫\n      (fun j => homMk (NatTrans.app c.π j)) Y =\n    (fun j => homMk (NatTrans.app c.π j)) X ≫ F.map f\n[PROOFSTEP]\napply CommaMorphism.ext\n[GOAL]\ncase left\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ : C\ninst✝ : IsConnected J\nB : C\nF : J ⥤ Over B\nc : Cone (F ⋙ forget B)\nX Y : J\nf : X ⟶ Y\n⊢ (((Functor.const J).obj (mk (NatTrans.app c.π (Classical.arbitrary J) ≫ (F.obj (Classical.arbitrary J)).hom))).map f ≫\n        (fun j => homMk (NatTrans.app c.π j)) Y).left =\n    ((fun j => homMk (NatTrans.app c.π j)) X ≫ F.map f).left\n[PROOFSTEP]\nsimpa using (c.w f).symm\n[GOAL]\ncase right\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ : C\ninst✝ : IsConnected J\nB : C\nF : J ⥤ Over B\nc : Cone (F ⋙ forget B)\nX Y : J\nf : X ⟶ Y\n⊢ (((Functor.const J).obj (mk (NatTrans.app c.π (Classical.arbitrary J) ≫ (F.obj (Classical.arbitrary J)).hom))).map f ≫\n        (fun j => homMk (NatTrans.app c.π j)) Y).right =\n    ((fun j => homMk (NatTrans.app c.π j)) X ≫ F.map f).right\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : IsConnected J\nB : C\nF : J ⥤ Over B\nc : Cone (F ⋙ forget B)\n⊢ (forget B).mapCone (raiseCone c) = c\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : IsConnected J\nB : C\nF : J ⥤ Over B\nc : Cone (F ⋙ forget B)\nt : IsLimit c\ns : Cone F\nm : s.pt ⟶ (raiseCone c).pt\nK : ∀ (j : J), m ≫ NatTrans.app (raiseCone c).π j = NatTrans.app s.π j\n⊢ m = (fun s => homMk (IsLimit.lift t ((forget B).mapCone s))) s\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : IsConnected J\nB : C\nF : J ⥤ Over B\nc : Cone (F ⋙ forget B)\nt : IsLimit c\ns : Cone F\nm : s.pt ⟶ (raiseCone c).pt\nK : ∀ (j : J), m ≫ NatTrans.app (raiseCone c).π j = NatTrans.app s.π j\n⊢ m.left = ((fun s => homMk (IsLimit.lift t ((forget B).mapCone s))) s).left\n[PROOFSTEP]\napply t.hom_ext\n[GOAL]\ncase h\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : IsConnected J\nB : C\nF : J ⥤ Over B\nc : Cone (F ⋙ forget B)\nt : IsLimit c\ns : Cone F\nm : s.pt ⟶ (raiseCone c).pt\nK : ∀ (j : J), m ≫ NatTrans.app (raiseCone c).π j = NatTrans.app s.π j\n⊢ ∀ (j : J),\n    m.left ≫ NatTrans.app c.π j = ((fun s => homMk (IsLimit.lift t ((forget B).mapCone s))) s).left ≫ NatTrans.app c.π j\n[PROOFSTEP]\nintro j\n[GOAL]\ncase h\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : IsConnected J\nB : C\nF : J ⥤ Over B\nc : Cone (F ⋙ forget B)\nt : IsLimit c\ns : Cone F\nm : s.pt ⟶ (raiseCone c).pt\nK : ∀ (j : J), m ≫ NatTrans.app (raiseCone c).π j = NatTrans.app s.π j\nj : J\n⊢ m.left ≫ NatTrans.app c.π j = ((fun s => homMk (IsLimit.lift t ((forget B).mapCone s))) s).left ≫ NatTrans.app c.π j\n[PROOFSTEP]\nsimp [← K j]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Constructions.Over.Connected", "llama_tokens": 1777, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7772998611746912, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.39168619639732455}}
{"text": "[GOAL]\nC : Cat\n⊢ { obj := fun C => Quotient (isIsomorphicSetoid ↑C),\n          map := fun {C D} F => Quot.map F.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (F.obj X) (F.obj Y)) }.map\n      (𝟙 C) =\n    𝟙\n      ({ obj := fun C => Quotient (isIsomorphicSetoid ↑C),\n            map := fun {C D} F => Quot.map F.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (F.obj X) (F.obj Y)) }.obj\n        C)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Cat\n⊢ Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y)) =\n    𝟙 (Quotient (isIsomorphicSetoid ↑C))\n[PROOFSTEP]\napply funext\n[GOAL]\ncase h\nC : Cat\n⊢ ∀ (x : Quot Setoid.r),\n    Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y)) x =\n      𝟙 (Quotient (isIsomorphicSetoid ↑C)) x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nC : Cat\nx : Quot Setoid.r\n⊢ Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y)) x =\n    𝟙 (Quotient (isIsomorphicSetoid ↑C)) x\n[PROOFSTEP]\napply x.recOn\n[GOAL]\ncase h.h\nC : Cat\nx : Quot Setoid.r\n⊢ ∀ (a b : ↑C) (p : Setoid.r a b),\n    (_ :\n        Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y))\n            (Quot.mk Setoid.r b) =\n          𝟙 (Quotient (isIsomorphicSetoid ↑C)) (Quot.mk Setoid.r b)) =\n      (_ : ?m.1036 (Quot.mk Setoid.r b))\n[PROOFSTEP]\nintro _ _ p\n[GOAL]\ncase h.h\nC : Cat\nx : Quot Setoid.r\na✝ b✝ : ↑C\np : Setoid.r a✝ b✝\n⊢ (_ :\n      Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y)) (Quot.mk Setoid.r b✝) =\n        𝟙 (Quotient (isIsomorphicSetoid ↑C)) (Quot.mk Setoid.r b✝)) =\n    (_ : ?m.1036 (Quot.mk Setoid.r b✝))\n[PROOFSTEP]\nsimp only [types_id_apply]\n[GOAL]\ncase h.f\nC : Cat\nx : Quot Setoid.r\n⊢ ∀ (a : ↑C),\n    Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y)) (Quot.mk Setoid.r a) =\n      𝟙 (Quotient (isIsomorphicSetoid ↑C)) (Quot.mk Setoid.r a)\n[PROOFSTEP]\nintro _\n[GOAL]\ncase h.f\nC : Cat\nx : Quot Setoid.r\na✝ : ↑C\n⊢ Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y)) (Quot.mk Setoid.r a✝) =\n    𝟙 (Quotient (isIsomorphicSetoid ↑C)) (Quot.mk Setoid.r a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nC D E : Cat\nf : C ⟶ D\ng : D ⟶ E\n⊢ { obj := fun C => Quotient (isIsomorphicSetoid ↑C),\n          map := fun {C D} F => Quot.map F.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (F.obj X) (F.obj Y)) }.map\n      (f ≫ g) =\n    { obj := fun C => Quotient (isIsomorphicSetoid ↑C),\n            map := fun {C D} F => Quot.map F.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (F.obj X) (F.obj Y)) }.map\n        f ≫\n      { obj := fun C => Quotient (isIsomorphicSetoid ↑C),\n            map := fun {C D} F => Quot.map F.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (F.obj X) (F.obj Y)) }.map\n        g\n[PROOFSTEP]\ndsimp\n[GOAL]\nC D E : Cat\nf : C ⟶ D\ng : D ⟶ E\n⊢ Quot.map (f ≫ g).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (g.obj (f.obj X)) (g.obj (f.obj Y))) =\n    Quot.map f.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (f.obj X) (f.obj Y)) ≫\n      Quot.map g.obj (_ : ∀ (X Y : ↑D), Setoid.r X Y → Setoid.r (g.obj X) (g.obj Y))\n[PROOFSTEP]\napply funext\n[GOAL]\ncase h\nC D E : Cat\nf : C ⟶ D\ng : D ⟶ E\n⊢ ∀ (x : Quot Setoid.r),\n    Quot.map (f ≫ g).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (g.obj (f.obj X)) (g.obj (f.obj Y))) x =\n      (Quot.map f.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (f.obj X) (f.obj Y)) ≫\n          Quot.map g.obj (_ : ∀ (X Y : ↑D), Setoid.r X Y → Setoid.r (g.obj X) (g.obj Y)))\n        x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nC D E : Cat\nf : C ⟶ D\ng : D ⟶ E\nx : Quot Setoid.r\n⊢ Quot.map (f ≫ g).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (g.obj (f.obj X)) (g.obj (f.obj Y))) x =\n    (Quot.map f.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (f.obj X) (f.obj Y)) ≫\n        Quot.map g.obj (_ : ∀ (X Y : ↑D), Setoid.r X Y → Setoid.r (g.obj X) (g.obj Y)))\n      x\n[PROOFSTEP]\napply x.recOn\n[GOAL]\ncase h.h\nC D E : Cat\nf : C ⟶ D\ng : D ⟶ E\nx : Quot Setoid.r\n⊢ ∀ (a b : ↑C) (p : Setoid.r a b),\n    (_ :\n        Quot.map (f ≫ g).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (g.obj (f.obj X)) (g.obj (f.obj Y)))\n            (Quot.mk Setoid.r b) =\n          (Quot.map f.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (f.obj X) (f.obj Y)) ≫\n              Quot.map g.obj (_ : ∀ (X Y : ↑D), Setoid.r X Y → Setoid.r (g.obj X) (g.obj Y)))\n            (Quot.mk Setoid.r b)) =\n      (_ : ?m.1407 (Quot.mk Setoid.r b))\n[PROOFSTEP]\nintro _ _ _\n[GOAL]\ncase h.h\nC D E : Cat\nf : C ⟶ D\ng : D ⟶ E\nx : Quot Setoid.r\na✝ b✝ : ↑C\np✝ : Setoid.r a✝ b✝\n⊢ (_ :\n      Quot.map (f ≫ g).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (g.obj (f.obj X)) (g.obj (f.obj Y)))\n          (Quot.mk Setoid.r b✝) =\n        (Quot.map f.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (f.obj X) (f.obj Y)) ≫\n            Quot.map g.obj (_ : ∀ (X Y : ↑D), Setoid.r X Y → Setoid.r (g.obj X) (g.obj Y)))\n          (Quot.mk Setoid.r b✝)) =\n    (_ : ?m.1407 (Quot.mk Setoid.r b✝))\n[PROOFSTEP]\nsimp only [types_id_apply]\n[GOAL]\ncase h.f\nC D E : Cat\nf : C ⟶ D\ng : D ⟶ E\nx : Quot Setoid.r\n⊢ ∀ (a : ↑C),\n    Quot.map (f ≫ g).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (g.obj (f.obj X)) (g.obj (f.obj Y)))\n        (Quot.mk Setoid.r a) =\n      (Quot.map f.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (f.obj X) (f.obj Y)) ≫\n          Quot.map g.obj (_ : ∀ (X Y : ↑D), Setoid.r X Y → Setoid.r (g.obj X) (g.obj Y)))\n        (Quot.mk Setoid.r a)\n[PROOFSTEP]\nintro _\n[GOAL]\ncase h.f\nC D E : Cat\nf : C ⟶ D\ng : D ⟶ E\nx : Quot Setoid.r\na✝ : ↑C\n⊢ Quot.map (f ≫ g).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (g.obj (f.obj X)) (g.obj (f.obj Y)))\n      (Quot.mk Setoid.r a✝) =\n    (Quot.map f.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (f.obj X) (f.obj Y)) ≫\n        Quot.map g.obj (_ : ∀ (X Y : ↑D), Setoid.r X Y → Setoid.r (g.obj X) (g.obj Y)))\n      (Quot.mk Setoid.r a✝)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.IsomorphismClasses", "llama_tokens": 3118, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7772998611746911, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.3916861963973245}}
{"text": "[GOAL]\nμ ν : YoungDiagram\nh : (fun y => ↑y.cells) μ = (fun y => ↑y.cells) ν\n⊢ μ = ν\n[PROOFSTEP]\nrwa [YoungDiagram.ext_iff, ← Finset.coe_inj]\n[GOAL]\nμ ν : YoungDiagram\n⊢ IsLowerSet ↑(μ.cells ∪ ν.cells)\n[PROOFSTEP]\nrw [Finset.coe_union]\n[GOAL]\nμ ν : YoungDiagram\n⊢ IsLowerSet (↑μ.cells ∪ ↑ν.cells)\n[PROOFSTEP]\nexact μ.isLowerSet.union ν.isLowerSet\n[GOAL]\nμ ν : YoungDiagram\n⊢ IsLowerSet ↑(μ.cells ∩ ν.cells)\n[PROOFSTEP]\nrw [Finset.coe_inter]\n[GOAL]\nμ ν : YoungDiagram\n⊢ IsLowerSet (↑μ.cells ∩ ↑ν.cells)\n[PROOFSTEP]\nexact μ.isLowerSet.inter ν.isLowerSet\n[GOAL]\n⊢ IsLowerSet ↑∅\n[PROOFSTEP]\nintros a b _ h\n[GOAL]\na b : ℕ × ℕ\na✝ : b ≤ a\nh : a ∈ ↑∅\n⊢ b ∈ ↑∅\n[PROOFSTEP]\nsimp only [Finset.coe_empty, Set.mem_empty_iff_false]\n[GOAL]\na b : ℕ × ℕ\na✝ : b ≤ a\nh : a ∈ ↑∅\n⊢ False\n[PROOFSTEP]\nsimp only [Finset.coe_empty, Set.mem_empty_iff_false] at h \n[GOAL]\nx✝¹ : YoungDiagram\nx✝ : ℕ × ℕ\n⊢ x✝ ∈ ⊥ → x✝ ∈ x✝¹\n[PROOFSTEP]\nintro y\n[GOAL]\nx✝¹ : YoungDiagram\nx✝ : ℕ × ℕ\ny : x✝ ∈ ⊥\n⊢ x✝ ∈ x✝¹\n[PROOFSTEP]\nsimp only [mem_mk, Finset.not_mem_empty] at y \n[GOAL]\n⊢ ↑⊥.cells = ∅\n[PROOFSTEP]\nrefine' Set.eq_of_subset_of_subset _ _\n[GOAL]\ncase refine'_1\n⊢ ↑⊥.cells ⊆ ∅\ncase refine'_2 ⊢ ∅ ⊆ ↑⊥.cells\n[PROOFSTEP]\nintros x h\n[GOAL]\ncase refine'_1\nx : ℕ × ℕ\nh : x ∈ ↑⊥.cells\n⊢ x ∈ ∅\ncase refine'_2 ⊢ ∅ ⊆ ↑⊥.cells\n[PROOFSTEP]\nsimp [mem_mk, Finset.coe_empty, Set.mem_empty_iff_false] at h \n[GOAL]\ncase refine'_2\n⊢ ∅ ⊆ ↑⊥.cells\n[PROOFSTEP]\nsimp only [cells_bot, Finset.coe_empty, Set.empty_subset]\n[GOAL]\nμ ν : YoungDiagram\nh : μ.cells = ν.cells\n⊢ μ = ν\n[PROOFSTEP]\nrwa [YoungDiagram.ext_iff]\n[GOAL]\nμ : YoungDiagram\nx✝¹ x✝ : ℕ × ℕ\nh : x✝ ≤ x✝¹\n⊢ x✝¹ ∈ ↑(↑(Equiv.finsetCongr (Equiv.prodComm ℕ ℕ)) μ.cells) → x✝ ∈ ↑(↑(Equiv.finsetCongr (Equiv.prodComm ℕ ℕ)) μ.cells)\n[PROOFSTEP]\nsimp only [Finset.mem_coe, Equiv.finsetCongr_apply, Finset.mem_map_equiv]\n[GOAL]\nμ : YoungDiagram\nx✝¹ x✝ : ℕ × ℕ\nh : x✝ ≤ x✝¹\n⊢ ↑(Equiv.prodComm ℕ ℕ).symm x✝¹ ∈ μ.cells → ↑(Equiv.prodComm ℕ ℕ).symm x✝ ∈ μ.cells\n[PROOFSTEP]\nintro hcell\n[GOAL]\nμ : YoungDiagram\nx✝¹ x✝ : ℕ × ℕ\nh : x✝ ≤ x✝¹\nhcell : ↑(Equiv.prodComm ℕ ℕ).symm x✝¹ ∈ μ.cells\n⊢ ↑(Equiv.prodComm ℕ ℕ).symm x✝ ∈ μ.cells\n[PROOFSTEP]\napply μ.isLowerSet _ hcell\n[GOAL]\nμ : YoungDiagram\nx✝¹ x✝ : ℕ × ℕ\nh : x✝ ≤ x✝¹\nhcell : ↑(Equiv.prodComm ℕ ℕ).symm x✝¹ ∈ μ.cells\n⊢ ↑(Equiv.prodComm ℕ ℕ).symm x✝ ≤ ↑(Equiv.prodComm ℕ ℕ).symm x✝¹\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nμ : YoungDiagram\nc : ℕ × ℕ\n⊢ c ∈ transpose μ ↔ Prod.swap c ∈ μ\n[PROOFSTEP]\nsimp [transpose]\n[GOAL]\nμ : YoungDiagram\n⊢ transpose (transpose μ) = μ\n[PROOFSTEP]\next x\n[GOAL]\ncase cells.a\nμ : YoungDiagram\nx : ℕ × ℕ\n⊢ x ∈ (transpose (transpose μ)).cells ↔ x ∈ μ.cells\n[PROOFSTEP]\nsimp\n[GOAL]\nμ ν : YoungDiagram\n⊢ transpose μ = ν ↔ μ = transpose ν\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nμ ν : YoungDiagram\n⊢ transpose μ = ν → μ = transpose ν\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\nμ : YoungDiagram\n⊢ μ = transpose (transpose μ)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nμ ν : YoungDiagram\n⊢ μ = transpose ν → transpose μ = ν\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nν : YoungDiagram\n⊢ transpose (transpose ν) = ν\n[PROOFSTEP]\nsimp\n[GOAL]\nμ ν : YoungDiagram\n⊢ transpose μ = transpose ν ↔ μ = ν\n[PROOFSTEP]\nrw [transpose_eq_iff_eq_transpose]\n[GOAL]\nμ ν : YoungDiagram\n⊢ μ = transpose (transpose ν) ↔ μ = ν\n[PROOFSTEP]\nsimp\n[GOAL]\nμ ν : YoungDiagram\nh_le : transpose μ ≤ ν\nc : ℕ × ℕ\nhc : c ∈ μ.cells\n⊢ c ∈ (transpose ν).cells\n[PROOFSTEP]\nsimp only [mem_cells, mem_transpose]\n[GOAL]\nμ ν : YoungDiagram\nh_le : transpose μ ≤ ν\nc : ℕ × ℕ\nhc : c ∈ μ.cells\n⊢ Prod.swap c ∈ ν\n[PROOFSTEP]\napply h_le\n[GOAL]\ncase a\nμ ν : YoungDiagram\nh_le : transpose μ ≤ ν\nc : ℕ × ℕ\nhc : c ∈ μ.cells\n⊢ Prod.swap c ∈ (transpose μ).cells\n[PROOFSTEP]\nsimpa\n[GOAL]\nμ ν : YoungDiagram\nh : transpose μ ≤ transpose ν\n⊢ μ ≤ ν\n[PROOFSTEP]\nconvert YoungDiagram.le_of_transpose_le h\n[GOAL]\ncase h.e'_4\nμ ν : YoungDiagram\nh : transpose μ ≤ transpose ν\n⊢ ν = transpose (transpose ν)\n[PROOFSTEP]\nsimp\n[GOAL]\nμ ν : YoungDiagram\nh : μ ≤ ν\n⊢ transpose μ ≤ transpose ν\n[PROOFSTEP]\nrw [← transpose_transpose μ] at h \n[GOAL]\nμ ν : YoungDiagram\nh : transpose (transpose μ) ≤ ν\n⊢ transpose μ ≤ transpose ν\n[PROOFSTEP]\nexact YoungDiagram.le_of_transpose_le h\n[GOAL]\nx✝ : YoungDiagram\n⊢ transpose (transpose x✝) = x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nx✝ : YoungDiagram\n⊢ transpose (transpose x✝) = x✝\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ ∀ {a b : YoungDiagram},\n    ↑{ toFun := transpose, invFun := transpose, left_inv := (_ : ∀ (x : YoungDiagram), transpose (transpose x) = x),\n              right_inv := (_ : ∀ (x : YoungDiagram), transpose (transpose x) = x) }\n          a ≤\n        ↑{ toFun := transpose, invFun := transpose, left_inv := (_ : ∀ (x : YoungDiagram), transpose (transpose x) = x),\n              right_inv := (_ : ∀ (x : YoungDiagram), transpose (transpose x) = x) }\n          b ↔\n      a ≤ b\n[PROOFSTEP]\nsimp\n[GOAL]\nμ : YoungDiagram\ni : ℕ\nc : ℕ × ℕ\n⊢ c ∈ row μ i ↔ c ∈ μ ∧ c.fst = i\n[PROOFSTEP]\nsimp [row]\n[GOAL]\nμ : YoungDiagram\ni j : ℕ\n⊢ (i, j) ∈ row μ i ↔ (i, j) ∈ μ\n[PROOFSTEP]\nsimp [row]\n[GOAL]\nμ : YoungDiagram\ni : ℕ\n⊢ ∃ j, ¬(i, j) ∈ μ\n[PROOFSTEP]\nobtain ⟨j, hj⟩ :=\n  Infinite.exists_not_mem_finset\n    (μ.cells.preimage (Prod.mk i) fun _ _ _ _ h => by\n      cases h\n      rfl)\n[GOAL]\nμ : YoungDiagram\ni x✝³ : ℕ\nx✝² : x✝³ ∈ Prod.mk i ⁻¹' ↑μ.cells\nx✝¹ : ℕ\nx✝ : x✝¹ ∈ Prod.mk i ⁻¹' ↑μ.cells\nh : (i, x✝³) = (i, x✝¹)\n⊢ x✝³ = x✝¹\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nμ : YoungDiagram\ni x✝² : ℕ\nx✝¹ x✝ : x✝² ∈ Prod.mk i ⁻¹' ↑μ.cells\n⊢ x✝² = x✝²\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro\nμ : YoungDiagram\ni j : ℕ\nhj :\n  ¬j ∈\n      Finset.preimage μ.cells (Prod.mk i)\n        (_ :\n          ∀ (x : ℕ),\n            x ∈ Prod.mk i ⁻¹' ↑μ.cells → ∀ (x_2 : ℕ), x_2 ∈ Prod.mk i ⁻¹' ↑μ.cells → (i, x) = (i, x_2) → x = x_2)\n⊢ ∃ j, ¬(i, j) ∈ μ\n[PROOFSTEP]\nrw [Finset.mem_preimage] at hj \n[GOAL]\ncase intro\nμ : YoungDiagram\ni j : ℕ\nhj : ¬(i, j) ∈ μ.cells\n⊢ ∃ j, ¬(i, j) ∈ μ\n[PROOFSTEP]\nexact ⟨j, hj⟩\n[GOAL]\nμ : YoungDiagram\ni j : ℕ\n⊢ (i, j) ∈ μ ↔ j < rowLen μ i\n[PROOFSTEP]\nrw [rowLen, Nat.lt_find_iff]\n[GOAL]\nμ : YoungDiagram\ni j : ℕ\n⊢ (i, j) ∈ μ ↔ ∀ (m : ℕ), m ≤ j → ¬¬(i, m) ∈ μ\n[PROOFSTEP]\npush_neg\n[GOAL]\nμ : YoungDiagram\ni j : ℕ\n⊢ (i, j) ∈ μ ↔ ∀ (m : ℕ), m ≤ j → (i, m) ∈ μ\n[PROOFSTEP]\nexact ⟨fun h _ hmj => μ.up_left_mem (by rfl) hmj h, fun h => h _ (by rfl)⟩\n[GOAL]\nμ : YoungDiagram\ni j : ℕ\nh : (i, j) ∈ μ\nx✝ : ℕ\nhmj : x✝ ≤ j\n⊢ i ≤ i\n[PROOFSTEP]\nrfl\n[GOAL]\nμ : YoungDiagram\ni j : ℕ\nh : ∀ (m : ℕ), m ≤ j → (i, m) ∈ μ\n⊢ j ≤ j\n[PROOFSTEP]\nrfl\n[GOAL]\nμ : YoungDiagram\ni : ℕ\n⊢ row μ i = {i} ×ˢ Finset.range (rowLen μ i)\n[PROOFSTEP]\next ⟨a, b⟩\n[GOAL]\ncase a.mk\nμ : YoungDiagram\ni a b : ℕ\n⊢ (a, b) ∈ row μ i ↔ (a, b) ∈ {i} ×ˢ Finset.range (rowLen μ i)\n[PROOFSTEP]\nsimp only [Finset.mem_product, Finset.mem_singleton, Finset.mem_range, mem_row_iff, mem_iff_lt_rowLen, and_comm,\n  and_congr_right_iff]\n[GOAL]\ncase a.mk\nμ : YoungDiagram\ni a b : ℕ\n⊢ a = i → (b < rowLen μ a ↔ b < rowLen μ i)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase a.mk\nμ : YoungDiagram\na b : ℕ\n⊢ b < rowLen μ a ↔ b < rowLen μ a\n[PROOFSTEP]\nrfl\n[GOAL]\nμ : YoungDiagram\ni : ℕ\n⊢ rowLen μ i = Finset.card (row μ i)\n[PROOFSTEP]\nsimp [row_eq_prod]\n[GOAL]\nμ : YoungDiagram\ni1 i2 : ℕ\nhi : i1 ≤ i2\n⊢ rowLen μ i2 ≤ rowLen μ i1\n[PROOFSTEP]\nby_contra' h_lt\n[GOAL]\nμ : YoungDiagram\ni1 i2 : ℕ\nhi : i1 ≤ i2\nh_lt : rowLen μ i1 < rowLen μ i2\n⊢ False\n[PROOFSTEP]\nrw [← lt_self_iff_false (μ.rowLen i1)]\n[GOAL]\nμ : YoungDiagram\ni1 i2 : ℕ\nhi : i1 ≤ i2\nh_lt : rowLen μ i1 < rowLen μ i2\n⊢ rowLen μ i1 < rowLen μ i1\n[PROOFSTEP]\nrw [← mem_iff_lt_rowLen] at h_lt ⊢\n[GOAL]\nμ : YoungDiagram\ni1 i2 : ℕ\nhi : i1 ≤ i2\nh_lt : (i2, rowLen μ i1) ∈ μ\n⊢ (i1, rowLen μ i1) ∈ μ\n[PROOFSTEP]\nexact μ.up_left_mem hi (by rfl) h_lt\n[GOAL]\nμ : YoungDiagram\ni1 i2 : ℕ\nhi : i1 ≤ i2\nh_lt : (i2, rowLen μ i1) ∈ μ\n⊢ rowLen μ i1 ≤ rowLen μ i1\n[PROOFSTEP]\nrfl\n[GOAL]\nμ : YoungDiagram\nj : ℕ\nc : ℕ × ℕ\n⊢ c ∈ col μ j ↔ c ∈ μ ∧ c.snd = j\n[PROOFSTEP]\nsimp [col]\n[GOAL]\nμ : YoungDiagram\ni j : ℕ\n⊢ (i, j) ∈ col μ j ↔ (i, j) ∈ μ\n[PROOFSTEP]\nsimp [col]\n[GOAL]\nμ : YoungDiagram\nj : ℕ\n⊢ ∃ i, ¬(i, j) ∈ μ.cells\n[PROOFSTEP]\nconvert μ.transpose.exists_not_mem_row j using 1\n[GOAL]\ncase h.e'_2\nμ : YoungDiagram\nj : ℕ\n⊢ (fun i => ¬(i, j) ∈ μ.cells) = fun j_1 => ¬(j, j_1) ∈ transpose μ\n[PROOFSTEP]\nsimp\n[GOAL]\nμ : YoungDiagram\nj : ℕ\n⊢ colLen (transpose μ) j = rowLen μ j\n[PROOFSTEP]\nsimp [rowLen, colLen]\n[GOAL]\nμ : YoungDiagram\ni : ℕ\n⊢ rowLen (transpose μ) i = colLen μ i\n[PROOFSTEP]\nsimp [rowLen, colLen]\n[GOAL]\nμ : YoungDiagram\ni j : ℕ\n⊢ (i, j) ∈ μ ↔ i < colLen μ j\n[PROOFSTEP]\nrw [← rowLen_transpose, ← mem_iff_lt_rowLen]\n[GOAL]\nμ : YoungDiagram\ni j : ℕ\n⊢ (i, j) ∈ μ ↔ (j, i) ∈ transpose μ\n[PROOFSTEP]\nsimp\n[GOAL]\nμ : YoungDiagram\nj : ℕ\n⊢ col μ j = Finset.range (colLen μ j) ×ˢ {j}\n[PROOFSTEP]\next ⟨a, b⟩\n[GOAL]\ncase a.mk\nμ : YoungDiagram\nj a b : ℕ\n⊢ (a, b) ∈ col μ j ↔ (a, b) ∈ Finset.range (colLen μ j) ×ˢ {j}\n[PROOFSTEP]\nsimp only [Finset.mem_product, Finset.mem_singleton, Finset.mem_range, mem_col_iff, mem_iff_lt_colLen, and_comm,\n  and_congr_right_iff]\n[GOAL]\ncase a.mk\nμ : YoungDiagram\nj a b : ℕ\n⊢ b = j → (a < colLen μ b ↔ a < colLen μ j)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase a.mk\nμ : YoungDiagram\na b : ℕ\n⊢ a < colLen μ b ↔ a < colLen μ b\n[PROOFSTEP]\nrfl\n[GOAL]\nμ : YoungDiagram\nj : ℕ\n⊢ colLen μ j = Finset.card (col μ j)\n[PROOFSTEP]\nsimp [col_eq_prod]\n[GOAL]\nμ : YoungDiagram\nj1 j2 : ℕ\nhj : j1 ≤ j2\n⊢ colLen μ j2 ≤ colLen μ j1\n[PROOFSTEP]\nconvert μ.transpose.rowLen_anti j1 j2 hj using 1\n[GOAL]\ncase h.e'_3\nμ : YoungDiagram\nj1 j2 : ℕ\nhj : j1 ≤ j2\n⊢ colLen μ j2 = rowLen (transpose μ) j2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_4\nμ : YoungDiagram\nj1 j2 : ℕ\nhj : j1 ≤ j2\n⊢ colLen μ j1 = rowLen (transpose μ) j1\n[PROOFSTEP]\nsimp\n[GOAL]\nμ : YoungDiagram\ni : Fin (List.length (rowLens μ))\n⊢ List.get (rowLens μ) i = rowLen μ ↑i\n[PROOFSTEP]\nsimp only [rowLens, List.get_range, List.get_map]\n[GOAL]\nμ : YoungDiagram\n⊢ List.length (rowLens μ) = colLen μ 0\n[PROOFSTEP]\nsimp only [rowLens, List.length_map, List.length_range]\n[GOAL]\nμ : YoungDiagram\nx : ℕ\nhx : x ∈ rowLens μ\n⊢ 0 < x\n[PROOFSTEP]\nrw [rowLens, List.mem_map] at hx \n[GOAL]\nμ : YoungDiagram\nx : ℕ\nhx : ∃ a, a ∈ List.range (colLen μ 0) ∧ rowLen μ a = x\n⊢ 0 < x\n[PROOFSTEP]\nobtain ⟨i, hi, rfl : μ.rowLen i = x⟩ := hx\n[GOAL]\ncase intro.intro\nμ : YoungDiagram\ni : ℕ\nhi : i ∈ List.range (colLen μ 0)\n⊢ 0 < rowLen μ i\n[PROOFSTEP]\nrwa [List.mem_range, ← mem_iff_lt_colLen, mem_iff_lt_rowLen] at hi \n[GOAL]\nw : List ℕ\nc : ℕ × ℕ\n⊢ c ∈ YoungDiagram.cellsOfRowLens w ↔ ∃ h, c.snd < List.get w { val := c.fst, isLt := h }\n[PROOFSTEP]\ninduction' w with w_hd w_tl w_ih generalizing c\n[GOAL]\ncase nil\nc✝ c : ℕ × ℕ\n⊢ c ∈ YoungDiagram.cellsOfRowLens [] ↔ ∃ h, c.snd < List.get [] { val := c.fst, isLt := h }\n[PROOFSTEP]\nrw [YoungDiagram.cellsOfRowLens]\n[GOAL]\ncase cons\nc✝ : ℕ × ℕ\nw_hd : ℕ\nw_tl : List ℕ\nw_ih : ∀ {c : ℕ × ℕ}, c ∈ YoungDiagram.cellsOfRowLens w_tl ↔ ∃ h, c.snd < List.get w_tl { val := c.fst, isLt := h }\nc : ℕ × ℕ\n⊢ c ∈ YoungDiagram.cellsOfRowLens (w_hd :: w_tl) ↔ ∃ h, c.snd < List.get (w_hd :: w_tl) { val := c.fst, isLt := h }\n[PROOFSTEP]\nrw [YoungDiagram.cellsOfRowLens]\n[GOAL]\ncase nil\nc✝ c : ℕ × ℕ\n⊢ c ∈ ∅ ↔ ∃ h, c.snd < List.get [] { val := c.fst, isLt := h }\n[PROOFSTEP]\nsimp [YoungDiagram.cellsOfRowLens]\n[GOAL]\ncase cons\nc✝ : ℕ × ℕ\nw_hd : ℕ\nw_tl : List ℕ\nw_ih : ∀ {c : ℕ × ℕ}, c ∈ YoungDiagram.cellsOfRowLens w_tl ↔ ∃ h, c.snd < List.get w_tl { val := c.fst, isLt := h }\nc : ℕ × ℕ\n⊢ c ∈\n      {0} ×ˢ Finset.range w_hd ∪\n        Finset.map (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ))\n          (YoungDiagram.cellsOfRowLens w_tl) ↔\n    ∃ h, c.snd < List.get (w_hd :: w_tl) { val := c.fst, isLt := h }\n[PROOFSTEP]\nrcases c with ⟨⟨_, _⟩, _⟩\n[GOAL]\ncase cons.mk.zero\nc : ℕ × ℕ\nw_hd : ℕ\nw_tl : List ℕ\nw_ih : ∀ {c : ℕ × ℕ}, c ∈ YoungDiagram.cellsOfRowLens w_tl ↔ ∃ h, c.snd < List.get w_tl { val := c.fst, isLt := h }\nsnd✝ : ℕ\n⊢ (Nat.zero, snd✝) ∈\n      {0} ×ˢ Finset.range w_hd ∪\n        Finset.map (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ))\n          (YoungDiagram.cellsOfRowLens w_tl) ↔\n    ∃ h, (Nat.zero, snd✝).snd < List.get (w_hd :: w_tl) { val := (Nat.zero, snd✝).fst, isLt := h }\n[PROOFSTEP]\nsimp\n  -- Porting note: was `simpa`\n[GOAL]\ncase cons.mk.succ\nc : ℕ × ℕ\nw_hd : ℕ\nw_tl : List ℕ\nw_ih : ∀ {c : ℕ × ℕ}, c ∈ YoungDiagram.cellsOfRowLens w_tl ↔ ∃ h, c.snd < List.get w_tl { val := c.fst, isLt := h }\nsnd✝ n✝ : ℕ\n⊢ (Nat.succ n✝, snd✝) ∈\n      {0} ×ˢ Finset.range w_hd ∪\n        Finset.map (Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Embedding.refl ℕ))\n          (YoungDiagram.cellsOfRowLens w_tl) ↔\n    ∃ h, (Nat.succ n✝, snd✝).snd < List.get (w_hd :: w_tl) { val := (Nat.succ n✝, snd✝).fst, isLt := h }\n[PROOFSTEP]\nsimp [w_ih, -Finset.singleton_product, Nat.succ_lt_succ_iff]\n[GOAL]\nw : List ℕ\nhw : List.Sorted (fun x x_1 => x ≥ x_1) w\n⊢ IsLowerSet ↑(YoungDiagram.cellsOfRowLens w)\n[PROOFSTEP]\nrintro ⟨i2, j2⟩ ⟨i1, j1⟩ ⟨hi : i1 ≤ i2, hj : j1 ≤ j2⟩ hcell\n[GOAL]\ncase mk.mk.intro\nw : List ℕ\nhw : List.Sorted (fun x x_1 => x ≥ x_1) w\ni2 j2 i1 j1 : ℕ\nhi : i1 ≤ i2\nhj : j1 ≤ j2\nhcell : (i2, j2) ∈ ↑(YoungDiagram.cellsOfRowLens w)\n⊢ (i1, j1) ∈ ↑(YoungDiagram.cellsOfRowLens w)\n[PROOFSTEP]\nrw [Finset.mem_coe, YoungDiagram.mem_cellsOfRowLens] at hcell ⊢\n[GOAL]\ncase mk.mk.intro\nw : List ℕ\nhw : List.Sorted (fun x x_1 => x ≥ x_1) w\ni2 j2 i1 j1 : ℕ\nhi : i1 ≤ i2\nhj : j1 ≤ j2\nhcell : ∃ h, (i2, j2).snd < List.get w { val := (i2, j2).fst, isLt := h }\n⊢ ∃ h, (i1, j1).snd < List.get w { val := (i1, j1).fst, isLt := h }\n[PROOFSTEP]\nobtain ⟨h1, h2⟩ := hcell\n[GOAL]\ncase mk.mk.intro.intro\nw : List ℕ\nhw : List.Sorted (fun x x_1 => x ≥ x_1) w\ni2 j2 i1 j1 : ℕ\nhi : i1 ≤ i2\nhj : j1 ≤ j2\nh1 : (i2, j2).fst < List.length w\nh2 : (i2, j2).snd < List.get w { val := (i2, j2).fst, isLt := h1 }\n⊢ ∃ h, (i1, j1).snd < List.get w { val := (i1, j1).fst, isLt := h }\n[PROOFSTEP]\nrefine' ⟨hi.trans_lt h1, _⟩\n[GOAL]\ncase mk.mk.intro.intro\nw : List ℕ\nhw : List.Sorted (fun x x_1 => x ≥ x_1) w\ni2 j2 i1 j1 : ℕ\nhi : i1 ≤ i2\nhj : j1 ≤ j2\nh1 : (i2, j2).fst < List.length w\nh2 : (i2, j2).snd < List.get w { val := (i2, j2).fst, isLt := h1 }\n⊢ (i1, j1).snd < List.get w { val := (i1, j1).fst, isLt := (_ : i1 < List.length w) }\n[PROOFSTEP]\ncalc\n  j1 ≤ j2 := hj\n  _ < w.get ⟨i2, _⟩ := h2\n  _ ≤ w.get ⟨i1, _⟩ := by\n    obtain rfl | h := eq_or_lt_of_le hi\n    · convert le_refl (w.get ⟨i1, h1⟩)\n    · exact List.pairwise_iff_get.mp hw _ _ h\n[GOAL]\nw : List ℕ\nhw : List.Sorted (fun x x_1 => x ≥ x_1) w\ni2 j2 i1 j1 : ℕ\nhi : i1 ≤ i2\nhj : j1 ≤ j2\nh1 : (i2, j2).fst < List.length w\nh2 : (i2, j2).snd < List.get w { val := (i2, j2).fst, isLt := h1 }\n⊢ List.get w { val := i2, isLt := h1 } ≤ List.get w { val := i1, isLt := (_ : i1 < List.length w) }\n[PROOFSTEP]\nobtain rfl | h := eq_or_lt_of_le hi\n[GOAL]\ncase inl\nw : List ℕ\nhw : List.Sorted (fun x x_1 => x ≥ x_1) w\nj2 i1 j1 : ℕ\nhj : j1 ≤ j2\nhi : i1 ≤ i1\nh1 : (i1, j2).fst < List.length w\nh2 : (i1, j2).snd < List.get w { val := (i1, j2).fst, isLt := h1 }\n⊢ List.get w { val := i1, isLt := h1 } ≤ List.get w { val := i1, isLt := (_ : i1 < List.length w) }\n[PROOFSTEP]\nconvert le_refl (w.get ⟨i1, h1⟩)\n[GOAL]\ncase inr\nw : List ℕ\nhw : List.Sorted (fun x x_1 => x ≥ x_1) w\ni2 j2 i1 j1 : ℕ\nhi : i1 ≤ i2\nhj : j1 ≤ j2\nh1 : (i2, j2).fst < List.length w\nh2 : (i2, j2).snd < List.get w { val := (i2, j2).fst, isLt := h1 }\nh : i1 < i2\n⊢ List.get w { val := i2, isLt := h1 } ≤ List.get w { val := i1, isLt := (_ : i1 < List.length w) }\n[PROOFSTEP]\nexact List.pairwise_iff_get.mp hw _ _ h\n[GOAL]\nw : List ℕ\nhw : List.Sorted (fun x x_1 => x ≥ x_1) w\nhpos : ∀ (x : ℕ), x ∈ w → 0 < x\n⊢ List.length (rowLens (ofRowLens w hw)) = List.length w\n[PROOFSTEP]\nsimp only [length_rowLens, colLen, Nat.find_eq_iff, mem_cells, mem_ofRowLens, lt_self_iff_false, IsEmpty.exists_iff,\n  Classical.not_not]\n[GOAL]\nw : List ℕ\nhw : List.Sorted (fun x x_1 => x ≥ x_1) w\nhpos : ∀ (x : ℕ), x ∈ w → 0 < x\n⊢ True ∧ ∀ (n : ℕ), n < List.length w → ∃ h, 0 < List.get w { val := n, isLt := (_ : (n, 0).fst < List.length w) }\n[PROOFSTEP]\nrefine' ⟨True.intro, fun n hn => ⟨hn, hpos _ (List.get_mem _ _ hn)⟩⟩\n[GOAL]\nw : List ℕ\nhw : List.Sorted (fun x x_1 => x ≥ x_1) w\ni : Fin (List.length w)\n⊢ rowLen (ofRowLens w hw) ↑i = List.get w i\n[PROOFSTEP]\nsimp [rowLen, Nat.find_eq_iff, mem_ofRowLens]\n[GOAL]\nμ : YoungDiagram\n⊢ ofRowLens (rowLens μ) (_ : List.Sorted (fun x x_1 => x ≥ x_1) (rowLens μ)) = μ\n[PROOFSTEP]\next ⟨i, j⟩\n[GOAL]\ncase cells.a.mk\nμ : YoungDiagram\ni j : ℕ\n⊢ (i, j) ∈ (ofRowLens (rowLens μ) (_ : List.Sorted (fun x x_1 => x ≥ x_1) (rowLens μ))).cells ↔ (i, j) ∈ μ.cells\n[PROOFSTEP]\nsimp only [mem_cells, mem_ofRowLens, length_rowLens, get_rowLens]\n[GOAL]\ncase cells.a.mk\nμ : YoungDiagram\ni j : ℕ\n⊢ (∃ h, j < rowLen μ i) ↔ (i, j) ∈ μ\n[PROOFSTEP]\nsimpa [← mem_iff_lt_colLen, mem_iff_lt_rowLen] using j.zero_le.trans_lt\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Young.YoungDiagram", "llama_tokens": 9116, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6113819732941511, "lm_q2_score": 0.640635854839898, "lm_q1q2_score": 0.3916732130950022}}
{"text": "[GOAL]\n⊢ ConcreteCategory FrmCat\n[PROOFSTEP]\nunfold FrmCat\n[GOAL]\n⊢ ConcreteCategory (Bundled Frame)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα β : FrmCat\ne : ↑α ≃o ↑β\n⊢ {\n        toInfTopHom :=\n          { toInfHom := { toFun := ↑e, map_inf' := (_ : ∀ (a b : ↑α), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) },\n            map_top' := (_ : ↑e ⊤ = ⊤) },\n        map_sSup' := (_ : ∀ (s : Set ↑α), ↑e (sSup s) = sSup (↑e '' s)) } ≫\n      {\n        toInfTopHom :=\n          {\n            toInfHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_inf' :=\n                  (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) },\n            map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤) },\n        map_sSup' := (_ : ∀ (s : Set ↑β), ↑(OrderIso.symm e) (sSup s) = sSup (↑(OrderIso.symm e) '' s)) } =\n    𝟙 α\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : FrmCat\ne : ↑α ≃o ↑β\nx✝ : (forget FrmCat).obj α\n⊢ ↑({\n            toInfTopHom :=\n              { toInfHom := { toFun := ↑e, map_inf' := (_ : ∀ (a b : ↑α), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) },\n                map_top' := (_ : ↑e ⊤ = ⊤) },\n            map_sSup' := (_ : ∀ (s : Set ↑α), ↑e (sSup s) = sSup (↑e '' s)) } ≫\n          {\n            toInfTopHom :=\n              {\n                toInfHom :=\n                  { toFun := ↑(OrderIso.symm e),\n                    map_inf' :=\n                      (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) },\n                map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤) },\n            map_sSup' := (_ : ∀ (s : Set ↑β), ↑(OrderIso.symm e) (sSup s) = sSup (↑(OrderIso.symm e) '' s)) })\n      x✝ =\n    ↑(𝟙 α) x✝\n[PROOFSTEP]\nexact e.symm_apply_apply _\n[GOAL]\nα β : FrmCat\ne : ↑α ≃o ↑β\n⊢ {\n        toInfTopHom :=\n          {\n            toInfHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_inf' :=\n                  (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) },\n            map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤) },\n        map_sSup' := (_ : ∀ (s : Set ↑β), ↑(OrderIso.symm e) (sSup s) = sSup (↑(OrderIso.symm e) '' s)) } ≫\n      {\n        toInfTopHom :=\n          { toInfHom := { toFun := ↑e, map_inf' := (_ : ∀ (a b : ↑α), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) },\n            map_top' := (_ : ↑e ⊤ = ⊤) },\n        map_sSup' := (_ : ∀ (s : Set ↑α), ↑e (sSup s) = sSup (↑e '' s)) } =\n    𝟙 β\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : FrmCat\ne : ↑α ≃o ↑β\nx✝ : (forget FrmCat).obj β\n⊢ ↑({\n            toInfTopHom :=\n              {\n                toInfHom :=\n                  { toFun := ↑(OrderIso.symm e),\n                    map_inf' :=\n                      (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) },\n                map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤) },\n            map_sSup' := (_ : ∀ (s : Set ↑β), ↑(OrderIso.symm e) (sSup s) = sSup (↑(OrderIso.symm e) '' s)) } ≫\n          {\n            toInfTopHom :=\n              { toInfHom := { toFun := ↑e, map_inf' := (_ : ∀ (a b : ↑α), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) },\n                map_top' := (_ : ↑e ⊤ = ⊤) },\n            map_sSup' := (_ : ∀ (s : Set ↑α), ↑e (sSup s) = sSup (↑e '' s)) })\n      x✝ =\n    ↑(𝟙 β) x✝\n[PROOFSTEP]\nexact e.apply_symm_apply _\n", "meta": {"mathlib_filename": "Mathlib.Order.Category.FrmCat", "llama_tokens": 1603, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7371581626286834, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.39158532564733245}}
{"text": "[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\n⊢ ∃ k, μ ∈ Metric.closedBall (A k k) (∑ j in Finset.erase Finset.univ k, ‖A k j‖)\n[PROOFSTEP]\ncases isEmpty_or_nonempty n\n[GOAL]\ncase inl\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : IsEmpty n\n⊢ ∃ k, μ ∈ Metric.closedBall (A k k) (∑ j in Finset.erase Finset.univ k, ‖A k j‖)\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase inl.h\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : IsEmpty n\n⊢ False\n[PROOFSTEP]\nexact hμ (Submodule.eq_bot_of_subsingleton _)\n[GOAL]\ncase inr\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\n⊢ ∃ k, μ ∈ Metric.closedBall (A k k) (∑ j in Finset.erase Finset.univ k, ‖A k j‖)\n[PROOFSTEP]\nobtain ⟨v, h_eg, h_nz⟩ := hμ.exists_hasEigenvector\n[GOAL]\ncase inr.intro.intro\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz : v ≠ 0\n⊢ ∃ k, μ ∈ Metric.closedBall (A k k) (∑ j in Finset.erase Finset.univ k, ‖A k j‖)\n[PROOFSTEP]\nobtain ⟨i, -, h_i⟩ := Finset.exists_mem_eq_sup' Finset.univ_nonempty (fun i => ‖v i‖)\n[GOAL]\ncase inr.intro.intro.intro.intro\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\n⊢ ∃ k, μ ∈ Metric.closedBall (A k k) (∑ j in Finset.erase Finset.univ k, ‖A k j‖)\n[PROOFSTEP]\nhave h_nz : v i ≠ 0 := by\n  contrapose! h_nz\n  ext j\n  rw [Pi.zero_apply, ← norm_le_zero_iff]\n  refine (h_i ▸ Finset.le_sup' (fun i => ‖v i‖) (Finset.mem_univ j)).trans ?_\n  exact norm_le_zero_iff.mpr h_nz\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\n⊢ v i ≠ 0\n[PROOFSTEP]\ncontrapose! h_nz\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i = 0\n⊢ v = 0\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i = 0\nj : n\n⊢ v j = OfNat.ofNat 0 j\n[PROOFSTEP]\nrw [Pi.zero_apply, ← norm_le_zero_iff]\n[GOAL]\ncase h\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i = 0\nj : n\n⊢ ‖v j‖ ≤ 0\n[PROOFSTEP]\nrefine (h_i ▸ Finset.le_sup' (fun i => ‖v i‖) (Finset.mem_univ j)).trans ?_\n[GOAL]\ncase h\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i = 0\nj : n\n⊢ ‖v i‖ ≤ 0\n[PROOFSTEP]\nexact norm_le_zero_iff.mpr h_nz\n[GOAL]\ncase inr.intro.intro.intro.intro\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\n⊢ ∃ k, μ ∈ Metric.closedBall (A k k) (∑ j in Finset.erase Finset.univ k, ‖A k j‖)\n[PROOFSTEP]\nhave h_le : ∀ j, ‖v j * (v i)⁻¹‖ ≤ 1 := fun j =>\n  by\n  rw [norm_mul, norm_inv, mul_inv_le_iff' (norm_pos_iff.mpr h_nz), one_mul]\n  exact h_i ▸ Finset.le_sup' (fun i => ‖v i‖) (Finset.mem_univ j)\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nj : n\n⊢ ‖v j * (v i)⁻¹‖ ≤ 1\n[PROOFSTEP]\nrw [norm_mul, norm_inv, mul_inv_le_iff' (norm_pos_iff.mpr h_nz), one_mul]\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nj : n\n⊢ ‖v j‖ ≤ ‖v i‖\n[PROOFSTEP]\nexact h_i ▸ Finset.le_sup' (fun i => ‖v i‖) (Finset.mem_univ j)\n[GOAL]\ncase inr.intro.intro.intro.intro\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ ∃ k, μ ∈ Metric.closedBall (A k k) (∑ j in Finset.erase Finset.univ k, ‖A k j‖)\n[PROOFSTEP]\nsimp_rw [mem_closedBall_iff_norm']\n[GOAL]\ncase inr.intro.intro.intro.intro\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ ∃ k, ‖A k k - μ‖ ≤ ∑ j in Finset.erase Finset.univ k, ‖A k j‖\n[PROOFSTEP]\nrefine ⟨i, ?_⟩\n[GOAL]\ncase inr.intro.intro.intro.intro\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ ‖A i i - μ‖ ≤ ∑ j in Finset.erase Finset.univ i, ‖A i j‖\n[PROOFSTEP]\ncalc\n  _ = ‖(A i i * v i - μ * v i) * (v i)⁻¹‖ := by congr; field_simp [h_nz]; ring\n  _ = ‖(A i i * v i - ∑ j, A i j * v j) * (v i)⁻¹‖ := by\n    rw [show μ * v i = ∑ x : n, A i x * v x\n        by\n        rw [← Matrix.dotProduct, ← Matrix.mulVec]\n        exact (congrFun (Module.End.mem_eigenspace_iff.mp h_eg) i).symm]\n  _ = ‖(∑ j in Finset.univ.erase i, A i j * v j) * (v i)⁻¹‖ := by\n    rw [Finset.sum_erase_eq_sub (Finset.mem_univ i), ← neg_sub, neg_mul, norm_neg]\n  _ ≤ ∑ j in Finset.univ.erase i, ‖A i j‖ * ‖v j * (v i)⁻¹‖ :=\n    by\n    rw [Finset.sum_mul]\n    exact (norm_sum_le _ _).trans (le_of_eq (by simp_rw [mul_assoc, norm_mul]))\n  _ ≤ ∑ j in Finset.univ.erase i, ‖A i j‖ :=\n    (Finset.sum_le_sum fun j _ => mul_le_of_le_one_right (norm_nonneg _) (h_le j))\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ ‖A i i - μ‖ = ‖(A i i * v i - μ * v i) * (v i)⁻¹‖\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ A i i - μ = (A i i * v i - μ * v i) * (v i)⁻¹\n[PROOFSTEP]\nfield_simp [h_nz]\n[GOAL]\ncase e_a\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ (A i i - μ) * v i = A i i * v i - μ * v i\n[PROOFSTEP]\nring\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ ‖(A i i * v i - μ * v i) * (v i)⁻¹‖ = ‖(A i i * v i - ∑ j : n, A i j * v j) * (v i)⁻¹‖\n[PROOFSTEP]\nrw [show μ * v i = ∑ x : n, A i x * v x by\n    rw [← Matrix.dotProduct, ← Matrix.mulVec]\n    exact (congrFun (Module.End.mem_eigenspace_iff.mp h_eg) i).symm]\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ μ * v i = ∑ x : n, A i x * v x\n[PROOFSTEP]\nrw [← Matrix.dotProduct, ← Matrix.mulVec]\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ μ * v i = Matrix.mulVec A (fun x => v x) i\n[PROOFSTEP]\nexact (congrFun (Module.End.mem_eigenspace_iff.mp h_eg) i).symm\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ ‖(A i i * v i - ∑ j : n, A i j * v j) * (v i)⁻¹‖ = ‖(∑ j in Finset.erase Finset.univ i, A i j * v j) * (v i)⁻¹‖\n[PROOFSTEP]\nrw [Finset.sum_erase_eq_sub (Finset.mem_univ i), ← neg_sub, neg_mul, norm_neg]\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ ‖(∑ j in Finset.erase Finset.univ i, A i j * v j) * (v i)⁻¹‖ ≤\n    ∑ j in Finset.erase Finset.univ i, ‖A i j‖ * ‖v j * (v i)⁻¹‖\n[PROOFSTEP]\nrw [Finset.sum_mul]\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ ‖∑ x in Finset.erase Finset.univ i, A i x * v x * (v i)⁻¹‖ ≤\n    ∑ j in Finset.erase Finset.univ i, ‖A i j‖ * ‖v j * (v i)⁻¹‖\n[PROOFSTEP]\nexact (norm_sum_le _ _).trans (le_of_eq (by simp_rw [mul_assoc, norm_mul]))\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nμ : K\nhμ : Module.End.HasEigenvalue (↑Matrix.toLin' A) μ\nh✝ : Nonempty n\nv : n → K\nh_eg : v ∈ Module.End.eigenspace (↑Matrix.toLin' A) μ\nh_nz✝ : v ≠ 0\ni : n\nh_i : (Finset.sup' Finset.univ (_ : Finset.Nonempty Finset.univ) fun i => ‖v i‖) = ‖v i‖\nh_nz : v i ≠ 0\nh_le : ∀ (j : n), ‖v j * (v i)⁻¹‖ ≤ 1\n⊢ ∑ i_1 in Finset.erase Finset.univ i, ‖A i i_1 * v i_1 * (v i)⁻¹‖ =\n    ∑ j in Finset.erase Finset.univ i, ‖A i j‖ * ‖v j * (v i)⁻¹‖\n[PROOFSTEP]\nsimp_rw [mul_assoc, norm_mul]\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nh : ∀ (k : n), ∑ j in Finset.erase Finset.univ k, ‖A k j‖ < ‖A k k‖\n⊢ Matrix.det A ≠ 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nh : Matrix.det A = 0\n⊢ ∃ k, ‖A k k‖ ≤ ∑ j in Finset.erase Finset.univ k, ‖A k j‖\n[PROOFSTEP]\nsuffices ∃ k, 0 ∈ Metric.closedBall (A k k) (∑ j in Finset.univ.erase k, ‖A k j‖) by\n  exact this.imp (fun a h ↦ by rwa [mem_closedBall_iff_norm', sub_zero] at h )\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nh : Matrix.det A = 0\nthis : ∃ k, 0 ∈ Metric.closedBall (A k k) (∑ j in Finset.erase Finset.univ k, ‖A k j‖)\n⊢ ∃ k, ‖A k k‖ ≤ ∑ j in Finset.erase Finset.univ k, ‖A k j‖\n[PROOFSTEP]\nexact this.imp (fun a h ↦ by rwa [mem_closedBall_iff_norm', sub_zero] at h )\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nh✝ : Matrix.det A = 0\nthis : ∃ k, 0 ∈ Metric.closedBall (A k k) (∑ j in Finset.erase Finset.univ k, ‖A k j‖)\na : n\nh : 0 ∈ Metric.closedBall (A a a) (∑ j in Finset.erase Finset.univ a, ‖A a j‖)\n⊢ ‖A a a‖ ≤ ∑ j in Finset.erase Finset.univ a, ‖A a j‖\n[PROOFSTEP]\nrwa [mem_closedBall_iff_norm', sub_zero] at h \n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nh : Matrix.det A = 0\n⊢ ∃ k, 0 ∈ Metric.closedBall (A k k) (∑ j in Finset.erase Finset.univ k, ‖A k j‖)\n[PROOFSTEP]\nrefine eigenvalue_mem_ball ?_\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nh : Matrix.det A = 0\n⊢ Module.End.HasEigenvalue (↑Matrix.toLin' fun k => A k) 0\n[PROOFSTEP]\nrw [Module.End.HasEigenvalue, Module.End.eigenspace_zero, ne_comm]\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nh : Matrix.det A = 0\n⊢ ⊥ ≠ LinearMap.ker (↑Matrix.toLin' fun k => A k)\n[PROOFSTEP]\nexact ne_of_lt (LinearMap.bot_lt_ker_of_det_eq_zero (by rwa [LinearMap.det_toLin']))\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nh : Matrix.det A = 0\n⊢ ↑LinearMap.det (↑Matrix.toLin' fun k => A k) = 0\n[PROOFSTEP]\nrwa [LinearMap.det_toLin']\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nh : ∀ (k : n), ∑ i in Finset.erase Finset.univ k, ‖A i k‖ < ‖A k k‖\n⊢ Matrix.det A ≠ 0\n[PROOFSTEP]\nrw [← Matrix.det_transpose]\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nh : ∀ (k : n), ∑ i in Finset.erase Finset.univ k, ‖A i k‖ < ‖A k k‖\n⊢ Matrix.det (Matrix.transpose A) ≠ 0\n[PROOFSTEP]\nexact det_ne_zero_of_sum_row_lt_diag (by simp_rw [Matrix.transpose_apply]; exact h)\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nh : ∀ (k : n), ∑ i in Finset.erase Finset.univ k, ‖A i k‖ < ‖A k k‖\n⊢ ∀ (k : n), ∑ j in Finset.erase Finset.univ k, ‖Matrix.transpose A k j‖ < ‖Matrix.transpose A k k‖\n[PROOFSTEP]\nsimp_rw [Matrix.transpose_apply]\n[GOAL]\nK : Type u_1\nn : Type u_2\ninst✝² : NormedField K\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA : Matrix n n K\nh : ∀ (k : n), ∑ i in Finset.erase Finset.univ k, ‖A i k‖ < ‖A k k‖\n⊢ ∀ (k : n), ∑ x in Finset.erase Finset.univ k, ‖A x k‖ < ‖A k k‖\n[PROOFSTEP]\nexact h\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Gershgorin", "llama_tokens": 9424, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802603710086, "lm_q2_score": 0.5851011542032313, "lm_q1q2_score": 0.39136261236683495}}
{"text": "[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : SMul M α\ninst✝³ : SMul N α\ninst✝² : SMul M β\ninst✝¹ : SMul N β\ninst✝ : SMulCommClass M N β\nf : α → β\nhf : Injective f\nh₁ : ∀ (c : M) (x : α), f (c • x) = c • f x\nh₂ : ∀ (c : N) (x : α), f (c • x) = c • f x\nc₁ : M\nc₂ : N\nx : α\n⊢ f (c₁ • c₂ • x) = f (c₂ • c₁ • x)\n[PROOFSTEP]\nsimp only [h₁, h₂, smul_comm c₁ c₂ (f x)]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : SMul M α\ninst✝³ : SMul N α\ninst✝² : SMul M β\ninst✝¹ : SMul N β\ninst✝ : SMulCommClass M N α\nf : α → β\nhf : Surjective f\nh₁ : ∀ (c : M) (x : α), f (c • x) = c • f x\nh₂ : ∀ (c : N) (x : α), f (c • x) = c • f x\nc₁ : M\nc₂ : N\nx : α\n⊢ c₁ • c₂ • f x = c₂ • c₁ • f x\n[PROOFSTEP]\nsimp only [← h₁, ← h₂, smul_comm c₁ c₂ x]\n[GOAL]\nM✝ : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα✝ : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\nM : Type u_10\nα : Type u_11\ninst✝¹ : CommMonoid M\ninst✝ : MulAction M α\na a' : M\nb : α\n⊢ a • a' • b = a' • a • b\n[PROOFSTEP]\nrw [← mul_smul, mul_comm, mul_smul]\n[GOAL]\nM✝ : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα✝ : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\nM : Type u_10\nα : Type u_11\ninst✝² : SMul M α\ninst✝¹ : SMul Mᵐᵒᵖ α\ninst✝ : IsCentralScalar M α\nm : Mᵐᵒᵖ\na : α\n⊢ MulOpposite.unop m • a = m • a\n[PROOFSTEP]\ninduction m using MulOpposite.rec'\n[GOAL]\ncase h\nM✝ : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα✝ : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\nM : Type u_10\nα : Type u_11\ninst✝² : SMul M α\ninst✝¹ : SMul Mᵐᵒᵖ α\ninst✝ : IsCentralScalar M α\na : α\nX✝ : M\n⊢ MulOpposite.unop (MulOpposite.op X✝) • a = MulOpposite.op X✝ • a\n[PROOFSTEP]\nexact (IsCentralScalar.op_smul_eq_smul _ a).symm\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : SMul M α\ninst✝³ : SMul Mᵐᵒᵖ α\ninst✝² : IsCentralScalar M α\ninst✝¹ : SMul N α\ninst✝ : SMulCommClass M N α\nm : Mᵐᵒᵖ\nn : N\na : α\n⊢ m • n • a = n • m • a\n[PROOFSTEP]\nrw [← unop_smul_eq_smul m (n • a), ← unop_smul_eq_smul m a, smul_comm]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : SMul M α\ninst✝³ : SMul N α\ninst✝² : SMul Nᵐᵒᵖ α\ninst✝¹ : IsCentralScalar N α\ninst✝ : SMulCommClass M N α\nm : M\nn : Nᵐᵒᵖ\na : α\n⊢ m • n • a = n • m • a\n[PROOFSTEP]\nrw [← unop_smul_eq_smul n (m • a), ← unop_smul_eq_smul n a, smul_comm]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁷ : SMul M α\ninst✝⁶ : SMul Mᵐᵒᵖ α\ninst✝⁵ : IsCentralScalar M α\ninst✝⁴ : SMul M N\ninst✝³ : SMul Mᵐᵒᵖ N\ninst✝² : IsCentralScalar M N\ninst✝¹ : SMul N α\ninst✝ : IsScalarTower M N α\nm : Mᵐᵒᵖ\nn : N\na : α\n⊢ (m • n) • a = m • n • a\n[PROOFSTEP]\nrw [← unop_smul_eq_smul m (n • a), ← unop_smul_eq_smul m n, smul_assoc]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁵ : SMul M α\ninst✝⁴ : SMul M N\ninst✝³ : SMul N α\ninst✝² : SMul Nᵐᵒᵖ α\ninst✝¹ : IsCentralScalar N α\ninst✝ : IsScalarTower M N α\nm : M\nn : Nᵐᵒᵖ\na : α\n⊢ (m • n) • a = m • n • a\n[PROOFSTEP]\nrw [← unop_smul_eq_smul n a, ← unop_smul_eq_smul (m • n) a, MulOpposite.unop_smul, smul_assoc]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝³ : SMul M α\ninst✝² : SMul M β\ninst✝¹ : SMul α β\ninst✝ : IsScalarTower M α β\ng : N → M\n⊢ Sort ?u.10323\n[PROOFSTEP]\nhaveI := comp α g\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝³ : SMul M α\ninst✝² : SMul M β\ninst✝¹ : SMul α β\ninst✝ : IsScalarTower M α β\ng : N → M\nthis : SMul N α\n⊢ Sort ?u.10323\n[PROOFSTEP]\nhaveI := comp β g\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝³ : SMul M α\ninst✝² : SMul M β\ninst✝¹ : SMul α β\ninst✝ : IsScalarTower M α β\ng : N → M\nthis✝ : SMul N α\nthis : SMul N β\n⊢ Sort ?u.10323\n[PROOFSTEP]\nexact IsScalarTower N α β\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁷ : SMul α β\ninst✝⁶ : SMul α γ\ninst✝⁵ : SMul β δ\ninst✝⁴ : SMul α δ\ninst✝³ : SMul γ δ\ninst✝² : IsScalarTower α β δ\ninst✝¹ : IsScalarTower α γ δ\ninst✝ : SMulCommClass β γ δ\na : α\nb : β\nc : γ\nd : δ\n⊢ (a • b) • c • d = (a • c) • b • d\n[PROOFSTEP]\nrw [smul_assoc, smul_assoc, smul_comm b]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝¹ : SMul M α\np : Prop\ninst✝ : Decidable p\na₁ a₂ : M\nb : α\n⊢ (if p then a₁ else a₂) • b = if p then a₁ • b else a₂ • b\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝¹ : SMul M α\np : Prop\ninst✝ : Decidable p\na₁ a₂ : M\nb : α\nh✝ : p\n⊢ a₁ • b = a₁ • b\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝¹ : SMul M α\np : Prop\ninst✝ : Decidable p\na₁ a₂ : M\nb : α\nh✝ : ¬p\n⊢ a₂ • b = a₂ • b\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝¹ : SMul M α\np : Prop\ninst✝ : Decidable p\na : M\nb₁ b₂ : α\n⊢ (a • if p then b₁ else b₂) = if p then a • b₁ else a • b₂\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝¹ : SMul M α\np : Prop\ninst✝ : Decidable p\na : M\nb₁ b₂ : α\nh✝ : p\n⊢ a • b₁ = a • b₁\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝¹ : SMul M α\np : Prop\ninst✝ : Decidable p\na : M\nb₁ b₂ : α\nh✝ : ¬p\n⊢ a • b₂ = a • b₂\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : SMul M β\nf : β → α\nhf : Injective f\nsmul : ∀ (c : M) (x : β), f (c • x) = c • f x\nc₁ c₂ : M\nx : β\n⊢ f ((c₁ * c₂) • x) = f (c₁ • c₂ • x)\n[PROOFSTEP]\nsimp only [smul, mul_smul]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : SMul M β\nf : α → β\nhf : Surjective f\nsmul : ∀ (c : M) (x : α), f (c • x) = c • f x\ny : β\n⊢ 1 • y = y\n[PROOFSTEP]\nrcases hf y with ⟨x, rfl⟩\n[GOAL]\ncase intro\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : SMul M β\nf : α → β\nhf : Surjective f\nsmul : ∀ (c : M) (x : α), f (c • x) = c • f x\nx : α\n⊢ 1 • f x = f x\n[PROOFSTEP]\nrw [← smul, one_smul]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : SMul M β\nf : α → β\nhf : Surjective f\nsmul : ∀ (c : M) (x : α), f (c • x) = c • f x\nc₁ c₂ : M\ny : β\n⊢ (c₁ * c₂) • y = c₁ • c₂ • y\n[PROOFSTEP]\nrcases hf y with ⟨x, rfl⟩\n[GOAL]\ncase intro\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : SMul M β\nf : α → β\nhf : Surjective f\nsmul : ∀ (c : M) (x : α), f (c • x) = c • f x\nc₁ c₂ : M\nx : α\n⊢ (c₁ * c₂) • f x = c₁ • c₂ • f x\n[PROOFSTEP]\nsimp only [← smul, mul_smul]\n[GOAL]\nM✝ : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁵ : Monoid M✝\ninst✝⁴ : MulAction M✝ α\nR : Type u_10\nS : Type u_11\nM : Type u_12\ninst✝³ : Monoid R\ninst✝² : MulAction R M\ninst✝¹ : Monoid S\ninst✝ : SMul S M\nf : R →* S\nhf : Surjective ↑f\nhsmul : ∀ (c : R) (x : M), ↑f c • x = c • x\nb : M\n⊢ 1 • b = b\n[PROOFSTEP]\nrw [← f.map_one, hsmul, one_smul]\n[GOAL]\nM✝ : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁵ : Monoid M✝\ninst✝⁴ : MulAction M✝ α\nR : Type u_10\nS : Type u_11\nM : Type u_12\ninst✝³ : Monoid R\ninst✝² : MulAction R M\ninst✝¹ : Monoid S\ninst✝ : SMul S M\nf : R →* S\nhf : Surjective ↑f\nhsmul : ∀ (c : R) (x : M), ↑f c • x = c • x\na b : R\nx : M\n⊢ (↑f a * ↑f b) • x = ↑f a • ↑f b • x\n[PROOFSTEP]\nsimp only [← f.map_mul, hsmul, mul_smul]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : Monoid M\ninst✝³ : MulAction M α\ninst✝² : Mul α\nr s : M\nx y : α\ninst✝¹ : IsScalarTower M α α\ninst✝ : SMulCommClass M α α\n⊢ r • x * s • y = (r * s) • (x * y)\n[PROOFSTEP]\nrw [smul_mul_assoc, mul_smul_comm, ← smul_assoc, smul_eq_mul]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝¹ : Monoid M\ninst✝ : MulAction M α\ny₁ y₂ : α\nH : (fun y x => x • y) y₁ = (fun y x => x • y) y₂\n⊢ 1 • y₁ = 1 • y₂\n[PROOFSTEP]\nconvert congr_fun H 1\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : Monoid N\ng : N →* M\nx✝ : α\n⊢ 1 • x✝ = x✝\n[PROOFSTEP]\nsimp [(· • ·)]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : Monoid N\ng : N →* M\nx✝ : α\n⊢ SMul.smul 1 x✝ = x✝\n[PROOFSTEP]\napply MulAction.one_smul\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : Monoid N\ng : N →* M\nx✝² x✝¹ : N\nx✝ : α\n⊢ (x✝² * x✝¹) • x✝ = x✝² • x✝¹ • x✝\n[PROOFSTEP]\nsimp [(· • ·)]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : Monoid N\ng : N →* M\nx✝² x✝¹ : N\nx✝ : α\n⊢ SMul.smul (↑g x✝² * ↑g x✝¹) x✝ = SMul.smul (↑g x✝²) (SMul.smul (↑g x✝¹) x✝)\n[PROOFSTEP]\napply MulAction.mul_smul\n[GOAL]\nM✝ : Type u_1\nN✝ : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\nM : Type u_10\nN : Type u_11\ninst✝⁴ : Monoid N\ninst✝³ : SMul M N\ninst✝² : MulAction N α\ninst✝¹ : SMul M α\ninst✝ : IsScalarTower M N α\nx : M\ny : α\n⊢ (x • 1) • y = x • y\n[PROOFSTEP]\nrw [smul_assoc, one_smul]\n[GOAL]\nM✝ : Type u_1\nN✝ : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\nM : Type u_10\nN : Type u_11\ninst✝² : MulOneClass N\ninst✝¹ : SMul M N\ninst✝ : IsScalarTower M N N\nx : M\ny : N\n⊢ x • 1 * y = x • y\n[PROOFSTEP]\nrw [smul_mul_assoc, one_mul]\n[GOAL]\nM✝ : Type u_1\nN✝ : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\nM : Type u_10\nN : Type u_11\ninst✝² : MulOneClass N\ninst✝¹ : SMul M N\ninst✝ : SMulCommClass M N N\nx : M\ny : N\n⊢ y * x • 1 = x • y\n[PROOFSTEP]\nrw [← smul_eq_mul, ← smul_comm, smul_eq_mul, mul_one]\n[GOAL]\nM✝ : Type u_1\nN✝ : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\nM : Type u_10\nN : Type u_11\ninst✝¹ : Monoid N\ninst✝ : SMul M N\nh : ∀ (x : M) (y : N), x • 1 * y = x • y\nx : M\ny z : N\n⊢ (x • y) • z = x • y • z\n[PROOFSTEP]\nrw [← h, smul_eq_mul, mul_assoc, h, smul_eq_mul]\n[GOAL]\nM✝ : Type u_1\nN✝ : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\nM : Type u_10\nN : Type u_11\ninst✝¹ : Monoid N\ninst✝ : SMul M N\nH : ∀ (x : M) (y : N), y * x • 1 = x • y\nx : M\ny z : N\n⊢ x • y • z = y • x • z\n[PROOFSTEP]\nrw [← H x z, smul_eq_mul, ← H, smul_eq_mul, mul_assoc]\n[GOAL]\nM✝ : Type u_1\nN✝ : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\nM : Type ?u.30564\nN : Type ?u.30567\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : MulAction M N\ninst✝ : IsScalarTower M N N\nx y : M\n⊢ OneHom.toFun { toFun := fun x => x • 1, map_one' := (_ : 1 • 1 = 1) } (x * y) =\n    OneHom.toFun { toFun := fun x => x • 1, map_one' := (_ : 1 • 1 = 1) } x *\n      OneHom.toFun { toFun := fun x => x • 1, map_one' := (_ : 1 • 1 = 1) } y\n[PROOFSTEP]\nrw [smul_one_mul, smul_smul]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝³ : Zero A\ninst✝² : SMulZeroClass M A\ninst✝¹ : Zero B\ninst✝ : SMul M B\nf : ZeroHom B A\nhf : Injective ↑f\nsmul : ∀ (c : M) (x : B), ↑f (c • x) = c • ↑f x\nc : M\n⊢ ↑f (c • 0) = ↑f 0\n[PROOFSTEP]\nsimp only [smul, map_zero, smul_zero]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝³ : Zero A\ninst✝² : SMulZeroClass M A\ninst✝¹ : Zero B\ninst✝ : SMul M B\nf : ZeroHom A B\nsmul : ∀ (c : M) (x : A), ↑f (c • x) = c • ↑f x\nc : M\n⊢ c • 0 = 0\n[PROOFSTEP]\nrw [← map_zero f, ← smul, smul_zero]\n[GOAL]\nM✝ : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : Zero A\ninst✝³ : SMulZeroClass M✝ A\nR : Type u_10\nS : Type u_11\nM : Type u_12\ninst✝² : Zero M\ninst✝¹ : SMulZeroClass R M\ninst✝ : SMul S M\nf : R → S\nhf : Surjective f\nhsmul : ∀ (c : R) (x : M), f c • x = c • x\nc : R\n⊢ f c • 0 = 0\n[PROOFSTEP]\nrw [hsmul, smul_zero]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : AddZeroClass A\ninst✝¹ : DistribSMul M A\ninst✝ : AddZeroClass B\nr : M\nf : B →+ A\n⊢ (fun a => r • ↑f a) 0 = 0\n[PROOFSTEP]\nsimp only [map_zero, smul_zero]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : AddZeroClass A\ninst✝¹ : DistribSMul M A\ninst✝ : AddZeroClass B\nr : M\nf : B →+ A\nx y : B\n⊢ ZeroHom.toFun { toFun := fun a => r • ↑f a, map_zero' := (_ : r • ↑f 0 = 0) } (x + y) =\n    ZeroHom.toFun { toFun := fun a => r • ↑f a, map_zero' := (_ : r • ↑f 0 = 0) } x +\n      ZeroHom.toFun { toFun := fun a => r • ↑f a, map_zero' := (_ : r • ↑f 0 = 0) } y\n[PROOFSTEP]\nsimp only [map_add, smul_add]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝³ : AddZeroClass A\ninst✝² : DistribSMul M A\ninst✝¹ : AddZeroClass B\ninst✝ : SMul M B\nf : B →+ A\nhf : Injective ↑f\nsmul : ∀ (c : M) (x : B), ↑f (c • x) = c • ↑f x\nsrc✝ : SMulZeroClass M B := Injective.smulZeroClass (↑f) hf smul\nc : M\nx y : B\n⊢ ↑f (c • (x + y)) = ↑f (c • x + c • y)\n[PROOFSTEP]\nsimp only [smul, map_add, smul_add]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝³ : AddZeroClass A\ninst✝² : DistribSMul M A\ninst✝¹ : AddZeroClass B\ninst✝ : SMul M B\nf : A →+ B\nhf : Surjective ↑f\nsmul : ∀ (c : M) (x : A), ↑f (c • x) = c • ↑f x\nsrc✝ : SMulZeroClass M B := ZeroHom.smulZeroClass (↑f) smul\nc : M\nx y : B\n⊢ c • (x + y) = c • x + c • y\n[PROOFSTEP]\nrcases hf x with ⟨x, rfl⟩\n[GOAL]\ncase intro\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝³ : AddZeroClass A\ninst✝² : DistribSMul M A\ninst✝¹ : AddZeroClass B\ninst✝ : SMul M B\nf : A →+ B\nhf : Surjective ↑f\nsmul : ∀ (c : M) (x : A), ↑f (c • x) = c • ↑f x\nsrc✝ : SMulZeroClass M B := ZeroHom.smulZeroClass (↑f) smul\nc : M\ny : B\nx : A\n⊢ c • (↑f x + y) = c • ↑f x + c • y\n[PROOFSTEP]\nrcases hf y with ⟨y, rfl⟩\n[GOAL]\ncase intro.intro\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝³ : AddZeroClass A\ninst✝² : DistribSMul M A\ninst✝¹ : AddZeroClass B\ninst✝ : SMul M B\nf : A →+ B\nhf : Surjective ↑f\nsmul : ∀ (c : M) (x : A), ↑f (c • x) = c • ↑f x\nsrc✝ : SMulZeroClass M B := ZeroHom.smulZeroClass (↑f) smul\nc : M\nx y : A\n⊢ c • (↑f x + ↑f y) = c • ↑f x + c • ↑f y\n[PROOFSTEP]\nsimp only [smul_add, ← smul, ← map_add]\n[GOAL]\nM✝ : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : AddZeroClass A\ninst✝³ : DistribSMul M✝ A\nR : Type u_10\nS : Type u_11\nM : Type u_12\ninst✝² : AddZeroClass M\ninst✝¹ : DistribSMul R M\ninst✝ : SMul S M\nf : R → S\nhf : Surjective f\nhsmul : ∀ (c : R) (x : M), f c • x = c • x\nsrc✝ : SMulZeroClass S M := smulZeroClassLeft f hf hsmul\nc : R\nx y : M\n⊢ f c • (x + y) = f c • x + f c • y\n[PROOFSTEP]\nsimp only [hsmul, smul_add]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : Monoid M\ninst✝¹ : AddGroup A\ninst✝ : DistribMulAction M A\nr : M\nx : A\n⊢ r • -x + r • x = 0\n[PROOFSTEP]\nrw [← smul_add, neg_add_self, smul_zero]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝² : Monoid M\ninst✝¹ : AddGroup A\ninst✝ : DistribMulAction M A\nr : M\nx y : A\n⊢ r • (x - y) = r • x - r • y\n[PROOFSTEP]\nrw [sub_eq_add_neg, sub_eq_add_neg, smul_add, smul_neg]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : Monoid M\ninst✝³ : Monoid A\ninst✝² : MulDistribMulAction M A\ninst✝¹ : Monoid B\ninst✝ : SMul M B\nf : B →* A\nhf : Injective ↑f\nsmul : ∀ (c : M) (x : B), ↑f (c • x) = c • ↑f x\nsrc✝ : MulAction M B := Injective.mulAction (↑f) hf smul\nc : M\nx y : B\n⊢ ↑f (c • (x * y)) = ↑f (c • x * c • y)\n[PROOFSTEP]\nsimp only [smul, f.map_mul, smul_mul']\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : Monoid M\ninst✝³ : Monoid A\ninst✝² : MulDistribMulAction M A\ninst✝¹ : Monoid B\ninst✝ : SMul M B\nf : B →* A\nhf : Injective ↑f\nsmul : ∀ (c : M) (x : B), ↑f (c • x) = c • ↑f x\nsrc✝ : MulAction M B := Injective.mulAction (↑f) hf smul\nc : M\n⊢ ↑f (c • 1) = ↑f 1\n[PROOFSTEP]\nsimp only [smul, f.map_one, smul_one]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : Monoid M\ninst✝³ : Monoid A\ninst✝² : MulDistribMulAction M A\ninst✝¹ : Monoid B\ninst✝ : SMul M B\nf : A →* B\nhf : Surjective ↑f\nsmul : ∀ (c : M) (x : A), ↑f (c • x) = c • ↑f x\nsrc✝ : MulAction M B := Surjective.mulAction (↑f) hf smul\nc : M\nx y : B\n⊢ c • (x * y) = c • x * c • y\n[PROOFSTEP]\nrcases hf x with ⟨x, rfl⟩\n[GOAL]\ncase intro\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : Monoid M\ninst✝³ : Monoid A\ninst✝² : MulDistribMulAction M A\ninst✝¹ : Monoid B\ninst✝ : SMul M B\nf : A →* B\nhf : Surjective ↑f\nsmul : ∀ (c : M) (x : A), ↑f (c • x) = c • ↑f x\nsrc✝ : MulAction M B := Surjective.mulAction (↑f) hf smul\nc : M\ny : B\nx : A\n⊢ c • (↑f x * y) = c • ↑f x * c • y\n[PROOFSTEP]\nrcases hf y with ⟨y, rfl⟩\n[GOAL]\ncase intro.intro\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : Monoid M\ninst✝³ : Monoid A\ninst✝² : MulDistribMulAction M A\ninst✝¹ : Monoid B\ninst✝ : SMul M B\nf : A →* B\nhf : Surjective ↑f\nsmul : ∀ (c : M) (x : A), ↑f (c • x) = c • ↑f x\nsrc✝ : MulAction M B := Surjective.mulAction (↑f) hf smul\nc : M\nx y : A\n⊢ c • (↑f x * ↑f y) = c • ↑f x * c • ↑f y\n[PROOFSTEP]\nsimp only [smul_mul', ← smul, ← f.map_mul]\n[GOAL]\nM : Type u_1\nN : Type u_2\nG : Type u_3\nA : Type u_4\nB : Type u_5\nα : Type u_6\nβ : Type u_7\nγ : Type u_8\nδ : Type u_9\ninst✝⁴ : Monoid M\ninst✝³ : Monoid A\ninst✝² : MulDistribMulAction M A\ninst✝¹ : Monoid B\ninst✝ : SMul M B\nf : A →* B\nhf : Surjective ↑f\nsmul : ∀ (c : M) (x : A), ↑f (c • x) = c • ↑f x\nsrc✝ : MulAction M B := Surjective.mulAction (↑f) hf smul\nc : M\n⊢ c • 1 = 1\n[PROOFSTEP]\nrw [← f.map_one, ← smul, smul_one]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.GroupAction.Defs", "llama_tokens": 11331, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850154599562, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.39133694568418426}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\n⊢ UnifIntegrable (f + g) p μ\n[PROOFSTEP]\nintro ε hε\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α),\n      MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s ((f + g) i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave hε2 : 0 < ε / 2 := half_pos hε\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\nε : ℝ\nhε : 0 < ε\nhε2 : 0 < ε / 2\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α),\n      MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s ((f + g) i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ₁, hδ₁_pos, hfδ₁⟩ := hf hε2\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\nε : ℝ\nhε : 0 < ε\nhε2 : 0 < ε / 2\nδ₁ : ℝ\nhδ₁_pos : 0 < δ₁\nhfδ₁ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α),\n      MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s ((f + g) i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ₂, hδ₂_pos, hgδ₂⟩ := hg hε2\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\nε : ℝ\nhε : 0 < ε\nhε2 : 0 < ε / 2\nδ₁ : ℝ\nhδ₁_pos : 0 < δ₁\nhfδ₁ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\nδ₂ : ℝ\nhδ₂_pos : 0 < δ₂\nhgδ₂ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (g i)) p μ ≤ ENNReal.ofReal (ε / 2)\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α),\n      MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s ((f + g) i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨min δ₁ δ₂, lt_min hδ₁_pos hδ₂_pos, fun i s hs hμs => _⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\nε : ℝ\nhε : 0 < ε\nhε2 : 0 < ε / 2\nδ₁ : ℝ\nhδ₁_pos : 0 < δ₁\nhfδ₁ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\nδ₂ : ℝ\nhδ₂_pos : 0 < δ₂\nhgδ₂ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (g i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\n⊢ snorm (indicator s ((f + g) i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimp_rw [Pi.add_apply, Set.indicator_add']\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\nε : ℝ\nhε : 0 < ε\nhε2 : 0 < ε / 2\nδ₁ : ℝ\nhδ₁_pos : 0 < δ₁\nhfδ₁ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\nδ₂ : ℝ\nhδ₂_pos : 0 < δ₂\nhgδ₂ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (g i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\n⊢ snorm (indicator s (f i) + indicator s (g i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' (snorm_add_le ((hf_meas i).indicator hs) ((hg_meas i).indicator hs) hp).trans _\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\nε : ℝ\nhε : 0 < ε\nhε2 : 0 < ε / 2\nδ₁ : ℝ\nhδ₁_pos : 0 < δ₁\nhfδ₁ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\nδ₂ : ℝ\nhδ₂_pos : 0 < δ₂\nhgδ₂ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (g i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\n⊢ snorm (indicator s (f i)) p μ + snorm (indicator s (g i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave hε_halves : ENNReal.ofReal ε = ENNReal.ofReal (ε / 2) + ENNReal.ofReal (ε / 2) := by\n  rw [← ENNReal.ofReal_add hε2.le hε2.le, add_halves]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\nε : ℝ\nhε : 0 < ε\nhε2 : 0 < ε / 2\nδ₁ : ℝ\nhδ₁_pos : 0 < δ₁\nhfδ₁ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\nδ₂ : ℝ\nhδ₂_pos : 0 < δ₂\nhgδ₂ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (g i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\n⊢ ENNReal.ofReal ε = ENNReal.ofReal (ε / 2) + ENNReal.ofReal (ε / 2)\n[PROOFSTEP]\nrw [← ENNReal.ofReal_add hε2.le hε2.le, add_halves]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\nε : ℝ\nhε : 0 < ε\nhε2 : 0 < ε / 2\nδ₁ : ℝ\nhδ₁_pos : 0 < δ₁\nhfδ₁ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\nδ₂ : ℝ\nhδ₂_pos : 0 < δ₂\nhgδ₂ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (g i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhε_halves : ENNReal.ofReal ε = ENNReal.ofReal (ε / 2) + ENNReal.ofReal (ε / 2)\n⊢ snorm (indicator s (f i)) p μ + snorm (indicator s (g i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [hε_halves]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\nε : ℝ\nhε : 0 < ε\nhε2 : 0 < ε / 2\nδ₁ : ℝ\nhδ₁_pos : 0 < δ₁\nhfδ₁ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\nδ₂ : ℝ\nhδ₂_pos : 0 < δ₂\nhgδ₂ :\n  ∀ (i : ι) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (g i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhε_halves : ENNReal.ofReal ε = ENNReal.ofReal (ε / 2) + ENNReal.ofReal (ε / 2)\n⊢ snorm (indicator s (f i)) p μ + snorm (indicator s (g i)) p μ ≤ ENNReal.ofReal (ε / 2) + ENNReal.ofReal (ε / 2)\n[PROOFSTEP]\nexact\n  add_le_add (hfδ₁ i s hs (hμs.trans (ENNReal.ofReal_le_ofReal (min_le_left _ _))))\n    (hgδ₂ i s hs (hμs.trans (ENNReal.ofReal_le_ofReal (min_le_right _ _))))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\n⊢ UnifIntegrable (-f) p μ\n[PROOFSTEP]\nsimp_rw [UnifIntegrable, Pi.neg_apply, Set.indicator_neg', snorm_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\n⊢ ∀ ⦃ε : ℝ⦄,\n    0 < ε →\n      ∃ δ h,\n        ∀ (i : ι) (s : Set α),\n          MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nexact hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\n⊢ UnifIntegrable (f - g) p μ\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhg : UnifIntegrable g p μ\nhp : 1 ≤ p\nhf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ\n⊢ UnifIntegrable (f + -g) p μ\n[PROOFSTEP]\nexact hf.add hg.neg hp hf_meas fun i => (hg_meas i).neg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhfg : ∀ (n : ι), f n =ᵐ[μ] g n\n⊢ UnifIntegrable g p μ\n[PROOFSTEP]\nintro ε hε\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhfg : ∀ (n : ι), f n =ᵐ[μ] g n\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (g i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ, hδ_pos, hfδ⟩ := hf hε\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhfg : ∀ (n : ι), f n =ᵐ[μ] g n\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ_pos : 0 < δ\nhfδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (g i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨δ, hδ_pos, fun n s hs hμs => (le_of_eq <| snorm_congr_ae _).trans (hfδ n s hs hμs)⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhfg : ∀ (n : ι), f n =ᵐ[μ] g n\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ_pos : 0 < δ\nhfδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ indicator s (g n) =ᵐ[μ] indicator s (f n)\n[PROOFSTEP]\nfilter_upwards [hfg n] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf g : ι → α → β\np : ℝ≥0∞\nhf : UnifIntegrable f p μ\nhfg : ∀ (n : ι), f n =ᵐ[μ] g n\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ_pos : 0 < δ\nhfδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\nx : α\nhx : f n x = g n x\n⊢ indicator s (g n) x = indicator s (f n) x\n[PROOFSTEP]\nsimp_rw [Set.indicator_apply, hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\ninst✝ : MeasurableSpace α\np : ℝ≥0∞\nf : ι → α → β\nε : ℝ\nx✝² : 0 < ε\ni : ι\ns : Set α\nx✝¹ : MeasurableSet s\nx✝ : ↑↑0 s ≤ ENNReal.ofReal 1\n⊢ snorm (indicator s (f i)) p 0 ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf : α → β\nx : α\n⊢ Tendsto (fun M => indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\n[PROOFSTEP]\nrefine' tendsto_atTop_of_eventually_const (i₀ := Nat.ceil (‖f x‖₊ : ℝ) + 1) fun n hn => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf : α → β\nx : α\nn : ℕ\nhn : n ≥ ⌈↑‖f x‖₊⌉₊ + 1\n⊢ indicator {x | ↑n ≤ ↑‖f x‖₊} f x = 0\n[PROOFSTEP]\nrw [Set.indicator_of_not_mem]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf : α → β\nx : α\nn : ℕ\nhn : n ≥ ⌈↑‖f x‖₊⌉₊ + 1\n⊢ ¬x ∈ {x | ↑n ≤ ↑‖f x‖₊}\n[PROOFSTEP]\nsimp only [not_le, Set.mem_setOf_eq]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf : α → β\nx : α\nn : ℕ\nhn : n ≥ ⌈↑‖f x‖₊⌉₊ + 1\n⊢ ↑‖f x‖₊ < ↑n\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (Nat.le_ceil _) _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf : α → β\nx : α\nn : ℕ\nhn : n ≥ ⌈↑‖f x‖₊⌉₊ + 1\n⊢ ↑⌈↑‖f x‖₊⌉₊ < ↑n\n[PROOFSTEP]\nrefine' lt_of_lt_of_le (lt_add_one _) _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf : α → β\nx : α\nn : ℕ\nhn : n ≥ ⌈↑‖f x‖₊⌉₊ + 1\n⊢ ↑⌈↑‖f x‖₊⌉₊ + 1 ≤ ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\n⊢ ∃ M, ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave htendsto : ∀ᵐ x ∂μ, Tendsto (fun M : ℕ => {x | (M : ℝ) ≤ ‖f x‖₊}.indicator f x) atTop (𝓝 0) :=\n  univ_mem' (id fun x => tendsto_indicator_ge f x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\n⊢ ∃ M, ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave hmeas : ∀ M : ℕ, AEStronglyMeasurable ({x | (M : ℝ) ≤ ‖f x‖₊}.indicator f) μ :=\n  by\n  intro M\n  apply hf.1.indicator\n  apply\n    StronglyMeasurable.measurableSet_le stronglyMeasurable_const\n      hmeas.nnnorm.measurable.coe_nnreal_real.stronglyMeasurable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\n⊢ ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\n[PROOFSTEP]\nintro M\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nM : ℕ\n⊢ AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\n[PROOFSTEP]\napply hf.1.indicator\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nM : ℕ\n⊢ MeasurableSet {x | ↑M ≤ ↑‖f x‖₊}\n[PROOFSTEP]\napply\n  StronglyMeasurable.measurableSet_le stronglyMeasurable_const\n    hmeas.nnnorm.measurable.coe_nnreal_real.stronglyMeasurable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\n⊢ ∃ M, ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave hbound : HasFiniteIntegral (fun x => ‖f x‖) μ :=\n  by\n  rw [memℒp_one_iff_integrable] at hf \n  exact hf.norm.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\n⊢ HasFiniteIntegral fun x => ‖f x‖\n[PROOFSTEP]\nrw [memℒp_one_iff_integrable] at hf \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Integrable f\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\n⊢ HasFiniteIntegral fun x => ‖f x‖\n[PROOFSTEP]\nexact hf.norm.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\n⊢ ∃ M, ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave : Tendsto (fun n : ℕ ↦ ∫⁻ a, ENNReal.ofReal ‖{x | n ≤ ‖f x‖₊}.indicator f a - 0‖ ∂μ) atTop (𝓝 0) :=\n  by\n  refine' tendsto_lintegral_norm_of_dominated_convergence hmeas hbound _ htendsto\n  refine' fun n => univ_mem' (id fun x => _)\n  by_cases hx : (n : ℝ) ≤ ‖f x‖\n  · dsimp\n    rwa [Set.indicator_of_mem]\n  · dsimp\n    rw [Set.indicator_of_not_mem, norm_zero]\n    · exact norm_nonneg _\n    · assumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\n⊢ Tendsto (fun n => ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a - 0‖ ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nrefine' tendsto_lintegral_norm_of_dominated_convergence hmeas hbound _ htendsto\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\n⊢ ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a‖ ≤ ‖f a‖\n[PROOFSTEP]\nrefine' fun n => univ_mem' (id fun x => _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nn : ℕ\nx : α\n⊢ x ∈ {x | (fun a => ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a‖ ≤ ‖f a‖) x}\n[PROOFSTEP]\nby_cases hx : (n : ℝ) ≤ ‖f x‖\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nn : ℕ\nx : α\nhx : ↑n ≤ ‖f x‖\n⊢ x ∈ {x | (fun a => ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a‖ ≤ ‖f a‖) x}\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nn : ℕ\nx : α\nhx : ↑n ≤ ‖f x‖\n⊢ ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f x‖ ≤ ‖f x‖\n[PROOFSTEP]\nrwa [Set.indicator_of_mem]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nn : ℕ\nx : α\nhx : ¬↑n ≤ ‖f x‖\n⊢ x ∈ {x | (fun a => ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a‖ ≤ ‖f a‖) x}\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nn : ℕ\nx : α\nhx : ¬↑n ≤ ‖f x‖\n⊢ ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f x‖ ≤ ‖f x‖\n[PROOFSTEP]\nrw [Set.indicator_of_not_mem, norm_zero]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nn : ℕ\nx : α\nhx : ¬↑n ≤ ‖f x‖\n⊢ 0 ≤ ‖f x‖\n[PROOFSTEP]\nexact norm_nonneg _\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nn : ℕ\nx : α\nhx : ¬↑n ≤ ‖f x‖\n⊢ ¬x ∈ {x | ↑n ≤ ‖f x‖₊}\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nthis : Tendsto (fun n => ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a - 0‖ ∂μ) atTop (𝓝 0)\n⊢ ∃ M, ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [ENNReal.tendsto_atTop_zero] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nthis :\n  ∀ (ε : ℝ≥0∞),\n    ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a - 0‖ ∂μ ≤ ε\n⊢ ∃ M, ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨M, hM⟩ := this (ENNReal.ofReal ε) (ENNReal.ofReal_pos.2 hε)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nthis :\n  ∀ (ε : ℝ≥0∞),\n    ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a - 0‖ ∂μ ≤ ε\nM : ℕ\nhM : ∀ (n : ℕ), n ≥ M → ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a - 0‖ ∂μ ≤ ENNReal.ofReal ε\n⊢ ∃ M, ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimp only [true_and_iff, ge_iff_le, zero_tsub, zero_le, sub_zero, zero_add, coe_nnnorm, Set.mem_Icc] at hM \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nthis :\n  ∀ (ε : ℝ≥0∞),\n    ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a - 0‖ ∂μ ≤ ε\nM : ℕ\nhM : ∀ (n : ℕ), M ≤ n → ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a‖ ∂μ ≤ ENNReal.ofReal ε\n⊢ ∃ M, ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨M, _⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nthis :\n  ∀ (ε : ℝ≥0∞),\n    ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a - 0‖ ∂μ ≤ ε\nM : ℕ\nhM : ∀ (n : ℕ), M ≤ n → ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a‖ ∂μ ≤ ENNReal.ofReal ε\n⊢ ∫⁻ (x : α), ↑‖Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nconvert hM M le_rfl\n[GOAL]\ncase h.e'_3.h.e'_4.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nthis :\n  ∀ (ε : ℝ≥0∞),\n    ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a - 0‖ ∂μ ≤ ε\nM : ℕ\nhM : ∀ (n : ℕ), M ≤ n → ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a‖ ∂μ ≤ ENNReal.ofReal ε\nx✝ : α\n⊢ ↑‖Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x✝‖₊ = ENNReal.ofReal ‖Set.indicator {x | ↑M ≤ ‖f x‖₊} f x✝‖\n[PROOFSTEP]\nsimp only [coe_nnnorm, ENNReal.ofReal_eq_coe_nnreal (norm_nonneg _)]\n[GOAL]\ncase h.e'_3.h.e'_4.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas✝ : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhtendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun M => Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f x) atTop (𝓝 0)\nhmeas : ∀ (M : ℕ), AEStronglyMeasurable (Set.indicator {x | ↑M ≤ ↑‖f x‖₊} f) μ\nhbound : HasFiniteIntegral fun x => ‖f x‖\nthis :\n  ∀ (ε : ℝ≥0∞),\n    ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a - 0‖ ∂μ ≤ ε\nM : ℕ\nhM : ∀ (n : ℕ), M ≤ n → ∫⁻ (a : α), ENNReal.ofReal ‖Set.indicator {x | ↑n ≤ ‖f x‖₊} f a‖ ∂μ ≤ ENNReal.ofReal ε\nx✝ : α\n⊢ ↑‖Set.indicator {x | ↑M ≤ ‖f x‖} f x✝‖₊ =\n    ↑{ val := ‖Set.indicator {x | ↑M ≤ ‖f x‖₊} f x✝‖, property := (_ : 0 ≤ ‖Set.indicator {x | ↑M ≤ ‖f x‖₊} f x✝‖) }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhM : ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n⊢ ∫⁻ (x : α), ↑‖Set.indicator {x | max M 0 ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nε : ℝ\nhε : 0 < ε\n⊢ ∃ M, 0 ≤ M ∧ ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave hf_mk : Memℒp (hf.1.mk f) 1 μ := (memℒp_congr_ae hf.1.ae_eq_mk).mp hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nε : ℝ\nhε : 0 < ε\nhf_mk : Memℒp (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)) 1\n⊢ ∃ M, 0 ≤ M ∧ ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨M, hM_pos, hfM⟩ := hf_mk.integral_indicator_norm_ge_nonneg_le_of_meas μ hf.1.stronglyMeasurable_mk hε\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nε : ℝ\nhε : 0 < ε\nhf_mk : Memℒp (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)) 1\nM : ℝ\nhM_pos : 0 ≤ M\nhfM :\n  ∫⁻ (x : α),\n      ↑‖Set.indicator {x | M ≤ ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊}\n            (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)) x‖₊ ∂μ ≤\n    ENNReal.ofReal ε\n⊢ ∃ M, 0 ≤ M ∧ ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨M, hM_pos, (le_of_eq _).trans hfM⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nε : ℝ\nhε : 0 < ε\nhf_mk : Memℒp (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)) 1\nM : ℝ\nhM_pos : 0 ≤ M\nhfM :\n  ∫⁻ (x : α),\n      ↑‖Set.indicator {x | M ≤ ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊}\n            (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)) x‖₊ ∂μ ≤\n    ENNReal.ofReal ε\n⊢ ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ ∂μ =\n    ∫⁻ (x : α),\n      ↑‖Set.indicator {x | M ≤ ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊}\n            (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)) x‖₊ ∂μ\n[PROOFSTEP]\nrefine' lintegral_congr_ae _\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nε : ℝ\nhε : 0 < ε\nhf_mk : Memℒp (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)) 1\nM : ℝ\nhM_pos : 0 ≤ M\nhfM :\n  ∫⁻ (x : α),\n      ↑‖Set.indicator {x | M ≤ ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊}\n            (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)) x‖₊ ∂μ ≤\n    ENNReal.ofReal ε\n⊢ (fun x => ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊) =ᵐ[μ] fun x =>\n    ↑‖Set.indicator {x | M ≤ ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊}\n          (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)) x‖₊\n[PROOFSTEP]\nfilter_upwards [hf.1.ae_eq_mk] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f 1\nε : ℝ\nhε : 0 < ε\nhf_mk : Memℒp (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)) 1\nM : ℝ\nhM_pos : 0 ≤ M\nhfM :\n  ∫⁻ (x : α),\n      ↑‖Set.indicator {x | M ≤ ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊}\n            (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)) x‖₊ ∂μ ≤\n    ENNReal.ofReal ε\nx : α\nhx : f x = AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x\n⊢ ↑‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖₊ =\n    ↑‖Set.indicator {x | M ≤ ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊}\n          (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)) x‖₊\n[PROOFSTEP]\nsimp only [Set.indicator_apply, coe_nnnorm, Set.mem_setOf_eq, ENNReal.coe_eq_coe, hx.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\n⊢ ∃ M, snormEssSup (Set.indicator {x | M ≤ ↑‖f x‖₊} f) μ = 0\n[PROOFSTEP]\nhave hbdd : snormEssSup f μ < ∞ := hf.snorm_lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\n⊢ ∃ M, snormEssSup (Set.indicator {x | M ≤ ↑‖f x‖₊} f) μ = 0\n[PROOFSTEP]\nrefine' ⟨(snorm f ∞ μ + 1).toReal, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\n⊢ snormEssSup (Set.indicator {x | ENNReal.toReal (snorm f ⊤ μ + 1) ≤ ↑‖f x‖₊} f) μ = 0\n[PROOFSTEP]\nrw [snormEssSup_indicator_eq_snormEssSup_restrict]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\n⊢ snormEssSup f (Measure.restrict μ {x | ENNReal.toReal (snorm f ⊤ μ + 1) ≤ ↑‖f x‖₊}) = 0\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\n⊢ MeasurableSet {x | ENNReal.toReal (snorm f ⊤ μ + 1) ≤ ↑‖f x‖₊}\n[PROOFSTEP]\nhave : μ.restrict {x : α | (snorm f ⊤ μ + 1).toReal ≤ ‖f x‖₊} = 0 :=\n  by\n  simp only [coe_nnnorm, snorm_exponent_top, Measure.restrict_eq_zero]\n  have : {x : α | (snormEssSup f μ + 1).toReal ≤ ‖f x‖} ⊆ {x : α | snormEssSup f μ < ‖f x‖₊} :=\n    by\n    intro x hx\n    rw [Set.mem_setOf_eq, ← ENNReal.toReal_lt_toReal hbdd.ne ENNReal.coe_lt_top.ne, ENNReal.coe_toReal, coe_nnnorm]\n    refine' lt_of_lt_of_le _ hx\n    rw [ENNReal.toReal_lt_toReal hbdd.ne]\n    · exact ENNReal.lt_add_right hbdd.ne one_ne_zero\n    · exact (ENNReal.add_lt_top.2 ⟨hbdd, ENNReal.one_lt_top⟩).ne\n  rw [← nonpos_iff_eq_zero]\n  refine' (measure_mono this).trans _\n  have hle := coe_nnnorm_ae_le_snormEssSup f μ\n  simp_rw [ae_iff, not_le] at hle \n  exact nonpos_iff_eq_zero.2 hle\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\n⊢ Measure.restrict μ {x | ENNReal.toReal (snorm f ⊤ μ + 1) ≤ ↑‖f x‖₊} = 0\n[PROOFSTEP]\nsimp only [coe_nnnorm, snorm_exponent_top, Measure.restrict_eq_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\n⊢ ↑↑μ {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖} = 0\n[PROOFSTEP]\nhave : {x : α | (snormEssSup f μ + 1).toReal ≤ ‖f x‖} ⊆ {x : α | snormEssSup f μ < ‖f x‖₊} :=\n  by\n  intro x hx\n  rw [Set.mem_setOf_eq, ← ENNReal.toReal_lt_toReal hbdd.ne ENNReal.coe_lt_top.ne, ENNReal.coe_toReal, coe_nnnorm]\n  refine' lt_of_lt_of_le _ hx\n  rw [ENNReal.toReal_lt_toReal hbdd.ne]\n  · exact ENNReal.lt_add_right hbdd.ne one_ne_zero\n  · exact (ENNReal.add_lt_top.2 ⟨hbdd, ENNReal.one_lt_top⟩).ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\n⊢ {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖} ⊆ {x | snormEssSup f μ < ↑‖f x‖₊}\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\nx : α\nhx : x ∈ {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖}\n⊢ x ∈ {x | snormEssSup f μ < ↑‖f x‖₊}\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, ← ENNReal.toReal_lt_toReal hbdd.ne ENNReal.coe_lt_top.ne, ENNReal.coe_toReal, coe_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\nx : α\nhx : x ∈ {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖}\n⊢ ENNReal.toReal (snormEssSup f μ) < ‖f x‖\n[PROOFSTEP]\nrefine' lt_of_lt_of_le _ hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\nx : α\nhx : x ∈ {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖}\n⊢ ENNReal.toReal (snormEssSup f μ) < ENNReal.toReal (snormEssSup f μ + 1)\n[PROOFSTEP]\nrw [ENNReal.toReal_lt_toReal hbdd.ne]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\nx : α\nhx : x ∈ {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖}\n⊢ snormEssSup f μ < snormEssSup f μ + 1\n[PROOFSTEP]\nexact ENNReal.lt_add_right hbdd.ne one_ne_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\nx : α\nhx : x ∈ {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖}\n⊢ snormEssSup f μ + 1 ≠ ⊤\n[PROOFSTEP]\nexact (ENNReal.add_lt_top.2 ⟨hbdd, ENNReal.one_lt_top⟩).ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\nthis : {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖} ⊆ {x | snormEssSup f μ < ↑‖f x‖₊}\n⊢ ↑↑μ {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖} = 0\n[PROOFSTEP]\nrw [← nonpos_iff_eq_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\nthis : {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖} ⊆ {x | snormEssSup f μ < ↑‖f x‖₊}\n⊢ ↑↑μ {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖} ≤ 0\n[PROOFSTEP]\nrefine' (measure_mono this).trans _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\nthis : {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖} ⊆ {x | snormEssSup f μ < ↑‖f x‖₊}\n⊢ ↑↑μ {x | snormEssSup f μ < ↑‖f x‖₊} ≤ 0\n[PROOFSTEP]\nhave hle := coe_nnnorm_ae_le_snormEssSup f μ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\nthis : {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖} ⊆ {x | snormEssSup f μ < ↑‖f x‖₊}\nhle : ∀ᵐ (x : α) ∂μ, ↑‖f x‖₊ ≤ snormEssSup f μ\n⊢ ↑↑μ {x | snormEssSup f μ < ↑‖f x‖₊} ≤ 0\n[PROOFSTEP]\nsimp_rw [ae_iff, not_le] at hle \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\nthis : {x | ENNReal.toReal (snormEssSup f μ + 1) ≤ ‖f x‖} ⊆ {x | snormEssSup f μ < ↑‖f x‖₊}\nhle : ↑↑μ {a | snormEssSup f μ < ↑‖f a‖₊} = 0\n⊢ ↑↑μ {x | snormEssSup f μ < ↑‖f x‖₊} ≤ 0\n[PROOFSTEP]\nexact nonpos_iff_eq_zero.2 hle\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\nthis : Measure.restrict μ {x | ENNReal.toReal (snorm f ⊤ μ + 1) ≤ ↑‖f x‖₊} = 0\n⊢ snormEssSup f (Measure.restrict μ {x | ENNReal.toReal (snorm f ⊤ μ + 1) ≤ ↑‖f x‖₊}) = 0\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\n⊢ MeasurableSet {x | ENNReal.toReal (snorm f ⊤ μ + 1) ≤ ↑‖f x‖₊}\n[PROOFSTEP]\nrw [this, snormEssSup_measure_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f ⊤\nhmeas : StronglyMeasurable f\nhbdd : snormEssSup f μ < ⊤\n⊢ MeasurableSet {x | ENNReal.toReal (snorm f ⊤ μ + 1) ≤ ↑‖f x‖₊}\n[PROOFSTEP]\nexact measurableSet_le measurable_const hmeas.nnnorm.measurable.subtype_coe\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\n⊢ ∃ M, snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nby_cases hp_ne_zero : p = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : p = 0\n⊢ ∃ M, snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨1, hp_ne_zero.symm ▸ _⟩\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : p = 0\n⊢ snorm (Set.indicator {x | 1 ≤ ↑‖f x‖₊} f) 0 μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimp [snorm_exponent_zero]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\n⊢ ∃ M, snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nby_cases hp_ne_top : p = ∞\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : p = ⊤\n⊢ ∃ M, snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsubst hp_ne_top\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf : α → β\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhf : Memℒp f ⊤\nhp_ne_zero : ¬⊤ = 0\n⊢ ∃ M, snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) ⊤ μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨M, hM⟩ := hf.snormEssSup_indicator_norm_ge_eq_zero μ hmeas\n[GOAL]\ncase pos.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf : α → β\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhf : Memℒp f ⊤\nhp_ne_zero : ¬⊤ = 0\nM : ℝ\nhM : snormEssSup (Set.indicator {x | M ≤ ↑‖f x‖₊} f) μ = 0\n⊢ ∃ M, snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) ⊤ μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨M, _⟩\n[GOAL]\ncase pos.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\nf : α → β\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhf : Memℒp f ⊤\nhp_ne_zero : ¬⊤ = 0\nM : ℝ\nhM : snormEssSup (Set.indicator {x | M ≤ ↑‖f x‖₊} f) μ = 0\n⊢ snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) ⊤ μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimp only [snorm_exponent_top, hM, zero_le]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\n⊢ ∃ M, snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨M, hM', hM⟩ :=\n  Memℒp.integral_indicator_norm_ge_nonneg_le (μ := μ) (hf.norm_rpow hp_ne_zero hp_ne_top)\n    (Real.rpow_pos_of_pos hε p.toReal)\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\n⊢ ∃ M, snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨M ^ (1 / p.toReal), _⟩\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\n⊢ snorm (Set.indicator {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [snorm_eq_lintegral_rpow_nnnorm hp_ne_zero hp_ne_top, ← ENNReal.rpow_one (ENNReal.ofReal ε)]\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\n⊢ (∫⁻ (x : α), ↑‖Set.indicator {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊} f x‖₊ ^ ENNReal.toReal p ∂μ) ^\n      (1 / ENNReal.toReal p) ≤\n    ENNReal.ofReal ε ^ 1\n[PROOFSTEP]\nconv_rhs => rw [← mul_one_div_cancel (ENNReal.toReal_pos hp_ne_zero hp_ne_top).ne.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\n| ENNReal.ofReal ε ^ 1\n[PROOFSTEP]\nrw [← mul_one_div_cancel (ENNReal.toReal_pos hp_ne_zero hp_ne_top).ne.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\n| ENNReal.ofReal ε ^ 1\n[PROOFSTEP]\nrw [← mul_one_div_cancel (ENNReal.toReal_pos hp_ne_zero hp_ne_top).ne.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\n| ENNReal.ofReal ε ^ 1\n[PROOFSTEP]\nrw [← mul_one_div_cancel (ENNReal.toReal_pos hp_ne_zero hp_ne_top).ne.symm]\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\n⊢ (∫⁻ (x : α), ↑‖Set.indicator {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊} f x‖₊ ^ ENNReal.toReal p ∂μ) ^\n      (1 / ENNReal.toReal p) ≤\n    ENNReal.ofReal ε ^ (ENNReal.toReal p * (1 / ENNReal.toReal p))\n[PROOFSTEP]\nrw [ENNReal.rpow_mul, ENNReal.rpow_le_rpow_iff (one_div_pos.2 <| ENNReal.toReal_pos hp_ne_zero hp_ne_top),\n  ENNReal.ofReal_rpow_of_pos hε]\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\n⊢ ∫⁻ (x : α), ↑‖Set.indicator {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊} f x‖₊ ^ ENNReal.toReal p ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\n[PROOFSTEP]\nconvert hM\n[GOAL]\ncase h.e'_3.h.e'_4.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx✝ : α\n⊢ ↑‖Set.indicator {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊} f x✝‖₊ ^ ENNReal.toReal p =\n    ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x✝‖₊\n[PROOFSTEP]\nrename_i x\n[GOAL]\ncase h.e'_3.h.e'_4.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\n⊢ ↑‖Set.indicator {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊} f x‖₊ ^ ENNReal.toReal p =\n    ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊\n[PROOFSTEP]\nrw [ENNReal.coe_rpow_of_nonneg _ ENNReal.toReal_nonneg, nnnorm_indicator_eq_indicator_nnnorm,\n  nnnorm_indicator_eq_indicator_nnnorm]\n[GOAL]\ncase h.e'_3.h.e'_4.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\n⊢ ↑(Set.indicator {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊} (fun a => ‖f a‖₊) x ^ ENNReal.toReal p) =\n    ↑(Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun a => ‖‖f a‖ ^ ENNReal.toReal p‖₊) x)\n[PROOFSTEP]\nhave hiff : M ^ (1 / p.toReal) ≤ ‖f x‖₊ ↔ M ≤ ‖‖f x‖ ^ p.toReal‖₊ := by\n  rw [coe_nnnorm, coe_nnnorm, Real.norm_rpow_of_nonneg (norm_nonneg _), norm_norm, ←\n    Real.rpow_le_rpow_iff hM' (Real.rpow_nonneg_of_nonneg (norm_nonneg _) _)\n      (one_div_pos.2 <| ENNReal.toReal_pos hp_ne_zero hp_ne_top),\n    ← Real.rpow_mul (norm_nonneg _), mul_one_div_cancel (ENNReal.toReal_pos hp_ne_zero hp_ne_top).ne.symm,\n    Real.rpow_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\n⊢ M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊ ↔ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\n[PROOFSTEP]\nrw [coe_nnnorm, coe_nnnorm, Real.norm_rpow_of_nonneg (norm_nonneg _), norm_norm, ←\n  Real.rpow_le_rpow_iff hM' (Real.rpow_nonneg_of_nonneg (norm_nonneg _) _)\n    (one_div_pos.2 <| ENNReal.toReal_pos hp_ne_zero hp_ne_top),\n  ← Real.rpow_mul (norm_nonneg _), mul_one_div_cancel (ENNReal.toReal_pos hp_ne_zero hp_ne_top).ne.symm, Real.rpow_one]\n[GOAL]\ncase h.e'_3.h.e'_4.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\nhiff : M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊ ↔ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\n⊢ ↑(Set.indicator {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊} (fun a => ‖f a‖₊) x ^ ENNReal.toReal p) =\n    ↑(Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun a => ‖‖f a‖ ^ ENNReal.toReal p‖₊) x)\n[PROOFSTEP]\nby_cases hx : x ∈ {x : α | M ^ (1 / p.toReal) ≤ ‖f x‖₊}\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\nhiff : M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊ ↔ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\nhx : x ∈ {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊}\n⊢ ↑(Set.indicator {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊} (fun a => ‖f a‖₊) x ^ ENNReal.toReal p) =\n    ↑(Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun a => ‖‖f a‖ ^ ENNReal.toReal p‖₊) x)\n[PROOFSTEP]\nrw [Set.indicator_of_mem hx, Set.indicator_of_mem, Real.nnnorm_of_nonneg]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\nhiff : M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊ ↔ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\nhx : x ∈ {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊}\n⊢ ↑(‖f x‖₊ ^ ENNReal.toReal p) = ↑{ val := ‖f x‖ ^ ENNReal.toReal p, property := ?pos✝ }\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\nhiff : M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊ ↔ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\nhx : x ∈ {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊}\n⊢ 0 ≤ ‖f x‖ ^ ENNReal.toReal p\ncase pos.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\nhiff : M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊ ↔ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\nhx : x ∈ {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊}\n⊢ x ∈ {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊}\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\nhiff : M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊ ↔ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\nhx : x ∈ {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊}\n⊢ x ∈ {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊}\n[PROOFSTEP]\nrw [Set.mem_setOf_eq]\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\nhiff : M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊ ↔ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\nhx : x ∈ {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊}\n⊢ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\n[PROOFSTEP]\nrwa [← hiff]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\nhiff : M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊ ↔ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\nhx : ¬x ∈ {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊}\n⊢ ↑(Set.indicator {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊} (fun a => ‖f a‖₊) x ^ ENNReal.toReal p) =\n    ↑(Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun a => ‖‖f a‖ ^ ENNReal.toReal p‖₊) x)\n[PROOFSTEP]\nrw [Set.indicator_of_not_mem hx, Set.indicator_of_not_mem]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\nhiff : M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊ ↔ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\nhx : ¬x ∈ {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊}\n⊢ ↑(0 ^ ENNReal.toReal p) = ↑0\n[PROOFSTEP]\nsimp [(ENNReal.toReal_pos hp_ne_zero hp_ne_top).ne.symm]\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\nhiff : M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊ ↔ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\nhx : ¬x ∈ {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊}\n⊢ ¬x ∈ {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊}\n[PROOFSTEP]\nrw [Set.mem_setOf_eq]\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nhp_ne_zero : ¬p = 0\nhp_ne_top : ¬p = ⊤\nM : ℝ\nhM' : 0 ≤ M\nhM :\n  ∫⁻ (x : α), ↑‖Set.indicator {x | M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊} (fun x => ‖f x‖ ^ ENNReal.toReal p) x‖₊ ∂μ ≤\n    ENNReal.ofReal (ε ^ ENNReal.toReal p)\nx : α\nhiff : M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊ ↔ M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\nhx : ¬x ∈ {x | M ^ (1 / ENNReal.toReal p) ≤ ↑‖f x‖₊}\n⊢ ¬M ≤ ↑‖‖f x‖ ^ ENNReal.toReal p‖₊\n[PROOFSTEP]\nrwa [← hiff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\n⊢ ∃ M, 0 < M ∧ snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨M, hM⟩ := hf.snorm_indicator_norm_ge_le μ hmeas hε\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ M, 0 < M ∧ snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨max M 1, lt_of_lt_of_le zero_lt_one (le_max_right _ _), le_trans (snorm_mono fun x => _) hM⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nx : α\n⊢ ‖Set.indicator {x | max M 1 ≤ ↑‖f x‖₊} f x‖ ≤ ‖Set.indicator {x | M ≤ ↑‖f x‖₊} f x‖\n[PROOFSTEP]\nrw [norm_indicator_eq_indicator_norm, norm_indicator_eq_indicator_norm]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nx : α\n⊢ Set.indicator {x | max M 1 ≤ ↑‖f x‖₊} (fun a => ‖f a‖) x ≤ Set.indicator {x | M ≤ ↑‖f x‖₊} (fun a => ‖f a‖) x\n[PROOFSTEP]\nrefine' Set.indicator_le_indicator_of_subset (fun x hx => _) (fun x => norm_nonneg (f x)) x\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nx✝ x : α\nhx : x ∈ {x | max M 1 ≤ ↑‖f x‖₊}\n⊢ x ∈ {x | M ≤ ↑‖f x‖₊}\n[PROOFSTEP]\nrw [Set.mem_setOf_eq] at hx \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nx✝ x : α\nhx : max M 1 ≤ ↑‖f x‖₊\n⊢ x ∈ {x | M ≤ ↑‖f x‖₊}\n[PROOFSTEP]\nexact (max_le_iff.1 hx).1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\n⊢ ∃ δ hδ, ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nby_cases hM : M ≤ 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : M ≤ 0\n⊢ ∃ δ hδ, ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨1, zero_lt_one, fun s _ _ => _⟩\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : M ≤ 0\ns : Set α\nx✝¹ : MeasurableSet s\nx✝ : ↑↑μ s ≤ ENNReal.ofReal 1\n⊢ snorm (indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [(_ : f = 0)]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : M ≤ 0\ns : Set α\nx✝¹ : MeasurableSet s\nx✝ : ↑↑μ s ≤ ENNReal.ofReal 1\n⊢ snorm (indicator s 0) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimp [hε.le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : M ≤ 0\ns : Set α\nx✝¹ : MeasurableSet s\nx✝ : ↑↑μ s ≤ ENNReal.ofReal 1\n⊢ f = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : M ≤ 0\ns : Set α\nx✝¹ : MeasurableSet s\nx✝ : ↑↑μ s ≤ ENNReal.ofReal 1\nx : α\n⊢ f x = OfNat.ofNat 0 x\n[PROOFSTEP]\nrw [Pi.zero_apply, ← norm_le_zero_iff]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : M ≤ 0\ns : Set α\nx✝¹ : MeasurableSet s\nx✝ : ↑↑μ s ≤ ENNReal.ofReal 1\nx : α\n⊢ ‖f x‖ ≤ 0\n[PROOFSTEP]\nexact (lt_of_lt_of_le (hf x) hM).le\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : ¬M ≤ 0\n⊢ ∃ δ hδ, ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [not_le] at hM \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\n⊢ ∃ δ hδ, ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨(ε / M) ^ p.toReal, Real.rpow_pos_of_pos (div_pos hε hM) _, fun s hs hμ => _⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\ns : Set α\nhs : MeasurableSet s\nhμ : ↑↑μ s ≤ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p)\n⊢ snorm (indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\ns : Set α\nhs : MeasurableSet s\nhμ : ↑↑μ s ≤ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p)\nhp : p = 0\n⊢ snorm (indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\ns : Set α\nhs : MeasurableSet s\nhμ : ↑↑μ s ≤ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p)\nhp : ¬p = 0\n⊢ snorm (indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [snorm_indicator_eq_snorm_restrict hs]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\ns : Set α\nhs : MeasurableSet s\nhμ : ↑↑μ s ≤ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p)\nhp : ¬p = 0\n⊢ snorm f p (Measure.restrict μ s) ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave haebdd : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ M := by\n  filter_upwards\n  exact fun x => (hf x).le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\ns : Set α\nhs : MeasurableSet s\nhμ : ↑↑μ s ≤ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p)\nhp : ¬p = 0\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ M\n[PROOFSTEP]\nfilter_upwards\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\ns : Set α\nhs : MeasurableSet s\nhμ : ↑↑μ s ≤ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p)\nhp : ¬p = 0\n⊢ ∀ (a : α), ‖f a‖ ≤ M\n[PROOFSTEP]\nexact fun x => (hf x).le\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\ns : Set α\nhs : MeasurableSet s\nhμ : ↑↑μ s ≤ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p)\nhp : ¬p = 0\nhaebdd : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ M\n⊢ snorm f p (Measure.restrict μ s) ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' le_trans (snorm_le_of_ae_bound haebdd) _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\ns : Set α\nhs : MeasurableSet s\nhμ : ↑↑μ s ≤ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p)\nhp : ¬p = 0\nhaebdd : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ M\n⊢ ↑↑(Measure.restrict μ s) univ ^ (ENNReal.toReal p)⁻¹ * ENNReal.ofReal M ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [Measure.restrict_apply MeasurableSet.univ, Set.univ_inter, ←\n  ENNReal.le_div_iff_mul_le (Or.inl _) (Or.inl ENNReal.ofReal_ne_top)]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\ns : Set α\nhs : MeasurableSet s\nhμ : ↑↑μ s ≤ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p)\nhp : ¬p = 0\nhaebdd : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ M\n⊢ ↑↑μ s ^ (ENNReal.toReal p)⁻¹ ≤ ENNReal.ofReal ε / ENNReal.ofReal M\n[PROOFSTEP]\nrw [← one_div, ENNReal.rpow_one_div_le_iff (ENNReal.toReal_pos hp hp_top)]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\ns : Set α\nhs : MeasurableSet s\nhμ : ↑↑μ s ≤ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p)\nhp : ¬p = 0\nhaebdd : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ M\n⊢ ↑↑μ s ≤ (ENNReal.ofReal ε / ENNReal.ofReal M) ^ ENNReal.toReal p\n[PROOFSTEP]\nrefine' le_trans hμ _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\ns : Set α\nhs : MeasurableSet s\nhμ : ↑↑μ s ≤ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p)\nhp : ¬p = 0\nhaebdd : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ M\n⊢ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p) ≤ (ENNReal.ofReal ε / ENNReal.ofReal M) ^ ENNReal.toReal p\n[PROOFSTEP]\nrw [← ENNReal.ofReal_rpow_of_pos (div_pos hε hM), ENNReal.rpow_le_rpow_iff (ENNReal.toReal_pos hp hp_top),\n  ENNReal.ofReal_div_of_pos hM]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhf : ∀ (x : α), ‖f x‖ < M\nhM : 0 < M\ns : Set α\nhs : MeasurableSet s\nhμ : ↑↑μ s ≤ ENNReal.ofReal ((ε / M) ^ ENNReal.toReal p)\nhp : ¬p = 0\nhaebdd : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ M\n⊢ ENNReal.ofReal M ≠ 0\n[PROOFSTEP]\nsimpa only [ENNReal.ofReal_eq_zero, not_le, Ne.def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ hδ,\n    ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ 2 * ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨M, hMpos, hM⟩ := hf.snorm_indicator_norm_ge_pos_le μ hmeas hε\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ δ hδ,\n    ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ 2 * ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ, hδpos, hδ⟩ :=\n  snorm_indicator_le_of_bound μ (f := {x | ‖f x‖ < M}.indicator f) hp_top hε\n    (by\n      intro x\n      rw [norm_indicator_eq_indicator_norm, Set.indicator_apply]\n      split_ifs with h\n      exacts [h, hMpos])\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n⊢ ∀ (x : α), ‖Set.indicator {x | ‖f x‖ < M} f x‖ < ?m.135727\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nx : α\n⊢ ‖Set.indicator {x | ‖f x‖ < M} f x‖ < ?m.135727\n[PROOFSTEP]\nrw [norm_indicator_eq_indicator_norm, Set.indicator_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nx : α\n⊢ (if x ∈ {x | ‖f x‖ < M} then ‖f x‖ else 0) < ?m.135727\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n⊢ ℝ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n⊢ ℝ\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nx : α\nh : x ∈ {x | ‖f x‖ < M}\n⊢ ‖f x‖ < ?m.135727\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nx : α\nh : ¬x ∈ {x | ‖f x‖ < M}\n⊢ 0 < ?m.135727\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n⊢ ℝ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\n⊢ ℝ\n[PROOFSTEP]\nexacts [h, hMpos]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ δ hδ,\n    ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ 2 * ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨δ, hδpos, fun s hs hμs => _⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (Set.indicator s f) p μ ≤ 2 * ENNReal.ofReal ε\n[PROOFSTEP]\nrw [(_ : f = {x : α | M ≤ ‖f x‖₊}.indicator f + {x : α | ‖f x‖ < M}.indicator f)]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (Set.indicator s (Set.indicator {x | M ≤ ↑‖f x‖₊} f + Set.indicator {x | ‖f x‖ < M} f)) p μ ≤\n    2 * ENNReal.ofReal ε\n[PROOFSTEP]\nrw [snorm_indicator_eq_snorm_restrict hs]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f + Set.indicator {x | ‖f x‖ < M} f) p (Measure.restrict μ s) ≤\n    2 * ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' le_trans (snorm_add_le _ _ hp_one) _\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ AEStronglyMeasurable (Set.indicator {x | M ≤ ↑‖f x‖₊} f) (Measure.restrict μ s)\n[PROOFSTEP]\nexact\n  StronglyMeasurable.aestronglyMeasurable\n    (hmeas.indicator (measurableSet_le measurable_const hmeas.nnnorm.measurable.subtype_coe))\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ AEStronglyMeasurable (Set.indicator {x | ‖f x‖ < M} f) (Measure.restrict μ s)\n[PROOFSTEP]\nexact\n  StronglyMeasurable.aestronglyMeasurable\n    (hmeas.indicator (measurableSet_lt hmeas.nnnorm.measurable.subtype_coe measurable_const))\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p (Measure.restrict μ s) +\n      snorm (Set.indicator {x | ‖f x‖ < M} f) p (Measure.restrict μ s) ≤\n    2 * ENNReal.ofReal ε\n[PROOFSTEP]\nrw [two_mul]\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p (Measure.restrict μ s) +\n      snorm (Set.indicator {x | ‖f x‖ < M} f) p (Measure.restrict μ s) ≤\n    ENNReal.ofReal ε + ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' add_le_add (le_trans (snorm_mono_measure _ Measure.restrict_le_self) hM) _\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (Set.indicator {x | ‖f x‖ < M} f) p (Measure.restrict μ s) ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [← snorm_indicator_eq_snorm_restrict hs]\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nexact hδ s hs hμs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ f = Set.indicator {x | M ≤ ↑‖f x‖₊} f + Set.indicator {x | ‖f x‖ < M} f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\nx : α\n⊢ f x = (Set.indicator {x | M ≤ ↑‖f x‖₊} f + Set.indicator {x | ‖f x‖ < M} f) x\n[PROOFSTEP]\nby_cases hx : M ≤ ‖f x‖\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\nx : α\nhx : M ≤ ‖f x‖\n⊢ f x = (Set.indicator {x | M ≤ ↑‖f x‖₊} f + Set.indicator {x | ‖f x‖ < M} f) x\n[PROOFSTEP]\nrw [Pi.add_apply, Set.indicator_of_mem, Set.indicator_of_not_mem, add_zero]\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\nx : α\nhx : M ≤ ‖f x‖\n⊢ ¬x ∈ {x | ‖f x‖ < M}\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\nx : α\nhx : M ≤ ‖f x‖\n⊢ x ∈ {x | M ≤ ↑‖f x‖₊}\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\nx : α\nhx : ¬M ≤ ‖f x‖\n⊢ f x = (Set.indicator {x | M ≤ ↑‖f x‖₊} f + Set.indicator {x | ‖f x‖ < M} f) x\n[PROOFSTEP]\nrw [Pi.add_apply, Set.indicator_of_not_mem, Set.indicator_of_mem, zero_add]\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\nx : α\nhx : ¬M ≤ ‖f x‖\n⊢ x ∈ {x | ‖f x‖ < M}\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nM : ℝ\nhMpos : 0 < M\nhM : snorm (Set.indicator {x | M ≤ ↑‖f x‖₊} f) p μ ≤ ENNReal.ofReal ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s (Set.indicator {x | ‖f x‖ < M} f)) p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\nx : α\nhx : ¬M ≤ ‖f x‖\n⊢ ¬x ∈ {x | M ≤ ↑‖f x‖₊}\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ hδ, ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ, hδpos, hδ⟩ := hf.snorm_indicator_le' μ hp_one hp_top hmeas (half_pos hε)\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ 2 * ENNReal.ofReal (ε / 2)\n⊢ ∃ δ hδ, ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨δ, hδpos, fun s hs hμs => le_trans (hδ s hs hμs) _⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ 2 * ENNReal.ofReal (ε / 2)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ 2 * ENNReal.ofReal (ε / 2) ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [ENNReal.ofReal_div_of_pos zero_lt_two, (by norm_num : ENNReal.ofReal 2 = 2), ENNReal.mul_div_cancel']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ 2 * ENNReal.ofReal (ε / 2)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ ENNReal.ofReal 2 = 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.intro.h0\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ 2 * ENNReal.ofReal (ε / 2)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ 2 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.intro.hI\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nhmeas : StronglyMeasurable f\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ 2 * ENNReal.ofReal (ε / 2)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ 2 ≠ ⊤\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ hδ, ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave hℒp := hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : Memℒp f p\nε : ℝ\nhε : 0 < ε\nhℒp : Memℒp f p\n⊢ ∃ δ hδ, ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨⟨f', hf', heq⟩, _⟩ := hf\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nhℒp : Memℒp f p\nright✝ : snorm f p μ < ⊤\nf' : α → β\nhf' : StronglyMeasurable f'\nheq : f =ᵐ[μ] f'\n⊢ ∃ δ hδ, ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ, hδpos, hδ⟩ := (hℒp.ae_eq heq).snorm_indicator_le_of_meas μ hp_one hp_top hf' hε\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nhℒp : Memℒp f p\nright✝ : snorm f p μ < ⊤\nf' : α → β\nhf' : StronglyMeasurable f'\nheq : f =ᵐ[μ] f'\nδ : ℝ\nhδpos : 0 < δ\nhδ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f') p μ ≤ ENNReal.ofReal ε\n⊢ ∃ δ hδ, ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨δ, hδpos, fun s hs hμs => _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nhℒp : Memℒp f p\nright✝ : snorm f p μ < ⊤\nf' : α → β\nhf' : StronglyMeasurable f'\nheq : f =ᵐ[μ] f'\nδ : ℝ\nhδpos : 0 < δ\nhδ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f') p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (Set.indicator s f) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nconvert hδ s hs hμs using 1\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nhℒp : Memℒp f p\nright✝ : snorm f p μ < ⊤\nf' : α → β\nhf' : StronglyMeasurable f'\nheq : f =ᵐ[μ] f'\nδ : ℝ\nhδpos : 0 < δ\nhδ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f') p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (Set.indicator s f) p μ = snorm (Set.indicator s f') p μ\n[PROOFSTEP]\nrw [snorm_indicator_eq_snorm_restrict hs, snorm_indicator_eq_snorm_restrict hs]\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nε : ℝ\nhε : 0 < ε\nhℒp : Memℒp f p\nright✝ : snorm f p μ < ⊤\nf' : α → β\nhf' : StronglyMeasurable f'\nheq : f =ᵐ[μ] f'\nδ : ℝ\nhδpos : 0 < δ\nhδ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (Set.indicator s f') p μ ≤ ENNReal.ofReal ε\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm f p (Measure.restrict μ s) = snorm f' p (Measure.restrict μ s)\n[PROOFSTEP]\nrefine' snorm_congr_ae heq.restrict\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf g : α → β\nhp : 1 ≤ p\nhp_ne_top : p ≠ ⊤\nhg : Memℒp g p\n⊢ UnifIntegrable (fun x => g) p μ\n[PROOFSTEP]\nintro ε hε\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf g : α → β\nhp : 1 ≤ p\nhp_ne_top : p ≠ ⊤\nhg : Memℒp g p\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α),\n      MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s ((fun x => g) i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ, hδ_pos, hgδ⟩ := hg.snorm_indicator_le μ hp hp_ne_top hε\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf g : α → β\nhp : 1 ≤ p\nhp_ne_top : p ≠ ⊤\nhg : Memℒp g p\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ_pos : 0 < δ\nhgδ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s g) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α),\n      MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s ((fun x => g) i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nexact ⟨δ, hδ_pos, fun _ => hgδ⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Subsingleton ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nintro ε hε\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Subsingleton ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nby_cases hι : Nonempty ι\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Subsingleton ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\nhι : Nonempty ι\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\ncases' hι with i\n[GOAL]\ncase pos.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Subsingleton ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ni : ι\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ, hδpos, hδ⟩ := (hf i).snorm_indicator_le μ hp_one hp_top hε\n[GOAL]\ncase pos.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Subsingleton ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ni : ι\nδ : ℝ\nhδpos : 0 < δ\nhδ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨δ, hδpos, fun j s hs hμs => _⟩\n[GOAL]\ncase pos.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Subsingleton ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ni : ι\nδ : ℝ\nhδpos : 0 < δ\nhδ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nj : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (indicator s (f j)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nconvert hδ s hs hμs\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Subsingleton ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\nhι : ¬Nonempty ι\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nexact ⟨1, zero_lt_one, fun i => False.elim <| hι <| Nonempty.intro i⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nf : Fin n → α → β\nhf : ∀ (i : Fin n), Memℒp (f i) p\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nrevert f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\n⊢ ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\n[PROOFSTEP]\ninduction' n with n h\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\n⊢ ∀ {f : Fin Nat.zero → α → β}, (∀ (i : Fin Nat.zero), Memℒp (f i) p) → UnifIntegrable f p μ\n[PROOFSTEP]\nintro f hf\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : Fin Nat.zero → α → β\nhf : ∀ (i : Fin Nat.zero), Memℒp (f i) p\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nhave : Subsingleton (Fin Nat.zero) := subsingleton_fin_zero\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : Fin Nat.zero → α → β\nhf : ∀ (i : Fin Nat.zero), Memℒp (f i) p\nthis : Subsingleton (Fin Nat.zero)\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nexact unifIntegrable_subsingleton μ hp_one hp_top hf\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\n⊢ ∀ {f : Fin (Nat.succ n) → α → β}, (∀ (i : Fin (Nat.succ n)), Memℒp (f i) p) → UnifIntegrable f p μ\n[PROOFSTEP]\nintro f hfLp ε hε\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ x,\n    ∀ (i : Fin (Nat.succ n)) (s : Set α),\n      MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nlet g : Fin n → α → β := fun k => f k\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\n⊢ ∃ δ x,\n    ∀ (i : Fin (Nat.succ n)) (s : Set α),\n      MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave hgLp : ∀ i, Memℒp (g i) p μ := fun i => hfLp i\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\n⊢ ∃ δ x,\n    ∀ (i : Fin (Nat.succ n)) (s : Set α),\n      MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ₁, hδ₁pos, hδ₁⟩ := h hgLp hε\n[GOAL]\ncase succ.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ δ x,\n    ∀ (i : Fin (Nat.succ n)) (s : Set α),\n      MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ₂, hδ₂pos, hδ₂⟩ := (hfLp n).snorm_indicator_le μ hp_one hp_top hε\n[GOAL]\ncase succ.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ δ x,\n    ∀ (i : Fin (Nat.succ n)) (s : Set α),\n      MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨min δ₁ δ₂, lt_min hδ₁pos hδ₂pos, fun i s hs hμs => _⟩\n[GOAL]\ncase succ.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\ni : Fin (Nat.succ n)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\n⊢ snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nby_cases hi : i.val < n\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\ni : Fin (Nat.succ n)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhi : ↑i < n\n⊢ snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [(_ : f i = g ⟨i.val, hi⟩)]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\ni : Fin (Nat.succ n)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhi : ↑i < n\n⊢ snorm (indicator s (g { val := ↑i, isLt := hi })) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nexact hδ₁ _ s hs (le_trans hμs <| ENNReal.ofReal_le_ofReal <| min_le_left _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\ni : Fin (Nat.succ n)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhi : ↑i < n\n⊢ f i = g { val := ↑i, isLt := hi }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\ni : Fin (Nat.succ n)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhi : ¬↑i < n\n⊢ snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [(_ : i = n)]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\ni : Fin (Nat.succ n)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhi : ¬↑i < n\n⊢ snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nexact hδ₂ _ hs (le_trans hμs <| ENNReal.ofReal_le_ofReal <| min_le_right _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\ni : Fin (Nat.succ n)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhi : ¬↑i < n\n⊢ i = ↑n\n[PROOFSTEP]\nhave hi' := Fin.is_lt i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\ni : Fin (Nat.succ n)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhi : ¬↑i < n\nhi' : ↑i < Nat.succ n\n⊢ i = ↑n\n[PROOFSTEP]\nrw [Nat.lt_succ_iff] at hi' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\ni : Fin (Nat.succ n)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhi : ¬↑i < n\nhi' : ↑i ≤ n\n⊢ i = ↑n\n[PROOFSTEP]\nrw [not_lt] at hi \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\ni : Fin (Nat.succ n)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhi : n ≤ ↑i\nhi' : ↑i ≤ n\n⊢ i = ↑n\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\ni : Fin (Nat.succ n)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhi : n ≤ ↑i\nhi' : ↑i ≤ n\n⊢ ↑i = ↑↑n\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nn : ℕ\nh : ∀ {f : Fin n → α → β}, (∀ (i : Fin n), Memℒp (f i) p) → UnifIntegrable f p μ\nf : Fin (Nat.succ n) → α → β\nhfLp : ∀ (i : Fin (Nat.succ n)), Memℒp (f i) p\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := fun k => f ↑↑k\nhgLp : ∀ (i : Fin n), Memℒp (g i) p\nδ₁ : ℝ\nhδ₁pos : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\nδ₂ : ℝ\nhδ₂pos : 0 < δ₂\nhδ₂ : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s (f ↑n)) p μ ≤ ENNReal.ofReal ε\ni : Fin (Nat.succ n)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal (min δ₁ δ₂)\nhi : n ≤ ↑i\nhi' : ↑i ≤ n\n⊢ ↑↑n = ↑i\n[PROOFSTEP]\nrw [Fin.coe_ofNat_eq_mod, le_antisymm hi' hi, Nat.mod_succ_eq_iff_lt, Nat.lt_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := Finite.exists_equiv_fin ι\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nn : ℕ\nhn : Nonempty (ι ≃ Fin n)\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nintro ε hε\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nn : ℕ\nhn : Nonempty (ι ≃ Fin n)\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nset g : Fin n → α → β := f ∘ hn.some.symm with hgeq\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nn : ℕ\nhn : Nonempty (ι ≃ Fin n)\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := f ∘ ↑(Nonempty.some hn).symm\nhgeq : g = f ∘ ↑(Nonempty.some hn).symm\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave hg : ∀ i, Memℒp (g i) p μ := fun _ => hf _\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nn : ℕ\nhn : Nonempty (ι ≃ Fin n)\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := f ∘ ↑(Nonempty.some hn).symm\nhgeq : g = f ∘ ↑(Nonempty.some hn).symm\nhg : ∀ (i : Fin n), Memℒp (g i) p\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ, hδpos, hδ⟩ := unifIntegrable_fin μ hp_one hp_top hg hε\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nn : ℕ\nhn : Nonempty (ι ≃ Fin n)\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := f ∘ ↑(Nonempty.some hn).symm\nhgeq : g = f ∘ ↑(Nonempty.some hn).symm\nhg : ∀ (i : Fin n), Memℒp (g i) p\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨δ, hδpos, fun i s hs hμs => _⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nn : ℕ\nhn : Nonempty (ι ≃ Fin n)\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := f ∘ ↑(Nonempty.some hn).symm\nhgeq : g = f ∘ ↑(Nonempty.some hn).symm\nhg : ∀ (i : Fin n), Memℒp (g i) p\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (i : Fin n) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s ((fun i => g i) i)) p μ ≤ ENNReal.ofReal ε\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nspecialize hδ (hn.some i) s hs hμs\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nn : ℕ\nhn : Nonempty (ι ≃ Fin n)\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := f ∘ ↑(Nonempty.some hn).symm\nhgeq : g = f ∘ ↑(Nonempty.some hn).symm\nhg : ∀ (i : Fin n), Memℒp (g i) p\nδ : ℝ\nhδpos : 0 < δ\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\nhδ : snorm (indicator s ((fun i => g i) (↑(Nonempty.some hn) i))) p μ ≤ ENNReal.ofReal ε\n⊢ snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimp_rw [hgeq, Function.comp_apply, Equiv.symm_apply_apply] at hδ \n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), Memℒp (f i) p\nn : ℕ\nhn : Nonempty (ι ≃ Fin n)\nε : ℝ\nhε : 0 < ε\ng : Fin n → α → β := f ∘ ↑(Nonempty.some hn).symm\nhgeq : g = f ∘ ↑(Nonempty.some hn).symm\nhg : ∀ (i : Fin n), Memℒp (g i) p\nδ : ℝ\nhδpos : 0 < δ\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ\nhδ : snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np✝ p : ℝ≥0∞\nhp' : p ≠ ⊤\ns : Set α\nhs : MeasurableSet s\nf g : α → β\nc : ℝ\nhc : 0 ≤ c\nhf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c\n⊢ snorm (indicator s (f - g)) p μ ≤ ENNReal.ofReal c * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np✝ p : ℝ≥0∞\nhp' : p ≠ ⊤\ns : Set α\nhs : MeasurableSet s\nf g : α → β\nc : ℝ\nhc : 0 ≤ c\nhf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c\nhp : p = 0\n⊢ snorm (indicator s (f - g)) p μ ≤ ENNReal.ofReal c * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np✝ p : ℝ≥0∞\nhp' : p ≠ ⊤\ns : Set α\nhs : MeasurableSet s\nf g : α → β\nc : ℝ\nhc : 0 ≤ c\nhf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c\nhp : ¬p = 0\n⊢ snorm (indicator s (f - g)) p μ ≤ ENNReal.ofReal c * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nhave : ∀ x, ‖s.indicator (f - g) x‖ ≤ ‖s.indicator (fun _ => c) x‖ :=\n  by\n  intro x\n  by_cases hx : x ∈ s\n  · rw [Set.indicator_of_mem hx, Set.indicator_of_mem hx, Pi.sub_apply, ← dist_eq_norm, Real.norm_eq_abs,\n      abs_of_nonneg hc]\n    exact hf x hx\n  · simp [Set.indicator_of_not_mem hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np✝ p : ℝ≥0∞\nhp' : p ≠ ⊤\ns : Set α\nhs : MeasurableSet s\nf g : α → β\nc : ℝ\nhc : 0 ≤ c\nhf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c\nhp : ¬p = 0\n⊢ ∀ (x : α), ‖indicator s (f - g) x‖ ≤ ‖indicator s (fun x => c) x‖\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np✝ p : ℝ≥0∞\nhp' : p ≠ ⊤\ns : Set α\nhs : MeasurableSet s\nf g : α → β\nc : ℝ\nhc : 0 ≤ c\nhf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c\nhp : ¬p = 0\nx : α\n⊢ ‖indicator s (f - g) x‖ ≤ ‖indicator s (fun x => c) x‖\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np✝ p : ℝ≥0∞\nhp' : p ≠ ⊤\ns : Set α\nhs : MeasurableSet s\nf g : α → β\nc : ℝ\nhc : 0 ≤ c\nhf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c\nhp : ¬p = 0\nx : α\nhx : x ∈ s\n⊢ ‖indicator s (f - g) x‖ ≤ ‖indicator s (fun x => c) x‖\n[PROOFSTEP]\nrw [Set.indicator_of_mem hx, Set.indicator_of_mem hx, Pi.sub_apply, ← dist_eq_norm, Real.norm_eq_abs, abs_of_nonneg hc]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np✝ p : ℝ≥0∞\nhp' : p ≠ ⊤\ns : Set α\nhs : MeasurableSet s\nf g : α → β\nc : ℝ\nhc : 0 ≤ c\nhf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c\nhp : ¬p = 0\nx : α\nhx : x ∈ s\n⊢ dist (f x) (g x) ≤ c\n[PROOFSTEP]\nexact hf x hx\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np✝ p : ℝ≥0∞\nhp' : p ≠ ⊤\ns : Set α\nhs : MeasurableSet s\nf g : α → β\nc : ℝ\nhc : 0 ≤ c\nhf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c\nhp : ¬p = 0\nx : α\nhx : ¬x ∈ s\n⊢ ‖indicator s (f - g) x‖ ≤ ‖indicator s (fun x => c) x‖\n[PROOFSTEP]\nsimp [Set.indicator_of_not_mem hx]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np✝ p : ℝ≥0∞\nhp' : p ≠ ⊤\ns : Set α\nhs : MeasurableSet s\nf g : α → β\nc : ℝ\nhc : 0 ≤ c\nhf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c\nhp : ¬p = 0\nthis : ∀ (x : α), ‖indicator s (f - g) x‖ ≤ ‖indicator s (fun x => c) x‖\n⊢ snorm (indicator s (f - g)) p μ ≤ ENNReal.ofReal c * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrefine' le_trans (snorm_mono this) _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np✝ p : ℝ≥0∞\nhp' : p ≠ ⊤\ns : Set α\nhs : MeasurableSet s\nf g : α → β\nc : ℝ\nhc : 0 ≤ c\nhf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c\nhp : ¬p = 0\nthis : ∀ (x : α), ‖indicator s (f - g) x‖ ≤ ‖indicator s (fun x => c) x‖\n⊢ snorm (fun x => indicator s (fun x => c) x) p μ ≤ ENNReal.ofReal c * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [snorm_indicator_const hs hp hp']\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np✝ p : ℝ≥0∞\nhp' : p ≠ ⊤\ns : Set α\nhs : MeasurableSet s\nf g : α → β\nc : ℝ\nhc : 0 ≤ c\nhf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c\nhp : ¬p = 0\nthis : ∀ (x : α), ‖indicator s (f - g) x‖ ≤ ‖indicator s (fun x => c) x‖\n⊢ ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p) ≤ ENNReal.ofReal c * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrefine' mul_le_mul_right' (le_of_eq _) _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np✝ p : ℝ≥0∞\nhp' : p ≠ ⊤\ns : Set α\nhs : MeasurableSet s\nf g : α → β\nc : ℝ\nhc : 0 ≤ c\nhf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c\nhp : ¬p = 0\nthis : ∀ (x : α), ‖indicator s (f - g) x‖ ≤ ‖indicator s (fun x => c) x‖\n⊢ ↑‖c‖₊ = ENNReal.ofReal c\n[PROOFSTEP]\nrw [← ofReal_norm_eq_coe_nnnorm, Real.norm_eq_abs, abs_of_nonneg hc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\n⊢ Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nrw [ENNReal.tendsto_atTop_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\n⊢ ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nintro ε hε\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nby_cases ε < ∞\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nby_cases ε < ∞\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ¬ε < ⊤\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ¬ε < ⊤\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nrw [not_lt, top_le_iff] at h \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε = ⊤\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nexact ⟨0, fun n _ => by simp [h]⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε = ⊤\nn : ℕ\nx✝ : n ≥ 0\n⊢ snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nby_cases hμ : μ = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : μ = 0\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nexact ⟨0, fun n _ => by simp [hμ]⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : μ = 0\nn : ℕ\nx✝ : n ≥ 0\n⊢ snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nsimp [hμ]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nhave hε' : 0 < ε.toReal / 3 := div_pos (ENNReal.toReal_pos (gt_iff_lt.1 hε).ne.symm h.ne) (by norm_num)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\n⊢ 0 < 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nhave hdivp : 0 ≤ 1 / p.toReal := by\n  refine' one_div_nonneg.2 _\n  rw [← ENNReal.zero_toReal, ENNReal.toReal_le_toReal ENNReal.zero_ne_top hp']\n  exact le_trans (zero_le _) hp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\n⊢ 0 ≤ 1 / ENNReal.toReal p\n[PROOFSTEP]\nrefine' one_div_nonneg.2 _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\n⊢ 0 ≤ ENNReal.toReal p\n[PROOFSTEP]\nrw [← ENNReal.zero_toReal, ENNReal.toReal_le_toReal ENNReal.zero_ne_top hp']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\n⊢ 0 ≤ p\n[PROOFSTEP]\nexact le_trans (zero_le _) hp\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nhave hpow : 0 < measureUnivNNReal μ ^ (1 / p.toReal) := Real.rpow_pos_of_pos (measureUnivNNReal_pos hμ) _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nobtain ⟨δ₁, hδ₁, hsnorm₁⟩ := hui hε'\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nobtain ⟨δ₂, hδ₂, hsnorm₂⟩ := hg'.snorm_indicator_le μ hp hp' hε'\n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nobtain ⟨t, htm, ht₁, ht₂⟩ := tendstoUniformlyOn_of_ae_tendsto' hf hg hfg (lt_min hδ₁ hδ₂)\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nht₂ : TendstoUniformlyOn (fun n => f n) g atTop tᶜ\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nrw [Metric.tendstoUniformlyOn_iff] at ht₂ \n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nht₂ : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (n : ℕ) in atTop, ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ε\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nspecialize\n  ht₂ (ε.toReal / (3 * measureUnivNNReal μ ^ (1 / p.toReal)))\n    (div_pos (ENNReal.toReal_pos (gt_iff_lt.1 hε).ne.symm h.ne) (mul_pos (by norm_num) hpow))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nht₂ : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (n : ℕ) in atTop, ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ε\n⊢ 0 < 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nht₂ :\n  ∀ᶠ (n : ℕ) in atTop,\n    ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nobtain ⟨N, hN⟩ := eventually_atTop.1 ht₂\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nht₂ :\n  ∀ᶠ (n : ℕ) in atTop,\n    ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nclear ht₂\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nrefine' ⟨N, fun n hn => _⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\n⊢ snorm (f n - g) p μ ≤ ε\n[PROOFSTEP]\nrw [← t.indicator_self_add_compl (f n - g)]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\n⊢ snorm (indicator t (f n - g) + indicator tᶜ (f n - g)) p μ ≤ ε\n[PROOFSTEP]\nrefine'\n  le_trans\n    (snorm_add_le (((hf n).sub hg).indicator htm).aestronglyMeasurable\n      (((hf n).sub hg).indicator htm.compl).aestronglyMeasurable hp)\n    _\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\n⊢ snorm (indicator t (f n - g)) p μ + snorm (indicator tᶜ (f n - g)) p μ ≤ ε\n[PROOFSTEP]\nrw [sub_eq_add_neg, Set.indicator_add' t, Set.indicator_neg']\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\n⊢ snorm (indicator t (f n) + -indicator t g) p μ + snorm (indicator tᶜ (f n + -g)) p μ ≤ ε\n[PROOFSTEP]\nrefine'\n  le_trans\n    (add_le_add_right\n      (snorm_add_le ((hf n).indicator htm).aestronglyMeasurable (hg.indicator htm).neg.aestronglyMeasurable hp) _)\n    _\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\n⊢ snorm (indicator t (f n)) p μ + snorm (-indicator t g) p μ + snorm (indicator tᶜ (f n + -g)) p μ ≤ ε\n[PROOFSTEP]\nhave hnf : snorm (t.indicator (f n)) p μ ≤ ENNReal.ofReal (ε.toReal / 3) :=\n  by\n  refine' hsnorm₁ n t htm (le_trans ht₁ _)\n  rw [ENNReal.ofReal_le_ofReal_iff hδ₁.le]\n  exact min_le_left _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\n⊢ snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n[PROOFSTEP]\nrefine' hsnorm₁ n t htm (le_trans ht₁ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\n⊢ ENNReal.ofReal (min δ₁ δ₂) ≤ ENNReal.ofReal δ₁\n[PROOFSTEP]\nrw [ENNReal.ofReal_le_ofReal_iff hδ₁.le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\n⊢ min δ₁ δ₂ ≤ δ₁\n[PROOFSTEP]\nexact min_le_left _ _\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n⊢ snorm (indicator t (f n)) p μ + snorm (-indicator t g) p μ + snorm (indicator tᶜ (f n + -g)) p μ ≤ ε\n[PROOFSTEP]\nhave hng : snorm (t.indicator g) p μ ≤ ENNReal.ofReal (ε.toReal / 3) :=\n  by\n  refine' hsnorm₂ t htm (le_trans ht₁ _)\n  rw [ENNReal.ofReal_le_ofReal_iff hδ₂.le]\n  exact min_le_right _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n⊢ snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n[PROOFSTEP]\nrefine' hsnorm₂ t htm (le_trans ht₁ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n⊢ ENNReal.ofReal (min δ₁ δ₂) ≤ ENNReal.ofReal δ₂\n[PROOFSTEP]\nrw [ENNReal.ofReal_le_ofReal_iff hδ₂.le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n⊢ min δ₁ δ₂ ≤ δ₂\n[PROOFSTEP]\nexact min_le_right _ _\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n⊢ snorm (indicator t (f n)) p μ + snorm (-indicator t g) p μ + snorm (indicator tᶜ (f n + -g)) p μ ≤ ε\n[PROOFSTEP]\nhave hlt : snorm (tᶜ.indicator (f n - g)) p μ ≤ ENNReal.ofReal (ε.toReal / 3) :=\n  by\n  specialize hN n hn\n  have : 0 ≤ ε.toReal / (3 * measureUnivNNReal μ ^ (1 / p.toReal)) :=\n    by\n    rw [div_mul_eq_div_mul_one_div]\n    exact mul_nonneg hε'.le (one_div_nonneg.2 hpow.le)\n  have :=\n    snorm_sub_le_of_dist_bdd μ hp' htm.compl this fun x hx =>\n      (dist_comm (g x) (f n x) ▸ (hN x hx).le :\n        dist (f n x) (g x) ≤ ε.toReal / (3 * measureUnivNNReal μ ^ (1 / p.toReal)))\n  refine' le_trans this _\n  rw [div_mul_eq_div_mul_one_div, ← ENNReal.ofReal_toReal (measure_lt_top μ tᶜ).ne,\n    ENNReal.ofReal_rpow_of_nonneg ENNReal.toReal_nonneg hdivp, ← ENNReal.ofReal_mul, mul_assoc]\n  · refine' ENNReal.ofReal_le_ofReal (mul_le_of_le_one_right hε'.le _)\n    rw [mul_comm, mul_one_div, div_le_one]\n    · refine'\n        Real.rpow_le_rpow ENNReal.toReal_nonneg (ENNReal.toReal_le_of_le_ofReal (measureUnivNNReal_pos hμ).le _) hdivp\n      rw [ENNReal.ofReal_coe_nnreal, coe_measureUnivNNReal]\n      exact measure_mono (Set.subset_univ _)\n    · exact Real.rpow_pos_of_pos (measureUnivNNReal_pos hμ) _\n  · refine' mul_nonneg hε'.le (one_div_nonneg.2 hpow.le)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n⊢ snorm (indicator tᶜ (f n - g)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n[PROOFSTEP]\nspecialize hN n hn\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\n⊢ snorm (indicator tᶜ (f n - g)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n[PROOFSTEP]\nhave : 0 ≤ ε.toReal / (3 * measureUnivNNReal μ ^ (1 / p.toReal)) :=\n  by\n  rw [div_mul_eq_div_mul_one_div]\n  exact mul_nonneg hε'.le (one_div_nonneg.2 hpow.le)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\n⊢ 0 ≤ ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\n[PROOFSTEP]\nrw [div_mul_eq_div_mul_one_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\n⊢ 0 ≤ ENNReal.toReal ε / 3 * (1 / ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\n[PROOFSTEP]\nexact mul_nonneg hε'.le (one_div_nonneg.2 hpow.le)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis : 0 ≤ ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\n⊢ snorm (indicator tᶜ (f n - g)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n[PROOFSTEP]\nhave :=\n  snorm_sub_le_of_dist_bdd μ hp' htm.compl this fun x hx =>\n    (dist_comm (g x) (f n x) ▸ (hN x hx).le :\n      dist (f n x) (g x) ≤ ε.toReal / (3 * measureUnivNNReal μ ^ (1 / p.toReal)))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis✝ : 0 ≤ ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis :\n  snorm (indicator tᶜ ((fun x => f n x) - fun x => g x)) p μ ≤\n    ENNReal.ofReal (ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))) *\n      ↑↑μ tᶜ ^ (1 / ENNReal.toReal p)\n⊢ snorm (indicator tᶜ (f n - g)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n[PROOFSTEP]\nrefine' le_trans this _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis✝ : 0 ≤ ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis :\n  snorm (indicator tᶜ ((fun x => f n x) - fun x => g x)) p μ ≤\n    ENNReal.ofReal (ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))) *\n      ↑↑μ tᶜ ^ (1 / ENNReal.toReal p)\n⊢ ENNReal.ofReal (ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))) *\n      ↑↑μ tᶜ ^ (1 / ENNReal.toReal p) ≤\n    ENNReal.ofReal (ENNReal.toReal ε / 3)\n[PROOFSTEP]\nrw [div_mul_eq_div_mul_one_div, ← ENNReal.ofReal_toReal (measure_lt_top μ tᶜ).ne,\n  ENNReal.ofReal_rpow_of_nonneg ENNReal.toReal_nonneg hdivp, ← ENNReal.ofReal_mul, mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis✝ : 0 ≤ ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis :\n  snorm (indicator tᶜ ((fun x => f n x) - fun x => g x)) p μ ≤\n    ENNReal.ofReal (ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))) *\n      ↑↑μ tᶜ ^ (1 / ENNReal.toReal p)\n⊢ ENNReal.ofReal\n      (ENNReal.toReal ε / 3 *\n        (1 / ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p) * ENNReal.toReal (↑↑μ tᶜ) ^ (1 / ENNReal.toReal p))) ≤\n    ENNReal.ofReal (ENNReal.toReal ε / 3)\n[PROOFSTEP]\nrefine' ENNReal.ofReal_le_ofReal (mul_le_of_le_one_right hε'.le _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis✝ : 0 ≤ ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis :\n  snorm (indicator tᶜ ((fun x => f n x) - fun x => g x)) p μ ≤\n    ENNReal.ofReal (ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))) *\n      ↑↑μ tᶜ ^ (1 / ENNReal.toReal p)\n⊢ 1 / ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p) * ENNReal.toReal (↑↑μ tᶜ) ^ (1 / ENNReal.toReal p) ≤ 1\n[PROOFSTEP]\nrw [mul_comm, mul_one_div, div_le_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis✝ : 0 ≤ ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis :\n  snorm (indicator tᶜ ((fun x => f n x) - fun x => g x)) p μ ≤\n    ENNReal.ofReal (ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))) *\n      ↑↑μ tᶜ ^ (1 / ENNReal.toReal p)\n⊢ ENNReal.toReal (↑↑μ tᶜ) ^ (1 / ENNReal.toReal p) ≤ ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrefine' Real.rpow_le_rpow ENNReal.toReal_nonneg (ENNReal.toReal_le_of_le_ofReal (measureUnivNNReal_pos hμ).le _) hdivp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis✝ : 0 ≤ ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis :\n  snorm (indicator tᶜ ((fun x => f n x) - fun x => g x)) p μ ≤\n    ENNReal.ofReal (ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))) *\n      ↑↑μ tᶜ ^ (1 / ENNReal.toReal p)\n⊢ ↑↑μ tᶜ ≤ ENNReal.ofReal ↑(measureUnivNNReal μ)\n[PROOFSTEP]\nrw [ENNReal.ofReal_coe_nnreal, coe_measureUnivNNReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis✝ : 0 ≤ ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis :\n  snorm (indicator tᶜ ((fun x => f n x) - fun x => g x)) p μ ≤\n    ENNReal.ofReal (ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))) *\n      ↑↑μ tᶜ ^ (1 / ENNReal.toReal p)\n⊢ ↑↑μ tᶜ ≤ ↑↑μ univ\n[PROOFSTEP]\nexact measure_mono (Set.subset_univ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis✝ : 0 ≤ ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis :\n  snorm (indicator tᶜ ((fun x => f n x) - fun x => g x)) p μ ≤\n    ENNReal.ofReal (ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))) *\n      ↑↑μ tᶜ ^ (1 / ENNReal.toReal p)\n⊢ 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nexact Real.rpow_pos_of_pos (measureUnivNNReal_pos hμ) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN n : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhN : ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis✝ : 0 ≤ ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nthis :\n  snorm (indicator tᶜ ((fun x => f n x) - fun x => g x)) p μ ≤\n    ENNReal.ofReal (ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))) *\n      ↑↑μ tᶜ ^ (1 / ENNReal.toReal p)\n⊢ 0 ≤ ENNReal.toReal ε / 3 * (1 / ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\n[PROOFSTEP]\nrefine' mul_nonneg hε'.le (one_div_nonneg.2 hpow.le)\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhlt : snorm (indicator tᶜ (f n - g)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n⊢ snorm (indicator t (f n)) p μ + snorm (-indicator t g) p μ + snorm (indicator tᶜ (f n + -g)) p μ ≤ ε\n[PROOFSTEP]\nhave : ENNReal.ofReal (ε.toReal / 3) = ε / 3 :=\n  by\n  rw [ENNReal.ofReal_div_of_pos (show (0 : ℝ) < 3 by norm_num), ENNReal.ofReal_toReal h.ne]\n  simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhlt : snorm (indicator tᶜ (f n - g)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n⊢ ENNReal.ofReal (ENNReal.toReal ε / 3) = ε / 3\n[PROOFSTEP]\nrw [ENNReal.ofReal_div_of_pos (show (0 : ℝ) < 3 by norm_num), ENNReal.ofReal_toReal h.ne]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhlt : snorm (indicator tᶜ (f n - g)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n⊢ 0 < 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhlt : snorm (indicator tᶜ (f n - g)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\n⊢ ε / ENNReal.ofReal 3 = ε / 3\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhng : snorm (indicator t g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nhlt : snorm (indicator tᶜ (f n - g)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nthis : ENNReal.ofReal (ENNReal.toReal ε / 3) = ε / 3\n⊢ snorm (indicator t (f n)) p μ + snorm (-indicator t g) p μ + snorm (indicator tᶜ (f n + -g)) p μ ≤ ε\n[PROOFSTEP]\nrw [this] at hnf hng hlt \n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ε / 3\nhng : snorm (indicator t g) p μ ≤ ε / 3\nhlt : snorm (indicator tᶜ (f n - g)) p μ ≤ ε / 3\nthis : ENNReal.ofReal (ENNReal.toReal ε / 3) = ε / 3\n⊢ snorm (indicator t (f n)) p μ + snorm (-indicator t g) p μ + snorm (indicator tᶜ (f n + -g)) p μ ≤ ε\n[PROOFSTEP]\nrw [snorm_neg, ← ENNReal.add_thirds ε, ← sub_eq_add_neg]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhg' : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ≥0∞\nhε : ε > 0\nh : ε < ⊤\nhμ : ¬μ = 0\nhε' : 0 < ENNReal.toReal ε / 3\nhdivp : 0 ≤ 1 / ENNReal.toReal p\nhpow : 0 < ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p)\nδ₁ : ℝ\nhδ₁ : 0 < δ₁\nhsnorm₁ :\n  ∀ (i : ℕ) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nδ₂ : ℝ\nhδ₂ : 0 < δ₂\nhsnorm₂ :\n  ∀ (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₂ → snorm (indicator s g) p μ ≤ ENNReal.ofReal (ENNReal.toReal ε / 3)\nt : Set α\nhtm : MeasurableSet t\nht₁ : ↑↑μ t ≤ ENNReal.ofReal (min δ₁ δ₂)\nN : ℕ\nhN :\n  ∀ (b : ℕ),\n    b ≥ N →\n      ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ENNReal.toReal ε / (3 * ↑(measureUnivNNReal μ) ^ (1 / ENNReal.toReal p))\nn : ℕ\nhn : n ≥ N\nhnf : snorm (indicator t (f n)) p μ ≤ ε / 3\nhng : snorm (indicator t g) p μ ≤ ε / 3\nhlt : snorm (indicator tᶜ (f n - g)) p μ ≤ ε / 3\nthis : ENNReal.ofReal (ENNReal.toReal ε / 3) = ε / 3\n⊢ snorm (indicator t (f n)) p μ + snorm (indicator t g) p μ + snorm (indicator tᶜ (f n - g)) p μ ≤ ε / 3 + ε / 3 + ε / 3\n[PROOFSTEP]\nexact add_le_add_three hnf hng hlt\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\n⊢ Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave : ∀ n, snorm (f n - g) p μ = snorm ((hf n).mk (f n) - hg.1.mk g) p μ := fun n =>\n  snorm_congr_ae ((hf n).ae_eq_mk.sub hg.1.ae_eq_mk)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nthis :\n  ∀ (n : ℕ),\n    snorm (f n - g) p μ =\n      snorm\n        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -\n          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))\n        p μ\n⊢ Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nthis :\n  ∀ (n : ℕ),\n    snorm (f n - g) p μ =\n      snorm\n        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -\n          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))\n        p μ\n⊢ Tendsto\n    (fun n =>\n      snorm\n        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -\n          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))\n        p μ)\n    atTop (𝓝 0)\n[PROOFSTEP]\nrefine'\n  tendsto_Lp_of_tendsto_ae_of_meas μ hp hp' (fun n => (hf n).stronglyMeasurable_mk) hg.1.stronglyMeasurable_mk\n    (hg.ae_eq hg.1.ae_eq_mk) (hui.ae_eq fun n => (hf n).ae_eq_mk) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nthis :\n  ∀ (n : ℕ),\n    snorm (f n - g) p μ =\n      snorm\n        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -\n          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))\n        p μ\n⊢ ∀ᵐ (x : α) ∂μ,\n    Tendsto (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) atTop\n      (𝓝 (AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x))\n[PROOFSTEP]\nhave h_ae_forall_eq : ∀ᵐ x ∂μ, ∀ n, f n x = (hf n).mk (f n) x :=\n  by\n  rw [ae_all_iff]\n  exact fun n => (hf n).ae_eq_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nthis :\n  ∀ (n : ℕ),\n    snorm (f n - g) p μ =\n      snorm\n        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -\n          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))\n        p μ\n⊢ ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x\n[PROOFSTEP]\nrw [ae_all_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nthis :\n  ∀ (n : ℕ),\n    snorm (f n - g) p μ =\n      snorm\n        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -\n          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))\n        p μ\n⊢ ∀ (i : ℕ), ∀ᵐ (a : α) ∂μ, f i a = AEStronglyMeasurable.mk (f i) (_ : AEStronglyMeasurable (f i) μ) a\n[PROOFSTEP]\nexact fun n => (hf n).ae_eq_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nthis :\n  ∀ (n : ℕ),\n    snorm (f n - g) p μ =\n      snorm\n        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -\n          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))\n        p μ\nh_ae_forall_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x\n⊢ ∀ᵐ (x : α) ∂μ,\n    Tendsto (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) atTop\n      (𝓝 (AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x))\n[PROOFSTEP]\nfilter_upwards [hfg, h_ae_forall_eq, hg.1.ae_eq_mk] with x hx_tendsto hxf_eq hxg_eq\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nthis :\n  ∀ (n : ℕ),\n    snorm (f n - g) p μ =\n      snorm\n        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -\n          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))\n        p μ\nh_ae_forall_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x\nx : α\nhx_tendsto : Tendsto (fun n => f n x) atTop (𝓝 (g x))\nhxf_eq : ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x\nhxg_eq : g x = AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x\n⊢ Tendsto (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) atTop\n    (𝓝 (AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x))\n[PROOFSTEP]\nrw [← hxg_eq]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nthis :\n  ∀ (n : ℕ),\n    snorm (f n - g) p μ =\n      snorm\n        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -\n          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))\n        p μ\nh_ae_forall_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x\nx : α\nhx_tendsto : Tendsto (fun n => f n x) atTop (𝓝 (g x))\nhxf_eq : ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x\nhxg_eq : g x = AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x\n⊢ Tendsto (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nconvert hx_tendsto using 1\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nthis :\n  ∀ (n : ℕ),\n    snorm (f n - g) p μ =\n      snorm\n        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -\n          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))\n        p μ\nh_ae_forall_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x\nx : α\nhx_tendsto : Tendsto (fun n => f n x) atTop (𝓝 (g x))\nhxf_eq : ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x\nhxg_eq : g x = AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x\n⊢ (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) = fun n => f n x\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ℕ → α → β\ng : α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nthis :\n  ∀ (n : ℕ),\n    snorm (f n - g) p μ =\n      snorm\n        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -\n          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))\n        p μ\nh_ae_forall_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x\nx : α\nhx_tendsto : Tendsto (fun n => f n x) atTop (𝓝 (g x))\nhxf_eq : ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x\nhxg_eq : g x = AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x\nn : ℕ\n⊢ AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x = f n x\n[PROOFSTEP]\nexact (hxf_eq n).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhf_tendsto : Tendsto (fun n => snorm (f n) p μ) atTop (𝓝 0)\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nintro ε hε\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhf_tendsto : Tendsto (fun n => snorm (f n) p μ) atTop (𝓝 0)\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ x,\n    ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [ENNReal.tendsto_atTop_zero] at hf_tendsto \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhf_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ε\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ x,\n    ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨N, hN⟩ := hf_tendsto (ENNReal.ofReal ε) (by simpa)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhf_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ε\nε : ℝ\nhε : 0 < ε\n⊢ ENNReal.ofReal ε > 0\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhf_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ε\nε : ℝ\nhε : 0 < ε\nN : ℕ\nhN : ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ δ x,\n    ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nlet F : Fin N → α → β := fun n => f n\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhf_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ε\nε : ℝ\nhε : 0 < ε\nN : ℕ\nhN : ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ENNReal.ofReal ε\nF : Fin N → α → β := fun n => f ↑n\n⊢ ∃ δ x,\n    ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave hF : ∀ n, Memℒp (F n) p μ := fun n => hf n\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhf_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ε\nε : ℝ\nhε : 0 < ε\nN : ℕ\nhN : ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ENNReal.ofReal ε\nF : Fin N → α → β := fun n => f ↑n\nhF : ∀ (n : Fin N), Memℒp (F n) p\n⊢ ∃ δ x,\n    ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ₁, hδpos₁, hδ₁⟩ := unifIntegrable_fin μ hp hp' hF hε\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhf_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ε\nε : ℝ\nhε : 0 < ε\nN : ℕ\nhN : ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ENNReal.ofReal ε\nF : Fin N → α → β := fun n => f ↑n\nhF : ∀ (n : Fin N), Memℒp (F n) p\nδ₁ : ℝ\nhδpos₁ : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin N) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => F i) i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ δ x,\n    ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨δ₁, hδpos₁, fun n s hs hμs => _⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhf_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ε\nε : ℝ\nhε : 0 < ε\nN : ℕ\nhN : ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ENNReal.ofReal ε\nF : Fin N → α → β := fun n => f ↑n\nhF : ∀ (n : Fin N), Memℒp (F n) p\nδ₁ : ℝ\nhδpos₁ : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin N) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => F i) i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ₁\n⊢ snorm (indicator s (f n)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nby_cases hn : n < N\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhf_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ε\nε : ℝ\nhε : 0 < ε\nN : ℕ\nhN : ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ENNReal.ofReal ε\nF : Fin N → α → β := fun n => f ↑n\nhF : ∀ (n : Fin N), Memℒp (F n) p\nδ₁ : ℝ\nhδpos₁ : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin N) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => F i) i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ₁\nhn : n < N\n⊢ snorm (indicator s (f n)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nexact hδ₁ ⟨n, hn⟩ s hs hμs\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhf_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ε\nε : ℝ\nhε : 0 < ε\nN : ℕ\nhN : ∀ (n : ℕ), n ≥ N → snorm (f n) p μ ≤ ENNReal.ofReal ε\nF : Fin N → α → β := fun n => f ↑n\nhF : ∀ (n : Fin N), Memℒp (F n) p\nδ₁ : ℝ\nhδpos₁ : 0 < δ₁\nhδ₁ :\n  ∀ (i : Fin N) (s : Set α),\n    MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ₁ → snorm (indicator s ((fun i => F i) i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal δ₁\nhn : ¬n < N\n⊢ snorm (indicator s (f n)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nexact (snorm_indicator_le _).trans (hN n (not_lt.1 hn))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhg : Memℒp g p\nhfg : Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nhave : f = (fun _ => g) + fun n => f n - g := by ext1 n; simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhg : Memℒp g p\nhfg : Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)\n⊢ f = (fun x => g) + fun n => f n - g\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhg : Memℒp g p\nhfg : Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)\nn : ℕ\n⊢ f n = ((fun x => g) + fun n => f n - g) n\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhg : Memℒp g p\nhfg : Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)\nthis : f = (fun x => g) + fun n => f n - g\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhg : Memℒp g p\nhfg : Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)\nthis : f = (fun x => g) + fun n => f n - g\n⊢ UnifIntegrable ((fun x => g) + fun n => f n - g) p μ\n[PROOFSTEP]\nrefine' UnifIntegrable.add _ _ hp (fun _ => hg.aestronglyMeasurable) fun n => (hf n).1.sub hg.aestronglyMeasurable\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhg : Memℒp g p\nhfg : Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)\nthis : f = (fun x => g) + fun n => f n - g\n⊢ UnifIntegrable (fun x => g) p μ\n[PROOFSTEP]\nexact unifIntegrable_const μ hp hp' hg\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), Memℒp (f n) p\nhg : Memℒp g p\nhfg : Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)\nthis : f = (fun x => g) + fun n => f n - g\n⊢ UnifIntegrable (fun n => f n - g) p μ\n[PROOFSTEP]\nexact unifIntegrable_of_tendsto_Lp_zero μ hp hp' (fun n => (hf n).sub hg) hfg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : TendstoInMeasure μ f atTop g\n⊢ Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nrefine' tendsto_of_subseq_tendsto fun ns hns => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : TendstoInMeasure μ f atTop g\nns : ℕ → ℕ\nhns : Tendsto ns atTop atTop\n⊢ ∃ ms, Tendsto (fun n => snorm (f (ns (ms n)) - g) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nobtain ⟨ms, _, hms'⟩ := TendstoInMeasure.exists_seq_tendsto_ae fun ε hε => (hfg ε hε).comp hns\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ℕ → α → β\ng : α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhg : Memℒp g p\nhui : UnifIntegrable f p μ\nhfg : TendstoInMeasure μ f atTop g\nns : ℕ → ℕ\nhns : Tendsto ns atTop atTop\nms : ℕ → ℕ\nleft✝ : StrictMono ms\nhms' : ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns (ms i)) x) atTop (𝓝 (g x))\n⊢ ∃ ms, Tendsto (fun n => snorm (f (ns (ms n)) - g) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nexact\n  ⟨ms,\n    tendsto_Lp_of_tendsto_ae μ hp hp' (fun _ => hf _) hg\n      (fun ε hε =>\n        let ⟨δ, hδ, hδ'⟩ := hui hε\n        ⟨δ, hδ, fun i s hs hμs => hδ' _ s hs hμs⟩)\n      hms'⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nhave hpzero := (lt_of_lt_of_le zero_lt_one hp).ne.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nby_cases hμ : μ Set.univ = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ↑↑μ univ = 0\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nrw [Measure.measure_univ_eq_zero] at hμ \n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : μ = 0\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nexact hμ.symm ▸ unifIntegrable_zero_meas\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nintro ε hε\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨C, hCpos, hC⟩ := h (ε / 2) (half_pos hε)\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\n⊢ ∃ δ x,\n    ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine'\n  ⟨(ε / (2 * C)) ^ ENNReal.toReal p, Real.rpow_pos_of_pos (div_pos hε (mul_pos two_pos (NNReal.coe_pos.2 hCpos))) _,\n    fun i s hs hμs => _⟩\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\n⊢ snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nby_cases hμs' : μ s = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ↑↑μ s = 0\n⊢ snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [(snorm_eq_zero_iff ((hf i).indicator hs).aestronglyMeasurable hpzero).2 (indicator_meas_zero hμs')]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ↑↑μ s = 0\n⊢ 0 ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\ncalc\n  snorm (Set.indicator s (f i)) p μ ≤\n      snorm (Set.indicator (s ∩ {x | C ≤ ‖f i x‖₊}) (f i)) p μ +\n        snorm (Set.indicator (s ∩ {x | ‖f i x‖₊ < C}) (f i)) p μ :=\n    by\n    refine'\n      le_trans (Eq.le _)\n        (snorm_add_le\n          (StronglyMeasurable.aestronglyMeasurable\n            ((hf i).indicator (hs.inter (stronglyMeasurable_const.measurableSet_le (hf i).nnnorm))))\n          (StronglyMeasurable.aestronglyMeasurable\n            ((hf i).indicator (hs.inter ((hf i).nnnorm.measurableSet_lt stronglyMeasurable_const))))\n          hp)\n    congr\n    change _ = fun x => (s ∩ {x : α | C ≤ ‖f i x‖₊}).indicator (f i) x + (s ∩ {x : α | ‖f i x‖₊ < C}).indicator (f i) x\n    rw [← Set.indicator_union_of_disjoint]\n    · congr\n      rw [← Set.inter_union_distrib_left,\n        (by ext; simp [le_or_lt] : {x : α | C ≤ ‖f i x‖₊} ∪ {x : α | ‖f i x‖₊ < C} = Set.univ), Set.inter_univ]\n    · refine' (Disjoint.inf_right' _ _).inf_left' _\n      rw [disjoint_iff_inf_le]\n      rintro x ⟨hx₁, hx₂⟩\n      rw [Set.mem_setOf_eq] at hx₁ hx₂ \n      exact False.elim (hx₂.ne (eq_of_le_of_not_lt hx₁ (not_lt.2 hx₂.le)).symm)\n  _ ≤ snorm (Set.indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ + (C : ℝ≥0∞) * μ s ^ (1 / ENNReal.toReal p) :=\n    by\n    refine' add_le_add (snorm_mono fun x => norm_indicator_le_of_subset (Set.inter_subset_right _ _) _ _) _\n    rw [← Set.indicator_indicator]\n    rw [snorm_indicator_eq_snorm_restrict hs]\n    have : ∀ᵐ x ∂μ.restrict s, ‖{x : α | ‖f i x‖₊ < C}.indicator (f i) x‖ ≤ C :=\n      by\n      refine' ae_of_all _ _\n      simp_rw [norm_indicator_eq_indicator_norm]\n      exact Set.indicator_le' (fun x (hx : _ < _) => hx.le) fun _ _ => NNReal.coe_nonneg _\n    refine' le_trans (snorm_le_of_ae_bound this) _\n    rw [mul_comm, Measure.restrict_apply' hs, Set.univ_inter, ENNReal.ofReal_coe_nnreal, one_div]\n  _ ≤ ENNReal.ofReal (ε / 2) + C * ENNReal.ofReal (ε / (2 * C)) :=\n    by\n    refine' add_le_add (hC i) (mul_le_mul_left' _ _)\n    rwa [ENNReal.rpow_one_div_le_iff (ENNReal.toReal_pos hpzero hp'),\n      ENNReal.ofReal_rpow_of_pos (div_pos hε (mul_pos two_pos (NNReal.coe_pos.2 hCpos)))]\n  _ ≤ ENNReal.ofReal (ε / 2) + ENNReal.ofReal (ε / 2) :=\n    by\n    refine' add_le_add_left _ _\n    rw [← ENNReal.ofReal_coe_nnreal, ← ENNReal.ofReal_mul (NNReal.coe_nonneg _), ← div_div,\n      mul_div_cancel' _ (NNReal.coe_pos.2 hCpos).ne.symm]\n  _ ≤ ENNReal.ofReal ε := by rw [← ENNReal.ofReal_add (half_pos hε).le (half_pos hε).le, add_halves]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ snorm (indicator s (f i)) p μ ≤\n    snorm (indicator (s ∩ {x | C ≤ ‖f i x‖₊}) (f i)) p μ + snorm (indicator (s ∩ {x | ‖f i x‖₊ < C}) (f i)) p μ\n[PROOFSTEP]\nrefine'\n  le_trans (Eq.le _)\n    (snorm_add_le\n      (StronglyMeasurable.aestronglyMeasurable\n        ((hf i).indicator (hs.inter (stronglyMeasurable_const.measurableSet_le (hf i).nnnorm))))\n      (StronglyMeasurable.aestronglyMeasurable\n        ((hf i).indicator (hs.inter ((hf i).nnnorm.measurableSet_lt stronglyMeasurable_const))))\n      hp)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ snorm (indicator s (f i)) p μ =\n    snorm (indicator (s ∩ {x | C ≤ ‖f i x‖₊}) (f i) + indicator (s ∩ {x | ‖f i x‖₊ < C}) (f i)) p μ\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ indicator s (f i) = indicator (s ∩ {x | C ≤ ‖f i x‖₊}) (f i) + indicator (s ∩ {x | ‖f i x‖₊ < C}) (f i)\n[PROOFSTEP]\nchange _ = fun x => (s ∩ {x : α | C ≤ ‖f i x‖₊}).indicator (f i) x + (s ∩ {x : α | ‖f i x‖₊ < C}).indicator (f i) x\n[GOAL]\ncase e_f\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ indicator s (f i) = fun x => indicator (s ∩ {x | C ≤ ‖f i x‖₊}) (f i) x + indicator (s ∩ {x | ‖f i x‖₊ < C}) (f i) x\n[PROOFSTEP]\nrw [← Set.indicator_union_of_disjoint]\n[GOAL]\ncase e_f\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ indicator s (f i) = indicator (s ∩ {x | C ≤ ‖f i x‖₊} ∪ s ∩ {x | ‖f i x‖₊ < C}) (f i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ indicator s (f i) = indicator (s ∩ {x | C ≤ ‖f i x‖₊} ∪ s ∩ {x | ‖f i x‖₊ < C}) (f i)\n[PROOFSTEP]\nrw [← Set.inter_union_distrib_left,\n  (by ext; simp [le_or_lt] : {x : α | C ≤ ‖f i x‖₊} ∪ {x : α | ‖f i x‖₊ < C} = Set.univ), Set.inter_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ {x | C ≤ ‖f i x‖₊} ∪ {x | ‖f i x‖₊ < C} = univ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\nx✝ : α\n⊢ x✝ ∈ {x | C ≤ ‖f i x‖₊} ∪ {x | ‖f i x‖₊ < C} ↔ x✝ ∈ univ\n[PROOFSTEP]\nsimp [le_or_lt]\n[GOAL]\ncase e_f.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ Disjoint (s ∩ {x | C ≤ ‖f i x‖₊}) (s ∩ {x | ‖f i x‖₊ < C})\n[PROOFSTEP]\nrefine' (Disjoint.inf_right' _ _).inf_left' _\n[GOAL]\ncase e_f.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ Disjoint {x | C ≤ ‖f i x‖₊} {x | ‖f i x‖₊ < C}\n[PROOFSTEP]\nrw [disjoint_iff_inf_le]\n[GOAL]\ncase e_f.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ {x | C ≤ ‖f i x‖₊} ⊓ {x | ‖f i x‖₊ < C} ≤ ⊥\n[PROOFSTEP]\nrintro x ⟨hx₁, hx₂⟩\n[GOAL]\ncase e_f.h.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\nx : α\nhx₁ : x ∈ {x | C ≤ ‖f i x‖₊}\nhx₂ : x ∈ {x | ‖f i x‖₊ < C}\n⊢ x ∈ ⊥\n[PROOFSTEP]\nrw [Set.mem_setOf_eq] at hx₁ hx₂ \n[GOAL]\ncase e_f.h.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\nx : α\nhx₁ : C ≤ ‖f i x‖₊\nhx₂ : ‖f i x‖₊ < C\n⊢ x ∈ ⊥\n[PROOFSTEP]\nexact False.elim (hx₂.ne (eq_of_le_of_not_lt hx₁ (not_lt.2 hx₂.le)).symm)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ snorm (indicator (s ∩ {x | C ≤ ‖f i x‖₊}) (f i)) p μ + snorm (indicator (s ∩ {x | ‖f i x‖₊ < C}) (f i)) p μ ≤\n    snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ + ↑C * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrefine' add_le_add (snorm_mono fun x => norm_indicator_le_of_subset (Set.inter_subset_right _ _) _ _) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ snorm (indicator (s ∩ {x | ‖f i x‖₊ < C}) (f i)) p μ ≤ ↑C * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [← Set.indicator_indicator]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ snorm (indicator s (indicator {x | ‖f i x‖₊ < C} (f i))) p μ ≤ ↑C * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [snorm_indicator_eq_snorm_restrict hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ snorm (indicator {x | ‖f i x‖₊ < C} (f i)) p (Measure.restrict μ s) ≤ ↑C * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nhave : ∀ᵐ x ∂μ.restrict s, ‖{x : α | ‖f i x‖₊ < C}.indicator (f i) x‖ ≤ C :=\n  by\n  refine' ae_of_all _ _\n  simp_rw [norm_indicator_eq_indicator_norm]\n  exact Set.indicator_le' (fun x (hx : _ < _) => hx.le) fun _ _ => NNReal.coe_nonneg _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖indicator {x | ‖f i x‖₊ < C} (f i) x‖ ≤ ↑C\n[PROOFSTEP]\nrefine' ae_of_all _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ ∀ (a : α), ‖indicator {x | ‖f i x‖₊ < C} (f i) a‖ ≤ ↑C\n[PROOFSTEP]\nsimp_rw [norm_indicator_eq_indicator_norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ ∀ (a : α), indicator {x | ‖f i x‖₊ < C} (fun a => ‖f i a‖) a ≤ ↑C\n[PROOFSTEP]\nexact Set.indicator_le' (fun x (hx : _ < _) => hx.le) fun _ _ => NNReal.coe_nonneg _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\nthis : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖indicator {x | ‖f i x‖₊ < C} (f i) x‖ ≤ ↑C\n⊢ snorm (indicator {x | ‖f i x‖₊ < C} (f i)) p (Measure.restrict μ s) ≤ ↑C * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrefine' le_trans (snorm_le_of_ae_bound this) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\nthis : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖indicator {x | ‖f i x‖₊ < C} (f i) x‖ ≤ ↑C\n⊢ ↑↑(Measure.restrict μ s) univ ^ (ENNReal.toReal p)⁻¹ * ENNReal.ofReal ↑C ≤ ↑C * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [mul_comm, Measure.restrict_apply' hs, Set.univ_inter, ENNReal.ofReal_coe_nnreal, one_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ + ↑C * ↑↑μ s ^ (1 / ENNReal.toReal p) ≤\n    ENNReal.ofReal (ε / 2) + ↑C * ENNReal.ofReal (ε / (2 * ↑C))\n[PROOFSTEP]\nrefine' add_le_add (hC i) (mul_le_mul_left' _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ ↑↑μ s ^ (1 / ENNReal.toReal p) ≤ ENNReal.ofReal (ε / (2 * ↑C))\n[PROOFSTEP]\nrwa [ENNReal.rpow_one_div_le_iff (ENNReal.toReal_pos hpzero hp'),\n  ENNReal.ofReal_rpow_of_pos (div_pos hε (mul_pos two_pos (NNReal.coe_pos.2 hCpos)))]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ ENNReal.ofReal (ε / 2) + ↑C * ENNReal.ofReal (ε / (2 * ↑C)) ≤ ENNReal.ofReal (ε / 2) + ENNReal.ofReal (ε / 2)\n[PROOFSTEP]\nrefine' add_le_add_left _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ ↑C * ENNReal.ofReal (ε / (2 * ↑C)) ≤ ENNReal.ofReal (ε / 2)\n[PROOFSTEP]\nrw [← ENNReal.ofReal_coe_nnreal, ← ENNReal.ofReal_mul (NNReal.coe_nonneg _), ← div_div,\n  mul_div_cancel' _ (NNReal.coe_pos.2 hCpos).ne.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhpzero : p ≠ 0\nhμ : ¬↑↑μ univ = 0\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhCpos : 0 < C\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal (ε / 2)\ni : ι\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≤ ENNReal.ofReal ((ε / (2 * ↑C)) ^ ENNReal.toReal p)\nhμs' : ¬↑↑μ s = 0\n⊢ ENNReal.ofReal (ε / 2) + ENNReal.ofReal (ε / 2) ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [← ENNReal.ofReal_add (half_pos hε).le (half_pos hε).le, add_halves]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nset g : ι → α → β := fun i => (hf i).choose\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\n⊢ UnifIntegrable f p μ\n[PROOFSTEP]\nrefine'\n  (unifIntegrable_of' μ hp hp' (fun i => (Exists.choose_spec <| hf i).1) fun ε hε => _).ae_eq fun i =>\n    (Exists.choose_spec <| hf i).2.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\n⊢ ∃ C,\n    0 < C ∧\n      ∀ (i : ι),\n        snorm\n            (indicator {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n              (Exists.choose (_ : AEStronglyMeasurable (f i) μ)))\n            p μ ≤\n          ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨C, hC⟩ := h ε hε\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ C,\n    0 < C ∧\n      ∀ (i : ι),\n        snorm\n            (indicator {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n              (Exists.choose (_ : AEStronglyMeasurable (f i) μ)))\n            p μ ≤\n          ENNReal.ofReal ε\n[PROOFSTEP]\nhave hCg : ∀ i, snorm ({x | C ≤ ‖g i x‖₊}.indicator (g i)) p μ ≤ ENNReal.ofReal ε :=\n  by\n  intro i\n  refine' le_trans (le_of_eq <| snorm_congr_ae _) (hC i)\n  filter_upwards [(Exists.choose_spec <| hf i).2] with x hx\n  by_cases hfx : x ∈ {x | C ≤ ‖f i x‖₊}\n  · rw [Set.indicator_of_mem hfx, Set.indicator_of_mem, hx]\n    rwa [Set.mem_setOf, hx] at hfx \n  · rw [Set.indicator_of_not_mem hfx, Set.indicator_of_not_mem]\n    rwa [Set.mem_setOf, hx] at hfx \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nintro i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\n⊢ snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' le_trans (le_of_eq <| snorm_congr_ae _) (hC i)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\n⊢ indicator {x | C ≤ ‖g i x‖₊} (g i) =ᵐ[μ] indicator {x | C ≤ ‖f i x‖₊} (f i)\n[PROOFSTEP]\nfilter_upwards [(Exists.choose_spec <| hf i).2] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\n⊢ indicator {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n      (Exists.choose (_ : AEStronglyMeasurable (f i) μ)) x =\n    indicator {x | C ≤ ‖f i x‖₊} (f i) x\n[PROOFSTEP]\nby_cases hfx : x ∈ {x | C ≤ ‖f i x‖₊}\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\nhfx : x ∈ {x | C ≤ ‖f i x‖₊}\n⊢ indicator {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n      (Exists.choose (_ : AEStronglyMeasurable (f i) μ)) x =\n    indicator {x | C ≤ ‖f i x‖₊} (f i) x\n[PROOFSTEP]\nrw [Set.indicator_of_mem hfx, Set.indicator_of_mem, hx]\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\nhfx : x ∈ {x | C ≤ ‖f i x‖₊}\n⊢ x ∈ {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n[PROOFSTEP]\nrwa [Set.mem_setOf, hx] at hfx \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\nhfx : ¬x ∈ {x | C ≤ ‖f i x‖₊}\n⊢ indicator {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n      (Exists.choose (_ : AEStronglyMeasurable (f i) μ)) x =\n    indicator {x | C ≤ ‖f i x‖₊} (f i) x\n[PROOFSTEP]\nrw [Set.indicator_of_not_mem hfx, Set.indicator_of_not_mem]\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\nhfx : ¬x ∈ {x | C ≤ ‖f i x‖₊}\n⊢ ¬x ∈ {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n[PROOFSTEP]\nrwa [Set.mem_setOf, hx] at hfx \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhCg : ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ C,\n    0 < C ∧\n      ∀ (i : ι),\n        snorm\n            (indicator {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n              (Exists.choose (_ : AEStronglyMeasurable (f i) μ)))\n            p μ ≤\n          ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨max C 1, lt_max_of_lt_right one_pos, fun i => le_trans (snorm_mono fun x => _) (hCg i)⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhCg : ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\n⊢ ‖indicator {x | max C 1 ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n        (Exists.choose (_ : AEStronglyMeasurable (f i) μ)) x‖ ≤\n    ‖indicator {x | C ≤ ‖g i x‖₊} (g i) x‖\n[PROOFSTEP]\nrw [norm_indicator_eq_indicator_norm, norm_indicator_eq_indicator_norm]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ℕ → α → β\ng✝ : α → β\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nf : ι → α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nhCg : ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\n⊢ indicator {x | max C 1 ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n      (fun a => ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) a‖) x ≤\n    indicator {x | C ≤ ‖g i x‖₊} (fun a => ‖g i a‖) x\n[PROOFSTEP]\nexact\n  Set.indicator_le_indicator_of_subset (fun x hx => Set.mem_setOf_eq ▸ le_trans (le_max_left _ _) hx)\n    (fun _ => norm_nonneg _) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf g : ι → α → β\nhf : UniformIntegrable f p μ\nhfg : ∀ (n : ι), f n =ᵐ[μ] g n\n⊢ UniformIntegrable g p μ\n[PROOFSTEP]\nobtain ⟨hfm, hunif, C, hC⟩ := hf\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf g : ι → α → β\nhfg : ∀ (n : ι), f n =ᵐ[μ] g n\nhfm : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhunif : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (f i) p μ ≤ ↑C\n⊢ UniformIntegrable g p μ\n[PROOFSTEP]\nrefine' ⟨fun i => (hfm i).congr (hfg i), (unifIntegrable_congr_ae hfg).1 hunif, C, fun i => _⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf g : ι → α → β\nhfg : ∀ (n : ι), f n =ᵐ[μ] g n\nhfm : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhunif : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (f i) p μ ≤ ↑C\ni : ι\n⊢ snorm (g i) p μ ≤ ↑C\n[PROOFSTEP]\nrw [← snorm_congr_ae (hfg i)]\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf g : ι → α → β\nhfg : ∀ (n : ι), f n =ᵐ[μ] g n\nhfm : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhunif : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (f i) p μ ≤ ↑C\ni : ι\n⊢ snorm (f i) p μ ≤ ↑C\n[PROOFSTEP]\nexact hC i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : ∀ (i : ι), Memℒp (f i) p\n⊢ UniformIntegrable f p μ\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : ∀ (i : ι), Memℒp (f i) p\nval✝ : Fintype ι\n⊢ UniformIntegrable f p μ\n[PROOFSTEP]\nrefine' ⟨fun n => (hf n).1, unifIntegrable_finite μ hp_one hp_top hf, _⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : ∀ (i : ι), Memℒp (f i) p\nval✝ : Fintype ι\n⊢ ∃ C, ∀ (i : ι), snorm (f i) p μ ≤ ↑C\n[PROOFSTEP]\nby_cases hι : Nonempty ι\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : ∀ (i : ι), Memℒp (f i) p\nval✝ : Fintype ι\nhι : Nonempty ι\n⊢ ∃ C, ∀ (i : ι), snorm (f i) p μ ≤ ↑C\n[PROOFSTEP]\nchoose _ hf using hf\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nval✝ : Fintype ι\nhι : Nonempty ι\nh✝ : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhf : ∀ (i : ι), snorm (f i) p μ < ⊤\n⊢ ∃ C, ∀ (i : ι), snorm (f i) p μ ≤ ↑C\n[PROOFSTEP]\nset C :=\n  (Finset.univ.image fun i : ι => snorm (f i) p μ).max'\n    ⟨snorm (f hι.some) p μ, Finset.mem_image.2 ⟨hι.some, Finset.mem_univ _, rfl⟩⟩\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nval✝ : Fintype ι\nhι : Nonempty ι\nh✝ : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhf : ∀ (i : ι), snorm (f i) p μ < ⊤\nC : ℝ≥0∞ :=\n  Finset.max' (Finset.image (fun i => snorm (f i) p μ) Finset.univ)\n    (_ : ∃ x, x ∈ Finset.image (fun i => snorm (f i) p μ) Finset.univ)\n⊢ ∃ C, ∀ (i : ι), snorm (f i) p μ ≤ ↑C\n[PROOFSTEP]\nrefine' ⟨C.toNNReal, fun i => _⟩\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nval✝ : Fintype ι\nhι : Nonempty ι\nh✝ : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhf : ∀ (i : ι), snorm (f i) p μ < ⊤\nC : ℝ≥0∞ :=\n  Finset.max' (Finset.image (fun i => snorm (f i) p μ) Finset.univ)\n    (_ : ∃ x, x ∈ Finset.image (fun i => snorm (f i) p μ) Finset.univ)\ni : ι\n⊢ snorm (f i) p μ ≤ ↑(ENNReal.toNNReal C)\n[PROOFSTEP]\nrw [ENNReal.coe_toNNReal]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nval✝ : Fintype ι\nhι : Nonempty ι\nh✝ : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhf : ∀ (i : ι), snorm (f i) p μ < ⊤\nC : ℝ≥0∞ :=\n  Finset.max' (Finset.image (fun i => snorm (f i) p μ) Finset.univ)\n    (_ : ∃ x, x ∈ Finset.image (fun i => snorm (f i) p μ) Finset.univ)\ni : ι\n⊢ snorm (f i) p μ ≤ C\n[PROOFSTEP]\nexact Finset.le_max' (α := ℝ≥0∞) _ _ (Finset.mem_image.2 ⟨i, Finset.mem_univ _, rfl⟩)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nval✝ : Fintype ι\nhι : Nonempty ι\nh✝ : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhf : ∀ (i : ι), snorm (f i) p μ < ⊤\nC : ℝ≥0∞ :=\n  Finset.max' (Finset.image (fun i => snorm (f i) p μ) Finset.univ)\n    (_ : ∃ x, x ∈ Finset.image (fun i => snorm (f i) p μ) Finset.univ)\ni : ι\n⊢ C ≠ ⊤\n[PROOFSTEP]\nrefine' ne_of_lt ((Finset.max'_lt_iff _ _).2 fun y hy => _)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nval✝ : Fintype ι\nhι : Nonempty ι\nh✝ : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhf : ∀ (i : ι), snorm (f i) p μ < ⊤\nC : ℝ≥0∞ :=\n  Finset.max' (Finset.image (fun i => snorm (f i) p μ) Finset.univ)\n    (_ : ∃ x, x ∈ Finset.image (fun i => snorm (f i) p μ) Finset.univ)\ni : ι\ny : ℝ≥0∞\nhy : y ∈ Finset.image (fun i => snorm (f i) p μ) Finset.univ\n⊢ y < ⊤\n[PROOFSTEP]\nrw [Finset.mem_image] at hy \n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nval✝ : Fintype ι\nhι : Nonempty ι\nh✝ : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhf : ∀ (i : ι), snorm (f i) p μ < ⊤\nC : ℝ≥0∞ :=\n  Finset.max' (Finset.image (fun i => snorm (f i) p μ) Finset.univ)\n    (_ : ∃ x, x ∈ Finset.image (fun i => snorm (f i) p μ) Finset.univ)\ni : ι\ny : ℝ≥0∞\nhy : ∃ a, a ∈ Finset.univ ∧ snorm (f a) p μ = y\n⊢ y < ⊤\n[PROOFSTEP]\nobtain ⟨i, -, rfl⟩ := hy\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nval✝ : Fintype ι\nhι : Nonempty ι\nh✝ : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nhf : ∀ (i : ι), snorm (f i) p μ < ⊤\nC : ℝ≥0∞ :=\n  Finset.max' (Finset.image (fun i => snorm (f i) p μ) Finset.univ)\n    (_ : ∃ x, x ∈ Finset.image (fun i => snorm (f i) p μ) Finset.univ)\ni✝ i : ι\n⊢ snorm (f i) p μ < ⊤\n[PROOFSTEP]\nexact hf i\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : Finite ι\nhp_one : 1 ≤ p\nhp_top : p ≠ ⊤\nhf : ∀ (i : ι), Memℒp (f i) p\nval✝ : Fintype ι\nhι : ¬Nonempty ι\n⊢ ∃ C, ∀ (i : ι), snorm (f i) p μ ≤ ↑C\n[PROOFSTEP]\nexact ⟨0, fun i => False.elim <| hι <| Nonempty.intro i⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ UniformIntegrable f p μ\n[PROOFSTEP]\nrefine' ⟨fun i => (hf i).aestronglyMeasurable, unifIntegrable_of μ hp hp' (fun i => (hf i).aestronglyMeasurable) h, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ C, ∀ (i : ι), snorm (f i) p μ ≤ ↑C\n[PROOFSTEP]\nobtain ⟨C, hC⟩ := h 1 one_pos\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\n⊢ ∃ C, ∀ (i : ι), snorm (f i) p μ ≤ ↑C\n[PROOFSTEP]\nrefine' ⟨((C : ℝ≥0∞) * μ Set.univ ^ p.toReal⁻¹ + 1).toNNReal, fun i => _⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\n⊢ snorm (f i) p μ ≤ ↑(ENNReal.toNNReal (↑C * ↑↑μ univ ^ (ENNReal.toReal p)⁻¹ + 1))\n[PROOFSTEP]\ncalc\n  snorm (f i) p μ ≤\n      snorm ({x : α | ‖f i x‖₊ < C}.indicator (f i)) p μ + snorm ({x : α | C ≤ ‖f i x‖₊}.indicator (f i)) p μ :=\n    by\n    refine'\n      le_trans (snorm_mono fun x => _)\n        (snorm_add_le\n          (StronglyMeasurable.aestronglyMeasurable\n            ((hf i).indicator ((hf i).nnnorm.measurableSet_lt stronglyMeasurable_const)))\n          (StronglyMeasurable.aestronglyMeasurable\n            ((hf i).indicator (stronglyMeasurable_const.measurableSet_le (hf i).nnnorm)))\n          hp)\n    · rw [Pi.add_apply, Set.indicator_apply]\n      split_ifs with hx\n      · rw [Set.indicator_of_not_mem, add_zero]\n        simpa using hx\n      · rw [Set.indicator_of_mem, zero_add]\n        simpa using hx\n  _ ≤ (C : ℝ≥0∞) * μ Set.univ ^ p.toReal⁻¹ + 1 :=\n    by\n    have : ∀ᵐ x ∂μ, ‖{x : α | ‖f i x‖₊ < C}.indicator (f i) x‖₊ ≤ C :=\n      by\n      refine' eventually_of_forall _\n      simp_rw [nnnorm_indicator_eq_indicator_nnnorm]\n      exact Set.indicator_le fun x (hx : _ < _) => hx.le\n    refine' add_le_add (le_trans (snorm_le_of_ae_bound this) _) (ENNReal.ofReal_one ▸ hC i)\n    simp_rw [NNReal.val_eq_coe, ENNReal.ofReal_coe_nnreal, mul_comm]\n    exact le_rfl\n  _ = ((C : ℝ≥0∞) * μ Set.univ ^ p.toReal⁻¹ + 1 : ℝ≥0∞).toNNReal :=\n    by\n    rw [ENNReal.coe_toNNReal]\n    exact\n      ENNReal.add_ne_top.2\n        ⟨ENNReal.mul_ne_top ENNReal.coe_ne_top\n            (ENNReal.rpow_ne_top_of_nonneg (inv_nonneg.2 ENNReal.toReal_nonneg) (measure_lt_top _ _).ne),\n          ENNReal.one_ne_top⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\n⊢ snorm (f i) p μ ≤ snorm (indicator {x | ‖f i x‖₊ < C} (f i)) p μ + snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ\n[PROOFSTEP]\nrefine'\n  le_trans (snorm_mono fun x => _)\n    (snorm_add_le\n      (StronglyMeasurable.aestronglyMeasurable\n        ((hf i).indicator ((hf i).nnnorm.measurableSet_lt stronglyMeasurable_const)))\n      (StronglyMeasurable.aestronglyMeasurable\n        ((hf i).indicator (stronglyMeasurable_const.measurableSet_le (hf i).nnnorm)))\n      hp)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\nx : α\n⊢ ‖f i x‖ ≤ ‖(indicator {x | ‖f i x‖₊ < C} (f i) + indicator {x | C ≤ ‖f i x‖₊} (f i)) x‖\n[PROOFSTEP]\nrw [Pi.add_apply, Set.indicator_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\nx : α\n⊢ ‖f i x‖ ≤ ‖(if x ∈ {x | ‖f i x‖₊ < C} then f i x else 0) + indicator {x | C ≤ ‖f i x‖₊} (f i) x‖\n[PROOFSTEP]\nsplit_ifs with hx\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\nx : α\nhx : x ∈ {x | ‖f i x‖₊ < C}\n⊢ ‖f i x‖ ≤ ‖f i x + indicator {x | C ≤ ‖f i x‖₊} (f i) x‖\n[PROOFSTEP]\nrw [Set.indicator_of_not_mem, add_zero]\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\nx : α\nhx : x ∈ {x | ‖f i x‖₊ < C}\n⊢ ¬x ∈ {x | C ≤ ‖f i x‖₊}\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\nx : α\nhx : ¬x ∈ {x | ‖f i x‖₊ < C}\n⊢ ‖f i x‖ ≤ ‖0 + indicator {x | C ≤ ‖f i x‖₊} (f i) x‖\n[PROOFSTEP]\nrw [Set.indicator_of_mem, zero_add]\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\nx : α\nhx : ¬x ∈ {x | ‖f i x‖₊ < C}\n⊢ x ∈ {x | C ≤ ‖f i x‖₊}\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\n⊢ snorm (indicator {x | ‖f i x‖₊ < C} (f i)) p μ + snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤\n    ↑C * ↑↑μ univ ^ (ENNReal.toReal p)⁻¹ + 1\n[PROOFSTEP]\nhave : ∀ᵐ x ∂μ, ‖{x : α | ‖f i x‖₊ < C}.indicator (f i) x‖₊ ≤ C :=\n  by\n  refine' eventually_of_forall _\n  simp_rw [nnnorm_indicator_eq_indicator_nnnorm]\n  exact Set.indicator_le fun x (hx : _ < _) => hx.le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\n⊢ ∀ᵐ (x : α) ∂μ, ‖indicator {x | ‖f i x‖₊ < C} (f i) x‖₊ ≤ C\n[PROOFSTEP]\nrefine' eventually_of_forall _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\n⊢ ∀ (x : α), ‖indicator {x | ‖f i x‖₊ < C} (f i) x‖₊ ≤ C\n[PROOFSTEP]\nsimp_rw [nnnorm_indicator_eq_indicator_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\n⊢ ∀ (x : α), indicator {x | ‖f i x‖₊ < C} (fun a => ‖f i a‖₊) x ≤ C\n[PROOFSTEP]\nexact Set.indicator_le fun x (hx : _ < _) => hx.le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\nthis : ∀ᵐ (x : α) ∂μ, ‖indicator {x | ‖f i x‖₊ < C} (f i) x‖₊ ≤ C\n⊢ snorm (indicator {x | ‖f i x‖₊ < C} (f i)) p μ + snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤\n    ↑C * ↑↑μ univ ^ (ENNReal.toReal p)⁻¹ + 1\n[PROOFSTEP]\nrefine' add_le_add (le_trans (snorm_le_of_ae_bound this) _) (ENNReal.ofReal_one ▸ hC i)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\nthis : ∀ᵐ (x : α) ∂μ, ‖indicator {x | ‖f i x‖₊ < C} (f i) x‖₊ ≤ C\n⊢ ↑↑μ univ ^ (ENNReal.toReal p)⁻¹ * ENNReal.ofReal ((fun a => ↑a) C) ≤ ↑C * ↑↑μ univ ^ (ENNReal.toReal p)⁻¹\n[PROOFSTEP]\nsimp_rw [NNReal.val_eq_coe, ENNReal.ofReal_coe_nnreal, mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\nthis : ∀ᵐ (x : α) ∂μ, ‖indicator {x | ‖f i x‖₊ < C} (f i) x‖₊ ≤ C\n⊢ ↑C * ↑↑μ univ ^ (ENNReal.toReal p)⁻¹ ≤ ↑C * ↑↑μ univ ^ (ENNReal.toReal p)⁻¹\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\n⊢ ↑C * ↑↑μ univ ^ (ENNReal.toReal p)⁻¹ + 1 = ↑(ENNReal.toNNReal (↑C * ↑↑μ univ ^ (ENNReal.toReal p)⁻¹ + 1))\n[PROOFSTEP]\nrw [ENNReal.coe_toNNReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal 1\ni : ι\n⊢ ↑C * ↑↑μ univ ^ (ENNReal.toReal p)⁻¹ + 1 ≠ ⊤\n[PROOFSTEP]\nexact\n  ENNReal.add_ne_top.2\n    ⟨ENNReal.mul_ne_top ENNReal.coe_ne_top\n        (ENNReal.rpow_ne_top_of_nonneg (inv_nonneg.2 ENNReal.toReal_nonneg) (measure_lt_top _ _).ne),\n      ENNReal.one_ne_top⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ UniformIntegrable f p μ\n[PROOFSTEP]\nset g : ι → α → β := fun i => (hf i).choose\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\n⊢ UniformIntegrable f p μ\n[PROOFSTEP]\nhave hgmeas : ∀ i, StronglyMeasurable (g i) := fun i => (Exists.choose_spec <| hf i).1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\n⊢ UniformIntegrable f p μ\n[PROOFSTEP]\nhave hgeq : ∀ i, g i =ᵐ[μ] f i := fun i => (Exists.choose_spec <| hf i).2.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgeq : ∀ (i : ι), g i =ᵐ[μ] f i\n⊢ UniformIntegrable f p μ\n[PROOFSTEP]\nrefine' (uniformIntegrable_of' hp hp' hgmeas fun ε hε => _).ae_eq hgeq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgeq : ∀ (i : ι), g i =ᵐ[μ] f i\nε : ℝ\nhε : 0 < ε\n⊢ ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨C, hC⟩ := h ε hε\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgeq : ∀ (i : ι), g i =ᵐ[μ] f i\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨C, fun i => le_trans (le_of_eq <| snorm_congr_ae _) (hC i)⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgeq : ∀ (i : ι), g i =ᵐ[μ] f i\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\n⊢ indicator {x | C ≤ ‖g i x‖₊} (g i) =ᵐ[μ] indicator {x | C ≤ ‖f i x‖₊} (f i)\n[PROOFSTEP]\nfilter_upwards [(Exists.choose_spec <| hf i).2] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgeq : ∀ (i : ι), g i =ᵐ[μ] f i\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\n⊢ indicator {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n      (Exists.choose (_ : AEStronglyMeasurable (f i) μ)) x =\n    indicator {x | C ≤ ‖f i x‖₊} (f i) x\n[PROOFSTEP]\nby_cases hfx : x ∈ {x | C ≤ ‖f i x‖₊}\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgeq : ∀ (i : ι), g i =ᵐ[μ] f i\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\nhfx : x ∈ {x | C ≤ ‖f i x‖₊}\n⊢ indicator {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n      (Exists.choose (_ : AEStronglyMeasurable (f i) μ)) x =\n    indicator {x | C ≤ ‖f i x‖₊} (f i) x\n[PROOFSTEP]\nrw [Set.indicator_of_mem hfx, Set.indicator_of_mem, hx]\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgeq : ∀ (i : ι), g i =ᵐ[μ] f i\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\nhfx : x ∈ {x | C ≤ ‖f i x‖₊}\n⊢ x ∈ {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n[PROOFSTEP]\nrwa [Set.mem_setOf, hx] at hfx \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgeq : ∀ (i : ι), g i =ᵐ[μ] f i\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\nhfx : ¬x ∈ {x | C ≤ ‖f i x‖₊}\n⊢ indicator {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n      (Exists.choose (_ : AEStronglyMeasurable (f i) μ)) x =\n    indicator {x | C ≤ ‖f i x‖₊} (f i) x\n[PROOFSTEP]\nrw [Set.indicator_of_not_mem hfx, Set.indicator_of_not_mem]\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\ninst✝ : IsFiniteMeasure μ\nhp : 1 ≤ p\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nh : ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgeq : ∀ (i : ι), g i =ᵐ[μ] f i\nε : ℝ\nhε : 0 < ε\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\nhfx : ¬x ∈ {x | C ≤ ‖f i x‖₊}\n⊢ ¬x ∈ {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n[PROOFSTEP]\nrwa [Set.mem_setOf, hx] at hfx \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nhfu : UniformIntegrable f p μ\nε : ℝ\nhε : 0 < ε\n⊢ ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨-, hfu, M, hM⟩ := hfu\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\n⊢ ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ, hδpos, hδ⟩ := hfu hε\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨C, hC⟩ : ∃ C : ℝ≥0, ∀ i, μ {x | C ≤ ‖f i x‖₊} ≤ ENNReal.ofReal δ :=\n  by\n  by_contra hcon; push_neg at hcon \n  choose ℐ hℐ using hcon\n  lift δ to ℝ≥0 using hδpos.le\n  have : ∀ C : ℝ≥0, C • (δ : ℝ≥0∞) ^ (1 / p.toReal) ≤ snorm (f (ℐ C)) p μ :=\n    by\n    intro C\n    calc\n      C • (δ : ℝ≥0∞) ^ (1 / p.toReal) ≤ C • μ {x | C ≤ ‖f (ℐ C) x‖₊} ^ (1 / p.toReal) :=\n        by\n        rw [ENNReal.smul_def, ENNReal.smul_def, smul_eq_mul, smul_eq_mul]\n        simp_rw [ENNReal.ofReal_coe_nnreal] at hℐ \n        refine' mul_le_mul' le_rfl (ENNReal.rpow_le_rpow (hℐ C).le (one_div_nonneg.2 ENNReal.toReal_nonneg))\n      _ ≤ snorm ({x | C ≤ ‖f (ℐ C) x‖₊}.indicator (f (ℐ C))) p μ :=\n        by\n        refine'\n          snorm_indicator_ge_of_bdd_below hp hp' _ (measurableSet_le measurable_const (hf _).nnnorm.measurable)\n            (eventually_of_forall fun x hx => _)\n        rwa [nnnorm_indicator_eq_indicator_nnnorm, Set.indicator_of_mem hx]\n      _ ≤ snorm (f (ℐ C)) p μ := snorm_indicator_le _\n  specialize this (2 * max M 1 * HPow.hPow δ⁻¹ (1 / p.toReal))\n  rw [ENNReal.coe_rpow_of_nonneg _ (one_div_nonneg.2 ENNReal.toReal_nonneg), ← ENNReal.coe_smul, smul_eq_mul, mul_assoc,\n    NNReal.inv_rpow, inv_mul_cancel (NNReal.rpow_pos (NNReal.coe_pos.1 hδpos)).ne.symm, mul_one, ENNReal.coe_mul, ←\n    NNReal.inv_rpow] at this \n  refine'\n    (lt_of_le_of_lt (le_trans (hM <| ℐ <| 2 * max M 1 * HPow.hPow δ⁻¹ (1 / p.toReal)) (le_max_left (M : ℝ≥0∞) 1))\n          (lt_of_lt_of_le _ this)).ne\n      rfl\n  rw [← ENNReal.coe_one, ← ENNReal.coe_max, ← ENNReal.coe_mul, ENNReal.coe_lt_coe]\n  exact lt_two_mul_self (lt_max_of_lt_right one_pos)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ C, ∀ (i : ι), ↑↑μ {x | C ≤ ‖f i x‖₊} ≤ ENNReal.ofReal δ\n[PROOFSTEP]\nby_contra hcon\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhcon : ¬∃ C, ∀ (i : ι), ↑↑μ {x | C ≤ ‖f i x‖₊} ≤ ENNReal.ofReal δ\n⊢ False\n[PROOFSTEP]\npush_neg at hcon \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhcon : ∀ (C : ℝ≥0), ∃ i, ENNReal.ofReal δ < ↑↑μ {x | C ≤ ‖f i x‖₊}\n⊢ False\n[PROOFSTEP]\nchoose ℐ hℐ using hcon\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nℐ : ℝ≥0 → ι\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\n⊢ False\n[PROOFSTEP]\nlift δ to ℝ≥0 using hδpos.le\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\n⊢ False\n[PROOFSTEP]\nhave : ∀ C : ℝ≥0, C • (δ : ℝ≥0∞) ^ (1 / p.toReal) ≤ snorm (f (ℐ C)) p μ :=\n  by\n  intro C\n  calc\n    C • (δ : ℝ≥0∞) ^ (1 / p.toReal) ≤ C • μ {x | C ≤ ‖f (ℐ C) x‖₊} ^ (1 / p.toReal) :=\n      by\n      rw [ENNReal.smul_def, ENNReal.smul_def, smul_eq_mul, smul_eq_mul]\n      simp_rw [ENNReal.ofReal_coe_nnreal] at hℐ \n      refine' mul_le_mul' le_rfl (ENNReal.rpow_le_rpow (hℐ C).le (one_div_nonneg.2 ENNReal.toReal_nonneg))\n    _ ≤ snorm ({x | C ≤ ‖f (ℐ C) x‖₊}.indicator (f (ℐ C))) p μ :=\n      by\n      refine'\n        snorm_indicator_ge_of_bdd_below hp hp' _ (measurableSet_le measurable_const (hf _).nnnorm.measurable)\n          (eventually_of_forall fun x hx => _)\n      rwa [nnnorm_indicator_eq_indicator_nnnorm, Set.indicator_of_mem hx]\n    _ ≤ snorm (f (ℐ C)) p μ := snorm_indicator_le _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\n⊢ ∀ (C : ℝ≥0), C • ↑δ ^ (1 / ENNReal.toReal p) ≤ snorm (f (ℐ C)) p μ\n[PROOFSTEP]\nintro C\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\nC : ℝ≥0\n⊢ C • ↑δ ^ (1 / ENNReal.toReal p) ≤ snorm (f (ℐ C)) p μ\n[PROOFSTEP]\ncalc\n  C • (δ : ℝ≥0∞) ^ (1 / p.toReal) ≤ C • μ {x | C ≤ ‖f (ℐ C) x‖₊} ^ (1 / p.toReal) :=\n    by\n    rw [ENNReal.smul_def, ENNReal.smul_def, smul_eq_mul, smul_eq_mul]\n    simp_rw [ENNReal.ofReal_coe_nnreal] at hℐ \n    refine' mul_le_mul' le_rfl (ENNReal.rpow_le_rpow (hℐ C).le (one_div_nonneg.2 ENNReal.toReal_nonneg))\n  _ ≤ snorm ({x | C ≤ ‖f (ℐ C) x‖₊}.indicator (f (ℐ C))) p μ :=\n    by\n    refine'\n      snorm_indicator_ge_of_bdd_below hp hp' _ (measurableSet_le measurable_const (hf _).nnnorm.measurable)\n        (eventually_of_forall fun x hx => _)\n    rwa [nnnorm_indicator_eq_indicator_nnnorm, Set.indicator_of_mem hx]\n  _ ≤ snorm (f (ℐ C)) p μ := snorm_indicator_le _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\nC : ℝ≥0\n⊢ C • ↑δ ^ (1 / ENNReal.toReal p) ≤ C • ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊} ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [ENNReal.smul_def, ENNReal.smul_def, smul_eq_mul, smul_eq_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\nC : ℝ≥0\n⊢ ↑C * ↑δ ^ (1 / ENNReal.toReal p) ≤ ↑C * ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊} ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nsimp_rw [ENNReal.ofReal_coe_nnreal] at hℐ \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhℐ : ∀ (C : ℝ≥0), ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\n⊢ ↑C * ↑δ ^ (1 / ENNReal.toReal p) ≤ ↑C * ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊} ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrefine' mul_le_mul' le_rfl (ENNReal.rpow_le_rpow (hℐ C).le (one_div_nonneg.2 ENNReal.toReal_nonneg))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\nC : ℝ≥0\n⊢ C • ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊} ^ (1 / ENNReal.toReal p) ≤ snorm (indicator {x | C ≤ ‖f (ℐ C) x‖₊} (f (ℐ C))) p μ\n[PROOFSTEP]\nrefine'\n  snorm_indicator_ge_of_bdd_below hp hp' _ (measurableSet_le measurable_const (hf _).nnnorm.measurable)\n    (eventually_of_forall fun x hx => _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\nC : ℝ≥0\nx : α\nhx : x ∈ {x | C ≤ ‖f (ℐ C) x‖₊}\n⊢ C ≤ ‖indicator {x | C ≤ ‖f (ℐ C) x‖₊} (f (ℐ C)) x‖₊\n[PROOFSTEP]\nrwa [nnnorm_indicator_eq_indicator_nnnorm, Set.indicator_of_mem hx]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\nthis : ∀ (C : ℝ≥0), C • ↑δ ^ (1 / ENNReal.toReal p) ≤ snorm (f (ℐ C)) p μ\n⊢ False\n[PROOFSTEP]\nspecialize this (2 * max M 1 * HPow.hPow δ⁻¹ (1 / p.toReal))\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\nthis :\n  (2 * max M 1 * δ⁻¹ ^ (1 / ENNReal.toReal p)) • ↑δ ^ (1 / ENNReal.toReal p) ≤\n    snorm (f (ℐ (2 * max M 1 * δ⁻¹ ^ (1 / ENNReal.toReal p)))) p μ\n⊢ False\n[PROOFSTEP]\nrw [ENNReal.coe_rpow_of_nonneg _ (one_div_nonneg.2 ENNReal.toReal_nonneg), ← ENNReal.coe_smul, smul_eq_mul, mul_assoc,\n  NNReal.inv_rpow, inv_mul_cancel (NNReal.rpow_pos (NNReal.coe_pos.1 hδpos)).ne.symm, mul_one, ENNReal.coe_mul, ←\n  NNReal.inv_rpow] at this \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\nthis : ↑2 * ↑(max M 1) ≤ snorm (f (ℐ (2 * max M 1 * δ⁻¹ ^ (1 / ENNReal.toReal p)))) p μ\n⊢ False\n[PROOFSTEP]\nrefine'\n  (lt_of_le_of_lt (le_trans (hM <| ℐ <| 2 * max M 1 * HPow.hPow δ⁻¹ (1 / p.toReal)) (le_max_left (M : ℝ≥0∞) 1))\n        (lt_of_lt_of_le _ this)).ne\n    rfl\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\nthis : ↑2 * ↑(max M 1) ≤ snorm (f (ℐ (2 * max M 1 * δ⁻¹ ^ (1 / ENNReal.toReal p)))) p μ\n⊢ max (↑M) 1 < ↑2 * ↑(max M 1)\n[PROOFSTEP]\nrw [← ENNReal.coe_one, ← ENNReal.coe_max, ← ENNReal.coe_mul, ENNReal.coe_lt_coe]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nℐ : ℝ≥0 → ι\nδ : ℝ≥0\nhδpos : 0 < ↑δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal ↑δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nhℐ : ∀ (C : ℝ≥0), ENNReal.ofReal ↑δ < ↑↑μ {x | C ≤ ‖f (ℐ C) x‖₊}\nthis : ↑2 * ↑(max M 1) ≤ snorm (f (ℐ (2 * max M 1 * δ⁻¹ ^ (1 / ENNReal.toReal p)))) p μ\n⊢ max M 1 < 2 * max M 1\n[PROOFSTEP]\nexact lt_two_mul_self (lt_max_of_lt_right one_pos)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nε : ℝ\nhε : 0 < ε\nhfu : UnifIntegrable f p μ\nM : ℝ≥0\nhM : ∀ (i : ι), snorm (f i) p μ ≤ ↑M\nδ : ℝ\nhδpos : 0 < δ\nhδ :\n  ∀ (i : ι) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nC : ℝ≥0\nhC : ∀ (i : ι), ↑↑μ {x | C ≤ ‖f i x‖₊} ≤ ENNReal.ofReal δ\n⊢ ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nexact ⟨C, fun i => hδ i _ (measurableSet_le measurable_const (hf i).nnnorm.measurable) (hC i)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhfu : UniformIntegrable f p μ\nε : ℝ\nhε : 0 < ε\n⊢ ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nset g : ι → α → β := fun i => (hfu.1 i).choose\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhfu : UniformIntegrable f p μ\nε : ℝ\nhε : 0 < ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\n⊢ ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave hgmeas : ∀ i, StronglyMeasurable (g i) := fun i => (Exists.choose_spec <| hfu.1 i).1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhfu : UniformIntegrable f p μ\nε : ℝ\nhε : 0 < ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\n⊢ ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave hgunif : UniformIntegrable g p μ := hfu.ae_eq fun i => (Exists.choose_spec <| hfu.1 i).2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhfu : UniformIntegrable f p μ\nε : ℝ\nhε : 0 < ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgunif : UniformIntegrable g p μ\n⊢ ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨C, hC⟩ := hgunif.spec' hp hp' hgmeas hε\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhfu : UniformIntegrable f p μ\nε : ℝ\nhε : 0 < ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgunif : UniformIntegrable g p μ\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ C, ∀ (i : ι), snorm (indicator {x | C ≤ ‖f i x‖₊} (f i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨C, fun i => le_trans (le_of_eq <| snorm_congr_ae _) (hC i)⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhfu : UniformIntegrable f p μ\nε : ℝ\nhε : 0 < ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgunif : UniformIntegrable g p μ\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\ni : ι\n⊢ indicator {x | C ≤ ‖f i x‖₊} (f i) =ᵐ[μ] indicator {x | C ≤ ‖g i x‖₊} (g i)\n[PROOFSTEP]\nfilter_upwards [(Exists.choose_spec <| hfu.1 i).2] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhfu : UniformIntegrable f p μ\nε : ℝ\nhε : 0 < ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgunif : UniformIntegrable g p μ\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\n⊢ indicator {x | C ≤ ‖f i x‖₊} (f i) x =\n    indicator {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n      (Exists.choose (_ : AEStronglyMeasurable (f i) μ)) x\n[PROOFSTEP]\nby_cases hfx : x ∈ {x | C ≤ ‖f i x‖₊}\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhfu : UniformIntegrable f p μ\nε : ℝ\nhε : 0 < ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgunif : UniformIntegrable g p μ\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\nhfx : x ∈ {x | C ≤ ‖f i x‖₊}\n⊢ indicator {x | C ≤ ‖f i x‖₊} (f i) x =\n    indicator {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n      (Exists.choose (_ : AEStronglyMeasurable (f i) μ)) x\n[PROOFSTEP]\nrw [Set.indicator_of_mem hfx, Set.indicator_of_mem, hx]\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhfu : UniformIntegrable f p μ\nε : ℝ\nhε : 0 < ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgunif : UniformIntegrable g p μ\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\nhfx : x ∈ {x | C ≤ ‖f i x‖₊}\n⊢ x ∈ {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n[PROOFSTEP]\nrwa [Set.mem_setOf, hx] at hfx \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhfu : UniformIntegrable f p μ\nε : ℝ\nhε : 0 < ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgunif : UniformIntegrable g p μ\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\nhfx : ¬x ∈ {x | C ≤ ‖f i x‖₊}\n⊢ indicator {x | C ≤ ‖f i x‖₊} (f i) x =\n    indicator {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n      (Exists.choose (_ : AEStronglyMeasurable (f i) μ)) x\n[PROOFSTEP]\nrw [Set.indicator_of_not_mem hfx, Set.indicator_of_not_mem]\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf : ι → α → β\nhp : p ≠ 0\nhp' : p ≠ ⊤\nhfu : UniformIntegrable f p μ\nε : ℝ\nhε : 0 < ε\ng : ι → α → β := fun i => Exists.choose (_ : AEStronglyMeasurable (f i) μ)\nhgmeas : ∀ (i : ι), StronglyMeasurable (g i)\nhgunif : UniformIntegrable g p μ\nC : ℝ≥0\nhC : ∀ (i : ι), snorm (indicator {x | C ≤ ‖g i x‖₊} (g i)) p μ ≤ ENNReal.ofReal ε\ni : ι\nx : α\nhx : f i x = Exists.choose (_ : AEStronglyMeasurable (f i) μ) x\nhfx : ¬x ∈ {x | C ≤ ‖f i x‖₊}\n⊢ ¬x ∈ {x | C ≤ ‖Exists.choose (_ : AEStronglyMeasurable (f i) μ) x‖₊}\n[PROOFSTEP]\nrwa [Set.mem_setOf, hx] at hfx \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf : UniformIntegrable f p μ\n⊢ UniformIntegrable (fun n => (∑ i in Finset.range n, f i) / ↑n) p μ\n[PROOFSTEP]\nobtain ⟨hf₁, hf₂, hf₃⟩ := hf\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\n⊢ UniformIntegrable (fun n => (∑ i in Finset.range n, f i) / ↑n) p μ\n[PROOFSTEP]\nrefine' ⟨fun n => _, fun ε hε => _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\n⊢ AEStronglyMeasurable ((fun n => (∑ i in Finset.range n, f i) / ↑n) n) μ\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv]\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\n⊢ AEStronglyMeasurable ((∑ i in Finset.range n, f i) * (↑n)⁻¹) μ\n[PROOFSTEP]\nexact\n  (Finset.aestronglyMeasurable_sum' _ fun i _ => hf₁ i).mul\n    (aestronglyMeasurable_const : AEStronglyMeasurable (fun _ => (↑n : ℝ)⁻¹) μ)\n[GOAL]\ncase intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ x,\n    ∀ (i : ℕ) (s : Set α),\n      MeasurableSet s →\n        ↑↑μ s ≤ ENNReal.ofReal δ →\n          snorm (indicator s ((fun n => (∑ i in Finset.range n, f i) / ↑n) i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nobtain ⟨δ, hδ₁, hδ₂⟩ := hf₂ hε\n[GOAL]\ncase intro.intro.refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\n⊢ ∃ δ x,\n    ∀ (i : ℕ) (s : Set α),\n      MeasurableSet s →\n        ↑↑μ s ≤ ENNReal.ofReal δ →\n          snorm (indicator s ((fun n => (∑ i in Finset.range n, f i) / ↑n) i)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' ⟨δ, hδ₁, fun n s hs hle => _⟩\n[GOAL]\ncase intro.intro.refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (indicator s ((fun n => (∑ i in Finset.range n, f i) / ↑n) n)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, Finset.sum_mul, Set.indicator_finset_sum]\n[GOAL]\ncase intro.intro.refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ snorm (∑ i in Finset.range n, indicator s (f i * (↑n)⁻¹)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' le_trans (snorm_sum_le (fun i _ => ((hf₁ i).mul_const (↑n)⁻¹).indicator hs) hp) _\n[GOAL]\ncase intro.intro.refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ ∑ i in Finset.range n, snorm (indicator s (f i * (↑n)⁻¹)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nhave : ∀ i, s.indicator (f i * (n : α → ℝ)⁻¹) = (↑n : ℝ)⁻¹ • s.indicator (f i) :=\n  by\n  intro i\n  rw [mul_comm, (_ : (↑n)⁻¹ * f i = fun ω => (↑n : ℝ)⁻¹ • f i ω)]\n  · rw [Set.indicator_const_smul s (↑n : ℝ)⁻¹ (f i)]\n    rfl\n  · rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\n⊢ ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\n[PROOFSTEP]\nintro i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\ni : ℕ\n⊢ indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\n[PROOFSTEP]\nrw [mul_comm, (_ : (↑n)⁻¹ * f i = fun ω => (↑n : ℝ)⁻¹ • f i ω)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\ni : ℕ\n⊢ (indicator s fun ω => (↑n)⁻¹ • f i ω) = (↑n)⁻¹ • indicator s (f i)\n[PROOFSTEP]\nrw [Set.indicator_const_smul s (↑n : ℝ)⁻¹ (f i)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\ni : ℕ\n⊢ (fun x => (↑n)⁻¹ • indicator s (f i) x) = (↑n)⁻¹ • indicator s (f i)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\ni : ℕ\n⊢ (↑n)⁻¹ * f i = fun ω => (↑n)⁻¹ • f i ω\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\n⊢ ∑ i in Finset.range n, snorm (indicator s (f i * (↑n)⁻¹)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimp_rw [this, snorm_const_smul, ← Finset.mul_sum, nnnorm_inv, Real.nnnorm_coe_nat]\n[GOAL]\ncase intro.intro.refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\n⊢ ↑(↑n)⁻¹ * ∑ x in Finset.range n, snorm (indicator s (f x)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nby_cases hn : (↑(↑n : ℝ≥0)⁻¹ : ℝ≥0∞) = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ↑(↑n)⁻¹ = 0\n⊢ ↑(↑n)⁻¹ * ∑ x in Finset.range n, snorm (indicator s (f x)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimp only [hn, zero_mul, zero_le]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬↑(↑n)⁻¹ = 0\n⊢ ↑(↑n)⁻¹ * ∑ x in Finset.range n, snorm (indicator s (f x)) p μ ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' le_trans _ (_ : ↑(↑n : ℝ≥0)⁻¹ * n • ENNReal.ofReal ε ≤ ENNReal.ofReal ε)\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬↑(↑n)⁻¹ = 0\n⊢ ↑(↑n)⁻¹ * ∑ x in Finset.range n, snorm (indicator s (f x)) p μ ≤ ↑(↑n)⁻¹ * n • ENNReal.ofReal ε\n[PROOFSTEP]\nrefine' (ENNReal.mul_le_mul_left hn ENNReal.coe_ne_top).2 _\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬↑(↑n)⁻¹ = 0\n⊢ ∑ x in Finset.range n, snorm (indicator s (f x)) p μ ≤ n • ENNReal.ofReal ε\n[PROOFSTEP]\nconv_rhs => rw [← Finset.card_range n]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬↑(↑n)⁻¹ = 0\n| n • ENNReal.ofReal ε\n[PROOFSTEP]\nrw [← Finset.card_range n]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬↑(↑n)⁻¹ = 0\n| n • ENNReal.ofReal ε\n[PROOFSTEP]\nrw [← Finset.card_range n]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬↑(↑n)⁻¹ = 0\n| n • ENNReal.ofReal ε\n[PROOFSTEP]\nrw [← Finset.card_range n]\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬↑(↑n)⁻¹ = 0\n⊢ ∑ x in Finset.range n, snorm (indicator s (f x)) p μ ≤ Finset.card (Finset.range n) • ENNReal.ofReal ε\n[PROOFSTEP]\nexact Finset.sum_le_card_nsmul _ _ _ fun i _ => hδ₂ _ _ hs hle\n[GOAL]\ncase neg.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬↑(↑n)⁻¹ = 0\n⊢ ↑(↑n)⁻¹ * n • ENNReal.ofReal ε ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nsimp only [ENNReal.coe_eq_zero, inv_eq_zero, Nat.cast_eq_zero] at hn \n[GOAL]\ncase neg.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬n = 0\n⊢ ↑(↑n)⁻¹ * n • ENNReal.ofReal ε ≤ ENNReal.ofReal ε\n[PROOFSTEP]\nrw [nsmul_eq_mul, ← mul_assoc, ENNReal.coe_inv, ENNReal.coe_nat, ENNReal.inv_mul_cancel _ (ENNReal.nat_ne_top _),\n  one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬n = 0\n⊢ ↑n ≠ 0\ncase neg.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬n = 0\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nall_goals simpa only [Ne.def, Nat.cast_eq_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬n = 0\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, Nat.cast_eq_zero]\n[GOAL]\ncase neg.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nε : ℝ\nhε : 0 < ε\nδ : ℝ\nhδ₁ : 0 < δ\nhδ₂ :\n  ∀ (i : ℕ) (s : Set α), MeasurableSet s → ↑↑μ s ≤ ENNReal.ofReal δ → snorm (indicator s (f i)) p μ ≤ ENNReal.ofReal ε\nn : ℕ\ns : Set α\nhs : MeasurableSet s\nhle : ↑↑μ s ≤ ENNReal.ofReal δ\nthis : ∀ (i : ℕ), indicator s (f i * (↑n)⁻¹) = (↑n)⁻¹ • indicator s (f i)\nhn : ¬n = 0\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, Nat.cast_eq_zero]\n[GOAL]\ncase intro.intro.refine'_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nhf₃ : ∃ C, ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\n⊢ ∃ C, ∀ (i : ℕ), snorm ((fun n => (∑ i in Finset.range n, f i) / ↑n) i) p μ ≤ ↑C\n[PROOFSTEP]\nobtain ⟨C, hC⟩ := hf₃\n[GOAL]\ncase intro.intro.refine'_3.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\n⊢ ∃ C, ∀ (i : ℕ), snorm ((fun n => (∑ i in Finset.range n, f i) / ↑n) i) p μ ≤ ↑C\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, Finset.sum_mul]\n[GOAL]\ncase intro.intro.refine'_3.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\n⊢ ∃ C, ∀ (i : ℕ), snorm (∑ x in Finset.range i, f x * (↑i)⁻¹) p μ ≤ ↑C\n[PROOFSTEP]\nrefine' ⟨C, fun n => (snorm_sum_le (fun i _ => (hf₁ i).mul_const (↑n)⁻¹) hp).trans _⟩\n[GOAL]\ncase intro.intro.refine'_3.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\n⊢ ∑ i in Finset.range n, snorm (fun x => f i x * (↑n)⁻¹) p μ ≤ ↑C\n[PROOFSTEP]\nhave : ∀ i, (fun ω => f i ω * (↑n)⁻¹) = (↑n : ℝ)⁻¹ • fun ω => f i ω :=\n  by\n  intro i\n  ext ω\n  simp only [mul_comm, Pi.smul_apply, Algebra.id.smul_eq_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\n⊢ ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\n[PROOFSTEP]\nintro i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn i : ℕ\n⊢ (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\n[PROOFSTEP]\next ω\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn i : ℕ\nω : α\n⊢ f i ω * (↑n)⁻¹ = ((↑n)⁻¹ • fun ω => f i ω) ω\n[PROOFSTEP]\nsimp only [mul_comm, Pi.smul_apply, Algebra.id.smul_eq_mul]\n[GOAL]\ncase intro.intro.refine'_3.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\n⊢ ∑ i in Finset.range n, snorm (fun x => f i x * (↑n)⁻¹) p μ ≤ ↑C\n[PROOFSTEP]\nsimp_rw [this, snorm_const_smul, ← Finset.mul_sum, nnnorm_inv, Real.nnnorm_coe_nat]\n[GOAL]\ncase intro.intro.refine'_3.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\n⊢ ↑(↑n)⁻¹ * ∑ x in Finset.range n, snorm (fun ω => f x ω) p μ ≤ ↑C\n[PROOFSTEP]\nby_cases hn : (↑(↑n : ℝ≥0)⁻¹ : ℝ≥0∞) = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ↑(↑n)⁻¹ = 0\n⊢ ↑(↑n)⁻¹ * ∑ x in Finset.range n, snorm (fun ω => f x ω) p μ ≤ ↑C\n[PROOFSTEP]\nsimp only [hn, zero_mul, zero_le]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬↑(↑n)⁻¹ = 0\n⊢ ↑(↑n)⁻¹ * ∑ x in Finset.range n, snorm (fun ω => f x ω) p μ ≤ ↑C\n[PROOFSTEP]\nrefine' le_trans _ (_ : ↑(↑n : ℝ≥0)⁻¹ * (n • C : ℝ≥0∞) ≤ C)\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬↑(↑n)⁻¹ = 0\n⊢ ↑(↑n)⁻¹ * ∑ x in Finset.range n, snorm (fun ω => f x ω) p μ ≤ ↑(↑n)⁻¹ * ↑(n • C)\n[PROOFSTEP]\nrefine' (ENNReal.mul_le_mul_left hn ENNReal.coe_ne_top).2 _\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬↑(↑n)⁻¹ = 0\n⊢ ∑ x in Finset.range n, snorm (fun ω => f x ω) p μ ≤ ↑(n • C)\n[PROOFSTEP]\nconv_rhs =>\n  rw [← Finset.card_range n]\n    -- Porting note: Originally `exact Finset.sum_le_card_nsmul _ _ _ fun i hi => hC i`\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬↑(↑n)⁻¹ = 0\n| ↑(n • C)\n[PROOFSTEP]\nrw [← Finset.card_range n]\n    -- Porting note: Originally `exact Finset.sum_le_card_nsmul _ _ _ fun i hi => hC i`\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬↑(↑n)⁻¹ = 0\n| ↑(n • C)\n[PROOFSTEP]\nrw [← Finset.card_range n]\n    -- Porting note: Originally `exact Finset.sum_le_card_nsmul _ _ _ fun i hi => hC i`\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬↑(↑n)⁻¹ = 0\n| ↑(n • C)\n[PROOFSTEP]\nrw [← Finset.card_range n]\n  -- Porting note: Originally `exact Finset.sum_le_card_nsmul _ _ _ fun i hi => hC i`\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬↑(↑n)⁻¹ = 0\n⊢ ∑ x in Finset.range n, snorm (fun ω => f x ω) p μ ≤ ↑(Finset.card (Finset.range n) • C)\n[PROOFSTEP]\nconvert Finset.sum_le_card_nsmul _ _ _ fun i _ => hC i\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬↑(↑n)⁻¹ = 0\n⊢ ↑(Finset.card (Finset.range n) • C) = Finset.card (Finset.range n) • ↑C\n[PROOFSTEP]\nrw [ENNReal.coe_smul]\n[GOAL]\ncase neg.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬↑(↑n)⁻¹ = 0\n⊢ ↑(↑n)⁻¹ * ↑(n • C) ≤ ↑C\n[PROOFSTEP]\nsimp only [ENNReal.coe_eq_zero, inv_eq_zero, Nat.cast_eq_zero] at hn \n[GOAL]\ncase neg.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬n = 0\n⊢ ↑(↑n)⁻¹ * ↑(n • C) ≤ ↑C\n[PROOFSTEP]\nrw [ENNReal.coe_smul, nsmul_eq_mul, ← mul_assoc, ENNReal.coe_inv, ENNReal.coe_nat,\n  ENNReal.inv_mul_cancel _ (ENNReal.nat_ne_top _), one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬n = 0\n⊢ ↑n ≠ 0\ncase neg.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬n = 0\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nall_goals simpa only [Ne.def, Nat.cast_eq_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬n = 0\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, Nat.cast_eq_zero]\n[GOAL]\ncase neg.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup β\np : ℝ≥0∞\nf✝ : ι → α → β\nhp : 1 ≤ p\nf : ℕ → α → ℝ\nhf₁ : ∀ (i : ℕ), AEStronglyMeasurable (f i) μ\nhf₂ : UnifIntegrable f p μ\nC : ℝ≥0\nhC : ∀ (i : ℕ), snorm (f i) p μ ≤ ↑C\nn : ℕ\nthis : ∀ (i : ℕ), (fun ω => f i ω * (↑n)⁻¹) = (↑n)⁻¹ • fun ω => f i ω\nhn : ¬n = 0\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, Nat.cast_eq_zero]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.UniformIntegrable", "llama_tokens": 195591, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7310585786300049, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.39118829665891974}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\npb : PowerBasis K S\n⊢ FiniteDimensional.finrank K S = pb.dim\n[PROOFSTEP]\nrw [FiniteDimensional.finrank_eq_card_basis pb.basis, Fintype.card_fin]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\n⊢ y ∈ Submodule.span R (Set.range fun i => x ^ ↑i) ↔ ∃ f, degree f < ↑d ∧ y = ↑(aeval x) f\n[PROOFSTEP]\nhave : (Set.range fun i : Fin d => x ^ (i : ℕ)) = (fun i : ℕ => x ^ i) '' ↑(Finset.range d) :=\n  by\n  ext n\n  simp_rw [Set.mem_range, Set.mem_image, Finset.mem_coe, Finset.mem_range]\n  exact ⟨fun ⟨⟨i, hi⟩, hy⟩ => ⟨i, hi, hy⟩, fun ⟨i, hi, hy⟩ => ⟨⟨i, hi⟩, hy⟩⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\n⊢ (Set.range fun i => x ^ ↑i) = (fun i => x ^ i) '' ↑(Finset.range d)\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nn : S\n⊢ (n ∈ Set.range fun i => x ^ ↑i) ↔ n ∈ (fun i => x ^ i) '' ↑(Finset.range d)\n[PROOFSTEP]\nsimp_rw [Set.mem_range, Set.mem_image, Finset.mem_coe, Finset.mem_range]\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nn : S\n⊢ (∃ y, x ^ ↑y = n) ↔ ∃ x_1, x_1 < d ∧ x ^ x_1 = n\n[PROOFSTEP]\nexact ⟨fun ⟨⟨i, hi⟩, hy⟩ => ⟨i, hi, hy⟩, fun ⟨i, hi, hy⟩ => ⟨⟨i, hi⟩, hy⟩⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nthis : (Set.range fun i => x ^ ↑i) = (fun i => x ^ i) '' ↑(Finset.range d)\n⊢ y ∈ Submodule.span R (Set.range fun i => x ^ ↑i) ↔ ∃ f, degree f < ↑d ∧ y = ↑(aeval x) f\n[PROOFSTEP]\nsimp only [this, Finsupp.mem_span_image_iff_total, degree_lt_iff_coeff_zero, exists_iff_exists_finsupp, coeff, aeval,\n  eval₂RingHom', eval₂_eq_sum, Polynomial.sum, support, Finsupp.mem_supported', Finsupp.total, Finsupp.sum,\n  Algebra.smul_def, eval₂_zero, exists_prop, LinearMap.id_coe, eval₂_one, id.def, not_lt, Finsupp.coe_lsum,\n  LinearMap.coe_smulRight, Finset.mem_range, AlgHom.coe_mks, Finset.mem_coe]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nthis : (Set.range fun i => x ^ ↑i) = (fun i => x ^ i) '' ↑(Finset.range d)\n⊢ (∃ l, (∀ (x : ℕ), d ≤ x → ↑l x = 0) ∧ (Finset.sum l.support fun x_1 => ↑(algebraMap R S) (↑l x_1) * x ^ x_1) = y) ↔\n    ∃ q, (∀ (m : ℕ), d ≤ m → ↑q m = 0) ∧ y = Finset.sum q.support fun x_1 => ↑(algebraMap R S) (↑q x_1) * x ^ x_1\n[PROOFSTEP]\nsimp_rw [@eq_comm _ y]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nthis : (Set.range fun i => x ^ ↑i) = (fun i => x ^ i) '' ↑(Finset.range d)\n⊢ (∃ l, (∀ (x : ℕ), d ≤ x → ↑l x = 0) ∧ (Finset.sum l.support fun x_1 => ↑(algebraMap R S) (↑l x_1) * x ^ x_1) = y) ↔\n    ∃ q, (∀ (m : ℕ), d ≤ m → ↑q m = 0) ∧ (Finset.sum q.support fun x_1 => ↑(algebraMap R S) (↑q x_1) * x ^ x_1) = y\n[PROOFSTEP]\nexact Iff.rfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\n⊢ y ∈ Submodule.span R (Set.range fun i => x ^ ↑i) ↔ ∃ f, natDegree f < d ∧ y = ↑(aeval x) f\n[PROOFSTEP]\nrw [mem_span_pow']\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\n⊢ (∃ f, degree f < ↑d ∧ y = ↑(aeval x) f) ↔ ∃ f, natDegree f < d ∧ y = ↑(aeval x) f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\n⊢ (∃ f, degree f < ↑d ∧ y = ↑(aeval x) f) → ∃ f, natDegree f < d ∧ y = ↑(aeval x) f\n[PROOFSTEP]\nrintro ⟨f, h, hy⟩\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : degree f < ↑d\nhy : y = ↑(aeval x) f\n⊢ ∃ f, natDegree f < d ∧ y = ↑(aeval x) f\n[PROOFSTEP]\nrefine' ⟨f, _, hy⟩\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : degree f < ↑d\nhy : y = ↑(aeval x) f\n⊢ natDegree f < d\n[PROOFSTEP]\nby_cases hf : f = 0\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : degree f < ↑d\nhy : y = ↑(aeval x) f\nhf : f = 0\n⊢ natDegree f < d\n[PROOFSTEP]\nsimp only [hf, natDegree_zero, degree_zero] at h ⊢\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nhy : y = ↑(aeval x) f\nhf : f = 0\nh : ⊥ < ↑d\n⊢ 0 < d\n[PROOFSTEP]\nfirst\n| exact lt_of_le_of_ne (Nat.zero_le d) hd.symm\n| exact WithBot.bot_lt_coe d\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nhy : y = ↑(aeval x) f\nhf : f = 0\nh : ⊥ < ↑d\n⊢ 0 < d\n[PROOFSTEP]\nexact lt_of_le_of_ne (Nat.zero_le d) hd.symm\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : degree f < ↑d\nhy : y = ↑(aeval x) f\nhf : ¬f = 0\n⊢ natDegree f < d\n[PROOFSTEP]\nsimp_all only [degree_eq_natDegree hf]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : ↑(natDegree f) < ↑d\nhy : y = ↑(aeval x) f\nhf : ¬f = 0\n⊢ natDegree f < d\n[PROOFSTEP]\nfirst\n| exact WithBot.coe_lt_coe.1 h\n| exact WithBot.coe_lt_coe.2 h\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : ↑(natDegree f) < ↑d\nhy : y = ↑(aeval x) f\nhf : ¬f = 0\n⊢ natDegree f < d\n[PROOFSTEP]\nexact WithBot.coe_lt_coe.1 h\n[GOAL]\ncase mpr\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\n⊢ (∃ f, natDegree f < d ∧ y = ↑(aeval x) f) → ∃ f, degree f < ↑d ∧ y = ↑(aeval x) f\n[PROOFSTEP]\nrintro ⟨f, h, hy⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : natDegree f < d\nhy : y = ↑(aeval x) f\n⊢ ∃ f, degree f < ↑d ∧ y = ↑(aeval x) f\n[PROOFSTEP]\nrefine' ⟨f, _, hy⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : natDegree f < d\nhy : y = ↑(aeval x) f\n⊢ degree f < ↑d\n[PROOFSTEP]\nby_cases hf : f = 0\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : natDegree f < d\nhy : y = ↑(aeval x) f\nhf : f = 0\n⊢ degree f < ↑d\n[PROOFSTEP]\nsimp only [hf, natDegree_zero, degree_zero] at h ⊢\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nhy : y = ↑(aeval x) f\nhf : f = 0\nh : 0 < d\n⊢ ⊥ < ↑d\n[PROOFSTEP]\nfirst\n| exact lt_of_le_of_ne (Nat.zero_le d) hd.symm\n| exact WithBot.bot_lt_coe d\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nhy : y = ↑(aeval x) f\nhf : f = 0\nh : 0 < d\n⊢ ⊥ < ↑d\n[PROOFSTEP]\nexact lt_of_le_of_ne (Nat.zero_le d) hd.symm\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nhy : y = ↑(aeval x) f\nhf : f = 0\nh : 0 < d\n⊢ ⊥ < ↑d\n[PROOFSTEP]\nexact WithBot.bot_lt_coe d\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : natDegree f < d\nhy : y = ↑(aeval x) f\nhf : ¬f = 0\n⊢ degree f < ↑d\n[PROOFSTEP]\nsimp_all only [degree_eq_natDegree hf]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : natDegree f < d\nhy : y = ↑(aeval x) f\nhf : ¬f = 0\n⊢ ↑(natDegree f) < ↑d\n[PROOFSTEP]\nfirst\n| exact WithBot.coe_lt_coe.1 h\n| exact WithBot.coe_lt_coe.2 h\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : natDegree f < d\nhy : y = ↑(aeval x) f\nhf : ¬f = 0\n⊢ ↑(natDegree f) < ↑d\n[PROOFSTEP]\nexact WithBot.coe_lt_coe.1 h\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\nx y : S\nd : ℕ\nhd : d ≠ 0\nf : R[X]\nh : natDegree f < d\nhy : y = ↑(aeval x) f\nhf : ¬f = 0\n⊢ ↑(natDegree f) < ↑d\n[PROOFSTEP]\nexact WithBot.coe_lt_coe.2 h\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Nontrivial S\npb : PowerBasis R S\ny : S\n⊢ y ∈ Submodule.span R (Set.range fun i => pb.gen ^ ↑i)\n[PROOFSTEP]\nsimpa using pb.basis.mem_span y\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\npb : PowerBasis R S\ny : S\n⊢ ∃ f, y = ↑(aeval pb.gen) f\n[PROOFSTEP]\nnontriviality S\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\npb : PowerBasis R S\ny : S\n✝ : Nontrivial S\n⊢ ∃ f, y = ↑(aeval pb.gen) f\n[PROOFSTEP]\nobtain ⟨f, _, hf⟩ := exists_eq_aeval pb y\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : IsDomain B\ninst✝¹ : Algebra A B\nK : Type u_6\ninst✝ : Field K\npb : PowerBasis R S\ny : S\n✝ : Nontrivial S\nf : R[X]\nleft✝ : natDegree f < pb.dim\nhf : y = ↑(aeval pb.gen) f\n⊢ ∃ f, y = ↑(aeval pb.gen) f\n[PROOFSTEP]\nexact ⟨f, hf⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Algebra A B\nK : Type u_6\ninst✝² : Field K\nS' : Type u_7\ninst✝¹ : Semiring S'\ninst✝ : Algebra R S'\npb : PowerBasis R S\nf g : S →ₐ[R] S'\nh : ↑f pb.gen = ↑g pb.gen\n⊢ f = g\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Algebra A B\nK : Type u_6\ninst✝² : Field K\nS' : Type u_7\ninst✝¹ : Semiring S'\ninst✝ : Algebra R S'\npb : PowerBasis R S\nf g : S →ₐ[R] S'\nh : ↑f pb.gen = ↑g pb.gen\nx : S\n⊢ ↑f x = ↑g x\n[PROOFSTEP]\nobtain ⟨f, rfl⟩ := pb.exists_eq_aeval' x\n[GOAL]\ncase H.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Algebra A B\nK : Type u_6\ninst✝² : Field K\nS' : Type u_7\ninst✝¹ : Semiring S'\ninst✝ : Algebra R S'\npb : PowerBasis R S\nf✝ g : S →ₐ[R] S'\nh : ↑f✝ pb.gen = ↑g pb.gen\nf : R[X]\n⊢ ↑f✝ (↑(aeval pb.gen) f) = ↑g (↑(aeval pb.gen) f)\n[PROOFSTEP]\nrw [← Polynomial.aeval_algHom_apply, ← Polynomial.aeval_algHom_apply, h]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n⊢ ↑(aeval pb.gen) (minpolyGen pb) = 0\n[PROOFSTEP]\nsimp_rw [minpolyGen, AlgHom.map_sub, AlgHom.map_sum, AlgHom.map_mul, AlgHom.map_pow, aeval_C, ← Algebra.smul_def,\n  aeval_X]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n⊢ pb.gen ^ pb.dim - ∑ x : Fin pb.dim, ↑(↑pb.basis.repr (pb.gen ^ pb.dim)) x • pb.gen ^ ↑x = 0\n[PROOFSTEP]\nrefine' sub_eq_zero.mpr ((pb.basis.total_repr (pb.gen ^ pb.dim)).symm.trans _)\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n⊢ ↑(Finsupp.total (Fin pb.dim) S A ↑pb.basis) (↑pb.basis.repr (pb.gen ^ pb.dim)) =\n    ∑ x : Fin pb.dim, ↑(↑pb.basis.repr (pb.gen ^ pb.dim)) x • pb.gen ^ ↑x\n[PROOFSTEP]\nrw [Finsupp.total_apply, Finsupp.sum_fintype]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n⊢ ∑ i : Fin pb.dim, ↑(↑pb.basis.repr (pb.gen ^ pb.dim)) i • ↑pb.basis i =\n    ∑ x : Fin pb.dim, ↑(↑pb.basis.repr (pb.gen ^ pb.dim)) x • pb.gen ^ ↑x\n[PROOFSTEP]\nsimp only [pb.coe_basis, zero_smul, eq_self_iff_true, imp_true_iff]\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n⊢ ∀ (i : Fin pb.dim), 0 • ↑pb.basis i = 0\n[PROOFSTEP]\nsimp only [pb.coe_basis, zero_smul, eq_self_iff_true, imp_true_iff]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n⊢ Monic (minpolyGen pb)\n[PROOFSTEP]\nnontriviality A\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n✝ : Nontrivial A\n⊢ Monic (minpolyGen pb)\n[PROOFSTEP]\napply (monic_X_pow _).sub_of_left _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n✝ : Nontrivial A\n⊢ degree (∑ i : Fin pb.dim, ↑C (↑(↑pb.basis.repr (pb.gen ^ pb.dim)) i) * X ^ ↑i) < degree (X ^ pb.dim)\n[PROOFSTEP]\nrw [degree_X_pow]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n✝ : Nontrivial A\n⊢ degree (∑ i : Fin pb.dim, ↑C (↑(↑pb.basis.repr (pb.gen ^ pb.dim)) i) * X ^ ↑i) < ↑pb.dim\n[PROOFSTEP]\nexact degree_sum_fin_lt _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\np : A[X]\nne_zero : p ≠ 0\nroot : ↑(aeval pb.gen) p = 0\n⊢ pb.dim ≤ natDegree p\n[PROOFSTEP]\nrefine' le_of_not_lt fun hlt => ne_zero _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\np : A[X]\nne_zero : p ≠ 0\nroot : ↑(aeval pb.gen) p = 0\nhlt : natDegree p < pb.dim\n⊢ p = 0\n[PROOFSTEP]\nrw [p.as_sum_range' _ hlt, Finset.sum_range]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\np : A[X]\nne_zero : p ≠ 0\nroot : ↑(aeval pb.gen) p = 0\nhlt : natDegree p < pb.dim\n⊢ ∑ i : Fin pb.dim, ↑(monomial ↑i) (coeff p ↑i) = 0\n[PROOFSTEP]\nrefine' Fintype.sum_eq_zero _ fun i => _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\np : A[X]\nne_zero : p ≠ 0\nroot : ↑(aeval pb.gen) p = 0\nhlt : natDegree p < pb.dim\ni : Fin pb.dim\n⊢ ↑(monomial ↑i) (coeff p ↑i) = 0\n[PROOFSTEP]\nsimp_rw [aeval_eq_sum_range' hlt, Finset.sum_range, ← pb.basis_eq_pow] at root \n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\np : A[X]\nne_zero : p ≠ 0\nhlt : natDegree p < pb.dim\ni : Fin pb.dim\nroot : ∑ x : Fin pb.dim, coeff p ↑x • ↑pb.basis x = 0\n⊢ ↑(monomial ↑i) (coeff p ↑i) = 0\n[PROOFSTEP]\nhave := Fintype.linearIndependent_iff.1 pb.basis.linearIndependent _ root\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\np : A[X]\nne_zero : p ≠ 0\nhlt : natDegree p < pb.dim\ni : Fin pb.dim\nroot : ∑ x : Fin pb.dim, coeff p ↑x • ↑pb.basis x = 0\nthis : ∀ (i : Fin pb.dim), coeff p ↑i = 0\n⊢ ↑(monomial ↑i) (coeff p ↑i) = 0\n[PROOFSTEP]\nrw [this, monomial_zero_right]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\nh : PowerBasis A S\np : A[X]\nne_zero : p ≠ 0\nroot : ↑(aeval h.gen) p = 0\n⊢ ↑h.dim ≤ degree p\n[PROOFSTEP]\nrw [degree_eq_natDegree ne_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\nh : PowerBasis A S\np : A[X]\nne_zero : p ≠ 0\nroot : ↑(aeval h.gen) p = 0\n⊢ ↑h.dim ≤ ↑(natDegree p)\n[PROOFSTEP]\nexact WithBot.coe_le_coe.2 (h.dim_le_natDegree_of_root ne_zero root)\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Algebra A B\nK : Type u_6\ninst✝² : Field K\ninst✝¹ : Algebra A S\ninst✝ : Nontrivial A\npb : PowerBasis A S\n⊢ degree (minpolyGen pb) = ↑pb.dim\n[PROOFSTEP]\nunfold minpolyGen\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Algebra A B\nK : Type u_6\ninst✝² : Field K\ninst✝¹ : Algebra A S\ninst✝ : Nontrivial A\npb : PowerBasis A S\n⊢ degree (X ^ pb.dim - ∑ i : Fin pb.dim, ↑C (↑(↑pb.basis.repr (pb.gen ^ pb.dim)) i) * X ^ ↑i) = ↑pb.dim\n[PROOFSTEP]\nrw [degree_sub_eq_left_of_degree_lt]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Algebra A B\nK : Type u_6\ninst✝² : Field K\ninst✝¹ : Algebra A S\ninst✝ : Nontrivial A\npb : PowerBasis A S\n⊢ degree (X ^ pb.dim) = ↑pb.dim\n[PROOFSTEP]\nrw [degree_X_pow]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Algebra A B\nK : Type u_6\ninst✝² : Field K\ninst✝¹ : Algebra A S\ninst✝ : Nontrivial A\npb : PowerBasis A S\n⊢ degree (∑ i : Fin pb.dim, ↑C (↑(↑pb.basis.repr (pb.gen ^ pb.dim)) i) * X ^ ↑i) < degree (X ^ pb.dim)\n[PROOFSTEP]\nrw [degree_X_pow]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Algebra A B\nK : Type u_6\ninst✝² : Field K\ninst✝¹ : Algebra A S\ninst✝ : Nontrivial A\npb : PowerBasis A S\n⊢ degree (∑ i : Fin pb.dim, ↑C (↑(↑pb.basis.repr (pb.gen ^ pb.dim)) i) * X ^ ↑i) < ↑pb.dim\n[PROOFSTEP]\napply degree_sum_fin_lt\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n⊢ minpolyGen pb = minpoly A pb.gen\n[PROOFSTEP]\nnontriviality A\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n✝ : Nontrivial A\n⊢ minpolyGen pb = minpoly A pb.gen\n[PROOFSTEP]\nrefine' minpoly.unique' A _ pb.minpolyGen_monic pb.aeval_minpolyGen fun q hq => or_iff_not_imp_left.2 fun hn0 h0 => _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n✝ : Nontrivial A\nq : A[X]\nhq : degree q < degree (minpolyGen pb)\nhn0 : ¬q = 0\nh0 : ↑(aeval pb.gen) q = 0\n⊢ False\n[PROOFSTEP]\nexact (pb.dim_le_degree_of_root hn0 h0).not_lt (pb.degree_minpolyGen ▸ hq)\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Algebra A B\nK : Type u_6\ninst✝² : Field K\ninst✝¹ : Algebra A S\ninst✝ : Nontrivial A\npb : PowerBasis A S\n⊢ degree (minpoly A pb.gen) = ↑pb.dim\n[PROOFSTEP]\nrw [← minpolyGen_eq, degree_minpolyGen]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Algebra A B\nK : Type u_6\ninst✝² : Field K\ninst✝¹ : Algebra A S\ninst✝ : Nontrivial A\npb : PowerBasis A S\n⊢ natDegree (minpoly A pb.gen) = pb.dim\n[PROOFSTEP]\nrw [← minpolyGen_eq, natDegree_minpolyGen]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\n⊢ ↑(Algebra.leftMulMatrix pb.basis) pb.gen =\n    ↑Matrix.of fun i j => if ↑j + 1 = pb.dim then -coeff (minpolyGen pb) ↑i else if ↑i = ↑j + 1 then 1 else 0\n[PROOFSTEP]\ncases subsingleton_or_nontrivial A\n[GOAL]\ncase inl\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Subsingleton A\n⊢ ↑(Algebra.leftMulMatrix pb.basis) pb.gen =\n    ↑Matrix.of fun i j => if ↑j + 1 = pb.dim then -coeff (minpolyGen pb) ↑i else if ↑i = ↑j + 1 then 1 else 0\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\n⊢ ↑(Algebra.leftMulMatrix pb.basis) pb.gen =\n    ↑Matrix.of fun i j => if ↑j + 1 = pb.dim then -coeff (minpolyGen pb) ↑i else if ↑i = ↑j + 1 then 1 else 0\n[PROOFSTEP]\nrw [Algebra.leftMulMatrix_apply, ← LinearEquiv.eq_symm_apply, LinearMap.toMatrix_symm]\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\n⊢ ↑(Algebra.lmul A S) pb.gen =\n    ↑(Matrix.toLin pb.basis pb.basis)\n      (↑Matrix.of fun i j => if ↑j + 1 = pb.dim then -coeff (minpolyGen pb) ↑i else if ↑i = ↑j + 1 then 1 else 0)\n[PROOFSTEP]\nrefine' pb.basis.ext fun k => _\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\nk : Fin pb.dim\n⊢ ↑(↑(Algebra.lmul A S) pb.gen) (↑pb.basis k) =\n    ↑(↑(Matrix.toLin pb.basis pb.basis)\n          (↑Matrix.of fun i j => if ↑j + 1 = pb.dim then -coeff (minpolyGen pb) ↑i else if ↑i = ↑j + 1 then 1 else 0))\n      (↑pb.basis k)\n[PROOFSTEP]\nsimp_rw [Matrix.toLin_self, Matrix.of_apply, pb.basis_eq_pow]\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\nk : Fin pb.dim\n⊢ ↑(↑(Algebra.lmul A S) pb.gen) (pb.gen ^ ↑k) =\n    ∑ x : Fin pb.dim,\n      (if ↑k + 1 = pb.dim then -coeff (minpolyGen pb) ↑x else if ↑x = ↑k + 1 then 1 else 0) • pb.gen ^ ↑x\n[PROOFSTEP]\napply (pow_succ _ _).symm.trans\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\nk : Fin pb.dim\n⊢ pb.gen ^ (↑k + 1) =\n    ∑ x : Fin pb.dim,\n      (if ↑k + 1 = pb.dim then -coeff (minpolyGen pb) ↑x else if ↑x = ↑k + 1 then 1 else 0) • pb.gen ^ ↑x\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\nk : Fin pb.dim\nh : ↑k + 1 = pb.dim\n⊢ pb.gen ^ (↑k + 1) = ∑ x : Fin pb.dim, -coeff (minpolyGen pb) ↑x • pb.gen ^ ↑x\n[PROOFSTEP]\nsimp_rw [h, neg_smul, Finset.sum_neg_distrib, eq_neg_iff_add_eq_zero]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\nk : Fin pb.dim\nh : ↑k + 1 = pb.dim\n⊢ pb.gen ^ pb.dim + ∑ x : Fin pb.dim, coeff (minpolyGen pb) ↑x • pb.gen ^ ↑x = 0\n[PROOFSTEP]\nconvert pb.aeval_minpolyGen\n[GOAL]\ncase h.e'_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\nk : Fin pb.dim\nh : ↑k + 1 = pb.dim\n⊢ pb.gen ^ pb.dim + ∑ x : Fin pb.dim, coeff (minpolyGen pb) ↑x • pb.gen ^ ↑x = ↑(aeval pb.gen) (minpolyGen pb)\n[PROOFSTEP]\nrw [add_comm, aeval_eq_sum_range, Finset.sum_range_succ, ← leadingCoeff, pb.minpolyGen_monic.leadingCoeff, one_smul,\n  natDegree_minpolyGen, Finset.sum_range]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\nk : Fin pb.dim\nh : ¬↑k + 1 = pb.dim\n⊢ pb.gen ^ (↑k + 1) = ∑ x : Fin pb.dim, (if ↑x = ↑k + 1 then 1 else 0) • pb.gen ^ ↑x\n[PROOFSTEP]\nrw [Fintype.sum_eq_single (⟨(k : ℕ) + 1, lt_of_le_of_ne k.2 h⟩ : Fin pb.dim), if_pos, one_smul]\n[GOAL]\ncase neg.hc\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\nk : Fin pb.dim\nh : ¬↑k + 1 = pb.dim\n⊢ ↑{ val := ↑k + 1, isLt := (_ : ↑k + 1 < pb.dim) } = ↑k + 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\nk : Fin pb.dim\nh : ¬↑k + 1 = pb.dim\n⊢ ∀ (x : Fin pb.dim),\n    x ≠ { val := ↑k + 1, isLt := (_ : ↑k + 1 < pb.dim) } → (if ↑x = ↑k + 1 then 1 else 0) • pb.gen ^ ↑x = 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\nk : Fin pb.dim\nh : ¬↑k + 1 = pb.dim\nx : Fin pb.dim\nhx : x ≠ { val := ↑k + 1, isLt := (_ : ↑k + 1 < pb.dim) }\n⊢ (if ↑x = ↑k + 1 then 1 else 0) • pb.gen ^ ↑x = 0\n[PROOFSTEP]\nrw [if_neg, zero_smul]\n[GOAL]\ncase neg.hnc\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra A S\npb : PowerBasis A S\nh✝ : Nontrivial A\nk : Fin pb.dim\nh : ¬↑k + 1 = pb.dim\nx : Fin pb.dim\nhx : x ≠ { val := ↑k + 1, isLt := (_ : ↑k + 1 < pb.dim) }\n⊢ ¬↑x = ↑k + 1\n[PROOFSTEP]\napply mt Fin.ext hx\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(aeval pb.gen) f) = ↑(aeval y) f\n[PROOFSTEP]\ncases subsingleton_or_nontrivial A\n[GOAL]\ncase inl\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Subsingleton A\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(aeval pb.gen) f) = ↑(aeval y) f\n[PROOFSTEP]\nrw [(Subsingleton.elim _ _ : f = 0), aeval_zero, map_zero, aeval_zero]\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(aeval pb.gen) f) = ↑(aeval y) f\n[PROOFSTEP]\nrw [← aeval_modByMonic_eq_self_of_root (minpoly.monic pb.isIntegral_gen) (minpoly.aeval _ _), ←\n  @aeval_modByMonic_eq_self_of_root _ _ _ _ _ f _ (minpoly.monic pb.isIntegral_gen) y hy]\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(aeval pb.gen) (f %ₘ minpoly A pb.gen)) =\n    ↑(aeval y) (f %ₘ minpoly A pb.gen)\n[PROOFSTEP]\nby_cases hf : f %ₘ minpoly A pb.gen = 0\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\nhf : f %ₘ minpoly A pb.gen = 0\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(aeval pb.gen) (f %ₘ minpoly A pb.gen)) =\n    ↑(aeval y) (f %ₘ minpoly A pb.gen)\n[PROOFSTEP]\nsimp only [hf, AlgHom.map_zero, LinearMap.map_zero]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\nhf : ¬f %ₘ minpoly A pb.gen = 0\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(aeval pb.gen) (f %ₘ minpoly A pb.gen)) =\n    ↑(aeval y) (f %ₘ minpoly A pb.gen)\n[PROOFSTEP]\nhave : (f %ₘ minpoly A pb.gen).natDegree < pb.dim :=\n  by\n  rw [← pb.natDegree_minpoly]\n  apply natDegree_lt_natDegree hf\n  exact degree_modByMonic_lt _ (minpoly.monic pb.isIntegral_gen)\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\nhf : ¬f %ₘ minpoly A pb.gen = 0\n⊢ natDegree (f %ₘ minpoly A pb.gen) < pb.dim\n[PROOFSTEP]\nrw [← pb.natDegree_minpoly]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\nhf : ¬f %ₘ minpoly A pb.gen = 0\n⊢ natDegree (f %ₘ minpoly A pb.gen) < natDegree (minpoly A pb.gen)\n[PROOFSTEP]\napply natDegree_lt_natDegree hf\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\nhf : ¬f %ₘ minpoly A pb.gen = 0\n⊢ degree (f %ₘ minpoly A pb.gen) < degree (minpoly A pb.gen)\n[PROOFSTEP]\nexact degree_modByMonic_lt _ (minpoly.monic pb.isIntegral_gen)\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\nhf : ¬f %ₘ minpoly A pb.gen = 0\nthis : natDegree (f %ₘ minpoly A pb.gen) < pb.dim\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(aeval pb.gen) (f %ₘ minpoly A pb.gen)) =\n    ↑(aeval y) (f %ₘ minpoly A pb.gen)\n[PROOFSTEP]\nrw [aeval_eq_sum_range' this, aeval_eq_sum_range' this, LinearMap.map_sum]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\nhf : ¬f %ₘ minpoly A pb.gen = 0\nthis : natDegree (f %ₘ minpoly A pb.gen) < pb.dim\n⊢ (Finset.sum (Finset.range pb.dim) fun i =>\n      ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (coeff (f %ₘ minpoly A pb.gen) i • pb.gen ^ i)) =\n    Finset.sum (Finset.range pb.dim) fun i => coeff (f %ₘ minpoly A pb.gen) i • y ^ i\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun i (hi : i ∈ Finset.range pb.dim) => _\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\nhf : ¬f %ₘ minpoly A pb.gen = 0\nthis : natDegree (f %ₘ minpoly A pb.gen) < pb.dim\ni : ℕ\nhi : i ∈ Finset.range pb.dim\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (coeff (f %ₘ minpoly A pb.gen) i • pb.gen ^ i) =\n    coeff (f %ₘ minpoly A pb.gen) i • y ^ i\n[PROOFSTEP]\nrw [Finset.mem_range] at hi \n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\nhf : ¬f %ₘ minpoly A pb.gen = 0\nthis : natDegree (f %ₘ minpoly A pb.gen) < pb.dim\ni : ℕ\nhi : i < pb.dim\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (coeff (f %ₘ minpoly A pb.gen) i • pb.gen ^ i) =\n    coeff (f %ₘ minpoly A pb.gen) i • y ^ i\n[PROOFSTEP]\nrw [LinearMap.map_smul]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\nhf : ¬f %ₘ minpoly A pb.gen = 0\nthis : natDegree (f %ₘ minpoly A pb.gen) < pb.dim\ni : ℕ\nhi : i < pb.dim\n⊢ coeff (f %ₘ minpoly A pb.gen) i • ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (pb.gen ^ i) =\n    coeff (f %ₘ minpoly A pb.gen) i • y ^ i\n[PROOFSTEP]\ncongr\n[GOAL]\ncase neg.e_a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf : A[X]\nh✝ : Nontrivial A\nhf : ¬f %ₘ minpoly A pb.gen = 0\nthis : natDegree (f %ₘ minpoly A pb.gen) < pb.dim\ni : ℕ\nhi : i < pb.dim\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (pb.gen ^ i) = y ^ i\n[PROOFSTEP]\nrw [← Fin.val_mk hi, ← pb.basis_eq_pow ⟨i, hi⟩, Basis.constr_basis]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) pb.gen = y\n[PROOFSTEP]\nconvert pb.constr_pow_aeval hy X\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\n⊢ pb.gen = ↑(aeval pb.gen) X\n[PROOFSTEP]\nrw [aeval_X]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\n⊢ y = ↑(aeval y) X\n[PROOFSTEP]\nrw [aeval_X]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nx : A\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(algebraMap A S) x) = ↑(algebraMap A S') x\n[PROOFSTEP]\nconvert pb.constr_pow_aeval hy (C x)\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nx : A\n⊢ ↑(algebraMap A S) x = ↑(aeval pb.gen) (↑C x)\n[PROOFSTEP]\nrw [aeval_C]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nx : A\n⊢ ↑(algebraMap A S') x = ↑(aeval y) (↑C x)\n[PROOFSTEP]\nrw [aeval_C]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nx x' : S\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (x * x') =\n    ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) x * ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) x'\n[PROOFSTEP]\nobtain ⟨f, rfl⟩ := pb.exists_eq_aeval' x\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nx' : S\nf : A[X]\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(aeval pb.gen) f * x') =\n    ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(aeval pb.gen) f) * ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) x'\n[PROOFSTEP]\nobtain ⟨g, rfl⟩ := pb.exists_eq_aeval' x'\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nf g : A[X]\n⊢ ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(aeval pb.gen) f * ↑(aeval pb.gen) g) =\n    ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(aeval pb.gen) f) *\n      ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (↑(aeval pb.gen) g)\n[PROOFSTEP]\nsimp only [← aeval_mul, pb.constr_pow_aeval hy]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nsrc✝ : (fun x => S →ₗ[A] S') fun i => y ^ ↑i := ↑(Basis.constr pb.basis A) fun i => y ^ ↑i\n⊢ AddHom.toFun src✝.toAddHom 1 = 1\n[PROOFSTEP]\nconvert pb.constr_pow_algebraMap hy 1 using 2\n[GOAL]\ncase h.e'_2.h.e'_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nsrc✝ : (fun x => S →ₗ[A] S') fun i => y ^ ↑i := ↑(Basis.constr pb.basis A) fun i => y ^ ↑i\n⊢ 1 = ↑(algebraMap A S) 1\n[PROOFSTEP]\nrw [RingHom.map_one]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nsrc✝ : (fun x => S →ₗ[A] S') fun i => y ^ ↑i := ↑(Basis.constr pb.basis A) fun i => y ^ ↑i\n⊢ 1 = ↑(algebraMap A S') 1\n[PROOFSTEP]\nrw [RingHom.map_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nsrc✝ : (fun x => S →ₗ[A] S') fun i => y ^ ↑i := ↑(Basis.constr pb.basis A) fun i => y ^ ↑i\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x x' : S),\n                ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) (x * x') =\n                  ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) x * ↑(↑(Basis.constr pb.basis A) fun i => y ^ ↑i) x') })\n      0 =\n    0\n[PROOFSTEP]\nconvert pb.constr_pow_algebraMap hy 0 using 2\n[GOAL]\ncase h.e'_2.h.e'_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nsrc✝ : (fun x => S →ₗ[A] S') fun i => y ^ ↑i := ↑(Basis.constr pb.basis A) fun i => y ^ ↑i\n⊢ 0 = ↑(algebraMap A S) 0\n[PROOFSTEP]\nrw [RingHom.map_zero]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\ny : S'\nhy : ↑(aeval y) (minpoly A pb.gen) = 0\nsrc✝ : (fun x => S →ₗ[A] S') fun i => y ^ ↑i := ↑(Basis.constr pb.basis A) fun i => y ^ ↑i\n⊢ 0 = ↑(algebraMap A S') 0\n[PROOFSTEP]\nrw [RingHom.map_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\nf : S →ₐ[A] S'\n⊢ ↑(aeval (↑f pb.gen)) (minpoly A pb.gen) = 0\n[PROOFSTEP]\nrw [aeval_algHom_apply, minpoly.aeval, f.map_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\nx : B\n⊢ ↑(aeval x) (minpoly A pb.gen) = 0 ↔ ↑(Equiv.refl B) x ∈ roots (map (algebraMap A B) (minpoly A pb.gen))\n[PROOFSTEP]\nrw [Equiv.refl_apply, mem_roots_iff_aeval_eq_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\nx : B\n⊢ ↑(aeval x) (minpoly A pb.gen) = 0 ↔ ↑(aeval x) (map (algebraMap A B) (minpoly A pb.gen)) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\nx : B\n⊢ map (algebraMap A B) (minpoly A pb.gen) ≠ 0\n[PROOFSTEP]\nexact map_monic_ne_zero (minpoly.monic pb.isIntegral_gen)\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\npb' : PowerBasis A S'\nh₁ : ↑(aeval pb.gen) (minpoly A pb'.gen) = 0\nh₂ : ↑(aeval pb'.gen) (minpoly A pb.gen) = 0\n⊢ AlgHom.comp (lift pb pb'.gen h₂) (lift pb' pb.gen h₁) = AlgHom.id A S'\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\npb' : PowerBasis A S'\nh₁ : ↑(aeval pb.gen) (minpoly A pb'.gen) = 0\nh₂ : ↑(aeval pb'.gen) (minpoly A pb.gen) = 0\nx : S'\n⊢ ↑(AlgHom.comp (lift pb pb'.gen h₂) (lift pb' pb.gen h₁)) x = ↑(AlgHom.id A S') x\n[PROOFSTEP]\nobtain ⟨f, hf, rfl⟩ := pb'.exists_eq_aeval' x\n[GOAL]\ncase H.intro.refl\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\npb' : PowerBasis A S'\nh₁ : ↑(aeval pb.gen) (minpoly A pb'.gen) = 0\nh₂ : ↑(aeval pb'.gen) (minpoly A pb.gen) = 0\nf : A[X]\n⊢ ↑(AlgHom.comp (lift pb pb'.gen h₂) (lift pb' pb.gen h₁)) (↑(aeval pb'.gen) f) = ↑(AlgHom.id A S') (↑(aeval pb'.gen) f)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\npb' : PowerBasis A S'\nh₁ : ↑(aeval pb.gen) (minpoly A pb'.gen) = 0\nh₂ : ↑(aeval pb'.gen) (minpoly A pb.gen) = 0\n⊢ AlgHom.comp (lift pb' pb.gen h₁) (lift pb pb'.gen h₂) = AlgHom.id A S\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\npb' : PowerBasis A S'\nh₁ : ↑(aeval pb.gen) (minpoly A pb'.gen) = 0\nh₂ : ↑(aeval pb'.gen) (minpoly A pb.gen) = 0\nx : S\n⊢ ↑(AlgHom.comp (lift pb' pb.gen h₁) (lift pb pb'.gen h₂)) x = ↑(AlgHom.id A S) x\n[PROOFSTEP]\nobtain ⟨f, hf, rfl⟩ := pb.exists_eq_aeval' x\n[GOAL]\ncase H.intro.refl\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : Algebra A B\nK : Type u_6\ninst✝³ : Field K\ninst✝² : Algebra A S\nS' : Type u_7\ninst✝¹ : Ring S'\ninst✝ : Algebra A S'\npb : PowerBasis A S\npb' : PowerBasis A S'\nh₁ : ↑(aeval pb.gen) (minpoly A pb'.gen) = 0\nh₂ : ↑(aeval pb'.gen) (minpoly A pb.gen) = 0\nf : A[X]\n⊢ ↑(AlgHom.comp (lift pb' pb.gen h₁) (lift pb pb'.gen h₂)) (↑(aeval pb.gen) f) = ↑(AlgHom.id A S) (↑(aeval pb.gen) f)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\n⊢ LinearIndependent K fun i => x ^ ↑i\n[PROOFSTEP]\nby_cases IsIntegral K x\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\n⊢ LinearIndependent K fun i => x ^ ↑i\n[PROOFSTEP]\nby_cases IsIntegral K x\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : IsIntegral K x\n⊢ LinearIndependent K fun i => x ^ ↑i\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : ¬IsIntegral K x\n⊢ LinearIndependent K fun i => x ^ ↑i\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : ¬IsIntegral K x\n⊢ LinearIndependent K fun i => x ^ ↑i\n[PROOFSTEP]\nrw [minpoly.eq_zero h, natDegree_zero]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : ¬IsIntegral K x\n⊢ LinearIndependent K fun i => x ^ ↑i\n[PROOFSTEP]\nexact linearIndependent_empty_type\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : IsIntegral K x\n⊢ LinearIndependent K fun i => x ^ ↑i\n[PROOFSTEP]\nrefine' Fintype.linearIndependent_iff.2 fun g hg i => _\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : IsIntegral K x\ng : Fin (natDegree (minpoly K x)) → K\nhg : (Finset.sum Finset.univ fun i => g i • x ^ ↑i) = 0\ni : Fin (natDegree (minpoly K x))\n⊢ g i = 0\n[PROOFSTEP]\nsimp only at hg \n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : IsIntegral K x\ng : Fin (natDegree (minpoly K x)) → K\nhg : (Finset.sum Finset.univ fun i => g i • x ^ ↑i) = 0\ni : Fin (natDegree (minpoly K x))\n⊢ g i = 0\n[PROOFSTEP]\nsimp_rw [Algebra.smul_def, ← aeval_monomial, ← map_sum] at hg \n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : IsIntegral K x\ng : Fin (natDegree (minpoly K x)) → K\ni : Fin (natDegree (minpoly K x))\nhg : ↑(aeval x) (Finset.sum Finset.univ fun x_1 => ↑(monomial ↑x_1) (g x_1)) = 0\n⊢ g i = 0\n[PROOFSTEP]\napply (fun hn0 => (minpoly.degree_le_of_ne_zero K x (mt (fun h0 => ?_) hn0) hg).not_lt).mtr\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : IsIntegral K x\ng : Fin (natDegree (minpoly K x)) → K\ni : Fin (natDegree (minpoly K x))\nhg : ↑(aeval x) (Finset.sum Finset.univ fun x_1 => ↑(monomial ↑x_1) (g x_1)) = 0\n⊢ degree (Finset.sum Finset.univ fun x_1 => ↑(monomial ↑x_1) (g x_1)) < degree (minpoly K x)\n[PROOFSTEP]\nsimp_rw [← C_mul_X_pow_eq_monomial]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : IsIntegral K x\ng : Fin (natDegree (minpoly K x)) → K\ni : Fin (natDegree (minpoly K x))\nhg : ↑(aeval x) (Finset.sum Finset.univ fun x_1 => ↑(monomial ↑x_1) (g x_1)) = 0\n⊢ degree (Finset.sum Finset.univ fun x_1 => ↑C (g x_1) * X ^ ↑x_1) < degree (minpoly K x)\n[PROOFSTEP]\nexact (degree_eq_natDegree <| minpoly.ne_zero h).symm ▸ degree_sum_fin_lt _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : IsIntegral K x\ng : Fin (natDegree (minpoly K x)) → K\ni : Fin (natDegree (minpoly K x))\nhg : ↑(aeval x) (Finset.sum Finset.univ fun x_1 => ↑(monomial ↑x_1) (g x_1)) = 0\nhn0 : ¬g i = 0\nh0 : (Finset.sum Finset.univ fun x_1 => ↑(monomial ↑x_1) (g x_1)) = 0\n⊢ g i = 0\n[PROOFSTEP]\napply_fun lcoeff K i at h0 \n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : IsIntegral K x\ng : Fin (natDegree (minpoly K x)) → K\ni : Fin (natDegree (minpoly K x))\nhg : ↑(aeval x) (Finset.sum Finset.univ fun x_1 => ↑(monomial ↑x_1) (g x_1)) = 0\nhn0 : ¬g i = 0\nh0 : ↑(lcoeff K ↑i) (Finset.sum Finset.univ fun x_1 => ↑(monomial ↑x_1) (g x_1)) = ↑(lcoeff K ↑i) 0\n⊢ g i = 0\n[PROOFSTEP]\nsimp_rw [map_sum, lcoeff_apply, coeff_monomial, Fin.val_eq_val, Finset.sum_ite_eq'] at h0 \n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Algebra K S\nx : S\nh : IsIntegral K x\ng : Fin (natDegree (minpoly K x)) → K\ni : Fin (natDegree (minpoly K x))\nhg : ↑(aeval x) (Finset.sum Finset.univ fun x_1 => ↑(monomial ↑x_1) (g x_1)) = 0\nhn0 : ¬g i = 0\nh0 : (if i ∈ Finset.univ then g i else 0) = coeff 0 ↑i\n⊢ g i = 0\n[PROOFSTEP]\nexact (if_pos <| Finset.mem_univ _).symm.trans h0\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Nontrivial R\nx y : S\nhx : IsIntegral R x\nhy : ∃ f, y = ↑(aeval x) f\n⊢ y ∈ Submodule.span R (Set.range fun i => x ^ ↑i)\n[PROOFSTEP]\nobtain ⟨f, rfl⟩ := hy\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Nontrivial R\nx : S\nhx : IsIntegral R x\nf : R[X]\n⊢ ↑(aeval x) f ∈ Submodule.span R (Set.range fun i => x ^ ↑i)\n[PROOFSTEP]\napply mem_span_pow'.mpr _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Nontrivial R\nx : S\nhx : IsIntegral R x\nf : R[X]\n⊢ ∃ f_1, degree f_1 < ↑(natDegree (minpoly R x)) ∧ ↑(aeval x) f = ↑(aeval x) f_1\n[PROOFSTEP]\nhave := minpoly.monic hx\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Nontrivial R\nx : S\nhx : IsIntegral R x\nf : R[X]\nthis : Monic (minpoly R x)\n⊢ ∃ f_1, degree f_1 < ↑(natDegree (minpoly R x)) ∧ ↑(aeval x) f = ↑(aeval x) f_1\n[PROOFSTEP]\nrefine' ⟨f %ₘ minpoly R x, (degree_modByMonic_lt _ this).trans_le degree_le_natDegree, _⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Nontrivial R\nx : S\nhx : IsIntegral R x\nf : R[X]\nthis : Monic (minpoly R x)\n⊢ ↑(aeval x) f = ↑(aeval x) (f %ₘ minpoly R x)\n[PROOFSTEP]\nconv_lhs => rw [← modByMonic_add_div f this]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Nontrivial R\nx : S\nhx : IsIntegral R x\nf : R[X]\nthis : Monic (minpoly R x)\n| ↑(aeval x) f\n[PROOFSTEP]\nrw [← modByMonic_add_div f this]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Nontrivial R\nx : S\nhx : IsIntegral R x\nf : R[X]\nthis : Monic (minpoly R x)\n| ↑(aeval x) f\n[PROOFSTEP]\nrw [← modByMonic_add_div f this]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Nontrivial R\nx : S\nhx : IsIntegral R x\nf : R[X]\nthis : Monic (minpoly R x)\n| ↑(aeval x) f\n[PROOFSTEP]\nrw [← modByMonic_add_div f this]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : Algebra A B\nK : Type u_6\ninst✝¹ : Field K\ninst✝ : Nontrivial R\nx : S\nhx : IsIntegral R x\nf : R[X]\nthis : Monic (minpoly R x)\n⊢ ↑(aeval x) (f %ₘ minpoly R x + minpoly R x * (f /ₘ minpoly R x)) = ↑(aeval x) (f %ₘ minpoly R x)\n[PROOFSTEP]\nsimp only [add_zero, zero_mul, minpoly.aeval, aeval_add, AlgHom.map_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Algebra A B\nK : Type u_6\ninst✝² : Field K\nS' : Type u_7\ninst✝¹ : CommRing S'\ninst✝ : Algebra R S'\npb : PowerBasis R S\ne : S ≃ₐ[R] S'\ni : Fin pb.dim\n⊢ ↑(Basis.map pb.basis (AlgEquiv.toLinearEquiv e)) i = ↑e pb.gen ^ ↑i\n[PROOFSTEP]\nrw [Basis.map_apply, pb.basis_eq_pow, e.toLinearEquiv_apply, e.map_pow]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Algebra A B\nK : Type u_6\ninst✝⁴ : Field K\nS' : Type u_7\ninst✝³ : CommRing S'\ninst✝² : Algebra R S'\ninst✝¹ : Algebra A S\ninst✝ : Algebra A S'\npb : PowerBasis A S\ne : S ≃ₐ[A] S'\n⊢ minpolyGen (map pb e) = minpolyGen pb\n[PROOFSTEP]\ndsimp only [minpolyGen, map_dim]\n  -- Turn `Fin (pb.map e).dim` into `Fin pb.dim`\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Algebra A B\nK : Type u_6\ninst✝⁴ : Field K\nS' : Type u_7\ninst✝³ : CommRing S'\ninst✝² : Algebra R S'\ninst✝¹ : Algebra A S\ninst✝ : Algebra A S'\npb : PowerBasis A S\ne : S ≃ₐ[A] S'\n⊢ (X ^ pb.dim - Finset.sum Finset.univ fun i => ↑C (↑(↑(map pb e).basis.repr ((map pb e).gen ^ pb.dim)) i) * X ^ ↑i) =\n    X ^ pb.dim - Finset.sum Finset.univ fun i => ↑C (↑(↑pb.basis.repr (pb.gen ^ pb.dim)) i) * X ^ ↑i\n[PROOFSTEP]\nsimp only [LinearEquiv.trans_apply, map_basis, Basis.map_repr, map_gen, AlgEquiv.toLinearEquiv_apply,\n  e.toLinearEquiv_symm, AlgEquiv.map_pow, AlgEquiv.symm_apply_apply, sub_right_inj]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Algebra A B\nK : Type u_6\ninst✝⁴ : Field K\nS' : Type u_7\ninst✝³ : CommRing S'\ninst✝² : Algebra R S'\ninst✝¹ : Algebra A S\ninst✝ : Algebra A S'\npb : PowerBasis A S\ne : S ≃ₐ[A] S'\nh₁ : ↑(aeval pb.gen) (minpoly A (map pb e).gen) = 0\nh₂ : ↑(aeval (map pb e).gen) (minpoly A pb.gen) = 0\n⊢ equivOfRoot pb (map pb e) h₁ h₂ = e\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Algebra A B\nK : Type u_6\ninst✝⁴ : Field K\nS' : Type u_7\ninst✝³ : CommRing S'\ninst✝² : Algebra R S'\ninst✝¹ : Algebra A S\ninst✝ : Algebra A S'\npb : PowerBasis A S\ne : S ≃ₐ[A] S'\nh₁ : ↑(aeval pb.gen) (minpoly A (map pb e).gen) = 0\nh₂ : ↑(aeval (map pb e).gen) (minpoly A pb.gen) = 0\nx : S\n⊢ ↑(equivOfRoot pb (map pb e) h₁ h₂) x = ↑e x\n[PROOFSTEP]\nobtain ⟨f, rfl⟩ := pb.exists_eq_aeval' x\n[GOAL]\ncase h.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nA : Type u_4\nB : Type u_5\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Algebra A B\nK : Type u_6\ninst✝⁴ : Field K\nS' : Type u_7\ninst✝³ : CommRing S'\ninst✝² : Algebra R S'\ninst✝¹ : Algebra A S\ninst✝ : Algebra A S'\npb : PowerBasis A S\ne : S ≃ₐ[A] S'\nh₁ : ↑(aeval pb.gen) (minpoly A (map pb e).gen) = 0\nh₂ : ↑(aeval (map pb e).gen) (minpoly A pb.gen) = 0\nf : A[X]\n⊢ ↑(equivOfRoot pb (map pb e) h₁ h₂) (↑(aeval pb.gen) f) = ↑e (↑(aeval pb.gen) f)\n[PROOFSTEP]\nsimp [aeval_algEquiv]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB✝ : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B✝\ninst✝² : IsDomain B✝\ninst✝¹ : Algebra A B✝\nK : Type u_6\ninst✝ : Field K\nB : PowerBasis R S\n⊢ adjoin R {B.gen} = ⊤\n[PROOFSTEP]\nrw [← toSubmodule_eq_top, _root_.eq_top_iff, ← B.basis.span_eq, Submodule.span_le]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB✝ : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B✝\ninst✝² : IsDomain B✝\ninst✝¹ : Algebra A B✝\nK : Type u_6\ninst✝ : Field K\nB : PowerBasis R S\n⊢ Set.range ↑B.basis ⊆ ↑(↑Subalgebra.toSubmodule (adjoin R {B.gen}))\n[PROOFSTEP]\nrintro x ⟨i, rfl⟩\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB✝ : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B✝\ninst✝² : IsDomain B✝\ninst✝¹ : Algebra A B✝\nK : Type u_6\ninst✝ : Field K\nB : PowerBasis R S\ni : Fin B.dim\n⊢ ↑B.basis i ∈ ↑(↑Subalgebra.toSubmodule (adjoin R {B.gen}))\n[PROOFSTEP]\nrw [B.basis_eq_pow i]\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB✝ : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B✝\ninst✝² : IsDomain B✝\ninst✝¹ : Algebra A B✝\nK : Type u_6\ninst✝ : Field K\nB : PowerBasis R S\ni : Fin B.dim\n⊢ B.gen ^ ↑i ∈ ↑(↑Subalgebra.toSubmodule (adjoin R {B.gen}))\n[PROOFSTEP]\nexact Subalgebra.pow_mem _ (subset_adjoin (Set.mem_singleton _)) _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB✝ : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B✝\ninst✝² : IsDomain B✝\ninst✝¹ : Algebra A B✝\nK : Type u_6\ninst✝ : Field K\nB : PowerBasis R S\nx : S\nhx : B.gen ∈ adjoin R {x}\n⊢ adjoin R {x} = ⊤\n[PROOFSTEP]\nrw [_root_.eq_top_iff, ← B.adjoin_gen_eq_top]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB✝ : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B✝\ninst✝² : IsDomain B✝\ninst✝¹ : Algebra A B✝\nK : Type u_6\ninst✝ : Field K\nB : PowerBasis R S\nx : S\nhx : B.gen ∈ adjoin R {x}\n⊢ adjoin R {B.gen} ≤ adjoin R {x}\n[PROOFSTEP]\nrefine' adjoin_le _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nA : Type u_4\nB✝ : Type u_5\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B✝\ninst✝² : IsDomain B✝\ninst✝¹ : Algebra A B✝\nK : Type u_6\ninst✝ : Field K\nB : PowerBasis R S\nx : S\nhx : B.gen ∈ adjoin R {x}\n⊢ {B.gen} ⊆ ↑(adjoin R {x})\n[PROOFSTEP]\nsimp [hx]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.PowerBasis", "llama_tokens": 40885, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7154239957834733, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.39114959334010435}}
{"text": "[GOAL]\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\n⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]\n[PROOFSTEP]\ntfae_have 1 ↔ 2\n[GOAL]\ncase tfae_1_iff_2\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\n⊢ I ≤ J ↔ ↑I ⊆ ↑J\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\ntfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J\n⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]\n[PROOFSTEP]\nexact Iff.rfl\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\ntfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J\n⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]\n[PROOFSTEP]\ntfae_have 2 → 3\n[GOAL]\ncase tfae_2_to_3\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\ntfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J\n⊢ ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper\n[PROOFSTEP]\nintro h\n[GOAL]\ncase tfae_2_to_3\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\ntfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J\nh : ↑I ⊆ ↑J\n⊢ Icc I.lower I.upper ⊆ Icc J.lower J.upper\n[PROOFSTEP]\nsimpa [coe_eq_pi, closure_pi_set, lower_ne_upper] using closure_mono h\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\ntfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J\ntfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper\n⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]\n[PROOFSTEP]\ntfae_have 3 ↔ 4\n[GOAL]\ncase tfae_3_iff_4\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\ntfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J\ntfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper\n⊢ Icc I.lower I.upper ⊆ Icc J.lower J.upper ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\ntfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J\ntfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper\ntfae_3_iff_4 : Icc I.lower I.upper ⊆ Icc J.lower J.upper ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper\n⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]\n[PROOFSTEP]\nexact Icc_subset_Icc_iff I.lower_le_upper\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\ntfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J\ntfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper\ntfae_3_iff_4 : Icc I.lower I.upper ⊆ Icc J.lower J.upper ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper\n⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]\n[PROOFSTEP]\ntfae_have 4 → 2\n[GOAL]\ncase tfae_4_to_2\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\ntfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J\ntfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper\ntfae_3_iff_4 : Icc I.lower I.upper ⊆ Icc J.lower J.upper ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper\n⊢ J.lower ≤ I.lower ∧ I.upper ≤ J.upper → ↑I ⊆ ↑J\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\ntfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J\ntfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper\ntfae_3_iff_4 : Icc I.lower I.upper ⊆ Icc J.lower J.upper ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper\ntfae_4_to_2 : J.lower ≤ I.lower ∧ I.upper ≤ J.upper → ↑I ⊆ ↑J\n⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]\n[PROOFSTEP]\nexact fun h x hx i ↦ Ioc_subset_Ioc (h.1 i) (h.2 i) (hx i)\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\ntfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J\ntfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper\ntfae_3_iff_4 : Icc I.lower I.upper ⊆ Icc J.lower J.upper ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper\ntfae_4_to_2 : J.lower ≤ I.lower ∧ I.upper ≤ J.upper → ↑I ⊆ ↑J\n⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\n⊢ Injective toSet\n[PROOFSTEP]\nrintro ⟨l₁, u₁, h₁⟩ ⟨l₂, u₂, h₂⟩ h\n[GOAL]\ncase mk.mk\nι : Type u_1\nI J : Box ι\nx y l₁ u₁ : ι → ℝ\nh₁ : ∀ (i : ι), l₁ i < u₁ i\nl₂ u₂ : ι → ℝ\nh₂ : ∀ (i : ι), l₂ i < u₂ i\nh : ↑{ lower := l₁, upper := u₁, lower_lt_upper := h₁ } = ↑{ lower := l₂, upper := u₂, lower_lt_upper := h₂ }\n⊢ { lower := l₁, upper := u₁, lower_lt_upper := h₁ } = { lower := l₂, upper := u₂, lower_lt_upper := h₂ }\n[PROOFSTEP]\nsimp only [Subset.antisymm_iff, coe_subset_coe, le_iff_bounds] at h \n[GOAL]\ncase mk.mk\nι : Type u_1\nI J : Box ι\nx y l₁ u₁ : ι → ℝ\nh₁ : ∀ (i : ι), l₁ i < u₁ i\nl₂ u₂ : ι → ℝ\nh₂ : ∀ (i : ι), l₂ i < u₂ i\nh : (l₂ ≤ l₁ ∧ u₁ ≤ u₂) ∧ l₁ ≤ l₂ ∧ u₂ ≤ u₁\n⊢ { lower := l₁, upper := u₁, lower_lt_upper := h₁ } = { lower := l₂, upper := u₂, lower_lt_upper := h₂ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_lower\nι : Type u_1\nI J : Box ι\nx y l₁ u₁ : ι → ℝ\nh₁ : ∀ (i : ι), l₁ i < u₁ i\nl₂ u₂ : ι → ℝ\nh₂ : ∀ (i : ι), l₂ i < u₂ i\nh : (l₂ ≤ l₁ ∧ u₁ ≤ u₂) ∧ l₁ ≤ l₂ ∧ u₂ ≤ u₁\n⊢ l₁ = l₂\ncase mk.mk.e_upper\nι : Type u_1\nI J : Box ι\nx y l₁ u₁ : ι → ℝ\nh₁ : ∀ (i : ι), l₁ i < u₁ i\nl₂ u₂ : ι → ℝ\nh₂ : ∀ (i : ι), l₂ i < u₂ i\nh : (l₂ ≤ l₁ ∧ u₁ ≤ u₂) ∧ l₁ ≤ l₂ ∧ u₂ ≤ u₁\n⊢ u₁ = u₂\n[PROOFSTEP]\nexacts [le_antisymm h.2.1 h.1.1, le_antisymm h.1.2 h.2.2]\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\n⊢ Option.isSome ⊥ = true ↔ Set.Nonempty ↑⊥\n[PROOFSTEP]\nerw [Option.isSome]\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\n⊢ (match ⊥ with\n      | some val => true\n      | none => false) =\n      true ↔\n    Set.Nonempty ↑⊥\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx y : ι → ℝ\nI : Box ι\n⊢ Option.isSome ↑I = true ↔ Set.Nonempty ↑↑I\n[PROOFSTEP]\nerw [Option.isSome]\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx y : ι → ℝ\nI : Box ι\n⊢ (match ↑I with\n      | some val => true\n      | none => false) =\n      true ↔\n    Set.Nonempty ↑↑I\n[PROOFSTEP]\nsimp [I.nonempty_coe]\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx y : ι → ℝ\nI : WithBot (Box ι)\n⊢ ⋃ (J : Box ι) (_ : ↑J = I), ↑J = ↑I\n[PROOFSTEP]\ninduction I using WithBot.recBotCoe\n[GOAL]\ncase bot\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\n⊢ ⋃ (J : Box ι) (_ : ↑J = ⊥), ↑J = ↑⊥\n[PROOFSTEP]\nsimp [WithBot.coe_eq_coe]\n[GOAL]\ncase coe\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\na✝ : Box ι\n⊢ ⋃ (J : Box ι) (_ : ↑J = ↑a✝), ↑J = ↑↑a✝\n[PROOFSTEP]\nsimp [WithBot.coe_eq_coe]\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\nI J : WithBot (Box ι)\n⊢ ↑I ⊆ ↑J ↔ I ≤ J\n[PROOFSTEP]\ninduction I using WithBot.recBotCoe\n[GOAL]\ncase bot\nι : Type u_1\nI J✝ : Box ι\nx y : ι → ℝ\nJ : WithBot (Box ι)\n⊢ ↑⊥ ⊆ ↑J ↔ ⊥ ≤ J\n[PROOFSTEP]\nsimp\n[GOAL]\ncase coe\nι : Type u_1\nI J✝ : Box ι\nx y : ι → ℝ\nJ : WithBot (Box ι)\na✝ : Box ι\n⊢ ↑↑a✝ ⊆ ↑J ↔ ↑a✝ ≤ J\n[PROOFSTEP]\ninduction J using WithBot.recBotCoe\n[GOAL]\ncase coe.bot\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\na✝ : Box ι\n⊢ ↑↑a✝ ⊆ ↑⊥ ↔ ↑a✝ ≤ ⊥\n[PROOFSTEP]\nsimp [subset_empty_iff]\n[GOAL]\ncase coe.coe\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\na✝¹ a✝ : Box ι\n⊢ ↑↑a✝¹ ⊆ ↑↑a✝ ↔ ↑a✝¹ ≤ ↑a✝\n[PROOFSTEP]\nsimp [le_def]\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\nI J : WithBot (Box ι)\n⊢ ↑I = ↑J ↔ I = J\n[PROOFSTEP]\nsimp only [Subset.antisymm_iff, ← le_antisymm_iff, withBotCoe_subset_iff]\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y l u : ι → ℝ\n⊢ mk' l u = ⊥ ↔ ∃ i, u i ≤ l i\n[PROOFSTEP]\nrw [mk']\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y l u : ι → ℝ\n⊢ (if h : ∀ (i : ι), l i < u i then ↑{ lower := l, upper := u, lower_lt_upper := h } else ⊥) = ⊥ ↔ ∃ i, u i ≤ l i\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nI J : Box ι\nx y l u : ι → ℝ\nh : ∀ (i : ι), l i < u i\n⊢ ↑{ lower := l, upper := u, lower_lt_upper := h } = ⊥ ↔ ∃ i, u i ≤ l i\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase neg\nι : Type u_1\nI J : Box ι\nx y l u : ι → ℝ\nh : ¬∀ (i : ι), l i < u i\n⊢ ⊥ = ⊥ ↔ ∃ i, u i ≤ l i\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y l u : ι → ℝ\n⊢ mk' l u = ↑I ↔ l = I.lower ∧ u = I.upper\n[PROOFSTEP]\ncases' I with lI uI hI\n[GOAL]\ncase mk\nι : Type u_1\nJ : Box ι\nx y l u lI uI : ι → ℝ\nhI : ∀ (i : ι), lI i < uI i\n⊢ mk' l u = ↑{ lower := lI, upper := uI, lower_lt_upper := hI } ↔\n    l = { lower := lI, upper := uI, lower_lt_upper := hI }.lower ∧\n      u = { lower := lI, upper := uI, lower_lt_upper := hI }.upper\n[PROOFSTEP]\nrw [mk']\n[GOAL]\ncase mk\nι : Type u_1\nJ : Box ι\nx y l u lI uI : ι → ℝ\nhI : ∀ (i : ι), lI i < uI i\n⊢ (if h : ∀ (i : ι), l i < u i then ↑{ lower := l, upper := u, lower_lt_upper := h } else ⊥) =\n      ↑{ lower := lI, upper := uI, lower_lt_upper := hI } ↔\n    l = { lower := lI, upper := uI, lower_lt_upper := hI }.lower ∧\n      u = { lower := lI, upper := uI, lower_lt_upper := hI }.upper\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nJ : Box ι\nx y l u lI uI : ι → ℝ\nhI : ∀ (i : ι), lI i < uI i\nh : ∀ (i : ι), l i < u i\n⊢ ↑{ lower := l, upper := u, lower_lt_upper := h } = ↑{ lower := lI, upper := uI, lower_lt_upper := hI } ↔\n    l = { lower := lI, upper := uI, lower_lt_upper := hI }.lower ∧\n      u = { lower := lI, upper := uI, lower_lt_upper := hI }.upper\n[PROOFSTEP]\nsimp [WithBot.coe_eq_coe]\n[GOAL]\ncase neg\nι : Type u_1\nJ : Box ι\nx y l u lI uI : ι → ℝ\nhI : ∀ (i : ι), lI i < uI i\nh : ¬∀ (i : ι), l i < u i\n⊢ ⊥ = ↑{ lower := lI, upper := uI, lower_lt_upper := hI } ↔\n    l = { lower := lI, upper := uI, lower_lt_upper := hI }.lower ∧\n      u = { lower := lI, upper := uI, lower_lt_upper := hI }.upper\n[PROOFSTEP]\nsuffices l = lI → u ≠ uI by simpa\n[GOAL]\nι : Type u_1\nJ : Box ι\nx y l u lI uI : ι → ℝ\nhI : ∀ (i : ι), lI i < uI i\nh : ¬∀ (i : ι), l i < u i\nthis : l = lI → u ≠ uI\n⊢ ⊥ = ↑{ lower := lI, upper := uI, lower_lt_upper := hI } ↔\n    l = { lower := lI, upper := uI, lower_lt_upper := hI }.lower ∧\n      u = { lower := lI, upper := uI, lower_lt_upper := hI }.upper\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase neg\nι : Type u_1\nJ : Box ι\nx y l u lI uI : ι → ℝ\nhI : ∀ (i : ι), lI i < uI i\nh : ¬∀ (i : ι), l i < u i\n⊢ l = lI → u ≠ uI\n[PROOFSTEP]\nrintro rfl rfl\n[GOAL]\ncase neg\nι : Type u_1\nJ : Box ι\nx y l u : ι → ℝ\nh : ¬∀ (i : ι), l i < u i\nhI : ∀ (i : ι), l i < u i\n⊢ False\n[PROOFSTEP]\nexact h hI\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y l u : ι → ℝ\n⊢ ↑(mk' l u) = Set.pi univ fun i => Ioc (l i) (u i)\n[PROOFSTEP]\nrw [mk']\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y l u : ι → ℝ\n⊢ ↑(if h : ∀ (i : ι), l i < u i then ↑{ lower := l, upper := u, lower_lt_upper := h } else ⊥) =\n    Set.pi univ fun i => Ioc (l i) (u i)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nI J : Box ι\nx y l u : ι → ℝ\nh : ∀ (i : ι), l i < u i\n⊢ ↑↑{ lower := l, upper := u, lower_lt_upper := h } = Set.pi univ fun i => Ioc (l i) (u i)\n[PROOFSTEP]\nexact coe_eq_pi _\n[GOAL]\ncase neg\nι : Type u_1\nI J : Box ι\nx y l u : ι → ℝ\nh : ¬∀ (i : ι), l i < u i\n⊢ ↑⊥ = Set.pi univ fun i => Ioc (l i) (u i)\n[PROOFSTEP]\nrcases not_forall.mp h with ⟨i, hi⟩\n[GOAL]\ncase neg.intro\nι : Type u_1\nI J : Box ι\nx y l u : ι → ℝ\nh : ¬∀ (i : ι), l i < u i\ni : ι\nhi : ¬l i < u i\n⊢ ↑⊥ = Set.pi univ fun i => Ioc (l i) (u i)\n[PROOFSTEP]\nrw [coe_bot, univ_pi_eq_empty]\n[GOAL]\ncase neg.intro\nι : Type u_1\nI J : Box ι\nx y l u : ι → ℝ\nh : ¬∀ (i : ι), l i < u i\ni : ι\nhi : ¬l i < u i\n⊢ Ioc (l ?m.301759) (u ?m.301759) = ∅\nι : Type u_1 I J : Box ι x y l u : ι → ℝ h : ¬∀ (i : ι), l i < u i i : ι hi : ¬l i < u i ⊢ ι\n[PROOFSTEP]\nexact Ioc_eq_empty hi\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\nI J : WithBot (Box ι)\n⊢ ↑(I ⊓ J) = ↑I ∩ ↑J\n[PROOFSTEP]\ninduction I using WithBot.recBotCoe\n[GOAL]\ncase bot\nι : Type u_1\nI J✝ : Box ι\nx y : ι → ℝ\nJ : WithBot (Box ι)\n⊢ ↑(⊥ ⊓ J) = ↑⊥ ∩ ↑J\n[PROOFSTEP]\nchange ∅ = _\n[GOAL]\ncase bot\nι : Type u_1\nI J✝ : Box ι\nx y : ι → ℝ\nJ : WithBot (Box ι)\n⊢ ∅ = ↑⊥ ∩ ↑J\n[PROOFSTEP]\nsimp\n[GOAL]\ncase coe\nι : Type u_1\nI J✝ : Box ι\nx y : ι → ℝ\nJ : WithBot (Box ι)\na✝ : Box ι\n⊢ ↑(↑a✝ ⊓ J) = ↑↑a✝ ∩ ↑J\n[PROOFSTEP]\ninduction J using WithBot.recBotCoe\n[GOAL]\ncase coe.bot\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\na✝ : Box ι\n⊢ ↑(↑a✝ ⊓ ⊥) = ↑↑a✝ ∩ ↑⊥\n[PROOFSTEP]\nchange ∅ = _\n[GOAL]\ncase coe.bot\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\na✝ : Box ι\n⊢ ∅ = ↑↑a✝ ∩ ↑⊥\n[PROOFSTEP]\nsimp\n[GOAL]\ncase coe.coe\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\na✝¹ a✝ : Box ι\n⊢ ↑(↑a✝¹ ⊓ ↑a✝) = ↑↑a✝¹ ∩ ↑↑a✝\n[PROOFSTEP]\nchange ((mk' _ _ : WithBot (Box ι)) : Set (ι → ℝ)) = _\n[GOAL]\ncase coe.coe\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\na✝¹ a✝ : Box ι\n⊢ ↑(mk' (fun i => (a✝¹.lower ⊔ a✝.lower) i) fun i => (a✝¹.upper ⊓ a✝.upper) i) = ↑↑a✝¹ ∩ ↑↑a✝\n[PROOFSTEP]\nsimp only [coe_eq_pi, ← pi_inter_distrib, Ioc_inter_Ioc, Pi.sup_apply, Pi.inf_apply, coe_mk', coe_coe]\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\nsrc✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup\nsrc✝ : Inf (WithBot (Box ι)) := WithBot.inf\nI J : WithBot (Box ι)\n⊢ I ⊓ J ≤ I\n[PROOFSTEP]\nrw [← withBotCoe_subset_iff, coe_inf]\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\nsrc✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup\nsrc✝ : Inf (WithBot (Box ι)) := WithBot.inf\nI J : WithBot (Box ι)\n⊢ ↑I ∩ ↑J ⊆ ↑I\n[PROOFSTEP]\nexact inter_subset_left _ _\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\nsrc✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup\nsrc✝ : Inf (WithBot (Box ι)) := WithBot.inf\nI J : WithBot (Box ι)\n⊢ I ⊓ J ≤ J\n[PROOFSTEP]\nrw [← withBotCoe_subset_iff, coe_inf]\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\nsrc✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup\nsrc✝ : Inf (WithBot (Box ι)) := WithBot.inf\nI J : WithBot (Box ι)\n⊢ ↑I ∩ ↑J ⊆ ↑J\n[PROOFSTEP]\nexact inter_subset_right _ _\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx y : ι → ℝ\nsrc✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup\nsrc✝ : Inf (WithBot (Box ι)) := WithBot.inf\nI J₁ J₂ : WithBot (Box ι)\nh₁ : I ≤ J₁\nh₂ : I ≤ J₂\n⊢ I ≤ J₁ ⊓ J₂\n[PROOFSTEP]\nsimp only [← withBotCoe_subset_iff, coe_inf] at *\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx y : ι → ℝ\nsrc✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup\nsrc✝ : Inf (WithBot (Box ι)) := WithBot.inf\nI J₁ J₂ : WithBot (Box ι)\nh₁ : ↑I ⊆ ↑J₁\nh₂ : ↑I ⊆ ↑J₂\n⊢ ↑I ⊆ ↑J₁ ∩ ↑J₂\n[PROOFSTEP]\nexact subset_inter h₁ h₂\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\nI J : WithBot (Box ι)\n⊢ Disjoint ↑I ↑J ↔ Disjoint I J\n[PROOFSTEP]\nsimp only [disjoint_iff_inf_le, ← withBotCoe_subset_iff, coe_inf]\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\nI J : WithBot (Box ι)\n⊢ ↑I ⊓ ↑J ≤ ⊥ ↔ ↑I ∩ ↑J ⊆ ↑⊥\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nI J : Box ι\nx y : ι → ℝ\n⊢ ¬Disjoint ↑I ↑J ↔ Set.Nonempty (↑I ∩ ↑J)\n[PROOFSTEP]\nrw [disjoint_coe, Set.not_disjoint_iff_nonempty_inter]\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx✝ y : ι → ℝ\nn : ℕ\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nx : ℝ\nhx : x ∈ Ioc (lower I i) (upper I i)\n⊢ MapsTo (Fin.insertNth i x) ↑(face I i) ↑I\n[PROOFSTEP]\nintro y hy\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx✝ y✝ : ι → ℝ\nn : ℕ\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nx : ℝ\nhx : x ∈ Ioc (lower I i) (upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑(face I i)\n⊢ Fin.insertNth i x y ∈ ↑I\n[PROOFSTEP]\nsimp_rw [mem_coe, mem_def, i.forall_iff_succAbove, Fin.insertNth_apply_same, Fin.insertNth_apply_succAbove]\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx✝ y✝ : ι → ℝ\nn : ℕ\nI : Box (Fin (n + 1))\ni : Fin (n + 1)\nx : ℝ\nhx : x ∈ Ioc (lower I i) (upper I i)\ny : Fin n → ℝ\nhy : y ∈ ↑(face I i)\n⊢ x ∈ Ioc (lower I i) (upper I i) ∧ ∀ (j : Fin n), y j ∈ Ioc (lower I (Fin.succAbove i j)) (upper I (Fin.succAbove i j))\n[PROOFSTEP]\nexact ⟨hx, hy⟩\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx y : ι → ℝ\nI : Box ι\n⊢ ∃ J,\n    (∀ (n : ℕ), ↑Box.Icc (↑J n) ⊆ ↑Box.Ioo I) ∧\n      Tendsto (lower ∘ ↑J) atTop (𝓝 I.lower) ∧ Tendsto (upper ∘ ↑J) atTop (𝓝 I.upper)\n[PROOFSTEP]\nchoose a b ha_anti hb_mono ha_mem hb_mem hab ha_tendsto hb_tendsto using fun i ↦\n  exists_seq_strictAnti_strictMono_tendsto (I.lower_lt_upper i)\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx y : ι → ℝ\nI : Box ι\na b : ι → ℕ → ℝ\nha_anti : ∀ (i : ι), StrictAnti (a i)\nhb_mono : ∀ (i : ι), StrictMono (b i)\nha_mem : ∀ (i : ι) (k : ℕ), a i k ∈ Ioo (lower I i) (upper I i)\nhb_mem : ∀ (i : ι) (l : ℕ), b i l ∈ Ioo (lower I i) (upper I i)\nhab : ∀ (i : ι) (k l : ℕ), a i k < b i l\nha_tendsto : ∀ (i : ι), Tendsto (a i) atTop (𝓝 (lower I i))\nhb_tendsto : ∀ (i : ι), Tendsto (b i) atTop (𝓝 (upper I i))\n⊢ ∃ J,\n    (∀ (n : ℕ), ↑Box.Icc (↑J n) ⊆ ↑Box.Ioo I) ∧\n      Tendsto (lower ∘ ↑J) atTop (𝓝 I.lower) ∧ Tendsto (upper ∘ ↑J) atTop (𝓝 I.upper)\n[PROOFSTEP]\nexact\n  ⟨⟨fun k ↦ ⟨flip a k, flip b k, fun i ↦ hab _ _ _⟩, fun k l hkl ↦\n      le_iff_bounds.2 ⟨fun i ↦ (ha_anti i).antitone hkl, fun i ↦ (hb_mono i).monotone hkl⟩⟩,\n    fun n x hx i _ ↦ ⟨(ha_mem _ _).1.trans_le (hx.1 _), (hx.2 _).trans_lt (hb_mem _ _).2⟩, tendsto_pi_nhds.2 ha_tendsto,\n    tendsto_pi_nhds.2 hb_tendsto⟩\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI J : Box ι\nr : ℝ\nh : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r\n⊢ distortion I = distortion J\n[PROOFSTEP]\nsimp only [distortion, nndist_pi_def, Real.nndist_eq', h, map_div₀]\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI J : Box ι\nr : ℝ\nh : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r\n⊢ (Finset.sup Finset.univ fun i =>\n      (Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b) / ↑Real.nnabs r) /\n        (↑Real.nnabs (upper J i - lower J i) / ↑Real.nnabs r)) =\n    Finset.sup Finset.univ fun i =>\n      (Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b)) / ↑Real.nnabs (upper J i - lower J i)\n[PROOFSTEP]\ncongr 1 with i\n[GOAL]\ncase e_f.h.a\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI J : Box ι\nr : ℝ\nh : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r\ni : ι\n⊢ ↑((Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b) / ↑Real.nnabs r) /\n        (↑Real.nnabs (upper J i - lower J i) / ↑Real.nnabs r)) =\n    ↑((Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b)) / ↑Real.nnabs (upper J i - lower J i))\n[PROOFSTEP]\nhave : 0 < r := by\n  by_contra hr\n  have := div_nonpos_of_nonneg_of_nonpos (sub_nonneg.2 <| J.lower_le_upper i) (not_lt.1 hr)\n  rw [← h] at this \n  exact this.not_lt (sub_pos.2 <| I.lower_lt_upper i)\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI J : Box ι\nr : ℝ\nh : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r\ni : ι\n⊢ 0 < r\n[PROOFSTEP]\nby_contra hr\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI J : Box ι\nr : ℝ\nh : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r\ni : ι\nhr : ¬0 < r\n⊢ False\n[PROOFSTEP]\nhave := div_nonpos_of_nonneg_of_nonpos (sub_nonneg.2 <| J.lower_le_upper i) (not_lt.1 hr)\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI J : Box ι\nr : ℝ\nh : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r\ni : ι\nhr : ¬0 < r\nthis : (upper J i - lower J i) / r ≤ 0\n⊢ False\n[PROOFSTEP]\nrw [← h] at this \n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI J : Box ι\nr : ℝ\nh : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r\ni : ι\nhr : ¬0 < r\nthis : upper I i - lower I i ≤ 0\n⊢ False\n[PROOFSTEP]\nexact this.not_lt (sub_pos.2 <| I.lower_lt_upper i)\n[GOAL]\ncase e_f.h.a\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI J : Box ι\nr : ℝ\nh : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r\ni : ι\nthis : 0 < r\n⊢ ↑((Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b) / ↑Real.nnabs r) /\n        (↑Real.nnabs (upper J i - lower J i) / ↑Real.nnabs r)) =\n    ↑((Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b)) / ↑Real.nnabs (upper J i - lower J i))\n[PROOFSTEP]\nhave hn0 := (map_ne_zero Real.nnabs).2 this.ne'\n[GOAL]\ncase e_f.h.a\nι : Type u_1\nI✝ J✝ : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI J : Box ι\nr : ℝ\nh : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r\ni : ι\nthis : 0 < r\nhn0 : ↑Real.nnabs r ≠ 0\n⊢ ↑((Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b) / ↑Real.nnabs r) /\n        (↑Real.nnabs (upper J i - lower J i) / ↑Real.nnabs r)) =\n    ↑((Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b)) / ↑Real.nnabs (upper J i - lower J i))\n[PROOFSTEP]\nsimp_rw [NNReal.finset_sup_div, div_div_div_cancel_right _ hn0]\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI : Box ι\ni : ι\n⊢ nndist I.lower I.upper / nndist (lower I i) (upper I i) * nndist (lower I i) (upper I i) ≤\n    distortion I * nndist (lower I i) (upper I i)\n[PROOFSTEP]\napply mul_le_mul_right'\n[GOAL]\ncase bc\nι : Type u_1\nI✝ J : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI : Box ι\ni : ι\n⊢ nndist I.lower I.upper / nndist (lower I i) (upper I i) ≤ distortion I\n[PROOFSTEP]\napply Finset.le_sup (Finset.mem_univ i)\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI : Box ι\ni : ι\n⊢ dist I.lower I.upper ≤ ↑(distortion I) * (upper I i - lower I i)\n[PROOFSTEP]\nhave A : I.lower i - I.upper i < 0 := sub_neg.2 (I.lower_lt_upper i)\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx y : ι → ℝ\ninst✝ : Fintype ι\nI : Box ι\ni : ι\nA : lower I i - upper I i < 0\n⊢ dist I.lower I.upper ≤ ↑(distortion I) * (upper I i - lower I i)\n[PROOFSTEP]\nsimpa only [← NNReal.coe_le_coe, ← dist_nndist, NNReal.coe_mul, Real.dist_eq, abs_of_neg A, neg_sub] using\n  I.nndist_le_distortion_mul i\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\nx✝ y✝ : ι → ℝ\ninst✝ : Fintype ι\nI : Box ι\ni : ι\nc : ℝ≥0\nh : distortion I ≤ c\nthis : 0 ≤ ↑c * (upper I i - lower I i)\nx : ι → ℝ\nhx : x ∈ ↑Box.Icc I\ny : ι → ℝ\nhy : y ∈ ↑Box.Icc I\n⊢ ↑(distortion I) * (upper I i - lower I i) ≤ ↑c * (upper I i - lower I i)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase a0\nι : Type u_1\nI✝ J : Box ι\nx✝ y✝ : ι → ℝ\ninst✝ : Fintype ι\nI : Box ι\ni : ι\nc : ℝ≥0\nh : distortion I ≤ c\nthis : 0 ≤ ↑c * (upper I i - lower I i)\nx : ι → ℝ\nhx : x ∈ ↑Box.Icc I\ny : ι → ℝ\nhy : y ∈ ↑Box.Icc I\n⊢ 0 ≤ upper I i - lower I i\n[PROOFSTEP]\nexact sub_nonneg.2 (I.lower_le_upper i)\n", "meta": {"mathlib_filename": "Mathlib.Analysis.BoxIntegral.Box.Basic", "llama_tokens": 11914, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.685949467848392, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.39089012298953624}}
{"text": "[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX Y : limit (F ⋙ objects)\nX✝ Y✝ : J\nf : X✝ ⟶ Y✝\ng : (fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y) X✝\n⊢ (fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y) Y✝\n[PROOFSTEP]\nrefine' eqToHom _ ≫ (F.map f).map g ≫ eqToHom _\n[GOAL]\ncase refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX Y : limit (F ⋙ objects)\nX✝ Y✝ : J\nf : X✝ ⟶ Y✝\ng : (fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y) X✝\n⊢ limit.π (F ⋙ objects) Y✝ X = (F.map f).obj (limit.π (F ⋙ objects) X✝ X)\ncase refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX Y : limit (F ⋙ objects)\nX✝ Y✝ : J\nf : X✝ ⟶ Y✝\ng : (fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y) X✝\n⊢ (F.map f).obj (limit.π (F ⋙ objects) X✝ Y) = limit.π (F ⋙ objects) Y✝ Y\n[PROOFSTEP]\nexact (congr_fun (limit.w (F ⋙ Cat.objects) f) X).symm\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX Y : limit (F ⋙ objects)\nX✝ Y✝ : J\nf : X✝ ⟶ Y✝\ng : (fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y) X✝\n⊢ (F.map f).obj (limit.π (F ⋙ objects) X✝ Y) = limit.π (F ⋙ objects) Y✝ Y\n[PROOFSTEP]\nexact congr_fun (limit.w (F ⋙ Cat.objects) f) Y\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX✝ Y : limit (F ⋙ objects)\nX : J\n⊢ { obj := fun j => limit.π (F ⋙ objects) j X✝ ⟶ limit.π (F ⋙ objects) j Y,\n          map := fun {X Y_1} f g =>\n            eqToHom (_ : limit.π (F ⋙ objects) Y_1 X✝ = (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) X✝) ≫\n              (F.map f).map g ≫\n                eqToHom (_ : (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.map\n      (𝟙 X) =\n    𝟙\n      ({ obj := fun j => limit.π (F ⋙ objects) j X✝ ⟶ limit.π (F ⋙ objects) j Y,\n            map := fun {X Y_1} f g =>\n              eqToHom (_ : limit.π (F ⋙ objects) Y_1 X✝ = (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) X✝) ≫\n                (F.map f).map g ≫\n                  eqToHom (_ : (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.obj\n        X)\n[PROOFSTEP]\nfunext f\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX✝ Y : limit (F ⋙ objects)\nX : J\nf :\n  { obj := fun j => limit.π (F ⋙ objects) j X✝ ⟶ limit.π (F ⋙ objects) j Y,\n        map := fun {X Y_1} f g =>\n          eqToHom (_ : limit.π (F ⋙ objects) Y_1 X✝ = (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) X✝) ≫\n            (F.map f).map g ≫\n              eqToHom (_ : (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.obj\n    X\n⊢ { obj := fun j => limit.π (F ⋙ objects) j X✝ ⟶ limit.π (F ⋙ objects) j Y,\n          map := fun {X Y_1} f g =>\n            eqToHom (_ : limit.π (F ⋙ objects) Y_1 X✝ = (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) X✝) ≫\n              (F.map f).map g ≫\n                eqToHom (_ : (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.map\n      (𝟙 X) f =\n    𝟙\n      ({ obj := fun j => limit.π (F ⋙ objects) j X✝ ⟶ limit.π (F ⋙ objects) j Y,\n            map := fun {X Y_1} f g =>\n              eqToHom (_ : limit.π (F ⋙ objects) Y_1 X✝ = (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) X✝) ≫\n                (F.map f).map g ≫\n                  eqToHom (_ : (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.obj\n        X)\n      f\n[PROOFSTEP]\nletI : Category (objects.obj (F.obj X)) := (inferInstance : Category (F.obj X))\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX✝ Y : limit (F ⋙ objects)\nX : J\nf :\n  { obj := fun j => limit.π (F ⋙ objects) j X✝ ⟶ limit.π (F ⋙ objects) j Y,\n        map := fun {X Y_1} f g =>\n          eqToHom (_ : limit.π (F ⋙ objects) Y_1 X✝ = (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) X✝) ≫\n            (F.map f).map g ≫\n              eqToHom (_ : (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.obj\n    X\nthis : Category.{v, v} (objects.obj (F.obj X)) := inferInstance\n⊢ { obj := fun j => limit.π (F ⋙ objects) j X✝ ⟶ limit.π (F ⋙ objects) j Y,\n          map := fun {X Y_1} f g =>\n            eqToHom (_ : limit.π (F ⋙ objects) Y_1 X✝ = (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) X✝) ≫\n              (F.map f).map g ≫\n                eqToHom (_ : (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.map\n      (𝟙 X) f =\n    𝟙\n      ({ obj := fun j => limit.π (F ⋙ objects) j X✝ ⟶ limit.π (F ⋙ objects) j Y,\n            map := fun {X Y_1} f g =>\n              eqToHom (_ : limit.π (F ⋙ objects) Y_1 X✝ = (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) X✝) ≫\n                (F.map f).map g ≫\n                  eqToHom (_ : (limit.π (F ⋙ objects) X ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.obj\n        X)\n      f\n[PROOFSTEP]\nsimp [Functor.congr_hom (F.map_id X) f]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX Y : limit (F ⋙ objects)\nx✝¹ x✝ Z : J\nf : x✝¹ ⟶ x✝\ng : x✝ ⟶ Z\n⊢ { obj := fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y,\n          map := fun {X_1 Y_1} f g =>\n            eqToHom (_ : limit.π (F ⋙ objects) Y_1 X = (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) X) ≫\n              (F.map f).map g ≫\n                eqToHom (_ : (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.map\n      (f ≫ g) =\n    { obj := fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y,\n            map := fun {X_1 Y_1} f g =>\n              eqToHom (_ : limit.π (F ⋙ objects) Y_1 X = (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) X) ≫\n                (F.map f).map g ≫\n                  eqToHom (_ : (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.map\n        f ≫\n      { obj := fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y,\n            map := fun {X_1 Y_1} f g =>\n              eqToHom (_ : limit.π (F ⋙ objects) Y_1 X = (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) X) ≫\n                (F.map f).map g ≫\n                  eqToHom (_ : (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.map\n        g\n[PROOFSTEP]\nfunext h\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX Y : limit (F ⋙ objects)\nx✝¹ x✝ Z : J\nf : x✝¹ ⟶ x✝\ng : x✝ ⟶ Z\nh :\n  { obj := fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y,\n        map := fun {X_1 Y_1} f g =>\n          eqToHom (_ : limit.π (F ⋙ objects) Y_1 X = (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) X) ≫\n            (F.map f).map g ≫\n              eqToHom (_ : (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.obj\n    x✝¹\n⊢ { obj := fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y,\n          map := fun {X_1 Y_1} f g =>\n            eqToHom (_ : limit.π (F ⋙ objects) Y_1 X = (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) X) ≫\n              (F.map f).map g ≫\n                eqToHom (_ : (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.map\n      (f ≫ g) h =\n    ({ obj := fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y,\n              map := fun {X_1 Y_1} f g =>\n                eqToHom (_ : limit.π (F ⋙ objects) Y_1 X = (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) X) ≫\n                  (F.map f).map g ≫\n                    eqToHom\n                      (_ : (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.map\n          f ≫\n        { obj := fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y,\n              map := fun {X_1 Y_1} f g =>\n                eqToHom (_ : limit.π (F ⋙ objects) Y_1 X = (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) X) ≫\n                  (F.map f).map g ≫\n                    eqToHom\n                      (_ : (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.map\n          g)\n      h\n[PROOFSTEP]\nletI : Category (objects.obj (F.obj Z)) := (inferInstance : Category (F.obj Z))\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX Y : limit (F ⋙ objects)\nx✝¹ x✝ Z : J\nf : x✝¹ ⟶ x✝\ng : x✝ ⟶ Z\nh :\n  { obj := fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y,\n        map := fun {X_1 Y_1} f g =>\n          eqToHom (_ : limit.π (F ⋙ objects) Y_1 X = (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) X) ≫\n            (F.map f).map g ≫\n              eqToHom (_ : (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.obj\n    x✝¹\nthis : Category.{v, v} (objects.obj (F.obj Z)) := inferInstance\n⊢ { obj := fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y,\n          map := fun {X_1 Y_1} f g =>\n            eqToHom (_ : limit.π (F ⋙ objects) Y_1 X = (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) X) ≫\n              (F.map f).map g ≫\n                eqToHom (_ : (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.map\n      (f ≫ g) h =\n    ({ obj := fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y,\n              map := fun {X_1 Y_1} f g =>\n                eqToHom (_ : limit.π (F ⋙ objects) Y_1 X = (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) X) ≫\n                  (F.map f).map g ≫\n                    eqToHom\n                      (_ : (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.map\n          f ≫\n        { obj := fun j => limit.π (F ⋙ objects) j X ⟶ limit.π (F ⋙ objects) j Y,\n              map := fun {X_1 Y_1} f g =>\n                eqToHom (_ : limit.π (F ⋙ objects) Y_1 X = (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) X) ≫\n                  (F.map f).map g ≫\n                    eqToHom\n                      (_ : (limit.π (F ⋙ objects) X_1 ≫ (F ⋙ objects).map f) Y = limit.π (F ⋙ objects) Y_1 Y) }.map\n          g)\n      h\n[PROOFSTEP]\nsimp [Functor.congr_hom (F.map_comp f g) h, eqToHom_map]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX : limit (F ⋙ objects)\nj j' : J\nf : j ⟶ j'\n⊢ (homDiagram X X).map f ((fun j => 𝟙 (limit.π (F ⋙ objects) j X)) j) = (fun j => 𝟙 (limit.π (F ⋙ objects) j X)) j'\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX Y Z : limit (F ⋙ objects)\nf : X ⟶ Y\ng : Y ⟶ Z\nj j' : J\nh : j ⟶ j'\n⊢ (homDiagram X Z).map h ((fun j => limit.π (homDiagram X Y) j f ≫ limit.π (homDiagram Y Z) j g) j) =\n    (fun j => limit.π (homDiagram X Y) j f ≫ limit.π (homDiagram Y Z) j g) j'\n[PROOFSTEP]\nsimp [← congr_fun (limit.w (homDiagram X Y) h) f, ← congr_fun (limit.w (homDiagram Y Z) h) g]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX✝ Y✝ : limit (F ⋙ objects)\nx✝ : X✝ ⟶ Y✝\n⊢ 𝟙 X✝ ≫ x✝ = x✝\n[PROOFSTEP]\napply Types.limit_ext.{v, v}\n[GOAL]\ncase w\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX✝ Y✝ : limit (F ⋙ objects)\nx✝ : X✝ ⟶ Y✝\n⊢ ∀ (j : J), limit.π (homDiagram X✝ Y✝) j (𝟙 X✝ ≫ x✝) = limit.π (homDiagram X✝ Y✝) j x✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX✝ Y✝ : limit (F ⋙ objects)\nx✝ : X✝ ⟶ Y✝\n⊢ x✝ ≫ 𝟙 Y✝ = x✝\n[PROOFSTEP]\napply Types.limit_ext.{v, v}\n[GOAL]\ncase w\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX✝ Y✝ : limit (F ⋙ objects)\nx✝ : X✝ ⟶ Y✝\n⊢ ∀ (j : J), limit.π (homDiagram X✝ Y✝) j (x✝ ≫ 𝟙 Y✝) = limit.π (homDiagram X✝ Y✝) j x✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\n⊢ limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝ ⟶\n    limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝\n[PROOFSTEP]\nfapply Types.Limit.mk.{v, v}\n[GOAL]\ncase x\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\n⊢ (j : J) →\n    (homDiagram (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝)\n          (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝)).obj\n      j\n[PROOFSTEP]\nintro j\n[GOAL]\ncase x\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\nj : J\n⊢ (homDiagram (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝)\n        (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝)).obj\n    j\n[PROOFSTEP]\nrefine' eqToHom _ ≫ (s.π.app j).map f ≫ eqToHom _\n[GOAL]\ncase x.refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\nj : J\n⊢ limit.π (F ⋙ objects) j\n      (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n    (NatTrans.app s.π j).obj X✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase x.refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\nj : J\n⊢ (NatTrans.app s.π j).obj Y✝ =\n    limit.π (F ⋙ objects) j\n      (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\n⊢ ∀ (j j' : J) (f_1 : j ⟶ j'),\n    (homDiagram (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝)\n            (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝)).map\n        f_1\n        (eqToHom\n            (_ :\n              limit.π (F ⋙ objects) j\n                  (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n                (NatTrans.app s.π j).obj X✝) ≫\n          (NatTrans.app s.π j).map f ≫\n            eqToHom\n              (_ :\n                (NatTrans.app s.π j).obj Y✝ =\n                  limit.π (F ⋙ objects) j\n                    (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                      Y✝))) =\n      eqToHom\n          (_ :\n            limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n              (NatTrans.app s.π j').obj X✝) ≫\n        (NatTrans.app s.π j').map f ≫\n          eqToHom\n            (_ :\n              (NatTrans.app s.π j').obj Y✝ =\n                limit.π (F ⋙ objects) j'\n                  (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝))\n[PROOFSTEP]\nintro j j' h\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\nj j' : J\nh : j ⟶ j'\n⊢ (homDiagram (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝)\n          (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝)).map\n      h\n      (eqToHom\n          (_ :\n            limit.π (F ⋙ objects) j\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n              (NatTrans.app s.π j).obj X✝) ≫\n        (NatTrans.app s.π j).map f ≫\n          eqToHom\n            (_ :\n              (NatTrans.app s.π j).obj Y✝ =\n                limit.π (F ⋙ objects) j\n                  (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝))) =\n    eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (NatTrans.app s.π j').obj X✝) ≫\n      (NatTrans.app s.π j').map f ≫\n        eqToHom\n          (_ :\n            (NatTrans.app s.π j').obj Y✝ =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\nj j' : J\nh : j ⟶ j'\n⊢ eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (limit.π (F ⋙ objects) j ≫ (F ⋙ objects).map h)\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝)) ≫\n      (F.map h).map\n          (eqToHom\n              (_ :\n                limit.π (F ⋙ objects) j\n                    (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n                  (NatTrans.app s.π j).obj X✝) ≫\n            (NatTrans.app s.π j).map f ≫\n              eqToHom\n                (_ :\n                  (NatTrans.app s.π j).obj Y✝ =\n                    limit.π (F ⋙ objects) j\n                      (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                        Y✝))) ≫\n        eqToHom\n          (_ :\n            (limit.π (F ⋙ objects) j ≫ (F ⋙ objects).map h)\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝) =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝)) =\n    eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (NatTrans.app s.π j').obj X✝) ≫\n      (NatTrans.app s.π j').map f ≫\n        eqToHom\n          (_ :\n            (NatTrans.app s.π j').obj Y✝ =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝))\n[PROOFSTEP]\nsimp only [Category.assoc, Functor.map_comp, eqToHom_map, eqToHom_trans, eqToHom_trans_assoc, ← Functor.comp_map]\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\nj j' : J\nh : j ⟶ j'\n⊢ eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (F.map h).obj ((NatTrans.app s.π j).obj X✝)) ≫\n      (NatTrans.app s.π j ⋙ F.map h).map f ≫\n        eqToHom\n          (_ :\n            (F.map h).obj ((NatTrans.app s.π j).obj Y✝) =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝)) =\n    eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (NatTrans.app s.π j').obj X✝) ≫\n      (NatTrans.app s.π j').map f ≫\n        eqToHom\n          (_ :\n            (NatTrans.app s.π j').obj Y✝ =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝))\n[PROOFSTEP]\nhave := (s.π.naturality h).symm\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\nj j' : J\nh : j ⟶ j'\nthis : NatTrans.app s.π j ≫ F.map h = ((Functor.const J).obj s.pt).map h ≫ NatTrans.app s.π j'\n⊢ eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (F.map h).obj ((NatTrans.app s.π j).obj X✝)) ≫\n      (NatTrans.app s.π j ⋙ F.map h).map f ≫\n        eqToHom\n          (_ :\n            (F.map h).obj ((NatTrans.app s.π j).obj Y✝) =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝)) =\n    eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (NatTrans.app s.π j').obj X✝) ≫\n      (NatTrans.app s.π j').map f ≫\n        eqToHom\n          (_ :\n            (NatTrans.app s.π j').obj Y✝ =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝))\n[PROOFSTEP]\ndsimp at this \n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\nj j' : J\nh : j ⟶ j'\nthis : NatTrans.app s.π j ≫ F.map h = 𝟙 s.pt ≫ NatTrans.app s.π j'\n⊢ eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (F.map h).obj ((NatTrans.app s.π j).obj X✝)) ≫\n      (NatTrans.app s.π j ⋙ F.map h).map f ≫\n        eqToHom\n          (_ :\n            (F.map h).obj ((NatTrans.app s.π j).obj Y✝) =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝)) =\n    eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (NatTrans.app s.π j').obj X✝) ≫\n      (NatTrans.app s.π j').map f ≫\n        eqToHom\n          (_ :\n            (NatTrans.app s.π j').obj Y✝ =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝))\n[PROOFSTEP]\nrw [Category.id_comp] at this \n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\nj j' : J\nh : j ⟶ j'\nthis : NatTrans.app s.π j ≫ F.map h = NatTrans.app s.π j'\n⊢ eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (F.map h).obj ((NatTrans.app s.π j).obj X✝)) ≫\n      (NatTrans.app s.π j ⋙ F.map h).map f ≫\n        eqToHom\n          (_ :\n            (F.map h).obj ((NatTrans.app s.π j).obj Y✝) =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝)) =\n    eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (NatTrans.app s.π j').obj X✝) ≫\n      (NatTrans.app s.π j').map f ≫\n        eqToHom\n          (_ :\n            (NatTrans.app s.π j').obj Y✝ =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝))\n[PROOFSTEP]\nerw [Functor.congr_hom this f]\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nX✝ Y✝ : ↑s.pt\nf : X✝ ⟶ Y✝\nj j' : J\nh : j ⟶ j'\nthis : NatTrans.app s.π j ≫ F.map h = NatTrans.app s.π j'\n⊢ eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (F.map h).obj ((NatTrans.app s.π j).obj X✝)) ≫\n      (eqToHom (_ : (NatTrans.app s.π j ≫ F.map h).obj X✝ = (NatTrans.app s.π j').obj X✝) ≫\n          (NatTrans.app s.π j').map f ≫\n            eqToHom (_ : (NatTrans.app s.π j').obj Y✝ = (NatTrans.app s.π j ≫ F.map h).obj Y✝)) ≫\n        eqToHom\n          (_ :\n            (F.map h).obj ((NatTrans.app s.π j).obj Y✝) =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝)) =\n    eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j'\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X✝) =\n            (NatTrans.app s.π j').obj X✝) ≫\n      (NatTrans.app s.π j').map f ≫\n        eqToHom\n          (_ :\n            (NatTrans.app s.π j').obj Y✝ =\n              limit.π (F ⋙ objects) j'\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX Y : limit (F ⋙ objects)\nj : J\nh : X = Y\n⊢ limit.π (homDiagram X Y) j (eqToHom h) = eqToHom (_ : limit.π (F ⋙ objects) j X = limit.π (F ⋙ objects) j Y)\n[PROOFSTEP]\nsubst h\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\nX : limit (F ⋙ objects)\nj : J\n⊢ limit.π (homDiagram X X) j (eqToHom (_ : X = X)) = eqToHom (_ : limit.π (F ⋙ objects) j X = limit.π (F ⋙ objects) j X)\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nj : J\n⊢ ∀ (X : ↑s.pt), (limitConeLift F s ≫ NatTrans.app (limitCone F).π j).obj X = (NatTrans.app s.π j).obj X\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nj : J\nX Y : ↑s.pt\nf : X ⟶ Y\n⊢ (limitConeLift F s ≫ NatTrans.app (limitCone F).π j).map f =\n    eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X) =\n            (NatTrans.app s.π j).obj X) ≫\n      (NatTrans.app s.π j).map f ≫\n        eqToHom (_ : (NatTrans.app s.π j).obj Y = (limitConeLift F s ≫ NatTrans.app (limitCone F).π j).obj Y)\n[PROOFSTEP]\ndsimp [limitConeLift]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nj : J\nX Y : ↑s.pt\nf : X ⟶ Y\n⊢ limit.π\n      (homDiagram (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X)\n        (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n      j\n      (Types.Limit.mk\n        (homDiagram (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X)\n          (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n        (fun j =>\n          eqToHom\n              (_ :\n                limit.π (F ⋙ objects) j\n                    (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X) =\n                  (NatTrans.app s.π j).obj X) ≫\n            (NatTrans.app s.π j).map f ≫\n              eqToHom\n                (_ :\n                  (NatTrans.app s.π j).obj Y =\n                    limit.π (F ⋙ objects) j\n                      (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y)))\n        (_ :\n          ∀ (j j' : J) (h : j ⟶ j'),\n            (homDiagram (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X)\n                    (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                      Y)).map\n                h\n                (eqToHom\n                    (_ :\n                      limit.π (F ⋙ objects) j\n                          (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                            X) =\n                        (NatTrans.app s.π j).obj X) ≫\n                  (NatTrans.app s.π j).map f ≫\n                    eqToHom\n                      (_ :\n                        (NatTrans.app s.π j).obj Y =\n                          limit.π (F ⋙ objects) j\n                            (limit.lift (F ⋙ objects)\n                              { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))) =\n              eqToHom\n                  (_ :\n                    limit.π (F ⋙ objects) j'\n                        (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                          X) =\n                      (NatTrans.app s.π j').obj X) ≫\n                (NatTrans.app s.π j').map f ≫\n                  eqToHom\n                    (_ :\n                      (NatTrans.app s.π j').obj Y =\n                        limit.π (F ⋙ objects) j'\n                          (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                            Y)))) =\n    eqToHom\n        (_ :\n          limit.π (F ⋙ objects) j\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X) =\n            (NatTrans.app s.π j).obj X) ≫\n      (NatTrans.app s.π j).map f ≫\n        eqToHom\n          (_ :\n            (NatTrans.app s.π j).obj Y =\n              limit.π (F ⋙ objects) j\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n[PROOFSTEP]\nexact Types.Limit.π_mk.{v, v} _ _ _ _\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nm : s.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone F).π j = NatTrans.app s.π j\n⊢ m = limitConeLift F s\n[PROOFSTEP]\nsymm\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nm : s.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone F).π j = NatTrans.app s.π j\n⊢ limitConeLift F s = m\n[PROOFSTEP]\nrefine' CategoryTheory.Functor.ext _ _\n[GOAL]\ncase refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nm : s.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone F).π j = NatTrans.app s.π j\n⊢ ∀ (X : ↑s.pt), (limitConeLift F s).obj X = m.obj X\n[PROOFSTEP]\nintro X\n[GOAL]\ncase refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nm : s.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone F).π j = NatTrans.app s.π j\nX : ↑s.pt\n⊢ (limitConeLift F s).obj X = m.obj X\n[PROOFSTEP]\napply Types.limit_ext.{v, v}\n[GOAL]\ncase refine'_1.w\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nm : s.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone F).π j = NatTrans.app s.π j\nX : ↑s.pt\n⊢ ∀ (j : J), limit.π (F ⋙ objects) j ((limitConeLift F s).obj X) = limit.π (F ⋙ objects) j (m.obj X)\n[PROOFSTEP]\nintro j\n[GOAL]\ncase refine'_1.w\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nm : s.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone F).π j = NatTrans.app s.π j\nX : ↑s.pt\nj : J\n⊢ limit.π (F ⋙ objects) j ((limitConeLift F s).obj X) = limit.π (F ⋙ objects) j (m.obj X)\n[PROOFSTEP]\nsimp [Types.Limit.lift_π_apply', ← w j]\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nm : s.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone F).π j = NatTrans.app s.π j\n⊢ ∀ (X Y : ↑s.pt) (f : X ⟶ Y),\n    (limitConeLift F s).map f =\n      eqToHom (_ : (limitConeLift F s).obj X = m.obj X) ≫ m.map f ≫ eqToHom (_ : m.obj Y = (limitConeLift F s).obj Y)\n[PROOFSTEP]\nintro X Y f\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nm : s.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone F).π j = NatTrans.app s.π j\nX Y : ↑s.pt\nf : X ⟶ Y\n⊢ (limitConeLift F s).map f =\n    eqToHom (_ : (limitConeLift F s).obj X = m.obj X) ≫ m.map f ≫ eqToHom (_ : m.obj Y = (limitConeLift F s).obj Y)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ Cat\ns : Cone F\nm : s.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone F).π j = NatTrans.app s.π j\nX Y : ↑s.pt\nf : X ⟶ Y\n⊢ Types.Limit.mk\n      (homDiagram (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X)\n        (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n      (fun j =>\n        eqToHom\n            (_ :\n              limit.π (F ⋙ objects) j\n                  (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X) =\n                (NatTrans.app s.π j).obj X) ≫\n          (NatTrans.app s.π j).map f ≫\n            eqToHom\n              (_ :\n                (NatTrans.app s.π j).obj Y =\n                  limit.π (F ⋙ objects) j\n                    (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y)))\n      (_ :\n        ∀ (j j' : J) (h : j ⟶ j'),\n          (homDiagram (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X)\n                  (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y)).map\n              h\n              (eqToHom\n                  (_ :\n                    limit.π (F ⋙ objects) j\n                        (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                          X) =\n                      (NatTrans.app s.π j).obj X) ≫\n                (NatTrans.app s.π j).map f ≫\n                  eqToHom\n                    (_ :\n                      (NatTrans.app s.π j).obj Y =\n                        limit.π (F ⋙ objects) j\n                          (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                            Y))) =\n            eqToHom\n                (_ :\n                  limit.π (F ⋙ objects) j'\n                      (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X) =\n                    (NatTrans.app s.π j').obj X) ≫\n              (NatTrans.app s.π j').map f ≫\n                eqToHom\n                  (_ :\n                    (NatTrans.app s.π j').obj Y =\n                      limit.π (F ⋙ objects) j'\n                        (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                          Y))) =\n    Types.Limit.mk\n      (homDiagram (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X)\n        (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n      (fun j =>\n        limit.π\n            (homDiagram (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X)\n              (m.obj X))\n            j\n            (eqToHom\n              (_ :\n                limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X =\n                  m.obj X)) ≫\n          limit.π\n            (homDiagram (m.obj X)\n              (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n            j\n            (Types.Limit.mk\n              (homDiagram (m.obj X)\n                (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n              (fun j =>\n                limit.π (homDiagram (m.obj X) (m.obj Y)) j (m.map f) ≫\n                  limit.π\n                    (homDiagram (m.obj Y)\n                      (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n                    j\n                    (eqToHom\n                      (_ :\n                        m.obj Y =\n                          limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                            Y)))\n              (_ :\n                ∀ (j j' : J) (h : j ⟶ j'),\n                  eqToHom\n                        (_ :\n                          limit.π (F ⋙ objects) j' (m.obj X) =\n                            (limit.π (F ⋙ objects) j ≫ (F ⋙ objects).map h) (m.obj X)) ≫\n                      (F.map h).map\n                          (limit.π (homDiagram (m.obj X) (m.obj Y)) j (m.map f) ≫\n                            limit.π\n                              (homDiagram (m.obj Y)\n                                (limit.lift (F ⋙ objects)\n                                  { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n                              j\n                              (eqToHom\n                                (_ :\n                                  m.obj Y =\n                                    limit.lift (F ⋙ objects)\n                                      { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))) ≫\n                        eqToHom\n                          (_ :\n                            (limit.π (F ⋙ objects) j ≫ (F ⋙ objects).map h)\n                                (limit.lift (F ⋙ objects)\n                                  { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y) =\n                              limit.π (F ⋙ objects) j'\n                                (limit.lift (F ⋙ objects)\n                                  { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y)) =\n                    limit.π (homDiagram (m.obj X) (m.obj Y)) j' (m.map f) ≫\n                      limit.π\n                        (homDiagram (m.obj Y)\n                          (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                            Y))\n                        j'\n                        (eqToHom\n                          (_ :\n                            m.obj Y =\n                              limit.lift (F ⋙ objects)\n                                { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y)))))\n      (_ :\n        ∀ (j j' : J) (h : j ⟶ j'),\n          eqToHom\n                (_ :\n                  limit.π (F ⋙ objects) j'\n                      (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X) =\n                    (limit.π (F ⋙ objects) j ≫ (F ⋙ objects).map h)\n                      (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                        X)) ≫\n              (F.map h).map\n                  (limit.π\n                      (homDiagram\n                        (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X)\n                        (m.obj X))\n                      j\n                      (eqToHom\n                        (_ :\n                          limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                              X =\n                            m.obj X)) ≫\n                    limit.π\n                      (homDiagram (m.obj X)\n                        (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                          Y))\n                      j\n                      (Types.Limit.mk\n                        (homDiagram (m.obj X)\n                          (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                            Y))\n                        (fun j =>\n                          limit.π (homDiagram (m.obj X) (m.obj Y)) j (m.map f) ≫\n                            limit.π\n                              (homDiagram (m.obj Y)\n                                (limit.lift (F ⋙ objects)\n                                  { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n                              j\n                              (eqToHom\n                                (_ :\n                                  m.obj Y =\n                                    limit.lift (F ⋙ objects)\n                                      { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y)))\n                        (_ :\n                          ∀ (j j' : J) (h : j ⟶ j'),\n                            eqToHom\n                                  (_ :\n                                    limit.π (F ⋙ objects) j' (m.obj X) =\n                                      (limit.π (F ⋙ objects) j ≫ (F ⋙ objects).map h) (m.obj X)) ≫\n                                (F.map h).map\n                                    (limit.π (homDiagram (m.obj X) (m.obj Y)) j (m.map f) ≫\n                                      limit.π\n                                        (homDiagram (m.obj Y)\n                                          (limit.lift (F ⋙ objects)\n                                            { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n                                        j\n                                        (eqToHom\n                                          (_ :\n                                            m.obj Y =\n                                              limit.lift (F ⋙ objects)\n                                                { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                                                Y))) ≫\n                                  eqToHom\n                                    (_ :\n                                      (limit.π (F ⋙ objects) j ≫ (F ⋙ objects).map h)\n                                          (limit.lift (F ⋙ objects)\n                                            { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y) =\n                                        limit.π (F ⋙ objects) j'\n                                          (limit.lift (F ⋙ objects)\n                                            { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y)) =\n                              limit.π (homDiagram (m.obj X) (m.obj Y)) j' (m.map f) ≫\n                                limit.π\n                                  (homDiagram (m.obj Y)\n                                    (limit.lift (F ⋙ objects)\n                                      { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n                                  j'\n                                  (eqToHom\n                                    (_ :\n                                      m.obj Y =\n                                        limit.lift (F ⋙ objects)\n                                          { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))))) ≫\n                eqToHom\n                  (_ :\n                    (limit.π (F ⋙ objects) j ≫ (F ⋙ objects).map h)\n                        (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                          Y) =\n                      limit.π (F ⋙ objects) j'\n                        (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                          Y)) =\n            limit.π\n                (homDiagram\n                  (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X)\n                  (m.obj X))\n                j'\n                (eqToHom\n                  (_ :\n                    limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } X =\n                      m.obj X)) ≫\n              limit.π\n                (homDiagram (m.obj X)\n                  (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n                j'\n                (Types.Limit.mk\n                  (homDiagram (m.obj X)\n                    (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n                  (fun j =>\n                    limit.π (homDiagram (m.obj X) (m.obj Y)) j (m.map f) ≫\n                      limit.π\n                        (homDiagram (m.obj Y)\n                          (limit.lift (F ⋙ objects) { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj }\n                            Y))\n                        j\n                        (eqToHom\n                          (_ :\n                            m.obj Y =\n                              limit.lift (F ⋙ objects)\n                                { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y)))\n                  (_ :\n                    ∀ (j j' : J) (h : j ⟶ j'),\n                      eqToHom\n                            (_ :\n                              limit.π (F ⋙ objects) j' (m.obj X) =\n                                (limit.π (F ⋙ objects) j ≫ (F ⋙ objects).map h) (m.obj X)) ≫\n                          (F.map h).map\n                              (limit.π (homDiagram (m.obj X) (m.obj Y)) j (m.map f) ≫\n                                limit.π\n                                  (homDiagram (m.obj Y)\n                                    (limit.lift (F ⋙ objects)\n                                      { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n                                  j\n                                  (eqToHom\n                                    (_ :\n                                      m.obj Y =\n                                        limit.lift (F ⋙ objects)\n                                          { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))) ≫\n                            eqToHom\n                              (_ :\n                                (limit.π (F ⋙ objects) j ≫ (F ⋙ objects).map h)\n                                    (limit.lift (F ⋙ objects)\n                                      { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y) =\n                                  limit.π (F ⋙ objects) j'\n                                    (limit.lift (F ⋙ objects)\n                                      { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y)) =\n                        limit.π (homDiagram (m.obj X) (m.obj Y)) j' (m.map f) ≫\n                          limit.π\n                            (homDiagram (m.obj Y)\n                              (limit.lift (F ⋙ objects)\n                                { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y))\n                            j'\n                            (eqToHom\n                              (_ :\n                                m.obj Y =\n                                  limit.lift (F ⋙ objects)\n                                    { pt := ↑s.pt, π := NatTrans.mk fun j => (NatTrans.app s.π j).obj } Y)))))\n[PROOFSTEP]\nsimp [fun j => Functor.congr_hom (w j).symm f]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nJ✝ : Type v\ninst✝ : Category.{v, v} J✝\nF : J✝ ⥤ Cat\n⊢ (limit.cone (F ⋙ objects)).pt ≅ (objects.mapCone (HasLimits.limitCone F)).pt\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nJ✝ : Type v\ninst✝ : Category.{v, v} J✝\nF : J✝ ⥤ Cat\n⊢ ∀ (j : J✝),\n    NatTrans.app (limit.cone (F ⋙ objects)).π j =\n      (Iso.refl (limit.cone (F ⋙ objects)).pt).hom ≫ NatTrans.app (objects.mapCone (HasLimits.limitCone F)).π j\n[PROOFSTEP]\naesop_cat\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Category.Cat.Limit", "llama_tokens": 19710, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7879312056025699, "lm_q2_score": 0.4960938294709195, "lm_q1q2_score": 0.3908878091470173}}
{"text": "[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nϕ : L →ᴸ L'\nL'' : Language\nF G : L →ᴸ L'\nh_fun : F.onFunction = G.onFunction\nh_rel : F.onRelation = G.onRelation\n⊢ F = G\n[PROOFSTEP]\ncases' F with Ff Fr\n[GOAL]\ncase mk\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nϕ : L →ᴸ L'\nL'' : Language\nG : L →ᴸ L'\nFf : ⦃n : ℕ⦄ → Functions L n → Functions L' n\nFr : ⦃n : ℕ⦄ → Relations L n → Relations L' n\nh_fun : { onFunction := Ff, onRelation := Fr }.onFunction = G.onFunction\nh_rel : { onFunction := Ff, onRelation := Fr }.onRelation = G.onRelation\n⊢ { onFunction := Ff, onRelation := Fr } = G\n[PROOFSTEP]\ncases' G with Gf Gr\n[GOAL]\ncase mk.mk\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nϕ : L →ᴸ L'\nL'' : Language\nFf : ⦃n : ℕ⦄ → Functions L n → Functions L' n\nFr : ⦃n : ℕ⦄ → Relations L n → Relations L' n\nGf : ⦃n : ℕ⦄ → Functions L n → Functions L' n\nGr : ⦃n : ℕ⦄ → Relations L n → Relations L' n\nh_fun : { onFunction := Ff, onRelation := Fr }.onFunction = { onFunction := Gf, onRelation := Gr }.onFunction\nh_rel : { onFunction := Ff, onRelation := Fr }.onRelation = { onFunction := Gf, onRelation := Gr }.onRelation\n⊢ { onFunction := Ff, onRelation := Fr } = { onFunction := Gf, onRelation := Gr }\n[PROOFSTEP]\nsimp only [mk.injEq]\n[GOAL]\ncase mk.mk\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nϕ : L →ᴸ L'\nL'' : Language\nFf : ⦃n : ℕ⦄ → Functions L n → Functions L' n\nFr : ⦃n : ℕ⦄ → Relations L n → Relations L' n\nGf : ⦃n : ℕ⦄ → Functions L n → Functions L' n\nGr : ⦃n : ℕ⦄ → Relations L n → Relations L' n\nh_fun : { onFunction := Ff, onRelation := Fr }.onFunction = { onFunction := Gf, onRelation := Gr }.onFunction\nh_rel : { onFunction := Ff, onRelation := Fr }.onRelation = { onFunction := Gf, onRelation := Gr }.onRelation\n⊢ Ff = Gf ∧ Fr = Gr\n[PROOFSTEP]\nexact And.intro h_fun h_rel\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nϕ : L →ᴸ L'\nL'' : Language\nF : L →ᴸ L'\n⊢ LHom.id L' ∘ᴸ F = F\n[PROOFSTEP]\ncases F\n[GOAL]\ncase mk\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nϕ : L →ᴸ L'\nL'' : Language\nonFunction✝ : ⦃n : ℕ⦄ → Functions L n → Functions L' n\nonRelation✝ : ⦃n : ℕ⦄ → Relations L n → Relations L' n\n⊢ LHom.id L' ∘ᴸ { onFunction := onFunction✝, onRelation := onRelation✝ } =\n    { onFunction := onFunction✝, onRelation := onRelation✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nϕ : L →ᴸ L'\nL'' : Language\nF : L →ᴸ L'\n⊢ F ∘ᴸ LHom.id L = F\n[PROOFSTEP]\ncases F\n[GOAL]\ncase mk\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nϕ : L →ᴸ L'\nL'' : Language\nonFunction✝ : ⦃n : ℕ⦄ → Functions L n → Functions L' n\nonRelation✝ : ⦃n : ℕ⦄ → Relations L n → Relations L' n\n⊢ { onFunction := onFunction✝, onRelation := onRelation✝ } ∘ᴸ LHom.id L =\n    { onFunction := onFunction✝, onRelation := onRelation✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁵ : Structure L M✝\nϕ : L →ᴸ L'\nL''✝ : Language\nL'' : Language\nψ : L'' →ᴸ L'\nM : Type u_1\ninst✝⁴ : Structure L M\ninst✝³ : Structure L' M\ninst✝² : Structure L'' M\ninst✝¹ : IsExpansionOn ϕ M\ninst✝ : IsExpansionOn ψ M\nn✝ : ℕ\nf : Functions (Language.sum L L'') n✝\nx✝ : Fin n✝ → M\n⊢ ∀ (val : Functions L n✝), funMap (onFunction (LHom.sumElim ϕ ψ) (Sum.inl val)) x✝ = funMap (Sum.inl val) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁵ : Structure L M✝\nϕ : L →ᴸ L'\nL''✝ : Language\nL'' : Language\nψ : L'' →ᴸ L'\nM : Type u_1\ninst✝⁴ : Structure L M\ninst✝³ : Structure L' M\ninst✝² : Structure L'' M\ninst✝¹ : IsExpansionOn ϕ M\ninst✝ : IsExpansionOn ψ M\nn✝ : ℕ\nf : Functions (Language.sum L L'') n✝\nx✝ : Fin n✝ → M\n⊢ ∀ (val : Functions L'' n✝), funMap (onFunction (LHom.sumElim ϕ ψ) (Sum.inr val)) x✝ = funMap (Sum.inr val) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁵ : Structure L M✝\nϕ : L →ᴸ L'\nL''✝ : Language\nL'' : Language\nψ : L'' →ᴸ L'\nM : Type u_1\ninst✝⁴ : Structure L M\ninst✝³ : Structure L' M\ninst✝² : Structure L'' M\ninst✝¹ : IsExpansionOn ϕ M\ninst✝ : IsExpansionOn ψ M\nn✝ : ℕ\nR : Relations (Language.sum L L'') n✝\nx✝ : Fin n✝ → M\n⊢ ∀ (val : Relations L n✝), RelMap (onRelation (LHom.sumElim ϕ ψ) (Sum.inl val)) x✝ = RelMap (Sum.inl val) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁵ : Structure L M✝\nϕ : L →ᴸ L'\nL''✝ : Language\nL'' : Language\nψ : L'' →ᴸ L'\nM : Type u_1\ninst✝⁴ : Structure L M\ninst✝³ : Structure L' M\ninst✝² : Structure L'' M\ninst✝¹ : IsExpansionOn ϕ M\ninst✝ : IsExpansionOn ψ M\nn✝ : ℕ\nR : Relations (Language.sum L L'') n✝\nx✝ : Fin n✝ → M\n⊢ ∀ (val : Relations L'' n✝), RelMap (onRelation (LHom.sumElim ϕ ψ) (Sum.inr val)) x✝ = RelMap (Sum.inr val) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁶ : Structure L M✝\nϕ : L →ᴸ L'\nL'' : Language\nL₁ : Language\nL₂ : Language\nψ : L₁ →ᴸ L₂\nM : Type u_1\ninst✝⁵ : Structure L M\ninst✝⁴ : Structure L' M\ninst✝³ : Structure L₁ M\ninst✝² : Structure L₂ M\ninst✝¹ : IsExpansionOn ϕ M\ninst✝ : IsExpansionOn ψ M\nn✝ : ℕ\nf : Functions (Language.sum L L₁) n✝\nx✝ : Fin n✝ → M\n⊢ ∀ (val : Functions L n✝), funMap (onFunction (sumMap ϕ ψ) (Sum.inl val)) x✝ = funMap (Sum.inl val) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁶ : Structure L M✝\nϕ : L →ᴸ L'\nL'' : Language\nL₁ : Language\nL₂ : Language\nψ : L₁ →ᴸ L₂\nM : Type u_1\ninst✝⁵ : Structure L M\ninst✝⁴ : Structure L' M\ninst✝³ : Structure L₁ M\ninst✝² : Structure L₂ M\ninst✝¹ : IsExpansionOn ϕ M\ninst✝ : IsExpansionOn ψ M\nn✝ : ℕ\nf : Functions (Language.sum L L₁) n✝\nx✝ : Fin n✝ → M\n⊢ ∀ (val : Functions L₁ n✝), funMap (onFunction (sumMap ϕ ψ) (Sum.inr val)) x✝ = funMap (Sum.inr val) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁶ : Structure L M✝\nϕ : L →ᴸ L'\nL'' : Language\nL₁ : Language\nL₂ : Language\nψ : L₁ →ᴸ L₂\nM : Type u_1\ninst✝⁵ : Structure L M\ninst✝⁴ : Structure L' M\ninst✝³ : Structure L₁ M\ninst✝² : Structure L₂ M\ninst✝¹ : IsExpansionOn ϕ M\ninst✝ : IsExpansionOn ψ M\nn✝ : ℕ\nR : Relations (Language.sum L L₁) n✝\nx✝ : Fin n✝ → M\n⊢ ∀ (val : Relations L n✝), RelMap (onRelation (sumMap ϕ ψ) (Sum.inl val)) x✝ = RelMap (Sum.inl val) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁶ : Structure L M✝\nϕ : L →ᴸ L'\nL'' : Language\nL₁ : Language\nL₂ : Language\nψ : L₁ →ᴸ L₂\nM : Type u_1\ninst✝⁵ : Structure L M\ninst✝⁴ : Structure L' M\ninst✝³ : Structure L₁ M\ninst✝² : Structure L₂ M\ninst✝¹ : IsExpansionOn ϕ M\ninst✝ : IsExpansionOn ψ M\nn✝ : ℕ\nR : Relations (Language.sum L L₁) n✝\nx✝ : Fin n✝ → M\n⊢ ∀ (val : Relations L₁ n✝), RelMap (onRelation (sumMap ϕ ψ) (Sum.inr val)) x✝ = RelMap (Sum.inr val) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁴ : Structure L M✝\nϕ✝ : L →ᴸ L'\nL'' : Language\nϕ : L →ᴸ L'\ninst✝³ : (n : ℕ) → (f : Functions L' n) → Decidable (f ∈ Set.range fun f => LHom.onFunction ϕ f)\ninst✝² : (n : ℕ) → (r : Relations L' n) → Decidable (r ∈ Set.range fun r => LHom.onRelation ϕ r)\nh : LHom.Injective ϕ\nM : Type u_1\ninst✝¹ : Inhabited M\ninst✝ : Structure L M\n⊢ IsExpansionOn ϕ M\n[PROOFSTEP]\nletI := ϕ.defaultExpansion M\n[GOAL]\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁴ : Structure L M✝\nϕ✝ : L →ᴸ L'\nL'' : Language\nϕ : L →ᴸ L'\ninst✝³ : (n : ℕ) → (f : Functions L' n) → Decidable (f ∈ Set.range fun f => LHom.onFunction ϕ f)\ninst✝² : (n : ℕ) → (r : Relations L' n) → Decidable (r ∈ Set.range fun r => LHom.onRelation ϕ r)\nh : LHom.Injective ϕ\nM : Type u_1\ninst✝¹ : Inhabited M\ninst✝ : Structure L M\nthis : Structure L' M := defaultExpansion ϕ M\n⊢ IsExpansionOn ϕ M\n[PROOFSTEP]\nrefine' ⟨fun {n} f xs => _, fun {n} r xs => _⟩\n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁴ : Structure L M✝\nϕ✝ : L →ᴸ L'\nL'' : Language\nϕ : L →ᴸ L'\ninst✝³ : (n : ℕ) → (f : Functions L' n) → Decidable (f ∈ Set.range fun f => LHom.onFunction ϕ f)\ninst✝² : (n : ℕ) → (r : Relations L' n) → Decidable (r ∈ Set.range fun r => LHom.onRelation ϕ r)\nh : LHom.Injective ϕ\nM : Type u_1\ninst✝¹ : Inhabited M\ninst✝ : Structure L M\nthis : Structure L' M := defaultExpansion ϕ M\nn : ℕ\nf : Functions L n\nxs : Fin n → M\n⊢ funMap (LHom.onFunction ϕ f) xs = funMap f xs\n[PROOFSTEP]\nhave hf : ϕ.onFunction f ∈ Set.range fun f : L.Functions n => ϕ.onFunction f := ⟨f, rfl⟩\n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁴ : Structure L M✝\nϕ✝ : L →ᴸ L'\nL'' : Language\nϕ : L →ᴸ L'\ninst✝³ : (n : ℕ) → (f : Functions L' n) → Decidable (f ∈ Set.range fun f => LHom.onFunction ϕ f)\ninst✝² : (n : ℕ) → (r : Relations L' n) → Decidable (r ∈ Set.range fun r => LHom.onRelation ϕ r)\nh : LHom.Injective ϕ\nM : Type u_1\ninst✝¹ : Inhabited M\ninst✝ : Structure L M\nthis : Structure L' M := defaultExpansion ϕ M\nn : ℕ\nf : Functions L n\nxs : Fin n → M\nhf : LHom.onFunction ϕ f ∈ Set.range fun f => LHom.onFunction ϕ f\n⊢ funMap (LHom.onFunction ϕ f) xs = funMap f xs\n[PROOFSTEP]\nrefine' (dif_pos hf).trans _\n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁴ : Structure L M✝\nϕ✝ : L →ᴸ L'\nL'' : Language\nϕ : L →ᴸ L'\ninst✝³ : (n : ℕ) → (f : Functions L' n) → Decidable (f ∈ Set.range fun f => LHom.onFunction ϕ f)\ninst✝² : (n : ℕ) → (r : Relations L' n) → Decidable (r ∈ Set.range fun r => LHom.onRelation ϕ r)\nh : LHom.Injective ϕ\nM : Type u_1\ninst✝¹ : Inhabited M\ninst✝ : Structure L M\nthis : Structure L' M := defaultExpansion ϕ M\nn : ℕ\nf : Functions L n\nxs : Fin n → M\nhf : LHom.onFunction ϕ f ∈ Set.range fun f => LHom.onFunction ϕ f\n⊢ funMap (Exists.choose hf) xs = funMap f xs\n[PROOFSTEP]\nrw [h.onFunction hf.choose_spec]\n[GOAL]\ncase refine'_2\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁴ : Structure L M✝\nϕ✝ : L →ᴸ L'\nL'' : Language\nϕ : L →ᴸ L'\ninst✝³ : (n : ℕ) → (f : Functions L' n) → Decidable (f ∈ Set.range fun f => LHom.onFunction ϕ f)\ninst✝² : (n : ℕ) → (r : Relations L' n) → Decidable (r ∈ Set.range fun r => LHom.onRelation ϕ r)\nh : LHom.Injective ϕ\nM : Type u_1\ninst✝¹ : Inhabited M\ninst✝ : Structure L M\nthis : Structure L' M := defaultExpansion ϕ M\nn : ℕ\nr : Relations L n\nxs : Fin n → M\n⊢ RelMap (LHom.onRelation ϕ r) xs = RelMap r xs\n[PROOFSTEP]\nhave hr : ϕ.onRelation r ∈ Set.range fun r : L.Relations n => ϕ.onRelation r := ⟨r, rfl⟩\n[GOAL]\ncase refine'_2\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁴ : Structure L M✝\nϕ✝ : L →ᴸ L'\nL'' : Language\nϕ : L →ᴸ L'\ninst✝³ : (n : ℕ) → (f : Functions L' n) → Decidable (f ∈ Set.range fun f => LHom.onFunction ϕ f)\ninst✝² : (n : ℕ) → (r : Relations L' n) → Decidable (r ∈ Set.range fun r => LHom.onRelation ϕ r)\nh : LHom.Injective ϕ\nM : Type u_1\ninst✝¹ : Inhabited M\ninst✝ : Structure L M\nthis : Structure L' M := defaultExpansion ϕ M\nn : ℕ\nr : Relations L n\nxs : Fin n → M\nhr : LHom.onRelation ϕ r ∈ Set.range fun r => LHom.onRelation ϕ r\n⊢ RelMap (LHom.onRelation ϕ r) xs = RelMap r xs\n[PROOFSTEP]\nrefine' (dif_pos hr).trans _\n[GOAL]\ncase refine'_2\nL : Language\nL' : Language\nM✝ : Type w\ninst✝⁴ : Structure L M✝\nϕ✝ : L →ᴸ L'\nL'' : Language\nϕ : L →ᴸ L'\ninst✝³ : (n : ℕ) → (f : Functions L' n) → Decidable (f ∈ Set.range fun f => LHom.onFunction ϕ f)\ninst✝² : (n : ℕ) → (r : Relations L' n) → Decidable (r ∈ Set.range fun r => LHom.onRelation ϕ r)\nh : LHom.Injective ϕ\nM : Type u_1\ninst✝¹ : Inhabited M\ninst✝ : Structure L M\nthis : Structure L' M := defaultExpansion ϕ M\nn : ℕ\nr : Relations L n\nxs : Fin n → M\nhr : LHom.onRelation ϕ r ∈ Set.range fun r => LHom.onRelation ϕ r\n⊢ RelMap (Exists.choose hr) xs = RelMap r xs\n[PROOFSTEP]\nrw [h.onRelation hr.choose_spec]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nL'' : Language\ne'✝ : L' ≃ᴸ L''\ne✝ e : L ≃ᴸ L'\ne' : L' ≃ᴸ L''\n⊢ LHom.comp (LHom.comp e.invLHom e'.invLHom) (LHom.comp e'.toLHom e.toLHom) = LHom.id L\n[PROOFSTEP]\nrw [LHom.comp_assoc, ← LHom.comp_assoc e'.invLHom, e'.left_inv, LHom.id_comp, e.left_inv]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nL'' : Language\ne'✝ : L' ≃ᴸ L''\ne✝ e : L ≃ᴸ L'\ne' : L' ≃ᴸ L''\n⊢ LHom.comp (LHom.comp e'.toLHom e.toLHom) (LHom.comp e.invLHom e'.invLHom) = LHom.id L''\n[PROOFSTEP]\nrw [LHom.comp_assoc, ← LHom.comp_assoc e.toLHom, e.right_inv, LHom.id_comp, e'.right_inv]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nα : Type u'\n⊢ card (constantsOn α) = #α\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nα : Type u'\nβ : Type v'\nf : α → β\nfα : α → M\nfβ : β → M\nh : fβ ∘ f = fα\n⊢ LHom.IsExpansionOn (LHom.constantsOnMap f) M\n[PROOFSTEP]\nletI := constantsOn.structure fα\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nα : Type u'\nβ : Type v'\nf : α → β\nfα : α → M\nfβ : β → M\nh : fβ ∘ f = fα\nthis : Structure (constantsOn α) M := constantsOn.structure fα\n⊢ LHom.IsExpansionOn (LHom.constantsOnMap f) M\n[PROOFSTEP]\nletI := constantsOn.structure fβ\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nα : Type u'\nβ : Type v'\nf : α → β\nfα : α → M\nfβ : β → M\nh : fβ ∘ f = fα\nthis✝ : Structure (constantsOn α) M := constantsOn.structure fα\nthis : Structure (constantsOn β) M := constantsOn.structure fβ\n⊢ LHom.IsExpansionOn (LHom.constantsOnMap f) M\n[PROOFSTEP]\nexact ⟨fun {n} => Nat.casesOn n (fun F _x => (congr_fun h F : _)) fun n F => isEmptyElim F, fun R => isEmptyElim R⟩\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nα : Type w'\n⊢ card (L[[α]]) = lift (card L) + lift #α\n[PROOFSTEP]\nrw [withConstants, card_sum, card_constantsOn]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nα : Type w'\nie : IsEmpty α\n⊢ LHom.comp (LHom.sumElim (LHom.id L) (LHom.ofIsEmpty (constantsOn α) L)) (lhomWithConstants L α) = LHom.id L\n[PROOFSTEP]\nrw [lhomWithConstants, LHom.sumElim_comp_inl]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nα : Type w'\nie : IsEmpty α\n⊢ LHom.comp (lhomWithConstants L α) (LHom.sumElim (LHom.id L) (LHom.ofIsEmpty (constantsOn α) L)) = LHom.id (L[[α]])\n[PROOFSTEP]\nsimp only [LHom.comp_sumElim, lhomWithConstants, LHom.comp_id]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nα : Type w'\nie : IsEmpty α\n⊢ LHom.sumElim LHom.sumInl (LHom.comp LHom.sumInl (LHom.ofIsEmpty (constantsOn α) L)) = LHom.id (L[[α]])\n[PROOFSTEP]\nexact _root_.trans (congr rfl (Subsingleton.elim _ _)) LHom.sumElim_inl_inr\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nα : Type w'\nβ : Type u_1\nf : α → β\n⊢ comp (lhomWithConstantsMap L f) LHom.sumInl = lhomWithConstants L β\n[PROOFSTEP]\next\n[GOAL]\ncase h_fun.h.h\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nα : Type w'\nβ : Type u_1\nf : α → β\nx✝¹ : ℕ\nx✝ : Functions L x✝¹\n⊢ onFunction (comp (lhomWithConstantsMap L f) LHom.sumInl) x✝ = onFunction (lhomWithConstants L β) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_rel.h.h\nL : Language\nL' : Language\nM : Type w\ninst✝ : Structure L M\nα : Type w'\nβ : Type u_1\nf : α → β\nx✝¹ : ℕ\nx✝ : Relations L x✝¹\n⊢ onRelation (comp (lhomWithConstantsMap L f) LHom.sumInl) x✝ = onRelation (lhomWithConstants L β) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝¹ : Structure L M\nα : Type u_1\ninst✝ : Structure (constantsOn α) M\na : α\nx : Fin 0 → M\n⊢ funMap (Sum.inr a) x = ↑(Language.con L a)\n[PROOFSTEP]\nrw [Unique.eq_default x]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\ninst✝¹ : Structure L M\nα : Type u_1\ninst✝ : Structure (constantsOn α) M\na : α\nx : Fin 0 → M\n⊢ funMap (Sum.inr a) default = ↑(Language.con L a)\n[PROOFSTEP]\nexact (LHom.sumInr : constantsOn α →ᴸ L.sum _).map_onFunction _ _\n", "meta": {"mathlib_filename": "Mathlib.ModelTheory.LanguageMap", "llama_tokens": 7482, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6723316860482763, "lm_q2_score": 0.5813030906443133, "lm_q1q2_score": 0.39082848703796513}}
{"text": "[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹⁰ : Monoid A\ninst✝⁹ : Monoid B\ninst✝⁸ : Monoid C\ninst✝⁷ : Monoid D\ninst✝⁶ : CommGroup E\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace C\ninst✝² : TopologicalSpace D\ninst✝¹ : TopologicalSpace E\ninst✝ : TopologicalGroup E\nf g : ContinuousMonoidHom A B\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\nobtain ⟨⟨⟨_, _⟩, _⟩, _⟩ := f\n[GOAL]\ncase mk.mk.mk\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹⁰ : Monoid A\ninst✝⁹ : Monoid B\ninst✝⁸ : Monoid C\ninst✝⁷ : Monoid D\ninst✝⁶ : CommGroup E\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace C\ninst✝² : TopologicalSpace D\ninst✝¹ : TopologicalSpace E\ninst✝ : TopologicalGroup E\ng : ContinuousMonoidHom A B\ntoFun✝ : A → B\nmap_one'✝ : toFun✝ 1 = 1\nmap_mul'✝ :\n  ∀ (x y : A),\n    OneHom.toFun { toFun := toFun✝, map_one' := map_one'✝ } (x * y) =\n      OneHom.toFun { toFun := toFun✝, map_one' := map_one'✝ } x *\n        OneHom.toFun { toFun := toFun✝, map_one' := map_one'✝ } y\ncontinuous_toFun✝ :\n  Continuous (↑{ toOneHom := { toFun := toFun✝, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }).toFun\nh :\n  (fun f => f.toFun)\n      { toMonoidHom := { toOneHom := { toFun := toFun✝, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n        continuous_toFun := continuous_toFun✝ } =\n    (fun f => f.toFun) g\n⊢ { toMonoidHom := { toOneHom := { toFun := toFun✝, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n      continuous_toFun := continuous_toFun✝ } =\n    g\n[PROOFSTEP]\nobtain ⟨⟨⟨_, _⟩, _⟩, _⟩ := g\n[GOAL]\ncase mk.mk.mk.mk.mk.mk\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹⁰ : Monoid A\ninst✝⁹ : Monoid B\ninst✝⁸ : Monoid C\ninst✝⁷ : Monoid D\ninst✝⁶ : CommGroup E\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace C\ninst✝² : TopologicalSpace D\ninst✝¹ : TopologicalSpace E\ninst✝ : TopologicalGroup E\ntoFun✝¹ : A → B\nmap_one'✝¹ : toFun✝¹ 1 = 1\nmap_mul'✝¹ :\n  ∀ (x y : A),\n    OneHom.toFun { toFun := toFun✝¹, map_one' := map_one'✝¹ } (x * y) =\n      OneHom.toFun { toFun := toFun✝¹, map_one' := map_one'✝¹ } x *\n        OneHom.toFun { toFun := toFun✝¹, map_one' := map_one'✝¹ } y\ncontinuous_toFun✝¹ :\n  Continuous (↑{ toOneHom := { toFun := toFun✝¹, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }).toFun\ntoFun✝ : A → B\nmap_one'✝ : toFun✝ 1 = 1\nmap_mul'✝ :\n  ∀ (x y : A),\n    OneHom.toFun { toFun := toFun✝, map_one' := map_one'✝ } (x * y) =\n      OneHom.toFun { toFun := toFun✝, map_one' := map_one'✝ } x *\n        OneHom.toFun { toFun := toFun✝, map_one' := map_one'✝ } y\ncontinuous_toFun✝ :\n  Continuous (↑{ toOneHom := { toFun := toFun✝, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }).toFun\nh :\n  (fun f => f.toFun)\n      { toMonoidHom := { toOneHom := { toFun := toFun✝¹, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ },\n        continuous_toFun := continuous_toFun✝¹ } =\n    (fun f => f.toFun)\n      { toMonoidHom := { toOneHom := { toFun := toFun✝, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n        continuous_toFun := continuous_toFun✝ }\n⊢ { toMonoidHom := { toOneHom := { toFun := toFun✝¹, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ },\n      continuous_toFun := continuous_toFun✝¹ } =\n    { toMonoidHom := { toOneHom := { toFun := toFun✝, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n      continuous_toFun := continuous_toFun✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹⁰ : Monoid A\ninst✝⁹ : Monoid B\ninst✝⁸ : Monoid C\ninst✝⁷ : Monoid D\ninst✝⁶ : CommGroup E\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace C\ninst✝² : TopologicalSpace D\ninst✝¹ : TopologicalSpace E\ninst✝ : TopologicalGroup E\nf g : ContinuousMonoidHom A B\nh : toContinuousMap f = toContinuousMap g\n⊢ ∀ (x : A), ↑f x = ↑g x\n[PROOFSTEP]\nconvert FunLike.ext_iff.1 h\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\n⊢ IsOpen (Set.range toContinuousMap)ᶜ\n[PROOFSTEP]\nsuffices\n  Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =\n    ({f | f '' {1} ⊆ {1}ᶜ} ∪\n          ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ : Disjoint (U * V) W),\n            {f | f '' { x } ⊆ U} ∩ {f | f '' { y } ⊆ V} ∩ {f | f '' {x * y} ⊆ W} :\n        Set C(A, B))ᶜ\n  by\n  rw [this, compl_compl]\n  refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _\n  repeat' apply isOpen_iUnion; intro\n  repeat' apply IsOpen.inter\n  all_goals apply ContinuousMap.isOpen_gen isCompact_singleton; assumption\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\n⊢ IsOpen (Set.range toContinuousMap)ᶜ\n[PROOFSTEP]\nrw [this, compl_compl]\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\n⊢ IsOpen\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n      ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n        Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})\n[PROOFSTEP]\nrefine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\n⊢ IsOpen\n    (⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n      Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})\n[PROOFSTEP]\nrepeat' apply isOpen_iUnion; intro\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\n⊢ IsOpen\n    (⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n      Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})\n[PROOFSTEP]\napply isOpen_iUnion\n[GOAL]\ncase h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\n⊢ ∀ (i : A),\n    IsOpen\n      (⋃ (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n        Disjoint (U * V) W), {f | ↑f '' {i} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {i * y} ⊆ W})\n[PROOFSTEP]\nintro\n[GOAL]\ncase h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝ : A\n⊢ IsOpen\n    (⋃ (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n      Disjoint (U * V) W), {f | ↑f '' {i✝} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {i✝ * y} ⊆ W})\n[PROOFSTEP]\napply isOpen_iUnion\n[GOAL]\ncase h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝ : A\n⊢ ∀ (i : A),\n    IsOpen\n      (⋃ (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ : Disjoint (U * V) W),\n        {f | ↑f '' {i✝} ⊆ U} ∩ {f | ↑f '' {i} ⊆ V} ∩ {f | ↑f '' {i✝ * i} ⊆ W})\n[PROOFSTEP]\nintro\n[GOAL]\ncase h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝¹ i✝ : A\n⊢ IsOpen\n    (⋃ (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ : Disjoint (U * V) W),\n      {f | ↑f '' {i✝¹} ⊆ U} ∩ {f | ↑f '' {i✝} ⊆ V} ∩ {f | ↑f '' {i✝¹ * i✝} ⊆ W})\n[PROOFSTEP]\napply isOpen_iUnion\n[GOAL]\ncase h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝¹ i✝ : A\n⊢ ∀ (i : Set B),\n    IsOpen\n      (⋃ (V : Set B) (W : Set B) (_ : IsOpen i) (_ : IsOpen V) (_ : IsOpen W) (_ : Disjoint (i * V) W),\n        {f | ↑f '' {i✝¹} ⊆ i} ∩ {f | ↑f '' {i✝} ⊆ V} ∩ {f | ↑f '' {i✝¹ * i✝} ⊆ W})\n[PROOFSTEP]\nintro\n[GOAL]\ncase h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝² i✝¹ : A\ni✝ : Set B\n⊢ IsOpen\n    (⋃ (V : Set B) (W : Set B) (_ : IsOpen i✝) (_ : IsOpen V) (_ : IsOpen W) (_ : Disjoint (i✝ * V) W),\n      {f | ↑f '' {i✝²} ⊆ i✝} ∩ {f | ↑f '' {i✝¹} ⊆ V} ∩ {f | ↑f '' {i✝² * i✝¹} ⊆ W})\n[PROOFSTEP]\napply isOpen_iUnion\n[GOAL]\ncase h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝² i✝¹ : A\ni✝ : Set B\n⊢ ∀ (i : Set B),\n    IsOpen\n      (⋃ (W : Set B) (_ : IsOpen i✝) (_ : IsOpen i) (_ : IsOpen W) (_ : Disjoint (i✝ * i) W),\n        {f | ↑f '' {i✝²} ⊆ i✝} ∩ {f | ↑f '' {i✝¹} ⊆ i} ∩ {f | ↑f '' {i✝² * i✝¹} ⊆ W})\n[PROOFSTEP]\nintro\n[GOAL]\ncase h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝³ i✝² : A\ni✝¹ i✝ : Set B\n⊢ IsOpen\n    (⋃ (W : Set B) (_ : IsOpen i✝¹) (_ : IsOpen i✝) (_ : IsOpen W) (_ : Disjoint (i✝¹ * i✝) W),\n      {f | ↑f '' {i✝³} ⊆ i✝¹} ∩ {f | ↑f '' {i✝²} ⊆ i✝} ∩ {f | ↑f '' {i✝³ * i✝²} ⊆ W})\n[PROOFSTEP]\napply isOpen_iUnion\n[GOAL]\ncase h.h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝³ i✝² : A\ni✝¹ i✝ : Set B\n⊢ ∀ (i : Set B),\n    IsOpen\n      (⋃ (_ : IsOpen i✝¹) (_ : IsOpen i✝) (_ : IsOpen i) (_ : Disjoint (i✝¹ * i✝) i),\n        {f | ↑f '' {i✝³} ⊆ i✝¹} ∩ {f | ↑f '' {i✝²} ⊆ i✝} ∩ {f | ↑f '' {i✝³ * i✝²} ⊆ i})\n[PROOFSTEP]\nintro\n[GOAL]\ncase h.h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁴ i✝³ : A\ni✝² i✝¹ i✝ : Set B\n⊢ IsOpen\n    (⋃ (_ : IsOpen i✝²) (_ : IsOpen i✝¹) (_ : IsOpen i✝) (_ : Disjoint (i✝² * i✝¹) i✝),\n      {f | ↑f '' {i✝⁴} ⊆ i✝²} ∩ {f | ↑f '' {i✝³} ⊆ i✝¹} ∩ {f | ↑f '' {i✝⁴ * i✝³} ⊆ i✝})\n[PROOFSTEP]\napply isOpen_iUnion\n[GOAL]\ncase h.h.h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁴ i✝³ : A\ni✝² i✝¹ i✝ : Set B\n⊢ IsOpen i✝² →\n    IsOpen\n      (⋃ (_ : IsOpen i✝¹) (_ : IsOpen i✝) (_ : Disjoint (i✝² * i✝¹) i✝),\n        {f | ↑f '' {i✝⁴} ⊆ i✝²} ∩ {f | ↑f '' {i✝³} ⊆ i✝¹} ∩ {f | ↑f '' {i✝⁴ * i✝³} ⊆ i✝})\n[PROOFSTEP]\nintro\n[GOAL]\ncase h.h.h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁵ i✝⁴ : A\ni✝³ i✝² i✝¹ : Set B\ni✝ : IsOpen i✝³\n⊢ IsOpen\n    (⋃ (_ : IsOpen i✝²) (_ : IsOpen i✝¹) (_ : Disjoint (i✝³ * i✝²) i✝¹),\n      {f | ↑f '' {i✝⁵} ⊆ i✝³} ∩ {f | ↑f '' {i✝⁴} ⊆ i✝²} ∩ {f | ↑f '' {i✝⁵ * i✝⁴} ⊆ i✝¹})\n[PROOFSTEP]\napply isOpen_iUnion\n[GOAL]\ncase h.h.h.h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁵ i✝⁴ : A\ni✝³ i✝² i✝¹ : Set B\ni✝ : IsOpen i✝³\n⊢ IsOpen i✝² →\n    IsOpen\n      (⋃ (_ : IsOpen i✝¹) (_ : Disjoint (i✝³ * i✝²) i✝¹),\n        {f | ↑f '' {i✝⁵} ⊆ i✝³} ∩ {f | ↑f '' {i✝⁴} ⊆ i✝²} ∩ {f | ↑f '' {i✝⁵ * i✝⁴} ⊆ i✝¹})\n[PROOFSTEP]\nintro\n[GOAL]\ncase h.h.h.h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁶ i✝⁵ : A\ni✝⁴ i✝³ i✝² : Set B\ni✝¹ : IsOpen i✝⁴\ni✝ : IsOpen i✝³\n⊢ IsOpen\n    (⋃ (_ : IsOpen i✝²) (_ : Disjoint (i✝⁴ * i✝³) i✝²),\n      {f | ↑f '' {i✝⁶} ⊆ i✝⁴} ∩ {f | ↑f '' {i✝⁵} ⊆ i✝³} ∩ {f | ↑f '' {i✝⁶ * i✝⁵} ⊆ i✝²})\n[PROOFSTEP]\napply isOpen_iUnion\n[GOAL]\ncase h.h.h.h.h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁶ i✝⁵ : A\ni✝⁴ i✝³ i✝² : Set B\ni✝¹ : IsOpen i✝⁴\ni✝ : IsOpen i✝³\n⊢ IsOpen i✝² →\n    IsOpen\n      (⋃ (_ : Disjoint (i✝⁴ * i✝³) i✝²),\n        {f | ↑f '' {i✝⁶} ⊆ i✝⁴} ∩ {f | ↑f '' {i✝⁵} ⊆ i✝³} ∩ {f | ↑f '' {i✝⁶ * i✝⁵} ⊆ i✝²})\n[PROOFSTEP]\nintro\n[GOAL]\ncase h.h.h.h.h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁷ i✝⁶ : A\ni✝⁵ i✝⁴ i✝³ : Set B\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : IsOpen i✝³\n⊢ IsOpen\n    (⋃ (_ : Disjoint (i✝⁵ * i✝⁴) i✝³),\n      {f | ↑f '' {i✝⁷} ⊆ i✝⁵} ∩ {f | ↑f '' {i✝⁶} ⊆ i✝⁴} ∩ {f | ↑f '' {i✝⁷ * i✝⁶} ⊆ i✝³})\n[PROOFSTEP]\napply isOpen_iUnion\n[GOAL]\ncase h.h.h.h.h.h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁷ i✝⁶ : A\ni✝⁵ i✝⁴ i✝³ : Set B\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : IsOpen i✝³\n⊢ Disjoint (i✝⁵ * i✝⁴) i✝³ → IsOpen ({f | ↑f '' {i✝⁷} ⊆ i✝⁵} ∩ {f | ↑f '' {i✝⁶} ⊆ i✝⁴} ∩ {f | ↑f '' {i✝⁷ * i✝⁶} ⊆ i✝³})\n[PROOFSTEP]\nintro\n[GOAL]\ncase h.h.h.h.h.h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen ({f | ↑f '' {i✝⁸} ⊆ i✝⁶} ∩ {f | ↑f '' {i✝⁷} ⊆ i✝⁵} ∩ {f | ↑f '' {i✝⁸ * i✝⁷} ⊆ i✝⁴})\n[PROOFSTEP]\napply isOpen_iUnion\n[GOAL]\ncase h.h.h.h.h.h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen ({f | ↑f '' {i✝⁸} ⊆ i✝⁶} ∩ {f | ↑f '' {i✝⁷} ⊆ i✝⁵} ∩ {f | ↑f '' {i✝⁸ * i✝⁷} ⊆ i✝⁴})\n[PROOFSTEP]\nrepeat' apply IsOpen.inter\n[GOAL]\ncase h.h.h.h.h.h.h.h.h\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen ({f | ↑f '' {i✝⁸} ⊆ i✝⁶} ∩ {f | ↑f '' {i✝⁷} ⊆ i✝⁵} ∩ {f | ↑f '' {i✝⁸ * i✝⁷} ⊆ i✝⁴})\n[PROOFSTEP]\napply IsOpen.inter\n[GOAL]\ncase h.h.h.h.h.h.h.h.h.h₁\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen ({f | ↑f '' {i✝⁸} ⊆ i✝⁶} ∩ {f | ↑f '' {i✝⁷} ⊆ i✝⁵})\n[PROOFSTEP]\napply IsOpen.inter\n[GOAL]\ncase h.h.h.h.h.h.h.h.h.h₁.h₁\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen {f | ↑f '' {i✝⁸} ⊆ i✝⁶}\n[PROOFSTEP]\napply IsOpen.inter\n[GOAL]\ncase h.h.h.h.h.h.h.h.h.h₁.h₂\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen {f | ↑f '' {i✝⁷} ⊆ i✝⁵}\n[PROOFSTEP]\napply IsOpen.inter\n[GOAL]\ncase h.h.h.h.h.h.h.h.h.h₂\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen {f | ↑f '' {i✝⁸ * i✝⁷} ⊆ i✝⁴}\n[PROOFSTEP]\napply IsOpen.inter\n[GOAL]\ncase h.h.h.h.h.h.h.h.h.h₁.h₁\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen {f | ↑f '' {i✝⁸} ⊆ i✝⁶}\ncase h.h.h.h.h.h.h.h.h.h₁.h₂\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen {f | ↑f '' {i✝⁷} ⊆ i✝⁵}\ncase h.h.h.h.h.h.h.h.h.h₂\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen {f | ↑f '' {i✝⁸ * i✝⁷} ⊆ i✝⁴}\n[PROOFSTEP]\nall_goals apply ContinuousMap.isOpen_gen isCompact_singleton; assumption\n[GOAL]\ncase h.h.h.h.h.h.h.h.h.h₁.h₁\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen {f | ↑f '' {i✝⁸} ⊆ i✝⁶}\n[PROOFSTEP]\napply ContinuousMap.isOpen_gen isCompact_singleton\n[GOAL]\ncase h.h.h.h.h.h.h.h.h.h₁.h₁\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen i✝⁶\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h.h.h.h.h.h.h.h.h.h₁.h₂\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen {f | ↑f '' {i✝⁷} ⊆ i✝⁵}\n[PROOFSTEP]\napply ContinuousMap.isOpen_gen isCompact_singleton\n[GOAL]\ncase h.h.h.h.h.h.h.h.h.h₁.h₂\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen i✝⁵\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h.h.h.h.h.h.h.h.h.h₂\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen {f | ↑f '' {i✝⁸ * i✝⁷} ⊆ i✝⁴}\n[PROOFSTEP]\napply ContinuousMap.isOpen_gen isCompact_singleton\n[GOAL]\ncase h.h.h.h.h.h.h.h.h.h₂\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nthis :\n  Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\ni✝⁸ i✝⁷ : A\ni✝⁶ i✝⁵ i✝⁴ : Set B\ni✝³ : IsOpen i✝⁶\ni✝² : IsOpen i✝⁵\ni✝¹ : IsOpen i✝⁴\ni✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴\n⊢ IsOpen i✝⁴\n[PROOFSTEP]\nassumption\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\n⊢ Set.range toContinuousMap =\n    ({f | ↑f '' {1} ⊆ {1}ᶜ} ∪\n        ⋃ (x : A) (y : A) (U : Set B) (V : Set B) (W : Set B) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :\n          Disjoint (U * V) W), {f | ↑f '' {x} ⊆ U} ∩ {f | ↑f '' {y} ⊆ V} ∩ {f | ↑f '' {x * y} ⊆ W})ᶜ\n[PROOFSTEP]\nsimp_rw [Set.compl_union, Set.compl_iUnion, Set.image_singleton, Set.singleton_subset_iff, Set.ext_iff,\n  Set.mem_inter_iff, Set.mem_iInter, Set.mem_compl_iff]\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\n⊢ ∀ (x : C(A, B)),\n    x ∈ Set.range toContinuousMap ↔\n      ¬x ∈ {f | ¬↑f 1 ∈ {1}} ∧\n        ∀ (i i_1 : A) (i_2 i_3 i_4 : Set B),\n          IsOpen i_2 →\n            IsOpen i_3 →\n              IsOpen i_4 →\n                Disjoint (i_2 * i_3) i_4 → ¬x ∈ {f | ↑f i ∈ i_2} ∩ {f | ↑f i_1 ∈ i_3} ∩ {f | ↑f (i * i_1) ∈ i_4}\n[PROOFSTEP]\nrefine' fun f => ⟨_, _⟩\n[GOAL]\ncase refine'_1\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : C(A, B)\n⊢ f ∈ Set.range toContinuousMap →\n    ¬f ∈ {f | ¬↑f 1 ∈ {1}} ∧\n      ∀ (i i_1 : A) (i_2 i_3 i_4 : Set B),\n        IsOpen i_2 →\n          IsOpen i_3 →\n            IsOpen i_4 →\n              Disjoint (i_2 * i_3) i_4 → ¬f ∈ {f | ↑f i ∈ i_2} ∩ {f | ↑f i_1 ∈ i_3} ∩ {f | ↑f (i * i_1) ∈ i_4}\n[PROOFSTEP]\nrintro ⟨f, rfl⟩\n[GOAL]\ncase refine'_1.intro\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : ContinuousMonoidHom A B\n⊢ ¬toContinuousMap f ∈ {f | ¬↑f 1 ∈ {1}} ∧\n    ∀ (i i_1 : A) (i_2 i_3 i_4 : Set B),\n      IsOpen i_2 →\n        IsOpen i_3 →\n          IsOpen i_4 →\n            Disjoint (i_2 * i_3) i_4 →\n              ¬toContinuousMap f ∈ {f | ↑f i ∈ i_2} ∩ {f | ↑f i_1 ∈ i_3} ∩ {f | ↑f (i * i_1) ∈ i_4}\n[PROOFSTEP]\nexact\n  ⟨fun h => h (map_one f), fun x y U V W _hU _hV _hW h ⟨⟨hfU, hfV⟩, hfW⟩ =>\n    h.le_bot ⟨Set.mul_mem_mul hfU hfV, (congr_arg (· ∈ W) (map_mul f x y)).mp hfW⟩⟩\n[GOAL]\ncase refine'_2\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : C(A, B)\n⊢ (¬f ∈ {f | ¬↑f 1 ∈ {1}} ∧\n      ∀ (i i_1 : A) (i_2 i_3 i_4 : Set B),\n        IsOpen i_2 →\n          IsOpen i_3 →\n            IsOpen i_4 →\n              Disjoint (i_2 * i_3) i_4 → ¬f ∈ {f | ↑f i ∈ i_2} ∩ {f | ↑f i_1 ∈ i_3} ∩ {f | ↑f (i * i_1) ∈ i_4}) →\n    f ∈ Set.range toContinuousMap\n[PROOFSTEP]\nrintro ⟨hf1, hf2⟩\n[GOAL]\ncase refine'_2.intro\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : C(A, B)\nhf1 : ¬f ∈ {f | ¬↑f 1 ∈ {1}}\nhf2 :\n  ∀ (i i_1 : A) (i_2 i_3 i_4 : Set B),\n    IsOpen i_2 →\n      IsOpen i_3 →\n        IsOpen i_4 → Disjoint (i_2 * i_3) i_4 → ¬f ∈ {f | ↑f i ∈ i_2} ∩ {f | ↑f i_1 ∈ i_3} ∩ {f | ↑f (i * i_1) ∈ i_4}\n⊢ f ∈ Set.range toContinuousMap\n[PROOFSTEP]\nsuffices ∀ x y, f (x * y) = f x * f y by\n  refine'\n    ⟨({ f with\n          map_one' := of_not_not hf1\n          map_mul' := this } :\n        ContinuousMonoidHom A B),\n      ContinuousMap.ext fun _ => rfl⟩\n[GOAL]\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : C(A, B)\nhf1 : ¬f ∈ {f | ¬↑f 1 ∈ {1}}\nhf2 :\n  ∀ (i i_1 : A) (i_2 i_3 i_4 : Set B),\n    IsOpen i_2 →\n      IsOpen i_3 →\n        IsOpen i_4 → Disjoint (i_2 * i_3) i_4 → ¬f ∈ {f | ↑f i ∈ i_2} ∩ {f | ↑f i_1 ∈ i_3} ∩ {f | ↑f (i * i_1) ∈ i_4}\nthis : ∀ (x y : A), ↑f (x * y) = ↑f x * ↑f y\n⊢ f ∈ Set.range toContinuousMap\n[PROOFSTEP]\nrefine'\n  ⟨({ f with\n        map_one' := of_not_not hf1\n        map_mul' := this } :\n      ContinuousMonoidHom A B),\n    ContinuousMap.ext fun _ => rfl⟩\n[GOAL]\ncase refine'_2.intro\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : C(A, B)\nhf1 : ¬f ∈ {f | ¬↑f 1 ∈ {1}}\nhf2 :\n  ∀ (i i_1 : A) (i_2 i_3 i_4 : Set B),\n    IsOpen i_2 →\n      IsOpen i_3 →\n        IsOpen i_4 → Disjoint (i_2 * i_3) i_4 → ¬f ∈ {f | ↑f i ∈ i_2} ∩ {f | ↑f i_1 ∈ i_3} ∩ {f | ↑f (i * i_1) ∈ i_4}\n⊢ ∀ (x y : A), ↑f (x * y) = ↑f x * ↑f y\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase refine'_2.intro\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : C(A, B)\nhf1 : ¬f ∈ {f | ¬↑f 1 ∈ {1}}\nhf2 :\n  ∀ (i i_1 : A) (i_2 i_3 i_4 : Set B),\n    IsOpen i_2 →\n      IsOpen i_3 →\n        IsOpen i_4 → Disjoint (i_2 * i_3) i_4 → ¬f ∈ {f | ↑f i ∈ i_2} ∩ {f | ↑f i_1 ∈ i_3} ∩ {f | ↑f (i * i_1) ∈ i_4}\nx y : A\n⊢ ↑f (x * y) = ↑f x * ↑f y\n[PROOFSTEP]\ncontrapose! hf2\n[GOAL]\ncase refine'_2.intro\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : C(A, B)\nhf1 : ¬f ∈ {f | ¬↑f 1 ∈ {1}}\nx y : A\nhf2 : ↑f (x * y) ≠ ↑f x * ↑f y\n⊢ ∃ i i_1 i_2 i_3 i_4,\n    IsOpen i_2 ∧\n      IsOpen i_3 ∧\n        IsOpen i_4 ∧ Disjoint (i_2 * i_3) i_4 ∧ f ∈ {f | ↑f i ∈ i_2} ∩ {f | ↑f i_1 ∈ i_3} ∩ {f | ↑f (i * i_1) ∈ i_4}\n[PROOFSTEP]\nobtain ⟨UV, W, hUV, hW, hfUV, hfW, h⟩ := t2_separation hf2.symm\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : C(A, B)\nhf1 : ¬f ∈ {f | ¬↑f 1 ∈ {1}}\nx y : A\nhf2 : ↑f (x * y) ≠ ↑f x * ↑f y\nUV W : Set B\nhUV : IsOpen UV\nhW : IsOpen W\nhfUV : ↑f x * ↑f y ∈ UV\nhfW : ↑f (x * y) ∈ W\nh : Disjoint UV W\n⊢ ∃ i i_1 i_2 i_3 i_4,\n    IsOpen i_2 ∧\n      IsOpen i_3 ∧\n        IsOpen i_4 ∧ Disjoint (i_2 * i_3) i_4 ∧ f ∈ {f | ↑f i ∈ i_2} ∩ {f | ↑f i_1 ∈ i_3} ∩ {f | ↑f (i * i_1) ∈ i_4}\n[PROOFSTEP]\nhave hB := @continuous_mul B _ _ _\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : C(A, B)\nhf1 : ¬f ∈ {f | ¬↑f 1 ∈ {1}}\nx y : A\nhf2 : ↑f (x * y) ≠ ↑f x * ↑f y\nUV W : Set B\nhUV : IsOpen UV\nhW : IsOpen W\nhfUV : ↑f x * ↑f y ∈ UV\nhfW : ↑f (x * y) ∈ W\nh : Disjoint UV W\nhB : Continuous fun p => p.fst * p.snd\n⊢ ∃ i i_1 i_2 i_3 i_4,\n    IsOpen i_2 ∧\n      IsOpen i_3 ∧\n        IsOpen i_4 ∧ Disjoint (i_2 * i_3) i_4 ∧ f ∈ {f | ↑f i ∈ i_2} ∩ {f | ↑f i_1 ∈ i_3} ∩ {f | ↑f (i * i_1) ∈ i_4}\n[PROOFSTEP]\nobtain ⟨U, V, hU, hV, hfU, hfV, h'⟩ := isOpen_prod_iff.mp (hUV.preimage hB) (f x) (f y) hfUV\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : C(A, B)\nhf1 : ¬f ∈ {f | ¬↑f 1 ∈ {1}}\nx y : A\nhf2 : ↑f (x * y) ≠ ↑f x * ↑f y\nUV W : Set B\nhUV : IsOpen UV\nhW : IsOpen W\nhfUV : ↑f x * ↑f y ∈ UV\nhfW : ↑f (x * y) ∈ W\nh : Disjoint UV W\nhB : Continuous fun p => p.fst * p.snd\nU V : Set B\nhU : IsOpen U\nhV : IsOpen V\nhfU : ↑f x ∈ U\nhfV : ↑f y ∈ V\nh' : U ×ˢ V ⊆ (fun p => p.fst * p.snd) ⁻¹' UV\n⊢ ∃ i i_1 i_2 i_3 i_4,\n    IsOpen i_2 ∧\n      IsOpen i_3 ∧\n        IsOpen i_4 ∧ Disjoint (i_2 * i_3) i_4 ∧ f ∈ {f | ↑f i ∈ i_2} ∩ {f | ↑f i_1 ∈ i_3} ∩ {f | ↑f (i * i_1) ∈ i_4}\n[PROOFSTEP]\nrefine' ⟨x, y, U, V, W, hU, hV, hW, h.mono_left _, ⟨hfU, hfV⟩, hfW⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : C(A, B)\nhf1 : ¬f ∈ {f | ¬↑f 1 ∈ {1}}\nx y : A\nhf2 : ↑f (x * y) ≠ ↑f x * ↑f y\nUV W : Set B\nhUV : IsOpen UV\nhW : IsOpen W\nhfUV : ↑f x * ↑f y ∈ UV\nhfW : ↑f (x * y) ∈ W\nh : Disjoint UV W\nhB : Continuous fun p => p.fst * p.snd\nU V : Set B\nhU : IsOpen U\nhV : IsOpen V\nhfU : ↑f x ∈ U\nhfV : ↑f y ∈ V\nh' : U ×ˢ V ⊆ (fun p => p.fst * p.snd) ⁻¹' UV\n⊢ U * V ≤ UV\n[PROOFSTEP]\nrintro _ ⟨x, y, hx : (x, y).1 ∈ U, hy : (x, y).2 ∈ V, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nF : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\nD : Type u_5\nE : Type u_6\ninst✝¹² : Monoid A\ninst✝¹¹ : Monoid B\ninst✝¹⁰ : Monoid C\ninst✝⁹ : Monoid D\ninst✝⁸ : CommGroup E\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace C\ninst✝⁴ : TopologicalSpace D\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalGroup E\ninst✝¹ : ContinuousMul B\ninst✝ : T2Space B\nf : C(A, B)\nhf1 : ¬f ∈ {f | ¬↑f 1 ∈ {1}}\nx✝ y✝ : A\nhf2 : ↑f (x✝ * y✝) ≠ ↑f x✝ * ↑f y✝\nUV W : Set B\nhUV : IsOpen UV\nhW : IsOpen W\nhfUV : ↑f x✝ * ↑f y✝ ∈ UV\nhfW : ↑f (x✝ * y✝) ∈ W\nh : Disjoint UV W\nhB : Continuous fun p => p.fst * p.snd\nU V : Set B\nhU : IsOpen U\nhV : IsOpen V\nhfU : ↑f x✝ ∈ U\nhfV : ↑f y✝ ∈ V\nh' : U ×ˢ V ⊆ (fun p => p.fst * p.snd) ⁻¹' UV\nx y : B\nhx : (x, y).fst ∈ U\nhy : (x, y).snd ∈ V\n⊢ (fun x x_1 => x * x_1) x y ∈ UV\n[PROOFSTEP]\nexact h' ⟨hx, hy⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.ContinuousMonoidHom", "llama_tokens": 28119, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7520125737597974, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.3906865664442858}}
{"text": "[GOAL]\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{?u.10521, u_3} B\ninst✝ : Category.{u_5, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\n⊢ (equivalence₁ hF).counitIso = equivalence₁CounitIso hF\n[PROOFSTEP]\next Y\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{?u.10521, u_3} B\ninst✝ : Category.{u_5, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nY : B'\n⊢ NatTrans.app (equivalence₁ hF).counitIso.hom Y = NatTrans.app (equivalence₁CounitIso hF).hom Y\n[PROOFSTEP]\ndsimp [equivalence₁]\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{?u.10521, u_3} B\ninst✝ : Category.{u_5, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nY : B'\n⊢ NatTrans.app (Functor.asEquivalence F).counitIso.hom Y = NatTrans.app (equivalence₁CounitIso hF).hom Y\n[PROOFSTEP]\nunfold Functor.asEquivalence\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{?u.10521, u_3} B\ninst✝ : Category.{u_5, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nY : B'\n⊢ NatTrans.app (Equivalence.mk' F (IsEquivalence.inverse F) IsEquivalence.unitIso IsEquivalence.counitIso).counitIso.hom\n      Y =\n    NatTrans.app (equivalence₁CounitIso hF).hom Y\n[PROOFSTEP]\ndsimp [equivalence₀, IsEquivalence.inverse, IsEquivalence.ofEquivalence]\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{?u.10521, u_3} B\ninst✝ : Category.{u_5, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nY : B'\n⊢ NatTrans.app IsEquivalence.counitIso.hom Y = NatTrans.app (equivalence₁CounitIso hF).hom Y\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{?u.21328, u_3} B\ninst✝ : Category.{u_6, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\n⊢ (equivalence₁ hF).unitIso = equivalence₁UnitIso hF\n[PROOFSTEP]\next X\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{?u.21328, u_3} B\ninst✝ : Category.{u_6, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nX : A\n⊢ NatTrans.app (equivalence₁ hF).unitIso.hom X = NatTrans.app (equivalence₁UnitIso hF).hom X\n[PROOFSTEP]\ndsimp [equivalence₁]\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{?u.21328, u_3} B\ninst✝ : Category.{u_6, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nX : A\n⊢ NatTrans.app (Functor.asEquivalence F).unitIso.hom X = NatTrans.app (equivalence₁UnitIso hF).hom X\n[PROOFSTEP]\nunfold Functor.asEquivalence\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{?u.21328, u_3} B\ninst✝ : Category.{u_6, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nX : A\n⊢ NatTrans.app (Equivalence.mk' F (IsEquivalence.inverse F) IsEquivalence.unitIso IsEquivalence.counitIso).unitIso.hom\n      X =\n    NatTrans.app (equivalence₁UnitIso hF).hom X\n[PROOFSTEP]\ndsimp [NatIso.hcomp, IsEquivalence.ofEquivalence]\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{?u.21328, u_3} B\ninst✝ : Category.{u_6, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nX : A\n⊢ NatTrans.app IsEquivalence.unitIso.hom X = NatTrans.app (equivalence₁UnitIso hF).hom X\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\n⊢ (equivalence₂ eB hF).counitIso = equivalence₂CounitIso eB hF\n[PROOFSTEP]\next Y'\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nY' : B\n⊢ NatTrans.app (equivalence₂ eB hF).counitIso.hom Y' = NatTrans.app (equivalence₂CounitIso eB hF).hom Y'\n[PROOFSTEP]\ndsimp [equivalence₂, Iso.refl]\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nY' : B\n⊢ eB.inverse.map (NatTrans.app (equivalence₁ hF).counitIso.hom (eB.functor.obj Y')) ≫ NatTrans.app eB.unitIso.inv Y' =\n    NatTrans.app (equivalence₂CounitIso eB hF).hom Y'\n[PROOFSTEP]\nsimp only [equivalence₁CounitIso_eq, equivalence₂CounitIso_hom_app, equivalence₁CounitIso_hom_app, Functor.map_comp,\n  assoc]\n[GOAL]\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_6, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\n⊢ (equivalence₂ eB hF).unitIso = equivalence₂UnitIso eB hF\n[PROOFSTEP]\next X\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_6, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nX : A\n⊢ NatTrans.app (equivalence₂ eB hF).unitIso.hom X = NatTrans.app (equivalence₂UnitIso eB hF).hom X\n[PROOFSTEP]\ndsimp [equivalence₂]\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_6, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nX : A\n⊢ NatTrans.app (equivalence₁ hF).unitIso.hom X ≫\n      (equivalence₁ hF).inverse.map (NatTrans.app eB.counitIso.inv (F.obj X)) =\n    NatTrans.app (equivalence₂UnitIso eB hF).hom X\n[PROOFSTEP]\nsimp only [equivalence₂UnitIso_hom_app, equivalence₁UnitIso_eq, equivalence₁UnitIso_hom_app, assoc,\n  NatIso.cancel_natIso_hom_left]\n[GOAL]\ncase w.w.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_6, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nX : A\n⊢ NatTrans.app eA.unitIso.hom X ≫\n      eA.inverse.map (NatTrans.app e'.unitIso.hom (eA.functor.obj X)) ≫\n        eA.inverse.map (e'.inverse.map (NatTrans.app hF.hom X)) ≫\n          (equivalence₁ hF).inverse.map (NatTrans.app eB.counitIso.inv (F.obj X)) =\n    NatTrans.app eA.unitIso.hom X ≫\n      eA.inverse.map (NatTrans.app e'.unitIso.hom (eA.functor.obj X)) ≫\n        eA.inverse.map (e'.inverse.map (NatTrans.app hF.hom X)) ≫\n          eA.inverse.map (e'.inverse.map (NatTrans.app eB.counitIso.inv (F.obj X)))\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{?u.46977, u_1} A\ninst✝² : Category.{?u.46981, u_2} A'\ninst✝¹ : Category.{?u.46985, u_3} B\ninst✝ : Category.{?u.46989, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\n⊢ IsEquivalence G\n[PROOFSTEP]\nrefine' IsEquivalence.ofIso _ (IsEquivalence.ofEquivalence (equivalence₂ eB hF).symm)\n[GOAL]\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{?u.46977, u_1} A\ninst✝² : Category.{?u.46981, u_2} A'\ninst✝¹ : Category.{?u.46985, u_3} B\ninst✝ : Category.{?u.46989, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\n⊢ (CategoryTheory.Equivalence.symm (equivalence₂ eB hF)).functor ≅ G\n[PROOFSTEP]\ncalc\n  eB.functor ⋙ e'.inverse ⋙ eA.inverse ≅ (eB.functor ⋙ e'.inverse) ⋙ eA.inverse := Iso.refl _\n  _ ≅ (G ⋙ eA.functor) ⋙ eA.inverse := (isoWhiskerRight hG _)\n  _ ≅ G ⋙ 𝟭 A := (isoWhiskerLeft _ eA.unitIso.symm)\n  _ ≅ G := Functor.rightUnitor G\n[GOAL]\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{?u.52568, u_1} A\ninst✝² : Category.{?u.52572, u_2} A'\ninst✝¹ : Category.{?u.52576, u_3} B\ninst✝ : Category.{?u.52580, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\n⊢ (G ⋙ eA.functor) ⋙ e'.functor ≅ G ⋙ eA.functor ⋙ e'.functor\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\n⊢ (equivalence hF hG).counitIso = equivalenceCounitIso η\n[PROOFSTEP]\next1\n[GOAL]\ncase w\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\n⊢ (equivalence hF hG).counitIso.hom = (equivalenceCounitIso η).hom\n[PROOFSTEP]\napply NatTrans.ext\n[GOAL]\ncase w.app\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\n⊢ (equivalence hF hG).counitIso.hom.app = (equivalenceCounitIso η).hom.app\n[PROOFSTEP]\next Y\n[GOAL]\ncase w.app.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nY : B\n⊢ NatTrans.app (equivalence hF hG).counitIso.hom Y = NatTrans.app (equivalenceCounitIso η).hom Y\n[PROOFSTEP]\ndsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence]\n[GOAL]\ncase w.app.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nY : B\n⊢ NatTrans.app IsEquivalence.unitIso.inv Y = NatTrans.app (equivalenceCounitIso η).hom Y\n[PROOFSTEP]\nrw [equivalenceCounitIso_hom_app, IsEquivalence.ofIso_unitIso_inv_app]\n[GOAL]\ncase w.app.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nY : B\n⊢ (IsEquivalence.inverse (equivalence₂ eB hF).inverse).map\n        (NatTrans.app\n          (((Iso.refl (eB.functor ⋙ e'.inverse ⋙ eA.inverse) ≪≫ isoWhiskerRight hG eA.inverse) ≪≫\n                isoWhiskerLeft G eA.unitIso.symm) ≪≫\n              Functor.rightUnitor G).inv\n          Y) ≫\n      NatTrans.app IsEquivalence.unitIso.inv Y =\n    eB.inverse.map (NatTrans.app η.hom Y) ≫ NatTrans.app eB.unitIso.inv Y\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.app.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nY : B\n⊢ eB.inverse.map\n        (F.map\n          (𝟙 (G.obj Y) ≫\n            NatTrans.app eA.unitIso.hom (G.obj Y) ≫\n              eA.inverse.map (NatTrans.app hG.inv Y) ≫ 𝟙 (eA.inverse.obj (e'.inverse.obj (eB.functor.obj Y))))) ≫\n      NatTrans.app (equivalence₂ eB hF).counitIso.hom Y =\n    eB.inverse.map (NatTrans.app η.hom Y) ≫ NatTrans.app eB.unitIso.inv Y\n[PROOFSTEP]\nsimp only [comp_id, id_comp, F.map_comp, assoc, equivalence₂CounitIso_eq, equivalence₂CounitIso_hom_app, ←\n  eB.inverse.map_comp_assoc, ← τ₀_hom_app, hη, τ₁_hom_app]\n[GOAL]\ncase w.app.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nY : B\n⊢ eB.inverse.map\n        (F.map (NatTrans.app eA.unitIso.hom (G.obj Y)) ≫\n          F.map (eA.inverse.map (NatTrans.app hG.inv Y)) ≫\n            NatTrans.app hF.inv (eA.inverse.obj (e'.inverse.obj (eB.functor.obj Y))) ≫\n              e'.functor.map (NatTrans.app eA.counitIso.hom (e'.inverse.obj (eB.functor.obj Y))) ≫\n                e'.functor.map (NatTrans.app hG.hom Y) ≫ NatTrans.app hF.hom (G.obj Y) ≫ NatTrans.app η.hom Y) ≫\n      NatTrans.app eB.unitIso.inv Y =\n    eB.inverse.map (NatTrans.app η.hom Y) ≫ NatTrans.app eB.unitIso.inv Y\n[PROOFSTEP]\nerw [hF.inv.naturality_assoc, hF.inv.naturality_assoc]\n[GOAL]\ncase w.app.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nY : B\n⊢ eB.inverse.map\n        (NatTrans.app hF.inv (G.obj Y) ≫\n          (eA.functor ⋙ e'.functor).map (NatTrans.app eA.unitIso.hom (G.obj Y)) ≫\n            (eA.functor ⋙ e'.functor).map (eA.inverse.map (NatTrans.app hG.inv Y)) ≫\n              e'.functor.map (NatTrans.app eA.counitIso.hom (e'.inverse.obj (eB.functor.obj Y))) ≫\n                e'.functor.map (NatTrans.app hG.hom Y) ≫ NatTrans.app hF.hom (G.obj Y) ≫ NatTrans.app η.hom Y) ≫\n      NatTrans.app eB.unitIso.inv Y =\n    eB.inverse.map (NatTrans.app η.hom Y) ≫ NatTrans.app eB.unitIso.inv Y\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.app.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nY : B\n⊢ eB.inverse.map\n        (NatTrans.app hF.inv (G.obj Y) ≫\n          e'.functor.map (eA.functor.map (NatTrans.app eA.unitIso.hom (G.obj Y))) ≫\n            e'.functor.map (eA.functor.map (eA.inverse.map (NatTrans.app hG.inv Y))) ≫\n              e'.functor.map (NatTrans.app eA.counitIso.hom (e'.inverse.obj (eB.functor.obj Y))) ≫\n                e'.functor.map (NatTrans.app hG.hom Y) ≫ NatTrans.app hF.hom (G.obj Y) ≫ NatTrans.app η.hom Y) ≫\n      NatTrans.app eB.unitIso.inv Y =\n    eB.inverse.map (NatTrans.app η.hom Y) ≫ NatTrans.app eB.unitIso.inv Y\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase w.app.h.e_a.e_a\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nY : B\n⊢ NatTrans.app hF.inv (G.obj Y) ≫\n      e'.functor.map (eA.functor.map (NatTrans.app eA.unitIso.hom (G.obj Y))) ≫\n        e'.functor.map (eA.functor.map (eA.inverse.map (NatTrans.app hG.inv Y))) ≫\n          e'.functor.map (NatTrans.app eA.counitIso.hom (e'.inverse.obj (eB.functor.obj Y))) ≫\n            e'.functor.map (NatTrans.app hG.hom Y) ≫ NatTrans.app hF.hom (G.obj Y) ≫ NatTrans.app η.hom Y =\n    NatTrans.app η.hom Y\n[PROOFSTEP]\nsimp only [assoc, ← e'.functor.map_comp_assoc, Equivalence.fun_inv_map, Iso.inv_hom_id_app_assoc, hG.inv_hom_id_app]\n[GOAL]\ncase w.app.h.e_a.e_a\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nY : B\n⊢ NatTrans.app hF.inv (G.obj Y) ≫\n      e'.functor.map\n          (eA.functor.map (NatTrans.app eA.unitIso.hom (G.obj Y)) ≫\n            NatTrans.app (Equivalence.counit eA) (eA.functor.obj (G.obj Y)) ≫ 𝟙 ((G ⋙ eA.functor).obj Y)) ≫\n        NatTrans.app hF.hom (G.obj Y) ≫ NatTrans.app η.hom Y =\n    NatTrans.app η.hom Y\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.app.h.e_a.e_a\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_6, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_5, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nY : B\n⊢ NatTrans.app hF.inv (G.obj Y) ≫\n      e'.functor.map\n          (eA.functor.map (NatTrans.app eA.unitIso.hom (G.obj Y)) ≫\n            NatTrans.app (Equivalence.counit eA) (eA.functor.obj (G.obj Y)) ≫ 𝟙 (eA.functor.obj (G.obj Y))) ≫\n        NatTrans.app hF.hom (G.obj Y) ≫ NatTrans.app η.hom Y =\n    NatTrans.app η.hom Y\n[PROOFSTEP]\nrw [comp_id, eA.functor_unitIso_comp, e'.functor.map_id, id_comp, hF.inv_hom_id_app_assoc]\n[GOAL]\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_6, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nε : eA.functor ≅ F ⋙ e'.inverse\nhε : υ hF = ε\n⊢ (equivalence hF hG).unitIso = equivalenceUnitIso hG ε\n[PROOFSTEP]\next1\n[GOAL]\ncase w\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_6, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nε : eA.functor ≅ F ⋙ e'.inverse\nhε : υ hF = ε\n⊢ (equivalence hF hG).unitIso.hom = (equivalenceUnitIso hG ε).hom\n[PROOFSTEP]\napply NatTrans.ext\n[GOAL]\ncase w.app\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_6, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nε : eA.functor ≅ F ⋙ e'.inverse\nhε : υ hF = ε\n⊢ (equivalence hF hG).unitIso.hom.app = (equivalenceUnitIso hG ε).hom.app\n[PROOFSTEP]\next X\n[GOAL]\ncase w.app.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_6, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nε : eA.functor ≅ F ⋙ e'.inverse\nhε : υ hF = ε\nX : A\n⊢ NatTrans.app (equivalence hF hG).unitIso.hom X = NatTrans.app (equivalenceUnitIso hG ε).hom X\n[PROOFSTEP]\ndsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence, IsEquivalence.inverse]\n[GOAL]\ncase w.app.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_6, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nε : eA.functor ≅ F ⋙ e'.inverse\nhε : υ hF = ε\nX : A\n⊢ NatTrans.app IsEquivalence.counitIso.inv X = NatTrans.app (equivalenceUnitIso hG ε).hom X\n[PROOFSTEP]\nrw [IsEquivalence.ofIso_counitIso_inv_app]\n[GOAL]\ncase w.app.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_6, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nε : eA.functor ≅ F ⋙ e'.inverse\nhε : υ hF = ε\nX : A\n⊢ NatTrans.app IsEquivalence.counitIso.inv X ≫\n      NatTrans.app\n        (((Iso.refl (eB.functor ⋙ e'.inverse ⋙ eA.inverse) ≪≫ isoWhiskerRight hG eA.inverse) ≪≫\n              isoWhiskerLeft G eA.unitIso.symm) ≪≫\n            Functor.rightUnitor G).hom\n        ((IsEquivalence.inverse (equivalence₂ eB hF).inverse).obj X) =\n    NatTrans.app (equivalenceUnitIso hG ε).hom X\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.app.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_6, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nε : eA.functor ≅ F ⋙ e'.inverse\nhε : υ hF = ε\nX : A\n⊢ NatTrans.app (equivalence₂ eB hF).unitIso.hom X ≫\n      ((𝟙 (eA.inverse.obj (e'.inverse.obj (eB.functor.obj (eB.inverse.obj (F.obj X))))) ≫\n            eA.inverse.map (NatTrans.app hG.hom (eB.inverse.obj (F.obj X)))) ≫\n          NatTrans.app eA.unitIso.inv (G.obj (eB.inverse.obj (F.obj X)))) ≫\n        𝟙 (G.obj (eB.inverse.obj (F.obj X))) =\n    NatTrans.app (equivalenceUnitIso hG ε).hom X\n[PROOFSTEP]\nerw [id_comp, comp_id]\n[GOAL]\ncase w.app.h\nA : Type u_1\nA' : Type u_2\nB : Type u_3\nB' : Type u_4\ninst✝³ : Category.{u_5, u_1} A\ninst✝² : Category.{u_7, u_2} A'\ninst✝¹ : Category.{u_6, u_3} B\ninst✝ : Category.{u_8, u_4} B'\neA : A ≌ A'\neB : B ≌ B'\ne' : A' ≌ B'\nF : A ⥤ B'\nhF : eA.functor ⋙ e'.functor ≅ F\nG : B ⥤ A\nhG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor\nη : G ⋙ F ≅ eB.functor\nhη : τ₀ = τ₁ hF hG η\nε : eA.functor ≅ F ⋙ e'.inverse\nhε : υ hF = ε\nX : A\n⊢ NatTrans.app (equivalence₂ eB hF).unitIso.hom X ≫\n      eA.inverse.map (NatTrans.app hG.hom (eB.inverse.obj (F.obj X))) ≫\n        NatTrans.app eA.unitIso.inv (G.obj (eB.inverse.obj (F.obj X))) =\n    NatTrans.app (equivalenceUnitIso hG ε).hom X\n[PROOFSTEP]\nsimp only [equivalence₂UnitIso_eq eB hF, equivalence₂UnitIso_hom_app, assoc, equivalenceUnitIso_hom_app, ←\n  eA.inverse.map_comp_assoc, ← hε, υ_hom_app]\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.DoldKan.Compatibility", "llama_tokens": 14854, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833841649233, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.39031734687000214}}
{"text": "[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\n⊢ ∫ (x : α), f x ∂μ ∈ s\n[PROOFSTEP]\nborelize E\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ ∫ (x : α), f x ∂μ ∈ s\n[PROOFSTEP]\nrcases hfi.aestronglyMeasurable with ⟨g, hgm, hfg⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\n⊢ ∫ (x : α), f x ∂μ ∈ s\n[PROOFSTEP]\nhaveI : SeparableSpace (range g ∩ s : Set E) := (hgm.isSeparable_range.mono (inter_subset_left _ _)).separableSpace\n[GOAL]\ncase intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis : SeparableSpace ↑(range g ∩ s)\n⊢ ∫ (x : α), f x ∂μ ∈ s\n[PROOFSTEP]\nobtain ⟨y₀, h₀⟩ : (range g ∩ s).Nonempty :=\n  by\n  rcases(hf.and hfg).exists with ⟨x₀, h₀⟩\n  exact ⟨f x₀, by simp only [h₀.2, mem_range_self], h₀.1⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis : SeparableSpace ↑(range g ∩ s)\n⊢ Set.Nonempty (range g ∩ s)\n[PROOFSTEP]\nrcases(hf.and hfg).exists with ⟨x₀, h₀⟩\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis : SeparableSpace ↑(range g ∩ s)\nx₀ : α\nh₀ : f x₀ ∈ s ∧ f x₀ = g x₀\n⊢ Set.Nonempty (range g ∩ s)\n[PROOFSTEP]\nexact ⟨f x₀, by simp only [h₀.2, mem_range_self], h₀.1⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis : SeparableSpace ↑(range g ∩ s)\nx₀ : α\nh₀ : f x₀ ∈ s ∧ f x₀ = g x₀\n⊢ f x₀ ∈ range g\n[PROOFSTEP]\nsimp only [h₀.2, mem_range_self]\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\n⊢ ∫ (x : α), f x ∂μ ∈ s\n[PROOFSTEP]\nrw [integral_congr_ae hfg]\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\n⊢ ∫ (a : α), g a ∂μ ∈ s\n[PROOFSTEP]\nrw [integrable_congr hfg] at hfi \n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\n⊢ ∫ (a : α), g a ∂μ ∈ s\n[PROOFSTEP]\nhave hg : ∀ᵐ x ∂μ, g x ∈ closure (range g ∩ s) :=\n  by\n  filter_upwards [hfg.rw (fun _ y => y ∈ s) hf] with x hx\n  apply subset_closure\n  exact ⟨mem_range_self _, hx⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\n⊢ ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)\n[PROOFSTEP]\nfilter_upwards [hfg.rw (fun _ y => y ∈ s) hf] with x hx\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\nx : α\nhx : g x ∈ s\n⊢ g x ∈ closure (range g ∩ s)\n[PROOFSTEP]\napply subset_closure\n[GOAL]\ncase h.a\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\nx : α\nhx : g x ∈ s\n⊢ g x ∈ range g ∩ s\n[PROOFSTEP]\nexact ⟨mem_range_self _, hx⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\nhg : ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)\n⊢ ∫ (a : α), g a ∂μ ∈ s\n[PROOFSTEP]\nset G : ℕ → SimpleFunc α E := SimpleFunc.approxOn _ hgm.measurable (range g ∩ s) y₀ h₀\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\nhg : ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)\nG : ℕ → SimpleFunc α E := SimpleFunc.approxOn g (_ : Measurable g) (range g ∩ s) y₀ h₀\n⊢ ∫ (a : α), g a ∂μ ∈ s\n[PROOFSTEP]\nhave : Tendsto (fun n => (G n).integral μ) atTop (𝓝 <| ∫ x, g x ∂μ) :=\n  tendsto_integral_approxOn_of_measurable hfi _ hg _ (integrable_const _)\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis✝ : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\nhg : ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)\nG : ℕ → SimpleFunc α E := SimpleFunc.approxOn g (_ : Measurable g) (range g ∩ s) y₀ h₀\nthis : Tendsto (fun n => SimpleFunc.integral μ (G n)) atTop (𝓝 (∫ (x : α), g x ∂μ))\n⊢ ∫ (a : α), g a ∂μ ∈ s\n[PROOFSTEP]\nrefine' hsc.mem_of_tendsto this (eventually_of_forall fun n => hs.sum_mem _ _ _)\n[GOAL]\ncase intro.intro.intro.refine'_1\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis✝ : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\nhg : ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)\nG : ℕ → SimpleFunc α E := SimpleFunc.approxOn g (_ : Measurable g) (range g ∩ s) y₀ h₀\nthis : Tendsto (fun n => SimpleFunc.integral μ (G n)) atTop (𝓝 (∫ (x : α), g x ∂μ))\nn : ℕ\n⊢ ∀ (i : E), i ∈ SimpleFunc.range (G n) → 0 ≤ ENNReal.toReal (↑↑μ (↑(G n) ⁻¹' {i}))\n[PROOFSTEP]\nexact fun _ _ => ENNReal.toReal_nonneg\n[GOAL]\ncase intro.intro.intro.refine'_2\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis✝ : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\nhg : ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)\nG : ℕ → SimpleFunc α E := SimpleFunc.approxOn g (_ : Measurable g) (range g ∩ s) y₀ h₀\nthis : Tendsto (fun n => SimpleFunc.integral μ (G n)) atTop (𝓝 (∫ (x : α), g x ∂μ))\nn : ℕ\n⊢ ∑ i in SimpleFunc.range (G n), ENNReal.toReal (↑↑μ (↑(G n) ⁻¹' {i})) = 1\n[PROOFSTEP]\nrw [← ENNReal.toReal_sum, (G n).sum_range_measure_preimage_singleton, measure_univ, ENNReal.one_toReal]\n[GOAL]\ncase intro.intro.intro.refine'_2\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis✝ : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\nhg : ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)\nG : ℕ → SimpleFunc α E := SimpleFunc.approxOn g (_ : Measurable g) (range g ∩ s) y₀ h₀\nthis : Tendsto (fun n => SimpleFunc.integral μ (G n)) atTop (𝓝 (∫ (x : α), g x ∂μ))\nn : ℕ\n⊢ ∀ (a : E), a ∈ SimpleFunc.range (G n) → ↑↑μ (↑(G n) ⁻¹' {a}) ≠ ⊤\n[PROOFSTEP]\nexact fun _ _ => measure_ne_top _ _\n[GOAL]\ncase intro.intro.intro.refine'_3\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis✝ : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\nhg : ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)\nG : ℕ → SimpleFunc α E := SimpleFunc.approxOn g (_ : Measurable g) (range g ∩ s) y₀ h₀\nthis : Tendsto (fun n => SimpleFunc.integral μ (G n)) atTop (𝓝 (∫ (x : α), g x ∂μ))\nn : ℕ\n⊢ ∀ (i : E), i ∈ SimpleFunc.range (G n) → ↑↑(ContinuousLinearMap.id ℝ E) i ∈ s\n[PROOFSTEP]\nsimp only [SimpleFunc.mem_range, forall_range_iff]\n[GOAL]\ncase intro.intro.intro.refine'_3\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis✝ : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\nhg : ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)\nG : ℕ → SimpleFunc α E := SimpleFunc.approxOn g (_ : Measurable g) (range g ∩ s) y₀ h₀\nthis : Tendsto (fun n => SimpleFunc.integral μ (G n)) atTop (𝓝 (∫ (x : α), g x ∂μ))\nn : ℕ\n⊢ ∀ (i : α), ↑↑(ContinuousLinearMap.id ℝ E) (↑(SimpleFunc.approxOn g (_ : Measurable g) (range g ∩ s) y₀ h₀ n) i) ∈ s\n[PROOFSTEP]\nintro x\n[GOAL]\ncase intro.intro.intro.refine'_3\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis✝ : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\nhg : ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)\nG : ℕ → SimpleFunc α E := SimpleFunc.approxOn g (_ : Measurable g) (range g ∩ s) y₀ h₀\nthis : Tendsto (fun n => SimpleFunc.integral μ (G n)) atTop (𝓝 (∫ (x : α), g x ∂μ))\nn : ℕ\nx : α\n⊢ ↑↑(ContinuousLinearMap.id ℝ E) (↑(SimpleFunc.approxOn g (_ : Measurable g) (range g ∩ s) y₀ h₀ n) x) ∈ s\n[PROOFSTEP]\napply inter_subset_right (range g)\n[GOAL]\ncase intro.intro.intro.refine'_3.a\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng✝ : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhf : ∀ᵐ (x : α) ∂μ, f x ∈ s\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : α → E\nhfi : Integrable g\nhgm : StronglyMeasurable g\nhfg : f =ᶠ[ae μ] g\nthis✝ : SeparableSpace ↑(range g ∩ s)\ny₀ : E\nh₀ : y₀ ∈ range g ∩ s\nhg : ∀ᵐ (x : α) ∂μ, g x ∈ closure (range g ∩ s)\nG : ℕ → SimpleFunc α E := SimpleFunc.approxOn g (_ : Measurable g) (range g ∩ s) y₀ h₀\nthis : Tendsto (fun n => SimpleFunc.integral μ (G n)) atTop (𝓝 (∫ (x : α), g x ∂μ))\nn : ℕ\nx : α\n⊢ ↑↑(ContinuousLinearMap.id ℝ E) (↑(SimpleFunc.approxOn g (_ : Measurable g) (range g ∩ s) y₀ h₀ n) x) ∈ range g ∩ s\n[PROOFSTEP]\nexact SimpleFunc.approxOn_mem hgm.measurable h₀ _ _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : NeZero μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\n⊢ ⨍ (x : α), f x ∂μ ∈ s\n[PROOFSTEP]\nrefine' hs.integral_mem hsc (ae_mono' _ hfs) hfi.to_average\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : NeZero μ\nhs : Convex ℝ s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\n⊢ (↑↑μ univ)⁻¹ • μ ≪ μ\n[PROOFSTEP]\nexact AbsolutelyContinuous.smul (refl _) _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : NeZero μ\nhg : ConvexOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\n⊢ (⨍ (x : α), f x ∂μ, ⨍ (x : α), g (f x) ∂μ) ∈ {p | p.fst ∈ s ∧ g p.fst ≤ p.snd}\n[PROOFSTEP]\nhave ht_mem : ∀ᵐ x ∂μ, (f x, g (f x)) ∈ {p : E × ℝ | p.1 ∈ s ∧ g p.1 ≤ p.2} := hfs.mono fun x hx => ⟨hx, le_rfl⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : NeZero μ\nhg : ConvexOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\nht_mem : ∀ᵐ (x : α) ∂μ, (f x, g (f x)) ∈ {p | p.fst ∈ s ∧ g p.fst ≤ p.snd}\n⊢ (⨍ (x : α), f x ∂μ, ⨍ (x : α), g (f x) ∂μ) ∈ {p | p.fst ∈ s ∧ g p.fst ≤ p.snd}\n[PROOFSTEP]\nexact average_pair hfi hgi ▸ hg.convex_epigraph.average_mem (hsc.epigraph hgc) ht_mem (hfi.prod_mk hgi)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : NeZero μ\nhg : ConcaveOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\n⊢ (⨍ (x : α), f x ∂μ, ⨍ (x : α), g (f x) ∂μ) ∈ {p | p.fst ∈ s ∧ p.snd ≤ g p.fst}\n[PROOFSTEP]\nsimpa only [mem_setOf_eq, Pi.neg_apply, average_neg, neg_le_neg_iff] using\n  hg.neg.average_mem_epigraph hgc.neg hsc hfs hfi hgi.neg\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\nhg : ConcaveOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nh0 : ↑↑μ t ≠ 0\nht : ↑↑μ t ≠ ⊤\nhfs : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x ∈ s\nhfi : IntegrableOn f t\nhgi : IntegrableOn (g ∘ f) t\n⊢ (⨍ (x : α) in t, f x ∂μ, ⨍ (x : α) in t, g (f x) ∂μ) ∈ {p | p.fst ∈ s ∧ p.snd ≤ g p.fst}\n[PROOFSTEP]\nsimpa only [mem_setOf_eq, Pi.neg_apply, average_neg, neg_le_neg_iff] using\n  hg.neg.set_average_mem_epigraph hgc.neg hsc h0 ht hfs hfi hgi.neg\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhg : ConvexOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\n⊢ g (∫ (x : α), f x ∂μ) ≤ ∫ (x : α), g (f x) ∂μ\n[PROOFSTEP]\nsimpa only [average_eq_integral] using hg.map_average_le hgc hsc hfs hfi hgi\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsProbabilityMeasure μ\nhg : ConcaveOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\n⊢ ∫ (x : α), g (f x) ∂μ ≤ g (∫ (x : α), f x ∂μ)\n[PROOFSTEP]\nsimpa only [average_eq_integral] using hg.le_map_average hgc hsc hfs hfi hgi\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨\n    ∃ t, MeasurableSet t ∧ ↑↑μ t ≠ 0 ∧ ↑↑μ tᶜ ≠ 0 ∧ ⨍ (x : α) in t, f x ∂μ ≠ ⨍ (x : α) in tᶜ, f x ∂μ\n[PROOFSTEP]\nrefine' or_iff_not_imp_right.mpr fun H => _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\nH : ¬∃ t, MeasurableSet t ∧ ↑↑μ t ≠ 0 ∧ ↑↑μ tᶜ ≠ 0 ∧ ⨍ (x : α) in t, f x ∂μ ≠ ⨍ (x : α) in tᶜ, f x ∂μ\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ)\n[PROOFSTEP]\npush_neg at H \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\nH : ∀ (t : Set α), MeasurableSet t → ↑↑μ t ≠ 0 → ↑↑μ tᶜ ≠ 0 → ⨍ (x : α) in t, f x ∂μ = ⨍ (x : α) in tᶜ, f x ∂μ\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ)\n[PROOFSTEP]\nrefine' hfi.ae_eq_of_forall_set_integral_eq _ _ (integrable_const _) fun t ht ht' => _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\nH : ∀ (t : Set α), MeasurableSet t → ↑↑μ t ≠ 0 → ↑↑μ tᶜ ≠ 0 → ⨍ (x : α) in t, f x ∂μ = ⨍ (x : α) in tᶜ, f x ∂μ\nt : Set α\nht : MeasurableSet t\nht' : ↑↑μ t < ⊤\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in t, const α (⨍ (x : α), f x ∂μ) x ∂μ\n[PROOFSTEP]\nclear ht'\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\nH : ∀ (t : Set α), MeasurableSet t → ↑↑μ t ≠ 0 → ↑↑μ tᶜ ≠ 0 → ⨍ (x : α) in t, f x ∂μ = ⨍ (x : α) in tᶜ, f x ∂μ\nt : Set α\nht : MeasurableSet t\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in t, const α (⨍ (x : α), f x ∂μ) x ∂μ\n[PROOFSTEP]\nsimp only [const_apply, set_integral_const]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\nH : ∀ (t : Set α), MeasurableSet t → ↑↑μ t ≠ 0 → ↑↑μ tᶜ ≠ 0 → ⨍ (x : α) in t, f x ∂μ = ⨍ (x : α) in tᶜ, f x ∂μ\nt : Set α\nht : MeasurableSet t\n⊢ ∫ (x : α) in t, f x ∂μ = ENNReal.toReal (↑↑μ t) • ⨍ (x : α), f x ∂μ\n[PROOFSTEP]\nby_cases h₀ : μ t = 0\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\nH : ∀ (t : Set α), MeasurableSet t → ↑↑μ t ≠ 0 → ↑↑μ tᶜ ≠ 0 → ⨍ (x : α) in t, f x ∂μ = ⨍ (x : α) in tᶜ, f x ∂μ\nt : Set α\nht : MeasurableSet t\nh₀ : ↑↑μ t = 0\n⊢ ∫ (x : α) in t, f x ∂μ = ENNReal.toReal (↑↑μ t) • ⨍ (x : α), f x ∂μ\n[PROOFSTEP]\nrw [restrict_eq_zero.2 h₀, integral_zero_measure, h₀, ENNReal.zero_toReal, zero_smul]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\nH : ∀ (t : Set α), MeasurableSet t → ↑↑μ t ≠ 0 → ↑↑μ tᶜ ≠ 0 → ⨍ (x : α) in t, f x ∂μ = ⨍ (x : α) in tᶜ, f x ∂μ\nt : Set α\nht : MeasurableSet t\nh₀ : ¬↑↑μ t = 0\n⊢ ∫ (x : α) in t, f x ∂μ = ENNReal.toReal (↑↑μ t) • ⨍ (x : α), f x ∂μ\n[PROOFSTEP]\nby_cases h₀' : μ tᶜ = 0\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\nH : ∀ (t : Set α), MeasurableSet t → ↑↑μ t ≠ 0 → ↑↑μ tᶜ ≠ 0 → ⨍ (x : α) in t, f x ∂μ = ⨍ (x : α) in tᶜ, f x ∂μ\nt : Set α\nht : MeasurableSet t\nh₀ : ¬↑↑μ t = 0\nh₀' : ↑↑μ tᶜ = 0\n⊢ ∫ (x : α) in t, f x ∂μ = ENNReal.toReal (↑↑μ t) • ⨍ (x : α), f x ∂μ\n[PROOFSTEP]\nrw [← ae_eq_univ] at h₀' \n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\nH : ∀ (t : Set α), MeasurableSet t → ↑↑μ t ≠ 0 → ↑↑μ tᶜ ≠ 0 → ⨍ (x : α) in t, f x ∂μ = ⨍ (x : α) in tᶜ, f x ∂μ\nt : Set α\nht : MeasurableSet t\nh₀ : ¬↑↑μ t = 0\nh₀' : t =ᶠ[ae μ] univ\n⊢ ∫ (x : α) in t, f x ∂μ = ENNReal.toReal (↑↑μ t) • ⨍ (x : α), f x ∂μ\n[PROOFSTEP]\nrw [restrict_congr_set h₀', restrict_univ, measure_congr h₀', measure_smul_average]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\nH : ∀ (t : Set α), MeasurableSet t → ↑↑μ t ≠ 0 → ↑↑μ tᶜ ≠ 0 → ⨍ (x : α) in t, f x ∂μ = ⨍ (x : α) in tᶜ, f x ∂μ\nt : Set α\nht : MeasurableSet t\nh₀ : ¬↑↑μ t = 0\nh₀' : ¬↑↑μ tᶜ = 0\n⊢ ∫ (x : α) in t, f x ∂μ = ENNReal.toReal (↑↑μ t) • ⨍ (x : α), f x ∂μ\n[PROOFSTEP]\nhave := average_mem_openSegment_compl_self ht.nullMeasurableSet h₀ h₀' hfi\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\nH : ∀ (t : Set α), MeasurableSet t → ↑↑μ t ≠ 0 → ↑↑μ tᶜ ≠ 0 → ⨍ (x : α) in t, f x ∂μ = ⨍ (x : α) in tᶜ, f x ∂μ\nt : Set α\nht : MeasurableSet t\nh₀ : ¬↑↑μ t = 0\nh₀' : ¬↑↑μ tᶜ = 0\nthis : ⨍ (x : α), f x ∂μ ∈ openSegment ℝ (⨍ (x : α) in t, f x ∂μ) (⨍ (x : α) in tᶜ, f x ∂μ)\n⊢ ∫ (x : α) in t, f x ∂μ = ENNReal.toReal (↑↑μ t) • ⨍ (x : α), f x ∂μ\n[PROOFSTEP]\nrw [← H t ht h₀ h₀', openSegment_same, mem_singleton_iff] at this \n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhfi : Integrable f\nH : ∀ (t : Set α), MeasurableSet t → ↑↑μ t ≠ 0 → ↑↑μ tᶜ ≠ 0 → ⨍ (x : α) in t, f x ∂μ = ⨍ (x : α) in tᶜ, f x ∂μ\nt : Set α\nht : MeasurableSet t\nh₀ : ¬↑↑μ t = 0\nh₀' : ¬↑↑μ tᶜ = 0\nthis : ⨍ (x : α), f x ∂μ = ⨍ (x : α) in t, f x ∂μ\n⊢ ∫ (x : α) in t, f x ∂μ = ENNReal.toReal (↑↑μ t) • ⨍ (x : α), f x ∂μ\n[PROOFSTEP]\nrw [this, measure_smul_setAverage _ (measure_ne_top μ _)]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhs : Convex ℝ s\nh0 : ↑↑μ t ≠ 0\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nht : ⨍ (x : α) in t, f x ∂μ ∈ interior s\n⊢ ⨍ (x : α), f x ∂μ ∈ interior s\n[PROOFSTEP]\nrw [← measure_toMeasurable] at h0 \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhs : Convex ℝ s\nh0 : ↑↑μ (toMeasurable μ t) ≠ 0\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nht : ⨍ (x : α) in t, f x ∂μ ∈ interior s\n⊢ ⨍ (x : α), f x ∂μ ∈ interior s\n[PROOFSTEP]\nrw [← restrict_toMeasurable (measure_ne_top μ t)] at ht \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhs : Convex ℝ s\nh0 : ↑↑μ (toMeasurable μ t) ≠ 0\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nht : ⨍ (x : α) in toMeasurable μ t, f x ∂μ ∈ interior s\n⊢ ⨍ (x : α), f x ∂μ ∈ interior s\n[PROOFSTEP]\nby_cases h0' : μ (toMeasurable μ t)ᶜ = 0\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhs : Convex ℝ s\nh0 : ↑↑μ (toMeasurable μ t) ≠ 0\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nht : ⨍ (x : α) in toMeasurable μ t, f x ∂μ ∈ interior s\nh0' : ↑↑μ (toMeasurable μ t)ᶜ = 0\n⊢ ⨍ (x : α), f x ∂μ ∈ interior s\n[PROOFSTEP]\nrw [← ae_eq_univ] at h0' \n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhs : Convex ℝ s\nh0 : ↑↑μ (toMeasurable μ t) ≠ 0\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nht : ⨍ (x : α) in toMeasurable μ t, f x ∂μ ∈ interior s\nh0' : toMeasurable μ t =ᶠ[ae μ] univ\n⊢ ⨍ (x : α), f x ∂μ ∈ interior s\n[PROOFSTEP]\nrwa [restrict_congr_set h0', restrict_univ] at ht \n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhs : Convex ℝ s\nh0 : ↑↑μ (toMeasurable μ t) ≠ 0\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nht : ⨍ (x : α) in toMeasurable μ t, f x ∂μ ∈ interior s\nh0' : ¬↑↑μ (toMeasurable μ t)ᶜ = 0\n⊢ ⨍ (x : α), f x ∂μ ∈ interior s\n[PROOFSTEP]\nexact\n  hs.openSegment_interior_closure_subset_interior ht\n    (hs.set_average_mem_closure h0' (measure_ne_top _ _) (ae_restrict_of_ae hfs) hfi.integrableOn)\n    (average_mem_openSegment_compl_self (measurableSet_toMeasurable μ t).nullMeasurableSet h0 h0' hfi)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhs : StrictConvex ℝ s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ⨍ (x : α), f x ∂μ ∈ interior s\n[PROOFSTEP]\nhave : ∀ {t}, μ t ≠ 0 → (⨍ x in t, f x ∂μ) ∈ s := fun ht =>\n  hs.convex.set_average_mem hsc ht (measure_ne_top _ _) (ae_restrict_of_ae hfs) hfi.integrableOn\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhs : StrictConvex ℝ s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nthis : ∀ {t : Set α}, ↑↑μ t ≠ 0 → ⨍ (x : α) in t, f x ∂μ ∈ s\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ⨍ (x : α), f x ∂μ ∈ interior s\n[PROOFSTEP]\nrefine' (ae_eq_const_or_exists_average_ne_compl hfi).imp_right _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhs : StrictConvex ℝ s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nthis : ∀ {t : Set α}, ↑↑μ t ≠ 0 → ⨍ (x : α) in t, f x ∂μ ∈ s\n⊢ (∃ t, MeasurableSet t ∧ ↑↑μ t ≠ 0 ∧ ↑↑μ tᶜ ≠ 0 ∧ ⨍ (x : α) in t, f x ∂μ ≠ ⨍ (x : α) in tᶜ, f x ∂μ) →\n    ⨍ (x : α), f x ∂μ ∈ interior s\n[PROOFSTEP]\nrintro ⟨t, hm, h₀, h₀', hne⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhs : StrictConvex ℝ s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nthis : ∀ {t : Set α}, ↑↑μ t ≠ 0 → ⨍ (x : α) in t, f x ∂μ ∈ s\nt : Set α\nhm : MeasurableSet t\nh₀ : ↑↑μ t ≠ 0\nh₀' : ↑↑μ tᶜ ≠ 0\nhne : ⨍ (x : α) in t, f x ∂μ ≠ ⨍ (x : α) in tᶜ, f x ∂μ\n⊢ ⨍ (x : α), f x ∂μ ∈ interior s\n[PROOFSTEP]\nexact\n  hs.openSegment_subset (this h₀) (this h₀') hne (average_mem_openSegment_compl_self hm.nullMeasurableSet h₀ h₀' hfi)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhg : StrictConvexOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ g (⨍ (x : α), f x ∂μ) < ⨍ (x : α), g (f x) ∂μ\n[PROOFSTEP]\nhave : ∀ {t}, μ t ≠ 0 → (⨍ x in t, f x ∂μ) ∈ s ∧ g (⨍ x in t, f x ∂μ) ≤ ⨍ x in t, g (f x) ∂μ := fun ht =>\n  hg.convexOn.set_average_mem_epigraph hgc hsc ht (measure_ne_top _ _) (ae_restrict_of_ae hfs) hfi.integrableOn\n    hgi.integrableOn\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhg : StrictConvexOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\nthis : ∀ {t : Set α}, ↑↑μ t ≠ 0 → ⨍ (x : α) in t, f x ∂μ ∈ s ∧ g (⨍ (x : α) in t, f x ∂μ) ≤ ⨍ (x : α) in t, g (f x) ∂μ\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ g (⨍ (x : α), f x ∂μ) < ⨍ (x : α), g (f x) ∂μ\n[PROOFSTEP]\nrefine' (ae_eq_const_or_exists_average_ne_compl hfi).imp_right _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhg : StrictConvexOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\nthis : ∀ {t : Set α}, ↑↑μ t ≠ 0 → ⨍ (x : α) in t, f x ∂μ ∈ s ∧ g (⨍ (x : α) in t, f x ∂μ) ≤ ⨍ (x : α) in t, g (f x) ∂μ\n⊢ (∃ t, MeasurableSet t ∧ ↑↑μ t ≠ 0 ∧ ↑↑μ tᶜ ≠ 0 ∧ ⨍ (x : α) in t, f x ∂μ ≠ ⨍ (x : α) in tᶜ, f x ∂μ) →\n    g (⨍ (x : α), f x ∂μ) < ⨍ (x : α), g (f x) ∂μ\n[PROOFSTEP]\nrintro ⟨t, hm, h₀, h₀', hne⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhg : StrictConvexOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\nthis : ∀ {t : Set α}, ↑↑μ t ≠ 0 → ⨍ (x : α) in t, f x ∂μ ∈ s ∧ g (⨍ (x : α) in t, f x ∂μ) ≤ ⨍ (x : α) in t, g (f x) ∂μ\nt : Set α\nhm : MeasurableSet t\nh₀ : ↑↑μ t ≠ 0\nh₀' : ↑↑μ tᶜ ≠ 0\nhne : ⨍ (x : α) in t, f x ∂μ ≠ ⨍ (x : α) in tᶜ, f x ∂μ\n⊢ g (⨍ (x : α), f x ∂μ) < ⨍ (x : α), g (f x) ∂μ\n[PROOFSTEP]\nrcases average_mem_openSegment_compl_self hm.nullMeasurableSet h₀ h₀' (hfi.prod_mk hgi) with ⟨a, b, ha, hb, hab, h_avg⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhg : StrictConvexOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\nthis : ∀ {t : Set α}, ↑↑μ t ≠ 0 → ⨍ (x : α) in t, f x ∂μ ∈ s ∧ g (⨍ (x : α) in t, f x ∂μ) ≤ ⨍ (x : α) in t, g (f x) ∂μ\nt : Set α\nhm : MeasurableSet t\nh₀ : ↑↑μ t ≠ 0\nh₀' : ↑↑μ tᶜ ≠ 0\nhne : ⨍ (x : α) in t, f x ∂μ ≠ ⨍ (x : α) in tᶜ, f x ∂μ\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nh_avg :\n  a • ⨍ (x : α) in t, (f x, (g ∘ f) x) ∂μ + b • ⨍ (x : α) in tᶜ, (f x, (g ∘ f) x) ∂μ = ⨍ (x : α), (f x, (g ∘ f) x) ∂μ\n⊢ g (⨍ (x : α), f x ∂μ) < ⨍ (x : α), g (f x) ∂μ\n[PROOFSTEP]\nrw [average_pair hfi hgi, average_pair hfi.integrableOn hgi.integrableOn,\n  average_pair hfi.integrableOn hgi.integrableOn, Prod.smul_mk, Prod.smul_mk, Prod.mk_add_mk, Prod.mk.inj_iff] at h_avg \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhg : StrictConvexOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\nthis : ∀ {t : Set α}, ↑↑μ t ≠ 0 → ⨍ (x : α) in t, f x ∂μ ∈ s ∧ g (⨍ (x : α) in t, f x ∂μ) ≤ ⨍ (x : α) in t, g (f x) ∂μ\nt : Set α\nhm : MeasurableSet t\nh₀ : ↑↑μ t ≠ 0\nh₀' : ↑↑μ tᶜ ≠ 0\nhne : ⨍ (x : α) in t, f x ∂μ ≠ ⨍ (x : α) in tᶜ, f x ∂μ\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nh_avg :\n  a • ⨍ (x : α) in t, f x ∂μ + b • ⨍ (x : α) in tᶜ, f x ∂μ = ⨍ (x : α), f x ∂μ ∧\n    a • ⨍ (x : α) in t, (g ∘ f) x ∂μ + b • ⨍ (x : α) in tᶜ, (g ∘ f) x ∂μ = ⨍ (x : α), (g ∘ f) x ∂μ\n⊢ g (⨍ (x : α), f x ∂μ) < ⨍ (x : α), g (f x) ∂μ\n[PROOFSTEP]\nsimp only [Function.comp] at h_avg \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhg : StrictConvexOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\nthis : ∀ {t : Set α}, ↑↑μ t ≠ 0 → ⨍ (x : α) in t, f x ∂μ ∈ s ∧ g (⨍ (x : α) in t, f x ∂μ) ≤ ⨍ (x : α) in t, g (f x) ∂μ\nt : Set α\nhm : MeasurableSet t\nh₀ : ↑↑μ t ≠ 0\nh₀' : ↑↑μ tᶜ ≠ 0\nhne : ⨍ (x : α) in t, f x ∂μ ≠ ⨍ (x : α) in tᶜ, f x ∂μ\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nh_avg :\n  a • ⨍ (x : α) in t, f x ∂μ + b • ⨍ (x : α) in tᶜ, f x ∂μ = ⨍ (x : α), f x ∂μ ∧\n    a • ⨍ (x : α) in t, g (f x) ∂μ + b • ⨍ (x : α) in tᶜ, g (f x) ∂μ = ⨍ (x : α), g (f x) ∂μ\n⊢ g (⨍ (x : α), f x ∂μ) < ⨍ (x : α), g (f x) ∂μ\n[PROOFSTEP]\nrw [← h_avg.1, ← h_avg.2]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt✝ : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhg : StrictConvexOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\nthis : ∀ {t : Set α}, ↑↑μ t ≠ 0 → ⨍ (x : α) in t, f x ∂μ ∈ s ∧ g (⨍ (x : α) in t, f x ∂μ) ≤ ⨍ (x : α) in t, g (f x) ∂μ\nt : Set α\nhm : MeasurableSet t\nh₀ : ↑↑μ t ≠ 0\nh₀' : ↑↑μ tᶜ ≠ 0\nhne : ⨍ (x : α) in t, f x ∂μ ≠ ⨍ (x : α) in tᶜ, f x ∂μ\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nh_avg :\n  a • ⨍ (x : α) in t, f x ∂μ + b • ⨍ (x : α) in tᶜ, f x ∂μ = ⨍ (x : α), f x ∂μ ∧\n    a • ⨍ (x : α) in t, g (f x) ∂μ + b • ⨍ (x : α) in tᶜ, g (f x) ∂μ = ⨍ (x : α), g (f x) ∂μ\n⊢ g (a • ⨍ (x : α) in t, f x ∂μ + b • ⨍ (x : α) in tᶜ, f x ∂μ) <\n    a • ⨍ (x : α) in t, g (f x) ∂μ + b • ⨍ (x : α) in tᶜ, g (f x) ∂μ\n[PROOFSTEP]\ncalc\n  g ((a • ⨍ x in t, f x ∂μ) + b • ⨍ x in tᶜ, f x ∂μ) < a * g (⨍ x in t, f x ∂μ) + b * g (⨍ x in tᶜ, f x ∂μ) :=\n    hg.2 (this h₀).1 (this h₀').1 hne ha hb hab\n  _ ≤ (a * ⨍ x in t, g (f x) ∂μ) + b * ⨍ x in tᶜ, g (f x) ∂μ :=\n    add_le_add (mul_le_mul_of_nonneg_left (this h₀).2 ha.le) (mul_le_mul_of_nonneg_left (this h₀').2 hb.le)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : IsFiniteMeasure μ\nhg : StrictConcaveOn ℝ s g\nhgc : ContinuousOn g s\nhsc : IsClosed s\nhfs : ∀ᵐ (x : α) ∂μ, f x ∈ s\nhfi : Integrable f\nhgi : Integrable (g ∘ f)\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ⨍ (x : α), g (f x) ∂μ < g (⨍ (x : α), f x ∂μ)\n[PROOFSTEP]\nsimpa only [Pi.neg_apply, average_neg, neg_lt_neg_iff] using\n  hg.neg.ae_eq_const_or_map_average_lt hgc.neg hsc hfs hfi hgi.neg\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖⨍ (x : α), f x ∂μ‖ < C\n[PROOFSTEP]\ncases' le_or_lt C 0 with hC0 hC0\n[GOAL]\ncase inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nhC0 : C ≤ 0\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖⨍ (x : α), f x ∂μ‖ < C\n[PROOFSTEP]\nhave : f =ᵐ[μ] 0 := h_le.mono fun x hx => norm_le_zero_iff.1 (hx.trans hC0)\n[GOAL]\ncase inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nhC0 : C ≤ 0\nthis : f =ᶠ[ae μ] 0\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖⨍ (x : α), f x ∂μ‖ < C\n[PROOFSTEP]\nsimp only [average_congr this, Pi.zero_apply, average_zero]\n[GOAL]\ncase inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nhC0 : C ≤ 0\nthis : f =ᶠ[ae μ] 0\n⊢ f =ᶠ[ae μ] const α 0 ∨ ‖0‖ < C\n[PROOFSTEP]\nexact Or.inl this\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nhC0 : 0 < C\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖⨍ (x : α), f x ∂μ‖ < C\n[PROOFSTEP]\nby_cases hfi : Integrable f μ\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nhC0 : 0 < C\nhfi : Integrable f\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖⨍ (x : α), f x ∂μ‖ < C\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nhC0 : 0 < C\nhfi : ¬Integrable f\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖⨍ (x : α), f x ∂μ‖ < C\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nhC0 : 0 < C\nhfi : ¬Integrable f\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖⨍ (x : α), f x ∂μ‖ < C\n[PROOFSTEP]\nsimp [average_eq, integral_undef hfi, hC0, ENNReal.toReal_pos_iff]\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nhC0 : 0 < C\nhfi : Integrable f\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖⨍ (x : α), f x ∂μ‖ < C\n[PROOFSTEP]\ncases' (le_top : μ univ ≤ ∞).eq_or_lt with hμt hμt\n[GOAL]\ncase pos.inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nhC0 : 0 < C\nhfi : Integrable f\nhμt : ↑↑μ univ = ⊤\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖⨍ (x : α), f x ∂μ‖ < C\n[PROOFSTEP]\nsimp [average_eq, hμt, hC0]\n[GOAL]\ncase pos.inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nhC0 : 0 < C\nhfi : Integrable f\nhμt : ↑↑μ univ < ⊤\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖⨍ (x : α), f x ∂μ‖ < C\n[PROOFSTEP]\nhaveI : IsFiniteMeasure μ := ⟨hμt⟩\n[GOAL]\ncase pos.inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nhC0 : 0 < C\nhfi : Integrable f\nhμt : ↑↑μ univ < ⊤\nthis : IsFiniteMeasure μ\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖⨍ (x : α), f x ∂μ‖ < C\n[PROOFSTEP]\nreplace h_le : ∀ᵐ x ∂μ, f x ∈ closedBall (0 : E) C\n[GOAL]\ncase h_le\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nhC0 : 0 < C\nhfi : Integrable f\nhμt : ↑↑μ univ < ⊤\nthis : IsFiniteMeasure μ\n⊢ ∀ᵐ (x : α) ∂μ, f x ∈ closedBall 0 C\n[PROOFSTEP]\nsimpa only [mem_closedBall_zero_iff]\n[GOAL]\ncase pos.inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nhC0 : 0 < C\nhfi : Integrable f\nhμt : ↑↑μ univ < ⊤\nthis : IsFiniteMeasure μ\nh_le : ∀ᵐ (x : α) ∂μ, f x ∈ closedBall 0 C\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖⨍ (x : α), f x ∂μ‖ < C\n[PROOFSTEP]\nsimpa only [interior_closedBall _ hC0.ne', mem_ball_zero_iff] using\n  (strictConvex_closedBall ℝ (0 : E) C).ae_eq_const_or_average_mem_interior isClosed_ball h_le hfi\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝¹ : StrictConvexSpace ℝ E\ninst✝ : IsFiniteMeasure μ\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖∫ (x : α), f x ∂μ‖ < ENNReal.toReal (↑↑μ univ) * C\n[PROOFSTEP]\ncases' eq_or_ne μ 0 with h₀ h₀\n[GOAL]\ncase inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝¹ : StrictConvexSpace ℝ E\ninst✝ : IsFiniteMeasure μ\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nh₀ : μ = 0\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖∫ (x : α), f x ∂μ‖ < ENNReal.toReal (↑↑μ univ) * C\n[PROOFSTEP]\nleft\n[GOAL]\ncase inl.h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝¹ : StrictConvexSpace ℝ E\ninst✝ : IsFiniteMeasure μ\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nh₀ : μ = 0\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ)\n[PROOFSTEP]\nsimp [h₀, EventuallyEq]\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝¹ : StrictConvexSpace ℝ E\ninst✝ : IsFiniteMeasure μ\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nh₀ : μ ≠ 0\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖∫ (x : α), f x ∂μ‖ < ENNReal.toReal (↑↑μ univ) * C\n[PROOFSTEP]\nhave hμ : 0 < (μ univ).toReal := by simp [ENNReal.toReal_pos_iff, pos_iff_ne_zero, h₀, measure_lt_top]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝¹ : StrictConvexSpace ℝ E\ninst✝ : IsFiniteMeasure μ\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nh₀ : μ ≠ 0\n⊢ 0 < ENNReal.toReal (↑↑μ univ)\n[PROOFSTEP]\nsimp [ENNReal.toReal_pos_iff, pos_iff_ne_zero, h₀, measure_lt_top]\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝¹ : StrictConvexSpace ℝ E\ninst✝ : IsFiniteMeasure μ\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nh₀ : μ ≠ 0\nhμ : 0 < ENNReal.toReal (↑↑μ univ)\n⊢ f =ᶠ[ae μ] const α (⨍ (x : α), f x ∂μ) ∨ ‖∫ (x : α), f x ∂μ‖ < ENNReal.toReal (↑↑μ univ) * C\n[PROOFSTEP]\nrefine' (ae_eq_const_or_norm_average_lt_of_norm_le_const h_le).imp_right fun H => _\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝¹ : StrictConvexSpace ℝ E\ninst✝ : IsFiniteMeasure μ\nh_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C\nh₀ : μ ≠ 0\nhμ : 0 < ENNReal.toReal (↑↑μ univ)\nH : ‖⨍ (x : α), f x ∂μ‖ < C\n⊢ ‖∫ (x : α), f x ∂μ‖ < ENNReal.toReal (↑↑μ univ) * C\n[PROOFSTEP]\nrwa [average_eq, norm_smul, norm_inv, Real.norm_eq_abs, abs_of_pos hμ, ← div_eq_inv_mul, div_lt_iff' hμ] at H \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nht : ↑↑μ t ≠ ⊤\nh_le : ∀ᵐ (x : α) ∂Measure.restrict μ t, ‖f x‖ ≤ C\n⊢ f =ᶠ[ae (Measure.restrict μ t)] const α (⨍ (x : α) in t, f x ∂μ) ∨\n    ‖∫ (x : α) in t, f x ∂μ‖ < ENNReal.toReal (↑↑μ t) * C\n[PROOFSTEP]\nhaveI := Fact.mk ht.lt_top\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nht : ↑↑μ t ≠ ⊤\nh_le : ∀ᵐ (x : α) ∂Measure.restrict μ t, ‖f x‖ ≤ C\nthis : Fact (↑↑μ t < ⊤)\n⊢ f =ᶠ[ae (Measure.restrict μ t)] const α (⨍ (x : α) in t, f x ∂μ) ∨\n    ‖∫ (x : α) in t, f x ∂μ‖ < ENNReal.toReal (↑↑μ t) * C\n[PROOFSTEP]\nrw [← restrict_apply_univ]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nm0 : MeasurableSpace α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nμ : Measure α\ns : Set E\nt : Set α\nf : α → E\ng : E → ℝ\nC : ℝ\ninst✝ : StrictConvexSpace ℝ E\nht : ↑↑μ t ≠ ⊤\nh_le : ∀ᵐ (x : α) ∂Measure.restrict μ t, ‖f x‖ ≤ C\nthis : Fact (↑↑μ t < ⊤)\n⊢ f =ᶠ[ae (Measure.restrict μ t)] const α (⨍ (x : α) in t, f x ∂μ) ∨\n    ‖∫ (x : α) in t, f x ∂μ‖ < ENNReal.toReal (↑↑(Measure.restrict μ t) univ) * C\n[PROOFSTEP]\nexact ae_eq_const_or_norm_integral_lt_of_norm_le_const h_le\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Integral", "llama_tokens": 31864, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646010190476, "lm_q2_score": 0.5774953651858118, "lm_q1q2_score": 0.39025092504513925}}
{"text": "[GOAL]\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\np q : Subalgebra R A\nh : (fun s => s.carrier) p = (fun s => s.carrier) q\n⊢ p = q\n[PROOFSTEP]\ncases p\n[GOAL]\ncase mk\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nq : Subalgebra R A\ntoSubsemiring✝ : Subsemiring A\nalgebraMap_mem'✝ : ∀ (r : R), ↑(algebraMap R A) r ∈ toSubsemiring✝.carrier\nh :\n  (fun s => s.carrier) { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ } = (fun s => s.carrier) q\n⊢ { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ } = q\n[PROOFSTEP]\ncases q\n[GOAL]\ncase mk.mk\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\ntoSubsemiring✝¹ : Subsemiring A\nalgebraMap_mem'✝¹ : ∀ (r : R), ↑(algebraMap R A) r ∈ toSubsemiring✝¹.carrier\ntoSubsemiring✝ : Subsemiring A\nalgebraMap_mem'✝ : ∀ (r : R), ↑(algebraMap R A) r ∈ toSubsemiring✝.carrier\nh :\n  (fun s => s.carrier) { toSubsemiring := toSubsemiring✝¹, algebraMap_mem' := algebraMap_mem'✝¹ } =\n    (fun s => s.carrier) { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ }\n⊢ { toSubsemiring := toSubsemiring✝¹, algebraMap_mem' := algebraMap_mem'✝¹ } =\n    { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_toSubsemiring\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\ntoSubsemiring✝¹ : Subsemiring A\nalgebraMap_mem'✝¹ : ∀ (r : R), ↑(algebraMap R A) r ∈ toSubsemiring✝¹.carrier\ntoSubsemiring✝ : Subsemiring A\nalgebraMap_mem'✝ : ∀ (r : R), ↑(algebraMap R A) r ∈ toSubsemiring✝.carrier\nh :\n  (fun s => s.carrier) { toSubsemiring := toSubsemiring✝¹, algebraMap_mem' := algebraMap_mem'✝¹ } =\n    (fun s => s.carrier) { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ }\n⊢ toSubsemiring✝¹ = toSubsemiring✝\n[PROOFSTEP]\nexact SetLike.coe_injective' h\n[GOAL]\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nS T : Subalgebra R A\nh : S.toSubsemiring = T.toSubsemiring\nx : A\n⊢ x ∈ S ↔ x ∈ T\n[PROOFSTEP]\nrw [← mem_toSubsemiring, ← mem_toSubsemiring, h]\n[GOAL]\nR' : Type u'\nR✝ : Type u\nA✝ : Type v\nB : Type w\nC : Type w'\ninst✝⁹ : CommSemiring R✝\ninst✝⁸ : Semiring A✝\ninst✝⁷ : Algebra R✝ A✝\ninst✝⁶ : Semiring B\ninst✝⁵ : Algebra R✝ B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra R✝ C\nS✝ : Subalgebra R✝ A✝\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nS T : Subalgebra R A\nh : toSubring S = toSubring T\nx : A\n⊢ x ∈ S ↔ x ∈ T\n[PROOFSTEP]\nrw [← mem_toSubring, ← mem_toSubring, h]\n[GOAL]\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra R B\ninst✝⁵ : Semiring C\ninst✝⁴ : Algebra R C\nS : Subalgebra R A\ninst✝³ : CommSemiring R'\ninst✝² : SMul R' R\ninst✝¹ : Algebra R' A\ninst✝ : IsScalarTower R' R A\nx : R'\n⊢ ↑(algebraMap R' A) x ∈ S\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one, ← smul_one_smul R x (1 : A), ← Algebra.algebraMap_eq_smul_one]\n[GOAL]\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra R B\ninst✝⁵ : Semiring C\ninst✝⁴ : Algebra R C\nS : Subalgebra R A\ninst✝³ : CommSemiring R'\ninst✝² : SMul R' R\ninst✝¹ : Algebra R' A\ninst✝ : IsScalarTower R' R A\nx : R'\n⊢ ↑(algebraMap R A) (x • 1) ∈ S\n[PROOFSTEP]\nexact algebraMap_mem S _\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\np✝ p : Submodule R A\nh_one : 1 ∈ p\nh_mul : ∀ (x y : A), x ∈ p → y ∈ p → x * y ∈ p\nr : R\n⊢ ↑(algebraMap R A) r ∈\n    {\n            toSubmonoid :=\n              {\n                toSubsemigroup :=\n                  { carrier := p.carrier, mul_mem' := (_ : ∀ {a b : A}, a ∈ p.carrier → b ∈ p.carrier → a * b ∈ p) },\n                one_mem' := h_one },\n            add_mem' := (_ : ∀ {a b : A}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier),\n            zero_mem' := (_ : 0 ∈ p.carrier) }.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\np✝ p : Submodule R A\nh_one : 1 ∈ p\nh_mul : ∀ (x y : A), x ∈ p → y ∈ p → x * y ∈ p\nr : R\n⊢ r • 1 ∈\n    {\n            toSubmonoid :=\n              {\n                toSubsemigroup :=\n                  { carrier := p.carrier, mul_mem' := (_ : ∀ {a b : A}, a ∈ p.carrier → b ∈ p.carrier → a * b ∈ p) },\n                one_mem' := h_one },\n            add_mem' := (_ : ∀ {a b : A}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier),\n            zero_mem' := (_ : 0 ∈ p.carrier) }.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nexact p.smul_mem _ h_one\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\np s : Submodule R A\nh1 : 1 ∈ s\nhmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s\n⊢ ∀ (r : R),\n    ↑(algebraMap R A) r ∈\n      { toSubmonoid := { toSubsemigroup := { carrier := ↑s, mul_mem' := hmul }, one_mem' := h1 },\n              add_mem' := (_ : ∀ {a b : A}, a ∈ s → b ∈ s → a + b ∈ s),\n              zero_mem' := (_ : 0 ∈ s) }.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nintro r\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\np s : Submodule R A\nh1 : 1 ∈ s\nhmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s\nr : R\n⊢ ↑(algebraMap R A) r ∈\n    { toSubmonoid := { toSubsemigroup := { carrier := ↑s, mul_mem' := hmul }, one_mem' := h1 },\n            add_mem' := (_ : ∀ {a b : A}, a ∈ s → b ∈ s → a + b ∈ s),\n            zero_mem' := (_ : 0 ∈ s) }.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\np s : Submodule R A\nh1 : 1 ∈ s\nhmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s\nr : R\n⊢ r • 1 ∈\n    { toSubmonoid := { toSubsemigroup := { carrier := ↑s, mul_mem' := hmul }, one_mem' := h1 },\n            add_mem' := (_ : ∀ {a b : A}, a ∈ s → b ∈ s → a + b ∈ s),\n            zero_mem' := (_ : 0 ∈ s) }.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\napply s.smul_mem _ h1\n[GOAL]\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ✝ φ : A →ₐ[R] B\n⊢ ↑(AlgHom.range φ) = Set.range ↑φ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ✝ φ : A →ₐ[R] B\nx✝ : B\n⊢ x✝ ∈ ↑(AlgHom.range φ) ↔ x✝ ∈ Set.range ↑φ\n[PROOFSTEP]\nrw [SetLike.mem_coe, mem_range]\n[GOAL]\ncase h\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ✝ φ : A →ₐ[R] B\nx✝ : B\n⊢ (∃ x, ↑φ x = x✝) ↔ x✝ ∈ Set.range ↑φ\n[PROOFSTEP]\nrfl\n[GOAL]\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ ϕ ψ : A →ₐ[R] B\nx y : A\nhx : ↑ϕ x = ↑ψ x\nhy : ↑ϕ y = ↑ψ y\n⊢ x * y ∈ {a | ↑ϕ a = ↑ψ a}\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, ϕ.map_mul, ψ.map_mul, hx, hy]\n[GOAL]\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ ϕ ψ : A →ₐ[R] B\n⊢ 1 ∈\n    { carrier := {a | ↑ϕ a = ↑ψ a},\n        mul_mem' := (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x * y ∈ {a | ↑ϕ a = ↑ψ a}) }.carrier\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, map_one]\n[GOAL]\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ ϕ ψ : A →ₐ[R] B\nx y : A\nhx : ↑ϕ x = ↑ψ x\nhy : ↑ϕ y = ↑ψ y\n⊢ x + y ∈\n    {\n          toSubsemigroup :=\n            { carrier := {a | ↑ϕ a = ↑ψ a},\n              mul_mem' := (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x * y ∈ {a | ↑ϕ a = ↑ψ a}) },\n          one_mem' := (_ : ↑ϕ 1 = ↑ψ 1) }.toSubsemigroup.carrier\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, ϕ.map_add, ψ.map_add, hx, hy]\n[GOAL]\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ ϕ ψ : A →ₐ[R] B\n⊢ 0 ∈\n    {\n          toSubsemigroup :=\n            { carrier := {a | ↑ϕ a = ↑ψ a},\n              mul_mem' := (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x * y ∈ {a | ↑ϕ a = ↑ψ a}) },\n          one_mem' := (_ : ↑ϕ 1 = ↑ψ 1) }.toSubsemigroup.carrier\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, map_zero]\n[GOAL]\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : Semiring C\ninst✝ : Algebra R C\nφ ϕ ψ : A →ₐ[R] B\nx : R\n⊢ ↑(algebraMap R A) x ∈\n    {\n            toSubmonoid :=\n              {\n                toSubsemigroup :=\n                  { carrier := {a | ↑ϕ a = ↑ψ a},\n                    mul_mem' := (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x * y ∈ {a | ↑ϕ a = ↑ψ a}) },\n                one_mem' := (_ : ↑ϕ 1 = ↑ψ 1) },\n            add_mem' :=\n              (_ :\n                ∀ {x y : A},\n                  ↑ϕ x = ↑ψ x →\n                    ↑ϕ y = ↑ψ y →\n                      x + y ∈\n                        {\n                              toSubsemigroup :=\n                                { carrier := {a | ↑ϕ a = ↑ψ a},\n                                  mul_mem' :=\n                                    (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x * y ∈ {a | ↑ϕ a = ↑ψ a}) },\n                              one_mem' := (_ : ↑ϕ 1 = ↑ψ 1) }.toSubsemigroup.carrier),\n            zero_mem' := (_ : ↑ϕ 0 = ↑ψ 0) }.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, AlgHom.commutes, AlgHom.commutes]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Semiring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\ng : B → A\nf : A →ₐ[R] B\nh : Function.LeftInverse g ↑f\nsrc✝ : A →ₐ[R] { x // x ∈ AlgHom.range f } := AlgHom.rangeRestrict f\nx : { x // x ∈ AlgHom.range f }\nx' : A\nhx' : ↑f x' = ↑x\n⊢ ↑f (g ↑x) = ↑x\n[PROOFSTEP]\nrw [← hx', h x']\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Semiring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nS : Subalgebra R A\nsrc✝ : { x // x ∈ S.toSubsemiring } ≃+*\n  { x // x ∈ Subsemiring.map (RingEquiv.toRingHom (toRingEquiv e)) S.toSubsemiring } :=\n  RingEquiv.subsemiringMap (toRingEquiv e) S.toSubsemiring\nr : R\n⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R { x // x ∈ S }) r) = ↑(algebraMap R { x // x ∈ Subalgebra.map (↑e) S }) r\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Semiring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nS : Subalgebra R A\nsrc✝ : { x // x ∈ S.toSubsemiring } ≃+*\n  { x // x ∈ Subsemiring.map (RingEquiv.toRingHom (toRingEquiv e)) S.toSubsemiring } :=\n  RingEquiv.subsemiringMap (toRingEquiv e) S.toSubsemiring\nr : R\n⊢ ↑(Equiv.toFun src✝.toEquiv (↑(algebraMap R { x // x ∈ S }) r)) =\n    ↑(↑(algebraMap R { x // x ∈ Subalgebra.map (↑e) S }) r)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase a\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Semiring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nS : Subalgebra R A\nsrc✝ : { x // x ∈ S.toSubsemiring } ≃+*\n  { x // x ∈ Subsemiring.map (RingEquiv.toRingHom (toRingEquiv e)) S.toSubsemiring } :=\n  RingEquiv.subsemiringMap (toRingEquiv e) S.toSubsemiring\nr : R\n⊢ ↑(Equiv.toFun (RingEquiv.subsemiringMap (toRingEquiv e) S.toSubsemiring).toEquiv (↑(algebraMap R { x // x ∈ S }) r)) =\n    ↑(↑(algebraMap R { x // x ∈ Subalgebra.map (↑e) S }) r)\n[PROOFSTEP]\nerw [RingEquiv.subsemiringMap_apply_coe]\n[GOAL]\ncase a\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Semiring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nS : Subalgebra R A\nsrc✝ : { x // x ∈ S.toSubsemiring } ≃+*\n  { x // x ∈ Subsemiring.map (RingEquiv.toRingHom (toRingEquiv e)) S.toSubsemiring } :=\n  RingEquiv.subsemiringMap (toRingEquiv e) S.toSubsemiring\nr : R\n⊢ ↑(toRingEquiv e) ↑(↑(algebraMap R { x // x ∈ S }) r) = ↑(↑(algebraMap R { x // x ∈ Subalgebra.map (↑e) S }) r)\n[PROOFSTEP]\nexact e.commutes _\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Set (Subalgebra R A)\nx : A\n⊢ x ∈ sInf S ↔ ∀ (p : Subalgebra R A), p ∈ S → x ∈ p\n[PROOFSTEP]\nsimp only [← SetLike.mem_coe, coe_sInf, Set.mem_iInter₂]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Set (Subalgebra R A)\n⊢ ↑(↑Subalgebra.toSubmodule (sInf S)) = ↑(sInf (↑Subalgebra.toSubmodule '' S))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Set (Subalgebra R A)\n⊢ ↑(sInf S).toSubsemiring = ↑(sInf (Subalgebra.toSubsemiring '' S))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nι : Sort u_1\nS : ι → Subalgebra R A\n⊢ ↑(⨅ (i : ι), S i) = ⋂ (i : ι), ↑(S i)\n[PROOFSTEP]\nsimp [iInf]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nι : Sort u_1\nS : ι → Subalgebra R A\nx : A\n⊢ x ∈ ⨅ (i : ι), S i ↔ ∀ (i : ι), x ∈ S i\n[PROOFSTEP]\nsimp only [iInf, mem_sInf, Set.forall_range_iff]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nι : Sort u_1\nS : ι → Subalgebra R A\n⊢ ↑(↑toSubmodule (⨅ (i : ι), S i)) = ↑(⨅ (i : ι), ↑toSubmodule (S i))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nx : A\nthis : AlgHom.range (ofId R A) = ⊥\n⊢ x ∈ ⊥ ↔ x ∈ Set.range ↑(algebraMap R A)\n[PROOFSTEP]\nrw [← this, ← SetLike.mem_coe, AlgHom.coe_range]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nx : A\nthis : AlgHom.range (ofId R A) = ⊥\n⊢ x ∈ Set.range ↑(ofId R A) ↔ x ∈ Set.range ↑(algebraMap R A)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\n⊢ ↑Subalgebra.toSubmodule ⊥ = Submodule.span R {1}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nx : A\n⊢ x ∈ ↑Subalgebra.toSubmodule ⊥ ↔ x ∈ Submodule.span R {1}\n[PROOFSTEP]\nsimp [mem_bot, Submodule.mem_span_singleton, Algebra.smul_def]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\n⊢ ↑⊥ = Set.range ↑(algebraMap R A)\n[PROOFSTEP]\nsimp [Set.ext_iff, Algebra.mem_bot]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nh : S = ⊤\nx : A\n⊢ x ∈ S\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nh : S = ⊤\nx : A\n⊢ x ∈ ⊤\n[PROOFSTEP]\nexact mem_top\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nh : ∀ (x : A), x ∈ S\n⊢ S = ⊤\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nh : ∀ (x : A), x ∈ S\nx : A\n⊢ x ∈ S ↔ x ∈ ⊤\n[PROOFSTEP]\nexact ⟨fun _ => mem_top, fun _ => h x⟩\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nf : A →ₐ[R] B\n⊢ ↑(Subalgebra.map f ⊥) = ↑⊥\n[PROOFSTEP]\nsimp only [← Set.range_comp, (· ∘ ·), Algebra.coe_bot, Subalgebra.coe_map, f.commutes]\n[GOAL]\nR : Type u\nA : Type v\nB✝ : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B✝\ninst✝¹ : Algebra R B✝\nS : Subalgebra R A\ninst✝ : Subsingleton A\nB C : Subalgebra R A\nx : A\n⊢ x ∈ B ↔ x ∈ C\n[PROOFSTEP]\nsimp only [Subsingleton.elim x 0, zero_mem B, zero_mem C]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\ninst✝ : Subsingleton (Subalgebra R B)\nf g : A ≃ₐ[R] B\n⊢ f = g\n[PROOFSTEP]\nrw [← f.symm_symm, Subsingleton.elim f.symm g.symm, g.symm_symm]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nsrc✝ : Inhabited (Subalgebra R R) := inferInstanceAs (Inhabited (Subalgebra R R))\n⊢ ∀ (a : Subalgebra R R), a = default\n[PROOFSTEP]\nintro S\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS✝ : Subalgebra R A\nsrc✝ : Inhabited (Subalgebra R R) := inferInstanceAs (Inhabited (Subalgebra R R))\nS : Subalgebra R R\n⊢ S = default\n[PROOFSTEP]\nrefine' le_antisymm ?_ bot_le\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS✝ : Subalgebra R A\nsrc✝ : Inhabited (Subalgebra R R) := inferInstanceAs (Inhabited (Subalgebra R R))\nS : Subalgebra R R\n⊢ S ≤ default\n[PROOFSTEP]\nintro _ _\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS✝ : Subalgebra R A\nsrc✝ : Inhabited (Subalgebra R R) := inferInstanceAs (Inhabited (Subalgebra R R))\nS : Subalgebra R R\nx✝ : R\na✝ : x✝ ∈ S\n⊢ x✝ ∈ default\n[PROOFSTEP]\nsimp only [Set.mem_range, mem_bot, id.map_eq_self, exists_apply_eq_apply, default]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS✝ S : Subalgebra R A\n⊢ equivOfEq S S (_ : S = S) = AlgEquiv.refl\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS✝ S : Subalgebra R A\na✝ : { x // x ∈ S }\n⊢ ↑(↑(equivOfEq S S (_ : S = S)) a✝) = ↑(↑AlgEquiv.refl a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nS₁ : Subalgebra R B\n⊢ prod ⊤ ⊤ = ⊤\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nS₁ : Subalgebra R B\nx✝ : A × B\n⊢ x✝ ∈ prod ⊤ ⊤ ↔ x✝ ∈ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS✝ : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nS : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) S\ni : ι := Nonempty.some (_ : Nonempty ι)\n⊢ 1 ∈\n    { carrier := ⋃ (i : ι), ↑(S i),\n        mul_mem' :=\n          (_ : ∀ {a b : A}, a ∈ ⋃ (i : ι), ↑(S i) → b ∈ ⋃ (i : ι), ↑(S i) → a * b ∈ ⋃ (i : ι), ↑(S i)) }.carrier\n[PROOFSTEP]\nsimp only [Set.mem_iUnion, SetLike.mem_coe]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS✝ : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nS : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) S\ni : ι := Nonempty.some (_ : Nonempty ι)\n⊢ ∃ i, 1 ∈ S i\n[PROOFSTEP]\nexact ⟨i, one_mem _⟩\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS✝ : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nS : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) S\ni : ι := Nonempty.some (_ : Nonempty ι)\n⊢ 0 ∈\n    {\n          toSubsemigroup :=\n            { carrier := ⋃ (i : ι), ↑(S i),\n              mul_mem' :=\n                (_ : ∀ {a b : A}, a ∈ ⋃ (i : ι), ↑(S i) → b ∈ ⋃ (i : ι), ↑(S i) → a * b ∈ ⋃ (i : ι), ↑(S i)) },\n          one_mem' :=\n            (_ :\n              1 ∈\n                { carrier := ⋃ (i : ι), ↑(S i),\n                    mul_mem' :=\n                      (_ :\n                        ∀ {a b : A},\n                          a ∈ ⋃ (i : ι), ↑(S i) →\n                            b ∈ ⋃ (i : ι), ↑(S i) → a * b ∈ ⋃ (i : ι), ↑(S i)) }.carrier) }.toSubsemigroup.carrier\n[PROOFSTEP]\nsimp only [Set.mem_iUnion, SetLike.mem_coe]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS✝ : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nS : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) S\ni : ι := Nonempty.some (_ : Nonempty ι)\n⊢ ∃ i, 0 ∈ S i\n[PROOFSTEP]\nexact ⟨i, zero_mem _⟩\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\ni j : ι\nx : A\nhxi : x ∈ (fun i => ↑(K i)) i\nhxj : x ∈ (fun i => ↑(K i)) j\n⊢ (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj }\n[PROOFSTEP]\nlet ⟨k, hik, hjk⟩ := dir i j\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\ni j : ι\nx : A\nhxi : x ∈ (fun i => ↑(K i)) i\nhxj : x ∈ (fun i => ↑(K i)) j\nk : ι\nhik : (fun x x_1 => x ≤ x_1) (K i) (K k)\nhjk : (fun x x_1 => x ≤ x_1) (K j) (K k)\n⊢ (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj }\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\ni j : ι\nx : A\nhxi : x ∈ (fun i => ↑(K i)) i\nhxj : x ∈ (fun i => ↑(K i)) j\nk : ι\nhik : (fun x x_1 => x ≤ x_1) (K i) (K k)\nhjk : (fun x x_1 => x ≤ x_1) (K j) (K k)\n⊢ ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj }\n[PROOFSTEP]\nrw [hf i k hik, hf j k hjk]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\ni j : ι\nx : A\nhxi : x ∈ (fun i => ↑(K i)) i\nhxj : x ∈ (fun i => ↑(K i)) j\nk : ι\nhik : (fun x x_1 => x ≤ x_1) (K i) (K k)\nhjk : (fun x x_1 => x ≤ x_1) (K j) (K k)\n⊢ ↑(AlgHom.comp (f k) (inclusion hik)) { val := x, property := hxi } =\n    ↑(AlgHom.comp (f k) (inclusion hjk)) { val := x, property := hxj }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\n⊢ ↑T ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\nrw [hT, coe_iSup_of_directed dir]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\n⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n      (_ :\n        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n          (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj })\n      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n    1\n[PROOFSTEP]\napply Set.iUnionLift_const _ (fun _ => 1)\n[GOAL]\ncase hci\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\n⊢ ∀ (i : ι), ↑1 = ↑1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\n⊢ ∀ (i : ι), ↑(f i) 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\n⊢ ∀ (x y : { x // x ∈ T }),\n    OneHom.toFun\n        {\n          toFun :=\n            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n              (_ :\n                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n          map_one' :=\n            (_ :\n              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                  (_ :\n                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                1) }\n        (x * y) =\n      OneHom.toFun\n          {\n            toFun :=\n              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                (_ :\n                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n            map_one' :=\n              (_ :\n                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                    (_ :\n                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                  1) }\n          x *\n        OneHom.toFun\n          {\n            toFun :=\n              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                (_ :\n                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n            map_one' :=\n              (_ :\n                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                    (_ :\n                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                  1) }\n          y\n[PROOFSTEP]\nsubst hT\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (x y : { x // x ∈ iSup K }),\n    OneHom.toFun\n        {\n          toFun :=\n            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n              (_ :\n                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n          map_one' :=\n            (_ :\n              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                  (_ :\n                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                1) }\n        (x * y) =\n      OneHom.toFun\n          {\n            toFun :=\n              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                (_ :\n                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n            map_one' :=\n              (_ :\n                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                    (_ :\n                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                  1) }\n          x *\n        OneHom.toFun\n          {\n            toFun :=\n              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                (_ :\n                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n            map_one' :=\n              (_ :\n                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                    (_ :\n                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                  1) }\n          y\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (x y : { x // x ∈ iSup K }),\n    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n        (_ :\n          ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n            ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (x * y) =\n      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n          (_ :\n            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x *\n        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n          (_ :\n            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) y\n[PROOFSTEP]\napply Set.iUnionLift_binary (coe_iSup_of_directed dir) dir _ (fun _ => (· * ·))\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x * y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x * Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x * y) = ↑(f i) x * ↑(f i) y\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\non_goal 3 => rw [coe_iSup_of_directed dir]\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x * y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x * Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x * y) = ↑(f i) x * ↑(f i) y\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\non_goal 3 => rw [coe_iSup_of_directed dir]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\nrw [coe_iSup_of_directed dir]\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x * y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x * Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x * y) = ↑(f i) x * ↑(f i) y\n[PROOFSTEP]\nall_goals simp\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x * y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x * Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x * y) = ↑(f i) x * ↑(f i) y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            {\n              toFun :=\n                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                  (_ :\n                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n              map_one' :=\n                (_ :\n                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                      (_ :\n                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                    1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : { x // x ∈ T }),\n                OneHom.toFun\n                    {\n                      toFun :=\n                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                          (_ :\n                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                          ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                      map_one' :=\n                        (_ :\n                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                            1) }\n                    (x * y) =\n                  OneHom.toFun\n                      {\n                        toFun :=\n                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                            (_ :\n                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                        map_one' :=\n                          (_ :\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                              1) }\n                      x *\n                    OneHom.toFun\n                      {\n                        toFun :=\n                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                            (_ :\n                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                        map_one' :=\n                          (_ :\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                              1) }\n                      y) })\n      0 =\n    0\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\n⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n      (_ :\n        ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n          ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 0 =\n    0\n[PROOFSTEP]\napply Set.iUnionLift_const _ (fun _ => 0)\n[GOAL]\ncase hci\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\n⊢ ∀ (i : ι), ↑0 = ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\n⊢ ∀ (i : ι), ↑(f i) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\n⊢ ∀ (x y : { x // x ∈ T }),\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              {\n                toFun :=\n                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                    (_ :\n                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                map_one' :=\n                  (_ :\n                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                        (_ :\n                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                        ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                      1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : { x // x ∈ T }),\n                  OneHom.toFun\n                      {\n                        toFun :=\n                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                            (_ :\n                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                        map_one' :=\n                          (_ :\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                              1) }\n                      (x * y) =\n                    OneHom.toFun\n                        {\n                          toFun :=\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                          map_one' :=\n                            (_ :\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                1) }\n                        x *\n                      OneHom.toFun\n                        {\n                          toFun :=\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                          map_one' :=\n                            (_ :\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                1) }\n                        y) })\n        (x + y) =\n      OneHom.toFun\n          (↑{\n              toOneHom :=\n                {\n                  toFun :=\n                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                      (_ :\n                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                  map_one' :=\n                    (_ :\n                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                          (_ :\n                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                          ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : { x // x ∈ T }),\n                    OneHom.toFun\n                        {\n                          toFun :=\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                          map_one' :=\n                            (_ :\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_one' :=\n                              (_ :\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_one' :=\n                              (_ :\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                  1) }\n                          y) })\n          x +\n        OneHom.toFun\n          (↑{\n              toOneHom :=\n                {\n                  toFun :=\n                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                      (_ :\n                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                  map_one' :=\n                    (_ :\n                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                          (_ :\n                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                          ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : { x // x ∈ T }),\n                    OneHom.toFun\n                        {\n                          toFun :=\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                          map_one' :=\n                            (_ :\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_one' :=\n                              (_ :\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_one' :=\n                              (_ :\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                  1) }\n                          y) })\n          y\n[PROOFSTEP]\nsubst hT\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (x y : { x // x ∈ iSup K }),\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              {\n                toFun :=\n                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                    (_ :\n                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                map_one' :=\n                  (_ :\n                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                        (_ :\n                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                      1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : { x // x ∈ iSup K }),\n                  OneHom.toFun\n                      {\n                        toFun :=\n                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                            (_ :\n                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                            ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                        map_one' :=\n                          (_ :\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                              1) }\n                      (x * y) =\n                    OneHom.toFun\n                        {\n                          toFun :=\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                          map_one' :=\n                            (_ :\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                1) }\n                        x *\n                      OneHom.toFun\n                        {\n                          toFun :=\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                          map_one' :=\n                            (_ :\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                1) }\n                        y) })\n        (x + y) =\n      OneHom.toFun\n          (↑{\n              toOneHom :=\n                {\n                  toFun :=\n                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                      (_ :\n                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                  map_one' :=\n                    (_ :\n                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                          (_ :\n                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : { x // x ∈ iSup K }),\n                    OneHom.toFun\n                        {\n                          toFun :=\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                          map_one' :=\n                            (_ :\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_one' :=\n                              (_ :\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_one' :=\n                              (_ :\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                  1) }\n                          y) })\n          x +\n        OneHom.toFun\n          (↑{\n              toOneHom :=\n                {\n                  toFun :=\n                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                      (_ :\n                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                  map_one' :=\n                    (_ :\n                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                          (_ :\n                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : { x // x ∈ iSup K }),\n                    OneHom.toFun\n                        {\n                          toFun :=\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                          map_one' :=\n                            (_ :\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_one' :=\n                              (_ :\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_one' :=\n                              (_ :\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                  1) }\n                          y) })\n          y\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (x y : { x // x ∈ iSup K }),\n    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n        (_ :\n          ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n            ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (x + y) =\n      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n          (_ :\n            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x +\n        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n          (_ :\n            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) y\n[PROOFSTEP]\napply Set.iUnionLift_binary (coe_iSup_of_directed dir) dir _ (fun _ => (· + ·))\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x + y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x + Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x + y) = ↑(f i) x + ↑(f i) y\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\non_goal 3 => rw [coe_iSup_of_directed dir]\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x + y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x + Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x + y) = ↑(f i) x + ↑(f i) y\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\non_goal 3 => rw [coe_iSup_of_directed dir]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\nrw [coe_iSup_of_directed dir]\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x + y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x + Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x + y) = ↑(f i) x + ↑(f i) y\n[PROOFSTEP]\nall_goals simp\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x + y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x + Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x + y) = ↑(f i) x + ↑(f i) y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\nr : R\n⊢ OneHom.toFun\n      (↑↑{\n            toMonoidHom :=\n              {\n                toOneHom :=\n                  {\n                    toFun :=\n                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                        (_ :\n                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                        ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                    map_one' :=\n                      (_ :\n                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                            (_ :\n                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                          1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : { x // x ∈ T }),\n                      OneHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_one' :=\n                              (_ :\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                  1) }\n                          (x * y) =\n                        OneHom.toFun\n                            {\n                              toFun :=\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                              map_one' :=\n                                (_ :\n                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                      (_ :\n                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                          (hxj : x ∈ (fun i => ↑(K i)) j),\n                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                    1) }\n                            x *\n                          OneHom.toFun\n                            {\n                              toFun :=\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                              map_one' :=\n                                (_ :\n                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                      (_ :\n                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                          (hxj : x ∈ (fun i => ↑(K i)) j),\n                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                    1) }\n                            y) },\n            map_zero' :=\n              (_ :\n                OneHom.toFun\n                    (↑{\n                        toOneHom :=\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_one' :=\n                              (_ :\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                  1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (x y : { x // x ∈ T }),\n                              OneHom.toFun\n                                  {\n                                    toFun :=\n                                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                        (_ :\n                                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                            (hxj : x ∈ (fun i => ↑(K i)) j),\n                                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                        ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                    map_one' :=\n                                      (_ :\n                                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                            (_ :\n                                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                          1) }\n                                  (x * y) =\n                                OneHom.toFun\n                                    {\n                                      toFun :=\n                                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                          (_ :\n                                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                              (hxj : x ∈ (fun i => ↑(K i)) j),\n                                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                          ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                      map_one' :=\n                                        (_ :\n                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                              (_ :\n                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                  (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                            1) }\n                                    x *\n                                  OneHom.toFun\n                                    {\n                                      toFun :=\n                                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                          (_ :\n                                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                              (hxj : x ∈ (fun i => ↑(K i)) j),\n                                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                          ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                      map_one' :=\n                                        (_ :\n                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                              (_ :\n                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                  (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                            1) }\n                                    y) })\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (x y : { x // x ∈ T }),\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            {\n                              toFun :=\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                              map_one' :=\n                                (_ :\n                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                      (_ :\n                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                          (hxj : x ∈ (fun i => ↑(K i)) j),\n                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                    1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (x y : { x // x ∈ T }),\n                                OneHom.toFun\n                                    {\n                                      toFun :=\n                                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                          (_ :\n                                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                              (hxj : x ∈ (fun i => ↑(K i)) j),\n                                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                          ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                      map_one' :=\n                                        (_ :\n                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                              (_ :\n                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                  (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                            1) }\n                                    (x * y) =\n                                  OneHom.toFun\n                                      {\n                                        toFun :=\n                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                            (_ :\n                                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                        map_one' :=\n                                          (_ :\n                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                                (_ :\n                                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                    (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                              1) }\n                                      x *\n                                    OneHom.toFun\n                                      {\n                                        toFun :=\n                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                            (_ :\n                                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                        map_one' :=\n                                          (_ :\n                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                                (_ :\n                                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                    (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                              1) }\n                                      y) })\n                      (x + y) =\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              {\n                                toFun :=\n                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                map_one' :=\n                                  (_ :\n                                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                        (_ :\n                                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                            (hxj : x ∈ (fun i => ↑(K i)) j),\n                                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                        ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                      1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : { x // x ∈ T }),\n                                  OneHom.toFun\n                                      {\n                                        toFun :=\n                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                            (_ :\n                                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                        map_one' :=\n                                          (_ :\n                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                                (_ :\n                                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                    (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                              1) }\n                                      (x * y) =\n                                    OneHom.toFun\n                                        {\n                                          toFun :=\n                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                              (_ :\n                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                  (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                          map_one' :=\n                                            (_ :\n                                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                                  (_ :\n                                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                      (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                                1) }\n                                        x *\n                                      OneHom.toFun\n                                        {\n                                          toFun :=\n                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                              (_ :\n                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                  (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                          map_one' :=\n                                            (_ :\n                                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                                  (_ :\n                                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                      (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                                1) }\n                                        y) })\n                        x +\n                      OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              {\n                                toFun :=\n                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                map_one' :=\n                                  (_ :\n                                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                        (_ :\n                                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                            (hxj : x ∈ (fun i => ↑(K i)) j),\n                                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                        ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                      1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : { x // x ∈ T }),\n                                  OneHom.toFun\n                                      {\n                                        toFun :=\n                                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                            (_ :\n                                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                            ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                        map_one' :=\n                                          (_ :\n                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                                (_ :\n                                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                    (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                                ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                              1) }\n                                      (x * y) =\n                                    OneHom.toFun\n                                        {\n                                          toFun :=\n                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                              (_ :\n                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                  (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                          map_one' :=\n                                            (_ :\n                                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                                  (_ :\n                                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                      (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                                1) }\n                                        x *\n                                      OneHom.toFun\n                                        {\n                                          toFun :=\n                                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                              (_ :\n                                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                  (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                              ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)),\n                                          map_one' :=\n                                            (_ :\n                                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                                  (_ :\n                                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                                      (hxj : x ∈ (fun i => ↑(K i)) j),\n                                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                                  ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) 1 =\n                                                1) }\n                                        y) })\n                        y) })\n      (↑(algebraMap R { x // x ∈ T }) r) =\n    ↑(algebraMap R B) r\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\nr : R\n⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n      (_ :\n        ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n          ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) (↑(algebraMap R { x // x ∈ T }) r) =\n    ↑(algebraMap R B) r\n[PROOFSTEP]\napply Set.iUnionLift_const _ (fun _ => algebraMap R _ r)\n[GOAL]\ncase hci\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\nr : R\n⊢ ∀ (i : ι), ↑(↑(algebraMap R ↑↑(K i)) r) = ↑(↑(algebraMap R { x // x ∈ T }) r)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\nr : R\n⊢ ∀ (i : ι), ↑(f i) (↑(algebraMap R ↑↑(K i)) r) = ↑(algebraMap R B) r\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\ni : ι\nx : { x // x ∈ K i }\nh : K i ≤ T\n⊢ ↑(iSupLift K dir f hf T hT) (↑(inclusion h) x) = ↑(f i) x\n[PROOFSTEP]\ndsimp [iSupLift, inclusion]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\ni : ι\nx : { x // x ∈ K i }\nh : K i ≤ T\n⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n      (_ :\n        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n          (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj })\n      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) (Set.inclusion h x) =\n    ↑(f i) x\n[PROOFSTEP]\nrw [Set.iUnionLift_inclusion]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\ni : ι\nh : K i ≤ T\n⊢ AlgHom.comp (iSupLift K dir f hf T hT) (inclusion h) = f i\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\ni : ι\nh : K i ≤ T\nx✝ : { x // x ∈ K i }\n⊢ ↑(AlgHom.comp (iSupLift K dir f hf T hT) (inclusion h)) x✝ = ↑(f i) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\ni : ι\nx : { x // x ∈ K i }\nhx : ↑x ∈ T\n⊢ ↑(iSupLift K dir f hf T hT) { val := ↑x, property := hx } = ↑(f i) x\n[PROOFSTEP]\ndsimp [iSupLift, inclusion]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\ni : ι\nx : { x // x ∈ K i }\nhx : ↑x ∈ T\n⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n      (_ :\n        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n          (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj })\n      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) { val := ↑x, property := hx } =\n    ↑(f i) x\n[PROOFSTEP]\nrw [Set.iUnionLift_mk]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\ni : ι\nx : { x // x ∈ T }\nhx : ↑x ∈ K i\n⊢ ↑(iSupLift K dir f hf T hT) x = ↑(f i) { val := ↑x, property := hx }\n[PROOFSTEP]\ndsimp [iSupLift, inclusion]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\nS : Subalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → Subalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)\nT : Subalgebra R A\nhT : T = iSup K\ni : ι\nx : { x // x ∈ T }\nhx : ↑x ∈ K i\n⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n      (_ :\n        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n          (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj })\n      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) x =\n    ↑(f i) { val := ↑x, property := hx }\n[PROOFSTEP]\nrw [Set.iUnionLift_of_mem]\n[GOAL]\nR✝ : Type u\nA✝ : Type v\nB : Type w\ninst✝⁷ : CommSemiring R✝\ninst✝⁶ : Semiring A✝\ninst✝⁵ : Algebra R✝ A✝\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R✝ B\nS✝ : Subalgebra R✝ A✝\nα : Type u_1\nβ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\nS : Subalgebra R A\n⊢ RingHom.rangeS (algebraMap { x // x ∈ S } A) = S.toSubsemiring\n[PROOFSTEP]\nrw [algebraMap_eq, Algebra.id.map_eq_id, RingHom.id_comp, ← toSubsemiring_subtype, Subsemiring.rangeS_subtype]\n[GOAL]\nR✝ : Type u\nA✝ : Type v\nB : Type w\ninst✝⁷ : CommSemiring R✝\ninst✝⁶ : Semiring A✝\ninst✝⁵ : Algebra R✝ A✝\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R✝ B\nS✝ : Subalgebra R✝ A✝\nα : Type u_1\nβ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝² : CommRing R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nS : Subalgebra R A\n⊢ RingHom.range (algebraMap { x // x ∈ S } A) = toSubring S\n[PROOFSTEP]\nrw [algebraMap_eq, Algebra.id.map_eq_id, RingHom.id_comp, ← toSubring_subtype, Subring.range_subtype]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nr : R\n⊢ ↑(algebraMap R A) r ∈ Set.center A\n[PROOFSTEP]\nsimp [Algebra.commutes, Set.mem_center_iff]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\nH : ∀ (i : ι), ∃ n, s i ^ n • x ∈ S'\n⊢ x ∈ S'\n[PROOFSTEP]\nlet _i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id _\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\nH : ∀ (i : ι), ∃ n, s i ^ n • x ∈ S'\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\n⊢ x ∈ S'\n[PROOFSTEP]\nsuffices x ∈ Subalgebra.toSubmodule (Algebra.ofId S' S).range\n  by\n  obtain ⟨x, rfl⟩ := this\n  exact x.2\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\nH : ∀ (i : ι), ∃ n, s i ^ n • x ∈ S'\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nthis : x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n⊢ x ∈ S'\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ := this\n[GOAL]\ncase intro\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nx : { x // x ∈ S' }\nH : ∀ (i : ι), ∃ n, s i ^ n • ↑↑(ofId { x // x ∈ S' } S) x ∈ S'\n⊢ ↑↑(ofId { x // x ∈ S' } S) x ∈ S'\n[PROOFSTEP]\nexact x.2\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\nH : ∀ (i : ι), ∃ n, s i ^ n • x ∈ S'\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\n⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\nchoose n hn using H\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\n⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\nlet s' : ι → S' := fun x => ⟨s x, hs x⟩\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\n⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\nlet l' : ι → S' := fun x => ⟨l x, hl x⟩\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\n⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\nhave e' : ∑ i in ι', l' i * s' i = 1 := by\n  ext\n  show S'.subtype (∑ i in ι', l' i * s' i) = 1\n  simpa only [map_sum, map_mul] using e\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\n⊢ ∑ i in ι', l' i * s' i = 1\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\n⊢ ↑(∑ i in ι', l' i * s' i) = ↑1\n[PROOFSTEP]\nshow S'.subtype (∑ i in ι', l' i * s' i) = 1\n[GOAL]\ncase a\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\n⊢ ↑(Subsemiring.subtype S'.toSubsemiring) (∑ i in ι', l' i * s' i) = 1\n[PROOFSTEP]\nsimpa only [map_sum, map_mul] using e\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\n⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\nhave : Ideal.span (s' '' ι') = ⊤ := by\n  rw [Ideal.eq_top_iff_one, ← e']\n  apply sum_mem\n  intros i hi\n  exact Ideal.mul_mem_left _ _ <| Ideal.subset_span <| Set.mem_image_of_mem s' hi\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\n⊢ Ideal.span (s' '' ↑ι') = ⊤\n[PROOFSTEP]\nrw [Ideal.eq_top_iff_one, ← e']\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\n⊢ ∑ i in ι', l' i * s' i ∈ Ideal.span (s' '' ↑ι')\n[PROOFSTEP]\napply sum_mem\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\n⊢ ∀ (c : ι), c ∈ ι' → l' c * s' c ∈ Ideal.span (s' '' ↑ι')\n[PROOFSTEP]\nintros i hi\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\ni : ι\nhi : i ∈ ι'\n⊢ l' i * s' i ∈ Ideal.span (s' '' ↑ι')\n[PROOFSTEP]\nexact Ideal.mul_mem_left _ _ <| Ideal.subset_span <| Set.mem_image_of_mem s' hi\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\nthis : Ideal.span (s' '' ↑ι') = ⊤\n⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\nlet N := ι'.sup n\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\nthis : Ideal.span (s' '' ↑ι') = ⊤\nN : ℕ := Finset.sup ι' n\n⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\nhave hN := Ideal.span_pow_eq_top _ this N\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\nthis : Ideal.span (s' '' ↑ι') = ⊤\nN : ℕ := Finset.sup ι' n\nhN : Ideal.span ((fun x => x ^ N) '' (s' '' ↑ι')) = ⊤\n⊢ x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\napply (Algebra.ofId S' S).range.toSubmodule.mem_of_span_top_of_smul_mem _ hN\n[GOAL]\ncase H\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\nthis : Ideal.span (s' '' ↑ι') = ⊤\nN : ℕ := Finset.sup ι' n\nhN : Ideal.span ((fun x => x ^ N) '' (s' '' ↑ι')) = ⊤\n⊢ ∀ (r : ↑((fun x => x ^ N) '' (s' '' ↑ι'))), ↑r • x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\nrintro ⟨_, _, ⟨i, hi, rfl⟩, rfl⟩\n[GOAL]\ncase H.mk.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\nthis : Ideal.span (s' '' ↑ι') = ⊤\nN : ℕ := Finset.sup ι' n\nhN : Ideal.span ((fun x => x ^ N) '' (s' '' ↑ι')) = ⊤\ni : ι\nhi : i ∈ ↑ι'\n⊢ ↑{ val := (fun x => x ^ N) (s' i),\n          property := (_ : ∃ a, a ∈ s' '' ↑ι' ∧ (fun x => x ^ N) a = (fun x => x ^ N) (s' i)) } •\n      x ∈\n    ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\nchange s' i ^ N • x ∈ _\n[GOAL]\ncase H.mk.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\nthis : Ideal.span (s' '' ↑ι') = ⊤\nN : ℕ := Finset.sup ι' n\nhN : Ideal.span ((fun x => x ^ N) '' (s' '' ↑ι')) = ⊤\ni : ι\nhi : i ∈ ↑ι'\n⊢ s' i ^ N • x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le (show n i ≤ N from Finset.le_sup hi), pow_add, mul_smul]\n[GOAL]\ncase H.mk.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\nthis : Ideal.span (s' '' ↑ι') = ⊤\nN : ℕ := Finset.sup ι' n\nhN : Ideal.span ((fun x => x ^ N) '' (s' '' ↑ι')) = ⊤\ni : ι\nhi : i ∈ ↑ι'\n⊢ s' i ^ (N - n i) • s' i ^ n i • x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\nrefine' Submodule.smul_mem _ (⟨_, pow_mem (hs i) _⟩ : S') _\n[GOAL]\ncase H.mk.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\nS✝ : Subalgebra R A\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nS' : Subalgebra R S\nι : Type u_2\nι' : Finset ι\ns l : ι → S\ne : ∑ i in ι', l i * s i = 1\nhs : ∀ (i : ι), s i ∈ S'\nhl : ∀ (i : ι), l i ∈ S'\nx : S\n_i : Algebra { x // x ∈ S' } { x // x ∈ S' } := Algebra.id { x // x ∈ S' }\nn : ι → ℕ\nhn : ∀ (i : ι), s i ^ n i • x ∈ S'\ns' : ι → { x // x ∈ S' } := fun x => { val := s x, property := (_ : s x ∈ S') }\nl' : ι → { x // x ∈ S' } := fun x => { val := l x, property := (_ : l x ∈ S') }\ne' : ∑ i in ι', l' i * s' i = 1\nthis : Ideal.span (s' '' ↑ι') = ⊤\nN : ℕ := Finset.sup ι' n\nhN : Ideal.span ((fun x => x ^ N) '' (s' '' ↑ι')) = ⊤\ni : ι\nhi : i ∈ ↑ι'\n⊢ s' i ^ n i • x ∈ ↑toSubmodule (AlgHom.range (ofId { x // x ∈ S' } S))\n[PROOFSTEP]\nexact ⟨⟨_, hn i⟩, rfl⟩\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nS : Subring R\ni : ℤ\n⊢ ↑(algebraMap ℤ R) 0 ∈ S.carrier\n[PROOFSTEP]\nsimpa using S.zero_mem\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nS : Subring R\ni✝ : ℤ\ni : ℕ\nih : ↑(algebraMap ℤ R) ↑i ∈ S.carrier\n⊢ ↑(algebraMap ℤ R) (↑i + 1) ∈ S.carrier\n[PROOFSTEP]\nsimpa using S.add_mem ih S.one_mem\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nS : Subring R\ni✝ : ℤ\ni : ℕ\nih : ↑(algebraMap ℤ R) (-↑i) ∈ S.carrier\n⊢ ↑(-↑i - 1) ∈ S\n[PROOFSTEP]\nrw [Int.cast_sub, Int.cast_one]\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nS : Subring R\ni✝ : ℤ\ni : ℕ\nih : ↑(algebraMap ℤ R) (-↑i) ∈ S.carrier\n⊢ ↑(-↑i) - 1 ∈ S\n[PROOFSTEP]\nexact S.sub_mem ih S.one_mem\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Algebra.Subalgebra.Basic", "llama_tokens": 60933, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757645879592642, "lm_q2_score": 0.5774953651858117, "lm_q1q2_score": 0.3902509175031748}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type ?u.2132\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\nhs : MeasurableSet s\n⊢ ↑↑count s = ∑' (i : ↑s), 1\n[PROOFSTEP]\nsimp only [count, sum_apply, hs, dirac_apply', ← tsum_subtype s (1 : α → ℝ≥0∞), Pi.one_apply]\n[GOAL]\nα : Type u_1\nβ : Type ?u.3143\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\n⊢ ↑↑count ∅ = 0\n[PROOFSTEP]\nrw [count_apply MeasurableSet.empty, tsum_empty]\n[GOAL]\nα : Type u_1\nβ : Type ?u.3931\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns✝ : Set α\ns : Finset α\ns_mble : MeasurableSet ↑s\n⊢ ∑ i in s, 1 = ↑(Finset.card s)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type ?u.7325\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns✝ s : Set α\ns_fin : Set.Finite s\ns_mble : MeasurableSet s\n⊢ ↑↑count s = ↑(Finset.card (Finite.toFinset s_fin))\n[PROOFSTEP]\nsimp [← @count_apply_finset' _ _ s_fin.toFinset (by simpa only [Finite.coe_toFinset] using s_mble)]\n[GOAL]\nα : Type u_1\nβ : Type ?u.7325\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns✝ s : Set α\ns_fin : Set.Finite s\ns_mble : MeasurableSet s\n⊢ MeasurableSet ↑(Finite.toFinset s_fin)\n[PROOFSTEP]\nsimpa only [Finite.coe_toFinset] using s_mble\n[GOAL]\nα : Type u_1\nβ : Type ?u.8457\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\ns✝ : Set α\ninst✝ : MeasurableSingletonClass α\ns : Set α\nhs : Set.Finite s\n⊢ ↑↑count s = ↑(Finset.card (Finite.toFinset hs))\n[PROOFSTEP]\nrw [← count_apply_finset, Finite.coe_toFinset]\n[GOAL]\nα : Type u_1\nβ : Type ?u.8764\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\nhs : Set.Infinite s\n⊢ ↑↑count s = ⊤\n[PROOFSTEP]\nrefine' top_unique (le_of_tendsto' ENNReal.tendsto_nat_nhds_top fun n => _)\n[GOAL]\nα : Type u_1\nβ : Type ?u.8764\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\nhs : Set.Infinite s\nn : ℕ\n⊢ ↑n ≤ ↑↑count s\n[PROOFSTEP]\nrcases hs.exists_subset_card_eq n with ⟨t, ht, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type ?u.8764\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\nhs : Set.Infinite s\nt : Finset α\nht : ↑t ⊆ s\n⊢ ↑(Finset.card t) ≤ ↑↑count s\n[PROOFSTEP]\ncalc\n  (t.card : ℝ≥0∞) = ∑ i in t, 1 := by simp\n  _ = ∑' i : (t : Set α), 1 := (t.tsum_subtype 1).symm\n  _ ≤ count (t : Set α) := le_count_apply\n  _ ≤ count s := measure_mono ht\n[GOAL]\nα : Type u_1\nβ : Type ?u.8764\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\nhs : Set.Infinite s\nt : Finset α\nht : ↑t ⊆ s\n⊢ ↑(Finset.card t) = ∑ i in t, 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type ?u.12614\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\ns_mble : MeasurableSet s\n⊢ ↑↑count s = ⊤ ↔ Set.Infinite s\n[PROOFSTEP]\nby_cases hs : s.Finite\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type ?u.12614\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\ns_mble : MeasurableSet s\nhs : Set.Finite s\n⊢ ↑↑count s = ⊤ ↔ Set.Infinite s\n[PROOFSTEP]\nsimp [Set.Infinite, hs, count_apply_finite' hs s_mble]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type ?u.12614\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\ns_mble : MeasurableSet s\nhs : ¬Set.Finite s\n⊢ ↑↑count s = ⊤ ↔ Set.Infinite s\n[PROOFSTEP]\nchange s.Infinite at hs \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type ?u.12614\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\ns_mble : MeasurableSet s\nhs : Set.Infinite s\n⊢ ↑↑count s = ⊤ ↔ Set.Infinite s\n[PROOFSTEP]\nsimp [hs, count_apply_infinite]\n[GOAL]\nα : Type u_1\nβ : Type ?u.13909\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\ns : Set α\ninst✝ : MeasurableSingletonClass α\n⊢ ↑↑count s = ⊤ ↔ Set.Infinite s\n[PROOFSTEP]\nby_cases hs : s.Finite\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type ?u.13909\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\ns : Set α\ninst✝ : MeasurableSingletonClass α\nhs : Set.Finite s\n⊢ ↑↑count s = ⊤ ↔ Set.Infinite s\n[PROOFSTEP]\nexact count_apply_eq_top' hs.measurableSet\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type ?u.13909\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\ns : Set α\ninst✝ : MeasurableSingletonClass α\nhs : ¬Set.Finite s\n⊢ ↑↑count s = ⊤ ↔ Set.Infinite s\n[PROOFSTEP]\nchange s.Infinite at hs \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type ?u.13909\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\ns : Set α\ninst✝ : MeasurableSingletonClass α\nhs : Set.Infinite s\n⊢ ↑↑count s = ⊤ ↔ Set.Infinite s\n[PROOFSTEP]\nsimp [hs, count_apply_infinite]\n[GOAL]\nα : Type u_1\nβ : Type ?u.16312\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\ns_mble : MeasurableSet s\nhsc : ↑↑count s = 0\n⊢ s = ∅\n[PROOFSTEP]\nhave hs : s.Finite := by\n  rw [← count_apply_lt_top' s_mble, hsc]\n  exact WithTop.zero_lt_top\n[GOAL]\nα : Type u_1\nβ : Type ?u.16312\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\ns_mble : MeasurableSet s\nhsc : ↑↑count s = 0\n⊢ Set.Finite s\n[PROOFSTEP]\nrw [← count_apply_lt_top' s_mble, hsc]\n[GOAL]\nα : Type u_1\nβ : Type ?u.16312\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\ns_mble : MeasurableSet s\nhsc : ↑↑count s = 0\n⊢ 0 < ⊤\n[PROOFSTEP]\nexact WithTop.zero_lt_top\n[GOAL]\nα : Type u_1\nβ : Type ?u.16312\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\ns_mble : MeasurableSet s\nhsc : ↑↑count s = 0\nhs : Set.Finite s\n⊢ s = ∅\n[PROOFSTEP]\nsimpa [count_apply_finite' hs s_mble] using hsc\n[GOAL]\nα : Type u_1\nβ : Type ?u.17964\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\ns : Set α\ninst✝ : MeasurableSingletonClass α\nhsc : ↑↑count s = 0\n⊢ s = ∅\n[PROOFSTEP]\nhave hs : s.Finite := by\n  rw [← count_apply_lt_top, hsc]\n  exact WithTop.zero_lt_top\n[GOAL]\nα : Type u_1\nβ : Type ?u.17964\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\ns : Set α\ninst✝ : MeasurableSingletonClass α\nhsc : ↑↑count s = 0\n⊢ Set.Finite s\n[PROOFSTEP]\nrw [← count_apply_lt_top, hsc]\n[GOAL]\nα : Type u_1\nβ : Type ?u.17964\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\ns : Set α\ninst✝ : MeasurableSingletonClass α\nhsc : ↑↑count s = 0\n⊢ 0 < ⊤\n[PROOFSTEP]\nexact WithTop.zero_lt_top\n[GOAL]\nα : Type u_1\nβ : Type ?u.17964\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\ns : Set α\ninst✝ : MeasurableSingletonClass α\nhsc : ↑↑count s = 0\nhs : Set.Finite s\n⊢ s = ∅\n[PROOFSTEP]\nsimpa [count_apply_finite _ hs] using hsc\n[GOAL]\nα : Type u_1\nβ : Type ?u.20387\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\nhs' : Set.Nonempty s\ns_mble : MeasurableSet s\n⊢ ↑↑count s ≠ 0\n[PROOFSTEP]\nrw [Ne.def, count_eq_zero_iff' s_mble]\n[GOAL]\nα : Type u_1\nβ : Type ?u.20387\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\nhs' : Set.Nonempty s\ns_mble : MeasurableSet s\n⊢ ¬s = ∅\n[PROOFSTEP]\nexact hs'.ne_empty\n[GOAL]\nα : Type u_1\nβ : Type ?u.20618\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\ns : Set α\ninst✝ : MeasurableSingletonClass α\nhs' : Set.Nonempty s\n⊢ ↑↑count s ≠ 0\n[PROOFSTEP]\nrw [Ne.def, count_eq_zero_iff]\n[GOAL]\nα : Type u_1\nβ : Type ?u.20618\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\ns : Set α\ninst✝ : MeasurableSingletonClass α\nhs' : Set.Nonempty s\n⊢ ¬s = ∅\n[PROOFSTEP]\nexact hs'.ne_empty\n[GOAL]\nα : Type u_1\nβ : Type ?u.20894\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\na : α\nha : MeasurableSet {a}\n⊢ ↑↑count {a} = 1\n[PROOFSTEP]\nrw [count_apply_finite' (Set.finite_singleton a) ha, Set.Finite.toFinset]\n[GOAL]\nα : Type u_1\nβ : Type ?u.20894\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns : Set α\na : α\nha : MeasurableSet {a}\n⊢ ↑(Finset.card (toFinset {a})) = 1\n[PROOFSTEP]\nsimp [@toFinset_card _ _ (Set.finite_singleton a).fintype, @Fintype.card_unique _ _ (Set.finite_singleton a).fintype]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns✝ : Set α\nf : β → α\nhf : Function.Injective f\ns : Set β\ns_mble : MeasurableSet s\nfs_mble : MeasurableSet (f '' s)\n⊢ ↑↑count (f '' s) = ↑↑count s\n[PROOFSTEP]\nby_cases hs : s.Finite\n[GOAL]\ncase pos\nα : Type u_2\nβ : Type u_1\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns✝ : Set α\nf : β → α\nhf : Function.Injective f\ns : Set β\ns_mble : MeasurableSet s\nfs_mble : MeasurableSet (f '' s)\nhs : Set.Finite s\n⊢ ↑↑count (f '' s) = ↑↑count s\n[PROOFSTEP]\nlift s to Finset β using hs\n[GOAL]\ncase pos.intro\nα : Type u_2\nβ : Type u_1\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns✝ : Set α\nf : β → α\nhf : Function.Injective f\ns : Finset β\ns_mble : MeasurableSet ↑s\nfs_mble : MeasurableSet (f '' ↑s)\n⊢ ↑↑count (f '' ↑s) = ↑↑count ↑s\n[PROOFSTEP]\nrw [← Finset.coe_image, count_apply_finset' _, count_apply_finset' s_mble, s.card_image_of_injective hf]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns✝ : Set α\nf : β → α\nhf : Function.Injective f\ns : Finset β\ns_mble : MeasurableSet ↑s\nfs_mble : MeasurableSet (f '' ↑s)\n⊢ MeasurableSet ↑(Finset.image f s)\n[PROOFSTEP]\nsimpa only [Finset.coe_image] using fs_mble\n[GOAL]\ncase neg\nα : Type u_2\nβ : Type u_1\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns✝ : Set α\nf : β → α\nhf : Function.Injective f\ns : Set β\ns_mble : MeasurableSet s\nfs_mble : MeasurableSet (f '' s)\nhs : ¬Set.Finite s\n⊢ ↑↑count (f '' s) = ↑↑count s\n[PROOFSTEP]\nrw [count_apply_infinite hs]\n[GOAL]\ncase neg\nα : Type u_2\nβ : Type u_1\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns✝ : Set α\nf : β → α\nhf : Function.Injective f\ns : Set β\ns_mble : MeasurableSet s\nfs_mble : MeasurableSet (f '' s)\nhs : ¬Set.Finite s\n⊢ ↑↑count (f '' s) = ⊤\n[PROOFSTEP]\nrw [← finite_image_iff <| hf.injOn _] at hs \n[GOAL]\ncase neg\nα : Type u_2\nβ : Type u_1\ninst✝¹ : MeasurableSpace α\ninst✝ : MeasurableSpace β\ns✝ : Set α\nf : β → α\nhf : Function.Injective f\ns : Set β\ns_mble : MeasurableSet s\nfs_mble : MeasurableSet (f '' s)\nhs : ¬Set.Finite (f '' s)\n⊢ ↑↑count (f '' s) = ⊤\n[PROOFSTEP]\nrw [count_apply_infinite hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ns✝ : Set α\ninst✝¹ : MeasurableSingletonClass α\ninst✝ : MeasurableSingletonClass β\nf : β → α\nhf : Function.Injective f\ns : Set β\n⊢ ↑↑count (f '' s) = ↑↑count s\n[PROOFSTEP]\nby_cases hs : s.Finite\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ns✝ : Set α\ninst✝¹ : MeasurableSingletonClass α\ninst✝ : MeasurableSingletonClass β\nf : β → α\nhf : Function.Injective f\ns : Set β\nhs : Set.Finite s\n⊢ ↑↑count (f '' s) = ↑↑count s\n[PROOFSTEP]\nexact count_injective_image' hf hs.measurableSet (Finite.image f hs).measurableSet\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ns✝ : Set α\ninst✝¹ : MeasurableSingletonClass α\ninst✝ : MeasurableSingletonClass β\nf : β → α\nhf : Function.Injective f\ns : Set β\nhs : ¬Set.Finite s\n⊢ ↑↑count (f '' s) = ↑↑count s\n[PROOFSTEP]\nrw [count_apply_infinite hs]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ns✝ : Set α\ninst✝¹ : MeasurableSingletonClass α\ninst✝ : MeasurableSingletonClass β\nf : β → α\nhf : Function.Injective f\ns : Set β\nhs : ¬Set.Finite s\n⊢ ↑↑count (f '' s) = ⊤\n[PROOFSTEP]\nrw [← finite_image_iff <| hf.injOn _] at hs \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ns✝ : Set α\ninst✝¹ : MeasurableSingletonClass α\ninst✝ : MeasurableSingletonClass β\nf : β → α\nhf : Function.Injective f\ns : Set β\nhs : ¬Set.Finite (f '' s)\n⊢ ↑↑count (f '' s) = ⊤\n[PROOFSTEP]\nrw [count_apply_infinite hs]\n[GOAL]\nα : Type ?u.24262\nβ : Type ?u.24265\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ns : Set α\ninst✝¹ : Finite α\ninst✝ : MeasurableSpace α\n⊢ ↑↑count univ < ⊤\n[PROOFSTEP]\ncases nonempty_fintype α\n[GOAL]\ncase intro\nα : Type ?u.24262\nβ : Type ?u.24265\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ns : Set α\ninst✝¹ : Finite α\ninst✝ : MeasurableSpace α\nval✝ : Fintype α\n⊢ ↑↑count univ < ⊤\n[PROOFSTEP]\nsimpa [Measure.count_apply, tsum_fintype] using (ENNReal.nat_ne_top _).lt_top\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.Count", "llama_tokens": 5818, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757645879592641, "lm_q2_score": 0.5774953651858117, "lm_q1q2_score": 0.39025091750317475}}
{"text": "[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX✝ X : T\nU V : Over X\nf g : U ⟶ V\nh : f.left = g.left\n⊢ f = g\n[PROOFSTEP]\nlet ⟨_, b, _⟩ := f\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX✝ X : T\nU V : Over X\nf g : U ⟶ V\nleft✝ : U.left ⟶ V.left\nb : U.right ⟶ V.right\nw✝ : (𝟭 T).map left✝ ≫ V.hom = U.hom ≫ (Functor.fromPUnit X).map b\nh : (CommaMorphism.mk left✝ b).left = g.left\n⊢ CommaMorphism.mk left✝ b = g\n[PROOFSTEP]\nlet ⟨_, e, _⟩ := g\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX✝ X : T\nU V : Over X\nf g : U ⟶ V\nleft✝¹ : U.left ⟶ V.left\nb : U.right ⟶ V.right\nw✝¹ : (𝟭 T).map left✝¹ ≫ V.hom = U.hom ≫ (Functor.fromPUnit X).map b\nleft✝ : U.left ⟶ V.left\ne : U.right ⟶ V.right\nw✝ : (𝟭 T).map left✝ ≫ V.hom = U.hom ≫ (Functor.fromPUnit X).map e\nh : (CommaMorphism.mk left✝¹ b).left = (CommaMorphism.mk left✝ e).left\n⊢ CommaMorphism.mk left✝¹ b = CommaMorphism.mk left✝ e\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_right\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX✝ X : T\nU V : Over X\nf g : U ⟶ V\nleft✝¹ : U.left ⟶ V.left\nb : U.right ⟶ V.right\nw✝¹ : (𝟭 T).map left✝¹ ≫ V.hom = U.hom ≫ (Functor.fromPUnit X).map b\nleft✝ : U.left ⟶ V.left\ne : U.right ⟶ V.right\nw✝ : (𝟭 T).map left✝ ≫ V.hom = U.hom ≫ (Functor.fromPUnit X).map e\nh : (CommaMorphism.mk left✝¹ b).left = (CommaMorphism.mk left✝ e).left\n⊢ b = e\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nU : Over X\n⊢ U.right = { as := PUnit.unit }\n[PROOFSTEP]\nsimp only\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nA B : Over X\nf : A ⟶ B\n⊢ f.left ≫ B.hom = A.hom\n[PROOFSTEP]\nhave := f.w\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nA B : Over X\nf : A ⟶ B\nthis : (𝟭 T).map f.left ≫ B.hom = A.hom ≫ (Functor.fromPUnit X).map f.right\n⊢ f.left ≫ B.hom = A.hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Over X\nf : Y ⟶ Z\nt : IsIso ((forget X).map f)\n⊢ IsIso f\n[PROOFSTEP]\nlet g : Z ⟶ Y := Over.homMk (inv ((forget X).map f)) ((asIso ((forget X).map f)).inv_comp_eq.2 (Over.w f).symm)\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Over X\nf : Y ⟶ Z\nt : IsIso ((forget X).map f)\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ IsIso f\n[PROOFSTEP]\ndsimp [forget] at t \n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Over X\nf : Y ⟶ Z\nt : IsIso f.left\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ IsIso f\n[PROOFSTEP]\nrefine ⟨⟨g, ⟨?_, ?_⟩⟩⟩\n[GOAL]\ncase refine_1\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Over X\nf : Y ⟶ Z\nt : IsIso f.left\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ f ≫ g = 𝟙 Y\ncase refine_2\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Over X\nf : Y ⟶ Z\nt : IsIso f.left\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ g ≫ f = 𝟙 Z\n[PROOFSTEP]\nrepeat (ext; simp)\n[GOAL]\ncase refine_1\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Over X\nf : Y ⟶ Z\nt : IsIso f.left\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ f ≫ g = 𝟙 Y\ncase refine_2\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Over X\nf : Y ⟶ Z\nt : IsIso f.left\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ g ≫ f = 𝟙 Z\n[PROOFSTEP]\next\n[GOAL]\ncase refine_1.h\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Over X\nf : Y ⟶ Z\nt : IsIso f.left\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ (f ≫ g).left = (𝟙 Y).left\ncase refine_2\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Over X\nf : Y ⟶ Z\nt : IsIso f.left\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ g ≫ f = 𝟙 Z\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_2\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Over X\nf : Y ⟶ Z\nt : IsIso f.left\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ g ≫ f = 𝟙 Z\n[PROOFSTEP]\next\n[GOAL]\ncase refine_2.h\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Over X\nf : Y ⟶ Z\nt : IsIso f.left\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ (g ≫ f).left = (𝟙 Z).left\n[PROOFSTEP]\nsimp\n[GOAL]\n\n[PROOFSTEP]\next\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Over X\nk : f ⟶ g\ninst✝ : Mono k\n⊢ Mono k.left\n[PROOFSTEP]\nrefine' ⟨fun {Y : T} l m a => _⟩\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Over X\nk : f ⟶ g\ninst✝ : Mono k\nY : T\nl m : Y ⟶ f.left\na : l ≫ k.left = m ≫ k.left\n⊢ l = m\n[PROOFSTEP]\nlet l' : mk (m ≫ f.hom) ⟶ f :=\n  homMk l (by dsimp; rw [← Over.w k, ← Category.assoc, congrArg (· ≫ g.hom) a, Category.assoc])\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Over X\nk : f ⟶ g\ninst✝ : Mono k\nY : T\nl m : Y ⟶ f.left\na : l ≫ k.left = m ≫ k.left\n⊢ l ≫ f.hom = (mk (m ≫ f.hom)).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Over X\nk : f ⟶ g\ninst✝ : Mono k\nY : T\nl m : Y ⟶ f.left\na : l ≫ k.left = m ≫ k.left\n⊢ l ≫ f.hom = m ≫ f.hom\n[PROOFSTEP]\nrw [← Over.w k, ← Category.assoc, congrArg (· ≫ g.hom) a, Category.assoc]\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Over X\nk : f ⟶ g\ninst✝ : Mono k\nY : T\nl m : Y ⟶ f.left\na : l ≫ k.left = m ≫ k.left\nl' : mk (m ≫ f.hom) ⟶ f := homMk l\n⊢ l = m\n[PROOFSTEP]\nsuffices l' = (homMk m : mk (m ≫ f.hom) ⟶ f) by apply congrArg CommaMorphism.left this\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Over X\nk : f ⟶ g\ninst✝ : Mono k\nY : T\nl m : Y ⟶ f.left\na : l ≫ k.left = m ≫ k.left\nl' : mk (m ≫ f.hom) ⟶ f := homMk l\nthis : l' = homMk m\n⊢ l = m\n[PROOFSTEP]\napply congrArg CommaMorphism.left this\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Over X\nk : f ⟶ g\ninst✝ : Mono k\nY : T\nl m : Y ⟶ f.left\na : l ≫ k.left = m ≫ k.left\nl' : mk (m ≫ f.hom) ⟶ f := homMk l\n⊢ l' = homMk m\n[PROOFSTEP]\nrw [← cancel_mono k]\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Over X\nk : f ⟶ g\ninst✝ : Mono k\nY : T\nl m : Y ⟶ f.left\na : l ≫ k.left = m ≫ k.left\nl' : mk (m ≫ f.hom) ⟶ f := homMk l\n⊢ l' ≫ k = homMk m ≫ k\n[PROOFSTEP]\next\n[GOAL]\ncase h\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Over X\nk : f ⟶ g\ninst✝ : Mono k\nY : T\nl m : Y ⟶ f.left\na : l ≫ k.left = m ≫ k.left\nl' : mk (m ≫ f.hom) ⟶ f := homMk l\n⊢ (l' ≫ k).left = (homMk m ≫ k).left\n[PROOFSTEP]\napply a\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nf : Over X\nX✝ Y✝ : Over f\nκ : X✝ ⟶ Y✝\n⊢ κ.left.left ≫ ((fun α => mk α.hom.left) Y✝).hom = ((fun α => mk α.hom.left) X✝).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nf : Over X\nX✝ Y✝ : Over f\nκ : X✝ ⟶ Y✝\n⊢ κ.left.left ≫ Y✝.hom.left = X✝.hom.left\n[PROOFSTEP]\nrw [← Over.w κ]\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nf : Over X\nX✝ Y✝ : Over f\nκ : X✝ ⟶ Y✝\n⊢ κ.left.left ≫ Y✝.hom.left = (κ.left ≫ Y✝.hom).left\n[PROOFSTEP]\nrfl\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : T ⥤ D\nX✝ Y✝ : Over X\nf : X✝ ⟶ Y✝\n⊢ F.map f.left ≫ ((fun Y => mk (F.map Y.hom)) Y✝).hom = ((fun Y => mk (F.map Y.hom)) X✝).hom\n[PROOFSTEP]\naesop_cat_nonterminal\n[GOAL]\nT : Type u₁\ninst : Category.{v₁, u₁} T\nX : T\nD : Type u₂\ninst_1 : Category.{v₂, u₂} D\nF : T ⥤ D\nX_1 Y : Over X\nf : X_1 ⟶ Y\n⊢ F.map f.left ≫ F.map Y.hom = F.map X_1.hom\n[PROOFSTEP]\nerw [← F.map_comp, w]\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX✝ X : T\nU V : Under X\nf g : U ⟶ V\nh : f.right = g.right\n⊢ f = g\n[PROOFSTEP]\nlet ⟨_, b, _⟩ := f\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX✝ X : T\nU V : Under X\nf g : U ⟶ V\nleft✝ : U.left ⟶ V.left\nb : U.right ⟶ V.right\nw✝ : (Functor.fromPUnit X).map left✝ ≫ V.hom = U.hom ≫ (𝟭 T).map b\nh : (CommaMorphism.mk left✝ b).right = g.right\n⊢ CommaMorphism.mk left✝ b = g\n[PROOFSTEP]\nlet ⟨_, e, _⟩ := g\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX✝ X : T\nU V : Under X\nf g : U ⟶ V\nleft✝¹ : U.left ⟶ V.left\nb : U.right ⟶ V.right\nw✝¹ : (Functor.fromPUnit X).map left✝¹ ≫ V.hom = U.hom ≫ (𝟭 T).map b\nleft✝ : U.left ⟶ V.left\ne : U.right ⟶ V.right\nw✝ : (Functor.fromPUnit X).map left✝ ≫ V.hom = U.hom ≫ (𝟭 T).map e\nh : (CommaMorphism.mk left✝¹ b).right = (CommaMorphism.mk left✝ e).right\n⊢ CommaMorphism.mk left✝¹ b = CommaMorphism.mk left✝ e\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_left\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX✝ X : T\nU V : Under X\nf g : U ⟶ V\nleft✝¹ : U.left ⟶ V.left\nb : U.right ⟶ V.right\nw✝¹ : (Functor.fromPUnit X).map left✝¹ ≫ V.hom = U.hom ≫ (𝟭 T).map b\nleft✝ : U.left ⟶ V.left\ne : U.right ⟶ V.right\nw✝ : (Functor.fromPUnit X).map left✝ ≫ V.hom = U.hom ≫ (𝟭 T).map e\nh : (CommaMorphism.mk left✝¹ b).right = (CommaMorphism.mk left✝ e).right\n⊢ left✝¹ = left✝\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nU : Under X\n⊢ U.left = { as := PUnit.unit }\n[PROOFSTEP]\nsimp only\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nA B : Under X\nf : A ⟶ B\n⊢ A.hom ≫ f.right = B.hom\n[PROOFSTEP]\nhave := f.w\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nA B : Under X\nf : A ⟶ B\nthis : (Functor.fromPUnit X).map f.left ≫ B.hom = A.hom ≫ (𝟭 T).map f.right\n⊢ A.hom ≫ f.right = B.hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Under X\nf : Y ⟶ Z\nt : IsIso ((forget X).map f)\n⊢ IsIso f\n[PROOFSTEP]\nlet g : Z ⟶ Y := Under.homMk (inv ((Under.forget X).map f)) ((IsIso.comp_inv_eq _).2 (Under.w f).symm)\n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Under X\nf : Y ⟶ Z\nt : IsIso ((forget X).map f)\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ IsIso f\n[PROOFSTEP]\ndsimp [forget] at t \n[GOAL]\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Under X\nf : Y ⟶ Z\nt : IsIso f.right\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ IsIso f\n[PROOFSTEP]\nrefine ⟨⟨g, ⟨?_, ?_⟩⟩⟩\n[GOAL]\ncase refine_1\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Under X\nf : Y ⟶ Z\nt : IsIso f.right\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ f ≫ g = 𝟙 Y\ncase refine_2\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Under X\nf : Y ⟶ Z\nt : IsIso f.right\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ g ≫ f = 𝟙 Z\n[PROOFSTEP]\nrepeat (ext; simp)\n[GOAL]\ncase refine_1\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Under X\nf : Y ⟶ Z\nt : IsIso f.right\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ f ≫ g = 𝟙 Y\ncase refine_2\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Under X\nf : Y ⟶ Z\nt : IsIso f.right\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ g ≫ f = 𝟙 Z\n[PROOFSTEP]\next\n[GOAL]\ncase refine_1.h\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Under X\nf : Y ⟶ Z\nt : IsIso f.right\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ (f ≫ g).right = (𝟙 Y).right\ncase refine_2\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Under X\nf : Y ⟶ Z\nt : IsIso f.right\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ g ≫ f = 𝟙 Z\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_2\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Under X\nf : Y ⟶ Z\nt : IsIso f.right\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ g ≫ f = 𝟙 Z\n[PROOFSTEP]\next\n[GOAL]\ncase refine_2.h\nT : Type u₁\ninst✝ : Category.{v₁, u₁} T\nX : T\nY Z : Under X\nf : Y ⟶ Z\nt : IsIso f.right\ng : Z ⟶ Y := homMk (inv ((forget X).map f))\n⊢ (g ≫ f).right = (𝟙 Z).right\n[PROOFSTEP]\nsimp\n[GOAL]\n\n[PROOFSTEP]\next\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Under X\nk : f ⟶ g\ninst✝ : Epi k\n⊢ Epi k.right\n[PROOFSTEP]\nrefine' ⟨fun {Y : T} l m a => _⟩\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Under X\nk : f ⟶ g\ninst✝ : Epi k\nY : T\nl m : g.right ⟶ Y\na : k.right ≫ l = k.right ≫ m\n⊢ l = m\n[PROOFSTEP]\nlet l' : g ⟶ mk (g.hom ≫ m) :=\n  homMk l\n    (by dsimp; rw [← Under.w k, Category.assoc, a, Category.assoc])\n      -- Porting note: add type ascription here to `homMk m`\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Under X\nk : f ⟶ g\ninst✝ : Epi k\nY : T\nl m : g.right ⟶ Y\na : k.right ≫ l = k.right ≫ m\n⊢ g.hom ≫ l = (mk (g.hom ≫ m)).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Under X\nk : f ⟶ g\ninst✝ : Epi k\nY : T\nl m : g.right ⟶ Y\na : k.right ≫ l = k.right ≫ m\n⊢ g.hom ≫ l = g.hom ≫ m\n[PROOFSTEP]\nrw [← Under.w k, Category.assoc, a, Category.assoc]\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Under X\nk : f ⟶ g\ninst✝ : Epi k\nY : T\nl m : g.right ⟶ Y\na : k.right ≫ l = k.right ≫ m\nl' : g ⟶ mk (g.hom ≫ m) := homMk l\n⊢ l = m\n[PROOFSTEP]\nsuffices l' = (homMk m : g ⟶ mk (g.hom ≫ m)) by apply congrArg CommaMorphism.right this\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Under X\nk : f ⟶ g\ninst✝ : Epi k\nY : T\nl m : g.right ⟶ Y\na : k.right ≫ l = k.right ≫ m\nl' : g ⟶ mk (g.hom ≫ m) := homMk l\nthis : l' = homMk m\n⊢ l = m\n[PROOFSTEP]\napply congrArg CommaMorphism.right this\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Under X\nk : f ⟶ g\ninst✝ : Epi k\nY : T\nl m : g.right ⟶ Y\na : k.right ≫ l = k.right ≫ m\nl' : g ⟶ mk (g.hom ≫ m) := homMk l\n⊢ l' = homMk m\n[PROOFSTEP]\nrw [← cancel_epi k]\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Under X\nk : f ⟶ g\ninst✝ : Epi k\nY : T\nl m : g.right ⟶ Y\na : k.right ≫ l = k.right ≫ m\nl' : g ⟶ mk (g.hom ≫ m) := homMk l\n⊢ k ≫ l' = k ≫ homMk m\n[PROOFSTEP]\next\n[GOAL]\ncase h\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX : T\nf g : Under X\nk : f ⟶ g\ninst✝ : Epi k\nY : T\nl m : g.right ⟶ Y\na : k.right ≫ l = k.right ≫ m\nl' : g ⟶ mk (g.hom ≫ m) := homMk l\n⊢ (k ≫ l').right = (k ≫ homMk m).right\n[PROOFSTEP]\napply a\n[GOAL]\nT : Type u₁\ninst✝¹ : Category.{v₁, u₁} T\nX✝¹ : T\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nX : T\nF : T ⥤ D\nX✝ Y✝ : Under X\nf : X✝ ⟶ Y✝\n⊢ ((fun Y => mk (F.map Y.hom)) X✝).hom ≫ F.map f.right = ((fun Y => mk (F.map Y.hom)) Y✝).hom\n[PROOFSTEP]\naesop_cat_nonterminal\n[GOAL]\nT : Type u₁\ninst : Category.{v₁, u₁} T\nX_1 : T\nD : Type u₂\ninst_1 : Category.{v₂, u₂} D\nX : T\nF : T ⥤ D\nX_2 Y : Under X\nf : X_2 ⟶ Y\n⊢ F.map X_2.hom ≫ F.map f.right = F.map Y.hom\n[PROOFSTEP]\nerw [← F.map_comp, w]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Over", "llama_tokens": 7499, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6893056295505784, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.39015976274064496}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Sub α\ninst✝ : Zero α\na : WithTop α\n⊢ a - ⊤ = 0\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Sub α\ninst✝ : Zero α\n⊢ none - ⊤ = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Sub α\ninst✝ : Zero α\nval✝ : α\n⊢ Option.some val✝ - ⊤ = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Sub α\ninst✝ : Zero α\na b : WithTop α\n⊢ a - b = ⊤ ↔ a = ⊤ ∧ b ≠ ⊤\n[PROOFSTEP]\ninduction a using recTopCoe\n[GOAL]\ncase top\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Sub α\ninst✝ : Zero α\nb : WithTop α\n⊢ ⊤ - b = ⊤ ↔ ⊤ = ⊤ ∧ b ≠ ⊤\n[PROOFSTEP]\ninduction b using recTopCoe\n[GOAL]\ncase coe\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Sub α\ninst✝ : Zero α\nb : WithTop α\na✝ : α\n⊢ ↑a✝ - b = ⊤ ↔ ↑a✝ = ⊤ ∧ b ≠ ⊤\n[PROOFSTEP]\ninduction b using recTopCoe\n[GOAL]\ncase top.top\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Sub α\ninst✝ : Zero α\n⊢ ⊤ - ⊤ = ⊤ ↔ ⊤ = ⊤ ∧ ⊤ ≠ ⊤\n[PROOFSTEP]\nsimp only [← coe_sub, coe_ne_top, sub_top, zero_ne_top, coe_ne_top, top_sub_coe, false_and, Ne.def]\n[GOAL]\ncase top.coe\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Sub α\ninst✝ : Zero α\na✝ : α\n⊢ ⊤ - ↑a✝ = ⊤ ↔ ⊤ = ⊤ ∧ ↑a✝ ≠ ⊤\n[PROOFSTEP]\nsimp only [← coe_sub, coe_ne_top, sub_top, zero_ne_top, coe_ne_top, top_sub_coe, false_and, Ne.def]\n[GOAL]\ncase coe.top\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Sub α\ninst✝ : Zero α\na✝ : α\n⊢ ↑a✝ - ⊤ = ⊤ ↔ ↑a✝ = ⊤ ∧ ⊤ ≠ ⊤\n[PROOFSTEP]\nsimp only [← coe_sub, coe_ne_top, sub_top, zero_ne_top, coe_ne_top, top_sub_coe, false_and, Ne.def]\n[GOAL]\ncase coe.coe\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Sub α\ninst✝ : Zero α\na✝¹ a✝ : α\n⊢ ↑a✝¹ - ↑a✝ = ⊤ ↔ ↑a✝¹ = ⊤ ∧ ↑a✝ ≠ ⊤\n[PROOFSTEP]\nsimp only [← coe_sub, coe_ne_top, sub_top, zero_ne_top, coe_ne_top, top_sub_coe, false_and, Ne.def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Sub α\ninst✝² : Zero α\ninst✝¹ : Sub β\ninst✝ : Zero β\nf : α → β\nh : ∀ (x y : α), f (x - y) = f x - f y\nh₀ : f 0 = 0\nx✝ : WithTop α\n⊢ map f (x✝ - ⊤) = map f x✝ - map f ⊤\n[PROOFSTEP]\nsimp only [h₀, sub_top, WithTop.map_zero, coe_zero, map_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Sub α\ninst✝² : Zero α\ninst✝¹ : Sub β\ninst✝ : Zero β\nf : α → β\nh : ∀ (x y : α), f (x - y) = f x - f y\nh₀ : f 0 = 0\nx y : α\n⊢ map f (↑x - ↑y) = map f ↑x - map f ↑y\n[PROOFSTEP]\nsimp only [← coe_sub, map_coe, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\n⊢ OrderedSub (WithTop α)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase tsub_le_iff_right\nα : Type u_1\nβ : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\n⊢ ∀ (a b c : WithTop α), a - b ≤ c ↔ a ≤ c + b\n[PROOFSTEP]\nrintro x y z\n[GOAL]\ncase tsub_le_iff_right\nα : Type u_1\nβ : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nx y z : WithTop α\n⊢ x - y ≤ z ↔ x ≤ z + y\n[PROOFSTEP]\ninduction y using WithTop.recTopCoe\n[GOAL]\ncase tsub_le_iff_right.top\nα : Type u_1\nβ : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nx z : WithTop α\n⊢ x - ⊤ ≤ z ↔ x ≤ z + ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase tsub_le_iff_right.coe\nα : Type u_1\nβ : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nx z : WithTop α\na✝ : α\n⊢ x - ↑a✝ ≤ z ↔ x ≤ z + ↑a✝\n[PROOFSTEP]\ninduction x using WithTop.recTopCoe\n[GOAL]\ncase tsub_le_iff_right.coe.top\nα : Type u_1\nβ : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nz : WithTop α\na✝ : α\n⊢ ⊤ - ↑a✝ ≤ z ↔ ⊤ ≤ z + ↑a✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase tsub_le_iff_right.coe.coe\nα : Type u_1\nβ : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nz : WithTop α\na✝¹ a✝ : α\n⊢ ↑a✝ - ↑a✝¹ ≤ z ↔ ↑a✝ ≤ z + ↑a✝¹\n[PROOFSTEP]\ninduction z using WithTop.recTopCoe\n[GOAL]\ncase tsub_le_iff_right.coe.coe.top\nα : Type u_1\nβ : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝¹ a✝ : α\n⊢ ↑a✝ - ↑a✝¹ ≤ ⊤ ↔ ↑a✝ ≤ ⊤ + ↑a✝¹\n[PROOFSTEP]\nsimp\n[GOAL]\ncase tsub_le_iff_right.coe.coe.coe\nα : Type u_1\nβ : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝² a✝¹ a✝ : α\n⊢ ↑a✝¹ - ↑a✝² ≤ ↑a✝ ↔ ↑a✝¹ ≤ ↑a✝ + ↑a✝²\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase tsub_le_iff_right.coe.coe.coe\nα : Type u_1\nβ : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝² a✝¹ a✝ : α\n⊢ a✝¹ - a✝² ≤ a✝ ↔ a✝¹ ≤ a✝ + a✝²\n[PROOFSTEP]\nexact tsub_le_iff_right\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Sub.WithTop", "llama_tokens": 2533, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.689305616785446, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.3901597555153434}}
{"text": "[GOAL]\nι : Type u_1\nI✝ J I : Box ι\ns : Set ι\ni : ι\n⊢ Set.piecewise s (fun i => (lower I i + upper I i) / 2) I.lower i <\n    Set.piecewise s I.upper (fun i => (lower I i + upper I i) / 2) i\n[PROOFSTEP]\ndsimp only [Set.piecewise]\n[GOAL]\nι : Type u_1\nI✝ J I : Box ι\ns : Set ι\ni : ι\n⊢ (if i ∈ s then (lower I i + upper I i) / 2 else lower I i) < if i ∈ s then upper I i else (lower I i + upper I i) / 2\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nι : Type u_1\nI✝ J I : Box ι\ns : Set ι\ni : ι\nh✝ : i ∈ s\n⊢ (lower I i + upper I i) / 2 < upper I i\n[PROOFSTEP]\nsimp only [left_lt_add_div_two, add_div_two_lt_right, I.lower_lt_upper]\n[GOAL]\ncase neg\nι : Type u_1\nI✝ J I : Box ι\ns : Set ι\ni : ι\nh✝ : ¬i ∈ s\n⊢ lower I i < (lower I i + upper I i) / 2\n[PROOFSTEP]\nsimp only [left_lt_add_div_two, add_div_two_lt_right, I.lower_lt_upper]\n[GOAL]\nι : Type u_1\nI J : Box ι\ns : Set ι\ny : ι → ℝ\n⊢ y ∈ splitCenterBox I s ↔ y ∈ I ∧ ∀ (i : ι), (lower I i + upper I i) / 2 < y i ↔ i ∈ s\n[PROOFSTEP]\nsimp only [splitCenterBox, mem_def, ← forall_and]\n[GOAL]\nι : Type u_1\nI J : Box ι\ns : Set ι\ny : ι → ℝ\n⊢ (∀ (i : ι),\n      y i ∈\n        Set.Ioc (Set.piecewise s (fun i => (lower I i + upper I i) / 2) I.lower i)\n          (Set.piecewise s I.upper (fun i => (lower I i + upper I i) / 2) i)) ↔\n    ∀ (x : ι), y x ∈ Set.Ioc (lower I x) (upper I x) ∧ ((lower I x + upper I x) / 2 < y x ↔ x ∈ s)\n[PROOFSTEP]\nrefine' forall_congr' fun i ↦ _\n[GOAL]\nι : Type u_1\nI J : Box ι\ns : Set ι\ny : ι → ℝ\ni : ι\n⊢ y i ∈\n      Set.Ioc (Set.piecewise s (fun i => (lower I i + upper I i) / 2) I.lower i)\n        (Set.piecewise s I.upper (fun i => (lower I i + upper I i) / 2) i) ↔\n    y i ∈ Set.Ioc (lower I i) (upper I i) ∧ ((lower I i + upper I i) / 2 < y i ↔ i ∈ s)\n[PROOFSTEP]\ndsimp only [Set.piecewise]\n[GOAL]\nι : Type u_1\nI J : Box ι\ns : Set ι\ny : ι → ℝ\ni : ι\n⊢ y i ∈\n      Set.Ioc (if i ∈ s then (lower I i + upper I i) / 2 else lower I i)\n        (if i ∈ s then upper I i else (lower I i + upper I i) / 2) ↔\n    y i ∈ Set.Ioc (lower I i) (upper I i) ∧ ((lower I i + upper I i) / 2 < y i ↔ i ∈ s)\n[PROOFSTEP]\nsplit_ifs with hs\n[GOAL]\ncase pos\nι : Type u_1\nI J : Box ι\ns : Set ι\ny : ι → ℝ\ni : ι\nhs : i ∈ s\n⊢ y i ∈ Set.Ioc ((lower I i + upper I i) / 2) (upper I i) ↔\n    y i ∈ Set.Ioc (lower I i) (upper I i) ∧ ((lower I i + upper I i) / 2 < y i ↔ i ∈ s)\n[PROOFSTEP]\nsimp only [hs, iff_true_iff, iff_false_iff, not_lt]\n[GOAL]\ncase neg\nι : Type u_1\nI J : Box ι\ns : Set ι\ny : ι → ℝ\ni : ι\nhs : ¬i ∈ s\n⊢ y i ∈ Set.Ioc (lower I i) ((lower I i + upper I i) / 2) ↔\n    y i ∈ Set.Ioc (lower I i) (upper I i) ∧ ((lower I i + upper I i) / 2 < y i ↔ i ∈ s)\n[PROOFSTEP]\nsimp only [hs, iff_true_iff, iff_false_iff, not_lt]\n[GOAL]\ncase pos\nι : Type u_1\nI J : Box ι\ns : Set ι\ny : ι → ℝ\ni : ι\nhs : i ∈ s\n⊢ y i ∈ Set.Ioc ((lower I i + upper I i) / 2) (upper I i) ↔\n    y i ∈ Set.Ioc (lower I i) (upper I i) ∧ (lower I i + upper I i) / 2 < y i\ncase neg\nι : Type u_1\nI J : Box ι\ns : Set ι\ny : ι → ℝ\ni : ι\nhs : ¬i ∈ s\n⊢ y i ∈ Set.Ioc (lower I i) ((lower I i + upper I i) / 2) ↔\n    y i ∈ Set.Ioc (lower I i) (upper I i) ∧ y i ≤ (lower I i + upper I i) / 2\n[PROOFSTEP]\nexacts [⟨fun H ↦ ⟨⟨(left_lt_add_div_two.2 (I.lower_lt_upper i)).trans H.1, H.2⟩, H.1⟩, fun H ↦ ⟨H.2, H.1.2⟩⟩,\n  ⟨fun H ↦ ⟨⟨H.1, H.2.trans (add_div_two_lt_right.2 (I.lower_lt_upper i)).le⟩, H.2⟩, fun H ↦ ⟨H.1.1, H.2⟩⟩]\n[GOAL]\nι : Type u_1\nI✝ J I : Box ι\ns t : Set ι\nh : s ≠ t\n⊢ Disjoint ↑(splitCenterBox I s) ↑(splitCenterBox I t)\n[PROOFSTEP]\nrw [disjoint_iff_inf_le]\n[GOAL]\nι : Type u_1\nI✝ J I : Box ι\ns t : Set ι\nh : s ≠ t\n⊢ ↑(splitCenterBox I s) ⊓ ↑(splitCenterBox I t) ≤ ⊥\n[PROOFSTEP]\nrintro y ⟨hs, ht⟩\n[GOAL]\ncase intro\nι : Type u_1\nI✝ J I : Box ι\ns t : Set ι\nh : s ≠ t\ny : ι → ℝ\nhs : y ∈ ↑(splitCenterBox I s)\nht : y ∈ ↑(splitCenterBox I t)\n⊢ y ∈ ⊥\n[PROOFSTEP]\napply h\n[GOAL]\ncase intro\nι : Type u_1\nI✝ J I : Box ι\ns t : Set ι\nh : s ≠ t\ny : ι → ℝ\nhs : y ∈ ↑(splitCenterBox I s)\nht : y ∈ ↑(splitCenterBox I t)\n⊢ s = t\n[PROOFSTEP]\next i\n[GOAL]\ncase intro.h\nι : Type u_1\nI✝ J I : Box ι\ns t : Set ι\nh : s ≠ t\ny : ι → ℝ\nhs : y ∈ ↑(splitCenterBox I s)\nht : y ∈ ↑(splitCenterBox I t)\ni : ι\n⊢ i ∈ s ↔ i ∈ t\n[PROOFSTEP]\nrw [mem_coe, mem_splitCenterBox] at hs ht \n[GOAL]\ncase intro.h\nι : Type u_1\nI✝ J I : Box ι\ns t : Set ι\nh : s ≠ t\ny : ι → ℝ\nhs : y ∈ I ∧ ∀ (i : ι), (lower I i + upper I i) / 2 < y i ↔ i ∈ s\nht : y ∈ I ∧ ∀ (i : ι), (lower I i + upper I i) / 2 < y i ↔ i ∈ t\ni : ι\n⊢ i ∈ s ↔ i ∈ t\n[PROOFSTEP]\nrw [← hs.2, ← ht.2]\n[GOAL]\nι : Type u_1\nI✝ J I : Box ι\n⊢ ⋃ (s : Set ι), ↑(splitCenterBox I s) = ↑I\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nι : Type u_1\nI✝ J I : Box ι\nx : ι → ℝ\n⊢ x ∈ ⋃ (s : Set ι), ↑(splitCenterBox I s) ↔ x ∈ ↑I\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nI✝ J I : Box ι\ns : Set ι\ni : ι\n⊢ upper (splitCenterBox I s) i - lower (splitCenterBox I s) i = (upper I i - lower I i) / 2\n[PROOFSTEP]\nby_cases i ∈ s\n[GOAL]\nι : Type u_1\nI✝ J I : Box ι\ns : Set ι\ni : ι\n⊢ upper (splitCenterBox I s) i - lower (splitCenterBox I s) i = (upper I i - lower I i) / 2\n[PROOFSTEP]\nby_cases i ∈ s\n[GOAL]\ncase pos\nι : Type u_1\nI✝ J I : Box ι\ns : Set ι\ni : ι\nh : i ∈ s\n⊢ upper (splitCenterBox I s) i - lower (splitCenterBox I s) i = (upper I i - lower I i) / 2\n[PROOFSTEP]\nfield_simp [splitCenterBox]\n[GOAL]\ncase neg\nι : Type u_1\nI✝ J I : Box ι\ns : Set ι\ni : ι\nh : ¬i ∈ s\n⊢ upper (splitCenterBox I s) i - lower (splitCenterBox I s) i = (upper I i - lower I i) / 2\n[PROOFSTEP]\nfield_simp [splitCenterBox]\n[GOAL]\ncase pos\nι : Type u_1\nI✝ J I : Box ι\ns : Set ι\ni : ι\nh : i ∈ s\n⊢ upper I i * 2 - (lower I i + upper I i) = upper I i - lower I i\n[PROOFSTEP]\nfield_simp [mul_two, two_mul]\n[GOAL]\ncase neg\nι : Type u_1\nI✝ J I : Box ι\ns : Set ι\ni : ι\nh : ¬i ∈ s\n⊢ lower I i + upper I i - 2 * lower I i = upper I i - lower I i\n[PROOFSTEP]\nfield_simp [mul_two, two_mul]\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\np : Box ι → Prop\nI : Box ι\nH_ind : ∀ (J : Box ι), J ≤ I → (∀ (s : Set ι), p (splitCenterBox J s)) → p J\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\n⊢ p I\n[PROOFSTEP]\nby_contra hpI\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\np : Box ι → Prop\nI : Box ι\nH_ind : ∀ (J : Box ι), J ≤ I → (∀ (s : Set ι), p (splitCenterBox J s)) → p J\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\n⊢ False\n[PROOFSTEP]\nreplace H_ind := fun J hJ ↦ not_imp_not.2 (H_ind J hJ)\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\nH_ind : ∀ (J : Box ι), J ≤ I → ¬p J → ¬∀ (s : Set ι), p (splitCenterBox J s)\n⊢ False\n[PROOFSTEP]\nsimp only [exists_imp, not_forall] at H_ind \n[GOAL]\nι : Type u_1\nI✝ J : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\nH_ind : ∀ (J : Box ι), J ≤ I → ¬p J → ∃ x, ¬p (splitCenterBox J x)\n⊢ False\n[PROOFSTEP]\nchoose! s hs using H_ind\n[GOAL]\nι : Type u_1\nI✝ J : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\n⊢ False\n[PROOFSTEP]\nset J : ℕ → Box ι := fun m ↦ (fun J ↦ splitCenterBox J (s J))^[m] I\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\n⊢ False\n[PROOFSTEP]\nhave J_succ : ∀ m, J (m + 1) = splitCenterBox (J m) (s <| J m) := fun m ↦\n  iterate_succ_apply' _ _\n    _\n      -- Now we prove some properties of `J`\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\n⊢ False\n[PROOFSTEP]\nhave hJmono : Antitone J := antitone_nat_of_succ_le fun n ↦ by simpa [J_succ] using splitCenterBox_le _ _\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\nn : ℕ\n⊢ J (n + 1) ≤ J n\n[PROOFSTEP]\nsimpa [J_succ] using splitCenterBox_le _ _\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\nhJmono : Antitone J\n⊢ False\n[PROOFSTEP]\nhave hJle : ∀ m, J m ≤ I := fun m ↦ hJmono (zero_le m)\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\n⊢ False\n[PROOFSTEP]\nhave hJp : ∀ m, ¬p (J m) := fun m ↦ Nat.recOn m hpI fun m ↦ by simpa only [J_succ] using hs (J m) (hJle m)\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nm✝ m : ℕ\n⊢ ¬p (J m) → ¬p (J (Nat.succ m))\n[PROOFSTEP]\nsimpa only [J_succ] using hs (J m) (hJle m)\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\n⊢ False\n[PROOFSTEP]\nhave hJsub : ∀ m i, (J m).upper i - (J m).lower i = (I.upper i - I.lower i) / 2 ^ m :=\n  by\n  intro m i\n  induction' m with m ihm\n  · simp [Nat.zero_eq]\n  simp only [pow_succ', J_succ, upper_sub_lower_splitCenterBox, ihm, div_div]\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\n⊢ ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\n[PROOFSTEP]\nintro m i\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nm : ℕ\ni : ι\n⊢ upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\n[PROOFSTEP]\ninduction' m with m ihm\n[GOAL]\ncase zero\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\ni : ι\n⊢ upper (J Nat.zero) i - lower (J Nat.zero) i = (upper I i - lower I i) / 2 ^ Nat.zero\n[PROOFSTEP]\nsimp [Nat.zero_eq]\n[GOAL]\ncase succ\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\ni : ι\nm : ℕ\nihm : upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\n⊢ upper (J (Nat.succ m)) i - lower (J (Nat.succ m)) i = (upper I i - lower I i) / 2 ^ Nat.succ m\n[PROOFSTEP]\nsimp only [pow_succ', J_succ, upper_sub_lower_splitCenterBox, ihm, div_div]\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\n⊢ False\n[PROOFSTEP]\nhave h0 : J 0 = I := rfl\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι := fun m => (fun J => splitCenterBox J (s J))^[m] I\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\n⊢ False\n[PROOFSTEP]\nclear_value J\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nhpI : ¬p I\ns : Box ι → Set ι\nhs : ∀ (J : Box ι), J ≤ I → ¬p J → ¬p (splitCenterBox J (s J))\nJ : ℕ → Box ι\nJ_succ : ∀ (m : ℕ), J (m + 1) = splitCenterBox (J m) (s (J m))\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\n⊢ False\n[PROOFSTEP]\nclear hpI hs J_succ s\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\n⊢ False\n[PROOFSTEP]\nset z : ι → ℝ := ⨆ m, (J m).lower\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\n⊢ False\n[PROOFSTEP]\nhave hzJ : ∀ m, z ∈ Box.Icc (J m) :=\n  mem_iInter.1\n    (ciSup_mem_Inter_Icc_of_antitone_Icc ((@Box.Icc ι).monotone.comp_antitone hJmono) fun m ↦ (J m).lower_le_upper)\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\n⊢ False\n[PROOFSTEP]\nhave hJl_mem : ∀ m, (J m).lower ∈ Box.Icc I := fun m ↦ le_iff_Icc.1 (hJle m) (J m).lower_mem_Icc\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\n⊢ False\n[PROOFSTEP]\nhave hJu_mem : ∀ m, (J m).upper ∈ Box.Icc I := fun m ↦ le_iff_Icc.1 (hJle m) (J m).upper_mem_Icc\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\n⊢ False\n[PROOFSTEP]\nhave hJlz : Tendsto (fun m ↦ (J m).lower) atTop (𝓝 z) :=\n  tendsto_atTop_ciSup (antitone_lower.comp hJmono) ⟨I.upper, fun x ⟨m, hm⟩ ↦ hm ▸ (hJl_mem m).2⟩\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\nhJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)\n⊢ False\n[PROOFSTEP]\nhave hJuz : Tendsto (fun m ↦ (J m).upper) atTop (𝓝 z) :=\n  by\n  suffices Tendsto (fun m ↦ (J m).upper - (J m).lower) atTop (𝓝 0) by simpa using hJlz.add this\n  refine' tendsto_pi_nhds.2 fun i ↦ _\n  simpa [hJsub] using tendsto_const_nhds.div_atTop (tendsto_pow_atTop_atTop_of_one_lt _root_.one_lt_two)\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\nhJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)\n⊢ Tendsto (fun m => (J m).upper) atTop (𝓝 z)\n[PROOFSTEP]\nsuffices Tendsto (fun m ↦ (J m).upper - (J m).lower) atTop (𝓝 0) by simpa using hJlz.add this\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\nhJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)\nthis : Tendsto (fun m => (J m).upper - (J m).lower) atTop (𝓝 0)\n⊢ Tendsto (fun m => (J m).upper) atTop (𝓝 z)\n[PROOFSTEP]\nsimpa using hJlz.add this\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\nhJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)\n⊢ Tendsto (fun m => (J m).upper - (J m).lower) atTop (𝓝 0)\n[PROOFSTEP]\nrefine' tendsto_pi_nhds.2 fun i ↦ _\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\nhJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)\ni : ι\n⊢ Tendsto (fun i_1 => ((J i_1).upper - (J i_1).lower) i) atTop (𝓝 (OfNat.ofNat 0 i))\n[PROOFSTEP]\nsimpa [hJsub] using tendsto_const_nhds.div_atTop (tendsto_pow_atTop_atTop_of_one_lt _root_.one_lt_two)\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\nhJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)\nhJuz : Tendsto (fun m => (J m).upper) atTop (𝓝 z)\n⊢ False\n[PROOFSTEP]\nreplace hJlz : Tendsto (fun m ↦ (J m).lower) atTop (𝓝[Icc I.lower I.upper] z)\n[GOAL]\ncase hJlz\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\nhJlz : Tendsto (fun m => (J m).lower) atTop (𝓝 z)\nhJuz : Tendsto (fun m => (J m).upper) atTop (𝓝 z)\n⊢ Tendsto (fun m => (J m).lower) atTop (𝓝[Set.Icc I.lower I.upper] z)\n[PROOFSTEP]\nexact tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ hJlz (eventually_of_forall hJl_mem)\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\nhJuz : Tendsto (fun m => (J m).upper) atTop (𝓝 z)\nhJlz : Tendsto (fun m => (J m).lower) atTop (𝓝[Set.Icc I.lower I.upper] z)\n⊢ False\n[PROOFSTEP]\nreplace hJuz : Tendsto (fun m ↦ (J m).upper) atTop (𝓝[Icc I.lower I.upper] z)\n[GOAL]\ncase hJuz\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\nhJuz : Tendsto (fun m => (J m).upper) atTop (𝓝 z)\nhJlz : Tendsto (fun m => (J m).lower) atTop (𝓝[Set.Icc I.lower I.upper] z)\n⊢ Tendsto (fun m => (J m).upper) atTop (𝓝[Set.Icc I.lower I.upper] z)\n[PROOFSTEP]\nexact tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ hJuz (eventually_of_forall hJu_mem)\n[GOAL]\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\nhJlz : Tendsto (fun m => (J m).lower) atTop (𝓝[Set.Icc I.lower I.upper] z)\nhJuz : Tendsto (fun m => (J m).upper) atTop (𝓝[Set.Icc I.lower I.upper] z)\n⊢ False\n[PROOFSTEP]\nrcases H_nhds z (h0 ▸ hzJ 0) with ⟨U, hUz, hU⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\nhJlz : Tendsto (fun m => (J m).lower) atTop (𝓝[Set.Icc I.lower I.upper] z)\nhJuz : Tendsto (fun m => (J m).upper) atTop (𝓝[Set.Icc I.lower I.upper] z)\nU : Set (ι → ℝ)\nhUz : U ∈ 𝓝[↑Box.Icc I] z\nhU :\n  ∀ (J : Box ι),\n    J ≤ I →\n      ∀ (m : ℕ),\n        z ∈ ↑Box.Icc J → ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\n⊢ False\n[PROOFSTEP]\nrcases(tendsto_lift'.1 (hJlz.Icc hJuz) U hUz).exists with ⟨m, hUm⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nI✝ J✝ : Box ι\np : Box ι → Prop\nI : Box ι\nH_nhds :\n  ∀ (z : ι → ℝ),\n    z ∈ ↑Box.Icc I →\n      ∃ U,\n        U ∈ 𝓝[↑Box.Icc I] z ∧\n          ∀ (J : Box ι),\n            J ≤ I →\n              ∀ (m : ℕ),\n                z ∈ ↑Box.Icc J →\n                  ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nJ : ℕ → Box ι\nhJmono : Antitone J\nhJle : ∀ (m : ℕ), J m ≤ I\nhJp : ∀ (m : ℕ), ¬p (J m)\nhJsub : ∀ (m : ℕ) (i : ι), upper (J m) i - lower (J m) i = (upper I i - lower I i) / 2 ^ m\nh0 : J 0 = I\nz : ι → ℝ := ⨆ (m : ℕ), (J m).lower\nhzJ : ∀ (m : ℕ), z ∈ ↑Box.Icc (J m)\nhJl_mem : ∀ (m : ℕ), (J m).lower ∈ ↑Box.Icc I\nhJu_mem : ∀ (m : ℕ), (J m).upper ∈ ↑Box.Icc I\nhJlz : Tendsto (fun m => (J m).lower) atTop (𝓝[Set.Icc I.lower I.upper] z)\nhJuz : Tendsto (fun m => (J m).upper) atTop (𝓝[Set.Icc I.lower I.upper] z)\nU : Set (ι → ℝ)\nhUz : U ∈ 𝓝[↑Box.Icc I] z\nhU :\n  ∀ (J : Box ι),\n    J ≤ I →\n      ∀ (m : ℕ),\n        z ∈ ↑Box.Icc J → ↑Box.Icc J ⊆ U → (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) → p J\nm : ℕ\nhUm : Set.Icc (J m).lower (J m).upper ∈ 𝒫 U\n⊢ False\n[PROOFSTEP]\nexact hJp m (hU (J m) (hJle m) m (hzJ m) hUm (hJsub m))\n", "meta": {"mathlib_filename": "Mathlib.Analysis.BoxIntegral.Box.SubboxInduction", "llama_tokens": 18459, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6893056040203135, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.3901597482900418}}
{"text": "[GOAL]\nM₀ : Type ?u.8\ninst✝ : MonoidWithZero M₀\n⊢ 1 ∈\n    { carrier := {x | ∀ (y : M₀), y * x = 0 → y = 0},\n        mul_mem' :=\n          (_ :\n            ∀ {x y : M₀},\n              x ∈ {x | ∀ (y : M₀), y * x = 0 → y = 0} →\n                y ∈ {x | ∀ (y : M₀), y * x = 0 → y = 0} → ∀ (z : M₀), z * (x * y) = 0 → z = 0) }.carrier\n[PROOFSTEP]\nsimp\n[GOAL]\nM₀ : Type ?u.2171\ninst✝ : MonoidWithZero M₀\n⊢ 1 ∈\n    { carrier := {x | ∀ (y : M₀), x * y = 0 → y = 0},\n        mul_mem' :=\n          (_ :\n            ∀ {x y : M₀},\n              x ∈ {x | ∀ (y : M₀), x * y = 0 → y = 0} →\n                y ∈ {x | ∀ (y : M₀), x * y = 0 → y = 0} → ∀ (z : M₀), x * y * z = 0 → z = 0) }.carrier\n[PROOFSTEP]\nsimp\n[GOAL]\nM₀✝ : Type ?u.4317\ninst✝¹ : MonoidWithZero M₀✝\nM₀ : Type u_1\ninst✝ : CommMonoidWithZero M₀\n⊢ nonZeroDivisorsLeft M₀ = nonZeroDivisorsRight M₀\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nM₀✝ : Type ?u.4317\ninst✝¹ : MonoidWithZero M₀✝\nM₀ : Type u_1\ninst✝ : CommMonoidWithZero M₀\nx : M₀\n⊢ x ∈ nonZeroDivisorsLeft M₀ ↔ x ∈ nonZeroDivisorsRight M₀\n[PROOFSTEP]\nsimp [mul_comm x]\n[GOAL]\nM₀ : Type u_1\ninst✝² : MonoidWithZero M₀\ninst✝¹ : NoZeroDivisors M₀\ninst✝ : Nontrivial M₀\n⊢ ↑(nonZeroDivisorsLeft M₀) = {x | x ≠ 0}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nM₀ : Type u_1\ninst✝² : MonoidWithZero M₀\ninst✝¹ : NoZeroDivisors M₀\ninst✝ : Nontrivial M₀\nx : M₀\n⊢ x ∈ ↑(nonZeroDivisorsLeft M₀) ↔ x ∈ {x | x ≠ 0}\n[PROOFSTEP]\nsimp only [SetLike.mem_coe, mem_nonZeroDivisorsLeft_iff, mul_eq_zero, forall_eq_or_imp, true_and, Set.mem_setOf_eq]\n[GOAL]\ncase h\nM₀ : Type u_1\ninst✝² : MonoidWithZero M₀\ninst✝¹ : NoZeroDivisors M₀\ninst✝ : Nontrivial M₀\nx : M₀\n⊢ (∀ (a : M₀), x = 0 → a = 0) ↔ x ≠ 0\n[PROOFSTEP]\nrefine' ⟨fun h ↦ _, fun hx y hx' ↦ by contradiction⟩\n[GOAL]\nM₀ : Type u_1\ninst✝² : MonoidWithZero M₀\ninst✝¹ : NoZeroDivisors M₀\ninst✝ : Nontrivial M₀\nx : M₀\nhx : x ≠ 0\ny : M₀\nhx' : x = 0\n⊢ y = 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase h\nM₀ : Type u_1\ninst✝² : MonoidWithZero M₀\ninst✝¹ : NoZeroDivisors M₀\ninst✝ : Nontrivial M₀\nx : M₀\nh : ∀ (a : M₀), x = 0 → a = 0\n⊢ x ≠ 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase h\nM₀ : Type u_1\ninst✝² : MonoidWithZero M₀\ninst✝¹ : NoZeroDivisors M₀\ninst✝ : Nontrivial M₀\nx : M₀\nh : x = 0\n⊢ ∃ a, x = 0 ∧ a ≠ 0\n[PROOFSTEP]\nexact ⟨1, h, one_ne_zero⟩\n[GOAL]\nM₀ : Type u_1\ninst✝² : MonoidWithZero M₀\ninst✝¹ : NoZeroDivisors M₀\ninst✝ : Nontrivial M₀\n⊢ ↑(nonZeroDivisorsRight M₀) = {x | x ≠ 0}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nM₀ : Type u_1\ninst✝² : MonoidWithZero M₀\ninst✝¹ : NoZeroDivisors M₀\ninst✝ : Nontrivial M₀\nx : M₀\n⊢ x ∈ ↑(nonZeroDivisorsRight M₀) ↔ x ∈ {x | x ≠ 0}\n[PROOFSTEP]\nsimp only [SetLike.mem_coe, mem_nonZeroDivisorsRight_iff, mul_eq_zero, Set.mem_setOf_eq]\n[GOAL]\ncase h\nM₀ : Type u_1\ninst✝² : MonoidWithZero M₀\ninst✝¹ : NoZeroDivisors M₀\ninst✝ : Nontrivial M₀\nx : M₀\n⊢ (∀ (y : M₀), x = 0 ∨ y = 0 → y = 0) ↔ x ≠ 0\n[PROOFSTEP]\nrefine' ⟨fun h ↦ _, fun hx y hx' ↦ by aesop⟩\n[GOAL]\nM₀ : Type u_1\ninst✝² : MonoidWithZero M₀\ninst✝¹ : NoZeroDivisors M₀\ninst✝ : Nontrivial M₀\nx : M₀\nhx : x ≠ 0\ny : M₀\nhx' : x = 0 ∨ y = 0\n⊢ y = 0\n[PROOFSTEP]\naesop\n[GOAL]\ncase h\nM₀ : Type u_1\ninst✝² : MonoidWithZero M₀\ninst✝¹ : NoZeroDivisors M₀\ninst✝ : Nontrivial M₀\nx : M₀\nh : ∀ (y : M₀), x = 0 ∨ y = 0 → y = 0\n⊢ x ≠ 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase h\nM₀ : Type u_1\ninst✝² : MonoidWithZero M₀\ninst✝¹ : NoZeroDivisors M₀\ninst✝ : Nontrivial M₀\nx : M₀\nh : x = 0\n⊢ ∃ y, (x = 0 ∨ y = 0) ∧ y ≠ 0\n[PROOFSTEP]\nexact ⟨1, Or.inl h, one_ne_zero⟩\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Submonoid.ZeroDivisors", "llama_tokens": 1872, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7341195269001831, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.3899711738660847}}
{"text": "[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\n⊢ eigenspace f 0 = LinearMap.ker f\n[PROOFSTEP]\nsimp [eigenspace]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nx : M\nh : HasEigenvector f μ x\n⊢ HasEigenvalue f μ\n[PROOFSTEP]\nrw [HasEigenvalue, Submodule.ne_bot_iff]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nx : M\nh : HasEigenvector f μ x\n⊢ ∃ x, x ∈ eigenspace f μ ∧ x ≠ 0\n[PROOFSTEP]\nuse x\n[GOAL]\ncase h\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nx : M\nh : HasEigenvector f μ x\n⊢ x ∈ eigenspace f μ ∧ x ≠ 0\n[PROOFSTEP]\nexact h\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nx : M\n⊢ x ∈ eigenspace f μ ↔ ↑f x = μ • x\n[PROOFSTEP]\nrw [eigenspace, LinearMap.mem_ker, LinearMap.sub_apply, algebraMap_end_apply, sub_eq_zero]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nhμ : HasEigenvalue f μ\n⊢ μ ∈ spectrum R f\n[PROOFSTEP]\nrefine' spectrum.mem_iff.mpr fun h_unit => _\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nhμ : HasEigenvalue f μ\nh_unit : IsUnit (↑(algebraMap R (End R M)) μ - f)\n⊢ False\n[PROOFSTEP]\nset f' := LinearMap.GeneralLinearGroup.toLinearEquiv h_unit.unit\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nhμ : HasEigenvalue f μ\nh_unit : IsUnit (↑(algebraMap R (End R M)) μ - f)\nf' : M ≃ₗ[R] M := LinearMap.GeneralLinearGroup.toLinearEquiv (IsUnit.unit h_unit)\n⊢ False\n[PROOFSTEP]\nrcases hμ.exists_hasEigenvector with ⟨v, hv⟩\n[GOAL]\ncase intro\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nhμ : HasEigenvalue f μ\nh_unit : IsUnit (↑(algebraMap R (End R M)) μ - f)\nf' : M ≃ₗ[R] M := LinearMap.GeneralLinearGroup.toLinearEquiv (IsUnit.unit h_unit)\nv : M\nhv : HasEigenvector f μ v\n⊢ False\n[PROOFSTEP]\nrefine' hv.2 ((LinearMap.ker_eq_bot'.mp f'.ker) v (_ : μ • v - f v = 0))\n[GOAL]\ncase intro\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nhμ : HasEigenvalue f μ\nh_unit : IsUnit (↑(algebraMap R (End R M)) μ - f)\nf' : M ≃ₗ[R] M := LinearMap.GeneralLinearGroup.toLinearEquiv (IsUnit.unit h_unit)\nv : M\nhv : HasEigenvector f μ v\n⊢ μ • v - ↑f v = 0\n[PROOFSTEP]\nrw [hv.apply_eq_smul, sub_self]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : μ ∈ spectrum K f\n⊢ HasEigenvalue f μ\n[PROOFSTEP]\nrwa [spectrum.mem_iff, IsUnit.sub_iff, LinearMap.isUnit_iff_ker_eq_bot] at h \n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\na b : K\nhb : b ≠ 0\n⊢ eigenspace f (a / b) = eigenspace f (b⁻¹ * a)\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_comm]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\na b : K\nhb : b ≠ 0\n⊢ eigenspace f (b⁻¹ * a) = LinearMap.ker (f - (b⁻¹ * a) • LinearMap.id)\n[PROOFSTEP]\nrw [eigenspace]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\na b : K\nhb : b ≠ 0\n⊢ LinearMap.ker (f - ↑(algebraMap K (End K V)) (b⁻¹ * a)) = LinearMap.ker (f - (b⁻¹ * a) • LinearMap.id)\n[PROOFSTEP]\nrfl\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\na b : K\nhb : b ≠ 0\n⊢ LinearMap.ker (f - (b⁻¹ * a) • LinearMap.id) = LinearMap.ker (f - b⁻¹ • a • LinearMap.id)\n[PROOFSTEP]\nrw [smul_smul]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\na b : K\nhb : b ≠ 0\n⊢ LinearMap.ker (f - b⁻¹ • ↑(algebraMap K (End K V)) a) = LinearMap.ker (b • (f - b⁻¹ • ↑(algebraMap K (End K V)) a))\n[PROOFSTEP]\nrw [LinearMap.ker_smul _ b hb]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\na b : K\nhb : b ≠ 0\n⊢ LinearMap.ker (b • (f - b⁻¹ • ↑(algebraMap K (End K V)) a)) = LinearMap.ker (b • f - ↑(algebraMap K (End K V)) a)\n[PROOFSTEP]\nrw [smul_sub, smul_inv_smul₀ hb]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\n⊢ CompleteLattice.Independent (eigenspace f)\n[PROOFSTEP]\nclassical\n  -- Define an operation from `Π₀ μ : K, f.eigenspace μ`, the vector space of finitely-supported\n    -- choices of an eigenvector from each eigenspace, to `V`, by sending a collection to its sum.\nlet S :\n  @LinearMap K K _ _ (RingHom.id K) (Π₀ μ : K, f.eigenspace μ) V (@DFinsupp.addCommMonoid K (fun μ => f.eigenspace μ) _)\n    _ (@DFinsupp.module K _ (fun μ => f.eigenspace μ) _ _ _) _ :=\n  @DFinsupp.lsum K K ℕ _ V _ _ _ _ _ _ _ _ _ fun μ => (f.eigenspace μ).subtype\nsuffices ∀ l : Π₀ μ, f.eigenspace μ, S l = 0 → l = 0\n  by\n  rw [CompleteLattice.independent_iff_dfinsupp_lsum_injective]\n  change Function.Injective S\n  rw [← @LinearMap.ker_eq_bot K K (Π₀ μ, f.eigenspace μ) V _ _ (@DFinsupp.addCommGroup K (fun μ => f.eigenspace μ) _)]\n  rw [eq_bot_iff]\n  exact this\nintro l hl\ninduction' h_l_support : l.support using Finset.induction with μ₀ l_support' hμ₀ ih generalizing l\n· exact DFinsupp.support_eq_empty.1 h_l_support\n· let l' := DFinsupp.mapRange.linearMap (fun μ => (μ - μ₀) • @LinearMap.id K (f.eigenspace μ) _ _ _) l\n  have h_l_support' : l'.support = l_support' :=\n    by\n    rw [← Finset.erase_insert hμ₀, ← h_l_support]\n    ext a\n    have : ¬(a = μ₀ ∨ l a = 0) ↔ ¬a = μ₀ ∧ ¬l a = 0 := not_or\n    simp only [DFinsupp.mapRange.linearMap_apply, DFinsupp.mapRange_apply, DFinsupp.mem_support_iff, Finset.mem_erase,\n      id.def, LinearMap.id_coe, LinearMap.smul_apply, Ne.def, smul_eq_zero, sub_eq_zero, this]\n      -- The entries of `l'` add up to `0`.\n  have total_l' : S l' = 0 := by\n    let g := f - algebraMap K (End K V) μ₀\n    let a : Π₀ _ : K, V := DFinsupp.mapRange.linearMap (fun μ => (f.eigenspace μ).subtype) l\n    calc\n      S l' = DFinsupp.lsum ℕ (fun μ => (f.eigenspace μ).subtype.comp ((μ - μ₀) • LinearMap.id)) l := ?_\n      _ = DFinsupp.lsum ℕ (fun μ => g.comp (f.eigenspace μ).subtype) l := ?_\n      _ = DFinsupp.lsum ℕ (fun _ => g) a := ?_\n      _ = g (DFinsupp.lsum ℕ (fun _ => (LinearMap.id : V →ₗ[K] V)) a) := ?_\n      _ = g (S l) := ?_\n      _ = 0 := by rw [hl, g.map_zero]\n    · exact DFinsupp.sum_mapRange_index.linearMap\n    · congr\n      ext μ v\n      simp only [LinearMap.coe_comp, Function.comp_apply, LinearMap.smul_apply, LinearMap.id_coe, id.def, sub_smul,\n        Submodule.subtype_apply, Submodule.coe_sub, Submodule.coe_smul_of_tower, LinearMap.sub_apply,\n        mem_eigenspace_iff.1 v.prop, algebraMap_end_apply]\n    · rw [DFinsupp.sum_mapRange_index.linearMap]\n    ·\n      simp only [DFinsupp.sumAddHom_apply, LinearMap.id_coe, LinearMap.map_dfinsupp_sum, id.def,\n        LinearMap.toAddMonoidHom_coe, DFinsupp.lsum_apply_apply]\n    ·\n      simp only [DFinsupp.sum_mapRange_index.linearMap, LinearMap.id_comp]\n        -- Therefore, by the induction hypothesis, all entries of `l'` are zero.\n  have l'_eq_0 := ih l' total_l' h_l_support'\n  have h_smul_eq_0 : ∀ μ, (μ - μ₀) • l μ = 0 := by\n    intro μ\n    calc\n      (μ - μ₀) • l μ = l' μ := by\n        simp only [LinearMap.id_coe, id.def, LinearMap.smul_apply, DFinsupp.mapRange_apply,\n          DFinsupp.mapRange.linearMap_apply]\n      _ = 0 := by rw [l'_eq_0];\n        rfl\n          -- Thus, the eigenspace-representatives in `l` for all `μ ≠ μ₀` are `0`.\n  have h_lμ_eq_0 : ∀ μ : K, μ ≠ μ₀ → l μ = 0 := by\n    intro μ hμ\n    apply or_iff_not_imp_left.1 (smul_eq_zero.1 (h_smul_eq_0 μ))\n    rwa [sub_eq_zero]\n      -- So if we sum over all these representatives, we obtain `0`.\n  have h_sum_l_support'_eq_0 : (Finset.sum l_support' fun μ => (l μ : V)) = 0 :=\n    by\n    rw [← Finset.sum_const_zero]\n    apply Finset.sum_congr rfl\n    intro μ hμ\n    rw [Submodule.coe_eq_zero, h_lμ_eq_0]\n    rintro rfl\n    exact hμ₀ hμ\n  have : l μ₀ = 0 :=\n    by\n    simp only [DFinsupp.lsum_apply_apply, DFinsupp.sumAddHom_apply, LinearMap.toAddMonoidHom_coe, DFinsupp.sum,\n      h_l_support, Submodule.subtype_apply, Submodule.coe_eq_zero, Finset.sum_insert hμ₀, h_sum_l_support'_eq_0,\n      add_zero] at hl \n    exact hl\n  show l = 0\n  · ext μ\n    by_cases h_cases : μ = μ₀\n    · rwa [h_cases, SetLike.coe_eq_coe, DFinsupp.coe_zero, Pi.zero_apply]\n    · exact congr_arg _ (h_lμ_eq_0 μ h_cases)\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\n⊢ CompleteLattice.Independent (eigenspace f)\n[PROOFSTEP]\nlet S :\n  @LinearMap K K _ _ (RingHom.id K) (Π₀ μ : K, f.eigenspace μ) V (@DFinsupp.addCommMonoid K (fun μ => f.eigenspace μ) _)\n    _ (@DFinsupp.module K _ (fun μ => f.eigenspace μ) _ _ _) _ :=\n  @DFinsupp.lsum K K ℕ _ V _ _ _ _ _ _ _ _ _ fun μ => (f.eigenspace μ).subtype\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\n⊢ CompleteLattice.Independent (eigenspace f)\n[PROOFSTEP]\nsuffices ∀ l : Π₀ μ, f.eigenspace μ, S l = 0 → l = 0\n  by\n  rw [CompleteLattice.independent_iff_dfinsupp_lsum_injective]\n  change Function.Injective S\n  rw [← @LinearMap.ker_eq_bot K K (Π₀ μ, f.eigenspace μ) V _ _ (@DFinsupp.addCommGroup K (fun μ => f.eigenspace μ) _)]\n  rw [eq_bot_iff]\n  exact this\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nthis : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → l = 0\n⊢ CompleteLattice.Independent (eigenspace f)\n[PROOFSTEP]\nrw [CompleteLattice.independent_iff_dfinsupp_lsum_injective]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nthis : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → l = 0\n⊢ Function.Injective ↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (eigenspace f i))\n[PROOFSTEP]\nchange Function.Injective S\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nthis : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → l = 0\n⊢ Function.Injective ↑S\n[PROOFSTEP]\nrw [← @LinearMap.ker_eq_bot K K (Π₀ μ, f.eigenspace μ) V _ _ (@DFinsupp.addCommGroup K (fun μ => f.eigenspace μ) _)]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nthis : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → l = 0\n⊢ LinearMap.ker S = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nthis : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → l = 0\n⊢ LinearMap.ker S ≤ ⊥\n[PROOFSTEP]\nexact this\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\n⊢ ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → l = 0\n[PROOFSTEP]\nintro l hl\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\n⊢ l = 0\n[PROOFSTEP]\ninduction' h_l_support : l.support using Finset.induction with μ₀ l_support' hμ₀ ih generalizing l\n[GOAL]\ncase empty\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = ∅\n⊢ l = 0\n[PROOFSTEP]\nexact DFinsupp.support_eq_empty.1 h_l_support\n[GOAL]\ncase insert\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\n⊢ l = 0\n[PROOFSTEP]\nlet l' := DFinsupp.mapRange.linearMap (fun μ => (μ - μ₀) • @LinearMap.id K (f.eigenspace μ) _ _ _) l\n[GOAL]\ncase insert\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\n⊢ l = 0\n[PROOFSTEP]\nhave h_l_support' : l'.support = l_support' :=\n  by\n  rw [← Finset.erase_insert hμ₀, ← h_l_support]\n  ext a\n  have : ¬(a = μ₀ ∨ l a = 0) ↔ ¬a = μ₀ ∧ ¬l a = 0 := not_or\n  simp only [DFinsupp.mapRange.linearMap_apply, DFinsupp.mapRange_apply, DFinsupp.mem_support_iff, Finset.mem_erase,\n    id.def, LinearMap.id_coe, LinearMap.smul_apply, Ne.def, smul_eq_zero, sub_eq_zero, this]\n    -- The entries of `l'` add up to `0`.\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\n⊢ DFinsupp.support l' = l_support'\n[PROOFSTEP]\nrw [← Finset.erase_insert hμ₀, ← h_l_support]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\n⊢ DFinsupp.support l' = Finset.erase (DFinsupp.support l) μ₀\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\na : K\n⊢ a ∈ DFinsupp.support l' ↔ a ∈ Finset.erase (DFinsupp.support l) μ₀\n[PROOFSTEP]\nhave : ¬(a = μ₀ ∨ l a = 0) ↔ ¬a = μ₀ ∧ ¬l a = 0 := not_or\n[GOAL]\ncase a\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\na : K\nthis : ¬(a = μ₀ ∨ ↑l a = 0) ↔ ¬a = μ₀ ∧ ¬↑l a = 0\n⊢ a ∈ DFinsupp.support l' ↔ a ∈ Finset.erase (DFinsupp.support l) μ₀\n[PROOFSTEP]\nsimp only [DFinsupp.mapRange.linearMap_apply, DFinsupp.mapRange_apply, DFinsupp.mem_support_iff, Finset.mem_erase,\n  id.def, LinearMap.id_coe, LinearMap.smul_apply, Ne.def, smul_eq_zero, sub_eq_zero, this]\n  -- The entries of `l'` add up to `0`.\n[GOAL]\ncase insert\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\n⊢ l = 0\n[PROOFSTEP]\nhave total_l' : S l' = 0 := by\n  let g := f - algebraMap K (End K V) μ₀\n  let a : Π₀ _ : K, V := DFinsupp.mapRange.linearMap (fun μ => (f.eigenspace μ).subtype) l\n  calc\n    S l' = DFinsupp.lsum ℕ (fun μ => (f.eigenspace μ).subtype.comp ((μ - μ₀) • LinearMap.id)) l := ?_\n    _ = DFinsupp.lsum ℕ (fun μ => g.comp (f.eigenspace μ).subtype) l := ?_\n    _ = DFinsupp.lsum ℕ (fun _ => g) a := ?_\n    _ = g (DFinsupp.lsum ℕ (fun _ => (LinearMap.id : V →ₗ[K] V)) a) := ?_\n    _ = g (S l) := ?_\n    _ = 0 := by rw [hl, g.map_zero]\n  · exact DFinsupp.sum_mapRange_index.linearMap\n  · congr\n    ext μ v\n    simp only [LinearMap.coe_comp, Function.comp_apply, LinearMap.smul_apply, LinearMap.id_coe, id.def, sub_smul,\n      Submodule.subtype_apply, Submodule.coe_sub, Submodule.coe_smul_of_tower, LinearMap.sub_apply,\n      mem_eigenspace_iff.1 v.prop, algebraMap_end_apply]\n  · rw [DFinsupp.sum_mapRange_index.linearMap]\n  ·\n    simp only [DFinsupp.sumAddHom_apply, LinearMap.id_coe, LinearMap.map_dfinsupp_sum, id.def,\n      LinearMap.toAddMonoidHom_coe, DFinsupp.lsum_apply_apply]\n  ·\n    simp only [DFinsupp.sum_mapRange_index.linearMap, LinearMap.id_comp]\n      -- Therefore, by the induction hypothesis, all entries of `l'` are zero.\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\n⊢ ↑S l' = 0\n[PROOFSTEP]\nlet g := f - algebraMap K (End K V) μ₀\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ng : End K V := f - ↑(algebraMap K (End K V)) μ₀\n⊢ ↑S l' = 0\n[PROOFSTEP]\nlet a : Π₀ _ : K, V := DFinsupp.mapRange.linearMap (fun μ => (f.eigenspace μ).subtype) l\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ng : End K V := f - ↑(algebraMap K (End K V)) μ₀\na : Π₀ (x : K), V := ↑(DFinsupp.mapRange.linearMap fun μ => Submodule.subtype (eigenspace f μ)) l\n⊢ ↑S l' = 0\n[PROOFSTEP]\ncalc\n  S l' = DFinsupp.lsum ℕ (fun μ => (f.eigenspace μ).subtype.comp ((μ - μ₀) • LinearMap.id)) l := ?_\n  _ = DFinsupp.lsum ℕ (fun μ => g.comp (f.eigenspace μ).subtype) l := ?_\n  _ = DFinsupp.lsum ℕ (fun _ => g) a := ?_\n  _ = g (DFinsupp.lsum ℕ (fun _ => (LinearMap.id : V →ₗ[K] V)) a) := ?_\n  _ = g (S l) := ?_\n  _ = 0 := by rw [hl, g.map_zero]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ng : End K V := f - ↑(algebraMap K (End K V)) μ₀\na : Π₀ (x : K), V := ↑(DFinsupp.mapRange.linearMap fun μ => Submodule.subtype (eigenspace f μ)) l\n⊢ ↑g (↑S l) = 0\n[PROOFSTEP]\nrw [hl, g.map_zero]\n[GOAL]\ncase calc_1\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ng : End K V := f - ↑(algebraMap K (End K V)) μ₀\na : Π₀ (x : K), V := ↑(DFinsupp.mapRange.linearMap fun μ => Submodule.subtype (eigenspace f μ)) l\n⊢ ↑S l' = ↑(↑(DFinsupp.lsum ℕ) fun μ => LinearMap.comp (Submodule.subtype (eigenspace f μ)) ((μ - μ₀) • LinearMap.id)) l\n[PROOFSTEP]\nexact DFinsupp.sum_mapRange_index.linearMap\n[GOAL]\ncase calc_2\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ng : End K V := f - ↑(algebraMap K (End K V)) μ₀\na : Π₀ (x : K), V := ↑(DFinsupp.mapRange.linearMap fun μ => Submodule.subtype (eigenspace f μ)) l\n⊢ ↑(↑(DFinsupp.lsum ℕ) fun μ => LinearMap.comp (Submodule.subtype (eigenspace f μ)) ((μ - μ₀) • LinearMap.id)) l =\n    ↑(↑(DFinsupp.lsum ℕ) fun μ => LinearMap.comp g (Submodule.subtype (eigenspace f μ))) l\n[PROOFSTEP]\ncongr\n[GOAL]\ncase calc_2.e_a.h.e_6.h\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ng : End K V := f - ↑(algebraMap K (End K V)) μ₀\na : Π₀ (x : K), V := ↑(DFinsupp.mapRange.linearMap fun μ => Submodule.subtype (eigenspace f μ)) l\n⊢ (fun μ => LinearMap.comp (Submodule.subtype (eigenspace f μ)) ((μ - μ₀) • LinearMap.id)) = fun μ =>\n    LinearMap.comp g (Submodule.subtype (eigenspace f μ))\n[PROOFSTEP]\next μ v\n[GOAL]\ncase calc_2.e_a.h.e_6.h.h.h\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ng : End K V := f - ↑(algebraMap K (End K V)) μ₀\na : Π₀ (x : K), V := ↑(DFinsupp.mapRange.linearMap fun μ => Submodule.subtype (eigenspace f μ)) l\nμ : K\nv : { x // x ∈ eigenspace f μ }\n⊢ ↑(LinearMap.comp (Submodule.subtype (eigenspace f μ)) ((μ - μ₀) • LinearMap.id)) v =\n    ↑(LinearMap.comp g (Submodule.subtype (eigenspace f μ))) v\n[PROOFSTEP]\nsimp only [LinearMap.coe_comp, Function.comp_apply, LinearMap.smul_apply, LinearMap.id_coe, id.def, sub_smul,\n  Submodule.subtype_apply, Submodule.coe_sub, Submodule.coe_smul_of_tower, LinearMap.sub_apply,\n  mem_eigenspace_iff.1 v.prop, algebraMap_end_apply]\n[GOAL]\ncase calc_3\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ng : End K V := f - ↑(algebraMap K (End K V)) μ₀\na : Π₀ (x : K), V := ↑(DFinsupp.mapRange.linearMap fun μ => Submodule.subtype (eigenspace f μ)) l\n⊢ ↑(↑(DFinsupp.lsum ℕ) fun μ => LinearMap.comp g (Submodule.subtype (eigenspace f μ))) l =\n    ↑(↑(DFinsupp.lsum ℕ) fun x => g) a\n[PROOFSTEP]\nrw [DFinsupp.sum_mapRange_index.linearMap]\n[GOAL]\ncase calc_4\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ng : End K V := f - ↑(algebraMap K (End K V)) μ₀\na : Π₀ (x : K), V := ↑(DFinsupp.mapRange.linearMap fun μ => Submodule.subtype (eigenspace f μ)) l\n⊢ ↑(↑(DFinsupp.lsum ℕ) fun x => g) a = ↑g (↑(↑(DFinsupp.lsum ℕ) fun x => LinearMap.id) a)\n[PROOFSTEP]\nsimp only [DFinsupp.sumAddHom_apply, LinearMap.id_coe, LinearMap.map_dfinsupp_sum, id.def, LinearMap.toAddMonoidHom_coe,\n  DFinsupp.lsum_apply_apply]\n[GOAL]\ncase calc_5\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ng : End K V := f - ↑(algebraMap K (End K V)) μ₀\na : Π₀ (x : K), V := ↑(DFinsupp.mapRange.linearMap fun μ => Submodule.subtype (eigenspace f μ)) l\n⊢ ↑g (↑(↑(DFinsupp.lsum ℕ) fun x => LinearMap.id) a) = ↑g (↑S l)\n[PROOFSTEP]\nsimp only [DFinsupp.sum_mapRange_index.linearMap, LinearMap.id_comp]\n  -- Therefore, by the induction hypothesis, all entries of `l'` are zero.\n[GOAL]\ncase insert\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\n⊢ l = 0\n[PROOFSTEP]\nhave l'_eq_0 := ih l' total_l' h_l_support'\n[GOAL]\ncase insert\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\n⊢ l = 0\n[PROOFSTEP]\nhave h_smul_eq_0 : ∀ μ, (μ - μ₀) • l μ = 0 := by\n  intro μ\n  calc\n    (μ - μ₀) • l μ = l' μ := by\n      simp only [LinearMap.id_coe, id.def, LinearMap.smul_apply, DFinsupp.mapRange_apply,\n        DFinsupp.mapRange.linearMap_apply]\n    _ = 0 := by rw [l'_eq_0];\n      rfl\n        -- Thus, the eigenspace-representatives in `l` for all `μ ≠ μ₀` are `0`.\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\n⊢ ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\n[PROOFSTEP]\nintro μ\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nμ : K\n⊢ (μ - μ₀) • ↑l μ = 0\n[PROOFSTEP]\ncalc\n  (μ - μ₀) • l μ = l' μ := by\n    simp only [LinearMap.id_coe, id.def, LinearMap.smul_apply, DFinsupp.mapRange_apply,\n      DFinsupp.mapRange.linearMap_apply]\n  _ = 0 := by rw [l'_eq_0];\n    rfl\n      -- Thus, the eigenspace-representatives in `l` for all `μ ≠ μ₀` are `0`.\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nμ : K\n⊢ (μ - μ₀) • ↑l μ = ↑l' μ\n[PROOFSTEP]\nsimp only [LinearMap.id_coe, id.def, LinearMap.smul_apply, DFinsupp.mapRange_apply, DFinsupp.mapRange.linearMap_apply]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nμ : K\n⊢ ↑l' μ = 0\n[PROOFSTEP]\nrw [l'_eq_0]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nμ : K\n⊢ ↑0 μ = 0\n[PROOFSTEP]\nrfl\n  -- Thus, the eigenspace-representatives in `l` for all `μ ≠ μ₀` are `0`.\n[GOAL]\ncase insert\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\n⊢ l = 0\n[PROOFSTEP]\nhave h_lμ_eq_0 : ∀ μ : K, μ ≠ μ₀ → l μ = 0 := by\n  intro μ hμ\n  apply or_iff_not_imp_left.1 (smul_eq_zero.1 (h_smul_eq_0 μ))\n  rwa [sub_eq_zero]\n    -- So if we sum over all these representatives, we obtain `0`.\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\n⊢ ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\n[PROOFSTEP]\nintro μ hμ\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nμ : K\nhμ : μ ≠ μ₀\n⊢ ↑l μ = 0\n[PROOFSTEP]\napply or_iff_not_imp_left.1 (smul_eq_zero.1 (h_smul_eq_0 μ))\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nμ : K\nhμ : μ ≠ μ₀\n⊢ ¬μ - μ₀ = 0\n[PROOFSTEP]\nrwa [sub_eq_zero]\n  -- So if we sum over all these representatives, we obtain `0`.\n[GOAL]\ncase insert\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\n⊢ l = 0\n[PROOFSTEP]\nhave h_sum_l_support'_eq_0 : (Finset.sum l_support' fun μ => (l μ : V)) = 0 :=\n  by\n  rw [← Finset.sum_const_zero]\n  apply Finset.sum_congr rfl\n  intro μ hμ\n  rw [Submodule.coe_eq_zero, h_lμ_eq_0]\n  rintro rfl\n  exact hμ₀ hμ\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\n⊢ (Finset.sum l_support' fun μ => ↑(↑l μ)) = 0\n[PROOFSTEP]\nrw [← Finset.sum_const_zero]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\n⊢ (Finset.sum l_support' fun μ => ↑(↑l μ)) = Finset.sum ?m.347048 fun _x => 0\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\n⊢ Type ?u.347044\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\n⊢ Finset ?m.347047\n[PROOFSTEP]\napply Finset.sum_congr rfl\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\n⊢ ∀ (x : K), x ∈ l_support' → ↑(↑l x) = 0\n[PROOFSTEP]\nintro μ hμ\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\nμ : K\nhμ : μ ∈ l_support'\n⊢ ↑(↑l μ) = 0\n[PROOFSTEP]\nrw [Submodule.coe_eq_zero, h_lμ_eq_0]\n[GOAL]\ncase a\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\nμ : K\nhμ : μ ∈ l_support'\n⊢ μ ≠ μ₀\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase a\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nl_support' : Finset K\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nμ : K\nhμ : μ ∈ l_support'\nhμ₀ : ¬μ ∈ l_support'\nh_l_support : DFinsupp.support l = insert μ l_support'\nl' : Π₀ (i : K), { x // x ∈ eigenspace f i } := ↑(DFinsupp.mapRange.linearMap fun μ_1 => (μ_1 - μ) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ_1 : K), (μ_1 - μ) • ↑l μ_1 = 0\nh_lμ_eq_0 : ∀ (μ_1 : K), μ_1 ≠ μ → ↑l μ_1 = 0\n⊢ False\n[PROOFSTEP]\nexact hμ₀ hμ\n[GOAL]\ncase insert\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\nh_sum_l_support'_eq_0 : (Finset.sum l_support' fun μ => ↑(↑l μ)) = 0\n⊢ l = 0\n[PROOFSTEP]\nhave : l μ₀ = 0 :=\n  by\n  simp only [DFinsupp.lsum_apply_apply, DFinsupp.sumAddHom_apply, LinearMap.toAddMonoidHom_coe, DFinsupp.sum,\n    h_l_support, Submodule.subtype_apply, Submodule.coe_eq_zero, Finset.sum_insert hμ₀, h_sum_l_support'_eq_0,\n    add_zero] at hl \n  exact hl\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\nh_sum_l_support'_eq_0 : (Finset.sum l_support' fun μ => ↑(↑l μ)) = 0\n⊢ ↑l μ₀ = 0\n[PROOFSTEP]\nsimp only [DFinsupp.lsum_apply_apply, DFinsupp.sumAddHom_apply, LinearMap.toAddMonoidHom_coe, DFinsupp.sum, h_l_support,\n  Submodule.subtype_apply, Submodule.coe_eq_zero, Finset.sum_insert hμ₀, h_sum_l_support'_eq_0, add_zero] at hl \n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\nh_sum_l_support'_eq_0 : (Finset.sum l_support' fun μ => ↑(↑l μ)) = 0\nhl : ↑l μ₀ = 0\n⊢ ↑l μ₀ = 0\n[PROOFSTEP]\nexact hl\n[GOAL]\ncase insert\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\nh_sum_l_support'_eq_0 : (Finset.sum l_support' fun μ => ↑(↑l μ)) = 0\nthis : ↑l μ₀ = 0\n⊢ l = 0\n[PROOFSTEP]\nshow l = 0\n[GOAL]\ncase insert\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\nh_sum_l_support'_eq_0 : (Finset.sum l_support' fun μ => ↑(↑l μ)) = 0\nthis : ↑l μ₀ = 0\n⊢ l = 0\n[PROOFSTEP]\next μ\n[GOAL]\ncase insert.h.a\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\nh_sum_l_support'_eq_0 : (Finset.sum l_support' fun μ => ↑(↑l μ)) = 0\nthis : ↑l μ₀ = 0\nμ : K\n⊢ ↑(↑l μ) = ↑(↑0 μ)\n[PROOFSTEP]\nby_cases h_cases : μ = μ₀\n[GOAL]\ncase pos\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\nh_sum_l_support'_eq_0 : (Finset.sum l_support' fun μ => ↑(↑l μ)) = 0\nthis : ↑l μ₀ = 0\nμ : K\nh_cases : μ = μ₀\n⊢ ↑(↑l μ) = ↑(↑0 μ)\n[PROOFSTEP]\nrwa [h_cases, SetLike.coe_eq_coe, DFinsupp.coe_zero, Pi.zero_apply]\n[GOAL]\ncase neg\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nS : (Π₀ (μ : K), { x // x ∈ eigenspace f μ }) →ₗ[K] V := ↑(DFinsupp.lsum ℕ) fun μ => Submodule.subtype (eigenspace f μ)\nl✝ : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl✝ : ↑S l✝ = 0\nx✝ : Finset K\nh_l_support✝ : DFinsupp.support l✝ = x✝\nμ₀ : K\nl_support' : Finset K\nhμ₀ : ¬μ₀ ∈ l_support'\nih : ∀ (l : Π₀ (μ : K), { x // x ∈ eigenspace f μ }), ↑S l = 0 → DFinsupp.support l = l_support' → l = 0\nl : Π₀ (μ : K), { x // x ∈ eigenspace f μ }\nhl : ↑S l = 0\nh_l_support : DFinsupp.support l = insert μ₀ l_support'\nl' : (fun x => Π₀ (i : K), { x // x ∈ eigenspace f i }) l :=\n  ↑(DFinsupp.mapRange.linearMap fun μ => (μ - μ₀) • LinearMap.id) l\nh_l_support' : DFinsupp.support l' = l_support'\ntotal_l' : ↑S l' = 0\nl'_eq_0 : l' = 0\nh_smul_eq_0 : ∀ (μ : K), (μ - μ₀) • ↑l μ = 0\nh_lμ_eq_0 : ∀ (μ : K), μ ≠ μ₀ → ↑l μ = 0\nh_sum_l_support'_eq_0 : (Finset.sum l_support' fun μ => ↑(↑l μ)) = 0\nthis : ↑l μ₀ = 0\nμ : K\nh_cases : ¬μ = μ₀\n⊢ ↑(↑l μ) = ↑(↑0 μ)\n[PROOFSTEP]\nexact congr_arg _ (h_lμ_eq_0 μ h_cases)\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk m : ℕ\nhm : k ≤ m\n⊢ (fun k => LinearMap.ker ((f - ↑(algebraMap R (End R M)) μ) ^ k)) k ≤\n    (fun k => LinearMap.ker ((f - ↑(algebraMap R (End R M)) μ) ^ k)) m\n[PROOFSTEP]\nsimp only [← pow_sub_mul_pow _ hm]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk m : ℕ\nhm : k ≤ m\n⊢ LinearMap.ker ((f - ↑(algebraMap R (End R M)) μ) ^ k) ≤\n    LinearMap.ker ((f - ↑(algebraMap R (End R M)) μ) ^ (m - k) * (f - ↑(algebraMap R (End R M)) μ) ^ k)\n[PROOFSTEP]\nexact LinearMap.ker_le_ker_comp ((f - algebraMap R (End R M) μ) ^ k) ((f - algebraMap R (End R M) μ) ^ (m - k))\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nk : ℕ\n⊢ ↑(generalizedEigenspace f 0) k = LinearMap.ker (f ^ k)\n[PROOFSTEP]\nsimp [Module.End.generalizedEigenspace]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk : ℕ\nh : HasGeneralizedEigenvalue f μ k\n⊢ k ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nh : HasGeneralizedEigenvalue f μ 0\n⊢ False\n[PROOFSTEP]\nexact h LinearMap.ker_id\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nm : M\n⊢ m ∈ maximalGeneralizedEigenspace f μ ↔ ∃ k, ↑((f - μ • 1) ^ k) m = 0\n[PROOFSTEP]\nsimp only [maximalGeneralizedEigenspace, ← mem_generalizedEigenspace, Submodule.mem_iSup_of_chain]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nh : IsNoetherian R M\nf : End R M\nμ : R\n⊢ maximalGeneralizedEigenspace f μ = ↑(generalizedEigenspace f μ) (maximalGeneralizedEigenspaceIndex f μ)\n[PROOFSTEP]\nrw [isNoetherian_iff_wellFounded] at h \n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nh : WellFounded fun x x_1 => x > x_1\nf : End R M\nμ : R\n⊢ maximalGeneralizedEigenspace f μ = ↑(generalizedEigenspace f μ) (maximalGeneralizedEigenspaceIndex f μ)\n[PROOFSTEP]\nexact (WellFounded.iSup_eq_monotonicSequenceLimit h (f.generalizedEigenspace μ) : _)\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk m : ℕ\nhm : k ≤ m\nhk : HasGeneralizedEigenvalue f μ k\n⊢ HasGeneralizedEigenvalue f μ m\n[PROOFSTEP]\nunfold HasGeneralizedEigenvalue at *\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk m : ℕ\nhm : k ≤ m\nhk : ↑(generalizedEigenspace f μ) k ≠ ⊥\n⊢ ↑(generalizedEigenspace f μ) m ≠ ⊥\n[PROOFSTEP]\ncontrapose! hk\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk m : ℕ\nhm : k ≤ m\nhk : ↑(generalizedEigenspace f μ) m = ⊥\n⊢ ↑(generalizedEigenspace f μ) k = ⊥\n[PROOFSTEP]\nrw [← le_bot_iff, ← hk]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk m : ℕ\nhm : k ≤ m\nhk : ↑(generalizedEigenspace f μ) m = ⊥\n⊢ ↑(generalizedEigenspace f μ) k ≤ ↑(generalizedEigenspace f μ) m\n[PROOFSTEP]\nexact (f.generalizedEigenspace μ).monotone hm\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk : ℕ\nhk : 0 < k\nhμ : HasEigenvalue f μ\n⊢ HasGeneralizedEigenvalue f μ k\n[PROOFSTEP]\napply hasGeneralizedEigenvalue_of_hasGeneralizedEigenvalue_of_le hk\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk : ℕ\nhk : 0 < k\nhμ : HasEigenvalue f μ\n⊢ HasGeneralizedEigenvalue f μ (Nat.succ 0)\n[PROOFSTEP]\nrw [HasGeneralizedEigenvalue, generalizedEigenspace, OrderHom.coe_mk, pow_one]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk : ℕ\nhk : 0 < k\nhμ : HasEigenvalue f μ\n⊢ LinearMap.ker (f - ↑(algebraMap R (End R M)) μ) ≠ ⊥\n[PROOFSTEP]\nexact hμ\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk : ℕ\nhμ : HasGeneralizedEigenvalue f μ k\n⊢ HasEigenvalue f μ\n[PROOFSTEP]\nintro contra\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk : ℕ\nhμ : HasGeneralizedEigenvalue f μ k\ncontra : eigenspace f μ = ⊥\n⊢ False\n[PROOFSTEP]\napply hμ\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk : ℕ\nhμ : HasGeneralizedEigenvalue f μ k\ncontra : eigenspace f μ = ⊥\n⊢ ↑(generalizedEigenspace f μ) k = ⊥\n[PROOFSTEP]\nerw [LinearMap.ker_eq_bot] at contra ⊢\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk : ℕ\nhμ : HasGeneralizedEigenvalue f μ k\ncontra : Function.Injective ↑(f - ↑(algebraMap R (End R M)) μ)\n⊢ Function.Injective ↑((f - ↑(algebraMap R (End R M)) μ) ^ k)\n[PROOFSTEP]\nrw [LinearMap.coe_pow]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\nμ : R\nk : ℕ\nhμ : HasGeneralizedEigenvalue f μ k\ncontra : Function.Injective ↑(f - ↑(algebraMap R (End R M)) μ)\n⊢ Function.Injective (↑(f - ↑(algebraMap R (End R M)) μ))^[k]\n[PROOFSTEP]\nexact Function.Injective.iterate contra k\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\np : Submodule R M\nk : ℕ\nμ : R\nhfp : ∀ (x : M), x ∈ p → ↑f x ∈ p\n⊢ ↑(generalizedEigenspace (LinearMap.restrict f hfp) μ) k =\n    Submodule.comap (Submodule.subtype p) (↑(generalizedEigenspace f μ) k)\n[PROOFSTEP]\nsimp only [generalizedEigenspace, OrderHom.coe_mk, ← LinearMap.ker_comp]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\np : Submodule R M\nk : ℕ\nμ : R\nhfp : ∀ (x : M), x ∈ p → ↑f x ∈ p\n⊢ LinearMap.ker ((LinearMap.restrict f hfp - ↑(algebraMap R (End R { x // x ∈ p })) μ) ^ k) =\n    LinearMap.ker (LinearMap.comp ((f - ↑(algebraMap R (End R M)) μ) ^ k) (Submodule.subtype p))\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\np : Submodule R M\nμ : R\nhfp : ∀ (x : M), x ∈ p → ↑f x ∈ p\n⊢ LinearMap.ker ((LinearMap.restrict f hfp - ↑(algebraMap R (End R { x // x ∈ p })) μ) ^ Nat.zero) =\n    LinearMap.ker (LinearMap.comp ((f - ↑(algebraMap R (End R M)) μ) ^ Nat.zero) (Submodule.subtype p))\n[PROOFSTEP]\nrw [pow_zero, pow_zero, LinearMap.one_eq_id]\n[GOAL]\ncase zero\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\np : Submodule R M\nμ : R\nhfp : ∀ (x : M), x ∈ p → ↑f x ∈ p\n⊢ LinearMap.ker LinearMap.id = LinearMap.ker (LinearMap.comp 1 (Submodule.subtype p))\n[PROOFSTEP]\napply (Submodule.ker_subtype _).symm\n[GOAL]\ncase succ\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\np : Submodule R M\nμ : R\nhfp : ∀ (x : M), x ∈ p → ↑f x ∈ p\nk : ℕ\nih :\n  LinearMap.ker ((LinearMap.restrict f hfp - ↑(algebraMap R (End R { x // x ∈ p })) μ) ^ k) =\n    LinearMap.ker (LinearMap.comp ((f - ↑(algebraMap R (End R M)) μ) ^ k) (Submodule.subtype p))\n⊢ LinearMap.ker ((LinearMap.restrict f hfp - ↑(algebraMap R (End R { x // x ∈ p })) μ) ^ Nat.succ k) =\n    LinearMap.ker (LinearMap.comp ((f - ↑(algebraMap R (End R M)) μ) ^ Nat.succ k) (Submodule.subtype p))\n[PROOFSTEP]\nerw [pow_succ', pow_succ', LinearMap.ker_comp, LinearMap.ker_comp, ih, ← LinearMap.ker_comp, LinearMap.comp_assoc]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\np : Submodule R M\nhfp : ∀ (x : M), x ∈ p → ↑f x ∈ p\nμ : R\n⊢ Submodule.map (Submodule.subtype p) (eigenspace (LinearMap.restrict f hfp) μ) ≤ eigenspace f μ\n[PROOFSTEP]\nrintro a ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\np : Submodule R M\nhfp : ∀ (x : M), x ∈ p → ↑f x ∈ p\nμ : R\nx : { x // x ∈ p }\nhx : x ∈ ↑(eigenspace (LinearMap.restrict f hfp) μ)\n⊢ ↑(Submodule.subtype p) x ∈ eigenspace f μ\n[PROOFSTEP]\nsimp only [SetLike.mem_coe, mem_eigenspace_iff, LinearMap.restrict_apply] at hx ⊢\n[GOAL]\ncase intro.intro\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\np : Submodule R M\nhfp : ∀ (x : M), x ∈ p → ↑f x ∈ p\nμ : R\nx : { x // x ∈ p }\nhx : { val := ↑f ↑x, property := (_ : ↑f ↑x ∈ p) } = μ • x\n⊢ ↑f (↑(Submodule.subtype p) x) = μ • ↑(Submodule.subtype p) x\n[PROOFSTEP]\nexact congr_arg Subtype.val hx\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\n⊢ Disjoint (generalizedEigenrange f μ (finrank K V)) (↑(generalizedEigenspace f μ) (finrank K V))\n[PROOFSTEP]\nhave h :=\n  calc\n    Submodule.comap ((f - algebraMap _ _ μ) ^ finrank K V) (f.generalizedEigenspace μ (finrank K V)) =\n        LinearMap.ker ((f - algebraMap _ _ μ) ^ finrank K V * (f - algebraMap K (End K V) μ) ^ finrank K V) :=\n      by rw [generalizedEigenspace, OrderHom.coe_mk, ← LinearMap.ker_comp]; rfl\n    _ = f.generalizedEigenspace μ (finrank K V + finrank K V) := by rw [← pow_add]; rfl\n    _ = f.generalizedEigenspace μ (finrank K V) := by rw [generalizedEigenspace_eq_generalizedEigenspace_finrank_of_le];\n      linarith\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\n⊢ Submodule.comap ((f - ↑(algebraMap K (End K V)) μ) ^ finrank K V) (↑(generalizedEigenspace f μ) (finrank K V)) =\n    LinearMap.ker ((f - ↑(algebraMap K (End K V)) μ) ^ finrank K V * (f - ↑(algebraMap K (End K V)) μ) ^ finrank K V)\n[PROOFSTEP]\nrw [generalizedEigenspace, OrderHom.coe_mk, ← LinearMap.ker_comp]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\n⊢ LinearMap.ker\n      (LinearMap.comp ((f - ↑(algebraMap K (End K V)) μ) ^ finrank K V)\n        ((f - ↑(algebraMap K (End K V)) μ) ^ finrank K V)) =\n    LinearMap.ker ((f - ↑(algebraMap K (End K V)) μ) ^ finrank K V * (f - ↑(algebraMap K (End K V)) μ) ^ finrank K V)\n[PROOFSTEP]\nrfl\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\n⊢ LinearMap.ker ((f - ↑(algebraMap K (End K V)) μ) ^ finrank K V * (f - ↑(algebraMap K (End K V)) μ) ^ finrank K V) =\n    ↑(generalizedEigenspace f μ) (finrank K V + finrank K V)\n[PROOFSTEP]\nrw [← pow_add]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\n⊢ LinearMap.ker ((f - ↑(algebraMap K (End K V)) μ) ^ (finrank K V + finrank K V)) =\n    ↑(generalizedEigenspace f μ) (finrank K V + finrank K V)\n[PROOFSTEP]\nrfl\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\n⊢ ↑(generalizedEigenspace f μ) (finrank K V + finrank K V) = ↑(generalizedEigenspace f μ) (finrank K V)\n[PROOFSTEP]\nrw [generalizedEigenspace_eq_generalizedEigenspace_finrank_of_le]\n[GOAL]\ncase hk\nK R : Type v\nV M : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\n⊢ finrank K V ≤ finrank K V + finrank K V\n[PROOFSTEP]\nlinarith\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh :\n  Submodule.comap ((f - ↑(algebraMap K (End K V)) μ) ^ finrank K V) (↑(generalizedEigenspace f μ) (finrank K V)) =\n    ↑(generalizedEigenspace f μ) (finrank K V)\n⊢ Disjoint (generalizedEigenrange f μ (finrank K V)) (↑(generalizedEigenspace f μ) (finrank K V))\n[PROOFSTEP]\nrw [disjoint_iff_inf_le, generalizedEigenrange, LinearMap.range_eq_map, Submodule.map_inf_eq_map_inf_comap, top_inf_eq,\n  h]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh :\n  Submodule.comap ((f - ↑(algebraMap K (End K V)) μ) ^ finrank K V) (↑(generalizedEigenspace f μ) (finrank K V)) =\n    ↑(generalizedEigenspace f μ) (finrank K V)\n⊢ Submodule.map ((f - ↑(algebraMap K (End K V)) μ) ^ finrank K V) (↑(generalizedEigenspace f μ) (finrank K V)) ≤ ⊥\n[PROOFSTEP]\napply Submodule.map_comap_le\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\np : Submodule R M\nhfp : ∀ (x : M), x ∈ p → ↑f x ∈ p\nμ : R\nhμp : Disjoint (eigenspace f μ) p\n⊢ eigenspace (LinearMap.restrict f hfp) μ = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\np : Submodule R M\nhfp : ∀ (x : M), x ∈ p → ↑f x ∈ p\nμ : R\nhμp : Disjoint (eigenspace f μ) p\n⊢ eigenspace (LinearMap.restrict f hfp) μ ≤ ⊥\n[PROOFSTEP]\nintro x hx\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End R M\np : Submodule R M\nhfp : ∀ (x : M), x ∈ p → ↑f x ∈ p\nμ : R\nhμp : Disjoint (eigenspace f μ) p\nx : { x // x ∈ p }\nhx : x ∈ eigenspace (LinearMap.restrict f hfp) μ\n⊢ x ∈ ⊥\n[PROOFSTEP]\nsimpa using hμp.le_bot ⟨eigenspace_restrict_le_eigenspace f hfp μ ⟨x, hx, rfl⟩, x.prop⟩\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nk : ℕ\nμ : K\nhx : HasEigenvalue f μ\nhk : 0 < k\n⊢ 0 = finrank K { x // x ∈ ⊥ }\n[PROOFSTEP]\nrw [finrank_bot]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nμ : K\nn : ℕ\n⊢ Submodule.map f (generalizedEigenrange f μ n) = LinearMap.range (f * (f - ↑(algebraMap K (End K V)) μ) ^ n)\n[PROOFSTEP]\nrw [generalizedEigenrange]\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nμ : K\nn : ℕ\n⊢ Submodule.map f (LinearMap.range ((f - ↑(algebraMap K (End K V)) μ) ^ n)) =\n    LinearMap.range (f * (f - ↑(algebraMap K (End K V)) μ) ^ n)\n[PROOFSTEP]\nexact (LinearMap.range_comp _ _).symm\n[GOAL]\nK R : Type v\nV M : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nμ : K\nn : ℕ\n⊢ LinearMap.range (f * (f - ↑(algebraMap K (End K V)) μ) ^ n) =\n    LinearMap.range ((f - ↑(algebraMap K (End K V)) μ) ^ n * f)\n[PROOFSTEP]\nrw [Algebra.mul_sub_algebraMap_pow_commutes]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Eigenspace.Basic", "llama_tokens": 42678, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499941, "lm_q2_score": 0.588889130767832, "lm_q1q2_score": 0.3897991869946466}}
{"text": "[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc d : Concept α β r\nh : c.fst = d.fst\n⊢ c = d\n[PROOFSTEP]\nobtain ⟨⟨s₁, t₁⟩, h₁, _⟩ := c\n[GOAL]\ncase mk.mk\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁✝ s₂ : Set α\nt t₁✝ t₂ : Set β\nd : Concept α β r\ns₁ : Set α\nt₁ : Set β\nh₁ : intentClosure r (s₁, t₁).fst = (s₁, t₁).snd\nclosure_snd✝ : extentClosure r (s₁, t₁).snd = (s₁, t₁).fst\nh : { toProd := (s₁, t₁), closure_fst := h₁, closure_snd := closure_snd✝ }.toProd.fst = d.fst\n⊢ { toProd := (s₁, t₁), closure_fst := h₁, closure_snd := closure_snd✝ } = d\n[PROOFSTEP]\nobtain ⟨⟨s₂, t₂⟩, h₂, _⟩ := d\n[GOAL]\ncase mk.mk.mk.mk\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁✝ s₂✝ : Set α\nt t₁✝ t₂✝ : Set β\ns₁ : Set α\nt₁ : Set β\nh₁ : intentClosure r (s₁, t₁).fst = (s₁, t₁).snd\nclosure_snd✝¹ : extentClosure r (s₁, t₁).snd = (s₁, t₁).fst\ns₂ : Set α\nt₂ : Set β\nh₂ : intentClosure r (s₂, t₂).fst = (s₂, t₂).snd\nclosure_snd✝ : extentClosure r (s₂, t₂).snd = (s₂, t₂).fst\nh :\n  { toProd := (s₁, t₁), closure_fst := h₁, closure_snd := closure_snd✝¹ }.toProd.fst =\n    { toProd := (s₂, t₂), closure_fst := h₂, closure_snd := closure_snd✝ }.toProd.fst\n⊢ { toProd := (s₁, t₁), closure_fst := h₁, closure_snd := closure_snd✝¹ } =\n    { toProd := (s₂, t₂), closure_fst := h₂, closure_snd := closure_snd✝ }\n[PROOFSTEP]\ndsimp at h₁ h₂ h \n[GOAL]\ncase mk.mk.mk.mk\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁✝ s₂✝ : Set α\nt t₁✝ t₂✝ : Set β\ns₁ : Set α\nt₁ : Set β\nh₁ : intentClosure r s₁ = t₁\nclosure_snd✝¹ : extentClosure r (s₁, t₁).snd = (s₁, t₁).fst\ns₂ : Set α\nt₂ : Set β\nh₂ : intentClosure r s₂ = t₂\nclosure_snd✝ : extentClosure r (s₂, t₂).snd = (s₂, t₂).fst\nh : s₁ = s₂\n⊢ { toProd := (s₁, t₁), closure_fst := h₁, closure_snd := closure_snd✝¹ } =\n    { toProd := (s₂, t₂), closure_fst := h₂, closure_snd := closure_snd✝ }\n[PROOFSTEP]\nsubsts h h₁ h₂\n[GOAL]\ncase mk.mk.mk.mk\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁✝ s₂ : Set α\nt t₁ t₂ : Set β\ns₁ : Set α\nclosure_snd✝¹ closure_snd✝ : extentClosure r (s₁, intentClosure r s₁).snd = (s₁, intentClosure r s₁).fst\n⊢ { toProd := (s₁, intentClosure r s₁), closure_fst := (_ : intentClosure r s₁ = intentClosure r s₁),\n      closure_snd := closure_snd✝¹ } =\n    { toProd := (s₁, intentClosure r s₁), closure_fst := (_ : intentClosure r s₁ = intentClosure r s₁),\n      closure_snd := closure_snd✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc d : Concept α β r\nh : c.snd = d.snd\n⊢ c = d\n[PROOFSTEP]\nobtain ⟨⟨s₁, t₁⟩, _, h₁⟩ := c\n[GOAL]\ncase mk.mk\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁✝ s₂ : Set α\nt t₁✝ t₂ : Set β\nd : Concept α β r\ns₁ : Set α\nt₁ : Set β\nclosure_fst✝ : intentClosure r (s₁, t₁).fst = (s₁, t₁).snd\nh₁ : extentClosure r (s₁, t₁).snd = (s₁, t₁).fst\nh : { toProd := (s₁, t₁), closure_fst := closure_fst✝, closure_snd := h₁ }.toProd.snd = d.snd\n⊢ { toProd := (s₁, t₁), closure_fst := closure_fst✝, closure_snd := h₁ } = d\n[PROOFSTEP]\nobtain ⟨⟨s₂, t₂⟩, _, h₂⟩ := d\n[GOAL]\ncase mk.mk.mk.mk\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁✝ s₂✝ : Set α\nt t₁✝ t₂✝ : Set β\ns₁ : Set α\nt₁ : Set β\nclosure_fst✝¹ : intentClosure r (s₁, t₁).fst = (s₁, t₁).snd\nh₁ : extentClosure r (s₁, t₁).snd = (s₁, t₁).fst\ns₂ : Set α\nt₂ : Set β\nclosure_fst✝ : intentClosure r (s₂, t₂).fst = (s₂, t₂).snd\nh₂ : extentClosure r (s₂, t₂).snd = (s₂, t₂).fst\nh :\n  { toProd := (s₁, t₁), closure_fst := closure_fst✝¹, closure_snd := h₁ }.toProd.snd =\n    { toProd := (s₂, t₂), closure_fst := closure_fst✝, closure_snd := h₂ }.toProd.snd\n⊢ { toProd := (s₁, t₁), closure_fst := closure_fst✝¹, closure_snd := h₁ } =\n    { toProd := (s₂, t₂), closure_fst := closure_fst✝, closure_snd := h₂ }\n[PROOFSTEP]\ndsimp at h₁ h₂ h \n[GOAL]\ncase mk.mk.mk.mk\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁✝ s₂✝ : Set α\nt t₁✝ t₂✝ : Set β\ns₁ : Set α\nt₁ : Set β\nclosure_fst✝¹ : intentClosure r (s₁, t₁).fst = (s₁, t₁).snd\nh₁ : extentClosure r t₁ = s₁\ns₂ : Set α\nt₂ : Set β\nclosure_fst✝ : intentClosure r (s₂, t₂).fst = (s₂, t₂).snd\nh₂ : extentClosure r t₂ = s₂\nh : t₁ = t₂\n⊢ { toProd := (s₁, t₁), closure_fst := closure_fst✝¹, closure_snd := h₁ } =\n    { toProd := (s₂, t₂), closure_fst := closure_fst✝, closure_snd := h₂ }\n[PROOFSTEP]\nsubsts h h₁ h₂\n[GOAL]\ncase mk.mk.mk.mk\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁✝ t₂ t₁ : Set β\nclosure_fst✝¹ closure_fst✝ : intentClosure r (extentClosure r t₁, t₁).fst = (extentClosure r t₁, t₁).snd\n⊢ { toProd := (extentClosure r t₁, t₁), closure_fst := closure_fst✝¹,\n      closure_snd := (_ : extentClosure r t₁ = extentClosure r t₁) } =\n    { toProd := (extentClosure r t₁, t₁), closure_fst := closure_fst✝,\n      closure_snd := (_ : extentClosure r t₁ = extentClosure r t₁) }\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc✝ d✝ c d : Concept α β r\n⊢ intentClosure r (extentClosure r (c.snd ∩ d.snd), c.snd ∩ d.snd).fst =\n    (extentClosure r (c.snd ∩ d.snd), c.snd ∩ d.snd).snd\n[PROOFSTEP]\nrw [← c.closure_fst, ← d.closure_fst, ← intentClosure_union, intentClosure_extentClosure_intentClosure]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc✝ d✝ c d : Concept α β r\n⊢ extentClosure r (c.fst ∩ d.fst, intentClosure r (c.fst ∩ d.fst)).snd =\n    (c.fst ∩ d.fst, intentClosure r (c.fst ∩ d.fst)).fst\n[PROOFSTEP]\nrw [← c.closure_snd, ← d.closure_snd, ← extentClosure_union, extentClosure_intentClosure_extentClosure]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc d : Concept α β r\n⊢ c.snd ⊆ d.snd ↔ d ≤ c\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc d : Concept α β r\nh : c.snd ⊆ d.snd\n⊢ d ≤ c\n[PROOFSTEP]\nrw [← fst_subset_fst_iff, ← c.closure_snd, ← d.closure_snd]\n[GOAL]\ncase refine'_1\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc d : Concept α β r\nh : c.snd ⊆ d.snd\n⊢ extentClosure r d.snd ⊆ extentClosure r c.snd\n[PROOFSTEP]\nexact extentClosure_anti _ h\n[GOAL]\ncase refine'_2\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc d : Concept α β r\nh : d ≤ c\n⊢ c.snd ⊆ d.snd\n[PROOFSTEP]\nrw [← c.closure_fst, ← d.closure_fst]\n[GOAL]\ncase refine'_2\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc d : Concept α β r\nh : d ≤ c\n⊢ intentClosure r c.fst ⊆ intentClosure r d.fst\n[PROOFSTEP]\nexact intentClosure_anti _ h\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc d : Concept α β r\n⊢ c.snd ⊂ d.snd ↔ d < c\n[PROOFSTEP]\nrw [ssubset_iff_subset_not_subset, lt_iff_le_not_le, snd_subset_snd_iff, snd_subset_snd_iff]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc✝ d✝ : Concept α β r\nsrc✝ : SemilatticeInf (Concept α β r) := instSemilatticeInfConcept\nc d e : Concept α β r\n⊢ c ≤ e → d ≤ e → c ⊔ d ≤ e\n[PROOFSTEP]\nsimp_rw [← snd_subset_snd_iff]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc✝ d✝ : Concept α β r\nsrc✝ : SemilatticeInf (Concept α β r) := instSemilatticeInfConcept\nc d e : Concept α β r\n⊢ e.snd ⊆ c.snd → e.snd ⊆ d.snd → e.snd ⊆ (c ⊔ d).snd\n[PROOFSTEP]\nexact subset_inter\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc d : Concept α β r\nS : Set (Concept α β r)\n⊢ intentClosure r\n      (extentClosure r (⋂ (c : Concept α β r) (_ : c ∈ S), c.snd), ⋂ (c : Concept α β r) (_ : c ∈ S), c.snd).fst =\n    (extentClosure r (⋂ (c : Concept α β r) (_ : c ∈ S), c.snd), ⋂ (c : Concept α β r) (_ : c ∈ S), c.snd).snd\n[PROOFSTEP]\nsimp_rw [← closure_fst, ← intentClosure_iUnion₂, intentClosure_extentClosure_intentClosure]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nκ : ι → Sort u_5\nr : α → β → Prop\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\nc d : Concept α β r\nS : Set (Concept α β r)\n⊢ extentClosure r\n      (⋂ (c : Concept α β r) (_ : c ∈ S), c.fst, intentClosure r (⋂ (c : Concept α β r) (_ : c ∈ S), c.fst)).snd =\n    (⋂ (c : Concept α β r) (_ : c ∈ S), c.fst, intentClosure r (⋂ (c : Concept α β r) (_ : c ∈ S), c.fst)).fst\n[PROOFSTEP]\nsimp_rw [← closure_snd, ← extentClosure_Union₂, extentClosure_intentClosure_extentClosure]\n", "meta": {"mathlib_filename": "Mathlib.Order.Concept", "llama_tokens": 4926, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6261241772283034, "lm_q2_score": 0.6224593312018546, "lm_q1q2_score": 0.3897368366068412}}
{"text": "[GOAL]\nα : Type u\ne : Encoding α\n⊢ Function.Injective e.encode\n[PROOFSTEP]\nrefine' fun _ _ h => Option.some_injective _ _\n[GOAL]\nα : Type u\ne : Encoding α\nx✝¹ x✝ : α\nh : encode e x✝¹ = encode e x✝\n⊢ some x✝¹ = some x✝\n[PROOFSTEP]\nrw [← e.decode_encode, ← e.decode_encode, h]\n[GOAL]\n⊢ Multiset.Nodup {blank, bit true, bit false, bra, ket, comma}\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (x : Γ'),\n    x ∈\n      { val := {blank, bit true, bit false, bra, ket, comma},\n        nodup := (_ : Multiset.Nodup {blank, bit true, bit false, bra, ket, comma}) }\n[PROOFSTEP]\nintro\n[GOAL]\nx✝ : Γ'\n⊢ x✝ ∈\n    { val := {blank, bit true, bit false, bra, ket, comma},\n      nodup := (_ : Multiset.Nodup {blank, bit true, bit false, bra, ket, comma}) }\n[PROOFSTEP]\ncases_type* Γ' Bool\n[GOAL]\ncase blank\n⊢ blank ∈\n    { val := {blank, bit true, bit false, bra, ket, comma},\n      nodup := (_ : Multiset.Nodup {blank, bit true, bit false, bra, ket, comma}) }\n[PROOFSTEP]\ndecide\n[GOAL]\ncase bit.false\n⊢ bit false ∈\n    { val := {blank, bit true, bit false, bra, ket, comma},\n      nodup := (_ : Multiset.Nodup {blank, bit true, bit false, bra, ket, comma}) }\n[PROOFSTEP]\ndecide\n[GOAL]\ncase bit.true\n⊢ bit true ∈\n    { val := {blank, bit true, bit false, bra, ket, comma},\n      nodup := (_ : Multiset.Nodup {blank, bit true, bit false, bra, ket, comma}) }\n[PROOFSTEP]\ndecide\n[GOAL]\ncase bra\n⊢ bra ∈\n    { val := {blank, bit true, bit false, bra, ket, comma},\n      nodup := (_ : Multiset.Nodup {blank, bit true, bit false, bra, ket, comma}) }\n[PROOFSTEP]\ndecide\n[GOAL]\ncase ket\n⊢ ket ∈\n    { val := {blank, bit true, bit false, bra, ket, comma},\n      nodup := (_ : Multiset.Nodup {blank, bit true, bit false, bra, ket, comma}) }\n[PROOFSTEP]\ndecide\n[GOAL]\ncase comma\n⊢ comma ∈\n    { val := {blank, bit true, bit false, bra, ket, comma},\n      nodup := (_ : Multiset.Nodup {blank, bit true, bit false, bra, ket, comma}) }\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (n : PosNum), decodePosNum (encodePosNum n) = n\n[PROOFSTEP]\nintro n\n[GOAL]\nn : PosNum\n⊢ decodePosNum (encodePosNum n) = n\n[PROOFSTEP]\ninduction' n with m hm m hm\n[GOAL]\ncase one\n⊢ decodePosNum (encodePosNum PosNum.one) = PosNum.one\n[PROOFSTEP]\nunfold encodePosNum decodePosNum\n[GOAL]\ncase bit1\nm : PosNum\nhm : decodePosNum (encodePosNum m) = m\n⊢ decodePosNum (encodePosNum (PosNum.bit1 m)) = PosNum.bit1 m\n[PROOFSTEP]\nunfold encodePosNum decodePosNum\n[GOAL]\ncase bit0\nm : PosNum\nhm : decodePosNum (encodePosNum m) = m\n⊢ decodePosNum (encodePosNum (PosNum.bit0 m)) = PosNum.bit0 m\n[PROOFSTEP]\nunfold encodePosNum decodePosNum\n[GOAL]\ncase one\n⊢ (if [] = [] then PosNum.one else PosNum.bit1 (decodePosNum [])) = PosNum.one\n[PROOFSTEP]\nrfl\n[GOAL]\ncase bit1\nm : PosNum\nhm : decodePosNum (encodePosNum m) = m\n⊢ (if encodePosNum m = [] then PosNum.one else PosNum.bit1 (decodePosNum (encodePosNum m))) = PosNum.bit1 m\n[PROOFSTEP]\nrw [hm]\n[GOAL]\ncase bit1\nm : PosNum\nhm : decodePosNum (encodePosNum m) = m\n⊢ (if encodePosNum m = [] then PosNum.one else PosNum.bit1 m) = PosNum.bit1 m\n[PROOFSTEP]\nexact if_neg (encodePosNum_nonempty m)\n[GOAL]\ncase bit0\nm : PosNum\nhm : decodePosNum (encodePosNum m) = m\n⊢ PosNum.bit0 (decodePosNum (encodePosNum m)) = PosNum.bit0 m\n[PROOFSTEP]\nexact congr_arg PosNum.bit0 hm\n[GOAL]\n⊢ ∀ (n : Num), decodeNum (encodeNum n) = n\n[PROOFSTEP]\nintro n\n[GOAL]\nn : Num\n⊢ decodeNum (encodeNum n) = n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\n⊢ decodeNum (encodeNum Num.zero) = Num.zero\n[PROOFSTEP]\nunfold encodeNum decodeNum\n[GOAL]\ncase pos\nn : PosNum\n⊢ decodeNum (encodeNum (Num.pos n)) = Num.pos n\n[PROOFSTEP]\nunfold encodeNum decodeNum\n[GOAL]\ncase zero\n⊢ (if\n        (match Num.zero with\n          | Num.zero => []\n          | Num.pos n => encodePosNum n) =\n          [] then\n      Num.zero\n    else\n      ↑(decodePosNum\n          (match Num.zero with\n          | Num.zero => []\n          | Num.pos n => encodePosNum n))) =\n    Num.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nn : PosNum\n⊢ (if\n        (match Num.pos n with\n          | Num.zero => []\n          | Num.pos n => encodePosNum n) =\n          [] then\n      Num.zero\n    else\n      ↑(decodePosNum\n          (match Num.pos n with\n          | Num.zero => []\n          | Num.pos n => encodePosNum n))) =\n    Num.pos n\n[PROOFSTEP]\nrw [decode_encodePosNum n]\n[GOAL]\ncase pos\nn : PosNum\n⊢ (if\n        (match Num.pos n with\n          | Num.zero => []\n          | Num.pos n => encodePosNum n) =\n          [] then\n      Num.zero\n    else ↑n) =\n    Num.pos n\n[PROOFSTEP]\nrw [PosNum.cast_to_num]\n[GOAL]\ncase pos\nn : PosNum\n⊢ (if\n        (match Num.pos n with\n          | Num.zero => []\n          | Num.pos n => encodePosNum n) =\n          [] then\n      Num.zero\n    else Num.pos n) =\n    Num.pos n\n[PROOFSTEP]\nexact if_neg (encodePosNum_nonempty n)\n[GOAL]\n⊢ ∀ (n : ℕ), decodeNat (encodeNat n) = n\n[PROOFSTEP]\nintro n\n[GOAL]\nn : ℕ\n⊢ decodeNat (encodeNat n) = n\n[PROOFSTEP]\nconv_rhs => rw [← Num.to_of_nat n]\n[GOAL]\nn : ℕ\n| n\n[PROOFSTEP]\nrw [← Num.to_of_nat n]\n[GOAL]\nn : ℕ\n| n\n[PROOFSTEP]\nrw [← Num.to_of_nat n]\n[GOAL]\nn : ℕ\n| n\n[PROOFSTEP]\nrw [← Num.to_of_nat n]\n[GOAL]\nn : ℕ\n⊢ decodeNat (encodeNat n) = ↑↑n\n[PROOFSTEP]\nexact congr_arg ((↑) : Num → ℕ) (decode_encodeNum n)\n[GOAL]\nx : ℕ\n⊢ decodeNat (List.map sectionΓ'Bool ((fun x => List.map inclusionBoolΓ' (encodeNat x)) x)) = x\n[PROOFSTEP]\nrw [List.map_map, leftInverse_section_inclusion.id, List.map_id, decode_encodeNat]\n[GOAL]\nα : Type u\ne : Encoding α\ninst✝ : Encodable e.Γ\n⊢ #α ≤ ℵ₀\n[PROOFSTEP]\nrefine' Cardinal.lift_le.1 (e.card_le_card_list.trans _)\n[GOAL]\nα : Type u\ne : Encoding α\ninst✝ : Encodable e.Γ\n⊢ lift #(List e.Γ) ≤ lift ℵ₀\n[PROOFSTEP]\nsimp only [Cardinal.lift_aleph0, Cardinal.lift_le_aleph0]\n[GOAL]\nα : Type u\ne : Encoding α\ninst✝ : Encodable e.Γ\n⊢ #(List e.Γ) ≤ ℵ₀\n[PROOFSTEP]\ncases' isEmpty_or_nonempty e.Γ with h h\n[GOAL]\ncase inl\nα : Type u\ne : Encoding α\ninst✝ : Encodable e.Γ\nh : IsEmpty e.Γ\n⊢ #(List e.Γ) ≤ ℵ₀\n[PROOFSTEP]\nsimp only [Cardinal.mk_le_aleph0]\n[GOAL]\ncase inr\nα : Type u\ne : Encoding α\ninst✝ : Encodable e.Γ\nh : Nonempty e.Γ\n⊢ #(List e.Γ) ≤ ℵ₀\n[PROOFSTEP]\nrw [Cardinal.mk_list_eq_aleph0]\n", "meta": {"mathlib_filename": "Mathlib.Computability.Encoding", "llama_tokens": 2592, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.679178699175393, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.38963015451860655}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\nhs : IsUpperSet s\n⊢ IsUpperSet (a • s)\n[PROOFSTEP]\nrintro _ y hxy ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\nhs : IsUpperSet s\ny x : α\nhx : x ∈ s\nhxy : (fun x => a • x) x ≤ y\n⊢ y ∈ a • s\n[PROOFSTEP]\nexact mem_smul_set_iff_inv_smul_mem.2 (hs (le_inv_mul_iff_mul_le.2 hxy) hx)\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\nhs : OrdConnected s\n⊢ OrdConnected (a • s)\n[PROOFSTEP]\nrw [← hs.upperClosure_inter_lowerClosure, smul_set_inter]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\nhs : OrdConnected s\n⊢ OrdConnected (a • ↑(upperClosure s) ∩ a • ↑(lowerClosure s))\n[PROOFSTEP]\nexact (upperClosure _).upper.smul.ordConnected.inter (lowerClosure _).lower.smul.ordConnected\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\nht : IsUpperSet t\n⊢ IsUpperSet (s * t)\n[PROOFSTEP]\nrw [← smul_eq_mul, ← Set.iUnion_smul_set]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\nht : IsUpperSet t\n⊢ IsUpperSet (⋃ (a : α) (_ : a ∈ s), a • t)\n[PROOFSTEP]\nexact isUpperSet_iUnion₂ fun x _ ↦ ht.smul\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\nhs : IsUpperSet s\n⊢ IsUpperSet (s * t)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\nhs : IsUpperSet s\n⊢ IsUpperSet (t * s)\n[PROOFSTEP]\nexact hs.mul_left\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\nht : IsUpperSet t\n⊢ IsLowerSet (s / t)\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\nht : IsUpperSet t\n⊢ IsLowerSet (s * t⁻¹)\n[PROOFSTEP]\nexact ht.inv.mul_left\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\nhs : IsUpperSet s\n⊢ IsUpperSet (s / t)\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\nhs : IsUpperSet s\n⊢ IsUpperSet (s * t⁻¹)\n[PROOFSTEP]\nexact hs.mul_right\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns✝ t : Set α\na : α\ns : UpperSet α\n⊢ Set.Ici 1 * ↑s ⊆ ↑s\n[PROOFSTEP]\nrw [← smul_eq_mul, ← Set.iUnion_smul_set]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns✝ t : Set α\na : α\ns : UpperSet α\n⊢ ⋃ (a : α) (_ : a ∈ Set.Ici 1), a • ↑s ⊆ ↑s\n[PROOFSTEP]\nexact Set.iUnion₂_subset fun _ ↦ s.upper.smul_subset\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns✝ t : Set α\na : α\nsrc✝ : CommSemigroup (UpperSet α) := commSemigroup\ns : UpperSet α\n⊢ s * 1 = s\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns✝ t : Set α\na : α\nsrc✝ : CommSemigroup (UpperSet α) := commSemigroup\ns : UpperSet α\n⊢ 1 * s = s\n[PROOFSTEP]\nexact one_mul _\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns✝ t : Set α\na : α\ns : LowerSet α\n⊢ Set.Iic 1 * ↑s ⊆ ↑s\n[PROOFSTEP]\nrw [← smul_eq_mul, ← Set.iUnion_smul_set]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns✝ t : Set α\na : α\ns : LowerSet α\n⊢ ⋃ (a : α) (_ : a ∈ Set.Iic 1), a • ↑s ⊆ ↑s\n[PROOFSTEP]\nexact Set.iUnion₂_subset fun _ ↦ s.lower.smul_subset\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns✝ t : Set α\na : α\nsrc✝ : CommSemigroup (LowerSet α) := commSemigroup\ns : LowerSet α\n⊢ s * 1 = s\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns✝ t : Set α\na : α\nsrc✝ : CommSemigroup (LowerSet α) := commSemigroup\ns : LowerSet α\n⊢ 1 * s = s\n[PROOFSTEP]\nexact one_mul _\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\n⊢ s * ↑(upperClosure t) = ↑(upperClosure (s * t))\n[PROOFSTEP]\nsimp_rw [← smul_eq_mul, ← Set.iUnion_smul_set, upperClosure_iUnion, upperClosure_smul, UpperSet.coe_iInf₂]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\n⊢ ⋃ (a : α) (_ : a ∈ s), a • ↑(upperClosure t) = ⋃ (i : α) (_ : i ∈ s), ↑(i • upperClosure t)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\n⊢ s * ↑(lowerClosure t) = ↑(lowerClosure (s * t))\n[PROOFSTEP]\nsimp_rw [← smul_eq_mul, ← Set.iUnion_smul_set, lowerClosure_iUnion, lowerClosure_smul, LowerSet.coe_iSup₂]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\n⊢ ⋃ (a : α) (_ : a ∈ s), a • ↑(lowerClosure t) = ⋃ (i : α) (_ : i ∈ s), ↑(i • lowerClosure t)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\n⊢ ↑(upperClosure s) * t = ↑(upperClosure (s * t))\n[PROOFSTEP]\nsimp_rw [mul_comm _ t]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\n⊢ t * ↑(upperClosure s) = ↑(upperClosure (t * s))\n[PROOFSTEP]\nexact mul_upperClosure _ _\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\n⊢ ↑(lowerClosure s) * t = ↑(lowerClosure (s * t))\n[PROOFSTEP]\nsimp_rw [mul_comm _ t]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\n⊢ t * ↑(lowerClosure s) = ↑(lowerClosure (t * s))\n[PROOFSTEP]\nexact mul_lowerClosure _ _\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\n⊢ ↑(upperClosure (s * t)) = ↑(upperClosure s * upperClosure t)\n[PROOFSTEP]\nrw [UpperSet.coe_mul, mul_upperClosure, upperClosure_mul, UpperSet.upperClosure]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCommGroup α\ns t : Set α\na : α\n⊢ ↑(lowerClosure (s * t)) = ↑(lowerClosure s * lowerClosure t)\n[PROOFSTEP]\nrw [LowerSet.coe_mul, mul_lowerClosure, lowerClosure_mul, LowerSet.lowerClosure]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.UpperLower", "llama_tokens": 2653, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6150878414043814, "lm_q2_score": 0.63341027059799, "lm_q1q2_score": 0.38960295606548284}}
{"text": "[GOAL]\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nx y : ↑(image f)\n⊢ (fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f))) (x + y) =\n    (fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f))) x +\n      (fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f))) y\n[PROOFSTEP]\napply (mono_iff_injective F'.m).1\n[GOAL]\ncase a\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nx y : ↑(image f)\n⊢ Mono F'.m\ncase a\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nx y : ↑(image f)\n⊢ ↑F'.m\n      ((fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n        (x + y)) =\n    ↑F'.m\n      ((fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f))) x +\n        (fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f))) y)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase a\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nx y : ↑(image f)\n⊢ ↑F'.m\n      ((fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n        (x + y)) =\n    ↑F'.m\n      ((fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f))) x +\n        (fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f))) y)\n[PROOFSTEP]\nrw [LinearMap.map_add]\n[GOAL]\ncase a\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nx y : ↑(image f)\n⊢ ↑F'.m\n      ((fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n        (x + y)) =\n    ↑F'.m\n        ((fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f))) x) +\n      ↑F'.m\n        ((fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f))) y)\n[PROOFSTEP]\nchange (F'.e ≫ F'.m) _ = (F'.e ≫ F'.m) _ + (F'.e ≫ F'.m) _\n[GOAL]\ncase a\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nx y : ↑(image f)\n⊢ ↑(F'.e ≫ F'.m) ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑(x + y)) (_ : ↑(x + y) ∈ LinearMap.range f)) =\n    ↑(F'.e ≫ F'.m) ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)) +\n      ↑(F'.e ≫ F'.m) ↑(Classical.indefiniteDescription (fun x => ↑f x = ↑y) (_ : ↑y ∈ LinearMap.range f))\n[PROOFSTEP]\nsimp_rw [F'.fac, (Classical.indefiniteDescription (fun z => f z = _) _).2]\n[GOAL]\ncase a\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nx y : ↑(image f)\n⊢ ↑(x + y) = ↑x + ↑y\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nc : R\nx : ↑(image f)\n⊢ AddHom.toFun\n      {\n        toFun := fun x =>\n          ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)),\n        map_add' :=\n          (_ :\n            ∀ (x y : ↑(image f)),\n              (fun x => ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                  (x + y) =\n                (fun x =>\n                      ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                    x +\n                  (fun x =>\n                      ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                    y) }\n      (c • x) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        {\n          toFun := fun x =>\n            ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)),\n          map_add' :=\n            (_ :\n              ∀ (x y : ↑(image f)),\n                (fun x =>\n                      ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                    (x + y) =\n                  (fun x =>\n                        ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                      x +\n                    (fun x =>\n                        ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                      y) }\n        x\n[PROOFSTEP]\napply (mono_iff_injective F'.m).1\n[GOAL]\ncase a\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nc : R\nx : ↑(image f)\n⊢ Mono F'.m\ncase a\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nc : R\nx : ↑(image f)\n⊢ ↑F'.m\n      (AddHom.toFun\n        {\n          toFun := fun x =>\n            ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)),\n          map_add' :=\n            (_ :\n              ∀ (x y : ↑(image f)),\n                (fun x =>\n                      ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                    (x + y) =\n                  (fun x =>\n                        ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                      x +\n                    (fun x =>\n                        ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                      y) }\n        (c • x)) =\n    ↑F'.m\n      (↑(RingHom.id R) c •\n        AddHom.toFun\n          {\n            toFun := fun x =>\n              ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)),\n            map_add' :=\n              (_ :\n                ∀ (x y : ↑(image f)),\n                  (fun x =>\n                        ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                      (x + y) =\n                    (fun x =>\n                          ↑F'.e\n                            ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                        x +\n                      (fun x =>\n                          ↑F'.e\n                            ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                        y) }\n          x)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase a\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nc : R\nx : ↑(image f)\n⊢ ↑F'.m\n      (AddHom.toFun\n        {\n          toFun := fun x =>\n            ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)),\n          map_add' :=\n            (_ :\n              ∀ (x y : ↑(image f)),\n                (fun x =>\n                      ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                    (x + y) =\n                  (fun x =>\n                        ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                      x +\n                    (fun x =>\n                        ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                      y) }\n        (c • x)) =\n    ↑F'.m\n      (↑(RingHom.id R) c •\n        AddHom.toFun\n          {\n            toFun := fun x =>\n              ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)),\n            map_add' :=\n              (_ :\n                ∀ (x y : ↑(image f)),\n                  (fun x =>\n                        ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                      (x + y) =\n                    (fun x =>\n                          ↑F'.e\n                            ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                        x +\n                      (fun x =>\n                          ↑F'.e\n                            ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                        y) }\n          x)\n[PROOFSTEP]\nrw [LinearMap.map_smul]\n[GOAL]\ncase a\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nc : R\nx : ↑(image f)\n⊢ ↑F'.m\n      (AddHom.toFun\n        {\n          toFun := fun x =>\n            ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)),\n          map_add' :=\n            (_ :\n              ∀ (x y : ↑(image f)),\n                (fun x =>\n                      ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                    (x + y) =\n                  (fun x =>\n                        ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                      x +\n                    (fun x =>\n                        ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                      y) }\n        (c • x)) =\n    ↑(RingHom.id R) c •\n      ↑F'.m\n        (AddHom.toFun\n          {\n            toFun := fun x =>\n              ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)),\n            map_add' :=\n              (_ :\n                ∀ (x y : ↑(image f)),\n                  (fun x =>\n                        ↑F'.e ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                      (x + y) =\n                    (fun x =>\n                          ↑F'.e\n                            ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                        x +\n                      (fun x =>\n                          ↑F'.e\n                            ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)))\n                        y) }\n          x)\n[PROOFSTEP]\nchange (F'.e ≫ F'.m) _ = _ • (F'.e ≫ F'.m) _\n[GOAL]\ncase a\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nc : R\nx : ↑(image f)\n⊢ ↑(F'.e ≫ F'.m) ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑(c • x)) (_ : ↑(c • x) ∈ LinearMap.range f)) =\n    ↑(RingHom.id R) c •\n      ↑(F'.e ≫ F'.m) ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f))\n[PROOFSTEP]\nsimp_rw [F'.fac, (Classical.indefiniteDescription (fun z => f z = _) _).2]\n[GOAL]\ncase a\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nc : R\nx : ↑(image f)\n⊢ ↑(c • x) = ↑(RingHom.id R) c • ↑x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\n⊢ lift F' ≫ F'.m = ι f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nx : ↑(image f)\n⊢ ↑(lift F' ≫ F'.m) x = ↑(ι f) x\n[PROOFSTEP]\nchange (F'.e ≫ F'.m) _ = _\n[GOAL]\ncase h\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nx : ↑(image f)\n⊢ ↑(F'.e ≫ F'.m) ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ LinearMap.range f)) = ↑(ι f) x\n[PROOFSTEP]\nrw [F'.fac, (Classical.indefiniteDescription _ x.2).2]\n[GOAL]\ncase h\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\nF' : MonoFactorisation f\nx : ↑(image f)\n⊢ ↑x = ↑(ι f) x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝ : Ring R\nG✝ H✝ : ModuleCat R\nf✝ : G✝ ⟶ H✝\nG H : ModuleCat R\nf : G ⟶ H\n⊢ (imageIsoRange f).hom ≫ ofHom (Submodule.subtype (LinearMap.range f)) = Limits.image.ι f\n[PROOFSTEP]\nerw [← imageIsoRange_inv_image_ι f, Iso.hom_inv_id_assoc]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.ModuleCat.Images", "llama_tokens": 4927, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7853085909370422, "lm_q2_score": 0.4960938294709195, "lm_q1q2_score": 0.3895867461943691}}
{"text": "[GOAL]\np : ℕ\nR : Type u_1\nx y : 𝕎 R\nh : ∀ (n : ℕ), coeff x n = coeff y n\n⊢ x = y\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk'\np : ℕ\nR : Type u_1\ny : 𝕎 R\ncoeff✝ : ℕ → R\nh : ∀ (n : ℕ), coeff { coeff := coeff✝ } n = coeff y n\n⊢ { coeff := coeff✝ } = y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk'.mk'\np : ℕ\nR : Type u_1\ncoeff✝¹ coeff✝ : ℕ → R\nh : ∀ (n : ℕ), coeff { coeff := coeff✝¹ } n = coeff { coeff := coeff✝ } n\n⊢ { coeff := coeff✝¹ } = { coeff := coeff✝ }\n[PROOFSTEP]\nsimp only at h \n[GOAL]\ncase mk'.mk'\np : ℕ\nR : Type u_1\ncoeff✝¹ coeff✝ : ℕ → R\nh : ∀ (n : ℕ), coeff✝¹ n = coeff✝ n\n⊢ { coeff := coeff✝¹ } = { coeff := coeff✝ }\n[PROOFSTEP]\nsimp [Function.funext_iff, h]\n[GOAL]\np : ℕ\nR : Type u_1\nx y : 𝕎 R\nh : x = y\nn : ℕ\n⊢ coeff x n = coeff y n\n[PROOFSTEP]\nrw [h]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\n⊢ wittZero p n = 0\n[PROOFSTEP]\napply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective\n[GOAL]\ncase a\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\n⊢ ↑(map (Int.castRingHom ℚ)) (wittZero p n) = ↑(map (Int.castRingHom ℚ)) 0\n[PROOFSTEP]\nsimp only [wittZero, wittStructureRat, bind₁, aeval_zero', constantCoeff_xInTermsOfW, RingHom.map_zero, AlgHom.map_zero,\n  map_wittStructureInt]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\n⊢ wittOne p 0 = 1\n[PROOFSTEP]\napply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective\n[GOAL]\ncase a\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\n⊢ ↑(map (Int.castRingHom ℚ)) (wittOne p 0) = ↑(map (Int.castRingHom ℚ)) 1\n[PROOFSTEP]\nsimp only [wittOne, wittStructureRat, xInTermsOfW_zero, AlgHom.map_one, RingHom.map_one, bind₁_X_right,\n  map_wittStructureInt]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nhn : 0 < n\n⊢ wittOne p n = 0\n[PROOFSTEP]\napply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective\n[GOAL]\ncase a\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nhn : 0 < n\n⊢ ↑(map (Int.castRingHom ℚ)) (wittOne p n) = ↑(map (Int.castRingHom ℚ)) 0\n[PROOFSTEP]\nsimp only [wittOne, wittStructureRat, RingHom.map_zero, AlgHom.map_one, RingHom.map_one, map_wittStructureInt]\n[GOAL]\ncase a\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nhn : 0 < n\n⊢ ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ n) = 0\n[PROOFSTEP]\ninduction n using Nat.strong_induction_on with\n| h n IH => ?_\n[GOAL]\ncase a\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nhn : 0 < n\n⊢ ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ n) = 0\n[PROOFSTEP]\ninduction n using Nat.strong_induction_on with\n| h n IH => ?_\n[GOAL]\ncase a.h\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 0 < m → ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ m) = 0\nhn : 0 < n\n⊢ ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ n) = 0\n[PROOFSTEP]\nrw [xInTermsOfW_eq]\n[GOAL]\ncase a.h\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 0 < m → ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ m) = 0\nhn : 0 < n\n⊢ ↑(bind₁ fun k => 1)\n      ((X n - Finset.sum (Finset.range n) fun i => ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i)) * ↑C (⅟↑p ^ n)) =\n    0\n[PROOFSTEP]\nsimp only [AlgHom.map_mul, AlgHom.map_sub, AlgHom.map_sum, AlgHom.map_pow, bind₁_X_right, bind₁_C_right]\n[GOAL]\ncase a.h\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 0 < m → ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ m) = 0\nhn : 0 < n\n⊢ (1 - Finset.sum (Finset.range n) fun x => ↑C (↑p ^ x) * ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ x) ^ p ^ (n - x)) *\n      ↑C (⅟↑p ^ n) =\n    0\n[PROOFSTEP]\nrw [sub_mul, one_mul]\n[GOAL]\ncase a.h\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 0 < m → ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ m) = 0\nhn : 0 < n\n⊢ ↑C (⅟↑p ^ n) -\n      (Finset.sum (Finset.range n) fun x => ↑C (↑p ^ x) * ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ x) ^ p ^ (n - x)) *\n        ↑C (⅟↑p ^ n) =\n    0\n[PROOFSTEP]\nrw [Finset.sum_eq_single 0]\n[GOAL]\ncase a.h\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 0 < m → ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ m) = 0\nhn : 0 < n\n⊢ ↑C (⅟↑p ^ n) - ↑C (↑p ^ 0) * ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ 0) ^ p ^ (n - 0) * ↑C (⅟↑p ^ n) = 0\n[PROOFSTEP]\nsimp only [invOf_eq_inv, one_mul, inv_pow, tsub_zero, RingHom.map_one, pow_zero]\n[GOAL]\ncase a.h\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 0 < m → ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ m) = 0\nhn : 0 < n\n⊢ ↑C (↑p ^ n)⁻¹ - ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ 0) ^ p ^ n * ↑C (↑p ^ n)⁻¹ = 0\n[PROOFSTEP]\nsimp only [one_pow, one_mul, xInTermsOfW_zero, sub_self, bind₁_X_right]\n[GOAL]\ncase a.h.h₀\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 0 < m → ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ m) = 0\nhn : 0 < n\n⊢ ∀ (b : ℕ), b ∈ Finset.range n → b ≠ 0 → ↑C (↑p ^ b) * ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ b) ^ p ^ (n - b) = 0\n[PROOFSTEP]\nintro i hin hi0\n[GOAL]\ncase a.h.h₀\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 0 < m → ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ m) = 0\nhn : 0 < n\ni : ℕ\nhin : i ∈ Finset.range n\nhi0 : i ≠ 0\n⊢ ↑C (↑p ^ i) * ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ i) ^ p ^ (n - i) = 0\n[PROOFSTEP]\nrw [Finset.mem_range] at hin \n[GOAL]\ncase a.h.h₀\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 0 < m → ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ m) = 0\nhn : 0 < n\ni : ℕ\nhin : i < n\nhi0 : i ≠ 0\n⊢ ↑C (↑p ^ i) * ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ i) ^ p ^ (n - i) = 0\n[PROOFSTEP]\nrw [IH _ hin (Nat.pos_of_ne_zero hi0), zero_pow (pow_pos hp.1.pos _), mul_zero]\n[GOAL]\ncase a.h.h₁\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 0 < m → ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ m) = 0\nhn : 0 < n\n⊢ ¬0 ∈ Finset.range n → ↑C (↑p ^ 0) * ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ 0) ^ p ^ (n - 0) = 0\n[PROOFSTEP]\nrw [Finset.mem_range]\n[GOAL]\ncase a.h.h₁\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 0 < m → ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ m) = 0\nhn : 0 < n\n⊢ ¬0 < n → ↑C (↑p ^ 0) * ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ 0) ^ p ^ (n - 0) = 0\n[PROOFSTEP]\nintro\n[GOAL]\ncase a.h.h₁\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 0 < m → ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ m) = 0\nhn : 0 < n\na✝ : ¬0 < n\n⊢ ↑C (↑p ^ 0) * ↑(bind₁ fun k => 1) (xInTermsOfW p ℚ 0) ^ p ^ (n - 0) = 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\n⊢ wittAdd p 0 = X (0, 0) + X (1, 0)\n[PROOFSTEP]\napply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective\n[GOAL]\ncase a\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\n⊢ ↑(map (Int.castRingHom ℚ)) (wittAdd p 0) = ↑(map (Int.castRingHom ℚ)) (X (0, 0) + X (1, 0))\n[PROOFSTEP]\nsimp only [wittAdd, wittStructureRat, AlgHom.map_add, RingHom.map_add, rename_X, xInTermsOfW_zero, map_X,\n  wittPolynomial_zero, bind₁_X_right, map_wittStructureInt]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\n⊢ wittSub p 0 = X (0, 0) - X (1, 0)\n[PROOFSTEP]\napply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective\n[GOAL]\ncase a\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\n⊢ ↑(map (Int.castRingHom ℚ)) (wittSub p 0) = ↑(map (Int.castRingHom ℚ)) (X (0, 0) - X (1, 0))\n[PROOFSTEP]\nsimp only [wittSub, wittStructureRat, AlgHom.map_sub, RingHom.map_sub, rename_X, xInTermsOfW_zero, map_X,\n  wittPolynomial_zero, bind₁_X_right, map_wittStructureInt]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\n⊢ wittMul p 0 = X (0, 0) * X (1, 0)\n[PROOFSTEP]\napply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective\n[GOAL]\ncase a\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\n⊢ ↑(map (Int.castRingHom ℚ)) (wittMul p 0) = ↑(map (Int.castRingHom ℚ)) (X (0, 0) * X (1, 0))\n[PROOFSTEP]\nsimp only [wittMul, wittStructureRat, rename_X, xInTermsOfW_zero, map_X, wittPolynomial_zero, RingHom.map_mul,\n  bind₁_X_right, AlgHom.map_mul, map_wittStructureInt]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\n⊢ wittNeg p 0 = -X (0, 0)\n[PROOFSTEP]\napply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective\n[GOAL]\ncase a\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\n⊢ ↑(map (Int.castRingHom ℚ)) (wittNeg p 0) = ↑(map (Int.castRingHom ℚ)) (-X (0, 0))\n[PROOFSTEP]\nsimp only [wittNeg, wittStructureRat, rename_X, xInTermsOfW_zero, map_X, wittPolynomial_zero, RingHom.map_neg,\n  AlgHom.map_neg, bind₁_X_right, map_wittStructureInt]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\n⊢ ↑constantCoeff (wittAdd p n) = 0\n[PROOFSTEP]\napply constantCoeff_wittStructureInt p _ _ n\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\n⊢ ↑constantCoeff (X 0 + X 1) = 0\n[PROOFSTEP]\nsimp only [add_zero, RingHom.map_add, constantCoeff_X]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\n⊢ ↑constantCoeff (wittSub p n) = 0\n[PROOFSTEP]\napply constantCoeff_wittStructureInt p _ _ n\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\n⊢ ↑constantCoeff (X 0 - X 1) = 0\n[PROOFSTEP]\nsimp only [sub_zero, RingHom.map_sub, constantCoeff_X]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\n⊢ ↑constantCoeff (wittMul p n) = 0\n[PROOFSTEP]\napply constantCoeff_wittStructureInt p _ _ n\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\n⊢ ↑constantCoeff (X 0 * X 1) = 0\n[PROOFSTEP]\nsimp only [mul_zero, RingHom.map_mul, constantCoeff_X]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\n⊢ ↑constantCoeff (wittNeg p n) = 0\n[PROOFSTEP]\napply constantCoeff_wittStructureInt p _ _ n\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\n⊢ ↑constantCoeff (-X 0) = 0\n[PROOFSTEP]\nsimp only [neg_zero, RingHom.map_neg, constantCoeff_X]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nm n : ℕ\n⊢ ↑constantCoeff (wittNSMul p m n) = 0\n[PROOFSTEP]\napply constantCoeff_wittStructureInt p _ _ n\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nm n : ℕ\n⊢ ↑constantCoeff (m • X 0) = 0\n[PROOFSTEP]\nsimp only [smul_zero, map_nsmul, constantCoeff_X]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nz : ℤ\nn : ℕ\n⊢ ↑constantCoeff (wittZSMul p z n) = 0\n[PROOFSTEP]\napply constantCoeff_wittStructureInt p _ _ n\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nz : ℤ\nn : ℕ\n⊢ ↑constantCoeff (z • X 0) = 0\n[PROOFSTEP]\nsimp only [smul_zero, map_zsmul, constantCoeff_X]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\n⊢ ↑(aeval (Function.uncurry fun i => ![].coeff)) (wittZero p n) = 0\n[PROOFSTEP]\nsimp only [wittZero_eq_zero, AlgHom.map_zero]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\n⊢ ↑(aeval (Function.uncurry fun i => ![].coeff)) (wittOne p 0) = 1\n[PROOFSTEP]\nsimp only [wittOne_zero_eq_one, AlgHom.map_one]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nhn : 0 < n\n⊢ ↑(aeval (Function.uncurry fun i => ![].coeff)) (wittOne p n) = 0\n[PROOFSTEP]\nsimp only [hn, wittOne_pos_eq_zero, AlgHom.map_zero]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\np' : ℕ\nR' : Type u_2\nx y : WittVector p' R'\ni : Fin 2\n⊢ (Matrix.vecCons x ![y] i).coeff = Matrix.vecCons x.coeff ![y.coeff] i\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase head\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\np' : ℕ\nR' : Type u_2\nx y : WittVector p' R'\n⊢ (Matrix.vecCons x ![y] { val := 0, isLt := (_ : 0 < 2) }).coeff =\n    Matrix.vecCons x.coeff ![y.coeff] { val := 0, isLt := (_ : 0 < 2) }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase tail.head\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\np' : ℕ\nR' : Type u_2\nx y : WittVector p' R'\n⊢ (Matrix.vecCons x ![y] { val := 1, isLt := (_ : (fun a => a < 2) 1) }).coeff =\n    Matrix.vecCons x.coeff ![y.coeff] { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y : 𝕎 R\nn : ℕ\n⊢ coeff (x + y) n = peval (wittAdd p n) ![x.coeff, y.coeff]\n[PROOFSTEP]\nsimp [(· + ·), Add.add, eval, coeff_mk]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y : 𝕎 R\nn : ℕ\n⊢ coeff (x - y) n = peval (wittSub p n) ![x.coeff, y.coeff]\n[PROOFSTEP]\nsimp [(· - ·), Sub.sub, eval, coeff_mk]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y : 𝕎 R\nn : ℕ\n⊢ coeff (x * y) n = peval (wittMul p n) ![x.coeff, y.coeff]\n[PROOFSTEP]\nsimp [(· * ·), Mul.mul, eval, coeff_mk]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nn : ℕ\n⊢ coeff (-x) n = peval (wittNeg p n) ![x.coeff]\n[PROOFSTEP]\nsimp [Neg.neg, eval, Matrix.cons_fin_one, coeff_mk]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nm : ℕ\nx : 𝕎 R\nn : ℕ\n⊢ coeff (m • x) n = peval (wittNSMul p m n) ![x.coeff]\n[PROOFSTEP]\nsimp [(· • ·), SMul.smul, eval, Matrix.cons_fin_one, coeff_mk]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nm : ℤ\nx : 𝕎 R\nn : ℕ\n⊢ coeff (m • x) n = peval (wittZSMul p m n) ![x.coeff]\n[PROOFSTEP]\nsimp [(· • ·), SMul.smul, eval, Matrix.cons_fin_one, coeff_mk]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nm : ℕ\nx : 𝕎 R\nn : ℕ\n⊢ coeff (x ^ m) n = peval (wittPow p m n) ![x.coeff]\n[PROOFSTEP]\nsimp [(· ^ ·), Pow.pow, eval, Matrix.cons_fin_one, coeff_mk]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y : 𝕎 R\n⊢ coeff (x + y) 0 = coeff x 0 + coeff y 0\n[PROOFSTEP]\nsimp [add_coeff, peval]\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx y : 𝕎 R\n⊢ coeff (x * y) 0 = coeff x 0 * coeff y 0\n[PROOFSTEP]\nsimp [mul_coeff, peval]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.WittVector.Defs", "llama_tokens": 7605, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7279754607093178, "lm_q2_score": 0.5350984286266116, "lm_q1q2_score": 0.3895385251042896}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nf : α → M\ns : Set α\n⊢ mulSupport f = s ↔ (∀ (x : α), x ∈ s → f x ≠ 1) ∧ ∀ (x : α), ¬x ∈ s → f x = 1\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [ext_iff, mem_mulSupport, ne_eq, iff_def, not_imp_comm, and_comm,\n  forall_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nf : α → M\ns : Set α\n⊢ Disjoint (mulSupport f) s ↔ EqOn f 1 s\n[PROOFSTEP]\nsimp_rw [← subset_compl_iff_disjoint_right, mulSupport_subset_iff', not_mem_compl_iff, EqOn, Pi.one_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nf : α → M\ns : Set α\n⊢ Disjoint s (mulSupport f) ↔ EqOn f 1 s\n[PROOFSTEP]\nrw [disjoint_comm, mulSupport_disjoint_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nf : α → M\n⊢ mulSupport f = ∅ ↔ f = 1\n[PROOFSTEP]\nsimp_rw [← subset_empty_iff, mulSupport_subset_iff', funext_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nf : α → M\n⊢ (∀ (x : α), ¬x ∈ ∅ → f x = 1) ↔ ∀ (a : α), f a = OfNat.ofNat 1 a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nf : α → M\n⊢ Set.Nonempty (mulSupport f) ↔ f ≠ 1\n[PROOFSTEP]\nrw [nonempty_iff_ne_empty, Ne.def, mulSupport_eq_empty_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nf : α → M\n⊢ range f ⊆ insert 1 (f '' mulSupport f)\n[PROOFSTEP]\nsimpa only [range_subset_iff, mem_insert_iff, or_iff_not_imp_left] using fun x (hx : x ∈ mulSupport f) =>\n  mem_image_of_mem f hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nc : M\nhc : c ≠ 1\n⊢ (mulSupport fun x => c) = univ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nc : M\nhc : c ≠ 1\nx : α\n⊢ (x ∈ mulSupport fun x => c) ↔ x ∈ univ\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nop : M → N → P\nop1 : op 1 1 = 1\nf : α → M\ng : α → N\nx : α\nhx : x ∈ mulSupport fun x => op (f x) (g x)\nhf : f x = 1\nhg : g x = 1\n⊢ (fun x => op (f x) (g x)) x = 1\n[PROOFSTEP]\nsimp only [hf, hg, op1]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝⁴ : One M\ninst✝³ : One N\ninst✝² : One P\ninst✝¹ : ConditionallyCompleteLattice M\ninst✝ : Nonempty ι\nf : ι → α → M\n⊢ (mulSupport fun x => ⨆ (i : ι), f i x) ⊆ ⋃ (i : ι), mulSupport (f i)\n[PROOFSTEP]\nrw [mulSupport_subset_iff']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝⁴ : One M\ninst✝³ : One N\ninst✝² : One P\ninst✝¹ : ConditionallyCompleteLattice M\ninst✝ : Nonempty ι\nf : ι → α → M\n⊢ ∀ (x : α), ¬x ∈ ⋃ (i : ι), mulSupport (f i) → ⨆ (i : ι), f i x = 1\n[PROOFSTEP]\nsimp only [mem_iUnion, not_exists, nmem_mulSupport]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝⁴ : One M\ninst✝³ : One N\ninst✝² : One P\ninst✝¹ : ConditionallyCompleteLattice M\ninst✝ : Nonempty ι\nf : ι → α → M\n⊢ ∀ (x : α), (∀ (x_1 : ι), f x_1 x = 1) → ⨆ (i : ι), f i x = 1\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝⁴ : One M\ninst✝³ : One N\ninst✝² : One P\ninst✝¹ : ConditionallyCompleteLattice M\ninst✝ : Nonempty ι\nf : ι → α → M\nx : α\nhx : ∀ (x_1 : ι), f x_1 x = 1\n⊢ ⨆ (i : ι), f i x = 1\n[PROOFSTEP]\nsimp only [hx, ciSup_const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\ng : M → N\nhg : g 1 = 1\nf : α → M\nx : α\nh : f x = 1\n⊢ (g ∘ f) x = 1\n[PROOFSTEP]\nsimp only [(· ∘ ·), *]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\ng : M → N\nf : α → M\nhg : ∀ {x : M}, x ∈ range f → (g x = 1 ↔ x = 1)\nx : α\n⊢ (g ∘ f) x = 1 ↔ f x = 1\n[PROOFSTEP]\nrw [Function.comp, hg (mem_range_self x)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nf : α → M\ng : α → N\nx : α\n⊢ (x ∈ mulSupport fun x => (f x, g x)) ↔ x ∈ mulSupport f ∪ mulSupport g\n[PROOFSTEP]\nsimp only [mulSupport, not_and_or, mem_union, mem_setOf_eq, Prod.mk_eq_one, Ne.def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nf : α → M × N\n⊢ mulSupport f = (mulSupport fun x => (f x).fst) ∪ mulSupport fun x => (f x).snd\n[PROOFSTEP]\nsimp only [← mulSupport_prod_mk, Prod.mk.eta]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : One M\ninst✝¹ : One N\ninst✝ : One P\nf : α × β → M\na : α\nx : β\nhx : x ∈ mulSupport fun b => f (a, b)\n⊢ (a, x) ∈ mulSupport f ∧ (a, x).snd = x\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝ : Monoid M\nf : α → M\nn : ℕ\n⊢ (mulSupport fun x => f x ^ n) ⊆ mulSupport f\n[PROOFSTEP]\ninduction' n with n hfn\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝ : Monoid M\nf : α → M\n⊢ (mulSupport fun x => f x ^ Nat.zero) ⊆ mulSupport f\n[PROOFSTEP]\nsimp [pow_zero, mulSupport_one]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝ : Monoid M\nf : α → M\nn : ℕ\nhfn : (mulSupport fun x => f x ^ n) ⊆ mulSupport f\n⊢ (mulSupport fun x => f x ^ Nat.succ n) ⊆ mulSupport f\n[PROOFSTEP]\nsimpa only [pow_succ] using (mulSupport_mul f _).trans (union_subset Subset.rfl hfn)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝ : DivisionMonoid G\nf g : α → G\n⊢ (fun a b => a * b⁻¹) 1 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝ : MulZeroClass R\nf g : α → R\nx : α\nhfg : x ∈ support fun x => f x * g x\nhf : f x = 0\n⊢ (fun x => f x * g x) x = 0\n[PROOFSTEP]\nsimp only [hf, zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝ : MulZeroClass R\nf g : α → R\nx : α\nhfg : x ∈ support fun x => f x * g x\nhg : g x = 0\n⊢ (fun x => f x * g x) x = 0\n[PROOFSTEP]\nsimp only [hg, mul_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : AddMonoid A\ninst✝¹ : Monoid B\ninst✝ : DistribMulAction B A\nb : B\nf : α → A\nx : α\nhbf : x ∈ support (b • f)\nhf : f x = 0\n⊢ (b • f) x = 0\n[PROOFSTEP]\nrw [Pi.smul_apply, hf, smul_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : Zero M\ninst✝¹ : Zero β\ninst✝ : SMulWithZero M β\nf : α → M\ng : α → β\nx : α\nhfg : x ∈ support (f • g)\nhf : f x = 0\n⊢ (f • g) x = 0\n[PROOFSTEP]\nrw [Pi.smul_apply', hf, zero_smul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : NoZeroSMulDivisors R M\nc : R\ng : α → M\nhc : c ≠ 0\nx : α\n⊢ x ∈ support (c • g) ↔ x ∈ support g\n[PROOFSTEP]\nsimp only [hc, mem_support, Pi.smul_apply, Ne.def, smul_eq_zero, false_or_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝ : GroupWithZero G₀\nf g : α → G₀\n⊢ (support fun x => f x / g x) = support f ∩ support g\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝ : CommMonoid M\ns : Finset α\nf : α → β → M\n⊢ (mulSupport fun x => ∏ i in s, f i x) ⊆ ⋃ (i : α) (_ : i ∈ s), mulSupport (f i)\n[PROOFSTEP]\nrw [mulSupport_subset_iff']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝ : CommMonoid M\ns : Finset α\nf : α → β → M\n⊢ ∀ (x : β), ¬x ∈ ⋃ (i : α) (_ : i ∈ s), mulSupport (f i) → ∏ i in s, f i x = 1\n[PROOFSTEP]\nsimp only [mem_iUnion, not_exists, nmem_mulSupport]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝ : CommMonoid M\ns : Finset α\nf : α → β → M\n⊢ ∀ (x : β), (∀ (x_1 : α), x_1 ∈ s → f x_1 x = 1) → ∏ i in s, f i x = 1\n[PROOFSTEP]\nexact fun x => Finset.prod_eq_one\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝² : CommMonoidWithZero A\ninst✝¹ : NoZeroDivisors A\ninst✝ : Nontrivial A\ns : Finset α\nf : α → β → A\nx : β\n⊢ (x ∈ support fun x => ∏ i in s, f i x) ↔ x ∈ ⋂ (i : α) (_ : i ∈ s), support (f i)\n[PROOFSTEP]\nsimp [support, Ne.def, Finset.prod_eq_zero_iff, mem_setOf_eq, Set.mem_iInter, not_exists]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nA : Type u_3\nB : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nR : Type u_8\nS : Type u_9\nG : Type u_10\nM₀ : Type u_11\nG₀ : Type u_12\nι : Sort u_13\ninst✝¹ : One R\ninst✝ : AddGroup R\nf : α → R\n⊢ mulSupport (1 - f) = support f\n[PROOFSTEP]\nrw [sub_eq_add_neg, mulSupport_one_add', support_neg']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝ : One M\nf : α → M\ns : Set β\ng : β → α\n⊢ g '' s ∩ mulSupport f = g '' (s ∩ mulSupport (f ∘ g))\n[PROOFSTEP]\nrw [mulSupport_comp_eq_preimage f g, image_inter_preimage]\n[GOAL]\nA : Type u_1\nB : Type u_2\ninst✝¹ : DecidableEq A\ninst✝ : One B\na : A\nb : B\n⊢ mulSupport (mulSingle a 1) = ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\ninst✝¹ : DecidableEq A\ninst✝ : One B\na : A\nb : B\nh : b ≠ 1\nx : A\nhx : x = a\n⊢ x ∈ mulSupport (mulSingle a b)\n[PROOFSTEP]\nrwa [mem_mulSupport, hx, mulSingle_eq_same]\n[GOAL]\nA : Type u_1\nB : Type u_2\ninst✝² : DecidableEq A\ninst✝¹ : One B\na : A\nb : B\ninst✝ : DecidableEq B\n⊢ mulSupport (mulSingle a b) = if b = 1 then ∅ else {a}\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nA : Type u_1\nB : Type u_2\ninst✝² : DecidableEq A\ninst✝¹ : One B\na : A\nb : B\ninst✝ : DecidableEq B\nh : b = 1\n⊢ mulSupport (mulSingle a b) = ∅\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nA : Type u_1\nB : Type u_2\ninst✝² : DecidableEq A\ninst✝¹ : One B\na : A\nb : B\ninst✝ : DecidableEq B\nh : ¬b = 1\n⊢ mulSupport (mulSingle a b) = {a}\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nA : Type u_1\nB : Type u_2\ninst✝¹ : DecidableEq A\ninst✝ : One B\na : A\nb b' : B\nhb : b ≠ 1\nhb' : b' ≠ 1\ni j : A\n⊢ Disjoint (mulSupport (mulSingle i b)) (mulSupport (mulSingle j b')) ↔ i ≠ j\n[PROOFSTEP]\nrw [mulSupport_mulSingle_of_ne hb, mulSupport_mulSingle_of_ne hb', disjoint_singleton]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Support", "llama_tokens": 7462, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419958239132, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.38938705357884307}}
{"text": "[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\na b c d : WithTerminal C\nf : a ⟶ b\ng : b ⟶ c\nh : c ⟶ d\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases a\n[GOAL]\ncase of\nC : Type u\ninst✝ : Category.{v, u} C\nb c d : WithTerminal C\ng : b ⟶ c\nh : c ⟶ d\na✝ : C\nf : of a✝ ⟶ b\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases b\n[GOAL]\ncase star\nC : Type u\ninst✝ : Category.{v, u} C\nb c d : WithTerminal C\ng : b ⟶ c\nh : c ⟶ d\nf : star ⟶ b\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases b\n[GOAL]\ncase of.of\nC : Type u\ninst✝ : Category.{v, u} C\nc d : WithTerminal C\nh : c ⟶ d\na✝¹ a✝ : C\ng : of a✝ ⟶ c\nf : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases c\n[GOAL]\ncase of.star\nC : Type u\ninst✝ : Category.{v, u} C\nc d : WithTerminal C\nh : c ⟶ d\na✝ : C\ng : star ⟶ c\nf : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases c\n[GOAL]\ncase star.of\nC : Type u\ninst✝ : Category.{v, u} C\nc d : WithTerminal C\nh : c ⟶ d\na✝ : C\ng : of a✝ ⟶ c\nf : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases c\n[GOAL]\ncase star.star\nC : Type u\ninst✝ : Category.{v, u} C\nc d : WithTerminal C\nh : c ⟶ d\ng : star ⟶ c\nf : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases c\n[GOAL]\ncase of.of.of\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithTerminal C\na✝² a✝¹ : C\nf : of a✝² ⟶ of a✝¹\na✝ : C\nh : of a✝ ⟶ d\ng : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase of.of.star\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithTerminal C\na✝¹ a✝ : C\nf : of a✝¹ ⟶ of a✝\nh : star ⟶ d\ng : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase of.star.of\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithTerminal C\na✝¹ : C\nf : of a✝¹ ⟶ star\na✝ : C\nh : of a✝ ⟶ d\ng : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase of.star.star\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithTerminal C\na✝ : C\nf : of a✝ ⟶ star\nh : star ⟶ d\ng : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase star.of.of\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithTerminal C\na✝¹ : C\nf : star ⟶ of a✝¹\na✝ : C\nh : of a✝ ⟶ d\ng : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase star.of.star\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithTerminal C\na✝ : C\nf : star ⟶ of a✝\nh : star ⟶ d\ng : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase star.star.of\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithTerminal C\nf : star ⟶ star\na✝ : C\nh : of a✝ ⟶ d\ng : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase star.star.star\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithTerminal C\nf : star ⟶ star\nh : star ⟶ d\ng : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase of.of.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝³ a✝² : C\nf : of a✝³ ⟶ of a✝²\na✝¹ : C\ng : of a✝² ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.of.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝³ a✝² : C\nf : of a✝³ ⟶ of a✝²\na✝¹ : C\ng : of a✝² ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.of.of.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝² a✝¹ : C\nf : of a✝² ⟶ of a✝¹\na✝ : C\ng : of a✝¹ ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.of.of.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝² a✝¹ : C\nf : of a✝² ⟶ of a✝¹\na✝ : C\ng : of a✝¹ ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.of.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² a✝¹ : C\nf : of a✝² ⟶ of a✝¹\ng : of a✝¹ ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.of.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² a✝¹ : C\nf : of a✝² ⟶ of a✝¹\ng : of a✝¹ ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.of.star.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ a✝ : C\nf : of a✝¹ ⟶ of a✝\ng : of a✝ ⟶ star\nh : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.of.star.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ a✝ : C\nf : of a✝¹ ⟶ of a✝\ng : of a✝ ⟶ star\nh : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.star.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² : C\nf : of a✝² ⟶ star\na✝¹ : C\ng : star ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.star.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² : C\nf : of a✝² ⟶ star\na✝¹ : C\ng : star ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.star.of.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : of a✝¹ ⟶ star\na✝ : C\ng : star ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.star.of.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : of a✝¹ ⟶ star\na✝ : C\ng : star ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.star.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : of a✝¹ ⟶ star\ng : star ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.star.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : of a✝¹ ⟶ star\ng : star ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.star.star.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝ : C\nf : of a✝ ⟶ star\ng h : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.star.star.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝ : C\nf : of a✝ ⟶ star\ng h : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.of.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² : C\nf : star ⟶ of a✝²\na✝¹ : C\ng : of a✝² ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.of.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² : C\nf : star ⟶ of a✝²\na✝¹ : C\ng : of a✝² ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.of.of.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : star ⟶ of a✝¹\na✝ : C\ng : of a✝¹ ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.of.of.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : star ⟶ of a✝¹\na✝ : C\ng : of a✝¹ ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.of.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : star ⟶ of a✝¹\ng : of a✝¹ ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.of.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : star ⟶ of a✝¹\ng : of a✝¹ ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.of.star.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝ : C\nf : star ⟶ of a✝\ng : of a✝ ⟶ star\nh : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.of.star.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝ : C\nf : star ⟶ of a✝\ng : of a✝ ⟶ star\nh : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.star.of.of\nC : Type u\ninst✝ : Category.{v, u} C\nf : star ⟶ star\na✝¹ : C\ng : star ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.star.of.of\nC : Type u\ninst✝ : Category.{v, u} C\nf : star ⟶ star\na✝¹ : C\ng : star ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.star.of.star\nC : Type u\ninst✝ : Category.{v, u} C\nf : star ⟶ star\na✝ : C\ng : star ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.star.of.star\nC : Type u\ninst✝ : Category.{v, u} C\nf : star ⟶ star\na✝ : C\ng : star ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.star.star.of\nC : Type u\ninst✝ : Category.{v, u} C\nf g : star ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.star.star.of\nC : Type u\ninst✝ : Category.{v, u} C\nf g : star ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.star.star.star\nC : Type u\ninst✝ : Category.{v, u} C\nf g h : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.star.star.star\nC : Type u\ninst✝ : Category.{v, u} C\nf g h : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.of.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² a✝¹ : C\nf : of a✝² ⟶ of a✝¹\ng : of a✝¹ ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nexact (h : PEmpty).elim\n[GOAL]\ncase of.star.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² : C\nf : of a✝² ⟶ star\na✝¹ : C\ng : star ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nexact (g : PEmpty).elim\n[GOAL]\ncase of.star.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : of a✝¹ ⟶ star\ng : star ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nexact (h : PEmpty).elim\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : WithTerminal C\n⊢ ∀ (a : X ⟶ star), a = default\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → F.obj x ⟶ Z\nhM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x\nx : C\n⊢ (lift F M hM).map (Limits.IsTerminal.from starTerminal (incl.obj x)) ≫ (liftStar F M hM).hom =\n    NatTrans.app (inclLift F M hM).hom x ≫ M x\n[PROOFSTEP]\nerw [Category.id_comp, Category.comp_id]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → F.obj x ⟶ Z\nhM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x\nx : C\n⊢ (lift F M hM).map (Limits.IsTerminal.from starTerminal (incl.obj x)) = M x\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.139406, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → F.obj x ⟶ Z\nhM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x\nG : WithTerminal C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), G.map (Limits.IsTerminal.from starTerminal (incl.obj x)) ≫ hG.hom = NatTrans.app h.hom x ≫ M x\n⊢ ∀ {X Y : WithTerminal C} (f : X ⟶ Y),\n    G.map f ≫\n        ((fun X =>\n              match X with\n              | of x => h.app x\n              | star => hG)\n            Y).hom =\n      ((fun X =>\n              match X with\n              | of x => h.app x\n              | star => hG)\n            X).hom ≫\n        (lift F M hM).map f\n[PROOFSTEP]\nrintro (X | X) (Y | Y) f\n[GOAL]\ncase of.of\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.139406, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → F.obj x ⟶ Z\nhM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x\nG : WithTerminal C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), G.map (Limits.IsTerminal.from starTerminal (incl.obj x)) ≫ hG.hom = NatTrans.app h.hom x ≫ M x\nX Y : C\nf : of X ⟶ of Y\n⊢ G.map f ≫\n      ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          (of Y)).hom =\n    ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          (of X)).hom ≫\n      (lift F M hM).map f\n[PROOFSTEP]\napply h.hom.naturality\n[GOAL]\ncase of.star\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.139406, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → F.obj x ⟶ Z\nhM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x\nG : WithTerminal C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), G.map (Limits.IsTerminal.from starTerminal (incl.obj x)) ≫ hG.hom = NatTrans.app h.hom x ≫ M x\nX : C\nf : of X ⟶ star\n⊢ G.map f ≫\n      ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom =\n    ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          (of X)).hom ≫\n      (lift F M hM).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase of.star.unit\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.139406, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → F.obj x ⟶ Z\nhM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x\nG : WithTerminal C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), G.map (Limits.IsTerminal.from starTerminal (incl.obj x)) ≫ hG.hom = NatTrans.app h.hom x ≫ M x\nX : C\n⊢ G.map PUnit.unit ≫\n      ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom =\n    ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          (of X)).hom ≫\n      (lift F M hM).map PUnit.unit\n[PROOFSTEP]\nexact hh _\n[GOAL]\ncase star.of\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.139406, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → F.obj x ⟶ Z\nhM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x\nG : WithTerminal C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), G.map (Limits.IsTerminal.from starTerminal (incl.obj x)) ≫ hG.hom = NatTrans.app h.hom x ≫ M x\nY : C\nf : star ⟶ of Y\n⊢ G.map f ≫\n      ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          (of Y)).hom =\n    ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom ≫\n      (lift F M hM).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase star.star\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.139406, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → F.obj x ⟶ Z\nhM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x\nG : WithTerminal C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), G.map (Limits.IsTerminal.from starTerminal (incl.obj x)) ≫ hG.hom = NatTrans.app h.hom x ≫ M x\nf : star ⟶ star\n⊢ G.map f ≫\n      ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom =\n    ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom ≫\n      (lift F M hM).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase star.star.unit\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.139406, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → F.obj x ⟶ Z\nhM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x\nG : WithTerminal C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), G.map (Limits.IsTerminal.from starTerminal (incl.obj x)) ≫ hG.hom = NatTrans.app h.hom x ≫ M x\n⊢ G.map PUnit.unit ≫\n      ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom =\n    ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom ≫\n      (lift F M hM).map PUnit.unit\n[PROOFSTEP]\nchange G.map (𝟙 _) ≫ hG.hom = hG.hom ≫ 𝟙 _\n[GOAL]\ncase star.star.unit\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.139406, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → F.obj x ⟶ Z\nhM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x\nG : WithTerminal C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), G.map (Limits.IsTerminal.from starTerminal (incl.obj x)) ≫ hG.hom = NatTrans.app h.hom x ≫ M x\n⊢ G.map (𝟙 star) ≫ hG.hom = hG.hom ≫ 𝟙 Z\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\na b c d : WithInitial C\nf : a ⟶ b\ng : b ⟶ c\nh : c ⟶ d\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases a\n[GOAL]\ncase of\nC : Type u\ninst✝ : Category.{v, u} C\nb c d : WithInitial C\ng : b ⟶ c\nh : c ⟶ d\na✝ : C\nf : of a✝ ⟶ b\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases b\n[GOAL]\ncase star\nC : Type u\ninst✝ : Category.{v, u} C\nb c d : WithInitial C\ng : b ⟶ c\nh : c ⟶ d\nf : star ⟶ b\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases b\n[GOAL]\ncase of.of\nC : Type u\ninst✝ : Category.{v, u} C\nc d : WithInitial C\nh : c ⟶ d\na✝¹ a✝ : C\ng : of a✝ ⟶ c\nf : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases c\n[GOAL]\ncase of.star\nC : Type u\ninst✝ : Category.{v, u} C\nc d : WithInitial C\nh : c ⟶ d\na✝ : C\ng : star ⟶ c\nf : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases c\n[GOAL]\ncase star.of\nC : Type u\ninst✝ : Category.{v, u} C\nc d : WithInitial C\nh : c ⟶ d\na✝ : C\ng : of a✝ ⟶ c\nf : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases c\n[GOAL]\ncase star.star\nC : Type u\ninst✝ : Category.{v, u} C\nc d : WithInitial C\nh : c ⟶ d\ng : star ⟶ c\nf : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases c\n[GOAL]\ncase of.of.of\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithInitial C\na✝² a✝¹ : C\nf : of a✝² ⟶ of a✝¹\na✝ : C\nh : of a✝ ⟶ d\ng : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase of.of.star\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithInitial C\na✝¹ a✝ : C\nf : of a✝¹ ⟶ of a✝\nh : star ⟶ d\ng : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase of.star.of\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithInitial C\na✝¹ : C\nf : of a✝¹ ⟶ star\na✝ : C\nh : of a✝ ⟶ d\ng : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase of.star.star\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithInitial C\na✝ : C\nf : of a✝ ⟶ star\nh : star ⟶ d\ng : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase star.of.of\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithInitial C\na✝¹ : C\nf : star ⟶ of a✝¹\na✝ : C\nh : of a✝ ⟶ d\ng : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase star.of.star\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithInitial C\na✝ : C\nf : star ⟶ of a✝\nh : star ⟶ d\ng : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase star.star.of\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithInitial C\nf : star ⟶ star\na✝ : C\nh : of a✝ ⟶ d\ng : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase star.star.star\nC : Type u\ninst✝ : Category.{v, u} C\nd : WithInitial C\nf : star ⟶ star\nh : star ⟶ d\ng : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases d\n[GOAL]\ncase of.of.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝³ a✝² : C\nf : of a✝³ ⟶ of a✝²\na✝¹ : C\ng : of a✝² ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.of.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝³ a✝² : C\nf : of a✝³ ⟶ of a✝²\na✝¹ : C\ng : of a✝² ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.of.of.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝² a✝¹ : C\nf : of a✝² ⟶ of a✝¹\na✝ : C\ng : of a✝¹ ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.of.of.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝² a✝¹ : C\nf : of a✝² ⟶ of a✝¹\na✝ : C\ng : of a✝¹ ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.of.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² a✝¹ : C\nf : of a✝² ⟶ of a✝¹\ng : of a✝¹ ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.of.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² a✝¹ : C\nf : of a✝² ⟶ of a✝¹\ng : of a✝¹ ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.of.star.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ a✝ : C\nf : of a✝¹ ⟶ of a✝\ng : of a✝ ⟶ star\nh : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.of.star.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ a✝ : C\nf : of a✝¹ ⟶ of a✝\ng : of a✝ ⟶ star\nh : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.star.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² : C\nf : of a✝² ⟶ star\na✝¹ : C\ng : star ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.star.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² : C\nf : of a✝² ⟶ star\na✝¹ : C\ng : star ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.star.of.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : of a✝¹ ⟶ star\na✝ : C\ng : star ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.star.of.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : of a✝¹ ⟶ star\na✝ : C\ng : star ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.star.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : of a✝¹ ⟶ star\ng : star ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.star.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : of a✝¹ ⟶ star\ng : star ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.star.star.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝ : C\nf : of a✝ ⟶ star\ng h : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase of.star.star.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝ : C\nf : of a✝ ⟶ star\ng h : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.of.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² : C\nf : star ⟶ of a✝²\na✝¹ : C\ng : of a✝² ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.of.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² : C\nf : star ⟶ of a✝²\na✝¹ : C\ng : of a✝² ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.of.of.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : star ⟶ of a✝¹\na✝ : C\ng : of a✝¹ ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.of.of.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : star ⟶ of a✝¹\na✝ : C\ng : of a✝¹ ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.of.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : star ⟶ of a✝¹\ng : of a✝¹ ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.of.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : star ⟶ of a✝¹\ng : of a✝¹ ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.of.star.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝ : C\nf : star ⟶ of a✝\ng : of a✝ ⟶ star\nh : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.of.star.star\nC : Type u\ninst✝ : Category.{v, u} C\na✝ : C\nf : star ⟶ of a✝\ng : of a✝ ⟶ star\nh : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.star.of.of\nC : Type u\ninst✝ : Category.{v, u} C\nf : star ⟶ star\na✝¹ : C\ng : star ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.star.of.of\nC : Type u\ninst✝ : Category.{v, u} C\nf : star ⟶ star\na✝¹ : C\ng : star ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.star.of.star\nC : Type u\ninst✝ : Category.{v, u} C\nf : star ⟶ star\na✝ : C\ng : star ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.star.of.star\nC : Type u\ninst✝ : Category.{v, u} C\nf : star ⟶ star\na✝ : C\ng : star ⟶ of a✝\nh : of a✝ ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.star.star.of\nC : Type u\ninst✝ : Category.{v, u} C\nf g : star ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.star.star.of\nC : Type u\ninst✝ : Category.{v, u} C\nf g : star ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase star.star.star.star\nC : Type u\ninst✝ : Category.{v, u} C\nf g h : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ntry aesop_cat\n[GOAL]\ncase star.star.star.star\nC : Type u\ninst✝ : Category.{v, u} C\nf g h : star ⟶ star\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase of.of.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² a✝¹ : C\nf : of a✝² ⟶ of a✝¹\ng : of a✝¹ ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nexact (g : PEmpty).elim\n[GOAL]\ncase of.star.of.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝² : C\nf : of a✝² ⟶ star\na✝¹ : C\ng : star ⟶ of a✝¹\na✝ : C\nh : of a✝¹ ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nexact (f : PEmpty).elim\n[GOAL]\ncase of.star.star.of\nC : Type u\ninst✝ : Category.{v, u} C\na✝¹ : C\nf : of a✝¹ ⟶ star\ng : star ⟶ star\na✝ : C\nh : star ⟶ of a✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nexact (f : PEmpty).elim\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : WithInitial C\n⊢ ∀ (a : star ⟶ X), a = default\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nx : C\n⊢ (liftStar F M hM).hom ≫ (lift F M hM).map (Limits.IsInitial.to starInitial (incl.obj x)) =\n    M x ≫ NatTrans.app (inclLift F M hM).hom x\n[PROOFSTEP]\nerw [Category.id_comp, Category.comp_id]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nx : C\n⊢ (lift F M hM).map (Limits.IsInitial.to starInitial (incl.obj x)) = M x\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.289890, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nG : WithInitial C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ NatTrans.app h.symm.hom x\n⊢ ∀ {X Y : WithInitial C} (f : X ⟶ Y),\n    G.map f ≫\n        ((fun X =>\n              match X with\n              | of x => h.app x\n              | star => hG)\n            Y).hom =\n      ((fun X =>\n              match X with\n              | of x => h.app x\n              | star => hG)\n            X).hom ≫\n        (lift F M hM).map f\n[PROOFSTEP]\nrintro (X | X) (Y | Y) f\n[GOAL]\ncase of.of\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.289890, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nG : WithInitial C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ NatTrans.app h.symm.hom x\nX Y : C\nf : of X ⟶ of Y\n⊢ G.map f ≫\n      ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          (of Y)).hom =\n    ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          (of X)).hom ≫\n      (lift F M hM).map f\n[PROOFSTEP]\napply h.hom.naturality\n[GOAL]\ncase of.star\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.289890, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nG : WithInitial C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ NatTrans.app h.symm.hom x\nX : C\nf : of X ⟶ star\n⊢ G.map f ≫\n      ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom =\n    ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          (of X)).hom ≫\n      (lift F M hM).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase star.of\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.289890, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nG : WithInitial C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ NatTrans.app h.symm.hom x\nY : C\nf : star ⟶ of Y\n⊢ G.map f ≫\n      ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          (of Y)).hom =\n    ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom ≫\n      (lift F M hM).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase star.of.unit\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.289890, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nG : WithInitial C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ NatTrans.app h.symm.hom x\nY : C\n⊢ G.map PUnit.unit ≫\n      ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          (of Y)).hom =\n    ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom ≫\n      (lift F M hM).map PUnit.unit\n[PROOFSTEP]\nchange G.map _ ≫ h.hom.app _ = hG.hom ≫ _\n[GOAL]\ncase star.of.unit\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.289890, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nG : WithInitial C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ NatTrans.app h.symm.hom x\nY : C\n⊢ G.map PUnit.unit ≫ NatTrans.app h.hom Y = hG.hom ≫ (lift F M hM).map PUnit.unit\n[PROOFSTEP]\nsymm\n[GOAL]\ncase star.of.unit\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.289890, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nG : WithInitial C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ NatTrans.app h.symm.hom x\nY : C\n⊢ hG.hom ≫ (lift F M hM).map PUnit.unit = G.map PUnit.unit ≫ NatTrans.app h.hom Y\n[PROOFSTEP]\nerw [← Iso.eq_inv_comp, ← Category.assoc, hh]\n[GOAL]\ncase star.of.unit\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.289890, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nG : WithInitial C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ NatTrans.app h.symm.hom x\nY : C\n⊢ (lift F M hM).map PUnit.unit = (M Y ≫ NatTrans.app h.symm.hom Y) ≫ NatTrans.app h.hom Y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase star.star\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.289890, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nG : WithInitial C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ NatTrans.app h.symm.hom x\nf : star ⟶ star\n⊢ G.map f ≫\n      ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom =\n    ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom ≫\n      (lift F M hM).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase star.star.unit\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.289890, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nG : WithInitial C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ NatTrans.app h.symm.hom x\n⊢ G.map PUnit.unit ≫\n      ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom =\n    ((fun X =>\n            match X with\n            | of x => h.app x\n            | star => hG)\n          star).hom ≫\n      (lift F M hM).map PUnit.unit\n[PROOFSTEP]\nchange G.map (𝟙 _) ≫ hG.hom = hG.hom ≫ 𝟙 _\n[GOAL]\ncase star.star.unit\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u_1\ninst✝ : Category.{?u.289890, u_1} D\nZ : D\nF : C ⥤ D\nM : (x : C) → Z ⟶ F.obj x\nhM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y\nG : WithInitial C ⥤ D\nh : incl ⋙ G ≅ F\nhG : G.obj star ≅ Z\nhh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ NatTrans.app h.symm.hom x\n⊢ G.map (𝟙 star) ≫ hG.hom = hG.hom ≫ 𝟙 Z\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.WithTerminal", "llama_tokens": 17808, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419704455589, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.38938703931172863}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ applyComposition p (Composition.ones n) = fun v i =>\n    ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) i)\n[PROOFSTEP]\nfunext v i\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\ni : Fin (Composition.length (Composition.ones n))\n⊢ applyComposition p (Composition.ones n) v i =\n    ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) i)\n[PROOFSTEP]\napply p.congr (Composition.ones_blocksFun _ _)\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\ni : Fin (Composition.length (Composition.ones n))\n⊢ ∀ (i_1 : ℕ) (him : i_1 < Composition.blocksFun (Composition.ones n) i),\n    i_1 < 1 →\n      (v ∘ ↑(Composition.embedding (Composition.ones n) i)) { val := i_1, isLt := him } =\n        v (Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) i)\n[PROOFSTEP]\nintro j hjn hj1\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\ni : Fin (Composition.length (Composition.ones n))\nj : ℕ\nhjn : j < Composition.blocksFun (Composition.ones n) i\nhj1 : j < 1\n⊢ (v ∘ ↑(Composition.embedding (Composition.ones n) i)) { val := j, isLt := hjn } =\n    v (Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) i)\n[PROOFSTEP]\nobtain rfl : j = 0 := by linarith\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\ni : Fin (Composition.length (Composition.ones n))\nj : ℕ\nhjn : j < Composition.blocksFun (Composition.ones n) i\nhj1 : j < 1\n⊢ j = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\ni : Fin (Composition.length (Composition.ones n))\nhjn : 0 < Composition.blocksFun (Composition.ones n) i\nhj1 : 0 < 1\n⊢ (v ∘ ↑(Composition.embedding (Composition.ones n) i)) { val := 0, isLt := hjn } =\n    v (Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) i)\n[PROOFSTEP]\nrefine' congr_arg v _\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\ni : Fin (Composition.length (Composition.ones n))\nhjn : 0 < Composition.blocksFun (Composition.ones n) i\nhj1 : 0 < 1\n⊢ ↑(Composition.embedding (Composition.ones n) i) { val := 0, isLt := hjn } =\n    Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) i\n[PROOFSTEP]\nrw [Fin.ext_iff, Fin.coe_castLE, Composition.ones_embedding, Fin.val_mk]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\n⊢ applyComposition p (Composition.single n hn) v = fun _j => ↑(p n) v\n[PROOFSTEP]\next j\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\nj : Fin (Composition.length (Composition.single n hn))\n⊢ applyComposition p (Composition.single n hn) v j = ↑(p n) v\n[PROOFSTEP]\nrefine' p.congr (by simp) fun i hi1 hi2 => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\nj : Fin (Composition.length (Composition.single n hn))\n⊢ Composition.blocksFun (Composition.single n hn) j = n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\nj : Fin (Composition.length (Composition.single n hn))\ni : ℕ\nhi1 : i < Composition.blocksFun (Composition.single n hn) j\nhi2 : i < n\n⊢ (v ∘ ↑(Composition.embedding (Composition.single n hn) j)) { val := i, isLt := hi1 } = v { val := i, isLt := hi2 }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\nj : Fin (Composition.length (Composition.single n hn))\ni : ℕ\nhi1 : i < Composition.blocksFun (Composition.single n hn) j\nhi2 : i < n\n⊢ v (↑(Composition.embedding (Composition.single n hn) j) { val := i, isLt := hi1 }) = v { val := i, isLt := hi2 }\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e_a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\nj : Fin (Composition.length (Composition.single n hn))\ni : ℕ\nhi1 : i < Composition.blocksFun (Composition.single n hn) j\nhi2 : i < n\n⊢ ↑(Composition.embedding (Composition.single n hn) j) { val := i, isLt := hi1 } = { val := i, isLt := hi2 }\n[PROOFSTEP]\nconvert Composition.single_embedding hn ⟨i, hi2⟩ using 1\n[GOAL]\ncase h.e'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\nj : Fin (Composition.length (Composition.single n hn))\ni : ℕ\nhi1 : i < Composition.blocksFun (Composition.single n hn) j\nhi2 : i < n\n⊢ ↑(Composition.embedding (Composition.single n hn) j) { val := i, isLt := hi1 } =\n    ↑(Composition.embedding (Composition.single n hn) 0) { val := i, isLt := hi2 }\n[PROOFSTEP]\ncases' j with j_val j_property\n[GOAL]\ncase h.e'_2.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\ni : ℕ\nhi2 : i < n\nj_val : ℕ\nj_property : j_val < Composition.length (Composition.single n hn)\nhi1 : i < Composition.blocksFun (Composition.single n hn) { val := j_val, isLt := j_property }\n⊢ ↑(Composition.embedding (Composition.single n hn) { val := j_val, isLt := j_property }) { val := i, isLt := hi1 } =\n    ↑(Composition.embedding (Composition.single n hn) 0) { val := i, isLt := hi2 }\n[PROOFSTEP]\nhave : j_val = 0 := le_bot_iff.1 (Nat.lt_succ_iff.1 j_property)\n[GOAL]\ncase h.e'_2.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\ni : ℕ\nhi2 : i < n\nj_val : ℕ\nj_property : j_val < Composition.length (Composition.single n hn)\nhi1 : i < Composition.blocksFun (Composition.single n hn) { val := j_val, isLt := j_property }\nthis : j_val = 0\n⊢ ↑(Composition.embedding (Composition.single n hn) { val := j_val, isLt := j_property }) { val := i, isLt := hi1 } =\n    ↑(Composition.embedding (Composition.single n hn) 0) { val := i, isLt := hi2 }\n[PROOFSTEP]\ncongr!\n[GOAL]\ncase h.e'_2.mk.h.e'_6.e'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\ni : ℕ\nhi2 : i < n\nj_val : ℕ\nj_property : j_val < Composition.length (Composition.single n hn)\nhi1 : i < Composition.blocksFun (Composition.single n hn) { val := j_val, isLt := j_property }\nthis : j_val = 0\ne_2✝ :\n  Fin (Composition.blocksFun (Composition.single n hn) { val := j_val, isLt := j_property }) =\n    Fin (Composition.blocksFun (Composition.single n hn) 0)\n⊢ Composition.blocksFun (Composition.single n hn) { val := j_val, isLt := j_property } = n\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\n⊢ applyComposition (removeZero p) c = applyComposition p c\n[PROOFSTEP]\next v i\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nv : Fin n → E\ni : Fin (Composition.length c)\n⊢ applyComposition (removeZero p) c v i = applyComposition p c v i\n[PROOFSTEP]\nsimp [applyComposition, zero_lt_one.trans_le (c.one_le_blocksFun i), removeZero_of_pos]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\n⊢ applyComposition p c (Function.update v j z) =\n    Function.update (applyComposition p c v) (Composition.index c j)\n      (↑(p (Composition.blocksFun c (Composition.index c j)))\n        (Function.update (v ∘ ↑(Composition.embedding c (Composition.index c j))) (Composition.invEmbedding c j) z))\n[PROOFSTEP]\next k\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\n⊢ applyComposition p c (Function.update v j z) k =\n    Function.update (applyComposition p c v) (Composition.index c j)\n      (↑(p (Composition.blocksFun c (Composition.index c j)))\n        (Function.update (v ∘ ↑(Composition.embedding c (Composition.index c j))) (Composition.invEmbedding c j) z))\n      k\n[PROOFSTEP]\nby_cases h : k = c.index j\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : k = Composition.index c j\n⊢ applyComposition p c (Function.update v j z) k =\n    Function.update (applyComposition p c v) (Composition.index c j)\n      (↑(p (Composition.blocksFun c (Composition.index c j)))\n        (Function.update (v ∘ ↑(Composition.embedding c (Composition.index c j))) (Composition.invEmbedding c j) z))\n      k\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : k = Composition.index c j\n⊢ applyComposition p c (Function.update v j z) (Composition.index c j) =\n    Function.update (applyComposition p c v) (Composition.index c j)\n      (↑(p (Composition.blocksFun c (Composition.index c j)))\n        (Function.update (v ∘ ↑(Composition.embedding c (Composition.index c j))) (Composition.invEmbedding c j) z))\n      (Composition.index c j)\n[PROOFSTEP]\nlet r : Fin (c.blocksFun (c.index j)) → Fin n := c.embedding (c.index j)\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : k = Composition.index c j\nr : Fin (Composition.blocksFun c (Composition.index c j)) → Fin n := ↑(Composition.embedding c (Composition.index c j))\n⊢ applyComposition p c (Function.update v j z) (Composition.index c j) =\n    Function.update (applyComposition p c v) (Composition.index c j)\n      (↑(p (Composition.blocksFun c (Composition.index c j)))\n        (Function.update (v ∘ ↑(Composition.embedding c (Composition.index c j))) (Composition.invEmbedding c j) z))\n      (Composition.index c j)\n[PROOFSTEP]\nsimp only [Function.update_same]\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : k = Composition.index c j\nr : Fin (Composition.blocksFun c (Composition.index c j)) → Fin n := ↑(Composition.embedding c (Composition.index c j))\n⊢ applyComposition p c (Function.update v j z) (Composition.index c j) =\n    ↑(p (Composition.blocksFun c (Composition.index c j)))\n      (Function.update (v ∘ ↑(Composition.embedding c (Composition.index c j))) (Composition.invEmbedding c j) z)\n[PROOFSTEP]\nchange p (c.blocksFun (c.index j)) (Function.update v j z ∘ r) = _\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : k = Composition.index c j\nr : Fin (Composition.blocksFun c (Composition.index c j)) → Fin n := ↑(Composition.embedding c (Composition.index c j))\n⊢ ↑(p (Composition.blocksFun c (Composition.index c j))) (Function.update v j z ∘ r) =\n    ↑(p (Composition.blocksFun c (Composition.index c j)))\n      (Function.update (v ∘ ↑(Composition.embedding c (Composition.index c j))) (Composition.invEmbedding c j) z)\n[PROOFSTEP]\nlet j' := c.invEmbedding j\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : k = Composition.index c j\nr : Fin (Composition.blocksFun c (Composition.index c j)) → Fin n := ↑(Composition.embedding c (Composition.index c j))\nj' : Fin (Composition.blocksFun c (Composition.index c j)) := Composition.invEmbedding c j\n⊢ ↑(p (Composition.blocksFun c (Composition.index c j))) (Function.update v j z ∘ r) =\n    ↑(p (Composition.blocksFun c (Composition.index c j)))\n      (Function.update (v ∘ ↑(Composition.embedding c (Composition.index c j))) (Composition.invEmbedding c j) z)\n[PROOFSTEP]\nsuffices B : Function.update v j z ∘ r = Function.update (v ∘ r) j' z\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : k = Composition.index c j\nr : Fin (Composition.blocksFun c (Composition.index c j)) → Fin n := ↑(Composition.embedding c (Composition.index c j))\nj' : Fin (Composition.blocksFun c (Composition.index c j)) := Composition.invEmbedding c j\nB : Function.update v j z ∘ r = Function.update (v ∘ r) j' z\n⊢ ↑(p (Composition.blocksFun c (Composition.index c j))) (Function.update v j z ∘ r) =\n    ↑(p (Composition.blocksFun c (Composition.index c j)))\n      (Function.update (v ∘ ↑(Composition.embedding c (Composition.index c j))) (Composition.invEmbedding c j) z)\n[PROOFSTEP]\nrw [B]\n[GOAL]\ncase B\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : k = Composition.index c j\nr : Fin (Composition.blocksFun c (Composition.index c j)) → Fin n := ↑(Composition.embedding c (Composition.index c j))\nj' : Fin (Composition.blocksFun c (Composition.index c j)) := Composition.invEmbedding c j\n⊢ Function.update v j z ∘ r = Function.update (v ∘ r) j' z\n[PROOFSTEP]\nsuffices C : Function.update v (r j') z ∘ r = Function.update (v ∘ r) j' z\n[GOAL]\ncase B\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : k = Composition.index c j\nr : Fin (Composition.blocksFun c (Composition.index c j)) → Fin n := ↑(Composition.embedding c (Composition.index c j))\nj' : Fin (Composition.blocksFun c (Composition.index c j)) := Composition.invEmbedding c j\nC : Function.update v (r j') z ∘ r = Function.update (v ∘ r) j' z\n⊢ Function.update v j z ∘ r = Function.update (v ∘ r) j' z\n[PROOFSTEP]\nconvert C\n[GOAL]\ncase h.e'_2.h.e'_4.h.e'_5\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : k = Composition.index c j\nr : Fin (Composition.blocksFun c (Composition.index c j)) → Fin n := ↑(Composition.embedding c (Composition.index c j))\nj' : Fin (Composition.blocksFun c (Composition.index c j)) := Composition.invEmbedding c j\nC : Function.update v (r j') z ∘ r = Function.update (v ∘ r) j' z\n⊢ j = r j'\n[PROOFSTEP]\nexact (c.embedding_comp_inv j).symm\n[GOAL]\ncase C\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : k = Composition.index c j\nr : Fin (Composition.blocksFun c (Composition.index c j)) → Fin n := ↑(Composition.embedding c (Composition.index c j))\nj' : Fin (Composition.blocksFun c (Composition.index c j)) := Composition.invEmbedding c j\n⊢ Function.update v (r j') z ∘ r = Function.update (v ∘ r) j' z\n[PROOFSTEP]\nexact Function.update_comp_eq_of_injective _ (c.embedding _).injective _ _\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : ¬k = Composition.index c j\n⊢ applyComposition p c (Function.update v j z) k =\n    Function.update (applyComposition p c v) (Composition.index c j)\n      (↑(p (Composition.blocksFun c (Composition.index c j)))\n        (Function.update (v ∘ ↑(Composition.embedding c (Composition.index c j))) (Composition.invEmbedding c j) z))\n      k\n[PROOFSTEP]\nsimp only [h, Function.update_eq_self, Function.update_noteq, Ne.def, not_false_iff]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : ¬k = Composition.index c j\n⊢ applyComposition p c (Function.update v j z) k = applyComposition p c v k\n[PROOFSTEP]\nlet r : Fin (c.blocksFun k) → Fin n := c.embedding k\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : ¬k = Composition.index c j\nr : Fin (Composition.blocksFun c k) → Fin n := ↑(Composition.embedding c k)\n⊢ applyComposition p c (Function.update v j z) k = applyComposition p c v k\n[PROOFSTEP]\nchange p (c.blocksFun k) (Function.update v j z ∘ r) = p (c.blocksFun k) (v ∘ r)\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : ¬k = Composition.index c j\nr : Fin (Composition.blocksFun c k) → Fin n := ↑(Composition.embedding c k)\n⊢ ↑(p (Composition.blocksFun c k)) (Function.update v j z ∘ r) = ↑(p (Composition.blocksFun c k)) (v ∘ r)\n[PROOFSTEP]\nsuffices B : Function.update v j z ∘ r = v ∘ r\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : ¬k = Composition.index c j\nr : Fin (Composition.blocksFun c k) → Fin n := ↑(Composition.embedding c k)\nB : Function.update v j z ∘ r = v ∘ r\n⊢ ↑(p (Composition.blocksFun c k)) (Function.update v j z ∘ r) = ↑(p (Composition.blocksFun c k)) (v ∘ r)\n[PROOFSTEP]\nrw [B]\n[GOAL]\ncase B\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : ¬k = Composition.index c j\nr : Fin (Composition.blocksFun c k) → Fin n := ↑(Composition.embedding c k)\n⊢ Function.update v j z ∘ r = v ∘ r\n[PROOFSTEP]\napply Function.update_comp_eq_of_not_mem_range\n[GOAL]\ncase B.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : Composition n\nj : Fin n\nv : Fin n → E\nz : E\nk : Fin (Composition.length c)\nh : ¬k = Composition.index c j\nr : Fin (Composition.blocksFun c k) → Fin n := ↑(Composition.embedding c k)\n⊢ ¬j ∈ Set.range r\n[PROOFSTEP]\nrwa [c.mem_range_embedding_iff']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nn : ℕ\np : FormalMultilinearSeries 𝕜 F G\nf : E →L[𝕜] F\nc : Composition n\nv : Fin n → E\n⊢ applyComposition (compContinuousLinearMap p f) c v = applyComposition p c (↑f ∘ v)\n[PROOFSTEP]\nsimp [applyComposition]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nn : ℕ\np : FormalMultilinearSeries 𝕜 F G\nf : E →L[𝕜] F\nc : Composition n\nv : Fin n → E\n⊢ (fun i => ↑(p (Composition.blocksFun c i)) (↑f ∘ v ∘ ↑(Composition.embedding c i))) = fun i =>\n    ↑(p (Composition.blocksFun c i)) ((↑f ∘ v) ∘ ↑(Composition.embedding c i))\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁴ : CommRing 𝕜\ninst✝¹³ : AddCommGroup E\ninst✝¹² : AddCommGroup F\ninst✝¹¹ : AddCommGroup G\ninst✝¹⁰ : Module 𝕜 E\ninst✝⁹ : Module 𝕜 F\ninst✝⁸ : Module 𝕜 G\ninst✝⁷ : TopologicalSpace E\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : ContinuousConstSMul 𝕜 E\ninst✝² : TopologicalAddGroup F\ninst✝¹ : ContinuousConstSMul 𝕜 F\nn : ℕ\np : FormalMultilinearSeries 𝕜 E F\nc : Composition n\nf : ContinuousMultilinearMap 𝕜 (fun _i => F) G\ninst✝ : DecidableEq (Fin n)\nv : Fin n → E\ni : Fin n\nx y : E\n⊢ (fun v => ↑f (applyComposition p c v)) (Function.update v i (x + y)) =\n    (fun v => ↑f (applyComposition p c v)) (Function.update v i x) +\n      (fun v => ↑f (applyComposition p c v)) (Function.update v i y)\n[PROOFSTEP]\ncases Subsingleton.elim ‹_› (instDecidableEqFin _)\n[GOAL]\ncase refl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹³ : CommRing 𝕜\ninst✝¹² : AddCommGroup E\ninst✝¹¹ : AddCommGroup F\ninst✝¹⁰ : AddCommGroup G\ninst✝⁹ : Module 𝕜 E\ninst✝⁸ : Module 𝕜 F\ninst✝⁷ : Module 𝕜 G\ninst✝⁶ : TopologicalSpace E\ninst✝⁵ : TopologicalSpace F\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousConstSMul 𝕜 E\ninst✝¹ : TopologicalAddGroup F\ninst✝ : ContinuousConstSMul 𝕜 F\nn : ℕ\np : FormalMultilinearSeries 𝕜 E F\nc : Composition n\nf : ContinuousMultilinearMap 𝕜 (fun _i => F) G\nv : Fin n → E\ni : Fin n\nx y : E\n⊢ (fun v => ↑f (applyComposition p c v)) (Function.update v i (x + y)) =\n    (fun v => ↑f (applyComposition p c v)) (Function.update v i x) +\n      (fun v => ↑f (applyComposition p c v)) (Function.update v i y)\n[PROOFSTEP]\nsimp only [applyComposition_update, ContinuousMultilinearMap.map_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁴ : CommRing 𝕜\ninst✝¹³ : AddCommGroup E\ninst✝¹² : AddCommGroup F\ninst✝¹¹ : AddCommGroup G\ninst✝¹⁰ : Module 𝕜 E\ninst✝⁹ : Module 𝕜 F\ninst✝⁸ : Module 𝕜 G\ninst✝⁷ : TopologicalSpace E\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : ContinuousConstSMul 𝕜 E\ninst✝² : TopologicalAddGroup F\ninst✝¹ : ContinuousConstSMul 𝕜 F\nn : ℕ\np : FormalMultilinearSeries 𝕜 E F\nc✝ : Composition n\nf : ContinuousMultilinearMap 𝕜 (fun _i => F) G\ninst✝ : DecidableEq (Fin n)\nv : Fin n → E\ni : Fin n\nc : 𝕜\nx : E\n⊢ (fun v => ↑f (applyComposition p c✝ v)) (Function.update v i (c • x)) =\n    c • (fun v => ↑f (applyComposition p c✝ v)) (Function.update v i x)\n[PROOFSTEP]\ncases Subsingleton.elim ‹_› (instDecidableEqFin _)\n[GOAL]\ncase refl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹³ : CommRing 𝕜\ninst✝¹² : AddCommGroup E\ninst✝¹¹ : AddCommGroup F\ninst✝¹⁰ : AddCommGroup G\ninst✝⁹ : Module 𝕜 E\ninst✝⁸ : Module 𝕜 F\ninst✝⁷ : Module 𝕜 G\ninst✝⁶ : TopologicalSpace E\ninst✝⁵ : TopologicalSpace F\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousConstSMul 𝕜 E\ninst✝¹ : TopologicalAddGroup F\ninst✝ : ContinuousConstSMul 𝕜 F\nn : ℕ\np : FormalMultilinearSeries 𝕜 E F\nc✝ : Composition n\nf : ContinuousMultilinearMap 𝕜 (fun _i => F) G\nv : Fin n → E\ni : Fin n\nc : 𝕜\nx : E\n⊢ (fun v => ↑f (applyComposition p c✝ v)) (Function.update v i (c • x)) =\n    c • (fun v => ↑f (applyComposition p c✝ v)) (Function.update v i x)\n[PROOFSTEP]\nsimp only [applyComposition_update, ContinuousMultilinearMap.map_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 0 → E\nv' : Fin 0 → F\n⊢ ↑(FormalMultilinearSeries.comp q p 0) v = ↑(q 0) v'\n[PROOFSTEP]\nlet c : Composition 0 := Composition.ones 0\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 0 → E\nv' : Fin 0 → F\nc : Composition 0 := Composition.ones 0\n⊢ ↑(FormalMultilinearSeries.comp q p 0) v = ↑(q 0) v'\n[PROOFSTEP]\ndsimp [FormalMultilinearSeries.comp]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 0 → E\nv' : Fin 0 → F\nc : Composition 0 := Composition.ones 0\n⊢ ↑(∑ c : Composition 0, compAlongComposition q p c) v = ↑(q 0) v'\n[PROOFSTEP]\nhave : { c } = (Finset.univ : Finset (Composition 0)) := by\n  apply Finset.eq_of_subset_of_card_le <;> simp [Finset.card_univ, composition_card 0]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 0 → E\nv' : Fin 0 → F\nc : Composition 0 := Composition.ones 0\n⊢ {c} = Finset.univ\n[PROOFSTEP]\napply Finset.eq_of_subset_of_card_le\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 0 → E\nv' : Fin 0 → F\nc : Composition 0 := Composition.ones 0\n⊢ {c} ⊆ Finset.univ\n[PROOFSTEP]\nsimp [Finset.card_univ, composition_card 0]\n[GOAL]\ncase h₂\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 0 → E\nv' : Fin 0 → F\nc : Composition 0 := Composition.ones 0\n⊢ Finset.card Finset.univ ≤ Finset.card {c}\n[PROOFSTEP]\nsimp [Finset.card_univ, composition_card 0]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 0 → E\nv' : Fin 0 → F\nc : Composition 0 := Composition.ones 0\nthis : {c} = Finset.univ\n⊢ ↑(∑ c : Composition 0, compAlongComposition q p c) v = ↑(q 0) v'\n[PROOFSTEP]\nrw [← this, Finset.sum_singleton, compAlongComposition_apply]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 0 → E\nv' : Fin 0 → F\nc : Composition 0 := Composition.ones 0\nthis : {c} = Finset.univ\n⊢ ↑(q (Composition.length c)) (applyComposition p c v) = ↑(q 0) v'\n[PROOFSTEP]\nsymm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 0 → E\nv' : Fin 0 → F\nc : Composition 0 := Composition.ones 0\nthis : {c} = Finset.univ\n⊢ ↑(q 0) v' = ↑(q (Composition.length c)) (applyComposition p c v)\n[PROOFSTEP]\ncongr!\n  -- porting note: needed the stronger version of `congr` here\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 E F\np : FormalMultilinearSeries 𝕜 E E\n⊢ FormalMultilinearSeries.comp q p 0 = q 0\n[PROOFSTEP]\next v\n[GOAL]\ncase H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 E F\np : FormalMultilinearSeries 𝕜 E E\nv : Fin 0 → E\n⊢ ↑(FormalMultilinearSeries.comp q p 0) v = ↑(q 0) v\n[PROOFSTEP]\nexact q.comp_coeff_zero p _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 1 → E\n⊢ ↑(FormalMultilinearSeries.comp q p 1) v = ↑(q 1) fun _i => ↑(p 1) v\n[PROOFSTEP]\nhave : {Composition.ones 1} = (Finset.univ : Finset (Composition 1)) :=\n  Finset.eq_univ_of_card _ (by simp [composition_card])\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 1 → E\n⊢ Finset.card {Composition.ones 1} = Fintype.card (Composition 1)\n[PROOFSTEP]\nsimp [composition_card]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 1 → E\nthis : {Composition.ones 1} = Finset.univ\n⊢ ↑(FormalMultilinearSeries.comp q p 1) v = ↑(q 1) fun _i => ↑(p 1) v\n[PROOFSTEP]\nsimp only [FormalMultilinearSeries.comp, compAlongComposition_apply, ← this, Finset.sum_singleton]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 1 → E\nthis : {Composition.ones 1} = Finset.univ\n⊢ ↑(q (Composition.length (Composition.ones 1))) (applyComposition p (Composition.ones 1) v) = ↑(q 1) fun _i => ↑(p 1) v\n[PROOFSTEP]\nrefine' q.congr (by simp) fun i hi1 hi2 => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 1 → E\nthis : {Composition.ones 1} = Finset.univ\n⊢ Composition.length (Composition.ones 1) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 1 → E\nthis : {Composition.ones 1} = Finset.univ\ni : ℕ\nhi1 : i < Composition.length (Composition.ones 1)\nhi2 : i < 1\n⊢ applyComposition p (Composition.ones 1) v { val := i, isLt := hi1 } = ↑(p 1) v\n[PROOFSTEP]\nsimp only [applyComposition_ones]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 1 → E\nthis : {Composition.ones 1} = Finset.univ\ni : ℕ\nhi1 : i < Composition.length (Composition.ones 1)\nhi2 : i < 1\n⊢ (↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones 1) ≤ 1) { val := i, isLt := hi1 })) =\n    ↑(p 1) v\n[PROOFSTEP]\nexact\n  p.congr rfl fun j _hj1 hj2 => by\n    congr!\n      -- porting note: needed the stronger `congr!`\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nv : Fin 1 → E\nthis : {Composition.ones 1} = Finset.univ\ni : ℕ\nhi1 : i < Composition.length (Composition.ones 1)\nhi2 : i < 1\nj : ℕ\n_hj1 hj2 : j < 1\n⊢ v (Fin.castLE (_ : Composition.length (Composition.ones 1) ≤ 1) { val := i, isLt := hi1 }) =\n    v { val := j, isLt := hj2 }\n[PROOFSTEP]\ncongr!\n  -- porting note: needed the stronger `congr!`\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\n⊢ FormalMultilinearSeries.comp (removeZero q) p n = FormalMultilinearSeries.comp q p n\n[PROOFSTEP]\next v\n[GOAL]\ncase H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\n⊢ ↑(FormalMultilinearSeries.comp (removeZero q) p n) v = ↑(FormalMultilinearSeries.comp q p n) v\n[PROOFSTEP]\nsimp only [FormalMultilinearSeries.comp, compAlongComposition, ContinuousMultilinearMap.compAlongComposition_apply,\n  ContinuousMultilinearMap.sum_apply]\n[GOAL]\ncase H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\n⊢ ∑ x : Composition n, ↑(removeZero q (Composition.length x)) (applyComposition p x v) =\n    ∑ x : Composition n, ↑(q (Composition.length x)) (applyComposition p x v)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun c _hc => _\n[GOAL]\ncase H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : 0 < n\nv : Fin n → E\nc : Composition n\n_hc : c ∈ Finset.univ\n⊢ ↑(removeZero q (Composition.length c)) (applyComposition p c v) = ↑(q (Composition.length c)) (applyComposition p c v)\n[PROOFSTEP]\nrw [removeZero_of_pos _ (c.length_pos_of_pos hn)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\n⊢ FormalMultilinearSeries.comp q (removeZero p) = FormalMultilinearSeries.comp q p\n[PROOFSTEP]\next n\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : AddCommGroup F\ninst✝¹² : AddCommGroup G\ninst✝¹¹ : Module 𝕜 E\ninst✝¹⁰ : Module 𝕜 F\ninst✝⁹ : Module 𝕜 G\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup E\ninst✝⁴ : ContinuousConstSMul 𝕜 E\ninst✝³ : TopologicalAddGroup F\ninst✝² : ContinuousConstSMul 𝕜 F\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nx✝ : Fin n → E\n⊢ ↑(FormalMultilinearSeries.comp q (removeZero p) n) x✝ = ↑(FormalMultilinearSeries.comp q p n) x✝\n[PROOFSTEP]\nsimp [FormalMultilinearSeries.comp]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\np : FormalMultilinearSeries 𝕜 E F\nc : Composition n\nf : ContinuousMultilinearMap 𝕜 (fun _i => F) G\nv : Fin n → E\n⊢ ‖f‖ * ∏ i : Fin (Composition.length c), ‖applyComposition p c v i‖ ≤\n    ‖f‖ *\n      ∏ i : Fin (Composition.length c),\n        ‖p (Composition.blocksFun c i)‖ * ∏ j : Fin (Composition.blocksFun c i), ‖(v ∘ ↑(Composition.embedding c i)) j‖\n[PROOFSTEP]\napply mul_le_mul_of_nonneg_left _ (norm_nonneg _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\np : FormalMultilinearSeries 𝕜 E F\nc : Composition n\nf : ContinuousMultilinearMap 𝕜 (fun _i => F) G\nv : Fin n → E\n⊢ ∏ i : Fin (Composition.length c), ‖applyComposition p c v i‖ ≤\n    ∏ i : Fin (Composition.length c),\n      ‖p (Composition.blocksFun c i)‖ * ∏ j : Fin (Composition.blocksFun c i), ‖(v ∘ ↑(Composition.embedding c i)) j‖\n[PROOFSTEP]\nrefine' Finset.prod_le_prod (fun i _hi => norm_nonneg _) fun i _hi => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\np : FormalMultilinearSeries 𝕜 E F\nc : Composition n\nf : ContinuousMultilinearMap 𝕜 (fun _i => F) G\nv : Fin n → E\ni : Fin (Composition.length c)\n_hi : i ∈ Finset.univ\n⊢ ‖applyComposition p c v i‖ ≤\n    ‖p (Composition.blocksFun c i)‖ * ∏ j : Fin (Composition.blocksFun c i), ‖(v ∘ ↑(Composition.embedding c i)) j‖\n[PROOFSTEP]\napply ContinuousMultilinearMap.le_op_norm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\np : FormalMultilinearSeries 𝕜 E F\nc : Composition n\nf : ContinuousMultilinearMap 𝕜 (fun _i => F) G\nv : Fin n → E\n⊢ ‖f‖ *\n      ∏ i : Fin (Composition.length c),\n        ‖p (Composition.blocksFun c i)‖ *\n          ∏ j : Fin (Composition.blocksFun c i), ‖(v ∘ ↑(Composition.embedding c i)) j‖ =\n    (‖f‖ * ∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖) *\n      ∏ i : Fin (Composition.length c), ∏ j : Fin (Composition.blocksFun c i), ‖(v ∘ ↑(Composition.embedding c i)) j‖\n[PROOFSTEP]\nrw [Finset.prod_mul_distrib, mul_assoc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\np : FormalMultilinearSeries 𝕜 E F\nc : Composition n\nf : ContinuousMultilinearMap 𝕜 (fun _i => F) G\nv : Fin n → E\n⊢ (‖f‖ * ∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖) *\n      ∏ i : Fin (Composition.length c), ∏ j : Fin (Composition.blocksFun c i), ‖(v ∘ ↑(Composition.embedding c i)) j‖ =\n    (‖f‖ * ∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖) * ∏ i : Fin n, ‖v i‖\n[PROOFSTEP]\nrw [← c.blocksFinEquiv.prod_comp, ← Finset.univ_sigma_univ, Finset.prod_sigma]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\np : FormalMultilinearSeries 𝕜 E F\nc : Composition n\nf : ContinuousMultilinearMap 𝕜 (fun _i => F) G\nv : Fin n → E\n⊢ (‖f‖ * ∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖) *\n      ∏ i : Fin (Composition.length c), ∏ j : Fin (Composition.blocksFun c i), ‖(v ∘ ↑(Composition.embedding c i)) j‖ =\n    (‖f‖ * ∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖) *\n      ∏ a : Fin (Composition.length c),\n        ∏ s : Fin (Composition.blocksFun c a), ‖v (↑(Composition.blocksFinEquiv c) { fst := a, snd := s })‖\n[PROOFSTEP]\ncongr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nc : Composition n\n⊢ ‖compAlongComposition q p c‖₊ ≤\n    ‖q (Composition.length c)‖₊ * ∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖₊\n[PROOFSTEP]\nrw [← NNReal.coe_le_coe]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nc : Composition n\n⊢ ↑‖compAlongComposition q p c‖₊ ≤\n    ↑(‖q (Composition.length c)‖₊ * ∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖₊)\n[PROOFSTEP]\npush_cast\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nc : Composition n\n⊢ ‖compAlongComposition q p c‖ ≤\n    ‖q (Composition.length c)‖ * ∏ x : Fin (Composition.length c), ‖p (Composition.blocksFun c x)‖\n[PROOFSTEP]\nexact q.compAlongComposition_norm p c\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\nh : n = 1\nv : Fin n → E\n⊢ ↑(id 𝕜 E n) v = v { val := 0, isLt := (_ : 0 < n) }\n[PROOFSTEP]\nsubst n\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nv : Fin 1 → E\n⊢ ↑(id 𝕜 E 1) v = v { val := 0, isLt := (_ : 0 < 1) }\n[PROOFSTEP]\napply id_apply_one\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\nh : n ≠ 1\n⊢ id 𝕜 E n = 0\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nh : Nat.zero ≠ 1\n⊢ id 𝕜 E Nat.zero = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\nh : Nat.succ n ≠ 1\n⊢ id 𝕜 E (Nat.succ n) = 0\n[PROOFSTEP]\ncases n\n[GOAL]\ncase succ.zero\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nh : Nat.succ Nat.zero ≠ 1\n⊢ id 𝕜 E (Nat.succ Nat.zero) = 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ : ℕ\nh : Nat.succ (Nat.succ n✝) ≠ 1\n⊢ id 𝕜 E (Nat.succ (Nat.succ n✝)) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\n⊢ FormalMultilinearSeries.comp p (id 𝕜 E) = p\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ FormalMultilinearSeries.comp p (id 𝕜 E) n = p n\n[PROOFSTEP]\ndsimp [FormalMultilinearSeries.comp]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ ∑ c : Composition n, compAlongComposition p (id 𝕜 E) c = p n\n[PROOFSTEP]\nrw [Finset.sum_eq_single (Composition.ones n)]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ compAlongComposition p (id 𝕜 E) (Composition.ones n) = p n\ncase h.h₀\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ ∀ (b : Composition n), b ∈ Finset.univ → b ≠ Composition.ones n → compAlongComposition p (id 𝕜 E) b = 0\ncase h.h₁\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ ¬Composition.ones n ∈ Finset.univ → compAlongComposition p (id 𝕜 E) (Composition.ones n) = 0\n[PROOFSTEP]\nshow compAlongComposition p (id 𝕜 E) (Composition.ones n) = p n\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ compAlongComposition p (id 𝕜 E) (Composition.ones n) = p n\n[PROOFSTEP]\next v\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\n⊢ ↑(compAlongComposition p (id 𝕜 E) (Composition.ones n)) v = ↑(p n) v\n[PROOFSTEP]\nrw [compAlongComposition_apply]\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\n⊢ ↑(p (Composition.length (Composition.ones n))) (applyComposition (id 𝕜 E) (Composition.ones n) v) = ↑(p n) v\n[PROOFSTEP]\napply p.congr (Composition.ones_length n)\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\n⊢ ∀ (i : ℕ) (him : i < Composition.length (Composition.ones n)) (hin : i < n),\n    applyComposition (id 𝕜 E) (Composition.ones n) v { val := i, isLt := him } = v { val := i, isLt := hin }\n[PROOFSTEP]\nintros\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\ni✝ : ℕ\nhim✝ : i✝ < Composition.length (Composition.ones n)\nhin✝ : i✝ < n\n⊢ applyComposition (id 𝕜 E) (Composition.ones n) v { val := i✝, isLt := him✝ } = v { val := i✝, isLt := hin✝ }\n[PROOFSTEP]\nrw [applyComposition_ones]\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\ni✝ : ℕ\nhim✝ : i✝ < Composition.length (Composition.ones n)\nhin✝ : i✝ < n\n⊢ (fun v i => ↑(id 𝕜 E 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) i)) v\n      { val := i✝, isLt := him✝ } =\n    v { val := i✝, isLt := hin✝ }\n[PROOFSTEP]\nrefine' congr_arg v _\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\ni✝ : ℕ\nhim✝ : i✝ < Composition.length (Composition.ones n)\nhin✝ : i✝ < n\n⊢ Fin.castLE (_ : Composition.length (Composition.ones n) ≤ n) { val := i✝, isLt := him✝ } = { val := i✝, isLt := hin✝ }\n[PROOFSTEP]\nrw [Fin.ext_iff, Fin.coe_castLE, Fin.val_mk]\n[GOAL]\ncase h.h₀\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ ∀ (b : Composition n), b ∈ Finset.univ → b ≠ Composition.ones n → compAlongComposition p (id 𝕜 E) b = 0\ncase h.h₁\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ ¬Composition.ones n ∈ Finset.univ → compAlongComposition p (id 𝕜 E) (Composition.ones n) = 0\n[PROOFSTEP]\nshow ∀ b : Composition n, b ∈ Finset.univ → b ≠ Composition.ones n → compAlongComposition p (id 𝕜 E) b = 0\n[GOAL]\ncase h.h₀\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ ∀ (b : Composition n), b ∈ Finset.univ → b ≠ Composition.ones n → compAlongComposition p (id 𝕜 E) b = 0\n[PROOFSTEP]\nintro b _ hb\n[GOAL]\ncase h.h₀\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.ones n\n⊢ compAlongComposition p (id 𝕜 E) b = 0\n[PROOFSTEP]\nobtain ⟨k, hk, lt_k⟩ : ∃ (k : ℕ), k ∈ Composition.blocks b ∧ 1 < k := Composition.ne_ones_iff.1 hb\n[GOAL]\ncase h.h₀.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.ones n\nk : ℕ\nhk : k ∈ b.blocks\nlt_k : 1 < k\n⊢ compAlongComposition p (id 𝕜 E) b = 0\n[PROOFSTEP]\nobtain ⟨i, hi⟩ : ∃ (i : Fin b.blocks.length), b.blocks.get i = k := List.get_of_mem hk\n[GOAL]\ncase h.h₀.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.ones n\nk : ℕ\nhk : k ∈ b.blocks\nlt_k : 1 < k\ni : Fin (length b.blocks)\nhi : List.get b.blocks i = k\n⊢ compAlongComposition p (id 𝕜 E) b = 0\n[PROOFSTEP]\nlet j : Fin b.length := ⟨i.val, b.blocks_length ▸ i.prop⟩\n[GOAL]\ncase h.h₀.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.ones n\nk : ℕ\nhk : k ∈ b.blocks\nlt_k : 1 < k\ni : Fin (length b.blocks)\nhi : List.get b.blocks i = k\nj : Fin (Composition.length b) := { val := ↑i, isLt := (_ : ↑i < Composition.length b) }\n⊢ compAlongComposition p (id 𝕜 E) b = 0\n[PROOFSTEP]\nhave A : 1 < b.blocksFun j := by convert lt_k\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.ones n\nk : ℕ\nhk : k ∈ b.blocks\nlt_k : 1 < k\ni : Fin (length b.blocks)\nhi : List.get b.blocks i = k\nj : Fin (Composition.length b) := { val := ↑i, isLt := (_ : ↑i < Composition.length b) }\n⊢ 1 < Composition.blocksFun b j\n[PROOFSTEP]\nconvert lt_k\n[GOAL]\ncase h.h₀.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.ones n\nk : ℕ\nhk : k ∈ b.blocks\nlt_k : 1 < k\ni : Fin (length b.blocks)\nhi : List.get b.blocks i = k\nj : Fin (Composition.length b) := { val := ↑i, isLt := (_ : ↑i < Composition.length b) }\nA : 1 < Composition.blocksFun b j\n⊢ compAlongComposition p (id 𝕜 E) b = 0\n[PROOFSTEP]\next v\n[GOAL]\ncase h.h₀.intro.intro.intro.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.ones n\nk : ℕ\nhk : k ∈ b.blocks\nlt_k : 1 < k\ni : Fin (length b.blocks)\nhi : List.get b.blocks i = k\nj : Fin (Composition.length b) := { val := ↑i, isLt := (_ : ↑i < Composition.length b) }\nA : 1 < Composition.blocksFun b j\nv : Fin n → E\n⊢ ↑(compAlongComposition p (id 𝕜 E) b) v = ↑0 v\n[PROOFSTEP]\nrw [compAlongComposition_apply, ContinuousMultilinearMap.zero_apply]\n[GOAL]\ncase h.h₀.intro.intro.intro.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.ones n\nk : ℕ\nhk : k ∈ b.blocks\nlt_k : 1 < k\ni : Fin (length b.blocks)\nhi : List.get b.blocks i = k\nj : Fin (Composition.length b) := { val := ↑i, isLt := (_ : ↑i < Composition.length b) }\nA : 1 < Composition.blocksFun b j\nv : Fin n → E\n⊢ ↑(p (Composition.length b)) (applyComposition (id 𝕜 E) b v) = 0\n[PROOFSTEP]\napply ContinuousMultilinearMap.map_coord_zero _ j\n[GOAL]\ncase h.h₀.intro.intro.intro.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.ones n\nk : ℕ\nhk : k ∈ b.blocks\nlt_k : 1 < k\ni : Fin (length b.blocks)\nhi : List.get b.blocks i = k\nj : Fin (Composition.length b) := { val := ↑i, isLt := (_ : ↑i < Composition.length b) }\nA : 1 < Composition.blocksFun b j\nv : Fin n → E\n⊢ applyComposition (id 𝕜 E) b v j = 0\n[PROOFSTEP]\ndsimp [applyComposition]\n[GOAL]\ncase h.h₀.intro.intro.intro.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.ones n\nk : ℕ\nhk : k ∈ b.blocks\nlt_k : 1 < k\ni : Fin (length b.blocks)\nhi : List.get b.blocks i = k\nj : Fin (Composition.length b) := { val := ↑i, isLt := (_ : ↑i < Composition.length b) }\nA : 1 < Composition.blocksFun b j\nv : Fin n → E\n⊢ ↑(id 𝕜 E (Composition.blocksFun b { val := ↑i, isLt := (_ : ↑i < length b.blocks) }))\n      (v ∘ ↑(Composition.embedding b { val := ↑i, isLt := (_ : ↑i < length b.blocks) })) =\n    0\n[PROOFSTEP]\nrw [id_apply_ne_one _ _ (ne_of_gt A)]\n[GOAL]\ncase h.h₀.intro.intro.intro.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.ones n\nk : ℕ\nhk : k ∈ b.blocks\nlt_k : 1 < k\ni : Fin (length b.blocks)\nhi : List.get b.blocks i = k\nj : Fin (Composition.length b) := { val := ↑i, isLt := (_ : ↑i < Composition.length b) }\nA : 1 < Composition.blocksFun b j\nv : Fin n → E\n⊢ ↑0 (v ∘ ↑(Composition.embedding b { val := ↑i, isLt := (_ : ↑i < length b.blocks) })) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.h₁\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ ¬Composition.ones n ∈ Finset.univ → compAlongComposition p (id 𝕜 E) (Composition.ones n) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\n⊢ FormalMultilinearSeries.comp (id 𝕜 F) p = p\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\n⊢ FormalMultilinearSeries.comp (id 𝕜 F) p n = p n\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : n = 0\n⊢ FormalMultilinearSeries.comp (id 𝕜 F) p n = p n\n[PROOFSTEP]\nrw [hn, h]\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : n = 0\n⊢ FormalMultilinearSeries.comp (id 𝕜 F) p 0 = 0\n[PROOFSTEP]\next v\n[GOAL]\ncase pos.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : n = 0\nv : Fin 0 → E\n⊢ ↑(FormalMultilinearSeries.comp (id 𝕜 F) p 0) v = ↑0 v\n[PROOFSTEP]\nrw [comp_coeff_zero', id_apply_ne_one _ _ zero_ne_one]\n[GOAL]\ncase pos.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : n = 0\nv : Fin 0 → E\n⊢ (↑0 fun _i => 0) = ↑0 v\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\n⊢ FormalMultilinearSeries.comp (id 𝕜 F) p n = p n\n[PROOFSTEP]\ndsimp [FormalMultilinearSeries.comp]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\n⊢ ∑ c : Composition n, compAlongComposition (id 𝕜 F) p c = p n\n[PROOFSTEP]\nhave n_pos : 0 < n := bot_lt_iff_ne_bot.mpr hn\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\n⊢ ∑ c : Composition n, compAlongComposition (id 𝕜 F) p c = p n\n[PROOFSTEP]\nrw [Finset.sum_eq_single (Composition.single n n_pos)]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\n⊢ compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n\ncase neg.h₀\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\n⊢ ∀ (b : Composition n), b ∈ Finset.univ → b ≠ Composition.single n n_pos → compAlongComposition (id 𝕜 F) p b = 0\ncase neg.h₁\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\n⊢ ¬Composition.single n n_pos ∈ Finset.univ → compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = 0\n[PROOFSTEP]\nshow compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\n⊢ compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = p n\n[PROOFSTEP]\next v\n[GOAL]\ncase neg.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\nv : Fin n → E\n⊢ ↑(compAlongComposition (id 𝕜 F) p (Composition.single n n_pos)) v = ↑(p n) v\n[PROOFSTEP]\nrw [compAlongComposition_apply, id_apply_one' _ _ (Composition.single_length n_pos)]\n[GOAL]\ncase neg.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\nv : Fin n → E\n⊢ applyComposition p (Composition.single n n_pos) v\n      { val := 0, isLt := (_ : 0 < Composition.length (Composition.single n n_pos)) } =\n    ↑(p n) v\n[PROOFSTEP]\ndsimp [applyComposition]\n[GOAL]\ncase neg.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\nv : Fin n → E\n⊢ ↑(p (Composition.blocksFun (Composition.single n n_pos) 0))\n      (v ∘ ↑(Composition.embedding (Composition.single n n_pos) 0)) =\n    ↑(p n) v\n[PROOFSTEP]\nrefine' p.congr rfl fun i him hin => congr_arg v <| _\n[GOAL]\ncase neg.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\nv : Fin n → E\ni : ℕ\nhim : i < Composition.blocksFun (Composition.single n n_pos) 0\nhin : i < n\n⊢ ↑(Composition.embedding (Composition.single n n_pos) 0) { val := i, isLt := him } = { val := i, isLt := hin }\n[PROOFSTEP]\next\n[GOAL]\ncase neg.H.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\nv : Fin n → E\ni : ℕ\nhim : i < Composition.blocksFun (Composition.single n n_pos) 0\nhin : i < n\n⊢ ↑(↑(Composition.embedding (Composition.single n n_pos) 0) { val := i, isLt := him }) = ↑{ val := i, isLt := hin }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.h₀\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\n⊢ ∀ (b : Composition n), b ∈ Finset.univ → b ≠ Composition.single n n_pos → compAlongComposition (id 𝕜 F) p b = 0\ncase neg.h₁\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\n⊢ ¬Composition.single n n_pos ∈ Finset.univ → compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = 0\n[PROOFSTEP]\nshow ∀ b : Composition n, b ∈ Finset.univ → b ≠ Composition.single n n_pos → compAlongComposition (id 𝕜 F) p b = 0\n[GOAL]\ncase neg.h₀\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\n⊢ ∀ (b : Composition n), b ∈ Finset.univ → b ≠ Composition.single n n_pos → compAlongComposition (id 𝕜 F) p b = 0\n[PROOFSTEP]\nintro b _ hb\n[GOAL]\ncase neg.h₀\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.single n n_pos\n⊢ compAlongComposition (id 𝕜 F) p b = 0\n[PROOFSTEP]\nhave A : b.length ≠ 1 := by simpa [Composition.eq_single_iff_length] using hb\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.single n n_pos\n⊢ Composition.length b ≠ 1\n[PROOFSTEP]\nsimpa [Composition.eq_single_iff_length] using hb\n[GOAL]\ncase neg.h₀\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.single n n_pos\nA : Composition.length b ≠ 1\n⊢ compAlongComposition (id 𝕜 F) p b = 0\n[PROOFSTEP]\next v\n[GOAL]\ncase neg.h₀.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.single n n_pos\nA : Composition.length b ≠ 1\nv : Fin n → E\n⊢ ↑(compAlongComposition (id 𝕜 F) p b) v = ↑0 v\n[PROOFSTEP]\nrw [compAlongComposition_apply, id_apply_ne_one _ _ A]\n[GOAL]\ncase neg.h₀.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\nb : Composition n\na✝ : b ∈ Finset.univ\nhb : b ≠ Composition.single n n_pos\nA : Composition.length b ≠ 1\nv : Fin n → E\n⊢ ↑0 (applyComposition p b v) = ↑0 v\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg.h₁\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\np : FormalMultilinearSeries 𝕜 E F\nh : p 0 = 0\nn : ℕ\nhn : ¬n = 0\nn_pos : 0 < n\n⊢ ¬Composition.single n n_pos ∈ Finset.univ → compAlongComposition (id 𝕜 F) p (Composition.single n n_pos) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\n⊢ ∃ r, r > 0 ∧ Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n[PROOFSTEP]\nrcases ENNReal.lt_iff_exists_nnreal_btwn.1 (lt_min zero_lt_one hq) with ⟨rq, rq_pos, hrq⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq : ℝ≥0\nrq_pos : 0 < ↑rq\nhrq : ↑rq < min 1 (radius q)\n⊢ ∃ r, r > 0 ∧ Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n[PROOFSTEP]\nrcases ENNReal.lt_iff_exists_nnreal_btwn.1 (lt_min zero_lt_one hp) with ⟨rp, rp_pos, hrp⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq : ℝ≥0\nrq_pos : 0 < ↑rq\nhrq : ↑rq < min 1 (radius q)\nrp : ℝ≥0\nrp_pos : 0 < ↑rp\nhrp : ↑rp < min 1 (radius p)\n⊢ ∃ r, r > 0 ∧ Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n[PROOFSTEP]\nsimp only [lt_min_iff, ENNReal.coe_lt_one_iff, ENNReal.coe_pos] at hrp hrq rp_pos rq_pos \n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\n⊢ ∃ r, r > 0 ∧ Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n[PROOFSTEP]\nobtain ⟨Cq, _hCq0, hCq⟩ : ∃ Cq > 0, ∀ n, ‖q n‖₊ * rq ^ n ≤ Cq := q.nnnorm_mul_pow_le_of_lt_radius hrq.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\n⊢ ∃ r, r > 0 ∧ Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n[PROOFSTEP]\nobtain ⟨Cp, hCp1, hCp⟩ : ∃ Cp ≥ 1, ∀ n, ‖p n‖₊ * rp ^ n ≤ Cp :=\n  by\n  rcases p.nnnorm_mul_pow_le_of_lt_radius hrp.2 with ⟨Cp, -, hCp⟩\n  exact ⟨max Cp 1, le_max_right _ _, fun n => (hCp n).trans (le_max_left _ _)⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\n⊢ ∃ Cp, Cp ≥ 1 ∧ ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\n[PROOFSTEP]\nrcases p.nnnorm_mul_pow_le_of_lt_radius hrp.2 with ⟨Cp, -, hCp⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\n⊢ ∃ Cp, Cp ≥ 1 ∧ ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\n[PROOFSTEP]\nexact ⟨max Cp 1, le_max_right _ _, fun n => (hCp n).trans (le_max_left _ _)⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\n⊢ ∃ r, r > 0 ∧ Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n[PROOFSTEP]\nlet r0 : ℝ≥0 := (4 * Cp)⁻¹\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\n⊢ ∃ r, r > 0 ∧ Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n[PROOFSTEP]\nhave r0_pos : 0 < r0 := inv_pos.2 (mul_pos zero_lt_four (zero_lt_one.trans_le hCp1))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\n⊢ ∃ r, r > 0 ∧ Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n[PROOFSTEP]\nset r : ℝ≥0 := rp * rq * r0\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\n⊢ ∃ r, r > 0 ∧ Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n[PROOFSTEP]\nhave r_pos : 0 < r := mul_pos (mul_pos rp_pos rq_pos) r0_pos\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\n⊢ ∃ r, r > 0 ∧ Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n[PROOFSTEP]\nhave I : ∀ i : Σ n : ℕ, Composition n, ‖q.compAlongComposition p i.2‖₊ * r ^ i.1 ≤ Cq / 4 ^ i.1 :=\n  by\n  rintro ⟨n, c⟩\n  have A\n  calc\n    ‖q c.length‖₊ * rq ^ n ≤ ‖q c.length‖₊ * rq ^ c.length :=\n      mul_le_mul' le_rfl (pow_le_pow_of_le_one rq.2 hrq.1.le c.length_le)\n    _ ≤ Cq := hCq _\n  have B\n  calc\n    (∏ i, ‖p (c.blocksFun i)‖₊) * rp ^ n = ∏ i, ‖p (c.blocksFun i)‖₊ * rp ^ c.blocksFun i := by\n      simp only [Finset.prod_mul_distrib, Finset.prod_pow_eq_pow_sum, c.sum_blocksFun]\n    _ ≤ ∏ _i : Fin c.length, Cp := (Finset.prod_le_prod' fun i _ => hCp _)\n    _ = Cp ^ c.length := by simp\n    _ ≤ Cp ^ n := pow_le_pow hCp1 c.length_le\n  calc\n    ‖q.compAlongComposition p c‖₊ * r ^ n ≤ (‖q c.length‖₊ * ∏ i, ‖p (c.blocksFun i)‖₊) * r ^ n :=\n      mul_le_mul' (q.compAlongComposition_nnnorm p c) le_rfl\n    _ = ‖q c.length‖₊ * rq ^ n * ((∏ i, ‖p (c.blocksFun i)‖₊) * rp ^ n) * r0 ^ n := by simp only [mul_pow]; ring\n    _ ≤ Cq * Cp ^ n * r0 ^ n := (mul_le_mul' (mul_le_mul' A B) le_rfl)\n    _ = Cq / 4 ^ n := by\n      simp only\n      field_simp [mul_pow, (zero_lt_one.trans_le hCp1).ne']\n      ring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\n⊢ ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\n[PROOFSTEP]\nrintro ⟨n, c⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\n⊢ ‖compAlongComposition q p { fst := n, snd := c }.snd‖₊ * r ^ { fst := n, snd := c }.fst ≤\n    Cq / 4 ^ { fst := n, snd := c }.fst\n[PROOFSTEP]\nhave A\n[GOAL]\ncase A\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\n⊢ ?m.706771\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\nA : ?m.706771\n⊢ ‖compAlongComposition q p { fst := n, snd := c }.snd‖₊ * r ^ { fst := n, snd := c }.fst ≤\n    Cq / 4 ^ { fst := n, snd := c }.fst\n[PROOFSTEP]\ncalc\n  ‖q c.length‖₊ * rq ^ n ≤ ‖q c.length‖₊ * rq ^ c.length :=\n    mul_le_mul' le_rfl (pow_le_pow_of_le_one rq.2 hrq.1.le c.length_le)\n  _ ≤ Cq := hCq _\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\nA : ‖q (Composition.length c)‖₊ * rq ^ n ≤ Cq\n⊢ ‖compAlongComposition q p { fst := n, snd := c }.snd‖₊ * r ^ { fst := n, snd := c }.fst ≤\n    Cq / 4 ^ { fst := n, snd := c }.fst\n[PROOFSTEP]\nhave B\n[GOAL]\ncase B\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\nA : ‖q (Composition.length c)‖₊ * rq ^ n ≤ Cq\n⊢ ?m.707603\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\nA : ‖q (Composition.length c)‖₊ * rq ^ n ≤ Cq\nB : ?m.707603\n⊢ ‖compAlongComposition q p { fst := n, snd := c }.snd‖₊ * r ^ { fst := n, snd := c }.fst ≤\n    Cq / 4 ^ { fst := n, snd := c }.fst\n[PROOFSTEP]\ncalc\n  (∏ i, ‖p (c.blocksFun i)‖₊) * rp ^ n = ∏ i, ‖p (c.blocksFun i)‖₊ * rp ^ c.blocksFun i := by\n    simp only [Finset.prod_mul_distrib, Finset.prod_pow_eq_pow_sum, c.sum_blocksFun]\n  _ ≤ ∏ _i : Fin c.length, Cp := (Finset.prod_le_prod' fun i _ => hCp _)\n  _ = Cp ^ c.length := by simp\n  _ ≤ Cp ^ n := pow_le_pow hCp1 c.length_le\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\nA : ‖q (Composition.length c)‖₊ * rq ^ n ≤ Cq\n⊢ (∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖₊) * rp ^ n =\n    ∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖₊ * rp ^ Composition.blocksFun c i\n[PROOFSTEP]\nsimp only [Finset.prod_mul_distrib, Finset.prod_pow_eq_pow_sum, c.sum_blocksFun]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\nA : ‖q (Composition.length c)‖₊ * rq ^ n ≤ Cq\n⊢ ∏ _i : Fin (Composition.length c), Cp = Cp ^ Composition.length c\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\nA : ‖q (Composition.length c)‖₊ * rq ^ n ≤ Cq\nB : (∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖₊) * rp ^ n ≤ Cp ^ n\n⊢ ‖compAlongComposition q p { fst := n, snd := c }.snd‖₊ * r ^ { fst := n, snd := c }.fst ≤\n    Cq / 4 ^ { fst := n, snd := c }.fst\n[PROOFSTEP]\ncalc\n  ‖q.compAlongComposition p c‖₊ * r ^ n ≤ (‖q c.length‖₊ * ∏ i, ‖p (c.blocksFun i)‖₊) * r ^ n :=\n    mul_le_mul' (q.compAlongComposition_nnnorm p c) le_rfl\n  _ = ‖q c.length‖₊ * rq ^ n * ((∏ i, ‖p (c.blocksFun i)‖₊) * rp ^ n) * r0 ^ n := by simp only [mul_pow]; ring\n  _ ≤ Cq * Cp ^ n * r0 ^ n := (mul_le_mul' (mul_le_mul' A B) le_rfl)\n  _ = Cq / 4 ^ n := by\n    simp only\n    field_simp [mul_pow, (zero_lt_one.trans_le hCp1).ne']\n    ring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\nA : ‖q (Composition.length c)‖₊ * rq ^ n ≤ Cq\nB : (∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖₊) * rp ^ n ≤ Cp ^ n\n⊢ (‖q (Composition.length c)‖₊ * ∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖₊) * r ^ n =\n    ‖q (Composition.length c)‖₊ * rq ^ n *\n        ((∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖₊) * rp ^ n) *\n      r0 ^ n\n[PROOFSTEP]\nsimp only [mul_pow]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\nA : ‖q (Composition.length c)‖₊ * rq ^ n ≤ Cq\nB : (∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖₊) * rp ^ n ≤ Cp ^ n\n⊢ (‖q (Composition.length c)‖₊ * ∏ x : Fin (Composition.length c), ‖p (Composition.blocksFun c x)‖₊) *\n      (rp ^ n * rq ^ n * (4 * Cp)⁻¹ ^ n) =\n    ‖q (Composition.length c)‖₊ * rq ^ n *\n        ((∏ x : Fin (Composition.length c), ‖p (Composition.blocksFun c x)‖₊) * rp ^ n) *\n      (4 * Cp)⁻¹ ^ n\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\nA : ‖q (Composition.length c)‖₊ * rq ^ n ≤ Cq\nB : (∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖₊) * rp ^ n ≤ Cp ^ n\n⊢ Cq * Cp ^ n * r0 ^ n = Cq / 4 ^ n\n[PROOFSTEP]\nsimp only\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\nA : ‖q (Composition.length c)‖₊ * rq ^ n ≤ Cq\nB : (∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖₊) * rp ^ n ≤ Cp ^ n\n⊢ Cq * Cp ^ n * (4 * Cp)⁻¹ ^ n = Cq / 4 ^ n\n[PROOFSTEP]\nfield_simp [mul_pow, (zero_lt_one.trans_le hCp1).ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nn : ℕ\nc : Composition n\nA : ‖q (Composition.length c)‖₊ * rq ^ n ≤ Cq\nB : (∏ i : Fin (Composition.length c), ‖p (Composition.blocksFun c i)‖₊) * rp ^ n ≤ Cp ^ n\n⊢ Cq * Cp ^ n * 4 ^ n = Cq * (4 ^ n * Cp ^ n)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\n⊢ ∃ r, r > 0 ∧ Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n[PROOFSTEP]\nrefine' ⟨r, r_pos, NNReal.summable_of_le I _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\n⊢ Summable fun b => Cq / 4 ^ b.fst\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\n⊢ Summable fun b => Cq * (4 ^ b.fst)⁻¹\n[PROOFSTEP]\nrefine' Summable.mul_left _ _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\n⊢ Summable fun b => (4 ^ b.fst)⁻¹\n[PROOFSTEP]\nhave : ∀ n : ℕ, HasSum (fun c : Composition n => (4 ^ n : ℝ≥0)⁻¹) (2 ^ (n - 1) / 4 ^ n) :=\n  by\n  intro n\n  convert hasSum_fintype fun c : Composition n => (4 ^ n : ℝ≥0)⁻¹\n  simp [Finset.card_univ, composition_card, div_eq_mul_inv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\n⊢ ∀ (n : ℕ), HasSum (fun c => (4 ^ n)⁻¹) (2 ^ (n - 1) / 4 ^ n)\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\nn : ℕ\n⊢ HasSum (fun c => (4 ^ n)⁻¹) (2 ^ (n - 1) / 4 ^ n)\n[PROOFSTEP]\nconvert hasSum_fintype fun c : Composition n => (4 ^ n : ℝ≥0)⁻¹\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\nn : ℕ\n⊢ 2 ^ (n - 1) / 4 ^ n = ∑ b : Composition n, (4 ^ n)⁻¹\n[PROOFSTEP]\nsimp [Finset.card_univ, composition_card, div_eq_mul_inv]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\nthis : ∀ (n : ℕ), HasSum (fun c => (4 ^ n)⁻¹) (2 ^ (n - 1) / 4 ^ n)\n⊢ Summable fun b => (4 ^ b.fst)⁻¹\n[PROOFSTEP]\nrefine' NNReal.summable_sigma.2 ⟨fun n => (this n).summable, (NNReal.summable_nat_add_iff 1).1 _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\nthis : ∀ (n : ℕ), HasSum (fun c => (4 ^ n)⁻¹) (2 ^ (n - 1) / 4 ^ n)\n⊢ Summable fun i => ∑' (y : Composition (i + 1)), (4 ^ { fst := i + 1, snd := y }.fst)⁻¹\n[PROOFSTEP]\nconvert (NNReal.summable_geometric (NNReal.div_lt_one_of_lt one_lt_two)).mul_left (1 / 4) using 1\n[GOAL]\ncase h.e'_5\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\nthis : ∀ (n : ℕ), HasSum (fun c => (4 ^ n)⁻¹) (2 ^ (n - 1) / 4 ^ n)\n⊢ (fun i => ∑' (y : Composition (i + 1)), (4 ^ { fst := i + 1, snd := y }.fst)⁻¹) = fun i => 1 / 4 * (1 / 2) ^ i\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_5.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\nthis : ∀ (n : ℕ), HasSum (fun c => (4 ^ n)⁻¹) (2 ^ (n - 1) / 4 ^ n)\nn : ℕ\n⊢ ∑' (y : Composition (n + 1)), (4 ^ { fst := n + 1, snd := y }.fst)⁻¹ = 1 / 4 * (1 / 2) ^ n\n[PROOFSTEP]\nrw [(this _).tsum_eq, add_tsub_cancel_right]\n[GOAL]\ncase h.e'_5.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\nthis : ∀ (n : ℕ), HasSum (fun c => (4 ^ n)⁻¹) (2 ^ (n - 1) / 4 ^ n)\nn : ℕ\n⊢ 2 ^ n / 4 ^ (n + 1) = 1 / 4 * (1 / 2) ^ n\n[PROOFSTEP]\nfield_simp [← mul_assoc, pow_succ', mul_pow, show (4 : ℝ≥0) = 2 * 2 by norm_num, mul_right_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nhq : 0 < radius q\nhp : 0 < radius p\nrq rp : ℝ≥0\nhrp : rp < 1 ∧ ↑rp < radius p\nhrq : rq < 1 ∧ ↑rq < radius q\nrp_pos : 0 < rp\nrq_pos : 0 < rq\nCq : ℝ≥0\n_hCq0 : Cq > 0\nhCq : ∀ (n : ℕ), ‖q n‖₊ * rq ^ n ≤ Cq\nCp : ℝ≥0\nhCp1 : Cp ≥ 1\nhCp : ∀ (n : ℕ), ‖p n‖₊ * rp ^ n ≤ Cp\nr0 : ℝ≥0 := (4 * Cp)⁻¹\nr0_pos : 0 < r0\nr : ℝ≥0 := rp * rq * r0\nr_pos : 0 < r\nI : ∀ (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst ≤ Cq / 4 ^ i.fst\nthis : ∀ (n : ℕ), HasSum (fun c => (4 ^ n)⁻¹) (2 ^ (n - 1) / 4 ^ n)\nn : ℕ\n⊢ 4 = 2 * 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n⊢ ↑r ≤ radius (FormalMultilinearSeries.comp q p)\n[PROOFSTEP]\nrefine'\n  le_radius_of_bound_nnreal _ (∑' i : Σ n, Composition n, ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst) fun n => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nn : ℕ\n⊢ ‖FormalMultilinearSeries.comp q p n‖₊ * r ^ n ≤\n    ∑' (i : (n : ℕ) × Composition n), ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n[PROOFSTEP]\ncalc\n  ‖FormalMultilinearSeries.comp q p n‖₊ * r ^ n ≤ ∑' c : Composition n, ‖compAlongComposition q p c‖₊ * r ^ n :=\n    by\n    rw [tsum_fintype, ← Finset.sum_mul]\n    exact mul_le_mul' (nnnorm_sum_le _ _) le_rfl\n  _ ≤ ∑' i : Σ n : ℕ, Composition n, ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst :=\n    NNReal.tsum_comp_le_tsum_of_inj hr sigma_mk_injective\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nn : ℕ\n⊢ ‖FormalMultilinearSeries.comp q p n‖₊ * r ^ n ≤ ∑' (c : Composition n), ‖compAlongComposition q p c‖₊ * r ^ n\n[PROOFSTEP]\nrw [tsum_fintype, ← Finset.sum_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nn : ℕ\n⊢ ‖FormalMultilinearSeries.comp q p n‖₊ * r ^ n ≤ (∑ x : Composition n, ‖compAlongComposition q p x‖₊) * r ^ n\n[PROOFSTEP]\nexact mul_le_mul' (nnnorm_sum_le _ _) le_rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N : ℕ\ni : (n : ℕ) × (Fin n → ℕ)\n⊢ i ∈ compPartialSumSource m M N ↔ (m ≤ i.fst ∧ i.fst < M) ∧ ∀ (a : Fin i.fst), 1 ≤ Sigma.snd i a ∧ Sigma.snd i a < N\n[PROOFSTEP]\nsimp only [compPartialSumSource, Finset.mem_Ico, Fintype.mem_piFinset, Finset.mem_sigma, iff_self_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N : ℕ\ni : (n : ℕ) × (Fin n → ℕ)\nhi : i ∈ compPartialSumSource m M N\n⊢ (n : ℕ) × Composition n\n[PROOFSTEP]\nrcases i with ⟨n, f⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nf : Fin n → ℕ\nhi : { fst := n, snd := f } ∈ compPartialSumSource m M N\n⊢ (n : ℕ) × Composition n\n[PROOFSTEP]\nrw [mem_compPartialSumSource_iff] at hi \n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nf : Fin n → ℕ\nhi :\n  (m ≤ { fst := n, snd := f }.fst ∧ { fst := n, snd := f }.fst < M) ∧\n    ∀ (a : Fin { fst := n, snd := f }.fst),\n      1 ≤ Sigma.snd { fst := n, snd := f } a ∧ Sigma.snd { fst := n, snd := f } a < N\n⊢ (n : ℕ) × Composition n\n[PROOFSTEP]\nrefine' ⟨∑ j, f j, ofFn fun a => f a, fun hi' => _, by simp [sum_ofFn]⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nf : Fin n → ℕ\nhi :\n  (m ≤ { fst := n, snd := f }.fst ∧ { fst := n, snd := f }.fst < M) ∧\n    ∀ (a : Fin { fst := n, snd := f }.fst),\n      1 ≤ Sigma.snd { fst := n, snd := f } a ∧ Sigma.snd { fst := n, snd := f } a < N\n⊢ sum (ofFn fun a => f a) = ∑ j : Fin n, f j\n[PROOFSTEP]\nsimp [sum_ofFn]\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nf : Fin n → ℕ\nhi :\n  (m ≤ { fst := n, snd := f }.fst ∧ { fst := n, snd := f }.fst < M) ∧\n    ∀ (a : Fin { fst := n, snd := f }.fst),\n      1 ≤ Sigma.snd { fst := n, snd := f } a ∧ Sigma.snd { fst := n, snd := f } a < N\ni✝ : ℕ\nhi' : i✝ ∈ ofFn fun a => f a\n⊢ 0 < i✝\n[PROOFSTEP]\nrename_i i\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nf : Fin n → ℕ\nhi :\n  (m ≤ { fst := n, snd := f }.fst ∧ { fst := n, snd := f }.fst < M) ∧\n    ∀ (a : Fin { fst := n, snd := f }.fst),\n      1 ≤ Sigma.snd { fst := n, snd := f } a ∧ Sigma.snd { fst := n, snd := f } a < N\ni : ℕ\nhi' : i ∈ ofFn fun a => f a\n⊢ 0 < i\n[PROOFSTEP]\nobtain ⟨j, rfl⟩ : ∃ j : Fin n, f j = i := by rwa [mem_ofFn, Set.mem_range] at hi' \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nf : Fin n → ℕ\nhi :\n  (m ≤ { fst := n, snd := f }.fst ∧ { fst := n, snd := f }.fst < M) ∧\n    ∀ (a : Fin { fst := n, snd := f }.fst),\n      1 ≤ Sigma.snd { fst := n, snd := f } a ∧ Sigma.snd { fst := n, snd := f } a < N\ni : ℕ\nhi' : i ∈ ofFn fun a => f a\n⊢ ∃ j, f j = i\n[PROOFSTEP]\nrwa [mem_ofFn, Set.mem_range] at hi' \n[GOAL]\ncase mk.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nf : Fin n → ℕ\nhi :\n  (m ≤ { fst := n, snd := f }.fst ∧ { fst := n, snd := f }.fst < M) ∧\n    ∀ (a : Fin { fst := n, snd := f }.fst),\n      1 ≤ Sigma.snd { fst := n, snd := f } a ∧ Sigma.snd { fst := n, snd := f } a < N\nj : Fin n\nhi' : f j ∈ ofFn fun a => f a\n⊢ 0 < f j\n[PROOFSTEP]\nexact (hi.2 j).1\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N : ℕ\ni : (n : ℕ) × (Fin n → ℕ)\nhi : i ∈ compPartialSumSource m M N\n⊢ Composition.length (compChangeOfVariables m M N i hi).snd = i.fst\n[PROOFSTEP]\nrcases i with ⟨k, blocks_fun⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N k : ℕ\nblocks_fun : Fin k → ℕ\nhi : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\n⊢ Composition.length (compChangeOfVariables m M N { fst := k, snd := blocks_fun } hi).snd =\n    { fst := k, snd := blocks_fun }.fst\n[PROOFSTEP]\ndsimp [compChangeOfVariables]\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N k : ℕ\nblocks_fun : Fin k → ℕ\nhi : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\n⊢ Composition.length\n      { blocks := ofFn fun a => blocks_fun a, blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n        blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) } =\n    k\n[PROOFSTEP]\nsimp only [Composition.length, map_ofFn, length_ofFn]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N : ℕ\ni : (n : ℕ) × (Fin n → ℕ)\nhi : i ∈ compPartialSumSource m M N\nj : Fin i.fst\n⊢ Composition.blocksFun (compChangeOfVariables m M N i hi).snd\n      { val := ↑j, isLt := (_ : ↑j < Composition.length (compChangeOfVariables m M N i hi).snd) } =\n    Sigma.snd i j\n[PROOFSTEP]\nrcases i with ⟨n, f⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nf : Fin n → ℕ\nhi : { fst := n, snd := f } ∈ compPartialSumSource m M N\nj : Fin { fst := n, snd := f }.fst\n⊢ Composition.blocksFun (compChangeOfVariables m M N { fst := n, snd := f } hi).snd\n      { val := ↑j, isLt := (_ : ↑j < Composition.length (compChangeOfVariables m M N { fst := n, snd := f } hi).snd) } =\n    Sigma.snd { fst := n, snd := f } j\n[PROOFSTEP]\ndsimp [Composition.blocksFun, Composition.blocks, compChangeOfVariables]\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nf : Fin n → ℕ\nhi : { fst := n, snd := f } ∈ compPartialSumSource m M N\nj : Fin { fst := n, snd := f }.fst\n⊢ nthLe (ofFn fun a => f a) ↑j\n      (_ :\n        ↑{ val := ↑j,\n              isLt :=\n                (_ :\n                  ↑j <\n                    Composition.length\n                      { blocks := ofFn fun a => f a, blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => f a) → 0 < i),\n                        blocks_sum := (_ : sum (ofFn fun a => f a) = ∑ a : Fin n, f a) }) } <\n          Composition.length\n            { blocks := ofFn fun a => f a, blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => f a) → 0 < i),\n              blocks_sum := (_ : sum (ofFn fun a => f a) = ∑ a : Fin n, f a) }) =\n    f j\n[PROOFSTEP]\nsimp only [map_ofFn, List.nthLe_ofFn, Function.comp_apply]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N : ℕ\ni : (n : ℕ) × Composition n\nhi : i ∈ compPartialSumTargetSet m M N\n⊢ ∃ j hj, i = compChangeOfVariables m M N j hj\n[PROOFSTEP]\nrcases i with ⟨n, c⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nc : Composition n\nhi : { fst := n, snd := c } ∈ compPartialSumTargetSet m M N\n⊢ ∃ j hj, { fst := n, snd := c } = compChangeOfVariables m M N j hj\n[PROOFSTEP]\nrefine' ⟨⟨c.length, c.blocksFun⟩, _, _⟩\n[GOAL]\ncase mk.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nc : Composition n\nhi : { fst := n, snd := c } ∈ compPartialSumTargetSet m M N\n⊢ { fst := Composition.length c, snd := Composition.blocksFun c } ∈ compPartialSumSource m M N\n[PROOFSTEP]\nsimp only [compPartialSumTargetSet, Set.mem_setOf_eq] at hi \n[GOAL]\ncase mk.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nc : Composition n\nhi :\n  m ≤ Composition.length c ∧\n    Composition.length c < M ∧\n      ∀ (j : Fin (Composition.length { fst := n, snd := c }.snd)), Composition.blocksFun c j < N\n⊢ { fst := Composition.length c, snd := Composition.blocksFun c } ∈ compPartialSumSource m M N\n[PROOFSTEP]\nsimp only [mem_compPartialSumSource_iff, hi.left, hi.right, true_and_iff, and_true_iff]\n[GOAL]\ncase mk.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nc : Composition n\nhi :\n  m ≤ Composition.length c ∧\n    Composition.length c < M ∧\n      ∀ (j : Fin (Composition.length { fst := n, snd := c }.snd)), Composition.blocksFun c j < N\n⊢ ∀ (a : Fin { fst := Composition.length c, snd := Composition.blocksFun c }.fst), 1 ≤ Composition.blocksFun c a\n[PROOFSTEP]\nexact fun a => c.one_le_blocks' _\n[GOAL]\ncase mk.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nc : Composition n\nhi : { fst := n, snd := c } ∈ compPartialSumTargetSet m M N\n⊢ { fst := n, snd := c } =\n    compChangeOfVariables m M N { fst := Composition.length c, snd := Composition.blocksFun c }\n      (_ : { fst := Composition.length c, snd := Composition.blocksFun c } ∈ compPartialSumSource m M N)\n[PROOFSTEP]\ndsimp [compChangeOfVariables]\n[GOAL]\ncase mk.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nc : Composition n\nhi : { fst := n, snd := c } ∈ compPartialSumTargetSet m M N\n⊢ { fst := n, snd := c } =\n    { fst := ∑ j : Fin (Composition.length c), Composition.blocksFun c j,\n      snd :=\n        { blocks := ofFn fun a => Composition.blocksFun c a,\n          blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => Composition.blocksFun c a) → 0 < i),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun a => Composition.blocksFun c a) =\n                ∑ a : Fin (Composition.length c), Composition.blocksFun c a) } }\n[PROOFSTEP]\nrw [Composition.sigma_eq_iff_blocks_eq]\n[GOAL]\ncase mk.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nc : Composition n\nhi : { fst := n, snd := c } ∈ compPartialSumTargetSet m M N\n⊢ { fst := n, snd := c }.snd.blocks =\n    { fst := ∑ j : Fin (Composition.length c), Composition.blocksFun c j,\n          snd :=\n            { blocks := ofFn fun a => Composition.blocksFun c a,\n              blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => Composition.blocksFun c a) → 0 < i),\n              blocks_sum :=\n                (_ :\n                  sum (ofFn fun a => Composition.blocksFun c a) =\n                    ∑ a : Fin (Composition.length c), Composition.blocksFun c a) } }.snd.blocks\n[PROOFSTEP]\nsimp only [Composition.blocksFun, Composition.blocks, Subtype.coe_eta, List.get_map]\n[GOAL]\ncase mk.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nc : Composition n\nhi : { fst := n, snd := c } ∈ compPartialSumTargetSet m M N\n⊢ c.blocks = ofFn fun a => nthLe c.blocks ↑a (_ : ↑a < Composition.length c)\n[PROOFSTEP]\nconv_lhs => rw [← List.ofFn_get c.blocks]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nc : Composition n\nhi : { fst := n, snd := c } ∈ compPartialSumTargetSet m M N\n| c.blocks\n[PROOFSTEP]\nrw [← List.ofFn_get c.blocks]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nc : Composition n\nhi : { fst := n, snd := c } ∈ compPartialSumTargetSet m M N\n| c.blocks\n[PROOFSTEP]\nrw [← List.ofFn_get c.blocks]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N n : ℕ\nc : Composition n\nhi : { fst := n, snd := c } ∈ compPartialSumTargetSet m M N\n| c.blocks\n[PROOFSTEP]\nrw [← List.ofFn_get c.blocks]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm M N : ℕ\na : (n : ℕ) × Composition n\n⊢ a ∈ compPartialSumTarget m M N ↔\n    m ≤ Composition.length a.snd ∧\n      Composition.length a.snd < M ∧ ∀ (j : Fin (Composition.length a.snd)), Composition.blocksFun a.snd j < N\n[PROOFSTEP]\nsimp [compPartialSumTarget, compPartialSumTargetSet]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\n⊢ ∑ e in compPartialSumSource m M N, f e = ∑ e in compPartialSumTarget m M N, g e\n[PROOFSTEP]\napply\n  Finset.sum_bij\n    (compChangeOfVariables m M N)\n      -- We should show that the correspondance we have set up is indeed a bijection\n        -- between the index sets of the two sums.\n        -- 1 - show that the image belongs to `comp_partial_sum_target m N N`\n[GOAL]\ncase hi\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\n⊢ ∀ (a : (n : ℕ) × (Fin n → ℕ)) (ha : a ∈ compPartialSumSource m M N),\n    compChangeOfVariables m M N a ha ∈ compPartialSumTarget m M N\n[PROOFSTEP]\nrintro ⟨k, blocks_fun⟩ H\n[GOAL]\ncase hi.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\n⊢ compChangeOfVariables m M N { fst := k, snd := blocks_fun } H ∈ compPartialSumTarget m M N\n[PROOFSTEP]\nrw [mem_compPartialSumSource_iff] at H \n[GOAL]\ncase hi.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝¹ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝¹\ninst✝¹ : NormedSpace 𝕜 H✝¹\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH✝ : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nH :\n  (m ≤ { fst := k, snd := blocks_fun }.fst ∧ { fst := k, snd := blocks_fun }.fst < M) ∧\n    ∀ (a : Fin { fst := k, snd := blocks_fun }.fst),\n      1 ≤ Sigma.snd { fst := k, snd := blocks_fun } a ∧ Sigma.snd { fst := k, snd := blocks_fun } a < N\n⊢ compChangeOfVariables m M N { fst := k, snd := blocks_fun } H✝ ∈ compPartialSumTarget m M N\n[PROOFSTEP]\nsimp only at H \n[GOAL]\ncase hi.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝¹ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝¹\ninst✝¹ : NormedSpace 𝕜 H✝¹\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH✝ : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nH : (m ≤ k ∧ k < M) ∧ ∀ (a : Fin { fst := k, snd := blocks_fun }.fst), 1 ≤ blocks_fun a ∧ blocks_fun a < N\n⊢ compChangeOfVariables m M N { fst := k, snd := blocks_fun } H✝ ∈ compPartialSumTarget m M N\n[PROOFSTEP]\nsimp only [mem_compPartialSumTarget_iff, Composition.length, Composition.blocks, H.left, map_ofFn, length_ofFn,\n  true_and_iff, compChangeOfVariables]\n[GOAL]\ncase hi.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝¹ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝¹\ninst✝¹ : NormedSpace 𝕜 H✝¹\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH✝ : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nH : (m ≤ k ∧ k < M) ∧ ∀ (a : Fin { fst := k, snd := blocks_fun }.fst), 1 ≤ blocks_fun a ∧ blocks_fun a < N\n⊢ ∀\n    (j :\n      Fin\n        (Composition.length\n          { fst := ∑ j : Fin k, blocks_fun j,\n              snd :=\n                { blocks := ofFn fun a => blocks_fun a,\n                  blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n                  blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) } }.snd)),\n    Composition.blocksFun\n        { blocks := ofFn fun a => blocks_fun a, blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n          blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) }\n        j <\n      N\n[PROOFSTEP]\nintro j\n[GOAL]\ncase hi.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝¹ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝¹\ninst✝¹ : NormedSpace 𝕜 H✝¹\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH✝ : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nH : (m ≤ k ∧ k < M) ∧ ∀ (a : Fin { fst := k, snd := blocks_fun }.fst), 1 ≤ blocks_fun a ∧ blocks_fun a < N\nj :\n  Fin\n    (Composition.length\n      { fst := ∑ j : Fin k, blocks_fun j,\n          snd :=\n            { blocks := ofFn fun a => blocks_fun a,\n              blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n              blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) } }.snd)\n⊢ Composition.blocksFun\n      { blocks := ofFn fun a => blocks_fun a, blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n        blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) }\n      j <\n    N\n[PROOFSTEP]\nsimp only [Composition.blocksFun, (H.right _).right, List.nthLe_ofFn]\n[GOAL]\ncase hi.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝¹ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝¹\ninst✝¹ : NormedSpace 𝕜 H✝¹\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH✝ : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nH : (m ≤ k ∧ k < M) ∧ ∀ (a : Fin { fst := k, snd := blocks_fun }.fst), 1 ≤ blocks_fun a ∧ blocks_fun a < N\nj :\n  Fin\n    (Composition.length\n      { fst := ∑ j : Fin k, blocks_fun j,\n          snd :=\n            { blocks := ofFn fun a => blocks_fun a,\n              blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n              blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) } }.snd)\n⊢ nthLe (ofFn fun a => blocks_fun a) ↑j\n      (_ :\n        ↑j <\n          Composition.length\n            { blocks := ofFn fun a => blocks_fun a,\n              blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n              blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) }) <\n    N\n[PROOFSTEP]\nconvert (H.right ⟨j, ?_⟩).right\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝¹ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝¹\ninst✝¹ : NormedSpace 𝕜 H✝¹\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH✝ : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nH : (m ≤ k ∧ k < M) ∧ ∀ (a : Fin { fst := k, snd := blocks_fun }.fst), 1 ≤ blocks_fun a ∧ blocks_fun a < N\nj :\n  Fin\n    (Composition.length\n      { fst := ∑ j : Fin k, blocks_fun j,\n          snd :=\n            { blocks := ofFn fun a => blocks_fun a,\n              blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n              blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) } }.snd)\n⊢ nthLe (ofFn fun a => blocks_fun a) ↑j\n      (_ :\n        ↑j <\n          Composition.length\n            { blocks := ofFn fun a => blocks_fun a,\n              blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n              blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) }) =\n    blocks_fun { val := ↑j, isLt := ?hi.mk }\n[PROOFSTEP]\nconvert List.nthLe_ofFn _ _ using 2\n[GOAL]\ncase h.e'_2.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝¹ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝¹\ninst✝¹ : NormedSpace 𝕜 H✝¹\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH✝ : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nH : (m ≤ k ∧ k < M) ∧ ∀ (a : Fin { fst := k, snd := blocks_fun }.fst), 1 ≤ blocks_fun a ∧ blocks_fun a < N\nj :\n  Fin\n    (Composition.length\n      { fst := ∑ j : Fin k, blocks_fun j,\n          snd :=\n            { blocks := ofFn fun a => blocks_fun a,\n              blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n              blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) } }.snd)\n⊢ ↑j = ↑{ val := ↑j, isLt := ?hi.mk }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hi.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝¹ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝¹\ninst✝¹ : NormedSpace 𝕜 H✝¹\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH✝ : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nH : (m ≤ k ∧ k < M) ∧ ∀ (a : Fin { fst := k, snd := blocks_fun }.fst), 1 ≤ blocks_fun a ∧ blocks_fun a < N\nj :\n  Fin\n    (Composition.length\n      { fst := ∑ j : Fin k, blocks_fun j,\n          snd :=\n            { blocks := ofFn fun a => blocks_fun a,\n              blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n              blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) } }.snd)\n⊢ ↑j < { fst := k, snd := blocks_fun }.fst\n[PROOFSTEP]\napply j.prop.trans_eq\n[GOAL]\ncase hi.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝¹ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝¹\ninst✝¹ : NormedSpace 𝕜 H✝¹\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH✝ : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nH : (m ≤ k ∧ k < M) ∧ ∀ (a : Fin { fst := k, snd := blocks_fun }.fst), 1 ≤ blocks_fun a ∧ blocks_fun a < N\nj :\n  Fin\n    (Composition.length\n      { fst := ∑ j : Fin k, blocks_fun j,\n          snd :=\n            { blocks := ofFn fun a => blocks_fun a,\n              blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n              blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) } }.snd)\n⊢ Composition.length\n      { fst := ∑ j : Fin k, blocks_fun j,\n          snd :=\n            { blocks := ofFn fun a => blocks_fun a,\n              blocks_pos := (_ : ∀ {i : ℕ}, (i ∈ ofFn fun a => blocks_fun a) → 0 < i),\n              blocks_sum := (_ : sum (ofFn fun a => blocks_fun a) = ∑ a : Fin k, blocks_fun a) } }.snd =\n    { fst := k, snd := blocks_fun }.fst\n[PROOFSTEP]\nsimp [Composition.length]\n  -- 2 - show that the composition gives the `comp_along_composition` application\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\n⊢ ∀ (a : (n : ℕ) × (Fin n → ℕ)) (ha : a ∈ compPartialSumSource m M N), f a = g (compChangeOfVariables m M N a ha)\n[PROOFSTEP]\nrintro ⟨k, blocks_fun⟩ H\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\n⊢ f { fst := k, snd := blocks_fun } = g (compChangeOfVariables m M N { fst := k, snd := blocks_fun } H)\n[PROOFSTEP]\nrw [h]\n  -- 3 - show that the map is injective\n[GOAL]\ncase i_inj\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\n⊢ ∀ (a₁ a₂ : (n : ℕ) × (Fin n → ℕ)) (ha₁ : a₁ ∈ compPartialSumSource m M N) (ha₂ : a₂ ∈ compPartialSumSource m M N),\n    compChangeOfVariables m M N a₁ ha₁ = compChangeOfVariables m M N a₂ ha₂ → a₁ = a₂\n[PROOFSTEP]\nrintro ⟨k, blocks_fun⟩ ⟨k', blocks_fun'⟩ H H' heq\n[GOAL]\ncase i_inj.mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nk' : ℕ\nblocks_fun' : Fin k' → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nH' : { fst := k', snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k', snd := blocks_fun' } H'\n⊢ { fst := k, snd := blocks_fun } = { fst := k', snd := blocks_fun' }\n[PROOFSTEP]\nobtain rfl : k = k' := by\n  have := (compChangeOfVariables_length m M N H).symm\n  rwa [heq, compChangeOfVariables_length] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nk' : ℕ\nblocks_fun' : Fin k' → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nH' : { fst := k', snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k', snd := blocks_fun' } H'\n⊢ k = k'\n[PROOFSTEP]\nhave := (compChangeOfVariables_length m M N H).symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nk' : ℕ\nblocks_fun' : Fin k' → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nH' : { fst := k', snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k', snd := blocks_fun' } H'\nthis :\n  { fst := k, snd := blocks_fun }.fst =\n    Composition.length (compChangeOfVariables m M N { fst := k, snd := blocks_fun } H).snd\n⊢ k = k'\n[PROOFSTEP]\nrwa [heq, compChangeOfVariables_length] at this \n[GOAL]\ncase i_inj.mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nblocks_fun' : Fin k → ℕ\nH' : { fst := k, snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H'\n⊢ { fst := k, snd := blocks_fun } = { fst := k, snd := blocks_fun' }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase i_inj.mk.mk.e_snd\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nblocks_fun' : Fin k → ℕ\nH' : { fst := k, snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H'\n⊢ blocks_fun = blocks_fun'\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase i_inj.mk.mk.e_snd.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nblocks_fun' : Fin k → ℕ\nH' : { fst := k, snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H'\ni : Fin k\n⊢ blocks_fun i = blocks_fun' i\n[PROOFSTEP]\ncalc\n  blocks_fun i = (compChangeOfVariables m M N _ H).2.blocksFun _ := (compChangeOfVariables_blocksFun m M N H i).symm\n  _ = (compChangeOfVariables m M N _ H').2.blocksFun _ := by\n    apply Composition.blocksFun_congr <;>\n      first\n      | rw [heq]\n      | rfl\n  _ = blocks_fun' i := compChangeOfVariables_blocksFun m M N H' i\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nblocks_fun' : Fin k → ℕ\nH' : { fst := k, snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H'\ni : Fin k\n⊢ Composition.blocksFun (compChangeOfVariables m M N { fst := k, snd := blocks_fun } H).snd\n      { val := ↑i,\n        isLt := (_ : ↑i < Composition.length (compChangeOfVariables m M N { fst := k, snd := blocks_fun } H).snd) } =\n    Composition.blocksFun (compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H').snd\n      { val := ↑i,\n        isLt := (_ : ↑i < Composition.length (compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H').snd) }\n[PROOFSTEP]\napply Composition.blocksFun_congr\n[GOAL]\ncase hn\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nblocks_fun' : Fin k → ℕ\nH' : { fst := k, snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H'\ni : Fin k\n⊢ (compChangeOfVariables m M N { fst := k, snd := blocks_fun } H).fst =\n    (compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H').fst\n[PROOFSTEP]\nfirst\n| rw [heq]\n| rfl\n[GOAL]\ncase hn\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nblocks_fun' : Fin k → ℕ\nH' : { fst := k, snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H'\ni : Fin k\n⊢ (compChangeOfVariables m M N { fst := k, snd := blocks_fun } H).fst =\n    (compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H').fst\n[PROOFSTEP]\nrw [heq]\n[GOAL]\ncase hc\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nblocks_fun' : Fin k → ℕ\nH' : { fst := k, snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H'\ni : Fin k\n⊢ (compChangeOfVariables m M N { fst := k, snd := blocks_fun } H).snd.blocks =\n    (compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H').snd.blocks\n[PROOFSTEP]\nfirst\n| rw [heq]\n| rfl\n[GOAL]\ncase hc\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nblocks_fun' : Fin k → ℕ\nH' : { fst := k, snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H'\ni : Fin k\n⊢ (compChangeOfVariables m M N { fst := k, snd := blocks_fun } H).snd.blocks =\n    (compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H').snd.blocks\n[PROOFSTEP]\nrw [heq]\n[GOAL]\ncase hi\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nblocks_fun' : Fin k → ℕ\nH' : { fst := k, snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H'\ni : Fin k\n⊢ ↑{ val := ↑i,\n        isLt := (_ : ↑i < Composition.length (compChangeOfVariables m M N { fst := k, snd := blocks_fun } H).snd) } =\n    ↑{ val := ↑i,\n        isLt := (_ : ↑i < Composition.length (compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H').snd) }\n[PROOFSTEP]\nfirst\n| rw [heq]\n| rfl\n[GOAL]\ncase hi\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nblocks_fun' : Fin k → ℕ\nH' : { fst := k, snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H'\ni : Fin k\n⊢ ↑{ val := ↑i,\n        isLt := (_ : ↑i < Composition.length (compChangeOfVariables m M N { fst := k, snd := blocks_fun } H).snd) } =\n    ↑{ val := ↑i,\n        isLt := (_ : ↑i < Composition.length (compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H').snd) }\n[PROOFSTEP]\nrw [heq]\n[GOAL]\ncase hi\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H✝\ninst✝¹ : NormedSpace 𝕜 H✝\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource m M N\nblocks_fun' : Fin k → ℕ\nH' : { fst := k, snd := blocks_fun' } ∈ compPartialSumSource m M N\nheq :\n  compChangeOfVariables m M N { fst := k, snd := blocks_fun } H =\n    compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H'\ni : Fin k\n⊢ ↑{ val := ↑i,\n        isLt := (_ : ↑i < Composition.length (compChangeOfVariables m M N { fst := k, snd := blocks_fun } H).snd) } =\n    ↑{ val := ↑i,\n        isLt := (_ : ↑i < Composition.length (compChangeOfVariables m M N { fst := k, snd := blocks_fun' } H').snd) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase i_surj\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\n⊢ ∀ (b : (n : ℕ) × Composition n), b ∈ compPartialSumTarget m M N → ∃ a ha, b = compChangeOfVariables m M N a ha\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase i_surj\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\ni : (n : ℕ) × Composition n\nhi : i ∈ compPartialSumTarget m M N\n⊢ ∃ a ha, i = compChangeOfVariables m M N a ha\n[PROOFSTEP]\napply compPartialSumTargetSet_image_compPartialSumSource m M N i\n[GOAL]\ncase i_surj\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\nα : Type u_6\ninst✝ : AddCommMonoid α\nm M N : ℕ\nf : (n : ℕ) × (Fin n → ℕ) → α\ng : (n : ℕ) × Composition n → α\nh : ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource m M N), f e = g (compChangeOfVariables m M N e he)\ni : (n : ℕ) × Composition n\nhi : i ∈ compPartialSumTarget m M N\n⊢ i ∈ compPartialSumTargetSet m M N\n[PROOFSTEP]\nsimpa [compPartialSumTarget] using hi\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\n⊢ Tendsto (fun N => compPartialSumTarget 0 N N) atTop atTop\n[PROOFSTEP]\napply Monotone.tendsto_atTop_finset\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\n⊢ Monotone fun N => compPartialSumTarget 0 N N\n[PROOFSTEP]\nintro m n hmn a ha\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm n : ℕ\nhmn : m ≤ n\na : (n : ℕ) × Composition n\nha : a ∈ (fun N => compPartialSumTarget 0 N N) m\n⊢ a ∈ (fun N => compPartialSumTarget 0 N N) n\n[PROOFSTEP]\nhave : ∀ i, i < m → i < n := fun i hi => lt_of_lt_of_le hi hmn\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nm n : ℕ\nhmn : m ≤ n\na : (n : ℕ) × Composition n\nha : a ∈ (fun N => compPartialSumTarget 0 N N) m\nthis : ∀ (i : ℕ), i < m → i < n\n⊢ a ∈ (fun N => compPartialSumTarget 0 N N) n\n[PROOFSTEP]\naesop\n[GOAL]\ncase h'\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\n⊢ ∀ (x : (n : ℕ) × Composition n), ∃ n, x ∈ compPartialSumTarget 0 n n\n[PROOFSTEP]\nrintro ⟨n, c⟩\n[GOAL]\ncase h'.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\nc : Composition n\n⊢ ∃ n_1, { fst := n, snd := c } ∈ compPartialSumTarget 0 n_1 n_1\n[PROOFSTEP]\nsimp only [mem_compPartialSumTarget_iff]\n[GOAL]\ncase h'.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\nc : Composition n\n⊢ ∃ n_1,\n    0 ≤ Composition.length c ∧\n      Composition.length c < n_1 ∧\n        ∀ (j : Fin (Composition.length { fst := n, snd := c }.snd)), Composition.blocksFun c j < n_1\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : BddAbove ((Finset.univ.image fun i : Fin c.length => c.blocksFun i) : Set ℕ) := Finset.bddAbove _\n[GOAL]\ncase h'.mk.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ : ℕ\nc : Composition n✝\nn : ℕ\nhn : n ∈ upperBounds ↑(Finset.image (fun i => Composition.blocksFun c i) Finset.univ)\n⊢ ∃ n,\n    0 ≤ Composition.length c ∧\n      Composition.length c < n ∧\n        ∀ (j : Fin (Composition.length { fst := n✝, snd := c }.snd)), Composition.blocksFun c j < n\n[PROOFSTEP]\nrefine'\n  ⟨max n c.length + 1, bot_le, lt_of_le_of_lt (le_max_right n c.length) (lt_add_one _), fun j =>\n    lt_of_le_of_lt (le_trans _ (le_max_left _ _)) (lt_add_one _)⟩\n[GOAL]\ncase h'.mk.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ : ℕ\nc : Composition n✝\nn : ℕ\nhn : n ∈ upperBounds ↑(Finset.image (fun i => Composition.blocksFun c i) Finset.univ)\nj : Fin (Composition.length { fst := n✝, snd := c }.snd)\n⊢ Composition.blocksFun c j ≤ n\n[PROOFSTEP]\napply hn\n[GOAL]\ncase h'.mk.intro.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ : ℕ\nc : Composition n✝\nn : ℕ\nhn : n ∈ upperBounds ↑(Finset.image (fun i => Composition.blocksFun c i) Finset.univ)\nj : Fin (Composition.length { fst := n✝, snd := c }.snd)\n⊢ Composition.blocksFun c j ∈ ↑(Finset.image (fun i => Composition.blocksFun c i) Finset.univ)\n[PROOFSTEP]\nsimp only [Finset.mem_image_of_mem, Finset.mem_coe, Finset.mem_univ]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nN : ℕ\nz : E\n⊢ partialSum q N (∑ i in Finset.Ico 1 N, ↑(p i) fun _j => z) =\n    ∑ i in compPartialSumTarget 0 N N, ↑(compAlongComposition q p i.snd) fun _j => z\n[PROOFSTEP]\nsuffices H :\n  (∑ n in Finset.range N,\n      ∑ r in Fintype.piFinset fun i : Fin n => Finset.Ico 1 N, q n fun i : Fin n => p (r i) fun _j => z) =\n    ∑ i in compPartialSumTarget 0 N N, q.compAlongComposition p i.2 fun _j => z\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nN : ℕ\nz : E\nH :\n  (∑ n in Finset.range N, ∑ r in Fintype.piFinset fun i => Finset.Ico 1 N, ↑(q n) fun i => ↑(p (r i)) fun _j => z) =\n    ∑ i in compPartialSumTarget 0 N N, ↑(compAlongComposition q p i.snd) fun _j => z\n⊢ partialSum q N (∑ i in Finset.Ico 1 N, ↑(p i) fun _j => z) =\n    ∑ i in compPartialSumTarget 0 N N, ↑(compAlongComposition q p i.snd) fun _j => z\n[PROOFSTEP]\nsimpa only [FormalMultilinearSeries.partialSum, ContinuousMultilinearMap.map_sum_finset] using H\n[GOAL]\ncase H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nN : ℕ\nz : E\n⊢ (∑ n in Finset.range N, ∑ r in Fintype.piFinset fun i => Finset.Ico 1 N, ↑(q n) fun i => ↑(p (r i)) fun _j => z) =\n    ∑ i in compPartialSumTarget 0 N N, ↑(compAlongComposition q p i.snd) fun _j => z\n[PROOFSTEP]\nrw [Finset.range_eq_Ico, Finset.sum_sigma']\n  -- use `comp_change_of_variables_sum`, saying that this change of variables respects sums\n[GOAL]\ncase H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nN : ℕ\nz : E\n⊢ (∑ x in Finset.sigma (Finset.Ico 0 N) fun n => Fintype.piFinset fun i => Finset.Ico 1 N,\n      ↑(q x.fst) fun i => ↑(p (Sigma.snd x i)) fun _j => z) =\n    ∑ i in compPartialSumTarget 0 N N, ↑(compAlongComposition q p i.snd) fun _j => z\n[PROOFSTEP]\napply compChangeOfVariables_sum 0 N N\n[GOAL]\ncase H.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nN : ℕ\nz : E\n⊢ ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource 0 N N),\n    (↑(q e.fst) fun i => ↑(p (Sigma.snd e i)) fun _j => z) =\n      ↑(compAlongComposition q p (compChangeOfVariables 0 N N e he).snd) fun _j => z\n[PROOFSTEP]\nrintro ⟨k, blocks_fun⟩ H\n[GOAL]\ncase H.h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nN : ℕ\nz : E\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 0 N N\n⊢ (↑(q { fst := k, snd := blocks_fun }.fst) fun i => ↑(p (Sigma.snd { fst := k, snd := blocks_fun } i)) fun _j => z) =\n    ↑(compAlongComposition q p (compChangeOfVariables 0 N N { fst := k, snd := blocks_fun } H).snd) fun _j => z\n[PROOFSTEP]\napply congr _ (compChangeOfVariables_length 0 N N H).symm\n[GOAL]\ncase H.h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nN : ℕ\nz : E\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 0 N N\n⊢ ∀ (i : ℕ) (him : i < { fst := k, snd := blocks_fun }.fst)\n    (hin : i < Composition.length (compChangeOfVariables 0 N N { fst := k, snd := blocks_fun } H).snd),\n    (↑(p (Sigma.snd { fst := k, snd := blocks_fun } { val := i, isLt := him })) fun _j => z) =\n      applyComposition p (compChangeOfVariables 0 N N { fst := k, snd := blocks_fun } H).snd (fun _j => z)\n        { val := i, isLt := hin }\n[PROOFSTEP]\nintros\n[GOAL]\ncase H.h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nN : ℕ\nz : E\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 0 N N\ni✝ : ℕ\nhim✝ : i✝ < { fst := k, snd := blocks_fun }.fst\nhin✝ : i✝ < Composition.length (compChangeOfVariables 0 N N { fst := k, snd := blocks_fun } H).snd\n⊢ (↑(p (Sigma.snd { fst := k, snd := blocks_fun } { val := i✝, isLt := him✝ })) fun _j => z) =\n    applyComposition p (compChangeOfVariables 0 N N { fst := k, snd := blocks_fun } H).snd (fun _j => z)\n      { val := i✝, isLt := hin✝ }\n[PROOFSTEP]\nrw [← compChangeOfVariables_blocksFun 0 N N H]\n[GOAL]\ncase H.h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nN : ℕ\nz : E\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 0 N N\ni✝ : ℕ\nhim✝ : i✝ < { fst := k, snd := blocks_fun }.fst\nhin✝ : i✝ < Composition.length (compChangeOfVariables 0 N N { fst := k, snd := blocks_fun } H).snd\n⊢ (↑(p\n          (Composition.blocksFun (compChangeOfVariables 0 N N { fst := k, snd := blocks_fun } H).snd\n            { val := ↑{ val := i✝, isLt := him✝ },\n              isLt :=\n                (_ :\n                  ↑{ val := i✝, isLt := him✝ } <\n                    Composition.length (compChangeOfVariables 0 N N { fst := k, snd := blocks_fun } H).snd) }))\n      fun _j => z) =\n    applyComposition p (compChangeOfVariables 0 N N { fst := k, snd := blocks_fun } H).snd (fun _j => z)\n      { val := i✝, isLt := hin✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nhg : HasFPowerSeriesAt g q (f x)\nhf : HasFPowerSeriesAt f p x\n⊢ HasFPowerSeriesAt (g ∘ f) (FormalMultilinearSeries.comp q p) x\n[PROOFSTEP]\nrcases hg with ⟨rg, Hg⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nhf : HasFPowerSeriesAt f p x\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\n⊢ HasFPowerSeriesAt (g ∘ f) (FormalMultilinearSeries.comp q p) x\n[PROOFSTEP]\nrcases hf with\n  ⟨rf, Hf⟩\n    -- The terms defining `q.comp p` are geometrically summable in a disk of some radius `r`.\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\n⊢ HasFPowerSeriesAt (g ∘ f) (FormalMultilinearSeries.comp q p) x\n[PROOFSTEP]\nrcases q.comp_summable_nnreal p Hg.radius_pos Hf.radius_pos with\n  ⟨r, r_pos : 0 < r, hr⟩\n    /- We will consider `y` which is smaller than `r` and `rf`, and also small enough that\n        `f (x + y)` is close enough to `f x` to be in the disk where `g` is well behaved. Let\n        `min (r, rf, δ)` be this new radius.-/\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n⊢ HasFPowerSeriesAt (g ∘ f) (FormalMultilinearSeries.comp q p) x\n[PROOFSTEP]\nobtain ⟨δ, δpos, hδ⟩ : ∃ (δ : ℝ≥0∞) (_H : 0 < δ), ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg :=\n  by\n  have : EMetric.ball (f x) rg ∈ 𝓝 (f x) := EMetric.ball_mem_nhds _ Hg.r_pos\n  rcases EMetric.mem_nhds_iff.1 (Hf.analyticAt.continuousAt this) with ⟨δ, δpos, Hδ⟩\n  exact ⟨δ, δpos, fun hz => Hδ hz⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\n⊢ ∃ δ _H, ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\n[PROOFSTEP]\nhave : EMetric.ball (f x) rg ∈ 𝓝 (f x) := EMetric.ball_mem_nhds _ Hg.r_pos\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nthis : EMetric.ball (f x) rg ∈ 𝓝 (f x)\n⊢ ∃ δ _H, ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\n[PROOFSTEP]\nrcases EMetric.mem_nhds_iff.1 (Hf.analyticAt.continuousAt this) with ⟨δ, δpos, Hδ⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nthis : EMetric.ball (f x) rg ∈ 𝓝 (f x)\nδ : ℝ≥0∞\nδpos : δ > 0\nHδ : EMetric.ball x δ ⊆ f ⁻¹' EMetric.ball (f x) rg\n⊢ ∃ δ _H, ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\n[PROOFSTEP]\nexact ⟨δ, δpos, fun hz => Hδ hz⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\n⊢ HasFPowerSeriesAt (g ∘ f) (FormalMultilinearSeries.comp q p) x\n[PROOFSTEP]\nlet rf' := min rf δ\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\n⊢ HasFPowerSeriesAt (g ∘ f) (FormalMultilinearSeries.comp q p) x\n[PROOFSTEP]\nhave min_pos : 0 < min rf' r := by\n  simp only [r_pos, Hf.r_pos, δpos, lt_min_iff, ENNReal.coe_pos, and_self_iff]\n    /- We will show that `g ∘ f` admits the power series `q.comp p` in the disk of\n        radius `min (r, rf', δ)`. -/\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\n⊢ 0 < min rf' ↑r\n[PROOFSTEP]\nsimp only [r_pos, Hf.r_pos, δpos, lt_min_iff, ENNReal.coe_pos, and_self_iff]\n  /- We will show that `g ∘ f` admits the power series `q.comp p` in the disk of\n      radius `min (r, rf', δ)`. -/\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\n⊢ HasFPowerSeriesAt (g ∘ f) (FormalMultilinearSeries.comp q p) x\n[PROOFSTEP]\nrefine' ⟨min rf' r, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\n⊢ HasFPowerSeriesOnBall (g ∘ f) (FormalMultilinearSeries.comp q p) x (min rf' ↑r)\n[PROOFSTEP]\nrefine'\n  ⟨le_trans (min_le_right rf' r) (FormalMultilinearSeries.le_comp_radius_of_summable q p r hr), min_pos, @fun y hy => _⟩\n    /- Let `y` satisfy `‖y‖ < min (r, rf', δ)`. We want to show that `g (f (x + y))` is the sum of\n        `q.comp p` applied to `y`. -/\n      -- First, check that `y` is small enough so that estimates for `f` and `g` apply.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.comp q p n) fun x => y) ((g ∘ f) (x + y))\n[PROOFSTEP]\nhave y_mem : y ∈ EMetric.ball (0 : E) rf := (EMetric.ball_subset_ball (le_trans (min_le_left _ _) (min_le_left _ _))) hy\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.comp q p n) fun x => y) ((g ∘ f) (x + y))\n[PROOFSTEP]\nhave fy_mem : f (x + y) ∈ EMetric.ball (f x) rg := by\n  apply hδ\n  have : y ∈ EMetric.ball (0 : E) δ := (EMetric.ball_subset_ball (le_trans (min_le_left _ _) (min_le_right _ _))) hy\n  simpa [edist_eq_coe_nnnorm_sub, edist_eq_coe_nnnorm]\n    /- Now the proof starts. To show that the sum of `q.comp p` at `y` is `g (f (x + y))`,\n        we will write `q.comp p` applied to `y` as a big sum over all compositions.\n        Since the sum is summable, to get its convergence it suffices to get\n        the convergence along some increasing sequence of sets.\n        We will use the sequence of sets `comp_partial_sum_target 0 n n`,\n        along which the sum is exactly the composition of the partial sums of `q` and `p`, by design.\n        To show that it converges to `g (f (x + y))`, pointwise convergence would not be enough,\n        but we have uniform convergence to save the day. -/\n      -- First step: the partial sum of `p` converges to `f (x + y)`.\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\n⊢ f (x + y) ∈ EMetric.ball (f x) rg\n[PROOFSTEP]\napply hδ\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\n⊢ x + y ∈ EMetric.ball x δ\n[PROOFSTEP]\nhave : y ∈ EMetric.ball (0 : E) δ := (EMetric.ball_subset_ball (le_trans (min_le_left _ _) (min_le_right _ _))) hy\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nthis : y ∈ EMetric.ball 0 δ\n⊢ x + y ∈ EMetric.ball x δ\n[PROOFSTEP]\nsimpa [edist_eq_coe_nnnorm_sub, edist_eq_coe_nnnorm]\n  /- Now the proof starts. To show that the sum of `q.comp p` at `y` is `g (f (x + y))`,\n      we will write `q.comp p` applied to `y` as a big sum over all compositions.\n      Since the sum is summable, to get its convergence it suffices to get\n      the convergence along some increasing sequence of sets.\n      We will use the sequence of sets `comp_partial_sum_target 0 n n`,\n      along which the sum is exactly the composition of the partial sums of `q` and `p`, by design.\n      To show that it converges to `g (f (x + y))`, pointwise convergence would not be enough,\n      but we have uniform convergence to save the day. -/\n    -- First step: the partial sum of `p` converges to `f (x + y)`.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.comp q p n) fun x => y) ((g ∘ f) (x + y))\n[PROOFSTEP]\nhave A : Tendsto (fun n => ∑ a in Finset.Ico 1 n, p a fun _b => y) atTop (𝓝 (f (x + y) - f x)) :=\n  by\n  have L : ∀ᶠ n in atTop, (∑ a in Finset.range n, p a fun _b => y) - f x = ∑ a in Finset.Ico 1 n, p a fun _b => y :=\n    by\n    rw [eventually_atTop]\n    refine' ⟨1, fun n hn => _⟩\n    symm\n    rw [eq_sub_iff_add_eq', Finset.range_eq_Ico, ← Hf.coeff_zero fun _i => y, Finset.sum_eq_sum_Ico_succ_bot hn]\n  have : Tendsto (fun n => (∑ a in Finset.range n, p a fun _b => y) - f x) atTop (𝓝 (f (x + y) - f x)) :=\n    (Hf.hasSum y_mem).tendsto_sum_nat.sub tendsto_const_nhds\n  exact Tendsto.congr' L this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\n⊢ Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\n[PROOFSTEP]\nhave L : ∀ᶠ n in atTop, (∑ a in Finset.range n, p a fun _b => y) - f x = ∑ a in Finset.Ico 1 n, p a fun _b => y :=\n  by\n  rw [eventually_atTop]\n  refine' ⟨1, fun n hn => _⟩\n  symm\n  rw [eq_sub_iff_add_eq', Finset.range_eq_Ico, ← Hf.coeff_zero fun _i => y, Finset.sum_eq_sum_Ico_succ_bot hn]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\n⊢ ∀ᶠ (n : ℕ) in atTop, (∑ a in Finset.range n, ↑(p a) fun _b => y) - f x = ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y\n[PROOFSTEP]\nrw [eventually_atTop]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\n⊢ ∃ a, ∀ (b : ℕ), b ≥ a → (∑ a in Finset.range b, ↑(p a) fun _b => y) - f x = ∑ a in Finset.Ico 1 b, ↑(p a) fun _b => y\n[PROOFSTEP]\nrefine' ⟨1, fun n hn => _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nn : ℕ\nhn : n ≥ 1\n⊢ (∑ a in Finset.range n, ↑(p a) fun _b => y) - f x = ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y\n[PROOFSTEP]\nsymm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nn : ℕ\nhn : n ≥ 1\n⊢ (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) = (∑ a in Finset.range n, ↑(p a) fun _b => y) - f x\n[PROOFSTEP]\nrw [eq_sub_iff_add_eq', Finset.range_eq_Ico, ← Hf.coeff_zero fun _i => y, Finset.sum_eq_sum_Ico_succ_bot hn]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nL : ∀ᶠ (n : ℕ) in atTop, (∑ a in Finset.range n, ↑(p a) fun _b => y) - f x = ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y\n⊢ Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\n[PROOFSTEP]\nhave : Tendsto (fun n => (∑ a in Finset.range n, p a fun _b => y) - f x) atTop (𝓝 (f (x + y) - f x)) :=\n  (Hf.hasSum y_mem).tendsto_sum_nat.sub tendsto_const_nhds\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nL : ∀ᶠ (n : ℕ) in atTop, (∑ a in Finset.range n, ↑(p a) fun _b => y) - f x = ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y\nthis : Tendsto (fun n => (∑ a in Finset.range n, ↑(p a) fun _b => y) - f x) atTop (𝓝 (f (x + y) - f x))\n⊢ Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\n[PROOFSTEP]\nexact Tendsto.congr' L this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.comp q p n) fun x => y) ((g ∘ f) (x + y))\n[PROOFSTEP]\nhave B : Tendsto (fun n => q.partialSum n (∑ a in Finset.Ico 1 n, p a fun _b => y)) atTop (𝓝 (g (f (x + y)))) := by\n  -- we use the fact that the partial sums of `q` converge locally uniformly to `g`, and that\n      -- composition passes to the limit under locally uniform convergence.\n  have B₁ : ContinuousAt (fun z : F => g (f x + z)) (f (x + y) - f x) :=\n    by\n    refine' ContinuousAt.comp _ (continuous_const.add continuous_id).continuousAt\n    simp only [add_sub_cancel'_right, id.def]\n    exact Hg.continuousOn.continuousAt (IsOpen.mem_nhds EMetric.isOpen_ball fy_mem)\n  have B₂ : f (x + y) - f x ∈ EMetric.ball (0 : F) rg := by\n    simpa [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub] using fy_mem\n  rw [← EMetric.isOpen_ball.nhdsWithin_eq B₂] at A \n  convert Hg.tendstoLocallyUniformlyOn.tendsto_comp B₁.continuousWithinAt B₂ A\n  simp only [add_sub_cancel'_right]\n    -- Third step: the sum over all compositions in `comp_partial_sum_target 0 n n` converges to\n      -- `g (f (x + y))`. As this sum is exactly the composition of the partial sum, this is a direct\n      -- consequence of the second step\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\n⊢ Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\n[PROOFSTEP]\nhave B₁ : ContinuousAt (fun z : F => g (f x + z)) (f (x + y) - f x) :=\n  by\n  refine' ContinuousAt.comp _ (continuous_const.add continuous_id).continuousAt\n  simp only [add_sub_cancel'_right, id.def]\n  exact Hg.continuousOn.continuousAt (IsOpen.mem_nhds EMetric.isOpen_ball fy_mem)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\n⊢ ContinuousAt (fun z => g (f x + z)) (f (x + y) - f x)\n[PROOFSTEP]\nrefine' ContinuousAt.comp _ (continuous_const.add continuous_id).continuousAt\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\n⊢ ContinuousAt g (f x + (f (x + y) - f x))\n[PROOFSTEP]\nsimp only [add_sub_cancel'_right, id.def]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\n⊢ ContinuousAt g (f (x + y))\n[PROOFSTEP]\nexact Hg.continuousOn.continuousAt (IsOpen.mem_nhds EMetric.isOpen_ball fy_mem)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB₁ : ContinuousAt (fun z => g (f x + z)) (f (x + y) - f x)\n⊢ Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\n[PROOFSTEP]\nhave B₂ : f (x + y) - f x ∈ EMetric.ball (0 : F) rg := by\n  simpa [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub] using fy_mem\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB₁ : ContinuousAt (fun z => g (f x + z)) (f (x + y) - f x)\n⊢ f (x + y) - f x ∈ EMetric.ball 0 rg\n[PROOFSTEP]\nsimpa [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub] using fy_mem\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB₁ : ContinuousAt (fun z => g (f x + z)) (f (x + y) - f x)\nB₂ : f (x + y) - f x ∈ EMetric.ball 0 rg\n⊢ Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\n[PROOFSTEP]\nrw [← EMetric.isOpen_ball.nhdsWithin_eq B₂] at A \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝[EMetric.ball 0 rg] (f (x + y) - f x))\nB₁ : ContinuousAt (fun z => g (f x + z)) (f (x + y) - f x)\nB₂ : f (x + y) - f x ∈ EMetric.ball 0 rg\n⊢ Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\n[PROOFSTEP]\nconvert Hg.tendstoLocallyUniformlyOn.tendsto_comp B₁.continuousWithinAt B₂ A\n[GOAL]\ncase h.e'_5.h.e'_3.h.e'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝[EMetric.ball 0 rg] (f (x + y) - f x))\nB₁ : ContinuousAt (fun z => g (f x + z)) (f (x + y) - f x)\nB₂ : f (x + y) - f x ∈ EMetric.ball 0 rg\n⊢ f (x + y) = f x + (f (x + y) - f x)\n[PROOFSTEP]\nsimp only [add_sub_cancel'_right]\n  -- Third step: the sum over all compositions in `comp_partial_sum_target 0 n n` converges to\n    -- `g (f (x + y))`. As this sum is exactly the composition of the partial sum, this is a direct\n    -- consequence of the second step\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.comp q p n) fun x => y) ((g ∘ f) (x + y))\n[PROOFSTEP]\nhave C :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, q.compAlongComposition p i.2 fun _j => y) atTop\n    (𝓝 (g (f (x + y)))) :=\n  by simpa [comp_partialSum] using B\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\n⊢ Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\n[PROOFSTEP]\nsimpa [comp_partialSum] using B\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.comp q p n) fun x => y) ((g ∘ f) (x + y))\n[PROOFSTEP]\nhave D : HasSum (fun i : Σ n, Composition n => q.compAlongComposition p i.2 fun _j => y) (g (f (x + y))) :=\n  haveI cau : CauchySeq fun s : Finset (Σ n, Composition n) => ∑ i in s, q.compAlongComposition p i.2 fun _j => y :=\n    by\n    apply cauchySeq_finset_of_norm_bounded _ (NNReal.summable_coe.2 hr) _\n    simp only [coe_nnnorm, NNReal.coe_mul, NNReal.coe_pow]\n    rintro ⟨n, c⟩\n    calc\n      ‖(compAlongComposition q p c) fun _j : Fin n => y‖ ≤ ‖compAlongComposition q p c‖ * ∏ _j : Fin n, ‖y‖ := by\n        apply ContinuousMultilinearMap.le_op_norm\n      _ ≤ ‖compAlongComposition q p c‖ * (r : ℝ) ^ n :=\n        by\n        apply mul_le_mul_of_nonneg_left _ (norm_nonneg _)\n        rw [Finset.prod_const, Finset.card_fin]\n        apply pow_le_pow_of_le_left (norm_nonneg _)\n        rw [EMetric.mem_ball, edist_eq_coe_nnnorm] at hy \n        have := le_trans (le_of_lt hy) (min_le_right _ _)\n        rwa [ENNReal.coe_le_coe, ← NNReal.coe_le_coe, coe_nnnorm] at this \n  tendsto_nhds_of_cauchySeq_of_subseq cau compPartialSumTarget_tendsto_atTop C\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\n⊢ CauchySeq fun s => ∑ i in s, ↑(compAlongComposition q p i.snd) fun _j => y\n[PROOFSTEP]\napply cauchySeq_finset_of_norm_bounded _ (NNReal.summable_coe.2 hr) _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\n⊢ ∀ (i : (n : ℕ) × Composition n),\n    ‖↑(compAlongComposition q p i.snd) fun _j => y‖ ≤ ↑(‖compAlongComposition q p i.snd‖₊ * r ^ i.fst)\n[PROOFSTEP]\nsimp only [coe_nnnorm, NNReal.coe_mul, NNReal.coe_pow]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\n⊢ ∀ (i : (n : ℕ) × Composition n),\n    ‖↑(compAlongComposition q p i.snd) fun _j => y‖ ≤ ‖compAlongComposition q p i.snd‖ * ↑r ^ i.fst\n[PROOFSTEP]\nrintro ⟨n, c⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nn : ℕ\nc : Composition n\n⊢ ‖↑(compAlongComposition q p { fst := n, snd := c }.snd) fun _j => y‖ ≤\n    ‖compAlongComposition q p { fst := n, snd := c }.snd‖ * ↑r ^ { fst := n, snd := c }.fst\n[PROOFSTEP]\ncalc\n  ‖(compAlongComposition q p c) fun _j : Fin n => y‖ ≤ ‖compAlongComposition q p c‖ * ∏ _j : Fin n, ‖y‖ := by\n    apply ContinuousMultilinearMap.le_op_norm\n  _ ≤ ‖compAlongComposition q p c‖ * (r : ℝ) ^ n :=\n    by\n    apply mul_le_mul_of_nonneg_left _ (norm_nonneg _)\n    rw [Finset.prod_const, Finset.card_fin]\n    apply pow_le_pow_of_le_left (norm_nonneg _)\n    rw [EMetric.mem_ball, edist_eq_coe_nnnorm] at hy \n    have := le_trans (le_of_lt hy) (min_le_right _ _)\n    rwa [ENNReal.coe_le_coe, ← NNReal.coe_le_coe, coe_nnnorm] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nn : ℕ\nc : Composition n\n⊢ ‖↑(compAlongComposition q p c) fun _j => y‖ ≤ ‖compAlongComposition q p c‖ * ∏ _j : Fin n, ‖y‖\n[PROOFSTEP]\napply ContinuousMultilinearMap.le_op_norm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nn : ℕ\nc : Composition n\n⊢ ‖compAlongComposition q p c‖ * ∏ _j : Fin n, ‖y‖ ≤ ‖compAlongComposition q p c‖ * ↑r ^ n\n[PROOFSTEP]\napply mul_le_mul_of_nonneg_left _ (norm_nonneg _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nn : ℕ\nc : Composition n\n⊢ ∏ _j : Fin n, ‖y‖ ≤ ↑r ^ n\n[PROOFSTEP]\nrw [Finset.prod_const, Finset.card_fin]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nn : ℕ\nc : Composition n\n⊢ ‖y‖ ^ n ≤ ↑r ^ n\n[PROOFSTEP]\napply pow_le_pow_of_le_left (norm_nonneg _)\n[GOAL]\ncase hab\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nn : ℕ\nc : Composition n\n⊢ ‖y‖ ≤ ↑r\n[PROOFSTEP]\nrw [EMetric.mem_ball, edist_eq_coe_nnnorm] at hy \n[GOAL]\ncase hab\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : ↑‖y‖₊ < min rf' ↑r\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nn : ℕ\nc : Composition n\n⊢ ‖y‖ ≤ ↑r\n[PROOFSTEP]\nhave := le_trans (le_of_lt hy) (min_le_right _ _)\n[GOAL]\ncase hab\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : ↑‖y‖₊ < min rf' ↑r\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nn : ℕ\nc : Composition n\nthis : ↑‖y‖₊ ≤ ↑r\n⊢ ‖y‖ ≤ ↑r\n[PROOFSTEP]\nrwa [ENNReal.coe_le_coe, ← NNReal.coe_le_coe, coe_nnnorm] at this \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nD : HasSum (fun i => ↑(compAlongComposition q p i.snd) fun _j => y) (g (f (x + y)))\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.comp q p n) fun x => y) ((g ∘ f) (x + y))\n[PROOFSTEP]\nhave E : HasSum (fun n => (q.comp p) n fun _j => y) (g (f (x + y))) :=\n  by\n  apply D.sigma\n  intro n\n  dsimp [FormalMultilinearSeries.comp]\n  convert hasSum_fintype (α := G) (β := Composition n) _\n  simp only [ContinuousMultilinearMap.sum_apply]\n  rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nD : HasSum (fun i => ↑(compAlongComposition q p i.snd) fun _j => y) (g (f (x + y)))\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.comp q p n) fun _j => y) (g (f (x + y)))\n[PROOFSTEP]\napply D.sigma\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nD : HasSum (fun i => ↑(compAlongComposition q p i.snd) fun _j => y) (g (f (x + y)))\n⊢ ∀ (b : ℕ),\n    HasSum (fun c => ↑(compAlongComposition q p { fst := b, snd := c }.snd) fun _j => y)\n      (↑(FormalMultilinearSeries.comp q p b) fun _j => y)\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nD : HasSum (fun i => ↑(compAlongComposition q p i.snd) fun _j => y) (g (f (x + y)))\nn : ℕ\n⊢ HasSum (fun c => ↑(compAlongComposition q p { fst := n, snd := c }.snd) fun _j => y)\n    (↑(FormalMultilinearSeries.comp q p n) fun _j => y)\n[PROOFSTEP]\ndsimp [FormalMultilinearSeries.comp]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nD : HasSum (fun i => ↑(compAlongComposition q p i.snd) fun _j => y) (g (f (x + y)))\nn : ℕ\n⊢ HasSum (fun c => ↑(q (Composition.length c)) (applyComposition p c fun _j => y))\n    (↑(∑ c : Composition n, compAlongComposition q p c) fun _j => y)\n[PROOFSTEP]\nconvert hasSum_fintype (α := G) (β := Composition n) _\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nD : HasSum (fun i => ↑(compAlongComposition q p i.snd) fun _j => y) (g (f (x + y)))\nn : ℕ\n⊢ (↑(∑ c : Composition n, compAlongComposition q p c) fun _j => y) =\n    ∑ b : Composition n, ↑(q (Composition.length b)) (applyComposition p b fun _j => y)\n[PROOFSTEP]\nsimp only [ContinuousMultilinearMap.sum_apply]\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nD : HasSum (fun i => ↑(compAlongComposition q p i.snd) fun _j => y) (g (f (x + y)))\nn : ℕ\n⊢ (∑ x : Composition n, ↑(compAlongComposition q p x) fun _j => y) =\n    ∑ b : Composition n, ↑(q (Composition.length b)) (applyComposition p b fun _j => y)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E✝\ninst✝⁶ : NormedSpace 𝕜 E✝\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E✝ → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E✝ F\nx : E✝\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E✝}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E✝\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nD : HasSum (fun i => ↑(compAlongComposition q p i.snd) fun _j => y) (g (f (x + y)))\nE : HasSum (fun n => ↑(FormalMultilinearSeries.comp q p n) fun _j => y) (g (f (x + y)))\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.comp q p n) fun x => y) ((g ∘ f) (x + y))\n[PROOFSTEP]\nrw [Function.comp_apply]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E✝\ninst✝⁶ : NormedSpace 𝕜 E✝\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\ng : F → G\nf : E✝ → F\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E✝ F\nx : E✝\nrg : ℝ≥0∞\nHg : HasFPowerSeriesOnBall g q (f x) rg\nrf : ℝ≥0∞\nHf : HasFPowerSeriesOnBall f p x rf\nr : ℝ≥0\nr_pos : 0 < r\nhr : Summable fun i => ‖compAlongComposition q p i.snd‖₊ * r ^ i.fst\nδ : ℝ≥0∞\nδpos : 0 < δ\nhδ : ∀ {z : E✝}, z ∈ EMetric.ball x δ → f z ∈ EMetric.ball (f x) rg\nrf' : ℝ≥0∞ := min rf δ\nmin_pos : 0 < min rf' ↑r\ny : E✝\nhy : y ∈ EMetric.ball 0 (min rf' ↑r)\ny_mem : y ∈ EMetric.ball 0 rf\nfy_mem : f (x + y) ∈ EMetric.ball (f x) rg\nA : Tendsto (fun n => ∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y) atTop (𝓝 (f (x + y) - f x))\nB : Tendsto (fun n => partialSum q n (∑ a in Finset.Ico 1 n, ↑(p a) fun _b => y)) atTop (𝓝 (g (f (x + y))))\nC :\n  Tendsto (fun n => ∑ i in compPartialSumTarget 0 n n, ↑(compAlongComposition q p i.snd) fun _j => y) atTop\n    (𝓝 (g (f (x + y))))\nD : HasSum (fun i => ↑(compAlongComposition q p i.snd) fun _j => y) (g (f (x + y)))\nE : HasSum (fun n => ↑(FormalMultilinearSeries.comp q p n) fun _j => y) (g (f (x + y)))\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.comp q p n) fun x => y) (g (f (x + y)))\n[PROOFSTEP]\nexact E\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\ni j : (a : Composition n) × Composition (length a)\n⊢ i = j ↔ i.fst.blocks = j.fst.blocks ∧ i.snd.blocks = j.snd.blocks\n[PROOFSTEP]\nrefine' ⟨by rintro rfl; exact ⟨rfl, rfl⟩, _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\ni j : (a : Composition n) × Composition (length a)\n⊢ i = j → i.fst.blocks = j.fst.blocks ∧ i.snd.blocks = j.snd.blocks\n[PROOFSTEP]\nrintro rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\ni : (a : Composition n) × Composition (length a)\n⊢ i.fst.blocks = i.fst.blocks ∧ i.snd.blocks = i.snd.blocks\n[PROOFSTEP]\nexact ⟨rfl, rfl⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\ni j : (a : Composition n) × Composition (length a)\n⊢ i.fst.blocks = j.fst.blocks ∧ i.snd.blocks = j.snd.blocks → i = j\n[PROOFSTEP]\nrcases i with ⟨a, b⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\nj : (a : Composition n) × Composition (length a)\na : Composition n\nb : Composition (length a)\n⊢ { fst := a, snd := b }.fst.blocks = j.fst.blocks ∧ { fst := a, snd := b }.snd.blocks = j.snd.blocks →\n    { fst := a, snd := b } = j\n[PROOFSTEP]\nrcases j with ⟨a', b'⟩\n[GOAL]\ncase mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\na' : Composition n\nb' : Composition (length a')\n⊢ { fst := a, snd := b }.fst.blocks = { fst := a', snd := b' }.fst.blocks ∧\n      { fst := a, snd := b }.snd.blocks = { fst := a', snd := b' }.snd.blocks →\n    { fst := a, snd := b } = { fst := a', snd := b' }\n[PROOFSTEP]\nrintro ⟨h, h'⟩\n[GOAL]\ncase mk.mk.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\na' : Composition n\nb' : Composition (length a')\nh : { fst := a, snd := b }.fst.blocks = { fst := a', snd := b' }.fst.blocks\nh' : { fst := a, snd := b }.snd.blocks = { fst := a', snd := b' }.snd.blocks\n⊢ { fst := a, snd := b } = { fst := a', snd := b' }\n[PROOFSTEP]\nhave H : a = a' := by ext1; exact h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\na' : Composition n\nb' : Composition (length a')\nh : { fst := a, snd := b }.fst.blocks = { fst := a', snd := b' }.fst.blocks\nh' : { fst := a, snd := b }.snd.blocks = { fst := a', snd := b' }.snd.blocks\n⊢ a = a'\n[PROOFSTEP]\next1\n[GOAL]\ncase blocks\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\na' : Composition n\nb' : Composition (length a')\nh : { fst := a, snd := b }.fst.blocks = { fst := a', snd := b' }.fst.blocks\nh' : { fst := a, snd := b }.snd.blocks = { fst := a', snd := b' }.snd.blocks\n⊢ a.blocks = a'.blocks\n[PROOFSTEP]\nexact h\n[GOAL]\ncase mk.mk.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : Composition (length a)\na' : Composition n\nb' : Composition (length a')\nh : { fst := a, snd := b }.fst.blocks = { fst := a', snd := b' }.fst.blocks\nh' : { fst := a, snd := b }.snd.blocks = { fst := a', snd := b' }.snd.blocks\nH : a = a'\n⊢ { fst := a, snd := b } = { fst := a', snd := b' }\n[PROOFSTEP]\ninduction H\n[GOAL]\ncase mk.mk.intro.refl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\na' : Composition n\nb' : Composition (length a)\nh : { fst := a, snd := b }.fst.blocks = { fst := a, snd := b' }.fst.blocks\nh' : { fst := a, snd := b }.snd.blocks = { fst := a, snd := b' }.snd.blocks\n⊢ { fst := a, snd := b } = { fst := a, snd := b' }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.intro.refl.e_snd\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\na' : Composition n\nb' : Composition (length a)\nh : { fst := a, snd := b }.fst.blocks = { fst := a, snd := b' }.fst.blocks\nh' : { fst := a, snd := b }.snd.blocks = { fst := a, snd := b' }.snd.blocks\n⊢ b = b'\n[PROOFSTEP]\next1\n[GOAL]\ncase mk.mk.intro.refl.e_snd.blocks\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\na' : Composition n\nb' : Composition (length a)\nh : { fst := a, snd := b }.fst.blocks = { fst := a, snd := b' }.fst.blocks\nh' : { fst := a, snd := b }.snd.blocks = { fst := a, snd := b' }.snd.blocks\n⊢ b.blocks = b'.blocks\n[PROOFSTEP]\nexact h'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\nu v : (c : Composition n) × ((i : Fin (length c)) → Composition (blocksFun c i))\n⊢ u = v ↔ (ofFn fun i => (Sigma.snd u i).blocks) = ofFn fun i => (Sigma.snd v i).blocks\n[PROOFSTEP]\nrefine' ⟨fun H => by rw [H], fun H => _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\nu v : (c : Composition n) × ((i : Fin (length c)) → Composition (blocksFun c i))\nH : u = v\n⊢ (ofFn fun i => (Sigma.snd u i).blocks) = ofFn fun i => (Sigma.snd v i).blocks\n[PROOFSTEP]\nrw [H]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\nu v : (c : Composition n) × ((i : Fin (length c)) → Composition (blocksFun c i))\nH : (ofFn fun i => (Sigma.snd u i).blocks) = ofFn fun i => (Sigma.snd v i).blocks\n⊢ u = v\n[PROOFSTEP]\nrcases u with ⟨a, b⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\nv : (c : Composition n) × ((i : Fin (length c)) → Composition (blocksFun c i))\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\nH : (ofFn fun i => (Sigma.snd { fst := a, snd := b } i).blocks) = ofFn fun i => (Sigma.snd v i).blocks\n⊢ { fst := a, snd := b } = v\n[PROOFSTEP]\nrcases v with ⟨a', b'⟩\n[GOAL]\ncase mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a')) → Composition (blocksFun a' i)\nH :\n  (ofFn fun i => (Sigma.snd { fst := a, snd := b } i).blocks) =\n    ofFn fun i => (Sigma.snd { fst := a', snd := b' } i).blocks\n⊢ { fst := a, snd := b } = { fst := a', snd := b' }\n[PROOFSTEP]\ndsimp at H \n[GOAL]\ncase mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a')) → Composition (blocksFun a' i)\nH : (ofFn fun i => (b i).blocks) = ofFn fun i => (b' i).blocks\n⊢ { fst := a, snd := b } = { fst := a', snd := b' }\n[PROOFSTEP]\nhave h : a = a' := by\n  ext1\n  have :\n    map List.sum (ofFn fun i : Fin (Composition.length a) => (b i).blocks) =\n      map List.sum (ofFn fun i : Fin (Composition.length a') => (b' i).blocks) :=\n    by rw [H]\n  simp only [map_ofFn] at this \n  change\n    (ofFn fun i : Fin (Composition.length a) => (b i).blocks.sum) =\n      ofFn fun i : Fin (Composition.length a') => (b' i).blocks.sum at\n    this \n  simpa [Composition.blocks_sum, Composition.ofFn_blocksFun] using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a')) → Composition (blocksFun a' i)\nH : (ofFn fun i => (b i).blocks) = ofFn fun i => (b' i).blocks\n⊢ a = a'\n[PROOFSTEP]\next1\n[GOAL]\ncase blocks\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a')) → Composition (blocksFun a' i)\nH : (ofFn fun i => (b i).blocks) = ofFn fun i => (b' i).blocks\n⊢ a.blocks = a'.blocks\n[PROOFSTEP]\nhave :\n  map List.sum (ofFn fun i : Fin (Composition.length a) => (b i).blocks) =\n    map List.sum (ofFn fun i : Fin (Composition.length a') => (b' i).blocks) :=\n  by rw [H]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a')) → Composition (blocksFun a' i)\nH : (ofFn fun i => (b i).blocks) = ofFn fun i => (b' i).blocks\n⊢ List.map sum (ofFn fun i => (b i).blocks) = List.map sum (ofFn fun i => (b' i).blocks)\n[PROOFSTEP]\nrw [H]\n[GOAL]\ncase blocks\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a')) → Composition (blocksFun a' i)\nH : (ofFn fun i => (b i).blocks) = ofFn fun i => (b' i).blocks\nthis : List.map sum (ofFn fun i => (b i).blocks) = List.map sum (ofFn fun i => (b' i).blocks)\n⊢ a.blocks = a'.blocks\n[PROOFSTEP]\nsimp only [map_ofFn] at this \n[GOAL]\ncase blocks\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a')) → Composition (blocksFun a' i)\nH : (ofFn fun i => (b i).blocks) = ofFn fun i => (b' i).blocks\nthis : ofFn (sum ∘ fun i => (b i).blocks) = ofFn (sum ∘ fun i => (b' i).blocks)\n⊢ a.blocks = a'.blocks\n[PROOFSTEP]\nchange\n  (ofFn fun i : Fin (Composition.length a) => (b i).blocks.sum) =\n    ofFn fun i : Fin (Composition.length a') => (b' i).blocks.sum at\n  this \n[GOAL]\ncase blocks\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a')) → Composition (blocksFun a' i)\nH : (ofFn fun i => (b i).blocks) = ofFn fun i => (b' i).blocks\nthis : (ofFn fun i => sum (b i).blocks) = ofFn fun i => sum (b' i).blocks\n⊢ a.blocks = a'.blocks\n[PROOFSTEP]\nsimpa [Composition.blocks_sum, Composition.ofFn_blocksFun] using this\n[GOAL]\ncase mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a')) → Composition (blocksFun a' i)\nH : (ofFn fun i => (b i).blocks) = ofFn fun i => (b' i).blocks\nh : a = a'\n⊢ { fst := a, snd := b } = { fst := a', snd := b' }\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase mk.mk.refl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a)) → Composition (blocksFun a i)\nH : (ofFn fun i => (b i).blocks) = ofFn fun i => (b' i).blocks\n⊢ { fst := a, snd := b } = { fst := a, snd := b' }\n[PROOFSTEP]\next1\n[GOAL]\ncase mk.mk.refl.h₀\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a)) → Composition (blocksFun a i)\nH : (ofFn fun i => (b i).blocks) = ofFn fun i => (b' i).blocks\n⊢ { fst := a, snd := b }.fst = { fst := a, snd := b' }.fst\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.mk.refl.h₁\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a)) → Composition (blocksFun a i)\nH : (ofFn fun i => (b i).blocks) = ofFn fun i => (b' i).blocks\n⊢ HEq { fst := a, snd := b }.snd { fst := a, snd := b' }.snd\n[PROOFSTEP]\nsimp only [heq_eq_eq, ofFn_inj] at H ⊢\n[GOAL]\ncase mk.mk.refl.h₁\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a)) → Composition (blocksFun a i)\nH : (fun i => (b i).blocks) = fun i => (b' i).blocks\n⊢ b = b'\n[PROOFSTEP]\next1 i\n[GOAL]\ncase mk.mk.refl.h₁.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a)) → Composition (blocksFun a i)\nH : (fun i => (b i).blocks) = fun i => (b' i).blocks\ni : Fin (length a)\n⊢ b i = b' i\n[PROOFSTEP]\next1\n[GOAL]\ncase mk.mk.refl.h₁.h.blocks\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : (i : Fin (length a)) → Composition (blocksFun a i)\na' : Composition n\nb' : (i : Fin (length a)) → Composition (blocksFun a i)\nH : (fun i => (b i).blocks) = fun i => (b' i).blocks\ni : Fin (length a)\n⊢ (b i).blocks = (b' i).blocks\n[PROOFSTEP]\nexact congrFun H i\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\n⊢ ∀ {i : ℕ}, i ∈ List.map sum (splitWrtComposition a.blocks b) → 0 < i\n[PROOFSTEP]\nrw [forall_mem_map_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\n⊢ ∀ (j : List ℕ), j ∈ splitWrtComposition a.blocks b → 0 < sum j\n[PROOFSTEP]\nintro j hj\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\nj : List ℕ\nhj : j ∈ splitWrtComposition a.blocks b\n⊢ 0 < sum j\n[PROOFSTEP]\nsuffices H : ∀ i ∈ j, 1 ≤ i\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH✝ : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H✝\ninst✝ : NormedSpace 𝕜 H✝\nn : ℕ\na : Composition n\nb : Composition (length a)\nj : List ℕ\nhj : j ∈ splitWrtComposition a.blocks b\nH : ∀ (i : ℕ), i ∈ j → 1 ≤ i\n⊢ 0 < sum j\ncase H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\nj : List ℕ\nhj : j ∈ splitWrtComposition a.blocks b\n⊢ ∀ (i : ℕ), i ∈ j → 1 ≤ i\n[PROOFSTEP]\nexact\n  calc\n    0 < j.length := length_pos_of_mem_splitWrtComposition hj\n    _ ≤ j.sum := length_le_sum_of_one_le _ H\n[GOAL]\ncase H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\nj : List ℕ\nhj : j ∈ splitWrtComposition a.blocks b\n⊢ ∀ (i : ℕ), i ∈ j → 1 ≤ i\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\nj : List ℕ\nhj : j ∈ splitWrtComposition a.blocks b\ni : ℕ\nhi : i ∈ j\n⊢ 1 ≤ i\n[PROOFSTEP]\napply a.one_le_blocks\n[GOAL]\ncase H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\nj : List ℕ\nhj : j ∈ splitWrtComposition a.blocks b\ni : ℕ\nhi : i ∈ j\n⊢ i ∈ a.blocks\n[PROOFSTEP]\nrw [← a.blocks.join_splitWrtComposition b]\n[GOAL]\ncase H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\nj : List ℕ\nhj : j ∈ splitWrtComposition a.blocks b\ni : ℕ\nhi : i ∈ j\n⊢ i ∈ List.join (splitWrtComposition a.blocks b)\n[PROOFSTEP]\nexact mem_join_of_mem hj hi\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\n⊢ sum (List.map sum (splitWrtComposition a.blocks b)) = n\n[PROOFSTEP]\nrw [← sum_join, join_splitWrtComposition, a.blocks_sum]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\n⊢ List.length (List.map sum (splitWrtComposition a.blocks b)) = List.length b.blocks\n[PROOFSTEP]\nrw [length_map, length_splitWrtComposition]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : Fin (length (gather a b))\n⊢ ↑i < List.length (splitWrtComposition a.blocks b)\n[PROOFSTEP]\nrw [length_splitWrtComposition, ← length_gather]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : Fin (length (gather a b))\n⊢ ↑i < length (gather a b)\n[PROOFSTEP]\nexact i.2\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : Fin (length (gather a b))\ni : ℕ\nhi :\n  i ∈\n    List.get (splitWrtComposition a.blocks b)\n      { val := ↑i✝, isLt := (_ : ↑i✝ < List.length (splitWrtComposition a.blocks b)) }\n⊢ i ∈ a.blocks\n[PROOFSTEP]\nrw [← a.blocks.join_splitWrtComposition b]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : Fin (length (gather a b))\ni : ℕ\nhi :\n  i ∈\n    List.get (splitWrtComposition a.blocks b)\n      { val := ↑i✝, isLt := (_ : ↑i✝ < List.length (splitWrtComposition a.blocks b)) }\n⊢ i ∈ List.join (splitWrtComposition a.blocks b)\n[PROOFSTEP]\nexact mem_join_of_mem (List.get_mem _ _ _) hi\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : Fin (length (gather a b))\n⊢ sum\n      (List.get (splitWrtComposition a.blocks b)\n        { val := ↑i, isLt := (_ : ↑i < List.length (splitWrtComposition a.blocks b)) }) =\n    blocksFun (gather a b) i\n[PROOFSTEP]\nsimp only [Composition.blocksFun, nthLe_map', Composition.gather]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : Fin (length (gather a b))\n⊢ sum\n      (List.get (splitWrtComposition a.blocks b)\n        { val := ↑i, isLt := (_ : ↑i < List.length (splitWrtComposition a.blocks b)) }) =\n    sum (nthLe (splitWrtComposition a.blocks b) ↑i (_ : ↑i < List.length (splitWrtComposition a.blocks b)))\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : Fin (length b)\n⊢ List.length\n      (nthLe (splitWrtComposition a.blocks b) ↑i\n        (_ : ↑{ val := ↑i, isLt := (_ : ↑i < length (gather a b)) } < List.length (splitWrtComposition a.blocks b))) =\n    blocksFun b i\n[PROOFSTEP]\nrw [nthLe_map_rev List.length, nthLe_of_eq (map_length_splitWrtComposition _ _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : Fin (length b)\n⊢ nthLe b.blocks ↑i (_ : ↑i < List.length b.blocks) = blocksFun b i\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : Fin (length b)\nj : Fin (blocksFun b i)\n⊢ nthLe\n      (nthLe (splitWrtComposition a.blocks b) ↑{ val := ↑i, isLt := (_ : ↑i < length (gather a b)) }\n        (_ : ↑{ val := ↑i, isLt := (_ : ↑i < length (gather a b)) } < List.length (splitWrtComposition a.blocks b)))\n      ↑{ val := ↑j,\n          isLt := (_ : ↑j < length (sigmaCompositionAux a b { val := ↑i, isLt := (_ : ↑i < length (gather a b)) })) }\n      (_ :\n        ↑{ val := ↑j,\n              isLt :=\n                (_ : ↑j < length (sigmaCompositionAux a b { val := ↑i, isLt := (_ : ↑i < length (gather a b)) })) } <\n          length (sigmaCompositionAux a b { val := ↑i, isLt := (_ : ↑i < length (gather a b)) })) =\n    nthLe a.blocks ↑(↑(embedding b i) j) (_ : ↑(↑(embedding b i) j) < length a)\n[PROOFSTEP]\nrw [nthLe_of_eq (nthLe_splitWrtComposition _ _ _), nthLe_drop', nthLe_take']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : Fin (length b)\nj : Fin (blocksFun b i)\n⊢ nthLe a.blocks\n      (sizeUpTo b ↑{ val := ↑i, isLt := (_ : ↑i < length (gather a b)) } +\n        ↑{ val := ↑j,\n            isLt := (_ : ↑j < length (sigmaCompositionAux a b { val := ↑i, isLt := (_ : ↑i < length (gather a b)) })) })\n      (_ :\n        sizeUpTo b ↑{ val := ↑i, isLt := (_ : ↑i < length (gather a b)) } +\n            ↑{ val := ↑j,\n                isLt :=\n                  (_ : ↑j < length (sigmaCompositionAux a b { val := ↑i, isLt := (_ : ↑i < length (gather a b)) })) } <\n          List.length a.blocks) =\n    nthLe a.blocks ↑(↑(embedding b i) j) (_ : ↑(↑(embedding b i) j) < length a)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni j : ℕ\nhi : i < length b\nhj : j < blocksFun b { val := i, isLt := hi }\n⊢ sizeUpTo a (sizeUpTo b i + j) =\n    sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\n[PROOFSTEP]\ninduction j with\n| zero =>\n  show sum (take (b.blocks.take i).sum a.blocks) = sum (take i (map sum (splitWrtComposition a.blocks b)))\n  induction' i with i IH\n  · rfl\n  · have A : i < b.length := Nat.lt_of_succ_lt hi\n    have B : i < List.length (map List.sum (splitWrtComposition a.blocks b)) := by simp [A]\n    have C : 0 < blocksFun b ⟨i, A⟩ := Composition.blocks_pos' _ _ _\n    rw [sum_take_succ _ _ B, ← IH A C]\n    have :\n      take (sum (take i b.blocks)) a.blocks =\n        take (sum (take i b.blocks)) (take (sum (take (i + 1) b.blocks)) a.blocks) :=\n      by\n      rw [take_take, min_eq_left]\n      apply monotone_sum_take _ (Nat.le_succ _)\n    rw [this, nthLe_map', nthLe_splitWrtComposition, ←\n      take_append_drop (sum (take i b.blocks)) (take (sum (take (Nat.succ i) b.blocks)) a.blocks), sum_append]\n    congr\n    rw [take_append_drop]\n| succ j IHj =>\n  have A : j < blocksFun b ⟨i, hi⟩ := lt_trans (lt_add_one j) hj\n  have B : j < length (sigmaCompositionAux a b ⟨i, (length_gather a b).symm ▸ hi⟩) := by convert A;\n    rw [← length_sigmaCompositionAux]\n  have C : sizeUpTo b i + j < sizeUpTo b (i + 1) :=\n    by\n    simp only [sizeUpTo_succ b hi, add_lt_add_iff_left]\n    exact A\n  have D : sizeUpTo b i + j < length a := lt_of_lt_of_le C (b.sizeUpTo_le _)\n  have : sizeUpTo b i + Nat.succ j = (sizeUpTo b i + j).succ := rfl\n  rw [this, sizeUpTo_succ _ D, IHj A, sizeUpTo_succ _ B]\n  simp only [sigmaCompositionAux, add_assoc, add_left_inj, Fin.val_mk]\n  simp_rw [← nthLe_eq]\n  rw [nthLe_of_eq (nthLe_splitWrtComposition _ _ _), nthLe_drop', nthLe_take _ _ C]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni j : ℕ\nhi : i < length b\nhj : j < blocksFun b { val := i, isLt := hi }\n⊢ sizeUpTo a (sizeUpTo b i + j) =\n    sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\n[PROOFSTEP]\ninduction j with\n| zero =>\n  show sum (take (b.blocks.take i).sum a.blocks) = sum (take i (map sum (splitWrtComposition a.blocks b)))\n  induction' i with i IH\n  · rfl\n  · have A : i < b.length := Nat.lt_of_succ_lt hi\n    have B : i < List.length (map List.sum (splitWrtComposition a.blocks b)) := by simp [A]\n    have C : 0 < blocksFun b ⟨i, A⟩ := Composition.blocks_pos' _ _ _\n    rw [sum_take_succ _ _ B, ← IH A C]\n    have :\n      take (sum (take i b.blocks)) a.blocks =\n        take (sum (take i b.blocks)) (take (sum (take (i + 1) b.blocks)) a.blocks) :=\n      by\n      rw [take_take, min_eq_left]\n      apply monotone_sum_take _ (Nat.le_succ _)\n    rw [this, nthLe_map', nthLe_splitWrtComposition, ←\n      take_append_drop (sum (take i b.blocks)) (take (sum (take (Nat.succ i) b.blocks)) a.blocks), sum_append]\n    congr\n    rw [take_append_drop]\n| succ j IHj =>\n  have A : j < blocksFun b ⟨i, hi⟩ := lt_trans (lt_add_one j) hj\n  have B : j < length (sigmaCompositionAux a b ⟨i, (length_gather a b).symm ▸ hi⟩) := by convert A;\n    rw [← length_sigmaCompositionAux]\n  have C : sizeUpTo b i + j < sizeUpTo b (i + 1) :=\n    by\n    simp only [sizeUpTo_succ b hi, add_lt_add_iff_left]\n    exact A\n  have D : sizeUpTo b i + j < length a := lt_of_lt_of_le C (b.sizeUpTo_le _)\n  have : sizeUpTo b i + Nat.succ j = (sizeUpTo b i + j).succ := rfl\n  rw [this, sizeUpTo_succ _ D, IHj A, sizeUpTo_succ _ B]\n  simp only [sigmaCompositionAux, add_assoc, add_left_inj, Fin.val_mk]\n  simp_rw [← nthLe_eq]\n  rw [nthLe_of_eq (nthLe_splitWrtComposition _ _ _), nthLe_drop', nthLe_take _ _ C]\n[GOAL]\ncase zero\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nhj : Nat.zero < blocksFun b { val := i, isLt := hi }\n⊢ sizeUpTo a (sizeUpTo b i + Nat.zero) =\n    sizeUpTo (gather a b) i +\n      sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) Nat.zero\n[PROOFSTEP]\n\n| zero =>\n  show sum (take (b.blocks.take i).sum a.blocks) = sum (take i (map sum (splitWrtComposition a.blocks b)))\n  induction' i with i IH\n  · rfl\n  · have A : i < b.length := Nat.lt_of_succ_lt hi\n    have B : i < List.length (map List.sum (splitWrtComposition a.blocks b)) := by simp [A]\n    have C : 0 < blocksFun b ⟨i, A⟩ := Composition.blocks_pos' _ _ _\n    rw [sum_take_succ _ _ B, ← IH A C]\n    have :\n      take (sum (take i b.blocks)) a.blocks =\n        take (sum (take i b.blocks)) (take (sum (take (i + 1) b.blocks)) a.blocks) :=\n      by\n      rw [take_take, min_eq_left]\n      apply monotone_sum_take _ (Nat.le_succ _)\n    rw [this, nthLe_map', nthLe_splitWrtComposition, ←\n      take_append_drop (sum (take i b.blocks)) (take (sum (take (Nat.succ i) b.blocks)) a.blocks), sum_append]\n    congr\n    rw [take_append_drop]\n[GOAL]\ncase zero\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nhj : Nat.zero < blocksFun b { val := i, isLt := hi }\n⊢ sizeUpTo a (sizeUpTo b i + Nat.zero) =\n    sizeUpTo (gather a b) i +\n      sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) Nat.zero\n[PROOFSTEP]\nshow sum (take (b.blocks.take i).sum a.blocks) = sum (take i (map sum (splitWrtComposition a.blocks b)))\n[GOAL]\ncase zero\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nhj : Nat.zero < blocksFun b { val := i, isLt := hi }\n⊢ sum (take (sum (take i b.blocks)) a.blocks) = sum (take i (List.map sum (splitWrtComposition a.blocks b)))\n[PROOFSTEP]\ninduction' i with i IH\n[GOAL]\ncase zero.zero\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi✝ : i < length b\nhj✝ : Nat.zero < blocksFun b { val := i, isLt := hi✝ }\nhi : Nat.zero < length b\nhj : Nat.zero < blocksFun b { val := Nat.zero, isLt := hi }\n⊢ sum (take (sum (take Nat.zero b.blocks)) a.blocks) =\n    sum (take Nat.zero (List.map sum (splitWrtComposition a.blocks b)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase zero.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : ℕ\nhi✝ : i✝ < length b\nhj✝ : Nat.zero < blocksFun b { val := i✝, isLt := hi✝ }\ni : ℕ\nIH :\n  ∀ (hi : i < length b),\n    Nat.zero < blocksFun b { val := i, isLt := hi } →\n      sum (take (sum (take i b.blocks)) a.blocks) = sum (take i (List.map sum (splitWrtComposition a.blocks b)))\nhi : Nat.succ i < length b\nhj : Nat.zero < blocksFun b { val := Nat.succ i, isLt := hi }\n⊢ sum (take (sum (take (Nat.succ i) b.blocks)) a.blocks) =\n    sum (take (Nat.succ i) (List.map sum (splitWrtComposition a.blocks b)))\n[PROOFSTEP]\nhave A : i < b.length := Nat.lt_of_succ_lt hi\n[GOAL]\ncase zero.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : ℕ\nhi✝ : i✝ < length b\nhj✝ : Nat.zero < blocksFun b { val := i✝, isLt := hi✝ }\ni : ℕ\nIH :\n  ∀ (hi : i < length b),\n    Nat.zero < blocksFun b { val := i, isLt := hi } →\n      sum (take (sum (take i b.blocks)) a.blocks) = sum (take i (List.map sum (splitWrtComposition a.blocks b)))\nhi : Nat.succ i < length b\nhj : Nat.zero < blocksFun b { val := Nat.succ i, isLt := hi }\nA : i < length b\n⊢ sum (take (sum (take (Nat.succ i) b.blocks)) a.blocks) =\n    sum (take (Nat.succ i) (List.map sum (splitWrtComposition a.blocks b)))\n[PROOFSTEP]\nhave B : i < List.length (map List.sum (splitWrtComposition a.blocks b)) := by simp [A]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : ℕ\nhi✝ : i✝ < length b\nhj✝ : Nat.zero < blocksFun b { val := i✝, isLt := hi✝ }\ni : ℕ\nIH :\n  ∀ (hi : i < length b),\n    Nat.zero < blocksFun b { val := i, isLt := hi } →\n      sum (take (sum (take i b.blocks)) a.blocks) = sum (take i (List.map sum (splitWrtComposition a.blocks b)))\nhi : Nat.succ i < length b\nhj : Nat.zero < blocksFun b { val := Nat.succ i, isLt := hi }\nA : i < length b\n⊢ i < List.length (List.map sum (splitWrtComposition a.blocks b))\n[PROOFSTEP]\nsimp [A]\n[GOAL]\ncase zero.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : ℕ\nhi✝ : i✝ < length b\nhj✝ : Nat.zero < blocksFun b { val := i✝, isLt := hi✝ }\ni : ℕ\nIH :\n  ∀ (hi : i < length b),\n    Nat.zero < blocksFun b { val := i, isLt := hi } →\n      sum (take (sum (take i b.blocks)) a.blocks) = sum (take i (List.map sum (splitWrtComposition a.blocks b)))\nhi : Nat.succ i < length b\nhj : Nat.zero < blocksFun b { val := Nat.succ i, isLt := hi }\nA : i < length b\nB : i < List.length (List.map sum (splitWrtComposition a.blocks b))\n⊢ sum (take (sum (take (Nat.succ i) b.blocks)) a.blocks) =\n    sum (take (Nat.succ i) (List.map sum (splitWrtComposition a.blocks b)))\n[PROOFSTEP]\nhave C : 0 < blocksFun b ⟨i, A⟩ := Composition.blocks_pos' _ _ _\n[GOAL]\ncase zero.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : ℕ\nhi✝ : i✝ < length b\nhj✝ : Nat.zero < blocksFun b { val := i✝, isLt := hi✝ }\ni : ℕ\nIH :\n  ∀ (hi : i < length b),\n    Nat.zero < blocksFun b { val := i, isLt := hi } →\n      sum (take (sum (take i b.blocks)) a.blocks) = sum (take i (List.map sum (splitWrtComposition a.blocks b)))\nhi : Nat.succ i < length b\nhj : Nat.zero < blocksFun b { val := Nat.succ i, isLt := hi }\nA : i < length b\nB : i < List.length (List.map sum (splitWrtComposition a.blocks b))\nC : 0 < blocksFun b { val := i, isLt := A }\n⊢ sum (take (sum (take (Nat.succ i) b.blocks)) a.blocks) =\n    sum (take (Nat.succ i) (List.map sum (splitWrtComposition a.blocks b)))\n[PROOFSTEP]\nrw [sum_take_succ _ _ B, ← IH A C]\n[GOAL]\ncase zero.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : ℕ\nhi✝ : i✝ < length b\nhj✝ : Nat.zero < blocksFun b { val := i✝, isLt := hi✝ }\ni : ℕ\nIH :\n  ∀ (hi : i < length b),\n    Nat.zero < blocksFun b { val := i, isLt := hi } →\n      sum (take (sum (take i b.blocks)) a.blocks) = sum (take i (List.map sum (splitWrtComposition a.blocks b)))\nhi : Nat.succ i < length b\nhj : Nat.zero < blocksFun b { val := Nat.succ i, isLt := hi }\nA : i < length b\nB : i < List.length (List.map sum (splitWrtComposition a.blocks b))\nC : 0 < blocksFun b { val := i, isLt := A }\n⊢ sum (take (sum (take (Nat.succ i) b.blocks)) a.blocks) =\n    sum (take (sum (take i b.blocks)) a.blocks) + nthLe (List.map sum (splitWrtComposition a.blocks b)) i B\n[PROOFSTEP]\nhave :\n  take (sum (take i b.blocks)) a.blocks = take (sum (take i b.blocks)) (take (sum (take (i + 1) b.blocks)) a.blocks) :=\n  by\n  rw [take_take, min_eq_left]\n  apply monotone_sum_take _ (Nat.le_succ _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : ℕ\nhi✝ : i✝ < length b\nhj✝ : Nat.zero < blocksFun b { val := i✝, isLt := hi✝ }\ni : ℕ\nIH :\n  ∀ (hi : i < length b),\n    Nat.zero < blocksFun b { val := i, isLt := hi } →\n      sum (take (sum (take i b.blocks)) a.blocks) = sum (take i (List.map sum (splitWrtComposition a.blocks b)))\nhi : Nat.succ i < length b\nhj : Nat.zero < blocksFun b { val := Nat.succ i, isLt := hi }\nA : i < length b\nB : i < List.length (List.map sum (splitWrtComposition a.blocks b))\nC : 0 < blocksFun b { val := i, isLt := A }\n⊢ take (sum (take i b.blocks)) a.blocks = take (sum (take i b.blocks)) (take (sum (take (i + 1) b.blocks)) a.blocks)\n[PROOFSTEP]\nrw [take_take, min_eq_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : ℕ\nhi✝ : i✝ < length b\nhj✝ : Nat.zero < blocksFun b { val := i✝, isLt := hi✝ }\ni : ℕ\nIH :\n  ∀ (hi : i < length b),\n    Nat.zero < blocksFun b { val := i, isLt := hi } →\n      sum (take (sum (take i b.blocks)) a.blocks) = sum (take i (List.map sum (splitWrtComposition a.blocks b)))\nhi : Nat.succ i < length b\nhj : Nat.zero < blocksFun b { val := Nat.succ i, isLt := hi }\nA : i < length b\nB : i < List.length (List.map sum (splitWrtComposition a.blocks b))\nC : 0 < blocksFun b { val := i, isLt := A }\n⊢ sum (take i b.blocks) ≤ sum (take (i + 1) b.blocks)\n[PROOFSTEP]\napply monotone_sum_take _ (Nat.le_succ _)\n[GOAL]\ncase zero.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : ℕ\nhi✝ : i✝ < length b\nhj✝ : Nat.zero < blocksFun b { val := i✝, isLt := hi✝ }\ni : ℕ\nIH :\n  ∀ (hi : i < length b),\n    Nat.zero < blocksFun b { val := i, isLt := hi } →\n      sum (take (sum (take i b.blocks)) a.blocks) = sum (take i (List.map sum (splitWrtComposition a.blocks b)))\nhi : Nat.succ i < length b\nhj : Nat.zero < blocksFun b { val := Nat.succ i, isLt := hi }\nA : i < length b\nB : i < List.length (List.map sum (splitWrtComposition a.blocks b))\nC : 0 < blocksFun b { val := i, isLt := A }\nthis :\n  take (sum (take i b.blocks)) a.blocks = take (sum (take i b.blocks)) (take (sum (take (i + 1) b.blocks)) a.blocks)\n⊢ sum (take (sum (take (Nat.succ i) b.blocks)) a.blocks) =\n    sum (take (sum (take i b.blocks)) a.blocks) + nthLe (List.map sum (splitWrtComposition a.blocks b)) i B\n[PROOFSTEP]\nrw [this, nthLe_map', nthLe_splitWrtComposition, ←\n  take_append_drop (sum (take i b.blocks)) (take (sum (take (Nat.succ i) b.blocks)) a.blocks), sum_append]\n[GOAL]\ncase zero.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : ℕ\nhi✝ : i✝ < length b\nhj✝ : Nat.zero < blocksFun b { val := i✝, isLt := hi✝ }\ni : ℕ\nIH :\n  ∀ (hi : i < length b),\n    Nat.zero < blocksFun b { val := i, isLt := hi } →\n      sum (take (sum (take i b.blocks)) a.blocks) = sum (take i (List.map sum (splitWrtComposition a.blocks b)))\nhi : Nat.succ i < length b\nhj : Nat.zero < blocksFun b { val := Nat.succ i, isLt := hi }\nA : i < length b\nB : i < List.length (List.map sum (splitWrtComposition a.blocks b))\nC : 0 < blocksFun b { val := i, isLt := A }\nthis :\n  take (sum (take i b.blocks)) a.blocks = take (sum (take i b.blocks)) (take (sum (take (i + 1) b.blocks)) a.blocks)\n⊢ sum (take (sum (take i b.blocks)) (take (sum (take (Nat.succ i) b.blocks)) a.blocks)) +\n      sum (drop (sum (take i b.blocks)) (take (sum (take (Nat.succ i) b.blocks)) a.blocks)) =\n    sum\n        (take (sum (take i b.blocks))\n          (take (sum (take i b.blocks)) (take (sum (take (Nat.succ i) b.blocks)) a.blocks) ++\n            drop (sum (take i b.blocks)) (take (sum (take (Nat.succ i) b.blocks)) a.blocks))) +\n      sum (drop (sizeUpTo b i) (take (sizeUpTo b (i + 1)) a.blocks))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase zero.succ.e_a.e_a.e_a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni✝ : ℕ\nhi✝ : i✝ < length b\nhj✝ : Nat.zero < blocksFun b { val := i✝, isLt := hi✝ }\ni : ℕ\nIH :\n  ∀ (hi : i < length b),\n    Nat.zero < blocksFun b { val := i, isLt := hi } →\n      sum (take (sum (take i b.blocks)) a.blocks) = sum (take i (List.map sum (splitWrtComposition a.blocks b)))\nhi : Nat.succ i < length b\nhj : Nat.zero < blocksFun b { val := Nat.succ i, isLt := hi }\nA : i < length b\nB : i < List.length (List.map sum (splitWrtComposition a.blocks b))\nC : 0 < blocksFun b { val := i, isLt := A }\nthis :\n  take (sum (take i b.blocks)) a.blocks = take (sum (take i b.blocks)) (take (sum (take (i + 1) b.blocks)) a.blocks)\n⊢ take (sum (take (Nat.succ i) b.blocks)) a.blocks =\n    take (sum (take i b.blocks)) (take (sum (take (Nat.succ i) b.blocks)) a.blocks) ++\n      drop (sum (take i b.blocks)) (take (sum (take (Nat.succ i) b.blocks)) a.blocks)\n[PROOFSTEP]\nrw [take_append_drop]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\n⊢ sizeUpTo a (sizeUpTo b i + Nat.succ j) =\n    sizeUpTo (gather a b) i +\n      sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) (Nat.succ j)\n[PROOFSTEP]\n\n| succ j IHj =>\n  have A : j < blocksFun b ⟨i, hi⟩ := lt_trans (lt_add_one j) hj\n  have B : j < length (sigmaCompositionAux a b ⟨i, (length_gather a b).symm ▸ hi⟩) := by convert A;\n    rw [← length_sigmaCompositionAux]\n  have C : sizeUpTo b i + j < sizeUpTo b (i + 1) :=\n    by\n    simp only [sizeUpTo_succ b hi, add_lt_add_iff_left]\n    exact A\n  have D : sizeUpTo b i + j < length a := lt_of_lt_of_le C (b.sizeUpTo_le _)\n  have : sizeUpTo b i + Nat.succ j = (sizeUpTo b i + j).succ := rfl\n  rw [this, sizeUpTo_succ _ D, IHj A, sizeUpTo_succ _ B]\n  simp only [sigmaCompositionAux, add_assoc, add_left_inj, Fin.val_mk]\n  simp_rw [← nthLe_eq]\n  rw [nthLe_of_eq (nthLe_splitWrtComposition _ _ _), nthLe_drop', nthLe_take _ _ C]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\n⊢ sizeUpTo a (sizeUpTo b i + Nat.succ j) =\n    sizeUpTo (gather a b) i +\n      sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) (Nat.succ j)\n[PROOFSTEP]\nhave A : j < blocksFun b ⟨i, hi⟩ := lt_trans (lt_add_one j) hj\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\nA : j < blocksFun b { val := i, isLt := hi }\n⊢ sizeUpTo a (sizeUpTo b i + Nat.succ j) =\n    sizeUpTo (gather a b) i +\n      sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) (Nat.succ j)\n[PROOFSTEP]\nhave B : j < length (sigmaCompositionAux a b ⟨i, (length_gather a b).symm ▸ hi⟩) := by convert A;\n  rw [← length_sigmaCompositionAux]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\nA : j < blocksFun b { val := i, isLt := hi }\n⊢ j < length (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) })\n[PROOFSTEP]\nconvert A\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\nA : j < blocksFun b { val := i, isLt := hi }\n⊢ length (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) =\n    blocksFun b { val := i, isLt := hi }\n[PROOFSTEP]\nrw [← length_sigmaCompositionAux]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\nA : j < blocksFun b { val := i, isLt := hi }\nB : j < length (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) })\n⊢ sizeUpTo a (sizeUpTo b i + Nat.succ j) =\n    sizeUpTo (gather a b) i +\n      sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) (Nat.succ j)\n[PROOFSTEP]\nhave C : sizeUpTo b i + j < sizeUpTo b (i + 1) :=\n  by\n  simp only [sizeUpTo_succ b hi, add_lt_add_iff_left]\n  exact A\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\nA : j < blocksFun b { val := i, isLt := hi }\nB : j < length (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) })\n⊢ sizeUpTo b i + j < sizeUpTo b (i + 1)\n[PROOFSTEP]\nsimp only [sizeUpTo_succ b hi, add_lt_add_iff_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\nA : j < blocksFun b { val := i, isLt := hi }\nB : j < length (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) })\n⊢ j < nthLe b.blocks i hi\n[PROOFSTEP]\nexact A\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\nA : j < blocksFun b { val := i, isLt := hi }\nB : j < length (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) })\nC : sizeUpTo b i + j < sizeUpTo b (i + 1)\n⊢ sizeUpTo a (sizeUpTo b i + Nat.succ j) =\n    sizeUpTo (gather a b) i +\n      sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) (Nat.succ j)\n[PROOFSTEP]\nhave D : sizeUpTo b i + j < length a := lt_of_lt_of_le C (b.sizeUpTo_le _)\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\nA : j < blocksFun b { val := i, isLt := hi }\nB : j < length (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) })\nC : sizeUpTo b i + j < sizeUpTo b (i + 1)\nD : sizeUpTo b i + j < length a\n⊢ sizeUpTo a (sizeUpTo b i + Nat.succ j) =\n    sizeUpTo (gather a b) i +\n      sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) (Nat.succ j)\n[PROOFSTEP]\nhave : sizeUpTo b i + Nat.succ j = (sizeUpTo b i + j).succ := rfl\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\nA : j < blocksFun b { val := i, isLt := hi }\nB : j < length (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) })\nC : sizeUpTo b i + j < sizeUpTo b (i + 1)\nD : sizeUpTo b i + j < length a\nthis : sizeUpTo b i + Nat.succ j = Nat.succ (sizeUpTo b i + j)\n⊢ sizeUpTo a (sizeUpTo b i + Nat.succ j) =\n    sizeUpTo (gather a b) i +\n      sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) (Nat.succ j)\n[PROOFSTEP]\nrw [this, sizeUpTo_succ _ D, IHj A, sizeUpTo_succ _ B]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\nA : j < blocksFun b { val := i, isLt := hi }\nB : j < length (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) })\nC : sizeUpTo b i + j < sizeUpTo b (i + 1)\nD : sizeUpTo b i + j < length a\nthis : sizeUpTo b i + Nat.succ j = Nat.succ (sizeUpTo b i + j)\n⊢ sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j +\n      nthLe a.blocks (sizeUpTo b i + j) D =\n    sizeUpTo (gather a b) i +\n      (sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j +\n        nthLe (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }).blocks j B)\n[PROOFSTEP]\nsimp only [sigmaCompositionAux, add_assoc, add_left_inj, Fin.val_mk]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\nA : j < blocksFun b { val := i, isLt := hi }\nB : j < length (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) })\nC : sizeUpTo b i + j < sizeUpTo b (i + 1)\nD : sizeUpTo b i + j < length a\nthis : sizeUpTo b i + Nat.succ j = Nat.succ (sizeUpTo b i + j)\n⊢ sizeUpTo (gather a b) i +\n      (sizeUpTo\n          {\n            blocks :=\n              List.get (splitWrtComposition a.blocks b)\n                { val := i,\n                  isLt :=\n                    (_ :\n                      ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                        List.length (splitWrtComposition a.blocks b)) },\n            blocks_pos :=\n              (_ :\n                ∀ {i_1 : ℕ},\n                  i_1 ∈\n                      List.get (splitWrtComposition a.blocks b)\n                        { val := ↑{ val := i, isLt := (_ : i < length (gather a b)) },\n                          isLt :=\n                            (_ :\n                              ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                                List.length (splitWrtComposition a.blocks b)) } →\n                    0 < i_1),\n            blocks_sum :=\n              (_ :\n                sum\n                    (List.get (splitWrtComposition a.blocks b)\n                      { val := ↑{ val := i, isLt := (_ : i < length (gather a b)) },\n                        isLt :=\n                          (_ :\n                            ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                              List.length (splitWrtComposition a.blocks b)) }) =\n                  blocksFun (gather a b) { val := i, isLt := (_ : i < length (gather a b)) }) }\n          j +\n        nthLe a.blocks (sizeUpTo b i + j) D) =\n    sizeUpTo (gather a b) i +\n      (sizeUpTo\n          {\n            blocks :=\n              List.get (splitWrtComposition a.blocks b)\n                { val := i,\n                  isLt :=\n                    (_ :\n                      ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                        List.length (splitWrtComposition a.blocks b)) },\n            blocks_pos :=\n              (_ :\n                ∀ {i_1 : ℕ},\n                  i_1 ∈\n                      List.get (splitWrtComposition a.blocks b)\n                        { val := ↑{ val := i, isLt := (_ : i < length (gather a b)) },\n                          isLt :=\n                            (_ :\n                              ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                                List.length (splitWrtComposition a.blocks b)) } →\n                    0 < i_1),\n            blocks_sum :=\n              (_ :\n                sum\n                    (List.get (splitWrtComposition a.blocks b)\n                      { val := ↑{ val := i, isLt := (_ : i < length (gather a b)) },\n                        isLt :=\n                          (_ :\n                            ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                              List.length (splitWrtComposition a.blocks b)) }) =\n                  blocksFun (gather a b) { val := i, isLt := (_ : i < length (gather a b)) }) }\n          j +\n        nthLe\n          (List.get (splitWrtComposition a.blocks b)\n            { val := i,\n              isLt :=\n                (_ :\n                  ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                    List.length (splitWrtComposition a.blocks b)) })\n          j\n          (_ :\n            j <\n              List.length\n                (List.get (splitWrtComposition a.blocks b)\n                  { val := i,\n                    isLt :=\n                      (_ :\n                        ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                          List.length (splitWrtComposition a.blocks b)) })))\n[PROOFSTEP]\nsimp_rw [← nthLe_eq]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn : ℕ\na : Composition n\nb : Composition (length a)\ni : ℕ\nhi : i < length b\nj : ℕ\nIHj :\n  j < blocksFun b { val := i, isLt := hi } →\n    sizeUpTo a (sizeUpTo b i + j) =\n      sizeUpTo (gather a b) i + sizeUpTo (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) }) j\nhj : Nat.succ j < blocksFun b { val := i, isLt := hi }\nA : j < blocksFun b { val := i, isLt := hi }\nB : j < length (sigmaCompositionAux a b { val := i, isLt := (_ : i < length (gather a b)) })\nC : sizeUpTo b i + j < sizeUpTo b (i + 1)\nD : sizeUpTo b i + j < length a\nthis : sizeUpTo b i + Nat.succ j = Nat.succ (sizeUpTo b i + j)\n⊢ sizeUpTo (gather a b) i +\n      (sizeUpTo\n          {\n            blocks :=\n              nthLe (splitWrtComposition a.blocks b) i\n                (_ :\n                  ↑{ val := i, isLt := (_ : i < length (gather a b)) } < List.length (splitWrtComposition a.blocks b)),\n            blocks_pos :=\n              (_ :\n                ∀ {i_1 : ℕ},\n                  i_1 ∈\n                      nthLe (splitWrtComposition a.blocks b) i\n                        (_ :\n                          ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                            List.length (splitWrtComposition a.blocks b)) →\n                    0 < i_1),\n            blocks_sum :=\n              (_ :\n                sum\n                    (nthLe (splitWrtComposition a.blocks b) i\n                      (_ :\n                        ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                          List.length (splitWrtComposition a.blocks b))) =\n                  blocksFun (gather a b) { val := i, isLt := (_ : i < length (gather a b)) }) }\n          j +\n        nthLe a.blocks (sizeUpTo b i + j) D) =\n    sizeUpTo (gather a b) i +\n      (sizeUpTo\n          {\n            blocks :=\n              nthLe (splitWrtComposition a.blocks b) i\n                (_ :\n                  ↑{ val := i, isLt := (_ : i < length (gather a b)) } < List.length (splitWrtComposition a.blocks b)),\n            blocks_pos :=\n              (_ :\n                ∀ {i_1 : ℕ},\n                  i_1 ∈\n                      nthLe (splitWrtComposition a.blocks b) i\n                        (_ :\n                          ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                            List.length (splitWrtComposition a.blocks b)) →\n                    0 < i_1),\n            blocks_sum :=\n              (_ :\n                sum\n                    (nthLe (splitWrtComposition a.blocks b) i\n                      (_ :\n                        ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                          List.length (splitWrtComposition a.blocks b))) =\n                  blocksFun (gather a b) { val := i, isLt := (_ : i < length (gather a b)) }) }\n          j +\n        nthLe\n          (nthLe (splitWrtComposition a.blocks b) i\n            (_ : ↑{ val := i, isLt := (_ : i < length (gather a b)) } < List.length (splitWrtComposition a.blocks b)))\n          j\n          (_ :\n            j <\n              List.length\n                (nthLe (splitWrtComposition a.blocks b) i\n                  (_ :\n                    ↑{ val := i, isLt := (_ : i < length (gather a b)) } <\n                      List.length (splitWrtComposition a.blocks b)))))\n[PROOFSTEP]\nrw [nthLe_of_eq (nthLe_splitWrtComposition _ _ _), nthLe_drop', nthLe_take _ _ C]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\ni : (c : Composition n) × ((i : Fin (length c)) → Composition (blocksFun c i))\n⊢ ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1\n[PROOFSTEP]\nsimp only [and_imp, List.mem_join, exists_imp, forall_mem_ofFn_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\ni : (c : Composition n) × ((i : Fin (length c)) → Composition (blocksFun c i))\n⊢ ∀ {i_1 : ℕ} (j : Fin (length i.fst)), i_1 ∈ (Sigma.snd i j).blocks → 0 < i_1\n[PROOFSTEP]\nexact @fun i j hj => Composition.blocks_pos _ hj\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\ni : (c : Composition n) × ((i : Fin (length c)) → Composition (blocksFun c i))\n⊢ sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n\n[PROOFSTEP]\nsimp [sum_ofFn, Composition.blocks_sum, Composition.sum_blocksFun]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\ni : (c : Composition n) × ((i : Fin (length c)) → Composition (blocksFun c i))\n⊢ ∀ {i_1 : ℕ}, (i_1 ∈ ofFn fun j => length (Sigma.snd i j)) → 0 < i_1\n[PROOFSTEP]\nintro k hk\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\ni : (c : Composition n) × ((i : Fin (length c)) → Composition (blocksFun c i))\nk : ℕ\nhk : k ∈ ofFn fun j => length (Sigma.snd i j)\n⊢ 0 < k\n[PROOFSTEP]\nrefine' ((forall_mem_ofFn_iff (P := fun i => 0 < i)).2 fun j => _) k hk\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\ni : (c : Composition n) × ((i : Fin (length c)) → Composition (blocksFun c i))\nk : ℕ\nhk : k ∈ ofFn fun j => length (Sigma.snd i j)\nj : Fin (length i.fst)\n⊢ 0 < length (Sigma.snd i j)\n[PROOFSTEP]\nexact Composition.length_pos_of_pos _ (Composition.blocks_pos' _ _ _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\ni : (c : Composition n) × ((i : Fin (length c)) → Composition (blocksFun c i))\n⊢ sum (ofFn fun j => length (Sigma.snd i j)) =\n    length\n      { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n        blocks_pos := (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n        blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) }\n[PROOFSTEP]\ndsimp only [Composition.length]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\ni : (c : Composition n) × ((i : Fin (length c)) → Composition (blocksFun c i))\n⊢ sum (ofFn fun j => List.length (Sigma.snd i j).blocks) =\n    List.length (List.join (ofFn fun j => (Sigma.snd i j).blocks))\n[PROOFSTEP]\nsimp [sum_ofFn]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\n⊢ Function.LeftInverse\n    (fun i =>\n      {\n        fst :=\n          { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n            blocks_pos := (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n            blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) },\n        snd :=\n          { blocks := ofFn fun j => length (Sigma.snd i j),\n            blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (Sigma.snd i j)) → 0 < k),\n            blocks_sum :=\n              (_ :\n                sum (ofFn fun j => length (Sigma.snd i j)) =\n                  length\n                    { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                      blocks_pos := (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                      blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) }) } })\n    fun i => { fst := gather i.fst i.snd, snd := sigmaCompositionAux i.fst i.snd }\n[PROOFSTEP]\nrintro ⟨a, b⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\n⊢ (fun i =>\n        {\n          fst :=\n            { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n              blocks_pos := (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n              blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) },\n          snd :=\n            { blocks := ofFn fun j => length (Sigma.snd i j),\n              blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (Sigma.snd i j)) → 0 < k),\n              blocks_sum :=\n                (_ :\n                  sum (ofFn fun j => length (Sigma.snd i j)) =\n                    length\n                      { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                        blocks_pos :=\n                          (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                        blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) }) } })\n      ((fun i => { fst := gather i.fst i.snd, snd := sigmaCompositionAux i.fst i.snd }) { fst := a, snd := b }) =\n    { fst := a, snd := b }\n[PROOFSTEP]\nrw [sigma_composition_eq_iff]\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\n⊢ ((fun i =>\n              {\n                fst :=\n                  { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                    blocks_pos := (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                    blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) },\n                snd :=\n                  { blocks := ofFn fun j => length (Sigma.snd i j),\n                    blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (Sigma.snd i j)) → 0 < k),\n                    blocks_sum :=\n                      (_ :\n                        sum (ofFn fun j => length (Sigma.snd i j)) =\n                          length\n                            { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                              blocks_pos :=\n                                (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                              blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) }) } })\n            ((fun i => { fst := gather i.fst i.snd, snd := sigmaCompositionAux i.fst i.snd })\n              { fst := a, snd := b })).fst.blocks =\n      { fst := a, snd := b }.fst.blocks ∧\n    ((fun i =>\n              {\n                fst :=\n                  { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                    blocks_pos := (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                    blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) },\n                snd :=\n                  { blocks := ofFn fun j => length (Sigma.snd i j),\n                    blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (Sigma.snd i j)) → 0 < k),\n                    blocks_sum :=\n                      (_ :\n                        sum (ofFn fun j => length (Sigma.snd i j)) =\n                          length\n                            { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                              blocks_pos :=\n                                (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                              blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) }) } })\n            ((fun i => { fst := gather i.fst i.snd, snd := sigmaCompositionAux i.fst i.snd })\n              { fst := a, snd := b })).snd.blocks =\n      { fst := a, snd := b }.snd.blocks\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\n⊢ List.join (ofFn fun j => (sigmaCompositionAux a b j).blocks) = a.blocks ∧\n    (ofFn fun j => length (sigmaCompositionAux a b j)) = b.blocks\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\n⊢ List.join (ofFn fun j => (sigmaCompositionAux a b j).blocks) = a.blocks\n[PROOFSTEP]\nconv_rhs => rw [← join_splitWrtComposition a.blocks b, ← ofFn_get (splitWrtComposition a.blocks b)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\n| a.blocks\n[PROOFSTEP]\nrw [← join_splitWrtComposition a.blocks b, ← ofFn_get (splitWrtComposition a.blocks b)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\n| a.blocks\n[PROOFSTEP]\nrw [← join_splitWrtComposition a.blocks b, ← ofFn_get (splitWrtComposition a.blocks b)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\n| a.blocks\n[PROOFSTEP]\nrw [← join_splitWrtComposition a.blocks b, ← ofFn_get (splitWrtComposition a.blocks b)]\n[GOAL]\ncase mk.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\n⊢ List.join (ofFn fun j => (sigmaCompositionAux a b j).blocks) =\n    List.join (ofFn (List.get (splitWrtComposition a.blocks b)))\n[PROOFSTEP]\nhave A : length (gather a b) = List.length (splitWrtComposition a.blocks b) := by\n  simp only [length, gather, length_map, length_splitWrtComposition]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\n⊢ length (gather a b) = List.length (splitWrtComposition a.blocks b)\n[PROOFSTEP]\nsimp only [length, gather, length_map, length_splitWrtComposition]\n[GOAL]\ncase mk.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\nA : length (gather a b) = List.length (splitWrtComposition a.blocks b)\n⊢ List.join (ofFn fun j => (sigmaCompositionAux a b j).blocks) =\n    List.join (ofFn (List.get (splitWrtComposition a.blocks b)))\n[PROOFSTEP]\ncongr! 2\n[GOAL]\ncase mk.left.h.e'_2.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\nA : length (gather a b) = List.length (splitWrtComposition a.blocks b)\n⊢ HEq (fun j => (sigmaCompositionAux a b j).blocks) (List.get (splitWrtComposition a.blocks b))\n[PROOFSTEP]\nexact (Fin.heq_fun_iff A (α := List ℕ)).2 fun i => rfl\n[GOAL]\ncase mk.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\n⊢ (ofFn fun j => length (sigmaCompositionAux a b j)) = b.blocks\n[PROOFSTEP]\nhave B : Composition.length (Composition.gather a b) = List.length b.blocks := Composition.length_gather _ _\n[GOAL]\ncase mk.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\nB : length (gather a b) = List.length b.blocks\n⊢ (ofFn fun j => length (sigmaCompositionAux a b j)) = b.blocks\n[PROOFSTEP]\nconv_rhs => rw [← ofFn_get b.blocks]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\nB : length (gather a b) = List.length b.blocks\n| b.blocks\n[PROOFSTEP]\nrw [← ofFn_get b.blocks]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\nB : length (gather a b) = List.length b.blocks\n| b.blocks\n[PROOFSTEP]\nrw [← ofFn_get b.blocks]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\nB : length (gather a b) = List.length b.blocks\n| b.blocks\n[PROOFSTEP]\nrw [← ofFn_get b.blocks]\n[GOAL]\ncase mk.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\nB : length (gather a b) = List.length b.blocks\n⊢ (ofFn fun j => length (sigmaCompositionAux a b j)) = ofFn (List.get b.blocks)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase mk.right.h.e_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\nB : length (gather a b) = List.length b.blocks\n⊢ HEq (fun j => length (sigmaCompositionAux a b j)) (List.get b.blocks)\n[PROOFSTEP]\nrefine' (Fin.heq_fun_iff B).2 fun i => _\n[GOAL]\ncase mk.right.h.e_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\na : Composition n\nb : Composition (length a)\nB : length (gather a b) = List.length b.blocks\ni : Fin (length (gather a b))\n⊢ length (sigmaCompositionAux a b i) = List.get b.blocks { val := ↑i, isLt := (_ : ↑i < List.length b.blocks) }\n[PROOFSTEP]\nrw [sigmaCompositionAux, Composition.length, List.get_map_rev List.length,\n  List.get_of_eq (map_length_splitWrtComposition _ _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\n⊢ Function.RightInverse\n    (fun i =>\n      {\n        fst :=\n          { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n            blocks_pos := (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n            blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) },\n        snd :=\n          { blocks := ofFn fun j => length (Sigma.snd i j),\n            blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (Sigma.snd i j)) → 0 < k),\n            blocks_sum :=\n              (_ :\n                sum (ofFn fun j => length (Sigma.snd i j)) =\n                  length\n                    { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                      blocks_pos := (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                      blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) }) } })\n    fun i => { fst := gather i.fst i.snd, snd := sigmaCompositionAux i.fst i.snd }\n[PROOFSTEP]\nrintro ⟨c, d⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\n⊢ (fun i => { fst := gather i.fst i.snd, snd := sigmaCompositionAux i.fst i.snd })\n      ((fun i =>\n          {\n            fst :=\n              { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                blocks_pos := (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) },\n            snd :=\n              { blocks := ofFn fun j => length (Sigma.snd i j),\n                blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (Sigma.snd i j)) → 0 < k),\n                blocks_sum :=\n                  (_ :\n                    sum (ofFn fun j => length (Sigma.snd i j)) =\n                      length\n                        { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                          blocks_pos :=\n                            (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                          blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) }) } })\n        { fst := c, snd := d }) =\n    { fst := c, snd := d }\n[PROOFSTEP]\nhave : map List.sum (ofFn fun i : Fin (Composition.length c) => (d i).blocks) = c.blocks := by\n  simp [map_ofFn, (· ∘ ·), Composition.blocks_sum, Composition.ofFn_blocksFun]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\n⊢ List.map sum (ofFn fun i => (d i).blocks) = c.blocks\n[PROOFSTEP]\nsimp [map_ofFn, (· ∘ ·), Composition.blocks_sum, Composition.ofFn_blocksFun]\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\n⊢ (fun i => { fst := gather i.fst i.snd, snd := sigmaCompositionAux i.fst i.snd })\n      ((fun i =>\n          {\n            fst :=\n              { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                blocks_pos := (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) },\n            snd :=\n              { blocks := ofFn fun j => length (Sigma.snd i j),\n                blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (Sigma.snd i j)) → 0 < k),\n                blocks_sum :=\n                  (_ :\n                    sum (ofFn fun j => length (Sigma.snd i j)) =\n                      length\n                        { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                          blocks_pos :=\n                            (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                          blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) }) } })\n        { fst := c, snd := d }) =\n    { fst := c, snd := d }\n[PROOFSTEP]\nrw [sigma_pi_composition_eq_iff]\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\n⊢ (ofFn fun i =>\n      (Sigma.snd\n          ((fun i => { fst := gather i.fst i.snd, snd := sigmaCompositionAux i.fst i.snd })\n            ((fun i =>\n                {\n                  fst :=\n                    { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                      blocks_pos := (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                      blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) },\n                  snd :=\n                    { blocks := ofFn fun j => length (Sigma.snd i j),\n                      blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (Sigma.snd i j)) → 0 < k),\n                      blocks_sum :=\n                        (_ :\n                          sum (ofFn fun j => length (Sigma.snd i j)) =\n                            length\n                              { blocks := List.join (ofFn fun j => (Sigma.snd i j).blocks),\n                                blocks_pos :=\n                                  (_ : ∀ {i_1 : ℕ}, i_1 ∈ List.join (ofFn fun j => (Sigma.snd i j).blocks) → 0 < i_1),\n                                blocks_sum := (_ : sum (List.join (ofFn fun j => (Sigma.snd i j).blocks)) = n) }) } })\n              { fst := c, snd := d }))\n          i).blocks) =\n    ofFn fun i => (Sigma.snd { fst := c, snd := d } i).blocks\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\n⊢ (ofFn fun i =>\n      (sigmaCompositionAux\n          { blocks := List.join (ofFn fun j => (d j).blocks),\n            blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n            blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n          { blocks := ofFn fun j => length (d j),\n            blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n            blocks_sum :=\n              (_ :\n                sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }\n          i).blocks) =\n    ofFn fun i => (d i).blocks\n[PROOFSTEP]\ncongr! 1\n[GOAL]\ncase mk.h.e'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\n⊢ length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.h.e'_2.e_c\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\n⊢ gather\n      { blocks := List.join (ofFn fun j => (d j).blocks),\n        blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n        blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n      { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n        blocks_sum :=\n          (_ : sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) } =\n    c\n[PROOFSTEP]\next1\n[GOAL]\ncase mk.h.e'_2.e_c.blocks\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\n⊢ (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) =\n                List.length (List.join (ofFn fun j => (d j).blocks))) }).blocks =\n    c.blocks\n[PROOFSTEP]\ndsimp [Composition.gather]\n[GOAL]\ncase mk.h.e'_2.e_c.blocks\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\n⊢ List.map sum\n      (splitWrtComposition (List.join (ofFn fun j => (d j).blocks))\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    c.blocks\n[PROOFSTEP]\nrwa [splitWrtComposition_join]\n[GOAL]\ncase mk.h.e'_2.e_c.blocks.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\n⊢ List.map List.length (ofFn fun j => (d j).blocks) =\n    { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n        blocks_sum :=\n          (_ :\n            sum (ofFn fun j => List.length (d j).blocks) =\n              List.length (List.join (ofFn fun j => (d j).blocks))) }.blocks\n[PROOFSTEP]\nsimp only [map_ofFn]\n[GOAL]\ncase mk.h.e'_2.e_c.blocks.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\n⊢ ofFn (List.length ∘ fun j => (d j).blocks) = ofFn fun j => length (d j)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\ne_2✝ :\n  length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\n⊢ HEq\n    (fun i =>\n      (sigmaCompositionAux\n          { blocks := List.join (ofFn fun j => (d j).blocks),\n            blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n            blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n          { blocks := ofFn fun j => length (d j),\n            blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n            blocks_sum :=\n              (_ :\n                sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }\n          i).blocks)\n    fun i => (d i).blocks\n[PROOFSTEP]\nrw [Fin.heq_fun_iff]\n[GOAL]\ncase mk.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\ne_2✝ :\n  length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\n⊢ ∀\n    (i :\n      Fin\n        (length\n          (gather\n            { blocks := List.join (ofFn fun j => (d j).blocks),\n              blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n              blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n            { blocks := ofFn fun j => length (d j),\n              blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n              blocks_sum :=\n                (_ :\n                  sum (ofFn fun j => List.length (d j).blocks) =\n                    List.length (List.join (ofFn fun j => (d j).blocks))) }))),\n    (sigmaCompositionAux\n          { blocks := List.join (ofFn fun j => (d j).blocks),\n            blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n            blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n          { blocks := ofFn fun j => length (d j),\n            blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n            blocks_sum :=\n              (_ :\n                sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }\n          i).blocks =\n      (d { val := ↑i, isLt := (_ : ↑i < length c) }).blocks\ncase mk.h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\ne_2✝ :\n  length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\n⊢ length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mk.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\ne_2✝ :\n  length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\ni :\n  Fin\n    (length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }))\n⊢ (sigmaCompositionAux\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ : sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }\n        i).blocks =\n    (d { val := ↑i, isLt := (_ : ↑i < length c) }).blocks\ncase mk.h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\ne_2✝ :\n  length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\n⊢ length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\n[PROOFSTEP]\ndsimp [Composition.sigmaCompositionAux]\n[GOAL]\ncase mk.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\ne_2✝ :\n  length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\ni :\n  Fin\n    (length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }))\n⊢ List.get\n      (splitWrtComposition (List.join (ofFn fun j => (d j).blocks))\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ : sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) })\n      { val := ↑i,\n        isLt :=\n          (_ :\n            ↑i <\n              List.length\n                (splitWrtComposition\n                  { blocks := List.join (ofFn fun j => (d j).blocks),\n                      blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n                      blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }.blocks\n                  { blocks := ofFn fun j => length (d j),\n                    blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n                    blocks_sum :=\n                      (_ :\n                        sum (ofFn fun j => List.length (d j).blocks) =\n                          List.length (List.join (ofFn fun j => (d j).blocks))) })) } =\n    (d { val := ↑i, isLt := (_ : ↑i < length c) }).blocks\ncase mk.h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\ne_2✝ :\n  length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\n⊢ length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\n[PROOFSTEP]\nrw [get_of_eq (splitWrtComposition_join _ _ _)]\n[GOAL]\ncase mk.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\ne_2✝ :\n  length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\ni :\n  Fin\n    (length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }))\n⊢ List.get (ofFn fun j => (d j).blocks)\n      {\n        val :=\n          ↑{ val := ↑i,\n              isLt :=\n                (_ :\n                  ↑i <\n                    List.length\n                      (splitWrtComposition\n                        { blocks := List.join (ofFn fun j => (d j).blocks),\n                            blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n                            blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }.blocks\n                        { blocks := ofFn fun j => length (d j),\n                          blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n                          blocks_sum :=\n                            (_ :\n                              sum (ofFn fun j => List.length (d j).blocks) =\n                                List.length (List.join (ofFn fun j => (d j).blocks))) })) },\n        isLt :=\n          (_ :\n            ↑{ val := ↑i,\n                  isLt :=\n                    (_ :\n                      ↑i <\n                        List.length\n                          (splitWrtComposition\n                            { blocks := List.join (ofFn fun j => (d j).blocks),\n                                blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n                                blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }.blocks\n                            { blocks := ofFn fun j => length (d j),\n                              blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n                              blocks_sum :=\n                                (_ :\n                                  sum (ofFn fun j => List.length (d j).blocks) =\n                                    List.length (List.join (ofFn fun j => (d j).blocks))) })) } <\n              List.length (ofFn fun j => (d j).blocks)) } =\n    (d { val := ↑i, isLt := (_ : ↑i < length c) }).blocks\n[PROOFSTEP]\nsimp only [get_ofFn]\n[GOAL]\ncase mk.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\ne_2✝ :\n  length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\ni :\n  Fin\n    (length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }))\n⊢ (d\n        (↑(Fin.castIso (_ : List.length (ofFn fun j => (d j).blocks) = length c))\n          { val := ↑i, isLt := (_ : ↑i < List.length (ofFn fun j => (d j).blocks)) })).blocks =\n    (d { val := ↑i, isLt := (_ : ↑i < length c) }).blocks\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\ne_2✝ :\n  length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\n⊢ length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\n[PROOFSTEP]\ncongr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\ne_2✝ :\n  length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\ni :\n  Fin\n    (length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }))\n⊢ List.map List.length (ofFn fun j => (d j).blocks) =\n    { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n        blocks_sum :=\n          (_ :\n            sum (ofFn fun j => List.length (d j).blocks) =\n              List.length (List.join (ofFn fun j => (d j).blocks))) }.blocks\n[PROOFSTEP]\nsimp only [map_ofFn]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nn✝ n : ℕ\nc : Composition n\nd : (i : Fin (length c)) → Composition (blocksFun c i)\nthis : List.map sum (ofFn fun i => (d i).blocks) = c.blocks\ne_2✝ :\n  length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }) =\n    length c\ni :\n  Fin\n    (length\n      (gather\n        { blocks := List.join (ofFn fun j => (d j).blocks),\n          blocks_pos := (_ : ∀ {i : ℕ}, i ∈ List.join (ofFn fun j => (d j).blocks) → 0 < i),\n          blocks_sum := (_ : sum (List.join (ofFn fun j => (d j).blocks)) = n) }\n        { blocks := ofFn fun j => length (d j), blocks_pos := (_ : ∀ {k : ℕ}, (k ∈ ofFn fun j => length (d j)) → 0 < k),\n          blocks_sum :=\n            (_ :\n              sum (ofFn fun j => List.length (d j).blocks) = List.length (List.join (ofFn fun j => (d j).blocks))) }))\n⊢ ofFn (List.length ∘ fun j => (d j).blocks) = ofFn fun j => length (d j)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\n⊢ FormalMultilinearSeries.comp (FormalMultilinearSeries.comp r q) p =\n    FormalMultilinearSeries.comp r (FormalMultilinearSeries.comp q p)\n[PROOFSTEP]\next n v\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\n⊢ ↑(FormalMultilinearSeries.comp (FormalMultilinearSeries.comp r q) p n) v =\n    ↑(FormalMultilinearSeries.comp r (FormalMultilinearSeries.comp q p) n) v\n[PROOFSTEP]\nlet f : (Σ a : Composition n, Composition a.length) → H := fun c =>\n  r c.2.length (applyComposition q c.2 (applyComposition p c.1 v))\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\n⊢ ↑(FormalMultilinearSeries.comp (FormalMultilinearSeries.comp r q) p n) v =\n    ↑(FormalMultilinearSeries.comp r (FormalMultilinearSeries.comp q p) n) v\n[PROOFSTEP]\nlet g : (Σ c : Composition n, ∀ i : Fin c.length, Composition (c.blocksFun i)) → H := fun c =>\n  r c.1.length fun i : Fin c.1.length => q (c.2 i).length (applyComposition p (c.2 i) (v ∘ c.1.embedding i))\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\n⊢ ↑(FormalMultilinearSeries.comp (FormalMultilinearSeries.comp r q) p n) v =\n    ↑(FormalMultilinearSeries.comp r (FormalMultilinearSeries.comp q p) n) v\n[PROOFSTEP]\nsuffices ∑ c, f c = ∑ c, g c by\n  simpa only [FormalMultilinearSeries.comp, ContinuousMultilinearMap.sum_apply, compAlongComposition_apply,\n    Finset.sum_sigma', applyComposition, ContinuousMultilinearMap.map_sum]\n    /- Now, we use `composition.sigma_equiv_sigma_pi n` to change\n        variables in the second sum, and check that we get exactly the same sums. -/\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\nthis :\n  ∑ c : (a : Composition n) × Composition (Composition.length a), f c =\n    ∑ c : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)), g c\n⊢ ↑(FormalMultilinearSeries.comp (FormalMultilinearSeries.comp r q) p n) v =\n    ↑(FormalMultilinearSeries.comp r (FormalMultilinearSeries.comp q p) n) v\n[PROOFSTEP]\nsimpa only [FormalMultilinearSeries.comp, ContinuousMultilinearMap.sum_apply, compAlongComposition_apply,\n  Finset.sum_sigma', applyComposition, ContinuousMultilinearMap.map_sum]\n  /- Now, we use `composition.sigma_equiv_sigma_pi n` to change\n      variables in the second sum, and check that we get exactly the same sums. -/\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\n⊢ ∑ c : (a : Composition n) × Composition (Composition.length a), f c =\n    ∑ c : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)), g c\n[PROOFSTEP]\nrw [← (sigmaEquivSigmaPi n).sum_comp]\n  /- To check that we have the same terms, we should check that we apply the same component of\n      `r`, and the same component of `q`, and the same component of `p`, to the same coordinate of\n      `v`. This is true by definition, but at each step one needs to convince Lean that the types\n      one considers are the same, using a suitable congruence lemma to avoid dependent type issues.\n      This dance has to be done three times, one for `r`, one for `q` and one for `p`.-/\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\n⊢ ∑ c : (a : Composition n) × Composition (Composition.length a), f c =\n    ∑ i : (a : Composition n) × Composition (Composition.length a), g (↑(sigmaEquivSigmaPi n) i)\n[PROOFSTEP]\napply Finset.sum_congr rfl\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\n⊢ ∀ (x : (a : Composition n) × Composition (Composition.length a)), x ∈ Finset.univ → f x = g (↑(sigmaEquivSigmaPi n) x)\n[PROOFSTEP]\nrintro ⟨a, b⟩ _\n[GOAL]\ncase h.H.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\na : Composition n\nb : Composition (Composition.length a)\na✝ : { fst := a, snd := b } ∈ Finset.univ\n⊢ f { fst := a, snd := b } = g (↑(sigmaEquivSigmaPi n) { fst := a, snd := b })\n[PROOFSTEP]\ndsimp [sigmaEquivSigmaPi]\n  -- check that the `r` components are the same. Based on `composition.length_gather`\n[GOAL]\ncase h.H.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\na : Composition n\nb : Composition (Composition.length a)\na✝ : { fst := a, snd := b } ∈ Finset.univ\n⊢ ↑(r (Composition.length b)) (applyComposition q b (applyComposition p a v)) =\n    ↑(r (Composition.length (gather a b))) fun i =>\n      ↑(q (Composition.length (sigmaCompositionAux a b i)))\n        (applyComposition p (sigmaCompositionAux a b i) (v ∘ ↑(embedding (gather a b) i)))\n[PROOFSTEP]\napply r.congr (Composition.length_gather a b).symm\n[GOAL]\ncase h.H.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\na : Composition n\nb : Composition (Composition.length a)\na✝ : { fst := a, snd := b } ∈ Finset.univ\n⊢ ∀ (i : ℕ) (him : i < Composition.length b) (hin : i < Composition.length (gather a b)),\n    applyComposition q b (applyComposition p a v) { val := i, isLt := him } =\n      ↑(q (Composition.length (sigmaCompositionAux a b { val := i, isLt := hin })))\n        (applyComposition p (sigmaCompositionAux a b { val := i, isLt := hin })\n          (v ∘ ↑(embedding (gather a b) { val := i, isLt := hin })))\n[PROOFSTEP]\nintro i hi1 hi2\n[GOAL]\ncase h.H.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\na : Composition n\nb : Composition (Composition.length a)\na✝ : { fst := a, snd := b } ∈ Finset.univ\ni : ℕ\nhi1 : i < Composition.length b\nhi2 : i < Composition.length (gather a b)\n⊢ applyComposition q b (applyComposition p a v) { val := i, isLt := hi1 } =\n    ↑(q (Composition.length (sigmaCompositionAux a b { val := i, isLt := hi2 })))\n      (applyComposition p (sigmaCompositionAux a b { val := i, isLt := hi2 })\n        (v ∘ ↑(embedding (gather a b) { val := i, isLt := hi2 })))\n[PROOFSTEP]\napply q.congr (length_sigmaCompositionAux a b _).symm\n[GOAL]\ncase h.H.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\na : Composition n\nb : Composition (Composition.length a)\na✝ : { fst := a, snd := b } ∈ Finset.univ\ni : ℕ\nhi1 : i < Composition.length b\nhi2 : i < Composition.length (gather a b)\n⊢ ∀ (i_1 : ℕ) (him : i_1 < blocksFun b { val := i, isLt := hi1 })\n    (hin :\n      i_1 <\n        Composition.length\n          (sigmaCompositionAux a b\n            { val := ↑{ val := i, isLt := hi1 },\n              isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })),\n    (applyComposition p a v ∘ ↑(embedding b { val := i, isLt := hi1 })) { val := i_1, isLt := him } =\n      applyComposition p (sigmaCompositionAux a b { val := i, isLt := hi2 })\n        (v ∘ ↑(embedding (gather a b) { val := i, isLt := hi2 })) { val := i_1, isLt := hin }\n[PROOFSTEP]\nintro j hj1 hj2\n[GOAL]\ncase h.H.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\na : Composition n\nb : Composition (Composition.length a)\na✝ : { fst := a, snd := b } ∈ Finset.univ\ni : ℕ\nhi1 : i < Composition.length b\nhi2 : i < Composition.length (gather a b)\nj : ℕ\nhj1 : j < blocksFun b { val := i, isLt := hi1 }\nhj2 :\n  j <\n    Composition.length\n      (sigmaCompositionAux a b\n        { val := ↑{ val := i, isLt := hi1 },\n          isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })\n⊢ (applyComposition p a v ∘ ↑(embedding b { val := i, isLt := hi1 })) { val := j, isLt := hj1 } =\n    applyComposition p (sigmaCompositionAux a b { val := i, isLt := hi2 })\n      (v ∘ ↑(embedding (gather a b) { val := i, isLt := hi2 })) { val := j, isLt := hj2 }\n[PROOFSTEP]\napply p.congr (blocksFun_sigmaCompositionAux a b _ _).symm\n[GOAL]\ncase h.H.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\na : Composition n\nb : Composition (Composition.length a)\na✝ : { fst := a, snd := b } ∈ Finset.univ\ni : ℕ\nhi1 : i < Composition.length b\nhi2 : i < Composition.length (gather a b)\nj : ℕ\nhj1 : j < blocksFun b { val := i, isLt := hi1 }\nhj2 :\n  j <\n    Composition.length\n      (sigmaCompositionAux a b\n        { val := ↑{ val := i, isLt := hi1 },\n          isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })\n⊢ ∀ (i_1 : ℕ) (him : i_1 < blocksFun a (↑(embedding b { val := i, isLt := hi1 }) { val := j, isLt := hj1 }))\n    (hin :\n      i_1 <\n        blocksFun\n          (sigmaCompositionAux a b\n            { val := ↑{ val := i, isLt := hi1 },\n              isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })\n          { val := ↑{ val := j, isLt := hj1 },\n            isLt :=\n              (_ :\n                ↑{ val := j, isLt := hj1 } <\n                  Composition.length\n                    (sigmaCompositionAux a b\n                      { val := ↑{ val := i, isLt := hi1 },\n                        isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })) }),\n    (v ∘ ↑(embedding a (↑(embedding b { val := i, isLt := hi1 }) { val := j, isLt := hj1 })))\n        { val := i_1, isLt := him } =\n      ((v ∘ ↑(embedding (gather a b) { val := i, isLt := hi2 })) ∘\n          ↑(embedding (sigmaCompositionAux a b { val := i, isLt := hi2 }) { val := j, isLt := hj2 }))\n        { val := i_1, isLt := hin }\n[PROOFSTEP]\nintro k hk1 hk2\n[GOAL]\ncase h.H.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\na : Composition n\nb : Composition (Composition.length a)\na✝ : { fst := a, snd := b } ∈ Finset.univ\ni : ℕ\nhi1 : i < Composition.length b\nhi2 : i < Composition.length (gather a b)\nj : ℕ\nhj1 : j < blocksFun b { val := i, isLt := hi1 }\nhj2 :\n  j <\n    Composition.length\n      (sigmaCompositionAux a b\n        { val := ↑{ val := i, isLt := hi1 },\n          isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })\nk : ℕ\nhk1 : k < blocksFun a (↑(embedding b { val := i, isLt := hi1 }) { val := j, isLt := hj1 })\nhk2 :\n  k <\n    blocksFun\n      (sigmaCompositionAux a b\n        { val := ↑{ val := i, isLt := hi1 },\n          isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })\n      { val := ↑{ val := j, isLt := hj1 },\n        isLt :=\n          (_ :\n            ↑{ val := j, isLt := hj1 } <\n              Composition.length\n                (sigmaCompositionAux a b\n                  { val := ↑{ val := i, isLt := hi1 },\n                    isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })) }\n⊢ (v ∘ ↑(embedding a (↑(embedding b { val := i, isLt := hi1 }) { val := j, isLt := hj1 }))) { val := k, isLt := hk1 } =\n    ((v ∘ ↑(embedding (gather a b) { val := i, isLt := hi2 })) ∘\n        ↑(embedding (sigmaCompositionAux a b { val := i, isLt := hi2 }) { val := j, isLt := hj2 }))\n      { val := k, isLt := hk2 }\n[PROOFSTEP]\nrefine' congr_arg v (Fin.eq_of_veq _)\n[GOAL]\ncase h.H.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\na : Composition n\nb : Composition (Composition.length a)\na✝ : { fst := a, snd := b } ∈ Finset.univ\ni : ℕ\nhi1 : i < Composition.length b\nhi2 : i < Composition.length (gather a b)\nj : ℕ\nhj1 : j < blocksFun b { val := i, isLt := hi1 }\nhj2 :\n  j <\n    Composition.length\n      (sigmaCompositionAux a b\n        { val := ↑{ val := i, isLt := hi1 },\n          isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })\nk : ℕ\nhk1 : k < blocksFun a (↑(embedding b { val := i, isLt := hi1 }) { val := j, isLt := hj1 })\nhk2 :\n  k <\n    blocksFun\n      (sigmaCompositionAux a b\n        { val := ↑{ val := i, isLt := hi1 },\n          isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })\n      { val := ↑{ val := j, isLt := hj1 },\n        isLt :=\n          (_ :\n            ↑{ val := j, isLt := hj1 } <\n              Composition.length\n                (sigmaCompositionAux a b\n                  { val := ↑{ val := i, isLt := hi1 },\n                    isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })) }\n⊢ ↑(↑(embedding a (↑(embedding b { val := i, isLt := hi1 }) { val := j, isLt := hj1 })) { val := k, isLt := hk1 }) =\n    ↑(↑(embedding (gather a b) { val := i, isLt := hi2 })\n        (↑(embedding (sigmaCompositionAux a b { val := i, isLt := hi2 }) { val := j, isLt := hj2 })\n          { val := k, isLt := hk2 }))\n[PROOFSTEP]\ndsimp [Composition.embedding]\n[GOAL]\ncase h.H.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nH : Type u_5\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nr : FormalMultilinearSeries 𝕜 G H\nq : FormalMultilinearSeries 𝕜 F G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nv : Fin n → E\nf : (a : Composition n) × Composition (Composition.length a) → H :=\n  fun c => ↑(r (Composition.length c.snd)) (applyComposition q c.snd (applyComposition p c.fst v))\ng : (c : Composition n) × ((i : Fin (Composition.length c)) → Composition (blocksFun c i)) → H :=\n  fun c =>\n    ↑(r (Composition.length c.fst)) fun i =>\n      ↑(q (Composition.length (Sigma.snd c i))) (applyComposition p (Sigma.snd c i) (v ∘ ↑(embedding c.fst i)))\na : Composition n\nb : Composition (Composition.length a)\na✝ : { fst := a, snd := b } ∈ Finset.univ\ni : ℕ\nhi1 : i < Composition.length b\nhi2 : i < Composition.length (gather a b)\nj : ℕ\nhj1 : j < blocksFun b { val := i, isLt := hi1 }\nhj2 :\n  j <\n    Composition.length\n      (sigmaCompositionAux a b\n        { val := ↑{ val := i, isLt := hi1 },\n          isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })\nk : ℕ\nhk1 : k < blocksFun a (↑(embedding b { val := i, isLt := hi1 }) { val := j, isLt := hj1 })\nhk2 :\n  k <\n    blocksFun\n      (sigmaCompositionAux a b\n        { val := ↑{ val := i, isLt := hi1 },\n          isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })\n      { val := ↑{ val := j, isLt := hj1 },\n        isLt :=\n          (_ :\n            ↑{ val := j, isLt := hj1 } <\n              Composition.length\n                (sigmaCompositionAux a b\n                  { val := ↑{ val := i, isLt := hi1 },\n                    isLt := (_ : ↑{ val := i, isLt := hi1 } < Composition.length (gather a b)) })) }\n⊢ sizeUpTo a (sizeUpTo b i + j) + k =\n    sizeUpTo (gather a b) i + (sizeUpTo (sigmaCompositionAux a b { val := i, isLt := hi2 }) j + k)\n[PROOFSTEP]\nrw [sizeUpTo_sizeUpTo_add _ _ hi1 hj1, add_assoc]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Analytic.Composition", "llama_tokens": 207168, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506635289836, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.389237574907022}}
{"text": "[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\n⊢ L ⧸ I → L ⧸ I → L ⧸ I\n[PROOFSTEP]\nintro x y\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx y : L ⧸ I\n⊢ L ⧸ I\n[PROOFSTEP]\napply Quotient.liftOn₂' x y fun x' y' => mk ⁅x', y'⁆\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx y : L ⧸ I\n⊢ ∀ (a₁ a₂ b₁ b₂ : L), Setoid.r a₁ b₁ → Setoid.r a₂ b₂ → mk ⁅a₁, a₂⁆ = mk ⁅b₁, b₂⁆\n[PROOFSTEP]\nintro x₁ x₂ y₁ y₂ h₁ h₂\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx y : L ⧸ I\nx₁ x₂ y₁ y₂ : L\nh₁ : Setoid.r x₁ y₁\nh₂ : Setoid.r x₂ y₂\n⊢ mk ⁅x₁, x₂⁆ = mk ⁅y₁, y₂⁆\n[PROOFSTEP]\napply (Submodule.Quotient.eq I.toSubmodule).2\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx y : L ⧸ I\nx₁ x₂ y₁ y₂ : L\nh₁ : Setoid.r x₁ y₁\nh₂ : Setoid.r x₂ y₂\n⊢ ⁅x₁, x₂⁆ - ⁅y₁, y₂⁆ ∈ ↑I\n[PROOFSTEP]\nrw [Submodule.quotientRel_r_def] at h₁ h₂ \n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx y : L ⧸ I\nx₁ x₂ y₁ y₂ : L\nh₁ : x₁ - y₁ ∈ ↑I\nh₂ : x₂ - y₂ ∈ ↑I\n⊢ ⁅x₁, x₂⁆ - ⁅y₁, y₂⁆ ∈ ↑I\n[PROOFSTEP]\nhave h : ⁅x₁, x₂⁆ - ⁅y₁, y₂⁆ = ⁅x₁, x₂ - y₂⁆ + ⁅x₁ - y₁, y₂⁆ := by simp [-lie_skew, sub_eq_add_neg, add_assoc]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx y : L ⧸ I\nx₁ x₂ y₁ y₂ : L\nh₁ : x₁ - y₁ ∈ ↑I\nh₂ : x₂ - y₂ ∈ ↑I\n⊢ ⁅x₁, x₂⁆ - ⁅y₁, y₂⁆ = ⁅x₁, x₂ - y₂⁆ + ⁅x₁ - y₁, y₂⁆\n[PROOFSTEP]\nsimp [-lie_skew, sub_eq_add_neg, add_assoc]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx y : L ⧸ I\nx₁ x₂ y₁ y₂ : L\nh₁ : x₁ - y₁ ∈ ↑I\nh₂ : x₂ - y₂ ∈ ↑I\nh : ⁅x₁, x₂⁆ - ⁅y₁, y₂⁆ = ⁅x₁, x₂ - y₂⁆ + ⁅x₁ - y₁, y₂⁆\n⊢ ⁅x₁, x₂⁆ - ⁅y₁, y₂⁆ ∈ ↑I\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx y : L ⧸ I\nx₁ x₂ y₁ y₂ : L\nh₁ : x₁ - y₁ ∈ ↑I\nh₂ : x₂ - y₂ ∈ ↑I\nh : ⁅x₁, x₂⁆ - ⁅y₁, y₂⁆ = ⁅x₁, x₂ - y₂⁆ + ⁅x₁ - y₁, y₂⁆\n⊢ ⁅x₁, x₂ - y₂⁆ + ⁅x₁ - y₁, y₂⁆ ∈ ↑I\n[PROOFSTEP]\napply Submodule.add_mem\n[GOAL]\ncase h₁\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx y : L ⧸ I\nx₁ x₂ y₁ y₂ : L\nh₁ : x₁ - y₁ ∈ ↑I\nh₂ : x₂ - y₂ ∈ ↑I\nh : ⁅x₁, x₂⁆ - ⁅y₁, y₂⁆ = ⁅x₁, x₂ - y₂⁆ + ⁅x₁ - y₁, y₂⁆\n⊢ ⁅x₁, x₂ - y₂⁆ ∈ ↑I\n[PROOFSTEP]\napply lie_mem_right R L I x₁ (x₂ - y₂) h₂\n[GOAL]\ncase h₂\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx y : L ⧸ I\nx₁ x₂ y₁ y₂ : L\nh₁ : x₁ - y₁ ∈ ↑I\nh₂ : x₂ - y₂ ∈ ↑I\nh : ⁅x₁, x₂⁆ - ⁅y₁, y₂⁆ = ⁅x₁, x₂ - y₂⁆ + ⁅x₁ - y₁, y₂⁆\n⊢ ⁅x₁ - y₁, y₂⁆ ∈ ↑I\n[PROOFSTEP]\napply lie_mem_left R L I (x₁ - y₁) y₂ h₁\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\n⊢ ∀ (x y z : L ⧸ I), ⁅x + y, z⁆ = ⁅x, z⁆ + ⁅y, z⁆\n[PROOFSTEP]\nintro x' y' z'\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\n⊢ ⁅x' + y', z'⁆ = ⁅x', z'⁆ + ⁅y', z'⁆\n[PROOFSTEP]\nrefine Quotient.inductionOn₃' x' y' z' ?_\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\n⊢ ∀ (a₁ a₂ a₃ : L),\n    ⁅Quotient.mk'' a₁ + Quotient.mk'' a₂, Quotient.mk'' a₃⁆ =\n      ⁅Quotient.mk'' a₁, Quotient.mk'' a₃⁆ + ⁅Quotient.mk'' a₂, Quotient.mk'' a₃⁆\n[PROOFSTEP]\nintro x y z\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅Quotient.mk'' x + Quotient.mk'' y, Quotient.mk'' z⁆ =\n    ⁅Quotient.mk'' x, Quotient.mk'' z⁆ + ⁅Quotient.mk'' y, Quotient.mk'' z⁆\n[PROOFSTEP]\nrepeat'\n  first\n  | rw [is_quotient_mk]\n  | rw [← mk_bracket]\n  | rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅Quotient.mk'' x + Quotient.mk'' y, Quotient.mk'' z⁆ =\n    ⁅Quotient.mk'' x, Quotient.mk'' z⁆ + ⁅Quotient.mk'' y, Quotient.mk'' z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅Quotient.mk'' x + Quotient.mk'' y, Quotient.mk'' z⁆ =\n    ⁅Quotient.mk'' x, Quotient.mk'' z⁆ + ⁅Quotient.mk'' y, Quotient.mk'' z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + Quotient.mk'' y, Quotient.mk'' z⁆ = ⁅mk x, Quotient.mk'' z⁆ + ⁅Quotient.mk'' y, Quotient.mk'' z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + Quotient.mk'' y, Quotient.mk'' z⁆ = ⁅mk x, Quotient.mk'' z⁆ + ⁅Quotient.mk'' y, Quotient.mk'' z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + mk y, Quotient.mk'' z⁆ = ⁅mk x, Quotient.mk'' z⁆ + ⁅mk y, Quotient.mk'' z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + mk y, Quotient.mk'' z⁆ = ⁅mk x, Quotient.mk'' z⁆ + ⁅mk y, Quotient.mk'' z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + mk y, mk z⁆ = ⁅mk x, mk z⁆ + ⁅mk y, mk z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + mk y, mk z⁆ = ⁅mk x, mk z⁆ + ⁅mk y, mk z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + mk y, mk z⁆ = ⁅mk x, mk z⁆ + ⁅mk y, mk z⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + mk y, mk z⁆ = mk ⁅x, z⁆ + ⁅mk y, mk z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + mk y, mk z⁆ = mk ⁅x, z⁆ + ⁅mk y, mk z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + mk y, mk z⁆ = mk ⁅x, z⁆ + ⁅mk y, mk z⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + mk y, mk z⁆ = mk ⁅x, z⁆ + mk ⁅y, z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + mk y, mk z⁆ = mk ⁅x, z⁆ + mk ⁅y, z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + mk y, mk z⁆ = mk ⁅x, z⁆ + mk ⁅y, z⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x + mk y, mk z⁆ = mk ⁅x, z⁆ + mk ⁅y, z⁆\n[PROOFSTEP]\nrw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅Submodule.Quotient.mk (x + y), mk z⁆ = mk ⁅x, z⁆ + mk ⁅y, z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅Submodule.Quotient.mk (x + y), mk z⁆ = mk ⁅x, z⁆ + mk ⁅y, z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅Submodule.Quotient.mk (x + y), mk z⁆ = mk ⁅x, z⁆ + mk ⁅y, z⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x + y, z⁆ = mk ⁅x, z⁆ + mk ⁅y, z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x + y, z⁆ = mk ⁅x, z⁆ + mk ⁅y, z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x + y, z⁆ = mk ⁅x, z⁆ + mk ⁅y, z⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x + y, z⁆ = mk ⁅x, z⁆ + mk ⁅y, z⁆\n[PROOFSTEP]\nrw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x + y, z⁆ = Submodule.Quotient.mk (⁅x, z⁆ + ⁅y, z⁆)\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x + y, z⁆ = Submodule.Quotient.mk (⁅x, z⁆ + ⁅y, z⁆)\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x + y, z⁆ = Submodule.Quotient.mk (⁅x, z⁆ + ⁅y, z⁆)\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x + y, z⁆ = Submodule.Quotient.mk (⁅x, z⁆ + ⁅y, z⁆)\n[PROOFSTEP]\nrw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x + y, z⁆ = Submodule.Quotient.mk (⁅x, z⁆ + ⁅y, z⁆)\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅x + y, z⁆ = ⁅x, z⁆ + ⁅y, z⁆\n[PROOFSTEP]\napply add_lie\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\n⊢ ∀ (x y z : L ⧸ I), ⁅x, y + z⁆ = ⁅x, y⁆ + ⁅x, z⁆\n[PROOFSTEP]\nintro x' y' z'\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\n⊢ ⁅x', y' + z'⁆ = ⁅x', y'⁆ + ⁅x', z'⁆\n[PROOFSTEP]\nrefine Quotient.inductionOn₃' x' y' z' ?_\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\n⊢ ∀ (a₁ a₂ a₃ : L),\n    ⁅Quotient.mk'' a₁, Quotient.mk'' a₂ + Quotient.mk'' a₃⁆ =\n      ⁅Quotient.mk'' a₁, Quotient.mk'' a₂⁆ + ⁅Quotient.mk'' a₁, Quotient.mk'' a₃⁆\n[PROOFSTEP]\nintro x y z\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅Quotient.mk'' x, Quotient.mk'' y + Quotient.mk'' z⁆ =\n    ⁅Quotient.mk'' x, Quotient.mk'' y⁆ + ⁅Quotient.mk'' x, Quotient.mk'' z⁆\n[PROOFSTEP]\nrepeat'\n  first\n  | rw [is_quotient_mk]\n  | rw [← mk_bracket]\n  | rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅Quotient.mk'' x, Quotient.mk'' y + Quotient.mk'' z⁆ =\n    ⁅Quotient.mk'' x, Quotient.mk'' y⁆ + ⁅Quotient.mk'' x, Quotient.mk'' z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅Quotient.mk'' x, Quotient.mk'' y + Quotient.mk'' z⁆ =\n    ⁅Quotient.mk'' x, Quotient.mk'' y⁆ + ⁅Quotient.mk'' x, Quotient.mk'' z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, Quotient.mk'' y + Quotient.mk'' z⁆ = ⁅mk x, Quotient.mk'' y⁆ + ⁅mk x, Quotient.mk'' z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, Quotient.mk'' y + Quotient.mk'' z⁆ = ⁅mk x, Quotient.mk'' y⁆ + ⁅mk x, Quotient.mk'' z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk y + Quotient.mk'' z⁆ = ⁅mk x, mk y⁆ + ⁅mk x, Quotient.mk'' z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk y + Quotient.mk'' z⁆ = ⁅mk x, mk y⁆ + ⁅mk x, Quotient.mk'' z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk y + mk z⁆ = ⁅mk x, mk y⁆ + ⁅mk x, mk z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk y + mk z⁆ = ⁅mk x, mk y⁆ + ⁅mk x, mk z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk y + mk z⁆ = ⁅mk x, mk y⁆ + ⁅mk x, mk z⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk y + mk z⁆ = mk ⁅x, y⁆ + ⁅mk x, mk z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk y + mk z⁆ = mk ⁅x, y⁆ + ⁅mk x, mk z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk y + mk z⁆ = mk ⁅x, y⁆ + ⁅mk x, mk z⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk y + mk z⁆ = mk ⁅x, y⁆ + mk ⁅x, z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk y + mk z⁆ = mk ⁅x, y⁆ + mk ⁅x, z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk y + mk z⁆ = mk ⁅x, y⁆ + mk ⁅x, z⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk y + mk z⁆ = mk ⁅x, y⁆ + mk ⁅x, z⁆\n[PROOFSTEP]\nrw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, Submodule.Quotient.mk (y + z)⁆ = mk ⁅x, y⁆ + mk ⁅x, z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, Submodule.Quotient.mk (y + z)⁆ = mk ⁅x, y⁆ + mk ⁅x, z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, Submodule.Quotient.mk (y + z)⁆ = mk ⁅x, y⁆ + mk ⁅x, z⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, y + z⁆ = mk ⁅x, y⁆ + mk ⁅x, z⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, y + z⁆ = mk ⁅x, y⁆ + mk ⁅x, z⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, y + z⁆ = mk ⁅x, y⁆ + mk ⁅x, z⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, y + z⁆ = mk ⁅x, y⁆ + mk ⁅x, z⁆\n[PROOFSTEP]\nrw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, y + z⁆ = Submodule.Quotient.mk (⁅x, y⁆ + ⁅x, z⁆)\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, y + z⁆ = Submodule.Quotient.mk (⁅x, y⁆ + ⁅x, z⁆)\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, y + z⁆ = Submodule.Quotient.mk (⁅x, y⁆ + ⁅x, z⁆)\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, y + z⁆ = Submodule.Quotient.mk (⁅x, y⁆ + ⁅x, z⁆)\n[PROOFSTEP]\nrw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, y + z⁆ = Submodule.Quotient.mk (⁅x, y⁆ + ⁅x, z⁆)\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅x, y + z⁆ = ⁅x, y⁆ + ⁅x, z⁆\n[PROOFSTEP]\napply lie_add\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\n⊢ ∀ (x : L ⧸ I), ⁅x, x⁆ = 0\n[PROOFSTEP]\nintro x'\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' : L ⧸ I\n⊢ ⁅x', x'⁆ = 0\n[PROOFSTEP]\nrefine Quotient.inductionOn' x' ?_\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' : L ⧸ I\n⊢ ∀ (a : L), ⁅Quotient.mk'' a, Quotient.mk'' a⁆ = 0\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' : L ⧸ I\nx : L\n⊢ ⁅Quotient.mk'' x, Quotient.mk'' x⁆ = 0\n[PROOFSTEP]\nrw [is_quotient_mk, ← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' : L ⧸ I\nx : L\n⊢ mk ⁅x, x⁆ = 0\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' : L ⧸ I\nx : L\n⊢ ⁅x, x⁆ = 0\n[PROOFSTEP]\napply lie_self\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\n⊢ ∀ (x y z : L ⧸ I), ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆\n[PROOFSTEP]\nintro x' y' z'\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\n⊢ ⁅x', ⁅y', z'⁆⁆ = ⁅⁅x', y'⁆, z'⁆ + ⁅y', ⁅x', z'⁆⁆\n[PROOFSTEP]\nrefine Quotient.inductionOn₃' x' y' z' ?_\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\n⊢ ∀ (a₁ a₂ a₃ : L),\n    ⁅Quotient.mk'' a₁, ⁅Quotient.mk'' a₂, Quotient.mk'' a₃⁆⁆ =\n      ⁅⁅Quotient.mk'' a₁, Quotient.mk'' a₂⁆, Quotient.mk'' a₃⁆ +\n        ⁅Quotient.mk'' a₂, ⁅Quotient.mk'' a₁, Quotient.mk'' a₃⁆⁆\n[PROOFSTEP]\nintro x y z\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅Quotient.mk'' x, ⁅Quotient.mk'' y, Quotient.mk'' z⁆⁆ =\n    ⁅⁅Quotient.mk'' x, Quotient.mk'' y⁆, Quotient.mk'' z⁆ + ⁅Quotient.mk'' y, ⁅Quotient.mk'' x, Quotient.mk'' z⁆⁆\n[PROOFSTEP]\nrepeat'\n  first\n  | rw [is_quotient_mk]\n  | rw [← mk_bracket]\n  | rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅Quotient.mk'' x, ⁅Quotient.mk'' y, Quotient.mk'' z⁆⁆ =\n    ⁅⁅Quotient.mk'' x, Quotient.mk'' y⁆, Quotient.mk'' z⁆ + ⁅Quotient.mk'' y, ⁅Quotient.mk'' x, Quotient.mk'' z⁆⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅Quotient.mk'' x, ⁅Quotient.mk'' y, Quotient.mk'' z⁆⁆ =\n    ⁅⁅Quotient.mk'' x, Quotient.mk'' y⁆, Quotient.mk'' z⁆ + ⁅Quotient.mk'' y, ⁅Quotient.mk'' x, Quotient.mk'' z⁆⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, ⁅Quotient.mk'' y, Quotient.mk'' z⁆⁆ =\n    ⁅⁅mk x, Quotient.mk'' y⁆, Quotient.mk'' z⁆ + ⁅Quotient.mk'' y, ⁅mk x, Quotient.mk'' z⁆⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, ⁅Quotient.mk'' y, Quotient.mk'' z⁆⁆ =\n    ⁅⁅mk x, Quotient.mk'' y⁆, Quotient.mk'' z⁆ + ⁅Quotient.mk'' y, ⁅mk x, Quotient.mk'' z⁆⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, ⁅mk y, Quotient.mk'' z⁆⁆ = ⁅⁅mk x, mk y⁆, Quotient.mk'' z⁆ + ⁅mk y, ⁅mk x, Quotient.mk'' z⁆⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, ⁅mk y, Quotient.mk'' z⁆⁆ = ⁅⁅mk x, mk y⁆, Quotient.mk'' z⁆ + ⁅mk y, ⁅mk x, Quotient.mk'' z⁆⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, ⁅mk y, mk z⁆⁆ = ⁅⁅mk x, mk y⁆, mk z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, ⁅mk y, mk z⁆⁆ = ⁅⁅mk x, mk y⁆, mk z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, ⁅mk y, mk z⁆⁆ = ⁅⁅mk x, mk y⁆, mk z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk ⁅y, z⁆⁆ = ⁅⁅mk x, mk y⁆, mk z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk ⁅y, z⁆⁆ = ⁅⁅mk x, mk y⁆, mk z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅mk x, mk ⁅y, z⁆⁆ = ⁅⁅mk x, mk y⁆, mk z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = ⁅⁅mk x, mk y⁆, mk z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = ⁅⁅mk x, mk y⁆, mk z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = ⁅⁅mk x, mk y⁆, mk z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = ⁅mk ⁅x, y⁆, mk z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = ⁅mk ⁅x, y⁆, mk z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = ⁅mk ⁅x, y⁆, mk z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = mk ⁅⁅x, y⁆, z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = mk ⁅⁅x, y⁆, z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = mk ⁅⁅x, y⁆, z⁆ + ⁅mk y, ⁅mk x, mk z⁆⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = mk ⁅⁅x, y⁆, z⁆ + ⁅mk y, mk ⁅x, z⁆⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = mk ⁅⁅x, y⁆, z⁆ + ⁅mk y, mk ⁅x, z⁆⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = mk ⁅⁅x, y⁆, z⁆ + ⁅mk y, mk ⁅x, z⁆⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = mk ⁅⁅x, y⁆, z⁆ + mk ⁅y, ⁅x, z⁆⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = mk ⁅⁅x, y⁆, z⁆ + mk ⁅y, ⁅x, z⁆⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = mk ⁅⁅x, y⁆, z⁆ + mk ⁅y, ⁅x, z⁆⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = mk ⁅⁅x, y⁆, z⁆ + mk ⁅y, ⁅x, z⁆⁆\n[PROOFSTEP]\nrw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = Submodule.Quotient.mk (⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆)\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = Submodule.Quotient.mk (⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆)\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = Submodule.Quotient.mk (⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆)\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = Submodule.Quotient.mk (⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆)\n[PROOFSTEP]\nrw [← Submodule.Quotient.mk_add (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ mk ⁅x, ⁅y, z⁆⁆ = Submodule.Quotient.mk (⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆)\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nx' y' z' : L ⧸ I\nx y z : L\n⊢ ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆\n[PROOFSTEP]\napply leibniz_lie\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\n⊢ ∀ (t : R) (x y : L ⧸ I), ⁅x, t • y⁆ = t • ⁅x, y⁆\n[PROOFSTEP]\nintro t x' y'\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\n⊢ ⁅x', t • y'⁆ = t • ⁅x', y'⁆\n[PROOFSTEP]\nrefine Quotient.inductionOn₂' x' y' ?_\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\n⊢ ∀ (a₁ a₂ : L), ⁅Quotient.mk'' a₁, t • Quotient.mk'' a₂⁆ = t • ⁅Quotient.mk'' a₁, Quotient.mk'' a₂⁆\n[PROOFSTEP]\nintro x y\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅Quotient.mk'' x, t • Quotient.mk'' y⁆ = t • ⁅Quotient.mk'' x, Quotient.mk'' y⁆\n[PROOFSTEP]\nrepeat'\n  first\n  | rw [is_quotient_mk]\n  | rw [← mk_bracket]\n  | rw [← Submodule.Quotient.mk_smul (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅Quotient.mk'' x, t • Quotient.mk'' y⁆ = t • ⁅Quotient.mk'' x, Quotient.mk'' y⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_smul (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅Quotient.mk'' x, t • Quotient.mk'' y⁆ = t • ⁅Quotient.mk'' x, Quotient.mk'' y⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅mk x, t • Quotient.mk'' y⁆ = t • ⁅mk x, Quotient.mk'' y⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_smul (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅mk x, t • Quotient.mk'' y⁆ = t • ⁅mk x, Quotient.mk'' y⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅mk x, t • mk y⁆ = t • ⁅mk x, mk y⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_smul (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅mk x, t • mk y⁆ = t • ⁅mk x, mk y⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅mk x, t • mk y⁆ = t • ⁅mk x, mk y⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅mk x, t • mk y⁆ = t • mk ⁅x, y⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_smul (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅mk x, t • mk y⁆ = t • mk ⁅x, y⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅mk x, t • mk y⁆ = t • mk ⁅x, y⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅mk x, t • mk y⁆ = t • mk ⁅x, y⁆\n[PROOFSTEP]\nrw [← Submodule.Quotient.mk_smul (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅mk x, Submodule.Quotient.mk (t • y)⁆ = t • mk ⁅x, y⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_smul (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅mk x, Submodule.Quotient.mk (t • y)⁆ = t • mk ⁅x, y⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅mk x, Submodule.Quotient.mk (t • y)⁆ = t • mk ⁅x, y⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ mk ⁅x, t • y⁆ = t • mk ⁅x, y⁆\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_smul (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ mk ⁅x, t • y⁆ = t • mk ⁅x, y⁆\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ mk ⁅x, t • y⁆ = t • mk ⁅x, y⁆\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ mk ⁅x, t • y⁆ = t • mk ⁅x, y⁆\n[PROOFSTEP]\nrw [← Submodule.Quotient.mk_smul (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ mk ⁅x, t • y⁆ = Submodule.Quotient.mk (t • ⁅x, y⁆)\n[PROOFSTEP]\nfirst\n| rw [is_quotient_mk]\n| rw [← mk_bracket]\n| rw [← Submodule.Quotient.mk_smul (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ mk ⁅x, t • y⁆ = Submodule.Quotient.mk (t • ⁅x, y⁆)\n[PROOFSTEP]\nrw [is_quotient_mk]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ mk ⁅x, t • y⁆ = Submodule.Quotient.mk (t • ⁅x, y⁆)\n[PROOFSTEP]\nrw [← mk_bracket]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ mk ⁅x, t • y⁆ = Submodule.Quotient.mk (t • ⁅x, y⁆)\n[PROOFSTEP]\nrw [← Submodule.Quotient.mk_smul (R := R) (M := L)]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ mk ⁅x, t • y⁆ = Submodule.Quotient.mk (t • ⁅x, y⁆)\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nt : R\nx' y' : L ⧸ I\nx y : L\n⊢ ⁅x, t • y⁆ = t • ⁅x, y⁆\n[PROOFSTEP]\napply lie_smul\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\n⊢ LieModuleHom.ker (mk' N) = N\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\nm✝ : M\n⊢ m✝ ∈ LieModuleHom.ker (mk' N) ↔ m✝ ∈ N\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L\ninst✝⁴ : LieAlgebra R L\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nN N' : LieSubmodule R L M\nI J : LieIdeal R L\n⊢ map (mk' N) N' = ⊥ ↔ N' ≤ N\n[PROOFSTEP]\nrw [← LieModuleHom.le_ker_iff_map, mk'_ker]\n[GOAL]\nR : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nf : L →ₗ⁅R⁆ L'\nsrc✝ : (L ⧸ LinearMap.ker ↑f) ≃ₗ[R] { x // x ∈ LinearMap.range ↑f } := LinearMap.quotKerEquivRange ↑f\n⊢ ∀ {x y : L ⧸ ker f},\n    AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := ↑(LinearMap.quotKerEquivRange ↑f),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : L ⧸ LinearMap.ker ↑f),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L ⧸ LinearMap.ker ↑f),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, y⁆ =\n      ⁅AddHom.toFun\n          {\n              toAddHom :=\n                { toFun := ↑(LinearMap.quotKerEquivRange ↑f),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : L ⧸ LinearMap.ker ↑f),\n                        AddHom.toFun src✝.toAddHom (x + y) =\n                          AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : L ⧸ LinearMap.ker ↑f),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          x,\n        AddHom.toFun\n          {\n              toAddHom :=\n                { toFun := ↑(LinearMap.quotKerEquivRange ↑f),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : L ⧸ LinearMap.ker ↑f),\n                        AddHom.toFun src✝.toAddHom (x + y) =\n                          AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : L ⧸ LinearMap.ker ↑f),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          y⁆\n[PROOFSTEP]\nrintro ⟨x⟩ ⟨y⟩\n[GOAL]\ncase mk.mk\nR : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nf : L →ₗ⁅R⁆ L'\nsrc✝ : (L ⧸ LinearMap.ker ↑f) ≃ₗ[R] { x // x ∈ LinearMap.range ↑f } := LinearMap.quotKerEquivRange ↑f\nx✝ : L ⧸ ker f\nx : L\ny✝ : L ⧸ ker f\ny : L\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := ↑(LinearMap.quotKerEquivRange ↑f),\n              map_add' :=\n                (_ :\n                  ∀ (x y : L ⧸ LinearMap.ker ↑f),\n                    AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : L ⧸ LinearMap.ker ↑f),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      ⁅Quot.mk Setoid.r x, Quot.mk Setoid.r y⁆ =\n    ⁅AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := ↑(LinearMap.quotKerEquivRange ↑f),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : L ⧸ LinearMap.ker ↑f),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L ⧸ LinearMap.ker ↑f),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        (Quot.mk Setoid.r x),\n      AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := ↑(LinearMap.quotKerEquivRange ↑f),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : L ⧸ LinearMap.ker ↑f),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L ⧸ LinearMap.ker ↑f),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        (Quot.mk Setoid.r y)⁆\n[PROOFSTEP]\nrw [← SetLike.coe_eq_coe, LieSubalgebra.coe_bracket]\n[GOAL]\ncase mk.mk\nR : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : LieRing L\ninst✝² : LieAlgebra R L\ninst✝¹ : LieRing L'\ninst✝ : LieAlgebra R L'\nf : L →ₗ⁅R⁆ L'\nsrc✝ : (L ⧸ LinearMap.ker ↑f) ≃ₗ[R] { x // x ∈ LinearMap.range ↑f } := LinearMap.quotKerEquivRange ↑f\nx✝ : L ⧸ ker f\nx : L\ny✝ : L ⧸ ker f\ny : L\n⊢ ↑(AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := ↑(LinearMap.quotKerEquivRange ↑f),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : L ⧸ LinearMap.ker ↑f),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L ⧸ LinearMap.ker ↑f),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅Quot.mk Setoid.r x, Quot.mk Setoid.r y⁆) =\n    ⁅↑(AddHom.toFun\n          {\n              toAddHom :=\n                { toFun := ↑(LinearMap.quotKerEquivRange ↑f),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : L ⧸ LinearMap.ker ↑f),\n                        AddHom.toFun src✝.toAddHom (x + y) =\n                          AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : L ⧸ LinearMap.ker ↑f),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          (Quot.mk Setoid.r x)),\n      ↑(AddHom.toFun\n          {\n              toAddHom :=\n                { toFun := ↑(LinearMap.quotKerEquivRange ↑f),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : L ⧸ LinearMap.ker ↑f),\n                        AddHom.toFun src✝.toAddHom (x + y) =\n                          AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : L ⧸ LinearMap.ker ↑f),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          (Quot.mk Setoid.r y))⁆\n[PROOFSTEP]\nsimp only [Submodule.Quotient.quot_mk_eq_mk, LinearMap.quotKerEquivRange_apply_mk, ← LieSubmodule.Quotient.mk_bracket,\n  coe_toLinearMap, map_lie]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.Quotient", "llama_tokens": 36536, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7490872131147276, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.3891667792147725}}
{"text": "[GOAL]\nx : ℝ\n⊢ LiouvilleWith 1 x\n[PROOFSTEP]\nuse 2\n[GOAL]\ncase h\nx : ℝ\n⊢ ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1\n[PROOFSTEP]\nrefine ((eventually_gt_atTop 0).mono fun n hn => ?_).frequently\n[GOAL]\ncase h\nx : ℝ\nn : ℕ\nhn : 0 < n\n⊢ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1\n[PROOFSTEP]\nhave hn' : (0 : ℝ) < n := by simpa\n[GOAL]\nx : ℝ\nn : ℕ\nhn : 0 < n\n⊢ 0 < ↑n\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase h\nx : ℝ\nn : ℕ\nhn : 0 < n\nhn' : 0 < ↑n\n⊢ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1\n[PROOFSTEP]\nhave : x < ↑(⌊x * ↑n⌋ + 1) / ↑n := by rw [lt_div_iff hn', Int.cast_add, Int.cast_one]; exact Int.lt_floor_add_one _\n[GOAL]\nx : ℝ\nn : ℕ\nhn : 0 < n\nhn' : 0 < ↑n\n⊢ x < ↑(⌊x * ↑n⌋ + 1) / ↑n\n[PROOFSTEP]\nrw [lt_div_iff hn', Int.cast_add, Int.cast_one]\n[GOAL]\nx : ℝ\nn : ℕ\nhn : 0 < n\nhn' : 0 < ↑n\n⊢ x * ↑n < ↑⌊x * ↑n⌋ + 1\n[PROOFSTEP]\nexact Int.lt_floor_add_one _\n[GOAL]\ncase h\nx : ℝ\nn : ℕ\nhn : 0 < n\nhn' : 0 < ↑n\nthis : x < ↑(⌊x * ↑n⌋ + 1) / ↑n\n⊢ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1\n[PROOFSTEP]\nrefine ⟨⌊x * n⌋ + 1, this.ne, ?_⟩\n[GOAL]\ncase h\nx : ℝ\nn : ℕ\nhn : 0 < n\nhn' : 0 < ↑n\nthis : x < ↑(⌊x * ↑n⌋ + 1) / ↑n\n⊢ |x - ↑(⌊x * ↑n⌋ + 1) / ↑n| < 2 / ↑n ^ 1\n[PROOFSTEP]\nrw [abs_sub_comm, abs_of_pos (sub_pos.2 this), rpow_one, sub_lt_iff_lt_add', add_div_eq_mul_add_div _ _ hn'.ne',\n  div_lt_div_right hn']\n[GOAL]\ncase h\nx : ℝ\nn : ℕ\nhn : 0 < n\nhn' : 0 < ↑n\nthis : x < ↑(⌊x * ↑n⌋ + 1) / ↑n\n⊢ ↑(⌊x * ↑n⌋ + 1) < x * ↑n + 2\n[PROOFSTEP]\nconvert add_lt_add_right ((Int.floor_le (x * n)).trans_lt (lt_add_one _)) 1 using 1\n[GOAL]\ncase h.e'_3\nx : ℝ\nn : ℕ\nhn : 0 < n\nhn' : 0 < ↑n\nthis : x < ↑(⌊x * ↑n⌋ + 1) / ↑n\n⊢ ↑(⌊x * ↑n⌋ + 1) = ↑⌊x * ↑n⌋ + 1\n[PROOFSTEP]\ntry push_cast\n[GOAL]\ncase h.e'_3\nx : ℝ\nn : ℕ\nhn : 0 < n\nhn' : 0 < ↑n\nthis : x < ↑(⌊x * ↑n⌋ + 1) / ↑n\n⊢ ↑(⌊x * ↑n⌋ + 1) = ↑⌊x * ↑n⌋ + 1\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_4\nx : ℝ\nn : ℕ\nhn : 0 < n\nhn' : 0 < ↑n\nthis : x < ↑(⌊x * ↑n⌋ + 1) / ↑n\n⊢ x * ↑n + 2 = x * ↑n + 1 + 1\n[PROOFSTEP]\ntry push_cast\n[GOAL]\ncase h.e'_4\nx : ℝ\nn : ℕ\nhn : 0 < n\nhn' : 0 < ↑n\nthis : x < ↑(⌊x * ↑n⌋ + 1) / ↑n\n⊢ x * ↑n + 2 = x * ↑n + 1 + 1\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_3\nx : ℝ\nn : ℕ\nhn : 0 < n\nhn' : 0 < ↑n\nthis : x < ↑(⌊x * ↑n⌋ + 1) / ↑n\n⊢ ↑⌊x * ↑n⌋ + 1 = ↑⌊x * ↑n⌋ + 1\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_4\nx : ℝ\nn : ℕ\nhn : 0 < n\nhn' : 0 < ↑n\nthis : x < ↑(⌊x * ↑n⌋ + 1) / ↑n\n⊢ x * ↑n + 2 = x * ↑n + 1 + 1\n[PROOFSTEP]\nring\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\n⊢ ∃ C _h₀, ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n[PROOFSTEP]\nrcases h with ⟨C, hC⟩\n[GOAL]\ncase intro\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∃ C _h₀, ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n[PROOFSTEP]\nrefine ⟨max C 1, zero_lt_one.trans_le <| le_max_right _ _, ?_⟩\n[GOAL]\ncase intro\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < max C 1 / ↑n ^ p\n[PROOFSTEP]\nrefine ((eventually_ge_atTop 1).and_frequently hC).mono ?_\n[GOAL]\ncase intro\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∀ (x_1 : ℕ),\n    (1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ p) →\n      1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < max C 1 / ↑x_1 ^ p\n[PROOFSTEP]\nrintro n ⟨hle, m, hne, hlt⟩\n[GOAL]\ncase intro.intro.intro.intro\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhle : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < max C 1 / ↑n ^ p\n[PROOFSTEP]\nrefine ⟨hle, m, hne, hlt.trans_le ?_⟩\n[GOAL]\ncase intro.intro.intro.intro\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhle : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ C / ↑n ^ p ≤ max C 1 / ↑n ^ p\n[PROOFSTEP]\nexact div_le_div_of_le (rpow_nonneg_of_nonneg n.cast_nonneg _) (le_max_left _ _)\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhle : q ≤ p\n⊢ LiouvilleWith q x\n[PROOFSTEP]\nrcases h.exists_pos with ⟨C, hC₀, hC⟩\n[GOAL]\ncase intro.intro\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhle : q ≤ p\nC : ℝ\nhC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ LiouvilleWith q x\n[PROOFSTEP]\nrefine ⟨C, hC.mono ?_⟩\n[GOAL]\ncase intro.intro\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhle : q ≤ p\nC : ℝ\nhC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∀ (x_1 : ℕ),\n    (1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ p) →\n      ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ q\n[PROOFSTEP]\nrintro n ⟨hn, m, hne, hlt⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhle : q ≤ p\nC : ℝ\nhC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ q\n[PROOFSTEP]\nrefine ⟨m, hne, hlt.trans_le <| div_le_div_of_le_left hC₀.le ?_ ?_⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_1\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhle : q ≤ p\nC : ℝ\nhC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ 0 < ↑n ^ q\ncase intro.intro.intro.intro.intro.refine_2\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhle : q ≤ p\nC : ℝ\nhC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ↑n ^ q ≤ ↑n ^ p\n[PROOFSTEP]\nexacts [rpow_pos_of_pos (Nat.cast_pos.2 hn) _, rpow_le_rpow_of_exponent_le (Nat.one_le_cast.2 hn) hle]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhlt : q < p\n⊢ ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < ↑n ^ (-q)\n[PROOFSTEP]\nrcases h.exists_pos with ⟨C, _hC₀, hC⟩\n[GOAL]\ncase intro.intro\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhlt : q < p\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < ↑n ^ (-q)\n[PROOFSTEP]\nhave : ∀ᶠ n : ℕ in atTop, C < n ^ (p - q) := by\n  simpa only [(· ∘ ·), neg_sub, one_div] using\n    ((tendsto_rpow_atTop (sub_pos.2 hlt)).comp tendsto_nat_cast_atTop_atTop).eventually (eventually_gt_atTop C)\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhlt : q < p\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)\n[PROOFSTEP]\nsimpa only [(· ∘ ·), neg_sub, one_div] using\n  ((tendsto_rpow_atTop (sub_pos.2 hlt)).comp tendsto_nat_cast_atTop_atTop).eventually (eventually_gt_atTop C)\n[GOAL]\ncase intro.intro\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhlt : q < p\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nthis : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)\n⊢ ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < ↑n ^ (-q)\n[PROOFSTEP]\nrefine (this.and_frequently hC).mono ?_\n[GOAL]\ncase intro.intro\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhlt : q < p\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nthis : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)\n⊢ ∀ (x_1 : ℕ),\n    (C < ↑x_1 ^ (p - q) ∧ 1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ p) →\n      ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < ↑x_1 ^ (-q)\n[PROOFSTEP]\nrintro n ⟨hnC, hn, m, hne, hlt⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhlt✝ : q < p\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nthis : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)\nn : ℕ\nhnC : C < ↑n ^ (p - q)\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < ↑n ^ (-q)\n[PROOFSTEP]\nreplace hn : (0 : ℝ) < n := Nat.cast_pos.2 hn\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhlt✝ : q < p\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nthis : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)\nn : ℕ\nhnC : C < ↑n ^ (p - q)\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhn : 0 < ↑n\n⊢ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < ↑n ^ (-q)\n[PROOFSTEP]\nrefine ⟨m, hne, hlt.trans <| (div_lt_iff <| rpow_pos_of_pos hn _).2 ?_⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhlt✝ : q < p\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nthis : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)\nn : ℕ\nhnC : C < ↑n ^ (p - q)\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhn : 0 < ↑n\n⊢ C < ↑n ^ (-q) * ↑n ^ p\n[PROOFSTEP]\nrwa [mul_comm, ← rpow_add hn, ← sub_eq_add_neg]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\n⊢ LiouvilleWith p (x * ↑r)\n[PROOFSTEP]\nrcases h.exists_pos with ⟨C, _hC₀, hC⟩\n[GOAL]\ncase intro.intro\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ LiouvilleWith p (x * ↑r)\n[PROOFSTEP]\nrefine ⟨r.den ^ p * (|r| * C), (tendsto_id.nsmul_atTop r.pos).frequently (hC.mono ?_)⟩\n[GOAL]\ncase intro.intro\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∀ (x_1 : ℕ),\n    (1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ p) →\n      ∃ m,\n        x * ↑r ≠ ↑m / ↑(r.den • id x_1) ∧\n          |x * ↑r - ↑m / ↑(r.den • id x_1)| < ↑r.den ^ p * (↑|r| * C) / ↑(r.den • id x_1) ^ p\n[PROOFSTEP]\nrintro n ⟨_hn, m, hne, hlt⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∃ m, x * ↑r ≠ ↑m / ↑(r.den • id n) ∧ |x * ↑r - ↑m / ↑(r.den • id n)| < ↑r.den ^ p * (↑|r| * C) / ↑(r.den • id n) ^ p\n[PROOFSTEP]\nhave A : (↑(r.num * m) : ℝ) / ↑(r.den • id n) = m / n * r := by simp [← div_mul_div_comm, ← r.cast_def, mul_comm]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r\n[PROOFSTEP]\nsimp [← div_mul_div_comm, ← r.cast_def, mul_comm]\n[GOAL]\ncase intro.intro.intro.intro.intro\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nA : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r\n⊢ ∃ m, x * ↑r ≠ ↑m / ↑(r.den • id n) ∧ |x * ↑r - ↑m / ↑(r.den • id n)| < ↑r.den ^ p * (↑|r| * C) / ↑(r.den • id n) ^ p\n[PROOFSTEP]\nrefine ⟨r.num * m, ?_, ?_⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_1\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nA : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r\n⊢ x * ↑r ≠ ↑(r.num * m) / ↑(r.den • id n)\n[PROOFSTEP]\nrw [A]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_1\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nA : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r\n⊢ x * ↑r ≠ ↑m / ↑n * ↑r\n[PROOFSTEP]\nsimp [hne, hr]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_2\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nA : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r\n⊢ |x * ↑r - ↑(r.num * m) / ↑(r.den • id n)| < ↑r.den ^ p * (↑|r| * C) / ↑(r.den • id n) ^ p\n[PROOFSTEP]\nrw [A, ← sub_mul, abs_mul]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_2\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nA : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r\n⊢ |x - ↑m / ↑n| * |↑r| < ↑r.den ^ p * (↑|r| * C) / ↑(r.den • id n) ^ p\n[PROOFSTEP]\nsimp only [smul_eq_mul, id.def, Nat.cast_mul]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_2\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nA : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r\n⊢ |x - ↑m / ↑n| * |↑r| < ↑r.den ^ p * (↑|r| * C) / (↑r.den * ↑n) ^ p\n[PROOFSTEP]\nrefine (mul_lt_mul_of_pos_right hlt <| abs_pos.2 <| Rat.cast_ne_zero.2 hr).trans_le ?_\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_2\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nA : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r\n⊢ C / ↑n ^ p * |↑r| ≤ ↑r.den ^ p * (↑|r| * C) / (↑r.den * ↑n) ^ p\n[PROOFSTEP]\nrw [mul_rpow, mul_div_mul_left, mul_comm, mul_div_assoc]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_2\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nA : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r\n⊢ |↑r| * (C / ↑n ^ p) ≤ ↑|r| * (C / ↑n ^ p)\n[PROOFSTEP]\nsimp only [Rat.cast_abs, le_refl]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_2.hc\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nA : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r\n⊢ ↑r.den ^ p ≠ 0\n[PROOFSTEP]\nexact (rpow_pos_of_pos (Nat.cast_pos.2 r.pos) _).ne'\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_2.h\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nA : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r\n⊢ 0 ≤ ↑r.den\n[PROOFSTEP]\nexact Nat.cast_nonneg _\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_2.h₁\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nhr : r ≠ 0\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\n_hn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nA : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r\n⊢ 0 ≤ ↑n\n[PROOFSTEP]\nexact Nat.cast_nonneg _\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nhr : r ≠ 0\nh : LiouvilleWith p (x * ↑r)\n⊢ LiouvilleWith p x\n[PROOFSTEP]\nsimpa only [mul_assoc, ← Rat.cast_mul, mul_inv_cancel hr, Rat.cast_one, mul_one] using h.mul_rat (inv_ne_zero hr)\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nhr : r ≠ 0\n⊢ LiouvilleWith p (↑r * x) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [mul_comm, mul_rat_iff hr]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nhm : m ≠ 0\n⊢ LiouvilleWith p (x * ↑m) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [← Rat.cast_coe_int, mul_rat_iff (Int.cast_ne_zero.2 hm)]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nhm : m ≠ 0\n⊢ LiouvilleWith p (↑m * x) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [mul_comm, mul_int_iff hm]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nhn : n ≠ 0\n⊢ LiouvilleWith p (x * ↑n) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [← Rat.cast_coe_nat, mul_rat_iff (Nat.cast_ne_zero.2 hn)]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nhn : n ≠ 0\n⊢ LiouvilleWith p (↑n * x) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [mul_comm, mul_nat_iff hn]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhn : n ≠ 0\n⊢ LiouvilleWith p (↑n * x)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhn : n ≠ 0\n⊢ LiouvilleWith p (x * ↑n)\n[PROOFSTEP]\nexact h.mul_nat hn\n[GOAL]\np q x y : ℝ\nr✝ : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nr : ℚ\n⊢ LiouvilleWith p (x + ↑r)\n[PROOFSTEP]\nrcases h.exists_pos with ⟨C, _hC₀, hC⟩\n[GOAL]\ncase intro.intro\np q x y : ℝ\nr✝ : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ LiouvilleWith p (x + ↑r)\n[PROOFSTEP]\nrefine ⟨r.den ^ p * C, (tendsto_id.nsmul_atTop r.pos).frequently (hC.mono ?_)⟩\n[GOAL]\ncase intro.intro\np q x y : ℝ\nr✝ : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∀ (x_1 : ℕ),\n    (1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ p) →\n      ∃ m, x + ↑r ≠ ↑m / ↑(r.den • id x_1) ∧ |x + ↑r - ↑m / ↑(r.den • id x_1)| < ↑r.den ^ p * C / ↑(r.den • id x_1) ^ p\n[PROOFSTEP]\nrintro n ⟨hn, m, hne, hlt⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∃ m, x + ↑r ≠ ↑m / ↑(r.den • id n) ∧ |x + ↑r - ↑m / ↑(r.den • id n)| < ↑r.den ^ p * C / ↑(r.den • id n) ^ p\n[PROOFSTEP]\nhave hr : (0 : ℝ) < r.den := Nat.cast_pos.2 r.pos\n[GOAL]\ncase intro.intro.intro.intro.intro\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhr : 0 < ↑r.den\n⊢ ∃ m, x + ↑r ≠ ↑m / ↑(r.den • id n) ∧ |x + ↑r - ↑m / ↑(r.den • id n)| < ↑r.den ^ p * C / ↑(r.den • id n) ^ p\n[PROOFSTEP]\nhave hn' : (n : ℝ) ≠ 0 := Nat.cast_ne_zero.2 (zero_lt_one.trans_le hn).ne'\n[GOAL]\ncase intro.intro.intro.intro.intro\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhr : 0 < ↑r.den\nhn' : ↑n ≠ 0\n⊢ ∃ m, x + ↑r ≠ ↑m / ↑(r.den • id n) ∧ |x + ↑r - ↑m / ↑(r.den • id n)| < ↑r.den ^ p * C / ↑(r.den • id n) ^ p\n[PROOFSTEP]\nhave : (↑(r.den * m + r.num * n : ℤ) / ↑(r.den • id n) : ℝ) = m / n + r :=\n  by\n  rw [Algebra.id.smul_eq_mul, id.def]\n  nth_rewrite 4 [← Rat.num_div_den r]\n  push_cast\n  rw [add_div, mul_div_mul_left _ _ (ne_of_gt hr), mul_div_mul_right _ _ hn']\n[GOAL]\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhr : 0 < ↑r.den\nhn' : ↑n ≠ 0\n⊢ ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r\n[PROOFSTEP]\nrw [Algebra.id.smul_eq_mul, id.def]\n[GOAL]\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhr : 0 < ↑r.den\nhn' : ↑n ≠ 0\n⊢ ↑(↑r.den * m + r.num * ↑n) / ↑(r.den * n) = ↑m / ↑n + ↑r\n[PROOFSTEP]\nnth_rewrite 4 [← Rat.num_div_den r]\n[GOAL]\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhr : 0 < ↑r.den\nhn' : ↑n ≠ 0\n⊢ ↑(↑r.den * m + r.num * ↑n) / ↑(r.den * n) = ↑m / ↑n + ↑(↑r.num / ↑r.den)\n[PROOFSTEP]\npush_cast\n[GOAL]\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhr : 0 < ↑r.den\nhn' : ↑n ≠ 0\n⊢ (↑r.den * ↑m + ↑r.num * ↑n) / (↑r.den * ↑n) = ↑m / ↑n + ↑r.num / ↑r.den\n[PROOFSTEP]\nrw [add_div, mul_div_mul_left _ _ (ne_of_gt hr), mul_div_mul_right _ _ hn']\n[GOAL]\ncase intro.intro.intro.intro.intro\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhr : 0 < ↑r.den\nhn' : ↑n ≠ 0\nthis : ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r\n⊢ ∃ m, x + ↑r ≠ ↑m / ↑(r.den • id n) ∧ |x + ↑r - ↑m / ↑(r.den • id n)| < ↑r.den ^ p * C / ↑(r.den • id n) ^ p\n[PROOFSTEP]\nrefine ⟨r.den * m + r.num * n, ?_⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhr : 0 < ↑r.den\nhn' : ↑n ≠ 0\nthis : ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r\n⊢ x + ↑r ≠ ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) ∧\n    |x + ↑r - ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n)| < ↑r.den ^ p * C / ↑(r.den • id n) ^ p\n[PROOFSTEP]\nrw [this, add_sub_add_right_eq_sub]\n[GOAL]\ncase intro.intro.intro.intro.intro\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhr : 0 < ↑r.den\nhn' : ↑n ≠ 0\nthis : ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r\n⊢ x + ↑r ≠ ↑m / ↑n + ↑r ∧ |x - ↑m / ↑n| < ↑r.den ^ p * C / ↑(r.den • id n) ^ p\n[PROOFSTEP]\nrefine ⟨by simpa, hlt.trans_le (le_of_eq ?_)⟩\n[GOAL]\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhr : 0 < ↑r.den\nhn' : ↑n ≠ 0\nthis : ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r\n⊢ x + ↑r ≠ ↑m / ↑n + ↑r\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase intro.intro.intro.intro.intro\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhr : 0 < ↑r.den\nhn' : ↑n ≠ 0\nthis : ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r\n⊢ C / ↑n ^ p = ↑r.den ^ p * C / ↑(r.den • id n) ^ p\n[PROOFSTEP]\nhave : (r.den ^ p : ℝ) ≠ 0 := (rpow_pos_of_pos hr _).ne'\n[GOAL]\ncase intro.intro.intro.intro.intro\np q x y : ℝ\nr✝ : ℚ\nm✝ : ℤ\nn✝ : ℕ\nh : LiouvilleWith p x\nr : ℚ\nC : ℝ\n_hC₀ : 0 < C\nhC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nhn : 1 ≤ n\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\nhr : 0 < ↑r.den\nhn' : ↑n ≠ 0\nthis✝ : ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r\nthis : ↑r.den ^ p ≠ 0\n⊢ C / ↑n ^ p = ↑r.den ^ p * C / ↑(r.den • id n) ^ p\n[PROOFSTEP]\nsimp [mul_rpow, Nat.cast_nonneg, mul_div_mul_left, this]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p (x + ↑r)\n⊢ LiouvilleWith p x\n[PROOFSTEP]\nsimpa using h.add_rat (-r)\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\n⊢ LiouvilleWith p (↑r + x) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [add_comm, add_rat_iff]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\n⊢ LiouvilleWith p (x + ↑m) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [← Rat.cast_coe_int m, add_rat_iff]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\n⊢ LiouvilleWith p (↑m + x) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [add_comm, add_int_iff]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\n⊢ LiouvilleWith p (x + ↑n) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [← Rat.cast_coe_nat n, add_rat_iff]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\n⊢ LiouvilleWith p (↑n + x) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [add_comm, add_nat_iff]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\n⊢ LiouvilleWith p (-x)\n[PROOFSTEP]\nrcases h with ⟨C, hC⟩\n[GOAL]\ncase intro\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ LiouvilleWith p (-x)\n[PROOFSTEP]\nrefine ⟨C, hC.mono ?_⟩\n[GOAL]\ncase intro\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∀ (x_1 : ℕ),\n    (∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ p) → ∃ m, -x ≠ ↑m / ↑x_1 ∧ |-x - ↑m / ↑x_1| < C / ↑x_1 ^ p\n[PROOFSTEP]\nrintro n ⟨m, hne, hlt⟩\n[GOAL]\ncase intro.intro.intro\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ∃ m, -x ≠ ↑m / ↑n ∧ |-x - ↑m / ↑n| < C / ↑n ^ p\n[PROOFSTEP]\nrefine ⟨-m, by simp [neg_div, hne], ?_⟩\n[GOAL]\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ -x ≠ ↑(-m) / ↑n\n[PROOFSTEP]\nsimp [neg_div, hne]\n[GOAL]\ncase intro.intro.intro\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ |-x - ↑(-m) / ↑n| < C / ↑n ^ p\n[PROOFSTEP]\nconvert hlt using 1\n[GOAL]\ncase h.e'_3\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ |-x - ↑(-m) / ↑n| = |x - ↑m / ↑n|\n[PROOFSTEP]\nrw [abs_sub_comm]\n[GOAL]\ncase h.e'_3\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ |↑(-m) / ↑n - -x| = |x - ↑m / ↑n|\n[PROOFSTEP]\ncongr! 1\n[GOAL]\ncase h.e'_3.h.e'_3\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ ↑(-m) / ↑n - -x = x - ↑m / ↑n\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_3.h.e'_3\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nC : ℝ\nhC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p\nn : ℕ\nm : ℤ\nhne : x ≠ ↑m / ↑n\nhlt : |x - ↑m / ↑n| < C / ↑n ^ p\n⊢ -↑m / ↑n - -x = x - ↑m / ↑n\n[PROOFSTEP]\nring\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\n⊢ LiouvilleWith p (x - ↑r) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← Rat.cast_neg, add_rat_iff]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\n⊢ LiouvilleWith p (x - ↑m) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [← Rat.cast_coe_int, sub_rat_iff]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\n⊢ LiouvilleWith p (x - ↑n) ↔ LiouvilleWith p x\n[PROOFSTEP]\nrw [← Rat.cast_coe_nat, sub_rat_iff]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\n⊢ LiouvilleWith p (↑r - x) ↔ LiouvilleWith p x\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\n⊢ LiouvilleWith p (↑m - x) ↔ LiouvilleWith p x\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\n⊢ LiouvilleWith p (↑n - x) ↔ LiouvilleWith p x\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\np q x y : ℝ\nr : ℚ\nm✝ : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhp : 1 < p\nm : ℤ\n⊢ x ≠ ↑m\n[PROOFSTEP]\nrintro rfl\n[GOAL]\np q y : ℝ\nr : ℚ\nm✝ : ℤ\nn : ℕ\nhp : 1 < p\nm : ℤ\nh : LiouvilleWith p ↑m\n⊢ False\n[PROOFSTEP]\nrename' m => M\n[GOAL]\np q y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nhp : 1 < p\nM : ℤ\nh : LiouvilleWith p ↑M\n⊢ False\n[PROOFSTEP]\nrcases((eventually_gt_atTop 0).and_frequently (h.frequently_lt_rpow_neg hp)).exists with\n  ⟨n : ℕ, hn : 0 < n, m : ℤ, hne : (M : ℝ) ≠ m / n, hlt : |(M - m / n : ℝ)| < n ^ (-1 : ℝ)⟩\n[GOAL]\ncase intro.intro.intro.intro\np q y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nhp : 1 < p\nM : ℤ\nh : LiouvilleWith p ↑M\nn : ℕ\nhn : 0 < n\nm : ℤ\nhne : ↑M ≠ ↑m / ↑n\nhlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)\n⊢ False\n[PROOFSTEP]\nrefine hlt.not_le ?_\n[GOAL]\ncase intro.intro.intro.intro\np q y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nhp : 1 < p\nM : ℤ\nh : LiouvilleWith p ↑M\nn : ℕ\nhn : 0 < n\nm : ℤ\nhne : ↑M ≠ ↑m / ↑n\nhlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)\n⊢ ↑n ^ (-1) ≤ |↑M - ↑m / ↑n|\n[PROOFSTEP]\nhave hn' : (0 : ℝ) < n := by simpa\n[GOAL]\np q y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nhp : 1 < p\nM : ℤ\nh : LiouvilleWith p ↑M\nn : ℕ\nhn : 0 < n\nm : ℤ\nhne : ↑M ≠ ↑m / ↑n\nhlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)\n⊢ 0 < ↑n\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase intro.intro.intro.intro\np q y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nhp : 1 < p\nM : ℤ\nh : LiouvilleWith p ↑M\nn : ℕ\nhn : 0 < n\nm : ℤ\nhne : ↑M ≠ ↑m / ↑n\nhlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)\nhn' : 0 < ↑n\n⊢ ↑n ^ (-1) ≤ |↑M - ↑m / ↑n|\n[PROOFSTEP]\nrw [rpow_neg_one, ← one_div, sub_div' _ _ _ hn'.ne', abs_div, Nat.abs_cast, div_le_div_right hn']\n[GOAL]\ncase intro.intro.intro.intro\np q y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nhp : 1 < p\nM : ℤ\nh : LiouvilleWith p ↑M\nn : ℕ\nhn : 0 < n\nm : ℤ\nhne : ↑M ≠ ↑m / ↑n\nhlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)\nhn' : 0 < ↑n\n⊢ 1 ≤ |↑M * ↑n - ↑m|\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.intro.intro.intro\np q y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nhp : 1 < p\nM : ℤ\nh : LiouvilleWith p ↑M\nn : ℕ\nhn : 0 < n\nm : ℤ\nhne : ↑M ≠ ↑m / ↑n\nhlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)\nhn' : 0 < ↑n\n⊢ 1 ≤ |M * ↑n - m|\n[PROOFSTEP]\nrw [← zero_add (1 : ℤ), Int.add_one_le_iff, abs_pos, sub_ne_zero]\n[GOAL]\ncase intro.intro.intro.intro\np q y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nhp : 1 < p\nM : ℤ\nh : LiouvilleWith p ↑M\nn : ℕ\nhn : 0 < n\nm : ℤ\nhne : ↑M ≠ ↑m / ↑n\nhlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)\nhn' : 0 < ↑n\n⊢ M * ↑n ≠ m\n[PROOFSTEP]\nrw [Ne.def, eq_div_iff hn'.ne'] at hne \n[GOAL]\ncase intro.intro.intro.intro\np q y : ℝ\nr : ℚ\nm✝ : ℤ\nn✝ : ℕ\nhp : 1 < p\nM : ℤ\nh : LiouvilleWith p ↑M\nn : ℕ\nhn : 0 < n\nm : ℤ\nhne : ¬↑M * ↑n = ↑m\nhlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)\nhn' : 0 < ↑n\n⊢ M * ↑n ≠ m\n[PROOFSTEP]\nexact_mod_cast hne\n[GOAL]\np q x y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nh : LiouvilleWith p x\nhp : 1 < p\n⊢ Irrational x\n[PROOFSTEP]\nrintro ⟨r, rfl⟩\n[GOAL]\ncase intro\np q y : ℝ\nr✝ : ℚ\nm : ℤ\nn : ℕ\nhp : 1 < p\nr : ℚ\nh : LiouvilleWith p ↑r\n⊢ False\n[PROOFSTEP]\nrcases eq_or_ne r 0 with (rfl | h0)\n[GOAL]\ncase intro.inl\np q y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nhp : 1 < p\nh : LiouvilleWith p ↑0\n⊢ False\n[PROOFSTEP]\nrefine h.ne_cast_int hp 0 ?_\n[GOAL]\ncase intro.inl\np q y : ℝ\nr : ℚ\nm : ℤ\nn : ℕ\nhp : 1 < p\nh : LiouvilleWith p ↑0\n⊢ ↑0 = ↑0\n[PROOFSTEP]\nrw [Rat.cast_zero, Int.cast_zero]\n[GOAL]\ncase intro.inr\np q y : ℝ\nr✝ : ℚ\nm : ℤ\nn : ℕ\nhp : 1 < p\nr : ℚ\nh : LiouvilleWith p ↑r\nh0 : r ≠ 0\n⊢ False\n[PROOFSTEP]\nrefine (h.mul_rat (inv_ne_zero h0)).ne_cast_int hp 1 ?_\n[GOAL]\ncase intro.inr\np q y : ℝ\nr✝ : ℚ\nm : ℤ\nn : ℕ\nhp : 1 < p\nr : ℚ\nh : LiouvilleWith p ↑r\nh0 : r ≠ 0\n⊢ ↑r * ↑r⁻¹ = ↑1\n[PROOFSTEP]\nrw [Rat.cast_inv, mul_inv_cancel]\n[GOAL]\ncase intro.inr\np q y : ℝ\nr✝ : ℚ\nm : ℤ\nn : ℕ\nhp : 1 < p\nr : ℚ\nh : LiouvilleWith p ↑r\nh0 : r ≠ 0\n⊢ 1 = ↑1\ncase intro.inr p q y : ℝ r✝ : ℚ m : ℤ n : ℕ hp : 1 < p r : ℚ h : LiouvilleWith p ↑r h0 : r ≠ 0 ⊢ ↑r ≠ 0\n[PROOFSTEP]\nexacts [Int.cast_one.symm, Rat.cast_ne_zero.mpr h0]\n[GOAL]\nx : ℝ\nhx : Liouville x\nn : ℕ\n⊢ ∃ᶠ (b : ℕ) in atTop, ∃ a, x ≠ ↑a / ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ n\n[PROOFSTEP]\nrefine Classical.not_not.1 fun H => ?_\n[GOAL]\nx : ℝ\nhx : Liouville x\nn : ℕ\nH : ¬∃ᶠ (b : ℕ) in atTop, ∃ a, x ≠ ↑a / ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ n\n⊢ False\n[PROOFSTEP]\nsimp only [Liouville, not_forall, not_exists, not_frequently, not_and, not_lt, eventually_atTop] at H \n[GOAL]\nx : ℝ\nhx : Liouville x\nn : ℕ\nH : ∃ a, ∀ (b : ℕ), b ≥ a → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\n⊢ False\n[PROOFSTEP]\nrcases H with ⟨N, hN⟩\n[GOAL]\ncase intro\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\n⊢ False\n[PROOFSTEP]\nhave : ∀ b > (1 : ℕ), ∀ᶠ m : ℕ in atTop, ∀ a : ℤ, 1 / (b : ℝ) ^ m ≤ |x - a / b| :=\n  by\n  intro b hb\n  replace hb : (1 : ℝ) < b := Nat.one_lt_cast.2 hb\n  have H : Tendsto (fun m => 1 / (b : ℝ) ^ m : ℕ → ℝ) atTop (𝓝 0) :=\n    by\n    simp only [one_div]\n    exact tendsto_inv_atTop_zero.comp (tendsto_pow_atTop_atTop_of_one_lt hb)\n  refine (H.eventually (hx.irrational.eventually_forall_le_dist_cast_div b)).mono ?_\n  exact fun m hm a => hm a\n[GOAL]\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\n⊢ ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\n[PROOFSTEP]\nintro b hb\n[GOAL]\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nb : ℕ\nhb : b > 1\n⊢ ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\n[PROOFSTEP]\nreplace hb : (1 : ℝ) < b := Nat.one_lt_cast.2 hb\n[GOAL]\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nb : ℕ\nhb : 1 < ↑b\n⊢ ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\n[PROOFSTEP]\nhave H : Tendsto (fun m => 1 / (b : ℝ) ^ m : ℕ → ℝ) atTop (𝓝 0) :=\n  by\n  simp only [one_div]\n  exact tendsto_inv_atTop_zero.comp (tendsto_pow_atTop_atTop_of_one_lt hb)\n[GOAL]\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nb : ℕ\nhb : 1 < ↑b\n⊢ Tendsto (fun m => 1 / ↑b ^ m) atTop (𝓝 0)\n[PROOFSTEP]\nsimp only [one_div]\n[GOAL]\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nb : ℕ\nhb : 1 < ↑b\n⊢ Tendsto (fun m => (↑b ^ m)⁻¹) atTop (𝓝 0)\n[PROOFSTEP]\nexact tendsto_inv_atTop_zero.comp (tendsto_pow_atTop_atTop_of_one_lt hb)\n[GOAL]\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nb : ℕ\nhb : 1 < ↑b\nH : Tendsto (fun m => 1 / ↑b ^ m) atTop (𝓝 0)\n⊢ ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\n[PROOFSTEP]\nrefine (H.eventually (hx.irrational.eventually_forall_le_dist_cast_div b)).mono ?_\n[GOAL]\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nb : ℕ\nhb : 1 < ↑b\nH : Tendsto (fun m => 1 / ↑b ^ m) atTop (𝓝 0)\n⊢ ∀ (x_1 : ℕ), (∀ (m : ℤ), 1 / ↑b ^ x_1 ≤ dist x (↑m / ↑b)) → ∀ (a : ℤ), 1 / ↑b ^ x_1 ≤ |x - ↑a / ↑b|\n[PROOFSTEP]\nexact fun m hm a => hm a\n[GOAL]\ncase intro\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nthis : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\n⊢ False\n[PROOFSTEP]\nhave : ∀ᶠ m : ℕ in atTop, ∀ b < N, 1 < b → ∀ a : ℤ, 1 / (b : ℝ) ^ m ≤ |x - a / b| :=\n  (finite_lt_nat N).eventually_all.2 fun b _hb => eventually_imp_distrib_left.2 (this b)\n[GOAL]\ncase intro\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nthis✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nthis : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\n⊢ False\n[PROOFSTEP]\nrcases(this.and (eventually_ge_atTop n)).exists with ⟨m, hm, hnm⟩\n[GOAL]\ncase intro.intro.intro\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nthis✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nthis : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nm : ℕ\nhm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nhnm : n ≤ m\n⊢ False\n[PROOFSTEP]\nrcases hx m with ⟨a, b, hb, hne, hlt⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nthis✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nthis : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nm : ℕ\nhm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nhnm : n ≤ m\na b : ℤ\nhb : 1 < b\nhne : x ≠ ↑a / ↑b\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ m\n⊢ False\n[PROOFSTEP]\nlift b to ℕ using zero_le_one.trans hb.le\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nthis✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nthis : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nm : ℕ\nhm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nhnm : n ≤ m\na : ℤ\nb : ℕ\nhb : 1 < ↑b\nhne : x ≠ ↑a / ↑↑b\nhlt : |x - ↑a / ↑↑b| < 1 / ↑↑b ^ m\n⊢ False\n[PROOFSTEP]\nnorm_cast at hb \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nthis✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nthis : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nm : ℕ\nhm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nhnm : n ≤ m\na : ℤ\nb : ℕ\nhne : x ≠ ↑a / ↑↑b\nhlt : |x - ↑a / ↑↑b| < 1 / ↑↑b ^ m\nhb : 1 < b\n⊢ False\n[PROOFSTEP]\npush_cast at hne hlt \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nthis✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nthis : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nm : ℕ\nhm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nhnm : n ≤ m\na : ℤ\nb : ℕ\nhb : 1 < b\nhne : x ≠ ↑a / ↑b\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ m\n⊢ False\n[PROOFSTEP]\ncases' le_or_lt N b with h h\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.inl\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nthis✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nthis : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nm : ℕ\nhm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nhnm : n ≤ m\na : ℤ\nb : ℕ\nhb : 1 < b\nhne : x ≠ ↑a / ↑b\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ m\nh : N ≤ b\n⊢ False\n[PROOFSTEP]\nrefine' (hN b h a hne).not_lt (hlt.trans_le _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.inl\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nthis✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nthis : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nm : ℕ\nhm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nhnm : n ≤ m\na : ℤ\nb : ℕ\nhb : 1 < b\nhne : x ≠ ↑a / ↑b\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ m\nh : N ≤ b\n⊢ 1 / ↑b ^ m ≤ 1 / ↑b ^ n\n[PROOFSTEP]\nreplace hb : (1 : ℝ) < b := Nat.one_lt_cast.2 hb\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.inl\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nthis✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nthis : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nm : ℕ\nhm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nhnm : n ≤ m\na : ℤ\nb : ℕ\nhne : x ≠ ↑a / ↑b\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ m\nh : N ≤ b\nhb : 1 < ↑b\n⊢ 1 / ↑b ^ m ≤ 1 / ↑b ^ n\n[PROOFSTEP]\nhave hb0 : (0 : ℝ) < b := zero_lt_one.trans hb\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.inl\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nthis✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nthis : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nm : ℕ\nhm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nhnm : n ≤ m\na : ℤ\nb : ℕ\nhne : x ≠ ↑a / ↑b\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ m\nh : N ≤ b\nhb : 1 < ↑b\nhb0 : 0 < ↑b\n⊢ 1 / ↑b ^ m ≤ 1 / ↑b ^ n\n[PROOFSTEP]\nexact one_div_le_one_div_of_le (pow_pos hb0 _) (pow_le_pow hb.le hnm)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.inr\nx : ℝ\nhx : Liouville x\nn N : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|\nthis✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nthis : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nm : ℕ\nhm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|\nhnm : n ≤ m\na : ℤ\nb : ℕ\nhb : 1 < b\nhne : x ≠ ↑a / ↑b\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ m\nh : b < N\n⊢ False\n[PROOFSTEP]\nexact (hm b h hb _).not_lt hlt\n[GOAL]\nx : ℝ\nhx : Liouville x\np : ℝ\n⊢ LiouvilleWith p x\n[PROOFSTEP]\nsuffices : LiouvilleWith ⌈p⌉₊ x\n[GOAL]\nx : ℝ\nhx : Liouville x\np : ℝ\nthis : LiouvilleWith (↑⌈p⌉₊) x\n⊢ LiouvilleWith p x\ncase this x : ℝ hx : Liouville x p : ℝ ⊢ LiouvilleWith (↑⌈p⌉₊) x\n[PROOFSTEP]\nexact this.mono (Nat.le_ceil p)\n[GOAL]\ncase this\nx : ℝ\nhx : Liouville x\np : ℝ\n⊢ LiouvilleWith (↑⌈p⌉₊) x\n[PROOFSTEP]\nrefine ⟨1, ((eventually_gt_atTop 1).and_frequently (hx.frequently_exists_num ⌈p⌉₊)).mono ?_⟩\n[GOAL]\ncase this\nx : ℝ\nhx : Liouville x\np : ℝ\n⊢ ∀ (x_1 : ℕ),\n    (1 < x_1 ∧ ∃ a, x ≠ ↑a / ↑x_1 ∧ |x - ↑a / ↑x_1| < 1 / ↑x_1 ^ ⌈p⌉₊) →\n      ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < 1 / ↑x_1 ^ ↑⌈p⌉₊\n[PROOFSTEP]\nrintro b ⟨_hb, a, hne, hlt⟩\n[GOAL]\ncase this.intro.intro.intro\nx : ℝ\nhx : Liouville x\np : ℝ\nb : ℕ\n_hb : 1 < b\na : ℤ\nhne : x ≠ ↑a / ↑b\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ ⌈p⌉₊\n⊢ ∃ m, x ≠ ↑m / ↑b ∧ |x - ↑m / ↑b| < 1 / ↑b ^ ↑⌈p⌉₊\n[PROOFSTEP]\nrefine ⟨a, hne, ?_⟩\n[GOAL]\ncase this.intro.intro.intro\nx : ℝ\nhx : Liouville x\np : ℝ\nb : ℕ\n_hb : 1 < b\na : ℤ\nhne : x ≠ ↑a / ↑b\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ ⌈p⌉₊\n⊢ |x - ↑a / ↑b| < 1 / ↑b ^ ↑⌈p⌉₊\n[PROOFSTEP]\nrwa [rpow_nat_cast]\n[GOAL]\nx : ℝ\n⊢ (∀ (p : ℝ), LiouvilleWith p x) ↔ Liouville x\n[PROOFSTEP]\nrefine ⟨fun H n => ?_, Liouville.liouvilleWith⟩\n[GOAL]\nx : ℝ\nH : ∀ (p : ℝ), LiouvilleWith p x\nn : ℕ\n⊢ ∃ a b, 1 < b ∧ x ≠ ↑a / ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ n\n[PROOFSTEP]\nrcases((eventually_gt_atTop 1).and_frequently ((H (n + 1)).frequently_lt_rpow_neg (lt_add_one (n : ℝ)))).exists with\n  ⟨b, hb, a, hne, hlt⟩\n[GOAL]\ncase intro.intro.intro.intro\nx : ℝ\nH : ∀ (p : ℝ), LiouvilleWith p x\nn b : ℕ\nhb : 1 < b\na : ℤ\nhne : x ≠ ↑a / ↑b\nhlt : |x - ↑a / ↑b| < ↑b ^ (-↑n)\n⊢ ∃ a b, 1 < b ∧ x ≠ ↑a / ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ n\n[PROOFSTEP]\nexact ⟨a, b, by exact_mod_cast hb, hne, by simpa [rpow_neg] using hlt⟩\n[GOAL]\nx : ℝ\nH : ∀ (p : ℝ), LiouvilleWith p x\nn b : ℕ\nhb : 1 < b\na : ℤ\nhne : x ≠ ↑a / ↑b\nhlt : |x - ↑a / ↑b| < ↑b ^ (-↑n)\n⊢ 1 < ↑b\n[PROOFSTEP]\nexact_mod_cast hb\n[GOAL]\nx : ℝ\nH : ∀ (p : ℝ), LiouvilleWith p x\nn b : ℕ\nhb : 1 < b\na : ℤ\nhne : x ≠ ↑a / ↑b\nhlt : |x - ↑a / ↑b| < ↑b ^ (-↑n)\n⊢ |x - ↑a / ↑↑b| < 1 / ↑↑b ^ n\n[PROOFSTEP]\nsimpa [rpow_neg] using hlt\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Liouville.LiouvilleWith", "llama_tokens": 28687, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.766293653760418, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.38913300890140107}}
{"text": "[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rdrop [] n = []\n[PROOFSTEP]\nsimp [rdrop]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rdrop l 0 = l\n[PROOFSTEP]\nsimp [rdrop]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rdrop l n = reverse (drop n (reverse l))\n[PROOFSTEP]\nrw [rdrop]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ take (length l - n) l = reverse (drop n (reverse l))\n[PROOFSTEP]\ninduction' l using List.reverseRecOn with xs x IH generalizing n\n[GOAL]\ncase H0\nα : Type u_1\np : α → Bool\nl : List α\nn✝ n : ℕ\n⊢ take (length [] - n) [] = reverse (drop n (reverse []))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H1\nα : Type u_1\np : α → Bool\nl : List α\nn✝ : ℕ\nxs : List α\nx : α\nIH : ∀ (n : ℕ), take (length xs - n) xs = reverse (drop n (reverse xs))\nn : ℕ\n⊢ take (length (xs ++ [x]) - n) (xs ++ [x]) = reverse (drop n (reverse (xs ++ [x])))\n[PROOFSTEP]\ncases n\n[GOAL]\ncase H1.zero\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nxs : List α\nx : α\nIH : ∀ (n : ℕ), take (length xs - n) xs = reverse (drop n (reverse xs))\n⊢ take (length (xs ++ [x]) - Nat.zero) (xs ++ [x]) = reverse (drop Nat.zero (reverse (xs ++ [x])))\n[PROOFSTEP]\nsimp [take_append]\n[GOAL]\ncase H1.succ\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nxs : List α\nx : α\nIH : ∀ (n : ℕ), take (length xs - n) xs = reverse (drop n (reverse xs))\nn✝ : ℕ\n⊢ take (length (xs ++ [x]) - Nat.succ n✝) (xs ++ [x]) = reverse (drop (Nat.succ n✝) (reverse (xs ++ [x])))\n[PROOFSTEP]\nsimp [take_append_eq_append_take, IH]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\n⊢ rdrop (l ++ [x]) (n + 1) = rdrop l n\n[PROOFSTEP]\nsimp [rdrop_eq_reverse_drop_reverse]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rtake [] n = []\n[PROOFSTEP]\nsimp [rtake]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rtake l 0 = []\n[PROOFSTEP]\nsimp [rtake]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rtake l n = reverse (take n (reverse l))\n[PROOFSTEP]\nrw [rtake]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ drop (length l - n) l = reverse (take n (reverse l))\n[PROOFSTEP]\ninduction' l using List.reverseRecOn with xs x IH generalizing n\n[GOAL]\ncase H0\nα : Type u_1\np : α → Bool\nl : List α\nn✝ n : ℕ\n⊢ drop (length [] - n) [] = reverse (take n (reverse []))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H1\nα : Type u_1\np : α → Bool\nl : List α\nn✝ : ℕ\nxs : List α\nx : α\nIH : ∀ (n : ℕ), drop (length xs - n) xs = reverse (take n (reverse xs))\nn : ℕ\n⊢ drop (length (xs ++ [x]) - n) (xs ++ [x]) = reverse (take n (reverse (xs ++ [x])))\n[PROOFSTEP]\ncases n\n[GOAL]\ncase H1.zero\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nxs : List α\nx : α\nIH : ∀ (n : ℕ), drop (length xs - n) xs = reverse (take n (reverse xs))\n⊢ drop (length (xs ++ [x]) - Nat.zero) (xs ++ [x]) = reverse (take Nat.zero (reverse (xs ++ [x])))\n[PROOFSTEP]\nexact drop_length _\n[GOAL]\ncase H1.succ\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nxs : List α\nx : α\nIH : ∀ (n : ℕ), drop (length xs - n) xs = reverse (take n (reverse xs))\nn✝ : ℕ\n⊢ drop (length (xs ++ [x]) - Nat.succ n✝) (xs ++ [x]) = reverse (take (Nat.succ n✝) (reverse (xs ++ [x])))\n[PROOFSTEP]\nsimp [drop_append_eq_append_drop, IH]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\n⊢ rtake (l ++ [x]) (n + 1) = rtake l n ++ [x]\n[PROOFSTEP]\nsimp [rtake_eq_reverse_take_reverse]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rdropWhile p [] = []\n[PROOFSTEP]\nsimp [rdropWhile, dropWhile]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\n⊢ rdropWhile p (l ++ [x]) = if p x = true then rdropWhile p l else l ++ [x]\n[PROOFSTEP]\nsimp only [rdropWhile, dropWhile, reverse_append, reverse_singleton, singleton_append]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\n⊢ reverse\n      (match p x with\n      | true => dropWhile p (reverse l)\n      | false => x :: reverse l) =\n    if p x = true then reverse (dropWhile p (reverse l)) else l ++ [x]\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\nh : p x = true\n⊢ reverse\n      (match p x with\n      | true => dropWhile p (reverse l)\n      | false => x :: reverse l) =\n    reverse (dropWhile p (reverse l))\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\nh : ¬p x = true\n⊢ reverse\n      (match p x with\n      | true => dropWhile p (reverse l)\n      | false => x :: reverse l) =\n    l ++ [x]\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\nh : p x = true\n⊢ rdropWhile p (l ++ [x]) = rdropWhile p l\n[PROOFSTEP]\nrw [rdropWhile_concat, if_pos h]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\nh : ¬p x = true\n⊢ rdropWhile p (l ++ [x]) = l ++ [x]\n[PROOFSTEP]\nrw [rdropWhile_concat, if_neg h]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\n⊢ rdropWhile p [x] = if p x = true then [] else [x]\n[PROOFSTEP]\nrw [← nil_append [x], rdropWhile_concat, rdropWhile_nil]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nhl : rdropWhile p l ≠ []\n⊢ ¬p (getLast (rdropWhile p l) hl) = true\n[PROOFSTEP]\nsimp_rw [rdropWhile]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nhl : rdropWhile p l ≠ []\n⊢ ¬p (getLast (reverse (dropWhile p (reverse l))) (_ : reverse (dropWhile p (reverse l)) ≠ [])) = true\n[PROOFSTEP]\nrw [getLast_reverse]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nhl : rdropWhile p l ≠ []\n⊢ ¬p (get (dropWhile p (reverse l)) { val := 0, isLt := (_ : 0 < length (dropWhile p (reverse l))) }) = true\n[PROOFSTEP]\nexact dropWhile_nthLe_zero_not _ _ _\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rdropWhile p l <+: l\n[PROOFSTEP]\nrw [← reverse_suffix, rdropWhile, reverse_reverse]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ dropWhile p (reverse l) <:+ reverse l\n[PROOFSTEP]\nexact dropWhile_suffix _\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rdropWhile p l = [] ↔ ∀ (x : α), x ∈ l → p x = true\n[PROOFSTEP]\nsimp [rdropWhile]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ dropWhile p l = l ↔ ∀ (hl : 0 < length l), ¬p (nthLe l 0 hl) = true\n[PROOFSTEP]\ncases' l with hd tl\n[GOAL]\ncase nil\nα : Type u_1\np : α → Bool\nn : ℕ\n⊢ dropWhile p [] = [] ↔ ∀ (hl : 0 < length []), ¬p (nthLe [] 0 hl) = true\n[PROOFSTEP]\nsimp only [dropWhile, true_iff]\n[GOAL]\ncase nil\nα : Type u_1\np : α → Bool\nn : ℕ\n⊢ ∀ (hl : 0 < length []), ¬p (nthLe [] 0 hl) = true\n[PROOFSTEP]\nintro h\n[GOAL]\ncase nil\nα : Type u_1\np : α → Bool\nn : ℕ\nh : 0 < length []\n⊢ ¬p (nthLe [] 0 h) = true\n[PROOFSTEP]\nby_contra\n[GOAL]\ncase nil\nα : Type u_1\np : α → Bool\nn : ℕ\nh : 0 < length []\na✝ : p (nthLe [] 0 h) = true\n⊢ False\n[PROOFSTEP]\nrwa [length_nil, lt_self_iff_false] at h \n[GOAL]\ncase cons\nα : Type u_1\np : α → Bool\nn : ℕ\nhd : α\ntl : List α\n⊢ dropWhile p (hd :: tl) = hd :: tl ↔ ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true\n[PROOFSTEP]\nrw [dropWhile]\n[GOAL]\ncase cons\nα : Type u_1\np : α → Bool\nn : ℕ\nhd : α\ntl : List α\n⊢ (match p hd with\n      | true => dropWhile p tl\n      | false => hd :: tl) =\n      hd :: tl ↔\n    ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase cons.refine'_1\nα : Type u_1\np : α → Bool\nn : ℕ\nhd : α\ntl : List α\nh :\n  (match p hd with\n    | true => dropWhile p tl\n    | false => hd :: tl) =\n    hd :: tl\n⊢ ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true\n[PROOFSTEP]\nintro _ H\n[GOAL]\ncase cons.refine'_1\nα : Type u_1\np : α → Bool\nn : ℕ\nhd : α\ntl : List α\nh :\n  (match p hd with\n    | true => dropWhile p tl\n    | false => hd :: tl) =\n    hd :: tl\nhl✝ : 0 < length (hd :: tl)\nH : p (nthLe (hd :: tl) 0 hl✝) = true\n⊢ False\n[PROOFSTEP]\nrw [nthLe, get] at H \n[GOAL]\ncase cons.refine'_1\nα : Type u_1\np : α → Bool\nn : ℕ\nhd : α\ntl : List α\nh :\n  (match p hd with\n    | true => dropWhile p tl\n    | false => hd :: tl) =\n    hd :: tl\nhl✝ : 0 < length (hd :: tl)\nH : p hd = true\n⊢ False\n[PROOFSTEP]\nrefine' (cons_ne_self hd tl) (Sublist.antisymm _ (sublist_cons _ _))\n[GOAL]\ncase cons.refine'_1\nα : Type u_1\np : α → Bool\nn : ℕ\nhd : α\ntl : List α\nh :\n  (match p hd with\n    | true => dropWhile p tl\n    | false => hd :: tl) =\n    hd :: tl\nhl✝ : 0 < length (hd :: tl)\nH : p hd = true\n⊢ hd :: tl <+ tl\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase cons.refine'_1\nα : Type u_1\np : α → Bool\nn : ℕ\nhd : α\ntl : List α\nh :\n  (match p hd with\n    | true => dropWhile p tl\n    | false => hd :: tl) =\n    hd :: tl\nhl✝ : 0 < length (hd :: tl)\nH : p hd = true\n⊢ (match p hd with\n    | true => dropWhile p tl\n    | false => hd :: tl) <+\n    tl\n[PROOFSTEP]\nsimp only [H]\n[GOAL]\ncase cons.refine'_1\nα : Type u_1\np : α → Bool\nn : ℕ\nhd : α\ntl : List α\nh :\n  (match p hd with\n    | true => dropWhile p tl\n    | false => hd :: tl) =\n    hd :: tl\nhl✝ : 0 < length (hd :: tl)\nH : p hd = true\n⊢ dropWhile p tl <+ tl\n[PROOFSTEP]\nexact List.isSuffix.sublist (dropWhile_suffix p)\n[GOAL]\ncase cons.refine'_2\nα : Type u_1\np : α → Bool\nn : ℕ\nhd : α\ntl : List α\nh : ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true\n⊢ (match p hd with\n    | true => dropWhile p tl\n    | false => hd :: tl) =\n    hd :: tl\n[PROOFSTEP]\nhave := h (by simp only [length, Nat.succ_pos])\n[GOAL]\nα : Type u_1\np : α → Bool\nn : ℕ\nhd : α\ntl : List α\nh : ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true\n⊢ 0 < length (hd :: tl)\n[PROOFSTEP]\nsimp only [length, Nat.succ_pos]\n[GOAL]\ncase cons.refine'_2\nα : Type u_1\np : α → Bool\nn : ℕ\nhd : α\ntl : List α\nh : ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true\nthis : ¬p (nthLe (hd :: tl) 0 (_ : 0 < Nat.succ (length tl))) = true\n⊢ (match p hd with\n    | true => dropWhile p tl\n    | false => hd :: tl) =\n    hd :: tl\n[PROOFSTEP]\nrw [nthLe, get] at this \n[GOAL]\ncase cons.refine'_2\nα : Type u_1\np : α → Bool\nn : ℕ\nhd : α\ntl : List α\nh : ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true\nthis : ¬p hd = true\n⊢ (match p hd with\n    | true => dropWhile p tl\n    | false => hd :: tl) =\n    hd :: tl\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rdropWhile p l = l ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true\n[PROOFSTEP]\nsimp only [rdropWhile, reverse_eq_iff, dropWhile_eq_self_iff, getLast_eq_get]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ (∀ (hl : 0 < length (reverse l)), ¬p (nthLe (reverse l) 0 hl) = true) ↔\n    ∀ (hl : l ≠ []), ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true\n[PROOFSTEP]\nrefine' ⟨fun h hl => _, fun h hl => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nh : ∀ (hl : 0 < length (reverse l)), ¬p (nthLe (reverse l) 0 hl) = true\nhl : l ≠ []\n⊢ ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true\n[PROOFSTEP]\nrw [← length_pos, ← length_reverse] at hl \n[GOAL]\ncase refine'_1\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nh : ∀ (hl : 0 < length (reverse l)), ¬p (nthLe (reverse l) 0 hl) = true\nhl✝ : l ≠ []\nhl : 0 < length (reverse l)\n⊢ ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true\n[PROOFSTEP]\nhave := h hl\n[GOAL]\ncase refine'_1\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nh : ∀ (hl : 0 < length (reverse l)), ¬p (nthLe (reverse l) 0 hl) = true\nhl✝ : l ≠ []\nhl : 0 < length (reverse l)\nthis : ¬p (nthLe (reverse l) 0 hl) = true\n⊢ ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true\n[PROOFSTEP]\nrwa [nthLe, get_reverse'] at this \n[GOAL]\ncase refine'_2\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nh : ∀ (hl : l ≠ []), ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true\nhl : 0 < length (reverse l)\n⊢ ¬p (nthLe (reverse l) 0 hl) = true\n[PROOFSTEP]\nrw [length_reverse, length_pos] at hl \n[GOAL]\ncase refine'_2\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nh : ∀ (hl : l ≠ []), ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true\nhl✝ : 0 < length (reverse l)\nhl : l ≠ []\n⊢ ¬p (nthLe (reverse l) 0 hl✝) = true\n[PROOFSTEP]\nhave := h hl\n[GOAL]\ncase refine'_2\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nh : ∀ (hl : l ≠ []), ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true\nhl✝ : 0 < length (reverse l)\nhl : l ≠ []\nthis : ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true\n⊢ ¬p (nthLe (reverse l) 0 hl✝) = true\n[PROOFSTEP]\nrwa [nthLe, get_reverse']\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ dropWhile p (dropWhile p l) = dropWhile p l\n[PROOFSTEP]\nsimp only [dropWhile_eq_self_iff]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ ∀ (hl : 0 < length (dropWhile p l)), ¬p (nthLe (dropWhile p l) 0 hl) = true\n[PROOFSTEP]\nexact fun h => dropWhile_nthLe_zero_not p l h\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rtakeWhile p [] = []\n[PROOFSTEP]\nsimp [rtakeWhile, takeWhile]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\n⊢ rtakeWhile p (l ++ [x]) = if p x = true then rtakeWhile p l ++ [x] else []\n[PROOFSTEP]\nsimp only [rtakeWhile, takeWhile, reverse_append, reverse_singleton, singleton_append]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\n⊢ reverse\n      (match p x with\n      | true => x :: takeWhile p (reverse l)\n      | false => []) =\n    if p x = true then reverse (takeWhile p (reverse l)) ++ [x] else []\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\nh : p x = true\n⊢ reverse\n      (match p x with\n      | true => x :: takeWhile p (reverse l)\n      | false => []) =\n    reverse (takeWhile p (reverse l)) ++ [x]\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\nh : ¬p x = true\n⊢ reverse\n      (match p x with\n      | true => x :: takeWhile p (reverse l)\n      | false => []) =\n    []\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\nh : p x = true\n⊢ rtakeWhile p (l ++ [x]) = rtakeWhile p l ++ [x]\n[PROOFSTEP]\nrw [rtakeWhile_concat, if_pos h]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\nh : ¬p x = true\n⊢ rtakeWhile p (l ++ [x]) = []\n[PROOFSTEP]\nrw [rtakeWhile_concat, if_neg h]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rtakeWhile p l <:+ l\n[PROOFSTEP]\nrw [← reverse_prefix, rtakeWhile, reverse_reverse]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ takeWhile p (reverse l) <+: reverse l\n[PROOFSTEP]\nexact takeWhile_prefix _\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rtakeWhile p l = l ↔ ∀ (x : α), x ∈ l → p x = true\n[PROOFSTEP]\nsimp [rtakeWhile, reverse_eq_iff]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rtakeWhile p l = [] ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true\n[PROOFSTEP]\ninduction' l using List.reverseRecOn with l a\n[GOAL]\ncase H0\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ rtakeWhile p [] = [] ↔ ∀ (hl : [] ≠ []), ¬p (getLast [] hl) = true\n[PROOFSTEP]\nsimp only [rtakeWhile, takeWhile, reverse_nil, true_iff]\n[GOAL]\ncase H0\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\n⊢ ∀ (hl : [] ≠ []), ¬p (getLast [] hl) = true\n[PROOFSTEP]\nintro f\n[GOAL]\ncase H0\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nf : [] ≠ []\n⊢ ¬p (getLast [] f) = true\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase H1\nα : Type u_1\np : α → Bool\nl✝ : List α\nn : ℕ\nl : List α\na : α\na✝ : rtakeWhile p l = [] ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true\n⊢ rtakeWhile p (l ++ [a]) = [] ↔ ∀ (hl : l ++ [a] ≠ []), ¬p (getLast (l ++ [a]) hl) = true\n[PROOFSTEP]\nsimp only [rtakeWhile, reverse_append, takeWhile, reverse_eq_nil, getLast_append, ne_eq, append_eq_nil, and_false,\n  forall_true_left]\n[GOAL]\ncase H1\nα : Type u_1\np : α → Bool\nl✝ : List α\nn : ℕ\nl : List α\na : α\na✝ : rtakeWhile p l = [] ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true\n⊢ (match p a with\n      | true => a :: takeWhile p (List.append [] (reverse l))\n      | false => []) =\n      [] ↔\n    ¬p a = true\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase H1.refine'_1\nα : Type u_1\np : α → Bool\nl✝ : List α\nn : ℕ\nl : List α\na : α\na✝ : rtakeWhile p l = [] ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true\nh :\n  (match p a with\n    | true => a :: takeWhile p (List.append [] (reverse l))\n    | false => []) =\n    []\n⊢ ¬p a = true\n[PROOFSTEP]\nintro pa\n[GOAL]\ncase H1.refine'_1\nα : Type u_1\np : α → Bool\nl✝ : List α\nn : ℕ\nl : List α\na : α\na✝ : rtakeWhile p l = [] ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true\nh :\n  (match p a with\n    | true => a :: takeWhile p (List.append [] (reverse l))\n    | false => []) =\n    []\npa : p a = true\n⊢ False\n[PROOFSTEP]\nsimp only [pa] at h \n[GOAL]\ncase H1.refine'_2\nα : Type u_1\np : α → Bool\nl✝ : List α\nn : ℕ\nl : List α\na : α\na✝ : rtakeWhile p l = [] ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true\nh : ¬p a = true\n⊢ (match p a with\n    | true => a :: takeWhile p (List.append [] (reverse l))\n    | false => []) =\n    []\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\nhx : x ∈ rtakeWhile p l\n⊢ p x = true\n[PROOFSTEP]\nrw [rtakeWhile, mem_reverse] at hx \n[GOAL]\nα : Type u_1\np : α → Bool\nl : List α\nn : ℕ\nx : α\nhx : x ∈ takeWhile p (reverse l)\n⊢ p x = true\n[PROOFSTEP]\nexact mem_takeWhile_imp hx\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Rdrop", "llama_tokens": 8030, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442251201477016, "lm_q2_score": 0.6039318337259583, "lm_q1q2_score": 0.3890680581431272}}
{"text": "[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : One α\nf : Filter α\ns : Set α\ninst✝¹ : One β\ninst✝ : OneHomClass F α β\nφ : F\n⊢ map (↑φ) 1 = 1\n[PROOFSTEP]\nrw [Filter.map_one', map_one, pure_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : InvolutiveInv α\nf g : Filter α\ns : Set α\nhs : s ∈ f\n⊢ s⁻¹ ∈ f⁻¹\n[PROOFSTEP]\nrwa [mem_inv, inv_preimage, inv_inv]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : InvolutiveInv α\nf✝ g : Filter α\ns : Set α\nsrc✝ : Inv (Filter α) := instInv\nf : Filter α\n⊢ map (Inv.inv ∘ Inv.inv) f = f\n[PROOFSTEP]\nrw [inv_involutive.comp_self, map_id]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : InvolutiveInv α\nf g : Filter α\ns : Set α\n⊢ f⁻¹ ≤ g ↔ f ≤ g⁻¹\n[PROOFSTEP]\nrw [← Filter.inv_le_inv_iff, inv_inv]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns : Set α\na : α\nm n : ℕ\nhs : s ∈ f\n⊢ s ^ 0 ∈ f ^ 0\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns : Set α\na : α\nm n : ℕ\nhs : s ∈ f\n⊢ 1 ∈ f ^ 0\n[PROOFSTEP]\nexact one_mem_one\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns : Set α\na : α\nm n✝ : ℕ\nhs : s ∈ f\nn : ℕ\n⊢ s ^ (n + 1) ∈ f ^ (n + 1)\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns : Set α\na : α\nm n✝ : ℕ\nhs : s ∈ f\nn : ℕ\n⊢ s * s ^ n ∈ f ^ (n + 1)\n[PROOFSTEP]\nexact mul_mem_mul hs (pow_mem_pow hs n)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns : Set α\na : α\nm n✝ n : ℕ\nhn : n ≠ 0\n⊢ ⊥ ^ n = ⊥\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le (Nat.succ_le_of_lt <| Nat.pos_of_ne_zero hn), pow_succ, bot_mul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns : Set α\na : α\nm n : ℕ\nhf : 1 ≤ f\n⊢ f * ⊤ = ⊤\n[PROOFSTEP]\nrefine' top_le_iff.1 fun s => _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns✝ : Set α\na : α\nm n : ℕ\nhf : 1 ≤ f\ns : Set α\n⊢ s ∈ f * ⊤ → s ∈ ⊤\n[PROOFSTEP]\nsimp only [mem_mul, mem_top, exists_and_left, exists_eq_left]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns✝ : Set α\na : α\nm n : ℕ\nhf : 1 ≤ f\ns : Set α\n⊢ (∃ t₁, t₁ ∈ f ∧ t₁ * univ ⊆ s) → s = univ\n[PROOFSTEP]\nrintro ⟨t, ht, hs⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns✝ : Set α\na : α\nm n : ℕ\nhf : 1 ≤ f\ns t : Set α\nht : t ∈ f\nhs : t * univ ⊆ s\n⊢ s = univ\n[PROOFSTEP]\nrwa [mul_univ_of_one_mem (mem_one.1 <| hf ht), univ_subset_iff] at hs \n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns : Set α\na : α\nm n : ℕ\nhf : 1 ≤ f\n⊢ ⊤ * f = ⊤\n[PROOFSTEP]\nrefine' top_le_iff.1 fun s => _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns✝ : Set α\na : α\nm n : ℕ\nhf : 1 ≤ f\ns : Set α\n⊢ s ∈ ⊤ * f → s ∈ ⊤\n[PROOFSTEP]\nsimp only [mem_mul, mem_top, exists_and_left, exists_eq_left]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns✝ : Set α\na : α\nm n : ℕ\nhf : 1 ≤ f\ns : Set α\n⊢ (∃ x, x ∈ f ∧ univ * x ⊆ s) → s = univ\n[PROOFSTEP]\nrintro ⟨t, ht, hs⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns✝ : Set α\na : α\nm n : ℕ\nhf : 1 ≤ f\ns t : Set α\nht : t ∈ f\nhs : univ * t ⊆ s\n⊢ s = univ\n[PROOFSTEP]\nrwa [univ_mul_of_one_mem (mem_one.1 <| hf ht), univ_subset_iff] at hs \n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : Monoid α\nf g : Filter α\ns : Set α\na : α\nm n✝ n : ℕ\nx✝ : n + 2 ≠ 0\n⊢ ⊤ ^ (n + 2) = ⊤\n[PROOFSTEP]\nrw [pow_succ, top_pow n.succ_ne_zero, top_mul_top]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\n⊢ f * g = 1 ↔ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1\n[PROOFSTEP]\nrefine' ⟨fun hfg => _, _⟩\n[GOAL]\ncase refine'_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\nhfg : f * g = 1\n⊢ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1\n[PROOFSTEP]\nobtain ⟨t₁, t₂, h₁, h₂, h⟩ : (1 : Set α) ∈ f * g := hfg.symm.subst one_mem_one\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\nhfg : f * g = 1\nt₁ t₂ : Set α\nh₁ : t₁ ∈ f\nh₂ : t₂ ∈ g\nh : t₁ * t₂ ⊆ 1\n⊢ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1\n[PROOFSTEP]\nhave hfg : (f * g).NeBot := hfg.symm.subst one_neBot\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\nhfg✝ : f * g = 1\nt₁ t₂ : Set α\nh₁ : t₁ ∈ f\nh₂ : t₂ ∈ g\nh : t₁ * t₂ ⊆ 1\nhfg : NeBot (f * g)\n⊢ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1\n[PROOFSTEP]\nrw [(hfg.nonempty_of_mem <| mul_mem_mul h₁ h₂).subset_one_iff, Set.mul_eq_one_iff] at h \n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\nhfg✝ : f * g = 1\nt₁ t₂ : Set α\nh₁ : t₁ ∈ f\nh₂ : t₂ ∈ g\nh : ∃ a b, t₁ = {a} ∧ t₂ = {b} ∧ a * b = 1\nhfg : NeBot (f * g)\n⊢ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1\n[PROOFSTEP]\nobtain ⟨a, b, rfl, rfl, h⟩ := h\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\nhfg✝ : f * g = 1\nhfg : NeBot (f * g)\na b : α\nh₁ : {a} ∈ f\nh : a * b = 1\nh₂ : {b} ∈ g\n⊢ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1\n[PROOFSTEP]\nrefine' ⟨a, b, _, _, h⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\nhfg✝ : f * g = 1\nhfg : NeBot (f * g)\na b : α\nh₁ : {a} ∈ f\nh : a * b = 1\nh₂ : {b} ∈ g\n⊢ f = pure a\n[PROOFSTEP]\nrwa [← hfg.of_mul_left.le_pure_iff, le_pure_iff]\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\nhfg✝ : f * g = 1\nhfg : NeBot (f * g)\na b : α\nh₁ : {a} ∈ f\nh : a * b = 1\nh₂ : {b} ∈ g\n⊢ g = pure b\n[PROOFSTEP]\nrwa [← hfg.of_mul_right.le_pure_iff, le_pure_iff]\n[GOAL]\ncase refine'_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\n⊢ (∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1) → f * g = 1\n[PROOFSTEP]\nrintro ⟨a, b, rfl, rfl, h⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\na b : α\nh : a * b = 1\n⊢ pure a * pure b = 1\n[PROOFSTEP]\nrw [pure_mul_pure, h, pure_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\nsrc✝³ : Monoid (Filter α) := Filter.monoid\nsrc✝² : InvolutiveInv (Filter α) := Filter.instInvolutiveInv\nsrc✝¹ : Div (Filter α) := Filter.instDiv\nsrc✝ : Pow (Filter α) ℤ := Filter.instZPow\ns t : Filter α\nh : s * t = 1\n⊢ s⁻¹ = t\n[PROOFSTEP]\nobtain ⟨a, b, rfl, rfl, hab⟩ := Filter.mul_eq_one_iff.1 h\n[GOAL]\ncase intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\nsrc✝³ : Monoid (Filter α) := Filter.monoid\nsrc✝² : InvolutiveInv (Filter α) := Filter.instInvolutiveInv\nsrc✝¹ : Div (Filter α) := Filter.instDiv\nsrc✝ : Pow (Filter α) ℤ := Filter.instZPow\na b : α\nhab : a * b = 1\nh : pure a * pure b = 1\n⊢ (pure a)⁻¹ = pure b\n[PROOFSTEP]\nrw [inv_pure, inv_eq_of_mul_eq_one_right hab]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\n⊢ IsUnit f ↔ ∃ a, f = pure a ∧ IsUnit a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\n⊢ IsUnit f → ∃ a, f = pure a ∧ IsUnit a\n[PROOFSTEP]\nrintro ⟨u, rfl⟩\n[GOAL]\ncase mp.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\ng : Filter α\nu : (Filter α)ˣ\n⊢ ∃ a, ↑u = pure a ∧ IsUnit a\n[PROOFSTEP]\nobtain ⟨a, b, ha, hb, h⟩ := Filter.mul_eq_one_iff.1 u.mul_inv\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\ng : Filter α\nu : (Filter α)ˣ\na b : α\nha : ↑u = pure a\nhb : ↑u⁻¹ = pure b\nh : a * b = 1\n⊢ ∃ a, ↑u = pure a ∧ IsUnit a\n[PROOFSTEP]\nrefine' ⟨a, ha, ⟨a, b, h, pure_injective _⟩, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\ng : Filter α\nu : (Filter α)ˣ\na b : α\nha : ↑u = pure a\nhb : ↑u⁻¹ = pure b\nh : a * b = 1\n⊢ pure (b * a) = pure 1\n[PROOFSTEP]\nrw [← pure_mul_pure, ← ha, ← hb]\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\ng : Filter α\nu : (Filter α)ˣ\na b : α\nha : ↑u = pure a\nhb : ↑u⁻¹ = pure b\nh : a * b = 1\n⊢ ↑u⁻¹ * ↑u = pure 1\n[PROOFSTEP]\nexact u.inv_mul\n[GOAL]\ncase mpr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\nf g : Filter α\n⊢ (∃ a, f = pure a ∧ IsUnit a) → IsUnit f\n[PROOFSTEP]\nrintro ⟨a, rfl, ha⟩\n[GOAL]\ncase mpr.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝ : DivisionMonoid α\ng : Filter α\na : α\nha : IsUnit a\n⊢ IsUnit (pure a)\n[PROOFSTEP]\nexact ha.filter\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Group α\ninst✝¹ : DivisionMonoid β\ninst✝ : MonoidHomClass F α β\nm : F\nf g f₁ g₁ : Filter α\nf₂ g₂ : Filter β\n⊢ 1 ≤ f / g ↔ ¬Disjoint f g\n[PROOFSTEP]\nrefine' ⟨fun h hfg => _, _⟩\n[GOAL]\ncase refine'_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Group α\ninst✝¹ : DivisionMonoid β\ninst✝ : MonoidHomClass F α β\nm : F\nf g f₁ g₁ : Filter α\nf₂ g₂ : Filter β\nh : 1 ≤ f / g\nhfg : Disjoint f g\n⊢ False\n[PROOFSTEP]\nobtain ⟨s, hs, t, ht, hst⟩ := hfg.le_bot (mem_bot : ∅ ∈ ⊥)\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Group α\ninst✝¹ : DivisionMonoid β\ninst✝ : MonoidHomClass F α β\nm : F\nf g f₁ g₁ : Filter α\nf₂ g₂ : Filter β\nh : 1 ≤ f / g\nhfg : Disjoint f g\ns : Set α\nhs : s ∈ f\nt : Set α\nht : t ∈ g\nhst : ∅ = s ∩ t\n⊢ False\n[PROOFSTEP]\nexact Set.one_mem_div_iff.1 (h <| div_mem_div hs ht) (disjoint_iff.2 hst.symm)\n[GOAL]\ncase refine'_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Group α\ninst✝¹ : DivisionMonoid β\ninst✝ : MonoidHomClass F α β\nm : F\nf g f₁ g₁ : Filter α\nf₂ g₂ : Filter β\n⊢ ¬Disjoint f g → 1 ≤ f / g\n[PROOFSTEP]\nrintro h s ⟨t₁, t₂, h₁, h₂, hs⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Group α\ninst✝¹ : DivisionMonoid β\ninst✝ : MonoidHomClass F α β\nm : F\nf g f₁ g₁ : Filter α\nf₂ g₂ : Filter β\nh : ¬Disjoint f g\ns t₁ t₂ : Set α\nh₁ : t₁ ∈ f\nh₂ : t₂ ∈ g\nhs : t₁ / t₂ ⊆ s\n⊢ s ∈ 1\n[PROOFSTEP]\nexact hs (Set.one_mem_div_iff.2 fun ht => h <| disjoint_of_disjoint_of_mem ht h₁ h₂)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Group α\ninst✝¹ : DivisionMonoid β\ninst✝ : MonoidHomClass F α β\nm : F\nf g f₁ g₁ : Filter α\nf₂ g₂ : Filter β\nh : NeBot f\n⊢ 1 ≤ f / f\n[PROOFSTEP]\nrintro s ⟨t₁, t₂, h₁, h₂, hs⟩\n[GOAL]\ncase intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Group α\ninst✝¹ : DivisionMonoid β\ninst✝ : MonoidHomClass F α β\nm : F\nf g f₁ g₁ : Filter α\nf₂ g₂ : Filter β\nh : NeBot f\ns t₁ t₂ : Set α\nh₁ : t₁ ∈ f\nh₂ : t₂ ∈ f\nhs : t₁ / t₂ ⊆ s\n⊢ s ∈ 1\n[PROOFSTEP]\nobtain ⟨a, ha₁, ha₂⟩ := Set.not_disjoint_iff.1 (h.not_disjoint h₁ h₂)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Group α\ninst✝¹ : DivisionMonoid β\ninst✝ : MonoidHomClass F α β\nm : F\nf g f₁ g₁ : Filter α\nf₂ g₂ : Filter β\nh : NeBot f\ns t₁ t₂ : Set α\nh₁ : t₁ ∈ f\nh₂ : t₂ ∈ f\nhs : t₁ / t₂ ⊆ s\na : α\nha₁ : a ∈ t₁\nha₂ : a ∈ t₂\n⊢ s ∈ 1\n[PROOFSTEP]\nrw [mem_one, ← div_self' a]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Group α\ninst✝¹ : DivisionMonoid β\ninst✝ : MonoidHomClass F α β\nm : F\nf g f₁ g₁ : Filter α\nf₂ g₂ : Filter β\nh : NeBot f\ns t₁ t₂ : Set α\nh₁ : t₁ ∈ f\nh₂ : t₂ ∈ f\nhs : t₁ / t₂ ⊆ s\na : α\nha₁ : a ∈ t₁\nha₂ : a ∈ t₂\n⊢ a / a ∈ s\n[PROOFSTEP]\nexact hs (Set.div_mem_div ha₁ ha₂)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Group α\ninst✝¹ : DivisionMonoid β\ninst✝ : MonoidHomClass F α β\nm : F\nf g f₁ g₁ : Filter α\nf₂ g₂ : Filter β\n⊢ IsUnit f ↔ ∃ a, f = pure a\n[PROOFSTEP]\nsimp only [isUnit_iff, Group.isUnit, and_true_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝³ : SMul α β\ninst✝² : SMul α γ\ninst✝¹ : SMul β γ\ninst✝ : IsScalarTower α β γ\na : α\nb : β\nf : Filter γ\n⊢ (a • b) • f = a • b • f\n[PROOFSTEP]\nsimp only [← map_smul, map_map, smul_assoc]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝³ : SMul α β\ninst✝² : SMul α γ\ninst✝¹ : SMul β γ\ninst✝ : IsScalarTower α β γ\na : α\nb : β\nf : Filter γ\n⊢ map (fun b_1 => a • b • b_1) f = map ((fun b => a • b) ∘ fun b_1 => b • b_1) f\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝³ : SMul α β\ninst✝² : SMul α γ\ninst✝¹ : SMul β γ\ninst✝ : IsScalarTower α β γ\na : α\nf : Filter β\ng : Filter γ\n⊢ (a • f) • g = a • f • g\n[PROOFSTEP]\nrefine' (map_map₂_distrib_left fun _ _ => _).symm\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝³ : SMul α β\ninst✝² : SMul α γ\ninst✝¹ : SMul β γ\ninst✝ : IsScalarTower α β γ\na : α\nf : Filter β\ng : Filter γ\nx✝¹ : β\nx✝ : γ\n⊢ (fun x x_1 => x • x_1) a (x✝¹ • x✝) = (fun x x_1 => x • x_1) a x✝¹ • x✝\n[PROOFSTEP]\nexact (smul_assoc a _ _).symm\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝¹ : Monoid α\ninst✝ : MulAction α β\nf : Filter β\n⊢ map (fun b => 1 • b) f = f\n[PROOFSTEP]\nsimp_rw [one_smul, map_id']\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝¹ : Monoid α\ninst✝ : MulAction α β\nf : Filter β\n⊢ 1 • f = f\n[PROOFSTEP]\nsimp only [← map_smul, one_smul, map_id']\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝¹ : Monoid α\ninst✝ : MulAction α β\na b : α\nf : Filter β\n⊢ (a * b) • f = a • b • f\n[PROOFSTEP]\nsimp only [← map_smul, map_map, Function.comp, ← mul_smul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Monoid α\ninst✝¹ : AddMonoid β\ninst✝ : DistribMulAction α β\nx✝ : α\n⊢ pure ((fun x x_1 => x • x_1) x✝ 0) = 0\n[PROOFSTEP]\ndsimp only\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Monoid α\ninst✝¹ : AddMonoid β\ninst✝ : DistribMulAction α β\nx✝ : α\n⊢ pure (x✝ • 0) = 0\n[PROOFSTEP]\nrw [smul_zero, pure_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Monoid α\ninst✝¹ : Monoid β\ninst✝ : MulDistribMulAction α β\nx✝ : α\n⊢ {x✝ • 1} = 1\n[PROOFSTEP]\nrw [smul_one, singleton_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Zero α\ninst✝¹ : Zero β\ninst✝ : SMulWithZero α β\nf : Filter α\ng : Filter β\n⊢ 0 • g ≤ 0\n[PROOFSTEP]\nrefine' fun s hs => mem_smul_filter.2 _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Zero α\ninst✝¹ : Zero β\ninst✝ : SMulWithZero α β\nf : Filter α\ng : Filter β\ns : Set β\nhs : s ∈ 0\n⊢ (fun x x_1 => x • x_1) 0 ⁻¹' s ∈ g\n[PROOFSTEP]\nconvert @univ_mem _ g\n[GOAL]\ncase h.e'_4\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Zero α\ninst✝¹ : Zero β\ninst✝ : SMulWithZero α β\nf : Filter α\ng : Filter β\ns : Set β\nhs : s ∈ 0\n⊢ (fun x x_1 => x • x_1) 0 ⁻¹' s = univ\n[PROOFSTEP]\nrefine' eq_univ_iff_forall.2 fun a => _\n[GOAL]\ncase h.e'_4\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Zero α\ninst✝¹ : Zero β\ninst✝ : SMulWithZero α β\nf : Filter α\ng : Filter β\ns : Set β\nhs : s ∈ 0\na : β\n⊢ a ∈ (fun x x_1 => x • x_1) 0 ⁻¹' s\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h.e'_4\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Zero α\ninst✝¹ : Zero β\ninst✝ : SMulWithZero α β\nf : Filter α\ng : Filter β\ns : Set β\nhs : s ∈ 0\na : β\n⊢ a ∈ (fun x => 0 • x) ⁻¹' s\n[PROOFSTEP]\nrwa [mem_preimage, zero_smul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Zero α\ninst✝¹ : Zero β\ninst✝ : SMulWithZero α β\nf : Filter α\ng : Filter β\nhg : NeBot g\ns : Set β\nhs : s ∈ g\n⊢ (fun x x_1 => x • x_1) 0 '' s ∈ 0\n[PROOFSTEP]\nsimp_rw [zero_smul, (hg.nonempty_of_mem hs).image_const]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\nε : Type u_6\ninst✝² : Zero α\ninst✝¹ : Zero β\ninst✝ : SMulWithZero α β\nf : Filter α\ng : Filter β\nhg : NeBot g\ns : Set β\nhs : s ∈ g\n⊢ {0} ∈ 0\n[PROOFSTEP]\nexact zero_mem_zero\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.Pointwise", "llama_tokens": 9853, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442251064863698, "lm_q2_score": 0.6039318337259583, "lm_q1q2_score": 0.389068049892614}}
{"text": "[GOAL]\nα : Type u_1\nG : Type u_2\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup G\nf : α → G\nhf : Memℒp f p\nhf_meas : StronglyMeasurable f\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\n⊢ FinStronglyMeasurable f μ\n[PROOFSTEP]\nborelize G\n[GOAL]\nα : Type u_1\nG : Type u_2\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup G\nf : α → G\nhf : Memℒp f p\nhf_meas : StronglyMeasurable f\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\n⊢ FinStronglyMeasurable f μ\n[PROOFSTEP]\nhaveI : SeparableSpace (Set.range f ∪ {0} : Set G) := hf_meas.separableSpace_range_union_singleton\n[GOAL]\nα : Type u_1\nG : Type u_2\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup G\nf : α → G\nhf : Memℒp f p\nhf_meas : StronglyMeasurable f\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nthis : SeparableSpace ↑(Set.range f ∪ {0})\n⊢ FinStronglyMeasurable f μ\n[PROOFSTEP]\nlet fs := SimpleFunc.approxOn f hf_meas.measurable (Set.range f ∪ {0}) 0 (by simp)\n[GOAL]\nα : Type u_1\nG : Type u_2\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup G\nf : α → G\nhf : Memℒp f p\nhf_meas : StronglyMeasurable f\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nthis : SeparableSpace ↑(Set.range f ∪ {0})\n⊢ 0 ∈ Set.range f ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nG : Type u_2\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup G\nf : α → G\nhf : Memℒp f p\nhf_meas : StronglyMeasurable f\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nthis : SeparableSpace ↑(Set.range f ∪ {0})\nfs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})\n⊢ FinStronglyMeasurable f μ\n[PROOFSTEP]\nrefine' ⟨fs, _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nG : Type u_2\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup G\nf : α → G\nhf : Memℒp f p\nhf_meas : StronglyMeasurable f\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nthis : SeparableSpace ↑(Set.range f ∪ {0})\nfs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})\n⊢ ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\n[PROOFSTEP]\nhave h_fs_Lp : ∀ n, Memℒp (fs n) p μ := SimpleFunc.memℒp_approxOn_range hf_meas.measurable hf\n[GOAL]\ncase refine'_1\nα : Type u_1\nG : Type u_2\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup G\nf : α → G\nhf : Memℒp f p\nhf_meas : StronglyMeasurable f\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nthis : SeparableSpace ↑(Set.range f ∪ {0})\nfs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})\nh_fs_Lp : ∀ (n : ℕ), Memℒp (↑(fs n)) p\n⊢ ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\n[PROOFSTEP]\nexact fun n => (fs n).measure_support_lt_top_of_memℒp (h_fs_Lp n) hp_ne_zero hp_ne_top\n[GOAL]\ncase refine'_2\nα : Type u_1\nG : Type u_2\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup G\nf : α → G\nhf : Memℒp f p\nhf_meas : StronglyMeasurable f\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nthis : SeparableSpace ↑(Set.range f ∪ {0})\nfs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})\n⊢ ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_2\nα : Type u_1\nG : Type u_2\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup G\nf : α → G\nhf : Memℒp f p\nhf_meas : StronglyMeasurable f\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nthis : SeparableSpace ↑(Set.range f ∪ {0})\nfs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})\nx : α\n⊢ Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\napply SimpleFunc.tendsto_approxOn\n[GOAL]\ncase refine'_2.hx\nα : Type u_1\nG : Type u_2\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup G\nf : α → G\nhf : Memℒp f p\nhf_meas : StronglyMeasurable f\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nthis : SeparableSpace ↑(Set.range f ∪ {0})\nfs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})\nx : α\n⊢ f x ∈ closure (Set.range f ∪ {0})\n[PROOFSTEP]\napply subset_closure\n[GOAL]\ncase refine'_2.hx.a\nα : Type u_1\nG : Type u_2\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup G\nf : α → G\nhf : Memℒp f p\nhf_meas : StronglyMeasurable f\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nthis : SeparableSpace ↑(Set.range f ∪ {0})\nfs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})\nx : α\n⊢ f x ∈ Set.range f ∪ {0}\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp", "llama_tokens": 2584, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7217432182679956, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.38900748429157844}}
{"text": "[GOAL]\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\n⊢ x ∈ Ideal.span (↑(of k G) '' s) ↔ ∀ (m : G), m ∈ x.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\nlet RHS : Ideal (MonoidAlgebra k G) :=\n  { carrier := {p | ∀ m : G, m ∈ p.support → ∃ m' ∈ s, ∃ d, m = d * m'}\n    add_mem' := fun {x y} hx hy m hm => by\n      classical exact (Finset.mem_union.1 <| Finsupp.support_add hm).elim (hx m) (hy m)\n    zero_mem' := fun m hm => by cases hm\n    smul_mem' := fun x y hy m hm => by\n      classical\n      replace hm := Finset.mem_biUnion.mp (Finsupp.support_sum hm)\n      obtain ⟨xm, -, hm⟩ := hm\n      replace hm := Finset.mem_biUnion.mp (Finsupp.support_sum hm)\n      obtain ⟨ym, hym, hm⟩ := hm\n      replace hm := Finset.mem_singleton.mp (Finsupp.support_single_subset hm)\n      obtain rfl := hm\n      refine' (hy _ hym).imp fun sm p => And.imp_right _ p\n      rintro ⟨d, rfl⟩\n      exact ⟨xm * d, (mul_assoc _ _ _).symm⟩ }\n[GOAL]\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx✝ x y : MonoidAlgebra k G\nhx : x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'}\nhy : y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'}\nm : G\nhm : m ∈ (x + y).support\n⊢ ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\nclassical exact (Finset.mem_union.1 <| Finsupp.support_add hm).elim (hx m) (hy m)\n[GOAL]\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx✝ x y : MonoidAlgebra k G\nhx : x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'}\nhy : y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'}\nm : G\nhm : m ∈ (x + y).support\n⊢ ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\nexact (Finset.mem_union.1 <| Finsupp.support_add hm).elim (hx m) (hy m)\n[GOAL]\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nm : G\nhm : m ∈ 0.support\n⊢ ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\ncases hm\n[GOAL]\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx✝ x y : MonoidAlgebra k G\nhy :\n  y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n              add_mem' :=\n                (_ :\n                  ∀ {x y : MonoidAlgebra k G},\n                    x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                        ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n          zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier\nm : G\nhm : m ∈ (x • y).support\n⊢ ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\nclassical\nreplace hm := Finset.mem_biUnion.mp (Finsupp.support_sum hm)\nobtain ⟨xm, -, hm⟩ := hm\nreplace hm := Finset.mem_biUnion.mp (Finsupp.support_sum hm)\nobtain ⟨ym, hym, hm⟩ := hm\nreplace hm := Finset.mem_singleton.mp (Finsupp.support_single_subset hm)\nobtain rfl := hm\nrefine' (hy _ hym).imp fun sm p => And.imp_right _ p\nrintro ⟨d, rfl⟩\nexact ⟨xm * d, (mul_assoc _ _ _).symm⟩\n[GOAL]\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx✝ x y : MonoidAlgebra k G\nhy :\n  y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n              add_mem' :=\n                (_ :\n                  ∀ {x y : MonoidAlgebra k G},\n                    x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                        ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n          zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier\nm : G\nhm : m ∈ (x • y).support\n⊢ ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\nreplace hm := Finset.mem_biUnion.mp (Finsupp.support_sum hm)\n[GOAL]\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx✝ x y : MonoidAlgebra k G\nhy :\n  y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n              add_mem' :=\n                (_ :\n                  ∀ {x y : MonoidAlgebra k G},\n                    x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                        ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n          zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier\nm : G\nhm : ∃ a, a ∈ x.support ∧ m ∈ (Finsupp.sum y fun a₂ b₂ => single (a * a₂) (↑x a * b₂)).support\n⊢ ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\nobtain ⟨xm, -, hm⟩ := hm\n[GOAL]\ncase intro.intro\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx✝ x y : MonoidAlgebra k G\nhy :\n  y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n              add_mem' :=\n                (_ :\n                  ∀ {x y : MonoidAlgebra k G},\n                    x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                        ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n          zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier\nm xm : G\nhm : m ∈ (Finsupp.sum y fun a₂ b₂ => single (xm * a₂) (↑x xm * b₂)).support\n⊢ ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\nreplace hm := Finset.mem_biUnion.mp (Finsupp.support_sum hm)\n[GOAL]\ncase intro.intro\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx✝ x y : MonoidAlgebra k G\nhy :\n  y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n              add_mem' :=\n                (_ :\n                  ∀ {x y : MonoidAlgebra k G},\n                    x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                        ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n          zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier\nm xm : G\nhm : ∃ a, a ∈ y.support ∧ m ∈ (single (xm * a) (↑x xm * ↑y a)).support\n⊢ ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\nobtain ⟨ym, hym, hm⟩ := hm\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx✝ x y : MonoidAlgebra k G\nhy :\n  y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n              add_mem' :=\n                (_ :\n                  ∀ {x y : MonoidAlgebra k G},\n                    x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                        ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n          zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier\nm xm ym : G\nhym : ym ∈ y.support\nhm : m ∈ (single (xm * ym) (↑x xm * ↑y ym)).support\n⊢ ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\nreplace hm := Finset.mem_singleton.mp (Finsupp.support_single_subset hm)\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx✝ x y : MonoidAlgebra k G\nhy :\n  y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n              add_mem' :=\n                (_ :\n                  ∀ {x y : MonoidAlgebra k G},\n                    x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                        ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n          zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier\nm xm ym : G\nhym : ym ∈ y.support\nhm : m = xm * ym\n⊢ ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\nobtain rfl := hm\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx✝ x y : MonoidAlgebra k G\nhy :\n  y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n              add_mem' :=\n                (_ :\n                  ∀ {x y : MonoidAlgebra k G},\n                    x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                        ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n          zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier\nxm ym : G\nhym : ym ∈ y.support\n⊢ ∃ m', m' ∈ s ∧ ∃ d, xm * ym = d * m'\n[PROOFSTEP]\nrefine' (hy _ hym).imp fun sm p => And.imp_right _ p\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx✝ x y : MonoidAlgebra k G\nhy :\n  y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n              add_mem' :=\n                (_ :\n                  ∀ {x y : MonoidAlgebra k G},\n                    x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                        ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n          zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier\nxm ym : G\nhym : ym ∈ y.support\nsm : G\np : sm ∈ s ∧ ∃ d, ym = d * sm\n⊢ (∃ d, ym = d * sm) → ∃ d, xm * ym = d * sm\n[PROOFSTEP]\nrintro ⟨d, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx✝ x y : MonoidAlgebra k G\nhy :\n  y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n              add_mem' :=\n                (_ :\n                  ∀ {x y : MonoidAlgebra k G},\n                    x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                        ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n          zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier\nxm sm d : G\nhym : d * sm ∈ y.support\np : sm ∈ s ∧ ∃ d_1, d * sm = d_1 * sm\n⊢ ∃ d_1, xm * (d * sm) = d_1 * sm\n[PROOFSTEP]\nexact ⟨xm * d, (mul_assoc _ _ _).symm⟩\n[GOAL]\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\n⊢ x ∈ Ideal.span (↑(of k G) '' s) ↔ ∀ (m : G), m ∈ x.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\nchange _ ↔ x ∈ RHS\n[GOAL]\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\n⊢ x ∈ Ideal.span (↑(of k G) '' s) ↔ x ∈ RHS\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\n⊢ x ∈ Ideal.span (↑(of k G) '' s) → x ∈ RHS\n[PROOFSTEP]\nrevert x\n[GOAL]\ncase mp\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\n⊢ ∀ {x : MonoidAlgebra k G}, x ∈ Ideal.span (↑(of k G) '' s) → x ∈ RHS\n[PROOFSTEP]\nrw [← SetLike.le_def]\n  -- porting note: refine needs this even though it's defeq?\n[GOAL]\ncase mp\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\n⊢ Ideal.span (↑(of k G) '' s) ≤ RHS\n[PROOFSTEP]\nrefine Ideal.span_le.2 ?_\n[GOAL]\ncase mp\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\n⊢ ↑(of k G) '' s ⊆ ↑RHS\n[PROOFSTEP]\nrintro _ ⟨i, hi, rfl⟩ m hm\n[GOAL]\ncase mp.intro.intro\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\ni : G\nhi : i ∈ s\nm : G\nhm : m ∈ (↑(of k G) i).support\n⊢ ∃ m', m' ∈ s ∧ ∃ d, m = d * m'\n[PROOFSTEP]\nrefine' ⟨_, hi, 1, _⟩\n[GOAL]\ncase mp.intro.intro\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\ni : G\nhi : i ∈ s\nm : G\nhm : m ∈ (↑(of k G) i).support\n⊢ m = 1 * i\n[PROOFSTEP]\nobtain rfl := Finset.mem_singleton.mp (Finsupp.support_single_subset hm)\n[GOAL]\ncase mp.intro.intro\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\nm : G\nhi : m ∈ s\nhm : m ∈ (↑(of k G) m).support\n⊢ m = 1 * m\n[PROOFSTEP]\nexact (one_mul _).symm\n[GOAL]\ncase mpr\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\n⊢ x ∈ RHS → x ∈ Ideal.span (↑(of k G) '' s)\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase mpr\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\nhx : x ∈ RHS\n⊢ x ∈ Ideal.span (↑(of k G) '' s)\n[PROOFSTEP]\nrw [← Finsupp.sum_single x]\n[GOAL]\ncase mpr\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\nhx : x ∈ RHS\n⊢ Finsupp.sum x Finsupp.single ∈ Ideal.span (↑(of k G) '' s)\n[PROOFSTEP]\nrefine\n  Ideal.sum_mem _ fun i hi =>\n    ?_\n      -- porting note: changed `apply` to `refine`\n[GOAL]\ncase mpr\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\nhx : x ∈ RHS\ni : G\nhi : i ∈ x.support\n⊢ Finsupp.single i (↑x i) ∈ Ideal.span (↑(of k G) '' s)\n[PROOFSTEP]\nobtain ⟨d, hd, d2, rfl⟩ := hx _ hi\n[GOAL]\ncase mpr.intro.intro.intro\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\nhx : x ∈ RHS\nd : G\nhd : d ∈ s\nd2 : G\nhi : d2 * d ∈ x.support\n⊢ Finsupp.single (d2 * d) (↑x (d2 * d)) ∈ Ideal.span (↑(of k G) '' s)\n[PROOFSTEP]\nconvert Ideal.mul_mem_left _ (id <| Finsupp.single d2 <| x (d2 * d) : MonoidAlgebra k G) _\n[GOAL]\ncase h.e'_4\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\nhx : x ∈ RHS\nd : G\nhd : d ∈ s\nd2 : G\nhi : d2 * d ∈ x.support\n⊢ Finsupp.single (d2 * d) (↑x (d2 * d)) = id (Finsupp.single d2 (↑x (d2 * d))) * ?mpr.intro.intro.intro.convert_2\ncase mpr.intro.intro.intro.convert_2\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\nhx : x ∈ RHS\nd : G\nhd : d ∈ s\nd2 : G\nhi : d2 * d ∈ x.support\n⊢ MonoidAlgebra k G\ncase mpr.intro.intro.intro.convert_3\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\nhx : x ∈ RHS\nd : G\nhd : d ∈ s\nd2 : G\nhi : d2 * d ∈ x.support\n⊢ ?mpr.intro.intro.intro.convert_2 ∈ Ideal.span (↑(of k G) '' s)\n[PROOFSTEP]\npick_goal 3\n[GOAL]\ncase mpr.intro.intro.intro.convert_3\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\nhx : x ∈ RHS\nd : G\nhd : d ∈ s\nd2 : G\nhi : d2 * d ∈ x.support\n⊢ ?mpr.intro.intro.intro.convert_2 ∈ Ideal.span (↑(of k G) '' s)\ncase h.e'_4\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\nhx : x ∈ RHS\nd : G\nhd : d ∈ s\nd2 : G\nhi : d2 * d ∈ x.support\n⊢ Finsupp.single (d2 * d) (↑x (d2 * d)) = id (Finsupp.single d2 (↑x (d2 * d))) * ?mpr.intro.intro.intro.convert_2\ncase mpr.intro.intro.intro.convert_2\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\nhx : x ∈ RHS\nd : G\nhd : d ∈ s\nd2 : G\nhi : d2 * d ∈ x.support\n⊢ MonoidAlgebra k G\n[PROOFSTEP]\nrefine' Ideal.subset_span ⟨_, hd, rfl⟩\n[GOAL]\ncase h.e'_4\nk : Type u_1\nA : Type u_2\nG : Type u_3\ninst✝¹ : Monoid G\ninst✝ : Semiring k\ns : Set G\nx : MonoidAlgebra k G\nRHS : Ideal (MonoidAlgebra k G) :=\n  {\n    toAddSubmonoid :=\n      {\n        toAddSubsemigroup :=\n          { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n            add_mem' :=\n              (_ :\n                ∀ {x y : MonoidAlgebra k G},\n                  x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                    y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                      ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n        zero_mem' := (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n    smul_mem' :=\n      (_ :\n        ∀ (x y : MonoidAlgebra k G),\n          y ∈\n              {\n                    toAddSubsemigroup :=\n                      { carrier := {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'},\n                        add_mem' :=\n                          (_ :\n                            ∀ {x y : MonoidAlgebra k G},\n                              x ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                y ∈ {p | ∀ (m : G), m ∈ p.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m'} →\n                                  ∀ (m : G), m ∈ (x + y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') },\n                    zero_mem' :=\n                      (_ : ∀ (m : G), m ∈ 0.support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }.toAddSubsemigroup.carrier →\n            ∀ (m : G), m ∈ (x • y).support → ∃ m', m' ∈ s ∧ ∃ d, m = d * m') }\nhx : x ∈ RHS\nd : G\nhd : d ∈ s\nd2 : G\nhi : d2 * d ∈ x.support\n⊢ Finsupp.single (d2 * d) (↑x (d2 * d)) = id (Finsupp.single d2 (↑x (d2 * d))) * ↑(of k G) d\n[PROOFSTEP]\nrw [id.def, MonoidAlgebra.of_apply, MonoidAlgebra.single_mul_single, mul_one]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.MonoidAlgebra.Ideal", "llama_tokens": 21585, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7431680086124811, "lm_q2_score": 0.5234203489363239, "lm_q1q2_score": 0.38898925838625786}}
{"text": "[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nf : Functions L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\n⊢ funMap f x ≈ funMap f y\n[PROOFSTEP]\nrefine' mem_of_superset (iInter_mem.2 xy) fun a ha => _\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nf : Functions L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\na : α\nha : a ∈ ⋂ (i : Fin n), {x_1 | (fun a => x i a = y i a) x_1}\n⊢ a ∈ {x_1 | (fun a => funMap f x a = funMap f y a) x_1}\n[PROOFSTEP]\nsimp only [Set.mem_iInter, Set.mem_setOf_eq] at ha \n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nf : Functions L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\na : α\nha : ∀ (i : Fin n), x i a = y i a\n⊢ a ∈ {x_1 | (fun a => funMap f x a = funMap f y a) x_1}\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, ha]\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nr : Relations L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\n⊢ RelMap r x = RelMap r y\n[PROOFSTEP]\nrw [← iff_eq_eq]\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nr : Relations L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\n⊢ RelMap r x ↔ RelMap r y\n[PROOFSTEP]\nrefine' ⟨fun hx => _, fun hy => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nr : Relations L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\nhx : RelMap r x\n⊢ RelMap r y\n[PROOFSTEP]\nrefine' mem_of_superset (inter_mem hx (iInter_mem.2 xy)) _\n[GOAL]\ncase refine'_1\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nr : Relations L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\nhx : RelMap r x\n⊢ {x_1 | (fun a => RelMap r fun i => x i a) x_1} ∩ ⋂ (i : Fin n), {x_1 | (fun a => x i a = y i a) x_1} ⊆\n    {x | (fun a => RelMap r fun i => y i a) x}\n[PROOFSTEP]\nrintro a ⟨ha1, ha2⟩\n[GOAL]\ncase refine'_1.intro\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nr : Relations L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\nhx : RelMap r x\na : α\nha1 : a ∈ {x_1 | (fun a => RelMap r fun i => x i a) x_1}\nha2 : a ∈ ⋂ (i : Fin n), {x_1 | (fun a => x i a = y i a) x_1}\n⊢ a ∈ {x | (fun a => RelMap r fun i => y i a) x}\n[PROOFSTEP]\nsimp only [Set.mem_iInter, Set.mem_setOf_eq] at *\n[GOAL]\ncase refine'_1.intro\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nr : Relations L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\nhx : ∀ᶠ (a : α) in ↑u, RelMap r fun i => x i a\na : α\nha1 : RelMap r fun i => x i a\nha2 : ∀ (i : Fin n), x i a = y i a\n⊢ RelMap r fun i => y i a\n[PROOFSTEP]\nrw [← funext ha2]\n[GOAL]\ncase refine'_1.intro\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nr : Relations L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\nhx : ∀ᶠ (a : α) in ↑u, RelMap r fun i => x i a\na : α\nha1 : RelMap r fun i => x i a\nha2 : ∀ (i : Fin n), x i a = y i a\n⊢ RelMap r fun x_1 => x x_1 a\n[PROOFSTEP]\nexact ha1\n[GOAL]\ncase refine'_2\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nr : Relations L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\nhy : RelMap r y\n⊢ RelMap r x\n[PROOFSTEP]\nrefine' mem_of_superset (inter_mem hy (iInter_mem.2 xy)) _\n[GOAL]\ncase refine'_2\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nr : Relations L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\nhy : RelMap r y\n⊢ {x | (fun a => RelMap r fun i => y i a) x} ∩ ⋂ (i : Fin n), {x_1 | (fun a => x i a = y i a) x_1} ⊆\n    {x_1 | (fun a => RelMap r fun i => x i a) x_1}\n[PROOFSTEP]\nrintro a ⟨ha1, ha2⟩\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nr : Relations L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\nhy : RelMap r y\na : α\nha1 : a ∈ {x | (fun a => RelMap r fun i => y i a) x}\nha2 : a ∈ ⋂ (i : Fin n), {x_1 | (fun a => x i a = y i a) x_1}\n⊢ a ∈ {x_1 | (fun a => RelMap r fun i => x i a) x_1}\n[PROOFSTEP]\nsimp only [Set.mem_iInter, Set.mem_setOf_eq] at *\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nr : Relations L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\nhy : ∀ᶠ (a : α) in ↑u, RelMap r fun i => y i a\na : α\nha1 : RelMap r fun i => y i a\nha2 : ∀ (i : Fin n), x i a = y i a\n⊢ RelMap r fun i => x i a\n[PROOFSTEP]\nrw [funext ha2]\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nsrc✝ : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn : ℕ\nr : Relations L n\nx y : Fin n → (a : α) → M a\nxy : x ≈ y\nhy : ∀ᶠ (a : α) in ↑u, RelMap r fun i => y i a\na : α\nha1 : RelMap r fun i => y i a\nha2 : ∀ (i : Fin n), x i a = y i a\n⊢ RelMap r fun x => y x a\n[PROOFSTEP]\nexact ha1\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nn : ℕ\nf : Functions L n\nx : Fin n → (a : α) → M a\n⊢ (funMap f fun i => Quotient.mk' (x i)) = Quotient.mk' fun a => funMap f fun i => x i a\n[PROOFSTEP]\napply funMap_quotient_mk'\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nβ : Type u_3\nx : β → (a : α) → M a\nt : Term L β\n⊢ Term.realize (fun i => Quotient.mk' (x i)) t = Quotient.mk' fun a => Term.realize (fun i => x i a) t\n[PROOFSTEP]\nconvert\n  @Term.realize_quotient_mk' L _ ((u : Filter α).productSetoid M) (Ultraproduct.setoidPrestructure M u) _ t x using 2\n[GOAL]\ncase h.e'_3.h.e'_3\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nβ : Type u_3\nx : β → (a : α) → M a\nt : Term L β\n⊢ (fun a => Term.realize (fun i => x i a) t) = Term.realize x t\n[PROOFSTEP]\next a\n[GOAL]\ncase h.e'_3.h.e'_3.h\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nβ : Type u_3\nx : β → (a : α) → M a\nt : Term L β\na : α\n⊢ Term.realize (fun i => x i a) t = Term.realize x t a\n[PROOFSTEP]\ninduction t\n[GOAL]\ncase h.e'_3.h.e'_3.h.var\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nβ : Type u_3\nx : β → (a : α) → M a\na : α\n_a✝ : β\n⊢ Term.realize (fun i => x i a) (var _a✝) = Term.realize x (var _a✝) a\ncase h.e'_3.h.e'_3.h.func\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nβ : Type u_3\nx : β → (a : α) → M a\na : α\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L β\n_ts_ih✝ : ∀ (a_1 : Fin l✝), Term.realize (fun i => x i a) (_ts✝ a_1) = Term.realize x (_ts✝ a_1) a\n⊢ Term.realize (fun i => x i a) (func _f✝ _ts✝) = Term.realize x (func _f✝ _ts✝) a\n[PROOFSTEP]\ncase var => rfl\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nβ : Type u_3\nx : β → (a : α) → M a\na : α\n_a✝ : β\n⊢ Term.realize (fun i => x i a) (var _a✝) = Term.realize x (var _a✝) a\n[PROOFSTEP]\ncase var => rfl\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nβ : Type u_3\nx : β → (a : α) → M a\na : α\n_a✝ : β\n⊢ Term.realize (fun i => x i a) (var _a✝) = Term.realize x (var _a✝) a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3.h.e'_3.h.func\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nβ : Type u_3\nx : β → (a : α) → M a\na : α\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L β\n_ts_ih✝ : ∀ (a_1 : Fin l✝), Term.realize (fun i => x i a) (_ts✝ a_1) = Term.realize x (_ts✝ a_1) a\n⊢ Term.realize (fun i => x i a) (func _f✝ _ts✝) = Term.realize x (func _f✝ _ts✝) a\n[PROOFSTEP]\ncase func _ _ _ t_ih =>\n  simp only [Term.realize, t_ih]\n  rfl\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nβ : Type u_3\nx : β → (a : α) → M a\na : α\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L β\nt_ih : ∀ (a_1 : Fin l✝), Term.realize (fun i => x i a) (_ts✝ a_1) = Term.realize x (_ts✝ a_1) a\n⊢ Term.realize (fun i => x i a) (func _f✝ _ts✝) = Term.realize x (func _f✝ _ts✝) a\n[PROOFSTEP]\ncase func _ _ _ t_ih =>\n  simp only [Term.realize, t_ih]\n  rfl\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nβ : Type u_3\nx : β → (a : α) → M a\na : α\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L β\nt_ih : ∀ (a_1 : Fin l✝), Term.realize (fun i => x i a) (_ts✝ a_1) = Term.realize x (_ts✝ a_1) a\n⊢ Term.realize (fun i => x i a) (func _f✝ _ts✝) = Term.realize x (func _f✝ _ts✝) a\n[PROOFSTEP]\nsimp only [Term.realize, t_ih]\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝ : (a : α) → Structure L (M a)\nβ : Type u_3\nx : β → (a : α) → M a\na : α\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L β\nt_ih : ∀ (a_1 : Fin l✝), Term.realize (fun i => x i a) (_ts✝ a_1) = Term.realize x (_ts✝ a_1) a\n⊢ (funMap _f✝ fun i => Term.realize x (_ts✝ i) a) = funMap _f✝ (fun i => Term.realize x (_ts✝ i)) a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nφ : BoundedFormula L β n\nx : β → (a : α) → M a\nv : Fin n → (a : α) → M a\n⊢ (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n    ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\n[PROOFSTEP]\nletI := (u : Filter α).productSetoid M\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nφ : BoundedFormula L β n\nx : β → (a : α) → M a\nv : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\n⊢ (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n    ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ m _ _ ih ih' k φ ih\n[GOAL]\ncase falsum\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ : ℕ\nv : Fin n✝ → (a : α) → M a\n⊢ (BoundedFormula.Realize BoundedFormula.falsum (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n    ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize BoundedFormula.falsum (fun i => x i a) fun i => v i a\n[PROOFSTEP]\nsimp only [BoundedFormula.Realize, eventually_const]\n[GOAL]\ncase equal\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\n⊢ (BoundedFormula.Realize (BoundedFormula.equal t₁✝ t₂✝) (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n    ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize (BoundedFormula.equal t₁✝ t₂✝) (fun i => x i a) fun i => v i a\n[PROOFSTEP]\nhave h2 : ∀ a : α, (Sum.elim (fun i : β => x i a) fun i => v i a) = fun i => Sum.elim x v i a := fun a =>\n  funext fun i => Sum.casesOn i (fun i => rfl) fun i => rfl\n[GOAL]\ncase equal\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\nh2 : ∀ (a : α), (Sum.elim (fun i => x i a) fun i => v i a) = fun i => Sum.elim x v i a\n⊢ (BoundedFormula.Realize (BoundedFormula.equal t₁✝ t₂✝) (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n    ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize (BoundedFormula.equal t₁✝ t₂✝) (fun i => x i a) fun i => v i a\n[PROOFSTEP]\nsimp only [BoundedFormula.Realize, h2, term_realize_cast]\n[GOAL]\ncase equal\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\nh2 : ∀ (a : α), (Sum.elim (fun i => x i a) fun i => v i a) = fun i => Sum.elim x v i a\n⊢ Term.realize (Sum.elim (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) t₁✝ =\n      Term.realize (Sum.elim (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) t₂✝ ↔\n    ∀ᶠ (a : α) in ↑u, Term.realize (fun i => Sum.elim x v i a) t₁✝ = Term.realize (fun i => Sum.elim x v i a) t₂✝\n[PROOFSTEP]\nerw [(Sum.comp_elim ((↑) : (∀ a, M a) → (u : Filter α).Product M) x v).symm, term_realize_cast, term_realize_cast]\n[GOAL]\ncase equal\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\nh2 : ∀ (a : α), (Sum.elim (fun i => x i a) fun i => v i a) = fun i => Sum.elim x v i a\n⊢ ((Quotient.mk' fun a => Term.realize (fun i => Sum.elim x v i a) t₁✝) =\n      Quotient.mk' fun a => Term.realize (fun i => Sum.elim x v i a) t₂✝) ↔\n    ∀ᶠ (a : α) in ↑u, Term.realize (fun i => Sum.elim x v i a) t₁✝ = Term.realize (fun i => Sum.elim x v i a) t₂✝\n[PROOFSTEP]\nexact Quotient.eq''\n[GOAL]\ncase rel\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\n⊢ (BoundedFormula.Realize (BoundedFormula.rel R✝ ts✝) (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n    ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize (BoundedFormula.rel R✝ ts✝) (fun i => x i a) fun i => v i a\n[PROOFSTEP]\nhave h2 : ∀ a : α, (Sum.elim (fun i : β => x i a) fun i => v i a) = fun i => Sum.elim x v i a := fun a =>\n  funext fun i => Sum.casesOn i (fun i => rfl) fun i => rfl\n[GOAL]\ncase rel\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\nh2 : ∀ (a : α), (Sum.elim (fun i => x i a) fun i => v i a) = fun i => Sum.elim x v i a\n⊢ (BoundedFormula.Realize (BoundedFormula.rel R✝ ts✝) (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n    ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize (BoundedFormula.rel R✝ ts✝) (fun i => x i a) fun i => v i a\n[PROOFSTEP]\nsimp only [BoundedFormula.Realize, h2]\n[GOAL]\ncase rel\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\nh2 : ∀ (a : α), (Sum.elim (fun i => x i a) fun i => v i a) = fun i => Sum.elim x v i a\n⊢ (RelMap R✝ fun i => Term.realize (Sum.elim (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) (ts✝ i)) ↔\n    ∀ᶠ (a : α) in ↑u, RelMap R✝ fun i => Term.realize (fun i => Sum.elim x v i a) (ts✝ i)\n[PROOFSTEP]\nerw [(Sum.comp_elim ((↑) : (∀ a, M a) → (u : Filter α).Product M) x v).symm]\n[GOAL]\ncase rel\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\nh2 : ∀ (a : α), (Sum.elim (fun i => x i a) fun i => v i a) = fun i => Sum.elim x v i a\n⊢ (RelMap R✝ fun i => Term.realize (Quotient.mk' ∘ Sum.elim x v) (ts✝ i)) ↔\n    ∀ᶠ (a : α) in ↑u, RelMap R✝ fun i => Term.realize (fun i => Sum.elim x v i a) (ts✝ i)\n[PROOFSTEP]\nconv_lhs => enter [2, i]; erw [term_realize_cast]\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\nh2 : ∀ (a : α), (Sum.elim (fun i => x i a) fun i => v i a) = fun i => Sum.elim x v i a\n| RelMap R✝ fun i => Term.realize (Quotient.mk' ∘ Sum.elim x v) (ts✝ i)\n[PROOFSTEP]\nenter [2, i]; erw [term_realize_cast]\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\nh2 : ∀ (a : α), (Sum.elim (fun i => x i a) fun i => v i a) = fun i => Sum.elim x v i a\n| RelMap R✝ fun i => Term.realize (Quotient.mk' ∘ Sum.elim x v) (ts✝ i)\n[PROOFSTEP]\nenter [2, i]; erw [term_realize_cast]\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\nh2 : ∀ (a : α), (Sum.elim (fun i => x i a) fun i => v i a) = fun i => Sum.elim x v i a\n| RelMap R✝ fun i => Term.realize (Quotient.mk' ∘ Sum.elim x v) (ts✝ i)\n[PROOFSTEP]\nenter [2, i]\n[GOAL]\ncase h\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\nh2 : ∀ (a : α), (Sum.elim (fun i => x i a) fun i => v i a) = fun i => Sum.elim x v i a\ni : Fin l✝\n| Term.realize (Quotient.mk' ∘ Sum.elim x v) (ts✝ i)\n[PROOFSTEP]\nerw [term_realize_cast]\n[GOAL]\ncase rel\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (β ⊕ Fin n✝)\nv : Fin n✝ → (a : α) → M a\nh2 : ∀ (a : α), (Sum.elim (fun i => x i a) fun i => v i a) = fun i => Sum.elim x v i a\n⊢ (RelMap R✝ fun i => Quotient.mk' fun a => Term.realize (fun i => Sum.elim x v i a) (ts✝ i)) ↔\n    ∀ᶠ (a : α) in ↑u, RelMap R✝ fun i => Term.realize (fun i => Sum.elim x v i a) (ts✝ i)\n[PROOFSTEP]\napply relMap_quotient_mk'\n[GOAL]\ncase imp\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nm : ℕ\nf₁✝ f₂✝ : BoundedFormula L β m\nih :\n  ∀ (v : Fin m → (a : α) → M a),\n    (BoundedFormula.Realize f₁✝ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize f₁✝ (fun i => x i a) fun i => v i a\nih' :\n  ∀ (v : Fin m → (a : α) → M a),\n    (BoundedFormula.Realize f₂✝ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize f₂✝ (fun i => x i a) fun i => v i a\nv : Fin m → (a : α) → M a\n⊢ (BoundedFormula.Realize (f₁✝ ⟹ f₂✝) (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n    ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize (f₁✝ ⟹ f₂✝) (fun i => x i a) fun i => v i a\n[PROOFSTEP]\nsimp only [BoundedFormula.Realize, ih v, ih' v]\n[GOAL]\ncase imp\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nm : ℕ\nf₁✝ f₂✝ : BoundedFormula L β m\nih :\n  ∀ (v : Fin m → (a : α) → M a),\n    (BoundedFormula.Realize f₁✝ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize f₁✝ (fun i => x i a) fun i => v i a\nih' :\n  ∀ (v : Fin m → (a : α) → M a),\n    (BoundedFormula.Realize f₂✝ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize f₂✝ (fun i => x i a) fun i => v i a\nv : Fin m → (a : α) → M a\n⊢ ((∀ᶠ (a : α) in ↑u, BoundedFormula.Realize f₁✝ (fun i => x i a) fun i => v i a) →\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize f₂✝ (fun i => x i a) fun i => v i a) ↔\n    ∀ᶠ (a : α) in ↑u,\n      (BoundedFormula.Realize f₁✝ (fun i => x i a) fun i => v i a) →\n        BoundedFormula.Realize f₂✝ (fun i => x i a) fun i => v i a\n[PROOFSTEP]\nrw [Ultrafilter.eventually_imp]\n[GOAL]\ncase all\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\n⊢ (BoundedFormula.Realize (∀'φ) (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n    ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize (∀'φ) (fun i => x i a) fun i => v i a\n[PROOFSTEP]\nsimp only [BoundedFormula.Realize]\n[GOAL]\ncase all\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\n⊢ (∀ (x_1 : Quotient (productSetoid ↑u fun a => M a)),\n      BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) (Fin.snoc (fun i => Quotient.mk' (v i)) x_1)) ↔\n    ∀ᶠ (a : α) in ↑u, ∀ (x_1 : M a), BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) x_1)\n[PROOFSTEP]\napply\n  Iff.trans (b :=\n    ∀ m : ∀ a : α, M a,\n      φ.Realize (fun i : β => (x i : (u : Filter α).Product M))\n        (Fin.snoc (((↑) : (∀ a, M a) → (u : Filter α).Product M) ∘ v) (m : (u : Filter α).Product M)))\n[GOAL]\ncase all.h₁\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\n⊢ (∀ (x_1 : Quotient (productSetoid ↑u fun a => M a)),\n      BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) (Fin.snoc (fun i => Quotient.mk' (v i)) x_1)) ↔\n    ∀ (m : (a : α) → M a),\n      BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) (Fin.snoc (Quotient.mk' ∘ v) (Quotient.mk' m))\n[PROOFSTEP]\nexact forall_quotient_iff\n[GOAL]\ncase all.h₂\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\n⊢ (∀ (m : (a : α) → M a),\n      BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) (Fin.snoc (Quotient.mk' ∘ v) (Quotient.mk' m))) ↔\n    ∀ᶠ (a : α) in ↑u, ∀ (x_1 : M a), BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) x_1)\n[PROOFSTEP]\nhave h' :\n  ∀ (m : ∀ a, M a) (a : α),\n    (fun i : Fin (k + 1) => (Fin.snoc v m : _ → ∀ a, M a) i a) = Fin.snoc (fun i : Fin k => v i a) (m a) :=\n  by\n  refine' fun m a => funext (Fin.reverseInduction _ fun i _ => _)\n  · simp only [Fin.snoc_last]\n  · simp only [Fin.snoc_castSucc]\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\n⊢ ∀ (m : (a : α) → M a) (a : α), (fun i => Fin.snoc v m i a) = Fin.snoc (fun i => v i a) (m a)\n[PROOFSTEP]\nrefine' fun m a => funext (Fin.reverseInduction _ fun i _ => _)\n[GOAL]\ncase refine'_1\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\nm : (a : α) → M a\na : α\n⊢ Fin.snoc v m (Fin.last k) a = Fin.snoc (fun i => v i a) (m a) (Fin.last k)\n[PROOFSTEP]\nsimp only [Fin.snoc_last]\n[GOAL]\ncase refine'_2\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\nm : (a : α) → M a\na : α\ni : Fin k\nx✝ : Fin.snoc v m (Fin.succ i) a = Fin.snoc (fun i => v i a) (m a) (Fin.succ i)\n⊢ Fin.snoc v m (Fin.castSucc i) a = Fin.snoc (fun i => v i a) (m a) (Fin.castSucc i)\n[PROOFSTEP]\nsimp only [Fin.snoc_castSucc]\n[GOAL]\ncase all.h₂\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\nh' : ∀ (m : (a : α) → M a) (a : α), (fun i => Fin.snoc v m i a) = Fin.snoc (fun i => v i a) (m a)\n⊢ (∀ (m : (a : α) → M a),\n      BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) (Fin.snoc (Quotient.mk' ∘ v) (Quotient.mk' m))) ↔\n    ∀ᶠ (a : α) in ↑u, ∀ (x_1 : M a), BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) x_1)\n[PROOFSTEP]\nsimp only [← Fin.comp_snoc]\n[GOAL]\ncase all.h₂\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\nh' : ∀ (m : (a : α) → M a) (a : α), (fun i => Fin.snoc v m i a) = Fin.snoc (fun i => v i a) (m a)\n⊢ (∀ (m : (a : α) → M a), BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) (Quotient.mk' ∘ Fin.snoc v m)) ↔\n    ∀ᶠ (a : α) in ↑u, ∀ (x_1 : M a), BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) x_1)\n[PROOFSTEP]\nsimp only [Function.comp, ih, h']\n[GOAL]\ncase all.h₂\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\nh' : ∀ (m : (a : α) → M a) (a : α), (fun i => Fin.snoc v m i a) = Fin.snoc (fun i => v i a) (m a)\n⊢ (∀ (m : (a : α) → M a),\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) (m a))) ↔\n    ∀ᶠ (a : α) in ↑u, ∀ (x_1 : M a), BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) x_1)\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h m => _⟩\n[GOAL]\ncase all.h₂.refine'_1\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\nh' : ∀ (m : (a : α) → M a) (a : α), (fun i => Fin.snoc v m i a) = Fin.snoc (fun i => v i a) (m a)\nh : ∀ (m : (a : α) → M a), ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) (m a))\n⊢ ∀ᶠ (a : α) in ↑u, ∀ (x_1 : M a), BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) x_1)\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase all.h₂.refine'_1\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\nh' : ∀ (m : (a : α) → M a) (a : α), (fun i => Fin.snoc v m i a) = Fin.snoc (fun i => v i a) (m a)\nh : ¬∀ᶠ (a : α) in ↑u, ∀ (x_1 : M a), BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) x_1)\n⊢ ∃ m, ¬∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) (m a))\n[PROOFSTEP]\nsimp_rw [← Ultrafilter.eventually_not, not_forall] at h \n[GOAL]\ncase all.h₂.refine'_1\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\nh' : ∀ (m : (a : α) → M a) (a : α), (fun i => Fin.snoc v m i a) = Fin.snoc (fun i => v i a) (m a)\nh : ∀ᶠ (x_1 : α) in ↑u, ∃ x_2, ¬BoundedFormula.Realize φ (fun i => x i x_1) (Fin.snoc (fun i => v i x_1) x_2)\n⊢ ∃ m, ¬∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) (m a))\n[PROOFSTEP]\nrefine' ⟨fun a : α => Classical.epsilon fun m : M a => ¬φ.Realize (fun i => x i a) (Fin.snoc (fun i => v i a) m), _⟩\n[GOAL]\ncase all.h₂.refine'_1\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\nh' : ∀ (m : (a : α) → M a) (a : α), (fun i => Fin.snoc v m i a) = Fin.snoc (fun i => v i a) (m a)\nh : ∀ᶠ (x_1 : α) in ↑u, ∃ x_2, ¬BoundedFormula.Realize φ (fun i => x i x_1) (Fin.snoc (fun i => v i x_1) x_2)\n⊢ ¬∀ᶠ (a : α) in ↑u,\n      BoundedFormula.Realize φ (fun i => x i a)\n        (Fin.snoc (fun i => v i a)\n          ((fun a =>\n              Classical.epsilon fun m => ¬BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) m))\n            a))\n[PROOFSTEP]\nrw [← Ultrafilter.eventually_not]\n[GOAL]\ncase all.h₂.refine'_1\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\nh' : ∀ (m : (a : α) → M a) (a : α), (fun i => Fin.snoc v m i a) = Fin.snoc (fun i => v i a) (m a)\nh : ∀ᶠ (x_1 : α) in ↑u, ∃ x_2, ¬BoundedFormula.Realize φ (fun i => x i x_1) (Fin.snoc (fun i => v i x_1) x_2)\n⊢ ∀ᶠ (x_1 : α) in ↑u,\n    ¬BoundedFormula.Realize φ (fun i => x i x_1)\n        (Fin.snoc (fun i => v i x_1)\n          ((fun a =>\n              Classical.epsilon fun m => ¬BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) m))\n            x_1))\n[PROOFSTEP]\nexact Filter.mem_of_superset h fun a ha => Classical.epsilon_spec ha\n[GOAL]\ncase all.h₂.refine'_2\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\nh' : ∀ (m : (a : α) → M a) (a : α), (fun i => Fin.snoc v m i a) = Fin.snoc (fun i => v i a) (m a)\nh : ∀ᶠ (a : α) in ↑u, ∀ (x_1 : M a), BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) x_1)\nm : (a : α) → M a\n⊢ ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) (Fin.snoc (fun i => v i a) (m a))\n[PROOFSTEP]\nrw [Filter.eventually_iff] at *\n[GOAL]\ncase all.h₂.refine'_2\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nn : ℕ\nx : β → (a : α) → M a\nv✝ : Fin n → (a : α) → M a\nthis : Setoid ((a : α) → M a) := productSetoid (↑u) M\nk : ℕ\nφ : BoundedFormula L β (k + 1)\nih :\n  ∀ (v : Fin (k + 1) → (a : α) → M a),\n    (BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' (v i)) ↔\n      ∀ᶠ (a : α) in ↑u, BoundedFormula.Realize φ (fun i => x i a) fun i => v i a\nv : Fin k → (a : α) → M a\nh' : ∀ (m : (a : α) → M a) (a : α), (fun i => Fin.snoc v m i a) = Fin.snoc (fun i => v i a) (m a)\nh : {x_1 | ∀ (x_2 : M x_1), BoundedFormula.Realize φ (fun i => x i x_1) (Fin.snoc (fun i => v i x_1) x_2)} ∈ ↑u\nm : (a : α) → M a\n⊢ {x_1 | BoundedFormula.Realize φ (fun i => x i x_1) (Fin.snoc (fun i => v i x_1) (m x_1))} ∈ ↑u\n[PROOFSTEP]\nexact Filter.mem_of_superset h fun a ha => ha (m a)\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nφ : Formula L β\nx : β → (a : α) → M a\n⊢ (Formula.Realize φ fun i => Quotient.mk' (x i)) ↔ ∀ᶠ (a : α) in ↑u, Formula.Realize φ fun i => x i a\n[PROOFSTEP]\nsimp_rw [Formula.Realize, ← boundedFormula_realize_cast φ x, iff_eq_eq]\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nβ : Type u_3\nφ : Formula L β\nx : β → (a : α) → M a\n⊢ BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) default =\n    BoundedFormula.Realize φ (fun i => Quotient.mk' (x i)) fun i => Quotient.mk' fun a => default i\n[PROOFSTEP]\nexact congr rfl (Subsingleton.elim _ _)\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nφ : Sentence L\n⊢ Product (↑u) M ⊨ φ ↔ ∀ᶠ (a : α) in ↑u, M a ⊨ φ\n[PROOFSTEP]\nsimp_rw [Sentence.Realize]\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nφ : Sentence L\n⊢ Formula.Realize φ default ↔ ∀ᶠ (a : α) in ↑u, Formula.Realize φ default\n[PROOFSTEP]\nerw [← realize_formula_cast φ, iff_eq_eq]\n[GOAL]\nα : Type u_1\nM : α → Type u_2\nu : Ultrafilter α\nL : Language\ninst✝¹ : (a : α) → Structure L (M a)\ninst✝ : ∀ (a : α), Nonempty (M a)\nφ : Sentence L\n⊢ Formula.Realize φ default = Formula.Realize φ fun i => Quotient.mk' fun a => default i\n[PROOFSTEP]\nexact congr rfl (Subsingleton.elim _ _)\n", "meta": {"mathlib_filename": "Mathlib.ModelTheory.Ultraproducts", "llama_tokens": 20540, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6825737473266735, "lm_q2_score": 0.5698526514141572, "lm_q1q2_score": 0.3889664596998019}}
{"text": "[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y X₁ Y₁ : C\nα : X ≅ X₁\nβ : Y ≅ Y₁\nf : X ⟶ Y\n⊢ α.hom ≫ (α.inv ≫ f ≫ β.hom) ≫ β.inv = f\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc, β.hom_inv_id, α.hom_inv_id_assoc, Category.comp_id]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y X₁ Y₁ : C\nα : X ≅ X₁\nβ : Y ≅ Y₁\nf : X₁ ⟶ Y₁\n⊢ α.inv ≫ (α.hom ≫ f ≫ β.inv) ≫ β.hom = f\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc, β.inv_hom_id, α.inv_hom_id_assoc, Category.comp_id]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y X₁ Y₁ : C\nα : X ≅ X₁\nβ : Y ≅ Y₁\nf : X ⟶ Y\n⊢ ↑(homCongr α β) f = α.inv ≫ f ≫ β.hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z X₁ Y₁ Z₁ : C\nα : X ≅ X₁\nβ : Y ≅ Y₁\nγ : Z ≅ Z₁\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ ↑(homCongr α γ) (f ≫ g) = ↑(homCongr α β) f ≫ ↑(homCongr β γ) g\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\n⊢ ↑(homCongr (refl X) (refl Y)) f = f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX₁ Y₁ X₂ Y₂ X₃ Y₃ : C\nα₁ : X₁ ≅ X₂\nβ₁ : Y₁ ≅ Y₂\nα₂ : X₂ ≅ X₃\nβ₂ : Y₂ ≅ Y₃\nf : X₁ ⟶ Y₁\n⊢ ↑(homCongr (α₁ ≪≫ α₂) (β₁ ≪≫ β₂)) f = ↑((homCongr α₁ β₁).trans (homCongr α₂ β₂)) f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nα : X ≅ Y\nf : End X\n⊢ ↑(conj (refl X)) f = f\n[PROOFSTEP]\nrw [conj_apply, Iso.refl_inv, Iso.refl_hom, Category.id_comp, Category.comp_id]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nα : X ≅ Y\nf : End X\n⊢ ↑(conj α.symm) (↑(conj α) f) = f\n[PROOFSTEP]\nrw [← trans_conj, α.self_symm_id, refl_conj]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nα : X ≅ Y\nf : Aut X\n⊢ ↑(conjAut α) f = α.symm ≪≫ f ≪≫ α\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nα : X ≅ Y\nZ : C\nβ : Y ≅ Z\nf : Aut X\n⊢ ↑(conjAut (α ≪≫ β)) f = ↑(conjAut β) (↑(conjAut α) f)\n[PROOFSTEP]\nsimp only [conjAut_apply, Iso.trans_symm, Iso.trans_assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u₁\ninst✝ : Category.{v₁, u₁} D\nF : C ⥤ D\nX Y X₁ Y₁ : C\nα : X ≅ X₁\nβ : Y ≅ Y₁\nf : X ⟶ Y\n⊢ F.map (↑(Iso.homCongr α β) f) = ↑(Iso.homCongr (F.mapIso α) (F.mapIso β)) (F.map f)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u₁\ninst✝ : Category.{v₁, u₁} D\nF✝ F : C ⥤ D\nX Y : C\nα : X ≅ Y\nf : Aut X\n⊢ F.mapIso (↑(Iso.conjAut α) f) = ↑(Iso.conjAut (F.mapIso α)) (F.mapIso f)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u₁\ninst✝ : Category.{v₁, u₁} D\nF✝ F : C ⥤ D\nX Y : C\nα : X ≅ Y\nf : Aut X\n⊢ (F.mapIso (↑(Iso.conjAut α) f)).hom = (↑(Iso.conjAut (F.mapIso α)) (F.mapIso f)).hom\n[PROOFSTEP]\nsimp only [mapIso_hom, Iso.conjAut_hom, F.map_conj]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Conj", "llama_tokens": 1587, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6825737344123242, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.3889664523405256}}
{"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G.op ⊣ F.op\n⊢ ∀ {X' X : C} {Y : D} (f : X' ⟶ X) (g : X ⟶ G.obj Y),\n    ↑(fun {X} {Y} =>\n              ((homEquiv h (Opposite.op Y) (Opposite.op X)).trans\n                      (opEquiv (Opposite.op Y) (F.op.obj (Opposite.op X)))).symm.trans\n                (opEquiv (G.op.obj (Opposite.op Y)) (Opposite.op X))).symm\n        (f ≫ g) =\n      F.map f ≫\n        ↑(fun {X} {Y} =>\n                ((homEquiv h (Opposite.op Y) (Opposite.op X)).trans\n                        (opEquiv (Opposite.op Y) (F.op.obj (Opposite.op X)))).symm.trans\n                  (opEquiv (G.op.obj (Opposite.op Y)) (Opposite.op X))).symm\n          g\n[PROOFSTEP]\nintros X' X Y f g\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G.op ⊣ F.op\nX' X : C\nY : D\nf : X' ⟶ X\ng : X ⟶ G.obj Y\n⊢ ↑(fun {X} {Y} =>\n            ((homEquiv h (Opposite.op Y) (Opposite.op X)).trans\n                    (opEquiv (Opposite.op Y) (F.op.obj (Opposite.op X)))).symm.trans\n              (opEquiv (G.op.obj (Opposite.op Y)) (Opposite.op X))).symm\n      (f ≫ g) =\n    F.map f ≫\n      ↑(fun {X} {Y} =>\n              ((homEquiv h (Opposite.op Y) (Opposite.op X)).trans\n                      (opEquiv (Opposite.op Y) (F.op.obj (Opposite.op X)))).symm.trans\n                (opEquiv (G.op.obj (Opposite.op Y)) (Opposite.op X))).symm\n        g\n[PROOFSTEP]\ndsimp [opEquiv]\n  -- Porting note: Why is `erw` needed here?\n        -- https://github.com/leanprover-community/mathlib4/issues/5164\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G.op ⊣ F.op\nX' X : C\nY : D\nf : X' ⟶ X\ng : X ⟶ G.obj Y\n⊢ (↑(homEquiv h (Opposite.op Y) (Opposite.op X')) (g.op ≫ f.op)).unop =\n    F.map f ≫ (↑(homEquiv h (Opposite.op Y) (Opposite.op X)) g.op).unop\n[PROOFSTEP]\nerw [homEquiv_unit, homEquiv_unit]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G.op ⊣ F.op\nX' X : C\nY : D\nf : X' ⟶ X\ng : X ⟶ G.obj Y\n⊢ (NatTrans.app h.unit (Opposite.op Y) ≫ F.op.map (g.op ≫ f.op)).unop =\n    F.map f ≫ (NatTrans.app h.unit (Opposite.op Y) ≫ F.op.map g.op).unop\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G.op ⊣ F.op\n⊢ ∀ {X : C} {Y Y' : D} (f : F.obj X ⟶ Y) (g : Y ⟶ Y'),\n    (↑fun {X} {Y} =>\n          ((homEquiv h (Opposite.op Y) (Opposite.op X)).trans\n                  (opEquiv (Opposite.op Y) (F.op.obj (Opposite.op X)))).symm.trans\n            (opEquiv (G.op.obj (Opposite.op Y)) (Opposite.op X)))\n        (f ≫ g) =\n      (↑fun {X} {Y} =>\n            ((homEquiv h (Opposite.op Y) (Opposite.op X)).trans\n                    (opEquiv (Opposite.op Y) (F.op.obj (Opposite.op X)))).symm.trans\n              (opEquiv (G.op.obj (Opposite.op Y)) (Opposite.op X)))\n          f ≫\n        G.map g\n[PROOFSTEP]\nintros X Y Y' f g\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G.op ⊣ F.op\nX : C\nY Y' : D\nf : F.obj X ⟶ Y\ng : Y ⟶ Y'\n⊢ (↑fun {X} {Y} =>\n        ((homEquiv h (Opposite.op Y) (Opposite.op X)).trans\n                (opEquiv (Opposite.op Y) (F.op.obj (Opposite.op X)))).symm.trans\n          (opEquiv (G.op.obj (Opposite.op Y)) (Opposite.op X)))\n      (f ≫ g) =\n    (↑fun {X} {Y} =>\n          ((homEquiv h (Opposite.op Y) (Opposite.op X)).trans\n                  (opEquiv (Opposite.op Y) (F.op.obj (Opposite.op X)))).symm.trans\n            (opEquiv (G.op.obj (Opposite.op Y)) (Opposite.op X)))\n        f ≫\n      G.map g\n[PROOFSTEP]\ndsimp [opEquiv]\n  -- Porting note: Why is `erw` needed here?\n        -- https://github.com/leanprover-community/mathlib4/issues/5164\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G.op ⊣ F.op\nX : C\nY Y' : D\nf : F.obj X ⟶ Y\ng : Y ⟶ Y'\n⊢ (↑(homEquiv h (Opposite.op Y') (Opposite.op X)).symm (g.op ≫ f.op)).unop =\n    (↑(homEquiv h (Opposite.op Y) (Opposite.op X)).symm f.op).unop ≫ G.map g\n[PROOFSTEP]\nerw [homEquiv_counit, homEquiv_counit]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G.op ⊣ F.op\nX : C\nY Y' : D\nf : F.obj X ⟶ Y\ng : Y ⟶ Y'\n⊢ (G.op.map (g.op ≫ f.op) ≫ NatTrans.app h.counit (Opposite.op X)).unop =\n    (G.op.map f.op ≫ NatTrans.app h.counit (Opposite.op X)).unop ≫ G.map g\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G ⊣ F\n⊢ ∀ {X' X : Cᵒᵖ} {Y : Dᵒᵖ} (f : X' ⟶ X) (g : X ⟶ G.op.obj Y),\n    ↑((fun X Y =>\n                (opEquiv (F.op.obj X) Y).trans\n                  ((homEquiv h Y.unop X.unop).symm.trans (opEquiv X (Opposite.op (G.toPrefunctor.1 Y.unop))).symm))\n              X' Y).symm\n        (f ≫ g) =\n      F.op.map f ≫\n        ↑((fun X Y =>\n                  (opEquiv (F.op.obj X) Y).trans\n                    ((homEquiv h Y.unop X.unop).symm.trans (opEquiv X (Opposite.op (G.toPrefunctor.1 Y.unop))).symm))\n                X Y).symm\n          g\n[PROOFSTEP]\nintros X' X Y f g\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G ⊣ F\nX' X : Cᵒᵖ\nY : Dᵒᵖ\nf : X' ⟶ X\ng : X ⟶ G.op.obj Y\n⊢ ↑((fun X Y =>\n              (opEquiv (F.op.obj X) Y).trans\n                ((homEquiv h Y.unop X.unop).symm.trans (opEquiv X (Opposite.op (G.toPrefunctor.1 Y.unop))).symm))\n            X' Y).symm\n      (f ≫ g) =\n    F.op.map f ≫\n      ↑((fun X Y =>\n                (opEquiv (F.op.obj X) Y).trans\n                  ((homEquiv h Y.unop X.unop).symm.trans (opEquiv X (Opposite.op (G.toPrefunctor.1 Y.unop))).symm))\n              X Y).symm\n        g\n[PROOFSTEP]\ndsimp [opEquiv]\n  -- Porting note: Why is `erw` needed here?\n        -- https://github.com/leanprover-community/mathlib4/issues/5164\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G ⊣ F\nX' X : Cᵒᵖ\nY : Dᵒᵖ\nf : X' ⟶ X\ng : X ⟶ G.op.obj Y\n⊢ (↑(homEquiv h Y.unop X'.unop) (g.unop ≫ f.unop)).op = (F.map f.unop).op ≫ (↑(homEquiv h Y.unop X.unop) g.unop).op\n[PROOFSTEP]\nerw [homEquiv_unit, homEquiv_unit]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G ⊣ F\nX' X : Cᵒᵖ\nY : Dᵒᵖ\nf : X' ⟶ X\ng : X ⟶ G.op.obj Y\n⊢ (NatTrans.app h.unit Y.unop ≫ F.map (g.unop ≫ f.unop)).op =\n    (F.map f.unop).op ≫ (NatTrans.app h.unit Y.unop ≫ F.map g.unop).op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G ⊣ F\n⊢ ∀ {X : Cᵒᵖ} {Y Y' : Dᵒᵖ} (f : F.op.obj X ⟶ Y) (g : Y ⟶ Y'),\n    ↑((fun X Y =>\n              (opEquiv (F.op.obj X) Y).trans\n                ((homEquiv h Y.unop X.unop).symm.trans (opEquiv X (Opposite.op (G.toPrefunctor.1 Y.unop))).symm))\n            X Y')\n        (f ≫ g) =\n      ↑((fun X Y =>\n                (opEquiv (F.op.obj X) Y).trans\n                  ((homEquiv h Y.unop X.unop).symm.trans (opEquiv X (Opposite.op (G.toPrefunctor.1 Y.unop))).symm))\n              X Y)\n          f ≫\n        G.op.map g\n[PROOFSTEP]\nintros X' X Y f g\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G ⊣ F\nX' : Cᵒᵖ\nX Y : Dᵒᵖ\nf : F.op.obj X' ⟶ X\ng : X ⟶ Y\n⊢ ↑((fun X Y =>\n            (opEquiv (F.op.obj X) Y).trans\n              ((homEquiv h Y.unop X.unop).symm.trans (opEquiv X (Opposite.op (G.toPrefunctor.1 Y.unop))).symm))\n          X' Y)\n      (f ≫ g) =\n    ↑((fun X Y =>\n              (opEquiv (F.op.obj X) Y).trans\n                ((homEquiv h Y.unop X.unop).symm.trans (opEquiv X (Opposite.op (G.toPrefunctor.1 Y.unop))).symm))\n            X' X)\n        f ≫\n      G.op.map g\n[PROOFSTEP]\ndsimp [opEquiv]\n  -- Porting note: Why is `erw` needed here?\n        -- https://github.com/leanprover-community/mathlib4/issues/5164\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G ⊣ F\nX' : Cᵒᵖ\nX Y : Dᵒᵖ\nf : F.op.obj X' ⟶ X\ng : X ⟶ Y\n⊢ (↑(homEquiv h Y.unop X'.unop).symm (g.unop ≫ f.unop)).op =\n    (↑(homEquiv h X.unop X'.unop).symm f.unop).op ≫ (G.map g.unop).op\n[PROOFSTEP]\nerw [homEquiv_counit, homEquiv_counit]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nh : G ⊣ F\nX' : Cᵒᵖ\nX Y : Dᵒᵖ\nf : F.op.obj X' ⟶ X\ng : X ⟶ Y\n⊢ (G.map (g.unop ≫ f.unop) ≫ NatTrans.app h.counit X'.unop).op =\n    (G.map f.unop ≫ NatTrans.app h.counit X'.unop).op ≫ (G.map g.unop).op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : C\n⊢ ↑(homEquiv adj1 x (F'.obj x)) (NatTrans.app (leftAdjointUniq adj1 adj2).hom x) = NatTrans.app adj2.unit x\n[PROOFSTEP]\napply (adj1.homEquiv _ _).symm.injective\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : C\n⊢ ↑(homEquiv adj1 x (F'.obj x)).symm (↑(homEquiv adj1 x (F'.obj x)) (NatTrans.app (leftAdjointUniq adj1 adj2).hom x)) =\n    ↑(homEquiv adj1 x (F'.obj x)).symm (NatTrans.app adj2.unit x)\n[PROOFSTEP]\napply Quiver.Hom.op_inj\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : C\n⊢ (↑(homEquiv adj1 x (F'.obj x)).symm\n        (↑(homEquiv adj1 x (F'.obj x)) (NatTrans.app (leftAdjointUniq adj1 adj2).hom x))).op =\n    (↑(homEquiv adj1 x (F'.obj x)).symm (NatTrans.app adj2.unit x)).op\n[PROOFSTEP]\napply coyoneda.map_injective\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : C\n⊢ coyoneda.map\n      (↑(homEquiv adj1 x (F'.obj x)).symm\n          (↑(homEquiv adj1 x (F'.obj x)) (NatTrans.app (leftAdjointUniq adj1 adj2).hom x))).op =\n    coyoneda.map (↑(homEquiv adj1 x (F'.obj x)).symm (NatTrans.app adj2.unit x)).op\n[PROOFSTEP]\next\n  -- Porting note: Why do I need this with the `ext` from the previous line?\n[GOAL]\ncase a.a.a.w.h.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : C\nx✝ : D\na✝ : (coyoneda.obj (Opposite.op (F'.obj x))).obj x✝\n⊢ NatTrans.app\n      (coyoneda.map\n        (↑(homEquiv adj1 x (F'.obj x)).symm\n            (↑(homEquiv adj1 x (F'.obj x)) (NatTrans.app (leftAdjointUniq adj1 adj2).hom x))).op)\n      x✝ a✝ =\n    NatTrans.app (coyoneda.map (↑(homEquiv adj1 x (F'.obj x)).symm (NatTrans.app adj2.unit x)).op) x✝ a✝\n[PROOFSTEP]\nfunext\n[GOAL]\ncase a.a.a.w.h.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : C\nx✝ : D\na✝ : (coyoneda.obj (Opposite.op (F'.obj x))).obj x✝\n⊢ NatTrans.app\n      (coyoneda.map\n        (↑(homEquiv adj1 x (F'.obj x)).symm\n            (↑(homEquiv adj1 x (F'.obj x)) (NatTrans.app (leftAdjointUniq adj1 adj2).hom x))).op)\n      x✝ a✝ =\n    NatTrans.app (coyoneda.map (↑(homEquiv adj1 x (F'.obj x)).symm (NatTrans.app adj2.unit x)).op) x✝ a✝\n[PROOFSTEP]\nsimp [leftAdjointUniq, leftAdjointsCoyonedaEquiv]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\n⊢ adj1.unit ≫ whiskerRight (leftAdjointUniq adj1 adj2).hom G = adj2.unit\n[PROOFSTEP]\next x\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : C\n⊢ NatTrans.app (adj1.unit ≫ whiskerRight (leftAdjointUniq adj1 adj2).hom G) x = NatTrans.app adj2.unit x\n[PROOFSTEP]\nrw [NatTrans.comp_app, ← homEquiv_leftAdjointUniq_hom_app adj1 adj2]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : C\n⊢ NatTrans.app adj1.unit x ≫ NatTrans.app (whiskerRight (leftAdjointUniq adj1 adj2).hom G) x =\n    ↑(homEquiv adj1 x (F'.obj x)) (NatTrans.app (leftAdjointUniq adj1 adj2).hom x)\n[PROOFSTEP]\nsimp [← G.map_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : C\n⊢ NatTrans.app adj1.unit x ≫ G.map (NatTrans.app (leftAdjointUniq adj1 adj2).hom x) = NatTrans.app adj2.unit x\n[PROOFSTEP]\nrw [← unit_leftAdjointUniq_hom adj1 adj2]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : C\n⊢ NatTrans.app adj1.unit x ≫ G.map (NatTrans.app (leftAdjointUniq adj1 adj2).hom x) =\n    NatTrans.app (adj1.unit ≫ whiskerRight (leftAdjointUniq adj1 adj2).hom G) x\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\n⊢ whiskerLeft G (leftAdjointUniq adj1 adj2).hom ≫ adj2.counit = adj1.counit\n[PROOFSTEP]\next x\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : D\n⊢ NatTrans.app (whiskerLeft G (leftAdjointUniq adj1 adj2).hom ≫ adj2.counit) x = NatTrans.app adj1.counit x\n[PROOFSTEP]\napply Quiver.Hom.op_inj\n[GOAL]\ncase w.h.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : D\n⊢ (NatTrans.app (whiskerLeft G (leftAdjointUniq adj1 adj2).hom ≫ adj2.counit) x).op = (NatTrans.app adj1.counit x).op\n[PROOFSTEP]\napply coyoneda.map_injective\n[GOAL]\ncase w.h.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : D\n⊢ coyoneda.map (NatTrans.app (whiskerLeft G (leftAdjointUniq adj1 adj2).hom ≫ adj2.counit) x).op =\n    coyoneda.map (NatTrans.app adj1.counit x).op\n[PROOFSTEP]\next\n[GOAL]\ncase w.h.a.a.w.h.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx x✝ : D\na✝ : (coyoneda.obj (Opposite.op ((𝟭 D).obj x))).obj x✝\n⊢ NatTrans.app (coyoneda.map (NatTrans.app (whiskerLeft G (leftAdjointUniq adj1 adj2).hom ≫ adj2.counit) x).op) x✝ a✝ =\n    NatTrans.app (coyoneda.map (NatTrans.app adj1.counit x).op) x✝ a✝\n[PROOFSTEP]\nfunext\n[GOAL]\ncase w.h.a.a.w.h.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx x✝ : D\na✝ : (coyoneda.obj (Opposite.op ((𝟭 D).obj x))).obj x✝\n⊢ NatTrans.app (coyoneda.map (NatTrans.app (whiskerLeft G (leftAdjointUniq adj1 adj2).hom ≫ adj2.counit) x).op) x✝ a✝ =\n    NatTrans.app (coyoneda.map (NatTrans.app adj1.counit x).op) x✝ a✝\n[PROOFSTEP]\nsimp [leftAdjointUniq, leftAdjointsCoyonedaEquiv]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : D\n⊢ NatTrans.app (leftAdjointUniq adj1 adj2).hom (G.obj x) ≫ NatTrans.app adj2.counit x = NatTrans.app adj1.counit x\n[PROOFSTEP]\nrw [← leftAdjointUniq_hom_counit adj1 adj2]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nx : D\n⊢ NatTrans.app (leftAdjointUniq adj1 adj2).hom (G.obj x) ≫ NatTrans.app adj2.counit x =\n    NatTrans.app (whiskerLeft G (leftAdjointUniq adj1 adj2).hom ≫ adj2.counit) x\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' F'' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nadj3 : F'' ⊣ G\n⊢ (leftAdjointUniq adj1 adj2).hom ≫ (leftAdjointUniq adj2 adj3).hom = (leftAdjointUniq adj1 adj3).hom\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' F'' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nadj3 : F'' ⊣ G\nx✝ : C\n⊢ NatTrans.app ((leftAdjointUniq adj1 adj2).hom ≫ (leftAdjointUniq adj2 adj3).hom) x✝ =\n    NatTrans.app (leftAdjointUniq adj1 adj3).hom x✝\n[PROOFSTEP]\napply Quiver.Hom.op_inj\n[GOAL]\ncase w.h.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' F'' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nadj3 : F'' ⊣ G\nx✝ : C\n⊢ (NatTrans.app ((leftAdjointUniq adj1 adj2).hom ≫ (leftAdjointUniq adj2 adj3).hom) x✝).op =\n    (NatTrans.app (leftAdjointUniq adj1 adj3).hom x✝).op\n[PROOFSTEP]\napply coyoneda.map_injective\n[GOAL]\ncase w.h.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' F'' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nadj3 : F'' ⊣ G\nx✝ : C\n⊢ coyoneda.map (NatTrans.app ((leftAdjointUniq adj1 adj2).hom ≫ (leftAdjointUniq adj2 adj3).hom) x✝).op =\n    coyoneda.map (NatTrans.app (leftAdjointUniq adj1 adj3).hom x✝).op\n[PROOFSTEP]\next\n[GOAL]\ncase w.h.a.a.w.h.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' F'' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nadj3 : F'' ⊣ G\nx✝¹ : C\nx✝ : D\na✝ : (coyoneda.obj (Opposite.op (F''.obj x✝¹))).obj x✝\n⊢ NatTrans.app (coyoneda.map (NatTrans.app ((leftAdjointUniq adj1 adj2).hom ≫ (leftAdjointUniq adj2 adj3).hom) x✝¹).op)\n      x✝ a✝ =\n    NatTrans.app (coyoneda.map (NatTrans.app (leftAdjointUniq adj1 adj3).hom x✝¹).op) x✝ a✝\n[PROOFSTEP]\nfunext\n[GOAL]\ncase w.h.a.a.w.h.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' F'' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nadj3 : F'' ⊣ G\nx✝¹ : C\nx✝ : D\na✝ : (coyoneda.obj (Opposite.op (F''.obj x✝¹))).obj x✝\n⊢ NatTrans.app (coyoneda.map (NatTrans.app ((leftAdjointUniq adj1 adj2).hom ≫ (leftAdjointUniq adj2 adj3).hom) x✝¹).op)\n      x✝ a✝ =\n    NatTrans.app (coyoneda.map (NatTrans.app (leftAdjointUniq adj1 adj3).hom x✝¹).op) x✝ a✝\n[PROOFSTEP]\nsimp [leftAdjointsCoyonedaEquiv, leftAdjointUniq]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' F'' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nadj3 : F'' ⊣ G\nx : C\n⊢ NatTrans.app (leftAdjointUniq adj1 adj2).hom x ≫ NatTrans.app (leftAdjointUniq adj2 adj3).hom x =\n    NatTrans.app (leftAdjointUniq adj1 adj3).hom x\n[PROOFSTEP]\nrw [← leftAdjointUniq_trans adj1 adj2 adj3]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF F' F'' : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F' ⊣ G\nadj3 : F'' ⊣ G\nx : C\n⊢ NatTrans.app (leftAdjointUniq adj1 adj2).hom x ≫ NatTrans.app (leftAdjointUniq adj2 adj3).hom x =\n    NatTrans.app ((leftAdjointUniq adj1 adj2).hom ≫ (leftAdjointUniq adj2 adj3).hom) x\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\n⊢ (leftAdjointUniq adj1 adj1).hom = 𝟙 F\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nx✝ : C\n⊢ NatTrans.app (leftAdjointUniq adj1 adj1).hom x✝ = NatTrans.app (𝟙 F) x✝\n[PROOFSTEP]\napply Quiver.Hom.op_inj\n[GOAL]\ncase w.h.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nx✝ : C\n⊢ (NatTrans.app (leftAdjointUniq adj1 adj1).hom x✝).op = (NatTrans.app (𝟙 F) x✝).op\n[PROOFSTEP]\napply coyoneda.map_injective\n[GOAL]\ncase w.h.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nx✝ : C\n⊢ coyoneda.map (NatTrans.app (leftAdjointUniq adj1 adj1).hom x✝).op = coyoneda.map (NatTrans.app (𝟙 F) x✝).op\n[PROOFSTEP]\next\n[GOAL]\ncase w.h.a.a.w.h.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nx✝¹ : C\nx✝ : D\na✝ : (coyoneda.obj (Opposite.op (F.obj x✝¹))).obj x✝\n⊢ NatTrans.app (coyoneda.map (NatTrans.app (leftAdjointUniq adj1 adj1).hom x✝¹).op) x✝ a✝ =\n    NatTrans.app (coyoneda.map (NatTrans.app (𝟙 F) x✝¹).op) x✝ a✝\n[PROOFSTEP]\nfunext\n[GOAL]\ncase w.h.a.a.w.h.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\nx✝¹ : C\nx✝ : D\na✝ : (coyoneda.obj (Opposite.op (F.obj x✝¹))).obj x✝\n⊢ NatTrans.app (coyoneda.map (NatTrans.app (leftAdjointUniq adj1 adj1).hom x✝¹).op) x✝ a✝ =\n    NatTrans.app (coyoneda.map (NatTrans.app (𝟙 F) x✝¹).op) x✝ a✝\n[PROOFSTEP]\nsimp [leftAdjointsCoyonedaEquiv, leftAdjointUniq]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\n⊢ ↑(homEquiv adj2 (G.obj x) x).symm (NatTrans.app (rightAdjointUniq adj1 adj2).hom x) = NatTrans.app adj1.counit x\n[PROOFSTEP]\napply Quiver.Hom.op_inj\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\n⊢ (↑(homEquiv adj2 (G.obj x) x).symm (NatTrans.app (rightAdjointUniq adj1 adj2).hom x)).op =\n    (NatTrans.app adj1.counit x).op\n[PROOFSTEP]\nconvert\n  homEquiv_leftAdjointUniq_hom_app (opAdjointOpOfAdjoint _ F adj2) (opAdjointOpOfAdjoint _ _ adj1)\n    (Opposite.op x)\n      -- Porting note: was `simpa`\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\ne_1✝ :\n  (Opposite.op x ⟶ Opposite.op (F.obj (G.obj x))) =\n    (fun x_1 => Opposite.op x ⟶ F.op.obj (G.op.obj (Opposite.op x)))\n      (NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G' F adj2) (opAdjointOpOfAdjoint G F adj1)).hom\n        (Opposite.op x))\n⊢ (NatTrans.app adj1.counit x).op = NatTrans.app (opAdjointOpOfAdjoint G F adj1).unit (Opposite.op x)\n[PROOFSTEP]\nsimp only [opAdjointOpOfAdjoint, Functor.op_obj, Opposite.unop_op, mkOfHomEquiv_unit_app, Equiv.trans_apply,\n  homEquiv_counit, Functor.id_obj]\n  -- Porting note: Yet another `erw`...\n    -- https://github.com/leanprover-community/mathlib4/issues/5164\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\ne_1✝ :\n  (Opposite.op x ⟶ Opposite.op (F.obj (G.obj x))) =\n    (fun x_1 => Opposite.op x ⟶ F.op.obj (G.op.obj (Opposite.op x)))\n      (NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G' F adj2) (opAdjointOpOfAdjoint G F adj1)).hom\n        (Opposite.op x))\n⊢ (NatTrans.app adj1.counit x).op =\n    ↑(opEquiv (Opposite.op x) (Opposite.op (F.toPrefunctor.1 (G.obj x)))).symm\n      (F.map (↑(opEquiv (Opposite.op (G.obj x)) (Opposite.op (G.obj x))) (𝟙 (Opposite.op (G.obj x)))) ≫\n        NatTrans.app adj1.counit x)\n[PROOFSTEP]\nerw [F.map_id]\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\ne_1✝ :\n  (Opposite.op x ⟶ Opposite.op (F.obj (G.obj x))) =\n    (fun x_1 => Opposite.op x ⟶ F.op.obj (G.op.obj (Opposite.op x)))\n      (NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G' F adj2) (opAdjointOpOfAdjoint G F adj1)).hom\n        (Opposite.op x))\n⊢ (NatTrans.app adj1.counit x).op =\n    ↑(opEquiv (Opposite.op x) (Opposite.op (F.toPrefunctor.1 (G.obj x)))).symm\n      (𝟙 (F.obj (G.obj x)) ≫ NatTrans.app adj1.counit x)\n[PROOFSTEP]\nrw [Category.id_comp]\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\ne_1✝ :\n  (Opposite.op x ⟶ Opposite.op (F.obj (G.obj x))) =\n    (fun x_1 => Opposite.op x ⟶ F.op.obj (G.op.obj (Opposite.op x)))\n      (NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G' F adj2) (opAdjointOpOfAdjoint G F adj1)).hom\n        (Opposite.op x))\n⊢ (NatTrans.app adj1.counit x).op =\n    ↑(opEquiv (Opposite.op x) (Opposite.op (F.toPrefunctor.1 (G.obj x)))).symm (NatTrans.app adj1.counit x)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\n⊢ NatTrans.app adj1.unit x ≫ NatTrans.app (rightAdjointUniq adj1 adj2).hom (F.obj x) = NatTrans.app adj2.unit x\n[PROOFSTEP]\napply Quiver.Hom.op_inj\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\n⊢ (NatTrans.app adj1.unit x ≫ NatTrans.app (rightAdjointUniq adj1 adj2).hom (F.obj x)).op =\n    (NatTrans.app adj2.unit x).op\n[PROOFSTEP]\nconvert\n  leftAdjointUniq_hom_app_counit (opAdjointOpOfAdjoint _ _ adj2) (opAdjointOpOfAdjoint _ _ adj1) (Opposite.op x) using 1\n  --all_goals simp\n[GOAL]\ncase h.e'_2.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\ne_1✝ :\n  (Opposite.op (G'.obj (F.obj x)) ⟶ Opposite.op ((𝟭 C).obj x)) =\n    (G'.op.obj (F.op.obj (Opposite.op x)) ⟶ (𝟭 Cᵒᵖ).obj (Opposite.op x))\n⊢ (NatTrans.app adj1.unit x ≫ NatTrans.app (rightAdjointUniq adj1 adj2).hom (F.obj x)).op =\n    NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G' F adj2) (opAdjointOpOfAdjoint G F adj1)).hom\n        (F.op.obj (Opposite.op x)) ≫\n      NatTrans.app (opAdjointOpOfAdjoint G F adj1).counit (Opposite.op x)\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\ne_1✝ :\n  (Opposite.op (G'.obj (F.obj x)) ⟶ Opposite.op ((𝟭 C).obj x)) =\n    (G'.op.obj (F.op.obj (Opposite.op x)) ⟶ (𝟭 Cᵒᵖ).obj (Opposite.op x))\n⊢ (NatTrans.app adj2.unit x).op = NatTrans.app (opAdjointOpOfAdjoint G' F adj2).counit (Opposite.op x)\n[PROOFSTEP]\nall_goals {\n  -- Porting note: Again, something seems wrong here... Some `simp` lemmas are not firing!\n  simp only [Functor.id_obj, Functor.comp_obj, op_comp, Functor.op_obj, Opposite.unop_op, opAdjointOpOfAdjoint,\n    mkOfHomEquiv_counit_app, Equiv.invFun_as_coe, Equiv.symm_trans_apply, Equiv.symm_symm, homEquiv_unit]\n  erw [Functor.map_id]\n  rw [Category.comp_id]\n  rfl\n}\n[GOAL]\ncase h.e'_2.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\ne_1✝ :\n  (Opposite.op (G'.obj (F.obj x)) ⟶ Opposite.op ((𝟭 C).obj x)) =\n    (G'.op.obj (F.op.obj (Opposite.op x)) ⟶ (𝟭 Cᵒᵖ).obj (Opposite.op x))\n⊢ (NatTrans.app adj1.unit x ≫ NatTrans.app (rightAdjointUniq adj1 adj2).hom (F.obj x)).op =\n    NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G' F adj2) (opAdjointOpOfAdjoint G F adj1)).hom\n        (F.op.obj (Opposite.op x)) ≫\n      NatTrans.app (opAdjointOpOfAdjoint G F adj1).counit (Opposite.op x)\n[PROOFSTEP]\n{\n  -- Porting note: Again, something seems wrong here... Some `simp` lemmas are not firing!\n  simp only [Functor.id_obj, Functor.comp_obj, op_comp, Functor.op_obj, Opposite.unop_op, opAdjointOpOfAdjoint,\n    mkOfHomEquiv_counit_app, Equiv.invFun_as_coe, Equiv.symm_trans_apply, Equiv.symm_symm, homEquiv_unit]\n  erw [Functor.map_id]\n  rw [Category.comp_id]\n  rfl\n}\n[GOAL]\ncase h.e'_2.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\ne_1✝ :\n  (Opposite.op (G'.obj (F.obj x)) ⟶ Opposite.op ((𝟭 C).obj x)) =\n    (G'.op.obj (F.op.obj (Opposite.op x)) ⟶ (𝟭 Cᵒᵖ).obj (Opposite.op x))\n⊢ (NatTrans.app adj1.unit x ≫ NatTrans.app (rightAdjointUniq adj1 adj2).hom (F.obj x)).op =\n    NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G' F adj2) (opAdjointOpOfAdjoint G F adj1)).hom\n        (F.op.obj (Opposite.op x)) ≫\n      NatTrans.app (opAdjointOpOfAdjoint G F adj1).counit (Opposite.op x)\n[PROOFSTEP]\nsimp only [Functor.id_obj, Functor.comp_obj, op_comp, Functor.op_obj, Opposite.unop_op, opAdjointOpOfAdjoint,\n  mkOfHomEquiv_counit_app, Equiv.invFun_as_coe, Equiv.symm_trans_apply, Equiv.symm_symm, homEquiv_unit]\n[GOAL]\ncase h.e'_2.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\ne_1✝ :\n  (Opposite.op (G'.obj (F.obj x)) ⟶ Opposite.op ((𝟭 C).obj x)) =\n    (G'.op.obj (F.op.obj (Opposite.op x)) ⟶ (𝟭 Cᵒᵖ).obj (Opposite.op x))\n⊢ (NatTrans.app (rightAdjointUniq adj1 adj2).hom (F.obj x)).op ≫ (NatTrans.app adj1.unit x).op =\n    NatTrans.app\n        (leftAdjointUniq\n            (mkOfHomEquiv\n              (CoreHomEquiv.mk fun X Y =>\n                (opEquiv (Opposite.op (G'.obj X.unop)) Y).trans\n                  ((homEquiv adj2 Y.unop X.unop).symm.trans (opEquiv X (Opposite.op (F.toPrefunctor.1 Y.unop))).symm)))\n            (mkOfHomEquiv\n              (CoreHomEquiv.mk fun X Y =>\n                (opEquiv (Opposite.op (G.obj X.unop)) Y).trans\n                  ((homEquiv adj1 Y.unop X.unop).symm.trans\n                    (opEquiv X (Opposite.op (F.toPrefunctor.1 Y.unop))).symm)))).hom\n        (Opposite.op (F.obj x)) ≫\n      ↑(opEquiv (Opposite.op (G.obj (F.obj x))) (Opposite.op x)).symm\n        (NatTrans.app adj1.unit x ≫\n          G.map (↑(opEquiv (Opposite.op (F.obj x)) (Opposite.op (F.toPrefunctor.1 x))) (𝟙 (Opposite.op (F.obj x)))))\n[PROOFSTEP]\nerw [Functor.map_id]\n[GOAL]\ncase h.e'_2.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\ne_1✝ :\n  (Opposite.op (G'.obj (F.obj x)) ⟶ Opposite.op ((𝟭 C).obj x)) =\n    (G'.op.obj (F.op.obj (Opposite.op x)) ⟶ (𝟭 Cᵒᵖ).obj (Opposite.op x))\n⊢ (NatTrans.app (rightAdjointUniq adj1 adj2).hom (F.obj x)).op ≫ (NatTrans.app adj1.unit x).op =\n    NatTrans.app\n        (leftAdjointUniq\n            (mkOfHomEquiv\n              (CoreHomEquiv.mk fun X Y =>\n                (opEquiv (Opposite.op (G'.obj X.unop)) Y).trans\n                  ((homEquiv adj2 Y.unop X.unop).symm.trans (opEquiv X (Opposite.op (F.toPrefunctor.1 Y.unop))).symm)))\n            (mkOfHomEquiv\n              (CoreHomEquiv.mk fun X Y =>\n                (opEquiv (Opposite.op (G.obj X.unop)) Y).trans\n                  ((homEquiv adj1 Y.unop X.unop).symm.trans\n                    (opEquiv X (Opposite.op (F.toPrefunctor.1 Y.unop))).symm)))).hom\n        (Opposite.op (F.obj x)) ≫\n      ↑(opEquiv (Opposite.op (G.obj (F.obj x))) (Opposite.op x)).symm (NatTrans.app adj1.unit x ≫ 𝟙 (G.obj (F.obj x)))\n[PROOFSTEP]\nrw [Category.comp_id]\n[GOAL]\ncase h.e'_2.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\ne_1✝ :\n  (Opposite.op (G'.obj (F.obj x)) ⟶ Opposite.op ((𝟭 C).obj x)) =\n    (G'.op.obj (F.op.obj (Opposite.op x)) ⟶ (𝟭 Cᵒᵖ).obj (Opposite.op x))\n⊢ (NatTrans.app (rightAdjointUniq adj1 adj2).hom (F.obj x)).op ≫ (NatTrans.app adj1.unit x).op =\n    NatTrans.app\n        (leftAdjointUniq\n            (mkOfHomEquiv\n              (CoreHomEquiv.mk fun X Y =>\n                (opEquiv (Opposite.op (G'.obj X.unop)) Y).trans\n                  ((homEquiv adj2 Y.unop X.unop).symm.trans (opEquiv X (Opposite.op (F.toPrefunctor.1 Y.unop))).symm)))\n            (mkOfHomEquiv\n              (CoreHomEquiv.mk fun X Y =>\n                (opEquiv (Opposite.op (G.obj X.unop)) Y).trans\n                  ((homEquiv adj1 Y.unop X.unop).symm.trans\n                    (opEquiv X (Opposite.op (F.toPrefunctor.1 Y.unop))).symm)))).hom\n        (Opposite.op (F.obj x)) ≫\n      ↑(opEquiv (Opposite.op (G.obj (F.obj x))) (Opposite.op x)).symm (NatTrans.app adj1.unit x)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\ne_1✝ :\n  (Opposite.op (G'.obj (F.obj x)) ⟶ Opposite.op ((𝟭 C).obj x)) =\n    (G'.op.obj (F.op.obj (Opposite.op x)) ⟶ (𝟭 Cᵒᵖ).obj (Opposite.op x))\n⊢ (NatTrans.app adj2.unit x).op = NatTrans.app (opAdjointOpOfAdjoint G' F adj2).counit (Opposite.op x)\n[PROOFSTEP]\n{\n  -- Porting note: Again, something seems wrong here... Some `simp` lemmas are not firing!\n  simp only [Functor.id_obj, Functor.comp_obj, op_comp, Functor.op_obj, Opposite.unop_op, opAdjointOpOfAdjoint,\n    mkOfHomEquiv_counit_app, Equiv.invFun_as_coe, Equiv.symm_trans_apply, Equiv.symm_symm, homEquiv_unit]\n  erw [Functor.map_id]\n  rw [Category.comp_id]\n  rfl\n}\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\ne_1✝ :\n  (Opposite.op (G'.obj (F.obj x)) ⟶ Opposite.op ((𝟭 C).obj x)) =\n    (G'.op.obj (F.op.obj (Opposite.op x)) ⟶ (𝟭 Cᵒᵖ).obj (Opposite.op x))\n⊢ (NatTrans.app adj2.unit x).op = NatTrans.app (opAdjointOpOfAdjoint G' F adj2).counit (Opposite.op x)\n[PROOFSTEP]\nsimp only [Functor.id_obj, Functor.comp_obj, op_comp, Functor.op_obj, Opposite.unop_op, opAdjointOpOfAdjoint,\n  mkOfHomEquiv_counit_app, Equiv.invFun_as_coe, Equiv.symm_trans_apply, Equiv.symm_symm, homEquiv_unit]\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\ne_1✝ :\n  (Opposite.op (G'.obj (F.obj x)) ⟶ Opposite.op ((𝟭 C).obj x)) =\n    (G'.op.obj (F.op.obj (Opposite.op x)) ⟶ (𝟭 Cᵒᵖ).obj (Opposite.op x))\n⊢ (NatTrans.app adj2.unit x).op =\n    ↑(opEquiv (Opposite.op (G'.obj (F.obj x))) (Opposite.op x)).symm\n      (NatTrans.app adj2.unit x ≫\n        G'.map (↑(opEquiv (Opposite.op (F.obj x)) (Opposite.op (F.toPrefunctor.1 x))) (𝟙 (Opposite.op (F.obj x)))))\n[PROOFSTEP]\nerw [Functor.map_id]\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\ne_1✝ :\n  (Opposite.op (G'.obj (F.obj x)) ⟶ Opposite.op ((𝟭 C).obj x)) =\n    (G'.op.obj (F.op.obj (Opposite.op x)) ⟶ (𝟭 Cᵒᵖ).obj (Opposite.op x))\n⊢ (NatTrans.app adj2.unit x).op =\n    ↑(opEquiv (Opposite.op (G'.obj (F.obj x))) (Opposite.op x)).symm (NatTrans.app adj2.unit x ≫ 𝟙 (G'.obj (F.obj x)))\n[PROOFSTEP]\nrw [Category.comp_id]\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\ne_1✝ :\n  (Opposite.op (G'.obj (F.obj x)) ⟶ Opposite.op ((𝟭 C).obj x)) =\n    (G'.op.obj (F.op.obj (Opposite.op x)) ⟶ (𝟭 Cᵒᵖ).obj (Opposite.op x))\n⊢ (NatTrans.app adj2.unit x).op =\n    ↑(opEquiv (Opposite.op (G'.obj (F.obj x))) (Opposite.op x)).symm (NatTrans.app adj2.unit x)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\n⊢ adj1.unit ≫ whiskerLeft F (rightAdjointUniq adj1 adj2).hom = adj2.unit\n[PROOFSTEP]\next x\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : C\n⊢ NatTrans.app (adj1.unit ≫ whiskerLeft F (rightAdjointUniq adj1 adj2).hom) x = NatTrans.app adj2.unit x\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\n⊢ F.map (NatTrans.app (rightAdjointUniq adj1 adj2).hom x) ≫ NatTrans.app adj2.counit x = NatTrans.app adj1.counit x\n[PROOFSTEP]\napply Quiver.Hom.op_inj\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\n⊢ (F.map (NatTrans.app (rightAdjointUniq adj1 adj2).hom x) ≫ NatTrans.app adj2.counit x).op =\n    (NatTrans.app adj1.counit x).op\n[PROOFSTEP]\nconvert\n  unit_leftAdjointUniq_hom_app (opAdjointOpOfAdjoint _ _ adj2) (opAdjointOpOfAdjoint _ _ adj1) (Opposite.op x) using 1\n[GOAL]\ncase h.e'_2.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\ne_1✝ :\n  (Opposite.op ((𝟭 D).obj x) ⟶ Opposite.op (F.obj (G.obj x))) =\n    ((𝟭 Dᵒᵖ).obj (Opposite.op x) ⟶ F.op.obj (G.op.obj (Opposite.op x)))\n⊢ (F.map (NatTrans.app (rightAdjointUniq adj1 adj2).hom x) ≫ NatTrans.app adj2.counit x).op =\n    NatTrans.app (opAdjointOpOfAdjoint G' F adj2).unit (Opposite.op x) ≫\n      F.op.map\n        (NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G' F adj2) (opAdjointOpOfAdjoint G F adj1)).hom\n          (Opposite.op x))\n[PROOFSTEP]\nsimp only [Functor.id_obj, op_comp, Functor.comp_obj, Functor.op_obj, Opposite.unop_op, opAdjointOpOfAdjoint_unit_app,\n  Functor.op_map]\n[GOAL]\ncase h.e'_2.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\ne_1✝ :\n  (Opposite.op ((𝟭 D).obj x) ⟶ Opposite.op (F.obj (G.obj x))) =\n    ((𝟭 Dᵒᵖ).obj (Opposite.op x) ⟶ F.op.obj (G.op.obj (Opposite.op x)))\n⊢ (NatTrans.app adj2.counit x).op ≫ (F.map (NatTrans.app (rightAdjointUniq adj1 adj2).hom x)).op =\n    ↑(opEquiv (Opposite.op x) (Opposite.op (F.toPrefunctor.1 (G'.obj x)))).symm\n        (F.map (↑(opEquiv (Opposite.op (G'.obj x)) (Opposite.op (G'.obj x))) (𝟙 (Opposite.op (G'.obj x)))) ≫\n          NatTrans.app adj2.counit x) ≫\n      (F.map\n          (NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G' F adj2) (opAdjointOpOfAdjoint G F adj1)).hom\n              (Opposite.op x)).unop).op\n[PROOFSTEP]\ndsimp [opEquiv]\n[GOAL]\ncase h.e'_2.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\ne_1✝ :\n  (Opposite.op ((𝟭 D).obj x) ⟶ Opposite.op (F.obj (G.obj x))) =\n    ((𝟭 Dᵒᵖ).obj (Opposite.op x) ⟶ F.op.obj (G.op.obj (Opposite.op x)))\n⊢ (NatTrans.app adj2.counit x).op ≫ (F.map (NatTrans.app (rightAdjointUniq adj1 adj2).hom x)).op =\n    ((NatTrans.app adj2.counit x).op ≫ (F.map (𝟙 (G'.obj x))).op) ≫\n      (F.map\n          (NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G' F adj2) (opAdjointOpOfAdjoint G F adj1)).hom\n              (Opposite.op x)).unop).op\n[PROOFSTEP]\nsimp only [← op_comp]\n[GOAL]\ncase h.e'_2.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\ne_1✝ :\n  (Opposite.op ((𝟭 D).obj x) ⟶ Opposite.op (F.obj (G.obj x))) =\n    ((𝟭 Dᵒᵖ).obj (Opposite.op x) ⟶ F.op.obj (G.op.obj (Opposite.op x)))\n⊢ (F.map (NatTrans.app (rightAdjointUniq adj1 adj2).hom x) ≫ NatTrans.app adj2.counit x).op =\n    (F.map\n          (NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G' F adj2) (opAdjointOpOfAdjoint G F adj1)).hom\n              (Opposite.op x)).unop ≫\n        F.map (𝟙 (G'.obj x)) ≫ NatTrans.app adj2.counit x).op\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.e'_2.h.e_f.e_a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\ne_1✝ :\n  (Opposite.op ((𝟭 D).obj x) ⟶ Opposite.op (F.obj (G.obj x))) =\n    ((𝟭 Dᵒᵖ).obj (Opposite.op x) ⟶ F.op.obj (G.op.obj (Opposite.op x)))\n⊢ NatTrans.app adj2.counit x = F.map (𝟙 (G'.obj x)) ≫ NatTrans.app adj2.counit x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\ne_1✝ :\n  (Opposite.op ((𝟭 D).obj x) ⟶ Opposite.op (F.obj (G.obj x))) =\n    ((𝟭 Dᵒᵖ).obj (Opposite.op x) ⟶ F.op.obj (G.op.obj (Opposite.op x)))\n⊢ (NatTrans.app adj1.counit x).op = NatTrans.app (opAdjointOpOfAdjoint G F adj1).unit (Opposite.op x)\n[PROOFSTEP]\nsimp only [Functor.id_obj, opAdjointOpOfAdjoint_unit_app, Opposite.unop_op]\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\ne_1✝ :\n  (Opposite.op ((𝟭 D).obj x) ⟶ Opposite.op (F.obj (G.obj x))) =\n    ((𝟭 Dᵒᵖ).obj (Opposite.op x) ⟶ F.op.obj (G.op.obj (Opposite.op x)))\n⊢ (NatTrans.app adj1.counit x).op =\n    ↑(opEquiv (Opposite.op x) (Opposite.op (F.toPrefunctor.1 (G.obj x)))).symm\n      (F.map (↑(opEquiv (Opposite.op (G.obj x)) (Opposite.op (G.obj x))) (𝟙 (Opposite.op (G.obj x)))) ≫\n        NatTrans.app adj1.counit x)\n[PROOFSTEP]\nerw [Functor.map_id, Category.id_comp]\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx : D\ne_1✝ :\n  (Opposite.op ((𝟭 D).obj x) ⟶ Opposite.op (F.obj (G.obj x))) =\n    ((𝟭 Dᵒᵖ).obj (Opposite.op x) ⟶ F.op.obj (G.op.obj (Opposite.op x)))\n⊢ (NatTrans.app adj1.counit x).op =\n    ↑(opEquiv (Opposite.op x) (Opposite.op (F.toPrefunctor.1 (G.obj x)))).symm (NatTrans.app adj1.counit x)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\n⊢ whiskerRight (rightAdjointUniq adj1 adj2).hom F ≫ adj2.counit = adj1.counit\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nx✝ : D\n⊢ NatTrans.app (whiskerRight (rightAdjointUniq adj1 adj2).hom F ≫ adj2.counit) x✝ = NatTrans.app adj1.counit x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' G'' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nadj3 : F ⊣ G''\nx : D\n⊢ NatTrans.app (rightAdjointUniq adj1 adj2).hom x ≫ NatTrans.app (rightAdjointUniq adj2 adj3).hom x =\n    NatTrans.app (rightAdjointUniq adj1 adj3).hom x\n[PROOFSTEP]\napply Quiver.Hom.op_inj\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' G'' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nadj3 : F ⊣ G''\nx : D\n⊢ (NatTrans.app (rightAdjointUniq adj1 adj2).hom x ≫ NatTrans.app (rightAdjointUniq adj2 adj3).hom x).op =\n    (NatTrans.app (rightAdjointUniq adj1 adj3).hom x).op\n[PROOFSTEP]\ndsimp [rightAdjointUniq]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' G'' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nadj3 : F ⊣ G''\nx : D\n⊢ NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G'' F adj3) (opAdjointOpOfAdjoint G' F adj2)).hom\n        (Opposite.op x) ≫\n      NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G' F adj2) (opAdjointOpOfAdjoint G F adj1)).hom\n        (Opposite.op x) =\n    NatTrans.app (leftAdjointUniq (opAdjointOpOfAdjoint G'' F adj3) (opAdjointOpOfAdjoint G F adj1)).hom (Opposite.op x)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' G'' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nadj3 : F ⊣ G''\n⊢ (rightAdjointUniq adj1 adj2).hom ≫ (rightAdjointUniq adj2 adj3).hom = (rightAdjointUniq adj1 adj3).hom\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG G' G'' : D ⥤ C\nadj1 : F ⊣ G\nadj2 : F ⊣ G'\nadj3 : F ⊣ G''\nx✝ : D\n⊢ NatTrans.app ((rightAdjointUniq adj1 adj2).hom ≫ (rightAdjointUniq adj2 adj3).hom) x✝ =\n    NatTrans.app (rightAdjointUniq adj1 adj3).hom x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\n⊢ (rightAdjointUniq adj1 adj1).hom = 𝟙 G\n[PROOFSTEP]\ndelta rightAdjointUniq\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nadj1 : F ⊣ G\n⊢ (NatIso.removeOp (leftAdjointUniq (opAdjointOpOfAdjoint G F adj1) (opAdjointOpOfAdjoint G F adj1))).hom = 𝟙 G\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Adjunction.Opposites", "llama_tokens": 22923, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.705785040214066, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.38861044162645053}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nX Y Z : Pointed\nf : Pointed.Hom X Y\ng : Pointed.Hom Y Z\n⊢ (g.toFun ∘ f.toFun) X.point = Z.point\n[PROOFSTEP]\nrw [Function.comp_apply, f.map_point, g.map_point]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX : Type ?u.6897\nY : Pointed\nf : typeToPointed.obj X ⟶ Y\n⊢ (fun f =>\n        { toFun := fun o => Option.elim o Y.point f,\n          map_point :=\n            (_ :\n              (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n      ((fun f => f.toFun ∘ some) f) =\n    f\n[PROOFSTEP]\napply Pointed.Hom.ext\n[GOAL]\ncase toFun\nα : Type u_1\nβ : Type u_2\nX : Type ?u.6897\nY : Pointed\nf : typeToPointed.obj X ⟶ Y\n⊢ ((fun f =>\n          { toFun := fun o => Option.elim o Y.point f,\n            map_point :=\n              (_ :\n                (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                  (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n        ((fun f => f.toFun ∘ some) f)).toFun =\n    f.toFun\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase toFun.h\nα : Type u_1\nβ : Type u_2\nX : Type ?u.6897\nY : Pointed\nf : typeToPointed.obj X ⟶ Y\nx : (typeToPointed.obj X).X\n⊢ Pointed.Hom.toFun\n      ((fun f =>\n          { toFun := fun o => Option.elim o Y.point f,\n            map_point :=\n              (_ :\n                (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                  (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n        ((fun f => f.toFun ∘ some) f))\n      x =\n    Pointed.Hom.toFun f x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase toFun.h.none\nα : Type u_1\nβ : Type u_2\nX : Type ?u.6897\nY : Pointed\nf : typeToPointed.obj X ⟶ Y\n⊢ Pointed.Hom.toFun\n      ((fun f =>\n          { toFun := fun o => Option.elim o Y.point f,\n            map_point :=\n              (_ :\n                (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                  (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n        ((fun f => f.toFun ∘ some) f))\n      none =\n    Pointed.Hom.toFun f none\n[PROOFSTEP]\nexact f.map_point.symm\n[GOAL]\ncase toFun.h.some\nα : Type u_1\nβ : Type u_2\nX : Type ?u.6897\nY : Pointed\nf : typeToPointed.obj X ⟶ Y\nval✝ : X\n⊢ Pointed.Hom.toFun\n      ((fun f =>\n          { toFun := fun o => Option.elim o Y.point f,\n            map_point :=\n              (_ :\n                (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                  (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n        ((fun f => f.toFun ∘ some) f))\n      (some val✝) =\n    Pointed.Hom.toFun f (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nX'✝ X✝ : Type ?u.6897\nY✝ : Pointed\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (forget Pointed).obj Y✝\n⊢ ↑((fun X Y =>\n              { toFun := fun f => f.toFun ∘ some,\n                invFun := fun f =>\n                  { toFun := fun o => Option.elim o Y.point f,\n                    map_point :=\n                      (_ :\n                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                          (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) },\n                left_inv :=\n                  (_ :\n                    ∀ (f : typeToPointed.obj X ⟶ Y),\n                      (fun f =>\n                            { toFun := fun o => Option.elim o Y.point f,\n                              map_point :=\n                                (_ :\n                                  (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                    (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                          ((fun f => f.toFun ∘ some) f) =\n                        f),\n                right_inv :=\n                  (_ :\n                    ∀ (f : X ⟶ (forget Pointed).obj Y),\n                      (fun f => f.toFun ∘ some)\n                          ((fun f =>\n                              { toFun := fun o => Option.elim o Y.point f,\n                                map_point :=\n                                  (_ :\n                                    (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                            f) =\n                        f) })\n            X'✝ Y✝).symm\n      (f ≫ g) =\n    typeToPointed.map f ≫\n      ↑((fun X Y =>\n                { toFun := fun f => f.toFun ∘ some,\n                  invFun := fun f =>\n                    { toFun := fun o => Option.elim o Y.point f,\n                      map_point :=\n                        (_ :\n                          (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                            (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) },\n                  left_inv :=\n                    (_ :\n                      ∀ (f : typeToPointed.obj X ⟶ Y),\n                        (fun f =>\n                              { toFun := fun o => Option.elim o Y.point f,\n                                map_point :=\n                                  (_ :\n                                    (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                            ((fun f => f.toFun ∘ some) f) =\n                          f),\n                  right_inv :=\n                    (_ :\n                      ∀ (f : X ⟶ (forget Pointed).obj Y),\n                        (fun f => f.toFun ∘ some)\n                            ((fun f =>\n                                { toFun := fun o => Option.elim o Y.point f,\n                                  map_point :=\n                                    (_ :\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                              f) =\n                          f) })\n              X✝ Y✝).symm\n        g\n[PROOFSTEP]\napply Pointed.Hom.ext\n[GOAL]\ncase toFun\nα : Type u_1\nβ : Type u_2\nX'✝ X✝ : Type ?u.6897\nY✝ : Pointed\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (forget Pointed).obj Y✝\n⊢ (↑((fun X Y =>\n                { toFun := fun f => f.toFun ∘ some,\n                  invFun := fun f =>\n                    { toFun := fun o => Option.elim o Y.point f,\n                      map_point :=\n                        (_ :\n                          (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                            (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) },\n                  left_inv :=\n                    (_ :\n                      ∀ (f : typeToPointed.obj X ⟶ Y),\n                        (fun f =>\n                              { toFun := fun o => Option.elim o Y.point f,\n                                map_point :=\n                                  (_ :\n                                    (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                            ((fun f => f.toFun ∘ some) f) =\n                          f),\n                  right_inv :=\n                    (_ :\n                      ∀ (f : X ⟶ (forget Pointed).obj Y),\n                        (fun f => f.toFun ∘ some)\n                            ((fun f =>\n                                { toFun := fun o => Option.elim o Y.point f,\n                                  map_point :=\n                                    (_ :\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                              f) =\n                          f) })\n              X'✝ Y✝).symm\n        (f ≫ g)).toFun =\n    (typeToPointed.map f ≫\n        ↑((fun X Y =>\n                  { toFun := fun f => f.toFun ∘ some,\n                    invFun := fun f =>\n                      { toFun := fun o => Option.elim o Y.point f,\n                        map_point :=\n                          (_ :\n                            (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                              (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) },\n                    left_inv :=\n                      (_ :\n                        ∀ (f : typeToPointed.obj X ⟶ Y),\n                          (fun f =>\n                                { toFun := fun o => Option.elim o Y.point f,\n                                  map_point :=\n                                    (_ :\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                              ((fun f => f.toFun ∘ some) f) =\n                            f),\n                    right_inv :=\n                      (_ :\n                        ∀ (f : X ⟶ (forget Pointed).obj Y),\n                          (fun f => f.toFun ∘ some)\n                              ((fun f =>\n                                  { toFun := fun o => Option.elim o Y.point f,\n                                    map_point :=\n                                      (_ :\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                          (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                                f) =\n                            f) })\n                X✝ Y✝).symm\n          g).toFun\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase toFun.h\nα : Type u_1\nβ : Type u_2\nX'✝ X✝ : Type ?u.6897\nY✝ : Pointed\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (forget Pointed).obj Y✝\nx : (typeToPointed.obj X'✝).X\n⊢ Pointed.Hom.toFun\n      (↑((fun X Y =>\n                { toFun := fun f => f.toFun ∘ some,\n                  invFun := fun f =>\n                    { toFun := fun o => Option.elim o Y.point f,\n                      map_point :=\n                        (_ :\n                          (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                            (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) },\n                  left_inv :=\n                    (_ :\n                      ∀ (f : typeToPointed.obj X ⟶ Y),\n                        (fun f =>\n                              { toFun := fun o => Option.elim o Y.point f,\n                                map_point :=\n                                  (_ :\n                                    (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                            ((fun f => f.toFun ∘ some) f) =\n                          f),\n                  right_inv :=\n                    (_ :\n                      ∀ (f : X ⟶ (forget Pointed).obj Y),\n                        (fun f => f.toFun ∘ some)\n                            ((fun f =>\n                                { toFun := fun o => Option.elim o Y.point f,\n                                  map_point :=\n                                    (_ :\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                              f) =\n                          f) })\n              X'✝ Y✝).symm\n        (f ≫ g))\n      x =\n    Pointed.Hom.toFun\n      (typeToPointed.map f ≫\n        ↑((fun X Y =>\n                  { toFun := fun f => f.toFun ∘ some,\n                    invFun := fun f =>\n                      { toFun := fun o => Option.elim o Y.point f,\n                        map_point :=\n                          (_ :\n                            (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                              (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) },\n                    left_inv :=\n                      (_ :\n                        ∀ (f : typeToPointed.obj X ⟶ Y),\n                          (fun f =>\n                                { toFun := fun o => Option.elim o Y.point f,\n                                  map_point :=\n                                    (_ :\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                              ((fun f => f.toFun ∘ some) f) =\n                            f),\n                    right_inv :=\n                      (_ :\n                        ∀ (f : X ⟶ (forget Pointed).obj Y),\n                          (fun f => f.toFun ∘ some)\n                              ((fun f =>\n                                  { toFun := fun o => Option.elim o Y.point f,\n                                    map_point :=\n                                      (_ :\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                          (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                                f) =\n                            f) })\n                X✝ Y✝).symm\n          g)\n      x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase toFun.h.none\nα : Type u_1\nβ : Type u_2\nX'✝ X✝ : Type ?u.6897\nY✝ : Pointed\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (forget Pointed).obj Y✝\n⊢ Pointed.Hom.toFun\n      (↑((fun X Y =>\n                { toFun := fun f => f.toFun ∘ some,\n                  invFun := fun f =>\n                    { toFun := fun o => Option.elim o Y.point f,\n                      map_point :=\n                        (_ :\n                          (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                            (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) },\n                  left_inv :=\n                    (_ :\n                      ∀ (f : typeToPointed.obj X ⟶ Y),\n                        (fun f =>\n                              { toFun := fun o => Option.elim o Y.point f,\n                                map_point :=\n                                  (_ :\n                                    (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                            ((fun f => f.toFun ∘ some) f) =\n                          f),\n                  right_inv :=\n                    (_ :\n                      ∀ (f : X ⟶ (forget Pointed).obj Y),\n                        (fun f => f.toFun ∘ some)\n                            ((fun f =>\n                                { toFun := fun o => Option.elim o Y.point f,\n                                  map_point :=\n                                    (_ :\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                              f) =\n                          f) })\n              X'✝ Y✝).symm\n        (f ≫ g))\n      none =\n    Pointed.Hom.toFun\n      (typeToPointed.map f ≫\n        ↑((fun X Y =>\n                  { toFun := fun f => f.toFun ∘ some,\n                    invFun := fun f =>\n                      { toFun := fun o => Option.elim o Y.point f,\n                        map_point :=\n                          (_ :\n                            (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                              (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) },\n                    left_inv :=\n                      (_ :\n                        ∀ (f : typeToPointed.obj X ⟶ Y),\n                          (fun f =>\n                                { toFun := fun o => Option.elim o Y.point f,\n                                  map_point :=\n                                    (_ :\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                              ((fun f => f.toFun ∘ some) f) =\n                            f),\n                    right_inv :=\n                      (_ :\n                        ∀ (f : X ⟶ (forget Pointed).obj Y),\n                          (fun f => f.toFun ∘ some)\n                              ((fun f =>\n                                  { toFun := fun o => Option.elim o Y.point f,\n                                    map_point :=\n                                      (_ :\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                          (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                                f) =\n                            f) })\n                X✝ Y✝).symm\n          g)\n      none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase toFun.h.some\nα : Type u_1\nβ : Type u_2\nX'✝ X✝ : Type ?u.6897\nY✝ : Pointed\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (forget Pointed).obj Y✝\nval✝ : X'✝\n⊢ Pointed.Hom.toFun\n      (↑((fun X Y =>\n                { toFun := fun f => f.toFun ∘ some,\n                  invFun := fun f =>\n                    { toFun := fun o => Option.elim o Y.point f,\n                      map_point :=\n                        (_ :\n                          (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                            (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) },\n                  left_inv :=\n                    (_ :\n                      ∀ (f : typeToPointed.obj X ⟶ Y),\n                        (fun f =>\n                              { toFun := fun o => Option.elim o Y.point f,\n                                map_point :=\n                                  (_ :\n                                    (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                            ((fun f => f.toFun ∘ some) f) =\n                          f),\n                  right_inv :=\n                    (_ :\n                      ∀ (f : X ⟶ (forget Pointed).obj Y),\n                        (fun f => f.toFun ∘ some)\n                            ((fun f =>\n                                { toFun := fun o => Option.elim o Y.point f,\n                                  map_point :=\n                                    (_ :\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                              f) =\n                          f) })\n              X'✝ Y✝).symm\n        (f ≫ g))\n      (some val✝) =\n    Pointed.Hom.toFun\n      (typeToPointed.map f ≫\n        ↑((fun X Y =>\n                  { toFun := fun f => f.toFun ∘ some,\n                    invFun := fun f =>\n                      { toFun := fun o => Option.elim o Y.point f,\n                        map_point :=\n                          (_ :\n                            (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                              (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) },\n                    left_inv :=\n                      (_ :\n                        ∀ (f : typeToPointed.obj X ⟶ Y),\n                          (fun f =>\n                                { toFun := fun o => Option.elim o Y.point f,\n                                  map_point :=\n                                    (_ :\n                                      (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                              ((fun f => f.toFun ∘ some) f) =\n                            f),\n                    right_inv :=\n                      (_ :\n                        ∀ (f : X ⟶ (forget Pointed).obj Y),\n                          (fun f => f.toFun ∘ some)\n                              ((fun f =>\n                                  { toFun := fun o => Option.elim o Y.point f,\n                                    map_point :=\n                                      (_ :\n                                        (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point =\n                                          (fun o => Option.elim o Y.point f) (typeToPointed.obj X).point) })\n                                f) =\n                            f) })\n                X✝ Y✝).symm\n          g)\n      (some val✝)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Category.Pointed", "llama_tokens": 6272, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850278370112, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.38861043481155305}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Semigroup α\nx y : α\n⊢ ((fun x_1 => x * x_1) ∘ fun x => y * x) = fun x_1 => x * y * x_1\n[PROOFSTEP]\next z\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Semigroup α\nx y z : α\n⊢ ((fun x_1 => x * x_1) ∘ fun x => y * x) z = x * y * z\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Semigroup α\nx y : α\n⊢ ((fun x_1 => x_1 * x) ∘ fun x => x * y) = fun x_1 => x_1 * (y * x)\n[PROOFSTEP]\next z\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Semigroup α\nx y z : α\n⊢ ((fun x_1 => x_1 * x) ∘ fun x => x * y) z = z * (y * x)\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝¹ : MulOneClass M\nP : Prop\ninst✝ : Decidable P\na b : M\n⊢ (if P then a * b else 1) = (if P then a else 1) * if P then b else 1\n[PROOFSTEP]\nby_cases h : P\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝¹ : MulOneClass M\nP : Prop\ninst✝ : Decidable P\na b : M\nh : P\n⊢ (if P then a * b else 1) = (if P then a else 1) * if P then b else 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝¹ : MulOneClass M\nP : Prop\ninst✝ : Decidable P\na b : M\nh : ¬P\n⊢ (if P then a * b else 1) = (if P then a else 1) * if P then b else 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝¹ : MulOneClass M\nP : Prop\ninst✝ : Decidable P\na b : M\n⊢ (if P then 1 else a * b) = (if P then 1 else a) * if P then 1 else b\n[PROOFSTEP]\nby_cases h : P\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝¹ : MulOneClass M\nP : Prop\ninst✝ : Decidable P\na b : M\nh : P\n⊢ (if P then 1 else a * b) = (if P then 1 else a) * if P then 1 else b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝¹ : MulOneClass M\nP : Prop\ninst✝ : Decidable P\na b : M\nh : ¬P\n⊢ (if P then 1 else a * b) = (if P then 1 else a) * if P then 1 else b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝ : MulOneClass M\na b : M\nh : a * b = 1\n⊢ a = 1 ↔ b = 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝ : MulOneClass M\na b : M\nh : a * b = 1\n⊢ a = 1 → b = 1\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝ : MulOneClass M\nb : M\nh : 1 * b = 1\n⊢ b = 1\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝ : MulOneClass M\na b : M\nh : a * b = 1\n⊢ b = 1 → a = 1\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝ : MulOneClass M\na : M\nh : a * 1 = 1\n⊢ a = 1\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommSemigroup G\na b c d : G\n⊢ a * b * (c * d) = a * c * (b * d)\n[PROOFSTEP]\nsimp only [mul_left_comm, mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommSemigroup G\na b c : G\n⊢ a * b * c = b * c * a\n[PROOFSTEP]\nsimp only [mul_left_comm, mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommSemigroup G\na b c : G\n⊢ a * (b * c) = b * (c * a)\n[PROOFSTEP]\nsimp only [mul_left_comm, mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝¹ : AddCommSemigroup M\ninst✝ : One M\na b : M\n⊢ bit1 (a + b) = bit1 a + bit0 b\n[PROOFSTEP]\nrw [add_comm, bit1_add, add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝¹ : AddMonoid M\na b c : M\ninst✝ : One M\n⊢ bit1 0 = 1\n[PROOFSTEP]\nrw [bit1, bit0_zero, zero_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝ : LeftCancelMonoid M\na b : M\n⊢ a * b = a ↔ a * b = a * 1\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\nM : Type u\ninst✝ : RightCancelMonoid M\na b : M\n⊢ a * b = b ↔ a * b = 1 * b\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivInvMonoid G\na b c x : G\n⊢ x⁻¹ = 1 / x\n[PROOFSTEP]\nrw [div_eq_mul_inv, one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivInvMonoid G\na b c x y : G\n⊢ x * (1 / y) = x / y\n[PROOFSTEP]\nrw [div_eq_mul_inv, one_mul, div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivInvMonoid G\na✝ b✝ c✝ a b c : G\n⊢ a * b / c = a * (b / c)\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv, mul_assoc _ _ _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivInvMonoid G\na✝ b✝ c✝ a b c : G\n⊢ a * (b / c) = a * b / c\n[PROOFSTEP]\nsimp only [mul_assoc, div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivInvMonoid G\na✝ b✝ c a b : G\n⊢ a / b = a * (1 / b)\n[PROOFSTEP]\nrw [div_eq_mul_inv, one_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivInvOneMonoid G\na : G\n⊢ a / 1 = a\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\nh : a * b = 1\n⊢ b⁻¹ = a\n[PROOFSTEP]\nrw [← inv_eq_of_mul_eq_one_right h, inv_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\nh : b * a = 1\n⊢ b = 1 / a\n[PROOFSTEP]\nrw [eq_inv_of_mul_eq_one_left h, one_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\nh : a * b = 1\n⊢ b = 1 / a\n[PROOFSTEP]\nrw [eq_inv_of_mul_eq_one_right h, one_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\nh : a / b = 1\n⊢ a * b⁻¹ = 1\n[PROOFSTEP]\nrwa [← div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\n⊢ 1 / a * (1 / b) = 1 / (b * a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\n⊢ a⁻¹ / b = (b * a)⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\n⊢ (a / b)⁻¹ = b / a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\n⊢ 1 / (a / b) = b / a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\n⊢ 1 / (1 / a) = a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\nsrc✝ : DivInvMonoid α := toDivInvMonoid\n⊢ 1⁻¹ = 1\n[PROOFSTEP]\nsimpa only [one_div, inv_inv] using (inv_div (1 : α) 1).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\nh : 1 / a = 1 / b\n⊢ a = b\n[PROOFSTEP]\nrw [← one_div_one_div a, h, one_div_one_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\n⊢ a / (b / c) = a * c / b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\n⊢ a / b⁻¹ = a * b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionMonoid α\na b c : α\n⊢ a / (b * c) = a / c / b\n[PROOFSTEP]\nsimp only [mul_assoc, mul_inv_rev, div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ (a * b)⁻¹ = a⁻¹ * b⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ (a / b)⁻¹ = a⁻¹ / b⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a / b = b⁻¹ * a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a⁻¹ * b = b / a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ (a * b)⁻¹ = a⁻¹ / b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a⁻¹ / b⁻¹ = b / a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ (a⁻¹ / b⁻¹)⁻¹ = a / b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ 1 / a * (1 / b) = 1 / (a * b)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a / b / c = a / c / b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a / b / c = a / (b * c)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a / b * c = a / (b / c)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a * (b / c) = b * (a / c)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a * b / c = a / c * b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a / (b * c) = a / b / c\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a / b * c = a * c / b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a / b * c = a * (c / b)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a / b * c = c / b * a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a / (b * c) = a / b * (1 / c)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a / b / (c / d) = a * d / (b * c)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a / b / (c / d) = a / c / (b / d)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a / b * (c / d) = a * c / (b * d)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : DivisionCommMonoid α\na b c d : α\n⊢ a * b / (c * d) = a / c * (b / d)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ a / b = b⁻¹ ↔ a = 1\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_left_eq_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a * c = b\n⊢ a = b * c⁻¹\n[PROOFSTEP]\nsimp [h.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : b * a = c\n⊢ a = b⁻¹ * c\n[PROOFSTEP]\nsimp [h.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : b = a * c\n⊢ a⁻¹ * b = c\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a = c * b\n⊢ a * b⁻¹ = c\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a * c⁻¹ = b\n⊢ a = b * c\n[PROOFSTEP]\nsimp [h.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : b⁻¹ * a = c\n⊢ a = b * c\n[PROOFSTEP]\nsimp [h.symm, mul_inv_cancel_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : b = a⁻¹ * c\n⊢ a * b = c\n[PROOFSTEP]\nrw [h, mul_inv_cancel_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a = c * b⁻¹\n⊢ a * b = c\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a = b⁻¹\n⊢ a * b = 1\n[PROOFSTEP]\nrw [h, mul_left_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ a * b = 1 ↔ a⁻¹ = b\n[PROOFSTEP]\nrw [mul_eq_one_iff_eq_inv, inv_eq_iff_eq_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a = b * c⁻¹\n⊢ a * c = b\n[PROOFSTEP]\nrw [h, inv_mul_cancel_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a * c = b\n⊢ a = b * c⁻¹\n[PROOFSTEP]\nrw [← h, mul_inv_cancel_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a = b⁻¹ * c\n⊢ b * a = c\n[PROOFSTEP]\nrw [h, mul_inv_cancel_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : b * a = c\n⊢ a = b⁻¹ * c\n[PROOFSTEP]\nrw [← h, inv_mul_cancel_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a⁻¹ * b = c\n⊢ b = a * c\n[PROOFSTEP]\nrw [← h, mul_inv_cancel_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : b = a * c\n⊢ a⁻¹ * b = c\n[PROOFSTEP]\nrw [h, inv_mul_cancel_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a * b⁻¹ = c\n⊢ a = c * b\n[PROOFSTEP]\nrw [← h, inv_mul_cancel_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a = c * b\n⊢ a * b⁻¹ = c\n[PROOFSTEP]\nrw [h, mul_inv_cancel_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ a * b⁻¹ = 1 ↔ a = b\n[PROOFSTEP]\nrw [mul_eq_one_iff_eq_inv, inv_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ a⁻¹ * b = 1 ↔ a = b\n[PROOFSTEP]\nrw [mul_eq_one_iff_eq_inv, inv_inj]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ Injective fun a => a / b\n[PROOFSTEP]\nsimp only [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ Injective fun a => a * b⁻¹\n[PROOFSTEP]\nexact fun a a' h ↦ mul_left_injective b⁻¹ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ Injective fun a => b / a\n[PROOFSTEP]\nsimp only [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ Injective fun a => b * a⁻¹\n[PROOFSTEP]\nexact fun a a' h ↦ inv_injective (mul_right_injective b h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na✝ b✝ c d a b : G\n⊢ a / b * b = a\n[PROOFSTEP]\nrw [div_eq_mul_inv, inv_mul_cancel_right a b]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na✝ b c d a : G\n⊢ a / a = 1\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_right_inv a]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na✝ b✝ c d a b : G\n⊢ a * b / b = a\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_inv_cancel_right a b]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na✝ b✝ c d a b : G\n⊢ a / (b * a) = b⁻¹\n[PROOFSTEP]\nrw [← inv_div, mul_div_cancel'']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na✝ b✝ c✝ d a b c : G\n⊢ a * c / (b * c) = a / b\n[PROOFSTEP]\nrw [div_mul_eq_div_div_swap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na✝ b✝ c✝ d a b c : G\n⊢ a * c / c / b = a / b\n[PROOFSTEP]\nsimp only [mul_left_inj, eq_self_iff_true, mul_div_cancel'']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a * c = b\n⊢ a = b / c\n[PROOFSTEP]\nsimp [← h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a = c * b\n⊢ a / b = c\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a / c = b\n⊢ a = b * c\n[PROOFSTEP]\nsimp [← h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a = c / b\n⊢ a * b = c\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ b / a = c / a ↔ b = c\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ b * a⁻¹ = c * a⁻¹ ↔ b = c\n[PROOFSTEP]\nexact mul_left_inj _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na✝ b✝ c✝ d a b c : G\n⊢ a / b * (b / c) = a / c\n[PROOFSTEP]\nrw [← mul_div_assoc, div_mul_cancel']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na✝ b✝ c✝ d a b c : G\n⊢ a / c / (b / c) = a / b\n[PROOFSTEP]\nrw [← inv_div c b, div_inv_eq_mul, div_mul_div_cancel']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nh : a = b\n⊢ a / b = 1\n[PROOFSTEP]\nrw [h, div_self']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ a / b = a ↔ b = 1\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_right_eq_self, inv_eq_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ a = b / c ↔ a * c = b\n[PROOFSTEP]\nrw [div_eq_mul_inv, eq_mul_inv_iff_mul_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\n⊢ a / b = c ↔ a = c * b\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_inv_eq_iff_eq_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nH : a / b = c / d\n⊢ a = b ↔ c = d\n[PROOFSTEP]\nrw [← div_eq_one, H, div_eq_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d : G\nn : ℤ\nhn : n ≠ 0\nx : G\nh : x ^ n = 1\n⊢ ∃ n, 0 < n ∧ x ^ n = 1\n[PROOFSTEP]\ncases' n with n n\n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d x : G\nn : ℕ\nhn : Int.ofNat n ≠ 0\nh : x ^ Int.ofNat n = 1\n⊢ ∃ n, 0 < n ∧ x ^ n = 1\n[PROOFSTEP]\nsimp only [Int.ofNat_eq_coe] at h \n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d x : G\nn : ℕ\nhn : Int.ofNat n ≠ 0\nh : x ^ ↑n = 1\n⊢ ∃ n, 0 < n ∧ x ^ n = 1\n[PROOFSTEP]\nrw [zpow_ofNat] at h \n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d x : G\nn : ℕ\nhn : Int.ofNat n ≠ 0\nh : x ^ n = 1\n⊢ ∃ n, 0 < n ∧ x ^ n = 1\n[PROOFSTEP]\nrefine' ⟨n, Nat.pos_of_ne_zero fun n0 ↦ hn ?_, h⟩\n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d x : G\nn : ℕ\nhn : Int.ofNat n ≠ 0\nh : x ^ n = 1\nn0 : n = 0\n⊢ Int.ofNat n = 0\n[PROOFSTEP]\nrw [n0]\n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d x : G\nn : ℕ\nhn : Int.ofNat n ≠ 0\nh : x ^ n = 1\nn0 : n = 0\n⊢ Int.ofNat 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d x : G\nn : ℕ\nhn : Int.negSucc n ≠ 0\nh : x ^ Int.negSucc n = 1\n⊢ ∃ n, 0 < n ∧ x ^ n = 1\n[PROOFSTEP]\nrw [zpow_negSucc, inv_eq_one] at h \n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : Group G\na b c d x : G\nn : ℕ\nhn : Int.negSucc n ≠ 0\nh : x ^ (n + 1) = 1\n⊢ ∃ n, 0 < n ∧ x ^ n = 1\n[PROOFSTEP]\nrefine' ⟨n + 1, n.succ_pos, h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c✝ d a b c : G\nh : a = b * c\n⊢ a / b = c\n[PROOFSTEP]\nrw [h, div_eq_mul_inv, mul_comm, inv_mul_cancel_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c✝ d a b c : G\n⊢ c * a / (c * b) = a / b\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_inv_rev, mul_comm b⁻¹ c⁻¹, mul_comm c a, mul_assoc, ← mul_assoc c, mul_right_inv, one_mul,\n  div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na b c d : G\nh : c * a = b\n⊢ a = b / c\n[PROOFSTEP]\nsimp [h.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na b c d : G\nh : a / b = c\n⊢ a = b * c\n[PROOFSTEP]\nsimp [h.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na b c d : G\nh : b = c / a\n⊢ a * b = c\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na b c d : G\nh : b = c / a\n⊢ a * (c * a⁻¹) = c\n[PROOFSTEP]\nrw [mul_comm c, mul_inv_cancel_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c d a b : G\n⊢ a / (a / b) = b\n[PROOFSTEP]\nsimpa using mul_inv_cancel_left a b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c✝ d a b c : G\n⊢ a / b = c / b * (a / c)\n[PROOFSTEP]\nsimp [mul_left_comm c]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c d a b : G\n⊢ a / b / a = b⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na b c d : G\n⊢ a = b / c ↔ c * a = b\n[PROOFSTEP]\nrw [eq_div_iff_mul_eq', mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na b c d : G\n⊢ a / b = c ↔ a = b * c\n[PROOFSTEP]\nrw [div_eq_iff_eq_mul, mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c d a b : G\n⊢ a * b / a = b\n[PROOFSTEP]\nrw [div_eq_inv_mul, inv_mul_cancel_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c d a b : G\n⊢ a * (b / a) = b\n[PROOFSTEP]\nrw [← mul_div_assoc, mul_div_cancel''']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c d a b : G\n⊢ a / (a * b) = b⁻¹\n[PROOFSTEP]\nrw [← inv_div, mul_div_cancel''']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c d a b : G\n⊢ a * (b * a⁻¹) = b\n[PROOFSTEP]\nrw [← div_eq_mul_inv, mul_div_cancel'_right a b]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c✝ d a b c : G\n⊢ a * c * (b / c) = a * b\n[PROOFSTEP]\nrw [mul_assoc, mul_div_cancel'_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c✝ d a b c : G\n⊢ a / c * (b * c) = a * b\n[PROOFSTEP]\nrw [mul_left_comm, div_mul_cancel', mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c✝ d a b c : G\n⊢ a / b * (c / a) = c / b\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c✝ d a b c : G\n⊢ c / a * (a / b) = c / b\n[PROOFSTEP]\napply div_mul_div_cancel'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c✝ d a b c : G\n⊢ a * b / (a / c) = b * c\n[PROOFSTEP]\nrw [← div_mul, mul_div_cancel''']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na✝ b✝ c✝ d a b c : G\n⊢ c / a / (c / b) = b / a\n[PROOFSTEP]\nrw [← inv_div b c, div_inv_eq_mul, mul_comm, div_mul_div_cancel']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na b c d : G\n⊢ a / b = c / d ↔ a * d = c * b\n[PROOFSTEP]\nrw [div_eq_iff_eq_mul, div_mul_eq_mul_div, eq_comm, div_eq_iff_eq_mul']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na b c d : G\n⊢ c * b = d * a ↔ a * d = c * b\n[PROOFSTEP]\nsimp only [mul_comm, eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\na b c d : G\n⊢ a / b = c / d ↔ a / c = b / d\n[PROOFSTEP]\nrw [div_eq_iff_eq_mul, div_mul_eq_mul_div, div_eq_iff_eq_mul', mul_div_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\nhsymm : Symmetric p\nhf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c\na b c : α\npab : p a b\npbc : p b c\npac : p a c\n⊢ f a c = f a b * f b c\n[PROOFSTEP]\nhave hmul' : ∀ {b c}, r b c → p a b → p b c → p a c → f a c = f a b * f b c :=\n  by\n  intros b c rbc pab pbc pac\n  obtain rab | rba := total_of r a b\n  · exact hmul rab rbc pab pbc pac\n  rw [← one_mul (f a c), ← hf_swap pab, mul_assoc]\n  obtain rac | rca := total_of r a c\n  · rw [hmul rba rac (hsymm pab) pac pbc]\n  · rw [hmul rbc rca pbc (hsymm pac) (hsymm pab), mul_assoc, hf_swap (hsymm pac), mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\nhsymm : Symmetric p\nhf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c\na b c : α\npab : p a b\npbc : p b c\npac : p a c\n⊢ ∀ {b c : α}, r b c → p a b → p b c → p a c → f a c = f a b * f b c\n[PROOFSTEP]\nintros b c rbc pab pbc pac\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\nhsymm : Symmetric p\nhf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c\na b✝ c✝ : α\npab✝ : p a b✝\npbc✝ : p b✝ c✝\npac✝ : p a c✝\nb c : α\nrbc : r b c\npab : p a b\npbc : p b c\npac : p a c\n⊢ f a c = f a b * f b c\n[PROOFSTEP]\nobtain rab | rba := total_of r a b\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\nhsymm : Symmetric p\nhf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c\na b✝ c✝ : α\npab✝ : p a b✝\npbc✝ : p b✝ c✝\npac✝ : p a c✝\nb c : α\nrbc : r b c\npab : p a b\npbc : p b c\npac : p a c\nrab : r a b\n⊢ f a c = f a b * f b c\n[PROOFSTEP]\nexact hmul rab rbc pab pbc pac\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\nhsymm : Symmetric p\nhf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c\na b✝ c✝ : α\npab✝ : p a b✝\npbc✝ : p b✝ c✝\npac✝ : p a c✝\nb c : α\nrbc : r b c\npab : p a b\npbc : p b c\npac : p a c\nrba : r b a\n⊢ f a c = f a b * f b c\n[PROOFSTEP]\nrw [← one_mul (f a c), ← hf_swap pab, mul_assoc]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\nhsymm : Symmetric p\nhf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c\na b✝ c✝ : α\npab✝ : p a b✝\npbc✝ : p b✝ c✝\npac✝ : p a c✝\nb c : α\nrbc : r b c\npab : p a b\npbc : p b c\npac : p a c\nrba : r b a\n⊢ f a b * (f b a * f a c) = f a b * f b c\n[PROOFSTEP]\nobtain rac | rca := total_of r a c\n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\nhsymm : Symmetric p\nhf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c\na b✝ c✝ : α\npab✝ : p a b✝\npbc✝ : p b✝ c✝\npac✝ : p a c✝\nb c : α\nrbc : r b c\npab : p a b\npbc : p b c\npac : p a c\nrba : r b a\nrac : r a c\n⊢ f a b * (f b a * f a c) = f a b * f b c\n[PROOFSTEP]\nrw [hmul rba rac (hsymm pab) pac pbc]\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\nhsymm : Symmetric p\nhf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c\na b✝ c✝ : α\npab✝ : p a b✝\npbc✝ : p b✝ c✝\npac✝ : p a c✝\nb c : α\nrbc : r b c\npab : p a b\npbc : p b c\npac : p a c\nrba : r b a\nrca : r c a\n⊢ f a b * (f b a * f a c) = f a b * f b c\n[PROOFSTEP]\nrw [hmul rbc rca pbc (hsymm pac) (hsymm pab), mul_assoc, hf_swap (hsymm pac), mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\nhsymm : Symmetric p\nhf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c\na b c : α\npab : p a b\npbc : p b c\npac : p a c\nhmul' : ∀ {b c : α}, r b c → p a b → p b c → p a c → f a c = f a b * f b c\n⊢ f a c = f a b * f b c\n[PROOFSTEP]\nobtain rbc | rcb := total_of r b c\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\nhsymm : Symmetric p\nhf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c\na b c : α\npab : p a b\npbc : p b c\npac : p a c\nhmul' : ∀ {b c : α}, r b c → p a b → p b c → p a c → f a c = f a b * f b c\nrbc : r b c\n⊢ f a c = f a b * f b c\n[PROOFSTEP]\nexact hmul' rbc pab pbc pac\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\nhsymm : Symmetric p\nhf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c\na b c : α\npab : p a b\npbc : p b c\npac : p a c\nhmul' : ∀ {b c : α}, r b c → p a b → p b c → p a c → f a c = f a b * f b c\nrcb : r c b\n⊢ f a c = f a b * f b c\n[PROOFSTEP]\nrw [hmul' rcb pac (hsymm pbc) pab, mul_assoc, hf_swap (hsymm pbc), mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np✝ r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\np : α → Prop\nhswap : ∀ {a b : α}, p a → p b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a → p b → p c → f a c = f a b * f b c\na b c : α\npa : p a\npb : p b\npc : p c\n⊢ f a c = f a b * f b c\n[PROOFSTEP]\napply multiplicative_of_symmetric_of_isTotal (fun a b => p a ∧ p b) r f fun _ _ => And.symm\n[GOAL]\ncase hf_swap\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np✝ r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\np : α → Prop\nhswap : ∀ {a b : α}, p a → p b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a → p b → p c → f a c = f a b * f b c\na b c : α\npa : p a\npb : p b\npc : p c\n⊢ ∀ {a b : α}, p a ∧ p b → f a b * f b a = 1\n[PROOFSTEP]\nsimp_rw [and_imp]\n[GOAL]\ncase hf_swap\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np✝ r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\np : α → Prop\nhswap : ∀ {a b : α}, p a → p b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a → p b → p c → f a c = f a b * f b c\na b c : α\npa : p a\npb : p b\npc : p c\n⊢ ∀ {a b : α}, p a → p b → f a b * f b a = 1\n[PROOFSTEP]\nexact @hswap\n[GOAL]\ncase hmul\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np✝ r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\np : α → Prop\nhswap : ∀ {a b : α}, p a → p b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a → p b → p c → f a c = f a b * f b c\na b c : α\npa : p a\npb : p b\npc : p c\n⊢ ∀ {a b c : α}, r a b → r b c → p a ∧ p b → p b ∧ p c → p a ∧ p c → f a c = f a b * f b c\n[PROOFSTEP]\nexact fun rab rbc pab _pbc pac => hmul rab rbc pab.1 pab.2 pac.2\n[GOAL]\ncase pab\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np✝ r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\np : α → Prop\nhswap : ∀ {a b : α}, p a → p b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a → p b → p c → f a c = f a b * f b c\na b c : α\npa : p a\npb : p b\npc : p c\n⊢ p a ∧ p b\ncase pbc\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np✝ r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\np : α → Prop\nhswap : ∀ {a b : α}, p a → p b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a → p b → p c → f a c = f a b * f b c\na b c : α\npa : p a\npb : p b\npc : p c\n⊢ p b ∧ p c\ncase pac\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝¹ : Monoid β\np✝ r : α → α → Prop\ninst✝ : IsTotal α r\nf : α → α → β\np : α → Prop\nhswap : ∀ {a b : α}, p a → p b → f a b * f b a = 1\nhmul : ∀ {a b c : α}, r a b → r b c → p a → p b → p c → f a c = f a b * f b c\na b c : α\npa : p a\npb : p b\npc : p c\n⊢ p a ∧ p c\n[PROOFSTEP]\nexacts [⟨pa, pb⟩, ⟨pb, pc⟩, ⟨pa, pc⟩]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Group.Basic", "llama_tokens": 16285, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583250334527, "lm_q2_score": 0.5583269943353745, "lm_q1q2_score": 0.38857231979860923}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv w : VectorMeasure α M\nh : ↑v = ↑w\n⊢ v = w\n[PROOFSTEP]\ncases v\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nw : VectorMeasure α M\nmeasureOf'✝ : Set α → M\nempty'✝ : measureOf'✝ ∅ = 0\nnot_measurable'✝ : ∀ ⦃i : Set α⦄, ¬MeasurableSet i → measureOf'✝ i = 0\nm_iUnion'✝ :\n  ∀ ⦃f : ℕ → Set α⦄,\n    (∀ (i : ℕ), MeasurableSet (f i)) →\n      Pairwise (Disjoint on f) → HasSum (fun i => measureOf'✝ (f i)) (measureOf'✝ (⋃ (i : ℕ), f i))\nh : ↑{ measureOf' := measureOf'✝, empty' := empty'✝, not_measurable' := not_measurable'✝, m_iUnion' := m_iUnion'✝ } = ↑w\n⊢ { measureOf' := measureOf'✝, empty' := empty'✝, not_measurable' := not_measurable'✝, m_iUnion' := m_iUnion'✝ } = w\n[PROOFSTEP]\ncases w\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nmeasureOf'✝¹ : Set α → M\nempty'✝¹ : measureOf'✝¹ ∅ = 0\nnot_measurable'✝¹ : ∀ ⦃i : Set α⦄, ¬MeasurableSet i → measureOf'✝¹ i = 0\nm_iUnion'✝¹ :\n  ∀ ⦃f : ℕ → Set α⦄,\n    (∀ (i : ℕ), MeasurableSet (f i)) →\n      Pairwise (Disjoint on f) → HasSum (fun i => measureOf'✝¹ (f i)) (measureOf'✝¹ (⋃ (i : ℕ), f i))\nmeasureOf'✝ : Set α → M\nempty'✝ : measureOf'✝ ∅ = 0\nnot_measurable'✝ : ∀ ⦃i : Set α⦄, ¬MeasurableSet i → measureOf'✝ i = 0\nm_iUnion'✝ :\n  ∀ ⦃f : ℕ → Set α⦄,\n    (∀ (i : ℕ), MeasurableSet (f i)) →\n      Pairwise (Disjoint on f) → HasSum (fun i => measureOf'✝ (f i)) (measureOf'✝ (⋃ (i : ℕ), f i))\nh :\n  ↑{ measureOf' := measureOf'✝¹, empty' := empty'✝¹, not_measurable' := not_measurable'✝¹, m_iUnion' := m_iUnion'✝¹ } =\n    ↑{ measureOf' := measureOf'✝, empty' := empty'✝, not_measurable' := not_measurable'✝, m_iUnion' := m_iUnion'✝ }\n⊢ { measureOf' := measureOf'✝¹, empty' := empty'✝¹, not_measurable' := not_measurable'✝¹, m_iUnion' := m_iUnion'✝¹ } =\n    { measureOf' := measureOf'✝, empty' := empty'✝, not_measurable' := not_measurable'✝, m_iUnion' := m_iUnion'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv w : VectorMeasure α M\n⊢ v = w ↔ ∀ (i : Set α), ↑v i = ↑w i\n[PROOFSTEP]\nrw [← coe_injective.eq_iff, Function.funext_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv w : VectorMeasure α M\n⊢ v = w ↔ ∀ (i : Set α), MeasurableSet i → ↑v i = ↑w i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv w : VectorMeasure α M\n⊢ v = w → ∀ (i : Set α), MeasurableSet i → ↑v i = ↑w i\n[PROOFSTEP]\nrintro rfl _ _\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\ni✝ : Set α\na✝ : MeasurableSet i✝\n⊢ ↑v i✝ = ↑v i✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv w : VectorMeasure α M\n⊢ (∀ (i : Set α), MeasurableSet i → ↑v i = ↑w i) → v = w\n[PROOFSTEP]\nrw [ext_iff']\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv w : VectorMeasure α M\n⊢ (∀ (i : Set α), MeasurableSet i → ↑v i = ↑w i) → ∀ (i : Set α), ↑v i = ↑w i\n[PROOFSTEP]\nintro h i\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv w : VectorMeasure α M\nh : ∀ (i : Set α), MeasurableSet i → ↑v i = ↑w i\ni : Set α\n⊢ ↑v i = ↑w i\n[PROOFSTEP]\nby_cases hi : MeasurableSet i\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv w : VectorMeasure α M\nh : ∀ (i : Set α), MeasurableSet i → ↑v i = ↑w i\ni : Set α\nhi : MeasurableSet i\n⊢ ↑v i = ↑w i\n[PROOFSTEP]\nexact h i hi\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv w : VectorMeasure α M\nh : ∀ (i : Set α), MeasurableSet i → ↑v i = ↑w i\ni : Set α\nhi : ¬MeasurableSet i\n⊢ ↑v i = ↑w i\n[PROOFSTEP]\nsimp_rw [not_measurable _ hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ (i : β), f i))\n[PROOFSTEP]\ncases nonempty_encodable β\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\n⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ (i : β), f i))\n[PROOFSTEP]\nset g := fun i : ℕ => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b with hg\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\n⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ (i : β), f i))\n[PROOFSTEP]\nhave hg₁ : ∀ i, MeasurableSet (g i) := fun _ => MeasurableSet.iUnion fun b => MeasurableSet.iUnion fun _ => hf₁ b\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\n⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ (i : β), f i))\n[PROOFSTEP]\nhave hg₂ : Pairwise (Disjoint on g) := Encodable.iUnion_decode₂_disjoint_on hf₂\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\n⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ (i : β), f i))\n[PROOFSTEP]\nhave := v.of_disjoint_iUnion_nat hg₁ hg₂\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (i : ℕ), g i) = ∑' (i : ℕ), ↑v (g i)\n⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ (i : β), f i))\n[PROOFSTEP]\nrw [hg, Encodable.iUnion_decode₂] at this \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\n⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ (i : β), f i))\n[PROOFSTEP]\nhave hg₃ : (fun i : β => v (f i)) = fun i => v (g (Encodable.encode i)) :=\n  by\n  ext x\n  rw [hg]\n  simp only\n  congr\n  ext y\n  simp only [exists_prop, Set.mem_iUnion, Option.mem_def]\n  constructor\n  · intro hy\n    refine' ⟨x, (Encodable.decode₂_is_partial_inv _ _).2 rfl, hy⟩\n  · rintro ⟨b, hb₁, hb₂⟩\n    rw [Encodable.decode₂_is_partial_inv _ _] at hb₁ \n    rwa [← Encodable.encode_injective hb₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\n⊢ (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nx : β\n⊢ ↑v (f x) = ↑v (g (Encodable.encode x))\n[PROOFSTEP]\nrw [hg]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nx : β\n⊢ ↑v (f x) = ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) (Encodable.encode x))\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nx : β\n⊢ ↑v (f x) = ↑v (⋃ (b : β) (_ : b ∈ Encodable.decode₂ β (Encodable.encode x)), f b)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_a\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nx : β\n⊢ f x = ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β (Encodable.encode x)), f b\n[PROOFSTEP]\next y\n[GOAL]\ncase h.e_a.h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nx : β\ny : α\n⊢ y ∈ f x ↔ y ∈ ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β (Encodable.encode x)), f b\n[PROOFSTEP]\nsimp only [exists_prop, Set.mem_iUnion, Option.mem_def]\n[GOAL]\ncase h.e_a.h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nx : β\ny : α\n⊢ y ∈ f x ↔ ∃ i, Encodable.decode₂ β (Encodable.encode x) = Option.some i ∧ y ∈ f i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.e_a.h.mp\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nx : β\ny : α\n⊢ y ∈ f x → ∃ i, Encodable.decode₂ β (Encodable.encode x) = Option.some i ∧ y ∈ f i\n[PROOFSTEP]\nintro hy\n[GOAL]\ncase h.e_a.h.mp\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nx : β\ny : α\nhy : y ∈ f x\n⊢ ∃ i, Encodable.decode₂ β (Encodable.encode x) = Option.some i ∧ y ∈ f i\n[PROOFSTEP]\nrefine' ⟨x, (Encodable.decode₂_is_partial_inv _ _).2 rfl, hy⟩\n[GOAL]\ncase h.e_a.h.mpr\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nx : β\ny : α\n⊢ (∃ i, Encodable.decode₂ β (Encodable.encode x) = Option.some i ∧ y ∈ f i) → y ∈ f x\n[PROOFSTEP]\nrintro ⟨b, hb₁, hb₂⟩\n[GOAL]\ncase h.e_a.h.mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nx : β\ny : α\nb : β\nhb₁ : Encodable.decode₂ β (Encodable.encode x) = Option.some b\nhb₂ : y ∈ f b\n⊢ y ∈ f x\n[PROOFSTEP]\nrw [Encodable.decode₂_is_partial_inv _ _] at hb₁ \n[GOAL]\ncase h.e_a.h.mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nx : β\ny : α\nb : β\nhb₁ : Encodable.encode b = Encodable.encode x\nhb₂ : y ∈ f b\n⊢ y ∈ f x\n[PROOFSTEP]\nrwa [← Encodable.encode_injective hb₁]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nhg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))\n⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ (i : β), f i))\n[PROOFSTEP]\nrw [Summable.hasSum_iff, this, ← tsum_iUnion_decode₂]\n[GOAL]\ncase intro.m0\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nhg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))\n⊢ ↑v ∅ = 0\n[PROOFSTEP]\nexact v.empty\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nhg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))\n⊢ Summable fun i => ↑v (f i)\n[PROOFSTEP]\nrw [hg₃]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nhg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))\n⊢ Summable fun i => ↑v (g (Encodable.encode i))\n[PROOFSTEP]\nchange Summable ((fun i => v (g i)) ∘ Encodable.encode)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nhg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))\n⊢ Summable ((fun i => ↑v (g i)) ∘ Encodable.encode)\n[PROOFSTEP]\nrw [Function.Injective.summable_iff Encodable.encode_injective]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nhg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))\n⊢ Summable fun i => ↑v (g i)\n[PROOFSTEP]\nexact (v.m_iUnion hg₁ hg₂).summable\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nhg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))\n⊢ ∀ (x : ℕ), ¬x ∈ range Encodable.encode → ↑v (g x) = 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nhg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))\nx : ℕ\nhx : ¬x ∈ range Encodable.encode\n⊢ ↑v (g x) = 0\n[PROOFSTEP]\nconvert v.empty\n[GOAL]\ncase h.e'_2.h.e'_7\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nhg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))\nx : ℕ\nhx : ¬x ∈ range Encodable.encode\n⊢ g x = ∅\n[PROOFSTEP]\nsimp only [Set.iUnion_eq_empty, Option.mem_def, not_exists, Set.mem_range] at hx ⊢\n[GOAL]\ncase h.e'_2.h.e'_7\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nhg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))\nx : ℕ\nhx : ∀ (x_1 : β), ¬Encodable.encode x_1 = x\n⊢ ∀ (i : β), Encodable.decode₂ β x = Option.some i → f i = ∅\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.e'_2.h.e'_7\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : T2Space M\nv : VectorMeasure α M\nf✝ : ℕ → Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (i : β), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nval✝ : Encodable β\ng : ℕ → Set α := fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nthis : ↑v (⋃ (b : β), f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)\nhg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))\nx : ℕ\nhx : ∀ (x_1 : β), ¬Encodable.encode x_1 = x\ni : β\nhi : Encodable.decode₂ β x = Option.some i\n⊢ f i = ∅\n[PROOFSTEP]\nexact False.elim ((hx i) ((Encodable.decode₂_is_partial_inv _ _).1 hi))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nh : Disjoint A B\nhA : MeasurableSet A\nhB : MeasurableSet B\n⊢ ↑v (A ∪ B) = ↑v A + ↑v B\n[PROOFSTEP]\nrw [Set.union_eq_iUnion, of_disjoint_iUnion, tsum_fintype, Fintype.sum_bool, cond, cond]\n[GOAL]\ncase hf₁\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nh : Disjoint A B\nhA : MeasurableSet A\nhB : MeasurableSet B\n⊢ ∀ (i : Bool), MeasurableSet (bif i then A else B)\ncase hf₂\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nh : Disjoint A B\nhA : MeasurableSet A\nhB : MeasurableSet B\n⊢ Pairwise (Disjoint on fun b => bif b then A else B)\n[PROOFSTEP]\nexacts [fun b => Bool.casesOn b hB hA, pairwise_disjoint_on_bool.2 h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh : A ⊆ B\n⊢ ↑v A + ↑v (B \\ A) = ↑v B\n[PROOFSTEP]\nrw [← of_union (@Set.disjoint_sdiff_right _ A B) hA (hB.diff hA), Set.union_diff_cancel h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM✝ : Type u_3\ninst✝⁵ : AddCommMonoid M✝\ninst✝⁴ : TopologicalSpace M✝\ninst✝³ : T2Space M✝\nv✝ : VectorMeasure α M✝\nf : ℕ → Set α\nM : Type u_4\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh : A ⊆ B\n⊢ ↑v (B \\ A) = ↑v B - ↑v A\n[PROOFSTEP]\nrw [← of_add_of_diff hA hB h, add_sub_cancel']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ ↑v (A \\ B) + ↑v B = ↑v A\n[PROOFSTEP]\nsymm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ ↑v A = ↑v (A \\ B) + ↑v B\n[PROOFSTEP]\ncalc\n  v A = v (A \\ B ∪ A ∩ B) := by simp only [Set.diff_union_inter]\n  _ = v (A \\ B) + v (A ∩ B) := by\n    rw [of_union]\n    · rw [disjoint_comm]\n      exact Set.disjoint_of_subset_left (A.inter_subset_right B) disjoint_sdiff_self_right\n    · exact hA.diff hB\n    · exact hA.inter hB\n  _ = v (A \\ B) + v (A ∩ B ∪ B \\ A) := by\n    rw [of_union, h', add_zero]\n    · exact Set.disjoint_of_subset_left (A.inter_subset_left B) disjoint_sdiff_self_right\n    · exact hA.inter hB\n    · exact hB.diff hA\n  _ = v (A \\ B) + v B := by rw [Set.union_comm, Set.inter_comm, Set.diff_union_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ ↑v A = ↑v (A \\ B ∪ A ∩ B)\n[PROOFSTEP]\nsimp only [Set.diff_union_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ ↑v (A \\ B ∪ A ∩ B) = ↑v (A \\ B) + ↑v (A ∩ B)\n[PROOFSTEP]\nrw [of_union]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ Disjoint (A \\ B) (A ∩ B)\n[PROOFSTEP]\nrw [disjoint_comm]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ Disjoint (A ∩ B) (A \\ B)\n[PROOFSTEP]\nexact Set.disjoint_of_subset_left (A.inter_subset_right B) disjoint_sdiff_self_right\n[GOAL]\ncase hA\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ MeasurableSet (A \\ B)\n[PROOFSTEP]\nexact hA.diff hB\n[GOAL]\ncase hB\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ MeasurableSet (A ∩ B)\n[PROOFSTEP]\nexact hA.inter hB\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ ↑v (A \\ B) + ↑v (A ∩ B) = ↑v (A \\ B) + ↑v (A ∩ B ∪ B \\ A)\n[PROOFSTEP]\nrw [of_union, h', add_zero]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ Disjoint (A ∩ B) (B \\ A)\n[PROOFSTEP]\nexact Set.disjoint_of_subset_left (A.inter_subset_left B) disjoint_sdiff_self_right\n[GOAL]\ncase hA\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ MeasurableSet (A ∩ B)\n[PROOFSTEP]\nexact hA.inter hB\n[GOAL]\ncase hB\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ MeasurableSet (B \\ A)\n[PROOFSTEP]\nexact hB.diff hA\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\nA B : Set α\nhA : MeasurableSet A\nhB : MeasurableSet B\nh' : ↑v (B \\ A) = 0\n⊢ ↑v (A \\ B) + ↑v (A ∩ B ∪ B \\ A) = ↑v (A \\ B) + ↑v B\n[PROOFSTEP]\nrw [Set.union_comm, Set.inter_comm, Set.diff_union_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\ns : SignedMeasure α\nA B : Set α\nh : Disjoint A B\nhA₁ : MeasurableSet A\nhB₁ : MeasurableSet B\nhA₂ : 0 ≤ ↑s A\nhB₂ : 0 ≤ ↑s B\nhAB : ↑s (A ∪ B) = 0\n⊢ ↑s A = 0\n[PROOFSTEP]\nrw [of_union h hA₁ hB₁] at hAB \n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\ns : SignedMeasure α\nA B : Set α\nh : Disjoint A B\nhA₁ : MeasurableSet A\nhB₁ : MeasurableSet B\nhA₂ : 0 ≤ ↑s A\nhB₂ : 0 ≤ ↑s B\nhAB : ↑s A + ↑s B = 0\n⊢ ↑s A = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\ns : SignedMeasure α\nA B : Set α\nh : Disjoint A B\nhA₁ : MeasurableSet A\nhB₁ : MeasurableSet B\nhA₂ : ↑s A ≤ 0\nhB₂ : ↑s B ≤ 0\nhAB : ↑s (A ∪ B) = 0\n⊢ ↑s A = 0\n[PROOFSTEP]\nrw [of_union h hA₁ hB₁] at hAB \n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : T2Space M\nv : VectorMeasure α M\nf : ℕ → Set α\ns : SignedMeasure α\nA B : Set α\nh : Disjoint A B\nhA₁ : MeasurableSet A\nhB₁ : MeasurableSet B\nhA₂ : ↑s A ≤ 0\nhB₂ : ↑s B ≤ 0\nhAB : ↑s A + ↑s B = 0\n⊢ ↑s A = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nr : R\nv : VectorMeasure α M\n⊢ (r • ↑v) ∅ = 0\n[PROOFSTEP]\nrw [Pi.smul_apply, empty, smul_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nr : R\nv : VectorMeasure α M\nx✝ : Set α\nhi : ¬MeasurableSet x✝\n⊢ (r • ↑v) x✝ = 0\n[PROOFSTEP]\nrw [Pi.smul_apply, v.not_measurable hi, smul_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nr : R\nv : VectorMeasure α M\nx✝ : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (x✝ i)\nhf₂ : Pairwise (Disjoint on x✝)\n⊢ HasSum (fun i => (r • ↑v) (x✝ i)) ((r • ↑v) (⋃ (i : ℕ), x✝ i))\n[PROOFSTEP]\nexact HasSum.const_smul _ (v.m_iUnion hf₁ hf₂)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousAdd M\nv w : VectorMeasure α M\n⊢ (↑v + ↑w) ∅ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousAdd M\nv w : VectorMeasure α M\nx✝ : Set α\nhi : ¬MeasurableSet x✝\n⊢ (↑v + ↑w) x✝ = 0\n[PROOFSTEP]\nrw [Pi.add_apply, v.not_measurable hi, w.not_measurable hi, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : TopologicalAddGroup M\nv : VectorMeasure α M\n⊢ (-↑v) ∅ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : TopologicalAddGroup M\nv : VectorMeasure α M\nx✝ : Set α\nhi : ¬MeasurableSet x✝\n⊢ (-↑v) x✝ = 0\n[PROOFSTEP]\nrw [Pi.neg_apply, neg_eq_zero, v.not_measurable hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : TopologicalAddGroup M\nv w : VectorMeasure α M\n⊢ (↑v - ↑w) ∅ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : TopologicalAddGroup M\nv w : VectorMeasure α M\nx✝ : Set α\nhi : ¬MeasurableSet x✝\n⊢ (↑v - ↑w) x✝ = 0\n[PROOFSTEP]\nrw [Pi.sub_apply, v.not_measurable hi, w.not_measurable hi, sub_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\n⊢ (fun i => if MeasurableSet i then ENNReal.toReal (↑↑μ i) else 0) ∅ = 0\n[PROOFSTEP]\nsimp [μ.empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ HasSum (fun i => (fun i => if MeasurableSet i then ENNReal.toReal (↑↑μ i) else 0) (f i))\n    ((fun i => if MeasurableSet i then ENNReal.toReal (↑↑μ i) else 0) (⋃ (i : ℕ), f i))\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ HasSum (fun i => if MeasurableSet (f i) then ENNReal.toReal (↑↑μ (f i)) else 0)\n    (if MeasurableSet (⋃ (i : ℕ), f i) then ENNReal.toReal (↑↑μ (⋃ (i : ℕ), f i)) else 0)\n[PROOFSTEP]\nrw [μ.m_iUnion hf₁ hf₂, ENNReal.tsum_toReal_eq, if_pos (MeasurableSet.iUnion hf₁), Summable.hasSum_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ (∑' (b : ℕ), if MeasurableSet (f b) then ENNReal.toReal (↑↑μ (f b)) else 0) = ∑' (a : ℕ), ENNReal.toReal (↑↑μ (f a))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ (fun b => if MeasurableSet (f b) then ENNReal.toReal (↑↑μ (f b)) else 0) = fun a => ENNReal.toReal (↑↑μ (f a))\n[PROOFSTEP]\next n\n[GOAL]\ncase e_f.h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nn : ℕ\n⊢ (if MeasurableSet (f n) then ENNReal.toReal (↑↑μ (f n)) else 0) = ENNReal.toReal (↑↑μ (f n))\n[PROOFSTEP]\nrw [if_pos (hf₁ n)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ Summable fun i => if MeasurableSet (f i) then ENNReal.toReal (↑↑μ (f i)) else 0\n[PROOFSTEP]\nrefine' @summable_of_nonneg_of_le _ (ENNReal.toReal ∘ μ ∘ f) _ _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ ∀ (b : ℕ), 0 ≤ if MeasurableSet (f b) then ENNReal.toReal (↑↑μ (f b)) else 0\n[PROOFSTEP]\nintro\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nb✝ : ℕ\n⊢ 0 ≤ if MeasurableSet (f b✝) then ENNReal.toReal (↑↑μ (f b✝)) else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nb✝ : ℕ\nh✝ : MeasurableSet (f b✝)\n⊢ 0 ≤ ENNReal.toReal (↑↑μ (f b✝))\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nb✝ : ℕ\nh✝ : ¬MeasurableSet (f b✝)\n⊢ 0 ≤ 0\n[PROOFSTEP]\nexacts [ENNReal.toReal_nonneg, le_rfl]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ ∀ (b : ℕ), (if MeasurableSet (f b) then ENNReal.toReal (↑↑μ (f b)) else 0) ≤ (ENNReal.toReal ∘ ↑↑μ ∘ f) b\n[PROOFSTEP]\nintro\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nb✝ : ℕ\n⊢ (if MeasurableSet (f b✝) then ENNReal.toReal (↑↑μ (f b✝)) else 0) ≤ (ENNReal.toReal ∘ ↑↑μ ∘ f) b✝\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nb✝ : ℕ\nh✝ : MeasurableSet (f b✝)\n⊢ ENNReal.toReal (↑↑μ (f b✝)) ≤ (ENNReal.toReal ∘ ↑↑μ ∘ f) b✝\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nb✝ : ℕ\nh✝ : ¬MeasurableSet (f b✝)\n⊢ 0 ≤ (ENNReal.toReal ∘ ↑↑μ ∘ f) b✝\n[PROOFSTEP]\nexacts [le_rfl, ENNReal.toReal_nonneg]\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ Summable (ENNReal.toReal ∘ ↑↑μ ∘ f)\n[PROOFSTEP]\nexact summable_measure_toReal hf₁ hf₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ ∀ (a : ℕ), ↑↑μ (f a) ≠ ⊤\n[PROOFSTEP]\nintro a ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\na : ℕ\nha : ↑↑μ (f a) = ⊤\n⊢ False\n[PROOFSTEP]\napply ne_of_lt hμ.measure_univ_lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\na : ℕ\nha : ↑↑μ (f a) = ⊤\n⊢ ↑↑μ univ = ⊤\n[PROOFSTEP]\nrw [eq_top_iff, ← ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nhμ : IsFiniteMeasure μ\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\na : ℕ\nha : ↑↑μ (f a) = ⊤\n⊢ ↑↑μ (f a) ≤ ↑↑μ univ\n[PROOFSTEP]\nexact measure_mono (Set.subset_univ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : IsFiniteMeasure ν\nh : μ = ν\n⊢ toSignedMeasure μ = toSignedMeasure ν\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : IsFiniteMeasure ν\n⊢ toSignedMeasure μ = toSignedMeasure ν ↔ μ = ν\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : IsFiniteMeasure ν\nh : toSignedMeasure μ = toSignedMeasure ν\n⊢ μ = ν\n[PROOFSTEP]\next1 i hi\n[GOAL]\ncase refine'_1.h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : IsFiniteMeasure ν\nh : toSignedMeasure μ = toSignedMeasure ν\ni : Set α\nhi : MeasurableSet i\n⊢ ↑↑μ i = ↑↑ν i\n[PROOFSTEP]\nhave : μ.toSignedMeasure i = ν.toSignedMeasure i := by rw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : IsFiniteMeasure ν\nh : toSignedMeasure μ = toSignedMeasure ν\ni : Set α\nhi : MeasurableSet i\n⊢ ↑(toSignedMeasure μ) i = ↑(toSignedMeasure ν) i\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase refine'_1.h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : IsFiniteMeasure ν\nh : toSignedMeasure μ = toSignedMeasure ν\ni : Set α\nhi : MeasurableSet i\nthis : ↑(toSignedMeasure μ) i = ↑(toSignedMeasure ν) i\n⊢ ↑↑μ i = ↑↑ν i\n[PROOFSTEP]\nrwa [toSignedMeasure_apply_measurable hi, toSignedMeasure_apply_measurable hi, ENNReal.toReal_eq_toReal] at this \n[GOAL]\ncase refine'_1.h.ha\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : IsFiniteMeasure ν\nh : toSignedMeasure μ = toSignedMeasure ν\ni : Set α\nhi : MeasurableSet i\nthis : ENNReal.toReal (↑↑μ i) = ENNReal.toReal (↑↑ν i)\n⊢ ↑↑μ i ≠ ⊤\n[PROOFSTEP]\nexact measure_ne_top _ _\n[GOAL]\ncase refine'_1.h.hb\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : IsFiniteMeasure ν\nh : toSignedMeasure μ = toSignedMeasure ν\ni : Set α\nhi : MeasurableSet i\nthis : ENNReal.toReal (↑↑μ i) = ENNReal.toReal (↑↑ν i)\n⊢ ↑↑ν i ≠ ⊤\n[PROOFSTEP]\nexact measure_ne_top _ _\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : IsFiniteMeasure ν\nh : μ = ν\n⊢ toSignedMeasure μ = toSignedMeasure ν\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\n⊢ toSignedMeasure 0 = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ni : Set α\na✝ : MeasurableSet i\n⊢ ↑(toSignedMeasure 0) i = ↑0 i\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : IsFiniteMeasure ν\n⊢ toSignedMeasure (μ + ν) = toSignedMeasure μ + toSignedMeasure ν\n[PROOFSTEP]\next i hi\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : IsFiniteMeasure ν\ni : Set α\nhi : MeasurableSet i\n⊢ ↑(toSignedMeasure (μ + ν)) i = ↑(toSignedMeasure μ + toSignedMeasure ν) i\n[PROOFSTEP]\nrw [toSignedMeasure_apply_measurable hi, add_apply,\n  ENNReal.toReal_add (ne_of_lt (measure_lt_top _ _)) (ne_of_lt (measure_lt_top _ _)), VectorMeasure.add_apply,\n  toSignedMeasure_apply_measurable hi, toSignedMeasure_apply_measurable hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nr : ℝ≥0\n⊢ toSignedMeasure (r • μ) = r • toSignedMeasure μ\n[PROOFSTEP]\next i hi\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nr : ℝ≥0\ni : Set α\nhi : MeasurableSet i\n⊢ ↑(toSignedMeasure (r • μ)) i = ↑(r • toSignedMeasure μ) i\n[PROOFSTEP]\nrw [toSignedMeasure_apply_measurable hi, VectorMeasure.smul_apply, toSignedMeasure_apply_measurable hi, coe_smul,\n  Pi.smul_apply, ENNReal.toReal_smul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\n⊢ (fun i => if MeasurableSet i then ↑↑μ i else 0) ∅ = 0\n[PROOFSTEP]\nsimp [μ.empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nx✝ : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (x✝ i)\nhf₂ : Pairwise (Disjoint on x✝)\n⊢ HasSum (fun i => (fun i => if MeasurableSet i then ↑↑μ i else 0) (x✝ i))\n    ((fun i => if MeasurableSet i then ↑↑μ i else 0) (⋃ (i : ℕ), x✝ i))\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nx✝ : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (x✝ i)\nhf₂ : Pairwise (Disjoint on x✝)\n⊢ HasSum (fun i => if MeasurableSet (x✝ i) then ↑↑μ (x✝ i) else 0)\n    (if MeasurableSet (⋃ (i : ℕ), x✝ i) then ↑↑μ (⋃ (i : ℕ), x✝ i) else 0)\n[PROOFSTEP]\nrw [Summable.hasSum_iff ENNReal.summable, if_pos (MeasurableSet.iUnion hf₁), MeasureTheory.measure_iUnion hf₂ hf₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\nx✝ : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (x✝ i)\nhf₂ : Pairwise (Disjoint on x✝)\n⊢ (∑' (b : ℕ), if MeasurableSet (x✝ b) then ↑↑μ (x✝ b) else 0) = ∑' (i : ℕ), ↑↑μ (x✝ i)\n[PROOFSTEP]\nexact tsum_congr fun n => if_pos (hf₁ n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\n⊢ toENNRealVectorMeasure 0 = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ni : Set α\na✝ : MeasurableSet i\n⊢ ↑(toENNRealVectorMeasure 0) i = ↑0 i\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\n⊢ toENNRealVectorMeasure (μ + ν) = toENNRealVectorMeasure μ + toENNRealVectorMeasure ν\n[PROOFSTEP]\nrefine' MeasureTheory.VectorMeasure.ext fun i hi => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ni : Set α\nhi : MeasurableSet i\n⊢ ↑(toENNRealVectorMeasure (μ + ν)) i = ↑(toENNRealVectorMeasure μ + toENNRealVectorMeasure ν) i\n[PROOFSTEP]\nrw [toENNRealVectorMeasure_apply_measurable hi, add_apply, VectorMeasure.add_apply,\n  toENNRealVectorMeasure_apply_measurable hi, toENNRealVectorMeasure_apply_measurable hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : IsFiniteMeasure ν\ni : Set α\nhi : MeasurableSet i\n⊢ ↑(toSignedMeasure μ - toSignedMeasure ν) i = ENNReal.toReal (↑↑μ i) - ENNReal.toReal (↑↑ν i)\n[PROOFSTEP]\nrw [VectorMeasure.sub_apply, toSignedMeasure_apply_measurable hi, Measure.toSignedMeasure_apply_measurable hi,\n  sub_eq_add_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ m : MeasurableSpace α\nv : VectorMeasure α ℝ≥0∞\ns : Set α\nhs : MeasurableSet s\n⊢ ↑↑(ennrealToMeasure v) s = ↑v s\n[PROOFSTEP]\nrw [ennrealToMeasure, ofMeasurable_apply _ hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝ : MeasurableSpace α\nx✝ : VectorMeasure α ℝ≥0∞\ns : Set α\nhs : MeasurableSet s\n⊢ ↑(toENNRealVectorMeasure (ennrealToMeasure x✝)) s = ↑x✝ s\n[PROOFSTEP]\nrw [toENNRealVectorMeasure_apply_measurable hs, ennrealToMeasure_apply hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝ : MeasurableSpace α\nx✝ : Measure α\ns : Set α\nhs : MeasurableSet s\n⊢ ↑↑(ennrealToMeasure (toENNRealVectorMeasure x✝)) s = ↑↑x✝ s\n[PROOFSTEP]\nrw [ennrealToMeasure_apply hs, toENNRealVectorMeasure_apply_measurable hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv✝ v : VectorMeasure α M\nf : α → β\nhf : Measurable f\n⊢ (fun s => if MeasurableSet s then ↑v (f ⁻¹' s) else 0) ∅ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv✝ v : VectorMeasure α M\nf : α → β\nhf : Measurable f\n⊢ ∀ ⦃f_1 : ℕ → Set β⦄,\n    (∀ (i : ℕ), MeasurableSet (f_1 i)) →\n      Pairwise (Disjoint on f_1) →\n        HasSum (fun i => (fun s => if MeasurableSet s then ↑v (f ⁻¹' s) else 0) (f_1 i))\n          ((fun s => if MeasurableSet s then ↑v (f ⁻¹' s) else 0) (⋃ (i : ℕ), f_1 i))\n[PROOFSTEP]\nintro g hg₁ hg₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv✝ v : VectorMeasure α M\nf : α → β\nhf : Measurable f\ng : ℕ → Set β\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\n⊢ HasSum (fun i => (fun s => if MeasurableSet s then ↑v (f ⁻¹' s) else 0) (g i))\n    ((fun s => if MeasurableSet s then ↑v (f ⁻¹' s) else 0) (⋃ (i : ℕ), g i))\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv✝ v : VectorMeasure α M\nf : α → β\nhf : Measurable f\ng : ℕ → Set β\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\n⊢ HasSum (fun i => if MeasurableSet (g i) then ↑v (f ⁻¹' g i) else 0)\n    (if MeasurableSet (⋃ (i : ℕ), g i) then ↑v (f ⁻¹' ⋃ (i : ℕ), g i) else 0)\n[PROOFSTEP]\nconvert v.m_iUnion (fun i => hf (hg₁ i)) fun i j hij => (hg₂ hij).preimage _\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv✝ v : VectorMeasure α M\nf : α → β\nhf : Measurable f\ng : ℕ → Set β\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\nx✝ : ℕ\n⊢ (if MeasurableSet (g x✝) then ↑v (f ⁻¹' g x✝) else 0) = ↑v (f ⁻¹' g x✝)\n[PROOFSTEP]\nrw [if_pos (hg₁ _)]\n[GOAL]\ncase h.e'_6\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv✝ v : VectorMeasure α M\nf : α → β\nhf : Measurable f\ng : ℕ → Set β\nhg₁ : ∀ (i : ℕ), MeasurableSet (g i)\nhg₂ : Pairwise (Disjoint on g)\n⊢ (if MeasurableSet (⋃ (i : ℕ), g i) then ↑v (f ⁻¹' ⋃ (i : ℕ), g i) else 0) = ↑v (⋃ (i : ℕ), f ⁻¹' g i)\n[PROOFSTEP]\nrw [Set.preimage_iUnion, if_pos (MeasurableSet.iUnion hg₁)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\nf : α → β\nhf : Measurable f\ns : Set β\nhs : MeasurableSet s\n⊢ ↑(map v f) s = ↑v (f ⁻¹' s)\n[PROOFSTEP]\nrw [map, dif_pos hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\nf : α → β\nhf : Measurable f\ns : Set β\nhs : MeasurableSet s\n⊢ ↑{ measureOf' := fun s => if MeasurableSet s then ↑v (f ⁻¹' s) else 0,\n          empty' := (_ : (if MeasurableSet ∅ then ↑v (f ⁻¹' ∅) else 0) = 0),\n          not_measurable' := (_ : ∀ (i : Set β), ¬MeasurableSet i → (if MeasurableSet i then ↑v (f ⁻¹' i) else 0) = 0),\n          m_iUnion' :=\n            (_ :\n              ∀ ⦃g : ℕ → Set β⦄,\n                (∀ (i : ℕ), MeasurableSet (g i)) →\n                  Pairwise (Disjoint on g) →\n                    HasSum (fun i => (fun s => if MeasurableSet s then ↑v (f ⁻¹' s) else 0) (g i))\n                      ((fun s => if MeasurableSet s then ↑v (f ⁻¹' s) else 0) (⋃ (i : ℕ), g i))) }\n      s =\n    ↑v (f ⁻¹' s)\n[PROOFSTEP]\nexact if_pos hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\n⊢ ↑(map v id) i = ↑v i\n[PROOFSTEP]\nrw [map_apply v measurable_id hi, Set.preimage_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\nf : α → β\n⊢ map 0 f = 0\n[PROOFSTEP]\nby_cases hf : Measurable f\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\nf : α → β\nhf : Measurable f\n⊢ map 0 f = 0\n[PROOFSTEP]\next i hi\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\nf : α → β\nhf : Measurable f\ni : Set β\nhi : MeasurableSet i\n⊢ ↑(map 0 f) i = ↑0 i\n[PROOFSTEP]\nrw [map_apply _ hf hi, zero_apply, zero_apply]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\nf : α → β\nhf : ¬Measurable f\n⊢ map 0 f = 0\n[PROOFSTEP]\nexact dif_neg hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝⁵ : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\nv✝ : VectorMeasure α M\nN : Type u_4\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nf : M →+ N\nhf : Continuous ↑f\n⊢ (fun s => ↑f (↑v s)) ∅ = 0\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝⁵ : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\nv✝ : VectorMeasure α M\nN : Type u_4\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nf : M →+ N\nhf : Continuous ↑f\n⊢ ↑f (↑v ∅) = 0\n[PROOFSTEP]\nrw [empty, AddMonoidHom.map_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝⁵ : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\nv✝ : VectorMeasure α M\nN : Type u_4\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nf : M →+ N\nhf : Continuous ↑f\ni : Set α\nhi : ¬MeasurableSet i\n⊢ (fun s => ↑f (↑v s)) i = 0\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝⁵ : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\nv✝ : VectorMeasure α M\nN : Type u_4\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nf : M →+ N\nhf : Continuous ↑f\ni : Set α\nhi : ¬MeasurableSet i\n⊢ ↑f (↑v i) = 0\n[PROOFSTEP]\nrw [not_measurable v hi, AddMonoidHom.map_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝⁵ : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\nv : VectorMeasure α M\nN : Type u_4\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\n⊢ mapRange v (AddMonoidHom.id M) (_ : Continuous id) = v\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm inst✝⁵ : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\nv : VectorMeasure α M\nN : Type u_4\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\ni✝ : Set α\na✝ : MeasurableSet i✝\n⊢ ↑(mapRange v (AddMonoidHom.id M) (_ : Continuous id)) i✝ = ↑v i✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝⁵ : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\nv : VectorMeasure α M\nN : Type u_4\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nf : M →+ N\nhf : Continuous ↑f\n⊢ mapRange 0 f hf = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm inst✝⁵ : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\nv : VectorMeasure α M\nN : Type u_4\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nf : M →+ N\nhf : Continuous ↑f\ni✝ : Set α\na✝ : MeasurableSet i✝\n⊢ ↑(mapRange 0 f hf) i✝ = ↑0 i✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝⁷ : MeasurableSpace α\ninst✝⁶ : MeasurableSpace β\nM : Type u_3\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\nv✝ : VectorMeasure α M\nN : Type u_4\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\ninst✝¹ : ContinuousAdd M\ninst✝ : ContinuousAdd N\nv w : VectorMeasure α M\nf : M →+ N\nhf : Continuous ↑f\n⊢ mapRange (v + w) f hf = mapRange v f hf + mapRange w f hf\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm inst✝⁷ : MeasurableSpace α\ninst✝⁶ : MeasurableSpace β\nM : Type u_3\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\nv✝ : VectorMeasure α M\nN : Type u_4\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\ninst✝¹ : ContinuousAdd M\ninst✝ : ContinuousAdd N\nv w : VectorMeasure α M\nf : M →+ N\nhf : Continuous ↑f\ni✝ : Set α\na✝ : MeasurableSet i✝\n⊢ ↑(mapRange (v + w) f hf) i✝ = ↑(mapRange v f hf + mapRange w f hf) i✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝¹² : MeasurableSpace α\ninst✝¹¹ : MeasurableSpace β\nM : Type u_3\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : TopologicalSpace M\nv : VectorMeasure α M\nN : Type u_4\ninst✝⁸ : AddCommMonoid N\ninst✝⁷ : TopologicalSpace N\nR : Type u_5\ninst✝⁶ : Semiring R\ninst✝⁵ : Module R M\ninst✝⁴ : Module R N\ninst✝³ : ContinuousAdd M\ninst✝² : ContinuousAdd N\ninst✝¹ : ContinuousConstSMul R M\ninst✝ : ContinuousConstSMul R N\nf : M →ₗ[R] N\nhf : Continuous ↑f\n⊢ ∀ (r : R) (x : VectorMeasure α M),\n    AddHom.toFun\n        { toFun := fun v => mapRange v (LinearMap.toAddMonoidHom f) hf,\n          map_add' :=\n            (_ :\n              ∀ (x x_1 : VectorMeasure α M),\n                mapRange (x + x_1) (LinearMap.toAddMonoidHom f) hf =\n                  mapRange x (LinearMap.toAddMonoidHom f) hf + mapRange x_1 (LinearMap.toAddMonoidHom f) hf) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := fun v => mapRange v (LinearMap.toAddMonoidHom f) hf,\n            map_add' :=\n              (_ :\n                ∀ (x x_1 : VectorMeasure α M),\n                  mapRange (x + x_1) (LinearMap.toAddMonoidHom f) hf =\n                    mapRange x (LinearMap.toAddMonoidHom f) hf + mapRange x_1 (LinearMap.toAddMonoidHom f) hf) }\n          x\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝¹² : MeasurableSpace α\ninst✝¹¹ : MeasurableSpace β\nM : Type u_3\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : TopologicalSpace M\nv : VectorMeasure α M\nN : Type u_4\ninst✝⁸ : AddCommMonoid N\ninst✝⁷ : TopologicalSpace N\nR : Type u_5\ninst✝⁶ : Semiring R\ninst✝⁵ : Module R M\ninst✝⁴ : Module R N\ninst✝³ : ContinuousAdd M\ninst✝² : ContinuousAdd N\ninst✝¹ : ContinuousConstSMul R M\ninst✝ : ContinuousConstSMul R N\nf : M →ₗ[R] N\nhf : Continuous ↑f\nr✝ : R\nx✝ : VectorMeasure α M\n⊢ AddHom.toFun\n      { toFun := fun v => mapRange v (LinearMap.toAddMonoidHom f) hf,\n        map_add' :=\n          (_ :\n            ∀ (x x_1 : VectorMeasure α M),\n              mapRange (x + x_1) (LinearMap.toAddMonoidHom f) hf =\n                mapRange x (LinearMap.toAddMonoidHom f) hf + mapRange x_1 (LinearMap.toAddMonoidHom f) hf) }\n      (r✝ • x✝) =\n    ↑(RingHom.id R) r✝ •\n      AddHom.toFun\n        { toFun := fun v => mapRange v (LinearMap.toAddMonoidHom f) hf,\n          map_add' :=\n            (_ :\n              ∀ (x x_1 : VectorMeasure α M),\n                mapRange (x + x_1) (LinearMap.toAddMonoidHom f) hf =\n                  mapRange x (LinearMap.toAddMonoidHom f) hf + mapRange x_1 (LinearMap.toAddMonoidHom f) hf) }\n        x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm inst✝¹² : MeasurableSpace α\ninst✝¹¹ : MeasurableSpace β\nM : Type u_3\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : TopologicalSpace M\nv : VectorMeasure α M\nN : Type u_4\ninst✝⁸ : AddCommMonoid N\ninst✝⁷ : TopologicalSpace N\nR : Type u_5\ninst✝⁶ : Semiring R\ninst✝⁵ : Module R M\ninst✝⁴ : Module R N\ninst✝³ : ContinuousAdd M\ninst✝² : ContinuousAdd N\ninst✝¹ : ContinuousConstSMul R M\ninst✝ : ContinuousConstSMul R N\nf : M →ₗ[R] N\nhf : Continuous ↑f\nr✝ : R\nx✝ : VectorMeasure α M\ni✝ : Set α\na✝ : MeasurableSet i✝\n⊢ ↑(AddHom.toFun\n          { toFun := fun v => mapRange v (LinearMap.toAddMonoidHom f) hf,\n            map_add' :=\n              (_ :\n                ∀ (x x_1 : VectorMeasure α M),\n                  mapRange (x + x_1) (LinearMap.toAddMonoidHom f) hf =\n                    mapRange x (LinearMap.toAddMonoidHom f) hf + mapRange x_1 (LinearMap.toAddMonoidHom f) hf) }\n          (r✝ • x✝))\n      i✝ =\n    ↑(↑(RingHom.id R) r✝ •\n          AddHom.toFun\n            { toFun := fun v => mapRange v (LinearMap.toAddMonoidHom f) hf,\n              map_add' :=\n                (_ :\n                  ∀ (x x_1 : VectorMeasure α M),\n                    mapRange (x + x_1) (LinearMap.toAddMonoidHom f) hf =\n                      mapRange x (LinearMap.toAddMonoidHom f) hf + mapRange x_1 (LinearMap.toAddMonoidHom f) hf) }\n            x✝)\n      i✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv✝ v : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\n⊢ (fun s => if MeasurableSet s then ↑v (s ∩ i) else 0) ∅ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv✝ v : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\n⊢ ∀ ⦃f : ℕ → Set α⦄,\n    (∀ (i : ℕ), MeasurableSet (f i)) →\n      Pairwise (Disjoint on f) →\n        HasSum (fun i_1 => (fun s => if MeasurableSet s then ↑v (s ∩ i) else 0) (f i_1))\n          ((fun s => if MeasurableSet s then ↑v (s ∩ i) else 0) (⋃ (i : ℕ), f i))\n[PROOFSTEP]\nintro f hf₁ hf₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv✝ v : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ HasSum (fun i_1 => (fun s => if MeasurableSet s then ↑v (s ∩ i) else 0) (f i_1))\n    ((fun s => if MeasurableSet s then ↑v (s ∩ i) else 0) (⋃ (i : ℕ), f i))\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv✝ v : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ HasSum (fun i_1 => if MeasurableSet (f i_1) then ↑v (f i_1 ∩ i) else 0)\n    (if MeasurableSet (⋃ (i : ℕ), f i) then ↑v ((⋃ (i : ℕ), f i) ∩ i) else 0)\n[PROOFSTEP]\nconvert v.m_iUnion (fun n => (hf₁ n).inter hi) (hf₂.mono fun i j => Disjoint.mono inf_le_left inf_le_left)\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv✝ v : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nx✝ : ℕ\n⊢ (if MeasurableSet (f x✝) then ↑v (f x✝ ∩ i) else 0) = ↑v (f x✝ ∩ i)\n[PROOFSTEP]\nrw [if_pos (hf₁ _)]\n[GOAL]\ncase h.e'_6\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv✝ v : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ (if MeasurableSet (⋃ (i : ℕ), f i) then ↑v ((⋃ (i : ℕ), f i) ∩ i) else 0) = ↑v (⋃ (i_1 : ℕ), f i_1 ∩ i)\n[PROOFSTEP]\nrw [Set.iUnion_inter, if_pos (MeasurableSet.iUnion hf₁)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ ↑(restrict v i) j = ↑v (j ∩ i)\n[PROOFSTEP]\nrw [restrict, dif_pos hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ ↑{ measureOf' := fun s => if MeasurableSet s then ↑v (s ∩ i) else 0,\n          empty' := (_ : (if MeasurableSet ∅ then ↑v (∅ ∩ i) else 0) = 0),\n          not_measurable' :=\n            (_ : ∀ (i_1 : Set α), ¬MeasurableSet i_1 → (if MeasurableSet i_1 then ↑v (i_1 ∩ i) else 0) = 0),\n          m_iUnion' :=\n            (_ :\n              ∀ ⦃f : ℕ → Set α⦄,\n                (∀ (i : ℕ), MeasurableSet (f i)) →\n                  Pairwise (Disjoint on f) →\n                    HasSum (fun i_1 => (fun s => if MeasurableSet s then ↑v (s ∩ i) else 0) (f i_1))\n                      ((fun s => if MeasurableSet s then ↑v (s ∩ i) else 0) (⋃ (i : ℕ), f i))) }\n      j =\n    ↑v (j ∩ i)\n[PROOFSTEP]\nexact if_pos hj\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\nhij : j ⊆ i\n⊢ ↑(restrict v i) j = ↑v j\n[PROOFSTEP]\nrw [restrict_apply v hi hj, Set.inter_eq_left_iff_subset.2 hij]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\n⊢ ↑(restrict v ∅) i = ↑0 i\n[PROOFSTEP]\nrw [restrict_apply v MeasurableSet.empty hi, Set.inter_empty, v.empty, zero_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\n⊢ ↑(restrict v univ) i = ↑v i\n[PROOFSTEP]\nrw [restrict_apply v MeasurableSet.univ hi, Set.inter_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\ni : Set α\n⊢ restrict 0 i = 0\n[PROOFSTEP]\nby_cases hi : MeasurableSet i\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\n⊢ restrict 0 i = 0\n[PROOFSTEP]\next j hj\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ ↑(restrict 0 i) j = ↑0 j\n[PROOFSTEP]\nrw [restrict_apply 0 hi hj]\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ ↑0 (j ∩ i) = ↑0 j\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm inst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\nM : Type u_3\ninst✝¹ : AddCommMonoid M\ninst✝ : TopologicalSpace M\nv : VectorMeasure α M\ni : Set α\nhi : ¬MeasurableSet i\n⊢ restrict 0 i = 0\n[PROOFSTEP]\nexact dif_neg hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝⁴ : MeasurableSpace α\ninst✝³ : MeasurableSpace β\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\nv✝ : VectorMeasure α M\ninst✝ : ContinuousAdd M\nv w : VectorMeasure α M\nf : α → β\n⊢ map (v + w) f = map v f + map w f\n[PROOFSTEP]\nby_cases hf : Measurable f\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm inst✝⁴ : MeasurableSpace α\ninst✝³ : MeasurableSpace β\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\nv✝ : VectorMeasure α M\ninst✝ : ContinuousAdd M\nv w : VectorMeasure α M\nf : α → β\nhf : Measurable f\n⊢ map (v + w) f = map v f + map w f\n[PROOFSTEP]\next i hi\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nm inst✝⁴ : MeasurableSpace α\ninst✝³ : MeasurableSpace β\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\nv✝ : VectorMeasure α M\ninst✝ : ContinuousAdd M\nv w : VectorMeasure α M\nf : α → β\nhf : Measurable f\ni : Set β\nhi : MeasurableSet i\n⊢ ↑(map (v + w) f) i = ↑(map v f + map w f) i\n[PROOFSTEP]\nsimp [map_apply _ hf hi]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm inst✝⁴ : MeasurableSpace α\ninst✝³ : MeasurableSpace β\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\nv✝ : VectorMeasure α M\ninst✝ : ContinuousAdd M\nv w : VectorMeasure α M\nf : α → β\nhf : ¬Measurable f\n⊢ map (v + w) f = map v f + map w f\n[PROOFSTEP]\nsimp [map, dif_neg hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm inst✝⁴ : MeasurableSpace α\ninst✝³ : MeasurableSpace β\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\nv✝ : VectorMeasure α M\ninst✝ : ContinuousAdd M\nv w : VectorMeasure α M\ni : Set α\n⊢ restrict (v + w) i = restrict v i + restrict w i\n[PROOFSTEP]\nby_cases hi : MeasurableSet i\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm inst✝⁴ : MeasurableSpace α\ninst✝³ : MeasurableSpace β\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\nv✝ : VectorMeasure α M\ninst✝ : ContinuousAdd M\nv w : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\n⊢ restrict (v + w) i = restrict v i + restrict w i\n[PROOFSTEP]\next j hj\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nm inst✝⁴ : MeasurableSpace α\ninst✝³ : MeasurableSpace β\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\nv✝ : VectorMeasure α M\ninst✝ : ContinuousAdd M\nv w : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ ↑(restrict (v + w) i) j = ↑(restrict v i + restrict w i) j\n[PROOFSTEP]\nsimp [restrict_apply _ hi hj]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm inst✝⁴ : MeasurableSpace α\ninst✝³ : MeasurableSpace β\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : TopologicalSpace M\nv✝ : VectorMeasure α M\ninst✝ : ContinuousAdd M\nv w : VectorMeasure α M\ni : Set α\nhi : ¬MeasurableSet i\n⊢ restrict (v + w) i = restrict v i + restrict w i\n[PROOFSTEP]\nsimp [restrict_not_measurable _ hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ninst✝⁵ : MeasurableSpace β\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nv : VectorMeasure α M\nf : α → β\nc : R\n⊢ map (c • v) f = c • map v f\n[PROOFSTEP]\nby_cases hf : Measurable f\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ninst✝⁵ : MeasurableSpace β\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nv : VectorMeasure α M\nf : α → β\nc : R\nhf : Measurable f\n⊢ map (c • v) f = c • map v f\n[PROOFSTEP]\next i hi\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ninst✝⁵ : MeasurableSpace β\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nv : VectorMeasure α M\nf : α → β\nc : R\nhf : Measurable f\ni : Set β\nhi : MeasurableSet i\n⊢ ↑(map (c • v) f) i = ↑(c • map v f) i\n[PROOFSTEP]\nsimp [map_apply _ hf hi]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ninst✝⁵ : MeasurableSpace β\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nv : VectorMeasure α M\nf : α → β\nc : R\nhf : ¬Measurable f\n⊢ map (c • v) f = c • map v f\n[PROOFSTEP]\nsimp only [map, dif_neg hf]\n  -- `smul_zero` does not work since we do not require `ContinuousAdd`\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ninst✝⁵ : MeasurableSpace β\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nv : VectorMeasure α M\nf : α → β\nc : R\nhf : ¬Measurable f\n⊢ 0 = c • 0\n[PROOFSTEP]\next i\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ninst✝⁵ : MeasurableSpace β\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nv : VectorMeasure α M\nf : α → β\nc : R\nhf : ¬Measurable f\ni : Set β\na✝ : MeasurableSet i\n⊢ ↑0 i = ↑(c • 0) i\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ninst✝⁵ : MeasurableSpace β\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nv : VectorMeasure α M\ni : Set α\nc : R\n⊢ restrict (c • v) i = c • restrict v i\n[PROOFSTEP]\nby_cases hi : MeasurableSet i\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ninst✝⁵ : MeasurableSpace β\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nv : VectorMeasure α M\ni : Set α\nc : R\nhi : MeasurableSet i\n⊢ restrict (c • v) i = c • restrict v i\n[PROOFSTEP]\next j hj\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ninst✝⁵ : MeasurableSpace β\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nv : VectorMeasure α M\ni : Set α\nc : R\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ ↑(restrict (c • v) i) j = ↑(c • restrict v i) j\n[PROOFSTEP]\nsimp [restrict_apply _ hi hj]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ninst✝⁵ : MeasurableSpace β\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nv : VectorMeasure α M\ni : Set α\nc : R\nhi : ¬MeasurableSet i\n⊢ restrict (c • v) i = c • restrict v i\n[PROOFSTEP]\nsimp only [restrict_not_measurable _ hi]\n  -- `smul_zero` does not work since we do not require `ContinuousAdd`\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ninst✝⁵ : MeasurableSpace β\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nv : VectorMeasure α M\ni : Set α\nc : R\nhi : ¬MeasurableSet i\n⊢ 0 = c • 0\n[PROOFSTEP]\next j\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ninst✝⁵ : MeasurableSpace β\nM : Type u_3\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nv : VectorMeasure α M\ni : Set α\nc : R\nhi : ¬MeasurableSet i\nj : Set α\na✝ : MeasurableSet j\n⊢ ↑0 j = ↑(c • 0) j\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nu v w : VectorMeasure α M\n⊢ v ≤ w ↔ ∀ (i : Set α), ↑v i ≤ ↑w i\n[PROOFSTEP]\nrefine' ⟨fun h i => _, fun h i _ => h i⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nu v w : VectorMeasure α M\nh : v ≤ w\ni : Set α\n⊢ ↑v i ≤ ↑w i\n[PROOFSTEP]\nby_cases hi : MeasurableSet i\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nu v w : VectorMeasure α M\nh : v ≤ w\ni : Set α\nhi : MeasurableSet i\n⊢ ↑v i ≤ ↑w i\n[PROOFSTEP]\nexact h i hi\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nu v w : VectorMeasure α M\nh : v ≤ w\ni : Set α\nhi : ¬MeasurableSet i\n⊢ ↑v i ≤ ↑w i\n[PROOFSTEP]\nrw [v.not_measurable hi, w.not_measurable hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nhi₂ : restrict v i ≤ restrict w i\nj : Set α\nhj : j ⊆ i\n⊢ ↑v j ≤ ↑w j\n[PROOFSTEP]\nby_cases hj₁ : MeasurableSet j\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nhi₂ : restrict v i ≤ restrict w i\nj : Set α\nhj : j ⊆ i\nhj₁ : MeasurableSet j\n⊢ ↑v j ≤ ↑w j\n[PROOFSTEP]\nexact (restrict_le_restrict_iff _ _ hi).1 hi₂ hj₁ hj\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nhi₂ : restrict v i ≤ restrict w i\nj : Set α\nhj : j ⊆ i\nhj₁ : ¬MeasurableSet j\n⊢ ↑v j ≤ ↑w j\n[PROOFSTEP]\nrw [v.not_measurable hj₁, w.not_measurable hj₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\ni : Set α\nh : ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑v j ≤ ↑w j\n⊢ restrict v i ≤ restrict w i\n[PROOFSTEP]\nby_cases hi : MeasurableSet i\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\ni : Set α\nh : ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑v j ≤ ↑w j\nhi : MeasurableSet i\n⊢ restrict v i ≤ restrict w i\n[PROOFSTEP]\nexact (restrict_le_restrict_iff _ _ hi).2 h\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\ni : Set α\nh : ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑v j ≤ ↑w j\nhi : ¬MeasurableSet i\n⊢ restrict v i ≤ restrict w i\n[PROOFSTEP]\nrw [restrict_not_measurable v hi, restrict_not_measurable w hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\n⊢ restrict v ∅ ≤ restrict w ∅\n[PROOFSTEP]\nintro j _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\nj : Set α\na✝ : MeasurableSet j\n⊢ ↑(restrict v ∅) j ≤ ↑(restrict w ∅) j\n[PROOFSTEP]\nrw [restrict_empty, restrict_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\n⊢ restrict v univ ≤ restrict w univ ↔ v ≤ w\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\n⊢ restrict v univ ≤ restrict w univ → v ≤ w\n[PROOFSTEP]\nintro h s hs\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\nh : restrict v univ ≤ restrict w univ\ns : Set α\nhs : MeasurableSet s\n⊢ ↑v s ≤ ↑w s\n[PROOFSTEP]\nhave := h s hs\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\nh : restrict v univ ≤ restrict w univ\ns : Set α\nhs : MeasurableSet s\nthis : ↑(restrict v univ) s ≤ ↑(restrict w univ) s\n⊢ ↑v s ≤ ↑w s\n[PROOFSTEP]\nrwa [restrict_apply _ MeasurableSet.univ hs, Set.inter_univ, restrict_apply _ MeasurableSet.univ hs, Set.inter_univ] at\n  this \n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\n⊢ v ≤ w → restrict v univ ≤ restrict w univ\n[PROOFSTEP]\nintro h s hs\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\nh : v ≤ w\ns : Set α\nhs : MeasurableSet s\n⊢ ↑(restrict v univ) s ≤ ↑(restrict w univ) s\n[PROOFSTEP]\nrw [restrict_apply _ MeasurableSet.univ hs, Set.inter_univ, restrict_apply _ MeasurableSet.univ hs, Set.inter_univ]\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid M\ninst✝ : PartialOrder M\nv w : VectorMeasure α M\nh : v ≤ w\ns : Set α\nhs : MeasurableSet s\n⊢ ↑v s ≤ ↑w s\n[PROOFSTEP]\nexact h s hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommGroup M\ninst✝ : TopologicalAddGroup M\nv w : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nh : restrict v i ≤ restrict w i\n⊢ restrict (-w) i ≤ restrict (-v) i\n[PROOFSTEP]\nintro j hj₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommGroup M\ninst✝ : TopologicalAddGroup M\nv w : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nh : restrict v i ≤ restrict w i\nj : Set α\nhj₁ : MeasurableSet j\n⊢ ↑(restrict (-w) i) j ≤ ↑(restrict (-v) i) j\n[PROOFSTEP]\nrw [restrict_apply _ hi hj₁, restrict_apply _ hi hj₁, neg_apply, neg_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommGroup M\ninst✝ : TopologicalAddGroup M\nv w : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nh : restrict v i ≤ restrict w i\nj : Set α\nhj₁ : MeasurableSet j\n⊢ -↑w (j ∩ i) ≤ -↑v (j ∩ i)\n[PROOFSTEP]\nrefine' neg_le_neg _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommGroup M\ninst✝ : TopologicalAddGroup M\nv w : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nh : restrict v i ≤ restrict w i\nj : Set α\nhj₁ : MeasurableSet j\n⊢ ↑v (j ∩ i) ≤ ↑w (j ∩ i)\n[PROOFSTEP]\nrw [← restrict_apply _ hi hj₁, ← restrict_apply _ hi hj₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommGroup M\ninst✝ : TopologicalAddGroup M\nv w : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\nh : restrict v i ≤ restrict w i\nj : Set α\nhj₁ : MeasurableSet j\n⊢ ↑(restrict v i) j ≤ ↑(restrict w i) j\n[PROOFSTEP]\nexact h j hj₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\n⊢ restrict v (⋃ (n : ℕ), f n) ≤ restrict w (⋃ (n : ℕ), f n)\n[PROOFSTEP]\nrefine' restrict_le_restrict_of_subset_le v w fun a ha₁ ha₂ => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\n⊢ ↑v a ≤ ↑w a\n[PROOFSTEP]\nhave ha₃ : ⋃ n, a ∩ disjointed f n = a := by rwa [← Set.inter_iUnion, iUnion_disjointed, Set.inter_eq_left_iff_subset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\n⊢ ⋃ (n : ℕ), a ∩ disjointed f n = a\n[PROOFSTEP]\nrwa [← Set.inter_iUnion, iUnion_disjointed, Set.inter_eq_left_iff_subset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\n⊢ ↑v a ≤ ↑w a\n[PROOFSTEP]\nhave ha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n) :=\n  (disjoint_disjointed _).mono fun i j => Disjoint.mono inf_le_right inf_le_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\n⊢ ↑v a ≤ ↑w a\n[PROOFSTEP]\nrw [← ha₃, v.of_disjoint_iUnion_nat _ ha₄, w.of_disjoint_iUnion_nat _ ha₄]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\n⊢ ∑' (i : ℕ), ↑v (a ∩ disjointed f i) ≤ ∑' (i : ℕ), ↑w (a ∩ disjointed f i)\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\n⊢ ∀ (i : ℕ), MeasurableSet (a ∩ disjointed f i)\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\n⊢ ∀ (i : ℕ), MeasurableSet (a ∩ disjointed f i)\n[PROOFSTEP]\nrefine' tsum_le_tsum (fun n => (restrict_le_restrict_iff v w (hf₁ n)).1 (hf₂ n) _ _) _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\nn : ℕ\n⊢ MeasurableSet (a ∩ disjointed f n)\n[PROOFSTEP]\nexact ha₁.inter (MeasurableSet.disjointed hf₁ n)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\nn : ℕ\n⊢ a ∩ disjointed f n ⊆ f n\n[PROOFSTEP]\nexact Set.Subset.trans (Set.inter_subset_right _ _) (disjointed_subset _ _)\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\n⊢ Summable fun i => ↑v (a ∩ disjointed f i)\n[PROOFSTEP]\nrefine' (v.m_iUnion (fun n => _) _).summable\n[GOAL]\ncase refine'_3.refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\nn : ℕ\n⊢ MeasurableSet (a ∩ disjointed f n)\n[PROOFSTEP]\nexact ha₁.inter (MeasurableSet.disjointed hf₁ n)\n[GOAL]\ncase refine'_3.refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\n⊢ Pairwise (Disjoint on fun i => a ∩ disjointed f i)\n[PROOFSTEP]\nexact (disjoint_disjointed _).mono fun i j => Disjoint.mono inf_le_right inf_le_right\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\n⊢ Summable fun i => ↑w (a ∩ disjointed f i)\n[PROOFSTEP]\nrefine' (w.m_iUnion (fun n => _) _).summable\n[GOAL]\ncase refine'_4.refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\nn : ℕ\n⊢ MeasurableSet (a ∩ disjointed f n)\n[PROOFSTEP]\nexact ha₁.inter (MeasurableSet.disjointed hf₁ n)\n[GOAL]\ncase refine'_4.refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\n⊢ Pairwise (Disjoint on fun i => a ∩ disjointed f i)\n[PROOFSTEP]\nexact (disjoint_disjointed _).mono fun i j => Disjoint.mono inf_le_right inf_le_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\n⊢ ∀ (i : ℕ), MeasurableSet (a ∩ disjointed f i)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\nn : ℕ\n⊢ MeasurableSet (a ∩ disjointed f n)\n[PROOFSTEP]\nexact ha₁.inter (MeasurableSet.disjointed hf₁ n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nf : ℕ → Set α\nhf₁ : ∀ (n : ℕ), MeasurableSet (f n)\nhf₂ : ∀ (n : ℕ), restrict v (f n) ≤ restrict w (f n)\na : Set α\nha₁ : MeasurableSet a\nha₂ : a ⊆ ⋃ (n : ℕ), f n\nha₃ : ⋃ (n : ℕ), a ∩ disjointed f n = a\nha₄ : Pairwise (Disjoint on fun n => a ∩ disjointed f n)\n⊢ ∀ (i : ℕ), MeasurableSet (a ∩ disjointed f i)\n[PROOFSTEP]\nexact fun n => ha₁.inter (MeasurableSet.disjointed hf₁ n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : TopologicalSpace M\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (b : β), MeasurableSet (f b)\nhf₂ : ∀ (b : β), restrict v (f b) ≤ restrict w (f b)\n⊢ restrict v (⋃ (b : β), f b) ≤ restrict w (⋃ (b : β), f b)\n[PROOFSTEP]\ncases nonempty_encodable β\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : TopologicalSpace M\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (b : β), MeasurableSet (f b)\nhf₂ : ∀ (b : β), restrict v (f b) ≤ restrict w (f b)\nval✝ : Encodable β\n⊢ restrict v (⋃ (b : β), f b) ≤ restrict w (⋃ (b : β), f b)\n[PROOFSTEP]\nrw [← Encodable.iUnion_decode₂]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : TopologicalSpace M\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (b : β), MeasurableSet (f b)\nhf₂ : ∀ (b : β), restrict v (f b) ≤ restrict w (f b)\nval✝ : Encodable β\n⊢ restrict v (⋃ (i : ℕ) (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) ≤\n    restrict w (⋃ (i : ℕ) (b : β) (_ : b ∈ Encodable.decode₂ β i), f b)\n[PROOFSTEP]\nrefine' restrict_le_restrict_iUnion v w _ _\n[GOAL]\ncase intro.refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : TopologicalSpace M\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (b : β), MeasurableSet (f b)\nhf₂ : ∀ (b : β), restrict v (f b) ≤ restrict w (f b)\nval✝ : Encodable β\n⊢ ∀ (n : ℕ), MeasurableSet (⋃ (b : β) (_ : b ∈ Encodable.decode₂ β n), f b)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase intro.refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : TopologicalSpace M\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (b : β), MeasurableSet (f b)\nhf₂ : ∀ (b : β), restrict v (f b) ≤ restrict w (f b)\nval✝ : Encodable β\nn : ℕ\n⊢ MeasurableSet (⋃ (b : β) (_ : b ∈ Encodable.decode₂ β n), f b)\n[PROOFSTEP]\nmeasurability\n[GOAL]\ncase intro.refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : TopologicalSpace M\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (b : β), MeasurableSet (f b)\nhf₂ : ∀ (b : β), restrict v (f b) ≤ restrict w (f b)\nval✝ : Encodable β\n⊢ ∀ (n : ℕ),\n    restrict v (⋃ (b : β) (_ : b ∈ Encodable.decode₂ β n), f b) ≤\n      restrict w (⋃ (b : β) (_ : b ∈ Encodable.decode₂ β n), f b)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase intro.refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : TopologicalSpace M\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (b : β), MeasurableSet (f b)\nhf₂ : ∀ (b : β), restrict v (f b) ≤ restrict w (f b)\nval✝ : Encodable β\nn : ℕ\n⊢ restrict v (⋃ (b : β) (_ : b ∈ Encodable.decode₂ β n), f b) ≤\n    restrict w (⋃ (b : β) (_ : b ∈ Encodable.decode₂ β n), f b)\n[PROOFSTEP]\ncases' Encodable.decode₂ β n with b\n[GOAL]\ncase intro.refine'_2.none\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : TopologicalSpace M\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (b : β), MeasurableSet (f b)\nhf₂ : ∀ (b : β), restrict v (f b) ≤ restrict w (f b)\nval✝ : Encodable β\nn : ℕ\n⊢ restrict v (⋃ (b : β) (_ : b ∈ none), f b) ≤ restrict w (⋃ (b : β) (_ : b ∈ none), f b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.refine'_2.some\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝³ : TopologicalSpace M\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\ninst✝ : Countable β\nf : β → Set α\nhf₁ : ∀ (b : β), MeasurableSet (f b)\nhf₂ : ∀ (b : β), restrict v (f b) ≤ restrict w (f b)\nval✝ : Encodable β\nn : ℕ\nb : β\n⊢ restrict v (⋃ (b_1 : β) (_ : b_1 ∈ Option.some b), f b_1) ≤ restrict w (⋃ (b_1 : β) (_ : b_1 ∈ Option.some b), f b_1)\n[PROOFSTEP]\nsimp [hf₂ b]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : restrict v i ≤ restrict w i\nhj₁ : MeasurableSet j\nhj₂ : restrict v j ≤ restrict w j\n⊢ restrict v (i ∪ j) ≤ restrict w (i ∪ j)\n[PROOFSTEP]\nrw [Set.union_eq_iUnion]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : restrict v i ≤ restrict w i\nhj₁ : MeasurableSet j\nhj₂ : restrict v j ≤ restrict w j\n⊢ restrict v (⋃ (b : Bool), bif b then i else j) ≤ restrict w (⋃ (b : Bool), bif b then i else j)\n[PROOFSTEP]\nrefine' restrict_le_restrict_countable_iUnion v w _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : restrict v i ≤ restrict w i\nhj₁ : MeasurableSet j\nhj₂ : restrict v j ≤ restrict w j\n⊢ ∀ (b : Bool), MeasurableSet (bif b then i else j)\n[PROOFSTEP]\nmeasurability\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : restrict v i ≤ restrict w i\nhj₁ : MeasurableSet j\nhj₂ : restrict v j ≤ restrict w j\n⊢ ∀ (b : Bool), restrict v (bif b then i else j) ≤ restrict w (bif b then i else j)\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase refine'_2.false\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : restrict v i ≤ restrict w i\nhj₁ : MeasurableSet j\nhj₂ : restrict v j ≤ restrict w j\n⊢ restrict v (bif false then i else j) ≤ restrict w (bif false then i else j)\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase refine'_2.true\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝² : TopologicalSpace M\ninst✝¹ : OrderedAddCommMonoid M\ninst✝ : OrderClosedTopology M\nv w : VectorMeasure α M\ni j : Set α\nhi₁ : MeasurableSet i\nhi₂ : restrict v i ≤ restrict w i\nhj₁ : MeasurableSet j\nhj₂ : restrict v j ≤ restrict w j\n⊢ restrict v (bif true then i else j) ≤ restrict w (bif true then i else j)\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\nv w : VectorMeasure α M\ni j : Set α\nhi₂ : restrict 0 i ≤ restrict v i\n⊢ 0 ≤ ↑v i\n[PROOFSTEP]\nby_cases hi₁ : MeasurableSet i\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\nv w : VectorMeasure α M\ni j : Set α\nhi₂ : restrict 0 i ≤ restrict v i\nhi₁ : MeasurableSet i\n⊢ 0 ≤ ↑v i\n[PROOFSTEP]\nexact (restrict_le_restrict_iff _ _ hi₁).1 hi₂ hi₁ Set.Subset.rfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\nv w : VectorMeasure α M\ni j : Set α\nhi₂ : restrict 0 i ≤ restrict v i\nhi₁ : ¬MeasurableSet i\n⊢ 0 ≤ ↑v i\n[PROOFSTEP]\nrw [v.not_measurable hi₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\nv w : VectorMeasure α M\ni j : Set α\nhi₂ : restrict v i ≤ restrict 0 i\n⊢ ↑v i ≤ 0\n[PROOFSTEP]\nby_cases hi₁ : MeasurableSet i\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\nv w : VectorMeasure α M\ni j : Set α\nhi₂ : restrict v i ≤ restrict 0 i\nhi₁ : MeasurableSet i\n⊢ ↑v i ≤ 0\n[PROOFSTEP]\nexact (restrict_le_restrict_iff _ _ hi₁).1 hi₂ hi₁ Set.Subset.rfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\nv w : VectorMeasure α M\ni j : Set α\nhi₂ : restrict v i ≤ restrict 0 i\nhi₁ : ¬MeasurableSet i\n⊢ ↑v i ≤ 0\n[PROOFSTEP]\nrw [v.not_measurable hi₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\nv w : VectorMeasure α M\ni j : Set α\nhi : ¬MeasurableSet i\n⊢ restrict 0 i ≤ restrict v i\n[PROOFSTEP]\nrw [restrict_zero, restrict_not_measurable _ hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : TopologicalSpace M\ninst✝ : OrderedAddCommMonoid M\nv w : VectorMeasure α M\ni j : Set α\nhi : ¬MeasurableSet i\n⊢ restrict v i ≤ restrict 0 i\n[PROOFSTEP]\nrw [restrict_zero, restrict_not_measurable _ hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : TopologicalSpace M\ninst✝ : LinearOrderedAddCommMonoid M\nv w : VectorMeasure α M\ni j : Set α\nhi : ¬restrict v i ≤ restrict 0 i\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ 0 < ↑v j\n[PROOFSTEP]\nhave hi₁ : MeasurableSet i := measurable_of_not_restrict_le_zero _ hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : TopologicalSpace M\ninst✝ : LinearOrderedAddCommMonoid M\nv w : VectorMeasure α M\ni j : Set α\nhi : ¬restrict v i ≤ restrict 0 i\nhi₁ : MeasurableSet i\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ 0 < ↑v j\n[PROOFSTEP]\nrw [restrict_le_restrict_iff _ _ hi₁] at hi \n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : TopologicalSpace M\ninst✝ : LinearOrderedAddCommMonoid M\nv w : VectorMeasure α M\ni j : Set α\nhi : ¬∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑v j ≤ ↑0 j\nhi₁ : MeasurableSet i\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ 0 < ↑v j\n[PROOFSTEP]\npush_neg at hi \n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nM : Type u_3\ninst✝¹ : TopologicalSpace M\ninst✝ : LinearOrderedAddCommMonoid M\nv w : VectorMeasure α M\ni j : Set α\nhi₁ : MeasurableSet i\nhi : Exists fun ⦃j⦄ => MeasurableSet j ∧ j ⊆ i ∧ ↑0 j < ↑v j\n⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ 0 < ↑v j\n[PROOFSTEP]\nexact hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nh : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑w s = 0 → ↑v s = 0\n⊢ v ≪ᵥ w\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nh : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑w s = 0 → ↑v s = 0\ns : Set α\nhs : ↑w s = 0\n⊢ ↑v s = 0\n[PROOFSTEP]\nby_cases hmeas : MeasurableSet s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nh : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑w s = 0 → ↑v s = 0\ns : Set α\nhs : ↑w s = 0\nhmeas : MeasurableSet s\n⊢ ↑v s = 0\n[PROOFSTEP]\nexact h hmeas hs\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nh : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑w s = 0 → ↑v s = 0\ns : Set α\nhs : ↑w s = 0\nhmeas : ¬MeasurableSet s\n⊢ ↑v s = 0\n[PROOFSTEP]\nexact not_measurable v hmeas\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M✝\ninst✝⁵ : TopologicalSpace M✝\ninst✝⁴ : AddCommMonoid N\ninst✝³ : TopologicalSpace N\nv✝ : VectorMeasure α M✝\nw✝ : VectorMeasure α N\nM : Type u_6\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : TopologicalAddGroup M\nv : VectorMeasure α M\nw : VectorMeasure α N\nh : v ≪ᵥ w\n⊢ -v ≪ᵥ w\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M✝\ninst✝⁵ : TopologicalSpace M✝\ninst✝⁴ : AddCommMonoid N\ninst✝³ : TopologicalSpace N\nv✝ : VectorMeasure α M✝\nw✝ : VectorMeasure α N\nM : Type u_6\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : TopologicalAddGroup M\nv : VectorMeasure α M\nw : VectorMeasure α N\nh : v ≪ᵥ w\ns : Set α\nhs : ↑w s = 0\n⊢ ↑(-v) s = 0\n[PROOFSTEP]\nrw [neg_apply, h hs, neg_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN✝ : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : AddCommMonoid N✝\ninst✝³ : TopologicalSpace N✝\nv✝ : VectorMeasure α M\nw✝ : VectorMeasure α N✝\nN : Type u_6\ninst✝² : AddCommGroup N\ninst✝¹ : TopologicalSpace N\ninst✝ : TopologicalAddGroup N\nv : VectorMeasure α M\nw : VectorMeasure α N\nh : v ≪ᵥ w\n⊢ v ≪ᵥ -w\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN✝ : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : AddCommMonoid N✝\ninst✝³ : TopologicalSpace N✝\nv✝ : VectorMeasure α M\nw✝ : VectorMeasure α N✝\nN : Type u_6\ninst✝² : AddCommGroup N\ninst✝¹ : TopologicalSpace N\ninst✝ : TopologicalAddGroup N\nv : VectorMeasure α M\nw : VectorMeasure α N\nh : v ≪ᵥ w\ns : Set α\nhs : ↑(-w) s = 0\n⊢ ↑v s = 0\n[PROOFSTEP]\nrw [neg_apply, neg_eq_zero] at hs \n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN✝ : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : AddCommMonoid N✝\ninst✝³ : TopologicalSpace N✝\nv✝ : VectorMeasure α M\nw✝ : VectorMeasure α N✝\nN : Type u_6\ninst✝² : AddCommGroup N\ninst✝¹ : TopologicalSpace N\ninst✝ : TopologicalAddGroup N\nv : VectorMeasure α M\nw : VectorMeasure α N\nh : v ≪ᵥ w\ns : Set α\nhs : ↑w s = 0\n⊢ ↑v s = 0\n[PROOFSTEP]\nexact h hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁶ : AddCommMonoid L\ninst✝⁵ : TopologicalSpace L\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\ninst✝² : AddCommMonoid N\ninst✝¹ : TopologicalSpace N\nv : VectorMeasure α M\nw✝ : VectorMeasure α N\ninst✝ : ContinuousAdd M\nv₁ v₂ : VectorMeasure α M\nw : VectorMeasure α N\nhv₁ : v₁ ≪ᵥ w\nhv₂ : v₂ ≪ᵥ w\n⊢ v₁ + v₂ ≪ᵥ w\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁶ : AddCommMonoid L\ninst✝⁵ : TopologicalSpace L\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\ninst✝² : AddCommMonoid N\ninst✝¹ : TopologicalSpace N\nv : VectorMeasure α M\nw✝ : VectorMeasure α N\ninst✝ : ContinuousAdd M\nv₁ v₂ : VectorMeasure α M\nw : VectorMeasure α N\nhv₁ : v₁ ≪ᵥ w\nhv₂ : v₂ ≪ᵥ w\ns : Set α\nhs : ↑w s = 0\n⊢ ↑(v₁ + v₂) s = 0\n[PROOFSTEP]\nrw [add_apply, hv₁ hs, hv₂ hs, zero_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M✝\ninst✝⁵ : TopologicalSpace M✝\ninst✝⁴ : AddCommMonoid N\ninst✝³ : TopologicalSpace N\nv : VectorMeasure α M✝\nw✝ : VectorMeasure α N\nM : Type u_6\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : TopologicalAddGroup M\nv₁ v₂ : VectorMeasure α M\nw : VectorMeasure α N\nhv₁ : v₁ ≪ᵥ w\nhv₂ : v₂ ≪ᵥ w\n⊢ v₁ - v₂ ≪ᵥ w\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M✝\ninst✝⁵ : TopologicalSpace M✝\ninst✝⁴ : AddCommMonoid N\ninst✝³ : TopologicalSpace N\nv : VectorMeasure α M✝\nw✝ : VectorMeasure α N\nM : Type u_6\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : TopologicalAddGroup M\nv₁ v₂ : VectorMeasure α M\nw : VectorMeasure α N\nhv₁ : v₁ ≪ᵥ w\nhv₂ : v₂ ≪ᵥ w\ns : Set α\nhs : ↑w s = 0\n⊢ ↑(v₁ - v₂) s = 0\n[PROOFSTEP]\nrw [sub_apply, hv₁ hs, hv₂ hs, zero_sub, neg_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : TopologicalSpace N\nv✝ : VectorMeasure α M\nw✝ : VectorMeasure α N\nR : Type u_6\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nr : R\nv : VectorMeasure α M\nw : VectorMeasure α N\nh : v ≪ᵥ w\n⊢ r • v ≪ᵥ w\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : TopologicalSpace N\nv✝ : VectorMeasure α M\nw✝ : VectorMeasure α N\nR : Type u_6\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R M\ninst✝ : ContinuousConstSMul R M\nr : R\nv : VectorMeasure α M\nw : VectorMeasure α N\nh : v ≪ᵥ w\ns : Set α\nhs : ↑w s = 0\n⊢ ↑(r • v) s = 0\n[PROOFSTEP]\nrw [smul_apply, h hs, smul_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁶ : AddCommMonoid L\ninst✝⁵ : TopologicalSpace L\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\ninst✝² : AddCommMonoid N\ninst✝¹ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\ninst✝ : MeasureSpace β\nh : v ≪ᵥ w\nf : α → β\n⊢ VectorMeasure.map v f ≪ᵥ VectorMeasure.map w f\n[PROOFSTEP]\nby_cases hf : Measurable f\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁶ : AddCommMonoid L\ninst✝⁵ : TopologicalSpace L\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\ninst✝² : AddCommMonoid N\ninst✝¹ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\ninst✝ : MeasureSpace β\nh : v ≪ᵥ w\nf : α → β\nhf : Measurable f\n⊢ VectorMeasure.map v f ≪ᵥ VectorMeasure.map w f\n[PROOFSTEP]\nrefine' mk fun s hs hws => _\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁶ : AddCommMonoid L\ninst✝⁵ : TopologicalSpace L\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\ninst✝² : AddCommMonoid N\ninst✝¹ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\ninst✝ : MeasureSpace β\nh : v ≪ᵥ w\nf : α → β\nhf : Measurable f\ns : Set β\nhs : MeasurableSet s\nhws : ↑(VectorMeasure.map w f) s = 0\n⊢ ↑(VectorMeasure.map v f) s = 0\n[PROOFSTEP]\nrw [map_apply _ hf hs] at hws ⊢\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁶ : AddCommMonoid L\ninst✝⁵ : TopologicalSpace L\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\ninst✝² : AddCommMonoid N\ninst✝¹ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\ninst✝ : MeasureSpace β\nh : v ≪ᵥ w\nf : α → β\nhf : Measurable f\ns : Set β\nhs : MeasurableSet s\nhws : ↑w (f ⁻¹' s) = 0\n⊢ ↑v (f ⁻¹' s) = 0\n[PROOFSTEP]\nexact h hws\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁶ : AddCommMonoid L\ninst✝⁵ : TopologicalSpace L\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\ninst✝² : AddCommMonoid N\ninst✝¹ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\ninst✝ : MeasureSpace β\nh : v ≪ᵥ w\nf : α → β\nhf : ¬Measurable f\n⊢ VectorMeasure.map v f ≪ᵥ VectorMeasure.map w f\n[PROOFSTEP]\nintro s _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁶ : AddCommMonoid L\ninst✝⁵ : TopologicalSpace L\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\ninst✝² : AddCommMonoid N\ninst✝¹ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\ninst✝ : MeasureSpace β\nh : v ≪ᵥ w\nf : α → β\nhf : ¬Measurable f\ns : Set β\na✝ : ↑(VectorMeasure.map w f) s = 0\n⊢ ↑(VectorMeasure.map v f) s = 0\n[PROOFSTEP]\nrw [map_not_measurable v hf, zero_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nμ : VectorMeasure α ℝ≥0∞\n⊢ (∀ ⦃s : Set α⦄, ↑↑(VectorMeasure.ennrealToMeasure μ) s = 0 → ↑v s = 0) ↔ v ≪ᵥ μ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nμ : VectorMeasure α ℝ≥0∞\n⊢ (∀ ⦃s : Set α⦄, ↑↑(VectorMeasure.ennrealToMeasure μ) s = 0 → ↑v s = 0) → v ≪ᵥ μ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nμ : VectorMeasure α ℝ≥0∞\n⊢ v ≪ᵥ μ → ∀ ⦃s : Set α⦄, ↑↑(VectorMeasure.ennrealToMeasure μ) s = 0 → ↑v s = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nμ : VectorMeasure α ℝ≥0∞\nh : ∀ ⦃s : Set α⦄, ↑↑(VectorMeasure.ennrealToMeasure μ) s = 0 → ↑v s = 0\n⊢ v ≪ᵥ μ\n[PROOFSTEP]\nrefine' mk fun s hmeas hs => h _\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nμ : VectorMeasure α ℝ≥0∞\nh : ∀ ⦃s : Set α⦄, ↑↑(VectorMeasure.ennrealToMeasure μ) s = 0 → ↑v s = 0\ns : Set α\nhmeas : MeasurableSet s\nhs : ↑μ s = 0\n⊢ ↑↑(VectorMeasure.ennrealToMeasure μ) s = 0\n[PROOFSTEP]\nrw [← hs, ennrealToMeasure_apply hmeas]\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nμ : VectorMeasure α ℝ≥0∞\nh : v ≪ᵥ μ\n⊢ ∀ ⦃s : Set α⦄, ↑↑(VectorMeasure.ennrealToMeasure μ) s = 0 → ↑v s = 0\n[PROOFSTEP]\nintro s hs\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nμ : VectorMeasure α ℝ≥0∞\nh : v ≪ᵥ μ\ns : Set α\nhs : ↑↑(VectorMeasure.ennrealToMeasure μ) s = 0\n⊢ ↑v s = 0\n[PROOFSTEP]\nby_cases hmeas : MeasurableSet s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nμ : VectorMeasure α ℝ≥0∞\nh : v ≪ᵥ μ\ns : Set α\nhs : ↑↑(VectorMeasure.ennrealToMeasure μ) s = 0\nhmeas : MeasurableSet s\n⊢ ↑v s = 0\n[PROOFSTEP]\nrw [ennrealToMeasure_apply hmeas] at hs \n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nμ : VectorMeasure α ℝ≥0∞\nh : v ≪ᵥ μ\ns : Set α\nhs : ↑μ s = 0\nhmeas : MeasurableSet s\n⊢ ↑v s = 0\n[PROOFSTEP]\nexact h hs\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv : VectorMeasure α M\nw : VectorMeasure α N\nμ : VectorMeasure α ℝ≥0∞\nh : v ≪ᵥ μ\ns : Set α\nhs : ↑↑(VectorMeasure.ennrealToMeasure μ) s = 0\nhmeas : ¬MeasurableSet s\n⊢ ↑v s = 0\n[PROOFSTEP]\nexact not_measurable v hmeas\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ns : Set α\nhs : MeasurableSet s\nh₁ : ∀ (t : Set α), t ⊆ s → MeasurableSet t → ↑v t = 0\nh₂ : ∀ (t : Set α), t ⊆ sᶜ → MeasurableSet t → ↑w t = 0\n⊢ v ⟂ᵥ w\n[PROOFSTEP]\nrefine' ⟨s, hs, fun t hst => _, fun t hst => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ns : Set α\nhs : MeasurableSet s\nh₁ : ∀ (t : Set α), t ⊆ s → MeasurableSet t → ↑v t = 0\nh₂ : ∀ (t : Set α), t ⊆ sᶜ → MeasurableSet t → ↑w t = 0\nt : Set α\nhst : t ⊆ s\n⊢ ↑v t = 0\n[PROOFSTEP]\nby_cases ht : MeasurableSet t\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ns : Set α\nhs : MeasurableSet s\nh₁ : ∀ (t : Set α), t ⊆ s → MeasurableSet t → ↑v t = 0\nh₂ : ∀ (t : Set α), t ⊆ sᶜ → MeasurableSet t → ↑w t = 0\nt : Set α\nhst : t ⊆ sᶜ\n⊢ ↑w t = 0\n[PROOFSTEP]\nby_cases ht : MeasurableSet t\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ns : Set α\nhs : MeasurableSet s\nh₁ : ∀ (t : Set α), t ⊆ s → MeasurableSet t → ↑v t = 0\nh₂ : ∀ (t : Set α), t ⊆ sᶜ → MeasurableSet t → ↑w t = 0\nt : Set α\nhst : t ⊆ s\nht : MeasurableSet t\n⊢ ↑v t = 0\n[PROOFSTEP]\nexact h₁ t hst ht\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ns : Set α\nhs : MeasurableSet s\nh₁ : ∀ (t : Set α), t ⊆ s → MeasurableSet t → ↑v t = 0\nh₂ : ∀ (t : Set α), t ⊆ sᶜ → MeasurableSet t → ↑w t = 0\nt : Set α\nhst : t ⊆ s\nht : ¬MeasurableSet t\n⊢ ↑v t = 0\n[PROOFSTEP]\nexact not_measurable v ht\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ns : Set α\nhs : MeasurableSet s\nh₁ : ∀ (t : Set α), t ⊆ s → MeasurableSet t → ↑v t = 0\nh₂ : ∀ (t : Set α), t ⊆ sᶜ → MeasurableSet t → ↑w t = 0\nt : Set α\nhst : t ⊆ sᶜ\nht : MeasurableSet t\n⊢ ↑w t = 0\n[PROOFSTEP]\nexact h₂ t hst ht\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nv v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ns : Set α\nhs : MeasurableSet s\nh₁ : ∀ (t : Set α), t ⊆ s → MeasurableSet t → ↑v t = 0\nh₂ : ∀ (t : Set α), t ⊆ sᶜ → MeasurableSet t → ↑w t = 0\nt : Set α\nhst : t ⊆ sᶜ\nht : ¬MeasurableSet t\n⊢ ↑w t = 0\n[PROOFSTEP]\nexact not_measurable w ht\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nh₁ : v₁ ⟂ᵥ w\nh₂ : v₂ ⟂ᵥ w\n⊢ v₁ + v₂ ⟂ᵥ w\n[PROOFSTEP]\nobtain ⟨u, hmu, hu₁, hu₂⟩ := h₁\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nh₂ : v₂ ⟂ᵥ w\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\n⊢ v₁ + v₂ ⟂ᵥ w\n[PROOFSTEP]\nobtain ⟨v, hmv, hv₁, hv₂⟩ := h₂\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\n⊢ v₁ + v₂ ⟂ᵥ w\n[PROOFSTEP]\nrefine' mk (u ∩ v) (hmu.inter hmv) (fun t ht _ => _) fun t ht hmt => _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ u ∩ v\nx✝ : MeasurableSet t\n⊢ ↑(v₁ + v₂) t = 0\n[PROOFSTEP]\nrw [add_apply, hu₁ _ (Set.subset_inter_iff.1 ht).1, hv₁ _ (Set.subset_inter_iff.1 ht).2, zero_add]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ (u ∩ v)ᶜ\nhmt : MeasurableSet t\n⊢ ↑w t = 0\n[PROOFSTEP]\nrw [Set.compl_inter] at ht \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\n⊢ ↑w t = 0\n[PROOFSTEP]\nrw [(_ : t = uᶜ ∩ t ∪ vᶜ \\ uᶜ ∩ t), of_union _ (hmu.compl.inter hmt) ((hmv.compl.diff hmu.compl).inter hmt), hu₂, hv₂,\n  add_zero]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.x\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\n⊢ vᶜ \\ uᶜ ∩ t ⊆ vᶜ\n[PROOFSTEP]\nexact Set.Subset.trans (Set.inter_subset_left _ _) (Set.diff_subset _ _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.x\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\n⊢ uᶜ ∩ t ⊆ uᶜ\n[PROOFSTEP]\nexact Set.inter_subset_left _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\n⊢ Disjoint (uᶜ ∩ t) (vᶜ \\ uᶜ ∩ t)\n[PROOFSTEP]\nexact disjoint_sdiff_self_right.mono (Set.inter_subset_left _ _) (Set.inter_subset_left _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\n⊢ t = uᶜ ∩ t ∪ vᶜ \\ uᶜ ∩ t\n[PROOFSTEP]\napply Set.Subset.antisymm\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\n⊢ t ⊆ uᶜ ∩ t ∪ vᶜ \\ uᶜ ∩ t\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\n⊢ uᶜ ∩ t ∪ vᶜ \\ uᶜ ∩ t ⊆ t\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\nx : α\nhx : x ∈ t\n⊢ x ∈ uᶜ ∩ t ∪ vᶜ \\ uᶜ ∩ t\n[PROOFSTEP]\nby_cases hxu' : x ∈ uᶜ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\nx : α\nhx : x ∈ t\nhxu' : x ∈ uᶜ\n⊢ x ∈ uᶜ ∩ t ∪ vᶜ \\ uᶜ ∩ t\n[PROOFSTEP]\nexact Or.inl ⟨hxu', hx⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\nx : α\nhx : x ∈ t\nhxu' : ¬x ∈ uᶜ\n⊢ x ∈ uᶜ ∩ t ∪ vᶜ \\ uᶜ ∩ t\n[PROOFSTEP]\nrcases ht hx with (hxu | hxv)\n[GOAL]\ncase neg.inl\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\nx : α\nhx : x ∈ t\nhxu' : ¬x ∈ uᶜ\nhxu : x ∈ uᶜ\n⊢ x ∈ uᶜ ∩ t ∪ vᶜ \\ uᶜ ∩ t\ncase neg.inr\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\nx : α\nhx : x ∈ t\nhxu' : ¬x ∈ uᶜ\nhxv : x ∈ vᶜ\n⊢ x ∈ uᶜ ∩ t ∪ vᶜ \\ uᶜ ∩ t\n[PROOFSTEP]\nexacts [False.elim (hxu' hxu), Or.inr ⟨⟨hxv, hxu'⟩, hx⟩]\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\nx : α\nhx : x ∈ uᶜ ∩ t ∪ vᶜ \\ uᶜ ∩ t\n⊢ x ∈ t\n[PROOFSTEP]\ncases' hx with hx hx\n[GOAL]\ncase h₂.inl\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\nx : α\nhx : x ∈ uᶜ ∩ t\n⊢ x ∈ t\n[PROOFSTEP]\nexact hx.2\n[GOAL]\ncase h₂.inr\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁷ : AddCommMonoid L\ninst✝⁶ : TopologicalSpace L\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid N\ninst✝² : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\ninst✝¹ : T2Space N\ninst✝ : ContinuousAdd M\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v₁ t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\nv : Set α\nhmv : MeasurableSet v\nhv₁ : ∀ (t : Set α), t ⊆ v → ↑v₂ t = 0\nhv₂ : ∀ (t : Set α), t ⊆ vᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ uᶜ ∪ vᶜ\nhmt : MeasurableSet t\nx : α\nhx : x ∈ vᶜ \\ uᶜ ∩ t\n⊢ x ∈ t\n[PROOFSTEP]\nexact hx.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : TopologicalSpace N\nv v₁ v₂ : VectorMeasure α M\nw w₁ w₂ : VectorMeasure α N\nR : Type u_6\ninst✝² : Semiring R\ninst✝¹ : DistribMulAction R N\ninst✝ : ContinuousConstSMul R N\nr : R\nh : v ⟂ᵥ w\ns : Set α\nhmeas : MeasurableSet s\nhs₁ : ∀ (t : Set α), t ⊆ s → ↑v t = 0\nhs₂ : ∀ (t : Set α), t ⊆ sᶜ → ↑w t = 0\nt : Set α\nht : t ⊆ sᶜ\n⊢ ↑(r • w) t = 0\n[PROOFSTEP]\nsimp only [coe_smul, Pi.smul_apply, hs₂ t ht, smul_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M✝\ninst✝⁵ : TopologicalSpace M✝\ninst✝⁴ : AddCommMonoid N\ninst✝³ : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M✝\nw✝ w₁ w₂ : VectorMeasure α N\nM : Type u_6\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : TopologicalAddGroup M\nv : VectorMeasure α M\nw : VectorMeasure α N\nh : v ⟂ᵥ w\n⊢ -v ⟂ᵥ w\n[PROOFSTEP]\nobtain ⟨u, hmu, hu₁, hu₂⟩ := h\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M✝\ninst✝⁵ : TopologicalSpace M✝\ninst✝⁴ : AddCommMonoid N\ninst✝³ : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M✝\nw✝ w₁ w₂ : VectorMeasure α N\nM : Type u_6\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : TopologicalAddGroup M\nv : VectorMeasure α M\nw : VectorMeasure α N\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\n⊢ -v ⟂ᵥ w\n[PROOFSTEP]\nrefine' ⟨u, hmu, fun s hs => _, hu₂⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M✝\ninst✝⁵ : TopologicalSpace M✝\ninst✝⁴ : AddCommMonoid N\ninst✝³ : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M✝\nw✝ w₁ w₂ : VectorMeasure α N\nM : Type u_6\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : TopologicalAddGroup M\nv : VectorMeasure α M\nw : VectorMeasure α N\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\ns : Set α\nhs : s ⊆ u\n⊢ ↑(-v) s = 0\n[PROOFSTEP]\nrw [neg_apply v s, neg_eq_zero]\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM✝ : Type u_4\nN : Type u_5\ninst✝⁸ : AddCommMonoid L\ninst✝⁷ : TopologicalSpace L\ninst✝⁶ : AddCommMonoid M✝\ninst✝⁵ : TopologicalSpace M✝\ninst✝⁴ : AddCommMonoid N\ninst✝³ : TopologicalSpace N\nv✝ v₁ v₂ : VectorMeasure α M✝\nw✝ w₁ w₂ : VectorMeasure α N\nM : Type u_6\ninst✝² : AddCommGroup M\ninst✝¹ : TopologicalSpace M\ninst✝ : TopologicalAddGroup M\nv : VectorMeasure α M\nw : VectorMeasure α N\nu : Set α\nhmu : MeasurableSet u\nhu₁ : ∀ (t : Set α), t ⊆ u → ↑v t = 0\nhu₂ : ∀ (t : Set α), t ⊆ uᶜ → ↑w t = 0\ns : Set α\nhs : s ⊆ u\n⊢ ↑v s = 0\n[PROOFSTEP]\nexact hu₁ s hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nm n : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\n⊢ (fun i => if MeasurableSet i then ↑v i else 0) ∅ = 0\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nm n : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\n⊢ (if MeasurableSet ∅ then ↑v ∅ else 0) = 0\n[PROOFSTEP]\nrw [if_pos (@MeasurableSet.empty _ m), v.empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nm n : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : ¬MeasurableSet i\n⊢ (fun i => if MeasurableSet i then ↑v i else 0) i = 0\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nm n : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : ¬MeasurableSet i\n⊢ (if MeasurableSet i then ↑v i else 0) = 0\n[PROOFSTEP]\nrw [if_neg hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nm n : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ HasSum (fun i => (fun i => if MeasurableSet i then ↑v i else 0) (f i))\n    ((fun i => if MeasurableSet i then ↑v i else 0) (⋃ (i : ℕ), f i))\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nm n : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ HasSum (fun i => if MeasurableSet (f i) then ↑v (f i) else 0)\n    (if MeasurableSet (⋃ (i : ℕ), f i) then ↑v (⋃ (i : ℕ), f i) else 0)\n[PROOFSTEP]\nhave hf₁' : ∀ k, MeasurableSet[n] (f k) := fun k => hle _ (hf₁ k)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nm n : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nhf₁' : ∀ (k : ℕ), MeasurableSet (f k)\n⊢ HasSum (fun i => if MeasurableSet (f i) then ↑v (f i) else 0)\n    (if MeasurableSet (⋃ (i : ℕ), f i) then ↑v (⋃ (i : ℕ), f i) else 0)\n[PROOFSTEP]\nconvert v.m_iUnion hf₁' hf₂ using 1\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nm n : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nhf₁' : ∀ (k : ℕ), MeasurableSet (f k)\n⊢ (fun i => if MeasurableSet (f i) then ↑v (f i) else 0) = fun i => ↑v (f i)\n[PROOFSTEP]\next n\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nm n✝ : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n✝\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nhf₁' : ∀ (k : ℕ), MeasurableSet (f k)\nn : ℕ\n⊢ (if MeasurableSet (f n) then ↑v (f n) else 0) = ↑v (f n)\n[PROOFSTEP]\nrw [if_pos (hf₁ n)]\n[GOAL]\ncase h.e'_6\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nm n : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nhf₁' : ∀ (k : ℕ), MeasurableSet (f k)\n⊢ (if MeasurableSet (⋃ (i : ℕ), f i) then ↑v (⋃ (i : ℕ), f i) else 0) = ↑v (⋃ (i : ℕ), f i)\n[PROOFSTEP]\nrw [if_pos (@MeasurableSet.iUnion _ _ m _ _ hf₁)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\n⊢ trim v (_ : n ≤ n) = v\n[PROOFSTEP]\next i hi\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\ni : Set α\nhi : MeasurableSet i\n⊢ ↑(trim v (_ : n ≤ n)) i = ↑v i\n[PROOFSTEP]\nexact if_pos hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\n⊢ trim 0 hle = 0\n[PROOFSTEP]\next i hi\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\n⊢ ↑(trim 0 hle) i = ↑0 i\n[PROOFSTEP]\nexact if_pos hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\n⊢ restrict (trim v hle) i = trim (restrict v i) hle\n[PROOFSTEP]\next j hj\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ ↑(restrict (trim v hle) i) j = ↑(trim (restrict v i) hle) j\n[PROOFSTEP]\nrw [@restrict_apply _ m, trim_measurableSet_eq hle hj, restrict_apply, trim_measurableSet_eq]\n[GOAL]\ncase h.hi\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ MeasurableSet (j ∩ i)\ncase h.hi\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ MeasurableSet i\ncase h.hj\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ MeasurableSet j\ncase h.hi\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ MeasurableSet i\ncase h.hj\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ MeasurableSet j\n[PROOFSTEP]\nall_goals measurability\n[GOAL]\ncase h.hi\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ MeasurableSet (j ∩ i)\n[PROOFSTEP]\nmeasurability\n[GOAL]\ncase h.hi\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ MeasurableSet i\n[PROOFSTEP]\nmeasurability\n[GOAL]\ncase h.hj\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ MeasurableSet j\n[PROOFSTEP]\nmeasurability\n[GOAL]\ncase h.hi\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ MeasurableSet i\n[PROOFSTEP]\nmeasurability\n[GOAL]\ncase h.hj\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nL : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : AddCommMonoid L\ninst✝⁴ : TopologicalSpace L\ninst✝³ : AddCommMonoid M\ninst✝² : TopologicalSpace M\ninst✝¹ : AddCommMonoid N\ninst✝ : TopologicalSpace N\nn : MeasurableSpace α\nv : VectorMeasure α M\nhle : m ≤ n\ni : Set α\nhi : MeasurableSet i\nj : Set α\nhj : MeasurableSet j\n⊢ MeasurableSet j\n[PROOFSTEP]\nmeasurability\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nj : Set α\nhj : MeasurableSet j\n⊢ 0 ≤ ↑(VectorMeasure.restrict 0 i) j\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\n⊢ Measure α\n[PROOFSTEP]\nrefine' Measure.ofMeasurable (s.toMeasureOfZeroLE' i hi₂) _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\n⊢ toMeasureOfZeroLE' s i hi₂ ∅ (_ : MeasurableSet ∅) = 0\n[PROOFSTEP]\nsimp_rw [toMeasureOfZeroLE', s.restrict_apply hi₁ MeasurableSet.empty, Set.empty_inter i, s.empty]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\n⊢ ↑{ val := 0, property := (_ : (fun r => 0 ≤ r) 0) } = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\n⊢ ∀ ⦃f : ℕ → Set α⦄ (h : ∀ (i : ℕ), MeasurableSet (f i)),\n    Pairwise (Disjoint on f) →\n      toMeasureOfZeroLE' s i hi₂ (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) =\n        ∑' (i_1 : ℕ), toMeasureOfZeroLE' s i hi₂ (f i_1) (_ : MeasurableSet (f i_1))\n[PROOFSTEP]\nintro f hf₁ hf₂\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\n⊢ toMeasureOfZeroLE' s i hi₂ (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) =\n    ∑' (i_1 : ℕ), toMeasureOfZeroLE' s i hi₂ (f i_1) (_ : MeasurableSet (f i_1))\n[PROOFSTEP]\nhave h₁ : ∀ n, MeasurableSet (i ∩ f n) := fun n => hi₁.inter (hf₁ n)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nh₁ : ∀ (n : ℕ), MeasurableSet (i ∩ f n)\n⊢ toMeasureOfZeroLE' s i hi₂ (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) =\n    ∑' (i_1 : ℕ), toMeasureOfZeroLE' s i hi₂ (f i_1) (_ : MeasurableSet (f i_1))\n[PROOFSTEP]\nhave h₂ : Pairwise (Disjoint on fun n : ℕ => i ∩ f n) :=\n  by\n  intro n m hnm\n  exact ((hf₂ hnm).inf_left' i).inf_right' i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nh₁ : ∀ (n : ℕ), MeasurableSet (i ∩ f n)\n⊢ Pairwise (Disjoint on fun n => i ∩ f n)\n[PROOFSTEP]\nintro n m hnm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nh₁ : ∀ (n : ℕ), MeasurableSet (i ∩ f n)\nn m : ℕ\nhnm : n ≠ m\n⊢ (Disjoint on fun n => i ∩ f n) n m\n[PROOFSTEP]\nexact ((hf₂ hnm).inf_left' i).inf_right' i\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nh₁ : ∀ (n : ℕ), MeasurableSet (i ∩ f n)\nh₂ : Pairwise (Disjoint on fun n => i ∩ f n)\n⊢ toMeasureOfZeroLE' s i hi₂ (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) =\n    ∑' (i_1 : ℕ), toMeasureOfZeroLE' s i hi₂ (f i_1) (_ : MeasurableSet (f i_1))\n[PROOFSTEP]\nsimp only [toMeasureOfZeroLE', s.restrict_apply hi₁ (MeasurableSet.iUnion hf₁), Set.inter_comm, Set.inter_iUnion,\n  s.of_disjoint_iUnion_nat h₁ h₂, ENNReal.some_eq_coe, id.def]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nh₁ : ∀ (n : ℕ), MeasurableSet (i ∩ f n)\nh₂ : Pairwise (Disjoint on fun n => i ∩ f n)\n⊢ ↑{ val := ∑' (i_1 : ℕ), ↑s (i ∩ f i_1), property := (_ : (fun r => 0 ≤ r) (∑' (i_1 : ℕ), ↑s (i ∩ f i_1))) } =\n    ∑' (i_1 : ℕ),\n      ↑{ val := ↑(VectorMeasure.restrict s i) (f i_1), property := (_ : 0 ≤ ↑(VectorMeasure.restrict s i) (f i_1)) }\n[PROOFSTEP]\nhave h : ∀ n, 0 ≤ s (i ∩ f n) := fun n =>\n  s.nonneg_of_zero_le_restrict (s.zero_le_restrict_subset hi₁ (Set.inter_subset_left _ _) hi₂)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nh₁ : ∀ (n : ℕ), MeasurableSet (i ∩ f n)\nh₂ : Pairwise (Disjoint on fun n => i ∩ f n)\nh : ∀ (n : ℕ), 0 ≤ ↑s (i ∩ f n)\n⊢ ↑{ val := ∑' (i_1 : ℕ), ↑s (i ∩ f i_1), property := (_ : (fun r => 0 ≤ r) (∑' (i_1 : ℕ), ↑s (i ∩ f i_1))) } =\n    ∑' (i_1 : ℕ),\n      ↑{ val := ↑(VectorMeasure.restrict s i) (f i_1), property := (_ : 0 ≤ ↑(VectorMeasure.restrict s i) (f i_1)) }\n[PROOFSTEP]\nrw [NNReal.coe_tsum_of_nonneg h, ENNReal.coe_tsum]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nh₁ : ∀ (n : ℕ), MeasurableSet (i ∩ f n)\nh₂ : Pairwise (Disjoint on fun n => i ∩ f n)\nh : ∀ (n : ℕ), 0 ≤ ↑s (i ∩ f n)\n⊢ ∑' (a : ℕ), ↑{ val := ↑s (i ∩ f a), property := (_ : 0 ≤ ↑s (i ∩ f a)) } =\n    ∑' (i_1 : ℕ),\n      ↑{ val := ↑(VectorMeasure.restrict s i) (f i_1), property := (_ : 0 ≤ ↑(VectorMeasure.restrict s i) (f i_1)) }\n[PROOFSTEP]\nrefine' tsum_congr fun n => _\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nh₁ : ∀ (n : ℕ), MeasurableSet (i ∩ f n)\nh₂ : Pairwise (Disjoint on fun n => i ∩ f n)\nh : ∀ (n : ℕ), 0 ≤ ↑s (i ∩ f n)\nn : ℕ\n⊢ ↑{ val := ↑s (i ∩ f n), property := (_ : 0 ≤ ↑s (i ∩ f n)) } =\n    ↑{ val := ↑(VectorMeasure.restrict s i) (f n), property := (_ : 0 ≤ ↑(VectorMeasure.restrict s i) (f n)) }\n[PROOFSTEP]\nsimp_rw [s.restrict_apply hi₁ (hf₁ n), Set.inter_comm]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni : Set α\nhi₁ : MeasurableSet i\nhi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nf : ℕ → Set α\nhf₁ : ∀ (i : ℕ), MeasurableSet (f i)\nhf₂ : Pairwise (Disjoint on f)\nh₁ : ∀ (n : ℕ), MeasurableSet (i ∩ f n)\nh₂ : Pairwise (Disjoint on fun n => i ∩ f n)\nh : ∀ (n : ℕ), 0 ≤ ↑s (i ∩ f n)\n⊢ Summable fun n => { val := ↑s (i ∩ f n), property := (_ : 0 ≤ ↑s (i ∩ f n)) }\n[PROOFSTEP]\nexact (NNReal.summable_mk h).2 (s.m_iUnion h₁ h₂).summable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni j : Set α\nhi : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nhi₁ : MeasurableSet i\nhj₁ : MeasurableSet j\n⊢ ↑↑(toMeasureOfZeroLE s i hi₁ hi) j = ↑{ val := ↑s (i ∩ j), property := (_ : 0 ≤ ↑s (i ∩ j)) }\n[PROOFSTEP]\nsimp_rw [toMeasureOfZeroLE, Measure.ofMeasurable_apply _ hj₁, toMeasureOfZeroLE', s.restrict_apply hi₁ hj₁,\n  Set.inter_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni j : Set α\nhi : VectorMeasure.restrict s i ≤ VectorMeasure.restrict 0 i\nhi₁ : MeasurableSet i\nhj₁ : MeasurableSet j\n⊢ ↑↑(toMeasureOfLEZero s i hi₁ hi) j = ↑{ val := -↑s (i ∩ j), property := (_ : 0 ≤ -↑s (i ∩ j)) }\n[PROOFSTEP]\nerw [toMeasureOfZeroLE_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni j : Set α\nhi : VectorMeasure.restrict s i ≤ VectorMeasure.restrict 0 i\nhi₁ : MeasurableSet i\nhj₁ : MeasurableSet j\n⊢ ↑{ val := ↑(-s) (i ∩ j), property := (_ : 0 ≤ ↑(-s) (i ∩ j)) } =\n    ↑{ val := -↑s (i ∩ j), property := (_ : 0 ≤ -↑s (i ∩ j)) }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hj₁\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni j : Set α\nhi : VectorMeasure.restrict s i ≤ VectorMeasure.restrict 0 i\nhi₁ : MeasurableSet i\nhj₁ : MeasurableSet j\n⊢ MeasurableSet j\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni j : Set α\nhi : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nhi₁ : MeasurableSet i\n⊢ ↑↑(toMeasureOfZeroLE s i hi₁ hi) univ < ⊤\n[PROOFSTEP]\nrw [toMeasureOfZeroLE_apply s hi hi₁ MeasurableSet.univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni j : Set α\nhi : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i\nhi₁ : MeasurableSet i\n⊢ ↑{ val := ↑s (i ∩ univ), property := (_ : 0 ≤ ↑s (i ∩ univ)) } < ⊤\n[PROOFSTEP]\nexact ENNReal.coe_lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni j : Set α\nhi : VectorMeasure.restrict s i ≤ VectorMeasure.restrict 0 i\nhi₁ : MeasurableSet i\n⊢ ↑↑(toMeasureOfLEZero s i hi₁ hi) univ < ⊤\n[PROOFSTEP]\nrw [toMeasureOfLEZero_apply s hi hi₁ MeasurableSet.univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni j : Set α\nhi : VectorMeasure.restrict s i ≤ VectorMeasure.restrict 0 i\nhi₁ : MeasurableSet i\n⊢ ↑{ val := -↑s (i ∩ univ), property := (_ : 0 ≤ -↑s (i ∩ univ)) } < ⊤\n[PROOFSTEP]\nexact ENNReal.coe_lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni j : Set α\nhs : VectorMeasure.restrict 0 univ ≤ VectorMeasure.restrict s univ\n⊢ Measure.toSignedMeasure (toMeasureOfZeroLE s univ (_ : MeasurableSet univ) hs) = s\n[PROOFSTEP]\next i hi\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni✝ j : Set α\nhs : VectorMeasure.restrict 0 univ ≤ VectorMeasure.restrict s univ\ni : Set α\nhi : MeasurableSet i\n⊢ ↑(Measure.toSignedMeasure (toMeasureOfZeroLE s univ (_ : MeasurableSet univ) hs)) i = ↑s i\n[PROOFSTEP]\nsimp [hi, toMeasureOfZeroLE_apply _ _ _ hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni j : Set α\nhs : VectorMeasure.restrict s univ ≤ VectorMeasure.restrict 0 univ\n⊢ Measure.toSignedMeasure (toMeasureOfLEZero s univ (_ : MeasurableSet univ) hs) = -s\n[PROOFSTEP]\next i hi\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\ns : SignedMeasure α\ni✝ j : Set α\nhs : VectorMeasure.restrict s univ ≤ VectorMeasure.restrict 0 univ\ni : Set α\nhi : MeasurableSet i\n⊢ ↑(Measure.toSignedMeasure (toMeasureOfLEZero s univ (_ : MeasurableSet univ) hs)) i = ↑(-s) i\n[PROOFSTEP]\nsimp [hi, toMeasureOfLEZero_apply _ _ _ hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\n⊢ 0 ≤ toSignedMeasure μ\n[PROOFSTEP]\nrw [← le_restrict_univ_iff_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\n⊢ VectorMeasure.restrict 0 univ ≤ VectorMeasure.restrict (toSignedMeasure μ) univ\n[PROOFSTEP]\nrefine' restrict_le_restrict_of_subset_le _ _ fun j hj₁ _ => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nj : Set α\nhj₁ : MeasurableSet j\nx✝ : j ⊆ univ\n⊢ ↑0 j ≤ ↑(toSignedMeasure μ) j\n[PROOFSTEP]\nsimp only [Measure.toSignedMeasure_apply_measurable hj₁, coe_zero, Pi.zero_apply, ENNReal.toReal_nonneg,\n  VectorMeasure.coe_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\n⊢ SignedMeasure.toMeasureOfZeroLE (toSignedMeasure μ) univ (_ : MeasurableSet univ)\n      (_ : VectorMeasure.restrict 0 univ ≤ VectorMeasure.restrict (toSignedMeasure μ) univ) =\n    μ\n[PROOFSTEP]\nrefine' Measure.ext fun i hi => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\ni : Set α\nhi : MeasurableSet i\n⊢ ↑↑(SignedMeasure.toMeasureOfZeroLE (toSignedMeasure μ) univ (_ : MeasurableSet univ)\n            (_ : VectorMeasure.restrict 0 univ ≤ VectorMeasure.restrict (toSignedMeasure μ) univ))\n      i =\n    ↑↑μ i\n[PROOFSTEP]\nlift μ i to ℝ≥0 using (measure_lt_top _ _).ne with m hm\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\ni : Set α\nhi : MeasurableSet i\nm : ℝ≥0\nhm : ↑m = ↑↑μ i\n⊢ ↑↑(SignedMeasure.toMeasureOfZeroLE (toSignedMeasure μ) univ (_ : MeasurableSet univ)\n            (_ : VectorMeasure.restrict 0 univ ≤ VectorMeasure.restrict (toSignedMeasure μ) univ))\n      i =\n    ↑m\n[PROOFSTEP]\nrw [SignedMeasure.toMeasureOfZeroLE_apply _ _ _ hi, coe_eq_coe]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\ni : Set α\nhi : MeasurableSet i\nm : ℝ≥0\nhm : ↑m = ↑↑μ i\n⊢ { val := ↑(toSignedMeasure μ) (univ ∩ i), property := (_ : 0 ≤ ↑(toSignedMeasure μ) (univ ∩ i)) } = m\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.e_val\nα : Type u_1\nβ : Type u_2\nm✝ : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\ni : Set α\nhi : MeasurableSet i\nm : ℝ≥0\nhm : ↑m = ↑↑μ i\n⊢ ↑(toSignedMeasure μ) (univ ∩ i) = ↑m\n[PROOFSTEP]\nsimp [hi, ← hm]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.VectorMeasure", "llama_tokens": 82533, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583250334526, "lm_q2_score": 0.5583269943353744, "lm_q1q2_score": 0.3885723197986091}}
{"text": "[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\n⊢ p f\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\n⊢ p f\n[PROOFSTEP]\ninduction' hs : univ.sigma f using Finset.strongInductionOn with s ihs generalizing f\n[GOAL]\ncase intro.a\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs✝ : Finset.sigma univ f✝ = x✝\ns : Finset ((i : ι) × α i)\nihs : ∀ (t : Finset ((i : ι) × α i)), t ⊂ s → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nf : (i : ι) → Finset (α i)\nhs : Finset.sigma univ f = s\n⊢ p f\n[PROOFSTEP]\nsubst s\n[GOAL]\ncase intro.a\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ f → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\n⊢ p f\n[PROOFSTEP]\ncases' eq_empty_or_nonempty (univ.sigma f) with he hne\n[GOAL]\ncase intro.a.inl\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ f → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhe : Finset.sigma univ f = ∅\n⊢ p f\n[PROOFSTEP]\nconvert h0 using 1\n[GOAL]\ncase h.e'_1\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ f → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhe : Finset.sigma univ f = ∅\n⊢ f = fun x => ∅\n[PROOFSTEP]\nsimpa [funext_iff] using he\n[GOAL]\ncase intro.a.inr\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ f → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhne : Finset.Nonempty (Finset.sigma univ f)\n⊢ p f\n[PROOFSTEP]\nrcases sigma_nonempty.1 hne with ⟨i, -, hi⟩\n[GOAL]\ncase intro.a.inr.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ f → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\n⊢ p f\n[PROOFSTEP]\nrcases H_ex i (f i) hi with ⟨x, x_mem, hr⟩\n[GOAL]\ncase intro.a.inr.intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ f → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\nhr : r i x (erase (f i) x)\n⊢ p f\n[PROOFSTEP]\nset g := update f i ((f i).erase x) with hg\n[GOAL]\ncase intro.a.inr.intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ f → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\nhr : r i x (erase (f i) x)\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nhg : g = update f i (erase (f i) x)\n⊢ p f\n[PROOFSTEP]\nhave hx' : x ∉ g i := by\n  rw [hg, update_same]\n  apply not_mem_erase\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ f → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\nhr : r i x (erase (f i) x)\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nhg : g = update f i (erase (f i) x)\n⊢ ¬x ∈ g i\n[PROOFSTEP]\nrw [hg, update_same]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ f → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\nhr : r i x (erase (f i) x)\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nhg : g = update f i (erase (f i) x)\n⊢ ¬x ∈ erase (f i) x\n[PROOFSTEP]\napply not_mem_erase\n[GOAL]\ncase intro.a.inr.intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ f → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\nhr : r i x (erase (f i) x)\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nhg : g = update f i (erase (f i) x)\nhx' : ¬x ∈ g i\n⊢ p f\n[PROOFSTEP]\nrw [show f = update g i (insert x (g i)) by rw [hg, update_idem, update_same, insert_erase x_mem, update_eq_self]] at hr\n  ihs ⊢\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ f → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\nhr : r i x (erase (f i) x)\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nhg : g = update f i (erase (f i) x)\nhx' : ¬x ∈ g i\n⊢ f = update g i (insert x (g i))\n[PROOFSTEP]\nrw [hg, update_idem, update_same, insert_erase x_mem, update_eq_self]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ f → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nhr : r i x (erase (update g i (insert x (g i)) i) x)\nhg : g = update f i (erase (f i) x)\nhx' : ¬x ∈ g i\n⊢ f = update g i (insert x (g i))\n[PROOFSTEP]\nrw [hg, update_idem, update_same, insert_erase x_mem, update_eq_self]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ (update g i (insert x (g i))) → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhr : r i x (erase (update g i (insert x (g i)) i) x)\nhg : g = update f i (erase (f i) x)\nhx' : ¬x ∈ g i\n⊢ f = update g i (insert x (g i))\n[PROOFSTEP]\nrw [hg, update_idem, update_same, insert_erase x_mem, update_eq_self]\n[GOAL]\ncase intro.a.inr.intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ (update g i (insert x (g i))) → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhr : r i x (erase (update g i (insert x (g i)) i) x)\nhg : g = update f i (erase (f i) x)\nhx' : ¬x ∈ g i\n⊢ p (update g i (insert x (g i)))\n[PROOFSTEP]\nclear hg\n[GOAL]\ncase intro.a.inr.intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ (update g i (insert x (g i))) → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhr : r i x (erase (update g i (insert x (g i)) i) x)\nhx' : ¬x ∈ g i\n⊢ p (update g i (insert x (g i)))\n[PROOFSTEP]\nrw [update_same, erase_insert hx'] at hr \n[GOAL]\ncase intro.a.inr.intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ (update g i (insert x (g i))) → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhr : r i x (g i)\nhx' : ¬x ∈ g i\n⊢ p (update g i (insert x (g i)))\n[PROOFSTEP]\nrefine step _ _ _ hr (ihs (univ.sigma g) ?_ _ rfl)\n[GOAL]\ncase intro.a.inr.intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ (update g i (insert x (g i))) → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhr : r i x (g i)\nhx' : ¬x ∈ g i\n⊢ Finset.sigma univ g ⊂ Finset.sigma univ (update g i (insert x (g i)))\n[PROOFSTEP]\nrw [ssubset_iff_of_subset (sigma_mono (Subset.refl _) _)]\n[GOAL]\ncase intro.a.inr.intro.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ (update g i (insert x (g i))) → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhr : r i x (g i)\nhx' : ¬x ∈ g i\n⊢ ∃ x_1, x_1 ∈ Finset.sigma univ (update g i (insert x (g i))) ∧ ¬x_1 ∈ Finset.sigma univ g\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ (update g i (insert x (g i))) → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhr : r i x (g i)\nhx' : ¬x ∈ g i\n⊢ ∀ (i_1 : ι), g i_1 ⊆ update g i (insert x (g i)) i_1\n[PROOFSTEP]\nexacts [⟨⟨i, x⟩, mem_sigma.2 ⟨mem_univ _, by simp⟩, by simp [hx']⟩,\n  (@le_update_iff _ _ _ _ g g i _).2 ⟨subset_insert _ _, fun _ _ ↦ le_rfl⟩]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ (update g i (insert x (g i))) → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhr : r i x (g i)\nhx' : ¬x ∈ g i\n⊢ { fst := i, snd := x }.snd ∈ update g i (insert x (g i)) { fst := i, snd := x }.fst\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Finite ι\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nr : (i : ι) → α i → Finset (α i) → Prop\nH_ex : ∀ (i : ι) (s : Finset (α i)), Finset.Nonempty s → ∃ x, x ∈ s ∧ r i x (erase s x)\np : ((i : ι) → Finset (α i)) → Prop\nf✝ : (i : ι) → Finset (α i)\nh0 : p fun x => ∅\nstep : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (update g i (insert x (g i)))\nval✝ : Fintype ι\nx✝ : Finset ((i : ι) × α i)\nhs : Finset.sigma univ f✝ = x✝\nf : (i : ι) → Finset (α i)\nhne : Finset.Nonempty (Finset.sigma univ f)\ni : ι\nhi : Finset.Nonempty (f i)\nx : α i\nx_mem : x ∈ f i\ng : (a : ι) → Finset (α a) := update f i (erase (f i) x)\nihs :\n  ∀ (t : Finset ((i : ι) × α i)),\n    t ⊂ Finset.sigma univ (update g i (insert x (g i))) → ∀ (f : (i : ι) → Finset (α i)), Finset.sigma univ f = t → p f\nhr : r i x (g i)\nhx' : ¬x ∈ g i\n⊢ ¬{ fst := i, snd := x } ∈ Finset.sigma univ g\n[PROOFSTEP]\nsimp [hx']\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.PiInduction", "llama_tokens": 11664, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7310585786300049, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.38834516945355385}}
{"text": "[GOAL]\nx : ℝ\nhx : 0 ≤ x\ny : ℝ\nz : ℂ\n⊢ ↑x ^ (↑y * z) = ↑(x ^ y) ^ z\n[PROOFSTEP]\nrw [cpow_mul, ofReal_cpow hx]\n[GOAL]\ncase h₁\nx : ℝ\nhx : 0 ≤ x\ny : ℝ\nz : ℂ\n⊢ -Real.pi < (log ↑x * ↑y).im\n[PROOFSTEP]\nrw [← ofReal_log hx, ← ofReal_mul, ofReal_im, neg_lt_zero]\n[GOAL]\ncase h₁\nx : ℝ\nhx : 0 ≤ x\ny : ℝ\nz : ℂ\n⊢ 0 < Real.pi\n[PROOFSTEP]\nexact Real.pi_pos\n[GOAL]\ncase h₂\nx : ℝ\nhx : 0 ≤ x\ny : ℝ\nz : ℂ\n⊢ (log ↑x * ↑y).im ≤ Real.pi\n[PROOFSTEP]\nrw [← ofReal_log hx, ← ofReal_mul, ofReal_im]\n[GOAL]\ncase h₂\nx : ℝ\nhx : 0 ≤ x\ny : ℝ\nz : ℂ\n⊢ 0 ≤ Real.pi\n[PROOFSTEP]\nexact Real.pi_pos.le\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\nhf : MellinConvergent f s\n𝕜 : Type u_2\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : SMulCommClass ℂ 𝕜 E\nc : 𝕜\n⊢ MellinConvergent (fun t => c • f t) s\n[PROOFSTEP]\nsimpa only [MellinConvergent, smul_comm] using hf.smul c\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns a : ℂ\n⊢ MellinConvergent (fun t => ↑t ^ a • f t) s ↔ MellinConvergent f (s + a)\n[PROOFSTEP]\nrefine' integrableOn_congr_fun (fun t ht => _) measurableSet_Ioi\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns a : ℂ\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ↑t ^ (s - 1) • (fun t => ↑t ^ a • f t) t = ↑t ^ (s + a - 1) • f t\n[PROOFSTEP]\nsimp_rw [← sub_add_eq_add_sub, cpow_add _ _ (ofReal_ne_zero.2 <| ne_of_gt ht), mul_smul]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → ℂ\ns : ℂ\nhf : MellinConvergent f s\na : ℂ\n⊢ MellinConvergent (fun t => f t / a) s\n[PROOFSTEP]\nsimpa only [MellinConvergent, smul_eq_mul, ← mul_div_assoc] using hf.div_const a\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\n⊢ MellinConvergent (fun t => f (a * t)) s ↔ MellinConvergent f s\n[PROOFSTEP]\nhave := integrableOn_Ioi_comp_mul_left_iff (fun t : ℝ => (t : ℂ) ^ (s - 1) • f t) 0 ha\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nthis :\n  IntegrableOn (fun x => (fun t => ↑t ^ (s - 1) • f t) (a * x)) (Ioi 0) ↔\n    IntegrableOn (fun t => ↑t ^ (s - 1) • f t) (Ioi (a * 0))\n⊢ MellinConvergent (fun t => f (a * t)) s ↔ MellinConvergent f s\n[PROOFSTEP]\nrw [mul_zero] at this \n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nthis :\n  IntegrableOn (fun x => (fun t => ↑t ^ (s - 1) • f t) (a * x)) (Ioi 0) ↔\n    IntegrableOn (fun t => ↑t ^ (s - 1) • f t) (Ioi 0)\n⊢ MellinConvergent (fun t => f (a * t)) s ↔ MellinConvergent f s\n[PROOFSTEP]\nhave h1 :\n  EqOn (fun t : ℝ => (↑(a * t) : ℂ) ^ (s - 1) • f (a * t))\n    ((a : ℂ) ^ (s - 1) • fun t : ℝ => (t : ℂ) ^ (s - 1) • f (a * t)) (Ioi 0) :=\n  fun t ht ↦ by simp only [ofReal_mul, mul_cpow_ofReal_nonneg ha.le (le_of_lt ht), mul_smul, Pi.smul_apply]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nthis :\n  IntegrableOn (fun x => (fun t => ↑t ^ (s - 1) • f t) (a * x)) (Ioi 0) ↔\n    IntegrableOn (fun t => ↑t ^ (s - 1) • f t) (Ioi 0)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ (fun t => ↑(a * t) ^ (s - 1) • f (a * t)) t = (↑a ^ (s - 1) • fun t => ↑t ^ (s - 1) • f (a * t)) t\n[PROOFSTEP]\nsimp only [ofReal_mul, mul_cpow_ofReal_nonneg ha.le (le_of_lt ht), mul_smul, Pi.smul_apply]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nthis :\n  IntegrableOn (fun x => (fun t => ↑t ^ (s - 1) • f t) (a * x)) (Ioi 0) ↔\n    IntegrableOn (fun t => ↑t ^ (s - 1) • f t) (Ioi 0)\nh1 : EqOn (fun t => ↑(a * t) ^ (s - 1) • f (a * t)) (↑a ^ (s - 1) • fun t => ↑t ^ (s - 1) • f (a * t)) (Ioi 0)\n⊢ MellinConvergent (fun t => f (a * t)) s ↔ MellinConvergent f s\n[PROOFSTEP]\nhave h2 : (a : ℂ) ^ (s - 1) ≠ 0 :=\n  by\n  rw [Ne.def, cpow_eq_zero_iff, not_and_or, ofReal_eq_zero]\n  exact Or.inl ha.ne'\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nthis :\n  IntegrableOn (fun x => (fun t => ↑t ^ (s - 1) • f t) (a * x)) (Ioi 0) ↔\n    IntegrableOn (fun t => ↑t ^ (s - 1) • f t) (Ioi 0)\nh1 : EqOn (fun t => ↑(a * t) ^ (s - 1) • f (a * t)) (↑a ^ (s - 1) • fun t => ↑t ^ (s - 1) • f (a * t)) (Ioi 0)\n⊢ ↑a ^ (s - 1) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, cpow_eq_zero_iff, not_and_or, ofReal_eq_zero]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nthis :\n  IntegrableOn (fun x => (fun t => ↑t ^ (s - 1) • f t) (a * x)) (Ioi 0) ↔\n    IntegrableOn (fun t => ↑t ^ (s - 1) • f t) (Ioi 0)\nh1 : EqOn (fun t => ↑(a * t) ^ (s - 1) • f (a * t)) (↑a ^ (s - 1) • fun t => ↑t ^ (s - 1) • f (a * t)) (Ioi 0)\n⊢ ¬a = 0 ∨ ¬s - 1 ≠ 0\n[PROOFSTEP]\nexact Or.inl ha.ne'\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nthis :\n  IntegrableOn (fun x => (fun t => ↑t ^ (s - 1) • f t) (a * x)) (Ioi 0) ↔\n    IntegrableOn (fun t => ↑t ^ (s - 1) • f t) (Ioi 0)\nh1 : EqOn (fun t => ↑(a * t) ^ (s - 1) • f (a * t)) (↑a ^ (s - 1) • fun t => ↑t ^ (s - 1) • f (a * t)) (Ioi 0)\nh2 : ↑a ^ (s - 1) ≠ 0\n⊢ MellinConvergent (fun t => f (a * t)) s ↔ MellinConvergent f s\n[PROOFSTEP]\nrw [MellinConvergent, MellinConvergent, ← this, integrableOn_congr_fun h1 measurableSet_Ioi, IntegrableOn, IntegrableOn,\n  integrable_smul_iff h2]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\n⊢ MellinConvergent (fun t => f (t ^ a)) s ↔ MellinConvergent f (s / ↑a)\n[PROOFSTEP]\nrefine Iff.trans ?_ (integrableOn_Ioi_comp_rpow_iff' _ ha)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\n⊢ MellinConvergent (fun t => f (t ^ a)) s ↔\n    IntegrableOn (fun x => x ^ (a - 1) • ↑(x ^ a) ^ (s / ↑a - 1) • f (x ^ a)) (Ioi 0)\n[PROOFSTEP]\nrw [MellinConvergent]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\n⊢ IntegrableOn (fun t => ↑t ^ (s - 1) • f (t ^ a)) (Ioi 0) ↔\n    IntegrableOn (fun x => x ^ (a - 1) • ↑(x ^ a) ^ (s / ↑a - 1) • f (x ^ a)) (Ioi 0)\n[PROOFSTEP]\nrefine' integrableOn_congr_fun (fun t ht => _) measurableSet_Ioi\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ↑t ^ (s - 1) • f (t ^ a) = t ^ (a - 1) • ↑(t ^ a) ^ (s / ↑a - 1) • f (t ^ a)\n[PROOFSTEP]\ndsimp only [Pi.smul_apply]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ↑t ^ (s - 1) • f (t ^ a) = t ^ (a - 1) • ↑(t ^ a) ^ (s / ↑a - 1) • f (t ^ a)\n[PROOFSTEP]\nrw [← Complex.coe_smul (t ^ (a - 1)), ← mul_smul, ← cpow_mul_ofReal_nonneg (le_of_lt ht), ofReal_cpow (le_of_lt ht), ←\n  cpow_add _ _ (ofReal_ne_zero.mpr (ne_of_gt ht)), ofReal_sub, ofReal_one, mul_sub,\n  mul_div_cancel' _ (ofReal_ne_zero.mpr ha), mul_one, add_comm, ← add_sub_assoc, sub_add_cancel]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns a : ℂ\n⊢ mellin (fun t => ↑t ^ a • f t) s = mellin f (s + a)\n[PROOFSTEP]\nrefine' set_integral_congr measurableSet_Ioi fun t ht => _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns a : ℂ\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ↑t ^ (s - 1) • (fun t => ↑t ^ a • f t) t = ↑t ^ (s + a - 1) • f t\n[PROOFSTEP]\nsimp_rw [← sub_add_eq_add_sub, cpow_add _ _ (ofReal_ne_zero.2 <| ne_of_gt ht), mul_smul]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℂ E\ninst✝³ : CompleteSpace E\nf : ℝ → E\ns : ℂ\n𝕜 : Type u_2\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : SMulCommClass ℂ 𝕜 E\nc : 𝕜\n⊢ mellin (fun t => c • f t) s = c • mellin f s\n[PROOFSTEP]\nsimp only [mellin, smul_comm, integral_smul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → ℂ\ns a : ℂ\n⊢ mellin (fun t => f t / a) s = mellin f s / a\n[PROOFSTEP]\nsimp_rw [mellin, smul_eq_mul, ← mul_div_assoc, integral_div]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\n⊢ mellin (fun t => f (t ^ a)) s = |a|⁻¹ • mellin f (s / ↑a)\n[PROOFSTEP]\nsimp_rw [mellin]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\n⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) • f (t ^ a) = |a|⁻¹ • ∫ (t : ℝ) in Ioi 0, ↑t ^ (s / ↑a - 1) • f t\n[PROOFSTEP]\nconv_rhs => rw [← integral_comp_rpow_Ioi _ ha, ← integral_smul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\n| |a|⁻¹ • ∫ (t : ℝ) in Ioi 0, ↑t ^ (s / ↑a - 1) • f t\n[PROOFSTEP]\nrw [← integral_comp_rpow_Ioi _ ha, ← integral_smul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\n| |a|⁻¹ • ∫ (t : ℝ) in Ioi 0, ↑t ^ (s / ↑a - 1) • f t\n[PROOFSTEP]\nrw [← integral_comp_rpow_Ioi _ ha, ← integral_smul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\n| |a|⁻¹ • ∫ (t : ℝ) in Ioi 0, ↑t ^ (s / ↑a - 1) • f t\n[PROOFSTEP]\nrw [← integral_comp_rpow_Ioi _ ha, ← integral_smul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\n⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) • f (t ^ a) =\n    ∫ (a_1 : ℝ) in Ioi 0, |a|⁻¹ • (|a| * a_1 ^ (a - 1)) • ↑(a_1 ^ a) ^ (s / ↑a - 1) • f (a_1 ^ a)\n[PROOFSTEP]\nrefine' set_integral_congr measurableSet_Ioi fun t ht => _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ↑t ^ (s - 1) • f (t ^ a) = |a|⁻¹ • (|a| * t ^ (a - 1)) • ↑(t ^ a) ^ (s / ↑a - 1) • f (t ^ a)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ↑t ^ (s - 1) • f (t ^ a) = |a|⁻¹ • (|a| * t ^ (a - 1)) • ↑(t ^ a) ^ (s / ↑a - 1) • f (t ^ a)\n[PROOFSTEP]\nrw [← mul_smul, ← mul_assoc, inv_mul_cancel (mt abs_eq_zero.1 ha), one_mul, ← smul_assoc, real_smul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : a ≠ 0\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ↑t ^ (s - 1) • f (t ^ a) = (↑(t ^ (a - 1)) * ↑(t ^ a) ^ (s / ↑a - 1)) • f (t ^ a)\n[PROOFSTEP]\nrw [ofReal_cpow (le_of_lt ht), ← cpow_mul_ofReal_nonneg (le_of_lt ht), ←\n  cpow_add _ _ (ofReal_ne_zero.mpr <| ne_of_gt ht), ofReal_sub, ofReal_one, mul_sub,\n  mul_div_cancel' _ (ofReal_ne_zero.mpr ha), add_comm, ← add_sub_assoc, mul_one, sub_add_cancel]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\n⊢ mellin (fun t => f (a * t)) s = ↑a ^ (-s) • mellin f s\n[PROOFSTEP]\nsimp_rw [mellin]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\n⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) • f (a * t) = ↑a ^ (-s) • ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) • f t\n[PROOFSTEP]\nhave :\n  EqOn (fun t : ℝ => (t : ℂ) ^ (s - 1) • f (a * t))\n    (fun t : ℝ => (a : ℂ) ^ (1 - s) • (fun u : ℝ => (u : ℂ) ^ (s - 1) • f u) (a * t)) (Ioi 0) :=\n  fun t ht ↦ by\n  dsimp only\n  rw [ofReal_mul, mul_cpow_ofReal_nonneg ha.le (le_of_lt ht), ← mul_smul, (by ring : 1 - s = -(s - 1)), cpow_neg,\n    inv_mul_cancel_left₀]\n  rw [Ne.def, cpow_eq_zero_iff, ofReal_eq_zero, not_and_or]\n  exact Or.inl ha.ne'\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nt : ℝ\nht : t ∈ Ioi 0\n⊢ (fun t => ↑t ^ (s - 1) • f (a * t)) t = (fun t => ↑a ^ (1 - s) • (fun u => ↑u ^ (s - 1) • f u) (a * t)) t\n[PROOFSTEP]\ndsimp only\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ↑t ^ (s - 1) • f (a * t) = ↑a ^ (1 - s) • ↑(a * t) ^ (s - 1) • f (a * t)\n[PROOFSTEP]\nrw [ofReal_mul, mul_cpow_ofReal_nonneg ha.le (le_of_lt ht), ← mul_smul, (by ring : 1 - s = -(s - 1)), cpow_neg,\n  inv_mul_cancel_left₀]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nt : ℝ\nht : t ∈ Ioi 0\n⊢ 1 - s = -(s - 1)\n[PROOFSTEP]\nring\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ↑a ^ (s - 1) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, cpow_eq_zero_iff, ofReal_eq_zero, not_and_or]\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ¬a = 0 ∨ ¬s - 1 ≠ 0\n[PROOFSTEP]\nexact Or.inl ha.ne'\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\nthis : EqOn (fun t => ↑t ^ (s - 1) • f (a * t)) (fun t => ↑a ^ (1 - s) • (fun u => ↑u ^ (s - 1) • f u) (a * t)) (Ioi 0)\n⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) • f (a * t) = ↑a ^ (-s) • ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) • f t\n[PROOFSTEP]\nrw [set_integral_congr measurableSet_Ioi this, integral_smul,\n  integral_comp_mul_left_Ioi (fun u ↦ ↑u ^ (s - 1) • f u) _ ha, mul_zero, ← Complex.coe_smul, ← mul_smul,\n  sub_eq_add_neg, cpow_add _ _ (ofReal_ne_zero.mpr ha.ne'), cpow_one, abs_of_pos (inv_pos.mpr ha), ofReal_inv,\n  mul_assoc, mul_comm, inv_mul_cancel_right₀ (ofReal_ne_zero.mpr ha.ne')]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\na : ℝ\nha : 0 < a\n⊢ mellin (fun t => f (t * a)) s = ↑a ^ (-s) • mellin f s\n[PROOFSTEP]\nsimpa only [mul_comm] using mellin_comp_mul_left f s ha\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℝ → E\ns : ℂ\n⊢ mellin (fun t => f t⁻¹) s = mellin f (-s)\n[PROOFSTEP]\nsimp_rw [← rpow_neg_one, mellin_comp_rpow _ _ (neg_ne_zero.mpr one_ne_zero), abs_neg, abs_one, inv_one, one_smul,\n  ofReal_neg, ofReal_one, div_neg, div_one]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf g : ℝ → E\ns : ℂ\nhf : MellinConvergent f s\nhg : MellinConvergent g s\n⊢ MellinConvergent (fun t => f t + g t) s\n[PROOFSTEP]\nsimpa only [MellinConvergent, smul_add] using hf.add hg\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf g : ℝ → E\ns : ℂ\nhf : MellinConvergent f s\nhg : MellinConvergent g s\n⊢ mellin (fun t => f t + g t) s = mellin f s + mellin g s\n[PROOFSTEP]\nsimpa only [mellin, smul_add] using integral_add hf hg\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf g : ℝ → E\ns : ℂ\nhf : MellinConvergent f s\nhg : MellinConvergent g s\n⊢ MellinConvergent (fun t => f t - g t) s\n[PROOFSTEP]\nsimpa only [MellinConvergent, smul_sub] using hf.sub hg\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf g : ℝ → E\ns : ℂ\nhf : MellinConvergent f s\nhg : MellinConvergent g s\n⊢ mellin (fun t => f t - g t) s = mellin f s - mellin g s\n[PROOFSTEP]\nsimpa only [mellin, smul_sub] using integral_sub hf hg\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\nT : Set ℝ\nhT : T ⊆ Ioi 0\nhT' : MeasurableSet T\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\ns : ℂ\n⊢ IntegrableOn (fun t => ↑t ^ (s - 1) • f t) T ↔ IntegrableOn (fun t => t ^ (s.re - 1) * ‖f t‖) T\n[PROOFSTEP]\nhave : AEStronglyMeasurable (fun t : ℝ => (t : ℂ) ^ (s - 1) • f t) (volume.restrict T) :=\n  by\n  refine' ((ContinuousAt.continuousOn _).aestronglyMeasurable hT').smul (hfc.mono_set hT)\n  exact fun t ht => continuousAt_ofReal_cpow_const _ _ (Or.inr <| ne_of_gt (hT ht))\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\nT : Set ℝ\nhT : T ⊆ Ioi 0\nhT' : MeasurableSet T\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\ns : ℂ\n⊢ AEStronglyMeasurable (fun t => ↑t ^ (s - 1) • f t) (Measure.restrict volume T)\n[PROOFSTEP]\nrefine' ((ContinuousAt.continuousOn _).aestronglyMeasurable hT').smul (hfc.mono_set hT)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\nT : Set ℝ\nhT : T ⊆ Ioi 0\nhT' : MeasurableSet T\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\ns : ℂ\n⊢ ∀ (x : ℝ), x ∈ T → ContinuousAt (fun t => ↑t ^ (s - 1)) x\n[PROOFSTEP]\nexact fun t ht => continuousAt_ofReal_cpow_const _ _ (Or.inr <| ne_of_gt (hT ht))\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\nT : Set ℝ\nhT : T ⊆ Ioi 0\nhT' : MeasurableSet T\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\ns : ℂ\nthis : AEStronglyMeasurable (fun t => ↑t ^ (s - 1) • f t) (Measure.restrict volume T)\n⊢ IntegrableOn (fun t => ↑t ^ (s - 1) • f t) T ↔ IntegrableOn (fun t => t ^ (s.re - 1) * ‖f t‖) T\n[PROOFSTEP]\nrw [IntegrableOn, ← integrable_norm_iff this, ← IntegrableOn]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\nT : Set ℝ\nhT : T ⊆ Ioi 0\nhT' : MeasurableSet T\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\ns : ℂ\nthis : AEStronglyMeasurable (fun t => ↑t ^ (s - 1) • f t) (Measure.restrict volume T)\n⊢ IntegrableOn (fun a => ‖↑a ^ (s - 1) • f a‖) T ↔ IntegrableOn (fun t => t ^ (s.re - 1) * ‖f t‖) T\n[PROOFSTEP]\nrefine' integrableOn_congr_fun (fun t ht => _) hT'\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\nT : Set ℝ\nhT : T ⊆ Ioi 0\nhT' : MeasurableSet T\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\ns : ℂ\nthis : AEStronglyMeasurable (fun t => ↑t ^ (s - 1) • f t) (Measure.restrict volume T)\nt : ℝ\nht : t ∈ T\n⊢ ‖↑t ^ (s - 1) • f t‖ = t ^ (s.re - 1) * ‖f t‖\n[PROOFSTEP]\nsimp_rw [norm_smul, Complex.norm_eq_abs, abs_cpow_eq_rpow_re_of_pos (hT ht), sub_re, one_re]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\n⊢ ∃ c, 0 < c ∧ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c)\n[PROOFSTEP]\nobtain ⟨d, hd'⟩ := hf.isBigOWith\n[GOAL]\ncase intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd : ℝ\nhd' : IsBigOWith d atTop f fun x => x ^ (-a)\n⊢ ∃ c, 0 < c ∧ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c)\n[PROOFSTEP]\nsimp_rw [IsBigOWith, eventually_atTop] at hd' \n[GOAL]\ncase intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd : ℝ\nhd' : ∃ a_1, ∀ (b : ℝ), b ≥ a_1 → ‖f b‖ ≤ d * ‖b ^ (-a)‖\n⊢ ∃ c, 0 < c ∧ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c)\n[PROOFSTEP]\nobtain ⟨e, he⟩ := hd'\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\n⊢ ∃ c, 0 < c ∧ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c)\n[PROOFSTEP]\nhave he' : 0 < max e 1 := zero_lt_one.trans_le (le_max_right _ _)\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\nhe' : 0 < max e 1\n⊢ ∃ c, 0 < c ∧ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c)\n[PROOFSTEP]\nrefine' ⟨max e 1, he', _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\nhe' : 0 < max e 1\n⊢ AEStronglyMeasurable (fun t => t ^ (s - 1) * f t) (Measure.restrict volume (Ioi (max e 1)))\n[PROOFSTEP]\nrefine' AEStronglyMeasurable.mul _ (hfc.mono_set (Ioi_subset_Ioi he'.le))\n[GOAL]\ncase intro.intro.refine'_1\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\nhe' : 0 < max e 1\n⊢ AEStronglyMeasurable (fun t => t ^ (s - 1)) (Measure.restrict volume (Ioi (max e 1)))\n[PROOFSTEP]\nrefine' (ContinuousAt.continuousOn fun t ht => _).aestronglyMeasurable measurableSet_Ioi\n[GOAL]\ncase intro.intro.refine'_1\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\nhe' : 0 < max e 1\nt : ℝ\nht : t ∈ Ioi (max e 1)\n⊢ ContinuousAt (fun t => t ^ (s - 1)) t\n[PROOFSTEP]\nexact continuousAt_rpow_const _ _ (Or.inl <| (he'.trans ht).ne')\n[GOAL]\ncase intro.intro.refine'_2\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\nhe' : 0 < max e 1\n⊢ HasFiniteIntegral fun t => t ^ (s - 1) * f t\n[PROOFSTEP]\nhave : ∀ᵐ t : ℝ ∂volume.restrict (Ioi <| max e 1), ‖t ^ (s - 1) * f t‖ ≤ t ^ (s - 1 + -a) * d :=\n  by\n  refine' (ae_restrict_mem measurableSet_Ioi).mono fun t ht => _\n  have ht' : 0 < t := he'.trans ht\n  rw [norm_mul, rpow_add ht', ← norm_of_nonneg (rpow_nonneg_of_nonneg ht'.le (-a)), mul_assoc, mul_comm _ d,\n    norm_of_nonneg (rpow_nonneg_of_nonneg ht'.le _)]\n  exact mul_le_mul_of_nonneg_left (he t ((le_max_left e 1).trans_lt ht).le) (rpow_pos_of_pos ht' _).le\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\nhe' : 0 < max e 1\n⊢ ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi (max e 1)), ‖t ^ (s - 1) * f t‖ ≤ t ^ (s - 1 + -a) * d\n[PROOFSTEP]\nrefine' (ae_restrict_mem measurableSet_Ioi).mono fun t ht => _\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\nhe' : 0 < max e 1\nt : ℝ\nht : t ∈ Ioi (max e 1)\n⊢ ‖t ^ (s - 1) * f t‖ ≤ t ^ (s - 1 + -a) * d\n[PROOFSTEP]\nhave ht' : 0 < t := he'.trans ht\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\nhe' : 0 < max e 1\nt : ℝ\nht : t ∈ Ioi (max e 1)\nht' : 0 < t\n⊢ ‖t ^ (s - 1) * f t‖ ≤ t ^ (s - 1 + -a) * d\n[PROOFSTEP]\nrw [norm_mul, rpow_add ht', ← norm_of_nonneg (rpow_nonneg_of_nonneg ht'.le (-a)), mul_assoc, mul_comm _ d,\n  norm_of_nonneg (rpow_nonneg_of_nonneg ht'.le _)]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\nhe' : 0 < max e 1\nt : ℝ\nht : t ∈ Ioi (max e 1)\nht' : 0 < t\n⊢ t ^ (s - 1) * ‖f t‖ ≤ t ^ (s - 1) * (d * ‖t ^ (-a)‖)\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left (he t ((le_max_left e 1).trans_lt ht).le) (rpow_pos_of_pos ht' _).le\n[GOAL]\ncase intro.intro.refine'_2\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\nhe' : 0 < max e 1\nthis : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi (max e 1)), ‖t ^ (s - 1) * f t‖ ≤ t ^ (s - 1 + -a) * d\n⊢ HasFiniteIntegral fun t => t ^ (s - 1) * f t\n[PROOFSTEP]\nrefine' (HasFiniteIntegral.mul_const _ _).mono' this\n[GOAL]\ncase intro.intro.refine'_2\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\nhe' : 0 < max e 1\nthis : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi (max e 1)), ‖t ^ (s - 1) * f t‖ ≤ t ^ (s - 1 + -a) * d\n⊢ HasFiniteIntegral fun a_1 => a_1 ^ (s - 1 + -a)\n[PROOFSTEP]\nexact (integrableOn_Ioi_rpow_of_lt (by linarith) he').hasFiniteIntegral\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\na s : ℝ\nhf : f =O[atTop] fun x => x ^ (-a)\nhs : s < a\nd e : ℝ\nhe : ∀ (b : ℝ), b ≥ e → ‖f b‖ ≤ d * ‖b ^ (-a)‖\nhe' : 0 < max e 1\nthis : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi (max e 1)), ‖t ^ (s - 1) * f t‖ ≤ t ^ (s - 1 + -a) * d\n⊢ s - 1 + -a < -1\n[PROOFSTEP]\nlinarith\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\n⊢ ∃ c, 0 < c ∧ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioc 0 c)\n[PROOFSTEP]\nobtain ⟨d, hd, hd'⟩ := hf.exists_pos\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nhd' : IsBigOWith d (𝓝[Ioi 0] 0) f fun x => x ^ (-b)\n⊢ ∃ c, 0 < c ∧ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioc 0 c)\n[PROOFSTEP]\nsimp_rw [IsBigOWith, eventually_nhdsWithin_iff, Metric.eventually_nhds_iff, gt_iff_lt] at hd' \n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nhd' : ∃ ε, 0 < ε ∧ ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\n⊢ ∃ c, 0 < c ∧ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioc 0 c)\n[PROOFSTEP]\nobtain ⟨ε, hε, hε'⟩ := hd'\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\n⊢ ∃ c, 0 < c ∧ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioc 0 c)\n[PROOFSTEP]\nrefine' ⟨ε, hε, integrableOn_Ioc_iff_integrableOn_Ioo.mpr ⟨_, _⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\n⊢ AEStronglyMeasurable (fun t => t ^ (s - 1) * f t) (Measure.restrict volume (Ioo 0 ε))\n[PROOFSTEP]\nrefine' AEStronglyMeasurable.mul _ (hfc.mono_set Ioo_subset_Ioi_self)\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\n⊢ AEStronglyMeasurable (fun t => t ^ (s - 1)) (Measure.restrict volume (Ioo 0 ε))\n[PROOFSTEP]\nrefine' (ContinuousAt.continuousOn fun t ht => _).aestronglyMeasurable measurableSet_Ioo\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\nt : ℝ\nht : t ∈ Ioo 0 ε\n⊢ ContinuousAt (fun t => t ^ (s - 1)) t\n[PROOFSTEP]\nexact continuousAt_rpow_const _ _ (Or.inl ht.1.ne')\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\n⊢ HasFiniteIntegral fun t => t ^ (s - 1) * f t\n[PROOFSTEP]\napply HasFiniteIntegral.mono'\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.hg\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\n⊢ HasFiniteIntegral ?intro.intro.intro.intro.refine'_2.g\n[PROOFSTEP]\nshow HasFiniteIntegral (fun t => d * t ^ (s - b - 1)) _\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.hg\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\n⊢ HasFiniteIntegral fun t => d * t ^ (s - b - 1)\n[PROOFSTEP]\nrefine' (Integrable.hasFiniteIntegral _).const_mul _\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.hg\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\n⊢ Integrable fun t => t ^ (s - b - 1)\n[PROOFSTEP]\nrw [← IntegrableOn, ← integrableOn_Ioc_iff_integrableOn_Ioo, ← intervalIntegrable_iff_integrable_Ioc_of_le hε.le]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.hg\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\n⊢ IntervalIntegrable (fun t => t ^ (s - b - 1)) volume 0 ε\n[PROOFSTEP]\nexact intervalIntegral.intervalIntegrable_rpow' (by linarith)\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\n⊢ -1 < s - b - 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\n⊢ ∀ᵐ (a : ℝ) ∂Measure.restrict volume (Ioo 0 ε), ‖a ^ (s - 1) * f a‖ ≤ d * a ^ (s - b - 1)\n[PROOFSTEP]\nrefine' (ae_restrict_iff' measurableSet_Ioo).mpr (eventually_of_forall fun t ht => _)\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\nt : ℝ\nht : t ∈ Ioo 0 ε\n⊢ ‖t ^ (s - 1) * f t‖ ≤ d * t ^ (s - b - 1)\n[PROOFSTEP]\nrw [mul_comm, norm_mul]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\nt : ℝ\nht : t ∈ Ioo 0 ε\n⊢ ‖f t‖ * ‖t ^ (s - 1)‖ ≤ d * t ^ (s - b - 1)\n[PROOFSTEP]\nspecialize hε' _ ht.1\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\nt : ℝ\nht : t ∈ Ioo 0 ε\n⊢ dist t 0 < ε\n[PROOFSTEP]\nrw [dist_eq_norm, sub_zero, norm_of_nonneg (le_of_lt ht.1)]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nhε' : ∀ ⦃y : ℝ⦄, dist y 0 < ε → y ∈ Ioi 0 → ‖f y‖ ≤ d * ‖y ^ (-b)‖\nt : ℝ\nht : t ∈ Ioo 0 ε\n⊢ t < ε\n[PROOFSTEP]\nexact ht.2\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nt : ℝ\nht : t ∈ Ioo 0 ε\nhε' : ‖f t‖ ≤ d * ‖t ^ (-b)‖\n⊢ ‖f t‖ * ‖t ^ (s - 1)‖ ≤ d * t ^ (s - b - 1)\n[PROOFSTEP]\nrefine' (mul_le_mul_of_nonneg_right hε' (norm_nonneg _)).trans _\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nt : ℝ\nht : t ∈ Ioo 0 ε\nhε' : ‖f t‖ ≤ d * ‖t ^ (-b)‖\n⊢ d * ‖t ^ (-b)‖ * ‖t ^ (s - 1)‖ ≤ d * t ^ (s - b - 1)\n[PROOFSTEP]\nsimp_rw [norm_of_nonneg (rpow_nonneg_of_nonneg (le_of_lt ht.1) _), mul_assoc]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nt : ℝ\nht : t ∈ Ioo 0 ε\nhε' : ‖f t‖ ≤ d * ‖t ^ (-b)‖\n⊢ d * (t ^ (-b) * t ^ (s - 1)) ≤ d * t ^ (s - b - 1)\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left (le_of_eq _) hd.le\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nt : ℝ\nht : t ∈ Ioo 0 ε\nhε' : ‖f t‖ ≤ d * ‖t ^ (-b)‖\n⊢ t ^ (-b) * t ^ (s - 1) = t ^ (s - b - 1)\n[PROOFSTEP]\nrw [← rpow_add ht.1]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nt : ℝ\nht : t ∈ Ioo 0 ε\nhε' : ‖f t‖ ≤ d * ‖t ^ (-b)‖\n⊢ t ^ (-b + (s - 1)) = t ^ (s - b - 1)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.h.e_a\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nt : ℝ\nht : t ∈ Ioo 0 ε\nhε' : ‖f t‖ ≤ d * ‖t ^ (-b)‖\n⊢ -b + (s - 1) = s - b - 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.h.e_a\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nb : ℝ\nf : ℝ → ℝ\nhfc : AEStronglyMeasurable f (Measure.restrict volume (Ioi 0))\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\ns : ℝ\nhs : b < s\nd : ℝ\nhd : 0 < d\nε : ℝ\nhε : 0 < ε\nt : ℝ\nht : t ∈ Ioo 0 ε\nhε' : ‖f t‖ ≤ d * ‖t ^ (-b)‖\n⊢ -b + (s - 1) = s - b - 1\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na b : ℝ\nf : ℝ → ℝ\ns : ℝ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s\n⊢ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi 0)\n[PROOFSTEP]\nobtain ⟨c1, hc1, hc1'⟩ := mellin_convergent_top_of_isBigO hfc.aestronglyMeasurable hf_top hs_top\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na b : ℝ\nf : ℝ → ℝ\ns : ℝ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s\nc1 : ℝ\nhc1 : 0 < c1\nhc1' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c1)\n⊢ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi 0)\n[PROOFSTEP]\nobtain ⟨c2, hc2, hc2'⟩ := mellin_convergent_zero_of_isBigO hfc.aestronglyMeasurable hf_bot hs_bot\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na b : ℝ\nf : ℝ → ℝ\ns : ℝ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s\nc1 : ℝ\nhc1 : 0 < c1\nhc1' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c1)\nc2 : ℝ\nhc2 : 0 < c2\nhc2' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioc 0 c2)\n⊢ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi 0)\n[PROOFSTEP]\nhave : Ioi 0 = Ioc 0 c2 ∪ Ioc c2 c1 ∪ Ioi c1 := by\n  rw [union_assoc, Ioc_union_Ioi (le_max_right _ _), Ioc_union_Ioi ((min_le_left _ _).trans (le_max_right _ _)),\n    min_eq_left (lt_min hc2 hc1).le]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na b : ℝ\nf : ℝ → ℝ\ns : ℝ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s\nc1 : ℝ\nhc1 : 0 < c1\nhc1' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c1)\nc2 : ℝ\nhc2 : 0 < c2\nhc2' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioc 0 c2)\n⊢ Ioi 0 = Ioc 0 c2 ∪ Ioc c2 c1 ∪ Ioi c1\n[PROOFSTEP]\nrw [union_assoc, Ioc_union_Ioi (le_max_right _ _), Ioc_union_Ioi ((min_le_left _ _).trans (le_max_right _ _)),\n  min_eq_left (lt_min hc2 hc1).le]\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na b : ℝ\nf : ℝ → ℝ\ns : ℝ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s\nc1 : ℝ\nhc1 : 0 < c1\nhc1' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c1)\nc2 : ℝ\nhc2 : 0 < c2\nhc2' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioc 0 c2)\nthis : Ioi 0 = Ioc 0 c2 ∪ Ioc c2 c1 ∪ Ioi c1\n⊢ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi 0)\n[PROOFSTEP]\nrw [this, integrableOn_union, integrableOn_union]\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na b : ℝ\nf : ℝ → ℝ\ns : ℝ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s\nc1 : ℝ\nhc1 : 0 < c1\nhc1' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c1)\nc2 : ℝ\nhc2 : 0 < c2\nhc2' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioc 0 c2)\nthis : Ioi 0 = Ioc 0 c2 ∪ Ioc c2 c1 ∪ Ioi c1\n⊢ (IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioc 0 c2) ∧ IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioc c2 c1)) ∧\n    IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c1)\n[PROOFSTEP]\nrefine' ⟨⟨hc2', integrableOn_Icc_iff_integrableOn_Ioc.mp _⟩, hc1'⟩\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na b : ℝ\nf : ℝ → ℝ\ns : ℝ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s\nc1 : ℝ\nhc1 : 0 < c1\nhc1' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c1)\nc2 : ℝ\nhc2 : 0 < c2\nhc2' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioc 0 c2)\nthis : Ioi 0 = Ioc 0 c2 ∪ Ioc c2 c1 ∪ Ioi c1\n⊢ IntegrableOn (fun t => t ^ (s - 1) * f t) (Icc c2 c1)\n[PROOFSTEP]\nrefine'\n  (hfc.continuousOn_mul _ isOpen_Ioi).integrableOn_compact_subset (fun t ht => (hc2.trans_le ht.1 : 0 < t))\n    isCompact_Icc\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na b : ℝ\nf : ℝ → ℝ\ns : ℝ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s\nc1 : ℝ\nhc1 : 0 < c1\nhc1' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioi c1)\nc2 : ℝ\nhc2 : 0 < c2\nhc2' : IntegrableOn (fun t => t ^ (s - 1) * f t) (Ioc 0 c2)\nthis : Ioi 0 = Ioc 0 c2 ∪ Ioc c2 c1 ∪ Ioi c1\n⊢ ContinuousOn (fun t => t ^ (s - 1)) (Ioi 0)\n[PROOFSTEP]\nexact ContinuousAt.continuousOn fun t ht => continuousAt_rpow_const _ _ <| Or.inl <| ne_of_gt ht\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\n⊢ MellinConvergent f s\n[PROOFSTEP]\nrw [MellinConvergent, mellin_convergent_iff_norm Subset.rfl measurableSet_Ioi hfc.aestronglyMeasurable]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\n⊢ IntegrableOn (fun t => t ^ (s.re - 1) * ‖f t‖) (Ioi 0)\n[PROOFSTEP]\nexact mellin_convergent_of_isBigO_scalar hfc.norm hf_top.norm_left hs_top hf_bot.norm_left hs_bot\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : b < a\nhf : f =O[atTop] fun x => x ^ (-a)\n⊢ (fun t => log t • f t) =O[atTop] fun x => x ^ (-b)\n[PROOFSTEP]\nrefine'\n  ((isLittleO_log_rpow_atTop (sub_pos.mpr hab)).isBigO.smul hf).congr' (eventually_of_forall fun t => by rfl)\n    ((eventually_gt_atTop 0).mp (eventually_of_forall fun t ht => _))\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : b < a\nhf : f =O[atTop] fun x => x ^ (-a)\nt : ℝ\n⊢ (fun x => log x • f x) t = (fun t => log t • f t) t\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : b < a\nhf : f =O[atTop] fun x => x ^ (-a)\nt : ℝ\nht : 0 < t\n⊢ (fun x => x ^ (a - b) • x ^ (-a)) t = (fun x => x ^ (-b)) t\n[PROOFSTEP]\nsimp only\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : b < a\nhf : f =O[atTop] fun x => x ^ (-a)\nt : ℝ\nht : 0 < t\n⊢ t ^ (a - b) • t ^ (-a) = t ^ (-b)\n[PROOFSTEP]\nrw [smul_eq_mul, ← rpow_add ht, ← sub_eq_add_neg, sub_eq_add_neg a, add_sub_cancel']\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : a < b\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-a)\n⊢ (fun t => log t • f t) =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\n[PROOFSTEP]\nhave : log =o[𝓝[>] 0] fun t : ℝ => t ^ (a - b) :=\n  by\n  refine'\n    ((isLittleO_log_rpow_atTop (sub_pos.mpr hab)).neg_left.comp_tendsto tendsto_inv_zero_atTop).congr'\n      (eventually_nhdsWithin_iff.mpr <| eventually_of_forall fun t ht => _)\n      (eventually_nhdsWithin_iff.mpr <| eventually_of_forall fun t ht => _)\n  · simp_rw [Function.comp_apply, ← one_div, log_div one_ne_zero (ne_of_gt ht), Real.log_one, zero_sub, neg_neg]\n  · simp_rw [Function.comp_apply, inv_rpow (le_of_lt ht), ← rpow_neg (le_of_lt ht), neg_sub]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : a < b\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-a)\n⊢ log =o[𝓝[Ioi 0] 0] fun t => t ^ (a - b)\n[PROOFSTEP]\nrefine'\n  ((isLittleO_log_rpow_atTop (sub_pos.mpr hab)).neg_left.comp_tendsto tendsto_inv_zero_atTop).congr'\n    (eventually_nhdsWithin_iff.mpr <| eventually_of_forall fun t ht => _)\n    (eventually_nhdsWithin_iff.mpr <| eventually_of_forall fun t ht => _)\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : a < b\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-a)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ((fun x => -log x) ∘ fun x => x⁻¹) t = log t\n[PROOFSTEP]\nsimp_rw [Function.comp_apply, ← one_div, log_div one_ne_zero (ne_of_gt ht), Real.log_one, zero_sub, neg_neg]\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : a < b\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-a)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ((fun x => x ^ (b - a)) ∘ fun x => x⁻¹) t = (fun t => t ^ (a - b)) t\n[PROOFSTEP]\nsimp_rw [Function.comp_apply, inv_rpow (le_of_lt ht), ← rpow_neg (le_of_lt ht), neg_sub]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : a < b\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-a)\nthis : log =o[𝓝[Ioi 0] 0] fun t => t ^ (a - b)\n⊢ (fun t => log t • f t) =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\n[PROOFSTEP]\nrefine'\n  (this.isBigO.smul hf).congr' (eventually_of_forall fun t => by rfl)\n    (eventually_nhdsWithin_iff.mpr (eventually_of_forall fun t ht => _))\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : a < b\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-a)\nthis : log =o[𝓝[Ioi 0] 0] fun t => t ^ (a - b)\nt : ℝ\n⊢ (fun x => log x • f x) t = (fun t => log t • f t) t\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : a < b\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-a)\nthis : log =o[𝓝[Ioi 0] 0] fun t => t ^ (a - b)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ (fun x => x ^ (a - b) • x ^ (-a)) t = (fun x => x ^ (-b)) t\n[PROOFSTEP]\nsimp_rw [smul_eq_mul, ← rpow_add ht]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : a < b\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-a)\nthis : log =o[𝓝[Ioi 0] 0] fun t => t ^ (a - b)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ t ^ (a - b + -a) = t ^ (-b)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : a < b\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-a)\nthis : log =o[𝓝[Ioi 0] 0] fun t => t ^ (a - b)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ a - b + -a = -b\n[PROOFSTEP]\nabel\n[GOAL]\ncase e_a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf : ℝ → E\nhab : a < b\nhf : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-a)\nthis : log =o[𝓝[Ioi 0] 0] fun t => t ^ (a - b)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ a - b + -a = -b\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\n⊢ MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s\n[PROOFSTEP]\nset F : ℂ → ℝ → E := fun (z : ℂ) (t : ℝ) => (t : ℂ) ^ (z - 1) • f t\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\n⊢ MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s\n[PROOFSTEP]\nset F' : ℂ → ℝ → E := fun (z : ℂ) (t : ℝ) => ((t : ℂ) ^ (z - 1) * log t) • f t\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\n⊢ MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s\n[PROOFSTEP]\nobtain ⟨v, hv0, hv1, hv2⟩ : ∃ v : ℝ, 0 < v ∧ v < s.re - b ∧ v < a - s.re :=\n  by\n  obtain ⟨w, hw1, hw2⟩ := exists_between (sub_pos.mpr hs_top)\n  obtain ⟨w', hw1', hw2'⟩ := exists_between (sub_pos.mpr hs_bot)\n  exact ⟨min w w', lt_min hw1 hw1', (min_le_right _ _).trans_lt hw2', (min_le_left _ _).trans_lt hw2⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\n⊢ ∃ v, 0 < v ∧ v < s.re - b ∧ v < a - s.re\n[PROOFSTEP]\nobtain ⟨w, hw1, hw2⟩ := exists_between (sub_pos.mpr hs_top)\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nw : ℝ\nhw1 : 0 < w\nhw2 : w < a - s.re\n⊢ ∃ v, 0 < v ∧ v < s.re - b ∧ v < a - s.re\n[PROOFSTEP]\nobtain ⟨w', hw1', hw2'⟩ := exists_between (sub_pos.mpr hs_bot)\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nw : ℝ\nhw1 : 0 < w\nhw2 : w < a - s.re\nw' : ℝ\nhw1' : 0 < w'\nhw2' : w' < s.re - b\n⊢ ∃ v, 0 < v ∧ v < s.re - b ∧ v < a - s.re\n[PROOFSTEP]\nexact ⟨min w w', lt_min hw1 hw1', (min_le_right _ _).trans_lt hw2', (min_le_left _ _).trans_lt hw2⟩\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\n⊢ MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s\n[PROOFSTEP]\nlet bound : ℝ → ℝ := fun t : ℝ => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\n⊢ MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s\n[PROOFSTEP]\nhave h1 : ∀ᶠ z : ℂ in 𝓝 s, AEStronglyMeasurable (F z) (volume.restrict <| Ioi 0) :=\n  by\n  refine' eventually_of_forall fun z => AEStronglyMeasurable.smul _ hfc.aestronglyMeasurable\n  refine' ContinuousOn.aestronglyMeasurable _ measurableSet_Ioi\n  refine' ContinuousAt.continuousOn fun t ht => _\n  exact continuousAt_ofReal_cpow_const _ _ (Or.inr <| ne_of_gt ht)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\n⊢ ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\n[PROOFSTEP]\nrefine' eventually_of_forall fun z => AEStronglyMeasurable.smul _ hfc.aestronglyMeasurable\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nz : ℂ\n⊢ AEStronglyMeasurable (fun t => ↑t ^ (z - 1)) (Measure.restrict volume (Ioi 0))\n[PROOFSTEP]\nrefine' ContinuousOn.aestronglyMeasurable _ measurableSet_Ioi\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nz : ℂ\n⊢ ContinuousOn (fun t => ↑t ^ (z - 1)) (Ioi 0)\n[PROOFSTEP]\nrefine' ContinuousAt.continuousOn fun t ht => _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nz : ℂ\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ContinuousAt (fun t => ↑t ^ (z - 1)) t\n[PROOFSTEP]\nexact continuousAt_ofReal_cpow_const _ _ (Or.inr <| ne_of_gt ht)\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\n⊢ MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s\n[PROOFSTEP]\nhave h2 : IntegrableOn (F s) (Ioi (0 : ℝ))\n[GOAL]\ncase h2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\n⊢ IntegrableOn (F s) (Ioi 0)\n[PROOFSTEP]\nexact mellinConvergent_of_isBigO_rpow hfc hf_top hs_top hf_bot hs_bot\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\n⊢ MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s\n[PROOFSTEP]\nhave h3 : AEStronglyMeasurable (F' s) (volume.restrict <| Ioi 0) :=\n  by\n  apply LocallyIntegrableOn.aestronglyMeasurable\n  refine' hfc.continuousOn_smul isOpen_Ioi ((ContinuousAt.continuousOn fun t ht => _).mul _)\n  · exact continuousAt_ofReal_cpow_const _ _ (Or.inr <| ne_of_gt ht)\n  · refine' continuous_ofReal.comp_continuousOn _\n    exact continuousOn_log.mono (subset_compl_singleton_iff.mpr not_mem_Ioi_self)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\n⊢ AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\n[PROOFSTEP]\napply LocallyIntegrableOn.aestronglyMeasurable\n[GOAL]\ncase hf\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\n⊢ LocallyIntegrableOn (F' s) (Ioi 0)\n[PROOFSTEP]\nrefine' hfc.continuousOn_smul isOpen_Ioi ((ContinuousAt.continuousOn fun t ht => _).mul _)\n[GOAL]\ncase hf.refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ContinuousAt (fun t => ↑t ^ (s - 1)) t\n[PROOFSTEP]\nexact continuousAt_ofReal_cpow_const _ _ (Or.inr <| ne_of_gt ht)\n[GOAL]\ncase hf.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\n⊢ ContinuousOn (fun t => ↑(log t)) (Ioi 0)\n[PROOFSTEP]\nrefine' continuous_ofReal.comp_continuousOn _\n[GOAL]\ncase hf.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\n⊢ ContinuousOn (fun t => log t) (Ioi 0)\n[PROOFSTEP]\nexact continuousOn_log.mono (subset_compl_singleton_iff.mpr not_mem_Ioi_self)\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\n⊢ MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s\n[PROOFSTEP]\nhave h4 : ∀ᵐ t : ℝ ∂volume.restrict (Ioi 0), ∀ z : ℂ, z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t :=\n  by\n  refine' (ae_restrict_mem measurableSet_Ioi).mono fun t ht z hz => _\n  simp_rw [norm_smul, norm_mul, Complex.norm_eq_abs (log _), Complex.abs_ofReal, mul_assoc]\n  refine' mul_le_mul_of_nonneg_right _ (mul_nonneg (abs_nonneg _) (norm_nonneg _))\n  rw [Complex.norm_eq_abs, abs_cpow_eq_rpow_re_of_pos ht]\n  rcases le_or_lt 1 t with h | h\n  · refine' le_add_of_le_of_nonneg (rpow_le_rpow_of_exponent_le h _) (rpow_nonneg_of_nonneg (zero_le_one.trans h) _)\n    rw [sub_re, one_re, sub_le_sub_iff_right]\n    rw [mem_ball_iff_norm, Complex.norm_eq_abs] at hz \n    have hz' := (re_le_abs _).trans hz.le\n    rwa [sub_re, sub_le_iff_le_add'] at hz' \n  · refine' le_add_of_nonneg_of_le (rpow_pos_of_pos ht _).le (rpow_le_rpow_of_exponent_ge ht h.le _)\n    rw [sub_re, one_re, sub_le_iff_le_add, sub_add_cancel]\n    rw [mem_ball_iff_norm', Complex.norm_eq_abs] at hz \n    have hz' := (re_le_abs _).trans hz.le\n    rwa [sub_re, sub_le_iff_le_add, ← sub_le_iff_le_add'] at hz' \n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\n⊢ ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\n[PROOFSTEP]\nrefine' (ae_restrict_mem measurableSet_Ioi).mono fun t ht z hz => _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : z ∈ Metric.ball s v\n⊢ ‖F' z t‖ ≤ bound t\n[PROOFSTEP]\nsimp_rw [norm_smul, norm_mul, Complex.norm_eq_abs (log _), Complex.abs_ofReal, mul_assoc]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : z ∈ Metric.ball s v\n⊢ ‖↑t ^ (z - 1)‖ * (|log t| * ‖f t‖) ≤ (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * (|log t| * ‖f t‖)\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_right _ (mul_nonneg (abs_nonneg _) (norm_nonneg _))\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : z ∈ Metric.ball s v\n⊢ ‖↑t ^ (z - 1)‖ ≤ t ^ (s.re + v - 1) + t ^ (s.re - v - 1)\n[PROOFSTEP]\nrw [Complex.norm_eq_abs, abs_cpow_eq_rpow_re_of_pos ht]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : z ∈ Metric.ball s v\n⊢ t ^ (z - 1).re ≤ t ^ (s.re + v - 1) + t ^ (s.re - v - 1)\n[PROOFSTEP]\nrcases le_or_lt 1 t with h | h\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : z ∈ Metric.ball s v\nh : 1 ≤ t\n⊢ t ^ (z - 1).re ≤ t ^ (s.re + v - 1) + t ^ (s.re - v - 1)\n[PROOFSTEP]\nrefine' le_add_of_le_of_nonneg (rpow_le_rpow_of_exponent_le h _) (rpow_nonneg_of_nonneg (zero_le_one.trans h) _)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : z ∈ Metric.ball s v\nh : 1 ≤ t\n⊢ (z - 1).re ≤ s.re + v - 1\n[PROOFSTEP]\nrw [sub_re, one_re, sub_le_sub_iff_right]\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : z ∈ Metric.ball s v\nh : 1 ≤ t\n⊢ z.re ≤ s.re + v\n[PROOFSTEP]\nrw [mem_ball_iff_norm, Complex.norm_eq_abs] at hz \n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : ↑Complex.abs (z - s) < v\nh : 1 ≤ t\n⊢ z.re ≤ s.re + v\n[PROOFSTEP]\nhave hz' := (re_le_abs _).trans hz.le\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : ↑Complex.abs (z - s) < v\nh : 1 ≤ t\nhz' : (z - s).re ≤ v\n⊢ z.re ≤ s.re + v\n[PROOFSTEP]\nrwa [sub_re, sub_le_iff_le_add'] at hz' \n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : z ∈ Metric.ball s v\nh : t < 1\n⊢ t ^ (z - 1).re ≤ t ^ (s.re + v - 1) + t ^ (s.re - v - 1)\n[PROOFSTEP]\nrefine' le_add_of_nonneg_of_le (rpow_pos_of_pos ht _).le (rpow_le_rpow_of_exponent_ge ht h.le _)\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : z ∈ Metric.ball s v\nh : t < 1\n⊢ s.re - v - 1 ≤ (z - 1).re\n[PROOFSTEP]\nrw [sub_re, one_re, sub_le_iff_le_add, sub_add_cancel]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : z ∈ Metric.ball s v\nh : t < 1\n⊢ s.re - v ≤ z.re\n[PROOFSTEP]\nrw [mem_ball_iff_norm', Complex.norm_eq_abs] at hz \n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : ↑Complex.abs (s - z) < v\nh : t < 1\n⊢ s.re - v ≤ z.re\n[PROOFSTEP]\nhave hz' := (re_le_abs _).trans hz.le\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nt : ℝ\nht : t ∈ Ioi 0\nz : ℂ\nhz : ↑Complex.abs (s - z) < v\nh : t < 1\nhz' : (s - z).re ≤ v\n⊢ s.re - v ≤ z.re\n[PROOFSTEP]\nrwa [sub_re, sub_le_iff_le_add, ← sub_le_iff_le_add'] at hz' \n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\n⊢ MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s\n[PROOFSTEP]\nhave h5 : IntegrableOn bound (Ioi 0) := by\n  simp_rw [add_mul, mul_assoc]\n  suffices\n    ∀ {j : ℝ} (hj : b < j) (hj' : j < a), IntegrableOn (fun t : ℝ => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0) volume\n    by\n    refine' Integrable.add (this _ _) (this _ _)\n    all_goals linarith\n  · intro j hj hj'\n    obtain ⟨w, hw1, hw2⟩ := exists_between hj\n    obtain ⟨w', hw1', hw2'⟩ := exists_between hj'\n    refine' mellin_convergent_of_isBigO_scalar _ _ hw1' _ hw2\n    · simp_rw [mul_comm]\n      refine' hfc.norm.mul_continuousOn _ isOpen_Ioi\n      refine' Continuous.comp_continuousOn continuous_abs (continuousOn_log.mono _)\n      exact subset_compl_singleton_iff.mpr not_mem_Ioi_self\n    · refine (isBigO_rpow_top_log_smul hw2' hf_top).norm_left.congr_left fun t ↦ ?_\n      simp only [norm_smul, Real.norm_eq_abs]\n    · refine (isBigO_rpow_zero_log_smul hw1 hf_bot).norm_left.congr_left fun t ↦ ?_\n      simp only [norm_smul, Real.norm_eq_abs]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\n⊢ IntegrableOn bound (Ioi 0)\n[PROOFSTEP]\nsimp_rw [add_mul, mul_assoc]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\n⊢ IntegrableOn (fun t => t ^ (s.re + v - 1) * (|log t| * ‖f t‖) + t ^ (s.re - v - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n[PROOFSTEP]\nsuffices\n  ∀ {j : ℝ} (hj : b < j) (hj' : j < a), IntegrableOn (fun t : ℝ => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0) volume\n  by\n  refine' Integrable.add (this _ _) (this _ _)\n  all_goals linarith\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nthis : ∀ {j : ℝ}, b < j → j < a → IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n⊢ IntegrableOn (fun t => t ^ (s.re + v - 1) * (|log t| * ‖f t‖) + t ^ (s.re - v - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n[PROOFSTEP]\nrefine' Integrable.add (this _ _) (this _ _)\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nthis : ∀ {j : ℝ}, b < j → j < a → IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n⊢ b < s.re + v\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nthis : ∀ {j : ℝ}, b < j → j < a → IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n⊢ s.re + v < a\ncase refine'_3\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nthis : ∀ {j : ℝ}, b < j → j < a → IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n⊢ b < s.re - v\ncase refine'_4\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nthis : ∀ {j : ℝ}, b < j → j < a → IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n⊢ s.re - v < a\n[PROOFSTEP]\nall_goals linarith\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nthis : ∀ {j : ℝ}, b < j → j < a → IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n⊢ b < s.re + v\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nthis : ∀ {j : ℝ}, b < j → j < a → IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n⊢ s.re + v < a\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_3\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nthis : ∀ {j : ℝ}, b < j → j < a → IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n⊢ b < s.re - v\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_4\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nthis : ∀ {j : ℝ}, b < j → j < a → IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n⊢ s.re - v < a\n[PROOFSTEP]\nlinarith\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\n⊢ ∀ {j : ℝ}, b < j → j < a → IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n[PROOFSTEP]\nintro j hj hj'\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nj : ℝ\nhj : b < j\nhj' : j < a\n⊢ IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n[PROOFSTEP]\nobtain ⟨w, hw1, hw2⟩ := exists_between hj\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nj : ℝ\nhj : b < j\nhj' : j < a\nw : ℝ\nhw1 : b < w\nhw2 : w < j\n⊢ IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n[PROOFSTEP]\nobtain ⟨w', hw1', hw2'⟩ := exists_between hj'\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nj : ℝ\nhj : b < j\nhj' : j < a\nw : ℝ\nhw1 : b < w\nhw2 : w < j\nw' : ℝ\nhw1' : j < w'\nhw2' : w' < a\n⊢ IntegrableOn (fun t => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0)\n[PROOFSTEP]\nrefine' mellin_convergent_of_isBigO_scalar _ _ hw1' _ hw2\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nj : ℝ\nhj : b < j\nhj' : j < a\nw : ℝ\nhw1 : b < w\nhw2 : w < j\nw' : ℝ\nhw1' : j < w'\nhw2' : w' < a\n⊢ LocallyIntegrableOn (fun t => |log t| * ‖f t‖) (Ioi 0)\n[PROOFSTEP]\nsimp_rw [mul_comm]\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nj : ℝ\nhj : b < j\nhj' : j < a\nw : ℝ\nhw1 : b < w\nhw2 : w < j\nw' : ℝ\nhw1' : j < w'\nhw2' : w' < a\n⊢ LocallyIntegrableOn (fun t => ‖f t‖ * |log t|) (Ioi 0)\n[PROOFSTEP]\nrefine' hfc.norm.mul_continuousOn _ isOpen_Ioi\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nj : ℝ\nhj : b < j\nhj' : j < a\nw : ℝ\nhw1 : b < w\nhw2 : w < j\nw' : ℝ\nhw1' : j < w'\nhw2' : w' < a\n⊢ ContinuousOn (fun t => |log t|) (Ioi 0)\n[PROOFSTEP]\nrefine' Continuous.comp_continuousOn continuous_abs (continuousOn_log.mono _)\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nj : ℝ\nhj : b < j\nhj' : j < a\nw : ℝ\nhw1 : b < w\nhw2 : w < j\nw' : ℝ\nhw1' : j < w'\nhw2' : w' < a\n⊢ Ioi 0 ⊆ {0}ᶜ\n[PROOFSTEP]\nexact subset_compl_singleton_iff.mpr not_mem_Ioi_self\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nj : ℝ\nhj : b < j\nhj' : j < a\nw : ℝ\nhw1 : b < w\nhw2 : w < j\nw' : ℝ\nhw1' : j < w'\nhw2' : w' < a\n⊢ (fun t => |log t| * ‖f t‖) =O[atTop] fun x => x ^ (-w')\n[PROOFSTEP]\nrefine (isBigO_rpow_top_log_smul hw2' hf_top).norm_left.congr_left fun t ↦ ?_\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nj : ℝ\nhj : b < j\nhj' : j < a\nw : ℝ\nhw1 : b < w\nhw2 : w < j\nw' : ℝ\nhw1' : j < w'\nhw2' : w' < a\nt : ℝ\n⊢ ‖log t • f t‖ = |log t| * ‖f t‖\n[PROOFSTEP]\nsimp only [norm_smul, Real.norm_eq_abs]\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nj : ℝ\nhj : b < j\nhj' : j < a\nw : ℝ\nhw1 : b < w\nhw2 : w < j\nw' : ℝ\nhw1' : j < w'\nhw2' : w' < a\n⊢ (fun t => |log t| * ‖f t‖) =O[𝓝[Ioi 0] 0] fun x => x ^ (-w)\n[PROOFSTEP]\nrefine (isBigO_rpow_zero_log_smul hw1 hf_bot).norm_left.congr_left fun t ↦ ?_\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nj : ℝ\nhj : b < j\nhj' : j < a\nw : ℝ\nhw1 : b < w\nhw2 : w < j\nw' : ℝ\nhw1' : j < w'\nhw2' : w' < a\nt : ℝ\n⊢ ‖log t • f t‖ = |log t| * ‖f t‖\n[PROOFSTEP]\nsimp only [norm_smul, Real.norm_eq_abs]\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nh5 : IntegrableOn bound (Ioi 0)\n⊢ MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s\n[PROOFSTEP]\nhave h6 :\n  ∀ᵐ t : ℝ ∂volume.restrict (Ioi 0), ∀ y : ℂ, y ∈ Metric.ball s v → HasDerivAt (fun z : ℂ => F z t) (F' y t) y :=\n  by\n  refine' (ae_restrict_mem measurableSet_Ioi).mono fun t ht y _ => _\n  have ht' : (t : ℂ) ≠ 0 := ofReal_ne_zero.mpr (ne_of_gt ht)\n  have u1 : HasDerivAt (fun z : ℂ => (t : ℂ) ^ (z - 1)) (t ^ (y - 1) * log t) y :=\n    by\n    convert ((hasDerivAt_id' y).sub_const 1).const_cpow (Or.inl ht') using 1\n    rw [ofReal_log (le_of_lt ht)]\n    ring\n  exact u1.smul_const (f t)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nh5 : IntegrableOn bound (Ioi 0)\n⊢ ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (y : ℂ), y ∈ Metric.ball s v → HasDerivAt (fun z => F z t) (F' y t) y\n[PROOFSTEP]\nrefine' (ae_restrict_mem measurableSet_Ioi).mono fun t ht y _ => _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nh5 : IntegrableOn bound (Ioi 0)\nt : ℝ\nht : t ∈ Ioi 0\ny : ℂ\nx✝ : y ∈ Metric.ball s v\n⊢ HasDerivAt (fun z => F z t) (F' y t) y\n[PROOFSTEP]\nhave ht' : (t : ℂ) ≠ 0 := ofReal_ne_zero.mpr (ne_of_gt ht)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nh5 : IntegrableOn bound (Ioi 0)\nt : ℝ\nht : t ∈ Ioi 0\ny : ℂ\nx✝ : y ∈ Metric.ball s v\nht' : ↑t ≠ 0\n⊢ HasDerivAt (fun z => F z t) (F' y t) y\n[PROOFSTEP]\nhave u1 : HasDerivAt (fun z : ℂ => (t : ℂ) ^ (z - 1)) (t ^ (y - 1) * log t) y :=\n  by\n  convert ((hasDerivAt_id' y).sub_const 1).const_cpow (Or.inl ht') using 1\n  rw [ofReal_log (le_of_lt ht)]\n  ring\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nh5 : IntegrableOn bound (Ioi 0)\nt : ℝ\nht : t ∈ Ioi 0\ny : ℂ\nx✝ : y ∈ Metric.ball s v\nht' : ↑t ≠ 0\n⊢ HasDerivAt (fun z => ↑t ^ (z - 1)) (↑t ^ (y - 1) * ↑(log t)) y\n[PROOFSTEP]\nconvert ((hasDerivAt_id' y).sub_const 1).const_cpow (Or.inl ht') using 1\n[GOAL]\ncase h.e'_7\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nh5 : IntegrableOn bound (Ioi 0)\nt : ℝ\nht : t ∈ Ioi 0\ny : ℂ\nx✝ : y ∈ Metric.ball s v\nht' : ↑t ≠ 0\n⊢ ↑t ^ (y - 1) * ↑(log t) = ↑t ^ (y - 1) * Complex.log ↑t * 1\n[PROOFSTEP]\nrw [ofReal_log (le_of_lt ht)]\n[GOAL]\ncase h.e'_7\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nh5 : IntegrableOn bound (Ioi 0)\nt : ℝ\nht : t ∈ Ioi 0\ny : ℂ\nx✝ : y ∈ Metric.ball s v\nht' : ↑t ≠ 0\n⊢ ↑t ^ (y - 1) * Complex.log ↑t = ↑t ^ (y - 1) * Complex.log ↑t * 1\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nh5 : IntegrableOn bound (Ioi 0)\nt : ℝ\nht : t ∈ Ioi 0\ny : ℂ\nx✝ : y ∈ Metric.ball s v\nht' : ↑t ≠ 0\nu1 : HasDerivAt (fun z => ↑t ^ (z - 1)) (↑t ^ (y - 1) * ↑(log t)) y\n⊢ HasDerivAt (fun z => F z t) (F' y t) y\n[PROOFSTEP]\nexact u1.smul_const (f t)\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nh5 : IntegrableOn bound (Ioi 0)\nh6 :\n  ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (y : ℂ), y ∈ Metric.ball s v → HasDerivAt (fun z => F z t) (F' y t) y\n⊢ MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s\n[PROOFSTEP]\nhave main := hasDerivAt_integral_of_dominated_loc_of_deriv_le hv0 h1 h2 h3 h4 h5 h6\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℂ E\na b : ℝ\nf : ℝ → E\ns : ℂ\nhfc : LocallyIntegrableOn f (Ioi 0)\nhf_top : f =O[atTop] fun x => x ^ (-a)\nhs_top : s.re < a\nhf_bot : f =O[𝓝[Ioi 0] 0] fun x => x ^ (-b)\nhs_bot : b < s.re\nF : ℂ → ℝ → E := fun z t => ↑t ^ (z - 1) • f t\nF' : ℂ → ℝ → E := fun z t => (↑t ^ (z - 1) * ↑(log t)) • f t\nv : ℝ\nhv0 : 0 < v\nhv1 : v < s.re - b\nhv2 : v < a - s.re\nbound : ℝ → ℝ := fun t => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖\nh1 : ∀ᶠ (z : ℂ) in 𝓝 s, AEStronglyMeasurable (F z) (Measure.restrict volume (Ioi 0))\nh2 : IntegrableOn (F s) (Ioi 0)\nh3 : AEStronglyMeasurable (F' s) (Measure.restrict volume (Ioi 0))\nh4 : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (z : ℂ), z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t\nh5 : IntegrableOn bound (Ioi 0)\nh6 :\n  ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ∀ (y : ℂ), y ∈ Metric.ball s v → HasDerivAt (fun z => F z t) (F' y t) y\nmain : Integrable (F' s) ∧ HasDerivAt (fun n => ∫ (a : ℝ) in Ioi 0, F n a) (∫ (a : ℝ) in Ioi 0, F' s a) s\n⊢ MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s\n[PROOFSTEP]\nsimpa only [mul_smul] using main\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\ns : ℂ\nhs : 0 < s.re\n⊢ HasMellin (indicator (Ioc 0 1) fun x => 1) s (1 / s)\n[PROOFSTEP]\nhave aux1 : -1 < (s - 1).re := by simpa only [sub_re, one_re, sub_eq_add_neg] using lt_add_of_pos_left _ hs\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\ns : ℂ\nhs : 0 < s.re\n⊢ -1 < (s - 1).re\n[PROOFSTEP]\nsimpa only [sub_re, one_re, sub_eq_add_neg] using lt_add_of_pos_left _ hs\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\ns : ℂ\nhs : 0 < s.re\naux1 : -1 < (s - 1).re\n⊢ HasMellin (indicator (Ioc 0 1) fun x => 1) s (1 / s)\n[PROOFSTEP]\nhave aux2 : s ≠ 0 := by contrapose! hs; rw [hs, zero_re]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\ns : ℂ\nhs : 0 < s.re\naux1 : -1 < (s - 1).re\n⊢ s ≠ 0\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\ns : ℂ\naux1 : -1 < (s - 1).re\nhs : s = 0\n⊢ s.re ≤ 0\n[PROOFSTEP]\nrw [hs, zero_re]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\ns : ℂ\nhs : 0 < s.re\naux1 : -1 < (s - 1).re\naux2 : s ≠ 0\n⊢ HasMellin (indicator (Ioc 0 1) fun x => 1) s (1 / s)\n[PROOFSTEP]\nhave aux3 : MeasurableSet (Ioc (0 : ℝ) 1) := measurableSet_Ioc\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\ns : ℂ\nhs : 0 < s.re\naux1 : -1 < (s - 1).re\naux2 : s ≠ 0\naux3 : MeasurableSet (Ioc 0 1)\n⊢ HasMellin (indicator (Ioc 0 1) fun x => 1) s (1 / s)\n[PROOFSTEP]\nsimp_rw [HasMellin, mellin, MellinConvergent, ← indicator_smul, IntegrableOn, integrable_indicator_iff aux3,\n  smul_eq_mul, integral_indicator aux3, mul_one, IntegrableOn, Measure.restrict_restrict_of_subset Ioc_subset_Ioi_self]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\ns : ℂ\nhs : 0 < s.re\naux1 : -1 < (s - 1).re\naux2 : s ≠ 0\naux3 : MeasurableSet (Ioc 0 1)\n⊢ (Integrable fun x => ↑x ^ (s - 1)) ∧ ∫ (x : ℝ) in Ioc 0 1, ↑x ^ (s - 1) = 1 / s\n[PROOFSTEP]\nrw [← IntegrableOn, ← intervalIntegrable_iff_integrable_Ioc_of_le zero_le_one]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\ns : ℂ\nhs : 0 < s.re\naux1 : -1 < (s - 1).re\naux2 : s ≠ 0\naux3 : MeasurableSet (Ioc 0 1)\n⊢ IntervalIntegrable (fun x => ↑x ^ (s - 1)) volume 0 1 ∧ ∫ (x : ℝ) in Ioc 0 1, ↑x ^ (s - 1) = 1 / s\n[PROOFSTEP]\nrefine' ⟨intervalIntegral.intervalIntegrable_cpow' aux1, _⟩\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\ns : ℂ\nhs : 0 < s.re\naux1 : -1 < (s - 1).re\naux2 : s ≠ 0\naux3 : MeasurableSet (Ioc 0 1)\n⊢ ∫ (x : ℝ) in Ioc 0 1, ↑x ^ (s - 1) = 1 / s\n[PROOFSTEP]\nrw [← intervalIntegral.integral_of_le zero_le_one, integral_cpow (Or.inl aux1), sub_add_cancel, ofReal_zero, ofReal_one,\n  one_cpow, zero_cpow aux2, sub_zero]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na s : ℂ\nhs : 0 < s.re + a.re\n⊢ HasMellin (indicator (Ioc 0 1) fun t => ↑t ^ a) s (1 / (s + a))\n[PROOFSTEP]\nhave := hasMellin_one_Ioc (by rwa [add_re] : 0 < (s + a).re)\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na s : ℂ\nhs : 0 < s.re + a.re\n⊢ 0 < (s + a).re\n[PROOFSTEP]\nrwa [add_re]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na s : ℂ\nhs : 0 < s.re + a.re\nthis : HasMellin (indicator (Ioc 0 1) fun x => 1) (s + a) (1 / (s + a))\n⊢ HasMellin (indicator (Ioc 0 1) fun t => ↑t ^ a) s (1 / (s + a))\n[PROOFSTEP]\nsimp_rw [HasMellin, ← MellinConvergent.cpow_smul, ← mellin_cpow_smul, ← indicator_smul, smul_eq_mul, mul_one] at this \n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na s : ℂ\nhs : 0 < s.re + a.re\nthis :\n  MellinConvergent (indicator (Ioc 0 1) fun x => ↑x ^ a) s ∧\n    mellin (indicator (Ioc 0 1) fun x => ↑x ^ a) s = 1 / (s + a)\n⊢ HasMellin (indicator (Ioc 0 1) fun t => ↑t ^ a) s (1 / (s + a))\n[PROOFSTEP]\nexact this\n", "meta": {"mathlib_filename": "Mathlib.Analysis.MellinTransform", "llama_tokens": 63682, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6723316860482763, "lm_q2_score": 0.5774953651858118, "lm_q1q2_score": 0.3882684325604419}}
{"text": "[GOAL]\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nh : IsAffine Y\n⊢ IsAffine X\n[PROOFSTEP]\nrw [← mem_Spec_essImage] at h ⊢\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nh : Y ∈ Functor.essImage Scheme.Spec\n⊢ X ∈ Functor.essImage Scheme.Spec\n[PROOFSTEP]\nexact Functor.essImage.ofIso (asIso f).symm h\n[GOAL]\n⊢ HasLimits AffineScheme\n[PROOFSTEP]\nhaveI := Adjunction.has_colimits_of_equivalence Γ.{u}\n[GOAL]\nthis : HasColimitsOfSize.{u, u, u, u + 1} AffineSchemeᵒᵖ\n⊢ HasLimits AffineScheme\n[PROOFSTEP]\nhaveI : HasLimits AffineScheme.{u}ᵒᵖᵒᵖ := Limits.hasLimits_op_of_hasColimits\n[GOAL]\nthis✝ : HasColimitsOfSize.{u, u, u, u + 1} AffineSchemeᵒᵖ\nthis : HasLimits AffineSchemeᵒᵖᵒᵖ\n⊢ HasLimits AffineScheme\n[PROOFSTEP]\nexact Adjunction.has_limits_of_equivalence (opOpEquivalence AffineScheme.{u}).inverse\n[GOAL]\n⊢ PreservesLimits forgetToScheme\n[PROOFSTEP]\napply (config := { allowSynthFailures := true })\n  @preservesLimitsOfNatIso _ _ _ _ _ _ (isoWhiskerRight equivCommRingCat.unitIso forgetToScheme).symm\n[GOAL]\n⊢ PreservesLimitsOfSize.{?u.56375, ?u.56375, ?u.56375, ?u.56375, ?u.56375 + 1, ?u.56375 + 1}\n    ((equivCommRingCat.functor ⋙ equivCommRingCat.inverse) ⋙ forgetToScheme)\n[PROOFSTEP]\nchange PreservesLimits (equivCommRingCat.functor ⋙ Scheme.Spec)\n[GOAL]\n⊢ PreservesLimits (equivCommRingCat.functor ⋙ Scheme.Spec)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX Y : Scheme\ninst✝ : IsAffine X\nf : X ⟶ Y\nH : IsOpenImmersion f\n⊢ IsAffineOpen (Scheme.Hom.opensRange f)\n[PROOFSTEP]\nrefine' isAffineOfIso (IsOpenImmersion.isoOfRangeEq f (Y.ofRestrict _) _).inv\n[GOAL]\nX Y : Scheme\ninst✝ : IsAffine X\nf : X ⟶ Y\nH : IsOpenImmersion f\n⊢ Set.range ↑f.val.base =\n    Set.range ↑(Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.Hom.opensRange f)))).val.base\n[PROOFSTEP]\nexact Subtype.range_val.symm\n[GOAL]\nX : Scheme\ninst✝ : IsAffine X\n⊢ IsAffineOpen ⊤\n[PROOFSTEP]\nconvert rangeIsAffineOpenOfOpenImmersion (𝟙 X)\n[GOAL]\ncase h.e'_2\nX : Scheme\ninst✝ : IsAffine X\n⊢ ⊤ = Scheme.Hom.opensRange (𝟙 X)\n[PROOFSTEP]\next1\n[GOAL]\ncase h.e'_2.h\nX : Scheme\ninst✝ : IsAffine X\n⊢ ↑⊤ = ↑(Scheme.Hom.opensRange (𝟙 X))\n[PROOFSTEP]\nexact Set.range_id.symm\n[GOAL]\nX : Scheme\n⊢ Opens.IsBasis (Scheme.affineOpens X)\n[PROOFSTEP]\nrw [Opens.isBasis_iff_nbhd]\n[GOAL]\nX : Scheme\n⊢ ∀ {U : Opens ↑↑X.toPresheafedSpace} {x : ↑↑X.toPresheafedSpace},\n    x ∈ U → ∃ U', U' ∈ Scheme.affineOpens X ∧ x ∈ U' ∧ U' ≤ U\n[PROOFSTEP]\nrintro U x (hU : x ∈ (U : Set X))\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nx : ↑↑X.toPresheafedSpace\nhU : x ∈ ↑U\n⊢ ∃ U', U' ∈ Scheme.affineOpens X ∧ x ∈ U' ∧ U' ≤ U\n[PROOFSTEP]\nobtain ⟨S, hS, hxS, hSU⟩ := X.affineBasisCover_is_basis.exists_subset_of_mem_open hU U.isOpen\n[GOAL]\ncase intro.intro.intro\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nx : ↑↑X.toPresheafedSpace\nhU : x ∈ ↑U\nS : Set ↑↑X.toPresheafedSpace\nhS : S ∈ {x | ∃ a, x = Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover X) a).val.base}\nhxS : x ∈ S\nhSU : S ⊆ ↑U\n⊢ ∃ U', U' ∈ Scheme.affineOpens X ∧ x ∈ U' ∧ U' ≤ U\n[PROOFSTEP]\nrefine' ⟨⟨S, X.affineBasisCover_is_basis.isOpen hS⟩, _, hxS, hSU⟩\n[GOAL]\ncase intro.intro.intro\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nx : ↑↑X.toPresheafedSpace\nhU : x ∈ ↑U\nS : Set ↑↑X.toPresheafedSpace\nhS : S ∈ {x | ∃ a, x = Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover X) a).val.base}\nhxS : x ∈ S\nhSU : S ⊆ ↑U\n⊢ { carrier := S, is_open' := (_ : IsOpen S) } ∈ Scheme.affineOpens X\n[PROOFSTEP]\nrcases hS with ⟨i, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nx : ↑↑X.toPresheafedSpace\nhU : x ∈ ↑U\ni : (Scheme.affineBasisCover X).J\nhxS : x ∈ Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover X) i).val.base\nhSU : Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover X) i).val.base ⊆ ↑U\n⊢ { carrier := Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover X) i).val.base,\n      is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover X) i).val.base)) } ∈\n    Scheme.affineOpens X\n[PROOFSTEP]\nexact rangeIsAffineOpenOfOpenImmersion _\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ Scheme.Spec.obj (op (X.presheaf.obj (op U))) ⟶ X\n[PROOFSTEP]\nhaveI : IsAffine (X.restrict U.openEmbedding) := hU\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ Scheme.Spec.obj (op (X.presheaf.obj (op U))) ⟶ X\n[PROOFSTEP]\nhave : U.openEmbedding.isOpenMap.functor.obj ⊤ = U := by ext1; exact Set.image_univ.trans Subtype.range_coe\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤) = ↑U\n[PROOFSTEP]\nexact Set.image_univ.trans Subtype.range_coe\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U\n⊢ Scheme.Spec.obj (op (X.presheaf.obj (op U))) ⟶ X\n[PROOFSTEP]\nexact\n  Scheme.Spec.map (X.presheaf.map (eqToHom this.symm).op).op ≫ (X.restrict U.openEmbedding).isoSpec.inv ≫ X.ofRestrict _\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ IsOpenImmersion (fromSpec hU)\n[PROOFSTEP]\ndelta IsAffineOpen.fromSpec\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ IsOpenImmersion\n    (let_fun this := (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U);\n    Scheme.Spec.map\n        (X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n      (Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).inv ≫\n        Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n[PROOFSTEP]\ndsimp\n  -- Porting note : this was automatic\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ IsOpenImmersion\n    (Scheme.Spec.map\n        (X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n      (Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).inv ≫\n        Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n[PROOFSTEP]\nrepeat apply (config := { allowSynthFailures := true }) PresheafedSpace.IsOpenImmersion.comp\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ IsOpenImmersion\n    (Scheme.Spec.map\n        (X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n      (Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).inv ≫\n        Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n[PROOFSTEP]\napply (config := { allowSynthFailures := true }) PresheafedSpace.IsOpenImmersion.comp\n[GOAL]\ncase hg\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ PresheafedSpace.IsOpenImmersion\n    ((Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).inv ≫\n        Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val\n[PROOFSTEP]\napply (config := { allowSynthFailures := true }) PresheafedSpace.IsOpenImmersion.comp\n[GOAL]\n\n[PROOFSTEP]\napply (config := { allowSynthFailures := true }) PresheafedSpace.IsOpenImmersion.comp\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ Set.range ↑(fromSpec hU).val.base = ↑U\n[PROOFSTEP]\ndelta IsAffineOpen.fromSpec\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ Set.range\n      ↑(let_fun this := (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U);\n            Scheme.Spec.map\n                (X.presheaf.map\n                    (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n              (Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).inv ≫\n                Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base =\n    ↑U\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ Set.range\n      ↑((Scheme.Spec.map\n                (X.presheaf.map\n                    (eqToHom\n                        (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base ≫\n          (Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).inv.val.base ≫\n            Opens.inclusion U) =\n    ↑U\n[PROOFSTEP]\nerw [← Category.assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ Set.range\n      ↑(((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom\n                          (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base ≫\n            (Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).inv.val.base) ≫\n          Opens.inclusion U) =\n    ↑U\n[PROOFSTEP]\nrw [coe_comp, Set.range_comp, Set.range_iff_surjective.mpr, Set.image_univ]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ Set.range ↑(Opens.inclusion U) = ↑U\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ Function.Surjective\n    ↑((Scheme.Spec.map\n              (X.presheaf.map\n                  (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base ≫\n        (Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).inv.val.base)\n[PROOFSTEP]\nexact Subtype.range_coe\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ Function.Surjective\n    ↑((Scheme.Spec.map\n              (X.presheaf.map\n                  (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base ≫\n        (Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).inv.val.base)\n[PROOFSTEP]\nrw [← TopCat.epi_iff_surjective]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ Epi\n    ((Scheme.Spec.map\n            (X.presheaf.map\n                (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base ≫\n      (Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).inv.val.base)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(fromSpec hU).val.base)).obj ⊤ = U\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ ↑((IsOpenMap.functor (_ : IsOpenMap ↑(fromSpec hU).val.base)).obj ⊤) = ↑U\n[PROOFSTEP]\nexact Set.image_univ.trans hU.fromSpec_range\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ IsCompact ↑U\n[PROOFSTEP]\nconvert\n  @IsCompact.image _ _ _ _ Set.univ hU.fromSpec.1.base PrimeSpectrum.compactSpace.1\n    ((fromSpec hU).val.base.2)\n      -- Porting note : `continuity` can't do this\n[GOAL]\ncase h.e'_3.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ne_1✝ : ↑↑X.toPresheafedSpace = (forget TopCat).obj ↑X.toPresheafedSpace\n⊢ ↑U = ↑(fromSpec hU).val.base '' Set.univ\n[PROOFSTEP]\nconvert hU.fromSpec_range.symm\n[GOAL]\ncase h.e'_3.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ne_1✝¹ : ↑↑X.toPresheafedSpace = (forget TopCat).obj ↑X.toPresheafedSpace\ne_1✝ : Set ↑↑X.toPresheafedSpace = Set ((forget TopCat).obj ↑X.toPresheafedSpace)\n⊢ ↑(fromSpec hU).val.base '' Set.univ = Set.range ↑(fromSpec hU).val.base\n[PROOFSTEP]\nexact Set.image_univ\n[GOAL]\nX Y : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : X ⟶ Y\nH : IsOpenImmersion f\n⊢ IsAffineOpen ((Scheme.Hom.opensFunctor f).obj U)\n[PROOFSTEP]\nhaveI : IsAffine _ := hU\n[GOAL]\nX Y : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : X ⟶ Y\nH : IsOpenImmersion f\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ IsAffineOpen ((Scheme.Hom.opensFunctor f).obj U)\n[PROOFSTEP]\nhave : IsOpenImmersion (X.ofRestrict U.openEmbedding ≫ f) :=\n  PresheafedSpace.IsOpenImmersion.comp (hf := IsOpenImmersion.ofRestrict _ _) (hg := H)\n[GOAL]\nX Y : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : X ⟶ Y\nH : IsOpenImmersion f\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis : IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f)\n⊢ IsAffineOpen ((Scheme.Hom.opensFunctor f).obj U)\n[PROOFSTEP]\nconvert rangeIsAffineOpenOfOpenImmersion (X.ofRestrict U.openEmbedding ≫ f)\n[GOAL]\ncase h.e'_2\nX Y : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : X ⟶ Y\nH : IsOpenImmersion f\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis : IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f)\n⊢ (Scheme.Hom.opensFunctor f).obj U =\n    Scheme.Hom.opensRange (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f)\n[PROOFSTEP]\next1\n[GOAL]\ncase h.e'_2.h\nX Y : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : X ⟶ Y\nH : IsOpenImmersion f\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis : IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f)\n⊢ ↑((Scheme.Hom.opensFunctor f).obj U) =\n    ↑(Scheme.Hom.opensRange (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f))\n[PROOFSTEP]\nexact Set.image_eq_range _ _\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\n⊢ IsAffineOpen ((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U) ↔ IsAffineOpen U\n[PROOFSTEP]\nhave : IsOpenImmersion (X.ofRestrict U.openEmbedding ≫ f) :=\n  PresheafedSpace.IsOpenImmersion.comp (hf := inferInstance) (hg := H)\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nthis : IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f)\n⊢ IsAffineOpen ((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U) ↔ IsAffineOpen U\n[PROOFSTEP]\nrefine'\n  ⟨fun hU =>\n    @isAffineOfIso _ _ (IsOpenImmersion.isoOfRangeEq (X.ofRestrict U.openEmbedding ≫ f) (Y.ofRestrict _) _).hom ?_ hU,\n    fun hU => hU.imageIsOpenImmersion f⟩\n[GOAL]\ncase refine'_1\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nthis : IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f)\nhU : IsAffineOpen ((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U)\n⊢ Set.range ↑(Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).val.base =\n    Set.range\n      ↑(Scheme.ofRestrict Y\n              (_ : OpenEmbedding ↑(Opens.inclusion ((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U)))).val.base\n[PROOFSTEP]\nrw [Scheme.comp_val_base, coe_comp, Set.range_comp]\n[GOAL]\ncase refine'_1\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nthis : IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f)\nhU : IsAffineOpen ((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U)\n⊢ ↑f.val.base '' Set.range ↑(Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base =\n    Set.range\n      ↑(Scheme.ofRestrict Y\n              (_ : OpenEmbedding ↑(Opens.inclusion ((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U)))).val.base\n[PROOFSTEP]\ndsimp [Opens.inclusion]\n[GOAL]\ncase refine'_1\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nthis : IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f)\nhU : IsAffineOpen ((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U)\n⊢ ↑f.val.base '' Set.range ↑(ContinuousMap.mk Subtype.val) = Set.range ↑(ContinuousMap.mk Subtype.val)\n[PROOFSTEP]\nrw [ContinuousMap.coe_mk, ContinuousMap.coe_mk, Subtype.range_coe, Subtype.range_coe]\n[GOAL]\ncase refine'_1\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nthis : IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f)\nhU : IsAffineOpen ((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U)\n⊢ ↑f.val.base '' ↑U = ↑((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nthis : IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f)\nhU : IsAffineOpen ((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U)\n⊢ IsIso\n    (IsOpenImmersion.isoOfRangeEq (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f)\n        (Scheme.ofRestrict Y\n          (_ : OpenEmbedding ↑(Opens.inclusion ((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U))))\n        (_ :\n          Set.range ↑(Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).val.base =\n            Set.range\n              ↑(Scheme.ofRestrict Y\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion ((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U)))).val.base)).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ (Opens.map (fromSpec hU).val.base).obj U = ⊤\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ ↑((Opens.map (fromSpec hU).val.base).obj U) = ↑⊤\n[PROOFSTEP]\nchange hU.fromSpec.1.base ⁻¹' (U : Set X) = Set.univ\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ ↑(fromSpec hU).val.base ⁻¹' ↑U = Set.univ\n[PROOFSTEP]\nrw [← hU.fromSpec_range, ← Set.image_univ]\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ ↑(fromSpec hU).val.base ⁻¹' (↑(fromSpec hU).val.base '' Set.univ) = Set.univ\n[PROOFSTEP]\nexact Set.preimage_image_eq _ PresheafedSpace.IsOpenImmersion.base_open.inj\n[GOAL]\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\nh : U = V\nW : (Opens ↑↑(Spec.obj (op (X.presheaf.obj (op V)))).toPresheafedSpace)ᵒᵖ\n⊢ (Spec.obj (op (X.presheaf.obj (op V)))).presheaf.obj W =\n    ((Spec.map (X.presheaf.map (eqToHom h).op).op).val.base _* (Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj W\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nW : (Opens ↑↑(Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace)ᵒᵖ\n⊢ (Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj W =\n    ((Spec.map (X.presheaf.map (eqToHom (_ : U = U)).op).op).val.base _*\n          (Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n      W\n[PROOFSTEP]\ninduction W using Opposite.rec'\n[GOAL]\ncase refl.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nX✝ : Opens ↑↑(Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace\n⊢ (Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op X✝) =\n    ((Spec.map (X.presheaf.map (eqToHom (_ : U = U)).op).op).val.base _*\n          (Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n      (op X✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refl.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nX✝ : Opens ↑↑(Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace\n⊢ (Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op X✝) =\n    (Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj\n      (op ((Opens.map (Spec.map (X.presheaf.map (𝟙 (op U))).op).val.base).obj X✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\nh : U = V\nW : (Opens ↑↑(Spec.obj (op (X.presheaf.obj (op V)))).toPresheafedSpace)ᵒᵖ\n⊢ NatTrans.app (Spec.map (X.presheaf.map (eqToHom h).op).op).val.c W =\n    eqToHom\n      (_ :\n        (Spec.obj (op (X.presheaf.obj (op V)))).presheaf.obj W =\n          ((Spec.map (X.presheaf.map (eqToHom h).op).op).val.base _*\n                (Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n            W)\n[PROOFSTEP]\nhave : Scheme.Spec.map (X.presheaf.map (𝟙 (op U))).op = 𝟙 _ := by rw [X.presheaf.map_id, op_id, Scheme.Spec.map_id]\n[GOAL]\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\nh : U = V\nW : (Opens ↑↑(Spec.obj (op (X.presheaf.obj (op V)))).toPresheafedSpace)ᵒᵖ\n⊢ Spec.map (X.presheaf.map (𝟙 (op U))).op = 𝟙 (Spec.obj (op (X.presheaf.obj (op U))))\n[PROOFSTEP]\nrw [X.presheaf.map_id, op_id, Scheme.Spec.map_id]\n[GOAL]\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\nh : U = V\nW : (Opens ↑↑(Spec.obj (op (X.presheaf.obj (op V)))).toPresheafedSpace)ᵒᵖ\nthis : Spec.map (X.presheaf.map (𝟙 (op U))).op = 𝟙 (Spec.obj (op (X.presheaf.obj (op U))))\n⊢ NatTrans.app (Spec.map (X.presheaf.map (eqToHom h).op).op).val.c W =\n    eqToHom\n      (_ :\n        (Spec.obj (op (X.presheaf.obj (op V)))).presheaf.obj W =\n          ((Spec.map (X.presheaf.map (eqToHom h).op).op).val.base _*\n                (Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n            W)\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nthis : Spec.map (X.presheaf.map (𝟙 (op U))).op = 𝟙 (Spec.obj (op (X.presheaf.obj (op U))))\nW : (Opens ↑↑(Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace)ᵒᵖ\n⊢ NatTrans.app (Spec.map (X.presheaf.map (eqToHom (_ : U = U)).op).op).val.c W =\n    eqToHom\n      (_ :\n        (Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj W =\n          ((Spec.map (X.presheaf.map (eqToHom (_ : U = U)).op).op).val.base _*\n                (Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n            W)\n[PROOFSTEP]\nrefine' (Scheme.congr_app this _).trans _\n[GOAL]\ncase refl\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nthis : Spec.map (X.presheaf.map (𝟙 (op U))).op = 𝟙 (Spec.obj (op (X.presheaf.obj (op U))))\nW : (Opens ↑↑(Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace)ᵒᵖ\n⊢ NatTrans.app (𝟙 (Spec.obj (op (X.presheaf.obj (op U))))).val.c W ≫\n      (Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map (𝟙 (Spec.obj (op (X.presheaf.obj (op U))))).val.base).op.obj W =\n              (Opens.map (Spec.map (X.presheaf.map (𝟙 (op U))).op).val.base).op.obj W)) =\n    eqToHom\n      (_ :\n        (Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj W =\n          ((Spec.map (X.presheaf.map (eqToHom (_ : U = U)).op).op).val.base _*\n                (Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n            W)\n[PROOFSTEP]\nerw [Category.id_comp]\n[GOAL]\ncase refl\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nthis : Spec.map (X.presheaf.map (𝟙 (op U))).op = 𝟙 (Spec.obj (op (X.presheaf.obj (op U))))\nW : (Opens ↑↑(Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace)ᵒᵖ\n⊢ (Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom\n        (_ :\n          (Opens.map (𝟙 (Spec.obj (op (X.presheaf.obj (op U))))).val.base).op.obj W =\n            (Opens.map (Spec.map (X.presheaf.map (𝟙 (op U))).op).val.base).op.obj W)) =\n    eqToHom\n      (_ :\n        (Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj W =\n          ((Spec.map (X.presheaf.map (eqToHom (_ : U = U)).op).op).val.base _*\n                (Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n            W)\n[PROOFSTEP]\nsimp [eqToHom_map]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U)) ≫ NatTrans.app (fromSpec hU).val.c (op U) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nhaveI : IsAffine _ := hU\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U)) ≫ NatTrans.app (fromSpec hU).val.c (op U) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nhave e₁ := SpecΓIdentity.hom.naturality (X.presheaf.map (eqToHom U.openEmbedding_obj_top).op)\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₁ :\n  (Spec.toLocallyRingedSpace.rightOp ⋙ LocallyRingedSpace.Γ).map\n        (X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op) ≫\n      NatTrans.app SpecΓIdentity.hom\n        (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U)) ≫\n      (𝟭 CommRingCat).map\n        (X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op)\n⊢ NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U)) ≫ NatTrans.app (fromSpec hU).val.c (op U) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nrw [← IsIso.comp_inv_eq] at e₁ \n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₁ :\n  ((Spec.toLocallyRingedSpace.rightOp ⋙ LocallyRingedSpace.Γ).map\n          (X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op) ≫\n        NatTrans.app SpecΓIdentity.hom\n          (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)))) ≫\n      inv\n        ((𝟭 CommRingCat).map\n          (X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op)) =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\n⊢ NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U)) ≫ NatTrans.app (fromSpec hU).val.c (op U) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nhave e₂ := ΓSpec.adjunction_unit_app_app_top (X.restrict U.openEmbedding)\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₁ :\n  ((Spec.toLocallyRingedSpace.rightOp ⋙ LocallyRingedSpace.Γ).map\n          (X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op) ≫\n        NatTrans.app SpecΓIdentity.hom\n          (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)))) ≫\n      inv\n        ((𝟭 CommRingCat).map\n          (X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op)) =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\n⊢ NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U)) ≫ NatTrans.app (fromSpec hU).val.c (op U) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nerw [← e₂] at e₁ \n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₁ :\n  ((Spec.toLocallyRingedSpace.rightOp ⋙ LocallyRingedSpace.Γ).map\n          (X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op) ≫\n        NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤)) ≫\n      inv\n        ((𝟭 CommRingCat).map\n          (X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op)) =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\n⊢ NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U)) ≫ NatTrans.app (fromSpec hU).val.c (op U) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nsimp only [Functor.id_map, Quiver.Hom.unop_op, Functor.comp_map, ← Functor.map_inv, ← op_inv, LocallyRingedSpace.Γ_map,\n  Category.assoc, Functor.rightOp_map, inv_eqToHom] at e₁ \n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\n⊢ NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U)) ≫ NatTrans.app (fromSpec hU).val.c (op U) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\ndelta IsAffineOpen.fromSpec Scheme.isoSpec\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\n⊢ NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U)) ≫\n      NatTrans.app\n        (let_fun this := (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U);\n            Scheme.Spec.map\n                (X.presheaf.map\n                    (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n              (asIso\n                    (NatTrans.app ΓSpec.adjunction.unit\n                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op U) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nrw [Scheme.comp_val_c_app, Scheme.comp_val_c_app, ← e₁]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\n⊢ (NatTrans.app\n          (Spec.toLocallyRingedSpace.map\n                (X.presheaf.map\n                    (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n          (op ⊤) ≫\n        NatTrans.app\n            (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n            (op ⊤) ≫\n          X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op) ≫\n      (NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (op U) ≫\n          NatTrans.app\n            (asIso\n                    (NatTrans.app ΓSpec.adjunction.unit\n                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.c\n            ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj (op U))) ≫\n        NatTrans.app\n          (Scheme.Spec.map\n                (X.presheaf.map\n                    (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n          ((Opens.map\n                  ((asIso\n                            (NatTrans.app ΓSpec.adjunction.unit\n                              (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                        Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n            (op U)) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nsimp_rw [Category.assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\n⊢ NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op ≫\n          NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (op U) ≫\n            NatTrans.app\n                (asIso\n                        (NatTrans.app ΓSpec.adjunction.unit\n                          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.c\n                ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj (op U)) ≫\n              NatTrans.app\n                (Scheme.Spec.map\n                      (X.presheaf.map\n                          (eqToHom\n                              (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n                ((Opens.map\n                        ((asIso\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                              Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op U)) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nerw [← X.presheaf.map_comp_assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\n⊢ NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map\n            ((eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op ≫\n              (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop).op) ≫\n          NatTrans.app\n              (asIso\n                      (NatTrans.app ΓSpec.adjunction.unit\n                        (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.c\n              ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj (op U)) ≫\n            NatTrans.app\n              (Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n              ((Opens.map\n                      ((asIso\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                (op U)) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nrw [← op_comp]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\n⊢ NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map\n            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop ≫\n                eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op ≫\n          NatTrans.app\n              (asIso\n                      (NatTrans.app ΓSpec.adjunction.unit\n                        (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.c\n              ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj (op U)) ≫\n            NatTrans.app\n              (Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n              ((Opens.map\n                      ((asIso\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                (op U)) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nhave e₃ :\n  U.openEmbedding.isOpenMap.adjunction.counit.app U ≫ eqToHom U.openEmbedding_obj_top.symm =\n    U.openEmbedding.isOpenMap.functor.map (eqToHom U.inclusion_map_eq_top) :=\n  Subsingleton.elim _\n    _\n      -- Porting note : `e₄` needs two more explicit inputs\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\ne₃ :\n  NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit U ≫\n      eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n      (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤))\n⊢ NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map\n            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop ≫\n                eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op ≫\n          NatTrans.app\n              (asIso\n                      (NatTrans.app ΓSpec.adjunction.unit\n                        (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.c\n              ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj (op U)) ≫\n            NatTrans.app\n              (Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n              ((Opens.map\n                      ((asIso\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                (op U)) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nhave e₄ := (asIso (ΓSpec.adjunction.unit.app (X.restrict U.openEmbedding))).inv.1.c.naturality_assoc\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\ne₃ :\n  NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit U ≫\n      eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n      (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤))\ne₄ :\n  ∀\n    ⦃X_1 Y :\n      (Opens ↑↑((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).toPresheafedSpace)ᵒᵖ⦄\n    (f : X_1 ⟶ Y) {Z : CommRingCat}\n    (h :\n      ((asIso\n                      (NatTrans.app ΓSpec.adjunction.unit\n                        (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.base _*\n              ((Scheme.Γ.rightOp ⋙ Scheme.Spec).obj\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf).obj\n          Y ⟶\n        Z),\n    ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.map f ≫\n        NatTrans.app\n            (asIso\n                    (NatTrans.app ΓSpec.adjunction.unit\n                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.c\n            Y ≫\n          h =\n      NatTrans.app\n          (asIso\n                  (NatTrans.app ΓSpec.adjunction.unit\n                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.c\n          X_1 ≫\n        ((asIso\n                        (NatTrans.app ΓSpec.adjunction.unit\n                          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.base _*\n                ((Scheme.Γ.rightOp ⋙ Scheme.Spec).obj\n                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf).map\n            f ≫\n          h\n⊢ NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map\n            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop ≫\n                eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op ≫\n          NatTrans.app\n              (asIso\n                      (NatTrans.app ΓSpec.adjunction.unit\n                        (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.c\n              ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj (op U)) ≫\n            NatTrans.app\n              (Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n              ((Opens.map\n                      ((asIso\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                (op U)) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\ndsimp at e₄ \n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\ne₃ :\n  NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit U ≫\n      eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n      (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤))\ne₄ :\n  ∀ ⦃X_1 Y : (Opens ↑((Opens.toTopCat ↑X.toPresheafedSpace).obj U))ᵒᵖ⦄ (f : X_1 ⟶ Y) {Z : CommRingCat}\n    (h :\n      (Scheme.Spec.obj\n                (op\n                  (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n          (op\n            ((Opens.map\n                  (inv\n                        (NatTrans.app ΓSpec.adjunction.unit\n                          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n              Y.unop)) ⟶\n        Z),\n    X.presheaf.map ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map f.unop).op ≫\n        NatTrans.app\n            (inv\n                  (NatTrans.app ΓSpec.adjunction.unit\n                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n            Y ≫\n          h =\n      NatTrans.app\n          (inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n          X_1 ≫\n        (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            ((Opens.map\n                    (inv\n                          (NatTrans.app ΓSpec.adjunction.unit\n                            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).map\n                f.unop).op ≫\n          h\n⊢ NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map\n            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop ≫\n                eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op ≫\n          NatTrans.app\n              (asIso\n                      (NatTrans.app ΓSpec.adjunction.unit\n                        (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.c\n              ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj (op U)) ≫\n            NatTrans.app\n              (Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n              ((Opens.map\n                      ((asIso\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                (op U)) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nreplace e₄ := @e₄ (op ⊤) (op <| (Opens.map U.inclusion).obj U) (eqToHom U.inclusion_map_eq_top).op\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\ne₃ :\n  NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit U ≫\n      eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n      (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤))\ne₄ :\n  ∀ {Z : CommRingCat}\n    (h :\n      (Scheme.Spec.obj\n                (op\n                  (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n          (op\n            ((Opens.map\n                  (inv\n                        (NatTrans.app ΓSpec.adjunction.unit\n                          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n              (op ((Opens.map (Opens.inclusion U)).obj U)).unop)) ⟶\n        Z),\n    X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n              (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤)).op.unop).op ≫\n        NatTrans.app\n            (inv\n                  (NatTrans.app ΓSpec.adjunction.unit\n                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n            (op ((Opens.map (Opens.inclusion U)).obj U)) ≫\n          h =\n      NatTrans.app\n          (inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n          (op ⊤) ≫\n        (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            ((Opens.map\n                    (inv\n                          (NatTrans.app ΓSpec.adjunction.unit\n                            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).map\n                (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤)).op.unop).op ≫\n          h\n⊢ NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map\n            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop ≫\n                eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op ≫\n          NatTrans.app\n              (asIso\n                      (NatTrans.app ΓSpec.adjunction.unit\n                        (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.c\n              ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj (op U)) ≫\n            NatTrans.app\n              (Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n              ((Opens.map\n                      ((asIso\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                (op U)) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nerw [e₃, e₄, ← Scheme.comp_val_c_app_assoc, IsIso.inv_hom_id]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\ne₃ :\n  NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit U ≫\n      eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n      (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤))\ne₄ :\n  ∀ {Z : CommRingCat}\n    (h :\n      (Scheme.Spec.obj\n                (op\n                  (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n          (op\n            ((Opens.map\n                  (inv\n                        (NatTrans.app ΓSpec.adjunction.unit\n                          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n              (op ((Opens.map (Opens.inclusion U)).obj U)).unop)) ⟶\n        Z),\n    X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n              (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤)).op.unop).op ≫\n        NatTrans.app\n            (inv\n                  (NatTrans.app ΓSpec.adjunction.unit\n                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n            (op ((Opens.map (Opens.inclusion U)).obj U)) ≫\n          h =\n      NatTrans.app\n          (inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n          (op ⊤) ≫\n        (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            ((Opens.map\n                    (inv\n                          (NatTrans.app ΓSpec.adjunction.unit\n                            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).map\n                (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤)).op.unop).op ≫\n          h\n⊢ NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (𝟙\n                (Scheme.Spec.obj\n                  (op (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)))))).val.c\n          (op ⊤) ≫\n        (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            ((Opens.map\n                    (inv\n                          (NatTrans.app ΓSpec.adjunction.unit\n                            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).map\n                (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤)).op.unop).op ≫\n          NatTrans.app\n            (Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n            ((Opens.map\n                    ((asIso\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                          Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n              (op U)) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n      (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nsimp only [eqToHom_map, eqToHom_op, Scheme.Spec_map_presheaf_map_eqToHom, eqToHom_unop, unop_op]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\ne₃ :\n  NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit U ≫\n      eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n      (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤))\ne₄ :\n  ∀ {Z : CommRingCat}\n    (h :\n      (Scheme.Spec.obj\n                (op\n                  (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n          (op\n            ((Opens.map\n                  (inv\n                        (NatTrans.app ΓSpec.adjunction.unit\n                          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n              (op ((Opens.map (Opens.inclusion U)).obj U)).unop)) ⟶\n        Z),\n    X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n              (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤)).op.unop).op ≫\n        NatTrans.app\n            (inv\n                  (NatTrans.app ΓSpec.adjunction.unit\n                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n            (op ((Opens.map (Opens.inclusion U)).obj U)) ≫\n          h =\n      NatTrans.app\n          (inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n          (op ⊤) ≫\n        (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            ((Opens.map\n                    (inv\n                          (NatTrans.app ΓSpec.adjunction.unit\n                            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).map\n                (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤)).op.unop).op ≫\n          h\n⊢ NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (𝟙\n                (Scheme.Spec.obj\n                  (op (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)))))).val.c\n          (op ⊤) ≫\n        eqToHom\n            (_ :\n              (Scheme.Spec.obj\n                        (op\n                          (X.presheaf.obj\n                            (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n                  (op\n                    ((Opens.map\n                          (inv\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                      ⊤)) =\n                (Scheme.Spec.obj\n                        (op\n                          (X.presheaf.obj\n                            (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n                  (op\n                    ((Opens.map\n                          (inv\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                      ((Opens.map (Opens.inclusion U)).obj U)))) ≫\n          eqToHom\n            (_ :\n              (Scheme.Spec.obj\n                        (op\n                          (X.presheaf.obj\n                            (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n                  ((Opens.map\n                          ((asIso\n                                    (NatTrans.app ΓSpec.adjunction.unit\n                                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                                Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                    (op U)) =\n                ((Scheme.Spec.map\n                            (X.presheaf.map\n                                (eqToHom\n                                    (_ :\n                                      U =\n                                        (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                                          ⊤)).op).op).val.base _*\n                      (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n                  ((Opens.map\n                          ((asIso\n                                    (NatTrans.app ΓSpec.adjunction.unit\n                                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                                Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                    (op U))) =\n    eqToHom\n      (_ :\n        (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op ⊤) =\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj\n            (op\n              ((Opens.map\n                    (Scheme.Spec.map\n                            (X.presheaf.map\n                                (eqToHom\n                                    (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                          (asIso\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                U)))\n[PROOFSTEP]\nerw [Scheme.Spec_map_presheaf_map_eqToHom, Category.id_comp]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne₂ :\n  NatTrans.app (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n      (op ⊤) =\n    NatTrans.app SpecΓIdentity.hom\n      ((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\ne₁ :\n  NatTrans.app\n        (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.c\n        (op ⊤) ≫\n      NatTrans.app\n          (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.c\n          (op ⊤) ≫\n        X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op =\n    NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U))\ne₃ :\n  NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit U ≫\n      eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n      (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤))\ne₄ :\n  ∀ {Z : CommRingCat}\n    (h :\n      (Scheme.Spec.obj\n                (op\n                  (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n          (op\n            ((Opens.map\n                  (inv\n                        (NatTrans.app ΓSpec.adjunction.unit\n                          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n              (op ((Opens.map (Opens.inclusion U)).obj U)).unop)) ⟶\n        Z),\n    X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n              (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤)).op.unop).op ≫\n        NatTrans.app\n            (inv\n                  (NatTrans.app ΓSpec.adjunction.unit\n                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n            (op ((Opens.map (Opens.inclusion U)).obj U)) ≫\n          h =\n      NatTrans.app\n          (inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n          (op ⊤) ≫\n        (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            ((Opens.map\n                    (inv\n                          (NatTrans.app ΓSpec.adjunction.unit\n                            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).map\n                (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤)).op.unop).op ≫\n          h\n⊢ eqToHom\n        (_ :\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op ⊤) =\n            ((Scheme.Spec.map\n                        (X.presheaf.map\n                            (eqToHom\n                                (_ :\n                                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ =\n                                    U)).op).op).val.base _*\n                  (Scheme.Spec.obj\n                      (op\n                        (X.presheaf.obj\n                          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf).obj\n              (op ⊤)) ≫\n      eqToHom\n          (_ :\n            (Scheme.Spec.obj\n                      (op\n                        (X.presheaf.obj\n                          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n                (op\n                  ((Opens.map\n                        (inv\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                    ⊤)) =\n              (Scheme.Spec.obj\n                      (op\n                        (X.presheaf.obj\n                          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n                (op\n                  ((Opens.map\n                        (inv\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                    ((Opens.map (Opens.inclusion U)).obj U)))) ≫\n        eqToHom\n          (_ :\n            (Scheme.Spec.obj\n                      (op\n                        (X.presheaf.obj\n                          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n                ((Opens.map\n                        ((asIso\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                              Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op U)) =\n              ((Scheme.Spec.map\n                          (X.presheaf.map\n                              (eqToHom\n                                  (_ :\n                                    U =\n                                      (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                                        ⊤)).op).op).val.base _*\n                    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n                ((Opens.map\n                        ((asIso\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                              Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op U))) =\n    eqToHom\n      (_ :\n        (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op ⊤) =\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj\n            (op\n              ((Opens.map\n                    (Scheme.Spec.map\n                            (X.presheaf.map\n                                (eqToHom\n                                    (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                          (asIso\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                U)))\n[PROOFSTEP]\nsimp only [eqToHom_trans]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ NatTrans.app (fromSpec hU).val.c (op U) =\n    NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U)) ≫\n      (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n        (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nrw [← hU.SpecΓIdentity_hom_app_fromSpec, Iso.inv_hom_id_app_assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ IsAffineOpen (Scheme.basicOpen X f)\n[PROOFSTEP]\nhave o1 :\n  IsOpenImmersion <|\n    Scheme.Spec.map (CommRingCat.ofHom (algebraMap ((X.presheaf.obj <| op U)) (Localization.Away f))).op ≫ hU.fromSpec\n[GOAL]\ncase o1\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\n[PROOFSTEP]\nexact PresheafedSpace.IsOpenImmersion.comp (hf := inferInstance) (hg := inferInstance)\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\n⊢ IsAffineOpen (Scheme.basicOpen X f)\n[PROOFSTEP]\nconvert\n  rangeIsAffineOpenOfOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (X.presheaf.obj (op U)) (Localization.Away f))).op ≫ hU.fromSpec)\n[GOAL]\ncase h.e'_2\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\n⊢ Scheme.basicOpen X f =\n    Scheme.Hom.opensRange\n      (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫\n        fromSpec hU)\n[PROOFSTEP]\next1\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\n⊢ ↑(Scheme.basicOpen X f) =\n    ↑(Scheme.Hom.opensRange\n        (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫\n          fromSpec hU))\n[PROOFSTEP]\nhave : hU.fromSpec.val.base '' (hU.fromSpec.val.base ⁻¹' (X.basicOpen f : Set X)) = (X.basicOpen f : Set X) :=\n  by\n  rw [Set.image_preimage_eq_inter_range, Set.inter_eq_left_iff_subset, hU.fromSpec_range]\n  exact Scheme.basicOpen_le _ _\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\n⊢ ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\n[PROOFSTEP]\nrw [Set.image_preimage_eq_inter_range, Set.inter_eq_left_iff_subset, hU.fromSpec_range]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\n⊢ ↑(Scheme.basicOpen X f) ⊆ ↑U\n[PROOFSTEP]\nexact Scheme.basicOpen_le _ _\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\n⊢ ↑(Scheme.basicOpen X f) =\n    ↑(Scheme.Hom.opensRange\n        (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫\n          fromSpec hU))\n[PROOFSTEP]\nrw [Scheme.Hom.opensRange_coe, Scheme.comp_val_base, ← this, coe_comp, Set.range_comp]\n  -- Porting note : `congr 1` did not work\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\n⊢ ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) =\n    ↑(fromSpec hU).val.base ''\n      Set.range\n        ↑(Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op).val.base\n[PROOFSTEP]\napply congr_arg (_ '' ·)\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\n⊢ ↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f) =\n    Set.range\n      ↑(Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op).val.base\n[PROOFSTEP]\nrefine' (Opens.coe_inj.mpr <| Scheme.preimage_basicOpen hU.fromSpec f).trans _\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\n⊢ ↑(Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U)))) (↑(NatTrans.app (fromSpec hU).val.c (op U)) f)) =\n    Set.range\n      ↑(Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op).val.base\n[PROOFSTEP]\nrefine' Eq.trans _ (PrimeSpectrum.localization_away_comap_range (Localization.Away f) f).symm\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\n⊢ ↑(Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U)))) (↑(NatTrans.app (fromSpec hU).val.c (op U)) f)) =\n    ↑(PrimeSpectrum.basicOpen f)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\n⊢ ↑(Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U)))) (↑(NatTrans.app (fromSpec hU).val.c (op U)) f)) =\n    ↑(PrimeSpectrum.basicOpen f)\n[PROOFSTEP]\nhave : (Opens.map hU.fromSpec.val.base).obj U = ⊤ := by\n  ext1\n  change hU.fromSpec.1.base ⁻¹' (U : Set X) = Set.univ\n  rw [← hU.fromSpec_range, ← Set.image_univ]\n  exact Set.preimage_image_eq _ PresheafedSpace.IsOpenImmersion.base_open.inj\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\n⊢ (Opens.map (fromSpec hU).val.base).obj U = ⊤\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\n⊢ ↑((Opens.map (fromSpec hU).val.base).obj U) = ↑⊤\n[PROOFSTEP]\nchange hU.fromSpec.1.base ⁻¹' (U : Set X) = Set.univ\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\n⊢ ↑(fromSpec hU).val.base ⁻¹' ↑U = Set.univ\n[PROOFSTEP]\nrw [← hU.fromSpec_range, ← Set.image_univ]\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\n⊢ ↑(fromSpec hU).val.base ⁻¹' (↑(fromSpec hU).val.base '' Set.univ) = Set.univ\n[PROOFSTEP]\nexact Set.preimage_image_eq _ PresheafedSpace.IsOpenImmersion.base_open.inj\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis✝ : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\nthis : (Opens.map (fromSpec hU).val.base).obj U = ⊤\n⊢ ↑(Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U)))) (↑(NatTrans.app (fromSpec hU).val.c (op U)) f)) =\n    ↑(PrimeSpectrum.basicOpen f)\n[PROOFSTEP]\nrefine' Eq.trans _ (Opens.coe_inj.mpr <| basicOpen_eq_of_affine f)\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis✝ : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\nthis : (Opens.map (fromSpec hU).val.base).obj U = ⊤\n⊢ ↑(Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U)))) (↑(NatTrans.app (fromSpec hU).val.c (op U)) f)) =\n    ↑(Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n        (↑(SpecΓIdentity.app (X.presheaf.obj (op U))).inv f))\n[PROOFSTEP]\nhave lm : ∀ s, (Opens.map hU.fromSpec.val.base).obj U ⊓ s = s := fun s => this.symm ▸ top_inf_eq\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis✝ : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\nthis : (Opens.map (fromSpec hU).val.base).obj U = ⊤\nlm :\n  ∀ (s : Opens ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace),\n    (Opens.map (fromSpec hU).val.base).obj U ⊓ s = s\n⊢ ↑(Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U)))) (↑(NatTrans.app (fromSpec hU).val.c (op U)) f)) =\n    ↑(Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n        (↑(SpecΓIdentity.app (X.presheaf.obj (op U))).inv f))\n[PROOFSTEP]\nrefine' Opens.coe_inj.mpr <| Eq.trans _ (lm _)\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis✝ : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\nthis : (Opens.map (fromSpec hU).val.base).obj U = ⊤\nlm :\n  ∀ (s : Opens ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace),\n    (Opens.map (fromSpec hU).val.base).obj U ⊓ s = s\n⊢ Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U)))) (↑(NatTrans.app (fromSpec hU).val.c (op U)) f) =\n    (Opens.map (fromSpec hU).val.base).obj U ⊓\n      Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n        (↑(SpecΓIdentity.app (X.presheaf.obj (op U))).inv f)\n[PROOFSTEP]\nrefine'\n  Eq.trans _\n    ((Scheme.Spec.obj <| op <| X.presheaf.obj <| op U).basicOpen_res _ (eqToHom this).op)\n      -- Porting note : changed `rw` to `erw`\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis✝ : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\nthis : (Opens.map (fromSpec hU).val.base).obj U = ⊤\nlm :\n  ∀ (s : Opens ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace),\n    (Opens.map (fromSpec hU).val.base).obj U ⊓ s = s\n⊢ Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U)))) (↑(NatTrans.app (fromSpec hU).val.c (op U)) f) =\n    Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n      (↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map (eqToHom this).op)\n        (↑(SpecΓIdentity.app (X.presheaf.obj (op U))).inv f))\n[PROOFSTEP]\nerw [← comp_apply]\n[GOAL]\ncase h.e'_2.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis✝ : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\nthis : (Opens.map (fromSpec hU).val.base).obj U = ⊤\nlm :\n  ∀ (s : Opens ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace),\n    (Opens.map (fromSpec hU).val.base).obj U ⊓ s = s\n⊢ Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U)))) (↑(NatTrans.app (fromSpec hU).val.c (op U)) f) =\n    Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n      (↑((SpecΓIdentity.app (X.presheaf.obj (op U))).inv ≫\n            (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map (eqToHom this).op)\n        f)\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.e'_2.h.e_f.e_a\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis✝ : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\nthis : (Opens.map (fromSpec hU).val.base).obj U = ⊤\nlm :\n  ∀ (s : Opens ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace),\n    (Opens.map (fromSpec hU).val.base).obj U ⊓ s = s\n⊢ NatTrans.app (fromSpec hU).val.c (op U) =\n    (SpecΓIdentity.app (X.presheaf.obj (op U))).inv ≫\n      (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map (eqToHom this).op\n[PROOFSTEP]\nrw [Iso.eq_inv_comp]\n[GOAL]\ncase h.e'_2.h.e_f.e_a\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\no1 :\n  IsOpenImmersion\n    (Scheme.Spec.map (CommRingCat.ofHom (algebraMap (↑(X.presheaf.obj (op U))) (Localization.Away f))).op ≫ fromSpec hU)\nthis✝ : ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X f)) = ↑(Scheme.basicOpen X f)\nthis : (Opens.map (fromSpec hU).val.base).obj U = ⊤\nlm :\n  ∀ (s : Opens ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace),\n    (Opens.map (fromSpec hU).val.base).obj U ⊓ s = s\n⊢ (SpecΓIdentity.app (X.presheaf.obj (op U))).hom ≫ NatTrans.app (fromSpec hU).val.c (op U) =\n    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map (eqToHom this).op\n[PROOFSTEP]\nerw [hU.SpecΓIdentity_hom_app_fromSpec]\n[GOAL]\nX : Scheme\nr : ↑(X.presheaf.obj (op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ IsAffineOpen\n    ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X r)))).val.base).obj U)\n[PROOFSTEP]\napply (isAffineOpen_iff_of_isOpenImmersion (X.ofRestrict (X.basicOpen r).openEmbedding) _).mp\n[GOAL]\nX : Scheme\nr : ↑(X.presheaf.obj (op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ IsAffineOpen\n    ((PresheafedSpace.IsOpenImmersion.openFunctor\n          (_ : IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X r)))))).obj\n      ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X r)))).val.base).obj U))\n[PROOFSTEP]\ndelta PresheafedSpace.IsOpenImmersion.openFunctor\n[GOAL]\nX : Scheme\nr : ↑(X.presheaf.obj (op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ IsAffineOpen\n    ((IsOpenMap.functor\n          (_ :\n            IsOpenMap\n              ↑(Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X r)))).val.base)).obj\n      ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X r)))).val.base).obj U))\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : Scheme\nr : ↑(X.presheaf.obj (op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ IsAffineOpen\n    ((IsOpenMap.functor\n          (_ :\n            IsOpenMap\n              ↑(Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X r)))).val.base)).obj\n      ((Opens.map (Opens.inclusion (Scheme.basicOpen X r))).obj U))\n[PROOFSTEP]\nerw [Opens.functor_obj_map_obj, Opens.openEmbedding_obj_top, inf_comm, ← Scheme.basicOpen_res _ _ (homOfLE le_top).op]\n[GOAL]\nX : Scheme\nr : ↑(X.presheaf.obj (op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ IsAffineOpen (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U ≤ ⊤)).op) r))\n[PROOFSTEP]\nexact hU.basicOpenIsAffine _\n[GOAL]\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ (Opens.map (isoSpec X).hom.val.base).obj (PrimeSpectrum.basicOpen f) = basicOpen X f\n[PROOFSTEP]\nrw [← basicOpen_eq_of_affine]\n[GOAL]\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ (Opens.map (isoSpec X).hom.val.base).obj\n      (basicOpen (Spec.obj (op (Γ.obj (op X)))) (↑(SpecΓIdentity.app (Γ.obj (op X))).inv f)) =\n    basicOpen X f\n[PROOFSTEP]\ntrans\n  (Opens.map X.isoSpec.hom.1.base).obj\n    ((Scheme.Spec.obj (op (Scheme.Γ.obj (op X)))).basicOpen\n      ((inv (X.isoSpec.hom.1.c.app (op ((Opens.map (inv X.isoSpec.hom).val.base).obj ⊤))))\n        ((X.presheaf.map (eqToHom <| by congr)) f)))\n[GOAL]\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ op ⊤ = (Opens.map (isoSpec X).hom.val.base).op.obj (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤))\n[PROOFSTEP]\ncongr\n[GOAL]\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ (Opens.map (isoSpec X).hom.val.base).obj\n      (basicOpen (Spec.obj (op (Γ.obj (op X)))) (↑(SpecΓIdentity.app (Γ.obj (op X))).inv f)) =\n    (Opens.map (isoSpec X).hom.val.base).obj\n      (basicOpen (Spec.obj (op (Γ.obj (op X))))\n        (↑(inv (NatTrans.app (isoSpec X).hom.val.c (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤))))\n          (↑(X.presheaf.map\n                (eqToHom\n                  (_ :\n                    op ⊤ =\n                      op\n                        ((Opens.map (isoSpec X).hom.val.base).obj\n                          (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤)).unop))))\n            f)))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_f.h.e_5.h\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ (SpecΓIdentity.app (Γ.obj (op X))).inv =\n    inv (NatTrans.app (isoSpec X).hom.val.c (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤)))\n[PROOFSTEP]\nrw [← IsIso.inv_eq_inv, IsIso.inv_inv, IsIso.Iso.inv_inv, NatIso.app_hom]\n  -- Porting note : added this `change` to prevent timeout\n[GOAL]\ncase e_a.e_f.h.e_5.h\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ NatTrans.app SpecΓIdentity.hom (Γ.obj (op X)) =\n    NatTrans.app (isoSpec X).hom.val.c (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤))\n[PROOFSTEP]\nchange SpecΓIdentity.hom.app (X.presheaf.obj <| op ⊤) = _\n[GOAL]\ncase e_a.e_f.h.e_5.h\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op ⊤)) =\n    NatTrans.app (isoSpec X).hom.val.c (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤))\n[PROOFSTEP]\nrw [← ΓSpec.adjunction_unit_app_app_top X]\n[GOAL]\ncase e_a.e_f.h.e_5.h\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ NatTrans.app (NatTrans.app ΓSpec.adjunction.unit X).val.c (op ⊤) =\n    NatTrans.app (isoSpec X).hom.val.c (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase e_a.e_f.h.e_6.h\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ f =\n    ↑(X.presheaf.map\n          (eqToHom\n            (_ :\n              op ⊤ =\n                op\n                  ((Opens.map (isoSpec X).hom.val.base).obj\n                    (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤)).unop))))\n      f\n[PROOFSTEP]\nrw [eqToHom_map]\n[GOAL]\ncase e_a.e_f.h.e_6.h\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ f =\n    ↑(eqToHom\n          (_ :\n            X.presheaf.obj (op ⊤) =\n              X.presheaf.obj\n                ((Opens.map (isoSpec X).hom.val.base).op.obj (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤)))))\n      f\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ (Opens.map (isoSpec X).hom.val.base).obj\n      (basicOpen (Spec.obj (op (Γ.obj (op X))))\n        (↑(inv (NatTrans.app (isoSpec X).hom.val.c (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤))))\n          (↑(X.presheaf.map\n                (eqToHom\n                  (_ :\n                    op ⊤ =\n                      op\n                        ((Opens.map (isoSpec X).hom.val.base).obj\n                          (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤)).unop))))\n            f))) =\n    basicOpen X f\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ (Opens.map (isoSpec X).hom.val.base).obj\n      (basicOpen (Spec.obj (op (X.presheaf.obj (op ⊤))))\n        (↑(inv (NatTrans.app (isoSpec X).hom.val.c (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤))))\n          (↑(X.presheaf.map (𝟙 (op ⊤))) f))) =\n    basicOpen X f\n[PROOFSTEP]\ncongr\n[GOAL]\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ (Opens.map (isoSpec X).hom.val.base).obj\n      (basicOpen (Spec.obj (op (X.presheaf.obj (op ⊤))))\n        (↑(inv (NatTrans.app (isoSpec X).hom.val.c (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤))))\n          (↑(X.presheaf.map (𝟙 (op ⊤))) f))) =\n    basicOpen X f\n[PROOFSTEP]\nrefine'\n  (Scheme.preimage_basicOpen _ _).trans\n    _\n      -- Porting note : changed `rw` to `erw`\n[GOAL]\nX : Scheme\ninst✝ : IsAffine X\nf : ↑(Γ.obj (op X))\n⊢ basicOpen X\n      (↑(NatTrans.app (isoSpec X).hom.val.c (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤)))\n        (↑(inv (NatTrans.app (isoSpec X).hom.val.c (op ((Opens.map (inv (isoSpec X).hom).val.base).obj ⊤))))\n          (↑(X.presheaf.map (𝟙 (op ⊤))) f))) =\n    basicOpen X f\n[PROOFSTEP]\nerw [IsIso.inv_hom_id_apply, Scheme.basicOpen_res_eq]\n[GOAL]\nX : Scheme\ninst✝ : IsAffine X\n⊢ Opens.IsBasis (Set.range (Scheme.basicOpen X))\n[PROOFSTEP]\ndelta Opens.IsBasis\n[GOAL]\nX : Scheme\ninst✝ : IsAffine X\n⊢ IsTopologicalBasis (SetLike.coe '' Set.range (Scheme.basicOpen X))\n[PROOFSTEP]\nconvert\n  PrimeSpectrum.isBasis_basic_opens.inducing (TopCat.homeoOfIso (Scheme.forgetToTop.mapIso X.isoSpec)).inducing using 1\n[GOAL]\ncase h.e'_3\nX : Scheme\ninst✝ : IsAffine X\n⊢ SetLike.coe '' Set.range (Scheme.basicOpen X) =\n    Set.preimage ↑(TopCat.homeoOfIso (Scheme.forgetToTop.mapIso (Scheme.isoSpec X))) ''\n      (SetLike.coe '' Set.range PrimeSpectrum.basicOpen)\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_3.h\nX : Scheme\ninst✝ : IsAffine X\nx✝ : Set ↑↑X.toPresheafedSpace\n⊢ x✝ ∈ SetLike.coe '' Set.range (Scheme.basicOpen X) ↔\n    x✝ ∈\n      Set.preimage ↑(TopCat.homeoOfIso (Scheme.forgetToTop.mapIso (Scheme.isoSpec X))) ''\n        (SetLike.coe '' Set.range PrimeSpectrum.basicOpen)\n[PROOFSTEP]\nsimp only [Set.mem_image, exists_exists_eq_and]\n[GOAL]\ncase h.e'_3.h\nX : Scheme\ninst✝ : IsAffine X\nx✝ : Set ↑↑X.toPresheafedSpace\n⊢ (∃ x, x ∈ Set.range (Scheme.basicOpen X) ∧ ↑x = x✝) ↔\n    ∃ x,\n      (∃ x_1, x_1 ∈ Set.range PrimeSpectrum.basicOpen ∧ ↑x_1 = x) ∧\n        ↑(TopCat.homeoOfIso (Scheme.forgetToTop.mapIso (Scheme.isoSpec X))) ⁻¹' x = x✝\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.e'_3.h.mp\nX : Scheme\ninst✝ : IsAffine X\nx✝ : Set ↑↑X.toPresheafedSpace\n⊢ (∃ x, x ∈ Set.range (Scheme.basicOpen X) ∧ ↑x = x✝) →\n    ∃ x,\n      (∃ x_1, x_1 ∈ Set.range PrimeSpectrum.basicOpen ∧ ↑x_1 = x) ∧\n        ↑(TopCat.homeoOfIso (Scheme.forgetToTop.mapIso (Scheme.isoSpec X))) ⁻¹' x = x✝\n[PROOFSTEP]\nrintro ⟨_, ⟨x, rfl⟩, rfl⟩\n[GOAL]\ncase h.e'_3.h.mp.intro.intro.intro\nX : Scheme\ninst✝ : IsAffine X\nx : ↑(X.presheaf.obj (op ⊤))\n⊢ ∃ x_1,\n    (∃ x, x ∈ Set.range PrimeSpectrum.basicOpen ∧ ↑x = x_1) ∧\n      ↑(TopCat.homeoOfIso (Scheme.forgetToTop.mapIso (Scheme.isoSpec X))) ⁻¹' x_1 = ↑(Scheme.basicOpen X x)\n[PROOFSTEP]\nrefine' ⟨_, ⟨_, ⟨x, rfl⟩, rfl⟩, _⟩\n[GOAL]\ncase h.e'_3.h.mp.intro.intro.intro\nX : Scheme\ninst✝ : IsAffine X\nx : ↑(X.presheaf.obj (op ⊤))\n⊢ ↑(TopCat.homeoOfIso (Scheme.forgetToTop.mapIso (Scheme.isoSpec X))) ⁻¹' ↑(PrimeSpectrum.basicOpen x) =\n    ↑(Scheme.basicOpen X x)\n[PROOFSTEP]\nexact congr_arg Opens.carrier (X.map_PrimeSpectrum_basicOpen_of_affine x)\n[GOAL]\ncase h.e'_3.h.mpr\nX : Scheme\ninst✝ : IsAffine X\nx✝ : Set ↑↑X.toPresheafedSpace\n⊢ (∃ x,\n      (∃ x_1, x_1 ∈ Set.range PrimeSpectrum.basicOpen ∧ ↑x_1 = x) ∧\n        ↑(TopCat.homeoOfIso (Scheme.forgetToTop.mapIso (Scheme.isoSpec X))) ⁻¹' x = x✝) →\n    ∃ x, x ∈ Set.range (Scheme.basicOpen X) ∧ ↑x = x✝\n[PROOFSTEP]\nrintro ⟨_, ⟨_, ⟨x, rfl⟩, rfl⟩, rfl⟩\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.intro\nX : Scheme\ninst✝ : IsAffine X\nx : ↑(op (Scheme.Γ.obj (op X))).unop\n⊢ ∃ x_1,\n    x_1 ∈ Set.range (Scheme.basicOpen X) ∧\n      ↑x_1 = ↑(TopCat.homeoOfIso (Scheme.forgetToTop.mapIso (Scheme.isoSpec X))) ⁻¹' ↑(PrimeSpectrum.basicOpen x)\n[PROOFSTEP]\nrefine' ⟨_, ⟨x, rfl⟩, _⟩\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.intro\nX : Scheme\ninst✝ : IsAffine X\nx : ↑(op (Scheme.Γ.obj (op X))).unop\n⊢ ↑(Scheme.basicOpen X x) =\n    ↑(TopCat.homeoOfIso (Scheme.forgetToTop.mapIso (Scheme.isoSpec X))) ⁻¹' ↑(PrimeSpectrum.basicOpen x)\n[PROOFSTEP]\nexact congr_arg Opens.carrier (X.map_PrimeSpectrum_basicOpen_of_affine x).symm\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nV : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ V }\nh : ↑x ∈ U\n⊢ ∃ f, Scheme.basicOpen X f ≤ V ∧ ↑x ∈ Scheme.basicOpen X f\n[PROOFSTEP]\nhaveI : IsAffine _ := hU\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nV : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ V }\nh : ↑x ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ ∃ f, Scheme.basicOpen X f ≤ V ∧ ↑x ∈ Scheme.basicOpen X f\n[PROOFSTEP]\nobtain ⟨_, ⟨_, ⟨r, rfl⟩, rfl⟩, h₁, h₂⟩ :=\n  (isBasis_basicOpen (X.restrict U.openEmbedding)).exists_subset_of_mem_open (x.2 : ⟨x, h⟩ ∈ _)\n    ((Opens.map U.inclusion).obj V).isOpen\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nV : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ V }\nh : ↑x ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nr :\n  ↑((Scheme.restrict X\n                  (_ :\n                    OpenEmbedding\n                      ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n      (op ⊤))\nh₁ : { val := ↑x, property := h } ∈ ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r)\nh₂ :\n  ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) ⊆\n    ↑((Opens.map (Opens.inclusion U)).obj V)\n⊢ ∃ f, Scheme.basicOpen X f ≤ V ∧ ↑x ∈ Scheme.basicOpen X f\n[PROOFSTEP]\nhave :\n  U.openEmbedding.isOpenMap.functor.obj ((X.restrict U.openEmbedding).basicOpen r) =\n    X.basicOpen (X.presheaf.map (eqToHom U.openEmbedding_obj_top.symm).op r) :=\n  by\n  refine' (Scheme.image_basicOpen (X.ofRestrict U.openEmbedding) r).trans _\n  erw [← Scheme.basicOpen_res_eq _ _ (eqToHom U.openEmbedding_obj_top).op]\n  rw [← comp_apply, ← CategoryTheory.Functor.map_comp, ← op_comp, eqToHom_trans, eqToHom_refl, op_id,\n    CategoryTheory.Functor.map_id, Scheme.Hom.invApp]\n  erw [PresheafedSpace.IsOpenImmersion.ofRestrict_invApp]\n  congr\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nV : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ V }\nh : ↑x ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nr :\n  ↑((Scheme.restrict X\n                  (_ :\n                    OpenEmbedding\n                      ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n      (op ⊤))\nh₁ : { val := ↑x, property := h } ∈ ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r)\nh₂ :\n  ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) ⊆\n    ↑((Opens.map (Opens.inclusion U)).obj V)\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) =\n    Scheme.basicOpen X\n      (↑(X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op) r)\n[PROOFSTEP]\nrefine' (Scheme.image_basicOpen (X.ofRestrict U.openEmbedding) r).trans _\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nV : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ V }\nh : ↑x ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nr :\n  ↑((Scheme.restrict X\n                  (_ :\n                    OpenEmbedding\n                      ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n      (op ⊤))\nh₁ : { val := ↑x, property := h } ∈ ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r)\nh₂ :\n  ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) ⊆\n    ↑((Opens.map (Opens.inclusion U)).obj V)\n⊢ Scheme.basicOpen X (↑(Scheme.Hom.invApp (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) ⊤) r) =\n    Scheme.basicOpen X\n      (↑(X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op) r)\n[PROOFSTEP]\nerw [← Scheme.basicOpen_res_eq _ _ (eqToHom U.openEmbedding_obj_top).op]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nV : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ V }\nh : ↑x ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nr :\n  ↑((Scheme.restrict X\n                  (_ :\n                    OpenEmbedding\n                      ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n      (op ⊤))\nh₁ : { val := ↑x, property := h } ∈ ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r)\nh₂ :\n  ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) ⊆\n    ↑((Opens.map (Opens.inclusion U)).obj V)\n⊢ Scheme.basicOpen X (↑(Scheme.Hom.invApp (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) ⊤) r) =\n    Scheme.basicOpen X\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op)\n        (↑(X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op) r))\n[PROOFSTEP]\nrw [← comp_apply, ← CategoryTheory.Functor.map_comp, ← op_comp, eqToHom_trans, eqToHom_refl, op_id,\n  CategoryTheory.Functor.map_id, Scheme.Hom.invApp]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nV : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ V }\nh : ↑x ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nr :\n  ↑((Scheme.restrict X\n                  (_ :\n                    OpenEmbedding\n                      ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n      (op ⊤))\nh₁ : { val := ↑x, property := h } ∈ ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r)\nh₂ :\n  ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) ⊆\n    ↑((Opens.map (Opens.inclusion U)).obj V)\n⊢ Scheme.basicOpen X\n      (↑(PresheafedSpace.IsOpenImmersion.invApp\n            (_ : IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ⊤)\n        r) =\n    Scheme.basicOpen X (↑(𝟙 (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)))) r)\n[PROOFSTEP]\nerw [PresheafedSpace.IsOpenImmersion.ofRestrict_invApp]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nV : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ V }\nh : ↑x ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nr :\n  ↑((Scheme.restrict X\n                  (_ :\n                    OpenEmbedding\n                      ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n      (op ⊤))\nh₁ : { val := ↑x, property := h } ∈ ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r)\nh₂ :\n  ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) ⊆\n    ↑((Opens.map (Opens.inclusion U)).obj V)\n⊢ Scheme.basicOpen X\n      (↑(𝟙\n            ((PresheafedSpace.restrict X.toPresheafedSpace (_ : OpenEmbedding ↑(Opens.inclusion U))).presheaf.obj\n              (op ⊤)))\n        r) =\n    Scheme.basicOpen X (↑(𝟙 (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)))) r)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nV : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ V }\nh : ↑x ∈ U\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nr :\n  ↑((Scheme.restrict X\n                  (_ :\n                    OpenEmbedding\n                      ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n      (op ⊤))\nh₁ : { val := ↑x, property := h } ∈ ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r)\nh₂ :\n  ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) ⊆\n    ↑((Opens.map (Opens.inclusion U)).obj V)\nthis :\n  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) =\n    Scheme.basicOpen X\n      (↑(X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op) r)\n⊢ ∃ f, Scheme.basicOpen X f ≤ V ∧ ↑x ∈ Scheme.basicOpen X f\n[PROOFSTEP]\nuse X.presheaf.map (eqToHom U.openEmbedding_obj_top.symm).op r\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nV : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ V }\nh : ↑x ∈ U\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nr :\n  ↑((Scheme.restrict X\n                  (_ :\n                    OpenEmbedding\n                      ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n      (op ⊤))\nh₁ : { val := ↑x, property := h } ∈ ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r)\nh₂ :\n  ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) ⊆\n    ↑((Opens.map (Opens.inclusion U)).obj V)\nthis :\n  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) =\n    Scheme.basicOpen X\n      (↑(X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op) r)\n⊢ Scheme.basicOpen X\n        (↑(X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op) r) ≤\n      V ∧\n    ↑x ∈\n      Scheme.basicOpen X\n        (↑(X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op) r)\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nV : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ V }\nh : ↑x ∈ U\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nr :\n  ↑((Scheme.restrict X\n                  (_ :\n                    OpenEmbedding\n                      ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n      (op ⊤))\nh₁ : { val := ↑x, property := h } ∈ ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r)\nh₂ :\n  ↑(Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) ⊆\n    ↑((Opens.map (Opens.inclusion U)).obj V)\nthis :\n  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) =\n    Scheme.basicOpen X\n      (↑(X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op) r)\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n        (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r) ≤\n      V ∧\n    ↑x ∈\n      (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n        (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) r)\n[PROOFSTEP]\nexact ⟨Set.image_subset_iff.mpr h₂, ⟨_, h⟩, h₁, rfl⟩\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ (Opens.map (fromSpec hU).val.base).obj (Scheme.basicOpen X f) =\n    RingedSpace.basicOpen\n      (LocallyRingedSpace.forgetToSheafedSpace.op.obj\n          (Spec.toLocallyRingedSpace.rightOp.obj (X.presheaf.obj (op U)))).unop\n      (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U))) f)\n[PROOFSTEP]\nerw [LocallyRingedSpace.preimage_basicOpen]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ RingedSpace.basicOpen\n      (LocallyRingedSpace.toRingedSpace (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toLocallyRingedSpace)\n      (↑(NatTrans.app (fromSpec hU).val.c (op U)) f) =\n    RingedSpace.basicOpen\n      (LocallyRingedSpace.forgetToSheafedSpace.op.obj\n          (Spec.toLocallyRingedSpace.rightOp.obj (X.presheaf.obj (op U)))).unop\n      (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U))) f)\n[PROOFSTEP]\nrefine'\n  Eq.trans _\n    (RingedSpace.basicOpen_res_eq (Scheme.Spec.obj <| op <| X.presheaf.obj (op U)).toLocallyRingedSpace.toRingedSpace\n      (eqToHom hU.fromSpec_base_preimage).op _)\n      -- Porting note : `congr` does not work\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ RingedSpace.basicOpen\n      (LocallyRingedSpace.toRingedSpace (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toLocallyRingedSpace)\n      (↑(NatTrans.app (fromSpec hU).val.c (op U)) f) =\n    RingedSpace.basicOpen\n      (LocallyRingedSpace.toRingedSpace (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toLocallyRingedSpace)\n      (↑((LocallyRingedSpace.toRingedSpace\n                    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toLocallyRingedSpace).toPresheafedSpace.presheaf.map\n            (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op)\n        (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U))) f))\n[PROOFSTEP]\nrefine\n  congr_arg (RingedSpace.basicOpen _ ·)\n    ?_\n      -- Porting note : change `rw` to `erw`\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ ↑(NatTrans.app (fromSpec hU).val.c (op U)) f =\n    ↑((LocallyRingedSpace.toRingedSpace\n                  (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toLocallyRingedSpace).toPresheafedSpace.presheaf.map\n          (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op)\n      (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U))) f)\n[PROOFSTEP]\nerw [← comp_apply]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ ↑(NatTrans.app (fromSpec hU).val.c (op U)) f =\n    ↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U)) ≫\n          (LocallyRingedSpace.toRingedSpace\n                    (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toLocallyRingedSpace).toPresheafedSpace.presheaf.map\n            (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op)\n      f\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ NatTrans.app (fromSpec hU).val.c (op U) =\n    NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U)) ≫\n      (LocallyRingedSpace.toRingedSpace\n                (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toLocallyRingedSpace).toPresheafedSpace.presheaf.map\n        (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op\n[PROOFSTEP]\nerw [← hU.SpecΓIdentity_hom_app_fromSpec]\n[GOAL]\ncase e_a\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ NatTrans.app (fromSpec hU).val.c (op U) =\n    NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U)) ≫\n      NatTrans.app SpecΓIdentity.hom (X.presheaf.obj (op U)) ≫ NatTrans.app (fromSpec hU).val.c (op U)\n[PROOFSTEP]\nrw [Iso.inv_hom_id_app_assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ IsIso (basicOpenSectionsToAffine hU f)\n[PROOFSTEP]\ndelta basicOpenSectionsToAffine\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ IsIso\n    (NatTrans.app (IsAffineOpen.fromSpec hU).val.c (op (Scheme.basicOpen X f)) ≫\n      (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n        (eqToHom\n            (_ :\n              RingedSpace.basicOpen\n                  (LocallyRingedSpace.forgetToSheafedSpace.op.obj\n                      (Spec.toLocallyRingedSpace.rightOp.obj (X.presheaf.obj (op U)))).unop\n                  (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U))) f) =\n                (Opens.map (IsAffineOpen.fromSpec hU).val.base).obj (Scheme.basicOpen X f))).op)\n[PROOFSTEP]\napply (config := { allowSynthFailures := true }) IsIso.comp_isIso\n[GOAL]\ncase inst\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ IsIso (NatTrans.app (IsAffineOpen.fromSpec hU).val.c (op (Scheme.basicOpen X f)))\n[PROOFSTEP]\napply PresheafedSpace.IsOpenImmersion.isIso_of_subset\n[GOAL]\ncase inst.hU\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ ↑(Scheme.basicOpen X f) ⊆ Set.range ↑(IsAffineOpen.fromSpec hU).val.base\n[PROOFSTEP]\nrw [hU.fromSpec_range]\n[GOAL]\ncase inst.hU\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ ↑(Scheme.basicOpen X f) ⊆ ↑U\n[PROOFSTEP]\nexact RingedSpace.basicOpen_le _ _\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ IsLocalization.Away f ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n[PROOFSTEP]\napply\n  (IsLocalization.isLocalization_iff_of_ringEquiv (Submonoid.powers f)\n      (asIso <|\n          basicOpenSectionsToAffine hU f ≫\n            (Scheme.Spec.obj _).presheaf.map\n              (eqToHom (basicOpen_eq_of_affine _).symm).op).commRingCatIsoToRingEquiv).mpr\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ IsLocalization (Submonoid.powers f)\n    ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f)))\n[PROOFSTEP]\nconvert StructureSheaf.IsLocalization.to_basicOpen _ f using 1\n  -- Porting note : more hand holding is required here, the next 4 lines were not necessary\n[GOAL]\ncase h.e'_3.h.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ne_1✝ :\n  ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f))) =\n    ↑((structureSheaf ↑(X.presheaf.obj (op U))).val.obj (op (PrimeSpectrum.basicOpen f)))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\n⊢ RingHom.toAlgebra\n      (RingHom.comp\n        (RingEquiv.toRingHom\n          (Iso.commRingCatIsoToRingEquiv\n            (asIso\n              (basicOpenSectionsToAffine hU f ≫\n                (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n                  (eqToHom\n                      (_ :\n                        PrimeSpectrum.basicOpen f =\n                          Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n                            (↑(SpecΓIdentity.app (X.presheaf.obj (op U))).inv f))).op))))\n        (algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))) =\n    StructureSheaf.openAlgebra (↑(X.presheaf.obj (op U))) (op (PrimeSpectrum.basicOpen f))\n[PROOFSTEP]\ndelta StructureSheaf.openAlgebra\n[GOAL]\ncase h.e'_3.h.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ne_1✝ :\n  ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f))) =\n    ↑((structureSheaf ↑(X.presheaf.obj (op U))).val.obj (op (PrimeSpectrum.basicOpen f)))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\n⊢ RingHom.toAlgebra\n      (RingHom.comp\n        (RingEquiv.toRingHom\n          (Iso.commRingCatIsoToRingEquiv\n            (asIso\n              (basicOpenSectionsToAffine hU f ≫\n                (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n                  (eqToHom\n                      (_ :\n                        PrimeSpectrum.basicOpen f =\n                          Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n                            (↑(SpecΓIdentity.app (X.presheaf.obj (op U))).inv f))).op))))\n        (algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))) =\n    RingHom.toAlgebra (StructureSheaf.toOpen (↑(X.presheaf.obj (op U))) (op (PrimeSpectrum.basicOpen f)).unop)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_3.h.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ne_1✝ :\n  ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f))) =\n    ↑((structureSheaf ↑(X.presheaf.obj (op U))).val.obj (op (PrimeSpectrum.basicOpen f)))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\n⊢ RingHom.comp\n      (RingEquiv.toRingHom\n        (Iso.commRingCatIsoToRingEquiv\n          (asIso\n            (basicOpenSectionsToAffine hU f ≫\n              (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n                (eqToHom\n                    (_ :\n                      PrimeSpectrum.basicOpen f =\n                        Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n                          (↑(SpecΓIdentity.app (X.presheaf.obj (op U))).inv f))).op))))\n      (algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) =\n    StructureSheaf.toOpen (↑(X.presheaf.obj (op U))) (op (PrimeSpectrum.basicOpen f)).unop\n[PROOFSTEP]\nrw [CommRingCat.ringHom_comp_eq_comp, Iso.commRingIsoToRingEquiv_toRingHom, asIso_hom]\n[GOAL]\ncase h.e'_3.h.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ne_1✝ :\n  ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f))) =\n    ↑((structureSheaf ↑(X.presheaf.obj (op U))).val.obj (op (PrimeSpectrum.basicOpen f)))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\n⊢ CommRingCat.ofHom (algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) ≫\n      CommRingCat.ofHom\n        (basicOpenSectionsToAffine hU f ≫\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n            (eqToHom\n                (_ :\n                  PrimeSpectrum.basicOpen f =\n                    Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n                      (↑(SpecΓIdentity.app (X.presheaf.obj (op U))).inv f))).op) =\n    StructureSheaf.toOpen (↑(X.presheaf.obj (op U))) (op (PrimeSpectrum.basicOpen f)).unop\n[PROOFSTEP]\ndsimp [CommRingCat.ofHom]\n[GOAL]\ncase h.e'_3.h.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ne_1✝ :\n  ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f))) =\n    ↑((structureSheaf ↑(X.presheaf.obj (op U))).val.obj (op (PrimeSpectrum.basicOpen f)))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\n⊢ algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))) ≫\n      basicOpenSectionsToAffine hU f ≫\n        (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n          (eqToHom\n              (_ :\n                PrimeSpectrum.basicOpen f =\n                  Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n                    (↑(toSpecΓ (X.presheaf.obj (op U))) f))).op =\n    StructureSheaf.toOpen (↑(X.presheaf.obj (op U))) (PrimeSpectrum.basicOpen f)\n[PROOFSTEP]\nchange X.presheaf.map _ ≫ basicOpenSectionsToAffine hU f ≫ _ = _\n[GOAL]\ncase h.e'_3.h.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ne_1✝ :\n  ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f))) =\n    ↑((structureSheaf ↑(X.presheaf.obj (op U))).val.obj (op (PrimeSpectrum.basicOpen f)))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\n⊢ X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op ≫\n      basicOpenSectionsToAffine hU f ≫\n        (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n          (eqToHom\n              (_ :\n                PrimeSpectrum.basicOpen f =\n                  Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n                    (↑(toSpecΓ (X.presheaf.obj (op U))) f))).op =\n    StructureSheaf.toOpen (↑(X.presheaf.obj (op U))) (PrimeSpectrum.basicOpen f)\n[PROOFSTEP]\ndelta basicOpenSectionsToAffine\n[GOAL]\ncase h.e'_3.h.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ne_1✝ :\n  ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f))) =\n    ↑((structureSheaf ↑(X.presheaf.obj (op U))).val.obj (op (PrimeSpectrum.basicOpen f)))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\n⊢ X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op ≫\n      (NatTrans.app (IsAffineOpen.fromSpec hU).val.c (op (Scheme.basicOpen X f)) ≫\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n            (eqToHom\n                (_ :\n                  RingedSpace.basicOpen\n                      (LocallyRingedSpace.forgetToSheafedSpace.op.obj\n                          (Spec.toLocallyRingedSpace.rightOp.obj (X.presheaf.obj (op U)))).unop\n                      (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U))) f) =\n                    (Opens.map (IsAffineOpen.fromSpec hU).val.base).obj (Scheme.basicOpen X f))).op) ≫\n        (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n          (eqToHom\n              (_ :\n                PrimeSpectrum.basicOpen f =\n                  Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n                    (↑(toSpecΓ (X.presheaf.obj (op U))) f))).op =\n    StructureSheaf.toOpen (↑(X.presheaf.obj (op U))) (PrimeSpectrum.basicOpen f)\n[PROOFSTEP]\nsimp only [Scheme.comp_val_c_app, Category.assoc]\n  -- Porting note : `erw naturality_assoc` for some reason does not work, so changed to a version\n    -- where `naturality` is used, the good thing is that `erw` is changed back to `rw`\n[GOAL]\ncase h.e'_3.h.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ne_1✝ :\n  ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f))) =\n    ↑((structureSheaf ↑(X.presheaf.obj (op U))).val.obj (op (PrimeSpectrum.basicOpen f)))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\n⊢ X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op ≫\n      NatTrans.app (IsAffineOpen.fromSpec hU).val.c (op (Scheme.basicOpen X f)) ≫\n        (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n            (eqToHom\n                (_ :\n                  RingedSpace.basicOpen\n                      (LocallyRingedSpace.forgetToSheafedSpace.op.obj\n                          (Spec.toLocallyRingedSpace.rightOp.obj (X.presheaf.obj (op U)))).unop\n                      (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U))) f) =\n                    (Opens.map (IsAffineOpen.fromSpec hU).val.base).obj (Scheme.basicOpen X f))).op ≫\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n            (eqToHom\n                (_ :\n                  PrimeSpectrum.basicOpen f =\n                    Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n                      (↑(toSpecΓ (X.presheaf.obj (op U))) f))).op =\n    StructureSheaf.toOpen (↑(X.presheaf.obj (op U))) (PrimeSpectrum.basicOpen f)\n[PROOFSTEP]\nsimp only [← Category.assoc]\n[GOAL]\ncase h.e'_3.h.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ne_1✝ :\n  ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f))) =\n    ↑((structureSheaf ↑(X.presheaf.obj (op U))).val.obj (op (PrimeSpectrum.basicOpen f)))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\n⊢ ((X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op ≫\n          NatTrans.app (IsAffineOpen.fromSpec hU).val.c (op (Scheme.basicOpen X f))) ≫\n        (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n          (eqToHom\n              (_ :\n                RingedSpace.basicOpen\n                    (LocallyRingedSpace.forgetToSheafedSpace.op.obj\n                        (Spec.toLocallyRingedSpace.rightOp.obj (X.presheaf.obj (op U)))).unop\n                    (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U))) f) =\n                  (Opens.map (IsAffineOpen.fromSpec hU).val.base).obj (Scheme.basicOpen X f))).op) ≫\n      (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n        (eqToHom\n            (_ :\n              PrimeSpectrum.basicOpen f =\n                Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n                  (↑(toSpecΓ (X.presheaf.obj (op U))) f))).op =\n    StructureSheaf.toOpen (↑(X.presheaf.obj (op U))) (PrimeSpectrum.basicOpen f)\n[PROOFSTEP]\nrw [hU.fromSpec.val.c.naturality, hU.fromSpec_app_eq]\n  -- simp only [Category.assoc]\n    -- rw [hU.fromSpec_app_eq]\n[GOAL]\ncase h.e'_3.h.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ne_1✝ :\n  ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f))) =\n    ↑((structureSheaf ↑(X.presheaf.obj (op U))).val.obj (op (PrimeSpectrum.basicOpen f)))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\n⊢ (((NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U)) ≫\n            (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n              (eqToHom (_ : (Opens.map (IsAffineOpen.fromSpec hU).val.base).obj U = ⊤)).op) ≫\n          ((IsAffineOpen.fromSpec hU).val.base _* (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).map\n            (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) ≫\n        (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n          (eqToHom\n              (_ :\n                RingedSpace.basicOpen\n                    (LocallyRingedSpace.forgetToSheafedSpace.op.obj\n                        (Spec.toLocallyRingedSpace.rightOp.obj (X.presheaf.obj (op U)))).unop\n                    (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U))) f) =\n                  (Opens.map (IsAffineOpen.fromSpec hU).val.base).obj (Scheme.basicOpen X f))).op) ≫\n      (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n        (eqToHom\n            (_ :\n              PrimeSpectrum.basicOpen f =\n                Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n                  (↑(toSpecΓ (X.presheaf.obj (op U))) f))).op =\n    StructureSheaf.toOpen (↑(X.presheaf.obj (op U))) (PrimeSpectrum.basicOpen f)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_3.h.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ne_1✝ :\n  ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f))) =\n    ↑((structureSheaf ↑(X.presheaf.obj (op U))).val.obj (op (PrimeSpectrum.basicOpen f)))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\n⊢ (((toSpecΓ (X.presheaf.obj (op U)) ≫\n            (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n              (eqToHom (_ : (Opens.map (IsAffineOpen.fromSpec hU).val.base).obj U = ⊤)).op) ≫\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n            ((Opens.map (IsAffineOpen.fromSpec hU).val.base).map\n                (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U))).op) ≫\n        (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n          (eqToHom\n              (_ :\n                RingedSpace.basicOpen\n                    (LocallyRingedSpace.forgetToSheafedSpace.op.obj\n                        (Spec.toLocallyRingedSpace.rightOp.obj (X.presheaf.obj (op U)))).unop\n                    (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U))) f) =\n                  (Opens.map (IsAffineOpen.fromSpec hU).val.base).obj (Scheme.basicOpen X f))).op) ≫\n      (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n        (eqToHom\n            (_ :\n              PrimeSpectrum.basicOpen f =\n                Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n                  (↑(toSpecΓ (X.presheaf.obj (op U))) f))).op =\n    StructureSheaf.toOpen (↑(X.presheaf.obj (op U))) (PrimeSpectrum.basicOpen f)\n[PROOFSTEP]\nsimp only [Category.assoc, ← Functor.map_comp, ← op_comp]\n[GOAL]\ncase h.e'_3.h.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ne_1✝ :\n  ↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op (PrimeSpectrum.basicOpen f))) =\n    ↑((structureSheaf ↑(X.presheaf.obj (op U))).val.obj (op (PrimeSpectrum.basicOpen f)))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\n⊢ toSpecΓ (X.presheaf.obj (op U)) ≫\n      (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n        (eqToHom\n              (_ :\n                PrimeSpectrum.basicOpen f =\n                  Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U))))\n                    (↑(toSpecΓ (X.presheaf.obj (op U))) f)) ≫\n            eqToHom\n                (_ :\n                  RingedSpace.basicOpen\n                      (LocallyRingedSpace.forgetToSheafedSpace.op.obj\n                          (Spec.toLocallyRingedSpace.rightOp.obj (X.presheaf.obj (op U)))).unop\n                      (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U))) f) =\n                    (Opens.map (IsAffineOpen.fromSpec hU).val.base).obj (Scheme.basicOpen X f)) ≫\n              (Opens.map (IsAffineOpen.fromSpec hU).val.base).map\n                  (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)) ≫\n                eqToHom (_ : (Opens.map (IsAffineOpen.fromSpec hU).val.base).obj U = ⊤)).op =\n    StructureSheaf.toOpen (↑(X.presheaf.obj (op U))) (PrimeSpectrum.basicOpen f)\n[PROOFSTEP]\napply StructureSheaf.toOpen_res\n[GOAL]\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : V ⟶ U\nhU : IsAffineOpen U\nr : ↑(X.presheaf.obj (op U))\ne : V = Scheme.basicOpen X r\n⊢ IsLocalization.Away r ↑(X.presheaf.obj (op V))\n[PROOFSTEP]\nsubst e\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nr : ↑(X.presheaf.obj (op U))\ni : Scheme.basicOpen X r ⟶ U\n⊢ IsLocalization.Away r ↑(X.presheaf.obj (op (Scheme.basicOpen X r)))\n[PROOFSTEP]\nconvert isLocalization_basicOpen hU r using 3\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ng : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n⊢ ∃ f', Scheme.basicOpen X f' = Scheme.basicOpen X g\n[PROOFSTEP]\nhaveI := isLocalization_basicOpen hU f\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\ng : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nthis : IsLocalization.Away f ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n⊢ ∃ f', Scheme.basicOpen X f' = Scheme.basicOpen X g\n[PROOFSTEP]\nobtain ⟨x, ⟨_, n, rfl⟩, rfl⟩ := IsLocalization.surj'' (Submonoid.powers f) g\n[GOAL]\ncase intro.intro.mk.intro\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\nthis : IsLocalization.Away f ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nx : ↑(X.presheaf.obj (op U))\nn : ℕ\n⊢ ∃ f',\n    Scheme.basicOpen X f' =\n      Scheme.basicOpen X\n        (x •\n          ↑(↑(IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n              { val := (fun x x_1 => x ^ x_1) f n,\n                property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) }))\n[PROOFSTEP]\nuse f * x\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\nthis : IsLocalization.Away f ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nx : ↑(X.presheaf.obj (op U))\nn : ℕ\n⊢ Scheme.basicOpen X (f * x) =\n    Scheme.basicOpen X\n      (x •\n        ↑(↑(IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n            { val := (fun x x_1 => x ^ x_1) f n,\n              property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) }))\n[PROOFSTEP]\nrw [Algebra.smul_def, Scheme.basicOpen_mul, Scheme.basicOpen_mul]\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\nthis : IsLocalization.Away f ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nx : ↑(X.presheaf.obj (op U))\nn : ℕ\n⊢ Scheme.basicOpen X f ⊓ Scheme.basicOpen X x =\n    Scheme.basicOpen X (↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) x) ⊓\n      Scheme.basicOpen X\n        ↑(↑(IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n            { val := (fun x x_1 => x ^ x_1) f n,\n              property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) })\n[PROOFSTEP]\nerw [Scheme.basicOpen_res]\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\nthis : IsLocalization.Away f ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nx : ↑(X.presheaf.obj (op U))\nn : ℕ\n⊢ Scheme.basicOpen X f ⊓ Scheme.basicOpen X x =\n    Scheme.basicOpen X f ⊓ Scheme.basicOpen X x ⊓\n      Scheme.basicOpen X\n        ↑(↑(IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n            { val := (fun x x_1 => x ^ x_1) f n,\n              property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) })\n[PROOFSTEP]\nrefine' (inf_eq_left.mpr _).symm\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\nthis : IsLocalization.Away f ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nx : ↑(X.presheaf.obj (op U))\nn : ℕ\n⊢ Scheme.basicOpen X f ⊓ Scheme.basicOpen X x ≤\n    Scheme.basicOpen X\n      ↑(↑(IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n          { val := (fun x x_1 => x ^ x_1) f n,\n            property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) })\n[PROOFSTEP]\nconvert inf_le_left (α := Opens X) using 1\n[GOAL]\ncase h.e'_4\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\nthis : IsLocalization.Away f ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nx : ↑(X.presheaf.obj (op U))\nn : ℕ\n⊢ Scheme.basicOpen X\n      ↑(↑(IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n          { val := (fun x x_1 => x ^ x_1) f n,\n            property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) }) =\n    Scheme.basicOpen X f\n[PROOFSTEP]\napply Scheme.basicOpen_of_isUnit\n[GOAL]\ncase h.e'_4.hf\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\nthis : IsLocalization.Away f ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nx : ↑(X.presheaf.obj (op U))\nn : ℕ\n⊢ IsUnit\n    ↑(↑(IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n        { val := (fun x x_1 => x ^ x_1) f n,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) })\n[PROOFSTEP]\napply\n  Submonoid.leftInv_le_isUnit _\n    (IsLocalization.toInvSubmonoid (Submonoid.powers f) (X.presheaf.obj (op <| X.basicOpen f)) _).prop\n[GOAL]\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhV : IsAffineOpen V\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ U ⊓ V\n⊢ ∃ f g, Scheme.basicOpen X f = Scheme.basicOpen X g ∧ x ∈ Scheme.basicOpen X f\n[PROOFSTEP]\nobtain ⟨f, hf₁, hf₂⟩ := hU.exists_basicOpen_le ⟨x, hx.2⟩ hx.1\n[GOAL]\ncase intro.intro\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhV : IsAffineOpen V\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ U ⊓ V\nf : ↑(X.presheaf.obj (op U))\nhf₁ : Scheme.basicOpen X f ≤ V\nhf₂ : ↑{ val := x, property := (_ : x ∈ ↑V) } ∈ Scheme.basicOpen X f\n⊢ ∃ f g, Scheme.basicOpen X f = Scheme.basicOpen X g ∧ x ∈ Scheme.basicOpen X f\n[PROOFSTEP]\nobtain ⟨g, hg₁, hg₂⟩ := hV.exists_basicOpen_le ⟨x, hf₂⟩ hx.2\n[GOAL]\ncase intro.intro.intro.intro\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhV : IsAffineOpen V\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ U ⊓ V\nf : ↑(X.presheaf.obj (op U))\nhf₁ : Scheme.basicOpen X f ≤ V\nhf₂ : ↑{ val := x, property := (_ : x ∈ ↑V) } ∈ Scheme.basicOpen X f\ng : ↑(X.presheaf.obj (op V))\nhg₁ : Scheme.basicOpen X g ≤ Scheme.basicOpen X f\nhg₂ : ↑{ val := x, property := hf₂ } ∈ Scheme.basicOpen X g\n⊢ ∃ f g, Scheme.basicOpen X f = Scheme.basicOpen X g ∧ x ∈ Scheme.basicOpen X f\n[PROOFSTEP]\nobtain ⟨f', hf'⟩ := basicOpen_basicOpen_is_basicOpen hU f (X.presheaf.map (homOfLE hf₁ : _ ⟶ V).op g)\n[GOAL]\ncase intro.intro.intro.intro.intro\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhV : IsAffineOpen V\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ U ⊓ V\nf : ↑(X.presheaf.obj (op U))\nhf₁ : Scheme.basicOpen X f ≤ V\nhf₂ : ↑{ val := x, property := (_ : x ∈ ↑V) } ∈ Scheme.basicOpen X f\ng : ↑(X.presheaf.obj (op V))\nhg₁ : Scheme.basicOpen X g ≤ Scheme.basicOpen X f\nhg₂ : ↑{ val := x, property := hf₂ } ∈ Scheme.basicOpen X g\nf' : ↑(X.presheaf.obj (op U))\nhf' : Scheme.basicOpen X f' = Scheme.basicOpen X (↑(X.presheaf.map (homOfLE hf₁).op) g)\n⊢ ∃ f g, Scheme.basicOpen X f = Scheme.basicOpen X g ∧ x ∈ Scheme.basicOpen X f\n[PROOFSTEP]\nreplace hf' := (hf'.trans (RingedSpace.basicOpen_res _ _ _)).trans (inf_eq_right.mpr hg₁)\n[GOAL]\ncase intro.intro.intro.intro.intro\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhV : IsAffineOpen V\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ U ⊓ V\nf : ↑(X.presheaf.obj (op U))\nhf₁ : Scheme.basicOpen X f ≤ V\nhf₂ : ↑{ val := x, property := (_ : x ∈ ↑V) } ∈ Scheme.basicOpen X f\ng : ↑(X.presheaf.obj (op V))\nhg₁ : Scheme.basicOpen X g ≤ Scheme.basicOpen X f\nhg₂ : ↑{ val := x, property := hf₂ } ∈ Scheme.basicOpen X g\nf' : ↑(X.presheaf.obj (op U))\nhf' : Scheme.basicOpen X f' = RingedSpace.basicOpen (LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace) g\n⊢ ∃ f g, Scheme.basicOpen X f = Scheme.basicOpen X g ∧ x ∈ Scheme.basicOpen X f\n[PROOFSTEP]\nexact ⟨f', g, hf', hf'.symm ▸ hg₂⟩\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx : { x // x ∈ U }\n⊢ ↑(fromSpec hU).val.base (primeIdealOf hU x) = ↑x\n[PROOFSTEP]\ndsimp only [IsAffineOpen.fromSpec, Subtype.coe_mk]\n  -- Porting note : in the porting note of `Scheme.comp_val_base`, it says that `elementwise` is\n    -- unnecessary, indeed, the linter did not like it, so I just use `elementwise_of%` instead of\n    -- adding the corresponding lemma in `Scheme.lean` file\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx : { x // x ∈ U }\n⊢ ↑(Scheme.Spec.map\n                (X.presheaf.map\n                    (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n              (Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).inv ≫\n                Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base\n      (primeIdealOf hU x) =\n    ↑x\n[PROOFSTEP]\nerw [← elementwise_of% Scheme.comp_val_base, ← elementwise_of% Scheme.comp_val_base]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx : { x // x ∈ U }\n⊢ ↑((Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom ≫\n              Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op ≫\n                Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                  (Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).inv ≫\n                    Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base\n      x =\n    ↑x\n[PROOFSTEP]\nsimp only [← Functor.map_comp_assoc, ← Functor.map_comp, ← op_comp, eqToHom_trans, op_id, eqToHom_refl,\n  CategoryTheory.Functor.map_id, Category.id_comp, Iso.hom_inv_id_assoc]\n  -- Porting note : `simpa` did not like this rfl\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx : { x // x ∈ U }\n⊢ ↑(Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base x = ↑x\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj (op ((Opens.map (Opens.inclusion U)).obj U))).unop\n[PROOFSTEP]\nrw [Opens.inclusion_map_eq_top]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj (op ⊤)).unop\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ ((Opens.map\n              (inv\n                    (NatTrans.app ΓSpec.adjunction.unit\n                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n        (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n    (op ⊤).unop\n[PROOFSTEP]\nrw [Opens.inclusion_map_eq_top]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ ((Opens.map\n              (inv\n                    (NatTrans.app ΓSpec.adjunction.unit\n                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n        (op ⊤)).unop =\n    (op ⊤).unop\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ NatTrans.app\n      (inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n      (op ((Opens.map (Opens.inclusion U)).obj U)) =\n    X.presheaf.map\n        (op\n          (eqToHom\n            (_ :\n              (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop))) ≫\n      toSpecΓ (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) ≫\n        (Scheme.Spec.obj\n                (op\n                  (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n          (op\n            (eqToHom\n              (_ :\n                ((Opens.map\n                            (inv\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                      (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                  (op ⊤).unop)))\n[PROOFSTEP]\nhave e :\n  (Opens.map (inv (ΓSpec.adjunction.unit.app (X.restrict U.openEmbedding))).1.base).obj\n      ((Opens.map U.inclusion).obj U) =\n    ⊤ :=\n  by rw [Opens.inclusion_map_eq_top]; rfl\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ (Opens.map\n          (inv\n                (NatTrans.app ΓSpec.adjunction.unit\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n      ((Opens.map (Opens.inclusion U)).obj U) =\n    ⊤\n[PROOFSTEP]\nrw [Opens.inclusion_map_eq_top]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ (Opens.map\n          (inv\n                (NatTrans.app ΓSpec.adjunction.unit\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n      ⊤ =\n    ⊤\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne :\n  (Opens.map\n          (inv\n                (NatTrans.app ΓSpec.adjunction.unit\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n      ((Opens.map (Opens.inclusion U)).obj U) =\n    ⊤\n⊢ NatTrans.app\n      (inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n      (op ((Opens.map (Opens.inclusion U)).obj U)) =\n    X.presheaf.map\n        (op\n          (eqToHom\n            (_ :\n              (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop))) ≫\n      toSpecΓ (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) ≫\n        (Scheme.Spec.obj\n                (op\n                  (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n          (op\n            (eqToHom\n              (_ :\n                ((Opens.map\n                            (inv\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                      (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                  (op ⊤).unop)))\n[PROOFSTEP]\nrw [Scheme.inv_val_c_app, IsIso.comp_inv_eq, Scheme.app_eq _ e, ΓSpec.adjunction_unit_app_app_top]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne :\n  (Opens.map\n          (inv\n                (NatTrans.app ΓSpec.adjunction.unit\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n      ((Opens.map (Opens.inclusion U)).obj U) =\n    ⊤\n⊢ ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.map\n      (eqToHom\n          (_ :\n            (Opens.map\n                    (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) ≫\n                          inv\n                            (NatTrans.app ΓSpec.adjunction.unit\n                              (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                ((Opens.map (Opens.inclusion U)).obj U) =\n              (Opens.map (Opens.inclusion U)).obj U)).op =\n    (X.presheaf.map\n          (op\n            (eqToHom\n              (_ :\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                  ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                      (op ((Opens.map (Opens.inclusion U)).obj U))).unop))) ≫\n        toSpecΓ (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) ≫\n          (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            (op\n              (eqToHom\n                (_ :\n                  ((Opens.map\n                              (inv\n                                    (NatTrans.app ΓSpec.adjunction.unit\n                                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                        (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                    (op ⊤).unop)))) ≫\n      ((Scheme.Γ.rightOp ⋙ Scheme.Spec).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.map\n          (eqToHom\n              (_ :\n                ⊤ =\n                  (Opens.map\n                        (inv\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                    ((Opens.map (Opens.inclusion U)).obj U))).op ≫\n        NatTrans.app SpecΓIdentity.hom\n            ((Scheme.restrict X\n                          (_ :\n                            OpenEmbedding\n                              ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n              (op ⊤)) ≫\n          ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.map\n            (eqToHom\n                (_ :\n                  (Opens.map\n                          (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.base).obj\n                      ((Opens.map\n                            (inv\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                        ((Opens.map (Opens.inclusion U)).obj U)) =\n                    (Opens.map\n                          (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.base).obj\n                      ⊤)).op\n[PROOFSTEP]\nsimp only [Category.assoc, eqToHom_op, eqToHom_map]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne :\n  (Opens.map\n          (inv\n                (NatTrans.app ΓSpec.adjunction.unit\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n      ((Opens.map (Opens.inclusion U)).obj U) =\n    ⊤\n⊢ eqToHom\n      (_ :\n        ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n            (op ((Opens.map (Opens.inclusion U)).obj U)) =\n          ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n            (op\n              ((Opens.map\n                    (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) ≫\n                          inv\n                            (NatTrans.app ΓSpec.adjunction.unit\n                              (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                ((Opens.map (Opens.inclusion U)).obj U)))) =\n    X.presheaf.map\n        (op\n          (eqToHom\n            (_ :\n              (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop))) ≫\n      toSpecΓ (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) ≫\n        (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            (op\n              (eqToHom\n                (_ :\n                  ((Opens.map\n                              (inv\n                                    (NatTrans.app ΓSpec.adjunction.unit\n                                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                        (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                    (op ⊤).unop))) ≫\n          eqToHom\n              (_ :\n                ((Scheme.Γ.rightOp ⋙ Scheme.Spec).obj\n                          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n                    (op\n                      ((Opens.map\n                            (inv\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                        ((Opens.map (Opens.inclusion U)).obj U))) =\n                  ((Scheme.Γ.rightOp ⋙ Scheme.Spec).obj\n                          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n                    (op ⊤)) ≫\n            NatTrans.app SpecΓIdentity.hom\n                ((Scheme.restrict X\n                              (_ :\n                                OpenEmbedding\n                                  ↑(Opens.inclusion\n                                      U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n                  (op ⊤)) ≫\n              eqToHom\n                (_ :\n                  ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n                      ((Opens.map\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.base).op.obj\n                        (op ⊤)) =\n                    ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n                      (op\n                        ((Opens.map\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.base).obj\n                          ((Opens.map\n                                (inv\n                                      (NatTrans.app ΓSpec.adjunction.unit\n                                        (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                            ((Opens.map (Opens.inclusion U)).obj U)))))\n[PROOFSTEP]\nerw [Scheme.presheaf_map_eqToHom_op, Scheme.presheaf_map_eqToHom_op]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne :\n  (Opens.map\n          (inv\n                (NatTrans.app ΓSpec.adjunction.unit\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n      ((Opens.map (Opens.inclusion U)).obj U) =\n    ⊤\n⊢ eqToHom\n      (_ :\n        ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n            (op ((Opens.map (Opens.inclusion U)).obj U)) =\n          ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n            (op\n              ((Opens.map\n                    (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) ≫\n                          inv\n                            (NatTrans.app ΓSpec.adjunction.unit\n                              (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                ((Opens.map (Opens.inclusion U)).obj U)))) =\n    eqToHom\n        (_ :\n          X.presheaf.obj\n              (op\n                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop) =\n            X.presheaf.obj (op (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop)) ≫\n      toSpecΓ (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) ≫\n        eqToHom\n            (_ :\n              (Scheme.Spec.obj\n                        (op\n                          (X.presheaf.obj\n                            (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n                  (op (op ⊤).unop) =\n                (Scheme.Spec.obj\n                        (op\n                          (X.presheaf.obj\n                            (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.obj\n                  (op\n                    ((Opens.map\n                              (inv\n                                    (NatTrans.app ΓSpec.adjunction.unit\n                                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                        (op ((Opens.map (Opens.inclusion U)).obj U))).unop)) ≫\n          eqToHom\n              (_ :\n                ((Scheme.Γ.rightOp ⋙ Scheme.Spec).obj\n                          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n                    (op\n                      ((Opens.map\n                            (inv\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                        ((Opens.map (Opens.inclusion U)).obj U))) =\n                  ((Scheme.Γ.rightOp ⋙ Scheme.Spec).obj\n                          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n                    (op ⊤)) ≫\n            NatTrans.app SpecΓIdentity.hom\n                ((Scheme.restrict X\n                              (_ :\n                                OpenEmbedding\n                                  ↑(Opens.inclusion\n                                      U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n                  (op ⊤)) ≫\n              eqToHom\n                (_ :\n                  ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n                      ((Opens.map\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.base).op.obj\n                        (op ⊤)) =\n                    ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n                      (op\n                        ((Opens.map\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.base).obj\n                          ((Opens.map\n                                (inv\n                                      (NatTrans.app ΓSpec.adjunction.unit\n                                        (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                            ((Opens.map (Opens.inclusion U)).obj U)))))\n[PROOFSTEP]\nsimp only [eqToHom_trans_assoc, eqToHom_refl, Category.id_comp]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne :\n  (Opens.map\n          (inv\n                (NatTrans.app ΓSpec.adjunction.unit\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n      ((Opens.map (Opens.inclusion U)).obj U) =\n    ⊤\n⊢ eqToHom\n      (_ :\n        ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n            (op ((Opens.map (Opens.inclusion U)).obj U)) =\n          ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n            (op\n              ((Opens.map\n                    (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) ≫\n                          inv\n                            (NatTrans.app ΓSpec.adjunction.unit\n                              (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                ((Opens.map (Opens.inclusion U)).obj U)))) =\n    eqToHom\n        (_ :\n          X.presheaf.obj\n              (op\n                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop) =\n            X.presheaf.obj (op (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop)) ≫\n      toSpecΓ (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) ≫\n        NatTrans.app SpecΓIdentity.hom\n            ((Scheme.restrict X\n                          (_ :\n                            OpenEmbedding\n                              ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n              (op ⊤)) ≫\n          eqToHom\n            (_ :\n              ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n                  ((Opens.map\n                          (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.base).op.obj\n                    (op ⊤)) =\n                ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n                  (op\n                    ((Opens.map\n                          (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.base).obj\n                      ((Opens.map\n                            (inv\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                        ((Opens.map (Opens.inclusion U)).obj U)))))\n[PROOFSTEP]\nerw [SpecΓIdentity.inv_hom_id_app_assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\ninst✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne :\n  (Opens.map\n          (inv\n                (NatTrans.app ΓSpec.adjunction.unit\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n      ((Opens.map (Opens.inclusion U)).obj U) =\n    ⊤\n⊢ eqToHom\n      (_ :\n        ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n            (op ((Opens.map (Opens.inclusion U)).obj U)) =\n          ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n            (op\n              ((Opens.map\n                    (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))) ≫\n                          inv\n                            (NatTrans.app ΓSpec.adjunction.unit\n                              (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                ((Opens.map (Opens.inclusion U)).obj U)))) =\n    eqToHom\n        (_ :\n          X.presheaf.obj\n              (op\n                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop) =\n            X.presheaf.obj (op (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop)) ≫\n      eqToHom\n        (_ :\n          ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n              ((Opens.map\n                      (NatTrans.app ΓSpec.adjunction.unit\n                            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.base).op.obj\n                (op ⊤)) =\n            ((𝟭 Scheme).obj (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).presheaf.obj\n              (op\n                ((Opens.map\n                      (NatTrans.app ΓSpec.adjunction.unit\n                            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).val.base).obj\n                  ((Opens.map\n                        (inv\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).obj\n                    ((Opens.map (Opens.inclusion U)).obj U)))))\n[PROOFSTEP]\nrw [eqToHom_trans]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\n⊢ NatTrans.app (fromSpec hU).val.c (op U) ≫\n      TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy } =\n    StructureSheaf.toStalk (↑(X.presheaf.obj (op U))) y\n[PROOFSTEP]\nhaveI : IsAffine _ := hU\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ NatTrans.app (fromSpec hU).val.c (op U) ≫\n      TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy } =\n    StructureSheaf.toStalk (↑(X.presheaf.obj (op U))) y\n[PROOFSTEP]\ndelta IsAffineOpen.fromSpec Scheme.isoSpec StructureSheaf.toStalk\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ NatTrans.app\n        (let_fun this := (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U);\n            Scheme.Spec.map\n                (X.presheaf.map\n                    (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n              (asIso\n                    (NatTrans.app ΓSpec.adjunction.unit\n                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op U) ≫\n      TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy } =\n    StructureSheaf.toOpen ↑(X.presheaf.obj (op U)) ⊤ ≫\n      TopCat.Presheaf.germ (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        { val := y, property := True.intro }\n[PROOFSTEP]\nsimp only [Scheme.comp_val_c_app, Category.assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (op U) ≫\n      NatTrans.app\n          (asIso\n                  (NatTrans.app ΓSpec.adjunction.unit\n                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv.val.c\n          ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj (op U)) ≫\n        NatTrans.app\n            (Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n            ((Opens.map\n                    ((asIso\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).inv ≫\n                          Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n              (op U)) ≫\n          TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy } =\n    StructureSheaf.toOpen ↑(X.presheaf.obj (op U)) ⊤ ≫\n      TopCat.Presheaf.germ (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        { val := y, property := True.intro }\n[PROOFSTEP]\ndsimp only [Functor.op, asIso_inv, unop_op]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (op U) ≫\n      NatTrans.app\n          (inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.c\n          (op ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj U)) ≫\n        NatTrans.app\n            (Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n            (op\n              ((Opens.map\n                    (inv\n                            (NatTrans.app ΓSpec.adjunction.unit\n                              (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                          Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                U)) ≫\n          TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy } =\n    StructureSheaf.toOpen ↑(X.presheaf.obj (op U)) ⊤ ≫\n      TopCat.Presheaf.germ (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        { val := y, property := True.intro }\n[PROOFSTEP]\nerw [IsAffineOpen.isLocalization_stalk_aux]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (op U) ≫\n      (X.presheaf.map\n            (op\n              (eqToHom\n                (_ :\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                        (op ((Opens.map (Opens.inclusion U)).obj U))).unop))) ≫\n          toSpecΓ (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) ≫\n            (Scheme.Spec.obj\n                    (op\n                      (X.presheaf.obj\n                        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n              (op\n                (eqToHom\n                  (_ :\n                    ((Opens.map\n                                (inv\n                                      (NatTrans.app ΓSpec.adjunction.unit\n                                        (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                          (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                      (op ⊤).unop)))) ≫\n        NatTrans.app\n            (Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n            (op\n              ((Opens.map\n                    (inv\n                            (NatTrans.app ΓSpec.adjunction.unit\n                              (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                          Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                U)) ≫\n          TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy } =\n    StructureSheaf.toOpen ↑(X.presheaf.obj (op U)) ⊤ ≫\n      TopCat.Presheaf.germ (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        { val := y, property := True.intro }\n[PROOFSTEP]\nsimp only [Category.assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (op U) ≫\n      X.presheaf.map\n          (op\n            (eqToHom\n              (_ :\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                  ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                      (op ((Opens.map (Opens.inclusion U)).obj U))).unop))) ≫\n        toSpecΓ (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) ≫\n          (Scheme.Spec.obj\n                    (op\n                      (X.presheaf.obj\n                        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n              (op\n                (eqToHom\n                  (_ :\n                    ((Opens.map\n                                (inv\n                                      (NatTrans.app ΓSpec.adjunction.unit\n                                        (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                          (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                      (op ⊤).unop))) ≫\n            NatTrans.app\n                (Scheme.Spec.map\n                      (X.presheaf.map\n                          (eqToHom\n                              (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n                (op\n                  ((Opens.map\n                        (inv\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                              Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                    U)) ≫\n              TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf\n                { val := y, property := hy } =\n    StructureSheaf.toOpen ↑(X.presheaf.obj (op U)) ⊤ ≫\n      TopCat.Presheaf.germ (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        { val := y, property := True.intro }\n[PROOFSTEP]\nconv_lhs => rw [← Category.assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n| NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (op U) ≫\n    X.presheaf.map\n        (op\n          (eqToHom\n            (_ :\n              (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop))) ≫\n      toSpecΓ (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) ≫\n        (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            (op\n              (eqToHom\n                (_ :\n                  ((Opens.map\n                              (inv\n                                    (NatTrans.app ΓSpec.adjunction.unit\n                                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                        (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                    (op ⊤).unop))) ≫\n          NatTrans.app\n              (Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n              (op\n                ((Opens.map\n                      (inv\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                  U)) ≫\n            TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy }\n[PROOFSTEP]\nrw [← Category.assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n| NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (op U) ≫\n    X.presheaf.map\n        (op\n          (eqToHom\n            (_ :\n              (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop))) ≫\n      toSpecΓ (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) ≫\n        (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            (op\n              (eqToHom\n                (_ :\n                  ((Opens.map\n                              (inv\n                                    (NatTrans.app ΓSpec.adjunction.unit\n                                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                        (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                    (op ⊤).unop))) ≫\n          NatTrans.app\n              (Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n              (op\n                ((Opens.map\n                      (inv\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                  U)) ≫\n            TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy }\n[PROOFSTEP]\nrw [← Category.assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n| NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (op U) ≫\n    X.presheaf.map\n        (op\n          (eqToHom\n            (_ :\n              (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop))) ≫\n      toSpecΓ (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) ≫\n        (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            (op\n              (eqToHom\n                (_ :\n                  ((Opens.map\n                              (inv\n                                    (NatTrans.app ΓSpec.adjunction.unit\n                                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                        (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                    (op ⊤).unop))) ≫\n          NatTrans.app\n              (Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n              (op\n                ((Opens.map\n                      (inv\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                  U)) ≫\n            TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy }\n[PROOFSTEP]\nrw [← Category.assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ (NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (op U) ≫\n        X.presheaf.map\n          (op\n            (eqToHom\n              (_ :\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                  ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                      (op ((Opens.map (Opens.inclusion U)).obj U))).unop)))) ≫\n      toSpecΓ (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))) ≫\n        (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            (op\n              (eqToHom\n                (_ :\n                  ((Opens.map\n                              (inv\n                                    (NatTrans.app ΓSpec.adjunction.unit\n                                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                        (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                    (op ⊤).unop))) ≫\n          NatTrans.app\n              (Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n              (op\n                ((Opens.map\n                      (inv\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                  U)) ≫\n            TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy } =\n    StructureSheaf.toOpen ↑(X.presheaf.obj (op U)) ⊤ ≫\n      TopCat.Presheaf.germ (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        { val := y, property := True.intro }\n[PROOFSTEP]\nerw [← X.presheaf.map_comp, Spec_Γ_naturality_assoc]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ toSpecΓ (X.presheaf.obj (op U)) ≫\n      LocallyRingedSpace.Γ.map\n          (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop).op ≫\n                    op\n                      (eqToHom\n                        (_ :\n                          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                            ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                                (op ((Opens.map (Opens.inclusion U)).obj U))).unop)))).op).op ≫\n        (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            (op\n              (eqToHom\n                (_ :\n                  ((Opens.map\n                              (inv\n                                    (NatTrans.app ΓSpec.adjunction.unit\n                                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                        (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                    (op ⊤).unop))) ≫\n          NatTrans.app\n              (Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n              (op\n                ((Opens.map\n                      (inv\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                            Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                  U)) ≫\n            TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy } =\n    StructureSheaf.toOpen ↑(X.presheaf.obj (op U)) ⊤ ≫\n      TopCat.Presheaf.germ (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        { val := y, property := True.intro }\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ LocallyRingedSpace.Γ.map\n        (Spec.toLocallyRingedSpace.map\n            (X.presheaf.map\n                ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop).op ≫\n                  op\n                    (eqToHom\n                      (_ :\n                        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                              (op ((Opens.map (Opens.inclusion U)).obj U))).unop)))).op).op ≫\n      (Scheme.Spec.obj\n                (op\n                  (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n          (op\n            (eqToHom\n              (_ :\n                ((Opens.map\n                            (inv\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                      (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                  (op ⊤).unop))) ≫\n        NatTrans.app\n            (Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n            (op\n              ((Opens.map\n                    (inv\n                            (NatTrans.app ΓSpec.adjunction.unit\n                              (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                          Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                U)) ≫\n          TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy } =\n    TopCat.Presheaf.germ (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n      { val := y, property := True.intro }\n[PROOFSTEP]\nsimp only [← Category.assoc]\n[GOAL]\ncase e_a\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ ((LocallyRingedSpace.Γ.map\n            (Spec.toLocallyRingedSpace.map\n                (X.presheaf.map\n                    ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop).op ≫\n                      op\n                        (eqToHom\n                          (_ :\n                            (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                              ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                                  (op ((Opens.map (Opens.inclusion U)).obj U))).unop)))).op).op ≫\n          (Scheme.Spec.obj\n                  (op\n                    (X.presheaf.obj\n                      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n            (op\n              (eqToHom\n                (_ :\n                  ((Opens.map\n                              (inv\n                                    (NatTrans.app ΓSpec.adjunction.unit\n                                      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                        (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                    (op ⊤).unop)))) ≫\n        NatTrans.app\n          (Scheme.Spec.map\n                (X.presheaf.map\n                    (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n          (op\n            ((Opens.map\n                  (inv\n                          (NatTrans.app ΓSpec.adjunction.unit\n                            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                        Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n              U))) ≫\n      TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy } =\n    TopCat.Presheaf.germ (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n      { val := y, property := True.intro }\n[PROOFSTEP]\nconvert\n  (Spec.structureSheaf (X.presheaf.obj <| op U)).presheaf.germ_res (U := (Opens.map hU.fromSpec.val.base).obj U)\n    (homOfLE le_top) ⟨y, hy⟩ using\n  2\n[GOAL]\ncase h.e'_2.h.h.e'_6.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne_1✝ :\n  (LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) ⟶\n      TopCat.Presheaf.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf y) =\n    ((TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤) ⟶\n      TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        ↑{ val := y, property := hy })\ne_3✝ :\n  LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤)\ne_4✝ :\n  ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                  Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base _*\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n      (op U) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj\n      (op ((Opens.map (fromSpec hU).val.base).obj U))\n⊢ (LocallyRingedSpace.Γ.map\n          (Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop).op ≫\n                    op\n                      (eqToHom\n                        (_ :\n                          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                            ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                                (op ((Opens.map (Opens.inclusion U)).obj U))).unop)))).op).op ≫\n        (Scheme.Spec.obj\n                (op\n                  (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n          (op\n            (eqToHom\n              (_ :\n                ((Opens.map\n                            (inv\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                      (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                  (op ⊤).unop)))) ≫\n      NatTrans.app\n        (Scheme.Spec.map\n              (X.presheaf.map\n                  (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n        (op\n          ((Opens.map\n                (inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                      Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n            U)) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).map\n      (homOfLE (_ : (Opens.map (fromSpec hU).val.base).obj U ≤ ⊤)).op\n[PROOFSTEP]\nrw [Category.assoc]\n[GOAL]\ncase h.e'_2.h.h.e'_6.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne_1✝ :\n  (LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) ⟶\n      TopCat.Presheaf.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf y) =\n    ((TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤) ⟶\n      TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        ↑{ val := y, property := hy })\ne_3✝ :\n  LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤)\ne_4✝ :\n  ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                  Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base _*\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n      (op U) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj\n      (op ((Opens.map (fromSpec hU).val.base).obj U))\n⊢ LocallyRingedSpace.Γ.map\n        (Spec.toLocallyRingedSpace.map\n            (X.presheaf.map\n                ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop).op ≫\n                  op\n                    (eqToHom\n                      (_ :\n                        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                              (op ((Opens.map (Opens.inclusion U)).obj U))).unop)))).op).op ≫\n      (Scheme.Spec.obj\n                (op\n                  (X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))))).presheaf.map\n          (op\n            (eqToHom\n              (_ :\n                ((Opens.map\n                            (inv\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                      (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                  (op ⊤).unop))) ≫\n        NatTrans.app\n          (Scheme.Spec.map\n                (X.presheaf.map\n                    (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n          (op\n            ((Opens.map\n                  (inv\n                          (NatTrans.app ΓSpec.adjunction.unit\n                            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                        Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n              U)) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).map\n      (homOfLE (_ : (Opens.map (fromSpec hU).val.base).obj U ≤ ⊤)).op\n[PROOFSTEP]\nerw [NatTrans.naturality]\n[GOAL]\ncase h.e'_2.h.h.e'_6.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne_1✝ :\n  (LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) ⟶\n      TopCat.Presheaf.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf y) =\n    ((TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤) ⟶\n      TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        ↑{ val := y, property := hy })\ne_3✝ :\n  LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤)\ne_4✝ :\n  ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                  Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base _*\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n      (op U) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj\n      (op ((Opens.map (fromSpec hU).val.base).obj U))\n⊢ LocallyRingedSpace.Γ.map\n        (Spec.toLocallyRingedSpace.map\n            (X.presheaf.map\n                ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop).op ≫\n                  op\n                    (eqToHom\n                      (_ :\n                        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                              (op ((Opens.map (Opens.inclusion U)).obj U))).unop)))).op).op ≫\n      NatTrans.app\n          (Scheme.Spec.map\n                (X.presheaf.map\n                    (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.c\n          (op ⊤) ≫\n        ((Scheme.Spec.map\n                    (X.presheaf.map\n                        (eqToHom\n                            (_ :\n                              U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base _*\n              (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).map\n          (op\n            (eqToHom\n              (_ :\n                ((Opens.map\n                            (inv\n                                  (NatTrans.app ΓSpec.adjunction.unit\n                                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                      (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                  (op ⊤).unop))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).map\n      (homOfLE (_ : (Opens.map (fromSpec hU).val.base).obj U ≤ ⊤)).op\n[PROOFSTEP]\nrw [← LocallyRingedSpace.Γ_map_op, ← LocallyRingedSpace.Γ.map_comp_assoc, ← op_comp]\n[GOAL]\ncase h.e'_2.h.h.e'_6.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne_1✝ :\n  (LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) ⟶\n      TopCat.Presheaf.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf y) =\n    ((TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤) ⟶\n      TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        ↑{ val := y, property := hy })\ne_3✝ :\n  LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤)\ne_4✝ :\n  ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                  Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base _*\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n      (op U) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj\n      (op ((Opens.map (fromSpec hU).val.base).obj U))\n⊢ LocallyRingedSpace.Γ.map\n        (Scheme.Spec.map\n              (X.presheaf.map\n                  (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n            Spec.toLocallyRingedSpace.map\n              (X.presheaf.map\n                  ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop).op ≫\n                    op\n                      (eqToHom\n                        (_ :\n                          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                            ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                                (op ((Opens.map (Opens.inclusion U)).obj U))).unop)))).op).op ≫\n      ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom\n                          (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base _*\n            (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).map\n        (op\n          (eqToHom\n            (_ :\n              ((Opens.map\n                          (inv\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                (op ⊤).unop))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).map\n      (homOfLE (_ : (Opens.map (fromSpec hU).val.base).obj U ≤ ⊤)).op\n[PROOFSTEP]\nerw [← Scheme.Spec.map_comp]\n[GOAL]\ncase h.e'_2.h.h.e'_6.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne_1✝ :\n  (LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) ⟶\n      TopCat.Presheaf.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf y) =\n    ((TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤) ⟶\n      TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        ↑{ val := y, property := hy })\ne_3✝ :\n  LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤)\ne_4✝ :\n  ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                  Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base _*\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n      (op U) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj\n      (op ((Opens.map (fromSpec hU).val.base).obj U))\n⊢ LocallyRingedSpace.Γ.map\n        (Scheme.Spec.map\n            ((X.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n              (X.presheaf.map\n                  ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop).op ≫\n                    op\n                      (eqToHom\n                        (_ :\n                          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                            ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                                (op ((Opens.map (Opens.inclusion U)).obj U))).unop)))).op)).op ≫\n      ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom\n                          (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base _*\n            (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).map\n        (op\n          (eqToHom\n            (_ :\n              ((Opens.map\n                          (inv\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                (op ⊤).unop))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).map\n      (homOfLE (_ : (Opens.map (fromSpec hU).val.base).obj U ≤ ⊤)).op\n[PROOFSTEP]\nrw [← op_comp, ← X.presheaf.map_comp]\n[GOAL]\ncase h.e'_2.h.h.e'_6.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne_1✝ :\n  (LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) ⟶\n      TopCat.Presheaf.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf y) =\n    ((TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤) ⟶\n      TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        ↑{ val := y, property := hy })\ne_3✝ :\n  LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤)\ne_4✝ :\n  ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                  Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base _*\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n      (op U) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj\n      (op ((Opens.map (fromSpec hU).val.base).obj U))\n⊢ LocallyRingedSpace.Γ.map\n        (Scheme.Spec.map\n            (X.presheaf.map\n                (((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (op U).unop).op ≫\n                    op\n                      (eqToHom\n                        (_ :\n                          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).unop =\n                            ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                                (op ((Opens.map (Opens.inclusion U)).obj U))).unop))) ≫\n                  (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op)).op).op ≫\n      ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom\n                          (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base _*\n            (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).map\n        (op\n          (eqToHom\n            (_ :\n              ((Opens.map\n                          (inv\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                (op ⊤).unop))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).map\n      (homOfLE (_ : (Opens.map (fromSpec hU).val.base).obj U ≤ ⊤)).op\n[PROOFSTEP]\nconvert_to LocallyRingedSpace.Γ.map (Quiver.Hom.op <| Scheme.Spec.map (X.presheaf.map (𝟙 (op U))).op) ≫ _ = _\n[GOAL]\ncase h.e'_2.h.h.e'_6.h.convert_4\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne_1✝ :\n  (LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) ⟶\n      TopCat.Presheaf.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf y) =\n    ((TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤) ⟶\n      TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        ↑{ val := y, property := hy })\ne_3✝ :\n  LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤)\ne_4✝ :\n  ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                  Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base _*\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n      (op U) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj\n      (op ((Opens.map (fromSpec hU).val.base).obj U))\n⊢ LocallyRingedSpace.Γ.map (Scheme.Spec.map (X.presheaf.map (𝟙 (op U))).op).op ≫\n      ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom\n                          (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base _*\n            (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).map\n        (op\n          (eqToHom\n            (_ :\n              ((Opens.map\n                          (inv\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                (op ⊤).unop))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).map\n      (homOfLE (_ : (Opens.map (fromSpec hU).val.base).obj U ≤ ⊤)).op\n[PROOFSTEP]\nsimp only [CategoryTheory.Functor.map_id, op_id]\n[GOAL]\ncase h.e'_2.h.h.e'_6.h.convert_4\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne_1✝ :\n  (LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) ⟶\n      TopCat.Presheaf.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf y) =\n    ((TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤) ⟶\n      TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        ↑{ val := y, property := hy })\ne_3✝ :\n  LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤)\ne_4✝ :\n  ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                  Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base _*\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n      (op U) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj\n      (op ((Opens.map (fromSpec hU).val.base).obj U))\n⊢ LocallyRingedSpace.Γ.map (𝟙 (Scheme.Spec.obj (op (X.presheaf.obj (op U))))).op ≫\n      ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom\n                          (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base _*\n            (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).map\n        (op\n          (eqToHom\n            (_ :\n              ((Opens.map\n                          (inv\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                (op ⊤).unop))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).map\n      (homOfLE (_ : (Opens.map (fromSpec hU).val.base).obj U ≤ ⊤)).op\n[PROOFSTEP]\nerw [CategoryTheory.Functor.map_id]\n[GOAL]\ncase h.e'_2.h.h.e'_6.h.convert_4\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne_1✝ :\n  (LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) ⟶\n      TopCat.Presheaf.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf y) =\n    ((TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤) ⟶\n      TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        ↑{ val := y, property := hy })\ne_3✝ :\n  LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤)\ne_4✝ :\n  ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                  Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base _*\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n      (op U) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj\n      (op ((Opens.map (fromSpec hU).val.base).obj U))\n⊢ 𝟙 (LocallyRingedSpace.Γ.obj (op (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toLocallyRingedSpace)) ≫\n      ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom\n                          (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base _*\n            (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).map\n        (op\n          (eqToHom\n            (_ :\n              ((Opens.map\n                          (inv\n                                (NatTrans.app ΓSpec.adjunction.unit\n                                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                    (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n                (op ⊤).unop))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).map\n      (homOfLE (_ : (Opens.map (fromSpec hU).val.base).obj U ≤ ⊤)).op\n[PROOFSTEP]\nrw [Category.id_comp]\n[GOAL]\ncase h.e'_2.h.h.e'_6.h.convert_4\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne_1✝ :\n  (LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) ⟶\n      TopCat.Presheaf.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf y) =\n    ((TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤) ⟶\n      TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U))))\n        ↑{ val := y, property := hy })\ne_3✝ :\n  LocallyRingedSpace.Γ.obj (op (Spec.toLocallyRingedSpace.obj (op (X.presheaf.obj (op U))))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj (op ⊤)\ne_4✝ :\n  ((Scheme.Spec.map\n                  (X.presheaf.map\n                      (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op ≫\n                inv (NatTrans.app ΓSpec.adjunction.unit (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))) ≫\n                  Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base _*\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).obj\n      (op U) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).obj\n      (op ((Opens.map (fromSpec hU).val.base).obj U))\n⊢ ((Scheme.Spec.map\n                (X.presheaf.map\n                    (eqToHom\n                        (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op).op).val.base _*\n          (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf).map\n      (op\n        (eqToHom\n          (_ :\n            ((Opens.map\n                        (inv\n                              (NatTrans.app ΓSpec.adjunction.unit\n                                (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))).val.base).op.obj\n                  (op ((Opens.map (Opens.inclusion U)).obj U))).unop =\n              (op ⊤).unop))) =\n    (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))).map\n      (homOfLE (_ : (Opens.map (fromSpec hU).val.base).obj U ≤ ⊤)).op\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\n⊢ IsLocalization.AtPrime (↑(TopCat.Presheaf.stalk X.presheaf (↑(fromSpec hU).val.base y))) y.asIdeal\n[PROOFSTEP]\napply\n  (@IsLocalization.isLocalization_iff_of_ringEquiv (R := X.presheaf.obj <| op U) (S :=\n      X.presheaf.stalk (hU.fromSpec.1.base y)) _ y.asIdeal.primeCompl _\n      (TopCat.Presheaf.algebra_section_stalk X.presheaf ⟨hU.fromSpec.1.base y, hy⟩) _ _\n      (asIso <| PresheafedSpace.stalkMap hU.fromSpec.1 y).commRingCatIsoToRingEquiv).mpr\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\n⊢ IsLocalization (Ideal.primeCompl y.asIdeal)\n    ↑(PresheafedSpace.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace y)\n[PROOFSTEP]\nconvert StructureSheaf.IsLocalization.to_stalk (X.presheaf.obj <| op U) y using 1\n[GOAL]\ncase a\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\n⊢ IsLocalization (Ideal.primeCompl y.asIdeal)\n      ↑(PresheafedSpace.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace y) ↔\n    IsLocalization.AtPrime\n      (↑(TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))) y)) y.asIdeal\n[PROOFSTEP]\ndelta IsLocalization.AtPrime StructureSheaf.stalkAlgebra\n[GOAL]\ncase a\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\n⊢ IsLocalization (Ideal.primeCompl y.asIdeal)\n      ↑(PresheafedSpace.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace y) ↔\n    IsLocalization (Ideal.primeCompl y.asIdeal)\n      ↑(TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))) y)\n[PROOFSTEP]\nrw [iff_iff_eq]\n[GOAL]\ncase a\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\n⊢ IsLocalization (Ideal.primeCompl y.asIdeal)\n      ↑(PresheafedSpace.stalk (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace y) =\n    IsLocalization (Ideal.primeCompl y.asIdeal)\n      ↑(TopCat.Presheaf.stalk (TopCat.Sheaf.presheaf (structureSheaf ↑(X.presheaf.obj (op U)))) y)\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase a.h.e_6.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\n⊢ RingHom.comp\n      (RingEquiv.toRingHom (Iso.commRingCatIsoToRingEquiv (asIso (PresheafedSpace.stalkMap (fromSpec hU).val y))))\n      (algebraMap ↑(X.presheaf.obj (op U)) ↑(TopCat.Presheaf.stalk X.presheaf (↑(fromSpec hU).val.base y))) =\n    StructureSheaf.toStalk (↑(X.presheaf.obj (op U))) y\n[PROOFSTEP]\nrw [RingHom.algebraMap_toAlgebra]\n[GOAL]\ncase a.h.e_6.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\n⊢ RingHom.comp\n      (RingEquiv.toRingHom (Iso.commRingCatIsoToRingEquiv (asIso (PresheafedSpace.stalkMap (fromSpec hU).val y))))\n      (TopCat.Presheaf.germ X.presheaf { val := ↑(fromSpec hU).val.base y, property := hy }) =\n    StructureSheaf.toStalk (↑(X.presheaf.obj (op U))) y\n[PROOFSTEP]\nrefine' (PresheafedSpace.stalkMap_germ hU.fromSpec.1 _ ⟨_, hy⟩).trans _\n[GOAL]\ncase a.h.e_6.h.e_i\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhy : ↑(fromSpec hU).val.base y ∈ U\n⊢ NatTrans.app (fromSpec hU).val.c (op U) ≫\n      TopCat.Presheaf.germ (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf { val := y, property := hy } =\n    StructureSheaf.toStalk (↑(X.presheaf.obj (op U))) y\n[PROOFSTEP]\napply hU.isLocalization_stalk_aux' y hy\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx : { x // x ∈ U }\n⊢ IsLocalization.AtPrime (↑(TopCat.Presheaf.stalk X.presheaf ↑x)) (primeIdealOf hU x).asIdeal\n[PROOFSTEP]\nrcases x with ⟨x, hx⟩\n[GOAL]\ncase mk\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ U\n⊢ IsLocalization.AtPrime (↑(TopCat.Presheaf.stalk X.presheaf ↑{ val := x, property := hx }))\n    (primeIdealOf hU { val := x, property := hx }).asIdeal\n[PROOFSTEP]\nlet y := hU.primeIdealOf ⟨x, hx⟩\n[GOAL]\ncase mk\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U)) := primeIdealOf hU { val := x, property := hx }\n⊢ IsLocalization.AtPrime (↑(TopCat.Presheaf.stalk X.presheaf ↑{ val := x, property := hx }))\n    (primeIdealOf hU { val := x, property := hx }).asIdeal\n[PROOFSTEP]\nhave : hU.fromSpec.val.base y = x :=\n  hU.fromSpec_primeIdealOf\n    ⟨x, hx⟩\n      -- Porting note : this is painful now, need to provide explicit instance\n[GOAL]\ncase mk\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U)) := primeIdealOf hU { val := x, property := hx }\nthis : ↑(fromSpec hU).val.base y = x\n⊢ IsLocalization.AtPrime (↑(TopCat.Presheaf.stalk X.presheaf ↑{ val := x, property := hx }))\n    (primeIdealOf hU { val := x, property := hx }).asIdeal\n[PROOFSTEP]\nchange\n  @IsLocalization (M := y.asIdeal.primeCompl) (S := X.presheaf.stalk x) _ _\n    (TopCat.Presheaf.algebra_section_stalk X.presheaf ⟨x, hx⟩)\n[GOAL]\ncase mk\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U)) := primeIdealOf hU { val := x, property := hx }\nthis : ↑(fromSpec hU).val.base y = x\n⊢ IsLocalization (Ideal.primeCompl y.asIdeal) ↑(TopCat.Presheaf.stalk X.presheaf x)\n[PROOFSTEP]\nclear_value y\n[GOAL]\ncase mk\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nthis : ↑(fromSpec hU).val.base y = x\n⊢ IsLocalization (Ideal.primeCompl y.asIdeal) ↑(TopCat.Presheaf.stalk X.presheaf x)\n[PROOFSTEP]\nsubst this\n[GOAL]\ncase mk\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ny : PrimeSpectrum ↑(X.presheaf.obj (op U))\nhx : ↑(fromSpec hU).val.base y ∈ U\n⊢ IsLocalization (Ideal.primeCompl y.asIdeal) ↑(TopCat.Presheaf.stalk X.presheaf (↑(fromSpec hU).val.base y))\n[PROOFSTEP]\nconvert hU.isLocalization_stalk' y hx\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ Scheme.basicOpen (Scheme.Spec.obj (op (X.presheaf.obj (op U)))) (↑(NatTrans.app (fromSpec hU).val.c (op U)) f) =\n    PrimeSpectrum.basicOpen f\n[PROOFSTEP]\nrw [← Scheme.basicOpen_res_eq _ _ (eqToHom hU.fromSpec_base_preimage.symm).op, basicOpen_eq_of_affine',\n  IsAffineOpen.fromSpec_app_eq]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ PrimeSpectrum.basicOpen\n      (↑(SpecΓIdentity.app (X.presheaf.obj (op U))).hom\n        (↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n              (eqToHom (_ : ⊤ = (Opens.map (fromSpec hU).val.base).obj U)).op)\n          (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U)) ≫\n                (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n                  (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op)\n            f))) =\n    PrimeSpectrum.basicOpen f\n[PROOFSTEP]\ncongr\n  -- Porting note : change `rw` to `erw`\n[GOAL]\ncase e_r\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ ↑(SpecΓIdentity.app (X.presheaf.obj (op U))).hom\n      (↑((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n            (eqToHom (_ : ⊤ = (Opens.map (fromSpec hU).val.base).obj U)).op)\n        (↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U)) ≫\n              (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n                (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op)\n          f)) =\n    f\n[PROOFSTEP]\nerw [← comp_apply, ← comp_apply]\n[GOAL]\ncase e_r\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ ↑(((NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U)) ≫\n              (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n                (eqToHom (_ : (Opens.map (fromSpec hU).val.base).obj U = ⊤)).op) ≫\n            (Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.map\n              (eqToHom (_ : ⊤ = (Opens.map (fromSpec hU).val.base).obj U)).op) ≫\n          (SpecΓIdentity.app (X.presheaf.obj (op U))).hom)\n      f =\n    f\n[PROOFSTEP]\nrw [Category.assoc, ← Functor.map_comp (self := (Scheme.Spec.obj <| op (X.presheaf.obj <| op U)).presheaf), eqToHom_op,\n  eqToHom_op, eqToHom_trans, eqToHom_refl, CategoryTheory.Functor.map_id]\n  -- Porting note : change `rw` to `erw`\n[GOAL]\ncase e_r\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ ↑((NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U)) ≫\n            𝟙 ((Scheme.Spec.obj (op (X.presheaf.obj (op U)))).presheaf.obj (op ⊤))) ≫\n          (SpecΓIdentity.app (X.presheaf.obj (op U))).hom)\n      f =\n    f\n[PROOFSTEP]\nerw [Category.comp_id]\n[GOAL]\ncase e_r\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ ↑(NatTrans.app SpecΓIdentity.inv (X.presheaf.obj (op U)) ≫ (SpecΓIdentity.app (X.presheaf.obj (op U))).hom) f = f\n[PROOFSTEP]\nrw [← Iso.app_inv, Iso.inv_hom_id]\n[GOAL]\ncase e_r\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ ↑(𝟙 ((𝟭 CommRingCat).obj (X.presheaf.obj (op U)))) f = f\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\n⊢ (Opens.map (fromSpec hU).val.base).obj (Scheme.basicOpen X f) = PrimeSpectrum.basicOpen f\n[PROOFSTEP]\nsimp only [IsAffineOpen.basicOpen_fromSpec_app, Scheme.preimage_basicOpen, eq_self_iff_true]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ ⨆ (f : ↑s), Scheme.basicOpen X ↑f = U ↔ Ideal.span s = ⊤\n[PROOFSTEP]\ntrans ⋃ i : s, (PrimeSpectrum.basicOpen i.1).1 = Set.univ\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ ⨆ (f : ↑s), Scheme.basicOpen X ↑f = U ↔ ⋃ (i : ↑s), (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ ⋃ (i : ↑s), (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ ↔ Ideal.span s = ⊤\n[PROOFSTEP]\ntrans hU.fromSpec.1.base ⁻¹' (⨆ f : s, X.basicOpen (f : X.presheaf.obj <| op U)).1 = hU.fromSpec.1.base ⁻¹' U.1\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ ⨆ (f : ↑s), Scheme.basicOpen X ↑f = U ↔\n    ↑(fromSpec hU).val.base ⁻¹' (⨆ (f : ↑s), Scheme.basicOpen X ↑f).carrier = ↑(fromSpec hU).val.base ⁻¹' U.carrier\n[PROOFSTEP]\nrefine' ⟨fun h => by rw [h], _⟩\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nh : ⨆ (f : ↑s), Scheme.basicOpen X ↑f = U\n⊢ ↑(fromSpec hU).val.base ⁻¹' (⨆ (f : ↑s), Scheme.basicOpen X ↑f).carrier = ↑(fromSpec hU).val.base ⁻¹' U.carrier\n[PROOFSTEP]\nrw [h]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ ↑(fromSpec hU).val.base ⁻¹' (⨆ (f : ↑s), Scheme.basicOpen X ↑f).carrier = ↑(fromSpec hU).val.base ⁻¹' U.carrier →\n    ⨆ (f : ↑s), Scheme.basicOpen X ↑f = U\n[PROOFSTEP]\nintro h\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nh : ↑(fromSpec hU).val.base ⁻¹' (⨆ (f : ↑s), Scheme.basicOpen X ↑f).carrier = ↑(fromSpec hU).val.base ⁻¹' U.carrier\n⊢ ⨆ (f : ↑s), Scheme.basicOpen X ↑f = U\n[PROOFSTEP]\napply_fun Set.image hU.fromSpec.1.base at h \n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nh :\n  ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' (⨆ (f : ↑s), Scheme.basicOpen X ↑f).carrier) =\n    ↑(fromSpec hU).val.base '' (↑(fromSpec hU).val.base ⁻¹' U.carrier)\n⊢ ⨆ (f : ↑s), Scheme.basicOpen X ↑f = U\n[PROOFSTEP]\nrw [Set.image_preimage_eq_inter_range, Set.image_preimage_eq_inter_range, hU.fromSpec_range] at h \n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nh : (⨆ (f : ↑s), Scheme.basicOpen X ↑f).carrier ∩ ↑U = U.carrier ∩ ↑U\n⊢ ⨆ (f : ↑s), Scheme.basicOpen X ↑f = U\n[PROOFSTEP]\nsimp only [Set.inter_self, Opens.carrier_eq_coe, Set.inter_eq_right_iff_subset] at h \n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nh : ↑U ⊆ ↑(⨆ (f : ↑s), Scheme.basicOpen X ↑f)\n⊢ ⨆ (f : ↑s), Scheme.basicOpen X ↑f = U\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nh : ↑U ⊆ ↑(⨆ (f : ↑s), Scheme.basicOpen X ↑f)\n⊢ ↑(⨆ (f : ↑s), Scheme.basicOpen X ↑f) = ↑U\n[PROOFSTEP]\nrefine' Set.Subset.antisymm _ h\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nh : ↑U ⊆ ↑(⨆ (f : ↑s), Scheme.basicOpen X ↑f)\n⊢ ↑(⨆ (f : ↑s), Scheme.basicOpen X ↑f) ⊆ ↑U\n[PROOFSTEP]\nsimp only [Set.iUnion_subset_iff, SetCoe.forall, Opens.coe_iSup]\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nh : ↑U ⊆ ↑(⨆ (f : ↑s), Scheme.basicOpen X ↑f)\n⊢ ∀ (x : ↑(X.presheaf.obj (op U))), x ∈ s → ↑(Scheme.basicOpen X x) ⊆ ↑U\n[PROOFSTEP]\nintro x _\n[GOAL]\ncase h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nh : ↑U ⊆ ↑(⨆ (f : ↑s), Scheme.basicOpen X ↑f)\nx : ↑(X.presheaf.obj (op U))\nh✝ : x ∈ s\n⊢ ↑(Scheme.basicOpen X x) ⊆ ↑U\n[PROOFSTEP]\nexact X.basicOpen_le x\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ ↑(fromSpec hU).val.base ⁻¹' (⨆ (f : ↑s), Scheme.basicOpen X ↑f).carrier = ↑(fromSpec hU).val.base ⁻¹' U.carrier ↔\n    ⋃ (i : ↑s), (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ\n[PROOFSTEP]\nsimp only [Opens.iSup_def, Subtype.coe_mk, Set.preimage_iUnion]\n  -- Porting note : need an extra rewrite here, after simp, it is in `↔` form\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ ⋃ (i : ↑s), ↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X ↑i) = ↑(fromSpec hU).val.base ⁻¹' U.carrier ↔\n    ⋃ (i : ↑s), (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ\n[PROOFSTEP]\nrw [iff_iff_eq]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ (⋃ (i : ↑s), ↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X ↑i) = ↑(fromSpec hU).val.base ⁻¹' U.carrier) =\n    (⋃ (i : ↑s), (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ)\n[PROOFSTEP]\ncongr 3\n[GOAL]\ncase e_a\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ ⋃ (i : ↑s), ↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X ↑i) = ⋃ (i : ↑s), (PrimeSpectrum.basicOpen ↑i).carrier\n[PROOFSTEP]\nrefine congr_arg (Set.iUnion ·) ?_\n[GOAL]\ncase e_a\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ (fun i => ↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X ↑i)) = fun i => (PrimeSpectrum.basicOpen ↑i).carrier\n[PROOFSTEP]\next1 x\n[GOAL]\ncase e_a.h\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nx : ↑s\n⊢ ↑(fromSpec hU).val.base ⁻¹' ↑(Scheme.basicOpen X ↑x) = (PrimeSpectrum.basicOpen ↑x).carrier\n[PROOFSTEP]\nexact congr_arg Opens.carrier (hU.fromSpec_map_basicOpen _)\n[GOAL]\ncase e_a\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ ↑(fromSpec hU).val.base ⁻¹' U.carrier = Set.univ\n[PROOFSTEP]\nexact congr_arg Opens.carrier hU.fromSpec_base_preimage\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ ⋃ (i : ↑s), (PrimeSpectrum.basicOpen ↑i).carrier = Set.univ ↔ Ideal.span s = ⊤\n[PROOFSTEP]\nsimp only [Opens.carrier_eq_coe, PrimeSpectrum.basicOpen_eq_zeroLocus_compl]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ ⋃ (i : ↑s), (PrimeSpectrum.zeroLocus {↑i})ᶜ = Set.univ ↔ Ideal.span s = ⊤\n[PROOFSTEP]\nrw [← Set.compl_iInter, Set.compl_univ_iff, ← PrimeSpectrum.zeroLocus_iUnion, ←\n  PrimeSpectrum.zeroLocus_empty_iff_eq_top, PrimeSpectrum.zeroLocus_span]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ PrimeSpectrum.zeroLocus (⋃ (i : ↑s), {↑i}) = ∅ ↔ PrimeSpectrum.zeroLocus s = ∅\n[PROOFSTEP]\nsimp only [Set.iUnion_singleton_eq_range, Subtype.range_val_subtype, Set.setOf_mem_eq]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ U ≤ ⨆ (f : ↑s), Scheme.basicOpen X ↑f ↔ Ideal.span s = ⊤\n[PROOFSTEP]\nrw [← hU.basicOpen_union_eq_self_iff, @comm _ Eq]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\n⊢ U ≤ ⨆ (f : ↑s), Scheme.basicOpen X ↑f ↔ U = ⨆ (f : ↑s), Scheme.basicOpen X ↑f\n[PROOFSTEP]\nrefine' ⟨fun h => le_antisymm h _, le_of_eq⟩\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nh : U ≤ ⨆ (f : ↑s), Scheme.basicOpen X ↑f\n⊢ ⨆ (f : ↑s), Scheme.basicOpen X ↑f ≤ U\n[PROOFSTEP]\nsimp only [iSup_le_iff, SetCoe.forall]\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nh : U ≤ ⨆ (f : ↑s), Scheme.basicOpen X ↑f\n⊢ ∀ (x : ↑(X.presheaf.obj (op U))), x ∈ s → Scheme.basicOpen X x ≤ U\n[PROOFSTEP]\nintro x _\n[GOAL]\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\ns : Set ↑(X.presheaf.obj (op U))\nh : U ≤ ⨆ (f : ↑s), Scheme.basicOpen X ↑f\nx : ↑(X.presheaf.obj (op U))\nh✝ : x ∈ s\n⊢ Scheme.basicOpen X x ≤ U\n[PROOFSTEP]\nexact X.basicOpen_le x\n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\n⊢ P V\n[PROOFSTEP]\nclassical\nhave : ∀ (x : V.1), ∃ f : X.presheaf.obj <| op V.1, ↑x ∈ X.basicOpen f ∧ P (X.affineBasicOpen f) :=\n  by\n  intro x\n  have : ↑x ∈ (Set.univ : Set X) := trivial\n  rw [← hS] at this \n  obtain ⟨W, hW⟩ := Set.mem_iUnion.mp this\n  obtain ⟨f, g, e, hf⟩ := exists_basicOpen_le_affine_inter V.prop W.1.prop x ⟨x.prop, hW⟩\n  refine' ⟨f, hf, _⟩\n  convert hP₁ _ g (hS' W) using 1\n  ext1\n  exact e\nchoose f hf₁ hf₂ using this\nsuffices Ideal.span (Set.range f) = ⊤\n  by\n  obtain ⟨t, ht₁, ht₂⟩ := (Ideal.span_eq_top_iff_finite _).mp this\n  apply hP₂ V t ht₂\n  rintro ⟨i, hi⟩\n  obtain ⟨x, rfl⟩ := ht₁ hi\n  exact hf₂ x\nrw [← V.prop.self_le_basicOpen_union_iff]\nintro x hx\nrw [iSup_range', SetLike.mem_coe, Opens.mem_iSup]\nexact ⟨_, hf₁ ⟨x, hx⟩⟩\n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\n⊢ P V\n[PROOFSTEP]\nhave : ∀ (x : V.1), ∃ f : X.presheaf.obj <| op V.1, ↑x ∈ X.basicOpen f ∧ P (X.affineBasicOpen f) :=\n  by\n  intro x\n  have : ↑x ∈ (Set.univ : Set X) := trivial\n  rw [← hS] at this \n  obtain ⟨W, hW⟩ := Set.mem_iUnion.mp this\n  obtain ⟨f, g, e, hf⟩ := exists_basicOpen_le_affine_inter V.prop W.1.prop x ⟨x.prop, hW⟩\n  refine' ⟨f, hf, _⟩\n  convert hP₁ _ g (hS' W) using 1\n  ext1\n  exact e\n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\n⊢ ∀ (x : { x // x ∈ ↑V }), ∃ f, ↑x ∈ Scheme.basicOpen X f ∧ P (Scheme.affineBasicOpen X f)\n[PROOFSTEP]\nintro x\n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nx : { x // x ∈ ↑V }\n⊢ ∃ f, ↑x ∈ Scheme.basicOpen X f ∧ P (Scheme.affineBasicOpen X f)\n[PROOFSTEP]\nhave : ↑x ∈ (Set.univ : Set X) := trivial\n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nx : { x // x ∈ ↑V }\nthis : ↑x ∈ Set.univ\n⊢ ∃ f, ↑x ∈ Scheme.basicOpen X f ∧ P (Scheme.affineBasicOpen X f)\n[PROOFSTEP]\nrw [← hS] at this \n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nx : { x // x ∈ ↑V }\nthis : ↑x ∈ ⋃ (i : ↑S), ↑↑↑i\n⊢ ∃ f, ↑x ∈ Scheme.basicOpen X f ∧ P (Scheme.affineBasicOpen X f)\n[PROOFSTEP]\nobtain ⟨W, hW⟩ := Set.mem_iUnion.mp this\n[GOAL]\ncase intro\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nx : { x // x ∈ ↑V }\nthis : ↑x ∈ ⋃ (i : ↑S), ↑↑↑i\nW : ↑S\nhW : ↑x ∈ ↑↑↑W\n⊢ ∃ f, ↑x ∈ Scheme.basicOpen X f ∧ P (Scheme.affineBasicOpen X f)\n[PROOFSTEP]\nobtain ⟨f, g, e, hf⟩ := exists_basicOpen_le_affine_inter V.prop W.1.prop x ⟨x.prop, hW⟩\n[GOAL]\ncase intro.intro.intro.intro\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nx : { x // x ∈ ↑V }\nthis : ↑x ∈ ⋃ (i : ↑S), ↑↑↑i\nW : ↑S\nhW : ↑x ∈ ↑↑↑W\nf : ↑(X.presheaf.obj (op ↑V))\ng : ↑(X.presheaf.obj (op ↑↑W))\ne : Scheme.basicOpen X f = Scheme.basicOpen X g\nhf : ↑x ∈ Scheme.basicOpen X f\n⊢ ∃ f, ↑x ∈ Scheme.basicOpen X f ∧ P (Scheme.affineBasicOpen X f)\n[PROOFSTEP]\nrefine' ⟨f, hf, _⟩\n[GOAL]\ncase intro.intro.intro.intro\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nx : { x // x ∈ ↑V }\nthis : ↑x ∈ ⋃ (i : ↑S), ↑↑↑i\nW : ↑S\nhW : ↑x ∈ ↑↑↑W\nf : ↑(X.presheaf.obj (op ↑V))\ng : ↑(X.presheaf.obj (op ↑↑W))\ne : Scheme.basicOpen X f = Scheme.basicOpen X g\nhf : ↑x ∈ Scheme.basicOpen X f\n⊢ P (Scheme.affineBasicOpen X f)\n[PROOFSTEP]\nconvert hP₁ _ g (hS' W) using 1\n[GOAL]\ncase h.e'_1\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nx : { x // x ∈ ↑V }\nthis : ↑x ∈ ⋃ (i : ↑S), ↑↑↑i\nW : ↑S\nhW : ↑x ∈ ↑↑↑W\nf : ↑(X.presheaf.obj (op ↑V))\ng : ↑(X.presheaf.obj (op ↑↑W))\ne : Scheme.basicOpen X f = Scheme.basicOpen X g\nhf : ↑x ∈ Scheme.basicOpen X f\n⊢ Scheme.affineBasicOpen X f = Scheme.affineBasicOpen X g\n[PROOFSTEP]\next1\n[GOAL]\ncase h.e'_1.a\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nx : { x // x ∈ ↑V }\nthis : ↑x ∈ ⋃ (i : ↑S), ↑↑↑i\nW : ↑S\nhW : ↑x ∈ ↑↑↑W\nf : ↑(X.presheaf.obj (op ↑V))\ng : ↑(X.presheaf.obj (op ↑↑W))\ne : Scheme.basicOpen X f = Scheme.basicOpen X g\nhf : ↑x ∈ Scheme.basicOpen X f\n⊢ ↑(Scheme.affineBasicOpen X f) = ↑(Scheme.affineBasicOpen X g)\n[PROOFSTEP]\nexact e\n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nthis : ∀ (x : { x // x ∈ ↑V }), ∃ f, ↑x ∈ Scheme.basicOpen X f ∧ P (Scheme.affineBasicOpen X f)\n⊢ P V\n[PROOFSTEP]\nchoose f hf₁ hf₂ using this\n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nf : { x // x ∈ ↑V } → ↑(X.presheaf.obj (op ↑V))\nhf₁ : ∀ (x : { x // x ∈ ↑V }), ↑x ∈ Scheme.basicOpen X (f x)\nhf₂ : ∀ (x : { x // x ∈ ↑V }), P (Scheme.affineBasicOpen X (f x))\n⊢ P V\n[PROOFSTEP]\nsuffices Ideal.span (Set.range f) = ⊤\n  by\n  obtain ⟨t, ht₁, ht₂⟩ := (Ideal.span_eq_top_iff_finite _).mp this\n  apply hP₂ V t ht₂\n  rintro ⟨i, hi⟩\n  obtain ⟨x, rfl⟩ := ht₁ hi\n  exact hf₂ x\n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nf : { x // x ∈ ↑V } → ↑(X.presheaf.obj (op ↑V))\nhf₁ : ∀ (x : { x // x ∈ ↑V }), ↑x ∈ Scheme.basicOpen X (f x)\nhf₂ : ∀ (x : { x // x ∈ ↑V }), P (Scheme.affineBasicOpen X (f x))\nthis : Ideal.span (Set.range f) = ⊤\n⊢ P V\n[PROOFSTEP]\nobtain ⟨t, ht₁, ht₂⟩ := (Ideal.span_eq_top_iff_finite _).mp this\n[GOAL]\ncase intro.intro\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nf : { x // x ∈ ↑V } → ↑(X.presheaf.obj (op ↑V))\nhf₁ : ∀ (x : { x // x ∈ ↑V }), ↑x ∈ Scheme.basicOpen X (f x)\nhf₂ : ∀ (x : { x // x ∈ ↑V }), P (Scheme.affineBasicOpen X (f x))\nthis : Ideal.span (Set.range f) = ⊤\nt : Finset ↑(X.presheaf.obj (op ↑V))\nht₁ : ↑t ⊆ Set.range f\nht₂ : Ideal.span ↑t = ⊤\n⊢ P V\n[PROOFSTEP]\napply hP₂ V t ht₂\n[GOAL]\ncase intro.intro\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nf : { x // x ∈ ↑V } → ↑(X.presheaf.obj (op ↑V))\nhf₁ : ∀ (x : { x // x ∈ ↑V }), ↑x ∈ Scheme.basicOpen X (f x)\nhf₂ : ∀ (x : { x // x ∈ ↑V }), P (Scheme.affineBasicOpen X (f x))\nthis : Ideal.span (Set.range f) = ⊤\nt : Finset ↑(X.presheaf.obj (op ↑V))\nht₁ : ↑t ⊆ Set.range f\nht₂ : Ideal.span ↑t = ⊤\n⊢ ∀ (f : { x // x ∈ t }), P (Scheme.affineBasicOpen X ↑f)\n[PROOFSTEP]\nrintro ⟨i, hi⟩\n[GOAL]\ncase intro.intro.mk\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nf : { x // x ∈ ↑V } → ↑(X.presheaf.obj (op ↑V))\nhf₁ : ∀ (x : { x // x ∈ ↑V }), ↑x ∈ Scheme.basicOpen X (f x)\nhf₂ : ∀ (x : { x // x ∈ ↑V }), P (Scheme.affineBasicOpen X (f x))\nthis : Ideal.span (Set.range f) = ⊤\nt : Finset ↑(X.presheaf.obj (op ↑V))\nht₁ : ↑t ⊆ Set.range f\nht₂ : Ideal.span ↑t = ⊤\ni : ↑(X.presheaf.obj (op ↑V))\nhi : i ∈ t\n⊢ P (Scheme.affineBasicOpen X ↑{ val := i, property := hi })\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ := ht₁ hi\n[GOAL]\ncase intro.intro.mk.intro\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nf : { x // x ∈ ↑V } → ↑(X.presheaf.obj (op ↑V))\nhf₁ : ∀ (x : { x // x ∈ ↑V }), ↑x ∈ Scheme.basicOpen X (f x)\nhf₂ : ∀ (x : { x // x ∈ ↑V }), P (Scheme.affineBasicOpen X (f x))\nthis : Ideal.span (Set.range f) = ⊤\nt : Finset ↑(X.presheaf.obj (op ↑V))\nht₁ : ↑t ⊆ Set.range f\nht₂ : Ideal.span ↑t = ⊤\nx : { x // x ∈ ↑V }\nhi : f x ∈ t\n⊢ P (Scheme.affineBasicOpen X ↑{ val := f x, property := hi })\n[PROOFSTEP]\nexact hf₂ x\n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nf : { x // x ∈ ↑V } → ↑(X.presheaf.obj (op ↑V))\nhf₁ : ∀ (x : { x // x ∈ ↑V }), ↑x ∈ Scheme.basicOpen X (f x)\nhf₂ : ∀ (x : { x // x ∈ ↑V }), P (Scheme.affineBasicOpen X (f x))\n⊢ Ideal.span (Set.range f) = ⊤\n[PROOFSTEP]\nrw [← V.prop.self_le_basicOpen_union_iff]\n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nf : { x // x ∈ ↑V } → ↑(X.presheaf.obj (op ↑V))\nhf₁ : ∀ (x : { x // x ∈ ↑V }), ↑x ∈ Scheme.basicOpen X (f x)\nhf₂ : ∀ (x : { x // x ∈ ↑V }), P (Scheme.affineBasicOpen X (f x))\n⊢ ↑V ≤ ⨆ (f_1 : ↑(Set.range f)), Scheme.basicOpen X ↑f_1\n[PROOFSTEP]\nintro x hx\n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nf : { x // x ∈ ↑V } → ↑(X.presheaf.obj (op ↑V))\nhf₁ : ∀ (x : { x // x ∈ ↑V }), ↑x ∈ Scheme.basicOpen X (f x)\nhf₂ : ∀ (x : { x // x ∈ ↑V }), P (Scheme.affineBasicOpen X (f x))\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ ↑↑V\n⊢ x ∈ ↑(⨆ (f_1 : ↑(Set.range f)), Scheme.basicOpen X ↑f_1)\n[PROOFSTEP]\nrw [iSup_range', SetLike.mem_coe, Opens.mem_iSup]\n[GOAL]\nX : Scheme\nV : ↑(Scheme.affineOpens X)\nS : Set ↑(Scheme.affineOpens X)\nP : ↑(Scheme.affineOpens X) → Prop\nhP₁ : ∀ (U : ↑(Scheme.affineOpens X)) (f : ↑(X.presheaf.obj (op ↑U))), P U → P (Scheme.affineBasicOpen X f)\nhP₂ :\n  ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (op ↑U))),\n    Ideal.span ↑s = ⊤ → (∀ (f : { x // x ∈ s }), P (Scheme.affineBasicOpen X ↑f)) → P U\nhS : ⋃ (i : ↑S), ↑↑↑i = Set.univ\nhS' : ∀ (U : ↑S), P ↑U\nf : { x // x ∈ ↑V } → ↑(X.presheaf.obj (op ↑V))\nhf₁ : ∀ (x : { x // x ∈ ↑V }), ↑x ∈ Scheme.basicOpen X (f x)\nhf₂ : ∀ (x : { x // x ∈ ↑V }), P (Scheme.affineBasicOpen X (f x))\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ ↑↑V\n⊢ ∃ i, x ∈ Scheme.basicOpen X (f i)\n[PROOFSTEP]\nexact ⟨_, hf₁ ⟨x, hx⟩⟩\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.AffineScheme", "llama_tokens": 107216, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6859494550081926, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.3882601057423013}}
{"text": "[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhin : i ≤ n\nhpi : ↑p ^ i = 0\n⊢ i = n\n[PROOFSTEP]\ncontrapose! hpi\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhin : i ≤ n\nhpi : i ≠ n\n⊢ ↑p ^ i ≠ 0\n[PROOFSTEP]\nreplace hin := lt_of_le_of_ne hin hpi\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhpi : i ≠ n\nhin : i < n\n⊢ ↑p ^ i ≠ 0\n[PROOFSTEP]\nclear hpi\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhin : i < n\n⊢ ↑p ^ i ≠ 0\n[PROOFSTEP]\nhave : (p : TruncatedWittVector p n R) ^ i = WittVector.truncate n ((p : 𝕎 R) ^ i) := by\n  rw [RingHom.map_pow, map_natCast]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhin : i < n\n⊢ ↑p ^ i = ↑(WittVector.truncate n) (↑p ^ i)\n[PROOFSTEP]\nrw [RingHom.map_pow, map_natCast]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhin : i < n\nthis : ↑p ^ i = ↑(WittVector.truncate n) (↑p ^ i)\n⊢ ↑p ^ i ≠ 0\n[PROOFSTEP]\nrw [this, ne_eq, ext_iff, not_forall]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhin : i < n\nthis : ↑p ^ i = ↑(WittVector.truncate n) (↑p ^ i)\n⊢ ∃ x, ¬coeff x (↑(WittVector.truncate n) (↑p ^ i)) = coeff x 0\n[PROOFSTEP]\nclear this\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhin : i < n\n⊢ ∃ x, ¬coeff x (↑(WittVector.truncate n) (↑p ^ i)) = coeff x 0\n[PROOFSTEP]\nuse⟨i, hin⟩\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhin : i < n\n⊢ ¬coeff { val := i, isLt := hin } (↑(WittVector.truncate n) (↑p ^ i)) = coeff { val := i, isLt := hin } 0\n[PROOFSTEP]\nrw [WittVector.coeff_truncate, coeff_zero, Fin.val_mk, WittVector.coeff_p_pow]\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhin : i < n\n⊢ ¬1 = 0\n[PROOFSTEP]\nhaveI : Nontrivial R := CharP.nontrivial_of_char_ne_one hp.1.ne_one\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharP R p\ni : ℕ\nhin : i < n\nthis : Nontrivial R\n⊢ ¬1 = 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝ : CommRing R\n⊢ Fintype.card (TruncatedWittVector p n (ZMod p)) = p ^ n\n[PROOFSTEP]\nrw [card, ZMod.card]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝ : CommRing R\nx : ZMod (p ^ n)\n⊢ ?m.71174 ∣ p ^ n\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝ : CommRing R\nm : ℕ\nhm : n ≤ m\nx : ZMod (p ^ m)\n⊢ ↑(RingHom.comp (truncate hm) (RingEquiv.toRingHom (zmodEquivTrunc p m))) x =\n    ↑(zmodEquivTrunc p n) (↑(ZMod.castHom (_ : p ^ n ∣ p ^ m) (ZMod (p ^ n))) x)\n[PROOFSTEP]\nrw [commutes _ _ hm]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝ : CommRing R\nm : ℕ\nhm : n ≤ m\nx : ZMod (p ^ m)\n⊢ ↑(RingHom.comp (RingEquiv.toRingHom (zmodEquivTrunc p n)) (ZMod.castHom (_ : p ^ n ∣ p ^ m) (ZMod (p ^ n)))) x =\n    ↑(zmodEquivTrunc p n) (↑(ZMod.castHom (_ : p ^ n ∣ p ^ m) (ZMod (p ^ n))) x)\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝ : CommRing R\nm : ℕ\nhm : n ≤ m\nx : TruncatedWittVector p m (ZMod p)\n⊢ ↑(RingEquiv.symm (zmodEquivTrunc p n)) (↑(truncate hm) x) =\n    ↑(ZMod.castHom (_ : p ^ n ∣ p ^ m) (ZMod (p ^ n))) (↑(RingEquiv.symm (zmodEquivTrunc p m)) x)\n[PROOFSTEP]\napply (zmodEquivTrunc p n).injective\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝ : CommRing R\nm : ℕ\nhm : n ≤ m\nx : TruncatedWittVector p m (ZMod p)\n⊢ ↑(zmodEquivTrunc p n) (↑(RingEquiv.symm (zmodEquivTrunc p n)) (↑(truncate hm) x)) =\n    ↑(zmodEquivTrunc p n)\n      (↑(ZMod.castHom (_ : p ^ n ∣ p ^ m) (ZMod (p ^ n))) (↑(RingEquiv.symm (zmodEquivTrunc p m)) x))\n[PROOFSTEP]\nrw [← commutes' _ _ hm]\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝ : CommRing R\nm : ℕ\nhm : n ≤ m\nx : TruncatedWittVector p m (ZMod p)\n⊢ ↑(zmodEquivTrunc p n) (↑(RingEquiv.symm (zmodEquivTrunc p n)) (↑(truncate hm) x)) =\n    ↑(truncate hm) (↑(zmodEquivTrunc p m) (↑(RingEquiv.symm (zmodEquivTrunc p m)) x))\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝ : CommRing R\nm : ℕ\nhm : n ≤ m\n⊢ RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (zmodEquivTrunc p n))) (truncate hm) =\n    RingHom.comp (ZMod.castHom (_ : p ^ n ∣ p ^ m) (ZMod (p ^ n)))\n      (RingEquiv.toRingHom (RingEquiv.symm (zmodEquivTrunc p m)))\n[PROOFSTEP]\next\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nR : Type u_1\ninst✝ : CommRing R\nm : ℕ\nhm : n ≤ m\nx✝ : TruncatedWittVector p m (ZMod p)\n⊢ ↑(RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (zmodEquivTrunc p n))) (truncate hm)) x✝ =\n    ↑(RingHom.comp (ZMod.castHom (_ : p ^ n ∣ p ^ m) (ZMod (p ^ n)))\n          (RingEquiv.toRingHom (RingEquiv.symm (zmodEquivTrunc p m))))\n      x✝\n[PROOFSTEP]\napply commutes_symm'\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nm n : ℕ\nh : m ≤ n\n⊢ RingHom.comp (ZMod.castHom (_ : p ^ m ∣ p ^ n) (ZMod (p ^ m)))\n      (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (zmodEquivTrunc p n))) (truncate n)) =\n    RingHom.comp\n      (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (zmodEquivTrunc p m))) (TruncatedWittVector.truncate h))\n      (truncate n)\n[PROOFSTEP]\nrw [commutes_symm, RingHom.comp_assoc]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nm n : ℕ\nh : m ≤ n\n⊢ RingHom.comp\n      (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (zmodEquivTrunc p m))) (TruncatedWittVector.truncate h))\n      (truncate n) =\n    RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (zmodEquivTrunc p m))) (truncate m)\n[PROOFSTEP]\nrw [RingHom.comp_assoc, truncate_comp_wittVector_truncate]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk₁ k₂ : ℕ\nhk : k₁ ≤ k₂\n⊢ RingHom.comp (TruncatedWittVector.truncate hk)\n      (RingHom.comp (RingEquiv.toRingHom (zmodEquivTrunc p k₂)) (PadicInt.toZModPow k₂)) =\n    RingHom.comp (RingEquiv.toRingHom (zmodEquivTrunc p k₁)) (PadicInt.toZModPow k₁)\n[PROOFSTEP]\nrw [← RingHom.comp_assoc, commutes, RingHom.comp_assoc, PadicInt.zmod_cast_comp_toZModPow _ _ hk]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ RingHom.comp (toPadicInt p) (fromPadicInt p) = RingHom.id ℤ_[p]\n[PROOFSTEP]\nrw [← PadicInt.toZModPow_eq_iff_ext]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ∀ (n : ℕ),\n    RingHom.comp (PadicInt.toZModPow n) (RingHom.comp (toPadicInt p) (fromPadicInt p)) =\n      RingHom.comp (PadicInt.toZModPow n) (RingHom.id ℤ_[p])\n[PROOFSTEP]\nintro n\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ RingHom.comp (PadicInt.toZModPow n) (RingHom.comp (toPadicInt p) (fromPadicInt p)) =\n    RingHom.comp (PadicInt.toZModPow n) (RingHom.id ℤ_[p])\n[PROOFSTEP]\nrw [← RingHom.comp_assoc, toPadicInt, PadicInt.lift_spec]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ RingHom.comp (toZModPow p n) (fromPadicInt p) = RingHom.comp (PadicInt.toZModPow n) (RingHom.id ℤ_[p])\n[PROOFSTEP]\nsimp only [fromPadicInt, toZModPow, RingHom.comp_id]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ RingHom.comp (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (zmodEquivTrunc p n))) (truncate n))\n      (lift (fun k => RingHom.comp (RingEquiv.toRingHom (zmodEquivTrunc p k)) (PadicInt.toZModPow k))\n        (_ :\n          ∀ (k₁ k₂ : ℕ) (hk : k₁ ≤ k₂),\n            RingHom.comp (TruncatedWittVector.truncate hk)\n                (RingHom.comp (RingEquiv.toRingHom (zmodEquivTrunc p k₂)) (PadicInt.toZModPow k₂)) =\n              RingHom.comp (RingEquiv.toRingHom (zmodEquivTrunc p k₁)) (PadicInt.toZModPow k₁))) =\n    PadicInt.toZModPow n\n[PROOFSTEP]\nrw [RingHom.comp_assoc, truncate_comp_lift, ← RingHom.comp_assoc]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ RingHom.comp\n      (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (zmodEquivTrunc p n)))\n        (RingEquiv.toRingHom (zmodEquivTrunc p n)))\n      (PadicInt.toZModPow n) =\n    PadicInt.toZModPow n\n[PROOFSTEP]\nsimp only [RingEquiv.symm_toRingHom_comp_toRingHom, RingHom.id_comp]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\n⊢ ↑(RingHom.comp (toPadicInt p) (fromPadicInt p)) x = ↑(RingHom.id ℤ_[p]) x\n[PROOFSTEP]\nrw [toPadicInt_comp_fromPadicInt]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ RingHom.comp (fromPadicInt p) (toPadicInt p) = RingHom.id (𝕎 (ZMod p))\n[PROOFSTEP]\napply WittVector.hom_ext\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ∀ (k : ℕ),\n    RingHom.comp (truncate k) (RingHom.comp (fromPadicInt p) (toPadicInt p)) =\n      RingHom.comp (truncate k) (RingHom.id (𝕎 (ZMod p)))\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ RingHom.comp (truncate n) (RingHom.comp (fromPadicInt p) (toPadicInt p)) =\n    RingHom.comp (truncate n) (RingHom.id (𝕎 (ZMod p)))\n[PROOFSTEP]\nrw [fromPadicInt, ← RingHom.comp_assoc, truncate_comp_lift, RingHom.comp_assoc]\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ RingHom.comp (RingEquiv.toRingHom (zmodEquivTrunc p n)) (RingHom.comp (PadicInt.toZModPow n) (toPadicInt p)) =\n    RingHom.comp (truncate n) (RingHom.id (𝕎 (ZMod p)))\n[PROOFSTEP]\nsimp only [toPadicInt, toZModPow, RingHom.comp_id, PadicInt.lift_spec, RingHom.id_comp, ← RingHom.comp_assoc,\n  RingEquiv.toRingHom_comp_symm_toRingHom]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : 𝕎 (ZMod p)\n⊢ ↑(RingHom.comp (fromPadicInt p) (toPadicInt p)) x = ↑(RingHom.id (𝕎 (ZMod p))) x\n[PROOFSTEP]\nrw [fromPadicInt_comp_toPadicInt]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.WittVector.Compare", "llama_tokens": 4886, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6859494550081925, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.3882601057423012}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\n⊢ Subobject X ≃o (Subobject (op X))ᵒᵈ\n[PROOFSTEP]\nrefine' OrderIso.ofHomInv (cokernelOrderHom X) (kernelOrderHom X) _ _\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\n⊢ OrderHom.comp ↑(cokernelOrderHom X) ↑(kernelOrderHom X) = OrderHom.id\n[PROOFSTEP]\nchange (cokernelOrderHom X).comp (kernelOrderHom X) = _\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\n⊢ OrderHom.comp (cokernelOrderHom X) (kernelOrderHom X) = OrderHom.id\n[PROOFSTEP]\nrefine' OrderHom.ext _ _ (funext (Subobject.ind _ _))\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\n⊢ ∀ ⦃A : Cᵒᵖ⦄ (f : A ⟶ op X) [inst : Mono f],\n    ↑(OrderHom.comp (cokernelOrderHom X) (kernelOrderHom X)) (Subobject.mk f) = ↑OrderHom.id (Subobject.mk f)\n[PROOFSTEP]\nintro A f hf\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nA : Cᵒᵖ\nf : A ⟶ op X\nhf : Mono f\n⊢ ↑(OrderHom.comp (cokernelOrderHom X) (kernelOrderHom X)) (Subobject.mk f) = ↑OrderHom.id (Subobject.mk f)\n[PROOFSTEP]\ndsimp only [OrderHom.comp_coe, Function.comp_apply, kernelOrderHom_coe, Subobject.lift_mk, cokernelOrderHom_coe,\n  OrderHom.id_coe, id.def]\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nA : Cᵒᵖ\nf : A ⟶ op X\nhf : Mono f\n⊢ Subobject.mk (cokernel.π (kernel.ι f.unop)).op = Subobject.mk f\n[PROOFSTEP]\nrefine' Subobject.mk_eq_mk_of_comm _ _ ⟨_, _, Quiver.Hom.unop_inj _, Quiver.Hom.unop_inj _⟩ _\n[GOAL]\ncase refine'_1.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nA : Cᵒᵖ\nf : A ⟶ op X\nhf : Mono f\n⊢ op (cokernel (kernel.ι f.unop)) ⟶ A\n[PROOFSTEP]\nexact (Abelian.epiDesc f.unop _ (cokernel.condition (kernel.ι f.unop))).op\n[GOAL]\ncase refine'_1.refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nA : Cᵒᵖ\nf : A ⟶ op X\nhf : Mono f\n⊢ A ⟶ op (cokernel (kernel.ι f.unop))\n[PROOFSTEP]\nexact (cokernel.desc _ _ (kernel.condition f.unop)).op\n[GOAL]\ncase refine'_1.refine'_3\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nA : Cᵒᵖ\nf : A ⟶ op X\nhf : Mono f\n⊢ ((epiDesc f.unop (cokernel.π (kernel.ι f.unop)) (_ : kernel.ι f.unop ≫ cokernel.π (kernel.ι f.unop) = 0)).op ≫\n        (cokernel.desc (kernel.ι f.unop) f.unop (_ : kernel.ι f.unop ≫ f.unop = 0)).op).unop =\n    (𝟙 (op (cokernel (kernel.ι f.unop)))).unop\n[PROOFSTEP]\nrw [← cancel_epi (cokernel.π (kernel.ι f.unop))]\n[GOAL]\ncase refine'_1.refine'_3\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nA : Cᵒᵖ\nf : A ⟶ op X\nhf : Mono f\n⊢ cokernel.π (kernel.ι f.unop) ≫\n      ((epiDesc f.unop (cokernel.π (kernel.ι f.unop)) (_ : kernel.ι f.unop ≫ cokernel.π (kernel.ι f.unop) = 0)).op ≫\n          (cokernel.desc (kernel.ι f.unop) f.unop (_ : kernel.ι f.unop ≫ f.unop = 0)).op).unop =\n    cokernel.π (kernel.ι f.unop) ≫ (𝟙 (op (cokernel (kernel.ι f.unop)))).unop\n[PROOFSTEP]\nsimp only [unop_comp, Quiver.Hom.unop_op, unop_id_op, cokernel.π_desc_assoc, comp_epiDesc, Category.comp_id]\n[GOAL]\ncase refine'_1.refine'_4\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nA : Cᵒᵖ\nf : A ⟶ op X\nhf : Mono f\n⊢ ((cokernel.desc (kernel.ι f.unop) f.unop (_ : kernel.ι f.unop ≫ f.unop = 0)).op ≫\n        (epiDesc f.unop (cokernel.π (kernel.ι f.unop))\n            (_ : kernel.ι f.unop ≫ cokernel.π (kernel.ι f.unop) = 0)).op).unop =\n    (𝟙 A).unop\n[PROOFSTEP]\nsimp only [← cancel_epi f.unop, unop_comp, Quiver.Hom.unop_op, unop_id, comp_epiDesc_assoc, cokernel.π_desc,\n  Category.comp_id]\n[GOAL]\ncase refine'_1.refine'_5\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nA : Cᵒᵖ\nf : A ⟶ op X\nhf : Mono f\n⊢ (Iso.mk (epiDesc f.unop (cokernel.π (kernel.ι f.unop)) (_ : kernel.ι f.unop ≫ cokernel.π (kernel.ι f.unop) = 0)).op\n          (cokernel.desc (kernel.ι f.unop) f.unop (_ : kernel.ι f.unop ≫ f.unop = 0)).op).hom ≫\n      f =\n    (cokernel.π (kernel.ι f.unop)).op\n[PROOFSTEP]\nexact Quiver.Hom.unop_inj (by simp only [unop_comp, Quiver.Hom.unop_op, comp_epiDesc])\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nA : Cᵒᵖ\nf : A ⟶ op X\nhf : Mono f\n⊢ ((Iso.mk (epiDesc f.unop (cokernel.π (kernel.ι f.unop)) (_ : kernel.ι f.unop ≫ cokernel.π (kernel.ι f.unop) = 0)).op\n            (cokernel.desc (kernel.ι f.unop) f.unop (_ : kernel.ι f.unop ≫ f.unop = 0)).op).hom ≫\n        f).unop =\n    (cokernel.π (kernel.ι f.unop)).op.unop\n[PROOFSTEP]\nsimp only [unop_comp, Quiver.Hom.unop_op, comp_epiDesc]\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\n⊢ OrderHom.comp ↑(kernelOrderHom X) ↑(cokernelOrderHom X) = OrderHom.id\n[PROOFSTEP]\nchange (kernelOrderHom X).comp (cokernelOrderHom X) = _\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\n⊢ OrderHom.comp (kernelOrderHom X) (cokernelOrderHom X) = OrderHom.id\n[PROOFSTEP]\nrefine' OrderHom.ext _ _ (funext (Subobject.ind _ _))\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\n⊢ ∀ ⦃A : C⦄ (f : A ⟶ X) [inst : Mono f],\n    ↑(OrderHom.comp (kernelOrderHom X) (cokernelOrderHom X)) (Subobject.mk f) = ↑OrderHom.id (Subobject.mk f)\n[PROOFSTEP]\nintro A f hf\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX A : C\nf : A ⟶ X\nhf : Mono f\n⊢ ↑(OrderHom.comp (kernelOrderHom X) (cokernelOrderHom X)) (Subobject.mk f) = ↑OrderHom.id (Subobject.mk f)\n[PROOFSTEP]\ndsimp only [OrderHom.comp_coe, Function.comp_apply, cokernelOrderHom_coe, Subobject.lift_mk, kernelOrderHom_coe,\n  OrderHom.id_coe, id.def, unop_op, Quiver.Hom.unop_op]\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX A : C\nf : A ⟶ X\nhf : Mono f\n⊢ Subobject.mk (kernel.ι (cokernel.π f)) = Subobject.mk f\n[PROOFSTEP]\nrefine' Subobject.mk_eq_mk_of_comm _ _ ⟨_, _, _, _⟩ _\n[GOAL]\ncase refine'_2.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX A : C\nf : A ⟶ X\nhf : Mono f\n⊢ kernel (cokernel.π f) ⟶ A\n[PROOFSTEP]\nexact Abelian.monoLift f _ (kernel.condition (cokernel.π f))\n[GOAL]\ncase refine'_2.refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX A : C\nf : A ⟶ X\nhf : Mono f\n⊢ A ⟶ kernel (cokernel.π f)\n[PROOFSTEP]\nexact kernel.lift _ _ (cokernel.condition f)\n[GOAL]\ncase refine'_2.refine'_3\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX A : C\nf : A ⟶ X\nhf : Mono f\n⊢ monoLift f (kernel.ι (cokernel.π f)) (_ : kernel.ι (cokernel.π f) ≫ cokernel.π f = 0) ≫\n      kernel.lift (cokernel.π f) f (_ : f ≫ cokernel.π f = 0) =\n    𝟙 (kernel (cokernel.π f))\n[PROOFSTEP]\nsimp only [← cancel_mono (kernel.ι (cokernel.π f)), Category.assoc, image.fac, monoLift_comp, Category.id_comp]\n[GOAL]\ncase refine'_2.refine'_4\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX A : C\nf : A ⟶ X\nhf : Mono f\n⊢ kernel.lift (cokernel.π f) f (_ : f ≫ cokernel.π f = 0) ≫\n      monoLift f (kernel.ι (cokernel.π f)) (_ : kernel.ι (cokernel.π f) ≫ cokernel.π f = 0) =\n    𝟙 A\n[PROOFSTEP]\nsimp only [← cancel_mono f, Category.assoc, monoLift_comp, image.fac, Category.id_comp]\n[GOAL]\ncase refine'_2.refine'_5\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX A : C\nf : A ⟶ X\nhf : Mono f\n⊢ (Iso.mk (monoLift f (kernel.ι (cokernel.π f)) (_ : kernel.ι (cokernel.π f) ≫ cokernel.π f = 0))\n          (kernel.lift (cokernel.π f) f (_ : f ≫ cokernel.π f = 0))).hom ≫\n      f =\n    kernel.ι (cokernel.π f)\n[PROOFSTEP]\nsimp only [monoLift_comp]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Abelian.Subobject", "llama_tokens": 3666, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947290421275, "lm_q2_score": 0.5926665999540698, "lm_q1q2_score": 0.3881342323892395}}
{"text": "[GOAL]\nI : Type u\nX : I → TopCat\nx : (i : I) → ↑(π.obj (X i))\n⊢ { obj := fun g => g, map := fun {X_1 Y} p => Path.Homotopic.pi p }.map (𝟙 x) =\n    𝟙 ({ obj := fun g => g, map := fun {X_1 Y} p => Path.Homotopic.pi p }.obj x)\n[PROOFSTEP]\nchange (Path.Homotopic.pi fun i => 𝟙 (x i)) = _\n[GOAL]\nI : Type u\nX : I → TopCat\nx : (i : I) → ↑(π.obj (X i))\n⊢ (Path.Homotopic.pi fun i => 𝟙 (x i)) = 𝟙 ({ obj := fun g => g, map := fun {X_1 Y} p => Path.Homotopic.pi p }.obj x)\n[PROOFSTEP]\nsimp only [FundamentalGroupoid.id_eq_path_refl, Path.Homotopic.pi_lift]\n[GOAL]\nI : Type u\nX : I → TopCat\nx : (i : I) → ↑(π.obj (X i))\n⊢ Quotient.mk (Path.Homotopic.setoid (fun i => x i) fun i => x i) (Path.pi fun i => Path.refl (x i)) = 𝟙 x\n[PROOFSTEP]\nrfl\n[GOAL]\nI : Type u\nX : I → TopCat\n⊢ piToPiTop X ≫ CategoryTheory.Functor.pi' (proj X) = 𝟙 (CategoryTheory.Grpd.of ((i : I) → ↑(π.obj (X i))))\n[PROOFSTEP]\nchange piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X) = 𝟭 _\n[GOAL]\nI : Type u\nX : I → TopCat\n⊢ piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X) = 𝟭 ((i : I) → ↑(π.obj (X i)))\n[PROOFSTEP]\napply CategoryTheory.Functor.ext ?_ ?_\n[GOAL]\nI : Type u\nX : I → TopCat\n⊢ ∀ (X_1 : (i : I) → ↑(π.obj (X i))),\n    (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).obj X_1 = (𝟭 ((i : I) → ↑(π.obj (X i)))).obj X_1\n[PROOFSTEP]\nintros\n[GOAL]\nI : Type u\nX : I → TopCat\nX✝ : (i : I) → ↑(π.obj (X i))\n⊢ (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).obj X✝ = (𝟭 ((i : I) → ↑(π.obj (X i)))).obj X✝\n[PROOFSTEP]\nrfl\n[GOAL]\nI : Type u\nX : I → TopCat\n⊢ ∀ (X_1 Y : (i : I) → ↑(π.obj (X i))) (f : X_1 ⟶ Y),\n    (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).map f =\n      CategoryTheory.eqToHom\n          (_ :\n            (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).obj X_1 =\n              (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).obj X_1) ≫\n        (𝟭 ((i : I) → ↑(π.obj (X i)))).map f ≫\n          CategoryTheory.eqToHom\n            (_ : (𝟭 ((i : I) → ↑(π.obj (X i)))).obj Y = (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).obj Y)\n[PROOFSTEP]\nintros\n[GOAL]\nI : Type u\nX : I → TopCat\nX✝ Y✝ : (i : I) → ↑(π.obj (X i))\nf✝ : X✝ ⟶ Y✝\n⊢ (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).map f✝ =\n    CategoryTheory.eqToHom\n        (_ :\n          (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).obj X✝ =\n            (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).obj X✝) ≫\n      (𝟭 ((i : I) → ↑(π.obj (X i)))).map f✝ ≫\n        CategoryTheory.eqToHom\n          (_ : (𝟭 ((i : I) → ↑(π.obj (X i)))).obj Y✝ = (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).obj Y✝)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nI : Type u\nX : I → TopCat\nX✝ Y✝ : (i : I) → ↑(π.obj (X i))\nf✝ : X✝ ⟶ Y✝\ni✝ : I\n⊢ (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).map f✝ i✝ =\n    (CategoryTheory.eqToHom\n          (_ :\n            (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).obj X✝ =\n              (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).obj X✝) ≫\n        (𝟭 ((i : I) → ↑(π.obj (X i)))).map f✝ ≫\n          CategoryTheory.eqToHom\n            (_ : (𝟭 ((i : I) → ↑(π.obj (X i)))).obj Y✝ = (piToPiTop X ⋙ CategoryTheory.Functor.pi' (proj X)).obj Y✝))\n      i✝\n[PROOFSTEP]\nsimp\n[GOAL]\nI : Type u\nX : I → TopCat\n⊢ CategoryTheory.Functor.pi' (proj X) ≫ piToPiTop X = 𝟙 (π.obj (TopCat.of ((i : I) → ↑(X i))))\n[PROOFSTEP]\nchange CategoryTheory.Functor.pi' (proj X) ⋙ piToPiTop X = 𝟭 _\n[GOAL]\nI : Type u\nX : I → TopCat\n⊢ CategoryTheory.Functor.pi' (proj X) ⋙ piToPiTop X = 𝟭 ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))\n[PROOFSTEP]\napply CategoryTheory.Functor.ext\n[GOAL]\ncase h_map\nI : Type u\nX : I → TopCat\n⊢ autoParam\n    (∀ (X_1 Y : ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))) (f : X_1 ⟶ Y),\n      (CategoryTheory.Functor.pi' (proj X) ⋙ piToPiTop X).map f =\n        CategoryTheory.eqToHom (_ : ?F.obj X_1 = ?G.obj X_1) ≫\n          (𝟭 ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))).map f ≫\n            CategoryTheory.eqToHom\n              (_ :\n                (𝟭 ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))).obj Y =\n                  (CategoryTheory.Functor.pi' (proj X) ⋙ piToPiTop X).obj Y))\n    _auto✝\n[PROOFSTEP]\nintro _ _ f\n[GOAL]\ncase h_map\nI : Type u\nX : I → TopCat\nX✝ Y✝ : ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))\nf : X✝ ⟶ Y✝\n⊢ (CategoryTheory.Functor.pi' (proj X) ⋙ piToPiTop X).map f =\n    CategoryTheory.eqToHom (_ : ?F.obj X✝ = ?G.obj X✝) ≫\n      (𝟭 ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))).map f ≫\n        CategoryTheory.eqToHom\n          (_ :\n            (𝟭 ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))).obj Y✝ =\n              (CategoryTheory.Functor.pi' (proj X) ⋙ piToPiTop X).obj Y✝)\n[PROOFSTEP]\nsuffices Path.Homotopic.pi ((CategoryTheory.Functor.pi' (proj X)).map f) = f by simpa\n[GOAL]\nI : Type u\nX : I → TopCat\nX✝ Y✝ : ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))\nf : X✝ ⟶ Y✝\nthis : Path.Homotopic.pi ((CategoryTheory.Functor.pi' (proj X)).map f) = f\n⊢ (CategoryTheory.Functor.pi' (proj X) ⋙ piToPiTop X).map f =\n    CategoryTheory.eqToHom (_ : ?F.obj X✝ = ?G.obj X✝) ≫\n      (𝟭 ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))).map f ≫\n        CategoryTheory.eqToHom\n          (_ :\n            (𝟭 ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))).obj Y✝ =\n              (CategoryTheory.Functor.pi' (proj X) ⋙ piToPiTop X).obj Y✝)\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase h_map\nI : Type u\nX : I → TopCat\nX✝ Y✝ : ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))\nf : X✝ ⟶ Y✝\n⊢ Path.Homotopic.pi ((CategoryTheory.Functor.pi' (proj X)).map f) = f\n[PROOFSTEP]\nchange Path.Homotopic.pi (fun i => (CategoryTheory.Functor.pi' (proj X)).map f i) = _\n[GOAL]\ncase h_map\nI : Type u\nX : I → TopCat\nX✝ Y✝ : ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))\nf : X✝ ⟶ Y✝\n⊢ (Path.Homotopic.pi fun i => (CategoryTheory.Functor.pi' (proj X)).map f i) = f\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_obj\nI : Type u\nX : I → TopCat\n⊢ ∀ (X_1 : ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))),\n    (CategoryTheory.Functor.pi' (proj X) ⋙ piToPiTop X).obj X_1 = (𝟭 ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))).obj X_1\n[PROOFSTEP]\nintros\n[GOAL]\ncase h_obj\nI : Type u\nX : I → TopCat\nX✝ : ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))\n⊢ (CategoryTheory.Functor.pi' (proj X) ⋙ piToPiTop X).obj X✝ = (𝟭 ↑(π.obj (TopCat.of ((i : I) → ↑(X i))))).obj X✝\n[PROOFSTEP]\nrfl\n[GOAL]\nI : Type u\nX : I → TopCat\n⊢ Limits.PreservesLimit (Discrete.functor X) π\n[PROOFSTEP]\napply Limits.preservesLimitOfPreservesLimitCone (TopCat.piFanIsLimit.{u, u} X)\n[GOAL]\nI : Type u\nX : I → TopCat\n⊢ Limits.IsLimit (π.mapCone (TopCat.piFan X))\n[PROOFSTEP]\napply (Limits.IsLimit.ofConeEquiv (coneDiscreteComp X)).toFun\n[GOAL]\nI : Type u\nX : I → TopCat\n⊢ Limits.IsLimit ((coneDiscreteComp X).functor.obj (π.mapCone (TopCat.piFan X)))\n[PROOFSTEP]\nsimp only [coneDiscreteComp_obj_mapCone]\n[GOAL]\nI : Type u\nX : I → TopCat\n⊢ Limits.IsLimit (Limits.Fan.mk (π.obj (TopCat.of ((i : I) → ↑(X i)))) (proj X))\n[PROOFSTEP]\napply Limits.IsLimit.ofIsoLimit _ (asIso (piTopToPiCone X)).symm\n[GOAL]\nI : Type u\nX : I → TopCat\n⊢ Limits.IsLimit (Grpd.piLimitFan fun i => π.obj (X i))\n[PROOFSTEP]\nexact Grpd.piLimitFanIsLimit _\n[GOAL]\nA B : TopCat\n⊢ ∀ (X : ↑(π.obj A) × ↑(π.obj B)),\n    { obj := fun g => g,\n            map := fun {x y} p =>\n              match x, y, p with\n              | (x₀, x₁), (y₀, y₁), (p₀, p₁) => Path.Homotopic.prod p₀ p₁ }.map\n        (𝟙 X) =\n      𝟙\n        ({ obj := fun g => g,\n              map := fun {x y} p =>\n                match x, y, p with\n                | (x₀, x₁), (y₀, y₁), (p₀, p₁) => Path.Homotopic.prod p₀ p₁ }.obj\n          X)\n[PROOFSTEP]\nrintro ⟨x₀, x₁⟩\n[GOAL]\ncase mk\nA B : TopCat\nx₀ : ↑(π.obj A)\nx₁ : ↑(π.obj B)\n⊢ { obj := fun g => g,\n          map := fun {x y} p =>\n            match x, y, p with\n            | (x₀, x₁), (y₀, y₁), (p₀, p₁) => Path.Homotopic.prod p₀ p₁ }.map\n      (𝟙 (x₀, x₁)) =\n    𝟙\n      ({ obj := fun g => g,\n            map := fun {x y} p =>\n              match x, y, p with\n              | (x₀, x₁), (y₀, y₁), (p₀, p₁) => Path.Homotopic.prod p₀ p₁ }.obj\n        (x₀, x₁))\n[PROOFSTEP]\nsimp only [CategoryTheory.prod_id, FundamentalGroupoid.id_eq_path_refl]\n[GOAL]\ncase mk\nA B : TopCat\nx₀ : ↑(π.obj A)\nx₁ : ↑(π.obj B)\n⊢ Path.Homotopic.prod (𝟙 x₀) (𝟙 x₁) = 𝟙 (x₀, x₁)\n[PROOFSTEP]\nrfl\n[GOAL]\nA B : TopCat\n⊢ prodToProdTop A B ≫ CategoryTheory.Functor.prod' (projLeft A B) (projRight A B) =\n    𝟙 (CategoryTheory.Grpd.of (↑(π.obj A) × ↑(π.obj B)))\n[PROOFSTEP]\nchange prodToProdTop A B ⋙ (projLeft A B).prod' (projRight A B) = 𝟭 _\n[GOAL]\nA B : TopCat\n⊢ prodToProdTop A B ⋙ CategoryTheory.Functor.prod' (projLeft A B) (projRight A B) = 𝟭 (↑(π.obj A) × ↑(π.obj B))\n[PROOFSTEP]\napply CategoryTheory.Functor.hext\n[GOAL]\ncase h_obj\nA B : TopCat\n⊢ ∀ (X : ↑(π.obj A) × ↑(π.obj B)),\n    (prodToProdTop A B ⋙ CategoryTheory.Functor.prod' (projLeft A B) (projRight A B)).obj X =\n      (𝟭 (↑(π.obj A) × ↑(π.obj B))).obj X\n[PROOFSTEP]\nintros\n[GOAL]\ncase h_obj\nA B : TopCat\nX✝ : ↑(π.obj A) × ↑(π.obj B)\n⊢ (prodToProdTop A B ⋙ CategoryTheory.Functor.prod' (projLeft A B) (projRight A B)).obj X✝ =\n    (𝟭 (↑(π.obj A) × ↑(π.obj B))).obj X✝\n[PROOFSTEP]\next\n[GOAL]\ncase h_obj.h₁\nA B : TopCat\nX✝ : ↑(π.obj A) × ↑(π.obj B)\n⊢ ((prodToProdTop A B ⋙ CategoryTheory.Functor.prod' (projLeft A B) (projRight A B)).obj X✝).fst =\n    ((𝟭 (↑(π.obj A) × ↑(π.obj B))).obj X✝).fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_obj.h₂\nA B : TopCat\nX✝ : ↑(π.obj A) × ↑(π.obj B)\n⊢ ((prodToProdTop A B ⋙ CategoryTheory.Functor.prod' (projLeft A B) (projRight A B)).obj X✝).snd =\n    ((𝟭 (↑(π.obj A) × ↑(π.obj B))).obj X✝).snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_obj.h₁\nA B : TopCat\nX✝ : ↑(π.obj A) × ↑(π.obj B)\n⊢ (projLeft A B).obj X✝ = X✝.fst\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_obj.h₂\nA B : TopCat\nX✝ : ↑(π.obj A) × ↑(π.obj B)\n⊢ (projRight A B).obj X✝ = X✝.snd\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_map\nA B : TopCat\n⊢ ∀ (X Y : ↑(π.obj A) × ↑(π.obj B)) (f : X ⟶ Y),\n    HEq ((prodToProdTop A B ⋙ CategoryTheory.Functor.prod' (projLeft A B) (projRight A B)).map f)\n      ((𝟭 (↑(π.obj A) × ↑(π.obj B))).map f)\n[PROOFSTEP]\nrintro ⟨x₀, x₁⟩ ⟨y₀, y₁⟩ ⟨f₀, f₁⟩\n[GOAL]\ncase h_map.mk.mk.mk\nA B : TopCat\nx₀ : ↑(π.obj A)\nx₁ : ↑(π.obj B)\ny₀ : ↑(π.obj A)\ny₁ : ↑(π.obj B)\nf₀ : (x₀, x₁).fst ⟶ (y₀, y₁).fst\nf₁ : (x₀, x₁).snd ⟶ (y₀, y₁).snd\n⊢ HEq ((prodToProdTop A B ⋙ CategoryTheory.Functor.prod' (projLeft A B) (projRight A B)).map (f₀, f₁))\n    ((𝟭 (↑(π.obj A) × ↑(π.obj B))).map (f₀, f₁))\n[PROOFSTEP]\nhave :\n  Path.Homotopic.projLeft ((prodToProdTop A B).map (f₀, f₁)) = f₀ ∧\n    Path.Homotopic.projRight ((prodToProdTop A B).map (f₀, f₁)) = f₁ :=\n  And.intro (Path.Homotopic.projLeft_prod f₀ f₁) (Path.Homotopic.projRight_prod f₀ f₁)\n[GOAL]\ncase h_map.mk.mk.mk\nA B : TopCat\nx₀ : ↑(π.obj A)\nx₁ : ↑(π.obj B)\ny₀ : ↑(π.obj A)\ny₁ : ↑(π.obj B)\nf₀ : (x₀, x₁).fst ⟶ (y₀, y₁).fst\nf₁ : (x₀, x₁).snd ⟶ (y₀, y₁).snd\nthis :\n  Path.Homotopic.projLeft ((prodToProdTop A B).map (f₀, f₁)) = f₀ ∧\n    Path.Homotopic.projRight ((prodToProdTop A B).map (f₀, f₁)) = f₁\n⊢ HEq ((prodToProdTop A B ⋙ CategoryTheory.Functor.prod' (projLeft A B) (projRight A B)).map (f₀, f₁))\n    ((𝟭 (↑(π.obj A) × ↑(π.obj B))).map (f₀, f₁))\n[PROOFSTEP]\nsimpa\n[GOAL]\nA B : TopCat\n⊢ CategoryTheory.Functor.prod' (projLeft A B) (projRight A B) ≫ prodToProdTop A B = 𝟙 (π.obj (TopCat.of (↑A × ↑B)))\n[PROOFSTEP]\nchange (projLeft A B).prod' (projRight A B) ⋙ prodToProdTop A B = 𝟭 _\n[GOAL]\nA B : TopCat\n⊢ CategoryTheory.Functor.prod' (projLeft A B) (projRight A B) ⋙ prodToProdTop A B = 𝟭 ↑(π.obj (TopCat.of (↑A × ↑B)))\n[PROOFSTEP]\napply CategoryTheory.Functor.hext\n[GOAL]\ncase h_obj\nA B : TopCat\n⊢ ∀ (X : ↑(π.obj (TopCat.of (↑A × ↑B)))),\n    (CategoryTheory.Functor.prod' (projLeft A B) (projRight A B) ⋙ prodToProdTop A B).obj X =\n      (𝟭 ↑(π.obj (TopCat.of (↑A × ↑B)))).obj X\n[PROOFSTEP]\nintros\n[GOAL]\ncase h_obj\nA B : TopCat\nX✝ : ↑(π.obj (TopCat.of (↑A × ↑B)))\n⊢ (CategoryTheory.Functor.prod' (projLeft A B) (projRight A B) ⋙ prodToProdTop A B).obj X✝ =\n    (𝟭 ↑(π.obj (TopCat.of (↑A × ↑B)))).obj X✝\n[PROOFSTEP]\napply Prod.ext\n[GOAL]\ncase h_obj.h₁\nA B : TopCat\nX✝ : ↑(π.obj (TopCat.of (↑A × ↑B)))\n⊢ ((CategoryTheory.Functor.prod' (projLeft A B) (projRight A B) ⋙ prodToProdTop A B).obj X✝).fst =\n    ((𝟭 ↑(π.obj (TopCat.of (↑A × ↑B)))).obj X✝).fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_obj.h₂\nA B : TopCat\nX✝ : ↑(π.obj (TopCat.of (↑A × ↑B)))\n⊢ ((CategoryTheory.Functor.prod' (projLeft A B) (projRight A B) ⋙ prodToProdTop A B).obj X✝).snd =\n    ((𝟭 ↑(π.obj (TopCat.of (↑A × ↑B)))).obj X✝).snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_obj.h₁\nA B : TopCat\nX✝ : ↑(π.obj (TopCat.of (↑A × ↑B)))\n⊢ (projLeft A B).obj X✝ = X✝.fst\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_obj.h₂\nA B : TopCat\nX✝ : ↑(π.obj (TopCat.of (↑A × ↑B)))\n⊢ (projRight A B).obj X✝ = X✝.snd\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_map\nA B : TopCat\n⊢ ∀ (X Y : ↑(π.obj (TopCat.of (↑A × ↑B)))) (f : X ⟶ Y),\n    HEq ((CategoryTheory.Functor.prod' (projLeft A B) (projRight A B) ⋙ prodToProdTop A B).map f)\n      ((𝟭 ↑(π.obj (TopCat.of (↑A × ↑B)))).map f)\n[PROOFSTEP]\nrintro ⟨x₀, x₁⟩ ⟨y₀, y₁⟩ f\n[GOAL]\ncase h_map.mk.mk\nA B : TopCat\nx₀ : ↑A\nx₁ : ↑B\ny₀ : ↑A\ny₁ : ↑B\nf : (x₀, x₁) ⟶ (y₀, y₁)\n⊢ HEq ((CategoryTheory.Functor.prod' (projLeft A B) (projRight A B) ⋙ prodToProdTop A B).map f)\n    ((𝟭 ↑(π.obj (TopCat.of (↑A × ↑B)))).map f)\n[PROOFSTEP]\nhave := Path.Homotopic.prod_projLeft_projRight f\n[GOAL]\ncase h_map.mk.mk\nA B : TopCat\nx₀ : ↑A\nx₁ : ↑B\ny₀ : ↑A\ny₁ : ↑B\nf : (x₀, x₁) ⟶ (y₀, y₁)\nthis : Path.Homotopic.prod (Path.Homotopic.projLeft f) (Path.Homotopic.projRight f) = f\n⊢ HEq ((CategoryTheory.Functor.prod' (projLeft A B) (projRight A B) ⋙ prodToProdTop A B).map f)\n    ((𝟭 ↑(π.obj (TopCat.of (↑A × ↑B)))).map f)\n[PROOFSTEP]\nsimp only [CategoryTheory.Functor.comp_obj, CategoryTheory.Functor.prod'_obj, prodToProdTop_obj,\n  CategoryTheory.Functor.comp_map, CategoryTheory.Functor.prod'_map, projLeft_map, projRight_map,\n  CategoryTheory.Functor.id_obj, CategoryTheory.Functor.id_map, heq_eq_eq]\n[GOAL]\ncase h_map.mk.mk\nA B : TopCat\nx₀ : ↑A\nx₁ : ↑B\ny₀ : ↑A\ny₁ : ↑B\nf : (x₀, x₁) ⟶ (y₀, y₁)\nthis : Path.Homotopic.prod (Path.Homotopic.projLeft f) (Path.Homotopic.projRight f) = f\n⊢ (prodToProdTop A B).map (Path.Homotopic.projLeft f, Path.Homotopic.projRight f) = f\n[PROOFSTEP]\napply this\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.FundamentalGroupoid.Product", "llama_tokens": 7242, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943712746406, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.38777596273258674}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\ns t : Set E\ninst✝ : Subsingleton ι\np : ι → E\n⊢ ConvexIndependent 𝕜 p\n[PROOFSTEP]\nintro s x hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\ns✝ t : Set E\ninst✝ : Subsingleton ι\np : ι → E\ns : Set ι\nx : ι\nhx : p x ∈ ↑(convexHull 𝕜) (p '' s)\n⊢ x ∈ s\n[PROOFSTEP]\nhave : (convexHull 𝕜 (p '' s)).Nonempty := ⟨p x, hx⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\ns✝ t : Set E\ninst✝ : Subsingleton ι\np : ι → E\ns : Set ι\nx : ι\nhx : p x ∈ ↑(convexHull 𝕜) (p '' s)\nthis : Set.Nonempty (↑(convexHull 𝕜) (p '' s))\n⊢ x ∈ s\n[PROOFSTEP]\nrw [convexHull_nonempty_iff, Set.nonempty_image_iff] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\ns✝ t : Set E\ninst✝ : Subsingleton ι\np : ι → E\ns : Set ι\nx : ι\nhx : p x ∈ ↑(convexHull 𝕜) (p '' s)\nthis : Set.Nonempty s\n⊢ x ∈ s\n[PROOFSTEP]\nrwa [Subsingleton.mem_iff_nonempty]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns t : Set E\np : ι → E\nhc : ConvexIndependent 𝕜 p\n⊢ Injective p\n[PROOFSTEP]\nrefine' fun i j hij => hc { j } i _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns t : Set E\np : ι → E\nhc : ConvexIndependent 𝕜 p\ni j : ι\nhij : p i = p j\n⊢ p i ∈ ↑(convexHull 𝕜) (p '' {j})\n[PROOFSTEP]\nrw [hij, Set.image_singleton, convexHull_singleton]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns t : Set E\np : ι → E\nhc : ConvexIndependent 𝕜 p\ni j : ι\nhij : p i = p j\n⊢ p j ∈ {p j}\n[PROOFSTEP]\nexact Set.mem_singleton _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns t : Set E\nι' : Type u_4\nf : ι' ↪ ι\np : ι → E\nhc : ConvexIndependent 𝕜 p\n⊢ ConvexIndependent 𝕜 (p ∘ ↑f)\n[PROOFSTEP]\nintro s x hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t : Set E\nι' : Type u_4\nf : ι' ↪ ι\np : ι → E\nhc : ConvexIndependent 𝕜 p\ns : Set ι'\nx : ι'\nhx : (p ∘ ↑f) x ∈ ↑(convexHull 𝕜) (p ∘ ↑f '' s)\n⊢ x ∈ s\n[PROOFSTEP]\nrw [← f.injective.mem_set_image]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t : Set E\nι' : Type u_4\nf : ι' ↪ ι\np : ι → E\nhc : ConvexIndependent 𝕜 p\ns : Set ι'\nx : ι'\nhx : (p ∘ ↑f) x ∈ ↑(convexHull 𝕜) (p ∘ ↑f '' s)\n⊢ ↑f x ∈ ↑f '' s\n[PROOFSTEP]\nexact hc _ _ (by rwa [Set.image_image])\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t : Set E\nι' : Type u_4\nf : ι' ↪ ι\np : ι → E\nhc : ConvexIndependent 𝕜 p\ns : Set ι'\nx : ι'\nhx : (p ∘ ↑f) x ∈ ↑(convexHull 𝕜) (p ∘ ↑f '' s)\n⊢ p (↑f x) ∈ ↑(convexHull 𝕜) (p '' (↑f '' s))\n[PROOFSTEP]\nrwa [Set.image_image]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns t : Set E\np : ι → E\nhc : ConvexIndependent 𝕜 p\n⊢ ConvexIndependent 𝕜 Subtype.val\n[PROOFSTEP]\nlet f : Set.range p → ι := fun x => x.property.choose\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns t : Set E\np : ι → E\nhc : ConvexIndependent 𝕜 p\nf : ↑(Set.range p) → ι := fun x => Exists.choose (_ : ↑x ∈ Set.range p)\n⊢ ConvexIndependent 𝕜 Subtype.val\n[PROOFSTEP]\nhave hf : ∀ x, p (f x) = x := fun x => x.property.choose_spec\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns t : Set E\np : ι → E\nhc : ConvexIndependent 𝕜 p\nf : ↑(Set.range p) → ι := fun x => Exists.choose (_ : ↑x ∈ Set.range p)\nhf : ∀ (x : ↑(Set.range p)), p (f x) = ↑x\n⊢ ConvexIndependent 𝕜 Subtype.val\n[PROOFSTEP]\nlet fe : Set.range p ↪ ι := ⟨f, fun x₁ x₂ he => Subtype.ext (hf x₁ ▸ hf x₂ ▸ he ▸ rfl)⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns t : Set E\np : ι → E\nhc : ConvexIndependent 𝕜 p\nf : ↑(Set.range p) → ι := fun x => Exists.choose (_ : ↑x ∈ Set.range p)\nhf : ∀ (x : ↑(Set.range p)), p (f x) = ↑x\nfe : ↑(Set.range p) ↪ ι := { toFun := f, inj' := (_ : ∀ (x₁ x₂ : ↑(Set.range p)), f x₁ = f x₂ → x₁ = x₂) }\n⊢ ConvexIndependent 𝕜 Subtype.val\n[PROOFSTEP]\nconvert hc.comp_embedding fe\n[GOAL]\ncase h.e'_7\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns t : Set E\np : ι → E\nhc : ConvexIndependent 𝕜 p\nf : ↑(Set.range p) → ι := fun x => Exists.choose (_ : ↑x ∈ Set.range p)\nhf : ∀ (x : ↑(Set.range p)), p (f x) = ↑x\nfe : ↑(Set.range p) ↪ ι := { toFun := f, inj' := (_ : ∀ (x₁ x₂ : ↑(Set.range p)), f x₁ = f x₂ → x₁ = x₂) }\n⊢ Subtype.val = p ∘ ↑fe\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_7.h\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns t : Set E\np : ι → E\nhc : ConvexIndependent 𝕜 p\nf : ↑(Set.range p) → ι := fun x => Exists.choose (_ : ↑x ∈ Set.range p)\nhf : ∀ (x : ↑(Set.range p)), p (f x) = ↑x\nfe : ↑(Set.range p) ↪ ι := { toFun := f, inj' := (_ : ∀ (x₁ x₂ : ↑(Set.range p)), f x₁ = f x₂ → x₁ = x₂) }\nx✝ : { x // x ∈ Set.range p }\n⊢ ↑x✝ = (p ∘ ↑fe) x✝\n[PROOFSTEP]\nrw [Embedding.coeFn_mk, comp_apply, hf]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns t : Set E\np : ι → E\n⊢ ConvexIndependent 𝕜 p ↔ ∀ (i : ι) (s : Set ι), ¬p i ∈ ↑(convexHull 𝕜) (p '' (s \\ {i}))\n[PROOFSTEP]\nrefine' ⟨fun hc i s h => _, fun h s i hi => _⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t : Set E\np : ι → E\nhc : ConvexIndependent 𝕜 p\ni : ι\ns : Set ι\nh : p i ∈ ↑(convexHull 𝕜) (p '' (s \\ {i}))\n⊢ False\n[PROOFSTEP]\nrw [hc.mem_convexHull_iff] at h \n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t : Set E\np : ι → E\nhc : ConvexIndependent 𝕜 p\ni : ι\ns : Set ι\nh : i ∈ s \\ {i}\n⊢ False\n[PROOFSTEP]\nexact h.2 (Set.mem_singleton _)\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t : Set E\np : ι → E\nh : ∀ (i : ι) (s : Set ι), ¬p i ∈ ↑(convexHull 𝕜) (p '' (s \\ {i}))\ns : Set ι\ni : ι\nhi : p i ∈ ↑(convexHull 𝕜) (p '' s)\n⊢ i ∈ s\n[PROOFSTEP]\nby_contra H\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t : Set E\np : ι → E\nh : ∀ (i : ι) (s : Set ι), ¬p i ∈ ↑(convexHull 𝕜) (p '' (s \\ {i}))\ns : Set ι\ni : ι\nhi : p i ∈ ↑(convexHull 𝕜) (p '' s)\nH : ¬i ∈ s\n⊢ False\n[PROOFSTEP]\nrefine' h i s _\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t : Set E\np : ι → E\nh : ∀ (i : ι) (s : Set ι), ¬p i ∈ ↑(convexHull 𝕜) (p '' (s \\ {i}))\ns : Set ι\ni : ι\nhi : p i ∈ ↑(convexHull 𝕜) (p '' s)\nH : ¬i ∈ s\n⊢ p i ∈ ↑(convexHull 𝕜) (p '' (s \\ {i}))\n[PROOFSTEP]\nrw [Set.diff_singleton_eq_self H]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t : Set E\np : ι → E\nh : ∀ (i : ι) (s : Set ι), ¬p i ∈ ↑(convexHull 𝕜) (p '' (s \\ {i}))\ns : Set ι\ni : ι\nhi : p i ∈ ↑(convexHull 𝕜) (p '' s)\nH : ¬i ∈ s\n⊢ p i ∈ ↑(convexHull 𝕜) (p '' s)\n[PROOFSTEP]\nexact hi\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t s : Set E\n⊢ ConvexIndependent 𝕜 Subtype.val ↔ ∀ (t : Set E), t ⊆ s → s ∩ ↑(convexHull 𝕜) t ⊆ t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t s : Set E\n⊢ ConvexIndependent 𝕜 Subtype.val → ∀ (t : Set E), t ⊆ s → s ∩ ↑(convexHull 𝕜) t ⊆ t\n[PROOFSTEP]\nrintro hc t h x ⟨hxs, hxt⟩\n[GOAL]\ncase mp.intro\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t✝ s : Set E\nhc : ConvexIndependent 𝕜 Subtype.val\nt : Set E\nh : t ⊆ s\nx : E\nhxs : x ∈ s\nhxt : x ∈ ↑(convexHull 𝕜) t\n⊢ x ∈ t\n[PROOFSTEP]\nrefine' hc {x | ↑x ∈ t} ⟨x, hxs⟩ _\n[GOAL]\ncase mp.intro\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t✝ s : Set E\nhc : ConvexIndependent 𝕜 Subtype.val\nt : Set E\nh : t ⊆ s\nx : E\nhxs : x ∈ s\nhxt : x ∈ ↑(convexHull 𝕜) t\n⊢ ↑{ val := x, property := hxs } ∈ ↑(convexHull 𝕜) (Subtype.val '' {x | ↑x ∈ t})\n[PROOFSTEP]\nrw [Subtype.coe_image_of_subset h]\n[GOAL]\ncase mp.intro\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t✝ s : Set E\nhc : ConvexIndependent 𝕜 Subtype.val\nt : Set E\nh : t ⊆ s\nx : E\nhxs : x ∈ s\nhxt : x ∈ ↑(convexHull 𝕜) t\n⊢ ↑{ val := x, property := hxs } ∈ ↑(convexHull 𝕜) t\n[PROOFSTEP]\nexact hxt\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t s : Set E\n⊢ (∀ (t : Set E), t ⊆ s → s ∩ ↑(convexHull 𝕜) t ⊆ t) → ConvexIndependent 𝕜 Subtype.val\n[PROOFSTEP]\nintro hc t x h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t✝ s : Set E\nhc : ∀ (t : Set E), t ⊆ s → s ∩ ↑(convexHull 𝕜) t ⊆ t\nt : Set { x // x ∈ s }\nx : { x // x ∈ s }\nh : ↑x ∈ ↑(convexHull 𝕜) (Subtype.val '' t)\n⊢ x ∈ t\n[PROOFSTEP]\nrw [← Subtype.coe_injective.mem_set_image]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t✝ s : Set E\nhc : ∀ (t : Set E), t ⊆ s → s ∩ ↑(convexHull 𝕜) t ⊆ t\nt : Set { x // x ∈ s }\nx : { x // x ∈ s }\nh : ↑x ∈ ↑(convexHull 𝕜) (Subtype.val '' t)\n⊢ ↑x ∈ (fun a => ↑a) '' t\n[PROOFSTEP]\nexact hc (t.image ((↑) : s → E)) (Subtype.coe_image_subset s t) ⟨x.prop, h⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t s : Set E\n⊢ ConvexIndependent 𝕜 Subtype.val ↔ ∀ (x : E), x ∈ s → ¬x ∈ ↑(convexHull 𝕜) (s \\ {x})\n[PROOFSTEP]\nrw [convexIndependent_set_iff_inter_convexHull_subset]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t s : Set E\n⊢ (∀ (t : Set E), t ⊆ s → s ∩ ↑(convexHull 𝕜) t ⊆ t) ↔ ∀ (x : E), x ∈ s → ¬x ∈ ↑(convexHull 𝕜) (s \\ {x})\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t s : Set E\n⊢ (∀ (t : Set E), t ⊆ s → s ∩ ↑(convexHull 𝕜) t ⊆ t) → ∀ (x : E), x ∈ s → ¬x ∈ ↑(convexHull 𝕜) (s \\ {x})\n[PROOFSTEP]\nrintro hs x hxs hx\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t s : Set E\nhs : ∀ (t : Set E), t ⊆ s → s ∩ ↑(convexHull 𝕜) t ⊆ t\nx : E\nhxs : x ∈ s\nhx : x ∈ ↑(convexHull 𝕜) (s \\ {x})\n⊢ False\n[PROOFSTEP]\nexact (hs _ (Set.diff_subset _ _) ⟨hxs, hx⟩).2 (Set.mem_singleton _)\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t s : Set E\n⊢ (∀ (x : E), x ∈ s → ¬x ∈ ↑(convexHull 𝕜) (s \\ {x})) → ∀ (t : Set E), t ⊆ s → s ∩ ↑(convexHull 𝕜) t ⊆ t\n[PROOFSTEP]\nrintro hs t ht x ⟨hxs, hxt⟩\n[GOAL]\ncase mpr.intro\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t✝ s : Set E\nhs : ∀ (x : E), x ∈ s → ¬x ∈ ↑(convexHull 𝕜) (s \\ {x})\nt : Set E\nht : t ⊆ s\nx : E\nhxs : x ∈ s\nhxt : x ∈ ↑(convexHull 𝕜) t\n⊢ x ∈ t\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase mpr.intro\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ t✝ s : Set E\nhs : ∀ (x : E), x ∈ s → ¬x ∈ ↑(convexHull 𝕜) (s \\ {x})\nt : Set E\nht : t ⊆ s\nx : E\nhxs : x ∈ s\nhxt : x ∈ ↑(convexHull 𝕜) t\nh : ¬x ∈ t\n⊢ False\n[PROOFSTEP]\nexact hs _ hxs (convexHull_mono (Set.subset_diff_singleton ht h) hxt)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\np : ι → E\n⊢ ConvexIndependent 𝕜 p ↔ ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\n[PROOFSTEP]\nrefine' ⟨fun hc s x hx => hc s x _, fun h s x hx => _⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nhc : ConvexIndependent 𝕜 p\ns : Finset ι\nx : ι\nhx : p x ∈ ↑(convexHull 𝕜) ↑(image p s)\n⊢ p x ∈ ↑(convexHull 𝕜) (p '' ↑s)\n[PROOFSTEP]\nrwa [Finset.coe_image] at hx \n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhx : p x ∈ ↑(convexHull 𝕜) (p '' s)\n⊢ x ∈ s\n[PROOFSTEP]\nhave hp : Injective p := by\n  rintro a b hab\n  rw [← mem_singleton]\n  refine' h { b } a _\n  rw [hab, image_singleton, coe_singleton, convexHull_singleton]\n  exact Set.mem_singleton _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhx : p x ∈ ↑(convexHull 𝕜) (p '' s)\n⊢ Injective p\n[PROOFSTEP]\nrintro a b hab\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhx : p x ∈ ↑(convexHull 𝕜) (p '' s)\na b : ι\nhab : p a = p b\n⊢ a = b\n[PROOFSTEP]\nrw [← mem_singleton]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhx : p x ∈ ↑(convexHull 𝕜) (p '' s)\na b : ι\nhab : p a = p b\n⊢ a ∈ {b}\n[PROOFSTEP]\nrefine' h { b } a _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhx : p x ∈ ↑(convexHull 𝕜) (p '' s)\na b : ι\nhab : p a = p b\n⊢ p a ∈ ↑(convexHull 𝕜) ↑(image p {b})\n[PROOFSTEP]\nrw [hab, image_singleton, coe_singleton, convexHull_singleton]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhx : p x ∈ ↑(convexHull 𝕜) (p '' s)\na b : ι\nhab : p a = p b\n⊢ p b ∈ {p b}\n[PROOFSTEP]\nexact Set.mem_singleton _\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhx : p x ∈ ↑(convexHull 𝕜) (p '' s)\nhp : Injective p\n⊢ x ∈ s\n[PROOFSTEP]\nrw [convexHull_eq_union_convexHull_finite_subsets] at hx \n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhx : p x ∈ ⋃ (t : Finset E) (_ : ↑t ⊆ p '' s), ↑(convexHull 𝕜) ↑t\nhp : Injective p\n⊢ x ∈ s\n[PROOFSTEP]\nsimp_rw [Set.mem_iUnion] at hx \n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhp : Injective p\nhx : ∃ i i_1, p x ∈ ↑(convexHull 𝕜) ↑i\n⊢ x ∈ s\n[PROOFSTEP]\nobtain ⟨t, ht, hx⟩ := hx\n[GOAL]\ncase refine'_2.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhp : Injective p\nt : Finset E\nht : ↑t ⊆ p '' s\nhx : p x ∈ ↑(convexHull 𝕜) ↑t\n⊢ x ∈ s\n[PROOFSTEP]\nrw [← hp.mem_set_image]\n[GOAL]\ncase refine'_2.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhp : Injective p\nt : Finset E\nht : ↑t ⊆ p '' s\nhx : p x ∈ ↑(convexHull 𝕜) ↑t\n⊢ p x ∈ p '' s\n[PROOFSTEP]\nrefine' ht _\n[GOAL]\ncase refine'_2.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhp : Injective p\nt : Finset E\nht : ↑t ⊆ p '' s\nhx : p x ∈ ↑(convexHull 𝕜) ↑t\n⊢ p x ∈ ↑t\n[PROOFSTEP]\nsuffices x ∈ t.preimage p (hp.injOn _) by rwa [mem_preimage, ← mem_coe] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhp : Injective p\nt : Finset E\nht : ↑t ⊆ p '' s\nhx : p x ∈ ↑(convexHull 𝕜) ↑t\nthis : x ∈ preimage t p (_ : Set.InjOn p (p ⁻¹' ↑t))\n⊢ p x ∈ ↑t\n[PROOFSTEP]\nrwa [mem_preimage, ← mem_coe] at this \n[GOAL]\ncase refine'_2.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhp : Injective p\nt : Finset E\nht : ↑t ⊆ p '' s\nhx : p x ∈ ↑(convexHull 𝕜) ↑t\n⊢ x ∈ preimage t p (_ : Set.InjOn p (p ⁻¹' ↑t))\n[PROOFSTEP]\nrefine' h _ x _\n[GOAL]\ncase refine'_2.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhp : Injective p\nt : Finset E\nht : ↑t ⊆ p '' s\nhx : p x ∈ ↑(convexHull 𝕜) ↑t\n⊢ p x ∈ ↑(convexHull 𝕜) ↑(image p (preimage t p (_ : Set.InjOn p (p ⁻¹' ↑t))))\n[PROOFSTEP]\nrwa [t.image_preimage p (hp.injOn _), filter_true_of_mem]\n[GOAL]\ncase refine'_2.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nι : Type u_3\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns✝ : Set E\np : ι → E\nh : ∀ (s : Finset ι) (x : ι), p x ∈ ↑(convexHull 𝕜) ↑(image p s) → x ∈ s\ns : Set ι\nx : ι\nhp : Injective p\nt : Finset E\nht : ↑t ⊆ p '' s\nhx : p x ∈ ↑(convexHull 𝕜) ↑t\n⊢ ∀ (x : E), x ∈ t → x ∈ Set.range p\n[PROOFSTEP]\nexact fun y hy => s.image_subset_range p (ht <| mem_coe.2 hy)\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Independent", "llama_tokens": 10533, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943712746406, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.38777596273258674}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nm : (s : Set α) → MeasurableSet s → ℝ≥0∞\nm0 : m ∅ (_ : MeasurableSet ∅) = 0\nmU :\n  ∀ ⦃f : ℕ → Set α⦄ (h : ∀ (i : ℕ), MeasurableSet (f i)),\n    Pairwise (Disjoint on f) →\n      m (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) = ∑' (i : ℕ), m (f i) (_ : MeasurableSet (f i))\nsrc✝ : OuterMeasure α := inducedOuterMeasure m (_ : MeasurableSet ∅) m0\nf : ℕ → Set α\nhf : ∀ (i : ℕ), MeasurableSet (f i)\nhd : Pairwise (Disjoint on f)\n⊢ ↑(inducedOuterMeasure m (_ : MeasurableSet ∅) m0) (iUnion f) =\n    ∑' (i : ℕ), ↑(inducedOuterMeasure m (_ : MeasurableSet ∅) m0) (f i)\n[PROOFSTEP]\nrw [inducedOuterMeasure_eq m0 mU, mU hf hd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nm : (s : Set α) → MeasurableSet s → ℝ≥0∞\nm0 : m ∅ (_ : MeasurableSet ∅) = 0\nmU :\n  ∀ ⦃f : ℕ → Set α⦄ (h : ∀ (i : ℕ), MeasurableSet (f i)),\n    Pairwise (Disjoint on f) →\n      m (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) = ∑' (i : ℕ), m (f i) (_ : MeasurableSet (f i))\nsrc✝ : OuterMeasure α := inducedOuterMeasure m (_ : MeasurableSet ∅) m0\nf : ℕ → Set α\nhf : ∀ (i : ℕ), MeasurableSet (f i)\nhd : Pairwise (Disjoint on f)\n⊢ ∑' (i : ℕ), m (f i) (_ : MeasurableSet (f i)) = ∑' (i : ℕ), ↑(inducedOuterMeasure m (_ : MeasurableSet ∅) m0) (f i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nm : (s : Set α) → MeasurableSet s → ℝ≥0∞\nm0 : m ∅ (_ : MeasurableSet ∅) = 0\nmU :\n  ∀ ⦃f : ℕ → Set α⦄ (h : ∀ (i : ℕ), MeasurableSet (f i)),\n    Pairwise (Disjoint on f) →\n      m (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) = ∑' (i : ℕ), m (f i) (_ : MeasurableSet (f i))\nsrc✝ : OuterMeasure α := inducedOuterMeasure m (_ : MeasurableSet ∅) m0\nf : ℕ → Set α\nhf : ∀ (i : ℕ), MeasurableSet (f i)\nhd : Pairwise (Disjoint on f)\n⊢ (fun i => m (f i) (_ : MeasurableSet (f i))) = fun i => ↑(inducedOuterMeasure m (_ : MeasurableSet ∅) m0) (f i)\n[PROOFSTEP]\nfunext n\n[GOAL]\ncase e_f.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nm : (s : Set α) → MeasurableSet s → ℝ≥0∞\nm0 : m ∅ (_ : MeasurableSet ∅) = 0\nmU :\n  ∀ ⦃f : ℕ → Set α⦄ (h : ∀ (i : ℕ), MeasurableSet (f i)),\n    Pairwise (Disjoint on f) →\n      m (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) = ∑' (i : ℕ), m (f i) (_ : MeasurableSet (f i))\nsrc✝ : OuterMeasure α := inducedOuterMeasure m (_ : MeasurableSet ∅) m0\nf : ℕ → Set α\nhf : ∀ (i : ℕ), MeasurableSet (f i)\nhd : Pairwise (Disjoint on f)\nn : ℕ\n⊢ m (f n) (_ : MeasurableSet (f n)) = ↑(inducedOuterMeasure m (_ : MeasurableSet ∅) m0) (f n)\n[PROOFSTEP]\nrw [inducedOuterMeasure_eq m0 mU]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nm : (s : Set α) → MeasurableSet s → ℝ≥0∞\nm0 : m ∅ (_ : MeasurableSet ∅) = 0\nmU :\n  ∀ ⦃f : ℕ → Set α⦄ (h : ∀ (i : ℕ), MeasurableSet (f i)),\n    Pairwise (Disjoint on f) →\n      m (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) = ∑' (i : ℕ), m (f i) (_ : MeasurableSet (f i))\nsrc✝ : OuterMeasure α := inducedOuterMeasure m (_ : MeasurableSet ∅) m0\n⊢ OuterMeasure.trim (inducedOuterMeasure m (_ : MeasurableSet ∅) m0) = inducedOuterMeasure m (_ : MeasurableSet ∅) m0\n[PROOFSTEP]\nunfold OuterMeasure.trim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nm : (s : Set α) → MeasurableSet s → ℝ≥0∞\nm0 : m ∅ (_ : MeasurableSet ∅) = 0\nmU :\n  ∀ ⦃f : ℕ → Set α⦄ (h : ∀ (i : ℕ), MeasurableSet (f i)),\n    Pairwise (Disjoint on f) →\n      m (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) = ∑' (i : ℕ), m (f i) (_ : MeasurableSet (f i))\nsrc✝ : OuterMeasure α := inducedOuterMeasure m (_ : MeasurableSet ∅) m0\n⊢ inducedOuterMeasure (fun s x => ↑(inducedOuterMeasure m (_ : MeasurableSet ∅) m0) s) (_ : MeasurableSet ∅)\n      (_ : ↑(inducedOuterMeasure m (_ : MeasurableSet ∅) m0) ∅ = 0) =\n    inducedOuterMeasure m (_ : MeasurableSet ∅) m0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_m\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nm : (s : Set α) → MeasurableSet s → ℝ≥0∞\nm0 : m ∅ (_ : MeasurableSet ∅) = 0\nmU :\n  ∀ ⦃f : ℕ → Set α⦄ (h : ∀ (i : ℕ), MeasurableSet (f i)),\n    Pairwise (Disjoint on f) →\n      m (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) = ∑' (i : ℕ), m (f i) (_ : MeasurableSet (f i))\nsrc✝ : OuterMeasure α := inducedOuterMeasure m (_ : MeasurableSet ∅) m0\n⊢ (fun s x => ↑(inducedOuterMeasure m (_ : MeasurableSet ∅) m0) s) = m\n[PROOFSTEP]\nfunext s hs\n[GOAL]\ncase e_m.h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nm : (s : Set α) → MeasurableSet s → ℝ≥0∞\nm0 : m ∅ (_ : MeasurableSet ∅) = 0\nmU :\n  ∀ ⦃f : ℕ → Set α⦄ (h : ∀ (i : ℕ), MeasurableSet (f i)),\n    Pairwise (Disjoint on f) →\n      m (⋃ (i : ℕ), f i) (_ : MeasurableSet (⋃ (b : ℕ), f b)) = ∑' (i : ℕ), m (f i) (_ : MeasurableSet (f i))\nsrc✝ : OuterMeasure α := inducedOuterMeasure m (_ : MeasurableSet ∅) m0\ns : Set α\nhs : MeasurableSet s\n⊢ ↑(inducedOuterMeasure m (_ : MeasurableSet ∅) m0) s = m s hs\n[PROOFSTEP]\nexact inducedOuterMeasure_eq m0 mU hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nx✝¹ x✝ : Measure α\nm₁ : OuterMeasure α\nu₁ :\n  ∀ ⦃f : ℕ → Set α⦄,\n    (∀ (i : ℕ), MeasurableSet (f i)) → Pairwise (Disjoint on f) → ↑m₁ (⋃ (i : ℕ), f i) = ∑' (i : ℕ), ↑m₁ (f i)\nh₁ : OuterMeasure.trim m₁ = m₁\nm₂ : OuterMeasure α\n_u₂ :\n  ∀ ⦃f : ℕ → Set α⦄,\n    (∀ (i : ℕ), MeasurableSet (f i)) → Pairwise (Disjoint on f) → ↑m₂ (⋃ (i : ℕ), f i) = ∑' (i : ℕ), ↑m₂ (f i)\n_h₂ : OuterMeasure.trim m₂ = m₂\n_h :\n  ↑{ toOuterMeasure := m₁, m_iUnion := u₁, trimmed := h₁ } = ↑{ toOuterMeasure := m₂, m_iUnion := _u₂, trimmed := _h₂ }\n⊢ { toOuterMeasure := m₁, m_iUnion := u₁, trimmed := h₁ } = { toOuterMeasure := m₂, m_iUnion := _u₂, trimmed := _h₂ }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : ∀ (s : Set α), MeasurableSet s → ↑↑μ₁ s = ↑↑μ₂ s\n⊢ ↑μ₁ = ↑μ₂\n[PROOFSTEP]\nrw [← trimmed, OuterMeasure.trim_congr (h _), trimmed]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\n⊢ μ₁ = μ₂ → ∀ (s : Set α), MeasurableSet s → ↑↑μ₁ s = ↑↑μ₂ s\n[PROOFSTEP]\nrintro rfl s _hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ : Measure α\ns✝ s₁ s₂ t s : Set α\n_hs : MeasurableSet s\n⊢ ↑↑μ₁ s = ↑↑μ₁ s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t s : Set α\n⊢ ↑↑μ s = ↑(OuterMeasure.trim ↑μ) s\n[PROOFSTEP]\nrw [μ.trimmed]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t s : Set α\n⊢ ↑↑μ s = ⨅ (t : Set α) (_ : s ⊆ t) (_ : MeasurableSet t), ↑↑μ t\n[PROOFSTEP]\nrw [measure_eq_trim, OuterMeasure.trim_eq_iInf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ : Measure α\ns : Set α\n⊢ ↑↑μ s = ⨅ (t : { t // s ⊆ t ∧ MeasurableSet t }), ↑↑μ ↑t\n[PROOFSTEP]\nsimp_rw [iInf_subtype, iInf_and, ← measure_eq_iInf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nhs : MeasurableSet s\n⊢ ↑↑μ s = extend (fun t _ht => ↑↑μ t) s\n[PROOFSTEP]\nrw [extend_eq]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nhs : MeasurableSet s\n⊢ MeasurableSet s\n[PROOFSTEP]\nexact hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ : Measure α\ns : Set α\n⊢ ∃ t, s ⊆ t ∧ MeasurableSet t ∧ ↑↑μ t = ↑↑μ s\n[PROOFSTEP]\nsimpa only [← measure_eq_trim] using μ.toOuterMeasure.exists_measurable_superset_eq_trim s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι✝ : Type u_5\ninst✝¹ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nι : Sort u_6\ninst✝ : Countable ι\nμ : ι → Measure α\ns : Set α\n⊢ ∃ t, s ⊆ t ∧ MeasurableSet t ∧ ∀ (i : ι), ↑↑(μ i) t = ↑↑(μ i) s\n[PROOFSTEP]\nsimpa only [← measure_eq_trim] using\n  OuterMeasure.exists_measurable_superset_forall_eq_trim (fun i => (μ i).toOuterMeasure) s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ ν : Measure α\ns : Set α\n⊢ ∃ t, s ⊆ t ∧ MeasurableSet t ∧ ↑↑μ t = ↑↑μ s ∧ ↑↑ν t = ↑↑ν s\n[PROOFSTEP]\nsimpa only [Bool.forall_bool.trans and_comm] using exists_measurable_superset_forall_eq (fun b => cond b μ ν) s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\ns : Set β\nhs : Set.Countable s\nf : β → Set α\n⊢ ↑↑μ (⋃ (b : β) (_ : b ∈ s), f b) ≤ ∑' (p : ↑s), ↑↑μ (f ↑p)\n[PROOFSTEP]\nhaveI := hs.to_subtype\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\ns : Set β\nhs : Set.Countable s\nf : β → Set α\nthis : Countable ↑s\n⊢ ↑↑μ (⋃ (b : β) (_ : b ∈ s), f b) ≤ ∑' (p : ↑s), ↑↑μ (f ↑p)\n[PROOFSTEP]\nrw [biUnion_eq_iUnion]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\ns : Set β\nhs : Set.Countable s\nf : β → Set α\nthis : Countable ↑s\n⊢ ↑↑μ (⋃ (x : ↑s), f ↑x) ≤ ∑' (p : ↑s), ↑↑μ (f ↑p)\n[PROOFSTEP]\napply measure_iUnion_le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\ns : Finset β\nf : β → Set α\n⊢ ↑↑μ (⋃ (b : β) (_ : b ∈ s), f b) ≤ ∑ p in s, ↑↑μ (f p)\n[PROOFSTEP]\nrw [← Finset.sum_attach, Finset.attach_eq_univ, ← tsum_fintype]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\ns : Finset β\nf : β → Set α\n⊢ ↑↑μ (⋃ (b : β) (_ : b ∈ s), f b) ≤ ∑' (b : { x // x ∈ s }), ↑↑μ (f ↑b)\n[PROOFSTEP]\nexact measure_biUnion_le s.countable_toSet f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝¹ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\ninst✝ : Fintype β\nf : β → Set α\n⊢ ↑↑μ (⋃ (b : β), f b) ≤ ∑ p : β, ↑↑μ (f p)\n[PROOFSTEP]\nconvert measure_biUnion_finset_le Finset.univ f\n[GOAL]\ncase h.e'_3.h.e'_3.h.e'_3.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝¹ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\ninst✝ : Fintype β\nf : β → Set α\nx✝ : β\n⊢ f x✝ = ⋃ (_ : x✝ ∈ Finset.univ), f x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\ns : Set β\nf : β → Set α\nhs : Set.Finite s\nhfin : ∀ (i : β), i ∈ s → ↑↑μ (f i) ≠ ⊤\n⊢ ↑↑μ (⋃ (i : β) (_ : i ∈ s), f i) < ⊤\n[PROOFSTEP]\nconvert (measure_biUnion_finset_le hs.toFinset f).trans_lt _ using 3\n[GOAL]\ncase h.e'_3.h.e'_3.h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\ns : Set β\nf : β → Set α\nhs : Set.Finite s\nhfin : ∀ (i : β), i ∈ s → ↑↑μ (f i) ≠ ⊤\n⊢ (fun i => ⋃ (_ : i ∈ s), f i) = fun b => ⋃ (_ : b ∈ Finite.toFinset hs), f b\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_3.h.e'_3.h.e'_3.h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\ns : Set β\nf : β → Set α\nhs : Set.Finite s\nhfin : ∀ (i : β), i ∈ s → ↑↑μ (f i) ≠ ⊤\nx✝¹ : β\nx✝ : α\n⊢ x✝ ∈ ⋃ (_ : x✝¹ ∈ s), f x✝¹ ↔ x✝ ∈ ⋃ (_ : x✝¹ ∈ Finite.toFinset hs), f x✝¹\n[PROOFSTEP]\nrw [Finite.mem_toFinset]\n[GOAL]\ncase convert_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\ns : Set β\nf : β → Set α\nhs : Set.Finite s\nhfin : ∀ (i : β), i ∈ s → ↑↑μ (f i) ≠ ⊤\n⊢ ∑ p in Finite.toFinset hs, ↑↑μ (f p) < ⊤\n[PROOFSTEP]\napply ENNReal.sum_lt_top\n[GOAL]\ncase convert_3.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\ns : Set β\nf : β → Set α\nhs : Set.Finite s\nhfin : ∀ (i : β), i ∈ s → ↑↑μ (f i) ≠ ⊤\n⊢ ∀ (a : β), a ∈ Finite.toFinset hs → ↑↑μ (f a) ≠ ⊤\n[PROOFSTEP]\nsimpa only [Finite.mem_toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\n⊢ ↑↑μ (s ∪ t) < ⊤ ↔ ↑↑μ s < ⊤ ∧ ↑↑μ t < ⊤\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨_, _⟩, fun h => measure_union_lt_top h.1 h.2⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : ↑↑μ (s ∪ t) < ⊤\n⊢ ↑↑μ s < ⊤\n[PROOFSTEP]\nexact (measure_mono (Set.subset_union_left s t)).trans_lt h\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : ↑↑μ (s ∪ t) < ⊤\n⊢ ↑↑μ t < ⊤\n[PROOFSTEP]\nexact (measure_mono (Set.subset_union_right s t)).trans_lt h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\n⊢ ¬↑↑μ (s ∪ t) = ⊤ ↔ ¬(↑↑μ s = ⊤ ∨ ↑↑μ t = ⊤)\n[PROOFSTEP]\nsimp only [← lt_top_iff_ne_top, ← Ne.def, not_or, measure_union_lt_top_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝¹ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\ninst✝ : Countable β\ns : β → Set α\nhs : ↑↑μ (⋃ (n : β), s n) ≠ 0\n⊢ ∃ n, 0 < ↑↑μ (s n)\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝¹ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\ninst✝ : Countable β\ns : β → Set α\nhs : ∀ (n : β), ↑↑μ (s n) ≤ 0\n⊢ ↑↑μ (⋃ (n : β), s n) = 0\n[PROOFSTEP]\nexact measure_iUnion_null fun n => nonpos_iff_eq_zero.1 (hs n)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α✝\nμ✝ μ₁ μ₂ : Measure α✝\ns s₁ s₂ t : Set α✝\nα : Type ?u.37668\nm : MeasurableSpace α\nμ : Measure α\n⊢ univ ∈ {s | ↑↑μ sᶜ = 0}\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α✝\nμ✝ μ₁ μ₂ : Measure α✝\ns s₁ s₂ t : Set α✝\nα : Type ?u.37668\nm : MeasurableSpace α\nμ : Measure α\nx✝ y✝ : Set α\nhs : x✝ ∈ {s | ↑↑μ sᶜ = 0}\nht : y✝ ∈ {s | ↑↑μ sᶜ = 0}\n⊢ x✝ ∩ y✝ ∈ {s | ↑↑μ sᶜ = 0}\n[PROOFSTEP]\nsimp only [compl_inter, mem_setOf_eq]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α✝\nμ✝ μ₁ μ₂ : Measure α✝\ns s₁ s₂ t : Set α✝\nα : Type ?u.37668\nm : MeasurableSpace α\nμ : Measure α\nx✝ y✝ : Set α\nhs : x✝ ∈ {s | ↑↑μ sᶜ = 0}\nht : y✝ ∈ {s | ↑↑μ sᶜ = 0}\n⊢ ↑↑μ (x✝ᶜ ∪ y✝ᶜ) = 0\n[PROOFSTEP]\nexact measure_union_null hs ht\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t s : Set α\n⊢ sᶜ ∈ Measure.ae μ ↔ ↑↑μ s = 0\n[PROOFSTEP]\nsimp only [mem_ae_iff, compl_compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\n⊢ ∀ (S : Set (Set α)), Set.Countable S → (∀ (s : Set α), s ∈ S → s ∈ Measure.ae μ) → ⋂₀ S ∈ Measure.ae μ\n[PROOFSTEP]\nintro S hSc hS\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nS : Set (Set α)\nhSc : Set.Countable S\nhS : ∀ (s : Set α), s ∈ S → s ∈ Measure.ae μ\n⊢ ⋂₀ S ∈ Measure.ae μ\n[PROOFSTEP]\nrw [mem_ae_iff, compl_sInter, sUnion_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nS : Set (Set α)\nhSc : Set.Countable S\nhS : ∀ (s : Set α), s ∈ S → s ∈ Measure.ae μ\n⊢ ↑↑μ (⋃ (x : Set α) (_ : x ∈ S), xᶜ) = 0\n[PROOFSTEP]\nexact (measure_biUnion_null_iff hSc).2 hS\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nf g : α → ℝ≥0∞\nh : ∀ᵐ (x : α) ∂μ, f x < g x\n⊢ f ≤ᵐ[μ] g\n[PROOFSTEP]\nrw [Filter.EventuallyLE, ae_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nf g : α → ℝ≥0∞\nh : ∀ᵐ (x : α) ∂μ, f x < g x\n⊢ ↑↑μ {a | ¬f a ≤ g a} = 0\n[PROOFSTEP]\nrw [ae_iff] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nf g : α → ℝ≥0∞\nh : ↑↑μ {a | ¬f a < g a} = 0\n⊢ ↑↑μ {a | ¬f a ≤ g a} = 0\n[PROOFSTEP]\nrefine' measure_mono_null (fun x hx => _) h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nf g : α → ℝ≥0∞\nh : ↑↑μ {a | ¬f a < g a} = 0\nx : α\nhx : x ∈ {a | ¬f a ≤ g a}\n⊢ x ∈ {a | ¬f a < g a}\n[PROOFSTEP]\nexact not_lt.2 (le_of_lt (not_le.1 hx))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\n⊢ (∀ᵐ (x : α) ∂μ, ¬x ∈ s) ↔ ↑↑μ s = 0\n[PROOFSTEP]\nsimp only [ae_iff, Classical.not_not, setOf_mem_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\n⊢ (∀ᵐ (x : α) ∂μ, x ∈ s → x ∈ t) ↔ ↑↑μ (s \\ t) = 0\n[PROOFSTEP]\nsimp [ae_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\n⊢ ↑↑μ {a | a ∈ s ∧ ¬a ∈ t} = 0 ↔ ↑↑μ (s \\ t) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\n⊢ s ∪ t =ᵐ[μ] t ↔ ↑↑μ (s \\ t) = 0\n[PROOFSTEP]\nsimp [eventuallyLE_antisymm_iff, ae_le_set, union_diff_right, diff_eq_empty.2 (Set.subset_union_right _ _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\n⊢ s \\ t =ᵐ[μ] s ↔ ↑↑μ (s ∩ t) = 0\n[PROOFSTEP]\nsimp [eventuallyLE_antisymm_iff, ae_le_set, diff_diff_right, diff_diff, diff_eq_empty.2 (Set.subset_union_right _ _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t✝ s t : Set α\n⊢ s =ᵐ[μ] t ↔ ↑↑μ (s \\ t) = 0 ∧ ↑↑μ (t \\ s) = 0\n[PROOFSTEP]\nsimp [eventuallyLE_antisymm_iff, ae_le_set]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t✝ s t : Set α\n⊢ ↑↑μ (s ∆ t) = 0 ↔ s =ᵐ[μ] t\n[PROOFSTEP]\nsimp [ae_eq_set, symmDiff_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t✝ s t : Set α\n⊢ sᶜ =ᵐ[μ] tᶜ ↔ s =ᵐ[μ] t\n[PROOFSTEP]\nsimp only [← measure_symmDiff_eq_zero_iff, compl_symmDiff_compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t✝ s t : Set α\n⊢ sᶜ =ᵐ[μ] t ↔ s =ᵐ[μ] tᶜ\n[PROOFSTEP]\nrw [← ae_eq_set_compl_compl, compl_compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : s =ᵐ[μ] univ\n⊢ s ∪ t =ᵐ[μ] univ\n[PROOFSTEP]\nconvert ae_eq_set_union h (ae_eq_refl t)\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : s =ᵐ[μ] univ\n⊢ univ = univ ∪ t\n[PROOFSTEP]\nrw [univ_union]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : t =ᵐ[μ] univ\n⊢ s ∪ t =ᵐ[μ] univ\n[PROOFSTEP]\nconvert ae_eq_set_union (ae_eq_refl s) h\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : t =ᵐ[μ] univ\n⊢ univ = s ∪ univ\n[PROOFSTEP]\nrw [union_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : s =ᵐ[μ] ∅\n⊢ s ∪ t =ᵐ[μ] t\n[PROOFSTEP]\nconvert ae_eq_set_union h (ae_eq_refl t)\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : s =ᵐ[μ] ∅\n⊢ t = ∅ ∪ t\n[PROOFSTEP]\nrw [empty_union]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : t =ᵐ[μ] ∅\n⊢ s ∪ t =ᵐ[μ] s\n[PROOFSTEP]\nconvert ae_eq_set_union (ae_eq_refl s) h\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : t =ᵐ[μ] ∅\n⊢ s = s ∪ ∅\n[PROOFSTEP]\nrw [union_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : s =ᵐ[μ] univ\n⊢ s ∩ t =ᵐ[μ] t\n[PROOFSTEP]\nconvert ae_eq_set_inter h (ae_eq_refl t)\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : s =ᵐ[μ] univ\n⊢ t = univ ∩ t\n[PROOFSTEP]\nrw [univ_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : t =ᵐ[μ] univ\n⊢ s ∩ t =ᵐ[μ] s\n[PROOFSTEP]\nconvert ae_eq_set_inter (ae_eq_refl s) h\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : t =ᵐ[μ] univ\n⊢ s = s ∩ univ\n[PROOFSTEP]\nrw [inter_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : s =ᵐ[μ] ∅\n⊢ s ∩ t =ᵐ[μ] ∅\n[PROOFSTEP]\nconvert ae_eq_set_inter h (ae_eq_refl t)\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : s =ᵐ[μ] ∅\n⊢ ∅ = ∅ ∩ t\n[PROOFSTEP]\nrw [empty_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : t =ᵐ[μ] ∅\n⊢ s ∩ t =ᵐ[μ] ∅\n[PROOFSTEP]\nconvert ae_eq_set_inter (ae_eq_refl s) h\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nh : t =ᵐ[μ] ∅\n⊢ ∅ = s ∩ ∅\n[PROOFSTEP]\nrw [inter_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝¹ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nM : Type u_6\ninst✝ : One M\nf : α → M\ns : Set α\n⊢ mulIndicator s f =ᵐ[μ] 1 ↔ ↑↑μ (s ∩ mulSupport f) = 0\n[PROOFSTEP]\nsimp [EventuallyEq, eventually_iff, Measure.ae, compl_setOf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝¹ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nM : Type u_6\ninst✝ : One M\nf : α → M\ns : Set α\n⊢ ↑↑μ {a | a ∈ s ∧ ¬f a = 1} = 0 ↔ ↑↑μ (s ∩ mulSupport f) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nH : s ≤ᵐ[μ] t\n⊢ ↑↑μ (s ∪ t) = ↑↑μ (t ∪ s \\ t)\n[PROOFSTEP]\nrw [union_diff_self, Set.union_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns s₁ s₂ t : Set α\nH : s ≤ᵐ[μ] t\n⊢ ↑↑μ t + ↑↑μ (s \\ t) = ↑↑μ t\n[PROOFSTEP]\nrw [ae_le_set.1 H, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ : Measure α\ns : Set α\n⊢ s ⊆ toMeasurable μ s\n[PROOFSTEP]\nrw [toMeasurable_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ : Measure α\ns : Set α\n⊢ s ⊆\n    if h : ∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s then Exists.choose h\n    else\n      if h' : ∃ t x, MeasurableSet t ∧ ∀ (u : Set α), MeasurableSet u → ↑↑μ (t ∩ u) = ↑↑μ (s ∩ u) then Exists.choose h'\n      else Exists.choose (_ : ∃ t, s ⊆ t ∧ MeasurableSet t ∧ ↑↑μ t = ↑↑μ s)\n[PROOFSTEP]\nsplit_ifs with hs h's\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ : Measure α\ns : Set α\nhs : ∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s\n⊢ s ⊆ Exists.choose hs\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ : Measure α\ns : Set α\nhs : ¬∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s\nh's : ∃ t x, MeasurableSet t ∧ ∀ (u : Set α), MeasurableSet u → ↑↑μ (t ∩ u) = ↑↑μ (s ∩ u)\n⊢ s ⊆ Exists.choose h's\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ : Measure α\ns : Set α\nhs : ¬∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s\nh's : ¬∃ t x, MeasurableSet t ∧ ∀ (u : Set α), MeasurableSet u → ↑↑μ (t ∩ u) = ↑↑μ (s ∩ u)\n⊢ s ⊆ Exists.choose (_ : ∃ t, s ⊆ t ∧ MeasurableSet t ∧ ↑↑μ t = ↑↑μ s)\n[PROOFSTEP]\nexacts [hs.choose_spec.fst, h's.choose_spec.fst, (exists_measurable_superset μ s).choose_spec.1]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ : Measure α\ns : Set α\n⊢ MeasurableSet (toMeasurable μ s)\n[PROOFSTEP]\nrw [toMeasurable_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ : Measure α\ns : Set α\n⊢ MeasurableSet\n    (if h : ∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s then Exists.choose h\n    else\n      if h' : ∃ t x, MeasurableSet t ∧ ∀ (u : Set α), MeasurableSet u → ↑↑μ (t ∩ u) = ↑↑μ (s ∩ u) then Exists.choose h'\n      else Exists.choose (_ : ∃ t, s ⊆ t ∧ MeasurableSet t ∧ ↑↑μ t = ↑↑μ s))\n[PROOFSTEP]\nsplit_ifs with hs h's\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ : Measure α\ns : Set α\nhs : ∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s\n⊢ MeasurableSet (Exists.choose hs)\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ : Measure α\ns : Set α\nhs : ¬∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s\nh's : ∃ t x, MeasurableSet t ∧ ∀ (u : Set α), MeasurableSet u → ↑↑μ (t ∩ u) = ↑↑μ (s ∩ u)\n⊢ MeasurableSet (Exists.choose h's)\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ✝ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t : Set α\nμ : Measure α\ns : Set α\nhs : ¬∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s\nh's : ¬∃ t x, MeasurableSet t ∧ ∀ (u : Set α), MeasurableSet u → ↑↑μ (t ∩ u) = ↑↑μ (s ∩ u)\n⊢ MeasurableSet (Exists.choose (_ : ∃ t, s ⊆ t ∧ MeasurableSet t ∧ ↑↑μ t = ↑↑μ s))\n[PROOFSTEP]\nexacts [hs.choose_spec.snd.1, h's.choose_spec.snd.1, (exists_measurable_superset μ s).choose_spec.2.1]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t s : Set α\n⊢ ↑↑μ (toMeasurable μ s) = ↑↑μ s\n[PROOFSTEP]\nrw [toMeasurable_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t s : Set α\n⊢ ↑↑μ\n      (if h : ∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s then Exists.choose h\n      else\n        if h' : ∃ t x, MeasurableSet t ∧ ∀ (u : Set α), MeasurableSet u → ↑↑μ (t ∩ u) = ↑↑μ (s ∩ u) then\n          Exists.choose h'\n        else Exists.choose (_ : ∃ t, s ⊆ t ∧ MeasurableSet t ∧ ↑↑μ t = ↑↑μ s)) =\n    ↑↑μ s\n[PROOFSTEP]\nsplit_ifs with hs h's\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t s : Set α\nhs : ∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s\n⊢ ↑↑μ (Exists.choose hs) = ↑↑μ s\n[PROOFSTEP]\nexact measure_congr hs.choose_spec.snd.2\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t s : Set α\nhs : ¬∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s\nh's : ∃ t x, MeasurableSet t ∧ ∀ (u : Set α), MeasurableSet u → ↑↑μ (t ∩ u) = ↑↑μ (s ∩ u)\n⊢ ↑↑μ (Exists.choose h's) = ↑↑μ s\n[PROOFSTEP]\nsimpa only [inter_univ] using h's.choose_spec.snd.2 univ MeasurableSet.univ\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Type u_5\ninst✝ : MeasurableSpace α\nμ μ₁ μ₂ : Measure α\ns✝ s₁ s₂ t s : Set α\nhs : ¬∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s\nh's : ¬∃ t x, MeasurableSet t ∧ ∀ (u : Set α), MeasurableSet u → ↑↑μ (t ∩ u) = ↑↑μ (s ∩ u)\n⊢ ↑↑μ (Exists.choose (_ : ∃ t, s ⊆ t ∧ MeasurableSet t ∧ ↑↑μ t = ↑↑μ s)) = ↑↑μ s\n[PROOFSTEP]\nexact (exists_measurable_superset μ s).choose_spec.2.2\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.MeasureSpaceDef", "llama_tokens": 16272, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943712746406, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.38777596273258674}}
{"text": "[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\n⊢ ContinuousWithinAt (toIcoMod hp a) (Ici x) x\n[PROOFSTEP]\nintro s h\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nh : s ∈ 𝓝 (toIcoMod hp a x)\n⊢ s ∈ Filter.map (toIcoMod hp a) (𝓝[Ici x] x)\n[PROOFSTEP]\nrw [Filter.mem_map, mem_nhdsWithin_iff_exists_mem_nhds_inter]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nh : s ∈ 𝓝 (toIcoMod hp a x)\n⊢ ∃ u, u ∈ 𝓝 x ∧ u ∩ Ici x ⊆ toIcoMod hp a ⁻¹' s\n[PROOFSTEP]\nhaveI : Nontrivial 𝕜 := ⟨⟨0, p, hp.ne⟩⟩\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nh : s ∈ 𝓝 (toIcoMod hp a x)\nthis : Nontrivial 𝕜\n⊢ ∃ u, u ∈ 𝓝 x ∧ u ∩ Ici x ⊆ toIcoMod hp a ⁻¹' s\n[PROOFSTEP]\nsimp_rw [mem_nhds_iff_exists_Ioo_subset] at h ⊢\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nh : ∃ l u, toIcoMod hp a x ∈ Ioo l u ∧ Ioo l u ⊆ s\n⊢ ∃ u, (∃ l u_1, x ∈ Ioo l u_1 ∧ Ioo l u_1 ⊆ u) ∧ u ∩ Ici x ⊆ toIcoMod hp a ⁻¹' s\n[PROOFSTEP]\nobtain ⟨l, u, hxI, hIs⟩ := h\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\n⊢ ∃ u, (∃ l u_1, x ∈ Ioo l u_1 ∧ Ioo l u_1 ⊆ u) ∧ u ∩ Ici x ⊆ toIcoMod hp a ⁻¹' s\n[PROOFSTEP]\nlet d := toIcoDiv hp a x • p\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\n⊢ ∃ u, (∃ l u_1, x ∈ Ioo l u_1 ∧ Ioo l u_1 ⊆ u) ∧ u ∩ Ici x ⊆ toIcoMod hp a ⁻¹' s\n[PROOFSTEP]\nhave hd := toIcoMod_mem_Ico hp a x\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\nhd : toIcoMod hp a x ∈ Ico a (a + p)\n⊢ ∃ u, (∃ l u_1, x ∈ Ioo l u_1 ∧ Ioo l u_1 ⊆ u) ∧ u ∩ Ici x ⊆ toIcoMod hp a ⁻¹' s\n[PROOFSTEP]\nsimp_rw [subset_def, mem_inter_iff]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\nhd : toIcoMod hp a x ∈ Ico a (a + p)\n⊢ ∃ u,\n    (∃ l u_1, x ∈ Ioo l u_1 ∧ ∀ (x : 𝕜), x ∈ Ioo l u_1 → x ∈ u) ∧\n      ∀ (x_1 : 𝕜), x_1 ∈ u ∧ x_1 ∈ Ici x → x_1 ∈ toIcoMod hp a ⁻¹' s\n[PROOFSTEP]\nrefine' ⟨_, ⟨l + d, min (a + p) u + d, _, fun x => id⟩, fun y => _⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\nhd : toIcoMod hp a x ∈ Ico a (a + p)\n⊢ x ∈ Ioo (l + d) (min (a + p) u + d)\n[PROOFSTEP]\nsimp_rw [← sub_mem_Ioo_iff_left, mem_Ioo, lt_min_iff]\n[GOAL]\ncase intro.intro.intro.refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\nhd : toIcoMod hp a x ∈ Ico a (a + p)\ny : 𝕜\n⊢ y ∈ Ioo (l + d) (min (a + p) u + d) ∧ y ∈ Ici x → y ∈ toIcoMod hp a ⁻¹' s\n[PROOFSTEP]\nsimp_rw [← sub_mem_Ioo_iff_left, mem_Ioo, lt_min_iff]\n[GOAL]\ncase intro.intro.intro.refine'_1\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\nhd : toIcoMod hp a x ∈ Ico a (a + p)\n⊢ l < x - toIcoDiv hp a x • p ∧ x - toIcoDiv hp a x • p < a + p ∧ x - toIcoDiv hp a x • p < u\n[PROOFSTEP]\nexact ⟨hxI.1, hd.2, hxI.2⟩\n[GOAL]\ncase intro.intro.intro.refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\nhd : toIcoMod hp a x ∈ Ico a (a + p)\ny : 𝕜\n⊢ (l < y - toIcoDiv hp a x • p ∧ y - toIcoDiv hp a x • p < a + p ∧ y - toIcoDiv hp a x • p < u) ∧ y ∈ Ici x →\n    y ∈ toIcoMod hp a ⁻¹' s\n[PROOFSTEP]\nrintro ⟨h, h'⟩\n[GOAL]\ncase intro.intro.intro.refine'_2.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\nhd : toIcoMod hp a x ∈ Ico a (a + p)\ny : 𝕜\nh : l < y - toIcoDiv hp a x • p ∧ y - toIcoDiv hp a x • p < a + p ∧ y - toIcoDiv hp a x • p < u\nh' : y ∈ Ici x\n⊢ y ∈ toIcoMod hp a ⁻¹' s\n[PROOFSTEP]\napply hIs\n[GOAL]\ncase intro.intro.intro.refine'_2.intro.a\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\nhd : toIcoMod hp a x ∈ Ico a (a + p)\ny : 𝕜\nh : l < y - toIcoDiv hp a x • p ∧ y - toIcoDiv hp a x • p < a + p ∧ y - toIcoDiv hp a x • p < u\nh' : y ∈ Ici x\n⊢ toIcoMod hp a y ∈ Ioo l u\n[PROOFSTEP]\nrw [← toIcoMod_sub_zsmul, (toIcoMod_eq_self _).2]\n[GOAL]\ncase intro.intro.intro.refine'_2.intro.a\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\nhd : toIcoMod hp a x ∈ Ico a (a + p)\ny : 𝕜\nh : l < y - toIcoDiv hp a x • p ∧ y - toIcoDiv hp a x • p < a + p ∧ y - toIcoDiv hp a x • p < u\nh' : y ∈ Ici x\n⊢ y - ?intro.intro.intro.refine'_2.intro.a.m • p ∈ Ioo l u\ncase intro.intro.intro.refine'_2.intro.a\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\nhd : toIcoMod hp a x ∈ Ico a (a + p)\ny : 𝕜\nh : l < y - toIcoDiv hp a x • p ∧ y - toIcoDiv hp a x • p < a + p ∧ y - toIcoDiv hp a x • p < u\nh' : y ∈ Ici x\n⊢ y - ?intro.intro.intro.refine'_2.intro.a.m • p ∈ Ico a (a + p)\ncase intro.intro.intro.refine'_2.intro.a.m\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\nhd : toIcoMod hp a x ∈ Ico a (a + p)\ny : 𝕜\nh : l < y - toIcoDiv hp a x • p ∧ y - toIcoDiv hp a x • p < a + p ∧ y - toIcoDiv hp a x • p < u\nh' : y ∈ Ici x\n⊢ ℤ\ncase intro.intro.intro.refine'_2.intro.a.m\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\ns : Set 𝕜\nthis : Nontrivial 𝕜\nl u : 𝕜\nhxI : toIcoMod hp a x ∈ Ioo l u\nhIs : Ioo l u ⊆ s\nd : 𝕜 := toIcoDiv hp a x • p\nhd : toIcoMod hp a x ∈ Ico a (a + p)\ny : 𝕜\nh : l < y - toIcoDiv hp a x • p ∧ y - toIcoDiv hp a x • p < a + p ∧ y - toIcoDiv hp a x • p < u\nh' : y ∈ Ici x\n⊢ ℤ\n[PROOFSTEP]\nexacts [⟨h.1, h.2.2⟩, ⟨hd.1.trans (sub_le_sub_right h' _), h.2.1⟩]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\n⊢ ContinuousWithinAt (toIocMod hp a) (Iic x) x\n[PROOFSTEP]\nrw [(funext fun y => Eq.trans (by rw [neg_neg]) <| toIocMod_neg _ _ _ :\n    toIocMod hp a = (fun x => p - x) ∘ toIcoMod hp (-a) ∘ Neg.neg)]\n  -- Porting note: added\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x y : 𝕜\n⊢ toIocMod hp a y = toIocMod hp a (- -y)\n[PROOFSTEP]\nrw [neg_neg]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\n⊢ ContinuousWithinAt ((fun x => p - x) ∘ toIcoMod hp (-a) ∘ Neg.neg) (Iic x) x\n[PROOFSTEP]\nhave : ContinuousNeg 𝕜 := TopologicalAddGroup.toContinuousNeg\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\nthis : ContinuousNeg 𝕜\n⊢ ContinuousWithinAt ((fun x => p - x) ∘ toIcoMod hp (-a) ∘ Neg.neg) (Iic x) x\n[PROOFSTEP]\nexact\n  (continuous_sub_left _).continuousAt.comp_continuousWithinAt <|\n    (continuous_right_toIcoMod _ _ _).comp continuous_neg.continuousWithinAt fun y => neg_le_neg\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\nhx : ↑x ≠ ↑a\n⊢ IsOpen {x | (fun x => toIcoMod hp a x = toIocMod hp a x) x}\n[PROOFSTEP]\nrw [Ico_eq_locus_Ioc_eq_iUnion_Ioo]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : Archimedean 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\na x : 𝕜\nhx : ↑x ≠ ↑a\n⊢ IsOpen (⋃ (z : ℤ), Ioo (a + z • p) (a + p + z • p))\n[PROOFSTEP]\nexact isOpen_iUnion fun i => isOpen_Ioo\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np x : 𝕜\n⊢ ↑x = 0 ↔ ∃ n, n • p = x\n[PROOFSTEP]\nsimp [AddSubgroup.mem_zmultiples_iff]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\nx : 𝕜\nhx : 0 < x\n⊢ ↑x = 0 ↔ ∃ n, n • p = x\n[PROOFSTEP]\nrw [coe_eq_zero_iff]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\nx : 𝕜\nhx : 0 < x\n⊢ (∃ n, n • p = x) ↔ ∃ n, n • p = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\nx : 𝕜\nhx : 0 < x\n⊢ (∃ n, n • p = x) → ∃ n, n • p = x\n[PROOFSTEP]\nrintro ⟨n, rfl⟩\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\nx : 𝕜\nhx : 0 < x\n⊢ (∃ n, n • p = x) → ∃ n, n • p = x\n[PROOFSTEP]\nrintro ⟨n, rfl⟩\n[GOAL]\ncase mp.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\nn : ℤ\nhx : 0 < n • p\n⊢ ∃ n_1, n_1 • p = n • p\n[PROOFSTEP]\nreplace hx : 0 < n\n[GOAL]\ncase hx\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\nn : ℤ\nhx : 0 < n • p\n⊢ 0 < n\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase hx\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\nn : ℤ\nhx : n ≤ 0\n⊢ n • p ≤ 0\n[PROOFSTEP]\nsimpa only [← neg_nonneg, ← zsmul_neg, zsmul_neg'] using zsmul_nonneg hp.le (neg_nonneg.2 hx)\n[GOAL]\ncase mp.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\nn : ℤ\nhx : 0 < n\n⊢ ∃ n_1, n_1 • p = n • p\n[PROOFSTEP]\nexact ⟨n.toNat, by rw [← coe_nat_zsmul, Int.toNat_of_nonneg hx.le]⟩\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\nn : ℤ\nhx : 0 < n\n⊢ Int.toNat n • p = n • p\n[PROOFSTEP]\nrw [← coe_nat_zsmul, Int.toNat_of_nonneg hx.le]\n[GOAL]\ncase mpr.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\nn : ℕ\nhx : 0 < n • p\n⊢ ∃ n_1, n_1 • p = n • p\n[PROOFSTEP]\nexact ⟨(n : ℤ), by simp⟩\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np : 𝕜\nhp : 0 < p\nn : ℕ\nhx : 0 < n • p\n⊢ ↑n • p = n • p\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedAddCommGroup 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np x : 𝕜\n⊢ ↑(x + p) = ↑x\n[PROOFSTEP]\nrw [coe_add, ← eq_sub_iff_add_eq', sub_self, coe_period]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx y : 𝕜\nhx : x ∈ Ico a (a + p)\nhy : y ∈ Ico a (a + p)\n⊢ ↑x = ↑y ↔ x = y\n[PROOFSTEP]\nrefine' ⟨fun h => _, by tauto⟩\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx y : 𝕜\nhx : x ∈ Ico a (a + p)\nhy : y ∈ Ico a (a + p)\n⊢ x = y → ↑x = ↑y\n[PROOFSTEP]\ntauto\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx y : 𝕜\nhx : x ∈ Ico a (a + p)\nhy : y ∈ Ico a (a + p)\nh : ↑x = ↑y\n⊢ x = y\n[PROOFSTEP]\nsuffices (⟨x, hx⟩ : Ico a (a + p)) = ⟨y, hy⟩ by exact Subtype.mk.inj this\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx y : 𝕜\nhx : x ∈ Ico a (a + p)\nhy : y ∈ Ico a (a + p)\nh : ↑x = ↑y\nthis : { val := x, property := hx } = { val := y, property := hy }\n⊢ x = y\n[PROOFSTEP]\nexact Subtype.mk.inj this\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx y : 𝕜\nhx : x ∈ Ico a (a + p)\nhy : y ∈ Ico a (a + p)\nh : ↑x = ↑y\n⊢ { val := x, property := hx } = { val := y, property := hy }\n[PROOFSTEP]\napply_fun equivIco p a at h \n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx y : 𝕜\nhx : x ∈ Ico a (a + p)\nhy : y ∈ Ico a (a + p)\nh : ↑(equivIco p a) ↑x = ↑(equivIco p a) ↑y\n⊢ { val := x, property := hx } = { val := y, property := hy }\n[PROOFSTEP]\nrw [← (equivIco p a).right_inv ⟨x, hx⟩, ← (equivIco p a).right_inv ⟨y, hy⟩]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx y : 𝕜\nhx : x ∈ Ico a (a + p)\nhy : y ∈ Ico a (a + p)\nh : ↑(equivIco p a) ↑x = ↑(equivIco p a) ↑y\n⊢ Equiv.toFun (equivIco p a) (Equiv.invFun (equivIco p a) { val := x, property := hx }) =\n    Equiv.toFun (equivIco p a) (Equiv.invFun (equivIco p a) { val := y, property := hy })\n[PROOFSTEP]\nexact h\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nx : 𝕜\nhx : x ∈ Ico a (a + p)\n⊢ liftIco p a f ↑x = f x\n[PROOFSTEP]\nhave : (equivIco p a) x = ⟨x, hx⟩ := by\n  rw [Equiv.apply_eq_iff_eq_symm_apply]\n  rfl\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nx : 𝕜\nhx : x ∈ Ico a (a + p)\n⊢ ↑(equivIco p a) ↑x = { val := x, property := hx }\n[PROOFSTEP]\nrw [Equiv.apply_eq_iff_eq_symm_apply]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nx : 𝕜\nhx : x ∈ Ico a (a + p)\n⊢ ↑x = ↑(equivIco p a).symm { val := x, property := hx }\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nx : 𝕜\nhx : x ∈ Ico a (a + p)\nthis : ↑(equivIco p a) ↑x = { val := x, property := hx }\n⊢ liftIco p a f ↑x = f x\n[PROOFSTEP]\nrw [liftIco, comp_apply, this]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nx : 𝕜\nhx : x ∈ Ico a (a + p)\nthis : ↑(equivIco p a) ↑x = { val := x, property := hx }\n⊢ restrict (Ico a (a + p)) f { val := x, property := hx } = f x\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nx : 𝕜\nhx : x ∈ Ioc a (a + p)\n⊢ liftIoc p a f ↑x = f x\n[PROOFSTEP]\nhave : (equivIoc p a) x = ⟨x, hx⟩ := by\n  rw [Equiv.apply_eq_iff_eq_symm_apply]\n  rfl\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nx : 𝕜\nhx : x ∈ Ioc a (a + p)\n⊢ ↑(equivIoc p a) ↑x = { val := x, property := hx }\n[PROOFSTEP]\nrw [Equiv.apply_eq_iff_eq_symm_apply]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nx : 𝕜\nhx : x ∈ Ioc a (a + p)\n⊢ ↑x = ↑(equivIoc p a).symm { val := x, property := hx }\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nx : 𝕜\nhx : x ∈ Ioc a (a + p)\nthis : ↑(equivIoc p a) ↑x = { val := x, property := hx }\n⊢ liftIoc p a f ↑x = f x\n[PROOFSTEP]\nrw [liftIoc, comp_apply, this]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nx : 𝕜\nhx : x ∈ Ioc a (a + p)\nthis : ↑(equivIoc p a) ↑x = { val := x, property := hx }\n⊢ restrict (Ioc a (a + p)) f { val := x, property := hx } = f x\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx : AddCircle p\nhx : x ≠ ↑a\n⊢ ContinuousAt (↑(equivIco p a)) x\n[PROOFSTEP]\ninduction x using QuotientAddGroup.induction_on'\n[GOAL]\ncase H\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx : AddCircle p\nz✝ : 𝕜\nhx : ↑z✝ ≠ ↑a\n⊢ ContinuousAt ↑(equivIco p a) ↑z✝\n[PROOFSTEP]\nrw [ContinuousAt, Filter.Tendsto, QuotientAddGroup.nhds_eq, Filter.map_map]\n[GOAL]\ncase H\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx : AddCircle p\nz✝ : 𝕜\nhx : ↑z✝ ≠ ↑a\n⊢ Filter.map (↑(equivIco p a) ∘ QuotientAddGroup.mk) (𝓝 z✝) ≤ 𝓝 (↑(equivIco p a) ↑z✝)\n[PROOFSTEP]\nexact (continuousAt_toIcoMod hp.out a hx).codRestrict _\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx : AddCircle p\nhx : x ≠ ↑a\n⊢ ContinuousAt (↑(equivIoc p a)) x\n[PROOFSTEP]\ninduction x using QuotientAddGroup.induction_on'\n[GOAL]\ncase H\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx : AddCircle p\nz✝ : 𝕜\nhx : ↑z✝ ≠ ↑a\n⊢ ContinuousAt ↑(equivIoc p a) ↑z✝\n[PROOFSTEP]\nrw [ContinuousAt, Filter.Tendsto, QuotientAddGroup.nhds_eq, Filter.map_map]\n[GOAL]\ncase H\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\nx : AddCircle p\nz✝ : 𝕜\nhx : ↑z✝ ≠ ↑a\n⊢ Filter.map (↑(equivIoc p a) ∘ QuotientAddGroup.mk) (𝓝 z✝) ≤ 𝓝 (↑(equivIoc p a) ↑z✝)\n[PROOFSTEP]\nexact (continuousAt_toIocMod hp.out a hx).codRestrict _\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\n⊢ QuotientAddGroup.mk '' Ico a (a + p) = univ\n[PROOFSTEP]\nrw [image_eq_range]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\n⊢ (range fun x => ↑↑x) = univ\n[PROOFSTEP]\nexact (equivIco p a).symm.range_eq_univ\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\n⊢ QuotientAddGroup.mk '' Ioc a (a + p) = univ\n[PROOFSTEP]\nrw [image_eq_range]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np : 𝕜\nhp : Fact (0 < p)\na : 𝕜\ninst✝ : Archimedean 𝕜\n⊢ (range fun x => ↑↑x) = univ\n[PROOFSTEP]\nexact (equivIoc p a).symm.range_eq_univ\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ map (↑(AddAut.mulRight ((Units.mk0 p hp)⁻¹ * Units.mk0 q hq))) (zmultiples p) = zmultiples q\n[PROOFSTEP]\nrw [AddMonoidHom.map_zmultiples, AddMonoidHom.coe_coe, AddAut.mulRight_apply, Units.val_mul, Units.val_mk0,\n  Units.val_inv_eq_inv_val, Units.val_mk0, mul_inv_cancel_left₀ hp]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedField 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\ninst✝ : FloorRing 𝕜\nx : AddCircle p\n⊢ (fun x n => ↑((↑n)⁻¹ * ↑(↑(equivIco p 0) x))) x 0 = 0\n[PROOFSTEP]\nsimp only [algebraMap.coe_zero, Int.cast_zero, inv_zero, zero_mul, QuotientAddGroup.mk_zero]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedField 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\ninst✝ : FloorRing 𝕜\nn : ℤ\nx : AddCircle p\nhn : n ≠ 0\n⊢ n • (fun x n => ↑((↑n)⁻¹ * ↑(↑(equivIco p 0) x))) x n = x\n[PROOFSTEP]\nreplace hn : (n : 𝕜) ≠ 0\n[GOAL]\ncase hn\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedField 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\ninst✝ : FloorRing 𝕜\nn : ℤ\nx : AddCircle p\nhn : n ≠ 0\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedField 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\ninst✝ : FloorRing 𝕜\nn : ℤ\nx : AddCircle p\nhn : ↑n ≠ 0\n⊢ n • (fun x n => ↑((↑n)⁻¹ * ↑(↑(equivIco p 0) x))) x n = x\n[PROOFSTEP]\nchange n • QuotientAddGroup.mk' _ ((n : 𝕜)⁻¹ * ↑(equivIco p 0 x)) = x\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedField 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\ninst✝ : FloorRing 𝕜\nn : ℤ\nx : AddCircle p\nhn : ↑n ≠ 0\n⊢ n • ↑(QuotientAddGroup.mk' (zmultiples p)) ((↑n)⁻¹ * ↑(↑(equivIco p 0) x)) = x\n[PROOFSTEP]\nrw [← map_zsmul, ← smul_mul_assoc, zsmul_eq_mul, mul_inv_cancel hn, one_mul]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedField 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\ninst✝ : FloorRing 𝕜\nn : ℤ\nx : AddCircle p\nhn : ↑n ≠ 0\n⊢ ↑(QuotientAddGroup.mk' (zmultiples p)) ↑(↑(equivIco p 0) x) = x\n[PROOFSTEP]\nexact (equivIco p 0).symm_apply_apply x\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nh : 0 < n\n⊢ addOrderOf ↑(p / ↑n) = n\n[PROOFSTEP]\nrw [addOrderOf_eq_iff h]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nh : 0 < n\n⊢ n • ↑(p / ↑n) = 0 ∧ ∀ (m : ℕ), m < n → 0 < m → m • ↑(p / ↑n) ≠ 0\n[PROOFSTEP]\nreplace h : 0 < (n : 𝕜) := Nat.cast_pos.2 h\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nh : 0 < ↑n\n⊢ n • ↑(p / ↑n) = 0 ∧ ∀ (m : ℕ), m < n → 0 < m → m • ↑(p / ↑n) ≠ 0\n[PROOFSTEP]\nrefine' ⟨_, fun m hn h0 => _⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nh : 0 < ↑n\n⊢ n • ↑(p / ↑n) = 0\n[PROOFSTEP]\nsimp only [Ne, ← coe_nsmul, nsmul_eq_mul]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nh : 0 < ↑n\nm : ℕ\nhn : m < n\nh0 : 0 < m\n⊢ m • ↑(p / ↑n) ≠ 0\n[PROOFSTEP]\nsimp only [Ne, ← coe_nsmul, nsmul_eq_mul]\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nh : 0 < ↑n\n⊢ ↑(↑n * (p / ↑n)) = 0\n[PROOFSTEP]\nrw [mul_div_cancel' _ h.ne', coe_period]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nh : 0 < ↑n\nm : ℕ\nhn : m < n\nh0 : 0 < m\n⊢ ¬↑(↑m * (p / ↑n)) = 0\n[PROOFSTEP]\nrw [coe_eq_zero_of_pos_iff p hp.out (mul_pos (Nat.cast_pos.2 h0) <| div_pos hp.out h)]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nh : 0 < ↑n\nm : ℕ\nhn : m < n\nh0 : 0 < m\n⊢ ¬∃ n_1, n_1 • p = ↑m * (p / ↑n)\n[PROOFSTEP]\nrintro ⟨k, hk⟩\n[GOAL]\ncase refine'_2.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nh : 0 < ↑n\nm : ℕ\nhn : m < n\nh0 : 0 < m\nk : ℕ\nhk : k • p = ↑m * (p / ↑n)\n⊢ False\n[PROOFSTEP]\nrw [mul_div, eq_div_iff h.ne', nsmul_eq_mul, mul_right_comm, ← Nat.cast_mul, (mul_left_injective₀ hp.out.ne').eq_iff,\n  Nat.cast_inj, mul_comm] at hk \n[GOAL]\ncase refine'_2.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nh : 0 < ↑n\nm : ℕ\nhn : m < n\nh0 : 0 < m\nk : ℕ\nhk : n * k = m\n⊢ False\n[PROOFSTEP]\nexact (Nat.le_of_dvd h0 ⟨_, hk.symm⟩).not_lt hn\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn m : ℕ\nhn : 0 < n\n⊢ Nat.gcd m n * addOrderOf ↑(↑m / ↑n * p) = n\n[PROOFSTEP]\nrw [mul_comm_div, ← nsmul_eq_mul, coe_nsmul, addOrderOf_nsmul'']\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn m : ℕ\nhn : 0 < n\n⊢ Nat.gcd m n * (addOrderOf ↑(p / ↑n) / Nat.gcd (addOrderOf ↑(p / ↑n)) m) = n\n[PROOFSTEP]\nrw [addOrderOf_period_div hn, Nat.gcd_comm, Nat.mul_div_cancel']\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn m : ℕ\nhn : 0 < n\n⊢ Nat.gcd n m ∣ n\n[PROOFSTEP]\nexact n.gcd_dvd_left m\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn m : ℕ\nhn : 0 < n\n⊢ IsOfFinAddOrder ↑(p / ↑n)\n[PROOFSTEP]\nrw [← addOrderOf_pos_iff, addOrderOf_period_div hn]\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn m : ℕ\nhn : 0 < n\n⊢ 0 < n\n[PROOFSTEP]\nexact hn\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nm n : ℕ\nhn : 0 < n\nh : Nat.gcd m n = 1\n⊢ addOrderOf ↑(↑m / ↑n * p) = n\n[PROOFSTEP]\nconvert gcd_mul_addOrderOf_div_eq p m hn\n[GOAL]\ncase h.e'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nm n : ℕ\nhn : 0 < n\nh : Nat.gcd m n = 1\n⊢ addOrderOf ↑(↑m / ↑n * p) = Nat.gcd m n * addOrderOf ↑(↑m / ↑n * p)\n[PROOFSTEP]\nrw [h, one_mul]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nm : ℤ\nn : ℕ\nhn : 0 < n\nh : Nat.gcd (Int.natAbs m) n = 1\n⊢ addOrderOf ↑(↑m / ↑n * p) = n\n[PROOFSTEP]\ninduction m\n[GOAL]\ncase ofNat\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\na✝ : ℕ\nh : Nat.gcd (Int.natAbs (Int.ofNat a✝)) n = 1\n⊢ addOrderOf ↑(↑(Int.ofNat a✝) / ↑n * p) = n\n[PROOFSTEP]\nsimp only [Int.ofNat_eq_coe, Int.cast_ofNat, Int.natAbs_ofNat] at h ⊢\n[GOAL]\ncase ofNat\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\na✝ : ℕ\nh : Nat.gcd a✝ n = 1\n⊢ addOrderOf ↑(↑a✝ / ↑n * p) = n\n[PROOFSTEP]\nexact addOrderOf_div_of_gcd_eq_one hn h\n[GOAL]\ncase negSucc\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\na✝ : ℕ\nh : Nat.gcd (Int.natAbs (Int.negSucc a✝)) n = 1\n⊢ addOrderOf ↑(↑(Int.negSucc a✝) / ↑n * p) = n\n[PROOFSTEP]\nsimp only [Int.cast_negSucc, neg_div, neg_mul, coe_neg, addOrderOf_neg]\n[GOAL]\ncase negSucc\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\na✝ : ℕ\nh : Nat.gcd (Int.natAbs (Int.negSucc a✝)) n = 1\n⊢ addOrderOf ↑(↑(a✝ + 1) / ↑n * p) = n\n[PROOFSTEP]\nexact addOrderOf_div_of_gcd_eq_one hn h\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q✝ : 𝕜\nhp : Fact (0 < p)\nq : ℚ\n⊢ addOrderOf ↑(↑q * p) = q.den\n[PROOFSTEP]\nhave : (↑(q.den : ℤ) : 𝕜) ≠ 0 := by\n  norm_cast\n  exact q.pos.ne.symm\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q✝ : 𝕜\nhp : Fact (0 < p)\nq : ℚ\n⊢ ↑↑q.den ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q✝ : 𝕜\nhp : Fact (0 < p)\nq : ℚ\n⊢ ¬q.den = 0\n[PROOFSTEP]\nexact q.pos.ne.symm\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q✝ : 𝕜\nhp : Fact (0 < p)\nq : ℚ\nthis : ↑↑q.den ≠ 0\n⊢ addOrderOf ↑(↑q * p) = q.den\n[PROOFSTEP]\nrw [← @Rat.num_den q, Rat.cast_mk_of_ne_zero _ _ this, Int.cast_ofNat, Rat.num_den,\n  addOrderOf_div_of_gcd_eq_one' q.pos q.reduced]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\n⊢ addOrderOf u = n ↔ ∃ m, m < n ∧ Nat.gcd m n = 1 ∧ ↑(↑m / ↑n * p) = u\n[PROOFSTEP]\nrefine' ⟨QuotientAddGroup.induction_on' u fun k hk => _, _⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\n⊢ (∃ m, m < n ∧ Nat.gcd m n = 1 ∧ ↑(↑m / ↑n * p) = u) → addOrderOf u = n\n[PROOFSTEP]\nrintro ⟨m, _, h₁, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nh : 0 < n\nm : ℕ\nleft✝ : m < n\nh₁ : Nat.gcd m n = 1\n⊢ addOrderOf ↑(↑m / ↑n * p) = n\n[PROOFSTEP]\nexact addOrderOf_div_of_gcd_eq_one h h₁\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\n⊢ ∃ m, m < n ∧ Nat.gcd m n = 1 ∧ ↑(↑m / ↑n * p) = ↑k\n[PROOFSTEP]\nhave h0 := addOrderOf_nsmul_eq_zero (k : AddCircle p)\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\nh0 : addOrderOf ↑k • ↑k = 0\n⊢ ∃ m, m < n ∧ Nat.gcd m n = 1 ∧ ↑(↑m / ↑n * p) = ↑k\n[PROOFSTEP]\nrw [hk, ← coe_nsmul, coe_eq_zero_iff] at h0 \n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\nh0 : ∃ n_1, n_1 • p = n • k\n⊢ ∃ m, m < n ∧ Nat.gcd m n = 1 ∧ ↑(↑m / ↑n * p) = ↑k\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := h0\n[GOAL]\ncase refine'_2.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : a • p = n • k\n⊢ ∃ m, m < n ∧ Nat.gcd m n = 1 ∧ ↑(↑m / ↑n * p) = ↑k\n[PROOFSTEP]\nhave h0 : (_ : 𝕜) ≠ 0 := Nat.cast_ne_zero.2 h.ne'\n[GOAL]\ncase refine'_2.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : a • p = n • k\nh0 : ↑n ≠ 0\n⊢ ∃ m, m < n ∧ Nat.gcd m n = 1 ∧ ↑(↑m / ↑n * p) = ↑k\n[PROOFSTEP]\nrw [nsmul_eq_mul, mul_comm, ← div_eq_iff h0, ← a.ediv_add_emod' n, add_smul, add_div, zsmul_eq_mul, Int.cast_mul,\n  Int.cast_ofNat, mul_assoc, ← mul_div, mul_comm _ p, mul_div_cancel p h0] at ha \n[GOAL]\ncase refine'_2.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : ↑(a / ↑n) * p + (a % ↑n) • p / ↑n = k\nh0 : ↑n ≠ 0\n⊢ ∃ m, m < n ∧ Nat.gcd m n = 1 ∧ ↑(↑m / ↑n * p) = ↑k\n[PROOFSTEP]\nhave han : _ = a % n := Int.toNat_of_nonneg (Int.emod_nonneg _ <| by exact_mod_cast h.ne')\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : ↑(a / ↑n) * p + (a % ↑n) • p / ↑n = k\nh0 : ↑n ≠ 0\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nexact_mod_cast h.ne'\n[GOAL]\ncase refine'_2.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : ↑(a / ↑n) * p + (a % ↑n) • p / ↑n = k\nh0 : ↑n ≠ 0\nhan : ↑(Int.toNat (a % ↑n)) = a % ↑n\n⊢ ∃ m, m < n ∧ Nat.gcd m n = 1 ∧ ↑(↑m / ↑n * p) = ↑k\n[PROOFSTEP]\nhave he : (↑(↑((a % n).toNat) / ↑n * p) : AddCircle p) = k\n[GOAL]\ncase he\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : ↑(a / ↑n) * p + (a % ↑n) • p / ↑n = k\nh0 : ↑n ≠ 0\nhan : ↑(Int.toNat (a % ↑n)) = a % ↑n\n⊢ ↑(↑(Int.toNat (a % ↑n)) / ↑n * p) = ↑k\n[PROOFSTEP]\nconvert congr_arg (QuotientAddGroup.mk : 𝕜 → (AddCircle p)) ha using 1\n[GOAL]\ncase h.e'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : ↑(a / ↑n) * p + (a % ↑n) • p / ↑n = k\nh0 : ↑n ≠ 0\nhan : ↑(Int.toNat (a % ↑n)) = a % ↑n\n⊢ ↑(↑(Int.toNat (a % ↑n)) / ↑n * p) = ↑(↑(a / ↑n) * p + (a % ↑n) • p / ↑n)\n[PROOFSTEP]\nrw [coe_add, ← Int.cast_ofNat, han, zsmul_eq_mul, mul_div_right_comm, eq_comm, add_left_eq_self, ← zsmul_eq_mul,\n  coe_zsmul, coe_period, smul_zero]\n[GOAL]\ncase refine'_2.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : ↑(a / ↑n) * p + (a % ↑n) • p / ↑n = k\nh0 : ↑n ≠ 0\nhan : ↑(Int.toNat (a % ↑n)) = a % ↑n\nhe : ↑(↑(Int.toNat (a % ↑n)) / ↑n * p) = ↑k\n⊢ ∃ m, m < n ∧ Nat.gcd m n = 1 ∧ ↑(↑m / ↑n * p) = ↑k\n[PROOFSTEP]\nrefine' ⟨(a % n).toNat, _, _, he⟩\n[GOAL]\ncase refine'_2.intro.refine'_1\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : ↑(a / ↑n) * p + (a % ↑n) • p / ↑n = k\nh0 : ↑n ≠ 0\nhan : ↑(Int.toNat (a % ↑n)) = a % ↑n\nhe : ↑(↑(Int.toNat (a % ↑n)) / ↑n * p) = ↑k\n⊢ Int.toNat (a % ↑n) < n\n[PROOFSTEP]\nrw [← Int.ofNat_lt, han]\n[GOAL]\ncase refine'_2.intro.refine'_1\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : ↑(a / ↑n) * p + (a % ↑n) • p / ↑n = k\nh0 : ↑n ≠ 0\nhan : ↑(Int.toNat (a % ↑n)) = a % ↑n\nhe : ↑(↑(Int.toNat (a % ↑n)) / ↑n * p) = ↑k\n⊢ a % ↑n < ↑n\n[PROOFSTEP]\nexact Int.emod_lt_of_pos _ (Int.ofNat_lt.2 h)\n[GOAL]\ncase refine'_2.intro.refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : ↑(a / ↑n) * p + (a % ↑n) • p / ↑n = k\nh0 : ↑n ≠ 0\nhan : ↑(Int.toNat (a % ↑n)) = a % ↑n\nhe : ↑(↑(Int.toNat (a % ↑n)) / ↑n * p) = ↑k\n⊢ Nat.gcd (Int.toNat (a % ↑n)) n = 1\n[PROOFSTEP]\nhave := (gcd_mul_addOrderOf_div_eq p (Int.toNat (a % ↑n)) h).trans ((congr_arg addOrderOf he).trans hk).symm\n[GOAL]\ncase refine'_2.intro.refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : ↑(a / ↑n) * p + (a % ↑n) • p / ↑n = k\nh0 : ↑n ≠ 0\nhan : ↑(Int.toNat (a % ↑n)) = a % ↑n\nhe : ↑(↑(Int.toNat (a % ↑n)) / ↑n * p) = ↑k\nthis :\n  Nat.gcd (Int.toNat (a % ↑n)) n * addOrderOf ↑(↑(Int.toNat (a % ↑n)) / ↑n * p) =\n    addOrderOf ↑(↑(Int.toNat (a % ↑n)) / ↑n * p)\n⊢ Nat.gcd (Int.toNat (a % ↑n)) n = 1\n[PROOFSTEP]\nrw [he, Nat.mul_left_eq_self_iff] at this \n[GOAL]\ncase refine'_2.intro.refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : ↑(a / ↑n) * p + (a % ↑n) • p / ↑n = k\nh0 : ↑n ≠ 0\nhan : ↑(Int.toNat (a % ↑n)) = a % ↑n\nhe : ↑(↑(Int.toNat (a % ↑n)) / ↑n * p) = ↑k\nthis : Nat.gcd (Int.toNat (a % ↑n)) n = 1\n⊢ Nat.gcd (Int.toNat (a % ↑n)) n = 1\n[PROOFSTEP]\nexact this\n[GOAL]\ncase refine'_2.intro.refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nn : ℕ\nh : 0 < n\nk : 𝕜\nhk : addOrderOf ↑k = n\na : ℤ\nha : ↑(a / ↑n) * p + (a % ↑n) • p / ↑n = k\nh0 : ↑n ≠ 0\nhan : ↑(Int.toNat (a % ↑n)) = a % ↑n\nhe : ↑(↑(Int.toNat (a % ↑n)) / ↑n * p) = ↑k\nthis : Nat.gcd (Int.toNat (a % ↑n)) n * addOrderOf ↑k = addOrderOf ↑k\n⊢ 0 < addOrderOf ↑k\n[PROOFSTEP]\nrwa [hk]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\n⊢ Bijective fun m => { val := ↑(↑↑m / ↑n * p), property := (_ : addOrderOf ↑(↑↑m / ↑n * p) = n) }\n[PROOFSTEP]\nrefine' ⟨fun m₁ m₂ h => Subtype.ext _, fun u => _⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh :\n  (fun m => { val := ↑(↑↑m / ↑n * p), property := (_ : addOrderOf ↑(↑↑m / ↑n * p) = n) }) m₁ =\n    (fun m => { val := ↑(↑↑m / ↑n * p), property := (_ : addOrderOf ↑(↑↑m / ↑n * p) = n) }) m₂\n⊢ ↑m₁ = ↑m₂\n[PROOFSTEP]\nsimp_rw [Subtype.ext_iff] at h \n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh : ↑(↑↑m₁ / ↑n * p) = ↑(↑↑m₂ / ↑n * p)\n⊢ ↑m₁ = ↑m₂\n[PROOFSTEP]\nrw [← sub_eq_zero, ← coe_sub, ← sub_mul, ← sub_div, ← Int.cast_ofNat m₁, ← Int.cast_ofNat m₂, ← Int.cast_sub,\n  coe_eq_zero_iff] at h \n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh✝ : ↑(↑↑m₁ / ↑n * p) = ↑(↑↑m₂ / ↑n * p)\nh : ∃ n_1, n_1 • p = ↑(↑↑m₁ - ↑↑m₂) / ↑n * p\n⊢ ↑m₁ = ↑m₂\n[PROOFSTEP]\nobtain ⟨m, hm⟩ := h\n[GOAL]\ncase refine'_1.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh : ↑(↑↑m₁ / ↑n * p) = ↑(↑↑m₂ / ↑n * p)\nm : ℤ\nhm : m • p = ↑(↑↑m₁ - ↑↑m₂) / ↑n * p\n⊢ ↑m₁ = ↑m₂\n[PROOFSTEP]\nrw [← mul_div_right_comm, eq_div_iff, mul_comm, ← zsmul_eq_mul, mul_smul_comm, ← nsmul_eq_mul, ← coe_nat_zsmul,\n  smul_smul, (zsmul_strictMono_left hp.out).injective.eq_iff, mul_comm] at hm \n[GOAL]\ncase refine'_1.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh : ↑(↑↑m₁ / ↑n * p) = ↑(↑↑m₂ / ↑n * p)\nm : ℤ\nhm : ↑n * m = ↑↑m₁ - ↑↑m₂\n⊢ ↑m₁ = ↑m₂\ncase refine'_1.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh : ↑(↑↑m₁ / ↑n * p) = ↑(↑↑m₂ / ↑n * p)\nm : ℤ\nhm : m • p = ↑(↑↑m₁ - ↑↑m₂) * p / ↑n\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine'_1.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh : ↑(↑↑m₁ / ↑n * p) = ↑(↑↑m₂ / ↑n * p)\nm : ℤ\nhm : m • p = ↑(↑↑m₁ - ↑↑m₂) * p / ↑n\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nexact Nat.cast_ne_zero.2 hn.ne'\n[GOAL]\ncase refine'_1.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh : ↑(↑↑m₁ / ↑n * p) = ↑(↑↑m₂ / ↑n * p)\nm : ℤ\nhm : ↑n * m = ↑↑m₁ - ↑↑m₂\n⊢ ↑m₁ = ↑m₂\n[PROOFSTEP]\nrw [← @Nat.cast_inj ℤ, ← sub_eq_zero]\n[GOAL]\ncase refine'_1.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh : ↑(↑↑m₁ / ↑n * p) = ↑(↑↑m₂ / ↑n * p)\nm : ℤ\nhm : ↑n * m = ↑↑m₁ - ↑↑m₂\n⊢ ↑↑m₁ - ↑↑m₂ = 0\n[PROOFSTEP]\nrefine' Int.eq_zero_of_abs_lt_dvd ⟨_, hm.symm⟩ (abs_sub_lt_iff.2 ⟨_, _⟩)\n[GOAL]\ncase refine'_1.intro.refine'_1\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh : ↑(↑↑m₁ / ↑n * p) = ↑(↑↑m₂ / ↑n * p)\nm : ℤ\nhm : ↑n * m = ↑↑m₁ - ↑↑m₂\n⊢ ↑↑m₁ - ↑↑m₂ < ↑n\n[PROOFSTEP]\napply (Int.sub_le_self _ <| Nat.cast_nonneg _).trans_lt (Nat.cast_lt.2 _)\n[GOAL]\ncase refine'_1.intro.refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh : ↑(↑↑m₁ / ↑n * p) = ↑(↑↑m₂ / ↑n * p)\nm : ℤ\nhm : ↑n * m = ↑↑m₁ - ↑↑m₂\n⊢ ↑↑m₂ - ↑↑m₁ < ↑n\n[PROOFSTEP]\napply (Int.sub_le_self _ <| Nat.cast_nonneg _).trans_lt (Nat.cast_lt.2 _)\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh : ↑(↑↑m₁ / ↑n * p) = ↑(↑↑m₂ / ↑n * p)\nm : ℤ\nhm : ↑n * m = ↑↑m₁ - ↑↑m₂\n⊢ ↑m₁ < n\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nm₁ m₂ : ↑{m | m < n ∧ Nat.gcd m n = 1}\nh : ↑(↑↑m₁ / ↑n * p) = ↑(↑↑m₂ / ↑n * p)\nm : ℤ\nhm : ↑n * m = ↑↑m₁ - ↑↑m₂\n⊢ ↑m₂ < n\n[PROOFSTEP]\nexacts [m₁.2.1, m₂.2.1]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nu : ↑{u | addOrderOf u = n}\n⊢ ∃ a, (fun m => { val := ↑(↑↑m / ↑n * p), property := (_ : addOrderOf ↑(↑↑m / ↑n * p) = n) }) a = u\n[PROOFSTEP]\nobtain ⟨m, hmn, hg, he⟩ := (addOrderOf_eq_pos_iff hn).mp u.2\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\nu : ↑{u | addOrderOf u = n}\nm : ℕ\nhmn : m < n\nhg : Nat.gcd m n = 1\nhe : ↑(↑m / ↑n * p) = ↑u\n⊢ ∃ a, (fun m => { val := ↑(↑↑m / ↑n * p), property := (_ : addOrderOf ↑(↑↑m / ↑n * p) = n) }) a = u\n[PROOFSTEP]\nexact ⟨⟨m, hmn, hg⟩, Subtype.ext he⟩\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\n⊢ Nat.card { u // addOrderOf u = n } = Nat.totient n\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hn)\n[GOAL]\ncase inl\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\n⊢ Nat.card { u // addOrderOf u = 0 } = Nat.totient 0\n[PROOFSTEP]\nsimp only [Nat.totient_zero, addOrderOf_eq_zero_iff]\n[GOAL]\ncase inl\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\n⊢ Nat.card { u // ¬IsOfFinAddOrder u } = 0\n[PROOFSTEP]\nrcases em (∃ u : AddCircle p, ¬IsOfFinAddOrder u) with (⟨u, hu⟩ | h)\n[GOAL]\ncase inl.inl.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nhu : ¬IsOfFinAddOrder u\n⊢ Nat.card { u // ¬IsOfFinAddOrder u } = 0\n[PROOFSTEP]\nhave : Infinite { u : AddCircle p // ¬IsOfFinAddOrder u } :=\n  by\n  erw [infinite_coe_iff]\n  exact infinite_not_isOfFinAddOrder hu\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nhu : ¬IsOfFinAddOrder u\n⊢ Infinite { u // ¬IsOfFinAddOrder u }\n[PROOFSTEP]\nerw [infinite_coe_iff]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nhu : ¬IsOfFinAddOrder u\n⊢ Set.Infinite fun u => IsOfFinAddOrder u → False\n[PROOFSTEP]\nexact infinite_not_isOfFinAddOrder hu\n[GOAL]\ncase inl.inl.intro\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nu : AddCircle p\nhu : ¬IsOfFinAddOrder u\nthis : Infinite { u // ¬IsOfFinAddOrder u }\n⊢ Nat.card { u // ¬IsOfFinAddOrder u } = 0\n[PROOFSTEP]\nexact Nat.card_eq_zero_of_infinite\n[GOAL]\ncase inl.inr\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nh : ¬∃ u, ¬IsOfFinAddOrder u\n⊢ Nat.card { u // ¬IsOfFinAddOrder u } = 0\n[PROOFSTEP]\nhave : IsEmpty { u : AddCircle p // ¬IsOfFinAddOrder u } := by simpa using h\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nh : ¬∃ u, ¬IsOfFinAddOrder u\n⊢ IsEmpty { u // ¬IsOfFinAddOrder u }\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase inl.inr\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nh : ¬∃ u, ¬IsOfFinAddOrder u\nthis : IsEmpty { u // ¬IsOfFinAddOrder u }\n⊢ Nat.card { u // ¬IsOfFinAddOrder u } = 0\n[PROOFSTEP]\nexact Nat.card_of_isEmpty\n[GOAL]\ncase inr\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : n > 0\n⊢ Nat.card { u // addOrderOf u = n } = Nat.totient n\n[PROOFSTEP]\nrw [← coe_setOf, Nat.card_congr (setAddOrderOfEquiv p hn), n.totient_eq_card_lt_and_coprime]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : n > 0\n⊢ Nat.card ↑{m | m < n ∧ Nat.gcd m n = 1} = Nat.card ↑{m | m < n ∧ Nat.coprime n m}\n[PROOFSTEP]\nsimp only [Nat.gcd_comm]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : TopologicalSpace 𝕜\ninst✝ : OrderTopology 𝕜\np q : 𝕜\nhp : Fact (0 < p)\nn : ℕ\nhn : 0 < n\n⊢ Nat.card ↑{u | addOrderOf u = n} ≠ 0\n[PROOFSTEP]\nsimpa only [coe_setOf, card_addOrderOf_eq_totient p] using (Nat.totient_pos hn).ne'\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\np : ℝ\ninst✝ : Fact (0 < p)\n⊢ CompactSpace (AddCircle p)\n[PROOFSTEP]\nrw [← isCompact_univ_iff, ← coe_image_Icc_eq p 0]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\np : ℝ\ninst✝ : Fact (0 < p)\n⊢ IsCompact (QuotientAddGroup.mk '' Icc 0 (0 + p))\n[PROOFSTEP]\nexact isCompact_Icc.image (AddCircle.continuous_mk' p)\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : Quot (EndpointIdent p a)\n⊢ ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → (fun x => ↑↑x) a_1 = (fun x => ↑↑x) b\n[PROOFSTEP]\nrintro _ _ ⟨_⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : Quot (EndpointIdent p a)\n⊢ (fun x => ↑↑x) { val := a, property := (_ : a ∈ Icc a (a + p)) } =\n    (fun x => ↑↑x) { val := a + p, property := (_ : a + p ∈ Icc a (a + p)) }\n[PROOFSTEP]\nexact (coe_add_period p a).symm\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\n⊢ ∀ (a_1 : ↑(Icc a (a + p))),\n    (fun x => Quot.mk (EndpointIdent p a) (Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p)) (↑(equivIco p a) x)))\n        ((fun x =>\n            Quot.liftOn x (fun x => ↑↑x)\n              (_ : ∀ (a_2 b : ↑(Icc a (a + p))), EndpointIdent p a a_2 b → (fun x => ↑↑x) a_2 = (fun x => ↑↑x) b))\n          (Quot.mk (EndpointIdent p a) a_1)) =\n      Quot.mk (EndpointIdent p a) a_1\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\nhx : x ∈ Icc a (a + p)\n⊢ (fun x => Quot.mk (EndpointIdent p a) (Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p)) (↑(equivIco p a) x)))\n      ((fun x =>\n          Quot.liftOn x (fun x => ↑↑x)\n            (_ : ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → (fun x => ↑↑x) a_1 = (fun x => ↑↑x) b))\n        (Quot.mk (EndpointIdent p a) { val := x, property := hx })) =\n    Quot.mk (EndpointIdent p a) { val := x, property := hx }\n[PROOFSTEP]\nrcases ne_or_eq x (a + p) with (h | rfl)\n[GOAL]\ncase mk.inl\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\nhx : x ∈ Icc a (a + p)\nh : x ≠ a + p\n⊢ (fun x => Quot.mk (EndpointIdent p a) (Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p)) (↑(equivIco p a) x)))\n      ((fun x =>\n          Quot.liftOn x (fun x => ↑↑x)\n            (_ : ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → (fun x => ↑↑x) a_1 = (fun x => ↑↑x) b))\n        (Quot.mk (EndpointIdent p a) { val := x, property := hx })) =\n    Quot.mk (EndpointIdent p a) { val := x, property := hx }\n[PROOFSTEP]\nrevert x\n[GOAL]\ncase mk.inl\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\n⊢ ∀ (x : 𝕜) (hx : x ∈ Icc a (a + p)),\n    x ≠ a + p →\n      (fun x => Quot.mk (EndpointIdent p a) (Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p)) (↑(equivIco p a) x)))\n          ((fun x =>\n              Quot.liftOn x (fun x => ↑↑x)\n                (_ : ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → (fun x => ↑↑x) a_1 = (fun x => ↑↑x) b))\n            (Quot.mk (EndpointIdent p a) { val := x, property := hx })) =\n        Quot.mk (EndpointIdent p a) { val := x, property := hx }\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk.inl\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\n⊢ ∀ (x : 𝕜) (hx : x ∈ Icc a (a + p)),\n    x ≠ a + p →\n      Quot.mk (EndpointIdent p a)\n          (Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p))\n            (↑(equivIco p a)\n              (Quot.liftOn (Quot.mk (EndpointIdent p a) { val := x, property := hx }) (fun x => ↑↑x)\n                (_ : ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → ↑↑a_1 = ↑↑b)))) =\n        Quot.mk (EndpointIdent p a) { val := x, property := hx }\n[PROOFSTEP]\nintro x hx h\n[GOAL]\ncase mk.inl\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\nhx : x ∈ Icc a (a + p)\nh : x ≠ a + p\n⊢ Quot.mk (EndpointIdent p a)\n      (Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p))\n        (↑(equivIco p a)\n          (Quot.liftOn (Quot.mk (EndpointIdent p a) { val := x, property := hx }) (fun x => ↑↑x)\n            (_ : ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → ↑↑a_1 = ↑↑b)))) =\n    Quot.mk (EndpointIdent p a) { val := x, property := hx }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.inl.e_a\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\nhx : x ∈ Icc a (a + p)\nh : x ≠ a + p\n⊢ Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p))\n      (↑(equivIco p a)\n        (Quot.liftOn (Quot.mk (EndpointIdent p a) { val := x, property := hx }) (fun x => ↑↑x)\n          (_ : ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → ↑↑a_1 = ↑↑b))) =\n    { val := x, property := hx }\n[PROOFSTEP]\next1\n[GOAL]\ncase mk.inl.e_a.a\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\nhx : x ∈ Icc a (a + p)\nh : x ≠ a + p\n⊢ ↑(Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p))\n        (↑(equivIco p a)\n          (Quot.liftOn (Quot.mk (EndpointIdent p a) { val := x, property := hx }) (fun x => ↑↑x)\n            (_ : ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → ↑↑a_1 = ↑↑b)))) =\n    ↑{ val := x, property := hx }\n[PROOFSTEP]\napply congr_arg Subtype.val ((equivIco p a).right_inv ⟨x, hx.1, hx.2.lt_of_ne h⟩)\n[GOAL]\ncase mk.inr\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nhx : a + p ∈ Icc a (a + p)\n⊢ (fun x => Quot.mk (EndpointIdent p a) (Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p)) (↑(equivIco p a) x)))\n      ((fun x =>\n          Quot.liftOn x (fun x => ↑↑x)\n            (_ : ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → (fun x => ↑↑x) a_1 = (fun x => ↑↑x) b))\n        (Quot.mk (EndpointIdent p a) { val := a + p, property := hx })) =\n    Quot.mk (EndpointIdent p a) { val := a + p, property := hx }\n[PROOFSTEP]\nrw [← Quot.sound EndpointIdent.mk]\n[GOAL]\ncase mk.inr\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nhx : a + p ∈ Icc a (a + p)\n⊢ (fun x => Quot.mk (EndpointIdent p a) (Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p)) (↑(equivIco p a) x)))\n      ((fun x =>\n          Quot.liftOn x (fun x => ↑↑x)\n            (_ : ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → (fun x => ↑↑x) a_1 = (fun x => ↑↑x) b))\n        (Quot.mk (EndpointIdent p a) { val := a, property := (_ : a ∈ Icc a (a + p)) })) =\n    Quot.mk (EndpointIdent p a) { val := a, property := (_ : a ∈ Icc a (a + p)) }\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk.inr\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nhx : a + p ∈ Icc a (a + p)\n⊢ Quot.mk (EndpointIdent p a)\n      (Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p))\n        (↑(equivIco p a)\n          (Quot.liftOn (Quot.mk (EndpointIdent p a) { val := a, property := (_ : a ∈ Icc a (a + p)) }) (fun x => ↑↑x)\n            (_ : ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → ↑↑a_1 = ↑↑b)))) =\n    Quot.mk (EndpointIdent p a) { val := a, property := (_ : a ∈ Icc a (a + p)) }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.inr.e_a\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nhx : a + p ∈ Icc a (a + p)\n⊢ Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p))\n      (↑(equivIco p a)\n        (Quot.liftOn (Quot.mk (EndpointIdent p a) { val := a, property := (_ : a ∈ Icc a (a + p)) }) (fun x => ↑↑x)\n          (_ : ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → ↑↑a_1 = ↑↑b))) =\n    { val := a, property := (_ : a ∈ Icc a (a + p)) }\n[PROOFSTEP]\next1\n[GOAL]\ncase mk.inr.e_a.a\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nhx : a + p ∈ Icc a (a + p)\n⊢ ↑(Set.inclusion (_ : Ico a (a + p) ⊆ Icc a (a + p))\n        (↑(equivIco p a)\n          (Quot.liftOn (Quot.mk (EndpointIdent p a) { val := a, property := (_ : a ∈ Icc a (a + p)) }) (fun x => ↑↑x)\n            (_ : ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → ↑↑a_1 = ↑↑b)))) =\n    ↑{ val := a, property := (_ : a ∈ Icc a (a + p)) }\n[PROOFSTEP]\napply congr_arg Subtype.val ((equivIco p a).right_inv ⟨a, le_refl a, lt_add_of_pos_right a hp.out⟩)\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\n⊢ ↑(equivIccQuot p a) ∘ Quotient.mk'' = fun x =>\n    Quot.mk (EndpointIdent p a)\n      { val := toIocMod (_ : 0 < p) a x, property := (_ : toIocMod (_ : 0 < p) a x ∈ Icc a (a + p)) }\n[PROOFSTEP]\nrw [equivIccQuot_comp_mk_eq_toIcoMod]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\n⊢ (fun x =>\n      Quot.mk (EndpointIdent p a)\n        { val := toIcoMod (_ : 0 < p) a x, property := (_ : toIcoMod (_ : 0 < p) a x ∈ Icc a (a + p)) }) =\n    fun x =>\n    Quot.mk (EndpointIdent p a)\n      { val := toIocMod (_ : 0 < p) a x, property := (_ : toIocMod (_ : 0 < p) a x ∈ Icc a (a + p)) }\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ Quot.mk (EndpointIdent p a)\n      { val := toIcoMod (_ : 0 < p) a x, property := (_ : toIcoMod (_ : 0 < p) a x ∈ Icc a (a + p)) } =\n    Quot.mk (EndpointIdent p a)\n      { val := toIocMod (_ : 0 < p) a x, property := (_ : toIocMod (_ : 0 < p) a x ∈ Icc a (a + p)) }\n[PROOFSTEP]\nby_cases a ≡ x [PMOD p]\n[GOAL]\ncase h\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ Quot.mk (EndpointIdent p a)\n      { val := toIcoMod (_ : 0 < p) a x, property := (_ : toIcoMod (_ : 0 < p) a x ∈ Icc a (a + p)) } =\n    Quot.mk (EndpointIdent p a)\n      { val := toIocMod (_ : 0 < p) a x, property := (_ : toIocMod (_ : 0 < p) a x ∈ Icc a (a + p)) }\n[PROOFSTEP]\nby_cases a ≡ x [PMOD p]\n[GOAL]\ncase pos\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\nh : a ≡ x [PMOD p]\n⊢ Quot.mk (EndpointIdent p a)\n      { val := toIcoMod (_ : 0 < p) a x, property := (_ : toIcoMod (_ : 0 < p) a x ∈ Icc a (a + p)) } =\n    Quot.mk (EndpointIdent p a)\n      { val := toIocMod (_ : 0 < p) a x, property := (_ : toIocMod (_ : 0 < p) a x ∈ Icc a (a + p)) }\n[PROOFSTEP]\nsimp_rw [(modEq_iff_toIcoMod_eq_left hp.out).1 h, (modEq_iff_toIocMod_eq_right hp.out).1 h]\n[GOAL]\ncase pos\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\nh : a ≡ x [PMOD p]\n⊢ Quot.mk (EndpointIdent p a) { val := a, property := (_ : (fun x => x ∈ Icc a (a + p)) a) } =\n    Quot.mk (EndpointIdent p a) { val := a + p, property := (_ : (fun x => x ∈ Icc a (a + p)) (a + p)) }\n[PROOFSTEP]\nexact Quot.sound EndpointIdent.mk\n[GOAL]\ncase neg\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\nh : ¬a ≡ x [PMOD p]\n⊢ Quot.mk (EndpointIdent p a)\n      { val := toIcoMod (_ : 0 < p) a x, property := (_ : toIcoMod (_ : 0 < p) a x ∈ Icc a (a + p)) } =\n    Quot.mk (EndpointIdent p a)\n      { val := toIocMod (_ : 0 < p) a x, property := (_ : toIocMod (_ : 0 < p) a x ∈ Icc a (a + p)) }\n[PROOFSTEP]\nsimp_rw [(not_modEq_iff_toIcoMod_eq_toIocMod hp.out).1 h]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\n⊢ Continuous (equivIccQuot p a).toFun\n[PROOFSTEP]\nrw [quotientMap_quotient_mk'.continuous_iff]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\n⊢ Continuous ((equivIccQuot p a).toFun ∘ Quotient.mk')\n[PROOFSTEP]\nsimp_rw [continuous_iff_continuousAt, continuousAt_iff_continuous_left_right]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\n⊢ ∀ (x : 𝕜),\n    ContinuousWithinAt ((equivIccQuot p a).toFun ∘ Quotient.mk') (Iic x) x ∧\n      ContinuousWithinAt ((equivIccQuot p a).toFun ∘ Quotient.mk') (Ici x) x\n[PROOFSTEP]\nintro x\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt ((equivIccQuot p a).toFun ∘ Quotient.mk') (Iic x) x ∧\n    ContinuousWithinAt ((equivIccQuot p a).toFun ∘ Quotient.mk') (Ici x) x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt ((equivIccQuot p a).toFun ∘ Quotient.mk') (Iic x) x\ncase right\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt ((equivIccQuot p a).toFun ∘ Quotient.mk') (Ici x) x\n[PROOFSTEP]\non_goal 1 => erw [equivIccQuot_comp_mk_eq_toIocMod]\n[GOAL]\ncase left\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt ((equivIccQuot p a).toFun ∘ Quotient.mk') (Iic x) x\ncase right\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt ((equivIccQuot p a).toFun ∘ Quotient.mk') (Ici x) x\n[PROOFSTEP]\non_goal 1 => erw [equivIccQuot_comp_mk_eq_toIocMod]\n[GOAL]\ncase left\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt ((equivIccQuot p a).toFun ∘ Quotient.mk') (Iic x) x\n[PROOFSTEP]\nerw [equivIccQuot_comp_mk_eq_toIocMod]\n[GOAL]\ncase left\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt\n    (fun x =>\n      Quot.mk (EndpointIdent p a)\n        { val := toIocMod (_ : 0 < p) a x, property := (_ : toIocMod (_ : 0 < p) a x ∈ Icc a (a + p)) })\n    (Iic x) x\ncase right\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt ((equivIccQuot p a).toFun ∘ Quotient.mk') (Ici x) x\n[PROOFSTEP]\non_goal 2 => erw [equivIccQuot_comp_mk_eq_toIcoMod]\n[GOAL]\ncase left\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt\n    (fun x =>\n      Quot.mk (EndpointIdent p a)\n        { val := toIocMod (_ : 0 < p) a x, property := (_ : toIocMod (_ : 0 < p) a x ∈ Icc a (a + p)) })\n    (Iic x) x\ncase right\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt ((equivIccQuot p a).toFun ∘ Quotient.mk') (Ici x) x\n[PROOFSTEP]\non_goal 2 => erw [equivIccQuot_comp_mk_eq_toIcoMod]\n[GOAL]\ncase right\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt ((equivIccQuot p a).toFun ∘ Quotient.mk') (Ici x) x\n[PROOFSTEP]\nerw [equivIccQuot_comp_mk_eq_toIcoMod]\n[GOAL]\ncase left\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt\n    (fun x =>\n      Quot.mk (EndpointIdent p a)\n        { val := toIocMod (_ : 0 < p) a x, property := (_ : toIocMod (_ : 0 < p) a x ∈ Icc a (a + p)) })\n    (Iic x) x\ncase right\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt\n    (fun x =>\n      Quot.mk (EndpointIdent p a)\n        { val := toIcoMod (_ : 0 < p) a x, property := (_ : toIcoMod (_ : 0 < p) a x ∈ Icc a (a + p)) })\n    (Ici x) x\n[PROOFSTEP]\nall_goals\n  apply continuous_quot_mk.continuousAt.comp_continuousWithinAt\n  rw [inducing_subtype_val.continuousWithinAt_iff]\n[GOAL]\ncase left\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt\n    (fun x =>\n      Quot.mk (EndpointIdent p a)\n        { val := toIocMod (_ : 0 < p) a x, property := (_ : toIocMod (_ : 0 < p) a x ∈ Icc a (a + p)) })\n    (Iic x) x\n[PROOFSTEP]\napply continuous_quot_mk.continuousAt.comp_continuousWithinAt\n[GOAL]\ncase left\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt\n    (fun x => { val := toIocMod (_ : 0 < p) a x, property := (_ : toIocMod (_ : 0 < p) a x ∈ Icc a (a + p)) }) (Iic x) x\n[PROOFSTEP]\nrw [inducing_subtype_val.continuousWithinAt_iff]\n[GOAL]\ncase right\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt\n    (fun x =>\n      Quot.mk (EndpointIdent p a)\n        { val := toIcoMod (_ : 0 < p) a x, property := (_ : toIcoMod (_ : 0 < p) a x ∈ Icc a (a + p)) })\n    (Ici x) x\n[PROOFSTEP]\napply continuous_quot_mk.continuousAt.comp_continuousWithinAt\n[GOAL]\ncase right\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt\n    (fun x => { val := toIcoMod (_ : 0 < p) a x, property := (_ : toIcoMod (_ : 0 < p) a x ∈ Icc a (a + p)) }) (Ici x) x\n[PROOFSTEP]\nrw [inducing_subtype_val.continuousWithinAt_iff]\n[GOAL]\ncase left\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt\n    (Subtype.val ∘ fun x =>\n      { val := toIocMod (_ : 0 < p) a x, property := (_ : toIocMod (_ : 0 < p) a x ∈ Icc a (a + p)) })\n    (Iic x) x\n[PROOFSTEP]\napply continuous_left_toIocMod\n[GOAL]\ncase right\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nx : 𝕜\n⊢ ContinuousWithinAt\n    (Subtype.val ∘ fun x =>\n      { val := toIcoMod (_ : 0 < p) a x, property := (_ : toIcoMod (_ : 0 < p) a x ∈ Icc a (a + p)) })\n    (Ici x) x\n[PROOFSTEP]\napply continuous_right_toIcoMod\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nh : f a = f (a + p)\n⊢ ∀ (a_1 b : ↑(Icc a (a + p))), EndpointIdent p a a_1 b → restrict (Icc a (a + p)) f a_1 = restrict (Icc a (a + p)) f b\n[PROOFSTEP]\nrintro _ _ ⟨_⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nh : f a = f (a + p)\n⊢ restrict (Icc a (a + p)) f { val := a, property := (_ : a ∈ Icc a (a + p)) } =\n    restrict (Icc a (a + p)) f { val := a + p, property := (_ : a + p ∈ Icc a (a + p)) }\n[PROOFSTEP]\nexact h\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝⁴ : LinearOrderedAddCommGroup 𝕜\ninst✝³ : TopologicalSpace 𝕜\ninst✝² : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝¹ : Archimedean 𝕜\ninst✝ : TopologicalSpace B\nf : 𝕜 → B\nhf : f a = f (a + p)\nhc : ContinuousOn f (Icc a (a + p))\n⊢ Continuous (liftIco p a f)\n[PROOFSTEP]\nrw [liftIco_eq_lift_Icc hf]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝⁴ : LinearOrderedAddCommGroup 𝕜\ninst✝³ : TopologicalSpace 𝕜\ninst✝² : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝¹ : Archimedean 𝕜\ninst✝ : TopologicalSpace B\nf : 𝕜 → B\nhf : f a = f (a + p)\nhc : ContinuousOn f (Icc a (a + p))\n⊢ Continuous\n    (Quot.lift (restrict (Icc a (a + p)) f)\n        (_ :\n          ∀ (a_1 b : ↑(Icc a (a + p))),\n            EndpointIdent p a a_1 b → restrict (Icc a (a + p)) f a_1 = restrict (Icc a (a + p)) f b) ∘\n      ↑(equivIccQuot p a))\n[PROOFSTEP]\nrefine' Continuous.comp _ (homeoIccQuot p a).continuous_toFun\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝⁴ : LinearOrderedAddCommGroup 𝕜\ninst✝³ : TopologicalSpace 𝕜\ninst✝² : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝¹ : Archimedean 𝕜\ninst✝ : TopologicalSpace B\nf : 𝕜 → B\nhf : f a = f (a + p)\nhc : ContinuousOn f (Icc a (a + p))\n⊢ Continuous\n    (Quot.lift (restrict (Icc a (a + p)) f)\n      (_ :\n        ∀ (a_1 b : ↑(Icc a (a + p))),\n          EndpointIdent p a a_1 b → restrict (Icc a (a + p)) f a_1 = restrict (Icc a (a + p)) f b))\n[PROOFSTEP]\nexact continuous_coinduced_dom.mpr (continuousOn_iff_continuous_restrict.mp hc)\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝³ : LinearOrderedAddCommGroup 𝕜\ninst✝² : TopologicalSpace 𝕜\ninst✝¹ : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝ : Archimedean 𝕜\nf : 𝕜 → B\nx : 𝕜\nhx : x ∈ Ico 0 p\n⊢ x ∈ Ico 0 (0 + p)\n[PROOFSTEP]\nrwa [zero_add]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝⁴ : LinearOrderedAddCommGroup 𝕜\ninst✝³ : TopologicalSpace 𝕜\ninst✝² : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝¹ : Archimedean 𝕜\ninst✝ : TopologicalSpace B\nf : 𝕜 → B\nhf : f 0 = f p\nhc : ContinuousOn f (Icc 0 p)\n⊢ f 0 = f (0 + p)\n[PROOFSTEP]\nrwa [zero_add]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\ninst✝⁴ : LinearOrderedAddCommGroup 𝕜\ninst✝³ : TopologicalSpace 𝕜\ninst✝² : OrderTopology 𝕜\np a : 𝕜\nhp : Fact (0 < p)\ninst✝¹ : Archimedean 𝕜\ninst✝ : TopologicalSpace B\nf : 𝕜 → B\nhf : f 0 = f p\nhc : ContinuousOn f (Icc 0 p)\n⊢ ContinuousOn f (Icc 0 (0 + p))\n[PROOFSTEP]\nrwa [zero_add]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Instances.AddCircle", "llama_tokens": 38456, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7520125737597972, "lm_q2_score": 0.5156199157230157, "lm_q1q2_score": 0.3877526599046748}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : CompactSpace α\ninst✝¹ : MetricSpace β\ninst✝ : NormedAddCommGroup E\nf : C(α, β)\n⊢ (mkOfCompact f).toContinuousMap = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : CompactSpace α\ninst✝¹ : MetricSpace β\ninst✝ : NormedAddCommGroup E\nf : C(α, β)\na✝ : α\n⊢ ↑(mkOfCompact f).toContinuousMap a✝ = ↑f a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : CompactSpace α\ninst✝¹ : MetricSpace β\ninst✝ : NormedAddCommGroup E\nf : α →ᵇ β\n⊢ mkOfCompact f.toContinuousMap = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : CompactSpace α\ninst✝¹ : MetricSpace β\ninst✝ : NormedAddCommGroup E\nf : α →ᵇ β\nx✝ : α\n⊢ ↑(mkOfCompact f.toContinuousMap) x✝ = ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : CompactSpace α\ninst✝¹ : MetricSpace β\ninst✝ : NormedAddCommGroup E\n⊢ ∀ (s : Set (C(α, β) × C(α, β))),\n    s ∈ uniformity C(α, β) ↔\n      ∃ t,\n        t ∈ uniformity (α →ᵇ β) ∧\n          ∀ (x y : C(α, β)), (↑(equivBoundedOfCompact α β) x, ↑(equivBoundedOfCompact α β) y) ∈ t → (x, y) ∈ s\n[PROOFSTEP]\nsimp only [hasBasis_compactConvergenceUniformity.mem_iff, uniformity_basis_dist_le.mem_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : CompactSpace α\ninst✝¹ : MetricSpace β\ninst✝ : NormedAddCommGroup E\n⊢ ∀ (s : Set (C(α, β) × C(α, β))),\n    (∃ i,\n        (IsCompact i.fst ∧ ∃ i_1, 0 < i_1 ∧ {p | dist p.fst p.snd ≤ i_1} ⊆ i.snd) ∧\n          {fg | ∀ (x : α), x ∈ i.fst → (↑fg.fst x, ↑fg.snd x) ∈ i.snd} ⊆ s) ↔\n      ∃ t,\n        (∃ i, 0 < i ∧ {p | dist p.fst p.snd ≤ i} ⊆ t) ∧\n          ∀ (x y : C(α, β)), (↑(equivBoundedOfCompact α β) x, ↑(equivBoundedOfCompact α β) y) ∈ t → (x, y) ∈ s\n[PROOFSTEP]\nexact fun s =>\n  ⟨fun ⟨⟨a, b⟩, ⟨_, ⟨ε, hε, hb⟩⟩, hs⟩ =>\n    ⟨{p | ∀ x, (p.1 x, p.2 x) ∈ b}, ⟨ε, hε, fun _ h x => hb ((dist_le hε.le).mp h x)⟩, fun f g h => hs fun x _ => h x⟩,\n    fun ⟨_, ⟨ε, hε, ht⟩, hs⟩ =>\n    ⟨⟨Set.univ, {p | dist p.1 p.2 ≤ ε}⟩, ⟨isCompact_univ, ⟨ε, hε, fun _ h => h⟩⟩, fun ⟨f, g⟩ h =>\n      hs _ _ (ht ((dist_le hε.le).mpr fun x => h x (mem_univ x)))⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : CompactSpace α\ninst✝¹ : MetricSpace β\ninst✝ : NormedAddCommGroup E\nf g : C(α, β)\nC : ℝ\nx : α\n⊢ dist (↑f x) (↑g x) ≤ dist f g\n[PROOFSTEP]\nsimp only [← dist_mkOfCompact, dist_coe_le_dist, ← mkOfCompact_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : CompactSpace α\ninst✝¹ : MetricSpace β\ninst✝ : NormedAddCommGroup E\nf g : C(α, β)\nC : ℝ\nC0 : 0 ≤ C\n⊢ dist f g ≤ C ↔ ∀ (x : α), dist (↑f x) (↑g x) ≤ C\n[PROOFSTEP]\nsimp only [← dist_mkOfCompact, BoundedContinuousFunction.dist_le C0, mkOfCompact_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : CompactSpace α\ninst✝² : MetricSpace β\ninst✝¹ : NormedAddCommGroup E\nf g : C(α, β)\nC : ℝ\ninst✝ : Nonempty α\n⊢ dist f g ≤ C ↔ ∀ (x : α), dist (↑f x) (↑g x) ≤ C\n[PROOFSTEP]\nsimp only [← dist_mkOfCompact, BoundedContinuousFunction.dist_le_iff_of_nonempty, mkOfCompact_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝⁴ : TopologicalSpace α\ninst✝³ : CompactSpace α\ninst✝² : MetricSpace β\ninst✝¹ : NormedAddCommGroup E\nf g : C(α, β)\nC : ℝ\ninst✝ : Nonempty α\n⊢ dist f g < C ↔ ∀ (x : α), dist (↑f x) (↑g x) < C\n[PROOFSTEP]\nsimp only [← dist_mkOfCompact, dist_lt_iff_of_nonempty_compact, mkOfCompact_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : CompactSpace α\ninst✝¹ : MetricSpace β\ninst✝ : NormedAddCommGroup E\nf g : C(α, β)\nC : ℝ\nC0 : 0 < C\n⊢ dist f g < C ↔ ∀ (x : α), dist (↑f x) (↑g x) < C\n[PROOFSTEP]\nrw [← dist_mkOfCompact, dist_lt_iff_of_compact C0]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : CompactSpace α\ninst✝¹ : MetricSpace β\ninst✝ : NormedAddCommGroup E\nf g : C(α, β)\nC : ℝ\nC0 : 0 < C\n⊢ (∀ (x : α), dist (↑(mkOfCompact f) x) (↑(mkOfCompact g) x) < C) ↔ ∀ (x : α), dist (↑f x) (↑g x) < C\n[PROOFSTEP]\nsimp only [mkOfCompact_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝³ : TopologicalSpace α\ninst✝² : CompactSpace α\ninst✝¹ : MetricSpace β\ninst✝ : NormedAddCommGroup E\nsrc✝¹ : MetricSpace C(α, E) := metricSpace α E\nsrc✝ : AddCommGroup C(α, E) := instAddCommGroupContinuousMap\nx y : C(α, E)\n⊢ dist x y = ‖x - y‖\n[PROOFSTEP]\nrw [← norm_mkOfCompact, ← dist_mkOfCompact, dist_eq_norm, mkOfCompact_sub]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝⁶ : TopologicalSpace α\ninst✝⁵ : CompactSpace α\ninst✝⁴ : MetricSpace β\ninst✝³ : NormedAddCommGroup E\ninst✝² : Nonempty α\ninst✝¹ : One E\ninst✝ : NormOneClass E\n⊢ ‖1‖ = 1\n[PROOFSTEP]\nsimp only [← norm_mkOfCompact, mkOfCompact_one, norm_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : CompactSpace α\ninst✝³ : MetricSpace β\ninst✝² : NormedAddCommGroup E\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\nsrc✝ : C(α, E) ≃+ (α →ᵇ E) := addEquivBoundedOfCompact α E\nc : 𝕜\nf : C(α, E)\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ :\n            ∀ (x y : C(α, E)),\n              Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n      (c • f) =\n    ↑(RingHom.id 𝕜) c •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : C(α, E)),\n                Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n        f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : CompactSpace α\ninst✝³ : MetricSpace β\ninst✝² : NormedAddCommGroup E\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\nsrc✝ : C(α, E) ≃+ (α →ᵇ E) := addEquivBoundedOfCompact α E\nc : 𝕜\nf : C(α, E)\nx✝ : α\n⊢ ↑(AddHom.toFun\n          { toFun := src✝.toFun,\n            map_add' :=\n              (_ :\n                ∀ (x y : C(α, E)),\n                  Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n          (c • f))\n      x✝ =\n    ↑(↑(RingHom.id 𝕜) c •\n          AddHom.toFun\n            { toFun := src✝.toFun,\n              map_add' :=\n                (_ :\n                  ∀ (x y : C(α, E)),\n                    Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n            f)\n      x✝\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nX : Type u_1\n𝕜 : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : CompactSpace X\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedSpace 𝕜 β\ninst✝¹ : NormedAddCommGroup γ\ninst✝ : NormedSpace 𝕜 γ\ng : β →L[𝕜] γ\n⊢ ↑(ContinuousLinearMap.compLeftContinuousCompact X g) = ContinuousLinearMap.compLeftContinuous 𝕜 X g\n[PROOFSTEP]\next f\n[GOAL]\ncase h.h\nX : Type u_1\n𝕜 : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : CompactSpace X\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedSpace 𝕜 β\ninst✝¹ : NormedAddCommGroup γ\ninst✝ : NormedSpace 𝕜 γ\ng : β →L[𝕜] γ\nf : C(X, β)\na✝ : X\n⊢ ↑(↑↑(ContinuousLinearMap.compLeftContinuousCompact X g) f) a✝ =\n    ↑(↑(ContinuousLinearMap.compLeftContinuous 𝕜 X g) f) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nY : Type u_2\nT : Type u_3\ninst✝⁴ : TopologicalSpace X\ninst✝³ : CompactSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : CompactSpace Y\ninst✝ : MetricSpace T\nf : C(X, Y)\n⊢ Continuous fun g => comp g f\n[PROOFSTEP]\nrefine' Metric.continuous_iff.mpr _\n[GOAL]\nX : Type u_1\nY : Type u_2\nT : Type u_3\ninst✝⁴ : TopologicalSpace X\ninst✝³ : CompactSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : CompactSpace Y\ninst✝ : MetricSpace T\nf : C(X, Y)\n⊢ ∀ (b : C(Y, T)) (ε : ℝ), ε > 0 → ∃ δ, δ > 0 ∧ ∀ (a : C(Y, T)), dist a b < δ → dist (comp a f) (comp b f) < ε\n[PROOFSTEP]\nintro g ε ε_pos\n[GOAL]\nX : Type u_1\nY : Type u_2\nT : Type u_3\ninst✝⁴ : TopologicalSpace X\ninst✝³ : CompactSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : CompactSpace Y\ninst✝ : MetricSpace T\nf : C(X, Y)\ng : C(Y, T)\nε : ℝ\nε_pos : ε > 0\n⊢ ∃ δ, δ > 0 ∧ ∀ (a : C(Y, T)), dist a g < δ → dist (comp a f) (comp g f) < ε\n[PROOFSTEP]\nrefine' ⟨ε, ε_pos, fun g' h => _⟩\n[GOAL]\nX : Type u_1\nY : Type u_2\nT : Type u_3\ninst✝⁴ : TopologicalSpace X\ninst✝³ : CompactSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : CompactSpace Y\ninst✝ : MetricSpace T\nf : C(X, Y)\ng : C(Y, T)\nε : ℝ\nε_pos : ε > 0\ng' : C(Y, T)\nh : dist g' g < ε\n⊢ dist (comp g' f) (comp g f) < ε\n[PROOFSTEP]\nrw [ContinuousMap.dist_lt_iff ε_pos] at h ⊢\n[GOAL]\nX : Type u_1\nY : Type u_2\nT : Type u_3\ninst✝⁴ : TopologicalSpace X\ninst✝³ : CompactSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : CompactSpace Y\ninst✝ : MetricSpace T\nf : C(X, Y)\ng : C(Y, T)\nε : ℝ\nε_pos : ε > 0\ng' : C(Y, T)\nh : ∀ (x : Y), dist (↑g' x) (↑g x) < ε\n⊢ ∀ (x : X), dist (↑(comp g' f) x) (↑(comp g f) x) < ε\n[PROOFSTEP]\nexact fun x => h (f x)\n[GOAL]\nX : Type u_1\ninst✝⁴ : TopologicalSpace X\ninst✝³ : T2Space X\ninst✝² : LocallyCompactSpace X\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : CompleteSpace E\nι : Type u_3\nF : ι → C(X, E)\nhF : ∀ (K : Compacts X), Summable fun i => ‖restrict (↑K) (F i)‖\n⊢ Summable F\n[PROOFSTEP]\nrefine' (ContinuousMap.exists_tendsto_compactOpen_iff_forall _).2 fun K hK => _\n[GOAL]\nX : Type u_1\ninst✝⁴ : TopologicalSpace X\ninst✝³ : T2Space X\ninst✝² : LocallyCompactSpace X\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : CompleteSpace E\nι : Type u_3\nF : ι → C(X, E)\nhF : ∀ (K : Compacts X), Summable fun i => ‖restrict (↑K) (F i)‖\nK : Set X\nhK : IsCompact K\n⊢ ∃ f, Tendsto (fun i => restrict K (∑ b in i, F b)) atTop (𝓝 f)\n[PROOFSTEP]\nlift K to Compacts X using hK\n[GOAL]\ncase intro\nX : Type u_1\ninst✝⁴ : TopologicalSpace X\ninst✝³ : T2Space X\ninst✝² : LocallyCompactSpace X\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : CompleteSpace E\nι : Type u_3\nF : ι → C(X, E)\nhF : ∀ (K : Compacts X), Summable fun i => ‖restrict (↑K) (F i)‖\nK : Compacts X\n⊢ ∃ f, Tendsto (fun i => restrict (↑K) (∑ b in i, F b)) atTop (𝓝 f)\n[PROOFSTEP]\nhave A : ∀ s : Finset ι, restrict (↑K) (∑ i in s, F i) = ∑ i in s, restrict K (F i) :=\n  by\n  intro s\n  ext1 x\n  simp\n[GOAL]\nX : Type u_1\ninst✝⁴ : TopologicalSpace X\ninst✝³ : T2Space X\ninst✝² : LocallyCompactSpace X\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : CompleteSpace E\nι : Type u_3\nF : ι → C(X, E)\nhF : ∀ (K : Compacts X), Summable fun i => ‖restrict (↑K) (F i)‖\nK : Compacts X\n⊢ ∀ (s : Finset ι), restrict (↑K) (∑ i in s, F i) = ∑ i in s, restrict (↑K) (F i)\n[PROOFSTEP]\nintro s\n[GOAL]\nX : Type u_1\ninst✝⁴ : TopologicalSpace X\ninst✝³ : T2Space X\ninst✝² : LocallyCompactSpace X\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : CompleteSpace E\nι : Type u_3\nF : ι → C(X, E)\nhF : ∀ (K : Compacts X), Summable fun i => ‖restrict (↑K) (F i)‖\nK : Compacts X\ns : Finset ι\n⊢ restrict (↑K) (∑ i in s, F i) = ∑ i in s, restrict (↑K) (F i)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nX : Type u_1\ninst✝⁴ : TopologicalSpace X\ninst✝³ : T2Space X\ninst✝² : LocallyCompactSpace X\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : CompleteSpace E\nι : Type u_3\nF : ι → C(X, E)\nhF : ∀ (K : Compacts X), Summable fun i => ‖restrict (↑K) (F i)‖\nK : Compacts X\ns : Finset ι\nx : ↑↑K\n⊢ ↑(restrict (↑K) (∑ i in s, F i)) x = ↑(∑ i in s, restrict (↑K) (F i)) x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro\nX : Type u_1\ninst✝⁴ : TopologicalSpace X\ninst✝³ : T2Space X\ninst✝² : LocallyCompactSpace X\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : CompleteSpace E\nι : Type u_3\nF : ι → C(X, E)\nhF : ∀ (K : Compacts X), Summable fun i => ‖restrict (↑K) (F i)‖\nK : Compacts X\nA : ∀ (s : Finset ι), restrict (↑K) (∑ i in s, F i) = ∑ i in s, restrict (↑K) (F i)\n⊢ ∃ f, Tendsto (fun i => restrict (↑K) (∑ b in i, F b)) atTop (𝓝 f)\n[PROOFSTEP]\nsimpa only [HasSum, A] using summable_of_summable_norm (hF K)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : NormedAddCommGroup β\ninst✝² : StarAddMonoid β\ninst✝¹ : NormedStarGroup β\ninst✝ : CompactSpace α\nf : C(α, β)\n⊢ ‖star f‖ = ‖f‖\n[PROOFSTEP]\nrw [← BoundedContinuousFunction.norm_mkOfCompact, BoundedContinuousFunction.mkOfCompact_star, norm_star,\n  BoundedContinuousFunction.norm_mkOfCompact]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : NormedRing β\ninst✝² : StarRing β\ninst✝¹ : CompactSpace α\ninst✝ : CstarRing β\nf : C(α, β)\n⊢ ‖star f * f‖ = ‖f‖ * ‖f‖\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : NormedRing β\ninst✝² : StarRing β\ninst✝¹ : CompactSpace α\ninst✝ : CstarRing β\nf : C(α, β)\n⊢ ‖star f * f‖ ≤ ‖f‖ * ‖f‖\n[PROOFSTEP]\nrw [← sq, ContinuousMap.norm_le _ (sq_nonneg _)]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : NormedRing β\ninst✝² : StarRing β\ninst✝¹ : CompactSpace α\ninst✝ : CstarRing β\nf : C(α, β)\n⊢ ∀ (x : α), ‖↑(star f * f) x‖ ≤ ‖f‖ ^ 2\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : NormedRing β\ninst✝² : StarRing β\ninst✝¹ : CompactSpace α\ninst✝ : CstarRing β\nf : C(α, β)\nx : α\n⊢ ‖↑(star f * f) x‖ ≤ ‖f‖ ^ 2\n[PROOFSTEP]\nsimp only [ContinuousMap.coe_mul, coe_star, Pi.mul_apply, Pi.star_apply, CstarRing.norm_star_mul_self, ← sq]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : NormedRing β\ninst✝² : StarRing β\ninst✝¹ : CompactSpace α\ninst✝ : CstarRing β\nf : C(α, β)\nx : α\n⊢ ‖↑f x‖ ^ 2 ≤ ‖f‖ ^ 2\n[PROOFSTEP]\nrefine' sq_le_sq' _ _\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : NormedRing β\ninst✝² : StarRing β\ninst✝¹ : CompactSpace α\ninst✝ : CstarRing β\nf : C(α, β)\nx : α\n⊢ -‖f‖ ≤ ‖↑f x‖\n[PROOFSTEP]\nlinarith [norm_nonneg (f x), norm_nonneg f]\n[GOAL]\ncase refine'_1.refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : NormedRing β\ninst✝² : StarRing β\ninst✝¹ : CompactSpace α\ninst✝ : CstarRing β\nf : C(α, β)\nx : α\n⊢ ‖↑f x‖ ≤ ‖f‖\n[PROOFSTEP]\nexact ContinuousMap.norm_coe_le_norm f x\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : NormedRing β\ninst✝² : StarRing β\ninst✝¹ : CompactSpace α\ninst✝ : CstarRing β\nf : C(α, β)\n⊢ ‖f‖ * ‖f‖ ≤ ‖star f * f‖\n[PROOFSTEP]\nrw [← sq, ← Real.le_sqrt (norm_nonneg _) (norm_nonneg _), ContinuousMap.norm_le _ (Real.sqrt_nonneg _)]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : NormedRing β\ninst✝² : StarRing β\ninst✝¹ : CompactSpace α\ninst✝ : CstarRing β\nf : C(α, β)\n⊢ ∀ (x : α), ‖↑f x‖ ≤ Real.sqrt ‖star f * f‖\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : NormedRing β\ninst✝² : StarRing β\ninst✝¹ : CompactSpace α\ninst✝ : CstarRing β\nf : C(α, β)\nx : α\n⊢ ‖↑f x‖ ≤ Real.sqrt ‖star f * f‖\n[PROOFSTEP]\nrw [Real.le_sqrt (norm_nonneg _) (norm_nonneg _), sq, ← CstarRing.norm_star_mul_self]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : NormedRing β\ninst✝² : StarRing β\ninst✝¹ : CompactSpace α\ninst✝ : CstarRing β\nf : C(α, β)\nx : α\n⊢ ‖star (↑f x) * ↑f x‖ ≤ ‖star f * f‖\n[PROOFSTEP]\nexact ContinuousMap.norm_coe_le_norm (star f * f) x\n", "meta": {"mathlib_filename": "Mathlib.Topology.ContinuousFunction.Compact", "llama_tokens": 7800, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6584175139669997, "lm_q2_score": 0.588889130767832, "lm_q1q2_score": 0.3877349174823433}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : LinearOrder α\ninst✝ : OrderTopology α\n⊢ SupConvergenceClass α\n[PROOFSTEP]\nrefine' ⟨fun a s ha => tendsto_order.2 ⟨fun b hb => _, fun b hb => _⟩⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : LinearOrder α\ninst✝ : OrderTopology α\na : α\ns : Set α\nha : IsLUB s a\nb : α\nhb : b < a\n⊢ ∀ᶠ (b_1 : ↑s) in atTop, b < CoeTC.coe b_1\n[PROOFSTEP]\nrcases ha.exists_between hb with ⟨c, hcs, bc, bca⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : LinearOrder α\ninst✝ : OrderTopology α\na : α\ns : Set α\nha : IsLUB s a\nb : α\nhb : b < a\nc : α\nhcs : c ∈ s\nbc : b < c\nbca : c ≤ a\n⊢ ∀ᶠ (b_1 : ↑s) in atTop, b < CoeTC.coe b_1\n[PROOFSTEP]\nlift c to s using hcs\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : LinearOrder α\ninst✝ : OrderTopology α\na : α\ns : Set α\nha : IsLUB s a\nb : α\nhb : b < a\nc : { x // x ∈ s }\nbc : b < ↑c\nbca : ↑c ≤ a\n⊢ ∀ᶠ (b_1 : ↑s) in atTop, b < CoeTC.coe b_1\n[PROOFSTEP]\nrefine' (eventually_ge_atTop c).mono fun x hx => bc.trans_le hx\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : LinearOrder α\ninst✝ : OrderTopology α\na : α\ns : Set α\nha : IsLUB s a\nb : α\nhb : b > a\n⊢ ∀ᶠ (b_1 : ↑s) in atTop, CoeTC.coe b_1 < b\n[PROOFSTEP]\nexact eventually_of_forall fun x => (ha.1 x.2).trans_lt hb\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : Preorder α\ninst✝ : SupConvergenceClass α\nf : ι → α\na : α\nh_mono : Monotone f\nha : IsLUB (range f) a\n⊢ Tendsto f atTop (𝓝 a)\n[PROOFSTEP]\nsuffices : Tendsto (rangeFactorization f) atTop atTop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : Preorder α\ninst✝ : SupConvergenceClass α\nf : ι → α\na : α\nh_mono : Monotone f\nha : IsLUB (range f) a\nthis : Tendsto (rangeFactorization f) atTop atTop\n⊢ Tendsto f atTop (𝓝 a)\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : Preorder α\ninst✝ : SupConvergenceClass α\nf : ι → α\na : α\nh_mono : Monotone f\nha : IsLUB (range f) a\n⊢ Tendsto (rangeFactorization f) atTop atTop\n[PROOFSTEP]\nexact (SupConvergenceClass.tendsto_coe_atTop_isLUB _ _ ha).comp this\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : Preorder α\ninst✝ : SupConvergenceClass α\nf : ι → α\na : α\nh_mono : Monotone f\nha : IsLUB (range f) a\n⊢ Tendsto (rangeFactorization f) atTop atTop\n[PROOFSTEP]\nexact h_mono.rangeFactorization.tendsto_atTop_atTop fun b => b.2.imp fun a ha => ha.ge\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : Preorder α\ninst✝ : SupConvergenceClass α\nf : ι → α\na : α\nh_anti : Antitone f\nha : IsLUB (range f) a\n⊢ Tendsto f atBot (𝓝 a)\n[PROOFSTEP]\nconvert tendsto_atTop_isLUB h_anti.dual_left ha using 1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : Preorder α\ninst✝ : InfConvergenceClass α\nf : ι → α\na : α\nh_mono : Monotone f\nha : IsGLB (range f) a\n⊢ Tendsto f atBot (𝓝 a)\n[PROOFSTEP]\nconvert tendsto_atTop_isLUB h_mono.dual ha.dual using 1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : Preorder α\ninst✝ : InfConvergenceClass α\nf : ι → α\na : α\nh_anti : Antitone f\nha : IsGLB (range f) a\n⊢ Tendsto f atTop (𝓝 a)\n[PROOFSTEP]\nconvert tendsto_atBot_isLUB h_anti.dual ha.dual using 1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : ConditionallyCompleteLattice α\ninst✝ : SupConvergenceClass α\nf : ι → α\na : α\nh_mono : Monotone f\nhbdd : BddAbove (range f)\n⊢ Tendsto f atTop (𝓝 (⨆ (i : ι), f i))\n[PROOFSTEP]\ncases isEmpty_or_nonempty ι\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : ConditionallyCompleteLattice α\ninst✝ : SupConvergenceClass α\nf : ι → α\na : α\nh_mono : Monotone f\nhbdd : BddAbove (range f)\nh✝ : IsEmpty ι\n⊢ Tendsto f atTop (𝓝 (⨆ (i : ι), f i))\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : ConditionallyCompleteLattice α\ninst✝ : SupConvergenceClass α\nf : ι → α\na : α\nh_mono : Monotone f\nhbdd : BddAbove (range f)\nh✝ : Nonempty ι\n⊢ Tendsto f atTop (𝓝 (⨆ (i : ι), f i))\n[PROOFSTEP]\nexacts [tendsto_of_isEmpty, tendsto_atTop_isLUB h_mono (isLUB_ciSup hbdd)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : ConditionallyCompleteLattice α\ninst✝ : SupConvergenceClass α\nf : ι → α\na : α\nh_anti : Antitone f\nhbdd : BddAbove (range f)\n⊢ Tendsto f atBot (𝓝 (⨆ (i : ι), f i))\n[PROOFSTEP]\nconvert tendsto_atTop_ciSup h_anti.dual hbdd.dual using 1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : ConditionallyCompleteLattice α\ninst✝ : InfConvergenceClass α\nf : ι → α\na : α\nh_mono : Monotone f\nhbdd : BddBelow (range f)\n⊢ Tendsto f atBot (𝓝 (⨅ (i : ι), f i))\n[PROOFSTEP]\nconvert tendsto_atTop_ciSup h_mono.dual hbdd.dual using 1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝³ : Preorder ι\ninst✝² : TopologicalSpace α\ninst✝¹ : ConditionallyCompleteLattice α\ninst✝ : InfConvergenceClass α\nf : ι → α\na : α\nh_anti : Antitone f\nhbdd : BddBelow (range f)\n⊢ Tendsto f atTop (𝓝 (⨅ (i : ι), f i))\n[PROOFSTEP]\nconvert tendsto_atBot_ciSup h_anti.dual hbdd.dual using 1\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : SupConvergenceClass α\ninst✝ : SupConvergenceClass β\n⊢ SupConvergenceClass (α × β)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase tendsto_coe_atTop_isLUB\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : SupConvergenceClass α\ninst✝ : SupConvergenceClass β\n⊢ ∀ (a : α × β) (s : Set (α × β)), IsLUB s a → Tendsto CoeTC.coe atTop (𝓝 a)\n[PROOFSTEP]\nrintro ⟨a, b⟩ s h\n[GOAL]\ncase tendsto_coe_atTop_isLUB.mk\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : SupConvergenceClass α\ninst✝ : SupConvergenceClass β\na : α\nb : β\ns : Set (α × β)\nh : IsLUB s (a, b)\n⊢ Tendsto CoeTC.coe atTop (𝓝 (a, b))\n[PROOFSTEP]\nrw [isLUB_prod, ← range_restrict, ← range_restrict] at h \n[GOAL]\ncase tendsto_coe_atTop_isLUB.mk\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : SupConvergenceClass α\ninst✝ : SupConvergenceClass β\na : α\nb : β\ns : Set (α × β)\nh : IsLUB (range (restrict s fst)) (a, b).fst ∧ IsLUB (range (restrict s snd)) (a, b).snd\n⊢ Tendsto CoeTC.coe atTop (𝓝 (a, b))\n[PROOFSTEP]\nhave A : Tendsto (fun x : s => (x : α × β).1) atTop (𝓝 a) := tendsto_atTop_isLUB (monotone_fst.restrict s) h.1\n[GOAL]\ncase tendsto_coe_atTop_isLUB.mk\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : SupConvergenceClass α\ninst✝ : SupConvergenceClass β\na : α\nb : β\ns : Set (α × β)\nh : IsLUB (range (restrict s fst)) (a, b).fst ∧ IsLUB (range (restrict s snd)) (a, b).snd\nA : Tendsto (fun x => (↑x).fst) atTop (𝓝 a)\n⊢ Tendsto CoeTC.coe atTop (𝓝 (a, b))\n[PROOFSTEP]\nhave B : Tendsto (fun x : s => (x : α × β).2) atTop (𝓝 b) := tendsto_atTop_isLUB (monotone_snd.restrict s) h.2\n[GOAL]\ncase tendsto_coe_atTop_isLUB.mk\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : SupConvergenceClass α\ninst✝ : SupConvergenceClass β\na : α\nb : β\ns : Set (α × β)\nh : IsLUB (range (restrict s fst)) (a, b).fst ∧ IsLUB (range (restrict s snd)) (a, b).snd\nA : Tendsto (fun x => (↑x).fst) atTop (𝓝 a)\nB : Tendsto (fun x => (↑x).snd) atTop (𝓝 b)\n⊢ Tendsto CoeTC.coe atTop (𝓝 (a, b))\n[PROOFSTEP]\nconvert A.prod_mk_nhds B\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : ι → Type u_4\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : (i : ι) → TopologicalSpace (α i)\ninst✝ : ∀ (i : ι), SupConvergenceClass (α i)\n⊢ SupConvergenceClass ((i : ι) → α i)\n[PROOFSTEP]\nrefine' ⟨fun f s h => _⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : ι → Type u_4\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : (i : ι) → TopologicalSpace (α i)\ninst✝ : ∀ (i : ι), SupConvergenceClass (α i)\nf : (i : ι) → α i\ns : Set ((i : ι) → α i)\nh : IsLUB s f\n⊢ Tendsto CoeTC.coe atTop (𝓝 f)\n[PROOFSTEP]\nsimp only [isLUB_pi, ← range_restrict] at h \n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : ι → Type u_4\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : (i : ι) → TopologicalSpace (α i)\ninst✝ : ∀ (i : ι), SupConvergenceClass (α i)\nf : (i : ι) → α i\ns : Set ((i : ι) → α i)\nh : ∀ (a : ι), IsLUB (range (restrict s (eval a))) (f a)\n⊢ Tendsto CoeTC.coe atTop (𝓝 f)\n[PROOFSTEP]\nexact tendsto_pi_nhds.2 fun i => tendsto_atTop_isLUB ((monotone_eval _).restrict _) (h i)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι₁ : Type u_3\nι₂ : Type u_4\nα : Type u_5\ninst✝⁶ : SemilatticeSup ι₁\ninst✝⁵ : Preorder ι₂\ninst✝⁴ : Nonempty ι₁\ninst✝³ : TopologicalSpace α\ninst✝² : ConditionallyCompleteLinearOrder α\ninst✝¹ : OrderTopology α\ninst✝ : NoMaxOrder α\nf : ι₂ → α\nφ : ι₁ → ι₂\nl : α\nhf : Monotone f\nhg : Tendsto φ atTop atTop\n⊢ Tendsto f atTop (𝓝 l) ↔ Tendsto (f ∘ φ) atTop (𝓝 l)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα✝ : Type u_1\nβ : Type u_2\nι₁ : Type u_3\nι₂ : Type u_4\nα : Type u_5\ninst✝⁶ : SemilatticeSup ι₁\ninst✝⁵ : Preorder ι₂\ninst✝⁴ : Nonempty ι₁\ninst✝³ : TopologicalSpace α\ninst✝² : ConditionallyCompleteLinearOrder α\ninst✝¹ : OrderTopology α\ninst✝ : NoMaxOrder α\nf : ι₂ → α\nφ : ι₁ → ι₂\nl : α\nhf : Monotone f\nhg : Tendsto φ atTop atTop\n⊢ Tendsto f atTop (𝓝 l) → Tendsto (f ∘ φ) atTop (𝓝 l)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα✝ : Type u_1\nβ : Type u_2\nι₁ : Type u_3\nι₂ : Type u_4\nα : Type u_5\ninst✝⁶ : SemilatticeSup ι₁\ninst✝⁵ : Preorder ι₂\ninst✝⁴ : Nonempty ι₁\ninst✝³ : TopologicalSpace α\ninst✝² : ConditionallyCompleteLinearOrder α\ninst✝¹ : OrderTopology α\ninst✝ : NoMaxOrder α\nf : ι₂ → α\nφ : ι₁ → ι₂\nl : α\nhf : Monotone f\nhg : Tendsto φ atTop atTop\n⊢ Tendsto (f ∘ φ) atTop (𝓝 l) → Tendsto f atTop (𝓝 l)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα✝ : Type u_1\nβ : Type u_2\nι₁ : Type u_3\nι₂ : Type u_4\nα : Type u_5\ninst✝⁶ : SemilatticeSup ι₁\ninst✝⁵ : Preorder ι₂\ninst✝⁴ : Nonempty ι₁\ninst✝³ : TopologicalSpace α\ninst✝² : ConditionallyCompleteLinearOrder α\ninst✝¹ : OrderTopology α\ninst✝ : NoMaxOrder α\nf : ι₂ → α\nφ : ι₁ → ι₂\nl : α\nhf : Monotone f\nhg : Tendsto φ atTop atTop\nh : Tendsto f atTop (𝓝 l)\n⊢ Tendsto (f ∘ φ) atTop (𝓝 l)\n[PROOFSTEP]\nexact h.comp hg\n[GOAL]\ncase mpr\nα✝ : Type u_1\nβ : Type u_2\nι₁ : Type u_3\nι₂ : Type u_4\nα : Type u_5\ninst✝⁶ : SemilatticeSup ι₁\ninst✝⁵ : Preorder ι₂\ninst✝⁴ : Nonempty ι₁\ninst✝³ : TopologicalSpace α\ninst✝² : ConditionallyCompleteLinearOrder α\ninst✝¹ : OrderTopology α\ninst✝ : NoMaxOrder α\nf : ι₂ → α\nφ : ι₁ → ι₂\nl : α\nhf : Monotone f\nhg : Tendsto φ atTop atTop\nh : Tendsto (f ∘ φ) atTop (𝓝 l)\n⊢ Tendsto f atTop (𝓝 l)\n[PROOFSTEP]\nrcases tendsto_of_monotone hf with (h' | ⟨l', hl'⟩)\n[GOAL]\ncase mpr.inl\nα✝ : Type u_1\nβ : Type u_2\nι₁ : Type u_3\nι₂ : Type u_4\nα : Type u_5\ninst✝⁶ : SemilatticeSup ι₁\ninst✝⁵ : Preorder ι₂\ninst✝⁴ : Nonempty ι₁\ninst✝³ : TopologicalSpace α\ninst✝² : ConditionallyCompleteLinearOrder α\ninst✝¹ : OrderTopology α\ninst✝ : NoMaxOrder α\nf : ι₂ → α\nφ : ι₁ → ι₂\nl : α\nhf : Monotone f\nhg : Tendsto φ atTop atTop\nh : Tendsto (f ∘ φ) atTop (𝓝 l)\nh' : Tendsto f atTop atTop\n⊢ Tendsto f atTop (𝓝 l)\n[PROOFSTEP]\nexact (not_tendsto_atTop_of_tendsto_nhds h (h'.comp hg)).elim\n[GOAL]\ncase mpr.inr.intro\nα✝ : Type u_1\nβ : Type u_2\nι₁ : Type u_3\nι₂ : Type u_4\nα : Type u_5\ninst✝⁶ : SemilatticeSup ι₁\ninst✝⁵ : Preorder ι₂\ninst✝⁴ : Nonempty ι₁\ninst✝³ : TopologicalSpace α\ninst✝² : ConditionallyCompleteLinearOrder α\ninst✝¹ : OrderTopology α\ninst✝ : NoMaxOrder α\nf : ι₂ → α\nφ : ι₁ → ι₂\nl : α\nhf : Monotone f\nhg : Tendsto φ atTop atTop\nh : Tendsto (f ∘ φ) atTop (𝓝 l)\nl' : α\nhl' : Tendsto f atTop (𝓝 l')\n⊢ Tendsto f atTop (𝓝 l)\n[PROOFSTEP]\nrwa [tendsto_nhds_unique h (hl'.comp hg)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : Preorder α\ninst✝² : OrderClosedTopology α\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nf : β → α\na : α\nhf : Monotone f\nha : Tendsto f atTop (𝓝 a)\n⊢ IsLUB (range f) a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : Preorder α\ninst✝² : OrderClosedTopology α\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nf : β → α\na : α\nhf : Monotone f\nha : Tendsto f atTop (𝓝 a)\n⊢ a ∈ upperBounds (range f)\n[PROOFSTEP]\nrintro _ ⟨b, rfl⟩\n[GOAL]\ncase left.intro\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : Preorder α\ninst✝² : OrderClosedTopology α\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nf : β → α\na : α\nhf : Monotone f\nha : Tendsto f atTop (𝓝 a)\nb : β\n⊢ f b ≤ a\n[PROOFSTEP]\nexact hf.ge_of_tendsto ha b\n[GOAL]\ncase right\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : Preorder α\ninst✝² : OrderClosedTopology α\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nf : β → α\na : α\nhf : Monotone f\nha : Tendsto f atTop (𝓝 a)\n⊢ a ∈ lowerBounds (upperBounds (range f))\n[PROOFSTEP]\nexact fun _ hb => le_of_tendsto' ha fun x => hb (Set.mem_range_self x)\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Order.MonotoneConvergence", "llama_tokens": 6714, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.658417487156366, "lm_q2_score": 0.588889130767832, "lm_q1q2_score": 0.3877349016938526}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\n⊢ gauge s x = sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}\n[PROOFSTEP]\nrw [gauge]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\n⊢ sInf {r | 0 < r ∧ x ∈ r • s} = sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\n⊢ {r | 0 < r ∧ x ∈ r • s} = {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nx✝ : ℝ\n⊢ x✝ ∈ {r | 0 < r ∧ x ∈ r • s} ↔ x✝ ∈ {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}\n[PROOFSTEP]\nsimp only [mem_setOf, mem_Ioi]\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nx✝ : ℝ\n⊢ 0 < x✝ ∧ x ∈ x✝ • s ↔ 0 < x✝ ∧ x✝⁻¹ • x ∈ s\n[PROOFSTEP]\nexact and_congr_right fun hr => mem_smul_set_iff_inv_smul_mem₀ hr.ne' _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nabsorbs : Absorbent ℝ s\nh : gauge s x < a\n⊢ ∃ b, 0 < b ∧ b < a ∧ x ∈ b • s\n[PROOFSTEP]\nobtain ⟨b, ⟨hb, hx⟩, hba⟩ := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nabsorbs : Absorbent ℝ s\nh : gauge s x < a\nb : ℝ\nhba : b < a\nhb : 0 < b\nhx : x ∈ b • s\n⊢ ∃ b, 0 < b ∧ b < a ∧ x ∈ b • s\n[PROOFSTEP]\nexact ⟨b, hb, hba, hx⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\n⊢ gauge s 0 = 0\n[PROOFSTEP]\nrw [gauge_def']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\n⊢ sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • 0 ∈ s} = 0\n[PROOFSTEP]\nby_cases h : (0 : E) ∈ s\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nh : 0 ∈ s\n⊢ sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • 0 ∈ s} = 0\n[PROOFSTEP]\nsimp only [smul_zero, sep_true, h, csInf_Ioi]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nh : ¬0 ∈ s\n⊢ sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • 0 ∈ s} = 0\n[PROOFSTEP]\nsimp only [smul_zero, sep_false, h, Real.sInf_empty]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\n⊢ gauge 0 = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\n⊢ gauge 0 x = OfNat.ofNat 0 x\n[PROOFSTEP]\nrw [gauge_def']\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\n⊢ sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ 0} = OfNat.ofNat 0 x\n[PROOFSTEP]\nobtain rfl | hx := eq_or_ne x 0\n[GOAL]\ncase h.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\n⊢ sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • 0 ∈ 0} = OfNat.ofNat 0 0\n[PROOFSTEP]\nsimp only [csInf_Ioi, mem_zero, Pi.zero_apply, eq_self_iff_true, sep_true, smul_zero]\n[GOAL]\ncase h.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nhx : x ≠ 0\n⊢ sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ 0} = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp only [mem_zero, Pi.zero_apply, inv_eq_zero, smul_eq_zero]\n[GOAL]\ncase h.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nhx : x ≠ 0\n⊢ sInf {r | r ∈ Ioi 0 ∧ (r = 0 ∨ x = 0)} = 0\n[PROOFSTEP]\nconvert Real.sInf_empty\n[GOAL]\ncase h.e'_2.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nhx : x ≠ 0\n⊢ {r | r ∈ Ioi 0 ∧ (r = 0 ∨ x = 0)} = ∅\n[PROOFSTEP]\nexact eq_empty_iff_forall_not_mem.2 fun r hr => hr.2.elim (ne_of_gt hr.1) hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\n⊢ gauge ∅ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx✝ : E\n⊢ gauge ∅ x✝ = OfNat.ofNat 0 x✝\n[PROOFSTEP]\nsimp only [gauge_def', Real.sInf_empty, mem_empty_iff_false, Pi.zero_apply, sep_false]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nh : s ⊆ 0\n⊢ gauge s = 0\n[PROOFSTEP]\nobtain rfl | rfl := subset_singleton_iff_eq.1 h\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nt : Set E\na : ℝ\nh : ∅ ⊆ 0\n⊢ gauge ∅ = 0\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nt : Set E\na : ℝ\nh : {0} ⊆ 0\n⊢ gauge {0} = 0\n[PROOFSTEP]\nexacts [gauge_empty, gauge_zero']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\nx : E\n⊢ gauge s (-x) = gauge s x\n[PROOFSTEP]\nhave : ∀ x, -x ∈ s ↔ x ∈ s := fun x => ⟨fun h => by simpa using symmetric _ h, symmetric x⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\nx✝ x : E\nh : -x ∈ s\n⊢ x ∈ s\n[PROOFSTEP]\nsimpa using symmetric _ h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\nx : E\nthis : ∀ (x : E), -x ∈ s ↔ x ∈ s\n⊢ gauge s (-x) = gauge s x\n[PROOFSTEP]\nsimp_rw [gauge_def', smul_neg, this]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\n⊢ gauge (-s) (-x) = gauge s x\n[PROOFSTEP]\nsimp_rw [gauge_def', smul_neg, neg_mem_neg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\n⊢ gauge (-s) x = gauge s (-x)\n[PROOFSTEP]\nrw [← gauge_neg_set_neg, neg_neg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nha : 0 ≤ a\nhx : x ∈ a • s\n⊢ gauge s x ≤ a\n[PROOFSTEP]\nobtain rfl | ha' := ha.eq_or_lt\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\nx : E\nha : 0 ≤ 0\nhx : x ∈ 0 • s\n⊢ gauge s x ≤ 0\n[PROOFSTEP]\nrw [mem_singleton_iff.1 (zero_smul_set_subset _ hx), gauge_zero]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nha : 0 ≤ a\nhx : x ∈ a • s\nha' : 0 < a\n⊢ gauge s x ≤ a\n[PROOFSTEP]\nexact csInf_le gauge_set_bddBelow ⟨ha', hx⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\n⊢ {x | gauge s x ≤ a} = ⋂ (r : ℝ) (_ : a < r), r • s\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\n⊢ x ∈ {x | gauge s x ≤ a} ↔ x ∈ ⋂ (r : ℝ) (_ : a < r), r • s\n[PROOFSTEP]\nsimp_rw [Set.mem_iInter, Set.mem_setOf_eq]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\n⊢ gauge s x ≤ a ↔ ∀ (i : ℝ), a < i → x ∈ i • s\n[PROOFSTEP]\nrefine' ⟨fun h r hr => _, fun h => le_of_forall_pos_lt_add fun ε hε => _⟩\n[GOAL]\ncase h.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\nh : gauge s x ≤ a\nr : ℝ\nhr : a < r\n⊢ x ∈ r • s\n[PROOFSTEP]\nhave hr' := ha.trans_lt hr\n[GOAL]\ncase h.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\nh : gauge s x ≤ a\nr : ℝ\nhr : a < r\nhr' : 0 < r\n⊢ x ∈ r • s\n[PROOFSTEP]\nrw [mem_smul_set_iff_inv_smul_mem₀ hr'.ne']\n[GOAL]\ncase h.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\nh : gauge s x ≤ a\nr : ℝ\nhr : a < r\nhr' : 0 < r\n⊢ r⁻¹ • x ∈ s\n[PROOFSTEP]\nobtain ⟨δ, δ_pos, hδr, hδ⟩ := exists_lt_of_gauge_lt hs₂ (h.trans_lt hr)\n[GOAL]\ncase h.refine'_1.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\nh : gauge s x ≤ a\nr : ℝ\nhr : a < r\nhr' : 0 < r\nδ : ℝ\nδ_pos : 0 < δ\nhδr : δ < r\nhδ : x ∈ δ • s\n⊢ r⁻¹ • x ∈ s\n[PROOFSTEP]\nsuffices (r⁻¹ * δ) • δ⁻¹ • x ∈ s by rwa [smul_smul, mul_inv_cancel_right₀ δ_pos.ne'] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\nh : gauge s x ≤ a\nr : ℝ\nhr : a < r\nhr' : 0 < r\nδ : ℝ\nδ_pos : 0 < δ\nhδr : δ < r\nhδ : x ∈ δ • s\nthis : (r⁻¹ * δ) • δ⁻¹ • x ∈ s\n⊢ r⁻¹ • x ∈ s\n[PROOFSTEP]\nrwa [smul_smul, mul_inv_cancel_right₀ δ_pos.ne'] at this \n[GOAL]\ncase h.refine'_1.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\nh : gauge s x ≤ a\nr : ℝ\nhr : a < r\nhr' : 0 < r\nδ : ℝ\nδ_pos : 0 < δ\nhδr : δ < r\nhδ : x ∈ δ • s\n⊢ (r⁻¹ * δ) • δ⁻¹ • x ∈ s\n[PROOFSTEP]\nrw [mem_smul_set_iff_inv_smul_mem₀ δ_pos.ne'] at hδ \n[GOAL]\ncase h.refine'_1.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\nh : gauge s x ≤ a\nr : ℝ\nhr : a < r\nhr' : 0 < r\nδ : ℝ\nδ_pos : 0 < δ\nhδr : δ < r\nhδ : δ⁻¹ • x ∈ s\n⊢ (r⁻¹ * δ) • δ⁻¹ • x ∈ s\n[PROOFSTEP]\nrefine' hs₁.smul_mem_of_zero_mem hs₀ hδ ⟨by positivity, _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\nh : gauge s x ≤ a\nr : ℝ\nhr : a < r\nhr' : 0 < r\nδ : ℝ\nδ_pos : 0 < δ\nhδr : δ < r\nhδ : δ⁻¹ • x ∈ s\n⊢ 0 ≤ r⁻¹ * δ\n[PROOFSTEP]\npositivity\n[GOAL]\ncase h.refine'_1.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\nh : gauge s x ≤ a\nr : ℝ\nhr : a < r\nhr' : 0 < r\nδ : ℝ\nδ_pos : 0 < δ\nhδr : δ < r\nhδ : δ⁻¹ • x ∈ s\n⊢ r⁻¹ * δ ≤ 1\n[PROOFSTEP]\nrw [inv_mul_le_iff hr', mul_one]\n[GOAL]\ncase h.refine'_1.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\nh : gauge s x ≤ a\nr : ℝ\nhr : a < r\nhr' : 0 < r\nδ : ℝ\nδ_pos : 0 < δ\nhδr : δ < r\nhδ : δ⁻¹ • x ∈ s\n⊢ δ ≤ r\n[PROOFSTEP]\nexact hδr.le\n[GOAL]\ncase h.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\nh : ∀ (i : ℝ), a < i → x ∈ i • s\nε : ℝ\nhε : 0 < ε\n⊢ gauge s x < a + ε\n[PROOFSTEP]\nhave hε' := (lt_add_iff_pos_right a).2 (half_pos hε)\n[GOAL]\ncase h.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : Absorbent ℝ s\nha : 0 ≤ a\nx : E\nh : ∀ (i : ℝ), a < i → x ∈ i • s\nε : ℝ\nhε : 0 < ε\nhε' : a < a + ε / 2\n⊢ gauge s x < a + ε\n[PROOFSTEP]\nexact (gauge_le_of_mem (ha.trans hε'.le) <| h _ hε').trans_lt (add_lt_add_left (half_lt_self hε) _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nabsorbs : Absorbent ℝ s\na : ℝ\n⊢ {x | gauge s x < a} = ⋃ (r : ℝ) (_ : 0 < r) (_ : r < a), r • s\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nabsorbs : Absorbent ℝ s\na : ℝ\nx✝ : E\n⊢ x✝ ∈ {x | gauge s x < a} ↔ x✝ ∈ ⋃ (r : ℝ) (_ : 0 < r) (_ : r < a), r • s\n[PROOFSTEP]\nsimp_rw [mem_setOf, mem_iUnion, exists_prop]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nabsorbs : Absorbent ℝ s\na : ℝ\nx✝ : E\n⊢ gauge s x✝ < a ↔ ∃ i, 0 < i ∧ i < a ∧ x✝ ∈ i • s\n[PROOFSTEP]\nexact ⟨exists_lt_of_gauge_lt absorbs, fun ⟨r, hr₀, hr₁, hx⟩ => (gauge_le_of_mem hr₀.le hx).trans_lt hr₁⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nabsorbs : Absorbent ℝ s\na : ℝ\n⊢ {x | gauge s x < a} = ⋃ (r : ℝ) (_ : r ∈ Ioo 0 a), r • s\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nabsorbs : Absorbent ℝ s\na : ℝ\nx✝ : E\n⊢ x✝ ∈ {x | gauge s x < a} ↔ x✝ ∈ ⋃ (r : ℝ) (_ : r ∈ Ioo 0 a), r • s\n[PROOFSTEP]\nsimp_rw [mem_setOf, mem_iUnion, exists_prop, mem_Ioo, and_assoc]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nabsorbs : Absorbent ℝ s\na : ℝ\nx✝ : E\n⊢ gauge s x✝ < a ↔ ∃ i, 0 < i ∧ i < a ∧ x✝ ∈ i • s\n[PROOFSTEP]\nexact ⟨exists_lt_of_gauge_lt absorbs, fun ⟨r, hr₀, hr₁, hx⟩ => (gauge_le_of_mem hr₀.le hx).trans_lt hr₁⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nabsorbs : Absorbent ℝ s\nhgauge : gauge s x < 1\n⊢ ∃ y, y ∈ s ∧ x ∈ openSegment ℝ 0 y\n[PROOFSTEP]\nrcases exists_lt_of_gauge_lt absorbs hgauge with ⟨r, hr₀, hr₁, y, hy, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nabsorbs : Absorbent ℝ s\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\ny : E\nhy : y ∈ s\nhgauge : gauge s ((fun x => r • x) y) < 1\n⊢ ∃ y_1, y_1 ∈ s ∧ (fun x => r • x) y ∈ openSegment ℝ 0 y_1\n[PROOFSTEP]\nrefine ⟨y, hy, 1 - r, r, ?_⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nabsorbs : Absorbent ℝ s\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\ny : E\nhy : y ∈ s\nhgauge : gauge s ((fun x => r • x) y) < 1\n⊢ ∃ x x x, (1 - r) • 0 + r • y = (fun x => r • x) y\n[PROOFSTEP]\nsimp [*]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nhx : x ∈ s\n⊢ x ∈ 1 • s\n[PROOFSTEP]\nrwa [one_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs : Convex ℝ s\nabsorbs : Absorbent ℝ s\nx y : E\n⊢ gauge s (x + y) ≤ gauge s x + gauge s y\n[PROOFSTEP]\nrefine' le_of_forall_pos_lt_add fun ε hε => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs : Convex ℝ s\nabsorbs : Absorbent ℝ s\nx y : E\nε : ℝ\nhε : 0 < ε\n⊢ gauge s (x + y) < gauge s x + gauge s y + ε\n[PROOFSTEP]\nobtain ⟨a, ha, ha', x, hx, rfl⟩ := exists_lt_of_gauge_lt absorbs (lt_add_of_pos_right (gauge s x) (half_pos hε))\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nhs : Convex ℝ s\nabsorbs : Absorbent ℝ s\ny : E\nε : ℝ\nhε : 0 < ε\na : ℝ\nha : 0 < a\nx : E\nhx : x ∈ s\nha' : a < gauge s ((fun x => a • x) x) + ε / 2\n⊢ gauge s ((fun x => a • x) x + y) < gauge s ((fun x => a • x) x) + gauge s y + ε\n[PROOFSTEP]\nobtain ⟨b, hb, hb', y, hy, rfl⟩ := exists_lt_of_gauge_lt absorbs (lt_add_of_pos_right (gauge s y) (half_pos hε))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nhs : Convex ℝ s\nabsorbs : Absorbent ℝ s\nε : ℝ\nhε : 0 < ε\na : ℝ\nha : 0 < a\nx : E\nhx : x ∈ s\nha' : a < gauge s ((fun x => a • x) x) + ε / 2\nb : ℝ\nhb : 0 < b\ny : E\nhy : y ∈ s\nhb' : b < gauge s ((fun x => b • x) y) + ε / 2\n⊢ gauge s ((fun x => a • x) x + (fun x => b • x) y) < gauge s ((fun x => a • x) x) + gauge s ((fun x => b • x) y) + ε\n[PROOFSTEP]\ncalc\n  gauge s (a • x + b • y) ≤ a + b :=\n    gauge_le_of_mem (by positivity) <| by\n      rw [hs.add_smul ha.le hb.le]\n      exact add_mem_add (smul_mem_smul_set hx) (smul_mem_smul_set hy)\n  _ < gauge s (a • x) + gauge s (b • y) + ε := by linarith\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nhs : Convex ℝ s\nabsorbs : Absorbent ℝ s\nε : ℝ\nhε : 0 < ε\na : ℝ\nha : 0 < a\nx : E\nhx : x ∈ s\nha' : a < gauge s ((fun x => a • x) x) + ε / 2\nb : ℝ\nhb : 0 < b\ny : E\nhy : y ∈ s\nhb' : b < gauge s ((fun x => b • x) y) + ε / 2\n⊢ 0 ≤ a + b\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nhs : Convex ℝ s\nabsorbs : Absorbent ℝ s\nε : ℝ\nhε : 0 < ε\na : ℝ\nha : 0 < a\nx : E\nhx : x ∈ s\nha' : a < gauge s ((fun x => a • x) x) + ε / 2\nb : ℝ\nhb : 0 < b\ny : E\nhy : y ∈ s\nhb' : b < gauge s ((fun x => b • x) y) + ε / 2\n⊢ a • x + b • y ∈ (a + b) • s\n[PROOFSTEP]\nrw [hs.add_smul ha.le hb.le]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nhs : Convex ℝ s\nabsorbs : Absorbent ℝ s\nε : ℝ\nhε : 0 < ε\na : ℝ\nha : 0 < a\nx : E\nhx : x ∈ s\nha' : a < gauge s ((fun x => a • x) x) + ε / 2\nb : ℝ\nhb : 0 < b\ny : E\nhy : y ∈ s\nhb' : b < gauge s ((fun x => b • x) y) + ε / 2\n⊢ a • x + b • y ∈ a • s + b • s\n[PROOFSTEP]\nexact add_mem_add (smul_mem_smul_set hx) (smul_mem_smul_set hy)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nhs : Convex ℝ s\nabsorbs : Absorbent ℝ s\nε : ℝ\nhε : 0 < ε\na : ℝ\nha : 0 < a\nx : E\nhx : x ∈ s\nha' : a < gauge s ((fun x => a • x) x) + ε / 2\nb : ℝ\nhb : 0 < b\ny : E\nhy : y ∈ s\nhb' : b < gauge s ((fun x => b • x) y) + ε / 2\n⊢ a + b < gauge s (a • x) + gauge s (b • y) + ε\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nhs : Convex ℝ s\nh₀ : 0 ∈ s\nabsorbs : Absorbent ℝ s\na : ℝ\n⊢ Convex ℝ {x | gauge s x ≤ a}\n[PROOFSTEP]\nby_cases ha : 0 ≤ a\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nhs : Convex ℝ s\nh₀ : 0 ∈ s\nabsorbs : Absorbent ℝ s\na : ℝ\nha : 0 ≤ a\n⊢ Convex ℝ {x | gauge s x ≤ a}\n[PROOFSTEP]\nrw [gauge_le_eq hs h₀ absorbs ha]\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nhs : Convex ℝ s\nh₀ : 0 ∈ s\nabsorbs : Absorbent ℝ s\na : ℝ\nha : 0 ≤ a\n⊢ Convex ℝ (⋂ (r : ℝ) (_ : a < r), r • s)\n[PROOFSTEP]\nexact convex_iInter fun i => convex_iInter fun _ => hs.smul _\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nhs : Convex ℝ s\nh₀ : 0 ∈ s\nabsorbs : Absorbent ℝ s\na : ℝ\nha : ¬0 ≤ a\n⊢ Convex ℝ {x | gauge s x ≤ a}\n[PROOFSTEP]\nconvert convex_empty (𝕜 := ℝ) (E := E)\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nhs : Convex ℝ s\nh₀ : 0 ∈ s\nabsorbs : Absorbent ℝ s\na : ℝ\nha : ¬0 ≤ a\n⊢ {x | gauge s x ≤ a} = ∅\n[PROOFSTEP]\nexact eq_empty_iff_forall_not_mem.2 fun x hx => ha <| (gauge_nonneg _).trans hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na✝ : ℝ\nhs : Balanced ℝ s\nx : E\nhx : x ∈ s\na : ℝ\nha₀ : 0 ≤ a\nha₁ : a ≤ 1\n⊢ ‖a‖ ≤ 1\n[PROOFSTEP]\nrwa [Real.norm_of_nonneg ha₀]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nhs₀ : StarConvex ℝ 0 s\nhs₂ : Absorbs ℝ s {x}\nhx : ¬x ∈ a • s\n⊢ a ≤ gauge s x\n[PROOFSTEP]\nrw [starConvex_zero_iff] at hs₀ \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nhs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s\nhs₂ : Absorbs ℝ s {x}\nhx : ¬x ∈ a • s\n⊢ a ≤ gauge s x\n[PROOFSTEP]\nobtain ⟨r, hr, h⟩ := hs₂\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nhs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s\nhx : ¬x ∈ a • s\nr : ℝ\nhr : 0 < r\nh : ∀ (a : ℝ), r ≤ ‖a‖ → {x} ⊆ a • s\n⊢ a ≤ gauge s x\n[PROOFSTEP]\nrefine' le_csInf ⟨r, hr, singleton_subset_iff.1 <| h _ (Real.norm_of_nonneg hr.le).ge⟩ _\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nhs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s\nhx : ¬x ∈ a • s\nr : ℝ\nhr : 0 < r\nh : ∀ (a : ℝ), r ≤ ‖a‖ → {x} ⊆ a • s\n⊢ ∀ (b : ℝ), b ∈ {r | 0 < r ∧ x ∈ r • s} → a ≤ b\n[PROOFSTEP]\nrintro b ⟨hb, x, hx', rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s\nr : ℝ\nhr : 0 < r\nb : ℝ\nhb : 0 < b\nx : E\nhx' : x ∈ s\nhx : ¬(fun x => b • x) x ∈ a • s\nh : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s\n⊢ a ≤ b\n[PROOFSTEP]\nrefine' not_lt.1 fun hba => hx _\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s\nr : ℝ\nhr : 0 < r\nb : ℝ\nhb : 0 < b\nx : E\nhx' : x ∈ s\nhx : ¬(fun x => b • x) x ∈ a • s\nh : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s\nhba : b < a\n⊢ (fun x => b • x) x ∈ a • s\n[PROOFSTEP]\nhave ha := hb.trans hba\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s\nr : ℝ\nhr : 0 < r\nb : ℝ\nhb : 0 < b\nx : E\nhx' : x ∈ s\nhx : ¬(fun x => b • x) x ∈ a • s\nh : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s\nhba : b < a\nha : 0 < a\n⊢ (fun x => b • x) x ∈ a • s\n[PROOFSTEP]\nrefine' ⟨(a⁻¹ * b) • x, hs₀ hx' (by positivity) _, _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s\nr : ℝ\nhr : 0 < r\nb : ℝ\nhb : 0 < b\nx : E\nhx' : x ∈ s\nhx : ¬(fun x => b • x) x ∈ a • s\nh : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s\nhba : b < a\nha : 0 < a\n⊢ 0 ≤ a⁻¹ * b\n[PROOFSTEP]\npositivity\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s\nr : ℝ\nhr : 0 < r\nb : ℝ\nhb : 0 < b\nx : E\nhx' : x ∈ s\nhx : ¬(fun x => b • x) x ∈ a • s\nh : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s\nhba : b < a\nha : 0 < a\n⊢ a⁻¹ * b ≤ 1\n[PROOFSTEP]\nrw [← div_eq_inv_mul]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s\nr : ℝ\nhr : 0 < r\nb : ℝ\nhb : 0 < b\nx : E\nhx' : x ∈ s\nhx : ¬(fun x => b • x) x ∈ a • s\nh : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s\nhba : b < a\nha : 0 < a\n⊢ b / a ≤ 1\n[PROOFSTEP]\nexact div_le_one_of_le hba.le ha.le\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s\nr : ℝ\nhr : 0 < r\nb : ℝ\nhb : 0 < b\nx : E\nhx' : x ∈ s\nhx : ¬(fun x => b • x) x ∈ a • s\nh : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s\nhba : b < a\nha : 0 < a\n⊢ (fun x => a • x) ((a⁻¹ * b) • x) = (fun x => b • x) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nhs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s\nr : ℝ\nhr : 0 < r\nb : ℝ\nhb : 0 < b\nx : E\nhx' : x ∈ s\nhx : ¬(fun x => b • x) x ∈ a • s\nh : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s\nhba : b < a\nha : 0 < a\n⊢ a • (a⁻¹ * b) • x = b • x\n[PROOFSTEP]\nrw [← mul_smul, mul_inv_cancel_left₀ ha.ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\nx : E\nhs₁ : StarConvex ℝ 0 s\nhs₂ : Absorbs ℝ s {x}\nhx : ¬x ∈ s\n⊢ ¬x ∈ 1 • s\n[PROOFSTEP]\nrwa [one_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\n⊢ gauge s (a • x) = a • gauge s x\n[PROOFSTEP]\nobtain rfl | ha' := ha.eq_or_lt\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\nx : E\nha : 0 ≤ 0\n⊢ gauge s (0 • x) = 0 • gauge s x\n[PROOFSTEP]\nrw [zero_smul, gauge_zero, zero_smul]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\n⊢ gauge s (a • x) = a • gauge s x\n[PROOFSTEP]\nrw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\n⊢ sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • a • x ∈ s} = sInf (a • {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s})\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase inr.e_a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\n⊢ {r | r ∈ Ioi 0 ∧ r⁻¹ • a • x ∈ s} = a • {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}\n[PROOFSTEP]\next r\n[GOAL]\ncase inr.e_a.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\n⊢ r ∈ {r | r ∈ Ioi 0 ∧ r⁻¹ • a • x ∈ s} ↔ r ∈ a • {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}\n[PROOFSTEP]\nsimp_rw [Set.mem_smul_set, Set.mem_sep_iff]\n[GOAL]\ncase inr.e_a.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\n⊢ r ∈ Ioi 0 ∧ r⁻¹ • a • x ∈ s ↔ ∃ y, (y ∈ Ioi 0 ∧ y⁻¹ • x ∈ s) ∧ a • y = r\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase inr.e_a.h.mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\n⊢ r ∈ Ioi 0 ∧ r⁻¹ • a • x ∈ s → ∃ y, (y ∈ Ioi 0 ∧ y⁻¹ • x ∈ s) ∧ a • y = r\n[PROOFSTEP]\nrintro ⟨hr, hx⟩\n[GOAL]\ncase inr.e_a.h.mp.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\nhr : r ∈ Ioi 0\nhx : r⁻¹ • a • x ∈ s\n⊢ ∃ y, (y ∈ Ioi 0 ∧ y⁻¹ • x ∈ s) ∧ a • y = r\n[PROOFSTEP]\nsimp_rw [mem_Ioi] at hr ⊢\n[GOAL]\ncase inr.e_a.h.mp.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\nhx : r⁻¹ • a • x ∈ s\nhr : 0 < r\n⊢ ∃ y, (0 < y ∧ y⁻¹ • x ∈ s) ∧ a • y = r\n[PROOFSTEP]\nrw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx \n[GOAL]\ncase inr.e_a.h.mp.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\nhx : a • x ∈ r • s\nhr : 0 < r\n⊢ ∃ y, (0 < y ∧ y⁻¹ • x ∈ s) ∧ a • y = r\n[PROOFSTEP]\nhave := smul_pos (inv_pos.2 ha') hr\n[GOAL]\ncase inr.e_a.h.mp.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\nhx : a • x ∈ r • s\nhr : 0 < r\nthis : 0 < a⁻¹ • r\n⊢ ∃ y, (0 < y ∧ y⁻¹ • x ∈ s) ∧ a • y = r\n[PROOFSTEP]\nrefine' ⟨a⁻¹ • r, ⟨this, _⟩, smul_inv_smul₀ ha'.ne' _⟩\n[GOAL]\ncase inr.e_a.h.mp.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\nhx : a • x ∈ r • s\nhr : 0 < r\nthis : 0 < a⁻¹ • r\n⊢ (a⁻¹ • r)⁻¹ • x ∈ s\n[PROOFSTEP]\nrwa [← mem_smul_set_iff_inv_smul_mem₀ this.ne', smul_assoc, mem_smul_set_iff_inv_smul_mem₀ (inv_ne_zero ha'.ne'),\n  inv_inv]\n[GOAL]\ncase inr.e_a.h.mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\n⊢ (∃ y, (y ∈ Ioi 0 ∧ y⁻¹ • x ∈ s) ∧ a • y = r) → r ∈ Ioi 0 ∧ r⁻¹ • a • x ∈ s\n[PROOFSTEP]\nrintro ⟨r, ⟨hr, hx⟩, rfl⟩\n[GOAL]\ncase inr.e_a.h.mpr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\nhr : r ∈ Ioi 0\nhx : r⁻¹ • x ∈ s\n⊢ a • r ∈ Ioi 0 ∧ (a • r)⁻¹ • a • x ∈ s\n[PROOFSTEP]\nrw [mem_Ioi] at hr ⊢\n[GOAL]\ncase inr.e_a.h.mpr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\nhr : 0 < r\nhx : r⁻¹ • x ∈ s\n⊢ 0 < a • r ∧ (a • r)⁻¹ • a • x ∈ s\n[PROOFSTEP]\nrw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx \n[GOAL]\ncase inr.e_a.h.mpr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\nhr : 0 < r\nhx : x ∈ r • s\n⊢ 0 < a • r ∧ (a • r)⁻¹ • a • x ∈ s\n[PROOFSTEP]\nhave := smul_pos ha' hr\n[GOAL]\ncase inr.e_a.h.mpr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\nhr : 0 < r\nhx : x ∈ r • s\nthis : 0 < a • r\n⊢ 0 < a • r ∧ (a • r)⁻¹ • a • x ∈ s\n[PROOFSTEP]\nrefine' ⟨this, _⟩\n[GOAL]\ncase inr.e_a.h.mpr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\nhr : 0 < r\nhx : x ∈ r • s\nthis : 0 < a • r\n⊢ (a • r)⁻¹ • a • x ∈ s\n[PROOFSTEP]\nrw [← mem_smul_set_iff_inv_smul_mem₀ this.ne', smul_assoc]\n[GOAL]\ncase inr.e_a.h.mpr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁴ : LinearOrderedField α\ninst✝³ : MulActionWithZero α ℝ\ninst✝² : OrderedSMul α ℝ\ninst✝¹ : MulActionWithZero α E\ninst✝ : IsScalarTower α ℝ (Set E)\ns : Set E\na : α\nha : 0 ≤ a\nx : E\nha' : 0 < a\nr : ℝ\nhr : 0 < r\nhx : x ∈ r • s\nthis : 0 < a • r\n⊢ a • x ∈ a • r • s\n[PROOFSTEP]\nexact smul_mem_smul_set hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\n⊢ gauge (a • s) = a⁻¹ • gauge s\n[PROOFSTEP]\nobtain rfl | ha' := ha.eq_or_lt\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\nha : 0 ≤ 0\n⊢ gauge (0 • s) = 0⁻¹ • gauge s\n[PROOFSTEP]\nrw [inv_zero, zero_smul, gauge_of_subset_zero (zero_smul_set_subset _)]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\n⊢ gauge (a • s) = a⁻¹ • gauge s\n[PROOFSTEP]\next x\n[GOAL]\ncase inr.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\n⊢ gauge (a • s) x = (a⁻¹ • gauge s) x\n[PROOFSTEP]\nrw [gauge_def', Pi.smul_apply, gauge_def', ← Real.sInf_smul_of_nonneg (inv_nonneg.2 ha)]\n[GOAL]\ncase inr.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\n⊢ sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ a • s} = sInf (a⁻¹ • {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s})\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase inr.h.e_a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\n⊢ {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ a • s} = a⁻¹ • {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}\n[PROOFSTEP]\next r\n[GOAL]\ncase inr.h.e_a.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\nr : ℝ\n⊢ r ∈ {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ a • s} ↔ r ∈ a⁻¹ • {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}\n[PROOFSTEP]\nsimp_rw [Set.mem_smul_set, Set.mem_sep_iff]\n[GOAL]\ncase inr.h.e_a.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\nr : ℝ\n⊢ (r ∈ Ioi 0 ∧ ∃ y, y ∈ s ∧ a • y = r⁻¹ • x) ↔ ∃ y, (y ∈ Ioi 0 ∧ y⁻¹ • x ∈ s) ∧ a⁻¹ • y = r\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase inr.h.e_a.h.mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\nr : ℝ\n⊢ (r ∈ Ioi 0 ∧ ∃ y, y ∈ s ∧ a • y = r⁻¹ • x) → ∃ y, (y ∈ Ioi 0 ∧ y⁻¹ • x ∈ s) ∧ a⁻¹ • y = r\n[PROOFSTEP]\nrintro ⟨hr, y, hy, h⟩\n[GOAL]\ncase inr.h.e_a.h.mp.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\nr : ℝ\nhr : r ∈ Ioi 0\ny : E\nhy : y ∈ s\nh : a • y = r⁻¹ • x\n⊢ ∃ y, (y ∈ Ioi 0 ∧ y⁻¹ • x ∈ s) ∧ a⁻¹ • y = r\n[PROOFSTEP]\nsimp_rw [mem_Ioi] at hr ⊢\n[GOAL]\ncase inr.h.e_a.h.mp.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\nr : ℝ\ny : E\nhy : y ∈ s\nh : a • y = r⁻¹ • x\nhr : 0 < r\n⊢ ∃ y, (0 < y ∧ y⁻¹ • x ∈ s) ∧ a⁻¹ • y = r\n[PROOFSTEP]\nrefine' ⟨a • r, ⟨smul_pos ha' hr, _⟩, inv_smul_smul₀ ha'.ne' _⟩\n[GOAL]\ncase inr.h.e_a.h.mp.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\nr : ℝ\ny : E\nhy : y ∈ s\nh : a • y = r⁻¹ • x\nhr : 0 < r\n⊢ (a • r)⁻¹ • x ∈ s\n[PROOFSTEP]\nrwa [smul_inv₀, smul_assoc, ← h, inv_smul_smul₀ ha'.ne']\n[GOAL]\ncase inr.h.e_a.h.mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\nr : ℝ\n⊢ (∃ y, (y ∈ Ioi 0 ∧ y⁻¹ • x ∈ s) ∧ a⁻¹ • y = r) → r ∈ Ioi 0 ∧ ∃ y, y ∈ s ∧ a • y = r⁻¹ • x\n[PROOFSTEP]\nrintro ⟨r, ⟨hr, hx⟩, rfl⟩\n[GOAL]\ncase inr.h.e_a.h.mpr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\nr : ℝ\nhr : r ∈ Ioi 0\nhx : r⁻¹ • x ∈ s\n⊢ a⁻¹ • r ∈ Ioi 0 ∧ ∃ y, y ∈ s ∧ a • y = (a⁻¹ • r)⁻¹ • x\n[PROOFSTEP]\nrw [mem_Ioi] at hr ⊢\n[GOAL]\ncase inr.h.e_a.h.mpr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\nr : ℝ\nhr : 0 < r\nhx : r⁻¹ • x ∈ s\n⊢ 0 < a⁻¹ • r ∧ ∃ y, y ∈ s ∧ a • y = (a⁻¹ • r)⁻¹ • x\n[PROOFSTEP]\nrefine' ⟨smul_pos (inv_pos.2 ha') hr, r⁻¹ • x, hx, _⟩\n[GOAL]\ncase inr.h.e_a.h.mpr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : MulActionWithZero α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\na : α\nha : 0 ≤ a\nha' : 0 < a\nx : E\nr : ℝ\nhr : 0 < r\nhx : r⁻¹ • x ∈ s\n⊢ a • r⁻¹ • x = (a⁻¹ • r)⁻¹ • x\n[PROOFSTEP]\nrw [smul_inv₀, smul_assoc, inv_inv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : Module α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\na : α\n⊢ gauge (a • s) = |a|⁻¹ • gauge s\n[PROOFSTEP]\nrw [← gauge_smul_left_of_nonneg (abs_nonneg a)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : Module α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\na : α\n⊢ gauge (a • s) = gauge (|a| • s)\n[PROOFSTEP]\nobtain h | h := abs_choice a\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : Module α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\na : α\nh : |a| = a\n⊢ gauge (a • s) = gauge (|a| • s)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : Module α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\na : α\nh : |a| = -a\n⊢ gauge (a • s) = gauge (|a| • s)\n[PROOFSTEP]\nrw [h, Set.neg_smul_set, ← Set.smul_set_neg]\n  -- Porting note: was congr\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : Module α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\na : α\nh : |a| = -a\n⊢ gauge (a • s) = gauge (a • -s)\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase inr.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : Module α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\na : α\nh : |a| = -a\n⊢ a • s = a • -s\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase inr.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : Module α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\na : α\nh : |a| = -a\n⊢ s = -s\n[PROOFSTEP]\next y\n[GOAL]\ncase inr.h.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : Module α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\na : α\nh : |a| = -a\ny : E\n⊢ y ∈ s ↔ y ∈ -s\n[PROOFSTEP]\nrefine' ⟨symmetric _, fun hy => _⟩\n[GOAL]\ncase inr.h.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : Module α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\na : α\nh : |a| = -a\ny : E\nhy : y ∈ -s\n⊢ y ∈ s\n[PROOFSTEP]\nrw [← neg_neg y]\n[GOAL]\ncase inr.h.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module ℝ E\ns✝ t : Set E\na✝ : ℝ\nα : Type u_4\ninst✝⁶ : LinearOrderedField α\ninst✝⁵ : MulActionWithZero α ℝ\ninst✝⁴ : OrderedSMul α ℝ\ninst✝³ : Module α E\ninst✝² : SMulCommClass α ℝ ℝ\ninst✝¹ : IsScalarTower α ℝ ℝ\ninst✝ : IsScalarTower α ℝ E\ns : Set E\nsymmetric : ∀ (x : E), x ∈ s → -x ∈ s\na : α\nh : |a| = -a\ny : E\nhy : y ∈ -s\n⊢ - -y ∈ s\n[PROOFSTEP]\nexact symmetric _ hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : IsROrC 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : IsScalarTower ℝ 𝕜 E\nhs : Balanced 𝕜 s\nr : 𝕜\nx : E\n⊢ gauge s (‖r‖ • x) = gauge s (r • x)\n[PROOFSTEP]\nunfold gauge\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : IsROrC 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : IsScalarTower ℝ 𝕜 E\nhs : Balanced 𝕜 s\nr : 𝕜\nx : E\n⊢ sInf {r_1 | 0 < r_1 ∧ ‖r‖ • x ∈ r_1 • s} = sInf {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}\n[PROOFSTEP]\ncongr with θ\n[GOAL]\ncase e_a.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : IsROrC 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : IsScalarTower ℝ 𝕜 E\nhs : Balanced 𝕜 s\nr : 𝕜\nx : E\nθ : ℝ\n⊢ θ ∈ {r_1 | 0 < r_1 ∧ ‖r‖ • x ∈ r_1 • s} ↔ θ ∈ {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}\n[PROOFSTEP]\nrw [@IsROrC.real_smul_eq_coe_smul 𝕜]\n[GOAL]\ncase e_a.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : IsROrC 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : IsScalarTower ℝ 𝕜 E\nhs : Balanced 𝕜 s\nr : 𝕜\nx : E\nθ : ℝ\n⊢ θ ∈ {r_1 | 0 < r_1 ∧ ↑‖r‖ • x ∈ r_1 • s} ↔ θ ∈ {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}\n[PROOFSTEP]\nrefine' and_congr_right fun hθ => (hs.smul _).mem_smul_iff _\n[GOAL]\ncase e_a.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : IsROrC 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : IsScalarTower ℝ 𝕜 E\nhs : Balanced 𝕜 s\nr : 𝕜\nx : E\nθ : ℝ\nhθ : 0 < θ\n⊢ ‖↑‖r‖‖ = ‖r‖\n[PROOFSTEP]\nrw [IsROrC.norm_ofReal, abs_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : IsROrC 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : IsScalarTower ℝ 𝕜 E\nhs : Balanced 𝕜 s\nr : 𝕜\nx : E\n⊢ gauge s (r • x) = ‖r‖ * gauge s x\n[PROOFSTEP]\nrw [← smul_eq_mul, ← gauge_smul_of_nonneg (norm_nonneg r), gauge_norm_smul hs]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns✝ t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\n⊢ interior s ⊆ {x | gauge s x < 1}\n[PROOFSTEP]\nintro x hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns✝ t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx : E\nhx : x ∈ interior s\n⊢ x ∈ {x | gauge s x < 1}\n[PROOFSTEP]\nhave H₁ : Tendsto (fun r : ℝ ↦ r⁻¹ • x) (𝓝[<] 1) (𝓝 ((1 : ℝ)⁻¹ • x)) :=\n  ((tendsto_id.inv₀ one_ne_zero).smul tendsto_const_nhds).mono_left inf_le_left\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns✝ t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx : E\nhx : x ∈ interior s\nH₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[Iio 1] 1) (𝓝 (1⁻¹ • x))\n⊢ x ∈ {x | gauge s x < 1}\n[PROOFSTEP]\nrw [inv_one, one_smul] at H₁ \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns✝ t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx : E\nhx : x ∈ interior s\nH₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[Iio 1] 1) (𝓝 x)\n⊢ x ∈ {x | gauge s x < 1}\n[PROOFSTEP]\nhave H₂ : ∀ᶠ r in 𝓝[<] (1 : ℝ), x ∈ r • s ∧ 0 < r ∧ r < 1\n[GOAL]\ncase H₂\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns✝ t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx : E\nhx : x ∈ interior s\nH₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[Iio 1] 1) (𝓝 x)\n⊢ ∀ᶠ (r : ℝ) in 𝓝[Iio 1] 1, x ∈ r • s ∧ 0 < r ∧ r < 1\n[PROOFSTEP]\nfilter_upwards [H₁ (mem_interior_iff_mem_nhds.1 hx), Ioo_mem_nhdsWithin_Iio' one_pos]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns✝ t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx : E\nhx : x ∈ interior s\nH₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[Iio 1] 1) (𝓝 x)\n⊢ ∀ (a : ℝ), a ∈ (fun r => r⁻¹ • x) ⁻¹' s → a ∈ Ioo 0 1 → x ∈ a • s ∧ 0 < a ∧ a < 1\n[PROOFSTEP]\nintro r h₁ h₂\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns✝ t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx : E\nhx : x ∈ interior s\nH₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[Iio 1] 1) (𝓝 x)\nr : ℝ\nh₁ : r ∈ (fun r => r⁻¹ • x) ⁻¹' s\nh₂ : r ∈ Ioo 0 1\n⊢ x ∈ r • s ∧ 0 < r ∧ r < 1\n[PROOFSTEP]\nexact ⟨(mem_smul_set_iff_inv_smul_mem₀ h₂.1.ne' _ _).2 h₁, h₂⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns✝ t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx : E\nhx : x ∈ interior s\nH₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[Iio 1] 1) (𝓝 x)\nH₂ : ∀ᶠ (r : ℝ) in 𝓝[Iio 1] 1, x ∈ r • s ∧ 0 < r ∧ r < 1\n⊢ x ∈ {x | gauge s x < 1}\n[PROOFSTEP]\nrcases H₂.exists with ⟨r, hxr, hr₀, hr₁⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns✝ t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx : E\nhx : x ∈ interior s\nH₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[Iio 1] 1) (𝓝 x)\nH₂ : ∀ᶠ (r : ℝ) in 𝓝[Iio 1] 1, x ∈ r • s ∧ 0 < r ∧ r < 1\nr : ℝ\nhxr : x ∈ r • s\nhr₀ : 0 < r\nhr₁ : r < 1\n⊢ x ∈ {x | gauge s x < 1}\n[PROOFSTEP]\nexact (gauge_le_of_mem hr₀.le hxr).trans_lt hr₁\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : IsOpen s\n⊢ {x | gauge s x < 1} = s\n[PROOFSTEP]\nrefine' (gauge_lt_one_subset_self hs₁ ‹_› <| absorbent_nhds_zero <| hs₂.mem_nhds hs₀).antisymm _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : IsOpen s\n⊢ s ⊆ {x | gauge s x < 1}\n[PROOFSTEP]\nconvert interior_subset_gauge_lt_one s\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nhs₁ : Convex ℝ s\nhs₀ : 0 ∈ s\nhs₂ : IsOpen s\n⊢ s = interior s\n[PROOFSTEP]\nexact hs₂.interior_eq.symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nhs₂ : IsOpen s\nx : E\nhx : x ∈ s\n⊢ x ∈ interior s\n[PROOFSTEP]\nrwa [hs₂.interior_eq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nx : E\nε : ℝ\nhε : 0 < ε\nhs₂ : IsOpen s\nhx : x ∈ ε • s\n⊢ gauge s x < ε\n[PROOFSTEP]\nhave : ε⁻¹ • x ∈ s := by rwa [← mem_smul_set_iff_inv_smul_mem₀ hε.ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nx : E\nε : ℝ\nhε : 0 < ε\nhs₂ : IsOpen s\nhx : x ∈ ε • s\n⊢ ε⁻¹ • x ∈ s\n[PROOFSTEP]\nrwa [← mem_smul_set_iff_inv_smul_mem₀ hε.ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nx : E\nε : ℝ\nhε : 0 < ε\nhs₂ : IsOpen s\nhx : x ∈ ε • s\nthis : ε⁻¹ • x ∈ s\n⊢ gauge s x < ε\n[PROOFSTEP]\nhave h_gauge_lt := gauge_lt_one_of_mem_of_open hs₂ this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nx : E\nε : ℝ\nhε : 0 < ε\nhs₂ : IsOpen s\nhx : x ∈ ε • s\nthis : ε⁻¹ • x ∈ s\nh_gauge_lt : gauge s (ε⁻¹ • x) < 1\n⊢ gauge s x < ε\n[PROOFSTEP]\nrwa [gauge_smul_of_nonneg (inv_nonneg.2 hε.le), smul_eq_mul, inv_mul_lt_iff hε, mul_one] at h_gauge_lt \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nx : E\nhc : Convex ℝ s\nhs₀ : 0 ∈ s\nha : Absorbent ℝ s\nh : gauge s x ≤ 1\n⊢ x ∈ closure s\n[PROOFSTEP]\nhave : ∀ᶠ r : ℝ in 𝓝[<] 1, r • x ∈ s\n[GOAL]\ncase this\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nx : E\nhc : Convex ℝ s\nhs₀ : 0 ∈ s\nha : Absorbent ℝ s\nh : gauge s x ≤ 1\n⊢ ∀ᶠ (r : ℝ) in 𝓝[Iio 1] 1, r • x ∈ s\n[PROOFSTEP]\nfilter_upwards [Ico_mem_nhdsWithin_Iio' one_pos] with r ⟨hr₀, hr₁⟩\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nx : E\nhc : Convex ℝ s\nhs₀ : 0 ∈ s\nha : Absorbent ℝ s\nh : gauge s x ≤ 1\nr : ℝ\nhr₀ : 0 ≤ r\nhr₁ : r < 1\n⊢ r • x ∈ s\n[PROOFSTEP]\napply gauge_lt_one_subset_self hc hs₀ ha\n[GOAL]\ncase h.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nx : E\nhc : Convex ℝ s\nhs₀ : 0 ∈ s\nha : Absorbent ℝ s\nh : gauge s x ≤ 1\nr : ℝ\nhr₀ : 0 ≤ r\nhr₁ : r < 1\n⊢ r • x ∈ {x | gauge s x < 1}\n[PROOFSTEP]\nrw [mem_setOf_eq, gauge_smul_of_nonneg hr₀]\n[GOAL]\ncase h.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nx : E\nhc : Convex ℝ s\nhs₀ : 0 ∈ s\nha : Absorbent ℝ s\nh : gauge s x ≤ 1\nr : ℝ\nhr₀ : 0 ≤ r\nhr₁ : r < 1\n⊢ r • gauge s x < 1\n[PROOFSTEP]\nexact mul_lt_one_of_nonneg_of_lt_one_left hr₀ hr₁ h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nx : E\nhc : Convex ℝ s\nhs₀ : 0 ∈ s\nha : Absorbent ℝ s\nh : gauge s x ≤ 1\nthis : ∀ᶠ (r : ℝ) in 𝓝[Iio 1] 1, r • x ∈ s\n⊢ x ∈ closure s\n[PROOFSTEP]\nrefine mem_closure_of_tendsto ?_ this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nx : E\nhc : Convex ℝ s\nhs₀ : 0 ∈ s\nha : Absorbent ℝ s\nh : gauge s x ≤ 1\nthis : ∀ᶠ (r : ℝ) in 𝓝[Iio 1] 1, r • x ∈ s\n⊢ Filter.Tendsto (fun x_1 => x_1 • x) (𝓝[Iio 1] 1) (𝓝 x)\n[PROOFSTEP]\nexact Filter.Tendsto.mono_left (Continuous.tendsto' (by continuity) _ _ (one_smul _ _)) inf_le_left\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝³ : AddCommGroup E\ninst✝² : Module ℝ E\ns t : Set E\na : ℝ\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nx : E\nhc : Convex ℝ s\nhs₀ : 0 ∈ s\nha : Absorbent ℝ s\nh : gauge s x ≤ 1\nthis : ∀ᶠ (r : ℝ) in 𝓝[Iio 1] 1, r • x ∈ s\n⊢ Continuous fun x_1 => x_1 • x\n[PROOFSTEP]\ncontinuity\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\n⊢ Continuous (gauge s)\n[PROOFSTEP]\nhave ha : Absorbent ℝ s := absorbent_nhds_zero hs₀\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nha : Absorbent ℝ s\n⊢ Continuous (gauge s)\n[PROOFSTEP]\nsimp only [continuous_iff_continuousAt, ContinuousAt, (nhds_basis_Icc_pos _).tendsto_right_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nha : Absorbent ℝ s\n⊢ ∀ (x : E) (i : ℝ), 0 < i → ∀ᶠ (x_1 : E) in 𝓝 x, gauge s x_1 ∈ Icc (gauge s x - i) (gauge s x + i)\n[PROOFSTEP]\nintro x ε hε₀\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nha : Absorbent ℝ s\nx : E\nε : ℝ\nhε₀ : 0 < ε\n⊢ ∀ᶠ (x_1 : E) in 𝓝 x, gauge s x_1 ∈ Icc (gauge s x - ε) (gauge s x + ε)\n[PROOFSTEP]\nrw [← map_add_left_nhds_zero, eventually_map]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nha : Absorbent ℝ s\nx : E\nε : ℝ\nhε₀ : 0 < ε\n⊢ ∀ᶠ (a : E) in 𝓝 0, gauge s ((fun x x_1 => x + x_1) x a) ∈ Icc (gauge s x - ε) (gauge s x + ε)\n[PROOFSTEP]\nhave : ε • s ∩ -(ε • s) ∈ 𝓝 0\n[GOAL]\ncase this\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nha : Absorbent ℝ s\nx : E\nε : ℝ\nhε₀ : 0 < ε\n⊢ ε • s ∩ -(ε • s) ∈ 𝓝 0\n[PROOFSTEP]\nexact\n  inter_mem ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀)\n    (neg_mem_nhds_zero _ ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nha : Absorbent ℝ s\nx : E\nε : ℝ\nhε₀ : 0 < ε\nthis : ε • s ∩ -(ε • s) ∈ 𝓝 0\n⊢ ∀ᶠ (a : E) in 𝓝 0, gauge s ((fun x x_1 => x + x_1) x a) ∈ Icc (gauge s x - ε) (gauge s x + ε)\n[PROOFSTEP]\nfilter_upwards [this] with y hy\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nha : Absorbent ℝ s\nx : E\nε : ℝ\nhε₀ : 0 < ε\nthis : ε • s ∩ -(ε • s) ∈ 𝓝 0\ny : E\nhy : y ∈ ε • s ∩ -(ε • s)\n⊢ gauge s (x + y) ∈ Icc (gauge s x - ε) (gauge s x + ε)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nha : Absorbent ℝ s\nx : E\nε : ℝ\nhε₀ : 0 < ε\nthis : ε • s ∩ -(ε • s) ∈ 𝓝 0\ny : E\nhy : y ∈ ε • s ∩ -(ε • s)\n⊢ gauge s x - ε ≤ gauge s (x + y)\n[PROOFSTEP]\nrw [sub_le_iff_le_add]\n[GOAL]\ncase h.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nha : Absorbent ℝ s\nx : E\nε : ℝ\nhε₀ : 0 < ε\nthis : ε • s ∩ -(ε • s) ∈ 𝓝 0\ny : E\nhy : y ∈ ε • s ∩ -(ε • s)\n⊢ gauge s x ≤ gauge s (x + y) + ε\n[PROOFSTEP]\ncalc\n  gauge s x = gauge s (x + y + (-y)) := by simp\n  _ ≤ gauge s (x + y) + gauge s (-y) := (gauge_add_le hc ha _ _)\n  _ ≤ gauge s (x + y) + ε := add_le_add_left (gauge_le_of_mem hε₀.le (mem_neg.1 hy.2)) _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nha : Absorbent ℝ s\nx : E\nε : ℝ\nhε₀ : 0 < ε\nthis : ε • s ∩ -(ε • s) ∈ 𝓝 0\ny : E\nhy : y ∈ ε • s ∩ -(ε • s)\n⊢ gauge s x = gauge s (x + y + -y)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nha : Absorbent ℝ s\nx : E\nε : ℝ\nhε₀ : 0 < ε\nthis : ε • s ∩ -(ε • s) ∈ 𝓝 0\ny : E\nhy : y ∈ ε • s ∩ -(ε • s)\n⊢ gauge s (x + y) ≤ gauge s x + ε\n[PROOFSTEP]\ncalc\n  gauge s (x + y) ≤ gauge s x + gauge s y := gauge_add_le hc ha _ _\n  _ ≤ gauge s x + ε := add_le_add_left (gauge_le_of_mem hε₀.le hy.1) _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\n⊢ {x | gauge s x < 1} = interior s\n[PROOFSTEP]\nrefine Subset.antisymm (fun x hx ↦ ?_) (interior_subset_gauge_lt_one s)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nx : E\nhx : x ∈ {x | gauge s x < 1}\n⊢ x ∈ interior s\n[PROOFSTEP]\nrcases mem_openSegment_of_gauge_lt_one (absorbent_nhds_zero hs₀) hx with ⟨y, hys, hxy⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\nx : E\nhx : x ∈ {x | gauge s x < 1}\ny : E\nhys : y ∈ s\nhxy : x ∈ openSegment ℝ 0 y\n⊢ x ∈ interior s\n[PROOFSTEP]\nexact hc.openSegment_interior_self_subset_interior (mem_interior_iff_mem_nhds.2 hs₀) hys hxy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nx : E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\n⊢ gauge s x = 1 ↔ x ∈ frontier s\n[PROOFSTEP]\nrw [eq_iff_le_not_lt, gauge_le_one_iff_mem_closure hc hs₀, gauge_lt_one_iff_mem_interior hc hs₀]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝² : TopologicalSpace E\ninst✝¹ : TopologicalAddGroup E\ninst✝ : ContinuousSMul ℝ E\nx : E\nhc : Convex ℝ s\nhs₀ : s ∈ 𝓝 0\n⊢ x ∈ closure s ∧ ¬x ∈ interior s ↔ x ∈ frontier s\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalAddGroup E\ninst✝¹ : ContinuousSMul ℝ E\nx : E\ninst✝ : T1Space E\nhs : Absorbent ℝ s\nhb : Bornology.IsVonNBounded ℝ s\n⊢ gauge s x = 0 ↔ x = 0\n[PROOFSTEP]\nrefine ⟨not_imp_not.1 fun (h : x ≠ 0) ↦ ne_of_gt ?_, fun h ↦ h.symm ▸ gauge_zero⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalAddGroup E\ninst✝¹ : ContinuousSMul ℝ E\nx : E\ninst✝ : T1Space E\nhs : Absorbent ℝ s\nhb : Bornology.IsVonNBounded ℝ s\nh : x ≠ 0\n⊢ 0 < gauge s x\n[PROOFSTEP]\nrcases hb (isOpen_compl_singleton.mem_nhds h.symm) with ⟨c, hc₀, hc⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalAddGroup E\ninst✝¹ : ContinuousSMul ℝ E\nx : E\ninst✝ : T1Space E\nhs : Absorbent ℝ s\nhb : Bornology.IsVonNBounded ℝ s\nh : x ≠ 0\nc : ℝ\nhc₀ : 0 < c\nhc : ∀ (a : ℝ), c ≤ ‖a‖ → s ⊆ a • {x}ᶜ\n⊢ 0 < gauge s x\n[PROOFSTEP]\nrefine (inv_pos.2 hc₀).trans_le <| le_csInf hs.gauge_set_nonempty ?_\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalAddGroup E\ninst✝¹ : ContinuousSMul ℝ E\nx : E\ninst✝ : T1Space E\nhs : Absorbent ℝ s\nhb : Bornology.IsVonNBounded ℝ s\nh : x ≠ 0\nc : ℝ\nhc₀ : 0 < c\nhc : ∀ (a : ℝ), c ≤ ‖a‖ → s ⊆ a • {x}ᶜ\n⊢ ∀ (b : ℝ), b ∈ {r | 0 < r ∧ x ∈ r • s} → c⁻¹ ≤ b\n[PROOFSTEP]\nrintro r ⟨hr₀, x, hx, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalAddGroup E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : T1Space E\nhs : Absorbent ℝ s\nhb : Bornology.IsVonNBounded ℝ s\nc : ℝ\nhc₀ : 0 < c\nr : ℝ\nhr₀ : 0 < r\nx : E\nhx : x ∈ s\nh : (fun x => r • x) x ≠ 0\nhc : ∀ (a : ℝ), c ≤ ‖a‖ → s ⊆ a • {(fun x => r • x) x}ᶜ\n⊢ c⁻¹ ≤ r\n[PROOFSTEP]\ncontrapose! hc\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalAddGroup E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : T1Space E\nhs : Absorbent ℝ s\nhb : Bornology.IsVonNBounded ℝ s\nc : ℝ\nhc₀ : 0 < c\nr : ℝ\nhr₀ : 0 < r\nx : E\nhx : x ∈ s\nh : (fun x => r • x) x ≠ 0\nhc : r < c⁻¹\n⊢ ∃ a, c ≤ ‖a‖ ∧ ¬s ⊆ a • {r • x}ᶜ\n[PROOFSTEP]\nrefine ⟨r⁻¹, ?_, fun h ↦ ?_⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalAddGroup E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : T1Space E\nhs : Absorbent ℝ s\nhb : Bornology.IsVonNBounded ℝ s\nc : ℝ\nhc₀ : 0 < c\nr : ℝ\nhr₀ : 0 < r\nx : E\nhx : x ∈ s\nh : (fun x => r • x) x ≠ 0\nhc : r < c⁻¹\n⊢ c ≤ ‖r⁻¹‖\n[PROOFSTEP]\nrw [norm_inv, Real.norm_of_nonneg hr₀.le, le_inv hc₀ hr₀]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalAddGroup E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : T1Space E\nhs : Absorbent ℝ s\nhb : Bornology.IsVonNBounded ℝ s\nc : ℝ\nhc₀ : 0 < c\nr : ℝ\nhr₀ : 0 < r\nx : E\nhx : x ∈ s\nh : (fun x => r • x) x ≠ 0\nhc : r < c⁻¹\n⊢ r ≤ c⁻¹\n[PROOFSTEP]\nexact hc.le\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalAddGroup E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : T1Space E\nhs : Absorbent ℝ s\nhb : Bornology.IsVonNBounded ℝ s\nc : ℝ\nhc₀ : 0 < c\nr : ℝ\nhr₀ : 0 < r\nx : E\nhx : x ∈ s\nh✝ : (fun x => r • x) x ≠ 0\nhc : r < c⁻¹\nh : s ⊆ r⁻¹ • {r • x}ᶜ\n⊢ False\n[PROOFSTEP]\nrcases h hx with ⟨y, hy, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_2.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalAddGroup E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : T1Space E\nhs : Absorbent ℝ s\nhb : Bornology.IsVonNBounded ℝ s\nc : ℝ\nhc₀ : 0 < c\nr : ℝ\nhr₀ : 0 < r\nhc : r < c⁻¹\ny : E\nhx : (fun x => r⁻¹ • x) y ∈ s\nh✝ : (fun x => r • x) ((fun x => r⁻¹ • x) y) ≠ 0\nh : s ⊆ r⁻¹ • {r • (fun x => r⁻¹ • x) y}ᶜ\nhy : y ∈ {r • (fun x => r⁻¹ • x) y}ᶜ\n⊢ False\n[PROOFSTEP]\nsimp [hr₀.ne'] at hy \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝³ : TopologicalSpace E\ninst✝² : TopologicalAddGroup E\ninst✝¹ : ContinuousSMul ℝ E\nx : E\ninst✝ : T1Space E\nhs : Absorbent ℝ s\nhb : Bornology.IsVonNBounded ℝ s\n⊢ 0 < gauge s x ↔ x ≠ 0\n[PROOFSTEP]\nsimp only [(gauge_nonneg _).gt_iff_ne, Ne.def, gauge_eq_zero hs hb]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : Module 𝕜 E\ninst✝² : IsScalarTower ℝ 𝕜 E\nhs₀ : Balanced 𝕜 s\nhs₁ : Convex ℝ s\nhs₂ : Absorbent ℝ s\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nhs : IsOpen s\n⊢ Seminorm.ball (gaugeSeminorm hs₀ hs₁ hs₂) 0 1 = s\n[PROOFSTEP]\nrw [Seminorm.ball_zero_eq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module ℝ E\ns t : Set E\na : ℝ\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : Module 𝕜 E\ninst✝² : IsScalarTower ℝ 𝕜 E\nhs₀ : Balanced 𝕜 s\nhs₁ : Convex ℝ s\nhs₂ : Absorbent ℝ s\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\nhs : IsOpen s\n⊢ {y | ↑(gaugeSeminorm hs₀ hs₁ hs₂) y < 1} = s\n[PROOFSTEP]\nexact gauge_lt_one_eq_self_of_open hs₁ hs₂.zero_mem hs\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\n⊢ gauge (ball p 0 1) = ↑p\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\n⊢ gauge (ball p 0 1) x = ↑p x\n[PROOFSTEP]\nobtain hp | hp := {r : ℝ | 0 < r ∧ x ∈ r • p.ball 0 1}.eq_empty_or_nonempty\n[GOAL]\ncase h.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : {r | 0 < r ∧ x ∈ r • ball p 0 1} = ∅\n⊢ gauge (ball p 0 1) x = ↑p x\n[PROOFSTEP]\nrw [gauge, hp, Real.sInf_empty]\n[GOAL]\ncase h.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : {r | 0 < r ∧ x ∈ r • ball p 0 1} = ∅\n⊢ 0 = ↑p x\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase h.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : {r | 0 < r ∧ x ∈ r • ball p 0 1} = ∅\nh : ¬0 = ↑p x\n⊢ False\n[PROOFSTEP]\nhave hpx : 0 < p x := (map_nonneg _ _).lt_of_ne h\n[GOAL]\ncase h.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : {r | 0 < r ∧ x ∈ r • ball p 0 1} = ∅\nh : ¬0 = ↑p x\nhpx : 0 < ↑p x\n⊢ False\n[PROOFSTEP]\nhave hpx₂ : 0 < 2 * p x := mul_pos zero_lt_two hpx\n[GOAL]\ncase h.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : {r | 0 < r ∧ x ∈ r • ball p 0 1} = ∅\nh : ¬0 = ↑p x\nhpx : 0 < ↑p x\nhpx₂ : 0 < 2 * ↑p x\n⊢ False\n[PROOFSTEP]\nrefine' hp.subset ⟨hpx₂, (2 * p x)⁻¹ • x, _, smul_inv_smul₀ hpx₂.ne' _⟩\n[GOAL]\ncase h.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : {r | 0 < r ∧ x ∈ r • ball p 0 1} = ∅\nh : ¬0 = ↑p x\nhpx : 0 < ↑p x\nhpx₂ : 0 < 2 * ↑p x\n⊢ (2 * ↑p x)⁻¹ • x ∈ ball p 0 1\n[PROOFSTEP]\nrw [p.mem_ball_zero, map_smul_eq_mul, Real.norm_eq_abs, abs_of_pos (inv_pos.2 hpx₂), inv_mul_lt_iff hpx₂, mul_one]\n[GOAL]\ncase h.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : {r | 0 < r ∧ x ∈ r • ball p 0 1} = ∅\nh : ¬0 = ↑p x\nhpx : 0 < ↑p x\nhpx₂ : 0 < 2 * ↑p x\n⊢ ↑p x < 2 * ↑p x\n[PROOFSTEP]\nexact lt_mul_of_one_lt_left hpx one_lt_two\n[GOAL]\ncase h.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : Set.Nonempty {r | 0 < r ∧ x ∈ r • ball p 0 1}\n⊢ gauge (ball p 0 1) x = ↑p x\n[PROOFSTEP]\nrefine' IsGLB.csInf_eq ⟨fun r => _, fun r hr => le_of_forall_pos_le_add fun ε hε => _⟩ hp\n[GOAL]\ncase h.inr.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : Set.Nonempty {r | 0 < r ∧ x ∈ r • ball p 0 1}\nr : ℝ\n⊢ r ∈ {r | 0 < r ∧ x ∈ r • ball p 0 1} → ↑p x ≤ r\n[PROOFSTEP]\nrintro ⟨hr, y, hy, rfl⟩\n[GOAL]\ncase h.inr.refine'_1.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nr : ℝ\nhr : 0 < r\ny : E\nhy : y ∈ ball p 0 1\nhp : Set.Nonempty {r_1 | 0 < r_1 ∧ (fun x => r • x) y ∈ r_1 • ball p 0 1}\n⊢ ↑p ((fun x => r • x) y) ≤ r\n[PROOFSTEP]\nrw [p.mem_ball_zero] at hy \n[GOAL]\ncase h.inr.refine'_1.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nr : ℝ\nhr : 0 < r\ny : E\nhy : ↑p y < 1\nhp : Set.Nonempty {r_1 | 0 < r_1 ∧ (fun x => r • x) y ∈ r_1 • ball p 0 1}\n⊢ ↑p ((fun x => r • x) y) ≤ r\n[PROOFSTEP]\nrw [map_smul_eq_mul, Real.norm_eq_abs, abs_of_pos hr]\n[GOAL]\ncase h.inr.refine'_1.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nr : ℝ\nhr : 0 < r\ny : E\nhy : ↑p y < 1\nhp : Set.Nonempty {r_1 | 0 < r_1 ∧ (fun x => r • x) y ∈ r_1 • ball p 0 1}\n⊢ r * ↑p y ≤ r\n[PROOFSTEP]\nexact mul_le_of_le_one_right hr.le hy.le\n[GOAL]\ncase h.inr.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : Set.Nonempty {r | 0 < r ∧ x ∈ r • ball p 0 1}\nr : ℝ\nhr : r ∈ lowerBounds {r | 0 < r ∧ x ∈ r • ball p 0 1}\nε : ℝ\nhε : 0 < ε\n⊢ r ≤ ↑p x + ε\n[PROOFSTEP]\nhave hpε : 0 < p x + ε :=\n  -- Porting note: was `by positivity`add_pos_of_nonneg_of_pos (map_nonneg _ _) hε\n[GOAL]\ncase h.inr.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : Set.Nonempty {r | 0 < r ∧ x ∈ r • ball p 0 1}\nr : ℝ\nhr : r ∈ lowerBounds {r | 0 < r ∧ x ∈ r • ball p 0 1}\nε : ℝ\nhε : 0 < ε\nhpε : 0 < ↑p x + ε\n⊢ r ≤ ↑p x + ε\n[PROOFSTEP]\nrefine' hr ⟨hpε, (p x + ε)⁻¹ • x, _, smul_inv_smul₀ hpε.ne' _⟩\n[GOAL]\ncase h.inr.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : Set.Nonempty {r | 0 < r ∧ x ∈ r • ball p 0 1}\nr : ℝ\nhr : r ∈ lowerBounds {r | 0 < r ∧ x ∈ r • ball p 0 1}\nε : ℝ\nhε : 0 < ε\nhpε : 0 < ↑p x + ε\n⊢ (↑p x + ε)⁻¹ • x ∈ ball p 0 1\n[PROOFSTEP]\nrw [p.mem_ball_zero, map_smul_eq_mul, Real.norm_eq_abs, abs_of_pos (inv_pos.2 hpε), inv_mul_lt_iff hpε, mul_one]\n[GOAL]\ncase h.inr.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns t : Set E\na : ℝ\np : Seminorm ℝ E\nx : E\nhp : Set.Nonempty {r | 0 < r ∧ x ∈ r • ball p 0 1}\nr : ℝ\nhr : r ∈ lowerBounds {r | 0 < r ∧ x ∈ r • ball p 0 1}\nε : ℝ\nhε : 0 < ε\nhpε : 0 < ↑p x + ε\n⊢ ↑p x < ↑p x + ε\n[PROOFSTEP]\nexact lt_add_of_pos_right _ hε\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ x : E\n⊢ gauge (ball 0 1) x = ‖x‖\n[PROOFSTEP]\nrw [← ball_normSeminorm ℝ, Seminorm.gauge_ball, coe_normSeminorm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr : 0 ≤ r\nx : E\n⊢ gauge (ball 0 r) x = ‖x‖ / r\n[PROOFSTEP]\nrcases hr.eq_or_lt with rfl | hr\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nx✝ x : E\nhr : 0 ≤ 0\n⊢ gauge (ball 0 0) x = ‖x‖ / 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr✝ : 0 ≤ r\nx : E\nhr : 0 < r\n⊢ gauge (ball 0 r) x = ‖x‖ / r\n[PROOFSTEP]\nrw [← smul_unitBall_of_pos hr, gauge_smul_left, Pi.smul_apply, gauge_unit_ball, smul_eq_mul, abs_of_nonneg hr.le,\n  div_eq_inv_mul]\n[GOAL]\ncase inr.symmetric\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr✝ : 0 ≤ r\nx : E\nhr : 0 < r\n⊢ ∀ (x : E), x ∈ ball 0 1 → -x ∈ ball 0 1\n[PROOFSTEP]\nsimp_rw [mem_ball_zero_iff, norm_neg]\n[GOAL]\ncase inr.symmetric\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr✝ : 0 ≤ r\nx : E\nhr : 0 < r\n⊢ ∀ (x : E), ‖x‖ < 1 → ‖x‖ < 1\n[PROOFSTEP]\nexact fun _ => id\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ x : E\n⊢ gauge (closure 0) x = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp only [← singleton_zero, gauge_def', mem_closure_zero_iff_norm, norm_smul, mul_eq_zero, norm_eq_zero, inv_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ x : E\n⊢ sInf {r | r ∈ Ioi 0 ∧ (r = 0 ∨ ‖x‖ = 0)} = OfNat.ofNat 0 x\n[PROOFSTEP]\nrcases(norm_nonneg x).eq_or_gt with hx | hx\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ x : E\nhx : ‖x‖ = 0\n⊢ sInf {r | r ∈ Ioi 0 ∧ (r = 0 ∨ ‖x‖ = 0)} = OfNat.ofNat 0 x\n[PROOFSTEP]\nconvert csInf_Ioi (a := (0 : ℝ))\n[GOAL]\ncase h.e'_2.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ x : E\nhx : ‖x‖ = 0\n⊢ {r | r ∈ Ioi 0 ∧ (r = 0 ∨ ‖x‖ = 0)} = Ioi 0\n[PROOFSTEP]\nexact Set.ext fun r ↦ and_iff_left (.inr hx)\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ x : E\nhx : 0 < ‖x‖\n⊢ sInf {r | r ∈ Ioi 0 ∧ (r = 0 ∨ ‖x‖ = 0)} = OfNat.ofNat 0 x\n[PROOFSTEP]\nconvert Real.sInf_empty\n[GOAL]\ncase h.e'_2.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ x : E\nhx : 0 < ‖x‖\n⊢ {r | r ∈ Ioi 0 ∧ (r = 0 ∨ ‖x‖ = 0)} = ∅\n[PROOFSTEP]\nexact eq_empty_of_forall_not_mem fun r ⟨hr₀, hr⟩ ↦ hx.ne' <| hr.resolve_left hr₀.out.ne'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr : 0 ≤ r\nx : E\n⊢ gauge (closedBall 0 r) x = ‖x‖ / r\n[PROOFSTEP]\nrcases hr.eq_or_lt with rfl | hr'\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nx✝ x : E\nhr : 0 ≤ 0\n⊢ gauge (closedBall 0 0) x = ‖x‖ / 0\n[PROOFSTEP]\nrw [div_zero, closedBall_zero', singleton_zero, gauge_closure_zero]\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nx✝ x : E\nhr : 0 ≤ 0\n⊢ OfNat.ofNat 0 x = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr : 0 ≤ r\nx : E\nhr' : 0 < r\n⊢ gauge (closedBall 0 r) x = ‖x‖ / r\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase inr.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr : 0 ≤ r\nx : E\nhr' : 0 < r\n⊢ gauge (closedBall 0 r) x ≤ ‖x‖ / r\n[PROOFSTEP]\nrw [← gauge_ball hr]\n[GOAL]\ncase inr.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr : 0 ≤ r\nx : E\nhr' : 0 < r\n⊢ gauge (closedBall 0 r) x ≤ gauge (ball 0 r) x\n[PROOFSTEP]\nexact gauge_mono (absorbent_ball_zero hr') ball_subset_closedBall x\n[GOAL]\ncase inr.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr : 0 ≤ r\nx : E\nhr' : 0 < r\n⊢ ‖x‖ / r ≤ gauge (closedBall 0 r) x\n[PROOFSTEP]\nsuffices : ∀ᶠ R in 𝓝[>] r, ‖x‖ / R ≤ gauge (closedBall 0 r) x\n[GOAL]\ncase inr.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr : 0 ≤ r\nx : E\nhr' : 0 < r\nthis : ∀ᶠ (R : ℝ) in 𝓝[Ioi r] r, ‖x‖ / R ≤ gauge (closedBall 0 r) x\n⊢ ‖x‖ / r ≤ gauge (closedBall 0 r) x\n[PROOFSTEP]\nrefine le_of_tendsto ?_ this\n[GOAL]\ncase inr.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr : 0 ≤ r\nx : E\nhr' : 0 < r\nthis : ∀ᶠ (R : ℝ) in 𝓝[Ioi r] r, ‖x‖ / R ≤ gauge (closedBall 0 r) x\n⊢ Filter.Tendsto (fun c => ‖x‖ / c) (𝓝[Ioi r] r) (𝓝 (‖x‖ / r))\n[PROOFSTEP]\nexact tendsto_const_nhds.div inf_le_left hr'.ne'\n[GOAL]\ncase this\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr : 0 ≤ r\nx : E\nhr' : 0 < r\n⊢ ∀ᶠ (R : ℝ) in 𝓝[Ioi r] r, ‖x‖ / R ≤ gauge (closedBall 0 r) x\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin] with R hR\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr : 0 ≤ r\nx : E\nhr' : 0 < r\nR : ℝ\nhR : R ∈ Ioi r\n⊢ ‖x‖ / R ≤ gauge (closedBall 0 r) x\n[PROOFSTEP]\nrw [← gauge_ball (hr.trans hR.out.le)]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr : 0 ≤ r\nx : E\nhr' : 0 < r\nR : ℝ\nhR : R ∈ Ioi r\n⊢ gauge (ball 0 R) x ≤ gauge (closedBall 0 r) x\n[PROOFSTEP]\nrefine gauge_mono ?_ (closedBall_subset_ball hR) _\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx✝ : E\nhr : 0 ≤ r\nx : E\nhr' : 0 < r\nR : ℝ\nhR : R ∈ Ioi r\n⊢ Absorbent ℝ (closedBall 0 r)\n[PROOFSTEP]\nexact (absorbent_ball_zero hr').subset ball_subset_closedBall\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx : E\nhs : ball 0 r ⊆ s\n⊢ r * gauge s x ≤ ‖x‖\n[PROOFSTEP]\nobtain hr | hr := le_or_lt r 0\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx : E\nhs : ball 0 r ⊆ s\nhr : r ≤ 0\n⊢ r * gauge s x ≤ ‖x‖\n[PROOFSTEP]\nexact (mul_nonpos_of_nonpos_of_nonneg hr <| gauge_nonneg _).trans (norm_nonneg _)\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx : E\nhs : ball 0 r ⊆ s\nhr : 0 < r\n⊢ r * gauge s x ≤ ‖x‖\n[PROOFSTEP]\nrw [mul_comm, ← le_div_iff hr, ← gauge_ball hr.le]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx : E\nhs : ball 0 r ⊆ s\nhr : 0 < r\n⊢ gauge s x ≤ gauge (ball 0 r) x\n[PROOFSTEP]\nexact gauge_mono (absorbent_ball_zero hr) hs x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr✝ : ℝ\nx✝ : E\nr : ℝ≥0\nhc : Convex ℝ s\nhr : 0 < r\nhs : ball 0 ↑r ⊆ s\nthis : Absorbent ℝ (ball 0 ↑r)\nx y : E\n⊢ gauge s x = gauge s (y + (x - y))\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr✝ : ℝ\nx✝ : E\nr : ℝ≥0\nhc : Convex ℝ s\nhr : 0 < r\nhs : ball 0 ↑r ⊆ s\nthis : Absorbent ℝ (ball 0 ↑r)\nx y : E\n⊢ gauge s y + ‖x - y‖ / ↑r = gauge s y + ↑r⁻¹ * dist x y\n[PROOFSTEP]\nrw [dist_eq_norm, div_eq_inv_mul, NNReal.coe_inv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx : E\nhs : Absorbent ℝ s\nhr : 0 ≤ r\nhsr : s ⊆ closedBall 0 r\n⊢ ‖x‖ / r ≤ gauge s x\n[PROOFSTEP]\nrw [← gauge_closedBall hr]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\ns : Set E\nr : ℝ\nx : E\nhs : Absorbent ℝ s\nhr : 0 ≤ r\nhsr : s ⊆ closedBall 0 r\n⊢ gauge (closedBall 0 r) x ≤ gauge s x\n[PROOFSTEP]\nexact gauge_mono hs hsr _\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Gauge", "llama_tokens": 47012, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6992544085240401, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.38771591701995306}}
{"text": "[GOAL]\nτ : Type u_1\nα : Type u_2\nϕ : τ → α → α\ns : Set α\n⊢ IsInvariant ϕ s ↔ ∀ (t : τ), ϕ t '' s ⊆ s\n[PROOFSTEP]\nsimp_rw [IsInvariant, mapsTo']\n[GOAL]\nτ : Type u_1\ninst✝³ : AddMonoid τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : ContinuousAdd τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\nf₁ : τ → α → α\ncont'✝¹ : Continuous (uncurry f₁)\nmap_add'✝¹ : ∀ (t₁ t₂ : τ) (x : α), f₁ (t₁ + t₂) x = f₁ t₁ (f₁ t₂ x)\nmap_zero'✝¹ : ∀ (x : α), f₁ 0 x = x\nf₂ : τ → α → α\ncont'✝ : Continuous (uncurry f₂)\nmap_add'✝ : ∀ (t₁ t₂ : τ) (x : α), f₂ (t₁ + t₂) x = f₂ t₁ (f₂ t₂ x)\nmap_zero'✝ : ∀ (x : α), f₂ 0 x = x\nh :\n  ∀ (t : τ) (x : α),\n    toFun { toFun := f₁, cont' := cont'✝¹, map_add' := map_add'✝¹, map_zero' := map_zero'✝¹ } t x =\n      toFun { toFun := f₂, cont' := cont'✝, map_add' := map_add'✝, map_zero' := map_zero'✝ } t x\n⊢ { toFun := f₁, cont' := cont'✝¹, map_add' := map_add'✝¹, map_zero' := map_zero'✝¹ } =\n    { toFun := f₂, cont' := cont'✝, map_add' := map_add'✝, map_zero' := map_zero'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_toFun\nτ : Type u_1\ninst✝³ : AddMonoid τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : ContinuousAdd τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\nf₁ : τ → α → α\ncont'✝¹ : Continuous (uncurry f₁)\nmap_add'✝¹ : ∀ (t₁ t₂ : τ) (x : α), f₁ (t₁ + t₂) x = f₁ t₁ (f₁ t₂ x)\nmap_zero'✝¹ : ∀ (x : α), f₁ 0 x = x\nf₂ : τ → α → α\ncont'✝ : Continuous (uncurry f₂)\nmap_add'✝ : ∀ (t₁ t₂ : τ) (x : α), f₂ (t₁ + t₂) x = f₂ t₁ (f₂ t₂ x)\nmap_zero'✝ : ∀ (x : α), f₂ 0 x = x\nh :\n  ∀ (t : τ) (x : α),\n    toFun { toFun := f₁, cont' := cont'✝¹, map_add' := map_add'✝¹, map_zero' := map_zero'✝¹ } t x =\n      toFun { toFun := f₂, cont' := cont'✝, map_add' := map_add'✝, map_zero' := map_zero'✝ } t x\n⊢ f₁ = f₂\n[PROOFSTEP]\nfunext\n[GOAL]\ncase e_toFun.h.h\nτ : Type u_1\ninst✝³ : AddMonoid τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : ContinuousAdd τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\nf₁ : τ → α → α\ncont'✝¹ : Continuous (uncurry f₁)\nmap_add'✝¹ : ∀ (t₁ t₂ : τ) (x : α), f₁ (t₁ + t₂) x = f₁ t₁ (f₁ t₂ x)\nmap_zero'✝¹ : ∀ (x : α), f₁ 0 x = x\nf₂ : τ → α → α\ncont'✝ : Continuous (uncurry f₂)\nmap_add'✝ : ∀ (t₁ t₂ : τ) (x : α), f₂ (t₁ + t₂) x = f₂ t₁ (f₂ t₂ x)\nmap_zero'✝ : ∀ (x : α), f₂ 0 x = x\nh :\n  ∀ (t : τ) (x : α),\n    toFun { toFun := f₁, cont' := cont'✝¹, map_add' := map_add'✝¹, map_zero' := map_zero'✝¹ } t x =\n      toFun { toFun := f₂, cont' := cont'✝, map_add' := map_add'✝, map_zero' := map_zero'✝ } t x\nx✝¹ : τ\nx✝ : α\n⊢ f₁ x✝¹ x✝ = f₂ x✝¹ x✝\n[PROOFSTEP]\nexact h _ _\n[GOAL]\nτ : Type u_1\ninst✝³ : AddCommGroup τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : TopologicalAddGroup τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\ns : Set α\nh : ∀ (t : τ), toFun ϕ t '' s ⊆ s\nt : τ\nx✝ : α\nhx : x✝ ∈ s\n⊢ toFun ϕ t (toFun ϕ (-t) x✝) = x✝\n[PROOFSTEP]\nsimp [← map_add]\n[GOAL]\nτ : Type u_1\ninst✝³ : AddCommGroup τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : TopologicalAddGroup τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\ns : Set α\nh : ∀ (t : τ), toFun ϕ t '' s = s\nt : τ\n⊢ toFun ϕ t '' s ⊆ s\n[PROOFSTEP]\nrw [h t]\n[GOAL]\nτ : Type u_1\ninst✝³ : AddCommGroup τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : TopologicalAddGroup τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\nx✝² x✝¹ : τ\nx✝ : α\n⊢ (fun t => toFun ϕ (-t)) (x✝² + x✝¹) x✝ = (fun t => toFun ϕ (-t)) x✝² ((fun t => toFun ϕ (-t)) x✝¹ x✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\nτ : Type u_1\ninst✝³ : AddCommGroup τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : TopologicalAddGroup τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\nx✝² x✝¹ : τ\nx✝ : α\n⊢ toFun ϕ (-(x✝² + x✝¹)) x✝ = toFun ϕ (-x✝²) (toFun ϕ (-x✝¹) x✝)\n[PROOFSTEP]\nrw [neg_add, map_add]\n[GOAL]\nτ : Type u_1\ninst✝³ : AddCommGroup τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : TopologicalAddGroup τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\nx✝ : α\n⊢ (fun t => toFun ϕ (-t)) 0 x✝ = x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nτ : Type u_1\ninst✝³ : AddCommGroup τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : TopologicalAddGroup τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\nx✝ : α\n⊢ toFun ϕ (-0) x✝ = x✝\n[PROOFSTEP]\nrw [neg_zero, map_zero_apply]\n[GOAL]\nτ : Type u_1\ninst✝³ : AddCommGroup τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : TopologicalAddGroup τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\nt : τ\n⊢ Continuous (toFun ϕ t)\n[PROOFSTEP]\nrw [← curry_uncurry ϕ.toFun]\n[GOAL]\nτ : Type u_1\ninst✝³ : AddCommGroup τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : TopologicalAddGroup τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\nt : τ\n⊢ Continuous (curry (uncurry ϕ.toFun) t)\n[PROOFSTEP]\napply continuous_curry\n[GOAL]\ncase h\nτ : Type u_1\ninst✝³ : AddCommGroup τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : TopologicalAddGroup τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\nt : τ\n⊢ Continuous (uncurry ϕ.toFun)\n[PROOFSTEP]\nexact ϕ.cont'\n[GOAL]\nτ : Type u_1\ninst✝³ : AddCommGroup τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : TopologicalAddGroup τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\nt : τ\nx : α\n⊢ toFun ϕ (-t) (toFun ϕ t x) = x\n[PROOFSTEP]\nrw [← map_add, neg_add_self, map_zero_apply]\n[GOAL]\nτ : Type u_1\ninst✝³ : AddCommGroup τ\ninst✝² : TopologicalSpace τ\ninst✝¹ : TopologicalAddGroup τ\nα : Type u_2\ninst✝ : TopologicalSpace α\nϕ : Flow τ α\nt : τ\nx : α\n⊢ toFun ϕ t (toFun ϕ (-t) x) = x\n[PROOFSTEP]\nrw [← map_add, add_neg_self, map_zero_apply]\n", "meta": {"mathlib_filename": "Mathlib.Dynamics.Flow", "llama_tokens": 2881, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7461389930307512, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.38763511601933937}}
{"text": "[GOAL]\nE : Type u_1\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : Nontrivial E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\n⊢ NoAtoms μ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nR : ℝ\n⊢ ∫ (x : E), f (R • x) ∂μ = |(R ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nrcases eq_or_ne R 0 with (rfl | hR)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\n⊢ ∫ (x : E), f (0 • x) ∂μ = |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nsimp only [zero_smul, integral_const]\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\n⊢ ENNReal.toReal (↑↑μ univ) • f 0 = |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nrcases Nat.eq_zero_or_pos (finrank ℝ E) with (hE | hE)\n[GOAL]\ncase inl.inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nhE : finrank ℝ E = 0\n⊢ ENNReal.toReal (↑↑μ univ) • f 0 = |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nhave : Subsingleton E := finrank_zero_iff.1 hE\n[GOAL]\ncase inl.inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nhE : finrank ℝ E = 0\nthis : Subsingleton E\n⊢ ENNReal.toReal (↑↑μ univ) • f 0 = |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nhave : f = fun _ => f 0 := by ext x; rw [Subsingleton.elim x 0]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nhE : finrank ℝ E = 0\nthis : Subsingleton E\n⊢ f = fun x => f 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nhE : finrank ℝ E = 0\nthis : Subsingleton E\nx : E\n⊢ f x = f 0\n[PROOFSTEP]\nrw [Subsingleton.elim x 0]\n[GOAL]\ncase inl.inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nhE : finrank ℝ E = 0\nthis✝ : Subsingleton E\nthis : f = fun x => f 0\n⊢ ENNReal.toReal (↑↑μ univ) • f 0 = |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nconv_rhs => rw [this]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nhE : finrank ℝ E = 0\nthis✝ : Subsingleton E\nthis : f = fun x => f 0\n| |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nrw [this]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nhE : finrank ℝ E = 0\nthis✝ : Subsingleton E\nthis : f = fun x => f 0\n| |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nrw [this]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nhE : finrank ℝ E = 0\nthis✝ : Subsingleton E\nthis : f = fun x => f 0\n| |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase inl.inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nhE : finrank ℝ E = 0\nthis✝ : Subsingleton E\nthis : f = fun x => f 0\n⊢ ENNReal.toReal (↑↑μ univ) • f 0 = |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), (fun x => f 0) x ∂μ\n[PROOFSTEP]\nsimp only [hE, pow_zero, inv_one, abs_one, one_smul, integral_const]\n[GOAL]\ncase inl.inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nhE : finrank ℝ E > 0\n⊢ ENNReal.toReal (↑↑μ univ) • f 0 = |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nhave : Nontrivial E := finrank_pos_iff.1 hE\n[GOAL]\ncase inl.inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nhE : finrank ℝ E > 0\nthis : Nontrivial E\n⊢ ENNReal.toReal (↑↑μ univ) • f 0 = |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nsimp only [zero_pow hE, measure_univ_of_isAddLeftInvariant, ENNReal.top_toReal, zero_smul, inv_zero, abs_zero]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nR : ℝ\nhR : R ≠ 0\n⊢ ∫ (x : E), f (R • x) ∂μ = |(R ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\ncalc\n  (∫ x, f (R • x) ∂μ) = ∫ y, f y ∂Measure.map (fun x => R • x) μ :=\n    (integral_map_equiv (Homeomorph.smul (isUnit_iff_ne_zero.2 hR).unit).toMeasurableEquiv f).symm\n  _ = |(R ^ finrank ℝ E)⁻¹| • ∫ x, f x ∂μ := by\n    simp only [map_addHaar_smul μ hR, integral_smul_measure, ENNReal.toReal_ofReal, abs_nonneg]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nR : ℝ\nhR : R ≠ 0\n⊢ ∫ (y : E), f y ∂map (fun x => R • x) μ = |(R ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nsimp only [map_addHaar_smul μ hR, integral_smul_measure, ENNReal.toReal_ofReal, abs_nonneg]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nR : ℝ\nhR : 0 ≤ R\n⊢ ∫ (x : E), f (R • x) ∂μ = (R ^ finrank ℝ E)⁻¹ • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nrw [integral_comp_smul μ f R, abs_of_nonneg (inv_nonneg.2 (pow_nonneg hR _))]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nR : ℝ\n⊢ ∫ (x : E), f (R⁻¹ • x) ∂μ = |R ^ finrank ℝ E| • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nrw [integral_comp_smul μ f R⁻¹, inv_pow, inv_inv]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nf : E → F\nR : ℝ\nhR : 0 ≤ R\n⊢ ∫ (x : E), f (R⁻¹ • x) ∂μ = R ^ finrank ℝ E • ∫ (x : E), f x ∂μ\n[PROOFSTEP]\nrw [integral_comp_inv_smul μ f R, abs_of_nonneg (pow_nonneg hR _)]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\ng : ℝ → F\na : ℝ\n⊢ ∫ (x : ℝ), g (a * x) = |a⁻¹| • ∫ (y : ℝ), g y\n[PROOFSTEP]\nsimp_rw [← smul_eq_mul, Measure.integral_comp_smul, FiniteDimensional.finrank_self, pow_one]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\ng : ℝ → F\na : ℝ\n⊢ ∫ (x : ℝ), g (a⁻¹ * x) = |a| • ∫ (y : ℝ), g y\n[PROOFSTEP]\nsimp_rw [← smul_eq_mul, Measure.integral_comp_inv_smul, FiniteDimensional.finrank_self, pow_one]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\ng : ℝ → F\na : ℝ\n⊢ ∫ (x : ℝ), g (x * a) = |a⁻¹| • ∫ (y : ℝ), g y\n[PROOFSTEP]\nsimpa only [mul_comm] using integral_comp_mul_left g a\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\ng : ℝ → F\na : ℝ\n⊢ ∫ (x : ℝ), g (x * a⁻¹) = |a| • ∫ (y : ℝ), g y\n[PROOFSTEP]\nsimpa only [mul_comm] using integral_comp_inv_mul_left g a\n[GOAL]\nF : Type u_1\ninst✝⁶ : NormedAddCommGroup F\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nf : E → F\nR : ℝ\nhR : R ≠ 0\n⊢ (Integrable fun x => f (R • x)) ↔ Integrable f\n[PROOFSTEP]\nsuffices ∀ {g : E → F} (hg : Integrable g μ) {S : ℝ} (hS : S ≠ 0), Integrable (fun x => g (S • x)) μ\n  by\n  refine' ⟨fun hf => _, fun hf => this hf hR⟩\n  convert this hf (inv_ne_zero hR)\n  rw [← mul_smul, mul_inv_cancel hR, one_smul]\n    -- now prove\n[GOAL]\nF : Type u_1\ninst✝⁶ : NormedAddCommGroup F\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nf : E → F\nR : ℝ\nhR : R ≠ 0\nthis : ∀ {g : E → F}, Integrable g → ∀ {S : ℝ}, S ≠ 0 → Integrable fun x => g (S • x)\n⊢ (Integrable fun x => f (R • x)) ↔ Integrable f\n[PROOFSTEP]\nrefine' ⟨fun hf => _, fun hf => this hf hR⟩\n[GOAL]\nF : Type u_1\ninst✝⁶ : NormedAddCommGroup F\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nf : E → F\nR : ℝ\nhR : R ≠ 0\nthis : ∀ {g : E → F}, Integrable g → ∀ {S : ℝ}, S ≠ 0 → Integrable fun x => g (S • x)\nhf : Integrable fun x => f (R • x)\n⊢ Integrable f\n[PROOFSTEP]\nconvert this hf (inv_ne_zero hR)\n[GOAL]\ncase h.e'_5.h.h.e'_1\nF : Type u_1\ninst✝⁶ : NormedAddCommGroup F\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nf : E → F\nR : ℝ\nhR : R ≠ 0\nthis : ∀ {g : E → F}, Integrable g → ∀ {S : ℝ}, S ≠ 0 → Integrable fun x => g (S • x)\nhf : Integrable fun x => f (R • x)\nx✝ : E\n⊢ x✝ = R • R⁻¹ • x✝\n[PROOFSTEP]\nrw [← mul_smul, mul_inv_cancel hR, one_smul]\n  -- now prove\n[GOAL]\nF : Type u_1\ninst✝⁶ : NormedAddCommGroup F\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nf : E → F\nR : ℝ\nhR : R ≠ 0\n⊢ ∀ {g : E → F}, Integrable g → ∀ {S : ℝ}, S ≠ 0 → Integrable fun x => g (S • x)\n[PROOFSTEP]\nintro g hg S hS\n[GOAL]\nF : Type u_1\ninst✝⁶ : NormedAddCommGroup F\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nf : E → F\nR : ℝ\nhR : R ≠ 0\ng : E → F\nhg : Integrable g\nS : ℝ\nhS : S ≠ 0\n⊢ Integrable fun x => g (S • x)\n[PROOFSTEP]\nlet t := ((Homeomorph.smul (isUnit_iff_ne_zero.2 hS).unit).toMeasurableEquiv : E ≃ᵐ E)\n[GOAL]\nF : Type u_1\ninst✝⁶ : NormedAddCommGroup F\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nf : E → F\nR : ℝ\nhR : R ≠ 0\ng : E → F\nhg : Integrable g\nS : ℝ\nhS : S ≠ 0\nt : E ≃ᵐ E := Homeomorph.toMeasurableEquiv (Homeomorph.smul (IsUnit.unit (_ : IsUnit S)))\n⊢ Integrable fun x => g (S • x)\n[PROOFSTEP]\nrefine' (integrable_map_equiv t g).mp (_ : Integrable g (map (S • ·) μ))\n[GOAL]\nF : Type u_1\ninst✝⁶ : NormedAddCommGroup F\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nf : E → F\nR : ℝ\nhR : R ≠ 0\ng : E → F\nhg : Integrable g\nS : ℝ\nhS : S ≠ 0\nt : E ≃ᵐ E := Homeomorph.toMeasurableEquiv (Homeomorph.smul (IsUnit.unit (_ : IsUnit S)))\n⊢ Integrable g\n[PROOFSTEP]\nrwa [map_addHaar_smul μ hS, integrable_smul_measure _ ENNReal.ofReal_ne_top]\n[GOAL]\nF : Type u_1\ninst✝⁶ : NormedAddCommGroup F\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nf : E → F\nR : ℝ\nhR : R ≠ 0\ng : E → F\nhg : Integrable g\nS : ℝ\nhS : S ≠ 0\nt : E ≃ᵐ E := Homeomorph.toMeasurableEquiv (Homeomorph.smul (IsUnit.unit (_ : IsUnit S)))\n⊢ ENNReal.ofReal |(S ^ finrank ℝ E)⁻¹| ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, ENNReal.ofReal_eq_zero, not_le, abs_pos] using inv_ne_zero (pow_ne_zero _ hS)\n[GOAL]\nF : Type u_1\ninst✝ : NormedAddCommGroup F\ng : ℝ → F\nR : ℝ\nhR : R ≠ 0\n⊢ (Integrable fun x => g (R * x)) ↔ Integrable g\n[PROOFSTEP]\nsimpa only [smul_eq_mul] using integrable_comp_smul_iff volume g hR\n[GOAL]\nF : Type u_1\ninst✝ : NormedAddCommGroup F\ng : ℝ → F\nR : ℝ\nhR : R ≠ 0\n⊢ (Integrable fun x => g (x * R)) ↔ Integrable g\n[PROOFSTEP]\nsimpa only [mul_comm] using integrable_comp_mul_left_iff g hR\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.Haar.NormedSpace", "llama_tokens": 8075, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.689305616785446, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.38751141968536884}}
{"text": "[GOAL]\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\n⊢ fst f g ≫ f = snd f g ≫ g\n[PROOFSTEP]\next ⟨_, h⟩\n[GOAL]\ncase w.mk\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\nval✝ : ↑X.toTop × ↑Y.toTop\nh : val✝ ∈ {xy | ↑f xy.fst = ↑g xy.snd}\n⊢ ↑(fst f g ≫ f) { val := val✝, property := h } = ↑(snd f g ≫ g) { val := val✝, property := h }\n[PROOFSTEP]\nexact h\n[GOAL]\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\nZ : CompHaus\na : Z ⟶ X\nb : Z ⟶ Y\nw : a ≫ f = b ≫ g\nz : ↑Z.toTop\n⊢ (↑a z, ↑b z) ∈ {xy | ↑f xy.fst = ↑g xy.snd}\n[PROOFSTEP]\napply_fun (fun q => q z) at w \n[GOAL]\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\nZ : CompHaus\na : Z ⟶ X\nb : Z ⟶ Y\nz : ↑Z.toTop\nw : ↑(a ≫ f) z = ↑(b ≫ g) z\n⊢ (↑a z, ↑b z) ∈ {xy | ↑f xy.fst = ↑g xy.snd}\n[PROOFSTEP]\nexact w\n[GOAL]\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\nZ : CompHaus\na : Z ⟶ X\nb : Z ⟶ Y\nw : a ≫ f = b ≫ g\n⊢ Continuous fun z => { val := (↑a z, ↑b z), property := (_ : ↑(a ≫ f) z = ↑(b ≫ g) z) }\n[PROOFSTEP]\napply Continuous.subtype_mk\n[GOAL]\ncase h\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\nZ : CompHaus\na : Z ⟶ X\nb : Z ⟶ Y\nw : a ≫ f = b ≫ g\n⊢ Continuous fun x => (↑a x, ↑b x)\n[PROOFSTEP]\nrw [continuous_prod_mk]\n[GOAL]\ncase h\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\nZ : CompHaus\na : Z ⟶ X\nb : Z ⟶ Y\nw : a ≫ f = b ≫ g\n⊢ (Continuous fun x => ↑a x) ∧ Continuous fun x => ↑b x\n[PROOFSTEP]\nexact ⟨a.continuous, b.continuous⟩\n[GOAL]\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\nZ : CompHaus\na b : Z ⟶ pullback f g\nhfst : a ≫ fst f g = b ≫ fst f g\nhsnd : a ≫ snd f g = b ≫ snd f g\n⊢ a = b\n[PROOFSTEP]\next z\n[GOAL]\ncase w\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\nZ : CompHaus\na b : Z ⟶ pullback f g\nhfst : a ≫ fst f g = b ≫ fst f g\nhsnd : a ≫ snd f g = b ≫ snd f g\nz : (forget CompHaus).obj Z\n⊢ ↑a z = ↑b z\n[PROOFSTEP]\napply_fun (fun q => q z) at hfst hsnd \n[GOAL]\ncase w\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\nZ : CompHaus\na b : Z ⟶ pullback f g\nz : (forget CompHaus).obj Z\nhfst : ↑(a ≫ fst f g) z = ↑(b ≫ fst f g) z\nhsnd : ↑(a ≫ snd f g) z = ↑(b ≫ snd f g) z\n⊢ ↑a z = ↑b z\n[PROOFSTEP]\napply Subtype.ext\n[GOAL]\ncase w.a\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\nZ : CompHaus\na b : Z ⟶ pullback f g\nz : (forget CompHaus).obj Z\nhfst : ↑(a ≫ fst f g) z = ↑(b ≫ fst f g) z\nhsnd : ↑(a ≫ snd f g) z = ↑(b ≫ snd f g) z\n⊢ ↑(↑a z) = ↑(↑b z)\n[PROOFSTEP]\napply Prod.ext\n[GOAL]\ncase w.a.h₁\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\nZ : CompHaus\na b : Z ⟶ pullback f g\nz : (forget CompHaus).obj Z\nhfst : ↑(a ≫ fst f g) z = ↑(b ≫ fst f g) z\nhsnd : ↑(a ≫ snd f g) z = ↑(b ≫ snd f g) z\n⊢ (↑(↑a z)).fst = (↑(↑b z)).fst\n[PROOFSTEP]\nexact hfst\n[GOAL]\ncase w.a.h₂\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\nZ : CompHaus\na b : Z ⟶ pullback f g\nz : (forget CompHaus).obj Z\nhfst : ↑(a ≫ fst f g) z = ↑(b ≫ fst f g) z\nhsnd : ↑(a ≫ snd f g) z = ↑(b ≫ snd f g) z\n⊢ (↑(↑a z)).snd = (↑(↑b z)).snd\n[PROOFSTEP]\nexact hsnd\n[GOAL]\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\n⊢ pullback.fst f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.fst\n[PROOFSTEP]\ndsimp [pullbackIsoPullback]\n[GOAL]\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\n⊢ pullback.fst f g =\n    (Limits.IsLimit.conePointUniqueUpToIso (pullback.isLimit f g) (Limits.limit.isLimit (Limits.cospan f g))).hom ≫\n      Limits.pullback.fst\n[PROOFSTEP]\nsimp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_π]\n[GOAL]\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\n⊢ pullback.snd f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.snd\n[PROOFSTEP]\ndsimp [pullbackIsoPullback]\n[GOAL]\nX Y B : CompHaus\nf : X ⟶ B\ng : Y ⟶ B\n⊢ pullback.snd f g =\n    (Limits.IsLimit.conePointUniqueUpToIso (pullback.isLimit f g) (Limits.limit.isLimit (Limits.cospan f g))).hom ≫\n      Limits.pullback.snd\n[PROOFSTEP]\nsimp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_π]\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\nB : CompHaus\ne : (a : α) → X a ⟶ B\n⊢ Continuous fun x =>\n    match x with\n    | { fst := a, snd := x } => ↑(e a) x\n[PROOFSTEP]\napply continuous_sigma\n[GOAL]\ncase hf\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\nB : CompHaus\ne : (a : α) → X a ⟶ B\n⊢ ∀ (i : α),\n    Continuous fun a =>\n      match { fst := i, snd := a } with\n      | { fst := a, snd := x } => ↑(e a) x\n[PROOFSTEP]\nintro a\n[GOAL]\ncase hf\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\nB : CompHaus\ne : (a : α) → X a ⟶ B\na : α\n⊢ Continuous fun a_1 =>\n    match { fst := a, snd := a_1 } with\n    | { fst := a, snd := x } => ↑(e a) x\n[PROOFSTEP]\nexact (e a).continuous\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\nB : CompHaus\nf g : finiteCoproduct X ⟶ B\nh : ∀ (a : α), ι X a ≫ f = ι X a ≫ g\n⊢ f = g\n[PROOFSTEP]\next ⟨a, x⟩\n[GOAL]\ncase w.mk\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\nB : CompHaus\nf g : finiteCoproduct X ⟶ B\nh : ∀ (a : α), ι X a ≫ f = ι X a ≫ g\na : α\nx : ↑(X a).toTop\n⊢ ↑f { fst := a, snd := x } = ↑g { fst := a, snd := x }\n[PROOFSTEP]\nspecialize h a\n[GOAL]\ncase w.mk\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\nB : CompHaus\nf g : finiteCoproduct X ⟶ B\na : α\nx : ↑(X a).toTop\nh : ι X a ≫ f = ι X a ≫ g\n⊢ ↑f { fst := a, snd := x } = ↑g { fst := a, snd := x }\n[PROOFSTEP]\napply_fun (fun q => q x) at h \n[GOAL]\ncase w.mk\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\nB : CompHaus\nf g : finiteCoproduct X ⟶ B\na : α\nx : ↑(X a).toTop\nh : ↑(ι X a ≫ f) x = ↑(ι X a ≫ g) x\n⊢ ↑f { fst := a, snd := x } = ↑g { fst := a, snd := x }\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\ns : Limits.Cocone (Discrete.functor X)\nm : (cocone X).pt ⟶ s.pt\nhm : ∀ (j : Discrete α), NatTrans.app (cocone X).ι j ≫ m = NatTrans.app s.ι j\na : α\n⊢ ι (fun a => X a) a ≫ m = ι (fun a => X a) a ≫ (fun s => desc (fun a => X a) fun a => NatTrans.app s.ι { as := a }) s\n[PROOFSTEP]\nspecialize hm ⟨a⟩\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\ns : Limits.Cocone (Discrete.functor X)\nm : (cocone X).pt ⟶ s.pt\na : α\nhm : NatTrans.app (cocone X).ι { as := a } ≫ m = NatTrans.app s.ι { as := a }\n⊢ ι (fun a => X a) a ≫ m = ι (fun a => X a) a ≫ (fun s => desc (fun a => X a) fun a => NatTrans.app s.ι { as := a }) s\n[PROOFSTEP]\next t\n[GOAL]\ncase w\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\ns : Limits.Cocone (Discrete.functor X)\nm : (cocone X).pt ⟶ s.pt\na : α\nhm : NatTrans.app (cocone X).ι { as := a } ≫ m = NatTrans.app s.ι { as := a }\nt : (forget CompHaus).obj (X a)\n⊢ ↑(ι (fun a => X a) a ≫ m) t =\n    ↑(ι (fun a => X a) a ≫ (fun s => desc (fun a => X a) fun a => NatTrans.app s.ι { as := a }) s) t\n[PROOFSTEP]\napply_fun (fun q => q t) at hm \n[GOAL]\ncase w\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\ns : Limits.Cocone (Discrete.functor X)\nm : (cocone X).pt ⟶ s.pt\na : α\nt : (forget CompHaus).obj (X a)\nhm : ↑(NatTrans.app (cocone X).ι { as := a } ≫ m) t = ↑(NatTrans.app s.ι { as := a }) t\n⊢ ↑(ι (fun a => X a) a ≫ m) t =\n    ↑(ι (fun a => X a) a ≫ (fun s => desc (fun a => X a) fun a => NatTrans.app s.ι { as := a }) s) t\n[PROOFSTEP]\nexact hm\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\na : α\n⊢ Limits.Sigma.ι X a ≫ (coproductIsoCoproduct X).inv = finiteCoproduct.ι X a\n[PROOFSTEP]\ndsimp [coproductIsoCoproduct]\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\na : α\n⊢ Limits.Sigma.ι X a ≫\n      (Limits.IsColimit.coconePointUniqueUpToIso (finiteCoproduct.isColimit X)\n          (Limits.colimit.isColimit (Discrete.functor X))).inv =\n    finiteCoproduct.ι X a\n[PROOFSTEP]\nsimp only [Limits.colimit.comp_coconePointUniqueUpToIso_inv, finiteCoproduct.cocone_pt, finiteCoproduct.cocone_ι,\n  Discrete.natTrans_app]\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\na : α\n⊢ Function.Injective ↑(ι X a)\n[PROOFSTEP]\nintro x y hxy\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\na : α\nx y : (forget CompHaus).obj (X a)\nhxy : ↑(ι X a) x = ↑(ι X a) y\n⊢ x = y\n[PROOFSTEP]\nexact eq_of_heq (Sigma.ext_iff.mp hxy).2\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\nB : CompHaus\nπ : (a : α) → X a ⟶ B\na : α\n⊢ ∀ (x : (forget CompHaus).obj (X a)), ↑(desc X π) (↑(ι X a) x) = ↑(π a) x\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\nB : CompHaus\nπ : (a : α) → X a ⟶ B\na : α\nx : (forget CompHaus).obj (X a)\n⊢ ↑(desc X π) (↑(ι X a) x) = ↑(π a) x\n[PROOFSTEP]\nchange (ι X a ≫ desc X π) _ = _\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → CompHaus\nB : CompHaus\nπ : (a : α) → X a ⟶ B\na : α\nx : (forget CompHaus).obj (X a)\n⊢ ↑(ι X a ≫ desc X π) x = ↑(π a) x\n[PROOFSTEP]\nsimp only [ι_desc]\n  -- `elementwise` should work here, but doesn't\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.CompHaus.Limits", "llama_tokens": 4380, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.5851011542032313, "lm_q1q2_score": 0.38729183865335376}}
{"text": "[GOAL]\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\n⊢ charpoly (M ^ Fintype.card K) = charpoly M\n[PROOFSTEP]\ncases (isEmpty_or_nonempty n).symm\n[GOAL]\ncase inl\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\n⊢ charpoly (M ^ Fintype.card K) = charpoly M\n[PROOFSTEP]\ncases' CharP.exists K with p hp\n[GOAL]\ncase inl.intro\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp : CharP K p\n⊢ charpoly (M ^ Fintype.card K) = charpoly M\n[PROOFSTEP]\nletI := hp\n[GOAL]\ncase inl.intro\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp : CharP K p\nthis : CharP K p := hp\n⊢ charpoly (M ^ Fintype.card K) = charpoly M\n[PROOFSTEP]\nrcases FiniteField.card K p with ⟨⟨k, kpos⟩, ⟨hp, hk⟩⟩\n[GOAL]\ncase inl.intro.intro.mk.intro\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ ↑{ val := k, property := kpos }\n⊢ charpoly (M ^ Fintype.card K) = charpoly M\n[PROOFSTEP]\nhaveI : Fact p.Prime := ⟨hp⟩\n[GOAL]\ncase inl.intro.intro.mk.intro\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ ↑{ val := k, property := kpos }\nthis : Fact (Nat.Prime p)\n⊢ charpoly (M ^ Fintype.card K) = charpoly M\n[PROOFSTEP]\ndsimp at hk \n[GOAL]\ncase inl.intro.intro.mk.intro\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ charpoly (M ^ Fintype.card K) = charpoly M\n[PROOFSTEP]\nrw [hk]\n[GOAL]\ncase inl.intro.intro.mk.intro\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ charpoly (M ^ p ^ k) = charpoly M\n[PROOFSTEP]\napply (frobenius_inj K[X] p).iterate k\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ (↑(frobenius K[X] p))^[k] (charpoly (M ^ p ^ k)) = (↑(frobenius K[X] p))^[k] (charpoly M)\n[PROOFSTEP]\nrepeat' rw [iterate_frobenius (R := K[X])]; rw [← hk]\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ (↑(frobenius K[X] p))^[k] (charpoly (M ^ p ^ k)) = (↑(frobenius K[X] p))^[k] (charpoly M)\n[PROOFSTEP]\nrw [iterate_frobenius (R := K[X])]\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ charpoly (M ^ p ^ k) ^ p ^ k = (↑(frobenius K[X] p))^[k] (charpoly M)\n[PROOFSTEP]\nrw [← hk]\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ charpoly (M ^ Fintype.card K) ^ Fintype.card K = (↑(frobenius K[X] p))^[k] (charpoly M)\n[PROOFSTEP]\nrw [iterate_frobenius (R := K[X])]\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ charpoly (M ^ Fintype.card K) ^ Fintype.card K = charpoly M ^ p ^ k\n[PROOFSTEP]\nrw [← hk]\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ charpoly (M ^ Fintype.card K) ^ Fintype.card K = charpoly M ^ Fintype.card K\n[PROOFSTEP]\nrw [iterate_frobenius (R := K[X])]\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ charpoly (M ^ Fintype.card K) ^ Fintype.card K = charpoly M ^ Fintype.card K\n[PROOFSTEP]\nrw [← FiniteField.expand_card]\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ ↑(expand K (Fintype.card K)) (charpoly (M ^ Fintype.card K)) = charpoly M ^ Fintype.card K\n[PROOFSTEP]\nunfold charpoly\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ ↑(expand K (Fintype.card K)) (det (charmatrix (M ^ Fintype.card K))) = det (charmatrix M) ^ Fintype.card K\n[PROOFSTEP]\nrw [AlgHom.map_det, ← coe_detMonoidHom, ← (detMonoidHom : Matrix n n K[X] →* K[X]).map_pow]\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ ↑detMonoidHom (↑(AlgHom.mapMatrix (expand K (Fintype.card K))) (charmatrix (M ^ Fintype.card K))) =\n    ↑detMonoidHom (charmatrix M ^ Fintype.card K)\n[PROOFSTEP]\napply congr_arg det\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ ↑(AlgHom.mapMatrix (expand K (Fintype.card K))) (charmatrix (M ^ Fintype.card K)) = charmatrix M ^ Fintype.card K\n[PROOFSTEP]\nrefine' matPolyEquiv.injective _\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ ↑matPolyEquiv (↑(AlgHom.mapMatrix (expand K (Fintype.card K))) (charmatrix (M ^ Fintype.card K))) =\n    ↑matPolyEquiv (charmatrix M ^ Fintype.card K)\n[PROOFSTEP]\nrw [AlgEquiv.map_pow, matPolyEquiv_charmatrix, hk, sub_pow_char_pow_of_commute, ← C_pow]\n[GOAL]\ncase inl.intro.intro.mk.intro.a\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ ↑matPolyEquiv (↑(AlgHom.mapMatrix (expand K (p ^ k))) (charmatrix (M ^ p ^ k))) = X ^ p ^ k - ↑C (M ^ p ^ k)\n[PROOFSTEP]\nexact (id (matPolyEquiv_eq_x_pow_sub_c (p ^ k) M) : _)\n[GOAL]\ncase inl.intro.intro.mk.intro.a.h\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\np : ℕ\nhp✝ : CharP K p\nthis✝ : CharP K p := hp✝\nk : ℕ\nkpos : 0 < k\nhp : Nat.Prime p\nhk : Fintype.card K = p ^ k\nthis : Fact (Nat.Prime p)\n⊢ Commute X (↑C M)\n[PROOFSTEP]\nexact (C M).commute_X\n[GOAL]\ncase inr\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : IsEmpty n\n⊢ charpoly (M ^ Fintype.card K) = charpoly M\n[PROOFSTEP]\nexact congr_arg _ (Subsingleton.elim _ _)\n[GOAL]\nn : Type u_1\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nM : Matrix n n (ZMod p)\n⊢ charpoly (M ^ p) = charpoly M\n[PROOFSTEP]\nhave h := FiniteField.Matrix.charpoly_pow_card M\n[GOAL]\nn : Type u_1\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nM : Matrix n n (ZMod p)\nh : charpoly (M ^ Fintype.card (ZMod p)) = charpoly M\n⊢ charpoly (M ^ p) = charpoly M\n[PROOFSTEP]\nrwa [ZMod.card] at h \n[GOAL]\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\n⊢ trace (M ^ Fintype.card K) = trace M ^ Fintype.card K\n[PROOFSTEP]\ncases isEmpty_or_nonempty n\n[GOAL]\ncase inl\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : IsEmpty n\n⊢ trace (M ^ Fintype.card K) = trace M ^ Fintype.card K\n[PROOFSTEP]\nsimp [Matrix.trace]\n[GOAL]\ncase inl\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : IsEmpty n\n⊢ 0 = 0 ^ Fintype.card K\n[PROOFSTEP]\nrw [zero_pow Fintype.card_pos]\n[GOAL]\ncase inr\nn : Type u_1\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Fintype K\nM : Matrix n n K\nh✝ : Nonempty n\n⊢ trace (M ^ Fintype.card K) = trace M ^ Fintype.card K\n[PROOFSTEP]\nrw [Matrix.trace_eq_neg_charpoly_coeff, Matrix.trace_eq_neg_charpoly_coeff, FiniteField.Matrix.charpoly_pow_card,\n  FiniteField.pow_card]\n[GOAL]\nn : Type u_1\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nM : Matrix n n (ZMod p)\n⊢ trace (M ^ p) = trace M ^ p\n[PROOFSTEP]\nhave h := FiniteField.trace_pow_card M\n[GOAL]\nn : Type u_1\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nM : Matrix n n (ZMod p)\nh : trace (M ^ Fintype.card (ZMod p)) = trace M ^ Fintype.card (ZMod p)\n⊢ trace (M ^ p) = trace M ^ p\n[PROOFSTEP]\nrwa [ZMod.card] at h \n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Charpoly.FiniteField", "llama_tokens": 5748, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228625116081, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.3872918308490486}}
{"text": "[GOAL]\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE : Type w\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R 𝕜\np : 𝕜[X]\nq : R[X]\nx : 𝕜\n⊢ HasStrictDerivAt (fun x => eval x p) (eval x (↑derivative p)) x\n[PROOFSTEP]\ninduction p using Polynomial.induction_on'\n[GOAL]\ncase h_add\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE : Type w\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R 𝕜\np : 𝕜[X]\nq : R[X]\nx : 𝕜\np✝ q✝ : 𝕜[X]\na✝¹ : HasStrictDerivAt (fun x => eval x p✝) (eval x (↑derivative p✝)) x\na✝ : HasStrictDerivAt (fun x => eval x q✝) (eval x (↑derivative q✝)) x\n⊢ HasStrictDerivAt (fun x => eval x (p✝ + q✝)) (eval x (↑derivative (p✝ + q✝))) x\ncase h_monomial\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE : Type w\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R 𝕜\np : 𝕜[X]\nq : R[X]\nx : 𝕜\nn✝ : ℕ\na✝ : 𝕜\n⊢ HasStrictDerivAt (fun x => eval x (↑(monomial n✝) a✝)) (eval x (↑derivative (↑(monomial n✝) a✝))) x\n[PROOFSTEP]\ncase h_add p q hp hq => simpa using hp.add hq\n[GOAL]\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE : Type w\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R 𝕜\np✝ : 𝕜[X]\nq✝ : R[X]\nx : 𝕜\np q : 𝕜[X]\nhp : HasStrictDerivAt (fun x => eval x p) (eval x (↑derivative p)) x\nhq : HasStrictDerivAt (fun x => eval x q) (eval x (↑derivative q)) x\n⊢ HasStrictDerivAt (fun x => eval x (p + q)) (eval x (↑derivative (p + q))) x\n[PROOFSTEP]\ncase h_add p q hp hq => simpa using hp.add hq\n[GOAL]\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE : Type w\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R 𝕜\np✝ : 𝕜[X]\nq✝ : R[X]\nx : 𝕜\np q : 𝕜[X]\nhp : HasStrictDerivAt (fun x => eval x p) (eval x (↑derivative p)) x\nhq : HasStrictDerivAt (fun x => eval x q) (eval x (↑derivative q)) x\n⊢ HasStrictDerivAt (fun x => eval x (p + q)) (eval x (↑derivative (p + q))) x\n[PROOFSTEP]\nsimpa using hp.add hq\n[GOAL]\ncase h_monomial\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE : Type w\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R 𝕜\np : 𝕜[X]\nq : R[X]\nx : 𝕜\nn✝ : ℕ\na✝ : 𝕜\n⊢ HasStrictDerivAt (fun x => eval x (↑(monomial n✝) a✝)) (eval x (↑derivative (↑(monomial n✝) a✝))) x\n[PROOFSTEP]\ncase h_monomial n a => simpa [mul_assoc] using (hasStrictDerivAt_pow n x).const_mul a\n[GOAL]\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE : Type w\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R 𝕜\np : 𝕜[X]\nq : R[X]\nx : 𝕜\nn : ℕ\na : 𝕜\n⊢ HasStrictDerivAt (fun x => eval x (↑(monomial n) a)) (eval x (↑derivative (↑(monomial n) a))) x\n[PROOFSTEP]\ncase h_monomial n a => simpa [mul_assoc] using (hasStrictDerivAt_pow n x).const_mul a\n[GOAL]\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE : Type w\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R 𝕜\np : 𝕜[X]\nq : R[X]\nx : 𝕜\nn : ℕ\na : 𝕜\n⊢ HasStrictDerivAt (fun x => eval x (↑(monomial n) a)) (eval x (↑derivative (↑(monomial n) a))) x\n[PROOFSTEP]\nsimpa [mul_assoc] using (hasStrictDerivAt_pow n x).const_mul a\n[GOAL]\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE : Type w\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R 𝕜\np : 𝕜[X]\nq : R[X]\nx : 𝕜\n⊢ HasStrictDerivAt (fun x => ↑(aeval x) q) (↑(aeval x) (↑derivative q)) x\n[PROOFSTEP]\nsimpa only [aeval_def, eval₂_eq_eval_map, derivative_map] using (q.map (algebraMap R 𝕜)).hasStrictDerivAt x\n[GOAL]\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE : Type w\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R 𝕜\np : 𝕜[X]\nq : R[X]\nhxs : UniqueDiffWithinAt 𝕜 s x\n⊢ derivWithin (fun x => eval x p) s x = eval x (↑derivative p)\n[PROOFSTEP]\nrw [DifferentiableAt.derivWithin p.differentiableAt hxs]\n[GOAL]\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE : Type w\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R 𝕜\np : 𝕜[X]\nq : R[X]\nhxs : UniqueDiffWithinAt 𝕜 s x\n⊢ deriv (fun x => eval x p) x = eval x (↑derivative p)\n[PROOFSTEP]\nexact p.deriv\n[GOAL]\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE : Type w\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R 𝕜\np : 𝕜[X]\nq : R[X]\nhxs : UniqueDiffWithinAt 𝕜 s x\n⊢ derivWithin (fun x => ↑(aeval x) q) s x = ↑(aeval x) (↑derivative q)\n[PROOFSTEP]\nsimpa only [aeval_def, eval₂_eq_eval_map, derivative_map] using (q.map (algebraMap R 𝕜)).derivWithin hxs\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.Deriv.Polynomial", "llama_tokens": 3362, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7745833945721305, "lm_q2_score": 0.5, "lm_q1q2_score": 0.3872916972860653}}
{"text": "[GOAL]\nB : Type u\n⊢ [inst : Inhabited B] → Inhabited (FreeBicategory B)\n[PROOFSTEP]\nintro h\n[GOAL]\nB : Type u\nh : Inhabited B\n⊢ Inhabited (FreeBicategory B)\n[PROOFSTEP]\nexact id h\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b : FreeBicategory B\n⊢ ∀ {X Y : a ⟶ b} (f : X ⟶ Y), 𝟙 X ≫ f = f\n[PROOFSTEP]\nrintro f g ⟨η⟩\n[GOAL]\ncase mk\nB : Type u\ninst✝ : Quiver B\na b : FreeBicategory B\nf g : a ⟶ b\nf✝ : f ⟶ g\nη : Hom₂ f g\n⊢ 𝟙 f ≫ Quot.mk Rel η = Quot.mk Rel η\n[PROOFSTEP]\nexact Quot.sound (Rel.id_comp η)\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b : FreeBicategory B\n⊢ ∀ {X Y : a ⟶ b} (f : X ⟶ Y), f ≫ 𝟙 Y = f\n[PROOFSTEP]\nrintro f g ⟨η⟩\n[GOAL]\ncase mk\nB : Type u\ninst✝ : Quiver B\na b : FreeBicategory B\nf g : a ⟶ b\nf✝ : f ⟶ g\nη : Hom₂ f g\n⊢ Quot.mk Rel η ≫ 𝟙 g = Quot.mk Rel η\n[PROOFSTEP]\nexact Quot.sound (Rel.comp_id η)\n[GOAL]\nB : Type u\ninst✝ : Quiver B\na b : FreeBicategory B\n⊢ ∀ {W X Y Z : a ⟶ b} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z), (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nrintro f g h i ⟨η⟩ ⟨θ⟩ ⟨ι⟩\n[GOAL]\ncase mk.mk.mk\nB : Type u\ninst✝ : Quiver B\na b : FreeBicategory B\nf g h i : a ⟶ b\nf✝ : f ⟶ g\nη : Hom₂ f g\ng✝ : g ⟶ h\nθ : Hom₂ g h\nh✝ : h ⟶ i\nι : Hom₂ h i\n⊢ (Quot.mk Rel η ≫ Quot.mk Rel θ) ≫ Quot.mk Rel ι = Quot.mk Rel η ≫ Quot.mk Rel θ ≫ Quot.mk Rel ι\n[PROOFSTEP]\nexact Quot.sound (Rel.assoc η θ ι)\n[GOAL]\nB : Type u\ninst✝ : Quiver B\n⊢ ∀ {a b c : FreeBicategory B} (f : a ⟶ b) {g h i : b ⟶ c} (η : g ⟶ h) (θ : h ⟶ i),\n    (fun a b c f g h η =>\n          Quot.map (Hom₂.whisker_left f)\n            (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n        a b c f g i (η ≫ θ) =\n      (fun a b c f g h η =>\n            Quot.map (Hom₂.whisker_left f)\n              (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n          a b c f g h η ≫\n        (fun a b c f g h η =>\n            Quot.map (Hom₂.whisker_left f)\n              (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n          a b c f h i θ\n[PROOFSTEP]\nrintro a b c f g h i ⟨η⟩ ⟨θ⟩\n[GOAL]\ncase mk.mk\nB : Type u\ninst✝ : Quiver B\na b c : FreeBicategory B\nf : a ⟶ b\ng h i : b ⟶ c\nη✝ : g ⟶ h\nη : Hom₂ g h\nθ✝ : h ⟶ i\nθ : Hom₂ h i\n⊢ (fun a b c f g h η =>\n        Quot.map (Hom₂.whisker_left f)\n          (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n      a b c f g i (Quot.mk Rel η ≫ Quot.mk Rel θ) =\n    (fun a b c f g h η =>\n          Quot.map (Hom₂.whisker_left f)\n            (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n        a b c f g h (Quot.mk Rel η) ≫\n      (fun a b c f g h η =>\n          Quot.map (Hom₂.whisker_left f)\n            (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n        a b c f h i (Quot.mk Rel θ)\n[PROOFSTEP]\nexact Quot.sound (Rel.whisker_left_comp f η θ)\n[GOAL]\nB : Type u\ninst✝ : Quiver B\n⊢ ∀ {a b : FreeBicategory B} {f g : a ⟶ b} (η : f ⟶ g),\n    (fun a b c f g h η =>\n          Quot.map (Hom₂.whisker_left f)\n            (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n        a a b (𝟙 a) f g η =\n      ((fun a b f => Iso.mk (Quot.mk Rel (Hom₂.left_unitor f)) (Quot.mk Rel (Hom₂.left_unitor_inv f))) a b f).hom ≫\n        η ≫ ((fun a b f => Iso.mk (Quot.mk Rel (Hom₂.left_unitor f)) (Quot.mk Rel (Hom₂.left_unitor_inv f))) a b g).inv\n[PROOFSTEP]\nrintro a b f g ⟨η⟩\n[GOAL]\ncase mk\nB : Type u\ninst✝ : Quiver B\na b : FreeBicategory B\nf g : a ⟶ b\nη✝ : f ⟶ g\nη : Hom₂ f g\n⊢ (fun a b c f g h η =>\n        Quot.map (Hom₂.whisker_left f)\n          (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n      a a b (𝟙 a) f g (Quot.mk Rel η) =\n    ((fun a b f => Iso.mk (Quot.mk Rel (Hom₂.left_unitor f)) (Quot.mk Rel (Hom₂.left_unitor_inv f))) a b f).hom ≫\n      Quot.mk Rel η ≫\n        ((fun a b f => Iso.mk (Quot.mk Rel (Hom₂.left_unitor f)) (Quot.mk Rel (Hom₂.left_unitor_inv f))) a b g).inv\n[PROOFSTEP]\nexact Quot.sound (Rel.id_whisker_left η)\n[GOAL]\nB : Type u\ninst✝ : Quiver B\n⊢ ∀ {a b c d : FreeBicategory B} (f : a ⟶ b) (g : b ⟶ c) {h h' : c ⟶ d} (η : h ⟶ h'),\n    (fun a b c f g h η =>\n          Quot.map (Hom₂.whisker_left f)\n            (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n        a c d (f ≫ g) h h' η =\n      ((fun a b c d f g h => Iso.mk (Quot.mk Rel (Hom₂.associator f g h)) (Quot.mk Rel (Hom₂.associator_inv f g h))) a b\n            c d f g h).hom ≫\n        (fun a b c f g h η =>\n              Quot.map (Hom₂.whisker_left f)\n                (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n            a b d f (g ≫ h) (g ≫ h')\n            ((fun a b c f g h η =>\n                Quot.map (Hom₂.whisker_left f)\n                  (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n              b c d g h h' η) ≫\n          ((fun a b c d f g h => Iso.mk (Quot.mk Rel (Hom₂.associator f g h)) (Quot.mk Rel (Hom₂.associator_inv f g h)))\n              a b c d f g h').inv\n[PROOFSTEP]\nrintro a b c d f g h h' ⟨η⟩\n[GOAL]\ncase mk\nB : Type u\ninst✝ : Quiver B\na b c d : FreeBicategory B\nf : a ⟶ b\ng : b ⟶ c\nh h' : c ⟶ d\nη✝ : h ⟶ h'\nη : Hom₂ h h'\n⊢ (fun a b c f g h η =>\n        Quot.map (Hom₂.whisker_left f)\n          (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n      a c d (f ≫ g) h h' (Quot.mk Rel η) =\n    ((fun a b c d f g h => Iso.mk (Quot.mk Rel (Hom₂.associator f g h)) (Quot.mk Rel (Hom₂.associator_inv f g h))) a b c\n          d f g h).hom ≫\n      (fun a b c f g h η =>\n            Quot.map (Hom₂.whisker_left f)\n              (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n          a b d f (g ≫ h) (g ≫ h')\n          ((fun a b c f g h η =>\n              Quot.map (Hom₂.whisker_left f)\n                (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n            b c d g h h' (Quot.mk Rel η)) ≫\n        ((fun a b c d f g h => Iso.mk (Quot.mk Rel (Hom₂.associator f g h)) (Quot.mk Rel (Hom₂.associator_inv f g h))) a\n            b c d f g h').inv\n[PROOFSTEP]\nexact Quot.sound (Rel.comp_whisker_left f g η)\n[GOAL]\nB : Type u\ninst✝ : Quiver B\n⊢ ∀ {a b c : FreeBicategory B} {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h) (i : b ⟶ c),\n    (fun a b c f g η h =>\n          Quot.map (Hom₂.whisker_right h)\n            (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n        a b c f h (η ≫ θ) i =\n      (fun a b c f g η h =>\n            Quot.map (Hom₂.whisker_right h)\n              (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n          a b c f g η i ≫\n        (fun a b c f g η h =>\n            Quot.map (Hom₂.whisker_right h)\n              (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n          a b c g h θ i\n[PROOFSTEP]\nrintro a b c f g h ⟨η⟩ ⟨θ⟩ i\n[GOAL]\ncase mk.mk\nB : Type u\ninst✝ : Quiver B\na b c : FreeBicategory B\nf g h : a ⟶ b\nη✝ : f ⟶ g\nη : Hom₂ f g\nθ✝ : g ⟶ h\nθ : Hom₂ g h\ni : b ⟶ c\n⊢ (fun a b c f g η h =>\n        Quot.map (Hom₂.whisker_right h)\n          (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n      a b c f h (Quot.mk Rel η ≫ Quot.mk Rel θ) i =\n    (fun a b c f g η h =>\n          Quot.map (Hom₂.whisker_right h)\n            (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n        a b c f g (Quot.mk Rel η) i ≫\n      (fun a b c f g η h =>\n          Quot.map (Hom₂.whisker_right h)\n            (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n        a b c g h (Quot.mk Rel θ) i\n[PROOFSTEP]\nexact Quot.sound (Rel.comp_whisker_right i η θ)\n[GOAL]\nB : Type u\ninst✝ : Quiver B\n⊢ ∀ {a b : FreeBicategory B} {f g : a ⟶ b} (η : f ⟶ g),\n    (fun a b c f g η h =>\n          Quot.map (Hom₂.whisker_right h)\n            (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n        a b b f g η (𝟙 b) =\n      ((fun a b f => Iso.mk (Quot.mk Rel (Hom₂.right_unitor f)) (Quot.mk Rel (Hom₂.right_unitor_inv f))) a b f).hom ≫\n        η ≫\n          ((fun a b f => Iso.mk (Quot.mk Rel (Hom₂.right_unitor f)) (Quot.mk Rel (Hom₂.right_unitor_inv f))) a b g).inv\n[PROOFSTEP]\nrintro a b f g ⟨η⟩\n[GOAL]\ncase mk\nB : Type u\ninst✝ : Quiver B\na b : FreeBicategory B\nf g : a ⟶ b\nη✝ : f ⟶ g\nη : Hom₂ f g\n⊢ (fun a b c f g η h =>\n        Quot.map (Hom₂.whisker_right h)\n          (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n      a b b f g (Quot.mk Rel η) (𝟙 b) =\n    ((fun a b f => Iso.mk (Quot.mk Rel (Hom₂.right_unitor f)) (Quot.mk Rel (Hom₂.right_unitor_inv f))) a b f).hom ≫\n      Quot.mk Rel η ≫\n        ((fun a b f => Iso.mk (Quot.mk Rel (Hom₂.right_unitor f)) (Quot.mk Rel (Hom₂.right_unitor_inv f))) a b g).inv\n[PROOFSTEP]\nexact Quot.sound (Rel.whisker_right_id η)\n[GOAL]\nB : Type u\ninst✝ : Quiver B\n⊢ ∀ {a b c d : FreeBicategory B} {f f' : a ⟶ b} (η : f ⟶ f') (g : b ⟶ c) (h : c ⟶ d),\n    (fun a b c f g η h =>\n          Quot.map (Hom₂.whisker_right h)\n            (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n        a b d f f' η (g ≫ h) =\n      ((fun a b c d f g h => Iso.mk (Quot.mk Rel (Hom₂.associator f g h)) (Quot.mk Rel (Hom₂.associator_inv f g h))) a b\n            c d f g h).inv ≫\n        (fun a b c f g η h =>\n              Quot.map (Hom₂.whisker_right h)\n                (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n            a c d (f ≫ g) (f' ≫ g)\n            ((fun a b c f g η h =>\n                Quot.map (Hom₂.whisker_right h)\n                  (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n              a b c f f' η g)\n            h ≫\n          ((fun a b c d f g h => Iso.mk (Quot.mk Rel (Hom₂.associator f g h)) (Quot.mk Rel (Hom₂.associator_inv f g h)))\n              a b c d f' g h).hom\n[PROOFSTEP]\nrintro a b c d f f' ⟨η⟩ g h\n[GOAL]\ncase mk\nB : Type u\ninst✝ : Quiver B\na b c d : FreeBicategory B\nf f' : a ⟶ b\nη✝ : f ⟶ f'\nη : Hom₂ f f'\ng : b ⟶ c\nh : c ⟶ d\n⊢ (fun a b c f g η h =>\n        Quot.map (Hom₂.whisker_right h)\n          (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n      a b d f f' (Quot.mk Rel η) (g ≫ h) =\n    ((fun a b c d f g h => Iso.mk (Quot.mk Rel (Hom₂.associator f g h)) (Quot.mk Rel (Hom₂.associator_inv f g h))) a b c\n          d f g h).inv ≫\n      (fun a b c f g η h =>\n            Quot.map (Hom₂.whisker_right h)\n              (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n          a c d (f ≫ g) (f' ≫ g)\n          ((fun a b c f g η h =>\n              Quot.map (Hom₂.whisker_right h)\n                (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n            a b c f f' (Quot.mk Rel η) g)\n          h ≫\n        ((fun a b c d f g h => Iso.mk (Quot.mk Rel (Hom₂.associator f g h)) (Quot.mk Rel (Hom₂.associator_inv f g h))) a\n            b c d f' g h).hom\n[PROOFSTEP]\nexact Quot.sound (Rel.whisker_right_comp g h η)\n[GOAL]\nB : Type u\ninst✝ : Quiver B\n⊢ ∀ {a b c d : FreeBicategory B} (f : a ⟶ b) {g g' : b ⟶ c} (η : g ⟶ g') (h : c ⟶ d),\n    (fun a b c f g η h =>\n          Quot.map (Hom₂.whisker_right h)\n            (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n        a c d (f ≫ g) (f ≫ g')\n        ((fun a b c f g h η =>\n            Quot.map (Hom₂.whisker_left f)\n              (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n          a b c f g g' η)\n        h =\n      ((fun a b c d f g h => Iso.mk (Quot.mk Rel (Hom₂.associator f g h)) (Quot.mk Rel (Hom₂.associator_inv f g h))) a b\n            c d f g h).hom ≫\n        (fun a b c f g h η =>\n              Quot.map (Hom₂.whisker_left f)\n                (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n            a b d f (g ≫ h) (g' ≫ h)\n            ((fun a b c f g η h =>\n                Quot.map (Hom₂.whisker_right h)\n                  (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n              b c d g g' η h) ≫\n          ((fun a b c d f g h => Iso.mk (Quot.mk Rel (Hom₂.associator f g h)) (Quot.mk Rel (Hom₂.associator_inv f g h)))\n              a b c d f g' h).inv\n[PROOFSTEP]\nrintro a b c d f g g' ⟨η⟩ h\n[GOAL]\ncase mk\nB : Type u\ninst✝ : Quiver B\na b c d : FreeBicategory B\nf : a ⟶ b\ng g' : b ⟶ c\nη✝ : g ⟶ g'\nη : Hom₂ g g'\nh : c ⟶ d\n⊢ (fun a b c f g η h =>\n        Quot.map (Hom₂.whisker_right h)\n          (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n      a c d (f ≫ g) (f ≫ g')\n      ((fun a b c f g h η =>\n          Quot.map (Hom₂.whisker_left f)\n            (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n        a b c f g g' (Quot.mk Rel η))\n      h =\n    ((fun a b c d f g h => Iso.mk (Quot.mk Rel (Hom₂.associator f g h)) (Quot.mk Rel (Hom₂.associator_inv f g h))) a b c\n          d f g h).hom ≫\n      (fun a b c f g h η =>\n            Quot.map (Hom₂.whisker_left f)\n              (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n          a b d f (g ≫ h) (g' ≫ h)\n          ((fun a b c f g η h =>\n              Quot.map (Hom₂.whisker_right h)\n                (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n            b c d g g' (Quot.mk Rel η) h) ≫\n        ((fun a b c d f g h => Iso.mk (Quot.mk Rel (Hom₂.associator f g h)) (Quot.mk Rel (Hom₂.associator_inv f g h))) a\n            b c d f g' h).inv\n[PROOFSTEP]\nexact Quot.sound (Rel.whisker_assoc f η h)\n[GOAL]\nB : Type u\ninst✝ : Quiver B\n⊢ ∀ {a b c : FreeBicategory B} {f g : a ⟶ b} {h i : b ⟶ c} (η : f ⟶ g) (θ : h ⟶ i),\n    (fun a b c f g h η =>\n            Quot.map (Hom₂.whisker_left f)\n              (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n          a b c f h i θ ≫\n        (fun a b c f g η h =>\n            Quot.map (Hom₂.whisker_right h)\n              (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n          a b c f g η i =\n      (fun a b c f g η h =>\n            Quot.map (Hom₂.whisker_right h)\n              (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n          a b c f g η h ≫\n        (fun a b c f g h η =>\n            Quot.map (Hom₂.whisker_left f)\n              (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n          a b c g h i θ\n[PROOFSTEP]\nrintro a b c f g h i ⟨η⟩ ⟨θ⟩\n[GOAL]\ncase mk.mk\nB : Type u\ninst✝ : Quiver B\na b c : FreeBicategory B\nf g : a ⟶ b\nh i : b ⟶ c\nη✝ : f ⟶ g\nη : Hom₂ f g\nθ✝ : h ⟶ i\nθ : Hom₂ h i\n⊢ (fun a b c f g h η =>\n          Quot.map (Hom₂.whisker_left f)\n            (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n        a b c f h i (Quot.mk Rel θ) ≫\n      (fun a b c f g η h =>\n          Quot.map (Hom₂.whisker_right h)\n            (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n        a b c f g (Quot.mk Rel η) i =\n    (fun a b c f g η h =>\n          Quot.map (Hom₂.whisker_right h)\n            (_ : ∀ (η η' : Hom₂ f g), Rel η η' → Rel (Hom₂.whisker_right h η) (Hom₂.whisker_right h η')) η)\n        a b c f g (Quot.mk Rel η) h ≫\n      (fun a b c f g h η =>\n          Quot.map (Hom₂.whisker_left f)\n            (_ : ∀ (η η' : Hom₂ g h), Rel η η' → Rel (Hom₂.whisker_left f η) (Hom₂.whisker_left f η')) η)\n        a b c g h i (Quot.mk Rel θ)\n[PROOFSTEP]\nexact Quot.sound (Rel.whisker_exchange η θ)\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\nH : Rel η θ\n⊢ liftHom₂ F η = liftHom₂ F θ\n[PROOFSTEP]\ninduction H\n[GOAL]\ncase vcomp_right\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝¹ b✝ : B\nf✝ g✝ h✝ : Hom a✝¹ b✝\nη✝ : Hom₂ f✝ g✝\nθ₁✝ θ₂✝ : Hom₂ g✝ h✝\na✝ : Rel θ₁✝ θ₂✝\na_ih✝ : liftHom₂ F θ₁✝ = liftHom₂ F θ₂✝\n⊢ liftHom₂ F (Hom₂.vcomp η✝ θ₁✝) = liftHom₂ F (Hom₂.vcomp η✝ θ₂✝)\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase vcomp_right\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝¹ b✝ : B\nf✝ g✝ h✝ : Hom a✝¹ b✝\nη✝ : Hom₂ f✝ g✝\nθ₁✝ θ₂✝ : Hom₂ g✝ h✝\na✝ : Rel θ₁✝ θ₂✝\na_ih✝ : liftHom₂ F θ₁✝ = liftHom₂ F θ₂✝\n⊢ liftHom₂ F η✝ ≫ liftHom₂ F θ₁✝ = liftHom₂ F η✝ ≫ liftHom₂ F θ₂✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase vcomp_left\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝¹ b✝ : B\nf✝ g✝ h✝ : Hom a✝¹ b✝\nη₁✝ η₂✝ : Hom₂ f✝ g✝\nθ✝ : Hom₂ g✝ h✝\na✝ : Rel η₁✝ η₂✝\na_ih✝ : liftHom₂ F η₁✝ = liftHom₂ F η₂✝\n⊢ liftHom₂ F (Hom₂.vcomp η₁✝ θ✝) = liftHom₂ F (Hom₂.vcomp η₂✝ θ✝)\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase vcomp_left\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝¹ b✝ : B\nf✝ g✝ h✝ : Hom a✝¹ b✝\nη₁✝ η₂✝ : Hom₂ f✝ g✝\nθ✝ : Hom₂ g✝ h✝\na✝ : Rel η₁✝ η₂✝\na_ih✝ : liftHom₂ F η₁✝ = liftHom₂ F η₂✝\n⊢ liftHom₂ F η₁✝ ≫ liftHom₂ F θ✝ = liftHom₂ F η₂✝ ≫ liftHom₂ F θ✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase id_comp\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ g✝ : Hom a✝ b✝\nη✝ : Hom₂ f✝ g✝\n⊢ liftHom₂ F (Hom₂.vcomp (Hom₂.id f✝) η✝) = liftHom₂ F η✝\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase id_comp\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ g✝ : Hom a✝ b✝\nη✝ : Hom₂ f✝ g✝\n⊢ 𝟙 (liftHom F f✝) ≫ liftHom₂ F η✝ = liftHom₂ F η✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase comp_id\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ g✝ : Hom a✝ b✝\nη✝ : Hom₂ f✝ g✝\n⊢ liftHom₂ F (Hom₂.vcomp η✝ (Hom₂.id g✝)) = liftHom₂ F η✝\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase comp_id\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ g✝ : Hom a✝ b✝\nη✝ : Hom₂ f✝ g✝\n⊢ liftHom₂ F η✝ ≫ 𝟙 (liftHom F g✝) = liftHom₂ F η✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase assoc\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ g✝ h✝ i✝ : Hom a✝ b✝\nη✝ : Hom₂ f✝ g✝\nθ✝ : Hom₂ g✝ h✝\nι✝ : Hom₂ h✝ i✝\n⊢ liftHom₂ F (Hom₂.vcomp (Hom₂.vcomp η✝ θ✝) ι✝) = liftHom₂ F (Hom₂.vcomp η✝ (Hom₂.vcomp θ✝ ι✝))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase assoc\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ g✝ h✝ i✝ : Hom a✝ b✝\nη✝ : Hom₂ f✝ g✝\nθ✝ : Hom₂ g✝ h✝\nι✝ : Hom₂ h✝ i✝\n⊢ (liftHom₂ F η✝ ≫ liftHom₂ F θ✝) ≫ liftHom₂ F ι✝ = liftHom₂ F η✝ ≫ liftHom₂ F θ✝ ≫ liftHom₂ F ι✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase whisker_left\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝¹ b✝ c✝ : B\nf✝ : Hom a✝¹ b✝\ng✝ h✝ : Hom b✝ c✝\nη✝ η'✝ : Hom₂ g✝ h✝\na✝ : Rel η✝ η'✝\na_ih✝ : liftHom₂ F η✝ = liftHom₂ F η'✝\n⊢ liftHom₂ F (Hom₂.whisker_left f✝ η✝) = liftHom₂ F (Hom₂.whisker_left f✝ η'✝)\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase whisker_left\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝¹ b✝ c✝ : B\nf✝ : Hom a✝¹ b✝\ng✝ h✝ : Hom b✝ c✝\nη✝ η'✝ : Hom₂ g✝ h✝\na✝ : Rel η✝ η'✝\na_ih✝ : liftHom₂ F η✝ = liftHom₂ F η'✝\n⊢ liftHom F f✝ ◁ liftHom₂ F η✝ = liftHom F f✝ ◁ liftHom₂ F η'✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase whisker_left_id\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\n⊢ liftHom₂ F (Hom₂.whisker_left f✝ (Hom₂.id g✝)) = liftHom₂ F (Hom₂.id (Hom.comp f✝ g✝))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase whisker_left_id\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\n⊢ liftHom F f✝ ◁ 𝟙 (liftHom F g✝) = 𝟙 (liftHom F f✝ ≫ liftHom F g✝)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase whisker_left_comp\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ : B\nf✝ : Hom a✝ b✝\ng✝ h✝ i✝ : Hom b✝ c✝\nη✝ : Hom₂ g✝ h✝\nθ✝ : Hom₂ h✝ i✝\n⊢ liftHom₂ F (Hom₂.whisker_left f✝ (Hom₂.vcomp η✝ θ✝)) =\n    liftHom₂ F (Hom₂.vcomp (Hom₂.whisker_left f✝ η✝) (Hom₂.whisker_left f✝ θ✝))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase whisker_left_comp\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ : B\nf✝ : Hom a✝ b✝\ng✝ h✝ i✝ : Hom b✝ c✝\nη✝ : Hom₂ g✝ h✝\nθ✝ : Hom₂ h✝ i✝\n⊢ liftHom F f✝ ◁ (liftHom₂ F η✝ ≫ liftHom₂ F θ✝) = liftHom F f✝ ◁ liftHom₂ F η✝ ≫ liftHom F f✝ ◁ liftHom₂ F θ✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase id_whisker_left\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ g✝ : Hom a✝ b✝\nη✝ : Hom₂ f✝ g✝\n⊢ liftHom₂ F (Hom₂.whisker_left (Hom.id a✝) η✝) =\n    liftHom₂ F (Hom₂.vcomp (Hom₂.left_unitor f✝) (Hom₂.vcomp η✝ (Hom₂.left_unitor_inv g✝)))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase id_whisker_left\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ g✝ : Hom a✝ b✝\nη✝ : Hom₂ f✝ g✝\n⊢ 𝟙 (F.obj a✝) ◁ liftHom₂ F η✝ = (λ_ (liftHom F f✝)).hom ≫ liftHom₂ F η✝ ≫ (λ_ (liftHom F g✝)).inv\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase comp_whisker_left\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ d✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\nh✝ h'✝ : Hom c✝ d✝\nη✝ : Hom₂ h✝ h'✝\n⊢ liftHom₂ F (Hom₂.whisker_left (Hom.comp f✝ g✝) η✝) =\n    liftHom₂ F\n      (Hom₂.vcomp (Hom₂.associator f✝ g✝ h✝)\n        (Hom₂.vcomp (Hom₂.whisker_left f✝ (Hom₂.whisker_left g✝ η✝)) (Hom₂.associator_inv f✝ g✝ h'✝)))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase comp_whisker_left\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ d✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\nh✝ h'✝ : Hom c✝ d✝\nη✝ : Hom₂ h✝ h'✝\n⊢ (liftHom F f✝ ≫ liftHom F g✝) ◁ liftHom₂ F η✝ =\n    (α_ (liftHom F f✝) (liftHom F g✝) (liftHom F h✝)).hom ≫\n      liftHom F f✝ ◁ liftHom F g✝ ◁ liftHom₂ F η✝ ≫ (α_ (liftHom F f✝) (liftHom F g✝) (liftHom F h'✝)).inv\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase whisker_right\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝¹ b✝ c✝ : B\nf✝ g✝ : Hom a✝¹ b✝\nh✝ : Hom b✝ c✝\nη✝ η'✝ : Hom₂ f✝ g✝\na✝ : Rel η✝ η'✝\na_ih✝ : liftHom₂ F η✝ = liftHom₂ F η'✝\n⊢ liftHom₂ F (Hom₂.whisker_right h✝ η✝) = liftHom₂ F (Hom₂.whisker_right h✝ η'✝)\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase whisker_right\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝¹ b✝ c✝ : B\nf✝ g✝ : Hom a✝¹ b✝\nh✝ : Hom b✝ c✝\nη✝ η'✝ : Hom₂ f✝ g✝\na✝ : Rel η✝ η'✝\na_ih✝ : liftHom₂ F η✝ = liftHom₂ F η'✝\n⊢ liftHom₂ F η✝ ▷ liftHom F h✝ = liftHom₂ F η'✝ ▷ liftHom F h✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase id_whisker_right\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\n⊢ liftHom₂ F (Hom₂.whisker_right g✝ (Hom₂.id f✝)) = liftHom₂ F (Hom₂.id (Hom.comp f✝ g✝))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase id_whisker_right\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\n⊢ 𝟙 (liftHom F f✝) ▷ liftHom F g✝ = 𝟙 (liftHom F f✝ ≫ liftHom F g✝)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase comp_whisker_right\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ : B\nf✝ g✝ h✝ : Hom a✝ b✝\ni✝ : Hom b✝ c✝\nη✝ : Hom₂ f✝ g✝\nθ✝ : Hom₂ g✝ h✝\n⊢ liftHom₂ F (Hom₂.whisker_right i✝ (Hom₂.vcomp η✝ θ✝)) =\n    liftHom₂ F (Hom₂.vcomp (Hom₂.whisker_right i✝ η✝) (Hom₂.whisker_right i✝ θ✝))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase comp_whisker_right\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ : B\nf✝ g✝ h✝ : Hom a✝ b✝\ni✝ : Hom b✝ c✝\nη✝ : Hom₂ f✝ g✝\nθ✝ : Hom₂ g✝ h✝\n⊢ (liftHom₂ F η✝ ≫ liftHom₂ F θ✝) ▷ liftHom F i✝ = liftHom₂ F η✝ ▷ liftHom F i✝ ≫ liftHom₂ F θ✝ ▷ liftHom F i✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase whisker_right_id\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ g✝ : Hom a✝ b✝\nη✝ : Hom₂ f✝ g✝\n⊢ liftHom₂ F (Hom₂.whisker_right (Hom.id b✝) η✝) =\n    liftHom₂ F (Hom₂.vcomp (Hom₂.right_unitor f✝) (Hom₂.vcomp η✝ (Hom₂.right_unitor_inv g✝)))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase whisker_right_id\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ g✝ : Hom a✝ b✝\nη✝ : Hom₂ f✝ g✝\n⊢ liftHom₂ F η✝ ▷ 𝟙 (F.obj b✝) = (ρ_ (liftHom F f✝)).hom ≫ liftHom₂ F η✝ ≫ (ρ_ (liftHom F g✝)).inv\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase whisker_right_comp\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ d✝ : B\nf✝ f'✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\nh✝ : Hom c✝ d✝\nη✝ : Hom₂ f✝ f'✝\n⊢ liftHom₂ F (Hom₂.whisker_right (Hom.comp g✝ h✝) η✝) =\n    liftHom₂ F\n      (Hom₂.vcomp (Hom₂.associator_inv f✝ g✝ h✝)\n        (Hom₂.vcomp (Hom₂.whisker_right h✝ (Hom₂.whisker_right g✝ η✝)) (Hom₂.associator f'✝ g✝ h✝)))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase whisker_right_comp\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ d✝ : B\nf✝ f'✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\nh✝ : Hom c✝ d✝\nη✝ : Hom₂ f✝ f'✝\n⊢ liftHom₂ F η✝ ▷ (liftHom F g✝ ≫ liftHom F h✝) =\n    (α_ (liftHom F f✝) (liftHom F g✝) (liftHom F h✝)).inv ≫\n      liftHom₂ F η✝ ▷ liftHom F g✝ ▷ liftHom F h✝ ≫ (α_ (liftHom F f'✝) (liftHom F g✝) (liftHom F h✝)).hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase whisker_assoc\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ d✝ : B\nf✝ : Hom a✝ b✝\ng✝ g'✝ : Hom b✝ c✝\nη✝ : Hom₂ g✝ g'✝\nh✝ : Hom c✝ d✝\n⊢ liftHom₂ F (Hom₂.whisker_right h✝ (Hom₂.whisker_left f✝ η✝)) =\n    liftHom₂ F\n      (Hom₂.vcomp (Hom₂.associator f✝ g✝ h✝)\n        (Hom₂.vcomp (Hom₂.whisker_left f✝ (Hom₂.whisker_right h✝ η✝)) (Hom₂.associator_inv f✝ g'✝ h✝)))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase whisker_assoc\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ d✝ : B\nf✝ : Hom a✝ b✝\ng✝ g'✝ : Hom b✝ c✝\nη✝ : Hom₂ g✝ g'✝\nh✝ : Hom c✝ d✝\n⊢ (liftHom F f✝ ◁ liftHom₂ F η✝) ▷ liftHom F h✝ =\n    (α_ (liftHom F f✝) (liftHom F g✝) (liftHom F h✝)).hom ≫\n      liftHom F f✝ ◁ liftHom₂ F η✝ ▷ liftHom F h✝ ≫ (α_ (liftHom F f✝) (liftHom F g'✝) (liftHom F h✝)).inv\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase whisker_exchange\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ : B\nf✝ g✝ : Hom a✝ b✝\nh✝ i✝ : Hom b✝ c✝\nη✝ : Hom₂ f✝ g✝\nθ✝ : Hom₂ h✝ i✝\n⊢ liftHom₂ F (Hom₂.vcomp (Hom₂.whisker_left f✝ θ✝) (Hom₂.whisker_right i✝ η✝)) =\n    liftHom₂ F (Hom₂.vcomp (Hom₂.whisker_right h✝ η✝) (Hom₂.whisker_left g✝ θ✝))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase whisker_exchange\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ : B\nf✝ g✝ : Hom a✝ b✝\nh✝ i✝ : Hom b✝ c✝\nη✝ : Hom₂ f✝ g✝\nθ✝ : Hom₂ h✝ i✝\n⊢ liftHom F f✝ ◁ liftHom₂ F θ✝ ≫ liftHom₂ F η✝ ▷ liftHom F i✝ =\n    liftHom₂ F η✝ ▷ liftHom F h✝ ≫ liftHom F g✝ ◁ liftHom₂ F θ✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase associator_hom_inv\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ d✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\nh✝ : Hom c✝ d✝\n⊢ liftHom₂ F (Hom₂.vcomp (Hom₂.associator f✝ g✝ h✝) (Hom₂.associator_inv f✝ g✝ h✝)) =\n    liftHom₂ F (Hom₂.id (Hom.comp (Hom.comp f✝ g✝) h✝))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase associator_hom_inv\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ d✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\nh✝ : Hom c✝ d✝\n⊢ (α_ (liftHom F f✝) (liftHom F g✝) (liftHom F h✝)).hom ≫ (α_ (liftHom F f✝) (liftHom F g✝) (liftHom F h✝)).inv =\n    𝟙 ((liftHom F f✝ ≫ liftHom F g✝) ≫ liftHom F h✝)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase associator_inv_hom\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ d✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\nh✝ : Hom c✝ d✝\n⊢ liftHom₂ F (Hom₂.vcomp (Hom₂.associator_inv f✝ g✝ h✝) (Hom₂.associator f✝ g✝ h✝)) =\n    liftHom₂ F (Hom₂.id (Hom.comp f✝ (Hom.comp g✝ h✝)))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase associator_inv_hom\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ d✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\nh✝ : Hom c✝ d✝\n⊢ (α_ (liftHom F f✝) (liftHom F g✝) (liftHom F h✝)).inv ≫ (α_ (liftHom F f✝) (liftHom F g✝) (liftHom F h✝)).hom =\n    𝟙 (liftHom F f✝ ≫ liftHom F g✝ ≫ liftHom F h✝)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase left_unitor_hom_inv\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ : Hom a✝ b✝\n⊢ liftHom₂ F (Hom₂.vcomp (Hom₂.left_unitor f✝) (Hom₂.left_unitor_inv f✝)) =\n    liftHom₂ F (Hom₂.id (Hom.comp (Hom.id a✝) f✝))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase left_unitor_hom_inv\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ : Hom a✝ b✝\n⊢ (λ_ (liftHom F f✝)).hom ≫ (λ_ (liftHom F f✝)).inv = 𝟙 (𝟙 (F.obj a✝) ≫ liftHom F f✝)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase left_unitor_inv_hom\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ : Hom a✝ b✝\n⊢ liftHom₂ F (Hom₂.vcomp (Hom₂.left_unitor_inv f✝) (Hom₂.left_unitor f✝)) = liftHom₂ F (Hom₂.id f✝)\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase left_unitor_inv_hom\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ : Hom a✝ b✝\n⊢ (λ_ (liftHom F f✝)).inv ≫ (λ_ (liftHom F f✝)).hom = 𝟙 (liftHom F f✝)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase right_unitor_hom_inv\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ : Hom a✝ b✝\n⊢ liftHom₂ F (Hom₂.vcomp (Hom₂.right_unitor f✝) (Hom₂.right_unitor_inv f✝)) =\n    liftHom₂ F (Hom₂.id (Hom.comp f✝ (Hom.id b✝)))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase right_unitor_hom_inv\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ : Hom a✝ b✝\n⊢ (ρ_ (liftHom F f✝)).hom ≫ (ρ_ (liftHom F f✝)).inv = 𝟙 (liftHom F f✝ ≫ 𝟙 (F.obj b✝))\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase right_unitor_inv_hom\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ : Hom a✝ b✝\n⊢ liftHom₂ F (Hom₂.vcomp (Hom₂.right_unitor_inv f✝) (Hom₂.right_unitor f✝)) = liftHom₂ F (Hom₂.id f✝)\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase right_unitor_inv_hom\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ : B\nf✝ : Hom a✝ b✝\n⊢ (ρ_ (liftHom F f✝)).inv ≫ (ρ_ (liftHom F f✝)).hom = 𝟙 (liftHom F f✝)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase pentagon\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ d✝ e✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\nh✝ : Hom c✝ d✝\ni✝ : Hom d✝ e✝\n⊢ liftHom₂ F\n      (Hom₂.vcomp (Hom₂.whisker_right i✝ (Hom₂.associator f✝ g✝ h✝))\n        (Hom₂.vcomp (Hom₂.associator f✝ (Hom.comp g✝ h✝) i✝) (Hom₂.whisker_left f✝ (Hom₂.associator g✝ h✝ i✝)))) =\n    liftHom₂ F (Hom₂.vcomp (Hom₂.associator (Hom.comp f✝ g✝) h✝ i✝) (Hom₂.associator f✝ g✝ (Hom.comp h✝ i✝)))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase pentagon\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ d✝ e✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\nh✝ : Hom c✝ d✝\ni✝ : Hom d✝ e✝\n⊢ (α_ (liftHom F f✝) (liftHom F g✝) (liftHom F h✝)).hom ▷ liftHom F i✝ ≫\n      (α_ (liftHom F f✝) (liftHom F g✝ ≫ liftHom F h✝) (liftHom F i✝)).hom ≫\n        liftHom F f✝ ◁ (α_ (liftHom F g✝) (liftHom F h✝) (liftHom F i✝)).hom =\n    (α_ (liftHom F f✝ ≫ liftHom F g✝) (liftHom F h✝) (liftHom F i✝)).hom ≫\n      (α_ (liftHom F f✝) (liftHom F g✝) (liftHom F h✝ ≫ liftHom F i✝)).hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase triangle\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\n⊢ liftHom₂ F (Hom₂.vcomp (Hom₂.associator f✝ (Hom.id b✝) g✝) (Hom₂.whisker_left f✝ (Hom₂.left_unitor g✝))) =\n    liftHom₂ F (Hom₂.whisker_right g✝ (Hom₂.right_unitor f✝))\n[PROOFSTEP]\ndsimp [liftHom₂]\n[GOAL]\ncase triangle\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g : a ⟶ b\nη θ : Hom₂ f g\na✝ b✝ c✝ : B\nf✝ : Hom a✝ b✝\ng✝ : Hom b✝ c✝\n⊢ (α_ (liftHom F f✝) (𝟙 (F.obj b✝)) (liftHom F g✝)).hom ≫ liftHom F f✝ ◁ (λ_ (liftHom F g✝)).hom =\n    (ρ_ (liftHom F f✝)).hom ▷ liftHom F g✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\n⊢ ∀ {a b : FreeBicategory B} {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h),\n    PrelaxFunctor.map₂\n        { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n          map₂ := fun {a b} {f g} =>\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n        (η ≫ θ) =\n      PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          η ≫\n        PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          θ\n[PROOFSTEP]\nintros a b f g h η θ\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g h : a ⟶ b\nη : f ⟶ g\nθ : g ⟶ h\n⊢ PrelaxFunctor.map₂\n      { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n        map₂ := fun {a b} {f g} =>\n          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n      (η ≫ θ) =\n    PrelaxFunctor.map₂\n        { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n          map₂ := fun {a b} {f g} =>\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n        η ≫\n      PrelaxFunctor.map₂\n        { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n          map₂ := fun {a b} {f g} =>\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n        θ\n[PROOFSTEP]\napply Quot.rec _ _ η\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g h : a ⟶ b\nη : f ⟶ g\nθ : g ⟶ h\n⊢ ∀ (a_1 : Hom₂ f g),\n    PrelaxFunctor.map₂\n        { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n          map₂ := fun {a b} {f g} =>\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n        (Quot.mk Rel a_1 ≫ θ) =\n      PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          (Quot.mk Rel a_1) ≫\n        PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          θ\n[PROOFSTEP]\nintro η\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g h : a ⟶ b\nη✝ : f ⟶ g\nθ : g ⟶ h\nη : Hom₂ f g\n⊢ PrelaxFunctor.map₂\n      { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n        map₂ := fun {a b} {f g} =>\n          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n      (Quot.mk Rel η ≫ θ) =\n    PrelaxFunctor.map₂\n        { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n          map₂ := fun {a b} {f g} =>\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n        (Quot.mk Rel η) ≫\n      PrelaxFunctor.map₂\n        { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n          map₂ := fun {a b} {f g} =>\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n        θ\n[PROOFSTEP]\napply Quot.rec _ _ θ\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g h : a ⟶ b\nη✝ : f ⟶ g\nθ : g ⟶ h\nη : Hom₂ f g\n⊢ ∀ (a_1 : Hom₂ g h),\n    PrelaxFunctor.map₂\n        { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n          map₂ := fun {a b} {f g} =>\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n        (Quot.mk Rel η ≫ Quot.mk Rel a_1) =\n      PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          (Quot.mk Rel η) ≫\n        PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          (Quot.mk Rel a_1)\n[PROOFSTEP]\nintro θ\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g h : a ⟶ b\nη✝ : f ⟶ g\nθ✝ : g ⟶ h\nη : Hom₂ f g\nθ : Hom₂ g h\n⊢ PrelaxFunctor.map₂\n      { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n        map₂ := fun {a b} {f g} =>\n          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n      (Quot.mk Rel η ≫ Quot.mk Rel θ) =\n    PrelaxFunctor.map₂\n        { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n          map₂ := fun {a b} {f g} =>\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n        (Quot.mk Rel η) ≫\n      PrelaxFunctor.map₂\n        { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n          map₂ := fun {a b} {f g} =>\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n        (Quot.mk Rel θ)\n[PROOFSTEP]\nrfl\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g h : a ⟶ b\nη✝ : f ⟶ g\nθ : g ⟶ h\nη : Hom₂ f g\n⊢ ∀ (a_1 b_1 : Hom₂ g h) (p : Rel a_1 b_1),\n    (_ :\n        PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            (Quot.mk Rel η ≫ Quot.mk Rel b_1) =\n          PrelaxFunctor.map₂\n              { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                map₂ := fun {a b} {f g} =>\n                  Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n              (Quot.mk Rel η) ≫\n            PrelaxFunctor.map₂\n              { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                map₂ := fun {a b} {f g} =>\n                  Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n              (Quot.mk Rel b_1)) =\n      (_ :\n        PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            (Quot.mk Rel η ≫ Quot.mk Rel b_1) =\n          PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            (Quot.mk Rel η ≫ Quot.mk Rel b_1))\n[PROOFSTEP]\nintros\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g h : a ⟶ b\nη✝ : f ⟶ g\nθ : g ⟶ h\nη : Hom₂ f g\na✝ b✝ : Hom₂ g h\np✝ : Rel a✝ b✝\n⊢ (_ :\n      PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          (Quot.mk Rel η ≫ Quot.mk Rel b✝) =\n        PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            (Quot.mk Rel η) ≫\n          PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            (Quot.mk Rel b✝)) =\n    (_ :\n      PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          (Quot.mk Rel η ≫ Quot.mk Rel b✝) =\n        PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          (Quot.mk Rel η ≫ Quot.mk Rel b✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g h : a ⟶ b\nη : f ⟶ g\nθ : g ⟶ h\n⊢ ∀ (a_1 b_1 : Hom₂ f g) (p : Rel a_1 b_1),\n    (_ :\n        PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            (Quot.mk Rel b_1 ≫ θ) =\n          PrelaxFunctor.map₂\n              { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                map₂ := fun {a b} {f g} =>\n                  Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n              (Quot.mk Rel b_1) ≫\n            PrelaxFunctor.map₂\n              { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                map₂ := fun {a b} {f g} =>\n                  Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n              θ) =\n      (_ :\n        PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            (Quot.mk Rel b_1 ≫ θ) =\n          PrelaxFunctor.map₂\n              { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                map₂ := fun {a b} {f g} =>\n                  Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n              (Quot.mk Rel b_1) ≫\n            PrelaxFunctor.map₂\n              { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                map₂ := fun {a b} {f g} =>\n                  Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n              θ)\n[PROOFSTEP]\nintros\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b : FreeBicategory B\nf g h : a ⟶ b\nη : f ⟶ g\nθ : g ⟶ h\na✝ b✝ : Hom₂ f g\np✝ : Rel a✝ b✝\n⊢ (_ :\n      PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          (Quot.mk Rel b✝ ≫ θ) =\n        PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            (Quot.mk Rel b✝) ≫\n          PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            θ) =\n    (_ :\n      PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          (Quot.mk Rel b✝ ≫ θ) =\n        PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            (Quot.mk Rel b✝) ≫\n          PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            θ)\n[PROOFSTEP]\nrfl\n  -- Porting note: still borked from here. The infoview doesn't update properly for me.\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\n⊢ ∀ {a b c : FreeBicategory B} (f : a ⟶ b) {g h : b ⟶ c} (η : g ⟶ h),\n    PrelaxFunctor.map₂\n        { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n          map₂ := fun {a b} {f g} =>\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n        (f ◁ η) =\n      ((fun {a b c} f g =>\n              Iso.refl\n                ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                        map₂ := fun {a b} {f g} =>\n                          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                  (f ≫ g)))\n            f g).hom ≫\n        (↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                    map₂ := fun {a b} {f g} =>\n                      Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n              f ◁\n            PrelaxFunctor.map₂\n              { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                map₂ := fun {a b} {f g} =>\n                  Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n              η ≫\n          ((fun {a b c} f g =>\n                Iso.refl\n                  ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                          map₂ := fun {a b} {f g} =>\n                            Quot.lift (liftHom₂ F)\n                              (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                    (f ≫ g)))\n              f h).inv\n[PROOFSTEP]\nintro a b c f g h η\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b c : FreeBicategory B\nf : a ⟶ b\ng h : b ⟶ c\nη : g ⟶ h\n⊢ PrelaxFunctor.map₂\n      { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n        map₂ := fun {a b} {f g} =>\n          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n      (f ◁ η) =\n    ((fun {a b c} f g =>\n            Iso.refl\n              ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                      map₂ := fun {a b} {f g} =>\n                        Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                (f ≫ g)))\n          f g).hom ≫\n      (↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                  map₂ := fun {a b} {f g} =>\n                    Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n            f ◁\n          PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            η ≫\n        ((fun {a b c} f g =>\n              Iso.refl\n                ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                        map₂ := fun {a b} {f g} =>\n                          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                  (f ≫ g)))\n            f h).inv\n[PROOFSTEP]\napply Quot.rec _ _ η\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b c : FreeBicategory B\nf : a ⟶ b\ng h : b ⟶ c\nη : g ⟶ h\n⊢ ∀ (a_1 : Hom₂ g h),\n    PrelaxFunctor.map₂\n        { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n          map₂ := fun {a b} {f g} =>\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n        (f ◁ Quot.mk Rel a_1) =\n      ((fun {a b c} f g =>\n              Iso.refl\n                ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                        map₂ := fun {a b} {f g} =>\n                          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                  (f ≫ g)))\n            f g).hom ≫\n        (↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                    map₂ := fun {a b} {f g} =>\n                      Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n              f ◁\n            PrelaxFunctor.map₂\n              { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                map₂ := fun {a b} {f g} =>\n                  Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n              (Quot.mk Rel a_1) ≫\n          ((fun {a b c} f g =>\n                Iso.refl\n                  ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                          map₂ := fun {a b} {f g} =>\n                            Quot.lift (liftHom₂ F)\n                              (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                    (f ≫ g)))\n              f h).inv\n[PROOFSTEP]\nintros\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b c : FreeBicategory B\nf : a ⟶ b\ng h : b ⟶ c\nη : g ⟶ h\na✝ : Hom₂ g h\n⊢ PrelaxFunctor.map₂\n      { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n        map₂ := fun {a b} {f g} =>\n          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n      (f ◁ Quot.mk Rel a✝) =\n    ((fun {a b c} f g =>\n            Iso.refl\n              ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                      map₂ := fun {a b} {f g} =>\n                        Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                (f ≫ g)))\n          f g).hom ≫\n      (↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                  map₂ := fun {a b} {f g} =>\n                    Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n            f ◁\n          PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            (Quot.mk Rel a✝) ≫\n        ((fun {a b c} f g =>\n              Iso.refl\n                ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                        map₂ := fun {a b} {f g} =>\n                          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                  (f ≫ g)))\n            f h).inv\n[PROOFSTEP]\naesop_cat\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b c : FreeBicategory B\nf : a ⟶ b\ng h : b ⟶ c\nη : g ⟶ h\n⊢ ∀ (a_1 b_1 : Hom₂ g h) (p : Rel a_1 b_1),\n    (_ :\n        PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            (f ◁ Quot.mk Rel b_1) =\n          ((fun {a b c} f g =>\n                  Iso.refl\n                    ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                            map₂ := fun {a b} {f g} =>\n                              Quot.lift (liftHom₂ F)\n                                (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                      (f ≫ g)))\n                f g).hom ≫\n            (↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                        map₂ := fun {a b} {f g} =>\n                          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                  f ◁\n                PrelaxFunctor.map₂\n                  { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                    map₂ := fun {a b} {f g} =>\n                      Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n                  (Quot.mk Rel b_1) ≫\n              ((fun {a b c} f g =>\n                    Iso.refl\n                      ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                              map₂ := fun {a b} {f g} =>\n                                Quot.lift (liftHom₂ F)\n                                  (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                        (f ≫ g)))\n                  f h).inv) =\n      (_ :\n        PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            (f ◁ Quot.mk Rel b_1) =\n          ((fun {a b c} f g =>\n                  Iso.refl\n                    ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                            map₂ := fun {a b} {f g} =>\n                              Quot.lift (liftHom₂ F)\n                                (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                      (f ≫ g)))\n                f g).hom ≫\n            (↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                        map₂ := fun {a b} {f g} =>\n                          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                  f ◁\n                PrelaxFunctor.map₂\n                  { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                    map₂ := fun {a b} {f g} =>\n                      Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n                  (Quot.mk Rel b_1) ≫\n              ((fun {a b c} f g =>\n                    Iso.refl\n                      ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                              map₂ := fun {a b} {f g} =>\n                                Quot.lift (liftHom₂ F)\n                                  (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                        (f ≫ g)))\n                  f h).inv)\n[PROOFSTEP]\nintros\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na b c : FreeBicategory B\nf : a ⟶ b\ng h : b ⟶ c\nη : g ⟶ h\na✝ b✝ : Hom₂ g h\np✝ : Rel a✝ b✝\n⊢ (_ :\n      PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          (f ◁ Quot.mk Rel b✝) =\n        ((fun {a b c} f g =>\n                Iso.refl\n                  ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                          map₂ := fun {a b} {f g} =>\n                            Quot.lift (liftHom₂ F)\n                              (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                    (f ≫ g)))\n              f g).hom ≫\n          (↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                      map₂ := fun {a b} {f g} =>\n                        Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                f ◁\n              PrelaxFunctor.map₂\n                { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                  map₂ := fun {a b} {f g} =>\n                    Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n                (Quot.mk Rel b✝) ≫\n            ((fun {a b c} f g =>\n                  Iso.refl\n                    ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                            map₂ := fun {a b} {f g} =>\n                              Quot.lift (liftHom₂ F)\n                                (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                      (f ≫ g)))\n                f h).inv) =\n    (_ :\n      PrelaxFunctor.map₂\n          { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n            map₂ := fun {a b} {f g} =>\n              Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n          (f ◁ Quot.mk Rel b✝) =\n        ((fun {a b c} f g =>\n                Iso.refl\n                  ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                          map₂ := fun {a b} {f g} =>\n                            Quot.lift (liftHom₂ F)\n                              (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                    (f ≫ g)))\n              f g).hom ≫\n          (↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                      map₂ := fun {a b} {f g} =>\n                        Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                f ◁\n              PrelaxFunctor.map₂\n                { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                  map₂ := fun {a b} {f g} =>\n                    Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n                (Quot.mk Rel b✝) ≫\n            ((fun {a b c} f g =>\n                  Iso.refl\n                    ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                            map₂ := fun {a b} {f g} =>\n                              Quot.lift (liftHom₂ F)\n                                (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                      (f ≫ g)))\n                f h).inv)\n[PROOFSTEP]\nrfl\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\n⊢ ∀ {a b c : FreeBicategory B} {f g : a ⟶ b} (η : f ⟶ g) (h : b ⟶ c),\n    PrelaxFunctor.map₂\n        { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n          map₂ := fun {a b} {f g} =>\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n        (η ▷ h) =\n      ((fun {a b c} f g =>\n              Iso.refl\n                ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                        map₂ := fun {a b} {f g} =>\n                          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                  (f ≫ g)))\n            f h).hom ≫\n        PrelaxFunctor.map₂\n              { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                map₂ := fun {a b} {f g} =>\n                  Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n              η ▷\n            (↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                    map₂ := fun {a b} {f g} =>\n                      Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n              h ≫\n          ((fun {a b c} f g =>\n                Iso.refl\n                  ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                          map₂ := fun {a b} {f g} =>\n                            Quot.lift (liftHom₂ F)\n                              (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                    (f ≫ g)))\n              g h).inv\n[PROOFSTEP]\nintro _ _ _ _ _ η h\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nη : f✝ ⟶ g✝\nh : b✝ ⟶ c✝\n⊢ PrelaxFunctor.map₂\n      { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n        map₂ := fun {a b} {f g} =>\n          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n      (η ▷ h) =\n    ((fun {a b c} f g =>\n            Iso.refl\n              ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                      map₂ := fun {a b} {f g} =>\n                        Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                (f ≫ g)))\n          f✝ h).hom ≫\n      PrelaxFunctor.map₂\n            { toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n              map₂ := fun {a b} {f g} =>\n                Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }\n            η ▷\n          (↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                  map₂ := fun {a b} {f g} =>\n                    Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n            h ≫\n        ((fun {a b c} f g =>\n              Iso.refl\n                ((↑{ toPrefunctor := { obj := F.obj, map := fun {X Y} => liftHom F },\n                        map₂ := fun {a b} {f g} =>\n                          Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f g), Rel η θ → liftHom₂ F η = liftHom₂ F θ) }).map\n                  (f ≫ g)))\n            g✝ h).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nη : f✝ ⟶ g✝\nh : b✝ ⟶ c✝\n⊢ Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ (f✝ ≫ h) (g✝ ≫ h)), Rel η θ → liftHom₂ F η = liftHom₂ F θ) (η ▷ h) =\n    𝟙 (liftHom F f✝ ≫ liftHom F h) ≫\n      Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f✝ g✝), Rel η θ → liftHom₂ F η = liftHom₂ F θ) η ▷ liftHom F h ≫\n        𝟙 (liftHom F g✝ ≫ liftHom F h)\n[PROOFSTEP]\napply Quot.rec _ _ η\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nη : f✝ ⟶ g✝\nh : b✝ ⟶ c✝\n⊢ ∀ (a : Hom₂ f✝ g✝),\n    Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ (f✝ ≫ h) (g✝ ≫ h)), Rel η θ → liftHom₂ F η = liftHom₂ F θ)\n        (Quot.mk Rel a ▷ h) =\n      𝟙 (liftHom F f✝ ≫ liftHom F h) ≫\n        Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f✝ g✝), Rel η θ → liftHom₂ F η = liftHom₂ F θ) (Quot.mk Rel a) ▷\n            liftHom F h ≫\n          𝟙 (liftHom F g✝ ≫ liftHom F h)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nB : Type u₁\ninst✝¹ : Quiver B\nC : Type u₂\ninst✝ : Bicategory C\nF : B ⥤q C\na✝ b✝ c✝ : FreeBicategory B\nf✝ g✝ : a✝ ⟶ b✝\nη : f✝ ⟶ g✝\nh : b✝ ⟶ c✝\n⊢ ∀ (a b : Hom₂ f✝ g✝) (p : Rel a b),\n    (_ :\n        Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ (f✝ ≫ h) (g✝ ≫ h)), Rel η θ → liftHom₂ F η = liftHom₂ F θ)\n            (Quot.mk Rel b ▷ h) =\n          𝟙 (liftHom F f✝ ≫ liftHom F h) ≫\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f✝ g✝), Rel η θ → liftHom₂ F η = liftHom₂ F θ) (Quot.mk Rel b) ▷\n                liftHom F h ≫\n              𝟙 (liftHom F g✝ ≫ liftHom F h)) =\n      (_ :\n        Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ (f✝ ≫ h) (g✝ ≫ h)), Rel η θ → liftHom₂ F η = liftHom₂ F θ)\n            (Quot.mk Rel b ▷ h) =\n          𝟙 (liftHom F f✝ ≫ liftHom F h) ≫\n            Quot.lift (liftHom₂ F) (_ : ∀ (η θ : Hom₂ f✝ g✝), Rel η θ → liftHom₂ F η = liftHom₂ F θ) (Quot.mk Rel b) ▷\n                liftHom F h ≫\n              𝟙 (liftHom F g✝ ≫ liftHom F h))\n[PROOFSTEP]\naesop_cat\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Bicategory.Free", "llama_tokens": 33905, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.734119538534297, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.38711336280491765}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\ns t : Finset α\n⊢ s = univ ↔ ∀ (x : α), x ∈ s\n[PROOFSTEP]\nsimp [ext_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\ns t : Finset α\n⊢ ↑univ = Set.univ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\ns t : Finset α\nx✝ : α\n⊢ x✝ ∈ ↑univ ↔ x✝ ∈ Set.univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\ns t : Finset α\n⊢ ↑s = Set.univ ↔ s = univ\n[PROOFSTEP]\nrw [← coe_univ, coe_inj]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : Subsingleton α\n⊢ Finset.Nonempty s → s = univ\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : Subsingleton α\nx : α\nhx : x ∈ s\n⊢ s = univ\n[PROOFSTEP]\nrefine' eq_univ_of_forall fun y => by rwa [Subsingleton.elim y x]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : Subsingleton α\nx : α\nhx : x ∈ s\ny : α\n⊢ y ∈ s\n[PROOFSTEP]\nrwa [Subsingleton.elim y x]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\ns t : Finset α\n⊢ Finset.Nonempty univ ↔ Nonempty α\n[PROOFSTEP]\nrw [← coe_nonempty, coe_univ, Set.nonempty_iff_univ_nonempty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\ns t : Finset α\n⊢ univ = ∅ ↔ IsEmpty α\n[PROOFSTEP]\nrw [← not_nonempty_iff, ← univ_nonempty_iff, not_nonempty_iff_eq_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\ns t : Finset α\n⊢ Codisjoint s t ↔ ∀ ⦃a : α⦄, ¬a ∈ s → a ∈ t\n[PROOFSTEP]\nclassical simp [codisjoint_iff, eq_univ_iff_forall, or_iff_not_imp_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\ns t : Finset α\n⊢ Codisjoint s t ↔ ∀ ⦃a : α⦄, ¬a ∈ s → a ∈ t\n[PROOFSTEP]\nsimp [codisjoint_iff, eq_univ_iff_forall, or_iff_not_imp_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : DecidableEq α\na : α\n⊢ a ∈ sᶜ ↔ ¬a ∈ s\n[PROOFSTEP]\nsimp [compl_eq_univ_sdiff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : DecidableEq α\na : α\n⊢ ¬a ∈ sᶜ ↔ a ∈ s\n[PROOFSTEP]\nrw [mem_compl, not_not]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : DecidableEq α\na : α\n⊢ (erase s a)ᶜ = insert a sᶜ\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : DecidableEq α\na a✝ : α\n⊢ a✝ ∈ (erase s a)ᶜ ↔ a✝ ∈ insert a sᶜ\n[PROOFSTEP]\nsimp only [or_iff_not_imp_left, mem_insert, not_and, mem_compl, mem_erase]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : DecidableEq α\na : α\n⊢ (insert a s)ᶜ = erase sᶜ a\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : DecidableEq α\na a✝ : α\n⊢ a✝ ∈ (insert a s)ᶜ ↔ a✝ ∈ erase sᶜ a\n[PROOFSTEP]\nsimp only [not_or, mem_insert, iff_self_iff, mem_compl, mem_erase]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : DecidableEq α\na x : α\n⊢ insert x {x}ᶜ = univ\n[PROOFSTEP]\nrw [← compl_erase, erase_singleton, compl_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Fintype α\ns t : Finset α\ninst✝² : DecidableEq α\na : α\np : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : (x : α) → Decidable ¬p x\n⊢ ∀ (a : α), a ∈ (filter p univ)ᶜ ↔ a ∈ filter (fun x => ¬p x) univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns✝ t : Finset α\ninst✝ : DecidableEq α\na : α\ns : Finset α\n⊢ sᶜ ≠ univ ↔ Finset.Nonempty s\n[PROOFSTEP]\nsimp [eq_univ_iff_forall, Finset.Nonempty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : DecidableEq α\na✝ a : α\n⊢ {a}ᶜ = erase univ a\n[PROOFSTEP]\nrw [compl_eq_univ_sdiff, sdiff_singleton_eq_erase]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns✝ t : Finset α\ninst✝ : DecidableEq α\na : α\ns : Finset α\n⊢ Set.InjOn (fun a => insert a s) ↑sᶜ\n[PROOFSTEP]\nrw [coe_compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns✝ t : Finset α\ninst✝ : DecidableEq α\na : α\ns : Finset α\n⊢ Set.InjOn (fun a => insert a s) (↑s)ᶜ\n[PROOFSTEP]\nexact s.insert_inj_on\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns✝ t : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\n⊢ a ∈ univ ∩ s ↔ a ∈ s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns✝ t : Finset α\ninst✝ : DecidableEq α\ns : Finset α\n⊢ s ∩ univ = s\n[PROOFSTEP]\nrw [inter_comm, univ_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : (i : α) → Decidable (i ∈ univ)\nδ : α → Sort u_4\nf g : (i : α) → δ i\n⊢ piecewise univ f g = f\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\ninst✝ : (i : α) → Decidable (i ∈ univ)\nδ : α → Sort u_4\nf g : (i : α) → δ i\ni : α\n⊢ piecewise univ f g i = f i\n[PROOFSTEP]\nsimp [piecewise]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Fintype α\ns✝ t : Finset α\ninst✝² : DecidableEq α\ns : Finset α\ninst✝¹ : (i : α) → Decidable (i ∈ s)\ninst✝ : (i : α) → Decidable (i ∈ sᶜ)\nδ : α → Sort u_4\nf g : (i : α) → δ i\n⊢ piecewise sᶜ f g = piecewise s g f\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Fintype α\ns✝ t : Finset α\ninst✝² : DecidableEq α\ns : Finset α\ninst✝¹ : (i : α) → Decidable (i ∈ s)\ninst✝ : (i : α) → Decidable (i ∈ sᶜ)\nδ : α → Sort u_4\nf g : (i : α) → δ i\ni : α\n⊢ piecewise sᶜ f g i = piecewise s g f i\n[PROOFSTEP]\nsimp [piecewise]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\nδ : α → Sort u_4\ninst✝ : DecidableEq α\na : α\nf g : (a : α) → δ a\n⊢ piecewise (erase univ a) f g = update f a (g a)\n[PROOFSTEP]\nrw [← compl_singleton, piecewise_compl, piecewise_singleton]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\ninst✝² : Fintype α✝\ns t : Finset α✝\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Fintype α\ninst✝ : Fintype β\ne : α ≃ β\nb : β\n⊢ ↑(Equiv.toEmbedding e) (↑e.symm b) = b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Fintype α\ns t : Finset α\nf : α → β\ninst✝² : Fintype β\ninst✝¹ : DecidablePred fun y => ∃ x, f x = y\ninst✝ : DecidableEq β\n⊢ filter (fun y => ∃ x, f x = y) univ = image f univ\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Fintype α\ns t : Finset α\nf : α → β\ninst✝² : Fintype β\ninst✝¹ : DecidablePred fun y => ∃ x, f x = y\ninst✝ : DecidableEq β\na✝ : β\n⊢ a✝ ∈ filter (fun y => ∃ x, f x = y) univ ↔ a✝ ∈ image f univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Fintype α\ns t : Finset α\nf : α → β\ninst✝² : Fintype β\ninst✝¹ : DecidablePred fun y => y ∈ Set.range f\ninst✝ : DecidableEq β\n⊢ filter (fun y => y ∈ Set.range f) univ = image f univ\n[PROOFSTEP]\nletI : DecidablePred (fun y => ∃ x, f x = y) := by simpa using ‹_›\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Fintype α\ns t : Finset α\nf : α → β\ninst✝² : Fintype β\ninst✝¹ : DecidablePred fun y => y ∈ Set.range f\ninst✝ : DecidableEq β\n⊢ DecidablePred fun y => ∃ x, f x = y\n[PROOFSTEP]\nsimpa using ‹_›\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Fintype α\ns t : Finset α\nf : α → β\ninst✝² : Fintype β\ninst✝¹ : DecidablePred fun y => y ∈ Set.range f\ninst✝ : DecidableEq β\nthis : DecidablePred fun y => ∃ x, f x = y := inst✝¹\n⊢ filter (fun y => y ∈ Set.range f) univ = image f univ\n[PROOFSTEP]\nexact univ_filter_exists f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns t : Finset α\np : α → Prop\ninst✝ : DecidablePred p\n⊢ ↑(filter p univ) = {x | p x}\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type ?u.30074\nβ : α → Type u_4\ninst✝¹ : (a : α) → DecidableEq (β a)\ninst✝ : Fintype α\nf g : (a : α) → β a\n⊢ (∀ (a : α), a ∈ elems → f a = g a) ↔ f = g\n[PROOFSTEP]\nsimp [Function.funext_iff, Fintype.complete]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : Fintype α\n⊢ (∀ (a : α), a ∈ univ → p a) ↔ ∀ (a : α), p a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : Fintype α\n⊢ (∃ a, a ∈ univ ∧ p a) ↔ ∃ a, p a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : DecidableEq α\ninst✝¹ : DecidableEq β\ninst✝ : Fintype α\nx : α → β\n⊢ Decidable (Injective x)\n[PROOFSTEP]\nunfold Injective\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : DecidableEq α\ninst✝¹ : DecidableEq β\ninst✝ : Fintype α\nx : α → β\n⊢ Decidable (∀ ⦃a₁ a₂ : α⦄, x a₁ = x a₂ → a₁ = a₂)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : DecidableEq β\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nx : α → β\n⊢ Decidable (Surjective x)\n[PROOFSTEP]\nunfold Surjective\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : DecidableEq β\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nx : α → β\n⊢ Decidable (∀ (b : β), ∃ a, x a = b)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : DecidableEq α\ninst✝² : DecidableEq β\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nx : α → β\n⊢ Decidable (Bijective x)\n[PROOFSTEP]\nunfold Bijective\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : DecidableEq α\ninst✝² : DecidableEq β\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nx : α → β\n⊢ Decidable (Injective x ∧ Surjective x)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nf : α → β\ng : β → α\n⊢ Decidable (∀ (x : α), g (f x) = x)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ninst✝ : Fintype β\nf : α → β\ng : β → α\n⊢ Decidable (∀ (x : β), f (g x) = x)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Multiset α\nH : ∀ (x : α), x ∈ s\n⊢ ∀ (x : α), x ∈ Multiset.toFinset s\n[PROOFSTEP]\nsimpa using H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl : List α\nH : ∀ (x : α), x ∈ l\n⊢ ∀ (x : α), x ∈ List.toFinset l\n[PROOFSTEP]\nsimpa using H\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nx✝¹ x✝ : Fintype α\ns₁ : Finset α\nh₁ : ∀ (x : α), x ∈ s₁\ns₂ : Finset α\nh₂ : ∀ (x : α), x ∈ s₂\n⊢ { elems := s₁, complete := h₁ } = { elems := s₂, complete := h₂ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_elems\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nx✝¹ x✝ : Fintype α\ns₁ : Finset α\nh₁ : ∀ (x : α), x ∈ s₁\ns₂ : Finset α\nh₂ : ∀ (x : α), x ∈ s₂\n⊢ s₁ = s₂\n[PROOFSTEP]\nsimp [Finset.ext_iff, h₁, h₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ninst✝ : DecidableEq β\nf : α → β\nhf : Injective f\nb : ↑(Set.range f)\n⊢ ∀ (a : α), f a = ↑b ↔ a ∈ univ ∧ (fun a => f a = ↑b) a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Fintype α\ninst✝¹ : DecidableEq β\nf : α → β\nhf : Injective f\ninst✝ : Nonempty α\n⊢ Set.restrict (Set.range f) (invFun f) = invOfMemRange hf\n[PROOFSTEP]\next ⟨b, h⟩\n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Fintype α\ninst✝¹ : DecidableEq β\nf : α → β\nhf : Injective f\ninst✝ : Nonempty α\nb : β\nh : b ∈ Set.range f\n⊢ Set.restrict (Set.range f) (invFun f) { val := b, property := h } = invOfMemRange hf { val := b, property := h }\n[PROOFSTEP]\napply hf\n[GOAL]\ncase h.mk.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Fintype α\ninst✝¹ : DecidableEq β\nf : α → β\nhf : Injective f\ninst✝ : Nonempty α\nb : β\nh : b ∈ Set.range f\n⊢ f (Set.restrict (Set.range f) (invFun f) { val := b, property := h }) =\n    f (invOfMemRange hf { val := b, property := h })\n[PROOFSTEP]\nsimp [hf.left_inv_of_invOfMemRange, @invFun_eq _ _ _ f b (Set.mem_range.mp h)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ninst✝ : DecidableEq β\nf : α → β\nhf : Injective f\na : α\n⊢ invOfMemRange hf { val := f a, property := (_ : f a ∈ Set.range f) } = a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Fintype α\ninst✝¹ : DecidableEq β\nf : α ↪ β\nb : ↑(Set.range ↑f)\ninst✝ : Nonempty α\n⊢ Set.restrict (Set.range ↑f) (invFun ↑f) = invOfMemRange f\n[PROOFSTEP]\next ⟨b, h⟩\n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Fintype α\ninst✝¹ : DecidableEq β\nf : α ↪ β\nb✝ : ↑(Set.range ↑f)\ninst✝ : Nonempty α\nb : β\nh : b ∈ Set.range ↑f\n⊢ Set.restrict (Set.range ↑f) (invFun ↑f) { val := b, property := h } = invOfMemRange f { val := b, property := h }\n[PROOFSTEP]\napply f.injective\n[GOAL]\ncase h.mk.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Fintype α\ninst✝¹ : DecidableEq β\nf : α ↪ β\nb✝ : ↑(Set.range ↑f)\ninst✝ : Nonempty α\nb : β\nh : b ∈ Set.range ↑f\n⊢ ↑f (Set.restrict (Set.range ↑f) (invFun ↑f) { val := b, property := h }) =\n    ↑f (invOfMemRange f { val := b, property := h })\n[PROOFSTEP]\nsimp [f.left_inv_of_invOfMemRange, @invFun_eq _ _ _ f b (Set.mem_range.mp h)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ninst✝ : DecidableEq β\nf : α ↪ β\nb : ↑(Set.range ↑f)\na : α\n⊢ invOfMemRange f { val := ↑f a, property := (_ : ↑f a ∈ Set.range ↑f) } = a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t✝ s t : Set α\ninst✝¹ : Fintype ↑s\ninst✝ : Fintype ↑t\nh : s = t\n⊢ toFinset s = toFinset t\n[PROOFSTEP]\nsubst h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t s : Set α\ninst✝¹ inst✝ : Fintype ↑s\n⊢ toFinset s = toFinset s\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_3.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t s : Set α\ninst✝¹ inst✝ : Fintype ↑s\n⊢ inst✝¹ = inst✝\n[PROOFSTEP]\nexact Subsingleton.elim _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t s : Set α\ninst✝ : Fintype ↑s\na : α\n⊢ a ∈ toFinset s ↔ a ∈ s\n[PROOFSTEP]\nsimp [toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t p : Set α\ns : Finset α\nH : ∀ (x : α), x ∈ s ↔ x ∈ p\nx : α\n⊢ x ∈ toFinset p ↔ x ∈ s\n[PROOFSTEP]\nrw [@mem_toFinset _ _ (id _), H]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t s : Set α\ninst✝ : Fintype ↑s\n⊢ Finset.Nonempty (toFinset s) ↔ Set.Nonempty s\n[PROOFSTEP]\nrw [← Finset.coe_nonempty, coe_toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t✝ s t : Set α\ninst✝¹ : Fintype ↑s\ninst✝ : Fintype ↑t\nh : toFinset s = toFinset t\n⊢ s = t\n[PROOFSTEP]\nrw [← s.coe_toFinset, h, t.coe_toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t✝ s t : Set α\ninst✝¹ : Fintype ↑s\ninst✝ : Fintype ↑t\nh : s = t\n⊢ toFinset s = toFinset t\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝¹ : Fintype ↑s\ninst✝ : Fintype ↑t\n⊢ toFinset s ⊆ toFinset t ↔ s ⊆ t\n[PROOFSTEP]\nsimp [Finset.subset_iff, Set.subset_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t✝ : Set α\ninst✝ : Fintype ↑s\nt : Finset α\n⊢ toFinset s ⊂ t ↔ s ⊂ ↑t\n[PROOFSTEP]\nrw [← Finset.coe_ssubset, coe_toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t : Set α\ns : Finset α\ninst✝ : Fintype ↑t\n⊢ s ⊆ toFinset t ↔ ↑s ⊆ t\n[PROOFSTEP]\nrw [← Finset.coe_subset, coe_toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t : Set α\ns : Finset α\ninst✝ : Fintype ↑t\n⊢ s ⊂ toFinset t ↔ ↑s ⊂ t\n[PROOFSTEP]\nrw [← Finset.coe_ssubset, coe_toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝¹ : Fintype ↑s\ninst✝ : Fintype ↑t\n⊢ toFinset s ⊂ toFinset t ↔ s ⊂ t\n[PROOFSTEP]\nsimp only [Finset.ssubset_def, toFinset_subset_toFinset, ssubset_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t✝ : Set α\ninst✝ : Fintype ↑s\nt : Finset α\n⊢ toFinset s ⊆ t ↔ s ⊆ ↑t\n[PROOFSTEP]\nrw [← Finset.coe_subset, coe_toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝¹ : Fintype ↑s\ninst✝ : Fintype ↑t\n⊢ Disjoint (toFinset s) (toFinset t) ↔ Disjoint s t\n[PROOFSTEP]\nsimp only [← disjoint_coe, coe_toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝³ : DecidableEq α\ninst✝² : Fintype ↑s\ninst✝¹ : Fintype ↑t\ninst✝ : Fintype ↑(s ∩ t)\n⊢ toFinset (s ∩ t) = toFinset s ∩ toFinset t\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝³ : DecidableEq α\ninst✝² : Fintype ↑s\ninst✝¹ : Fintype ↑t\ninst✝ : Fintype ↑(s ∩ t)\na✝ : α\n⊢ a✝ ∈ toFinset (s ∩ t) ↔ a✝ ∈ toFinset s ∩ toFinset t\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝³ : DecidableEq α\ninst✝² : Fintype ↑s\ninst✝¹ : Fintype ↑t\ninst✝ : Fintype ↑(s ∪ t)\n⊢ toFinset (s ∪ t) = toFinset s ∪ toFinset t\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝³ : DecidableEq α\ninst✝² : Fintype ↑s\ninst✝¹ : Fintype ↑t\ninst✝ : Fintype ↑(s ∪ t)\na✝ : α\n⊢ a✝ ∈ toFinset (s ∪ t) ↔ a✝ ∈ toFinset s ∪ toFinset t\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝³ : DecidableEq α\ninst✝² : Fintype ↑s\ninst✝¹ : Fintype ↑t\ninst✝ : Fintype ↑(s \\ t)\n⊢ toFinset (s \\ t) = toFinset s \\ toFinset t\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝³ : DecidableEq α\ninst✝² : Fintype ↑s\ninst✝¹ : Fintype ↑t\ninst✝ : Fintype ↑(s \\ t)\na✝ : α\n⊢ a✝ ∈ toFinset (s \\ t) ↔ a✝ ∈ toFinset s \\ toFinset t\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝³ : DecidableEq α\ninst✝² : Fintype ↑s\ninst✝¹ : Fintype ↑t\ninst✝ : Fintype ↑(s ∆ t)\n⊢ toFinset (s ∆ t) = toFinset s ∆ toFinset t\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝³ : DecidableEq α\ninst✝² : Fintype ↑s\ninst✝¹ : Fintype ↑t\ninst✝ : Fintype ↑(s ∆ t)\na✝ : α\n⊢ a✝ ∈ toFinset (s ∆ t) ↔ a✝ ∈ toFinset s ∆ toFinset t\n[PROOFSTEP]\nsimp [mem_symmDiff, Finset.mem_symmDiff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝⁴ : DecidableEq α\ninst✝³ : Fintype ↑s\ninst✝² : Fintype ↑t\ninst✝¹ : Fintype α\ninst✝ : Fintype ↑sᶜ\n⊢ toFinset sᶜ = (toFinset s)ᶜ\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝⁴ : DecidableEq α\ninst✝³ : Fintype ↑s\ninst✝² : Fintype ↑t\ninst✝¹ : Fintype α\ninst✝ : Fintype ↑sᶜ\na✝ : α\n⊢ a✝ ∈ toFinset sᶜ ↔ a✝ ∈ (toFinset s)ᶜ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝ : Fintype ↑∅\n⊢ toFinset ∅ = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝ : Fintype ↑∅\na✝ : α\n⊢ a✝ ∈ toFinset ∅ ↔ a✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝¹ : Fintype α\ninst✝ : Fintype ↑univ\n⊢ toFinset univ = Finset.univ\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝¹ : Fintype α\ninst✝ : Fintype ↑univ\na✝ : α\n⊢ a✝ ∈ toFinset univ ↔ a✝ ∈ Finset.univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝ : Fintype ↑s\n⊢ toFinset s = ∅ ↔ s = ∅\n[PROOFSTEP]\nrw [← toFinset_empty, toFinset_inj]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝¹ : Fintype α\ninst✝ : Fintype ↑s\n⊢ toFinset s = Finset.univ ↔ s = univ\n[PROOFSTEP]\nrw [← coe_inj, coe_toFinset, coe_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝² : Fintype α\np : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : Fintype ↑{x | p x}\n⊢ toFinset {x | p x} = filter p Finset.univ\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝² : Fintype α\np : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : Fintype ↑{x | p x}\na✝ : α\n⊢ a✝ ∈ toFinset {x | p x} ↔ a✝ ∈ filter p Finset.univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t : Set α\ninst✝¹ : Fintype α\ns : Set α\ninst✝ : Fintype ↑s\n⊢ toFinset s ⊂ Finset.univ ↔ s ⊂ univ\n[PROOFSTEP]\nrw [← coe_ssubset, coe_toFinset, coe_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t : Set α\ninst✝² : DecidableEq β\nf : α → β\ns : Set α\ninst✝¹ : Fintype ↑s\ninst✝ : Fintype ↑(f '' s)\n⊢ ↑(toFinset (f '' s)) = ↑(Finset.image f (toFinset s))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝² : DecidableEq α\ninst✝¹ : Fintype β\nf : β → α\ninst✝ : Fintype ↑(range f)\n⊢ toFinset (range f) = Finset.image f Finset.univ\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\ninst✝² : DecidableEq α\ninst✝¹ : Fintype β\nf : β → α\ninst✝ : Fintype ↑(range f)\na✝ : α\n⊢ a✝ ∈ toFinset (range f) ↔ a✝ ∈ Finset.image f Finset.univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\na : α\ninst✝ : Fintype ↑{a}\n⊢ toFinset {a} = {a}\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Set α\na : α\ninst✝ : Fintype ↑{a}\na✝ : α\n⊢ a✝ ∈ toFinset {a} ↔ a✝ ∈ {a}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t : Set α\ninst✝² : DecidableEq α\na : α\ns : Set α\ninst✝¹ : Fintype ↑(insert a s)\ninst✝ : Fintype ↑s\n⊢ toFinset (insert a s) = insert a (toFinset s)\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t : Set α\ninst✝² : DecidableEq α\na : α\ns : Set α\ninst✝¹ : Fintype ↑(insert a s)\ninst✝ : Fintype ↑s\na✝ : α\n⊢ a✝ ∈ toFinset (insert a s) ↔ a✝ ∈ insert a (toFinset s)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t : Set α\ninst✝² : Fintype α\ns : Set α\ninst✝¹ : Fintype ↑s\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ filter (fun x => x ∈ s) Finset.univ = toFinset s\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t : Set α\ninst✝² : Fintype α\ns : Set α\ninst✝¹ : Fintype ↑s\ninst✝ : DecidablePred fun x => x ∈ s\na✝ : α\n⊢ a✝ ∈ filter (fun x => x ∈ s) Finset.univ ↔ a✝ ∈ toFinset s\n[PROOFSTEP]\nsimp only [Finset.mem_univ, decide_eq_true_eq, forall_true_left, mem_filter, true_and, mem_toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\ni : Fin (n + 1)\n⊢ image (succAbove i) univ = {i}ᶜ\n[PROOFSTEP]\next m\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\ni m : Fin (n + 1)\n⊢ m ∈ image (succAbove i) univ ↔ m ∈ {i}ᶜ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\n⊢ image succ univ = {0}ᶜ\n[PROOFSTEP]\nrw [← Fin.succAbove_zero, Fin.image_succAbove_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\n⊢ image castSucc univ = {last n}ᶜ\n[PROOFSTEP]\nrw [← Fin.succAbove_last, Fin.image_succAbove_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\n⊢ ¬0 ∈ map { toFun := succ, inj' := (_ : Injective succ) } univ\n[PROOFSTEP]\nsimp [map_eq_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\n⊢ univ =\n    cons 0 (map { toFun := succ, inj' := (_ : Injective succ) } univ)\n      (_ : ¬0 ∈ map { toFun := succ, inj' := (_ : Injective succ) } univ)\n[PROOFSTEP]\nsimp [map_eq_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\n⊢ ¬last n ∈ map castSuccEmb.toEmbedding univ\n[PROOFSTEP]\nsimp [map_eq_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\n⊢ univ =\n    cons (last n) (map castSuccEmb.toEmbedding univ)\n      (_ :\n        ¬last n ∈ map { toFun := castSucc, inj' := (_ : ∀ (x x_1 : Fin n), castSucc x = castSucc x_1 → x = x_1) } univ)\n[PROOFSTEP]\nsimp [map_eq_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\np : Fin (n + 1)\n⊢ ¬p ∈ map (succAboveEmb p).toEmbedding univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\np : Fin (n + 1)\n⊢ univ =\n    cons p (map (succAboveEmb p).toEmbedding univ)\n      (_ :\n        ¬p ∈\n            map { toFun := succAbove p, inj' := (_ : ∀ (x x_1 : Fin n), succAbove p x = succAbove p x_1 → x = x_1) }\n              univ)\n[PROOFSTEP]\nsimp [map_eq_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ny : α\n⊢ ∀ (x : α), x ∈ {y} ↔ x = y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ny : α\n⊢ ∀ (x : α), x ∈ {y} ↔ y = x\n[PROOFSTEP]\nsimp [eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ Multiset.Nodup {true, false}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx : Bool\n⊢ x ∈ { val := {true, false}, nodup := (_ : Multiset.Nodup {true, false}) }\n[PROOFSTEP]\ncases x\n[GOAL]\ncase false\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ false ∈ { val := {true, false}, nodup := (_ : Multiset.Nodup {true, false}) }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ true ∈ { val := {true, false}, nodup := (_ : Multiset.Nodup {true, false}) }\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type ?u.106979\nβ : Type ?u.106978\ninst✝² : DecidableEq α\ninst✝¹ : Fintype (α × β)\ninst✝ : Nonempty β\na : α\n⊢ a ∈ image Prod.fst univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type ?u.109138\nβ : Type ?u.109137\ninst✝² : DecidableEq β\ninst✝¹ : Fintype (α × β)\ninst✝ : Nonempty α\nb : β\n⊢ b ∈ image Prod.snd univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ninst✝ : DecidableEq β\nf : α → β\n⊢ ↑(image f univ) = Set.range f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ninst✝ : DecidableEq β\nf : α → β\nx : β\n⊢ x ∈ ↑(image f univ) ↔ x ∈ Set.range f\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\ninst✝ : Decidable p\nx✝ : PLift p\nh : p\n⊢ { down := h } ∈ if h : p then {{ down := h }} else ∅\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ Multiset.Nodup {True, False}\n[PROOFSTEP]\nsimp [true_ne_false]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ True ∈ { val := {True, False}, nodup := (_ : Multiset.Nodup (True ::ₘ {False})) }\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ False ∈ { val := {True, False}, nodup := (_ : Multiset.Nodup (True ::ₘ {False})) }\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ univ.val = {True, False}.val\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ univ.val = True ::ₘ {False}\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : Fintype α\n⊢ ∀ (x : α), x ∈ filter p univ ↔ p x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\n⊢ Set α → Finset α\n[PROOFSTEP]\nclassical exact fun s => s.toFinset\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\n⊢ Set α → Finset α\n[PROOFSTEP]\nexact fun s => s.toFinset\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\ns : Finset α\n⊢ Set.toFinset ↑s = s\n[PROOFSTEP]\nconvert Finset.toFinset_coe s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\ns : Set α\n⊢ ↑(Set.toFinset s) = s\n[PROOFSTEP]\nclassical exact s.coe_toFinset\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Fintype α\ns : Set α\n⊢ ↑(Set.toFinset s) = s\n[PROOFSTEP]\nexact s.coe_toFinset\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns : Set α\ninst✝ : Fintype ↑s\n⊢ ↑finsetEquivSet.symm s = Set.toFinset s\n[PROOFSTEP]\nsimp [finsetEquivSet]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns : Set α\ninst✝ : Fintype ↑s\n⊢ Set.toFinset s = Set.toFinset s\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_3.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ns : Set α\ninst✝ : Fintype ↑s\n⊢ (Subtype.fintype fun x => x ∈ s) = inst✝\n[PROOFSTEP]\nexact Subsingleton.elim _ _\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Prop\nβ : α → Prop\ninst✝¹ : Decidable α\ninst✝ : (a : α) → Decidable (β a)\nh : ∃ a, β a\nx✝ : (a : α) ×' β a\nfst✝ : α\nsnd✝ : β fst✝\n⊢ { fst := fst✝, snd := snd✝ } ∈ {{ fst := (_ : α), snd := (_ : β (_ : α)) }}\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\np : Prop\ninst✝¹ : Decidable p\nα : p → Type u_4\ninst✝ : (hp : p) → Fintype (α hp)\nhp : ¬p\nh : (hp : p) → α hp\nx : p\n⊢ h x = False.elim (_ : False)\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Fintype α\ninst✝ : DecidableEq β\nf : α → β\nb : β\n⊢ b ∈ image f univ ↔ b ∈ Set.range f\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\np : α → Prop\ninst✝ : DecidablePred p\nhp : ∃! a, p a\n⊢ ∃! a, a ∈ univ ∧ p a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\np : α → Prop\ninst✝ : DecidablePred p\nhp : ∃! a, p a\n⊢ ∃! a, p a\n[PROOFSTEP]\nexact hp\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Fintype α✝\np✝ : α✝ → Prop\ninst✝² : DecidablePred p✝\nα : Type u_4\np : α → Prop\ninst✝¹ : Fintype { a // p a }\ninst✝ : DecidableEq α\nx y : { a // p a }\nhy : (fun a => ↑a = ↑x) y\n⊢ y = x\n[PROOFSTEP]\nsimpa [Subtype.ext_iff] using hy\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Fintype α✝\np✝ : α✝ → Prop\ninst✝² : DecidablePred p✝\nα : Type u_4\np : α → Prop\ninst✝¹ : Fintype { a // p a }\ninst✝ : DecidableEq α\nx : { a // p a }\nh : optParam (∃! a, ↑a = ↑x) (_ : ∃ x_1, (fun a => ↑a = ↑x) x_1 ∧ ∀ (y : { a // p a }), (fun a => ↑a = ↑x) y → y = x_1)\n⊢ choose (fun y => ↑y = ↑x) h = x\n[PROOFSTEP]\nrw [Subtype.ext_iff, Fintype.choose_spec (fun y : { a : α // p a } => (y : α) = x) _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ninst✝ : DecidableEq β\nf : α → β\nf_bij : Bijective f\nb : β\n⊢ ∃! a, (fun a => f a = b) a\n[PROOFSTEP]\nrcases f_bij.right b with ⟨a', fa_eq_b⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ninst✝ : DecidableEq β\nf : α → β\nf_bij : Bijective f\nb : β\na' : α\nfa_eq_b : f a' = b\n⊢ ∃! a, (fun a => f a = b) a\n[PROOFSTEP]\nrw [← fa_eq_b]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Fintype α\ninst✝ : DecidableEq β\nf : α → β\nf_bij : Bijective f\nb : β\na' : α\nfa_eq_b : f a' = b\n⊢ ∃! a, (fun a => f a = f a') a\n[PROOFSTEP]\nexact ⟨a', ⟨rfl, fun a h => f_bij.left h⟩⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type ?u.140463\ns : Multiset α\nl : List α\nh : ∃ x, x ∈ Quotient.mk (List.isSetoid α) l\nx✝ : ∃ x, x ∈ Quotient.mk (List.isSetoid α) []\n⊢ False\n[PROOFSTEP]\ntauto\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type ?u.141508\ninst✝¹ : Nonempty α\ninst✝ : Fintype α\n⊢ ∃ x, x ∈ univ.val\n[PROOFSTEP]\nsimp\n[GOAL]\na✝ : ℕ\nn : ℕ := a✝\ni : Fin n\n⊢ (invImage (fun a => sizeOf a) instWellFoundedRelation).1 (↑i) a✝\n[PROOFSTEP]\nexact i.2\n[GOAL]\nα : Type u_4\ninst✝ : DecidableEq α\nP : α → Prop\nr : α → α → Prop\nh : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\na✝² : ℕ\na✝¹ : (y : ℕ) → (invImage (fun a => sizeOf a) instWellFoundedRelation).1 y a✝² → α\nn : ℕ := a✝²\na✝ : ∀ (x : α), x ∈ image (fun i => a✝¹ ↑i (_ : ↑i < n)) univ → P x\ni : Fin n\n⊢ (invImage (fun a => sizeOf a) instWellFoundedRelation).1 (↑i) a✝²\n[PROOFSTEP]\nexact i.2\n[GOAL]\na✝ : ℕ\nn : ℕ := a✝\ni : Fin n\n⊢ (invImage (fun a => sizeOf a) instWellFoundedRelation).1 (↑i) a✝\n[PROOFSTEP]\nexact i.2\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nh : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\n⊢ ∃ f, (∀ (n : ℕ), P (f n)) ∧ ∀ (m n : ℕ), m < n → r (f m) (f n)\n[PROOFSTEP]\nclassical\nhave : Nonempty α := by\n  rcases h ∅ (by simp) with ⟨y, _⟩\n  exact ⟨y⟩\nchoose! F hF using h\nhave h' : ∀ s : Finset α, ∃ y, (∀ x ∈ s, P x) → P y ∧ ∀ x ∈ s, r x y := fun s => ⟨F s, hF s⟩\nset f := seqOfForallFinsetExistsAux P r h' with hf\nhave A : ∀ n : ℕ, P (f n) := by\n  intro n\n  induction' n using Nat.strong_induction_on with n IH\n  have IH' : ∀ x : Fin n, P (f x) := fun n => IH n.1 n.2\n  rw [hf, seqOfForallFinsetExistsAux]\n  exact\n    (Classical.choose_spec (h' (Finset.image (fun i : Fin n => f i) (Finset.univ : Finset (Fin n)))) (by simp [IH'])).1\nrefine' ⟨f, A, fun m n hmn => _⟩\nconv_rhs => rw [hf]\nrw [seqOfForallFinsetExistsAux]\napply (Classical.choose_spec (h' (Finset.image (fun i : Fin n => f i) (Finset.univ : Finset (Fin n)))) (by simp [A])).2\nexact Finset.mem_image.2 ⟨⟨m, hmn⟩, Finset.mem_univ _, rfl⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nh : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\n⊢ ∃ f, (∀ (n : ℕ), P (f n)) ∧ ∀ (m n : ℕ), m < n → r (f m) (f n)\n[PROOFSTEP]\nhave : Nonempty α := by\n  rcases h ∅ (by simp) with ⟨y, _⟩\n  exact ⟨y⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nh : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\n⊢ Nonempty α\n[PROOFSTEP]\nrcases h ∅ (by simp) with ⟨y, _⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nh : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\n⊢ ∀ (x : α), x ∈ ∅ → P x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nh : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\ny : α\nh✝ : P y ∧ ∀ (x : α), x ∈ ∅ → r x y\n⊢ Nonempty α\n[PROOFSTEP]\nexact ⟨y⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nh : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\nthis : Nonempty α\n⊢ ∃ f, (∀ (n : ℕ), P (f n)) ∧ ∀ (m n : ℕ), m < n → r (f m) (f n)\n[PROOFSTEP]\nchoose! F hF using h\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\n⊢ ∃ f, (∀ (n : ℕ), P (f n)) ∧ ∀ (m n : ℕ), m < n → r (f m) (f n)\n[PROOFSTEP]\nhave h' : ∀ s : Finset α, ∃ y, (∀ x ∈ s, P x) → P y ∧ ∀ x ∈ s, r x y := fun s => ⟨F s, hF s⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\n⊢ ∃ f, (∀ (n : ℕ), P (f n)) ∧ ∀ (m n : ℕ), m < n → r (f m) (f n)\n[PROOFSTEP]\nset f := seqOfForallFinsetExistsAux P r h' with hf\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\n⊢ ∃ f, (∀ (n : ℕ), P (f n)) ∧ ∀ (m n : ℕ), m < n → r (f m) (f n)\n[PROOFSTEP]\nhave A : ∀ n : ℕ, P (f n) := by\n  intro n\n  induction' n using Nat.strong_induction_on with n IH\n  have IH' : ∀ x : Fin n, P (f x) := fun n => IH n.1 n.2\n  rw [hf, seqOfForallFinsetExistsAux]\n  exact\n    (Classical.choose_spec (h' (Finset.image (fun i : Fin n => f i) (Finset.univ : Finset (Fin n)))) (by simp [IH'])).1\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\n⊢ ∀ (n : ℕ), P (f n)\n[PROOFSTEP]\nintro n\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nn : ℕ\n⊢ P (f n)\n[PROOFSTEP]\ninduction' n using Nat.strong_induction_on with n IH\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nn : ℕ\nIH : ∀ (m : ℕ), m < n → P (f m)\n⊢ P (f n)\n[PROOFSTEP]\nhave IH' : ∀ x : Fin n, P (f x) := fun n => IH n.1 n.2\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nn : ℕ\nIH : ∀ (m : ℕ), m < n → P (f m)\nIH' : ∀ (x : Fin n), P (f ↑x)\n⊢ P (f n)\n[PROOFSTEP]\nrw [hf, seqOfForallFinsetExistsAux]\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nn : ℕ\nIH : ∀ (m : ℕ), m < n → P (f m)\nIH' : ∀ (x : Fin n), P (f ↑x)\n⊢ P\n    (Classical.choose\n      (_ :\n        ∃ y,\n          (∀ (x : α), x ∈ image (fun i => seqOfForallFinsetExistsAux P r h' ↑i) univ → P x) →\n            P y ∧ ∀ (x : α), x ∈ image (fun i => seqOfForallFinsetExistsAux P r h' ↑i) univ → r x y))\n[PROOFSTEP]\nexact\n  (Classical.choose_spec (h' (Finset.image (fun i : Fin n => f i) (Finset.univ : Finset (Fin n)))) (by simp [IH'])).1\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nn : ℕ\nIH : ∀ (m : ℕ), m < n → P (f m)\nIH' : ∀ (x : Fin n), P (f ↑x)\n⊢ ∀ (x : α), x ∈ image (fun i => f ↑i) univ → P x\n[PROOFSTEP]\nsimp [IH']\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nA : ∀ (n : ℕ), P (f n)\n⊢ ∃ f, (∀ (n : ℕ), P (f n)) ∧ ∀ (m n : ℕ), m < n → r (f m) (f n)\n[PROOFSTEP]\nrefine' ⟨f, A, fun m n hmn => _⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nA : ∀ (n : ℕ), P (f n)\nm n : ℕ\nhmn : m < n\n⊢ r (f m) (f n)\n[PROOFSTEP]\nconv_rhs => rw [hf]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nA : ∀ (n : ℕ), P (f n)\nm n : ℕ\nhmn : m < n\n| f n\n[PROOFSTEP]\nrw [hf]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nA : ∀ (n : ℕ), P (f n)\nm n : ℕ\nhmn : m < n\n| f n\n[PROOFSTEP]\nrw [hf]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nA : ∀ (n : ℕ), P (f n)\nm n : ℕ\nhmn : m < n\n| f n\n[PROOFSTEP]\nrw [hf]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nA : ∀ (n : ℕ), P (f n)\nm n : ℕ\nhmn : m < n\n⊢ r (f m) (seqOfForallFinsetExistsAux P r h' n)\n[PROOFSTEP]\nrw [seqOfForallFinsetExistsAux]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nA : ∀ (n : ℕ), P (f n)\nm n : ℕ\nhmn : m < n\n⊢ r (f m)\n    (Classical.choose\n      (_ :\n        ∃ y,\n          (∀ (x : α), x ∈ image (fun i => seqOfForallFinsetExistsAux P r h' ↑i) univ → P x) →\n            P y ∧ ∀ (x : α), x ∈ image (fun i => seqOfForallFinsetExistsAux P r h' ↑i) univ → r x y))\n[PROOFSTEP]\napply (Classical.choose_spec (h' (Finset.image (fun i : Fin n => f i) (Finset.univ : Finset (Fin n)))) (by simp [A])).2\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nA : ∀ (n : ℕ), P (f n)\nm n : ℕ\nhmn : m < n\n⊢ ∀ (x : α), x ∈ image (fun i => f ↑i) univ → P x\n[PROOFSTEP]\nsimp [A]\n[GOAL]\ncase a\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\nthis : Nonempty α\nF : Finset α → α\nhF : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → P (F s) ∧ ∀ (x : α), x ∈ s → r x (F s)\nh' : ∀ (s : Finset α), ∃ y, (∀ (x : α), x ∈ s → P x) → P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α := seqOfForallFinsetExistsAux P r h'\nhf : f = seqOfForallFinsetExistsAux P r h'\nA : ∀ (n : ℕ), P (f n)\nm n : ℕ\nhmn : m < n\n⊢ f m ∈ image (fun i => f ↑i) univ\n[PROOFSTEP]\nexact Finset.mem_image.2 ⟨⟨m, hmn⟩, Finset.mem_univ _, rfl⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\ninst✝ : IsSymm α r\nh : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\n⊢ ∃ f, (∀ (n : ℕ), P (f n)) ∧ ∀ (m n : ℕ), m ≠ n → r (f m) (f n)\n[PROOFSTEP]\nrcases exists_seq_of_forall_finset_exists P r h with ⟨f, hf, hf'⟩\n[GOAL]\ncase intro.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\ninst✝ : IsSymm α r\nh : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α\nhf : ∀ (n : ℕ), P (f n)\nhf' : ∀ (m n : ℕ), m < n → r (f m) (f n)\n⊢ ∃ f, (∀ (n : ℕ), P (f n)) ∧ ∀ (m n : ℕ), m ≠ n → r (f m) (f n)\n[PROOFSTEP]\nrefine' ⟨f, hf, fun m n hmn => _⟩\n[GOAL]\ncase intro.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\ninst✝ : IsSymm α r\nh : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α\nhf : ∀ (n : ℕ), P (f n)\nhf' : ∀ (m n : ℕ), m < n → r (f m) (f n)\nm n : ℕ\nhmn : m ≠ n\n⊢ r (f m) (f n)\n[PROOFSTEP]\nrcases lt_trichotomy m n with (h | rfl | h)\n[GOAL]\ncase intro.intro.inl\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\ninst✝ : IsSymm α r\nh✝ : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α\nhf : ∀ (n : ℕ), P (f n)\nhf' : ∀ (m n : ℕ), m < n → r (f m) (f n)\nm n : ℕ\nhmn : m ≠ n\nh : m < n\n⊢ r (f m) (f n)\n[PROOFSTEP]\nexact hf' m n h\n[GOAL]\ncase intro.intro.inr.inl\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\ninst✝ : IsSymm α r\nh : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α\nhf : ∀ (n : ℕ), P (f n)\nhf' : ∀ (m n : ℕ), m < n → r (f m) (f n)\nm : ℕ\nhmn : m ≠ m\n⊢ r (f m) (f m)\n[PROOFSTEP]\nexact (hmn rfl).elim\n[GOAL]\ncase intro.intro.inr.inr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\ninst✝ : IsSymm α r\nh✝ : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α\nhf : ∀ (n : ℕ), P (f n)\nhf' : ∀ (m n : ℕ), m < n → r (f m) (f n)\nm n : ℕ\nhmn : m ≠ n\nh : n < m\n⊢ r (f m) (f n)\n[PROOFSTEP]\napply symm\n[GOAL]\ncase intro.intro.inr.inr.a\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nP : α → Prop\nr : α → α → Prop\ninst✝ : IsSymm α r\nh✝ : ∀ (s : Finset α), (∀ (x : α), x ∈ s → P x) → ∃ y, P y ∧ ∀ (x : α), x ∈ s → r x y\nf : ℕ → α\nhf : ∀ (n : ℕ), P (f n)\nhf' : ∀ (m n : ℕ), m < n → r (f m) (f n)\nm n : ℕ\nhmn : m ≠ n\nh : n < m\n⊢ r (f n) (f m)\n[PROOFSTEP]\nexact hf' n m h\n", "meta": {"mathlib_filename": "Mathlib.Data.Fintype.Basic", "llama_tokens": 24474, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6370307944803832, "lm_q2_score": 0.6076631698328916, "lm_q1q2_score": 0.387100151855115}}
{"text": "[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.11796, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nx : S.X₃ ⟶ A\nhx : k = S.g ≫ x\n⊢ S.f ≫ k = 0\n[PROOFSTEP]\nrw [hx, S.zero_assoc, zero_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nx : S.X₃ ⟶ A\nhx : k = S.g ≫ x\n⊢ h.ι ≫ descQ h k (_ : S.f ≫ k = 0) = 0\n[PROOFSTEP]\nrw [show 0 = h.ι ≫ h.g' ≫ x by simp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nx : S.X₃ ⟶ A\nhx : k = S.g ≫ x\n⊢ 0 = h.ι ≫ g' h ≫ x\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nx : S.X₃ ⟶ A\nhx : k = S.g ≫ x\n⊢ h.ι ≫ descQ h k (_ : S.f ≫ k = 0) = h.ι ≫ g' h ≫ x\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nx : S.X₃ ⟶ A\nhx : k = S.g ≫ x\n⊢ descQ h k (_ : S.f ≫ k = 0) = g' h ≫ x\n[PROOFSTEP]\nsimp only [← cancel_epi h.p, hx, p_descQ, p_g'_assoc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhf : S.f = 0\n⊢ S.f ≫ 𝟙 S.X₂ = 0\n[PROOFSTEP]\nrw [hf, comp_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhf : S.f = 0\n⊢ descQ h (𝟙 S.X₂) (_ : S.f ≫ 𝟙 S.X₂ = 0) ≫ h.p = 𝟙 h.Q\n[PROOFSTEP]\nsimp only [← cancel_epi h.p, p_descQ_assoc, id_comp, comp_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhg : S.g = 0\n⊢ IsIso h.ι\n[PROOFSTEP]\nhave ⟨φ, hφ⟩ := KernelFork.IsLimit.lift' h.hι' (𝟙 _) (by rw [← cancel_epi h.p, id_comp, p_g', comp_zero, hg])\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhg : S.g = 0\n⊢ 𝟙 h.Q ≫ g' h = 0\n[PROOFSTEP]\nrw [← cancel_epi h.p, id_comp, p_g', comp_zero, hg]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhg : S.g = 0\nφ : h.Q ⟶ (KernelFork.ofι h.ι (_ : h.ι ≫ g' h = 0)).pt\nhφ : φ ≫ Fork.ι (KernelFork.ofι h.ι (_ : h.ι ≫ g' h = 0)) = 𝟙 h.Q\n⊢ IsIso h.ι\n[PROOFSTEP]\ndsimp at hφ \n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhg : S.g = 0\nφ : h.Q ⟶ (KernelFork.ofι h.ι (_ : h.ι ≫ g' h = 0)).pt\nhφ : φ ≫ h.ι = 𝟙 h.Q\n⊢ IsIso h.ι\n[PROOFSTEP]\nexact ⟨φ, by rw [← cancel_mono h.ι, assoc, hφ, comp_id, id_comp], hφ⟩\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhg : S.g = 0\nφ : h.Q ⟶ (KernelFork.ofι h.ι (_ : h.ι ≫ g' h = 0)).pt\nhφ : φ ≫ h.ι = 𝟙 h.Q\n⊢ h.ι ≫ φ = 𝟙 h.H\n[PROOFSTEP]\nrw [← cancel_mono h.ι, assoc, hφ, comp_id, id_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.20229, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhf : S.f = 0\nc : KernelFork S.g\nhc : IsLimit c\n⊢ S.f ≫ 𝟙 S.X₂ = 0\n[PROOFSTEP]\nrw [comp_id, hf]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.20229, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhf : S.f = 0\nc : KernelFork S.g\nhc : IsLimit c\n⊢ (Iso.refl c.pt).hom ≫ Fork.ι (KernelFork.ofι (Fork.ι c) (_ : Fork.ι c ≫ S.g = 0)) = Fork.ι c\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhf : S.f = 0\nc : KernelFork S.g\nhc : IsLimit c\n⊢ g' (ofIsLimitKernelFork S hf c hc) = S.g\n[PROOFSTEP]\nrw [← cancel_epi (ofIsLimitKernelFork S hf c hc).p, p_g', ofIsLimitKernelFork_p, id_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.25328, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhg : S.g = 0\nc : CokernelCofork S.f\nhc : IsColimit c\n⊢ Cofork.π c ≫ (Iso.refl c.pt).hom = Cofork.π (CokernelCofork.ofπ (Cofork.π c) (_ : S.f ≫ Cofork.π c = 0))\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.25328, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhg : S.g = 0\nc : CokernelCofork S.f\nhc : IsColimit c\n⊢ Cofork.π c ≫\n      𝟙 c.pt ≫\n        IsColimit.desc (IsColimit.ofIsoColimit hc (Cofork.ext (Iso.refl c.pt)))\n          (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)) =\n    Cofork.π c ≫ 0\n[PROOFSTEP]\nsimp [hg]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.25328, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhg : S.g = 0\nc : CokernelCofork S.f\nhc : IsColimit c\n⊢ Cofork.π c ≫\n      IsColimit.desc (IsColimit.ofIsoColimit hc (Cofork.ext (Iso.refl c.pt)))\n        (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)) =\n    Cofork.π c ≫ 0\n[PROOFSTEP]\nsimp [hg]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhg : S.g = 0\nc : CokernelCofork S.f\nhc : IsColimit c\n⊢ g' (ofIsColimitCokernelCofork S hg c hc) = 0\n[PROOFSTEP]\nrw [← cancel_epi (ofIsColimitCokernelCofork S hg c hc).p, p_g', hg, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.30991, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhf : S.f = 0\nhg : S.g = 0\n⊢ S.f ≫ 𝟙 S.X₂ = 0\n[PROOFSTEP]\nrw [comp_id, hf]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.30991, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhf : S.f = 0\nhg : S.g = 0\n⊢ 𝟙 S.X₂ ≫ IsColimit.desc (CokernelCofork.IsColimit.ofId S.f hf) (CokernelCofork.ofπ S.g (_ : S.f ≫ S.g = 0)) = 0\n[PROOFSTEP]\nchange 𝟙 _ ≫ S.g = 0\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.30991, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhf : S.f = 0\nhg : S.g = 0\n⊢ 𝟙 S.X₂ ≫ S.g = 0\n[PROOFSTEP]\nsimp only [hg, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nhf : S.f = 0\nhg : S.g = 0\n⊢ g' (ofZeros S hf hg) = 0\n[PROOFSTEP]\nrw [← cancel_epi ((ofZeros S hf hg).p), comp_zero, p_g', hg]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.57832, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nψ₁ ψ₂ : RightHomologyMapData φ h₁ h₂\n⊢ ψ₁ = ψ₂\n[PROOFSTEP]\nhave hQ : ψ₁.φQ = ψ₂.φQ := by rw [← cancel_epi h₁.p, commp, commp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.57832, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nψ₁ ψ₂ : RightHomologyMapData φ h₁ h₂\n⊢ ψ₁.φQ = ψ₂.φQ\n[PROOFSTEP]\nrw [← cancel_epi h₁.p, commp, commp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.57832, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nψ₁ ψ₂ : RightHomologyMapData φ h₁ h₂\nhQ : ψ₁.φQ = ψ₂.φQ\n⊢ ψ₁ = ψ₂\n[PROOFSTEP]\nhave hH : ψ₁.φH = ψ₂.φH := by rw [← cancel_mono h₂.ι, commι, commι, hQ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.57832, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nψ₁ ψ₂ : RightHomologyMapData φ h₁ h₂\nhQ : ψ₁.φQ = ψ₂.φQ\n⊢ ψ₁.φH = ψ₂.φH\n[PROOFSTEP]\nrw [← cancel_mono h₂.ι, commι, commι, hQ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.57832, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nψ₁ ψ₂ : RightHomologyMapData φ h₁ h₂\nhQ : ψ₁.φQ = ψ₂.φQ\nhH : ψ₁.φH = ψ₂.φH\n⊢ ψ₁ = ψ₂\n[PROOFSTEP]\ncases ψ₁\n[GOAL]\ncase mk\nC : Type u_1\ninst✝¹ : Category.{?u.57832, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nψ₂ : RightHomologyMapData φ h₁ h₂\nφQ✝ : h₁.Q ⟶ h₂.Q\nφH✝ : h₁.H ⟶ h₂.H\ncommp✝ : h₁.p ≫ φQ✝ = φ.τ₂ ≫ h₂.p\ncommg'✝ : φQ✝ ≫ RightHomologyData.g' h₂ = RightHomologyData.g' h₁ ≫ φ.τ₃\ncommι✝ : φH✝ ≫ h₂.ι = h₁.ι ≫ φQ✝\nhQ : (mk φQ✝ φH✝).φQ = ψ₂.φQ\nhH : (mk φQ✝ φH✝).φH = ψ₂.φH\n⊢ mk φQ✝ φH✝ = ψ₂\n[PROOFSTEP]\ncases ψ₂\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝¹ : Category.{?u.57832, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nφQ✝¹ : h₁.Q ⟶ h₂.Q\nφH✝¹ : h₁.H ⟶ h₂.H\ncommp✝¹ : h₁.p ≫ φQ✝¹ = φ.τ₂ ≫ h₂.p\ncommg'✝¹ : φQ✝¹ ≫ RightHomologyData.g' h₂ = RightHomologyData.g' h₁ ≫ φ.τ₃\ncommι✝¹ : φH✝¹ ≫ h₂.ι = h₁.ι ≫ φQ✝¹\nφQ✝ : h₁.Q ⟶ h₂.Q\nφH✝ : h₁.H ⟶ h₂.H\ncommp✝ : h₁.p ≫ φQ✝ = φ.τ₂ ≫ h₂.p\ncommg'✝ : φQ✝ ≫ RightHomologyData.g' h₂ = RightHomologyData.g' h₁ ≫ φ.τ₃\ncommι✝ : φH✝ ≫ h₂.ι = h₁.ι ≫ φQ✝\nhQ : (mk φQ✝¹ φH✝¹).φQ = (mk φQ✝ φH✝).φQ\nhH : (mk φQ✝¹ φH✝¹).φH = (mk φQ✝ φH✝).φH\n⊢ mk φQ✝¹ φH✝¹ = mk φQ✝ φH✝\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.60291, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\n⊢ RightHomologyMapData φ h₁ h₂\n[PROOFSTEP]\nlet φQ : h₁.Q ⟶ h₂.Q := h₁.descQ (φ.τ₂ ≫ h₂.p) (by rw [← φ.comm₁₂_assoc, h₂.wp, comp_zero])\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.60291, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\n⊢ S₁.f ≫ φ.τ₂ ≫ h₂.p = 0\n[PROOFSTEP]\nrw [← φ.comm₁₂_assoc, h₂.wp, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.60291, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nφQ : h₁.Q ⟶ h₂.Q := RightHomologyData.descQ h₁ (φ.τ₂ ≫ h₂.p) (_ : S₁.f ≫ φ.τ₂ ≫ h₂.p = 0)\n⊢ RightHomologyMapData φ h₁ h₂\n[PROOFSTEP]\nhave commg' : φQ ≫ h₂.g' = h₁.g' ≫ φ.τ₃ := by\n  rw [← cancel_epi h₁.p, RightHomologyData.p_descQ_assoc, assoc, RightHomologyData.p_g', φ.comm₂₃,\n    RightHomologyData.p_g'_assoc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.60291, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nφQ : h₁.Q ⟶ h₂.Q := RightHomologyData.descQ h₁ (φ.τ₂ ≫ h₂.p) (_ : S₁.f ≫ φ.τ₂ ≫ h₂.p = 0)\n⊢ φQ ≫ RightHomologyData.g' h₂ = RightHomologyData.g' h₁ ≫ φ.τ₃\n[PROOFSTEP]\nrw [← cancel_epi h₁.p, RightHomologyData.p_descQ_assoc, assoc, RightHomologyData.p_g', φ.comm₂₃,\n  RightHomologyData.p_g'_assoc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.60291, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nφQ : h₁.Q ⟶ h₂.Q := RightHomologyData.descQ h₁ (φ.τ₂ ≫ h₂.p) (_ : S₁.f ≫ φ.τ₂ ≫ h₂.p = 0)\ncommg' : φQ ≫ RightHomologyData.g' h₂ = RightHomologyData.g' h₁ ≫ φ.τ₃\n⊢ RightHomologyMapData φ h₁ h₂\n[PROOFSTEP]\nlet φH : h₁.H ⟶ h₂.H := h₂.liftH (h₁.ι ≫ φQ) (by rw [assoc, commg', RightHomologyData.ι_g'_assoc, zero_comp])\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.60291, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nφQ : h₁.Q ⟶ h₂.Q := RightHomologyData.descQ h₁ (φ.τ₂ ≫ h₂.p) (_ : S₁.f ≫ φ.τ₂ ≫ h₂.p = 0)\ncommg' : φQ ≫ RightHomologyData.g' h₂ = RightHomologyData.g' h₁ ≫ φ.τ₃\n⊢ (h₁.ι ≫ φQ) ≫ RightHomologyData.g' h₂ = 0\n[PROOFSTEP]\nrw [assoc, commg', RightHomologyData.ι_g'_assoc, zero_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.60291, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nφQ : h₁.Q ⟶ h₂.Q := RightHomologyData.descQ h₁ (φ.τ₂ ≫ h₂.p) (_ : S₁.f ≫ φ.τ₂ ≫ h₂.p = 0)\ncommg' : φQ ≫ RightHomologyData.g' h₂ = RightHomologyData.g' h₁ ≫ φ.τ₃\nφH : h₁.H ⟶ h₂.H := RightHomologyData.liftH h₂ (h₁.ι ≫ φQ) (_ : (h₁.ι ≫ φQ) ≫ RightHomologyData.g' h₂ = 0)\n⊢ RightHomologyMapData φ h₁ h₂\n[PROOFSTEP]\nexact ⟨φQ, φH, by simp, commg', by simp⟩\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.60291, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nφQ : h₁.Q ⟶ h₂.Q := RightHomologyData.descQ h₁ (φ.τ₂ ≫ h₂.p) (_ : S₁.f ≫ φ.τ₂ ≫ h₂.p = 0)\ncommg' : φQ ≫ RightHomologyData.g' h₂ = RightHomologyData.g' h₁ ≫ φ.τ₃\nφH : h₁.H ⟶ h₂.H := RightHomologyData.liftH h₂ (h₁.ι ≫ φQ) (_ : (h₁.ι ≫ φQ) ≫ RightHomologyData.g' h₂ = 0)\n⊢ h₁.p ≫ φQ = φ.τ₂ ≫ h₂.p\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.60291, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nφQ : h₁.Q ⟶ h₂.Q := RightHomologyData.descQ h₁ (φ.τ₂ ≫ h₂.p) (_ : S₁.f ≫ φ.τ₂ ≫ h₂.p = 0)\ncommg' : φQ ≫ RightHomologyData.g' h₂ = RightHomologyData.g' h₁ ≫ φ.τ₃\nφH : h₁.H ⟶ h₂.H := RightHomologyData.liftH h₂ (h₁.ι ≫ φQ) (_ : (h₁.ι ≫ φQ) ≫ RightHomologyData.g' h₂ = 0)\n⊢ φH ≫ h₂.ι = h₁.ι ≫ φQ\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nγ₁ γ₂ : RightHomologyMapData φ h₁ h₂\neq : γ₁ = γ₂\n⊢ γ₁.φH = γ₂.φH\n[PROOFSTEP]\nrw [eq]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nγ₁ γ₂ : RightHomologyMapData φ h₁ h₂\neq : γ₁ = γ₂\n⊢ γ₁.φQ = γ₂.φQ\n[PROOFSTEP]\nrw [eq]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.68471, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ✝ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nφ : S₁ ⟶ S₂\nhf₁ : S₁.f = 0\nc₁ : KernelFork S₁.g\nhc₁ : IsLimit c₁\nhf₂ : S₂.f = 0\nc₂ : KernelFork S₂.g\nhc₂ : IsLimit c₂\nf : c₁.pt ⟶ c₂.pt\ncomm : Fork.ι c₁ ≫ φ.τ₂ = f ≫ Fork.ι c₂\n⊢ φ.τ₂ ≫ RightHomologyData.g' (RightHomologyData.ofIsLimitKernelFork S₂ hf₂ c₂ hc₂) =\n    RightHomologyData.g' (RightHomologyData.ofIsLimitKernelFork S₁ hf₁ c₁ hc₁) ≫ φ.τ₃\n[PROOFSTEP]\nsimp only [RightHomologyData.ofIsLimitKernelFork_g', φ.comm₂₃]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.88776, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝ : HasRightHomology S\n⊢ Epi (pOpcycles S)\n[PROOFSTEP]\ndsimp only [pOpcycles]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.88776, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝ : HasRightHomology S\n⊢ Epi (rightHomologyData S).p\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.89155, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝ : HasRightHomology S\n⊢ Mono (rightHomologyι S)\n[PROOFSTEP]\ndsimp only [rightHomologyι]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.89155, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝ : HasRightHomology S\n⊢ Mono (rightHomologyData S).ι\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝ : HasRightHomology S\nA : C\nf₁ f₂ : A ⟶ rightHomology S\n⊢ f₁ = f₂ ↔ f₁ ≫ rightHomologyι S = f₂ ≫ rightHomologyι S\n[PROOFSTEP]\nrw [cancel_mono]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝ : HasRightHomology S\nA : C\nf₁ f₂ : A ⟶ rightHomology S\nh : f₁ ≫ rightHomologyι S = f₂ ≫ rightHomologyι S\n⊢ f₁ = f₂\n[PROOFSTEP]\nsimpa only [rightHomology_ext_iff]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝ : HasRightHomology S\nA : C\nf₁ f₂ : opcycles S ⟶ A\n⊢ f₁ = f₂ ↔ pOpcycles S ≫ f₁ = pOpcycles S ≫ f₂\n[PROOFSTEP]\nrw [cancel_epi]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝ : HasRightHomology S\nA : C\nf₁ f₂ : opcycles S ⟶ A\nh : pOpcycles S ≫ f₁ = pOpcycles S ≫ f₂\n⊢ f₁ = f₂\n[PROOFSTEP]\nsimpa only [opcycles_ext_iff]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.92901, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝ : HasRightHomology S\nhf : S.f = 0\n⊢ opcycles S ≅ S.X₂\n[PROOFSTEP]\nhave := S.isIso_pOpcycles hf\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.92901, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝ : HasRightHomology S\nhf : S.f = 0\nthis : IsIso (pOpcycles S)\n⊢ opcycles S ≅ S.X₂\n[PROOFSTEP]\nexact (asIso S.pOpcycles).symm\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.95802, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝ : HasRightHomology S\nhg : S.g = 0\n⊢ opcycles S ≅ rightHomology S\n[PROOFSTEP]\nhave := S.isIso_rightHomologyι hg\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.95802, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝ : HasRightHomology S\nhg : S.g = 0\nthis : IsIso (rightHomologyι S)\n⊢ opcycles S ≅ rightHomology S\n[PROOFSTEP]\nexact (asIso S.rightHomologyι).symm\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\n⊢ opcyclesMap' φ h₁ h₂ ≫ RightHomologyData.g' h₂ = RightHomologyData.g' h₁ ≫ φ.τ₃\n[PROOFSTEP]\nsimp only [← cancel_epi h₁.p, assoc, φ.comm₂₃, p_opcyclesMap'_assoc, RightHomologyData.p_g'_assoc,\n  RightHomologyData.p_g']\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ₁ : S₁ ⟶ S₂\nφ₂ : S₂ ⟶ S₃\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nh₃ : RightHomologyData S₃\n⊢ rightHomologyMap' (φ₁ ≫ φ₂) h₁ h₃ = rightHomologyMap' φ₁ h₁ h₂ ≫ rightHomologyMap' φ₂ h₂ h₃\n[PROOFSTEP]\nlet γ₁ := rightHomologyMapData φ₁ h₁ h₂\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ₁ : S₁ ⟶ S₂\nφ₂ : S₂ ⟶ S₃\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nh₃ : RightHomologyData S₃\nγ₁ : RightHomologyMapData φ₁ h₁ h₂ := rightHomologyMapData φ₁ h₁ h₂\n⊢ rightHomologyMap' (φ₁ ≫ φ₂) h₁ h₃ = rightHomologyMap' φ₁ h₁ h₂ ≫ rightHomologyMap' φ₂ h₂ h₃\n[PROOFSTEP]\nlet γ₂ := rightHomologyMapData φ₂ h₂ h₃\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ₁ : S₁ ⟶ S₂\nφ₂ : S₂ ⟶ S₃\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nh₃ : RightHomologyData S₃\nγ₁ : RightHomologyMapData φ₁ h₁ h₂ := rightHomologyMapData φ₁ h₁ h₂\nγ₂ : RightHomologyMapData φ₂ h₂ h₃ := rightHomologyMapData φ₂ h₂ h₃\n⊢ rightHomologyMap' (φ₁ ≫ φ₂) h₁ h₃ = rightHomologyMap' φ₁ h₁ h₂ ≫ rightHomologyMap' φ₂ h₂ h₃\n[PROOFSTEP]\nrw [γ₁.rightHomologyMap'_eq, γ₂.rightHomologyMap'_eq, (γ₁.comp γ₂).rightHomologyMap'_eq, RightHomologyMapData.comp_φH]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ₁ : S₁ ⟶ S₂\nφ₂ : S₂ ⟶ S₃\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nh₃ : RightHomologyData S₃\n⊢ opcyclesMap' (φ₁ ≫ φ₂) h₁ h₃ = opcyclesMap' φ₁ h₁ h₂ ≫ opcyclesMap' φ₂ h₂ h₃\n[PROOFSTEP]\nlet γ₁ := rightHomologyMapData φ₁ h₁ h₂\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ₁ : S₁ ⟶ S₂\nφ₂ : S₂ ⟶ S₃\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nh₃ : RightHomologyData S₃\nγ₁ : RightHomologyMapData φ₁ h₁ h₂ := rightHomologyMapData φ₁ h₁ h₂\n⊢ opcyclesMap' (φ₁ ≫ φ₂) h₁ h₃ = opcyclesMap' φ₁ h₁ h₂ ≫ opcyclesMap' φ₂ h₂ h₃\n[PROOFSTEP]\nlet γ₂ := rightHomologyMapData φ₂ h₂ h₃\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ₁ : S₁ ⟶ S₂\nφ₂ : S₂ ⟶ S₃\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nh₃ : RightHomologyData S₃\nγ₁ : RightHomologyMapData φ₁ h₁ h₂ := rightHomologyMapData φ₁ h₁ h₂\nγ₂ : RightHomologyMapData φ₂ h₂ h₃ := rightHomologyMapData φ₂ h₂ h₃\n⊢ opcyclesMap' (φ₁ ≫ φ₂) h₁ h₃ = opcyclesMap' φ₁ h₁ h₂ ≫ opcyclesMap' φ₂ h₂ h₃\n[PROOFSTEP]\nrw [γ₁.opcyclesMap'_eq, γ₂.opcyclesMap'_eq, (γ₁.comp γ₂).opcyclesMap'_eq, RightHomologyMapData.comp_φQ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.122914, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ne : S₁ ≅ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\n⊢ rightHomologyMap' e.hom h₁ h₂ ≫ rightHomologyMap' e.inv h₂ h₁ = 𝟙 h₁.H\n[PROOFSTEP]\nrw [← rightHomologyMap'_comp, e.hom_inv_id, rightHomologyMap'_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.122914, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ne : S₁ ≅ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\n⊢ rightHomologyMap' e.inv h₂ h₁ ≫ rightHomologyMap' e.hom h₁ h₂ = 𝟙 h₂.H\n[PROOFSTEP]\nrw [← rightHomologyMap'_comp, e.inv_hom_id, rightHomologyMap'_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.125555, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ne : S₁ ≅ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\n⊢ opcyclesMap' e.hom h₁ h₂ ≫ opcyclesMap' e.inv h₂ h₁ = 𝟙 h₁.Q\n[PROOFSTEP]\nrw [← opcyclesMap'_comp, e.hom_inv_id, opcyclesMap'_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.125555, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ne : S₁ ≅ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\n⊢ opcyclesMap' e.inv h₂ h₁ ≫ opcyclesMap' e.hom h₁ h₂ = 𝟙 h₂.Q\n[PROOFSTEP]\nrw [← opcyclesMap'_comp, e.inv_hom_id, opcyclesMap'_id]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{?u.128180, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ne : S₁ ≅ S₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ rightHomologyMap e.hom ≫ rightHomologyMap e.inv = 𝟙 (rightHomology S₁)\n[PROOFSTEP]\nrw [← rightHomologyMap_comp, e.hom_inv_id, rightHomologyMap_id]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{?u.128180, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ne : S₁ ≅ S₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ rightHomologyMap e.inv ≫ rightHomologyMap e.hom = 𝟙 (rightHomology S₂)\n[PROOFSTEP]\nrw [← rightHomologyMap_comp, e.inv_hom_id, rightHomologyMap_id]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{?u.131838, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ne : S₁ ≅ S₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ opcyclesMap e.hom ≫ opcyclesMap e.inv = 𝟙 (opcycles S₁)\n[PROOFSTEP]\nrw [← opcyclesMap_comp, e.hom_inv_id, opcyclesMap_id]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{?u.131838, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ne : S₁ ≅ S₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ opcyclesMap e.inv ≫ opcyclesMap e.hom = 𝟙 (opcycles S₂)\n[PROOFSTEP]\nrw [← opcyclesMap_comp, e.inv_hom_id, opcyclesMap_id]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\ninst✝ : HasRightHomology S\n⊢ h.p ≫ (opcyclesIso h).inv = pOpcycles S\n[PROOFSTEP]\ndsimp [pOpcycles, RightHomologyData.opcyclesIso]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\ninst✝ : HasRightHomology S\n⊢ h.p ≫ opcyclesMap' (𝟙 S) h (rightHomologyData S) = (rightHomologyData S).p\n[PROOFSTEP]\nsimp only [p_opcyclesMap', id_τ₂, id_comp]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\ninst✝ : HasRightHomology S\n⊢ pOpcycles S ≫ (opcyclesIso h).hom = h.p\n[PROOFSTEP]\nsimp only [← h.p_comp_opcyclesIso_inv, assoc, Iso.inv_hom_id, comp_id]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\ninst✝ : HasRightHomology S\n⊢ (rightHomologyIso h).inv ≫ rightHomologyι S = h.ι ≫ (opcyclesIso h).inv\n[PROOFSTEP]\ndsimp only [rightHomologyι, rightHomologyIso, opcyclesIso, rightHomologyMapIso', opcyclesMapIso', Iso.refl]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\ninst✝ : HasRightHomology S\n⊢ rightHomologyMap' (𝟙 S) h (rightHomologyData S) ≫ (rightHomologyData S).ι =\n    h.ι ≫ opcyclesMap' (𝟙 S) h (rightHomologyData S)\n[PROOFSTEP]\nrw [rightHomologyι_naturality']\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\ninst✝ : HasRightHomology S\n⊢ (rightHomologyIso h).hom ≫ h.ι = rightHomologyι S ≫ (opcyclesIso h).hom\n[PROOFSTEP]\nsimp only [← cancel_mono h.opcyclesIso.inv, ← cancel_epi h.rightHomologyIso.inv, assoc, Iso.inv_hom_id_assoc,\n  Iso.hom_inv_id, comp_id, rightHomologyIso_inv_comp_rightHomologyι]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nγ : RightHomologyMapData φ h₁ h₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ rightHomologyMap φ = (RightHomologyData.rightHomologyIso h₁).hom ≫ γ.φH ≫ (RightHomologyData.rightHomologyIso h₂).inv\n[PROOFSTEP]\ndsimp [RightHomologyData.rightHomologyIso, rightHomologyMapIso']\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nγ : RightHomologyMapData φ h₁ h₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ rightHomologyMap φ =\n    rightHomologyMap' (𝟙 S₁) (rightHomologyData S₁) h₁ ≫ γ.φH ≫ rightHomologyMap' (𝟙 S₂) h₂ (rightHomologyData S₂)\n[PROOFSTEP]\nrw [← γ.rightHomologyMap'_eq, ← rightHomologyMap'_comp, ← rightHomologyMap'_comp, id_comp, comp_id]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nγ : RightHomologyMapData φ h₁ h₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ rightHomologyMap φ = rightHomologyMap' φ (rightHomologyData S₁) (rightHomologyData S₂)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nγ : RightHomologyMapData φ h₁ h₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ opcyclesMap φ = (RightHomologyData.opcyclesIso h₁).hom ≫ γ.φQ ≫ (RightHomologyData.opcyclesIso h₂).inv\n[PROOFSTEP]\ndsimp [RightHomologyData.opcyclesIso, cyclesMapIso']\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nγ : RightHomologyMapData φ h₁ h₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ opcyclesMap φ = opcyclesMap' (𝟙 S₁) (rightHomologyData S₁) h₁ ≫ γ.φQ ≫ opcyclesMap' (𝟙 S₂) h₂ (rightHomologyData S₂)\n[PROOFSTEP]\nrw [← γ.opcyclesMap'_eq, ← opcyclesMap'_comp, ← opcyclesMap'_comp, id_comp, comp_id]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nγ : RightHomologyMapData φ h₁ h₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ opcyclesMap φ = opcyclesMap' φ (rightHomologyData S₁) (rightHomologyData S₂)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nγ : RightHomologyMapData φ h₁ h₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ rightHomologyMap φ ≫ (RightHomologyData.rightHomologyIso h₂).hom = (RightHomologyData.rightHomologyIso h₁).hom ≫ γ.φH\n[PROOFSTEP]\nsimp only [γ.rightHomologyMap_eq, assoc, Iso.inv_hom_id, comp_id]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nγ : RightHomologyMapData φ h₁ h₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ opcyclesMap φ ≫ (RightHomologyData.opcyclesIso h₂).hom = (RightHomologyData.opcyclesIso h₁).hom ≫ γ.φQ\n[PROOFSTEP]\nsimp only [γ.opcyclesMap_eq, assoc, Iso.inv_hom_id, comp_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.155614, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁✝ S₂✝ S₃ S₁ S₂ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : LeftHomologyData S₁\nh₂ : LeftHomologyData S₂\nψ : LeftHomologyMapData φ h₁ h₂\n⊢ ((LeftHomologyData.op h₂).p ≫ ψ.φK.op).unop = ((opMap φ).τ₂ ≫ (LeftHomologyData.op h₁).p).unop\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.155614, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁✝ S₂✝ S₃ S₁ S₂ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : LeftHomologyData S₁\nh₂ : LeftHomologyData S₂\nψ : LeftHomologyMapData φ h₁ h₂\n⊢ (ψ.φK.op ≫ RightHomologyData.g' (LeftHomologyData.op h₁)).unop =\n    (RightHomologyData.g' (LeftHomologyData.op h₂) ≫ (opMap φ).τ₃).unop\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.155614, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁✝ S₂✝ S₃ S₁ S₂ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : LeftHomologyData S₁\nh₂ : LeftHomologyData S₂\nψ : LeftHomologyMapData φ h₁ h₂\n⊢ (ψ.φH.op ≫ (LeftHomologyData.op h₁).ι).unop = ((LeftHomologyData.op h₂).ι ≫ ψ.φK.op).unop\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.158318, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁✝ S₂✝ S₃ : ShortComplex C\nS₁ S₂ : ShortComplex Cᵒᵖ\nφ : S₁ ⟶ S₂\nh₁ : LeftHomologyData S₁\nh₂ : LeftHomologyData S₂\nψ : LeftHomologyMapData φ h₁ h₂\n⊢ ((LeftHomologyData.unop h₂).p ≫ ψ.φK.unop).op = ((unopMap φ).τ₂ ≫ (LeftHomologyData.unop h₁).p).op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.158318, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁✝ S₂✝ S₃ : ShortComplex C\nS₁ S₂ : ShortComplex Cᵒᵖ\nφ : S₁ ⟶ S₂\nh₁ : LeftHomologyData S₁\nh₂ : LeftHomologyData S₂\nψ : LeftHomologyMapData φ h₁ h₂\n⊢ (ψ.φK.unop ≫ RightHomologyData.g' (LeftHomologyData.unop h₁)).op =\n    (RightHomologyData.g' (LeftHomologyData.unop h₂) ≫ (unopMap φ).τ₃).op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.158318, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁✝ S₂✝ S₃ : ShortComplex C\nS₁ S₂ : ShortComplex Cᵒᵖ\nφ : S₁ ⟶ S₂\nh₁ : LeftHomologyData S₁\nh₂ : LeftHomologyData S₂\nψ : LeftHomologyMapData φ h₁ h₂\n⊢ (ψ.φH.unop ≫ (LeftHomologyData.unop h₁).ι).op = ((LeftHomologyData.unop h₂).ι ≫ ψ.φK.unop).op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.160823, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁✝ S₂✝ S₃ S₁ S₂ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nψ : RightHomologyMapData φ h₁ h₂\n⊢ (ψ.φQ.op ≫ (RightHomologyData.op h₁).i).unop = ((RightHomologyData.op h₂).i ≫ (opMap φ).τ₂).unop\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.160823, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁✝ S₂✝ S₃ S₁ S₂ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nψ : RightHomologyMapData φ h₁ h₂\n⊢ (LeftHomologyData.f' (RightHomologyData.op h₂) ≫ ψ.φQ.op).unop =\n    ((opMap φ).τ₁ ≫ LeftHomologyData.f' (RightHomologyData.op h₁)).unop\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.160823, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁✝ S₂✝ S₃ S₁ S₂ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nψ : RightHomologyMapData φ h₁ h₂\n⊢ ((RightHomologyData.op h₂).π ≫ ψ.φH.op).unop = (ψ.φQ.op ≫ (RightHomologyData.op h₁).π).unop\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.163518, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁✝ S₂✝ S₃ : ShortComplex C\nS₁ S₂ : ShortComplex Cᵒᵖ\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nψ : RightHomologyMapData φ h₁ h₂\n⊢ (ψ.φQ.unop ≫ (RightHomologyData.unop h₁).i).op = ((RightHomologyData.unop h₂).i ≫ (unopMap φ).τ₂).op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.163518, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁✝ S₂✝ S₃ : ShortComplex C\nS₁ S₂ : ShortComplex Cᵒᵖ\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nψ : RightHomologyMapData φ h₁ h₂\n⊢ (LeftHomologyData.f' (RightHomologyData.unop h₂) ≫ ψ.φQ.unop).op =\n    ((unopMap φ).τ₁ ≫ LeftHomologyData.f' (RightHomologyData.unop h₁)).op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.163518, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁✝ S₂✝ S₃ : ShortComplex C\nS₁ S₂ : ShortComplex Cᵒᵖ\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nψ : RightHomologyMapData φ h₁ h₂\n⊢ ((RightHomologyData.unop h₂).π ≫ ψ.φH.unop).op = (ψ.φQ.unop ≫ (RightHomologyData.unop h₁).π).op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : LeftHomologyData S₁\nh₂ : LeftHomologyData S₂\n⊢ (leftHomologyMap' φ h₁ h₂).op = rightHomologyMap' (opMap φ) (LeftHomologyData.op h₂) (LeftHomologyData.op h₁)\n[PROOFSTEP]\nlet γ : LeftHomologyMapData φ h₁ h₂ := leftHomologyMapData φ h₁ h₂\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : LeftHomologyData S₁\nh₂ : LeftHomologyData S₂\nγ : LeftHomologyMapData φ h₁ h₂ := leftHomologyMapData φ h₁ h₂\n⊢ (leftHomologyMap' φ h₁ h₂).op = rightHomologyMap' (opMap φ) (LeftHomologyData.op h₂) (LeftHomologyData.op h₁)\n[PROOFSTEP]\nsimp only [γ.leftHomologyMap'_eq, γ.op.rightHomologyMap'_eq, LeftHomologyMapData.op_φH]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\ninst✝¹ : HasLeftHomology S₁\ninst✝ : HasLeftHomology S₂\n⊢ (leftHomologyMap φ).op = (rightHomologyOpIso S₂).inv ≫ rightHomologyMap (opMap φ) ≫ (rightHomologyOpIso S₁).hom\n[PROOFSTEP]\ndsimp [rightHomologyOpIso, RightHomologyData.rightHomologyIso, rightHomologyMap, leftHomologyMap]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\ninst✝¹ : HasLeftHomology S₁\ninst✝ : HasLeftHomology S₂\n⊢ (leftHomologyMap' φ (leftHomologyData S₁) (leftHomologyData S₂)).op =\n    rightHomologyMap' (𝟙 (op S₂)) (LeftHomologyData.op (leftHomologyData S₂)) (rightHomologyData (op S₂)) ≫\n      rightHomologyMap' (opMap φ) (rightHomologyData (op S₂)) (rightHomologyData (op S₁)) ≫\n        rightHomologyMap' (𝟙 (op S₁)) (rightHomologyData (op S₁)) (LeftHomologyData.op (leftHomologyData S₁))\n[PROOFSTEP]\nsimp only [← rightHomologyMap'_comp, comp_id, id_comp, leftHomologyMap'_op]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\n⊢ (rightHomologyMap' φ h₁ h₂).op = leftHomologyMap' (opMap φ) (RightHomologyData.op h₂) (RightHomologyData.op h₁)\n[PROOFSTEP]\nlet γ : RightHomologyMapData φ h₁ h₂ := rightHomologyMapData φ h₁ h₂\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\nγ : RightHomologyMapData φ h₁ h₂ := rightHomologyMapData φ h₁ h₂\n⊢ (rightHomologyMap' φ h₁ h₂).op = leftHomologyMap' (opMap φ) (RightHomologyData.op h₂) (RightHomologyData.op h₁)\n[PROOFSTEP]\nsimp only [γ.rightHomologyMap'_eq, γ.op.leftHomologyMap'_eq, RightHomologyMapData.op_φH]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ (rightHomologyMap φ).op = (leftHomologyOpIso S₂).inv ≫ leftHomologyMap (opMap φ) ≫ (leftHomologyOpIso S₁).hom\n[PROOFSTEP]\ndsimp [leftHomologyOpIso, LeftHomologyData.leftHomologyIso, leftHomologyMap, rightHomologyMap]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\ninst✝¹ : HasRightHomology S₁\ninst✝ : HasRightHomology S₂\n⊢ (rightHomologyMap' φ (rightHomologyData S₁) (rightHomologyData S₂)).op =\n    leftHomologyMap' (𝟙 (op S₂)) (RightHomologyData.op (rightHomologyData S₂)) (leftHomologyData (op S₂)) ≫\n      leftHomologyMap' (opMap φ) (leftHomologyData (op S₂)) (leftHomologyData (op S₁)) ≫\n        leftHomologyMap' (𝟙 (op S₁)) (leftHomologyData (op S₁)) (RightHomologyData.op (rightHomologyData S₁))\n[PROOFSTEP]\nsimp only [← leftHomologyMap'_comp, comp_id, id_comp, rightHomologyMap'_op]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.173881, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₁\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ RightHomologyData S₂\n[PROOFSTEP]\nhaveI : Epi (opMap φ).τ₁ := by dsimp; infer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.173881, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₁\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ Epi (opMap φ).τ₁\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.173881, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₁\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ Epi φ.τ₃.op\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.173881, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₁\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis : Epi (opMap φ).τ₁\n⊢ RightHomologyData S₂\n[PROOFSTEP]\nhaveI : IsIso (opMap φ).τ₂ := by dsimp; infer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.173881, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₁\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis : Epi (opMap φ).τ₁\n⊢ IsIso (opMap φ).τ₂\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.173881, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₁\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis : Epi (opMap φ).τ₁\n⊢ IsIso φ.τ₂.op\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.173881, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₁\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis✝ : Epi (opMap φ).τ₁\nthis : IsIso (opMap φ).τ₂\n⊢ RightHomologyData S₂\n[PROOFSTEP]\nhaveI : Mono (opMap φ).τ₃ := by dsimp; infer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.173881, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₁\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis✝ : Epi (opMap φ).τ₁\nthis : IsIso (opMap φ).τ₂\n⊢ Mono (opMap φ).τ₃\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.173881, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₁\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis✝ : Epi (opMap φ).τ₁\nthis : IsIso (opMap φ).τ₂\n⊢ Mono φ.τ₁.op\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.173881, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₁\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis✝¹ : Epi (opMap φ).τ₁\nthis✝ : IsIso (opMap φ).τ₂\nthis : Mono (opMap φ).τ₃\n⊢ RightHomologyData S₂\n[PROOFSTEP]\nexact (LeftHomologyData.ofEpiOfIsIsoOfMono' (opMap φ) h.op).unop\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₁\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ (ofEpiOfIsIsoOfMono φ h).p = inv φ.τ₂ ≫ h.p\n[PROOFSTEP]\nsimp [ofEpiOfIsIsoOfMono, opMap]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₁\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ g' (ofEpiOfIsIsoOfMono φ h) = g' h ≫ φ.τ₃\n[PROOFSTEP]\nsimp [ofEpiOfIsIsoOfMono, opMap]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.184271, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ RightHomologyData S₁\n[PROOFSTEP]\nhaveI : Epi (opMap φ).τ₁ := by dsimp; infer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.184271, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ Epi (opMap φ).τ₁\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.184271, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ Epi φ.τ₃.op\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.184271, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis : Epi (opMap φ).τ₁\n⊢ RightHomologyData S₁\n[PROOFSTEP]\nhaveI : IsIso (opMap φ).τ₂ := by dsimp; infer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.184271, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis : Epi (opMap φ).τ₁\n⊢ IsIso (opMap φ).τ₂\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.184271, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis : Epi (opMap φ).τ₁\n⊢ IsIso φ.τ₂.op\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.184271, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis✝ : Epi (opMap φ).τ₁\nthis : IsIso (opMap φ).τ₂\n⊢ RightHomologyData S₁\n[PROOFSTEP]\nhaveI : Mono (opMap φ).τ₃ := by dsimp; infer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.184271, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis✝ : Epi (opMap φ).τ₁\nthis : IsIso (opMap φ).τ₂\n⊢ Mono (opMap φ).τ₃\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.184271, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis✝ : Epi (opMap φ).τ₁\nthis : IsIso (opMap φ).τ₂\n⊢ Mono φ.τ₁.op\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.184271, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nthis✝¹ : Epi (opMap φ).τ₁\nthis✝ : IsIso (opMap φ).τ₂\nthis : Mono (opMap φ).τ₃\n⊢ RightHomologyData S₁\n[PROOFSTEP]\nexact (LeftHomologyData.ofEpiOfIsIsoOfMono (opMap φ) h.op).unop\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ (ofEpiOfIsIsoOfMono' φ h).p = φ.τ₂ ≫ h.p\n[PROOFSTEP]\nsimp [ofEpiOfIsIsoOfMono', opMap]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ g' (ofEpiOfIsIsoOfMono' φ h) ≫ φ.τ₃ = g' h\n[PROOFSTEP]\nrw [← cancel_epi (ofEpiOfIsIsoOfMono' φ h).p, p_g'_assoc, ofEpiOfIsIsoOfMono'_p, assoc, p_g', φ.comm₂₃]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.203472, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ IsIso (rightHomologyMap' φ h₁ h₂)\n[PROOFSTEP]\nlet h₂' := RightHomologyData.ofEpiOfIsIsoOfMono φ h₁\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.203472, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nh₂' : RightHomologyData S₂ := RightHomologyData.ofEpiOfIsIsoOfMono φ h₁\n⊢ IsIso (rightHomologyMap' φ h₁ h₂)\n[PROOFSTEP]\nhaveI : IsIso (rightHomologyMap' φ h₁ h₂') :=\n  by\n  rw [(RightHomologyMapData.ofEpiOfIsIsoOfMono φ h₁).rightHomologyMap'_eq]\n  dsimp\n  infer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.203472, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nh₂' : RightHomologyData S₂ := RightHomologyData.ofEpiOfIsIsoOfMono φ h₁\n⊢ IsIso (rightHomologyMap' φ h₁ h₂')\n[PROOFSTEP]\nrw [(RightHomologyMapData.ofEpiOfIsIsoOfMono φ h₁).rightHomologyMap'_eq]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.203472, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nh₂' : RightHomologyData S₂ := RightHomologyData.ofEpiOfIsIsoOfMono φ h₁\n⊢ IsIso (RightHomologyMapData.ofEpiOfIsIsoOfMono φ h₁).φH\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.203472, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nh₂' : RightHomologyData S₂ := RightHomologyData.ofEpiOfIsIsoOfMono φ h₁\n⊢ IsIso (𝟙 h₁.H)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.203472, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nh₂' : RightHomologyData S₂ := RightHomologyData.ofEpiOfIsIsoOfMono φ h₁\nthis : IsIso (rightHomologyMap' φ h₁ h₂')\n⊢ IsIso (rightHomologyMap' φ h₁ h₂)\n[PROOFSTEP]\nhave eq := rightHomologyMap'_comp φ (𝟙 S₂) h₁ h₂' h₂\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.203472, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nh₂' : RightHomologyData S₂ := RightHomologyData.ofEpiOfIsIsoOfMono φ h₁\nthis : IsIso (rightHomologyMap' φ h₁ h₂')\neq : rightHomologyMap' (φ ≫ 𝟙 S₂) h₁ h₂ = rightHomologyMap' φ h₁ h₂' ≫ rightHomologyMap' (𝟙 S₂) h₂' h₂\n⊢ IsIso (rightHomologyMap' φ h₁ h₂)\n[PROOFSTEP]\nrw [comp_id] at eq \n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.203472, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nh₂' : RightHomologyData S₂ := RightHomologyData.ofEpiOfIsIsoOfMono φ h₁\nthis : IsIso (rightHomologyMap' φ h₁ h₂')\neq : rightHomologyMap' φ h₁ h₂ = rightHomologyMap' φ h₁ h₂' ≫ rightHomologyMap' (𝟙 S₂) h₂' h₂\n⊢ IsIso (rightHomologyMap' φ h₁ h₂)\n[PROOFSTEP]\nrw [eq]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.203472, u_1} C\ninst✝³ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\nh₂' : RightHomologyData S₂ := RightHomologyData.ofEpiOfIsIsoOfMono φ h₁\nthis : IsIso (rightHomologyMap' φ h₁ h₂')\neq : rightHomologyMap' φ h₁ h₂ = rightHomologyMap' φ h₁ h₂' ≫ rightHomologyMap' (𝟙 S₂) h₂' h₂\n⊢ IsIso (rightHomologyMap' φ h₁ h₂' ≫ rightHomologyMap' (𝟙 S₂) h₂' h₂)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.205342, u_1} C\ninst✝⁵ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\ninst✝⁴ : HasRightHomology S₁\ninst✝³ : HasRightHomology S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ IsIso (rightHomologyMap φ)\n[PROOFSTEP]\ndsimp only [rightHomologyMap]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.205342, u_1} C\ninst✝⁵ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\ninst✝⁴ : HasRightHomology S₁\ninst✝³ : HasRightHomology S₂\ninst✝² : Epi φ.τ₁\ninst✝¹ : IsIso φ.τ₂\ninst✝ : Mono φ.τ₃\n⊢ IsIso (rightHomologyMap' φ (rightHomologyData S₁) (rightHomologyData S₂))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.207199, u_1} C\ninst✝⁴ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝³ : HasKernels C\ninst✝² : HasCokernels C\ninst✝¹ : HasKernels Cᵒᵖ\ninst✝ : HasCokernels Cᵒᵖ\n⊢ ∀ {X Y : (ShortComplex C)ᵒᵖ} (f : X ⟶ Y),\n    (rightHomologyFunctor C).op.map f ≫ ((fun S => (leftHomologyOpIso S.unop).symm) Y).hom =\n      ((fun S => (leftHomologyOpIso S.unop).symm) X).hom ≫ (opFunctor C ⋙ leftHomologyFunctor Cᵒᵖ).map f\n[PROOFSTEP]\nsimp [rightHomologyMap_op]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.214499, u_1} C\ninst✝⁴ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝³ : HasKernels C\ninst✝² : HasCokernels C\ninst✝¹ : HasKernels Cᵒᵖ\ninst✝ : HasCokernels Cᵒᵖ\n⊢ ∀ {X Y : (ShortComplex C)ᵒᵖ} (f : X ⟶ Y),\n    (leftHomologyFunctor C).op.map f ≫ ((fun S => (rightHomologyOpIso S.unop).symm) Y).hom =\n      ((fun S => (rightHomologyOpIso S.unop).symm) X).hom ≫ (opFunctor C ⋙ rightHomologyFunctor Cᵒᵖ).map f\n[PROOFSTEP]\nsimp [leftHomologyMap_op]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.224277, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nhk : S.f ≫ k = 0\ninst✝ : HasRightHomology S\nA' : C\nα : A ⟶ A'\n⊢ S.f ≫ k ≫ α = 0\n[PROOFSTEP]\nrw [reassoc_of% hk, zero_comp]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nhk : S.f ≫ k = 0\ninst✝ : HasRightHomology S\nA' : C\nα : A ⟶ A'\n⊢ descOpcycles S k hk ≫ α = descOpcycles S (k ≫ α) (_ : S.f ≫ k ≫ α = 0)\n[PROOFSTEP]\nsimp only [← cancel_epi S.pOpcycles, p_descOpcycles_assoc, p_descOpcycles]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{?u.227378, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nhk : S.f ≫ k = 0\ninst✝¹ : HasRightHomology S\ninst✝ : HasCokernel S.f\n⊢ S.f ≫ cokernel.π S.f = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{?u.227378, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nhk : S.f ≫ k = 0\ninst✝¹ : HasRightHomology S\ninst✝ : HasCokernel S.f\n⊢ S.f ≫ pOpcycles S = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.231633, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nhk : S.f ≫ k = 0\ninst✝ : HasRightHomology S\nx : S.X₃ ⟶ A\nhx : k = S.g ≫ x\n⊢ S.f ≫ k = 0\n[PROOFSTEP]\nrw [hx, S.zero_assoc, zero_comp]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nhk : S.f ≫ k = 0\ninst✝ : HasRightHomology S\n⊢ S.g = S.g ≫ 𝟙 S.X₃\n[PROOFSTEP]\nrw [comp_id]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{?u.236265, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nhk : S.f ≫ k = 0\ninst✝¹ : HasRightHomology S\nφ : S₁ ⟶ S\ninst✝ : HasRightHomology S₁\n⊢ S₁.f ≫ φ.τ₂ ≫ k = 0\n[PROOFSTEP]\nrw [← φ.comm₁₂_assoc, hk, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nhk : S.f ≫ k = 0\ninst✝¹ : HasRightHomology S\nφ : S₁ ⟶ S\ninst✝ : HasRightHomology S₁\n⊢ opcyclesMap φ ≫ descOpcycles S k hk = descOpcycles S₁ (φ.τ₂ ≫ k) (_ : S₁.f ≫ φ.τ₂ ≫ k = 0)\n[PROOFSTEP]\nsimp only [← cancel_epi (S₁.pOpcycles), p_opcyclesMap_assoc, p_descOpcycles]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nhk : S.f ≫ k = 0\ninst✝ : HasRightHomology S\n⊢ (opcyclesIso h).inv ≫ descOpcycles S k hk = descQ h k hk\n[PROOFSTEP]\nsimp only [← cancel_epi h.p, p_comp_opcyclesIso_inv_assoc, p_descOpcycles, p_descQ]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nh : RightHomologyData S\nA : C\nk : S.X₂ ⟶ A\nhk : S.f ≫ k = 0\ninst✝ : HasRightHomology S\n⊢ (opcyclesIso h).hom ≫ descQ h k hk = descOpcycles S k hk\n[PROOFSTEP]\nrw [← h.opcyclesIso_inv_comp_descOpcycles, Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝¹ : HasRightHomology S\ninst✝ : HasCokernel S.f\n⊢ HasKernel (cokernel.desc S.f S.g (_ : S.f ≫ S.g = 0))\n[PROOFSTEP]\nlet h := S.rightHomologyData\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝¹ : HasRightHomology S\ninst✝ : HasCokernel S.f\nh : RightHomologyData S := rightHomologyData S\n⊢ HasKernel (cokernel.desc S.f S.g (_ : S.f ≫ S.g = 0))\n[PROOFSTEP]\nhaveI : HasLimit (parallelPair h.g' 0) := ⟨⟨⟨_, h.hι'⟩⟩⟩\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝¹ : HasRightHomology S\ninst✝ : HasCokernel S.f\nh : RightHomologyData S := rightHomologyData S\nthis : HasLimit (parallelPair (RightHomologyData.g' h) 0)\n⊢ HasKernel (cokernel.desc S.f S.g (_ : S.f ≫ S.g = 0))\n[PROOFSTEP]\nlet e : parallelPair (cokernel.desc S.f S.g S.zero) 0 ≅ parallelPair h.g' 0 :=\n  parallelPair.ext (IsColimit.coconePointUniqueUpToIso (colimit.isColimit _) h.hp) (Iso.refl _)\n    (coequalizer.hom_ext (by simp)) (by aesop_cat)\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝¹ : HasRightHomology S\ninst✝ : HasCokernel S.f\nh : RightHomologyData S := rightHomologyData S\nthis : HasLimit (parallelPair (RightHomologyData.g' h) 0)\n⊢ coequalizer.π S.f 0 ≫\n      (parallelPair (cokernel.desc S.f S.g (_ : S.f ≫ S.g = 0)) 0).map WalkingParallelPairHom.left ≫\n        (Iso.refl ((parallelPair (cokernel.desc S.f S.g (_ : S.f ≫ S.g = 0)) 0).obj WalkingParallelPair.one)).hom =\n    coequalizer.π S.f 0 ≫\n      (IsColimit.coconePointUniqueUpToIso (colimit.isColimit (parallelPair S.f 0)) h.hp).hom ≫\n        (parallelPair (RightHomologyData.g' h) 0).map WalkingParallelPairHom.left\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝¹ : HasRightHomology S\ninst✝ : HasCokernel S.f\nh : RightHomologyData S := rightHomologyData S\nthis : HasLimit (parallelPair (RightHomologyData.g' h) 0)\n⊢ (parallelPair (cokernel.desc S.f S.g (_ : S.f ≫ S.g = 0)) 0).map WalkingParallelPairHom.right ≫\n      (Iso.refl ((parallelPair (cokernel.desc S.f S.g (_ : S.f ≫ S.g = 0)) 0).obj WalkingParallelPair.one)).hom =\n    (IsColimit.coconePointUniqueUpToIso (colimit.isColimit (parallelPair S.f 0)) h.hp).hom ≫\n      (parallelPair (RightHomologyData.g' h) 0).map WalkingParallelPairHom.right\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\ninst✝¹ : HasRightHomology S\ninst✝ : HasCokernel S.f\nh : RightHomologyData S := rightHomologyData S\nthis : HasLimit (parallelPair (RightHomologyData.g' h) 0)\ne : parallelPair (cokernel.desc S.f S.g (_ : S.f ≫ S.g = 0)) 0 ≅ parallelPair (RightHomologyData.g' h) 0 :=\n  parallelPair.ext (IsColimit.coconePointUniqueUpToIso (colimit.isColimit (parallelPair S.f 0)) h.hp)\n    (Iso.refl ((parallelPair (cokernel.desc S.f S.g (_ : S.f ≫ S.g = 0)) 0).obj WalkingParallelPair.one))\n    (_ :\n      (parallelPair (cokernel.desc S.f S.g (_ : S.f ≫ S.g = 0)) 0).map WalkingParallelPairHom.left ≫\n          (Iso.refl ((parallelPair (cokernel.desc S.f S.g (_ : S.f ≫ S.g = 0)) 0).obj WalkingParallelPair.one)).hom =\n        (IsColimit.coconePointUniqueUpToIso (colimit.isColimit (parallelPair S.f 0)) h.hp).hom ≫\n          (parallelPair (RightHomologyData.g' h) 0).map WalkingParallelPairHom.left)\n    (_ :\n      0 ≫ 𝟙 S.X₃ =\n        (IsColimit.coconePointUniqueUpToIso (colimit.isColimit (parallelPair S.f 0)) (rightHomologyData S).hp).hom ≫ 0)\n⊢ HasKernel (cokernel.desc S.f S.g (_ : S.f ≫ S.g = 0))\n[PROOFSTEP]\nexact hasLimitOfIso e.symm\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₂✝ : IsIso φ.τ₂\nh₁✝ : Epi φ.τ₁\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\n⊢ IsIso (opcyclesMap' φ h₁ h₂)\n[PROOFSTEP]\nrefine' ⟨h₂.descQ (inv φ.τ₂ ≫ h₁.p) _, _, _⟩\n[GOAL]\ncase refine'_1\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₂✝ : IsIso φ.τ₂\nh₁✝ : Epi φ.τ₁\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\n⊢ S₂.f ≫ inv φ.τ₂ ≫ h₁.p = 0\n[PROOFSTEP]\nsimp only [← cancel_epi φ.τ₁, comp_zero, φ.comm₁₂_assoc, IsIso.hom_inv_id_assoc, h₁.wp]\n[GOAL]\ncase refine'_2\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₂✝ : IsIso φ.τ₂\nh₁✝ : Epi φ.τ₁\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\n⊢ opcyclesMap' φ h₁ h₂ ≫ RightHomologyData.descQ h₂ (inv φ.τ₂ ≫ h₁.p) (_ : S₂.f ≫ inv φ.τ₂ ≫ h₁.p = 0) = 𝟙 h₁.Q\n[PROOFSTEP]\nsimp only [← cancel_epi h₁.p, p_opcyclesMap'_assoc, h₂.p_descQ, IsIso.hom_inv_id_assoc, comp_id]\n[GOAL]\ncase refine'_3\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasZeroMorphisms C\nS S₁ S₂ S₃ : ShortComplex C\nφ : S₁ ⟶ S₂\nh₂✝ : IsIso φ.τ₂\nh₁✝ : Epi φ.τ₁\nh₁ : RightHomologyData S₁\nh₂ : RightHomologyData S₂\n⊢ RightHomologyData.descQ h₂ (inv φ.τ₂ ≫ h₁.p) (_ : S₂.f ≫ inv φ.τ₂ ≫ h₁.p = 0) ≫ opcyclesMap' φ h₁ h₂ = 𝟙 h₂.Q\n[PROOFSTEP]\nsimp only [← cancel_epi h₂.p, h₂.p_descQ_assoc, assoc, p_opcyclesMap', IsIso.inv_hom_id_assoc, comp_id]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Homology.ShortComplex.RightHomology", "llama_tokens": 30095, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.679178699175393, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.38703178250911585}}
{"text": "[GOAL]\nz : ℂ\n⊢ LSeriesSummable 0 z\n[PROOFSTEP]\nsimp [LSeriesSummable, summable_zero]\n[GOAL]\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℝ\nhz : 1 < z\n⊢ LSeriesSummable f ↑z\n[PROOFSTEP]\nby_cases h0 : m = 0\n[GOAL]\ncase pos\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℝ\nhz : 1 < z\nh0 : m = 0\n⊢ LSeriesSummable f ↑z\n[PROOFSTEP]\nsubst h0\n[GOAL]\ncase pos\nf : ArithmeticFunction ℂ\nz : ℝ\nhz : 1 < z\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ 0\n⊢ LSeriesSummable f ↑z\n[PROOFSTEP]\nhave hf : f = 0 := ArithmeticFunction.ext fun n => Complex.abs.eq_zero.1 (le_antisymm (h n) (Complex.abs.nonneg _))\n[GOAL]\ncase pos\nf : ArithmeticFunction ℂ\nz : ℝ\nhz : 1 < z\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ 0\nhf : f = 0\n⊢ LSeriesSummable f ↑z\n[PROOFSTEP]\nsimp [hf]\n[GOAL]\ncase neg\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℝ\nhz : 1 < z\nh0 : ¬m = 0\n⊢ LSeriesSummable f ↑z\n[PROOFSTEP]\nrefine' summable_of_norm_bounded (fun n : ℕ => m / n ^ z) _ _\n[GOAL]\ncase neg.refine'_1\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℝ\nhz : 1 < z\nh0 : ¬m = 0\n⊢ Summable fun n => m / ↑n ^ z\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv]\n[GOAL]\ncase neg.refine'_1\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℝ\nhz : 1 < z\nh0 : ¬m = 0\n⊢ Summable fun n => m * (↑n ^ z)⁻¹\n[PROOFSTEP]\nexact (summable_mul_left_iff h0).2 (Real.summable_nat_rpow_inv.2 hz)\n[GOAL]\ncase neg.refine'_2\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℝ\nhz : 1 < z\nh0 : ¬m = 0\n⊢ ∀ (i : ℕ), ‖↑f i / ↑i ^ ↑z‖ ≤ (fun n => m / ↑n ^ z) i\n[PROOFSTEP]\nintro n\n[GOAL]\ncase neg.refine'_2\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℝ\nhz : 1 < z\nh0 : ¬m = 0\nn : ℕ\n⊢ ‖↑f n / ↑n ^ ↑z‖ ≤ (fun n => m / ↑n ^ z) n\n[PROOFSTEP]\nhave hm : 0 ≤ m := le_trans (Complex.abs.nonneg _) (h 0)\n[GOAL]\ncase neg.refine'_2\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℝ\nhz : 1 < z\nh0 : ¬m = 0\nn : ℕ\nhm : 0 ≤ m\n⊢ ‖↑f n / ↑n ^ ↑z‖ ≤ (fun n => m / ↑n ^ z) n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase neg.refine'_2.zero\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℝ\nhz : 1 < z\nh0 : ¬m = 0\nhm : 0 ≤ m\n⊢ ‖↑f Nat.zero / ↑Nat.zero ^ ↑z‖ ≤ (fun n => m / ↑n ^ z) Nat.zero\n[PROOFSTEP]\nsimp [hm, Real.zero_rpow (_root_.ne_of_gt (lt_trans Real.zero_lt_one hz))]\n[GOAL]\ncase neg.refine'_2.succ\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℝ\nhz : 1 < z\nh0 : ¬m = 0\nhm : 0 ≤ m\nn : ℕ\n⊢ ‖↑f (succ n) / ↑(succ n) ^ ↑z‖ ≤ (fun n => m / ↑n ^ z) (succ n)\n[PROOFSTEP]\nsimp only [map_div₀, Complex.norm_eq_abs]\n[GOAL]\ncase neg.refine'_2.succ\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℝ\nhz : 1 < z\nh0 : ¬m = 0\nhm : 0 ≤ m\nn : ℕ\n⊢ ↑Complex.abs (↑f (succ n)) / ↑Complex.abs (↑(succ n) ^ ↑z) ≤ m / ↑(succ n) ^ z\n[PROOFSTEP]\napply div_le_div hm (h _) (Real.rpow_pos_of_pos (Nat.cast_pos.2 n.succ_pos) _) (le_of_eq _)\n[GOAL]\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℝ\nhz : 1 < z\nh0 : ¬m = 0\nhm : 0 ≤ m\nn : ℕ\n⊢ ↑(succ n) ^ z = ↑Complex.abs (↑(succ n) ^ ↑z)\n[PROOFSTEP]\nrw [Complex.abs_cpow_real, Complex.abs_cast_nat]\n[GOAL]\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\n⊢ LSeriesSummable f w ↔ LSeriesSummable f z\n[PROOFSTEP]\nsuffices h : ∀ n : ℕ, Complex.abs (f n) / Complex.abs (↑n ^ w) = Complex.abs (f n) / Complex.abs (↑n ^ z)\n[GOAL]\nf : ArithmeticFunction ℂ\nw z : ℂ\nh✝ : w.re = z.re\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) / ↑Complex.abs (↑n ^ w) = ↑Complex.abs (↑f n) / ↑Complex.abs (↑n ^ z)\n⊢ LSeriesSummable f w ↔ LSeriesSummable f z\n[PROOFSTEP]\nsimp [LSeriesSummable, ← summable_norm_iff, h, Complex.norm_eq_abs]\n[GOAL]\ncase h\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\n⊢ ∀ (n : ℕ), ↑Complex.abs (↑f n) / ↑Complex.abs (↑n ^ w) = ↑Complex.abs (↑f n) / ↑Complex.abs (↑n ^ z)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\nn : ℕ\n⊢ ↑Complex.abs (↑f n) / ↑Complex.abs (↑n ^ w) = ↑Complex.abs (↑f n) / ↑Complex.abs (↑n ^ z)\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase h.zero\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\n⊢ ↑Complex.abs (↑f Nat.zero) / ↑Complex.abs (↑Nat.zero ^ w) = ↑Complex.abs (↑f Nat.zero) / ↑Complex.abs (↑Nat.zero ^ z)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.succ\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\nn : ℕ\n⊢ ↑Complex.abs (↑f (succ n)) / ↑Complex.abs (↑(succ n) ^ w) = ↑Complex.abs (↑f (succ n)) / ↑Complex.abs (↑(succ n) ^ z)\n[PROOFSTEP]\napply congr rfl\n[GOAL]\ncase h.succ\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\nn : ℕ\n⊢ ↑Complex.abs (↑(succ n) ^ w) = ↑Complex.abs (↑(succ n) ^ z)\n[PROOFSTEP]\nhave h0 : (n.succ : ℂ) ≠ 0 := by\n  rw [Ne.def, Nat.cast_eq_zero]\n  apply n.succ_ne_zero\n[GOAL]\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\nn : ℕ\n⊢ ↑(succ n) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, Nat.cast_eq_zero]\n[GOAL]\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\nn : ℕ\n⊢ ¬succ n = 0\n[PROOFSTEP]\napply n.succ_ne_zero\n[GOAL]\ncase h.succ\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\nn : ℕ\nh0 : ↑(succ n) ≠ 0\n⊢ ↑Complex.abs (↑(succ n) ^ w) = ↑Complex.abs (↑(succ n) ^ z)\n[PROOFSTEP]\nrw [Complex.cpow_def, Complex.cpow_def, if_neg h0, if_neg h0, Complex.abs_exp_eq_iff_re_eq]\n[GOAL]\ncase h.succ\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\nn : ℕ\nh0 : ↑(succ n) ≠ 0\n⊢ (Complex.log ↑(succ n) * w).re = (Complex.log ↑(succ n) * z).re\n[PROOFSTEP]\nsimp only [h, Complex.mul_re, mul_eq_mul_left_iff, sub_right_inj]\n[GOAL]\ncase h.succ\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\nn : ℕ\nh0 : ↑(succ n) ≠ 0\n⊢ w.im = z.im ∨ (Complex.log ↑(succ n)).im = 0\n[PROOFSTEP]\nright\n[GOAL]\ncase h.succ.h\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\nn : ℕ\nh0 : ↑(succ n) ≠ 0\n⊢ (Complex.log ↑(succ n)).im = 0\n[PROOFSTEP]\nrw [Complex.log_im, ← Complex.ofReal_nat_cast]\n[GOAL]\ncase h.succ.h\nf : ArithmeticFunction ℂ\nw z : ℂ\nh : w.re = z.re\nn : ℕ\nh0 : ↑(succ n) ≠ 0\n⊢ Complex.arg ↑↑(succ n) = 0\n[PROOFSTEP]\nexact Complex.arg_ofReal_of_nonneg (le_of_lt (cast_pos.2 n.succ_pos))\n[GOAL]\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℂ\nhz : 1 < z.re\n⊢ LSeriesSummable f z\n[PROOFSTEP]\nrw [← LSeriesSummable_iff_of_re_eq_re (Complex.ofReal_re z.re)]\n[GOAL]\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℂ\nhz : 1 < z.re\n⊢ LSeriesSummable f ↑z.re\n[PROOFSTEP]\napply LSeriesSummable_of_bounded_of_one_lt_real h\n[GOAL]\nf : ArithmeticFunction ℂ\nm : ℝ\nh : ∀ (n : ℕ), ↑Complex.abs (↑f n) ≤ m\nz : ℂ\nhz : 1 < z.re\n⊢ 1 < z.re\n[PROOFSTEP]\nexact hz\n[GOAL]\nz : ℂ\n⊢ LSeriesSummable (↑ζ) z ↔ 1 < z.re\n[PROOFSTEP]\nrw [← LSeriesSummable_iff_of_re_eq_re (Complex.ofReal_re z.re), LSeriesSummable, ← summable_norm_iff, ←\n  Real.summable_one_div_nat_rpow, iff_iff_eq]\n[GOAL]\nz : ℂ\n⊢ (Summable fun x => ‖↑↑ζ x / ↑x ^ ↑z.re‖) = Summable fun n => 1 / ↑n ^ z.re\n[PROOFSTEP]\nby_cases h0 : z.re = 0\n[GOAL]\ncase pos\nz : ℂ\nh0 : z.re = 0\n⊢ (Summable fun x => ‖↑↑ζ x / ↑x ^ ↑z.re‖) = Summable fun n => 1 / ↑n ^ z.re\n[PROOFSTEP]\nrw [h0, ← summable_nat_add_iff 1]\n[GOAL]\ncase pos\nz : ℂ\nh0 : z.re = 0\n⊢ (Summable fun n => ‖↑↑ζ (n + 1) / ↑(n + 1) ^ ↑0‖) = Summable fun n => 1 / ↑n ^ 0\n[PROOFSTEP]\napply congr rfl\n[GOAL]\ncase pos\nz : ℂ\nh0 : z.re = 0\n⊢ (fun n => ‖↑↑ζ (n + 1) / ↑(n + 1) ^ ↑0‖) = fun n => 1 / ↑n ^ 0\n[PROOFSTEP]\next n\n[GOAL]\ncase pos.h\nz : ℂ\nh0 : z.re = 0\nn : ℕ\n⊢ ‖↑↑ζ (n + 1) / ↑(n + 1) ^ ↑0‖ = 1 / ↑n ^ 0\n[PROOFSTEP]\nsimp [n.succ_ne_zero]\n[GOAL]\ncase neg\nz : ℂ\nh0 : ¬z.re = 0\n⊢ (Summable fun x => ‖↑↑ζ x / ↑x ^ ↑z.re‖) = Summable fun n => 1 / ↑n ^ z.re\n[PROOFSTEP]\napply congr rfl\n[GOAL]\ncase neg\nz : ℂ\nh0 : ¬z.re = 0\n⊢ (fun x => ‖↑↑ζ x / ↑x ^ ↑z.re‖) = fun n => 1 / ↑n ^ z.re\n[PROOFSTEP]\next ⟨- | n⟩\n[GOAL]\ncase neg.h.zero\nz : ℂ\nh0 : ¬z.re = 0\n⊢ ‖↑↑ζ Nat.zero / ↑Nat.zero ^ ↑z.re‖ = 1 / ↑Nat.zero ^ z.re\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\ncase neg.h.succ\nz : ℂ\nh0 : ¬z.re = 0\nn✝ : ℕ\n⊢ ‖↑↑ζ (succ n✝) / ↑(succ n✝) ^ ↑z.re‖ = 1 / ↑(succ n✝) ^ z.re\n[PROOFSTEP]\nsimp only [cast_zero, natCoe_apply, zeta_apply, succ_ne_zero, if_false, cast_succ, one_div, Complex.norm_eq_abs,\n  map_inv₀, Complex.abs_cpow_real, inv_inj, zero_add]\n[GOAL]\ncase neg.h.succ\nz : ℂ\nh0 : ¬z.re = 0\nn✝ : ℕ\n⊢ ↑Complex.abs (↑n✝ + 1) ^ z.re = (↑n✝ + 1) ^ z.re\n[PROOFSTEP]\nrw [← cast_one, ← cast_add, Complex.abs_of_nat, cast_add, cast_one]\n[GOAL]\nf g : ArithmeticFunction ℂ\nz : ℂ\nhf : LSeriesSummable f z\nhg : LSeriesSummable g z\n⊢ LSeries (f + g) z = LSeries f z + LSeries g z\n[PROOFSTEP]\nsimp only [LSeries, add_apply]\n[GOAL]\nf g : ArithmeticFunction ℂ\nz : ℂ\nhf : LSeriesSummable f z\nhg : LSeriesSummable g z\n⊢ ∑' (n : ℕ), (↑f n + ↑g n) / ↑n ^ z = ∑' (n : ℕ), ↑f n / ↑n ^ z + ∑' (n : ℕ), ↑g n / ↑n ^ z\n[PROOFSTEP]\nrw [← tsum_add hf hg]\n[GOAL]\nf g : ArithmeticFunction ℂ\nz : ℂ\nhf : LSeriesSummable f z\nhg : LSeriesSummable g z\n⊢ ∑' (n : ℕ), (↑f n + ↑g n) / ↑n ^ z = ∑' (b : ℕ), (↑f b / ↑b ^ z + ↑g b / ↑b ^ z)\n[PROOFSTEP]\napply congr rfl (funext fun n => _)\n[GOAL]\nf g : ArithmeticFunction ℂ\nz : ℂ\nhf : LSeriesSummable f z\nhg : LSeriesSummable g z\n⊢ ∀ (n : ℕ), (↑f n + ↑g n) / ↑n ^ z = ↑f n / ↑n ^ z + ↑g n / ↑n ^ z\n[PROOFSTEP]\nsimp [_root_.add_div]\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.LSeries", "llama_tokens": 5094, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.679178699175393, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.38703178250911585}}
{"text": "[GOAL]\nF : Type u_1\ninst✝ : Field F\nS✝ S : Set F\nhS : IsSubfield S\nx y : F\nhx : x ∈ S\nhy : y ∈ S\n⊢ x / y ∈ S\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nF : Type u_1\ninst✝ : Field F\nS✝ S : Set F\nhS : IsSubfield S\nx y : F\nhx : x ∈ S\nhy : y ∈ S\n⊢ x * y⁻¹ ∈ S\n[PROOFSTEP]\nexact hS.toIsSubring.toIsSubmonoid.mul_mem hx (hS.inv_mem hy)\n[GOAL]\nF : Type u_1\ninst✝ : Field F\nS : Set F\na : F\nn : ℤ\ns : Set F\nhs : IsSubfield s\nh : a ∈ s\n⊢ a ^ n ∈ s\n[PROOFSTEP]\ncases' n with n n\n[GOAL]\ncase ofNat\nF : Type u_1\ninst✝ : Field F\nS : Set F\na : F\ns : Set F\nhs : IsSubfield s\nh : a ∈ s\nn : ℕ\n⊢ a ^ Int.ofNat n ∈ s\n[PROOFSTEP]\nsuffices a ^ (n : ℤ) ∈ s by exact this\n[GOAL]\nF : Type u_1\ninst✝ : Field F\nS : Set F\na : F\ns : Set F\nhs : IsSubfield s\nh : a ∈ s\nn : ℕ\nthis : a ^ ↑n ∈ s\n⊢ a ^ Int.ofNat n ∈ s\n[PROOFSTEP]\nexact this\n[GOAL]\ncase ofNat\nF : Type u_1\ninst✝ : Field F\nS : Set F\na : F\ns : Set F\nhs : IsSubfield s\nh : a ∈ s\nn : ℕ\n⊢ a ^ ↑n ∈ s\n[PROOFSTEP]\nrw [zpow_ofNat]\n[GOAL]\ncase ofNat\nF : Type u_1\ninst✝ : Field F\nS : Set F\na : F\ns : Set F\nhs : IsSubfield s\nh : a ∈ s\nn : ℕ\n⊢ a ^ n ∈ s\n[PROOFSTEP]\nexact hs.toIsSubring.toIsSubmonoid.pow_mem h\n[GOAL]\ncase negSucc\nF : Type u_1\ninst✝ : Field F\nS : Set F\na : F\ns : Set F\nhs : IsSubfield s\nh : a ∈ s\nn : ℕ\n⊢ a ^ Int.negSucc n ∈ s\n[PROOFSTEP]\nrw [zpow_negSucc]\n[GOAL]\ncase negSucc\nF : Type u_1\ninst✝ : Field F\nS : Set F\na : F\ns : Set F\nhs : IsSubfield s\nh : a ∈ s\nn : ℕ\n⊢ (a ^ (n + 1))⁻¹ ∈ s\n[PROOFSTEP]\nexact hs.inv_mem (hs.toIsSubring.toIsSubmonoid.pow_mem h)\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\nS : Set F\nK : Type u_2\ninst✝ : Field K\nf : F →+* K\ns : Set K\nhs : IsSubfield s\nsrc✝ : IsSubring (↑f ⁻¹' s) := RingHom.isSubring_preimage f hs.toIsSubring\na : F\nha : ↑f a ∈ s\n⊢ ↑f a⁻¹ ∈ s\n[PROOFSTEP]\nrw [map_inv₀]\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\nS : Set F\nK : Type u_2\ninst✝ : Field K\nf : F →+* K\ns : Set K\nhs : IsSubfield s\nsrc✝ : IsSubring (↑f ⁻¹' s) := RingHom.isSubring_preimage f hs.toIsSubring\na : F\nha : ↑f a ∈ s\n⊢ (↑f a)⁻¹ ∈ s\n[PROOFSTEP]\nexact hs.inv_mem ha\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\nS : Set F\nK : Type u_2\ninst✝ : Field K\nf : F →+* K\n⊢ IsSubfield (Set.range ↑f)\n[PROOFSTEP]\nrw [← Set.image_univ]\n[GOAL]\nF : Type u_1\ninst✝¹ : Field F\nS : Set F\nK : Type u_2\ninst✝ : Field K\nf : F →+* K\n⊢ IsSubfield (↑f '' Set.univ)\n[PROOFSTEP]\napply Image.isSubfield _ Univ.isSubfield\n[GOAL]\nF : Type u_1\ninst✝ : Field F\nS : Set F\n⊢ ∀ {a b : F}, a ∈ closure S → b ∈ closure S → a * b ∈ closure S\n[PROOFSTEP]\nrintro _ _ ⟨p, hp, q, hq, hq0, rfl⟩ ⟨r, hr, s, hs, hs0, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.refl.intro.intro.intro.intro.refl\nF : Type u_1\ninst✝ : Field F\nS : Set F\np : F\nhp : p ∈ Ring.closure S\nq : F\nhq : q ∈ Ring.closure S\nr : F\nhr : r ∈ Ring.closure S\ns : F\nhs : s ∈ Ring.closure S\n⊢ p / q * (r / s) ∈ closure S\n[PROOFSTEP]\nexact\n  ⟨p * r, IsSubmonoid.mul_mem Ring.closure.isSubring.toIsSubmonoid hp hr, q * s,\n    IsSubmonoid.mul_mem Ring.closure.isSubring.toIsSubmonoid hq hs, (div_mul_div_comm _ _ _ _).symm⟩\n[GOAL]\nF : Type u_1\ninst✝ : Field F\nS : Set F\nsrc✝ : IsSubmonoid (closure S) := isSubmonoid\n⊢ ∀ {a b : F}, a ∈ closure S → b ∈ closure S → a + b ∈ closure S\n[PROOFSTEP]\nintro a b ha hb\n[GOAL]\nF : Type u_1\ninst✝ : Field F\nS : Set F\nsrc✝ : IsSubmonoid (closure S) := isSubmonoid\na b : F\nha : a ∈ closure S\nhb : b ∈ closure S\n⊢ a + b ∈ closure S\n[PROOFSTEP]\nrcases id ha with ⟨p, hp, q, hq, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nF : Type u_1\ninst✝ : Field F\nS : Set F\nsrc✝ : IsSubmonoid (closure S) := isSubmonoid\nb : F\nhb : b ∈ closure S\np : F\nhp : p ∈ Ring.closure S\nq : F\nhq : q ∈ Ring.closure S\nha : p / q ∈ closure S\n⊢ p / q + b ∈ closure S\n[PROOFSTEP]\nrcases id hb with ⟨r, hr, s, hs, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nF : Type u_1\ninst✝ : Field F\nS : Set F\nsrc✝ : IsSubmonoid (closure S) := isSubmonoid\np : F\nhp : p ∈ Ring.closure S\nq : F\nhq : q ∈ Ring.closure S\nha : p / q ∈ closure S\nr : F\nhr : r ∈ Ring.closure S\ns : F\nhs : s ∈ Ring.closure S\nhb : r / s ∈ closure S\n⊢ p / q + r / s ∈ closure S\n[PROOFSTEP]\nby_cases hq0 : q = 0\n[GOAL]\ncase pos\nF : Type u_1\ninst✝ : Field F\nS : Set F\nsrc✝ : IsSubmonoid (closure S) := isSubmonoid\np : F\nhp : p ∈ Ring.closure S\nq : F\nhq : q ∈ Ring.closure S\nha : p / q ∈ closure S\nr : F\nhr : r ∈ Ring.closure S\ns : F\nhs : s ∈ Ring.closure S\nhb : r / s ∈ closure S\nhq0 : q = 0\n⊢ p / q + r / s ∈ closure S\n[PROOFSTEP]\nrwa [hq0, div_zero, zero_add]\n[GOAL]\ncase neg\nF : Type u_1\ninst✝ : Field F\nS : Set F\nsrc✝ : IsSubmonoid (closure S) := isSubmonoid\np : F\nhp : p ∈ Ring.closure S\nq : F\nhq : q ∈ Ring.closure S\nha : p / q ∈ closure S\nr : F\nhr : r ∈ Ring.closure S\ns : F\nhs : s ∈ Ring.closure S\nhb : r / s ∈ closure S\nhq0 : ¬q = 0\n⊢ p / q + r / s ∈ closure S\n[PROOFSTEP]\nby_cases hs0 : s = 0\n[GOAL]\ncase pos\nF : Type u_1\ninst✝ : Field F\nS : Set F\nsrc✝ : IsSubmonoid (closure S) := isSubmonoid\np : F\nhp : p ∈ Ring.closure S\nq : F\nhq : q ∈ Ring.closure S\nha : p / q ∈ closure S\nr : F\nhr : r ∈ Ring.closure S\ns : F\nhs : s ∈ Ring.closure S\nhb : r / s ∈ closure S\nhq0 : ¬q = 0\nhs0 : s = 0\n⊢ p / q + r / s ∈ closure S\n[PROOFSTEP]\nrwa [hs0, div_zero, add_zero]\n[GOAL]\ncase neg\nF : Type u_1\ninst✝ : Field F\nS : Set F\nsrc✝ : IsSubmonoid (closure S) := isSubmonoid\np : F\nhp : p ∈ Ring.closure S\nq : F\nhq : q ∈ Ring.closure S\nha : p / q ∈ closure S\nr : F\nhr : r ∈ Ring.closure S\ns : F\nhs : s ∈ Ring.closure S\nhb : r / s ∈ closure S\nhq0 : ¬q = 0\nhs0 : ¬s = 0\n⊢ p / q + r / s ∈ closure S\n[PROOFSTEP]\nexact\n  ⟨p * s + q * r,\n    IsAddSubmonoid.add_mem Ring.closure.isSubring.toIsAddSubgroup.toIsAddSubmonoid\n      (Ring.closure.isSubring.toIsSubmonoid.mul_mem hp hs) (Ring.closure.isSubring.toIsSubmonoid.mul_mem hq hr),\n    q * s, Ring.closure.isSubring.toIsSubmonoid.mul_mem hq hs, (div_add_div p r hq0 hs0).symm⟩\n[GOAL]\nF : Type u_1\ninst✝ : Field F\nS : Set F\nsrc✝ : IsSubmonoid (closure S) := isSubmonoid\n⊢ ∀ {a : F}, a ∈ closure S → -a ∈ closure S\n[PROOFSTEP]\nrintro _ ⟨p, hp, q, hq, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nF : Type u_1\ninst✝ : Field F\nS : Set F\nsrc✝ : IsSubmonoid (closure S) := isSubmonoid\np : F\nhp : p ∈ Ring.closure S\nq : F\nhq : q ∈ Ring.closure S\n⊢ -(p / q) ∈ closure S\n[PROOFSTEP]\nexact ⟨-p, Ring.closure.isSubring.toIsAddSubgroup.neg_mem hp, q, hq, neg_div q p⟩\n[GOAL]\nF : Type u_1\ninst✝ : Field F\nS : Set F\nsrc✝ : IsSubmonoid (closure S) := isSubmonoid\n⊢ ∀ {x : F}, x ∈ closure S → x⁻¹ ∈ closure S\n[PROOFSTEP]\nrintro _ ⟨p, hp, q, hq, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nF : Type u_1\ninst✝ : Field F\nS : Set F\nsrc✝ : IsSubmonoid (closure S) := isSubmonoid\np : F\nhp : p ∈ Ring.closure S\nq : F\nhq : q ∈ Ring.closure S\n⊢ (p / q)⁻¹ ∈ closure S\n[PROOFSTEP]\nexact ⟨q, hq, p, hp, (inv_div _ _).symm⟩\n[GOAL]\nF : Type u_1\ninst✝ : Field F\nS T : Set F\nhT : IsSubfield T\nH : S ⊆ T\n⊢ closure S ⊆ T\n[PROOFSTEP]\nrintro _ ⟨p, hp, q, hq, hq0, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.refl\nF : Type u_1\ninst✝ : Field F\nS T : Set F\nhT : IsSubfield T\nH : S ⊆ T\np : F\nhp : p ∈ Ring.closure S\nq : F\nhq : q ∈ Ring.closure S\n⊢ p / q ∈ T\n[PROOFSTEP]\nexact hT.div_mem (Ring.closure_subset hT.toIsSubring H hp) (Ring.closure_subset hT.toIsSubring H hq)\n", "meta": {"mathlib_filename": "Mathlib.Deprecated.Subfield", "llama_tokens": 3610, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6406358411176238, "lm_q2_score": 0.6039318337259584, "lm_q1q2_score": 0.3869003782767383}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\n⊢ compProdFun κ η a ∅ = 0\n[PROOFSTEP]\nsimp only [compProdFun, Set.mem_empty_iff_false, Set.setOf_false, measure_empty, MeasureTheory.lintegral_const,\n  zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\n⊢ compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i)\n[PROOFSTEP]\nhave h_Union : (fun b => η (a, b) {c : γ | (b, c) ∈ ⋃ i, f i}) = fun b => η (a, b) (⋃ i, {c : γ | (b, c) ∈ f i}) :=\n  by\n  ext1 b\n  congr with c\n  simp only [Set.mem_iUnion, Set.iSup_eq_iUnion, Set.mem_setOf_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\n⊢ (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\n[PROOFSTEP]\next1 b\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nb : β\n⊢ ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i} = ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\n[PROOFSTEP]\ncongr with c\n[GOAL]\ncase h.e_a.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nb : β\nc : γ\n⊢ c ∈ {c | (b, c) ∈ ⋃ (i : ℕ), f i} ↔ c ∈ ⋃ (i : ℕ), {c | (b, c) ∈ f i}\n[PROOFSTEP]\nsimp only [Set.mem_iUnion, Set.iSup_eq_iUnion, Set.mem_setOf_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\n⊢ compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i)\n[PROOFSTEP]\nrw [compProdFun, h_Union]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\n⊢ ∫⁻ (b : β), ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i}) ∂↑κ a = ∑' (i : ℕ), compProdFun κ η a (f i)\n[PROOFSTEP]\nhave h_tsum : (fun b => η (a, b) (⋃ i, {c : γ | (b, c) ∈ f i})) = fun b => ∑' i, η (a, b) {c : γ | (b, c) ∈ f i} :=\n  by\n  ext1 b\n  rw [measure_iUnion]\n  · intro i j hij s hsi hsj c hcs\n    have hbci : {(b, c)} ⊆ f i := by rw [Set.singleton_subset_iff]; exact hsi hcs\n    have hbcj : {(b, c)} ⊆ f j := by rw [Set.singleton_subset_iff]; exact hsj hcs\n    simpa only [Set.bot_eq_empty, Set.le_eq_subset, Set.singleton_subset_iff, Set.mem_empty_iff_false] using\n      hf_disj hij hbci hbcj\n  ·\n    -- Porting note: behavior of `@` changed relative to lean 3, was\n          -- exact fun i => (@measurable_prod_mk_left β γ _ _ b) _ (hf_meas i)exact fun i =>\n      (@measurable_prod_mk_left β γ _ _ b) (hf_meas i)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\n⊢ (fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})) = fun b => ∑' (i : ℕ), ↑↑(↑η (a, b)) {c | (b, c) ∈ f i}\n[PROOFSTEP]\next1 b\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nb : β\n⊢ ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i}) = ∑' (i : ℕ), ↑↑(↑η (a, b)) {c | (b, c) ∈ f i}\n[PROOFSTEP]\nrw [measure_iUnion]\n[GOAL]\ncase h.hn\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nb : β\n⊢ Pairwise (Disjoint on fun i => {c | (b, c) ∈ f i})\n[PROOFSTEP]\nintro i j hij s hsi hsj c hcs\n[GOAL]\ncase h.hn\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nb : β\ni j : ℕ\nhij : i ≠ j\ns : Set γ\nhsi : s ≤ (fun i => {c | (b, c) ∈ f i}) i\nhsj : s ≤ (fun i => {c | (b, c) ∈ f i}) j\nc : γ\nhcs : c ∈ s\n⊢ c ∈ ⊥\n[PROOFSTEP]\nhave hbci : {(b, c)} ⊆ f i := by rw [Set.singleton_subset_iff]; exact hsi hcs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nb : β\ni j : ℕ\nhij : i ≠ j\ns : Set γ\nhsi : s ≤ (fun i => {c | (b, c) ∈ f i}) i\nhsj : s ≤ (fun i => {c | (b, c) ∈ f i}) j\nc : γ\nhcs : c ∈ s\n⊢ {(b, c)} ⊆ f i\n[PROOFSTEP]\nrw [Set.singleton_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nb : β\ni j : ℕ\nhij : i ≠ j\ns : Set γ\nhsi : s ≤ (fun i => {c | (b, c) ∈ f i}) i\nhsj : s ≤ (fun i => {c | (b, c) ∈ f i}) j\nc : γ\nhcs : c ∈ s\n⊢ (b, c) ∈ f i\n[PROOFSTEP]\nexact hsi hcs\n[GOAL]\ncase h.hn\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nb : β\ni j : ℕ\nhij : i ≠ j\ns : Set γ\nhsi : s ≤ (fun i => {c | (b, c) ∈ f i}) i\nhsj : s ≤ (fun i => {c | (b, c) ∈ f i}) j\nc : γ\nhcs : c ∈ s\nhbci : {(b, c)} ⊆ f i\n⊢ c ∈ ⊥\n[PROOFSTEP]\nhave hbcj : {(b, c)} ⊆ f j := by rw [Set.singleton_subset_iff]; exact hsj hcs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nb : β\ni j : ℕ\nhij : i ≠ j\ns : Set γ\nhsi : s ≤ (fun i => {c | (b, c) ∈ f i}) i\nhsj : s ≤ (fun i => {c | (b, c) ∈ f i}) j\nc : γ\nhcs : c ∈ s\nhbci : {(b, c)} ⊆ f i\n⊢ {(b, c)} ⊆ f j\n[PROOFSTEP]\nrw [Set.singleton_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nb : β\ni j : ℕ\nhij : i ≠ j\ns : Set γ\nhsi : s ≤ (fun i => {c | (b, c) ∈ f i}) i\nhsj : s ≤ (fun i => {c | (b, c) ∈ f i}) j\nc : γ\nhcs : c ∈ s\nhbci : {(b, c)} ⊆ f i\n⊢ (b, c) ∈ f j\n[PROOFSTEP]\nexact hsj hcs\n[GOAL]\ncase h.hn\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nb : β\ni j : ℕ\nhij : i ≠ j\ns : Set γ\nhsi : s ≤ (fun i => {c | (b, c) ∈ f i}) i\nhsj : s ≤ (fun i => {c | (b, c) ∈ f i}) j\nc : γ\nhcs : c ∈ s\nhbci : {(b, c)} ⊆ f i\nhbcj : {(b, c)} ⊆ f j\n⊢ c ∈ ⊥\n[PROOFSTEP]\nsimpa only [Set.bot_eq_empty, Set.le_eq_subset, Set.singleton_subset_iff, Set.mem_empty_iff_false] using\n  hf_disj hij hbci hbcj\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nb : β\n⊢ ∀ (i : ℕ), MeasurableSet {c | (b, c) ∈ f i}\n[PROOFSTEP]\nexact fun i => (@measurable_prod_mk_left β γ _ _ b) (hf_meas i)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nh_tsum :\n  (fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})) = fun b => ∑' (i : ℕ), ↑↑(↑η (a, b)) {c | (b, c) ∈ f i}\n⊢ ∫⁻ (b : β), ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i}) ∂↑κ a = ∑' (i : ℕ), compProdFun κ η a (f i)\n[PROOFSTEP]\nrw [h_tsum, lintegral_tsum]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nh_tsum :\n  (fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})) = fun b => ∑' (i : ℕ), ↑↑(↑η (a, b)) {c | (b, c) ∈ f i}\n⊢ ∑' (i : ℕ), ∫⁻ (a_1 : β), ↑↑(↑η (a, a_1)) {c | (a_1, c) ∈ f i} ∂↑κ a = ∑' (i : ℕ), compProdFun κ η a (f i)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nh_tsum :\n  (fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})) = fun b => ∑' (i : ℕ), ↑↑(↑η (a, b)) {c | (b, c) ∈ f i}\n⊢ ∀ (i : ℕ), AEMeasurable fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ f i}\n[PROOFSTEP]\nintro i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nh_tsum :\n  (fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})) = fun b => ∑' (i : ℕ), ↑↑(↑η (a, b)) {c | (b, c) ∈ f i}\ni : ℕ\n⊢ AEMeasurable fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ f i}\n[PROOFSTEP]\nhave hm : MeasurableSet {p : (α × β) × γ | (p.1.2, p.2) ∈ f i} := measurable_fst.snd.prod_mk measurable_snd (hf_meas i)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : ℕ → Set (β × γ)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf_disj : Pairwise (Disjoint on f)\nh_Union :\n  (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ ⋃ (i : ℕ), f i}) = fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})\nh_tsum :\n  (fun b => ↑↑(↑η (a, b)) (⋃ (i : ℕ), {c | (b, c) ∈ f i})) = fun b => ∑' (i : ℕ), ↑↑(↑η (a, b)) {c | (b, c) ∈ f i}\ni : ℕ\nhm : MeasurableSet {p | (p.fst.snd, p.snd) ∈ f i}\n⊢ AEMeasurable fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ f i}\n[PROOFSTEP]\nexact ((measurable_kernel_prod_mk_left hm).comp measurable_prod_mk_left).aemeasurable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ compProdFun κ η a s = ∑' (n : ℕ), compProdFun κ (seq η n) a s\n[PROOFSTEP]\nsimp_rw [compProdFun, (measure_sum_seq η _).symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ ∫⁻ (b : β), ↑↑(Measure.sum fun n => ↑(seq η n) (a, b)) {c | (b, c) ∈ s} ∂↑κ a =\n    ∑' (n : ℕ), ∫⁻ (b : β), ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s} ∂↑κ a\n[PROOFSTEP]\nhave :\n  ∫⁻ b, Measure.sum (fun n => seq η n (a, b)) {c : γ | (b, c) ∈ s} ∂κ a =\n    ∫⁻ b, ∑' n, seq η n (a, b) {c : γ | (b, c) ∈ s} ∂κ a :=\n  by\n  congr\n  ext1 b\n  rw [Measure.sum_apply]\n  exact measurable_prod_mk_left hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ ∫⁻ (b : β), ↑↑(Measure.sum fun n => ↑(seq η n) (a, b)) {c | (b, c) ∈ s} ∂↑κ a =\n    ∫⁻ (b : β), ∑' (n : ℕ), ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s} ∂↑κ a\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ (fun b => ↑↑(Measure.sum fun n => ↑(seq η n) (a, b)) {c | (b, c) ∈ s}) = fun b =>\n    ∑' (n : ℕ), ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s}\n[PROOFSTEP]\next1 b\n[GOAL]\ncase e_f.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\nb : β\n⊢ ↑↑(Measure.sum fun n => ↑(seq η n) (a, b)) {c | (b, c) ∈ s} = ∑' (n : ℕ), ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s}\n[PROOFSTEP]\nrw [Measure.sum_apply]\n[GOAL]\ncase e_f.h.hs\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\nb : β\n⊢ MeasurableSet {c | (b, c) ∈ s}\n[PROOFSTEP]\nexact measurable_prod_mk_left hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\nthis :\n  ∫⁻ (b : β), ↑↑(Measure.sum fun n => ↑(seq η n) (a, b)) {c | (b, c) ∈ s} ∂↑κ a =\n    ∫⁻ (b : β), ∑' (n : ℕ), ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s} ∂↑κ a\n⊢ ∫⁻ (b : β), ↑↑(Measure.sum fun n => ↑(seq η n) (a, b)) {c | (b, c) ∈ s} ∂↑κ a =\n    ∑' (n : ℕ), ∫⁻ (b : β), ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s} ∂↑κ a\n[PROOFSTEP]\nrw [this, lintegral_tsum]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\nthis :\n  ∫⁻ (b : β), ↑↑(Measure.sum fun n => ↑(seq η n) (a, b)) {c | (b, c) ∈ s} ∂↑κ a =\n    ∫⁻ (b : β), ∑' (n : ℕ), ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s} ∂↑κ a\n⊢ ∀ (i : ℕ), AEMeasurable fun b => ↑↑(↑(seq η i) (a, b)) {c | (b, c) ∈ s}\n[PROOFSTEP]\nexact fun n =>\n  ((measurable_kernel_prod_mk_left (κ := (seq η n)) ((measurable_fst.snd.prod_mk measurable_snd) hs)).comp\n      measurable_prod_mk_left).aemeasurable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel κ\na : α\ns : Set (β × γ)\n⊢ compProdFun κ η a s = ∑' (n : ℕ), compProdFun (seq κ n) η a s\n[PROOFSTEP]\nsimp_rw [compProdFun, (measure_sum_seq κ _).symm, lintegral_sum_measure]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ compProdFun κ η a s = ∑' (n : ℕ) (m : ℕ), compProdFun (seq κ n) (seq η m) a s\n[PROOFSTEP]\nsimp_rw [compProdFun_tsum_left κ η a s, compProdFun_tsum_right _ η a hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\nhs : MeasurableSet s\n⊢ Measurable fun a => compProdFun κ η a s\n[PROOFSTEP]\nsimp only [compProdFun]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\nhs : MeasurableSet s\n⊢ Measurable fun a => ∫⁻ (b : β), ↑↑(↑η (a, b)) {c | (b, c) ∈ s} ∂↑κ a\n[PROOFSTEP]\nhave h_meas : Measurable (Function.uncurry fun a b => η (a, b) {c : γ | (b, c) ∈ s}) :=\n  by\n  have : (Function.uncurry fun a b => η (a, b) {c : γ | (b, c) ∈ s}) = fun p => η p {c : γ | (p.2, c) ∈ s} :=\n    by\n    ext1 p\n    have hp_eq_mk : p = (p.fst, p.snd) := Prod.mk.eta.symm\n    rw [hp_eq_mk, Function.uncurry_apply_pair]\n  rw [this]\n  exact measurable_kernel_prod_mk_left (measurable_fst.snd.prod_mk measurable_snd hs)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\nhs : MeasurableSet s\n⊢ Measurable (Function.uncurry fun a b => ↑↑(↑η (a, b)) {c | (b, c) ∈ s})\n[PROOFSTEP]\nhave : (Function.uncurry fun a b => η (a, b) {c : γ | (b, c) ∈ s}) = fun p => η p {c : γ | (p.2, c) ∈ s} :=\n  by\n  ext1 p\n  have hp_eq_mk : p = (p.fst, p.snd) := Prod.mk.eta.symm\n  rw [hp_eq_mk, Function.uncurry_apply_pair]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\nhs : MeasurableSet s\n⊢ (Function.uncurry fun a b => ↑↑(↑η (a, b)) {c | (b, c) ∈ s}) = fun p => ↑↑(↑η p) {c | (p.snd, c) ∈ s}\n[PROOFSTEP]\next1 p\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\nhs : MeasurableSet s\np : α × β\n⊢ Function.uncurry (fun a b => ↑↑(↑η (a, b)) {c | (b, c) ∈ s}) p = ↑↑(↑η p) {c | (p.snd, c) ∈ s}\n[PROOFSTEP]\nhave hp_eq_mk : p = (p.fst, p.snd) := Prod.mk.eta.symm\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\nhs : MeasurableSet s\np : α × β\nhp_eq_mk : p = (p.fst, p.snd)\n⊢ Function.uncurry (fun a b => ↑↑(↑η (a, b)) {c | (b, c) ∈ s}) p = ↑↑(↑η p) {c | (p.snd, c) ∈ s}\n[PROOFSTEP]\nrw [hp_eq_mk, Function.uncurry_apply_pair]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\nhs : MeasurableSet s\nthis : (Function.uncurry fun a b => ↑↑(↑η (a, b)) {c | (b, c) ∈ s}) = fun p => ↑↑(↑η p) {c | (p.snd, c) ∈ s}\n⊢ Measurable (Function.uncurry fun a b => ↑↑(↑η (a, b)) {c | (b, c) ∈ s})\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\nhs : MeasurableSet s\nthis : (Function.uncurry fun a b => ↑↑(↑η (a, b)) {c | (b, c) ∈ s}) = fun p => ↑↑(↑η p) {c | (p.snd, c) ∈ s}\n⊢ Measurable fun p => ↑↑(↑η p) {c | (p.snd, c) ∈ s}\n[PROOFSTEP]\nexact measurable_kernel_prod_mk_left (measurable_fst.snd.prod_mk measurable_snd hs)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\nhs : MeasurableSet s\nh_meas : Measurable (Function.uncurry fun a b => ↑↑(↑η (a, b)) {c | (b, c) ∈ s})\n⊢ Measurable fun a => ∫⁻ (b : β), ↑↑(↑η (a, b)) {c | (b, c) ∈ s} ∂↑κ a\n[PROOFSTEP]\nexact h_meas.lintegral_kernel_prod_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhs : MeasurableSet s\n⊢ Measurable fun a => compProdFun κ η a s\n[PROOFSTEP]\nsimp_rw [compProdFun_tsum_right κ η _ hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhs : MeasurableSet s\n⊢ Measurable fun a => ∑' (n : ℕ), compProdFun κ (seq η n) a s\n[PROOFSTEP]\nrefine' Measurable.ennreal_tsum fun n => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhs : MeasurableSet s\nn : ℕ\n⊢ Measurable fun a => compProdFun κ (seq η n) a s\n[PROOFSTEP]\nsimp only [compProdFun]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhs : MeasurableSet s\nn : ℕ\n⊢ Measurable fun a => ∫⁻ (b : β), ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s} ∂↑κ a\n[PROOFSTEP]\nhave h_meas : Measurable (Function.uncurry fun a b => seq η n (a, b) {c : γ | (b, c) ∈ s}) :=\n  by\n  have :\n    (Function.uncurry fun a b => seq η n (a, b) {c : γ | (b, c) ∈ s}) = fun p => seq η n p {c : γ | (p.2, c) ∈ s} :=\n    by\n    ext1 p\n    have hp_eq_mk : p = (p.fst, p.snd) := Prod.mk.eta.symm\n    rw [hp_eq_mk, Function.uncurry_apply_pair]\n  rw [this]\n  exact measurable_kernel_prod_mk_left (measurable_fst.snd.prod_mk measurable_snd hs)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhs : MeasurableSet s\nn : ℕ\n⊢ Measurable (Function.uncurry fun a b => ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s})\n[PROOFSTEP]\nhave : (Function.uncurry fun a b => seq η n (a, b) {c : γ | (b, c) ∈ s}) = fun p => seq η n p {c : γ | (p.2, c) ∈ s} :=\n  by\n  ext1 p\n  have hp_eq_mk : p = (p.fst, p.snd) := Prod.mk.eta.symm\n  rw [hp_eq_mk, Function.uncurry_apply_pair]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhs : MeasurableSet s\nn : ℕ\n⊢ (Function.uncurry fun a b => ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s}) = fun p => ↑↑(↑(seq η n) p) {c | (p.snd, c) ∈ s}\n[PROOFSTEP]\next1 p\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhs : MeasurableSet s\nn : ℕ\np : α × β\n⊢ Function.uncurry (fun a b => ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s}) p = ↑↑(↑(seq η n) p) {c | (p.snd, c) ∈ s}\n[PROOFSTEP]\nhave hp_eq_mk : p = (p.fst, p.snd) := Prod.mk.eta.symm\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhs : MeasurableSet s\nn : ℕ\np : α × β\nhp_eq_mk : p = (p.fst, p.snd)\n⊢ Function.uncurry (fun a b => ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s}) p = ↑↑(↑(seq η n) p) {c | (p.snd, c) ∈ s}\n[PROOFSTEP]\nrw [hp_eq_mk, Function.uncurry_apply_pair]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhs : MeasurableSet s\nn : ℕ\nthis :\n  (Function.uncurry fun a b => ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s}) = fun p => ↑↑(↑(seq η n) p) {c | (p.snd, c) ∈ s}\n⊢ Measurable (Function.uncurry fun a b => ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s})\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhs : MeasurableSet s\nn : ℕ\nthis :\n  (Function.uncurry fun a b => ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s}) = fun p => ↑↑(↑(seq η n) p) {c | (p.snd, c) ∈ s}\n⊢ Measurable fun p => ↑↑(↑(seq η n) p) {c | (p.snd, c) ∈ s}\n[PROOFSTEP]\nexact measurable_kernel_prod_mk_left (measurable_fst.snd.prod_mk measurable_snd hs)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhs : MeasurableSet s\nn : ℕ\nh_meas : Measurable (Function.uncurry fun a b => ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s})\n⊢ Measurable fun a => ∫⁻ (b : β), ↑↑(↑(seq η n) (a, b)) {c | (b, c) ∈ s} ∂↑κ a\n[PROOFSTEP]\nexact h_meas.lintegral_kernel_prod_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel κ ∧ IsSFiniteKernel η\n⊢ (fun a =>\n      Measure.ofMeasurable (fun s x => compProdFun κ η a s) (_ : compProdFun κ η a ∅ = 0)\n        (_ :\n          ∀ (f : ℕ → Set (β × γ)),\n            (∀ (i : ℕ), MeasurableSet (f i)) →\n              Pairwise (Disjoint on f) → compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i))) ∈\n    kernel α (β × γ)\n[PROOFSTEP]\nhave : IsSFiniteKernel κ := h.1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel κ ∧ IsSFiniteKernel η\nthis : IsSFiniteKernel κ\n⊢ (fun a =>\n      Measure.ofMeasurable (fun s x => compProdFun κ η a s) (_ : compProdFun κ η a ∅ = 0)\n        (_ :\n          ∀ (f : ℕ → Set (β × γ)),\n            (∀ (i : ℕ), MeasurableSet (f i)) →\n              Pairwise (Disjoint on f) → compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i))) ∈\n    kernel α (β × γ)\n[PROOFSTEP]\nhave : IsSFiniteKernel η := h.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel κ ∧ IsSFiniteKernel η\nthis✝ : IsSFiniteKernel κ\nthis : IsSFiniteKernel η\n⊢ (fun a =>\n      Measure.ofMeasurable (fun s x => compProdFun κ η a s) (_ : compProdFun κ η a ∅ = 0)\n        (_ :\n          ∀ (f : ℕ → Set (β × γ)),\n            (∀ (i : ℕ), MeasurableSet (f i)) →\n              Pairwise (Disjoint on f) → compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i))) ∈\n    kernel α (β × γ)\n[PROOFSTEP]\nrefine' Measure.measurable_of_measurable_coe _ fun s hs => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel κ ∧ IsSFiniteKernel η\nthis✝ : IsSFiniteKernel κ\nthis : IsSFiniteKernel η\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ Measurable fun b =>\n    ↑↑(Measure.ofMeasurable (fun s x => compProdFun κ η b s) (_ : compProdFun κ η b ∅ = 0)\n            (_ :\n              ∀ (f : ℕ → Set (β × γ)),\n                (∀ (i : ℕ), MeasurableSet (f i)) →\n                  Pairwise (Disjoint on f) → compProdFun κ η b (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η b (f i)))\n      s\n[PROOFSTEP]\nhave :\n  (fun a =>\n      Measure.ofMeasurable (fun s _ => compProdFun κ η a s) (compProdFun_empty κ η a) (compProdFun_iUnion κ η a) s) =\n    fun a => compProdFun κ η a s :=\n  by ext1 a; rwa [Measure.ofMeasurable_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel κ ∧ IsSFiniteKernel η\nthis✝ : IsSFiniteKernel κ\nthis : IsSFiniteKernel η\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ (fun a =>\n      ↑↑(Measure.ofMeasurable (fun s x => compProdFun κ η a s) (_ : compProdFun κ η a ∅ = 0)\n              (_ :\n                ∀ (f : ℕ → Set (β × γ)),\n                  (∀ (i : ℕ), MeasurableSet (f i)) →\n                    Pairwise (Disjoint on f) →\n                      compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i)))\n        s) =\n    fun a => compProdFun κ η a s\n[PROOFSTEP]\next1 a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel κ ∧ IsSFiniteKernel η\nthis✝ : IsSFiniteKernel κ\nthis : IsSFiniteKernel η\ns : Set (β × γ)\nhs : MeasurableSet s\na : α\n⊢ ↑↑(Measure.ofMeasurable (fun s x => compProdFun κ η a s) (_ : compProdFun κ η a ∅ = 0)\n            (_ :\n              ∀ (f : ℕ → Set (β × γ)),\n                (∀ (i : ℕ), MeasurableSet (f i)) →\n                  Pairwise (Disjoint on f) → compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i)))\n      s =\n    compProdFun κ η a s\n[PROOFSTEP]\nrwa [Measure.ofMeasurable_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel κ ∧ IsSFiniteKernel η\nthis✝¹ : IsSFiniteKernel κ\nthis✝ : IsSFiniteKernel η\ns : Set (β × γ)\nhs : MeasurableSet s\nthis :\n  (fun a =>\n      ↑↑(Measure.ofMeasurable (fun s x => compProdFun κ η a s) (_ : compProdFun κ η a ∅ = 0)\n              (_ :\n                ∀ (f : ℕ → Set (β × γ)),\n                  (∀ (i : ℕ), MeasurableSet (f i)) →\n                    Pairwise (Disjoint on f) →\n                      compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i)))\n        s) =\n    fun a => compProdFun κ η a s\n⊢ Measurable fun b =>\n    ↑↑(Measure.ofMeasurable (fun s x => compProdFun κ η b s) (_ : compProdFun κ η b ∅ = 0)\n            (_ :\n              ∀ (f : ℕ → Set (β × γ)),\n                (∀ (i : ℕ), MeasurableSet (f i)) →\n                  Pairwise (Disjoint on f) → compProdFun κ η b (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η b (f i)))\n      s\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel κ ∧ IsSFiniteKernel η\nthis✝¹ : IsSFiniteKernel κ\nthis✝ : IsSFiniteKernel η\ns : Set (β × γ)\nhs : MeasurableSet s\nthis :\n  (fun a =>\n      ↑↑(Measure.ofMeasurable (fun s x => compProdFun κ η a s) (_ : compProdFun κ η a ∅ = 0)\n              (_ :\n                ∀ (f : ℕ → Set (β × γ)),\n                  (∀ (i : ℕ), MeasurableSet (f i)) →\n                    Pairwise (Disjoint on f) →\n                      compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i)))\n        s) =\n    fun a => compProdFun κ η a s\n⊢ Measurable fun a => compProdFun κ η a s\n[PROOFSTEP]\nexact measurable_compProdFun κ η hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ ↑↑(↑(κ ⊗ₖ η) a) s = compProdFun κ η a s\n[PROOFSTEP]\nrw [compProd, dif_pos]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ ↑↑(↑{\n                val := fun a =>\n                  Measure.ofMeasurable (fun s x => compProdFun κ η a s) (_ : compProdFun κ η a ∅ = 0)\n                    (_ :\n                      ∀ (f : ℕ → Set (β × γ)),\n                        (∀ (i : ℕ), MeasurableSet (f i)) →\n                          Pairwise (Disjoint on f) →\n                            compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i)),\n                property :=\n                  (_ :\n                    Measurable fun a =>\n                      Measure.ofMeasurable (fun s x => compProdFun κ η a s) (_ : compProdFun κ η a ∅ = 0)\n                        (_ :\n                          ∀ (f : ℕ → Set (β × γ)),\n                            (∀ (i : ℕ), MeasurableSet (f i)) →\n                              Pairwise (Disjoint on f) →\n                                compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i))) }\n            a)\n      s =\n    compProdFun κ η a s\ncase hc\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ IsSFiniteKernel κ ∧ IsSFiniteKernel η\n[PROOFSTEP]\nswap\n[GOAL]\ncase hc\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ IsSFiniteKernel κ ∧ IsSFiniteKernel η\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase hc.left\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ IsSFiniteKernel κ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase hc.right\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ IsSFiniteKernel η\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ ↑↑(↑{\n                val := fun a =>\n                  Measure.ofMeasurable (fun s x => compProdFun κ η a s) (_ : compProdFun κ η a ∅ = 0)\n                    (_ :\n                      ∀ (f : ℕ → Set (β × γ)),\n                        (∀ (i : ℕ), MeasurableSet (f i)) →\n                          Pairwise (Disjoint on f) →\n                            compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i)),\n                property :=\n                  (_ :\n                    Measurable fun a =>\n                      Measure.ofMeasurable (fun s x => compProdFun κ η a s) (_ : compProdFun κ η a ∅ = 0)\n                        (_ :\n                          ∀ (f : ℕ → Set (β × γ)),\n                            (∀ (i : ℕ), MeasurableSet (f i)) →\n                              Pairwise (Disjoint on f) →\n                                compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i))) }\n            a)\n      s =\n    compProdFun κ η a s\n[PROOFSTEP]\nchange\n  Measure.ofMeasurable (fun s _ => compProdFun κ η a s) (compProdFun_empty κ η a) (compProdFun_iUnion κ η a) s =\n    ∫⁻ b, η (a, b) {c | (b, c) ∈ s} ∂κ a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ ↑↑(Measure.ofMeasurable (fun s x => compProdFun κ η a s) (_ : compProdFun κ η a ∅ = 0)\n            (_ :\n              ∀ (f : ℕ → Set (β × γ)),\n                (∀ (i : ℕ), MeasurableSet (f i)) →\n                  Pairwise (Disjoint on f) → compProdFun κ η a (⋃ (i : ℕ), f i) = ∑' (i : ℕ), compProdFun κ η a (f i)))\n      s =\n    ∫⁻ (b : β), ↑↑(↑η (a, b)) {c | (b, c) ∈ s} ∂↑κ a\n[PROOFSTEP]\nrw [Measure.ofMeasurable_apply _ hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ compProdFun κ η a s = ∫⁻ (b : β), ↑↑(↑η (a, b)) {c | (b, c) ∈ s} ∂↑κ a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : ¬IsSFiniteKernel κ\n⊢ κ ⊗ₖ η = 0\n[PROOFSTEP]\nrw [compProd, dif_neg]\n[GOAL]\ncase hnc\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : ¬IsSFiniteKernel κ\n⊢ ¬(IsSFiniteKernel κ ∧ IsSFiniteKernel η)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : ¬IsSFiniteKernel η\n⊢ κ ⊗ₖ η = 0\n[PROOFSTEP]\nrw [compProd, dif_neg]\n[GOAL]\ncase hnc\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : ¬IsSFiniteKernel η\n⊢ ¬(IsSFiniteKernel κ ∧ IsSFiniteKernel η)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\n⊢ ∀ᵐ (b : β) ∂↑κ a, ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) < ⊤\n[PROOFSTEP]\nlet t := toMeasurable ((κ ⊗ₖ η) a) s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\n⊢ ∀ᵐ (b : β) ∂↑κ a, ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) < ⊤\n[PROOFSTEP]\nhave : ∀ b : β, η (a, b) (Prod.mk b ⁻¹' s) ≤ η (a, b) (Prod.mk b ⁻¹' t) := fun b =>\n  measure_mono (Set.preimage_mono (subset_toMeasurable _ _))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\nthis : ∀ (b : β), ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) ≤ ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t)\n⊢ ∀ᵐ (b : β) ∂↑κ a, ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) < ⊤\n[PROOFSTEP]\nhave ht : MeasurableSet t := measurableSet_toMeasurable _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\nthis : ∀ (b : β), ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) ≤ ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t)\nht : MeasurableSet t\n⊢ ∀ᵐ (b : β) ∂↑κ a, ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) < ⊤\n[PROOFSTEP]\nhave h2t : (κ ⊗ₖ η) a t ≠ ∞ := by rwa [measure_toMeasurable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\nthis : ∀ (b : β), ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) ≤ ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t)\nht : MeasurableSet t\n⊢ ↑↑(↑(κ ⊗ₖ η) a) t ≠ ⊤\n[PROOFSTEP]\nrwa [measure_toMeasurable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\nthis : ∀ (b : β), ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) ≤ ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t)\nht : MeasurableSet t\nh2t : ↑↑(↑(κ ⊗ₖ η) a) t ≠ ⊤\n⊢ ∀ᵐ (b : β) ∂↑κ a, ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) < ⊤\n[PROOFSTEP]\nhave ht_lt_top : ∀ᵐ b ∂κ a, η (a, b) (Prod.mk b ⁻¹' t) < ∞ :=\n  by\n  rw [kernel.compProd_apply _ _ _ ht] at h2t \n  exact ae_lt_top (kernel.measurable_kernel_prod_mk_left' ht a) h2t\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\nthis : ∀ (b : β), ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) ≤ ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t)\nht : MeasurableSet t\nh2t : ↑↑(↑(κ ⊗ₖ η) a) t ≠ ⊤\n⊢ ∀ᵐ (b : β) ∂↑κ a, ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t) < ⊤\n[PROOFSTEP]\nrw [kernel.compProd_apply _ _ _ ht] at h2t \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\nthis : ∀ (b : β), ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) ≤ ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t)\nht : MeasurableSet t\nh2t : ∫⁻ (b : β), ↑↑(↑η (a, b)) {c | (b, c) ∈ t} ∂↑κ a ≠ ⊤\n⊢ ∀ᵐ (b : β) ∂↑κ a, ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t) < ⊤\n[PROOFSTEP]\nexact ae_lt_top (kernel.measurable_kernel_prod_mk_left' ht a) h2t\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\nthis : ∀ (b : β), ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) ≤ ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t)\nht : MeasurableSet t\nh2t : ↑↑(↑(κ ⊗ₖ η) a) t ≠ ⊤\nht_lt_top : ∀ᵐ (b : β) ∂↑κ a, ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t) < ⊤\n⊢ ∀ᵐ (b : β) ∂↑κ a, ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) < ⊤\n[PROOFSTEP]\nfilter_upwards [ht_lt_top] with b hb\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\nthis : ∀ (b : β), ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) ≤ ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t)\nht : MeasurableSet t\nh2t : ↑↑(↑(κ ⊗ₖ η) a) t ≠ ⊤\nht_lt_top : ∀ᵐ (b : β) ∂↑κ a, ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t) < ⊤\nb : β\nhb : ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' toMeasurable (↑(κ ⊗ₖ η) a) s) < ⊤\n⊢ ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) < ⊤\n[PROOFSTEP]\nexact (this b).trans_lt hb\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nhs : MeasurableSet s\n⊢ ↑↑(↑(κ ⊗ₖ η) a) s = 0 ↔ (fun b => ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s)) =ᵐ[↑κ a] 0\n[PROOFSTEP]\nrw [kernel.compProd_apply _ _ _ hs, lintegral_eq_zero_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nhs : MeasurableSet s\n⊢ (fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ s}) =ᵐ[↑κ a] 0 ↔ (fun b => ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s)) =ᵐ[↑κ a] 0\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\nhs : MeasurableSet s\n⊢ Measurable fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ s}\n[PROOFSTEP]\nexact kernel.measurable_kernel_prod_mk_left' hs a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nh : ↑↑(↑(κ ⊗ₖ η) a) s = 0\n⊢ (fun b => ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s)) =ᵐ[↑κ a] 0\n[PROOFSTEP]\nobtain ⟨t, hst, mt, ht⟩ := exists_measurable_superset_of_null h\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nh : ↑↑(↑(κ ⊗ₖ η) a) s = 0\nt : Set (β × γ)\nhst : s ⊆ t\nmt : MeasurableSet t\nht : ↑↑(↑(κ ⊗ₖ η) a) t = 0\n⊢ (fun b => ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s)) =ᵐ[↑κ a] 0\n[PROOFSTEP]\nsimp_rw [compProd_null a mt] at ht \n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nh : ↑↑(↑(κ ⊗ₖ η) a) s = 0\nt : Set (β × γ)\nhst : s ⊆ t\nmt : MeasurableSet t\nht : (fun b => ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t)) =ᵐ[↑κ a] 0\n⊢ (fun b => ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s)) =ᵐ[↑κ a] 0\n[PROOFSTEP]\nrw [Filter.eventuallyLE_antisymm_iff]\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nh : ↑↑(↑(κ ⊗ₖ η) a) s = 0\nt : Set (β × γ)\nhst : s ⊆ t\nmt : MeasurableSet t\nht : (fun b => ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t)) =ᵐ[↑κ a] 0\n⊢ (fun b => ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s)) ≤ᵐ[↑κ a] 0 ∧ 0 ≤ᵐ[↑κ a] fun b => ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s)\n[PROOFSTEP]\nexact\n  ⟨Filter.EventuallyLE.trans_eq (Filter.eventually_of_forall fun x => (measure_mono (Set.preimage_mono hst) : _)) ht,\n    Filter.eventually_of_forall fun x => zero_le _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\n⊢ kernel.restrict κ hs ⊗ₖ kernel.restrict η ht = kernel.restrict (κ ⊗ₖ η) (_ : MeasurableSet (s ×ˢ t))\n[PROOFSTEP]\next a u hu\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\na : α\nu : Set (β × γ)\nhu : MeasurableSet u\n⊢ ↑↑(↑(kernel.restrict κ hs ⊗ₖ kernel.restrict η ht) a) u =\n    ↑↑(↑(kernel.restrict (κ ⊗ₖ η) (_ : MeasurableSet (s ×ˢ t))) a) u\n[PROOFSTEP]\nrw [compProd_apply _ _ _ hu, restrict_apply' _ _ _ hu, compProd_apply _ _ _ (hu.inter (hs.prod ht))]\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\na : α\nu : Set (β × γ)\nhu : MeasurableSet u\n⊢ ∫⁻ (b : β), ↑↑(↑(kernel.restrict η ht) (a, b)) {c | (b, c) ∈ u} ∂↑(kernel.restrict κ hs) a =\n    ∫⁻ (b : β), ↑↑(↑η (a, b)) {c | (b, c) ∈ u ∩ s ×ˢ t} ∂↑κ a\n[PROOFSTEP]\nsimp only [kernel.restrict_apply, Measure.restrict_apply' ht, Set.mem_inter_iff, Set.prod_mk_mem_set_prod_eq]\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\na : α\nu : Set (β × γ)\nhu : MeasurableSet u\n⊢ ∫⁻ (b : β) in s, ↑↑(↑η (a, b)) ({c | (b, c) ∈ u} ∩ t) ∂↑κ a =\n    ∫⁻ (b : β), ↑↑(↑η (a, b)) {c | (b, c) ∈ u ∧ b ∈ s ∧ c ∈ t} ∂↑κ a\n[PROOFSTEP]\nhave :\n  ∀ b, η (a, b) {c : γ | (b, c) ∈ u ∧ b ∈ s ∧ c ∈ t} = s.indicator (fun b => η (a, b) ({c : γ | (b, c) ∈ u} ∩ t)) b :=\n  by\n  intro b\n  classical\n  rw [Set.indicator_apply]\n  split_ifs with h\n  · simp only [h, true_and_iff]\n    rfl\n  · simp only [h, false_and_iff, and_false_iff, Set.setOf_false, measure_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\na : α\nu : Set (β × γ)\nhu : MeasurableSet u\n⊢ ∀ (b : β),\n    ↑↑(↑η (a, b)) {c | (b, c) ∈ u ∧ b ∈ s ∧ c ∈ t} = Set.indicator s (fun b => ↑↑(↑η (a, b)) ({c | (b, c) ∈ u} ∩ t)) b\n[PROOFSTEP]\nintro b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\na : α\nu : Set (β × γ)\nhu : MeasurableSet u\nb : β\n⊢ ↑↑(↑η (a, b)) {c | (b, c) ∈ u ∧ b ∈ s ∧ c ∈ t} = Set.indicator s (fun b => ↑↑(↑η (a, b)) ({c | (b, c) ∈ u} ∩ t)) b\n[PROOFSTEP]\nclassical\nrw [Set.indicator_apply]\nsplit_ifs with h\n· simp only [h, true_and_iff]\n  rfl\n· simp only [h, false_and_iff, and_false_iff, Set.setOf_false, measure_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\na : α\nu : Set (β × γ)\nhu : MeasurableSet u\nb : β\n⊢ ↑↑(↑η (a, b)) {c | (b, c) ∈ u ∧ b ∈ s ∧ c ∈ t} = Set.indicator s (fun b => ↑↑(↑η (a, b)) ({c | (b, c) ∈ u} ∩ t)) b\n[PROOFSTEP]\nrw [Set.indicator_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\na : α\nu : Set (β × γ)\nhu : MeasurableSet u\nb : β\n⊢ ↑↑(↑η (a, b)) {c | (b, c) ∈ u ∧ b ∈ s ∧ c ∈ t} = if b ∈ s then ↑↑(↑η (a, b)) ({c | (b, c) ∈ u} ∩ t) else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\na : α\nu : Set (β × γ)\nhu : MeasurableSet u\nb : β\nh : b ∈ s\n⊢ ↑↑(↑η (a, b)) {c | (b, c) ∈ u ∧ b ∈ s ∧ c ∈ t} = ↑↑(↑η (a, b)) ({c | (b, c) ∈ u} ∩ t)\n[PROOFSTEP]\nsimp only [h, true_and_iff]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\na : α\nu : Set (β × γ)\nhu : MeasurableSet u\nb : β\nh : b ∈ s\n⊢ ↑↑(↑η (a, b)) {c | (b, c) ∈ u ∧ c ∈ t} = ↑↑(↑η (a, b)) ({c | (b, c) ∈ u} ∩ t)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\na : α\nu : Set (β × γ)\nhu : MeasurableSet u\nb : β\nh : ¬b ∈ s\n⊢ ↑↑(↑η (a, b)) {c | (b, c) ∈ u ∧ b ∈ s ∧ c ∈ t} = 0\n[PROOFSTEP]\nsimp only [h, false_and_iff, and_false_iff, Set.setOf_false, measure_empty]\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\na : α\nu : Set (β × γ)\nhu : MeasurableSet u\nthis :\n  ∀ (b : β),\n    ↑↑(↑η (a, b)) {c | (b, c) ∈ u ∧ b ∈ s ∧ c ∈ t} = Set.indicator s (fun b => ↑↑(↑η (a, b)) ({c | (b, c) ∈ u} ∩ t)) b\n⊢ ∫⁻ (b : β) in s, ↑↑(↑η (a, b)) ({c | (b, c) ∈ u} ∩ t) ∂↑κ a =\n    ∫⁻ (b : β), ↑↑(↑η (a, b)) {c | (b, c) ∈ u ∧ b ∈ s ∧ c ∈ t} ∂↑κ a\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\na : α\nu : Set (β × γ)\nhu : MeasurableSet u\nthis :\n  ∀ (b : β),\n    ↑↑(↑η (a, b)) {c | (b, c) ∈ u ∧ b ∈ s ∧ c ∈ t} = Set.indicator s (fun b => ↑↑(↑η (a, b)) ({c | (b, c) ∈ u} ∩ t)) b\n⊢ ∫⁻ (b : β) in s, ↑↑(↑η (a, b)) ({c | (b, c) ∈ u} ∩ t) ∂↑κ a =\n    ∫⁻ (b : β), Set.indicator s (fun b => ↑↑(↑η (a, b)) ({c | (b, c) ∈ u} ∩ t)) b ∂↑κ a\n[PROOFSTEP]\nrw [lintegral_indicator _ hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\ns : Set β\nhs : MeasurableSet s\n⊢ kernel.restrict κ hs ⊗ₖ η = kernel.restrict (κ ⊗ₖ η) (_ : MeasurableSet (s ×ˢ Set.univ))\n[PROOFSTEP]\nrw [← compProd_restrict]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\ns : Set β\nhs : MeasurableSet s\n⊢ kernel.restrict κ hs ⊗ₖ η = kernel.restrict κ ?hs ⊗ₖ kernel.restrict η ?ht\ncase hs\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\ns : Set β\nhs : MeasurableSet s\n⊢ MeasurableSet s\ncase ht\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\ns : Set β\nhs : MeasurableSet s\n⊢ MeasurableSet Set.univ\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_η\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\ns : Set β\nhs : MeasurableSet s\n⊢ η = kernel.restrict η ?ht\ncase ht\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\ns : Set β\nhs : MeasurableSet s\n⊢ MeasurableSet Set.univ\n[PROOFSTEP]\nexact kernel.restrict_univ.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nt : Set γ\nht : MeasurableSet t\n⊢ κ ⊗ₖ kernel.restrict η ht = kernel.restrict (κ ⊗ₖ η) (_ : MeasurableSet (Set.univ ×ˢ t))\n[PROOFSTEP]\nrw [← compProd_restrict]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nt : Set γ\nht : MeasurableSet t\n⊢ κ ⊗ₖ kernel.restrict η ht = kernel.restrict κ ?hs ⊗ₖ kernel.restrict η ?ht\ncase hs\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nt : Set γ\nht : MeasurableSet t\n⊢ MeasurableSet Set.univ\ncase ht\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nt : Set γ\nht : MeasurableSet t\n⊢ MeasurableSet t\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_κ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nt : Set γ\nht : MeasurableSet t\n⊢ κ = kernel.restrict κ ?hs\ncase hs\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nt : Set γ\nht : MeasurableSet t\n⊢ MeasurableSet Set.univ\n[PROOFSTEP]\nexact kernel.restrict_univ.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\n⊢ ∫⁻ (bc : β × γ), f bc.fst bc.snd ∂↑(κ ⊗ₖ η) a = ∫⁻ (b : β), ∫⁻ (c : γ), f b c ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nlet F : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\n⊢ ∫⁻ (bc : β × γ), f bc.fst bc.snd ∂↑(κ ⊗ₖ η) a = ∫⁻ (b : β), ∫⁻ (c : γ), f b c ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nhave h : ∀ a, ⨆ n, F n a = Function.uncurry f a := SimpleFunc.iSup_eapprox_apply (Function.uncurry f) hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β × γ), ⨆ (n : ℕ), ↑(F n) a = Function.uncurry f a\n⊢ ∫⁻ (bc : β × γ), f bc.fst bc.snd ∂↑(κ ⊗ₖ η) a = ∫⁻ (b : β), ∫⁻ (c : γ), f b c ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nsimp only [Prod.forall, Function.uncurry_apply_pair] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\n⊢ ∫⁻ (bc : β × γ), f bc.fst bc.snd ∂↑(κ ⊗ₖ η) a = ∫⁻ (b : β), ∫⁻ (c : γ), f b c ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [← h, Prod.mk.eta]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\n⊢ ∫⁻ (bc : β × γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) bc ∂↑(κ ⊗ₖ η) a =\n    ∫⁻ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (b, c) ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nhave h_mono : Monotone F := fun i j hij b => SimpleFunc.monotone_eapprox (Function.uncurry f) hij _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\n⊢ ∫⁻ (bc : β × γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) bc ∂↑(κ ⊗ₖ η) a =\n    ∫⁻ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (b, c) ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nrw [lintegral_iSup (fun n => (F n).measurable) h_mono]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\n⊢ ⨆ (n : ℕ), ∫⁻ (a : β × γ), ↑(F n) a ∂↑(κ ⊗ₖ η) a =\n    ∫⁻ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (b, c) ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nhave : ∀ b, ∫⁻ c, ⨆ n, F n (b, c) ∂η (a, b) = ⨆ n, ∫⁻ c, F n (b, c) ∂η (a, b) :=\n  by\n  intro a\n  rw [lintegral_iSup]\n  · exact fun n => (F n).measurable.comp measurable_prod_mk_left\n  · exact fun i j hij b => h_mono hij _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\n⊢ ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\n[PROOFSTEP]\nintro a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\na : β\n⊢ ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (a, c) ∂↑η (a✝, a) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (a, c) ∂↑η (a✝, a)\n[PROOFSTEP]\nrw [lintegral_iSup]\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\na : β\n⊢ ∀ (n : ℕ), Measurable fun c => ↑(F n) (a, c)\n[PROOFSTEP]\nexact fun n => (F n).measurable.comp measurable_prod_mk_left\n[GOAL]\ncase h_mono\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\na : β\n⊢ Monotone fun n c => ↑(F n) (a, c)\n[PROOFSTEP]\nexact fun i j hij b => h_mono hij _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\n⊢ ⨆ (n : ℕ), ∫⁻ (a : β × γ), ↑(F n) a ∂↑(κ ⊗ₖ η) a =\n    ∫⁻ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (b, c) ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\n⊢ ⨆ (n : ℕ), ∫⁻ (a : β × γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) a ∂↑(κ ⊗ₖ η) a =\n    ∫⁻ (b : β), ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (b, c) ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nhave h_some_meas_integral : ∀ f' : SimpleFunc (β × γ) ℝ≥0∞, Measurable fun b => ∫⁻ c, f' (b, c) ∂η (a, b) :=\n  by\n  intro f'\n  have : (fun b => ∫⁻ c, f' (b, c) ∂η (a, b)) = (fun ab => ∫⁻ c, f' (ab.2, c) ∂η ab) ∘ fun b => (a, b) := by ext1 ab;\n    rfl\n  rw [this]\n  refine' Measurable.comp _ measurable_prod_mk_left\n  exact\n    Measurable.lintegral_kernel_prod_right ((SimpleFunc.measurable _).comp (measurable_fst.snd.prod_mk measurable_snd))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\n⊢ ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\n[PROOFSTEP]\nintro f'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nf' : SimpleFunc (β × γ) ℝ≥0∞\n⊢ Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\n[PROOFSTEP]\nhave : (fun b => ∫⁻ c, f' (b, c) ∂η (a, b)) = (fun ab => ∫⁻ c, f' (ab.2, c) ∂η ab) ∘ fun b => (a, b) := by ext1 ab; rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nf' : SimpleFunc (β × γ) ℝ≥0∞\n⊢ (fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)) = (fun ab => ∫⁻ (c : γ), ↑f' (ab.snd, c) ∂↑η ab) ∘ fun b => (a, b)\n[PROOFSTEP]\next1 ab\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nf' : SimpleFunc (β × γ) ℝ≥0∞\nab : β\n⊢ ∫⁻ (c : γ), ↑f' (ab, c) ∂↑η (a, ab) = ((fun ab => ∫⁻ (c : γ), ↑f' (ab.snd, c) ∂↑η ab) ∘ fun b => (a, b)) ab\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis✝ : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nf' : SimpleFunc (β × γ) ℝ≥0∞\nthis : (fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)) = (fun ab => ∫⁻ (c : γ), ↑f' (ab.snd, c) ∂↑η ab) ∘ fun b => (a, b)\n⊢ Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis✝ : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nf' : SimpleFunc (β × γ) ℝ≥0∞\nthis : (fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)) = (fun ab => ∫⁻ (c : γ), ↑f' (ab.snd, c) ∂↑η ab) ∘ fun b => (a, b)\n⊢ Measurable ((fun ab => ∫⁻ (c : γ), ↑f' (ab.snd, c) ∂↑η ab) ∘ fun b => (a, b))\n[PROOFSTEP]\nrefine' Measurable.comp _ measurable_prod_mk_left\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis✝ : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nf' : SimpleFunc (β × γ) ℝ≥0∞\nthis : (fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)) = (fun ab => ∫⁻ (c : γ), ↑f' (ab.snd, c) ∂↑η ab) ∘ fun b => (a, b)\n⊢ Measurable fun ab => ∫⁻ (c : γ), ↑f' (ab.snd, c) ∂↑η ab\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis✝ : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nf' : SimpleFunc (β × γ) ℝ≥0∞\nthis : (fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)) = (fun ab => ∫⁻ (c : γ), ↑f' (ab.snd, c) ∂↑η ab) ∘ fun b => (a, b)\n⊢ MeasurableSpace α\n[PROOFSTEP]\nexact\n  Measurable.lintegral_kernel_prod_right ((SimpleFunc.measurable _).comp (measurable_fst.snd.prod_mk measurable_snd))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\n⊢ ⨆ (n : ℕ), ∫⁻ (a : β × γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) a ∂↑(κ ⊗ₖ η) a =\n    ∫⁻ (b : β), ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (b, c) ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nrw [lintegral_iSup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\n⊢ ⨆ (n : ℕ), ∫⁻ (a : β × γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) a ∂↑(κ ⊗ₖ η) a =\n    ⨆ (n : ℕ), ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a_1, c) ∂↑η (a, a_1) ∂↑κ a\ncase hf\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\n⊢ ∀ (n : ℕ), Measurable fun b => ∫⁻ (c : γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (b, c) ∂↑η (a, b)\ncase h_mono\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\n⊢ Monotone fun n b => ∫⁻ (c : γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (b, c) ∂↑η (a, b)\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\n⊢ ∀ (n : ℕ), Measurable fun b => ∫⁻ (c : γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (b, c) ∂↑η (a, b)\n[PROOFSTEP]\nexact fun n => h_some_meas_integral (F n)\n[GOAL]\ncase h_mono\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\n⊢ Monotone fun n b => ∫⁻ (c : γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (b, c) ∂↑η (a, b)\n[PROOFSTEP]\nexact fun i j hij b => lintegral_mono fun c => h_mono hij _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\n⊢ ⨆ (n : ℕ), ∫⁻ (a : β × γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) a ∂↑(κ ⊗ₖ η) a =\n    ⨆ (n : ℕ), ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a_1, c) ∂↑η (a, a_1) ∂↑κ a\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_s\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\n⊢ (fun n => ∫⁻ (a : β × γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) a ∂↑(κ ⊗ₖ η) a) = fun n =>\n    ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a_1, c) ∂↑η (a, a_1) ∂↑κ a\n[PROOFSTEP]\next1 n\n[GOAL]\ncase e_s.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\n⊢ ∫⁻ (a : β × γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) a ∂↑(κ ⊗ₖ η) a =\n    ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a_1, c) ∂↑η (a, a_1) ∂↑κ a\n[PROOFSTEP]\nrefine'\n  SimpleFunc.induction (P := fun f =>\n    (∫⁻ (a : β × γ), f a ∂(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), f (a_1, c) ∂η (a, a_1) ∂κ a)) _ _ (F n)\n[GOAL]\ncase e_s.h.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\n⊢ ∀ (c : ℝ≥0∞) {s : Set (β × γ)} (hs : MeasurableSet s),\n    (fun f => ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a)\n      (SimpleFunc.piecewise s hs (SimpleFunc.const (β × γ) c) (SimpleFunc.const (β × γ) 0))\n[PROOFSTEP]\nintro c s hs\n[GOAL]\ncase e_s.h.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nc : ℝ≥0∞\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ ∫⁻ (a : β × γ),\n      ↑(SimpleFunc.piecewise s hs (SimpleFunc.const (β × γ) c) (SimpleFunc.const (β × γ) 0)) a ∂↑(κ ⊗ₖ η) a =\n    ∫⁻ (a_1 : β),\n      ∫⁻ (c_1 : γ),\n        ↑(SimpleFunc.piecewise s hs (SimpleFunc.const (β × γ) c) (SimpleFunc.const (β × γ) 0))\n          (a_1, c_1) ∂↑η (a, a_1) ∂↑κ a\n[PROOFSTEP]\nclassical\n  -- Porting note: Added `classical` for `Set.piecewise_eq_indicator`\nsimp only [SimpleFunc.const_zero, SimpleFunc.coe_piecewise, SimpleFunc.coe_const, SimpleFunc.coe_zero,\n  Set.piecewise_eq_indicator, Function.const, lintegral_indicator_const hs]\nrw [compProd_apply κ η _ hs, ← lintegral_const_mul c _]\nswap\n· exact (measurable_kernel_prod_mk_left ((measurable_fst.snd.prod_mk measurable_snd) hs)).comp measurable_prod_mk_left\ncongr\next1 b\nrw [lintegral_indicator_const_comp measurable_prod_mk_left hs]\nrfl\n[GOAL]\ncase e_s.h.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nc : ℝ≥0∞\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ ∫⁻ (a : β × γ),\n      ↑(SimpleFunc.piecewise s hs (SimpleFunc.const (β × γ) c) (SimpleFunc.const (β × γ) 0)) a ∂↑(κ ⊗ₖ η) a =\n    ∫⁻ (a_1 : β),\n      ∫⁻ (c_1 : γ),\n        ↑(SimpleFunc.piecewise s hs (SimpleFunc.const (β × γ) c) (SimpleFunc.const (β × γ) 0))\n          (a_1, c_1) ∂↑η (a, a_1) ∂↑κ a\n[PROOFSTEP]\nsimp only [SimpleFunc.const_zero, SimpleFunc.coe_piecewise, SimpleFunc.coe_const, SimpleFunc.coe_zero,\n  Set.piecewise_eq_indicator, Function.const, lintegral_indicator_const hs]\n[GOAL]\ncase e_s.h.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nc : ℝ≥0∞\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ c * ↑↑(↑(κ ⊗ₖ η) a) s = ∫⁻ (a_1 : β), ∫⁻ (c_1 : γ), Set.indicator s (fun x => c) (a_1, c_1) ∂↑η (a, a_1) ∂↑κ a\n[PROOFSTEP]\nrw [compProd_apply κ η _ hs, ← lintegral_const_mul c _]\n[GOAL]\ncase e_s.h.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nc : ℝ≥0∞\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ ∫⁻ (a_1 : β), c * ↑↑(↑η (a, a_1)) {c | (a_1, c) ∈ s} ∂↑κ a =\n    ∫⁻ (a_1 : β), ∫⁻ (c_1 : γ), Set.indicator s (fun x => c) (a_1, c_1) ∂↑η (a, a_1) ∂↑κ a\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nc : ℝ≥0∞\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ Measurable fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ s}\n[PROOFSTEP]\nswap\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nc : ℝ≥0∞\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ Measurable fun b => ↑↑(↑η (a, b)) {c | (b, c) ∈ s}\n[PROOFSTEP]\nexact (measurable_kernel_prod_mk_left ((measurable_fst.snd.prod_mk measurable_snd) hs)).comp measurable_prod_mk_left\n[GOAL]\ncase e_s.h.refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nc : ℝ≥0∞\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ ∫⁻ (a_1 : β), c * ↑↑(↑η (a, a_1)) {c | (a_1, c) ∈ s} ∂↑κ a =\n    ∫⁻ (a_1 : β), ∫⁻ (c_1 : γ), Set.indicator s (fun x => c) (a_1, c_1) ∂↑η (a, a_1) ∂↑κ a\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_s.h.refine'_1.e_f\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nc : ℝ≥0∞\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ (fun a_1 => c * ↑↑(↑η (a, a_1)) {c | (a_1, c) ∈ s}) = fun a_1 =>\n    ∫⁻ (c_1 : γ), Set.indicator s (fun x => c) (a_1, c_1) ∂↑η (a, a_1)\n[PROOFSTEP]\next1 b\n[GOAL]\ncase e_s.h.refine'_1.e_f.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nc : ℝ≥0∞\ns : Set (β × γ)\nhs : MeasurableSet s\nb : β\n⊢ c * ↑↑(↑η (a, b)) {c | (b, c) ∈ s} = ∫⁻ (c_1 : γ), Set.indicator s (fun x => c) (b, c_1) ∂↑η (a, b)\n[PROOFSTEP]\nrw [lintegral_indicator_const_comp measurable_prod_mk_left hs]\n[GOAL]\ncase e_s.h.refine'_1.e_f.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nc : ℝ≥0∞\ns : Set (β × γ)\nhs : MeasurableSet s\nb : β\n⊢ c * ↑↑(↑η (a, b)) {c | (b, c) ∈ s} = c * ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase e_s.h.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f) n) (a, b) = f a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\n⊢ ∀ ⦃f g : SimpleFunc (β × γ) ℝ≥0∞⦄,\n    Disjoint (Function.support ↑f) (Function.support ↑g) →\n      (fun f => ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a) f →\n        (fun f => ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a) g →\n          (fun f => ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a)\n            (f + g)\n[PROOFSTEP]\nintro f f' _ hf_eq hf'_eq\n[GOAL]\ncase e_s.h.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf✝ : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f✝)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f✝)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f✝) n) (a, b) = f✝ a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nf f' : SimpleFunc (β × γ) ℝ≥0∞\na✝ : Disjoint (Function.support ↑f) (Function.support ↑f')\nhf_eq : ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a\nhf'_eq : ∫⁻ (a : β × γ), ↑f' a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f' (a_1, c) ∂↑η (a, a_1) ∂↑κ a\n⊢ ∫⁻ (a : β × γ), ↑(f + f') a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑(f + f') (a_1, c) ∂↑η (a, a_1) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [SimpleFunc.coe_add, Pi.add_apply]\n[GOAL]\ncase e_s.h.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf✝ : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f✝)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f✝)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f✝) n) (a, b) = f✝ a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nf f' : SimpleFunc (β × γ) ℝ≥0∞\na✝ : Disjoint (Function.support ↑f) (Function.support ↑f')\nhf_eq : ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a\nhf'_eq : ∫⁻ (a : β × γ), ↑f' a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f' (a_1, c) ∂↑η (a, a_1) ∂↑κ a\n⊢ ∫⁻ (a : β × γ), ↑f a + ↑f' a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) + ↑f' (a_1, c) ∂↑η (a, a_1) ∂↑κ a\n[PROOFSTEP]\nchange ∫⁻ x, (f : β × γ → ℝ≥0∞) x + f' x ∂(κ ⊗ₖ η) a = ∫⁻ b, ∫⁻ c : γ, f (b, c) + f' (b, c) ∂η (a, b) ∂κ a\n[GOAL]\ncase e_s.h.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf✝ : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f✝)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f✝)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f✝) n) (a, b) = f✝ a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nf f' : SimpleFunc (β × γ) ℝ≥0∞\na✝ : Disjoint (Function.support ↑f) (Function.support ↑f')\nhf_eq : ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a\nhf'_eq : ∫⁻ (a : β × γ), ↑f' a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f' (a_1, c) ∂↑η (a, a_1) ∂↑κ a\n⊢ ∫⁻ (x : β × γ), ↑f x + ↑f' x ∂↑(κ ⊗ₖ η) a = ∫⁻ (b : β), ∫⁻ (c : γ), ↑f (b, c) + ↑f' (b, c) ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nrw [lintegral_add_left (SimpleFunc.measurable _), hf_eq, hf'_eq, ← lintegral_add_left]\n[GOAL]\ncase e_s.h.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf✝ : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f✝)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f✝)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f✝) n) (a, b) = f✝ a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nf f' : SimpleFunc (β × γ) ℝ≥0∞\na✝ : Disjoint (Function.support ↑f) (Function.support ↑f')\nhf_eq : ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a\nhf'_eq : ∫⁻ (a : β × γ), ↑f' a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f' (a_1, c) ∂↑η (a, a_1) ∂↑κ a\n⊢ ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) + ∫⁻ (c : γ), ↑f' (a_1, c) ∂↑η (a, a_1) ∂↑κ a =\n    ∫⁻ (b : β), ∫⁻ (c : γ), ↑f (b, c) + ↑f' (b, c) ∂↑η (a, b) ∂↑κ a\ncase e_s.h.refine'_2.hf\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf✝ : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f✝)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f✝)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f✝) n) (a, b) = f✝ a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nf f' : SimpleFunc (β × γ) ℝ≥0∞\na✝ : Disjoint (Function.support ↑f) (Function.support ↑f')\nhf_eq : ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a\nhf'_eq : ∫⁻ (a : β × γ), ↑f' a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f' (a_1, c) ∂↑η (a, a_1) ∂↑κ a\n⊢ Measurable fun a_1 => ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1)\n[PROOFSTEP]\nswap\n[GOAL]\ncase e_s.h.refine'_2.hf\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf✝ : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f✝)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f✝)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f✝) n) (a, b) = f✝ a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nf f' : SimpleFunc (β × γ) ℝ≥0∞\na✝ : Disjoint (Function.support ↑f) (Function.support ↑f')\nhf_eq : ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a\nhf'_eq : ∫⁻ (a : β × γ), ↑f' a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f' (a_1, c) ∂↑η (a, a_1) ∂↑κ a\n⊢ Measurable fun a_1 => ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1)\n[PROOFSTEP]\nexact h_some_meas_integral f\n[GOAL]\ncase e_s.h.refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf✝ : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f✝)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f✝)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f✝) n) (a, b) = f✝ a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nf f' : SimpleFunc (β × γ) ℝ≥0∞\na✝ : Disjoint (Function.support ↑f) (Function.support ↑f')\nhf_eq : ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a\nhf'_eq : ∫⁻ (a : β × γ), ↑f' a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f' (a_1, c) ∂↑η (a, a_1) ∂↑κ a\n⊢ ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) + ∫⁻ (c : γ), ↑f' (a_1, c) ∂↑η (a, a_1) ∂↑κ a =\n    ∫⁻ (b : β), ∫⁻ (c : γ), ↑f (b, c) + ↑f' (b, c) ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\ncongr with b\n[GOAL]\ncase e_s.h.refine'_2.e_f.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf✝ : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f✝)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f✝)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f✝) n) (a, b) = f✝ a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nf f' : SimpleFunc (β × γ) ℝ≥0∞\na✝ : Disjoint (Function.support ↑f) (Function.support ↑f')\nhf_eq : ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a\nhf'_eq : ∫⁻ (a : β × γ), ↑f' a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f' (a_1, c) ∂↑η (a, a_1) ∂↑κ a\nb : β\n⊢ ∫⁻ (c : γ), ↑f (b, c) ∂↑η (a, b) + ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b) = ∫⁻ (c : γ), ↑f (b, c) + ↑f' (b, c) ∂↑η (a, b)\n[PROOFSTEP]\nrw [lintegral_add_left]\n[GOAL]\ncase e_s.h.refine'_2.e_f.h.hf\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf✝ : β → γ → ℝ≥0∞\nhf : Measurable (Function.uncurry f✝)\nF : ℕ → SimpleFunc (β × γ) ℝ≥0∞ := SimpleFunc.eapprox (Function.uncurry f✝)\nh : ∀ (a : β) (b : γ), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (Function.uncurry f✝) n) (a, b) = f✝ a b\nh_mono : Monotone F\nthis : ∀ (b : β), ∫⁻ (c : γ), ⨆ (n : ℕ), ↑(F n) (b, c) ∂↑η (a, b) = ⨆ (n : ℕ), ∫⁻ (c : γ), ↑(F n) (b, c) ∂↑η (a, b)\nh_some_meas_integral : ∀ (f' : SimpleFunc (β × γ) ℝ≥0∞), Measurable fun b => ∫⁻ (c : γ), ↑f' (b, c) ∂↑η (a, b)\nn : ℕ\nf f' : SimpleFunc (β × γ) ℝ≥0∞\na✝ : Disjoint (Function.support ↑f) (Function.support ↑f')\nhf_eq : ∫⁻ (a : β × γ), ↑f a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f (a_1, c) ∂↑η (a, a_1) ∂↑κ a\nhf'_eq : ∫⁻ (a : β × γ), ↑f' a ∂↑(κ ⊗ₖ η) a = ∫⁻ (a_1 : β), ∫⁻ (c : γ), ↑f' (a_1, c) ∂↑η (a, a_1) ∂↑κ a\nb : β\n⊢ Measurable fun c => ↑f (b, c)\n[PROOFSTEP]\nexact (SimpleFunc.measurable _).comp measurable_prod_mk_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : Measurable f\n⊢ ∫⁻ (bc : β × γ), f bc ∂↑(κ ⊗ₖ η) a = ∫⁻ (b : β), ∫⁻ (c : γ), f (b, c) ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nlet g := Function.curry f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : Measurable f\ng : β → γ → ℝ≥0∞ := Function.curry f\n⊢ ∫⁻ (bc : β × γ), f bc ∂↑(κ ⊗ₖ η) a = ∫⁻ (b : β), ∫⁻ (c : γ), f (b, c) ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nchange ∫⁻ bc, f bc ∂(κ ⊗ₖ η) a = ∫⁻ b, ∫⁻ c, g b c ∂η (a, b) ∂κ a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : Measurable f\ng : β → γ → ℝ≥0∞ := Function.curry f\n⊢ ∫⁻ (bc : β × γ), f bc ∂↑(κ ⊗ₖ η) a = ∫⁻ (b : β), ∫⁻ (c : γ), g b c ∂↑η (a, b) ∂↑κ a\n[PROOFSTEP]\nrw [← lintegral_compProd']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : Measurable f\ng : β → γ → ℝ≥0∞ := Function.curry f\n⊢ ∫⁻ (bc : β × γ), f bc ∂↑(κ ⊗ₖ η) a = ∫⁻ (bc : β × γ), g bc.fst bc.snd ∂↑(κ ⊗ₖ η) a\n[PROOFSTEP]\nsimp_rw [Function.curry_apply]\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : Measurable f\ng : β → γ → ℝ≥0∞ := Function.curry f\n⊢ Measurable (Function.uncurry fun b c => g b c)\n[PROOFSTEP]\nsimp_rw [Function.uncurry_curry]\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : Measurable f\ng : β → γ → ℝ≥0∞ := Function.curry f\n⊢ Measurable f\n[PROOFSTEP]\nexact hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : AEMeasurable f\n⊢ ∫⁻ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫⁻ (x : β), ∫⁻ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nhave A : ∫⁻ z, f z ∂(κ ⊗ₖ η) a = ∫⁻ z, hf.mk f z ∂(κ ⊗ₖ η) a := lintegral_congr_ae hf.ae_eq_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : AEMeasurable f\nA : ∫⁻ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫⁻ (z : β × γ), AEMeasurable.mk f hf z ∂↑(κ ⊗ₖ η) a\n⊢ ∫⁻ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫⁻ (x : β), ∫⁻ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nhave B : ∫⁻ x, ∫⁻ y, f (x, y) ∂η (a, x) ∂κ a = ∫⁻ x, ∫⁻ y, hf.mk f (x, y) ∂η (a, x) ∂κ a :=\n  by\n  apply lintegral_congr_ae\n  filter_upwards [ae_ae_of_ae_compProd hf.ae_eq_mk] with _ ha using lintegral_congr_ae ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : AEMeasurable f\nA : ∫⁻ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫⁻ (z : β × γ), AEMeasurable.mk f hf z ∂↑(κ ⊗ₖ η) a\n⊢ ∫⁻ (x : β), ∫⁻ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a =\n    ∫⁻ (x : β), ∫⁻ (y : γ), AEMeasurable.mk f hf (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\napply lintegral_congr_ae\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : AEMeasurable f\nA : ∫⁻ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫⁻ (z : β × γ), AEMeasurable.mk f hf z ∂↑(κ ⊗ₖ η) a\n⊢ (fun a_1 => ∫⁻ (y : γ), f (a_1, y) ∂↑η (a, a_1)) =ᵐ[↑κ a] fun a_1 =>\n    ∫⁻ (y : γ), AEMeasurable.mk f hf (a_1, y) ∂↑η (a, a_1)\n[PROOFSTEP]\nfilter_upwards [ae_ae_of_ae_compProd hf.ae_eq_mk] with _ ha using lintegral_congr_ae ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : AEMeasurable f\nA : ∫⁻ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫⁻ (z : β × γ), AEMeasurable.mk f hf z ∂↑(κ ⊗ₖ η) a\nB :\n  ∫⁻ (x : β), ∫⁻ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a =\n    ∫⁻ (x : β), ∫⁻ (y : γ), AEMeasurable.mk f hf (x, y) ∂↑η (a, x) ∂↑κ a\n⊢ ∫⁻ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫⁻ (x : β), ∫⁻ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nrw [A, B, lintegral_compProd]\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : AEMeasurable f\nA : ∫⁻ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫⁻ (z : β × γ), AEMeasurable.mk f hf z ∂↑(κ ⊗ₖ η) a\nB :\n  ∫⁻ (x : β), ∫⁻ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a =\n    ∫⁻ (x : β), ∫⁻ (y : γ), AEMeasurable.mk f hf (x, y) ∂↑η (a, x) ∂↑κ a\n⊢ Measurable fun z => AEMeasurable.mk f hf z\n[PROOFSTEP]\nexact hf.measurable_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : Measurable f\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\n⊢ ∫⁻ (z : β × γ) in s ×ˢ t, f z ∂↑(κ ⊗ₖ η) a = ∫⁻ (x : β) in s, ∫⁻ (y : γ) in t, f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [← kernel.restrict_apply (κ ⊗ₖ η) (hs.prod ht), ← compProd_restrict hs ht, lintegral_compProd _ _ _ hf,\n  kernel.restrict_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : Measurable f\ns : Set β\nhs : MeasurableSet s\n⊢ ∫⁻ (z : β × γ) in s ×ˢ Set.univ, f z ∂↑(κ ⊗ₖ η) a = ∫⁻ (x : β) in s, ∫⁻ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [set_lintegral_compProd κ η a hf hs MeasurableSet.univ, Measure.restrict_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → ℝ≥0∞\nhf : Measurable f\nt : Set γ\nht : MeasurableSet t\n⊢ ∫⁻ (z : β × γ) in Set.univ ×ˢ t, f z ∂↑(κ ⊗ₖ η) a = ∫⁻ (x : β), ∫⁻ (y : γ) in t, f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [set_lintegral_compProd κ η a hf MeasurableSet.univ ht, Measure.restrict_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ ↑↑(↑(κ ⊗ₖ η) a) s = ∑' (n : ℕ) (m : ℕ), ↑↑(↑(seq κ n ⊗ₖ seq η m) a) s\n[PROOFSTEP]\nsimp_rw [compProd_apply_eq_compProdFun _ _ _ hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nhs : MeasurableSet s\n⊢ compProdFun κ η a s = ∑' (n : ℕ) (m : ℕ), compProdFun (seq κ n) (seq η m) a s\n[PROOFSTEP]\nexact compProdFun_eq_tsum κ η a hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\n⊢ κ ⊗ₖ η = kernel.sum fun n => kernel.sum fun m => seq κ n ⊗ₖ seq η m\n[PROOFSTEP]\next a s hs\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ ↑↑(↑(κ ⊗ₖ η) a) s = ↑↑(↑(kernel.sum fun n => kernel.sum fun m => seq κ n ⊗ₖ seq η m) a) s\n[PROOFSTEP]\nsimp_rw [kernel.sum_apply' _ a hs]\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ ↑↑(↑(κ ⊗ₖ η) a) s = ∑' (n : ℕ) (n_1 : ℕ), ↑↑(↑(seq κ n ⊗ₖ seq η n_1) a) s\n[PROOFSTEP]\nrw [compProd_eq_tsum_compProd κ η a hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\n⊢ κ ⊗ₖ η = kernel.sum fun n => seq κ n ⊗ₖ η\n[PROOFSTEP]\nby_cases h : IsSFiniteKernel η\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel η\n⊢ κ ⊗ₖ η = kernel.sum fun n => seq κ n ⊗ₖ η\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\nh : ¬IsSFiniteKernel η\n⊢ κ ⊗ₖ η = kernel.sum fun n => seq κ n ⊗ₖ η\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\nh : ¬IsSFiniteKernel η\n⊢ κ ⊗ₖ η = kernel.sum fun n => seq κ n ⊗ₖ η\n[PROOFSTEP]\nsimp_rw [compProd_of_not_isSFiniteKernel_right _ _ h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\nh : ¬IsSFiniteKernel η\n⊢ 0 = kernel.sum fun n => 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel η\n⊢ κ ⊗ₖ η = kernel.sum fun n => seq κ n ⊗ₖ η\n[PROOFSTEP]\nrw [compProd_eq_sum_compProd]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel η\n⊢ (kernel.sum fun n => kernel.sum fun m => seq κ n ⊗ₖ seq η m) = kernel.sum fun n => seq κ n ⊗ₖ η\n[PROOFSTEP]\ncongr with n a s hs\n[GOAL]\ncase pos.e_κ.h.h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns✝ : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel η\nn : ℕ\na : α\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ ↑↑(↑(kernel.sum fun m => seq κ n ⊗ₖ seq η m) a) s = ↑↑(↑(seq κ n ⊗ₖ η) a) s\n[PROOFSTEP]\nsimp_rw [kernel.sum_apply' _ _ hs, compProd_apply_eq_compProdFun _ _ _ hs, compProdFun_tsum_right _ η a hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\n⊢ κ ⊗ₖ η = kernel.sum fun n => κ ⊗ₖ seq η n\n[PROOFSTEP]\nby_cases hκ : IsSFiniteKernel κ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhκ : IsSFiniteKernel κ\n⊢ κ ⊗ₖ η = kernel.sum fun n => κ ⊗ₖ seq η n\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhκ : ¬IsSFiniteKernel κ\n⊢ κ ⊗ₖ η = kernel.sum fun n => κ ⊗ₖ seq η n\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhκ : ¬IsSFiniteKernel κ\n⊢ κ ⊗ₖ η = kernel.sum fun n => κ ⊗ₖ seq η n\n[PROOFSTEP]\nsimp_rw [compProd_of_not_isSFiniteKernel_left _ _ hκ]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhκ : ¬IsSFiniteKernel κ\n⊢ 0 = kernel.sum fun n => 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhκ : IsSFiniteKernel κ\n⊢ κ ⊗ₖ η = kernel.sum fun n => κ ⊗ₖ seq η n\n[PROOFSTEP]\nrw [compProd_eq_sum_compProd]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhκ : IsSFiniteKernel κ\n⊢ (kernel.sum fun n => kernel.sum fun m => seq κ n ⊗ₖ seq η m) = kernel.sum fun n => κ ⊗ₖ seq η n\n[PROOFSTEP]\nsimp_rw [compProd_eq_sum_compProd_left κ _]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\nhκ : IsSFiniteKernel κ\n⊢ (kernel.sum fun n => kernel.sum fun m => seq κ n ⊗ₖ seq η m) =\n    kernel.sum fun n => kernel.sum fun n_1 => seq κ n_1 ⊗ₖ seq η n\n[PROOFSTEP]\nrw [kernel.sum_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsMarkovKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsMarkovKernel η\na : α\n⊢ ↑↑(↑(κ ⊗ₖ η) a) Set.univ = 1\n[PROOFSTEP]\nrw [compProd_apply κ η a MeasurableSet.univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsMarkovKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsMarkovKernel η\na : α\n⊢ ∫⁻ (b : β), ↑↑(↑η (a, b)) {c | (b, c) ∈ Set.univ} ∂↑κ a = 1\n[PROOFSTEP]\nsimp only [Set.mem_univ, Set.setOf_true, measure_univ, lintegral_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\na : α\n⊢ ↑↑(↑(κ ⊗ₖ η) a) Set.univ ≤ ↑↑(↑κ a) Set.univ * IsFiniteKernel.bound η\n[PROOFSTEP]\nby_cases hκ : IsSFiniteKernel κ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\na : α\nhκ : IsSFiniteKernel κ\n⊢ ↑↑(↑(κ ⊗ₖ η) a) Set.univ ≤ ↑↑(↑κ a) Set.univ * IsFiniteKernel.bound η\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\na : α\nhκ : ¬IsSFiniteKernel κ\n⊢ ↑↑(↑(κ ⊗ₖ η) a) Set.univ ≤ ↑↑(↑κ a) Set.univ * IsFiniteKernel.bound η\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\na : α\nhκ : ¬IsSFiniteKernel κ\n⊢ ↑↑(↑(κ ⊗ₖ η) a) Set.univ ≤ ↑↑(↑κ a) Set.univ * IsFiniteKernel.bound η\n[PROOFSTEP]\nrw [compProd_of_not_isSFiniteKernel_left _ _ hκ]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\na : α\nhκ : ¬IsSFiniteKernel κ\n⊢ ↑↑(↑0 a) Set.univ ≤ ↑↑(↑κ a) Set.univ * IsFiniteKernel.bound η\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\na : α\nhκ : IsSFiniteKernel κ\n⊢ ↑↑(↑(κ ⊗ₖ η) a) Set.univ ≤ ↑↑(↑κ a) Set.univ * IsFiniteKernel.bound η\n[PROOFSTEP]\nrw [compProd_apply κ η a MeasurableSet.univ]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\na : α\nhκ : IsSFiniteKernel κ\n⊢ ∫⁻ (b : β), ↑↑(↑η (a, b)) {c | (b, c) ∈ Set.univ} ∂↑κ a ≤ ↑↑(↑κ a) Set.univ * IsFiniteKernel.bound η\n[PROOFSTEP]\nsimp only [Set.mem_univ, Set.setOf_true]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\na : α\nhκ : IsSFiniteKernel κ\n⊢ ∫⁻ (b : β), ↑↑(↑η (a, b)) Set.univ ∂↑κ a ≤ ↑↑(↑κ a) Set.univ * IsFiniteKernel.bound η\n[PROOFSTEP]\nlet Cη := IsFiniteKernel.bound η\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel η\na : α\nhκ : IsSFiniteKernel κ\nCη : ℝ≥0∞ := IsFiniteKernel.bound η\n⊢ ∫⁻ (b : β), ↑↑(↑η (a, b)) Set.univ ∂↑κ a ≤ ↑↑(↑κ a) Set.univ * IsFiniteKernel.bound η\n[PROOFSTEP]\ncalc\n  ∫⁻ b, η (a, b) Set.univ ∂κ a ≤ ∫⁻ _, Cη ∂κ a := lintegral_mono fun b => measure_le_bound η (a, b) Set.univ\n  _ = Cη * κ a Set.univ := (MeasureTheory.lintegral_const Cη)\n  _ = κ a Set.univ * Cη := mul_comm _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\n⊢ IsSFiniteKernel (κ ⊗ₖ η)\n[PROOFSTEP]\nby_cases h : IsSFiniteKernel κ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (κ ⊗ₖ η)\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : ¬IsSFiniteKernel κ\n⊢ IsSFiniteKernel (κ ⊗ₖ η)\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : ¬IsSFiniteKernel κ\n⊢ IsSFiniteKernel (κ ⊗ₖ η)\n[PROOFSTEP]\nrw [compProd_of_not_isSFiniteKernel_left _ _ h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : ¬IsSFiniteKernel κ\n⊢ IsSFiniteKernel 0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (κ ⊗ₖ η)\n[PROOFSTEP]\nby_cases h : IsSFiniteKernel η\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh✝ : IsSFiniteKernel κ\nh : IsSFiniteKernel η\n⊢ IsSFiniteKernel (κ ⊗ₖ η)\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh✝ : IsSFiniteKernel κ\nh : ¬IsSFiniteKernel η\n⊢ IsSFiniteKernel (κ ⊗ₖ η)\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh✝ : IsSFiniteKernel κ\nh : ¬IsSFiniteKernel η\n⊢ IsSFiniteKernel (κ ⊗ₖ η)\n[PROOFSTEP]\nrw [compProd_of_not_isSFiniteKernel_right _ _ h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh✝ : IsSFiniteKernel κ\nh : ¬IsSFiniteKernel η\n⊢ IsSFiniteKernel 0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh✝ : IsSFiniteKernel κ\nh : IsSFiniteKernel η\n⊢ IsSFiniteKernel (κ ⊗ₖ η)\n[PROOFSTEP]\nrw [compProd_eq_sum_compProd]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\ns : Set (β × γ)\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\nh✝ : IsSFiniteKernel κ\nh : IsSFiniteKernel η\n⊢ IsSFiniteKernel (kernel.sum fun n => kernel.sum fun m => seq κ n ⊗ₖ seq η m)\n[PROOFSTEP]\nexact kernel.isSFiniteKernel_sum fun n => kernel.isSFiniteKernel_sum inferInstance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\nhf : Measurable f\na : α\ns : Set γ\nhs : MeasurableSet s\n⊢ ↑↑(↑(map κ f hf) a) s = ↑↑(↑κ a) (f ⁻¹' s)\n[PROOFSTEP]\nrw [map_apply, Measure.map_apply hf hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\nhf : Measurable f\na : α\ng' : γ → ℝ≥0∞\nhg : Measurable g'\n⊢ ∫⁻ (b : γ), g' b ∂↑(map κ f hf) a = ∫⁻ (a : β), g' (f a) ∂↑κ a\n[PROOFSTEP]\nrw [map_apply _ hf, lintegral_map hg hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nhf : Measurable f\n⊢ (kernel.sum fun n => map (seq κ n) f hf) = map κ f hf\n[PROOFSTEP]\next a s hs\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nhf : Measurable f\na : α\ns : Set γ\nhs : MeasurableSet s\n⊢ ↑↑(↑(kernel.sum fun n => map (seq κ n) f hf) a) s = ↑↑(↑(map κ f hf) a) s\n[PROOFSTEP]\nrw [kernel.sum_apply, map_apply' κ hf a hs, Measure.sum_apply _ hs, ← measure_sum_seq κ, Measure.sum_apply _ (hf hs)]\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nhf : Measurable f\na : α\ns : Set γ\nhs : MeasurableSet s\n⊢ ∑' (i : ℕ), ↑↑(↑(map (seq κ i) f hf) a) s = ∑' (i : ℕ), ↑↑(↑(seq κ i) a) (f ⁻¹' s)\n[PROOFSTEP]\nsimp_rw [map_apply' _ hf _ hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsMarkovKernel κ\nhf : Measurable f\na : α\n⊢ ↑↑(↑(kernel.map κ f hf) a) Set.univ = 1\n[PROOFSTEP]\nrw [map_apply' κ hf a MeasurableSet.univ, Set.preimage_univ, measure_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsFiniteKernel κ\nhf : Measurable f\n⊢ IsFiniteKernel (kernel.map κ f hf)\n[PROOFSTEP]\nrefine' ⟨⟨IsFiniteKernel.bound κ, IsFiniteKernel.bound_lt_top κ, fun a => _⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsFiniteKernel κ\nhf : Measurable f\na : α\n⊢ ↑↑(↑(kernel.map κ f hf) a) Set.univ ≤ IsFiniteKernel.bound κ\n[PROOFSTEP]\nrw [map_apply' κ hf a MeasurableSet.univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsFiniteKernel κ\nhf : Measurable f\na : α\n⊢ ↑↑(↑κ a) (f ⁻¹' Set.univ) ≤ IsFiniteKernel.bound κ\n[PROOFSTEP]\nexact measure_le_bound κ a _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nhg : Measurable g\n⊢ (kernel.sum fun n => comap (seq κ n) g hg) = comap κ g hg\n[PROOFSTEP]\next a s hs\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nhg : Measurable g\na : γ\ns : Set β\nhs : MeasurableSet s\n⊢ ↑↑(↑(kernel.sum fun n => comap (seq κ n) g hg) a) s = ↑↑(↑(comap κ g hg) a) s\n[PROOFSTEP]\nrw [kernel.sum_apply, comap_apply' κ hg a s, Measure.sum_apply _ hs, ← measure_sum_seq κ, Measure.sum_apply _ hs]\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\nhg : Measurable g\na : γ\ns : Set β\nhs : MeasurableSet s\n⊢ ∑' (i : ℕ), ↑↑(↑(comap (seq κ i) g hg) a) s = ∑' (i : ℕ), ↑↑(↑(seq κ i) (g a)) s\n[PROOFSTEP]\nsimp_rw [comap_apply' _ hg _ s]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsMarkovKernel κ\nhg : Measurable g\na : γ\n⊢ ↑↑(↑(kernel.comap κ g hg) a) Set.univ = 1\n[PROOFSTEP]\nrw [comap_apply' κ hg a Set.univ, measure_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsFiniteKernel κ\nhg : Measurable g\n⊢ IsFiniteKernel (kernel.comap κ g hg)\n[PROOFSTEP]\nrefine' ⟨⟨IsFiniteKernel.bound κ, IsFiniteKernel.bound_lt_top κ, fun a => _⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsFiniteKernel κ\nhg : Measurable g\na : γ\n⊢ ↑↑(↑(kernel.comap κ g hg) a) Set.univ ≤ IsFiniteKernel.bound κ\n[PROOFSTEP]\nrw [comap_apply' κ hg a Set.univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsFiniteKernel κ\nhg : Measurable g\na : γ\n⊢ ↑↑(↑κ (g a)) Set.univ ≤ IsFiniteKernel.bound κ\n[PROOFSTEP]\nexact measure_le_bound κ _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsMarkovKernel κ\n⊢ IsMarkovKernel (kernel.prodMkLeft γ κ)\n[PROOFSTEP]\nrw [prodMkLeft]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsMarkovKernel κ\n⊢ IsMarkovKernel (kernel.comap κ Prod.snd (_ : Measurable Prod.snd))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsFiniteKernel κ\n⊢ IsFiniteKernel (kernel.prodMkLeft γ κ)\n[PROOFSTEP]\nrw [prodMkLeft]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsFiniteKernel κ\n⊢ IsFiniteKernel (kernel.comap κ Prod.snd (_ : Measurable Prod.snd))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (kernel.prodMkLeft γ κ)\n[PROOFSTEP]\nrw [prodMkLeft]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (kernel.comap κ Prod.snd (_ : Measurable Prod.snd))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng✝ : γ → α\nκ : { x // x ∈ kernel (α × β) γ }\na : β × α\ng : γ → ℝ≥0∞\n⊢ ∫⁻ (c : γ), g c ∂↑(swapLeft κ) a = ∫⁻ (c : γ), g c ∂↑κ (Prod.swap a)\n[PROOFSTEP]\nrw [swapLeft, lintegral_comap _ measurable_swap a]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsMarkovKernel κ\n⊢ IsMarkovKernel (kernel.swapLeft κ)\n[PROOFSTEP]\nrw [swapLeft]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsMarkovKernel κ\n⊢ IsMarkovKernel (kernel.comap κ Prod.swap (_ : Measurable Prod.swap))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel κ\n⊢ IsFiniteKernel (kernel.swapLeft κ)\n[PROOFSTEP]\nrw [swapLeft]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsFiniteKernel κ\n⊢ IsFiniteKernel (kernel.comap κ Prod.swap (_ : Measurable Prod.swap))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (kernel.swapLeft κ)\n[PROOFSTEP]\nrw [swapLeft]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (kernel.comap κ Prod.swap (_ : Measurable Prod.swap))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\na : α\ns : Set (γ × β)\nhs : MeasurableSet s\n⊢ ↑↑(↑(swapRight κ) a) s = ↑↑(↑κ a) {p | Prod.swap p ∈ s}\n[PROOFSTEP]\nrw [swapRight_apply, Measure.map_apply measurable_swap hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\na : α\ns : Set (γ × β)\nhs : MeasurableSet s\n⊢ ↑↑(↑κ a) (Prod.swap ⁻¹' s) = ↑↑(↑κ a) {p | Prod.swap p ∈ s}\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng✝ : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\na : α\ng : γ × β → ℝ≥0∞\nhg : Measurable g\n⊢ ∫⁻ (c : γ × β), g c ∂↑(swapRight κ) a = ∫⁻ (bc : β × γ), g (Prod.swap bc) ∂↑κ a\n[PROOFSTEP]\nrw [swapRight, lintegral_map _ measurable_swap a hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsMarkovKernel κ\n⊢ IsMarkovKernel (kernel.swapRight κ)\n[PROOFSTEP]\nrw [swapRight]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsMarkovKernel κ\n⊢ IsMarkovKernel (kernel.map κ Prod.swap (_ : Measurable Prod.swap))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsFiniteKernel κ\n⊢ IsFiniteKernel (kernel.swapRight κ)\n[PROOFSTEP]\nrw [swapRight]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsFiniteKernel κ\n⊢ IsFiniteKernel (kernel.map κ Prod.swap (_ : Measurable Prod.swap))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (kernel.swapRight κ)\n[PROOFSTEP]\nrw [swapRight]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (kernel.map κ Prod.swap (_ : Measurable Prod.swap))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\na : α\ns : Set β\nhs : MeasurableSet s\n⊢ ↑↑(↑(fst κ) a) s = ↑↑(↑κ a) {p | p.fst ∈ s}\n[PROOFSTEP]\nrw [fst_apply, Measure.map_apply measurable_fst hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\na : α\ns : Set β\nhs : MeasurableSet s\n⊢ ↑↑(↑κ a) (Prod.fst ⁻¹' s) = ↑↑(↑κ a) {p | p.fst ∈ s}\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng✝ : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\na : α\ng : β → ℝ≥0∞\nhg : Measurable g\n⊢ ∫⁻ (c : β), g c ∂↑(fst κ) a = ∫⁻ (bc : β × γ), g bc.fst ∂↑κ a\n[PROOFSTEP]\nrw [fst, lintegral_map _ measurable_fst a hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsMarkovKernel κ\n⊢ IsMarkovKernel (kernel.fst κ)\n[PROOFSTEP]\nrw [fst]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsMarkovKernel κ\n⊢ IsMarkovKernel (kernel.map κ Prod.fst (_ : Measurable Prod.fst))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsFiniteKernel κ\n⊢ IsFiniteKernel (kernel.fst κ)\n[PROOFSTEP]\nrw [fst]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsFiniteKernel κ\n⊢ IsFiniteKernel (kernel.map κ Prod.fst (_ : Measurable Prod.fst))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (kernel.fst κ)\n[PROOFSTEP]\nrw [fst]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (kernel.map κ Prod.fst (_ : Measurable Prod.fst))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\na : α\ns : Set γ\nhs : MeasurableSet s\n⊢ ↑↑(↑(snd κ) a) s = ↑↑(↑κ a) {p | p.snd ∈ s}\n[PROOFSTEP]\nrw [snd_apply, Measure.map_apply measurable_snd hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\na : α\ns : Set γ\nhs : MeasurableSet s\n⊢ ↑↑(↑κ a) (Prod.snd ⁻¹' s) = ↑↑(↑κ a) {p | p.snd ∈ s}\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng✝ : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\na : α\ng : γ → ℝ≥0∞\nhg : Measurable g\n⊢ ∫⁻ (c : γ), g c ∂↑(snd κ) a = ∫⁻ (bc : β × γ), g bc.snd ∂↑κ a\n[PROOFSTEP]\nrw [snd, lintegral_map _ measurable_snd a hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsMarkovKernel κ\n⊢ IsMarkovKernel (kernel.snd κ)\n[PROOFSTEP]\nrw [snd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsMarkovKernel κ\n⊢ IsMarkovKernel (kernel.map κ Prod.snd (_ : Measurable Prod.snd))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsFiniteKernel κ\n⊢ IsFiniteKernel (kernel.snd κ)\n[PROOFSTEP]\nrw [snd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsFiniteKernel κ\n⊢ IsFiniteKernel (kernel.map κ Prod.snd (_ : Measurable Prod.snd))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (kernel.snd κ)\n[PROOFSTEP]\nrw [snd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α (β × γ) }\ninst✝ : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (kernel.map κ Prod.snd (_ : Measurable Prod.snd))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\nκ : { x // x ∈ kernel α β }\na : α\ns : Set γ\nhs : MeasurableSet s\n⊢ ↑↑(↑(η ∘ₖ κ) a) s = ∫⁻ (b : β), ↑↑(↑η b) s ∂↑κ a\n[PROOFSTEP]\nrw [comp_apply, Measure.bind_apply hs (kernel.measurable _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\ninst✝¹ : IsSFiniteKernel η\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\n⊢ η ∘ₖ κ = snd (κ ⊗ₖ prodMkLeft α η)\n[PROOFSTEP]\next a s hs\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\ninst✝¹ : IsSFiniteKernel η\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\na : α\ns : Set γ\nhs : MeasurableSet s\n⊢ ↑↑(↑(η ∘ₖ κ) a) s = ↑↑(↑(snd (κ ⊗ₖ prodMkLeft α η)) a) s\n[PROOFSTEP]\nrw [comp_apply' _ _ _ hs, snd_apply' _ _ hs, compProd_apply]\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\ninst✝¹ : IsSFiniteKernel η\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\na : α\ns : Set γ\nhs : MeasurableSet s\n⊢ ∫⁻ (b : β), ↑↑(↑η b) s ∂↑κ a = ∫⁻ (b : β), ↑↑(↑(prodMkLeft α η) (a, b)) {c | (b, c) ∈ {p | p.snd ∈ s}} ∂↑κ a\ncase h.h.hs\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\ninst✝¹ : IsSFiniteKernel η\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\na : α\ns : Set γ\nhs : MeasurableSet s\n⊢ MeasurableSet {p | p.snd ∈ s}\n[PROOFSTEP]\nswap\n[GOAL]\ncase h.h.hs\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\ninst✝¹ : IsSFiniteKernel η\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\na : α\ns : Set γ\nhs : MeasurableSet s\n⊢ MeasurableSet {p | p.snd ∈ s}\n[PROOFSTEP]\nexact measurable_snd hs\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\ninst✝¹ : IsSFiniteKernel η\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\na : α\ns : Set γ\nhs : MeasurableSet s\n⊢ ∫⁻ (b : β), ↑↑(↑η b) s ∂↑κ a = ∫⁻ (b : β), ↑↑(↑(prodMkLeft α η) (a, b)) {c | (b, c) ∈ {p | p.snd ∈ s}} ∂↑κ a\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, Set.setOf_mem_eq, prodMkLeft_apply' _ _ s]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng✝ : γ → α\nη : { x // x ∈ kernel β γ }\nκ : { x // x ∈ kernel α β }\na : α\ng : γ → ℝ≥0∞\nhg : Measurable g\n⊢ ∫⁻ (c : γ), g c ∂↑(η ∘ₖ κ) a = ∫⁻ (b : β), ∫⁻ (c : γ), g c ∂↑η b ∂↑κ a\n[PROOFSTEP]\nrw [comp_apply, Measure.lintegral_bind (kernel.measurable _) hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\ninst✝¹ : IsMarkovKernel η\nκ : { x // x ∈ kernel α β }\ninst✝ : IsMarkovKernel κ\n⊢ IsMarkovKernel (η ∘ₖ κ)\n[PROOFSTEP]\nrw [comp_eq_snd_compProd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\ninst✝¹ : IsMarkovKernel η\nκ : { x // x ∈ kernel α β }\ninst✝ : IsMarkovKernel κ\n⊢ IsMarkovKernel (kernel.snd (κ ⊗ₖ kernel.prodMkLeft α η))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\ninst✝¹ : IsFiniteKernel η\nκ : { x // x ∈ kernel α β }\ninst✝ : IsFiniteKernel κ\n⊢ IsFiniteKernel (η ∘ₖ κ)\n[PROOFSTEP]\nrw [comp_eq_snd_compProd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\ninst✝¹ : IsFiniteKernel η\nκ : { x // x ∈ kernel α β }\ninst✝ : IsFiniteKernel κ\n⊢ IsFiniteKernel (kernel.snd (κ ⊗ₖ kernel.prodMkLeft α η))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\ninst✝¹ : IsSFiniteKernel η\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (η ∘ₖ κ)\n[PROOFSTEP]\nrw [comp_eq_snd_compProd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nη : { x // x ∈ kernel β γ }\ninst✝¹ : IsSFiniteKernel η\nκ : { x // x ∈ kernel α β }\ninst✝ : IsSFiniteKernel κ\n⊢ IsSFiniteKernel (kernel.snd (κ ⊗ₖ kernel.prodMkLeft α η))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nδ : Type u_5\nmδ : MeasurableSpace δ\nξ : { x // x ∈ kernel γ δ }\ninst✝ : IsSFiniteKernel ξ\nη : { x // x ∈ kernel β γ }\nκ : { x // x ∈ kernel α β }\n⊢ ξ ∘ₖ η ∘ₖ κ = ξ ∘ₖ (η ∘ₖ κ)\n[PROOFSTEP]\nrefine' ext_fun fun a f hf => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf✝ : β → γ\ng : γ → α\nδ : Type u_5\nmδ : MeasurableSpace δ\nξ : { x // x ∈ kernel γ δ }\ninst✝ : IsSFiniteKernel ξ\nη : { x // x ∈ kernel β γ }\nκ : { x // x ∈ kernel α β }\na : α\nf : δ → ℝ≥0∞\nhf : Measurable f\n⊢ ∫⁻ (b : δ), f b ∂↑(ξ ∘ₖ η ∘ₖ κ) a = ∫⁻ (b : δ), f b ∂↑(ξ ∘ₖ (η ∘ₖ κ)) a\n[PROOFSTEP]\nsimp_rw [lintegral_comp _ _ _ hf, lintegral_comp _ _ _ hf.lintegral_kernel]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nhf : Measurable f\nκ : { x // x ∈ kernel α β }\n⊢ deterministic f hf ∘ₖ κ = map κ f hf\n[PROOFSTEP]\next a s hs\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nhf : Measurable f\nκ : { x // x ∈ kernel α β }\na : α\ns : Set γ\nhs : MeasurableSet s\n⊢ ↑↑(↑(deterministic f hf ∘ₖ κ) a) s = ↑↑(↑(map κ f hf) a) s\n[PROOFSTEP]\nsimp_rw [map_apply' _ _ _ hs, comp_apply' _ _ _ hs, deterministic_apply' hf _ hs, lintegral_indicator_const_comp hf hs,\n  one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\nhg : Measurable g\n⊢ κ ∘ₖ deterministic g hg = comap κ g hg\n[PROOFSTEP]\next a s hs\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nf : β → γ\ng : γ → α\nκ : { x // x ∈ kernel α β }\nhg : Measurable g\na : γ\ns : Set β\nhs : MeasurableSet s\n⊢ ↑↑(↑(κ ∘ₖ deterministic g hg) a) s = ↑↑(↑(comap κ g hg) a) s\n[PROOFSTEP]\nsimp_rw [comap_apply' _ _ _ s, comp_apply' _ _ _ hs, deterministic_apply hg a,\n  lintegral_dirac' _ (kernel.measurable_coe κ hs)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel α γ }\ninst✝ : IsSFiniteKernel η\na : α\ns : Set (β × γ)\nhs : MeasurableSet s\n⊢ ↑↑(↑(κ ×ₖ η) a) s = ∫⁻ (b : β), ↑↑(↑η a) {c | (b, c) ∈ s} ∂↑κ a\n[PROOFSTEP]\nsimp_rw [prod, compProd_apply _ _ _ hs, swapLeft_apply _ _, prodMkLeft_apply, Prod.swap_prod_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel α γ }\ninst✝ : IsSFiniteKernel η\na : α\ng : β × γ → ℝ≥0∞\nhg : Measurable g\n⊢ ∫⁻ (c : β × γ), g c ∂↑(κ ×ₖ η) a = ∫⁻ (b : β), ∫⁻ (c : γ), g (b, c) ∂↑η a ∂↑κ a\n[PROOFSTEP]\nsimp_rw [prod, lintegral_compProd _ _ _ hg, swapLeft_apply, prodMkLeft_apply, Prod.swap_prod_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsMarkovKernel κ\nη : { x // x ∈ kernel α γ }\ninst✝ : IsMarkovKernel η\n⊢ IsMarkovKernel (κ ×ₖ η)\n[PROOFSTEP]\nrw [prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsMarkovKernel κ\nη : { x // x ∈ kernel α γ }\ninst✝ : IsMarkovKernel η\n⊢ IsMarkovKernel (κ ⊗ₖ kernel.swapLeft (kernel.prodMkLeft β η))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsFiniteKernel κ\nη : { x // x ∈ kernel α γ }\ninst✝ : IsFiniteKernel η\n⊢ IsFiniteKernel (κ ×ₖ η)\n[PROOFSTEP]\nrw [prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsFiniteKernel κ\nη : { x // x ∈ kernel α γ }\ninst✝ : IsFiniteKernel η\n⊢ IsFiniteKernel (κ ⊗ₖ kernel.swapLeft (kernel.prodMkLeft β η))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel α γ }\n⊢ IsSFiniteKernel (κ ×ₖ η)\n[PROOFSTEP]\nrw [prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nγ : Type u_4\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel α γ }\n⊢ IsSFiniteKernel (κ ⊗ₖ kernel.swapLeft (kernel.prodMkLeft β η))\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Probability.Kernel.Composition", "llama_tokens": 90393, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7279754607093178, "lm_q2_score": 0.5312093733737562, "lm_q1q2_score": 0.3867073883148682}}
{"text": "[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nx : ↑(inducedMap A).fst\nn : ℕ\n⊢ Sigma.snd (inducedMap A) x ∈ A (res (↑x) n)\n[PROOFSTEP]\nhave := x.property.some_mem\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nx : ↑(inducedMap A).fst\nn : ℕ\nthis : Set.Nonempty.some (_ : ↑x ∈ (inducedMap A).fst) ∈ ⋂ (n : ℕ), A (res (↑x) n)\n⊢ Sigma.snd (inducedMap A) x ∈ A (res (↑x) n)\n[PROOFSTEP]\nrw [mem_iInter] at this \n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nx : ↑(inducedMap A).fst\nn : ℕ\nthis : ∀ (i : ℕ), Set.Nonempty.some (_ : ↑x ∈ (inducedMap A).fst) ∈ A (res (↑x) i)\n⊢ Sigma.snd (inducedMap A) x ∈ A (res (↑x) n)\n[PROOFSTEP]\nexact this n\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nhA : CantorScheme.Disjoint A\n⊢ Injective (inducedMap A).snd\n[PROOFSTEP]\nrintro ⟨x, hx⟩ ⟨y, hy⟩ hxy\n[GOAL]\ncase mk.mk\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nhA : CantorScheme.Disjoint A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\n⊢ { val := x, property := hx } = { val := y, property := hy }\n[PROOFSTEP]\nrefine' Subtype.coe_injective (res_injective _)\n[GOAL]\ncase mk.mk\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nhA : CantorScheme.Disjoint A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\n⊢ res ((fun a => ↑a) { val := x, property := hx }) = res ((fun a => ↑a) { val := y, property := hy })\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.mk\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nhA : CantorScheme.Disjoint A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\n⊢ res x = res y\n[PROOFSTEP]\next n : 1\n[GOAL]\ncase mk.mk.h\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nhA : CantorScheme.Disjoint A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\nn : ℕ\n⊢ res x n = res y n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase mk.mk.h.zero\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nhA : CantorScheme.Disjoint A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\n⊢ res x Nat.zero = res y Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.h.succ\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nhA : CantorScheme.Disjoint A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\nn : ℕ\nih : res x n = res y n\n⊢ res x (Nat.succ n) = res y (Nat.succ n)\n[PROOFSTEP]\nsimp only [res_succ, cons.injEq]\n[GOAL]\ncase mk.mk.h.succ\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nhA : CantorScheme.Disjoint A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\nn : ℕ\nih : res x n = res y n\n⊢ x n = y n ∧ res x n = res y n\n[PROOFSTEP]\nrefine' ⟨_, ih⟩\n[GOAL]\ncase mk.mk.h.succ\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nhA : CantorScheme.Disjoint A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\nn : ℕ\nih : res x n = res y n\n⊢ x n = y n\n[PROOFSTEP]\ncontrapose hA\n[GOAL]\ncase mk.mk.h.succ\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\nn : ℕ\nih : res x n = res y n\nhA : ¬x n = y n\n⊢ ¬CantorScheme.Disjoint A\n[PROOFSTEP]\nsimp only [CantorScheme.Disjoint, _root_.Pairwise, Ne.def, not_forall, exists_prop]\n[GOAL]\ncase mk.mk.h.succ\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\nn : ℕ\nih : res x n = res y n\nhA : ¬x n = y n\n⊢ ∃ x x_1 x_2, ¬x_1 = x_2 ∧ ¬_root_.Disjoint (A (x_1 :: x)) (A (x_2 :: x))\n[PROOFSTEP]\nrefine' ⟨res x n, _, _, hA, _⟩\n[GOAL]\ncase mk.mk.h.succ\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\nn : ℕ\nih : res x n = res y n\nhA : ¬x n = y n\n⊢ ¬_root_.Disjoint (A (x n :: res x n)) (A (y n :: res x n))\n[PROOFSTEP]\nrw [not_disjoint_iff]\n[GOAL]\ncase mk.mk.h.succ\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\nn : ℕ\nih : res x n = res y n\nhA : ¬x n = y n\n⊢ ∃ x_1, x_1 ∈ A (x n :: res x n) ∧ x_1 ∈ A (y n :: res x n)\n[PROOFSTEP]\nrefine' ⟨(inducedMap A).2 ⟨x, hx⟩, _, _⟩\n[GOAL]\ncase mk.mk.h.succ.refine'_1\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\nn : ℕ\nih : res x n = res y n\nhA : ¬x n = y n\n⊢ Sigma.snd (inducedMap A) { val := x, property := hx } ∈ A (x n :: res x n)\n[PROOFSTEP]\nrw [← res_succ]\n[GOAL]\ncase mk.mk.h.succ.refine'_1\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\nn : ℕ\nih : res x n = res y n\nhA : ¬x n = y n\n⊢ Sigma.snd (inducedMap A) { val := x, property := hx } ∈ A (res x (Nat.succ n))\n[PROOFSTEP]\napply map_mem\n[GOAL]\ncase mk.mk.h.succ.refine'_2\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\nn : ℕ\nih : res x n = res y n\nhA : ¬x n = y n\n⊢ Sigma.snd (inducedMap A) { val := x, property := hx } ∈ A (y n :: res x n)\n[PROOFSTEP]\nrw [hxy, ih, ← res_succ]\n[GOAL]\ncase mk.mk.h.succ.refine'_2\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhxy : Sigma.snd (inducedMap A) { val := x, property := hx } = Sigma.snd (inducedMap A) { val := y, property := hy }\nn : ℕ\nih : res x n = res y n\nhA : ¬x n = y n\n⊢ Sigma.snd (inducedMap A) { val := y, property := hy } ∈ A (res y (Nat.succ n))\n[PROOFSTEP]\napply map_mem\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝ : PseudoMetricSpace α\nhA : VanishingDiam A\nε : ℝ\nε_pos : 0 < ε\nx : ℕ → β\n⊢ ∃ n, ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n[PROOFSTEP]\nspecialize hA x\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝ : PseudoMetricSpace α\nε : ℝ\nε_pos : 0 < ε\nx : ℕ → β\nhA : Tendsto (fun n => EMetric.diam (A (res x n))) atTop (𝓝 0)\n⊢ ∃ n, ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n[PROOFSTEP]\nrw [ENNReal.tendsto_atTop_zero] at hA \n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝ : PseudoMetricSpace α\nε : ℝ\nε_pos : 0 < ε\nx : ℕ → β\nhA : ∀ (ε : ENNReal), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → EMetric.diam (A (res x n)) ≤ ε\n⊢ ∃ n, ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n[PROOFSTEP]\ncases'\n  hA (ENNReal.ofReal (ε / 2))\n    (by\n      simp only [gt_iff_lt, ENNReal.ofReal_pos]\n      linarith) with\n  n hn\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝ : PseudoMetricSpace α\nε : ℝ\nε_pos : 0 < ε\nx : ℕ → β\nhA : ∀ (ε : ENNReal), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → EMetric.diam (A (res x n)) ≤ ε\n⊢ ENNReal.ofReal (ε / 2) > 0\n[PROOFSTEP]\nsimp only [gt_iff_lt, ENNReal.ofReal_pos]\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝ : PseudoMetricSpace α\nε : ℝ\nε_pos : 0 < ε\nx : ℕ → β\nhA : ∀ (ε : ENNReal), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → EMetric.diam (A (res x n)) ≤ ε\n⊢ 0 < ε / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase intro\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝ : PseudoMetricSpace α\nε : ℝ\nε_pos : 0 < ε\nx : ℕ → β\nhA : ∀ (ε : ENNReal), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → EMetric.diam (A (res x n)) ≤ ε\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)\n⊢ ∃ n, ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝ : PseudoMetricSpace α\nε : ℝ\nε_pos : 0 < ε\nx : ℕ → β\nhA : ∀ (ε : ENNReal), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → EMetric.diam (A (res x n)) ≤ ε\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)\n⊢ ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n[PROOFSTEP]\nintro y hy z hz\n[GOAL]\ncase h\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝ : PseudoMetricSpace α\nε : ℝ\nε_pos : 0 < ε\nx : ℕ → β\nhA : ∀ (ε : ENNReal), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → EMetric.diam (A (res x n)) ≤ ε\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)\ny : α\nhy : y ∈ A (res x n)\nz : α\nhz : z ∈ A (res x n)\n⊢ dist y z < ε\n[PROOFSTEP]\nrw [← ENNReal.ofReal_lt_ofReal_iff ε_pos, ← edist_dist]\n[GOAL]\ncase h\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝ : PseudoMetricSpace α\nε : ℝ\nε_pos : 0 < ε\nx : ℕ → β\nhA : ∀ (ε : ENNReal), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → EMetric.diam (A (res x n)) ≤ ε\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)\ny : α\nhy : y ∈ A (res x n)\nz : α\nhz : z ∈ A (res x n)\n⊢ edist y z < ENNReal.ofReal ε\n[PROOFSTEP]\napply lt_of_le_of_lt (EMetric.edist_le_diam_of_mem hy hz)\n[GOAL]\ncase h\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝ : PseudoMetricSpace α\nε : ℝ\nε_pos : 0 < ε\nx : ℕ → β\nhA : ∀ (ε : ENNReal), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → EMetric.diam (A (res x n)) ≤ ε\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)\ny : α\nhy : y ∈ A (res x n)\nz : α\nhz : z ∈ A (res x n)\n⊢ EMetric.diam (A (res x n)) < ENNReal.ofReal ε\n[PROOFSTEP]\napply lt_of_le_of_lt (hn _ (le_refl _))\n[GOAL]\ncase h\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝ : PseudoMetricSpace α\nε : ℝ\nε_pos : 0 < ε\nx : ℕ → β\nhA : ∀ (ε : ENNReal), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → EMetric.diam (A (res x n)) ≤ ε\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)\ny : α\nhy : y ∈ A (res x n)\nz : α\nhz : z ∈ A (res x n)\n⊢ ENNReal.ofReal (ε / 2) < ENNReal.ofReal ε\n[PROOFSTEP]\nrw [ENNReal.ofReal_lt_ofReal_iff ε_pos]\n[GOAL]\ncase h\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝ : PseudoMetricSpace α\nε : ℝ\nε_pos : 0 < ε\nx : ℕ → β\nhA : ∀ (ε : ENNReal), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → EMetric.diam (A (res x n)) ≤ ε\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)\ny : α\nhy : y ∈ A (res x n)\nz : α\nhz : z ∈ A (res x n)\n⊢ ε / 2 < ε\n[PROOFSTEP]\nlinarith\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\n⊢ Continuous (inducedMap A).snd\n[PROOFSTEP]\nrw [Metric.continuous_iff']\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\n⊢ ∀ (a : ↑(inducedMap A).fst) (ε : ℝ),\n    ε > 0 → ∀ᶠ (x : ↑(inducedMap A).fst) in 𝓝 a, dist (Sigma.snd (inducedMap A) x) (Sigma.snd (inducedMap A) a) < ε\n[PROOFSTEP]\nrintro ⟨x, hx⟩ ε ε_pos\n[GOAL]\ncase mk\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\nε : ℝ\nε_pos : ε > 0\n⊢ ∀ᶠ (x_1 : ↑(inducedMap A).fst) in 𝓝 { val := x, property := hx },\n    dist (Sigma.snd (inducedMap A) x_1) (Sigma.snd (inducedMap A) { val := x, property := hx }) < ε\n[PROOFSTEP]\ncases' hA.dist_lt _ ε_pos x with n hn\n[GOAL]\ncase mk.intro\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n⊢ ∀ᶠ (x_1 : ↑(inducedMap A).fst) in 𝓝 { val := x, property := hx },\n    dist (Sigma.snd (inducedMap A) x_1) (Sigma.snd (inducedMap A) { val := x, property := hx }) < ε\n[PROOFSTEP]\nrw [_root_.eventually_nhds_iff]\n[GOAL]\ncase mk.intro\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n⊢ ∃ t,\n    (∀ (x_1 : ↑(inducedMap A).fst),\n        x_1 ∈ t → dist (Sigma.snd (inducedMap A) x_1) (Sigma.snd (inducedMap A) { val := x, property := hx }) < ε) ∧\n      IsOpen t ∧ { val := x, property := hx } ∈ t\n[PROOFSTEP]\nrefine' ⟨(↑) ⁻¹' cylinder x n, _, _, by simp⟩\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n⊢ { val := x, property := hx } ∈ Subtype.val ⁻¹' cylinder x n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.intro.refine'_1\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n⊢ ∀ (x_1 : ↑(inducedMap A).fst),\n    x_1 ∈ Subtype.val ⁻¹' cylinder x n →\n      dist (Sigma.snd (inducedMap A) x_1) (Sigma.snd (inducedMap A) { val := x, property := hx }) < ε\n[PROOFSTEP]\nrintro ⟨y, hy⟩ hyx\n[GOAL]\ncase mk.intro.refine'_1.mk\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhyx : { val := y, property := hy } ∈ Subtype.val ⁻¹' cylinder x n\n⊢ dist (Sigma.snd (inducedMap A) { val := y, property := hy }) (Sigma.snd (inducedMap A) { val := x, property := hx }) <\n    ε\n[PROOFSTEP]\nrw [mem_preimage, Subtype.coe_mk, cylinder_eq_res, mem_setOf] at hyx \n[GOAL]\ncase mk.intro.refine'_1.mk\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhyx : res y n = res x n\n⊢ dist (Sigma.snd (inducedMap A) { val := y, property := hy }) (Sigma.snd (inducedMap A) { val := x, property := hx }) <\n    ε\n[PROOFSTEP]\napply hn\n[GOAL]\ncase mk.intro.refine'_1.mk.x\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhyx : res y n = res x n\n⊢ Sigma.snd (inducedMap A) { val := y, property := hy } ∈ A (res x n)\n[PROOFSTEP]\nrw [← hyx]\n[GOAL]\ncase mk.intro.refine'_1.mk.x\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhyx : res y n = res x n\n⊢ Sigma.snd (inducedMap A) { val := y, property := hy } ∈ A (res y n)\n[PROOFSTEP]\napply map_mem\n[GOAL]\ncase mk.intro.refine'_1.mk.x\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\ny : ℕ → β\nhy : y ∈ (inducedMap A).fst\nhyx : res y n = res x n\n⊢ Sigma.snd (inducedMap A) { val := x, property := hx } ∈ A (res x n)\n[PROOFSTEP]\napply map_mem\n[GOAL]\ncase mk.intro.refine'_2\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n⊢ IsOpen (Subtype.val ⁻¹' cylinder x n)\n[PROOFSTEP]\napply continuous_subtype_val.isOpen_preimage\n[GOAL]\ncase mk.intro.refine'_2.a\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝² : PseudoMetricSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : DiscreteTopology β\nhA : VanishingDiam A\nx : ℕ → β\nhx : x ∈ (inducedMap A).fst\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n⊢ IsOpen (cylinder x n)\n[PROOFSTEP]\napply isOpen_cylinder\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\n⊢ (inducedMap A).fst = univ\n[PROOFSTEP]\nrw [eq_univ_iff_forall]\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\n⊢ ∀ (x : ℕ → β), x ∈ (inducedMap A).fst\n[PROOFSTEP]\nintro x\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\n⊢ x ∈ (inducedMap A).fst\n[PROOFSTEP]\nchoose u hu using fun n => hnonempty (res x n)\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\n⊢ x ∈ (inducedMap A).fst\n[PROOFSTEP]\nhave umem : ∀ n m : ℕ, n ≤ m → u m ∈ A (res x n) :=\n  by\n  have : Antitone fun n : ℕ => A (res x n) :=\n    by\n    refine' antitone_nat_of_succ_le _\n    intro n\n    apply hanti.antitone\n  intro n m hnm\n  exact this hnm (hu _)\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\n⊢ ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\n[PROOFSTEP]\nhave : Antitone fun n : ℕ => A (res x n) :=\n  by\n  refine' antitone_nat_of_succ_le _\n  intro n\n  apply hanti.antitone\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\n⊢ Antitone fun n => A (res x n)\n[PROOFSTEP]\nrefine' antitone_nat_of_succ_le _\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\n⊢ ∀ (n : ℕ), A (res x (n + 1)) ≤ A (res x n)\n[PROOFSTEP]\nintro n\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\nn : ℕ\n⊢ A (res x (n + 1)) ≤ A (res x n)\n[PROOFSTEP]\napply hanti.antitone\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\nthis : Antitone fun n => A (res x n)\n⊢ ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\n[PROOFSTEP]\nintro n m hnm\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\nthis : Antitone fun n => A (res x n)\nn m : ℕ\nhnm : n ≤ m\n⊢ u m ∈ A (res x n)\n[PROOFSTEP]\nexact this hnm (hu _)\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\n⊢ x ∈ (inducedMap A).fst\n[PROOFSTEP]\nhave : CauchySeq u := by\n  rw [Metric.cauchySeq_iff]\n  intro ε ε_pos\n  cases' hdiam.dist_lt _ ε_pos x with n hn\n  use n\n  intro m₀ hm₀ m₁ hm₁\n  apply hn <;> apply umem <;> assumption\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\n⊢ CauchySeq u\n[PROOFSTEP]\nrw [Metric.cauchySeq_iff]\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\n⊢ ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → dist (u m) (u n) < ε\n[PROOFSTEP]\nintro ε ε_pos\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nε : ℝ\nε_pos : ε > 0\n⊢ ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → dist (u m) (u n) < ε\n[PROOFSTEP]\ncases' hdiam.dist_lt _ ε_pos x with n hn\n[GOAL]\ncase intro\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n⊢ ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → dist (u m) (u n) < ε\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\n⊢ ∀ (m : ℕ), m ≥ n → ∀ (n_1 : ℕ), n_1 ≥ n → dist (u m) (u n_1) < ε\n[PROOFSTEP]\nintro m₀ hm₀ m₁ hm₁\n[GOAL]\ncase h\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\nm₀ : ℕ\nhm₀ : m₀ ≥ n\nm₁ : ℕ\nhm₁ : m₁ ≥ n\n⊢ dist (u m₀) (u m₁) < ε\n[PROOFSTEP]\napply hn\n[GOAL]\ncase h.x\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\nm₀ : ℕ\nhm₀ : m₀ ≥ n\nm₁ : ℕ\nhm₁ : m₁ ≥ n\n⊢ u m₀ ∈ A (res x n)\n[PROOFSTEP]\napply umem\n[GOAL]\ncase h.x\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\nm₀ : ℕ\nhm₀ : m₀ ≥ n\nm₁ : ℕ\nhm₁ : m₁ ≥ n\n⊢ u m₁ ∈ A (res x n)\n[PROOFSTEP]\napply umem\n[GOAL]\ncase h.x.a\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\nm₀ : ℕ\nhm₀ : m₀ ≥ n\nm₁ : ℕ\nhm₁ : m₁ ≥ n\n⊢ n ≤ m₀\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h.x.a\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nε : ℝ\nε_pos : ε > 0\nn : ℕ\nhn : ∀ (y : α), y ∈ A (res x n) → ∀ (z : α), z ∈ A (res x n) → dist y z < ε\nm₀ : ℕ\nhm₀ : m₀ ≥ n\nm₁ : ℕ\nhm₁ : m₁ ≥ n\n⊢ n ≤ m₁\n[PROOFSTEP]\nassumption\n[GOAL]\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nthis : CauchySeq u\n⊢ x ∈ (inducedMap A).fst\n[PROOFSTEP]\ncases' cauchySeq_tendsto_of_complete this with y hy\n[GOAL]\ncase intro\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nthis : CauchySeq u\ny : α\nhy : Tendsto u atTop (𝓝 y)\n⊢ x ∈ (inducedMap A).fst\n[PROOFSTEP]\nuse y\n[GOAL]\ncase h\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nthis : CauchySeq u\ny : α\nhy : Tendsto u atTop (𝓝 y)\n⊢ y ∈ ⋂ (n : ℕ), A (res x n)\n[PROOFSTEP]\nrw [mem_iInter]\n[GOAL]\ncase h\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nthis : CauchySeq u\ny : α\nhy : Tendsto u atTop (𝓝 y)\n⊢ ∀ (i : ℕ), y ∈ A (res x i)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nthis : CauchySeq u\ny : α\nhy : Tendsto u atTop (𝓝 y)\nn : ℕ\n⊢ y ∈ A (res x n)\n[PROOFSTEP]\napply hanti _ (x n)\n[GOAL]\ncase h.a\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nthis : CauchySeq u\ny : α\nhy : Tendsto u atTop (𝓝 y)\nn : ℕ\n⊢ y ∈ closure (A (x n :: res x n))\n[PROOFSTEP]\napply mem_closure_of_tendsto hy\n[GOAL]\ncase h.a\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nthis : CauchySeq u\ny : α\nhy : Tendsto u atTop (𝓝 y)\nn : ℕ\n⊢ ∀ᶠ (x_1 : ℕ) in atTop, u x_1 ∈ A (x n :: res x n)\n[PROOFSTEP]\nrw [eventually_atTop]\n[GOAL]\ncase h.a\nβ : Type u_1\nα : Type u_2\nA : List β → Set α\ninst✝¹ : PseudoMetricSpace α\ninst✝ : CompleteSpace α\nhdiam : VanishingDiam A\nhanti : ClosureAntitone A\nhnonempty : ∀ (l : List β), Set.Nonempty (A l)\nx : ℕ → β\nu : ℕ → α\nhu : ∀ (n : ℕ), u n ∈ A (res x n)\numem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)\nthis : CauchySeq u\ny : α\nhy : Tendsto u atTop (𝓝 y)\nn : ℕ\n⊢ ∃ a, ∀ (b : ℕ), b ≥ a → u b ∈ A (x n :: res x n)\n[PROOFSTEP]\nexact ⟨n.succ, umem _⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.CantorScheme", "llama_tokens": 15679, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7122321964553657, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.3866447085489246}}
{"text": "[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\n⊢ ker (id - comp (Submodule.subtype p) f) = p\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\nx : E\n⊢ x ∈ ker (id - comp (Submodule.subtype p) f) ↔ x ∈ p\n[PROOFSTEP]\nsimp only [comp_apply, mem_ker, subtype_apply, sub_apply, id_apply, sub_eq_zero]\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\nx : E\n⊢ x = ↑(↑f x) ↔ x ∈ p\n[PROOFSTEP]\nexact ⟨fun h => h.symm ▸ Submodule.coe_mem _, fun hx => by erw [hf ⟨x, hx⟩, Subtype.coe_mk]⟩\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\nx : E\nhx : x ∈ p\n⊢ x = ↑(↑f x)\n[PROOFSTEP]\nerw [hf ⟨x, hx⟩, Subtype.coe_mk]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\n⊢ IsCompl p (ker f)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase disjoint\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\n⊢ Disjoint p (ker f)\n[PROOFSTEP]\nrw [disjoint_iff_inf_le]\n[GOAL]\ncase disjoint\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\n⊢ p ⊓ ker f ≤ ⊥\n[PROOFSTEP]\nrintro x ⟨hpx, hfx⟩\n[GOAL]\ncase disjoint.intro\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\nx : E\nhpx : x ∈ ↑p\nhfx : x ∈ ↑(ker f)\n⊢ x ∈ ⊥\n[PROOFSTEP]\nerw [SetLike.mem_coe, mem_ker, hf ⟨x, hpx⟩, mk_eq_zero] at hfx \n[GOAL]\ncase disjoint.intro\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\nx : E\nhpx : x ∈ ↑p\nhfx : x = 0\n⊢ x ∈ ⊥\n[PROOFSTEP]\nsimp only [hfx, SetLike.mem_coe, zero_mem]\n[GOAL]\ncase codisjoint\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\n⊢ Codisjoint p (ker f)\n[PROOFSTEP]\nrw [codisjoint_iff_le_sup]\n[GOAL]\ncase codisjoint\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\n⊢ ⊤ ≤ p ⊔ ker f\n[PROOFSTEP]\nintro x _\n[GOAL]\ncase codisjoint\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\nx : E\na✝ : x ∈ ⊤\n⊢ x ∈ p ⊔ ker f\n[PROOFSTEP]\nrw [mem_sup']\n[GOAL]\ncase codisjoint\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\nx : E\na✝ : x ∈ ⊤\n⊢ ∃ y z, ↑y + ↑z = x\n[PROOFSTEP]\nrefine' ⟨f x, ⟨x - f x, _⟩, add_sub_cancel'_right _ _⟩\n[GOAL]\ncase codisjoint\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\nx : E\na✝ : x ∈ ⊤\n⊢ x - ↑(↑f x) ∈ ker f\n[PROOFSTEP]\nrw [mem_ker, LinearMap.map_sub, hf, sub_self]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\n⊢ Function.Injective ↑(comp (mkQ p) (Submodule.subtype q))\n[PROOFSTEP]\nrw [← ker_eq_bot, ker_comp, ker_mkQ, disjoint_iff_comap_eq_bot.1 h.symm.disjoint]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\n⊢ Function.Surjective ↑(comp (mkQ p) (Submodule.subtype q))\n[PROOFSTEP]\nrw [← range_eq_top, range_comp, range_subtype, map_mkQ_eq_top, h.sup_eq_top]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\n⊢ ({ x // x ∈ p } × { x // x ∈ q }) ≃ₗ[R] E\n[PROOFSTEP]\napply LinearEquiv.ofBijective (p.subtype.coprod q.subtype)\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\n⊢ Function.Bijective ↑(coprod (Submodule.subtype p) (Submodule.subtype q))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\n⊢ Function.Injective ↑(coprod (Submodule.subtype p) (Submodule.subtype q))\n[PROOFSTEP]\nrw [← ker_eq_bot, ker_coprod_of_disjoint_range, ker_subtype, ker_subtype, prod_bot]\n[GOAL]\ncase left.hd\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\n⊢ Disjoint (range (Submodule.subtype p)) (range (Submodule.subtype q))\n[PROOFSTEP]\nrw [range_subtype, range_subtype]\n[GOAL]\ncase left.hd\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\n⊢ Disjoint p q\n[PROOFSTEP]\nexact h.1\n[GOAL]\ncase right\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\n⊢ Function.Surjective ↑(coprod (Submodule.subtype p) (Submodule.subtype q))\n[PROOFSTEP]\nrw [← range_eq_top, ← sup_eq_range, h.sup_eq_top]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : { x // x ∈ p }\n⊢ ↑x = ↑(prodEquivOfIsCompl p q h) (x, 0)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : { x // x ∈ q }\n⊢ ↑x = ↑(prodEquivOfIsCompl p q h) (0, x)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : E\n⊢ (↑(LinearEquiv.symm (prodEquivOfIsCompl p q h)) x).fst = 0 ↔ x ∈ q\n[PROOFSTEP]\nconv_rhs => rw [← (prodEquivOfIsCompl p q h).apply_symm_apply x]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : E\n| x ∈ q\n[PROOFSTEP]\nrw [← (prodEquivOfIsCompl p q h).apply_symm_apply x]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : E\n| x ∈ q\n[PROOFSTEP]\nrw [← (prodEquivOfIsCompl p q h).apply_symm_apply x]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : E\n| x ∈ q\n[PROOFSTEP]\nrw [← (prodEquivOfIsCompl p q h).apply_symm_apply x]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : E\n⊢ (↑(LinearEquiv.symm (prodEquivOfIsCompl p q h)) x).fst = 0 ↔\n    ↑(prodEquivOfIsCompl p q h) (↑(LinearEquiv.symm (prodEquivOfIsCompl p q h)) x) ∈ q\n[PROOFSTEP]\nrw [coe_prodEquivOfIsCompl', Submodule.add_mem_iff_left _ (Submodule.coe_mem _),\n  mem_right_iff_eq_zero_of_disjoint h.disjoint]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : E\n⊢ (↑(LinearEquiv.symm (prodEquivOfIsCompl p q h)) x).snd = 0 ↔ x ∈ p\n[PROOFSTEP]\nconv_rhs => rw [← (prodEquivOfIsCompl p q h).apply_symm_apply x]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : E\n| x ∈ p\n[PROOFSTEP]\nrw [← (prodEquivOfIsCompl p q h).apply_symm_apply x]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : E\n| x ∈ p\n[PROOFSTEP]\nrw [← (prodEquivOfIsCompl p q h).apply_symm_apply x]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : E\n| x ∈ p\n[PROOFSTEP]\nrw [← (prodEquivOfIsCompl p q h).apply_symm_apply x]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : E\n⊢ (↑(LinearEquiv.symm (prodEquivOfIsCompl p q h)) x).snd = 0 ↔\n    ↑(prodEquivOfIsCompl p q h) (↑(LinearEquiv.symm (prodEquivOfIsCompl p q h)) x) ∈ p\n[PROOFSTEP]\nrw [coe_prodEquivOfIsCompl', Submodule.add_mem_iff_right _ (Submodule.coe_mem _),\n  mem_left_iff_eq_zero_of_disjoint h.disjoint]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : { x // x ∈ p }\n⊢ ↑(linearProjOfIsCompl p q h) ↑x = x\n[PROOFSTEP]\nsimp [linearProjOfIsCompl]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nx : E\n⊢ ↑(linearProjOfIsCompl p q h) x = 0 ↔ x ∈ q\n[PROOFSTEP]\nsimp [linearProjOfIsCompl]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nhpq : IsCompl p q\nx : E\n⊢ ↑(↑(linearProjOfIsCompl p q hpq) x) + ↑(↑(linearProjOfIsCompl q p (_ : IsCompl q p)) x) = x\n[PROOFSTEP]\ndsimp only [linearProjOfIsCompl]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nhpq : IsCompl p q\nx : E\n⊢ ↑(↑(comp (LinearMap.fst R { x // x ∈ p } { x // x ∈ q }) ↑(LinearEquiv.symm (prodEquivOfIsCompl p q hpq))) x) +\n      ↑(↑(comp (LinearMap.fst R { x // x ∈ q } { x // x ∈ p })\n              ↑(LinearEquiv.symm (prodEquivOfIsCompl q p (_ : IsCompl q p))))\n          x) =\n    x\n[PROOFSTEP]\nrw [← prodComm_trans_prodEquivOfIsCompl _ _ hpq]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nhpq : IsCompl p q\nx : E\n⊢ ↑(↑(comp (LinearMap.fst R { x // x ∈ p } { x // x ∈ q }) ↑(LinearEquiv.symm (prodEquivOfIsCompl p q hpq))) x) +\n      ↑(↑(comp (LinearMap.fst R { x // x ∈ q } { x // x ∈ p })\n              ↑(LinearEquiv.symm\n                  (LinearEquiv.trans (LinearEquiv.prodComm R { x // x ∈ q } { x // x ∈ p })\n                    (prodEquivOfIsCompl p q hpq))))\n          x) =\n    x\n[PROOFSTEP]\nexact (prodEquivOfIsCompl _ _ hpq).apply_symm_apply x\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nφ : { x // x ∈ p } →ₗ[R] F\nψ : { x // x ∈ q } →ₗ[R] F\nu : { x // x ∈ p }\n⊢ ↑(ofIsCompl h φ ψ) ↑u = ↑φ u\n[PROOFSTEP]\nsimp [ofIsCompl]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nφ : { x // x ∈ p } →ₗ[R] F\nψ : { x // x ∈ q } →ₗ[R] F\nv : { x // x ∈ q }\n⊢ ↑(ofIsCompl h φ ψ) ↑v = ↑ψ v\n[PROOFSTEP]\nsimp [ofIsCompl]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nφ : { x // x ∈ p } →ₗ[R] F\nψ : { x // x ∈ q } →ₗ[R] F\nχ : E →ₗ[R] F\nhφ : ∀ (u : { x // x ∈ p }), ↑φ u = ↑χ ↑u\nhψ : ∀ (u : { x // x ∈ q }), ↑ψ u = ↑χ ↑u\n⊢ ofIsCompl h φ ψ = χ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nφ : { x // x ∈ p } →ₗ[R] F\nψ : { x // x ∈ q } →ₗ[R] F\nχ : E →ₗ[R] F\nhφ : ∀ (u : { x // x ∈ p }), ↑φ u = ↑χ ↑u\nhψ : ∀ (u : { x // x ∈ q }), ↑ψ u = ↑χ ↑u\nx : E\n⊢ ↑(ofIsCompl h φ ψ) x = ↑χ x\n[PROOFSTEP]\nobtain ⟨_, _, rfl, _⟩ := existsUnique_add_of_isCompl h x\n[GOAL]\ncase h.intro.intro.intro\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nφ : { x // x ∈ p } →ₗ[R] F\nψ : { x // x ∈ q } →ₗ[R] F\nχ : E →ₗ[R] F\nhφ : ∀ (u : { x // x ∈ p }), ↑φ u = ↑χ ↑u\nhψ : ∀ (u : { x // x ∈ q }), ↑ψ u = ↑χ ↑u\nw✝¹ : { x // x ∈ p }\nw✝ : { x // x ∈ q }\nright✝ : ∀ (r : { x // x ∈ p }) (s : { x // x ∈ q }), ↑r + ↑s = ↑w✝¹ + ↑w✝ → r = w✝¹ ∧ s = w✝\n⊢ ↑(ofIsCompl h φ ψ) (↑w✝¹ + ↑w✝) = ↑χ (↑w✝¹ + ↑w✝)\n[PROOFSTEP]\nsimp [ofIsCompl, hφ, hψ]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nφ₁ φ₂ : { x // x ∈ p } →ₗ[R] F\nψ₁ ψ₂ : { x // x ∈ q } →ₗ[R] F\n⊢ ∀ (u : { x // x ∈ p }), ↑(φ₁ + φ₂) u = ↑(ofIsCompl h φ₁ ψ₁ + ofIsCompl h φ₂ ψ₂) ↑u\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nh : IsCompl p q\nφ₁ φ₂ : { x // x ∈ p } →ₗ[R] F\nψ₁ ψ₂ : { x // x ∈ q } →ₗ[R] F\n⊢ ∀ (u : { x // x ∈ q }), ↑(ψ₁ + ψ₂) u = ↑(ofIsCompl h φ₁ ψ₁ + ofIsCompl h φ₂ ψ₂) ↑u\n[PROOFSTEP]\nsimp\n[GOAL]\nR✝ : Type u_1\ninst✝¹⁴ : Ring R✝\nE✝ : Type u_2\ninst✝¹³ : AddCommGroup E✝\ninst✝¹² : Module R✝ E✝\nF✝ : Type u_3\ninst✝¹¹ : AddCommGroup F✝\ninst✝¹⁰ : Module R✝ F✝\nG : Type u_4\ninst✝⁹ : AddCommGroup G\ninst✝⁸ : Module R✝ G\np✝ q✝ : Submodule R✝ E✝\nS : Type u_5\ninst✝⁷ : Semiring S\nM : Type u_6\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module S M\nm : Submodule S M\nR : Type u_7\ninst✝⁴ : CommRing R\nE : Type u_8\ninst✝³ : AddCommGroup E\ninst✝² : Module R E\nF : Type u_9\ninst✝¹ : AddCommGroup F\ninst✝ : Module R F\np q : Submodule R E\nh : IsCompl p q\nφ : { x // x ∈ p } →ₗ[R] F\nψ : { x // x ∈ q } →ₗ[R] F\nc : R\n⊢ ∀ (u : { x // x ∈ p }), ↑(c • φ) u = ↑(c • ofIsCompl h φ ψ) ↑u\n[PROOFSTEP]\nsimp\n[GOAL]\nR✝ : Type u_1\ninst✝¹⁴ : Ring R✝\nE✝ : Type u_2\ninst✝¹³ : AddCommGroup E✝\ninst✝¹² : Module R✝ E✝\nF✝ : Type u_3\ninst✝¹¹ : AddCommGroup F✝\ninst✝¹⁰ : Module R✝ F✝\nG : Type u_4\ninst✝⁹ : AddCommGroup G\ninst✝⁸ : Module R✝ G\np✝ q✝ : Submodule R✝ E✝\nS : Type u_5\ninst✝⁷ : Semiring S\nM : Type u_6\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module S M\nm : Submodule S M\nR : Type u_7\ninst✝⁴ : CommRing R\nE : Type u_8\ninst✝³ : AddCommGroup E\ninst✝² : Module R E\nF : Type u_9\ninst✝¹ : AddCommGroup F\ninst✝ : Module R F\np q : Submodule R E\nh : IsCompl p q\nφ : { x // x ∈ p } →ₗ[R] F\nψ : { x // x ∈ q } →ₗ[R] F\nc : R\n⊢ ∀ (u : { x // x ∈ q }), ↑(c • ψ) u = ↑(c • ofIsCompl h φ ψ) ↑u\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹² : Ring R\nE : Type u_2\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : Module R E\nF : Type u_3\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module R F\nG : Type u_4\ninst✝⁷ : AddCommGroup G\ninst✝⁶ : Module R G\np✝ q✝ : Submodule R E\nS : Type u_5\ninst✝⁵ : Semiring S\nM : Type u_6\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module S M\nm : Submodule S M\nR₁ : Type u_7\ninst✝² : CommRing R₁\ninst✝¹ : Module R₁ E\ninst✝ : Module R₁ F\np q : Submodule R₁ E\nh : IsCompl p q\n⊢ ∀ (x y : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n    (fun φ => ofIsCompl h φ.fst φ.snd) (x + y) =\n      (fun φ => ofIsCompl h φ.fst φ.snd) x + (fun φ => ofIsCompl h φ.fst φ.snd) y\n[PROOFSTEP]\nintro φ ψ\n[GOAL]\nR : Type u_1\ninst✝¹² : Ring R\nE : Type u_2\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : Module R E\nF : Type u_3\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module R F\nG : Type u_4\ninst✝⁷ : AddCommGroup G\ninst✝⁶ : Module R G\np✝ q✝ : Submodule R E\nS : Type u_5\ninst✝⁵ : Semiring S\nM : Type u_6\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module S M\nm : Submodule S M\nR₁ : Type u_7\ninst✝² : CommRing R₁\ninst✝¹ : Module R₁ E\ninst✝ : Module R₁ F\np q : Submodule R₁ E\nh : IsCompl p q\nφ ψ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)\n⊢ (fun φ => ofIsCompl h φ.fst φ.snd) (φ + ψ) =\n    (fun φ => ofIsCompl h φ.fst φ.snd) φ + (fun φ => ofIsCompl h φ.fst φ.snd) ψ\n[PROOFSTEP]\ndsimp only\n[GOAL]\nR : Type u_1\ninst✝¹² : Ring R\nE : Type u_2\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : Module R E\nF : Type u_3\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module R F\nG : Type u_4\ninst✝⁷ : AddCommGroup G\ninst✝⁶ : Module R G\np✝ q✝ : Submodule R E\nS : Type u_5\ninst✝⁵ : Semiring S\nM : Type u_6\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module S M\nm : Submodule S M\nR₁ : Type u_7\ninst✝² : CommRing R₁\ninst✝¹ : Module R₁ E\ninst✝ : Module R₁ F\np q : Submodule R₁ E\nh : IsCompl p q\nφ ψ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)\n⊢ ofIsCompl h (φ + ψ).fst (φ + ψ).snd = ofIsCompl h φ.fst φ.snd + ofIsCompl h ψ.fst ψ.snd\n[PROOFSTEP]\nrw [Prod.snd_add, Prod.fst_add, ofIsCompl_add]\n[GOAL]\nR : Type u_1\ninst✝¹² : Ring R\nE : Type u_2\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : Module R E\nF : Type u_3\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module R F\nG : Type u_4\ninst✝⁷ : AddCommGroup G\ninst✝⁶ : Module R G\np✝ q✝ : Submodule R E\nS : Type u_5\ninst✝⁵ : Semiring S\nM : Type u_6\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module S M\nm : Submodule S M\nR₁ : Type u_7\ninst✝² : CommRing R₁\ninst✝¹ : Module R₁ E\ninst✝ : Module R₁ F\np q : Submodule R₁ E\nh : IsCompl p q\n⊢ ∀ (r : R₁) (x : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n    AddHom.toFun\n        { toFun := fun φ => ofIsCompl h φ.fst φ.snd,\n          map_add' :=\n            (_ :\n              ∀ (φ ψ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n                (fun φ => ofIsCompl h φ.fst φ.snd) (φ + ψ) =\n                  (fun φ => ofIsCompl h φ.fst φ.snd) φ + (fun φ => ofIsCompl h φ.fst φ.snd) ψ) }\n        (r • x) =\n      ↑(RingHom.id R₁) r •\n        AddHom.toFun\n          { toFun := fun φ => ofIsCompl h φ.fst φ.snd,\n            map_add' :=\n              (_ :\n                ∀ (φ ψ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n                  (fun φ => ofIsCompl h φ.fst φ.snd) (φ + ψ) =\n                    (fun φ => ofIsCompl h φ.fst φ.snd) φ + (fun φ => ofIsCompl h φ.fst φ.snd) ψ) }\n          x\n[PROOFSTEP]\nintro c φ\n[GOAL]\nR : Type u_1\ninst✝¹² : Ring R\nE : Type u_2\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : Module R E\nF : Type u_3\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module R F\nG : Type u_4\ninst✝⁷ : AddCommGroup G\ninst✝⁶ : Module R G\np✝ q✝ : Submodule R E\nS : Type u_5\ninst✝⁵ : Semiring S\nM : Type u_6\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module S M\nm : Submodule S M\nR₁ : Type u_7\ninst✝² : CommRing R₁\ninst✝¹ : Module R₁ E\ninst✝ : Module R₁ F\np q : Submodule R₁ E\nh : IsCompl p q\nc : R₁\nφ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)\n⊢ AddHom.toFun\n      { toFun := fun φ => ofIsCompl h φ.fst φ.snd,\n        map_add' :=\n          (_ :\n            ∀ (φ ψ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n              (fun φ => ofIsCompl h φ.fst φ.snd) (φ + ψ) =\n                (fun φ => ofIsCompl h φ.fst φ.snd) φ + (fun φ => ofIsCompl h φ.fst φ.snd) ψ) }\n      (c • φ) =\n    ↑(RingHom.id R₁) c •\n      AddHom.toFun\n        { toFun := fun φ => ofIsCompl h φ.fst φ.snd,\n          map_add' :=\n            (_ :\n              ∀ (φ ψ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n                (fun φ => ofIsCompl h φ.fst φ.snd) (φ + ψ) =\n                  (fun φ => ofIsCompl h φ.fst φ.snd) φ + (fun φ => ofIsCompl h φ.fst φ.snd) ψ) }\n        φ\n[PROOFSTEP]\nsimp [Prod.smul_snd, Prod.smul_fst, ofIsCompl_smul]\n[GOAL]\nR : Type u_1\ninst✝¹² : Ring R\nE : Type u_2\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : Module R E\nF : Type u_3\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module R F\nG : Type u_4\ninst✝⁷ : AddCommGroup G\ninst✝⁶ : Module R G\np✝ q✝ : Submodule R E\nS : Type u_5\ninst✝⁵ : Semiring S\nM : Type u_6\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module S M\nm : Submodule S M\nR₁ : Type u_7\ninst✝² : CommRing R₁\ninst✝¹ : Module R₁ E\ninst✝ : Module R₁ F\np q : Submodule R₁ E\nh : IsCompl p q\nsrc✝ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F) →ₗ[R₁] E →ₗ[R₁] F := ofIsComplProd h\nφ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)\n⊢ (fun φ => (domRestrict φ p, domRestrict φ q))\n      (AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R₁) (x : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R₁) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        φ) =\n    φ\n[PROOFSTEP]\next x\n[GOAL]\ncase h₁.h\nR : Type u_1\ninst✝¹² : Ring R\nE : Type u_2\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : Module R E\nF : Type u_3\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module R F\nG : Type u_4\ninst✝⁷ : AddCommGroup G\ninst✝⁶ : Module R G\np✝ q✝ : Submodule R E\nS : Type u_5\ninst✝⁵ : Semiring S\nM : Type u_6\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module S M\nm : Submodule S M\nR₁ : Type u_7\ninst✝² : CommRing R₁\ninst✝¹ : Module R₁ E\ninst✝ : Module R₁ F\np q : Submodule R₁ E\nh : IsCompl p q\nsrc✝ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F) →ₗ[R₁] E →ₗ[R₁] F := ofIsComplProd h\nφ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)\nx : { x // x ∈ p }\n⊢ ↑((fun φ => (domRestrict φ p, domRestrict φ q))\n            (AddHom.toFun\n              { toAddHom := src✝.toAddHom,\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R₁) (x : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n                        AddHom.toFun src✝.toAddHom (r • x) =\n                          ↑(RingHom.id R₁) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n              φ)).fst\n      x =\n    ↑φ.fst x\n[PROOFSTEP]\nexact ofIsCompl_left_apply h x\n[GOAL]\ncase h₂.h\nR : Type u_1\ninst✝¹² : Ring R\nE : Type u_2\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : Module R E\nF : Type u_3\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module R F\nG : Type u_4\ninst✝⁷ : AddCommGroup G\ninst✝⁶ : Module R G\np✝ q✝ : Submodule R E\nS : Type u_5\ninst✝⁵ : Semiring S\nM : Type u_6\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module S M\nm : Submodule S M\nR₁ : Type u_7\ninst✝² : CommRing R₁\ninst✝¹ : Module R₁ E\ninst✝ : Module R₁ F\np q : Submodule R₁ E\nh : IsCompl p q\nsrc✝ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F) →ₗ[R₁] E →ₗ[R₁] F := ofIsComplProd h\nφ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)\nx : { x // x ∈ q }\n⊢ ↑((fun φ => (domRestrict φ p, domRestrict φ q))\n            (AddHom.toFun\n              { toAddHom := src✝.toAddHom,\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R₁) (x : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n                        AddHom.toFun src✝.toAddHom (r • x) =\n                          ↑(RingHom.id R₁) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n              φ)).snd\n      x =\n    ↑φ.snd x\n[PROOFSTEP]\nexact ofIsCompl_right_apply h x\n[GOAL]\nR : Type u_1\ninst✝¹² : Ring R\nE : Type u_2\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : Module R E\nF : Type u_3\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module R F\nG : Type u_4\ninst✝⁷ : AddCommGroup G\ninst✝⁶ : Module R G\np✝ q✝ : Submodule R E\nS : Type u_5\ninst✝⁵ : Semiring S\nM : Type u_6\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module S M\nm : Submodule S M\nR₁ : Type u_7\ninst✝² : CommRing R₁\ninst✝¹ : Module R₁ E\ninst✝ : Module R₁ F\np q : Submodule R₁ E\nh : IsCompl p q\nsrc✝ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F) →ₗ[R₁] E →ₗ[R₁] F := ofIsComplProd h\nφ : E →ₗ[R₁] F\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R₁) (x : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R₁) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      ((fun φ => (domRestrict φ p, domRestrict φ q)) φ) =\n    φ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹² : Ring R\nE : Type u_2\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : Module R E\nF : Type u_3\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module R F\nG : Type u_4\ninst✝⁷ : AddCommGroup G\ninst✝⁶ : Module R G\np✝ q✝ : Submodule R E\nS : Type u_5\ninst✝⁵ : Semiring S\nM : Type u_6\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module S M\nm : Submodule S M\nR₁ : Type u_7\ninst✝² : CommRing R₁\ninst✝¹ : Module R₁ E\ninst✝ : Module R₁ F\np q : Submodule R₁ E\nh : IsCompl p q\nsrc✝ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F) →ₗ[R₁] E →ₗ[R₁] F := ofIsComplProd h\nφ : E →ₗ[R₁] F\nx : E\n⊢ ↑(AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R₁) (x : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R₁) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          ((fun φ => (domRestrict φ p, domRestrict φ q)) φ))\n      x =\n    ↑φ x\n[PROOFSTEP]\nobtain ⟨a, b, hab, _⟩ := existsUnique_add_of_isCompl h x\n[GOAL]\ncase h.intro.intro.intro\nR : Type u_1\ninst✝¹² : Ring R\nE : Type u_2\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : Module R E\nF : Type u_3\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module R F\nG : Type u_4\ninst✝⁷ : AddCommGroup G\ninst✝⁶ : Module R G\np✝ q✝ : Submodule R E\nS : Type u_5\ninst✝⁵ : Semiring S\nM : Type u_6\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module S M\nm : Submodule S M\nR₁ : Type u_7\ninst✝² : CommRing R₁\ninst✝¹ : Module R₁ E\ninst✝ : Module R₁ F\np q : Submodule R₁ E\nh : IsCompl p q\nsrc✝ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F) →ₗ[R₁] E →ₗ[R₁] F := ofIsComplProd h\nφ : E →ₗ[R₁] F\nx : E\na : { x // x ∈ p }\nb : { x // x ∈ q }\nhab : ↑a + ↑b = x\nright✝ : ∀ (r : { x // x ∈ p }) (s : { x // x ∈ q }), ↑r + ↑s = x → r = a ∧ s = b\n⊢ ↑(AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R₁) (x : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R₁) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          ((fun φ => (domRestrict φ p, domRestrict φ q)) φ))\n      x =\n    ↑φ x\n[PROOFSTEP]\nrw [← hab]\n[GOAL]\ncase h.intro.intro.intro\nR : Type u_1\ninst✝¹² : Ring R\nE : Type u_2\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : Module R E\nF : Type u_3\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module R F\nG : Type u_4\ninst✝⁷ : AddCommGroup G\ninst✝⁶ : Module R G\np✝ q✝ : Submodule R E\nS : Type u_5\ninst✝⁵ : Semiring S\nM : Type u_6\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module S M\nm : Submodule S M\nR₁ : Type u_7\ninst✝² : CommRing R₁\ninst✝¹ : Module R₁ E\ninst✝ : Module R₁ F\np q : Submodule R₁ E\nh : IsCompl p q\nsrc✝ : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F) →ₗ[R₁] E →ₗ[R₁] F := ofIsComplProd h\nφ : E →ₗ[R₁] F\nx : E\na : { x // x ∈ p }\nb : { x // x ∈ q }\nhab : ↑a + ↑b = x\nright✝ : ∀ (r : { x // x ∈ p }) (s : { x // x ∈ q }), ↑r + ↑s = x → r = a ∧ s = b\n⊢ ↑(AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R₁) (x : ({ x // x ∈ p } →ₗ[R₁] F) × ({ x // x ∈ q } →ₗ[R₁] F)),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R₁) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          ((fun φ => (domRestrict φ p, domRestrict φ q)) φ))\n      (↑a + ↑b) =\n    ↑φ (↑a + ↑b)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\n⊢ linearProjOfIsCompl p (ker f) (_ : IsCompl p (ker f)) = f\n[PROOFSTEP]\next x\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\nx : E\n⊢ ↑(↑(linearProjOfIsCompl p (ker f) (_ : IsCompl p (ker f))) x) = ↑(↑f x)\n[PROOFSTEP]\nhave : x ∈ p ⊔ (ker f) := by simp only [(isCompl_of_proj hf).sup_eq_top, mem_top]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\nx : E\n⊢ x ∈ p ⊔ ker f\n[PROOFSTEP]\nsimp only [(isCompl_of_proj hf).sup_eq_top, mem_top]\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\nx : E\nthis : x ∈ p ⊔ ker f\n⊢ ↑(↑(linearProjOfIsCompl p (ker f) (_ : IsCompl p (ker f))) x) = ↑(↑f x)\n[PROOFSTEP]\nrcases mem_sup'.1 this with ⟨x, y, rfl⟩\n[GOAL]\ncase h.a.intro.intro\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] { x // x ∈ p }\nhf : ∀ (x : { x // x ∈ p }), ↑f ↑x = x\nx : { x // x ∈ p }\ny : { x // x ∈ ker f }\nthis : ↑x + ↑y ∈ p ⊔ ker f\n⊢ ↑(↑(linearProjOfIsCompl p (ker f) (_ : IsCompl p (ker f))) (↑x + ↑y)) = ↑(↑f (↑x + ↑y))\n[PROOFSTEP]\nsimp [hf]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] F\ng : E →ₗ[R] G\nhf : range f = ⊤\nhg : range g = ⊤\nhfg : IsCompl (ker f) (ker g)\n⊢ Function.Injective ↑(prod f g)\n[PROOFSTEP]\nsimp [← ker_eq_bot, hfg.inf_eq_bot]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] F\ng : E →ₗ[R] G\nhf : range f = ⊤\nhg : range g = ⊤\nhfg : IsCompl (ker f) (ker g)\n⊢ Function.Surjective ↑(prod f g)\n[PROOFSTEP]\nrw [← range_eq_top]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] F\ng : E →ₗ[R] G\nhf : range f = ⊤\nhg : range g = ⊤\nhfg : IsCompl (ker f) (ker g)\n⊢ range (prod f g) = ⊤\n[PROOFSTEP]\nsimp [range_prod_eq hfg.sup_eq_top, *]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q✝ : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nx✝ : { q // IsCompl p q }\nq : Submodule R E\nhq : IsCompl p q\n⊢ (fun f => { val := ker ↑f, property := (_ : IsCompl p (ker ↑f)) })\n      ((fun q =>\n          { val := linearProjOfIsCompl p ↑q (_ : IsCompl p ↑q),\n            property := (_ : ∀ (x : { x // x ∈ p }), ↑(linearProjOfIsCompl p ↑q (_ : IsCompl p ↑q)) ↑x = x) })\n        { val := q, property := hq }) =\n    { val := q, property := hq }\n[PROOFSTEP]\nsimp only [linearProjOfIsCompl_ker, Subtype.coe_mk]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\n⊢ (∃ p, IsProj p f) ↔ comp f f = f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\n⊢ (∃ p, IsProj p f) → comp f f = f\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\nh : ∃ p, IsProj p f\n⊢ comp f f = f\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := h\n[GOAL]\ncase mp.intro\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np✝ q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\np : Submodule S M\nhp : IsProj p f\n⊢ comp f f = f\n[PROOFSTEP]\next x\n[GOAL]\ncase mp.intro.h\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np✝ q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\np : Submodule S M\nhp : IsProj p f\nx : M\n⊢ ↑(comp f f) x = ↑f x\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase mp.intro.h\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np✝ q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\np : Submodule S M\nhp : IsProj p f\nx : M\n⊢ ↑f (↑f x) = ↑f x\n[PROOFSTEP]\nexact hp.map_id (f x) (hp.map_mem x)\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\n⊢ comp f f = f → ∃ p, IsProj p f\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\nh : comp f f = f\n⊢ ∃ p, IsProj p f\n[PROOFSTEP]\nuse range f\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\nh : comp f f = f\n⊢ IsProj (range f) f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.map_mem\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\nh : comp f f = f\n⊢ ∀ (x : M), ↑f x ∈ range f\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h.map_mem\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\nh : comp f f = f\nx : M\n⊢ ↑f x ∈ range f\n[PROOFSTEP]\nexact mem_range_self f x\n[GOAL]\ncase h.map_id\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\nh : comp f f = f\n⊢ ∀ (x : M), x ∈ range f → ↑f x = x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h.map_id\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\nh : comp f f = f\nx : M\nhx : x ∈ range f\n⊢ ↑f x = x\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := mem_range.1 hx\n[GOAL]\ncase h.map_id.intro\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\nh : comp f f = f\nx : M\nhx : x ∈ range f\ny : M\nhy : ↑f y = x\n⊢ ↑f x = x\n[PROOFSTEP]\nrw [← hy, ← comp_apply, h]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\nh : IsProj m f\nx : { x // x ∈ m }\n⊢ ↑(codRestrict h) ↑x = x\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\nh : IsProj m f\nx : { x // x ∈ m }\n⊢ ↑(↑(codRestrict h) ↑x) = ↑x\n[PROOFSTEP]\nrw [codRestrict_apply]\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : M →ₗ[S] M\nh : IsProj m f\nx : { x // x ∈ m }\n⊢ ↑f ↑x = ↑x\n[PROOFSTEP]\nexact h.map_id x x.2\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] E\nh : IsProj p f\n⊢ IsCompl p (ker f)\n[PROOFSTEP]\nrw [← codRestrict_ker]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] E\nh : IsProj p f\n⊢ IsCompl p (ker (codRestrict ?m.444391))\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] E\nh : IsProj p f\n⊢ IsProj ?m.444132 f\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] E\nh : IsProj p f\n⊢ Submodule R E\n[PROOFSTEP]\nexact isCompl_of_proj h.codRestrict_apply_cod\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] E\nh : IsProj p f\n⊢ f =\n    comp (↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f))))\n      (comp (prodMap id 0) ↑(LinearEquiv.symm (prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))))\n[PROOFSTEP]\nrw [← LinearMap.comp_assoc, LinearEquiv.eq_comp_toLinearMap_symm]\n[GOAL]\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] E\nh : IsProj p f\n⊢ comp f ↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f))) =\n    comp (↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))) (prodMap id 0)\n[PROOFSTEP]\next x\n[GOAL]\ncase hl.h\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] E\nh : IsProj p f\nx : { x // x ∈ p }\n⊢ ↑(comp (comp f ↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))) (inl R { x // x ∈ p } { x // x ∈ ker f })) x =\n    ↑(comp (comp (↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))) (prodMap id 0))\n          (inl R { x // x ∈ p } { x // x ∈ ker f }))\n      x\n[PROOFSTEP]\nsimp only [coe_prodEquivOfIsCompl, comp_apply, coe_inl, coprod_apply, coeSubtype, _root_.map_zero, add_zero,\n  h.map_id x x.2, prodMap_apply, id_apply]\n[GOAL]\ncase hr.h\nR : Type u_1\ninst✝⁹ : Ring R\nE : Type u_2\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module R E\nF : Type u_3\ninst✝⁶ : AddCommGroup F\ninst✝⁵ : Module R F\nG : Type u_4\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module R G\np q : Submodule R E\nS : Type u_5\ninst✝² : Semiring S\nM : Type u_6\ninst✝¹ : AddCommMonoid M\ninst✝ : Module S M\nm : Submodule S M\nf : E →ₗ[R] E\nh : IsProj p f\nx : { x // x ∈ ker f }\n⊢ ↑(comp (comp f ↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))) (inr R { x // x ∈ p } { x // x ∈ ker f })) x =\n    ↑(comp (comp (↑(prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))) (prodMap id 0))\n          (inr R { x // x ∈ p } { x // x ∈ ker f }))\n      x\n[PROOFSTEP]\nsimp only [coe_prodEquivOfIsCompl, comp_apply, coe_inr, coprod_apply, _root_.map_zero, coeSubtype, zero_add,\n  map_coe_ker, prodMap_apply, zero_apply, add_zero]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nE : Type u_2\ninst✝¹ : AddCommGroup E\ninst✝ : Module R E\np : Submodule R E\nf : E →ₗ[R] E\nh : IsProj p f\n⊢ f = ↑(LinearEquiv.conj (Submodule.prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))) (prodMap id 0)\n[PROOFSTEP]\nrw [LinearEquiv.conj_apply]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nE : Type u_2\ninst✝¹ : AddCommGroup E\ninst✝ : Module R E\np : Submodule R E\nf : E →ₗ[R] E\nh : IsProj p f\n⊢ f =\n    comp (comp (↑(Submodule.prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f)))) (prodMap id 0))\n      ↑(LinearEquiv.symm (Submodule.prodEquivOfIsCompl p (ker f) (_ : IsCompl p (ker f))))\n[PROOFSTEP]\nexact h.eq_conj_prod_map'\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Projection", "llama_tokens": 27699, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7549149868676284, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.38630253392019237}}
{"text": "[GOAL]\nF : Type u → Type v\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\nG : Type u → Type w\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nη η' : ApplicativeTransformation F G\nh : (fun {α} => app η α) = fun {α} => app η' α\n⊢ η = η'\n[PROOFSTEP]\ncases η\n[GOAL]\ncase mk\nF : Type u → Type v\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\nG : Type u → Type w\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nη' : ApplicativeTransformation F G\napp✝ : (α : Type u) → F α → G α\npreserves_pure'✝ : ∀ {α : Type u} (x : α), app✝ α (pure x) = pure x\npreserves_seq'✝ :\n  ∀ {α β : Type u} (x : F (α → β)) (y : F α), app✝ β (Seq.seq x fun x => y) = Seq.seq (app✝ (α → β) x) fun x => app✝ α y\nh :\n  (fun {α} => app { app := app✝, preserves_pure' := preserves_pure'✝, preserves_seq' := preserves_seq'✝ } α) =\n    fun {α} => app η' α\n⊢ { app := app✝, preserves_pure' := preserves_pure'✝, preserves_seq' := preserves_seq'✝ } = η'\n[PROOFSTEP]\ncases η'\n[GOAL]\ncase mk.mk\nF : Type u → Type v\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\nG : Type u → Type w\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\napp✝¹ : (α : Type u) → F α → G α\npreserves_pure'✝¹ : ∀ {α : Type u} (x : α), app✝¹ α (pure x) = pure x\npreserves_seq'✝¹ :\n  ∀ {α β : Type u} (x : F (α → β)) (y : F α),\n    app✝¹ β (Seq.seq x fun x => y) = Seq.seq (app✝¹ (α → β) x) fun x => app✝¹ α y\napp✝ : (α : Type u) → F α → G α\npreserves_pure'✝ : ∀ {α : Type u} (x : α), app✝ α (pure x) = pure x\npreserves_seq'✝ :\n  ∀ {α β : Type u} (x : F (α → β)) (y : F α), app✝ β (Seq.seq x fun x => y) = Seq.seq (app✝ (α → β) x) fun x => app✝ α y\nh :\n  (fun {α} => app { app := app✝¹, preserves_pure' := preserves_pure'✝¹, preserves_seq' := preserves_seq'✝¹ } α) =\n    fun {α} => app { app := app✝, preserves_pure' := preserves_pure'✝, preserves_seq' := preserves_seq'✝ } α\n⊢ { app := app✝¹, preserves_pure' := preserves_pure'✝¹, preserves_seq' := preserves_seq'✝¹ } =\n    { app := app✝, preserves_pure' := preserves_pure'✝, preserves_seq' := preserves_seq'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nF : Type u → Type v\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\nG : Type u → Type w\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nη η' : ApplicativeTransformation F G\nh : ∀ (α : Type u) (x : F α), (fun {α} => app η α) x = (fun {α} => app η' α) x\n⊢ η = η'\n[PROOFSTEP]\napply coe_inj\n[GOAL]\ncase h\nF : Type u → Type v\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\nG : Type u → Type w\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nη η' : ApplicativeTransformation F G\nh : ∀ (α : Type u) (x : F α), (fun {α} => app η α) x = (fun {α} => app η' α) x\n⊢ (fun {α} => app η α) = fun {α} => app η' α\n[PROOFSTEP]\next1 α\n[GOAL]\ncase h.h\nF : Type u → Type v\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\nG : Type u → Type w\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nη η' : ApplicativeTransformation F G\nh : ∀ (α : Type u) (x : F α), (fun {α} => app η α) x = (fun {α} => app η' α) x\nα : Type u\n⊢ app η α = app η' α\n[PROOFSTEP]\nexact funext (h α)\n[GOAL]\nF : Type u → Type v\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\nG : Type u → Type w\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nη : ApplicativeTransformation F G\nα β : Type u\nx : α → β\ny : F α\n⊢ (fun {α} => app η α) (x <$> y) = x <$> (fun {α} => app η α) y\n[PROOFSTEP]\nrw [← pure_seq, η.preserves_seq, preserves_pure, pure_seq]\n[GOAL]\nF : Type u → Type v\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\nG : Type u → Type w\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nη : ApplicativeTransformation F G\nα β : Type u\nx : α → β\n⊢ (fun {α} => app η α) ∘ Functor.map x = Functor.map x ∘ fun {α} => app η α\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nF : Type u → Type v\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\nG : Type u → Type w\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nη : ApplicativeTransformation F G\nα β : Type u\nx : α → β\ny : F α\n⊢ ((fun {α} => app η α) ∘ Functor.map x) y = (Functor.map x ∘ fun {α} => app η α) y\n[PROOFSTEP]\nexact preserves_map η x y\n[GOAL]\nF : Type u → Type v\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\nG : Type u → Type w\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\n⊢ ∀ {α : Type u} (x : α), (fun α => id) α (pure x) = pure x\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u → Type v\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\nG : Type u → Type w\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα✝ β✝ : Type u\nx : F (α✝ → β✝)\ny : F α✝\n⊢ (fun α => id) β✝ (Seq.seq x fun x => y) = Seq.seq ((fun α => id) (α✝ → β✝) x) fun x => (fun α => id) α✝ y\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u → Type v\ninst✝⁵ : Applicative F\ninst✝⁴ : LawfulApplicative F\nG : Type u → Type w\ninst✝³ : Applicative G\ninst✝² : LawfulApplicative G\nH : Type u → Type s\ninst✝¹ : Applicative H\ninst✝ : LawfulApplicative H\nη' : ApplicativeTransformation G H\nη : ApplicativeTransformation F G\nα✝ : Type u\nx : α✝\n⊢ (fun α x => (fun {α} => app η' α) ((fun {α} => app η α) x)) α✝ (pure x) = pure x\n[PROOFSTEP]\nsimp only [preserves_pure]\n[GOAL]\nF : Type u → Type v\ninst✝⁵ : Applicative F\ninst✝⁴ : LawfulApplicative F\nG : Type u → Type w\ninst✝³ : Applicative G\ninst✝² : LawfulApplicative G\nH : Type u → Type s\ninst✝¹ : Applicative H\ninst✝ : LawfulApplicative H\nη' : ApplicativeTransformation G H\nη : ApplicativeTransformation F G\nα✝ β✝ : Type u\nx : F (α✝ → β✝)\ny : F α✝\n⊢ (fun α x => (fun {α} => app η' α) ((fun {α} => app η α) x)) β✝ (Seq.seq x fun x => y) =\n    Seq.seq ((fun α x => (fun {α} => app η' α) ((fun {α} => app η α) x)) (α✝ → β✝) x) fun x =>\n      (fun α x => (fun {α} => app η' α) ((fun {α} => app η α) x)) α✝ y\n[PROOFSTEP]\nsimp only [preserves_seq]\n[GOAL]\n⊢ LawfulTraversable Id\n[PROOFSTEP]\nrefine' { .. }\n[GOAL]\ncase refine'_1\n⊢ ∀ {α β : Type ?u.11560}, mapConst = map ∘ const β\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\n⊢ ∀ {α : Type ?u.11560} (x : Id α), id <$> x = x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\n⊢ ∀ {α β γ : Type ?u.11560} (g : α → β) (h : β → γ) (x : Id α), (h ∘ g) <$> x = h <$> g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\n⊢ ∀ {α : Type ?u.11560} (x : Id α), traverse pure x = x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\n⊢ ∀ {F G : Type ?u.11560 → Type ?u.11560} [inst : Applicative F] [inst_1 : Applicative G] [inst_2 : LawfulApplicative F]\n    [inst_3 : LawfulApplicative G] {α β γ : Type ?u.11560} (f : β → F γ) (g : α → G β) (x : Id α),\n    traverse (Comp.mk ∘ map f ∘ g) x = Comp.mk (traverse f <$> traverse g x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\n⊢ ∀ {α β : Type ?u.11560} (f : α → β) (x : Id α), traverse (pure ∘ f) x = id.mk (f <$> x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_7\n⊢ ∀ {F G : Type ?u.11560 → Type ?u.11560} [inst : Applicative F] [inst_1 : Applicative G] [inst_2 : LawfulApplicative F]\n    [inst_3 : LawfulApplicative G] (η : ApplicativeTransformation F G) {α β : Type ?u.11560} (f : α → F β) (x : Id α),\n    (fun {α} => ApplicativeTransformation.app η α) (traverse f x) =\n      traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα✝ β✝ : Type ?u.11560\n⊢ mapConst = map ∘ const β✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nα✝ : Type ?u.11560\nx✝ : Id α✝\n⊢ id <$> x✝ = x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3\nα✝ β✝ γ✝ : Type ?u.11560\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nx✝ : Id α✝\n⊢ (h✝ ∘ g✝) <$> x✝ = h✝ <$> g✝ <$> x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4\nα✝ : Type ?u.11560\nx✝ : Id α✝\n⊢ traverse pure x✝ = x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_5\nF✝ G✝ : Type ?u.11560 → Type ?u.11560\ninst✝³ : Applicative F✝\ninst✝² : Applicative G✝\ninst✝¹ : LawfulApplicative F✝\ninst✝ : LawfulApplicative G✝\nα✝ β✝ γ✝ : Type ?u.11560\nf✝ : β✝ → F✝ γ✝\ng✝ : α✝ → G✝ β✝\nx✝ : Id α✝\n⊢ traverse (Comp.mk ∘ map f✝ ∘ g✝) x✝ = Comp.mk (traverse f✝ <$> traverse g✝ x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_6\nα✝ β✝ : Type ?u.11560\nf✝ : α✝ → β✝\nx✝ : Id α✝\n⊢ traverse (pure ∘ f✝) x✝ = id.mk (f✝ <$> x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_7\nF✝ G✝ : Type ?u.11560 → Type ?u.11560\ninst✝³ : Applicative F✝\ninst✝² : Applicative G✝\ninst✝¹ : LawfulApplicative F✝\ninst✝ : LawfulApplicative G✝\nη✝ : ApplicativeTransformation F✝ G✝\nα✝ β✝ : Type ?u.11560\nf✝ : α✝ → F✝ β✝\nx✝ : Id α✝\n⊢ (fun {α} => ApplicativeTransformation.app η✝ α) (traverse f✝ x✝) =\n    traverse ((fun {α} => ApplicativeTransformation.app η✝ α) ∘ f✝) x✝\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Control.Traversable.Basic", "llama_tokens": 4325, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7217432062975979, "lm_q2_score": 0.5350984286266116, "lm_q1q2_score": 0.386203655561777}}
{"text": "[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝³ : DecidableEq ι\ninst✝² : AddCommMonoid M\ninst✝¹ : SetLike σ M\ninst✝ : AddSubmonoidClass σ M\nℳ : ι → σ\nx y : Decomposition ℳ\n⊢ x = y\n[PROOFSTEP]\ncases' x with x xl xr\n[GOAL]\ncase mk\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝³ : DecidableEq ι\ninst✝² : AddCommMonoid M\ninst✝¹ : SetLike σ M\ninst✝ : AddSubmonoidClass σ M\nℳ : ι → σ\ny : Decomposition ℳ\nx : M → ⨁ (i : ι), { x // x ∈ ℳ i }\nxl : Function.LeftInverse (↑(DirectSum.coeAddMonoidHom ℳ)) x\nxr : Function.RightInverse (↑(DirectSum.coeAddMonoidHom ℳ)) x\n⊢ { decompose' := x, left_inv := xl, right_inv := xr } = y\n[PROOFSTEP]\ncases' y with y yl yr\n[GOAL]\ncase mk.mk\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝³ : DecidableEq ι\ninst✝² : AddCommMonoid M\ninst✝¹ : SetLike σ M\ninst✝ : AddSubmonoidClass σ M\nℳ : ι → σ\nx : M → ⨁ (i : ι), { x // x ∈ ℳ i }\nxl : Function.LeftInverse (↑(DirectSum.coeAddMonoidHom ℳ)) x\nxr : Function.RightInverse (↑(DirectSum.coeAddMonoidHom ℳ)) x\ny : M → ⨁ (i : ι), { x // x ∈ ℳ i }\nyl : Function.LeftInverse (↑(DirectSum.coeAddMonoidHom ℳ)) y\nyr : Function.RightInverse (↑(DirectSum.coeAddMonoidHom ℳ)) y\n⊢ { decompose' := x, left_inv := xl, right_inv := xr } = { decompose' := y, left_inv := yl, right_inv := yr }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_decompose'\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝³ : DecidableEq ι\ninst✝² : AddCommMonoid M\ninst✝¹ : SetLike σ M\ninst✝ : AddSubmonoidClass σ M\nℳ : ι → σ\nx : M → ⨁ (i : ι), { x // x ∈ ℳ i }\nxl : Function.LeftInverse (↑(DirectSum.coeAddMonoidHom ℳ)) x\nxr : Function.RightInverse (↑(DirectSum.coeAddMonoidHom ℳ)) x\ny : M → ⨁ (i : ι), { x // x ∈ ℳ i }\nyl : Function.LeftInverse (↑(DirectSum.coeAddMonoidHom ℳ)) y\nyr : Function.RightInverse (↑(DirectSum.coeAddMonoidHom ℳ)) y\n⊢ x = y\n[PROOFSTEP]\nexact Function.LeftInverse.eq_rightInverse xr yl\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddCommMonoid M\ninst✝² : SetLike σ M\ninst✝¹ : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝ : Decomposition ℳ\np : M → Prop\nh_zero : p 0\nh_homogeneous : ∀ {i : ι} (m : { x // x ∈ ℳ i }), p ↑m\nh_add : ∀ (m m' : M), p m → p m' → p (m + m')\n⊢ ∀ (m : M), p m\n[PROOFSTEP]\nlet ℳ' : ι → AddSubmonoid M := fun i ↦\n  (⟨⟨ℳ i, fun x y ↦ AddMemClass.add_mem x y⟩, (ZeroMemClass.zero_mem _)⟩ : AddSubmonoid M)\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddCommMonoid M\ninst✝² : SetLike σ M\ninst✝¹ : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝ : Decomposition ℳ\np : M → Prop\nh_zero : p 0\nh_homogeneous : ∀ {i : ι} (m : { x // x ∈ ℳ i }), p ↑m\nh_add : ∀ (m m' : M), p m → p m' → p (m + m')\nℳ' : ι → AddSubmonoid M :=\n  fun i =>\n    { toAddSubsemigroup := { carrier := ↑(ℳ i), add_mem' := (_ : ∀ {a b : M}, a ∈ ↑(ℳ i) → b ∈ ↑(ℳ i) → a + b ∈ ℳ i) },\n      zero_mem' := (_ : 0 ∈ ℳ i) }\n⊢ ∀ (m : M), p m\n[PROOFSTEP]\nhaveI t : DirectSum.Decomposition ℳ' :=\n  { decompose' := DirectSum.decompose ℳ\n    left_inv := fun _ ↦ (decompose ℳ).left_inv _\n    right_inv := fun _ ↦ (decompose ℳ).right_inv _ }\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddCommMonoid M\ninst✝² : SetLike σ M\ninst✝¹ : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝ : Decomposition ℳ\np : M → Prop\nh_zero : p 0\nh_homogeneous : ∀ {i : ι} (m : { x // x ∈ ℳ i }), p ↑m\nh_add : ∀ (m m' : M), p m → p m' → p (m + m')\nℳ' : ι → AddSubmonoid M :=\n  fun i =>\n    { toAddSubsemigroup := { carrier := ↑(ℳ i), add_mem' := (_ : ∀ {a b : M}, a ∈ ↑(ℳ i) → b ∈ ↑(ℳ i) → a + b ∈ ℳ i) },\n      zero_mem' := (_ : 0 ∈ ℳ i) }\nt : Decomposition ℳ'\n⊢ ∀ (m : M), p m\n[PROOFSTEP]\nhave mem : ∀ m, m ∈ iSup ℳ' := fun _m ↦\n  (DirectSum.IsInternal.addSubmonoid_iSup_eq_top ℳ' (Decomposition.isInternal ℳ')).symm ▸ trivial\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddCommMonoid M\ninst✝² : SetLike σ M\ninst✝¹ : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝ : Decomposition ℳ\np : M → Prop\nh_zero : p 0\nh_homogeneous : ∀ {i : ι} (m : { x // x ∈ ℳ i }), p ↑m\nh_add : ∀ (m m' : M), p m → p m' → p (m + m')\nℳ' : ι → AddSubmonoid M :=\n  fun i =>\n    { toAddSubsemigroup := { carrier := ↑(ℳ i), add_mem' := (_ : ∀ {a b : M}, a ∈ ↑(ℳ i) → b ∈ ↑(ℳ i) → a + b ∈ ℳ i) },\n      zero_mem' := (_ : 0 ∈ ℳ i) }\nt : Decomposition ℳ'\nmem : ∀ (m : M), m ∈ iSup ℳ'\n⊢ ∀ (m : M), p m\n[PROOFSTEP]\nexact fun m ↦ @AddSubmonoid.iSup_induction _ _ _ ℳ' _ _ (mem m) (fun i m h ↦ h_homogeneous ⟨m, h⟩) h_zero h_add\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddCommMonoid M\ninst✝² : SetLike σ M\ninst✝¹ : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝ : Decomposition ℳ\ni : ι\nx : { x // x ∈ ℳ i }\n⊢ ↑(decompose ℳ) ↑x = ↑(of (fun i => { x // x ∈ ℳ i }) i) x\n[PROOFSTEP]\nrw [← decompose_symm_of _, Equiv.apply_symm_apply]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddCommMonoid M\ninst✝² : SetLike σ M\ninst✝¹ : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝ : Decomposition ℳ\nx : M\ni : ι\nhx : x ∈ ℳ i\n⊢ ↑(↑(↑(decompose ℳ) x) i) = x\n[PROOFSTEP]\nrw [decompose_of_mem _ hx, DirectSum.of_eq_same, Subtype.coe_mk]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddCommMonoid M\ninst✝² : SetLike σ M\ninst✝¹ : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝ : Decomposition ℳ\nx : M\ni j : ι\nhx : x ∈ ℳ i\nhij : i ≠ j\n⊢ ↑(↑(↑(decompose ℳ) x) j) = 0\n[PROOFSTEP]\nrw [decompose_of_mem _ hx, DirectSum.of_eq_of_ne _ _ _ _ hij, ZeroMemClass.coe_zero]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : AddCommMonoid M\ninst✝³ : SetLike σ M\ninst✝² : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝¹ : Decomposition ℳ\ninst✝ : (i : ι) → (x : { x // x ∈ ℳ i }) → Decidable (x ≠ 0)\nr : M\n⊢ ∑ i in DFinsupp.support (↑(decompose ℳ) r), ↑(↑(↑(decompose ℳ) r) i) = r\n[PROOFSTEP]\nconv_rhs => rw [← (decompose ℳ).symm_apply_apply r, ← sum_support_of (fun i ↦ ℳ i) (decompose ℳ r)]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : AddCommMonoid M\ninst✝³ : SetLike σ M\ninst✝² : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝¹ : Decomposition ℳ\ninst✝ : (i : ι) → (x : { x // x ∈ ℳ i }) → Decidable (x ≠ 0)\nr : M\n| r\n[PROOFSTEP]\nrw [← (decompose ℳ).symm_apply_apply r, ← sum_support_of (fun i ↦ ℳ i) (decompose ℳ r)]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : AddCommMonoid M\ninst✝³ : SetLike σ M\ninst✝² : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝¹ : Decomposition ℳ\ninst✝ : (i : ι) → (x : { x // x ∈ ℳ i }) → Decidable (x ≠ 0)\nr : M\n| r\n[PROOFSTEP]\nrw [← (decompose ℳ).symm_apply_apply r, ← sum_support_of (fun i ↦ ℳ i) (decompose ℳ r)]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : AddCommMonoid M\ninst✝³ : SetLike σ M\ninst✝² : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝¹ : Decomposition ℳ\ninst✝ : (i : ι) → (x : { x // x ∈ ℳ i }) → Decidable (x ≠ 0)\nr : M\n| r\n[PROOFSTEP]\nrw [← (decompose ℳ).symm_apply_apply r, ← sum_support_of (fun i ↦ ℳ i) (decompose ℳ r)]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : AddCommMonoid M\ninst✝³ : SetLike σ M\ninst✝² : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝¹ : Decomposition ℳ\ninst✝ : (i : ι) → (x : { x // x ∈ ℳ i }) → Decidable (x ≠ 0)\nr : M\n⊢ ∑ i in DFinsupp.support (↑(decompose ℳ) r), ↑(↑(↑(decompose ℳ) r) i) =\n    ↑(decompose ℳ).symm\n      (∑ i in DFinsupp.support (↑(decompose ℳ) r), ↑(of (fun i => { x // x ∈ ℳ i }) i) (↑(↑(decompose ℳ) r) i))\n[PROOFSTEP]\nrw [decompose_symm_sum]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : AddCommMonoid M\ninst✝³ : SetLike σ M\ninst✝² : AddSubmonoidClass σ M\nℳ : ι → σ\ninst✝¹ : Decomposition ℳ\ninst✝ : (i : ι) → (x : { x // x ∈ ℳ i }) → Decidable (x ≠ 0)\nr : M\n⊢ ∑ i in DFinsupp.support (↑(decompose ℳ) r), ↑(↑(↑(decompose ℳ) r) i) =\n    ∑ i in DFinsupp.support (↑(decompose ℳ) r),\n      ↑(decompose ℳ).symm (↑(of (fun i => { x // x ∈ ℳ i }) i) (↑(↑(decompose ℳ) r) i))\n[PROOFSTEP]\nsimp_rw [decompose_symm_of]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nσ : Type u_4\ninst✝² : AddCommGroup M\ninst✝¹ : SetLike σ M\ninst✝ : AddSubgroupClass σ M\nℳ : ι → σ\n⊢ AddCommGroup (⨁ (i : ι), { x // x ∈ ℳ i })\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Algebra.DirectSum.Decomposition", "llama_tokens": 4658, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7217432062975979, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.38620365556177694}}
{"text": "[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝⁴ : IsROrC K\ninst✝³ : AddCommGroup E\ninst✝² : Module K E\ninst✝¹ : Module ℝ E\ninst✝ : IsScalarTower ℝ K E\nr : ℝ\nx : E\n⊢ r • x = ↑r • x\n[PROOFSTEP]\nrw [IsROrC.ofReal_alg, smul_one_smul]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\n⊢ ↑re 1 = 1\n[PROOFSTEP]\nrw [← ofReal_one, ofReal_re]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\n⊢ ↑im 1 = 0\n[PROOFSTEP]\nrw [← ofReal_one, ofReal_im]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑re (bit1 z) = bit1 (↑re z)\n[PROOFSTEP]\nsimp only [bit1, map_add, bit0_re, one_re]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑im (bit1 z) = bit0 (↑im z)\n[PROOFSTEP]\nsimp only [bit1, map_add, bit0_im, one_im, add_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nr : ℝ\nz : K\n⊢ ↑re (↑r * z) = r * ↑re z\n[PROOFSTEP]\nsimp only [mul_re, ofReal_im, zero_mul, ofReal_re, sub_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nr : ℝ\nz : K\n⊢ ↑im (↑r * z) = r * ↑im z\n[PROOFSTEP]\nsimp only [add_zero, ofReal_im, zero_mul, ofReal_re, mul_im]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nr : ℝ\nz : K\n⊢ ↑re (r • z) = r * ↑re z\n[PROOFSTEP]\nrw [real_smul_eq_coe_mul, ofReal_mul_re]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nr : ℝ\nz : K\n⊢ ↑im (r • z) = r * ↑im z\n[PROOFSTEP]\nrw [real_smul_eq_coe_mul, ofReal_mul_im]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑im I * ↑im z = ↑im z\n[PROOFSTEP]\nrw [mul_comm, I_im]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑re (I * z) = -↑im z\n[PROOFSTEP]\nsimp only [I_re, zero_sub, I_im', zero_mul, mul_re]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nr : ℝ\n⊢ ↑(starRingEnd K) ↑r = ↑r\n[PROOFSTEP]\nrw [ext_iff]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nr : ℝ\n⊢ ↑re (↑(starRingEnd K) ↑r) = ↑re ↑r ∧ ↑im (↑(starRingEnd K) ↑r) = ↑im ↑r\n[PROOFSTEP]\nsimp only [ofReal_im, conj_im, eq_self_iff_true, conj_re, and_self_iff, neg_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\n⊢ ↑(starRingEnd K) (-I) = I\n[PROOFSTEP]\nrw [map_neg, conj_I, neg_neg]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑(starRingEnd K) (↑(↑re z) + ↑(↑im z) * I) = ↑(↑re z) - ↑(↑im z) * I\n[PROOFSTEP]\nrw [map_add, map_mul, conj_I, conj_ofReal, conj_ofReal, mul_neg, sub_eq_add_neg]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ z - ↑(starRingEnd K) z = ↑(↑re z) + ↑(↑im z) * I - (↑(↑re z) - ↑(↑im z) * I)\n[PROOFSTEP]\nrw [re_add_im, ← conj_eq_re_sub_im]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑(↑re z) + ↑(↑im z) * I - (↑(↑re z) - ↑(↑im z) * I) = 2 * ↑(↑im z) * I\n[PROOFSTEP]\nrw [add_sub_sub_cancel, ← two_mul, mul_assoc]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nr : ℝ\nz : K\n⊢ ↑(starRingEnd K) (r • z) = r • ↑(starRingEnd K) z\n[PROOFSTEP]\nrw [conj_eq_re_sub_im, conj_eq_re_sub_im, smul_re, smul_im, ofReal_mul, ofReal_mul, real_smul_eq_coe_mul r (_ - _),\n  mul_sub, mul_assoc]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ z + ↑(starRingEnd K) z = ↑(↑re z) + ↑(↑im z) * I + (↑(↑re z) - ↑(↑im z) * I)\n[PROOFSTEP]\nrw [re_add_im, conj_eq_re_sub_im]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑(↑re z) + ↑(↑im z) * I + (↑(↑re z) - ↑(↑im z) * I) = 2 * ↑(↑re z)\n[PROOFSTEP]\nrw [add_add_sub_cancel, two_mul]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑(↑re z) = (z + ↑(starRingEnd K) z) / 2\n[PROOFSTEP]\nrw [add_conj, mul_div_cancel_left (re z : K) two_ne_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑(↑im z) = I * (↑(starRingEnd K) z - z) / 2\n[PROOFSTEP]\nrw [← neg_inj, ← ofReal_neg, ← I_mul_re, re_eq_add_conj, map_mul, conj_I, ← neg_div, ← mul_neg, neg_sub, mul_sub,\n  neg_mul, sub_eq_add_neg]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ TFAE [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]\n[PROOFSTEP]\ntfae_have 1 → 4\n[GOAL]\ncase tfae_1_to_4\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑(starRingEnd K) z = z → ↑im z = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase tfae_1_to_4\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\nh : ↑(starRingEnd K) z = z\n⊢ ↑im z = 0\n[PROOFSTEP]\nrw [← @ofReal_inj K, im_eq_conj_sub, h, sub_self, mul_zero, zero_div, ofReal_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\n⊢ TFAE [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]\n[PROOFSTEP]\ntfae_have 4 → 3\n[GOAL]\ncase tfae_4_to_3\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\n⊢ ↑im z = 0 → ↑(↑re z) = z\n[PROOFSTEP]\nintro h\n[GOAL]\ncase tfae_4_to_3\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\nh : ↑im z = 0\n⊢ ↑(↑re z) = z\n[PROOFSTEP]\nconv_rhs => rw [← re_add_im z, h, ofReal_zero, zero_mul, add_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\nh : ↑im z = 0\n| z\n[PROOFSTEP]\nrw [← re_add_im z, h, ofReal_zero, zero_mul, add_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\nh : ↑im z = 0\n| z\n[PROOFSTEP]\nrw [← re_add_im z, h, ofReal_zero, zero_mul, add_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\nh : ↑im z = 0\n| z\n[PROOFSTEP]\nrw [← re_add_im z, h, ofReal_zero, zero_mul, add_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\ntfae_4_to_3 : ↑im z = 0 → ↑(↑re z) = z\n⊢ TFAE [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]\n[PROOFSTEP]\ntfae_have 3 → 2\n[GOAL]\ncase tfae_3_to_2\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\ntfae_4_to_3 : ↑im z = 0 → ↑(↑re z) = z\n⊢ ↑(↑re z) = z → ∃ r, ↑r = z\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\ntfae_4_to_3 : ↑im z = 0 → ↑(↑re z) = z\ntfae_3_to_2 : ↑(↑re z) = z → ∃ r, ↑r = z\n⊢ TFAE [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]\n[PROOFSTEP]\nexact fun h => ⟨_, h⟩\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\ntfae_4_to_3 : ↑im z = 0 → ↑(↑re z) = z\ntfae_3_to_2 : ↑(↑re z) = z → ∃ r, ↑r = z\n⊢ TFAE [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]\n[PROOFSTEP]\ntfae_have 2 → 1\n[GOAL]\ncase tfae_2_to_1\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\ntfae_4_to_3 : ↑im z = 0 → ↑(↑re z) = z\ntfae_3_to_2 : ↑(↑re z) = z → ∃ r, ↑r = z\n⊢ (∃ r, ↑r = z) → ↑(starRingEnd K) z = z\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\ntfae_4_to_3 : ↑im z = 0 → ↑(↑re z) = z\ntfae_3_to_2 : ↑(↑re z) = z → ∃ r, ↑r = z\ntfae_2_to_1 : (∃ r, ↑r = z) → ↑(starRingEnd K) z = z\n⊢ TFAE [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]\n[PROOFSTEP]\nexact fun ⟨r, hr⟩ => hr ▸ conj_ofReal _\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\ntfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0\ntfae_4_to_3 : ↑im z = 0 → ↑(↑re z) = z\ntfae_3_to_2 : ↑(↑re z) = z → ∃ r, ↑r = z\ntfae_2_to_1 : (∃ r, ↑r = z) → ↑(starRingEnd K) z = z\n⊢ TFAE [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ (∃ r, ↑r = z) ↔ ∃ r, z = ↑r\n[PROOFSTEP]\nsimp only [eq_comm]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\n⊢ (fun z => ↑re z * ↑re z + ↑im z * ↑im z) 0 = 0\n[PROOFSTEP]\nsimp only [add_zero, mul_zero, map_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\n⊢ ZeroHom.toFun\n      { toFun := fun z => ↑re z * ↑re z + ↑im z * ↑im z, map_zero' := (_ : ↑re 0 * ↑re 0 + ↑im 0 * ↑im 0 = 0) } 1 =\n    1\n[PROOFSTEP]\nsimp only [one_im, add_zero, mul_one, one_re, mul_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\n⊢ ZeroHom.toFun\n      { toFun := fun z => ↑re z * ↑re z + ↑im z * ↑im z, map_zero' := (_ : ↑re 0 * ↑re 0 + ↑im 0 * ↑im 0 = 0) }\n      (z * w) =\n    ZeroHom.toFun\n        { toFun := fun z => ↑re z * ↑re z + ↑im z * ↑im z, map_zero' := (_ : ↑re 0 * ↑re 0 + ↑im 0 * ↑im 0 = 0) } z *\n      ZeroHom.toFun\n        { toFun := fun z => ↑re z * ↑re z + ↑im z * ↑im z, map_zero' := (_ : ↑re 0 * ↑re 0 + ↑im 0 * ↑im 0 = 0) } w\n[PROOFSTEP]\nsimp only [mul_im, mul_re]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\n⊢ (↑re z * ↑re w - ↑im z * ↑im w) * (↑re z * ↑re w - ↑im z * ↑im w) +\n      (↑re z * ↑im w + ↑im z * ↑re w) * (↑re z * ↑im w + ↑im z * ↑re w) =\n    (↑re z * ↑re z + ↑im z * ↑im z) * (↑re w * ↑re w + ↑im w * ↑im w)\n[PROOFSTEP]\nring\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ 0 < ↑normSq z ↔ z ≠ 0\n[PROOFSTEP]\nrw [lt_iff_le_and_ne, Ne, eq_comm]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ 0 ≤ ↑normSq z ∧ ¬↑normSq z = 0 ↔ z ≠ 0\n[PROOFSTEP]\nsimp [normSq_nonneg]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑normSq (-z) = ↑normSq z\n[PROOFSTEP]\nsimp only [normSq_eq_def', norm_neg]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑normSq (↑(starRingEnd K) z) = ↑normSq z\n[PROOFSTEP]\nsimp only [normSq_apply, neg_mul, mul_neg, neg_neg, isROrC_simps]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\n⊢ ↑normSq (z + w) = ↑normSq z + ↑normSq w + 2 * ↑re (z * ↑(starRingEnd K) w)\n[PROOFSTEP]\nsimp only [normSq_apply, map_add, isROrC_simps]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\n⊢ (↑re z + ↑re w) * (↑re z + ↑re w) + (↑im z + ↑im w) * (↑im z + ↑im w) =\n    ↑re z * ↑re z + ↑im z * ↑im z + (↑re w * ↑re w + ↑im w * ↑im w) + 2 * (↑re z * ↑re w - ↑im z * -↑im w)\n[PROOFSTEP]\nring\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ z * ↑(starRingEnd K) z = ↑(↑normSq z)\n[PROOFSTEP]\napply ext\n[GOAL]\ncase hre\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑re (z * ↑(starRingEnd K) z) = ↑re ↑(↑normSq z)\n[PROOFSTEP]\nsimp only [normSq_apply, isROrC_simps, map_add, mul_zero]\n[GOAL]\ncase him\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑im (z * ↑(starRingEnd K) z) = ↑im ↑(↑normSq z)\n[PROOFSTEP]\nsimp only [normSq_apply, isROrC_simps, map_add, mul_zero]\n[GOAL]\ncase hre\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑re z * ↑re z - ↑im z * -↑im z = ↑re z * ↑re z - 0 + (↑im z * ↑im z - 0)\n[PROOFSTEP]\nring\n[GOAL]\ncase him\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑re z * -↑im z + ↑im z * ↑re z = 0 + 0 * ↑re z + (0 + 0 * ↑im z)\n[PROOFSTEP]\nring\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\n⊢ ↑(starRingEnd K) x * x = ↑(↑normSq x)\n[PROOFSTEP]\nrw [mul_comm, mul_conj]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\n⊢ ↑normSq (z - w) = ↑normSq z + ↑normSq w - 2 * ↑re (z * ↑(starRingEnd K) w)\n[PROOFSTEP]\nsimp only [normSq_add, sub_eq_add_neg, map_neg, mul_neg, normSq_neg, map_neg]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ Real.sqrt (↑normSq z) = ‖z‖\n[PROOFSTEP]\nrw [normSq_eq_def', Real.sqrt_sq (norm_nonneg _)]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ z⁻¹ = ↑(starRingEnd K) z * ↑(‖z‖ ^ 2)⁻¹\n[PROOFSTEP]\nrcases eq_or_ne z 0 with (rfl | h₀)\n[GOAL]\ncase inl\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\n⊢ 0⁻¹ = ↑(starRingEnd K) 0 * ↑(‖0‖ ^ 2)⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\nh₀ : z ≠ 0\n⊢ z⁻¹ = ↑(starRingEnd K) z * ↑(‖z‖ ^ 2)⁻¹\n[PROOFSTEP]\napply inv_eq_of_mul_eq_one_right\n[GOAL]\ncase inr.a\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\nh₀ : z ≠ 0\n⊢ z * (↑(starRingEnd K) z * ↑(‖z‖ ^ 2)⁻¹) = 1\n[PROOFSTEP]\nrw [← mul_assoc, mul_conj, ofReal_inv, ← normSq_eq_def', mul_inv_cancel]\n[GOAL]\ncase inr.a\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\nh₀ : z ≠ 0\n⊢ ↑(↑normSq z) ≠ 0\n[PROOFSTEP]\nrwa [ofReal_ne_zero, Ne.def, normSq_eq_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑re z⁻¹ = ↑re z / ↑normSq z\n[PROOFSTEP]\nrw [inv_def, normSq_eq_def', mul_comm, ofReal_mul_re, conj_re, div_eq_inv_mul]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑im z⁻¹ = -↑im z / ↑normSq z\n[PROOFSTEP]\nrw [inv_def, normSq_eq_def', mul_comm, ofReal_mul_im, conj_im, div_eq_inv_mul]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\n⊢ ↑re (z / w) = ↑re z * ↑re w / ↑normSq w + ↑im z * ↑im w / ↑normSq w\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, mul_assoc, sub_eq_add_neg, neg_mul, mul_neg, neg_neg, map_neg, isROrC_simps]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\n⊢ ↑im (z / w) = ↑im z * ↑re w / ↑normSq w - ↑re z * ↑im w / ↑normSq w\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, mul_assoc, sub_eq_add_neg, add_comm, neg_mul, mul_neg, map_neg, isROrC_simps]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\nr : ℝ\n⊢ ↑re (z / ↑r) = ↑re z / r\n[PROOFSTEP]\nrw [div_eq_inv_mul, div_eq_inv_mul, ← ofReal_inv, ofReal_mul_re]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\n⊢ I⁻¹ = -I\n[PROOFSTEP]\nby_cases h : (I : K) = 0\n[GOAL]\ncase pos\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nh : I = 0\n⊢ I⁻¹ = -I\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nh : ¬I = 0\n⊢ I⁻¹ = -I\n[PROOFSTEP]\nfield_simp [I_mul_I_of_nonzero h]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ z / I = -(z * I)\n[PROOFSTEP]\nrw [div_eq_mul_inv, inv_I, mul_neg]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ‖↑(starRingEnd K) z‖ = ‖z‖\n[PROOFSTEP]\nsimp only [← sqrt_normSq_eq_norm, normSq_conj]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nn : ℕ\n⊢ ↑re ↑n = ↑n\n[PROOFSTEP]\nrw [← ofReal_natCast, ofReal_re]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nn : ℕ\n⊢ ↑im ↑n = 0\n[PROOFSTEP]\nrw [← ofReal_natCast, ofReal_im]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝¹ : IsROrC K\nn : ℕ\ninst✝ : Nat.AtLeastTwo n\nz : K\n⊢ ↑re (OfNat.ofNat n * z) = OfNat.ofNat n * ↑re z\n[PROOFSTEP]\nrw [← ofReal_ofNat, ofReal_mul_re]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝¹ : IsROrC K\nn : ℕ\ninst✝ : Nat.AtLeastTwo n\nz : K\n⊢ ↑im (OfNat.ofNat n * z) = OfNat.ofNat n * ↑im z\n[PROOFSTEP]\nrw [← ofReal_ofNat, ofReal_mul_im]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nn : ℤ\n⊢ ↑re ↑n = ↑n\n[PROOFSTEP]\nrw [← ofReal_intCast, ofReal_re]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nn : ℤ\n⊢ ↑im ↑n = 0\n[PROOFSTEP]\nrw [← ofReal_intCast, ofReal_im]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nq : ℚ\n⊢ ↑re ↑q = ↑q\n[PROOFSTEP]\nrw [← ofReal_ratCast, ofReal_re]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nq : ℚ\n⊢ ↑im ↑q = 0\n[PROOFSTEP]\nrw [← ofReal_ratCast, ofReal_im]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nn : ℕ\n⊢ ‖↑n‖ = ↑n\n[PROOFSTEP]\nrw [← ofReal_natCast]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nn : ℕ\n⊢ ‖↑↑n‖ = ↑n\n[PROOFSTEP]\nexact norm_of_nonneg (Nat.cast_nonneg n)\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ‖z‖ * ‖z‖ = ↑normSq z\n[PROOFSTEP]\nrw [normSq_eq_def', sq]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ |↑re z| ≤ ‖z‖\n[PROOFSTEP]\nrw [mul_self_le_mul_self_iff (abs_nonneg _) (norm_nonneg _), abs_mul_abs_self, mul_self_norm]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑re z * ↑re z ≤ ↑normSq z\n[PROOFSTEP]\napply re_sq_le_normSq\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ |↑im z| ≤ ‖z‖\n[PROOFSTEP]\nrw [mul_self_le_mul_self_iff (abs_nonneg _) (norm_nonneg _), abs_mul_abs_self, mul_self_norm]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ ↑im z * ↑im z ≤ ↑normSq z\n[PROOFSTEP]\napply im_sq_le_normSq\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\na : K\nh : ‖a‖ ≤ ↑re a\n⊢ ↑im a = 0\n[PROOFSTEP]\nsimpa only [mul_self_norm a, normSq_apply, self_eq_add_right, mul_self_eq_zero] using\n  congr_arg (fun z => z * z) ((re_le_norm a).antisymm h)\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\na : K\nh : ‖a‖ ≤ ↑re a\n⊢ ↑(↑re a) = a\n[PROOFSTEP]\nrw [← conj_eq_iff_re, conj_eq_iff_im, im_eq_zero_of_le h]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ |↑re z / ‖z‖| ≤ 1\n[PROOFSTEP]\nrw [abs_div, abs_norm]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ |↑re z| / ‖z‖ ≤ 1\n[PROOFSTEP]\nexact div_le_one_of_le (abs_re_le_norm _) (norm_nonneg _)\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ |↑im z / ‖z‖| ≤ 1\n[PROOFSTEP]\nrw [abs_div, abs_norm]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ |↑im z| / ‖z‖ ≤ 1\n[PROOFSTEP]\nexact div_le_one_of_le (abs_im_le_norm _) (norm_nonneg _)\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nhI : I ≠ 0\n⊢ ‖I‖ = 1\n[PROOFSTEP]\nrw [← mul_self_inj_of_nonneg (norm_nonneg I) zero_le_one, one_mul, ← norm_mul, I_mul_I_of_nonzero hI, norm_neg,\n  norm_one]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\n⊢ ↑re (x * ↑(starRingEnd K) x) = ‖x * ↑(starRingEnd K) x‖\n[PROOFSTEP]\nrw [mul_conj, ofReal_re, norm_ofReal, abs_of_nonneg (normSq_nonneg _)]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\n⊢ ‖x + ↑(starRingEnd K) x‖ ^ 2 = ↑re (x + ↑(starRingEnd K) x) ^ 2\n[PROOFSTEP]\nrw [add_conj, ← ofReal_ofNat, ← ofReal_mul, norm_ofReal, sq_abs, ofReal_re]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\n⊢ ‖↑(starRingEnd K) x + x‖ ^ 2 = ↑re (↑(starRingEnd K) x + x) ^ 2\n[PROOFSTEP]\nrw [add_comm, norm_sq_re_add_conj]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nf : CauSeq K norm\nε : ℝ\nε0 : ε > 0\ni : ℕ\nH : ∀ (j : ℕ), j ≥ i → ‖↑f j - ↑f i‖ < ε\nj : ℕ\nij : j ≥ i\n⊢ |(fun n => ↑re (↑f n)) j - (fun n => ↑re (↑f n)) i| ≤ ‖↑f j - ↑f i‖\n[PROOFSTEP]\nsimpa only [map_sub] using abs_re_le_norm (f j - f i)\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nf : CauSeq K norm\nε : ℝ\nε0 : ε > 0\ni : ℕ\nH : ∀ (j : ℕ), j ≥ i → ‖↑f j - ↑f i‖ < ε\nj : ℕ\nij : j ≥ i\n⊢ |(fun n => ↑im (↑f n)) j - (fun n => ↑im (↑f n)) i| ≤ ‖↑f j - ↑f i‖\n[PROOFSTEP]\nsimpa only [map_sub] using abs_im_le_norm (f j - f i)\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\n⊢ ↑(AddMonoidHom.id ℝ) 0 = 0\n[PROOFSTEP]\nsimp only [AddMonoidHom.map_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : ℝ\n⊢ ↑(algebraMap ℝ ℝ) (↑(AddMonoidHom.id ℝ) z) + ↑(algebraMap ℝ ℝ) (↑0 z) * 0 = z\n[PROOFSTEP]\nsimp only [add_zero, mul_zero, Algebra.id.map_eq_id, RingHom.id_apply, AddMonoidHom.id_apply]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : ℝ\n⊢ ↑(AddMonoidHom.id ℝ) (z * w) = ↑(AddMonoidHom.id ℝ) z * ↑(AddMonoidHom.id ℝ) w - ↑0 z * ↑0 w\n[PROOFSTEP]\nsimp only [sub_zero, mul_zero, AddMonoidHom.zero_apply, AddMonoidHom.id_apply]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : ℝ\n⊢ ↑0 (z * w) = ↑(AddMonoidHom.id ℝ) z * ↑0 w + ↑0 z * ↑(AddMonoidHom.id ℝ) w\n[PROOFSTEP]\nsimp only [add_zero, zero_mul, mul_zero, AddMonoidHom.zero_apply]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : ℝ\n⊢ ↑(AddMonoidHom.id ℝ) (↑(starRingEnd ℝ) z) = ↑(AddMonoidHom.id ℝ) z\n[PROOFSTEP]\nsimp only [starRingEnd_apply, star_id_of_comm]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : ℝ\n⊢ ↑0 (↑(starRingEnd ℝ) z) = -↑0 z\n[PROOFSTEP]\nsimp only [neg_zero, AddMonoidHom.zero_apply]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\n⊢ ↑(starRingEnd ℝ) 0 = -0\n[PROOFSTEP]\nsimp only [RingHom.map_zero, neg_zero]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : ℝ\n⊢ ‖z‖ ^ 2 = ↑(AddMonoidHom.id ℝ) z * ↑(AddMonoidHom.id ℝ) z + ↑0 z * ↑0 z\n[PROOFSTEP]\nsimp only [sq, Real.norm_eq_abs, ← abs_mul, abs_mul_self z, add_zero, mul_zero, AddMonoidHom.zero_apply,\n  AddMonoidHom.id_apply]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : ℝ\n⊢ ↑0 z * ↑0 0 = ↑0 z\n[PROOFSTEP]\nsimp only [mul_zero, AddMonoidHom.zero_apply]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\n⊢ z < w ↔ ↑re z < ↑re w ∧ ↑im z = ↑im w\n[PROOFSTEP]\nsimp_rw [lt_iff_le_and_ne, @IsROrC.le_iff_re_im K]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\n⊢ (↑re z ≤ ↑re w ∧ ↑im z = ↑im w) ∧ z ≠ w ↔ (↑re z ≤ ↑re w ∧ ↑re z ≠ ↑re w) ∧ ↑im z = ↑im w\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\n⊢ (↑re z ≤ ↑re w ∧ ↑im z = ↑im w) ∧ z ≠ w → (↑re z ≤ ↑re w ∧ ↑re z ≠ ↑re w) ∧ ↑im z = ↑im w\n[PROOFSTEP]\nrintro ⟨⟨hr, hi⟩, heq⟩\n[GOAL]\ncase mp.intro.intro\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\nheq : z ≠ w\nhr : ↑re z ≤ ↑re w\nhi : ↑im z = ↑im w\n⊢ (↑re z ≤ ↑re w ∧ ↑re z ≠ ↑re w) ∧ ↑im z = ↑im w\n[PROOFSTEP]\nexact ⟨⟨hr, mt (fun hreq => ext hreq hi) heq⟩, hi⟩\n[GOAL]\ncase mpr\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\n⊢ (↑re z ≤ ↑re w ∧ ↑re z ≠ ↑re w) ∧ ↑im z = ↑im w → (↑re z ≤ ↑re w ∧ ↑im z = ↑im w) ∧ z ≠ w\n[PROOFSTEP]\nrintro ⟨⟨hr, hrn⟩, hi⟩\n[GOAL]\ncase mpr.intro.intro\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\nhi : ↑im z = ↑im w\nhr : ↑re z ≤ ↑re w\nhrn : ↑re z ≠ ↑re w\n⊢ (↑re z ≤ ↑re w ∧ ↑im z = ↑im w) ∧ z ≠ w\n[PROOFSTEP]\nexact ⟨⟨hr, hi⟩, ne_of_apply_ne _ hrn⟩\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ 0 ≤ z ↔ 0 ≤ ↑re z ∧ ↑im z = 0\n[PROOFSTEP]\nsimpa only [map_zero, eq_comm] using le_iff_re_im (z := 0) (w := z)\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ 0 < z ↔ 0 < ↑re z ∧ ↑im z = 0\n[PROOFSTEP]\nsimpa only [map_zero, eq_comm] using lt_iff_re_im (z := 0) (w := z)\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ z ≤ 0 ↔ ↑re z ≤ 0 ∧ ↑im z = 0\n[PROOFSTEP]\nsimpa only [map_zero] using le_iff_re_im (z := z) (w := 0)\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz : K\n⊢ z < 0 ↔ ↑re z < 0 ∧ ↑im z = 0\n[PROOFSTEP]\nsimpa only [map_zero] using lt_iff_re_im (z := z) (w := 0)\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx y : K\nhxy : x ≤ y\nz : K\n⊢ z + x ≤ z + y\n[PROOFSTEP]\nrw [IsROrC.le_iff_re_im] at *\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx y : K\nhxy : ↑re x ≤ ↑re y ∧ ↑im x = ↑im y\nz : K\n⊢ ↑re (z + x) ≤ ↑re (z + y) ∧ ↑im (z + x) = ↑im (z + y)\n[PROOFSTEP]\nsimpa [map_add, add_le_add_iff_left, add_right_inj] using hxy\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\n⊢ 0 ≤ x ↔ ∃ s, x = star s * s\n[PROOFSTEP]\nrw [IsROrC.le_iff_re_im, map_zero, map_zero, IsROrC.star_def, eq_comm]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\n⊢ 0 ≤ ↑re x ∧ ↑im x = 0 ↔ ∃ s, x = ↑(starRingEnd K) s * s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\n⊢ 0 ≤ ↑re x ∧ ↑im x = 0 → ∃ s, x = ↑(starRingEnd K) s * s\n[PROOFSTEP]\nrintro ⟨hr, hi⟩\n[GOAL]\ncase mp.intro\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\nhr : 0 ≤ ↑re x\nhi : ↑im x = 0\n⊢ ∃ s, x = ↑(starRingEnd K) s * s\n[PROOFSTEP]\nrefine ⟨Real.sqrt (IsROrC.re x), ?_⟩\n[GOAL]\ncase mp.intro\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\nhr : 0 ≤ ↑re x\nhi : ↑im x = 0\n⊢ x = ↑(starRingEnd K) ↑(Real.sqrt (↑re x)) * ↑(Real.sqrt (↑re x))\n[PROOFSTEP]\nhave := (IsROrC.is_real_TFAE x).out 2 3\n[GOAL]\ncase mp.intro\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\nhr : 0 ≤ ↑re x\nhi : ↑im x = 0\nthis : ↑(↑re x) = x ↔ ↑im x = 0\n⊢ x = ↑(starRingEnd K) ↑(Real.sqrt (↑re x)) * ↑(Real.sqrt (↑re x))\n[PROOFSTEP]\nrw [IsROrC.conj_ofReal, ← IsROrC.ofReal_mul, Real.mul_self_sqrt hr, eq_comm, this, hi]\n[GOAL]\ncase mpr\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\n⊢ (∃ s, x = ↑(starRingEnd K) s * s) → 0 ≤ ↑re x ∧ ↑im x = 0\n[PROOFSTEP]\nrintro ⟨s, rfl⟩\n[GOAL]\ncase mpr.intro\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\ns : K\n⊢ 0 ≤ ↑re (↑(starRingEnd K) s * s) ∧ ↑im (↑(starRingEnd K) s * s) = 0\n[PROOFSTEP]\nsimp only [IsROrC.star_def, IsROrC.conj_mul]\n[GOAL]\ncase mpr.intro\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\ns : K\n⊢ 0 ≤ ↑re ↑(↑normSq s) ∧ ↑im ↑(↑normSq s) = 0\n[PROOFSTEP]\nrw [IsROrC.ofReal_re, IsROrC.ofReal_im, eq_self, and_true]\n[GOAL]\ncase mpr.intro\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\ns : K\n⊢ 0 ≤ ↑normSq s\n[PROOFSTEP]\napply IsROrC.normSq_nonneg\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\n⊢ 0 ≤ 1\n[PROOFSTEP]\nsimp [@IsROrC.le_iff_re_im K]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\nhz : 0 < z\nhw : 0 < w\n⊢ 0 < z * w\n[PROOFSTEP]\nrw [lt_iff_re_im, map_zero] at hz hw ⊢\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nz w : K\nhz : 0 < ↑re z ∧ ↑im 0 = ↑im z\nhw : 0 < ↑re w ∧ ↑im 0 = ↑im w\n⊢ 0 < ↑re (z * w) ∧ ↑im 0 = ↑im (z * w)\n[PROOFSTEP]\nsimp [mul_re, mul_im, ← hz.2, ← hw.2, mul_pos hz.1 hw.1]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\n⊢ ∀ (a b : K), a * b = b * a\n[PROOFSTEP]\nintros\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\na✝ b✝ : K\n⊢ a✝ * b✝ = b✝ * a✝\n[PROOFSTEP]\napply ext\n[GOAL]\ncase hre\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\na✝ b✝ : K\n⊢ ↑re (a✝ * b✝) = ↑re (b✝ * a✝)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase him\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\na✝ b✝ : K\n⊢ ↑im (a✝ * b✝) = ↑im (b✝ * a✝)\n[PROOFSTEP]\nring_nf\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\na b : K\nr : ℝ\nhab : a < b\nhr : 0 < r\n⊢ r • a ≤ r • b\n[PROOFSTEP]\nreplace hab := hab.le\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\na b : K\nr : ℝ\nhr : 0 < r\nhab : a ≤ b\n⊢ r • a ≤ r • b\n[PROOFSTEP]\nrw [IsROrC.le_iff_re_im] at hab \n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\na b : K\nr : ℝ\nhr : 0 < r\nhab : ↑re a ≤ ↑re b ∧ ↑im a = ↑im b\n⊢ r • a ≤ r • b\n[PROOFSTEP]\nrw [IsROrC.le_iff_re_im, smul_re, smul_re, smul_im, smul_im]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\na b : K\nr : ℝ\nhr : 0 < r\nhab : ↑re a ≤ ↑re b ∧ ↑im a = ↑im b\n⊢ r * ↑re a ≤ r * ↑re b ∧ r * ↑im a = r * ↑im b\n[PROOFSTEP]\nexact hab.imp (fun h => mul_le_mul_of_nonneg_left h hr.le) (congr_arg _)\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : ℝ\n⊢ ↑normSq x = x * x\n[PROOFSTEP]\nsimp [IsROrC.normSq]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\n⊢ ‖↑reLm x‖ ≤ 1 * ‖x‖\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\n⊢ ‖↑reLm x‖ ≤ ‖x‖\n[PROOFSTEP]\nexact abs_re_le_norm x\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\n⊢ ‖↑imLm x‖ ≤ 1 * ‖x‖\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nK : Type u_1\nE : Type u_2\ninst✝ : IsROrC K\nx : K\n⊢ ‖↑imLm x‖ ≤ ‖x‖\n[PROOFSTEP]\nexact abs_im_le_norm x\n", "meta": {"mathlib_filename": "Mathlib.Data.IsROrC.Basic", "llama_tokens": 15023, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7718434978390747, "lm_q2_score": 0.5, "lm_q1q2_score": 0.38592174891953734}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : PseudoEMetricSpace β\nf g : α →ᵈ β\nh : f.toFun = g.toFun\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : PseudoEMetricSpace β\ng : α →ᵈ β\ntoFun✝ : α → β\nedist_eq'✝ : ∃ r, r ≠ 0 ∧ ∀ (x y : α), edist (toFun✝ x) (toFun✝ y) = ↑r * edist x y\nh : { toFun := toFun✝, edist_eq' := edist_eq'✝ }.toFun = g.toFun\n⊢ { toFun := toFun✝, edist_eq' := edist_eq'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : PseudoEMetricSpace β\ntoFun✝¹ : α → β\nedist_eq'✝¹ : ∃ r, r ≠ 0 ∧ ∀ (x y : α), edist (toFun✝¹ x) (toFun✝¹ y) = ↑r * edist x y\ntoFun✝ : α → β\nedist_eq'✝ : ∃ r, r ≠ 0 ∧ ∀ (x y : α), edist (toFun✝ x) (toFun✝ y) = ↑r * edist x y\nh : { toFun := toFun✝¹, edist_eq' := edist_eq'✝¹ }.toFun = { toFun := toFun✝, edist_eq' := edist_eq'✝ }.toFun\n⊢ { toFun := toFun✝¹, edist_eq' := edist_eq'✝¹ } = { toFun := toFun✝, edist_eq' := edist_eq'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝³ : PseudoEMetricSpace α\ninst✝² : PseudoEMetricSpace β\ninst✝¹ : Subsingleton α\ninst✝ : DilationClass F α β\nf : F\nx y : α\n⊢ edist x y = 0 ∨ edist x y = ⊤\n[PROOFSTEP]\nsimp [Subsingleton.elim x y]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\n⊢ ratio f ≠ 0\n[PROOFSTEP]\nrw [ratio]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\n⊢ (if ∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤ then 1\n    else Exists.choose (_ : ∃ r, r ≠ 0 ∧ ∀ (x y : α), edist (↑f x) (↑f y) = ↑r * edist x y)) ≠\n    0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nh✝ : ∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nh✝ : ¬∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤\n⊢ Exists.choose (_ : ∃ r, r ≠ 0 ∧ ∀ (x y : α), edist (↑f x) (↑f y) = ↑r * edist x y) ≠ 0\n[PROOFSTEP]\nexact (DilationClass.edist_eq' f).choose_spec.1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\n⊢ edist (↑f x) (↑f y) = ↑(ratio f) * edist x y\n[PROOFSTEP]\nrw [ratio]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\n⊢ edist (↑f x) (↑f y) =\n    ↑(if ∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤ then 1\n        else Exists.choose (_ : ∃ r, r ≠ 0 ∧ ∀ (x y : α), edist (↑f x) (↑f y) = ↑r * edist x y)) *\n      edist x y\n[PROOFSTEP]\nsplit_ifs with key\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\nkey : ∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤\n⊢ edist (↑f x) (↑f y) = ↑1 * edist x y\n[PROOFSTEP]\nrcases DilationClass.edist_eq' f with ⟨r, hne, hr⟩\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\nkey : ∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤\nr : ℝ≥0\nhne : r ≠ 0\nhr : ∀ (x y : α), edist (↑f x) (↑f y) = ↑r * edist x y\n⊢ edist (↑f x) (↑f y) = ↑1 * edist x y\n[PROOFSTEP]\nreplace hr := hr x y\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\nkey : ∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤\nr : ℝ≥0\nhne : r ≠ 0\nhr : edist (↑f x) (↑f y) = ↑r * edist x y\n⊢ edist (↑f x) (↑f y) = ↑1 * edist x y\n[PROOFSTEP]\ncases' key x y with h h\n[GOAL]\ncase pos.intro.intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\nkey : ∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤\nr : ℝ≥0\nhne : r ≠ 0\nhr : edist (↑f x) (↑f y) = ↑r * edist x y\nh : edist x y = 0\n⊢ edist (↑f x) (↑f y) = ↑1 * edist x y\n[PROOFSTEP]\nsimp only [hr, h, mul_zero]\n[GOAL]\ncase pos.intro.intro.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\nkey : ∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤\nr : ℝ≥0\nhne : r ≠ 0\nhr : edist (↑f x) (↑f y) = ↑r * edist x y\nh : edist x y = ⊤\n⊢ edist (↑f x) (↑f y) = ↑1 * edist x y\n[PROOFSTEP]\nsimp [hr, h, hne]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\nkey : ¬∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤\n⊢ edist (↑f x) (↑f y) =\n    ↑(Exists.choose (_ : ∃ r, r ≠ 0 ∧ ∀ (x y : α), edist (↑f x) (↑f y) = ↑r * edist x y)) * edist x y\n[PROOFSTEP]\nexact (DilationClass.edist_eq' f).choose_spec.2 x y\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nF✝ : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α✝\ninst✝³ : PseudoEMetricSpace β✝\nα : Type u_6\nβ : Type u_7\nF : Type u_8\ninst✝² : PseudoMetricSpace α\ninst✝¹ : PseudoMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\n⊢ nndist (↑f x) (↑f y) = ratio f * nndist x y\n[PROOFSTEP]\nsimp only [← ENNReal.coe_eq_coe, ← edist_nndist, ENNReal.coe_mul, edist_eq]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nF✝ : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α✝\ninst✝³ : PseudoEMetricSpace β✝\nα : Type u_6\nβ : Type u_7\nF : Type u_8\ninst✝² : PseudoMetricSpace α\ninst✝¹ : PseudoMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\n⊢ dist (↑f x) (↑f y) = ↑(ratio f) * dist x y\n[PROOFSTEP]\nsimp only [dist_nndist, nndist_eq, NNReal.coe_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoEMetricSpace α\ninst✝¹ : PseudoEMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\nr : ℝ≥0\nh₀ : edist x y ≠ 0\nhtop : edist x y ≠ ⊤\nhr : edist (↑f x) (↑f y) = ↑r * edist x y\n⊢ r = ratio f\n[PROOFSTEP]\nsimpa only [hr, ENNReal.mul_eq_mul_right h₀ htop, ENNReal.coe_eq_coe] using edist_eq f x y\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nF✝ : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α✝\ninst✝³ : PseudoEMetricSpace β✝\nα : Type u_6\nβ : Type u_7\nF : Type u_8\ninst✝² : PseudoMetricSpace α\ninst✝¹ : PseudoMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\nr : ℝ≥0\nhxy : nndist x y ≠ 0\nhr : nndist (↑f x) (↑f y) = r * nndist x y\n⊢ edist x y ≠ 0\n[PROOFSTEP]\nrwa [edist_nndist, ENNReal.coe_ne_zero]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nF✝ : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α✝\ninst✝³ : PseudoEMetricSpace β✝\nα : Type u_6\nβ : Type u_7\nF : Type u_8\ninst✝² : PseudoMetricSpace α\ninst✝¹ : PseudoMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\nr : ℝ≥0\nhxy : nndist x y ≠ 0\nhr : nndist (↑f x) (↑f y) = r * nndist x y\n⊢ edist (↑f x) (↑f y) = ↑r * edist x y\n[PROOFSTEP]\nrw [edist_nndist, edist_nndist, hr, ENNReal.coe_mul]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nF✝ : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α✝\ninst✝³ : PseudoEMetricSpace β✝\nα : Type u_7\nβ : Type u_8\nF : Type u_6\ninst✝² : PseudoMetricSpace α\ninst✝¹ : PseudoMetricSpace β\ninst✝ : DilationClass F α β\nf : F\nx y : α\nr : ℝ≥0\nhxy : dist x y ≠ 0\nhr : dist (↑f x) (↑f y) = ↑r * dist x y\n⊢ ↑(nndist (↑f x) (↑f y)) = ↑(r * nndist x y)\n[PROOFSTEP]\nrw [coe_nndist, hr, NNReal.coe_mul, coe_nndist]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝³ : PseudoEMetricSpace α✝\ninst✝² : PseudoEMetricSpace β✝\nα : Type ?u.24367\nβ : Type ?u.24370\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nf : α → β\nh : ∃ r, r ≠ 0 ∧ ∀ (x y : α), nndist (f x) (f y) = r * nndist x y\n⊢ ∃ r, r ≠ 0 ∧ ∀ (x y : α), edist (f x) (f y) = ↑r * edist x y\n[PROOFSTEP]\nrcases h with ⟨r, hne, h⟩\n[GOAL]\ncase intro.intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝³ : PseudoEMetricSpace α✝\ninst✝² : PseudoEMetricSpace β✝\nα : Type ?u.24367\nβ : Type ?u.24370\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nf : α → β\nr : ℝ≥0\nhne : r ≠ 0\nh : ∀ (x y : α), nndist (f x) (f y) = r * nndist x y\n⊢ ∃ r, r ≠ 0 ∧ ∀ (x y : α), edist (f x) (f y) = ↑r * edist x y\n[PROOFSTEP]\nrefine' ⟨r, hne, fun x y => _⟩\n[GOAL]\ncase intro.intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝³ : PseudoEMetricSpace α✝\ninst✝² : PseudoEMetricSpace β✝\nα : Type ?u.24367\nβ : Type ?u.24370\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nf : α → β\nr : ℝ≥0\nhne : r ≠ 0\nh : ∀ (x y : α), nndist (f x) (f y) = r * nndist x y\nx y : α\n⊢ edist (f x) (f y) = ↑r * edist x y\n[PROOFSTEP]\nrw [edist_nndist, edist_nndist, ← ENNReal.coe_mul, h x y]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝³ : PseudoEMetricSpace α✝\ninst✝² : PseudoEMetricSpace β✝\nα : Type ?u.25376\nβ : Type ?u.25379\ninst✝¹ : PseudoMetricSpace α\ninst✝ : PseudoMetricSpace β\nf : α → β\nh : ∃ r, r ≠ 0 ∧ ∀ (x y : α), dist (f x) (f y) = ↑r * dist x y\nr : ℝ≥0\nhr : r ≠ 0 ∧ ∀ (x y : α), dist (f x) (f y) = ↑r * dist x y\nx y : α\n⊢ ↑(nndist (f x) (f y)) = ↑(r * nndist x y)\n[PROOFSTEP]\nrw [coe_nndist, hr.2, NNReal.coe_mul, coe_nndist]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx✝ y✝ z : α\ns : Set α\nx y : α\n⊢ edist x y ≤ ↑(ratio f)⁻¹ * edist (↑f x) (↑f y)\n[PROOFSTEP]\nhave hr : ratio f ≠ 0 := ratio_ne_zero f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx✝ y✝ z : α\ns : Set α\nx y : α\nhr : ratio f ≠ 0\n⊢ edist x y ≤ ↑(ratio f)⁻¹ * edist (↑f x) (↑f y)\n[PROOFSTEP]\nexact_mod_cast (ENNReal.mul_le_iff_le_inv (ENNReal.coe_ne_zero.2 hr) ENNReal.coe_ne_top).1 (edist_eq f x y).ge\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁵ : PseudoEMetricSpace α✝\ninst✝⁴ : PseudoEMetricSpace β\ninst✝³ : PseudoEMetricSpace γ\ninst✝² : DilationClass F α✝ β\ninst✝¹ : DilationClass G β γ\nf : F\ng : G\nx✝ y✝ z : α✝\ns : Set α✝\nα : Type ?u.28806\ninst✝ : PseudoEMetricSpace α\nx y : α\n⊢ edist (id x) (id y) = ↑1 * edist x y\n[PROOFSTEP]\nsimp only [id.def, ENNReal.coe_one, one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx y z : α\ns : Set α\n⊢ ratio (Dilation.id α) = 1\n[PROOFSTEP]\nby_cases h : ∀ x y : α, edist x y = 0 ∨ edist x y = ∞\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx y z : α\ns : Set α\nh : ∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤\n⊢ ratio (Dilation.id α) = 1\n[PROOFSTEP]\nrw [ratio, if_pos h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx y z : α\ns : Set α\nh : ¬∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤\n⊢ ratio (Dilation.id α) = 1\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx y z : α\ns : Set α\nh : ∃ x y, edist x y ≠ 0 ∧ edist x y ≠ ⊤\n⊢ ratio (Dilation.id α) = 1\n[PROOFSTEP]\nrcases h with ⟨x, y, hne⟩\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx✝ y✝ z : α\ns : Set α\nx y : α\nhne : edist x y ≠ 0 ∧ edist x y ≠ ⊤\n⊢ ratio (Dilation.id α) = 1\n[PROOFSTEP]\nrefine' (ratio_unique hne.1 hne.2 _).symm\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx✝ y✝ z : α\ns : Set α\nx y : α\nhne : edist x y ≠ 0 ∧ edist x y ≠ ⊤\n⊢ edist (↑(Dilation.id α) x) (↑(Dilation.id α) y) = ↑1 * edist x y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf✝ : F\ng✝ : G\nx✝ y✝ z : α\ns : Set α\ng : β →ᵈ γ\nf : α →ᵈ β\nx y : α\n⊢ edist ((↑g ∘ ↑f) x) ((↑g ∘ ↑f) y) = ↑(ratio g * ratio f) * edist x y\n[PROOFSTEP]\nsimp_rw [Function.comp, edist_eq, ENNReal.coe_mul, mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf✝ : F\ng✝ : G\nx y z : α\ns : Set α\ng : β →ᵈ γ\nf : α →ᵈ β\nhne : ∃ x y, edist x y ≠ 0 ∧ edist x y ≠ ⊤\n⊢ ratio (comp g f) = ratio g * ratio f\n[PROOFSTEP]\nrcases hne with ⟨x, y, hα⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf✝ : F\ng✝ : G\nx✝ y✝ z : α\ns : Set α\ng : β →ᵈ γ\nf : α →ᵈ β\nx y : α\nhα : edist x y ≠ 0 ∧ edist x y ≠ ⊤\n⊢ ratio (comp g f) = ratio g * ratio f\n[PROOFSTEP]\nhave hgf := (edist_eq (g.comp f) x y).symm\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf✝ : F\ng✝ : G\nx✝ y✝ z : α\ns : Set α\ng : β →ᵈ γ\nf : α →ᵈ β\nx y : α\nhα : edist x y ≠ 0 ∧ edist x y ≠ ⊤\nhgf : ↑(ratio (comp g f)) * edist x y = edist (↑(comp g f) x) (↑(comp g f) y)\n⊢ ratio (comp g f) = ratio g * ratio f\n[PROOFSTEP]\nsimp_rw [coe_comp, Function.comp, edist_eq, ← mul_assoc, ENNReal.mul_eq_mul_right hα.1 hα.2] at hgf \n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf✝ : F\ng✝ : G\nx✝ y✝ z : α\ns : Set α\ng : β →ᵈ γ\nf : α →ᵈ β\nx y : α\nhα : edist x y ≠ 0 ∧ edist x y ≠ ⊤\nhgf : ↑(ratio (comp g f)) = ↑(ratio g) * ↑(ratio f)\n⊢ ratio (comp g f) = ratio g * ratio f\n[PROOFSTEP]\nrwa [← ENNReal.coe_eq_coe, ENNReal.coe_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf✝ : F\ng✝ : G\nx y z : α\ns : Set α\nf g : α →ᵈ α\n⊢ ratio (f * g) = ratio f * ratio g\n[PROOFSTEP]\nby_cases h : ∀ x y : α, edist x y = 0 ∨ edist x y = ∞\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf✝ : F\ng✝ : G\nx y z : α\ns : Set α\nf g : α →ᵈ α\nh : ∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤\n⊢ ratio (f * g) = ratio f * ratio g\n[PROOFSTEP]\nsimp [ratio_of_trivial, h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf✝ : F\ng✝ : G\nx y z : α\ns : Set α\nf g : α →ᵈ α\nh : ¬∀ (x y : α), edist x y = 0 ∨ edist x y = ⊤\n⊢ ratio (f * g) = ratio f * ratio g\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf✝ : F\ng✝ : G\nx y z : α\ns : Set α\nf g : α →ᵈ α\nh : ∃ x y, edist x y ≠ 0 ∧ edist x y ≠ ⊤\n⊢ ratio (f * g) = ratio f * ratio g\n[PROOFSTEP]\nexact ratio_comp' h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng✝ : G\nx✝ y z : α\ns : Set α\ng : β →ᵈ γ\nf₁ f₂ : α →ᵈ β\nhg : Injective ↑g\nh : comp g f₁ = comp g f₂\nx : α\n⊢ ↑g (↑f₁ x) = ↑g (↑f₂ x)\n[PROOFSTEP]\nrw [← comp_apply, h, comp_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx y z : α\ns✝ s : Set α\n⊢ EMetric.diam (↑f '' s) = ↑(ratio f) * EMetric.diam s\n[PROOFSTEP]\nrefine' ((lipschitz f).ediam_image_le s).antisymm _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx y z : α\ns✝ s : Set α\n⊢ ↑(ratio f) * EMetric.diam s ≤ EMetric.diam (↑f '' s)\n[PROOFSTEP]\napply ENNReal.mul_le_of_le_div'\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx y z : α\ns✝ s : Set α\n⊢ EMetric.diam s ≤ EMetric.diam (↑f '' s) / ↑(ratio f)\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_comm, ← ENNReal.coe_inv]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx y z : α\ns✝ s : Set α\n⊢ EMetric.diam s ≤ ↑(ratio f)⁻¹ * EMetric.diam (↑f '' s)\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx y z : α\ns✝ s : Set α\n⊢ ratio f ≠ 0\n[PROOFSTEP]\nexacts [(antilipschitz f).le_mul_ediam_image s, ratio_ne_zero f]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx y z : α\ns : Set α\n⊢ EMetric.diam (range ↑f) = ↑(ratio f) * EMetric.diam univ\n[PROOFSTEP]\nrw [← image_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx y z : α\ns : Set α\n⊢ EMetric.diam (↑f '' univ) = ↑(ratio f) * EMetric.diam univ\n[PROOFSTEP]\nexact ediam_image f univ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : PseudoEMetricSpace α\ninst✝³ : PseudoEMetricSpace β\ninst✝² : PseudoEMetricSpace γ\ninst✝¹ : DilationClass F α β\ninst✝ : DilationClass G β γ\nf : F\ng : G\nx✝ y✝ z : α\ns : Set α\nx : α\nr' : ℝ≥0∞\ny : α\nhy : y ∈ EMetric.closedBall x r'\n⊢ edist y x ≤ r'\n[PROOFSTEP]\nexact hy\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoMetricSpace α\ninst✝¹ : PseudoMetricSpace β\ninst✝ : DilationClass F α β\nf : F\ns : Set α\n⊢ Metric.diam (↑f '' s) = ↑(ratio f) * Metric.diam s\n[PROOFSTEP]\nsimp [Metric.diam, ediam_image, ENNReal.toReal_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝² : PseudoMetricSpace α\ninst✝¹ : PseudoMetricSpace β\ninst✝ : DilationClass F α β\nf : F\n⊢ Metric.diam (range ↑f) = ↑(ratio f) * Metric.diam univ\n[PROOFSTEP]\nrw [← image_univ, diam_image]\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.Dilation", "llama_tokens": 11404, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850154599563, "lm_q2_score": 0.546738151984614, "lm_q1q2_score": 0.3858795950510087}}
{"text": "[GOAL]\nι : Type u_1\ninst✝ : LinearOrder ι\ni : ι\n⊢ i ≤ succFn i\n[PROOFSTEP]\nrw [le_isGLB_iff (succFn_spec i), mem_lowerBounds]\n[GOAL]\nι : Type u_1\ninst✝ : LinearOrder ι\ni : ι\n⊢ ∀ (x : ι), x ∈ Set.Ioi i → i ≤ x\n[PROOFSTEP]\nexact fun x hx ↦ le_of_lt hx\n[GOAL]\nι : Type u_1\ninst✝ : LinearOrder ι\ni j k : ι\nhij_lt : i < j\nh : IsGLB (Set.Ioi i) k\n⊢ IsGLB (Set.Ioc i j) k\n[PROOFSTEP]\nsimp_rw [IsGLB, IsGreatest, mem_upperBounds, mem_lowerBounds] at h ⊢\n[GOAL]\nι : Type u_1\ninst✝ : LinearOrder ι\ni j k : ι\nhij_lt : i < j\nh : (∀ (x : ι), x ∈ Set.Ioi i → k ≤ x) ∧ ∀ (x : ι), (∀ (x_1 : ι), x_1 ∈ Set.Ioi i → x ≤ x_1) → x ≤ k\n⊢ (∀ (x : ι), x ∈ Set.Ioc i j → k ≤ x) ∧ ∀ (x : ι), (∀ (x_1 : ι), x_1 ∈ Set.Ioc i j → x ≤ x_1) → x ≤ k\n[PROOFSTEP]\nrefine' ⟨fun x hx ↦ h.1 x hx.1, fun x hx ↦ h.2 x _⟩\n[GOAL]\nι : Type u_1\ninst✝ : LinearOrder ι\ni j k : ι\nhij_lt : i < j\nh : (∀ (x : ι), x ∈ Set.Ioi i → k ≤ x) ∧ ∀ (x : ι), (∀ (x_1 : ι), x_1 ∈ Set.Ioi i → x ≤ x_1) → x ≤ k\nx : ι\nhx : ∀ (x_1 : ι), x_1 ∈ Set.Ioc i j → x ≤ x_1\n⊢ ∀ (x_1 : ι), x_1 ∈ Set.Ioi i → x ≤ x_1\n[PROOFSTEP]\nintro y hy\n[GOAL]\nι : Type u_1\ninst✝ : LinearOrder ι\ni j k : ι\nhij_lt : i < j\nh : (∀ (x : ι), x ∈ Set.Ioi i → k ≤ x) ∧ ∀ (x : ι), (∀ (x_1 : ι), x_1 ∈ Set.Ioi i → x ≤ x_1) → x ≤ k\nx : ι\nhx : ∀ (x_1 : ι), x_1 ∈ Set.Ioc i j → x ≤ x_1\ny : ι\nhy : y ∈ Set.Ioi i\n⊢ x ≤ y\n[PROOFSTEP]\ncases' le_or_lt y j with h_le h_lt\n[GOAL]\ncase inl\nι : Type u_1\ninst✝ : LinearOrder ι\ni j k : ι\nhij_lt : i < j\nh : (∀ (x : ι), x ∈ Set.Ioi i → k ≤ x) ∧ ∀ (x : ι), (∀ (x_1 : ι), x_1 ∈ Set.Ioi i → x ≤ x_1) → x ≤ k\nx : ι\nhx : ∀ (x_1 : ι), x_1 ∈ Set.Ioc i j → x ≤ x_1\ny : ι\nhy : y ∈ Set.Ioi i\nh_le : y ≤ j\n⊢ x ≤ y\n[PROOFSTEP]\nexact hx y ⟨hy, h_le⟩\n[GOAL]\ncase inr\nι : Type u_1\ninst✝ : LinearOrder ι\ni j k : ι\nhij_lt : i < j\nh : (∀ (x : ι), x ∈ Set.Ioi i → k ≤ x) ∧ ∀ (x : ι), (∀ (x_1 : ι), x_1 ∈ Set.Ioi i → x ≤ x_1) → x ≤ k\nx : ι\nhx : ∀ (x_1 : ι), x_1 ∈ Set.Ioc i j → x ≤ x_1\ny : ι\nhy : y ∈ Set.Ioi i\nh_lt : j < y\n⊢ x ≤ y\n[PROOFSTEP]\nexact le_trans (hx j ⟨hij_lt, le_rfl⟩) h_lt.le\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni : ι\nhi : succFn i ≤ i\n⊢ IsMax i\n[PROOFSTEP]\nrefine' fun j _ ↦ not_lt.mp fun hij_lt ↦ _\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni : ι\nhi : succFn i ≤ i\nj : ι\nx✝ : i ≤ j\nhij_lt : i < j\n⊢ False\n[PROOFSTEP]\nhave h_succFn_eq : succFn i = i := le_antisymm hi (le_succFn i)\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni : ι\nhi : succFn i ≤ i\nj : ι\nx✝ : i ≤ j\nhij_lt : i < j\nh_succFn_eq : succFn i = i\n⊢ False\n[PROOFSTEP]\nhave h_glb : IsGLB (Finset.Ioc i j : Set ι) i := by\n  rw [Finset.coe_Ioc]\n  have h := succFn_spec i\n  rw [h_succFn_eq] at h \n  exact isGLB_Ioc_of_isGLB_Ioi hij_lt h\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni : ι\nhi : succFn i ≤ i\nj : ι\nx✝ : i ≤ j\nhij_lt : i < j\nh_succFn_eq : succFn i = i\n⊢ IsGLB (↑(Finset.Ioc i j)) i\n[PROOFSTEP]\nrw [Finset.coe_Ioc]\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni : ι\nhi : succFn i ≤ i\nj : ι\nx✝ : i ≤ j\nhij_lt : i < j\nh_succFn_eq : succFn i = i\n⊢ IsGLB (Set.Ioc i j) i\n[PROOFSTEP]\nhave h := succFn_spec i\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni : ι\nhi : succFn i ≤ i\nj : ι\nx✝ : i ≤ j\nhij_lt : i < j\nh_succFn_eq : succFn i = i\nh : IsGLB (Set.Ioi i) (succFn i)\n⊢ IsGLB (Set.Ioc i j) i\n[PROOFSTEP]\nrw [h_succFn_eq] at h \n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni : ι\nhi : succFn i ≤ i\nj : ι\nx✝ : i ≤ j\nhij_lt : i < j\nh_succFn_eq : succFn i = i\nh : IsGLB (Set.Ioi i) i\n⊢ IsGLB (Set.Ioc i j) i\n[PROOFSTEP]\nexact isGLB_Ioc_of_isGLB_Ioi hij_lt h\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni : ι\nhi : succFn i ≤ i\nj : ι\nx✝ : i ≤ j\nhij_lt : i < j\nh_succFn_eq : succFn i = i\nh_glb : IsGLB (↑(Finset.Ioc i j)) i\n⊢ False\n[PROOFSTEP]\nhave hi_mem : i ∈ Finset.Ioc i j := by\n  refine' Finset.isGLB_mem _ h_glb _\n  exact ⟨_, Finset.mem_Ioc.mpr ⟨hij_lt, le_rfl⟩⟩\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni : ι\nhi : succFn i ≤ i\nj : ι\nx✝ : i ≤ j\nhij_lt : i < j\nh_succFn_eq : succFn i = i\nh_glb : IsGLB (↑(Finset.Ioc i j)) i\n⊢ i ∈ Finset.Ioc i j\n[PROOFSTEP]\nrefine' Finset.isGLB_mem _ h_glb _\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni : ι\nhi : succFn i ≤ i\nj : ι\nx✝ : i ≤ j\nhij_lt : i < j\nh_succFn_eq : succFn i = i\nh_glb : IsGLB (↑(Finset.Ioc i j)) i\n⊢ Finset.Nonempty (Finset.Ioc i j)\n[PROOFSTEP]\nexact ⟨_, Finset.mem_Ioc.mpr ⟨hij_lt, le_rfl⟩⟩\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni : ι\nhi : succFn i ≤ i\nj : ι\nx✝ : i ≤ j\nhij_lt : i < j\nh_succFn_eq : succFn i = i\nh_glb : IsGLB (↑(Finset.Ioc i j)) i\nhi_mem : i ∈ Finset.Ioc i j\n⊢ False\n[PROOFSTEP]\nrw [Finset.mem_Ioc] at hi_mem \n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni : ι\nhi : succFn i ≤ i\nj : ι\nx✝ : i ≤ j\nhij_lt : i < j\nh_succFn_eq : succFn i = i\nh_glb : IsGLB (↑(Finset.Ioc i j)) i\nhi_mem : i < i ∧ i ≤ j\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl i hi_mem.1\n[GOAL]\nι : Type u_1\ninst✝ : LinearOrder ι\ni j : ι\nhij : i < j\n⊢ succFn i ≤ j\n[PROOFSTEP]\nhave h := succFn_spec i\n[GOAL]\nι : Type u_1\ninst✝ : LinearOrder ι\ni j : ι\nhij : i < j\nh : IsGLB (Set.Ioi i) (succFn i)\n⊢ succFn i ≤ j\n[PROOFSTEP]\nrw [IsGLB, IsGreatest, mem_lowerBounds] at h \n[GOAL]\nι : Type u_1\ninst✝ : LinearOrder ι\ni j : ι\nhij : i < j\nh : (∀ (x : ι), x ∈ Set.Ioi i → succFn i ≤ x) ∧ succFn i ∈ upperBounds (lowerBounds (Set.Ioi i))\n⊢ succFn i ≤ j\n[PROOFSTEP]\nexact h.1 j hij\n[GOAL]\nι : Type u_1\ninst✝ : LinearOrder ι\nj i : ι\nhij : j < succFn i\n⊢ j ≤ i\n[PROOFSTEP]\nrw [lt_isGLB_iff (succFn_spec i)] at hij \n[GOAL]\nι : Type u_1\ninst✝ : LinearOrder ι\nj i : ι\nhij : ∃ c, c ∈ lowerBounds (Set.Ioi i) ∧ j < c\n⊢ j ≤ i\n[PROOFSTEP]\nobtain ⟨k, hk_lb, hk⟩ := hij\n[GOAL]\ncase intro.intro\nι : Type u_1\ninst✝ : LinearOrder ι\nj i k : ι\nhk_lb : k ∈ lowerBounds (Set.Ioi i)\nhk : j < k\n⊢ j ≤ i\n[PROOFSTEP]\nrw [mem_lowerBounds] at hk_lb \n[GOAL]\ncase intro.intro\nι : Type u_1\ninst✝ : LinearOrder ι\nj i k : ι\nhk_lb : ∀ (x : ι), x ∈ Set.Ioi i → k ≤ x\nhk : j < k\n⊢ j ≤ i\n[PROOFSTEP]\nexact not_lt.mp fun hi_lt_j ↦ not_le.mpr hk (hk_lb j hi_lt_j)\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\n⊢ ∀ {a b : ι}, a ≤ b → ∃ n, succ^[n] a = b\n[PROOFSTEP]\nintro i j hij\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i ≤ j\n⊢ ∃ n, succ^[n] i = j\n[PROOFSTEP]\nrw [le_iff_lt_or_eq] at hij \n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j ∨ i = j\n⊢ ∃ n, succ^[n] i = j\n[PROOFSTEP]\ncases' hij with hij hij\n[GOAL]\ncase inl\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\n⊢ ∃ n, succ^[n] i = j\ncase inr ι : Type u_1 inst✝¹ : LinearOrder ι inst✝ : LocallyFiniteOrder ι i j : ι hij : i = j ⊢ ∃ n, succ^[n] i = j\n[PROOFSTEP]\nswap\n[GOAL]\ncase inr\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i = j\n⊢ ∃ n, succ^[n] i = j\n[PROOFSTEP]\nrefine' ⟨0, _⟩\n[GOAL]\ncase inr\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i = j\n⊢ succ^[0] i = j\n[PROOFSTEP]\nsimpa only [Function.iterate_zero, id.def] using hij\n[GOAL]\ncase inl\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\n⊢ ∃ n, succ^[n] i = j\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase inl\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ¬∃ n, succ^[n] i = j\n⊢ False\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase inl\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\n⊢ False\n[PROOFSTEP]\nhave h_lt : ∀ n, succ^[n] i < j := by\n  intro n\n  induction' n with n hn\n  · simpa only [Function.iterate_zero, id.def] using hij\n  · refine' lt_of_le_of_ne _ (h _)\n    rw [Function.iterate_succ', Function.comp_apply]\n    exact succ_le_of_lt hn\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\n⊢ ∀ (n : ℕ), succ^[n] i < j\n[PROOFSTEP]\nintro n\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nn : ℕ\n⊢ succ^[n] i < j\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\n⊢ succ^[Nat.zero] i < j\n[PROOFSTEP]\nsimpa only [Function.iterate_zero, id.def] using hij\n[GOAL]\ncase succ\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nn : ℕ\nhn : succ^[n] i < j\n⊢ succ^[Nat.succ n] i < j\n[PROOFSTEP]\nrefine' lt_of_le_of_ne _ (h _)\n[GOAL]\ncase succ\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nn : ℕ\nhn : succ^[n] i < j\n⊢ succ^[Nat.succ n] i ≤ j\n[PROOFSTEP]\nrw [Function.iterate_succ', Function.comp_apply]\n[GOAL]\ncase succ\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nn : ℕ\nhn : succ^[n] i < j\n⊢ succ (succ^[n] i) ≤ j\n[PROOFSTEP]\nexact succ_le_of_lt hn\n[GOAL]\ncase inl\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\n⊢ False\n[PROOFSTEP]\nhave h_mem : ∀ n, succ^[n] i ∈ Finset.Icc i j := fun n ↦ Finset.mem_Icc.mpr ⟨le_succ_iterate n i, (h_lt n).le⟩\n[GOAL]\ncase inl\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\nh_mem : ∀ (n : ℕ), succ^[n] i ∈ Finset.Icc i j\n⊢ False\n[PROOFSTEP]\nobtain ⟨n, m, hnm, h_eq⟩ : ∃ n m, n < m ∧ succ^[n] i = succ^[m] i :=\n  by\n  let f : ℕ → Finset.Icc i j := fun n ↦ ⟨succ^[n] i, h_mem n⟩\n  obtain ⟨n, m, hnm_ne, hfnm⟩ : ∃ n m, n ≠ m ∧ f n = f m\n  exact Finite.exists_ne_map_eq_of_infinite f\n  have hnm_eq : succ^[n] i = succ^[m] i := by simpa only [Subtype.mk_eq_mk] using hfnm\n  cases' le_total n m with h_le h_le\n  · exact ⟨n, m, lt_of_le_of_ne h_le hnm_ne, hnm_eq⟩\n  · exact ⟨m, n, lt_of_le_of_ne h_le hnm_ne.symm, hnm_eq.symm⟩\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\nh_mem : ∀ (n : ℕ), succ^[n] i ∈ Finset.Icc i j\n⊢ ∃ n m, n < m ∧ succ^[n] i = succ^[m] i\n[PROOFSTEP]\nlet f : ℕ → Finset.Icc i j := fun n ↦ ⟨succ^[n] i, h_mem n⟩\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\nh_mem : ∀ (n : ℕ), succ^[n] i ∈ Finset.Icc i j\nf : ℕ → { x // x ∈ Finset.Icc i j } := fun n => { val := succ^[n] i, property := (_ : succ^[n] i ∈ Finset.Icc i j) }\n⊢ ∃ n m, n < m ∧ succ^[n] i = succ^[m] i\n[PROOFSTEP]\nobtain ⟨n, m, hnm_ne, hfnm⟩ : ∃ n m, n ≠ m ∧ f n = f m\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\nh_mem : ∀ (n : ℕ), succ^[n] i ∈ Finset.Icc i j\nf : ℕ → { x // x ∈ Finset.Icc i j } := fun n => { val := succ^[n] i, property := (_ : succ^[n] i ∈ Finset.Icc i j) }\n⊢ ∃ n m, n ≠ m ∧ f n = f m\ncase intro.intro.intro\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\nh_mem : ∀ (n : ℕ), succ^[n] i ∈ Finset.Icc i j\nf : ℕ → { x // x ∈ Finset.Icc i j } := fun n => { val := succ^[n] i, property := (_ : succ^[n] i ∈ Finset.Icc i j) }\nn m : ℕ\nhnm_ne : n ≠ m\nhfnm : f n = f m\n⊢ ∃ n m, n < m ∧ succ^[n] i = succ^[m] i\n[PROOFSTEP]\nexact Finite.exists_ne_map_eq_of_infinite f\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\nh_mem : ∀ (n : ℕ), succ^[n] i ∈ Finset.Icc i j\nf : ℕ → { x // x ∈ Finset.Icc i j } := fun n => { val := succ^[n] i, property := (_ : succ^[n] i ∈ Finset.Icc i j) }\nn m : ℕ\nhnm_ne : n ≠ m\nhfnm : f n = f m\n⊢ ∃ n m, n < m ∧ succ^[n] i = succ^[m] i\n[PROOFSTEP]\nhave hnm_eq : succ^[n] i = succ^[m] i := by simpa only [Subtype.mk_eq_mk] using hfnm\n[GOAL]\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\nh_mem : ∀ (n : ℕ), succ^[n] i ∈ Finset.Icc i j\nf : ℕ → { x // x ∈ Finset.Icc i j } := fun n => { val := succ^[n] i, property := (_ : succ^[n] i ∈ Finset.Icc i j) }\nn m : ℕ\nhnm_ne : n ≠ m\nhfnm : f n = f m\n⊢ succ^[n] i = succ^[m] i\n[PROOFSTEP]\nsimpa only [Subtype.mk_eq_mk] using hfnm\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\nh_mem : ∀ (n : ℕ), succ^[n] i ∈ Finset.Icc i j\nf : ℕ → { x // x ∈ Finset.Icc i j } := fun n => { val := succ^[n] i, property := (_ : succ^[n] i ∈ Finset.Icc i j) }\nn m : ℕ\nhnm_ne : n ≠ m\nhfnm : f n = f m\nhnm_eq : succ^[n] i = succ^[m] i\n⊢ ∃ n m, n < m ∧ succ^[n] i = succ^[m] i\n[PROOFSTEP]\ncases' le_total n m with h_le h_le\n[GOAL]\ncase intro.intro.intro.inl\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\nh_mem : ∀ (n : ℕ), succ^[n] i ∈ Finset.Icc i j\nf : ℕ → { x // x ∈ Finset.Icc i j } := fun n => { val := succ^[n] i, property := (_ : succ^[n] i ∈ Finset.Icc i j) }\nn m : ℕ\nhnm_ne : n ≠ m\nhfnm : f n = f m\nhnm_eq : succ^[n] i = succ^[m] i\nh_le : n ≤ m\n⊢ ∃ n m, n < m ∧ succ^[n] i = succ^[m] i\n[PROOFSTEP]\nexact ⟨n, m, lt_of_le_of_ne h_le hnm_ne, hnm_eq⟩\n[GOAL]\ncase intro.intro.intro.inr\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\nh_mem : ∀ (n : ℕ), succ^[n] i ∈ Finset.Icc i j\nf : ℕ → { x // x ∈ Finset.Icc i j } := fun n => { val := succ^[n] i, property := (_ : succ^[n] i ∈ Finset.Icc i j) }\nn m : ℕ\nhnm_ne : n ≠ m\nhfnm : f n = f m\nhnm_eq : succ^[n] i = succ^[m] i\nh_le : m ≤ n\n⊢ ∃ n m, n < m ∧ succ^[n] i = succ^[m] i\n[PROOFSTEP]\nexact ⟨m, n, lt_of_le_of_ne h_le hnm_ne.symm, hnm_eq.symm⟩\n[GOAL]\ncase inl.intro.intro.intro\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\nh_mem : ∀ (n : ℕ), succ^[n] i ∈ Finset.Icc i j\nn m : ℕ\nhnm : n < m\nh_eq : succ^[n] i = succ^[m] i\n⊢ False\n[PROOFSTEP]\nhave h_max : IsMax (succ^[n] i) := isMax_iterate_succ_of_eq_of_ne h_eq hnm.ne\n[GOAL]\ncase inl.intro.intro.intro\nι : Type u_1\ninst✝¹ : LinearOrder ι\ninst✝ : LocallyFiniteOrder ι\ni j : ι\nhij : i < j\nh : ∀ (n : ℕ), succ^[n] i ≠ j\nh_lt : ∀ (n : ℕ), succ^[n] i < j\nh_mem : ∀ (n : ℕ), succ^[n] i ∈ Finset.Icc i j\nn m : ℕ\nhnm : n < m\nh_eq : succ^[n] i = succ^[m] i\nh_max : IsMax (succ^[n] i)\n⊢ False\n[PROOFSTEP]\nexact not_le.mpr (h_lt n) (h_max (h_lt n).le)\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\n⊢ ∀ {a b : ι}, a ≤ b → ∃ n, pred^[n] b = a\n[PROOFSTEP]\nintro i j hij\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\n⊢ ∃ n, pred^[n] j = i\n[PROOFSTEP]\nhave h_exists := exists_succ_iterate_of_le hij\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\n⊢ ∃ n, pred^[n] j = i\n[PROOFSTEP]\nobtain ⟨n, hn_eq, hn_lt_ne⟩ : ∃ n, succ^[n] i = j ∧ ∀ m < n, succ^[m] i ≠ j\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\n⊢ ∃ n, succ^[n] i = j ∧ ∀ (m : ℕ), m < n → succ^[m] i ≠ j\ncase intro.intro\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn : ℕ\nhn_eq : succ^[n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < n → succ^[m] i ≠ j\n⊢ ∃ n, pred^[n] j = i\n[PROOFSTEP]\nexact ⟨Nat.find h_exists, Nat.find_spec h_exists, fun m hmn ↦ Nat.find_min h_exists hmn⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn : ℕ\nhn_eq : succ^[n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < n → succ^[m] i ≠ j\n⊢ ∃ n, pred^[n] j = i\n[PROOFSTEP]\nrefine' ⟨n, _⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn : ℕ\nhn_eq : succ^[n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < n → succ^[m] i ≠ j\n⊢ pred^[n] j = i\n[PROOFSTEP]\nrw [← hn_eq]\n[GOAL]\ncase intro.intro\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn : ℕ\nhn_eq : succ^[n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < n → succ^[m] i ≠ j\n⊢ pred^[n] (succ^[n] i) = i\n[PROOFSTEP]\ninduction' n with n\n[GOAL]\ncase intro.intro.zero\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn : ℕ\nhn_eq✝ : succ^[n] i = j\nhn_lt_ne✝ : ∀ (m : ℕ), m < n → succ^[m] i ≠ j\nhn_eq : succ^[Nat.zero] i = j\nhn_lt_ne : ∀ (m : ℕ), m < Nat.zero → succ^[m] i ≠ j\n⊢ pred^[Nat.zero] (succ^[Nat.zero] i) = i\n[PROOFSTEP]\nsimp only [Nat.zero_eq, Function.iterate_zero, id.def]\n[GOAL]\ncase intro.intro.succ\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn✝ : ℕ\nhn_eq✝ : succ^[n✝] i = j\nhn_lt_ne✝ : ∀ (m : ℕ), m < n✝ → succ^[m] i ≠ j\nn : ℕ\nn_ih✝ : succ^[n] i = j → (∀ (m : ℕ), m < n → succ^[m] i ≠ j) → pred^[n] (succ^[n] i) = i\nhn_eq : succ^[Nat.succ n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < Nat.succ n → succ^[m] i ≠ j\n⊢ pred^[Nat.succ n] (succ^[Nat.succ n] i) = i\n[PROOFSTEP]\nrw [pred_succ_iterate_of_not_isMax]\n[GOAL]\ncase intro.intro.succ.hin\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn✝ : ℕ\nhn_eq✝ : succ^[n✝] i = j\nhn_lt_ne✝ : ∀ (m : ℕ), m < n✝ → succ^[m] i ≠ j\nn : ℕ\nn_ih✝ : succ^[n] i = j → (∀ (m : ℕ), m < n → succ^[m] i ≠ j) → pred^[n] (succ^[n] i) = i\nhn_eq : succ^[Nat.succ n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < Nat.succ n → succ^[m] i ≠ j\n⊢ ¬IsMax (succ^[Nat.succ n - 1] i)\n[PROOFSTEP]\nrw [Nat.succ_sub_succ_eq_sub, tsub_zero]\n[GOAL]\ncase intro.intro.succ.hin\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn✝ : ℕ\nhn_eq✝ : succ^[n✝] i = j\nhn_lt_ne✝ : ∀ (m : ℕ), m < n✝ → succ^[m] i ≠ j\nn : ℕ\nn_ih✝ : succ^[n] i = j → (∀ (m : ℕ), m < n → succ^[m] i ≠ j) → pred^[n] (succ^[n] i) = i\nhn_eq : succ^[Nat.succ n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < Nat.succ n → succ^[m] i ≠ j\n⊢ ¬IsMax (succ^[n] i)\n[PROOFSTEP]\nsuffices : succ^[n] i < succ^[n.succ] i\n[GOAL]\ncase intro.intro.succ.hin\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn✝ : ℕ\nhn_eq✝ : succ^[n✝] i = j\nhn_lt_ne✝ : ∀ (m : ℕ), m < n✝ → succ^[m] i ≠ j\nn : ℕ\nn_ih✝ : succ^[n] i = j → (∀ (m : ℕ), m < n → succ^[m] i ≠ j) → pred^[n] (succ^[n] i) = i\nhn_eq : succ^[Nat.succ n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < Nat.succ n → succ^[m] i ≠ j\nthis : succ^[n] i < succ^[Nat.succ n] i\n⊢ ¬IsMax (succ^[n] i)\ncase this\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn✝ : ℕ\nhn_eq✝ : succ^[n✝] i = j\nhn_lt_ne✝ : ∀ (m : ℕ), m < n✝ → succ^[m] i ≠ j\nn : ℕ\nn_ih✝ : succ^[n] i = j → (∀ (m : ℕ), m < n → succ^[m] i ≠ j) → pred^[n] (succ^[n] i) = i\nhn_eq : succ^[Nat.succ n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < Nat.succ n → succ^[m] i ≠ j\n⊢ succ^[n] i < succ^[Nat.succ n] i\n[PROOFSTEP]\nexact not_isMax_of_lt this\n[GOAL]\ncase this\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn✝ : ℕ\nhn_eq✝ : succ^[n✝] i = j\nhn_lt_ne✝ : ∀ (m : ℕ), m < n✝ → succ^[m] i ≠ j\nn : ℕ\nn_ih✝ : succ^[n] i = j → (∀ (m : ℕ), m < n → succ^[m] i ≠ j) → pred^[n] (succ^[n] i) = i\nhn_eq : succ^[Nat.succ n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < Nat.succ n → succ^[m] i ≠ j\n⊢ succ^[n] i < succ^[Nat.succ n] i\n[PROOFSTEP]\nrefine' lt_of_le_of_ne _ _\n[GOAL]\ncase this.refine'_1\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn✝ : ℕ\nhn_eq✝ : succ^[n✝] i = j\nhn_lt_ne✝ : ∀ (m : ℕ), m < n✝ → succ^[m] i ≠ j\nn : ℕ\nn_ih✝ : succ^[n] i = j → (∀ (m : ℕ), m < n → succ^[m] i ≠ j) → pred^[n] (succ^[n] i) = i\nhn_eq : succ^[Nat.succ n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < Nat.succ n → succ^[m] i ≠ j\n⊢ succ^[n] i ≤ succ^[Nat.succ n] i\n[PROOFSTEP]\nrw [Function.iterate_succ']\n[GOAL]\ncase this.refine'_1\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn✝ : ℕ\nhn_eq✝ : succ^[n✝] i = j\nhn_lt_ne✝ : ∀ (m : ℕ), m < n✝ → succ^[m] i ≠ j\nn : ℕ\nn_ih✝ : succ^[n] i = j → (∀ (m : ℕ), m < n → succ^[m] i ≠ j) → pred^[n] (succ^[n] i) = i\nhn_eq : succ^[Nat.succ n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < Nat.succ n → succ^[m] i ≠ j\n⊢ succ^[n] i ≤ (succ ∘ succ^[n]) i\n[PROOFSTEP]\nexact le_succ _\n[GOAL]\ncase this.refine'_2\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn✝ : ℕ\nhn_eq✝ : succ^[n✝] i = j\nhn_lt_ne✝ : ∀ (m : ℕ), m < n✝ → succ^[m] i ≠ j\nn : ℕ\nn_ih✝ : succ^[n] i = j → (∀ (m : ℕ), m < n → succ^[m] i ≠ j) → pred^[n] (succ^[n] i) = i\nhn_eq : succ^[Nat.succ n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < Nat.succ n → succ^[m] i ≠ j\n⊢ succ^[n] i ≠ succ^[Nat.succ n] i\n[PROOFSTEP]\nrw [hn_eq]\n[GOAL]\ncase this.refine'_2\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\ni j : ι\nhij : i ≤ j\nh_exists : ∃ n, succ^[n] i = j\nn✝ : ℕ\nhn_eq✝ : succ^[n✝] i = j\nhn_lt_ne✝ : ∀ (m : ℕ), m < n✝ → succ^[m] i ≠ j\nn : ℕ\nn_ih✝ : succ^[n] i = j → (∀ (m : ℕ), m < n → succ^[m] i ≠ j) → pred^[n] (succ^[n] i) = i\nhn_eq : succ^[Nat.succ n] i = j\nhn_lt_ne : ∀ (m : ℕ), m < Nat.succ n → succ^[m] i ≠ j\n⊢ succ^[n] i ≠ j\n[PROOFSTEP]\nexact hn_lt_ne _ (Nat.lt_succ_self n)\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\n⊢ toZ i0 i0 = 0\n[PROOFSTEP]\nrw [toZ_of_ge le_rfl]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\n⊢ ↑(Nat.find (_ : ∃ n, succ^[n] i0 = i0)) = 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\n⊢ Nat.find (_ : ∃ n, succ^[n] i0 = i0) = 0\n[PROOFSTEP]\nrefine' le_antisymm (Nat.find_le _) (zero_le _)\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\n⊢ succ^[0] i0 = i0\n[PROOFSTEP]\nrw [Function.iterate_zero, id.def]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i : ι\nhi : i0 ≤ i\n⊢ succ^[Int.toNat (toZ i0 i)] i0 = i\n[PROOFSTEP]\nrw [toZ_of_ge hi, Int.toNat_coe_nat]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i : ι\nhi : i0 ≤ i\n⊢ succ^[Nat.find (_ : ∃ n, succ^[n] i0 = i)] i0 = i\n[PROOFSTEP]\nexact Nat.find_spec (exists_succ_iterate_of_le hi)\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i : ι\nhi : i < i0\n⊢ pred^[Int.toNat (-toZ i0 i)] i0 = i\n[PROOFSTEP]\nrw [toZ_of_lt hi, neg_neg, Int.toNat_coe_nat]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i : ι\nhi : i < i0\n⊢ pred^[Nat.find (_ : ∃ n, pred^[n] i0 = i)] i0 = i\n[PROOFSTEP]\nexact Nat.find_spec (exists_pred_iterate_of_le hi.le)\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nhi : i0 ≤ i\n⊢ 0 ≤ toZ i0 i\n[PROOFSTEP]\nrw [toZ_of_ge hi]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nhi : i0 ≤ i\n⊢ 0 ≤ ↑(Nat.find (_ : ∃ n, succ^[n] i0 = i))\n[PROOFSTEP]\nexact Nat.cast_nonneg _\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nhi : i < i0\n⊢ toZ i0 i < 0\n[PROOFSTEP]\nrefine' lt_of_le_of_ne _ _\n[GOAL]\ncase refine'_1\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nhi : i < i0\n⊢ toZ i0 i ≤ 0\n[PROOFSTEP]\nrw [toZ_of_lt hi, neg_nonpos]\n[GOAL]\ncase refine'_1\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nhi : i < i0\n⊢ 0 ≤ ↑(Nat.find (_ : ∃ n, pred^[n] i0 = i))\n[PROOFSTEP]\nexact Nat.cast_nonneg _\n[GOAL]\ncase refine'_2\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nhi : i < i0\n⊢ toZ i0 i ≠ 0\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase refine'_2\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nhi : i < i0\nh : toZ i0 i = 0\n⊢ False\n[PROOFSTEP]\nhave h_eq := iterate_pred_toZ i hi\n[GOAL]\ncase refine'_2\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nhi : i < i0\nh : toZ i0 i = 0\nh_eq : pred^[Int.toNat (-toZ i0 i)] i0 = i\n⊢ False\n[PROOFSTEP]\nrw [← h_eq, h] at hi \n[GOAL]\ncase refine'_2\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nhi : pred^[Int.toNat (-0)] i0 < i0\nh : toZ i0 i = 0\nh_eq : pred^[Int.toNat (-toZ i0 i)] i0 = i\n⊢ False\n[PROOFSTEP]\nsimp only [neg_zero, Int.toNat_zero, Function.iterate_zero, id.def, lt_self_iff_false] at hi \n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\n⊢ toZ i0 (succ^[n] i0) ≤ ↑n\n[PROOFSTEP]\nrw [toZ_of_ge (le_succ_iterate _ _)]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\n⊢ ↑(Nat.find (_ : ∃ n_1, succ^[n_1] i0 = succ^[n] i0)) ≤ ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\n⊢ Nat.find (_ : ∃ n_1, succ^[n_1] i0 = succ^[n] i0) ≤ n\n[PROOFSTEP]\nexact Nat.find_min' _ rfl\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\n⊢ -↑n ≤ toZ i0 (pred^[n] i0)\n[PROOFSTEP]\ncases' le_or_lt i0 (pred^[n] i0) with h h\n[GOAL]\ncase inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nh : i0 ≤ pred^[n] i0\n⊢ -↑n ≤ toZ i0 (pred^[n] i0)\n[PROOFSTEP]\nhave h_eq : pred^[n] i0 = i0 := le_antisymm (pred_iterate_le _ _) h\n[GOAL]\ncase inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nh : i0 ≤ pred^[n] i0\nh_eq : pred^[n] i0 = i0\n⊢ -↑n ≤ toZ i0 (pred^[n] i0)\n[PROOFSTEP]\nrw [h_eq, toZ_of_eq]\n[GOAL]\ncase inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nh : i0 ≤ pred^[n] i0\nh_eq : pred^[n] i0 = i0\n⊢ -↑n ≤ 0\n[PROOFSTEP]\nsimp only [Right.neg_nonpos_iff, Nat.cast_nonneg]\n[GOAL]\ncase inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nh : pred^[n] i0 < i0\n⊢ -↑n ≤ toZ i0 (pred^[n] i0)\n[PROOFSTEP]\nrw [toZ_of_lt h, neg_le_neg_iff]\n[GOAL]\ncase inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nh : pred^[n] i0 < i0\n⊢ ↑(Nat.find (_ : ∃ n_1, pred^[n_1] i0 = pred^[n] i0)) ≤ ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nh : pred^[n] i0 < i0\n⊢ Nat.find (_ : ∃ n_1, pred^[n_1] i0 = pred^[n] i0) ≤ n\n[PROOFSTEP]\nexact Nat.find_min' _ rfl\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMax (succ^[n] i0)\n⊢ toZ i0 (succ^[n] i0) = ↑n\n[PROOFSTEP]\nlet m := (toZ i0 (succ^[n] i0)).toNat\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMax (succ^[n] i0)\nm : ℕ := Int.toNat (toZ i0 (succ^[n] i0))\n⊢ toZ i0 (succ^[n] i0) = ↑n\n[PROOFSTEP]\nhave h_eq : succ^[m] i0 = succ^[n] i0 := iterate_succ_toZ _ (le_succ_iterate _ _)\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMax (succ^[n] i0)\nm : ℕ := Int.toNat (toZ i0 (succ^[n] i0))\nh_eq : succ^[m] i0 = succ^[n] i0\n⊢ toZ i0 (succ^[n] i0) = ↑n\n[PROOFSTEP]\nby_cases hmn : m = n\n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMax (succ^[n] i0)\nm : ℕ := Int.toNat (toZ i0 (succ^[n] i0))\nh_eq : succ^[m] i0 = succ^[n] i0\nhmn : m = n\n⊢ toZ i0 (succ^[n] i0) = ↑n\n[PROOFSTEP]\nnth_rw 2 [← hmn]\n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMax (succ^[n] i0)\nm : ℕ := Int.toNat (toZ i0 (succ^[n] i0))\nh_eq : succ^[m] i0 = succ^[n] i0\nhmn : m = n\n⊢ toZ i0 (succ^[n] i0) = ↑m\n[PROOFSTEP]\nrw [Int.toNat_eq_max, toZ_of_ge (le_succ_iterate _ _), max_eq_left]\n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMax (succ^[n] i0)\nm : ℕ := Int.toNat (toZ i0 (succ^[n] i0))\nh_eq : succ^[m] i0 = succ^[n] i0\nhmn : m = n\n⊢ 0 ≤ ↑(Nat.find (_ : ∃ n_1, succ^[n_1] i0 = succ^[n] i0))\n[PROOFSTEP]\nexact Nat.cast_nonneg _\n[GOAL]\ncase neg\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMax (succ^[n] i0)\nm : ℕ := Int.toNat (toZ i0 (succ^[n] i0))\nh_eq : succ^[m] i0 = succ^[n] i0\nhmn : ¬m = n\n⊢ toZ i0 (succ^[n] i0) = ↑n\n[PROOFSTEP]\nsuffices : IsMax (succ^[n] i0)\n[GOAL]\ncase neg\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMax (succ^[n] i0)\nm : ℕ := Int.toNat (toZ i0 (succ^[n] i0))\nh_eq : succ^[m] i0 = succ^[n] i0\nhmn : ¬m = n\nthis : IsMax (succ^[n] i0)\n⊢ toZ i0 (succ^[n] i0) = ↑n\ncase this\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMax (succ^[n] i0)\nm : ℕ := Int.toNat (toZ i0 (succ^[n] i0))\nh_eq : succ^[m] i0 = succ^[n] i0\nhmn : ¬m = n\n⊢ IsMax (succ^[n] i0)\n[PROOFSTEP]\nexact absurd this hn\n[GOAL]\ncase this\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMax (succ^[n] i0)\nm : ℕ := Int.toNat (toZ i0 (succ^[n] i0))\nh_eq : succ^[m] i0 = succ^[n] i0\nhmn : ¬m = n\n⊢ IsMax (succ^[n] i0)\n[PROOFSTEP]\nexact isMax_iterate_succ_of_eq_of_ne h_eq.symm (Ne.symm hmn)\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[n] i0)\n⊢ toZ i0 (pred^[n] i0) = -↑n\n[PROOFSTEP]\ncases' n with n n\n[GOAL]\ncase zero\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nhn : ¬IsMin (pred^[Nat.zero] i0)\n⊢ toZ i0 (pred^[Nat.zero] i0) = -↑Nat.zero\n[PROOFSTEP]\nsimp only [Nat.zero_eq, Function.iterate_zero, id.def, toZ_of_eq, Nat.cast_zero, neg_zero]\n[GOAL]\ncase succ\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\n⊢ toZ i0 (pred^[Nat.succ n] i0) = -↑(Nat.succ n)\n[PROOFSTEP]\nhave : pred^[n.succ] i0 < i0 :=\n  by\n  refine' lt_of_le_of_ne (pred_iterate_le _ _) fun h_pred_iterate_eq ↦ hn _\n  have h_pred_eq_pred : pred^[n.succ] i0 = pred^[0] i0 := by rwa [Function.iterate_zero, id.def]\n  exact isMin_iterate_pred_of_eq_of_ne h_pred_eq_pred (Nat.succ_ne_zero n)\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\n⊢ pred^[Nat.succ n] i0 < i0\n[PROOFSTEP]\nrefine' lt_of_le_of_ne (pred_iterate_le _ _) fun h_pred_iterate_eq ↦ hn _\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nh_pred_iterate_eq : pred^[Nat.succ n] i0 = i0\n⊢ IsMin (pred^[Nat.succ n] i0)\n[PROOFSTEP]\nhave h_pred_eq_pred : pred^[n.succ] i0 = pred^[0] i0 := by rwa [Function.iterate_zero, id.def]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nh_pred_iterate_eq : pred^[Nat.succ n] i0 = i0\n⊢ pred^[Nat.succ n] i0 = pred^[0] i0\n[PROOFSTEP]\nrwa [Function.iterate_zero, id.def]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nh_pred_iterate_eq : pred^[Nat.succ n] i0 = i0\nh_pred_eq_pred : pred^[Nat.succ n] i0 = pred^[0] i0\n⊢ IsMin (pred^[Nat.succ n] i0)\n[PROOFSTEP]\nexact isMin_iterate_pred_of_eq_of_ne h_pred_eq_pred (Nat.succ_ne_zero n)\n[GOAL]\ncase succ\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nthis : pred^[Nat.succ n] i0 < i0\n⊢ toZ i0 (pred^[Nat.succ n] i0) = -↑(Nat.succ n)\n[PROOFSTEP]\nlet m := (-toZ i0 (pred^[n.succ] i0)).toNat\n[GOAL]\ncase succ\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nthis : pred^[Nat.succ n] i0 < i0\nm : ℕ := Int.toNat (-toZ i0 (pred^[Nat.succ n] i0))\n⊢ toZ i0 (pred^[Nat.succ n] i0) = -↑(Nat.succ n)\n[PROOFSTEP]\nhave h_eq : pred^[m] i0 = pred^[n.succ] i0 := iterate_pred_toZ _ this\n[GOAL]\ncase succ\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nthis : pred^[Nat.succ n] i0 < i0\nm : ℕ := Int.toNat (-toZ i0 (pred^[Nat.succ n] i0))\nh_eq : pred^[m] i0 = pred^[Nat.succ n] i0\n⊢ toZ i0 (pred^[Nat.succ n] i0) = -↑(Nat.succ n)\n[PROOFSTEP]\nby_cases hmn : m = n.succ\n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nthis : pred^[Nat.succ n] i0 < i0\nm : ℕ := Int.toNat (-toZ i0 (pred^[Nat.succ n] i0))\nh_eq : pred^[m] i0 = pred^[Nat.succ n] i0\nhmn : m = Nat.succ n\n⊢ toZ i0 (pred^[Nat.succ n] i0) = -↑(Nat.succ n)\n[PROOFSTEP]\nnth_rw 2 [← hmn]\n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nthis : pred^[Nat.succ n] i0 < i0\nm : ℕ := Int.toNat (-toZ i0 (pred^[Nat.succ n] i0))\nh_eq : pred^[m] i0 = pred^[Nat.succ n] i0\nhmn : m = Nat.succ n\n⊢ toZ i0 (pred^[Nat.succ n] i0) = -↑m\n[PROOFSTEP]\nrw [Int.toNat_eq_max, toZ_of_lt this, max_eq_left, neg_neg]\n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nthis : pred^[Nat.succ n] i0 < i0\nm : ℕ := Int.toNat (-toZ i0 (pred^[Nat.succ n] i0))\nh_eq : pred^[m] i0 = pred^[Nat.succ n] i0\nhmn : m = Nat.succ n\n⊢ 0 ≤ - -↑(Nat.find (_ : ∃ n_1, pred^[n_1] i0 = pred^[Nat.succ n] i0))\n[PROOFSTEP]\nrw [neg_neg]\n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nthis : pred^[Nat.succ n] i0 < i0\nm : ℕ := Int.toNat (-toZ i0 (pred^[Nat.succ n] i0))\nh_eq : pred^[m] i0 = pred^[Nat.succ n] i0\nhmn : m = Nat.succ n\n⊢ 0 ≤ ↑(Nat.find (_ : ∃ n_1, pred^[n_1] i0 = pred^[Nat.succ n] i0))\n[PROOFSTEP]\nexact Nat.cast_nonneg _\n[GOAL]\ncase neg\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nthis : pred^[Nat.succ n] i0 < i0\nm : ℕ := Int.toNat (-toZ i0 (pred^[Nat.succ n] i0))\nh_eq : pred^[m] i0 = pred^[Nat.succ n] i0\nhmn : ¬m = Nat.succ n\n⊢ toZ i0 (pred^[Nat.succ n] i0) = -↑(Nat.succ n)\n[PROOFSTEP]\nsuffices : IsMin (pred^[n.succ] i0)\n[GOAL]\ncase neg\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nthis✝ : pred^[Nat.succ n] i0 < i0\nm : ℕ := Int.toNat (-toZ i0 (pred^[Nat.succ n] i0))\nh_eq : pred^[m] i0 = pred^[Nat.succ n] i0\nhmn : ¬m = Nat.succ n\nthis : IsMin (pred^[Nat.succ n] i0)\n⊢ toZ i0 (pred^[Nat.succ n] i0) = -↑(Nat.succ n)\ncase this\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nthis : pred^[Nat.succ n] i0 < i0\nm : ℕ := Int.toNat (-toZ i0 (pred^[Nat.succ n] i0))\nh_eq : pred^[m] i0 = pred^[Nat.succ n] i0\nhmn : ¬m = Nat.succ n\n⊢ IsMin (pred^[Nat.succ n] i0)\n[PROOFSTEP]\nexact absurd this hn\n[GOAL]\ncase this\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i : ι\nn : ℕ\nhn : ¬IsMin (pred^[Nat.succ n] i0)\nthis : pred^[Nat.succ n] i0 < i0\nm : ℕ := Int.toNat (-toZ i0 (pred^[Nat.succ n] i0))\nh_eq : pred^[m] i0 = pred^[Nat.succ n] i0\nhmn : ¬m = Nat.succ n\n⊢ IsMin (pred^[Nat.succ n] i0)\n[PROOFSTEP]\nexact isMin_iterate_pred_of_eq_of_ne h_eq.symm (Ne.symm hmn)\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i j : ι\nh_le : toZ i0 i ≤ toZ i0 j\n⊢ i ≤ j\n[PROOFSTEP]\ncases' le_or_lt i0 i with hi hi\n[GOAL]\ncase inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i j : ι\nh_le : toZ i0 i ≤ toZ i0 j\nhi : i0 ≤ i\n⊢ i ≤ j\n[PROOFSTEP]\ncases' le_or_lt i0 j with hj hj\n[GOAL]\ncase inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i j : ι\nh_le : toZ i0 i ≤ toZ i0 j\nhi : i < i0\n⊢ i ≤ j\n[PROOFSTEP]\ncases' le_or_lt i0 j with hj hj\n[GOAL]\ncase inl.inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i j : ι\nh_le : toZ i0 i ≤ toZ i0 j\nhi : i0 ≤ i\nhj : i0 ≤ j\n⊢ i ≤ j\n[PROOFSTEP]\nrw [← iterate_succ_toZ i hi, ← iterate_succ_toZ j hj]\n[GOAL]\ncase inl.inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i j : ι\nh_le : toZ i0 i ≤ toZ i0 j\nhi : i0 ≤ i\nhj : i0 ≤ j\n⊢ succ^[Int.toNat (toZ i0 i)] i0 ≤ succ^[Int.toNat (toZ i0 j)] i0\n[PROOFSTEP]\nexact Monotone.monotone_iterate_of_le_map succ_mono (le_succ _) (Int.toNat_le_toNat h_le)\n[GOAL]\ncase inl.inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i j : ι\nh_le : toZ i0 i ≤ toZ i0 j\nhi : i0 ≤ i\nhj : j < i0\n⊢ i ≤ j\n[PROOFSTEP]\nexact absurd ((toZ_neg hj).trans_le (toZ_nonneg hi)) (not_lt.mpr h_le)\n[GOAL]\ncase inr.inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i j : ι\nh_le : toZ i0 i ≤ toZ i0 j\nhi : i < i0\nhj : i0 ≤ j\n⊢ i ≤ j\n[PROOFSTEP]\nexact hi.le.trans hj\n[GOAL]\ncase inr.inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i j : ι\nh_le : toZ i0 i ≤ toZ i0 j\nhi : i < i0\nhj : j < i0\n⊢ i ≤ j\n[PROOFSTEP]\nrw [← iterate_pred_toZ i hi, ← iterate_pred_toZ j hj]\n[GOAL]\ncase inr.inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i j : ι\nh_le : toZ i0 i ≤ toZ i0 j\nhi : i < i0\nhj : j < i0\n⊢ pred^[Int.toNat (-toZ i0 i)] i0 ≤ pred^[Int.toNat (-toZ i0 j)] i0\n[PROOFSTEP]\nrefine' Monotone.antitone_iterate_of_map_le pred_mono (pred_le _) (Int.toNat_le_toNat _)\n[GOAL]\ncase inr.inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i j : ι\nh_le : toZ i0 i ≤ toZ i0 j\nhi : i < i0\nhj : j < i0\n⊢ -toZ i0 j ≤ -toZ i0 i\n[PROOFSTEP]\nexact neg_le_neg h_le\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nby_cases hi_max : IsMax i\n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : IsMax i\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nrw [le_antisymm h_le (hi_max h_le)]\n[GOAL]\ncase neg\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nby_cases hj_min : IsMin j\n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : IsMin j\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nrw [le_antisymm h_le (hj_min h_le)]\n[GOAL]\ncase neg\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\ncases' le_or_lt i0 i with hi hi\n[GOAL]\ncase neg.inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\ncases' le_or_lt i0 j with hj hj\n[GOAL]\ncase neg.inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\ncases' le_or_lt i0 j with hj hj\n[GOAL]\ncase neg.inl.inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nlet m := Nat.find (exists_succ_iterate_of_le h_le)\n[GOAL]\ncase neg.inl.inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nhave hm : succ^[m] i = j := Nat.find_spec (exists_succ_iterate_of_le h_le)\n[GOAL]\ncase neg.inl.inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nhave hj_eq : j = succ^[(toZ i0 i).toNat + m] i0 :=\n  by\n  rw [← hm, add_comm]\n  nth_rw 1 [← iterate_succ_toZ i hi]\n  rw [Function.iterate_add]\n  rfl\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\n⊢ j = succ^[Int.toNat (toZ i0 i) + m] i0\n[PROOFSTEP]\nrw [← hm, add_comm]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\n⊢ succ^[m] i = succ^[m + Int.toNat (toZ i0 i)] i0\n[PROOFSTEP]\nnth_rw 1 [← iterate_succ_toZ i hi]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\n⊢ succ^[m] (succ^[Int.toNat (toZ i0 i)] i0) = succ^[m + Int.toNat (toZ i0 i)] i0\n[PROOFSTEP]\nrw [Function.iterate_add]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\n⊢ succ^[m] (succ^[Int.toNat (toZ i0 i)] i0) = (succ^[m] ∘ succ^[Int.toNat (toZ i0 i)]) i0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg.inl.inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\nhj_eq : j = succ^[Int.toNat (toZ i0 i) + m] i0\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase neg.inl.inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\nhj_eq : j = succ^[Int.toNat (toZ i0 i) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\n⊢ False\n[PROOFSTEP]\nby_cases hm0 : m = 0\n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\nhj_eq : j = succ^[Int.toNat (toZ i0 i) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : m = 0\n⊢ False\n[PROOFSTEP]\nrw [hm0, Function.iterate_zero, id.def] at hm \n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : i = j\nhj_eq : j = succ^[Int.toNat (toZ i0 i) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : m = 0\n⊢ False\n[PROOFSTEP]\nrw [hm] at h \n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : i = j\nhj_eq : j = succ^[Int.toNat (toZ i0 i) + m] i0\nh : ¬toZ i0 j ≤ toZ i0 j\nhm0 : m = 0\n⊢ False\n[PROOFSTEP]\nexact h (le_of_eq rfl)\n[GOAL]\ncase neg\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\nhj_eq : j = succ^[Int.toNat (toZ i0 i) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ False\n[PROOFSTEP]\nrefine' hi_max (max_of_succ_le (le_trans _ (@le_of_toZ_le _ _ _ _ _ i0 j i _)))\n[GOAL]\ncase neg.refine'_1\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\nhj_eq : j = succ^[Int.toNat (toZ i0 i) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ succ i ≤ j\n[PROOFSTEP]\nhave h_succ_le : succ^[(toZ i0 i).toNat + 1] i0 ≤ j :=\n  by\n  rw [hj_eq]\n  refine' Monotone.monotone_iterate_of_le_map succ_mono (le_succ i0) (add_le_add_left _ _)\n  exact Nat.one_le_iff_ne_zero.mpr hm0\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\nhj_eq : j = succ^[Int.toNat (toZ i0 i) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ succ^[Int.toNat (toZ i0 i) + 1] i0 ≤ j\n[PROOFSTEP]\nrw [hj_eq]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\nhj_eq : j = succ^[Int.toNat (toZ i0 i) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ succ^[Int.toNat (toZ i0 i) + 1] i0 ≤ succ^[Int.toNat (toZ i0 i) + m] i0\n[PROOFSTEP]\nrefine' Monotone.monotone_iterate_of_le_map succ_mono (le_succ i0) (add_le_add_left _ _)\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\nhj_eq : j = succ^[Int.toNat (toZ i0 i) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ 1 ≤ m\n[PROOFSTEP]\nexact Nat.one_le_iff_ne_zero.mpr hm0\n[GOAL]\ncase neg.refine'_1\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\nhj_eq : j = succ^[Int.toNat (toZ i0 i) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\nh_succ_le : succ^[Int.toNat (toZ i0 i) + 1] i0 ≤ j\n⊢ succ i ≤ j\n[PROOFSTEP]\nrwa [Function.iterate_succ', Function.comp_apply, iterate_succ_toZ i hi] at h_succ_le \n[GOAL]\ncase neg.refine'_2\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : i0 ≤ j\nm : ℕ := Nat.find (_ : ∃ n, succ^[n] i = j)\nhm : succ^[m] i = j\nhj_eq : j = succ^[Int.toNat (toZ i0 i) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ toZ i0 j ≤ toZ i0 i\n[PROOFSTEP]\nexact le_of_not_le h\n[GOAL]\ncase neg.inl.inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i0 ≤ i\nhj : j < i0\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nexact absurd h_le (not_le.mpr (hj.trans_le hi))\n[GOAL]\ncase neg.inr.inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : i0 ≤ j\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nexact (toZ_neg hi).le.trans (toZ_nonneg hj)\n[GOAL]\ncase neg.inr.inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nlet m := Nat.find (exists_pred_iterate_of_le h_le)\n[GOAL]\ncase neg.inr.inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nhave hm : pred^[m] j = i := Nat.find_spec (exists_pred_iterate_of_le h_le)\n[GOAL]\ncase neg.inr.inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nhave hj_eq : i = pred^[(-toZ i0 j).toNat + m] i0 :=\n  by\n  rw [← hm, add_comm]\n  nth_rw 1 [← iterate_pred_toZ j hj]\n  rw [Function.iterate_add]\n  rfl\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\n⊢ i = pred^[Int.toNat (-toZ i0 j) + m] i0\n[PROOFSTEP]\nrw [← hm, add_comm]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\n⊢ pred^[m] j = pred^[m + Int.toNat (-toZ i0 j)] i0\n[PROOFSTEP]\nnth_rw 1 [← iterate_pred_toZ j hj]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\n⊢ pred^[m] (pred^[Int.toNat (-toZ i0 j)] i0) = pred^[m + Int.toNat (-toZ i0 j)] i0\n[PROOFSTEP]\nrw [Function.iterate_add]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\n⊢ pred^[m] (pred^[Int.toNat (-toZ i0 j)] i0) = (pred^[m] ∘ pred^[Int.toNat (-toZ i0 j)]) i0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg.inr.inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\n⊢ toZ i0 i ≤ toZ i0 j\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase neg.inr.inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\n⊢ False\n[PROOFSTEP]\nby_cases hm0 : m = 0\n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : m = 0\n⊢ False\n[PROOFSTEP]\nrw [hm0, Function.iterate_zero, id.def] at hm \n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : m = 0\n⊢ False\n[PROOFSTEP]\nrw [hm] at h \n[GOAL]\ncase pos\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 i\nhm0 : m = 0\n⊢ False\n[PROOFSTEP]\nexact h (le_of_eq rfl)\n[GOAL]\ncase neg\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ False\n[PROOFSTEP]\nrefine' hj_min (min_of_le_pred _)\n[GOAL]\ncase neg\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ j ≤ pred j\n[PROOFSTEP]\nrefine' (@le_of_toZ_le _ _ _ _ _ i0 j i _).trans _\n[GOAL]\ncase neg.refine'_1\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ toZ i0 j ≤ toZ i0 i\n[PROOFSTEP]\nexact le_of_not_le h\n[GOAL]\ncase neg.refine'_2\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ i ≤ pred j\n[PROOFSTEP]\nhave h_le_pred : i ≤ pred^[(-toZ i0 j).toNat + 1] i0 :=\n  by\n  rw [hj_eq]\n  refine' Monotone.antitone_iterate_of_map_le pred_mono (pred_le i0) (add_le_add_left _ _)\n  exact Nat.one_le_iff_ne_zero.mpr hm0\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ i ≤ pred^[Int.toNat (-toZ i0 j) + 1] i0\n[PROOFSTEP]\nrw [hj_eq]\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ pred^[Int.toNat (-toZ i0 j) + m] i0 ≤ pred^[Int.toNat (-toZ i0 j) + 1] i0\n[PROOFSTEP]\nrefine' Monotone.antitone_iterate_of_map_le pred_mono (pred_le i0) (add_le_add_left _ _)\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\n⊢ 1 ≤ m\n[PROOFSTEP]\nexact Nat.one_le_iff_ne_zero.mpr hm0\n[GOAL]\ncase neg.refine'_2\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : IsSuccArchimedean ι\ninst✝ : PredOrder ι\ni0 i✝ i j : ι\nh_le : i ≤ j\nhi_max : ¬IsMax i\nhj_min : ¬IsMin j\nhi : i < i0\nhj : j < i0\nm : ℕ := Nat.find (_ : ∃ n, pred^[n] j = i)\nhm : pred^[m] j = i\nhj_eq : i = pred^[Int.toNat (-toZ i0 j) + m] i0\nh : ¬toZ i0 i ≤ toZ i0 j\nhm0 : ¬m = 0\nh_le_pred : i ≤ pred^[Int.toNat (-toZ i0 j) + 1] i0\n⊢ i ≤ pred j\n[PROOFSTEP]\nrwa [Function.iterate_succ', Function.comp_apply, iterate_pred_toZ j hj] at h_le_pred \n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\nhι : Nonempty ι\n⊢ ∀ {a b : ι},\n    ↑(Equiv.ofInjective (toZ (Nonempty.some hι)) (_ : Function.Injective (toZ (Nonempty.some hι)))) a ≤\n        ↑(Equiv.ofInjective (toZ (Nonempty.some hι)) (_ : Function.Injective (toZ (Nonempty.some hι)))) b ↔\n      a ≤ b\n[PROOFSTEP]\nintro i j\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\nhι : Nonempty ι\ni j : ι\n⊢ ↑(Equiv.ofInjective (toZ (Nonempty.some hι)) (_ : Function.Injective (toZ (Nonempty.some hι)))) i ≤\n      ↑(Equiv.ofInjective (toZ (Nonempty.some hι)) (_ : Function.Injective (toZ (Nonempty.some hι)))) j ↔\n    i ≤ j\n[PROOFSTEP]\nexact toZ_le_iff i j\n[GOAL]\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\n⊢ Countable ι\n[PROOFSTEP]\ncases' isEmpty_or_nonempty ι with _ hι\n[GOAL]\ncase inl\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\nh✝ : IsEmpty ι\n⊢ Countable ι\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase inr\nι : Type u_1\ninst✝³ : LinearOrder ι\ninst✝² : SuccOrder ι\ninst✝¹ : PredOrder ι\ninst✝ : IsSuccArchimedean ι\nhι : Nonempty ι\n⊢ Countable ι\n[PROOFSTEP]\nexact Countable.of_equiv _ orderIsoRangeToZOfLinearSuccPredArch.symm.toEquiv\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\ni : ι\n⊢ (fun n => if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι) else pred^[Int.toNat (-n)] (Nonempty.some hι))\n      (toZ (Nonempty.some hι) i) =\n    i\n[PROOFSTEP]\ncases' le_or_lt hι.some i with hi hi\n[GOAL]\ncase inl\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\ni : ι\nhi : Nonempty.some hι ≤ i\n⊢ (fun n => if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι) else pred^[Int.toNat (-n)] (Nonempty.some hι))\n      (toZ (Nonempty.some hι) i) =\n    i\n[PROOFSTEP]\nhave h_nonneg : 0 ≤ toZ hι.some i := toZ_nonneg hi\n[GOAL]\ncase inl\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\ni : ι\nhi : Nonempty.some hι ≤ i\nh_nonneg : 0 ≤ toZ (Nonempty.some hι) i\n⊢ (fun n => if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι) else pred^[Int.toNat (-n)] (Nonempty.some hι))\n      (toZ (Nonempty.some hι) i) =\n    i\n[PROOFSTEP]\nsimp_rw [if_pos h_nonneg]\n[GOAL]\ncase inl\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\ni : ι\nhi : Nonempty.some hι ≤ i\nh_nonneg : 0 ≤ toZ (Nonempty.some hι) i\n⊢ succ^[Int.toNat (toZ (Nonempty.some hι) i)] (Nonempty.some hι) = i\n[PROOFSTEP]\nexact iterate_succ_toZ i hi\n[GOAL]\ncase inr\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\ni : ι\nhi : i < Nonempty.some hι\n⊢ (fun n => if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι) else pred^[Int.toNat (-n)] (Nonempty.some hι))\n      (toZ (Nonempty.some hι) i) =\n    i\n[PROOFSTEP]\nhave h_neg : toZ hι.some i < 0 := toZ_neg hi\n[GOAL]\ncase inr\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\ni : ι\nhi : i < Nonempty.some hι\nh_neg : toZ (Nonempty.some hι) i < 0\n⊢ (fun n => if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι) else pred^[Int.toNat (-n)] (Nonempty.some hι))\n      (toZ (Nonempty.some hι) i) =\n    i\n[PROOFSTEP]\nsimp_rw [if_neg (not_le.mpr h_neg)]\n[GOAL]\ncase inr\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\ni : ι\nhi : i < Nonempty.some hι\nh_neg : toZ (Nonempty.some hι) i < 0\n⊢ pred^[Int.toNat (-toZ (Nonempty.some hι) i)] (Nonempty.some hι) = i\n[PROOFSTEP]\nexact iterate_pred_toZ i hi\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\nn : ℤ\n⊢ toZ (Nonempty.some hι)\n      ((fun n => if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι) else pred^[Int.toNat (-n)] (Nonempty.some hι)) n) =\n    n\n[PROOFSTEP]\ncases' le_or_lt 0 n with hn hn\n[GOAL]\ncase inl\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\nn : ℤ\nhn : 0 ≤ n\n⊢ toZ (Nonempty.some hι)\n      ((fun n => if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι) else pred^[Int.toNat (-n)] (Nonempty.some hι)) n) =\n    n\n[PROOFSTEP]\nsimp_rw [if_pos hn]\n[GOAL]\ncase inl\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\nn : ℤ\nhn : 0 ≤ n\n⊢ toZ (Nonempty.some hι) (succ^[Int.toNat n] (Nonempty.some hι)) = n\n[PROOFSTEP]\nrw [toZ_iterate_succ]\n[GOAL]\ncase inl\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\nn : ℤ\nhn : 0 ≤ n\n⊢ ↑(Int.toNat n) = n\n[PROOFSTEP]\nexact Int.toNat_of_nonneg hn\n[GOAL]\ncase inr\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\nn : ℤ\nhn : n < 0\n⊢ toZ (Nonempty.some hι)\n      ((fun n => if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι) else pred^[Int.toNat (-n)] (Nonempty.some hι)) n) =\n    n\n[PROOFSTEP]\nsimp_rw [if_neg (not_le.mpr hn)]\n[GOAL]\ncase inr\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\nn : ℤ\nhn : n < 0\n⊢ toZ (Nonempty.some hι) (pred^[Int.toNat (-n)] (Nonempty.some hι)) = n\n[PROOFSTEP]\nrw [toZ_iterate_pred]\n[GOAL]\ncase inr\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\nn : ℤ\nhn : n < 0\n⊢ -↑(Int.toNat (-n)) = n\n[PROOFSTEP]\nsimp only [hn.le, Int.toNat_of_nonneg, Right.nonneg_neg_iff, neg_neg]\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\n⊢ ∀ {a b : ι},\n    ↑{ toFun := toZ (Nonempty.some hι),\n              invFun := fun n =>\n                if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι) else pred^[Int.toNat (-n)] (Nonempty.some hι),\n              left_inv :=\n                (_ :\n                  ∀ (i : ι),\n                    (fun n =>\n                          if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι)\n                          else pred^[Int.toNat (-n)] (Nonempty.some hι))\n                        (toZ (Nonempty.some hι) i) =\n                      i),\n              right_inv :=\n                (_ :\n                  ∀ (n : ℤ),\n                    toZ (Nonempty.some hι)\n                        ((fun n =>\n                            if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι)\n                            else pred^[Int.toNat (-n)] (Nonempty.some hι))\n                          n) =\n                      n) }\n          a ≤\n        ↑{ toFun := toZ (Nonempty.some hι),\n              invFun := fun n =>\n                if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι) else pred^[Int.toNat (-n)] (Nonempty.some hι),\n              left_inv :=\n                (_ :\n                  ∀ (i : ι),\n                    (fun n =>\n                          if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι)\n                          else pred^[Int.toNat (-n)] (Nonempty.some hι))\n                        (toZ (Nonempty.some hι) i) =\n                      i),\n              right_inv :=\n                (_ :\n                  ∀ (n : ℤ),\n                    toZ (Nonempty.some hι)\n                        ((fun n =>\n                            if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι)\n                            else pred^[Int.toNat (-n)] (Nonempty.some hι))\n                          n) =\n                      n) }\n          b ↔\n      a ≤ b\n[PROOFSTEP]\nintro i j\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : NoMinOrder ι\nhι : Nonempty ι\ni j : ι\n⊢ ↑{ toFun := toZ (Nonempty.some hι),\n            invFun := fun n =>\n              if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι) else pred^[Int.toNat (-n)] (Nonempty.some hι),\n            left_inv :=\n              (_ :\n                ∀ (i : ι),\n                  (fun n =>\n                        if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι)\n                        else pred^[Int.toNat (-n)] (Nonempty.some hι))\n                      (toZ (Nonempty.some hι) i) =\n                    i),\n            right_inv :=\n              (_ :\n                ∀ (n : ℤ),\n                  toZ (Nonempty.some hι)\n                      ((fun n =>\n                          if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι)\n                          else pred^[Int.toNat (-n)] (Nonempty.some hι))\n                        n) =\n                    n) }\n        i ≤\n      ↑{ toFun := toZ (Nonempty.some hι),\n            invFun := fun n =>\n              if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι) else pred^[Int.toNat (-n)] (Nonempty.some hι),\n            left_inv :=\n              (_ :\n                ∀ (i : ι),\n                  (fun n =>\n                        if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι)\n                        else pred^[Int.toNat (-n)] (Nonempty.some hι))\n                      (toZ (Nonempty.some hι) i) =\n                    i),\n            right_inv :=\n              (_ :\n                ∀ (n : ℤ),\n                  toZ (Nonempty.some hι)\n                      ((fun n =>\n                          if 0 ≤ n then succ^[Int.toNat n] (Nonempty.some hι)\n                          else pred^[Int.toNat (-n)] (Nonempty.some hι))\n                        n) =\n                    n) }\n        j ↔\n    i ≤ j\n[PROOFSTEP]\nexact toZ_le_iff i j\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : OrderBot ι\ni : ι\n⊢ (fun n => succ^[n] ⊥) ((fun i => Int.toNat (toZ ⊥ i)) i) = i\n[PROOFSTEP]\ndsimp only\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : OrderBot ι\ni : ι\n⊢ succ^[Int.toNat (toZ ⊥ i)] ⊥ = i\n[PROOFSTEP]\nexact iterate_succ_toZ i bot_le\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : OrderBot ι\nn : ℕ\n⊢ (fun i => Int.toNat (toZ ⊥ i)) ((fun n => succ^[n] ⊥) n) = n\n[PROOFSTEP]\ndsimp only\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : OrderBot ι\nn : ℕ\n⊢ Int.toNat (toZ ⊥ (succ^[n] ⊥)) = n\n[PROOFSTEP]\nrw [toZ_iterate_succ]\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : OrderBot ι\nn : ℕ\n⊢ Int.toNat ↑n = n\n[PROOFSTEP]\nexact Int.toNat_coe_nat n\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : OrderBot ι\n⊢ ∀ {a b : ι},\n    ↑{ toFun := fun i => Int.toNat (toZ ⊥ i), invFun := fun n => succ^[n] ⊥,\n              left_inv := (_ : ∀ (i : ι), (fun n => succ^[n] ⊥) ((fun i => Int.toNat (toZ ⊥ i)) i) = i),\n              right_inv := (_ : ∀ (n : ℕ), (fun i => Int.toNat (toZ ⊥ i)) ((fun n => succ^[n] ⊥) n) = n) }\n          a ≤\n        ↑{ toFun := fun i => Int.toNat (toZ ⊥ i), invFun := fun n => succ^[n] ⊥,\n              left_inv := (_ : ∀ (i : ι), (fun n => succ^[n] ⊥) ((fun i => Int.toNat (toZ ⊥ i)) i) = i),\n              right_inv := (_ : ∀ (n : ℕ), (fun i => Int.toNat (toZ ⊥ i)) ((fun n => succ^[n] ⊥) n) = n) }\n          b ↔\n      a ≤ b\n[PROOFSTEP]\nintro i j\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : OrderBot ι\ni j : ι\n⊢ ↑{ toFun := fun i => Int.toNat (toZ ⊥ i), invFun := fun n => succ^[n] ⊥,\n            left_inv := (_ : ∀ (i : ι), (fun n => succ^[n] ⊥) ((fun i => Int.toNat (toZ ⊥ i)) i) = i),\n            right_inv := (_ : ∀ (n : ℕ), (fun i => Int.toNat (toZ ⊥ i)) ((fun n => succ^[n] ⊥) n) = n) }\n        i ≤\n      ↑{ toFun := fun i => Int.toNat (toZ ⊥ i), invFun := fun n => succ^[n] ⊥,\n            left_inv := (_ : ∀ (i : ι), (fun n => succ^[n] ⊥) ((fun i => Int.toNat (toZ ⊥ i)) i) = i),\n            right_inv := (_ : ∀ (n : ℕ), (fun i => Int.toNat (toZ ⊥ i)) ((fun n => succ^[n] ⊥) n) = n) }\n        j ↔\n    i ≤ j\n[PROOFSTEP]\nsimp only [Equiv.coe_fn_mk, Int.toNat_le]\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : NoMaxOrder ι\ninst✝ : OrderBot ι\ni j : ι\n⊢ toZ ⊥ i ≤ ↑(Int.toNat (toZ ⊥ j)) ↔ i ≤ j\n[PROOFSTEP]\nrw [← @toZ_le_iff ι _ _ _ _ ⊥, Int.toNat_of_nonneg (toZ_nonneg bot_le)]\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\nn : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }\n⊢ (fun i =>\n        { val := Int.toNat (toZ ⊥ i),\n          property := (_ : Int.toNat (toZ ⊥ i) ∈ Finset.range (Nat.succ (Int.toNat (toZ ⊥ ⊤)))) })\n      ((fun n => succ^[↑n] ⊥) n) =\n    n\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\nn : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }\n⊢ ↑((fun i =>\n          { val := Int.toNat (toZ ⊥ i),\n            property := (_ : Int.toNat (toZ ⊥ i) ∈ Finset.range (Nat.succ (Int.toNat (toZ ⊥ ⊤)))) })\n        ((fun n => succ^[↑n] ⊥) n)) =\n    ↑n\n[PROOFSTEP]\nsimp only [Subtype.coe_mk]\n[GOAL]\ncase a\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\nn : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }\n⊢ Int.toNat (toZ ⊥ (succ^[↑n] ⊥)) = ↑n\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase a.refine'_1\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\nn : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }\n⊢ Int.toNat (toZ ⊥ (succ^[↑n] ⊥)) ≤ ↑n\n[PROOFSTEP]\nrw [Int.toNat_le]\n[GOAL]\ncase a.refine'_1\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\nn : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }\n⊢ toZ ⊥ (succ^[↑n] ⊥) ≤ ↑↑n\n[PROOFSTEP]\nexact toZ_iterate_succ_le _\n[GOAL]\ncase a.refine'_2\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\nn : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }\n⊢ ↑n ≤ Int.toNat (toZ ⊥ (succ^[↑n] ⊥))\n[PROOFSTEP]\nby_cases hn_max : IsMax (succ^[↑n] (⊥ : ι))\n[GOAL]\ncase pos\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\nn : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }\nhn_max : IsMax (succ^[↑n] ⊥)\n⊢ ↑n ≤ Int.toNat (toZ ⊥ (succ^[↑n] ⊥))\n[PROOFSTEP]\nrw [← isTop_iff_isMax, isTop_iff_eq_top] at hn_max \n[GOAL]\ncase pos\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\nn : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }\nhn_max✝ : IsTop (succ^[↑n] ⊥)\nhn_max : succ^[↑n] ⊥ = ⊤\n⊢ ↑n ≤ Int.toNat (toZ ⊥ (succ^[↑n] ⊥))\n[PROOFSTEP]\nrw [hn_max]\n[GOAL]\ncase pos\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\nn : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }\nhn_max✝ : IsTop (succ^[↑n] ⊥)\nhn_max : succ^[↑n] ⊥ = ⊤\n⊢ ↑n ≤ Int.toNat (toZ ⊥ ⊤)\n[PROOFSTEP]\nexact Nat.lt_succ_iff.mp (Finset.mem_range.mp n.prop)\n[GOAL]\ncase neg\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\nn : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }\nhn_max : ¬IsMax (succ^[↑n] ⊥)\n⊢ ↑n ≤ Int.toNat (toZ ⊥ (succ^[↑n] ⊥))\n[PROOFSTEP]\nrw [toZ_iterate_succ_of_not_isMax _ hn_max]\n[GOAL]\ncase neg\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\nn : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }\nhn_max : ¬IsMax (succ^[↑n] ⊥)\n⊢ ↑n ≤ Int.toNat ↑↑n\n[PROOFSTEP]\nsimp only [Int.toNat_coe_nat, le_refl]\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\n⊢ ∀ {a b : ι},\n    ↑{\n              toFun := fun i =>\n                { val := Int.toNat (toZ ⊥ i),\n                  property := (_ : Int.toNat (toZ ⊥ i) ∈ Finset.range (Nat.succ (Int.toNat (toZ ⊥ ⊤)))) },\n              invFun := fun n => succ^[↑n] ⊥, left_inv := (_ : ∀ (i : ι), succ^[Int.toNat (toZ ⊥ i)] ⊥ = i),\n              right_inv :=\n                (_ :\n                  ∀ (n : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }),\n                    (fun i =>\n                          { val := Int.toNat (toZ ⊥ i),\n                            property := (_ : Int.toNat (toZ ⊥ i) ∈ Finset.range (Nat.succ (Int.toNat (toZ ⊥ ⊤)))) })\n                        ((fun n => succ^[↑n] ⊥) n) =\n                      n) }\n          a ≤\n        ↑{\n              toFun := fun i =>\n                { val := Int.toNat (toZ ⊥ i),\n                  property := (_ : Int.toNat (toZ ⊥ i) ∈ Finset.range (Nat.succ (Int.toNat (toZ ⊥ ⊤)))) },\n              invFun := fun n => succ^[↑n] ⊥, left_inv := (_ : ∀ (i : ι), succ^[Int.toNat (toZ ⊥ i)] ⊥ = i),\n              right_inv :=\n                (_ :\n                  ∀ (n : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }),\n                    (fun i =>\n                          { val := Int.toNat (toZ ⊥ i),\n                            property := (_ : Int.toNat (toZ ⊥ i) ∈ Finset.range (Nat.succ (Int.toNat (toZ ⊥ ⊤)))) })\n                        ((fun n => succ^[↑n] ⊥) n) =\n                      n) }\n          b ↔\n      a ≤ b\n[PROOFSTEP]\nintro i j\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\ni j : ι\n⊢ ↑{\n            toFun := fun i =>\n              { val := Int.toNat (toZ ⊥ i),\n                property := (_ : Int.toNat (toZ ⊥ i) ∈ Finset.range (Nat.succ (Int.toNat (toZ ⊥ ⊤)))) },\n            invFun := fun n => succ^[↑n] ⊥, left_inv := (_ : ∀ (i : ι), succ^[Int.toNat (toZ ⊥ i)] ⊥ = i),\n            right_inv :=\n              (_ :\n                ∀ (n : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }),\n                  (fun i =>\n                        { val := Int.toNat (toZ ⊥ i),\n                          property := (_ : Int.toNat (toZ ⊥ i) ∈ Finset.range (Nat.succ (Int.toNat (toZ ⊥ ⊤)))) })\n                      ((fun n => succ^[↑n] ⊥) n) =\n                    n) }\n        i ≤\n      ↑{\n            toFun := fun i =>\n              { val := Int.toNat (toZ ⊥ i),\n                property := (_ : Int.toNat (toZ ⊥ i) ∈ Finset.range (Nat.succ (Int.toNat (toZ ⊥ ⊤)))) },\n            invFun := fun n => succ^[↑n] ⊥, left_inv := (_ : ∀ (i : ι), succ^[Int.toNat (toZ ⊥ i)] ⊥ = i),\n            right_inv :=\n              (_ :\n                ∀ (n : { x // x ∈ Finset.range (Int.toNat (toZ ⊥ ⊤) + 1) }),\n                  (fun i =>\n                        { val := Int.toNat (toZ ⊥ i),\n                          property := (_ : Int.toNat (toZ ⊥ i) ∈ Finset.range (Nat.succ (Int.toNat (toZ ⊥ ⊤)))) })\n                      ((fun n => succ^[↑n] ⊥) n) =\n                    n) }\n        j ↔\n    i ≤ j\n[PROOFSTEP]\nsimp only [Equiv.coe_fn_mk, Subtype.mk_le_mk, Int.toNat_le]\n[GOAL]\nι : Type u_1\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : SuccOrder ι\ninst✝³ : PredOrder ι\ninst✝² : IsSuccArchimedean ι\ninst✝¹ : OrderBot ι\ninst✝ : OrderTop ι\ni j : ι\n⊢ toZ ⊥ i ≤ ↑(Int.toNat (toZ ⊥ j)) ↔ i ≤ j\n[PROOFSTEP]\nrw [← @toZ_le_iff ι _ _ _ _ ⊥, Int.toNat_of_nonneg (toZ_nonneg bot_le)]\n", "meta": {"mathlib_filename": "Mathlib.Order.SuccPred.LinearLocallyFinite", "llama_tokens": 44157, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850154599562, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.38587959505100855}}
{"text": "[GOAL]\nX Y Z : Scheme\nf✝ : X ⟶ Y\ng : Y ⟶ Z\nf : X ⟶ Y\n⊢ IsOpenImmersion f ↔\n    OpenEmbedding ↑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX Y Z : Scheme\nf✝ : X ⟶ Y\ng : Y ⟶ Z\nf : X ⟶ Y\n⊢ IsOpenImmersion f →\n    OpenEmbedding ↑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nX Y Z : Scheme\nf✝ : X ⟶ Y\ng : Y ⟶ Z\nf : X ⟶ Y\nh : IsOpenImmersion f\n⊢ OpenEmbedding ↑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)\n[PROOFSTEP]\nexact ⟨h.1, inferInstance⟩\n[GOAL]\ncase mpr\nX Y Z : Scheme\nf✝ : X ⟶ Y\ng : Y ⟶ Z\nf : X ⟶ Y\n⊢ (OpenEmbedding ↑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)) →\n    IsOpenImmersion f\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase mpr.intro\nX Y Z : Scheme\nf✝ : X ⟶ Y\ng : Y ⟶ Z\nf : X ⟶ Y\nh₁ : OpenEmbedding ↑f.val.base\nh₂ : ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)\n⊢ IsOpenImmersion f\n[PROOFSTEP]\nexact IsOpenImmersion.of_stalk_iso f h₁\n[GOAL]\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ MorphismProperty.StableUnderComposition @IsOpenImmersion\n[PROOFSTEP]\nintro X Y Z f g h₁ h₂\n[GOAL]\nX✝ Y✝ Z✝ : Scheme\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh₁ : IsOpenImmersion f\nh₂ : IsOpenImmersion g\n⊢ IsOpenImmersion (f ≫ g)\n[PROOFSTEP]\nexact LocallyRingedSpace.IsOpenImmersion.comp f g\n[GOAL]\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ MorphismProperty.RespectsIso @IsOpenImmersion\n[PROOFSTEP]\napply isOpenImmersion_stableUnderComposition.respectsIso\n[GOAL]\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ ∀ {X Y : Scheme} (e : X ≅ Y), IsOpenImmersion e.hom\n[PROOFSTEP]\nintro _ _ _\n[GOAL]\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nX✝ Y✝ : Scheme\ne✝ : X✝ ≅ Y✝\n⊢ IsOpenImmersion e✝.hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ PropertyIsLocalAtTarget @IsOpenImmersion\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase RespectsIso\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ MorphismProperty.RespectsIso @IsOpenImmersion\n[PROOFSTEP]\nexact isOpenImmersion_respectsIso\n[GOAL]\ncase restrict\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ ∀ {X Y : Scheme} (f : X ⟶ Y) (U : Opens ↑↑Y.toPresheafedSpace), IsOpenImmersion f → IsOpenImmersion (f ∣_ U)\n[PROOFSTEP]\nintros\n[GOAL]\ncase restrict\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nU✝ : Opens ↑↑Y✝.toPresheafedSpace\na✝ : IsOpenImmersion f✝\n⊢ IsOpenImmersion (f✝ ∣_ U✝)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase of_openCover\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ ∀ {X Y : Scheme} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover Y), (∀ (i : 𝒰.J), IsOpenImmersion pullback.snd) → IsOpenImmersion f\n[PROOFSTEP]\nintro X Y f 𝒰 H\n[GOAL]\ncase of_openCover\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\n⊢ IsOpenImmersion f\n[PROOFSTEP]\nrw [isOpenImmersion_iff_stalk]\n[GOAL]\ncase of_openCover\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\n⊢ OpenEmbedding ↑f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase of_openCover.left\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\n⊢ OpenEmbedding ↑f.val.base\n[PROOFSTEP]\napply (openEmbedding_iff_openEmbedding_of_iSup_eq_top 𝒰.iSup_opensRange f.1.base.2).mpr\n[GOAL]\ncase of_openCover.left\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\n⊢ ∀ (i : 𝒰.J),\n    OpenEmbedding (Set.restrictPreimage (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i)).carrier f.val.base.toFun)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase of_openCover.left\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\ni : 𝒰.J\n⊢ OpenEmbedding (Set.restrictPreimage (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i)).carrier f.val.base.toFun)\n[PROOFSTEP]\nhave := ((isOpenImmersion_respectsIso.arrow_iso_iff (morphismRestrictOpensRange f (𝒰.map i))).mpr (H i)).1\n[GOAL]\ncase of_openCover.left\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\ni : 𝒰.J\nthis : OpenEmbedding ↑(Arrow.mk (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))).hom.val.base\n⊢ OpenEmbedding (Set.restrictPreimage (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i)).carrier f.val.base.toFun)\n[PROOFSTEP]\nerw [Arrow.mk_hom, morphismRestrict_val_base] at this \n[GOAL]\ncase of_openCover.left\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\ni : 𝒰.J\nthis : OpenEmbedding (Set.restrictPreimage (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i)).carrier ↑f.val.base)\n⊢ OpenEmbedding (Set.restrictPreimage (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i)).carrier f.val.base.toFun)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase of_openCover.right\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\n⊢ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase of_openCover.right\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\nx : ↑↑X.toPresheafedSpace\n⊢ IsIso (PresheafedSpace.stalkMap f.val x)\n[PROOFSTEP]\nhave := Arrow.iso_w (morphismRestrictStalkMap f (Scheme.Hom.opensRange (𝒰.map <| 𝒰.f <| f.1.base x)) ⟨x, 𝒰.Covers _⟩)\n[GOAL]\ncase of_openCover.right\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\nx : ↑↑X.toPresheafedSpace\nthis :\n  (Arrow.mk\n        (PresheafedSpace.stalkMap f.val\n          ↑{ val := x,\n              property :=\n                (_ :\n                  ↑f.val.base x ∈\n                    Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) })).hom =\n    (morphismRestrictStalkMap f (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n            { val := x,\n              property :=\n                (_ :\n                  ↑f.val.base x ∈\n                    Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) }).inv.left ≫\n      (Arrow.mk\n            (PresheafedSpace.stalkMap\n              (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x)))).val\n              { val := x,\n                property :=\n                  (_ :\n                    ↑f.val.base x ∈\n                      Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) })).hom ≫\n        (morphismRestrictStalkMap f\n              (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n              { val := x,\n                property :=\n                  (_ :\n                    ↑f.val.base x ∈\n                      Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) }).hom.right\n⊢ IsIso (PresheafedSpace.stalkMap f.val x)\n[PROOFSTEP]\ndsimp only [Arrow.mk_hom] at this \n[GOAL]\ncase of_openCover.right\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\nx : ↑↑X.toPresheafedSpace\nthis :\n  PresheafedSpace.stalkMap f.val x =\n    (morphismRestrictStalkMap f (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n            { val := x,\n              property :=\n                (_ :\n                  ↑f.val.base x ∈\n                    Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) }).inv.left ≫\n      PresheafedSpace.stalkMap\n          (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x)))).val\n          { val := x,\n            property :=\n              (_ :\n                ↑f.val.base x ∈ Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) } ≫\n        (morphismRestrictStalkMap f\n              (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n              { val := x,\n                property :=\n                  (_ :\n                    ↑f.val.base x ∈\n                      Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) }).hom.right\n⊢ IsIso (PresheafedSpace.stalkMap f.val x)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase of_openCover.right\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\nx : ↑↑X.toPresheafedSpace\nthis :\n  PresheafedSpace.stalkMap f.val x =\n    (morphismRestrictStalkMap f (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n            { val := x,\n              property :=\n                (_ :\n                  ↑f.val.base x ∈\n                    Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) }).inv.left ≫\n      PresheafedSpace.stalkMap\n          (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x)))).val\n          { val := x,\n            property :=\n              (_ :\n                ↑f.val.base x ∈ Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) } ≫\n        (morphismRestrictStalkMap f\n              (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n              { val := x,\n                property :=\n                  (_ :\n                    ↑f.val.base x ∈\n                      Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) }).hom.right\n⊢ IsIso\n    ((morphismRestrictStalkMap f (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n            { val := x,\n              property :=\n                (_ :\n                  ↑f.val.base x ∈\n                    Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) }).inv.left ≫\n      PresheafedSpace.stalkMap\n          (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x)))).val\n          { val := x,\n            property :=\n              (_ :\n                ↑f.val.base x ∈ Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) } ≫\n        (morphismRestrictStalkMap f\n              (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n              { val := x,\n                property :=\n                  (_ :\n                    ↑f.val.base x ∈\n                      Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) }).hom.right)\n[PROOFSTEP]\nhaveI : IsOpenImmersion (f ∣_ Scheme.Hom.opensRange (𝒰.map <| 𝒰.f <| f.1.base x)) :=\n  (isOpenImmersion_respectsIso.arrow_iso_iff (morphismRestrictOpensRange f (𝒰.map _))).mpr (H _)\n[GOAL]\ncase of_openCover.right\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover Y\nH : ∀ (i : 𝒰.J), IsOpenImmersion pullback.snd\nx : ↑↑X.toPresheafedSpace\nthis✝ :\n  PresheafedSpace.stalkMap f.val x =\n    (morphismRestrictStalkMap f (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n            { val := x,\n              property :=\n                (_ :\n                  ↑f.val.base x ∈\n                    Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) }).inv.left ≫\n      PresheafedSpace.stalkMap\n          (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x)))).val\n          { val := x,\n            property :=\n              (_ :\n                ↑f.val.base x ∈ Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) } ≫\n        (morphismRestrictStalkMap f\n              (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n              { val := x,\n                property :=\n                  (_ :\n                    ↑f.val.base x ∈\n                      Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) }).hom.right\nthis : IsOpenImmersion (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n⊢ IsIso\n    ((morphismRestrictStalkMap f (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n            { val := x,\n              property :=\n                (_ :\n                  ↑f.val.base x ∈\n                    Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) }).inv.left ≫\n      PresheafedSpace.stalkMap\n          (f ∣_ Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x)))).val\n          { val := x,\n            property :=\n              (_ :\n                ↑f.val.base x ∈ Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) } ≫\n        (morphismRestrictStalkMap f\n              (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))))\n              { val := x,\n                property :=\n                  (_ :\n                    ↑f.val.base x ∈\n                      Set.range ↑(Scheme.OpenCover.map 𝒰 (Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base) }).hom.right)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ ∀ (X Y S : Scheme) (f : X ⟶ S) (g : Y ⟶ S), IsOpenImmersion g → IsOpenImmersion pullback.fst\n[PROOFSTEP]\nintro X Y Z f g H\n[GOAL]\nX✝ Y✝ Z✝ : Scheme\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion g\n⊢ IsOpenImmersion pullback.fst\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.Morphisms.OpenImmersion", "llama_tokens": 6749, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6859494550081926, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.3856246644010259}}
{"text": "[GOAL]\nn : ℕ\n⊢ repr ↑n = ↑n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\n⊢ repr ↑Nat.zero = ↑Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn✝ : ℕ\n⊢ repr ↑(Nat.succ n✝) = ↑(Nat.succ n✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\n⊢ ω ^ repr e ≤ repr (oadd e n a)\n[PROOFSTEP]\nrefine' le_trans _ (le_add_right _ _)\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\n⊢ ω ^ repr e ≤ ω ^ repr e * ↑↑n\n[PROOFSTEP]\nsimpa using (Ordinal.mul_le_mul_iff_left <| opow_pos (repr e) omega_pos).2 (nat_cast_le.2 n.2)\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nh : cmp (oadd e n a) 0 = Ordering.eq\n⊢ oadd e n a = 0\n[PROOFSTEP]\ninjection h\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nh : cmp 0 (oadd e n a) = Ordering.eq\n⊢ 0 = oadd e n a\n[PROOFSTEP]\ninjection h\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh : cmp (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\nrevert h\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\n⊢ cmp (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂) = Ordering.eq → oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\nsimp only [cmp]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\n⊢ Ordering.orElse (cmp e₁ e₂) (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq →\n    oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\ncases h₁ : cmp e₁ e₂\n[GOAL]\ncase lt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₂ = Ordering.lt\n⊢ Ordering.orElse Ordering.lt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq →\n    oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₂ = Ordering.eq\n⊢ Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq →\n    oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase gt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₂ = Ordering.gt\n⊢ Ordering.orElse Ordering.gt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq →\n    oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase lt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₂ = Ordering.lt\nh : Ordering.orElse Ordering.lt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\ntry cases h\n[GOAL]\ncase lt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₂ = Ordering.lt\nh : Ordering.orElse Ordering.lt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\ncases h\n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₂ = Ordering.eq\nh : Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\ntry cases h\n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₂ = Ordering.eq\nh : Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\ncases h\n[GOAL]\ncase gt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₂ = Ordering.gt\nh : Ordering.orElse Ordering.gt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\ntry cases h\n[GOAL]\ncase gt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₂ = Ordering.gt\nh : Ordering.orElse Ordering.gt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\ncases h\n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₂ = Ordering.eq\nh : Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₂ n₂ a₂\n[PROOFSTEP]\nobtain rfl := eq_of_cmp_eq h₁\n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh : Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq\nh₁ : cmp e₁ e₁ = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₁ n₂ a₂\n[PROOFSTEP]\nrevert h\n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₁ = Ordering.eq\n⊢ Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)) = Ordering.eq →\n    oadd e₁ n₁ a₁ = oadd e₁ n₂ a₂\n[PROOFSTEP]\ncases h₂ : _root_.cmp (n₁ : ℕ) n₂\n[GOAL]\ncase eq.lt\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₁ = Ordering.eq\nh₂ : _root_.cmp ↑n₁ ↑n₂ = Ordering.lt\n⊢ Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)) = Ordering.eq → oadd e₁ n₁ a₁ = oadd e₁ n₂ a₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase eq.eq\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₁ = Ordering.eq\nh₂ : _root_.cmp ↑n₁ ↑n₂ = Ordering.eq\n⊢ Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)) = Ordering.eq → oadd e₁ n₁ a₁ = oadd e₁ n₂ a₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase eq.gt\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₁ = Ordering.eq\nh₂ : _root_.cmp ↑n₁ ↑n₂ = Ordering.gt\n⊢ Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)) = Ordering.eq → oadd e₁ n₁ a₁ = oadd e₁ n₂ a₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase eq.lt\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₁ = Ordering.eq\nh₂ : _root_.cmp ↑n₁ ↑n₂ = Ordering.lt\nh : Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₁ n₂ a₂\n[PROOFSTEP]\ntry cases h\n[GOAL]\ncase eq.lt\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₁ = Ordering.eq\nh₂ : _root_.cmp ↑n₁ ↑n₂ = Ordering.lt\nh : Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₁ n₂ a₂\n[PROOFSTEP]\ncases h\n[GOAL]\ncase eq.eq\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₁ = Ordering.eq\nh₂ : _root_.cmp ↑n₁ ↑n₂ = Ordering.eq\nh : Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₁ n₂ a₂\n[PROOFSTEP]\ntry cases h\n[GOAL]\ncase eq.eq\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₁ = Ordering.eq\nh₂ : _root_.cmp ↑n₁ ↑n₂ = Ordering.eq\nh : Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₁ n₂ a₂\n[PROOFSTEP]\ncases h\n[GOAL]\ncase eq.gt\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₁ = Ordering.eq\nh₂ : _root_.cmp ↑n₁ ↑n₂ = Ordering.gt\nh : Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₁ n₂ a₂\n[PROOFSTEP]\ntry cases h\n[GOAL]\ncase eq.gt\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₁ = Ordering.eq\nh₂ : _root_.cmp ↑n₁ ↑n₂ = Ordering.gt\nh : Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₁ n₂ a₂\n[PROOFSTEP]\ncases h\n[GOAL]\ncase eq.eq\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : cmp e₁ e₁ = Ordering.eq\nh₂ : _root_.cmp ↑n₁ ↑n₂ = Ordering.eq\nh : Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₁ n₂ a₂\n[PROOFSTEP]\nobtain rfl := eq_of_cmp_eq h\n[GOAL]\ncase eq.eq\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\nh₁ : cmp e₁ e₁ = Ordering.eq\nh₂ : _root_.cmp ↑n₁ ↑n₂ = Ordering.eq\nh : Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₁)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₁ n₂ a₁\n[PROOFSTEP]\nrw [_root_.cmp, cmpUsing_eq_eq] at h₂ \n[GOAL]\ncase eq.eq\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\nh₁ : cmp e₁ e₁ = Ordering.eq\nh₂ : ¬↑n₁ < ↑n₂ ∧ ¬↑n₂ < ↑n₁\nh : Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₁)) = Ordering.eq\n⊢ oadd e₁ n₁ a₁ = oadd e₁ n₂ a₁\n[PROOFSTEP]\nobtain rfl := Subtype.eq (eq_of_incomp h₂)\n[GOAL]\ncase eq.eq\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh₁ : cmp e₁ e₁ = Ordering.eq\nh : Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₁)) = Ordering.eq\nh₂ : ¬↑n₁ < ↑n₁ ∧ ¬↑n₁ < ↑n₁\n⊢ oadd e₁ n₁ a₁ = oadd e₁ n₁ a₁\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ 0 < 1\n[PROOFSTEP]\nsimp only [lt_def, repr, repr_one, opow_zero, one_mul, add_zero, nat_cast_pos]\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nb : Ordinal.{0}\nh : NFBelow (ONote.oadd e n a) b\n⊢ NF e\n[PROOFSTEP]\ncases' h with _ _ _ _ eb _ h₁ h₂ h₃\n[GOAL]\ncase oadd'\ne : ONote\nn : ℕ+\na : ONote\nb eb : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\n⊢ NF e\n[PROOFSTEP]\nexact ⟨⟨_, h₁⟩⟩\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nb : Ordinal.{0}\nh : NFBelow (ONote.oadd e n a) b\n⊢ NFBelow a (repr e)\n[PROOFSTEP]\ncases' h with _ _ _ _ eb _ h₁ h₂ h₃\n[GOAL]\ncase oadd'\ne : ONote\nn : ℕ+\na : ONote\nb eb : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\n⊢ NFBelow a (repr e)\n[PROOFSTEP]\nexact h₂\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nb : Ordinal.{0}\nh : NFBelow (ONote.oadd e n a) b\n⊢ repr e < b\n[PROOFSTEP]\ncases' h with _ _ _ _ eb _ h₁ h₂ h₃\n[GOAL]\ncase oadd'\ne : ONote\nn : ℕ+\na : ONote\nb eb : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\n⊢ repr e < b\n[PROOFSTEP]\nexact h₃\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nh : NF (ONote.oadd e n a)\ne0 : e = 0\n⊢ a = 0\n[PROOFSTEP]\nsimpa [e0, NFBelow_zero] using h.snd'\n[GOAL]\no : ONote\nb : Ordinal.{0}\nh : NFBelow o b\n⊢ repr o < ω ^ b\n[PROOFSTEP]\ninduction' h with _ e n a eb b h₁ h₂ h₃ _ IH\n[GOAL]\ncase zero\no : ONote\nb b✝ : Ordinal.{0}\n⊢ repr 0 < ω ^ b✝\n[PROOFSTEP]\nexact opow_pos _ omega_pos\n[GOAL]\ncase oadd'\no : ONote\nb✝ : Ordinal.{0}\ne : ONote\nn : ℕ+\na : ONote\neb b : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\na_ih✝ : repr e < ω ^ eb\nIH : repr a < ω ^ repr e\n⊢ repr (ONote.oadd e n a) < ω ^ b\n[PROOFSTEP]\nrw [repr]\n[GOAL]\ncase oadd'\no : ONote\nb✝ : Ordinal.{0}\ne : ONote\nn : ℕ+\na : ONote\neb b : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\na_ih✝ : repr e < ω ^ eb\nIH : repr a < ω ^ repr e\n⊢ ω ^ repr e * ↑↑n + repr a < ω ^ b\n[PROOFSTEP]\napply ((add_lt_add_iff_left _).2 IH).trans_le\n[GOAL]\ncase oadd'\no : ONote\nb✝ : Ordinal.{0}\ne : ONote\nn : ℕ+\na : ONote\neb b : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\na_ih✝ : repr e < ω ^ eb\nIH : repr a < ω ^ repr e\n⊢ ω ^ repr e * ↑↑n + ω ^ repr e ≤ ω ^ b\n[PROOFSTEP]\nrw [← mul_succ]\n[GOAL]\ncase oadd'\no : ONote\nb✝ : Ordinal.{0}\ne : ONote\nn : ℕ+\na : ONote\neb b : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\na_ih✝ : repr e < ω ^ eb\nIH : repr a < ω ^ repr e\n⊢ ω ^ repr e * succ ↑↑n ≤ ω ^ b\n[PROOFSTEP]\napply (mul_le_mul_left' (succ_le_of_lt (nat_lt_omega _)) _).trans\n[GOAL]\ncase oadd'\no : ONote\nb✝ : Ordinal.{0}\ne : ONote\nn : ℕ+\na : ONote\neb b : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\na_ih✝ : repr e < ω ^ eb\nIH : repr a < ω ^ repr e\n⊢ ω ^ repr e * ω ≤ ω ^ b\n[PROOFSTEP]\nrw [← opow_succ]\n[GOAL]\ncase oadd'\no : ONote\nb✝ : Ordinal.{0}\ne : ONote\nn : ℕ+\na : ONote\neb b : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\na_ih✝ : repr e < ω ^ eb\nIH : repr a < ω ^ repr e\n⊢ ω ^ succ (repr e) ≤ ω ^ b\n[PROOFSTEP]\nexact opow_le_opow_right omega_pos (succ_le_of_lt h₃)\n[GOAL]\no : ONote\nb₁ b₂ : Ordinal.{0}\nbb : b₁ ≤ b₂\nh : NFBelow o b₁\n⊢ NFBelow o b₂\n[PROOFSTEP]\ninduction' h with _ e n a eb b h₁ h₂ h₃ _ _\n[GOAL]\ncase zero\no : ONote\nb₁ b₂ : Ordinal.{0}\nbb✝ : b₁ ≤ b₂\nb✝ : Ordinal.{0}\nbb : b✝ ≤ b₂\n⊢ NFBelow 0 b₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase oadd'\no : ONote\nb₁ b₂ : Ordinal.{0}\nbb✝ : b₁ ≤ b₂\ne : ONote\nn : ℕ+\na : ONote\neb b : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\na_ih✝¹ : eb ≤ b₂ → NFBelow e b₂\na_ih✝ : repr e ≤ b₂ → NFBelow a b₂\nbb : b ≤ b₂\n⊢ NFBelow (ONote.oadd e n a) b₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase oadd'.a\no : ONote\nb₁ b₂ : Ordinal.{0}\nbb✝ : b₁ ≤ b₂\ne : ONote\nn : ℕ+\na : ONote\neb b : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\na_ih✝¹ : eb ≤ b₂ → NFBelow e b₂\na_ih✝ : repr e ≤ b₂ → NFBelow a b₂\nbb : b ≤ b₂\n⊢ NFBelow e ?oadd'.eb\ncase oadd'.a\no : ONote\nb₁ b₂ : Ordinal.{0}\nbb✝ : b₁ ≤ b₂\ne : ONote\nn : ℕ+\na : ONote\neb b : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\na_ih✝¹ : eb ≤ b₂ → NFBelow e b₂\na_ih✝ : repr e ≤ b₂ → NFBelow a b₂\nbb : b ≤ b₂\n⊢ NFBelow a (repr e)\ncase oadd'.a\no : ONote\nb₁ b₂ : Ordinal.{0}\nbb✝ : b₁ ≤ b₂\ne : ONote\nn : ℕ+\na : ONote\neb b : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\na_ih✝¹ : eb ≤ b₂ → NFBelow e b₂\na_ih✝ : repr e ≤ b₂ → NFBelow a b₂\nbb : b ≤ b₂\n⊢ repr e < b₂\ncase oadd'.eb\no : ONote\nb₁ b₂ : Ordinal.{0}\nbb✝ : b₁ ≤ b₂\ne : ONote\nn : ℕ+\na : ONote\neb b : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b\na_ih✝¹ : eb ≤ b₂ → NFBelow e b₂\na_ih✝ : repr e ≤ b₂ → NFBelow a b₂\nbb : b ≤ b₂\n⊢ Ordinal.{0}\n[PROOFSTEP]\nexacts [h₁, h₂, lt_of_lt_of_le h₃ bb]\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nb : Ordinal.{0}\nH : repr e < b\nb' : Ordinal.{0}\nh : NFBelow (ONote.oadd e n a) b'\n⊢ NFBelow (ONote.oadd e n a) b\n[PROOFSTEP]\ncases' h with _ _ _ _ eb _ h₁ h₂ h₃\n[GOAL]\ncase oadd'\ne : ONote\nn : ℕ+\na : ONote\nb : Ordinal.{0}\nH : repr e < b\nb' eb : Ordinal.{0}\nh₁ : NFBelow e eb\nh₂ : NFBelow a (repr e)\nh₃ : repr e < b'\n⊢ NFBelow (ONote.oadd e n a) b\n[PROOFSTEP]\nexact NFBelow.oadd' h₁ h₂ H\n[GOAL]\n⊢ NF 1\n[PROOFSTEP]\nrw [← ofNat_one]\n[GOAL]\n⊢ NF ↑1\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ne o₁ o₂ : ONote\nn₁ n₂ : ℕ+\nh₁ : NF (oadd e n₁ o₁)\nh : ↑n₁ < ↑n₂\n⊢ oadd e n₁ o₁ < oadd e n₂ o₂\n[PROOFSTEP]\nsimp [lt_def]\n[GOAL]\ne o₁ o₂ : ONote\nn₁ n₂ : ℕ+\nh₁ : NF (oadd e n₁ o₁)\nh : ↑n₁ < ↑n₂\n⊢ ω ^ repr e * ↑↑n₁ + repr o₁ < ω ^ repr e * ↑↑n₂ + repr o₂\n[PROOFSTEP]\nrefine' lt_of_lt_of_le ((add_lt_add_iff_left _).2 h₁.snd'.repr_lt) (le_trans _ (le_add_right _ _))\n[GOAL]\ne o₁ o₂ : ONote\nn₁ n₂ : ℕ+\nh₁ : NF (oadd e n₁ o₁)\nh : ↑n₁ < ↑n₂\n⊢ ω ^ repr e * ↑↑n₁ + ω ^ repr e ≤ ω ^ repr e * ↑↑n₂\n[PROOFSTEP]\nrwa [← mul_succ, Ordinal.mul_le_mul_iff_left (opow_pos _ omega_pos), succ_le_iff, nat_cast_lt]\n[GOAL]\ne : ONote\nn : ℕ+\na₁ a₂ : ONote\nh : a₁ < a₂\n⊢ oadd e n a₁ < oadd e n a₂\n[PROOFSTEP]\nrw [lt_def]\n[GOAL]\ne : ONote\nn : ℕ+\na₁ a₂ : ONote\nh : a₁ < a₂\n⊢ repr (oadd e n a₁) < repr (oadd e n a₂)\n[PROOFSTEP]\nunfold repr\n[GOAL]\ne : ONote\nn : ℕ+\na₁ a₂ : ONote\nh : a₁ < a₂\n⊢ ω ^ repr e * ↑↑n + repr a₁ < ω ^ repr e * ↑↑n + repr a₂\n[PROOFSTEP]\nexact @add_lt_add_left _ _ _ _ (repr a₁) _ h _\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ Ordering.Compares (cmp (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\nrw [cmp]\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ Ordering.Compares (Ordering.orElse (cmp e₁ e₂) (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\nhave IHe := @cmp_compares _ _ h₁.fst h₂.fst\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\nIHe : Ordering.Compares (cmp e₁ e₂) e₁ e₂\n⊢ Ordering.Compares (Ordering.orElse (cmp e₁ e₂) (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\nsimp [Ordering.Compares] at IHe \n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\nIHe :\n  match cmp e₁ e₂, e₁, e₂ with\n  | Ordering.lt, a, b => a < b\n  | Ordering.eq, a, b => a = b\n  | Ordering.gt, a, b => b < a\n⊢ Ordering.Compares (Ordering.orElse (cmp e₁ e₂) (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\nrevert IHe\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match cmp e₁ e₂, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse (cmp e₁ e₂) (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\ncases cmp e₁ e₂\n[GOAL]\ncase lt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match Ordering.lt, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse Ordering.lt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\ncase eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match Ordering.eq, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\ncase gt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match Ordering.gt, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse Ordering.gt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\ncase lt => intro IHe; exact oadd_lt_oadd_1 h₁ IHe\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match Ordering.lt, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse Ordering.lt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\ncase lt => intro IHe; exact oadd_lt_oadd_1 h₁ IHe\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match Ordering.lt, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse Ordering.lt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\nintro IHe\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\nIHe :\n  match Ordering.lt, e₁, e₂ with\n  | Ordering.lt, a, b => a < b\n  | Ordering.eq, a, b => a = b\n  | Ordering.gt, a, b => b < a\n⊢ Ordering.Compares (Ordering.orElse Ordering.lt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\nexact oadd_lt_oadd_1 h₁ IHe\n[GOAL]\ncase eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match Ordering.eq, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\ncase gt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match Ordering.gt, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse Ordering.gt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\ncase gt => intro IHe; exact oadd_lt_oadd_1 h₂ IHe\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match Ordering.gt, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse Ordering.gt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\ncase gt => intro IHe; exact oadd_lt_oadd_1 h₂ IHe\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match Ordering.gt, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse Ordering.gt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\nintro IHe\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\nIHe :\n  match Ordering.gt, e₁, e₂ with\n  | Ordering.lt, a, b => a < b\n  | Ordering.eq, a, b => a = b\n  | Ordering.gt, a, b => b < a\n⊢ Ordering.Compares (Ordering.orElse Ordering.gt (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\nexact oadd_lt_oadd_1 h₂ IHe\n[GOAL]\ncase eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match Ordering.eq, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\ncase eq =>\n  intro IHe; dsimp at IHe ; subst IHe\n  unfold _root_.cmp; cases nh : cmpUsing (· < ·) (n₁ : ℕ) n₂ <;> rw [cmpUsing, ite_eq_iff, not_lt] at nh \n  case lt =>\n    cases' nh with nh nh\n    · exact oadd_lt_oadd_2 h₁ nh.left\n    · rw [ite_eq_iff] at nh ; cases' nh.right with nh nh <;> cases nh <;> contradiction\n  case gt =>\n    cases' nh with nh nh\n    · cases nh; contradiction\n    · cases' nh with _ nh\n      rw [ite_eq_iff] at nh ; cases' nh with nh nh\n      · exact oadd_lt_oadd_2 h₂ nh.left\n      · cases nh; contradiction\n  cases' nh with nh nh\n  · cases nh; contradiction\n  cases' nh with nhl nhr\n  rw [ite_eq_iff] at nhr \n  cases' nhr with nhr nhr\n  · cases nhr; contradiction\n  obtain rfl := Subtype.eq (eq_of_incomp ⟨(not_lt_of_ge nhl), nhr.left⟩)\n  have IHa := @cmp_compares _ _ h₁.snd h₂.snd\n  revert IHa; cases cmp a₁ a₂ <;> intro IHa <;> dsimp at IHa \n  case lt => exact oadd_lt_oadd_3 IHa\n  case gt => exact oadd_lt_oadd_3 IHa\n  subst IHa; exact rfl\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match Ordering.eq, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\ncase eq =>\n  intro IHe; dsimp at IHe ; subst IHe\n  unfold _root_.cmp; cases nh : cmpUsing (· < ·) (n₁ : ℕ) n₂ <;> rw [cmpUsing, ite_eq_iff, not_lt] at nh \n  case lt =>\n    cases' nh with nh nh\n    · exact oadd_lt_oadd_2 h₁ nh.left\n    · rw [ite_eq_iff] at nh ; cases' nh.right with nh nh <;> cases nh <;> contradiction\n  case gt =>\n    cases' nh with nh nh\n    · cases nh; contradiction\n    · cases' nh with _ nh\n      rw [ite_eq_iff] at nh ; cases' nh with nh nh\n      · exact oadd_lt_oadd_2 h₂ nh.left\n      · cases nh; contradiction\n  cases' nh with nh nh\n  · cases nh; contradiction\n  cases' nh with nhl nhr\n  rw [ite_eq_iff] at nhr \n  cases' nhr with nhr nhr\n  · cases nhr; contradiction\n  obtain rfl := Subtype.eq (eq_of_incomp ⟨(not_lt_of_ge nhl), nhr.left⟩)\n  have IHa := @cmp_compares _ _ h₁.snd h₂.snd\n  revert IHa; cases cmp a₁ a₂ <;> intro IHa <;> dsimp at IHa \n  case lt => exact oadd_lt_oadd_3 IHa\n  case gt => exact oadd_lt_oadd_3 IHa\n  subst IHa; exact rfl\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n⊢ (match Ordering.eq, e₁, e₂ with\n    | Ordering.lt, a, b => a < b\n    | Ordering.eq, a, b => a = b\n    | Ordering.gt, a, b => b < a) →\n    Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\nintro IHe\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\nIHe :\n  match Ordering.eq, e₁, e₂ with\n  | Ordering.lt, a, b => a < b\n  | Ordering.eq, a, b => a = b\n  | Ordering.gt, a, b => b < a\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\ndsimp at IHe \n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh✝ : o₂ = oadd e₂ n₂ a₂\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh₂ : NF (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\nIHe : e₁ = e₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₂ n₂ a₂) h✝)\n[PROOFSTEP]\nsubst IHe\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse (_root_.cmp ↑n₁ ↑n₂) (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\nunfold _root_.cmp\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n⊢ Ordering.Compares\n    (Ordering.orElse Ordering.eq (Ordering.orElse (cmpUsing (fun x x_1 => x < x_1) ↑n₁ ↑n₂) (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases nh : cmpUsing (· < ·) (n₁ : ℕ) n₂\n[GOAL]\ncase lt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : cmpUsing (fun x x_1 => x < x_1) ↑n₁ ↑n₂ = Ordering.lt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\nrw [cmpUsing, ite_eq_iff, not_lt] at nh \n[GOAL]\ncase eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : cmpUsing (fun x x_1 => x < x_1) ↑n₁ ↑n₂ = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\nrw [cmpUsing, ite_eq_iff, not_lt] at nh \n[GOAL]\ncase gt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : cmpUsing (fun x x_1 => x < x_1) ↑n₁ ↑n₂ = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\nrw [cmpUsing, ite_eq_iff, not_lt] at nh \n[GOAL]\ncase lt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.lt ∨ ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.lt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\ncase eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.eq ∨ ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\ncase gt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.gt ∨ ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncase lt =>\n  cases' nh with nh nh\n  · exact oadd_lt_oadd_2 h₁ nh.left\n  · rw [ite_eq_iff] at nh ; cases' nh.right with nh nh <;> cases nh <;> contradiction\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.lt ∨ ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.lt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncase lt =>\n  cases' nh with nh nh\n  · exact oadd_lt_oadd_2 h₁ nh.left\n  · rw [ite_eq_iff] at nh ; cases' nh.right with nh nh <;> cases nh <;> contradiction\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.lt ∨ ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.lt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases' nh with nh nh\n[GOAL]\ncase inl\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.lt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\nexact oadd_lt_oadd_2 h₁ nh.left\n[GOAL]\ncase inr\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.lt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\nrw [ite_eq_iff] at nh \n[GOAL]\ncase inr\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₂ ≤ ↑n₁ ∧ (↑n₂ < ↑n₁ ∧ Ordering.gt = Ordering.lt ∨ ¬↑n₂ < ↑n₁ ∧ Ordering.eq = Ordering.lt)\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases' nh.right with nh nh\n[GOAL]\ncase inr.inl\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh✝ : ↑n₂ ≤ ↑n₁ ∧ (↑n₂ < ↑n₁ ∧ Ordering.gt = Ordering.lt ∨ ¬↑n₂ < ↑n₁ ∧ Ordering.eq = Ordering.lt)\nnh : ↑n₂ < ↑n₁ ∧ Ordering.gt = Ordering.lt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases nh\n[GOAL]\ncase inr.inr\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh✝ : ↑n₂ ≤ ↑n₁ ∧ (↑n₂ < ↑n₁ ∧ Ordering.gt = Ordering.lt ∨ ¬↑n₂ < ↑n₁ ∧ Ordering.eq = Ordering.lt)\nnh : ¬↑n₂ < ↑n₁ ∧ Ordering.eq = Ordering.lt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases nh\n[GOAL]\ncase inr.inl.intro\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₂ ≤ ↑n₁ ∧ (↑n₂ < ↑n₁ ∧ Ordering.gt = Ordering.lt ∨ ¬↑n₂ < ↑n₁ ∧ Ordering.eq = Ordering.lt)\nleft✝ : ↑n₂ < ↑n₁\nright✝ : Ordering.gt = Ordering.lt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase inr.inr.intro\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₂ ≤ ↑n₁ ∧ (↑n₂ < ↑n₁ ∧ Ordering.gt = Ordering.lt ∨ ¬↑n₂ < ↑n₁ ∧ Ordering.eq = Ordering.lt)\nleft✝ : ¬↑n₂ < ↑n₁\nright✝ : Ordering.eq = Ordering.lt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.lt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.eq ∨ ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\ncase gt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.gt ∨ ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncase gt =>\n  cases' nh with nh nh\n  · cases nh; contradiction\n  · cases' nh with _ nh\n    rw [ite_eq_iff] at nh ; cases' nh with nh nh\n    · exact oadd_lt_oadd_2 h₂ nh.left\n    · cases nh; contradiction\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.gt ∨ ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncase gt =>\n  cases' nh with nh nh\n  · cases nh; contradiction\n  · cases' nh with _ nh\n    rw [ite_eq_iff] at nh ; cases' nh with nh nh\n    · exact oadd_lt_oadd_2 h₂ nh.left\n    · cases nh; contradiction\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.gt ∨ ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases' nh with nh nh\n[GOAL]\ncase inl\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases nh\n[GOAL]\ncase inl.intro\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nleft✝ : ↑n₁ < ↑n₂\nright✝ : Ordering.lt = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase inr\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases' nh with _ nh\n[GOAL]\ncase inr.intro\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nleft✝ : ↑n₂ ≤ ↑n₁\nnh : (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\nrw [ite_eq_iff] at nh \n[GOAL]\ncase inr.intro\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nleft✝ : ↑n₂ ≤ ↑n₁\nnh : ↑n₂ < ↑n₁ ∧ Ordering.gt = Ordering.gt ∨ ¬↑n₂ < ↑n₁ ∧ Ordering.eq = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases' nh with nh nh\n[GOAL]\ncase inr.intro.inl\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nleft✝ : ↑n₂ ≤ ↑n₁\nnh : ↑n₂ < ↑n₁ ∧ Ordering.gt = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\nexact oadd_lt_oadd_2 h₂ nh.left\n[GOAL]\ncase inr.intro.inr\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nleft✝ : ↑n₂ ≤ ↑n₁\nnh : ¬↑n₂ < ↑n₁ ∧ Ordering.eq = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases nh\n[GOAL]\ncase inr.intro.inr.intro\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nleft✝¹ : ↑n₂ ≤ ↑n₁\nleft✝ : ¬↑n₂ < ↑n₁\nright✝ : Ordering.eq = Ordering.gt\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.gt (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.eq ∨ ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases' nh with nh nh\n[GOAL]\ncase eq.inl\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₁ < ↑n₂ ∧ Ordering.lt = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases nh\n[GOAL]\ncase eq.inl.intro\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nleft✝ : ↑n₁ < ↑n₂\nright✝ : Ordering.lt = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase eq.inr\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnh : ↑n₂ ≤ ↑n₁ ∧ (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases' nh with nhl nhr\n[GOAL]\ncase eq.inr.intro\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnhl : ↑n₂ ≤ ↑n₁\nnhr : (if ↑n₂ < ↑n₁ then Ordering.gt else Ordering.eq) = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\nrw [ite_eq_iff] at nhr \n[GOAL]\ncase eq.inr.intro\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnhl : ↑n₂ ≤ ↑n₁\nnhr : ↑n₂ < ↑n₁ ∧ Ordering.gt = Ordering.eq ∨ ¬↑n₂ < ↑n₁ ∧ Ordering.eq = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases' nhr with nhr nhr\n[GOAL]\ncase eq.inr.intro.inl\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnhl : ↑n₂ ≤ ↑n₁\nnhr : ↑n₂ < ↑n₁ ∧ Ordering.gt = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncases nhr\n[GOAL]\ncase eq.inr.intro.inl.intro\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnhl : ↑n₂ ≤ ↑n₁\nleft✝ : ↑n₂ < ↑n₁\nright✝ : Ordering.gt = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase eq.inr.intro.inr\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₂ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\nnhl : ↑n₂ ≤ ↑n₁\nnhr : ¬↑n₂ < ↑n₁ ∧ Ordering.eq = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₂ a₂) h✝)\n[PROOFSTEP]\nobtain rfl := Subtype.eq (eq_of_incomp ⟨(not_lt_of_ge nhl), nhr.left⟩)\n[GOAL]\ncase eq.inr.intro.inr\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\nhave IHa := @cmp_compares _ _ h₁.snd h₂.snd\n[GOAL]\ncase eq.inr.intro.inr\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : Ordering.Compares (cmp a₁ a₂) a₁ a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\nrevert IHa\n[GOAL]\ncase eq.inr.intro.inr\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\n⊢ Ordering.Compares (cmp a₁ a₂) a₁ a₂ →\n    Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq (cmp a₁ a₂)))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\ncases cmp a₁ a₂\n[GOAL]\ncase eq.inr.intro.inr.lt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\n⊢ Ordering.Compares Ordering.lt a₁ a₂ →\n    Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.lt))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\nintro IHa\n[GOAL]\ncase eq.inr.intro.inr.eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\n⊢ Ordering.Compares Ordering.eq a₁ a₂ →\n    Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.eq))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\nintro IHa\n[GOAL]\ncase eq.inr.intro.inr.gt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\n⊢ Ordering.Compares Ordering.gt a₁ a₂ →\n    Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.gt))\n      (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\nintro IHa\n[GOAL]\ncase eq.inr.intro.inr.lt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : Ordering.Compares Ordering.lt a₁ a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.lt))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\ndsimp at IHa \n[GOAL]\ncase eq.inr.intro.inr.eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : Ordering.Compares Ordering.eq a₁ a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.eq))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\ndsimp at IHa \n[GOAL]\ncase eq.inr.intro.inr.gt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : Ordering.Compares Ordering.gt a₁ a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.gt))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\ndsimp at IHa \n[GOAL]\ncase eq.inr.intro.inr.lt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : a₁ < a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.lt))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\ncase eq.inr.intro.inr.eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : a₁ = a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.eq))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\ncase eq.inr.intro.inr.gt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : a₁ > a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.gt))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\ncase lt => exact oadd_lt_oadd_3 IHa\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : a₁ < a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.lt))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\ncase lt => exact oadd_lt_oadd_3 IHa\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : a₁ < a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.lt))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\nexact oadd_lt_oadd_3 IHa\n[GOAL]\ncase eq.inr.intro.inr.eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : a₁ = a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.eq))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\ncase eq.inr.intro.inr.gt\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : a₁ > a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.gt))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\ncase gt => exact oadd_lt_oadd_3 IHa\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : a₁ > a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.gt))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\ncase gt => exact oadd_lt_oadd_3 IHa\n[GOAL]\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : a₁ > a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.gt))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\nexact oadd_lt_oadd_3 IHa\n[GOAL]\ncase eq.inr.intro.inr.eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ a₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nh✝ : o₂ = oadd e₁ n₁ a₂\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nIHa : a₁ = a₂\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.eq))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₂) h✝)\n[PROOFSTEP]\nsubst IHa\n[GOAL]\ncase eq.inr.intro.inr.eq\no₁ e₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nh✝¹ : o₁ = oadd e₁ n₁ a₁\no₂ : ONote\nh₁ : NF (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹)\nnhl : ↑n₁ ≤ ↑n₁\nnhr : ¬↑n₁ < ↑n₁ ∧ Ordering.eq = Ordering.eq\nh✝ : o₂ = oadd e₁ n₁ a₁\nh₂ : NF (namedPattern o₂ (oadd e₁ n₁ a₁) h✝)\n⊢ Ordering.Compares (Ordering.orElse Ordering.eq (Ordering.orElse Ordering.eq Ordering.eq))\n    (namedPattern o₁ (oadd e₁ n₁ a₁) h✝¹) (namedPattern o₂ (oadd e₁ n₁ a₁) h✝)\n[PROOFSTEP]\nexact rfl\n[GOAL]\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na : ONote\nh : NF (ONote.oadd e n a)\nd : ω ^ b ∣ repr (ONote.oadd e n a)\n⊢ b ≤ repr e ∧ ω ^ b ∣ repr a\n[PROOFSTEP]\nhave := mt repr_inj.1 (fun h => by injection h : ONote.oadd e n a ≠ 0)\n[GOAL]\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na : ONote\nh✝ : NF (ONote.oadd e n a)\nd : ω ^ b ∣ repr (ONote.oadd e n a)\nh : ONote.oadd e n a = 0\n⊢ False\n[PROOFSTEP]\ninjection h\n[GOAL]\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na : ONote\nh : NF (ONote.oadd e n a)\nd : ω ^ b ∣ repr (ONote.oadd e n a)\nthis : ¬repr (ONote.oadd e n a) = repr 0\n⊢ b ≤ repr e ∧ ω ^ b ∣ repr a\n[PROOFSTEP]\nhave L := le_of_not_lt fun l => not_le_of_lt (h.below_of_lt l).repr_lt (le_of_dvd this d)\n[GOAL]\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na : ONote\nh : NF (ONote.oadd e n a)\nd : ω ^ b ∣ repr (ONote.oadd e n a)\nthis : ¬repr (ONote.oadd e n a) = repr 0\nL : b ≤ repr e\n⊢ b ≤ repr e ∧ ω ^ b ∣ repr a\n[PROOFSTEP]\nsimp at d \n[GOAL]\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na : ONote\nh : NF (ONote.oadd e n a)\nd : ω ^ b ∣ ω ^ repr e * ↑↑n + repr a\nthis : ¬repr (ONote.oadd e n a) = repr 0\nL : b ≤ repr e\n⊢ b ≤ repr e ∧ ω ^ b ∣ repr a\n[PROOFSTEP]\nexact ⟨L, (dvd_add_iff <| (opow_dvd_opow _ L).mul_right _).1 d⟩\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nh : NF (ONote.oadd e n a)\n⊢ ω ∣ repr (ONote.oadd e n a) → repr e ≠ 0 ∧ ω ∣ repr a\n[PROOFSTEP]\nrw [← opow_one ω, ← one_le_iff_ne_zero]\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nh : NF (ONote.oadd e n a)\n⊢ ω ^ 1 ∣ repr (ONote.oadd e n a) → 1 ≤ repr e ∧ ω ^ 1 ∣ repr a\n[PROOFSTEP]\nexact h.of_dvd_omega_opow\n[GOAL]\n⊢ DecidableRel TopBelow\n[PROOFSTEP]\nintro b o\n[GOAL]\nb o : ONote\n⊢ Decidable (TopBelow b o)\n[PROOFSTEP]\ncases o\n[GOAL]\ncase zero\nb : ONote\n⊢ Decidable (TopBelow b zero)\n[PROOFSTEP]\ndelta TopBelow\n[GOAL]\ncase oadd\nb a✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\n⊢ Decidable (TopBelow b (oadd a✝² a✝¹ a✝))\n[PROOFSTEP]\ndelta TopBelow\n[GOAL]\ncase zero\nb : ONote\n⊢ Decidable\n    (match zero with\n    | zero => True\n    | oadd e a a_1 => cmp e b = Ordering.lt)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase oadd\nb a✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\n⊢ Decidable\n    (match oadd a✝² a✝¹ a✝ with\n    | zero => True\n    | oadd e a a_1 => cmp e b = Ordering.lt)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\n⊢ Decidable (NF (oadd e n a))\n[PROOFSTEP]\nhave := decidableNF e\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nthis : Decidable (NF e)\n⊢ Decidable (NF (oadd e n a))\n[PROOFSTEP]\nhave := decidableNF a\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nthis✝ : Decidable (NF e)\nthis : Decidable (NF a)\n⊢ Decidable (NF (oadd e n a))\n[PROOFSTEP]\napply decidable_of_iff (NF e ∧ NF a ∧ TopBelow e a)\n[GOAL]\ncase h\ne : ONote\nn : ℕ+\na : ONote\nthis✝ : Decidable (NF e)\nthis : Decidable (NF a)\n⊢ NF e ∧ NF a ∧ TopBelow e a ↔ NF (oadd e n a)\n[PROOFSTEP]\nrw [← and_congr_right fun h => @nfBelow_iff_topBelow _ h _]\n[GOAL]\ncase h\ne : ONote\nn : ℕ+\na : ONote\nthis✝ : Decidable (NF e)\nthis : Decidable (NF a)\n⊢ NF e ∧ NFBelow a (repr e) ↔ NF (oadd e n a)\n[PROOFSTEP]\nexact ⟨fun ⟨h₁, h₂⟩ => NF.oadd h₁ n h₂, fun h => ⟨h.fst, h.snd'⟩⟩\n[GOAL]\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\n⊢ NFBelow (oadd e n a + o) b\n[PROOFSTEP]\nhave h' := add_nfBelow (h₁.snd.mono <| le_of_lt h₁.lt) h₂\n[GOAL]\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\nh' : NFBelow (a + o) b\n⊢ NFBelow (oadd e n a + o) b\n[PROOFSTEP]\nsimp [oadd_add]\n[GOAL]\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\nh' : NFBelow (a + o) b\n⊢ NFBelow (addAux e n (a + o)) b\n[PROOFSTEP]\nrevert h'\n[GOAL]\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\n⊢ NFBelow (a + o) b → NFBelow (addAux e n (a + o)) b\n[PROOFSTEP]\ncases' a + o with e' n' a'\n[GOAL]\ncase zero\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\n⊢ NFBelow zero b → NFBelow (addAux e n zero) b\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase oadd\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\n⊢ NFBelow (oadd e' n' a') b → NFBelow (addAux e n (oadd e' n' a')) b\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase zero\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\nh' : NFBelow zero b\n⊢ NFBelow (addAux e n zero) b\n[PROOFSTEP]\nexact NFBelow.oadd h₁.fst NFBelow.zero h₁.lt\n[GOAL]\ncase oadd\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\n⊢ NFBelow (addAux e n (oadd e' n' a')) b\n[PROOFSTEP]\nhave : ((e.cmp e').Compares e e') := @cmp_compares _ _ h₁.fst h'.fst\n[GOAL]\ncase oadd\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\nthis : Ordering.Compares (cmp e e') e e'\n⊢ NFBelow (addAux e n (oadd e' n' a')) b\n[PROOFSTEP]\ncases h : cmp e e'\n[GOAL]\ncase oadd.lt\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\nthis : Ordering.Compares (cmp e e') e e'\nh : cmp e e' = Ordering.lt\n⊢ NFBelow (addAux e n (oadd e' n' a')) b\n[PROOFSTEP]\ndsimp [addAux]\n[GOAL]\ncase oadd.eq\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\nthis : Ordering.Compares (cmp e e') e e'\nh : cmp e e' = Ordering.eq\n⊢ NFBelow (addAux e n (oadd e' n' a')) b\n[PROOFSTEP]\ndsimp [addAux]\n[GOAL]\ncase oadd.gt\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\nthis : Ordering.Compares (cmp e e') e e'\nh : cmp e e' = Ordering.gt\n⊢ NFBelow (addAux e n (oadd e' n' a')) b\n[PROOFSTEP]\ndsimp [addAux]\n[GOAL]\ncase oadd.lt\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\nthis : Ordering.Compares (cmp e e') e e'\nh : cmp e e' = Ordering.lt\n⊢ NFBelow\n    (match cmp e e' with\n    | Ordering.lt => oadd e' n' a'\n    | Ordering.eq => oadd e (n + n') a'\n    | Ordering.gt => oadd e n (oadd e' n' a'))\n    b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase oadd.eq\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\nthis : Ordering.Compares (cmp e e') e e'\nh : cmp e e' = Ordering.eq\n⊢ NFBelow\n    (match cmp e e' with\n    | Ordering.lt => oadd e' n' a'\n    | Ordering.eq => oadd e (n + n') a'\n    | Ordering.gt => oadd e n (oadd e' n' a'))\n    b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase oadd.gt\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\nthis : Ordering.Compares (cmp e e') e e'\nh : cmp e e' = Ordering.gt\n⊢ NFBelow\n    (match cmp e e' with\n    | Ordering.lt => oadd e' n' a'\n    | Ordering.eq => oadd e (n + n') a'\n    | Ordering.gt => oadd e n (oadd e' n' a'))\n    b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase oadd.lt\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\nthis : Ordering.Compares (cmp e e') e e'\nh : cmp e e' = Ordering.lt\n⊢ NFBelow (oadd e' n' a') b\n[PROOFSTEP]\nexact h'\n[GOAL]\ncase oadd.eq\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\nthis : Ordering.Compares (cmp e e') e e'\nh : cmp e e' = Ordering.eq\n⊢ NFBelow (oadd e (n + n') a') b\n[PROOFSTEP]\nsimp [h] at this \n[GOAL]\ncase oadd.eq\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\nh : cmp e e' = Ordering.eq\nthis : e = e'\n⊢ NFBelow (oadd e (n + n') a') b\n[PROOFSTEP]\nsubst e'\n[GOAL]\ncase oadd.eq\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e n' a') b\nh : cmp e e = Ordering.eq\n⊢ NFBelow (oadd e (n + n') a') b\n[PROOFSTEP]\nexact NFBelow.oadd h'.fst h'.snd h'.lt\n[GOAL]\ncase oadd.gt\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\nthis : Ordering.Compares (cmp e e') e e'\nh : cmp e e' = Ordering.gt\n⊢ NFBelow (oadd e n (oadd e' n' a')) b\n[PROOFSTEP]\nsimp [h] at this \n[GOAL]\ncase oadd.gt\nb : Ordinal.{0}\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NFBelow (oadd e n a) b\nh₂ : NFBelow o b\ne' : ONote\nn' : ℕ+\na' : ONote\nh' : NFBelow (oadd e' n' a') b\nh : cmp e e' = Ordering.gt\nthis : e' < e\n⊢ NFBelow (oadd e n (oadd e' n' a')) b\n[PROOFSTEP]\nexact NFBelow.oadd h₁.fst (NF.below_of_lt this ⟨⟨_, h'⟩⟩) h₁.lt\n[GOAL]\no : ONote\nx✝¹ : NF 0\nx✝ : NF o\n⊢ repr (0 + o) = repr 0 + repr o\n[PROOFSTEP]\nsimp\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\n⊢ repr (oadd e n a + o) = repr (oadd e n a) + repr o\n[PROOFSTEP]\nhaveI := h₁.snd\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\n⊢ repr (oadd e n a + o) = repr (oadd e n a) + repr o\n[PROOFSTEP]\nhave h' := repr_add a o\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (a + o) = repr a + repr o\n⊢ repr (oadd e n a + o) = repr (oadd e n a) + repr o\n[PROOFSTEP]\nconv_lhs at h' => simp [HAdd.hAdd, Add.add]\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (a + o) = repr a + repr o\n| repr (a + o)\n[PROOFSTEP]\nsimp [HAdd.hAdd, Add.add]\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (a + o) = repr a + repr o\n| repr (a + o)\n[PROOFSTEP]\nsimp [HAdd.hAdd, Add.add]\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (a + o) = repr a + repr o\n| repr (a + o)\n[PROOFSTEP]\nsimp [HAdd.hAdd, Add.add]\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\n⊢ repr (oadd e n a + o) = repr (oadd e n a) + repr o\n[PROOFSTEP]\nhave nf := ONote.add_nf a o\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\nnf : NF (a + o)\n⊢ repr (oadd e n a + o) = repr (oadd e n a) + repr o\n[PROOFSTEP]\nconv at nf => simp [HAdd.hAdd, Add.add]\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\nnf : NF (a + o)\n| NF (a + o)\n[PROOFSTEP]\nsimp [HAdd.hAdd, Add.add]\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\nnf : NF (a + o)\n| NF (a + o)\n[PROOFSTEP]\nsimp [HAdd.hAdd, Add.add]\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\nnf : NF (a + o)\n| NF (a + o)\n[PROOFSTEP]\nsimp [HAdd.hAdd, Add.add]\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\nnf : NF (add a o)\n⊢ repr (oadd e n a + o) = repr (oadd e n a) + repr o\n[PROOFSTEP]\nconv in _ + o => simp [HAdd.hAdd, Add.add]\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\nnf : NF (add a o)\n| oadd e n a + o\n[PROOFSTEP]\nsimp [HAdd.hAdd, Add.add]\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\nnf : NF (add a o)\n| oadd e n a + o\n[PROOFSTEP]\nsimp [HAdd.hAdd, Add.add]\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\nnf : NF (add a o)\n| oadd e n a + o\n[PROOFSTEP]\nsimp [HAdd.hAdd, Add.add]\n[GOAL]\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\nnf : NF (add a o)\n⊢ repr (add (oadd e n a) o) = repr (oadd e n a) + repr o\n[PROOFSTEP]\ncases' h : add a o with e' n' a'\n[GOAL]\ncase zero\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\nnf : NF (add a o)\nh : add a o = zero\n⊢ repr (add (oadd e n a) o) = repr (oadd e n a) + repr o\n[PROOFSTEP]\nsimp only [Add.add, add, addAux, h'.symm, h, add_assoc, repr] at nf h₁ ⊢\n[GOAL]\ncase oadd\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\nnf : NF (add a o)\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\n⊢ repr (add (oadd e n a) o) = repr (oadd e n a) + repr o\n[PROOFSTEP]\nsimp only [Add.add, add, addAux, h'.symm, h, add_assoc, repr] at nf h₁ ⊢\n[GOAL]\ncase oadd\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\n⊢ repr\n      (match cmp e e' with\n      | Ordering.lt => oadd e' n' a'\n      | Ordering.eq => oadd e (n + n') a'\n      | Ordering.gt => oadd e n (oadd e' n' a')) =\n    ω ^ repr e * ↑↑n + (ω ^ repr e' * ↑↑n' + repr a')\n[PROOFSTEP]\nhave := h₁.fst\n[GOAL]\ncase oadd\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝ : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis : NF e\n⊢ repr\n      (match cmp e e' with\n      | Ordering.lt => oadd e' n' a'\n      | Ordering.eq => oadd e (n + n') a'\n      | Ordering.gt => oadd e n (oadd e' n' a')) =\n    ω ^ repr e * ↑↑n + (ω ^ repr e' * ↑↑n' + repr a')\n[PROOFSTEP]\nhaveI := nf.fst\n[GOAL]\ncase oadd\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝¹ : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝ : NF e\nthis : NF e'\n⊢ repr\n      (match cmp e e' with\n      | Ordering.lt => oadd e' n' a'\n      | Ordering.eq => oadd e (n + n') a'\n      | Ordering.gt => oadd e n (oadd e' n' a')) =\n    ω ^ repr e * ↑↑n + (ω ^ repr e' * ↑↑n' + repr a')\n[PROOFSTEP]\nhave ee := cmp_compares e e'\n[GOAL]\ncase oadd\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝¹ : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝ : NF e\nthis : NF e'\nee : Ordering.Compares (cmp e e') e e'\n⊢ repr\n      (match cmp e e' with\n      | Ordering.lt => oadd e' n' a'\n      | Ordering.eq => oadd e (n + n') a'\n      | Ordering.gt => oadd e n (oadd e' n' a')) =\n    ω ^ repr e * ↑↑n + (ω ^ repr e' * ↑↑n' + repr a')\n[PROOFSTEP]\ncases he : cmp e e'\n[GOAL]\ncase oadd.lt\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝¹ : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝ : NF e\nthis : NF e'\nee : Ordering.Compares (cmp e e') e e'\nhe : cmp e e' = Ordering.lt\n⊢ repr\n      (match Ordering.lt with\n      | Ordering.lt => oadd e' n' a'\n      | Ordering.eq => oadd e (n + n') a'\n      | Ordering.gt => oadd e n (oadd e' n' a')) =\n    ω ^ repr e * ↑↑n + (ω ^ repr e' * ↑↑n' + repr a')\n[PROOFSTEP]\nsimp [he] at ee ⊢\n[GOAL]\ncase oadd.eq\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝¹ : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝ : NF e\nthis : NF e'\nee : Ordering.Compares (cmp e e') e e'\nhe : cmp e e' = Ordering.eq\n⊢ repr\n      (match Ordering.eq with\n      | Ordering.lt => oadd e' n' a'\n      | Ordering.eq => oadd e (n + n') a'\n      | Ordering.gt => oadd e n (oadd e' n' a')) =\n    ω ^ repr e * ↑↑n + (ω ^ repr e' * ↑↑n' + repr a')\n[PROOFSTEP]\nsimp [he] at ee ⊢\n[GOAL]\ncase oadd.gt\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝¹ : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝ : NF e\nthis : NF e'\nee : Ordering.Compares (cmp e e') e e'\nhe : cmp e e' = Ordering.gt\n⊢ repr\n      (match Ordering.gt with\n      | Ordering.lt => oadd e' n' a'\n      | Ordering.eq => oadd e (n + n') a'\n      | Ordering.gt => oadd e n (oadd e' n' a')) =\n    ω ^ repr e * ↑↑n + (ω ^ repr e' * ↑↑n' + repr a')\n[PROOFSTEP]\nsimp [he] at ee ⊢\n[GOAL]\ncase oadd.lt\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝¹ : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝ : NF e\nthis : NF e'\nhe : cmp e e' = Ordering.lt\nee : e < e'\n⊢ ω ^ repr e' * ↑↑n' + repr a' = ω ^ repr e * ↑↑n + (ω ^ repr e' * ↑↑n' + repr a')\n[PROOFSTEP]\nrw [← add_assoc, @add_absorp _ (repr e') (ω ^ repr e' * (n' : ℕ))]\n[GOAL]\ncase oadd.lt.h₁\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝¹ : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝ : NF e\nthis : NF e'\nhe : cmp e e' = Ordering.lt\nee : e < e'\n⊢ ω ^ repr e * ↑↑n < ω ^ repr e'\n[PROOFSTEP]\nhave := (h₁.below_of_lt ee).repr_lt\n[GOAL]\ncase oadd.lt.h₁\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝² : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝¹ : NF e\nthis✝ : NF e'\nhe : cmp e e' = Ordering.lt\nee : e < e'\nthis : repr (oadd e n a) < ω ^ repr e'\n⊢ ω ^ repr e * ↑↑n < ω ^ repr e'\n[PROOFSTEP]\nunfold repr at this \n[GOAL]\ncase oadd.lt.h₁\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝² : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝¹ : NF e\nthis✝ : NF e'\nhe : cmp e e' = Ordering.lt\nee : e < e'\nthis :\n  ω ^ repr e * ↑↑n + repr a <\n    ω ^\n      match e' with\n      | zero => 0\n      | oadd e n a => ω ^ repr e * ↑↑n + repr a\n⊢ ω ^ repr e * ↑↑n < ω ^ repr e'\n[PROOFSTEP]\ncases he' : e'\n[GOAL]\ncase oadd.lt.h₁.zero\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝² : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝¹ : NF e\nthis✝ : NF e'\nhe : cmp e e' = Ordering.lt\nee : e < e'\nthis :\n  ω ^ repr e * ↑↑n + repr a <\n    ω ^\n      match e' with\n      | zero => 0\n      | oadd e n a => ω ^ repr e * ↑↑n + repr a\nhe' : e' = zero\n⊢ ω ^ repr e * ↑↑n < ω ^ repr zero\n[PROOFSTEP]\nsimp [he'] at this ⊢\n[GOAL]\ncase oadd.lt.h₁.oadd\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝² : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝¹ : NF e\nthis✝ : NF e'\nhe : cmp e e' = Ordering.lt\nee : e < e'\nthis :\n  ω ^ repr e * ↑↑n + repr a <\n    ω ^\n      match e' with\n      | zero => 0\n      | oadd e n a => ω ^ repr e * ↑↑n + repr a\na✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\nhe' : e' = oadd a✝² a✝¹ a✝\n⊢ ω ^ repr e * ↑↑n < ω ^ repr (oadd a✝² a✝¹ a✝)\n[PROOFSTEP]\nsimp [he'] at this ⊢\n[GOAL]\ncase oadd.lt.h₁.zero\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝² : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝¹ : NF e\nthis✝ : NF e'\nhe : cmp e e' = Ordering.lt\nee : e < e'\nhe' : e' = zero\nthis : ω ^ repr e * ↑↑n + repr a < 1\n⊢ ω ^ repr e * ↑↑n < 1\n[PROOFSTEP]\nexact lt_of_le_of_lt (le_add_right _ _) this\n[GOAL]\ncase oadd.lt.h₁.oadd\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝² : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝¹ : NF e\nthis✝ : NF e'\nhe : cmp e e' = Ordering.lt\nee : e < e'\na✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\nhe' : e' = oadd a✝² a✝¹ a✝\nthis : ω ^ repr e * ↑↑n + repr a < ω ^ (ω ^ repr a✝² * ↑↑a✝¹ + repr a✝)\n⊢ ω ^ repr e * ↑↑n < ω ^ (ω ^ repr a✝² * ↑↑a✝¹ + repr a✝)\n[PROOFSTEP]\nexact lt_of_le_of_lt (le_add_right _ _) this\n[GOAL]\ncase oadd.lt.h₂\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝¹ : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝ : NF e\nthis : NF e'\nhe : cmp e e' = Ordering.lt\nee : e < e'\n⊢ ω ^ repr e' ≤ ω ^ repr e' * ↑↑n'\n[PROOFSTEP]\nsimpa using (Ordinal.mul_le_mul_iff_left <| opow_pos (repr e') omega_pos).2 (nat_cast_le.2 n'.pos)\n[GOAL]\ncase oadd.eq\ne : ONote\nn : ℕ+\na o : ONote\nh₁ : NF (oadd e n a)\nh₂ : NF o\nthis✝¹ : NF a\nh' : repr (add a o) = repr a + repr o\ne' : ONote\nn' : ℕ+\na' : ONote\nh : add a o = oadd e' n' a'\nnf : NF (oadd e' n' a')\nthis✝ : NF e\nthis : NF e'\nhe : cmp e e' = Ordering.eq\nee : e = e'\n⊢ ω ^ repr e * (↑↑n + ↑↑n') + repr a' = ω ^ repr e * ↑↑n + (ω ^ repr e' * ↑↑n' + repr a')\n[PROOFSTEP]\nrw [ee, ← add_assoc, ← mul_add, ← Nat.cast_add]\n[GOAL]\no : ONote\nb : Ordinal.{0}\nx✝ : NFBelow 0 b\nh₂ : NF o\n⊢ NFBelow (0 - o) b\n[PROOFSTEP]\ncases o\n[GOAL]\ncase zero\nb : Ordinal.{0}\nx✝ : NFBelow 0 b\nh₂ : NF zero\n⊢ NFBelow (0 - zero) b\n[PROOFSTEP]\nexact NFBelow.zero\n[GOAL]\ncase oadd\nb : Ordinal.{0}\nx✝ : NFBelow 0 b\na✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\nh₂ : NF (oadd a✝² a✝¹ a✝)\n⊢ NFBelow (0 - oadd a✝² a✝¹ a✝) b\n[PROOFSTEP]\nexact NFBelow.zero\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh₂ : NF (oadd e₂ n₂ a₂)\n⊢ NFBelow (oadd e₁ n₁ a₁ - oadd e₂ n₂ a₂) b\n[PROOFSTEP]\nhave h' := sub_nfBelow h₁.snd h₂.snd\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh₂ : NF (oadd e₂ n₂ a₂)\nh' : NFBelow (a₁ - a₂) (repr e₁)\n⊢ NFBelow (oadd e₁ n₁ a₁ - oadd e₂ n₂ a₂) b\n[PROOFSTEP]\nsimp only [HSub.hSub, Sub.sub, sub] at h' ⊢\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh₂ : NF (oadd e₂ n₂ a₂)\nh' : NFBelow (sub a₁ a₂) (repr e₁)\n⊢ NFBelow\n    (match cmp e₁ e₂ with\n    | Ordering.lt => 0\n    | Ordering.gt => oadd e₁ n₁ a₁\n    | Ordering.eq =>\n      match Nat.sub ↑n₁ ↑n₂ with\n      | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n      | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁)\n    b\n[PROOFSTEP]\nhave := @cmp_compares _ _ h₁.fst h₂.fst\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh₂ : NF (oadd e₂ n₂ a₂)\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nthis : Ordering.Compares (cmp e₁ e₂) e₁ e₂\n⊢ NFBelow\n    (match cmp e₁ e₂ with\n    | Ordering.lt => 0\n    | Ordering.gt => oadd e₁ n₁ a₁\n    | Ordering.eq =>\n      match Nat.sub ↑n₁ ↑n₂ with\n      | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n      | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁)\n    b\n[PROOFSTEP]\ncases h : cmp e₁ e₂\n[GOAL]\ncase lt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh₂ : NF (oadd e₂ n₂ a₂)\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nthis : Ordering.Compares (cmp e₁ e₂) e₁ e₂\nh : cmp e₁ e₂ = Ordering.lt\n⊢ NFBelow\n    (match Ordering.lt with\n    | Ordering.lt => 0\n    | Ordering.gt => oadd e₁ n₁ a₁\n    | Ordering.eq =>\n      match Nat.sub ↑n₁ ↑n₂ with\n      | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n      | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁)\n    b\n[PROOFSTEP]\nsimp [sub]\n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh₂ : NF (oadd e₂ n₂ a₂)\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nthis : Ordering.Compares (cmp e₁ e₂) e₁ e₂\nh : cmp e₁ e₂ = Ordering.eq\n⊢ NFBelow\n    (match Ordering.eq with\n    | Ordering.lt => 0\n    | Ordering.gt => oadd e₁ n₁ a₁\n    | Ordering.eq =>\n      match Nat.sub ↑n₁ ↑n₂ with\n      | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n      | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁)\n    b\n[PROOFSTEP]\nsimp [sub]\n[GOAL]\ncase gt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh₂ : NF (oadd e₂ n₂ a₂)\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nthis : Ordering.Compares (cmp e₁ e₂) e₁ e₂\nh : cmp e₁ e₂ = Ordering.gt\n⊢ NFBelow\n    (match Ordering.gt with\n    | Ordering.lt => 0\n    | Ordering.gt => oadd e₁ n₁ a₁\n    | Ordering.eq =>\n      match Nat.sub ↑n₁ ↑n₂ with\n      | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n      | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁)\n    b\n[PROOFSTEP]\nsimp [sub]\n[GOAL]\ncase lt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh₂ : NF (oadd e₂ n₂ a₂)\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nthis : Ordering.Compares (cmp e₁ e₂) e₁ e₂\nh : cmp e₁ e₂ = Ordering.lt\n⊢ NFBelow 0 b\n[PROOFSTEP]\napply NFBelow.zero\n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh₂ : NF (oadd e₂ n₂ a₂)\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nthis : Ordering.Compares (cmp e₁ e₂) e₁ e₂\nh : cmp e₁ e₂ = Ordering.eq\n⊢ NFBelow\n    (match ↑n₁ - ↑n₂ with\n    | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n    | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁)\n    b\n[PROOFSTEP]\nsimp only [h, Ordering.compares_eq] at this \n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh₂ : NF (oadd e₂ n₂ a₂)\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nh : cmp e₁ e₂ = Ordering.eq\nthis : e₁ = e₂\n⊢ NFBelow\n    (match ↑n₁ - ↑n₂ with\n    | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n    | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁)\n    b\n[PROOFSTEP]\nsubst e₂\n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\n⊢ NFBelow\n    (match ↑n₁ - ↑n₂ with\n    | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n    | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁)\n    b\n[PROOFSTEP]\ncases mn : (n₁ : ℕ) - n₂\n[GOAL]\ncase eq.zero\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nmn : ↑n₁ - ↑n₂ = Nat.zero\n⊢ NFBelow\n    (match Nat.zero with\n    | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n    | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁)\n    b\n[PROOFSTEP]\nsimp [sub]\n[GOAL]\ncase eq.succ\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nn✝ : ℕ\nmn : ↑n₁ - ↑n₂ = Nat.succ n✝\n⊢ NFBelow\n    (match Nat.succ n✝ with\n    | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n    | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁)\n    b\n[PROOFSTEP]\nsimp [sub]\n[GOAL]\ncase eq.zero\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nmn : ↑n₁ - ↑n₂ = Nat.zero\n⊢ NFBelow (if n₁ = n₂ then sub a₁ a₂ else 0) b\n[PROOFSTEP]\nby_cases en : n₁ = n₂\n[GOAL]\ncase pos\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nmn : ↑n₁ - ↑n₂ = Nat.zero\nen : n₁ = n₂\n⊢ NFBelow (if n₁ = n₂ then sub a₁ a₂ else 0) b\n[PROOFSTEP]\nsimp [en]\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nmn : ↑n₁ - ↑n₂ = Nat.zero\nen : ¬n₁ = n₂\n⊢ NFBelow (if n₁ = n₂ then sub a₁ a₂ else 0) b\n[PROOFSTEP]\nsimp [en]\n[GOAL]\ncase pos\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nmn : ↑n₁ - ↑n₂ = Nat.zero\nen : n₁ = n₂\n⊢ NFBelow (sub a₁ a₂) b\n[PROOFSTEP]\nexact h'.mono (le_of_lt h₁.lt)\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nmn : ↑n₁ - ↑n₂ = Nat.zero\nen : ¬n₁ = n₂\n⊢ NFBelow 0 b\n[PROOFSTEP]\nexact NFBelow.zero\n[GOAL]\ncase eq.succ\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nn✝ : ℕ\nmn : ↑n₁ - ↑n₂ = Nat.succ n✝\n⊢ NFBelow (oadd e₁ (Nat.succPNat n✝) a₁) b\n[PROOFSTEP]\nexact NFBelow.oadd h₁.fst h₁.snd h₁.lt\n[GOAL]\ncase gt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b\nh₂ : NF (oadd e₂ n₂ a₂)\nh' : NFBelow (sub a₁ a₂) (repr e₁)\nthis : Ordering.Compares (cmp e₁ e₂) e₁ e₂\nh : cmp e₁ e₂ = Ordering.gt\n⊢ NFBelow (oadd e₁ n₁ a₁) b\n[PROOFSTEP]\nexact h₁\n[GOAL]\no : ONote\nx✝ : NF 0\nh₂ : NF o\n⊢ repr (0 - o) = repr 0 - repr o\n[PROOFSTEP]\ncases o\n[GOAL]\ncase zero\nx✝ : NF 0\nh₂ : NF zero\n⊢ repr (0 - zero) = repr 0 - repr zero\n[PROOFSTEP]\nexact (Ordinal.zero_sub _).symm\n[GOAL]\ncase oadd\nx✝ : NF 0\na✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\nh₂ : NF (oadd a✝² a✝¹ a✝)\n⊢ repr (0 - oadd a✝² a✝¹ a✝) = repr 0 - repr (oadd a✝² a✝¹ a✝)\n[PROOFSTEP]\nexact (Ordinal.zero_sub _).symm\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\n⊢ repr (oadd e₁ n₁ a₁ - oadd e₂ n₂ a₂) = repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nhaveI := h₁.snd\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis : NF a₁\n⊢ repr (oadd e₁ n₁ a₁ - oadd e₂ n₂ a₂) = repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nhaveI := h₂.snd\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\n⊢ repr (oadd e₁ n₁ a₁ - oadd e₂ n₂ a₂) = repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nhave h' := repr_sub a₁ a₂\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (a₁ - a₂) = repr a₁ - repr a₂\n⊢ repr (oadd e₁ n₁ a₁ - oadd e₂ n₂ a₂) = repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nconv_lhs at h' => dsimp [HSub.hSub, Sub.sub, sub]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (a₁ - a₂) = repr a₁ - repr a₂\n| repr (a₁ - a₂)\n[PROOFSTEP]\ndsimp [HSub.hSub, Sub.sub, sub]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (a₁ - a₂) = repr a₁ - repr a₂\n| repr (a₁ - a₂)\n[PROOFSTEP]\ndsimp [HSub.hSub, Sub.sub, sub]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (a₁ - a₂) = repr a₁ - repr a₂\n| repr (a₁ - a₂)\n[PROOFSTEP]\ndsimp [HSub.hSub, Sub.sub, sub]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\n⊢ repr (oadd e₁ n₁ a₁ - oadd e₂ n₂ a₂) = repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nconv_lhs => dsimp only [HSub.hSub, Sub.sub]; dsimp only [sub]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\n| repr (oadd e₁ n₁ a₁ - oadd e₂ n₂ a₂)\n[PROOFSTEP]\ndsimp only [HSub.hSub, Sub.sub]; dsimp only [sub]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\n| repr (oadd e₁ n₁ a₁ - oadd e₂ n₂ a₂)\n[PROOFSTEP]\ndsimp only [HSub.hSub, Sub.sub]; dsimp only [sub]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\n| repr (oadd e₁ n₁ a₁ - oadd e₂ n₂ a₂)\n[PROOFSTEP]\ndsimp only [HSub.hSub, Sub.sub]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\n| repr (sub (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂))\n[PROOFSTEP]\ndsimp only [sub]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\n⊢ repr\n      (match cmp e₁ e₂ with\n      | Ordering.lt => 0\n      | Ordering.gt => oadd e₁ n₁ a₁\n      | Ordering.eq =>\n        match ↑n₁ - ↑n₂ with\n        | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n        | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nhave ee := @cmp_compares _ _ h₁.fst h₂.fst\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nee : Ordering.Compares (cmp e₁ e₂) e₁ e₂\n⊢ repr\n      (match cmp e₁ e₂ with\n      | Ordering.lt => 0\n      | Ordering.gt => oadd e₁ n₁ a₁\n      | Ordering.eq =>\n        match ↑n₁ - ↑n₂ with\n        | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n        | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\ncases h : cmp e₁ e₂\n[GOAL]\ncase lt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nee : Ordering.Compares (cmp e₁ e₂) e₁ e₂\nh : cmp e₁ e₂ = Ordering.lt\n⊢ repr\n      (match Ordering.lt with\n      | Ordering.lt => 0\n      | Ordering.gt => oadd e₁ n₁ a₁\n      | Ordering.eq =>\n        match ↑n₁ - ↑n₂ with\n        | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n        | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nsimp only [h] at ee \n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nee : Ordering.Compares (cmp e₁ e₂) e₁ e₂\nh : cmp e₁ e₂ = Ordering.eq\n⊢ repr\n      (match Ordering.eq with\n      | Ordering.lt => 0\n      | Ordering.gt => oadd e₁ n₁ a₁\n      | Ordering.eq =>\n        match ↑n₁ - ↑n₂ with\n        | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n        | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nsimp only [h] at ee \n[GOAL]\ncase gt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nee : Ordering.Compares (cmp e₁ e₂) e₁ e₂\nh : cmp e₁ e₂ = Ordering.gt\n⊢ repr\n      (match Ordering.gt with\n      | Ordering.lt => 0\n      | Ordering.gt => oadd e₁ n₁ a₁\n      | Ordering.eq =>\n        match ↑n₁ - ↑n₂ with\n        | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n        | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nsimp only [h] at ee \n[GOAL]\ncase lt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh : cmp e₁ e₂ = Ordering.lt\nee : Ordering.Compares Ordering.lt e₁ e₂\n⊢ repr\n      (match Ordering.lt with\n      | Ordering.lt => 0\n      | Ordering.gt => oadd e₁ n₁ a₁\n      | Ordering.eq =>\n        match ↑n₁ - ↑n₂ with\n        | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n        | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nrw [Ordinal.sub_eq_zero_iff_le.2]\n[GOAL]\ncase lt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh : cmp e₁ e₂ = Ordering.lt\nee : Ordering.Compares Ordering.lt e₁ e₂\n⊢ repr\n      (match Ordering.lt with\n      | Ordering.lt => 0\n      | Ordering.gt => oadd e₁ n₁ a₁\n      | Ordering.eq =>\n        match ↑n₁ - ↑n₂ with\n        | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n        | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase lt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh : cmp e₁ e₂ = Ordering.lt\nee : Ordering.Compares Ordering.lt e₁ e₂\n⊢ repr (oadd e₁ n₁ a₁) ≤ repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nexact le_of_lt (oadd_lt_oadd_1 h₁ ee)\n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh : cmp e₁ e₂ = Ordering.eq\nee : Ordering.Compares Ordering.eq e₁ e₂\n⊢ repr\n      (match Ordering.eq with\n      | Ordering.lt => 0\n      | Ordering.gt => oadd e₁ n₁ a₁\n      | Ordering.eq =>\n        match ↑n₁ - ↑n₂ with\n        | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n        | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nchange e₁ = e₂ at ee \n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh : cmp e₁ e₂ = Ordering.eq\nee : e₁ = e₂\n⊢ repr\n      (match Ordering.eq with\n      | Ordering.lt => 0\n      | Ordering.gt => oadd e₁ n₁ a₁\n      | Ordering.eq =>\n        match ↑n₁ - ↑n₂ with\n        | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n        | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nsubst e₂\n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\n⊢ repr\n      (match Ordering.eq with\n      | Ordering.lt => 0\n      | Ordering.gt => oadd e₁ n₁ a₁\n      | Ordering.eq =>\n        match ↑n₁ - ↑n₂ with\n        | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n        | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₁ n₂ a₂)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase eq\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\n⊢ repr\n      (match ↑n₁ - ↑n₂ with\n      | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n      | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₁ n₂ a₂)\n[PROOFSTEP]\ncases mn : (n₁ : ℕ) - n₂\n[GOAL]\ncase eq.zero\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nmn : ↑n₁ - ↑n₂ = Nat.zero\n⊢ repr\n      (match Nat.zero with\n      | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n      | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₁ n₂ a₂)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase eq.succ\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nn✝ : ℕ\nmn : ↑n₁ - ↑n₂ = Nat.succ n✝\n⊢ repr\n      (match Nat.succ n✝ with\n      | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n      | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₁ n₂ a₂)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase eq.zero\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nmn : ↑n₁ - ↑n₂ = Nat.zero\n⊢ repr (if n₁ = n₂ then sub a₁ a₂ else 0) = repr (oadd e₁ n₁ a₁) - repr (oadd e₁ n₂ a₂)\n[PROOFSTEP]\nby_cases en : n₁ = n₂\n[GOAL]\ncase pos\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nmn : ↑n₁ - ↑n₂ = Nat.zero\nen : n₁ = n₂\n⊢ repr (if n₁ = n₂ then sub a₁ a₂ else 0) = repr (oadd e₁ n₁ a₁) - repr (oadd e₁ n₂ a₂)\n[PROOFSTEP]\nsimpa [en]\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nmn : ↑n₁ - ↑n₂ = Nat.zero\nen : ¬n₁ = n₂\n⊢ repr (if n₁ = n₂ then sub a₁ a₂ else 0) = repr (oadd e₁ n₁ a₁) - repr (oadd e₁ n₂ a₂)\n[PROOFSTEP]\nsimp only [en, ite_false]\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nmn : ↑n₁ - ↑n₂ = Nat.zero\nen : ¬n₁ = n₂\n⊢ repr 0 = repr (oadd e₁ n₁ a₁) - repr (oadd e₁ n₂ a₂)\n[PROOFSTEP]\nexact\n  (Ordinal.sub_eq_zero_iff_le.2 <|\n      le_of_lt <| oadd_lt_oadd_2 h₁ <| lt_of_le_of_ne (tsub_eq_zero_iff_le.1 mn) (mt PNat.eq en)).symm\n[GOAL]\ncase eq.succ\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nn✝ : ℕ\nmn : ↑n₁ - ↑n₂ = Nat.succ n✝\n⊢ repr (oadd e₁ (Nat.succPNat n✝) a₁) = repr (oadd e₁ n₁ a₁) - repr (oadd e₁ n₂ a₂)\n[PROOFSTEP]\nsimp [Nat.succPNat, -Nat.cast_succ]\n[GOAL]\ncase eq.succ\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nn✝ : ℕ\nmn : ↑n₁ - ↑n₂ = Nat.succ n✝\n⊢ ω ^ repr e₁ * ↑(Nat.succ n✝) + repr a₁ = ω ^ repr e₁ * ↑↑n₁ + repr a₁ - (ω ^ repr e₁ * ↑↑n₂ + repr a₂)\n[PROOFSTEP]\nrw [(tsub_eq_iff_eq_add_of_le <| le_of_lt <| Nat.lt_of_sub_eq_succ mn).1 mn, add_comm, Nat.cast_add, mul_add, add_assoc,\n  add_sub_add_cancel]\n[GOAL]\ncase eq.succ\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nn✝ : ℕ\nmn : ↑n₁ - ↑n₂ = Nat.succ n✝\n⊢ ω ^ repr e₁ * ↑(Nat.succ n✝) + repr a₁ = ω ^ repr e₁ * ↑(Nat.succ n✝) + repr a₁ - repr a₂\n[PROOFSTEP]\nrefine' (Ordinal.sub_eq_of_add_eq <| add_absorp h₂.snd'.repr_lt <| le_trans _ (le_add_right _ _)).symm\n[GOAL]\ncase eq.succ\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh₂ : NF (oadd e₁ n₂ a₂)\nh : cmp e₁ e₁ = Ordering.eq\nn✝ : ℕ\nmn : ↑n₁ - ↑n₂ = Nat.succ n✝\n⊢ ω ^ repr e₁ ≤ ω ^ repr e₁ * ↑(Nat.succ n✝)\n[PROOFSTEP]\nsimpa using mul_le_mul_left' (nat_cast_le.2 <| Nat.succ_pos _) _\n[GOAL]\ncase gt\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nthis✝ : NF a₁\nthis : NF a₂\nh' : repr (sub a₁ a₂) = repr a₁ - repr a₂\nh : cmp e₁ e₂ = Ordering.gt\nee : Ordering.Compares Ordering.gt e₁ e₂\n⊢ repr\n      (match Ordering.gt with\n      | Ordering.lt => 0\n      | Ordering.gt => oadd e₁ n₁ a₁\n      | Ordering.eq =>\n        match ↑n₁ - ↑n₂ with\n        | 0 => if n₁ = n₂ then sub a₁ a₂ else 0\n        | Nat.succ k => oadd e₁ (Nat.succPNat k) a₁) =\n    repr (oadd e₁ n₁ a₁) - repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nexact (Ordinal.sub_eq_of_add_eq <| add_absorp (h₂.below_of_lt ee).repr_lt <| omega_le_oadd _ _ _).symm\n[GOAL]\no : ONote\n⊢ 0 * o = 0\n[PROOFSTEP]\ncases o\n[GOAL]\ncase zero\n⊢ 0 * zero = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase oadd\na✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\n⊢ 0 * oadd a✝² a✝¹ a✝ = 0\n[PROOFSTEP]\nrfl\n[GOAL]\no : ONote\n⊢ o * 0 = 0\n[PROOFSTEP]\ncases o\n[GOAL]\ncase zero\n⊢ zero * 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase oadd\na✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\n⊢ oadd a✝² a✝¹ a✝ * 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\n⊢ NFBelow (oadd e₁ n₁ a₁ * oadd e₂ n₂ a₂) (repr e₁ + b₂)\n[PROOFSTEP]\nhave IH := oadd_mul_nfBelow h₁ h₂.snd\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\n⊢ NFBelow (oadd e₁ n₁ a₁ * oadd e₂ n₂ a₂) (repr e₁ + b₂)\n[PROOFSTEP]\nby_cases e0 : e₂ = 0\n[GOAL]\ncase pos\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : e₂ = 0\n⊢ NFBelow (oadd e₁ n₁ a₁ * oadd e₂ n₂ a₂) (repr e₁ + b₂)\n[PROOFSTEP]\nsimp [e0, oadd_mul]\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : ¬e₂ = 0\n⊢ NFBelow (oadd e₁ n₁ a₁ * oadd e₂ n₂ a₂) (repr e₁ + b₂)\n[PROOFSTEP]\nsimp [e0, oadd_mul]\n[GOAL]\ncase pos\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : e₂ = 0\n⊢ NFBelow (oadd e₁ (n₁ * n₂) a₁) (repr e₁ + b₂)\n[PROOFSTEP]\napply NFBelow.oadd h₁.fst h₁.snd\n[GOAL]\ncase pos\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : e₂ = 0\n⊢ repr e₁ < repr e₁ + b₂\n[PROOFSTEP]\nsimpa using (add_lt_add_iff_left (repr e₁)).2 (lt_of_le_of_lt (Ordinal.zero_le _) h₂.lt)\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : ¬e₂ = 0\n⊢ NFBelow (oadd (e₁ + e₂) n₂ (oadd e₁ n₁ a₁ * a₂)) (repr e₁ + b₂)\n[PROOFSTEP]\nhaveI := h₁.fst\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : ¬e₂ = 0\nthis : NF e₁\n⊢ NFBelow (oadd (e₁ + e₂) n₂ (oadd e₁ n₁ a₁ * a₂)) (repr e₁ + b₂)\n[PROOFSTEP]\nhaveI := h₂.fst\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : ¬e₂ = 0\nthis✝ : NF e₁\nthis : NF e₂\n⊢ NFBelow (oadd (e₁ + e₂) n₂ (oadd e₁ n₁ a₁ * a₂)) (repr e₁ + b₂)\n[PROOFSTEP]\napply NFBelow.oadd\n[GOAL]\ncase neg.a\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : ¬e₂ = 0\nthis✝ : NF e₁\nthis : NF e₂\n⊢ NF (e₁ + e₂)\ncase neg.a\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : ¬e₂ = 0\nthis✝ : NF e₁\nthis : NF e₂\n⊢ NFBelow (oadd e₁ n₁ a₁ * a₂) (repr (e₁ + e₂))\ncase neg.a\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : ¬e₂ = 0\nthis✝ : NF e₁\nthis : NF e₂\n⊢ repr (e₁ + e₂) < repr e₁ + b₂\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase neg.a\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : ¬e₂ = 0\nthis✝ : NF e₁\nthis : NF e₂\n⊢ NFBelow (oadd e₁ n₁ a₁ * a₂) (repr (e₁ + e₂))\n[PROOFSTEP]\nrwa [repr_add]\n[GOAL]\ncase neg.a\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : ¬e₂ = 0\nthis✝ : NF e₁\nthis : NF e₂\n⊢ repr (e₁ + e₂) < repr e₁ + b₂\n[PROOFSTEP]\nrw [repr_add, add_lt_add_iff_left]\n[GOAL]\ncase neg.a\ne₁ : ONote\nn₁ : ℕ+\na₁ : ONote\nb₁ : Ordinal.{0}\nh₁ : NFBelow (oadd e₁ n₁ a₁) b₁\ne₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nb₂ : Ordinal.{0}\nh₂ : NFBelow (oadd e₂ n₂ a₂) b₂\nIH : NFBelow (oadd e₁ n₁ a₁ * a₂) (repr e₁ + repr e₂)\ne0 : ¬e₂ = 0\nthis✝ : NF e₁\nthis : NF e₂\n⊢ repr e₂ < b₂\n[PROOFSTEP]\nexact h₂.lt\n[GOAL]\no : ONote\nx✝ : NF 0\nh₂ : NF o\n⊢ NF (0 * o)\n[PROOFSTEP]\ncases o\n[GOAL]\ncase zero\nx✝ : NF 0\nh₂ : NF zero\n⊢ NF (0 * zero)\n[PROOFSTEP]\nexact NF.zero\n[GOAL]\ncase oadd\nx✝ : NF 0\na✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\nh₂ : NF (oadd a✝² a✝¹ a✝)\n⊢ NF (0 * oadd a✝² a✝¹ a✝)\n[PROOFSTEP]\nexact NF.zero\n[GOAL]\no : ONote\nx✝ : NF 0\nh₂ : NF o\n⊢ repr (0 * o) = repr 0 * repr o\n[PROOFSTEP]\ncases o\n[GOAL]\ncase zero\nx✝ : NF 0\nh₂ : NF zero\n⊢ repr (0 * zero) = repr 0 * repr zero\n[PROOFSTEP]\nexact (zero_mul _).symm\n[GOAL]\ncase oadd\nx✝ : NF 0\na✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\nh₂ : NF (oadd a✝² a✝¹ a✝)\n⊢ repr (0 * oadd a✝² a✝¹ a✝) = repr 0 * repr (oadd a✝² a✝¹ a✝)\n[PROOFSTEP]\nexact (zero_mul _).symm\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\n⊢ repr (oadd e₁ n₁ a₁ * oadd e₂ n₂ a₂) = repr (oadd e₁ n₁ a₁) * repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nhave IH : repr (mul _ _) = _ := @repr_mul _ _ h₁ h₂.snd\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\n⊢ repr (oadd e₁ n₁ a₁ * oadd e₂ n₂ a₂) = repr (oadd e₁ n₁ a₁) * repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nconv =>\n  lhs\n  simp [(· * ·)]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\n| repr (oadd e₁ n₁ a₁ * oadd e₂ n₂ a₂) = repr (oadd e₁ n₁ a₁) * repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\n  lhs\n  simp [(· * ·)]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\n| repr (oadd e₁ n₁ a₁ * oadd e₂ n₂ a₂) = repr (oadd e₁ n₁ a₁) * repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\n  lhs\n  simp [(· * ·)]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\n| repr (oadd e₁ n₁ a₁ * oadd e₂ n₂ a₂) = repr (oadd e₁ n₁ a₁) * repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nlhs\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\n| repr (oadd e₁ n₁ a₁ * oadd e₂ n₂ a₂)\n[PROOFSTEP]\nsimp [(· * ·)]\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\n⊢ repr (Mul.mul (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂)) = repr (oadd e₁ n₁ a₁) * repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nhave ao : repr a₁ + ω ^ repr e₁ * (n₁ : ℕ) = ω ^ repr e₁ * (n₁ : ℕ) :=\n  by\n  apply add_absorp h₁.snd'.repr_lt\n  simpa using (Ordinal.mul_le_mul_iff_left <| opow_pos _ omega_pos).2 (nat_cast_le.2 n₁.2)\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\n⊢ repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\n[PROOFSTEP]\napply add_absorp h₁.snd'.repr_lt\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\n⊢ ω ^ repr e₁ ≤ ω ^ repr e₁ * ↑↑n₁\n[PROOFSTEP]\nsimpa using (Ordinal.mul_le_mul_iff_left <| opow_pos _ omega_pos).2 (nat_cast_le.2 n₁.2)\n[GOAL]\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\n⊢ repr (Mul.mul (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂)) = repr (oadd e₁ n₁ a₁) * repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nby_cases e0 : e₂ = 0\n[GOAL]\ncase pos\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : e₂ = 0\n⊢ repr (Mul.mul (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂)) = repr (oadd e₁ n₁ a₁) * repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nsimp [e0, mul]\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : ¬e₂ = 0\n⊢ repr (Mul.mul (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂)) = repr (oadd e₁ n₁ a₁) * repr (oadd e₂ n₂ a₂)\n[PROOFSTEP]\nsimp [e0, mul]\n[GOAL]\ncase pos\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : e₂ = 0\n⊢ ω ^ repr e₁ * (↑↑n₁ * ↑↑n₂) + repr a₁ = (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * (↑↑n₂ + repr a₂)\n[PROOFSTEP]\ncases' Nat.exists_eq_succ_of_ne_zero n₂.ne_zero with x xe\n[GOAL]\ncase pos.intro\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : e₂ = 0\nx : ℕ\nxe : ↑n₂ = Nat.succ x\n⊢ ω ^ repr e₁ * (↑↑n₁ * ↑↑n₂) + repr a₁ = (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * (↑↑n₂ + repr a₂)\n[PROOFSTEP]\nsimp [h₂.zero_of_zero e0, xe, -Nat.cast_succ]\n[GOAL]\ncase pos.intro\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : e₂ = 0\nx : ℕ\nxe : ↑n₂ = Nat.succ x\n⊢ ω ^ repr e₁ * (↑↑n₁ * ↑(Nat.succ x)) + repr a₁ = (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * ↑(Nat.succ x)\n[PROOFSTEP]\nrw [nat_cast_succ x, add_mul_succ _ ao, mul_assoc]\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : ¬e₂ = 0\n⊢ repr (Mul.mul (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂)) = (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * (ω ^ repr e₂ * ↑↑n₂ + repr a₂)\n[PROOFSTEP]\nhaveI := h₁.fst\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : ¬e₂ = 0\nthis : NF e₁\n⊢ repr (Mul.mul (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂)) = (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * (ω ^ repr e₂ * ↑↑n₂ + repr a₂)\n[PROOFSTEP]\nhaveI := h₂.fst\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : ¬e₂ = 0\nthis✝ : NF e₁\nthis : NF e₂\n⊢ repr (Mul.mul (oadd e₁ n₁ a₁) (oadd e₂ n₂ a₂)) = (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * (ω ^ repr e₂ * ↑↑n₂ + repr a₂)\n[PROOFSTEP]\nsimp [IH, Mul.mul, mul, e0, repr_add, opow_add, mul_add]\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : ¬e₂ = 0\nthis✝ : NF e₁\nthis : NF e₂\n⊢ ω ^ repr e₁ * ω ^ repr e₂ * ↑↑n₂ + (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * repr a₂ =\n    (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * (ω ^ repr e₂ * ↑↑n₂) + (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * repr a₂\n[PROOFSTEP]\nrw [← mul_assoc]\n[GOAL]\ncase neg\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : ¬e₂ = 0\nthis✝ : NF e₁\nthis : NF e₂\n⊢ ω ^ repr e₁ * ω ^ repr e₂ * ↑↑n₂ + (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * repr a₂ =\n    (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * ω ^ repr e₂ * ↑↑n₂ + (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * repr a₂\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase neg.e_a.e_a\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : ¬e₂ = 0\nthis✝ : NF e₁\nthis : NF e₂\n⊢ ω ^ repr e₁ * ω ^ repr e₂ = (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * ω ^ repr e₂\n[PROOFSTEP]\nhave := mt repr_inj.1 e0\n[GOAL]\ncase neg.e_a.e_a\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : ¬e₂ = 0\nthis✝¹ : NF e₁\nthis✝ : NF e₂\nthis : ¬repr e₂ = repr 0\n⊢ ω ^ repr e₁ * ω ^ repr e₂ = (ω ^ repr e₁ * ↑↑n₁ + repr a₁) * ω ^ repr e₂\n[PROOFSTEP]\nrw [add_mul_limit ao (opow_isLimit_left omega_isLimit this), mul_assoc,\n  mul_omega_dvd (nat_cast_pos.2 n₁.pos) (nat_lt_omega _)]\n[GOAL]\ncase neg.e_a.e_a\ne₁ : ONote\nn₁ : ℕ+\na₁ e₂ : ONote\nn₂ : ℕ+\na₂ : ONote\nh₁ : NF (oadd e₁ n₁ a₁)\nh₂ : NF (oadd e₂ n₂ a₂)\nIH : repr (mul (oadd e₁ n₁ a₁) a₂) = repr (oadd e₁ n₁ a₁) * repr a₂\nao : repr a₁ + ω ^ repr e₁ * ↑↑n₁ = ω ^ repr e₁ * ↑↑n₁\ne0 : ¬e₂ = 0\nthis✝¹ : NF e₁\nthis✝ : NF e₂\nthis : ¬repr e₂ = repr 0\n⊢ ω ∣ ω ^ repr e₂\n[PROOFSTEP]\nsimpa using opow_dvd_opow ω (one_le_iff_ne_zero.2 this)\n[GOAL]\no' : ONote\nm : ℕ\nx✝ : NF 0\np : split' 0 = (o', m)\n⊢ split 0 = (scale 1 o', m)\n[PROOFSTEP]\ninjection p\n[GOAL]\no' : ONote\nm : ℕ\nx✝ : NF 0\nfst_eq✝ : 0 = o'\nsnd_eq✝ : 0 = m\n⊢ split 0 = (scale 1 o', m)\n[PROOFSTEP]\nsubsts o' m\n[GOAL]\nx✝ : NF 0\n⊢ split 0 = (scale 1 0, 0)\n[PROOFSTEP]\nrfl\n[GOAL]\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\np : split' (oadd e n a) = (o', m)\n⊢ split (oadd e n a) = (scale 1 o', m)\n[PROOFSTEP]\nby_cases e0 : e = 0\n[GOAL]\ncase pos\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\np : split' (oadd e n a) = (o', m)\ne0 : e = 0\n⊢ split (oadd e n a) = (scale 1 o', m)\n[PROOFSTEP]\nsimp [e0, split, split'] at p ⊢\n[GOAL]\ncase neg\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\np : split' (oadd e n a) = (o', m)\ne0 : ¬e = 0\n⊢ split (oadd e n a) = (scale 1 o', m)\n[PROOFSTEP]\nsimp [e0, split, split'] at p ⊢\n[GOAL]\ncase pos\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : e = 0\np : 0 = o' ∧ ↑n = m\n⊢ 0 = scale 1 o' ∧ ↑n = m\n[PROOFSTEP]\nrcases p with ⟨rfl, rfl⟩\n[GOAL]\ncase pos.intro\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : e = 0\n⊢ 0 = scale 1 0 ∧ ↑n = ↑n\n[PROOFSTEP]\nexact ⟨rfl, rfl⟩\n[GOAL]\ncase neg\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\np : oadd (e - 1) n (split' a).fst = o' ∧ (split' a).snd = m\n⊢ oadd e n (split a).fst = scale 1 o' ∧ (split a).snd = m\n[PROOFSTEP]\nrevert p\n[GOAL]\ncase neg\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\n⊢ oadd (e - 1) n (split' a).fst = o' ∧ (split' a).snd = m → oadd e n (split a).fst = scale 1 o' ∧ (split a).snd = m\n[PROOFSTEP]\ncases' h' : split' a with a' m'\n[GOAL]\ncase neg.mk\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\n⊢ oadd (e - 1) n (a', m').fst = o' ∧ (a', m').snd = m → oadd e n (split a).fst = scale 1 o' ∧ (split a).snd = m\n[PROOFSTEP]\nhaveI := h.fst\n[GOAL]\ncase neg.mk\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis : NF e\n⊢ oadd (e - 1) n (a', m').fst = o' ∧ (a', m').snd = m → oadd e n (split a).fst = scale 1 o' ∧ (split a).snd = m\n[PROOFSTEP]\nhaveI := h.snd\n[GOAL]\ncase neg.mk\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝ : NF e\nthis : NF a\n⊢ oadd (e - 1) n (a', m').fst = o' ∧ (a', m').snd = m → oadd e n (split a).fst = scale 1 o' ∧ (split a).snd = m\n[PROOFSTEP]\nsimp [split_eq_scale_split' h', split, split']\n[GOAL]\ncase neg.mk\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝ : NF e\nthis : NF a\n⊢ oadd (e - 1) n a' = o' → m' = m → oadd e n (scale 1 a') = scale 1 o' ∧ m' = m\n[PROOFSTEP]\nhave : 1 + (e - 1) = e := by\n  refine' repr_inj.1 _\n  simp\n  have := mt repr_inj.1 e0\n  refine' Ordinal.add_sub_cancel_of_le _\n  have := (one_le_iff_ne_zero.2 this)\n  exact this\n[GOAL]\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝ : NF e\nthis : NF a\n⊢ 1 + (e - 1) = e\n[PROOFSTEP]\nrefine' repr_inj.1 _\n[GOAL]\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝ : NF e\nthis : NF a\n⊢ repr (1 + (e - 1)) = repr e\n[PROOFSTEP]\nsimp\n[GOAL]\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝ : NF e\nthis : NF a\n⊢ 1 + (repr e - 1) = repr e\n[PROOFSTEP]\nhave := mt repr_inj.1 e0\n[GOAL]\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nthis : ¬repr e = repr 0\n⊢ 1 + (repr e - 1) = repr e\n[PROOFSTEP]\nrefine' Ordinal.add_sub_cancel_of_le _\n[GOAL]\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nthis : ¬repr e = repr 0\n⊢ 1 ≤ repr e\n[PROOFSTEP]\nhave := (one_le_iff_ne_zero.2 this)\n[GOAL]\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝² : NF e\nthis✝¹ : NF a\nthis✝ : ¬repr e = repr 0\nthis : 1 ≤ repr e\n⊢ 1 ≤ repr e\n[PROOFSTEP]\nexact this\n[GOAL]\ncase neg.mk\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nthis : 1 + (e - 1) = e\n⊢ oadd (e - 1) n a' = o' → m' = m → oadd e n (scale 1 a') = scale 1 o' ∧ m' = m\n[PROOFSTEP]\nintros\n[GOAL]\ncase neg.mk\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nthis : 1 + (e - 1) = e\na✝¹ : oadd (e - 1) n a' = o'\na✝ : m' = m\n⊢ oadd e n (scale 1 a') = scale 1 o' ∧ m' = m\n[PROOFSTEP]\nsubsts o' m\n[GOAL]\ncase neg.mk\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nthis : 1 + (e - 1) = e\n⊢ oadd e n (scale 1 a') = scale 1 (oadd (e - 1) n a') ∧ m' = m'\n[PROOFSTEP]\nsimp [scale, this]\n[GOAL]\no' : ONote\nm : ℕ\nx✝ : NF 0\np : split' 0 = (o', m)\n⊢ NF o' ∧ repr 0 = ω * repr o' + ↑m\n[PROOFSTEP]\ninjection p\n[GOAL]\no' : ONote\nm : ℕ\nx✝ : NF 0\nfst_eq✝ : 0 = o'\nsnd_eq✝ : 0 = m\n⊢ NF o' ∧ repr 0 = ω * repr o' + ↑m\n[PROOFSTEP]\nsubsts o' m\n[GOAL]\nx✝ : NF 0\n⊢ NF 0 ∧ repr 0 = ω * repr 0 + ↑0\n[PROOFSTEP]\nsimp [NF.zero]\n[GOAL]\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\np : split' (oadd e n a) = (o', m)\n⊢ NF o' ∧ repr (oadd e n a) = ω * repr o' + ↑m\n[PROOFSTEP]\nby_cases e0 : e = 0\n[GOAL]\ncase pos\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\np : split' (oadd e n a) = (o', m)\ne0 : e = 0\n⊢ NF o' ∧ repr (oadd e n a) = ω * repr o' + ↑m\n[PROOFSTEP]\nsimp [e0, split, split'] at p ⊢\n[GOAL]\ncase neg\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\np : split' (oadd e n a) = (o', m)\ne0 : ¬e = 0\n⊢ NF o' ∧ repr (oadd e n a) = ω * repr o' + ↑m\n[PROOFSTEP]\nsimp [e0, split, split'] at p ⊢\n[GOAL]\ncase pos\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : e = 0\np : 0 = o' ∧ ↑n = m\n⊢ NF o' ∧ ↑↑n + repr a = ω * repr o' + ↑m\n[PROOFSTEP]\nrcases p with ⟨rfl, rfl⟩\n[GOAL]\ncase pos.intro\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : e = 0\n⊢ NF 0 ∧ ↑↑n + repr a = ω * repr 0 + ↑↑n\n[PROOFSTEP]\nsimp [h.zero_of_zero e0, NF.zero]\n[GOAL]\ncase neg\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\np : oadd (e - 1) n (split' a).fst = o' ∧ (split' a).snd = m\n⊢ NF o' ∧ ω ^ repr e * ↑↑n + repr a = ω * repr o' + ↑m\n[PROOFSTEP]\nrevert p\n[GOAL]\ncase neg\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\n⊢ oadd (e - 1) n (split' a).fst = o' ∧ (split' a).snd = m → NF o' ∧ ω ^ repr e * ↑↑n + repr a = ω * repr o' + ↑m\n[PROOFSTEP]\ncases' h' : split' a with a' m'\n[GOAL]\ncase neg.mk\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\n⊢ oadd (e - 1) n (a', m').fst = o' ∧ (a', m').snd = m → NF o' ∧ ω ^ repr e * ↑↑n + repr a = ω * repr o' + ↑m\n[PROOFSTEP]\nhaveI := h.fst\n[GOAL]\ncase neg.mk\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis : NF e\n⊢ oadd (e - 1) n (a', m').fst = o' ∧ (a', m').snd = m → NF o' ∧ ω ^ repr e * ↑↑n + repr a = ω * repr o' + ↑m\n[PROOFSTEP]\nhaveI := h.snd\n[GOAL]\ncase neg.mk\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝ : NF e\nthis : NF a\n⊢ oadd (e - 1) n (a', m').fst = o' ∧ (a', m').snd = m → NF o' ∧ ω ^ repr e * ↑↑n + repr a = ω * repr o' + ↑m\n[PROOFSTEP]\ncases' nf_repr_split' h' with IH₁ IH₂\n[GOAL]\ncase neg.mk.intro\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝ : NF e\nthis : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\n⊢ oadd (e - 1) n (a', m').fst = o' ∧ (a', m').snd = m → NF o' ∧ ω ^ repr e * ↑↑n + repr a = ω * repr o' + ↑m\n[PROOFSTEP]\nsimp [IH₂, split']\n[GOAL]\ncase neg.mk.intro\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝ : NF e\nthis : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\n⊢ oadd (e - 1) n a' = o' → m' = m → NF o' ∧ ω ^ repr e * ↑↑n + (ω * repr a' + ↑m') = ω * repr o' + ↑m\n[PROOFSTEP]\nintros\n[GOAL]\ncase neg.mk.intro\ne : ONote\nn : ℕ+\na o' : ONote\nm : ℕ\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝ : NF e\nthis : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\na✝¹ : oadd (e - 1) n a' = o'\na✝ : m' = m\n⊢ NF o' ∧ ω ^ repr e * ↑↑n + (ω * repr a' + ↑m') = ω * repr o' + ↑m\n[PROOFSTEP]\nsubsts o' m\n[GOAL]\ncase neg.mk.intro\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝ : NF e\nthis : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\n⊢ NF (oadd (e - 1) n a') ∧ ω ^ repr e * ↑↑n + (ω * repr a' + ↑m') = ω * repr (oadd (e - 1) n a') + ↑m'\n[PROOFSTEP]\nhave : (ω : Ordinal.{0}) ^ repr e = ω ^ (1 : Ordinal.{0}) * ω ^ (repr e - 1) :=\n  by\n  have := mt repr_inj.1 e0\n  rw [← opow_add, Ordinal.add_sub_cancel_of_le (one_le_iff_ne_zero.2 this)]\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝ : NF e\nthis : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\n⊢ ω ^ repr e = ω ^ 1 * ω ^ (repr e - 1)\n[PROOFSTEP]\nhave := mt repr_inj.1 e0\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\nthis : ¬repr e = repr 0\n⊢ ω ^ repr e = ω ^ 1 * ω ^ (repr e - 1)\n[PROOFSTEP]\nrw [← opow_add, Ordinal.add_sub_cancel_of_le (one_le_iff_ne_zero.2 this)]\n[GOAL]\ncase neg.mk.intro\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\nthis : ω ^ repr e = ω ^ 1 * ω ^ (repr e - 1)\n⊢ NF (oadd (e - 1) n a') ∧ ω ^ repr e * ↑↑n + (ω * repr a' + ↑m') = ω * repr (oadd (e - 1) n a') + ↑m'\n[PROOFSTEP]\nrefine' ⟨NF.oadd (by infer_instance) _ _, _⟩\n[GOAL]\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\nthis : ω ^ repr e = ω ^ 1 * ω ^ (repr e - 1)\n⊢ NF (e - 1)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase neg.mk.intro.refine'_1\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\nthis : ω ^ repr e = ω ^ 1 * ω ^ (repr e - 1)\n⊢ NFBelow a' (repr (e - 1))\n[PROOFSTEP]\nsimp at this ⊢\n[GOAL]\ncase neg.mk.intro.refine'_1\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\nthis : ω ^ repr e = ω * ω ^ (repr e - 1)\n⊢ NFBelow a' (repr e - 1)\n[PROOFSTEP]\nrefine' IH₁.below_of_lt' ((Ordinal.mul_lt_mul_iff_left omega_pos).1 <| lt_of_le_of_lt (le_add_right _ m') _)\n[GOAL]\ncase neg.mk.intro.refine'_1\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\nthis : ω ^ repr e = ω * ω ^ (repr e - 1)\n⊢ ω * repr a' + ↑m' < ω * ω ^ (repr e - 1)\n[PROOFSTEP]\nrw [← this, ← IH₂]\n[GOAL]\ncase neg.mk.intro.refine'_1\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\nthis : ω ^ repr e = ω * ω ^ (repr e - 1)\n⊢ repr a < ω ^ repr e\n[PROOFSTEP]\nexact h.snd'.repr_lt\n[GOAL]\ncase neg.mk.intro.refine'_2\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\nthis : ω ^ repr e = ω ^ 1 * ω ^ (repr e - 1)\n⊢ ω ^ repr e * ↑↑n + (ω * repr a' + ↑m') = ω * repr (oadd (e - 1) n a') + ↑m'\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase neg.mk.intro.refine'_2\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\ne0 : ¬e = 0\na' : ONote\nm' : ℕ\nh' : split' a = (a', m')\nthis✝¹ : NF e\nthis✝ : NF a\nIH₁ : NF a'\nIH₂ : repr a = ω * repr a' + ↑m'\nthis : ω ^ repr e = ω ^ 1 * ω ^ (repr e - 1)\n⊢ ω ^ 1 * ω ^ (repr e - 1) * ↑↑n + (ω * repr a' + ↑m') = ω * repr (oadd (e - 1) n a') + ↑m'\n[PROOFSTEP]\nsimp [mul_add, mul_assoc, add_assoc]\n[GOAL]\nx : ONote\ninst✝ : NF x\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\n⊢ scale x (oadd e n a) = oadd x 1 0 * oadd e n a\n[PROOFSTEP]\nsimp [(· * ·)]\n[GOAL]\nx : ONote\ninst✝ : NF x\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\n⊢ scale x (oadd e n a) = Mul.mul (oadd x 1 0) (oadd e n a)\n[PROOFSTEP]\nsimp [mul, scale]\n[GOAL]\nx : ONote\ninst✝ : NF x\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\n⊢ oadd (x + e) n (scale x a) = Mul.mul (oadd x 1 0) (oadd e n a)\n[PROOFSTEP]\nhaveI := h.snd\n[GOAL]\nx : ONote\ninst✝ : NF x\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\nthis : NF a\n⊢ oadd (x + e) n (scale x a) = Mul.mul (oadd x 1 0) (oadd e n a)\n[PROOFSTEP]\nby_cases e0 : e = 0\n[GOAL]\ncase pos\nx : ONote\ninst✝ : NF x\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\nthis : NF a\ne0 : e = 0\n⊢ oadd (x + e) n (scale x a) = Mul.mul (oadd x 1 0) (oadd e n a)\n[PROOFSTEP]\nsimp_rw [scale_eq_mul]\n[GOAL]\ncase pos\nx : ONote\ninst✝ : NF x\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\nthis : NF a\ne0 : e = 0\n⊢ oadd (x + e) n (oadd x 1 0 * a) = Mul.mul (oadd x 1 0) (oadd e n a)\n[PROOFSTEP]\nsimp [Mul.mul, mul, scale_eq_mul, e0, h.zero_of_zero, show x + 0 = x from repr_inj.1 (by simp)]\n[GOAL]\nx : ONote\ninst✝ : NF x\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\nthis : NF a\ne0 : e = 0\n⊢ repr (x + 0) = repr x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nx : ONote\ninst✝ : NF x\ne : ONote\nn : ℕ+\na : ONote\nh : NF (oadd e n a)\nthis : NF a\ne0 : ¬e = 0\n⊢ oadd (x + e) n (scale x a) = Mul.mul (oadd x 1 0) (oadd e n a)\n[PROOFSTEP]\nsimp [e0, Mul.mul, mul, scale_eq_mul, (· * ·)]\n[GOAL]\nx : ONote\ninst✝¹ : NF x\no : ONote\ninst✝ : NF o\n⊢ NF (scale x o)\n[PROOFSTEP]\nrw [scale_eq_mul]\n[GOAL]\nx : ONote\ninst✝¹ : NF x\no : ONote\ninst✝ : NF o\n⊢ NF (oadd x 1 0 * o)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nx : ONote\ninst✝¹ : NF x\no : ONote\ninst✝ : NF o\n⊢ repr (scale x o) = ω ^ repr x * repr o\n[PROOFSTEP]\nsimp only [scale_eq_mul, repr_mul, repr, PNat.one_coe, Nat.cast_one, mul_one, add_zero]\n[GOAL]\no o' : ONote\nm : ℕ\ninst✝ : NF o\nh : split o = (o', m)\n⊢ NF o' ∧ repr o = repr o' + ↑m\n[PROOFSTEP]\ncases' e : split' o with a n\n[GOAL]\ncase mk\no o' : ONote\nm : ℕ\ninst✝ : NF o\nh : split o = (o', m)\na : ONote\nn : ℕ\ne : split' o = (a, n)\n⊢ NF o' ∧ repr o = repr o' + ↑m\n[PROOFSTEP]\ncases' nf_repr_split' e with s₁ s₂\n[GOAL]\ncase mk.intro\no o' : ONote\nm : ℕ\ninst✝ : NF o\nh : split o = (o', m)\na : ONote\nn : ℕ\ne : split' o = (a, n)\ns₁ : NF a\ns₂ : repr o = ω * repr a + ↑n\n⊢ NF o' ∧ repr o = repr o' + ↑m\n[PROOFSTEP]\nskip\n[GOAL]\ncase mk.intro\no o' : ONote\nm : ℕ\ninst✝ : NF o\nh : split o = (o', m)\na : ONote\nn : ℕ\ne : split' o = (a, n)\ns₁ : NF a\ns₂ : repr o = ω * repr a + ↑n\n⊢ NF o' ∧ repr o = repr o' + ↑m\n[PROOFSTEP]\nrw [split_eq_scale_split' e] at h \n[GOAL]\ncase mk.intro\no o' : ONote\nm : ℕ\ninst✝ : NF o\na : ONote\nn : ℕ\nh : (scale 1 a, n) = (o', m)\ne : split' o = (a, n)\ns₁ : NF a\ns₂ : repr o = ω * repr a + ↑n\n⊢ NF o' ∧ repr o = repr o' + ↑m\n[PROOFSTEP]\ninjection h\n[GOAL]\ncase mk.intro\no o' : ONote\nm : ℕ\ninst✝ : NF o\na : ONote\nn : ℕ\ne : split' o = (a, n)\ns₁ : NF a\ns₂ : repr o = ω * repr a + ↑n\nfst_eq✝ : scale 1 a = o'\nsnd_eq✝ : n = m\n⊢ NF o' ∧ repr o = repr o' + ↑m\n[PROOFSTEP]\nsubsts o' n\n[GOAL]\ncase mk.intro\no : ONote\nm : ℕ\ninst✝ : NF o\na : ONote\ns₁ : NF a\ne : split' o = (a, m)\ns₂ : repr o = ω * repr a + ↑m\n⊢ NF (scale 1 a) ∧ repr o = repr (scale 1 a) + ↑m\n[PROOFSTEP]\nsimp [repr_scale, s₂.symm]\n[GOAL]\ncase mk.intro\no : ONote\nm : ℕ\ninst✝ : NF o\na : ONote\ns₁ : NF a\ne : split' o = (a, m)\ns₂ : repr o = ω * repr a + ↑m\n⊢ NF (scale 1 a)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\no o' : ONote\nm : ℕ\ninst✝ : NF o\nh : split o = (o', m)\n⊢ ω ∣ repr o'\n[PROOFSTEP]\ncases' e : split' o with a n\n[GOAL]\ncase mk\no o' : ONote\nm : ℕ\ninst✝ : NF o\nh : split o = (o', m)\na : ONote\nn : ℕ\ne : split' o = (a, n)\n⊢ ω ∣ repr o'\n[PROOFSTEP]\nrw [split_eq_scale_split' e] at h \n[GOAL]\ncase mk\no o' : ONote\nm : ℕ\ninst✝ : NF o\na : ONote\nn : ℕ\nh : (scale 1 a, n) = (o', m)\ne : split' o = (a, n)\n⊢ ω ∣ repr o'\n[PROOFSTEP]\ninjection h\n[GOAL]\ncase mk\no o' : ONote\nm : ℕ\ninst✝ : NF o\na : ONote\nn : ℕ\ne : split' o = (a, n)\nfst_eq✝ : scale 1 a = o'\nsnd_eq✝ : n = m\n⊢ ω ∣ repr o'\n[PROOFSTEP]\nsubst o'\n[GOAL]\ncase mk\no : ONote\nm : ℕ\ninst✝ : NF o\na : ONote\nn : ℕ\ne : split' o = (a, n)\nsnd_eq✝ : n = m\n⊢ ω ∣ repr (scale 1 a)\n[PROOFSTEP]\ncases nf_repr_split' e\n[GOAL]\ncase mk.intro\no : ONote\nm : ℕ\ninst✝ : NF o\na : ONote\nn : ℕ\ne : split' o = (a, n)\nsnd_eq✝ : n = m\nleft✝ : NF a\nright✝ : repr o = ω * repr a + ↑n\n⊢ ω ∣ repr (scale 1 a)\n[PROOFSTEP]\nskip\n[GOAL]\ncase mk.intro\no : ONote\nm : ℕ\ninst✝ : NF o\na : ONote\nn : ℕ\ne : split' o = (a, n)\nsnd_eq✝ : n = m\nleft✝ : NF a\nright✝ : repr o = ω * repr a + ↑n\n⊢ ω ∣ repr (scale 1 a)\n[PROOFSTEP]\nsimp\n[GOAL]\no e : ONote\nn : ℕ+\na : ONote\nm : ℕ\ninst✝ : NF o\nh : split o = (oadd e n a, m)\n⊢ repr a + ↑m < ω ^ repr e\n[PROOFSTEP]\ncases' nf_repr_split h with h₁ h₂\n[GOAL]\ncase intro\no e : ONote\nn : ℕ+\na : ONote\nm : ℕ\ninst✝ : NF o\nh : split o = (oadd e n a, m)\nh₁ : NF (oadd e n a)\nh₂ : repr o = repr (oadd e n a) + ↑m\n⊢ repr a + ↑m < ω ^ repr e\n[PROOFSTEP]\ncases' h₁.of_dvd_omega (split_dvd h) with e0 d\n[GOAL]\ncase intro.intro\no e : ONote\nn : ℕ+\na : ONote\nm : ℕ\ninst✝ : NF o\nh : split o = (oadd e n a, m)\nh₁ : NF (oadd e n a)\nh₂ : repr o = repr (oadd e n a) + ↑m\ne0 : repr e ≠ 0\nd : ω ∣ repr a\n⊢ repr a + ↑m < ω ^ repr e\n[PROOFSTEP]\napply principal_add_omega_opow _ h₁.snd'.repr_lt (lt_of_lt_of_le (nat_lt_omega _) _)\n[GOAL]\no e : ONote\nn : ℕ+\na : ONote\nm : ℕ\ninst✝ : NF o\nh : split o = (oadd e n a, m)\nh₁ : NF (oadd e n a)\nh₂ : repr o = repr (oadd e n a) + ↑m\ne0 : repr e ≠ 0\nd : ω ∣ repr a\n⊢ ω ≤ ω ^ repr e\n[PROOFSTEP]\nsimpa using opow_le_opow_right omega_pos (one_le_iff_ne_zero.2 e0)\n[GOAL]\nn : ℕ\no : ONote\n⊢ mulNat o n = o * ↑n\n[PROOFSTEP]\ncases o\n[GOAL]\ncase zero\nn : ℕ\n⊢ mulNat zero n = zero * ↑n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase oadd\nn : ℕ\na✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\n⊢ mulNat (oadd a✝² a✝¹ a✝) n = oadd a✝² a✝¹ a✝ * ↑n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero.zero\n⊢ mulNat zero Nat.zero = zero * ↑Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase zero.succ\nn✝ : ℕ\n⊢ mulNat zero (Nat.succ n✝) = zero * ↑(Nat.succ n✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase oadd.zero\na✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\n⊢ mulNat (oadd a✝² a✝¹ a✝) Nat.zero = oadd a✝² a✝¹ a✝ * ↑Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase oadd.succ\na✝² : ONote\na✝¹ : ℕ+\na✝ : ONote\nn✝ : ℕ\n⊢ mulNat (oadd a✝² a✝¹ a✝) (Nat.succ n✝) = oadd a✝² a✝¹ a✝ * ↑(Nat.succ n✝)\n[PROOFSTEP]\nrfl\n[GOAL]\no : ONote\ninst✝ : NF o\nn : ℕ\n⊢ NF (mulNat o n)\n[PROOFSTEP]\nsimp\n[GOAL]\no : ONote\ninst✝ : NF o\nn : ℕ\n⊢ NF (o * ↑n)\n[PROOFSTEP]\nexact ONote.mul_nf o (ofNat n)\n[GOAL]\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\n⊢ ∀ (k m : ℕ), NF (opowAux e a0 a k m)\n[PROOFSTEP]\nintro k m\n[GOAL]\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\n⊢ NF (opowAux e a0 a k m)\n[PROOFSTEP]\nunfold opowAux\n[GOAL]\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\n⊢ NF\n    (match k, m with\n    | x, 0 => 0\n    | 0, Nat.succ m => oadd e (Nat.succPNat m) 0\n    | Nat.succ k, m => scale (e + mulNat a0 k) a + opowAux e a0 a k m)\n[PROOFSTEP]\ncases' m with m m\n[GOAL]\ncase zero\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk : ℕ\n⊢ NF\n    (match k, Nat.zero with\n    | x, 0 => 0\n    | 0, Nat.succ m => oadd e (Nat.succPNat m) 0\n    | Nat.succ k, m => scale (e + mulNat a0 k) a + opowAux e a0 a k m)\n[PROOFSTEP]\ncases k\n[GOAL]\ncase zero.zero\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\n⊢ NF\n    (match Nat.zero, Nat.zero with\n    | x, 0 => 0\n    | 0, Nat.succ m => oadd e (Nat.succPNat m) 0\n    | Nat.succ k, m => scale (e + mulNat a0 k) a + opowAux e a0 a k m)\n[PROOFSTEP]\nexact NF.zero\n[GOAL]\ncase zero.succ\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nn✝ : ℕ\n⊢ NF\n    (match Nat.succ n✝, Nat.zero with\n    | x, 0 => 0\n    | 0, Nat.succ m => oadd e (Nat.succPNat m) 0\n    | Nat.succ k, m => scale (e + mulNat a0 k) a + opowAux e a0 a k m)\n[PROOFSTEP]\nexact NF.zero\n[GOAL]\ncase succ\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\n⊢ NF\n    (match k, Nat.succ m with\n    | x, 0 => 0\n    | 0, Nat.succ m => oadd e (Nat.succPNat m) 0\n    | Nat.succ k, m => scale (e + mulNat a0 k) a + opowAux e a0 a k m)\n[PROOFSTEP]\ncases' k with k k\n[GOAL]\ncase succ.zero\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nm : ℕ\n⊢ NF\n    (match Nat.zero, Nat.succ m with\n    | x, 0 => 0\n    | 0, Nat.succ m => oadd e (Nat.succPNat m) 0\n    | Nat.succ k, m => scale (e + mulNat a0 k) a + opowAux e a0 a k m)\n[PROOFSTEP]\nexact NF.oadd_zero _ _\n[GOAL]\ncase succ.succ\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nm k : ℕ\n⊢ NF\n    (match Nat.succ k, Nat.succ m with\n    | x, 0 => 0\n    | 0, Nat.succ m => oadd e (Nat.succPNat m) 0\n    | Nat.succ k, m => scale (e + mulNat a0 k) a + opowAux e a0 a k m)\n[PROOFSTEP]\nhaveI := nf_opowAux e a0 a k\n[GOAL]\ncase succ.succ\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nm k : ℕ\nthis : ∀ (m : ℕ), NF (opowAux e a0 a k m)\n⊢ NF\n    (match Nat.succ k, Nat.succ m with\n    | x, 0 => 0\n    | 0, Nat.succ m => oadd e (Nat.succPNat m) 0\n    | Nat.succ k, m => scale (e + mulNat a0 k) a + opowAux e a0 a k m)\n[PROOFSTEP]\nsimp only [Nat.succ_ne_zero m]\n[GOAL]\ncase succ.succ\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nm k : ℕ\nthis : ∀ (m : ℕ), NF (opowAux e a0 a k m)\n⊢ NF (scale (e + mulNat a0 k) a + opowAux e a0 a k (Nat.succ m))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\ncases' e₁ : split o₁ with a m\n[GOAL]\ncase mk\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\na : ONote\nm : ℕ\ne₁ : split o₁ = (a, m)\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\nhave na := (nf_repr_split e₁).1\n[GOAL]\ncase mk\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\na : ONote\nm : ℕ\ne₁ : split o₁ = (a, m)\nna : NF a\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\ncases' e₂ : split' o₂ with b' k\n[GOAL]\ncase mk.mk\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\na : ONote\nm : ℕ\ne₁ : split o₁ = (a, m)\nna : NF a\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\nhaveI := (nf_repr_split' e₂).1\n[GOAL]\ncase mk.mk\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\na : ONote\nm : ℕ\ne₁ : split o₁ = (a, m)\nna : NF a\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\ncases' a with a0 n a'\n[GOAL]\ncase mk.mk.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\ne₁ : split o₁ = (zero, m)\nna : NF zero\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\ncases' m with m\n[GOAL]\ncase mk.mk.zero.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\nna : NF zero\ne₁ : split o₁ = (zero, Nat.zero)\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\nby_cases o₂ = 0\n[GOAL]\ncase mk.mk.zero.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\nna : NF zero\ne₁ : split o₁ = (zero, Nat.zero)\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\nby_cases o₂ = 0\n[GOAL]\ncase pos\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\nna : NF zero\ne₁ : split o₁ = (zero, Nat.zero)\nh : o₂ = 0\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\nsimp [(· ^ ·), Pow.pow, pow, opow, opowAux2, *]\n[GOAL]\ncase neg\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\nna : NF zero\ne₁ : split o₁ = (zero, Nat.zero)\nh : ¬o₂ = 0\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\nsimp [(· ^ ·), Pow.pow, pow, opow, opowAux2, *]\n[GOAL]\ncase mk.mk.zero.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\nna : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\nby_cases m = 0\n[GOAL]\ncase mk.mk.zero.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\nna : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\nby_cases m = 0\n[GOAL]\ncase pos\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\nna : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nh : m = 0\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\nsimp only [(· ^ ·), Pow.pow, pow, opow, opowAux2, *, zero_def]\n[GOAL]\ncase neg\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\nna : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nh : ¬m = 0\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\nsimp only [(· ^ ·), Pow.pow, pow, opow, opowAux2, mulNat_eq_mul, ofNat, *]\n[GOAL]\ncase neg\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\nna : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nh : ¬m = 0\n⊢ NF (oadd b' (Monoid.npow k (Nat.succPNat m)) 0)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase mk.mk.oadd\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nna : NF (oadd a0 n a')\n⊢ NF (o₁ ^ o₂)\n[PROOFSTEP]\nsimp [(· ^ ·), Pow.pow, pow, opow, opowAux2, e₁, e₂, split_eq_scale_split' e₂]\n[GOAL]\ncase mk.mk.oadd\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nna : NF (oadd a0 n a')\n⊢ NF\n    (match (scale 1 b', k) with\n    | (b, 0) => oadd (a0 * b) 1 0\n    | (b, Nat.succ k) => scale (a0 * b + a0 * ↑k) (oadd a0 n a') + opowAux (a0 * b) a0 (oadd a0 n a' * ↑m) k m)\n[PROOFSTEP]\nhave := na.fst\n[GOAL]\ncase mk.mk.oadd\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nthis✝ : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nna : NF (oadd a0 n a')\nthis : NF a0\n⊢ NF\n    (match (scale 1 b', k) with\n    | (b, 0) => oadd (a0 * b) 1 0\n    | (b, Nat.succ k) => scale (a0 * b + a0 * ↑k) (oadd a0 n a') + opowAux (a0 * b) a0 (oadd a0 n a' * ↑m) k m)\n[PROOFSTEP]\ncases' k with k\n[GOAL]\ncase mk.mk.oadd.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\nb' : ONote\nthis✝ : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nna : NF (oadd a0 n a')\nthis : NF a0\ne₂ : split' o₂ = (b', Nat.zero)\n⊢ NF\n    (match (scale 1 b', Nat.zero) with\n    | (b, 0) => oadd (a0 * b) 1 0\n    | (b, Nat.succ k) => scale (a0 * b + a0 * ↑k) (oadd a0 n a') + opowAux (a0 * b) a0 (oadd a0 n a' * ↑m) k m)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.oadd.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\nb' : ONote\nthis✝ : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nna : NF (oadd a0 n a')\nthis : NF a0\nk : ℕ\ne₂ : split' o₂ = (b', Nat.succ k)\n⊢ NF\n    (match (scale 1 b', Nat.succ k) with\n    | (b, 0) => oadd (a0 * b) 1 0\n    | (b, Nat.succ k) => scale (a0 * b + a0 * ↑k) (oadd a0 n a') + opowAux (a0 * b) a0 (oadd a0 n a' * ↑m) k m)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.oadd.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\nb' : ONote\nthis✝ : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nna : NF (oadd a0 n a')\nthis : NF a0\ne₂ : split' o₂ = (b', Nat.zero)\n⊢ NF (oadd (a0 * scale 1 b') 1 0)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase mk.mk.oadd.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\nb' : ONote\nthis✝ : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nna : NF (oadd a0 n a')\nthis : NF a0\nk : ℕ\ne₂ : split' o₂ = (b', Nat.succ k)\n⊢ NF (scale (a0 * scale 1 b' + a0 * ↑k) (oadd a0 n a') + opowAux (a0 * scale 1 b') a0 (oadd a0 n a' * ↑m) k m)\n[PROOFSTEP]\ncases k\n[GOAL]\ncase mk.mk.oadd.succ.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\nb' : ONote\nthis✝ : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nna : NF (oadd a0 n a')\nthis : NF a0\ne₂ : split' o₂ = (b', Nat.succ Nat.zero)\n⊢ NF\n    (scale (a0 * scale 1 b' + a0 * ↑Nat.zero) (oadd a0 n a') +\n      opowAux (a0 * scale 1 b') a0 (oadd a0 n a' * ↑m) Nat.zero m)\n[PROOFSTEP]\ncases m\n[GOAL]\ncase mk.mk.oadd.succ.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\nb' : ONote\nthis✝ : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nna : NF (oadd a0 n a')\nthis : NF a0\nn✝ : ℕ\ne₂ : split' o₂ = (b', Nat.succ (Nat.succ n✝))\n⊢ NF\n    (scale (a0 * scale 1 b' + a0 * ↑(Nat.succ n✝)) (oadd a0 n a') +\n      opowAux (a0 * scale 1 b') a0 (oadd a0 n a' * ↑m) (Nat.succ n✝) m)\n[PROOFSTEP]\ncases m\n[GOAL]\ncase mk.mk.oadd.succ.zero.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nthis✝ : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\nna : NF (oadd a0 n a')\nthis : NF a0\ne₂ : split' o₂ = (b', Nat.succ Nat.zero)\ne₁ : split o₁ = (oadd a0 n a', Nat.zero)\n⊢ NF\n    (scale (a0 * scale 1 b' + a0 * ↑Nat.zero) (oadd a0 n a') +\n      opowAux (a0 * scale 1 b') a0 (oadd a0 n a' * ↑Nat.zero) Nat.zero Nat.zero)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase mk.mk.oadd.succ.zero.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nthis✝ : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\nna : NF (oadd a0 n a')\nthis : NF a0\ne₂ : split' o₂ = (b', Nat.succ Nat.zero)\nn✝ : ℕ\ne₁ : split o₁ = (oadd a0 n a', Nat.succ n✝)\n⊢ NF\n    (scale (a0 * scale 1 b' + a0 * ↑Nat.zero) (oadd a0 n a') +\n      opowAux (a0 * scale 1 b') a0 (oadd a0 n a' * ↑(Nat.succ n✝)) Nat.zero (Nat.succ n✝))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase mk.mk.oadd.succ.succ.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nthis✝ : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\nna : NF (oadd a0 n a')\nthis : NF a0\nn✝ : ℕ\ne₂ : split' o₂ = (b', Nat.succ (Nat.succ n✝))\ne₁ : split o₁ = (oadd a0 n a', Nat.zero)\n⊢ NF\n    (scale (a0 * scale 1 b' + a0 * ↑(Nat.succ n✝)) (oadd a0 n a') +\n      opowAux (a0 * scale 1 b') a0 (oadd a0 n a' * ↑Nat.zero) (Nat.succ n✝) Nat.zero)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase mk.mk.oadd.succ.succ.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nb' : ONote\nthis✝ : NF b'\na0 : ONote\nn : ℕ+\na' : ONote\nna : NF (oadd a0 n a')\nthis : NF a0\nn✝¹ : ℕ\ne₂ : split' o₂ = (b', Nat.succ (Nat.succ n✝¹))\nn✝ : ℕ\ne₁ : split o₁ = (oadd a0 n a', Nat.succ n✝)\n⊢ NF\n    (scale (a0 * scale 1 b' + a0 * ↑(Nat.succ n✝¹)) (oadd a0 n a') +\n      opowAux (a0 * scale 1 b') a0 (oadd a0 n a' * ↑(Nat.succ n✝)) (Nat.succ n✝¹) (Nat.succ n✝))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nm : ℕ\n⊢ repr (opowAux e a0 a 0 m) = ω ^ repr e * repr (opowAux 0 a0 a 0 m)\n[PROOFSTEP]\ncases m\n[GOAL]\ncase zero\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\n⊢ repr (opowAux e a0 a 0 Nat.zero) = ω ^ repr e * repr (opowAux 0 a0 a 0 Nat.zero)\n[PROOFSTEP]\nsimp [opowAux]\n[GOAL]\ncase succ\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nn✝ : ℕ\n⊢ repr (opowAux e a0 a 0 (Nat.succ n✝)) = ω ^ repr e * repr (opowAux 0 a0 a 0 (Nat.succ n✝))\n[PROOFSTEP]\nsimp [opowAux]\n[GOAL]\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\n⊢ repr (opowAux e a0 a (k + 1) m) = ω ^ repr e * repr (opowAux 0 a0 a (k + 1) m)\n[PROOFSTEP]\nby_cases h : m = 0\n[GOAL]\ncase pos\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\nh : m = 0\n⊢ repr (opowAux e a0 a (k + 1) m) = ω ^ repr e * repr (opowAux 0 a0 a (k + 1) m)\n[PROOFSTEP]\nsimp [h, opowAux, mul_add, opow_add, mul_assoc, scale_opowAux _ _ _ k]\n[GOAL]\ncase neg\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\nh : ¬m = 0\n⊢ repr (opowAux e a0 a (k + 1) m) = ω ^ repr e * repr (opowAux 0 a0 a (k + 1) m)\n[PROOFSTEP]\nrw [opowAux]\n[GOAL]\ncase neg\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\nh : ¬m = 0\n⊢ repr (scale (e + mulNat a0 k) a + opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a (k + 1) m)\ncase neg.x_2 e a0 a : ONote inst✝² : NF e inst✝¹ : NF a0 inst✝ : NF a k m : ℕ h : ¬m = 0 ⊢ m = 0 → False\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg.x_2\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\nh : ¬m = 0\n⊢ m = 0 → False\ncase neg\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\nh : ¬m = 0\n⊢ repr (scale (e + mulNat a0 k) a + opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a (k + 1) m)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\nh : ¬m = 0\n⊢ repr (scale (e + mulNat a0 k) a + opowAux e a0 a k m) = ω ^ repr e * repr (opowAux 0 a0 a (k + 1) m)\n[PROOFSTEP]\nrw [opowAux]\n[GOAL]\ncase neg\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\nh : ¬m = 0\n⊢ repr (scale (e + mulNat a0 k) a + opowAux e a0 a k m) =\n    ω ^ repr e * repr (scale (0 + mulNat a0 k) a + opowAux 0 a0 a k m)\ncase neg.x_2 e a0 a : ONote inst✝² : NF e inst✝¹ : NF a0 inst✝ : NF a k m : ℕ h : ¬m = 0 ⊢ m = 0 → False\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg.x_2\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\nh : ¬m = 0\n⊢ m = 0 → False\ncase neg\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\nh : ¬m = 0\n⊢ repr (scale (e + mulNat a0 k) a + opowAux e a0 a k m) =\n    ω ^ repr e * repr (scale (0 + mulNat a0 k) a + opowAux 0 a0 a k m)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\nh : ¬m = 0\n⊢ repr (scale (e + mulNat a0 k) a + opowAux e a0 a k m) =\n    ω ^ repr e * repr (scale (0 + mulNat a0 k) a + opowAux 0 a0 a k m)\n[PROOFSTEP]\nrw [repr_add, repr_scale, scale_opowAux _ _ _ k]\n[GOAL]\ncase neg\ne a0 a : ONote\ninst✝² : NF e\ninst✝¹ : NF a0\ninst✝ : NF a\nk m : ℕ\nh : ¬m = 0\n⊢ ω ^ repr (e + mulNat a0 k) * repr a + ω ^ repr e * repr (opowAux 0 a0 a k m) =\n    ω ^ repr e * repr (scale (0 + mulNat a0 k) a + opowAux 0 a0 a k m)\n[PROOFSTEP]\nsimp only [repr_add, repr_scale, opow_add, mul_assoc, zero_add, mul_add]\n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\na' : Ordinal.{0}\ne0 : repr e ≠ 0\nh : a' < ω ^ repr e\naa : repr a = a'\nn : ℕ+\n⊢ (ω ^ repr e * ↑↑n + a') ^ ω = (ω ^ repr e) ^ ω\n[PROOFSTEP]\nsubst aa\n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh : repr a < ω ^ repr e\n⊢ (ω ^ repr e * ↑↑n + repr a) ^ ω = (ω ^ repr e) ^ ω\n[PROOFSTEP]\nhave No := Ne.oadd n (Na.below_of_lt' h)\n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh : repr a < ω ^ repr e\nNo : NF (oadd e n a)\n⊢ (ω ^ repr e * ↑↑n + repr a) ^ ω = (ω ^ repr e) ^ ω\n[PROOFSTEP]\nhave := omega_le_oadd e n a\n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis : ω ^ repr e ≤ repr (oadd e n a)\n⊢ (ω ^ repr e * ↑↑n + repr a) ^ ω = (ω ^ repr e) ^ ω\n[PROOFSTEP]\nrw [repr] at this \n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\n⊢ (ω ^ repr e * ↑↑n + repr a) ^ ω = (ω ^ repr e) ^ ω\n[PROOFSTEP]\nrefine' le_antisymm _ (opow_le_opow_left _ this)\n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\n⊢ (ω ^ repr e * ↑↑n + repr a) ^ ω ≤ (ω ^ repr e) ^ ω\n[PROOFSTEP]\napply (opow_le_of_limit ((opow_pos _ omega_pos).trans_le this).ne' omega_isLimit).2\n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\n⊢ ∀ (b' : Ordinal.{0}), b' < ω → (ω ^ repr e * ↑↑n + repr a) ^ b' ≤ (ω ^ repr e) ^ ω\n[PROOFSTEP]\nintro b l\n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\nb : Ordinal.{0}\nl : b < ω\n⊢ (ω ^ repr e * ↑↑n + repr a) ^ b ≤ (ω ^ repr e) ^ ω\n[PROOFSTEP]\nhave := (No.below_of_lt (lt_succ _)).repr_lt\n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\nb : Ordinal.{0}\nl : b < ω\nthis : repr (oadd e n a) < ω ^ succ (repr e)\n⊢ (ω ^ repr e * ↑↑n + repr a) ^ b ≤ (ω ^ repr e) ^ ω\n[PROOFSTEP]\nrw [repr] at this \n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\nb : Ordinal.{0}\nl : b < ω\nthis : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)\n⊢ (ω ^ repr e * ↑↑n + repr a) ^ b ≤ (ω ^ repr e) ^ ω\n[PROOFSTEP]\napply (opow_le_opow_left b <| this.le).trans\n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\nb : Ordinal.{0}\nl : b < ω\nthis : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)\n⊢ (ω ^ succ (repr e)) ^ b ≤ (ω ^ repr e) ^ ω\n[PROOFSTEP]\nrw [← opow_mul, ← opow_mul]\n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\nb : Ordinal.{0}\nl : b < ω\nthis : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)\n⊢ ω ^ (succ (repr e) * b) ≤ ω ^ (repr e * ω)\n[PROOFSTEP]\napply opow_le_opow_right omega_pos\n[GOAL]\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\nb : Ordinal.{0}\nl : b < ω\nthis : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)\n⊢ succ (repr e) * b ≤ repr e * ω\n[PROOFSTEP]\ncases' le_or_lt ω (repr e) with h h\n[GOAL]\ncase inl\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh✝ : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\nb : Ordinal.{0}\nl : b < ω\nthis : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)\nh : ω ≤ repr e\n⊢ succ (repr e) * b ≤ repr e * ω\n[PROOFSTEP]\napply (mul_le_mul_left' (le_succ b) _).trans\n[GOAL]\ncase inl\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh✝ : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\nb : Ordinal.{0}\nl : b < ω\nthis : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)\nh : ω ≤ repr e\n⊢ succ (repr e) * succ b ≤ repr e * ω\n[PROOFSTEP]\nrw [← add_one_eq_succ, add_mul_succ _ (one_add_of_omega_le h), add_one_eq_succ, succ_le_iff,\n  Ordinal.mul_lt_mul_iff_left (Ordinal.pos_iff_ne_zero.2 e0)]\n[GOAL]\ncase inl\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh✝ : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\nb : Ordinal.{0}\nl : b < ω\nthis : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)\nh : ω ≤ repr e\n⊢ succ b < ω\n[PROOFSTEP]\nexact omega_isLimit.2 _ l\n[GOAL]\ncase inr\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh✝ : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\nb : Ordinal.{0}\nl : b < ω\nthis : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)\nh : repr e < ω\n⊢ succ (repr e) * b ≤ repr e * ω\n[PROOFSTEP]\napply (principal_mul_omega (omega_isLimit.2 _ h) l).le.trans\n[GOAL]\ncase inr\ne a : ONote\nNe : NF e\nNa : NF a\ne0 : repr e ≠ 0\nn : ℕ+\nh✝ : repr a < ω ^ repr e\nNo : NF (oadd e n a)\nthis✝ : ω ^ repr e ≤ ω ^ repr e * ↑↑n + repr a\nb : Ordinal.{0}\nl : b < ω\nthis : ω ^ repr e * ↑↑n + repr a < ω ^ succ (repr e)\nh : repr e < ω\n⊢ ω ≤ repr e * ω\n[PROOFSTEP]\nsimpa using mul_le_mul_right' (one_le_iff_ne_zero.2 e0) ω\n[GOAL]\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk : ℕ\n⊢ let R := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m);\n  (k ≠ 0 → R < (ω ^ repr a0) ^ succ ↑k) ∧\n    (ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a') + R = (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑k\n[PROOFSTEP]\nintro R'\n[GOAL]\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\n⊢ (k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑k) ∧\n    (ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a') + R' = (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑k\n[PROOFSTEP]\nhaveI No : NF (oadd a0 n a') := N0.oadd n (Na'.below_of_lt' <| lt_of_le_of_lt (le_add_right _ _) h)\n[GOAL]\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nNo : NF (oadd a0 n a')\n⊢ (k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑k) ∧\n    (ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a') + R' = (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑k\n[PROOFSTEP]\ninduction' k with k IH\n[GOAL]\ncase zero\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nNo : NF (oadd a0 n a')\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) Nat.zero m)\n⊢ (Nat.zero ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑Nat.zero) ∧\n    (ω ^ repr a0) ^ ↑Nat.zero * (ω ^ repr a0 * ↑↑n + repr a') + R' = (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑Nat.zero\n[PROOFSTEP]\ncases m\n[GOAL]\ncase zero.zero\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk : ℕ\nNo : NF (oadd a0 n a')\nh : repr a' + ↑Nat.zero < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) k Nat.zero)\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) Nat.zero Nat.zero)\n⊢ (Nat.zero ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑Nat.zero) ∧\n    (ω ^ repr a0) ^ ↑Nat.zero * (ω ^ repr a0 * ↑↑n + repr a') + R' =\n      (ω ^ repr a0 * ↑↑n + repr a' + ↑Nat.zero) ^ succ ↑Nat.zero\n[PROOFSTEP]\nsimp [opowAux]\n  -- rename R => R'\n[GOAL]\ncase zero.succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk : ℕ\nNo : NF (oadd a0 n a')\nn✝ : ℕ\nh : repr a' + ↑(Nat.succ n✝) < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) k (Nat.succ n✝))\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) Nat.zero (Nat.succ n✝))\n⊢ (Nat.zero ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑Nat.zero) ∧\n    (ω ^ repr a0) ^ ↑Nat.zero * (ω ^ repr a0 * ↑↑n + repr a') + R' =\n      (ω ^ repr a0 * ↑↑n + repr a' + ↑(Nat.succ n✝)) ^ succ ↑Nat.zero\n[PROOFSTEP]\nsimp [opowAux]\n  -- rename R => R'\n[GOAL]\ncase succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nIH :\n  let R' := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m);\n  (k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑k) ∧\n    (ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a') + R' = (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑k\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\n⊢ (Nat.succ k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑(Nat.succ k)) ∧\n    (ω ^ repr a0) ^ ↑(Nat.succ k) * (ω ^ repr a0 * ↑↑n + repr a') + R' =\n      (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑(Nat.succ k)\n[PROOFSTEP]\nlet R := repr (opowAux 0 a0 (oadd a0 n a' * ofNat m) k m)\n[GOAL]\ncase succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nIH :\n  let R' := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m);\n  (k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑k) ∧\n    (ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a') + R' = (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑k\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\n⊢ (Nat.succ k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑(Nat.succ k)) ∧\n    (ω ^ repr a0) ^ ↑(Nat.succ k) * (ω ^ repr a0 * ↑↑n + repr a') + R' =\n      (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑(Nat.succ k)\n[PROOFSTEP]\nlet ω0 := ω ^ repr a0\n[GOAL]\ncase succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nIH :\n  let R' := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m);\n  (k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑k) ∧\n    (ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a') + R' = (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑k\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\n⊢ (Nat.succ k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑(Nat.succ k)) ∧\n    (ω ^ repr a0) ^ ↑(Nat.succ k) * (ω ^ repr a0 * ↑↑n + repr a') + R' =\n      (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑(Nat.succ k)\n[PROOFSTEP]\nlet α' := ω0 * n + repr a'\n[GOAL]\ncase succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nIH :\n  let R' := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m);\n  (k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑k) ∧\n    (ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a') + R' = (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑k\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\n⊢ (Nat.succ k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑(Nat.succ k)) ∧\n    (ω ^ repr a0) ^ ↑(Nat.succ k) * (ω ^ repr a0 * ↑↑n + repr a') + R' =\n      (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑(Nat.succ k)\n[PROOFSTEP]\nchange (k ≠ 0 → R < (ω0 ^ succ ↑k)) ∧ (ω0 ^ k) * α' + R = (α' + m) ^ succ ↑k at IH \n[GOAL]\ncase succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\n⊢ (Nat.succ k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑(Nat.succ k)) ∧\n    (ω ^ repr a0) ^ ↑(Nat.succ k) * (ω ^ repr a0 * ↑↑n + repr a') + R' =\n      (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑(Nat.succ k)\n[PROOFSTEP]\nhave RR : R' = (ω0 ^ k) * (α' * m) + R := by\n  by_cases h : m = 0\n  · simp only [h, ONote.ofNat, Nat.cast_zero, zero_add, ONote.repr, mul_zero, ONote.opowAux, add_zero]\n  ·\n    simp only [ONote.repr_scale, ONote.repr, ONote.mulNat_eq_mul, ONote.opowAux, ONote.repr_ofNat, ONote.repr_mul,\n      ONote.repr_add, Ordinal.opow_mul, ONote.zero_add]\n[GOAL]\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\n⊢ R' = ω0 ^ ↑k * (α' * ↑m) + R\n[PROOFSTEP]\nby_cases h : m = 0\n[GOAL]\ncase pos\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh✝ : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nh : m = 0\n⊢ R' = ω0 ^ ↑k * (α' * ↑m) + R\n[PROOFSTEP]\nsimp only [h, ONote.ofNat, Nat.cast_zero, zero_add, ONote.repr, mul_zero, ONote.opowAux, add_zero]\n[GOAL]\ncase neg\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh✝ : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nh : ¬m = 0\n⊢ R' = ω0 ^ ↑k * (α' * ↑m) + R\n[PROOFSTEP]\nsimp only [ONote.repr_scale, ONote.repr, ONote.mulNat_eq_mul, ONote.opowAux, ONote.repr_ofNat, ONote.repr_mul,\n  ONote.repr_add, Ordinal.opow_mul, ONote.zero_add]\n[GOAL]\ncase succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\n⊢ (Nat.succ k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑(Nat.succ k)) ∧\n    (ω ^ repr a0) ^ ↑(Nat.succ k) * (ω ^ repr a0 * ↑↑n + repr a') + R' =\n      (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑(Nat.succ k)\n[PROOFSTEP]\nhave α0 : 0 < α' := by simpa [lt_def, repr] using oadd_pos a0 n a'\n[GOAL]\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\n⊢ 0 < α'\n[PROOFSTEP]\nsimpa [lt_def, repr] using oadd_pos a0 n a'\n[GOAL]\ncase succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\n⊢ (Nat.succ k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑(Nat.succ k)) ∧\n    (ω ^ repr a0) ^ ↑(Nat.succ k) * (ω ^ repr a0 * ↑↑n + repr a') + R' =\n      (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑(Nat.succ k)\n[PROOFSTEP]\nhave ω00 : 0 < (ω0 ^ k) := opow_pos _ (opow_pos _ omega_pos)\n[GOAL]\ncase succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\n⊢ (Nat.succ k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑(Nat.succ k)) ∧\n    (ω ^ repr a0) ^ ↑(Nat.succ k) * (ω ^ repr a0 * ↑↑n + repr a') + R' =\n      (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑(Nat.succ k)\n[PROOFSTEP]\nhave Rl : R < ω ^ (repr a0 * succ ↑k) := by\n  by_cases k0 : k = 0\n  · simp [k0]\n    refine' lt_of_lt_of_le _ (opow_le_opow_right omega_pos (one_le_iff_ne_zero.2 e0))\n    cases' m with m <;> simp [opowAux, omega_pos]\n    rw [← add_one_eq_succ, ← Nat.cast_succ]\n    apply nat_lt_omega\n  · rw [opow_mul]\n    exact IH.1 k0\n[GOAL]\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\n⊢ R < ω ^ (repr a0 * succ ↑k)\n[PROOFSTEP]\nby_cases k0 : k = 0\n[GOAL]\ncase pos\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nk0 : k = 0\n⊢ R < ω ^ (repr a0 * succ ↑k)\n[PROOFSTEP]\nsimp [k0]\n[GOAL]\ncase pos\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nk0 : k = 0\n⊢ repr (opowAux 0 a0 (oadd a0 n a' * ↑m) 0 m) < ω ^ repr a0\n[PROOFSTEP]\nrefine' lt_of_lt_of_le _ (opow_le_opow_right omega_pos (one_le_iff_ne_zero.2 e0))\n[GOAL]\ncase pos\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nk0 : k = 0\n⊢ repr (opowAux 0 a0 (oadd a0 n a' * ↑m) 0 m) < ω ^ 1\n[PROOFSTEP]\ncases' m with m\n[GOAL]\ncase pos.zero\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk✝ : ℕ\nNo : NF (oadd a0 n a')\nk : ℕ\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nk0 : k = 0\nh : repr a' + ↑Nat.zero < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) k✝ Nat.zero)\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) (Nat.succ k) Nat.zero)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) k Nat.zero)\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑Nat.zero) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑Nat.zero) + R\n⊢ repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) 0 Nat.zero) < ω ^ 1\n[PROOFSTEP]\nsimp [opowAux, omega_pos]\n[GOAL]\ncase pos.succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk✝ : ℕ\nNo : NF (oadd a0 n a')\nk : ℕ\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nk0 : k = 0\nm : ℕ\nh : repr a' + ↑(Nat.succ m) < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ m)) k✝ (Nat.succ m))\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ m)) (Nat.succ k) (Nat.succ m))\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ m)) k (Nat.succ m))\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑(Nat.succ m)) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑(Nat.succ m)) + R\n⊢ repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ m)) 0 (Nat.succ m)) < ω ^ 1\n[PROOFSTEP]\nsimp [opowAux, omega_pos]\n[GOAL]\ncase pos.succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk✝ : ℕ\nNo : NF (oadd a0 n a')\nk : ℕ\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nk0 : k = 0\nm : ℕ\nh : repr a' + ↑(Nat.succ m) < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ m)) k✝ (Nat.succ m))\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ m)) (Nat.succ k) (Nat.succ m))\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ m)) k (Nat.succ m))\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑(Nat.succ m)) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑(Nat.succ m)) + R\n⊢ succ ↑m < ω\n[PROOFSTEP]\nrw [← add_one_eq_succ, ← Nat.cast_succ]\n[GOAL]\ncase pos.succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk✝ : ℕ\nNo : NF (oadd a0 n a')\nk : ℕ\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nk0 : k = 0\nm : ℕ\nh : repr a' + ↑(Nat.succ m) < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ m)) k✝ (Nat.succ m))\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ m)) (Nat.succ k) (Nat.succ m))\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ m)) k (Nat.succ m))\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑(Nat.succ m)) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑(Nat.succ m)) + R\n⊢ ↑(Nat.succ m) < ω\n[PROOFSTEP]\napply nat_lt_omega\n[GOAL]\ncase neg\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nk0 : ¬k = 0\n⊢ R < ω ^ (repr a0 * succ ↑k)\n[PROOFSTEP]\nrw [opow_mul]\n[GOAL]\ncase neg\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nk0 : ¬k = 0\n⊢ R < (ω ^ repr a0) ^ succ ↑k\n[PROOFSTEP]\nexact IH.1 k0\n[GOAL]\ncase succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ (Nat.succ k ≠ 0 → R' < (ω ^ repr a0) ^ succ ↑(Nat.succ k)) ∧\n    (ω ^ repr a0) ^ ↑(Nat.succ k) * (ω ^ repr a0 * ↑↑n + repr a') + R' =\n      (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑(Nat.succ k)\n[PROOFSTEP]\nrefine' ⟨fun _ => _, _⟩\n[GOAL]\ncase succ.refine'_1\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nx✝ : Nat.succ k ≠ 0\n⊢ R' < (ω ^ repr a0) ^ succ ↑(Nat.succ k)\n[PROOFSTEP]\nrw [RR, ← opow_mul _ _ (succ k.succ)]\n[GOAL]\ncase succ.refine'_1\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nx✝ : Nat.succ k ≠ 0\n⊢ ω0 ^ ↑k * (α' * ↑m) + R < ω ^ (repr a0 * succ ↑(Nat.succ k))\n[PROOFSTEP]\nhave e0 := Ordinal.pos_iff_ne_zero.2 e0\n[GOAL]\ncase succ.refine'_1\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0✝ : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nx✝ : Nat.succ k ≠ 0\ne0 : 0 < repr a0\n⊢ ω0 ^ ↑k * (α' * ↑m) + R < ω ^ (repr a0 * succ ↑(Nat.succ k))\n[PROOFSTEP]\nhave rr0 : 0 < repr a0 + repr a0 := lt_of_lt_of_le e0 (le_add_left _ _)\n[GOAL]\ncase succ.refine'_1\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0✝ : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nx✝ : Nat.succ k ≠ 0\ne0 : 0 < repr a0\nrr0 : 0 < repr a0 + repr a0\n⊢ ω0 ^ ↑k * (α' * ↑m) + R < ω ^ (repr a0 * succ ↑(Nat.succ k))\n[PROOFSTEP]\napply principal_add_omega_opow\n[GOAL]\ncase succ.refine'_1.a\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0✝ : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nx✝ : Nat.succ k ≠ 0\ne0 : 0 < repr a0\nrr0 : 0 < repr a0 + repr a0\n⊢ ω0 ^ ↑k * (α' * ↑m) < ω ^ (repr a0 * succ ↑(Nat.succ k))\n[PROOFSTEP]\nsimp [opow_mul, opow_add, mul_assoc]\n[GOAL]\ncase succ.refine'_1.a\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0✝ : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nx✝ : Nat.succ k ≠ 0\ne0 : 0 < repr a0\nrr0 : 0 < repr a0 + repr a0\n⊢ (ω ^ repr a0) ^ ↑k * ((ω ^ repr a0 * ↑↑n + repr a') * ↑m) < (ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ω ^ repr a0)\n[PROOFSTEP]\nrw [Ordinal.mul_lt_mul_iff_left ω00, ← Ordinal.opow_add]\n[GOAL]\ncase succ.refine'_1.a\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0✝ : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nx✝ : Nat.succ k ≠ 0\ne0 : 0 < repr a0\nrr0 : 0 < repr a0 + repr a0\n⊢ (ω ^ repr a0 * ↑↑n + repr a') * ↑m < ω ^ (repr a0 + repr a0)\n[PROOFSTEP]\nhave : _ < ω ^ (repr a0 + repr a0) := (No.below_of_lt ?_).repr_lt\n[GOAL]\ncase succ.refine'_1.a.refine_2\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0✝ : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nx✝ : Nat.succ k ≠ 0\ne0 : 0 < repr a0\nrr0 : 0 < repr a0 + repr a0\nthis : repr (oadd a0 n a') < ω ^ (repr a0 + repr a0)\n⊢ (ω ^ repr a0 * ↑↑n + repr a') * ↑m < ω ^ (repr a0 + repr a0)\ncase succ.refine'_1.a.refine_1\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0✝ : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nx✝ : Nat.succ k ≠ 0\ne0 : 0 < repr a0\nrr0 : 0 < repr a0 + repr a0\n⊢ repr a0 < repr a0 + repr a0\n[PROOFSTEP]\nrefine' mul_lt_omega_opow rr0 this (nat_lt_omega _)\n[GOAL]\ncase succ.refine'_1.a.refine_1\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0✝ : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nx✝ : Nat.succ k ≠ 0\ne0 : 0 < repr a0\nrr0 : 0 < repr a0 + repr a0\n⊢ repr a0 < repr a0 + repr a0\n[PROOFSTEP]\nsimpa using (add_lt_add_iff_left (repr a0)).2 e0\n[GOAL]\ncase succ.refine'_1.a\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0✝ : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nx✝ : Nat.succ k ≠ 0\ne0 : 0 < repr a0\nrr0 : 0 < repr a0 + repr a0\n⊢ R < ω ^ (repr a0 * succ ↑(Nat.succ k))\n[PROOFSTEP]\nrefine'\n  lt_of_lt_of_le Rl\n    (opow_le_opow_right omega_pos <| mul_le_mul_left' (succ_le_succ_iff.2 (nat_cast_le.2 (le_of_lt k.lt_succ_self))) _)\n[GOAL]\ncase succ.refine'_2\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ (ω ^ repr a0) ^ ↑(Nat.succ k) * (ω ^ repr a0 * ↑↑n + repr a') + R' =\n    (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑(Nat.succ k)\n[PROOFSTEP]\ncalc\n  (ω0 ^ k.succ) * α' + R'\n  _ = (ω0 ^ succ ↑k) * α' + ((ω0 ^ k) * α' * m + R) := by rw [nat_cast_succ, RR, ← mul_assoc]\n  _ = ((ω0 ^ k) * α' + R) * α' + ((ω0 ^ k) * α' + R) * m := ?_\n  _ = (α' + m) ^ succ ↑k.succ := by rw [← mul_add, nat_cast_succ, opow_succ, IH.2]\n[GOAL]\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ ω0 ^ ↑(Nat.succ k) * α' + R' = ω0 ^ succ ↑k * α' + (ω0 ^ ↑k * α' * ↑m + R)\n[PROOFSTEP]\nrw [nat_cast_succ, RR, ← mul_assoc]\n[GOAL]\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ (ω0 ^ ↑k * α' + R) * α' + (ω0 ^ ↑k * α' + R) * ↑m = (α' + ↑m) ^ succ ↑(Nat.succ k)\n[PROOFSTEP]\nrw [← mul_add, nat_cast_succ, opow_succ, IH.2]\n[GOAL]\ncase succ.refine'_2\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ ω0 ^ succ ↑k * α' + (ω0 ^ ↑k * α' * ↑m + R) = (ω0 ^ ↑k * α' + R) * α' + (ω0 ^ ↑k * α' + R) * ↑m\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase succ.refine'_2.e_a\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ ω0 ^ succ ↑k * α' = (ω0 ^ ↑k * α' + R) * α'\n[PROOFSTEP]\nhave αd : ω ∣ α' := dvd_add (dvd_mul_of_dvd_left (by simpa using opow_dvd_opow ω (one_le_iff_ne_zero.2 e0)) _) d\n[GOAL]\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ ω ∣ ω0\n[PROOFSTEP]\nsimpa using opow_dvd_opow ω (one_le_iff_ne_zero.2 e0)\n[GOAL]\ncase succ.refine'_2.e_a\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nαd : ω ∣ α'\n⊢ ω0 ^ succ ↑k * α' = (ω0 ^ ↑k * α' + R) * α'\n[PROOFSTEP]\nrw [mul_add (ω0 ^ k), add_assoc, ← mul_assoc, ← opow_succ, add_mul_limit _ (isLimit_iff_omega_dvd.2 ⟨ne_of_gt α0, αd⟩),\n  mul_assoc, @mul_omega_dvd n (nat_cast_pos.2 n.pos) (nat_lt_omega _) _ αd]\n[GOAL]\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nαd : ω ∣ α'\n⊢ ω0 ^ ↑k * repr a' + R + ω0 ^ succ ↑k * ↑↑n = ω0 ^ succ ↑k * ↑↑n\n[PROOFSTEP]\napply @add_absorp _ (repr a0 * succ ↑k)\n[GOAL]\ncase h₁\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nαd : ω ∣ α'\n⊢ ω0 ^ ↑k * repr a' + R < ω ^ (repr a0 * succ ↑k)\n[PROOFSTEP]\nrefine' principal_add_omega_opow _ _ Rl\n[GOAL]\ncase h₁\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nαd : ω ∣ α'\n⊢ ω0 ^ ↑k * repr a' < ω ^ (repr a0 * succ ↑k)\n[PROOFSTEP]\nrw [opow_mul, opow_succ, Ordinal.mul_lt_mul_iff_left ω00]\n[GOAL]\ncase h₁\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nαd : ω ∣ α'\n⊢ repr a' < ω ^ repr a0\n[PROOFSTEP]\nexact No.snd'.repr_lt\n[GOAL]\ncase h₂\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nαd : ω ∣ α'\n⊢ ω ^ (repr a0 * succ ↑k) ≤ ω0 ^ succ ↑k * ↑↑n\n[PROOFSTEP]\nhave := mul_le_mul_left' (one_le_iff_pos.2 <| nat_cast_pos.2 n.pos) (ω0 ^ succ k)\n[GOAL]\ncase h₂\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nαd : ω ∣ α'\nthis : ω0 ^ ↑(succ k) * 1 ≤ ω0 ^ ↑(succ k) * ↑↑n\n⊢ ω ^ (repr a0 * succ ↑k) ≤ ω0 ^ succ ↑k * ↑↑n\n[PROOFSTEP]\nrw [opow_mul]\n[GOAL]\ncase h₂\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\nαd : ω ∣ α'\nthis : ω0 ^ ↑(succ k) * 1 ≤ ω0 ^ ↑(succ k) * ↑↑n\n⊢ (ω ^ repr a0) ^ succ ↑k ≤ ω0 ^ succ ↑k * ↑↑n\n[PROOFSTEP]\nsimpa [-opow_succ]\n[GOAL]\ncase succ.refine'_2.e_a\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nm : ℕ\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nh : repr a' + ↑m < ω ^ repr a0\nn : ℕ+\nk✝ : ℕ\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k✝ m)\nNo : NF (oadd a0 n a')\nk : ℕ\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) (Nat.succ k) m)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑m) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑m) + R\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ ω0 ^ ↑k * α' * ↑m + R = (ω0 ^ ↑k * α' + R) * ↑m\n[PROOFSTEP]\ncases m\n[GOAL]\ncase succ.refine'_2.e_a.zero\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk✝ : ℕ\nNo : NF (oadd a0 n a')\nk : ℕ\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nh : repr a' + ↑Nat.zero < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) k✝ Nat.zero)\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) (Nat.succ k) Nat.zero)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) k Nat.zero)\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑Nat.zero) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑Nat.zero) + R\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ ω0 ^ ↑k * α' * ↑Nat.zero + R = (ω0 ^ ↑k * α' + R) * ↑Nat.zero\n[PROOFSTEP]\nhave : R = 0 := by cases k <;> simp [opowAux]\n[GOAL]\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk✝ : ℕ\nNo : NF (oadd a0 n a')\nk : ℕ\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nh : repr a' + ↑Nat.zero < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) k✝ Nat.zero)\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) (Nat.succ k) Nat.zero)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) k Nat.zero)\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑Nat.zero) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑Nat.zero) + R\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ R = 0\n[PROOFSTEP]\ncases k\n[GOAL]\ncase zero\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk : ℕ\nNo : NF (oadd a0 n a')\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nh : repr a' + ↑Nat.zero < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) k Nat.zero)\nω00 : 0 < ω0 ^ ↑Nat.zero\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) (Nat.succ Nat.zero) Nat.zero)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) Nat.zero Nat.zero)\nIH : (Nat.zero ≠ 0 → R < ω0 ^ succ ↑Nat.zero) ∧ ω0 ^ ↑Nat.zero * α' + R = (α' + ↑Nat.zero) ^ succ ↑Nat.zero\nRR : R' = ω0 ^ ↑Nat.zero * (α' * ↑Nat.zero) + R\nRl : R < ω ^ (repr a0 * succ ↑Nat.zero)\n⊢ R = 0\n[PROOFSTEP]\nsimp [opowAux]\n[GOAL]\ncase succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk : ℕ\nNo : NF (oadd a0 n a')\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nh : repr a' + ↑Nat.zero < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) k Nat.zero)\nn✝ : ℕ\nω00 : 0 < ω0 ^ ↑(Nat.succ n✝)\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) (Nat.succ (Nat.succ n✝)) Nat.zero)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) (Nat.succ n✝) Nat.zero)\nIH :\n  (Nat.succ n✝ ≠ 0 → R < ω0 ^ succ ↑(Nat.succ n✝)) ∧\n    ω0 ^ ↑(Nat.succ n✝) * α' + R = (α' + ↑Nat.zero) ^ succ ↑(Nat.succ n✝)\nRR : R' = ω0 ^ ↑(Nat.succ n✝) * (α' * ↑Nat.zero) + R\nRl : R < ω ^ (repr a0 * succ ↑(Nat.succ n✝))\n⊢ R = 0\n[PROOFSTEP]\nsimp [opowAux]\n[GOAL]\ncase succ.refine'_2.e_a.zero\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk✝ : ℕ\nNo : NF (oadd a0 n a')\nk : ℕ\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nh : repr a' + ↑Nat.zero < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) k✝ Nat.zero)\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) (Nat.succ k) Nat.zero)\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑Nat.zero) k Nat.zero)\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑Nat.zero) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑Nat.zero) + R\nRl : R < ω ^ (repr a0 * succ ↑k)\nthis : R = 0\n⊢ ω0 ^ ↑k * α' * ↑Nat.zero + R = (ω0 ^ ↑k * α' + R) * ↑Nat.zero\n[PROOFSTEP]\nsimp [this]\n[GOAL]\ncase succ.refine'_2.e_a.succ\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk✝ : ℕ\nNo : NF (oadd a0 n a')\nk : ℕ\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nn✝ : ℕ\nh : repr a' + ↑(Nat.succ n✝) < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) k✝ (Nat.succ n✝))\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) (Nat.succ k) (Nat.succ n✝))\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) k (Nat.succ n✝))\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑(Nat.succ n✝)) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑(Nat.succ n✝)) + R\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ ω0 ^ ↑k * α' * ↑(Nat.succ n✝) + R = (ω0 ^ ↑k * α' + R) * ↑(Nat.succ n✝)\n[PROOFSTEP]\nrw [nat_cast_succ, add_mul_succ]\n[GOAL]\ncase succ.refine'_2.e_a.succ.ba\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk✝ : ℕ\nNo : NF (oadd a0 n a')\nk : ℕ\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nn✝ : ℕ\nh : repr a' + ↑(Nat.succ n✝) < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) k✝ (Nat.succ n✝))\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) (Nat.succ k) (Nat.succ n✝))\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) k (Nat.succ n✝))\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑(Nat.succ n✝)) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑(Nat.succ n✝)) + R\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ R + ω0 ^ ↑k * α' = ω0 ^ ↑k * α'\n[PROOFSTEP]\napply add_absorp Rl\n[GOAL]\ncase succ.refine'_2.e_a.succ.ba\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk✝ : ℕ\nNo : NF (oadd a0 n a')\nk : ℕ\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nn✝ : ℕ\nh : repr a' + ↑(Nat.succ n✝) < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) k✝ (Nat.succ n✝))\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) (Nat.succ k) (Nat.succ n✝))\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) k (Nat.succ n✝))\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑(Nat.succ n✝)) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑(Nat.succ n✝)) + R\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ ω ^ (repr a0 * succ ↑k) ≤ ω0 ^ ↑k * α'\n[PROOFSTEP]\nrw [opow_mul, opow_succ]\n[GOAL]\ncase succ.refine'_2.e_a.succ.ba\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk✝ : ℕ\nNo : NF (oadd a0 n a')\nk : ℕ\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nn✝ : ℕ\nh : repr a' + ↑(Nat.succ n✝) < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) k✝ (Nat.succ n✝))\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) (Nat.succ k) (Nat.succ n✝))\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) k (Nat.succ n✝))\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑(Nat.succ n✝)) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑(Nat.succ n✝)) + R\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ (ω ^ repr a0) ^ ↑k * ω ^ repr a0 ≤ ω0 ^ ↑k * α'\n[PROOFSTEP]\napply mul_le_mul_left'\n[GOAL]\ncase succ.refine'_2.e_a.succ.ba.bc\na0 a' : ONote\nN0 : NF a0\nNa' : NF a'\nd : ω ∣ repr a'\ne0 : repr a0 ≠ 0\nn : ℕ+\nk✝ : ℕ\nNo : NF (oadd a0 n a')\nk : ℕ\nω0 : Ordinal.{0} := ω ^ repr a0\nα' : Ordinal.{0} := ω0 * ↑↑n + repr a'\nα0 : 0 < α'\nω00 : 0 < ω0 ^ ↑k\nn✝ : ℕ\nh : repr a' + ↑(Nat.succ n✝) < ω ^ repr a0\nR'✝ : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) k✝ (Nat.succ n✝))\nR' : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) (Nat.succ k) (Nat.succ n✝))\nR : Ordinal.{0} := repr (opowAux 0 a0 (oadd a0 n a' * ↑(Nat.succ n✝)) k (Nat.succ n✝))\nIH : (k ≠ 0 → R < ω0 ^ succ ↑k) ∧ ω0 ^ ↑k * α' + R = (α' + ↑(Nat.succ n✝)) ^ succ ↑k\nRR : R' = ω0 ^ ↑k * (α' * ↑(Nat.succ n✝)) + R\nRl : R < ω ^ (repr a0 * succ ↑k)\n⊢ ω ^ repr a0 ≤ α'\n[PROOFSTEP]\nsimpa [repr] using omega_le_oadd a0 n a'\n[GOAL]\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\ncases' e₁ : split o₁ with a m\n[GOAL]\ncase mk\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\na : ONote\nm : ℕ\ne₁ : split o₁ = (a, m)\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\ncases' nf_repr_split e₁ with N₁ r₁\n[GOAL]\ncase mk.intro\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\na : ONote\nm : ℕ\ne₁ : split o₁ = (a, m)\nN₁ : NF a\nr₁ : repr o₁ = repr a + ↑m\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\ncases' a with a0 n a'\n[GOAL]\ncase mk.intro.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\ne₁ : split o₁ = (zero, m)\nN₁ : NF zero\nr₁ : repr o₁ = repr zero + ↑m\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\ncases' m with m\n[GOAL]\ncase mk.intro.zero.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\ne₁ : split o₁ = (zero, Nat.zero)\nr₁ : repr o₁ = repr zero + ↑Nat.zero\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nby_cases o₂ = 0\n[GOAL]\ncase mk.intro.zero.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\ne₁ : split o₁ = (zero, Nat.zero)\nr₁ : repr o₁ = repr zero + ↑Nat.zero\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nby_cases o₂ = 0\n[GOAL]\ncase pos\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\ne₁ : split o₁ = (zero, Nat.zero)\nr₁ : repr o₁ = repr zero + ↑Nat.zero\nh : o₂ = 0\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nsimp [opow_def, opowAux2, opow, e₁, h, r₁]\n[GOAL]\ncase neg\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\ne₁ : split o₁ = (zero, Nat.zero)\nr₁ : repr o₁ = repr zero + ↑Nat.zero\nh : ¬o₂ = 0\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nsimp [opow_def, opowAux2, opow, e₁, h, r₁]\n[GOAL]\ncase neg\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\ne₁ : split o₁ = (zero, Nat.zero)\nr₁ : repr o₁ = repr zero + ↑Nat.zero\nh : ¬o₂ = 0\n⊢ 0 = 0 ^ repr o₂\n[PROOFSTEP]\nhave := mt repr_inj.1 h\n[GOAL]\ncase neg\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\ne₁ : split o₁ = (zero, Nat.zero)\nr₁ : repr o₁ = repr zero + ↑Nat.zero\nh : ¬o₂ = 0\nthis : ¬repr o₂ = repr 0\n⊢ 0 = 0 ^ repr o₂\n[PROOFSTEP]\nrw [zero_opow this]\n[GOAL]\ncase mk.intro.zero.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\ncases' e₂ : split' o₂ with b' k\n[GOAL]\ncase mk.intro.zero.succ.mk\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\ncases' nf_repr_split' e₂ with _ r₂\n[GOAL]\ncase mk.intro.zero.succ.mk.intro\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nby_cases m = 0\n[GOAL]\ncase mk.intro.zero.succ.mk.intro\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nby_cases m = 0\n[GOAL]\ncase pos\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : m = 0\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nsimp [opow_def, opow, e₁, h, r₁, e₂, r₂, -Nat.cast_succ, ← Nat.one_eq_succ_zero]\n[GOAL]\ncase neg\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nsimp only [opow_def, opowAux2, opow, e₁, h, r₁, e₂, r₂, repr, opow_zero, Nat.succPNat_coe, Nat.cast_succ, Nat.cast_zero,\n  _root_.zero_add, mul_one, add_zero, one_opow, npow_eq_pow]\n[GOAL]\ncase neg\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n⊢ ω ^ repr b' * ↑↑(Nat.succPNat m ^ k) = (↑m + 1) ^ (ω * repr b' + ↑k)\n[PROOFSTEP]\nrw [opow_add, opow_mul, opow_omega, add_one_eq_succ]\n[GOAL]\ncase neg\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n⊢ ω ^ repr b' * ↑↑(Nat.succPNat m ^ k) = ω ^ repr b' * succ ↑m ^ ↑k\ncase neg.a1\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n⊢ 1 < ↑m + 1\ncase neg.h\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n⊢ ↑m + 1 < ω\n[PROOFSTEP]\ncongr\n[GOAL]\ncase neg.e_a\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n⊢ ↑↑(Nat.succPNat m ^ k) = succ ↑m ^ ↑k\ncase neg.a1\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n⊢ 1 < ↑m + 1\ncase neg.h\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n⊢ ↑m + 1 < ω\n[PROOFSTEP]\nconv_lhs =>\n  simp [HPow.hPow]\n  simp [Pow.pow, opow, Ordinal.succ_ne_zero]\n[GOAL]\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n| ↑↑(Nat.succPNat m ^ k)\n[PROOFSTEP]\n  simp [HPow.hPow]\n  simp [Pow.pow, opow, Ordinal.succ_ne_zero]\n[GOAL]\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n| ↑↑(Nat.succPNat m ^ k)\n[PROOFSTEP]\n  simp [HPow.hPow]\n  simp [Pow.pow, opow, Ordinal.succ_ne_zero]\n[GOAL]\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n| ↑↑(Nat.succPNat m ^ k)\n[PROOFSTEP]\nsimp [HPow.hPow]\n[GOAL]\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n| ↑↑(Pow.pow (Nat.succPNat m) k)\n[PROOFSTEP]\nsimp [Pow.pow, opow, Ordinal.succ_ne_zero]\n[GOAL]\ncase neg.a1\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n⊢ 1 < ↑m + 1\n[PROOFSTEP]\nsimpa using nat_cast_lt.2 (Nat.succ_lt_succ <| pos_iff_ne_zero.2 h)\n[GOAL]\ncase neg.h\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n⊢ ↑m + 1 < ω\n[PROOFSTEP]\nrw [← Nat.cast_succ, lt_omega]\n[GOAL]\ncase neg.h\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nN₁ : NF zero\nm : ℕ\ne₁ : split o₁ = (zero, Nat.succ m)\nr₁ : repr o₁ = repr zero + ↑(Nat.succ m)\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\nh : ¬m = 0\n⊢ ∃ n, ↑(Nat.succ m) = ↑n\n[PROOFSTEP]\nexact ⟨_, rfl⟩\n[GOAL]\ncase mk.intro.oadd\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nhaveI := N₁.fst\n[GOAL]\ncase mk.intro.oadd\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis : NF a0\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nhaveI := N₁.snd\n[GOAL]\ncase mk.intro.oadd\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\ncases' N₁.of_dvd_omega (split_dvd e₁) with a00 ad\n[GOAL]\ncase mk.intro.oadd.intro\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nhave al := split_add_lt e₁\n[GOAL]\ncase mk.intro.oadd.intro\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nhave aa : repr (a' + ofNat m) = repr a' + m := by simp only [eq_self_iff_true, ONote.repr_ofNat, ONote.repr_add]\n[GOAL]\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\n⊢ repr (a' + ↑m) = repr a' + ↑m\n[PROOFSTEP]\nsimp only [eq_self_iff_true, ONote.repr_ofNat, ONote.repr_add]\n[GOAL]\ncase mk.intro.oadd.intro\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\ncases' e₂ : split' o₂ with b' k\n[GOAL]\ncase mk.intro.oadd.intro.mk\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\ncases' nf_repr_split' e₂ with _ r₂\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\n⊢ repr (o₁ ^ o₂) = repr o₁ ^ repr o₂\n[PROOFSTEP]\nsimp only [opow_def, opow, e₁, r₁, split_eq_scale_split' e₂, opowAux2, repr]\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nk : ℕ\ne₂ : split' o₂ = (b', k)\nleft✝ : NF b'\nr₂ : repr o₂ = ω * repr b' + ↑k\n⊢ repr\n      (match (scale 1 b', k) with\n      | (b, 0) => oadd (a0 * b) 1 0\n      | (b, Nat.succ k) =>\n        scale (a0 * b + mulNat a0 k) (oadd a0 n a') + opowAux (a0 * b) a0 (mulNat (oadd a0 n a') m) k m) =\n    (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ repr o₂\n[PROOFSTEP]\ncases' k with k\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nleft✝ : NF b'\ne₂ : split' o₂ = (b', Nat.zero)\nr₂ : repr o₂ = ω * repr b' + ↑Nat.zero\n⊢ repr\n      (match (scale 1 b', Nat.zero) with\n      | (b, 0) => oadd (a0 * b) 1 0\n      | (b, Nat.succ k) =>\n        scale (a0 * b + mulNat a0 k) (oadd a0 n a') + opowAux (a0 * b) a0 (mulNat (oadd a0 n a') m) k m) =\n    (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ repr o₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nleft✝ : NF b'\nk : ℕ\ne₂ : split' o₂ = (b', Nat.succ k)\nr₂ : repr o₂ = ω * repr b' + ↑(Nat.succ k)\n⊢ repr\n      (match (scale 1 b', Nat.succ k) with\n      | (b, 0) => oadd (a0 * b) 1 0\n      | (b, Nat.succ k) =>\n        scale (a0 * b + mulNat a0 k) (oadd a0 n a') + opowAux (a0 * b) a0 (mulNat (oadd a0 n a') m) k m) =\n    (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ repr o₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro.zero\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nleft✝ : NF b'\ne₂ : split' o₂ = (b', Nat.zero)\nr₂ : repr o₂ = ω * repr b' + ↑Nat.zero\n⊢ repr\n      (match (scale 1 b', Nat.zero) with\n      | (b, 0) => oadd (a0 * b) 1 0\n      | (b, Nat.succ k) =>\n        scale (a0 * b + mulNat a0 k) (oadd a0 n a') + opowAux (a0 * b) a0 (mulNat (oadd a0 n a') m) k m) =\n    (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ repr o₂\n[PROOFSTEP]\nsimp [opow, r₂, opow_mul, repr_opow_aux₁ a00 al aa, add_assoc, split_eq_scale_split' e₂]\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nleft✝ : NF b'\nk : ℕ\ne₂ : split' o₂ = (b', Nat.succ k)\nr₂ : repr o₂ = ω * repr b' + ↑(Nat.succ k)\n⊢ repr\n      (match (scale 1 b', Nat.succ k) with\n      | (b, 0) => oadd (a0 * b) 1 0\n      | (b, Nat.succ k) =>\n        scale (a0 * b + mulNat a0 k) (oadd a0 n a') + opowAux (a0 * b) a0 (mulNat (oadd a0 n a') m) k m) =\n    (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ repr o₂\n[PROOFSTEP]\nsimp [opow, opowAux2, r₂, opow_add, opow_mul, mul_assoc, add_assoc, -repr]\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nleft✝ : NF b'\nk : ℕ\ne₂ : split' o₂ = (b', Nat.succ k)\nr₂ : repr o₂ = ω * repr b' + ↑(Nat.succ k)\n⊢ ((ω ^ repr a0) ^ ω ^ repr 1) ^ repr b' * ((ω ^ repr a0) ^ ↑k * repr (oadd a0 n a')) +\n      repr (opowAux (a0 * scale 1 b') a0 (oadd a0 n a' * ↑m) k m) =\n    ((ω ^ repr a0 * ↑↑n + (repr a' + ↑m)) ^ ω) ^ repr b' *\n      ((ω ^ repr a0 * ↑↑n + (repr a' + ↑m)) ^ ↑k * (ω ^ repr a0 * ↑↑n + (repr a' + ↑m)))\n[PROOFSTEP]\nsimp [repr]\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nleft✝ : NF b'\nk : ℕ\ne₂ : split' o₂ = (b', Nat.succ k)\nr₂ : repr o₂ = ω * repr b' + ↑(Nat.succ k)\n⊢ ((ω ^ repr a0) ^ ω) ^ repr b' * ((ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a')) +\n      repr (opowAux (a0 * scale 1 b') a0 (oadd a0 n a' * ↑m) k m) =\n    ((ω ^ repr a0 * ↑↑n + (repr a' + ↑m)) ^ ω) ^ repr b' *\n      ((ω ^ repr a0 * ↑↑n + (repr a' + ↑m)) ^ ↑k * (ω ^ repr a0 * ↑↑n + (repr a' + ↑m)))\n[PROOFSTEP]\nrw [repr_opow_aux₁ a00 al aa, scale_opowAux]\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nleft✝ : NF b'\nk : ℕ\ne₂ : split' o₂ = (b', Nat.succ k)\nr₂ : repr o₂ = ω * repr b' + ↑(Nat.succ k)\n⊢ ((ω ^ repr a0) ^ ω) ^ repr b' * ((ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a')) +\n      ω ^ repr (a0 * scale 1 b') * repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m) =\n    ((ω ^ repr a0) ^ ω) ^ repr b' * ((ω ^ repr a0 * ↑↑n + (repr a' + ↑m)) ^ ↑k * (ω ^ repr a0 * ↑↑n + (repr a' + ↑m)))\n[PROOFSTEP]\nsimp [opow_mul]\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nleft✝ : NF b'\nk : ℕ\ne₂ : split' o₂ = (b', Nat.succ k)\nr₂ : repr o₂ = ω * repr b' + ↑(Nat.succ k)\n⊢ ((ω ^ repr a0) ^ ω) ^ repr b' * ((ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a')) +\n      ((ω ^ repr a0) ^ ω) ^ repr b' * repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m) =\n    ((ω ^ repr a0) ^ ω) ^ repr b' * ((ω ^ repr a0 * ↑↑n + (repr a' + ↑m)) ^ ↑k * (ω ^ repr a0 * ↑↑n + (repr a' + ↑m)))\n[PROOFSTEP]\nrw [← mul_add, ← add_assoc ((ω : Ordinal.{0}) ^ repr a0 * (n : ℕ))]\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro.succ\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nleft✝ : NF b'\nk : ℕ\ne₂ : split' o₂ = (b', Nat.succ k)\nr₂ : repr o₂ = ω * repr b' + ↑(Nat.succ k)\n⊢ ((ω ^ repr a0) ^ ω) ^ repr b' *\n      ((ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a') + repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m)) =\n    ((ω ^ repr a0) ^ ω) ^ repr b' * ((ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a' + ↑m))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro.succ.e_a\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nleft✝ : NF b'\nk : ℕ\ne₂ : split' o₂ = (b', Nat.succ k)\nr₂ : repr o₂ = ω * repr b' + ↑(Nat.succ k)\n⊢ (ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a') + repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m) =\n    (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a' + ↑m)\n[PROOFSTEP]\nrw [← opow_succ]\n[GOAL]\ncase mk.intro.oadd.intro.mk.intro.succ.e_a\no₁ o₂ : ONote\ninst✝¹ : NF o₁\ninst✝ : NF o₂\nm : ℕ\na0 : ONote\nn : ℕ+\na' : ONote\ne₁ : split o₁ = (oadd a0 n a', m)\nN₁ : NF (oadd a0 n a')\nr₁ : repr o₁ = repr (oadd a0 n a') + ↑m\nthis✝ : NF a0\nthis : NF a'\na00 : repr a0 ≠ 0\nad : ω ∣ repr a'\nal : repr a' + ↑m < ω ^ repr a0\naa : repr (a' + ↑m) = repr a' + ↑m\nb' : ONote\nleft✝ : NF b'\nk : ℕ\ne₂ : split' o₂ = (b', Nat.succ k)\nr₂ : repr o₂ = ω * repr b' + ↑(Nat.succ k)\n⊢ (ω ^ repr a0) ^ ↑k * (ω ^ repr a0 * ↑↑n + repr a') + repr (opowAux 0 a0 (oadd a0 n a' * ↑m) k m) =\n    (ω ^ repr a0 * ↑↑n + repr a' + ↑m) ^ succ ↑k\n[PROOFSTEP]\nexact (repr_opow_aux₂ _ ad a00 al _ _).2\n[GOAL]\nα : Sort u_1\nhα : Nonempty α\no : Ordinal.{u_2}\nf : α → Ordinal.{u_2}\nH : ∀ ⦃a : Ordinal.{u_2}⦄, a < o → ∃ i, a < f i\nb a : Ordinal.{u_2}\nh : a < b + o\n⊢ ∃ i, a < b + f i\n[PROOFSTEP]\ncases' lt_or_le a b with h h'\n[GOAL]\ncase inl\nα : Sort u_1\nhα : Nonempty α\no : Ordinal.{u_2}\nf : α → Ordinal.{u_2}\nH : ∀ ⦃a : Ordinal.{u_2}⦄, a < o → ∃ i, a < f i\nb a : Ordinal.{u_2}\nh✝ : a < b + o\nh : a < b\n⊢ ∃ i, a < b + f i\n[PROOFSTEP]\nobtain ⟨i⟩ := id hα\n[GOAL]\ncase inl.intro\nα : Sort u_1\nhα : Nonempty α\no : Ordinal.{u_2}\nf : α → Ordinal.{u_2}\nH : ∀ ⦃a : Ordinal.{u_2}⦄, a < o → ∃ i, a < f i\nb a : Ordinal.{u_2}\nh✝ : a < b + o\nh : a < b\ni : α\n⊢ ∃ i, a < b + f i\n[PROOFSTEP]\nexact ⟨i, h.trans_le (le_add_right _ _)⟩\n[GOAL]\ncase inr\nα : Sort u_1\nhα : Nonempty α\no : Ordinal.{u_2}\nf : α → Ordinal.{u_2}\nH : ∀ ⦃a : Ordinal.{u_2}⦄, a < o → ∃ i, a < f i\nb a : Ordinal.{u_2}\nh : a < b + o\nh' : b ≤ a\n⊢ ∃ i, a < b + f i\n[PROOFSTEP]\nrw [← Ordinal.add_sub_cancel_of_le h', add_lt_add_iff_left] at h \n[GOAL]\ncase inr\nα : Sort u_1\nhα : Nonempty α\no : Ordinal.{u_2}\nf : α → Ordinal.{u_2}\nH : ∀ ⦃a : Ordinal.{u_2}⦄, a < o → ∃ i, a < f i\nb a : Ordinal.{u_2}\nh : a - b < o\nh' : b ≤ a\n⊢ ∃ i, a < b + f i\n[PROOFSTEP]\nrefine' (H h).imp fun i H => _\n[GOAL]\ncase inr\nα : Sort u_1\nhα : Nonempty α\no : Ordinal.{u_2}\nf : α → Ordinal.{u_2}\nH✝ : ∀ ⦃a : Ordinal.{u_2}⦄, a < o → ∃ i, a < f i\nb a : Ordinal.{u_2}\nh : a - b < o\nh' : b ≤ a\ni : α\nH : a - b < f i\n⊢ a < b + f i\n[PROOFSTEP]\nrwa [← Ordinal.add_sub_cancel_of_le h', add_lt_add_iff_left]\n[GOAL]\no a : Ordinal.{u_1}\nh : a < o * ω\n⊢ ∃ i, a < o * ↑i + o\n[PROOFSTEP]\nobtain ⟨i, hi, h'⟩ := (lt_mul_of_limit omega_isLimit).1 h\n[GOAL]\ncase intro.intro\no a : Ordinal.{u_1}\nh : a < o * ω\ni : Ordinal.{u_1}\nhi : i < ω\nh' : a < o * i\n⊢ ∃ i, a < o * ↑i + o\n[PROOFSTEP]\nobtain ⟨i, rfl⟩ := lt_omega.1 hi\n[GOAL]\ncase intro.intro.intro\no a : Ordinal.{u_1}\nh : a < o * ω\ni : ℕ\nhi : ↑i < ω\nh' : a < o * ↑i\n⊢ ∃ i, a < o * ↑i + o\n[PROOFSTEP]\nexact ⟨i, h'.trans_le (le_add_right _ _)⟩\n[GOAL]\nα : Sort u_1\no b : Ordinal.{u_2}\nhb : 1 < b\nho : IsLimit o\nf : α → Ordinal.{u_2}\nH : ∀ ⦃a : Ordinal.{u_2}⦄, a < o → ∃ i, a < f i\na : Ordinal.{u_2}\nh : a < b ^ o\n⊢ ∃ i, a < b ^ f i\n[PROOFSTEP]\nobtain ⟨d, hd, h'⟩ := (lt_opow_of_limit (zero_lt_one.trans hb).ne' ho).1 h\n[GOAL]\ncase intro.intro\nα : Sort u_1\no b : Ordinal.{u_2}\nhb : 1 < b\nho : IsLimit o\nf : α → Ordinal.{u_2}\nH : ∀ ⦃a : Ordinal.{u_2}⦄, a < o → ∃ i, a < f i\na : Ordinal.{u_2}\nh : a < b ^ o\nd : Ordinal.{u_2}\nhd : d < o\nh' : a < b ^ d\n⊢ ∃ i, a < b ^ f i\n[PROOFSTEP]\nexact (H hd).imp fun i hi => h'.trans <| (opow_lt_opow_iff_right hb).2 hi\n[GOAL]\no : ONote\n⊢ FundamentalSequenceProp o (fundamentalSequence o)\n[PROOFSTEP]\ninduction' o with a m b iha ihb\n[GOAL]\ncase zero\n⊢ FundamentalSequenceProp zero (fundamentalSequence zero)\n[PROOFSTEP]\nexact rfl\n[GOAL]\ncase oadd\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : FundamentalSequenceProp b (fundamentalSequence b)\n⊢ FundamentalSequenceProp (oadd a m b) (fundamentalSequence (oadd a m b))\n[PROOFSTEP]\nrw [fundamentalSequence]\n[GOAL]\ncase oadd\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : FundamentalSequenceProp b (fundamentalSequence b)\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match fundamentalSequence b with\n    | Sum.inr f => Sum.inr fun i => oadd a m (f i)\n    | Sum.inl (some b') => Sum.inl (some (oadd a m b'))\n    | Sum.inl none =>\n      match fundamentalSequence a, PNat.natPred m with\n      | Sum.inl none, 0 => Sum.inl (some zero)\n      | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n      | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n      | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n      | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n      | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\nrcases e : b.fundamentalSequence with (⟨_ | b'⟩ | f)\n[GOAL]\ncase oadd.inl.none\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : FundamentalSequenceProp b (fundamentalSequence b)\ne : fundamentalSequence b = Sum.inl none\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match Sum.inl none with\n    | Sum.inr f => Sum.inr fun i => oadd a m (f i)\n    | Sum.inl (some b') => Sum.inl (some (oadd a m b'))\n    | Sum.inl none =>\n      match fundamentalSequence a, PNat.natPred m with\n      | Sum.inl none, 0 => Sum.inl (some zero)\n      | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n      | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n      | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n      | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n      | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\nsimp only [FundamentalSequenceProp]\n[GOAL]\ncase oadd.inl.some\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : FundamentalSequenceProp b (fundamentalSequence b)\nb' : ONote\ne : fundamentalSequence b = Sum.inl (some b')\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match Sum.inl (some b') with\n    | Sum.inr f => Sum.inr fun i => oadd a m (f i)\n    | Sum.inl (some b') => Sum.inl (some (oadd a m b'))\n    | Sum.inl none =>\n      match fundamentalSequence a, PNat.natPred m with\n      | Sum.inl none, 0 => Sum.inl (some zero)\n      | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n      | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n      | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n      | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n      | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\nsimp only [FundamentalSequenceProp]\n[GOAL]\ncase oadd.inr\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : FundamentalSequenceProp b (fundamentalSequence b)\nf : ℕ → ONote\ne : fundamentalSequence b = Sum.inr f\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match Sum.inr f with\n    | Sum.inr f => Sum.inr fun i => oadd a m (f i)\n    | Sum.inl (some b') => Sum.inl (some (oadd a m b'))\n    | Sum.inl none =>\n      match fundamentalSequence a, PNat.natPred m with\n      | Sum.inl none, 0 => Sum.inl (some zero)\n      | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n      | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n      | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n      | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n      | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\nsimp only [FundamentalSequenceProp]\n[GOAL]\ncase oadd.inl.none\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : FundamentalSequenceProp b (fundamentalSequence b)\ne : fundamentalSequence b = Sum.inl none\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match fundamentalSequence a, PNat.natPred m with\n    | Sum.inl none, 0 => Sum.inl (some zero)\n    | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n    | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n    | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n    | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n    | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\nrw [e, FundamentalSequenceProp] at ihb \n[GOAL]\ncase oadd.inl.some\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : FundamentalSequenceProp b (fundamentalSequence b)\nb' : ONote\ne : fundamentalSequence b = Sum.inl (some b')\n⊢ repr (oadd a m b) = succ (repr (oadd a m b')) ∧ (NF (oadd a m b) → NF (oadd a m b'))\n[PROOFSTEP]\nrw [e, FundamentalSequenceProp] at ihb \n[GOAL]\ncase oadd.inr\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : FundamentalSequenceProp b (fundamentalSequence b)\nf : ℕ → ONote\ne : fundamentalSequence b = Sum.inr f\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a m (f i) < oadd a m (f (i + 1)) ∧ oadd a m (f i) < oadd a m b ∧ (NF (oadd a m b) → NF (oadd a m (f i)))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a m (f i))\n[PROOFSTEP]\nrw [e, FundamentalSequenceProp] at ihb \n[GOAL]\ncase oadd.inl.none\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne : fundamentalSequence b = Sum.inl none\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match fundamentalSequence a, PNat.natPred m with\n    | Sum.inl none, 0 => Sum.inl (some zero)\n    | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n    | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n    | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n    | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n    | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\nrcases e : a.fundamentalSequence with (⟨_ | a'⟩ | f)\n[GOAL]\ncase oadd.inl.none.inl.none\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match Sum.inl none, PNat.natPred m with\n    | Sum.inl none, 0 => Sum.inl (some zero)\n    | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n    | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n    | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n    | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n    | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\ncases' e' : m.natPred with m'\n[GOAL]\ncase oadd.inl.none.inl.some\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\ne : fundamentalSequence a = Sum.inl (some a')\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match Sum.inl (some a'), PNat.natPred m with\n    | Sum.inl none, 0 => Sum.inl (some zero)\n    | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n    | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n    | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n    | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n    | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\ncases' e' : m.natPred with m'\n[GOAL]\ncase oadd.inl.none.inr\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\ne : fundamentalSequence a = Sum.inr f\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match Sum.inr f, PNat.natPred m with\n    | Sum.inl none, 0 => Sum.inl (some zero)\n    | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n    | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n    | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n    | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n    | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\ncases' e' : m.natPred with m'\n[GOAL]\ncase oadd.inl.none.inl.none.zero\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\ne' : PNat.natPred m = Nat.zero\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match Sum.inl none, Nat.zero with\n    | Sum.inl none, 0 => Sum.inl (some zero)\n    | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n    | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n    | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n    | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n    | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\nsimp only [FundamentalSequenceProp]\n[GOAL]\ncase oadd.inl.none.inl.none.succ\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match Sum.inl none, Nat.succ m' with\n    | Sum.inl none, 0 => Sum.inl (some zero)\n    | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n    | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n    | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n    | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n    | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\nsimp only [FundamentalSequenceProp]\n[GOAL]\ncase oadd.inl.none.inl.some.zero\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match Sum.inl (some a'), Nat.zero with\n    | Sum.inl none, 0 => Sum.inl (some zero)\n    | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n    | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n    | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n    | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n    | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\nsimp only [FundamentalSequenceProp]\n[GOAL]\ncase oadd.inl.none.inl.some.succ\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match Sum.inl (some a'), Nat.succ m' with\n    | Sum.inl none, 0 => Sum.inl (some zero)\n    | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n    | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n    | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n    | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n    | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\nsimp only [FundamentalSequenceProp]\n[GOAL]\ncase oadd.inl.none.inr.zero\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match Sum.inr f, Nat.zero with\n    | Sum.inl none, 0 => Sum.inl (some zero)\n    | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n    | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n    | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n    | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n    | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\nsimp only [FundamentalSequenceProp]\n[GOAL]\ncase oadd.inl.none.inr.succ\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ FundamentalSequenceProp (oadd a m b)\n    (match Sum.inr f, Nat.succ m' with\n    | Sum.inl none, 0 => Sum.inl (some zero)\n    | Sum.inl none, Nat.succ m => Sum.inl (some (oadd zero (Nat.succPNat m) zero))\n    | Sum.inl (some a'), 0 => Sum.inr fun i => oadd a' (Nat.succPNat i) zero\n    | Sum.inl (some a'), Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd a' (Nat.succPNat i) zero)\n    | Sum.inr f, 0 => Sum.inr fun i => oadd (f i) 1 zero\n    | Sum.inr f, Nat.succ m => Sum.inr fun i => oadd a (Nat.succPNat m) (oadd (f i) 1 zero))\n[PROOFSTEP]\nsimp only [FundamentalSequenceProp]\n[GOAL]\ncase oadd.inl.none.inl.none.zero\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\ne' : PNat.natPred m = Nat.zero\n⊢ repr (oadd a m b) = succ (repr zero) ∧ (NF (oadd a m b) → True)\n[PROOFSTEP]\nrw [e, FundamentalSequenceProp] at iha \n[GOAL]\ncase oadd.inl.none.inl.none.succ\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ repr (oadd a m b) = succ (repr (oadd zero (Nat.succPNat m') zero)) ∧\n    (NF (oadd a m b) → NF (oadd zero (Nat.succPNat m') zero))\n[PROOFSTEP]\nrw [e, FundamentalSequenceProp] at iha \n[GOAL]\ncase oadd.inl.none.inl.some.zero\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a' (Nat.succPNat i) zero < oadd a' (Nat.succPNat (i + 1)) zero ∧\n          oadd a' (Nat.succPNat i) zero < oadd a m b ∧ (NF (oadd a m b) → NF (oadd a' (Nat.succPNat i) zero))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a' (Nat.succPNat i) zero)\n[PROOFSTEP]\nrw [e, FundamentalSequenceProp] at iha \n[GOAL]\ncase oadd.inl.none.inl.some.succ\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero) <\n            oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat (i + 1)) zero) ∧\n          oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero) < oadd a m b ∧\n            (NF (oadd a m b) → NF (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero)))) ∧\n      ∀ (a_1 : Ordinal.{0}),\n        a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero))\n[PROOFSTEP]\nrw [e, FundamentalSequenceProp] at iha \n[GOAL]\ncase oadd.inl.none.inr.zero\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd (f i) 1 zero < oadd (f (i + 1)) 1 zero ∧\n          oadd (f i) 1 zero < oadd a m b ∧ (NF (oadd a m b) → NF (oadd (f i) 1 zero))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd (f i) 1 zero)\n[PROOFSTEP]\nrw [e, FundamentalSequenceProp] at iha \n[GOAL]\ncase oadd.inl.none.inr.succ\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a (Nat.succPNat m') (oadd (f i) 1 zero) < oadd a (Nat.succPNat m') (oadd (f (i + 1)) 1 zero) ∧\n          oadd a (Nat.succPNat m') (oadd (f i) 1 zero) < oadd a m b ∧\n            (NF (oadd a m b) → NF (oadd a (Nat.succPNat m') (oadd (f i) 1 zero)))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a (Nat.succPNat m') (oadd (f i) 1 zero))\n[PROOFSTEP]\nrw [e, FundamentalSequenceProp] at iha \n[GOAL]\ncase oadd.inl.none.inl.none.zero\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\ne' : PNat.natPred m = Nat.zero\n⊢ repr (oadd a m b) = succ (repr zero) ∧ (NF (oadd a m b) → True)\n[PROOFSTEP]\ntry rw [show m = 1 by have := PNat.natPred_add_one m; rw [e'] at this ; exact PNat.coe_inj.1 this.symm]\n[GOAL]\ncase oadd.inl.none.inl.none.zero\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\ne' : PNat.natPred m = Nat.zero\n⊢ repr (oadd a m b) = succ (repr zero) ∧ (NF (oadd a m b) → True)\n[PROOFSTEP]\nrw [show m = 1 by have := PNat.natPred_add_one m; rw [e'] at this ; exact PNat.coe_inj.1 this.symm]\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\ne' : PNat.natPred m = Nat.zero\n⊢ m = 1\n[PROOFSTEP]\nhave := PNat.natPred_add_one m\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\ne' : PNat.natPred m = Nat.zero\nthis : PNat.natPred m + 1 = ↑m\n⊢ m = 1\n[PROOFSTEP]\nrw [e'] at this \n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\ne' : PNat.natPred m = Nat.zero\nthis : Nat.zero + 1 = ↑m\n⊢ m = 1\n[PROOFSTEP]\nexact PNat.coe_inj.1 this.symm\n[GOAL]\ncase oadd.inl.none.inl.none.succ\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ repr (oadd a m b) = succ (repr (oadd zero (Nat.succPNat m') zero)) ∧\n    (NF (oadd a m b) → NF (oadd zero (Nat.succPNat m') zero))\n[PROOFSTEP]\ntry rw [show m = 1 by have := PNat.natPred_add_one m; rw [e'] at this ; exact PNat.coe_inj.1 this.symm]\n[GOAL]\ncase oadd.inl.none.inl.none.succ\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ repr (oadd a m b) = succ (repr (oadd zero (Nat.succPNat m') zero)) ∧\n    (NF (oadd a m b) → NF (oadd zero (Nat.succPNat m') zero))\n[PROOFSTEP]\nrw [show m = 1 by have := PNat.natPred_add_one m; rw [e'] at this ; exact PNat.coe_inj.1 this.symm]\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ m = 1\n[PROOFSTEP]\nhave := PNat.natPred_add_one m\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nthis : PNat.natPred m + 1 = ↑m\n⊢ m = 1\n[PROOFSTEP]\nrw [e'] at this \n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nthis : Nat.succ m' + 1 = ↑m\n⊢ m = 1\n[PROOFSTEP]\nexact PNat.coe_inj.1 this.symm\n[GOAL]\ncase oadd.inl.none.inl.some.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a' (Nat.succPNat i) zero < oadd a' (Nat.succPNat (i + 1)) zero ∧\n          oadd a' (Nat.succPNat i) zero < oadd a m b ∧ (NF (oadd a m b) → NF (oadd a' (Nat.succPNat i) zero))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a' (Nat.succPNat i) zero)\n[PROOFSTEP]\ntry rw [show m = 1 by have := PNat.natPred_add_one m; rw [e'] at this ; exact PNat.coe_inj.1 this.symm]\n[GOAL]\ncase oadd.inl.none.inl.some.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a' (Nat.succPNat i) zero < oadd a' (Nat.succPNat (i + 1)) zero ∧\n          oadd a' (Nat.succPNat i) zero < oadd a m b ∧ (NF (oadd a m b) → NF (oadd a' (Nat.succPNat i) zero))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a' (Nat.succPNat i) zero)\n[PROOFSTEP]\nrw [show m = 1 by have := PNat.natPred_add_one m; rw [e'] at this ; exact PNat.coe_inj.1 this.symm]\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\n⊢ m = 1\n[PROOFSTEP]\nhave := PNat.natPred_add_one m\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\nthis : PNat.natPred m + 1 = ↑m\n⊢ m = 1\n[PROOFSTEP]\nrw [e'] at this \n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\nthis : Nat.zero + 1 = ↑m\n⊢ m = 1\n[PROOFSTEP]\nexact PNat.coe_inj.1 this.symm\n[GOAL]\ncase oadd.inl.none.inl.some.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero) <\n            oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat (i + 1)) zero) ∧\n          oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero) < oadd a m b ∧\n            (NF (oadd a m b) → NF (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero)))) ∧\n      ∀ (a_1 : Ordinal.{0}),\n        a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero))\n[PROOFSTEP]\ntry rw [show m = 1 by have := PNat.natPred_add_one m; rw [e'] at this ; exact PNat.coe_inj.1 this.symm]\n[GOAL]\ncase oadd.inl.none.inl.some.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero) <\n            oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat (i + 1)) zero) ∧\n          oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero) < oadd a m b ∧\n            (NF (oadd a m b) → NF (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero)))) ∧\n      ∀ (a_1 : Ordinal.{0}),\n        a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero))\n[PROOFSTEP]\nrw [show m = 1 by have := PNat.natPred_add_one m; rw [e'] at this ; exact PNat.coe_inj.1 this.symm]\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ m = 1\n[PROOFSTEP]\nhave := PNat.natPred_add_one m\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nthis : PNat.natPred m + 1 = ↑m\n⊢ m = 1\n[PROOFSTEP]\nrw [e'] at this \n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nthis : Nat.succ m' + 1 = ↑m\n⊢ m = 1\n[PROOFSTEP]\nexact PNat.coe_inj.1 this.symm\n[GOAL]\ncase oadd.inl.none.inr.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd (f i) 1 zero < oadd (f (i + 1)) 1 zero ∧\n          oadd (f i) 1 zero < oadd a m b ∧ (NF (oadd a m b) → NF (oadd (f i) 1 zero))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd (f i) 1 zero)\n[PROOFSTEP]\ntry rw [show m = 1 by have := PNat.natPred_add_one m; rw [e'] at this ; exact PNat.coe_inj.1 this.symm]\n[GOAL]\ncase oadd.inl.none.inr.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd (f i) 1 zero < oadd (f (i + 1)) 1 zero ∧\n          oadd (f i) 1 zero < oadd a m b ∧ (NF (oadd a m b) → NF (oadd (f i) 1 zero))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd (f i) 1 zero)\n[PROOFSTEP]\nrw [show m = 1 by have := PNat.natPred_add_one m; rw [e'] at this ; exact PNat.coe_inj.1 this.symm]\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\n⊢ m = 1\n[PROOFSTEP]\nhave := PNat.natPred_add_one m\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\nthis : PNat.natPred m + 1 = ↑m\n⊢ m = 1\n[PROOFSTEP]\nrw [e'] at this \n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\nthis : Nat.zero + 1 = ↑m\n⊢ m = 1\n[PROOFSTEP]\nexact PNat.coe_inj.1 this.symm\n[GOAL]\ncase oadd.inl.none.inr.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a (Nat.succPNat m') (oadd (f i) 1 zero) < oadd a (Nat.succPNat m') (oadd (f (i + 1)) 1 zero) ∧\n          oadd a (Nat.succPNat m') (oadd (f i) 1 zero) < oadd a m b ∧\n            (NF (oadd a m b) → NF (oadd a (Nat.succPNat m') (oadd (f i) 1 zero)))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a (Nat.succPNat m') (oadd (f i) 1 zero))\n[PROOFSTEP]\ntry rw [show m = 1 by have := PNat.natPred_add_one m; rw [e'] at this ; exact PNat.coe_inj.1 this.symm]\n[GOAL]\ncase oadd.inl.none.inr.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a (Nat.succPNat m') (oadd (f i) 1 zero) < oadd a (Nat.succPNat m') (oadd (f (i + 1)) 1 zero) ∧\n          oadd a (Nat.succPNat m') (oadd (f i) 1 zero) < oadd a m b ∧\n            (NF (oadd a m b) → NF (oadd a (Nat.succPNat m') (oadd (f i) 1 zero)))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a (Nat.succPNat m') (oadd (f i) 1 zero))\n[PROOFSTEP]\nrw [show m = 1 by have := PNat.natPred_add_one m; rw [e'] at this ; exact PNat.coe_inj.1 this.symm]\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ m = 1\n[PROOFSTEP]\nhave := PNat.natPred_add_one m\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nthis : PNat.natPred m + 1 = ↑m\n⊢ m = 1\n[PROOFSTEP]\nrw [e'] at this \n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nthis : Nat.succ m' + 1 = ↑m\n⊢ m = 1\n[PROOFSTEP]\nexact PNat.coe_inj.1 this.symm\n[GOAL]\ncase oadd.inl.none.inl.none.zero\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\ne' : PNat.natPred m = Nat.zero\n⊢ repr (oadd a 1 b) = succ (repr zero) ∧ (NF (oadd a 1 b) → True)\n[PROOFSTEP]\ntry rw [show m = m'.succ.succPNat by rw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]]\n[GOAL]\ncase oadd.inl.none.inl.none.zero\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\ne' : PNat.natPred m = Nat.zero\n⊢ repr (oadd a 1 b) = succ (repr zero) ∧ (NF (oadd a 1 b) → True)\n[PROOFSTEP]\nrw [show m = m'.succ.succPNat by rw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]]\n[GOAL]\ncase oadd.inl.none.inl.none.succ\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ repr (oadd a m b) = succ (repr (oadd zero (Nat.succPNat m') zero)) ∧\n    (NF (oadd a m b) → NF (oadd zero (Nat.succPNat m') zero))\n[PROOFSTEP]\ntry rw [show m = m'.succ.succPNat by rw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]]\n[GOAL]\ncase oadd.inl.none.inl.none.succ\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ repr (oadd a m b) = succ (repr (oadd zero (Nat.succPNat m') zero)) ∧\n    (NF (oadd a m b) → NF (oadd zero (Nat.succPNat m') zero))\n[PROOFSTEP]\nrw [show m = m'.succ.succPNat by rw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]]\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ m = Nat.succPNat (Nat.succ m')\n[PROOFSTEP]\nrw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]\n[GOAL]\ncase oadd.inl.none.inl.some.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (repr (oadd a 1 b)) ∧\n    (∀ (i : ℕ),\n        oadd a' (Nat.succPNat i) zero < oadd a' (Nat.succPNat (i + 1)) zero ∧\n          oadd a' (Nat.succPNat i) zero < oadd a 1 b ∧ (NF (oadd a 1 b) → NF (oadd a' (Nat.succPNat i) zero))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a 1 b) → ∃ i, a_1 < repr (oadd a' (Nat.succPNat i) zero)\n[PROOFSTEP]\ntry rw [show m = m'.succ.succPNat by rw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]]\n[GOAL]\ncase oadd.inl.none.inl.some.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (repr (oadd a 1 b)) ∧\n    (∀ (i : ℕ),\n        oadd a' (Nat.succPNat i) zero < oadd a' (Nat.succPNat (i + 1)) zero ∧\n          oadd a' (Nat.succPNat i) zero < oadd a 1 b ∧ (NF (oadd a 1 b) → NF (oadd a' (Nat.succPNat i) zero))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a 1 b) → ∃ i, a_1 < repr (oadd a' (Nat.succPNat i) zero)\n[PROOFSTEP]\nrw [show m = m'.succ.succPNat by rw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]]\n[GOAL]\ncase oadd.inl.none.inl.some.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero) <\n            oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat (i + 1)) zero) ∧\n          oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero) < oadd a m b ∧\n            (NF (oadd a m b) → NF (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero)))) ∧\n      ∀ (a_1 : Ordinal.{0}),\n        a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero))\n[PROOFSTEP]\ntry rw [show m = m'.succ.succPNat by rw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]]\n[GOAL]\ncase oadd.inl.none.inl.some.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero) <\n            oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat (i + 1)) zero) ∧\n          oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero) < oadd a m b ∧\n            (NF (oadd a m b) → NF (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero)))) ∧\n      ∀ (a_1 : Ordinal.{0}),\n        a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero))\n[PROOFSTEP]\nrw [show m = m'.succ.succPNat by rw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]]\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ m = Nat.succPNat (Nat.succ m')\n[PROOFSTEP]\nrw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]\n[GOAL]\ncase oadd.inl.none.inr.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (repr (oadd a 1 b)) ∧\n    (∀ (i : ℕ),\n        oadd (f i) 1 zero < oadd (f (i + 1)) 1 zero ∧\n          oadd (f i) 1 zero < oadd a 1 b ∧ (NF (oadd a 1 b) → NF (oadd (f i) 1 zero))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a 1 b) → ∃ i, a_1 < repr (oadd (f i) 1 zero)\n[PROOFSTEP]\ntry rw [show m = m'.succ.succPNat by rw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]]\n[GOAL]\ncase oadd.inl.none.inr.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (repr (oadd a 1 b)) ∧\n    (∀ (i : ℕ),\n        oadd (f i) 1 zero < oadd (f (i + 1)) 1 zero ∧\n          oadd (f i) 1 zero < oadd a 1 b ∧ (NF (oadd a 1 b) → NF (oadd (f i) 1 zero))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a 1 b) → ∃ i, a_1 < repr (oadd (f i) 1 zero)\n[PROOFSTEP]\nrw [show m = m'.succ.succPNat by rw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]]\n[GOAL]\ncase oadd.inl.none.inr.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a (Nat.succPNat m') (oadd (f i) 1 zero) < oadd a (Nat.succPNat m') (oadd (f (i + 1)) 1 zero) ∧\n          oadd a (Nat.succPNat m') (oadd (f i) 1 zero) < oadd a m b ∧\n            (NF (oadd a m b) → NF (oadd a (Nat.succPNat m') (oadd (f i) 1 zero)))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a (Nat.succPNat m') (oadd (f i) 1 zero))\n[PROOFSTEP]\ntry rw [show m = m'.succ.succPNat by rw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]]\n[GOAL]\ncase oadd.inl.none.inr.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a (Nat.succPNat m') (oadd (f i) 1 zero) < oadd a (Nat.succPNat m') (oadd (f (i + 1)) 1 zero) ∧\n          oadd a (Nat.succPNat m') (oadd (f i) 1 zero) < oadd a m b ∧\n            (NF (oadd a m b) → NF (oadd a (Nat.succPNat m') (oadd (f i) 1 zero)))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a (Nat.succPNat m') (oadd (f i) 1 zero))\n[PROOFSTEP]\nrw [show m = m'.succ.succPNat by rw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]]\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ m = Nat.succPNat (Nat.succ m')\n[PROOFSTEP]\nrw [← e', ← PNat.coe_inj, Nat.succPNat_coe, ← Nat.add_one, PNat.natPred_add_one]\n[GOAL]\ncase oadd.inl.none.inl.none.zero\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\ne' : PNat.natPred m = Nat.zero\n⊢ repr (oadd a 1 b) = succ (repr zero) ∧ (NF (oadd a 1 b) → True)\n[PROOFSTEP]\nsimp only [repr, iha, ihb, opow_lt_opow_iff_right one_lt_omega, add_lt_add_iff_left, add_zero, eq_self_iff_true,\n  lt_add_iff_pos_right, lt_def, mul_one, Nat.cast_zero, Nat.cast_succ, Nat.succPNat_coe, opow_succ, opow_zero,\n  mul_add_one, PNat.one_coe, succ_zero, true_and_iff, _root_.zero_add, zero_def]\n[GOAL]\ncase oadd.inl.none.inl.none.succ\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ repr (oadd a (Nat.succPNat (Nat.succ m')) b) = succ (repr (oadd zero (Nat.succPNat m') zero)) ∧\n    (NF (oadd a (Nat.succPNat (Nat.succ m')) b) → NF (oadd zero (Nat.succPNat m') zero))\n[PROOFSTEP]\nsimp only [repr, iha, ihb, opow_lt_opow_iff_right one_lt_omega, add_lt_add_iff_left, add_zero, eq_self_iff_true,\n  lt_add_iff_pos_right, lt_def, mul_one, Nat.cast_zero, Nat.cast_succ, Nat.succPNat_coe, opow_succ, opow_zero,\n  mul_add_one, PNat.one_coe, succ_zero, true_and_iff, _root_.zero_add, zero_def]\n[GOAL]\ncase oadd.inl.none.inl.some.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (repr (oadd a 1 b)) ∧\n    (∀ (i : ℕ),\n        oadd a' (Nat.succPNat i) zero < oadd a' (Nat.succPNat (i + 1)) zero ∧\n          oadd a' (Nat.succPNat i) zero < oadd a 1 b ∧ (NF (oadd a 1 b) → NF (oadd a' (Nat.succPNat i) zero))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a 1 b) → ∃ i, a_1 < repr (oadd a' (Nat.succPNat i) zero)\n[PROOFSTEP]\nsimp only [repr, iha, ihb, opow_lt_opow_iff_right one_lt_omega, add_lt_add_iff_left, add_zero, eq_self_iff_true,\n  lt_add_iff_pos_right, lt_def, mul_one, Nat.cast_zero, Nat.cast_succ, Nat.succPNat_coe, opow_succ, opow_zero,\n  mul_add_one, PNat.one_coe, succ_zero, true_and_iff, _root_.zero_add, zero_def]\n[GOAL]\ncase oadd.inl.none.inl.some.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (repr (oadd a (Nat.succPNat (Nat.succ m')) b)) ∧\n    (∀ (i : ℕ),\n        oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero) <\n            oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat (i + 1)) zero) ∧\n          oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero) < oadd a (Nat.succPNat (Nat.succ m')) b ∧\n            (NF (oadd a (Nat.succPNat (Nat.succ m')) b) →\n              NF (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero)))) ∧\n      ∀ (a_1 : Ordinal.{0}),\n        a_1 < repr (oadd a (Nat.succPNat (Nat.succ m')) b) →\n          ∃ i, a_1 < repr (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) zero))\n[PROOFSTEP]\nsimp only [repr, iha, ihb, opow_lt_opow_iff_right one_lt_omega, add_lt_add_iff_left, add_zero, eq_self_iff_true,\n  lt_add_iff_pos_right, lt_def, mul_one, Nat.cast_zero, Nat.cast_succ, Nat.succPNat_coe, opow_succ, opow_zero,\n  mul_add_one, PNat.one_coe, succ_zero, true_and_iff, _root_.zero_add, zero_def]\n[GOAL]\ncase oadd.inl.none.inr.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (repr (oadd a 1 b)) ∧\n    (∀ (i : ℕ),\n        oadd (f i) 1 zero < oadd (f (i + 1)) 1 zero ∧\n          oadd (f i) 1 zero < oadd a 1 b ∧ (NF (oadd a 1 b) → NF (oadd (f i) 1 zero))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a 1 b) → ∃ i, a_1 < repr (oadd (f i) 1 zero)\n[PROOFSTEP]\nsimp only [repr, iha, ihb, opow_lt_opow_iff_right one_lt_omega, add_lt_add_iff_left, add_zero, eq_self_iff_true,\n  lt_add_iff_pos_right, lt_def, mul_one, Nat.cast_zero, Nat.cast_succ, Nat.succPNat_coe, opow_succ, opow_zero,\n  mul_add_one, PNat.one_coe, succ_zero, true_and_iff, _root_.zero_add, zero_def]\n[GOAL]\ncase oadd.inl.none.inr.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (repr (oadd a (Nat.succPNat (Nat.succ m')) b)) ∧\n    (∀ (i : ℕ),\n        oadd a (Nat.succPNat m') (oadd (f i) 1 zero) < oadd a (Nat.succPNat m') (oadd (f (i + 1)) 1 zero) ∧\n          oadd a (Nat.succPNat m') (oadd (f i) 1 zero) < oadd a (Nat.succPNat (Nat.succ m')) b ∧\n            (NF (oadd a (Nat.succPNat (Nat.succ m')) b) → NF (oadd a (Nat.succPNat m') (oadd (f i) 1 zero)))) ∧\n      ∀ (a_1 : Ordinal.{0}),\n        a_1 < repr (oadd a (Nat.succPNat (Nat.succ m')) b) →\n          ∃ i, a_1 < repr (oadd a (Nat.succPNat m') (oadd (f i) 1 zero))\n[PROOFSTEP]\nsimp only [repr, iha, ihb, opow_lt_opow_iff_right one_lt_omega, add_lt_add_iff_left, add_zero, eq_self_iff_true,\n  lt_add_iff_pos_right, lt_def, mul_one, Nat.cast_zero, Nat.cast_succ, Nat.succPNat_coe, opow_succ, opow_zero,\n  mul_add_one, PNat.one_coe, succ_zero, true_and_iff, _root_.zero_add, zero_def]\n[GOAL]\ncase oadd.inl.none.inl.none.succ\na : ONote\nm : ℕ+\nb : ONote\niha : a = 0\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\ne : fundamentalSequence a = Sum.inl none\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ 1 * ↑m' + 1 + 1 = succ (1 * ↑m' + 1) ∧ (NF (oadd 0 (Nat.succPNat (Nat.succ m')) 0) → NF (oadd 0 (Nat.succPNat m') 0))\n[PROOFSTEP]\nexact ⟨rfl, inferInstance⟩\n[GOAL]\ncase oadd.inl.none.inl.some.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (ω ^ repr a' * ω) ∧\n    (∀ (i : ℕ),\n        0 < ω ^ repr a' ∧\n          ω ^ repr a' * ↑i + ω ^ repr a' < ω ^ repr a' * ω ∧ (NF (oadd a 1 0) → NF (oadd a' (Nat.succPNat i) 0))) ∧\n      ∀ (a : Ordinal.{0}), a < ω ^ repr a' * ω → ∃ i, a < ω ^ repr a' * ↑i + ω ^ repr a'\n[PROOFSTEP]\nhave := opow_pos (repr a') omega_pos\n[GOAL]\ncase oadd.inl.none.inl.some.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\nthis : 0 < ω ^ repr a'\n⊢ IsLimit (ω ^ repr a' * ω) ∧\n    (∀ (i : ℕ),\n        0 < ω ^ repr a' ∧\n          ω ^ repr a' * ↑i + ω ^ repr a' < ω ^ repr a' * ω ∧ (NF (oadd a 1 0) → NF (oadd a' (Nat.succPNat i) 0))) ∧\n      ∀ (a : Ordinal.{0}), a < ω ^ repr a' * ω → ∃ i, a < ω ^ repr a' * ↑i + ω ^ repr a'\n[PROOFSTEP]\nrefine'\n  ⟨mul_isLimit this omega_isLimit, fun i => ⟨this, _, fun H => @NF.oadd_zero _ _ (iha.2 H.fst)⟩, exists_lt_mul_omega'⟩\n[GOAL]\ncase oadd.inl.none.inl.some.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\nthis : 0 < ω ^ repr a'\ni : ℕ\n⊢ ω ^ repr a' * ↑i + ω ^ repr a' < ω ^ repr a' * ω\n[PROOFSTEP]\nrw [← mul_succ, ← nat_cast_succ, Ordinal.mul_lt_mul_iff_left this]\n[GOAL]\ncase oadd.inl.none.inl.some.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\ne' : PNat.natPred m = Nat.zero\nthis : 0 < ω ^ repr a'\ni : ℕ\n⊢ ↑(Nat.succ i) < ω\n[PROOFSTEP]\napply nat_lt_omega\n[GOAL]\ncase oadd.inl.none.inl.some.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (ω ^ repr a' * ω * ↑m' + ω ^ repr a' * ω + ω ^ repr a' * ω) ∧\n    (∀ (i : ℕ),\n        0 < ω ^ repr a' ∧\n          ω ^ repr a' * ↑i + ω ^ repr a' < ω ^ repr a' * ω ∧\n            (NF (oadd a (Nat.succPNat (Nat.succ m')) 0) → NF (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) 0)))) ∧\n      ∀ (a : Ordinal.{0}),\n        a < ω ^ repr a' * ω * ↑m' + ω ^ repr a' * ω + ω ^ repr a' * ω →\n          ∃ i, a < ω ^ repr a' * ω * ↑m' + ω ^ repr a' * ω + (ω ^ repr a' * ↑i + ω ^ repr a')\n[PROOFSTEP]\nhave := opow_pos (repr a') omega_pos\n[GOAL]\ncase oadd.inl.none.inl.some.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nthis : 0 < ω ^ repr a'\n⊢ IsLimit (ω ^ repr a' * ω * ↑m' + ω ^ repr a' * ω + ω ^ repr a' * ω) ∧\n    (∀ (i : ℕ),\n        0 < ω ^ repr a' ∧\n          ω ^ repr a' * ↑i + ω ^ repr a' < ω ^ repr a' * ω ∧\n            (NF (oadd a (Nat.succPNat (Nat.succ m')) 0) → NF (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) 0)))) ∧\n      ∀ (a : Ordinal.{0}),\n        a < ω ^ repr a' * ω * ↑m' + ω ^ repr a' * ω + ω ^ repr a' * ω →\n          ∃ i, a < ω ^ repr a' * ω * ↑m' + ω ^ repr a' * ω + (ω ^ repr a' * ↑i + ω ^ repr a')\n[PROOFSTEP]\nrefine' ⟨add_isLimit _ (mul_isLimit this omega_isLimit), fun i => ⟨this, _, _⟩, exists_lt_add exists_lt_mul_omega'⟩\n[GOAL]\ncase oadd.inl.none.inl.some.succ.refine'_1\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nthis : 0 < ω ^ repr a'\ni : ℕ\n⊢ ω ^ repr a' * ↑i + ω ^ repr a' < ω ^ repr a' * ω\n[PROOFSTEP]\nrw [← mul_succ, ← nat_cast_succ, Ordinal.mul_lt_mul_iff_left this]\n[GOAL]\ncase oadd.inl.none.inl.some.succ.refine'_1\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nthis : 0 < ω ^ repr a'\ni : ℕ\n⊢ ↑(Nat.succ i) < ω\n[PROOFSTEP]\napply nat_lt_omega\n[GOAL]\ncase oadd.inl.none.inl.some.succ.refine'_2\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nthis : 0 < ω ^ repr a'\ni : ℕ\n⊢ NF (oadd a (Nat.succPNat (Nat.succ m')) 0) → NF (oadd a (Nat.succPNat m') (oadd a' (Nat.succPNat i) 0))\n[PROOFSTEP]\nrefine' fun H => H.fst.oadd _ (NF.below_of_lt' _ (@NF.oadd_zero _ _ (iha.2 H.fst)))\n[GOAL]\ncase oadd.inl.none.inl.some.succ.refine'_2\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nthis : 0 < ω ^ repr a'\ni : ℕ\nH : NF (oadd a (Nat.succPNat (Nat.succ m')) 0)\n⊢ repr (oadd a' (Nat.succPNat i) 0) < ω ^ repr a\n[PROOFSTEP]\nrw [repr, ← zero_def, repr, add_zero, iha.1, opow_succ, Ordinal.mul_lt_mul_iff_left this]\n[GOAL]\ncase oadd.inl.none.inl.some.succ.refine'_2\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\na' : ONote\niha : repr a = succ (repr a') ∧ (NF a → NF a')\ne : fundamentalSequence a = Sum.inl (some a')\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nthis : 0 < ω ^ repr a'\ni : ℕ\nH : NF (oadd a (Nat.succPNat (Nat.succ m')) 0)\n⊢ ↑↑(Nat.succPNat i) < ω\n[PROOFSTEP]\napply nat_lt_omega\n[GOAL]\ncase oadd.inl.none.inr.zero\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\n⊢ IsLimit (ω ^ repr a) ∧\n    (∀ (i : ℕ), repr (f i) < repr (f (i + 1)) ∧ repr (f i) < repr a ∧ (NF (oadd a 1 0) → NF (oadd (f i) 1 0))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < ω ^ repr a → ∃ i, a_1 < ω ^ repr (f i)\n[PROOFSTEP]\nrcases iha with ⟨h1, h2, h3⟩\n[GOAL]\ncase oadd.inl.none.inr.zero.intro.intro\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\nh1 : IsLimit (repr a)\nh2 : ∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))\nh3 : ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\n⊢ IsLimit (ω ^ repr a) ∧\n    (∀ (i : ℕ), repr (f i) < repr (f (i + 1)) ∧ repr (f i) < repr a ∧ (NF (oadd a 1 0) → NF (oadd (f i) 1 0))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < ω ^ repr a → ∃ i, a_1 < ω ^ repr (f i)\n[PROOFSTEP]\nrefine' ⟨opow_isLimit one_lt_omega h1, fun i => _, exists_lt_omega_opow' one_lt_omega h1 h3⟩\n[GOAL]\ncase oadd.inl.none.inr.zero.intro.intro\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\nh1 : IsLimit (repr a)\nh2 : ∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))\nh3 : ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ni : ℕ\n⊢ repr (f i) < repr (f (i + 1)) ∧ repr (f i) < repr a ∧ (NF (oadd a 1 0) → NF (oadd (f i) 1 0))\n[PROOFSTEP]\nobtain ⟨h4, h5, h6⟩ := h2 i\n[GOAL]\ncase oadd.inl.none.inr.zero.intro.intro.intro.intro\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\ne : fundamentalSequence a = Sum.inr f\ne' : PNat.natPred m = Nat.zero\nh1 : IsLimit (repr a)\nh2 : ∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))\nh3 : ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ni : ℕ\nh4 : f i < f (i + 1)\nh5 : f i < a\nh6 : NF a → NF (f i)\n⊢ repr (f i) < repr (f (i + 1)) ∧ repr (f i) < repr a ∧ (NF (oadd a 1 0) → NF (oadd (f i) 1 0))\n[PROOFSTEP]\nexact ⟨h4, h5, fun H => @NF.oadd_zero _ _ (h6 H.fst)⟩\n[GOAL]\ncase oadd.inl.none.inr.succ\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\niha :\n  IsLimit (repr a) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\n⊢ IsLimit (ω ^ repr a * ↑m' + ω ^ repr a + ω ^ repr a) ∧\n    (∀ (i : ℕ),\n        repr (f i) < repr (f (i + 1)) ∧\n          repr (f i) < repr a ∧\n            (NF (oadd a (Nat.succPNat (Nat.succ m')) 0) → NF (oadd a (Nat.succPNat m') (oadd (f i) 1 0)))) ∧\n      ∀ (a_1 : Ordinal.{0}),\n        a_1 < ω ^ repr a * ↑m' + ω ^ repr a + ω ^ repr a → ∃ i, a_1 < ω ^ repr a * ↑m' + ω ^ repr a + ω ^ repr (f i)\n[PROOFSTEP]\nrcases iha with ⟨h1, h2, h3⟩\n[GOAL]\ncase oadd.inl.none.inr.succ.intro.intro\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nh1 : IsLimit (repr a)\nh2 : ∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))\nh3 : ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\n⊢ IsLimit (ω ^ repr a * ↑m' + ω ^ repr a + ω ^ repr a) ∧\n    (∀ (i : ℕ),\n        repr (f i) < repr (f (i + 1)) ∧\n          repr (f i) < repr a ∧\n            (NF (oadd a (Nat.succPNat (Nat.succ m')) 0) → NF (oadd a (Nat.succPNat m') (oadd (f i) 1 0)))) ∧\n      ∀ (a_1 : Ordinal.{0}),\n        a_1 < ω ^ repr a * ↑m' + ω ^ repr a + ω ^ repr a → ∃ i, a_1 < ω ^ repr a * ↑m' + ω ^ repr a + ω ^ repr (f i)\n[PROOFSTEP]\nrefine'\n  ⟨add_isLimit _ (opow_isLimit one_lt_omega h1), fun i => _, exists_lt_add (exists_lt_omega_opow' one_lt_omega h1 h3)⟩\n[GOAL]\ncase oadd.inl.none.inr.succ.intro.intro\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nh1 : IsLimit (repr a)\nh2 : ∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))\nh3 : ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ni : ℕ\n⊢ repr (f i) < repr (f (i + 1)) ∧\n    repr (f i) < repr a ∧ (NF (oadd a (Nat.succPNat (Nat.succ m')) 0) → NF (oadd a (Nat.succPNat m') (oadd (f i) 1 0)))\n[PROOFSTEP]\nobtain ⟨h4, h5, h6⟩ := h2 i\n[GOAL]\ncase oadd.inl.none.inr.succ.intro.intro.intro.intro\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nh1 : IsLimit (repr a)\nh2 : ∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))\nh3 : ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ni : ℕ\nh4 : f i < f (i + 1)\nh5 : f i < a\nh6 : NF a → NF (f i)\n⊢ repr (f i) < repr (f (i + 1)) ∧\n    repr (f i) < repr a ∧ (NF (oadd a (Nat.succPNat (Nat.succ m')) 0) → NF (oadd a (Nat.succPNat m') (oadd (f i) 1 0)))\n[PROOFSTEP]\nrefine' ⟨h4, h5, fun H => H.fst.oadd _ (NF.below_of_lt' _ (@NF.oadd_zero _ _ (h6 H.fst)))⟩\n[GOAL]\ncase oadd.inl.none.inr.succ.intro.intro.intro.intro\na : ONote\nm : ℕ+\nb : ONote\nihb : b = 0\ne✝ : fundamentalSequence b = Sum.inl none\nf : ℕ → ONote\ne : fundamentalSequence a = Sum.inr f\nm' : ℕ\ne' : PNat.natPred m = Nat.succ m'\nh1 : IsLimit (repr a)\nh2 : ∀ (i : ℕ), f i < f (i + 1) ∧ f i < a ∧ (NF a → NF (f i))\nh3 : ∀ (a_1 : Ordinal.{0}), a_1 < repr a → ∃ i, a_1 < repr (f i)\ni : ℕ\nh4 : f i < f (i + 1)\nh5 : f i < a\nh6 : NF a → NF (f i)\nH : NF (oadd a (Nat.succPNat (Nat.succ m')) 0)\n⊢ repr (oadd (f i) 1 0) < ω ^ repr a\n[PROOFSTEP]\nrwa [repr, ← zero_def, repr, add_zero, PNat.one_coe, Nat.cast_one, mul_one, opow_lt_opow_iff_right one_lt_omega]\n[GOAL]\ncase oadd.inl.some\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nb' : ONote\nihb : repr b = succ (repr b') ∧ (NF b → NF b')\ne : fundamentalSequence b = Sum.inl (some b')\n⊢ repr (oadd a m b) = succ (repr (oadd a m b')) ∧ (NF (oadd a m b) → NF (oadd a m b'))\n[PROOFSTEP]\nrefine' ⟨by rw [repr, ihb.1, add_succ, repr], fun H => H.fst.oadd _ (NF.below_of_lt' _ (ihb.2 H.snd))⟩\n[GOAL]\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nb' : ONote\nihb : repr b = succ (repr b') ∧ (NF b → NF b')\ne : fundamentalSequence b = Sum.inl (some b')\n⊢ repr (oadd a m b) = succ (repr (oadd a m b'))\n[PROOFSTEP]\nrw [repr, ihb.1, add_succ, repr]\n[GOAL]\ncase oadd.inl.some\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nb' : ONote\nihb : repr b = succ (repr b') ∧ (NF b → NF b')\ne : fundamentalSequence b = Sum.inl (some b')\nH : NF (oadd a m b)\n⊢ repr b' < ω ^ repr a\n[PROOFSTEP]\nhave := H.snd'.repr_lt\n[GOAL]\ncase oadd.inl.some\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nb' : ONote\nihb : repr b = succ (repr b') ∧ (NF b → NF b')\ne : fundamentalSequence b = Sum.inl (some b')\nH : NF (oadd a m b)\nthis : repr b < ω ^ repr a\n⊢ repr b' < ω ^ repr a\n[PROOFSTEP]\nrw [ihb.1] at this \n[GOAL]\ncase oadd.inl.some\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nb' : ONote\nihb : repr b = succ (repr b') ∧ (NF b → NF b')\ne : fundamentalSequence b = Sum.inl (some b')\nH : NF (oadd a m b)\nthis : succ (repr b') < ω ^ repr a\n⊢ repr b' < ω ^ repr a\n[PROOFSTEP]\nexact (lt_succ _).trans this\n[GOAL]\ncase oadd.inr\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nf : ℕ → ONote\nihb :\n  IsLimit (repr b) ∧\n    (∀ (i : ℕ), f i < f (i + 1) ∧ f i < b ∧ (NF b → NF (f i))) ∧ ∀ (a : Ordinal.{0}), a < repr b → ∃ i, a < repr (f i)\ne : fundamentalSequence b = Sum.inr f\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a m (f i) < oadd a m (f (i + 1)) ∧ oadd a m (f i) < oadd a m b ∧ (NF (oadd a m b) → NF (oadd a m (f i)))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a m (f i))\n[PROOFSTEP]\nrcases ihb with ⟨h1, h2, h3⟩\n[GOAL]\ncase oadd.inr.intro.intro\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nf : ℕ → ONote\ne : fundamentalSequence b = Sum.inr f\nh1 : IsLimit (repr b)\nh2 : ∀ (i : ℕ), f i < f (i + 1) ∧ f i < b ∧ (NF b → NF (f i))\nh3 : ∀ (a : Ordinal.{0}), a < repr b → ∃ i, a < repr (f i)\n⊢ IsLimit (repr (oadd a m b)) ∧\n    (∀ (i : ℕ),\n        oadd a m (f i) < oadd a m (f (i + 1)) ∧ oadd a m (f i) < oadd a m b ∧ (NF (oadd a m b) → NF (oadd a m (f i)))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < repr (oadd a m b) → ∃ i, a_1 < repr (oadd a m (f i))\n[PROOFSTEP]\nsimp only [repr]\n[GOAL]\ncase oadd.inr.intro.intro\na : ONote\nm : ℕ+\nb : ONote\niha : FundamentalSequenceProp a (fundamentalSequence a)\nf : ℕ → ONote\ne : fundamentalSequence b = Sum.inr f\nh1 : IsLimit (repr b)\nh2 : ∀ (i : ℕ), f i < f (i + 1) ∧ f i < b ∧ (NF b → NF (f i))\nh3 : ∀ (a : Ordinal.{0}), a < repr b → ∃ i, a < repr (f i)\n⊢ IsLimit (ω ^ repr a * ↑↑m + repr b) ∧\n    (∀ (i : ℕ),\n        oadd a m (f i) < oadd a m (f (i + 1)) ∧ oadd a m (f i) < oadd a m b ∧ (NF (oadd a m b) → NF (oadd a m (f i)))) ∧\n      ∀ (a_1 : Ordinal.{0}), a_1 < ω ^ repr a * ↑↑m + repr b → ∃ i, a_1 < ω ^ repr a * ↑↑m + repr (f i)\n[PROOFSTEP]\nexact\n  ⟨Ordinal.add_isLimit _ h1, fun i =>\n    ⟨oadd_lt_oadd_3 (h2 i).1, oadd_lt_oadd_3 (h2 i).2.1, fun H =>\n      H.fst.oadd _ (NF.below_of_lt' (lt_trans (h2 i).2.1 H.snd'.repr_lt) ((h2 i).2.2 H.snd))⟩,\n    exists_lt_add h3⟩\n[GOAL]\nx✝ : ONote\no : ONote := x✝\na : ONote\nh : FundamentalSequenceProp o (Sum.inl (some a))\n⊢ a < o\n[PROOFSTEP]\nrw [lt_def, h.1]\n[GOAL]\nx✝ : ONote\no : ONote := x✝\na : ONote\nh : FundamentalSequenceProp o (Sum.inl (some a))\n⊢ repr a < succ (repr a)\n[PROOFSTEP]\napply lt_succ\n[GOAL]\no : ONote\nx : Option ONote ⊕ (ℕ → ONote)\ne : fundamentalSequence o = x\n⊢ fastGrowing o =\n    match (motive := (x : Option ONote ⊕ (ℕ → ONote)) → FundamentalSequenceProp o x → ℕ → ℕ) x,\n      (_ : FundamentalSequenceProp o x) with\n    | Sum.inl none, x => Nat.succ\n    | Sum.inl (some a), x => fun i => (fastGrowing a)^[i] i\n    | Sum.inr f, x => fun i => fastGrowing (f i) i\n[PROOFSTEP]\nsubst x\n[GOAL]\no : ONote\n⊢ fastGrowing o =\n    match (motive := (x : Option ONote ⊕ (ℕ → ONote)) → FundamentalSequenceProp o x → ℕ → ℕ) fundamentalSequence o,\n      (_ : FundamentalSequenceProp o (fundamentalSequence o)) with\n    | Sum.inl none, x => Nat.succ\n    | Sum.inl (some a), x => fun i => (fastGrowing a)^[i] i\n    | Sum.inr f, x => fun i => fastGrowing (f i) i\n[PROOFSTEP]\nrw [fastGrowing]\n[GOAL]\no : ONote\nh : fundamentalSequence o = Sum.inl none\n⊢ fastGrowing o = Nat.succ\n[PROOFSTEP]\nrw [fastGrowing_def h]\n[GOAL]\no a : ONote\nh : fundamentalSequence o = Sum.inl (some a)\n⊢ fastGrowing o = fun i => (fastGrowing a)^[i] i\n[PROOFSTEP]\nrw [fastGrowing_def h]\n[GOAL]\no : ONote\nf : ℕ → ONote\nh : fundamentalSequence o = Sum.inr f\n⊢ fastGrowing o = fun i => fastGrowing (f i) i\n[PROOFSTEP]\nrw [fastGrowing_def h]\n[GOAL]\n⊢ fastGrowing 1 = fun n => 2 * n\n[PROOFSTEP]\nrw [@fastGrowing_succ 1 0 rfl]\n[GOAL]\n⊢ (fun i => (fastGrowing 0)^[i] i) = fun n => 2 * n\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\ni : ℕ\n⊢ (fastGrowing 0)^[i] i = 2 * i\n[PROOFSTEP]\nrw [two_mul, fastGrowing_zero]\n[GOAL]\ncase h\ni : ℕ\n⊢ Nat.succ^[i] i = i + i\n[PROOFSTEP]\nsuffices : ∀ a b, Nat.succ^[a] b = b + a\n[GOAL]\ncase h\ni : ℕ\nthis : ∀ (a b : ℕ), Nat.succ^[a] b = b + a\n⊢ Nat.succ^[i] i = i + i\ncase this i : ℕ ⊢ ∀ (a b : ℕ), Nat.succ^[a] b = b + a\n[PROOFSTEP]\nexact this _ _\n[GOAL]\ncase this\ni : ℕ\n⊢ ∀ (a b : ℕ), Nat.succ^[a] b = b + a\n[PROOFSTEP]\nintro a b\n[GOAL]\ncase this\ni a b : ℕ\n⊢ Nat.succ^[a] b = b + a\n[PROOFSTEP]\ninduction a\n[GOAL]\ncase this.zero\ni b : ℕ\n⊢ Nat.succ^[Nat.zero] b = b + Nat.zero\n[PROOFSTEP]\nsimp [*, Function.iterate_succ', Nat.add_succ, -Function.iterate_succ]\n[GOAL]\ncase this.succ\ni b n✝ : ℕ\nn_ih✝ : Nat.succ^[n✝] b = b + n✝\n⊢ Nat.succ^[Nat.succ n✝] b = b + Nat.succ n✝\n[PROOFSTEP]\nsimp [*, Function.iterate_succ', Nat.add_succ, -Function.iterate_succ]\n[GOAL]\n⊢ fastGrowing 2 = fun n => 2 ^ n * n\n[PROOFSTEP]\nrw [@fastGrowing_succ 2 1 rfl]\n[GOAL]\n⊢ (fun i => (fastGrowing 1)^[i] i) = fun n => 2 ^ n * n\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\ni : ℕ\n⊢ (fastGrowing 1)^[i] i = 2 ^ i * i\n[PROOFSTEP]\nrw [fastGrowing_one]\n[GOAL]\ncase h\ni : ℕ\n⊢ (fun n => 2 * n)^[i] i = 2 ^ i * i\n[PROOFSTEP]\nsuffices : ∀ a b, (fun n : ℕ => 2 * n)^[a] b = (2 ^ a) * b\n[GOAL]\ncase h\ni : ℕ\nthis : ∀ (a b : ℕ), (fun n => 2 * n)^[a] b = 2 ^ a * b\n⊢ (fun n => 2 * n)^[i] i = 2 ^ i * i\ncase this i : ℕ ⊢ ∀ (a b : ℕ), (fun n => 2 * n)^[a] b = 2 ^ a * b\n[PROOFSTEP]\nexact this _ _\n[GOAL]\ncase this\ni : ℕ\n⊢ ∀ (a b : ℕ), (fun n => 2 * n)^[a] b = 2 ^ a * b\n[PROOFSTEP]\nintro a b\n[GOAL]\ncase this\ni a b : ℕ\n⊢ (fun n => 2 * n)^[a] b = 2 ^ a * b\n[PROOFSTEP]\ninduction a\n[GOAL]\ncase this.zero\ni b : ℕ\n⊢ (fun n => 2 * n)^[Nat.zero] b = 2 ^ Nat.zero * b\n[PROOFSTEP]\nsimp [*, Function.iterate_succ', pow_succ, mul_assoc, -Function.iterate_succ]\n[GOAL]\ncase this.succ\ni b n✝ : ℕ\nn_ih✝ : (fun n => 2 * n)^[n✝] b = 2 ^ n✝ * b\n⊢ (fun n => 2 * n)^[Nat.succ n✝] b = 2 ^ Nat.succ n✝ * b\n[PROOFSTEP]\nsimp [*, Function.iterate_succ', pow_succ, mul_assoc, -Function.iterate_succ]\n[GOAL]\n⊢ fastGrowingε₀ 0 = 1\n[PROOFSTEP]\nsimp [fastGrowingε₀]\n[GOAL]\n⊢ fastGrowingε₀ 1 = 2\n[PROOFSTEP]\nsimp [fastGrowingε₀, show oadd 0 1 0 = 1 from rfl]\n[GOAL]\n⊢ fastGrowingε₀ 2 = 2048\n[PROOFSTEP]\nsimp [fastGrowingε₀, show oadd 0 1 0 = 1 from rfl, @fastGrowing_limit (oadd 1 1 0) _ rfl,\n  show oadd 0 (2 : Nat).succPNat 0 = 3 from rfl, @fastGrowing_succ 3 2 rfl]\n[GOAL]\n⊢ DecidableEq NONote\n[PROOFSTEP]\nunfold NONote\n[GOAL]\n⊢ DecidableEq { o // ONote.NF o }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\n⊢ Ordering.Compares (cmp { val := a, property := ha } { val := b, property := hb }) { val := a, property := ha }\n    { val := b, property := hb }\n[PROOFSTEP]\ndsimp [cmp]\n[GOAL]\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\n⊢ Ordering.Compares (ONote.cmp a b) { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nhave := ONote.cmp_compares a b\n[GOAL]\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\nthis : Ordering.Compares (ONote.cmp a b) a b\n⊢ Ordering.Compares (ONote.cmp a b) { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\ncases h : ONote.cmp a b\n[GOAL]\ncase lt\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\nthis : Ordering.Compares (ONote.cmp a b) a b\nh : ONote.cmp a b = Ordering.lt\n⊢ Ordering.Compares Ordering.lt { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nsimp only [h] at this \n[GOAL]\ncase eq\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\nthis : Ordering.Compares (ONote.cmp a b) a b\nh : ONote.cmp a b = Ordering.eq\n⊢ Ordering.Compares Ordering.eq { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nsimp only [h] at this \n[GOAL]\ncase gt\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\nthis : Ordering.Compares (ONote.cmp a b) a b\nh : ONote.cmp a b = Ordering.gt\n⊢ Ordering.Compares Ordering.gt { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nsimp only [h] at this \n[GOAL]\ncase lt\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\nh : ONote.cmp a b = Ordering.lt\nthis : Ordering.Compares Ordering.lt a b\n⊢ Ordering.Compares Ordering.lt { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\ntry exact this\n[GOAL]\ncase lt\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\nh : ONote.cmp a b = Ordering.lt\nthis : Ordering.Compares Ordering.lt a b\n⊢ Ordering.Compares Ordering.lt { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nexact this\n[GOAL]\ncase eq\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\nh : ONote.cmp a b = Ordering.eq\nthis : Ordering.Compares Ordering.eq a b\n⊢ Ordering.Compares Ordering.eq { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\ntry exact this\n[GOAL]\ncase eq\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\nh : ONote.cmp a b = Ordering.eq\nthis : Ordering.Compares Ordering.eq a b\n⊢ Ordering.Compares Ordering.eq { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nexact this\n[GOAL]\ncase gt\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\nh : ONote.cmp a b = Ordering.gt\nthis : Ordering.Compares Ordering.gt a b\n⊢ Ordering.Compares Ordering.gt { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\ntry exact this\n[GOAL]\ncase gt\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\nh : ONote.cmp a b = Ordering.gt\nthis : Ordering.Compares Ordering.gt a b\n⊢ Ordering.Compares Ordering.gt { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nexact this\n[GOAL]\ncase eq\na : ONote\nha : ONote.NF a\nb : ONote\nhb : ONote.NF b\nh : ONote.cmp a b = Ordering.eq\nthis : Ordering.Compares Ordering.eq a b\n⊢ Ordering.Compares Ordering.eq { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nexact Subtype.mk_eq_mk.2 this\n[GOAL]\nC : NONote → Sort u_1\no : NONote\nH0 : C 0\nH1 : (e : NONote) → (n : ℕ+) → (a : NONote) → (h : below a e) → C e → C a → C (oadd e n a h)\n⊢ C o\n[PROOFSTEP]\ncases' o with o h\n[GOAL]\ncase mk\nC : NONote → Sort u_1\nH0 : C 0\nH1 : (e : NONote) → (n : ℕ+) → (a : NONote) → (h : below a e) → C e → C a → C (oadd e n a h)\no : ONote\nh : ONote.NF o\n⊢ C { val := o, property := h }\n[PROOFSTEP]\ninduction' o with e n a IHe IHa\n[GOAL]\ncase mk.zero\nC : NONote → Sort u_1\nH0 : C 0\nH1 : (e : NONote) → (n : ℕ+) → (a : NONote) → (h : below a e) → C e → C a → C (oadd e n a h)\no : ONote\nh✝ : ONote.NF o\nh : ONote.NF ONote.zero\n⊢ C { val := ONote.zero, property := h }\n[PROOFSTEP]\nexact H0\n[GOAL]\ncase mk.oadd\nC : NONote → Sort u_1\nH0 : C 0\nH1 : (e : NONote) → (n : ℕ+) → (a : NONote) → (h : below a e) → C e → C a → C (oadd e n a h)\no : ONote\nh✝ : ONote.NF o\ne : ONote\nn : ℕ+\na : ONote\nIHe : (h : ONote.NF e) → C { val := e, property := h }\nIHa : (h : ONote.NF a) → C { val := a, property := h }\nh : ONote.NF (ONote.oadd e n a)\n⊢ C { val := ONote.oadd e n a, property := h }\n[PROOFSTEP]\nexact H1 ⟨e, h.fst⟩ n ⟨a, h.snd⟩ h.snd' (IHe _) (IHa _)\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Ordinal.Notation", "llama_tokens": 164706, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7772998611746911, "lm_q2_score": 0.49609382947091946, "lm_q1q2_score": 0.3856136647773666}}
{"text": "[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx1 x2 y : ℕ × K\nH : R K p x1 x2\nn : ℕ\nx : K\n⊢ R K p ((n, x).fst + y.fst, (↑(frobenius K p))^[y.fst] (n, x).snd * (↑(frobenius K p))^[(n, x).fst] y.snd)\n    ((n + 1, ↑(frobenius K p) x).fst + y.fst,\n      (↑(frobenius K p))^[y.fst] (n + 1, ↑(frobenius K p) x).snd *\n        (↑(frobenius K p))^[(n + 1, ↑(frobenius K p) x).fst] y.snd)\n[PROOFSTEP]\nrw [← iterate_succ_apply, iterate_succ_apply', iterate_succ_apply', ← frobenius_mul, Nat.succ_add]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx1 x2 y : ℕ × K\nH : R K p x1 x2\nn : ℕ\nx : K\n⊢ R K p ((n, x).fst + y.fst, (↑(frobenius K p))^[y.fst] (n, x).snd * (↑(frobenius K p))^[(n, x).fst] y.snd)\n    (Nat.succ (n + y.fst), ↑(frobenius K p) ((↑(frobenius K p))^[y.fst] x * (↑(frobenius K p))^[n] y.snd))\n[PROOFSTEP]\napply R.intro\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y1 y2 : ℕ × K\nH : R K p y1 y2\nn : ℕ\ny : K\n⊢ R K p (x.fst + (n, y).fst, (↑(frobenius K p))^[(n, y).fst] x.snd * (↑(frobenius K p))^[x.fst] (n, y).snd)\n    (x.fst + (n + 1, ↑(frobenius K p) y).fst,\n      (↑(frobenius K p))^[(n + 1, ↑(frobenius K p) y).fst] x.snd *\n        (↑(frobenius K p))^[x.fst] (n + 1, ↑(frobenius K p) y).snd)\n[PROOFSTEP]\nrw [← iterate_succ_apply, iterate_succ_apply', iterate_succ_apply', ← frobenius_mul]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y1 y2 : ℕ × K\nH : R K p y1 y2\nn : ℕ\ny : K\n⊢ R K p (x.fst + (n, y).fst, (↑(frobenius K p))^[(n, y).fst] x.snd * (↑(frobenius K p))^[x.fst] (n, y).snd)\n    (x.fst + (n + 1, ↑(frobenius K p) y).fst,\n      ↑(frobenius K p) ((↑(frobenius K p))^[n] x.snd * (↑(frobenius K p))^[x.fst] y))\n[PROOFSTEP]\napply R.intro\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝ : Mul (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ Quot.mk (R K p) (m, x) * Quot.mk (R K p) (n, y) * Quot.mk (R K p) (s, z) =\n    Quot.mk (R K p) (m, x) * (Quot.mk (R K p) (n, y) * Quot.mk (R K p) (s, z))\n[PROOFSTEP]\nsimp only [quot_mk_eq_mk, mk_mul_mk]\n  -- Porting note: added this line\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝ : Mul (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ mk K p\n      (m + n + s,\n        (↑(frobenius K p))^[s] ((↑(frobenius K p))^[n] x * (↑(frobenius K p))^[m] y) * (↑(frobenius K p))^[m + n] z) =\n    mk K p\n      (m + (n + s),\n        (↑(frobenius K p))^[n + s] x * (↑(frobenius K p))^[m] ((↑(frobenius K p))^[s] y * (↑(frobenius K p))^[n] z))\n[PROOFSTEP]\napply congr_arg (Quot.mk _)\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝ : Mul (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ (m + n + s,\n      (↑(frobenius K p))^[s] ((↑(frobenius K p))^[n] x * (↑(frobenius K p))^[m] y) * (↑(frobenius K p))^[m + n] z) =\n    (m + (n + s),\n      (↑(frobenius K p))^[n + s] x * (↑(frobenius K p))^[m] ((↑(frobenius K p))^[s] y * (↑(frobenius K p))^[n] z))\n[PROOFSTEP]\nsimp only [add_assoc, mul_assoc, iterate_map_mul, ← iterate_add_apply, add_comm, add_left_comm]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝ : Mul (PerfectClosure K p) := inferInstance\ne : PerfectClosure K p\nx✝ : ℕ × K\nn : ℕ\nx : K\n⊢ ((0, 1).fst + (n, x).fst, (↑(frobenius K p))^[(n, x).fst] (0, 1).snd * (↑(frobenius K p))^[(0, 1).fst] (n, x).snd) =\n    (n, x)\n[PROOFSTEP]\nsimp only [RingHom.iterate_map_one, iterate_zero_apply, one_mul, zero_add]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝ : Mul (PerfectClosure K p) := inferInstance\ne : PerfectClosure K p\nx✝ : ℕ × K\nn : ℕ\nx : K\n⊢ ((n, x).fst + (0, 1).fst, (↑(frobenius K p))^[(0, 1).fst] (n, x).snd * (↑(frobenius K p))^[(n, x).fst] (0, 1).snd) =\n    (n, x)\n[PROOFSTEP]\nsimp only [RingHom.iterate_map_one, iterate_zero_apply, mul_one, add_zero]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝ : Mul (PerfectClosure K p) := inferInstance\ne f : PerfectClosure K p\nx✝¹ : ℕ × K\nm : ℕ\nx : K\nx✝ : ℕ × K\nn : ℕ\ny : K\n⊢ ((m, x).fst + (n, y).fst, (↑(frobenius K p))^[(n, y).fst] (m, x).snd * (↑(frobenius K p))^[(m, x).fst] (n, y).snd) =\n    ((n, y).fst + (m, x).fst, (↑(frobenius K p))^[(m, x).fst] (n, y).snd * (↑(frobenius K p))^[(n, y).fst] (m, x).snd)\n[PROOFSTEP]\nsimp only [add_comm, mul_comm]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx1 x2 y : ℕ × K\nH : R K p x1 x2\nn : ℕ\nx : K\n⊢ R K p ((n, x).fst + y.fst, (↑(frobenius K p))^[y.fst] (n, x).snd + (↑(frobenius K p))^[(n, x).fst] y.snd)\n    ((n + 1, ↑(frobenius K p) x).fst + y.fst,\n      (↑(frobenius K p))^[y.fst] (n + 1, ↑(frobenius K p) x).snd +\n        (↑(frobenius K p))^[(n + 1, ↑(frobenius K p) x).fst] y.snd)\n[PROOFSTEP]\nrw [← iterate_succ_apply, iterate_succ_apply', iterate_succ_apply', ← frobenius_add, Nat.succ_add]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx1 x2 y : ℕ × K\nH : R K p x1 x2\nn : ℕ\nx : K\n⊢ R K p ((n, x).fst + y.fst, (↑(frobenius K p))^[y.fst] (n, x).snd + (↑(frobenius K p))^[(n, x).fst] y.snd)\n    (Nat.succ (n + y.fst), ↑(frobenius K p) ((↑(frobenius K p))^[y.fst] x + (↑(frobenius K p))^[n] y.snd))\n[PROOFSTEP]\napply R.intro\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y1 y2 : ℕ × K\nH : R K p y1 y2\nn : ℕ\ny : K\n⊢ R K p (x.fst + (n, y).fst, (↑(frobenius K p))^[(n, y).fst] x.snd + (↑(frobenius K p))^[x.fst] (n, y).snd)\n    (x.fst + (n + 1, ↑(frobenius K p) y).fst,\n      (↑(frobenius K p))^[(n + 1, ↑(frobenius K p) y).fst] x.snd +\n        (↑(frobenius K p))^[x.fst] (n + 1, ↑(frobenius K p) y).snd)\n[PROOFSTEP]\nrw [← iterate_succ_apply, iterate_succ_apply', iterate_succ_apply', ← frobenius_add]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y1 y2 : ℕ × K\nH : R K p y1 y2\nn : ℕ\ny : K\n⊢ R K p (x.fst + (n, y).fst, (↑(frobenius K p))^[(n, y).fst] x.snd + (↑(frobenius K p))^[x.fst] (n, y).snd)\n    (x.fst + (n + 1, ↑(frobenius K p) y).fst,\n      ↑(frobenius K p) ((↑(frobenius K p))^[n] x.snd + (↑(frobenius K p))^[x.fst] y))\n[PROOFSTEP]\napply R.intro\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y : ℕ × K\nH : R K p x✝ y\nn : ℕ\nx : K\n⊢ R K p ((n, x).fst, -(n, x).snd) ((n + 1, ↑(frobenius K p) x).fst, -(n + 1, ↑(frobenius K p) x).snd)\n[PROOFSTEP]\nrw [← frobenius_neg]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y : ℕ × K\nH : R K p x✝ y\nn : ℕ\nx : K\n⊢ R K p ((n, x).fst, -(n, x).snd) ((n + 1, ↑(frobenius K p) x).fst, ↑(frobenius K p) (-x))\n[PROOFSTEP]\napply R.intro\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\n⊢ mk K p (n, 0) = 0\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\n⊢ mk K p (Nat.zero, 0) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nih : mk K p (n, 0) = 0\n⊢ mk K p (Nat.succ n, 0) = 0\n[PROOFSTEP]\nrw [← ih]\n[GOAL]\ncase succ\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nih : mk K p (n, 0) = 0\n⊢ mk K p (Nat.succ n, 0) = mk K p (n, 0)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase succ\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nih : mk K p (n, 0) = 0\n⊢ mk K p (n, 0) = mk K p (Nat.succ n, 0)\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase succ.a\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nih : mk K p (n, 0) = 0\n⊢ R K p (n, 0) (Nat.succ n, 0)\n[PROOFSTEP]\nhave := R.intro (p := p) n (0 : K)\n[GOAL]\ncase succ.a\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nih : mk K p (n, 0) = 0\nthis : R K p (n, 0) (n + 1, ↑(frobenius K p) 0)\n⊢ R K p (n, 0) (Nat.succ n, 0)\n[PROOFSTEP]\nrwa [frobenius_zero K p] at this \n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nm n : ℕ\nx y : K\nH : (↑(frobenius K p))^[m] x = y\n⊢ mk K p (n, x) = mk K p (m + n, y)\n[PROOFSTEP]\nsubst H\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nm n : ℕ\nx : K\n⊢ mk K p (n, x) = mk K p (m + n, (↑(frobenius K p))^[m] x)\n[PROOFSTEP]\ninduction' m with m ih\n[GOAL]\ncase zero\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\n⊢ mk K p (n, x) = mk K p (Nat.zero + n, (↑(frobenius K p))^[Nat.zero] x)\n[PROOFSTEP]\nsimp only [Nat.zero_eq, zero_add, iterate_zero_apply]\n[GOAL]\ncase succ\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\nm : ℕ\nih : mk K p (n, x) = mk K p (m + n, (↑(frobenius K p))^[m] x)\n⊢ mk K p (n, x) = mk K p (Nat.succ m + n, (↑(frobenius K p))^[Nat.succ m] x)\n[PROOFSTEP]\nrw [ih, Nat.succ_add, iterate_succ']\n[GOAL]\ncase succ\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\nm : ℕ\nih : mk K p (n, x) = mk K p (m + n, (↑(frobenius K p))^[m] x)\n⊢ mk K p (m + n, (↑(frobenius K p))^[m] x) = mk K p (Nat.succ (m + n), (↑(frobenius K p) ∘ (↑(frobenius K p))^[m]) x)\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase succ.a\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\nm : ℕ\nih : mk K p (n, x) = mk K p (m + n, (↑(frobenius K p))^[m] x)\n⊢ R K p (m + n, (↑(frobenius K p))^[m] x) (Nat.succ (m + n), (↑(frobenius K p) ∘ (↑(frobenius K p))^[m]) x)\n[PROOFSTEP]\napply R.intro\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝¹ : Add (PerfectClosure K p) := inferInstance\nsrc✝ : Neg (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ Quot.mk (R K p) (m, x) + Quot.mk (R K p) (n, y) + Quot.mk (R K p) (s, z) =\n    Quot.mk (R K p) (m, x) + (Quot.mk (R K p) (n, y) + Quot.mk (R K p) (s, z))\n[PROOFSTEP]\nsimp only [quot_mk_eq_mk, mk_add_mk]\n  -- Porting note: added this line\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝¹ : Add (PerfectClosure K p) := inferInstance\nsrc✝ : Neg (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ mk K p\n      (m + n + s,\n        (↑(frobenius K p))^[s] ((↑(frobenius K p))^[n] x + (↑(frobenius K p))^[m] y) + (↑(frobenius K p))^[m + n] z) =\n    mk K p\n      (m + (n + s),\n        (↑(frobenius K p))^[n + s] x + (↑(frobenius K p))^[m] ((↑(frobenius K p))^[s] y + (↑(frobenius K p))^[n] z))\n[PROOFSTEP]\napply congr_arg (Quot.mk _)\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝¹ : Add (PerfectClosure K p) := inferInstance\nsrc✝ : Neg (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ (m + n + s,\n      (↑(frobenius K p))^[s] ((↑(frobenius K p))^[n] x + (↑(frobenius K p))^[m] y) + (↑(frobenius K p))^[m + n] z) =\n    (m + (n + s),\n      (↑(frobenius K p))^[n + s] x + (↑(frobenius K p))^[m] ((↑(frobenius K p))^[s] y + (↑(frobenius K p))^[n] z))\n[PROOFSTEP]\nsimp only [iterate_map_add, ← iterate_add_apply, add_assoc, add_comm s _]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝¹ : Add (PerfectClosure K p) := inferInstance\nsrc✝ : Neg (PerfectClosure K p) := inferInstance\ne : PerfectClosure K p\nx✝ : ℕ × K\nn : ℕ\nx : K\n⊢ ((0, 0).fst + (n, x).fst, (↑(frobenius K p))^[(n, x).fst] (0, 0).snd + (↑(frobenius K p))^[(0, 0).fst] (n, x).snd) =\n    (n, x)\n[PROOFSTEP]\nsimp only [RingHom.iterate_map_zero, iterate_zero_apply, zero_add]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝¹ : Add (PerfectClosure K p) := inferInstance\nsrc✝ : Neg (PerfectClosure K p) := inferInstance\ne : PerfectClosure K p\nx✝ : ℕ × K\nn : ℕ\nx : K\n⊢ ((n, x).fst + (0, 0).fst, (↑(frobenius K p))^[(0, 0).fst] (n, x).snd + (↑(frobenius K p))^[(n, x).fst] (0, 0).snd) =\n    (n, x)\n[PROOFSTEP]\nsimp only [RingHom.iterate_map_zero, iterate_zero_apply, add_zero]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝¹ : Add (PerfectClosure K p) := inferInstance\nsrc✝ : Neg (PerfectClosure K p) := inferInstance\ne : PerfectClosure K p\nx✝ : ℕ × K\nn : ℕ\nx : K\n⊢ -Quot.mk (R K p) (n, x) + Quot.mk (R K p) (n, x) = 0\n[PROOFSTEP]\nsimp only [quot_mk_eq_mk, neg_mk, mk_add_mk, RingHom.iterate_map_neg, add_left_neg, mk_zero]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝¹ : Add (PerfectClosure K p) := inferInstance\nsrc✝ : Neg (PerfectClosure K p) := inferInstance\ne f : PerfectClosure K p\nx✝¹ : ℕ × K\nm : ℕ\nx : K\nx✝ : ℕ × K\nn : ℕ\ny : K\n⊢ ((m, x).fst + (n, y).fst, (↑(frobenius K p))^[(n, y).fst] (m, x).snd + (↑(frobenius K p))^[(m, x).fst] (n, y).snd) =\n    ((n, y).fst + (m, x).fst, (↑(frobenius K p))^[(m, x).fst] (n, y).snd + (↑(frobenius K p))^[(n, y).fst] (m, x).snd)\n[PROOFSTEP]\nsimp only [add_comm]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ Quot.mk (R K p) (m, x) * (Quot.mk (R K p) (n, y) + Quot.mk (R K p) (s, z)) =\n    Quot.mk (R K p) (m, x) * Quot.mk (R K p) (n, y) + Quot.mk (R K p) (m, x) * Quot.mk (R K p) (s, z)\n[PROOFSTEP]\nsimp only [quot_mk_eq_mk, mk_add_mk, mk_mul_mk]\n  -- Porting note: added this line\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ mk K p\n      (m + (n + s),\n        (↑(frobenius K p))^[n + s] x * (↑(frobenius K p))^[m] ((↑(frobenius K p))^[s] y + (↑(frobenius K p))^[n] z)) =\n    mk K p\n      (m + n + (m + s),\n        (↑(frobenius K p))^[m + s] ((↑(frobenius K p))^[n] x * (↑(frobenius K p))^[m] y) +\n          (↑(frobenius K p))^[m + n] ((↑(frobenius K p))^[s] x * (↑(frobenius K p))^[m] z))\n[PROOFSTEP]\nsimp only [add_assoc, add_comm, add_left_comm]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ mk K p\n      (m + (n + s),\n        (↑(frobenius K p))^[n + s] x * (↑(frobenius K p))^[m] ((↑(frobenius K p))^[n] z + (↑(frobenius K p))^[s] y)) =\n    mk K p\n      (m + (m + (n + s)),\n        (↑(frobenius K p))^[m + n] ((↑(frobenius K p))^[s] x * (↑(frobenius K p))^[m] z) +\n          (↑(frobenius K p))^[m + s] ((↑(frobenius K p))^[n] x * (↑(frobenius K p))^[m] y))\n[PROOFSTEP]\napply R.sound\n[GOAL]\ncase H\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ (↑(frobenius K p))^[m]\n      ((↑(frobenius K p))^[n + s] x * (↑(frobenius K p))^[m] ((↑(frobenius K p))^[n] z + (↑(frobenius K p))^[s] y)) =\n    (↑(frobenius K p))^[m + n] ((↑(frobenius K p))^[s] x * (↑(frobenius K p))^[m] z) +\n      (↑(frobenius K p))^[m + s] ((↑(frobenius K p))^[n] x * (↑(frobenius K p))^[m] y)\n[PROOFSTEP]\nsimp only [iterate_map_mul, iterate_map_add, ← iterate_add_apply, mul_add, add_comm, add_left_comm]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ (Quot.mk (R K p) (m, x) + Quot.mk (R K p) (n, y)) * Quot.mk (R K p) (s, z) =\n    Quot.mk (R K p) (m, x) * Quot.mk (R K p) (s, z) + Quot.mk (R K p) (n, y) * Quot.mk (R K p) (s, z)\n[PROOFSTEP]\nsimp only [quot_mk_eq_mk, mk_add_mk, mk_mul_mk]\n  -- Porting note: added this line\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ mk K p\n      (m + n + s,\n        (↑(frobenius K p))^[s] ((↑(frobenius K p))^[n] x + (↑(frobenius K p))^[m] y) * (↑(frobenius K p))^[m + n] z) =\n    mk K p\n      (m + s + (n + s),\n        (↑(frobenius K p))^[n + s] ((↑(frobenius K p))^[s] x * (↑(frobenius K p))^[m] z) +\n          (↑(frobenius K p))^[m + s] ((↑(frobenius K p))^[s] y * (↑(frobenius K p))^[n] z))\n[PROOFSTEP]\nsimp only [add_assoc, add_comm _ s, add_left_comm _ s]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ mk K p\n      (s + (m + n),\n        (↑(frobenius K p))^[s] ((↑(frobenius K p))^[n] x + (↑(frobenius K p))^[m] y) * (↑(frobenius K p))^[m + n] z) =\n    mk K p\n      (s + (s + (m + n)),\n        (↑(frobenius K p))^[s + n] ((↑(frobenius K p))^[s] x * (↑(frobenius K p))^[m] z) +\n          (↑(frobenius K p))^[s + m] ((↑(frobenius K p))^[s] y * (↑(frobenius K p))^[n] z))\n[PROOFSTEP]\napply R.sound\n[GOAL]\ncase H\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\ne f g : PerfectClosure K p\nx✝² : ℕ × K\nm : ℕ\nx : K\nx✝¹ : ℕ × K\nn : ℕ\ny : K\nx✝ : ℕ × K\ns : ℕ\nz : K\n⊢ (↑(frobenius K p))^[s]\n      ((↑(frobenius K p))^[s] ((↑(frobenius K p))^[n] x + (↑(frobenius K p))^[m] y) * (↑(frobenius K p))^[m + n] z) =\n    (↑(frobenius K p))^[s + n] ((↑(frobenius K p))^[s] x * (↑(frobenius K p))^[m] z) +\n      (↑(frobenius K p))^[s + m] ((↑(frobenius K p))^[s] y * (↑(frobenius K p))^[n] z)\n[PROOFSTEP]\nsimp only [iterate_map_mul, iterate_map_add, ← iterate_add_apply, add_mul, add_comm, add_left_comm]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\na : PerfectClosure K p\n⊢ 0 * a = 0\n[PROOFSTEP]\nrefine Quot.inductionOn a fun ⟨m, x⟩ => ?_\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\na : PerfectClosure K p\nx✝ : ℕ × K\nm : ℕ\nx : K\n⊢ 0 * Quot.mk (R K p) (m, x) = 0\n[PROOFSTEP]\nrw [zero_def, quot_mk_eq_mk, mk_mul_mk]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\na : PerfectClosure K p\nx✝ : ℕ × K\nm : ℕ\nx : K\n⊢ mk K p\n      ((0, 0).fst + (m, x).fst,\n        (↑(frobenius K p))^[(m, x).fst] (0, 0).snd * (↑(frobenius K p))^[(0, 0).fst] (m, x).snd) =\n    mk K p (0, 0)\n[PROOFSTEP]\nsimp only [zero_add, iterate_zero, id_eq, RingHom.iterate_map_zero, zero_mul, mk_zero]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\na : PerfectClosure K p\n⊢ a * 0 = 0\n[PROOFSTEP]\nrefine Quot.inductionOn a fun ⟨m, x⟩ => ?_\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\na : PerfectClosure K p\nx✝ : ℕ × K\nm : ℕ\nx : K\n⊢ Quot.mk (R K p) (m, x) * 0 = 0\n[PROOFSTEP]\nrw [zero_def, quot_mk_eq_mk, mk_mul_mk]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝² : AddCommGroup (PerfectClosure K p) := addCommGroup K p\nsrc✝¹ : AddMonoidWithOne (PerfectClosure K p) := AddMonoidWithOne.unary\nsrc✝ : CommMonoid (PerfectClosure K p) := inferInstance\na : PerfectClosure K p\nx✝ : ℕ × K\nm : ℕ\nx : K\n⊢ mk K p\n      ((m, x).fst + (0, 0).fst,\n        (↑(frobenius K p))^[(0, 0).fst] (m, x).snd * (↑(frobenius K p))^[(m, x).fst] (0, 0).snd) =\n    mk K p (0, 0)\n[PROOFSTEP]\nsimp only [zero_add, iterate_zero, id_eq, RingHom.iterate_map_zero, mul_zero, mk_zero]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ × K\n⊢ mk K p x = mk K p y ↔ ∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ × K\n⊢ mk K p x = mk K p y → ∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ × K\nH : mk K p x = mk K p y\n⊢ ∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\n[PROOFSTEP]\nreplace H := Quot.exact _ H\n[GOAL]\ncase mp\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ × K\nH : EqvGen (R K p) x y\n⊢ ∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\n[PROOFSTEP]\ninduction H\n[GOAL]\ncase mp.rel\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y x✝ y✝ : ℕ × K\na✝ : R K p x✝ y✝\n⊢ ∃ z, (↑(frobenius K p))^[y✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] y✝.snd\ncase mp.refl\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y x✝ : ℕ × K\n⊢ ∃ z, (↑(frobenius K p))^[x✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] x✝.snd\ncase mp.symm\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y x✝ y✝ : ℕ × K\na✝ : EqvGen (R K p) x✝ y✝\na_ih✝ : ∃ z, (↑(frobenius K p))^[y✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] y✝.snd\n⊢ ∃ z, (↑(frobenius K p))^[x✝.fst + z] y✝.snd = (↑(frobenius K p))^[y✝.fst + z] x✝.snd\ncase mp.trans\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y x✝ y✝ z✝ : ℕ × K\na✝¹ : EqvGen (R K p) x✝ y✝\na✝ : EqvGen (R K p) y✝ z✝\na_ih✝¹ : ∃ z, (↑(frobenius K p))^[y✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] y✝.snd\na_ih✝ : ∃ z, (↑(frobenius K p))^[z✝.fst + z] y✝.snd = (↑(frobenius K p))^[y✝.fst + z] z✝.snd\n⊢ ∃ z, (↑(frobenius K p))^[z✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] z✝.snd\n[PROOFSTEP]\ncase rel x y H => cases' H with n x; exact ⟨0, rfl⟩\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y : ℕ × K\nH : R K p x y\n⊢ ∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\n[PROOFSTEP]\ncase rel x y H => cases' H with n x; exact ⟨0, rfl⟩\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y : ℕ × K\nH : R K p x y\n⊢ ∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\n[PROOFSTEP]\ncases' H with n x\n[GOAL]\ncase intro\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y : ℕ × K\nn : ℕ\nx : K\n⊢ ∃ z,\n    (↑(frobenius K p))^[(n + 1, ↑(frobenius K p) x).fst + z] (n, x).snd =\n      (↑(frobenius K p))^[(n, x).fst + z] (n + 1, ↑(frobenius K p) x).snd\n[PROOFSTEP]\nexact ⟨0, rfl⟩\n[GOAL]\ncase mp.refl\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y x✝ : ℕ × K\n⊢ ∃ z, (↑(frobenius K p))^[x✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] x✝.snd\ncase mp.symm\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y x✝ y✝ : ℕ × K\na✝ : EqvGen (R K p) x✝ y✝\na_ih✝ : ∃ z, (↑(frobenius K p))^[y✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] y✝.snd\n⊢ ∃ z, (↑(frobenius K p))^[x✝.fst + z] y✝.snd = (↑(frobenius K p))^[y✝.fst + z] x✝.snd\ncase mp.trans\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y x✝ y✝ z✝ : ℕ × K\na✝¹ : EqvGen (R K p) x✝ y✝\na✝ : EqvGen (R K p) y✝ z✝\na_ih✝¹ : ∃ z, (↑(frobenius K p))^[y✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] y✝.snd\na_ih✝ : ∃ z, (↑(frobenius K p))^[z✝.fst + z] y✝.snd = (↑(frobenius K p))^[y✝.fst + z] z✝.snd\n⊢ ∃ z, (↑(frobenius K p))^[z✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] z✝.snd\n[PROOFSTEP]\ncase refl H => exact ⟨0, rfl⟩\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y H : ℕ × K\n⊢ ∃ z, (↑(frobenius K p))^[H.fst + z] H.snd = (↑(frobenius K p))^[H.fst + z] H.snd\n[PROOFSTEP]\ncase refl H => exact ⟨0, rfl⟩\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y H : ℕ × K\n⊢ ∃ z, (↑(frobenius K p))^[H.fst + z] H.snd = (↑(frobenius K p))^[H.fst + z] H.snd\n[PROOFSTEP]\nexact ⟨0, rfl⟩\n[GOAL]\ncase mp.symm\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y x✝ y✝ : ℕ × K\na✝ : EqvGen (R K p) x✝ y✝\na_ih✝ : ∃ z, (↑(frobenius K p))^[y✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] y✝.snd\n⊢ ∃ z, (↑(frobenius K p))^[x✝.fst + z] y✝.snd = (↑(frobenius K p))^[y✝.fst + z] x✝.snd\ncase mp.trans\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y x✝ y✝ z✝ : ℕ × K\na✝¹ : EqvGen (R K p) x✝ y✝\na✝ : EqvGen (R K p) y✝ z✝\na_ih✝¹ : ∃ z, (↑(frobenius K p))^[y✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] y✝.snd\na_ih✝ : ∃ z, (↑(frobenius K p))^[z✝.fst + z] y✝.snd = (↑(frobenius K p))^[y✝.fst + z] z✝.snd\n⊢ ∃ z, (↑(frobenius K p))^[z✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] z✝.snd\n[PROOFSTEP]\ncase symm x y H ih => cases' ih with w ih; exact ⟨w, ih.symm⟩\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y : ℕ × K\nH : EqvGen (R K p) x y\nih : ∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\n⊢ ∃ z, (↑(frobenius K p))^[x.fst + z] y.snd = (↑(frobenius K p))^[y.fst + z] x.snd\n[PROOFSTEP]\ncase symm x y H ih => cases' ih with w ih; exact ⟨w, ih.symm⟩\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y : ℕ × K\nH : EqvGen (R K p) x y\nih : ∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\n⊢ ∃ z, (↑(frobenius K p))^[x.fst + z] y.snd = (↑(frobenius K p))^[y.fst + z] x.snd\n[PROOFSTEP]\ncases' ih with w ih\n[GOAL]\ncase intro\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y : ℕ × K\nH : EqvGen (R K p) x y\nw : ℕ\nih : (↑(frobenius K p))^[y.fst + w] x.snd = (↑(frobenius K p))^[x.fst + w] y.snd\n⊢ ∃ z, (↑(frobenius K p))^[x.fst + z] y.snd = (↑(frobenius K p))^[y.fst + z] x.snd\n[PROOFSTEP]\nexact ⟨w, ih.symm⟩\n[GOAL]\ncase mp.trans\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y x✝ y✝ z✝ : ℕ × K\na✝¹ : EqvGen (R K p) x✝ y✝\na✝ : EqvGen (R K p) y✝ z✝\na_ih✝¹ : ∃ z, (↑(frobenius K p))^[y✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] y✝.snd\na_ih✝ : ∃ z, (↑(frobenius K p))^[z✝.fst + z] y✝.snd = (↑(frobenius K p))^[y✝.fst + z] z✝.snd\n⊢ ∃ z, (↑(frobenius K p))^[z✝.fst + z] x✝.snd = (↑(frobenius K p))^[x✝.fst + z] z✝.snd\n[PROOFSTEP]\ncase trans x y z H1 H2 ih1 ih2 =>\n  cases' ih1 with z1 ih1\n  cases' ih2 with z2 ih2\n  exists z2 + (y.1 + z1)\n  rw [← add_assoc, iterate_add_apply, ih1]\n  rw [← iterate_add_apply, add_comm, iterate_add_apply, ih2]\n  rw [← iterate_add_apply]\n  simp only [add_comm, add_left_comm]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y z : ℕ × K\nH1 : EqvGen (R K p) x y\nH2 : EqvGen (R K p) y z\nih1 : ∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\nih2 : ∃ z_1, (↑(frobenius K p))^[z.fst + z_1] y.snd = (↑(frobenius K p))^[y.fst + z_1] z.snd\n⊢ ∃ z_1, (↑(frobenius K p))^[z.fst + z_1] x.snd = (↑(frobenius K p))^[x.fst + z_1] z.snd\n[PROOFSTEP]\ncase trans x y z H1 H2 ih1 ih2 =>\n  cases' ih1 with z1 ih1\n  cases' ih2 with z2 ih2\n  exists z2 + (y.1 + z1)\n  rw [← add_assoc, iterate_add_apply, ih1]\n  rw [← iterate_add_apply, add_comm, iterate_add_apply, ih2]\n  rw [← iterate_add_apply]\n  simp only [add_comm, add_left_comm]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y z : ℕ × K\nH1 : EqvGen (R K p) x y\nH2 : EqvGen (R K p) y z\nih1 : ∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\nih2 : ∃ z_1, (↑(frobenius K p))^[z.fst + z_1] y.snd = (↑(frobenius K p))^[y.fst + z_1] z.snd\n⊢ ∃ z_1, (↑(frobenius K p))^[z.fst + z_1] x.snd = (↑(frobenius K p))^[x.fst + z_1] z.snd\n[PROOFSTEP]\ncases' ih1 with z1 ih1\n[GOAL]\ncase intro\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y z : ℕ × K\nH1 : EqvGen (R K p) x y\nH2 : EqvGen (R K p) y z\nih2 : ∃ z_1, (↑(frobenius K p))^[z.fst + z_1] y.snd = (↑(frobenius K p))^[y.fst + z_1] z.snd\nz1 : ℕ\nih1 : (↑(frobenius K p))^[y.fst + z1] x.snd = (↑(frobenius K p))^[x.fst + z1] y.snd\n⊢ ∃ z_1, (↑(frobenius K p))^[z.fst + z_1] x.snd = (↑(frobenius K p))^[x.fst + z_1] z.snd\n[PROOFSTEP]\ncases' ih2 with z2 ih2\n[GOAL]\ncase intro.intro\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y z : ℕ × K\nH1 : EqvGen (R K p) x y\nH2 : EqvGen (R K p) y z\nz1 : ℕ\nih1 : (↑(frobenius K p))^[y.fst + z1] x.snd = (↑(frobenius K p))^[x.fst + z1] y.snd\nz2 : ℕ\nih2 : (↑(frobenius K p))^[z.fst + z2] y.snd = (↑(frobenius K p))^[y.fst + z2] z.snd\n⊢ ∃ z_1, (↑(frobenius K p))^[z.fst + z_1] x.snd = (↑(frobenius K p))^[x.fst + z_1] z.snd\n[PROOFSTEP]\nexists z2 + (y.1 + z1)\n[GOAL]\ncase intro.intro\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y z : ℕ × K\nH1 : EqvGen (R K p) x y\nH2 : EqvGen (R K p) y z\nz1 : ℕ\nih1 : (↑(frobenius K p))^[y.fst + z1] x.snd = (↑(frobenius K p))^[x.fst + z1] y.snd\nz2 : ℕ\nih2 : (↑(frobenius K p))^[z.fst + z2] y.snd = (↑(frobenius K p))^[y.fst + z2] z.snd\n⊢ (↑(frobenius K p))^[z.fst + (z2 + (y.fst + z1))] x.snd = (↑(frobenius K p))^[x.fst + (z2 + (y.fst + z1))] z.snd\n[PROOFSTEP]\nrw [← add_assoc, iterate_add_apply, ih1]\n[GOAL]\ncase intro.intro\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y z : ℕ × K\nH1 : EqvGen (R K p) x y\nH2 : EqvGen (R K p) y z\nz1 : ℕ\nih1 : (↑(frobenius K p))^[y.fst + z1] x.snd = (↑(frobenius K p))^[x.fst + z1] y.snd\nz2 : ℕ\nih2 : (↑(frobenius K p))^[z.fst + z2] y.snd = (↑(frobenius K p))^[y.fst + z2] z.snd\n⊢ (↑(frobenius K p))^[z.fst + z2] ((↑(frobenius K p))^[x.fst + z1] y.snd) =\n    (↑(frobenius K p))^[x.fst + (z2 + (y.fst + z1))] z.snd\n[PROOFSTEP]\nrw [← iterate_add_apply, add_comm, iterate_add_apply, ih2]\n[GOAL]\ncase intro.intro\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y z : ℕ × K\nH1 : EqvGen (R K p) x y\nH2 : EqvGen (R K p) y z\nz1 : ℕ\nih1 : (↑(frobenius K p))^[y.fst + z1] x.snd = (↑(frobenius K p))^[x.fst + z1] y.snd\nz2 : ℕ\nih2 : (↑(frobenius K p))^[z.fst + z2] y.snd = (↑(frobenius K p))^[y.fst + z2] z.snd\n⊢ (↑(frobenius K p))^[x.fst + z1] ((↑(frobenius K p))^[y.fst + z2] z.snd) =\n    (↑(frobenius K p))^[x.fst + (z2 + (y.fst + z1))] z.snd\n[PROOFSTEP]\nrw [← iterate_add_apply]\n[GOAL]\ncase intro.intro\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y✝ x y z : ℕ × K\nH1 : EqvGen (R K p) x y\nH2 : EqvGen (R K p) y z\nz1 : ℕ\nih1 : (↑(frobenius K p))^[y.fst + z1] x.snd = (↑(frobenius K p))^[x.fst + z1] y.snd\nz2 : ℕ\nih2 : (↑(frobenius K p))^[z.fst + z2] y.snd = (↑(frobenius K p))^[y.fst + z2] z.snd\n⊢ (↑(frobenius K p))^[x.fst + z1 + (y.fst + z2)] z.snd = (↑(frobenius K p))^[x.fst + (z2 + (y.fst + z1))] z.snd\n[PROOFSTEP]\nsimp only [add_comm, add_left_comm]\n[GOAL]\ncase mpr\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ × K\n⊢ (∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd) → mk K p x = mk K p y\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ × K\nH : ∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\n⊢ mk K p x = mk K p y\n[PROOFSTEP]\ncases' x with m x\n[GOAL]\ncase mpr.mk\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\ny : ℕ × K\nm : ℕ\nx : K\nH : ∃ z, (↑(frobenius K p))^[y.fst + z] (m, x).snd = (↑(frobenius K p))^[(m, x).fst + z] y.snd\n⊢ mk K p (m, x) = mk K p y\n[PROOFSTEP]\ncases' y with n y\n[GOAL]\ncase mpr.mk.mk\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nm : ℕ\nx : K\nn : ℕ\ny : K\nH : ∃ z, (↑(frobenius K p))^[(n, y).fst + z] (m, x).snd = (↑(frobenius K p))^[(m, x).fst + z] (n, y).snd\n⊢ mk K p (m, x) = mk K p (n, y)\n[PROOFSTEP]\ncases' H with z H\n[GOAL]\ncase mpr.mk.mk.intro\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nm : ℕ\nx : K\nn : ℕ\ny : K\nz : ℕ\nH : (↑(frobenius K p))^[(n, y).fst + z] (m, x).snd = (↑(frobenius K p))^[(m, x).fst + z] (n, y).snd\n⊢ mk K p (m, x) = mk K p (n, y)\n[PROOFSTEP]\ndsimp only at H \n[GOAL]\ncase mpr.mk.mk.intro\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nm : ℕ\nx : K\nn : ℕ\ny : K\nz : ℕ\nH : (↑(frobenius K p))^[n + z] x = (↑(frobenius K p))^[m + z] y\n⊢ mk K p (m, x) = mk K p (n, y)\n[PROOFSTEP]\nrw [R.sound K p (n + z) m x _ rfl, R.sound K p (m + z) n y _ rfl, H]\n[GOAL]\ncase mpr.mk.mk.intro\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nm : ℕ\nx : K\nn : ℕ\ny : K\nz : ℕ\nH : (↑(frobenius K p))^[n + z] x = (↑(frobenius K p))^[m + z] y\n⊢ mk K p (n + z + m, (↑(frobenius K p))^[m + z] y) = mk K p (m + z + n, (↑(frobenius K p))^[m + z] y)\n[PROOFSTEP]\nrw [add_assoc, add_comm, add_comm z]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn x : ℕ\n⊢ ↑x = mk K p (n, ↑x)\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx : ℕ\n⊢ ↑x = mk K p (Nat.zero, ↑x)\n[PROOFSTEP]\ninduction' x with x ih\n[GOAL]\ncase zero.zero\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\n⊢ ↑Nat.zero = mk K p (Nat.zero, ↑Nat.zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase zero.succ\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx : ℕ\nih : ↑x = mk K p (Nat.zero, ↑x)\n⊢ ↑(Nat.succ x) = mk K p (Nat.zero, ↑(Nat.succ x))\n[PROOFSTEP]\nrw [Nat.cast_succ, Nat.cast_succ, ih]\n[GOAL]\ncase zero.succ\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx : ℕ\nih : ↑x = mk K p (Nat.zero, ↑x)\n⊢ mk K p (Nat.zero, ↑x) + 1 = mk K p (Nat.zero, ↑x + 1)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx n : ℕ\nih : ↑x = mk K p (n, ↑x)\n⊢ ↑x = mk K p (Nat.succ n, ↑x)\n[PROOFSTEP]\nrw [ih]\n[GOAL]\ncase succ\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx n : ℕ\nih : ↑x = mk K p (n, ↑x)\n⊢ mk K p (n, ↑x) = mk K p (Nat.succ n, ↑x)\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase succ.a\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx n : ℕ\nih : ↑x = mk K p (n, ↑x)\n⊢ R K p (n, ↑x) (Nat.succ n, ↑x)\n[PROOFSTEP]\nsuffices R K p (n, (x : K)) (Nat.succ n, frobenius K p (x : K)) by rwa [frobenius_nat_cast K p x] at this \n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx n : ℕ\nih : ↑x = mk K p (n, ↑x)\nthis : R K p (n, ↑x) (Nat.succ n, ↑(frobenius K p) ↑x)\n⊢ R K p (n, ↑x) (Nat.succ n, ↑x)\n[PROOFSTEP]\nrwa [frobenius_nat_cast K p x] at this \n[GOAL]\ncase succ.a\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx n : ℕ\nih : ↑x = mk K p (n, ↑x)\n⊢ R K p (n, ↑x) (Nat.succ n, ↑(frobenius K p) ↑x)\n[PROOFSTEP]\napply R.intro\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx : ℤ\n⊢ ↑x = mk K p (0, ↑x)\n[PROOFSTEP]\ninduction x\n[GOAL]\ncase ofNat\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\na✝ : ℕ\n⊢ ↑(Int.ofNat a✝) = mk K p (0, ↑(Int.ofNat a✝))\n[PROOFSTEP]\nsimp only [Int.ofNat_eq_coe, Int.cast_ofNat, Int.cast_negSucc, nat_cast K p 0]\n[GOAL]\ncase negSucc\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\na✝ : ℕ\n⊢ ↑(Int.negSucc a✝) = mk K p (0, ↑(Int.negSucc a✝))\n[PROOFSTEP]\nsimp only [Int.ofNat_eq_coe, Int.cast_ofNat, Int.cast_negSucc, nat_cast K p 0]\n[GOAL]\ncase negSucc\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\na✝ : ℕ\n⊢ -mk K p (0, ↑(a✝ + 1)) = mk K p (0, -↑(a✝ + 1))\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ\n⊢ ↑x = ↑y ↔ ↑x = ↑y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ\n⊢ ↑x = ↑y → ↑x = ↑y\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ\n⊢ ↑x = ↑y → ↑x = ↑y\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ\nH : ↑x = ↑y\n⊢ ↑x = ↑y\n[PROOFSTEP]\nrw [nat_cast K p 0, nat_cast K p 0, eq_iff'] at H \n[GOAL]\ncase mp\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ\nH : ∃ z, (↑(frobenius K p))^[(0, ↑y).fst + z] (0, ↑x).snd = (↑(frobenius K p))^[(0, ↑x).fst + z] (0, ↑y).snd\n⊢ ↑x = ↑y\n[PROOFSTEP]\ncases' H with z H\n[GOAL]\ncase mp.intro\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y z : ℕ\nH : (↑(frobenius K p))^[(0, ↑y).fst + z] (0, ↑x).snd = (↑(frobenius K p))^[(0, ↑x).fst + z] (0, ↑y).snd\n⊢ ↑x = ↑y\n[PROOFSTEP]\nsimpa only [zero_add, iterate_fixed (frobenius_nat_cast K p _)] using H\n[GOAL]\ncase mpr\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ\nH : ↑x = ↑y\n⊢ ↑x = ↑y\n[PROOFSTEP]\nrw [nat_cast K p 0, nat_cast K p 0, H]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\n⊢ CharP (PerfectClosure K p) p\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cast_eq_zero_iff'\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\n⊢ ∀ (x : ℕ), ↑x = 0 ↔ p ∣ x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase cast_eq_zero_iff'\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx : ℕ\n⊢ ↑x = 0 ↔ p ∣ x\n[PROOFSTEP]\nrw [← CharP.cast_eq_zero_iff K]\n[GOAL]\ncase cast_eq_zero_iff'\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx : ℕ\n⊢ ↑x = 0 ↔ ↑x = 0\n[PROOFSTEP]\nrw [← Nat.cast_zero, nat_cast_eq_iff, Nat.cast_zero]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx : ℕ × K\n⊢ ↑(frobenius (PerfectClosure K p) p) (mk K p x) = mk K p (x.fst, x.snd ^ p)\n[PROOFSTEP]\nsimp only [frobenius_def]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx : ℕ × K\n⊢ mk K p x ^ p = mk K p (x.fst, x.snd ^ p)\n[PROOFSTEP]\ncases' x with n x\n[GOAL]\ncase mk\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\n⊢ mk K p (n, x) ^ p = mk K p ((n, x).fst, (n, x).snd ^ p)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\n⊢ mk K p (n, x) ^ p = mk K p (n, x ^ p)\n[PROOFSTEP]\nsuffices ∀ p' : ℕ, mk K p (n, x) ^ p' = mk K p (n, x ^ p') by apply this\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\nthis : ∀ (p' : ℕ), mk K p (n, x) ^ p' = mk K p (n, x ^ p')\n⊢ mk K p (n, x) ^ p = mk K p (n, x ^ p)\n[PROOFSTEP]\napply this\n[GOAL]\ncase mk\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\n⊢ ∀ (p' : ℕ), mk K p (n, x) ^ p' = mk K p (n, x ^ p')\n[PROOFSTEP]\nintro p\n[GOAL]\ncase mk\nK : Type u\ninst✝² : CommRing K\np✝ : ℕ\ninst✝¹ : Fact (Nat.Prime p✝)\ninst✝ : CharP K p✝\nn : ℕ\nx : K\np : ℕ\n⊢ mk K p✝ (n, x) ^ p = mk K p✝ (n, x ^ p)\n[PROOFSTEP]\ninduction' p with p ih\n[GOAL]\ncase mk.zero\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\n⊢ mk K p (n, x) ^ Nat.zero = mk K p (n, x ^ Nat.zero)\ncase mk.succ\nK : Type u\ninst✝² : CommRing K\np✝ : ℕ\ninst✝¹ : Fact (Nat.Prime p✝)\ninst✝ : CharP K p✝\nn : ℕ\nx : K\np : ℕ\nih : mk K p✝ (n, x) ^ p = mk K p✝ (n, x ^ p)\n⊢ mk K p✝ (n, x) ^ Nat.succ p = mk K p✝ (n, x ^ Nat.succ p)\n[PROOFSTEP]\ncase zero => apply R.sound; rw [(frobenius _ _).iterate_map_one, pow_zero]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\n⊢ mk K p (n, x) ^ Nat.zero = mk K p (n, x ^ Nat.zero)\n[PROOFSTEP]\ncase zero => apply R.sound; rw [(frobenius _ _).iterate_map_one, pow_zero]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\n⊢ mk K p (n, x) ^ Nat.zero = mk K p (n, x ^ Nat.zero)\n[PROOFSTEP]\napply R.sound\n[GOAL]\ncase H\nK : Type u\ninst✝² : CommRing K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\n⊢ (↑(frobenius K p))^[n] 1 = x ^ Nat.zero\n[PROOFSTEP]\nrw [(frobenius _ _).iterate_map_one, pow_zero]\n[GOAL]\ncase mk.succ\nK : Type u\ninst✝² : CommRing K\np✝ : ℕ\ninst✝¹ : Fact (Nat.Prime p✝)\ninst✝ : CharP K p✝\nn : ℕ\nx : K\np : ℕ\nih : mk K p✝ (n, x) ^ p = mk K p✝ (n, x ^ p)\n⊢ mk K p✝ (n, x) ^ Nat.succ p = mk K p✝ (n, x ^ Nat.succ p)\n[PROOFSTEP]\ncase succ =>\n  rw [pow_succ, ih]\n  symm\n  apply R.sound\n  simp only [pow_succ, iterate_map_mul]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np✝ : ℕ\ninst✝¹ : Fact (Nat.Prime p✝)\ninst✝ : CharP K p✝\nn : ℕ\nx : K\np : ℕ\nih : mk K p✝ (n, x) ^ p = mk K p✝ (n, x ^ p)\n⊢ mk K p✝ (n, x) ^ Nat.succ p = mk K p✝ (n, x ^ Nat.succ p)\n[PROOFSTEP]\ncase succ =>\n  rw [pow_succ, ih]\n  symm\n  apply R.sound\n  simp only [pow_succ, iterate_map_mul]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np✝ : ℕ\ninst✝¹ : Fact (Nat.Prime p✝)\ninst✝ : CharP K p✝\nn : ℕ\nx : K\np : ℕ\nih : mk K p✝ (n, x) ^ p = mk K p✝ (n, x ^ p)\n⊢ mk K p✝ (n, x) ^ Nat.succ p = mk K p✝ (n, x ^ Nat.succ p)\n[PROOFSTEP]\nrw [pow_succ, ih]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np✝ : ℕ\ninst✝¹ : Fact (Nat.Prime p✝)\ninst✝ : CharP K p✝\nn : ℕ\nx : K\np : ℕ\nih : mk K p✝ (n, x) ^ p = mk K p✝ (n, x ^ p)\n⊢ mk K p✝ (n, x) * mk K p✝ (n, x ^ p) = mk K p✝ (n, x ^ Nat.succ p)\n[PROOFSTEP]\nsymm\n[GOAL]\nK : Type u\ninst✝² : CommRing K\np✝ : ℕ\ninst✝¹ : Fact (Nat.Prime p✝)\ninst✝ : CharP K p✝\nn : ℕ\nx : K\np : ℕ\nih : mk K p✝ (n, x) ^ p = mk K p✝ (n, x ^ p)\n⊢ mk K p✝ (n, x ^ Nat.succ p) = mk K p✝ (n, x) * mk K p✝ (n, x ^ p)\n[PROOFSTEP]\napply R.sound\n[GOAL]\ncase H\nK : Type u\ninst✝² : CommRing K\np✝ : ℕ\ninst✝¹ : Fact (Nat.Prime p✝)\ninst✝ : CharP K p✝\nn : ℕ\nx : K\np : ℕ\nih : mk K p✝ (n, x) ^ p = mk K p✝ (n, x ^ p)\n⊢ (↑(frobenius K p✝))^[(n, x).fst] (x ^ Nat.succ p) =\n    (↑(frobenius K p✝))^[(n, x ^ p).fst] (n, x).snd * (↑(frobenius K p✝))^[(n, x).fst] (n, x ^ p).snd\n[PROOFSTEP]\nsimp only [pow_succ, iterate_map_mul]\n[GOAL]\nK : Type u\ninst✝³ : CommRing K\ninst✝² : IsReduced K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx y : ℕ × K\nx✝ : ∃ z, (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\nz : ℕ\nH : (↑(frobenius K p))^[y.fst + z] x.snd = (↑(frobenius K p))^[x.fst + z] y.snd\n⊢ (↑(frobenius K p))^[z] ((↑(frobenius K p))^[y.fst] x.snd) = (↑(frobenius K p))^[z] ((↑(frobenius K p))^[x.fst] y.snd)\n[PROOFSTEP]\nsimpa only [add_comm, iterate_add] using H\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y : ℕ × K\nH : R K p x✝ y\nn : ℕ\nx : K\n⊢ R K p ((n, x).fst, (n, x).snd⁻¹) ((n + 1, ↑(frobenius K p) x).fst, (n + 1, ↑(frobenius K p) x).snd⁻¹)\n[PROOFSTEP]\nsimp only [frobenius_def]\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y : ℕ × K\nH : R K p x✝ y\nn : ℕ\nx : K\n⊢ R K p (n, x⁻¹) (n + 1, (x ^ p)⁻¹)\n[PROOFSTEP]\nrw [← inv_pow]\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx✝ y : ℕ × K\nH : R K p x✝ y\nn : ℕ\nx : K\n⊢ R K p (n, x⁻¹) (n + 1, x⁻¹ ^ p)\n[PROOFSTEP]\napply R.intro\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝ : Inv (PerfectClosure K p) := inferInstance\ne : PerfectClosure K p\nx✝ : ℕ × K\nm : ℕ\nx : K\nH : mk K p (m, x) ≠ 0\n⊢ mk K p (m, x) * (mk K p (m, x))⁻¹ = 1\n[PROOFSTEP]\nhave := mt (eq_iff _ _ _ _).2 H\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝ : Inv (PerfectClosure K p) := inferInstance\ne : PerfectClosure K p\nx✝ : ℕ × K\nm : ℕ\nx : K\nH : mk K p (m, x) ≠ 0\nthis : ¬(↑(frobenius K p))^[(0, 0).fst] (m, x).snd = (↑(frobenius K p))^[(m, x).fst] (0, 0).snd\n⊢ mk K p (m, x) * (mk K p (m, x))⁻¹ = 1\n[PROOFSTEP]\nrw [mk_inv, mk_mul_mk]\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝ : Inv (PerfectClosure K p) := inferInstance\ne : PerfectClosure K p\nx✝ : ℕ × K\nm : ℕ\nx : K\nH : mk K p (m, x) ≠ 0\nthis : ¬(↑(frobenius K p))^[(0, 0).fst] (m, x).snd = (↑(frobenius K p))^[(m, x).fst] (0, 0).snd\n⊢ mk K p\n      ((m, x).fst + ((m, x).fst, (m, x).snd⁻¹).fst,\n        (↑(frobenius K p))^[((m, x).fst, (m, x).snd⁻¹).fst] (m, x).snd *\n          (↑(frobenius K p))^[(m, x).fst] ((m, x).fst, (m, x).snd⁻¹).snd) =\n    1\n[PROOFSTEP]\nrefine (eq_iff K p _ _).2 ?_\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝ : Inv (PerfectClosure K p) := inferInstance\ne : PerfectClosure K p\nx✝ : ℕ × K\nm : ℕ\nx : K\nH : mk K p (m, x) ≠ 0\nthis : ¬(↑(frobenius K p))^[(0, 0).fst] (m, x).snd = (↑(frobenius K p))^[(m, x).fst] (0, 0).snd\n⊢ (↑(frobenius K p))^[(0, 1).fst]\n      ((m, x).fst + ((m, x).fst, (m, x).snd⁻¹).fst,\n          (↑(frobenius K p))^[((m, x).fst, (m, x).snd⁻¹).fst] (m, x).snd *\n            (↑(frobenius K p))^[(m, x).fst] ((m, x).fst, (m, x).snd⁻¹).snd).snd =\n    (↑(frobenius K\n            p))^[((m, x).fst + ((m, x).fst, (m, x).snd⁻¹).fst,\n            (↑(frobenius K p))^[((m, x).fst, (m, x).snd⁻¹).fst] (m, x).snd *\n              (↑(frobenius K p))^[(m, x).fst] ((m, x).fst, (m, x).snd⁻¹).snd).fst]\n      (0, 1).snd\n[PROOFSTEP]\nsimp only [(frobenius _ _).iterate_map_one, (frobenius K p).iterate_map_zero, iterate_zero_apply, ← iterate_map_mul] at\n  this ⊢\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝ : Inv (PerfectClosure K p) := inferInstance\ne : PerfectClosure K p\nx✝ : ℕ × K\nm : ℕ\nx : K\nH : mk K p (m, x) ≠ 0\nthis : ¬x = 0\n⊢ (↑(frobenius K p))^[m] (x * x⁻¹) = 1\n[PROOFSTEP]\nrw [mul_inv_cancel this, (frobenius _ _).iterate_map_one]\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nsrc✝ : Inv (PerfectClosure K p) := inferInstance\n⊢ ((0, 0).fst, (0, 0).snd⁻¹) = (0, 0)\n[PROOFSTEP]\nrw [inv_zero]\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\n⊢ Bijective ↑(frobenius (PerfectClosure K p) p)\n[PROOFSTEP]\nlet f : PerfectClosure K p → PerfectClosure K p := fun e ↦\n  liftOn e (fun x => mk K p (x.1 + 1, x.2)) fun x y H =>\n    match x, y, H with\n    | _, _, R.intro n x => Quot.sound (R.intro _ _)\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nf : PerfectClosure K p → PerfectClosure K p :=\n  fun e =>\n    liftOn e (fun x => mk K p (x.fst + 1, x.snd))\n      (_ : ∀ (x y : ℕ × K), R K p x y → (fun x => mk K p (x.fst + 1, x.snd)) x = (fun x => mk K p (x.fst + 1, x.snd)) y)\n⊢ Bijective ↑(frobenius (PerfectClosure K p) p)\n[PROOFSTEP]\nhave hl : LeftInverse f (frobenius (PerfectClosure K p) p) := fun e ↦\n  induction_on e fun ⟨n, x⟩ => by\n    simp only [liftOn_mk, frobenius_mk]\n    exact (Quot.sound <| R.intro _ _).symm\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nf : PerfectClosure K p → PerfectClosure K p :=\n  fun e =>\n    liftOn e (fun x => mk K p (x.fst + 1, x.snd))\n      (_ : ∀ (x y : ℕ × K), R K p x y → (fun x => mk K p (x.fst + 1, x.snd)) x = (fun x => mk K p (x.fst + 1, x.snd)) y)\ne : PerfectClosure K p\nx✝ : ℕ × K\nn : ℕ\nx : K\n⊢ f (↑(frobenius (PerfectClosure K p) p) (mk K p (n, x))) = mk K p (n, x)\n[PROOFSTEP]\nsimp only [liftOn_mk, frobenius_mk]\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nf : PerfectClosure K p → PerfectClosure K p :=\n  fun e =>\n    liftOn e (fun x => mk K p (x.fst + 1, x.snd))\n      (_ : ∀ (x y : ℕ × K), R K p x y → (fun x => mk K p (x.fst + 1, x.snd)) x = (fun x => mk K p (x.fst + 1, x.snd)) y)\ne : PerfectClosure K p\nx✝ : ℕ × K\nn : ℕ\nx : K\n⊢ mk K p (n + 1, x ^ p) = mk K p (n, x)\n[PROOFSTEP]\nexact (Quot.sound <| R.intro _ _).symm\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nf : PerfectClosure K p → PerfectClosure K p :=\n  fun e =>\n    liftOn e (fun x => mk K p (x.fst + 1, x.snd))\n      (_ : ∀ (x y : ℕ × K), R K p x y → (fun x => mk K p (x.fst + 1, x.snd)) x = (fun x => mk K p (x.fst + 1, x.snd)) y)\nhl : LeftInverse f ↑(frobenius (PerfectClosure K p) p)\n⊢ Bijective ↑(frobenius (PerfectClosure K p) p)\n[PROOFSTEP]\nhave hr : RightInverse f (frobenius (PerfectClosure K p) p) := fun e ↦\n  induction_on e fun ⟨n, x⟩ => by\n    simp only [liftOn_mk, frobenius_mk]\n    exact (Quot.sound <| R.intro _ _).symm\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nf : PerfectClosure K p → PerfectClosure K p :=\n  fun e =>\n    liftOn e (fun x => mk K p (x.fst + 1, x.snd))\n      (_ : ∀ (x y : ℕ × K), R K p x y → (fun x => mk K p (x.fst + 1, x.snd)) x = (fun x => mk K p (x.fst + 1, x.snd)) y)\nhl : LeftInverse f ↑(frobenius (PerfectClosure K p) p)\ne : PerfectClosure K p\nx✝ : ℕ × K\nn : ℕ\nx : K\n⊢ ↑(frobenius (PerfectClosure K p) p) (f (mk K p (n, x))) = mk K p (n, x)\n[PROOFSTEP]\nsimp only [liftOn_mk, frobenius_mk]\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nf : PerfectClosure K p → PerfectClosure K p :=\n  fun e =>\n    liftOn e (fun x => mk K p (x.fst + 1, x.snd))\n      (_ : ∀ (x y : ℕ × K), R K p x y → (fun x => mk K p (x.fst + 1, x.snd)) x = (fun x => mk K p (x.fst + 1, x.snd)) y)\nhl : LeftInverse f ↑(frobenius (PerfectClosure K p) p)\ne : PerfectClosure K p\nx✝ : ℕ × K\nn : ℕ\nx : K\n⊢ mk K p (n + 1, x ^ p) = mk K p (n, x)\n[PROOFSTEP]\nexact (Quot.sound <| R.intro _ _).symm\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nf : PerfectClosure K p → PerfectClosure K p :=\n  fun e =>\n    liftOn e (fun x => mk K p (x.fst + 1, x.snd))\n      (_ : ∀ (x y : ℕ × K), R K p x y → (fun x => mk K p (x.fst + 1, x.snd)) x = (fun x => mk K p (x.fst + 1, x.snd)) y)\nhl : LeftInverse f ↑(frobenius (PerfectClosure K p) p)\nhr : Function.RightInverse f ↑(frobenius (PerfectClosure K p) p)\n⊢ Bijective ↑(frobenius (PerfectClosure K p) p)\n[PROOFSTEP]\nexact bijective_iff_has_inverse.mpr ⟨f, hl, hr⟩\n[GOAL]\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nn : ℕ\nx : K\n⊢ (↑(frobenius (PerfectClosure K p) p))^[n] (mk K p (n, x)) = ↑(of K p) x\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx : K\n⊢ (↑(frobenius (PerfectClosure K p) p))^[Nat.zero] (mk K p (Nat.zero, x)) = ↑(of K p) x\ncase succ\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx : K\nn : ℕ\nih : (↑(frobenius (PerfectClosure K p) p))^[n] (mk K p (n, x)) = ↑(of K p) x\n⊢ (↑(frobenius (PerfectClosure K p) p))^[Nat.succ n] (mk K p (Nat.succ n, x)) = ↑(of K p) x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nK : Type u\ninst✝² : Field K\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP K p\nx : K\nn : ℕ\nih : (↑(frobenius (PerfectClosure K p) p))^[n] (mk K p (n, x)) = ↑(of K p) x\n⊢ (↑(frobenius (PerfectClosure K p) p))^[Nat.succ n] (mk K p (Nat.succ n, x)) = ↑(of K p) x\n[PROOFSTEP]\nrw [iterate_succ_apply, ← ih, frobenius_mk, mk_succ_pow]\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\n⊢ PerfectClosure K p → L\n[PROOFSTEP]\nrefine' fun e => liftOn e (fun x => (frobeniusEquiv L p).symm^[x.1] (f x.2)) _\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\ne : PerfectClosure K p\n⊢ ∀ (x y : ℕ × K),\n    R K p x y →\n      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y\n[PROOFSTEP]\nrintro - - ⟨n, x⟩\n[GOAL]\ncase intro\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\ne : PerfectClosure K p\nn : ℕ\nx : K\n⊢ (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) (n, x) =\n    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) (n + 1, ↑(frobenius K p) x)\n[PROOFSTEP]\nsimp [f.map_frobenius]\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\n⊢ ∀ (x y : PerfectClosure K p),\n    OneHom.toFun\n        {\n          toFun := fun e =>\n            liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n              (_ :\n                ∀ (x y : ℕ × K),\n                  R K p x y →\n                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n          map_one' := (_ : ↑f 1 = 1) }\n        (x * y) =\n      OneHom.toFun\n          {\n            toFun := fun e =>\n              liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                (_ :\n                  ∀ (x y : ℕ × K),\n                    R K p x y →\n                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n            map_one' := (_ : ↑f 1 = 1) }\n          x *\n        OneHom.toFun\n          {\n            toFun := fun e =>\n              liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                (_ :\n                  ∀ (x y : ℕ × K),\n                    R K p x y →\n                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n            map_one' := (_ : ↑f 1 = 1) }\n          y\n[PROOFSTEP]\nrintro ⟨n, x⟩ ⟨m, y⟩\n[GOAL]\ncase mk.mk.mk.mk\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\nx✝ : PerfectClosure K p\nn : ℕ\nx : K\ny✝ : PerfectClosure K p\nm : ℕ\ny : K\n⊢ OneHom.toFun\n      {\n        toFun := fun e =>\n          liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n            (_ :\n              ∀ (x y : ℕ × K),\n                R K p x y →\n                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n        map_one' := (_ : ↑f 1 = 1) }\n      (Quot.mk (R K p) (n, x) * Quot.mk (R K p) (m, y)) =\n    OneHom.toFun\n        {\n          toFun := fun e =>\n            liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n              (_ :\n                ∀ (x y : ℕ × K),\n                  R K p x y →\n                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n          map_one' := (_ : ↑f 1 = 1) }\n        (Quot.mk (R K p) (n, x)) *\n      OneHom.toFun\n        {\n          toFun := fun e =>\n            liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n              (_ :\n                ∀ (x y : ℕ × K),\n                  R K p x y →\n                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n          map_one' := (_ : ↑f 1 = 1) }\n        (Quot.mk (R K p) (m, y))\n[PROOFSTEP]\nsimp only [quot_mk_eq_mk, liftOn_mk, f.map_iterate_frobenius, mk_mul_mk, map_mul, iterate_map_mul]\n[GOAL]\ncase mk.mk.mk.mk\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\nx✝ : PerfectClosure K p\nn : ℕ\nx : K\ny✝ : PerfectClosure K p\nm : ℕ\ny : K\n⊢ (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n + m] ((↑(frobenius L p))^[m] (↑f x)) *\n      (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n + m] ((↑(frobenius L p))^[n] (↑f y)) =\n    (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n] (↑f x) * (↑(RingEquiv.symm (frobeniusEquiv L p)))^[m] (↑f y)\n[PROOFSTEP]\nhave := LeftInverse.iterate (frobeniusEquiv_symm_apply_frobenius L p)\n[GOAL]\ncase mk.mk.mk.mk\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\nx✝ : PerfectClosure K p\nn : ℕ\nx : K\ny✝ : PerfectClosure K p\nm : ℕ\ny : K\nthis : ∀ (n : ℕ), LeftInverse (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n] (fun x => ↑(frobenius L p) x)^[n]\n⊢ (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n + m] ((↑(frobenius L p))^[m] (↑f x)) *\n      (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n + m] ((↑(frobenius L p))^[n] (↑f y)) =\n    (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n] (↑f x) * (↑(RingEquiv.symm (frobeniusEquiv L p)))^[m] (↑f y)\n[PROOFSTEP]\nrw [iterate_add_apply, this _ _, add_comm, iterate_add_apply, this _ _]\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\n⊢ ∀ (x y : PerfectClosure K p),\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              {\n                toFun := fun e =>\n                  liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                    (_ :\n                      ∀ (x y : ℕ × K),\n                        R K p x y →\n                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                map_one' := (_ : ↑f 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : PerfectClosure K p),\n                  OneHom.toFun\n                      {\n                        toFun := fun e =>\n                          liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                            (_ :\n                              ∀ (x y : ℕ × K),\n                                R K p x y →\n                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                        map_one' := (_ : ↑f 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        {\n                          toFun := fun e =>\n                            liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                              (_ :\n                                ∀ (x y : ℕ × K),\n                                  R K p x y →\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                          map_one' := (_ : ↑f 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        {\n                          toFun := fun e =>\n                            liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                              (_ :\n                                ∀ (x y : ℕ × K),\n                                  R K p x y →\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                          map_one' := (_ : ↑f 1 = 1) }\n                        y) })\n        (x + y) =\n      OneHom.toFun\n          (↑{\n              toOneHom :=\n                {\n                  toFun := fun e =>\n                    liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                      (_ :\n                        ∀ (x y : ℕ × K),\n                          R K p x y →\n                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                  map_one' := (_ : ↑f 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : PerfectClosure K p),\n                    OneHom.toFun\n                        {\n                          toFun := fun e =>\n                            liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                              (_ :\n                                ∀ (x y : ℕ × K),\n                                  R K p x y →\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                          map_one' := (_ : ↑f 1 = 1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun e =>\n                              liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                (_ :\n                                  ∀ (x y : ℕ × K),\n                                    R K p x y →\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                            map_one' := (_ : ↑f 1 = 1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun e =>\n                              liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                (_ :\n                                  ∀ (x y : ℕ × K),\n                                    R K p x y →\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                            map_one' := (_ : ↑f 1 = 1) }\n                          y) })\n          x +\n        OneHom.toFun\n          (↑{\n              toOneHom :=\n                {\n                  toFun := fun e =>\n                    liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                      (_ :\n                        ∀ (x y : ℕ × K),\n                          R K p x y →\n                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                  map_one' := (_ : ↑f 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : PerfectClosure K p),\n                    OneHom.toFun\n                        {\n                          toFun := fun e =>\n                            liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                              (_ :\n                                ∀ (x y : ℕ × K),\n                                  R K p x y →\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                          map_one' := (_ : ↑f 1 = 1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun e =>\n                              liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                (_ :\n                                  ∀ (x y : ℕ × K),\n                                    R K p x y →\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                            map_one' := (_ : ↑f 1 = 1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun e =>\n                              liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                (_ :\n                                  ∀ (x y : ℕ × K),\n                                    R K p x y →\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                            map_one' := (_ : ↑f 1 = 1) }\n                          y) })\n          y\n[PROOFSTEP]\nrintro ⟨n, x⟩ ⟨m, y⟩\n[GOAL]\ncase mk.mk.mk.mk\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\nx✝ : PerfectClosure K p\nn : ℕ\nx : K\ny✝ : PerfectClosure K p\nm : ℕ\ny : K\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            {\n              toFun := fun e =>\n                liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                  (_ :\n                    ∀ (x y : ℕ × K),\n                      R K p x y →\n                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n              map_one' := (_ : ↑f 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : PerfectClosure K p),\n                OneHom.toFun\n                    {\n                      toFun := fun e =>\n                        liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                          (_ :\n                            ∀ (x y : ℕ × K),\n                              R K p x y →\n                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                      map_one' := (_ : ↑f 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      {\n                        toFun := fun e =>\n                          liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                            (_ :\n                              ∀ (x y : ℕ × K),\n                                R K p x y →\n                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                        map_one' := (_ : ↑f 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      {\n                        toFun := fun e =>\n                          liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                            (_ :\n                              ∀ (x y : ℕ × K),\n                                R K p x y →\n                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                        map_one' := (_ : ↑f 1 = 1) }\n                      y) })\n      (Quot.mk (R K p) (n, x) + Quot.mk (R K p) (m, y)) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              {\n                toFun := fun e =>\n                  liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                    (_ :\n                      ∀ (x y : ℕ × K),\n                        R K p x y →\n                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                map_one' := (_ : ↑f 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : PerfectClosure K p),\n                  OneHom.toFun\n                      {\n                        toFun := fun e =>\n                          liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                            (_ :\n                              ∀ (x y : ℕ × K),\n                                R K p x y →\n                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                        map_one' := (_ : ↑f 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        {\n                          toFun := fun e =>\n                            liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                              (_ :\n                                ∀ (x y : ℕ × K),\n                                  R K p x y →\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                          map_one' := (_ : ↑f 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        {\n                          toFun := fun e =>\n                            liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                              (_ :\n                                ∀ (x y : ℕ × K),\n                                  R K p x y →\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                          map_one' := (_ : ↑f 1 = 1) }\n                        y) })\n        (Quot.mk (R K p) (n, x)) +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              {\n                toFun := fun e =>\n                  liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                    (_ :\n                      ∀ (x y : ℕ × K),\n                        R K p x y →\n                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                map_one' := (_ : ↑f 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : PerfectClosure K p),\n                  OneHom.toFun\n                      {\n                        toFun := fun e =>\n                          liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                            (_ :\n                              ∀ (x y : ℕ × K),\n                                R K p x y →\n                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                        map_one' := (_ : ↑f 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        {\n                          toFun := fun e =>\n                            liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                              (_ :\n                                ∀ (x y : ℕ × K),\n                                  R K p x y →\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                          map_one' := (_ : ↑f 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        {\n                          toFun := fun e =>\n                            liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                              (_ :\n                                ∀ (x y : ℕ × K),\n                                  R K p x y →\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                          map_one' := (_ : ↑f 1 = 1) }\n                        y) })\n        (Quot.mk (R K p) (m, y))\n[PROOFSTEP]\nsimp only [quot_mk_eq_mk, liftOn_mk, f.map_iterate_frobenius, mk_add_mk, map_add, iterate_map_add]\n[GOAL]\ncase mk.mk.mk.mk\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\nx✝ : PerfectClosure K p\nn : ℕ\nx : K\ny✝ : PerfectClosure K p\nm : ℕ\ny : K\n⊢ (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n + m] ((↑(frobenius L p))^[m] (↑f x)) +\n      (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n + m] ((↑(frobenius L p))^[n] (↑f y)) =\n    (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n] (↑f x) + (↑(RingEquiv.symm (frobeniusEquiv L p)))^[m] (↑f y)\n[PROOFSTEP]\nhave := LeftInverse.iterate (frobeniusEquiv_symm_apply_frobenius L p)\n[GOAL]\ncase mk.mk.mk.mk\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\nx✝ : PerfectClosure K p\nn : ℕ\nx : K\ny✝ : PerfectClosure K p\nm : ℕ\ny : K\nthis : ∀ (n : ℕ), LeftInverse (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n] (fun x => ↑(frobenius L p) x)^[n]\n⊢ (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n + m] ((↑(frobenius L p))^[m] (↑f x)) +\n      (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n + m] ((↑(frobenius L p))^[n] (↑f y)) =\n    (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n] (↑f x) + (↑(RingEquiv.symm (frobeniusEquiv L p)))^[m] (↑f y)\n[PROOFSTEP]\nrw [iterate_add_apply, this _ _, add_comm n, iterate_add_apply, this _ _]\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\n⊢ (fun f => RingHom.comp f (of K p))\n      ((fun f =>\n          {\n            toMonoidHom :=\n              {\n                toOneHom :=\n                  {\n                    toFun := fun e =>\n                      liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                        (_ :\n                          ∀ (x y : ℕ × K),\n                            R K p x y →\n                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                    map_one' := (_ : ↑f 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : PerfectClosure K p),\n                      OneHom.toFun\n                          {\n                            toFun := fun e =>\n                              liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                (_ :\n                                  ∀ (x y : ℕ × K),\n                                    R K p x y →\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                            map_one' := (_ : ↑f 1 = 1) }\n                          (x * y) =\n                        OneHom.toFun\n                            {\n                              toFun := fun e =>\n                                liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                  (_ :\n                                    ∀ (x y : ℕ × K),\n                                      R K p x y →\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                              map_one' := (_ : ↑f 1 = 1) }\n                            x *\n                          OneHom.toFun\n                            {\n                              toFun := fun e =>\n                                liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                  (_ :\n                                    ∀ (x y : ℕ × K),\n                                      R K p x y →\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                              map_one' := (_ : ↑f 1 = 1) }\n                            y) },\n            map_zero' := (_ : ↑f 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : PerfectClosure K p),\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            {\n                              toFun := fun e =>\n                                liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                  (_ :\n                                    ∀ (x y : ℕ × K),\n                                      R K p x y →\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                              map_one' := (_ : ↑f 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (x y : PerfectClosure K p),\n                                OneHom.toFun\n                                    {\n                                      toFun := fun e =>\n                                        liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                          (_ :\n                                            ∀ (x y : ℕ × K),\n                                              R K p x y →\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                    x =\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                    y),\n                                      map_one' := (_ : ↑f 1 = 1) }\n                                    (x * y) =\n                                  OneHom.toFun\n                                      {\n                                        toFun := fun e =>\n                                          liftOn e\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                            (_ :\n                                              ∀ (x y : ℕ × K),\n                                                R K p x y →\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      x =\n                                                    (fun x =>\n                                                        (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      y),\n                                        map_one' := (_ : ↑f 1 = 1) }\n                                      x *\n                                    OneHom.toFun\n                                      {\n                                        toFun := fun e =>\n                                          liftOn e\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                            (_ :\n                                              ∀ (x y : ℕ × K),\n                                                R K p x y →\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      x =\n                                                    (fun x =>\n                                                        (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      y),\n                                        map_one' := (_ : ↑f 1 = 1) }\n                                      y) })\n                      (x + y) =\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              {\n                                toFun := fun e =>\n                                  liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                    (_ :\n                                      ∀ (x y : ℕ × K),\n                                        R K p x y →\n                                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                                map_one' := (_ : ↑f 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : PerfectClosure K p),\n                                  OneHom.toFun\n                                      {\n                                        toFun := fun e =>\n                                          liftOn e\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                            (_ :\n                                              ∀ (x y : ℕ × K),\n                                                R K p x y →\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      x =\n                                                    (fun x =>\n                                                        (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      y),\n                                        map_one' := (_ : ↑f 1 = 1) }\n                                      (x * y) =\n                                    OneHom.toFun\n                                        {\n                                          toFun := fun e =>\n                                            liftOn e\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                              (_ :\n                                                ∀ (x y : ℕ × K),\n                                                  R K p x y →\n                                                    (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        x =\n                                                      (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        y),\n                                          map_one' := (_ : ↑f 1 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        {\n                                          toFun := fun e =>\n                                            liftOn e\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                              (_ :\n                                                ∀ (x y : ℕ × K),\n                                                  R K p x y →\n                                                    (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        x =\n                                                      (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        y),\n                                          map_one' := (_ : ↑f 1 = 1) }\n                                        y) })\n                        x +\n                      OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              {\n                                toFun := fun e =>\n                                  liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                    (_ :\n                                      ∀ (x y : ℕ × K),\n                                        R K p x y →\n                                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                                map_one' := (_ : ↑f 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : PerfectClosure K p),\n                                  OneHom.toFun\n                                      {\n                                        toFun := fun e =>\n                                          liftOn e\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                            (_ :\n                                              ∀ (x y : ℕ × K),\n                                                R K p x y →\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      x =\n                                                    (fun x =>\n                                                        (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      y),\n                                        map_one' := (_ : ↑f 1 = 1) }\n                                      (x * y) =\n                                    OneHom.toFun\n                                        {\n                                          toFun := fun e =>\n                                            liftOn e\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                              (_ :\n                                                ∀ (x y : ℕ × K),\n                                                  R K p x y →\n                                                    (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        x =\n                                                      (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        y),\n                                          map_one' := (_ : ↑f 1 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        {\n                                          toFun := fun e =>\n                                            liftOn e\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                              (_ :\n                                                ∀ (x y : ℕ × K),\n                                                  R K p x y →\n                                                    (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        x =\n                                                      (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        y),\n                                          map_one' := (_ : ↑f 1 = 1) }\n                                        y) })\n                        y) })\n        f) =\n    f\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : K →+* L\nx : K\n⊢ ↑((fun f => RingHom.comp f (of K p))\n          ((fun f =>\n              {\n                toMonoidHom :=\n                  {\n                    toOneHom :=\n                      {\n                        toFun := fun e =>\n                          liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                            (_ :\n                              ∀ (x y : ℕ × K),\n                                R K p x y →\n                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                        map_one' := (_ : ↑f 1 = 1) },\n                    map_mul' :=\n                      (_ :\n                        ∀ (x y : PerfectClosure K p),\n                          OneHom.toFun\n                              {\n                                toFun := fun e =>\n                                  liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                    (_ :\n                                      ∀ (x y : ℕ × K),\n                                        R K p x y →\n                                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                                map_one' := (_ : ↑f 1 = 1) }\n                              (x * y) =\n                            OneHom.toFun\n                                {\n                                  toFun := fun e =>\n                                    liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                      (_ :\n                                        ∀ (x y : ℕ × K),\n                                          R K p x y →\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                                  map_one' := (_ : ↑f 1 = 1) }\n                                x *\n                              OneHom.toFun\n                                {\n                                  toFun := fun e =>\n                                    liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                      (_ :\n                                        ∀ (x y : ℕ × K),\n                                          R K p x y →\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                                  map_one' := (_ : ↑f 1 = 1) }\n                                y) },\n                map_zero' := (_ : ↑f 0 = 0),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : PerfectClosure K p),\n                      OneHom.toFun\n                          (↑{\n                              toOneHom :=\n                                {\n                                  toFun := fun e =>\n                                    liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                      (_ :\n                                        ∀ (x y : ℕ × K),\n                                          R K p x y →\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                                  map_one' := (_ : ↑f 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (x y : PerfectClosure K p),\n                                    OneHom.toFun\n                                        {\n                                          toFun := fun e =>\n                                            liftOn e\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                              (_ :\n                                                ∀ (x y : ℕ × K),\n                                                  R K p x y →\n                                                    (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        x =\n                                                      (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        y),\n                                          map_one' := (_ : ↑f 1 = 1) }\n                                        (x * y) =\n                                      OneHom.toFun\n                                          {\n                                            toFun := fun e =>\n                                              liftOn e\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                (_ :\n                                                  ∀ (x y : ℕ × K),\n                                                    R K p x y →\n                                                      (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          x =\n                                                        (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          y),\n                                            map_one' := (_ : ↑f 1 = 1) }\n                                          x *\n                                        OneHom.toFun\n                                          {\n                                            toFun := fun e =>\n                                              liftOn e\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                (_ :\n                                                  ∀ (x y : ℕ × K),\n                                                    R K p x y →\n                                                      (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          x =\n                                                        (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          y),\n                                            map_one' := (_ : ↑f 1 = 1) }\n                                          y) })\n                          (x + y) =\n                        OneHom.toFun\n                            (↑{\n                                toOneHom :=\n                                  {\n                                    toFun := fun e =>\n                                      liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                        (_ :\n                                          ∀ (x y : ℕ × K),\n                                            R K p x y →\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                  y),\n                                    map_one' := (_ : ↑f 1 = 1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (x y : PerfectClosure K p),\n                                      OneHom.toFun\n                                          {\n                                            toFun := fun e =>\n                                              liftOn e\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                (_ :\n                                                  ∀ (x y : ℕ × K),\n                                                    R K p x y →\n                                                      (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          x =\n                                                        (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          y),\n                                            map_one' := (_ : ↑f 1 = 1) }\n                                          (x * y) =\n                                        OneHom.toFun\n                                            {\n                                              toFun := fun e =>\n                                                liftOn e\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                  (_ :\n                                                    ∀ (x y : ℕ × K),\n                                                      R K p x y →\n                                                        (fun x =>\n                                                              (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst]\n                                                                (↑f x.snd))\n                                                            x =\n                                                          (fun x =>\n                                                              (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst]\n                                                                (↑f x.snd))\n                                                            y),\n                                              map_one' := (_ : ↑f 1 = 1) }\n                                            x *\n                                          OneHom.toFun\n                                            {\n                                              toFun := fun e =>\n                                                liftOn e\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                  (_ :\n                                                    ∀ (x y : ℕ × K),\n                                                      R K p x y →\n                                                        (fun x =>\n                                                              (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst]\n                                                                (↑f x.snd))\n                                                            x =\n                                                          (fun x =>\n                                                              (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst]\n                                                                (↑f x.snd))\n                                                            y),\n                                              map_one' := (_ : ↑f 1 = 1) }\n                                            y) })\n                            x +\n                          OneHom.toFun\n                            (↑{\n                                toOneHom :=\n                                  {\n                                    toFun := fun e =>\n                                      liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                        (_ :\n                                          ∀ (x y : ℕ × K),\n                                            R K p x y →\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                  y),\n                                    map_one' := (_ : ↑f 1 = 1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (x y : PerfectClosure K p),\n                                      OneHom.toFun\n                                          {\n                                            toFun := fun e =>\n                                              liftOn e\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                (_ :\n                                                  ∀ (x y : ℕ × K),\n                                                    R K p x y →\n                                                      (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          x =\n                                                        (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          y),\n                                            map_one' := (_ : ↑f 1 = 1) }\n                                          (x * y) =\n                                        OneHom.toFun\n                                            {\n                                              toFun := fun e =>\n                                                liftOn e\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                  (_ :\n                                                    ∀ (x y : ℕ × K),\n                                                      R K p x y →\n                                                        (fun x =>\n                                                              (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst]\n                                                                (↑f x.snd))\n                                                            x =\n                                                          (fun x =>\n                                                              (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst]\n                                                                (↑f x.snd))\n                                                            y),\n                                              map_one' := (_ : ↑f 1 = 1) }\n                                            x *\n                                          OneHom.toFun\n                                            {\n                                              toFun := fun e =>\n                                                liftOn e\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                  (_ :\n                                                    ∀ (x y : ℕ × K),\n                                                      R K p x y →\n                                                        (fun x =>\n                                                              (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst]\n                                                                (↑f x.snd))\n                                                            x =\n                                                          (fun x =>\n                                                              (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst]\n                                                                (↑f x.snd))\n                                                            y),\n                                              map_one' := (_ : ↑f 1 = 1) }\n                                            y) })\n                            y) })\n            f))\n      x =\n    ↑f x\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : PerfectClosure K p →+* L\n⊢ (fun f =>\n        {\n          toMonoidHom :=\n            {\n              toOneHom :=\n                {\n                  toFun := fun e =>\n                    liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                      (_ :\n                        ∀ (x y : ℕ × K),\n                          R K p x y →\n                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                  map_one' := (_ : ↑f 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : PerfectClosure K p),\n                    OneHom.toFun\n                        {\n                          toFun := fun e =>\n                            liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                              (_ :\n                                ∀ (x y : ℕ × K),\n                                  R K p x y →\n                                    (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                          map_one' := (_ : ↑f 1 = 1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun e =>\n                              liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                (_ :\n                                  ∀ (x y : ℕ × K),\n                                    R K p x y →\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                            map_one' := (_ : ↑f 1 = 1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun e =>\n                              liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                (_ :\n                                  ∀ (x y : ℕ × K),\n                                    R K p x y →\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                            map_one' := (_ : ↑f 1 = 1) }\n                          y) },\n          map_zero' := (_ : ↑f 0 = 0),\n          map_add' :=\n            (_ :\n              ∀ (x y : PerfectClosure K p),\n                OneHom.toFun\n                    (↑{\n                        toOneHom :=\n                          {\n                            toFun := fun e =>\n                              liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                (_ :\n                                  ∀ (x y : ℕ × K),\n                                    R K p x y →\n                                      (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                            map_one' := (_ : ↑f 1 = 1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (x y : PerfectClosure K p),\n                              OneHom.toFun\n                                  {\n                                    toFun := fun e =>\n                                      liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                        (_ :\n                                          ∀ (x y : ℕ × K),\n                                            R K p x y →\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                  y),\n                                    map_one' := (_ : ↑f 1 = 1) }\n                                  (x * y) =\n                                OneHom.toFun\n                                    {\n                                      toFun := fun e =>\n                                        liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                          (_ :\n                                            ∀ (x y : ℕ × K),\n                                              R K p x y →\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                    x =\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                    y),\n                                      map_one' := (_ : ↑f 1 = 1) }\n                                    x *\n                                  OneHom.toFun\n                                    {\n                                      toFun := fun e =>\n                                        liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                          (_ :\n                                            ∀ (x y : ℕ × K),\n                                              R K p x y →\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                    x =\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                    y),\n                                      map_one' := (_ : ↑f 1 = 1) }\n                                    y) })\n                    (x + y) =\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            {\n                              toFun := fun e =>\n                                liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                  (_ :\n                                    ∀ (x y : ℕ × K),\n                                      R K p x y →\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                              map_one' := (_ : ↑f 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (x y : PerfectClosure K p),\n                                OneHom.toFun\n                                    {\n                                      toFun := fun e =>\n                                        liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                          (_ :\n                                            ∀ (x y : ℕ × K),\n                                              R K p x y →\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                    x =\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                    y),\n                                      map_one' := (_ : ↑f 1 = 1) }\n                                    (x * y) =\n                                  OneHom.toFun\n                                      {\n                                        toFun := fun e =>\n                                          liftOn e\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                            (_ :\n                                              ∀ (x y : ℕ × K),\n                                                R K p x y →\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      x =\n                                                    (fun x =>\n                                                        (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      y),\n                                        map_one' := (_ : ↑f 1 = 1) }\n                                      x *\n                                    OneHom.toFun\n                                      {\n                                        toFun := fun e =>\n                                          liftOn e\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                            (_ :\n                                              ∀ (x y : ℕ × K),\n                                                R K p x y →\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      x =\n                                                    (fun x =>\n                                                        (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      y),\n                                        map_one' := (_ : ↑f 1 = 1) }\n                                      y) })\n                      x +\n                    OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            {\n                              toFun := fun e =>\n                                liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                  (_ :\n                                    ∀ (x y : ℕ × K),\n                                      R K p x y →\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                              map_one' := (_ : ↑f 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (x y : PerfectClosure K p),\n                                OneHom.toFun\n                                    {\n                                      toFun := fun e =>\n                                        liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                          (_ :\n                                            ∀ (x y : ℕ × K),\n                                              R K p x y →\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                    x =\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                    y),\n                                      map_one' := (_ : ↑f 1 = 1) }\n                                    (x * y) =\n                                  OneHom.toFun\n                                      {\n                                        toFun := fun e =>\n                                          liftOn e\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                            (_ :\n                                              ∀ (x y : ℕ × K),\n                                                R K p x y →\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      x =\n                                                    (fun x =>\n                                                        (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      y),\n                                        map_one' := (_ : ↑f 1 = 1) }\n                                      x *\n                                    OneHom.toFun\n                                      {\n                                        toFun := fun e =>\n                                          liftOn e\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                            (_ :\n                                              ∀ (x y : ℕ × K),\n                                                R K p x y →\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      x =\n                                                    (fun x =>\n                                                        (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      y),\n                                        map_one' := (_ : ↑f 1 = 1) }\n                                      y) })\n                      y) })\n      ((fun f => RingHom.comp f (of K p)) f) =\n    f\n[PROOFSTEP]\next ⟨n, x⟩\n[GOAL]\ncase a.mk.mk\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : PerfectClosure K p →+* L\nx✝ : PerfectClosure K p\nn : ℕ\nx : K\n⊢ ↑((fun f =>\n            {\n              toMonoidHom :=\n                {\n                  toOneHom :=\n                    {\n                      toFun := fun e =>\n                        liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                          (_ :\n                            ∀ (x y : ℕ × K),\n                              R K p x y →\n                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                      map_one' := (_ : ↑f 1 = 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : PerfectClosure K p),\n                        OneHom.toFun\n                            {\n                              toFun := fun e =>\n                                liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                  (_ :\n                                    ∀ (x y : ℕ × K),\n                                      R K p x y →\n                                        (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                              map_one' := (_ : ↑f 1 = 1) }\n                            (x * y) =\n                          OneHom.toFun\n                              {\n                                toFun := fun e =>\n                                  liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                    (_ :\n                                      ∀ (x y : ℕ × K),\n                                        R K p x y →\n                                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                                map_one' := (_ : ↑f 1 = 1) }\n                              x *\n                            OneHom.toFun\n                              {\n                                toFun := fun e =>\n                                  liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                    (_ :\n                                      ∀ (x y : ℕ × K),\n                                        R K p x y →\n                                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                                map_one' := (_ : ↑f 1 = 1) }\n                              y) },\n              map_zero' := (_ : ↑f 0 = 0),\n              map_add' :=\n                (_ :\n                  ∀ (x y : PerfectClosure K p),\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              {\n                                toFun := fun e =>\n                                  liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                    (_ :\n                                      ∀ (x y : ℕ × K),\n                                        R K p x y →\n                                          (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                                map_one' := (_ : ↑f 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : PerfectClosure K p),\n                                  OneHom.toFun\n                                      {\n                                        toFun := fun e =>\n                                          liftOn e\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                            (_ :\n                                              ∀ (x y : ℕ × K),\n                                                R K p x y →\n                                                  (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      x =\n                                                    (fun x =>\n                                                        (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                      y),\n                                        map_one' := (_ : ↑f 1 = 1) }\n                                      (x * y) =\n                                    OneHom.toFun\n                                        {\n                                          toFun := fun e =>\n                                            liftOn e\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                              (_ :\n                                                ∀ (x y : ℕ × K),\n                                                  R K p x y →\n                                                    (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        x =\n                                                      (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        y),\n                                          map_one' := (_ : ↑f 1 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        {\n                                          toFun := fun e =>\n                                            liftOn e\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                              (_ :\n                                                ∀ (x y : ℕ × K),\n                                                  R K p x y →\n                                                    (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        x =\n                                                      (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        y),\n                                          map_one' := (_ : ↑f 1 = 1) }\n                                        y) })\n                        (x + y) =\n                      OneHom.toFun\n                          (↑{\n                              toOneHom :=\n                                {\n                                  toFun := fun e =>\n                                    liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                      (_ :\n                                        ∀ (x y : ℕ × K),\n                                          R K p x y →\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                                  map_one' := (_ : ↑f 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (x y : PerfectClosure K p),\n                                    OneHom.toFun\n                                        {\n                                          toFun := fun e =>\n                                            liftOn e\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                              (_ :\n                                                ∀ (x y : ℕ × K),\n                                                  R K p x y →\n                                                    (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        x =\n                                                      (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        y),\n                                          map_one' := (_ : ↑f 1 = 1) }\n                                        (x * y) =\n                                      OneHom.toFun\n                                          {\n                                            toFun := fun e =>\n                                              liftOn e\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                (_ :\n                                                  ∀ (x y : ℕ × K),\n                                                    R K p x y →\n                                                      (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          x =\n                                                        (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          y),\n                                            map_one' := (_ : ↑f 1 = 1) }\n                                          x *\n                                        OneHom.toFun\n                                          {\n                                            toFun := fun e =>\n                                              liftOn e\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                (_ :\n                                                  ∀ (x y : ℕ × K),\n                                                    R K p x y →\n                                                      (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          x =\n                                                        (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          y),\n                                            map_one' := (_ : ↑f 1 = 1) }\n                                          y) })\n                          x +\n                        OneHom.toFun\n                          (↑{\n                              toOneHom :=\n                                {\n                                  toFun := fun e =>\n                                    liftOn e (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                      (_ :\n                                        ∀ (x y : ℕ × K),\n                                          R K p x y →\n                                            (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) x =\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd)) y),\n                                  map_one' := (_ : ↑f 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (x y : PerfectClosure K p),\n                                    OneHom.toFun\n                                        {\n                                          toFun := fun e =>\n                                            liftOn e\n                                              (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                              (_ :\n                                                ∀ (x y : ℕ × K),\n                                                  R K p x y →\n                                                    (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        x =\n                                                      (fun x =>\n                                                          (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                        y),\n                                          map_one' := (_ : ↑f 1 = 1) }\n                                        (x * y) =\n                                      OneHom.toFun\n                                          {\n                                            toFun := fun e =>\n                                              liftOn e\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                (_ :\n                                                  ∀ (x y : ℕ × K),\n                                                    R K p x y →\n                                                      (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          x =\n                                                        (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          y),\n                                            map_one' := (_ : ↑f 1 = 1) }\n                                          x *\n                                        OneHom.toFun\n                                          {\n                                            toFun := fun e =>\n                                              liftOn e\n                                                (fun x => (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                (_ :\n                                                  ∀ (x y : ℕ × K),\n                                                    R K p x y →\n                                                      (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          x =\n                                                        (fun x =>\n                                                            (↑(RingEquiv.symm (frobeniusEquiv L p)))^[x.fst] (↑f x.snd))\n                                                          y),\n                                            map_one' := (_ : ↑f 1 = 1) }\n                                          y) })\n                          y) })\n          ((fun f => RingHom.comp f (of K p)) f))\n      (Quot.mk (R K p) (n, x)) =\n    ↑f (Quot.mk (R K p) (n, x))\n[PROOFSTEP]\nsimp only [quot_mk_eq_mk, RingHom.comp_apply, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk, liftOn_mk]\n[GOAL]\ncase a.mk.mk\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : PerfectClosure K p →+* L\nx✝ : PerfectClosure K p\nn : ℕ\nx : K\n⊢ (↑(RingEquiv.symm (frobeniusEquiv L p)))^[n] (↑f (↑(of K p) x)) = ↑f (mk K p (n, x))\n[PROOFSTEP]\napply (injective_frobenius L p).iterate n\n[GOAL]\ncase a.mk.mk.a\nK : Type u\ninst✝⁵ : Field K\np : ℕ\ninst✝⁴ : Fact (Nat.Prime p)\ninst✝³ : CharP K p\nL : Type v\ninst✝² : CommSemiring L\ninst✝¹ : CharP L p\ninst✝ : PerfectRing L p\nf : PerfectClosure K p →+* L\nx✝ : PerfectClosure K p\nn : ℕ\nx : K\n⊢ (↑(frobenius L p))^[n] ((↑(RingEquiv.symm (frobeniusEquiv L p)))^[n] (↑f (↑(of K p) x))) =\n    (↑(frobenius L p))^[n] (↑f (mk K p (n, x)))\n[PROOFSTEP]\nrw [← f.map_iterate_frobenius, iterate_frobenius_mk, RightInverse.iterate (frobenius_apply_frobeniusEquiv_symm L p) n]\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.PerfectClosure", "llama_tokens": 57006, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7154239957834733, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.38560152940462855}}
{"text": "[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\ninst✝¹ : NonAssocRing α\ninst✝ : ContinuousMul α\n⊢ Continuous fun a => -a\n[PROOFSTEP]\nsimpa using (continuous_const.mul continuous_id : Continuous fun x : α => -1 * x)\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝² : NonUnitalNonAssocRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalAddGroup R\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)\nhmul_left : ∀ (x₀ : R), Tendsto (fun x => x₀ * x) (𝓝 0) (𝓝 0)\nhmul_right : ∀ (x₀ : R), Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0)\n⊢ Continuous fun p => p.fst * p.snd\n[PROOFSTEP]\nrefine continuous_of_continuousAt_zero₂ (AddMonoidHom.mul (R := R)) ?_ ?_ ?_\n[GOAL]\ncase refine_1\nα : Type u_1\nR : Type u_2\ninst✝² : NonUnitalNonAssocRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalAddGroup R\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)\nhmul_left : ∀ (x₀ : R), Tendsto (fun x => x₀ * x) (𝓝 0) (𝓝 0)\nhmul_right : ∀ (x₀ : R), Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0)\n⊢ ContinuousAt (fun x => ↑(↑AddMonoidHom.mul x.fst) x.snd) (0, 0)\n[PROOFSTEP]\nsimpa only [ContinuousAt, mul_zero, zero_mul, nhds_prod_eq, AddMonoidHom.mul_apply]\n[GOAL]\ncase refine_2\nα : Type u_1\nR : Type u_2\ninst✝² : NonUnitalNonAssocRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalAddGroup R\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)\nhmul_left : ∀ (x₀ : R), Tendsto (fun x => x₀ * x) (𝓝 0) (𝓝 0)\nhmul_right : ∀ (x₀ : R), Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0)\n⊢ ∀ (x : R), ContinuousAt (↑(↑AddMonoidHom.mul x)) 0\n[PROOFSTEP]\nsimpa only [ContinuousAt, mul_zero, zero_mul, nhds_prod_eq, AddMonoidHom.mul_apply]\n[GOAL]\ncase refine_3\nα : Type u_1\nR : Type u_2\ninst✝² : NonUnitalNonAssocRing R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalAddGroup R\nhmul : Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)\nhmul_left : ∀ (x₀ : R), Tendsto (fun x => x₀ * x) (𝓝 0) (𝓝 0)\nhmul_right : ∀ (x₀ : R), Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0)\n⊢ ∀ (y : R), ContinuousAt (fun x => ↑(↑AddMonoidHom.mul x) y) 0\n[PROOFSTEP]\nsimpa only [ContinuousAt, mul_zero, zero_mul, nhds_prod_eq, AddMonoidHom.mul_apply]\n[GOAL]\nα : Type u_1\ninst✝ : Ring α\n⊢ Injective toTopologicalSpace\n[PROOFSTEP]\nintro f g _\n[GOAL]\nα : Type u_1\ninst✝ : Ring α\nf g : RingTopology α\na✝ : f.toTopologicalSpace = g.toTopologicalSpace\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nα : Type u_1\ninst✝ : Ring α\ng : RingTopology α\ntoTopologicalSpace✝ : TopologicalSpace α\ntoTopologicalRing✝ : TopologicalRing α\na✝ :\n  { toTopologicalSpace := toTopologicalSpace✝, toTopologicalRing := toTopologicalRing✝ }.toTopologicalSpace =\n    g.toTopologicalSpace\n⊢ { toTopologicalSpace := toTopologicalSpace✝, toTopologicalRing := toTopologicalRing✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nα : Type u_1\ninst✝ : Ring α\ntoTopologicalSpace✝¹ : TopologicalSpace α\ntoTopologicalRing✝¹ : TopologicalRing α\ntoTopologicalSpace✝ : TopologicalSpace α\ntoTopologicalRing✝ : TopologicalRing α\na✝ :\n  { toTopologicalSpace := toTopologicalSpace✝¹, toTopologicalRing := toTopologicalRing✝¹ }.toTopologicalSpace =\n    { toTopologicalSpace := toTopologicalSpace✝, toTopologicalRing := toTopologicalRing✝ }.toTopologicalSpace\n⊢ { toTopologicalSpace := toTopologicalSpace✝¹, toTopologicalRing := toTopologicalRing✝¹ } =\n    { toTopologicalSpace := toTopologicalSpace✝, toTopologicalRing := toTopologicalRing✝ }\n[PROOFSTEP]\ncongr\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Ring.Basic", "llama_tokens": 1564, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.658417500561683, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.3852408395262473}}
{"text": "[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nh : HasInvolutiveReverse V\na b : V\nf : a ⟶ b\n⊢ reverse (reverse f) = f\n[PROOFSTEP]\napply h.inv'\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nh : HasInvolutiveReverse V\na b : V\nf g : a ⟶ b\n⊢ reverse f = reverse g ↔ f = g\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nh : HasInvolutiveReverse V\na b : V\nf g : a ⟶ b\n⊢ reverse f = reverse g → f = g\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase mp\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nh✝ : HasInvolutiveReverse V\na b : V\nf g : a ⟶ b\nh : reverse f = reverse g\n⊢ f = g\n[PROOFSTEP]\nsimpa using congr_arg Quiver.reverse h\n[GOAL]\ncase mpr\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nh : HasInvolutiveReverse V\na b : V\nf g : a ⟶ b\n⊢ f = g → reverse f = reverse g\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase mpr\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nh✝ : HasInvolutiveReverse V\na b : V\nf g : a ⟶ b\nh : f = g\n⊢ reverse f = reverse g\n[PROOFSTEP]\ncongr\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nh : HasInvolutiveReverse V\na b : V\nf : a ⟶ b\ng : b ⟶ a\n⊢ f = reverse g ↔ reverse f = g\n[PROOFSTEP]\nrw [← reverse_inj, reverse_reverse]\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁷ : Quiver U\ninst✝⁶ : Quiver V\ninst✝⁵ : Quiver W\ninst✝⁴ : HasReverse U\ninst✝³ : HasReverse V\ninst✝² : HasReverse W\nφ : U ⥤q V\nψ : V ⥤q W\ninst✝¹ : Prefunctor.MapReverse φ\ninst✝ : Prefunctor.MapReverse ψ\nu✝ v✝ : U\ne : u✝ ⟶ v✝\n⊢ (φ ⋙q ψ).map (reverse e) = reverse ((φ ⋙q ψ).map e)\n[PROOFSTEP]\nsimp only [Prefunctor.comp_map, Prefunctor.MapReverse.map_reverse']\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝³ : Quiver U\ninst✝² : Quiver V\ninst✝¹ : Quiver W\ninst✝ : HasReverse V\na b c : V\np : Path a b\nq : Path b c\n⊢ reverse (comp p q) = comp (reverse q) (reverse p)\n[PROOFSTEP]\ninduction' q with _ _ _ _ h\n[GOAL]\ncase nil\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝³ : Quiver U\ninst✝² : Quiver V\ninst✝¹ : Quiver W\ninst✝ : HasReverse V\na b c : V\np : Path a b\n⊢ reverse (comp p nil) = comp (reverse nil) (reverse p)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝³ : Quiver U\ninst✝² : Quiver V\ninst✝¹ : Quiver W\ninst✝ : HasReverse V\na b c : V\np : Path a b\nb✝ c✝ : V\na✝¹ : Path b b✝\na✝ : b✝ ⟶ c✝\nh : reverse (comp p a✝¹) = comp (reverse a✝¹) (reverse p)\n⊢ reverse (comp p (cons a✝¹ a✝)) = comp (reverse (cons a✝¹ a✝)) (reverse p)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nh : HasInvolutiveReverse V\na b : V\np : Path a b\n⊢ reverse (reverse p) = p\n[PROOFSTEP]\ninduction' p with _ _ _ _ h\n[GOAL]\ncase nil\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nh : HasInvolutiveReverse V\na b : V\n⊢ reverse (reverse nil) = nil\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nh✝ : HasInvolutiveReverse V\na b b✝ c✝ : V\na✝¹ : Path a b✝\na✝ : b✝ ⟶ c✝\nh : reverse (reverse a✝¹) = a✝¹\n⊢ reverse (reverse (cons a✝¹ a✝)) = cons a✝¹ a✝\n[PROOFSTEP]\nrw [Path.reverse, Path.reverse_comp, h, Path.reverse_toPath, Quiver.reverse_reverse]\n[GOAL]\ncase cons\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nh✝ : HasInvolutiveReverse V\na b b✝ c✝ : V\na✝¹ : Path a b✝\na✝ : b✝ ⟶ c✝\nh : reverse (reverse a✝¹) = a✝¹\n⊢ comp a✝¹ (Hom.toPath a✝) = cons a✝¹ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nφ : V ⥤q V'\n⊢ of ⋙q lift φ = φ\n[PROOFSTEP]\nfapply Prefunctor.ext\n[GOAL]\ncase h_obj\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nφ : V ⥤q V'\n⊢ ∀ (X : V), (of ⋙q lift φ).obj X = φ.obj X\n[PROOFSTEP]\nrintro X\n[GOAL]\ncase h_obj\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nφ : V ⥤q V'\nX : V\n⊢ (of ⋙q lift φ).obj X = φ.obj X\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_map\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nφ : V ⥤q V'\n⊢ ∀ (X Y : V) (f : X ⟶ Y),\n    (of ⋙q lift φ).map f =\n      Eq.recOn (_ : φ.obj Y = (of ⋙q lift φ).obj Y) (Eq.recOn (_ : φ.obj X = (of ⋙q lift φ).obj X) (φ.map f))\n[PROOFSTEP]\nrintro X Y f\n[GOAL]\ncase h_map\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nφ : V ⥤q V'\nX Y : V\nf : X ⟶ Y\n⊢ (of ⋙q lift φ).map f =\n    Eq.recOn (_ : φ.obj Y = (of ⋙q lift φ).obj Y) (Eq.recOn (_ : φ.obj X = (of ⋙q lift φ).obj X) (φ.map f))\n[PROOFSTEP]\nrfl\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝³ : Quiver U\ninst✝² : Quiver V\ninst✝¹ : Quiver W\nV' : Type u_4\ninst✝ : Quiver V'\nh : HasInvolutiveReverse V'\nφ : V ⥤q V'\nX Y : Symmetrify V\nf : X ⟶ Y\n⊢ (lift φ).map (reverse f) = reverse ((lift φ).map f)\n[PROOFSTEP]\ndsimp [Symmetrify.lift]\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝³ : Quiver U\ninst✝² : Quiver V\ninst✝¹ : Quiver W\nV' : Type u_4\ninst✝ : Quiver V'\nh : HasInvolutiveReverse V'\nφ : V ⥤q V'\nX Y : Symmetrify V\nf : X ⟶ Y\n⊢ (match Sum.swap f with\n    | Sum.inl g => φ.map g\n    | Sum.inr g => reverse (φ.map g)) =\n    reverse\n      (match f with\n      | Sum.inl g => φ.map g\n      | Sum.inr g => reverse (φ.map g))\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝³ : Quiver U\ninst✝² : Quiver V\ninst✝¹ : Quiver W\nV' : Type u_4\ninst✝ : Quiver V'\nh : HasInvolutiveReverse V'\nφ : V ⥤q V'\nX Y : Symmetrify V\nval✝ : X ⟶ Y\n⊢ (match Sum.swap (Sum.inl val✝) with\n    | Sum.inl g => φ.map g\n    | Sum.inr g => reverse (φ.map g)) =\n    reverse\n      (match Sum.inl val✝ with\n      | Sum.inl g => φ.map g\n      | Sum.inr g => reverse (φ.map g))\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase inl\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝³ : Quiver U\ninst✝² : Quiver V\ninst✝¹ : Quiver W\nV' : Type u_4\ninst✝ : Quiver V'\nh : HasInvolutiveReverse V'\nφ : V ⥤q V'\nX Y : Symmetrify V\nval✝ : X ⟶ Y\n⊢ (match Sum.swap (Sum.inl val✝) with\n    | Sum.inl g => φ.map g\n    | Sum.inr g => reverse (φ.map g)) =\n    reverse (φ.map val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝³ : Quiver U\ninst✝² : Quiver V\ninst✝¹ : Quiver W\nV' : Type u_4\ninst✝ : Quiver V'\nh : HasInvolutiveReverse V'\nφ : V ⥤q V'\nX Y : Symmetrify V\nval✝ : Y ⟶ X\n⊢ (match Sum.swap (Sum.inr val✝) with\n    | Sum.inl g => φ.map g\n    | Sum.inr g => reverse (φ.map g)) =\n    reverse\n      (match Sum.inr val✝ with\n      | Sum.inl g => φ.map g\n      | Sum.inr g => reverse (φ.map g))\n[PROOFSTEP]\nsimp only [reverse_reverse]\n[GOAL]\ncase inr\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝³ : Quiver U\ninst✝² : Quiver V\ninst✝¹ : Quiver W\nV' : Type u_4\ninst✝ : Quiver V'\nh : HasInvolutiveReverse V'\nφ : V ⥤q V'\nX Y : Symmetrify V\nval✝ : Y ⟶ X\n⊢ (match Sum.swap (Sum.inr val✝) with\n    | Sum.inl g => φ.map g\n    | Sum.inr g => reverse (φ.map g)) =\n    φ.map val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nφ : V ⥤q V'\nΦ : Symmetrify V ⥤q V'\nhΦ : of ⋙q Φ = φ\nhΦinv : ∀ {X Y : Symmetrify V} (f : X ⟶ Y), Φ.map (reverse f) = reverse (Φ.map f)\n⊢ Φ = lift φ\n[PROOFSTEP]\nsubst_vars\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nΦ : Symmetrify V ⥤q V'\nhΦinv : ∀ {X Y : Symmetrify V} (f : X ⟶ Y), Φ.map (reverse f) = reverse (Φ.map f)\n⊢ Φ = lift (of ⋙q Φ)\n[PROOFSTEP]\nfapply Prefunctor.ext\n[GOAL]\ncase h_obj\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nΦ : Symmetrify V ⥤q V'\nhΦinv : ∀ {X Y : Symmetrify V} (f : X ⟶ Y), Φ.map (reverse f) = reverse (Φ.map f)\n⊢ ∀ (X : Symmetrify V), Φ.obj X = (lift (of ⋙q Φ)).obj X\n[PROOFSTEP]\nrintro X\n[GOAL]\ncase h_obj\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nΦ : Symmetrify V ⥤q V'\nhΦinv : ∀ {X Y : Symmetrify V} (f : X ⟶ Y), Φ.map (reverse f) = reverse (Φ.map f)\nX : Symmetrify V\n⊢ Φ.obj X = (lift (of ⋙q Φ)).obj X\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_map\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nΦ : Symmetrify V ⥤q V'\nhΦinv : ∀ {X Y : Symmetrify V} (f : X ⟶ Y), Φ.map (reverse f) = reverse (Φ.map f)\n⊢ ∀ (X Y : Symmetrify V) (f : X ⟶ Y),\n    Φ.map f =\n      Eq.recOn (_ : (lift (of ⋙q Φ)).obj Y = Φ.obj Y)\n        (Eq.recOn (_ : (lift (of ⋙q Φ)).obj X = Φ.obj X) ((lift (of ⋙q Φ)).map f))\n[PROOFSTEP]\nrintro X Y f\n[GOAL]\ncase h_map\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nΦ : Symmetrify V ⥤q V'\nhΦinv : ∀ {X Y : Symmetrify V} (f : X ⟶ Y), Φ.map (reverse f) = reverse (Φ.map f)\nX Y : Symmetrify V\nf : X ⟶ Y\n⊢ Φ.map f =\n    Eq.recOn (_ : (lift (of ⋙q Φ)).obj Y = Φ.obj Y)\n      (Eq.recOn (_ : (lift (of ⋙q Φ)).obj X = Φ.obj X) ((lift (of ⋙q Φ)).map f))\n[PROOFSTEP]\ncases f\n[GOAL]\ncase h_map.inl\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nΦ : Symmetrify V ⥤q V'\nhΦinv : ∀ {X Y : Symmetrify V} (f : X ⟶ Y), Φ.map (reverse f) = reverse (Φ.map f)\nX Y : Symmetrify V\nval✝ : X ⟶ Y\n⊢ Φ.map (Sum.inl val✝) =\n    Eq.recOn (_ : (lift (of ⋙q Φ)).obj Y = Φ.obj Y)\n      (Eq.recOn (_ : (lift (of ⋙q Φ)).obj X = Φ.obj X) ((lift (of ⋙q Φ)).map (Sum.inl val✝)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_map.inr\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝⁴ : Quiver U\ninst✝³ : Quiver V\ninst✝² : Quiver W\nV' : Type u_4\ninst✝¹ : Quiver V'\ninst✝ : HasReverse V'\nΦ : Symmetrify V ⥤q V'\nhΦinv : ∀ {X Y : Symmetrify V} (f : X ⟶ Y), Φ.map (reverse f) = reverse (Φ.map f)\nX Y : Symmetrify V\nval✝ : Y ⟶ X\n⊢ Φ.map (Sum.inr val✝) =\n    Eq.recOn (_ : (lift (of ⋙q Φ)).obj Y = Φ.obj Y)\n      (Eq.recOn (_ : (lift (of ⋙q Φ)).obj X = Φ.obj X) ((lift (of ⋙q Φ)).map (Sum.inr val✝)))\n[PROOFSTEP]\nexact hΦinv (Sum.inl _)\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝³ : Quiver U\ninst✝² : Quiver V\ninst✝¹ : Quiver W\nV' : Type u_4\ninst✝ : Quiver V'\nφ : U ⥤q V\nu✝ v✝ : Symmetrify U\ne : u✝ ⟶ v✝\n⊢ (Prefunctor.symmetrify φ).map (reverse e) = reverse ((Prefunctor.symmetrify φ).map e)\n[PROOFSTEP]\ncases e\n[GOAL]\ncase inl\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝³ : Quiver U\ninst✝² : Quiver V\ninst✝¹ : Quiver W\nV' : Type u_4\ninst✝ : Quiver V'\nφ : U ⥤q V\nu✝ v✝ : Symmetrify U\nval✝ : u✝ ⟶ v✝\n⊢ (Prefunctor.symmetrify φ).map (reverse (Sum.inl val✝)) = reverse ((Prefunctor.symmetrify φ).map (Sum.inl val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝³ : Quiver U\ninst✝² : Quiver V\ninst✝¹ : Quiver W\nV' : Type u_4\ninst✝ : Quiver V'\nφ : U ⥤q V\nu✝ v✝ : Symmetrify U\nval✝ : v✝ ⟶ u✝\n⊢ (Prefunctor.symmetrify φ).map (reverse (Sum.inr val✝)) = reverse ((Prefunctor.symmetrify φ).map (Sum.inr val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nV' : Type u_4\nσ : V → V'\nh : HasInvolutiveReverse V\na✝ b✝ : Push σ\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\n⊢ reverse (reverse (PushQuiver.arrow f)) = PushQuiver.arrow f\n[PROOFSTEP]\ndsimp [reverse]\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nV' : Type u_4\nσ : V → V'\nh : HasInvolutiveReverse V\na✝ b✝ : Push σ\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\n⊢ PushQuiver.arrow (HasReverse.reverse' (HasReverse.reverse' f)) = PushQuiver.arrow f\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nV' : Type u_4\nσ : V → V'\nh : HasInvolutiveReverse V\na✝ b✝ : Push σ\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\n⊢ HasReverse.reverse' (HasReverse.reverse' f) = f\n[PROOFSTEP]\napply h.inv'\n[GOAL]\nU : Type u_1\nV : Type u_2\nW : Type u_3\ninst✝² : Quiver U\ninst✝¹ : Quiver V\ninst✝ : Quiver W\nV' : Type u_4\nσ : V → V'\nh : HasInvolutiveReverse V\n⊢ ∀ {u v : V} (e : u ⟶ v), (of σ).map (reverse e) = reverse ((of σ).map e)\n[PROOFSTEP]\nsimp [of_reverse]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Quiver.Symmetric", "llama_tokens": 6874, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6584174871563662, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.38524083168278095}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\n⊢ 0 < normBound abv bS\n[PROOFSTEP]\nobtain ⟨i, j, k, hijk⟩ : ∃ i j k, Algebra.leftMulMatrix bS (bS i) j k ≠ 0 :=\n  by\n  by_contra' h\n  obtain ⟨i⟩ := bS.index_nonempty\n  apply bS.ne_zero i\n  apply (injective_iff_map_eq_zero (Algebra.leftMulMatrix bS)).mp (Algebra.leftMulMatrix_injective bS)\n  ext j k\n  simp [h, DMatrix.zero_apply]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\n⊢ ∃ i j k, ↑(Algebra.leftMulMatrix bS) (↑bS i) j k ≠ 0\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nh : ∀ (i j k : ι), ↑(Algebra.leftMulMatrix bS) (↑bS i) j k = 0\n⊢ False\n[PROOFSTEP]\nobtain ⟨i⟩ := bS.index_nonempty\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nh : ∀ (i j k : ι), ↑(Algebra.leftMulMatrix bS) (↑bS i) j k = 0\ni : ι\n⊢ False\n[PROOFSTEP]\napply bS.ne_zero i\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nh : ∀ (i j k : ι), ↑(Algebra.leftMulMatrix bS) (↑bS i) j k = 0\ni : ι\n⊢ ↑bS i = 0\n[PROOFSTEP]\napply (injective_iff_map_eq_zero (Algebra.leftMulMatrix bS)).mp (Algebra.leftMulMatrix_injective bS)\n[GOAL]\ncase intro.a\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nh : ∀ (i j k : ι), ↑(Algebra.leftMulMatrix bS) (↑bS i) j k = 0\ni : ι\n⊢ ↑(Algebra.leftMulMatrix bS) (↑bS i) = 0\n[PROOFSTEP]\next j k\n[GOAL]\ncase intro.a.a.h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nh : ∀ (i j k : ι), ↑(Algebra.leftMulMatrix bS) (↑bS i) j k = 0\ni j k : ι\n⊢ ↑(Algebra.leftMulMatrix bS) (↑bS i) j k = OfNat.ofNat 0 j k\n[PROOFSTEP]\nsimp [h, DMatrix.zero_apply]\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\ni j k : ι\nhijk : ↑(Algebra.leftMulMatrix bS) (↑bS i) j k ≠ 0\n⊢ 0 < normBound abv bS\n[PROOFSTEP]\nsimp only [normBound, Algebra.smul_def, eq_natCast]\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\ni j k : ι\nhijk : ↑(Algebra.leftMulMatrix bS) (↑bS i) j k ≠ 0\n⊢ 0 <\n    ↑(Nat.factorial (Fintype.card ι)) *\n      (↑(Fintype.card ι) *\n          Finset.max'\n            (Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n              Finset.univ)\n            (_ :\n              ∃ x,\n                x ∈\n                  Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n                    Finset.univ)) ^\n        Fintype.card ι\n[PROOFSTEP]\nrefine' mul_pos (Int.coe_nat_pos.mpr (Nat.factorial_pos _)) _\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\ni j k : ι\nhijk : ↑(Algebra.leftMulMatrix bS) (↑bS i) j k ≠ 0\n⊢ 0 <\n    (↑(Fintype.card ι) *\n        Finset.max'\n          (Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n            Finset.univ)\n          (_ :\n            ∃ x,\n              x ∈\n                Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n                  Finset.univ)) ^\n      Fintype.card ι\n[PROOFSTEP]\nrefine' pow_pos (mul_pos (Int.coe_nat_pos.mpr (Fintype.card_pos_iff.mpr ⟨i⟩)) _) _\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\ni j k : ι\nhijk : ↑(Algebra.leftMulMatrix bS) (↑bS i) j k ≠ 0\n⊢ 0 <\n    Finset.max'\n      (Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd)) Finset.univ)\n      (_ :\n        ∃ x,\n          x ∈\n            Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n              Finset.univ)\n[PROOFSTEP]\nrefine' lt_of_lt_of_le (abv.pos hijk) (Finset.le_max' _ _ _)\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\ni j k : ι\nhijk : ↑(Algebra.leftMulMatrix bS) (↑bS i) j k ≠ 0\n⊢ ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS i) j k) ∈\n    Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd)) Finset.univ\n[PROOFSTEP]\nexact Finset.mem_image.mpr ⟨⟨i, j, k⟩, Finset.mem_univ _, rfl⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\n⊢ ↑abv (↑(Algebra.norm R) a) ≤ normBound abv bS * y ^ Fintype.card ι\n[PROOFSTEP]\nconv_lhs => rw [← bS.sum_repr a]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\n| ↑abv (↑(Algebra.norm R) a)\n[PROOFSTEP]\nrw [← bS.sum_repr a]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\n| ↑abv (↑(Algebra.norm R) a)\n[PROOFSTEP]\nrw [← bS.sum_repr a]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\n| ↑abv (↑(Algebra.norm R) a)\n[PROOFSTEP]\nrw [← bS.sum_repr a]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\n⊢ ↑abv (↑(Algebra.norm R) (∑ i : ι, ↑(↑bS.repr a) i • ↑bS i)) ≤ normBound abv bS * y ^ Fintype.card ι\n[PROOFSTEP]\nrw [Algebra.norm_apply, ← LinearMap.det_toMatrix bS]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\n⊢ ↑abv (↑(Algebra.norm R) (∑ i : ι, ↑(↑bS.repr a) i • ↑bS i)) ≤ normBound abv bS * y ^ Fintype.card ι\n[PROOFSTEP]\nsimp only [Algebra.norm_apply, AlgHom.map_sum, AlgHom.map_smul, LinearEquiv.map_sum, LinearEquiv.map_smul,\n  Algebra.toMatrix_lmul_eq, normBound, smul_mul_assoc, ← mul_pow]\n  --Porting note: rest of proof was\n    -- convert Matrix.det_sum_smul_le Finset.univ _ hy using 3\n    -- · rw [Finset.card_univ, smul_mul_assoc, mul_comm]\n    -- · intro i j k\n    --   apply Finset.le_max'\n    --   exact finset.mem_image.mpr ⟨⟨i, j, k⟩, Finset.mem_univ _, rfl⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\n⊢ ↑abv (↑LinearMap.det (∑ x : ι, ↑(↑bS.repr a) x • ↑(Algebra.lmul R S) (↑bS x))) ≤\n    Nat.factorial (Fintype.card ι) •\n      (Fintype.card ι •\n          (Finset.max'\n              (Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n                Finset.univ)\n              (_ :\n                ∃ x,\n                  x ∈\n                    Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n                      Finset.univ) *\n            y)) ^\n        Fintype.card ι\n[PROOFSTEP]\nrw [← LinearMap.det_toMatrix bS]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\n⊢ ↑abv (Matrix.det (↑(LinearMap.toMatrix bS bS) (∑ x : ι, ↑(↑bS.repr a) x • ↑(Algebra.lmul R S) (↑bS x)))) ≤\n    Nat.factorial (Fintype.card ι) •\n      (Fintype.card ι •\n          (Finset.max'\n              (Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n                Finset.univ)\n              (_ :\n                ∃ x,\n                  x ∈\n                    Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n                      Finset.univ) *\n            y)) ^\n        Fintype.card ι\n[PROOFSTEP]\nconvert Matrix.det_sum_smul_le (n := ι) Finset.univ _ hy using 3\n[GOAL]\ncase h.e'_3.h.e'_6.h.e'_6\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\n⊢ ↑(LinearMap.toMatrix bS bS) (∑ x : ι, ↑(↑bS.repr a) x • ↑(Algebra.lmul R S) (↑bS x)) =\n    ∑ k : ι, ↑(↑bS.repr a) k • ?convert_1 k\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3.h.e'_6.h.e'_6\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\n⊢ ∑ x : ι, ↑(↑bS.repr a) x • ↑(LinearMap.toMatrix bS bS) (↑(LinearMap.mul R S) (↑bS x)) =\n    ∑ x : ι, ↑(↑bS.repr a) x • ?convert_1 x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_4.h.e'_6.h.e'_5\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\n⊢ Fintype.card ι •\n      (Finset.max'\n          (Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n            Finset.univ)\n          (_ :\n            ∃ x,\n              x ∈\n                Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n                  Finset.univ) *\n        y) =\n    Finset.card Finset.univ • y * ?convert_2\n[PROOFSTEP]\nrw [Finset.card_univ, smul_mul_assoc, mul_comm]\n[GOAL]\ncase convert_3\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\n⊢ ∀ (k i j : ι),\n    ↑abv (↑(LinearMap.toMatrix bS bS) (↑(LinearMap.mul R S) (↑bS k)) i j) ≤\n      Finset.max'\n        (Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd)) Finset.univ)\n        (_ :\n          ∃ x,\n            x ∈\n              Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n                Finset.univ)\n[PROOFSTEP]\nintro i j k\n[GOAL]\ncase convert_3\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\ni j k : ι\n⊢ ↑abv (↑(LinearMap.toMatrix bS bS) (↑(LinearMap.mul R S) (↑bS i)) j k) ≤\n    Finset.max'\n      (Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd)) Finset.univ)\n      (_ :\n        ∃ x,\n          x ∈\n            Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd))\n              Finset.univ)\n[PROOFSTEP]\napply Finset.le_max'\n[GOAL]\ncase convert_3.H2\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\na : S\ny : ℤ\nhy : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y\ni j k : ι\n⊢ ↑abv (↑(LinearMap.toMatrix bS bS) (↑(LinearMap.mul R S) (↑bS i)) j k) ∈\n    Finset.image (fun ijk => ↑abv (↑(Algebra.leftMulMatrix bS) (↑bS ijk.fst) ijk.snd.fst ijk.snd.snd)) Finset.univ\n[PROOFSTEP]\nexact Finset.mem_image.mpr ⟨⟨i, j, k⟩, Finset.mem_univ _, rfl⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\n⊢ ↑(↑abv (↑(Algebra.norm R) a)) < ↑(normBound abv bS) * y ^ Fintype.card ι\n[PROOFSTEP]\nobtain ⟨i⟩ := bS.index_nonempty\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\n⊢ ↑(↑abv (↑(Algebra.norm R) a)) < ↑(normBound abv bS) * y ^ Fintype.card ι\n[PROOFSTEP]\nhave him : (Finset.univ.image fun k => abv (bS.repr a k)).Nonempty :=\n  ⟨_, Finset.mem_image.mpr ⟨i, Finset.mem_univ _, rfl⟩⟩\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\n⊢ ↑(↑abv (↑(Algebra.norm R) a)) < ↑(normBound abv bS) * y ^ Fintype.card ι\n[PROOFSTEP]\nset y' : ℤ := Finset.max' _ him with y'_def\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\n⊢ ↑(↑abv (↑(Algebra.norm R) a)) < ↑(normBound abv bS) * y ^ Fintype.card ι\n[PROOFSTEP]\nhave hy' : ∀ k, abv (bS.repr a k) ≤ y' := by\n  intro k\n  exact @Finset.le_max' ℤ _ _ _ (Finset.mem_image.mpr ⟨k, Finset.mem_univ _, rfl⟩)\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\n⊢ ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\n[PROOFSTEP]\nintro k\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nk : ι\n⊢ ↑abv (↑(↑bS.repr a) k) ≤ y'\n[PROOFSTEP]\nexact @Finset.le_max' ℤ _ _ _ (Finset.mem_image.mpr ⟨k, Finset.mem_univ _, rfl⟩)\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\n⊢ ↑(↑abv (↑(Algebra.norm R) a)) < ↑(normBound abv bS) * y ^ Fintype.card ι\n[PROOFSTEP]\nhave : (y' : T) < y :=\n  by\n  rw [y'_def, ← Finset.max'_image (show Monotone (_ : ℤ → T) from fun x y h => Int.cast_le.mpr h)]\n  apply (Finset.max'_lt_iff _ (him.image _)).mpr\n  simp only [Finset.mem_image, exists_prop]\n  rintro _ ⟨x, ⟨k, -, rfl⟩, rfl⟩\n  exact hy k\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\n⊢ ↑y' < y\n[PROOFSTEP]\nrw [y'_def, ← Finset.max'_image (show Monotone (_ : ℤ → T) from fun x y h => Int.cast_le.mpr h)]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\n⊢ Finset.max' (Finset.image (fun x => ↑x) (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)) ?h < y\ncase h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\n⊢ Finset.Nonempty (Finset.image (fun x => ↑x) (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ))\n[PROOFSTEP]\napply (Finset.max'_lt_iff _ (him.image _)).mpr\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\n⊢ ∀ (y_1 : T), y_1 ∈ Finset.image (fun x => ↑x) (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) → y_1 < y\n[PROOFSTEP]\nsimp only [Finset.mem_image, exists_prop]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\n⊢ ∀ (y_1 : T), (∃ a_1, (∃ a_2, a_2 ∈ Finset.univ ∧ ↑abv (↑(↑bS.repr a) a_2) = a_1) ∧ ↑a_1 = y_1) → y_1 < y\n[PROOFSTEP]\nrintro _ ⟨x, ⟨k, -, rfl⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\nk : ι\n⊢ ↑(↑abv (↑(↑bS.repr a) k)) < y\n[PROOFSTEP]\nexact hy k\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\nthis : ↑y' < y\n⊢ ↑(↑abv (↑(Algebra.norm R) a)) < ↑(normBound abv bS) * y ^ Fintype.card ι\n[PROOFSTEP]\nhave y'_nonneg : 0 ≤ y' := le_trans (abv.nonneg _) (hy' i)\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\nthis : ↑y' < y\ny'_nonneg : 0 ≤ y'\n⊢ ↑(↑abv (↑(Algebra.norm R) a)) < ↑(normBound abv bS) * y ^ Fintype.card ι\n[PROOFSTEP]\napply (Int.cast_le.mpr (norm_le abv bS a hy')).trans_lt\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\nthis : ↑y' < y\ny'_nonneg : 0 ≤ y'\n⊢ ↑(normBound abv bS * y' ^ Fintype.card ι) < ↑(normBound abv bS) * y ^ Fintype.card ι\n[PROOFSTEP]\nsimp only [Int.cast_mul, Int.cast_pow]\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\nthis : ↑y' < y\ny'_nonneg : 0 ≤ y'\n⊢ ↑(normBound abv bS) *\n      ↑(Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him) ^ Fintype.card ι <\n    ↑(normBound abv bS) * y ^ Fintype.card ι\n[PROOFSTEP]\napply mul_lt_mul' le_rfl\n[GOAL]\ncase intro.hbd\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\nthis : ↑y' < y\ny'_nonneg : 0 ≤ y'\n⊢ ↑(Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him) ^ Fintype.card ι < y ^ Fintype.card ι\n[PROOFSTEP]\nexact pow_lt_pow_of_lt_left this (Int.cast_nonneg.mpr y'_nonneg) (Fintype.card_pos_iff.mpr ⟨i⟩)\n[GOAL]\ncase intro.hb\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\nthis : ↑y' < y\ny'_nonneg : 0 ≤ y'\n⊢ 0 ≤ ↑(Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him) ^ Fintype.card ι\n[PROOFSTEP]\nexact pow_nonneg (Int.cast_nonneg.mpr y'_nonneg) _\n[GOAL]\ncase intro.hc\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁵ : EuclideanDomain R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : IsDomain S\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nbS : Basis ι R S\nT : Type u_6\ninst✝ : LinearOrderedRing T\na : S\ny : T\nhy : ∀ (k : ι), ↑(↑abv (↑(↑bS.repr a) k)) < y\ni : ι\nhim : Finset.Nonempty (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ)\ny' : ℤ := Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\ny'_def : y' = Finset.max' (Finset.image (fun k => ↑abv (↑(↑bS.repr a) k)) Finset.univ) him\nhy' : ∀ (k : ι), ↑abv (↑(↑bS.repr a) k) ≤ y'\nthis : ↑y' < y\ny'_nonneg : 0 ≤ y'\n⊢ 0 < ↑(normBound abv bS)\n[PROOFSTEP]\nexact Int.cast_pos.mpr (normBound_pos abv bS)\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nI : { x // x ∈ (Ideal S)⁰ }\n⊢ ∃ b, b ∈ ↑I ∧ b ≠ 0 ∧ ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\n[PROOFSTEP]\nclassical\nobtain ⟨_, ⟨b, b_mem, b_ne_zero, rfl⟩, min⟩ :=\n  @Int.exists_least_of_bdd (fun a => ∃ b ∈ (I : Ideal S), b ≠ (0 : S) ∧ abv (Algebra.norm R b) = a) _\n    (by\n      use 0\n      rintro _ ⟨b, _, _, rfl⟩\n      apply abv.nonneg)\n    (by\n      obtain ⟨b, b_mem, b_ne_zero⟩ := (I : Ideal S).ne_bot_iff.mp (nonZeroDivisors.coe_ne_zero I)\n      exact ⟨_, ⟨b, b_mem, b_ne_zero, rfl⟩⟩)\n· refine' ⟨b, b_mem, b_ne_zero, _⟩\n  intro c hc lt\n  contrapose! lt with c_ne_zero\n  exact min _ ⟨c, hc, c_ne_zero, rfl⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nI : { x // x ∈ (Ideal S)⁰ }\n⊢ ∃ b, b ∈ ↑I ∧ b ≠ 0 ∧ ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\n[PROOFSTEP]\nobtain ⟨_, ⟨b, b_mem, b_ne_zero, rfl⟩, min⟩ :=\n  @Int.exists_least_of_bdd (fun a => ∃ b ∈ (I : Ideal S), b ≠ (0 : S) ∧ abv (Algebra.norm R b) = a) _\n    (by\n      use 0\n      rintro _ ⟨b, _, _, rfl⟩\n      apply abv.nonneg)\n    (by\n      obtain ⟨b, b_mem, b_ne_zero⟩ := (I : Ideal S).ne_bot_iff.mp (nonZeroDivisors.coe_ne_zero I)\n      exact ⟨_, ⟨b, b_mem, b_ne_zero, rfl⟩⟩)\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nI : { x // x ∈ (Ideal S)⁰ }\n⊢ ∃ b, ∀ (z : ℤ), (fun a => ∃ b, b ∈ ↑I ∧ b ≠ 0 ∧ ↑abv (↑(Algebra.norm R) b) = a) z → b ≤ z\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nI : { x // x ∈ (Ideal S)⁰ }\n⊢ ∀ (z : ℤ), (fun a => ∃ b, b ∈ ↑I ∧ b ≠ 0 ∧ ↑abv (↑(Algebra.norm R) b) = a) z → 0 ≤ z\n[PROOFSTEP]\nrintro _ ⟨b, _, _, rfl⟩\n[GOAL]\ncase h.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nI : { x // x ∈ (Ideal S)⁰ }\nb : S\nleft✝¹ : b ∈ ↑I\nleft✝ : b ≠ 0\n⊢ 0 ≤ ↑abv (↑(Algebra.norm R) b)\n[PROOFSTEP]\napply abv.nonneg\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nI : { x // x ∈ (Ideal S)⁰ }\n⊢ ∃ z, (fun a => ∃ b, b ∈ ↑I ∧ b ≠ 0 ∧ ↑abv (↑(Algebra.norm R) b) = a) z\n[PROOFSTEP]\nobtain ⟨b, b_mem, b_ne_zero⟩ := (I : Ideal S).ne_bot_iff.mp (nonZeroDivisors.coe_ne_zero I)\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nI : { x // x ∈ (Ideal S)⁰ }\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\n⊢ ∃ z, (fun a => ∃ b, b ∈ ↑I ∧ b ≠ 0 ∧ ↑abv (↑(Algebra.norm R) b) = a) z\n[PROOFSTEP]\nexact ⟨_, ⟨b, b_mem, b_ne_zero, rfl⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nI : { x // x ∈ (Ideal S)⁰ }\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nmin : ∀ (z : ℤ), (∃ b, b ∈ ↑I ∧ b ≠ 0 ∧ ↑abv (↑(Algebra.norm R) b) = z) → ↑abv (↑(Algebra.norm R) b) ≤ z\n⊢ ∃ b, b ∈ ↑I ∧ b ≠ 0 ∧ ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\n[PROOFSTEP]\nrefine' ⟨b, b_mem, b_ne_zero, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nI : { x // x ∈ (Ideal S)⁰ }\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nmin : ∀ (z : ℤ), (∃ b, b ∈ ↑I ∧ b ≠ 0 ∧ ↑abv (↑(Algebra.norm R) b) = z) → ↑abv (↑(Algebra.norm R) b) ≤ z\n⊢ ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\n[PROOFSTEP]\nintro c hc lt\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nI : { x // x ∈ (Ideal S)⁰ }\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nmin : ∀ (z : ℤ), (∃ b, b ∈ ↑I ∧ b ≠ 0 ∧ ↑abv (↑(Algebra.norm R) b) = z) → ↑abv (↑(Algebra.norm R) b) ≤ z\nc : S\nhc : c ∈ ↑I\nlt : ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b)\n⊢ c = 0\n[PROOFSTEP]\ncontrapose! lt with c_ne_zero\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁴ : EuclideanDomain R\ninst✝¹³ : CommRing S\ninst✝¹² : IsDomain S\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : Algebra R S\ninst✝² : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nbS : Basis ι R S\nI : { x // x ∈ (Ideal S)⁰ }\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nmin : ∀ (z : ℤ), (∃ b, b ∈ ↑I ∧ b ≠ 0 ∧ ↑abv (↑(Algebra.norm R) b) = z) → ↑abv (↑(Algebra.norm R) b) ≤ z\nc : S\nhc : c ∈ ↑I\nc_ne_zero : c ≠ 0\n⊢ ↑abv (↑(Algebra.norm R) b) ≤ ↑abv (↑(Algebra.norm R) c)\n[PROOFSTEP]\nexact min _ ⟨c, hc, c_ne_zero, rfl⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nx : R\n⊢ x ∈ finsetApprox bS adm ↔ ∃ i j, i ≠ j ∧ ↑(distinctElems bS adm) i - ↑(distinctElems bS adm) j = x\n[PROOFSTEP]\nsimp only [finsetApprox, Finset.mem_erase, Finset.mem_image]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nx : R\n⊢ (x ≠ 0 ∧ ∃ a, a ∈ Finset.univ ∧ ↑(distinctElems bS adm) a.fst - ↑(distinctElems bS adm) a.snd = x) ↔\n    ∃ i j, i ≠ j ∧ ↑(distinctElems bS adm) i - ↑(distinctElems bS adm) j = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nx : R\n⊢ (x ≠ 0 ∧ ∃ a, a ∈ Finset.univ ∧ ↑(distinctElems bS adm) a.fst - ↑(distinctElems bS adm) a.snd = x) →\n    ∃ i j, i ≠ j ∧ ↑(distinctElems bS adm) i - ↑(distinctElems bS adm) j = x\n[PROOFSTEP]\nrintro ⟨hx, ⟨i, j⟩, _, rfl⟩\n[GOAL]\ncase mp.intro.intro.mk.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\ni j : Fin (Nat.succ (cardM bS adm))\nleft✝ : (i, j) ∈ Finset.univ\nhx : ↑(distinctElems bS adm) (i, j).fst - ↑(distinctElems bS adm) (i, j).snd ≠ 0\n⊢ ∃ i_1 j_1,\n    i_1 ≠ j_1 ∧\n      ↑(distinctElems bS adm) i_1 - ↑(distinctElems bS adm) j_1 =\n        ↑(distinctElems bS adm) (i, j).fst - ↑(distinctElems bS adm) (i, j).snd\n[PROOFSTEP]\nrefine' ⟨i, j, _, rfl⟩\n[GOAL]\ncase mp.intro.intro.mk.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\ni j : Fin (Nat.succ (cardM bS adm))\nleft✝ : (i, j) ∈ Finset.univ\nhx : ↑(distinctElems bS adm) (i, j).fst - ↑(distinctElems bS adm) (i, j).snd ≠ 0\n⊢ i ≠ j\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp.intro.intro.mk.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\ni : Fin (Nat.succ (cardM bS adm))\nleft✝ : (i, i) ∈ Finset.univ\nhx : ↑(distinctElems bS adm) (i, i).fst - ↑(distinctElems bS adm) (i, i).snd ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp at hx \n[GOAL]\ncase mpr\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nx : R\n⊢ (∃ i j, i ≠ j ∧ ↑(distinctElems bS adm) i - ↑(distinctElems bS adm) j = x) →\n    x ≠ 0 ∧ ∃ a, a ∈ Finset.univ ∧ ↑(distinctElems bS adm) a.fst - ↑(distinctElems bS adm) a.snd = x\n[PROOFSTEP]\nrintro ⟨i, j, hij, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\ni j : Fin (Nat.succ (cardM bS adm))\nhij : i ≠ j\n⊢ ↑(distinctElems bS adm) i - ↑(distinctElems bS adm) j ≠ 0 ∧\n    ∃ a,\n      a ∈ Finset.univ ∧\n        ↑(distinctElems bS adm) a.fst - ↑(distinctElems bS adm) a.snd =\n          ↑(distinctElems bS adm) i - ↑(distinctElems bS adm) j\n[PROOFSTEP]\nrefine' ⟨_, ⟨i, j⟩, Finset.mem_univ _, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\ni j : Fin (Nat.succ (cardM bS adm))\nhij : i ≠ j\n⊢ ↑(distinctElems bS adm) i - ↑(distinctElems bS adm) j ≠ 0\n[PROOFSTEP]\nrw [Ne.def, sub_eq_zero]\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\ni j : Fin (Nat.succ (cardM bS adm))\nhij : i ≠ j\n⊢ ¬↑(distinctElems bS adm) i = ↑(distinctElems bS adm) j\n[PROOFSTEP]\nexact fun h => hij ((distinctElems bS adm).injective h)\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nhave dim_pos := Fintype.card_pos_iff.mpr bS.index_nonempty\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nset ε : ℝ := normBound abv bS ^ (-1 / Fintype.card ι : ℝ) with ε_eq\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nhave hε : 0 < ε := Real.rpow_pos_of_pos (Int.cast_pos.mpr (normBound_pos abv bS)) _\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nhave ε_le : (normBound abv bS : ℝ) * (abv b • ε) ^ Fintype.card ι ≤ abv b ^ Fintype.card ι :=\n  by\n  have := normBound_pos abv bS\n  have := abv.nonneg b\n  rw [ε_eq, Algebra.smul_def, eq_intCast, mul_rpow, ← rpow_mul, div_mul_cancel, rpow_neg_one, mul_left_comm,\n      mul_inv_cancel, mul_one, rpow_nat_cast] <;>\n    try norm_cast; linarith\n  · exact Iff.mpr Int.cast_nonneg this\n  · linarith\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\n⊢ ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\n[PROOFSTEP]\nhave := normBound_pos abv bS\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis : 0 < normBound abv bS\n⊢ ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\n[PROOFSTEP]\nhave := abv.nonneg b\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\n[PROOFSTEP]\nrw [ε_eq, Algebra.smul_def, eq_intCast, mul_rpow, ← rpow_mul, div_mul_cancel, rpow_neg_one, mul_left_comm,\n  mul_inv_cancel, mul_one, rpow_nat_cast]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ ↑(normBound abv bS) ≠ 0\n[PROOFSTEP]\ntry norm_cast; linarith\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ ↑(normBound abv bS) ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ ¬normBound abv bS = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ ↑(Fintype.card ι) ≠ 0\n[PROOFSTEP]\ntry norm_cast; linarith\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ ↑(Fintype.card ι) ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ ¬Fintype.card ι = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase hx\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ 0 ≤ ↑(normBound abv bS)\n[PROOFSTEP]\ntry norm_cast; linarith\n[GOAL]\ncase hx\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ 0 ≤ ↑(normBound abv bS)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase hx\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ 0 ≤ normBound abv bS\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ 0 ≤ ↑(↑abv b)\n[PROOFSTEP]\ntry norm_cast; linarith\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ 0 ≤ ↑(↑abv b)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h₁\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ 0 ≤ ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\n[PROOFSTEP]\ntry norm_cast; linarith\n[GOAL]\ncase h₁\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ 0 ≤ ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h₁\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ 0 ≤ ↑(normBound abv bS) ^ ↑(Rat.divInt (Int.negSucc 0) ↑(Fintype.card ι))\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ 0 ≤ ↑(↑abv b)\n[PROOFSTEP]\nexact Iff.mpr Int.cast_nonneg this\n[GOAL]\ncase h₁\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nthis✝ : 0 < normBound abv bS\nthis : 0 ≤ ↑abv b\n⊢ 0 ≤ ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\n[PROOFSTEP]\nlinarith\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nset μ : Fin (cardM bS adm).succ ↪ R := distinctElems bS adm with hμ\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nlet s : ι →₀ R := bS.repr a\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nhave s_eq : ∀ i, s i = bS.repr a i := fun i => rfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nlet qs : Fin (cardM bS adm).succ → ι → R := fun j i => μ j * s i / b\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nlet rs : Fin (cardM bS adm).succ → ι → R := fun j i => μ j * s i % b\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nhave r_eq : ∀ j i, rs j i = μ j * s i % b := fun i j => rfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nhave μ_eq : ∀ i j, μ j * s i = b * qs j i + rs j i := by\n  intro i j\n  rw [r_eq, EuclideanDomain.div_add_mod]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\n⊢ ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\n[PROOFSTEP]\nintro i j\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\ni : ι\nj : Fin (Nat.succ (cardM bS adm))\n⊢ ↑μ j * ↑s i = b * qs j i + rs j i\n[PROOFSTEP]\nrw [r_eq, EuclideanDomain.div_add_mod]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nhave μ_mul_a_eq : ∀ j, μ j • a = b • ∑ i, qs j i • bS i + ∑ i, rs j i • bS i :=\n  by\n  intro j\n  rw [← bS.sum_repr a]\n  simp only [Finset.smul_sum, ← Finset.sum_add_distrib]\n  refine'\n    Finset.sum_congr rfl fun i _ =>\n      _\n        -- Porting note `← hμ, ← r_eq` and the final `← μ_eq` were not needed.\n  rw [← hμ, ← r_eq, ← s_eq, ← mul_smul, μ_eq, add_smul, mul_smul, ← μ_eq]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\n⊢ ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\n[PROOFSTEP]\nintro j\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nj : Fin (Nat.succ (cardM bS adm))\n⊢ ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\n[PROOFSTEP]\nrw [← bS.sum_repr a]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nj : Fin (Nat.succ (cardM bS adm))\n⊢ ↑μ j • ∑ i : ι, ↑(↑bS.repr a) i • ↑bS i = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\n[PROOFSTEP]\nsimp only [Finset.smul_sum, ← Finset.sum_add_distrib]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nj : Fin (Nat.succ (cardM bS adm))\n⊢ ∑ x : ι, ↑(distinctElems bS adm) j • ↑(↑bS.repr a) x • ↑bS x =\n    ∑ x : ι,\n      (b • (↑(distinctElems bS adm) j * ↑(↑bS.repr a) x / b) • ↑bS x +\n        (↑(distinctElems bS adm) j * ↑(↑bS.repr a) x % b) • ↑bS x)\n[PROOFSTEP]\nrefine'\n  Finset.sum_congr rfl fun i _ =>\n    _\n      -- Porting note `← hμ, ← r_eq` and the final `← μ_eq` were not needed.\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nj : Fin (Nat.succ (cardM bS adm))\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ ↑(distinctElems bS adm) j • ↑(↑bS.repr a) i • ↑bS i =\n    b • (↑(distinctElems bS adm) j * ↑(↑bS.repr a) i / b) • ↑bS i +\n      (↑(distinctElems bS adm) j * ↑(↑bS.repr a) i % b) • ↑bS i\n[PROOFSTEP]\nrw [← hμ, ← r_eq, ← s_eq, ← mul_smul, μ_eq, add_smul, mul_smul, ← μ_eq]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nobtain ⟨j, k, j_ne_k, hjk⟩ := adm.exists_approx hε hb fun j i => μ j * s i\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nhave hjk' : ∀ i, (abv (rs k i - rs j i) : ℝ) < abv b • ε := by simpa only [r_eq] using hjk\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\n⊢ ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\n[PROOFSTEP]\nsimpa only [r_eq] using hjk\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nlet q := ∑ i, (qs k i - qs j i) • bS i\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nset r := μ k - μ j with r_eq\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq✝ : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\nr : R := ↑μ k - ↑μ j\nr_eq : r = ↑μ k - ↑μ j\n⊢ ∃ q r,\n    r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nrefine' ⟨q, r, (mem_finsetApprox bS adm).mpr _, _⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq✝ : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\nr : R := ↑μ k - ↑μ j\nr_eq : r = ↑μ k - ↑μ j\n⊢ ∃ i j, i ≠ j ∧ ↑(distinctElems bS adm) i - ↑(distinctElems bS adm) j = r\n[PROOFSTEP]\nexact ⟨k, j, j_ne_k.symm, rfl⟩\n[GOAL]\ncase intro.intro.intro.refine'_2\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq✝ : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\nr : R := ↑μ k - ↑μ j\nr_eq : r = ↑μ k - ↑μ j\n⊢ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nhave : r • a - b • q = ∑ x : ι, (rs k x • bS x - rs j x • bS x) :=\n  by\n  simp only [r_eq, sub_smul, μ_mul_a_eq, Finset.smul_sum, ← Finset.sum_add_distrib, ← Finset.sum_sub_distrib, smul_sub]\n  refine' Finset.sum_congr rfl fun x _ => _\n  ring\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq✝ : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\nr : R := ↑μ k - ↑μ j\nr_eq : r = ↑μ k - ↑μ j\n⊢ r • a - b • q = ∑ x : ι, (rs k x • ↑bS x - rs j x • ↑bS x)\n[PROOFSTEP]\nsimp only [r_eq, sub_smul, μ_mul_a_eq, Finset.smul_sum, ← Finset.sum_add_distrib, ← Finset.sum_sub_distrib, smul_sub]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq✝ : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\nr : R := ↑μ k - ↑μ j\nr_eq : r = ↑μ k - ↑μ j\n⊢ ∑ x : ι,\n      (b • (↑(distinctElems bS adm) k * ↑(↑bS.repr a) x / b) • ↑bS x +\n            (↑(distinctElems bS adm) k * ↑(↑bS.repr a) x % b) • ↑bS x -\n          (b • (↑(distinctElems bS adm) j * ↑(↑bS.repr a) x / b) • ↑bS x +\n            (↑(distinctElems bS adm) j * ↑(↑bS.repr a) x % b) • ↑bS x) -\n        (b • (↑(distinctElems bS adm) k * ↑(↑bS.repr a) x / b) • ↑bS x -\n          b • (↑(distinctElems bS adm) j * ↑(↑bS.repr a) x / b) • ↑bS x)) =\n    ∑ x : ι,\n      ((↑(distinctElems bS adm) k * ↑(↑bS.repr a) x % b) • ↑bS x -\n        (↑(distinctElems bS adm) j * ↑(↑bS.repr a) x % b) • ↑bS x)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun x _ => _\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq✝ : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\nr : R := ↑μ k - ↑μ j\nr_eq : r = ↑μ k - ↑μ j\nx : ι\nx✝ : x ∈ Finset.univ\n⊢ b • (↑(distinctElems bS adm) k * ↑(↑bS.repr a) x / b) • ↑bS x +\n          (↑(distinctElems bS adm) k * ↑(↑bS.repr a) x % b) • ↑bS x -\n        (b • (↑(distinctElems bS adm) j * ↑(↑bS.repr a) x / b) • ↑bS x +\n          (↑(distinctElems bS adm) j * ↑(↑bS.repr a) x % b) • ↑bS x) -\n      (b • (↑(distinctElems bS adm) k * ↑(↑bS.repr a) x / b) • ↑bS x -\n        b • (↑(distinctElems bS adm) j * ↑(↑bS.repr a) x / b) • ↑bS x) =\n    (↑(distinctElems bS adm) k * ↑(↑bS.repr a) x % b) • ↑bS x -\n      (↑(distinctElems bS adm) j * ↑(↑bS.repr a) x % b) • ↑bS x\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro.refine'_2\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq✝ : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\nr : R := ↑μ k - ↑μ j\nr_eq : r = ↑μ k - ↑μ j\nthis : r • a - b • q = ∑ x : ι, (rs k x • ↑bS x - rs j x • ↑bS x)\n⊢ ↑abv (↑(Algebra.norm R) (r • a - b • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b))\n[PROOFSTEP]\nrw [this, Algebra.norm_algebraMap_of_basis bS, abv.map_pow]\n[GOAL]\ncase intro.intro.intro.refine'_2\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq✝ : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\nr : R := ↑μ k - ↑μ j\nr_eq : r = ↑μ k - ↑μ j\nthis : r • a - b • q = ∑ x : ι, (rs k x • ↑bS x - rs j x • ↑bS x)\n⊢ ↑abv (↑(Algebra.norm R) (∑ x : ι, (rs k x • ↑bS x - rs j x • ↑bS x))) < ↑abv b ^ Fintype.card ι\n[PROOFSTEP]\nrefine' Int.cast_lt.mp ((norm_lt abv bS _ fun i => lt_of_le_of_lt _ (hjk' i)).trans_le _)\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_1\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq✝ : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\nr : R := ↑μ k - ↑μ j\nr_eq : r = ↑μ k - ↑μ j\nthis : r • a - b • q = ∑ x : ι, (rs k x • ↑bS x - rs j x • ↑bS x)\ni : ι\n⊢ ↑(↑abv (↑(↑bS.repr (∑ x : ι, (rs k x • ↑bS x - rs j x • ↑bS x))) i)) ≤ ↑(↑abv (rs k i - rs j i))\n[PROOFSTEP]\napply le_of_eq\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_1.a\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq✝ : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\nr : R := ↑μ k - ↑μ j\nr_eq : r = ↑μ k - ↑μ j\nthis : r • a - b • q = ∑ x : ι, (rs k x • ↑bS x - rs j x • ↑bS x)\ni : ι\n⊢ ↑(↑abv (↑(↑bS.repr (∑ x : ι, (rs k x • ↑bS x - rs j x • ↑bS x))) i)) = ↑(↑abv (rs k i - rs j i))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_1.a.e_a.h.e_6.h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq✝ : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\nr : R := ↑μ k - ↑μ j\nr_eq : r = ↑μ k - ↑μ j\nthis : r • a - b • q = ∑ x : ι, (rs k x • ↑bS x - rs j x • ↑bS x)\ni : ι\n⊢ ↑(↑bS.repr (∑ x : ι, (rs k x • ↑bS x - rs j x • ↑bS x))) i = rs k i - rs j i\n[PROOFSTEP]\nsimp_rw [LinearEquiv.map_sum, LinearEquiv.map_sub, LinearEquiv.map_smul, Finset.sum_apply', Finsupp.sub_apply,\n  Finsupp.smul_apply, Finset.sum_sub_distrib, Basis.repr_self_apply, smul_eq_mul, mul_boole, Finset.sum_ite_eq',\n  Finset.mem_univ, if_true]\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_2\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\na : S\nb : R\nhb : b ≠ 0\ndim_pos : 0 < Fintype.card ι\nε : ℝ := ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nε_eq : ε = ↑(normBound abv bS) ^ (-1 / ↑(Fintype.card ι))\nhε : 0 < ε\nε_le : ↑(normBound abv bS) * (↑abv b • ε) ^ ↑(Fintype.card ι) ≤ ↑(↑abv b) ^ ↑(Fintype.card ι)\nμ : Fin (Nat.succ (cardM bS adm)) ↪ R := distinctElems bS adm\nhμ : μ = distinctElems bS adm\ns : ι →₀ R := ↑bS.repr a\ns_eq : ∀ (i : ι), ↑s i = ↑(↑bS.repr a) i\nqs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i / b\nrs : Fin (Nat.succ (cardM bS adm)) → ι → R := fun j i => ↑μ j * ↑s i % b\nr_eq✝ : ∀ (j : Fin (Nat.succ (cardM bS adm))) (i : ι), rs j i = ↑μ j * ↑s i % b\nμ_eq : ∀ (i : ι) (j : Fin (Nat.succ (cardM bS adm))), ↑μ j * ↑s i = b * qs j i + rs j i\nμ_mul_a_eq : ∀ (j : Fin (Nat.succ (cardM bS adm))), ↑μ j • a = b • ∑ i : ι, qs j i • ↑bS i + ∑ i : ι, rs j i • ↑bS i\nj k : Fin (Nat.succ (AbsoluteValue.IsAdmissible.card adm ε ^ Fintype.card ι))\nj_ne_k : j ≠ k\nhjk : ∀ (k_1 : ι), ↑(↑abv (↑μ k * ↑s k_1 % b - ↑μ j * ↑s k_1 % b)) < ↑abv b • ε\nhjk' : ∀ (i : ι), ↑(↑abv (rs k i - rs j i)) < ↑abv b • ε\nq : S := ∑ i : ι, (qs k i - qs j i) • ↑bS i\nr : R := ↑μ k - ↑μ j\nr_eq : r = ↑μ k - ↑μ j\nthis : r • a - b • q = ∑ x : ι, (rs k x • ↑bS x - rs j x • ↑bS x)\n⊢ ↑(normBound abv bS) * (↑abv b • ε) ^ Fintype.card ι ≤ ↑(↑abv b ^ Fintype.card ι)\n[PROOFSTEP]\nexact_mod_cast ε_le\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nh : Algebra.IsAlgebraic R L\na b : S\nhb : b ≠ 0\n⊢ ∃ q r, r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - q * b)) < ↑abv (↑(Algebra.norm R) b)\n[PROOFSTEP]\nhave inj : Function.Injective (algebraMap R L) :=\n  by\n  rw [IsScalarTower.algebraMap_eq R S L]\n  exact (IsIntegralClosure.algebraMap_injective S R L).comp bS.algebraMap_injective\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nh : Algebra.IsAlgebraic R L\na b : S\nhb : b ≠ 0\n⊢ Function.Injective ↑(algebraMap R L)\n[PROOFSTEP]\nrw [IsScalarTower.algebraMap_eq R S L]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nh : Algebra.IsAlgebraic R L\na b : S\nhb : b ≠ 0\n⊢ Function.Injective ↑(RingHom.comp (algebraMap S L) (algebraMap R S))\n[PROOFSTEP]\nexact (IsIntegralClosure.algebraMap_injective S R L).comp bS.algebraMap_injective\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nh : Algebra.IsAlgebraic R L\na b : S\nhb : b ≠ 0\ninj : Function.Injective ↑(algebraMap R L)\n⊢ ∃ q r, r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - q * b)) < ↑abv (↑(Algebra.norm R) b)\n[PROOFSTEP]\nobtain ⟨a', b', hb', h⟩ := IsIntegralClosure.exists_smul_eq_mul h inj a hb\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nh✝ : Algebra.IsAlgebraic R L\na b : S\nhb : b ≠ 0\ninj : Function.Injective ↑(algebraMap R L)\na' : S\nb' : R\nhb' : b' ≠ 0\nh : b' • a = b * a'\n⊢ ∃ q r, r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - q * b)) < ↑abv (↑(Algebra.norm R) b)\n[PROOFSTEP]\nobtain ⟨q, r, hr, hqr⟩ := exists_mem_finsetApprox bS adm a' hb'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nh✝ : Algebra.IsAlgebraic R L\na b : S\nhb : b ≠ 0\ninj : Function.Injective ↑(algebraMap R L)\na' : S\nb' : R\nhb' : b' ≠ 0\nh : b' • a = b * a'\nq : S\nr : R\nhr : r ∈ finsetApprox bS adm\nhqr : ↑abv (↑(Algebra.norm R) (r • a' - b' • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b'))\n⊢ ∃ q r, r ∈ finsetApprox bS adm ∧ ↑abv (↑(Algebra.norm R) (r • a - q * b)) < ↑abv (↑(Algebra.norm R) b)\n[PROOFSTEP]\nrefine' ⟨q, r, hr, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nh✝ : Algebra.IsAlgebraic R L\na b : S\nhb : b ≠ 0\ninj : Function.Injective ↑(algebraMap R L)\na' : S\nb' : R\nhb' : b' ≠ 0\nh : b' • a = b * a'\nq : S\nr : R\nhr : r ∈ finsetApprox bS adm\nhqr : ↑abv (↑(Algebra.norm R) (r • a' - b' • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b'))\n⊢ ↑abv (↑(Algebra.norm R) (r • a - q * b)) < ↑abv (↑(Algebra.norm R) b)\n[PROOFSTEP]\nrefine' lt_of_mul_lt_mul_left _ (show 0 ≤ abv (Algebra.norm R (algebraMap R S b')) from abv.nonneg _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nh✝ : Algebra.IsAlgebraic R L\na b : S\nhb : b ≠ 0\ninj : Function.Injective ↑(algebraMap R L)\na' : S\nb' : R\nhb' : b' ≠ 0\nh : b' • a = b * a'\nq : S\nr : R\nhr : r ∈ finsetApprox bS adm\nhqr : ↑abv (↑(Algebra.norm R) (r • a' - b' • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b'))\n⊢ ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b')) * ↑abv (↑(Algebra.norm R) (r • a - q * b)) <\n    ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b')) * ↑abv (↑(Algebra.norm R) b)\n[PROOFSTEP]\nrefine'\n  lt_of_le_of_lt (le_of_eq _)\n    (mul_lt_mul hqr le_rfl (abv.pos ((Algebra.norm_ne_zero_iff_of_basis bS).mpr hb)) (abv.nonneg _))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nh✝ : Algebra.IsAlgebraic R L\na b : S\nhb : b ≠ 0\ninj : Function.Injective ↑(algebraMap R L)\na' : S\nb' : R\nhb' : b' ≠ 0\nh : b' • a = b * a'\nq : S\nr : R\nhr : r ∈ finsetApprox bS adm\nhqr : ↑abv (↑(Algebra.norm R) (r • a' - b' • q)) < ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b'))\n⊢ ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) b')) * ↑abv (↑(Algebra.norm R) (r • a - q * b)) =\n    ↑abv (↑(Algebra.norm R) (r • a' - b' • q)) * ↑abv (↑(Algebra.norm R) b)\n[PROOFSTEP]\nrw [← abv.map_mul, ← MonoidHom.map_mul, ← abv.map_mul, ← MonoidHom.map_mul, ← Algebra.smul_def, smul_sub b', sub_mul,\n  smul_comm, h, mul_comm b a', Algebra.smul_mul_assoc r a' b, Algebra.smul_mul_assoc b' q b]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\n⊢ ↑(algebraMap R S) (∏ m in finsetApprox bS adm, m) ≠ 0\n[PROOFSTEP]\nrefine' mt ((injective_iff_map_eq_zero _).mp bS.algebraMap_injective _) _\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\n⊢ ¬∏ m in finsetApprox bS adm, m = 0\n[PROOFSTEP]\nsimp only [Finset.prod_eq_zero_iff, not_exists]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\n⊢ ∀ (x : R), ¬(x ∈ finsetApprox bS adm ∧ x = 0)\n[PROOFSTEP]\nrintro x ⟨hx, rfl⟩\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nhx : 0 ∈ finsetApprox bS adm\n⊢ False\n[PROOFSTEP]\nexact finsetApprox.zero_not_mem bS adm hx\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\n⊢ ∃ J, ↑mk0 I = ↑mk0 J ∧ ↑(algebraMap R S) (∏ m in finsetApprox bS adm, m) ∈ ↑J\n[PROOFSTEP]\nset M := ∏ m in finsetApprox bS adm, m\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\n⊢ ∃ J, ↑mk0 I = ↑mk0 J ∧ ↑(algebraMap R S) M ∈ ↑J\n[PROOFSTEP]\nhave hM : algebraMap R S M ≠ 0 := prod_finsetApprox_ne_zero bS adm\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\n⊢ ∃ J, ↑mk0 I = ↑mk0 J ∧ ↑(algebraMap R S) M ∈ ↑J\n[PROOFSTEP]\nobtain ⟨b, b_mem, b_ne_zero, b_min⟩ := exists_min abv I\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\n⊢ ∃ J, ↑mk0 I = ↑mk0 J ∧ ↑(algebraMap R S) M ∈ ↑J\n[PROOFSTEP]\nsuffices Ideal.span { b } ∣ Ideal.span {algebraMap _ _ M} * I.1\n  by\n  obtain ⟨J, hJ⟩ := this\n  refine' ⟨⟨J, _⟩, _, _⟩\n  · rw [mem_nonZeroDivisors_iff_ne_zero]\n    rintro rfl\n    rw [Ideal.zero_eq_bot, Ideal.mul_bot] at hJ \n    exact hM (Ideal.span_singleton_eq_bot.mp (I.2 _ hJ))\n  · rw [ClassGroup.mk0_eq_mk0_iff]\n    exact ⟨algebraMap _ _ M, b, hM, b_ne_zero, hJ⟩\n  rw [← SetLike.mem_coe, ← Set.singleton_subset_iff, ← Ideal.span_le, ← Ideal.dvd_iff_le]\n  refine' (mul_dvd_mul_iff_left _).mp _\n  swap; · exact mt Ideal.span_singleton_eq_bot.mp b_ne_zero\n  rw [Subtype.coe_mk, Ideal.dvd_iff_le, ← hJ, mul_comm]\n  apply Ideal.mul_mono le_rfl\n  rw [Ideal.span_le, Set.singleton_subset_iff]\n  exact b_mem\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nthis : Ideal.span {b} ∣ Ideal.span {↑(algebraMap R S) M} * ↑I\n⊢ ∃ J, ↑mk0 I = ↑mk0 J ∧ ↑(algebraMap R S) M ∈ ↑J\n[PROOFSTEP]\nobtain ⟨J, hJ⟩ := this\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ ∃ J, ↑mk0 I = ↑mk0 J ∧ ↑(algebraMap R S) M ∈ ↑J\n[PROOFSTEP]\nrefine' ⟨⟨J, _⟩, _, _⟩\n[GOAL]\ncase intro.refine'_1\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ J ∈ (Ideal S)⁰\n[PROOFSTEP]\nrw [mem_nonZeroDivisors_iff_ne_zero]\n[GOAL]\ncase intro.refine'_1\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ J ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro.refine'_1\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * 0\n⊢ False\n[PROOFSTEP]\nrw [Ideal.zero_eq_bot, Ideal.mul_bot] at hJ \n[GOAL]\ncase intro.refine'_1\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = ⊥\n⊢ False\n[PROOFSTEP]\nexact hM (Ideal.span_singleton_eq_bot.mp (I.2 _ hJ))\n[GOAL]\ncase intro.refine'_2\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ ↑mk0 I = ↑mk0 { val := J, property := (_ : J ∈ (Ideal S)⁰) }\n[PROOFSTEP]\nrw [ClassGroup.mk0_eq_mk0_iff]\n[GOAL]\ncase intro.refine'_2\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ ∃ x y _hx _hy, Ideal.span {x} * ↑I = Ideal.span {y} * ↑{ val := J, property := (_ : J ∈ (Ideal S)⁰) }\n[PROOFSTEP]\nexact ⟨algebraMap _ _ M, b, hM, b_ne_zero, hJ⟩\n[GOAL]\ncase intro.refine'_3\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ ↑(algebraMap R S) M ∈ ↑{ val := J, property := (_ : J ∈ (Ideal S)⁰) }\n[PROOFSTEP]\nrw [← SetLike.mem_coe, ← Set.singleton_subset_iff, ← Ideal.span_le, ← Ideal.dvd_iff_le]\n[GOAL]\ncase intro.refine'_3\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ ↑{ val := J, property := (_ : J ∈ (Ideal S)⁰) } ∣ Ideal.span {↑(algebraMap R S) M}\n[PROOFSTEP]\nrefine' (mul_dvd_mul_iff_left _).mp _\n[GOAL]\ncase intro.refine'_3.refine'_1\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ Ideal ((fun x => S) M)\ncase intro.refine'_3.refine'_2\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ ?intro.refine'_3.refine'_1 ≠ 0\ncase intro.refine'_3.refine'_3\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ ?intro.refine'_3.refine'_1 * ↑{ val := J, property := (_ : J ∈ (Ideal S)⁰) } ∣\n    ?intro.refine'_3.refine'_1 * Ideal.span {↑(algebraMap R S) M}\n[PROOFSTEP]\nswap\n[GOAL]\ncase intro.refine'_3.refine'_2\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ ?intro.refine'_3.refine'_1 ≠ 0\n[PROOFSTEP]\nexact mt Ideal.span_singleton_eq_bot.mp b_ne_zero\n[GOAL]\ncase intro.refine'_3.refine'_3\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ Ideal.span {b} * ↑{ val := J, property := (_ : J ∈ (Ideal S)⁰) } ∣ Ideal.span {b} * Ideal.span {↑(algebraMap R S) M}\n[PROOFSTEP]\nrw [Subtype.coe_mk, Ideal.dvd_iff_le, ← hJ, mul_comm]\n[GOAL]\ncase intro.refine'_3.refine'_3\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ Ideal.span {↑(algebraMap R S) M} * Ideal.span {b} ≤ Ideal.span {↑(algebraMap R S) M} * ↑I\n[PROOFSTEP]\napply Ideal.mul_mono le_rfl\n[GOAL]\ncase intro.refine'_3.refine'_3\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ Ideal.span {b} ≤ ↑I\n[PROOFSTEP]\nrw [Ideal.span_le, Set.singleton_subset_iff]\n[GOAL]\ncase intro.refine'_3.refine'_3\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nJ : Ideal S\nhJ : Ideal.span {↑(algebraMap R S) M} * ↑I = Ideal.span {b} * J\n⊢ b ∈ ↑↑I\n[PROOFSTEP]\nexact b_mem\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\n⊢ Ideal.span {b} ∣ Ideal.span {↑(algebraMap R S) M} * ↑I\n[PROOFSTEP]\nrw [Ideal.dvd_iff_le, Ideal.mul_le]\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\n⊢ ∀ (r : (fun x => S) M), r ∈ Ideal.span {↑(algebraMap R S) M} → ∀ (s : (fun x => S) M), s ∈ ↑I → r * s ∈ Ideal.span {b}\n[PROOFSTEP]\nintro r' hr' a ha\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nr' : S\nhr' : r' ∈ Ideal.span {↑(algebraMap R S) M}\na : S\nha : a ∈ ↑I\n⊢ r' * a ∈ Ideal.span {b}\n[PROOFSTEP]\nrw [Ideal.mem_span_singleton] at hr' ⊢\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nr' : S\nhr' : ↑(algebraMap R S) M ∣ r'\na : S\nha : a ∈ ↑I\n⊢ b ∣ r' * a\n[PROOFSTEP]\nobtain ⟨q, r, r_mem, lt⟩ := exists_mem_finset_approx' L bS adm h a b_ne_zero\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nr' : S\nhr' : ↑(algebraMap R S) M ∣ r'\na : S\nha : a ∈ ↑I\nq : S\nr : R\nr_mem : r ∈ finsetApprox bS adm\nlt : ↑abv (↑(Algebra.norm R) (r • a - q * b)) < ↑abv (↑(Algebra.norm R) b)\n⊢ b ∣ r' * a\n[PROOFSTEP]\napply @dvd_of_mul_left_dvd _ _ q\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nr' : S\nhr' : ↑(algebraMap R S) M ∣ r'\na : S\nha : a ∈ ↑I\nq : S\nr : R\nr_mem : r ∈ finsetApprox bS adm\nlt : ↑abv (↑(Algebra.norm R) (r • a - q * b)) < ↑abv (↑(Algebra.norm R) b)\n⊢ q * b ∣ r' * a\n[PROOFSTEP]\nsimp only [Algebra.smul_def] at lt \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nr' : S\nhr' : ↑(algebraMap R S) M ∣ r'\na : S\nha : a ∈ ↑I\nq : S\nr : R\nr_mem : r ∈ finsetApprox bS adm\nlt : ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) r * a - q * b)) < ↑abv (↑(Algebra.norm R) b)\n⊢ q * b ∣ r' * a\n[PROOFSTEP]\nrw [← sub_eq_zero.mp (b_min _ (I.1.sub_mem (I.1.mul_mem_left _ ha) (I.1.mul_mem_left _ b_mem)) lt)]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nr' : S\nhr' : ↑(algebraMap R S) M ∣ r'\na : S\nha : a ∈ ↑I\nq : S\nr : R\nr_mem : r ∈ finsetApprox bS adm\nlt : ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) r * a - q * b)) < ↑abv (↑(Algebra.norm R) b)\n⊢ ↑(algebraMap R S) r * a ∣ r' * a\n[PROOFSTEP]\nrefine' mul_dvd_mul_right (dvd_trans (RingHom.map_dvd _ _) hr') _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : { x // x ∈ (Ideal S)⁰ }\nM : R := ∏ m in finsetApprox bS adm, m\nhM : ↑(algebraMap R S) M ≠ 0\nb : S\nb_mem : b ∈ ↑I\nb_ne_zero : b ≠ 0\nb_min : ∀ (c : S), c ∈ ↑I → ↑abv (↑(Algebra.norm R) c) < ↑abv (↑(Algebra.norm R) b) → c = 0\nr' : S\nhr' : ↑(algebraMap R S) M ∣ r'\na : S\nha : a ∈ ↑I\nq : S\nr : R\nr_mem : r ∈ finsetApprox bS adm\nlt : ↑abv (↑(Algebra.norm R) (↑(algebraMap R S) r * a - q * b)) < ↑abv (↑(Algebra.norm R) b)\n⊢ r ∣ M\n[PROOFSTEP]\nexact Multiset.dvd_prod (Multiset.mem_map.mpr ⟨_, r_mem, rfl⟩)\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\n⊢ Function.Surjective (mkMMem bS adm)\n[PROOFSTEP]\nintro I'\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI' : ClassGroup S\n⊢ ∃ a, mkMMem bS adm a = I'\n[PROOFSTEP]\nobtain ⟨⟨I, hI⟩, rfl⟩ := ClassGroup.mk0_surjective I'\n[GOAL]\ncase intro.mk\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : Ideal S\nhI : I ∈ (Ideal S)⁰\n⊢ ∃ a, mkMMem bS adm a = ↑mk0 { val := I, property := hI }\n[PROOFSTEP]\nobtain ⟨J, mk0_eq_mk0, J_dvd⟩ := exists_mk0_eq_mk0 L bS adm h ⟨I, hI⟩\n[GOAL]\ncase intro.mk.intro.intro\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : Ideal S\nhI : I ∈ (Ideal S)⁰\nJ : { x // x ∈ (Ideal S)⁰ }\nmk0_eq_mk0 : ↑mk0 { val := I, property := hI } = ↑mk0 J\nJ_dvd : ↑(algebraMap R S) (∏ m in finsetApprox bS adm, m) ∈ ↑J\n⊢ ∃ a, mkMMem bS adm a = ↑mk0 { val := I, property := hI }\n[PROOFSTEP]\nexact ⟨⟨J, J_dvd⟩, mk0_eq_mk0.symm⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\n⊢ Ideal.span {↑(algebraMap R S) (∏ m in finsetApprox bS adm, m)} ≠ 0\n[PROOFSTEP]\nrw [Ne.def, Ideal.zero_eq_bot, Ideal.span_singleton_eq_bot]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\n⊢ ¬↑(algebraMap R S) (∏ m in finsetApprox bS adm, m) = 0\n[PROOFSTEP]\nexact prod_finsetApprox_ne_zero bS adm\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : Ideal S\n⊢ Ideal.span {↑(algebraMap R S) (∏ m in finsetApprox bS adm, m)} ≤ I ↔\n    ↑(algebraMap R S) (∏ m in finsetApprox bS adm, m) ∈ ↑(Equiv.refl (Ideal S)) I\n[PROOFSTEP]\nrw [Equiv.refl_apply, Ideal.span_le, Set.singleton_subset_iff]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁷ : EuclideanDomain R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : IsDomain S\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra R K\ninst✝¹¹ : IsFractionRing R K\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\ninst✝⁸ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁷ : IsScalarTower R K L\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝⁴ : DecidableEq ι\ninst✝³ : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝² : Infinite R\ninst✝¹ : DecidableEq R\ninst✝ : IsDedekindDomain S\nh : Algebra.IsAlgebraic R L\nI : Ideal S\n⊢ ↑(algebraMap R S) (∏ m in finsetApprox bS adm, m) ∈ ↑I ↔ ↑(algebraMap R S) (∏ m in finsetApprox bS adm, m) ∈ I\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\n⊢ Fintype (ClassGroup S)\n[PROOFSTEP]\nletI := Classical.decEq L\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis : DecidableEq L := Classical.decEq L\n⊢ Fintype (ClassGroup S)\n[PROOFSTEP]\nletI := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝ : DecidableEq L := Classical.decEq L\nthis : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\n⊢ Fintype (ClassGroup S)\n[PROOFSTEP]\nletI := IsIntegralClosure.isDedekindDomain R K L S\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝¹ : DecidableEq L := Classical.decEq L\nthis✝ : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\nthis : IsDedekindDomain S := IsIntegralClosure.isDedekindDomain R K L S\n⊢ Fintype (ClassGroup S)\n[PROOFSTEP]\nchoose s b hb_int using FiniteDimensional.exists_is_basis_integral R K L\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝¹ : DecidableEq L := Classical.decEq L\nthis✝ : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\nthis : IsDedekindDomain S := IsIntegralClosure.isDedekindDomain R K L S\ns : Finset L\nb : Basis { x // x ∈ s } K L\nhb_int : ∀ (x : { x // x ∈ s }), IsIntegral R (↑b x)\n⊢ Fintype (ClassGroup S)\n[PROOFSTEP]\nhave : LinearIndependent R ((Algebra.traceForm K L).dualBasis (traceForm_nondegenerate K L) b) :=\n  by\n  refine' (Basis.linearIndependent _).restrict_scalars _\n  simp only [Algebra.smul_def, mul_one]\n  apply IsFractionRing.injective\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝¹ : DecidableEq L := Classical.decEq L\nthis✝ : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\nthis : IsDedekindDomain S := IsIntegralClosure.isDedekindDomain R K L S\ns : Finset L\nb : Basis { x // x ∈ s } K L\nhb_int : ∀ (x : { x // x ∈ s }), IsIntegral R (↑b x)\n⊢ LinearIndependent R\n    ↑(BilinForm.dualBasis (Algebra.traceForm K L) (_ : BilinForm.Nondegenerate (Algebra.traceForm K L)) b)\n[PROOFSTEP]\nrefine' (Basis.linearIndependent _).restrict_scalars _\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝¹ : DecidableEq L := Classical.decEq L\nthis✝ : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\nthis : IsDedekindDomain S := IsIntegralClosure.isDedekindDomain R K L S\ns : Finset L\nb : Basis { x // x ∈ s } K L\nhb_int : ∀ (x : { x // x ∈ s }), IsIntegral R (↑b x)\n⊢ Function.Injective fun r => r • 1\n[PROOFSTEP]\nsimp only [Algebra.smul_def, mul_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝¹ : DecidableEq L := Classical.decEq L\nthis✝ : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\nthis : IsDedekindDomain S := IsIntegralClosure.isDedekindDomain R K L S\ns : Finset L\nb : Basis { x // x ∈ s } K L\nhb_int : ∀ (x : { x // x ∈ s }), IsIntegral R (↑b x)\n⊢ Function.Injective fun r => ↑(algebraMap R K) r\n[PROOFSTEP]\napply IsFractionRing.injective\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝² : DecidableEq L := Classical.decEq L\nthis✝¹ : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\nthis✝ : IsDedekindDomain S := IsIntegralClosure.isDedekindDomain R K L S\ns : Finset L\nb : Basis { x // x ∈ s } K L\nhb_int : ∀ (x : { x // x ∈ s }), IsIntegral R (↑b x)\nthis :\n  LinearIndependent R\n    ↑(BilinForm.dualBasis (Algebra.traceForm K L) (_ : BilinForm.Nondegenerate (Algebra.traceForm K L)) b)\n⊢ Fintype (ClassGroup S)\n[PROOFSTEP]\nobtain ⟨n, b⟩ := Submodule.basisOfPidOfLESpan this (IsIntegralClosure.range_le_span_dualBasis S b hb_int)\n[GOAL]\ncase mk\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝² : DecidableEq L := Classical.decEq L\nthis✝¹ : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\nthis✝ : IsDedekindDomain S := IsIntegralClosure.isDedekindDomain R K L S\ns : Finset L\nb✝ : Basis { x // x ∈ s } K L\nhb_int : ∀ (x : { x // x ∈ s }), IsIntegral R (↑b✝ x)\nthis :\n  LinearIndependent R\n    ↑(BilinForm.dualBasis (Algebra.traceForm K L) (_ : BilinForm.Nondegenerate (Algebra.traceForm K L)) b✝)\nn : ℕ\nb : Basis (Fin n) R { x // x ∈ LinearMap.range (↑R (Algebra.linearMap S L)) }\n⊢ Fintype (ClassGroup S)\n[PROOFSTEP]\nlet f : (S ⧸ LinearMap.ker (LinearMap.restrictScalars R (Algebra.linearMap S L))) ≃ₗ[R] S :=\n  by\n  rw [LinearMap.ker_eq_bot.mpr]\n  · exact Submodule.quotEquivOfEqBot _ rfl\n  · exact IsIntegralClosure.algebraMap_injective _ R _\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝² : DecidableEq L := Classical.decEq L\nthis✝¹ : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\nthis✝ : IsDedekindDomain S := IsIntegralClosure.isDedekindDomain R K L S\ns : Finset L\nb✝ : Basis { x // x ∈ s } K L\nhb_int : ∀ (x : { x // x ∈ s }), IsIntegral R (↑b✝ x)\nthis :\n  LinearIndependent R\n    ↑(BilinForm.dualBasis (Algebra.traceForm K L) (_ : BilinForm.Nondegenerate (Algebra.traceForm K L)) b✝)\nn : ℕ\nb : Basis (Fin n) R { x // x ∈ LinearMap.range (↑R (Algebra.linearMap S L)) }\n⊢ (S ⧸ LinearMap.ker (↑R (Algebra.linearMap S L))) ≃ₗ[R] S\n[PROOFSTEP]\nrw [LinearMap.ker_eq_bot.mpr]\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝² : DecidableEq L := Classical.decEq L\nthis✝¹ : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\nthis✝ : IsDedekindDomain S := IsIntegralClosure.isDedekindDomain R K L S\ns : Finset L\nb✝ : Basis { x // x ∈ s } K L\nhb_int : ∀ (x : { x // x ∈ s }), IsIntegral R (↑b✝ x)\nthis :\n  LinearIndependent R\n    ↑(BilinForm.dualBasis (Algebra.traceForm K L) (_ : BilinForm.Nondegenerate (Algebra.traceForm K L)) b✝)\nn : ℕ\nb : Basis (Fin n) R { x // x ∈ LinearMap.range (↑R (Algebra.linearMap S L)) }\n⊢ (S ⧸ ⊥) ≃ₗ[R] S\n[PROOFSTEP]\nexact Submodule.quotEquivOfEqBot _ rfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝² : DecidableEq L := Classical.decEq L\nthis✝¹ : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\nthis✝ : IsDedekindDomain S := IsIntegralClosure.isDedekindDomain R K L S\ns : Finset L\nb✝ : Basis { x // x ∈ s } K L\nhb_int : ∀ (x : { x // x ∈ s }), IsIntegral R (↑b✝ x)\nthis :\n  LinearIndependent R\n    ↑(BilinForm.dualBasis (Algebra.traceForm K L) (_ : BilinForm.Nondegenerate (Algebra.traceForm K L)) b✝)\nn : ℕ\nb : Basis (Fin n) R { x // x ∈ LinearMap.range (↑R (Algebra.linearMap S L)) }\n⊢ Function.Injective ↑(↑R (Algebra.linearMap S L))\n[PROOFSTEP]\nexact IsIntegralClosure.algebraMap_injective _ R _\n[GOAL]\ncase mk\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝² : DecidableEq L := Classical.decEq L\nthis✝¹ : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\nthis✝ : IsDedekindDomain S := IsIntegralClosure.isDedekindDomain R K L S\ns : Finset L\nb✝ : Basis { x // x ∈ s } K L\nhb_int : ∀ (x : { x // x ∈ s }), IsIntegral R (↑b✝ x)\nthis :\n  LinearIndependent R\n    ↑(BilinForm.dualBasis (Algebra.traceForm K L) (_ : BilinForm.Nondegenerate (Algebra.traceForm K L)) b✝)\nn : ℕ\nb : Basis (Fin n) R { x // x ∈ LinearMap.range (↑R (Algebra.linearMap S L)) }\nf : (S ⧸ LinearMap.ker (↑R (Algebra.linearMap S L))) ≃ₗ[R] S :=\n  Eq.mpr (_ : ((S ⧸ LinearMap.ker (↑R (Algebra.linearMap S L))) ≃ₗ[R] S) = ((S ⧸ ⊥) ≃ₗ[R] S))\n    (Submodule.quotEquivOfEqBot ⊥ (_ : ⊥ = ⊥))\n⊢ Fintype (ClassGroup S)\n[PROOFSTEP]\nlet bS := b.map ((LinearMap.quotKerEquivRange _).symm ≪≫ₗ f)\n[GOAL]\ncase mk\nR : Type u_1\nS : Type u_2\nK : Type u_3\nL : Type u_4\ninst✝¹⁶ : EuclideanDomain R\ninst✝¹⁵ : CommRing S\ninst✝¹⁴ : IsDomain S\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra R K\ninst✝¹⁰ : IsFractionRing R K\ninst✝⁹ : Algebra K L\ninst✝⁸ : FiniteDimensional K L\ninst✝⁷ : IsSeparable K L\nalgRL : Algebra R L\ninst✝⁶ : IsScalarTower R K L\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra S L\nist : IsScalarTower R S L\niic : IsIntegralClosure S R L\nabv : AbsoluteValue R ℤ\nι : Type u_5\ninst✝³ : DecidableEq ι\ninst✝² : Fintype ι\nbS✝ : Basis ι R S\nadm : AbsoluteValue.IsAdmissible abv\ninst✝¹ : Infinite R\ninst✝ : DecidableEq R\nthis✝² : DecidableEq L := Classical.decEq L\nthis✝¹ : IsFractionRing S L := IsIntegralClosure.isFractionRing_of_finite_extension R K L S\nthis✝ : IsDedekindDomain S := IsIntegralClosure.isDedekindDomain R K L S\ns : Finset L\nb✝ : Basis { x // x ∈ s } K L\nhb_int : ∀ (x : { x // x ∈ s }), IsIntegral R (↑b✝ x)\nthis :\n  LinearIndependent R\n    ↑(BilinForm.dualBasis (Algebra.traceForm K L) (_ : BilinForm.Nondegenerate (Algebra.traceForm K L)) b✝)\nn : ℕ\nb : Basis (Fin n) R { x // x ∈ LinearMap.range (↑R (Algebra.linearMap S L)) }\nf : (S ⧸ LinearMap.ker (↑R (Algebra.linearMap S L))) ≃ₗ[R] S :=\n  Eq.mpr (_ : ((S ⧸ LinearMap.ker (↑R (Algebra.linearMap S L))) ≃ₗ[R] S) = ((S ⧸ ⊥) ≃ₗ[R] S))\n    (Submodule.quotEquivOfEqBot ⊥ (_ : ⊥ = ⊥))\nbS : Basis (Fin n) R S :=\n  Basis.map b (LinearEquiv.trans (LinearEquiv.symm (LinearMap.quotKerEquivRange (↑R (Algebra.linearMap S L)))) f)\n⊢ Fintype (ClassGroup S)\n[PROOFSTEP]\nexact\n  fintypeOfAdmissibleOfAlgebraic L bS adm\n    (fun x => (IsFractionRing.isAlgebraic_iff R K L).mpr (Algebra.isAlgebraic_of_finite K _ x))\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.ClassNumber.Finite", "llama_tokens": 109339, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646010190476, "lm_q2_score": 0.5698526514141572, "lm_q1q2_score": 0.38508624962253435}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ns : Set α\na : α\ndi : DenseInducing i\nhs : s ∈ 𝓝 a\n⊢ closure (i '' s) ∈ 𝓝 (i a)\n[PROOFSTEP]\nrw [di.nhds_eq_comap a, ((nhds_basis_opens _).comap _).mem_iff] at hs \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ns : Set α\na : α\ndi : DenseInducing i\nhs : ∃ i_1, (i a ∈ i_1 ∧ IsOpen i_1) ∧ i ⁻¹' i_1 ⊆ s\n⊢ closure (i '' s) ∈ 𝓝 (i a)\n[PROOFSTEP]\nrcases hs with ⟨U, ⟨haU, hUo⟩, sub : i ⁻¹' U ⊆ s⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ns : Set α\na : α\ndi : DenseInducing i\nU : Set β\nsub : i ⁻¹' U ⊆ s\nhaU : i a ∈ U\nhUo : IsOpen U\n⊢ closure (i '' s) ∈ 𝓝 (i a)\n[PROOFSTEP]\nrefine' mem_of_superset (hUo.mem_nhds haU) _\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ns : Set α\na : α\ndi : DenseInducing i\nU : Set β\nsub : i ⁻¹' U ⊆ s\nhaU : i a ∈ U\nhUo : IsOpen U\n⊢ U ⊆ closure (i '' s)\n[PROOFSTEP]\ncalc\n  U ⊆ closure (i '' (i ⁻¹' U)) := di.dense.subset_closure_image_preimage_of_isOpen hUo\n  _ ⊆ closure (i '' s) := closure_mono (image_subset i sub)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ni : α → β\ndi✝ di : DenseInducing i\ns : Set α\n⊢ Dense (i '' s) ↔ Dense s\n[PROOFSTEP]\nrefine' ⟨fun H x => _, di.dense.dense_image di.continuous⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ni : α → β\ndi✝ di : DenseInducing i\ns : Set α\nH : Dense (i '' s)\nx : α\n⊢ x ∈ closure s\n[PROOFSTEP]\nrw [di.toInducing.closure_eq_preimage_closure_image, H.closure_eq, preimage_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ni : α → β\ndi✝ di : DenseInducing i\ns : Set α\nH : Dense (i '' s)\nx : α\n⊢ x ∈ univ\n[PROOFSTEP]\ntrivial\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : T2Space β\ndi : DenseInducing i\nhd : Dense (range i)ᶜ\ns : Set α\nhs : IsCompact s\n⊢ interior s = ∅\n[PROOFSTEP]\nrefine' eq_empty_iff_forall_not_mem.2 fun x hx => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : T2Space β\ndi : DenseInducing i\nhd : Dense (range i)ᶜ\ns : Set α\nhs : IsCompact s\nx : α\nhx : x ∈ interior s\n⊢ False\n[PROOFSTEP]\nrw [mem_interior_iff_mem_nhds] at hx \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : T2Space β\ndi : DenseInducing i\nhd : Dense (range i)ᶜ\ns : Set α\nhs : IsCompact s\nx : α\nhx : s ∈ 𝓝 x\n⊢ False\n[PROOFSTEP]\nhave := di.closure_image_mem_nhds hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : T2Space β\ndi : DenseInducing i\nhd : Dense (range i)ᶜ\ns : Set α\nhs : IsCompact s\nx : α\nhx : s ∈ 𝓝 x\nthis : closure (i '' s) ∈ 𝓝 (i x)\n⊢ False\n[PROOFSTEP]\nrw [(hs.image di.continuous).isClosed.closure_eq] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : T2Space β\ndi : DenseInducing i\nhd : Dense (range i)ᶜ\ns : Set α\nhs : IsCompact s\nx : α\nhx : s ∈ 𝓝 x\nthis : i '' s ∈ 𝓝 (i x)\n⊢ False\n[PROOFSTEP]\nrcases hd.inter_nhds_nonempty this with ⟨y, hyi, hys⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : T2Space β\ndi : DenseInducing i\nhd : Dense (range i)ᶜ\ns : Set α\nhs : IsCompact s\nx : α\nhx : s ∈ 𝓝 x\nthis : i '' s ∈ 𝓝 (i x)\ny : β\nhyi : y ∈ (range i)ᶜ\nhys : y ∈ i '' s\n⊢ False\n[PROOFSTEP]\nexact hyi (image_subset_range _ _ hys)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : TopologicalSpace δ\nf : γ → α\ng : γ → δ\nh : δ → β\nd : δ\na : α\ndi : DenseInducing i\nH : Tendsto h (𝓝 d) (𝓝 (i a))\ncomm : h ∘ g = i ∘ f\n⊢ Tendsto f (comap g (𝓝 d)) (𝓝 a)\n[PROOFSTEP]\nhave lim1 : map g (comap g (𝓝 d)) ≤ 𝓝 d := map_comap_le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : TopologicalSpace δ\nf : γ → α\ng : γ → δ\nh : δ → β\nd : δ\na : α\ndi : DenseInducing i\nH : Tendsto h (𝓝 d) (𝓝 (i a))\ncomm : h ∘ g = i ∘ f\nlim1 : map g (comap g (𝓝 d)) ≤ 𝓝 d\n⊢ Tendsto f (comap g (𝓝 d)) (𝓝 a)\n[PROOFSTEP]\nreplace lim1 : map h (map g (comap g (𝓝 d))) ≤ map h (𝓝 d) := map_mono lim1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : TopologicalSpace δ\nf : γ → α\ng : γ → δ\nh : δ → β\nd : δ\na : α\ndi : DenseInducing i\nH : Tendsto h (𝓝 d) (𝓝 (i a))\ncomm : h ∘ g = i ∘ f\nlim1 : map h (map g (comap g (𝓝 d))) ≤ map h (𝓝 d)\n⊢ Tendsto f (comap g (𝓝 d)) (𝓝 a)\n[PROOFSTEP]\nrw [Filter.map_map, comm, ← Filter.map_map, map_le_iff_le_comap] at lim1 \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : TopologicalSpace δ\nf : γ → α\ng : γ → δ\nh : δ → β\nd : δ\na : α\ndi : DenseInducing i\nH : Tendsto h (𝓝 d) (𝓝 (i a))\ncomm : h ∘ g = i ∘ f\nlim1 : map f (comap g (𝓝 d)) ≤ comap i (map h (𝓝 d))\n⊢ Tendsto f (comap g (𝓝 d)) (𝓝 a)\n[PROOFSTEP]\nhave lim2 : comap i (map h (𝓝 d)) ≤ comap i (𝓝 (i a)) := comap_mono H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : TopologicalSpace δ\nf : γ → α\ng : γ → δ\nh : δ → β\nd : δ\na : α\ndi : DenseInducing i\nH : Tendsto h (𝓝 d) (𝓝 (i a))\ncomm : h ∘ g = i ∘ f\nlim1 : map f (comap g (𝓝 d)) ≤ comap i (map h (𝓝 d))\nlim2 : comap i (map h (𝓝 d)) ≤ comap i (𝓝 (i a))\n⊢ Tendsto f (comap g (𝓝 d)) (𝓝 a)\n[PROOFSTEP]\nrw [← di.nhds_eq_comap] at lim2 \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : TopologicalSpace δ\nf : γ → α\ng : γ → δ\nh : δ → β\nd : δ\na : α\ndi : DenseInducing i\nH : Tendsto h (𝓝 d) (𝓝 (i a))\ncomm : h ∘ g = i ∘ f\nlim1 : map f (comap g (𝓝 d)) ≤ comap i (map h (𝓝 d))\nlim2 : comap i (map h (𝓝 d)) ≤ 𝓝 a\n⊢ Tendsto f (comap g (𝓝 d)) (𝓝 a)\n[PROOFSTEP]\nexact le_trans lim1 lim2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : TopologicalSpace δ\nf : γ → α\ng : γ → δ\nh : δ → β\ndi : DenseInducing i\nb : β\ns : Set β\nhs : s ∈ 𝓝 b\n⊢ ∃ a, i a ∈ s\n[PROOFSTEP]\nrcases mem_closure_iff_nhds.1 (di.dense b) s hs with ⟨_, ⟨ha, a, rfl⟩⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝ : TopologicalSpace δ\nf : γ → α\ng : γ → δ\nh : δ → β\ndi : DenseInducing i\nb : β\ns : Set β\nhs : s ∈ 𝓝 b\na : α\nha : i a ∈ s\n⊢ ∃ a, i a ∈ s\n[PROOFSTEP]\nexact ⟨a, ha⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T2Space γ\nf : α → γ\ndi : DenseInducing i\nhf : ∀ (b : β), ∃ c, Tendsto f (comap i (𝓝 b)) (𝓝 c)\na : α\n⊢ extend di f (i a) = f a\n[PROOFSTEP]\nrcases hf (i a) with ⟨b, hb⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T2Space γ\nf : α → γ\ndi : DenseInducing i\nhf : ∀ (b : β), ∃ c, Tendsto f (comap i (𝓝 b)) (𝓝 c)\na : α\nb : γ\nhb : Tendsto f (comap i (𝓝 (i a))) (𝓝 b)\n⊢ extend di f (i a) = f a\n[PROOFSTEP]\nrefine' di.extend_eq_at' b _\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T2Space γ\nf : α → γ\ndi : DenseInducing i\nhf : ∀ (b : β), ∃ c, Tendsto f (comap i (𝓝 b)) (𝓝 c)\na : α\nb : γ\nhb : Tendsto f (comap i (𝓝 (i a))) (𝓝 b)\n⊢ Tendsto f (𝓝 a) (𝓝 b)\n[PROOFSTEP]\nrwa [← di.toInducing.nhds_eq_comap] at hb \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng✝ : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T2Space γ\nb : β\nf : α → γ\ng : β → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : α) in comap i (𝓝 b), g (i x) = f x\nhg : ContinuousAt g b\n⊢ extend di f b = g b\n[PROOFSTEP]\nrefine' di.extend_eq_of_tendsto fun s hs => mem_map.2 _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng✝ : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T2Space γ\nb : β\nf : α → γ\ng : β → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : α) in comap i (𝓝 b), g (i x) = f x\nhg : ContinuousAt g b\ns : Set γ\nhs : s ∈ 𝓝 (g b)\n⊢ f ⁻¹' s ∈ comap i (𝓝 b)\n[PROOFSTEP]\nsuffices : ∀ᶠ x : α in comap i (𝓝 b), g (i x) ∈ s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng✝ : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T2Space γ\nb : β\nf : α → γ\ng : β → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : α) in comap i (𝓝 b), g (i x) = f x\nhg : ContinuousAt g b\ns : Set γ\nhs : s ∈ 𝓝 (g b)\nthis : ∀ᶠ (x : α) in comap i (𝓝 b), g (i x) ∈ s\n⊢ f ⁻¹' s ∈ comap i (𝓝 b)\ncase this\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng✝ : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T2Space γ\nb : β\nf : α → γ\ng : β → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : α) in comap i (𝓝 b), g (i x) = f x\nhg : ContinuousAt g b\ns : Set γ\nhs : s ∈ 𝓝 (g b)\n⊢ ∀ᶠ (x : α) in comap i (𝓝 b), g (i x) ∈ s\n[PROOFSTEP]\nexact hf.mp (this.mono fun x hgx hfx => hfx ▸ hgx)\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng✝ : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T2Space γ\nb : β\nf : α → γ\ng : β → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : α) in comap i (𝓝 b), g (i x) = f x\nhg : ContinuousAt g b\ns : Set γ\nhs : s ∈ 𝓝 (g b)\n⊢ ∀ᶠ (x : α) in comap i (𝓝 b), g (i x) ∈ s\n[PROOFSTEP]\nclear hf f\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf : γ → α\ng✝ : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T2Space γ\nb : β\ng : β → γ\ndi : DenseInducing i\nhg : ContinuousAt g b\ns : Set γ\nhs : s ∈ 𝓝 (g b)\n⊢ ∀ᶠ (x : α) in comap i (𝓝 b), g (i x) ∈ s\n[PROOFSTEP]\nrefine' eventually_comap.2 ((hg.eventually hs).mono _)\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf : γ → α\ng✝ : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T2Space γ\nb : β\ng : β → γ\ndi : DenseInducing i\nhg : ContinuousAt g b\ns : Set γ\nhs : s ∈ 𝓝 (g b)\n⊢ ∀ (x : β), s (g x) → ∀ (a : α), i a = x → g (i a) ∈ s\n[PROOFSTEP]\nrintro _ hxs x rfl\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf : γ → α\ng✝ : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T2Space γ\nb : β\ng : β → γ\ndi : DenseInducing i\nhg : ContinuousAt g b\ns : Set γ\nhs : s ∈ 𝓝 (g b)\nx : α\nhxs : s (g (i x))\n⊢ g (i x) ∈ s\n[PROOFSTEP]\nexact hxs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\n⊢ ContinuousAt (extend di f) b\n[PROOFSTEP]\nset φ := di.extend f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\n⊢ ContinuousAt φ b\n[PROOFSTEP]\nhaveI := di.comap_nhds_neBot\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\n⊢ ContinuousAt φ b\n[PROOFSTEP]\nsuffices ∀ V' ∈ 𝓝 (φ b), IsClosed V' → φ ⁻¹' V' ∈ 𝓝 b by\n  simpa [ContinuousAt, (closed_nhds_basis (φ b)).tendsto_right_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis✝ : ∀ (b : β), NeBot (comap i (𝓝 b))\nthis : ∀ (V' : Set γ), V' ∈ 𝓝 (φ b) → IsClosed V' → φ ⁻¹' V' ∈ 𝓝 b\n⊢ ContinuousAt φ b\n[PROOFSTEP]\nsimpa [ContinuousAt, (closed_nhds_basis (φ b)).tendsto_right_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\n⊢ ∀ (V' : Set γ), V' ∈ 𝓝 (φ b) → IsClosed V' → φ ⁻¹' V' ∈ 𝓝 b\n[PROOFSTEP]\nintro V' V'_in V'_closed\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\n⊢ φ ⁻¹' V' ∈ 𝓝 b\n[PROOFSTEP]\nset V₁ := {x | Tendsto f (comap i <| 𝓝 x) (𝓝 <| φ x)}\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\n⊢ φ ⁻¹' V' ∈ 𝓝 b\n[PROOFSTEP]\nhave V₁_in : V₁ ∈ 𝓝 b := by\n  filter_upwards [hf]\n  rintro x ⟨c, hc⟩\n  rwa [di.extend_eq_of_tendsto hc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\n⊢ V₁ ∈ 𝓝 b\n[PROOFSTEP]\nfilter_upwards [hf]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\n⊢ ∀ (a : β), (∃ c, Tendsto f (comap i (𝓝 a)) (𝓝 c)) → Tendsto f (comap i (𝓝 a)) (𝓝 (extend di f a))\n[PROOFSTEP]\nrintro x ⟨c, hc⟩\n[GOAL]\ncase h.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\nx : β\nc : γ\nhc : Tendsto f (comap i (𝓝 x)) (𝓝 c)\n⊢ Tendsto f (comap i (𝓝 x)) (𝓝 (extend di f x))\n[PROOFSTEP]\nrwa [di.extend_eq_of_tendsto hc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\nV₁_in : V₁ ∈ 𝓝 b\n⊢ φ ⁻¹' V' ∈ 𝓝 b\n[PROOFSTEP]\nobtain ⟨V₂, V₂_in, V₂_op, hV₂⟩ : ∃ V₂ ∈ 𝓝 b, IsOpen V₂ ∧ ∀ x ∈ i ⁻¹' V₂, f x ∈ V' := by\n  simpa [and_assoc] using ((nhds_basis_opens' b).comap i).tendsto_left_iff.mp (mem_of_mem_nhds V₁_in : b ∈ V₁) V' V'_in\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\nV₁_in : V₁ ∈ 𝓝 b\n⊢ ∃ V₂, V₂ ∈ 𝓝 b ∧ IsOpen V₂ ∧ ∀ (x : α), x ∈ i ⁻¹' V₂ → f x ∈ V'\n[PROOFSTEP]\nsimpa [and_assoc] using ((nhds_basis_opens' b).comap i).tendsto_left_iff.mp (mem_of_mem_nhds V₁_in : b ∈ V₁) V' V'_in\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\nV₁_in : V₁ ∈ 𝓝 b\nV₂ : Set β\nV₂_in : V₂ ∈ 𝓝 b\nV₂_op : IsOpen V₂\nhV₂ : ∀ (x : α), x ∈ i ⁻¹' V₂ → f x ∈ V'\n⊢ φ ⁻¹' V' ∈ 𝓝 b\n[PROOFSTEP]\nsuffices ∀ x ∈ V₁ ∩ V₂, φ x ∈ V' by filter_upwards [inter_mem V₁_in V₂_in] using this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis✝ : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\nV₁_in : V₁ ∈ 𝓝 b\nV₂ : Set β\nV₂_in : V₂ ∈ 𝓝 b\nV₂_op : IsOpen V₂\nhV₂ : ∀ (x : α), x ∈ i ⁻¹' V₂ → f x ∈ V'\nthis : ∀ (x : β), x ∈ V₁ ∩ V₂ → φ x ∈ V'\n⊢ φ ⁻¹' V' ∈ 𝓝 b\n[PROOFSTEP]\nfilter_upwards [inter_mem V₁_in V₂_in] using this\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\nV₁_in : V₁ ∈ 𝓝 b\nV₂ : Set β\nV₂_in : V₂ ∈ 𝓝 b\nV₂_op : IsOpen V₂\nhV₂ : ∀ (x : α), x ∈ i ⁻¹' V₂ → f x ∈ V'\n⊢ ∀ (x : β), x ∈ V₁ ∩ V₂ → φ x ∈ V'\n[PROOFSTEP]\nrintro x ⟨x_in₁, x_in₂⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\nV₁_in : V₁ ∈ 𝓝 b\nV₂ : Set β\nV₂_in : V₂ ∈ 𝓝 b\nV₂_op : IsOpen V₂\nhV₂ : ∀ (x : α), x ∈ i ⁻¹' V₂ → f x ∈ V'\nx : β\nx_in₁ : x ∈ V₁\nx_in₂ : x ∈ V₂\n⊢ φ x ∈ V'\n[PROOFSTEP]\nhave hV₂x : V₂ ∈ 𝓝 x := IsOpen.mem_nhds V₂_op x_in₂\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\nV₁_in : V₁ ∈ 𝓝 b\nV₂ : Set β\nV₂_in : V₂ ∈ 𝓝 b\nV₂_op : IsOpen V₂\nhV₂ : ∀ (x : α), x ∈ i ⁻¹' V₂ → f x ∈ V'\nx : β\nx_in₁ : x ∈ V₁\nx_in₂ : x ∈ V₂\nhV₂x : V₂ ∈ 𝓝 x\n⊢ φ x ∈ V'\n[PROOFSTEP]\napply V'_closed.mem_of_tendsto x_in₁\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\nV₁_in : V₁ ∈ 𝓝 b\nV₂ : Set β\nV₂_in : V₂ ∈ 𝓝 b\nV₂_op : IsOpen V₂\nhV₂ : ∀ (x : α), x ∈ i ⁻¹' V₂ → f x ∈ V'\nx : β\nx_in₁ : x ∈ V₁\nx_in₂ : x ∈ V₂\nhV₂x : V₂ ∈ 𝓝 x\n⊢ ∀ᶠ (x : α) in comap i (𝓝 x), f x ∈ V'\n[PROOFSTEP]\nuse V₂\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ni : α → β\ndi✝ : DenseInducing i\ninst✝² : TopologicalSpace δ\nf✝ : γ → α\ng : γ → δ\nh : δ → β\ninst✝¹ : TopologicalSpace γ\ninst✝ : T3Space γ\nb : β\nf : α → γ\ndi : DenseInducing i\nhf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Tendsto f (comap i (𝓝 x)) (𝓝 c)\nφ : β → γ := extend di f\nthis : ∀ (b : β), NeBot (comap i (𝓝 b))\nV' : Set γ\nV'_in : V' ∈ 𝓝 (φ b)\nV'_closed : IsClosed V'\nV₁ : Set β := {x | Tendsto f (comap i (𝓝 x)) (𝓝 (φ x))}\nV₁_in : V₁ ∈ 𝓝 b\nV₂ : Set β\nV₂_in : V₂ ∈ 𝓝 b\nV₂_op : IsOpen V₂\nhV₂ : ∀ (x : α), x ∈ i ⁻¹' V₂ → f x ∈ V'\nx : β\nx_in₁ : x ∈ V₁\nx_in₂ : x ∈ V₂\nhV₂x : V₂ ∈ 𝓝 x\n⊢ V₂ ∈ 𝓝 x ∧ i ⁻¹' V₂ ⊆ {x | (fun x => f x ∈ V') x}\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ni✝ : α → β\ndi : DenseInducing i✝\ninst✝¹ : TopologicalSpace δ\nf : γ → α\ng : γ → δ\nh : δ → β\ninst✝ : TopologicalSpace γ\ni : α → β\nc : Continuous i\ndense : ∀ (x : β), x ∈ closure (range i)\nH : ∀ (a : α) (s : Set α), s ∈ 𝓝 a → ∃ t, t ∈ 𝓝 (i a) ∧ ∀ (b : α), i b ∈ t → b ∈ s\na : α\n⊢ comap i (𝓝 (i a)) ≤ 𝓝 a\n[PROOFSTEP]\nsimpa [Filter.le_def] using H a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ne : α → β\nde : DenseEmbedding e\np : α → Prop\nx✝ : { x // p x }\nx : α\nhx : p x\n⊢ 𝓝 { val := x, property := hx } = comap (subtypeEmb p e) (𝓝 (subtypeEmb p e { val := x, property := hx }))\n[PROOFSTEP]\nsimp [subtypeEmb, nhds_subtype_eq_comap, de.toInducing.nhds_eq_comap, comap_comap, (· ∘ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ne : α → β\nde : DenseEmbedding e\np : α → Prop\n⊢ closure (range (subtypeEmb p e)) = univ\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ne : α → β\nde : DenseEmbedding e\np : α → Prop\nx : β\nhx : x ∈ closure (e '' {x | p x})\n⊢ { val := x, property := hx } ∈ closure (range (subtypeEmb p e)) ↔ { val := x, property := hx } ∈ univ\n[PROOFSTEP]\nrw [image_eq_range] at hx \n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ne : α → β\nde : DenseEmbedding e\np : α → Prop\nx : β\nhx✝ : x ∈ closure (e '' {x | p x})\nhx : x ∈ closure (range fun x => e ↑x)\n⊢ { val := x, property := hx✝ } ∈ closure (range (subtypeEmb p e)) ↔ { val := x, property := hx✝ } ∈ univ\n[PROOFSTEP]\nsimpa [closure_subtype, ← range_comp, (· ∘ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : HasBasis (𝓝 x) p s\nf : α → β\nhf : DenseInducing f\n⊢ HasBasis (𝓝 (f x)) p fun i => closure (f '' s i)\n[PROOFSTEP]\nrw [Filter.hasBasis_iff] at h ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : ∀ (t : Set α), t ∈ 𝓝 x ↔ ∃ i, p i ∧ s i ⊆ t\nf : α → β\nhf : DenseInducing f\n⊢ ∀ (t : Set β), t ∈ 𝓝 (f x) ↔ ∃ i, p i ∧ closure (f '' s i) ⊆ t\n[PROOFSTEP]\nintro T\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : ∀ (t : Set α), t ∈ 𝓝 x ↔ ∃ i, p i ∧ s i ⊆ t\nf : α → β\nhf : DenseInducing f\nT : Set β\n⊢ T ∈ 𝓝 (f x) ↔ ∃ i, p i ∧ closure (f '' s i) ⊆ T\n[PROOFSTEP]\nrefine' ⟨fun hT => _, fun hT => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : ∀ (t : Set α), t ∈ 𝓝 x ↔ ∃ i, p i ∧ s i ⊆ t\nf : α → β\nhf : DenseInducing f\nT : Set β\nhT : T ∈ 𝓝 (f x)\n⊢ ∃ i, p i ∧ closure (f '' s i) ⊆ T\n[PROOFSTEP]\nobtain ⟨T', hT₁, hT₂, hT₃⟩ := exists_mem_nhds_isClosed_subset hT\n[GOAL]\ncase refine'_1.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : ∀ (t : Set α), t ∈ 𝓝 x ↔ ∃ i, p i ∧ s i ⊆ t\nf : α → β\nhf : DenseInducing f\nT : Set β\nhT : T ∈ 𝓝 (f x)\nT' : Set β\nhT₁ : T' ∈ 𝓝 (f x)\nhT₂ : IsClosed T'\nhT₃ : T' ⊆ T\n⊢ ∃ i, p i ∧ closure (f '' s i) ⊆ T\n[PROOFSTEP]\nhave hT₄ : f ⁻¹' T' ∈ 𝓝 x := by\n  rw [hf.toInducing.nhds_eq_comap x]\n  exact ⟨T', hT₁, Subset.rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : ∀ (t : Set α), t ∈ 𝓝 x ↔ ∃ i, p i ∧ s i ⊆ t\nf : α → β\nhf : DenseInducing f\nT : Set β\nhT : T ∈ 𝓝 (f x)\nT' : Set β\nhT₁ : T' ∈ 𝓝 (f x)\nhT₂ : IsClosed T'\nhT₃ : T' ⊆ T\n⊢ f ⁻¹' T' ∈ 𝓝 x\n[PROOFSTEP]\nrw [hf.toInducing.nhds_eq_comap x]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : ∀ (t : Set α), t ∈ 𝓝 x ↔ ∃ i, p i ∧ s i ⊆ t\nf : α → β\nhf : DenseInducing f\nT : Set β\nhT : T ∈ 𝓝 (f x)\nT' : Set β\nhT₁ : T' ∈ 𝓝 (f x)\nhT₂ : IsClosed T'\nhT₃ : T' ⊆ T\n⊢ f ⁻¹' T' ∈ Filter.comap f (𝓝 (f x))\n[PROOFSTEP]\nexact ⟨T', hT₁, Subset.rfl⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : ∀ (t : Set α), t ∈ 𝓝 x ↔ ∃ i, p i ∧ s i ⊆ t\nf : α → β\nhf : DenseInducing f\nT : Set β\nhT : T ∈ 𝓝 (f x)\nT' : Set β\nhT₁ : T' ∈ 𝓝 (f x)\nhT₂ : IsClosed T'\nhT₃ : T' ⊆ T\nhT₄ : f ⁻¹' T' ∈ 𝓝 x\n⊢ ∃ i, p i ∧ closure (f '' s i) ⊆ T\n[PROOFSTEP]\nobtain ⟨i, hi, hi'⟩ := (h _).mp hT₄\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : ∀ (t : Set α), t ∈ 𝓝 x ↔ ∃ i, p i ∧ s i ⊆ t\nf : α → β\nhf : DenseInducing f\nT : Set β\nhT : T ∈ 𝓝 (f x)\nT' : Set β\nhT₁ : T' ∈ 𝓝 (f x)\nhT₂ : IsClosed T'\nhT₃ : T' ⊆ T\nhT₄ : f ⁻¹' T' ∈ 𝓝 x\ni : ι\nhi : p i\nhi' : s i ⊆ f ⁻¹' T'\n⊢ ∃ i, p i ∧ closure (f '' s i) ⊆ T\n[PROOFSTEP]\nexact\n  ⟨i, hi,\n    (closure_mono (image_subset f hi')).trans (Subset.trans (closure_minimal (image_preimage_subset _ _) hT₂) hT₃)⟩\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : ∀ (t : Set α), t ∈ 𝓝 x ↔ ∃ i, p i ∧ s i ⊆ t\nf : α → β\nhf : DenseInducing f\nT : Set β\nhT : ∃ i, p i ∧ closure (f '' s i) ⊆ T\n⊢ T ∈ 𝓝 (f x)\n[PROOFSTEP]\nobtain ⟨i, hi, hi'⟩ := hT\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : ∀ (t : Set α), t ∈ 𝓝 x ↔ ∃ i, p i ∧ s i ⊆ t\nf : α → β\nhf : DenseInducing f\nT : Set β\ni : ι\nhi : p i\nhi' : closure (f '' s i) ⊆ T\n⊢ T ∈ 𝓝 (f x)\n[PROOFSTEP]\nsuffices closure (f '' s i) ∈ 𝓝 (f x) by filter_upwards [this] using hi'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : ∀ (t : Set α), t ∈ 𝓝 x ↔ ∃ i, p i ∧ s i ⊆ t\nf : α → β\nhf : DenseInducing f\nT : Set β\ni : ι\nhi : p i\nhi' : closure (f '' s i) ⊆ T\nthis : closure (f '' s i) ∈ 𝓝 (f x)\n⊢ T ∈ 𝓝 (f x)\n[PROOFSTEP]\nfilter_upwards [this] using hi'\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nh : ∀ (t : Set α), t ∈ 𝓝 x ↔ ∃ i, p i ∧ s i ⊆ t\nf : α → β\nhf : DenseInducing f\nT : Set β\ni : ι\nhi : p i\nhi' : closure (f '' s i) ⊆ T\n⊢ closure (f '' s i) ∈ 𝓝 (f x)\n[PROOFSTEP]\nreplace h := (h (s i)).mpr ⟨i, hi, Subset.rfl⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T3Space β\nι : Type u_5\ns : ι → Set α\np : ι → Prop\nx : α\nf : α → β\nhf : DenseInducing f\nT : Set β\ni : ι\nhi : p i\nhi' : closure (f '' s i) ⊆ T\nh : s i ∈ 𝓝 x\n⊢ closure (f '' s i) ∈ 𝓝 (f x)\n[PROOFSTEP]\nexact hf.closure_image_mem_nhds h\n", "meta": {"mathlib_filename": "Mathlib.Topology.DenseEmbedding", "llama_tokens": 18186, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.689305616785446, "lm_q2_score": 0.5583269943353745, "lm_q1q2_score": 0.3848579331983095}}
{"text": "[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : InvolutiveInv α\ns t : Set α\na : α\n⊢ a⁻¹ ∈ s⁻¹ ↔ a ∈ s\n[PROOFSTEP]\nsimp only [mem_inv, inv_inv]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : InvolutiveInv α\ns✝ t : Set α\na : α\ns : Set α\n⊢ s⁻¹⁻¹ = s\n[PROOFSTEP]\nsimp only [← inv_preimage, preimage_preimage, inv_inv, preimage_id']\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : InvolutiveInv α\ns t : Set α\na : α\n⊢ s⁻¹ ⊆ t ↔ s ⊆ t⁻¹\n[PROOFSTEP]\nrw [← inv_subset_inv, inv_inv]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : InvolutiveInv α\ns t : Set α\na✝ a : α\n⊢ {a}⁻¹ = {a⁻¹}\n[PROOFSTEP]\nrw [← image_inv, image_singleton]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : InvolutiveInv α\ns✝ t : Set α\na✝ a : α\ns : Set α\n⊢ (insert a s)⁻¹ = insert a⁻¹ s⁻¹\n[PROOFSTEP]\nrw [insert_eq, union_inv, inv_singleton, insert_eq]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : InvolutiveInv α\ns t : Set α\na : α\nι : Sort u_5\nf : ι → α\n⊢ (range f)⁻¹ = range fun i => (f i)⁻¹\n[PROOFSTEP]\nrw [← image_inv]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : InvolutiveInv α\ns t : Set α\na : α\nι : Sort u_5\nf : ι → α\n⊢ Inv.inv '' range f = range fun i => (f i)⁻¹\n[PROOFSTEP]\nexact (range_comp _ _).symm\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : InvolutiveInv α\ns t : Set α\na : α\n⊢ op '' s⁻¹ = (op '' s)⁻¹\n[PROOFSTEP]\nsimp_rw [← image_inv, Function.Semiconj.set_image op_inv s]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n : ℕ\nha : a ∈ s\n⊢ a ^ 0 ∈ s ^ 0\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n : ℕ\nha : a ∈ s\n⊢ 1 ∈ s ^ 0\n[PROOFSTEP]\nexact one_mem_one\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n✝ : ℕ\nha : a ∈ s\nn : ℕ\n⊢ a ^ (n + 1) ∈ s ^ (n + 1)\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n✝ : ℕ\nha : a ∈ s\nn : ℕ\n⊢ a * a ^ n ∈ s ^ (n + 1)\n[PROOFSTEP]\nexact mul_mem_mul ha (pow_mem_pow ha _)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n : ℕ\nhst : s ⊆ t\n⊢ s ^ 0 ⊆ t ^ 0\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n : ℕ\nhst : s ⊆ t\n⊢ 1 ⊆ t ^ 0\n[PROOFSTEP]\nexact Subset.rfl\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n✝ : ℕ\nhst : s ⊆ t\nn : ℕ\n⊢ s ^ (n + 1) ⊆ t ^ (n + 1)\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n✝ : ℕ\nhst : s ⊆ t\nn : ℕ\n⊢ s * s ^ n ⊆ t ^ (n + 1)\n[PROOFSTEP]\nexact mul_subset_mul hst (pow_subset_pow hst _)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n : ℕ\nhs : 1 ∈ s\nhn : m ≤ n\n⊢ s ^ m ⊆ s ^ n\n[PROOFSTEP]\ninduction' n, hn using Nat.le_induction with _ _ ih\n[GOAL]\ncase base\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n : ℕ\nhs : 1 ∈ s\n⊢ s ^ m ⊆ s ^ m\n[PROOFSTEP]\nexact Subset.rfl\n[GOAL]\ncase succ\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n : ℕ\nhs : 1 ∈ s\nn✝ : ℕ\nhn✝ : m ≤ n✝\nih : s ^ m ⊆ s ^ n✝\n⊢ s ^ m ⊆ s ^ (n✝ + 1)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase succ\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n : ℕ\nhs : 1 ∈ s\nn✝ : ℕ\nhn✝ : m ≤ n✝\nih : s ^ m ⊆ s ^ n✝\n⊢ s ^ m ⊆ s ^ (n✝ + 1)\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\ncase succ\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n : ℕ\nhs : 1 ∈ s\nn✝ : ℕ\nhn✝ : m ≤ n✝\nih : s ^ m ⊆ s ^ n✝\n⊢ s ^ m ⊆ s * s ^ n✝\n[PROOFSTEP]\nexact ih.trans (subset_mul_right _ hs)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n✝ n : ℕ\nhn : n ≠ 0\n⊢ ∅ ^ n = ∅\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le (Nat.succ_le_of_lt <| Nat.pos_of_ne_zero hn), pow_succ, empty_mul]\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Monoid α✝\ns t : Set α✝\na : α✝\nm n✝ : ℕ\nα : Type u_5\ninst✝ : AddMonoid α\nn : ℕ\nx✝ : n + 2 ≠ 0\n⊢ (n + 2) • univ = univ\n[PROOFSTEP]\nrw [succ_nsmul, nsmul_univ n.succ_ne_zero, univ_add_univ]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Monoid α\ns t : Set α\na : α\nm n✝ n : ℕ\nx✝ : n + 2 ≠ 0\n⊢ univ ^ (n + 2) = univ\n[PROOFSTEP]\nrw [pow_succ, univ_pow n.succ_ne_zero, univ_mul_univ]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\n⊢ s * t = 1 ↔ ∃ a b, s = {a} ∧ t = {b} ∧ a * b = 1\n[PROOFSTEP]\nrefine' ⟨fun h => _, _⟩\n[GOAL]\ncase refine'_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\nh : s * t = 1\n⊢ ∃ a b, s = {a} ∧ t = {b} ∧ a * b = 1\n[PROOFSTEP]\nhave hst : (s * t).Nonempty := h.symm.subst one_nonempty\n[GOAL]\ncase refine'_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\nh : s * t = 1\nhst : Set.Nonempty (s * t)\n⊢ ∃ a b, s = {a} ∧ t = {b} ∧ a * b = 1\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := hst.of_image2_left\n[GOAL]\ncase refine'_1.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\nh : s * t = 1\nhst : Set.Nonempty (s * t)\na : α\nha : a ∈ s\n⊢ ∃ a b, s = {a} ∧ t = {b} ∧ a * b = 1\n[PROOFSTEP]\nobtain ⟨b, hb⟩ := hst.of_image2_right\n[GOAL]\ncase refine'_1.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\nh : s * t = 1\nhst : Set.Nonempty (s * t)\na : α\nha : a ∈ s\nb : α\nhb : b ∈ t\n⊢ ∃ a b, s = {a} ∧ t = {b} ∧ a * b = 1\n[PROOFSTEP]\nhave H : ∀ {a b}, a ∈ s → b ∈ t → a * b = (1 : α) := fun {a b} ha hb => h.subset <| mem_image2_of_mem ha hb\n[GOAL]\ncase refine'_1.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\nh : s * t = 1\nhst : Set.Nonempty (s * t)\na : α\nha : a ∈ s\nb : α\nhb : b ∈ t\nH : ∀ {a b : α}, a ∈ s → b ∈ t → a * b = 1\n⊢ ∃ a b, s = {a} ∧ t = {b} ∧ a * b = 1\n[PROOFSTEP]\nrefine' ⟨a, b, _, _, H ha hb⟩\n[GOAL]\ncase refine'_1.intro.intro.refine'_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\nh : s * t = 1\nhst : Set.Nonempty (s * t)\na : α\nha : a ∈ s\nb : α\nhb : b ∈ t\nH : ∀ {a b : α}, a ∈ s → b ∈ t → a * b = 1\n⊢ s = {a}\n[PROOFSTEP]\nrefine' eq_singleton_iff_unique_mem.2 ⟨‹_›, fun x hx => _⟩\n[GOAL]\ncase refine'_1.intro.intro.refine'_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\nh : s * t = 1\nhst : Set.Nonempty (s * t)\na : α\nha : a ∈ s\nb : α\nhb : b ∈ t\nH : ∀ {a b : α}, a ∈ s → b ∈ t → a * b = 1\n⊢ t = {b}\n[PROOFSTEP]\nrefine' eq_singleton_iff_unique_mem.2 ⟨‹_›, fun x hx => _⟩\n[GOAL]\ncase refine'_1.intro.intro.refine'_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\nh : s * t = 1\nhst : Set.Nonempty (s * t)\na : α\nha : a ∈ s\nb : α\nhb : b ∈ t\nH : ∀ {a b : α}, a ∈ s → b ∈ t → a * b = 1\nx : α\nhx : x ∈ s\n⊢ x = a\n[PROOFSTEP]\nexact (eq_inv_of_mul_eq_one_left <| H hx hb).trans (inv_eq_of_mul_eq_one_left <| H ha hb)\n[GOAL]\ncase refine'_1.intro.intro.refine'_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\nh : s * t = 1\nhst : Set.Nonempty (s * t)\na : α\nha : a ∈ s\nb : α\nhb : b ∈ t\nH : ∀ {a b : α}, a ∈ s → b ∈ t → a * b = 1\nx : α\nhx : x ∈ t\n⊢ x = b\n[PROOFSTEP]\nexact (eq_inv_of_mul_eq_one_right <| H ha hx).trans (inv_eq_of_mul_eq_one_right <| H ha hb)\n[GOAL]\ncase refine'_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\n⊢ (∃ a b, s = {a} ∧ t = {b} ∧ a * b = 1) → s * t = 1\n[PROOFSTEP]\nrintro ⟨b, c, rfl, rfl, h⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\nb c : α\nh : b * c = 1\n⊢ {b} * {c} = 1\n[PROOFSTEP]\nrw [singleton_mul_singleton, h, singleton_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns✝ t✝ : Set α\nsrc✝³ : Monoid (Set α) := Set.monoid\nsrc✝² : InvolutiveInv (Set α) := involutiveInv\nsrc✝¹ : Div (Set α) := Set.div\nsrc✝ : Pow (Set α) ℤ := Set.ZPow\ns t : Set α\n⊢ s / t = s * t⁻¹\n[PROOFSTEP]\nrw [← image_id (s / t), ← image_inv]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns✝ t✝ : Set α\nsrc✝³ : Monoid (Set α) := Set.monoid\nsrc✝² : InvolutiveInv (Set α) := involutiveInv\nsrc✝¹ : Div (Set α) := Set.div\nsrc✝ : Pow (Set α) ℤ := Set.ZPow\ns t : Set α\n⊢ id '' (s / t) = s * Inv.inv '' t\n[PROOFSTEP]\nexact image_image2_distrib_right div_eq_mul_inv\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns✝ t✝ : Set α\nsrc✝³ : Monoid (Set α) := Set.monoid\nsrc✝² : InvolutiveInv (Set α) := involutiveInv\nsrc✝¹ : Div (Set α) := Set.div\nsrc✝ : Pow (Set α) ℤ := Set.ZPow\ns t : Set α\n⊢ (s * t)⁻¹ = t⁻¹ * s⁻¹\n[PROOFSTEP]\nsimp_rw [← image_inv]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns✝ t✝ : Set α\nsrc✝³ : Monoid (Set α) := Set.monoid\nsrc✝² : InvolutiveInv (Set α) := involutiveInv\nsrc✝¹ : Div (Set α) := Set.div\nsrc✝ : Pow (Set α) ℤ := Set.ZPow\ns t : Set α\n⊢ Inv.inv '' (s * t) = Inv.inv '' t * Inv.inv '' s\n[PROOFSTEP]\nexact image_image2_antidistrib mul_inv_rev\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns✝ t✝ : Set α\nsrc✝³ : Monoid (Set α) := Set.monoid\nsrc✝² : InvolutiveInv (Set α) := involutiveInv\nsrc✝¹ : Div (Set α) := Set.div\nsrc✝ : Pow (Set α) ℤ := Set.ZPow\ns t : Set α\nh : s * t = 1\n⊢ s⁻¹ = t\n[PROOFSTEP]\nobtain ⟨a, b, rfl, rfl, hab⟩ := Set.mul_eq_one_iff.1 h\n[GOAL]\ncase intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\nsrc✝³ : Monoid (Set α) := Set.monoid\nsrc✝² : InvolutiveInv (Set α) := involutiveInv\nsrc✝¹ : Div (Set α) := Set.div\nsrc✝ : Pow (Set α) ℤ := Set.ZPow\na b : α\nhab : a * b = 1\nh : {a} * {b} = 1\n⊢ {a}⁻¹ = {b}\n[PROOFSTEP]\nrw [inv_singleton, inv_eq_of_mul_eq_one_right hab]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\n⊢ IsUnit s ↔ ∃ a, s = {a} ∧ IsUnit a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\n⊢ IsUnit s → ∃ a, s = {a} ∧ IsUnit a\n[PROOFSTEP]\nrintro ⟨u, rfl⟩\n[GOAL]\ncase mp.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\nt : Set α\nu : (Set α)ˣ\n⊢ ∃ a, ↑u = {a} ∧ IsUnit a\n[PROOFSTEP]\nobtain ⟨a, b, ha, hb, h⟩ := Set.mul_eq_one_iff.1 u.mul_inv\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\nt : Set α\nu : (Set α)ˣ\na b : α\nha : ↑u = {a}\nhb : ↑u⁻¹ = {b}\nh : a * b = 1\n⊢ ∃ a, ↑u = {a} ∧ IsUnit a\n[PROOFSTEP]\nrefine' ⟨a, ha, ⟨a, b, h, singleton_injective _⟩, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\nt : Set α\nu : (Set α)ˣ\na b : α\nha : ↑u = {a}\nhb : ↑u⁻¹ = {b}\nh : a * b = 1\n⊢ {b * a} = {1}\n[PROOFSTEP]\nrw [← singleton_mul_singleton, ← ha, ← hb]\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\nt : Set α\nu : (Set α)ˣ\na b : α\nha : ↑u = {a}\nhb : ↑u⁻¹ = {b}\nh : a * b = 1\n⊢ ↑u⁻¹ * ↑u = {1}\n[PROOFSTEP]\nexact u.inv_mul\n[GOAL]\ncase mpr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\ns t : Set α\n⊢ (∃ a, s = {a} ∧ IsUnit a) → IsUnit s\n[PROOFSTEP]\nrintro ⟨a, rfl, ha⟩\n[GOAL]\ncase mpr.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : DivisionMonoid α\nt : Set α\na : α\nha : IsUnit a\n⊢ IsUnit {a}\n[PROOFSTEP]\nexact ha.set\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Mul α\ninst✝ : HasDistribNeg α\nsrc✝ : InvolutiveNeg (Set α) := involutiveNeg\nx✝¹ x✝ : Set α\n⊢ -x✝¹ * x✝ = -(x✝¹ * x✝)\n[PROOFSTEP]\nsimp_rw [← image_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Mul α\ninst✝ : HasDistribNeg α\nsrc✝ : InvolutiveNeg (Set α) := involutiveNeg\nx✝¹ x✝ : Set α\n⊢ Neg.neg '' x✝¹ * x✝ = Neg.neg '' (x✝¹ * x✝)\n[PROOFSTEP]\nexact image2_image_left_comm neg_mul\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Mul α\ninst✝ : HasDistribNeg α\nsrc✝ : InvolutiveNeg (Set α) := involutiveNeg\nx✝¹ x✝ : Set α\n⊢ x✝¹ * -x✝ = -(x✝¹ * x✝)\n[PROOFSTEP]\nsimp_rw [← image_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Mul α\ninst✝ : HasDistribNeg α\nsrc✝ : InvolutiveNeg (Set α) := involutiveNeg\nx✝¹ x✝ : Set α\n⊢ x✝¹ * Neg.neg '' x✝ = Neg.neg '' (x✝¹ * x✝)\n[PROOFSTEP]\nexact image_image2_right_comm mul_neg\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : MulZeroClass α\ns✝ t s : Set α\n⊢ s * 0 ⊆ 0\n[PROOFSTEP]\nsimp [subset_def, mem_mul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : MulZeroClass α\ns✝ t s : Set α\n⊢ 0 * s ⊆ 0\n[PROOFSTEP]\nsimp [subset_def, mem_mul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : MulZeroClass α\ns t : Set α\nhs : Set.Nonempty s\n⊢ 0 ⊆ s * 0\n[PROOFSTEP]\nsimpa [mem_mul] using hs\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : MulZeroClass α\ns t : Set α\nhs : Set.Nonempty s\n⊢ 0 ⊆ 0 * s\n[PROOFSTEP]\nsimpa [mem_mul] using hs\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ 1 ∈ s / t ↔ ¬Disjoint s t\n[PROOFSTEP]\nsimp [not_disjoint_iff_nonempty_inter, mem_div, div_eq_one, Set.Nonempty]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ IsUnit s ↔ ∃ a, s = {a}\n[PROOFSTEP]\nsimp only [isUnit_iff, Group.isUnit, and_true_iff]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ (fun x x_1 => x * x_1) a '' t = (fun x x_1 => x * x_1) a⁻¹ ⁻¹' t\n[PROOFSTEP]\nrw [image_eq_preimage_of_inverse]\n[GOAL]\ncase h₁\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ LeftInverse ((fun x x_1 => x * x_1) a⁻¹) ((fun x x_1 => x * x_1) a)\n[PROOFSTEP]\nintro c\n[GOAL]\ncase h₂\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ Function.RightInverse ((fun x x_1 => x * x_1) a⁻¹) ((fun x x_1 => x * x_1) a)\n[PROOFSTEP]\nintro c\n[GOAL]\ncase h₁\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b c : α\n⊢ (fun x x_1 => x * x_1) a⁻¹ ((fun x x_1 => x * x_1) a c) = c\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b c : α\n⊢ (fun x x_1 => x * x_1) a ((fun x x_1 => x * x_1) a⁻¹ c) = c\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ (fun x => x * b) '' t = (fun x => x * b⁻¹) ⁻¹' t\n[PROOFSTEP]\nrw [image_eq_preimage_of_inverse]\n[GOAL]\ncase h₁\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ LeftInverse (fun x => x * b⁻¹) fun x => x * b\n[PROOFSTEP]\nintro c\n[GOAL]\ncase h₂\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ Function.RightInverse (fun x => x * b⁻¹) fun x => x * b\n[PROOFSTEP]\nintro c\n[GOAL]\ncase h₁\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b c : α\n⊢ (fun x => x * b⁻¹) ((fun x => x * b) c) = c\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b c : α\n⊢ (fun x => x * b) ((fun x => x * b⁻¹) c) = c\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ (fun b => a⁻¹ * b) '' t = (fun b => a * b) ⁻¹' t\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ (fun x => x * b⁻¹) '' t = (fun x => x * b) ⁻¹' t\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ (fun x x_1 => x * x_1) a ⁻¹' {b} = {a⁻¹ * b}\n[PROOFSTEP]\nrw [← image_mul_left', image_singleton]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ (fun x => x * a) ⁻¹' {b} = {b * a⁻¹}\n[PROOFSTEP]\nrw [← image_mul_right', image_singleton]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ (fun x x_1 => x * x_1) a ⁻¹' 1 = {a⁻¹}\n[PROOFSTEP]\nrw [← image_mul_left', image_one, mul_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ (fun x => x * b) ⁻¹' 1 = {b⁻¹}\n[PROOFSTEP]\nrw [← image_mul_right', image_one, one_mul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ (fun b => a⁻¹ * b) ⁻¹' 1 = {a}\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Group α\ns t : Set α\na b : α\n⊢ (fun x => x * b⁻¹) ⁻¹' 1 = {b}\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : GroupWithZero α\ns✝ t s : Set α\n⊢ s / 0 ⊆ 0\n[PROOFSTEP]\nsimp [subset_def, mem_div]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : GroupWithZero α\ns✝ t s : Set α\n⊢ 0 / s ⊆ 0\n[PROOFSTEP]\nsimp [subset_def, mem_div]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : GroupWithZero α\ns t : Set α\nhs : Set.Nonempty s\n⊢ 0 ⊆ s / 0\n[PROOFSTEP]\nsimpa [mem_div] using hs\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : GroupWithZero α\ns t : Set α\nhs : Set.Nonempty s\n⊢ 0 ⊆ 0 / s\n[PROOFSTEP]\nsimpa [mem_div] using hs\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Mul α\ninst✝¹ : Mul β\ninst✝ : MulHomClass F α β\nm : F\ns✝ t✝ : Set α\ns t : Set β\n⊢ ↑m ⁻¹' s * ↑m ⁻¹' t ⊆ ↑m ⁻¹' (s * t)\n[PROOFSTEP]\nrintro _ ⟨_, _, _, _, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Mul α\ninst✝¹ : Mul β\ninst✝ : MulHomClass F α β\nm : F\ns✝ t✝ : Set α\ns t : Set β\nw✝¹ w✝ : α\nleft✝¹ : w✝¹ ∈ ↑m ⁻¹' s\nleft✝ : w✝ ∈ ↑m ⁻¹' t\n⊢ (fun x x_1 => x * x_1) w✝¹ w✝ ∈ ↑m ⁻¹' (s * t)\n[PROOFSTEP]\nexact ⟨_, _, ‹_›, ‹_›, (map_mul m _ _).symm⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Group α\ninst✝¹ : DivisionMonoid β\ninst✝ : MonoidHomClass F α β\nm : F\ns✝ t✝ : Set α\ns t : Set β\n⊢ ↑m ⁻¹' s / ↑m ⁻¹' t ⊆ ↑m ⁻¹' (s / t)\n[PROOFSTEP]\nrintro _ ⟨_, _, _, _, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Group α\ninst✝¹ : DivisionMonoid β\ninst✝ : MonoidHomClass F α β\nm : F\ns✝ t✝ : Set α\ns t : Set β\nw✝¹ w✝ : α\nleft✝¹ : w✝¹ ∈ ↑m ⁻¹' s\nleft✝ : w✝ ∈ ↑m ⁻¹' t\n⊢ (fun x x_1 => x / x_1) w✝¹ w✝ ∈ ↑m ⁻¹' (s / t)\n[PROOFSTEP]\nexact ⟨_, _, ‹_›, ‹_›, (map_div m _ _).symm⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : OrderedCommMonoid α\nA B : Set α\n⊢ BddAbove A → BddAbove B → BddAbove (A * B)\n[PROOFSTEP]\nrintro ⟨bA, hbA⟩ ⟨bB, hbB⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : OrderedCommMonoid α\nA B : Set α\nbA : α\nhbA : bA ∈ upperBounds A\nbB : α\nhbB : bB ∈ upperBounds B\n⊢ BddAbove (A * B)\n[PROOFSTEP]\nuse bA * bB\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : OrderedCommMonoid α\nA B : Set α\nbA : α\nhbA : bA ∈ upperBounds A\nbB : α\nhbB : bB ∈ upperBounds B\n⊢ bA * bB ∈ upperBounds (A * B)\n[PROOFSTEP]\nrintro x ⟨xa, xb, hxa, hxb, rfl⟩\n[GOAL]\ncase h.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : OrderedCommMonoid α\nA B : Set α\nbA : α\nhbA : bA ∈ upperBounds A\nbB : α\nhbB : bB ∈ upperBounds B\nxa xb : α\nhxa : xa ∈ A\nhxb : xb ∈ B\n⊢ (fun x x_1 => x * x_1) xa xb ≤ bA * bB\n[PROOFSTEP]\nexact mul_le_mul' (hbA hxa) (hbB hxb)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nf : ℕ → ℕ\nh1 : Monotone f\nB : ℕ\nh2 : ∀ (n : ℕ), f n ≤ B\nh3 : ∀ (n : ℕ), f n = f (n + 1) → f (n + 1) = f (n + 2)\n⊢ ∀ (k : ℕ), B ≤ k → f k = f B\n[PROOFSTEP]\nhave key : ∃ n : ℕ, n ≤ B ∧ f n = f (n + 1) := by\n  contrapose! h2\n  suffices ∀ n : ℕ, n ≤ B + 1 → n ≤ f n by exact ⟨B + 1, this (B + 1) (le_refl (B + 1))⟩\n  exact fun n =>\n    Nat.rec (fun _ => Nat.zero_le (f 0))\n      (fun n ih h =>\n        lt_of_le_of_lt (ih (n.le_succ.trans h)) (lt_of_le_of_ne (h1 n.le_succ) (h2 n (Nat.succ_le_succ_iff.mp h))))\n      n\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nf : ℕ → ℕ\nh1 : Monotone f\nB : ℕ\nh2 : ∀ (n : ℕ), f n ≤ B\nh3 : ∀ (n : ℕ), f n = f (n + 1) → f (n + 1) = f (n + 2)\n⊢ ∃ n, n ≤ B ∧ f n = f (n + 1)\n[PROOFSTEP]\ncontrapose! h2\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nf : ℕ → ℕ\nh1 : Monotone f\nB : ℕ\nh3 : ∀ (n : ℕ), f n = f (n + 1) → f (n + 1) = f (n + 2)\nh2 : ∀ (n : ℕ), n ≤ B → f n ≠ f (n + 1)\n⊢ ∃ n, B < f n\n[PROOFSTEP]\nsuffices ∀ n : ℕ, n ≤ B + 1 → n ≤ f n by exact ⟨B + 1, this (B + 1) (le_refl (B + 1))⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nf : ℕ → ℕ\nh1 : Monotone f\nB : ℕ\nh3 : ∀ (n : ℕ), f n = f (n + 1) → f (n + 1) = f (n + 2)\nh2 : ∀ (n : ℕ), n ≤ B → f n ≠ f (n + 1)\nthis : ∀ (n : ℕ), n ≤ B + 1 → n ≤ f n\n⊢ ∃ n, B < f n\n[PROOFSTEP]\nexact ⟨B + 1, this (B + 1) (le_refl (B + 1))⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nf : ℕ → ℕ\nh1 : Monotone f\nB : ℕ\nh3 : ∀ (n : ℕ), f n = f (n + 1) → f (n + 1) = f (n + 2)\nh2 : ∀ (n : ℕ), n ≤ B → f n ≠ f (n + 1)\n⊢ ∀ (n : ℕ), n ≤ B + 1 → n ≤ f n\n[PROOFSTEP]\nexact fun n =>\n  Nat.rec (fun _ => Nat.zero_le (f 0))\n    (fun n ih h =>\n      lt_of_le_of_lt (ih (n.le_succ.trans h)) (lt_of_le_of_ne (h1 n.le_succ) (h2 n (Nat.succ_le_succ_iff.mp h))))\n    n\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nf : ℕ → ℕ\nh1 : Monotone f\nB : ℕ\nh2 : ∀ (n : ℕ), f n ≤ B\nh3 : ∀ (n : ℕ), f n = f (n + 1) → f (n + 1) = f (n + 2)\nkey : ∃ n, n ≤ B ∧ f n = f (n + 1)\n⊢ ∀ (k : ℕ), B ≤ k → f k = f B\n[PROOFSTEP]\nobtain ⟨n, hn1, hn2⟩ := key\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nf : ℕ → ℕ\nh1 : Monotone f\nB : ℕ\nh2 : ∀ (n : ℕ), f n ≤ B\nh3 : ∀ (n : ℕ), f n = f (n + 1) → f (n + 1) = f (n + 2)\nn : ℕ\nhn1 : n ≤ B\nhn2 : f n = f (n + 1)\n⊢ ∀ (k : ℕ), B ≤ k → f k = f B\n[PROOFSTEP]\nreplace key : ∀ k : ℕ, f (n + k) = f (n + k + 1) ∧ f (n + k) = f n := fun k =>\n  Nat.rec ⟨hn2, rfl⟩ (fun k ih => ⟨h3 _ ih.1, ih.1.symm.trans ih.2⟩) k\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nf : ℕ → ℕ\nh1 : Monotone f\nB : ℕ\nh2 : ∀ (n : ℕ), f n ≤ B\nh3 : ∀ (n : ℕ), f n = f (n + 1) → f (n + 1) = f (n + 2)\nn : ℕ\nhn1 : n ≤ B\nhn2 : f n = f (n + 1)\nkey : ∀ (k : ℕ), f (n + k) = f (n + k + 1) ∧ f (n + k) = f n\n⊢ ∀ (k : ℕ), B ≤ k → f k = f B\n[PROOFSTEP]\nreplace key : ∀ k : ℕ, n ≤ k → f k = f n := fun k hk =>\n  (congr_arg f (add_tsub_cancel_of_le hk)).symm.trans (key (k - n)).2\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nf : ℕ → ℕ\nh1 : Monotone f\nB : ℕ\nh2 : ∀ (n : ℕ), f n ≤ B\nh3 : ∀ (n : ℕ), f n = f (n + 1) → f (n + 1) = f (n + 2)\nn : ℕ\nhn1 : n ≤ B\nhn2 : f n = f (n + 1)\nkey : ∀ (k : ℕ), n ≤ k → f k = f n\n⊢ ∀ (k : ℕ), B ≤ k → f k = f B\n[PROOFSTEP]\nexact fun k hk => (key k (hn1.trans hk)).trans (key B hn1).symm\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Pointwise.Basic", "llama_tokens": 12953, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499941, "lm_q2_score": 0.5813030906443133, "lm_q1q2_score": 0.38477781349977364}}
{"text": "[GOAL]\nk : Type u\ninst✝ : Field k\ns : Finset (MonicIrreducible k)\nf : MonicIrreducible k\nhf : f ∈ s\n⊢ ↑(toSplittingField k s) (evalXSelf k f) = 0\n[PROOFSTEP]\nrw [toSplittingField, evalXSelf, ← AlgHom.coe_toRingHom, hom_eval₂, AlgHom.coe_toRingHom, MvPolynomial.aeval_X,\n  dif_pos hf, ← algebraMap_eq, AlgHom.comp_algebraMap]\n[GOAL]\nk : Type u\ninst✝ : Field k\ns : Finset (MonicIrreducible k)\nf : MonicIrreducible k\nhf : f ∈ s\n⊢ Polynomial.eval₂ (algebraMap k (SplittingField (∏ x in s, ↑x)))\n      (rootOfSplits (algebraMap k (SplittingField (∏ x in s, ↑x)))\n        (_ : Splits (algebraMap k (SplittingField (∏ x in s, ↑x))) ↑f) (_ : ¬degree ↑f = 0))\n      ↑f =\n    0\n[PROOFSTEP]\nexact map_rootOfSplits _ _ _\n[GOAL]\nk : Type u\ninst✝ : Field k\n⊢ spanEval k ≠ ⊤\n[PROOFSTEP]\nrw [Ideal.ne_top_iff_one, spanEval, Ideal.span, ← Set.image_univ, Finsupp.mem_span_image_iff_total]\n[GOAL]\nk : Type u\ninst✝ : Field k\n⊢ ¬∃ l,\n      l ∈ Finsupp.supported (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible k) k) Set.univ ∧\n        ↑(Finsupp.total (MonicIrreducible k) (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible k) k)\n                (evalXSelf k))\n            l =\n          1\n[PROOFSTEP]\nrintro ⟨v, _, hv⟩\n[GOAL]\ncase intro.intro\nk : Type u\ninst✝ : Field k\nv : MonicIrreducible k →₀ MvPolynomial (MonicIrreducible k) k\nleft✝ : v ∈ Finsupp.supported (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible k) k) Set.univ\nhv :\n  ↑(Finsupp.total (MonicIrreducible k) (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible k) k)\n          (evalXSelf k))\n      v =\n    1\n⊢ False\n[PROOFSTEP]\nreplace hv := congr_arg (toSplittingField k v.support) hv\n[GOAL]\ncase intro.intro\nk : Type u\ninst✝ : Field k\nv : MonicIrreducible k →₀ MvPolynomial (MonicIrreducible k) k\nleft✝ : v ∈ Finsupp.supported (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible k) k) Set.univ\nhv :\n  ↑(toSplittingField k v.support)\n      (↑(Finsupp.total (MonicIrreducible k) (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible k) k)\n            (evalXSelf k))\n        v) =\n    ↑(toSplittingField k v.support) 1\n⊢ False\n[PROOFSTEP]\nrw [AlgHom.map_one, Finsupp.total_apply, Finsupp.sum, AlgHom.map_sum, Finset.sum_eq_zero] at hv \n[GOAL]\ncase intro.intro\nk : Type u\ninst✝ : Field k\nv : MonicIrreducible k →₀ MvPolynomial (MonicIrreducible k) k\nleft✝ : v ∈ Finsupp.supported (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible k) k) Set.univ\nhv : 0 = 1\n⊢ False\n[PROOFSTEP]\nexact zero_ne_one hv\n[GOAL]\ncase intro.intro\nk : Type u\ninst✝ : Field k\nv : MonicIrreducible k →₀ MvPolynomial (MonicIrreducible k) k\nleft✝ : v ∈ Finsupp.supported (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible k) k) Set.univ\nhv : ∑ x in v.support, ↑(toSplittingField k v.support) (↑v x • evalXSelf k x) = 1\n⊢ ∀ (x : MonicIrreducible k), x ∈ v.support → ↑(toSplittingField k v.support) (↑v x • evalXSelf k x) = 0\n[PROOFSTEP]\nintro j hj\n[GOAL]\ncase intro.intro\nk : Type u\ninst✝ : Field k\nv : MonicIrreducible k →₀ MvPolynomial (MonicIrreducible k) k\nleft✝ : v ∈ Finsupp.supported (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible k) k) Set.univ\nhv : ∑ x in v.support, ↑(toSplittingField k v.support) (↑v x • evalXSelf k x) = 1\nj : MonicIrreducible k\nhj : j ∈ v.support\n⊢ ↑(toSplittingField k v.support) (↑v j • evalXSelf k j) = 0\n[PROOFSTEP]\nrw [smul_eq_mul, AlgHom.map_mul, toSplittingField_evalXSelf (s := v.support) hj, mul_zero]\n[GOAL]\nk : Type u\ninst✝ : Field k\nz : AdjoinMonic k\n⊢ IsIntegral k z\n[PROOFSTEP]\nlet ⟨p, hp⟩ := Ideal.Quotient.mk_surjective z\n[GOAL]\nk : Type u\ninst✝ : Field k\nz : AdjoinMonic k\np : MvPolynomial (MonicIrreducible k) k\nhp : ↑(Ideal.Quotient.mk (maxIdeal k)) p = z\n⊢ IsIntegral k z\n[PROOFSTEP]\nrw [← hp]\n[GOAL]\nk : Type u\ninst✝ : Field k\nz : AdjoinMonic k\np : MvPolynomial (MonicIrreducible k) k\nhp : ↑(Ideal.Quotient.mk (maxIdeal k)) p = z\n⊢ IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) p)\n[PROOFSTEP]\ninduction p using MvPolynomial.induction_on generalizing z with\n| h_C => exact isIntegral_algebraMap\n| h_add _ _ ha hb => exact isIntegral_add (ha _ rfl) (hb _ rfl)\n| h_X p f ih =>\n  · refine @isIntegral_mul k _ _ _ _ _ (Ideal.Quotient.mk (maxIdeal k) _) (ih _ rfl) ?_\n    refine ⟨f, f.2.1, ?_⟩\n    erw [AdjoinMonic.algebraMap, ← hom_eval₂, Ideal.Quotient.eq_zero_iff_mem]\n    exact le_maxIdeal k (Ideal.subset_span ⟨f, rfl⟩)\n[GOAL]\nk : Type u\ninst✝ : Field k\nz : AdjoinMonic k\np : MvPolynomial (MonicIrreducible k) k\nhp : ↑(Ideal.Quotient.mk (maxIdeal k)) p = z\n⊢ IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) p)\n[PROOFSTEP]\ninduction p using MvPolynomial.induction_on generalizing z with\n| h_C => exact isIntegral_algebraMap\n| h_add _ _ ha hb => exact isIntegral_add (ha _ rfl) (hb _ rfl)\n| h_X p f ih =>\n  · refine @isIntegral_mul k _ _ _ _ _ (Ideal.Quotient.mk (maxIdeal k) _) (ih _ rfl) ?_\n    refine ⟨f, f.2.1, ?_⟩\n    erw [AdjoinMonic.algebraMap, ← hom_eval₂, Ideal.Quotient.eq_zero_iff_mem]\n    exact le_maxIdeal k (Ideal.subset_span ⟨f, rfl⟩)\n[GOAL]\ncase h_C\nk : Type u\ninst✝ : Field k\na✝ : k\nz : AdjoinMonic k\nhp : ↑(Ideal.Quotient.mk (maxIdeal k)) (↑MvPolynomial.C a✝) = z\n⊢ IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) (↑MvPolynomial.C a✝))\n[PROOFSTEP]\n\n| h_C => exact isIntegral_algebraMap\n[GOAL]\ncase h_C\nk : Type u\ninst✝ : Field k\na✝ : k\nz : AdjoinMonic k\nhp : ↑(Ideal.Quotient.mk (maxIdeal k)) (↑MvPolynomial.C a✝) = z\n⊢ IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) (↑MvPolynomial.C a✝))\n[PROOFSTEP]\nexact isIntegral_algebraMap\n[GOAL]\ncase h_add\nk : Type u\ninst✝ : Field k\np✝ q✝ : MvPolynomial (MonicIrreducible k) k\nha :\n  ∀ (z : AdjoinMonic k), ↑(Ideal.Quotient.mk (maxIdeal k)) p✝ = z → IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) p✝)\nhb :\n  ∀ (z : AdjoinMonic k), ↑(Ideal.Quotient.mk (maxIdeal k)) q✝ = z → IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) q✝)\nz : AdjoinMonic k\nhp : ↑(Ideal.Quotient.mk (maxIdeal k)) (p✝ + q✝) = z\n⊢ IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) (p✝ + q✝))\n[PROOFSTEP]\n\n| h_add _ _ ha hb => exact isIntegral_add (ha _ rfl) (hb _ rfl)\n[GOAL]\ncase h_add\nk : Type u\ninst✝ : Field k\np✝ q✝ : MvPolynomial (MonicIrreducible k) k\nha :\n  ∀ (z : AdjoinMonic k), ↑(Ideal.Quotient.mk (maxIdeal k)) p✝ = z → IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) p✝)\nhb :\n  ∀ (z : AdjoinMonic k), ↑(Ideal.Quotient.mk (maxIdeal k)) q✝ = z → IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) q✝)\nz : AdjoinMonic k\nhp : ↑(Ideal.Quotient.mk (maxIdeal k)) (p✝ + q✝) = z\n⊢ IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) (p✝ + q✝))\n[PROOFSTEP]\nexact isIntegral_add (ha _ rfl) (hb _ rfl)\n[GOAL]\ncase h_X\nk : Type u\ninst✝ : Field k\np : MvPolynomial (MonicIrreducible k) k\nf : MonicIrreducible k\nih : ∀ (z : AdjoinMonic k), ↑(Ideal.Quotient.mk (maxIdeal k)) p = z → IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) p)\nz : AdjoinMonic k\nhp : ↑(Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f) = z\n⊢ IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f))\n[PROOFSTEP]\n\n| h_X p f ih =>\n  · refine @isIntegral_mul k _ _ _ _ _ (Ideal.Quotient.mk (maxIdeal k) _) (ih _ rfl) ?_\n    refine ⟨f, f.2.1, ?_⟩\n    erw [AdjoinMonic.algebraMap, ← hom_eval₂, Ideal.Quotient.eq_zero_iff_mem]\n    exact le_maxIdeal k (Ideal.subset_span ⟨f, rfl⟩)\n[GOAL]\ncase h_X\nk : Type u\ninst✝ : Field k\np : MvPolynomial (MonicIrreducible k) k\nf : MonicIrreducible k\nih : ∀ (z : AdjoinMonic k), ↑(Ideal.Quotient.mk (maxIdeal k)) p = z → IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) p)\nz : AdjoinMonic k\nhp : ↑(Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f) = z\n⊢ IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f))\n[PROOFSTEP]\nrefine @isIntegral_mul k _ _ _ _ _ (Ideal.Quotient.mk (maxIdeal k) _) (ih _ rfl) ?_\n[GOAL]\ncase h_X\nk : Type u\ninst✝ : Field k\np : MvPolynomial (MonicIrreducible k) k\nf : MonicIrreducible k\nih : ∀ (z : AdjoinMonic k), ↑(Ideal.Quotient.mk (maxIdeal k)) p = z → IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) p)\nz : AdjoinMonic k\nhp : ↑(Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f) = z\n⊢ IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) (MvPolynomial.X f))\n[PROOFSTEP]\nrefine ⟨f, f.2.1, ?_⟩\n[GOAL]\ncase h_X\nk : Type u\ninst✝ : Field k\np : MvPolynomial (MonicIrreducible k) k\nf : MonicIrreducible k\nih : ∀ (z : AdjoinMonic k), ↑(Ideal.Quotient.mk (maxIdeal k)) p = z → IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) p)\nz : AdjoinMonic k\nhp : ↑(Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f) = z\n⊢ Polynomial.eval₂\n      (_root_.algebraMap k ((fun x => MvPolynomial (MonicIrreducible k) k ⧸ maxIdeal k) (MvPolynomial.X f)))\n      (↑(Ideal.Quotient.mk (maxIdeal k)) (MvPolynomial.X f)) ↑f =\n    0\n[PROOFSTEP]\nerw [AdjoinMonic.algebraMap, ← hom_eval₂, Ideal.Quotient.eq_zero_iff_mem]\n[GOAL]\ncase h_X\nk : Type u\ninst✝ : Field k\np : MvPolynomial (MonicIrreducible k) k\nf : MonicIrreducible k\nih : ∀ (z : AdjoinMonic k), ↑(Ideal.Quotient.mk (maxIdeal k)) p = z → IsIntegral k (↑(Ideal.Quotient.mk (maxIdeal k)) p)\nz : AdjoinMonic k\nhp : ↑(Ideal.Quotient.mk (maxIdeal k)) (p * MvPolynomial.X f) = z\n⊢ Polynomial.eval₂ MvPolynomial.C (MvPolynomial.X f) ↑f ∈ maxIdeal k\n[PROOFSTEP]\nexact le_maxIdeal k (Ideal.subset_span ⟨f, rfl⟩)\n[GOAL]\nk : Type u\ninst✝ : Field k\nf : k[X]\nhfm : Monic f\nhfi : Irreducible f\n⊢ Polynomial.eval₂ (toAdjoinMonic k)\n      (↑(Ideal.Quotient.mk (maxIdeal k)) (MvPolynomial.X { val := f, property := (_ : Monic f ∧ Irreducible f) })) f =\n    0\n[PROOFSTEP]\nrw [toAdjoinMonic, ← hom_eval₂, Ideal.Quotient.eq_zero_iff_mem]\n[GOAL]\nk : Type u\ninst✝ : Field k\nf : k[X]\nhfm : Monic f\nhfi : Irreducible f\n⊢ Polynomial.eval₂ MvPolynomial.C (MvPolynomial.X { val := f, property := (_ : Monic f ∧ Irreducible f) }) f ∈\n    maxIdeal k\n[PROOFSTEP]\nexact le_maxIdeal k (Ideal.subset_span <| ⟨_, rfl⟩)\n[GOAL]\nk : Type u\ninst✝ : Field k\nn : ℕ\nf : (Step k n)[X]\nhfm : Monic f\nhfi : Irreducible f\n⊢ ∃ x, Polynomial.eval₂ (toStepSucc k n) x f = 0\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := @AdjoinMonic.exists_root _ (Step.field k n) _ hfm hfi\n[GOAL]\ncase intro\nk : Type u\ninst✝ : Field k\nn : ℕ\nf : (Step k n)[X]\nhfm : Monic f\nhfi : Irreducible f\nx : AdjoinMonic (Step k n)\nhx : Polynomial.eval₂ (toAdjoinMonic (Step k n)) x f = 0\n⊢ ∃ x, Polynomial.eval₂ (toStepSucc k n) x f = 0\n[PROOFSTEP]\nexact ⟨x, by apply hx⟩\n[GOAL]\nk : Type u\ninst✝ : Field k\nn : ℕ\nf : (Step k n)[X]\nhfm : Monic f\nhfi : Irreducible f\nx : AdjoinMonic (Step k n)\nhx : Polynomial.eval₂ (toAdjoinMonic (Step k n)) x f = 0\n⊢ Polynomial.eval₂ (toStepSucc k n) x f = 0\n[PROOFSTEP]\napply hx\n[GOAL]\nk : Type u\ninst✝ : Field k\nm n : ℕ\nh : m ≤ n\n⊢ AlgebraicClosure.toStepOfLE' k m (Nat.succ n) (_ : m ≤ Nat.succ n) =\n    ↑(toStepSucc k n) ∘ AlgebraicClosure.toStepOfLE' k m n h\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nk : Type u\ninst✝ : Field k\nm n : ℕ\nh : m ≤ n\nx : Step k m\n⊢ AlgebraicClosure.toStepOfLE' k m (Nat.succ n) (_ : m ≤ Nat.succ n) x =\n    (↑(toStepSucc k n) ∘ AlgebraicClosure.toStepOfLE' k m n h) x\n[PROOFSTEP]\nconvert Nat.leRecOn_succ h x\n[GOAL]\ncase h.convert_1\nk : Type u\ninst✝ : Field k\nm n : ℕ\nh : m ≤ n\nx : Step k m\n⊢ m ≤ n + 1\n[PROOFSTEP]\nexact h.trans n.le_succ\n[GOAL]\nk : Type u\ninst✝ : Field k\nm n : ℕ\nh : m ≤ n\n⊢ AlgebraicClosure.toStepOfLE' k m n h 1 = 1\n[PROOFSTEP]\ninduction' h with a h ih\n[GOAL]\ncase refl\nk : Type u\ninst✝ : Field k\nm n : ℕ\n⊢ AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1\n[PROOFSTEP]\nexact Nat.leRecOn_self 1\n[GOAL]\ncase step\nk : Type u\ninst✝ : Field k\nm n a : ℕ\nh : Nat.le m a\nih : AlgebraicClosure.toStepOfLE' k m a h 1 = 1\n⊢ AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1\n[PROOFSTEP]\nrw [toStepOfLE'.succ k m a h]\n[GOAL]\ncase step\nk : Type u\ninst✝ : Field k\nm n a : ℕ\nh : Nat.le m a\nih : AlgebraicClosure.toStepOfLE' k m a h 1 = 1\n⊢ (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) 1 = 1\n[PROOFSTEP]\nsimp [ih]\n[GOAL]\nk : Type u\ninst✝ : Field k\nm n : ℕ\nh : m ≤ n\nx y : Step k m\n⊢ OneHom.toFun\n      { toFun := AlgebraicClosure.toStepOfLE' k m n h, map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := AlgebraicClosure.toStepOfLE' k m n h, map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n        x *\n      OneHom.toFun\n        { toFun := AlgebraicClosure.toStepOfLE' k m n h, map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n        y\n[PROOFSTEP]\ninduction' h with a h ih\n[GOAL]\ncase refl\nk : Type u\ninst✝ : Field k\nm n : ℕ\nx y : Step k m\n⊢ OneHom.toFun\n      { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n        x *\n      OneHom.toFun\n        { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n        y\n[PROOFSTEP]\ndsimp [toStepOfLE']\n[GOAL]\ncase refl\nk : Type u\ninst✝ : Field k\nm n : ℕ\nx y : Step k m\n⊢ Nat.leRecOn (_ : Nat.le m m) (fun a => ↑(toStepSucc k a)) (x * y) =\n    Nat.leRecOn (_ : Nat.le m m) (fun a => ↑(toStepSucc k a)) x *\n      Nat.leRecOn (_ : Nat.le m m) (fun a => ↑(toStepSucc k a)) y\n[PROOFSTEP]\nsimp_rw [Nat.leRecOn_self]\n[GOAL]\ncase step\nk : Type u\ninst✝ : Field k\nm n : ℕ\nx y : Step k m\na : ℕ\nh : Nat.le m a\nih :\n  OneHom.toFun\n      { toFun := AlgebraicClosure.toStepOfLE' k m a h, map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := AlgebraicClosure.toStepOfLE' k m a h, map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n        x *\n      OneHom.toFun\n        { toFun := AlgebraicClosure.toStepOfLE' k m a h, map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n        y\n⊢ OneHom.toFun\n      { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n        x *\n      OneHom.toFun\n        { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n        y\n[PROOFSTEP]\nsimp_rw [toStepOfLE'.succ k m a h]\n[GOAL]\ncase step\nk : Type u\ninst✝ : Field k\nm n : ℕ\nx y : Step k m\na : ℕ\nh : Nat.le m a\nih :\n  OneHom.toFun\n      { toFun := AlgebraicClosure.toStepOfLE' k m a h, map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := AlgebraicClosure.toStepOfLE' k m a h, map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n        x *\n      OneHom.toFun\n        { toFun := AlgebraicClosure.toStepOfLE' k m a h, map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n        y\n⊢ (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) (x * y) =\n    (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) x *\n      (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) y\n[PROOFSTEP]\nsimp only at ih \n[GOAL]\ncase step\nk : Type u\ninst✝ : Field k\nm n : ℕ\nx y : Step k m\na : ℕ\nh : Nat.le m a\nih :\n  AlgebraicClosure.toStepOfLE' k m a h (x * y) =\n    AlgebraicClosure.toStepOfLE' k m a h x * AlgebraicClosure.toStepOfLE' k m a h y\n⊢ (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) (x * y) =\n    (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) x *\n      (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) y\n[PROOFSTEP]\nsimp [ih]\n  -- Porting note: original proof was `induction' h with n h ih; · exact Nat.leRecOn_self 0`\n  --                                   `rw [Nat.leRecOn_succ h, ih, RingHom.map_zero]`\n[GOAL]\nk : Type u\ninst✝ : Field k\nm n : ℕ\nh : m ≤ n\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n              map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Step k m),\n                OneHom.toFun\n                    { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                      map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n                      y) })\n      0 =\n    0\n[PROOFSTEP]\ninduction' h with a h ih\n[GOAL]\ncase refl\nk : Type u\ninst✝ : Field k\nm n : ℕ\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n              map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Step k m),\n                OneHom.toFun\n                    { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                      map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n                      y) })\n      0 =\n    0\n[PROOFSTEP]\nexact Nat.leRecOn_self 0\n[GOAL]\ncase step\nk : Type u\ninst✝ : Field k\nm n a : ℕ\nh : Nat.le m a\nih :\n  OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n              map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Step k m),\n                OneHom.toFun\n                    { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                      map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                      y) })\n      0 =\n    0\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n              map_one' := (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Step k m),\n                OneHom.toFun\n                    { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                      map_one' :=\n                        (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                        map_one' :=\n                          (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                        map_one' :=\n                          (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n                      y) })\n      0 =\n    0\n[PROOFSTEP]\nsimp_rw [toStepOfLE'.succ k m a h]\n[GOAL]\ncase step\nk : Type u\ninst✝ : Field k\nm n a : ℕ\nh : Nat.le m a\nih :\n  OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n              map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Step k m),\n                OneHom.toFun\n                    { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                      map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                      y) })\n      0 =\n    0\n⊢ (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) 0 = 0\n[PROOFSTEP]\nsimp only at ih \n[GOAL]\ncase step\nk : Type u\ninst✝ : Field k\nm n a : ℕ\nh : Nat.le m a\nih : AlgebraicClosure.toStepOfLE' k m a h 0 = 0\n⊢ (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) 0 = 0\n[PROOFSTEP]\nsimp [ih]\n[GOAL]\nk : Type u\ninst✝ : Field k\nm n : ℕ\nh : m ≤ n\nx y : Step k m\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n              map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Step k m),\n                OneHom.toFun\n                    { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                      map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n                      y) })\n      (x + y) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Step k m),\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n                        y) })\n        x +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Step k m),\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m n h,\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m n h 1 = 1) }\n                        y) })\n        y\n[PROOFSTEP]\ninduction' h with a h ih\n[GOAL]\ncase refl\nk : Type u\ninst✝ : Field k\nm n : ℕ\nx y : Step k m\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n              map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Step k m),\n                OneHom.toFun\n                    { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                      map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n                      y) })\n      (x + y) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Step k m),\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n                        y) })\n        x +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Step k m),\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m),\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m m (_ : Nat.le m m) 1 = 1) }\n                        y) })\n        y\n[PROOFSTEP]\ndsimp [toStepOfLE']\n[GOAL]\ncase refl\nk : Type u\ninst✝ : Field k\nm n : ℕ\nx y : Step k m\n⊢ Nat.leRecOn (_ : Nat.le m m) (fun a => ↑(toStepSucc k a)) (x + y) =\n    Nat.leRecOn (_ : Nat.le m m) (fun a => ↑(toStepSucc k a)) x +\n      Nat.leRecOn (_ : Nat.le m m) (fun a => ↑(toStepSucc k a)) y\n[PROOFSTEP]\nsimp_rw [Nat.leRecOn_self]\n[GOAL]\ncase step\nk : Type u\ninst✝ : Field k\nm n : ℕ\nx y : Step k m\na : ℕ\nh : Nat.le m a\nih :\n  OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n              map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Step k m),\n                OneHom.toFun\n                    { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                      map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                      y) })\n      (x + y) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Step k m),\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                        y) })\n        x +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Step k m),\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                        y) })\n        y\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n              map_one' := (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Step k m),\n                OneHom.toFun\n                    { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                      map_one' :=\n                        (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                        map_one' :=\n                          (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                        map_one' :=\n                          (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n                      y) })\n      (x + y) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                map_one' := (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Step k m),\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                        map_one' :=\n                          (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                          map_one' :=\n                            (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                          map_one' :=\n                            (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n                        y) })\n        x +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                map_one' := (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Step k m),\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                        map_one' :=\n                          (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                          map_one' :=\n                            (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)),\n                          map_one' :=\n                            (_ : AlgebraicClosure.toStepOfLE' k m (Nat.succ a) (_ : Nat.le m (Nat.succ a)) 1 = 1) }\n                        y) })\n        y\n[PROOFSTEP]\nsimp_rw [toStepOfLE'.succ k m a h]\n[GOAL]\ncase step\nk : Type u\ninst✝ : Field k\nm n : ℕ\nx y : Step k m\na : ℕ\nh : Nat.le m a\nih :\n  OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n              map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : Step k m),\n                OneHom.toFun\n                    { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                      map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                      y) })\n      (x + y) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Step k m),\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                        y) })\n        x +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Step k m),\n                  OneHom.toFun\n                      { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                        map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := AlgebraicClosure.toStepOfLE' k m a h,\n                          map_one' := (_ : AlgebraicClosure.toStepOfLE' k m a h 1 = 1) }\n                        y) })\n        y\n⊢ (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) (x + y) =\n    (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) x +\n      (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) y\n[PROOFSTEP]\nsimp only at ih \n[GOAL]\ncase step\nk : Type u\ninst✝ : Field k\nm n : ℕ\nx y : Step k m\na : ℕ\nh : Nat.le m a\nih :\n  AlgebraicClosure.toStepOfLE' k m a h (x + y) =\n    AlgebraicClosure.toStepOfLE' k m a h x + AlgebraicClosure.toStepOfLE' k m a h y\n⊢ (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) (x + y) =\n    (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) x +\n      (↑(toStepSucc k a) ∘ AlgebraicClosure.toStepOfLE' k m a h) y\n[PROOFSTEP]\nsimp [ih]\n[GOAL]\nk : Type u\ninst✝ : Field k\nn : ℕ\nh : 0 ≤ n\n⊢ toStepOfLE k 0 (n + 1) (_ : 0 ≤ n + 1) = RingHom.comp (toStepSucc k n) (toStepOfLE k 0 n h)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase a\nk : Type u\ninst✝ : Field k\nn : ℕ\nh : 0 ≤ n\nx : Step k 0\n⊢ ↑(toStepOfLE k 0 (n + 1) (_ : 0 ≤ n + 1)) x = ↑(RingHom.comp (toStepSucc k n) (toStepOfLE k 0 n h)) x\n[PROOFSTEP]\nrw [RingHom.comp_apply]\n[GOAL]\ncase a\nk : Type u\ninst✝ : Field k\nn : ℕ\nh : 0 ≤ n\nx : Step k 0\n⊢ ↑(toStepOfLE k 0 (n + 1) (_ : 0 ≤ n + 1)) x = ↑(toStepSucc k n) (↑(toStepOfLE k 0 n h) x)\n[PROOFSTEP]\nsimp only [toStepOfLE, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk]\n[GOAL]\ncase a\nk : Type u\ninst✝ : Field k\nn : ℕ\nh : 0 ≤ n\nx : Step k 0\n⊢ AlgebraicClosure.toStepOfLE' k 0 (n + 1) (_ : 0 ≤ n + 1) x =\n    ↑(toStepSucc k n) (AlgebraicClosure.toStepOfLE' k 0 n h x)\n[PROOFSTEP]\nchange _ = (_ ∘ _) x\n[GOAL]\ncase a\nk : Type u\ninst✝ : Field k\nn : ℕ\nh : 0 ≤ n\nx : Step k 0\n⊢ AlgebraicClosure.toStepOfLE' k 0 (n + 1) (_ : 0 ≤ n + 1) x =\n    (↑(toStepSucc k n) ∘ AlgebraicClosure.toStepOfLE' k 0 n h) x\n[PROOFSTEP]\nrw [toStepOfLE'.succ k 0 n h]\n[GOAL]\nk : Type u\ninst✝ : Field k\nn : ℕ\n⊢ ∀ (z : Step k n), IsIntegral k z\n[PROOFSTEP]\ninduction' n with a h\n[GOAL]\ncase zero\nk : Type u\ninst✝ : Field k\n⊢ ∀ (z : Step k Nat.zero), IsIntegral k z\n[PROOFSTEP]\nintro z\n[GOAL]\ncase zero\nk : Type u\ninst✝ : Field k\nz : Step k Nat.zero\n⊢ IsIntegral k z\n[PROOFSTEP]\nexact isIntegral_algebraMap\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\n⊢ ∀ (z : Step k (Nat.succ a)), IsIntegral k z\n[PROOFSTEP]\nintro z\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\nz : Step k (Nat.succ a)\n⊢ IsIntegral k z\n[PROOFSTEP]\nchange RingHom.IsIntegralElem _ _\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\nz : Step k (Nat.succ a)\n⊢ RingHom.IsIntegralElem (algebraMap k (Step k (Nat.succ a))) z\n[PROOFSTEP]\nrevert z\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\n⊢ ∀ (z : Step k (Nat.succ a)), RingHom.IsIntegralElem (algebraMap k (Step k (Nat.succ a))) z\n[PROOFSTEP]\nchange RingHom.IsIntegral _\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\n⊢ RingHom.IsIntegral (algebraMap k (Step k (Nat.succ a)))\n[PROOFSTEP]\nunfold algebraMap\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\n⊢ RingHom.IsIntegral Algebra.toRingHom\n[PROOFSTEP]\nunfold Algebra.toRingHom\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\n⊢ RingHom.IsIntegral (algebra k (Nat.succ a)).2\n[PROOFSTEP]\nunfold algebra\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\n⊢ RingHom.IsIntegral (RingHom.toAlgebra (toStepOfLE k 0 (Nat.succ a) (_ : 0 ≤ Nat.succ a))).2\n[PROOFSTEP]\nunfold RingHom.toAlgebra\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\n⊢ RingHom.IsIntegral\n    (RingHom.toAlgebra' (toStepOfLE k 0 (Nat.succ a) (_ : 0 ≤ Nat.succ a))\n        (_ :\n          ∀ (x : Step k 0) (b : (fun x => Step k (Nat.succ a)) x),\n            ↑(toStepOfLE k 0 (Nat.succ a) (_ : 0 ≤ Nat.succ a)) x * b =\n              b * ↑(toStepOfLE k 0 (Nat.succ a) (_ : 0 ≤ Nat.succ a)) x)).2\n[PROOFSTEP]\nunfold RingHom.toAlgebra'\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\n⊢ RingHom.IsIntegral\n    (Algebra.mk (toStepOfLE k 0 (Nat.succ a) (_ : 0 ≤ Nat.succ a))\n        (_ :\n          ∀ (x : Step k 0) (b : (fun x => Step k (Nat.succ a)) x),\n            ↑(toStepOfLE k 0 (Nat.succ a) (_ : 0 ≤ Nat.succ a)) x * b =\n              b * ↑(toStepOfLE k 0 (Nat.succ a) (_ : 0 ≤ Nat.succ a)) x)\n        (_ : ∀ (x : Step k 0) (x_1 : Step k (Nat.succ a)), x • x_1 = x • x_1)).2\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\n⊢ RingHom.IsIntegral (toStepOfLE k 0 (Nat.succ a) (_ : 0 ≤ Nat.succ a))\n[PROOFSTEP]\nrw [toStepOfLE.succ k a a.zero_le]\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\n⊢ RingHom.IsIntegral (RingHom.comp (toStepSucc k a) (toStepOfLE k 0 a (_ : 0 ≤ a)))\n[PROOFSTEP]\napply\n  @RingHom.isIntegral_trans (Step k 0) (Step k a) (Step k (a + 1)) _ _ _ (toStepOfLE k 0 a (a.zero_le : 0 ≤ a))\n    (toStepSucc k a) _\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\n⊢ RingHom.IsIntegral (toStepSucc k a)\n[PROOFSTEP]\nintro z\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\nz : Step k (a + 1)\n⊢ RingHom.IsIntegralElem (toStepSucc k a) z\n[PROOFSTEP]\nhave := AdjoinMonic.isIntegral (Step k a) (z : Step k (a + 1))\n[GOAL]\ncase succ\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\nz : Step k (a + 1)\nthis : IsIntegral (Step k a) z\n⊢ RingHom.IsIntegralElem (toStepSucc k a) z\n[PROOFSTEP]\nconvert this\n[GOAL]\nk : Type u\ninst✝ : Field k\na : ℕ\nh : ∀ (z : Step k a), IsIntegral k z\n⊢ RingHom.IsIntegral (toStepOfLE k 0 a (_ : 0 ≤ a))\n[PROOFSTEP]\nconvert h\n[GOAL]\nk : Type u\ninst✝ : Field k\nn : ℕ\n⊢ RingHom.comp (ofStep k (n + 1)) (toStepSucc k n) = ofStep k n\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nk : Type u\ninst✝ : Field k\nn : ℕ\nx : Step k n\n⊢ ↑(RingHom.comp (ofStep k (n + 1)) (toStepSucc k n)) x = ↑(ofStep k n) x\n[PROOFSTEP]\nhave hx : toStepOfLE' k n (n + 1) n.le_succ x = toStepSucc k n x := Nat.leRecOn_succ' x\n[GOAL]\ncase a\nk : Type u\ninst✝ : Field k\nn : ℕ\nx : Step k n\nhx : AlgebraicClosure.toStepOfLE' k n (n + 1) (_ : n ≤ Nat.succ n) x = ↑(toStepSucc k n) x\n⊢ ↑(RingHom.comp (ofStep k (n + 1)) (toStepSucc k n)) x = ↑(ofStep k n) x\n[PROOFSTEP]\nunfold ofStep\n[GOAL]\ncase a\nk : Type u\ninst✝ : Field k\nn : ℕ\nx : Step k n\nhx : AlgebraicClosure.toStepOfLE' k n (n + 1) (_ : n ≤ Nat.succ n) x = ↑(toStepSucc k n) x\n⊢ ↑(RingHom.comp (Ring.DirectLimit.of (Step k) (fun i j h => ↑(toStepOfLE k i j h)) (n + 1)) (toStepSucc k n)) x =\n    ↑(Ring.DirectLimit.of (Step k) (fun i j h => ↑(toStepOfLE k i j h)) n) x\n[PROOFSTEP]\nrw [RingHom.comp_apply]\n[GOAL]\ncase a\nk : Type u\ninst✝ : Field k\nn : ℕ\nx : Step k n\nhx : AlgebraicClosure.toStepOfLE' k n (n + 1) (_ : n ≤ Nat.succ n) x = ↑(toStepSucc k n) x\n⊢ ↑(Ring.DirectLimit.of (Step k) (fun i j h => ↑(toStepOfLE k i j h)) (n + 1)) (↑(toStepSucc k n) x) =\n    ↑(Ring.DirectLimit.of (Step k) (fun i j h => ↑(toStepOfLE k i j h)) n) x\n[PROOFSTEP]\ndsimp [toStepOfLE]\n[GOAL]\ncase a\nk : Type u\ninst✝ : Field k\nn : ℕ\nx : Step k n\nhx : AlgebraicClosure.toStepOfLE' k n (n + 1) (_ : n ≤ Nat.succ n) x = ↑(toStepSucc k n) x\n⊢ ↑(Ring.DirectLimit.of (Step k) (fun i j h => AlgebraicClosure.toStepOfLE' k i j h) (n + 1)) (↑(toStepSucc k n) x) =\n    ↑(Ring.DirectLimit.of (Step k) (fun i j h => AlgebraicClosure.toStepOfLE' k i j h) n) x\n[PROOFSTEP]\nrw [← hx]\n[GOAL]\ncase a\nk : Type u\ninst✝ : Field k\nn : ℕ\nx : Step k n\nhx : AlgebraicClosure.toStepOfLE' k n (n + 1) (_ : n ≤ Nat.succ n) x = ↑(toStepSucc k n) x\n⊢ ↑(Ring.DirectLimit.of (Step k) (fun i j h => AlgebraicClosure.toStepOfLE' k i j h) (n + 1))\n      (AlgebraicClosure.toStepOfLE' k n (n + 1) (_ : n ≤ Nat.succ n) x) =\n    ↑(Ring.DirectLimit.of (Step k) (fun i j h => AlgebraicClosure.toStepOfLE' k i j h) n) x\n[PROOFSTEP]\nchange Ring.DirectLimit.of (Step k) (toStepOfLE' k) (n + 1) (_) = Ring.DirectLimit.of (Step k) (toStepOfLE' k) n x\n[GOAL]\ncase a\nk : Type u\ninst✝ : Field k\nn : ℕ\nx : Step k n\nhx : AlgebraicClosure.toStepOfLE' k n (n + 1) (_ : n ≤ Nat.succ n) x = ↑(toStepSucc k n) x\n⊢ ↑(Ring.DirectLimit.of (Step k) (AlgebraicClosure.toStepOfLE' k) (n + 1))\n      (AlgebraicClosure.toStepOfLE' k n (n + 1) (_ : n ≤ Nat.succ n) x) =\n    ↑(Ring.DirectLimit.of (Step k) (AlgebraicClosure.toStepOfLE' k) n) x\n[PROOFSTEP]\nconvert Ring.DirectLimit.of_f n.le_succ x\n[GOAL]\nk : Type u\ninst✝ : Field k\nf : (AlgebraicClosure k)[X]\nhfm : Monic f\nhfi : Irreducible f\n⊢ ∃ x, eval x f = 0\n[PROOFSTEP]\nhave : ∃ n p, Polynomial.map (ofStep k n) p = f := by convert Ring.DirectLimit.Polynomial.exists_of f\n[GOAL]\nk : Type u\ninst✝ : Field k\nf : (AlgebraicClosure k)[X]\nhfm : Monic f\nhfi : Irreducible f\n⊢ ∃ n p, map (ofStep k n) p = f\n[PROOFSTEP]\nconvert Ring.DirectLimit.Polynomial.exists_of f\n[GOAL]\nk : Type u\ninst✝ : Field k\nf : (AlgebraicClosure k)[X]\nhfm : Monic f\nhfi : Irreducible f\nthis : ∃ n p, map (ofStep k n) p = f\n⊢ ∃ x, eval x f = 0\n[PROOFSTEP]\nobtain ⟨n, p, rfl⟩ := this\n[GOAL]\ncase intro.intro\nk : Type u\ninst✝ : Field k\nn : ℕ\np : (Step k n)[X]\nhfm : Monic (map (ofStep k n) p)\nhfi : Irreducible (map (ofStep k n) p)\n⊢ ∃ x, eval x (map (ofStep k n) p) = 0\n[PROOFSTEP]\nrw [monic_map_iff] at hfm \n[GOAL]\ncase intro.intro\nk : Type u\ninst✝ : Field k\nn : ℕ\np : (Step k n)[X]\nhfm : Monic p\nhfi : Irreducible (map (ofStep k n) p)\n⊢ ∃ x, eval x (map (ofStep k n) p) = 0\n[PROOFSTEP]\nhave := hfm.irreducible_of_irreducible_map (ofStep k n) p hfi\n[GOAL]\ncase intro.intro\nk : Type u\ninst✝ : Field k\nn : ℕ\np : (Step k n)[X]\nhfm : Monic p\nhfi : Irreducible (map (ofStep k n) p)\nthis : Irreducible p\n⊢ ∃ x, eval x (map (ofStep k n) p) = 0\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := toStepSucc.exists_root k hfm this\n[GOAL]\ncase intro.intro.intro\nk : Type u\ninst✝ : Field k\nn : ℕ\np : (Step k n)[X]\nhfm : Monic p\nhfi : Irreducible (map (ofStep k n) p)\nthis : Irreducible p\nx : Step k (n + 1)\nhx : eval₂ (toStepSucc k n) x p = 0\n⊢ ∃ x, eval x (map (ofStep k n) p) = 0\n[PROOFSTEP]\nrefine' ⟨ofStep k (n + 1) x, _⟩\n[GOAL]\ncase intro.intro.intro\nk : Type u\ninst✝ : Field k\nn : ℕ\np : (Step k n)[X]\nhfm : Monic p\nhfi : Irreducible (map (ofStep k n) p)\nthis : Irreducible p\nx : Step k (n + 1)\nhx : eval₂ (toStepSucc k n) x p = 0\n⊢ eval (↑(ofStep k (n + 1)) x) (map (ofStep k n) p) = 0\n[PROOFSTEP]\nrw [← ofStep_succ k n, eval_map, ← hom_eval₂, hx, RingHom.map_zero]\n[GOAL]\nk : Type u\ninst✝⁶ : Field k\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Algebra R S\ninst✝² : Algebra S k\ninst✝¹ : Algebra R k\ninst✝ : IsScalarTower R S k\n⊢ IsScalarTower R S (AlgebraicClosure k)\n[PROOFSTEP]\napply IsScalarTower.of_algebraMap_eq _\n[GOAL]\nk : Type u\ninst✝⁶ : Field k\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Algebra R S\ninst✝² : Algebra S k\ninst✝¹ : Algebra R k\ninst✝ : IsScalarTower R S k\n⊢ ∀ (x : R), ↑(algebraMap R (AlgebraicClosure k)) x = ↑(algebraMap S (AlgebraicClosure k)) (↑(algebraMap R S) x)\n[PROOFSTEP]\nintro x\n[GOAL]\nk : Type u\ninst✝⁶ : Field k\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Algebra R S\ninst✝² : Algebra S k\ninst✝¹ : Algebra R k\ninst✝ : IsScalarTower R S k\nx : R\n⊢ ↑(algebraMap R (AlgebraicClosure k)) x = ↑(algebraMap S (AlgebraicClosure k)) (↑(algebraMap R S) x)\n[PROOFSTEP]\nsimp only [algebraMap_def]\n[GOAL]\nk : Type u\ninst✝⁶ : Field k\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Algebra R S\ninst✝² : Algebra S k\ninst✝¹ : Algebra R k\ninst✝ : IsScalarTower R S k\nx : R\n⊢ ↑(RingHom.comp (ofStep k 0) (algebraMap R (Step k 0))) x =\n    ↑(RingHom.comp (ofStep k 0) (algebraMap S (Step k 0))) (↑(algebraMap R S) x)\n[PROOFSTEP]\nrw [RingHom.comp_apply, RingHom.comp_apply]\n[GOAL]\nk : Type u\ninst✝⁶ : Field k\nR : Type u_1\nS : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CommSemiring S\ninst✝³ : Algebra R S\ninst✝² : Algebra S k\ninst✝¹ : Algebra R k\ninst✝ : IsScalarTower R S k\nx : R\n⊢ ↑(ofStep k 0) (↑(algebraMap R (Step k 0)) x) = ↑(ofStep k 0) (↑(algebraMap S (Step k 0)) (↑(algebraMap R S) x))\n[PROOFSTEP]\nexact\n  RingHom.congr_arg _\n    (IsScalarTower.algebraMap_apply R S k x : _)\n      -- Porting Note: Original proof (without `by`) didn't work anymore, I think it couldn't figure\n        -- out `algebraMap_def`. Orignally:\n        -- IsScalarTower.of_algebraMap_eq fun x =>\n        --   RingHom.congr_arg _ (IsScalarTower.algebraMap_apply R S k x : _)\n[GOAL]\nk : Type u\ninst✝ : Field k\nn : ℕ\nsrc✝ : Step k n →+* AlgebraicClosure k := ofStep k n\n⊢ ∀ (r : k),\n    OneHom.toFun\n        (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n              map_add' :=\n                (_ :\n                  ∀ (x y : Step k n),\n                    OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n        (↑(algebraMap k (Step k n)) r) =\n      ↑(algebraMap k (AlgebraicClosure k)) r\n[PROOFSTEP]\nintro x\n[GOAL]\nk : Type u\ninst✝ : Field k\nn : ℕ\nsrc✝ : Step k n →+* AlgebraicClosure k := ofStep k n\nx : k\n⊢ OneHom.toFun\n      (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : Step k n),\n                  OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n      (↑(algebraMap k (Step k n)) x) =\n    ↑(algebraMap k (AlgebraicClosure k)) x\n[PROOFSTEP]\nsimp only [RingHom.toMonoidHom_eq_coe, OneHom.toFun_eq_coe, MonoidHom.toOneHom_coe, MonoidHom.coe_coe]\n[GOAL]\nk : Type u\ninst✝ : Field k\nn : ℕ\nsrc✝ : Step k n →+* AlgebraicClosure k := ofStep k n\nx : k\n⊢ ↑(ofStep k n) (↑(algebraMap k (Step k n)) x) = ↑(algebraMap k (AlgebraicClosure k)) x\n[PROOFSTEP]\nconvert @Ring.DirectLimit.of_f ℕ _ (Step k) _ (fun m n h => (toStepOfLE k m n h : _ → _)) 0 n n.zero_le x\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "llama_tokens": 22286, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7461389930307512, "lm_q2_score": 0.5156199157230157, "lm_q1q2_score": 0.3847241247041717}}
{"text": "[GOAL]\np✝ n✝ k p n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\n⊢ n / p < n\n[PROOFSTEP]\napply Nat.div_lt_self\n[GOAL]\ncase hLtN\np✝ n✝ k p n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\n⊢ 0 < n\n[PROOFSTEP]\naesop\n[GOAL]\ncase hLtK\np✝ n✝ k p n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\n⊢ 1 < p\n[PROOFSTEP]\naesop\n[GOAL]\nk p n : ℕ\n⊢ go k p n = if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1) p (n / p) else k\n[PROOFSTEP]\ndsimp [go, go._unary]\n[GOAL]\nk p n : ℕ\n⊢ WellFounded.fix go._unary.proof_1\n      (fun _x a =>\n        if h : 1 < _x.snd.fst ∧ 0 < _x.snd.snd ∧ _x.snd.snd % _x.snd.fst = 0 then\n          a { fst := _x.fst + 1, snd := { fst := _x.snd.fst, snd := _x.snd.snd / _x.snd.fst } }\n            (_ : _x.snd.snd / _x.snd.fst < _x.snd.snd)\n        else _x.fst)\n      { fst := k, snd := { fst := p, snd := n } } =\n    if 1 < p ∧ 0 < n ∧ n % p = 0 then\n      WellFounded.fix go._unary.proof_1\n        (fun _x a =>\n          if h : 1 < _x.snd.fst ∧ 0 < _x.snd.snd ∧ _x.snd.snd % _x.snd.fst = 0 then\n            a { fst := _x.fst + 1, snd := { fst := _x.snd.fst, snd := _x.snd.snd / _x.snd.fst } }\n              (_ : _x.snd.snd / _x.snd.fst < _x.snd.snd)\n          else _x.fst)\n        { fst := k + 1, snd := { fst := p, snd := n / p } }\n    else k\n[PROOFSTEP]\nrw [WellFounded.fix_eq]\n[GOAL]\nk p n : ℕ\n⊢ (if h :\n        1 < { fst := k, snd := { fst := p, snd := n } }.snd.fst ∧\n          0 < { fst := k, snd := { fst := p, snd := n } }.snd.snd ∧\n            { fst := k, snd := { fst := p, snd := n } }.snd.snd % { fst := k, snd := { fst := p, snd := n } }.snd.fst =\n              0 then\n      (fun y x =>\n          WellFounded.fix go._unary.proof_1\n            (fun _x a =>\n              if h : 1 < _x.snd.fst ∧ 0 < _x.snd.snd ∧ _x.snd.snd % _x.snd.fst = 0 then\n                a { fst := _x.fst + 1, snd := { fst := _x.snd.fst, snd := _x.snd.snd / _x.snd.fst } }\n                  (_ : _x.snd.snd / _x.snd.fst < _x.snd.snd)\n              else _x.fst)\n            y)\n        { fst := { fst := k, snd := { fst := p, snd := n } }.fst + 1,\n          snd :=\n            { fst := { fst := k, snd := { fst := p, snd := n } }.snd.fst,\n              snd :=\n                { fst := k, snd := { fst := p, snd := n } }.snd.snd /\n                  { fst := k, snd := { fst := p, snd := n } }.snd.fst } }\n        (_ :\n          { fst := k, snd := { fst := p, snd := n } }.snd.snd / { fst := k, snd := { fst := p, snd := n } }.snd.fst <\n            { fst := k, snd := { fst := p, snd := n } }.snd.snd)\n    else { fst := k, snd := { fst := p, snd := n } }.fst) =\n    if 1 < p ∧ 0 < n ∧ n % p = 0 then\n      WellFounded.fix go._unary.proof_1\n        (fun _x a =>\n          if h : 1 < _x.snd.fst ∧ 0 < _x.snd.snd ∧ _x.snd.snd % _x.snd.fst = 0 then\n            a { fst := _x.fst + 1, snd := { fst := _x.snd.fst, snd := _x.snd.snd / _x.snd.fst } }\n              (_ : _x.snd.snd / _x.snd.fst < _x.snd.snd)\n          else _x.fst)\n        { fst := k + 1, snd := { fst := p, snd := n / p } }\n    else k\n[PROOFSTEP]\nsimp\n[GOAL]\nk p n : ℕ\n⊢ go (k + 1) p n = go k p n + 1\n[PROOFSTEP]\nrw [go_eq]\n[GOAL]\nk p n : ℕ\n⊢ (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1 + 1) p (n / p) else k + 1) = go k p n + 1\n[PROOFSTEP]\nconv_rhs => rw [go_eq]\n[GOAL]\nk p n : ℕ\n| go k p n + 1\n[PROOFSTEP]\nrw [go_eq]\n[GOAL]\nk p n : ℕ\n| go k p n + 1\n[PROOFSTEP]\nrw [go_eq]\n[GOAL]\nk p n : ℕ\n| go k p n + 1\n[PROOFSTEP]\nrw [go_eq]\n[GOAL]\nk p n : ℕ\n⊢ (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1 + 1) p (n / p) else k + 1) =\n    (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1) p (n / p) else k) + 1\n[PROOFSTEP]\nby_cases (1 < p ∧ 0 < n ∧ n % p = 0)\n[GOAL]\nk p n : ℕ\n⊢ (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1 + 1) p (n / p) else k + 1) =\n    (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1) p (n / p) else k) + 1\n[PROOFSTEP]\nby_cases (1 < p ∧ 0 < n ∧ n % p = 0)\n[GOAL]\ncase pos\nk p n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\n⊢ (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1 + 1) p (n / p) else k + 1) =\n    (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1) p (n / p) else k) + 1\ncase neg\nk p n : ℕ\nh : ¬(1 < p ∧ 0 < n ∧ n % p = 0)\n⊢ (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1 + 1) p (n / p) else k + 1) =\n    (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1) p (n / p) else k) + 1\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nk p n : ℕ\nh : ¬(1 < p ∧ 0 < n ∧ n % p = 0)\n⊢ (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1 + 1) p (n / p) else k + 1) =\n    (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1) p (n / p) else k) + 1\n[PROOFSTEP]\nsimp only [if_neg h]\n[GOAL]\ncase pos\nk p n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\n⊢ (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1 + 1) p (n / p) else k + 1) =\n    (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1) p (n / p) else k) + 1\n[PROOFSTEP]\nhave : n / p < n := by apply Nat.div_lt_self <;> aesop\n[GOAL]\nk p n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\n⊢ n / p < n\n[PROOFSTEP]\napply Nat.div_lt_self\n[GOAL]\ncase hLtN\nk p n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\n⊢ 0 < n\n[PROOFSTEP]\naesop\n[GOAL]\ncase hLtK\nk p n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\n⊢ 1 < p\n[PROOFSTEP]\naesop\n[GOAL]\ncase pos\nk p n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\nthis : n / p < n\n⊢ (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1 + 1) p (n / p) else k + 1) =\n    (if 1 < p ∧ 0 < n ∧ n % p = 0 then go (k + 1) p (n / p) else k) + 1\n[PROOFSTEP]\nsimp only [if_pos h]\n[GOAL]\ncase pos\nk p n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\nthis : n / p < n\n⊢ go (k + 1 + 1) p (n / p) = go (k + 1) p (n / p) + 1\n[PROOFSTEP]\napply go_succ\n[GOAL]\nn : ℕ\n⊢ maxPowDiv 0 n = 0\n[PROOFSTEP]\ndsimp [maxPowDiv]\n[GOAL]\nn : ℕ\n⊢ go 0 0 n = 0\n[PROOFSTEP]\nrw [maxPowDiv.go_eq]\n[GOAL]\nn : ℕ\n⊢ (if 1 < 0 ∧ 0 < n ∧ n % 0 = 0 then go (0 + 1) 0 (n / 0) else 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\n⊢ maxPowDiv p 0 = 0\n[PROOFSTEP]\ndsimp [maxPowDiv]\n[GOAL]\np : ℕ\n⊢ go 0 p 0 = 0\n[PROOFSTEP]\nrw [maxPowDiv.go_eq]\n[GOAL]\np : ℕ\n⊢ (if 1 < p ∧ 0 < 0 ∧ 0 % p = 0 then go (0 + 1) p (0 / p) else 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\np n : ℕ\nhp : 1 < p\nhn : 0 < n\n⊢ maxPowDiv p (p * n) = maxPowDiv p n + 1\n[PROOFSTEP]\nhave : 0 < p := lt_trans (b := 1) (by simp) hp\n[GOAL]\np n : ℕ\nhp : 1 < p\nhn : 0 < n\n⊢ 0 < 1\n[PROOFSTEP]\nsimp\n[GOAL]\np n : ℕ\nhp : 1 < p\nhn : 0 < n\nthis : 0 < p\n⊢ maxPowDiv p (p * n) = maxPowDiv p n + 1\n[PROOFSTEP]\ndsimp [maxPowDiv]\n[GOAL]\np n : ℕ\nhp : 1 < p\nhn : 0 < n\nthis : 0 < p\n⊢ go 0 p (p * n) = go 0 p n + 1\n[PROOFSTEP]\nrw [maxPowDiv.go_eq, if_pos, mul_div_right _ this]\n[GOAL]\np n : ℕ\nhp : 1 < p\nhn : 0 < n\nthis : 0 < p\n⊢ go (0 + 1) p n = go 0 p n + 1\n[PROOFSTEP]\napply go_succ\n[GOAL]\ncase hc\np n : ℕ\nhp : 1 < p\nhn : 0 < n\nthis : 0 < p\n⊢ 1 < p ∧ 0 < p * n ∧ p * n % p = 0\n[PROOFSTEP]\nrefine ⟨hp, ?_, by simp⟩\n[GOAL]\np n : ℕ\nhp : 1 < p\nhn : 0 < n\nthis : 0 < p\n⊢ p * n % p = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hc\np n : ℕ\nhp : 1 < p\nhn : 0 < n\nthis : 0 < p\n⊢ 0 < p * n\n[PROOFSTEP]\napply Nat.mul_pos this hn\n[GOAL]\np n exp : ℕ\nhp : 1 < p\nhn : 0 < n\n⊢ maxPowDiv p (p ^ exp * n) = maxPowDiv p n + exp\n[PROOFSTEP]\nmatch exp with\n| 0 => simp\n| e + 1 =>\n  rw [pow_succ, mul_assoc, mul_comm, mul_assoc, base_mul_eq_succ hp, mul_comm, base_pow_mul hp hn]\n  · ac_rfl\n  · apply Nat.mul_pos hn <| pow_pos (pos_of_gt hp) e\n[GOAL]\np n exp : ℕ\nhp : 1 < p\nhn : 0 < n\n⊢ maxPowDiv p (p ^ 0 * n) = maxPowDiv p n + 0\n[PROOFSTEP]\nsimp\n[GOAL]\np n exp : ℕ\nhp : 1 < p\nhn : 0 < n\ne : ℕ\n⊢ maxPowDiv p (p ^ (e + 1) * n) = maxPowDiv p n + (e + 1)\n[PROOFSTEP]\nrw [pow_succ, mul_assoc, mul_comm, mul_assoc, base_mul_eq_succ hp, mul_comm, base_pow_mul hp hn]\n[GOAL]\np n exp : ℕ\nhp : 1 < p\nhn : 0 < n\ne : ℕ\n⊢ maxPowDiv p n + e + 1 = maxPowDiv p n + (e + 1)\n[PROOFSTEP]\nac_rfl\n[GOAL]\np n exp : ℕ\nhp : 1 < p\nhn : 0 < n\ne : ℕ\n⊢ 0 < n * p ^ e\n[PROOFSTEP]\napply Nat.mul_pos hn <| pow_pos (pos_of_gt hp) e\n[GOAL]\np n : ℕ\n⊢ p ^ maxPowDiv p n ∣ n\n[PROOFSTEP]\ndsimp [maxPowDiv]\n[GOAL]\np n : ℕ\n⊢ p ^ go 0 p n ∣ n\n[PROOFSTEP]\nrw [go_eq]\n[GOAL]\np n : ℕ\n⊢ (p ^ if 1 < p ∧ 0 < n ∧ n % p = 0 then go (0 + 1) p (n / p) else 0) ∣ n\n[PROOFSTEP]\nby_cases (1 < p ∧ 0 < n ∧ n % p = 0)\n[GOAL]\np n : ℕ\n⊢ (p ^ if 1 < p ∧ 0 < n ∧ n % p = 0 then go (0 + 1) p (n / p) else 0) ∣ n\n[PROOFSTEP]\nby_cases (1 < p ∧ 0 < n ∧ n % p = 0)\n[GOAL]\ncase pos\np n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\n⊢ (p ^ if 1 < p ∧ 0 < n ∧ n % p = 0 then go (0 + 1) p (n / p) else 0) ∣ n\n[PROOFSTEP]\nhave : n / p < n := by apply Nat.div_lt_self <;> aesop\n[GOAL]\np n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\n⊢ n / p < n\n[PROOFSTEP]\napply Nat.div_lt_self\n[GOAL]\ncase hLtN\np n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\n⊢ 0 < n\n[PROOFSTEP]\naesop\n[GOAL]\ncase hLtK\np n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\n⊢ 1 < p\n[PROOFSTEP]\naesop\n[GOAL]\ncase pos\np n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\nthis : n / p < n\n⊢ (p ^ if 1 < p ∧ 0 < n ∧ n % p = 0 then go (0 + 1) p (n / p) else 0) ∣ n\n[PROOFSTEP]\nrw [if_pos h]\n[GOAL]\ncase pos\np n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\nthis : n / p < n\n⊢ p ^ go (0 + 1) p (n / p) ∣ n\n[PROOFSTEP]\nhave ⟨c, hc⟩ := pow_dvd p (n / p)\n[GOAL]\ncase pos\np n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\nthis : n / p < n\nc : ℕ\nhc : n / p = p ^ maxPowDiv p (n / p) * c\n⊢ p ^ go (0 + 1) p (n / p) ∣ n\n[PROOFSTEP]\nrw [go_succ, pow_succ]\n[GOAL]\ncase pos\np n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\nthis : n / p < n\nc : ℕ\nhc : n / p = p ^ maxPowDiv p (n / p) * c\n⊢ p ^ go 0 p (n / p) * p ∣ n\n[PROOFSTEP]\nnth_rw 2 [← mod_add_div' n p]\n[GOAL]\ncase pos\np n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\nthis : n / p < n\nc : ℕ\nhc : n / p = p ^ maxPowDiv p (n / p) * c\n⊢ p ^ go 0 p (n / p) * p ∣ n % p + n / p * p\n[PROOFSTEP]\nrw [h.right.right, zero_add]\n[GOAL]\ncase pos\np n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\nthis : n / p < n\nc : ℕ\nhc : n / p = p ^ maxPowDiv p (n / p) * c\n⊢ p ^ go 0 p (n / p) * p ∣ n / p * p\n[PROOFSTEP]\nexact ⟨c, by nth_rw 1 [hc]; ac_rfl⟩\n[GOAL]\np n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\nthis : n / p < n\nc : ℕ\nhc : n / p = p ^ maxPowDiv p (n / p) * c\n⊢ n / p * p = p ^ go 0 p (n / p) * p * c\n[PROOFSTEP]\nnth_rw 1 [hc]\n[GOAL]\np n : ℕ\nh : 1 < p ∧ 0 < n ∧ n % p = 0\nthis : n / p < n\nc : ℕ\nhc : n / p = p ^ maxPowDiv p (n / p) * c\n⊢ p ^ maxPowDiv p (n / p) * c * p = p ^ go 0 p (n / p) * p * c\n[PROOFSTEP]\nac_rfl\n[GOAL]\ncase neg\np n : ℕ\nh : ¬(1 < p ∧ 0 < n ∧ n % p = 0)\n⊢ (p ^ if 1 < p ∧ 0 < n ∧ n % p = 0 then go (0 + 1) p (n / p) else 0) ∣ n\n[PROOFSTEP]\nrw [if_neg h]\n[GOAL]\ncase neg\np n : ℕ\nh : ¬(1 < p ∧ 0 < n ∧ n % p = 0)\n⊢ p ^ 0 ∣ n\n[PROOFSTEP]\nsimp\n[GOAL]\np n pow : ℕ\nhp : 1 < p\nhn : 0 < n\nh : p ^ pow ∣ n\n⊢ pow ≤ maxPowDiv p n\n[PROOFSTEP]\nhave ⟨c, hc⟩ := h\n[GOAL]\np n pow : ℕ\nhp : 1 < p\nhn : 0 < n\nh : p ^ pow ∣ n\nc : ℕ\nhc : n = p ^ pow * c\n⊢ pow ≤ maxPowDiv p n\n[PROOFSTEP]\nhave : 0 < c := by\n  apply Nat.pos_of_ne_zero\n  intro h'\n  rw [h', mul_zero] at hc \n  exact not_eq_zero_of_lt hn hc\n[GOAL]\np n pow : ℕ\nhp : 1 < p\nhn : 0 < n\nh : p ^ pow ∣ n\nc : ℕ\nhc : n = p ^ pow * c\n⊢ 0 < c\n[PROOFSTEP]\napply Nat.pos_of_ne_zero\n[GOAL]\ncase a\np n pow : ℕ\nhp : 1 < p\nhn : 0 < n\nh : p ^ pow ∣ n\nc : ℕ\nhc : n = p ^ pow * c\n⊢ c ≠ 0\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase a\np n pow : ℕ\nhp : 1 < p\nhn : 0 < n\nh : p ^ pow ∣ n\nc : ℕ\nhc : n = p ^ pow * c\nh' : c = 0\n⊢ False\n[PROOFSTEP]\nrw [h', mul_zero] at hc \n[GOAL]\ncase a\np n pow : ℕ\nhp : 1 < p\nhn : 0 < n\nh : p ^ pow ∣ n\nc : ℕ\nhc : n = 0\nh' : c = 0\n⊢ False\n[PROOFSTEP]\nexact not_eq_zero_of_lt hn hc\n[GOAL]\np n pow : ℕ\nhp : 1 < p\nhn : 0 < n\nh : p ^ pow ∣ n\nc : ℕ\nhc : n = p ^ pow * c\nthis : 0 < c\n⊢ pow ≤ maxPowDiv p n\n[PROOFSTEP]\nsimp [hc, base_pow_mul hp this]\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.MaxPowDiv", "llama_tokens": 6415, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7690802476562641, "lm_q2_score": 0.5, "lm_q1q2_score": 0.3845401238281321}}
{"text": "[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ : ℕ\nx✝ : ∃ p k, Prime p ∧ 0 < k ∧ p ^ k = n\np : R\nk : ℕ\nhp : Prime p\nhk : 0 < k\nhn : p ^ k = n\n⊢ p ^ (?m.60081 x✝ p k hp hk hn + 1) = n\n[PROOFSTEP]\nrwa [Nat.sub_add_cancel hk]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommMonoidWithZero R\nn p : R\nk : ℕ\ninst✝ : NoZeroDivisors R\n⊢ ¬IsPrimePow 0\n[PROOFSTEP]\nsimp only [isPrimePow_def, not_exists, not_and', and_imp]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommMonoidWithZero R\nn p : R\nk : ℕ\ninst✝ : NoZeroDivisors R\n⊢ ∀ (x : R) (x_1 : ℕ), 0 < x_1 → x ^ x_1 = 0 → ¬Prime x\n[PROOFSTEP]\nintro x n _hn hx\n[GOAL]\nR : Type u_1\ninst✝¹ : CommMonoidWithZero R\nn✝ p : R\nk : ℕ\ninst✝ : NoZeroDivisors R\nx : R\nn : ℕ\n_hn : 0 < n\nhx : x ^ n = 0\n⊢ ¬Prime x\n[PROOFSTEP]\nrw [pow_eq_zero hx]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommMonoidWithZero R\nn✝ p : R\nk : ℕ\ninst✝ : NoZeroDivisors R\nx : R\nn : ℕ\n_hn : 0 < n\nhx : x ^ n = 0\n⊢ ¬Prime 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk : ℕ\np : R\nhp : Prime p\n⊢ p ^ 1 = p\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ : ℕ\nn : R\nhn✝ : IsPrimePow n\nk : ℕ\nhk : k ≠ 0\np : R\nk' : ℕ\nhp : Prime p\nhk' : 0 < k'\nhn : p ^ k' = n\n⊢ p ^ (k * k') = n ^ k\n[PROOFSTEP]\nrw [pow_mul', hn]\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\n⊢ IsPrimePow n ↔ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nsimp only [isPrimePow_def, Nat.prime_iff]\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\n⊢ IsPrimePow n ↔ ∃ p, p ≤ n ∧ ∃ k, k ≤ n ∧ Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrw [isPrimePow_nat_iff]\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\n⊢ (∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n) ↔ ∃ p, p ≤ n ∧ ∃ k, k ≤ n ∧ Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrefine' Iff.symm ⟨fun ⟨p, _, k, _, hp, hk, hn⟩ => ⟨p, k, hp, hk, hn⟩, _⟩\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\n⊢ (∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n) → ∃ p, p ≤ n ∧ ∃ k, k ≤ n ∧ Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrintro ⟨p, k, hp, hk, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\n⊢ ∃ p_1, p_1 ≤ p ^ k ∧ ∃ k_1, k_1 ≤ p ^ k ∧ Nat.Prime p_1 ∧ 0 < k_1 ∧ p_1 ^ k_1 = p ^ k\n[PROOFSTEP]\nrefine' ⟨p, _, k, (Nat.lt_pow_self hp.one_lt _).le, hp, hk, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\n⊢ p ≤ p ^ k\n[PROOFSTEP]\nconv => {lhs; rw [← (pow_one p)]}\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\n| p ≤ p ^ k\n[PROOFSTEP]\n{lhs; rw [← (pow_one p)]}\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\n| p ≤ p ^ k\n[PROOFSTEP]\n{lhs; rw [← (pow_one p)]}\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\n| p ≤ p ^ k\n[PROOFSTEP]\nlhs\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\n| p\n[PROOFSTEP]\nrw [← (pow_one p)]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\n⊢ p ^ 1 ≤ p ^ k\n[PROOFSTEP]\nexact (Nat.pow_le_iff_le_right hp.two_le).mpr hk\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n m : ℕ\nhn : IsPrimePow n\nhm : m ∣ n\nhm₁ : m ≠ 1\n⊢ IsPrimePow m\n[PROOFSTEP]\nrw [isPrimePow_nat_iff] at hn ⊢\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n m : ℕ\nhn : ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\nhm : m ∣ n\nhm₁ : m ≠ 1\n⊢ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = m\n[PROOFSTEP]\nrcases hn with ⟨p, k, hp, _hk, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ m : ℕ\nhm₁ : m ≠ 1\np k : ℕ\nhp : Nat.Prime p\n_hk : 0 < k\nhm : m ∣ p ^ k\n⊢ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = m\n[PROOFSTEP]\nobtain ⟨i, hik, rfl⟩ := (Nat.dvd_prime_pow hp).1 hm\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\n_hk : 0 < k\ni : ℕ\nhik : i ≤ k\nhm₁ : p ^ i ≠ 1\nhm : p ^ i ∣ p ^ k\n⊢ ∃ p_1 k, Nat.Prime p_1 ∧ 0 < k ∧ p_1 ^ k = p ^ i\n[PROOFSTEP]\nrefine' ⟨p, i, hp, _, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\n_hk : 0 < k\ni : ℕ\nhik : i ≤ k\nhm₁ : p ^ i ≠ 1\nhm : p ^ i ∣ p ^ k\n⊢ 0 < i\n[PROOFSTEP]\napply Nat.pos_of_ne_zero\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.a\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\n_hk : 0 < k\ni : ℕ\nhik : i ≤ k\nhm₁ : p ^ i ≠ 1\nhm : p ^ i ∣ p ^ k\n⊢ i ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.a\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\n_hk : 0 < k\nhik : 0 ≤ k\nhm₁ : p ^ 0 ≠ 1\nhm : p ^ 0 ∣ p ^ k\n⊢ False\n[PROOFSTEP]\nsimp only [pow_zero, ne_eq] at hm₁ \n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p : R\nk a b : ℕ\nhab : coprime a b\n⊢ Disjoint (Finset.filter IsPrimePow (divisors a)) (Finset.filter IsPrimePow (divisors b))\n[PROOFSTEP]\nsimp only [Finset.disjoint_left, Finset.mem_filter, and_imp, Nat.mem_divisors, not_and]\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p : R\nk a b : ℕ\nhab : coprime a b\n⊢ ∀ ⦃a_1 : ℕ⦄, a_1 ∣ a → a ≠ 0 → IsPrimePow a_1 → a_1 ∣ b → b ≠ 0 → ¬IsPrimePow a_1\n[PROOFSTEP]\nrintro n han _ha hn hbn _hb -\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk a b : ℕ\nhab : coprime a b\nn : ℕ\nhan : n ∣ a\n_ha : a ≠ 0\nhn : IsPrimePow n\nhbn : n ∣ b\n_hb : b ≠ 0\n⊢ False\n[PROOFSTEP]\nexact hn.ne_one (Nat.eq_one_of_dvd_coprimes hab han hbn)\n", "meta": {"mathlib_filename": "Mathlib.Algebra.IsPrimePow", "llama_tokens": 3297, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7185943925708562, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.3845187302845596}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nN : ℕ\nx : α\n⊢ ↑(nearestPtInd e (N + 1)) x =\n    if ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(nearestPtInd e N) x\n[PROOFSTEP]\nsimp only [nearestPtInd, coe_piecewise, Set.piecewise]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nN : ℕ\nx : α\n⊢ (if x ∈ ⋂ (k : ℕ) (_ : k ≤ Nat.add N 0), {x | edist (e (Nat.add N 0 + 1)) x < edist (e k) x} then\n      ↑(const α (Nat.add N 0 + 1)) x\n    else ↑(nearestPtInd e (Nat.add N 0)) x) =\n    if ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(nearestPtInd e N) x\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_c\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nN : ℕ\nx : α\n⊢ (x ∈ ⋂ (k : ℕ) (_ : k ≤ Nat.add N 0), {x | edist (e (Nat.add N 0 + 1)) x < edist (e k) x}) =\n    ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nN : ℕ\nx : α\n⊢ ↑(nearestPtInd e N) x ≤ N\n[PROOFSTEP]\ninduction' N with N ihN\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\n⊢ ↑(nearestPtInd e Nat.zero) x ≤ Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nN : ℕ\nihN : ↑(nearestPtInd e N) x ≤ N\n⊢ ↑(nearestPtInd e (Nat.succ N)) x ≤ Nat.succ N\n[PROOFSTEP]\nsimp only [nearestPtInd_succ]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nN : ℕ\nihN : ↑(nearestPtInd e N) x ≤ N\n⊢ (if ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(nearestPtInd e N) x) ≤ Nat.succ N\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nN : ℕ\nihN : ↑(nearestPtInd e N) x ≤ N\nh✝ : ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x\n⊢ N + 1 ≤ Nat.succ N\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nN : ℕ\nihN : ↑(nearestPtInd e N) x ≤ N\nh✝ : ¬∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x\n⊢ ↑(nearestPtInd e N) x ≤ Nat.succ N\n[PROOFSTEP]\nexacts [le_rfl, ihN.trans N.le_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nk N : ℕ\nhk : k ≤ N\n⊢ edist (↑(nearestPt e N) x) x ≤ edist (e k) x\n[PROOFSTEP]\ninduction' N with N ihN generalizing k\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nk✝ N : ℕ\nhk✝ : k✝ ≤ N\nk : ℕ\nhk : k ≤ Nat.zero\n⊢ edist (↑(nearestPt e Nat.zero) x) x ≤ edist (e k) x\n[PROOFSTEP]\nsimp [nonpos_iff_eq_zero.1 hk, le_refl]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nk✝ N✝ : ℕ\nhk✝ : k✝ ≤ N✝\nN : ℕ\nihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x\nk : ℕ\nhk : k ≤ Nat.succ N\n⊢ edist (↑(nearestPt e (Nat.succ N)) x) x ≤ edist (e k) x\n[PROOFSTEP]\nsimp only [nearestPt, nearestPtInd_succ, map_apply]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nk✝ N✝ : ℕ\nhk✝ : k✝ ≤ N✝\nN : ℕ\nihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x\nk : ℕ\nhk : k ≤ Nat.succ N\n⊢ edist (e (if ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(nearestPtInd e N) x)) x ≤\n    edist (e k) x\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nk✝ N✝ : ℕ\nhk✝ : k✝ ≤ N✝\nN : ℕ\nihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x\nk : ℕ\nhk : k ≤ Nat.succ N\nh : ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x\n⊢ edist (e (N + 1)) x ≤ edist (e k) x\n[PROOFSTEP]\nrcases hk.eq_or_lt with (rfl | hk)\n[GOAL]\ncase pos.inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nk N✝ : ℕ\nhk✝ : k ≤ N✝\nN : ℕ\nihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x\nh : ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x\nhk : Nat.succ N ≤ Nat.succ N\n⊢ edist (e (N + 1)) x ≤ edist (e (Nat.succ N)) x\ncase pos.inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nk✝ N✝ : ℕ\nhk✝¹ : k✝ ≤ N✝\nN : ℕ\nihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x\nk : ℕ\nhk✝ : k ≤ Nat.succ N\nh : ∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x\nhk : k < Nat.succ N\n⊢ edist (e (N + 1)) x ≤ edist (e k) x\n[PROOFSTEP]\nexacts [le_rfl, (h k (Nat.lt_succ_iff.1 hk)).le]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nk✝ N✝ : ℕ\nhk✝ : k✝ ≤ N✝\nN : ℕ\nihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x\nk : ℕ\nhk : k ≤ Nat.succ N\nh : ¬∀ (k : ℕ), k ≤ N → edist (e (N + 1)) x < edist (e k) x\n⊢ edist (e (↑(nearestPtInd e N) x)) x ≤ edist (e k) x\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nk✝ N✝ : ℕ\nhk✝ : k✝ ≤ N✝\nN : ℕ\nihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x\nk : ℕ\nhk : k ≤ Nat.succ N\nh : ∃ k, k ≤ N ∧ edist (e k) x ≤ edist (e (N + 1)) x\n⊢ edist (e (↑(nearestPtInd e N) x)) x ≤ edist (e k) x\n[PROOFSTEP]\nrcases h with ⟨l, hlN, hxl⟩\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nk✝ N✝ : ℕ\nhk✝ : k✝ ≤ N✝\nN : ℕ\nihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x\nk : ℕ\nhk : k ≤ Nat.succ N\nl : ℕ\nhlN : l ≤ N\nhxl : edist (e l) x ≤ edist (e (N + 1)) x\n⊢ edist (e (↑(nearestPtInd e N) x)) x ≤ edist (e k) x\n[PROOFSTEP]\nrcases hk.eq_or_lt with (rfl | hk)\n[GOAL]\ncase neg.intro.intro.inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nk N✝ : ℕ\nhk✝ : k ≤ N✝\nN : ℕ\nihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x\nl : ℕ\nhlN : l ≤ N\nhxl : edist (e l) x ≤ edist (e (N + 1)) x\nhk : Nat.succ N ≤ Nat.succ N\n⊢ edist (e (↑(nearestPtInd e N) x)) x ≤ edist (e (Nat.succ N)) x\ncase neg.intro.intro.inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nk✝ N✝ : ℕ\nhk✝¹ : k✝ ≤ N✝\nN : ℕ\nihN : ∀ {k : ℕ}, k ≤ N → edist (↑(nearestPt e N) x) x ≤ edist (e k) x\nk : ℕ\nhk✝ : k ≤ Nat.succ N\nl : ℕ\nhlN : l ≤ N\nhxl : edist (e l) x ≤ edist (e (N + 1)) x\nhk : k < Nat.succ N\n⊢ edist (e (↑(nearestPtInd e N) x)) x ≤ edist (e k) x\n[PROOFSTEP]\nexacts [(ihN hlN).trans hxl, ihN (Nat.lt_succ_iff.1 hk)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nhx : x ∈ closure (Set.range e)\n⊢ Tendsto (fun N => ↑(nearestPt e N) x) atTop (𝓝 x)\n[PROOFSTEP]\nrefine' (atTop_basis.tendsto_iff nhds_basis_eball).2 fun ε hε => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nhx : x ∈ closure (Set.range e)\nε : ℝ≥0∞\nhε : 0 < ε\n⊢ ∃ ia, True ∧ ∀ (x_1 : ℕ), x_1 ∈ Set.Ici ia → ↑(nearestPt e x_1) x ∈ ball x ε\n[PROOFSTEP]\nrcases EMetric.mem_closure_iff.1 hx ε hε with ⟨_, ⟨N, rfl⟩, hN⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nhx : x ∈ closure (Set.range e)\nε : ℝ≥0∞\nhε : 0 < ε\nN : ℕ\nhN : edist x (e N) < ε\n⊢ ∃ ia, True ∧ ∀ (x_1 : ℕ), x_1 ∈ Set.Ici ia → ↑(nearestPt e x_1) x ∈ ball x ε\n[PROOFSTEP]\nrw [edist_comm] at hN \n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : OpensMeasurableSpace α\ne : ℕ → α\nx : α\nhx : x ∈ closure (Set.range e)\nε : ℝ≥0∞\nhε : 0 < ε\nN : ℕ\nhN : edist (e N) x < ε\n⊢ ∃ ia, True ∧ ∀ (x_1 : ℕ), x_1 ∈ Set.Ici ia → ↑(nearestPt e x_1) x ∈ ball x ε\n[PROOFSTEP]\nexact ⟨N, trivial, fun n hn => (edist_nearestPt_le e x hn).trans_lt hN⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nn : ℕ\nx : β\n⊢ ↑(approxOn f hf s y₀ h₀ n) x ∈ s\n[PROOFSTEP]\nhaveI : Nonempty s := ⟨⟨y₀, h₀⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nn : ℕ\nx : β\nthis : Nonempty ↑s\n⊢ ↑(approxOn f hf s y₀ h₀ n) x ∈ s\n[PROOFSTEP]\nsuffices ∀ n, (Nat.casesOn n y₀ ((↑) ∘ denseSeq s) : α) ∈ s by apply this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nn : ℕ\nx : β\nthis✝ : Nonempty ↑s\nthis : ∀ (n : ℕ), Nat.casesOn n y₀ (Subtype.val ∘ denseSeq ↑s) ∈ s\n⊢ ↑(approxOn f hf s y₀ h₀ n) x ∈ s\n[PROOFSTEP]\napply this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nn : ℕ\nx : β\nthis : Nonempty ↑s\n⊢ ∀ (n : ℕ), Nat.casesOn n y₀ (Subtype.val ∘ denseSeq ↑s) ∈ s\n[PROOFSTEP]\nrintro (_ | n)\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nn : ℕ\nx : β\nthis : Nonempty ↑s\n⊢ Nat.casesOn Nat.zero y₀ (Subtype.val ∘ denseSeq ↑s) ∈ s\ncase succ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nn✝ : ℕ\nx : β\nthis : Nonempty ↑s\nn : ℕ\n⊢ Nat.casesOn (Nat.succ n) y₀ (Subtype.val ∘ denseSeq ↑s) ∈ s\n[PROOFSTEP]\nexacts [h₀, Subtype.mem _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nhx : f x ∈ closure s\n⊢ Tendsto (fun n => ↑(approxOn f hf s y₀ h₀ n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nhaveI : Nonempty s := ⟨⟨y₀, h₀⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nhx : f x ∈ closure s\nthis : Nonempty ↑s\n⊢ Tendsto (fun n => ↑(approxOn f hf s y₀ h₀ n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nrw [← @Subtype.range_coe _ s, ← image_univ, ← (denseRange_denseSeq s).closure_eq] at hx \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nthis : Nonempty ↑s\nhx : f x ∈ closure (Subtype.val '' closure (Set.range (denseSeq ↑s)))\n⊢ Tendsto (fun n => ↑(approxOn f hf s y₀ h₀ n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nsimp (config := { iota := false }) only [approxOn, coe_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nthis : Nonempty ↑s\nhx : f x ∈ closure (Subtype.val '' closure (Set.range (denseSeq ↑s)))\n⊢ Tendsto (fun n => (↑(nearestPt (fun k => Nat.casesOn k y₀ (Subtype.val ∘ denseSeq ↑s)) n) ∘ f) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nrefine' tendsto_nearestPt (closure_minimal _ isClosed_closure hx)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nthis : Nonempty ↑s\nhx : f x ∈ closure (Subtype.val '' closure (Set.range (denseSeq ↑s)))\n⊢ Subtype.val '' closure (Set.range (denseSeq ↑s)) ⊆\n    closure (Set.range fun k => Nat.casesOn k y₀ (Subtype.val ∘ denseSeq ↑s))\n[PROOFSTEP]\nsimp (config := { iota := false }) only [Nat.range_casesOn, closure_union, range_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nthis : Nonempty ↑s\nhx : f x ∈ closure (Subtype.val '' closure (Set.range (denseSeq ↑s)))\n⊢ Subtype.val '' closure (Set.range (denseSeq ↑s)) ⊆ closure {y₀} ∪ closure (Subtype.val '' Set.range (denseSeq ↑s))\n[PROOFSTEP]\nexact Subset.trans (image_closure_subset_closure_image continuous_subtype_val) (subset_union_right _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nm n : ℕ\nh : m ≤ n\n⊢ edist (↑(approxOn f hf s y₀ h₀ n) x) (f x) ≤ edist (↑(approxOn f hf s y₀ h₀ m) x) (f x)\n[PROOFSTEP]\ndsimp only [approxOn, coe_comp, Function.comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PseudoEMetricSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : MeasurableSpace β\nf✝ f : β → α\nhf : Measurable f\ns : Set α\ny₀ : α\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nm n : ℕ\nh : m ≤ n\n⊢ edist (↑(nearestPt (fun k => Nat.rec y₀ (fun n n_ih => ↑(denseSeq (↑s) n)) k) n) (f x)) (f x) ≤\n    edist (↑(nearestPt (fun k => Nat.rec y₀ (fun n n_ih => ↑(denseSeq (↑s) n)) k) m) (f x)) (f x)\n[PROOFSTEP]\nexact edist_nearestPt_le _ _ ((nearestPtInd_le _ _ _).trans h)\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.SimpleFuncDense", "llama_tokens": 9126, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.679178699175393, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.3844277324436496}}
{"text": "[GOAL]\nM N : GroupWithZeroCat\nf g : M ⟶ N\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nM N : GroupWithZeroCat\ng : M ⟶ N\ntoZeroHom✝ : ZeroHom ↑M ↑N\nmap_one'✝ : ZeroHom.toFun toZeroHom✝ 1 = 1\nmap_mul'✝ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝ (x * y) = ZeroHom.toFun toZeroHom✝ x * ZeroHom.toFun toZeroHom✝ y\nh : (fun f => f.toFun) { toZeroHom := toZeroHom✝, map_one' := map_one'✝, map_mul' := map_mul'✝ } = (fun f => f.toFun) g\n⊢ { toZeroHom := toZeroHom✝, map_one' := map_one'✝, map_mul' := map_mul'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nM N : GroupWithZeroCat\ntoZeroHom✝¹ : ZeroHom ↑M ↑N\nmap_one'✝¹ : ZeroHom.toFun toZeroHom✝¹ 1 = 1\nmap_mul'✝¹ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝¹ (x * y) = ZeroHom.toFun toZeroHom✝¹ x * ZeroHom.toFun toZeroHom✝¹ y\ntoZeroHom✝ : ZeroHom ↑M ↑N\nmap_one'✝ : ZeroHom.toFun toZeroHom✝ 1 = 1\nmap_mul'✝ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝ (x * y) = ZeroHom.toFun toZeroHom✝ x * ZeroHom.toFun toZeroHom✝ y\nh :\n  (fun f => f.toFun) { toZeroHom := toZeroHom✝¹, map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =\n    (fun f => f.toFun) { toZeroHom := toZeroHom✝, map_one' := map_one'✝, map_mul' := map_mul'✝ }\n⊢ { toZeroHom := toZeroHom✝¹, map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =\n    { toZeroHom := toZeroHom✝, map_one' := map_one'✝, map_mul' := map_mul'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_toZeroHom\nM N : GroupWithZeroCat\ntoZeroHom✝¹ : ZeroHom ↑M ↑N\nmap_one'✝¹ : ZeroHom.toFun toZeroHom✝¹ 1 = 1\nmap_mul'✝¹ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝¹ (x * y) = ZeroHom.toFun toZeroHom✝¹ x * ZeroHom.toFun toZeroHom✝¹ y\ntoZeroHom✝ : ZeroHom ↑M ↑N\nmap_one'✝ : ZeroHom.toFun toZeroHom✝ 1 = 1\nmap_mul'✝ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝ (x * y) = ZeroHom.toFun toZeroHom✝ x * ZeroHom.toFun toZeroHom✝ y\nh :\n  (fun f => f.toFun) { toZeroHom := toZeroHom✝¹, map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =\n    (fun f => f.toFun) { toZeroHom := toZeroHom✝, map_one' := map_one'✝, map_mul' := map_mul'✝ }\n⊢ toZeroHom✝¹ = toZeroHom✝\n[PROOFSTEP]\napply FunLike.coe_injective'\n[GOAL]\ncase mk.mk.e_toZeroHom.a\nM N : GroupWithZeroCat\ntoZeroHom✝¹ : ZeroHom ↑M ↑N\nmap_one'✝¹ : ZeroHom.toFun toZeroHom✝¹ 1 = 1\nmap_mul'✝¹ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝¹ (x * y) = ZeroHom.toFun toZeroHom✝¹ x * ZeroHom.toFun toZeroHom✝¹ y\ntoZeroHom✝ : ZeroHom ↑M ↑N\nmap_one'✝ : ZeroHom.toFun toZeroHom✝ 1 = 1\nmap_mul'✝ : ∀ (x y : ↑M), ZeroHom.toFun toZeroHom✝ (x * y) = ZeroHom.toFun toZeroHom✝ x * ZeroHom.toFun toZeroHom✝ y\nh :\n  (fun f => f.toFun) { toZeroHom := toZeroHom✝¹, map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =\n    (fun f => f.toFun) { toZeroHom := toZeroHom✝, map_one' := map_one'✝, map_mul' := map_mul'✝ }\n⊢ ↑toZeroHom✝¹ = ↑toZeroHom✝\n[PROOFSTEP]\nexact h\n[GOAL]\nα β : GroupWithZeroCat\ne : ↑α ≃* ↑β\n⊢ ↑e ≫ ↑(MulEquiv.symm e) = 𝟙 α\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : GroupWithZeroCat\ne : ↑α ≃* ↑β\nx✝ : (forget GroupWithZeroCat).obj α\n⊢ ↑(↑e ≫ ↑(MulEquiv.symm e)) x✝ = ↑(𝟙 α) x✝\n[PROOFSTEP]\nexact e.symm_apply_apply _\n[GOAL]\nα β : GroupWithZeroCat\ne : ↑α ≃* ↑β\n⊢ ↑(MulEquiv.symm e) ≫ ↑e = 𝟙 β\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : GroupWithZeroCat\ne : ↑α ≃* ↑β\nx✝ : (forget GroupWithZeroCat).obj β\n⊢ ↑(↑(MulEquiv.symm e) ≫ ↑e) x✝ = ↑(𝟙 β) x✝\n[PROOFSTEP]\nexact e.apply_symm_apply _\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.GroupWithZeroCat", "llama_tokens": 1805, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.679178686187839, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.3844277250924533}}
{"text": "[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\nf : E →ₛₗᵢ[σ₁₂] E₂\nf₁ : F →ₛₗᵢ[σ₁₂] E₂\n⊢ Injective fun f => ↑f\n[PROOFSTEP]\nrintro ⟨_⟩ ⟨_⟩\n[GOAL]\ncase mk.mk\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\nf : E →ₛₗᵢ[σ₁₂] E₂\nf₁ : F →ₛₗᵢ[σ₁₂] E₂\ntoLinearMap✝¹ : E →ₛₗ[σ₁₂] E₂\nnorm_map'✝¹ : ∀ (x : E), ‖↑toLinearMap✝¹ x‖ = ‖x‖\ntoLinearMap✝ : E →ₛₗ[σ₁₂] E₂\nnorm_map'✝ : ∀ (x : E), ‖↑toLinearMap✝ x‖ = ‖x‖\n⊢ (fun f => ↑f) { toLinearMap := toLinearMap✝¹, norm_map' := norm_map'✝¹ } =\n      (fun f => ↑f) { toLinearMap := toLinearMap✝, norm_map' := norm_map'✝ } →\n    { toLinearMap := toLinearMap✝¹, norm_map' := norm_map'✝¹ } =\n      { toLinearMap := toLinearMap✝, norm_map' := norm_map'✝ }\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\nf : E →ₛₗ[σ₁₂] E₂\nhf : Isometry ↑f\n⊢ ∀ (x : E),\n    ‖↑{ toAddHom := f.toAddHom,\n              map_smul' :=\n                (_ : ∀ (r : R) (x : E), AddHom.toFun f.toAddHom (r • x) = ↑σ₁₂ r • AddHom.toFun f.toAddHom x) }\n          x‖ =\n      ‖x‖\n[PROOFSTEP]\nsimp_rw [← dist_zero_right]\n[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\nf : E →ₛₗ[σ₁₂] E₂\nhf : Isometry ↑f\n⊢ ∀ (x : E),\n    dist\n        (↑{ toAddHom := f.toAddHom,\n              map_smul' :=\n                (_ : ∀ (r : R) (x : E), AddHom.toFun f.toAddHom (r • x) = ↑σ₁₂ r • AddHom.toFun f.toAddHom x) }\n          x)\n        0 =\n      dist x 0\n[PROOFSTEP]\nsimpa using (hf.dist_eq · 0)\n[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\ne f g : E ≃ₛₗᵢ[σ₁₂] E₂\nh₁ : (fun e => e.toFun) f = (fun e => e.toFun) g\nh₂ : (fun e => e.invFun) f = (fun e => e.invFun) g\n⊢ f = g\n[PROOFSTEP]\ncases' f with f' _\n[GOAL]\ncase mk\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\ne g : E ≃ₛₗᵢ[σ₁₂] E₂\nf' : E ≃ₛₗ[σ₁₂] E₂\nnorm_map'✝ : ∀ (x : E), ‖↑f' x‖ = ‖x‖\nh₁ : (fun e => e.toFun) { toLinearEquiv := f', norm_map' := norm_map'✝ } = (fun e => e.toFun) g\nh₂ : (fun e => e.invFun) { toLinearEquiv := f', norm_map' := norm_map'✝ } = (fun e => e.invFun) g\n⊢ { toLinearEquiv := f', norm_map' := norm_map'✝ } = g\n[PROOFSTEP]\ncases' g with g' _\n[GOAL]\ncase mk.mk\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\ne : E ≃ₛₗᵢ[σ₁₂] E₂\nf' : E ≃ₛₗ[σ₁₂] E₂\nnorm_map'✝¹ : ∀ (x : E), ‖↑f' x‖ = ‖x‖\ng' : E ≃ₛₗ[σ₁₂] E₂\nnorm_map'✝ : ∀ (x : E), ‖↑g' x‖ = ‖x‖\nh₁ :\n  (fun e => e.toFun) { toLinearEquiv := f', norm_map' := norm_map'✝¹ } =\n    (fun e => e.toFun) { toLinearEquiv := g', norm_map' := norm_map'✝ }\nh₂ :\n  (fun e => e.invFun) { toLinearEquiv := f', norm_map' := norm_map'✝¹ } =\n    (fun e => e.invFun) { toLinearEquiv := g', norm_map' := norm_map'✝ }\n⊢ { toLinearEquiv := f', norm_map' := norm_map'✝¹ } = { toLinearEquiv := g', norm_map' := norm_map'✝ }\n[PROOFSTEP]\ncases f'\n[GOAL]\ncase mk.mk.mk\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\ne : E ≃ₛₗᵢ[σ₁₂] E₂\ng' : E ≃ₛₗ[σ₁₂] E₂\nnorm_map'✝¹ : ∀ (x : E), ‖↑g' x‖ = ‖x‖\ntoLinearMap✝ : E →ₛₗ[σ₁₂] E₂\ninvFun✝ : E₂ → E\nleft_inv✝ : LeftInverse invFun✝ toLinearMap✝.toFun\nright_inv✝ : Function.RightInverse invFun✝ toLinearMap✝.toFun\nnorm_map'✝ :\n  ∀ (x : E),\n    ‖↑{ toLinearMap := toLinearMap✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } x‖ = ‖x‖\nh₁ :\n  (fun e => e.toFun)\n      {\n        toLinearEquiv :=\n          { toLinearMap := toLinearMap✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        norm_map' := norm_map'✝ } =\n    (fun e => e.toFun) { toLinearEquiv := g', norm_map' := norm_map'✝¹ }\nh₂ :\n  (fun e => e.invFun)\n      {\n        toLinearEquiv :=\n          { toLinearMap := toLinearMap✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        norm_map' := norm_map'✝ } =\n    (fun e => e.invFun) { toLinearEquiv := g', norm_map' := norm_map'✝¹ }\n⊢ { toLinearEquiv := { toLinearMap := toLinearMap✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n      norm_map' := norm_map'✝ } =\n    { toLinearEquiv := g', norm_map' := norm_map'✝¹ }\n[PROOFSTEP]\ncases g'\n[GOAL]\ncase mk.mk.mk.mk\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\ne : E ≃ₛₗᵢ[σ₁₂] E₂\ntoLinearMap✝¹ : E →ₛₗ[σ₁₂] E₂\ninvFun✝¹ : E₂ → E\nleft_inv✝¹ : LeftInverse invFun✝¹ toLinearMap✝¹.toFun\nright_inv✝¹ : Function.RightInverse invFun✝¹ toLinearMap✝¹.toFun\nnorm_map'✝¹ :\n  ∀ (x : E),\n    ‖↑{ toLinearMap := toLinearMap✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } x‖ = ‖x‖\ntoLinearMap✝ : E →ₛₗ[σ₁₂] E₂\ninvFun✝ : E₂ → E\nleft_inv✝ : LeftInverse invFun✝ toLinearMap✝.toFun\nright_inv✝ : Function.RightInverse invFun✝ toLinearMap✝.toFun\nnorm_map'✝ :\n  ∀ (x : E),\n    ‖↑{ toLinearMap := toLinearMap✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } x‖ = ‖x‖\nh₁ :\n  (fun e => e.toFun)\n      {\n        toLinearEquiv :=\n          { toLinearMap := toLinearMap✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ },\n        norm_map' := norm_map'✝¹ } =\n    (fun e => e.toFun)\n      {\n        toLinearEquiv :=\n          { toLinearMap := toLinearMap✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        norm_map' := norm_map'✝ }\nh₂ :\n  (fun e => e.invFun)\n      {\n        toLinearEquiv :=\n          { toLinearMap := toLinearMap✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ },\n        norm_map' := norm_map'✝¹ } =\n    (fun e => e.invFun)\n      {\n        toLinearEquiv :=\n          { toLinearMap := toLinearMap✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        norm_map' := norm_map'✝ }\n⊢ {\n      toLinearEquiv :=\n        { toLinearMap := toLinearMap✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ },\n      norm_map' := norm_map'✝¹ } =\n    {\n      toLinearEquiv :=\n        { toLinearMap := toLinearMap✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n      norm_map' := norm_map'✝ }\n[PROOFSTEP]\nsimp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, FunLike.coe_fn_eq] at h₁ \n[GOAL]\ncase mk.mk.mk.mk\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\ne : E ≃ₛₗᵢ[σ₁₂] E₂\ntoLinearMap✝¹ : E →ₛₗ[σ₁₂] E₂\ninvFun✝¹ : E₂ → E\nleft_inv✝¹ : LeftInverse invFun✝¹ toLinearMap✝¹.toFun\nright_inv✝¹ : Function.RightInverse invFun✝¹ toLinearMap✝¹.toFun\nnorm_map'✝¹ :\n  ∀ (x : E),\n    ‖↑{ toLinearMap := toLinearMap✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } x‖ = ‖x‖\ntoLinearMap✝ : E →ₛₗ[σ₁₂] E₂\ninvFun✝ : E₂ → E\nleft_inv✝ : LeftInverse invFun✝ toLinearMap✝.toFun\nright_inv✝ : Function.RightInverse invFun✝ toLinearMap✝.toFun\nnorm_map'✝ :\n  ∀ (x : E),\n    ‖↑{ toLinearMap := toLinearMap✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } x‖ = ‖x‖\nh₂ :\n  (fun e => e.invFun)\n      {\n        toLinearEquiv :=\n          { toLinearMap := toLinearMap✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ },\n        norm_map' := norm_map'✝¹ } =\n    (fun e => e.invFun)\n      {\n        toLinearEquiv :=\n          { toLinearMap := toLinearMap✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        norm_map' := norm_map'✝ }\nh₁ : toLinearMap✝¹ = toLinearMap✝\n⊢ {\n      toLinearEquiv :=\n        { toLinearMap := toLinearMap✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ },\n      norm_map' := norm_map'✝¹ } =\n    {\n      toLinearEquiv :=\n        { toLinearMap := toLinearMap✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n      norm_map' := norm_map'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\ne✝ : E ≃ₛₗᵢ[σ₁₂] E₂\ne : E ≃ₛₗ[σ₁₂] E₂\nh₁ : ∀ (x : E), ‖↑e x‖ ≤ ‖x‖\nh₂ : ∀ (y : E₂), ‖↑(LinearEquiv.symm e) y‖ ≤ ‖y‖\nx : E\n⊢ ‖x‖ ≤ ‖↑e x‖\n[PROOFSTEP]\nsimpa only [e.symm_apply_apply] using h₂ (e x)\n[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\ne✝ e : E ≃ₛₗᵢ[σ₁₂] E₂\n⊢ range ↑e = univ\n[PROOFSTEP]\nrw [← coe_toIsometryEquiv]\n[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³³ : Semiring R\ninst✝³² : Semiring R₂\ninst✝³¹ : Semiring R₃\ninst✝³⁰ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝²⁹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁸ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁷ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁶ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁵ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁴ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²³ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²² : RingHomInvPair σ₄₁ σ₁₄\ninst✝²¹ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²⁰ : RingHomInvPair σ₄₂ σ₂₄\ninst✝¹⁹ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁸ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁶ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁵ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁴ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹³ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹² : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹⁰ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝⁹ : SeminormedAddCommGroup E\ninst✝⁸ : SeminormedAddCommGroup E₂\ninst✝⁷ : SeminormedAddCommGroup E₃\ninst✝⁶ : SeminormedAddCommGroup E₄\ninst✝⁵ : Module R E\ninst✝⁴ : Module R₂ E₂\ninst✝³ : Module R₃ E₃\ninst✝² : Module R₄ E₄\ninst✝¹ : NormedAddCommGroup F\ninst✝ : Module R F\ne✝ e : E ≃ₛₗᵢ[σ₁₂] E₂\n⊢ range ↑(toIsometryEquiv e) = univ\n[PROOFSTEP]\nexact IsometryEquiv.range_eq_univ _\n[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³⁴ : Semiring R\ninst✝³³ : Semiring R₂\ninst✝³² : Semiring R₃\ninst✝³¹ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝³⁰ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁸ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁷ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁶ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁵ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²⁴ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²³ : RingHomInvPair σ₄₁ σ₁₄\ninst✝²² : RingHomInvPair σ₂₄ σ₄₂\ninst✝²¹ : RingHomInvPair σ₄₂ σ₂₄\ninst✝²⁰ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁹ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁸ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁶ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁵ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹⁴ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹³ : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹² : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝¹⁰ : SeminormedAddCommGroup E\ninst✝⁹ : SeminormedAddCommGroup E₂\ninst✝⁸ : SeminormedAddCommGroup E₃\ninst✝⁷ : SeminormedAddCommGroup E₄\ninst✝⁶ : Module R E\ninst✝⁵ : Module R₂ E₂\ninst✝⁴ : Module R₃ E₃\ninst✝³ : Module R₄ E₄\ninst✝² : NormedAddCommGroup F\ninst✝¹ : Module R F\ne : E ≃ₛₗᵢ[σ₁₂] E₂\nα : Type u_11\ninst✝ : TopologicalSpace α\nf : F →ₛₗᵢ[σ₁₂] E₂\nhfr : Surjective ↑f\n⊢ ↑(ofSurjective f hfr) = ↑f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³⁴ : Semiring R\ninst✝³³ : Semiring R₂\ninst✝³² : Semiring R₃\ninst✝³¹ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝³⁰ : RingHomInvPair σ₁₂ σ₂₁\ninst✝²⁹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝²⁸ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁷ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁶ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁵ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²⁴ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²³ : RingHomInvPair σ₄₁ σ₁₄\ninst✝²² : RingHomInvPair σ₂₄ σ₄₂\ninst✝²¹ : RingHomInvPair σ₄₂ σ₂₄\ninst✝²⁰ : RingHomInvPair σ₃₄ σ₄₃\ninst✝¹⁹ : RingHomInvPair σ₄₃ σ₃₄\ninst✝¹⁸ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁷ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁶ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁵ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹⁴ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹³ : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹² : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹¹ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝¹⁰ : SeminormedAddCommGroup E\ninst✝⁹ : SeminormedAddCommGroup E₂\ninst✝⁸ : SeminormedAddCommGroup E₃\ninst✝⁷ : SeminormedAddCommGroup E₄\ninst✝⁶ : Module R E\ninst✝⁵ : Module R₂ E₂\ninst✝⁴ : Module R₃ E₃\ninst✝³ : Module R₄ E₄\ninst✝² : NormedAddCommGroup F\ninst✝¹ : Module R F\ne : E ≃ₛₗᵢ[σ₁₂] E₂\nα : Type u_11\ninst✝ : TopologicalSpace α\nf : F →ₛₗᵢ[σ₁₂] E₂\nhfr : Surjective ↑f\nx✝ : F\n⊢ ↑(ofSurjective f hfr) x✝ = ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³⁶ : Semiring R\ninst✝³⁵ : Semiring R₂\ninst✝³⁴ : Semiring R₃\ninst✝³³ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝³² : RingHomInvPair σ₁₂ σ₂₁\ninst✝³¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝³⁰ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁹ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁸ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁷ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²⁶ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²⁵ : RingHomInvPair σ₄₁ σ₁₄\ninst✝²⁴ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²³ : RingHomInvPair σ₄₂ σ₂₄\ninst✝²² : RingHomInvPair σ₃₄ σ₄₃\ninst✝²¹ : RingHomInvPair σ₄₃ σ₃₄\ninst✝²⁰ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁹ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁸ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁷ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹⁶ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹⁵ : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹⁴ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹³ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝¹² : SeminormedAddCommGroup E\ninst✝¹¹ : SeminormedAddCommGroup E₂\ninst✝¹⁰ : SeminormedAddCommGroup E₃\ninst✝⁹ : SeminormedAddCommGroup E₄\ninst✝⁸ : Module R E\ninst✝⁷ : Module R₂ E₂\ninst✝⁶ : Module R₃ E₃\ninst✝⁵ : Module R₄ E₄\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : Module R F\ne : E ≃ₛₗᵢ[σ₁₂] E₂\nα : Type u_11\ninst✝² : TopologicalSpace α\ninst✝¹ : Module R E₂\ninst✝ : Module R E₃\nsrc✝ : (E × E₂) × E₃ ≃ E × E₂ × E₃ := Equiv.prodAssoc E E₂ E₃\n⊢ ∀ (x y : (E × E₂) × E₃),\n    ↑(Equiv.prodAssoc E E₂ E₃) (x + y) = ↑(Equiv.prodAssoc E E₂ E₃) x + ↑(Equiv.prodAssoc E E₂ E₃) y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³⁶ : Semiring R\ninst✝³⁵ : Semiring R₂\ninst✝³⁴ : Semiring R₃\ninst✝³³ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝³² : RingHomInvPair σ₁₂ σ₂₁\ninst✝³¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝³⁰ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁹ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁸ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁷ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²⁶ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²⁵ : RingHomInvPair σ₄₁ σ₁₄\ninst✝²⁴ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²³ : RingHomInvPair σ₄₂ σ₂₄\ninst✝²² : RingHomInvPair σ₃₄ σ₄₃\ninst✝²¹ : RingHomInvPair σ₄₃ σ₃₄\ninst✝²⁰ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁹ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁸ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁷ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹⁶ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹⁵ : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹⁴ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹³ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝¹² : SeminormedAddCommGroup E\ninst✝¹¹ : SeminormedAddCommGroup E₂\ninst✝¹⁰ : SeminormedAddCommGroup E₃\ninst✝⁹ : SeminormedAddCommGroup E₄\ninst✝⁸ : Module R E\ninst✝⁷ : Module R₂ E₂\ninst✝⁶ : Module R₃ E₃\ninst✝⁵ : Module R₄ E₄\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : Module R F\ne : E ≃ₛₗᵢ[σ₁₂] E₂\nα : Type u_11\ninst✝² : TopologicalSpace α\ninst✝¹ : Module R E₂\ninst✝ : Module R E₃\nsrc✝ : (E × E₂) × E₃ ≃ E × E₂ × E₃ := Equiv.prodAssoc E E₂ E₃\n⊢ ∀ (r : R) (x : (E × E₂) × E₃),\n    AddHom.toFun\n        { toFun := ↑(Equiv.prodAssoc E E₂ E₃),\n          map_add' :=\n            (_ :\n              ∀ (a a_1 : (E × E₂) × E₃),\n                (a.fst.fst + a_1.fst.fst, a.fst.snd + a_1.fst.snd, a.snd + a_1.snd) =\n                  (a.fst.fst + a_1.fst.fst, a.fst.snd + a_1.fst.snd, a.snd + a_1.snd)) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := ↑(Equiv.prodAssoc E E₂ E₃),\n            map_add' :=\n              (_ :\n                ∀ (a a_1 : (E × E₂) × E₃),\n                  (a.fst.fst + a_1.fst.fst, a.fst.snd + a_1.fst.snd, a.snd + a_1.snd) =\n                    (a.fst.fst + a_1.fst.fst, a.fst.snd + a_1.fst.snd, a.snd + a_1.snd)) }\n          x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³⁶ : Semiring R\ninst✝³⁵ : Semiring R₂\ninst✝³⁴ : Semiring R₃\ninst✝³³ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝³² : RingHomInvPair σ₁₂ σ₂₁\ninst✝³¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝³⁰ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁹ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁸ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁷ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²⁶ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²⁵ : RingHomInvPair σ₄₁ σ₁₄\ninst✝²⁴ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²³ : RingHomInvPair σ₄₂ σ₂₄\ninst✝²² : RingHomInvPair σ₃₄ σ₄₃\ninst✝²¹ : RingHomInvPair σ₄₃ σ₃₄\ninst✝²⁰ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁹ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁸ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁷ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹⁶ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹⁵ : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹⁴ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹³ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝¹² : SeminormedAddCommGroup E\ninst✝¹¹ : SeminormedAddCommGroup E₂\ninst✝¹⁰ : SeminormedAddCommGroup E₃\ninst✝⁹ : SeminormedAddCommGroup E₄\ninst✝⁸ : Module R E\ninst✝⁷ : Module R₂ E₂\ninst✝⁶ : Module R₃ E₃\ninst✝⁵ : Module R₄ E₄\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : Module R F\ne : E ≃ₛₗᵢ[σ₁₂] E₂\nα : Type u_11\ninst✝² : TopologicalSpace α\ninst✝¹ : Module R E₂\ninst✝ : Module R E₃\nsrc✝ : (E × E₂) × E₃ ≃ E × E₂ × E₃ := Equiv.prodAssoc E E₂ E₃\n⊢ ∀ (x : (E × E₂) × E₃),\n    ‖↑{\n              toLinearMap :=\n                {\n                  toAddHom :=\n                    { toFun := ↑(Equiv.prodAssoc E E₂ E₃),\n                      map_add' :=\n                        (_ :\n                          ∀ (a a_1 : (E × E₂) × E₃),\n                            (a.fst.fst + a_1.fst.fst, a.fst.snd + a_1.fst.snd, a.snd + a_1.snd) =\n                              (a.fst.fst + a_1.fst.fst, a.fst.snd + a_1.fst.snd, a.snd + a_1.snd)) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (a : R) (a_1 : (E × E₂) × E₃),\n                        (a • a_1.fst.fst, a • a_1.fst.snd, a • a_1.snd) =\n                          (a • a_1.fst.fst, a • a_1.fst.snd, a • a_1.snd)) },\n              invFun := ↑(Equiv.prodAssoc E E₂ E₃).symm, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n              right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n          x‖ =\n      ‖x‖\n[PROOFSTEP]\nrintro ⟨⟨e, f⟩, g⟩\n[GOAL]\ncase mk.mk\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³⁶ : Semiring R\ninst✝³⁵ : Semiring R₂\ninst✝³⁴ : Semiring R₃\ninst✝³³ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝³² : RingHomInvPair σ₁₂ σ₂₁\ninst✝³¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝³⁰ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁹ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁸ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁷ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²⁶ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²⁵ : RingHomInvPair σ₄₁ σ₁₄\ninst✝²⁴ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²³ : RingHomInvPair σ₄₂ σ₂₄\ninst✝²² : RingHomInvPair σ₃₄ σ₄₃\ninst✝²¹ : RingHomInvPair σ₄₃ σ₃₄\ninst✝²⁰ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁹ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁸ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁷ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹⁶ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹⁵ : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹⁴ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹³ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝¹² : SeminormedAddCommGroup E\ninst✝¹¹ : SeminormedAddCommGroup E₂\ninst✝¹⁰ : SeminormedAddCommGroup E₃\ninst✝⁹ : SeminormedAddCommGroup E₄\ninst✝⁸ : Module R E\ninst✝⁷ : Module R₂ E₂\ninst✝⁶ : Module R₃ E₃\ninst✝⁵ : Module R₄ E₄\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : Module R F\ne✝ : E ≃ₛₗᵢ[σ₁₂] E₂\nα : Type u_11\ninst✝² : TopologicalSpace α\ninst✝¹ : Module R E₂\ninst✝ : Module R E₃\nsrc✝ : (E × E₂) × E₃ ≃ E × E₂ × E₃ := Equiv.prodAssoc E E₂ E₃\ng : E₃\ne : E\nf : E₂\n⊢ ‖↑{\n            toLinearMap :=\n              {\n                toAddHom :=\n                  { toFun := ↑(Equiv.prodAssoc E E₂ E₃),\n                    map_add' :=\n                      (_ :\n                        ∀ (a a_1 : (E × E₂) × E₃),\n                          (a.fst.fst + a_1.fst.fst, a.fst.snd + a_1.fst.snd, a.snd + a_1.snd) =\n                            (a.fst.fst + a_1.fst.fst, a.fst.snd + a_1.fst.snd, a.snd + a_1.snd)) },\n                map_smul' :=\n                  (_ :\n                    ∀ (a : R) (a_1 : (E × E₂) × E₃),\n                      (a • a_1.fst.fst, a • a_1.fst.snd, a • a_1.snd) =\n                        (a • a_1.fst.fst, a • a_1.fst.snd, a • a_1.snd)) },\n            invFun := ↑(Equiv.prodAssoc E E₂ E₃).symm, left_inv := (_ : LeftInverse src✝.invFun src✝.toFun),\n            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        ((e, f), g)‖ =\n    ‖((e, f), g)‖\n[PROOFSTEP]\nsimp only [LinearEquiv.coe_mk, Equiv.prodAssoc_apply, Prod.norm_def, max_assoc]\n[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³⁶ : Semiring R\ninst✝³⁵ : Semiring R₂\ninst✝³⁴ : Semiring R₃\ninst✝³³ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝³² : RingHomInvPair σ₁₂ σ₂₁\ninst✝³¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝³⁰ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁹ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁸ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁷ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²⁶ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²⁵ : RingHomInvPair σ₄₁ σ₁₄\ninst✝²⁴ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²³ : RingHomInvPair σ₄₂ σ₂₄\ninst✝²² : RingHomInvPair σ₃₄ σ₄₃\ninst✝²¹ : RingHomInvPair σ₄₃ σ₃₄\ninst✝²⁰ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁹ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁸ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁷ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹⁶ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹⁵ : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹⁴ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹³ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝¹² : SeminormedAddCommGroup E\ninst✝¹¹ : SeminormedAddCommGroup E₂\ninst✝¹⁰ : SeminormedAddCommGroup E₃\ninst✝⁹ : SeminormedAddCommGroup E₄\ninst✝⁸ : Module R E\ninst✝⁷ : Module R₂ E₂\ninst✝⁶ : Module R₃ E₃\ninst✝⁵ : Module R₄ E₄\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : Module R F\ne : E ≃ₛₗᵢ[σ₁₂] E₂\nα : Type u_11\ninst✝² : TopologicalSpace α\nR' : Type u_12\ninst✝¹ : Ring R'\ninst✝ : Module R' E\np q : Submodule R' E\n⊢ ofEq p p (_ : p = p) = refl R' { x // x ∈ p }\n[PROOFSTEP]\nfunext\n[GOAL]\nR : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\nE : Type u_5\nE₂ : Type u_6\nE₃ : Type u_7\nE₄ : Type u_8\nF : Type u_9\n𝓕 : Type u_10\ninst✝³⁶ : Semiring R\ninst✝³⁵ : Semiring R₂\ninst✝³⁴ : Semiring R₃\ninst✝³³ : Semiring R₄\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₁₃ : R →+* R₃\nσ₃₁ : R₃ →+* R\nσ₁₄ : R →+* R₄\nσ₄₁ : R₄ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₃₂ : R₃ →+* R₂\nσ₂₄ : R₂ →+* R₄\nσ₄₂ : R₄ →+* R₂\nσ₃₄ : R₃ →+* R₄\nσ₄₃ : R₄ →+* R₃\ninst✝³² : RingHomInvPair σ₁₂ σ₂₁\ninst✝³¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝³⁰ : RingHomInvPair σ₁₃ σ₃₁\ninst✝²⁹ : RingHomInvPair σ₃₁ σ₁₃\ninst✝²⁸ : RingHomInvPair σ₂₃ σ₃₂\ninst✝²⁷ : RingHomInvPair σ₃₂ σ₂₃\ninst✝²⁶ : RingHomInvPair σ₁₄ σ₄₁\ninst✝²⁵ : RingHomInvPair σ₄₁ σ₁₄\ninst✝²⁴ : RingHomInvPair σ₂₄ σ₄₂\ninst✝²³ : RingHomInvPair σ₄₂ σ₂₄\ninst✝²² : RingHomInvPair σ₃₄ σ₄₃\ninst✝²¹ : RingHomInvPair σ₄₃ σ₃₄\ninst✝²⁰ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁹ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\ninst✝¹⁸ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹⁷ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹⁶ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁\ninst✝¹⁵ : RingHomCompTriple σ₄₂ σ₂₁ σ₄₁\ninst✝¹⁴ : RingHomCompTriple σ₄₃ σ₃₂ σ₄₂\ninst✝¹³ : RingHomCompTriple σ₄₃ σ₃₁ σ₄₁\ninst✝¹² : SeminormedAddCommGroup E\ninst✝¹¹ : SeminormedAddCommGroup E₂\ninst✝¹⁰ : SeminormedAddCommGroup E₃\ninst✝⁹ : SeminormedAddCommGroup E₄\ninst✝⁸ : Module R E\ninst✝⁷ : Module R₂ E₂\ninst✝⁶ : Module R₃ E₃\ninst✝⁵ : Module R₄ E₄\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : Module R F\ne : E ≃ₛₗᵢ[σ₁₂] E₂\nα : Type u_11\ninst✝² : TopologicalSpace α\nR' : Type u_12\ninst✝¹ : Ring R'\ninst✝ : Module R' E\np q : Submodule R' E\n⊢ ofEq p p (_ : p = p) = refl R' { x // x ∈ p }\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.LinearIsometry", "llama_tokens": 23500, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.8267117940706733, "lm_q2_score": 0.4649015713733885, "lm_q1q2_score": 0.3843396121363692}}
{"text": "[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : Module R A\ninst✝ : Module (MvPolynomial σ R) A\nf : σ → A\ni : σ\n⊢ (1 •\n      Finsupp.sum (Finsupp.single i 1) fun i_1 k =>\n        ↑(monomial (Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) =\n    f i\n[PROOFSTEP]\nsimp\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : Module R A\ninst✝ : Module (MvPolynomial σ R) A\nD : Derivation R (MvPolynomial σ R) A\na : R\nf : MvPolynomial σ R\n⊢ ↑C a • ↑D f = a • ↑D f\n[PROOFSTEP]\nhave : C (σ := σ) a • D f = D (C a * f) := by simp\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : Module R A\ninst✝ : Module (MvPolynomial σ R) A\nD : Derivation R (MvPolynomial σ R) A\na : R\nf : MvPolynomial σ R\n⊢ ↑C a • ↑D f = ↑D (↑C a * f)\n[PROOFSTEP]\nsimp\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : Module R A\ninst✝ : Module (MvPolynomial σ R) A\nD : Derivation R (MvPolynomial σ R) A\na : R\nf : MvPolynomial σ R\nthis : ↑C a • ↑D f = ↑D (↑C a * f)\n⊢ ↑C a • ↑D f = a • ↑D f\n[PROOFSTEP]\nrw [this, C_mul', D.map_smul]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\n⊢ (∀ (p q : MvPolynomial σ R), ↑D (p * q) = p • ↑D q + q • ↑D p) ↔\n    ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\n[PROOFSTEP]\nrefine' ⟨fun H p i => H _ _, fun H => _⟩\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\n⊢ ∀ (p q : MvPolynomial σ R), ↑D (p * q) = p • ↑D q + q • ↑D p\n[PROOFSTEP]\nhave hC : ∀ r, D (C r) = 0 := by intro r; rw [C_eq_smul_one, D.map_smul, h₁, smul_zero]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\n⊢ ∀ (r : R), ↑D (↑C r) = 0\n[PROOFSTEP]\nintro r\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nr : R\n⊢ ↑D (↑C r) = 0\n[PROOFSTEP]\nrw [C_eq_smul_one, D.map_smul, h₁, smul_zero]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\n⊢ ∀ (p q : MvPolynomial σ R), ↑D (p * q) = p • ↑D q + q • ↑D p\n[PROOFSTEP]\nhave : ∀ p i, D (p * X i) = p • D (X i) + (X i : MvPolynomial σ R) • D p :=\n  by\n  intro p i\n  induction' p using MvPolynomial.induction_on' with s r p q hp hq\n  ·\n    rw [← mul_one r, ← C_mul_monomial, mul_assoc, C_mul', D.map_smul, H, C_mul', smul_assoc, smul_add, D.map_smul,\n      smul_comm r (X i)]\n  · rw [add_mul, map_add, map_add, hp, hq, add_smul, smul_add, add_add_add_comm]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\n⊢ ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\n[PROOFSTEP]\nintro p i\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\np : MvPolynomial σ R\ni : σ\n⊢ ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\n[PROOFSTEP]\ninduction' p using MvPolynomial.induction_on' with s r p q hp hq\n[GOAL]\ncase h1\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\ni : σ\ns : σ →₀ ℕ\nr : R\n⊢ ↑D (↑(monomial s) r * X i) = ↑(monomial s) r • ↑D (X i) + X i • ↑D (↑(monomial s) r)\n[PROOFSTEP]\nrw [← mul_one r, ← C_mul_monomial, mul_assoc, C_mul', D.map_smul, H, C_mul', smul_assoc, smul_add, D.map_smul,\n  smul_comm r (X i)]\n[GOAL]\ncase h2\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\ni : σ\np q : MvPolynomial σ R\nhp : ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\nhq : ↑D (q * X i) = q • ↑D (X i) + X i • ↑D q\n⊢ ↑D ((p + q) * X i) = (p + q) • ↑D (X i) + X i • ↑D (p + q)\n[PROOFSTEP]\nrw [add_mul, map_add, map_add, hp, hq, add_smul, smul_add, add_add_add_comm]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\nthis : ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\n⊢ ∀ (p q : MvPolynomial σ R), ↑D (p * q) = p • ↑D q + q • ↑D p\n[PROOFSTEP]\nintro p q\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\nthis : ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\np q : MvPolynomial σ R\n⊢ ↑D (p * q) = p • ↑D q + q • ↑D p\n[PROOFSTEP]\ninduction q using MvPolynomial.induction_on with\n| h_C c => rw [mul_comm, C_mul', hC, smul_zero, zero_add, D.map_smul, C_eq_smul_one, smul_one_smul]\n| h_add q₁ q₂ h₁ h₂ => simp only [mul_add, map_add, h₁, h₂, smul_add, add_smul]; abel\n| h_X q i hq =>\n  simp only [this, ← mul_assoc, hq, mul_smul, smul_add, add_assoc]\n  rw [smul_comm (X i), smul_comm (X i)]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\nthis : ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\np q : MvPolynomial σ R\n⊢ ↑D (p * q) = p • ↑D q + q • ↑D p\n[PROOFSTEP]\ninduction q using MvPolynomial.induction_on with\n| h_C c => rw [mul_comm, C_mul', hC, smul_zero, zero_add, D.map_smul, C_eq_smul_one, smul_one_smul]\n| h_add q₁ q₂ h₁ h₂ => simp only [mul_add, map_add, h₁, h₂, smul_add, add_smul]; abel\n| h_X q i hq =>\n  simp only [this, ← mul_assoc, hq, mul_smul, smul_add, add_assoc]\n  rw [smul_comm (X i), smul_comm (X i)]\n[GOAL]\ncase h_C\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\nthis : ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\np : MvPolynomial σ R\nc : R\n⊢ ↑D (p * ↑C c) = p • ↑D (↑C c) + ↑C c • ↑D p\n[PROOFSTEP]\n\n| h_C c => rw [mul_comm, C_mul', hC, smul_zero, zero_add, D.map_smul, C_eq_smul_one, smul_one_smul]\n[GOAL]\ncase h_C\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\nthis : ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\np : MvPolynomial σ R\nc : R\n⊢ ↑D (p * ↑C c) = p • ↑D (↑C c) + ↑C c • ↑D p\n[PROOFSTEP]\nrw [mul_comm, C_mul', hC, smul_zero, zero_add, D.map_smul, C_eq_smul_one, smul_one_smul]\n[GOAL]\ncase h_add\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁✝ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\nthis : ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\np q₁ q₂ : MvPolynomial σ R\nh₁ : ↑D (p * q₁) = p • ↑D q₁ + q₁ • ↑D p\nh₂ : ↑D (p * q₂) = p • ↑D q₂ + q₂ • ↑D p\n⊢ ↑D (p * (q₁ + q₂)) = p • ↑D (q₁ + q₂) + (q₁ + q₂) • ↑D p\n[PROOFSTEP]\n\n| h_add q₁ q₂ h₁ h₂ => simp only [mul_add, map_add, h₁, h₂, smul_add, add_smul]; abel\n[GOAL]\ncase h_add\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁✝ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\nthis : ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\np q₁ q₂ : MvPolynomial σ R\nh₁ : ↑D (p * q₁) = p • ↑D q₁ + q₁ • ↑D p\nh₂ : ↑D (p * q₂) = p • ↑D q₂ + q₂ • ↑D p\n⊢ ↑D (p * (q₁ + q₂)) = p • ↑D (q₁ + q₂) + (q₁ + q₂) • ↑D p\n[PROOFSTEP]\nsimp only [mul_add, map_add, h₁, h₂, smul_add, add_smul]\n[GOAL]\ncase h_add\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁✝ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\nthis : ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\np q₁ q₂ : MvPolynomial σ R\nh₁ : ↑D (p * q₁) = p • ↑D q₁ + q₁ • ↑D p\nh₂ : ↑D (p * q₂) = p • ↑D q₂ + q₂ • ↑D p\n⊢ p • ↑D q₁ + q₁ • ↑D p + (p • ↑D q₂ + q₂ • ↑D p) = p • ↑D q₁ + p • ↑D q₂ + (q₁ • ↑D p + q₂ • ↑D p)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h_add\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁✝ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\nthis : ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\np q₁ q₂ : MvPolynomial σ R\nh₁ : ↑D (p * q₁) = p • ↑D q₁ + q₁ • ↑D p\nh₂ : ↑D (p * q₂) = p • ↑D q₂ + q₂ • ↑D p\n⊢ p • ↑D q₁ + q₁ • ↑D p + (p • ↑D q₂ + q₂ • ↑D p) = p • ↑D q₁ + p • ↑D q₂ + (q₁ • ↑D p + q₂ • ↑D p)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h_X\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\nthis : ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\np q : MvPolynomial σ R\ni : σ\nhq : ↑D (p * q) = p • ↑D q + q • ↑D p\n⊢ ↑D (p * (q * X i)) = p • ↑D (q * X i) + (q * X i) • ↑D p\n[PROOFSTEP]\n\n| h_X q i hq =>\n  simp only [this, ← mul_assoc, hq, mul_smul, smul_add, add_assoc]\n  rw [smul_comm (X i), smul_comm (X i)]\n[GOAL]\ncase h_X\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\nthis : ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\np q : MvPolynomial σ R\ni : σ\nhq : ↑D (p * q) = p • ↑D q + q • ↑D p\n⊢ ↑D (p * (q * X i)) = p • ↑D (q * X i) + (q * X i) • ↑D p\n[PROOFSTEP]\nsimp only [this, ← mul_assoc, hq, mul_smul, smul_add, add_assoc]\n[GOAL]\ncase h_X\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nD : MvPolynomial σ R →ₗ[R] A\nh₁ : ↑D 1 = 0\nH : ∀ (s : σ →₀ ℕ) (i : σ), ↑D (↑(monomial s) 1 * X i) = ↑(monomial s) 1 • ↑D (X i) + X i • ↑D (↑(monomial s) 1)\nhC : ∀ (r : R), ↑D (↑C r) = 0\nthis : ∀ (p : MvPolynomial σ R) (i : σ), ↑D (p * X i) = p • ↑D (X i) + X i • ↑D p\np q : MvPolynomial σ R\ni : σ\nhq : ↑D (p * q) = p • ↑D q + q • ↑D p\n⊢ p • q • ↑D (X i) + (X i • p • ↑D q + X i • q • ↑D p) = p • q • ↑D (X i) + (p • X i • ↑D q + q • X i • ↑D p)\n[PROOFSTEP]\nrw [smul_comm (X i), smul_comm (X i)]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ ↑(mkDerivationₗ R f) (↑(monomial s) 1 * X i) =\n    ↑(monomial s) 1 • ↑(mkDerivationₗ R f) (X i) + X i • ↑(mkDerivationₗ R f) (↑(monomial s) 1)\n[PROOFSTEP]\nsimp only [mkDerivationₗ_monomial, X, monomial_mul, one_smul, one_mul]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ (Finsupp.sum (s + Finsupp.single i 1) fun i_1 k =>\n      ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) =\n    (↑(monomial s) 1 •\n        Finsupp.sum (Finsupp.single i 1) fun i_1 k =>\n          ↑(monomial (Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) +\n      ↑(monomial (Finsupp.single i 1)) 1 • Finsupp.sum s fun i k => ↑(monomial (s - Finsupp.single i 1)) ↑k • f i\n[PROOFSTEP]\nrw [Finsupp.sum_add_index'] <;> [skip; simp; (intros; simp only [Nat.cast_add, (monomial _).map_add, add_smul])]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ (Finsupp.sum (s + Finsupp.single i 1) fun i_1 k =>\n      ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) =\n    (↑(monomial s) 1 •\n        Finsupp.sum (Finsupp.single i 1) fun i_1 k =>\n          ↑(monomial (Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) +\n      ↑(monomial (Finsupp.single i 1)) 1 • Finsupp.sum s fun i k => ↑(monomial (s - Finsupp.single i 1)) ↑k • f i\n[PROOFSTEP]\nrw [Finsupp.sum_add_index']\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ ((Finsupp.sum s fun i_1 k => ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) +\n      Finsupp.sum (Finsupp.single i 1) fun i_1 k =>\n        ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) =\n    (↑(monomial s) 1 •\n        Finsupp.sum (Finsupp.single i 1) fun i_1 k =>\n          ↑(monomial (Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) +\n      ↑(monomial (Finsupp.single i 1)) 1 • Finsupp.sum s fun i k => ↑(monomial (s - Finsupp.single i 1)) ↑k • f i\n[PROOFSTEP]\nskip\n[GOAL]\ncase h_zero\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ ∀ (a : σ), ↑(monomial (s + Finsupp.single i 1 - Finsupp.single a 1)) ↑0 • f a = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_add\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ ∀ (a : σ) (b₁ b₂ : ℕ),\n    ↑(monomial (s + Finsupp.single i 1 - Finsupp.single a 1)) ↑(b₁ + b₂) • f a =\n      ↑(monomial (s + Finsupp.single i 1 - Finsupp.single a 1)) ↑b₁ • f a +\n        ↑(monomial (s + Finsupp.single i 1 - Finsupp.single a 1)) ↑b₂ • f a\n[PROOFSTEP]\nintros\n[GOAL]\ncase h_add\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni a✝ : σ\nb₁✝ b₂✝ : ℕ\n⊢ ↑(monomial (s + Finsupp.single i 1 - Finsupp.single a✝ 1)) ↑(b₁✝ + b₂✝) • f a✝ =\n    ↑(monomial (s + Finsupp.single i 1 - Finsupp.single a✝ 1)) ↑b₁✝ • f a✝ +\n      ↑(monomial (s + Finsupp.single i 1 - Finsupp.single a✝ 1)) ↑b₂✝ • f a✝\n[PROOFSTEP]\nsimp only [Nat.cast_add, (monomial _).map_add, add_smul]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ ((Finsupp.sum s fun i_1 k => ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) +\n      Finsupp.sum (Finsupp.single i 1) fun i_1 k =>\n        ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) =\n    (↑(monomial s) 1 •\n        Finsupp.sum (Finsupp.single i 1) fun i_1 k =>\n          ↑(monomial (Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) +\n      ↑(monomial (Finsupp.single i 1)) 1 • Finsupp.sum s fun i k => ↑(monomial (s - Finsupp.single i 1)) ↑k • f i\n[PROOFSTEP]\nrw [Finsupp.sum_single_index, Finsupp.sum_single_index] <;> [skip; simp; simp]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ ((Finsupp.sum s fun i_1 k => ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) +\n      Finsupp.sum (Finsupp.single i 1) fun i_1 k =>\n        ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) =\n    (↑(monomial s) 1 •\n        Finsupp.sum (Finsupp.single i 1) fun i_1 k =>\n          ↑(monomial (Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) +\n      ↑(monomial (Finsupp.single i 1)) 1 • Finsupp.sum s fun i k => ↑(monomial (s - Finsupp.single i 1)) ↑k • f i\n[PROOFSTEP]\nrw [Finsupp.sum_single_index, Finsupp.sum_single_index]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ (Finsupp.sum s fun i_1 k => ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) +\n      ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i 1)) ↑1 • f i =\n    ↑(monomial s) 1 • ↑(monomial (Finsupp.single i 1 - Finsupp.single i 1)) ↑1 • f i +\n      ↑(monomial (Finsupp.single i 1)) 1 • Finsupp.sum s fun i k => ↑(monomial (s - Finsupp.single i 1)) ↑k • f i\n[PROOFSTEP]\nskip\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ ↑(monomial (Finsupp.single i 1 - Finsupp.single i 1)) ↑0 • f i = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i 1)) ↑0 • f i = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ (Finsupp.sum s fun i_1 k => ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) +\n      ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i 1)) ↑1 • f i =\n    ↑(monomial s) 1 • ↑(monomial (Finsupp.single i 1 - Finsupp.single i 1)) ↑1 • f i +\n      ↑(monomial (Finsupp.single i 1)) 1 • Finsupp.sum s fun i k => ↑(monomial (s - Finsupp.single i 1)) ↑k • f i\n[PROOFSTEP]\nrw [tsub_self, add_tsub_cancel_right, Nat.cast_one, ← C_apply, C_1, one_smul, add_comm, Finsupp.smul_sum]\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni : σ\n⊢ (↑(monomial s) 1 • f i +\n      Finsupp.sum s fun i_1 k => ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) =\n    ↑(monomial s) 1 • f i +\n      Finsupp.sum s fun a b => ↑(monomial (Finsupp.single i 1)) 1 • ↑(monomial (s - Finsupp.single a 1)) ↑b • f a\n[PROOFSTEP]\nrefine' congr_arg₂ (· + ·) rfl (Finset.sum_congr rfl fun j hj => _)\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni j : σ\nhj : j ∈ s.support\n⊢ (fun i_1 k => ↑(monomial (s + Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) j (↑s j) =\n    (fun a b => ↑(monomial (Finsupp.single i 1)) 1 • ↑(monomial (s - Finsupp.single a 1)) ↑b • f a) j (↑s j)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni j : σ\nhj : j ∈ s.support\n⊢ ↑(monomial (s + Finsupp.single i 1 - Finsupp.single j 1)) ↑(↑s j) • f j =\n    ↑(monomial (Finsupp.single i 1)) 1 • ↑(monomial (s - Finsupp.single j 1)) ↑(↑s j) • f j\n[PROOFSTEP]\nrw [smul_smul, monomial_mul, one_mul, add_comm s, add_tsub_assoc_of_le]\n[GOAL]\ncase h\nσ : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid A\ninst✝² : Module R A\ninst✝¹ : Module (MvPolynomial σ R) A\ninst✝ : IsScalarTower R (MvPolynomial σ R) A\nf : σ → A\ns : σ →₀ ℕ\ni j : σ\nhj : j ∈ s.support\n⊢ Finsupp.single j 1 ≤ s\n[PROOFSTEP]\nrwa [Finsupp.single_le_iff, Nat.succ_le_iff, pos_iff_ne_zero, ← Finsupp.mem_support_iff]\n", "meta": {"mathlib_filename": "Mathlib.Data.MvPolynomial.Derivation", "llama_tokens": 13335, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7745833841649233, "lm_q2_score": 0.4960938294709195, "lm_q1q2_score": 0.3842660372949212}}
{"text": "[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\n⊢ IsReflexivePair (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\n[PROOFSTEP]\napply IsReflexivePair.mk' _ _ _\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\n⊢ (free T).obj X.A ⟶ (free T).obj (T.obj X.A)\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\n⊢ ?m.2463 ≫ FreeCoequalizer.topMap X = 𝟙 ((free T).obj X.A)\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\n⊢ ?m.2463 ≫ FreeCoequalizer.bottomMap X = 𝟙 ((free T).obj X.A)\n[PROOFSTEP]\napply (free T).map (T.η.app X.A)\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\n⊢ (free T).map (NatTrans.app (η T) X.A) ≫ FreeCoequalizer.topMap X = 𝟙 ((free T).obj X.A)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\n⊢ ((free T).map (NatTrans.app (η T) X.A) ≫ FreeCoequalizer.topMap X).f = (𝟙 ((free T).obj X.A)).f\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\n⊢ T.map (NatTrans.app (η T) X.A) ≫ T.map X.a = 𝟙 (T.obj X.A)\n[PROOFSTEP]\nrw [← Functor.map_comp, X.unit, Functor.map_id]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\n⊢ (free T).map (NatTrans.app (η T) X.A) ≫ FreeCoequalizer.bottomMap X = 𝟙 ((free T).obj X.A)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\n⊢ ((free T).map (NatTrans.app (η T) X.A) ≫ FreeCoequalizer.bottomMap X).f = (𝟙 ((free T).obj X.A)).f\n[PROOFSTEP]\napply Monad.right_unit\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\ns : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\n⊢ { l //\n    Cofork.π (beckAlgebraCofork X) ≫ l = Cofork.π s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj (beckAlgebraCofork X).pt).obj WalkingParallelPair.one ⟶\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n        Cofork.π (beckAlgebraCofork X) ≫ m = Cofork.π s → m = l }\n[PROOFSTEP]\nhave h₁ : (T : C ⥤ C).map X.a ≫ s.π.f = T.μ.app X.A ≫ s.π.f := congr_arg Monad.Algebra.Hom.f s.condition\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\ns : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\nh₁ : T.map X.a ≫ (Cofork.π s).f = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\n⊢ { l //\n    Cofork.π (beckAlgebraCofork X) ≫ l = Cofork.π s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj (beckAlgebraCofork X).pt).obj WalkingParallelPair.one ⟶\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n        Cofork.π (beckAlgebraCofork X) ≫ m = Cofork.π s → m = l }\n[PROOFSTEP]\nhave h₂ : (T : C ⥤ C).map s.π.f ≫ s.pt.a = T.μ.app X.A ≫ s.π.f := s.π.h\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\ns : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\nh₁ : T.map X.a ≫ (Cofork.π s).f = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nh₂ : T.map (Cofork.π s).f ≫ s.pt.a = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\n⊢ { l //\n    Cofork.π (beckAlgebraCofork X) ≫ l = Cofork.π s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj (beckAlgebraCofork X).pt).obj WalkingParallelPair.one ⟶\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n        Cofork.π (beckAlgebraCofork X) ≫ m = Cofork.π s → m = l }\n[PROOFSTEP]\nrefine' ⟨⟨T.η.app _ ≫ s.π.f, _⟩, _, _⟩\n[GOAL]\ncase refine'_1\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\ns : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\nh₁ : T.map X.a ≫ (Cofork.π s).f = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nh₂ : T.map (Cofork.π s).f ≫ s.pt.a = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\n⊢ T.map (NatTrans.app (η T) (beckAlgebraCofork X).pt.1 ≫ (Cofork.π s).f) ≫ s.pt.a =\n    (beckAlgebraCofork X).pt.a ≫ NatTrans.app (η T) (beckAlgebraCofork X).pt.1 ≫ (Cofork.π s).f\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\ns : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\nh₁ : T.map X.a ≫ (Cofork.π s).f = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nh₂ : T.map (Cofork.π s).f ≫ s.pt.a = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\n⊢ T.map (NatTrans.app (η T) X.1 ≫ (Cofork.π s).f) ≫ s.pt.a = X.a ≫ NatTrans.app (η T) X.1 ≫ (Cofork.π s).f\n[PROOFSTEP]\nrw [Functor.map_comp, Category.assoc, h₂, Monad.right_unit_assoc, show X.a ≫ _ ≫ _ = _ from T.η.naturality_assoc _ _,\n  h₁, Monad.left_unit_assoc]\n[GOAL]\ncase refine'_2\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\ns : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\nh₁ : T.map X.a ≫ (Cofork.π s).f = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nh₂ : T.map (Cofork.π s).f ≫ s.pt.a = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\n⊢ Cofork.π (beckAlgebraCofork X) ≫ Algebra.Hom.mk (NatTrans.app (η T) (beckAlgebraCofork X).pt.1 ≫ (Cofork.π s).f) =\n    Cofork.π s\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_2.h\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\ns : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\nh₁ : T.map X.a ≫ (Cofork.π s).f = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nh₂ : T.map (Cofork.π s).f ≫ s.pt.a = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\n⊢ (Cofork.π (beckAlgebraCofork X) ≫ Algebra.Hom.mk (NatTrans.app (η T) (beckAlgebraCofork X).pt.1 ≫ (Cofork.π s).f)).f =\n    (Cofork.π s).f\n[PROOFSTEP]\nsimpa [← T.η.naturality_assoc, T.left_unit_assoc] using T.η.app ((T : C ⥤ C).obj X.A) ≫= h₁\n[GOAL]\ncase refine'_3\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\ns : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\nh₁ : T.map X.a ≫ (Cofork.π s).f = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nh₂ : T.map (Cofork.π s).f ≫ s.pt.a = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\n⊢ ∀\n    {m :\n      ((Functor.const WalkingParallelPair).obj (beckAlgebraCofork X).pt).obj WalkingParallelPair.one ⟶\n        ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n    Cofork.π (beckAlgebraCofork X) ≫ m = Cofork.π s →\n      m = Algebra.Hom.mk (NatTrans.app (η T) (beckAlgebraCofork X).pt.1 ≫ (Cofork.π s).f)\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase refine'_3\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\ns : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\nh₁ : T.map X.a ≫ (Cofork.π s).f = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nh₂ : T.map (Cofork.π s).f ≫ s.pt.a = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nm :\n  ((Functor.const WalkingParallelPair).obj (beckAlgebraCofork X).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhm : Cofork.π (beckAlgebraCofork X) ≫ m = Cofork.π s\n⊢ m = Algebra.Hom.mk (NatTrans.app (η T) (beckAlgebraCofork X).pt.1 ≫ (Cofork.π s).f)\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_3.h\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\ns : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\nh₁ : T.map X.a ≫ (Cofork.π s).f = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nh₂ : T.map (Cofork.π s).f ≫ s.pt.a = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nm :\n  ((Functor.const WalkingParallelPair).obj (beckAlgebraCofork X).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhm : Cofork.π (beckAlgebraCofork X) ≫ m = Cofork.π s\n⊢ m.f = (Algebra.Hom.mk (NatTrans.app (η T) (beckAlgebraCofork X).pt.1 ≫ (Cofork.π s).f)).f\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase refine'_3.h\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\ns : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\nh₁ : T.map X.a ≫ (Cofork.π s).f = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nh₂ : T.map (Cofork.π s).f ≫ s.pt.a = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nm :\n  ((Functor.const WalkingParallelPair).obj (beckAlgebraCofork X).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhm : Cofork.π (beckAlgebraCofork X) ≫ m = Cofork.π s\n⊢ m.f = NatTrans.app (η T) (beckAlgebraCofork X).pt.1 ≫ (Cofork.π s).f\n[PROOFSTEP]\nrw [← hm]\n[GOAL]\ncase refine'_3.h\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nT : Monad C\nX : Algebra T\ns : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)\nh₁ : T.map X.a ≫ (Cofork.π s).f = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nh₂ : T.map (Cofork.π s).f ≫ s.pt.a = NatTrans.app (μ T) X.A ≫ (Cofork.π s).f\nm :\n  ((Functor.const WalkingParallelPair).obj (beckAlgebraCofork X).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhm : Cofork.π (beckAlgebraCofork X) ≫ m = Cofork.π s\n⊢ m.f = NatTrans.app (η T) (beckAlgebraCofork X).pt.1 ≫ (Cofork.π (beckAlgebraCofork X) ≫ m).f\n[PROOFSTEP]\napply (X.unit_assoc _).symm\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monad.Coequalizer", "llama_tokens": 4348, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442251064863697, "lm_q2_score": 0.5964331462646255, "lm_q1q2_score": 0.38423720716432885}}
{"text": "[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\n⊢ IsIso f ↔ f ≠ 0\n[PROOFSTEP]\nhaveI : Mono (f ≫ i.hom) := mono_comp _ _\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\n⊢ IsIso f ↔ f ≠ 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\n⊢ IsIso f → f ≠ 0\n[PROOFSTEP]\nintro h w\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\nh : IsIso f\nw : f = 0\n⊢ False\n[PROOFSTEP]\nhave j : IsIso (f ≫ i.hom)\n[GOAL]\ncase j\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\nh : IsIso f\nw : f = 0\n⊢ IsIso (f ≫ i.hom)\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\nh : IsIso f\nw : f = 0\nj : IsIso (f ≫ i.hom)\n⊢ False\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\nh : IsIso f\nw : f = 0\nj : IsIso (f ≫ i.hom)\n⊢ False\n[PROOFSTEP]\nrw [Simple.mono_isIso_iff_nonzero] at j \n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\nh : IsIso f\nw : f = 0\nj✝ : IsIso (f ≫ i.hom)\nj : f ≫ i.hom ≠ 0\n⊢ False\n[PROOFSTEP]\nsubst w\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nm : Mono 0\nthis : Mono (0 ≫ i.hom)\nh : IsIso 0\nj✝ : IsIso (0 ≫ i.hom)\nj : 0 ≫ i.hom ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp at j \n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\n⊢ f ≠ 0 → IsIso f\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\nh : f ≠ 0\n⊢ IsIso f\n[PROOFSTEP]\nhave j : IsIso (f ≫ i.hom) := by\n  apply isIso_of_mono_of_nonzero\n  intro w\n  apply h\n  simpa using (cancel_mono i.inv).2 w\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\nh : f ≠ 0\n⊢ IsIso (f ≫ i.hom)\n[PROOFSTEP]\napply isIso_of_mono_of_nonzero\n[GOAL]\ncase w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\nh : f ≠ 0\n⊢ f ≫ i.hom ≠ 0\n[PROOFSTEP]\nintro w\n[GOAL]\ncase w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\nh : f ≠ 0\nw : f ≫ i.hom = 0\n⊢ False\n[PROOFSTEP]\napply h\n[GOAL]\ncase w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\nh : f ≠ 0\nw : f ≫ i.hom = 0\n⊢ f = 0\n[PROOFSTEP]\nsimpa using (cancel_mono i.inv).2 w\n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\nh : f ≠ 0\nj : IsIso (f ≫ i.hom)\n⊢ IsIso f\n[PROOFSTEP]\nrw [← Category.comp_id f, ← i.hom_inv_id, ← Category.assoc]\n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX Y : C\ninst✝ : Simple Y\ni : X ≅ Y\nY✝ : C\nf : Y✝ ⟶ X\nm : Mono f\nthis : Mono (f ≫ i.hom)\nh : f ≠ 0\nj : IsIso (f ≫ i.hom)\n⊢ IsIso ((f ≫ i.hom) ≫ i.inv)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nX Y : C\ninst✝¹ : Simple X\nf : X ⟶ Y\ninst✝ : HasKernel f\nw : f ≠ 0\n⊢ kernel.ι f = 0\n[PROOFSTEP]\nclassical\nby_contra h\nhaveI := isIso_of_mono_of_nonzero h\nexact w (eq_zero_of_epi_kernel f)\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nX Y : C\ninst✝¹ : Simple X\nf : X ⟶ Y\ninst✝ : HasKernel f\nw : f ≠ 0\n⊢ kernel.ι f = 0\n[PROOFSTEP]\nby_contra h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nX Y : C\ninst✝¹ : Simple X\nf : X ⟶ Y\ninst✝ : HasKernel f\nw : f ≠ 0\nh : ¬kernel.ι f = 0\n⊢ False\n[PROOFSTEP]\nhaveI := isIso_of_mono_of_nonzero h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nX Y : C\ninst✝¹ : Simple X\nf : X ⟶ Y\ninst✝ : HasKernel f\nw : f ≠ 0\nh : ¬kernel.ι f = 0\nthis : IsIso (kernel.ι f)\n⊢ False\n[PROOFSTEP]\nexact w (eq_zero_of_epi_kernel f)\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\nX Y : C\ninst✝¹ : Simple Y\nf : X ⟶ Y\ninst✝ : HasImage f\nw : f ≠ 0\n⊢ Epi f\n[PROOFSTEP]\nrw [← image.fac f]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\nX Y : C\ninst✝¹ : Simple Y\nf : X ⟶ Y\ninst✝ : HasImage f\nw : f ≠ 0\n⊢ Epi (factorThruImage f ≫ image.ι f)\n[PROOFSTEP]\nhaveI : IsIso (image.ι f) := isIso_of_mono_of_nonzero fun h => w (eq_zero_of_image_eq_zero h)\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\nX Y : C\ninst✝¹ : Simple Y\nf : X ⟶ Y\ninst✝ : HasImage f\nw : f ≠ 0\nthis : IsIso (image.ι f)\n⊢ Epi (factorThruImage f ≫ image.ι f)\n[PROOFSTEP]\napply epi_comp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nX Y : C\ninst✝¹ : Simple Y\nf : X ⟶ Y\ninst✝ : Mono f\nw : IsIso f → False\n⊢ f = 0\n[PROOFSTEP]\nclassical\nby_contra h\nexact w (isIso_of_mono_of_nonzero h)\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nX Y : C\ninst✝¹ : Simple Y\nf : X ⟶ Y\ninst✝ : Mono f\nw : IsIso f → False\n⊢ f = 0\n[PROOFSTEP]\nby_contra h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nX Y : C\ninst✝¹ : Simple Y\nf : X ⟶ Y\ninst✝ : Mono f\nw : IsIso f → False\nh : ¬f = 0\n⊢ False\n[PROOFSTEP]\nexact w (isIso_of_mono_of_nonzero h)\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX : C\ninst✝ : Simple X\n⊢ IsIso (𝟙 X)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nX : C\ninst✝ : Simple X\n⊢ ¬IsZero X\n[PROOFSTEP]\nsimpa [Limits.IsZero.iff_id_eq_zero] using id_nonzero X\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\ninst✝ : Simple 0\n⊢ 0 ≫ 0 = 𝟙 0 ∧ 0 ≫ 0 = 𝟙 0\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nf : Y ⟶ X\nI : Mono f\n⊢ IsIso f ↔ f ≠ 0\n[PROOFSTEP]\nclassical\nfconstructor\n· intros\n  have hx := cokernel.π_of_epi f\n  by_contra h\n  subst h\n  exact (h _).mp (cokernel.π_of_zero _ _) hx\n· intro hf\n  suffices Epi f by exact isIso_of_mono_of_epi _\n  apply Preadditive.epi_of_cokernel_zero\n  by_contra h'\n  exact cokernel_not_iso_of_nonzero hf ((h _).mpr h')\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nf : Y ⟶ X\nI : Mono f\n⊢ IsIso f ↔ f ≠ 0\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nf : Y ⟶ X\nI : Mono f\n⊢ IsIso f → f ≠ 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nf : Y ⟶ X\nI : Mono f\na✝ : IsIso f\n⊢ f ≠ 0\n[PROOFSTEP]\nhave hx := cokernel.π_of_epi f\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nf : Y ⟶ X\nI : Mono f\na✝ : IsIso f\nhx : cokernel.π f = 0\n⊢ f ≠ 0\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh✝ : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nf : Y ⟶ X\nI : Mono f\na✝ : IsIso f\nhx : cokernel.π f = 0\nh : f = 0\n⊢ False\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nI : Mono 0\na✝ : IsIso 0\nhx : cokernel.π 0 = 0\n⊢ False\n[PROOFSTEP]\nexact (h _).mp (cokernel.π_of_zero _ _) hx\n[GOAL]\ncase mpr\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nf : Y ⟶ X\nI : Mono f\n⊢ f ≠ 0 → IsIso f\n[PROOFSTEP]\nintro hf\n[GOAL]\ncase mpr\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nf : Y ⟶ X\nI : Mono f\nhf : f ≠ 0\n⊢ IsIso f\n[PROOFSTEP]\nsuffices Epi f by exact isIso_of_mono_of_epi _\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nf : Y ⟶ X\nI : Mono f\nhf : f ≠ 0\nthis : Epi f\n⊢ IsIso f\n[PROOFSTEP]\nexact isIso_of_mono_of_epi _\n[GOAL]\ncase mpr\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nf : Y ⟶ X\nI : Mono f\nhf : f ≠ 0\n⊢ Epi f\n[PROOFSTEP]\napply Preadditive.epi_of_cokernel_zero\n[GOAL]\ncase mpr.w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nf : Y ⟶ X\nI : Mono f\nhf : f ≠ 0\n⊢ cokernel.π f = 0\n[PROOFSTEP]\nby_contra h'\n[GOAL]\ncase mpr.w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nh : ∀ {Z : C} (f : X ⟶ Z) [inst : Epi f], IsIso f ↔ f ≠ 0\nY : C\nf : Y ⟶ X\nI : Mono f\nhf : f ≠ 0\nh' : ¬cokernel.π f = 0\n⊢ False\n[PROOFSTEP]\nexact cokernel_not_iso_of_nonzero hf ((h _).mpr h')\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\nX Y : C\ninst✝ : Simple Y\nf : X ⟶ Y\nw : f ≠ 0\n⊢ cokernel.π f = 0\n[PROOFSTEP]\nclassical\nby_contra h\nhaveI := isIso_of_epi_of_nonzero h\nexact w (eq_zero_of_mono_cokernel f)\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\nX Y : C\ninst✝ : Simple Y\nf : X ⟶ Y\nw : f ≠ 0\n⊢ cokernel.π f = 0\n[PROOFSTEP]\nby_contra h\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\nX Y : C\ninst✝ : Simple Y\nf : X ⟶ Y\nw : f ≠ 0\nh : ¬cokernel.π f = 0\n⊢ False\n[PROOFSTEP]\nhaveI := isIso_of_epi_of_nonzero h\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\nX Y : C\ninst✝ : Simple Y\nf : X ⟶ Y\nw : f ≠ 0\nh : ¬cokernel.π f = 0\nthis : IsIso (cokernel.π f)\n⊢ False\n[PROOFSTEP]\nexact w (eq_zero_of_mono_cokernel f)\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\nX Y : C\ninst✝¹ : Simple X\nf : X ⟶ Y\ninst✝ : Epi f\nw : IsIso f → False\n⊢ f = 0\n[PROOFSTEP]\nclassical\nby_contra h\nexact w (isIso_of_epi_of_nonzero h)\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\nX Y : C\ninst✝¹ : Simple X\nf : X ⟶ Y\ninst✝ : Epi f\nw : IsIso f → False\n⊢ f = 0\n[PROOFSTEP]\nby_contra h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\nX Y : C\ninst✝¹ : Simple X\nf : X ⟶ Y\ninst✝ : Epi f\nw : IsIso f → False\nh : ¬f = 0\n⊢ False\n[PROOFSTEP]\nexact w (isIso_of_epi_of_nonzero h)\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\ninst✝ : HasBinaryBiproducts C\nX Y : C\n⊢ IsIso biprod.inl ↔ IsZero Y\n[PROOFSTEP]\nrw [biprod.isIso_inl_iff_id_eq_fst_comp_inl, ← biprod.total, add_right_eq_self]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\ninst✝ : HasBinaryBiproducts C\nX Y : C\n⊢ biprod.snd ≫ biprod.inr = 0 ↔ IsZero Y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\ninst✝ : HasBinaryBiproducts C\nX Y : C\n⊢ biprod.snd ≫ biprod.inr = 0 → IsZero Y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\ninst✝ : HasBinaryBiproducts C\nX Y : C\nh : biprod.snd ≫ biprod.inr = 0\n⊢ IsZero Y\n[PROOFSTEP]\nreplace h := h =≫ biprod.snd\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\ninst✝ : HasBinaryBiproducts C\nX Y : C\nh : (biprod.snd ≫ biprod.inr) ≫ biprod.snd = 0 ≫ biprod.snd\n⊢ IsZero Y\n[PROOFSTEP]\nsimpa [← IsZero.iff_isSplitEpi_eq_zero (biprod.snd : X ⊞ Y ⟶ Y)] using h\n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\ninst✝ : HasBinaryBiproducts C\nX Y : C\n⊢ IsZero Y → biprod.snd ≫ biprod.inr = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\ninst✝ : HasBinaryBiproducts C\nX Y : C\nh : IsZero Y\n⊢ biprod.snd ≫ biprod.inr = 0\n[PROOFSTEP]\nrw [IsZero.iff_isSplitEpi_eq_zero (biprod.snd : X ⊞ Y ⟶ Y)] at h \n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\ninst✝ : HasBinaryBiproducts C\nX Y : C\nh : biprod.snd = 0\n⊢ biprod.snd ≫ biprod.inr = 0\n[PROOFSTEP]\nrw [h, zero_comp]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Preadditive C\ninst✝¹ : HasBinaryBiproducts C\nX : C\ninst✝ : Simple X\nY Z : C\ni : X ≅ Y ⊞ Z\n⊢ IsZero Y ∨ IsZero Z\n[PROOFSTEP]\nrefine' or_iff_not_imp_left.mpr fun h => _\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Preadditive C\ninst✝¹ : HasBinaryBiproducts C\nX : C\ninst✝ : Simple X\nY Z : C\ni : X ≅ Y ⊞ Z\nh : ¬IsZero Y\n⊢ IsZero Z\n[PROOFSTEP]\nrw [IsZero.iff_isSplitMono_eq_zero (biprod.inl : Y ⟶ Y ⊞ Z)] at h \n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Preadditive C\ninst✝¹ : HasBinaryBiproducts C\nX : C\ninst✝ : Simple X\nY Z : C\ni : X ≅ Y ⊞ Z\nh : ¬biprod.inl = 0\n⊢ IsZero Z\n[PROOFSTEP]\nchange biprod.inl ≠ 0 at h \n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Preadditive C\ninst✝¹ : HasBinaryBiproducts C\nX : C\ninst✝ : Simple X\nY Z : C\ni : X ≅ Y ⊞ Z\nh : biprod.inl ≠ 0\n⊢ IsZero Z\n[PROOFSTEP]\nhave : Simple (Y ⊞ Z) := Simple.of_iso i.symm\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Preadditive C\ninst✝¹ : HasBinaryBiproducts C\nX : C\ninst✝ : Simple X\nY Z : C\ni : X ≅ Y ⊞ Z\nh : biprod.inl ≠ 0\nthis : Simple (Y ⊞ Z)\n⊢ IsZero Z\n[PROOFSTEP]\nrw [← Simple.mono_isIso_iff_nonzero biprod.inl] at h \n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Preadditive C\ninst✝¹ : HasBinaryBiproducts C\nX : C\ninst✝ : Simple X\nY Z : C\ni : X ≅ Y ⊞ Z\nh : IsIso biprod.inl\nthis : Simple (Y ⊞ Z)\n⊢ IsZero Z\n[PROOFSTEP]\nrwa [Biprod.isIso_inl_iff_isZero] at h \n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : Simple X\n⊢ ∀ (a : Subobject X), a = ⊥ ∨ a = ⊤\n[PROOFSTEP]\nrintro ⟨⟨⟨Y : C, ⟨⟨⟩⟩, f : Y ⟶ X⟩, m : Mono f⟩⟩\n[GOAL]\ncase mk.mk.mk.mk.unit\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : Simple X\na✝ : Subobject X\nY : C\nf : Y ⟶ X\nm : Mono f\n⊢ Quot.mk Setoid.r { obj := { left := Y, right := { as := PUnit.unit }, hom := f }, property := m } = ⊥ ∨\n    Quot.mk Setoid.r { obj := { left := Y, right := { as := PUnit.unit }, hom := f }, property := m } = ⊤\n[PROOFSTEP]\nchange mk f = ⊥ ∨ mk f = ⊤\n[GOAL]\ncase mk.mk.mk.mk.unit\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : Simple X\na✝ : Subobject X\nY : C\nf : Y ⟶ X\nm : Mono f\n⊢ mk f = ⊥ ∨ mk f = ⊤\n[PROOFSTEP]\nby_cases h : f = 0\n[GOAL]\ncase pos\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : Simple X\na✝ : Subobject X\nY : C\nf : Y ⟶ X\nm : Mono f\nh : f = 0\n⊢ mk f = ⊥ ∨ mk f = ⊤\n[PROOFSTEP]\nexact Or.inl (mk_eq_bot_iff_zero.mpr h)\n[GOAL]\ncase neg\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : Simple X\na✝ : Subobject X\nY : C\nf : Y ⟶ X\nm : Mono f\nh : ¬f = 0\n⊢ mk f = ⊥ ∨ mk f = ⊤\n[PROOFSTEP]\nrefine' Or.inr ((isIso_iff_mk_eq_top _).mp ((Simple.mono_isIso_iff_nonzero f).mpr h))\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\n⊢ Simple X\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mono_isIso_iff_nonzero\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\n⊢ ∀ {Y : C} (f : Y ⟶ X) [inst : Mono f], IsIso f ↔ f ≠ 0\n[PROOFSTEP]\nintros Y f hf\n[GOAL]\ncase mono_isIso_iff_nonzero\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\nY : C\nf : Y ⟶ X\nhf : Mono f\n⊢ IsIso f ↔ f ≠ 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mono_isIso_iff_nonzero.mp\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\nY : C\nf : Y ⟶ X\nhf : Mono f\n⊢ IsIso f → f ≠ 0\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mono_isIso_iff_nonzero.mp\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\nY : C\nf : Y ⟶ X\nhf : Mono f\ni : IsIso f\n⊢ f ≠ 0\n[PROOFSTEP]\nrw [Subobject.isIso_iff_mk_eq_top] at i \n[GOAL]\ncase mono_isIso_iff_nonzero.mp\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\nY : C\nf : Y ⟶ X\nhf : Mono f\ni : mk f = ⊤\n⊢ f ≠ 0\n[PROOFSTEP]\nintro w\n[GOAL]\ncase mono_isIso_iff_nonzero.mp\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\nY : C\nf : Y ⟶ X\nhf : Mono f\ni : mk f = ⊤\nw : f = 0\n⊢ False\n[PROOFSTEP]\nrw [← Subobject.mk_eq_bot_iff_zero] at w \n[GOAL]\ncase mono_isIso_iff_nonzero.mp\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\nY : C\nf : Y ⟶ X\nhf : Mono f\ni : mk f = ⊤\nw✝ : f = 0\nw : mk f = ⊥\n⊢ False\n[PROOFSTEP]\nexact IsSimpleOrder.bot_ne_top (w.symm.trans i)\n[GOAL]\ncase mono_isIso_iff_nonzero.mpr\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\nY : C\nf : Y ⟶ X\nhf : Mono f\n⊢ f ≠ 0 → IsIso f\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mono_isIso_iff_nonzero.mpr\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\nY : C\nf : Y ⟶ X\nhf : Mono f\ni : f ≠ 0\n⊢ IsIso f\n[PROOFSTEP]\nrcases IsSimpleOrder.eq_bot_or_eq_top (Subobject.mk f) with (h | h)\n[GOAL]\ncase mono_isIso_iff_nonzero.mpr.inl\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\nY : C\nf : Y ⟶ X\nhf : Mono f\ni : f ≠ 0\nh : mk f = ⊥\n⊢ IsIso f\n[PROOFSTEP]\nrw [Subobject.mk_eq_bot_iff_zero] at h \n[GOAL]\ncase mono_isIso_iff_nonzero.mpr.inl\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\nY : C\nf : Y ⟶ X\nhf : Mono f\ni : f ≠ 0\nh✝ : mk f = ⊥\nh : f = 0\n⊢ IsIso f\n[PROOFSTEP]\nexact False.elim (i h)\n[GOAL]\ncase mono_isIso_iff_nonzero.mpr.inr\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroObject C\nX : C\ninst✝ : IsSimpleOrder (Subobject X)\nY : C\nf : Y ⟶ X\nhf : Mono f\ni : f ≠ 0\nh : mk f = ⊤\n⊢ IsIso f\n[PROOFSTEP]\nexact (Subobject.isIso_iff_mk_eq_top _).mpr h\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX : C\n⊢ Simple X → IsSimpleOrder (Subobject X)\n[PROOFSTEP]\nintro h\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX : C\nh : Simple X\n⊢ IsSimpleOrder (Subobject X)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX : C\n⊢ IsSimpleOrder (Subobject X) → Simple X\n[PROOFSTEP]\nintro h\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasZeroObject C\nX : C\nh : IsSimpleOrder (Subobject X)\n⊢ Simple X\n[PROOFSTEP]\nexact simple_of_isSimpleOrder_subobject X\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Simple", "llama_tokens": 10964, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7025300573952052, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.3840999852938992}}
{"text": "[GOAL]\nα✝ : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α✝\ninst✝¹ : TopologicalSpace β\nf : α✝ → β\nα : Type u_3\ninst✝ : TopologicalSpace α\n⊢ IsQuasiSeparated Set.univ ↔ QuasiSeparatedSpace α\n[PROOFSTEP]\nrw [QuasiSeparatedSpace_iff]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α✝\ninst✝¹ : TopologicalSpace β\nf : α✝ → β\nα : Type u_3\ninst✝ : TopologicalSpace α\n⊢ IsQuasiSeparated Set.univ ↔ ∀ (U V : Set α), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)\n[PROOFSTEP]\nsimp [IsQuasiSeparated]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\n⊢ IsQuasiSeparated (f '' s)\n[PROOFSTEP]\nintro U V hU hU' hU'' hV hV' hV''\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ IsCompact (U ∩ V)\n[PROOFSTEP]\nconvert (H (f ⁻¹' U) (f ⁻¹' V) ?_ (h.continuous.1 _ hU') ?_ ?_ (h.continuous.1 _ hV') ?_).image h.continuous\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ U ∩ V = f '' (f ⁻¹' U ∩ f ⁻¹' V)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ f '' (f ⁻¹' U ∩ f ⁻¹' V) = U ∩ V\n[PROOFSTEP]\nrw [← Set.preimage_inter, Set.image_preimage_eq_inter_range, Set.inter_eq_left_iff_subset]\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ U ∩ V ⊆ Set.range f\n[PROOFSTEP]\nexact (Set.inter_subset_left _ _).trans (hU.trans (Set.image_subset_range _ _))\n[GOAL]\ncase convert_1\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ f ⁻¹' U ⊆ s\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase convert_1\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\nx : α\nhx : x ∈ f ⁻¹' U\n⊢ x ∈ s\n[PROOFSTEP]\nrw [← (h.inj.injOn _).mem_image_iff (Set.subset_univ _) trivial]\n[GOAL]\ncase convert_1\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\nx : α\nhx : x ∈ f ⁻¹' U\n⊢ f x ∈ f '' s\n[PROOFSTEP]\nexact hU hx\n[GOAL]\ncase convert_2\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ IsCompact (f ⁻¹' U)\n[PROOFSTEP]\nrw [h.isCompact_iff_isCompact_image]\n[GOAL]\ncase convert_2\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ IsCompact (f '' (f ⁻¹' U))\n[PROOFSTEP]\nconvert hU''\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ f '' (f ⁻¹' U) = U\n[PROOFSTEP]\nrw [Set.image_preimage_eq_inter_range, Set.inter_eq_left_iff_subset]\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ U ⊆ Set.range f\n[PROOFSTEP]\nexact hU.trans (Set.image_subset_range _ _)\n[GOAL]\ncase convert_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ f ⁻¹' V ⊆ s\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase convert_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\nx : α\nhx : x ∈ f ⁻¹' V\n⊢ x ∈ s\n[PROOFSTEP]\nrw [← (h.inj.injOn _).mem_image_iff (Set.subset_univ _) trivial]\n[GOAL]\ncase convert_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\nx : α\nhx : x ∈ f ⁻¹' V\n⊢ f x ∈ f '' s\n[PROOFSTEP]\nexact hV hx\n[GOAL]\ncase convert_4\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ IsCompact (f ⁻¹' V)\n[PROOFSTEP]\nrw [h.isCompact_iff_isCompact_image]\n[GOAL]\ncase convert_4\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ IsCompact (f '' (f ⁻¹' V))\n[PROOFSTEP]\nconvert hV''\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ f '' (f ⁻¹' V) = V\n[PROOFSTEP]\nrw [Set.image_preimage_eq_inter_range, Set.inter_eq_left_iff_subset]\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nH : IsQuasiSeparated s\nh : Embedding f\nU V : Set β\nhU : U ⊆ f '' s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ f '' s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ V ⊆ Set.range f\n[PROOFSTEP]\nexact hV.trans (Set.image_subset_range _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\nh : OpenEmbedding f\ns : Set α\n⊢ IsQuasiSeparated s ↔ IsQuasiSeparated (f '' s)\n[PROOFSTEP]\nrefine' ⟨fun hs => hs.image_of_embedding h.toEmbedding, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\nh : OpenEmbedding f\ns : Set α\n⊢ IsQuasiSeparated (f '' s) → IsQuasiSeparated s\n[PROOFSTEP]\nintro H U V hU hU' hU'' hV hV' hV''\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\nh : OpenEmbedding f\ns : Set α\nH : IsQuasiSeparated (f '' s)\nU V : Set α\nhU : U ⊆ s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ IsCompact (U ∩ V)\n[PROOFSTEP]\nrw [h.toEmbedding.isCompact_iff_isCompact_image, Set.image_inter h.inj]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\nh : OpenEmbedding f\ns : Set α\nH : IsQuasiSeparated (f '' s)\nU V : Set α\nhU : U ⊆ s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ IsCompact (f '' U ∩ f '' V)\n[PROOFSTEP]\nexact\n  H (f '' U) (f '' V) (Set.image_subset _ hU) (h.isOpenMap _ hU') (hU''.image h.continuous) (Set.image_subset _ hV)\n    (h.isOpenMap _ hV') (hV''.image h.continuous)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nhs : IsOpen s\n⊢ IsQuasiSeparated s ↔ QuasiSeparatedSpace ↑s\n[PROOFSTEP]\nrw [← isQuasiSeparated_univ_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nhs : IsOpen s\n⊢ IsQuasiSeparated s ↔ IsQuasiSeparated Set.univ\n[PROOFSTEP]\nconvert (hs.openEmbedding_subtype_val.isQuasiSeparated_iff (s := Set.univ)).symm\n[GOAL]\ncase h.e'_1.h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns : Set α\nhs : IsOpen s\n⊢ s = Subtype.val '' Set.univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nht : IsQuasiSeparated t\nh : s ⊆ t\n⊢ IsQuasiSeparated s\n[PROOFSTEP]\nintro U V hU hU' hU'' hV hV' hV''\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nht : IsQuasiSeparated t\nh : s ⊆ t\nU V : Set α\nhU : U ⊆ s\nhU' : IsOpen U\nhU'' : IsCompact U\nhV : V ⊆ s\nhV' : IsOpen V\nhV'' : IsCompact V\n⊢ IsCompact (U ∩ V)\n[PROOFSTEP]\nexact ht U V (hU.trans h) hU' hU'' (hV.trans h) hV' hV''\n", "meta": {"mathlib_filename": "Mathlib.Topology.QuasiSeparated", "llama_tokens": 4834, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419704455588, "lm_q2_score": 0.5544704649604274, "lm_q1q2_score": 0.3840495154040556}}
{"text": "[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : MonoidAlgebra k G\n⊢ f * (g + h) = f * g + f * h\n[PROOFSTEP]\nhaveI := Classical.decEq G\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : MonoidAlgebra k G\nthis : DecidableEq G\n⊢ f * (g + h) = f * g + f * h\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : MonoidAlgebra k G\nthis : DecidableEq G\n⊢ (sum f fun a₁ b₁ => sum (g + h) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) =\n    (sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) +\n      sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\n[PROOFSTEP]\nrefine Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_add_index ?_ ?_)) ?_\n[GOAL]\ncase refine_1\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : MonoidAlgebra k G\nthis : DecidableEq G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), a ∈ g.support ∪ h.support → single (a₁ * a) (b₁ * 0) = 0\n[PROOFSTEP]\nsimp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]\n[GOAL]\ncase refine_2\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : MonoidAlgebra k G\nthis : DecidableEq G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G),\n    a ∈ g.support ∪ h.support →\n      ∀ (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\n[PROOFSTEP]\nsimp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]\n[GOAL]\ncase refine_3\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : MonoidAlgebra k G\nthis : DecidableEq G\n⊢ (sum f fun a₁ b₁ => (sum g fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) + sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) =\n    (sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) +\n      sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\n[PROOFSTEP]\nsimp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : MonoidAlgebra k G\n⊢ (f + g) * h = f * h + g * h\n[PROOFSTEP]\nhaveI := Classical.decEq G\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : MonoidAlgebra k G\nthis : DecidableEq G\n⊢ (f + g) * h = f * h + g * h\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : MonoidAlgebra k G\nthis : DecidableEq G\n⊢ (sum (f + g) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) =\n    (sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) +\n      sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\n[PROOFSTEP]\nrefine Eq.trans (sum_add_index ?_ ?_) ?_\n[GOAL]\ncase refine_1\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : MonoidAlgebra k G\nthis : DecidableEq G\n⊢ ∀ (a : G), a ∈ f.support ∪ g.support → (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\n[PROOFSTEP]\nsimp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]\n[GOAL]\ncase refine_2\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : MonoidAlgebra k G\nthis : DecidableEq G\n⊢ ∀ (a : G),\n    a ∈ f.support ∪ g.support →\n      ∀ (b₁ b₂ : k),\n        (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n          (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nsimp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]\n[GOAL]\ncase refine_3\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : MonoidAlgebra k G\nthis : DecidableEq G\n⊢ ((sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) +\n      sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) =\n    (sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) +\n      sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\n[PROOFSTEP]\nsimp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf : MonoidAlgebra k G\n⊢ 0 * f = 0\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf : MonoidAlgebra k G\n⊢ (sum 0 fun a₁ b₁ => sum f fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) = 0\n[PROOFSTEP]\nexact sum_zero_index\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf : MonoidAlgebra k G\n⊢ f * 0 = 0\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf : MonoidAlgebra k G\n⊢ (sum f fun a₁ b₁ => sum 0 fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) = 0\n[PROOFSTEP]\nexact Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_zero_index)) sum_zero\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : Mul G\ninst✝¹ : Semiring R\ng_hom : Type u_3\ninst✝ : MulHomClass g_hom G R\nf : k →+* R\ng : g_hom\na b : MonoidAlgebra k G\nh_comm : ∀ {x y : G}, y ∈ a.support → Commute (↑f (↑b x)) (↑g y)\n⊢ ↑(liftNC ↑f ↑g) (a * b) = ↑(liftNC ↑f ↑g) a * ↑(liftNC ↑f ↑g) b\n[PROOFSTEP]\nconv_rhs =>\n  rw [← sum_single a, ← sum_single b]\n    -- Porting note: `(liftNC _ g).map_finsupp_sum` → `map_finsupp_sum`\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : Mul G\ninst✝¹ : Semiring R\ng_hom : Type u_3\ninst✝ : MulHomClass g_hom G R\nf : k →+* R\ng : g_hom\na b : MonoidAlgebra k G\nh_comm : ∀ {x y : G}, y ∈ a.support → Commute (↑f (↑b x)) (↑g y)\n| ↑(liftNC ↑f ↑g) a * ↑(liftNC ↑f ↑g) b\n[PROOFSTEP]\nrw [← sum_single a, ← sum_single b]\n    -- Porting note: `(liftNC _ g).map_finsupp_sum` → `map_finsupp_sum`\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : Mul G\ninst✝¹ : Semiring R\ng_hom : Type u_3\ninst✝ : MulHomClass g_hom G R\nf : k →+* R\ng : g_hom\na b : MonoidAlgebra k G\nh_comm : ∀ {x y : G}, y ∈ a.support → Commute (↑f (↑b x)) (↑g y)\n| ↑(liftNC ↑f ↑g) a * ↑(liftNC ↑f ↑g) b\n[PROOFSTEP]\nrw [← sum_single a, ← sum_single b]\n    -- Porting note: `(liftNC _ g).map_finsupp_sum` → `map_finsupp_sum`\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : Mul G\ninst✝¹ : Semiring R\ng_hom : Type u_3\ninst✝ : MulHomClass g_hom G R\nf : k →+* R\ng : g_hom\na b : MonoidAlgebra k G\nh_comm : ∀ {x y : G}, y ∈ a.support → Commute (↑f (↑b x)) (↑g y)\n| ↑(liftNC ↑f ↑g) a * ↑(liftNC ↑f ↑g) b\n[PROOFSTEP]\nrw [← sum_single a, ← sum_single b]\n  -- Porting note: `(liftNC _ g).map_finsupp_sum` → `map_finsupp_sum`\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : Mul G\ninst✝¹ : Semiring R\ng_hom : Type u_3\ninst✝ : MulHomClass g_hom G R\nf : k →+* R\ng : g_hom\na b : MonoidAlgebra k G\nh_comm : ∀ {x y : G}, y ∈ a.support → Commute (↑f (↑b x)) (↑g y)\n⊢ ↑(liftNC ↑f ↑g) (a * b) = ↑(liftNC ↑f ↑g) (sum a single) * ↑(liftNC ↑f ↑g) (sum b single)\n[PROOFSTEP]\nsimp_rw [mul_def, map_finsupp_sum, liftNC_single, Finsupp.sum_mul, Finsupp.mul_sum]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : Mul G\ninst✝¹ : Semiring R\ng_hom : Type u_3\ninst✝ : MulHomClass g_hom G R\nf : k →+* R\ng : g_hom\na b : MonoidAlgebra k G\nh_comm : ∀ {x y : G}, y ∈ a.support → Commute (↑f (↑b x)) (↑g y)\n⊢ (sum a fun a b_1 => sum b fun a_1 b => ↑↑f (b_1 * b) * ↑g (a * a_1)) =\n    sum a fun a c => sum b fun a_1 c_1 => ↑↑f c * ↑g a * (↑↑f c_1 * ↑g a_1)\n[PROOFSTEP]\nrefine Finset.sum_congr rfl fun y hy => Finset.sum_congr rfl fun x _hx => ?_\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : Mul G\ninst✝¹ : Semiring R\ng_hom : Type u_3\ninst✝ : MulHomClass g_hom G R\nf : k →+* R\ng : g_hom\na b : MonoidAlgebra k G\nh_comm : ∀ {x y : G}, y ∈ a.support → Commute (↑f (↑b x)) (↑g y)\ny : G\nhy : y ∈ a.support\nx : G\n_hx : x ∈ b.support\n⊢ (fun a_1 b => ↑↑f (↑a y * b) * ↑g (y * a_1)) x (↑b x) = (fun a_1 c => ↑↑f (↑a y) * ↑g y * (↑↑f c * ↑g a_1)) x (↑b x)\n[PROOFSTEP]\nsimp [mul_assoc, (h_comm hy).left_comm]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ f * g * h = f * (g * h)\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ (sum (sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) fun a₁ b₁ =>\n      sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) =\n    sum f fun a₁ b₁ =>\n      sum (sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\n[PROOFSTEP]\nrw [sum_sum_index]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ (sum f fun a b =>\n      sum (sum g fun a₂ b₂ => single (a * a₂) (b * b₂)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) =\n    sum f fun a₁ b₁ =>\n      sum (sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ (fun a b =>\n      sum (sum g fun a₂ b₂ => single (a * a₂) (b * b₂)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) =\n    fun a₁ b₁ =>\n    sum (sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\next a₁ b₁\n[GOAL]\ncase e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ (sum (sum g fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) =\n    sum (sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nrw [sum_sum_index, sum_sum_index]\n[GOAL]\ncase e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ (sum g fun a b => sum (single (a₁ * a) (b₁ * b)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) =\n    sum g fun a b => sum (sum h fun a₂ b₂ => single (a * a₂) (b * b₂)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g.h.h.e_g\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ (fun a b => sum (single (a₁ * a) (b₁ * b)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) = fun a b =>\n    sum (sum h fun a₂ b₂ => single (a * a₂) (b * b₂)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\next a₂ b₂\n[GOAL]\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum (single (a₁ * a₂) (b₁ * b₂)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) =\n    sum (sum h fun a₂_1 b₂_1 => single (a₂ * a₂_1) (b₂ * b₂_1)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nrw [sum_sum_index, sum_single_index]\n[GOAL]\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum h fun a₂_1 b₂_1 => single (a₁ * a₂ * a₂_1) (b₁ * b₂ * b₂_1)) =\n    sum h fun a b => sum (single (a₂ * a) (b₂ * b)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum h fun a₂_1 b₂ => single (a₁ * a₂ * a₂_1) (0 * b₂)) = 0\ncase e_g.h.h.e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\ncase e_g.h.h.e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g.h.h.e_g.h.h.e_g\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (fun a₂_1 b₂_1 => single (a₁ * a₂ * a₂_1) (b₁ * b₂ * b₂_1)) = fun a b =>\n    sum (single (a₂ * a) (b₂ * b)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum h fun a₂_1 b₂ => single (a₁ * a₂ * a₂_1) (0 * b₂)) = 0\ncase e_g.h.h.e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\ncase e_g.h.h.e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\next a₃ b₃\n[GOAL]\ncase e_g.h.h.e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\na₃ : G\nb₃ : k\n⊢ single (a₁ * a₂ * a₃) (b₁ * b₂ * b₃) = sum (single (a₂ * a₃) (b₂ * b₃)) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum h fun a₂_1 b₂ => single (a₁ * a₂ * a₂_1) (0 * b₂)) = 0\ncase e_g.h.h.e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\ncase e_g.h.h.e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nrw [sum_single_index, mul_assoc, mul_assoc]\n[GOAL]\ncase e_g.h.h.e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\na₃ : G\nb₃ : k\n⊢ single (a₁ * (a₂ * a₃)) (b₁ * 0) = 0\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum h fun a₂_1 b₂ => single (a₁ * a₂ * a₂_1) (0 * b₂)) = 0\ncase e_g.h.h.e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\ncase e_g.h.h.e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nall_goals simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\na₃ : G\nb₃ : k\n⊢ single (a₁ * (a₂ * a₃)) (b₁ * 0) = 0\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum h fun a₂_1 b₂ => single (a₁ * a₂ * a₂_1) (0 * b₂)) = 0\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ * a) (b₁ * 0) = 0\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ * a) (b₁ * (b₁_1 + b₂)) = single (a₁ * a) (b₁ * b₁_1) + single (a₁ * a) (b₁ * b₂)\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a * a₂) (0 * b₂)) = 0\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Semigroup G\ninst✝ : Semiring R\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : MonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a * a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a * a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a * a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : NonAssocSemiring R\ninst✝² : Semiring k\ninst✝¹ : One G\ng_hom : Type u_3\ninst✝ : OneHomClass g_hom G R\nf : k →+* R\ng : g_hom\n⊢ ↑(liftNC ↑f ↑g) 1 = 1\n[PROOFSTEP]\nsimp [one_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : MulOneClass G\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf : MonoidAlgebra k G\n⊢ 1 * f = f\n[PROOFSTEP]\nsimp only [mul_def, one_def, sum_single_index, zero_mul, single_zero, sum_zero, zero_add, one_mul, sum_single]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : MulOneClass G\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf : MonoidAlgebra k G\n⊢ f * 1 = f\n[PROOFSTEP]\nsimp only [mul_def, one_def, sum_single_index, mul_zero, single_zero, sum_zero, add_zero, mul_one, sum_single]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : MulOneClass G\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\n⊢ NatCast.natCast 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : MulOneClass G\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nx✝ : ℕ\n⊢ NatCast.natCast (x✝ + 1) = NatCast.natCast x✝ + 1\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : MulOneClass G\nsrc✝ : NonUnitalNonAssocSemiring (MonoidAlgebra k G) := nonUnitalNonAssocSemiring\nx✝ : ℕ\n⊢ Finsupp.single 1 ↑x✝ + Finsupp.single 1 1 = single 1 ↑x✝ + 1\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : CommSemiring k\ninst✝ : CommSemigroup G\nsrc✝ : NonUnitalSemiring (MonoidAlgebra k G) := nonUnitalSemiring\nf g : MonoidAlgebra k G\n⊢ f * g = g * f\n[PROOFSTEP]\nsimp only [mul_def, Finsupp.sum, mul_comm]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : CommSemiring k\ninst✝ : CommSemigroup G\nsrc✝ : NonUnitalSemiring (MonoidAlgebra k G) := nonUnitalSemiring\nf g : MonoidAlgebra k G\n⊢ ∑ x in f.support, ∑ x_1 in g.support, single (x * x_1) (↑f x * ↑g x_1) =\n    ∑ x in g.support, ∑ x_1 in f.support, single (x * x_1) (↑f x_1 * ↑g x)\n[PROOFSTEP]\nrw [Finset.sum_comm]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : CommSemiring k\ninst✝ : CommSemigroup G\nsrc✝ : NonUnitalSemiring (MonoidAlgebra k G) := nonUnitalSemiring\nf g : MonoidAlgebra k G\n⊢ ∑ y in g.support, ∑ x in f.support, single (x * y) (↑f x * ↑g y) =\n    ∑ x in g.support, ∑ x_1 in f.support, single (x * x_1) (↑f x_1 * ↑g x)\n[PROOFSTEP]\nsimp only [mul_comm]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Ring k\ninst✝ : MulOneClass G\nsrc✝¹ : AddCommGroup (MonoidAlgebra k G) := addCommGroup\nsrc✝ : NonAssocSemiring (MonoidAlgebra k G) := nonAssocSemiring\nn : ℕ\n⊢ IntCast.intCast ↑n = ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Ring k\ninst✝ : MulOneClass G\nsrc✝¹ : AddCommGroup (MonoidAlgebra k G) := addCommGroup\nsrc✝ : NonAssocSemiring (MonoidAlgebra k G) := nonAssocSemiring\nn : ℕ\n⊢ single 1 ↑n = ↑n\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Ring k\ninst✝ : MulOneClass G\nsrc✝¹ : AddCommGroup (MonoidAlgebra k G) := addCommGroup\nsrc✝ : NonAssocSemiring (MonoidAlgebra k G) := nonAssocSemiring\nn : ℕ\n⊢ IntCast.intCast (Int.negSucc n) = -↑(n + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Ring k\ninst✝ : MulOneClass G\nsrc✝¹ : AddCommGroup (MonoidAlgebra k G) := addCommGroup\nsrc✝ : NonAssocSemiring (MonoidAlgebra k G) := nonAssocSemiring\nn : ℕ\n⊢ -Finsupp.single 1 1 + -Finsupp.single 1 ↑n = -1 + -↑n\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : DecidableEq G\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx : G\n⊢ ↑(f * g) x = sum f fun a₁ b₁ => sum g fun a₂ b₂ => if a₁ * a₂ = x then b₁ * b₂ else 0\n[PROOFSTEP]\nrw [mul_def, Finsupp.sum_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : DecidableEq G\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx : G\n⊢ (sum f fun a₁ b => ↑(sum g fun a₂ b₂ => single (a₁ * a₂) (b * b₂)) x) =\n    sum f fun a₁ b₁ => sum g fun a₂ b₂ => if a₁ * a₂ = x then b₁ * b₂ else 0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : DecidableEq G\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx : G\n⊢ (fun a₁ b => ↑(sum g fun a₂ b₂ => single (a₁ * a₂) (b * b₂)) x) = fun a₁ b₁ =>\n    sum g fun a₂ b₂ => if a₁ * a₂ = x then b₁ * b₂ else 0\n[PROOFSTEP]\next\n[GOAL]\ncase e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : DecidableEq G\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx x✝¹ : G\nx✝ : k\n⊢ ↑(sum g fun a₂ b₂ => single (x✝¹ * a₂) (x✝ * b₂)) x = sum g fun a₂ b₂ => if x✝¹ * a₂ = x then x✝ * b₂ else 0\n[PROOFSTEP]\nrw [Finsupp.sum_apply]\n[GOAL]\ncase e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : DecidableEq G\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx x✝¹ : G\nx✝ : k\n⊢ (sum g fun a₁ b => ↑(single (x✝¹ * a₁) (x✝ * b)) x) = sum g fun a₂ b₂ => if x✝¹ * a₂ = x then x✝ * b₂ else 0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g.h.h.e_g\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : DecidableEq G\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx x✝¹ : G\nx✝ : k\n⊢ (fun a₁ b => ↑(single (x✝¹ * a₁) (x✝ * b)) x) = fun a₂ b₂ => if x✝¹ * a₂ = x then x✝ * b₂ else 0\n[PROOFSTEP]\next\n[GOAL]\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : DecidableEq G\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx x✝³ : G\nx✝² : k\nx✝¹ : G\nx✝ : k\n⊢ ↑(single (x✝³ * x✝¹) (x✝² * x✝)) x = if x✝³ * x✝¹ = x then x✝² * x✝ else 0\n[PROOFSTEP]\napply single_apply\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx : G\ns : Finset (G × G)\nhs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x\n⊢ ↑(f * g) x = ∑ p in s, ↑f p.fst * ↑g p.snd\n[PROOFSTEP]\nclassical exact\n  let F : G × G → k := fun p => if p.1 * p.2 = x then f p.1 * g p.2 else 0\n  calc\n    (f * g) x = ∑ a₁ in f.support, ∑ a₂ in g.support, F (a₁, a₂) := mul_apply f g x\n    _ = ∑ p in f.support ×ˢ g.support, F p := Finset.sum_product.symm\n    _ = ∑ p in (f.support ×ˢ g.support).filter fun p : G × G => p.1 * p.2 = x, f p.1 * g p.2 :=\n      (Finset.sum_filter _ _).symm\n    _ = ∑ p in s.filter fun p : G × G => p.1 ∈ f.support ∧ p.2 ∈ g.support, f p.1 * g p.2 :=\n      (sum_congr\n        (by\n          ext\n          simp only [mem_filter, mem_product, hs, and_comm])\n        fun _ _ => rfl)\n    _ = ∑ p in s, f p.1 * g p.2 :=\n      sum_subset (filter_subset _ _) fun p hps hp =>\n        by\n        simp only [mem_filter, mem_support_iff, not_and, Classical.not_not] at hp ⊢\n        by_cases h1 : f p.1 = 0\n        · rw [h1, zero_mul]\n        · rw [hp hps h1, mul_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx : G\ns : Finset (G × G)\nhs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x\n⊢ ↑(f * g) x = ∑ p in s, ↑f p.fst * ↑g p.snd\n[PROOFSTEP]\nexact\n  let F : G × G → k := fun p => if p.1 * p.2 = x then f p.1 * g p.2 else 0\n  calc\n    (f * g) x = ∑ a₁ in f.support, ∑ a₂ in g.support, F (a₁, a₂) := mul_apply f g x\n    _ = ∑ p in f.support ×ˢ g.support, F p := Finset.sum_product.symm\n    _ = ∑ p in (f.support ×ˢ g.support).filter fun p : G × G => p.1 * p.2 = x, f p.1 * g p.2 :=\n      (Finset.sum_filter _ _).symm\n    _ = ∑ p in s.filter fun p : G × G => p.1 ∈ f.support ∧ p.2 ∈ g.support, f p.1 * g p.2 :=\n      (sum_congr\n        (by\n          ext\n          simp only [mem_filter, mem_product, hs, and_comm])\n        fun _ _ => rfl)\n    _ = ∑ p in s, f p.1 * g p.2 :=\n      sum_subset (filter_subset _ _) fun p hps hp =>\n        by\n        simp only [mem_filter, mem_support_iff, not_and, Classical.not_not] at hp ⊢\n        by_cases h1 : f p.1 = 0\n        · rw [h1, zero_mul]\n        · rw [hp hps h1, mul_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx : G\ns : Finset (G × G)\nhs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x\nF : G × G → k := fun p => if p.fst * p.snd = x then ↑f p.fst * ↑g p.snd else 0\n⊢ Finset.filter (fun p => p.fst * p.snd = x) (f.support ×ˢ g.support) =\n    Finset.filter (fun p => p.fst ∈ f.support ∧ p.snd ∈ g.support) s\n[PROOFSTEP]\next\n[GOAL]\ncase a\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx : G\ns : Finset (G × G)\nhs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x\nF : G × G → k := fun p => if p.fst * p.snd = x then ↑f p.fst * ↑g p.snd else 0\na✝ : G × G\n⊢ a✝ ∈ Finset.filter (fun p => p.fst * p.snd = x) (f.support ×ˢ g.support) ↔\n    a✝ ∈ Finset.filter (fun p => p.fst ∈ f.support ∧ p.snd ∈ g.support) s\n[PROOFSTEP]\nsimp only [mem_filter, mem_product, hs, and_comm]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx : G\ns : Finset (G × G)\nhs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x\nF : G × G → k := fun p => if p.fst * p.snd = x then ↑f p.fst * ↑g p.snd else 0\np : G × G\nhps : p ∈ s\nhp : ¬p ∈ Finset.filter (fun p => p.fst ∈ f.support ∧ p.snd ∈ g.support) s\n⊢ ↑f p.fst * ↑g p.snd = 0\n[PROOFSTEP]\nsimp only [mem_filter, mem_support_iff, not_and, Classical.not_not] at hp ⊢\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx : G\ns : Finset (G × G)\nhs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x\nF : G × G → k := fun p => if p.fst * p.snd = x then ↑f p.fst * ↑g p.snd else 0\np : G × G\nhps : p ∈ s\nhp : p ∈ s → ↑f p.fst ≠ 0 → ↑g p.snd = 0\n⊢ ↑f p.fst * ↑g p.snd = 0\n[PROOFSTEP]\nby_cases h1 : f p.1 = 0\n[GOAL]\ncase pos\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx : G\ns : Finset (G × G)\nhs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x\nF : G × G → k := fun p => if p.fst * p.snd = x then ↑f p.fst * ↑g p.snd else 0\np : G × G\nhps : p ∈ s\nhp : p ∈ s → ↑f p.fst ≠ 0 → ↑g p.snd = 0\nh1 : ↑f p.fst = 0\n⊢ ↑f p.fst * ↑g p.snd = 0\n[PROOFSTEP]\nrw [h1, zero_mul]\n[GOAL]\ncase neg\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf g : MonoidAlgebra k G\nx : G\ns : Finset (G × G)\nhs : ∀ {p : G × G}, p ∈ s ↔ p.fst * p.snd = x\nF : G × G → k := fun p => if p.fst * p.snd = x then ↑f p.fst * ↑g p.snd else 0\np : G × G\nhps : p ∈ s\nhp : p ∈ s → ↑f p.fst ≠ 0 → ↑g p.snd = 0\nh1 : ¬↑f p.fst = 0\n⊢ ↑f p.fst * ↑g p.snd = 0\n[PROOFSTEP]\nrw [hp hps h1, mul_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\na₁ a₂ : G\nb₁ b₂ : k\n⊢ (sum (single a₂ b₂) fun a₂ b₂ => single (a₁ * a₂) (0 * b₂)) = 0\n[PROOFSTEP]\nsimp only [zero_mul, single_zero, sum_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\na₁ a₂ : G\nb₁ b₂ : k\n⊢ single (a₁ * a₂) (b₁ * 0) = 0\n[PROOFSTEP]\nrw [mul_zero, single_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\na : G\nb : k\n⊢ single a b ^ 0 = single (a ^ 0) (b ^ 0)\n[PROOFSTEP]\nsimp only [pow_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\na : G\nb : k\n⊢ 1 = single 1 1\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\na : G\nb : k\nn : ℕ\n⊢ single a b ^ (n + 1) = single (a ^ (n + 1)) (b ^ (n + 1))\n[PROOFSTEP]\nsimp only [pow_succ, single_pow n, single_mul_single]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : One α\ninst✝¹ : One α₂\nF : Type u_6\ninst✝ : OneHomClass F α α₂\nf : F\n⊢ mapDomain (↑f) 1 = 1\n[PROOFSTEP]\nsimp_rw [one_def, mapDomain_single, map_one]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Mul α\ninst✝¹ : Mul α₂\nF : Type u_6\ninst✝ : MulHomClass F α α₂\nf : F\nx y : MonoidAlgebra β α\n⊢ mapDomain (↑f) (x * y) = mapDomain (↑f) x * mapDomain (↑f) y\n[PROOFSTEP]\nsimp_rw [mul_def, mapDomain_sum, mapDomain_single, map_mul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Mul α\ninst✝¹ : Mul α₂\nF : Type u_6\ninst✝ : MulHomClass F α α₂\nf : F\nx y : MonoidAlgebra β α\n⊢ (sum x fun a b => sum y fun a_1 b_1 => Finsupp.single (↑f a * ↑f a_1) (b * b_1)) =\n    sum (mapDomain (↑f) x) fun a₁ b₁ => sum (mapDomain (↑f) y) fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)\n[PROOFSTEP]\nrw [Finsupp.sum_mapDomain_index]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Mul α\ninst✝¹ : Mul α₂\nF : Type u_6\ninst✝ : MulHomClass F α α₂\nf : F\nx y : MonoidAlgebra β α\n⊢ (sum x fun a b => sum y fun a_1 b_1 => Finsupp.single (↑f a * ↑f a_1) (b * b_1)) =\n    sum x fun a m => sum (mapDomain (↑f) y) fun a₂ b₂ => single (↑f a * a₂) (m * b₂)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Mul α\ninst✝¹ : Mul α₂\nF : Type u_6\ninst✝ : MulHomClass F α α₂\nf : F\nx y : MonoidAlgebra β α\n⊢ (fun a b => sum y fun a_1 b_1 => Finsupp.single (↑f a * ↑f a_1) (b * b_1)) = fun a m =>\n    sum (mapDomain (↑f) y) fun a₂ b₂ => single (↑f a * a₂) (m * b₂)\n[PROOFSTEP]\next a b\n[GOAL]\ncase e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Mul α\ninst✝¹ : Mul α₂\nF : Type u_6\ninst✝ : MulHomClass F α α₂\nf : F\nx y : MonoidAlgebra β α\na : α\nb : β\n⊢ (sum y fun a_1 b_1 => Finsupp.single (↑f a * ↑f a_1) (b * b_1)) =\n    sum (mapDomain (↑f) y) fun a₂ b₂ => single (↑f a * a₂) (b * b₂)\n[PROOFSTEP]\nrw [Finsupp.sum_mapDomain_index]\n[GOAL]\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Mul α\ninst✝¹ : Mul α₂\nF : Type u_6\ninst✝ : MulHomClass F α α₂\nf : F\nx y : MonoidAlgebra β α\na : α\nb : β\n⊢ ∀ (b_1 : α₂), single (↑f a * b_1) (b * 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Mul α\ninst✝¹ : Mul α₂\nF : Type u_6\ninst✝ : MulHomClass F α α₂\nf : F\nx y : MonoidAlgebra β α\na : α\nb : β\n⊢ ∀ (b_1 : α₂) (m₁ m₂ : β),\n    single (↑f a * b_1) (b * (m₁ + m₂)) = single (↑f a * b_1) (b * m₁) + single (↑f a * b_1) (b * m₂)\n[PROOFSTEP]\nsimp [mul_add]\n[GOAL]\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Mul α\ninst✝¹ : Mul α₂\nF : Type u_6\ninst✝ : MulHomClass F α α₂\nf : F\nx y : MonoidAlgebra β α\n⊢ ∀ (b : α₂), (sum (mapDomain (↑f) y) fun a₂ b₂ => single (b * a₂) (0 * b₂)) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Mul α\ninst✝¹ : Mul α₂\nF : Type u_6\ninst✝ : MulHomClass F α α₂\nf : F\nx y : MonoidAlgebra β α\n⊢ ∀ (b : α₂) (m₁ m₂ : β),\n    (sum (mapDomain (↑f) y) fun a₂ b₂ => single (b * a₂) ((m₁ + m₂) * b₂)) =\n      (sum (mapDomain (↑f) y) fun a₂ b₂ => single (b * a₂) (m₁ * b₂)) +\n        sum (mapDomain (↑f) y) fun a₂ b₂ => single (b * a₂) (m₂ * b₂)\n[PROOFSTEP]\nsimp [add_mul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\na b : G\n⊢ (fun a => single a 1) (a * b) = (fun a => single a 1) a * (fun a => single a 1) b\n[PROOFSTEP]\nsimp only [mul_def, mul_one, sum_single_index, single_eq_zero, mul_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : MulOneClass G\ng : G\nr : k\n⊢ r • ↑(of k G) g = single g r\n[PROOFSTEP]\nrw [of_apply, smul_single', mul_one]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : MulOneClass G\ninst✝ : Nontrivial k\na b : G\nh : ↑(of k G) a = ↑(of k G) b\n⊢ a = b\n[PROOFSTEP]\nsimpa using (single_eq_single_iff _ _ _ _).mp h\n[GOAL]\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), a * x = z ↔ a = y\n⊢ ↑(f * single x r) z = ↑f y * r\n[PROOFSTEP]\nclassical exact\n  have A : ∀ a₁ b₁, ((single x r).sum fun a₂ b₂ => ite (a₁ * a₂ = z) (b₁ * b₂) 0) = ite (a₁ * x = z) (b₁ * r) 0 :=\n    fun a₁ b₁ => sum_single_index <| by simp\n  calc\n    (HMul.hMul (β := MonoidAlgebra k G) f (single x r)) z = sum f fun a b => if a = y then b * r else 0 := by\n      simp only [mul_apply, A, H]\n    _ = if y ∈ f.support then f y * r else 0 := (f.support.sum_ite_eq' _ _)\n    _ = f y * r := by split_ifs with h <;> simp at h  <;> simp [h]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), a * x = z ↔ a = y\n⊢ ↑(f * single x r) z = ↑f y * r\n[PROOFSTEP]\nexact\n  have A : ∀ a₁ b₁, ((single x r).sum fun a₂ b₂ => ite (a₁ * a₂ = z) (b₁ * b₂) 0) = ite (a₁ * x = z) (b₁ * r) 0 :=\n    fun a₁ b₁ => sum_single_index <| by simp\n  calc\n    (HMul.hMul (β := MonoidAlgebra k G) f (single x r)) z = sum f fun a b => if a = y then b * r else 0 := by\n      simp only [mul_apply, A, H]\n    _ = if y ∈ f.support then f y * r else 0 := (f.support.sum_ite_eq' _ _)\n    _ = f y * r := by split_ifs with h <;> simp at h  <;> simp [h]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), a * x = z ↔ a = y\na₁ : G\nb₁ : k\n⊢ (if a₁ * x = z then b₁ * 0 else 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), a * x = z ↔ a = y\nA :\n  ∀ (a₁ : G) (b₁ : k),\n    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0\n⊢ ↑(f * single x r) z = sum f fun a b => if a = y then b * r else 0\n[PROOFSTEP]\nsimp only [mul_apply, A, H]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), a * x = z ↔ a = y\nA :\n  ∀ (a₁ : G) (b₁ : k),\n    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0\n⊢ (if y ∈ f.support then ↑f y * r else 0) = ↑f y * r\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), a * x = z ↔ a = y\nA :\n  ∀ (a₁ : G) (b₁ : k),\n    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0\nh : y ∈ f.support\n⊢ ↑f y * r = ↑f y * r\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase neg\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), a * x = z ↔ a = y\nA :\n  ∀ (a₁ : G) (b₁ : k),\n    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0\nh : ¬y ∈ f.support\n⊢ 0 = ↑f y * r\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase pos\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), a * x = z ↔ a = y\nA :\n  ∀ (a₁ : G) (b₁ : k),\n    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0\nh : ¬↑f y = 0\n⊢ ↑f y * r = ↑f y * r\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), a * x = z ↔ a = y\nA :\n  ∀ (a₁ : G) (b₁ : k),\n    (sum (single x r) fun a₂ b₂ => if a₁ * a₂ = z then b₁ * b₂ else 0) = if a₁ * x = z then b₁ * r else 0\nh : ↑f y = 0\n⊢ 0 = ↑f y * r\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : MulOneClass G\nf : MonoidAlgebra k G\nr : k\nx a : G\n⊢ a * 1 = x ↔ a = x\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = d * g\n⊢ ↑(x * single g r) g' = 0\n[PROOFSTEP]\nclassical\nrw [mul_apply, Finsupp.sum_comm, Finsupp.sum_single_index]\nswap\n· simp_rw [Finsupp.sum, mul_zero, ite_self, Finset.sum_const_zero]\n· apply Finset.sum_eq_zero\n  simp_rw [ite_eq_right_iff]\n  rintro g'' _hg'' rfl\n  exfalso\n  exact h ⟨_, rfl⟩\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = d * g\n⊢ ↑(x * single g r) g' = 0\n[PROOFSTEP]\nrw [mul_apply, Finsupp.sum_comm, Finsupp.sum_single_index]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = d * g\n⊢ (sum x fun x v => if x * g = g' then v * r else 0) = 0\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = d * g\n⊢ (sum x fun x v => if x * g = g' then v * 0 else 0) = 0\n[PROOFSTEP]\nswap\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = d * g\n⊢ (sum x fun x v => if x * g = g' then v * 0 else 0) = 0\n[PROOFSTEP]\nsimp_rw [Finsupp.sum, mul_zero, ite_self, Finset.sum_const_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = d * g\n⊢ (sum x fun x v => if x * g = g' then v * r else 0) = 0\n[PROOFSTEP]\napply Finset.sum_eq_zero\n[GOAL]\ncase h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = d * g\n⊢ ∀ (x_1 : G), x_1 ∈ x.support → (fun x v => if x * g = g' then v * r else 0) x_1 (↑x x_1) = 0\n[PROOFSTEP]\nsimp_rw [ite_eq_right_iff]\n[GOAL]\ncase h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = d * g\n⊢ ∀ (x_1 : G), x_1 ∈ x.support → x_1 * g = g' → ↑x x_1 * r = 0\n[PROOFSTEP]\nrintro g'' _hg'' rfl\n[GOAL]\ncase h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng : G\nx : MonoidAlgebra k G\ng'' : G\n_hg'' : g'' ∈ x.support\nh : ¬∃ d, g'' * g = d * g\n⊢ ↑x g'' * r = 0\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng : G\nx : MonoidAlgebra k G\ng'' : G\n_hg'' : g'' ∈ x.support\nh : ¬∃ d, g'' * g = d * g\n⊢ False\n[PROOFSTEP]\nexact h ⟨_, rfl⟩\n[GOAL]\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), x * a = y ↔ a = z\n⊢ ↑(single x r * f) y = r * ↑f z\n[PROOFSTEP]\nclassical exact\n  have : (f.sum fun a b => ite (x * a = y) (0 * b) 0) = 0 := by simp\n  calc\n    (HMul.hMul (α := MonoidAlgebra k G) (single x r) f) y = sum f fun a b => ite (x * a = y) (r * b) 0 :=\n      (mul_apply _ _ _).trans <| sum_single_index this\n    _ = f.sum fun a b => ite (a = z) (r * b) 0 := by simp only [H]\n    _ = if z ∈ f.support then r * f z else 0 := (f.support.sum_ite_eq' _ _)\n    _ = _ := by split_ifs with h <;> simp at h  <;> simp [h]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), x * a = y ↔ a = z\n⊢ ↑(single x r * f) y = r * ↑f z\n[PROOFSTEP]\nexact\n  have : (f.sum fun a b => ite (x * a = y) (0 * b) 0) = 0 := by simp\n  calc\n    (HMul.hMul (α := MonoidAlgebra k G) (single x r) f) y = sum f fun a b => ite (x * a = y) (r * b) 0 :=\n      (mul_apply _ _ _).trans <| sum_single_index this\n    _ = f.sum fun a b => ite (a = z) (r * b) 0 := by simp only [H]\n    _ = if z ∈ f.support then r * f z else 0 := (f.support.sum_ite_eq' _ _)\n    _ = _ := by split_ifs with h <;> simp at h  <;> simp [h]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), x * a = y ↔ a = z\n⊢ (sum f fun a b => if x * a = y then 0 * b else 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), x * a = y ↔ a = z\nthis : (sum f fun a b => if x * a = y then 0 * b else 0) = 0\n⊢ (sum f fun a b => if x * a = y then r * b else 0) = sum f fun a b => if a = z then r * b else 0\n[PROOFSTEP]\nsimp only [H]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), x * a = y ↔ a = z\nthis : (sum f fun a b => if x * a = y then 0 * b else 0) = 0\n⊢ (if z ∈ f.support then r * ↑f z else 0) = r * ↑f z\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), x * a = y ↔ a = z\nthis : (sum f fun a b => if x * a = y then 0 * b else 0) = 0\nh : z ∈ f.support\n⊢ r * ↑f z = r * ↑f z\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase neg\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), x * a = y ↔ a = z\nthis : (sum f fun a b => if x * a = y then 0 * b else 0) = 0\nh : ¬z ∈ f.support\n⊢ 0 = r * ↑f z\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase pos\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), x * a = y ↔ a = z\nthis : (sum f fun a b => if x * a = y then 0 * b else 0) = 0\nh : ¬↑f z = 0\n⊢ r * ↑f z = r * ↑f z\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nf : MonoidAlgebra k G\nr : k\nx y z : G\nH : ∀ (a : G), x * a = y ↔ a = z\nthis : (sum f fun a b => if x * a = y then 0 * b else 0) = 0\nh : ↑f z = 0\n⊢ 0 = r * ↑f z\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : MulOneClass G\nf : MonoidAlgebra k G\nr : k\nx a : G\n⊢ 1 * a = x ↔ a = x\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = g * d\n⊢ ↑(single g r * x) g' = 0\n[PROOFSTEP]\nclassical\nrw [mul_apply, Finsupp.sum_single_index]\nswap\n· simp_rw [Finsupp.sum, zero_mul, ite_self, Finset.sum_const_zero]\n· apply Finset.sum_eq_zero\n  simp_rw [ite_eq_right_iff]\n  rintro g'' _hg'' rfl\n  exfalso\n  exact h ⟨_, rfl⟩\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = g * d\n⊢ ↑(single g r * x) g' = 0\n[PROOFSTEP]\nrw [mul_apply, Finsupp.sum_single_index]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = g * d\n⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then r * b₂ else 0) = 0\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = g * d\n⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then 0 * b₂ else 0) = 0\n[PROOFSTEP]\nswap\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = g * d\n⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then 0 * b₂ else 0) = 0\n[PROOFSTEP]\nsimp_rw [Finsupp.sum, zero_mul, ite_self, Finset.sum_const_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = g * d\n⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then r * b₂ else 0) = 0\n[PROOFSTEP]\napply Finset.sum_eq_zero\n[GOAL]\ncase h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = g * d\n⊢ ∀ (x_1 : G), x_1 ∈ x.support → (fun a₂ b₂ => if g * a₂ = g' then r * b₂ else 0) x_1 (↑x x_1) = 0\n[PROOFSTEP]\nsimp_rw [ite_eq_right_iff]\n[GOAL]\ncase h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng g' : G\nx : MonoidAlgebra k G\nh : ¬∃ d, g' = g * d\n⊢ ∀ (x_1 : G), x_1 ∈ x.support → g * x_1 = g' → r * ↑x x_1 = 0\n[PROOFSTEP]\nrintro g'' _hg'' rfl\n[GOAL]\ncase h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng : G\nx : MonoidAlgebra k G\ng'' : G\n_hg'' : g'' ∈ x.support\nh : ¬∃ d, g * g'' = g * d\n⊢ r * ↑x g'' = 0\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nr : k\ng : G\nx : MonoidAlgebra k G\ng'' : G\n_hg'' : g'' ∈ x.support\nh : ¬∃ d, g * g'' = g * d\n⊢ False\n[PROOFSTEP]\nexact h ⟨_, rfl⟩\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR✝ : Type u_2\ninst✝² : Semiring k\ninst✝¹ : MulOneClass G\nR : Type u_3\ninst✝ : Semiring R\nf : k →+* R\ng : G →* R\nc : k\nφ : MonoidAlgebra k G\n⊢ ↑(liftNC ↑f ↑g) (c • φ) = ↑f c * ↑(liftNC ↑f ↑g) φ\n[PROOFSTEP]\nsuffices : (liftNC (↑f) g).comp (smulAddHom k (MonoidAlgebra k G) c) = (AddMonoidHom.mulLeft (f c)).comp (liftNC (↑f) g)\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR✝ : Type u_2\ninst✝² : Semiring k\ninst✝¹ : MulOneClass G\nR : Type u_3\ninst✝ : Semiring R\nf : k →+* R\ng : G →* R\nc : k\nφ : MonoidAlgebra k G\nthis :\n  AddMonoidHom.comp (liftNC ↑f ↑g) (↑(smulAddHom k (MonoidAlgebra k G)) c) =\n    AddMonoidHom.comp (AddMonoidHom.mulLeft (↑f c)) (liftNC ↑f ↑g)\n⊢ ↑(liftNC ↑f ↑g) (c • φ) = ↑f c * ↑(liftNC ↑f ↑g) φ\ncase this\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR✝ : Type u_2\ninst✝² : Semiring k\ninst✝¹ : MulOneClass G\nR : Type u_3\ninst✝ : Semiring R\nf : k →+* R\ng : G →* R\nc : k\nφ : MonoidAlgebra k G\n⊢ AddMonoidHom.comp (liftNC ↑f ↑g) (↑(smulAddHom k (MonoidAlgebra k G)) c) =\n    AddMonoidHom.comp (AddMonoidHom.mulLeft (↑f c)) (liftNC ↑f ↑g)\n[PROOFSTEP]\nexact FunLike.congr_fun this φ\n[GOAL]\ncase this\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR✝ : Type u_2\ninst✝² : Semiring k\ninst✝¹ : MulOneClass G\nR : Type u_3\ninst✝ : Semiring R\nf : k →+* R\ng : G →* R\nc : k\nφ : MonoidAlgebra k G\n⊢ AddMonoidHom.comp (liftNC ↑f ↑g) (↑(smulAddHom k (MonoidAlgebra k G)) c) =\n    AddMonoidHom.comp (AddMonoidHom.mulLeft (↑f c)) (liftNC ↑f ↑g)\n[PROOFSTEP]\nrefine\n  addHom_ext' fun a =>\n    AddMonoidHom.ext fun b =>\n      ?_\n        -- Porting note: `reducible` cannot be `local` so the proof gets more complex.\n[GOAL]\ncase this\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR✝ : Type u_2\ninst✝² : Semiring k\ninst✝¹ : MulOneClass G\nR : Type u_3\ninst✝ : Semiring R\nf : k →+* R\ng : G →* R\nc : k\nφ : MonoidAlgebra k G\na : G\nb : k\n⊢ ↑(AddMonoidHom.comp (AddMonoidHom.comp (liftNC ↑f ↑g) (↑(smulAddHom k (MonoidAlgebra k G)) c)) (singleAddHom a)) b =\n    ↑(AddMonoidHom.comp (AddMonoidHom.comp (AddMonoidHom.mulLeft (↑f c)) (liftNC ↑f ↑g)) (singleAddHom a)) b\n[PROOFSTEP]\nunfold MonoidAlgebra\n[GOAL]\ncase this\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR✝ : Type u_2\ninst✝² : Semiring k\ninst✝¹ : MulOneClass G\nR : Type u_3\ninst✝ : Semiring R\nf : k →+* R\ng : G →* R\nc : k\nφ : MonoidAlgebra k G\na : G\nb : k\n⊢ ↑(AddMonoidHom.comp (AddMonoidHom.comp (liftNC ↑f ↑g) (↑(smulAddHom k (G →₀ k)) c)) (singleAddHom a)) b =\n    ↑(AddMonoidHom.comp (AddMonoidHom.comp (AddMonoidHom.mulLeft (↑f c)) (liftNC ↑f ↑g)) (singleAddHom a)) b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase this\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR✝ : Type u_2\ninst✝² : Semiring k\ninst✝¹ : MulOneClass G\nR : Type u_3\ninst✝ : Semiring R\nf : k →+* R\ng : G →* R\nc : k\nφ : MonoidAlgebra k G\na : G\nb : k\n⊢ ↑(liftNC ↑f ↑g) (Finsupp.single a (c * b)) = ↑f c * ↑(liftNC ↑f ↑g) (Finsupp.single a b)\n[PROOFSTEP]\nrw [liftNC_single, liftNC_single, AddMonoidHom.coe_coe, map_mul, mul_assoc]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : IsScalarTower R k k\nt : R\na b : MonoidAlgebra k G\n⊢ (t • a) • b = t • a • b\n[PROOFSTEP]\nrefine\n  Finsupp.ext fun m =>\n    ?_\n      -- Porting note: `refine` & `rw` are required because `simp` behaves differently.\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : IsScalarTower R k k\nt : R\na b : MonoidAlgebra k G\nm : G\n⊢ ↑((t • a) • b) m = ↑(t • a • b) m\n[PROOFSTEP]\nclassical\nsimp only [smul_eq_mul, mul_apply]\nrw [coe_smul]\nrefine Eq.trans (sum_smul_index' (g := a) (b := t) ?_) ?_ <;>\n  simp only [mul_apply, Finsupp.smul_sum, smul_ite, smul_mul_assoc, zero_mul, ite_self, imp_true_iff, sum_zero,\n    Pi.smul_apply, smul_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : IsScalarTower R k k\nt : R\na b : MonoidAlgebra k G\nm : G\n⊢ ↑((t • a) • b) m = ↑(t • a • b) m\n[PROOFSTEP]\nsimp only [smul_eq_mul, mul_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : IsScalarTower R k k\nt : R\na b : MonoidAlgebra k G\nm : G\n⊢ (sum (t • a) fun a₁ b₁ => sum b fun a₂ b₂ => if a₁ * a₂ = m then b₁ * b₂ else 0) = ↑(t • (a * b)) m\n[PROOFSTEP]\nrw [coe_smul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : IsScalarTower R k k\nt : R\na b : MonoidAlgebra k G\nm : G\n⊢ (sum (t • a) fun a₁ b₁ => sum b fun a₂ b₂ => if a₁ * a₂ = m then b₁ * b₂ else 0) = (t • ↑(a * b)) m\n[PROOFSTEP]\nrefine Eq.trans (sum_smul_index' (g := a) (b := t) ?_) ?_\n[GOAL]\ncase refine_1\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : IsScalarTower R k k\nt : R\na b : MonoidAlgebra k G\nm : G\n⊢ ∀ (i : G), (sum b fun a₂ b₂ => if i * a₂ = m then 0 * b₂ else 0) = 0\n[PROOFSTEP]\nsimp only [mul_apply, Finsupp.smul_sum, smul_ite, smul_mul_assoc, zero_mul, ite_self, imp_true_iff, sum_zero,\n  Pi.smul_apply, smul_zero]\n[GOAL]\ncase refine_2\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : IsScalarTower R k k\nt : R\na b : MonoidAlgebra k G\nm : G\n⊢ (sum a fun i c => sum b fun a₂ b₂ => if i * a₂ = m then t • c * b₂ else 0) = (t • ↑(a * b)) m\n[PROOFSTEP]\nsimp only [mul_apply, Finsupp.smul_sum, smul_ite, smul_mul_assoc, zero_mul, ite_self, imp_true_iff, sum_zero,\n  Pi.smul_apply, smul_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : SMulCommClass R k k\nt : R\na b : MonoidAlgebra k G\n⊢ t • a • b = a • t • b\n[PROOFSTEP]\nrefine\n  Finsupp.ext fun m =>\n    ?_\n      -- Porting note: `refine` & `rw` are required because `simp` behaves differently.\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : SMulCommClass R k k\nt : R\na b : MonoidAlgebra k G\nm : G\n⊢ ↑(t • a • b) m = ↑(a • t • b) m\n[PROOFSTEP]\nclassical\nsimp only [smul_eq_mul, mul_apply]\nrw [coe_smul]\nrefine Eq.symm (Eq.trans (congr_arg (sum a) (funext₂ fun a₁ b₁ => sum_smul_index' (g := b) (b := t) ?_)) ?_) <;>\n  simp only [mul_apply, Finsupp.sum, Finset.smul_sum, smul_ite, mul_smul_comm, imp_true_iff, ite_eq_right_iff,\n    Pi.smul_apply, mul_zero, smul_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : SMulCommClass R k k\nt : R\na b : MonoidAlgebra k G\nm : G\n⊢ ↑(t • a • b) m = ↑(a • t • b) m\n[PROOFSTEP]\nsimp only [smul_eq_mul, mul_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : SMulCommClass R k k\nt : R\na b : MonoidAlgebra k G\nm : G\n⊢ ↑(t • (a * b)) m = sum a fun a₁ b₁ => sum (t • b) fun a₂ b₂ => if a₁ * a₂ = m then b₁ * b₂ else 0\n[PROOFSTEP]\nrw [coe_smul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : SMulCommClass R k k\nt : R\na b : MonoidAlgebra k G\nm : G\n⊢ (t • ↑(a * b)) m = sum a fun a₁ b₁ => sum (t • b) fun a₂ b₂ => if a₁ * a₂ = m then b₁ * b₂ else 0\n[PROOFSTEP]\nrefine Eq.symm (Eq.trans (congr_arg (sum a) (funext₂ fun a₁ b₁ => sum_smul_index' (g := b) (b := t) ?_)) ?_)\n[GOAL]\ncase refine_1\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : SMulCommClass R k k\nt : R\na b : MonoidAlgebra k G\nm a₁ : G\nb₁ : k\n⊢ ∀ (i : G), (if a₁ * i = m then b₁ * 0 else 0) = 0\n[PROOFSTEP]\nsimp only [mul_apply, Finsupp.sum, Finset.smul_sum, smul_ite, mul_smul_comm, imp_true_iff, ite_eq_right_iff,\n  Pi.smul_apply, mul_zero, smul_zero]\n[GOAL]\ncase refine_2\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : SMulCommClass R k k\nt : R\na b : MonoidAlgebra k G\nm : G\n⊢ (sum a fun a₁ b₁ => sum b fun i c => if a₁ * i = m then b₁ * t • c else 0) = (t • ↑(a * b)) m\n[PROOFSTEP]\nsimp only [mul_apply, Finsupp.sum, Finset.smul_sum, smul_ite, mul_smul_comm, imp_true_iff, ite_eq_right_iff,\n  Pi.smul_apply, mul_zero, smul_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : SMulCommClass k R k\nt : MonoidAlgebra k G\na : R\nb : MonoidAlgebra k G\n⊢ t • a • b = a • t • b\n[PROOFSTEP]\nhaveI := SMulCommClass.symm k R k\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : Semiring k\ninst✝² : DistribSMul R k\ninst✝¹ : Mul G\ninst✝ : SMulCommClass k R k\nt : MonoidAlgebra k G\na : R\nb : MonoidAlgebra k G\nthis : SMulCommClass R k k\n⊢ t • a • b = a • t • b\n[PROOFSTEP]\nrw [← smul_comm]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\nt' : k\na : MonoidAlgebra k G\n⊢ (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a\n[PROOFSTEP]\ndsimp only []\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\nt' : k\na : MonoidAlgebra k G\n⊢ (sum (t' • a) fun m t => t • ↑f m) = t' • sum a fun m t => t • ↑f m\n[PROOFSTEP]\nrw [Finsupp.smul_sum, sum_smul_index']\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\nt' : k\na : MonoidAlgebra k G\n⊢ (sum a fun i c => (t' • c) • ↑f i) = sum a fun a b => t' • b • ↑f a\n[PROOFSTEP]\nsimp_rw [smul_assoc]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\nt' : k\na : MonoidAlgebra k G\n⊢ ∀ (i : G), 0 • ↑f i = 0\n[PROOFSTEP]\nintro m\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\nt' : k\na : MonoidAlgebra k G\nm : G\n⊢ 0 • ↑f m = 0\n[PROOFSTEP]\nexact zero_smul k (f m)\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\n⊢ MulActionHom.toFun\n      {\n          toMulActionHom :=\n            { toFun := fun a => sum a fun m t => t • ↑f m,\n              map_smul' :=\n                (_ :\n                  ∀ (t' : k) (a : MonoidAlgebra k G),\n                    (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n          map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),\n          map_add' :=\n            (_ :\n              ∀ (x y : G →₀ k),\n                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom\n      (a₁ * a₂) =\n    MulActionHom.toFun\n        {\n            toMulActionHom :=\n              { toFun := fun a => sum a fun m t => t • ↑f m,\n                map_smul' :=\n                  (_ :\n                    ∀ (t' : k) (a : MonoidAlgebra k G),\n                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : G →₀ k),\n                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom\n        a₁ *\n      MulActionHom.toFun\n        {\n            toMulActionHom :=\n              { toFun := fun a => sum a fun m t => t • ↑f m,\n                map_smul' :=\n                  (_ :\n                    ∀ (t' : k) (a : MonoidAlgebra k G),\n                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : G →₀ k),\n                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom\n        a₂\n[PROOFSTEP]\nlet g : G → k → A := fun m t => t • f m\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\n⊢ MulActionHom.toFun\n      {\n          toMulActionHom :=\n            { toFun := fun a => sum a fun m t => t • ↑f m,\n              map_smul' :=\n                (_ :\n                  ∀ (t' : k) (a : MonoidAlgebra k G),\n                    (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n          map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),\n          map_add' :=\n            (_ :\n              ∀ (x y : G →₀ k),\n                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom\n      (a₁ * a₂) =\n    MulActionHom.toFun\n        {\n            toMulActionHom :=\n              { toFun := fun a => sum a fun m t => t • ↑f m,\n                map_smul' :=\n                  (_ :\n                    ∀ (t' : k) (a : MonoidAlgebra k G),\n                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : G →₀ k),\n                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom\n        a₁ *\n      MulActionHom.toFun\n        {\n            toMulActionHom :=\n              { toFun := fun a => sum a fun m t => t • ↑f m,\n                map_smul' :=\n                  (_ :\n                    ∀ (t' : k) (a : MonoidAlgebra k G),\n                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : G →₀ k),\n                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom\n        a₂\n[PROOFSTEP]\nhave h₁ : ∀ m, g m 0 = 0 := by\n  intro m\n  exact zero_smul k (f m)\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\n⊢ ∀ (m : G), g m 0 = 0\n[PROOFSTEP]\nintro m\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\nm : G\n⊢ g m 0 = 0\n[PROOFSTEP]\nexact zero_smul k (f m)\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\nh₁ : ∀ (m : G), g m 0 = 0\n⊢ MulActionHom.toFun\n      {\n          toMulActionHom :=\n            { toFun := fun a => sum a fun m t => t • ↑f m,\n              map_smul' :=\n                (_ :\n                  ∀ (t' : k) (a : MonoidAlgebra k G),\n                    (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n          map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),\n          map_add' :=\n            (_ :\n              ∀ (x y : G →₀ k),\n                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom\n      (a₁ * a₂) =\n    MulActionHom.toFun\n        {\n            toMulActionHom :=\n              { toFun := fun a => sum a fun m t => t • ↑f m,\n                map_smul' :=\n                  (_ :\n                    ∀ (t' : k) (a : MonoidAlgebra k G),\n                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : G →₀ k),\n                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom\n        a₁ *\n      MulActionHom.toFun\n        {\n            toMulActionHom :=\n              { toFun := fun a => sum a fun m t => t • ↑f m,\n                map_smul' :=\n                  (_ :\n                    ∀ (t' : k) (a : MonoidAlgebra k G),\n                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : G →₀ k),\n                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom\n        a₂\n[PROOFSTEP]\nhave h₂ : ∀ (m) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂ :=\n  by\n  intros\n  rw [← add_smul]\n    -- Porting note: `reducible` cannot be `local` so proof gets long.\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\nh₁ : ∀ (m : G), g m 0 = 0\n⊢ ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂\n[PROOFSTEP]\nintros\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\nh₁ : ∀ (m : G), g m 0 = 0\nm✝ : G\nt₁✝ t₂✝ : k\n⊢ g m✝ (t₁✝ + t₂✝) = g m✝ t₁✝ + g m✝ t₂✝\n[PROOFSTEP]\nrw [← add_smul]\n  -- Porting note: `reducible` cannot be `local` so proof gets long.\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\nh₁ : ∀ (m : G), g m 0 = 0\nh₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂\n⊢ MulActionHom.toFun\n      {\n          toMulActionHom :=\n            { toFun := fun a => sum a fun m t => t • ↑f m,\n              map_smul' :=\n                (_ :\n                  ∀ (t' : k) (a : MonoidAlgebra k G),\n                    (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n          map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),\n          map_add' :=\n            (_ :\n              ∀ (x y : G →₀ k),\n                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom\n      (a₁ * a₂) =\n    MulActionHom.toFun\n        {\n            toMulActionHom :=\n              { toFun := fun a => sum a fun m t => t • ↑f m,\n                map_smul' :=\n                  (_ :\n                    ∀ (t' : k) (a : MonoidAlgebra k G),\n                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : G →₀ k),\n                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom\n        a₁ *\n      MulActionHom.toFun\n        {\n            toMulActionHom :=\n              { toFun := fun a => sum a fun m t => t • ↑f m,\n                map_smul' :=\n                  (_ :\n                    ∀ (t' : k) (a : MonoidAlgebra k G),\n                      (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n            map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : G →₀ k),\n                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }.toMulActionHom\n        a₂\n[PROOFSTEP]\nsimp_rw [Finsupp.mul_sum, Finsupp.sum_mul, smul_mul_smul, ← f.map_mul, mul_def, sum_comm a₂ a₁]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\nh₁ : ∀ (m : G), g m 0 = 0\nh₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂\n⊢ (sum (sum a₁ fun a₁ b₁ => sum a₂ fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)) fun m t => t • ↑f m) =\n    sum a₁ fun x' v' => sum a₂ fun x v => (v' * v) • ↑f (x' * x)\n[PROOFSTEP]\nrw [sum_sum_index h₁ h₂]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\nh₁ : ∀ (m : G), g m 0 = 0\nh₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂\n⊢ (sum a₁ fun a b => sum (sum a₂ fun a₂ b₂ => single (a * a₂) (b * b₂)) fun a => g a) =\n    sum a₁ fun x' v' => sum a₂ fun x v => (v' * v) • ↑f (x' * x)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\nh₁ : ∀ (m : G), g m 0 = 0\nh₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂\n⊢ (fun a b => sum (sum a₂ fun a₂ b₂ => single (a * a₂) (b * b₂)) fun a => g a) = fun x' v' =>\n    sum a₂ fun x v => (v' * v) • ↑f (x' * x)\n[PROOFSTEP]\next\n[GOAL]\ncase e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\nh₁ : ∀ (m : G), g m 0 = 0\nh₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂\nx✝¹ : G\nx✝ : k\n⊢ (sum (sum a₂ fun a₂ b₂ => single (x✝¹ * a₂) (x✝ * b₂)) fun a => g a) = sum a₂ fun x v => (x✝ * v) • ↑f (x✝¹ * x)\n[PROOFSTEP]\nrw [sum_sum_index h₁ h₂]\n[GOAL]\ncase e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\nh₁ : ∀ (m : G), g m 0 = 0\nh₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂\nx✝¹ : G\nx✝ : k\n⊢ (sum a₂ fun a b => sum (single (x✝¹ * a) (x✝ * b)) fun a => g a) = sum a₂ fun x v => (x✝ * v) • ↑f (x✝¹ * x)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g.h.h.e_g\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\nh₁ : ∀ (m : G), g m 0 = 0\nh₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂\nx✝¹ : G\nx✝ : k\n⊢ (fun a b => sum (single (x✝¹ * a) (x✝ * b)) fun a => g a) = fun x v => (x✝ * v) • ↑f (x✝¹ * x)\n[PROOFSTEP]\next\n[GOAL]\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nsrc✝ : (fun x => (G →₀ k) →+ A) fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x) :=\n  ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x)\na₁ a₂ : MonoidAlgebra k G\ng : G → k → A := fun m t => t • ↑f m\nh₁ : ∀ (m : G), g m 0 = 0\nh₂ : ∀ (m : G) (t₁ t₂ : k), g m (t₁ + t₂) = g m t₁ + g m t₂\nx✝³ : G\nx✝² : k\nx✝¹ : G\nx✝ : k\n⊢ (sum (single (x✝³ * x✝¹) (x✝² * x✝)) fun a => g a) = (x✝² * x✝) • ↑f (x✝³ * x✝¹)\n[PROOFSTEP]\nrw [sum_single_index (h₁ _)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\n⊢ (fun F => MulHom.comp (NonUnitalAlgHom.toMulHom F) (ofMagma k G))\n      ((fun f =>\n          let src := ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x);\n          {\n            toDistribMulActionHom :=\n              {\n                toMulActionHom :=\n                  { toFun := fun a => sum a fun m t => t • ↑f m,\n                    map_smul' :=\n                      (_ :\n                        ∀ (t' : k) (a : MonoidAlgebra k G),\n                          (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                            t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : G →₀ k), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n            map_mul' :=\n              (_ :\n                ∀ (a₁ a₂ : MonoidAlgebra k G),\n                  MulActionHom.toFun\n                      {\n                          toMulActionHom :=\n                            { toFun := fun a => sum a fun m t => t • ↑f m,\n                              map_smul' :=\n                                (_ :\n                                  ∀ (t' : k) (a : MonoidAlgebra k G),\n                                    (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                      t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                          map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : G →₀ k),\n                                ZeroHom.toFun (↑src) (x + y) =\n                                  ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom\n                      (a₁ * a₂) =\n                    MulActionHom.toFun\n                        {\n                            toMulActionHom :=\n                              { toFun := fun a => sum a fun m t => t • ↑f m,\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (t' : k) (a : MonoidAlgebra k G),\n                                      (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                        t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                            map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : G →₀ k),\n                                  ZeroHom.toFun (↑src) (x + y) =\n                                    ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom\n                        a₁ *\n                      MulActionHom.toFun\n                        {\n                            toMulActionHom :=\n                              { toFun := fun a => sum a fun m t => t • ↑f m,\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (t' : k) (a : MonoidAlgebra k G),\n                                      (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                        t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                            map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : G →₀ k),\n                                  ZeroHom.toFun (↑src) (x + y) =\n                                    ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom\n                        a₂) })\n        f) =\n    f\n[PROOFSTEP]\next m\n[GOAL]\ncase h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nf : G →ₙ* A\nm : G\n⊢ ↑((fun F => MulHom.comp (NonUnitalAlgHom.toMulHom F) (ofMagma k G))\n          ((fun f =>\n              let src := ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x);\n              {\n                toDistribMulActionHom :=\n                  {\n                    toMulActionHom :=\n                      { toFun := fun a => sum a fun m t => t • ↑f m,\n                        map_smul' :=\n                          (_ :\n                            ∀ (t' : k) (a : MonoidAlgebra k G),\n                              (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                    map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : G →₀ k),\n                          ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n                map_mul' :=\n                  (_ :\n                    ∀ (a₁ a₂ : MonoidAlgebra k G),\n                      MulActionHom.toFun\n                          {\n                              toMulActionHom :=\n                                { toFun := fun a => sum a fun m t => t • ↑f m,\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (t' : k) (a : MonoidAlgebra k G),\n                                        (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                          t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                              map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : G →₀ k),\n                                    ZeroHom.toFun (↑src) (x + y) =\n                                      ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom\n                          (a₁ * a₂) =\n                        MulActionHom.toFun\n                            {\n                                toMulActionHom :=\n                                  { toFun := fun a => sum a fun m t => t • ↑f m,\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (t' : k) (a : MonoidAlgebra k G),\n                                          (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                            t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                                map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : G →₀ k),\n                                      ZeroHom.toFun (↑src) (x + y) =\n                                        ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom\n                            a₁ *\n                          MulActionHom.toFun\n                            {\n                                toMulActionHom :=\n                                  { toFun := fun a => sum a fun m t => t • ↑f m,\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (t' : k) (a : MonoidAlgebra k G),\n                                          (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                            t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                                map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : G →₀ k),\n                                      ZeroHom.toFun (↑src) (x + y) =\n                                        ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom\n                            a₂) })\n            f))\n      m =\n    ↑f m\n[PROOFSTEP]\nsimp only [NonUnitalAlgHom.coe_mk, ofMagma_apply, NonUnitalAlgHom.toMulHom_eq_coe, sum_single_index,\n  Function.comp_apply, one_smul, zero_smul, MulHom.coe_comp, NonUnitalAlgHom.coe_to_mulHom]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nF : MonoidAlgebra k G →ₙₐ[k] A\n⊢ (fun f =>\n        let src := ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x);\n        {\n          toDistribMulActionHom :=\n            {\n              toMulActionHom :=\n                { toFun := fun a => sum a fun m t => t • ↑f m,\n                  map_smul' :=\n                    (_ :\n                      ∀ (t' : k) (a : MonoidAlgebra k G),\n                        (fun a => sum a fun m t => t • ↑f m) (t' • a) = t' • (fun a => sum a fun m t => t • ↑f m) a) },\n              map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n              map_add' :=\n                (_ :\n                  ∀ (x y : G →₀ k), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n          map_mul' :=\n            (_ :\n              ∀ (a₁ a₂ : MonoidAlgebra k G),\n                MulActionHom.toFun\n                    {\n                        toMulActionHom :=\n                          { toFun := fun a => sum a fun m t => t • ↑f m,\n                            map_smul' :=\n                              (_ :\n                                ∀ (t' : k) (a : MonoidAlgebra k G),\n                                  (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                    t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                        map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : G →₀ k),\n                              ZeroHom.toFun (↑src) (x + y) =\n                                ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom\n                    (a₁ * a₂) =\n                  MulActionHom.toFun\n                      {\n                          toMulActionHom :=\n                            { toFun := fun a => sum a fun m t => t • ↑f m,\n                              map_smul' :=\n                                (_ :\n                                  ∀ (t' : k) (a : MonoidAlgebra k G),\n                                    (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                      t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                          map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : G →₀ k),\n                                ZeroHom.toFun (↑src) (x + y) =\n                                  ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom\n                      a₁ *\n                    MulActionHom.toFun\n                      {\n                          toMulActionHom :=\n                            { toFun := fun a => sum a fun m t => t • ↑f m,\n                              map_smul' :=\n                                (_ :\n                                  ∀ (t' : k) (a : MonoidAlgebra k G),\n                                    (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                      t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                          map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : G →₀ k),\n                                ZeroHom.toFun (↑src) (x + y) =\n                                  ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom\n                      a₂) })\n      ((fun F => MulHom.comp (NonUnitalAlgHom.toMulHom F) (ofMagma k G)) F) =\n    F\n[PROOFSTEP]\nrefine nonUnitalAlgHom_ext' k (MulHom.ext fun m => ?_)\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : Semiring k\ninst✝⁵ : DistribSMul R k\ninst✝⁴ : Mul G\nA : Type u₃\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module k A\ninst✝¹ : IsScalarTower k A A\ninst✝ : SMulCommClass k A A\nF : MonoidAlgebra k G →ₙₐ[k] A\nm : G\n⊢ ↑(MulHom.comp\n          (NonUnitalAlgHom.toMulHom\n            ((fun f =>\n                let src := ↑liftAddHom fun x => ↑(AddMonoidHom.flip (smulAddHom k A)) (↑f x);\n                {\n                  toDistribMulActionHom :=\n                    {\n                      toMulActionHom :=\n                        { toFun := fun a => sum a fun m t => t • ↑f m,\n                          map_smul' :=\n                            (_ :\n                              ∀ (t' : k) (a : MonoidAlgebra k G),\n                                (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                  t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                      map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : G →₀ k),\n                            ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (a₁ a₂ : MonoidAlgebra k G),\n                        MulActionHom.toFun\n                            {\n                                toMulActionHom :=\n                                  { toFun := fun a => sum a fun m t => t • ↑f m,\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (t' : k) (a : MonoidAlgebra k G),\n                                          (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                            t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                                map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : G →₀ k),\n                                      ZeroHom.toFun (↑src) (x + y) =\n                                        ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom\n                            (a₁ * a₂) =\n                          MulActionHom.toFun\n                              {\n                                  toMulActionHom :=\n                                    { toFun := fun a => sum a fun m t => t • ↑f m,\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (t' : k) (a : MonoidAlgebra k G),\n                                            (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                              t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                                  map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (x y : G →₀ k),\n                                        ZeroHom.toFun (↑src) (x + y) =\n                                          ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom\n                              a₁ *\n                            MulActionHom.toFun\n                              {\n                                  toMulActionHom :=\n                                    { toFun := fun a => sum a fun m t => t • ↑f m,\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (t' : k) (a : MonoidAlgebra k G),\n                                            (fun a => sum a fun m t => t • ↑f m) (t' • a) =\n                                              t' • (fun a => sum a fun m t => t • ↑f m) a) },\n                                  map_zero' := (_ : ZeroHom.toFun (↑src) 0 = 0),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (x y : G →₀ k),\n                                        ZeroHom.toFun (↑src) (x + y) =\n                                          ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) }.toMulActionHom\n                              a₂) })\n              ((fun F => MulHom.comp (NonUnitalAlgHom.toMulHom F) (ofMagma k G)) F)))\n          (ofMagma k G))\n      m =\n    ↑(MulHom.comp (NonUnitalAlgHom.toMulHom F) (ofMagma k G)) m\n[PROOFSTEP]\nsimp only [NonUnitalAlgHom.coe_mk, ofMagma_apply, NonUnitalAlgHom.toMulHom_eq_coe, sum_single_index,\n  Function.comp_apply, one_smul, zero_smul, MulHom.coe_comp, NonUnitalAlgHom.coe_to_mulHom]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : CommSemiring k\ninst✝ : MulOneClass G\nr : k\nf : MonoidAlgebra k G\n⊢ single 1 r * f = f * single 1 r\n[PROOFSTEP]\nrefine Finsupp.ext fun _ => ?_\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : CommSemiring k\ninst✝ : MulOneClass G\nr : k\nf : MonoidAlgebra k G\nx✝ : G\n⊢ ↑(single 1 r * f) x✝ = ↑(f * single 1 r) x✝\n[PROOFSTEP]\nrw [single_one_mul_apply, mul_single_one_apply, mul_comm]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : MulOneClass G\nsrc✝ : k →+ G →₀ k := singleAddHom 1\nx y : k\n⊢ OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = ZeroHom.toFun (↑src✝) 1) } (x * y) =\n    OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = ZeroHom.toFun (↑src✝) 1) } x *\n      OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = ZeroHom.toFun (↑src✝) 1) } y\n[PROOFSTEP]\nsimp only [ZeroHom.toFun_eq_coe, AddMonoidHom.toZeroHom_coe, singleAddHom_apply, single_mul_single, mul_one]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR✝ : Type u_2\nR : Type u_3\ninst✝² : Semiring k\ninst✝¹ : MulOneClass G\ninst✝ : Semiring R\nf g : MonoidAlgebra k G →+* R\nh₁ : ∀ (b : k), ↑f (single 1 b) = ↑g (single 1 b)\nh_of : ∀ (a : G), ↑f (single a 1) = ↑g (single a 1)\na : G\nb : k\n⊢ ↑((fun f => ↑f) f) (Finsupp.single a b) = ↑((fun f => ↑f) g) (Finsupp.single a b)\n[PROOFSTEP]\nrw [← single, ← one_mul a, ← mul_one b, ← single_mul_single, AddMonoidHom.coe_coe f, AddMonoidHom.coe_coe g, f.map_mul,\n  g.map_mul, h₁, h_of]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring k\ninst✝² : Semiring A\ninst✝¹ : Algebra k A\ninst✝ : Monoid G\nsrc✝ : k →+* MonoidAlgebra A G := RingHom.comp singleOneRingHom (algebraMap k A)\nr : k\nf : (fun x => MonoidAlgebra A G) r\n⊢ ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        r *\n      f =\n    f *\n      ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        r\n[PROOFSTEP]\nrefine Finsupp.ext fun _ => ?_\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring k\ninst✝² : Semiring A\ninst✝¹ : Algebra k A\ninst✝ : Monoid G\nsrc✝ : k →+* MonoidAlgebra A G := RingHom.comp singleOneRingHom (algebraMap k A)\nr : k\nf : (fun x => MonoidAlgebra A G) r\nx✝ : G\n⊢ ↑(↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n                map_add' :=\n                  (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n            r *\n          f)\n      x✝ =\n    ↑(f *\n          ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n                map_add' :=\n                  (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n            r)\n      x✝\n[PROOFSTEP]\nsimp [single_one_mul_apply, mul_single_one_apply, Algebra.commutes]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring k\ninst✝² : Semiring A\ninst✝¹ : Algebra k A\ninst✝ : Monoid G\nsrc✝ : k →+* MonoidAlgebra A G := RingHom.comp singleOneRingHom (algebraMap k A)\nr : k\na : (fun x => MonoidAlgebra A G) r\n⊢ r • a =\n    ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        r *\n      a\n[PROOFSTEP]\nrefine\n  Finsupp.ext fun _ =>\n    ?_\n      -- Porting note: Newly required.\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring k\ninst✝² : Semiring A\ninst✝¹ : Algebra k A\ninst✝ : Monoid G\nsrc✝ : k →+* MonoidAlgebra A G := RingHom.comp singleOneRingHom (algebraMap k A)\nr : k\na : (fun x => MonoidAlgebra A G) r\nx✝ : G\n⊢ ↑(r • a) x✝ =\n    ↑(↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n                map_add' :=\n                  (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n            r *\n          a)\n      x✝\n[PROOFSTEP]\nrw [Finsupp.coe_smul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring k\ninst✝² : Semiring A\ninst✝¹ : Algebra k A\ninst✝ : Monoid G\nsrc✝ : k →+* MonoidAlgebra A G := RingHom.comp singleOneRingHom (algebraMap k A)\nr : k\na : (fun x => MonoidAlgebra A G) r\nx✝ : G\n⊢ (r • ↑a) x✝ =\n    ↑(↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n                map_add' :=\n                  (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n            r *\n          a)\n      x✝\n[PROOFSTEP]\nsimp [single_one_mul_apply, Algebra.smul_def, Pi.smul_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring k\ninst✝² : Semiring A\ninst✝¹ : Algebra k A\ninst✝ : Monoid G\nsrc✝ : A →+* MonoidAlgebra A G := singleOneRingHom\nr : k\n⊢ OneHom.toFun\n      (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : A), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n      (↑(algebraMap k A) r) =\n    ↑(algebraMap k (MonoidAlgebra A G)) r\n[PROOFSTEP]\nrefine Finsupp.ext fun _ => ?_\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring k\ninst✝² : Semiring A\ninst✝¹ : Algebra k A\ninst✝ : Monoid G\nsrc✝ : A →+* MonoidAlgebra A G := singleOneRingHom\nr : k\nx✝ : G\n⊢ ↑(OneHom.toFun\n          (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : A), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n          (↑(algebraMap k A) r))\n      x✝ =\n    ↑(↑(algebraMap k (MonoidAlgebra A G)) r) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring k\ninst✝² : Semiring A\ninst✝¹ : Algebra k A\ninst✝ : Monoid G\nsrc✝ : A →+* MonoidAlgebra A G := singleOneRingHom\nr : k\nx✝ : G\n⊢ ↑(Finsupp.single 1 (↑(algebraMap k A) r)) x✝ = ↑(↑(algebraMap k (MonoidAlgebra A G)) r) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : CommSemiring k\ninst✝ : Monoid G\na : G\nb : k\n⊢ single a b = ↑(algebraMap k (MonoidAlgebra k G)) b * ↑(of k G) a\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\nA : Type u_3\ninst✝³ : CommSemiring k\ninst✝² : Semiring A\ninst✝¹ : Algebra k A\ninst✝ : Monoid G\na : G\nb : k\n⊢ single a (↑(algebraMap k A) b) = ↑(algebraMap k (MonoidAlgebra A G)) b * ↑(of A G) a\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\np : MonoidAlgebra k G → Prop\nf : MonoidAlgebra k G\nhM : ∀ (g : G), p (↑(of k G) g)\nhadd : ∀ (f g : MonoidAlgebra k G), p f → p g → p (f + g)\nhsmul : ∀ (r : k) (f : MonoidAlgebra k G), p f → p (r • f)\n⊢ p f\n[PROOFSTEP]\nrefine' Finsupp.induction_linear f _ (fun f g hf hg => hadd f g hf hg) fun g r => _\n[GOAL]\ncase refine'_1\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\np : MonoidAlgebra k G → Prop\nf : MonoidAlgebra k G\nhM : ∀ (g : G), p (↑(of k G) g)\nhadd : ∀ (f g : MonoidAlgebra k G), p f → p g → p (f + g)\nhsmul : ∀ (r : k) (f : MonoidAlgebra k G), p f → p (r • f)\n⊢ p 0\n[PROOFSTEP]\nsimpa using hsmul 0 (of k G 1) (hM 1)\n[GOAL]\ncase refine'_2\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\np : MonoidAlgebra k G → Prop\nf : MonoidAlgebra k G\nhM : ∀ (g : G), p (↑(of k G) g)\nhadd : ∀ (f g : MonoidAlgebra k G), p f → p g → p (f + g)\nhsmul : ∀ (r : k) (f : MonoidAlgebra k G), p f → p (r • f)\ng : G\nr : k\n⊢ p (Finsupp.single g r)\n[PROOFSTEP]\nconvert\n  hsmul r (of k G g)\n    (hM g)\n      -- Porting note: Was `simp only`.\n[GOAL]\ncase h.e'_1\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\np : MonoidAlgebra k G → Prop\nf : MonoidAlgebra k G\nhM : ∀ (g : G), p (↑(of k G) g)\nhadd : ∀ (f g : MonoidAlgebra k G), p f → p g → p (f + g)\nhsmul : ∀ (r : k) (f : MonoidAlgebra k G), p f → p (r • f)\ng : G\nr : k\n⊢ Finsupp.single g r = r • ↑(of k G) g\n[PROOFSTEP]\nrw [of_apply, smul_single', mul_one]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nf : A →ₐ[k] B\ng : G →* B\nh_comm : ∀ (x : A) (y : G), Commute (↑f x) (↑g y)\nsrc✝ : MonoidAlgebra A G →+* B := liftNCRingHom (↑f) g h_comm\n⊢ ∀ (r : k),\n    OneHom.toFun\n        (↑↑{\n              toMonoidHom :=\n                {\n                  toOneHom :=\n                    { toFun := ↑(liftNCRingHom (↑f) g h_comm), map_one' := (_ : OneHom.toFun (↑↑src✝) 1 = 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : MonoidAlgebra A G),\n                        OneHom.toFun (↑↑src✝) (x * y) = OneHom.toFun (↑↑src✝) x * OneHom.toFun (↑↑src✝) y) },\n              map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n              map_add' :=\n                (_ :\n                  ∀ (x y : MonoidAlgebra A G),\n                    OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n        (↑(algebraMap k (MonoidAlgebra A G)) r) =\n      ↑(algebraMap k B) r\n[PROOFSTEP]\nsimp [liftNCRingHom]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nf : G →* A\n⊢ (fun f => MonoidHom.comp (↑f) (of k G))\n      ((fun F =>\n          liftNCAlgHom (Algebra.ofId k A) F\n            (_ :\n              ∀ (x : k) (x_1 : G),\n                ↑(algebraMap k ((fun x => A) x)) x * ↑F x_1 = ↑F x_1 * ↑(algebraMap k ((fun x => A) x)) x))\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nf : G →* A\nx✝ : G\n⊢ ↑((fun f => MonoidHom.comp (↑f) (of k G))\n          ((fun F =>\n              liftNCAlgHom (Algebra.ofId k A) F\n                (_ :\n                  ∀ (x : k) (x_1 : G),\n                    ↑(algebraMap k ((fun x => A) x)) x * ↑F x_1 = ↑F x_1 * ↑(algebraMap k ((fun x => A) x)) x))\n            f))\n      x✝ =\n    ↑f x✝\n[PROOFSTEP]\nsimp [liftNCAlgHom, liftNCRingHom]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : MonoidAlgebra k G →ₐ[k] A\n⊢ (fun F =>\n        liftNCAlgHom (Algebra.ofId k A) F\n          (_ :\n            ∀ (x : k) (x_1 : G),\n              ↑(algebraMap k ((fun x => A) x)) x * ↑F x_1 = ↑F x_1 * ↑(algebraMap k ((fun x => A) x)) x))\n      ((fun f => MonoidHom.comp (↑f) (of k G)) F) =\n    F\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : MonoidAlgebra k G →ₐ[k] A\nx✝ : G\n⊢ ↑(MonoidHom.comp\n          (↑((fun F =>\n                liftNCAlgHom (Algebra.ofId k A) F\n                  (_ :\n                    ∀ (x : k) (x_1 : G),\n                      ↑(algebraMap k ((fun x => A) x)) x * ↑F x_1 = ↑F x_1 * ↑(algebraMap k ((fun x => A) x)) x))\n              ((fun f => MonoidHom.comp (↑f) (of k G)) F)))\n          (of k G))\n      x✝ =\n    ↑(MonoidHom.comp (↑F) (of k G)) x✝\n[PROOFSTEP]\nsimp [liftNCAlgHom, liftNCRingHom]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : G →* A\nf : MonoidAlgebra k G\n⊢ ↑(↑(lift k G A) F) f = sum f fun a b => b • ↑F a\n[PROOFSTEP]\nsimp only [lift_apply', Algebra.smul_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : G →* A\nx : G\n⊢ ↑(↑(lift k G A) F) (↑(of k G) x) = ↑F x\n[PROOFSTEP]\nrw [of_apply, ← lift_symm_apply, Equiv.symm_apply_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : G →* A\na : G\nb : k\n⊢ ↑(↑(lift k G A) F) (single a b) = b • ↑F a\n[PROOFSTEP]\nrw [lift_def, liftNC_single, Algebra.smul_def, AddMonoidHom.coe_coe]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : MonoidAlgebra k G →ₐ[k] A\nf : MonoidAlgebra k G\n⊢ ↑F f = sum f fun a b => b • ↑F (single a 1)\n[PROOFSTEP]\nconv_lhs =>\n  rw [lift_unique' F]\n  simp [lift_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : MonoidAlgebra k G →ₐ[k] A\nf : MonoidAlgebra k G\n| ↑F f\n[PROOFSTEP]\n  rw [lift_unique' F]\n  simp [lift_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : MonoidAlgebra k G →ₐ[k] A\nf : MonoidAlgebra k G\n| ↑F f\n[PROOFSTEP]\n  rw [lift_unique' F]\n  simp [lift_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : MonoidAlgebra k G →ₐ[k] A\nf : MonoidAlgebra k G\n| ↑F f\n[PROOFSTEP]\nrw [lift_unique' F]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁶ : CommSemiring k\ninst✝⁵ : Monoid G\ninst✝⁴ : Monoid H\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : MonoidAlgebra k G →ₐ[k] A\nf : MonoidAlgebra k G\n| ↑(↑(lift k G A) (MonoidHom.comp (↑F) (of k G))) f\n[PROOFSTEP]\nsimp [lift_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁷ : CommSemiring k\ninst✝⁶ : Monoid G\ninst✝⁵ : Monoid H\nA : Type u₃\ninst✝⁴ : Semiring A\ninst✝³ : Algebra k A\nB : Type u_3\ninst✝² : Semiring B\ninst✝¹ : Algebra k B\nF : Type u_4\ninst✝ : MonoidHomClass F G H\nf : F\nr : k\n⊢ mapDomain (↑f) (↑(algebraMap k (MonoidAlgebra A G)) r) = ↑(algebraMap k (MonoidAlgebra A H)) r\n[PROOFSTEP]\nsimp only [coe_algebraMap, mapDomain_single, map_one, (· ∘ ·)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁹ : Monoid G\ninst✝⁸ : CommSemiring k\nV : Type u₃\nW : Type u₄\ninst✝⁷ : AddCommMonoid V\ninst✝⁶ : Module k V\ninst✝⁵ : Module (MonoidAlgebra k G) V\ninst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V\ninst✝³ : AddCommMonoid W\ninst✝² : Module k W\ninst✝¹ : Module (MonoidAlgebra k G) W\ninst✝ : IsScalarTower k (MonoidAlgebra k G) W\nf : V →ₗ[k] W\nh : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v\nv v' : V\n⊢ ↑f (v + v') = ↑f v + ↑f v'\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁹ : Monoid G\ninst✝⁸ : CommSemiring k\nV : Type u₃\nW : Type u₄\ninst✝⁷ : AddCommMonoid V\ninst✝⁶ : Module k V\ninst✝⁵ : Module (MonoidAlgebra k G) V\ninst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V\ninst✝³ : AddCommMonoid W\ninst✝² : Module k W\ninst✝¹ : Module (MonoidAlgebra k G) W\ninst✝ : IsScalarTower k (MonoidAlgebra k G) W\nf : V →ₗ[k] W\nh : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v\nc : MonoidAlgebra k G\nv : V\n⊢ AddHom.toFun { toFun := ↑f, map_add' := (_ : ∀ (v v' : V), ↑f (v + v') = ↑f v + ↑f v') } (c • v) =\n    ↑(RingHom.id (MonoidAlgebra k G)) c •\n      AddHom.toFun { toFun := ↑f, map_add' := (_ : ∀ (v v' : V), ↑f (v + v') = ↑f v + ↑f v') } v\n[PROOFSTEP]\ndsimp only []\n  -- Porting note: Was `apply`.\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁹ : Monoid G\ninst✝⁸ : CommSemiring k\nV : Type u₃\nW : Type u₄\ninst✝⁷ : AddCommMonoid V\ninst✝⁶ : Module k V\ninst✝⁵ : Module (MonoidAlgebra k G) V\ninst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V\ninst✝³ : AddCommMonoid W\ninst✝² : Module k W\ninst✝¹ : Module (MonoidAlgebra k G) W\ninst✝ : IsScalarTower k (MonoidAlgebra k G) W\nf : V →ₗ[k] W\nh : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v\nc : MonoidAlgebra k G\nv : V\n⊢ ↑f (c • v) = ↑(RingHom.id (MonoidAlgebra k G)) c • ↑f v\n[PROOFSTEP]\nrefine Finsupp.induction c ?_ ?_\n[GOAL]\ncase refine_1\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁹ : Monoid G\ninst✝⁸ : CommSemiring k\nV : Type u₃\nW : Type u₄\ninst✝⁷ : AddCommMonoid V\ninst✝⁶ : Module k V\ninst✝⁵ : Module (MonoidAlgebra k G) V\ninst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V\ninst✝³ : AddCommMonoid W\ninst✝² : Module k W\ninst✝¹ : Module (MonoidAlgebra k G) W\ninst✝ : IsScalarTower k (MonoidAlgebra k G) W\nf : V →ₗ[k] W\nh : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v\nc : MonoidAlgebra k G\nv : V\n⊢ ↑f (0 • v) = ↑(RingHom.id (MonoidAlgebra k G)) 0 • ↑f v\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_2\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁹ : Monoid G\ninst✝⁸ : CommSemiring k\nV : Type u₃\nW : Type u₄\ninst✝⁷ : AddCommMonoid V\ninst✝⁶ : Module k V\ninst✝⁵ : Module (MonoidAlgebra k G) V\ninst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V\ninst✝³ : AddCommMonoid W\ninst✝² : Module k W\ninst✝¹ : Module (MonoidAlgebra k G) W\ninst✝ : IsScalarTower k (MonoidAlgebra k G) W\nf : V →ₗ[k] W\nh : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v\nc : MonoidAlgebra k G\nv : V\n⊢ ∀ (a : G) (b : k) (f_1 : G →₀ k),\n    ¬a ∈ f_1.support →\n      b ≠ 0 →\n        ↑f (f_1 • v) = ↑(RingHom.id (MonoidAlgebra k G)) f_1 • ↑f v →\n          ↑f ((Finsupp.single a b + f_1) • v) = ↑(RingHom.id (MonoidAlgebra k G)) (Finsupp.single a b + f_1) • ↑f v\n[PROOFSTEP]\nintro g r c' _nm _nz w\n[GOAL]\ncase refine_2\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁹ : Monoid G\ninst✝⁸ : CommSemiring k\nV : Type u₃\nW : Type u₄\ninst✝⁷ : AddCommMonoid V\ninst✝⁶ : Module k V\ninst✝⁵ : Module (MonoidAlgebra k G) V\ninst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V\ninst✝³ : AddCommMonoid W\ninst✝² : Module k W\ninst✝¹ : Module (MonoidAlgebra k G) W\ninst✝ : IsScalarTower k (MonoidAlgebra k G) W\nf : V →ₗ[k] W\nh : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v\nc : MonoidAlgebra k G\nv : V\ng : G\nr : k\nc' : G →₀ k\n_nm : ¬g ∈ c'.support\n_nz : r ≠ 0\nw : ↑f (c' • v) = ↑(RingHom.id (MonoidAlgebra k G)) c' • ↑f v\n⊢ ↑f ((Finsupp.single g r + c') • v) = ↑(RingHom.id (MonoidAlgebra k G)) (Finsupp.single g r + c') • ↑f v\n[PROOFSTEP]\ndsimp at *\n[GOAL]\ncase refine_2\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁹ : Monoid G\ninst✝⁸ : CommSemiring k\nV : Type u₃\nW : Type u₄\ninst✝⁷ : AddCommMonoid V\ninst✝⁶ : Module k V\ninst✝⁵ : Module (MonoidAlgebra k G) V\ninst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V\ninst✝³ : AddCommMonoid W\ninst✝² : Module k W\ninst✝¹ : Module (MonoidAlgebra k G) W\ninst✝ : IsScalarTower k (MonoidAlgebra k G) W\nf : V →ₗ[k] W\nh : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v\nc : MonoidAlgebra k G\nv : V\ng : G\nr : k\nc' : G →₀ k\n_nm : ¬g ∈ c'.support\n_nz : ¬r = 0\nw : ↑f (c' • v) = c' • ↑f v\n⊢ ↑f ((Finsupp.single g r + c') • v) = (Finsupp.single g r + c') • ↑f v\n[PROOFSTEP]\nsimp only [add_smul, f.map_add, w, add_left_inj, single_eq_algebraMap_mul_of, ← smul_smul]\n[GOAL]\ncase refine_2\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁹ : Monoid G\ninst✝⁸ : CommSemiring k\nV : Type u₃\nW : Type u₄\ninst✝⁷ : AddCommMonoid V\ninst✝⁶ : Module k V\ninst✝⁵ : Module (MonoidAlgebra k G) V\ninst✝⁴ : IsScalarTower k (MonoidAlgebra k G) V\ninst✝³ : AddCommMonoid W\ninst✝² : Module k W\ninst✝¹ : Module (MonoidAlgebra k G) W\ninst✝ : IsScalarTower k (MonoidAlgebra k G) W\nf : V →ₗ[k] W\nh : ∀ (g : G) (v : V), ↑f (single g 1 • v) = single g 1 • ↑f v\nc : MonoidAlgebra k G\nv : V\ng : G\nr : k\nc' : G →₀ k\n_nm : ¬g ∈ c'.support\n_nz : ¬r = 0\nw : ↑f (c' • v) = c' • ↑f v\n⊢ ↑f (↑(algebraMap k (MonoidAlgebra k G)) r • ↑(of k G) g • v) + c' • ↑f v =\n    ↑(algebraMap k (MonoidAlgebra k G)) r • ↑(of k G) g • ↑f v + c' • ↑f v\n[PROOFSTEP]\nerw [algebraMap_smul (MonoidAlgebra k G) r, algebraMap_smul (MonoidAlgebra k G) r, f.map_smul, h g v, of_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\nι : Type ui\ninst✝¹ : CommSemiring k\ninst✝ : CommMonoid G\ns✝ : Finset ι\na✝ : ι → G\nb : ι → k\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : ∏ i in s, single (a✝ i) (b i) = single (∏ i in s, a✝ i) (∏ i in s, b i)\n⊢ ∏ i in cons a s has, single (a✝ i) (b i) = single (∏ i in cons a s has, a✝ i) (∏ i in cons a s has, b i)\n[PROOFSTEP]\nrw [prod_cons has, ih, single_mul_single, prod_cons has, prod_cons has]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Group G\nf g : MonoidAlgebra k G\nx : G\n⊢ ↑(f * g) x = sum f fun a b => ↑(single a b * g) x\n[PROOFSTEP]\nrw [← Finsupp.sum_apply, ← Finsupp.sum_mul g f, f.sum_single]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Group G\nf g : MonoidAlgebra k G\nx : G\n⊢ (sum f fun a b => ↑(single a b * g) x) = sum f fun a b => b * ↑g (a⁻¹ * x)\n[PROOFSTEP]\nsimp only [single_mul_apply, Finsupp.sum]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Group G\nf g : MonoidAlgebra k G\nx : G\n⊢ ↑(f * g) x = sum g fun a b => ↑(f * single a b) x\n[PROOFSTEP]\nrw [← Finsupp.sum_apply, ← Finsupp.mul_sum f g, g.sum_single]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Group G\nf g : MonoidAlgebra k G\nx : G\n⊢ (sum g fun a b => ↑(f * single a b) x) = sum g fun a b => ↑f (x * a⁻¹) * b\n[PROOFSTEP]\nsimp only [mul_single_apply, Finsupp.sum]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (Gᵐᵒᵖ →₀ kᵐᵒᵖ) :=\n  AddEquiv.trans (AddEquiv.symm opAddEquiv) (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv))\n⊢ ∀ (x y : (MonoidAlgebra k G)ᵐᵒᵖ),\n    Equiv.toFun src✝.toEquiv (x * y) = Equiv.toFun src✝.toEquiv x * Equiv.toFun src✝.toEquiv y\n[PROOFSTEP]\nrw [Equiv.toFun_as_coe, AddEquiv.toEquiv_eq_coe, AddEquiv.coe_toEquiv, ← AddEquiv.coe_toAddMonoidHom]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (Gᵐᵒᵖ →₀ kᵐᵒᵖ) :=\n  AddEquiv.trans (AddEquiv.symm opAddEquiv) (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv))\n⊢ ∀ (x y : (MonoidAlgebra k G)ᵐᵒᵖ),\n    ↑(AddEquiv.toAddMonoidHom src✝) (x * y) = ↑(AddEquiv.toAddMonoidHom src✝) x * ↑(AddEquiv.toAddMonoidHom src✝) y\n[PROOFSTEP]\nrefine\n  Iff.mpr (AddMonoidHom.map_mul_iff (R := (MonoidAlgebra k G)ᵐᵒᵖ) (S := MonoidAlgebra kᵐᵒᵖ Gᵐᵒᵖ) _)\n    ?_\n      -- Porting note: Was `ext`.\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (Gᵐᵒᵖ →₀ kᵐᵒᵖ) :=\n  AddEquiv.trans (AddEquiv.symm opAddEquiv) (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv))\n⊢ AddMonoidHom.compr₂ AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝) =\n    AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝))\n      (AddEquiv.toAddMonoidHom src✝)\n[PROOFSTEP]\nrefine\n  AddMonoidHom.mul_op_ext _ _ <|\n    addHom_ext' fun i₁ =>\n      AddMonoidHom.ext fun r₁ =>\n        AddMonoidHom.mul_op_ext _ _ <|\n          addHom_ext' fun i₂ =>\n            AddMonoidHom.ext fun r₂ =>\n              ?_\n                -- Porting note: `reducible` cannot be `local` so proof gets long.\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (Gᵐᵒᵖ →₀ kᵐᵒᵖ) :=\n  AddEquiv.trans (AddEquiv.symm opAddEquiv) (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv))\ni₁ : G\nr₁ : k\ni₂ : G\nr₂ : k\n⊢ ↑(AddMonoidHom.comp\n          (AddMonoidHom.comp\n            (↑(AddMonoidHom.comp\n                  (AddMonoidHom.comp (AddMonoidHom.compr₂ AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝))\n                    (AddEquiv.toAddMonoidHom opAddEquiv))\n                  (singleAddHom i₁))\n              r₁)\n            (AddEquiv.toAddMonoidHom opAddEquiv))\n          (singleAddHom i₂))\n      r₂ =\n    ↑(AddMonoidHom.comp\n          (AddMonoidHom.comp\n            (↑(AddMonoidHom.comp\n                  (AddMonoidHom.comp\n                    (AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝))\n                      (AddEquiv.toAddMonoidHom src✝))\n                    (AddEquiv.toAddMonoidHom opAddEquiv))\n                  (singleAddHom i₁))\n              r₁)\n            (AddEquiv.toAddMonoidHom opAddEquiv))\n          (singleAddHom i₂))\n      r₂\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (Gᵐᵒᵖ →₀ kᵐᵒᵖ) :=\n  AddEquiv.trans (AddEquiv.symm opAddEquiv) (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv))\ni₁ : G\nr₁ : k\ni₂ : G\nr₂ : k\n⊢ ↑(AddEquiv.trans (AddEquiv.symm opAddEquiv)\n          (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv)))\n      (↑opAddEquiv (Finsupp.single i₁ r₁) * ↑opAddEquiv (Finsupp.single i₂ r₂)) =\n    ↑(AddEquiv.trans (AddEquiv.symm opAddEquiv)\n            (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv)))\n        (↑opAddEquiv (Finsupp.single i₁ r₁)) *\n      ↑(AddEquiv.trans (AddEquiv.symm opAddEquiv)\n            (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv)))\n        (↑opAddEquiv (Finsupp.single i₂ r₂))\n[PROOFSTEP]\nrw [AddEquiv.trans_apply, AddEquiv.trans_apply, AddEquiv.trans_apply, AddEquiv.trans_apply, AddEquiv.trans_apply,\n  AddEquiv.trans_apply, MulOpposite.opAddEquiv_apply, MulOpposite.opAddEquiv_symm_apply,\n  MulOpposite.unop_mul (α := MonoidAlgebra k G)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (Gᵐᵒᵖ →₀ kᵐᵒᵖ) :=\n  AddEquiv.trans (AddEquiv.symm opAddEquiv) (AddEquiv.trans (mapRange.addEquiv opAddEquiv) (Finsupp.domCongr opEquiv))\ni₁ : G\nr₁ : k\ni₂ : G\nr₂ : k\n⊢ ↑(Finsupp.domCongr opEquiv)\n      (↑(mapRange.addEquiv opAddEquiv) (unop (op (Finsupp.single i₂ r₂)) * unop (op (Finsupp.single i₁ r₁)))) =\n    ↑(Finsupp.domCongr opEquiv) (↑(mapRange.addEquiv opAddEquiv) (unop (op (Finsupp.single i₁ r₁)))) *\n      ↑(Finsupp.domCongr opEquiv) (↑(mapRange.addEquiv opAddEquiv) (unop (op (Finsupp.single i₂ r₂))))\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\nr : k\nx : G\n⊢ ↑MonoidAlgebra.opRingEquiv (op (single x r)) = single (op x) (op r)\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Monoid G\nr : kᵐᵒᵖ\nx : Gᵐᵒᵖ\n⊢ ↑(RingEquiv.symm MonoidAlgebra.opRingEquiv) (single x r) = op (single (unop x) (unop r))\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : Monoid G\nV : Type u_3\ninst✝³ : AddCommMonoid V\ninst✝² : Module k V\ninst✝¹ : Module (MonoidAlgebra k G) V\ninst✝ : IsScalarTower k (MonoidAlgebra k G) V\nW : Submodule k V\nh : ∀ (g : G) (v : V), v ∈ W → ↑(of k G) g • v ∈ W\n⊢ ∀ (c : MonoidAlgebra k G) {x : V},\n    x ∈\n        {\n              toAddSubsemigroup :=\n                { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },\n              zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier →\n      c • x ∈\n        {\n              toAddSubsemigroup :=\n                { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },\n              zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nintro f v hv\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : Monoid G\nV : Type u_3\ninst✝³ : AddCommMonoid V\ninst✝² : Module k V\ninst✝¹ : Module (MonoidAlgebra k G) V\ninst✝ : IsScalarTower k (MonoidAlgebra k G) V\nW : Submodule k V\nh : ∀ (g : G) (v : V), v ∈ W → ↑(of k G) g • v ∈ W\nf : MonoidAlgebra k G\nv : V\nhv :\n  v ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },\n          zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier\n⊢ f • v ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },\n          zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrw [← Finsupp.sum_single f, Finsupp.sum, Finset.sum_smul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : Monoid G\nV : Type u_3\ninst✝³ : AddCommMonoid V\ninst✝² : Module k V\ninst✝¹ : Module (MonoidAlgebra k G) V\ninst✝ : IsScalarTower k (MonoidAlgebra k G) V\nW : Submodule k V\nh : ∀ (g : G) (v : V), v ∈ W → ↑(of k G) g • v ∈ W\nf : MonoidAlgebra k G\nv : V\nhv :\n  v ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },\n          zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier\n⊢ ∑ i in f.support, Finsupp.single i (↑f i) • v ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },\n          zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nsimp_rw [← smul_of, smul_assoc]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : Monoid G\nV : Type u_3\ninst✝³ : AddCommMonoid V\ninst✝² : Module k V\ninst✝¹ : Module (MonoidAlgebra k G) V\ninst✝ : IsScalarTower k (MonoidAlgebra k G) V\nW : Submodule k V\nh : ∀ (g : G) (v : V), v ∈ W → ↑(of k G) g • v ∈ W\nf : MonoidAlgebra k G\nv : V\nhv :\n  v ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑W, add_mem' := (_ : ∀ {a b : V}, a ∈ W.carrier → b ∈ W.carrier → a + b ∈ W.carrier) },\n          zero_mem' := (_ : 0 ∈ W.carrier) }.toAddSubsemigroup.carrier\n⊢ ∑ x in f.support, ↑f x • ↑(of k G) x • v ∈ ↑W\n[PROOFSTEP]\nexact Submodule.sum_smul_mem W _ fun g _ => h g v hv\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\n⊢ ∀ (x : AddMonoidAlgebra k G), (fun n f => n • f) 0 x = 0\n[PROOFSTEP]\nintros\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nx✝ : AddMonoidAlgebra k G\n⊢ (fun n f => n • f) 0 x✝ = 0\n[PROOFSTEP]\nrefine Finsupp.ext fun _ => ?_\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nx✝¹ : AddMonoidAlgebra k G\nx✝ : G\n⊢ ↑((fun n f => n • f) 0 x✝¹) x✝ = ↑0 x✝\n[PROOFSTEP]\nsimp [-nsmul_eq_mul, add_smul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\n⊢ ∀ (n : ℕ) (x : AddMonoidAlgebra k G), (fun n f => n • f) (n + 1) x = x + (fun n f => n • f) n x\n[PROOFSTEP]\nintros\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nn✝ : ℕ\nx✝ : AddMonoidAlgebra k G\n⊢ (fun n f => n • f) (n✝ + 1) x✝ = x✝ + (fun n f => n • f) n✝ x✝\n[PROOFSTEP]\nrefine\n  Finsupp.ext fun _ =>\n    ?_\n      -- Porting note: The definition of `nsmul_succ` is different, so next line is required.\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nn✝ : ℕ\nx✝¹ : AddMonoidAlgebra k G\nx✝ : G\n⊢ ↑((fun n f => n • f) (n✝ + 1) x✝¹) x✝ = ↑(x✝¹ + (fun n f => n • f) n✝ x✝¹) x✝\n[PROOFSTEP]\nsimp only [fun n => Nat.add_comm n 1]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nn✝ : ℕ\nx✝¹ : AddMonoidAlgebra k G\nx✝ : G\n⊢ ↑((1 + n✝) • x✝¹) x✝ = ↑(x✝¹ + n✝ • x✝¹) x✝\n[PROOFSTEP]\nsimp [-nsmul_eq_mul, add_smul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : AddMonoidAlgebra k G\n⊢ f * (g + h) = f * g + f * h\n[PROOFSTEP]\nhaveI := Classical.decEq G\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : AddMonoidAlgebra k G\nthis : DecidableEq G\n⊢ f * (g + h) = f * g + f * h\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : AddMonoidAlgebra k G\nthis : DecidableEq G\n⊢ (sum f fun a₁ b₁ => sum (g + h) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =\n    (sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) +\n      sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\n[PROOFSTEP]\nrefine Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_add_index ?_ ?_)) ?_\n[GOAL]\ncase refine_1\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : AddMonoidAlgebra k G\nthis : DecidableEq G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), a ∈ g.support ∪ h.support → single (a₁ + a) (b₁ * 0) = 0\n[PROOFSTEP]\nsimp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]\n[GOAL]\ncase refine_2\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : AddMonoidAlgebra k G\nthis : DecidableEq G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G),\n    a ∈ g.support ∪ h.support →\n      ∀ (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\n[PROOFSTEP]\nsimp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]\n[GOAL]\ncase refine_3\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : AddMonoidAlgebra k G\nthis : DecidableEq G\n⊢ (sum f fun a₁ b₁ => (sum g fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) + sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =\n    (sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) +\n      sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\n[PROOFSTEP]\nsimp only [mul_add, mul_zero, single_zero, single_add, forall_true_iff, sum_add]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : AddMonoidAlgebra k G\n⊢ (f + g) * h = f * h + g * h\n[PROOFSTEP]\nhaveI := Classical.decEq G\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : AddMonoidAlgebra k G\nthis : DecidableEq G\n⊢ (f + g) * h = f * h + g * h\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : AddMonoidAlgebra k G\nthis : DecidableEq G\n⊢ (sum (f + g) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =\n    (sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) +\n      sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\n[PROOFSTEP]\nrefine Eq.trans (sum_add_index ?_ ?_) ?_\n[GOAL]\ncase refine_1\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : AddMonoidAlgebra k G\nthis : DecidableEq G\n⊢ ∀ (a : G), a ∈ f.support ∪ g.support → (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\n[PROOFSTEP]\nsimp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]\n[GOAL]\ncase refine_2\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : AddMonoidAlgebra k G\nthis : DecidableEq G\n⊢ ∀ (a : G),\n    a ∈ f.support ∪ g.support →\n      ∀ (b₁ b₂ : k),\n        (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n          (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nsimp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]\n[GOAL]\ncase refine_3\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf g h : AddMonoidAlgebra k G\nthis : DecidableEq G\n⊢ ((sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) +\n      sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =\n    (sum f fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) +\n      sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\n[PROOFSTEP]\nsimp only [add_mul, zero_mul, single_zero, single_add, forall_true_iff, sum_zero, sum_add]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf : AddMonoidAlgebra k G\n⊢ 0 * f = 0\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf : AddMonoidAlgebra k G\n⊢ (sum 0 fun a₁ b₁ => sum f fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) = 0\n[PROOFSTEP]\nexact sum_zero_index\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf : AddMonoidAlgebra k G\n⊢ f * 0 = 0\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : AddCommMonoid (G →₀ k) := Finsupp.addCommMonoid\nf : AddMonoidAlgebra k G\n⊢ (sum f fun a₁ b₁ => sum 0 fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) = 0\n[PROOFSTEP]\nexact Eq.trans (congr_arg (sum f) (funext₂ fun a₁ b₁ => sum_zero_index)) sum_zero\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ f * g * h = f * (g * h)\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ (sum (sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) fun a₁ b₁ =>\n      sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =\n    sum f fun a₁ b₁ =>\n      sum (sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\n[PROOFSTEP]\nrw [sum_sum_index]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ (sum f fun a b =>\n      sum (sum g fun a₂ b₂ => single (a + a₂) (b * b₂)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =\n    sum f fun a₁ b₁ =>\n      sum (sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ (fun a b =>\n      sum (sum g fun a₂ b₂ => single (a + a₂) (b * b₂)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =\n    fun a₁ b₁ =>\n    sum (sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\next a₁ b₁\n[GOAL]\ncase e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ (sum (sum g fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =\n    sum (sum g fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nrw [sum_sum_index, sum_sum_index]\n[GOAL]\ncase e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ (sum g fun a b => sum (single (a₁ + a) (b₁ * b)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =\n    sum g fun a b => sum (sum h fun a₂ b₂ => single (a + a₂) (b * b₂)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g.h.h.e_g\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ (fun a b => sum (single (a₁ + a) (b₁ * b)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) = fun a b =>\n    sum (sum h fun a₂ b₂ => single (a + a₂) (b * b₂)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\next a₂ b₂\n[GOAL]\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum (single (a₁ + a₂) (b₁ * b₂)) fun a₁ b₁ => sum h fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)) =\n    sum (sum h fun a₂_1 b₂_1 => single (a₂ + a₂_1) (b₂ * b₂_1)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nrw [sum_sum_index, sum_single_index]\n[GOAL]\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum h fun a₂_1 b₂_1 => single (a₁ + a₂ + a₂_1) (b₁ * b₂ * b₂_1)) =\n    sum h fun a b => sum (single (a₂ + a) (b₂ * b)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum h fun a₂_1 b₂ => single (a₁ + a₂ + a₂_1) (0 * b₂)) = 0\ncase e_g.h.h.e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\ncase e_g.h.h.e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g.h.h.e_g.h.h.e_g\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (fun a₂_1 b₂_1 => single (a₁ + a₂ + a₂_1) (b₁ * b₂ * b₂_1)) = fun a b =>\n    sum (single (a₂ + a) (b₂ * b)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum h fun a₂_1 b₂ => single (a₁ + a₂ + a₂_1) (0 * b₂)) = 0\ncase e_g.h.h.e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\ncase e_g.h.h.e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\next a₃ b₃\n[GOAL]\ncase e_g.h.h.e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\na₃ : G\nb₃ : k\n⊢ single (a₁ + a₂ + a₃) (b₁ * b₂ * b₃) = sum (single (a₂ + a₃) (b₂ * b₃)) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum h fun a₂_1 b₂ => single (a₁ + a₂ + a₂_1) (0 * b₂)) = 0\ncase e_g.h.h.e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\ncase e_g.h.h.e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nrw [sum_single_index, mul_assoc, add_assoc]\n[GOAL]\ncase e_g.h.h.e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\na₃ : G\nb₃ : k\n⊢ single (a₁ + (a₂ + a₃)) (b₁ * 0) = 0\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum h fun a₂_1 b₂ => single (a₁ + a₂ + a₂_1) (0 * b₂)) = 0\ncase e_g.h.h.e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\ncase e_g.h.h.e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nall_goals simp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\na₃ : G\nb₃ : k\n⊢ single (a₁ + (a₂ + a₃)) (b₁ * 0) = 0\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ (sum h fun a₂_1 b₂ => single (a₁ + a₂ + a₂_1) (0 * b₂)) = 0\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\na₂ : G\nb₂ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), single (a₁ + a) (b₁ * 0) = 0\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁_1 b₂ : k), single (a₁ + a) (b₁ * (b₁_1 + b₂)) = single (a₁ + a) (b₁ * b₁_1) + single (a₁ + a) (b₁ * b₂)\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\na₁ : G\nb₁ : k\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G), (sum h fun a₂ b₂ => single (a + a₂) (0 * b₂)) = 0\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddSemigroup G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf g h : AddMonoidAlgebra k G\n⊢ ∀ (a : G) (b₁ b₂ : k),\n    (sum h fun a₂ b₂_1 => single (a + a₂) ((b₁ + b₂) * b₂_1)) =\n      (sum h fun a₂ b₂ => single (a + a₂) (b₁ * b₂)) + sum h fun a₂ b₂_1 => single (a + a₂) (b₂ * b₂_1)\n[PROOFSTEP]\nsimp only [single_zero, single_add, forall_true_iff, add_mul, mul_add, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddZeroClass G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf : AddMonoidAlgebra k G\n⊢ 1 * f = f\n[PROOFSTEP]\nsimp only [mul_def, one_def, sum_single_index, zero_mul, single_zero, sum_zero, zero_add, one_mul, sum_single]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddZeroClass G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nf : AddMonoidAlgebra k G\n⊢ f * 1 = f\n[PROOFSTEP]\nsimp only [mul_def, one_def, sum_single_index, mul_zero, single_zero, sum_zero, add_zero, mul_one, sum_single]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddZeroClass G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\n⊢ NatCast.natCast 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddZeroClass G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nx✝ : ℕ\n⊢ NatCast.natCast (x✝ + 1) = NatCast.natCast x✝ + 1\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddZeroClass G\nsrc✝ : NonUnitalNonAssocSemiring (AddMonoidAlgebra k G) := nonUnitalNonAssocSemiring\nx✝ : ℕ\n⊢ Finsupp.single 0 ↑x✝ + Finsupp.single 0 1 = single 0 ↑x✝ + 1\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Ring k\ninst✝ : AddZeroClass G\nsrc✝¹ : AddCommGroup (AddMonoidAlgebra k G) := addCommGroup\nsrc✝ : NonAssocSemiring (AddMonoidAlgebra k G) := nonAssocSemiring\nn : ℕ\n⊢ IntCast.intCast ↑n = ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Ring k\ninst✝ : AddZeroClass G\nsrc✝¹ : AddCommGroup (AddMonoidAlgebra k G) := addCommGroup\nsrc✝ : NonAssocSemiring (AddMonoidAlgebra k G) := nonAssocSemiring\nn : ℕ\n⊢ single 0 ↑n = ↑n\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Ring k\ninst✝ : AddZeroClass G\nsrc✝¹ : AddCommGroup (AddMonoidAlgebra k G) := addCommGroup\nsrc✝ : NonAssocSemiring (AddMonoidAlgebra k G) := nonAssocSemiring\nn : ℕ\n⊢ IntCast.intCast (Int.negSucc n) = -↑(n + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Ring k\ninst✝ : AddZeroClass G\nsrc✝¹ : AddCommGroup (AddMonoidAlgebra k G) := addCommGroup\nsrc✝ : NonAssocSemiring (AddMonoidAlgebra k G) := nonAssocSemiring\nn : ℕ\n⊢ -Finsupp.single 0 1 + -Finsupp.single 0 ↑n = -1 + -↑n\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddMonoid G\na : G\nb : k\n⊢ single a b ^ 0 = single (0 • a) (b ^ 0)\n[PROOFSTEP]\nsimp only [pow_zero, zero_nsmul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddMonoid G\na : G\nb : k\n⊢ 1 = single 0 1\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddMonoid G\na : G\nb : k\nn : ℕ\n⊢ single a b ^ (n + 1) = single ((n + 1) • a) (b ^ (n + 1))\n[PROOFSTEP]\nrw [pow_succ, pow_succ, single_pow n, single_mul_single, add_comm, add_nsmul, one_nsmul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Zero α\ninst✝¹ : Zero α₂\nF : Type u_6\ninst✝ : ZeroHomClass F α α₂\nf : F\n⊢ mapDomain (↑f) 1 = 1\n[PROOFSTEP]\nsimp_rw [one_def, mapDomain_single, map_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Add α\ninst✝¹ : Add α₂\nF : Type u_6\ninst✝ : AddHomClass F α α₂\nf : F\nx y : AddMonoidAlgebra β α\n⊢ mapDomain (↑f) (x * y) = mapDomain (↑f) x * mapDomain (↑f) y\n[PROOFSTEP]\nsimp_rw [mul_def, mapDomain_sum, mapDomain_single, map_add]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Add α\ninst✝¹ : Add α₂\nF : Type u_6\ninst✝ : AddHomClass F α α₂\nf : F\nx y : AddMonoidAlgebra β α\n⊢ (sum x fun a b => sum y fun a_1 b_1 => single (↑f a + ↑f a_1) (b * b_1)) =\n    sum (mapDomain (↑f) x) fun a₁ b₁ => sum (mapDomain (↑f) y) fun a₂ b₂ => single (a₁ + a₂) (b₁ * b₂)\n[PROOFSTEP]\nrw [Finsupp.sum_mapDomain_index]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Add α\ninst✝¹ : Add α₂\nF : Type u_6\ninst✝ : AddHomClass F α α₂\nf : F\nx y : AddMonoidAlgebra β α\n⊢ (sum x fun a b => sum y fun a_1 b_1 => single (↑f a + ↑f a_1) (b * b_1)) =\n    sum x fun a m => sum (mapDomain (↑f) y) fun a₂ b₂ => single (↑f a + a₂) (m * b₂)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Add α\ninst✝¹ : Add α₂\nF : Type u_6\ninst✝ : AddHomClass F α α₂\nf : F\nx y : AddMonoidAlgebra β α\n⊢ (fun a b => sum y fun a_1 b_1 => single (↑f a + ↑f a_1) (b * b_1)) = fun a m =>\n    sum (mapDomain (↑f) y) fun a₂ b₂ => single (↑f a + a₂) (m * b₂)\n[PROOFSTEP]\next a b\n[GOAL]\ncase e_g.h.h\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Add α\ninst✝¹ : Add α₂\nF : Type u_6\ninst✝ : AddHomClass F α α₂\nf : F\nx y : AddMonoidAlgebra β α\na : α\nb : β\n⊢ (sum y fun a_1 b_1 => single (↑f a + ↑f a_1) (b * b_1)) =\n    sum (mapDomain (↑f) y) fun a₂ b₂ => single (↑f a + a₂) (b * b₂)\n[PROOFSTEP]\nrw [Finsupp.sum_mapDomain_index]\n[GOAL]\ncase e_g.h.h.h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Add α\ninst✝¹ : Add α₂\nF : Type u_6\ninst✝ : AddHomClass F α α₂\nf : F\nx y : AddMonoidAlgebra β α\na : α\nb : β\n⊢ ∀ (b_1 : α₂), single (↑f a + b_1) (b * 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_g.h.h.h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Add α\ninst✝¹ : Add α₂\nF : Type u_6\ninst✝ : AddHomClass F α α₂\nf : F\nx y : AddMonoidAlgebra β α\na : α\nb : β\n⊢ ∀ (b_1 : α₂) (m₁ m₂ : β),\n    single (↑f a + b_1) (b * (m₁ + m₂)) = single (↑f a + b_1) (b * m₁) + single (↑f a + b_1) (b * m₂)\n[PROOFSTEP]\nsimp [mul_add]\n[GOAL]\ncase h_zero\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Add α\ninst✝¹ : Add α₂\nF : Type u_6\ninst✝ : AddHomClass F α α₂\nf : F\nx y : AddMonoidAlgebra β α\n⊢ ∀ (b : α₂), (sum (mapDomain (↑f) y) fun a₂ b₂ => single (b + a₂) (0 * b₂)) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_add\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁴ : Semiring k\nα : Type u_3\nβ : Type u_4\nα₂ : Type u_5\ninst✝³ : Semiring β\ninst✝² : Add α\ninst✝¹ : Add α₂\nF : Type u_6\ninst✝ : AddHomClass F α α₂\nf : F\nx y : AddMonoidAlgebra β α\n⊢ ∀ (b : α₂) (m₁ m₂ : β),\n    (sum (mapDomain (↑f) y) fun a₂ b₂ => single (b + a₂) ((m₁ + m₂) * b₂)) =\n      (sum (mapDomain (↑f) y) fun a₂ b₂ => single (b + a₂) (m₁ * b₂)) +\n        sum (mapDomain (↑f) y) fun a₂ b₂ => single (b + a₂) (m₂ * b₂)\n[PROOFSTEP]\nsimp [add_mul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\na b : Multiplicative G\n⊢ (fun a => single a 1) (a * b) = (fun a => single a 1) a * (fun a => single a 1) b\n[PROOFSTEP]\nsimp only [mul_def, mul_one, sum_single_index, single_eq_zero, mul_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\na b : Multiplicative G\n⊢ single (a * b) 1 = single (a + b) 1\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝² : Semiring k\ninst✝¹ : Nontrivial k\ninst✝ : AddZeroClass G\na b : Multiplicative G\nh : ↑(of k G) a = ↑(of k G) b\n⊢ a = b\n[PROOFSTEP]\nsimpa using (single_eq_single_iff _ _ _ _).mp h\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddZeroClass G\nf : AddMonoidAlgebra k G\nr : k\nx a : G\n⊢ a + 0 = x ↔ a = x\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddZeroClass G\nf : AddMonoidAlgebra k G\nr : k\nx a : G\n⊢ 0 + a = x ↔ a = x\n[PROOFSTEP]\nrw [zero_add]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddMonoid G\np : AddMonoidAlgebra k G → Prop\nf : AddMonoidAlgebra k G\nhM : ∀ (g : G), p (↑(of k G) (↑Multiplicative.ofAdd g))\nhadd : ∀ (f g : AddMonoidAlgebra k G), p f → p g → p (f + g)\nhsmul : ∀ (r : k) (f : AddMonoidAlgebra k G), p f → p (r • f)\n⊢ p f\n[PROOFSTEP]\nrefine' Finsupp.induction_linear f _ (fun f g hf hg => hadd f g hf hg) fun g r => _\n[GOAL]\ncase refine'_1\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddMonoid G\np : AddMonoidAlgebra k G → Prop\nf : AddMonoidAlgebra k G\nhM : ∀ (g : G), p (↑(of k G) (↑Multiplicative.ofAdd g))\nhadd : ∀ (f g : AddMonoidAlgebra k G), p f → p g → p (f + g)\nhsmul : ∀ (r : k) (f : AddMonoidAlgebra k G), p f → p (r • f)\n⊢ p 0\n[PROOFSTEP]\nsimpa using hsmul 0 (of k G (Multiplicative.ofAdd 0)) (hM 0)\n[GOAL]\ncase refine'_2\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddMonoid G\np : AddMonoidAlgebra k G → Prop\nf : AddMonoidAlgebra k G\nhM : ∀ (g : G), p (↑(of k G) (↑Multiplicative.ofAdd g))\nhadd : ∀ (f g : AddMonoidAlgebra k G), p f → p g → p (f + g)\nhsmul : ∀ (r : k) (f : AddMonoidAlgebra k G), p f → p (r • f)\ng : G\nr : k\n⊢ p (Finsupp.single g r)\n[PROOFSTEP]\nconvert\n  hsmul r (of k G (Multiplicative.ofAdd g))\n    (hM g)\n      -- Porting note: Was `simp only`.\n[GOAL]\ncase h.e'_1\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddMonoid G\np : AddMonoidAlgebra k G → Prop\nf : AddMonoidAlgebra k G\nhM : ∀ (g : G), p (↑(of k G) (↑Multiplicative.ofAdd g))\nhadd : ∀ (f g : AddMonoidAlgebra k G), p f → p g → p (f + g)\nhsmul : ∀ (r : k) (f : AddMonoidAlgebra k G), p f → p (r • f)\ng : G\nr : k\n⊢ Finsupp.single g r = r • ↑(of k G) (↑Multiplicative.ofAdd g)\n[PROOFSTEP]\nrw [of_apply, toAdd_ofAdd, smul_single', mul_one]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd\nx y : AddMonoidAlgebra k G\n⊢ Equiv.toFun\n      { toFun := equivMapDomain Multiplicative.ofAdd, invFun := src✝.invFun,\n        left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      (x * y) =\n    Equiv.toFun\n        { toFun := equivMapDomain Multiplicative.ofAdd, invFun := src✝.invFun,\n          left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        x *\n      Equiv.toFun\n        { toFun := equivMapDomain Multiplicative.ofAdd, invFun := src✝.invFun,\n          left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        y\n[PROOFSTEP]\ndsimp only []\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd\nx y : AddMonoidAlgebra k G\n⊢ equivMapDomain Multiplicative.ofAdd (x * y) =\n    equivMapDomain Multiplicative.ofAdd x * equivMapDomain Multiplicative.ofAdd y\n[PROOFSTEP]\nrepeat' rw [equivMapDomain_eq_mapDomain (M := k)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd\nx y : AddMonoidAlgebra k G\n⊢ equivMapDomain Multiplicative.ofAdd (x * y) =\n    equivMapDomain Multiplicative.ofAdd x * equivMapDomain Multiplicative.ofAdd y\n[PROOFSTEP]\nrw [equivMapDomain_eq_mapDomain (M := k)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd\nx y : AddMonoidAlgebra k G\n⊢ Finsupp.mapDomain (↑Multiplicative.ofAdd) (x * y) =\n    equivMapDomain Multiplicative.ofAdd x * equivMapDomain Multiplicative.ofAdd y\n[PROOFSTEP]\nrw [equivMapDomain_eq_mapDomain (M := k)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd\nx y : AddMonoidAlgebra k G\n⊢ Finsupp.mapDomain (↑Multiplicative.ofAdd) (x * y) =\n    Finsupp.mapDomain (↑Multiplicative.ofAdd) x * equivMapDomain Multiplicative.ofAdd y\n[PROOFSTEP]\nrw [equivMapDomain_eq_mapDomain (M := k)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd\nx y : AddMonoidAlgebra k G\n⊢ Finsupp.mapDomain (↑Multiplicative.ofAdd) (x * y) =\n    Finsupp.mapDomain (↑Multiplicative.ofAdd) x * Finsupp.mapDomain (↑Multiplicative.ofAdd) y\n[PROOFSTEP]\nrw [equivMapDomain_eq_mapDomain (M := k)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd\nx y : AddMonoidAlgebra k G\n⊢ Finsupp.mapDomain (↑Multiplicative.ofAdd) (x * y) =\n    Finsupp.mapDomain (↑Multiplicative.ofAdd) x * Finsupp.mapDomain (↑Multiplicative.ofAdd) y\n[PROOFSTEP]\ndsimp [Multiplicative.ofAdd]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Add G\nsrc✝ : (G →₀ k) ≃+ (Multiplicative G →₀ k) := Finsupp.domCongr Multiplicative.ofAdd\nx y : AddMonoidAlgebra k G\n⊢ Finsupp.mapDomain (fun x => x) (x * y) = Finsupp.mapDomain (fun x => x) x * Finsupp.mapDomain (fun x => x) y\n[PROOFSTEP]\nexact MonoidAlgebra.mapDomain_mul (α := Multiplicative G) (β := k) (MulHom.id (Multiplicative G)) x y\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul\nx y : MonoidAlgebra k G\n⊢ Equiv.toFun\n      { toFun := equivMapDomain Additive.ofMul, invFun := src✝.invFun,\n        left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      (x * y) =\n    Equiv.toFun\n        { toFun := equivMapDomain Additive.ofMul, invFun := src✝.invFun,\n          left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        x *\n      Equiv.toFun\n        { toFun := equivMapDomain Additive.ofMul, invFun := src✝.invFun,\n          left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        y\n[PROOFSTEP]\ndsimp only []\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul\nx y : MonoidAlgebra k G\n⊢ equivMapDomain Additive.ofMul (x * y) = equivMapDomain Additive.ofMul x * equivMapDomain Additive.ofMul y\n[PROOFSTEP]\nrepeat' rw [equivMapDomain_eq_mapDomain (M := k)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul\nx y : MonoidAlgebra k G\n⊢ equivMapDomain Additive.ofMul (x * y) = equivMapDomain Additive.ofMul x * equivMapDomain Additive.ofMul y\n[PROOFSTEP]\nrw [equivMapDomain_eq_mapDomain (M := k)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul\nx y : MonoidAlgebra k G\n⊢ Finsupp.mapDomain (↑Additive.ofMul) (x * y) = equivMapDomain Additive.ofMul x * equivMapDomain Additive.ofMul y\n[PROOFSTEP]\nrw [equivMapDomain_eq_mapDomain (M := k)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul\nx y : MonoidAlgebra k G\n⊢ Finsupp.mapDomain (↑Additive.ofMul) (x * y) = Finsupp.mapDomain (↑Additive.ofMul) x * equivMapDomain Additive.ofMul y\n[PROOFSTEP]\nrw [equivMapDomain_eq_mapDomain (M := k)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul\nx y : MonoidAlgebra k G\n⊢ Finsupp.mapDomain (↑Additive.ofMul) (x * y) =\n    Finsupp.mapDomain (↑Additive.ofMul) x * Finsupp.mapDomain (↑Additive.ofMul) y\n[PROOFSTEP]\nrw [equivMapDomain_eq_mapDomain (M := k)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul\nx y : MonoidAlgebra k G\n⊢ Finsupp.mapDomain (↑Additive.ofMul) (x * y) =\n    Finsupp.mapDomain (↑Additive.ofMul) x * Finsupp.mapDomain (↑Additive.ofMul) y\n[PROOFSTEP]\ndsimp [Additive.ofMul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : Mul G\nsrc✝ : (G →₀ k) ≃+ (Additive G →₀ k) := Finsupp.domCongr Additive.ofMul\nx y : MonoidAlgebra k G\n⊢ Finsupp.mapDomain (fun x => x) (x * y) = Finsupp.mapDomain (fun x => x) x * Finsupp.mapDomain (fun x => x) y\n[PROOFSTEP]\nconvert MonoidAlgebra.mapDomain_mul (β := k) (MulHom.id G) x y\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddMonoid G\nsrc✝ : k →+ G →₀ k := singleAddHom 0\nx y : k\n⊢ OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = ZeroHom.toFun (↑src✝) 1) } (x * y) =\n    OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = ZeroHom.toFun (↑src✝) 1) } x *\n      OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = ZeroHom.toFun (↑src✝) 1) } y\n[PROOFSTEP]\nsimp only [singleAddHom, single_mul_single, zero_add]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddCommMonoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)\n⊢ ∀ (x y : (AddMonoidAlgebra k G)ᵐᵒᵖ),\n    Equiv.toFun src✝.toEquiv (x * y) = Equiv.toFun src✝.toEquiv x * Equiv.toFun src✝.toEquiv y\n[PROOFSTEP]\nrw [Equiv.toFun_as_coe, AddEquiv.toEquiv_eq_coe, AddEquiv.coe_toEquiv, ← AddEquiv.coe_toAddMonoidHom]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddCommMonoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)\n⊢ ∀ (x y : (AddMonoidAlgebra k G)ᵐᵒᵖ),\n    ↑(AddEquiv.toAddMonoidHom src✝) (x * y) = ↑(AddEquiv.toAddMonoidHom src✝) x * ↑(AddEquiv.toAddMonoidHom src✝) y\n[PROOFSTEP]\nrefine\n  Iff.mpr (AddMonoidHom.map_mul_iff (R := (AddMonoidAlgebra k G)ᵐᵒᵖ) (S := AddMonoidAlgebra kᵐᵒᵖ G) _)\n    ?_\n      -- Porting note: Was `ext`.\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddCommMonoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)\n⊢ AddMonoidHom.compr₂ AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝) =\n    AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝))\n      (AddEquiv.toAddMonoidHom src✝)\n[PROOFSTEP]\nrefine\n  AddMonoidHom.mul_op_ext _ _ <|\n    addHom_ext' fun i₁ =>\n      AddMonoidHom.ext fun r₁ =>\n        AddMonoidHom.mul_op_ext _ _ <|\n          addHom_ext' fun i₂ =>\n            AddMonoidHom.ext fun r₂ =>\n              ?_\n                -- Porting note: `reducible` cannot be `local` so proof gets long.\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddCommMonoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)\ni₁ : G\nr₁ : k\ni₂ : G\nr₂ : k\n⊢ ↑(AddMonoidHom.comp\n          (AddMonoidHom.comp\n            (↑(AddMonoidHom.comp\n                  (AddMonoidHom.comp (AddMonoidHom.compr₂ AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝))\n                    (AddEquiv.toAddMonoidHom opAddEquiv))\n                  (singleAddHom i₁))\n              r₁)\n            (AddEquiv.toAddMonoidHom opAddEquiv))\n          (singleAddHom i₂))\n      r₂ =\n    ↑(AddMonoidHom.comp\n          (AddMonoidHom.comp\n            (↑(AddMonoidHom.comp\n                  (AddMonoidHom.comp\n                    (AddMonoidHom.compl₂ (AddMonoidHom.comp AddMonoidHom.mul (AddEquiv.toAddMonoidHom src✝))\n                      (AddEquiv.toAddMonoidHom src✝))\n                    (AddEquiv.toAddMonoidHom opAddEquiv))\n                  (singleAddHom i₁))\n              r₁)\n            (AddEquiv.toAddMonoidHom opAddEquiv))\n          (singleAddHom i₂))\n      r₂\n[PROOFSTEP]\ndsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddCommMonoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)\ni₁ : G\nr₁ : k\ni₂ : G\nr₂ : k\n⊢ ↑(AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv))\n      (↑opAddEquiv (Finsupp.single i₁ r₁) * ↑opAddEquiv (Finsupp.single i₂ r₂)) =\n    ↑(AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)) (↑opAddEquiv (Finsupp.single i₁ r₁)) *\n      ↑(AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)) (↑opAddEquiv (Finsupp.single i₂ r₂))\n[PROOFSTEP]\nrw [AddEquiv.trans_apply, AddEquiv.trans_apply, AddEquiv.trans_apply, MulOpposite.opAddEquiv_apply,\n  MulOpposite.opAddEquiv_symm_apply, MulOpposite.unop_mul (α := AddMonoidAlgebra k G)]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddCommMonoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)\ni₁ : G\nr₁ : k\ni₂ : G\nr₂ : k\n⊢ ↑(mapRange.addEquiv opAddEquiv) (unop (op (Finsupp.single i₂ r₂)) * unop (op (Finsupp.single i₁ r₁))) =\n    ↑(mapRange.addEquiv opAddEquiv) (unop (op (Finsupp.single i₁ r₁))) *\n      ↑(mapRange.addEquiv opAddEquiv) (unop (op (Finsupp.single i₂ r₂)))\n[PROOFSTEP]\ndsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddCommMonoid G\nsrc✝ : (G →₀ k)ᵐᵒᵖ ≃+ (G →₀ kᵐᵒᵖ) := AddEquiv.trans (AddEquiv.symm opAddEquiv) (mapRange.addEquiv opAddEquiv)\ni₁ : G\nr₁ : k\ni₂ : G\nr₂ : k\n⊢ mapRange op (_ : ↑opAddEquiv 0 = 0) (Finsupp.single i₂ r₂ * Finsupp.single i₁ r₁) =\n    mapRange op (_ : ↑opAddEquiv 0 = 0) (Finsupp.single i₁ r₁) *\n      mapRange op (_ : ↑opAddEquiv 0 = 0) (Finsupp.single i₂ r₂)\n[PROOFSTEP]\nsimp only [mapRange_single, single_mul_single, ← op_mul, add_comm]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddCommMonoid G\nr : k\nx : G\n⊢ ↑AddMonoidAlgebra.opRingEquiv (op (single x r)) = single x (op r)\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝¹ : Semiring k\ninst✝ : AddCommMonoid G\nr : kᵐᵒᵖ\nx : Gᵐᵒᵖ\n⊢ ↑(RingEquiv.symm AddMonoidAlgebra.opRingEquiv) (single x r) = op (single x (unop r))\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring k\ninst✝¹ : Algebra R k\ninst✝ : AddMonoid G\nsrc✝ : R →+* AddMonoidAlgebra k G := RingHom.comp singleZeroRingHom (algebraMap R k)\nr : R\nf : (fun x => AddMonoidAlgebra k G) r\n⊢ ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        r *\n      f =\n    f *\n      ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        r\n[PROOFSTEP]\nrefine Finsupp.ext fun _ => ?_\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring k\ninst✝¹ : Algebra R k\ninst✝ : AddMonoid G\nsrc✝ : R →+* AddMonoidAlgebra k G := RingHom.comp singleZeroRingHom (algebraMap R k)\nr : R\nf : (fun x => AddMonoidAlgebra k G) r\nx✝ : G\n⊢ ↑(↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n                map_add' :=\n                  (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n            r *\n          f)\n      x✝ =\n    ↑(f *\n          ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n                map_add' :=\n                  (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n            r)\n      x✝\n[PROOFSTEP]\nsimp [single_zero_mul_apply, mul_single_zero_apply, Algebra.commutes]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring k\ninst✝¹ : Algebra R k\ninst✝ : AddMonoid G\nsrc✝ : R →+* AddMonoidAlgebra k G := RingHom.comp singleZeroRingHom (algebraMap R k)\nr : R\na : (fun x => AddMonoidAlgebra k G) r\n⊢ r • a =\n    ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        r *\n      a\n[PROOFSTEP]\nrefine\n  Finsupp.ext fun _ =>\n    ?_\n      -- Porting note: Newly required.\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring k\ninst✝¹ : Algebra R k\ninst✝ : AddMonoid G\nsrc✝ : R →+* AddMonoidAlgebra k G := RingHom.comp singleZeroRingHom (algebraMap R k)\nr : R\na : (fun x => AddMonoidAlgebra k G) r\nx✝ : G\n⊢ ↑(r • a) x✝ =\n    ↑(↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n                map_add' :=\n                  (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n            r *\n          a)\n      x✝\n[PROOFSTEP]\nrw [Finsupp.coe_smul]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring k\ninst✝¹ : Algebra R k\ninst✝ : AddMonoid G\nsrc✝ : R →+* AddMonoidAlgebra k G := RingHom.comp singleZeroRingHom (algebraMap R k)\nr : R\na : (fun x => AddMonoidAlgebra k G) r\nx✝ : G\n⊢ (r • ↑a) x✝ =\n    ↑(↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n                map_add' :=\n                  (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n            r *\n          a)\n      x✝\n[PROOFSTEP]\nsimp [single_zero_mul_apply, Algebra.smul_def, Pi.smul_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring k\ninst✝¹ : Algebra R k\ninst✝ : AddMonoid G\nsrc✝ : k →+* AddMonoidAlgebra k G := singleZeroRingHom\nr : R\n⊢ OneHom.toFun\n      (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n      (↑(algebraMap R k) r) =\n    ↑(algebraMap R (AddMonoidAlgebra k G)) r\n[PROOFSTEP]\nrefine Finsupp.ext fun _ => ?_\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring k\ninst✝¹ : Algebra R k\ninst✝ : AddMonoid G\nsrc✝ : k →+* AddMonoidAlgebra k G := singleZeroRingHom\nr : R\nx✝ : G\n⊢ ↑(OneHom.toFun\n          (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : k), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n          (↑(algebraMap R k) r))\n      x✝ =\n    ↑(↑(algebraMap R (AddMonoidAlgebra k G)) r) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring k\ninst✝¹ : Algebra R k\ninst✝ : AddMonoid G\nsrc✝ : k →+* AddMonoidAlgebra k G := singleZeroRingHom\nr : R\nx✝ : G\n⊢ ↑(Finsupp.single 0 (↑(algebraMap R k) r)) x✝ = ↑(↑(algebraMap R (AddMonoidAlgebra k G)) r) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : AddMonoid G\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nf : A →ₐ[k] B\ng : Multiplicative G →* B\nh_comm : ∀ (x : A) (y : Multiplicative G), Commute (↑f x) (↑g y)\nsrc✝ : AddMonoidAlgebra A G →+* B := liftNCRingHom (↑f) g h_comm\n⊢ ∀ (r : k),\n    OneHom.toFun\n        (↑↑{\n              toMonoidHom :=\n                {\n                  toOneHom :=\n                    { toFun := ↑(liftNCRingHom (↑f) g h_comm), map_one' := (_ : OneHom.toFun (↑↑src✝) 1 = 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : AddMonoidAlgebra A G),\n                        OneHom.toFun (↑↑src✝) (x * y) = OneHom.toFun (↑↑src✝) x * OneHom.toFun (↑↑src✝) y) },\n              map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n              map_add' :=\n                (_ :\n                  ∀ (x y : AddMonoidAlgebra A G),\n                    OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n        (↑(algebraMap k (AddMonoidAlgebra A G)) r) =\n      ↑(algebraMap k B) r\n[PROOFSTEP]\nsimp [liftNCRingHom]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : AddMonoid G\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : Multiplicative G →* A\nf : MonoidAlgebra k G\n⊢ ↑(↑(lift k G A) F) f = sum f fun a b => b • ↑F (↑Multiplicative.ofAdd a)\n[PROOFSTEP]\nsimp only [lift_apply', Algebra.smul_def]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : AddMonoid G\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : Multiplicative G →* A\nx : Multiplicative G\n⊢ ↑(↑(lift k G A) F) (↑(of k G) x) = ↑F x\n[PROOFSTEP]\nrw [of_apply, ← lift_symm_apply, Equiv.symm_apply_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : AddMonoid G\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : Multiplicative G →* A\na : G\nb : k\n⊢ ↑(↑(lift k G A) F) (single a b) = b • ↑F (↑Multiplicative.ofAdd a)\n[PROOFSTEP]\nrw [lift_def, liftNC_single, Algebra.smul_def, AddMonoidHom.coe_coe]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : AddMonoid G\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : AddMonoidAlgebra k G →ₐ[k] A\nf : MonoidAlgebra k G\n⊢ ↑F f = sum f fun a b => b • ↑F (single a 1)\n[PROOFSTEP]\nconv_lhs =>\n  rw [lift_unique' F]\n  simp [lift_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : AddMonoid G\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : AddMonoidAlgebra k G →ₐ[k] A\nf : MonoidAlgebra k G\n| ↑F f\n[PROOFSTEP]\n  rw [lift_unique' F]\n  simp [lift_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : AddMonoid G\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : AddMonoidAlgebra k G →ₐ[k] A\nf : MonoidAlgebra k G\n| ↑F f\n[PROOFSTEP]\n  rw [lift_unique' F]\n  simp [lift_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : AddMonoid G\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : AddMonoidAlgebra k G →ₐ[k] A\nf : MonoidAlgebra k G\n| ↑F f\n[PROOFSTEP]\nrw [lift_unique' F]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : AddMonoid G\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nF : AddMonoidAlgebra k G →ₐ[k] A\nf : MonoidAlgebra k G\n| ↑(↑(lift k G A) (MonoidHom.comp (↑F) (of k G))) f\n[PROOFSTEP]\nsimp [lift_apply]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : AddMonoid G\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nφ₁ φ₂ : AddMonoidAlgebra k G →ₐ[k] A\n⊢ φ₁ = φ₂ → ∀ (x : G), ↑φ₁ (Finsupp.single x 1) = ↑φ₂ (Finsupp.single x 1)\n[PROOFSTEP]\nrintro rfl _\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝⁵ : CommSemiring k\ninst✝⁴ : AddMonoid G\nA : Type u₃\ninst✝³ : Semiring A\ninst✝² : Algebra k A\nB : Type u_3\ninst✝¹ : Semiring B\ninst✝ : Algebra k B\nφ₁ : AddMonoidAlgebra k G →ₐ[k] A\nx✝ : G\n⊢ ↑φ₁ (Finsupp.single x✝ 1) = ↑φ₁ (Finsupp.single x✝ 1)\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\nι : Type ui\ninst✝¹ : CommSemiring k\ninst✝ : AddCommMonoid G\ns✝ : Finset ι\na✝ : ι → G\nb : ι → k\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : ∏ i in s, single (a✝ i) (b i) = single (∑ i in s, a✝ i) (∏ i in s, b i)\n⊢ ∏ i in cons a s has, single (a✝ i) (b i) = single (∑ i in cons a s has, a✝ i) (∏ i in cons a s has, b i)\n[PROOFSTEP]\nrw [prod_cons has, ih, single_mul_single, sum_cons has, prod_cons has]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH✝ : Type u_1\nR : Type u_2\nA : Type u_3\nH : Type u_4\nF : Type u_5\ninst✝⁵ : CommSemiring k\ninst✝⁴ : Semiring A\ninst✝³ : Algebra k A\ninst✝² : AddMonoid G\ninst✝¹ : AddMonoid H\ninst✝ : AddMonoidHomClass F G H\nf : F\nr : k\n⊢ mapDomain (↑f) (↑(algebraMap k (AddMonoidAlgebra A G)) r) = ↑(algebraMap k (AddMonoidAlgebra A H)) r\n[PROOFSTEP]\nsimp only [Function.comp_apply, mapDomain_single, AddMonoidAlgebra.coe_algebraMap, map_zero]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring k\ninst✝¹ : Algebra R k\ninst✝ : AddMonoid G\nsrc✝ : AddMonoidAlgebra k G ≃+* MonoidAlgebra k (Multiplicative G) := AddMonoidAlgebra.toMultiplicative k G\nr : R\n⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R (AddMonoidAlgebra k G)) r) =\n    ↑(algebraMap R (MonoidAlgebra k (Multiplicative G))) r\n[PROOFSTEP]\nsimp [AddMonoidAlgebra.toMultiplicative]\n[GOAL]\nk : Type u₁\nG : Type u₂\nH : Type u_1\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Semiring k\ninst✝¹ : Algebra R k\ninst✝ : Monoid G\nsrc✝ : MonoidAlgebra k G ≃+* AddMonoidAlgebra k (Additive G) := MonoidAlgebra.toAdditive k G\nr : R\n⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R (MonoidAlgebra k G)) r) = ↑(algebraMap R (AddMonoidAlgebra k (Additive G))) r\n[PROOFSTEP]\nsimp [MonoidAlgebra.toAdditive]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.MonoidAlgebra.Basic", "llama_tokens": 106642, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.712232184238947, "lm_q2_score": 0.538983220687684, "lm_q1q2_score": 0.3838811965385316}}
{"text": "[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → Zero (α i)\ns✝ : Finset ι\nf : Π₀ (i : ι), α i\nt✝ : (i : ι) → Finset (α i)\ns : Finset ι\nt : (i : ι) → Finset (α i)\n⊢ Function.Injective fun f => DFinsupp.mk s fun i => f ↑i (_ : ↑i ∈ ↑s)\n[PROOFSTEP]\nrefine' (mk_injective _).comp fun f g h => _\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → Zero (α i)\ns✝ : Finset ι\nf✝ : Π₀ (i : ι), α i\nt✝ : (i : ι) → Finset (α i)\ns : Finset ι\nt : (i : ι) → Finset (α i)\nf g : (a : ι) → a ∈ s → α a\nh : (fun i => f ↑i (_ : ↑i ∈ ↑s)) = fun i => g ↑i (_ : ↑i ∈ ↑s)\n⊢ f = g\n[PROOFSTEP]\next i hi\n[GOAL]\ncase h.h\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → Zero (α i)\ns✝ : Finset ι\nf✝ : Π₀ (i : ι), α i\nt✝ : (i : ι) → Finset (α i)\ns : Finset ι\nt : (i : ι) → Finset (α i)\nf g : (a : ι) → a ∈ s → α a\nh : (fun i => f ↑i (_ : ↑i ∈ ↑s)) = fun i => g ↑i (_ : ↑i ∈ ↑s)\ni : ι\nhi : i ∈ s\n⊢ f i hi = g i hi\n[PROOFSTEP]\nconvert congr_fun h ⟨i, hi⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nf : Π₀ (i : ι), α i\nt : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\n⊢ f ∈ dfinsupp s t ↔ support f ⊆ s ∧ ∀ (i : ι), i ∈ s → ↑f i ∈ t i\n[PROOFSTEP]\nrefine' mem_map.trans ⟨_, _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nf : Π₀ (i : ι), α i\nt : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\n⊢ (∃ a,\n      a ∈ pi s t ∧\n        ↑{ toFun := fun f => DFinsupp.mk s fun i => f ↑i (_ : ↑i ∈ ↑s),\n                inj' := (_ : Function.Injective (DFinsupp.mk s ∘ fun f i => f ↑i (_ : ↑i ∈ ↑s))) }\n            a =\n          f) →\n    support f ⊆ s ∧ ∀ (i : ι), i ∈ s → ↑f i ∈ t i\n[PROOFSTEP]\nrintro ⟨f, hf, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nt : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nf : (a : ι) → a ∈ s → (fun i => α i) a\nhf : f ∈ pi s t\n⊢ support\n        (↑{ toFun := fun f => DFinsupp.mk s fun i => f ↑i (_ : ↑i ∈ ↑s),\n              inj' := (_ : Function.Injective (DFinsupp.mk s ∘ fun f i => f ↑i (_ : ↑i ∈ ↑s))) }\n          f) ⊆\n      s ∧\n    ∀ (i : ι),\n      i ∈ s →\n        ↑(↑{ toFun := fun f => DFinsupp.mk s fun i => f ↑i (_ : ↑i ∈ ↑s),\n                    inj' := (_ : Function.Injective (DFinsupp.mk s ∘ fun f i => f ↑i (_ : ↑i ∈ ↑s))) }\n                f)\n            i ∈\n          t i\n[PROOFSTEP]\nrw [Function.Embedding.coeFn_mk]\n  -- porting note: added to avoid heartbeat timeout\n[GOAL]\ncase refine'_1.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nt : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nf : (a : ι) → a ∈ s → (fun i => α i) a\nhf : f ∈ pi s t\n⊢ support (DFinsupp.mk s fun i => f ↑i (_ : ↑i ∈ ↑s)) ⊆ s ∧\n    ∀ (i : ι), i ∈ s → ↑(DFinsupp.mk s fun i => f ↑i (_ : ↑i ∈ ↑s)) i ∈ t i\n[PROOFSTEP]\nrefine' ⟨support_mk_subset, fun i hi => _⟩\n[GOAL]\ncase refine'_1.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nt : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nf : (a : ι) → a ∈ s → (fun i => α i) a\nhf : f ∈ pi s t\ni : ι\nhi : i ∈ s\n⊢ ↑(DFinsupp.mk s fun i => f ↑i (_ : ↑i ∈ ↑s)) i ∈ t i\n[PROOFSTEP]\nconvert mem_pi.1 hf i hi\n[GOAL]\ncase h.e'_4\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nt : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nf : (a : ι) → a ∈ s → (fun i => α i) a\nhf : f ∈ pi s t\ni : ι\nhi : i ∈ s\n⊢ ↑(DFinsupp.mk s fun i => f ↑i (_ : ↑i ∈ ↑s)) i = f i hi\n[PROOFSTEP]\nexact mk_of_mem hi\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nf : Π₀ (i : ι), α i\nt : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\n⊢ (support f ⊆ s ∧ ∀ (i : ι), i ∈ s → ↑f i ∈ t i) →\n    ∃ a,\n      a ∈ pi s t ∧\n        ↑{ toFun := fun f => DFinsupp.mk s fun i => f ↑i (_ : ↑i ∈ ↑s),\n                inj' := (_ : Function.Injective (DFinsupp.mk s ∘ fun f i => f ↑i (_ : ↑i ∈ ↑s))) }\n            a =\n          f\n[PROOFSTEP]\nrefine' fun h => ⟨fun i _ => f i, mem_pi.2 h.2, _⟩\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nf : Π₀ (i : ι), α i\nt : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nh : support f ⊆ s ∧ ∀ (i : ι), i ∈ s → ↑f i ∈ t i\n⊢ (↑{ toFun := fun f => DFinsupp.mk s fun i => f ↑i (_ : ↑i ∈ ↑s),\n          inj' := (_ : Function.Injective (DFinsupp.mk s ∘ fun f i => f ↑i (_ : ↑i ∈ ↑s))) }\n      fun i x => ↑f i) =\n    f\n[PROOFSTEP]\next i\n[GOAL]\ncase refine'_2.h\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nf : Π₀ (i : ι), α i\nt : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nh : support f ⊆ s ∧ ∀ (i : ι), i ∈ s → ↑f i ∈ t i\ni : ι\n⊢ ↑(↑{ toFun := fun f => DFinsupp.mk s fun i => f ↑i (_ : ↑i ∈ ↑s),\n              inj' := (_ : Function.Injective (DFinsupp.mk s ∘ fun f i => f ↑i (_ : ↑i ∈ ↑s))) }\n          fun i x => ↑f i)\n      i =\n    ↑f i\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_2.h\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nf : Π₀ (i : ι), α i\nt : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nh : support f ⊆ s ∧ ∀ (i : ι), i ∈ s → ↑f i ∈ t i\ni : ι\n⊢ (if i ∈ s then ↑f i else 0) = ↑f i\n[PROOFSTEP]\nexact ite_eq_left_iff.2 fun hi => (not_mem_support_iff.1 fun H => hi <| h.1 H).symm\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nf : Π₀ (i : ι), α i\nt✝ : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nt : Π₀ (i : ι), Finset (α i)\nht : support t ⊆ s\n⊢ f ∈ dfinsupp s ↑t ↔ ∀ (i : ι), ↑f i ∈ ↑t i\n[PROOFSTEP]\nrefine'\n  mem_dfinsupp_iff.trans\n    (forall_and.symm.trans <|\n      forall_congr' fun i =>\n        ⟨fun h => _, fun h => ⟨fun hi => ht <| mem_support_iff.2 fun H => mem_support_iff.1 hi _, fun _ => h⟩⟩)\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nf : Π₀ (i : ι), α i\nt✝ : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nt : Π₀ (i : ι), Finset (α i)\nht : support t ⊆ s\ni : ι\nh : (i ∈ support f → i ∈ s) ∧ (i ∈ s → ↑f i ∈ ↑t i)\n⊢ ↑f i ∈ ↑t i\n[PROOFSTEP]\nby_cases hi : i ∈ s\n[GOAL]\ncase pos\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nf : Π₀ (i : ι), α i\nt✝ : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nt : Π₀ (i : ι), Finset (α i)\nht : support t ⊆ s\ni : ι\nh : (i ∈ support f → i ∈ s) ∧ (i ∈ s → ↑f i ∈ ↑t i)\nhi : i ∈ s\n⊢ ↑f i ∈ ↑t i\n[PROOFSTEP]\nexact h.2 hi\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nf : Π₀ (i : ι), α i\nt✝ : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nt : Π₀ (i : ι), Finset (α i)\nht : support t ⊆ s\ni : ι\nh : (i ∈ support f → i ∈ s) ∧ (i ∈ s → ↑f i ∈ ↑t i)\nhi : ¬i ∈ s\n⊢ ↑f i ∈ ↑t i\n[PROOFSTEP]\nrw [not_mem_support_iff.1 (mt h.1 hi), not_mem_support_iff.1 (not_mem_mono ht hi)]\n[GOAL]\ncase neg\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nf : Π₀ (i : ι), α i\nt✝ : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nt : Π₀ (i : ι), Finset (α i)\nht : support t ⊆ s\ni : ι\nh : (i ∈ support f → i ∈ s) ∧ (i ∈ s → ↑f i ∈ ↑t i)\nhi : ¬i ∈ s\n⊢ 0 ∈ 0\n[PROOFSTEP]\nexact zero_mem_zero\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : ι → Type u_2\ninst✝² : DecidableEq ι\ninst✝¹ : (i : ι) → Zero (α i)\ns : Finset ι\nf : Π₀ (i : ι), α i\nt✝ : (i : ι) → Finset (α i)\ninst✝ : (i : ι) → DecidableEq (α i)\nt : Π₀ (i : ι), Finset (α i)\nht : support t ⊆ s\ni : ι\nh : ↑f i ∈ ↑t i\nhi : i ∈ support f\nH : ↑t i = 0\n⊢ ↑f i = 0\n[PROOFSTEP]\nrwa [H, mem_zero] at h \n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → PartialOrder (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf✝ g✝ : Π₀ (i : ι), α i\ni✝ : ι\na : α i✝\nf g : Π₀ (i : ι), α i\nfs : { s // ∀ (i : ι), i ∈ s ∨ toFun f i = 0 }\ngs : { s // ∀ (i : ι), i ∈ s ∨ toFun g i = 0 }\ni : ι\nh : ¬i ∈ ↑fs + ↑gs\n⊢ (fun i => Icc (↑f i) (↑g i)) i = 0\n[PROOFSTEP]\nhave hf : f i = 0 :=\n  (fs.prop i).resolve_left (Multiset.not_mem_mono (Multiset.Le.subset <| Multiset.le_add_right _ _) h)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → PartialOrder (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf✝ g✝ : Π₀ (i : ι), α i\ni✝ : ι\na : α i✝\nf g : Π₀ (i : ι), α i\nfs : { s // ∀ (i : ι), i ∈ s ∨ toFun f i = 0 }\ngs : { s // ∀ (i : ι), i ∈ s ∨ toFun g i = 0 }\ni : ι\nh : ¬i ∈ ↑fs + ↑gs\nhf : ↑f i = 0\n⊢ (fun i => Icc (↑f i) (↑g i)) i = 0\n[PROOFSTEP]\nhave hg : g i = 0 :=\n  (gs.prop i).resolve_left\n    (Multiset.not_mem_mono (Multiset.Le.subset <| Multiset.le_add_left _ _) h)\n      -- porting note: was rw, but was rewriting under lambda, so changed to simp_rw\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → PartialOrder (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf✝ g✝ : Π₀ (i : ι), α i\ni✝ : ι\na : α i✝\nf g : Π₀ (i : ι), α i\nfs : { s // ∀ (i : ι), i ∈ s ∨ toFun f i = 0 }\ngs : { s // ∀ (i : ι), i ∈ s ∨ toFun g i = 0 }\ni : ι\nh : ¬i ∈ ↑fs + ↑gs\nhf : ↑f i = 0\nhg : ↑g i = 0\n⊢ (fun i => Icc (↑f i) (↑g i)) i = 0\n[PROOFSTEP]\nsimp_rw [hf, hg]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : (i : ι) → PartialOrder (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf✝ g✝ : Π₀ (i : ι), α i\ni✝ : ι\na : α i✝\nf g : Π₀ (i : ι), α i\nfs : { s // ∀ (i : ι), i ∈ s ∨ toFun f i = 0 }\ngs : { s // ∀ (i : ι), i ∈ s ∨ toFun g i = 0 }\ni : ι\nh : ¬i ∈ ↑fs + ↑gs\nhf : ↑f i = 0\nhg : ↑g i = 0\n⊢ Icc 0 0 = 0\n[PROOFSTEP]\nexact Icc_self _\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : (i : ι) → Zero (α i)\ninst✝³ : (i : ι) → PartialOrder (α i)\ninst✝² : (i : ι) → LocallyFiniteOrder (α i)\nf g : Π₀ (i : ι), α i\ni : ι\na : α i\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\n⊢ support (rangeIcc f g) ⊆ support f ∪ support g\n[PROOFSTEP]\nrefine' fun x hx => _\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : (i : ι) → Zero (α i)\ninst✝³ : (i : ι) → PartialOrder (α i)\ninst✝² : (i : ι) → LocallyFiniteOrder (α i)\nf g : Π₀ (i : ι), α i\ni : ι\na : α i\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nx : ι\nhx : x ∈ support (rangeIcc f g)\n⊢ x ∈ support f ∪ support g\n[PROOFSTEP]\nby_contra h\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : (i : ι) → Zero (α i)\ninst✝³ : (i : ι) → PartialOrder (α i)\ninst✝² : (i : ι) → LocallyFiniteOrder (α i)\nf g : Π₀ (i : ι), α i\ni : ι\na : α i\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nx : ι\nhx : x ∈ support (rangeIcc f g)\nh : ¬x ∈ support f ∪ support g\n⊢ False\n[PROOFSTEP]\nrefine' not_mem_support_iff.2 _ hx\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : (i : ι) → Zero (α i)\ninst✝³ : (i : ι) → PartialOrder (α i)\ninst✝² : (i : ι) → LocallyFiniteOrder (α i)\nf g : Π₀ (i : ι), α i\ni : ι\na : α i\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nx : ι\nhx : x ∈ support (rangeIcc f g)\nh : ¬x ∈ support f ∪ support g\n⊢ ↑(rangeIcc f g) x = 0\n[PROOFSTEP]\nrw [rangeIcc_apply, not_mem_support_iff.1 (not_mem_mono (subset_union_left _ _) h),\n  not_mem_support_iff.1 (not_mem_mono (subset_union_right _ _) h)]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : (i : ι) → Zero (α i)\ninst✝³ : (i : ι) → PartialOrder (α i)\ninst✝² : (i : ι) → LocallyFiniteOrder (α i)\nf g : Π₀ (i : ι), α i\ni : ι\na : α i\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nx : ι\nhx : x ∈ support (rangeIcc f g)\nh : ¬x ∈ support f ∪ support g\n⊢ Icc 0 0 = 0\n[PROOFSTEP]\nexact Icc_self _\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nf : Π₀ (i : ι), Finset (α i)\n⊢ card (pi f) = prod f fun i => ↑(card (↑f i))\n[PROOFSTEP]\nrw [pi, card_dfinsupp]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nf : Π₀ (i : ι), Finset (α i)\n⊢ ∏ i in support f, card (↑f i) = prod f fun i => ↑(card (↑f i))\n[PROOFSTEP]\nexact Finset.prod_congr rfl fun i _ => by simp only [Pi.nat_apply, Nat.cast_id]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : (i : ι) → Zero (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → DecidableEq (α i)\nf : Π₀ (i : ι), Finset (α i)\ni : ι\nx✝ : i ∈ support f\n⊢ card (↑f i) = (fun i => ↑(card (↑f i))) i (↑f i)\n[PROOFSTEP]\nsimp only [Pi.nat_apply, Nat.cast_id]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : DecidableEq ι\ninst✝³ : (i : ι) → DecidableEq (α i)\ninst✝² : (i : ι) → PartialOrder (α i)\ninst✝¹ : (i : ι) → Zero (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf g x : Π₀ (i : ι), α i\n⊢ x ∈ (fun f g => dfinsupp (support f ∪ support g) ↑(rangeIcc f g)) f g ↔ f ≤ x ∧ x ≤ g\n[PROOFSTEP]\nrefine' (mem_dfinsupp_iff_of_support_subset <| support_rangeIcc_subset).trans _\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : DecidableEq ι\ninst✝³ : (i : ι) → DecidableEq (α i)\ninst✝² : (i : ι) → PartialOrder (α i)\ninst✝¹ : (i : ι) → Zero (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf g x : Π₀ (i : ι), α i\n⊢ (∀ (i : ι), ↑x i ∈ ↑(rangeIcc f g) i) ↔ f ≤ x ∧ x ≤ g\n[PROOFSTEP]\nsimp_rw [mem_rangeIcc_apply_iff, forall_and]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : DecidableEq ι\ninst✝³ : (i : ι) → DecidableEq (α i)\ninst✝² : (i : ι) → PartialOrder (α i)\ninst✝¹ : (i : ι) → Zero (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf g x : Π₀ (i : ι), α i\n⊢ ((∀ (x_1 : ι), ↑f x_1 ≤ ↑x x_1) ∧ ∀ (x_1 : ι), ↑x x_1 ≤ ↑g x_1) ↔ f ≤ x ∧ x ≤ g\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : DecidableEq ι\ninst✝³ : (i : ι) → DecidableEq (α i)\ninst✝² : (i : ι) → PartialOrder (α i)\ninst✝¹ : (i : ι) → Zero (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf g : Π₀ (i : ι), α i\n⊢ card (Ico f g) = ∏ i in support f ∪ support g, card (Icc (↑f i) (↑g i)) - 1\n[PROOFSTEP]\nrw [card_Ico_eq_card_Icc_sub_one, card_Icc]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : DecidableEq ι\ninst✝³ : (i : ι) → DecidableEq (α i)\ninst✝² : (i : ι) → PartialOrder (α i)\ninst✝¹ : (i : ι) → Zero (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf g : Π₀ (i : ι), α i\n⊢ card (Ioc f g) = ∏ i in support f ∪ support g, card (Icc (↑f i) (↑g i)) - 1\n[PROOFSTEP]\nrw [card_Ioc_eq_card_Icc_sub_one, card_Icc]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : DecidableEq ι\ninst✝³ : (i : ι) → DecidableEq (α i)\ninst✝² : (i : ι) → PartialOrder (α i)\ninst✝¹ : (i : ι) → Zero (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf g : Π₀ (i : ι), α i\n⊢ card (Ioo f g) = ∏ i in support f ∪ support g, card (Icc (↑f i) (↑g i)) - 2\n[PROOFSTEP]\nrw [card_Ioo_eq_card_Icc_sub_two, card_Icc]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : DecidableEq ι\ninst✝³ : (i : ι) → DecidableEq (α i)\ninst✝² : (i : ι) → Lattice (α i)\ninst✝¹ : (i : ι) → Zero (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf g : Π₀ (i : ι), α i\n⊢ card (uIcc f g) = ∏ i in support f ∪ support g, card (uIcc (↑f i) (↑g i))\n[PROOFSTEP]\nrw [← support_inf_union_support_sup]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : DecidableEq ι\ninst✝³ : (i : ι) → DecidableEq (α i)\ninst✝² : (i : ι) → Lattice (α i)\ninst✝¹ : (i : ι) → Zero (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf g : Π₀ (i : ι), α i\n⊢ card (uIcc f g) = ∏ i in support (f ⊓ g) ∪ support (f ⊔ g), card (uIcc (↑f i) (↑g i))\n[PROOFSTEP]\nexact card_Icc _ _\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : DecidableEq ι\ninst✝² : (i : ι) → DecidableEq (α i)\ninst✝¹ : (i : ι) → CanonicallyOrderedAddMonoid (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf : Π₀ (i : ι), α i\n⊢ card (Iic f) = ∏ i in support f, card (Iic (↑f i))\n[PROOFSTEP]\nsimp_rw [Iic_eq_Icc, card_Icc, DFinsupp.bot_eq_zero, support_zero, empty_union, zero_apply, bot_eq_zero]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : DecidableEq ι\ninst✝² : (i : ι) → DecidableEq (α i)\ninst✝¹ : (i : ι) → CanonicallyOrderedAddMonoid (α i)\ninst✝ : (i : ι) → LocallyFiniteOrder (α i)\nf : Π₀ (i : ι), α i\n⊢ card (Iio f) = ∏ i in support f, card (Iic (↑f i)) - 1\n[PROOFSTEP]\nrw [card_Iio_eq_card_Iic_sub_one, card_Iic]\n", "meta": {"mathlib_filename": "Mathlib.Data.DFinsupp.Interval", "llama_tokens": 9135, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7279754607093178, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.3838734890468762}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MulOneClass α\ninst✝ : MulOneClass β\nf : α →* β\n⊢ (fun s => ↑up (↑f '' ↑down s)) 1 = 1\n[PROOFSTEP]\ndsimp only\n  -- porting note: structures do not do this automatically any more\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MulOneClass α\ninst✝ : MulOneClass β\nf : α →* β\n⊢ ↑up (↑f '' ↑down 1) = 1\n[PROOFSTEP]\nrw [down_one, image_one, map_one, singleton_one, up_one]\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Semiring", "llama_tokens": 195, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.6513548511303338, "lm_q2_score": 0.588889130767832, "lm_q1q2_score": 0.38357579210355286}}
{"text": "[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\ns : Cofork (F.map (U.map (NatTrans.app adj₁.counit X))) (NatTrans.app adj₁.counit (F.obj (U.obj X)))\n⊢ { l //\n    Cofork.π\n            (Cofork.ofπ (NatTrans.app adj₁.counit X)\n              (_ :\n                F.map (U.map (NatTrans.app adj₁.counit X)) ≫ NatTrans.app adj₁.counit X =\n                  NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ NatTrans.app adj₁.counit X)) ≫\n          l =\n        Cofork.π s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj\n                  (Cofork.ofπ (NatTrans.app adj₁.counit X)\n                      (_ :\n                        F.map (U.map (NatTrans.app adj₁.counit X)) ≫ NatTrans.app adj₁.counit X =\n                          NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ NatTrans.app adj₁.counit X)).pt).obj\n              WalkingParallelPair.one ⟶\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n        Cofork.π\n                (Cofork.ofπ (NatTrans.app adj₁.counit X)\n                  (_ :\n                    F.map (U.map (NatTrans.app adj₁.counit X)) ≫ NatTrans.app adj₁.counit X =\n                      NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ NatTrans.app adj₁.counit X)) ≫\n              m =\n            Cofork.π s →\n          m = l }\n[PROOFSTEP]\nrefine' ⟨(RegularEpi.desc' (adj₁.counit.app X) s.π _).1, _, _⟩\n[GOAL]\ncase refine'_1\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\ns : Cofork (F.map (U.map (NatTrans.app adj₁.counit X))) (NatTrans.app adj₁.counit (F.obj (U.obj X)))\n⊢ RegularEpi.left ≫ Cofork.π s = RegularEpi.right ≫ Cofork.π s\n[PROOFSTEP]\nrw [← cancel_epi (adj₁.counit.app (RegularEpi.W (adj₁.counit.app X)))]\n[GOAL]\ncase refine'_1\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\ns : Cofork (F.map (U.map (NatTrans.app adj₁.counit X))) (NatTrans.app adj₁.counit (F.obj (U.obj X)))\n⊢ NatTrans.app adj₁.counit (RegularEpi.W (NatTrans.app adj₁.counit X)) ≫ RegularEpi.left ≫ Cofork.π s =\n    NatTrans.app adj₁.counit (RegularEpi.W (NatTrans.app adj₁.counit X)) ≫ RegularEpi.right ≫ Cofork.π s\n[PROOFSTEP]\nrw [← adj₁.counit_naturality_assoc RegularEpi.left]\n[GOAL]\ncase refine'_1\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\ns : Cofork (F.map (U.map (NatTrans.app adj₁.counit X))) (NatTrans.app adj₁.counit (F.obj (U.obj X)))\n⊢ F.map (U.map RegularEpi.left) ≫ NatTrans.app adj₁.counit ((U ⋙ F).obj X) ≫ Cofork.π s =\n    NatTrans.app adj₁.counit (RegularEpi.W (NatTrans.app adj₁.counit X)) ≫ RegularEpi.right ≫ Cofork.π s\n[PROOFSTEP]\ndsimp only [Functor.comp_obj]\n[GOAL]\ncase refine'_1\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\ns : Cofork (F.map (U.map (NatTrans.app adj₁.counit X))) (NatTrans.app adj₁.counit (F.obj (U.obj X)))\n⊢ F.map (U.map RegularEpi.left) ≫ NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ Cofork.π s =\n    NatTrans.app adj₁.counit (RegularEpi.W (NatTrans.app adj₁.counit X)) ≫ RegularEpi.right ≫ Cofork.π s\n[PROOFSTEP]\nrw [← s.condition, ← F.map_comp_assoc, ← U.map_comp, RegularEpi.w, U.map_comp, F.map_comp_assoc, s.condition, ←\n  adj₁.counit_naturality_assoc RegularEpi.right]\n[GOAL]\ncase refine'_2\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\ns : Cofork (F.map (U.map (NatTrans.app adj₁.counit X))) (NatTrans.app adj₁.counit (F.obj (U.obj X)))\n⊢ Cofork.π\n        (Cofork.ofπ (NatTrans.app adj₁.counit X)\n          (_ :\n            F.map (U.map (NatTrans.app adj₁.counit X)) ≫ NatTrans.app adj₁.counit X =\n              NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ NatTrans.app adj₁.counit X)) ≫\n      ↑(RegularEpi.desc' (NatTrans.app adj₁.counit X) (Cofork.π s)\n          (_ : RegularEpi.left ≫ Cofork.π s = RegularEpi.right ≫ Cofork.π s)) =\n    Cofork.π s\n[PROOFSTEP]\napply (RegularEpi.desc' (adj₁.counit.app X) s.π _).2\n[GOAL]\ncase refine'_3\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\ns : Cofork (F.map (U.map (NatTrans.app adj₁.counit X))) (NatTrans.app adj₁.counit (F.obj (U.obj X)))\n⊢ ∀\n    {m :\n      ((Functor.const WalkingParallelPair).obj\n              (Cofork.ofπ (NatTrans.app adj₁.counit X)\n                  (_ :\n                    F.map (U.map (NatTrans.app adj₁.counit X)) ≫ NatTrans.app adj₁.counit X =\n                      NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ NatTrans.app adj₁.counit X)).pt).obj\n          WalkingParallelPair.one ⟶\n        ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n    Cofork.π\n            (Cofork.ofπ (NatTrans.app adj₁.counit X)\n              (_ :\n                F.map (U.map (NatTrans.app adj₁.counit X)) ≫ NatTrans.app adj₁.counit X =\n                  NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ NatTrans.app adj₁.counit X)) ≫\n          m =\n        Cofork.π s →\n      m =\n        ↑(RegularEpi.desc' (NatTrans.app adj₁.counit X) (Cofork.π s)\n            (_ : RegularEpi.left ≫ Cofork.π s = RegularEpi.right ≫ Cofork.π s))\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase refine'_3\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\ns : Cofork (F.map (U.map (NatTrans.app adj₁.counit X))) (NatTrans.app adj₁.counit (F.obj (U.obj X)))\nm :\n  ((Functor.const WalkingParallelPair).obj\n          (Cofork.ofπ (NatTrans.app adj₁.counit X)\n              (_ :\n                F.map (U.map (NatTrans.app adj₁.counit X)) ≫ NatTrans.app adj₁.counit X =\n                  NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ NatTrans.app adj₁.counit X)).pt).obj\n      WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhm :\n  Cofork.π\n        (Cofork.ofπ (NatTrans.app adj₁.counit X)\n          (_ :\n            F.map (U.map (NatTrans.app adj₁.counit X)) ≫ NatTrans.app adj₁.counit X =\n              NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ NatTrans.app adj₁.counit X)) ≫\n      m =\n    Cofork.π s\n⊢ m =\n    ↑(RegularEpi.desc' (NatTrans.app adj₁.counit X) (Cofork.π s)\n        (_ : RegularEpi.left ≫ Cofork.π s = RegularEpi.right ≫ Cofork.π s))\n[PROOFSTEP]\nrw [← cancel_epi (adj₁.counit.app X)]\n[GOAL]\ncase refine'_3\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\ns : Cofork (F.map (U.map (NatTrans.app adj₁.counit X))) (NatTrans.app adj₁.counit (F.obj (U.obj X)))\nm :\n  ((Functor.const WalkingParallelPair).obj\n          (Cofork.ofπ (NatTrans.app adj₁.counit X)\n              (_ :\n                F.map (U.map (NatTrans.app adj₁.counit X)) ≫ NatTrans.app adj₁.counit X =\n                  NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ NatTrans.app adj₁.counit X)).pt).obj\n      WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhm :\n  Cofork.π\n        (Cofork.ofπ (NatTrans.app adj₁.counit X)\n          (_ :\n            F.map (U.map (NatTrans.app adj₁.counit X)) ≫ NatTrans.app adj₁.counit X =\n              NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ NatTrans.app adj₁.counit X)) ≫\n      m =\n    Cofork.π s\n⊢ NatTrans.app adj₁.counit X ≫ m =\n    NatTrans.app adj₁.counit X ≫\n      ↑(RegularEpi.desc' (NatTrans.app adj₁.counit X) (Cofork.π s)\n          (_ : RegularEpi.left ≫ Cofork.π s = RegularEpi.right ≫ Cofork.π s))\n[PROOFSTEP]\napply hm.trans (RegularEpi.desc' (adj₁.counit.app X) s.π _).2.symm\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝² : Category.{v₁, u₁} A\ninst✝¹ : Category.{v₂, u₂} B\ninst✝ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\nX : B\n⊢ F'.map (NatTrans.app adj₁.unit (U.obj X)) ≫ F'.map (U.map (NatTrans.app adj₁.counit X)) =\n    𝟙 (F'.obj (U.obj ((𝟭 B).obj X)))\n[PROOFSTEP]\nrw [← F'.map_comp, adj₁.right_triangle_components]\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝² : Category.{v₁, u₁} A\ninst✝¹ : Category.{v₂, u₂} B\ninst✝ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\nX : B\n⊢ F'.map (𝟙 (U.obj X)) = 𝟙 (F'.obj (U.obj ((𝟭 B).obj X)))\n[PROOFSTEP]\napply F'.map_id\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝² : Category.{v₁, u₁} A\ninst✝¹ : Category.{v₂, u₂} B\ninst✝ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\nX : B\n⊢ F'.map (NatTrans.app adj₁.unit (U.obj X)) ≫ otherMap R F' adj₁ adj₂ X = 𝟙 (F'.obj (U.obj ((𝟭 B).obj X)))\n[PROOFSTEP]\ndsimp [otherMap]\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝² : Category.{v₁, u₁} A\ninst✝¹ : Category.{v₂, u₂} B\ninst✝ : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\nX : B\n⊢ F'.map (NatTrans.app adj₁.unit (U.obj X)) ≫\n      F'.map\n          (U.map\n            (F.map (NatTrans.app adj₂.unit (U.toPrefunctor.1 X)) ≫\n              NatTrans.app adj₁.counit (R.obj (F'.obj (U.toPrefunctor.1 X))))) ≫\n        NatTrans.app adj₂.counit (F'.obj (U.toPrefunctor.1 X)) =\n    𝟙 (F'.obj (U.obj X))\n[PROOFSTEP]\nrw [← F'.map_comp_assoc, U.map_comp, adj₁.unit_naturality_assoc, adj₁.right_triangle_components, comp_id,\n  adj₂.left_triangle_components]\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nY : A\nX : B\n⊢ { f // F'.map (U.map (NatTrans.app adj₁.counit X)) ≫ f = otherMap R F' adj₁ adj₂ X ≫ f } ≃\n    { g // U.map (F.map g ≫ NatTrans.app adj₁.counit (R.obj Y)) = U.map (NatTrans.app adj₁.counit X) ≫ g }\n[PROOFSTEP]\napply (adj₂.homEquiv _ _).subtypeEquiv _\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nY : A\nX : B\n⊢ ∀ (a : F'.obj (U.obj X) ⟶ Y),\n    F'.map (U.map (NatTrans.app adj₁.counit X)) ≫ a = otherMap R F' adj₁ adj₂ X ≫ a ↔\n      U.map (F.map (↑(Adjunction.homEquiv adj₂ (U.obj X) Y) a) ≫ NatTrans.app adj₁.counit (R.obj Y)) =\n        U.map (NatTrans.app adj₁.counit X) ≫ ↑(Adjunction.homEquiv adj₂ (U.obj X) Y) a\n[PROOFSTEP]\nintro f\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nY : A\nX : B\nf : F'.obj (U.obj X) ⟶ Y\n⊢ F'.map (U.map (NatTrans.app adj₁.counit X)) ≫ f = otherMap R F' adj₁ adj₂ X ≫ f ↔\n    U.map (F.map (↑(Adjunction.homEquiv adj₂ (U.obj X) Y) f) ≫ NatTrans.app adj₁.counit (R.obj Y)) =\n      U.map (NatTrans.app adj₁.counit X) ≫ ↑(Adjunction.homEquiv adj₂ (U.obj X) Y) f\n[PROOFSTEP]\nrw [← (adj₂.homEquiv _ _).injective.eq_iff, eq_comm, adj₂.homEquiv_naturality_left, otherMap, assoc,\n  adj₂.homEquiv_naturality_left, ← adj₂.counit_naturality, adj₂.homEquiv_naturality_left, adj₂.homEquiv_unit,\n  adj₂.right_triangle_components, comp_id, Functor.comp_map, ← U.map_comp, assoc, ← adj₁.counit_naturality,\n  adj₂.homEquiv_unit, adj₂.homEquiv_unit, F.map_comp, assoc]\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nY : A\nX : B\nf : F'.obj (U.obj X) ⟶ Y\n⊢ U.map\n        (F.map (NatTrans.app adj₂.unit (U.toPrefunctor.1 X)) ≫\n          F.map (U.map (R.map f)) ≫ NatTrans.app adj₁.counit (R.obj Y)) =\n      U.map (NatTrans.app adj₁.counit X) ≫ NatTrans.app adj₂.unit (U.obj ((𝟭 B).obj X)) ≫ (R ⋙ U).map f ↔\n    U.map (F.map (NatTrans.app adj₂.unit (U.obj X)) ≫ F.map ((R ⋙ U).map f) ≫ NatTrans.app adj₁.counit (R.obj Y)) =\n      U.map (NatTrans.app adj₁.counit X) ≫ NatTrans.app adj₂.unit (U.obj X) ≫ (R ⋙ U).map f\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nY : A\nX : B\n⊢ { g // U.map (F.map g ≫ NatTrans.app adj₁.counit (R.obj Y)) = U.map (NatTrans.app adj₁.counit X) ≫ g } ≃\n    { z // F.map (U.map (NatTrans.app adj₁.counit X)) ≫ z = NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ z }\n[PROOFSTEP]\napply (adj₁.homEquiv _ _).symm.subtypeEquiv\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nY : A\nX : B\n⊢ ∀ (a : U.obj X ⟶ U.obj (R.obj Y)),\n    U.map (F.map a ≫ NatTrans.app adj₁.counit (R.obj Y)) = U.map (NatTrans.app adj₁.counit X) ≫ a ↔\n      F.map (U.map (NatTrans.app adj₁.counit X)) ≫ ↑(Adjunction.homEquiv adj₁ (U.obj X) (R.obj Y)).symm a =\n        NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ ↑(Adjunction.homEquiv adj₁ (U.obj X) (R.obj Y)).symm a\n[PROOFSTEP]\nintro g\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nY : A\nX : B\ng : U.obj X ⟶ U.obj (R.obj Y)\n⊢ U.map (F.map g ≫ NatTrans.app adj₁.counit (R.obj Y)) = U.map (NatTrans.app adj₁.counit X) ≫ g ↔\n    F.map (U.map (NatTrans.app adj₁.counit X)) ≫ ↑(Adjunction.homEquiv adj₁ (U.obj X) (R.obj Y)).symm g =\n      NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ ↑(Adjunction.homEquiv adj₁ (U.obj X) (R.obj Y)).symm g\n[PROOFSTEP]\nrw [← (adj₁.homEquiv _ _).symm.injective.eq_iff, adj₁.homEquiv_counit, adj₁.homEquiv_counit, adj₁.homEquiv_counit,\n  F.map_comp, assoc, U.map_comp, F.map_comp, assoc, adj₁.counit_naturality, adj₁.counit_naturality_assoc]\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nY : A\nX : B\ng : U.obj X ⟶ U.obj (R.obj Y)\n⊢ NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ F.map g ≫ NatTrans.app adj₁.counit (R.obj Y) =\n      F.map (U.map (NatTrans.app adj₁.counit X)) ≫ F.map g ≫ NatTrans.app adj₁.counit ((𝟭 B).obj (R.obj Y)) ↔\n    F.map (U.map (NatTrans.app adj₁.counit X)) ≫ F.map g ≫ NatTrans.app adj₁.counit (R.obj Y) =\n      NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ F.map g ≫ NatTrans.app adj₁.counit (R.obj Y)\n[PROOFSTEP]\napply eq_comm\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\n⊢ B ⥤ A\n[PROOFSTEP]\nrefine' Adjunction.leftAdjointOfEquiv (fun X Y => constructLeftAdjointEquiv R _ adj₁ adj₂ Y X) _\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\n⊢ ∀ (X : B) (Y Y' : A) (g : Y ⟶ Y') (h : constructLeftAdjointObj R F' adj₁ adj₂ X ⟶ Y),\n    ↑((fun X Y => constructLeftAdjointEquiv R F' adj₁ adj₂ Y X) X Y') (h ≫ g) =\n      ↑((fun X Y => constructLeftAdjointEquiv R F' adj₁ adj₂ Y X) X Y) h ≫ R.map g\n[PROOFSTEP]\nintro X Y Y' g h\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\nY Y' : A\ng : Y ⟶ Y'\nh : constructLeftAdjointObj R F' adj₁ adj₂ X ⟶ Y\n⊢ ↑((fun X Y => constructLeftAdjointEquiv R F' adj₁ adj₂ Y X) X Y') (h ≫ g) =\n    ↑((fun X Y => constructLeftAdjointEquiv R F' adj₁ adj₂ Y X) X Y) h ≫ R.map g\n[PROOFSTEP]\nrw [constructLeftAdjointEquiv_apply, constructLeftAdjointEquiv_apply, Equiv.symm_apply_eq, Subtype.ext_iff]\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\nY Y' : A\ng : Y ⟶ Y'\nh : constructLeftAdjointObj R F' adj₁ adj₂ X ⟶ Y\n⊢ ↑{\n        val :=\n          F.map\n              (↑(Adjunction.homEquiv adj₂ (U.obj X) Y')\n                ↑(↑(Cofork.IsColimit.homIso\n                        (colimit.isColimit\n                          (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X))) (otherMap R F' adj₁ adj₂ X)))\n                        Y')\n                    (h ≫ g))) ≫\n            NatTrans.app adj₁.counit (R.obj Y'),\n        property :=\n          (_ :\n            (fun b => F.map (U.map (NatTrans.app adj₁.counit X)) ≫ b = NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ b)\n              (F.map\n                  (↑(Adjunction.homEquiv adj₂ (U.obj X) Y')\n                    ↑(↑(Cofork.IsColimit.homIso\n                            (colimit.isColimit\n                              (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X))) (otherMap R F' adj₁ adj₂ X)))\n                            Y')\n                        (h ≫ g))) ≫\n                NatTrans.app adj₁.counit (R.obj Y'))) } =\n    ↑(↑(Cofork.IsColimit.homIso (counitCoequalises adj₁ X) (R.obj Y'))\n        (↑(Cofork.IsColimit.homIso (counitCoequalises adj₁ X) (R.obj Y)).symm\n            {\n              val :=\n                F.map\n                    (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                      ↑(↑(Cofork.IsColimit.homIso\n                              (colimit.isColimit\n                                (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                  (otherMap R F' adj₁ adj₂ X)))\n                              Y)\n                          h)) ≫\n                  NatTrans.app adj₁.counit (R.obj Y),\n              property :=\n                (_ :\n                  (fun b =>\n                      F.map (U.map (NatTrans.app adj₁.counit X)) ≫ b = NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫ b)\n                    (F.map\n                        (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                          ↑(↑(Cofork.IsColimit.homIso\n                                  (colimit.isColimit\n                                    (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                      (otherMap R F' adj₁ adj₂ X)))\n                                  Y)\n                              h)) ≫\n                      NatTrans.app adj₁.counit (R.obj Y))) } ≫\n          R.map g))\n[PROOFSTEP]\ndsimp\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\nY Y' : A\ng : Y ⟶ Y'\nh : constructLeftAdjointObj R F' adj₁ adj₂ X ⟶ Y\n⊢ F.map\n        (↑(Adjunction.homEquiv adj₂ (U.obj X) Y')\n          ↑(↑(Cofork.IsColimit.homIso\n                  (colimit.isColimit\n                    (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X))) (otherMap R F' adj₁ adj₂ X)))\n                  Y')\n              (h ≫ g))) ≫\n      NatTrans.app adj₁.counit (R.obj Y') =\n    ↑(↑(Cofork.IsColimit.homIso (counitCoequalises adj₁ X) (R.obj Y'))\n        (↑(Cofork.IsColimit.homIso (counitCoequalises adj₁ X) (R.obj Y)).symm\n            {\n              val :=\n                F.map\n                    (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                      ↑(↑(Cofork.IsColimit.homIso\n                              (colimit.isColimit\n                                (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                  (otherMap R F' adj₁ adj₂ X)))\n                              Y)\n                          h)) ≫\n                  NatTrans.app adj₁.counit (R.obj Y),\n              property :=\n                (_ :\n                  F.map (U.map (NatTrans.app adj₁.counit X)) ≫\n                      F.map\n                          (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                            ↑(↑(Cofork.IsColimit.homIso\n                                    (colimit.isColimit\n                                      (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                        (otherMap R F' adj₁ adj₂ X)))\n                                    Y)\n                                h)) ≫\n                        NatTrans.app adj₁.counit (R.obj Y) =\n                    NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫\n                      F.map\n                          (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                            ↑(↑(Cofork.IsColimit.homIso\n                                    (colimit.isColimit\n                                      (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                        (otherMap R F' adj₁ adj₂ X)))\n                                    Y)\n                                h)) ≫\n                        NatTrans.app adj₁.counit (R.obj Y)) } ≫\n          R.map g))\n[PROOFSTEP]\nrw [Cofork.IsColimit.homIso_natural, Cofork.IsColimit.homIso_natural]\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\nY Y' : A\ng : Y ⟶ Y'\nh : constructLeftAdjointObj R F' adj₁ adj₂ X ⟶ Y\n⊢ F.map\n        (↑(Adjunction.homEquiv adj₂ (U.obj X) Y')\n          (↑(↑(Cofork.IsColimit.homIso\n                    (colimit.isColimit\n                      (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X))) (otherMap R F' adj₁ adj₂ X)))\n                    Y)\n                h) ≫\n            g)) ≫\n      NatTrans.app adj₁.counit (R.obj Y') =\n    ↑(↑(Cofork.IsColimit.homIso (counitCoequalises adj₁ X) (R.obj Y))\n          (↑(Cofork.IsColimit.homIso (counitCoequalises adj₁ X) (R.obj Y)).symm\n            {\n              val :=\n                F.map\n                    (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                      ↑(↑(Cofork.IsColimit.homIso\n                              (colimit.isColimit\n                                (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                  (otherMap R F' adj₁ adj₂ X)))\n                              Y)\n                          h)) ≫\n                  NatTrans.app adj₁.counit (R.obj Y),\n              property :=\n                (_ :\n                  F.map (U.map (NatTrans.app adj₁.counit X)) ≫\n                      F.map\n                          (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                            ↑(↑(Cofork.IsColimit.homIso\n                                    (colimit.isColimit\n                                      (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                        (otherMap R F' adj₁ adj₂ X)))\n                                    Y)\n                                h)) ≫\n                        NatTrans.app adj₁.counit (R.obj Y) =\n                    NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫\n                      F.map\n                          (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                            ↑(↑(Cofork.IsColimit.homIso\n                                    (colimit.isColimit\n                                      (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                        (otherMap R F' adj₁ adj₂ X)))\n                                    Y)\n                                h)) ≫\n                        NatTrans.app adj₁.counit (R.obj Y)) })) ≫\n      R.map g\n[PROOFSTEP]\nerw [adj₂.homEquiv_naturality_right]\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\nY Y' : A\ng : Y ⟶ Y'\nh : constructLeftAdjointObj R F' adj₁ adj₂ X ⟶ Y\n⊢ F.map\n        (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n            ↑(↑(Cofork.IsColimit.homIso\n                    (colimit.isColimit\n                      (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X))) (otherMap R F' adj₁ adj₂ X)))\n                    Y)\n                h) ≫\n          (R ⋙ U).map g) ≫\n      NatTrans.app adj₁.counit (R.obj Y') =\n    ↑(↑(Cofork.IsColimit.homIso (counitCoequalises adj₁ X) (R.obj Y))\n          (↑(Cofork.IsColimit.homIso (counitCoequalises adj₁ X) (R.obj Y)).symm\n            {\n              val :=\n                F.map\n                    (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                      ↑(↑(Cofork.IsColimit.homIso\n                              (colimit.isColimit\n                                (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                  (otherMap R F' adj₁ adj₂ X)))\n                              Y)\n                          h)) ≫\n                  NatTrans.app adj₁.counit (R.obj Y),\n              property :=\n                (_ :\n                  F.map (U.map (NatTrans.app adj₁.counit X)) ≫\n                      F.map\n                          (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                            ↑(↑(Cofork.IsColimit.homIso\n                                    (colimit.isColimit\n                                      (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                        (otherMap R F' adj₁ adj₂ X)))\n                                    Y)\n                                h)) ≫\n                        NatTrans.app adj₁.counit (R.obj Y) =\n                    NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫\n                      F.map\n                          (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                            ↑(↑(Cofork.IsColimit.homIso\n                                    (colimit.isColimit\n                                      (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                        (otherMap R F' adj₁ adj₂ X)))\n                                    Y)\n                                h)) ≫\n                        NatTrans.app adj₁.counit (R.obj Y)) })) ≫\n      R.map g\n[PROOFSTEP]\nsimp_rw [Functor.comp_map]\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁴ : Category.{v₁, u₁} A\ninst✝³ : Category.{v₂, u₂} B\ninst✝² : Category.{v₃, u₃} C\nU : B ⥤ C\nF : C ⥤ B\nR : A ⥤ B\nF' : C ⥤ A\nadj₁ : F ⊣ U\nadj₂ : F' ⊣ R ⋙ U\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : (X : B) → RegularEpi (NatTrans.app adj₁.counit X)\nX : B\nY Y' : A\ng : Y ⟶ Y'\nh : constructLeftAdjointObj R F' adj₁ adj₂ X ⟶ Y\n⊢ F.map\n        (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n            ↑(↑(Cofork.IsColimit.homIso\n                    (colimit.isColimit\n                      (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X))) (otherMap R F' adj₁ adj₂ X)))\n                    Y)\n                h) ≫\n          U.map (R.map g)) ≫\n      NatTrans.app adj₁.counit (R.obj Y') =\n    ↑(↑(Cofork.IsColimit.homIso (counitCoequalises adj₁ X) (R.obj Y))\n          (↑(Cofork.IsColimit.homIso (counitCoequalises adj₁ X) (R.obj Y)).symm\n            {\n              val :=\n                F.map\n                    (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                      ↑(↑(Cofork.IsColimit.homIso\n                              (colimit.isColimit\n                                (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                  (otherMap R F' adj₁ adj₂ X)))\n                              Y)\n                          h)) ≫\n                  NatTrans.app adj₁.counit (R.obj Y),\n              property :=\n                (_ :\n                  F.map (U.map (NatTrans.app adj₁.counit X)) ≫\n                      F.map\n                          (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                            ↑(↑(Cofork.IsColimit.homIso\n                                    (colimit.isColimit\n                                      (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                        (otherMap R F' adj₁ adj₂ X)))\n                                    Y)\n                                h)) ≫\n                        NatTrans.app adj₁.counit (R.obj Y) =\n                    NatTrans.app adj₁.counit (F.obj (U.obj X)) ≫\n                      F.map\n                          (↑(Adjunction.homEquiv adj₂ (U.obj X) Y)\n                            ↑(↑(Cofork.IsColimit.homIso\n                                    (colimit.isColimit\n                                      (parallelPair (F'.map (U.map (NatTrans.app adj₁.counit X)))\n                                        (otherMap R F' adj₁ adj₂ X)))\n                                    Y)\n                                h)) ≫\n                        NatTrans.app adj₁.counit (R.obj Y)) })) ≫\n      R.map g\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Category.{v₃, u₃} C\nU : B ⥤ C\ninst✝² : MonadicRightAdjoint U\nR : A ⥤ B\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : IsRightAdjoint (R ⋙ U)\n⊢ IsRightAdjoint R\n[PROOFSTEP]\nlet R' : A ⥤ _ := R ⋙ Monad.comparison (Adjunction.ofRightAdjoint U)\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Category.{v₃, u₃} C\nU : B ⥤ C\ninst✝² : MonadicRightAdjoint U\nR : A ⥤ B\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : IsRightAdjoint (R ⋙ U)\nR' : A ⥤ Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U)) :=\n  R ⋙ Monad.comparison (Adjunction.ofRightAdjoint U)\n⊢ IsRightAdjoint R\n[PROOFSTEP]\nrsuffices : IsRightAdjoint R'\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Category.{v₃, u₃} C\nU : B ⥤ C\ninst✝² : MonadicRightAdjoint U\nR : A ⥤ B\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : IsRightAdjoint (R ⋙ U)\nR' : A ⥤ Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U)) :=\n  R ⋙ Monad.comparison (Adjunction.ofRightAdjoint U)\nthis✝ : IsRightAdjoint R'\n⊢ IsRightAdjoint R\n[PROOFSTEP]\nlet this : IsRightAdjoint (R' ⋙ (Monad.comparison (Adjunction.ofRightAdjoint U)).inv) := by infer_instance\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Category.{v₃, u₃} C\nU : B ⥤ C\ninst✝² : MonadicRightAdjoint U\nR : A ⥤ B\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : IsRightAdjoint (R ⋙ U)\nR' : A ⥤ Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U)) :=\n  R ⋙ Monad.comparison (Adjunction.ofRightAdjoint U)\nthis✝ : IsRightAdjoint R'\n⊢ IsRightAdjoint (R' ⋙ Functor.inv (Monad.comparison (Adjunction.ofRightAdjoint U)))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Category.{v₃, u₃} C\nU : B ⥤ C\ninst✝² : MonadicRightAdjoint U\nR : A ⥤ B\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : IsRightAdjoint (R ⋙ U)\nR' : A ⥤ Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U)) :=\n  R ⋙ Monad.comparison (Adjunction.ofRightAdjoint U)\nthis✝ : IsRightAdjoint R'\nthis : IsRightAdjoint (R' ⋙ Functor.inv (Monad.comparison (Adjunction.ofRightAdjoint U))) := inferInstance\n⊢ IsRightAdjoint R\n[PROOFSTEP]\nlet this : R' ⋙ (Monad.comparison (Adjunction.ofRightAdjoint U)).inv ≅ R :=\n  (isoWhiskerLeft R (Monad.comparison _).asEquivalence.unitIso.symm : _) ≪≫ R.rightUnitor\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Category.{v₃, u₃} C\nU : B ⥤ C\ninst✝² : MonadicRightAdjoint U\nR : A ⥤ B\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : IsRightAdjoint (R ⋙ U)\nR' : A ⥤ Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U)) :=\n  R ⋙ Monad.comparison (Adjunction.ofRightAdjoint U)\nthis✝¹ : IsRightAdjoint R'\nthis✝ : IsRightAdjoint (R' ⋙ Functor.inv (Monad.comparison (Adjunction.ofRightAdjoint U))) := inferInstance\nthis : R' ⋙ Functor.inv (Monad.comparison (Adjunction.ofRightAdjoint U)) ≅ R :=\n  isoWhiskerLeft R (Functor.asEquivalence (Monad.comparison (Adjunction.ofRightAdjoint U))).unitIso.symm ≪≫\n    Functor.rightUnitor R\n⊢ IsRightAdjoint R\n[PROOFSTEP]\nexact Adjunction.rightAdjointOfNatIso this\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Category.{v₃, u₃} C\nU : B ⥤ C\ninst✝² : MonadicRightAdjoint U\nR : A ⥤ B\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : IsRightAdjoint (R ⋙ U)\nR' : A ⥤ Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U)) :=\n  R ⋙ Monad.comparison (Adjunction.ofRightAdjoint U)\n⊢ IsRightAdjoint R'\n[PROOFSTEP]\nlet this : IsRightAdjoint (R' ⋙ Monad.forget (Adjunction.ofRightAdjoint U).toMonad) :=\n  Adjunction.rightAdjointOfNatIso (isoWhiskerLeft R (Monad.comparisonForget (Adjunction.ofRightAdjoint U)).symm : _)\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Category.{v₃, u₃} C\nU : B ⥤ C\ninst✝² : MonadicRightAdjoint U\nR : A ⥤ B\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : IsRightAdjoint (R ⋙ U)\nR' : A ⥤ Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U)) :=\n  R ⋙ Monad.comparison (Adjunction.ofRightAdjoint U)\nthis : IsRightAdjoint (R' ⋙ Monad.forget (Adjunction.toMonad (Adjunction.ofRightAdjoint U))) :=\n  Adjunction.rightAdjointOfNatIso (isoWhiskerLeft R (Monad.comparisonForget (Adjunction.ofRightAdjoint U)).symm)\n⊢ IsRightAdjoint R'\n[PROOFSTEP]\nlet this : ∀ X, RegularEpi ((Monad.adj (Adjunction.ofRightAdjoint U).toMonad).counit.app X) :=\n  by\n  intro X\n  simp only [Monad.adj_counit]\n  exact ⟨_, _, _, _, Monad.beckAlgebraCoequalizer X⟩\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Category.{v₃, u₃} C\nU : B ⥤ C\ninst✝² : MonadicRightAdjoint U\nR : A ⥤ B\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : IsRightAdjoint (R ⋙ U)\nR' : A ⥤ Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U)) :=\n  R ⋙ Monad.comparison (Adjunction.ofRightAdjoint U)\nthis : IsRightAdjoint (R' ⋙ Monad.forget (Adjunction.toMonad (Adjunction.ofRightAdjoint U))) :=\n  Adjunction.rightAdjointOfNatIso (isoWhiskerLeft R (Monad.comparisonForget (Adjunction.ofRightAdjoint U)).symm)\n⊢ (X : Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U))) →\n    RegularEpi (NatTrans.app (Monad.adj (Adjunction.toMonad (Adjunction.ofRightAdjoint U))).counit X)\n[PROOFSTEP]\nintro X\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Category.{v₃, u₃} C\nU : B ⥤ C\ninst✝² : MonadicRightAdjoint U\nR : A ⥤ B\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : IsRightAdjoint (R ⋙ U)\nR' : A ⥤ Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U)) :=\n  R ⋙ Monad.comparison (Adjunction.ofRightAdjoint U)\nthis : IsRightAdjoint (R' ⋙ Monad.forget (Adjunction.toMonad (Adjunction.ofRightAdjoint U))) :=\n  Adjunction.rightAdjointOfNatIso (isoWhiskerLeft R (Monad.comparisonForget (Adjunction.ofRightAdjoint U)).symm)\nX : Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U))\n⊢ RegularEpi (NatTrans.app (Monad.adj (Adjunction.toMonad (Adjunction.ofRightAdjoint U))).counit X)\n[PROOFSTEP]\nsimp only [Monad.adj_counit]\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Category.{v₃, u₃} C\nU : B ⥤ C\ninst✝² : MonadicRightAdjoint U\nR : A ⥤ B\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : IsRightAdjoint (R ⋙ U)\nR' : A ⥤ Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U)) :=\n  R ⋙ Monad.comparison (Adjunction.ofRightAdjoint U)\nthis : IsRightAdjoint (R' ⋙ Monad.forget (Adjunction.toMonad (Adjunction.ofRightAdjoint U))) :=\n  Adjunction.rightAdjointOfNatIso (isoWhiskerLeft R (Monad.comparisonForget (Adjunction.ofRightAdjoint U)).symm)\nX : Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U))\n⊢ RegularEpi (Monad.Algebra.Hom.mk X.a)\n[PROOFSTEP]\nexact ⟨_, _, _, _, Monad.beckAlgebraCoequalizer X⟩\n[GOAL]\nA : Type u₁\nB : Type u₂\nC : Type u₃\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Category.{v₃, u₃} C\nU : B ⥤ C\ninst✝² : MonadicRightAdjoint U\nR : A ⥤ B\ninst✝¹ : HasReflexiveCoequalizers A\ninst✝ : IsRightAdjoint (R ⋙ U)\nR' : A ⥤ Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U)) :=\n  R ⋙ Monad.comparison (Adjunction.ofRightAdjoint U)\nthis✝ : IsRightAdjoint (R' ⋙ Monad.forget (Adjunction.toMonad (Adjunction.ofRightAdjoint U))) :=\n  Adjunction.rightAdjointOfNatIso (isoWhiskerLeft R (Monad.comparisonForget (Adjunction.ofRightAdjoint U)).symm)\nthis : (X : Monad.Algebra (Adjunction.toMonad (Adjunction.ofRightAdjoint U))) →\n  RegularEpi (NatTrans.app (Monad.adj (Adjunction.toMonad (Adjunction.ofRightAdjoint U))).counit X) :=\n  fun X =>\n    Eq.mpr\n      (_ :\n        RegularEpi (NatTrans.app (Monad.adj (Adjunction.toMonad (Adjunction.ofRightAdjoint U))).counit X) =\n          RegularEpi (Monad.Algebra.Hom.mk X.a))\n      (RegularEpi.mk\n        ((Monad.free (Adjunction.toMonad (Adjunction.ofRightAdjoint U))).obj\n          ((Adjunction.toMonad (Adjunction.ofRightAdjoint U)).toFunctor.obj X.A))\n        (Monad.FreeCoequalizer.topMap X) (Monad.FreeCoequalizer.bottomMap X) (Monad.beckAlgebraCoequalizer X))\n⊢ IsRightAdjoint R'\n[PROOFSTEP]\nexact adjointTriangleLift R' (Monad.adj _)\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Adjunction.Lifting", "llama_tokens": 17778, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506526772884, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.38329655750105807}}
{"text": "[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasFiniteProducts C\ninst✝¹ : CartesianClosed C\ninst✝ : HasZeroObject C\nX Y : C\n⊢ Unique (X ⟶ Y)\n[PROOFSTEP]\nhaveI : HasInitial C := HasZeroObject.hasInitial\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasFiniteProducts C\ninst✝¹ : CartesianClosed C\ninst✝ : HasZeroObject C\nX Y : C\nthis : HasInitial C\n⊢ Unique (X ⟶ Y)\n[PROOFSTEP]\napply uniqueHomsetOfInitialIsoTerminal _ X Y\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasFiniteProducts C\ninst✝¹ : CartesianClosed C\ninst✝ : HasZeroObject C\nX Y : C\nthis : HasInitial C\n⊢ ⊥_ C ≅ ⊤_ C\n[PROOFSTEP]\nrefine' ⟨default, (default : ⊤_ C ⟶ 0) ≫ default, _, _⟩\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasFiniteProducts C\ninst✝¹ : CartesianClosed C\ninst✝ : HasZeroObject C\nX Y : C\nthis : HasInitial C\n⊢ default ≫ default ≫ default = 𝟙 (⊥_ C)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasFiniteProducts C\ninst✝¹ : CartesianClosed C\ninst✝ : HasZeroObject C\nX Y : C\nthis : HasInitial C\n⊢ (default ≫ default) ≫ default = 𝟙 (⊤_ C)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Closed.Zero", "llama_tokens": 526, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583124210896, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3831997729245279}}
{"text": "[GOAL]\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1✝ D2✝ : Derivation R A M\nr : R\na b : A\nD1 D2 : Derivation R A M\nh : (fun D => D.toFun) D1 = (fun D => D.toFun) D2\n⊢ D1 = D2\n[PROOFSTEP]\ncases D1\n[GOAL]\ncase mk\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2✝ : Derivation R A M\nr : R\na b : A\nD2 : Derivation R A M\ntoLinearMap✝ : A →ₗ[R] M\nmap_one_eq_zero'✝ : ↑toLinearMap✝ 1 = 0\nleibniz'✝ : ∀ (a b : A), ↑toLinearMap✝ (a * b) = a • ↑toLinearMap✝ b + b • ↑toLinearMap✝ a\nh :\n  (fun D => D.toFun) { toLinearMap := toLinearMap✝, map_one_eq_zero' := map_one_eq_zero'✝, leibniz' := leibniz'✝ } =\n    (fun D => D.toFun) D2\n⊢ { toLinearMap := toLinearMap✝, map_one_eq_zero' := map_one_eq_zero'✝, leibniz' := leibniz'✝ } = D2\n[PROOFSTEP]\ncases D2\n[GOAL]\ncase mk.mk\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\ntoLinearMap✝¹ : A →ₗ[R] M\nmap_one_eq_zero'✝¹ : ↑toLinearMap✝¹ 1 = 0\nleibniz'✝¹ : ∀ (a b : A), ↑toLinearMap✝¹ (a * b) = a • ↑toLinearMap✝¹ b + b • ↑toLinearMap✝¹ a\ntoLinearMap✝ : A →ₗ[R] M\nmap_one_eq_zero'✝ : ↑toLinearMap✝ 1 = 0\nleibniz'✝ : ∀ (a b : A), ↑toLinearMap✝ (a * b) = a • ↑toLinearMap✝ b + b • ↑toLinearMap✝ a\nh :\n  (fun D => D.toFun) { toLinearMap := toLinearMap✝¹, map_one_eq_zero' := map_one_eq_zero'✝¹, leibniz' := leibniz'✝¹ } =\n    (fun D => D.toFun) { toLinearMap := toLinearMap✝, map_one_eq_zero' := map_one_eq_zero'✝, leibniz' := leibniz'✝ }\n⊢ { toLinearMap := toLinearMap✝¹, map_one_eq_zero' := map_one_eq_zero'✝¹, leibniz' := leibniz'✝¹ } =\n    { toLinearMap := toLinearMap✝, map_one_eq_zero' := map_one_eq_zero'✝, leibniz' := leibniz'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_toLinearMap\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\ntoLinearMap✝¹ : A →ₗ[R] M\nmap_one_eq_zero'✝¹ : ↑toLinearMap✝¹ 1 = 0\nleibniz'✝¹ : ∀ (a b : A), ↑toLinearMap✝¹ (a * b) = a • ↑toLinearMap✝¹ b + b • ↑toLinearMap✝¹ a\ntoLinearMap✝ : A →ₗ[R] M\nmap_one_eq_zero'✝ : ↑toLinearMap✝ 1 = 0\nleibniz'✝ : ∀ (a b : A), ↑toLinearMap✝ (a * b) = a • ↑toLinearMap✝ b + b • ↑toLinearMap✝ a\nh :\n  (fun D => D.toFun) { toLinearMap := toLinearMap✝¹, map_one_eq_zero' := map_one_eq_zero'✝¹, leibniz' := leibniz'✝¹ } =\n    (fun D => D.toFun) { toLinearMap := toLinearMap✝, map_one_eq_zero' := map_one_eq_zero'✝, leibniz' := leibniz'✝ }\n⊢ toLinearMap✝¹ = toLinearMap✝\n[PROOFSTEP]\nexact FunLike.coe_injective h\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\n⊢ ↑D (↑(algebraMap R A) r) = 0\n[PROOFSTEP]\nrw [← mul_one r, RingHom.map_mul, RingHom.map_one, ← smul_def, map_smul, map_one_eq_zero, smul_zero]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\nn : ℕ\n⊢ ↑D ↑n = 0\n[PROOFSTEP]\nrw [← nsmul_one, D.map_smul_of_tower n, map_one_eq_zero, smul_zero]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\nn : ℕ\n⊢ ↑D (a ^ n) = n • a ^ (n - 1) • ↑D a\n[PROOFSTEP]\ninduction' n with n ihn\n[GOAL]\ncase zero\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\n⊢ ↑D (a ^ Nat.zero) = Nat.zero • a ^ (Nat.zero - 1) • ↑D a\n[PROOFSTEP]\nrw [Nat.zero_eq, pow_zero, map_one_eq_zero, zero_smul]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\nn : ℕ\nihn : ↑D (a ^ n) = n • a ^ (n - 1) • ↑D a\n⊢ ↑D (a ^ Nat.succ n) = Nat.succ n • a ^ (Nat.succ n - 1) • ↑D a\n[PROOFSTEP]\nrcases(zero_le n).eq_or_lt with (rfl | hpos)\n[GOAL]\ncase succ.inl\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\nihn : ↑D (a ^ 0) = 0 • a ^ (0 - 1) • ↑D a\n⊢ ↑D (a ^ Nat.succ 0) = Nat.succ 0 • a ^ (Nat.succ 0 - 1) • ↑D a\n[PROOFSTEP]\nerw [pow_one, one_smul, pow_zero, one_smul]\n[GOAL]\ncase succ.inr\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\nn : ℕ\nihn : ↑D (a ^ n) = n • a ^ (n - 1) • ↑D a\nhpos : 0 < n\n⊢ ↑D (a ^ Nat.succ n) = Nat.succ n • a ^ (Nat.succ n - 1) • ↑D a\n[PROOFSTEP]\nhave : a * a ^ (n - 1) = a ^ n := by rw [← pow_succ, Nat.sub_add_cancel hpos]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\nn : ℕ\nihn : ↑D (a ^ n) = n • a ^ (n - 1) • ↑D a\nhpos : 0 < n\n⊢ a * a ^ (n - 1) = a ^ n\n[PROOFSTEP]\nrw [← pow_succ, Nat.sub_add_cancel hpos]\n[GOAL]\ncase succ.inr\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\nn : ℕ\nihn : ↑D (a ^ n) = n • a ^ (n - 1) • ↑D a\nhpos : 0 < n\nthis : a * a ^ (n - 1) = a ^ n\n⊢ ↑D (a ^ Nat.succ n) = Nat.succ n • a ^ (Nat.succ n - 1) • ↑D a\n[PROOFSTEP]\nsimp only [pow_succ, leibniz, ihn, smul_comm a n (_ : M), smul_smul a, add_smul, this, Nat.succ_eq_add_one,\n  Nat.add_succ_sub_one, add_zero, one_nsmul]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\ns : Set A\nh : Set.EqOn (↑D1) (↑D2) s\nx✝ : A\nhx✝ : x✝ ∈ ↑(adjoin R s)\nx y : A\nhx : ↑D1 x = ↑D2 x\nhy : ↑D1 y = ↑D2 y\n⊢ ↑D1 (x + y) = ↑D2 (x + y)\n[PROOFSTEP]\nsimp only [map_add, *]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\ns : Set A\nh : Set.EqOn (↑D1) (↑D2) s\nx✝ : A\nhx✝ : x✝ ∈ ↑(adjoin R s)\nx y : A\nhx : ↑D1 x = ↑D2 x\nhy : ↑D1 y = ↑D2 y\n⊢ ↑D1 (x * y) = ↑D2 (x * y)\n[PROOFSTEP]\nsimp only [leibniz, *]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na✝ b✝ a b : A\n⊢ ↑0 (a * b) = a • ↑0 b + b • ↑0 a\n[PROOFSTEP]\nsimp only [add_zero, LinearMap.zero_apply, smul_zero]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1✝ D2✝ : Derivation R A M\nr : R\na b : A\nD1 D2 : Derivation R A M\n⊢ ↑(↑D1 + ↑D2) 1 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommMonoid M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1✝ D2✝ : Derivation R A M\nr : R\na✝ b✝ : A\nD1 D2 : Derivation R A M\na b : A\n⊢ ↑(↑D1 + ↑D2) (a * b) = a • ↑(↑D1 + ↑D2) b + b • ↑(↑D1 + ↑D2) a\n[PROOFSTEP]\nsimp only [leibniz, LinearMap.add_apply, coeFn_coe, smul_add, add_add_add_comm]\n[GOAL]\nR : Type u_1\ninst✝¹³ : CommSemiring R\nA : Type u_2\ninst✝¹² : CommSemiring A\ninst✝¹¹ : Algebra R A\nM : Type u_3\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module A M\ninst✝⁸ : Module R M\nD✝ D1 D2 : Derivation R A M\nr✝ : R\na b : A\nS : Type u_4\nT : Type u_5\ninst✝⁷ : Monoid S\ninst✝⁶ : DistribMulAction S M\ninst✝⁵ : SMulCommClass R S M\ninst✝⁴ : SMulCommClass S A M\ninst✝³ : Monoid T\ninst✝² : DistribMulAction T M\ninst✝¹ : SMulCommClass R T M\ninst✝ : SMulCommClass T A M\nr : S\nD : Derivation R A M\n⊢ ↑(r • ↑D) 1 = 0\n[PROOFSTEP]\nrw [LinearMap.smul_apply, coeFn_coe, D.map_one_eq_zero, smul_zero]\n[GOAL]\nR : Type u_1\ninst✝¹³ : CommSemiring R\nA : Type u_2\ninst✝¹² : CommSemiring A\ninst✝¹¹ : Algebra R A\nM : Type u_3\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module A M\ninst✝⁸ : Module R M\nD✝ D1 D2 : Derivation R A M\nr✝ : R\na✝ b✝ : A\nS : Type u_4\nT : Type u_5\ninst✝⁷ : Monoid S\ninst✝⁶ : DistribMulAction S M\ninst✝⁵ : SMulCommClass R S M\ninst✝⁴ : SMulCommClass S A M\ninst✝³ : Monoid T\ninst✝² : DistribMulAction T M\ninst✝¹ : SMulCommClass R T M\ninst✝ : SMulCommClass T A M\nr : S\nD : Derivation R A M\na b : A\n⊢ ↑(r • ↑D) (a * b) = a • ↑(r • ↑D) b + b • ↑(r • ↑D) a\n[PROOFSTEP]\nsimp only [LinearMap.smul_apply, coeFn_coe, leibniz, smul_add, smul_comm r (_ : A) (_ : M)]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD✝ D1 D2 : Derivation R A M\nr : R\na b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nD : Derivation R A M\n⊢ ↑(LinearMap.comp (↑R f) ↑D) 1 = 0\n[PROOFSTEP]\nsimp only [LinearMap.comp_apply, coeFn_coe, map_one_eq_zero, map_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD✝ D1 D2 : Derivation R A M\nr : R\na✝ b✝ : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nD : Derivation R A M\na b : A\n⊢ ↑(LinearMap.comp (↑R f) ↑D) (a * b) = a • ↑(LinearMap.comp (↑R f) ↑D) b + b • ↑(LinearMap.comp (↑R f) ↑D) a\n[PROOFSTEP]\nsimp only [coeFn_coe, LinearMap.comp_apply, LinearMap.map_add, leibniz, LinearMap.coe_restrictScalars,\n  LinearMap.map_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nD₁ D₂ : Derivation R A M\n⊢ (fun D =>\n        { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n          leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n      (D₁ + D₂) =\n    (fun D =>\n          { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n            leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n        D₁ +\n      (fun D =>\n          { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n            leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n        D₂\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nD₁ D₂ : Derivation R A M\na✝ : A\n⊢ ↑((fun D =>\n            { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n              leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n          (D₁ + D₂))\n      a✝ =\n    ↑((fun D =>\n              { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n                leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n            D₁ +\n          (fun D =>\n              { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n                leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n            D₂)\n      a✝\n[PROOFSTEP]\nexact LinearMap.map_add _ _ _\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD✝ D1 D2 : Derivation R A M\nr✝ : R\na b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nr : R\nD : Derivation R A M\n⊢ AddHom.toFun\n      {\n        toFun := fun D =>\n          { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n            leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) },\n        map_add' :=\n          (_ :\n            ∀ (D₁ D₂ : Derivation R A M),\n              (fun D =>\n                    { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n                      leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n                  (D₁ + D₂) =\n                (fun D =>\n                      { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n                        leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n                    D₁ +\n                  (fun D =>\n                      { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n                        leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n                    D₂) }\n      (r • D) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        {\n          toFun := fun D =>\n            { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n              leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) },\n          map_add' :=\n            (_ :\n              ∀ (D₁ D₂ : Derivation R A M),\n                (fun D =>\n                      { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n                        leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n                    (D₁ + D₂) =\n                  (fun D =>\n                        { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n                          leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n                      D₁ +\n                    (fun D =>\n                        { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑(↑R f) (↑D 1) = 0),\n                          leibniz' := (_ : ∀ (a b : A), ↑(↑R f) (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n                      D₂) }\n        D\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD✝ D1 D2 : Derivation R A M\nr✝ : R\na b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nr : R\nD : Derivation R A M\n⊢ { toLinearMap := LinearMap.comp (↑R f) (r • ↑D), map_one_eq_zero' := (_ : ↑f (r • ↑D 1) = 0),\n      leibniz' := (_ : ∀ (a b : A), ↑f (r • ↑D (a * b)) = a • ↑f (r • ↑D b) + b • ↑f (r • ↑D a)) } =\n    r •\n      { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑f (↑D 1) = 0),\n        leibniz' := (_ : ∀ (a b : A), ↑f (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) }\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD✝ D1 D2 : Derivation R A M\nr✝ : R\na b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nr : R\nD : Derivation R A M\na✝ : A\n⊢ ↑{ toLinearMap := LinearMap.comp (↑R f) (r • ↑D), map_one_eq_zero' := (_ : ↑f (r • ↑D 1) = 0),\n          leibniz' := (_ : ∀ (a b : A), ↑f (r • ↑D (a * b)) = a • ↑f (r • ↑D b) + b • ↑f (r • ↑D a)) }\n      a✝ =\n    ↑(r •\n          { toLinearMap := LinearMap.comp (↑R f) ↑D, map_one_eq_zero' := (_ : ↑f (↑D 1) = 0),\n            leibniz' := (_ : ∀ (a b : A), ↑f (↑D (a * b)) = a • ↑f (↑D b) + b • ↑f (↑D a)) })\n      a✝\n[PROOFSTEP]\nexact LinearMap.map_smul (f : M →ₗ[R] N) _ _\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nf₁ f₂ : M →ₗ[A] N\n⊢ (fun f => LinearMap.compDer f) (f₁ + f₂) = (fun f => LinearMap.compDer f) f₁ + (fun f => LinearMap.compDer f) f₂\n[PROOFSTEP]\next\n[GOAL]\ncase h.H\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nf₁ f₂ : M →ₗ[A] N\nx✝ : Derivation R A M\na✝ : A\n⊢ ↑(↑((fun f => LinearMap.compDer f) (f₁ + f₂)) x✝) a✝ =\n    ↑(↑((fun f => LinearMap.compDer f) f₁ + (fun f => LinearMap.compDer f) f₂) x✝) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD✝ D1 D2 : Derivation R A M\nr✝ : R\na b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nr : A\nD : M →ₗ[A] N\n⊢ AddHom.toFun\n      { toFun := fun f => LinearMap.compDer f,\n        map_add' :=\n          (_ :\n            ∀ (f₁ f₂ : M →ₗ[A] N),\n              (fun f => LinearMap.compDer f) (f₁ + f₂) =\n                (fun f => LinearMap.compDer f) f₁ + (fun f => LinearMap.compDer f) f₂) }\n      (r • D) =\n    ↑(RingHom.id A) r •\n      AddHom.toFun\n        { toFun := fun f => LinearMap.compDer f,\n          map_add' :=\n            (_ :\n              ∀ (f₁ f₂ : M →ₗ[A] N),\n                (fun f => LinearMap.compDer f) (f₁ + f₂) =\n                  (fun f => LinearMap.compDer f) f₁ + (fun f => LinearMap.compDer f) f₂) }\n        D\n[PROOFSTEP]\next\n[GOAL]\ncase h.H\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD✝ D1 D2 : Derivation R A M\nr✝ : R\na b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nr : A\nD : M →ₗ[A] N\nx✝ : Derivation R A M\na✝ : A\n⊢ ↑(↑(AddHom.toFun\n              { toFun := fun f => LinearMap.compDer f,\n                map_add' :=\n                  (_ :\n                    ∀ (f₁ f₂ : M →ₗ[A] N),\n                      (fun f => LinearMap.compDer f) (f₁ + f₂) =\n                        (fun f => LinearMap.compDer f) f₁ + (fun f => LinearMap.compDer f) f₂) }\n              (r • D))\n          x✝)\n      a✝ =\n    ↑(↑(↑(RingHom.id A) r •\n              AddHom.toFun\n                { toFun := fun f => LinearMap.compDer f,\n                  map_add' :=\n                    (_ :\n                      ∀ (f₁ f₂ : M →ₗ[A] N),\n                        (fun f => LinearMap.compDer f) (f₁ + f₂) =\n                          (fun f => LinearMap.compDer f) f₁ + (fun f => LinearMap.compDer f) f₂) }\n                D)\n          x✝)\n      a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD✝ D1 D2 : Derivation R A M\nr : R\na b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nsrc✝ : Derivation R A M →ₗ[R] Derivation R A N := LinearMap.compDer ↑e\nD : Derivation R A M\n⊢ ↑(LinearMap.compDer ↑(LinearEquiv.symm e))\n      (AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : Derivation R A M),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        D) =\n    D\n[PROOFSTEP]\next a\n[GOAL]\ncase H\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD✝ D1 D2 : Derivation R A M\nr : R\na✝ b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nsrc✝ : Derivation R A M →ₗ[R] Derivation R A N := LinearMap.compDer ↑e\nD : Derivation R A M\na : A\n⊢ ↑(↑(LinearMap.compDer ↑(LinearEquiv.symm e))\n          (AddHom.toFun\n            { toAddHom := src✝.toAddHom,\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (x : Derivation R A M),\n                      AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n            D))\n      a =\n    ↑D a\n[PROOFSTEP]\nexact e.symm_apply_apply (D a)\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD✝ D1 D2 : Derivation R A M\nr : R\na b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nsrc✝ : Derivation R A M →ₗ[R] Derivation R A N := LinearMap.compDer ↑e\nD : Derivation R A N\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : Derivation R A M),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      (↑(LinearMap.compDer ↑(LinearEquiv.symm e)) D) =\n    D\n[PROOFSTEP]\next a\n[GOAL]\ncase H\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nA : Type u_2\ninst✝⁹ : CommSemiring A\ninst✝⁸ : Algebra R A\nM : Type u_3\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module A M\ninst✝⁵ : Module R M\nD✝ D1 D2 : Derivation R A M\nr : R\na✝ b : A\nN : Type u_4\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module A N\ninst✝² : Module R N\ninst✝¹ : IsScalarTower R A M\ninst✝ : IsScalarTower R A N\nf : M →ₗ[A] N\ne : M ≃ₗ[A] N\nsrc✝ : Derivation R A M →ₗ[R] Derivation R A N := LinearMap.compDer ↑e\nD : Derivation R A N\na : A\n⊢ ↑(AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : Derivation R A M),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          (↑(LinearMap.compDer ↑(LinearEquiv.symm e)) D))\n      a =\n    ↑D a\n[PROOFSTEP]\nexact e.apply_symm_apply (D a)\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommSemiring R\nA : Type u_2\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCancelCommMonoid M\ninst✝¹ : Module R M\ninst✝ : Module A M\nD : A →ₗ[R] M\nh : ∀ (a b : A), ↑D (a * b) = a • ↑D b + b • ↑D a\n⊢ ?m.473416 D h + ↑D 1 = ?m.473416 D h\n[PROOFSTEP]\nsimpa only [one_smul, one_mul] using (h 1 1).symm\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nA : Type u_2\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na b : A\nn : ℤ\n⊢ ↑D ↑n = 0\n[PROOFSTEP]\nrw [← zsmul_one, D.map_smul_of_tower n, map_one_eq_zero, smul_zero]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nA : Type u_2\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na✝ b✝ a b : A\nh : a * b = 1\n⊢ ↑D a = -a ^ 2 • ↑D b\n[PROOFSTEP]\nrw [neg_smul]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nA : Type u_2\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na✝ b✝ a b : A\nh : a * b = 1\n⊢ ↑D a = -(a ^ 2 • ↑D b)\n[PROOFSTEP]\nrefine' eq_neg_of_add_eq_zero_left _\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nA : Type u_2\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na✝ b✝ a b : A\nh : a * b = 1\n⊢ ↑D a + a ^ 2 • ↑D b = 0\n[PROOFSTEP]\ncalc\n  D a + a ^ 2 • D b = a • b • D a + a • a • D b := by simp only [smul_smul, h, one_smul, sq]\n  _ = a • D (a * b) := by rw [leibniz, smul_add, add_comm]\n  _ = 0 := by rw [h, map_one_eq_zero, smul_zero]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nA : Type u_2\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na✝ b✝ a b : A\nh : a * b = 1\n⊢ ↑D a + a ^ 2 • ↑D b = a • b • ↑D a + a • a • ↑D b\n[PROOFSTEP]\nsimp only [smul_smul, h, one_smul, sq]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nA : Type u_2\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na✝ b✝ a b : A\nh : a * b = 1\n⊢ a • b • ↑D a + a • a • ↑D b = a • ↑D (a * b)\n[PROOFSTEP]\nrw [leibniz, smul_add, add_comm]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nA : Type u_2\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1 D2 : Derivation R A M\nr : R\na✝ b✝ a b : A\nh : a * b = 1\n⊢ a • ↑D (a * b) = 0\n[PROOFSTEP]\nrw [h, map_one_eq_zero, smul_zero]\n[GOAL]\nR : Type u_1\ninst✝⁸ : CommRing R\nA : Type u_2\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nM : Type u_3\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module A M\ninst✝³ : Module R M\nD✝ D1 D2 : Derivation R A M\nr : R\na✝ b : A\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Module K M\ninst✝ : Algebra R K\nD : Derivation R K M\na : K\n⊢ ↑D a⁻¹ = -a⁻¹ ^ 2 • ↑D a\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\nR : Type u_1\ninst✝⁸ : CommRing R\nA : Type u_2\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nM : Type u_3\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module A M\ninst✝³ : Module R M\nD✝ D1 D2 : Derivation R A M\nr : R\na b : A\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Module K M\ninst✝ : Algebra R K\nD : Derivation R K M\n⊢ ↑D 0⁻¹ = -0⁻¹ ^ 2 • ↑D 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u_1\ninst✝⁸ : CommRing R\nA : Type u_2\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nM : Type u_3\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module A M\ninst✝³ : Module R M\nD✝ D1 D2 : Derivation R A M\nr : R\na✝ b : A\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Module K M\ninst✝ : Algebra R K\nD : Derivation R K M\na : K\nha : a ≠ 0\n⊢ ↑D a⁻¹ = -a⁻¹ ^ 2 • ↑D a\n[PROOFSTEP]\nexact D.leibniz_of_mul_eq_one (inv_mul_cancel ha)\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nA : Type u_2\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD✝ D1 D2 : Derivation R A M\nr : R\na✝ b✝ : A\nD : Derivation R A M\na b : A\n⊢ ↑(-↑D) (a * b) = a • ↑(-↑D) b + b • ↑(-↑D) a\n[PROOFSTEP]\nsimp only [LinearMap.neg_apply, smul_neg, neg_add_rev, leibniz, coeFn_coe, add_comm]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nA : Type u_2\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\nM : Type u_3\ninst✝² : AddCommGroup M\ninst✝¹ : Module A M\ninst✝ : Module R M\nD D1✝ D2✝ : Derivation R A M\nr : R\na✝ b✝ : A\nD1 D2 : Derivation R A M\na b : A\n⊢ ↑(↑D1 - ↑D2) (a * b) = a • ↑(↑D1 - ↑D2) b + b • ↑(↑D1 - ↑D2) a\n[PROOFSTEP]\nsimp only [LinearMap.sub_apply, leibniz, coeFn_coe, smul_sub, add_sub_add_comm]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Derivation.Basic", "llama_tokens": 15009, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583124210896, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3831997729245279}}
{"text": "[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : SMul R M\ninst✝¹ : MulAction A M\ninst✝ : IsScalarTower R A M\nr : R\nx : M\n⊢ ↑(algebraMap R A) r • x = r • x\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one, smul_assoc, one_smul]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁷ : CommSemiring R\ninst✝⁶ : CommSemiring S\ninst✝⁵ : Semiring A\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R S\ninst✝² : Algebra S A\ninst✝¹ : Algebra S B\ninst✝ : Algebra R A\nh : ∀ (x : R), ↑(algebraMap R A) x = ↑(algebraMap S A) (↑(algebraMap R S) x)\nx : R\ny : S\nz : A\n⊢ (x • y) • z = x • y • z\n[PROOFSTEP]\nsimp_rw [Algebra.smul_def, RingHom.map_mul, mul_assoc, h]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : IsScalarTower R S A\ninst✝ : IsScalarTower R S B\nx : R\n⊢ ↑(algebraMap R A) x = ↑(RingHom.comp (algebraMap S A) (algebraMap R S)) x\n[PROOFSTEP]\nsimp_rw [RingHom.comp_apply, Algebra.algebraMap_eq_smul_one, smul_assoc, one_smul]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : IsScalarTower R S A\ninst✝ : IsScalarTower R S B\nx : R\n⊢ ↑(algebraMap R A) x = ↑(algebraMap S A) (↑(algebraMap R S) x)\n[PROOFSTEP]\nrw [algebraMap_eq R S A, RingHom.comp_apply]\n[GOAL]\nR : Type u\nS✝ : Type v\nA✝ : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹² : CommSemiring R\ninst✝¹¹ : CommSemiring S✝\ninst✝¹⁰ : Semiring A✝\ninst✝⁹ : Semiring B\ninst✝⁸ : Algebra R S✝\ninst✝⁷ : Algebra S✝ A✝\ninst✝⁶ : Algebra S✝ B\ninst✝⁵ : Algebra R A✝\ninst✝⁴ : Algebra R B\ninst✝³ : IsScalarTower R S✝ A✝\ninst✝² : IsScalarTower R S✝ B\nS : Type u\nA : Type v\ninst✝¹ : CommSemiring S\ninst✝ : Semiring A\nh1 h2 : Algebra S A\nr : S\nx : A\n⊢ A\n[PROOFSTEP]\nhave I := h1\n[GOAL]\nR : Type u\nS✝ : Type v\nA✝ : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹² : CommSemiring R\ninst✝¹¹ : CommSemiring S✝\ninst✝¹⁰ : Semiring A✝\ninst✝⁹ : Semiring B\ninst✝⁸ : Algebra R S✝\ninst✝⁷ : Algebra S✝ A✝\ninst✝⁶ : Algebra S✝ B\ninst✝⁵ : Algebra R A✝\ninst✝⁴ : Algebra R B\ninst✝³ : IsScalarTower R S✝ A✝\ninst✝² : IsScalarTower R S✝ B\nS : Type u\nA : Type v\ninst✝¹ : CommSemiring S\ninst✝ : Semiring A\nh1 h2 : Algebra S A\nr : S\nx : A\nI : Algebra S A\n⊢ A\n[PROOFSTEP]\nexact r • x\n[GOAL]\nR : Type u\nS✝ : Type v\nA✝ : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹² : CommSemiring R\ninst✝¹¹ : CommSemiring S✝\ninst✝¹⁰ : Semiring A✝\ninst✝⁹ : Semiring B\ninst✝⁸ : Algebra R S✝\ninst✝⁷ : Algebra S✝ A✝\ninst✝⁶ : Algebra S✝ B\ninst✝⁵ : Algebra R A✝\ninst✝⁴ : Algebra R B\ninst✝³ : IsScalarTower R S✝ A✝\ninst✝² : IsScalarTower R S✝ B\nS : Type u\nA : Type v\ninst✝¹ : CommSemiring S\ninst✝ : Semiring A\nh1 h2 : Algebra S A\nh :\n  ∀ (r : S) (x : A),\n    (let_fun I := h1;\n      r • x) =\n      r • x\nr : S\n⊢ ↑(algebraMap S A) r = ↑(algebraMap S A) r\n[PROOFSTEP]\nsimpa only [@Algebra.smul_def _ _ _ _ h1, @Algebra.smul_def _ _ _ _ h2, mul_one] using h r 1\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : IsScalarTower R S A\ninst✝ : IsScalarTower R S B\nf : A →ₐ[S] B\nr : R\n⊢ ↑f (↑(algebraMap R A) r) = ↑(algebraMap R B) r\n[PROOFSTEP]\nrw [algebraMap_apply R S A r, f.commutes, ← algebraMap_apply R S B]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : IsScalarTower R S A\ninst✝ : IsScalarTower R S B\nf : A →ₐ[S] B\nsrc✝ : A →+* B := ↑f\nr : R\n⊢ OneHom.toFun\n      (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : A), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n      (↑(algebraMap R A) r) =\n    ↑(algebraMap R B) r\n[PROOFSTEP]\nrw [algebraMap_apply R S A, algebraMap_apply R S B]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : IsScalarTower R S A\ninst✝ : IsScalarTower R S B\nf : A →ₐ[S] B\nsrc✝ : A →+* B := ↑f\nr : R\n⊢ OneHom.toFun\n      (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : A), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n      (↑(algebraMap S A) (↑(algebraMap R S) r)) =\n    ↑(algebraMap S B) (↑(algebraMap R S) r)\n[PROOFSTEP]\nexact f.commutes (algebraMap R S r)\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : IsScalarTower R S A\ninst✝ : IsScalarTower R S B\nf : A ≃ₐ[S] B\nsrc✝ : A ≃+* B := ↑f\nr : R\n⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R A) r) = ↑(algebraMap R B) r\n[PROOFSTEP]\nrw [algebraMap_apply R S A, algebraMap_apply R S B]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra S A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : IsScalarTower R S A\ninst✝ : IsScalarTower R S B\nf : A ≃ₐ[S] B\nsrc✝ : A ≃+* B := ↑f\nr : R\n⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap S A) (↑(algebraMap R S) r)) = ↑(algebraMap S B) (↑(algebraMap R S) r)\n[PROOFSTEP]\nexact f.commutes (algebraMap R S r)\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module A M\ninst✝ : IsScalarTower R A M\nhsur : Function.Surjective ↑(algebraMap R A)\nX : Set M\n⊢ restrictScalars R (span A X) = span R X\n[PROOFSTEP]\nrefine' ((span_le_restrictScalars R A X).antisymm fun m hm => _).symm\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module A M\ninst✝ : IsScalarTower R A M\nhsur : Function.Surjective ↑(algebraMap R A)\nX : Set M\nm : M\nhm : m ∈ restrictScalars R (span A X)\n⊢ m ∈ span R X\n[PROOFSTEP]\nrefine' span_induction hm subset_span (zero_mem _) (fun _ _ => add_mem) fun a m hm => _\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module A M\ninst✝ : IsScalarTower R A M\nhsur : Function.Surjective ↑(algebraMap R A)\nX : Set M\nm✝ : M\nhm✝ : m✝ ∈ restrictScalars R (span A X)\na : A\nm : M\nhm : m ∈ span R X\n⊢ a • m ∈ span R X\n[PROOFSTEP]\nobtain ⟨r, rfl⟩ := hsur a\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : Algebra R A\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module A M\ninst✝ : IsScalarTower R A M\nhsur : Function.Surjective ↑(algebraMap R A)\nX : Set M\nm✝ : M\nhm✝ : m✝ ∈ restrictScalars R (span A X)\nm : M\nhm : m ∈ span R X\nr : R\n⊢ ↑(algebraMap R A) r • m ∈ span R X\n[PROOFSTEP]\nsimpa [algebraMap_smul] using smul_mem _ r hm\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁶ : Semiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Module R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\ns : Set S\nt : Set A\nk : S\nhks : k ∈ span R s\nx : A\nhx : x ∈ t\n⊢ 0 • x ∈ span R (s • t)\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁶ : Semiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Module R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\ns : Set S\nt : Set A\nk : S\nhks : k ∈ span R s\nx : A\nhx : x ∈ t\n⊢ 0 ∈ span R (s • t)\n[PROOFSTEP]\nexact zero_mem _\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁶ : Semiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Module R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\ns : Set S\nt : Set A\nk : S\nhks : k ∈ span R s\nx : A\nhx : x ∈ t\nc₁ c₂ : S\nih₁ : c₁ • x ∈ span R (s • t)\nih₂ : c₂ • x ∈ span R (s • t)\n⊢ (c₁ + c₂) • x ∈ span R (s • t)\n[PROOFSTEP]\nrw [add_smul]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁶ : Semiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Module R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\ns : Set S\nt : Set A\nk : S\nhks : k ∈ span R s\nx : A\nhx : x ∈ t\nc₁ c₂ : S\nih₁ : c₁ • x ∈ span R (s • t)\nih₂ : c₂ • x ∈ span R (s • t)\n⊢ c₁ • x + c₂ • x ∈ span R (s • t)\n[PROOFSTEP]\nexact add_mem ih₁ ih₂\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁶ : Semiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Module R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\ns : Set S\nt : Set A\nk : S\nhks : k ∈ span R s\nx : A\nhx : x ∈ t\nb : R\nc : S\nhc : c • x ∈ span R (s • t)\n⊢ (b • c) • x ∈ span R (s • t)\n[PROOFSTEP]\nrw [IsScalarTower.smul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁶ : Semiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Module R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\ns : Set S\nt : Set A\nk : S\nhks : k ∈ span R s\nx : A\nhx : x ∈ t\nb : R\nc : S\nhc : c • x ∈ span R (s • t)\n⊢ b • c • x ∈ span R (s • t)\n[PROOFSTEP]\nexact smul_mem _ _ hc\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : Module R S\ninst✝³ : Module S A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R S A\ninst✝ : SMulCommClass R S A\ns : Set S\nhs : span R s = ⊤\nt : Set A\nk : S\nx : A\nhx : x ∈ span R t\n⊢ k • 0 ∈ span R (s • t)\n[PROOFSTEP]\nrw [smul_zero]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : Module R S\ninst✝³ : Module S A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R S A\ninst✝ : SMulCommClass R S A\ns : Set S\nhs : span R s = ⊤\nt : Set A\nk : S\nx : A\nhx : x ∈ span R t\n⊢ 0 ∈ span R (s • t)\n[PROOFSTEP]\nexact zero_mem _\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : Module R S\ninst✝³ : Module S A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R S A\ninst✝ : SMulCommClass R S A\ns : Set S\nhs : span R s = ⊤\nt : Set A\nk : S\nx✝ : A\nhx : x✝ ∈ span R t\nx y : A\nihx : k • x ∈ span R (s • t)\nihy : k • y ∈ span R (s • t)\n⊢ k • (x + y) ∈ span R (s • t)\n[PROOFSTEP]\nrw [smul_add]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : Module R S\ninst✝³ : Module S A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R S A\ninst✝ : SMulCommClass R S A\ns : Set S\nhs : span R s = ⊤\nt : Set A\nk : S\nx✝ : A\nhx : x✝ ∈ span R t\nx y : A\nihx : k • x ∈ span R (s • t)\nihy : k • y ∈ span R (s • t)\n⊢ k • x + k • y ∈ span R (s • t)\n[PROOFSTEP]\nexact add_mem ihx ihy\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : Module R S\ninst✝³ : Module S A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R S A\ninst✝ : SMulCommClass R S A\ns : Set S\nhs : span R s = ⊤\nt : Set A\nk : S\nx✝ : A\nhx✝ : x✝ ∈ span R (s • t)\nx : A\nhx : x ∈ s • t\n⊢ k • x ∈ span R (s • t)\n[PROOFSTEP]\nlet ⟨p, q, _hp, hq, hpq⟩ := Set.mem_smul.1 hx\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : Module R S\ninst✝³ : Module S A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R S A\ninst✝ : SMulCommClass R S A\ns : Set S\nhs : span R s = ⊤\nt : Set A\nk : S\nx✝ : A\nhx✝ : x✝ ∈ span R (s • t)\nx : A\nhx : x ∈ s • t\np : S\nq : A\n_hp : p ∈ s\nhq : q ∈ t\nhpq : p • q = x\n⊢ k • x ∈ span R (s • t)\n[PROOFSTEP]\nrw [← hpq, smul_smul]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : Module R S\ninst✝³ : Module S A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R S A\ninst✝ : SMulCommClass R S A\ns : Set S\nhs : span R s = ⊤\nt : Set A\nk : S\nx✝ : A\nhx✝ : x✝ ∈ span R (s • t)\nx : A\nhx : x ∈ s • t\np : S\nq : A\n_hp : p ∈ s\nhq : q ∈ t\nhpq : p • q = x\n⊢ (k * p) • q ∈ span R (s • t)\n[PROOFSTEP]\nexact smul_mem_span_smul_of_mem (hs.symm ▸ mem_top) hq\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : Module R S\ninst✝³ : Module S A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R S A\ninst✝ : SMulCommClass R S A\ns : Set S\nhs : span R s = ⊤\nt : Set A\nk : S\nx : A\nhx : x ∈ span R (s • t)\n⊢ k • 0 ∈ span R (s • t)\n[PROOFSTEP]\nrw [smul_zero]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : Module R S\ninst✝³ : Module S A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R S A\ninst✝ : SMulCommClass R S A\ns : Set S\nhs : span R s = ⊤\nt : Set A\nk : S\nx : A\nhx : x ∈ span R (s • t)\n⊢ 0 ∈ span R (s • t)\n[PROOFSTEP]\nexact zero_mem _\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : Module R S\ninst✝³ : Module S A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R S A\ninst✝ : SMulCommClass R S A\ns : Set S\nhs : span R s = ⊤\nt : Set A\nk : S\nx✝ : A\nhx : x✝ ∈ span R (s • t)\nx y : A\nihx : k • x ∈ span R (s • t)\nihy : k • y ∈ span R (s • t)\n⊢ k • (x + y) ∈ span R (s • t)\n[PROOFSTEP]\nrw [smul_add]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : Module R S\ninst✝³ : Module S A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R S A\ninst✝ : SMulCommClass R S A\ns : Set S\nhs : span R s = ⊤\nt : Set A\nk : S\nx✝ : A\nhx : x✝ ∈ span R (s • t)\nx y : A\nihx : k • x ∈ span R (s • t)\nihy : k • y ∈ span R (s • t)\n⊢ k • x + k • y ∈ span R (s • t)\n[PROOFSTEP]\nexact add_mem ihx ihy\n[GOAL]\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring S✝\ninst✝¹⁰ : AddCommMonoid A\ninst✝⁹ : Algebra R S✝\ninst✝⁸ : Module S✝ A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R S✝ A\nS : Type u_1\nT : Type u_2\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Semiring T\ninst✝³ : Algebra R S\ninst✝² : Algebra R T\ninst✝¹ : Algebra S T\ninst✝ : IsScalarTower R S T\nx : S\na : Set S\nhx : x ∈ span R a\n⊢ ↑(algebraMap S T) x ∈ span R (↑(algebraMap S T) '' a)\n[PROOFSTEP]\nrw [span_algebraMap_image_of_tower, mem_map]\n[GOAL]\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nM : Type v₁\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring S✝\ninst✝¹⁰ : AddCommMonoid A\ninst✝⁹ : Algebra R S✝\ninst✝⁸ : Module S✝ A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R S✝ A\nS : Type u_1\nT : Type u_2\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Semiring T\ninst✝³ : Algebra R S\ninst✝² : Algebra R T\ninst✝¹ : Algebra S T\ninst✝ : IsScalarTower R S T\nx : S\na : Set S\nhx : x ∈ span R a\n⊢ ∃ y, y ∈ span R a ∧ ↑(↑R (Algebra.linearMap S T)) y = ↑(algebraMap S T) x\n[PROOFSTEP]\nexact ⟨x, hx, rfl⟩\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Algebra.Tower", "llama_tokens": 8273, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.743168019989179, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.38319223183486084}}
{"text": "[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\n⊢ ¬IntervalIntegrable g volume a b\n[PROOFSTEP]\nintro hgi\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nhgi : IntervalIntegrable g volume a b\n⊢ False\n[PROOFSTEP]\nobtain ⟨C, hC₀, s, hsl, hsub, hfd, hg⟩ :\n  ∃ (C : ℝ) (_ : 0 ≤ C),\n    ∃ s ∈ l,\n      (∀ x ∈ s, ∀ y ∈ s, [[x, y]] ⊆ [[a, b]]) ∧\n        (∀ x ∈ s, ∀ y ∈ s, ∀ z ∈ [[x, y]], DifferentiableAt ℝ f z) ∧\n          ∀ x ∈ s, ∀ y ∈ s, ∀ z ∈ [[x, y]], ‖deriv f z‖ ≤ C * ‖g z‖ :=\n  by\n  rcases hfg.exists_nonneg with ⟨C, C₀, hC⟩\n  have h :\n    ∀ᶠ x : ℝ × ℝ in l.prod l, ∀ y ∈ [[x.1, x.2]], (DifferentiableAt ℝ f y ∧ ‖deriv f y‖ ≤ C * ‖g y‖) ∧ y ∈ [[a, b]] :=\n    (tendsto_fst.uIcc tendsto_snd).eventually ((hd.and hC.bound).and hl).smallSets\n  rcases mem_prod_self_iff.1 h with ⟨s, hsl, hs⟩\n  simp only [prod_subset_iff, mem_setOf_eq] at hs \n  exact\n    ⟨C, C₀, s, hsl, fun x hx y hy z hz => (hs x hx y hy z hz).2, fun x hx y hy z hz => (hs x hx y hy z hz).1.1,\n      fun x hx y hy z hz => (hs x hx y hy z hz).1.2⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nhgi : IntervalIntegrable g volume a b\n⊢ ∃ C x s,\n    s ∈ l ∧\n      (∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → [[x, y]] ⊆ [[a, b]]) ∧\n        (∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z) ∧\n          ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\n[PROOFSTEP]\nrcases hfg.exists_nonneg with ⟨C, C₀, hC⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nhgi : IntervalIntegrable g volume a b\nC : ℝ\nC₀ : 0 ≤ C\nhC : IsBigOWith C l (deriv f) g\n⊢ ∃ C x s,\n    s ∈ l ∧\n      (∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → [[x, y]] ⊆ [[a, b]]) ∧\n        (∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z) ∧\n          ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\n[PROOFSTEP]\nhave h :\n  ∀ᶠ x : ℝ × ℝ in l.prod l, ∀ y ∈ [[x.1, x.2]], (DifferentiableAt ℝ f y ∧ ‖deriv f y‖ ≤ C * ‖g y‖) ∧ y ∈ [[a, b]] :=\n  (tendsto_fst.uIcc tendsto_snd).eventually ((hd.and hC.bound).and hl).smallSets\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nhgi : IntervalIntegrable g volume a b\nC : ℝ\nC₀ : 0 ≤ C\nhC : IsBigOWith C l (deriv f) g\nh :\n  ∀ᶠ (x : ℝ × ℝ) in Filter.prod l l,\n    ∀ (y : ℝ), y ∈ [[x.fst, x.snd]] → (DifferentiableAt ℝ f y ∧ ‖deriv f y‖ ≤ C * ‖g y‖) ∧ y ∈ [[a, b]]\n⊢ ∃ C x s,\n    s ∈ l ∧\n      (∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → [[x, y]] ⊆ [[a, b]]) ∧\n        (∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z) ∧\n          ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\n[PROOFSTEP]\nrcases mem_prod_self_iff.1 h with ⟨s, hsl, hs⟩\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nhgi : IntervalIntegrable g volume a b\nC : ℝ\nC₀ : 0 ≤ C\nhC : IsBigOWith C l (deriv f) g\nh :\n  ∀ᶠ (x : ℝ × ℝ) in Filter.prod l l,\n    ∀ (y : ℝ), y ∈ [[x.fst, x.snd]] → (DifferentiableAt ℝ f y ∧ ‖deriv f y‖ ≤ C * ‖g y‖) ∧ y ∈ [[a, b]]\ns : Set ℝ\nhsl : s ∈ l\nhs :\n  s ×ˢ s ⊆\n    {x |\n      (fun x => ∀ (y : ℝ), y ∈ [[x.fst, x.snd]] → (DifferentiableAt ℝ f y ∧ ‖deriv f y‖ ≤ C * ‖g y‖) ∧ y ∈ [[a, b]]) x}\n⊢ ∃ C x s,\n    s ∈ l ∧\n      (∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → [[x, y]] ⊆ [[a, b]]) ∧\n        (∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z) ∧\n          ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\n[PROOFSTEP]\nsimp only [prod_subset_iff, mem_setOf_eq] at hs \n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nhgi : IntervalIntegrable g volume a b\nC : ℝ\nC₀ : 0 ≤ C\nhC : IsBigOWith C l (deriv f) g\nh :\n  ∀ᶠ (x : ℝ × ℝ) in Filter.prod l l,\n    ∀ (y : ℝ), y ∈ [[x.fst, x.snd]] → (DifferentiableAt ℝ f y ∧ ‖deriv f y‖ ≤ C * ‖g y‖) ∧ y ∈ [[a, b]]\ns : Set ℝ\nhsl : s ∈ l\nhs :\n  ∀ (x : ℝ),\n    x ∈ s →\n      ∀ (y : ℝ),\n        y ∈ s → ∀ (y_1 : ℝ), y_1 ∈ [[x, y]] → (DifferentiableAt ℝ f y_1 ∧ ‖deriv f y_1‖ ≤ C * ‖g y_1‖) ∧ y_1 ∈ [[a, b]]\n⊢ ∃ C x s,\n    s ∈ l ∧\n      (∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → [[x, y]] ⊆ [[a, b]]) ∧\n        (∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z) ∧\n          ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\n[PROOFSTEP]\nexact\n  ⟨C, C₀, s, hsl, fun x hx y hy z hz => (hs x hx y hy z hz).2, fun x hx y hy z hz => (hs x hx y hy z hz).1.1,\n    fun x hx y hy z hz => (hs x hx y hy z hz).1.2⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nhgi : IntervalIntegrable g volume a b\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhsub : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → [[x, y]] ⊆ [[a, b]]\nhfd : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\n⊢ False\n[PROOFSTEP]\nreplace hgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\n[GOAL]\ncase hgi\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nhgi : IntervalIntegrable g volume a b\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhsub : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → [[x, y]] ⊆ [[a, b]]\nhfd : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\n⊢ IntervalIntegrable (fun x => C * ‖g x‖) volume a b\n[PROOFSTEP]\nconvert hgi.norm.smul C using 1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhsub : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → [[x, y]] ⊆ [[a, b]]\nhfd : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\n⊢ False\n[PROOFSTEP]\nobtain ⟨c, hc, d, hd, hlt⟩ : ∃ c ∈ s, ∃ d ∈ s, (‖f c‖ + ∫ y in Ι a b, C * ‖g y‖) < ‖f d‖ :=\n  by\n  rcases Filter.nonempty_of_mem hsl with ⟨c, hc⟩\n  have : ∀ᶠ x in l, (‖f c‖ + ∫ y in Ι a b, C * ‖g y‖) < ‖f x‖ := hf.eventually (eventually_gt_atTop _)\n  exact ⟨c, hc, (this.and hsl).exists.imp fun d hd => ⟨hd.2, hd.1⟩⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhsub : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → [[x, y]] ⊆ [[a, b]]\nhfd : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\n⊢ ∃ c, c ∈ s ∧ ∃ d, d ∈ s ∧ ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\n[PROOFSTEP]\nrcases Filter.nonempty_of_mem hsl with ⟨c, hc⟩\n[GOAL]\ncase intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhsub : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → [[x, y]] ⊆ [[a, b]]\nhfd : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\nc : ℝ\nhc : c ∈ s\n⊢ ∃ c, c ∈ s ∧ ∃ d, d ∈ s ∧ ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\n[PROOFSTEP]\nhave : ∀ᶠ x in l, (‖f c‖ + ∫ y in Ι a b, C * ‖g y‖) < ‖f x‖ := hf.eventually (eventually_gt_atTop _)\n[GOAL]\ncase intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhsub : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → [[x, y]] ⊆ [[a, b]]\nhfd : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\nc : ℝ\nhc : c ∈ s\nthis : ∀ᶠ (x : ℝ) in l, ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f x‖\n⊢ ∃ c, c ∈ s ∧ ∃ d, d ∈ s ∧ ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\n[PROOFSTEP]\nexact ⟨c, hc, (this.and hsl).exists.imp fun d hd => ⟨hd.2, hd.1⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd✝ : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhsub : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → [[x, y]] ⊆ [[a, b]]\nhfd : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\nc : ℝ\nhc : c ∈ s\nd : ℝ\nhd : d ∈ s\nhlt : ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\n⊢ False\n[PROOFSTEP]\nspecialize hsub c hc d hd\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd✝ : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhfd : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\nc : ℝ\nhc : c ∈ s\nd : ℝ\nhd : d ∈ s\nhlt : ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\nhsub : [[c, d]] ⊆ [[a, b]]\n⊢ False\n[PROOFSTEP]\nspecialize hfd c hc d hd\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd✝ : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhg : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\nc : ℝ\nhc : c ∈ s\nd : ℝ\nhd : d ∈ s\nhlt : ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\nhsub : [[c, d]] ⊆ [[a, b]]\nhfd : ∀ (z : ℝ), z ∈ [[c, d]] → DifferentiableAt ℝ f z\n⊢ False\n[PROOFSTEP]\nreplace hg : ∀ x ∈ Ι c d, ‖deriv f x‖ ≤ C * ‖g x‖\n[GOAL]\ncase hg\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd✝ : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhg : ∀ (x : ℝ), x ∈ s → ∀ (y : ℝ), y ∈ s → ∀ (z : ℝ), z ∈ [[x, y]] → ‖deriv f z‖ ≤ C * ‖g z‖\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\nc : ℝ\nhc : c ∈ s\nd : ℝ\nhd : d ∈ s\nhlt : ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\nhsub : [[c, d]] ⊆ [[a, b]]\nhfd : ∀ (z : ℝ), z ∈ [[c, d]] → DifferentiableAt ℝ f z\n⊢ ∀ (x : ℝ), x ∈ Ι c d → ‖deriv f x‖ ≤ C * ‖g x‖\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd✝ : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\nc : ℝ\nhc : c ∈ s\nd : ℝ\nhd : d ∈ s\nhlt : ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\nhsub : [[c, d]] ⊆ [[a, b]]\nhfd : ∀ (z : ℝ), z ∈ [[c, d]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ Ι c d → ‖deriv f x‖ ≤ C * ‖g x‖\n⊢ False\n[PROOFSTEP]\nexact fun z hz => hg c hc d hd z ⟨hz.1.le, hz.2⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd✝ : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\nc : ℝ\nhc : c ∈ s\nd : ℝ\nhd : d ∈ s\nhlt : ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\nhsub : [[c, d]] ⊆ [[a, b]]\nhfd : ∀ (z : ℝ), z ∈ [[c, d]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ Ι c d → ‖deriv f x‖ ≤ C * ‖g x‖\n⊢ False\n[PROOFSTEP]\nhave hg_ae : ∀ᵐ x ∂volume.restrict (Ι c d), ‖deriv f x‖ ≤ C * ‖g x‖ := (ae_restrict_mem measurableSet_uIoc).mono hg\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd✝ : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\nc : ℝ\nhc : c ∈ s\nd : ℝ\nhd : d ∈ s\nhlt : ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\nhsub : [[c, d]] ⊆ [[a, b]]\nhfd : ∀ (z : ℝ), z ∈ [[c, d]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ Ι c d → ‖deriv f x‖ ≤ C * ‖g x‖\nhg_ae : ∀ᵐ (x : ℝ) ∂Measure.restrict volume (Ι c d), ‖deriv f x‖ ≤ C * ‖g x‖\n⊢ False\n[PROOFSTEP]\nhave hsub' : Ι c d ⊆ Ι a b := uIoc_subset_uIoc_of_uIcc_subset_uIcc hsub\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd✝ : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\nc : ℝ\nhc : c ∈ s\nd : ℝ\nhd : d ∈ s\nhlt : ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\nhsub : [[c, d]] ⊆ [[a, b]]\nhfd : ∀ (z : ℝ), z ∈ [[c, d]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ Ι c d → ‖deriv f x‖ ≤ C * ‖g x‖\nhg_ae : ∀ᵐ (x : ℝ) ∂Measure.restrict volume (Ι c d), ‖deriv f x‖ ≤ C * ‖g x‖\nhsub' : Ι c d ⊆ Ι a b\n⊢ False\n[PROOFSTEP]\nhave hfi : IntervalIntegrable (deriv f) volume c d :=\n  (hgi.mono_set hsub).mono_fun' (aestronglyMeasurable_deriv _ _) hg_ae\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd✝ : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\nc : ℝ\nhc : c ∈ s\nd : ℝ\nhd : d ∈ s\nhlt : ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\nhsub : [[c, d]] ⊆ [[a, b]]\nhfd : ∀ (z : ℝ), z ∈ [[c, d]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ Ι c d → ‖deriv f x‖ ≤ C * ‖g x‖\nhg_ae : ∀ᵐ (x : ℝ) ∂Measure.restrict volume (Ι c d), ‖deriv f x‖ ≤ C * ‖g x‖\nhsub' : Ι c d ⊆ Ι a b\nhfi : IntervalIntegrable (deriv f) volume c d\n⊢ False\n[PROOFSTEP]\nrefine' hlt.not_le (sub_le_iff_le_add'.1 _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : SecondCountableTopology E\ninst✝³ : CompleteSpace E\ninst✝² : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b : ℝ\nl : Filter ℝ\ninst✝¹ : NeBot l\ninst✝ : TendstoIxxClass Icc l l\nhl : [[a, b]] ∈ l\nhd✝ : ∀ᶠ (x : ℝ) in l, DifferentiableAt ℝ f x\nhf : Tendsto (fun x => ‖f x‖) l atTop\nhfg : deriv f =O[l] g\nC : ℝ\nhC₀ : 0 ≤ C\ns : Set ℝ\nhsl : s ∈ l\nhgi : IntervalIntegrable (fun x => C * ‖g x‖) volume a b\nc : ℝ\nhc : c ∈ s\nd : ℝ\nhd : d ∈ s\nhlt : ‖f c‖ + ∫ (y : ℝ) in Ι a b, C * ‖g y‖ < ‖f d‖\nhsub : [[c, d]] ⊆ [[a, b]]\nhfd : ∀ (z : ℝ), z ∈ [[c, d]] → DifferentiableAt ℝ f z\nhg : ∀ (x : ℝ), x ∈ Ι c d → ‖deriv f x‖ ≤ C * ‖g x‖\nhg_ae : ∀ᵐ (x : ℝ) ∂Measure.restrict volume (Ι c d), ‖deriv f x‖ ≤ C * ‖g x‖\nhsub' : Ι c d ⊆ Ι a b\nhfi : IntervalIntegrable (deriv f) volume c d\n⊢ ‖f d‖ - ‖f c‖ ≤ ∫ (y : ℝ) in Ι a b, C * ‖g y‖\n[PROOFSTEP]\ncalc\n  ‖f d‖ - ‖f c‖ ≤ ‖f d - f c‖ := norm_sub_norm_le _ _\n  _ = ‖∫ x in c..d, deriv f x‖ := (congr_arg _ (integral_deriv_eq_sub hfd hfi).symm)\n  _ = ‖∫ x in Ι c d, deriv f x‖ := (norm_integral_eq_norm_integral_Ioc _)\n  _ ≤ ∫ x in Ι c d, ‖deriv f x‖ := (norm_integral_le_integral_norm _)\n  _ ≤ ∫ x in Ι c d, C * ‖g x‖ := (set_integral_mono_on hfi.norm.def (hgi.def.mono_set hsub') measurableSet_uIoc hg)\n  _ ≤ ∫ x in Ι a b, C * ‖g x‖ :=\n    set_integral_mono_set hgi.def (ae_of_all _ fun x => mul_nonneg hC₀ (norm_nonneg _)) hsub'.eventuallyLE\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b c : ℝ\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nh_deriv : ∀ᶠ (x : ℝ) in 𝓝[[[a, b]] \\ {c}] c, DifferentiableAt ℝ f x\nh_infty : Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \\ {c}] c) atTop\nhg : deriv f =O[𝓝[[[a, b]] \\ {c}] c] g\n⊢ ¬IntervalIntegrable g volume a b\n[PROOFSTEP]\nobtain ⟨l, hl, hl', hle, hmem⟩ : ∃ l : Filter ℝ, TendstoIxxClass Icc l l ∧ l.NeBot ∧ l ≤ 𝓝 c ∧ [[a, b]] \\ { c } ∈ l :=\n  by\n  cases' (min_lt_max.2 hne).lt_or_lt c with hlt hlt\n  · refine' ⟨𝓝[<] c, inferInstance, inferInstance, inf_le_left, _⟩\n    rw [← Iic_diff_right]\n    exact diff_mem_nhdsWithin_diff (Icc_mem_nhdsWithin_Iic ⟨hlt, hc.2⟩) _\n  · refine' ⟨𝓝[>] c, inferInstance, inferInstance, inf_le_left, _⟩\n    rw [← Ici_diff_left]\n    exact diff_mem_nhdsWithin_diff (Icc_mem_nhdsWithin_Ici ⟨hc.1, hlt⟩) _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b c : ℝ\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nh_deriv : ∀ᶠ (x : ℝ) in 𝓝[[[a, b]] \\ {c}] c, DifferentiableAt ℝ f x\nh_infty : Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \\ {c}] c) atTop\nhg : deriv f =O[𝓝[[[a, b]] \\ {c}] c] g\n⊢ ∃ l, TendstoIxxClass Icc l l ∧ NeBot l ∧ l ≤ 𝓝 c ∧ [[a, b]] \\ {c} ∈ l\n[PROOFSTEP]\ncases' (min_lt_max.2 hne).lt_or_lt c with hlt hlt\n[GOAL]\ncase inl\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b c : ℝ\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nh_deriv : ∀ᶠ (x : ℝ) in 𝓝[[[a, b]] \\ {c}] c, DifferentiableAt ℝ f x\nh_infty : Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \\ {c}] c) atTop\nhg : deriv f =O[𝓝[[[a, b]] \\ {c}] c] g\nhlt : min a b < c\n⊢ ∃ l, TendstoIxxClass Icc l l ∧ NeBot l ∧ l ≤ 𝓝 c ∧ [[a, b]] \\ {c} ∈ l\n[PROOFSTEP]\nrefine' ⟨𝓝[<] c, inferInstance, inferInstance, inf_le_left, _⟩\n[GOAL]\ncase inl\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b c : ℝ\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nh_deriv : ∀ᶠ (x : ℝ) in 𝓝[[[a, b]] \\ {c}] c, DifferentiableAt ℝ f x\nh_infty : Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \\ {c}] c) atTop\nhg : deriv f =O[𝓝[[[a, b]] \\ {c}] c] g\nhlt : min a b < c\n⊢ [[a, b]] \\ {c} ∈ 𝓝[Iio c] c\n[PROOFSTEP]\nrw [← Iic_diff_right]\n[GOAL]\ncase inl\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b c : ℝ\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nh_deriv : ∀ᶠ (x : ℝ) in 𝓝[[[a, b]] \\ {c}] c, DifferentiableAt ℝ f x\nh_infty : Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \\ {c}] c) atTop\nhg : deriv f =O[𝓝[[[a, b]] \\ {c}] c] g\nhlt : min a b < c\n⊢ [[a, b]] \\ {c} ∈ 𝓝[Iic c \\ {c}] c\n[PROOFSTEP]\nexact diff_mem_nhdsWithin_diff (Icc_mem_nhdsWithin_Iic ⟨hlt, hc.2⟩) _\n[GOAL]\ncase inr\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b c : ℝ\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nh_deriv : ∀ᶠ (x : ℝ) in 𝓝[[[a, b]] \\ {c}] c, DifferentiableAt ℝ f x\nh_infty : Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \\ {c}] c) atTop\nhg : deriv f =O[𝓝[[[a, b]] \\ {c}] c] g\nhlt : c < max a b\n⊢ ∃ l, TendstoIxxClass Icc l l ∧ NeBot l ∧ l ≤ 𝓝 c ∧ [[a, b]] \\ {c} ∈ l\n[PROOFSTEP]\nrefine' ⟨𝓝[>] c, inferInstance, inferInstance, inf_le_left, _⟩\n[GOAL]\ncase inr\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b c : ℝ\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nh_deriv : ∀ᶠ (x : ℝ) in 𝓝[[[a, b]] \\ {c}] c, DifferentiableAt ℝ f x\nh_infty : Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \\ {c}] c) atTop\nhg : deriv f =O[𝓝[[[a, b]] \\ {c}] c] g\nhlt : c < max a b\n⊢ [[a, b]] \\ {c} ∈ 𝓝[Ioi c] c\n[PROOFSTEP]\nrw [← Ici_diff_left]\n[GOAL]\ncase inr\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b c : ℝ\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nh_deriv : ∀ᶠ (x : ℝ) in 𝓝[[[a, b]] \\ {c}] c, DifferentiableAt ℝ f x\nh_infty : Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \\ {c}] c) atTop\nhg : deriv f =O[𝓝[[[a, b]] \\ {c}] c] g\nhlt : c < max a b\n⊢ [[a, b]] \\ {c} ∈ 𝓝[Ici c \\ {c}] c\n[PROOFSTEP]\nexact diff_mem_nhdsWithin_diff (Icc_mem_nhdsWithin_Ici ⟨hc.1, hlt⟩) _\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b c : ℝ\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nh_deriv : ∀ᶠ (x : ℝ) in 𝓝[[[a, b]] \\ {c}] c, DifferentiableAt ℝ f x\nh_infty : Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \\ {c}] c) atTop\nhg : deriv f =O[𝓝[[[a, b]] \\ {c}] c] g\nl : Filter ℝ\nhl : TendstoIxxClass Icc l l\nhl' : NeBot l\nhle : l ≤ 𝓝 c\nhmem : [[a, b]] \\ {c} ∈ l\n⊢ ¬IntervalIntegrable g volume a b\n[PROOFSTEP]\nhave : l ≤ 𝓝[[[a, b]] \\ { c }] c := le_inf hle (le_principal_iff.2 hmem)\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → E\ng : ℝ → F\na b c : ℝ\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nh_deriv : ∀ᶠ (x : ℝ) in 𝓝[[[a, b]] \\ {c}] c, DifferentiableAt ℝ f x\nh_infty : Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \\ {c}] c) atTop\nhg : deriv f =O[𝓝[[[a, b]] \\ {c}] c] g\nl : Filter ℝ\nhl : TendstoIxxClass Icc l l\nhl' : NeBot l\nhle : l ≤ 𝓝 c\nhmem : [[a, b]] \\ {c} ∈ l\nthis : l ≤ 𝓝[[[a, b]] \\ {c}] c\n⊢ ¬IntervalIntegrable g volume a b\n[PROOFSTEP]\nexact\n  not_intervalIntegrable_of_tendsto_norm_atTop_of_deriv_isBigO_filter l (mem_of_superset hmem (diff_subset _ _))\n    (h_deriv.filter_mono this) (h_infty.mono_left this) (hg.mono this)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → F\na b c : ℝ\nhf : (fun x => (x - c)⁻¹) =O[𝓝[{c}ᶜ] c] f\nhne : a ≠ b\nhc : c ∈ [[a, b]]\n⊢ ¬IntervalIntegrable f volume a b\n[PROOFSTEP]\nhave A : ∀ᶠ x in 𝓝[≠] c, HasDerivAt (fun x => Real.log (x - c)) (x - c)⁻¹ x :=\n  by\n  filter_upwards [self_mem_nhdsWithin] with x hx\n  simpa using ((hasDerivAt_id x).sub_const c).log (sub_ne_zero.2 hx)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → F\na b c : ℝ\nhf : (fun x => (x - c)⁻¹) =O[𝓝[{c}ᶜ] c] f\nhne : a ≠ b\nhc : c ∈ [[a, b]]\n⊢ ∀ᶠ (x : ℝ) in 𝓝[{c}ᶜ] c, HasDerivAt (fun x => Real.log (x - c)) (x - c)⁻¹ x\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin] with x hx\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → F\na b c : ℝ\nhf : (fun x => (x - c)⁻¹) =O[𝓝[{c}ᶜ] c] f\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nx : ℝ\nhx : x ∈ {c}ᶜ\n⊢ HasDerivAt (fun x => Real.log (x - c)) (x - c)⁻¹ x\n[PROOFSTEP]\nsimpa using ((hasDerivAt_id x).sub_const c).log (sub_ne_zero.2 hx)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → F\na b c : ℝ\nhf : (fun x => (x - c)⁻¹) =O[𝓝[{c}ᶜ] c] f\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nA : ∀ᶠ (x : ℝ) in 𝓝[{c}ᶜ] c, HasDerivAt (fun x => Real.log (x - c)) (x - c)⁻¹ x\n⊢ ¬IntervalIntegrable f volume a b\n[PROOFSTEP]\nhave B : Tendsto (fun x => ‖Real.log (x - c)‖) (𝓝[≠] c) atTop :=\n  by\n  refine' tendsto_abs_atBot_atTop.comp (Real.tendsto_log_nhdsWithin_zero.comp _)\n  rw [← sub_self c]\n  exact ((hasDerivAt_id c).sub_const c).tendsto_punctured_nhds one_ne_zero\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → F\na b c : ℝ\nhf : (fun x => (x - c)⁻¹) =O[𝓝[{c}ᶜ] c] f\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nA : ∀ᶠ (x : ℝ) in 𝓝[{c}ᶜ] c, HasDerivAt (fun x => Real.log (x - c)) (x - c)⁻¹ x\n⊢ Tendsto (fun x => ‖Real.log (x - c)‖) (𝓝[{c}ᶜ] c) atTop\n[PROOFSTEP]\nrefine' tendsto_abs_atBot_atTop.comp (Real.tendsto_log_nhdsWithin_zero.comp _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → F\na b c : ℝ\nhf : (fun x => (x - c)⁻¹) =O[𝓝[{c}ᶜ] c] f\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nA : ∀ᶠ (x : ℝ) in 𝓝[{c}ᶜ] c, HasDerivAt (fun x => Real.log (x - c)) (x - c)⁻¹ x\n⊢ Tendsto (fun x => x - c) (𝓝[{c}ᶜ] c) (𝓝[{0}ᶜ] 0)\n[PROOFSTEP]\nrw [← sub_self c]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → F\na b c : ℝ\nhf : (fun x => (x - c)⁻¹) =O[𝓝[{c}ᶜ] c] f\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nA : ∀ᶠ (x : ℝ) in 𝓝[{c}ᶜ] c, HasDerivAt (fun x => Real.log (x - c)) (x - c)⁻¹ x\n⊢ Tendsto (fun x => x - c) (𝓝[{c}ᶜ] c) (𝓝[{c - c}ᶜ] (c - c))\n[PROOFSTEP]\nexact ((hasDerivAt_id c).sub_const c).tendsto_punctured_nhds one_ne_zero\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\nf : ℝ → F\na b c : ℝ\nhf : (fun x => (x - c)⁻¹) =O[𝓝[{c}ᶜ] c] f\nhne : a ≠ b\nhc : c ∈ [[a, b]]\nA : ∀ᶠ (x : ℝ) in 𝓝[{c}ᶜ] c, HasDerivAt (fun x => Real.log (x - c)) (x - c)⁻¹ x\nB : Tendsto (fun x => ‖Real.log (x - c)‖) (𝓝[{c}ᶜ] c) atTop\n⊢ ¬IntervalIntegrable f volume a b\n[PROOFSTEP]\nexact\n  not_intervalIntegrable_of_tendsto_norm_atTop_of_deriv_isBigO_punctured (A.mono fun x hx => hx.differentiableAt) B\n    (hf.congr' (A.mono fun x hx => hx.deriv.symm) EventuallyEq.rfl) hne hc\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\na b c : ℝ\n⊢ IntervalIntegrable (fun x => (x - c)⁻¹) volume a b ↔ a = b ∨ ¬c ∈ [[a, b]]\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\na b c : ℝ\n⊢ IntervalIntegrable (fun x => (x - c)⁻¹) volume a b → a = b ∨ ¬c ∈ [[a, b]]\n[PROOFSTEP]\nrefine' fun h => or_iff_not_imp_left.2 fun hne hc => _\n[GOAL]\ncase mp\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\na b c : ℝ\nh : IntervalIntegrable (fun x => (x - c)⁻¹) volume a b\nhne : ¬a = b\nhc : c ∈ [[a, b]]\n⊢ False\n[PROOFSTEP]\nexact not_intervalIntegrable_of_sub_inv_isBigO_punctured (isBigO_refl _ _) hne hc h\n[GOAL]\ncase mpr\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\na b c : ℝ\n⊢ a = b ∨ ¬c ∈ [[a, b]] → IntervalIntegrable (fun x => (x - c)⁻¹) volume a b\n[PROOFSTEP]\nrintro (rfl | h₀)\n[GOAL]\ncase mpr.inl\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\na c : ℝ\n⊢ IntervalIntegrable (fun x => (x - c)⁻¹) volume a a\n[PROOFSTEP]\nexact IntervalIntegrable.refl\n[GOAL]\ncase mpr.inr\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\na b c : ℝ\nh₀ : ¬c ∈ [[a, b]]\n⊢ IntervalIntegrable (fun x => (x - c)⁻¹) volume a b\n[PROOFSTEP]\nrefine' ((continuous_sub_right c).continuousOn.inv₀ _).intervalIntegrable\n[GOAL]\ncase mpr.inr\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\na b c : ℝ\nh₀ : ¬c ∈ [[a, b]]\n⊢ ∀ (x : ℝ), x ∈ [[a, b]] → x - c ≠ 0\n[PROOFSTEP]\nexact fun x hx => sub_ne_zero.2 <| ne_of_mem_of_not_mem hx h₀\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : SecondCountableTopology E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedAddCommGroup F\na b : ℝ\n⊢ IntervalIntegrable (fun x => x⁻¹) volume a b ↔ a = b ∨ ¬0 ∈ [[a, b]]\n[PROOFSTEP]\nsimp only [← intervalIntegrable_sub_inv_iff, sub_zero]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.NonIntegrable", "llama_tokens": 19061, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7431680086124812, "lm_q2_score": 0.5156199157230157, "lm_q1q2_score": 0.383192225968809}}
{"text": "[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\ns : Set α\n⊢ IsOpen {l | s ∈ l}\n[PROOFSTEP]\nsimpa only [Iic_principal] using isOpen_Iic_principal\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\n⊢ ∀ (t₁ : Set (Filter α)),\n    t₁ ∈ range (Iic ∘ 𝓟) →\n      ∀ (t₂ : Set (Filter α)),\n        t₂ ∈ range (Iic ∘ 𝓟) → ∀ (x : Filter α), x ∈ t₁ ∩ t₂ → ∃ t₃, t₃ ∈ range (Iic ∘ 𝓟) ∧ x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂\n[PROOFSTEP]\nrintro _ ⟨s, rfl⟩ _ ⟨t, rfl⟩ l hl\n[GOAL]\ncase intro.intro\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\ns t : Set α\nl : Filter α\nhl : l ∈ (Iic ∘ 𝓟) s ∩ (Iic ∘ 𝓟) t\n⊢ ∃ t₃, t₃ ∈ range (Iic ∘ 𝓟) ∧ l ∈ t₃ ∧ t₃ ⊆ (Iic ∘ 𝓟) s ∩ (Iic ∘ 𝓟) t\n[PROOFSTEP]\nexact ⟨Iic (𝓟 s) ∩ Iic (𝓟 t), ⟨s ∩ t, by simp⟩, hl, Subset.rfl⟩\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\ns t : Set α\nl : Filter α\nhl : l ∈ (Iic ∘ 𝓟) s ∩ (Iic ∘ 𝓟) t\n⊢ (Iic ∘ 𝓟) (s ∩ t) = Iic (𝓟 s) ∩ Iic (𝓟 t)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\ns : Set (Filter α)\n⊢ (∃ S, S ⊆ range (Iic ∘ 𝓟) ∧ s = ⋃₀ S) ↔ ∃ T, s = ⋃ (t : Set α) (_ : t ∈ T), Iic (𝓟 t)\n[PROOFSTEP]\nsimp only [exists_subset_range_and_iff, sUnion_image, (· ∘ ·)]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl : Filter α\n⊢ ⨅ (s : Set (Filter α)) (_ : s ∈ {s | l ∈ s ∧ s ∈ range (Iic ∘ 𝓟)}), 𝓟 s = Filter.lift' l (Iic ∘ 𝓟)\n[PROOFSTEP]\nsimp only [mem_setOf_eq, @and_comm (l ∈ _), iInf_and, iInf_range, Filter.lift', Filter.lift, (· ∘ ·), mem_Iic,\n  le_principal_iff]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl : Filter α\n⊢ 𝓝 l = Filter.lift' l fun s => {l' | s ∈ l'}\n[PROOFSTEP]\nsimpa only [(· ∘ ·), Iic_principal] using nhds_eq l\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nla : Filter α\nlb : Filter β\nf : α → Filter β\n⊢ Tendsto f la (𝓝 lb) ↔ ∀ (s : Set β), s ∈ lb → ∀ᶠ (a : α) in la, s ∈ f a\n[PROOFSTEP]\nsimp only [nhds_eq', tendsto_lift', mem_setOf_eq]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl : Filter α\np : ι → Prop\ns : ι → Set α\nh : HasBasis l p s\n⊢ HasBasis (𝓝 l) p fun i => Iic (𝓟 (s i))\n[PROOFSTEP]\nrw [nhds_eq]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl : Filter α\np : ι → Prop\ns : ι → Set α\nh : HasBasis l p s\n⊢ HasBasis (Filter.lift' l (Iic ∘ 𝓟)) p fun i => Iic (𝓟 (s i))\n[PROOFSTEP]\nexact h.lift' monotone_principal.Iic\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl : Filter X\n⊢ Tendsto pure l (𝓝 l)\n[PROOFSTEP]\nrw [Filter.tendsto_nhds]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl : Filter X\n⊢ ∀ (s : Set X), s ∈ l → ∀ᶠ (a : X) in l, s ∈ pure a\n[PROOFSTEP]\nrefine fun s hs ↦ Eventually.mono hs fun x ↦ id\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl : Filter α\np : ι → Prop\ns : ι → Set α\nh : HasBasis l p s\n⊢ HasBasis (𝓝 l) p fun i => {l' | s i ∈ l'}\n[PROOFSTEP]\nsimpa only [Iic_principal] using h.nhds\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\n⊢ 𝓝 ⊥ = pure ⊥\n[PROOFSTEP]\nsimp [nhds_eq, (· ∘ ·), lift'_bot monotone_principal.Iic]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\n⊢ 𝓝 ⊤ = ⊤\n[PROOFSTEP]\nsimp [nhds_eq]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nx : α\n⊢ 𝓝 (pure x) = 𝓟 {⊥, pure x}\n[PROOFSTEP]\nrw [← principal_singleton, nhds_principal, principal_singleton, Iic_pure]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nf : ι → Filter α\n⊢ 𝓝 (⨅ (i : ι), f i) = ⨅ (i : ι), 𝓝 (f i)\n[PROOFSTEP]\nsimp only [nhds_eq]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nf : ι → Filter α\n⊢ Filter.lift' (⨅ (i : ι), f i) (Iic ∘ 𝓟) = ⨅ (i : ι), Filter.lift' (f i) (Iic ∘ 𝓟)\n[PROOFSTEP]\napply lift'_iInf_of_map_univ\n[GOAL]\ncase hg\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nf : ι → Filter α\n⊢ ∀ {s t : Set α}, (Iic ∘ 𝓟) (s ∩ t) = (Iic ∘ 𝓟) s ∩ (Iic ∘ 𝓟) t\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hg'\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nf : ι → Filter α\n⊢ (Iic ∘ 𝓟) univ = univ\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl₁ l₂ : Filter α\n⊢ 𝓝 (l₁ ⊓ l₂) = 𝓝 l₁ ⊓ 𝓝 l₂\n[PROOFSTEP]\nsimpa only [iInf_bool_eq] using nhds_iInf fun b => cond b l₁ l₂\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl : Filter α\n⊢ ⋂₀ {s | s ∈ 𝓝 l} = Iic l\n[PROOFSTEP]\nsimp_rw [nhds_eq, (· ∘ ·), sInter_lift'_sets monotone_principal.Iic, Iic, le_principal_iff, ← setOf_forall, ←\n  Filter.le_def]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl₁ l₂ : Filter α\n⊢ 𝓝 l₁ ≤ 𝓝 l₂ ↔ l₁ ≤ l₂\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => monotone_nhds h⟩\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl₁ l₂ : Filter α\nh : 𝓝 l₁ ≤ 𝓝 l₂\n⊢ l₁ ≤ l₂\n[PROOFSTEP]\nrw [← Iic_subset_Iic, ← sInter_nhds, ← sInter_nhds]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl₁ l₂ : Filter α\nh : 𝓝 l₁ ≤ 𝓝 l₂\n⊢ ⋂₀ {s | s ∈ 𝓝 l₁} ⊆ ⋂₀ {s | s ∈ 𝓝 l₂}\n[PROOFSTEP]\nexact sInter_subset_sInter h\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\ns : Set (Filter α)\nl : Filter α\n⊢ l ∈ interior s ↔ ∃ t, t ∈ l ∧ Iic (𝓟 t) ⊆ s\n[PROOFSTEP]\nrw [mem_interior_iff_mem_nhds, mem_nhds_iff]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\ns : Set (Filter α)\nl : Filter α\n⊢ l ∈ closure s ↔ ∀ (t : Set α), t ∈ l → ∃ l', l' ∈ s ∧ t ∈ l'\n[PROOFSTEP]\nsimp only [closure_eq_compl_interior_compl, Filter.mem_interior, mem_compl_iff, not_exists, not_forall,\n  Classical.not_not, exists_prop, not_and, and_comm, subset_def, mem_Iic, le_principal_iff]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl : Filter α\n⊢ closure {l} = Ici l\n[PROOFSTEP]\next l'\n[GOAL]\ncase h\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl l' : Filter α\n⊢ l' ∈ closure {l} ↔ l' ∈ Ici l\n[PROOFSTEP]\nsimp [Filter.mem_closure, Filter.le_def]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\nl₁ l₂ : Filter α\n⊢ l₁ ⤳ l₂ ↔ l₁ ≤ l₂\n[PROOFSTEP]\nsimp only [specializes_iff_closure_subset, Filter.closure_singleton, Ici_subset_Ici]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\ninst✝ : Preorder α\n⊢ 𝓝 atTop = ⨅ (x : α), 𝓟 (Iic (𝓟 (Ici x)))\n[PROOFSTEP]\nsimp only [atTop, nhds_iInf, nhds_principal]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\ninst✝ : Preorder β\nl : Filter α\nf : α → Filter β\n⊢ Tendsto f l (𝓝 atTop) ↔ ∀ (y : β), ∀ᶠ (a : α) in l, Ici y ∈ f a\n[PROOFSTEP]\nsimp only [nhds_atTop, tendsto_iInf, tendsto_principal, mem_Iic, le_principal_iff]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\ninst✝ : TopologicalSpace X\nx : X\n⊢ 𝓝 (𝓝 x) = ⨅ (s : Set X) (_ : IsOpen s) (_ : x ∈ s), 𝓟 (Iic (𝓟 s))\n[PROOFSTEP]\nsimp only [(nhds_basis_opens x).nhds.eq_biInf, iInf_and, @iInf_comm _ (_ ∈ _)]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nX : Type u_4\nY : Type u_5\ninst✝ : TopologicalSpace X\nx : X\n⊢ ⨅ (s : Set X) (_ : IsOpen s) (_ : x ∈ s), 𝓟 s = comap 𝓝 (𝓝 (𝓝 x))\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [nhds_nhds, comap_iInf, comap_principal, Iic_principal, preimage_setOf_eq,\n  ← mem_interior_iff_mem_nhds, setOf_mem_eq, IsOpen.interior_eq]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Filter", "llama_tokens": 4075, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6859494550081925, "lm_q2_score": 0.5583269943353744, "lm_q1q2_score": 0.3829840974807122}}
{"text": "[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommSemiring 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : NonUnitalNonAssocSemiring A\ninst✝¹ : TopologicalSpace A\ninst✝ : Module 𝕜 A\nφ ψ : ↑(characterSpace 𝕜 A)\nh : (fun φ => ↑↑φ) φ = (fun φ => ↑↑φ) ψ\n⊢ φ = ψ\n[PROOFSTEP]\next1\n[GOAL]\ncase a\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommSemiring 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : NonUnitalNonAssocSemiring A\ninst✝¹ : TopologicalSpace A\ninst✝ : Module 𝕜 A\nφ ψ : ↑(characterSpace 𝕜 A)\nh : (fun φ => ↑↑φ) φ = (fun φ => ↑↑φ) ψ\n⊢ ↑φ = ↑ψ\n[PROOFSTEP]\napply FunLike.ext\n[GOAL]\ncase a.h\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommSemiring 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : NonUnitalNonAssocSemiring A\ninst✝¹ : TopologicalSpace A\ninst✝ : Module 𝕜 A\nφ ψ : ↑(characterSpace 𝕜 A)\nh : (fun φ => ↑↑φ) φ = (fun φ => ↑↑φ) ψ\n⊢ ∀ (x : A), ↑↑φ x = ↑↑ψ x\n[PROOFSTEP]\nexact congr_fun h\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommSemiring 𝕜\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : ContinuousAdd 𝕜\ninst✝⁴ : ContinuousConstSMul 𝕜 𝕜\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : TopologicalSpace A\ninst✝¹ : Module 𝕜 A\ninst✝ : Subsingleton A\nφ : ↑(characterSpace 𝕜 A)\nx : A\n⊢ ↑↑φ x = ↑0 x\n[PROOFSTEP]\nrw [show x = 0 from Subsingleton.elim x 0, map_zero, map_zero]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommSemiring 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : NonUnitalNonAssocSemiring A\ninst✝¹ : TopologicalSpace A\ninst✝ : Module 𝕜 A\n⊢ characterSpace 𝕜 A ∪ {0} ≤ {φ | ∀ (x y : A), ↑φ (x * y) = ↑φ x * ↑φ y}\n[PROOFSTEP]\nrintro φ (hφ | rfl)\n[GOAL]\ncase inl\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommSemiring 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : NonUnitalNonAssocSemiring A\ninst✝¹ : TopologicalSpace A\ninst✝ : Module 𝕜 A\nφ : WeakDual 𝕜 A\nhφ : φ ∈ characterSpace 𝕜 A\n⊢ φ ∈ {φ | ∀ (x y : A), ↑φ (x * y) = ↑φ x * ↑φ y}\n[PROOFSTEP]\nexact hφ.2\n[GOAL]\ncase inr\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommSemiring 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : NonUnitalNonAssocSemiring A\ninst✝¹ : TopologicalSpace A\ninst✝ : Module 𝕜 A\n⊢ 0 ∈ {φ | ∀ (x y : A), ↑φ (x * y) = ↑φ x * ↑φ y}\n[PROOFSTEP]\nexact fun _ _ => by exact (zero_mul (0 : 𝕜)).symm\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommSemiring 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : NonUnitalNonAssocSemiring A\ninst✝¹ : TopologicalSpace A\ninst✝ : Module 𝕜 A\nx✝¹ x✝ : A\n⊢ ↑0 (x✝¹ * x✝) = ↑0 x✝¹ * ↑0 x✝\n[PROOFSTEP]\nexact (zero_mul (0 : 𝕜)).symm\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁸ : CommSemiring 𝕜\ninst✝⁷ : TopologicalSpace 𝕜\ninst✝⁶ : ContinuousAdd 𝕜\ninst✝⁵ : ContinuousConstSMul 𝕜 𝕜\ninst✝⁴ : NonUnitalNonAssocSemiring A\ninst✝³ : TopologicalSpace A\ninst✝² : Module 𝕜 A\ninst✝¹ : T2Space 𝕜\ninst✝ : ContinuousMul 𝕜\n⊢ IsClosed (characterSpace 𝕜 A ∪ {0})\n[PROOFSTEP]\nsimp only [union_zero, Set.setOf_forall]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁸ : CommSemiring 𝕜\ninst✝⁷ : TopologicalSpace 𝕜\ninst✝⁶ : ContinuousAdd 𝕜\ninst✝⁵ : ContinuousConstSMul 𝕜 𝕜\ninst✝⁴ : NonUnitalNonAssocSemiring A\ninst✝³ : TopologicalSpace A\ninst✝² : Module 𝕜 A\ninst✝¹ : T2Space 𝕜\ninst✝ : ContinuousMul 𝕜\n⊢ IsClosed (⋂ (i : A) (i_1 : A), {x | ↑x (i * i_1) = ↑x i * ↑x i_1})\n[PROOFSTEP]\nexact\n  isClosed_iInter fun x =>\n    isClosed_iInter fun y => isClosed_eq (eval_continuous _) <| (eval_continuous _).mul (eval_continuous _)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\nφ : ↑(characterSpace 𝕜 A)\n⊢ ↑φ 1 = 1\n[PROOFSTEP]\nhave h₁ : φ 1 * (1 - φ 1) = 0 := by rw [mul_sub, sub_eq_zero, mul_one, ← map_mul φ, one_mul]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\nφ : ↑(characterSpace 𝕜 A)\n⊢ ↑φ 1 * (1 - ↑φ 1) = 0\n[PROOFSTEP]\nrw [mul_sub, sub_eq_zero, mul_one, ← map_mul φ, one_mul]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\nφ : ↑(characterSpace 𝕜 A)\nh₁ : ↑φ 1 * (1 - ↑φ 1) = 0\n⊢ ↑φ 1 = 1\n[PROOFSTEP]\nrcases mul_eq_zero.mp h₁ with (h₂ | h₂)\n[GOAL]\ncase inl\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\nφ : ↑(characterSpace 𝕜 A)\nh₁ : ↑φ 1 * (1 - ↑φ 1) = 0\nh₂ : ↑φ 1 = 0\n⊢ ↑φ 1 = 1\n[PROOFSTEP]\nhave : ∀ a, φ (a * 1) = 0 := fun a => by simp only [map_mul φ, h₂, mul_zero]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\nφ : ↑(characterSpace 𝕜 A)\nh₁ : ↑φ 1 * (1 - ↑φ 1) = 0\nh₂ : ↑φ 1 = 0\na : A\n⊢ ↑φ (a * 1) = 0\n[PROOFSTEP]\nsimp only [map_mul φ, h₂, mul_zero]\n[GOAL]\ncase inl\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\nφ : ↑(characterSpace 𝕜 A)\nh₁ : ↑φ 1 * (1 - ↑φ 1) = 0\nh₂ : ↑φ 1 = 0\nthis : ∀ (a : A), ↑φ (a * 1) = 0\n⊢ ↑φ 1 = 1\n[PROOFSTEP]\nexact False.elim (φ.prop.1 <| ContinuousLinearMap.ext <| by simpa only [mul_one] using this)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\nφ : ↑(characterSpace 𝕜 A)\nh₁ : ↑φ 1 * (1 - ↑φ 1) = 0\nh₂ : ↑φ 1 = 0\nthis : ∀ (a : A), ↑φ (a * 1) = 0\n⊢ ∀ (x : A), ↑↑φ x = ↑0 x\n[PROOFSTEP]\nsimpa only [mul_one] using this\n[GOAL]\ncase inr\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\nφ : ↑(characterSpace 𝕜 A)\nh₁ : ↑φ 1 * (1 - ↑φ 1) = 0\nh₂ : 1 - ↑φ 1 = 0\n⊢ ↑φ 1 = 1\n[PROOFSTEP]\nexact (sub_eq_zero.mp h₂).symm\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\nmap_one' : ∀ (φ : ↑(characterSpace 𝕜 A)), ↑φ 1 = 1\nsrc✝ : NonUnitalAlgHomClass (↑(characterSpace 𝕜 A)) 𝕜 A 𝕜 := instNonUnitalAlgHomClass\nφ : ↑(characterSpace 𝕜 A)\nr : 𝕜\n⊢ ↑φ (↑(algebraMap 𝕜 A) r) = ↑(algebraMap 𝕜 𝕜) r\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one, Algebra.id.map_eq_id, RingHom.id_apply]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\nmap_one' : ∀ (φ : ↑(characterSpace 𝕜 A)), ↑φ 1 = 1\nsrc✝ : NonUnitalAlgHomClass (↑(characterSpace 𝕜 A)) 𝕜 A 𝕜 := instNonUnitalAlgHomClass\nφ : ↑(characterSpace 𝕜 A)\nr : 𝕜\n⊢ ↑φ (r • 1) = r\n[PROOFSTEP]\nrw [map_smul, Algebra.id.smul_eq_mul, map_one' φ, mul_one]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁸ : CommRing 𝕜\ninst✝⁷ : NoZeroDivisors 𝕜\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : ContinuousAdd 𝕜\ninst✝⁴ : ContinuousConstSMul 𝕜 𝕜\ninst✝³ : TopologicalSpace A\ninst✝² : Semiring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial 𝕜\n⊢ characterSpace 𝕜 A = {φ | ↑φ 1 = 1 ∧ ∀ (x y : A), ↑φ (x * y) = ↑φ x * ↑φ y}\n[PROOFSTEP]\next φ\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁸ : CommRing 𝕜\ninst✝⁷ : NoZeroDivisors 𝕜\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : ContinuousAdd 𝕜\ninst✝⁴ : ContinuousConstSMul 𝕜 𝕜\ninst✝³ : TopologicalSpace A\ninst✝² : Semiring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial 𝕜\nφ : WeakDual 𝕜 A\n⊢ φ ∈ characterSpace 𝕜 A ↔ φ ∈ {φ | ↑φ 1 = 1 ∧ ∀ (x y : A), ↑φ (x * y) = ↑φ x * ↑φ y}\n[PROOFSTEP]\nrefine' ⟨_, _⟩\n[GOAL]\ncase h.refine'_1\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁸ : CommRing 𝕜\ninst✝⁷ : NoZeroDivisors 𝕜\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : ContinuousAdd 𝕜\ninst✝⁴ : ContinuousConstSMul 𝕜 𝕜\ninst✝³ : TopologicalSpace A\ninst✝² : Semiring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial 𝕜\nφ : WeakDual 𝕜 A\n⊢ φ ∈ characterSpace 𝕜 A → φ ∈ {φ | ↑φ 1 = 1 ∧ ∀ (x y : A), ↑φ (x * y) = ↑φ x * ↑φ y}\n[PROOFSTEP]\nrintro hφ\n[GOAL]\ncase h.refine'_1\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁸ : CommRing 𝕜\ninst✝⁷ : NoZeroDivisors 𝕜\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : ContinuousAdd 𝕜\ninst✝⁴ : ContinuousConstSMul 𝕜 𝕜\ninst✝³ : TopologicalSpace A\ninst✝² : Semiring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial 𝕜\nφ : WeakDual 𝕜 A\nhφ : φ ∈ characterSpace 𝕜 A\n⊢ φ ∈ {φ | ↑φ 1 = 1 ∧ ∀ (x y : A), ↑φ (x * y) = ↑φ x * ↑φ y}\n[PROOFSTEP]\nlift φ to characterSpace 𝕜 A using hφ\n[GOAL]\ncase h.refine'_1.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁸ : CommRing 𝕜\ninst✝⁷ : NoZeroDivisors 𝕜\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : ContinuousAdd 𝕜\ninst✝⁴ : ContinuousConstSMul 𝕜 𝕜\ninst✝³ : TopologicalSpace A\ninst✝² : Semiring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial 𝕜\nφ : { x // x ∈ characterSpace 𝕜 A }\n⊢ ↑φ ∈ {φ | ↑φ 1 = 1 ∧ ∀ (x y : A), ↑φ (x * y) = ↑φ x * ↑φ y}\n[PROOFSTEP]\nexact ⟨map_one φ, map_mul φ⟩\n[GOAL]\ncase h.refine'_2\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁸ : CommRing 𝕜\ninst✝⁷ : NoZeroDivisors 𝕜\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : ContinuousAdd 𝕜\ninst✝⁴ : ContinuousConstSMul 𝕜 𝕜\ninst✝³ : TopologicalSpace A\ninst✝² : Semiring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial 𝕜\nφ : WeakDual 𝕜 A\n⊢ φ ∈ {φ | ↑φ 1 = 1 ∧ ∀ (x y : A), ↑φ (x * y) = ↑φ x * ↑φ y} → φ ∈ characterSpace 𝕜 A\n[PROOFSTEP]\nrintro ⟨hφ₁, hφ₂⟩\n[GOAL]\ncase h.refine'_2.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁸ : CommRing 𝕜\ninst✝⁷ : NoZeroDivisors 𝕜\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : ContinuousAdd 𝕜\ninst✝⁴ : ContinuousConstSMul 𝕜 𝕜\ninst✝³ : TopologicalSpace A\ninst✝² : Semiring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial 𝕜\nφ : WeakDual 𝕜 A\nhφ₁ : ↑φ 1 = 1\nhφ₂ : ∀ (x y : A), ↑φ (x * y) = ↑φ x * ↑φ y\n⊢ φ ∈ characterSpace 𝕜 A\n[PROOFSTEP]\nrefine' ⟨_, hφ₂⟩\n[GOAL]\ncase h.refine'_2.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁸ : CommRing 𝕜\ninst✝⁷ : NoZeroDivisors 𝕜\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : ContinuousAdd 𝕜\ninst✝⁴ : ContinuousConstSMul 𝕜 𝕜\ninst✝³ : TopologicalSpace A\ninst✝² : Semiring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial 𝕜\nφ : WeakDual 𝕜 A\nhφ₁ : ↑φ 1 = 1\nhφ₂ : ∀ (x y : A), ↑φ (x * y) = ↑φ x * ↑φ y\n⊢ φ ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase h.refine'_2.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁸ : CommRing 𝕜\ninst✝⁷ : NoZeroDivisors 𝕜\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : ContinuousAdd 𝕜\ninst✝⁴ : ContinuousConstSMul 𝕜 𝕜\ninst✝³ : TopologicalSpace A\ninst✝² : Semiring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial 𝕜\nhφ₁ : ↑0 1 = 1\nhφ₂ : ∀ (x y : A), ↑0 (x * y) = ↑0 x * ↑0 y\n⊢ False\n[PROOFSTEP]\nexact zero_ne_one hφ₁\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝¹⁰ : CommRing 𝕜\ninst✝⁹ : NoZeroDivisors 𝕜\ninst✝⁸ : TopologicalSpace 𝕜\ninst✝⁷ : ContinuousAdd 𝕜\ninst✝⁶ : ContinuousConstSMul 𝕜 𝕜\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : Semiring A\ninst✝³ : Algebra 𝕜 A\ninst✝² : Nontrivial 𝕜\ninst✝¹ : T2Space 𝕜\ninst✝ : ContinuousMul 𝕜\n⊢ IsClosed (characterSpace 𝕜 A)\n[PROOFSTEP]\nrw [eq_set_map_one_map_mul, Set.setOf_and]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝¹⁰ : CommRing 𝕜\ninst✝⁹ : NoZeroDivisors 𝕜\ninst✝⁸ : TopologicalSpace 𝕜\ninst✝⁷ : ContinuousAdd 𝕜\ninst✝⁶ : ContinuousConstSMul 𝕜 𝕜\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : Semiring A\ninst✝³ : Algebra 𝕜 A\ninst✝² : Nontrivial 𝕜\ninst✝¹ : T2Space 𝕜\ninst✝ : ContinuousMul 𝕜\n⊢ IsClosed ({a | ↑a 1 = 1} ∩ {a | ∀ (x y : A), ↑a (x * y) = ↑a x * ↑a y})\n[PROOFSTEP]\nrefine' IsClosed.inter (isClosed_eq (eval_continuous _) continuous_const) _\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝¹⁰ : CommRing 𝕜\ninst✝⁹ : NoZeroDivisors 𝕜\ninst✝⁸ : TopologicalSpace 𝕜\ninst✝⁷ : ContinuousAdd 𝕜\ninst✝⁶ : ContinuousConstSMul 𝕜 𝕜\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : Semiring A\ninst✝³ : Algebra 𝕜 A\ninst✝² : Nontrivial 𝕜\ninst✝¹ : T2Space 𝕜\ninst✝ : ContinuousMul 𝕜\n⊢ IsClosed {a | ∀ (x y : A), ↑a (x * y) = ↑a x * ↑a y}\n[PROOFSTEP]\nsimpa only [(union_zero 𝕜 A).symm] using union_zero_isClosed _ _\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\nφ ψ : ↑(characterSpace 𝕜 A)\nh : RingHom.ker φ = RingHom.ker ψ\n⊢ φ = ψ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\nφ ψ : ↑(characterSpace 𝕜 A)\nh : RingHom.ker φ = RingHom.ker ψ\nx : A\n⊢ ↑φ x = ↑ψ x\n[PROOFSTEP]\nhave : x - algebraMap 𝕜 A (ψ x) ∈ RingHom.ker φ := by\n  simpa only [h, RingHom.mem_ker, map_sub, AlgHomClass.commutes] using sub_self (ψ x)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\nφ ψ : ↑(characterSpace 𝕜 A)\nh : RingHom.ker φ = RingHom.ker ψ\nx : A\n⊢ x - ↑(algebraMap 𝕜 A) (↑ψ x) ∈ RingHom.ker φ\n[PROOFSTEP]\nsimpa only [h, RingHom.mem_ker, map_sub, AlgHomClass.commutes] using sub_self (ψ x)\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁷ : CommRing 𝕜\ninst✝⁶ : NoZeroDivisors 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\nφ ψ : ↑(characterSpace 𝕜 A)\nh : RingHom.ker φ = RingHom.ker ψ\nx : A\nthis : x - ↑(algebraMap 𝕜 A) (↑ψ x) ∈ RingHom.ker φ\n⊢ ↑φ x = ↑ψ x\n[PROOFSTEP]\nrwa [RingHom.mem_ker, map_sub, AlgHomClass.commutes, sub_eq_zero] at this \n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : Field 𝕜\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : ContinuousAdd 𝕜\ninst✝³ : ContinuousConstSMul 𝕜 𝕜\ninst✝² : Ring A\ninst✝¹ : TopologicalSpace A\ninst✝ : Algebra 𝕜 A\nφ : ↑(characterSpace 𝕜 A)\nz : 𝕜\n⊢ ↑φ (↑(algebraMap 𝕜 A) z) = z\n[PROOFSTEP]\nsimp only [AlgHomClass.commutes, Algebra.id.map_eq_id, RingHom.id_apply]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : NoZeroDivisors 𝕜\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\n⊢ (fun a => mk fun φ => ↑φ a) 1 = 1\n[PROOFSTEP]\next a\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : NoZeroDivisors 𝕜\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\na : ↑(characterSpace 𝕜 A)\n⊢ ↑((fun a => mk fun φ => ↑φ a) 1) a = ↑1 a\n[PROOFSTEP]\nsimp only [coe_mk, coe_one, Pi.one_apply, map_one a]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : NoZeroDivisors 𝕜\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\na b : A\n⊢ OneHom.toFun { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) } (a * b) =\n    OneHom.toFun { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) } a *\n      OneHom.toFun { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) } b\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : NoZeroDivisors 𝕜\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\na b : A\na✝ : ↑(characterSpace 𝕜 A)\n⊢ ↑(OneHom.toFun { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) } (a * b))\n      a✝ =\n    ↑(OneHom.toFun { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) } a *\n          OneHom.toFun { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) } b)\n      a✝\n[PROOFSTEP]\nsimp only [map_mul, coe_mk, coe_mul, Pi.mul_apply]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : NoZeroDivisors 𝕜\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (a b : A),\n                OneHom.toFun { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                    (a * b) =\n                  OneHom.toFun\n                      { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) } a *\n                    OneHom.toFun\n                      { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) } b) })\n      0 =\n    0\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : NoZeroDivisors 𝕜\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\na✝ : ↑(characterSpace 𝕜 A)\n⊢ ↑(OneHom.toFun\n          (↑{ toOneHom := { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (a b : A),\n                    OneHom.toFun\n                        { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                        (a * b) =\n                      OneHom.toFun\n                          { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                          a *\n                        OneHom.toFun\n                          { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                          b) })\n          0)\n      a✝ =\n    ↑0 a✝\n[PROOFSTEP]\nsimp only [map_zero, coe_mk, coe_mul, coe_zero, Pi.zero_apply]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : NoZeroDivisors 𝕜\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\na b : A\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (a b : A),\n                OneHom.toFun { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                    (a * b) =\n                  OneHom.toFun\n                      { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) } a *\n                    OneHom.toFun\n                      { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) } b) })\n      (a + b) =\n    OneHom.toFun\n        (↑{ toOneHom := { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (a b : A),\n                  OneHom.toFun\n                      { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                      (a * b) =\n                    OneHom.toFun\n                        { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) } a *\n                      OneHom.toFun\n                        { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                        b) })\n        a +\n      OneHom.toFun\n        (↑{ toOneHom := { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (a b : A),\n                  OneHom.toFun\n                      { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                      (a * b) =\n                    OneHom.toFun\n                        { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) } a *\n                      OneHom.toFun\n                        { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                        b) })\n        b\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : NoZeroDivisors 𝕜\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\na b : A\na✝ : ↑(characterSpace 𝕜 A)\n⊢ ↑(OneHom.toFun\n          (↑{ toOneHom := { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (a b : A),\n                    OneHom.toFun\n                        { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                        (a * b) =\n                      OneHom.toFun\n                          { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                          a *\n                        OneHom.toFun\n                          { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                          b) })\n          (a + b))\n      a✝ =\n    ↑(OneHom.toFun\n            (↑{ toOneHom := { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (a b : A),\n                      OneHom.toFun\n                          { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                          (a * b) =\n                        OneHom.toFun\n                            { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                            a *\n                          OneHom.toFun\n                            { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                            b) })\n            a +\n          OneHom.toFun\n            (↑{ toOneHom := { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (a b : A),\n                      OneHom.toFun\n                          { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                          (a * b) =\n                        OneHom.toFun\n                            { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                            a *\n                          OneHom.toFun\n                            { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                            b) })\n            b)\n      a✝\n[PROOFSTEP]\nsimp only [map_add, coe_mk, coe_add, Pi.add_apply]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : NoZeroDivisors 𝕜\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\nk : 𝕜\n⊢ OneHom.toFun\n      (↑↑{\n            toMonoidHom :=\n              { toOneHom := { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (a b : A),\n                      OneHom.toFun\n                          { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                          (a * b) =\n                        OneHom.toFun\n                            { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                            a *\n                          OneHom.toFun\n                            { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                            b) },\n            map_zero' :=\n              (_ :\n                OneHom.toFun\n                    (↑{\n                        toOneHom :=\n                          { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (a b : A),\n                              OneHom.toFun\n                                  { toFun := fun a => mk fun φ => ↑φ a,\n                                    map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                  (a * b) =\n                                OneHom.toFun\n                                    { toFun := fun a => mk fun φ => ↑φ a,\n                                      map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                    a *\n                                  OneHom.toFun\n                                    { toFun := fun a => mk fun φ => ↑φ a,\n                                      map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                    b) })\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (a b : A),\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (a b : A),\n                                OneHom.toFun\n                                    { toFun := fun a => mk fun φ => ↑φ a,\n                                      map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                    (a * b) =\n                                  OneHom.toFun\n                                      { toFun := fun a => mk fun φ => ↑φ a,\n                                        map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                      a *\n                                    OneHom.toFun\n                                      { toFun := fun a => mk fun φ => ↑φ a,\n                                        map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                      b) })\n                      (a + b) =\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun a => mk fun φ => ↑φ a,\n                                map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (a b : A),\n                                  OneHom.toFun\n                                      { toFun := fun a => mk fun φ => ↑φ a,\n                                        map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                      (a * b) =\n                                    OneHom.toFun\n                                        { toFun := fun a => mk fun φ => ↑φ a,\n                                          map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                        a *\n                                      OneHom.toFun\n                                        { toFun := fun a => mk fun φ => ↑φ a,\n                                          map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                        b) })\n                        a +\n                      OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun a => mk fun φ => ↑φ a,\n                                map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (a b : A),\n                                  OneHom.toFun\n                                      { toFun := fun a => mk fun φ => ↑φ a,\n                                        map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                      (a * b) =\n                                    OneHom.toFun\n                                        { toFun := fun a => mk fun φ => ↑φ a,\n                                          map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                        a *\n                                      OneHom.toFun\n                                        { toFun := fun a => mk fun φ => ↑φ a,\n                                          map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                        b) })\n                        b) })\n      (↑(algebraMap 𝕜 A) k) =\n    ↑(algebraMap 𝕜 C(↑(characterSpace 𝕜 A), 𝕜)) k\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : CommRing 𝕜\ninst✝⁵ : NoZeroDivisors 𝕜\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace A\ninst✝¹ : Semiring A\ninst✝ : Algebra 𝕜 A\nk : 𝕜\na✝ : ↑(characterSpace 𝕜 A)\n⊢ ↑(OneHom.toFun\n          (↑↑{\n                toMonoidHom :=\n                  {\n                    toOneHom :=\n                      { toFun := fun a => mk fun φ => ↑φ a, map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n                    map_mul' :=\n                      (_ :\n                        ∀ (a b : A),\n                          OneHom.toFun\n                              { toFun := fun a => mk fun φ => ↑φ a,\n                                map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                              (a * b) =\n                            OneHom.toFun\n                                { toFun := fun a => mk fun φ => ↑φ a,\n                                  map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                a *\n                              OneHom.toFun\n                                { toFun := fun a => mk fun φ => ↑φ a,\n                                  map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                b) },\n                map_zero' :=\n                  (_ :\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun a => mk fun φ => ↑φ a,\n                                map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (a b : A),\n                                  OneHom.toFun\n                                      { toFun := fun a => mk fun φ => ↑φ a,\n                                        map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                      (a * b) =\n                                    OneHom.toFun\n                                        { toFun := fun a => mk fun φ => ↑φ a,\n                                          map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                        a *\n                                      OneHom.toFun\n                                        { toFun := fun a => mk fun φ => ↑φ a,\n                                          map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                        b) })\n                        0 =\n                      0),\n                map_add' :=\n                  (_ :\n                    ∀ (a b : A),\n                      OneHom.toFun\n                          (↑{\n                              toOneHom :=\n                                { toFun := fun a => mk fun φ => ↑φ a,\n                                  map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (a b : A),\n                                    OneHom.toFun\n                                        { toFun := fun a => mk fun φ => ↑φ a,\n                                          map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                        (a * b) =\n                                      OneHom.toFun\n                                          { toFun := fun a => mk fun φ => ↑φ a,\n                                            map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                          a *\n                                        OneHom.toFun\n                                          { toFun := fun a => mk fun φ => ↑φ a,\n                                            map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                          b) })\n                          (a + b) =\n                        OneHom.toFun\n                            (↑{\n                                toOneHom :=\n                                  { toFun := fun a => mk fun φ => ↑φ a,\n                                    map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (a b : A),\n                                      OneHom.toFun\n                                          { toFun := fun a => mk fun φ => ↑φ a,\n                                            map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                          (a * b) =\n                                        OneHom.toFun\n                                            { toFun := fun a => mk fun φ => ↑φ a,\n                                              map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                            a *\n                                          OneHom.toFun\n                                            { toFun := fun a => mk fun φ => ↑φ a,\n                                              map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                            b) })\n                            a +\n                          OneHom.toFun\n                            (↑{\n                                toOneHom :=\n                                  { toFun := fun a => mk fun φ => ↑φ a,\n                                    map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (a b : A),\n                                      OneHom.toFun\n                                          { toFun := fun a => mk fun φ => ↑φ a,\n                                            map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                          (a * b) =\n                                        OneHom.toFun\n                                            { toFun := fun a => mk fun φ => ↑φ a,\n                                              map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                            a *\n                                          OneHom.toFun\n                                            { toFun := fun a => mk fun φ => ↑φ a,\n                                              map_one' := (_ : (fun a => mk fun φ => ↑φ a) 1 = 1) }\n                                            b) })\n                            b) })\n          (↑(algebraMap 𝕜 A) k))\n      a✝ =\n    ↑(↑(algebraMap 𝕜 C(↑(characterSpace 𝕜 A), 𝕜)) k) a✝\n[PROOFSTEP]\nsimp [AlgHomClass.commutes]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Module.CharacterSpace", "llama_tokens": 14849, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7154239957834733, "lm_q2_score": 0.5350984286266116, "lm_q1q2_score": 0.38282225594550817}}
{"text": "[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nι : Type u_1\nM : Type u_2\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring A\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Algebra R A\ninst✝² : Module A M\ninst✝¹ : Module R M\ninst✝ : IsScalarTower R A M\nb : Basis ι R M\nh : Function.Bijective ↑(algebraMap R A)\nc : R\nx : M\n⊢ ↑(RingEquiv.ofBijective (algebraMap R A) h) c • x = c • x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nb : ι → S\nι' : Type w₁\nc : ι' → A\nhb : LinearIndependent R b\nhc : LinearIndependent S c\n⊢ LinearIndependent R fun p => b p.fst • c p.snd\n[PROOFSTEP]\nrw [linearIndependent_iff'] at hb hc \n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nb : ι → S\nι' : Type w₁\nc : ι' → A\nhb : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhc : ∀ (s : Finset ι') (g : ι' → S), ∑ i in s, g i • c i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\n⊢ LinearIndependent R fun p => b p.fst • c p.snd\n[PROOFSTEP]\nrw [linearIndependent_iff'']\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nb : ι → S\nι' : Type w₁\nc : ι' → A\nhb : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhc : ∀ (s : Finset ι') (g : ι' → S), ∑ i in s, g i • c i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\n⊢ ∀ (s : Finset (ι × ι')) (g : ι × ι' → R),\n    (∀ (i : ι × ι'), ¬i ∈ s → g i = 0) → ∑ i in s, g i • b i.fst • c i.snd = 0 → ∀ (i : ι × ι'), g i = 0\n[PROOFSTEP]\nrintro s g hg hsg ⟨i, k⟩\n[GOAL]\ncase mk\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nb : ι → S\nι' : Type w₁\nc : ι' → A\nhb : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhc : ∀ (s : Finset ι') (g : ι' → S), ∑ i in s, g i • c i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\ns : Finset (ι × ι')\ng : ι × ι' → R\nhg : ∀ (i : ι × ι'), ¬i ∈ s → g i = 0\nhsg : ∑ i in s, g i • b i.fst • c i.snd = 0\ni : ι\nk : ι'\n⊢ g (i, k) = 0\n[PROOFSTEP]\nby_cases hik : (i, k) ∈ s\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nb : ι → S\nι' : Type w₁\nc : ι' → A\nhb : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhc : ∀ (s : Finset ι') (g : ι' → S), ∑ i in s, g i • c i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\ns : Finset (ι × ι')\ng : ι × ι' → R\nhg : ∀ (i : ι × ι'), ¬i ∈ s → g i = 0\nhsg : ∑ i in s, g i • b i.fst • c i.snd = 0\ni : ι\nk : ι'\nhik : (i, k) ∈ s\n⊢ g (i, k) = 0\n[PROOFSTEP]\nhave h1 : ∑ i in s.image Prod.fst ×ˢ s.image Prod.snd, g i • b i.1 • c i.2 = 0 :=\n  by\n  rw [← hsg]\n  exact\n    (Finset.sum_subset Finset.subset_product fun p _ hp => show g p • b p.1 • c p.2 = 0 by rw [hg p hp, zero_smul]).symm\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nb : ι → S\nι' : Type w₁\nc : ι' → A\nhb : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhc : ∀ (s : Finset ι') (g : ι' → S), ∑ i in s, g i • c i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\ns : Finset (ι × ι')\ng : ι × ι' → R\nhg : ∀ (i : ι × ι'), ¬i ∈ s → g i = 0\nhsg : ∑ i in s, g i • b i.fst • c i.snd = 0\ni : ι\nk : ι'\nhik : (i, k) ∈ s\n⊢ ∑ i in Finset.image Prod.fst s ×ˢ Finset.image Prod.snd s, g i • b i.fst • c i.snd = 0\n[PROOFSTEP]\nrw [← hsg]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nb : ι → S\nι' : Type w₁\nc : ι' → A\nhb : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhc : ∀ (s : Finset ι') (g : ι' → S), ∑ i in s, g i • c i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\ns : Finset (ι × ι')\ng : ι × ι' → R\nhg : ∀ (i : ι × ι'), ¬i ∈ s → g i = 0\nhsg : ∑ i in s, g i • b i.fst • c i.snd = 0\ni : ι\nk : ι'\nhik : (i, k) ∈ s\n⊢ ∑ i in Finset.image Prod.fst s ×ˢ Finset.image Prod.snd s, g i • b i.fst • c i.snd = ∑ i in s, g i • b i.fst • c i.snd\n[PROOFSTEP]\nexact\n  (Finset.sum_subset Finset.subset_product fun p _ hp => show g p • b p.1 • c p.2 = 0 by rw [hg p hp, zero_smul]).symm\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nb : ι → S\nι' : Type w₁\nc : ι' → A\nhb : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhc : ∀ (s : Finset ι') (g : ι' → S), ∑ i in s, g i • c i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\ns : Finset (ι × ι')\ng : ι × ι' → R\nhg : ∀ (i : ι × ι'), ¬i ∈ s → g i = 0\nhsg : ∑ i in s, g i • b i.fst • c i.snd = 0\ni : ι\nk : ι'\nhik : (i, k) ∈ s\np : ι × ι'\nx✝ : p ∈ Finset.image Prod.fst s ×ˢ Finset.image Prod.snd s\nhp : ¬p ∈ s\n⊢ g p • b p.fst • c p.snd = 0\n[PROOFSTEP]\nrw [hg p hp, zero_smul]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nb : ι → S\nι' : Type w₁\nc : ι' → A\nhb : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhc : ∀ (s : Finset ι') (g : ι' → S), ∑ i in s, g i • c i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\ns : Finset (ι × ι')\ng : ι × ι' → R\nhg : ∀ (i : ι × ι'), ¬i ∈ s → g i = 0\nhsg : ∑ i in s, g i • b i.fst • c i.snd = 0\ni : ι\nk : ι'\nhik : (i, k) ∈ s\nh1 : ∑ i in Finset.image Prod.fst s ×ˢ Finset.image Prod.snd s, g i • b i.fst • c i.snd = 0\n⊢ g (i, k) = 0\n[PROOFSTEP]\nrw [Finset.sum_product_right] at h1 \n[GOAL]\ncase pos\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nb : ι → S\nι' : Type w₁\nc : ι' → A\nhb : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhc : ∀ (s : Finset ι') (g : ι' → S), ∑ i in s, g i • c i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\ns : Finset (ι × ι')\ng : ι × ι' → R\nhg : ∀ (i : ι × ι'), ¬i ∈ s → g i = 0\nhsg : ∑ i in s, g i • b i.fst • c i.snd = 0\ni : ι\nk : ι'\nhik : (i, k) ∈ s\nh1 : ∑ y in Finset.image Prod.snd s, ∑ x in Finset.image Prod.fst s, g (x, y) • b (x, y).fst • c (x, y).snd = 0\n⊢ g (i, k) = 0\n[PROOFSTEP]\nsimp_rw [← smul_assoc, ← Finset.sum_smul] at h1 \n[GOAL]\ncase pos\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nb : ι → S\nι' : Type w₁\nc : ι' → A\nhb : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhc : ∀ (s : Finset ι') (g : ι' → S), ∑ i in s, g i • c i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\ns : Finset (ι × ι')\ng : ι × ι' → R\nhg : ∀ (i : ι × ι'), ¬i ∈ s → g i = 0\nhsg : ∑ i in s, g i • b i.fst • c i.snd = 0\ni : ι\nk : ι'\nhik : (i, k) ∈ s\nh1 : ∑ x in Finset.image Prod.snd s, (∑ i in Finset.image Prod.fst s, g (i, x) • b i) • c x = 0\n⊢ g (i, k) = 0\n[PROOFSTEP]\nexact hb _ _ (hc _ _ h1 k (Finset.mem_image_of_mem _ hik)) i (Finset.mem_image_of_mem _ hik)\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nb : ι → S\nι' : Type w₁\nc : ι' → A\nhb : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhc : ∀ (s : Finset ι') (g : ι' → S), ∑ i in s, g i • c i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\ns : Finset (ι × ι')\ng : ι × ι' → R\nhg : ∀ (i : ι × ι'), ¬i ∈ s → g i = 0\nhsg : ∑ i in s, g i • b i.fst • c i.snd = 0\ni : ι\nk : ι'\nhik : ¬(i, k) ∈ s\n⊢ g (i, k) = 0\n[PROOFSTEP]\nexact hg _ hik\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nι' : Type w₁\nb : Basis ι R S\nc : Basis ι' S A\nx : A\nij : ι × ι'\n⊢ ↑(↑(smul b c).repr x) ij = ↑(↑b.repr (↑(↑c.repr x) ij.snd)) ij.fst\n[PROOFSTEP]\nsimp [Basis.smul]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nι' : Type w₁\nb : Basis ι R S\nc : Basis ι' S A\nij : ι × ι'\n⊢ ↑(smul b c) ij = ↑b ij.fst • ↑c ij.snd\n[PROOFSTEP]\nobtain ⟨i, j⟩ := ij\n[GOAL]\ncase mk\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nι' : Type w₁\nb : Basis ι R S\nc : Basis ι' S A\ni : ι\nj : ι'\n⊢ ↑(smul b c) (i, j) = ↑b (i, j).fst • ↑c (i, j).snd\n[PROOFSTEP]\nrw [Basis.apply_eq_iff]\n[GOAL]\ncase mk\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nι' : Type w₁\nb : Basis ι R S\nc : Basis ι' S A\ni : ι\nj : ι'\n⊢ ↑(smul b c).repr (↑b (i, j).fst • ↑c (i, j).snd) = single (i, j) 1\n[PROOFSTEP]\next ⟨i', j'⟩\n[GOAL]\ncase mk.h.mk\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nι' : Type w₁\nb : Basis ι R S\nc : Basis ι' S A\ni : ι\nj : ι'\ni' : ι\nj' : ι'\n⊢ ↑(↑(smul b c).repr (↑b (i, j).fst • ↑c (i, j).snd)) (i', j') = ↑(single (i, j) 1) (i', j')\n[PROOFSTEP]\nrw [Basis.smul_repr, LinearEquiv.map_smul, Basis.repr_self, Finsupp.smul_apply, Finsupp.single_apply]\n[GOAL]\ncase mk.h.mk\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nι' : Type w₁\nb : Basis ι R S\nc : Basis ι' S A\ni : ι\nj : ι'\ni' : ι\nj' : ι'\n⊢ ↑(↑b.repr (↑b (i, j).fst • if (i, j).snd = (i', j').snd then 1 else 0)) (i', j').fst = ↑(single (i, j) 1) (i', j')\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk.h.mk\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nι' : Type w₁\nb : Basis ι R S\nc : Basis ι' S A\ni : ι\nj : ι'\ni' : ι\nj' : ι'\n⊢ ↑(↑b.repr (↑b i • if j = j' then 1 else 0)) i' = ↑(single (i, j) 1) (i', j')\n[PROOFSTEP]\nsplit_ifs with hi\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nι' : Type w₁\nb : Basis ι R S\nc : Basis ι' S A\ni : ι\nj : ι'\ni' : ι\nj' : ι'\nhi : j = j'\n⊢ ↑(↑b.repr (↑b i • 1)) i' = ↑(single (i, j) 1) (i', j')\n[PROOFSTEP]\nsimp [hi, Finsupp.single_apply]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\ninst✝⁶ : CommSemiring R\ninst✝⁵ : Semiring S\ninst✝⁴ : AddCommMonoid A\ninst✝³ : Algebra R S\ninst✝² : Module S A\ninst✝¹ : Module R A\ninst✝ : IsScalarTower R S A\nι : Type v₁\nι' : Type w₁\nb : Basis ι R S\nc : Basis ι' S A\ni : ι\nj : ι'\ni' : ι\nj' : ι'\nhi : ¬j = j'\n⊢ ↑(↑b.repr (↑b i • 0)) i' = ↑(single (i, j) 1) (i', j')\n[PROOFSTEP]\nsimp [hi]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\ninst✝⁸ : CommSemiring A\ninst✝⁷ : CommSemiring C\ninst✝⁶ : CommSemiring D\ninst✝⁵ : Algebra A C\ninst✝⁴ : Algebra A D\nf : C →ₐ[A] D\ninst✝³ : CommSemiring B\ninst✝² : Algebra A B\ninst✝¹ : Algebra B C\ninst✝ : IsScalarTower A B C\nsrc✝ : Algebra B D := RingHom.toAlgebra ↑(restrictDomain B f)\n⊢ OneHom.toFun (↑↑↑f) 1 = 1\n[PROOFSTEP]\nsimp only [toRingHom_eq_coe, RingHom.toMonoidHom_eq_coe, OneHom.toFun_eq_coe, map_one]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\ninst✝⁸ : CommSemiring A\ninst✝⁷ : CommSemiring C\ninst✝⁶ : CommSemiring D\ninst✝⁵ : Algebra A C\ninst✝⁴ : Algebra A D\nf : C →ₐ[A] D\ninst✝³ : CommSemiring B\ninst✝² : Algebra A B\ninst✝¹ : Algebra B C\ninst✝ : IsScalarTower A B C\nsrc✝ : Algebra B D := RingHom.toAlgebra ↑(restrictDomain B f)\n⊢ ∀ (x y : C),\n    OneHom.toFun { toFun := f.toFun, map_one' := (_ : ↑↑↑↑f 1 = 1) } (x * y) =\n      OneHom.toFun { toFun := f.toFun, map_one' := (_ : ↑↑↑↑f 1 = 1) } x *\n        OneHom.toFun { toFun := f.toFun, map_one' := (_ : ↑↑↑↑f 1 = 1) } y\n[PROOFSTEP]\nsimp only [toRingHom_eq_coe, RingHom.toMonoidHom_eq_coe, OneHom.toFun_eq_coe, MonoidHom.toOneHom_coe, map_mul,\n  MonoidHom.coe_coe, RingHom.coe_coe, forall_const]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\ninst✝⁸ : CommSemiring A\ninst✝⁷ : CommSemiring C\ninst✝⁶ : CommSemiring D\ninst✝⁵ : Algebra A C\ninst✝⁴ : Algebra A D\nf : C →ₐ[A] D\ninst✝³ : CommSemiring B\ninst✝² : Algebra A B\ninst✝¹ : Algebra B C\ninst✝ : IsScalarTower A B C\nsrc✝ : Algebra B D := RingHom.toAlgebra ↑(restrictDomain B f)\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := f.toFun, map_one' := (_ : ↑↑↑↑f 1 = 1) },\n          map_mul' := (_ : ∀ (a a_1 : C), ↑↑↑f (a * a_1) = ↑f a * ↑f a_1) })\n      0 =\n    0\n[PROOFSTEP]\nsimp only [toRingHom_eq_coe, RingHom.toMonoidHom_eq_coe, OneHom.toFun_eq_coe, MonoidHom.toOneHom_coe, MonoidHom.coe_coe,\n  map_zero]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\ninst✝⁸ : CommSemiring A\ninst✝⁷ : CommSemiring C\ninst✝⁶ : CommSemiring D\ninst✝⁵ : Algebra A C\ninst✝⁴ : Algebra A D\nf : C →ₐ[A] D\ninst✝³ : CommSemiring B\ninst✝² : Algebra A B\ninst✝¹ : Algebra B C\ninst✝ : IsScalarTower A B C\nsrc✝ : Algebra B D := RingHom.toAlgebra ↑(restrictDomain B f)\n⊢ ∀ (x y : C),\n    OneHom.toFun\n        (↑{ toOneHom := { toFun := f.toFun, map_one' := (_ : ↑↑↑↑f 1 = 1) },\n            map_mul' := (_ : ∀ (a a_1 : C), ↑↑↑f (a * a_1) = ↑f a * ↑f a_1) })\n        (x + y) =\n      OneHom.toFun\n          (↑{ toOneHom := { toFun := f.toFun, map_one' := (_ : ↑↑↑↑f 1 = 1) },\n              map_mul' := (_ : ∀ (a a_1 : C), ↑↑↑f (a * a_1) = ↑f a * ↑f a_1) })\n          x +\n        OneHom.toFun\n          (↑{ toOneHom := { toFun := f.toFun, map_one' := (_ : ↑↑↑↑f 1 = 1) },\n              map_mul' := (_ : ∀ (a a_1 : C), ↑↑↑f (a * a_1) = ↑f a * ↑f a_1) })\n          y\n[PROOFSTEP]\nsimp only [toRingHom_eq_coe, RingHom.toMonoidHom_eq_coe, OneHom.toFun_eq_coe, MonoidHom.toOneHom_coe, MonoidHom.coe_coe,\n  map_add, RingHom.coe_coe, forall_const]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\ninst✝⁸ : CommSemiring A\ninst✝⁷ : CommSemiring C\ninst✝⁶ : CommSemiring D\ninst✝⁵ : Algebra A C\ninst✝⁴ : Algebra A D\nf✝ : C →ₐ[A] D\ninst✝³ : CommSemiring B\ninst✝² : Algebra A B\ninst✝¹ : Algebra B C\ninst✝ : IsScalarTower A B C\nf : C →ₐ[A] D\n⊢ (fun fg =>\n        let x := RingHom.toAlgebra ↑fg.fst;\n        AlgHom.restrictScalars A fg.snd)\n      ((fun f => { fst := AlgHom.restrictDomain B f, snd := AlgHom.extendScalars B f }) f) =\n    f\n[PROOFSTEP]\ndsimp only\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\ninst✝⁸ : CommSemiring A\ninst✝⁷ : CommSemiring C\ninst✝⁶ : CommSemiring D\ninst✝⁵ : Algebra A C\ninst✝⁴ : Algebra A D\nf✝ : C →ₐ[A] D\ninst✝³ : CommSemiring B\ninst✝² : Algebra A B\ninst✝¹ : Algebra B C\ninst✝ : IsScalarTower A B C\nf : C →ₐ[A] D\n⊢ AlgHom.restrictScalars A (AlgHom.extendScalars B f) = f\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\ninst✝⁸ : CommSemiring A\ninst✝⁷ : CommSemiring C\ninst✝⁶ : CommSemiring D\ninst✝⁵ : Algebra A C\ninst✝⁴ : Algebra A D\nf✝ : C →ₐ[A] D\ninst✝³ : CommSemiring B\ninst✝² : Algebra A B\ninst✝¹ : Algebra B C\ninst✝ : IsScalarTower A B C\nf : C →ₐ[A] D\nx✝ : C\n⊢ ↑(AlgHom.restrictScalars A (AlgHom.extendScalars B f)) x✝ = ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\ninst✝⁸ : CommSemiring A\ninst✝⁷ : CommSemiring C\ninst✝⁶ : CommSemiring D\ninst✝⁵ : Algebra A C\ninst✝⁴ : Algebra A D\nf : C →ₐ[A] D\ninst✝³ : CommSemiring B\ninst✝² : Algebra A B\ninst✝¹ : Algebra B C\ninst✝ : IsScalarTower A B C\n⊢ Function.RightInverse\n    (fun fg =>\n      let x := RingHom.toAlgebra ↑fg.fst;\n      AlgHom.restrictScalars A fg.snd)\n    fun f => { fst := AlgHom.restrictDomain B f, snd := AlgHom.extendScalars B f }\n[PROOFSTEP]\nrintro ⟨⟨⟨⟨⟨f, _⟩, _⟩, _⟩, _⟩, ⟨⟨⟨⟨g, _⟩, _⟩, _⟩, hg⟩⟩\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.mk.mk.mk\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\ninst✝⁸ : CommSemiring A\ninst✝⁷ : CommSemiring C\ninst✝⁶ : CommSemiring D\ninst✝⁵ : Algebra A C\ninst✝⁴ : Algebra A D\nf✝ : C →ₐ[A] D\ninst✝³ : CommSemiring B\ninst✝² : Algebra A B\ninst✝¹ : Algebra B C\ninst✝ : IsScalarTower A B C\nf : B → D\nmap_one'✝¹ : f 1 = 1\nmap_mul'✝¹ :\n  ∀ (x y : B),\n    OneHom.toFun { toFun := f, map_one' := map_one'✝¹ } (x * y) =\n      OneHom.toFun { toFun := f, map_one' := map_one'✝¹ } x * OneHom.toFun { toFun := f, map_one' := map_one'✝¹ } y\nmap_zero'✝¹ : OneHom.toFun (↑{ toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) 0 = 0\nmap_add'✝¹ :\n  ∀ (x y : B),\n    OneHom.toFun (↑{ toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) (x + y) =\n      OneHom.toFun (↑{ toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) x +\n        OneHom.toFun (↑{ toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) y\ncommutes'✝ :\n  ∀ (r : A),\n    OneHom.toFun\n        (↑↑{ toMonoidHom := { toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ },\n              map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ })\n        (↑(algebraMap A B) r) =\n      ↑(algebraMap A D) r\ng : C → D\nmap_one'✝ : g 1 = 1\nmap_mul'✝ :\n  ∀ (x y : C),\n    OneHom.toFun { toFun := g, map_one' := map_one'✝ } (x * y) =\n      OneHom.toFun { toFun := g, map_one' := map_one'✝ } x * OneHom.toFun { toFun := g, map_one' := map_one'✝ } y\nmap_zero'✝ : OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) 0 = 0\nmap_add'✝ :\n  ∀ (x y : C),\n    OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) (x + y) =\n      OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) x +\n        OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) y\nhg :\n  ∀ (r : B),\n    OneHom.toFun\n        (↑↑{ toMonoidHom := { toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n              map_zero' := map_zero'✝, map_add' := map_add'✝ })\n        (↑(algebraMap B C) r) =\n      ↑(algebraMap B D) r\n⊢ (fun f => { fst := AlgHom.restrictDomain B f, snd := AlgHom.extendScalars B f })\n      ((fun fg =>\n          let x := RingHom.toAlgebra ↑fg.fst;\n          AlgHom.restrictScalars A fg.snd)\n        {\n          fst :=\n            {\n              toRingHom :=\n                { toMonoidHom := { toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ },\n                  map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ },\n              commutes' := commutes'✝ },\n          snd :=\n            {\n              toRingHom :=\n                { toMonoidHom := { toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n                  map_zero' := map_zero'✝, map_add' := map_add'✝ },\n              commutes' := hg } }) =\n    {\n      fst :=\n        {\n          toRingHom :=\n            { toMonoidHom := { toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ },\n              map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ },\n          commutes' := commutes'✝ },\n      snd :=\n        {\n          toRingHom :=\n            { toMonoidHom := { toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n              map_zero' := map_zero'✝, map_add' := map_add'✝ },\n          commutes' := hg } }\n[PROOFSTEP]\nobtain rfl : f = fun x => g (algebraMap B C x) := by\n  ext x\n  exact (hg x).symm\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\ninst✝⁸ : CommSemiring A\ninst✝⁷ : CommSemiring C\ninst✝⁶ : CommSemiring D\ninst✝⁵ : Algebra A C\ninst✝⁴ : Algebra A D\nf✝ : C →ₐ[A] D\ninst✝³ : CommSemiring B\ninst✝² : Algebra A B\ninst✝¹ : Algebra B C\ninst✝ : IsScalarTower A B C\nf : B → D\nmap_one'✝¹ : f 1 = 1\nmap_mul'✝¹ :\n  ∀ (x y : B),\n    OneHom.toFun { toFun := f, map_one' := map_one'✝¹ } (x * y) =\n      OneHom.toFun { toFun := f, map_one' := map_one'✝¹ } x * OneHom.toFun { toFun := f, map_one' := map_one'✝¹ } y\nmap_zero'✝¹ : OneHom.toFun (↑{ toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) 0 = 0\nmap_add'✝¹ :\n  ∀ (x y : B),\n    OneHom.toFun (↑{ toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) (x + y) =\n      OneHom.toFun (↑{ toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) x +\n        OneHom.toFun (↑{ toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) y\ncommutes'✝ :\n  ∀ (r : A),\n    OneHom.toFun\n        (↑↑{ toMonoidHom := { toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ },\n              map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ })\n        (↑(algebraMap A B) r) =\n      ↑(algebraMap A D) r\ng : C → D\nmap_one'✝ : g 1 = 1\nmap_mul'✝ :\n  ∀ (x y : C),\n    OneHom.toFun { toFun := g, map_one' := map_one'✝ } (x * y) =\n      OneHom.toFun { toFun := g, map_one' := map_one'✝ } x * OneHom.toFun { toFun := g, map_one' := map_one'✝ } y\nmap_zero'✝ : OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) 0 = 0\nmap_add'✝ :\n  ∀ (x y : C),\n    OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) (x + y) =\n      OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) x +\n        OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) y\nhg :\n  ∀ (r : B),\n    OneHom.toFun\n        (↑↑{ toMonoidHom := { toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n              map_zero' := map_zero'✝, map_add' := map_add'✝ })\n        (↑(algebraMap B C) r) =\n      ↑(algebraMap B D) r\n⊢ f = fun x => g (↑(algebraMap B C) x)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\ninst✝⁸ : CommSemiring A\ninst✝⁷ : CommSemiring C\ninst✝⁶ : CommSemiring D\ninst✝⁵ : Algebra A C\ninst✝⁴ : Algebra A D\nf✝ : C →ₐ[A] D\ninst✝³ : CommSemiring B\ninst✝² : Algebra A B\ninst✝¹ : Algebra B C\ninst✝ : IsScalarTower A B C\nf : B → D\nmap_one'✝¹ : f 1 = 1\nmap_mul'✝¹ :\n  ∀ (x y : B),\n    OneHom.toFun { toFun := f, map_one' := map_one'✝¹ } (x * y) =\n      OneHom.toFun { toFun := f, map_one' := map_one'✝¹ } x * OneHom.toFun { toFun := f, map_one' := map_one'✝¹ } y\nmap_zero'✝¹ : OneHom.toFun (↑{ toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) 0 = 0\nmap_add'✝¹ :\n  ∀ (x y : B),\n    OneHom.toFun (↑{ toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) (x + y) =\n      OneHom.toFun (↑{ toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) x +\n        OneHom.toFun (↑{ toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) y\ncommutes'✝ :\n  ∀ (r : A),\n    OneHom.toFun\n        (↑↑{ toMonoidHom := { toOneHom := { toFun := f, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ },\n              map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ })\n        (↑(algebraMap A B) r) =\n      ↑(algebraMap A D) r\ng : C → D\nmap_one'✝ : g 1 = 1\nmap_mul'✝ :\n  ∀ (x y : C),\n    OneHom.toFun { toFun := g, map_one' := map_one'✝ } (x * y) =\n      OneHom.toFun { toFun := g, map_one' := map_one'✝ } x * OneHom.toFun { toFun := g, map_one' := map_one'✝ } y\nmap_zero'✝ : OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) 0 = 0\nmap_add'✝ :\n  ∀ (x y : C),\n    OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) (x + y) =\n      OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) x +\n        OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) y\nhg :\n  ∀ (r : B),\n    OneHom.toFun\n        (↑↑{ toMonoidHom := { toOneHom := { toFun := g, map_one' := map_one'✝ }, map_mul' := map_mul'✝ },\n              map_zero' := map_zero'✝, map_add' := map_add'✝ })\n        (↑(algebraMap B C) r) =\n      ↑(algebraMap B D) r\nx : B\n⊢ f x = g (↑(algebraMap B C) x)\n[PROOFSTEP]\nexact (hg x).symm\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.mk.mk.mk\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\ninst✝⁸ : CommSemiring A\ninst✝⁷ : CommSemiring C\ninst✝⁶ : CommSemiring D\ninst✝⁵ : Algebra A C\ninst✝⁴ : Algebra A D\nf : C →ₐ[A] D\ninst✝³ : CommSemiring B\ninst✝² : Algebra A B\ninst✝¹ : Algebra B C\ninst✝ : IsScalarTower A B C\ng : C → D\nmap_one'✝¹ : g 1 = 1\nmap_mul'✝¹ :\n  ∀ (x y : C),\n    OneHom.toFun { toFun := g, map_one' := map_one'✝¹ } (x * y) =\n      OneHom.toFun { toFun := g, map_one' := map_one'✝¹ } x * OneHom.toFun { toFun := g, map_one' := map_one'✝¹ } y\nmap_zero'✝¹ : OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) 0 = 0\nmap_add'✝¹ :\n  ∀ (x y : C),\n    OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) (x + y) =\n      OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) x +\n        OneHom.toFun (↑{ toOneHom := { toFun := g, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ }) y\nmap_one'✝ : (fun x => g (↑(algebraMap B C) x)) 1 = 1\nmap_mul'✝ :\n  ∀ (x y : B),\n    OneHom.toFun { toFun := fun x => g (↑(algebraMap B C) x), map_one' := map_one'✝ } (x * y) =\n      OneHom.toFun { toFun := fun x => g (↑(algebraMap B C) x), map_one' := map_one'✝ } x *\n        OneHom.toFun { toFun := fun x => g (↑(algebraMap B C) x), map_one' := map_one'✝ } y\nmap_zero'✝ :\n  OneHom.toFun\n      (↑{ toOneHom := { toFun := fun x => g (↑(algebraMap B C) x), map_one' := map_one'✝ }, map_mul' := map_mul'✝ }) 0 =\n    0\nmap_add'✝ :\n  ∀ (x y : B),\n    OneHom.toFun\n        (↑{ toOneHom := { toFun := fun x => g (↑(algebraMap B C) x), map_one' := map_one'✝ }, map_mul' := map_mul'✝ })\n        (x + y) =\n      OneHom.toFun\n          (↑{ toOneHom := { toFun := fun x => g (↑(algebraMap B C) x), map_one' := map_one'✝ }, map_mul' := map_mul'✝ })\n          x +\n        OneHom.toFun\n          (↑{ toOneHom := { toFun := fun x => g (↑(algebraMap B C) x), map_one' := map_one'✝ }, map_mul' := map_mul'✝ })\n          y\ncommutes'✝ :\n  ∀ (r : A),\n    OneHom.toFun\n        (↑↑{\n              toMonoidHom :=\n                { toOneHom := { toFun := fun x => g (↑(algebraMap B C) x), map_one' := map_one'✝ },\n                  map_mul' := map_mul'✝ },\n              map_zero' := map_zero'✝, map_add' := map_add'✝ })\n        (↑(algebraMap A B) r) =\n      ↑(algebraMap A D) r\nhg :\n  ∀ (r : B),\n    OneHom.toFun\n        (↑↑{ toMonoidHom := { toOneHom := { toFun := g, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ },\n              map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ })\n        (↑(algebraMap B C) r) =\n      ↑(algebraMap B D) r\n⊢ (fun f => { fst := AlgHom.restrictDomain B f, snd := AlgHom.extendScalars B f })\n      ((fun fg =>\n          let x := RingHom.toAlgebra ↑fg.fst;\n          AlgHom.restrictScalars A fg.snd)\n        {\n          fst :=\n            {\n              toRingHom :=\n                {\n                  toMonoidHom :=\n                    { toOneHom := { toFun := fun x => g (↑(algebraMap B C) x), map_one' := map_one'✝ },\n                      map_mul' := map_mul'✝ },\n                  map_zero' := map_zero'✝, map_add' := map_add'✝ },\n              commutes' := commutes'✝ },\n          snd :=\n            {\n              toRingHom :=\n                { toMonoidHom := { toOneHom := { toFun := g, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ },\n                  map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ },\n              commutes' := hg } }) =\n    {\n      fst :=\n        {\n          toRingHom :=\n            {\n              toMonoidHom :=\n                { toOneHom := { toFun := fun x => g (↑(algebraMap B C) x), map_one' := map_one'✝ },\n                  map_mul' := map_mul'✝ },\n              map_zero' := map_zero'✝, map_add' := map_add'✝ },\n          commutes' := commutes'✝ },\n      snd :=\n        {\n          toRingHom :=\n            { toMonoidHom := { toOneHom := { toFun := g, map_one' := map_one'✝¹ }, map_mul' := map_mul'✝¹ },\n              map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ },\n          commutes' := hg } }\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.AlgebraTower", "llama_tokens": 15200, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6261241772283035, "lm_q2_score": 0.6113819732941511, "lm_q1q2_score": 0.382801035001017}}
{"text": "[GOAL]\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\ng : G\n⊢ zpowers g = closure {g}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\ng x✝ : G\n⊢ x✝ ∈ zpowers g ↔ x✝ ∈ closure {g}\n[PROOFSTEP]\nexact mem_closure_singleton.symm\n[GOAL]\nG : Type u_1\ninst✝³ : Group G\nA : Type u_2\ninst✝² : AddGroup A\nN : Type u_3\ninst✝¹ : Group N\nR : Type u_4\ninst✝ : Ring R\nr : R\nk : ℤ\n⊢ ↑k * r ∈ zmultiples r\n[PROOFSTEP]\nsimpa only [← zsmul_eq_mul] using zsmul_mem_zmultiples r k\n[GOAL]\nG : Type u_1\ninst✝³ : Group G\nA : Type u_2\ninst✝² : AddGroup A\nN : Type u_3\ninst✝¹ : Group N\nR : Type u_4\ninst✝ : Ring R\nr : R\nk : ℤ\n⊢ (fun x => x • 1) k = ↑k\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\ninst✝³ : Group G\nA✝ : Type u_2\ninst✝² : AddGroup A✝\nN : Type u_3\ninst✝¹ : Group N\nA : Type u_4\ninst✝ : AddGroupWithOne A\n⊢ AddMonoidHom.range (castAddHom A) = AddSubgroup.zmultiples 1\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nG : Type u_1\ninst✝³ : Group G\nA✝ : Type u_2\ninst✝² : AddGroup A✝\nN : Type u_3\ninst✝¹ : Group N\nA : Type u_4\ninst✝ : AddGroupWithOne A\na : A\n⊢ a ∈ AddMonoidHom.range (castAddHom A) ↔ a ∈ AddSubgroup.zmultiples 1\n[PROOFSTEP]\nsimp_rw [AddMonoidHom.mem_range, Int.coe_castAddHom, AddSubgroup.mem_zmultiples_iff, zsmul_one]\n[GOAL]\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nf : G →* N\nx : G\n⊢ Subgroup.map f (Subgroup.zpowers x) = Subgroup.zpowers (↑f x)\n[PROOFSTEP]\nrw [Subgroup.zpowers_eq_closure, Subgroup.zpowers_eq_closure, f.map_closure, Set.image_singleton]\n[GOAL]\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\na b k : ℤ\n⊢ (fun x => x • a) k = b ↔ b = a * k\n[PROOFSTEP]\nrw [mul_comm, eq_comm, ← smul_eq_mul]\n[GOAL]\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nx : G\n⊢ ↑Additive.ofMul '' ↑(Subgroup.zpowers x) = ↑(AddSubgroup.zmultiples (↑Additive.ofMul x))\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nx : G\ny : Additive G\n⊢ y ∈ ↑Additive.ofMul '' ↑(Subgroup.zpowers x) ↔ y ∈ ↑(AddSubgroup.zmultiples (↑Additive.ofMul x))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nx : G\ny : Additive G\n⊢ y ∈ ↑Additive.ofMul '' ↑(Subgroup.zpowers x) → y ∈ ↑(AddSubgroup.zmultiples (↑Additive.ofMul x))\n[PROOFSTEP]\nrintro ⟨z, ⟨m, hm⟩, hz2⟩\n[GOAL]\ncase h.mp.intro.intro.intro\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nx : G\ny : Additive G\nz : G\nhz2 : ↑Additive.ofMul z = y\nm : ℤ\nhm : (fun x x_1 => x ^ x_1) x m = z\n⊢ y ∈ ↑(AddSubgroup.zmultiples (↑Additive.ofMul x))\n[PROOFSTEP]\nuse m\n[GOAL]\ncase h\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nx : G\ny : Additive G\nz : G\nhz2 : ↑Additive.ofMul z = y\nm : ℤ\nhm : (fun x x_1 => x ^ x_1) x m = z\n⊢ (fun x_1 => x_1 • ↑Additive.ofMul x) m = y\n[PROOFSTEP]\nsimp only at *\n[GOAL]\ncase h\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nx : G\ny : Additive G\nz : G\nhz2 : ↑Additive.ofMul z = y\nm : ℤ\nhm : x ^ m = z\n⊢ m • ↑Additive.ofMul x = y\n[PROOFSTEP]\nrwa [← ofMul_zpow, hm]\n[GOAL]\ncase h.mpr\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nx : G\ny : Additive G\n⊢ y ∈ ↑(AddSubgroup.zmultiples (↑Additive.ofMul x)) → y ∈ ↑Additive.ofMul '' ↑(Subgroup.zpowers x)\n[PROOFSTEP]\nrintro ⟨n, hn⟩\n[GOAL]\ncase h.mpr.intro\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nx : G\ny : Additive G\nn : ℤ\nhn : (fun x_1 => x_1 • ↑Additive.ofMul x) n = y\n⊢ y ∈ ↑Additive.ofMul '' ↑(Subgroup.zpowers x)\n[PROOFSTEP]\nrefine' ⟨x ^ n, ⟨n, rfl⟩, _⟩\n[GOAL]\ncase h.mpr.intro\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nx : G\ny : Additive G\nn : ℤ\nhn : (fun x_1 => x_1 • ↑Additive.ofMul x) n = y\n⊢ ↑Additive.ofMul (x ^ n) = y\n[PROOFSTEP]\nrwa [ofMul_zpow]\n[GOAL]\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nx : A\n⊢ ↑Multiplicative.ofAdd '' ↑(AddSubgroup.zmultiples x) = ↑(Subgroup.zpowers (↑Multiplicative.ofAdd x))\n[PROOFSTEP]\nsymm\n[GOAL]\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nx : A\n⊢ ↑(Subgroup.zpowers (↑Multiplicative.ofAdd x)) = ↑Multiplicative.ofAdd '' ↑(AddSubgroup.zmultiples x)\n[PROOFSTEP]\nrw [Equiv.eq_image_iff_symm_image_eq]\n[GOAL]\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\nx : A\n⊢ ↑Multiplicative.ofAdd.symm '' ↑(Subgroup.zpowers (↑Multiplicative.ofAdd x)) = ↑(AddSubgroup.zmultiples x)\n[PROOFSTEP]\nexact ofMul_image_zpowers_eq_zmultiples_ofMul\n[GOAL]\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\ns : Set G\ng✝ g : G\nx✝¹ x✝ : { x // x ∈ zpowers g }\nval✝¹ : G\nw✝¹ : ℤ\nh₁ : (fun x x_1 => x ^ x_1) g w✝¹ = val✝¹\nval✝ : G\nw✝ : ℤ\nh₂ : (fun x x_1 => x ^ x_1) g w✝ = val✝\n⊢ { val := val✝¹, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) g y = val✝¹) } *\n      { val := val✝, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) g y = val✝) } =\n    { val := val✝, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) g y = val✝) } *\n      { val := val✝¹, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) g y = val✝¹) }\n[PROOFSTEP]\nrw [Subtype.ext_iff, coe_mul, coe_mul, Subtype.coe_mk, Subtype.coe_mk, ← h₁, ← h₂, zpow_mul_comm]\n[GOAL]\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\ns : Set G\ng✝ g : G\nH : Subgroup G\n⊢ zpowers g ≤ H ↔ g ∈ H\n[PROOFSTEP]\nrw [zpowers_eq_closure, closure_le, Set.singleton_subset_iff, SetLike.mem_coe]\n[GOAL]\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\ns : Set G\ng✝ g : G\n⊢ zpowers g = ⊥ ↔ g = 1\n[PROOFSTEP]\nrw [eq_bot_iff, zpowers_le, mem_bot]\n[GOAL]\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\ns : Set G\ng : G\nS : Set G\nhS : closure S = ⊤\n⊢ center G = ⨅ (g : G) (_ : g ∈ S), centralizer ↑(zpowers g)\n[PROOFSTEP]\nrw [← centralizer_univ, ← coe_top, ← hS, centralizer_closure]\n[GOAL]\nG : Type u_1\ninst✝² : Group G\nA : Type u_2\ninst✝¹ : AddGroup A\nN : Type u_3\ninst✝ : Group N\ns : Set G\ng : G\nS : Set G\nhS : closure S = ⊤\n⊢ center G = ⨅ (g : ↑S), centralizer ↑(zpowers ↑g)\n[PROOFSTEP]\nrw [center_eq_iInf S hS, ← iInf_subtype'']\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Subgroup.ZPowers", "llama_tokens": 3460, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.658417500561683, "lm_q2_score": 0.5813030906443133, "lm_q1q2_score": 0.3827401280108102}}
{"text": "[GOAL]\nι₁ : Type u_1\nι₂ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nS : Type u_5\nS₂ : Type u_6\nM : Type u_7\nN : Type u_8\nP : Type u_9\nMₗ : Type u_10\nNₗ : Type u_11\nPₗ : Type u_12\ninst✝¹⁷ : CommSemiring R\ninst✝¹⁶ : CommSemiring S\ninst✝¹⁵ : CommSemiring R₂\ninst✝¹⁴ : CommSemiring S₂\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Mₗ\ninst✝⁹ : AddCommMonoid Nₗ\ninst✝⁸ : AddCommMonoid Pₗ\ninst✝⁷ : Module R M\ninst✝⁶ : Module S N\ninst✝⁵ : Module R₂ P\ninst✝⁴ : Module S₂ P\ninst✝³ : Module R Mₗ\ninst✝² : Module R Nₗ\ninst✝¹ : Module R Pₗ\ninst✝ : SMulCommClass S₂ R₂ P\nρ₁₂ : R →+* R₂\nσ₁₂ : S →+* S₂\nb₁ : Basis ι₁ R M\nb₂ : Basis ι₂ S N\nb₁' : Basis ι₁ R Mₗ\nb₂' : Basis ι₂ R Nₗ\nB : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P\nx : M\ny : N\n⊢ (Finsupp.sum (↑b₁.repr x) fun i xi =>\n      Finsupp.sum (↑b₂.repr y) fun j yj => ↑ρ₁₂ xi • ↑σ₁₂ yj • ↑(↑B (↑b₁ i)) (↑b₂ j)) =\n    ↑(↑B x) y\n[PROOFSTEP]\nconv_rhs => rw [← b₁.total_repr x, ← b₂.total_repr y]\n[GOAL]\nι₁ : Type u_1\nι₂ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nS : Type u_5\nS₂ : Type u_6\nM : Type u_7\nN : Type u_8\nP : Type u_9\nMₗ : Type u_10\nNₗ : Type u_11\nPₗ : Type u_12\ninst✝¹⁷ : CommSemiring R\ninst✝¹⁶ : CommSemiring S\ninst✝¹⁵ : CommSemiring R₂\ninst✝¹⁴ : CommSemiring S₂\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Mₗ\ninst✝⁹ : AddCommMonoid Nₗ\ninst✝⁸ : AddCommMonoid Pₗ\ninst✝⁷ : Module R M\ninst✝⁶ : Module S N\ninst✝⁵ : Module R₂ P\ninst✝⁴ : Module S₂ P\ninst✝³ : Module R Mₗ\ninst✝² : Module R Nₗ\ninst✝¹ : Module R Pₗ\ninst✝ : SMulCommClass S₂ R₂ P\nρ₁₂ : R →+* R₂\nσ₁₂ : S →+* S₂\nb₁ : Basis ι₁ R M\nb₂ : Basis ι₂ S N\nb₁' : Basis ι₁ R Mₗ\nb₂' : Basis ι₂ R Nₗ\nB : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P\nx : M\ny : N\n| ↑(↑B x) y\n[PROOFSTEP]\nrw [← b₁.total_repr x, ← b₂.total_repr y]\n[GOAL]\nι₁ : Type u_1\nι₂ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nS : Type u_5\nS₂ : Type u_6\nM : Type u_7\nN : Type u_8\nP : Type u_9\nMₗ : Type u_10\nNₗ : Type u_11\nPₗ : Type u_12\ninst✝¹⁷ : CommSemiring R\ninst✝¹⁶ : CommSemiring S\ninst✝¹⁵ : CommSemiring R₂\ninst✝¹⁴ : CommSemiring S₂\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Mₗ\ninst✝⁹ : AddCommMonoid Nₗ\ninst✝⁸ : AddCommMonoid Pₗ\ninst✝⁷ : Module R M\ninst✝⁶ : Module S N\ninst✝⁵ : Module R₂ P\ninst✝⁴ : Module S₂ P\ninst✝³ : Module R Mₗ\ninst✝² : Module R Nₗ\ninst✝¹ : Module R Pₗ\ninst✝ : SMulCommClass S₂ R₂ P\nρ₁₂ : R →+* R₂\nσ₁₂ : S →+* S₂\nb₁ : Basis ι₁ R M\nb₂ : Basis ι₂ S N\nb₁' : Basis ι₁ R Mₗ\nb₂' : Basis ι₂ R Nₗ\nB : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P\nx : M\ny : N\n| ↑(↑B x) y\n[PROOFSTEP]\nrw [← b₁.total_repr x, ← b₂.total_repr y]\n[GOAL]\nι₁ : Type u_1\nι₂ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nS : Type u_5\nS₂ : Type u_6\nM : Type u_7\nN : Type u_8\nP : Type u_9\nMₗ : Type u_10\nNₗ : Type u_11\nPₗ : Type u_12\ninst✝¹⁷ : CommSemiring R\ninst✝¹⁶ : CommSemiring S\ninst✝¹⁵ : CommSemiring R₂\ninst✝¹⁴ : CommSemiring S₂\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Mₗ\ninst✝⁹ : AddCommMonoid Nₗ\ninst✝⁸ : AddCommMonoid Pₗ\ninst✝⁷ : Module R M\ninst✝⁶ : Module S N\ninst✝⁵ : Module R₂ P\ninst✝⁴ : Module S₂ P\ninst✝³ : Module R Mₗ\ninst✝² : Module R Nₗ\ninst✝¹ : Module R Pₗ\ninst✝ : SMulCommClass S₂ R₂ P\nρ₁₂ : R →+* R₂\nσ₁₂ : S →+* S₂\nb₁ : Basis ι₁ R M\nb₂ : Basis ι₂ S N\nb₁' : Basis ι₁ R Mₗ\nb₂' : Basis ι₂ R Nₗ\nB : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P\nx : M\ny : N\n| ↑(↑B x) y\n[PROOFSTEP]\nrw [← b₁.total_repr x, ← b₂.total_repr y]\n[GOAL]\nι₁ : Type u_1\nι₂ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nS : Type u_5\nS₂ : Type u_6\nM : Type u_7\nN : Type u_8\nP : Type u_9\nMₗ : Type u_10\nNₗ : Type u_11\nPₗ : Type u_12\ninst✝¹⁷ : CommSemiring R\ninst✝¹⁶ : CommSemiring S\ninst✝¹⁵ : CommSemiring R₂\ninst✝¹⁴ : CommSemiring S₂\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Mₗ\ninst✝⁹ : AddCommMonoid Nₗ\ninst✝⁸ : AddCommMonoid Pₗ\ninst✝⁷ : Module R M\ninst✝⁶ : Module S N\ninst✝⁵ : Module R₂ P\ninst✝⁴ : Module S₂ P\ninst✝³ : Module R Mₗ\ninst✝² : Module R Nₗ\ninst✝¹ : Module R Pₗ\ninst✝ : SMulCommClass S₂ R₂ P\nρ₁₂ : R →+* R₂\nσ₁₂ : S →+* S₂\nb₁ : Basis ι₁ R M\nb₂ : Basis ι₂ S N\nb₁' : Basis ι₁ R Mₗ\nb₂' : Basis ι₂ R Nₗ\nB : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P\nx : M\ny : N\n⊢ (Finsupp.sum (↑b₁.repr x) fun i xi =>\n      Finsupp.sum (↑b₂.repr y) fun j yj => ↑ρ₁₂ xi • ↑σ₁₂ yj • ↑(↑B (↑b₁ i)) (↑b₂ j)) =\n    ↑(↑B (↑(Finsupp.total ι₁ M R ↑b₁) (↑b₁.repr x))) (↑(Finsupp.total ι₂ N S ↑b₂) (↑b₂.repr y))\n[PROOFSTEP]\nsimp_rw [Finsupp.total_apply, Finsupp.sum, map_sum₂, map_sum, LinearMap.map_smulₛₗ₂, LinearMap.map_smulₛₗ]\n[GOAL]\nι₁ : Type u_1\nι₂ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nS : Type u_5\nS₂ : Type u_6\nM : Type u_7\nN : Type u_8\nP : Type u_9\nMₗ : Type u_10\nNₗ : Type u_11\nPₗ : Type u_12\ninst✝¹⁷ : CommSemiring R\ninst✝¹⁶ : CommSemiring S\ninst✝¹⁵ : CommSemiring R₂\ninst✝¹⁴ : CommSemiring S₂\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Mₗ\ninst✝⁹ : AddCommMonoid Nₗ\ninst✝⁸ : AddCommMonoid Pₗ\ninst✝⁷ : Module R M\ninst✝⁶ : Module S N\ninst✝⁵ : Module R₂ P\ninst✝⁴ : Module S₂ P\ninst✝³ : Module R Mₗ\ninst✝² : Module R Nₗ\ninst✝¹ : Module R Pₗ\ninst✝ : SMulCommClass S₂ R₂ P\nρ₁₂ : R →+* R₂\nσ₁₂ : S →+* S₂\nb₁ : Basis ι₁ R M\nb₂ : Basis ι₂ S N\nb₁' : Basis ι₁ R Mₗ\nb₂' : Basis ι₂ R Nₗ\nB : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ\nx : Mₗ\ny : Nₗ\n⊢ (Finsupp.sum (↑b₁'.repr x) fun i xi => Finsupp.sum (↑b₂'.repr y) fun j yj => xi • yj • ↑(↑B (↑b₁' i)) (↑b₂' j)) =\n    ↑(↑B x) y\n[PROOFSTEP]\nconv_rhs => rw [← b₁'.total_repr x, ← b₂'.total_repr y]\n[GOAL]\nι₁ : Type u_1\nι₂ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nS : Type u_5\nS₂ : Type u_6\nM : Type u_7\nN : Type u_8\nP : Type u_9\nMₗ : Type u_10\nNₗ : Type u_11\nPₗ : Type u_12\ninst✝¹⁷ : CommSemiring R\ninst✝¹⁶ : CommSemiring S\ninst✝¹⁵ : CommSemiring R₂\ninst✝¹⁴ : CommSemiring S₂\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Mₗ\ninst✝⁹ : AddCommMonoid Nₗ\ninst✝⁸ : AddCommMonoid Pₗ\ninst✝⁷ : Module R M\ninst✝⁶ : Module S N\ninst✝⁵ : Module R₂ P\ninst✝⁴ : Module S₂ P\ninst✝³ : Module R Mₗ\ninst✝² : Module R Nₗ\ninst✝¹ : Module R Pₗ\ninst✝ : SMulCommClass S₂ R₂ P\nρ₁₂ : R →+* R₂\nσ₁₂ : S →+* S₂\nb₁ : Basis ι₁ R M\nb₂ : Basis ι₂ S N\nb₁' : Basis ι₁ R Mₗ\nb₂' : Basis ι₂ R Nₗ\nB : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ\nx : Mₗ\ny : Nₗ\n| ↑(↑B x) y\n[PROOFSTEP]\nrw [← b₁'.total_repr x, ← b₂'.total_repr y]\n[GOAL]\nι₁ : Type u_1\nι₂ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nS : Type u_5\nS₂ : Type u_6\nM : Type u_7\nN : Type u_8\nP : Type u_9\nMₗ : Type u_10\nNₗ : Type u_11\nPₗ : Type u_12\ninst✝¹⁷ : CommSemiring R\ninst✝¹⁶ : CommSemiring S\ninst✝¹⁵ : CommSemiring R₂\ninst✝¹⁴ : CommSemiring S₂\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Mₗ\ninst✝⁹ : AddCommMonoid Nₗ\ninst✝⁸ : AddCommMonoid Pₗ\ninst✝⁷ : Module R M\ninst✝⁶ : Module S N\ninst✝⁵ : Module R₂ P\ninst✝⁴ : Module S₂ P\ninst✝³ : Module R Mₗ\ninst✝² : Module R Nₗ\ninst✝¹ : Module R Pₗ\ninst✝ : SMulCommClass S₂ R₂ P\nρ₁₂ : R →+* R₂\nσ₁₂ : S →+* S₂\nb₁ : Basis ι₁ R M\nb₂ : Basis ι₂ S N\nb₁' : Basis ι₁ R Mₗ\nb₂' : Basis ι₂ R Nₗ\nB : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ\nx : Mₗ\ny : Nₗ\n| ↑(↑B x) y\n[PROOFSTEP]\nrw [← b₁'.total_repr x, ← b₂'.total_repr y]\n[GOAL]\nι₁ : Type u_1\nι₂ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nS : Type u_5\nS₂ : Type u_6\nM : Type u_7\nN : Type u_8\nP : Type u_9\nMₗ : Type u_10\nNₗ : Type u_11\nPₗ : Type u_12\ninst✝¹⁷ : CommSemiring R\ninst✝¹⁶ : CommSemiring S\ninst✝¹⁵ : CommSemiring R₂\ninst✝¹⁴ : CommSemiring S₂\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Mₗ\ninst✝⁹ : AddCommMonoid Nₗ\ninst✝⁸ : AddCommMonoid Pₗ\ninst✝⁷ : Module R M\ninst✝⁶ : Module S N\ninst✝⁵ : Module R₂ P\ninst✝⁴ : Module S₂ P\ninst✝³ : Module R Mₗ\ninst✝² : Module R Nₗ\ninst✝¹ : Module R Pₗ\ninst✝ : SMulCommClass S₂ R₂ P\nρ₁₂ : R →+* R₂\nσ₁₂ : S →+* S₂\nb₁ : Basis ι₁ R M\nb₂ : Basis ι₂ S N\nb₁' : Basis ι₁ R Mₗ\nb₂' : Basis ι₂ R Nₗ\nB : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ\nx : Mₗ\ny : Nₗ\n| ↑(↑B x) y\n[PROOFSTEP]\nrw [← b₁'.total_repr x, ← b₂'.total_repr y]\n[GOAL]\nι₁ : Type u_1\nι₂ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nS : Type u_5\nS₂ : Type u_6\nM : Type u_7\nN : Type u_8\nP : Type u_9\nMₗ : Type u_10\nNₗ : Type u_11\nPₗ : Type u_12\ninst✝¹⁷ : CommSemiring R\ninst✝¹⁶ : CommSemiring S\ninst✝¹⁵ : CommSemiring R₂\ninst✝¹⁴ : CommSemiring S₂\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Mₗ\ninst✝⁹ : AddCommMonoid Nₗ\ninst✝⁸ : AddCommMonoid Pₗ\ninst✝⁷ : Module R M\ninst✝⁶ : Module S N\ninst✝⁵ : Module R₂ P\ninst✝⁴ : Module S₂ P\ninst✝³ : Module R Mₗ\ninst✝² : Module R Nₗ\ninst✝¹ : Module R Pₗ\ninst✝ : SMulCommClass S₂ R₂ P\nρ₁₂ : R →+* R₂\nσ₁₂ : S →+* S₂\nb₁ : Basis ι₁ R M\nb₂ : Basis ι₂ S N\nb₁' : Basis ι₁ R Mₗ\nb₂' : Basis ι₂ R Nₗ\nB : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ\nx : Mₗ\ny : Nₗ\n⊢ (Finsupp.sum (↑b₁'.repr x) fun i xi => Finsupp.sum (↑b₂'.repr y) fun j yj => xi • yj • ↑(↑B (↑b₁' i)) (↑b₂' j)) =\n    ↑(↑B (↑(Finsupp.total ι₁ Mₗ R ↑b₁') (↑b₁'.repr x))) (↑(Finsupp.total ι₂ Nₗ R ↑b₂') (↑b₂'.repr y))\n[PROOFSTEP]\nsimp_rw [Finsupp.total_apply, Finsupp.sum, map_sum₂, map_sum, LinearMap.map_smul₂, LinearMap.map_smul]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Basis.Bilinear", "llama_tokens": 5115, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7310585786300048, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.3826509363194102}}
{"text": "[GOAL]\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\n⊢ IsSemisimple R L ↔ ∀ (I : LieIdeal R L), IsLieAbelian { x // x ∈ ↑I } → I = ⊥\n[PROOFSTEP]\nrw [isSemisimple_iff_no_solvable_ideals]\n[GOAL]\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\n⊢ (∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → I = ⊥) ↔\n    ∀ (I : LieIdeal R L), IsLieAbelian { x // x ∈ ↑I } → I = ⊥\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\n⊢ (∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → I = ⊥) →\n    ∀ (I : LieIdeal R L), IsLieAbelian { x // x ∈ ↑I } → I = ⊥\n[PROOFSTEP]\nintro h₁ I h₂\n[GOAL]\ncase mpr\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\n⊢ (∀ (I : LieIdeal R L), IsLieAbelian { x // x ∈ ↑I } → I = ⊥) →\n    ∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → I = ⊥\n[PROOFSTEP]\nintro h₁ I h₂\n[GOAL]\ncase mp\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh₁ : ∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → I = ⊥\nI : LieIdeal R L\nh₂ : IsLieAbelian { x // x ∈ ↑I }\n⊢ I = ⊥\n[PROOFSTEP]\nhaveI : IsLieAbelian I := h₂\n[GOAL]\ncase mp\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh₁ : ∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → I = ⊥\nI : LieIdeal R L\nh₂ this : IsLieAbelian { x // x ∈ ↑I }\n⊢ I = ⊥\n[PROOFSTEP]\napply h₁\n[GOAL]\ncase mp.a\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh₁ : ∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → I = ⊥\nI : LieIdeal R L\nh₂ this : IsLieAbelian { x // x ∈ ↑I }\n⊢ IsSolvable R { x // x ∈ ↑I }\n[PROOFSTEP]\nexact LieAlgebra.ofAbelianIsSolvable R I\n[GOAL]\ncase mpr\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh₁ : ∀ (I : LieIdeal R L), IsLieAbelian { x // x ∈ ↑I } → I = ⊥\nI : LieIdeal R L\nh₂ : IsSolvable R { x // x ∈ ↑I }\n⊢ I = ⊥\n[PROOFSTEP]\nhaveI : IsSolvable R I := h₂\n[GOAL]\ncase mpr\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh₁ : ∀ (I : LieIdeal R L), IsLieAbelian { x // x ∈ ↑I } → I = ⊥\nI : LieIdeal R L\nh₂ this : IsSolvable R { x // x ∈ ↑I }\n⊢ I = ⊥\n[PROOFSTEP]\nrw [← abelian_of_solvable_ideal_eq_bot_iff]\n[GOAL]\ncase mpr\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh₁ : ∀ (I : LieIdeal R L), IsLieAbelian { x // x ∈ ↑I } → I = ⊥\nI : LieIdeal R L\nh₂ this : IsSolvable R { x // x ∈ ↑I }\n⊢ derivedAbelianOfIdeal I = ⊥\n[PROOFSTEP]\napply h₁\n[GOAL]\ncase mpr.a\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh₁ : ∀ (I : LieIdeal R L), IsLieAbelian { x // x ∈ ↑I } → I = ⊥\nI : LieIdeal R L\nh₂ this : IsSolvable R { x // x ∈ ↑I }\n⊢ IsLieAbelian { x // x ∈ ↑(derivedAbelianOfIdeal I) }\n[PROOFSTEP]\nexact abelian_derivedAbelianOfIdeal I\n[GOAL]\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh : IsSemisimple R L\n⊢ center R L = ⊥\n[PROOFSTEP]\nrw [isSemisimple_iff_no_abelian_ideals] at h \n[GOAL]\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh : ∀ (I : LieIdeal R L), IsLieAbelian { x // x ∈ ↑I } → I = ⊥\n⊢ center R L = ⊥\n[PROOFSTEP]\napply h\n[GOAL]\ncase a\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh : ∀ (I : LieIdeal R L), IsLieAbelian { x // x ∈ ↑I } → I = ⊥\n⊢ IsLieAbelian { x // x ∈ ↑(center R L) }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh : IsSimple R L\n⊢ IsSemisimple R L\n[PROOFSTEP]\nrw [isSemisimple_iff_no_abelian_ideals]\n[GOAL]\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh : IsSimple R L\n⊢ ∀ (I : LieIdeal R L), IsLieAbelian { x // x ∈ ↑I } → I = ⊥\n[PROOFSTEP]\nintro I hI\n[GOAL]\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh : IsSimple R L\nI : LieIdeal R L\nhI : IsLieAbelian { x // x ∈ ↑I }\n⊢ I = ⊥\n[PROOFSTEP]\nobtain @⟨⟨h₁⟩, h₂⟩ := id h\n[GOAL]\ncase mk.mk\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh : IsSimple R L\nI : LieIdeal R L\nhI : IsLieAbelian { x // x ∈ ↑I }\nh₂ : ¬IsLieAbelian L\nh₁ : ∀ (N : LieSubmodule R L L), N ≠ ⊥ → N = ⊤\n⊢ I = ⊥\n[PROOFSTEP]\nby_contra contra\n[GOAL]\ncase mk.mk\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh : IsSimple R L\nI : LieIdeal R L\nhI : IsLieAbelian { x // x ∈ ↑I }\nh₂ : ¬IsLieAbelian L\nh₁ : ∀ (N : LieSubmodule R L L), N ≠ ⊥ → N = ⊤\ncontra : ¬I = ⊥\n⊢ False\n[PROOFSTEP]\nrw [h₁ I contra, lie_abelian_iff_equiv_lie_abelian LieIdeal.topEquiv] at hI \n[GOAL]\ncase mk.mk\nR : Type u\nL : Type v\ninst✝² : CommRing R\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nh : IsSimple R L\nI : LieIdeal R L\nhI : IsLieAbelian L\nh₂ : ¬IsLieAbelian L\nh₁ : ∀ (N : LieSubmodule R L L), N ≠ ⊥ → N = ⊤\ncontra : ¬I = ⊥\n⊢ False\n[PROOFSTEP]\nexact h₂ hI\n[GOAL]\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsSemisimple R L\nh : IsLieAbelian L\n⊢ Subsingleton L\n[PROOFSTEP]\nrw [isLieAbelian_iff_center_eq_top R L, center_eq_bot_of_semisimple] at h \n[GOAL]\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsSemisimple R L\nh : ⊥ = ⊤\n⊢ Subsingleton L\n[PROOFSTEP]\nexact (LieSubmodule.subsingleton_iff R L L).mp (subsingleton_of_bot_eq_top h)\n[GOAL]\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsSemisimple R L\n⊢ IsLieAbelian { x // x ∈ ↑(radical R L) }\n[PROOFSTEP]\nrw [IsSemisimple.semisimple]\n[GOAL]\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsSemisimple R L\n⊢ IsLieAbelian { x // x ∈ ↑⊥ }\n[PROOFSTEP]\nexact isLieAbelian_bot R L\n[GOAL]\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsNoetherian R L\n⊢ IsLieAbelian { x // x ∈ ↑(radical R L) } ↔\n    ∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → IsLieAbelian { x // x ∈ ↑I }\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsNoetherian R L\n⊢ IsLieAbelian { x // x ∈ ↑(radical R L) } →\n    ∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → IsLieAbelian { x // x ∈ ↑I }\n[PROOFSTEP]\nrintro h₁ I h₂\n[GOAL]\ncase mp\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsNoetherian R L\nh₁ : IsLieAbelian { x // x ∈ ↑(radical R L) }\nI : LieIdeal R L\nh₂ : IsSolvable R { x // x ∈ ↑I }\n⊢ IsLieAbelian { x // x ∈ ↑I }\n[PROOFSTEP]\nrw [LieIdeal.solvable_iff_le_radical] at h₂ \n[GOAL]\ncase mp\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsNoetherian R L\nh₁ : IsLieAbelian { x // x ∈ ↑(radical R L) }\nI : LieIdeal R L\nh₂ : I ≤ radical R L\n⊢ IsLieAbelian { x // x ∈ ↑I }\n[PROOFSTEP]\nexact (LieIdeal.homOfLe_injective h₂).isLieAbelian h₁\n[GOAL]\ncase mpr\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsNoetherian R L\n⊢ (∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → IsLieAbelian { x // x ∈ ↑I }) →\n    IsLieAbelian { x // x ∈ ↑(radical R L) }\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsNoetherian R L\nh : ∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → IsLieAbelian { x // x ∈ ↑I }\n⊢ IsLieAbelian { x // x ∈ ↑(radical R L) }\n[PROOFSTEP]\napply h\n[GOAL]\ncase mpr.a\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsNoetherian R L\nh : ∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → IsLieAbelian { x // x ∈ ↑I }\n⊢ IsSolvable R { x // x ∈ ↑(radical R L) }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nL : Type v\ninst✝³ : CommRing R\ninst✝² : LieRing L\ninst✝¹ : LieAlgebra R L\ninst✝ : IsSemisimple R L\n⊢ LieHom.ker (ad R L) = ⊥\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.Semisimple", "llama_tokens": 4194, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646010190476, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.38249528960617923}}
{"text": "[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : Module 𝕜 E\ninst✝¹² : TopologicalSpace E\ninst✝¹¹ : TopologicalAddGroup E\ninst✝¹⁰ : ContinuousConstSMul 𝕜 E\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module 𝕜 F\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalAddGroup F\ninst✝⁵ : ContinuousConstSMul 𝕜 F\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module 𝕜 G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nh : 0 < n\n⊢ removeZero p n = p n\n[PROOFSTEP]\nrw [← Nat.succ_pred_eq_of_pos h]\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : Module 𝕜 E\ninst✝¹² : TopologicalSpace E\ninst✝¹¹ : TopologicalAddGroup E\ninst✝¹⁰ : ContinuousConstSMul 𝕜 E\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module 𝕜 F\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalAddGroup F\ninst✝⁵ : ContinuousConstSMul 𝕜 F\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module 𝕜 G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\nh : 0 < n\n⊢ removeZero p (Nat.succ (Nat.pred n)) = p (Nat.succ (Nat.pred n))\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : Module 𝕜 E\ninst✝¹² : TopologicalSpace E\ninst✝¹¹ : TopologicalAddGroup E\ninst✝¹⁰ : ContinuousConstSMul 𝕜 E\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module 𝕜 F\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalAddGroup F\ninst✝⁵ : ContinuousConstSMul 𝕜 F\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module 𝕜 G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nm n : ℕ\nv : Fin m → E\nw : Fin n → E\nh1 : m = n\nh2 : ∀ (i : ℕ) (him : i < m) (hin : i < n), v { val := i, isLt := him } = w { val := i, isLt := hin }\n⊢ ↑(p m) v = ↑(p n) w\n[PROOFSTEP]\nsubst n\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : Module 𝕜 E\ninst✝¹² : TopologicalSpace E\ninst✝¹¹ : TopologicalAddGroup E\ninst✝¹⁰ : ContinuousConstSMul 𝕜 E\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module 𝕜 F\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalAddGroup F\ninst✝⁵ : ContinuousConstSMul 𝕜 F\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module 𝕜 G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nm : ℕ\nv w : Fin m → E\nh2 : ∀ (i : ℕ) (him hin : i < m), v { val := i, isLt := him } = w { val := i, isLt := hin }\n⊢ ↑(p m) v = ↑(p m) w\n[PROOFSTEP]\ncongr with ⟨i, hi⟩\n[GOAL]\ncase h.e_6.h.h.mk\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝¹⁵ : CommRing 𝕜\ninst✝¹⁴ : AddCommGroup E\ninst✝¹³ : Module 𝕜 E\ninst✝¹² : TopologicalSpace E\ninst✝¹¹ : TopologicalAddGroup E\ninst✝¹⁰ : ContinuousConstSMul 𝕜 E\ninst✝⁹ : AddCommGroup F\ninst✝⁸ : Module 𝕜 F\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalAddGroup F\ninst✝⁵ : ContinuousConstSMul 𝕜 F\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module 𝕜 G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : ContinuousConstSMul 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nm : ℕ\nv w : Fin m → E\nh2 : ∀ (i : ℕ) (him hin : i < m), v { val := i, isLt := him } = w { val := i, isLt := hin }\ni : ℕ\nhi : i < m\n⊢ v { val := i, isLt := hi } = w { val := i, isLt := hi }\n[PROOFSTEP]\nexact h2 i hi hi\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝¹⁰ : CommRing 𝕜\nn : ℕ\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : Module 𝕜 E\ninst✝⁷ : TopologicalSpace E\ninst✝⁶ : TopologicalAddGroup E\ninst✝⁵ : ContinuousConstSMul 𝕜 E\ninst✝⁴ : AddCommGroup F\ninst✝³ : Module 𝕜 F\ninst✝² : TopologicalSpace F\ninst✝¹ : TopologicalAddGroup F\ninst✝ : ContinuousConstSMul 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\n⊢ order 0 = 0\n[PROOFSTEP]\nsimp [order]\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝¹⁰ : CommRing 𝕜\nn : ℕ\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : Module 𝕜 E\ninst✝⁷ : TopologicalSpace E\ninst✝⁶ : TopologicalAddGroup E\ninst✝⁵ : ContinuousConstSMul 𝕜 E\ninst✝⁴ : AddCommGroup F\ninst✝³ : Module 𝕜 F\ninst✝² : TopologicalSpace F\ninst✝¹ : TopologicalAddGroup F\ninst✝ : ContinuousConstSMul 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\nhp : order p ≠ 0\nh : p = 0\n⊢ False\n[PROOFSTEP]\nsimp [h] at hp \n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝¹¹ : CommRing 𝕜\nn : ℕ\ninst✝¹⁰ : AddCommGroup E\ninst✝⁹ : Module 𝕜 E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : TopologicalAddGroup E\ninst✝⁶ : ContinuousConstSMul 𝕜 E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : Module 𝕜 F\ninst✝³ : TopologicalSpace F\ninst✝² : TopologicalAddGroup F\ninst✝¹ : ContinuousConstSMul 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ninst✝ : DecidablePred fun n => p n ≠ 0\nhp : ∃ n, p n ≠ 0\n⊢ order p = Nat.find hp\n[PROOFSTEP]\nconvert Nat.sInf_def hp\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝¹⁰ : CommRing 𝕜\nn : ℕ\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : Module 𝕜 E\ninst✝⁷ : TopologicalSpace E\ninst✝⁶ : TopologicalAddGroup E\ninst✝⁵ : ContinuousConstSMul 𝕜 E\ninst✝⁴ : AddCommGroup F\ninst✝³ : Module 𝕜 F\ninst✝² : TopologicalSpace F\ninst✝¹ : TopologicalAddGroup F\ninst✝ : ContinuousConstSMul 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\n⊢ order p = 0 ↔ p = 0 ∨ p 0 ≠ 0\n[PROOFSTEP]\nsimpa [order, Nat.sInf_eq_zero, FormalMultilinearSeries.ext_iff, eq_empty_iff_forall_not_mem] using or_comm\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝¹⁰ : CommRing 𝕜\nn : ℕ\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : Module 𝕜 E\ninst✝⁷ : TopologicalSpace E\ninst✝⁶ : TopologicalAddGroup E\ninst✝⁵ : ContinuousConstSMul 𝕜 E\ninst✝⁴ : AddCommGroup F\ninst✝³ : Module 𝕜 F\ninst✝² : TopologicalSpace F\ninst✝¹ : TopologicalAddGroup F\ninst✝ : ContinuousConstSMul 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\nhp : p ≠ 0\n⊢ order p = 0 ↔ p 0 ≠ 0\n[PROOFSTEP]\nsimp [order_eq_zero_iff', hp]\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\ny : Fin n → 𝕜\n⊢ ↑(p n) y = (∏ i : Fin n, y i) • coeff p n\n[PROOFSTEP]\nconvert (p n).toMultilinearMap.map_smul_univ y 1\n[GOAL]\ncase h.e'_2.h.e'_1.h\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\ny : Fin n → 𝕜\nx✝ : Fin n\n⊢ y x✝ = y x✝ • OfNat.ofNat 1 x✝\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h.e'_2.h.e'_1.h\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\ny : Fin n → 𝕜\nx✝ : Fin n\n⊢ y x✝ = y x✝ • OfNat.ofNat 1 x✝\n[PROOFSTEP]\nsimp only [Pi.one_apply, Algebra.id.smul_eq_mul, mul_one]\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\ny : Fin n → 𝕜\n⊢ coeff p n = 0 ↔ p n = 0\n[PROOFSTEP]\nrw [← mkPiField_coeff_eq p, ContinuousMultilinearMap.mkPiField_eq_zero_iff]\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\ny : Fin n → 𝕜\n⊢ (↑(p n) fun x => z) = z ^ n • coeff p n\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\ny : Fin n → 𝕜\n⊢ ‖p n‖ = ‖coeff p n‖\n[PROOFSTEP]\nrw [← mkPiField_coeff_eq p, ContinuousMultilinearMap.norm_mkPiField]\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : FormalMultilinearSeries 𝕜 𝕜 E\nn : ℕ\n⊢ coeff (fslope p) n = coeff p (n + 1)\n[PROOFSTEP]\nsimp only [fslope, coeff, ContinuousMultilinearMap.curryLeft_apply]\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : FormalMultilinearSeries 𝕜 𝕜 E\nn : ℕ\n⊢ ↑(p (n + 1)) (cons 1 1) = ↑(p (n + 1)) 1\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e_6.h\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : FormalMultilinearSeries 𝕜 𝕜 E\nn : ℕ\n⊢ cons 1 1 = 1\n[PROOFSTEP]\nexact Fin.cons_self_tail 1\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : FormalMultilinearSeries 𝕜 𝕜 E\nn✝ k n : ℕ\n⊢ coeff (fslope^[k] p) n = coeff p (n + k)\n[PROOFSTEP]\ninduction k generalizing p with\n| zero => rfl\n| succ k ih => simp [ih, add_assoc]\n[GOAL]\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\np : FormalMultilinearSeries 𝕜 𝕜 E\nn✝ k n : ℕ\n⊢ coeff (fslope^[k] p) n = coeff p (n + k)\n[PROOFSTEP]\ninduction k generalizing p with\n| zero => rfl\n| succ k ih => simp [ih, add_assoc]\n[GOAL]\ncase zero\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ n : ℕ\np : FormalMultilinearSeries 𝕜 𝕜 E\n⊢ coeff (fslope^[Nat.zero] p) n = coeff p (n + Nat.zero)\n[PROOFSTEP]\n\n| zero => rfl\n[GOAL]\ncase zero\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ n : ℕ\np : FormalMultilinearSeries 𝕜 𝕜 E\n⊢ coeff (fslope^[Nat.zero] p) n = coeff p (n + Nat.zero)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ n k : ℕ\nih : ∀ {p : FormalMultilinearSeries 𝕜 𝕜 E}, coeff (fslope^[k] p) n = coeff p (n + k)\np : FormalMultilinearSeries 𝕜 𝕜 E\n⊢ coeff (fslope^[Nat.succ k] p) n = coeff p (n + Nat.succ k)\n[PROOFSTEP]\n\n| succ k ih => simp [ih, add_assoc]\n[GOAL]\ncase succ\n𝕜 : Type u\n𝕜' : Type u'\nE : Type v\nF : Type w\nG : Type x\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ n k : ℕ\nih : ∀ {p : FormalMultilinearSeries 𝕜 𝕜 E}, coeff (fslope^[k] p) n = coeff p (n + k)\np : FormalMultilinearSeries 𝕜 𝕜 E\n⊢ coeff (fslope^[Nat.succ k] p) n = coeff p (n + Nat.succ k)\n[PROOFSTEP]\nsimp [ih, add_assoc]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.FormalMultilinearSeries", "llama_tokens": 5280, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646010190476, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.38249528960617923}}
{"text": "[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : SMul M α\ninst✝³ : ContinuousConstSMul M α\ninst✝² : TopologicalSpace β\nf : β → M\ng : β → α\nb : β\ns : Set β\ninst✝¹ : SMul Mᵐᵒᵖ α\ninst✝ : IsCentralScalar M α\nc : M\n⊢ Continuous fun x => MulOpposite.op c • x\n[PROOFSTEP]\nsimpa only [op_smul_eq_smul] using continuous_const_smul c\n[GOAL]\nM : Type u_1\nα✝ : Type u_2\nβ✝ : Type u_3\ninst✝⁹ : TopologicalSpace α✝\ninst✝⁸ : Monoid M\ninst✝⁷ : MulAction M α✝\ninst✝⁶ : ContinuousConstSMul M α✝\nN : Type u_4\ninst✝⁵ : Monoid N\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : MulAction M α\ninst✝³ : MulAction N β\ninst✝² : TopologicalSpace β\ninst✝¹ : T2Space β\ninst✝ : ContinuousConstSMul N β\nσ : M → N\n⊢ IsClosed {f | ∀ (c : M) (x : α), f (c • x) = σ c • f x}\n[PROOFSTEP]\nsimp only [Set.setOf_forall]\n[GOAL]\nM : Type u_1\nα✝ : Type u_2\nβ✝ : Type u_3\ninst✝⁹ : TopologicalSpace α✝\ninst✝⁸ : Monoid M\ninst✝⁷ : MulAction M α✝\ninst✝⁶ : ContinuousConstSMul M α✝\nN : Type u_4\ninst✝⁵ : Monoid N\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : MulAction M α\ninst✝³ : MulAction N β\ninst✝² : TopologicalSpace β\ninst✝¹ : T2Space β\ninst✝ : ContinuousConstSMul N β\nσ : M → N\n⊢ IsClosed (⋂ (i : M) (i_1 : α), {x | x (i • i_1) = σ i • x i_1})\n[PROOFSTEP]\nexact\n  isClosed_iInter fun c => isClosed_iInter fun x => isClosed_eq (continuous_apply _) ((continuous_apply _).const_smul _)\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nG : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : Group G\ninst✝¹ : MulAction G α\ninst✝ : ContinuousConstSMul G α\nf : β → α\nl : Filter β\na : α\nc : G\nh : Tendsto (fun x => c • f x) l (𝓝 (c • a))\n⊢ Tendsto f l (𝓝 a)\n[PROOFSTEP]\nsimpa only [inv_smul_smul] using h.const_smul c⁻¹\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nG : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : ContinuousConstSMul G α\ninst✝ : TopologicalSpace β\nf : β → α\nb : β\ns : Set β\nc : G\n⊢ (Continuous fun x => c • f x) ↔ Continuous f\n[PROOFSTEP]\nsimp only [continuous_iff_continuousAt, continuousAt_const_smul_iff]\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nG : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : ContinuousConstSMul G α\ninst✝ : TopologicalSpace β\nf : β → α\nb : β\ns✝ : Set β\nc : G\ns : Set α\nhs : Dense s\n⊢ Dense (c • s)\n[PROOFSTEP]\nrw [dense_iff_closure_eq] at hs ⊢\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nG : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : ContinuousConstSMul G α\ninst✝ : TopologicalSpace β\nf : β → α\nb : β\ns✝ : Set β\nc : G\ns : Set α\nhs : closure s = univ\n⊢ closure (c • s) = univ\n[PROOFSTEP]\nrw [closure_smul, hs, smul_set_univ]\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nG₀ : Type u_4\ninst✝⁹ : TopologicalSpace α\ninst✝⁸ : GroupWithZero G₀\ninst✝⁷ : MulAction G₀ α\ninst✝⁶ : ContinuousConstSMul G₀ α\ninst✝⁵ : TopologicalSpace β\nf : β → α\nb : β\nc✝ : G₀\ns✝ : Set β\nE : Type u_5\ninst✝⁴ : Zero E\ninst✝³ : MulActionWithZero G₀ E\ninst✝² : TopologicalSpace E\ninst✝¹ : T1Space E\ninst✝ : ContinuousConstSMul G₀ E\nc : G₀\ns : Set E\n⊢ closure (c • s) = c • closure s\n[PROOFSTEP]\nrcases eq_or_ne c 0 with (rfl | hc)\n[GOAL]\ncase inl\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nG₀ : Type u_4\ninst✝⁹ : TopologicalSpace α\ninst✝⁸ : GroupWithZero G₀\ninst✝⁷ : MulAction G₀ α\ninst✝⁶ : ContinuousConstSMul G₀ α\ninst✝⁵ : TopologicalSpace β\nf : β → α\nb : β\nc : G₀\ns✝ : Set β\nE : Type u_5\ninst✝⁴ : Zero E\ninst✝³ : MulActionWithZero G₀ E\ninst✝² : TopologicalSpace E\ninst✝¹ : T1Space E\ninst✝ : ContinuousConstSMul G₀ E\ns : Set E\n⊢ closure (0 • s) = 0 • closure s\n[PROOFSTEP]\nrcases eq_empty_or_nonempty s with (rfl | hs)\n[GOAL]\ncase inl.inl\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nG₀ : Type u_4\ninst✝⁹ : TopologicalSpace α\ninst✝⁸ : GroupWithZero G₀\ninst✝⁷ : MulAction G₀ α\ninst✝⁶ : ContinuousConstSMul G₀ α\ninst✝⁵ : TopologicalSpace β\nf : β → α\nb : β\nc : G₀\ns : Set β\nE : Type u_5\ninst✝⁴ : Zero E\ninst✝³ : MulActionWithZero G₀ E\ninst✝² : TopologicalSpace E\ninst✝¹ : T1Space E\ninst✝ : ContinuousConstSMul G₀ E\n⊢ closure (0 • ∅) = 0 • closure ∅\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.inr\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nG₀ : Type u_4\ninst✝⁹ : TopologicalSpace α\ninst✝⁸ : GroupWithZero G₀\ninst✝⁷ : MulAction G₀ α\ninst✝⁶ : ContinuousConstSMul G₀ α\ninst✝⁵ : TopologicalSpace β\nf : β → α\nb : β\nc : G₀\ns✝ : Set β\nE : Type u_5\ninst✝⁴ : Zero E\ninst✝³ : MulActionWithZero G₀ E\ninst✝² : TopologicalSpace E\ninst✝¹ : T1Space E\ninst✝ : ContinuousConstSMul G₀ E\ns : Set E\nhs : Set.Nonempty s\n⊢ closure (0 • s) = 0 • closure s\n[PROOFSTEP]\nrw [zero_smul_set hs, zero_smul_set hs.closure]\n[GOAL]\ncase inl.inr\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nG₀ : Type u_4\ninst✝⁹ : TopologicalSpace α\ninst✝⁸ : GroupWithZero G₀\ninst✝⁷ : MulAction G₀ α\ninst✝⁶ : ContinuousConstSMul G₀ α\ninst✝⁵ : TopologicalSpace β\nf : β → α\nb : β\nc : G₀\ns✝ : Set β\nE : Type u_5\ninst✝⁴ : Zero E\ninst✝³ : MulActionWithZero G₀ E\ninst✝² : TopologicalSpace E\ninst✝¹ : T1Space E\ninst✝ : ContinuousConstSMul G₀ E\ns : Set E\nhs : Set.Nonempty s\n⊢ closure 0 = 0\n[PROOFSTEP]\nexact closure_singleton\n[GOAL]\ncase inr\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nG₀ : Type u_4\ninst✝⁹ : TopologicalSpace α\ninst✝⁸ : GroupWithZero G₀\ninst✝⁷ : MulAction G₀ α\ninst✝⁶ : ContinuousConstSMul G₀ α\ninst✝⁵ : TopologicalSpace β\nf : β → α\nb : β\nc✝ : G₀\ns✝ : Set β\nE : Type u_5\ninst✝⁴ : Zero E\ninst✝³ : MulActionWithZero G₀ E\ninst✝² : TopologicalSpace E\ninst✝¹ : T1Space E\ninst✝ : ContinuousConstSMul G₀ E\nc : G₀\ns : Set E\nhc : c ≠ 0\n⊢ closure (c • s) = c • closure s\n[PROOFSTEP]\nexact ((Homeomorph.smulOfNeZero c hc).image_closure s).symm\n[GOAL]\nM✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nG₀ : Type u_4\ninst✝¹⁰ : TopologicalSpace α\ninst✝⁹ : GroupWithZero G₀\ninst✝⁸ : MulAction G₀ α\ninst✝⁷ : ContinuousConstSMul G₀ α\ninst✝⁶ : TopologicalSpace β\nf : β → α\nb : β\nc✝ : G₀\ns : Set β\n𝕜 : Type u_5\nM : Type u_6\ninst✝⁵ : DivisionRing 𝕜\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\ninst✝² : T1Space M\ninst✝¹ : Module 𝕜 M\ninst✝ : ContinuousConstSMul 𝕜 M\nc : 𝕜\n⊢ IsClosedMap fun x => c • x\n[PROOFSTEP]\nrcases eq_or_ne c 0 with (rfl | hne)\n[GOAL]\ncase inl\nM✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nG₀ : Type u_4\ninst✝¹⁰ : TopologicalSpace α\ninst✝⁹ : GroupWithZero G₀\ninst✝⁸ : MulAction G₀ α\ninst✝⁷ : ContinuousConstSMul G₀ α\ninst✝⁶ : TopologicalSpace β\nf : β → α\nb : β\nc : G₀\ns : Set β\n𝕜 : Type u_5\nM : Type u_6\ninst✝⁵ : DivisionRing 𝕜\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\ninst✝² : T1Space M\ninst✝¹ : Module 𝕜 M\ninst✝ : ContinuousConstSMul 𝕜 M\n⊢ IsClosedMap fun x => 0 • x\n[PROOFSTEP]\nsimp only [zero_smul]\n[GOAL]\ncase inl\nM✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nG₀ : Type u_4\ninst✝¹⁰ : TopologicalSpace α\ninst✝⁹ : GroupWithZero G₀\ninst✝⁸ : MulAction G₀ α\ninst✝⁷ : ContinuousConstSMul G₀ α\ninst✝⁶ : TopologicalSpace β\nf : β → α\nb : β\nc : G₀\ns : Set β\n𝕜 : Type u_5\nM : Type u_6\ninst✝⁵ : DivisionRing 𝕜\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\ninst✝² : T1Space M\ninst✝¹ : Module 𝕜 M\ninst✝ : ContinuousConstSMul 𝕜 M\n⊢ IsClosedMap fun x => 0\n[PROOFSTEP]\nexact isClosedMap_const\n[GOAL]\ncase inr\nM✝ : Type u_1\nα : Type u_2\nβ : Type u_3\nG₀ : Type u_4\ninst✝¹⁰ : TopologicalSpace α\ninst✝⁹ : GroupWithZero G₀\ninst✝⁸ : MulAction G₀ α\ninst✝⁷ : ContinuousConstSMul G₀ α\ninst✝⁶ : TopologicalSpace β\nf : β → α\nb : β\nc✝ : G₀\ns : Set β\n𝕜 : Type u_5\nM : Type u_6\ninst✝⁵ : DivisionRing 𝕜\ninst✝⁴ : AddCommMonoid M\ninst✝³ : TopologicalSpace M\ninst✝² : T1Space M\ninst✝¹ : Module 𝕜 M\ninst✝ : ContinuousConstSMul 𝕜 M\nc : 𝕜\nhne : c ≠ 0\n⊢ IsClosedMap fun x => c • x\n[PROOFSTEP]\nexact (Homeomorph.smulOfNeZero c hne).isClosedMap\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝³ : Group Γ\nT : Type u_5\ninst✝² : TopologicalSpace T\ninst✝¹ : MulAction Γ T\ninst✝ : ContinuousConstSMul Γ T\nU : Set T\nhU : IsOpen U\n⊢ IsOpen (Quotient.mk' '' U)\n[PROOFSTEP]\nrw [isOpen_coinduced, MulAction.quotient_preimage_image_eq_union_mul U]\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝³ : Group Γ\nT : Type u_5\ninst✝² : TopologicalSpace T\ninst✝¹ : MulAction Γ T\ninst✝ : ContinuousConstSMul Γ T\nU : Set T\nhU : IsOpen U\n⊢ IsOpen (⋃ (g : Γ), (fun x x_1 => x • x_1) g '' U)\n[PROOFSTEP]\nexact isOpen_iUnion fun γ => isOpenMap_smul γ U hU\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\n⊢ T2Space (Quotient (MulAction.orbitRel Γ T))\n[PROOFSTEP]\nletI := MulAction.orbitRel Γ T\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\n⊢ T2Space (Quotient (MulAction.orbitRel Γ T))\n[PROOFSTEP]\nset Q := Quotient (MulAction.orbitRel Γ T)\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\n⊢ T2Space (Quotient (MulAction.orbitRel Γ T))\n[PROOFSTEP]\nrw [t2Space_iff_nhds]\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\n⊢ ∀ {x y : Quotient (MulAction.orbitRel Γ T)}, x ≠ y → ∃ U, U ∈ 𝓝 x ∧ ∃ V, V ∈ 𝓝 y ∧ Disjoint U V\n[PROOFSTEP]\nlet f : T → Q := Quotient.mk'\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\n⊢ ∀ {x y : Quotient (MulAction.orbitRel Γ T)}, x ≠ y → ∃ U, U ∈ 𝓝 x ∧ ∃ V, V ∈ 𝓝 y ∧ Disjoint U V\n[PROOFSTEP]\nhave f_op : IsOpenMap f := isOpenMap_quotient_mk'_mul\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\n⊢ ∀ {x y : Quotient (MulAction.orbitRel Γ T)}, x ≠ y → ∃ U, U ∈ 𝓝 x ∧ ∃ V, V ∈ 𝓝 y ∧ Disjoint U V\n[PROOFSTEP]\nrintro ⟨x₀⟩ ⟨y₀⟩ (hxy : f x₀ ≠ f y₀)\n[GOAL]\ncase mk.mk\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\n⊢ ∃ U, U ∈ 𝓝 (Quot.mk Setoid.r x₀) ∧ ∃ V, V ∈ 𝓝 (Quot.mk Setoid.r y₀) ∧ Disjoint U V\n[PROOFSTEP]\nshow ∃ U ∈ 𝓝 (f x₀), ∃ V ∈ 𝓝 (f y₀), _\n[GOAL]\ncase mk.mk\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nhave hγx₀y₀ : ∀ γ : Γ, γ • x₀ ≠ y₀ := not_exists.mp (mt Quotient.sound hxy.symm : _)\n[GOAL]\ncase mk.mk\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nobtain ⟨K₀, hK₀, K₀_in⟩ := exists_compact_mem_nhds x₀\n[GOAL]\ncase mk.mk.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nobtain ⟨L₀, hL₀, L₀_in⟩ := exists_compact_mem_nhds y₀\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nlet bad_Γ_set := {γ : Γ | (γ • ·) '' K₀ ∩ L₀ ≠ ∅}\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nhave bad_Γ_finite : bad_Γ_set.Finite := finite_disjoint_inter_image (Γ := Γ) hK₀ hL₀\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nchoose u v hu hv u_v_disjoint using fun γ => t2_separation_nhds (hγx₀y₀ γ)\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nlet U₀₀ := ⋂ γ ∈ bad_Γ_set, (γ • ·) ⁻¹' u γ\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nlet U₀ := U₀₀ ∩ K₀\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nlet V₀₀ := ⋂ γ ∈ bad_Γ_set, v γ\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\nV₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), v γ\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nlet V₀ := V₀₀ ∩ L₀\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\nV₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), v γ\nV₀ : Set T := V₀₀ ∩ L₀\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nhave U_nhds : f '' U₀ ∈ 𝓝 (f x₀) :=\n  by\n  refine f_op.image_mem_nhds (inter_mem ((biInter_mem bad_Γ_finite).mpr fun γ _ => ?_) K₀_in)\n  exact (continuous_const_smul _).continuousAt (hu γ)\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\nV₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), v γ\nV₀ : Set T := V₀₀ ∩ L₀\n⊢ f '' U₀ ∈ 𝓝 (f x₀)\n[PROOFSTEP]\nrefine f_op.image_mem_nhds (inter_mem ((biInter_mem bad_Γ_finite).mpr fun γ _ => ?_) K₀_in)\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝¹ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\nV₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), v γ\nV₀ : Set T := V₀₀ ∩ L₀\nγ : Γ\nx✝ : γ ∈ bad_Γ_set\n⊢ (fun x => γ • x) ⁻¹' u γ ∈ 𝓝 x₀\n[PROOFSTEP]\nexact (continuous_const_smul _).continuousAt (hu γ)\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\nV₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), v γ\nV₀ : Set T := V₀₀ ∩ L₀\nU_nhds : f '' U₀ ∈ 𝓝 (f x₀)\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nhave V_nhds : f '' V₀ ∈ 𝓝 (f y₀) :=\n  f_op.image_mem_nhds (inter_mem ((biInter_mem bad_Γ_finite).mpr fun γ _ => hv γ) L₀_in)\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\nV₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), v γ\nV₀ : Set T := V₀₀ ∩ L₀\nU_nhds : f '' U₀ ∈ 𝓝 (f x₀)\nV_nhds : f '' V₀ ∈ 𝓝 (f y₀)\n⊢ ∃ U, U ∈ 𝓝 (f x₀) ∧ ∃ V, V ∈ 𝓝 (f y₀) ∧ Disjoint U V\n[PROOFSTEP]\nrefine' ⟨f '' U₀, U_nhds, f '' V₀, V_nhds, MulAction.disjoint_image_image_iff.2 _⟩\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\nV₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), v γ\nV₀ : Set T := V₀₀ ∩ L₀\nU_nhds : f '' U₀ ∈ 𝓝 (f x₀)\nV_nhds : f '' V₀ ∈ 𝓝 (f y₀)\n⊢ ∀ (x : T), x ∈ U₀ → ∀ (g : Γ), ¬g • x ∈ V₀\n[PROOFSTEP]\nrintro x ⟨x_in_U₀₀, x_in_K₀⟩ γ\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\nV₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), v γ\nV₀ : Set T := V₀₀ ∩ L₀\nU_nhds : f '' U₀ ∈ 𝓝 (f x₀)\nV_nhds : f '' V₀ ∈ 𝓝 (f y₀)\nx : T\nx_in_U₀₀ : x ∈ U₀₀\nx_in_K₀ : x ∈ K₀\nγ : Γ\n⊢ ¬γ • x ∈ V₀\n[PROOFSTEP]\nby_cases H : γ ∈ bad_Γ_set\n[GOAL]\ncase pos\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\nV₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), v γ\nV₀ : Set T := V₀₀ ∩ L₀\nU_nhds : f '' U₀ ∈ 𝓝 (f x₀)\nV_nhds : f '' V₀ ∈ 𝓝 (f y₀)\nx : T\nx_in_U₀₀ : x ∈ U₀₀\nx_in_K₀ : x ∈ K₀\nγ : Γ\nH : γ ∈ bad_Γ_set\n⊢ ¬γ • x ∈ V₀\n[PROOFSTEP]\nexact fun h => (u_v_disjoint γ).le_bot ⟨mem_iInter₂.mp x_in_U₀₀ γ H, mem_iInter₂.mp h.1 γ H⟩\n[GOAL]\ncase neg\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\nV₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), v γ\nV₀ : Set T := V₀₀ ∩ L₀\nU_nhds : f '' U₀ ∈ 𝓝 (f x₀)\nV_nhds : f '' V₀ ∈ 𝓝 (f y₀)\nx : T\nx_in_U₀₀ : x ∈ U₀₀\nx_in_K₀ : x ∈ K₀\nγ : Γ\nH : ¬γ ∈ bad_Γ_set\n⊢ ¬γ • x ∈ V₀\n[PROOFSTEP]\nrintro ⟨-, h'⟩\n[GOAL]\ncase neg.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\nV₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), v γ\nV₀ : Set T := V₀₀ ∩ L₀\nU_nhds : f '' U₀ ∈ 𝓝 (f x₀)\nV_nhds : f '' V₀ ∈ 𝓝 (f y₀)\nx : T\nx_in_U₀₀ : x ∈ U₀₀\nx_in_K₀ : x ∈ K₀\nγ : Γ\nH : ¬γ ∈ bad_Γ_set\nh' : γ • x ∈ L₀\n⊢ False\n[PROOFSTEP]\nsimp only [image_smul, Classical.not_not, mem_setOf_eq, Ne.def] at H \n[GOAL]\ncase neg.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\ninst✝³ : T2Space T\ninst✝² : LocallyCompactSpace T\ninst✝¹ : ContinuousConstSMul Γ T\ninst✝ : ProperlyDiscontinuousSMul Γ T\nthis : Setoid T := MulAction.orbitRel Γ T\nQ : Type u_5 := Quotient (MulAction.orbitRel Γ T)\nf : T → Q := Quotient.mk'\nf_op : IsOpenMap f\nx✝ : Quotient (MulAction.orbitRel Γ T)\nx₀ : T\ny✝ : Quotient (MulAction.orbitRel Γ T)\ny₀ : T\nhxy : f x₀ ≠ f y₀\nhγx₀y₀ : ∀ (γ : Γ), γ • x₀ ≠ y₀\nK₀ : Set T\nhK₀ : IsCompact K₀\nK₀_in : K₀ ∈ 𝓝 x₀\nL₀ : Set T\nhL₀ : IsCompact L₀\nL₀_in : L₀ ∈ 𝓝 y₀\nbad_Γ_set : Set Γ := {γ | (fun x => γ • x) '' K₀ ∩ L₀ ≠ ∅}\nbad_Γ_finite : Set.Finite bad_Γ_set\nu v : Γ → Set T\nhu : ∀ (γ : Γ), u γ ∈ 𝓝 (γ • x₀)\nhv : ∀ (γ : Γ), v γ ∈ 𝓝 y₀\nu_v_disjoint : ∀ (γ : Γ), Disjoint (u γ) (v γ)\nU₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), (fun x => γ • x) ⁻¹' u γ\nU₀ : Set T := U₀₀ ∩ K₀\nV₀₀ : Set T := ⋂ (γ : Γ) (_ : γ ∈ bad_Γ_set), v γ\nV₀ : Set T := V₀₀ ∩ L₀\nU_nhds : f '' U₀ ∈ 𝓝 (f x₀)\nV_nhds : f '' V₀ ∈ 𝓝 (f y₀)\nx : T\nx_in_U₀₀ : x ∈ U₀₀\nx_in_K₀ : x ∈ K₀\nγ : Γ\nh' : γ • x ∈ L₀\nH : γ • K₀ ∩ L₀ = ∅\n⊢ False\n[PROOFSTEP]\nexact eq_empty_iff_forall_not_mem.mp H (γ • x) ⟨mem_image_of_mem _ x_in_K₀, h'⟩\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\nG₀ : Type u_6\ninst✝³ : GroupWithZero G₀\ninst✝² : MulAction G₀ α\ninst✝¹ : TopologicalSpace α\ninst✝ : ContinuousConstSMul G₀ α\nc : G₀\ns : Set α\nx : α\nhs : s ∈ 𝓝 x\nhc : c ≠ 0\n⊢ c • s ∈ 𝓝 (c • x)\n[PROOFSTEP]\nrw [mem_nhds_iff] at hs ⊢\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\nG₀ : Type u_6\ninst✝³ : GroupWithZero G₀\ninst✝² : MulAction G₀ α\ninst✝¹ : TopologicalSpace α\ninst✝ : ContinuousConstSMul G₀ α\nc : G₀\ns : Set α\nx : α\nhs : ∃ t, t ⊆ s ∧ IsOpen t ∧ x ∈ t\nhc : c ≠ 0\n⊢ ∃ t, t ⊆ c • s ∧ IsOpen t ∧ c • x ∈ t\n[PROOFSTEP]\nobtain ⟨U, hs', hU, hU'⟩ := hs\n[GOAL]\ncase intro.intro.intro\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\nG₀ : Type u_6\ninst✝³ : GroupWithZero G₀\ninst✝² : MulAction G₀ α\ninst✝¹ : TopologicalSpace α\ninst✝ : ContinuousConstSMul G₀ α\nc : G₀\ns : Set α\nx : α\nhc : c ≠ 0\nU : Set α\nhs' : U ⊆ s\nhU : IsOpen U\nhU' : x ∈ U\n⊢ ∃ t, t ⊆ c • s ∧ IsOpen t ∧ c • x ∈ t\n[PROOFSTEP]\nexact ⟨c • U, Set.smul_set_mono hs', hU.smul₀ hc, Set.smul_mem_smul_set hU'⟩\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\nG₀ : Type u_6\ninst✝³ : GroupWithZero G₀\ninst✝² : MulAction G₀ α\ninst✝¹ : TopologicalSpace α\ninst✝ : ContinuousConstSMul G₀ α\nc : G₀\ns : Set α\nx : α\nhc : c ≠ 0\n⊢ c • s ∈ 𝓝 (c • x) ↔ s ∈ 𝓝 x\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => set_smul_mem_nhds_smul h hc⟩\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\nG₀ : Type u_6\ninst✝³ : GroupWithZero G₀\ninst✝² : MulAction G₀ α\ninst✝¹ : TopologicalSpace α\ninst✝ : ContinuousConstSMul G₀ α\nc : G₀\ns : Set α\nx : α\nhc : c ≠ 0\nh : c • s ∈ 𝓝 (c • x)\n⊢ s ∈ 𝓝 x\n[PROOFSTEP]\nrw [← inv_smul_smul₀ hc x, ← inv_smul_smul₀ hc s]\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁶ : Group Γ\nT : Type u_5\ninst✝⁵ : TopologicalSpace T\ninst✝⁴ : MulAction Γ T\nG₀ : Type u_6\ninst✝³ : GroupWithZero G₀\ninst✝² : MulAction G₀ α\ninst✝¹ : TopologicalSpace α\ninst✝ : ContinuousConstSMul G₀ α\nc : G₀\ns : Set α\nx : α\nhc : c ≠ 0\nh : c • s ∈ 𝓝 (c • x)\n⊢ c⁻¹ • c • s ∈ 𝓝 (c⁻¹ • c • x)\n[PROOFSTEP]\nexact set_smul_mem_nhds_smul h (inv_ne_zero hc)\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁷ : Group Γ\nT : Type u_5\ninst✝⁶ : TopologicalSpace T\ninst✝⁵ : MulAction Γ T\nG₀ : Type u_6\ninst✝⁴ : GroupWithZero G₀\ninst✝³ : AddMonoid α\ninst✝² : DistribMulAction G₀ α\ninst✝¹ : TopologicalSpace α\ninst✝ : ContinuousConstSMul G₀ α\ns : Set α\nc : G₀\nhc : c ≠ 0\n⊢ c • s ∈ 𝓝 0 ↔ s ∈ 𝓝 0\n[PROOFSTEP]\nrefine' Iff.trans _ (set_smul_mem_nhds_smul_iff hc)\n[GOAL]\nM : Type u_1\nα : Type u_2\nβ : Type u_3\nΓ : Type u_4\ninst✝⁷ : Group Γ\nT : Type u_5\ninst✝⁶ : TopologicalSpace T\ninst✝⁵ : MulAction Γ T\nG₀ : Type u_6\ninst✝⁴ : GroupWithZero G₀\ninst✝³ : AddMonoid α\ninst✝² : DistribMulAction G₀ α\ninst✝¹ : TopologicalSpace α\ninst✝ : ContinuousConstSMul G₀ α\ns : Set α\nc : G₀\nhc : c ≠ 0\n⊢ c • s ∈ 𝓝 0 ↔ c • s ∈ 𝓝 (c • 0)\n[PROOFSTEP]\nrw [smul_zero]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.ConstMulAction", "llama_tokens": 20284, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646010190476, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.38249528960617923}}
{"text": "[GOAL]\nV : Type u\ninst✝¹ : Quiver V\nW : Type u₂\ninst✝ : Quiver W\nF G : Prefunctor V W\nh_obj : ∀ (X : V), F.obj X = G.obj X\nh_map : ∀ (X Y : V) (f : X ⟶ Y), F.map f = Eq.recOn (_ : G.obj Y = F.obj Y) (Eq.recOn (_ : G.obj X = F.obj X) (G.map f))\n⊢ F = G\n[PROOFSTEP]\ncases' F with F_obj _\n[GOAL]\ncase mk\nV : Type u\ninst✝¹ : Quiver V\nW : Type u₂\ninst✝ : Quiver W\nG : Prefunctor V W\nF_obj : V → W\nmap✝ : {X Y : V} → (X ⟶ Y) → (F_obj X ⟶ F_obj Y)\nh_obj : ∀ (X : V), { obj := F_obj, map := map✝ }.obj X = G.obj X\nh_map :\n  ∀ (X Y : V) (f : X ⟶ Y),\n    { obj := F_obj, map := map✝ }.map f =\n      Eq.recOn (_ : G.obj Y = { obj := F_obj, map := map✝ }.obj Y)\n        (Eq.recOn (_ : G.obj X = { obj := F_obj, map := map✝ }.obj X) (G.map f))\n⊢ { obj := F_obj, map := map✝ } = G\n[PROOFSTEP]\ncases' G with G_obj _\n[GOAL]\ncase mk.mk\nV : Type u\ninst✝¹ : Quiver V\nW : Type u₂\ninst✝ : Quiver W\nF_obj : V → W\nmap✝¹ : {X Y : V} → (X ⟶ Y) → (F_obj X ⟶ F_obj Y)\nG_obj : V → W\nmap✝ : {X Y : V} → (X ⟶ Y) → (G_obj X ⟶ G_obj Y)\nh_obj : ∀ (X : V), { obj := F_obj, map := map✝¹ }.obj X = { obj := G_obj, map := map✝ }.obj X\nh_map :\n  ∀ (X Y : V) (f : X ⟶ Y),\n    { obj := F_obj, map := map✝¹ }.map f =\n      Eq.recOn (_ : { obj := G_obj, map := map✝ }.obj Y = { obj := F_obj, map := map✝¹ }.obj Y)\n        (Eq.recOn (_ : { obj := G_obj, map := map✝ }.obj X = { obj := F_obj, map := map✝¹ }.obj X)\n          ({ obj := G_obj, map := map✝ }.map f))\n⊢ { obj := F_obj, map := map✝¹ } = { obj := G_obj, map := map✝ }\n[PROOFSTEP]\nobtain rfl : F_obj = G_obj := by\n  ext X\n  apply h_obj\n[GOAL]\nV : Type u\ninst✝¹ : Quiver V\nW : Type u₂\ninst✝ : Quiver W\nF_obj : V → W\nmap✝¹ : {X Y : V} → (X ⟶ Y) → (F_obj X ⟶ F_obj Y)\nG_obj : V → W\nmap✝ : {X Y : V} → (X ⟶ Y) → (G_obj X ⟶ G_obj Y)\nh_obj : ∀ (X : V), { obj := F_obj, map := map✝¹ }.obj X = { obj := G_obj, map := map✝ }.obj X\nh_map :\n  ∀ (X Y : V) (f : X ⟶ Y),\n    { obj := F_obj, map := map✝¹ }.map f =\n      Eq.recOn (_ : { obj := G_obj, map := map✝ }.obj Y = { obj := F_obj, map := map✝¹ }.obj Y)\n        (Eq.recOn (_ : { obj := G_obj, map := map✝ }.obj X = { obj := F_obj, map := map✝¹ }.obj X)\n          ({ obj := G_obj, map := map✝ }.map f))\n⊢ F_obj = G_obj\n[PROOFSTEP]\next X\n[GOAL]\ncase h\nV : Type u\ninst✝¹ : Quiver V\nW : Type u₂\ninst✝ : Quiver W\nF_obj : V → W\nmap✝¹ : {X Y : V} → (X ⟶ Y) → (F_obj X ⟶ F_obj Y)\nG_obj : V → W\nmap✝ : {X Y : V} → (X ⟶ Y) → (G_obj X ⟶ G_obj Y)\nh_obj : ∀ (X : V), { obj := F_obj, map := map✝¹ }.obj X = { obj := G_obj, map := map✝ }.obj X\nh_map :\n  ∀ (X Y : V) (f : X ⟶ Y),\n    { obj := F_obj, map := map✝¹ }.map f =\n      Eq.recOn (_ : { obj := G_obj, map := map✝ }.obj Y = { obj := F_obj, map := map✝¹ }.obj Y)\n        (Eq.recOn (_ : { obj := G_obj, map := map✝ }.obj X = { obj := F_obj, map := map✝¹ }.obj X)\n          ({ obj := G_obj, map := map✝ }.map f))\nX : V\n⊢ F_obj X = G_obj X\n[PROOFSTEP]\napply h_obj\n[GOAL]\ncase mk.mk\nV : Type u\ninst✝¹ : Quiver V\nW : Type u₂\ninst✝ : Quiver W\nF_obj : V → W\nmap✝¹ map✝ : {X Y : V} → (X ⟶ Y) → (F_obj X ⟶ F_obj Y)\nh_obj : ∀ (X : V), { obj := F_obj, map := map✝¹ }.obj X = { obj := F_obj, map := map✝ }.obj X\nh_map :\n  ∀ (X Y : V) (f : X ⟶ Y),\n    { obj := F_obj, map := map✝¹ }.map f =\n      Eq.recOn (_ : { obj := F_obj, map := map✝ }.obj Y = { obj := F_obj, map := map✝¹ }.obj Y)\n        (Eq.recOn (_ : { obj := F_obj, map := map✝ }.obj X = { obj := F_obj, map := map✝¹ }.obj X)\n          ({ obj := F_obj, map := map✝ }.map f))\n⊢ { obj := F_obj, map := map✝¹ } = { obj := F_obj, map := map✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_map\nV : Type u\ninst✝¹ : Quiver V\nW : Type u₂\ninst✝ : Quiver W\nF_obj : V → W\nmap✝¹ map✝ : {X Y : V} → (X ⟶ Y) → (F_obj X ⟶ F_obj Y)\nh_obj : ∀ (X : V), { obj := F_obj, map := map✝¹ }.obj X = { obj := F_obj, map := map✝ }.obj X\nh_map :\n  ∀ (X Y : V) (f : X ⟶ Y),\n    { obj := F_obj, map := map✝¹ }.map f =\n      Eq.recOn (_ : { obj := F_obj, map := map✝ }.obj Y = { obj := F_obj, map := map✝¹ }.obj Y)\n        (Eq.recOn (_ : { obj := F_obj, map := map✝ }.obj X = { obj := F_obj, map := map✝¹ }.obj X)\n          ({ obj := F_obj, map := map✝ }.map f))\n⊢ map✝¹ = map✝\n[PROOFSTEP]\nfunext X Y f\n[GOAL]\ncase mk.mk.e_map.h.h.h\nV : Type u\ninst✝¹ : Quiver V\nW : Type u₂\ninst✝ : Quiver W\nF_obj : V → W\nmap✝¹ map✝ : {X Y : V} → (X ⟶ Y) → (F_obj X ⟶ F_obj Y)\nh_obj : ∀ (X : V), { obj := F_obj, map := map✝¹ }.obj X = { obj := F_obj, map := map✝ }.obj X\nh_map :\n  ∀ (X Y : V) (f : X ⟶ Y),\n    { obj := F_obj, map := map✝¹ }.map f =\n      Eq.recOn (_ : { obj := F_obj, map := map✝ }.obj Y = { obj := F_obj, map := map✝¹ }.obj Y)\n        (Eq.recOn (_ : { obj := F_obj, map := map✝ }.obj X = { obj := F_obj, map := map✝¹ }.obj X)\n          ({ obj := F_obj, map := map✝ }.map f))\nX Y : V\nf : X ⟶ Y\n⊢ map✝¹ f = map✝ f\n[PROOFSTEP]\nsimpa using h_map X Y f\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Quiver.Basic", "llama_tokens": 2473, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757645879592641, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.38249528221409973}}
{"text": "[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\n⊢ t ∈ MvPolynomial.NewtonIdentities.pairs σ k ↔ card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\n[PROOFSTEP]\nsimp [pairs]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\n⊢ MvPolynomial.NewtonIdentities.pairMap σ t ≠ t\n[PROOFSTEP]\nrw [pairMap]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\n⊢ (if h : t.snd ∈ t.fst then (erase t.fst t.snd, t.snd) else (cons t.snd t.fst h, t.snd)) ≠ t\n[PROOFSTEP]\nsplit_ifs with h1\n[GOAL]\ncase pos\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh1 : t.snd ∈ t.fst\n⊢ (erase t.fst t.snd, t.snd) ≠ t\ncase neg\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh1 : ¬t.snd ∈ t.fst\n⊢ (cons t.snd t.fst h1, t.snd) ≠ t\n[PROOFSTEP]\nall_goals by_contra ht; rw [← ht] at h1 ; simp_all\n[GOAL]\ncase pos\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh1 : t.snd ∈ t.fst\n⊢ (erase t.fst t.snd, t.snd) ≠ t\n[PROOFSTEP]\nby_contra ht\n[GOAL]\ncase pos\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh1 : t.snd ∈ t.fst\nht : (erase t.fst t.snd, t.snd) = t\n⊢ False\n[PROOFSTEP]\nrw [← ht] at h1 \n[GOAL]\ncase pos\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh1 : (erase t.fst t.snd, t.snd).snd ∈ (erase t.fst t.snd, t.snd).fst\nht : (erase t.fst t.snd, t.snd) = t\n⊢ False\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase neg\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh1 : ¬t.snd ∈ t.fst\n⊢ (cons t.snd t.fst h1, t.snd) ≠ t\n[PROOFSTEP]\nby_contra ht\n[GOAL]\ncase neg\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh1 : ¬t.snd ∈ t.fst\nht : (cons t.snd t.fst h1, t.snd) = t\n⊢ False\n[PROOFSTEP]\nrw [← ht] at h1 \n[GOAL]\ncase neg\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh1✝ : ¬t.snd ∈ t.fst\nh1 : ¬(cons t.snd t.fst h1✝, t.snd).snd ∈ (cons t.snd t.fst h1✝, t.snd).fst\nht : (cons t.snd t.fst h1✝, t.snd) = t\n⊢ False\n[PROOFSTEP]\nsimp_all\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh : t.snd ∈ t.fst\n⊢ MvPolynomial.NewtonIdentities.pairMap σ t = (erase t.fst t.snd, t.snd)\n[PROOFSTEP]\nsimp [pairMap, h]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh : ¬t.snd ∈ t.fst\n⊢ MvPolynomial.NewtonIdentities.pairMap σ t = (cons t.snd t.fst h, t.snd)\n[PROOFSTEP]\nsimp [pairMap, h]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : t ∈ MvPolynomial.NewtonIdentities.pairs σ k\n⊢ MvPolynomial.NewtonIdentities.pairMap σ t ∈ MvPolynomial.NewtonIdentities.pairs σ k\n[PROOFSTEP]\nrw [mem_pairs] at h ⊢\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\n⊢ card (MvPolynomial.NewtonIdentities.pairMap σ t).fst ≤ k ∧\n    (card (MvPolynomial.NewtonIdentities.pairMap σ t).fst = k →\n      (MvPolynomial.NewtonIdentities.pairMap σ t).snd ∈ (MvPolynomial.NewtonIdentities.pairMap σ t).fst)\n[PROOFSTEP]\nrcases(em (t.snd ∈ t.fst)) with h1 | h1\n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh1 : t.snd ∈ t.fst\n⊢ card (MvPolynomial.NewtonIdentities.pairMap σ t).fst ≤ k ∧\n    (card (MvPolynomial.NewtonIdentities.pairMap σ t).fst = k →\n      (MvPolynomial.NewtonIdentities.pairMap σ t).snd ∈ (MvPolynomial.NewtonIdentities.pairMap σ t).fst)\n[PROOFSTEP]\nrw [pairMap_of_snd_mem_fst σ h1]\n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh1 : t.snd ∈ t.fst\n⊢ card (erase t.fst t.snd, t.snd).fst ≤ k ∧\n    (card (erase t.fst t.snd, t.snd).fst = k → (erase t.fst t.snd, t.snd).snd ∈ (erase t.fst t.snd, t.snd).fst)\n[PROOFSTEP]\nsimp only [h1, implies_true, and_true] at h \n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh1 : t.snd ∈ t.fst\nh : card t.fst ≤ k\n⊢ card (erase t.fst t.snd, t.snd).fst ≤ k ∧\n    (card (erase t.fst t.snd, t.snd).fst = k → (erase t.fst t.snd, t.snd).snd ∈ (erase t.fst t.snd, t.snd).fst)\n[PROOFSTEP]\nsimp only [card_erase_of_mem h1, tsub_le_iff_right, mem_erase, ne_eq, h1]\n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh1 : t.snd ∈ t.fst\nh : card t.fst ≤ k\n⊢ card t.fst ≤ k + 1 ∧ (card t.fst - 1 = k → False)\n[PROOFSTEP]\nrefine ⟨le_step h, ?_⟩\n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh1 : t.snd ∈ t.fst\nh : card t.fst ≤ k\n⊢ card t.fst - 1 = k → False\n[PROOFSTEP]\nby_contra h2\n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh1 : t.snd ∈ t.fst\nh : card t.fst ≤ k\nh2 : card t.fst - 1 = k\n⊢ False\n[PROOFSTEP]\nrw [← h2] at h \n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh1 : t.snd ∈ t.fst\nh : card t.fst ≤ card t.fst - 1\nh2 : card t.fst - 1 = k\n⊢ False\n[PROOFSTEP]\nexact not_le_of_lt (sub_lt (card_pos.mpr ⟨t.snd, h1⟩) zero_lt_one) h\n[GOAL]\ncase inr\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh1 : ¬t.snd ∈ t.fst\n⊢ card (MvPolynomial.NewtonIdentities.pairMap σ t).fst ≤ k ∧\n    (card (MvPolynomial.NewtonIdentities.pairMap σ t).fst = k →\n      (MvPolynomial.NewtonIdentities.pairMap σ t).snd ∈ (MvPolynomial.NewtonIdentities.pairMap σ t).fst)\n[PROOFSTEP]\nrw [pairMap_of_snd_nmem_fst σ h1]\n[GOAL]\ncase inr\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh1 : ¬t.snd ∈ t.fst\n⊢ card (cons t.snd t.fst h1, t.snd).fst ≤ k ∧\n    (card (cons t.snd t.fst h1, t.snd).fst = k → (cons t.snd t.fst h1, t.snd).snd ∈ (cons t.snd t.fst h1, t.snd).fst)\n[PROOFSTEP]\nsimp only [h1] at h \n[GOAL]\ncase inr\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh1 : ¬t.snd ∈ t.fst\nh : card t.fst ≤ k ∧ (card t.fst = k → False)\n⊢ card (cons t.snd t.fst h1, t.snd).fst ≤ k ∧\n    (card (cons t.snd t.fst h1, t.snd).fst = k → (cons t.snd t.fst h1, t.snd).snd ∈ (cons t.snd t.fst h1, t.snd).fst)\n[PROOFSTEP]\nsimp only [card_cons, mem_cons, true_or, implies_true, and_true]\n[GOAL]\ncase inr\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh1 : ¬t.snd ∈ t.fst\nh : card t.fst ≤ k ∧ (card t.fst = k → False)\n⊢ card t.fst + 1 ≤ k\n[PROOFSTEP]\nexact (le_iff_eq_or_lt.mp h.left).resolve_left h.right\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\n⊢ Function.Involutive (MvPolynomial.NewtonIdentities.pairMap σ)\n[PROOFSTEP]\nintro t\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\n⊢ MvPolynomial.NewtonIdentities.pairMap σ (MvPolynomial.NewtonIdentities.pairMap σ t) = t\n[PROOFSTEP]\nrw [pairMap, pairMap]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\n⊢ (if h :\n        (if h : t.snd ∈ t.fst then (erase t.fst t.snd, t.snd) else (cons t.snd t.fst h, t.snd)).snd ∈\n          (if h : t.snd ∈ t.fst then (erase t.fst t.snd, t.snd) else (cons t.snd t.fst h, t.snd)).fst then\n      (erase (if h : t.snd ∈ t.fst then (erase t.fst t.snd, t.snd) else (cons t.snd t.fst h, t.snd)).fst\n          (if h : t.snd ∈ t.fst then (erase t.fst t.snd, t.snd) else (cons t.snd t.fst h, t.snd)).snd,\n        (if h : t.snd ∈ t.fst then (erase t.fst t.snd, t.snd) else (cons t.snd t.fst h, t.snd)).snd)\n    else\n      (cons (if h : t.snd ∈ t.fst then (erase t.fst t.snd, t.snd) else (cons t.snd t.fst h, t.snd)).snd\n          (if h : t.snd ∈ t.fst then (erase t.fst t.snd, t.snd) else (cons t.snd t.fst h, t.snd)).fst h,\n        (if h : t.snd ∈ t.fst then (erase t.fst t.snd, t.snd) else (cons t.snd t.fst h, t.snd)).snd)) =\n    t\n[PROOFSTEP]\nsplit_ifs with h1 h2 h3\n[GOAL]\ncase pos\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh1 : t.snd ∈ t.fst\nh2 : (erase t.fst t.snd, t.snd).snd ∈ (erase t.fst t.snd, t.snd).fst\n⊢ (erase (erase t.fst t.snd, t.snd).fst (erase t.fst t.snd, t.snd).snd, (erase t.fst t.snd, t.snd).snd) = t\n[PROOFSTEP]\nsimp at h2 \n[GOAL]\ncase neg\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh1 : t.snd ∈ t.fst\nh2 : ¬(erase t.fst t.snd, t.snd).snd ∈ (erase t.fst t.snd, t.snd).fst\n⊢ (cons (erase t.fst t.snd, t.snd).snd (erase t.fst t.snd, t.snd).fst\n        (_ : ¬(erase t.fst t.snd, t.snd).snd ∈ (erase t.fst t.snd, t.snd).fst),\n      (erase t.fst t.snd, t.snd).snd) =\n    t\n[PROOFSTEP]\nsimp [insert_erase h1]\n[GOAL]\ncase pos\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh1 : ¬t.snd ∈ t.fst\nh3 : (cons t.snd t.fst h1, t.snd).snd ∈ (cons t.snd t.fst h1, t.snd).fst\n⊢ (erase (cons t.snd t.fst h1, t.snd).fst (cons t.snd t.fst h1, t.snd).snd, (cons t.snd t.fst h1, t.snd).snd) = t\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase neg\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nt : Finset σ × σ\nh1 : ¬t.snd ∈ t.fst\nh3 : ¬(cons t.snd t.fst h1, t.snd).snd ∈ (cons t.snd t.fst h1, t.snd).fst\n⊢ (cons (cons t.snd t.fst h1, t.snd).snd (cons t.snd t.fst h1, t.snd).fst\n        (_ : ¬(cons t.snd t.fst h1, t.snd).snd ∈ (cons t.snd t.fst h1, t.snd).fst),\n      (cons t.snd t.fst h1, t.snd).snd) =\n    t\n[PROOFSTEP]\nsimp at h3 \n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : t ∈ MvPolynomial.NewtonIdentities.pairs σ k\n⊢ MvPolynomial.NewtonIdentities.weight σ R k t +\n      MvPolynomial.NewtonIdentities.weight σ R k (MvPolynomial.NewtonIdentities.pairMap σ t) =\n    0\n[PROOFSTEP]\nrw [weight, weight]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : t ∈ MvPolynomial.NewtonIdentities.pairs σ k\n⊢ (-1) ^ card t.fst * ((∏ a in t.fst, X a) * X t.snd ^ (k - card t.fst)) +\n      (-1) ^ card (MvPolynomial.NewtonIdentities.pairMap σ t).fst *\n        ((∏ a in (MvPolynomial.NewtonIdentities.pairMap σ t).fst, X a) *\n          X (MvPolynomial.NewtonIdentities.pairMap σ t).snd ^\n            (k - card (MvPolynomial.NewtonIdentities.pairMap σ t).fst)) =\n    0\n[PROOFSTEP]\nrw [mem_pairs] at h \n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\n⊢ (-1) ^ card t.fst * ((∏ a in t.fst, X a) * X t.snd ^ (k - card t.fst)) +\n      (-1) ^ card (MvPolynomial.NewtonIdentities.pairMap σ t).fst *\n        ((∏ a in (MvPolynomial.NewtonIdentities.pairMap σ t).fst, X a) *\n          X (MvPolynomial.NewtonIdentities.pairMap σ t).snd ^\n            (k - card (MvPolynomial.NewtonIdentities.pairMap σ t).fst)) =\n    0\n[PROOFSTEP]\nhave h2 (n : ℕ) : -(-1 : MvPolynomial σ R) ^ n = (-1) ^ (n + 1) := by\n  rw [← neg_one_mul ((-1 : MvPolynomial σ R) ^ n), pow_add, pow_one, mul_comm]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nn : ℕ\n⊢ -(-1) ^ n = (-1) ^ (n + 1)\n[PROOFSTEP]\nrw [← neg_one_mul ((-1 : MvPolynomial σ R) ^ n), pow_add, pow_one, mul_comm]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\n⊢ (-1) ^ card t.fst * ((∏ a in t.fst, X a) * X t.snd ^ (k - card t.fst)) +\n      (-1) ^ card (MvPolynomial.NewtonIdentities.pairMap σ t).fst *\n        ((∏ a in (MvPolynomial.NewtonIdentities.pairMap σ t).fst, X a) *\n          X (MvPolynomial.NewtonIdentities.pairMap σ t).snd ^\n            (k - card (MvPolynomial.NewtonIdentities.pairMap σ t).fst)) =\n    0\n[PROOFSTEP]\nrcases(em (t.snd ∈ t.fst)) with h1 | h1\n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : t.snd ∈ t.fst\n⊢ (-1) ^ card t.fst * ((∏ a in t.fst, X a) * X t.snd ^ (k - card t.fst)) +\n      (-1) ^ card (MvPolynomial.NewtonIdentities.pairMap σ t).fst *\n        ((∏ a in (MvPolynomial.NewtonIdentities.pairMap σ t).fst, X a) *\n          X (MvPolynomial.NewtonIdentities.pairMap σ t).snd ^\n            (k - card (MvPolynomial.NewtonIdentities.pairMap σ t).fst)) =\n    0\n[PROOFSTEP]\nrw [pairMap_of_snd_mem_fst σ h1]\n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : t.snd ∈ t.fst\n⊢ (-1) ^ card t.fst * ((∏ a in t.fst, X a) * X t.snd ^ (k - card t.fst)) +\n      (-1) ^ card (erase t.fst t.snd, t.snd).fst *\n        ((∏ a in (erase t.fst t.snd, t.snd).fst, X a) *\n          X (erase t.fst t.snd, t.snd).snd ^ (k - card (erase t.fst t.snd, t.snd).fst)) =\n    0\n[PROOFSTEP]\nsimp only [← prod_erase_mul t.fst (fun j ↦ (X j : MvPolynomial σ R)) h1, mul_assoc (∏ a in erase t.fst t.snd, X a),\n  card_erase_of_mem h1]\n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : t.snd ∈ t.fst\n⊢ (-1) ^ card t.fst * ((∏ a in erase t.fst t.snd, X a) * (X t.snd * X t.snd ^ (k - card t.fst))) +\n      (-1) ^ (card t.fst - 1) * ((∏ a in erase t.fst t.snd, X a) * X t.snd ^ (k - (card t.fst - 1))) =\n    0\n[PROOFSTEP]\nnth_rewrite 1 [← pow_one (X t.snd)]\n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : t.snd ∈ t.fst\n⊢ (-1) ^ card t.fst * ((∏ a in erase t.fst t.snd, X a) * (X t.snd ^ 1 * X t.snd ^ (k - card t.fst))) +\n      (-1) ^ (card t.fst - 1) * ((∏ a in erase t.fst t.snd, X a) * X t.snd ^ (k - (card t.fst - 1))) =\n    0\n[PROOFSTEP]\nsimp only [← pow_add, add_comm]\n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : t.snd ∈ t.fst\n⊢ (-1) ^ card t.fst * ((∏ a in erase t.fst t.snd, X a) * X t.snd ^ (k - card t.fst + 1)) +\n      (-1) ^ (card t.fst - 1) * ((∏ a in erase t.fst t.snd, X a) * X t.snd ^ (k - (card t.fst - 1))) =\n    0\n[PROOFSTEP]\nhave h3 : 1 ≤ card t.fst := lt_iff_add_one_le.mp (card_pos.mpr ⟨t.snd, h1⟩)\n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : t.snd ∈ t.fst\nh3 : 1 ≤ card t.fst\n⊢ (-1) ^ card t.fst * ((∏ a in erase t.fst t.snd, X a) * X t.snd ^ (k - card t.fst + 1)) +\n      (-1) ^ (card t.fst - 1) * ((∏ a in erase t.fst t.snd, X a) * X t.snd ^ (k - (card t.fst - 1))) =\n    0\n[PROOFSTEP]\nrw [← tsub_tsub_assoc h.left h3, ← neg_neg ((-1 : MvPolynomial σ R) ^ (card t.fst - 1)), h2 (card t.fst - 1),\n  Nat.sub_add_cancel h3]\n[GOAL]\ncase inl\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : t.snd ∈ t.fst\nh3 : 1 ≤ card t.fst\n⊢ (-1) ^ card t.fst * ((∏ a in erase t.fst t.snd, X a) * X t.snd ^ (k - (card t.fst - 1))) +\n      -(-1) ^ card t.fst * ((∏ a in erase t.fst t.snd, X a) * X t.snd ^ (k - (card t.fst - 1))) =\n    0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : ¬t.snd ∈ t.fst\n⊢ (-1) ^ card t.fst * ((∏ a in t.fst, X a) * X t.snd ^ (k - card t.fst)) +\n      (-1) ^ card (MvPolynomial.NewtonIdentities.pairMap σ t).fst *\n        ((∏ a in (MvPolynomial.NewtonIdentities.pairMap σ t).fst, X a) *\n          X (MvPolynomial.NewtonIdentities.pairMap σ t).snd ^\n            (k - card (MvPolynomial.NewtonIdentities.pairMap σ t).fst)) =\n    0\n[PROOFSTEP]\nrw [pairMap_of_snd_nmem_fst σ h1]\n[GOAL]\ncase inr\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : ¬t.snd ∈ t.fst\n⊢ (-1) ^ card t.fst * ((∏ a in t.fst, X a) * X t.snd ^ (k - card t.fst)) +\n      (-1) ^ card (cons t.snd t.fst h1, t.snd).fst *\n        ((∏ a in (cons t.snd t.fst h1, t.snd).fst, X a) *\n          X (cons t.snd t.fst h1, t.snd).snd ^ (k - card (cons t.snd t.fst h1, t.snd).fst)) =\n    0\n[PROOFSTEP]\nsimp only [mul_comm, mul_assoc (∏ a in t.fst, X a), card_cons, prod_cons]\n[GOAL]\ncase inr\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : ¬t.snd ∈ t.fst\n⊢ (∏ a in t.fst, X a) * (X t.snd ^ (k - card t.fst) * (-1) ^ card t.fst) +\n      (∏ a in t.fst, X a) * (X t.snd * X t.snd ^ (k - (card t.fst + 1)) * (-1) ^ (card t.fst + 1)) =\n    0\n[PROOFSTEP]\nnth_rewrite 2 [← pow_one (X t.snd)]\n[GOAL]\ncase inr\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : ¬t.snd ∈ t.fst\n⊢ (∏ a in t.fst, X a) * (X t.snd ^ (k - card t.fst) * (-1) ^ card t.fst) +\n      (∏ a in t.fst, X a) * (X t.snd ^ 1 * X t.snd ^ (k - (card t.fst + 1)) * (-1) ^ (card t.fst + 1)) =\n    0\n[PROOFSTEP]\nsimp only [← pow_add, ← Nat.add_sub_assoc (Nat.lt_of_le_of_ne h.left (mt h.right h1)), add_comm]\n[GOAL]\ncase inr\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : ¬t.snd ∈ t.fst\n⊢ (∏ a in t.fst, X a) * (X t.snd ^ (k - card t.fst) * (-1) ^ card t.fst) +\n      (∏ a in t.fst, X a) * (X t.snd ^ (k + 1 - succ (card t.fst)) * (-1) ^ (card t.fst + 1)) =\n    0\n[PROOFSTEP]\nrw [← neg_neg ((-1 : MvPolynomial σ R) ^ card t.fst), h2]\n[GOAL]\ncase inr\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nt : Finset σ × σ\nh : card t.fst ≤ k ∧ (card t.fst = k → t.snd ∈ t.fst)\nh2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)\nh1 : ¬t.snd ∈ t.fst\n⊢ (∏ a in t.fst, X a) * (X t.snd ^ (k - card t.fst) * -(-1) ^ (card t.fst + 1)) +\n      (∏ a in t.fst, X a) * (X t.snd ^ (k + 1 - succ (card t.fst)) * (-1) ^ (card t.fst + 1)) =\n    0\n[PROOFSTEP]\nsimp\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\n⊢ ∑ t in filter (fun t => card t.fst = k) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n    ∑ A in powersetLen k univ, ∑ j in A, f (A, j)\n[PROOFSTEP]\napply sum_finset_product\n[GOAL]\ncase h\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\n⊢ ∀ (p : Finset σ × σ),\n    p ∈ filter (fun t => card t.fst = k) (MvPolynomial.NewtonIdentities.pairs σ k) ↔\n      p.fst ∈ powersetLen k univ ∧ p.snd ∈ p.fst\n[PROOFSTEP]\naesop\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ filter (fun a => a.fst < k) (antidiagonal k)\nf : Finset σ × σ → MvPolynomial σ R\n⊢ ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n    ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\n[PROOFSTEP]\napply sum_finset_product\n[GOAL]\ncase h\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ filter (fun a => a.fst < k) (antidiagonal k)\nf : Finset σ × σ → MvPolynomial σ R\n⊢ ∀ (p : Finset σ × σ),\n    p ∈ filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k) ↔\n      p.fst ∈ powersetLen a.fst univ ∧ p.snd ∈ univ\n[PROOFSTEP]\nsimp only [mem_filter, mem_powerset_len_univ_iff, mem_univ, and_true, and_iff_right_iff_imp]\n[GOAL]\ncase h\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ filter (fun a => a.fst < k) (antidiagonal k)\nf : Finset σ × σ → MvPolynomial σ R\n⊢ ∀ (p : Finset σ × σ), card p.fst = a.fst → p ∈ MvPolynomial.NewtonIdentities.pairs σ k\n[PROOFSTEP]\nrintro p hp\n[GOAL]\ncase h\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ filter (fun a => a.fst < k) (antidiagonal k)\nf : Finset σ × σ → MvPolynomial σ R\np : Finset σ × σ\nhp : card p.fst = a.fst\n⊢ p ∈ MvPolynomial.NewtonIdentities.pairs σ k\n[PROOFSTEP]\nhave : card p.fst ≤ k := by apply le_of_lt; aesop\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ filter (fun a => a.fst < k) (antidiagonal k)\nf : Finset σ × σ → MvPolynomial σ R\np : Finset σ × σ\nhp : card p.fst = a.fst\n⊢ card p.fst ≤ k\n[PROOFSTEP]\napply le_of_lt\n[GOAL]\ncase a\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ filter (fun a => a.fst < k) (antidiagonal k)\nf : Finset σ × σ → MvPolynomial σ R\np : Finset σ × σ\nhp : card p.fst = a.fst\n⊢ card p.fst < k\n[PROOFSTEP]\naesop\n[GOAL]\ncase h\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ filter (fun a => a.fst < k) (antidiagonal k)\nf : Finset σ × σ → MvPolynomial σ R\np : Finset σ × σ\nhp : card p.fst = a.fst\nthis : card p.fst ≤ k\n⊢ p ∈ MvPolynomial.NewtonIdentities.pairs σ k\n[PROOFSTEP]\naesop\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\n⊢ ∑ t in filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n    ∑ a in filter (fun a => a.fst < k) (antidiagonal k), ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\n[PROOFSTEP]\nhave equiv_i (a : ℕ × ℕ) (ha : a ∈ (antidiagonal k).filter (fun a ↦ a.fst < k)) :=\n  sum_filter_pairs_eq_sum_powersetLen_mem_filter_antidiagonal_sum σ R k a ha f\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\n⊢ ∑ t in filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n    ∑ a in filter (fun a => a.fst < k) (antidiagonal k), ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\n[PROOFSTEP]\nsimp only [← sum_congr rfl equiv_i]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\n⊢ ∑ t in filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n    ∑ x in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ t in filter (fun t => card t.fst = x.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t\n[PROOFSTEP]\nhave pdisj :\n  Set.PairwiseDisjoint ((antidiagonal k).filter (fun a ↦ a.fst < k))\n    (fun (a : ℕ × ℕ) ↦ (filter (fun t ↦ card t.fst = a.fst) (pairs σ k))) :=\n  by\n  simp only [Set.PairwiseDisjoint, Disjoint, pairs, filter_filter, ne_eq, le_eq_subset, bot_eq_empty]\n  intro x hx y hy xny s hs hs' a ha\n  simp only [mem_univ, forall_true_left, Prod.forall] at hs hs' \n  rw [ne_eq, antidiagonal_congr (mem_filter.mp hx).left (mem_filter.mp hy).left, ← (mem_filter.mp (hs ha)).right.right,\n    ← (mem_filter.mp (hs' ha)).right.right] at xny \n  exact (xny rfl).elim\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\n⊢ Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\n[PROOFSTEP]\nsimp only [Set.PairwiseDisjoint, Disjoint, pairs, filter_filter, ne_eq, le_eq_subset, bot_eq_empty]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\n⊢ Set.Pairwise (↑(filter (fun a => a.fst < k) (antidiagonal k)))\n    ((fun a b => ∀ ⦃x : Finset (Finset σ × σ)⦄, x ⊆ a → x ⊆ b → x ⊆ ∅) on fun a =>\n      filter (fun a_1 => (card a_1.fst ≤ k ∧ (card a_1.fst = k → a_1.snd ∈ a_1.fst)) ∧ card a_1.fst = a.fst) univ)\n[PROOFSTEP]\nintro x hx y hy xny s hs hs' a ha\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\nx : ℕ × ℕ\nhx : x ∈ ↑(filter (fun a => a.fst < k) (antidiagonal k))\ny : ℕ × ℕ\nhy : y ∈ ↑(filter (fun a => a.fst < k) (antidiagonal k))\nxny : x ≠ y\ns : Finset (Finset σ × σ)\nhs :\n  s ⊆\n    (fun a =>\n        filter (fun a_1 => (card a_1.fst ≤ k ∧ (card a_1.fst = k → a_1.snd ∈ a_1.fst)) ∧ card a_1.fst = a.fst) univ)\n      x\nhs' :\n  s ⊆\n    (fun a =>\n        filter (fun a_1 => (card a_1.fst ≤ k ∧ (card a_1.fst = k → a_1.snd ∈ a_1.fst)) ∧ card a_1.fst = a.fst) univ)\n      y\na : Finset σ × σ\nha : a ∈ s\n⊢ a ∈ ∅\n[PROOFSTEP]\nsimp only [mem_univ, forall_true_left, Prod.forall] at hs hs' \n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\nx : ℕ × ℕ\nhx : x ∈ ↑(filter (fun a => a.fst < k) (antidiagonal k))\ny : ℕ × ℕ\nhy : y ∈ ↑(filter (fun a => a.fst < k) (antidiagonal k))\nxny : x ≠ y\ns : Finset (Finset σ × σ)\nhs : s ⊆ filter (fun a => (card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst = x.fst) univ\nhs' : s ⊆ filter (fun a => (card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst = y.fst) univ\na : Finset σ × σ\nha : a ∈ s\n⊢ a ∈ ∅\n[PROOFSTEP]\nrw [ne_eq, antidiagonal_congr (mem_filter.mp hx).left (mem_filter.mp hy).left, ← (mem_filter.mp (hs ha)).right.right, ←\n  (mem_filter.mp (hs' ha)).right.right] at xny \n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\nx : ℕ × ℕ\nhx : x ∈ ↑(filter (fun a => a.fst < k) (antidiagonal k))\ny : ℕ × ℕ\nhy : y ∈ ↑(filter (fun a => a.fst < k) (antidiagonal k))\ns : Finset (Finset σ × σ)\nhs : s ⊆ filter (fun a => (card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst = x.fst) univ\nhs' : s ⊆ filter (fun a => (card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst = y.fst) univ\na : Finset σ × σ\nxny : ¬card a.fst = card a.fst\nha : a ∈ s\n⊢ a ∈ ∅\n[PROOFSTEP]\nexact (xny rfl).elim\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\n⊢ ∑ t in filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n    ∑ x in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ t in filter (fun t => card t.fst = x.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t\n[PROOFSTEP]\nhave hdisj :=\n  @sum_disjiUnion _ _ _ f _ ((antidiagonal k).filter (fun a ↦ a.fst < k))\n    (fun (a : ℕ × ℕ) ↦ (filter (fun t ↦ card t.fst = a.fst) (pairs σ k))) pdisj\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhdisj :\n  ∑ x in\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj,\n      f x =\n    ∑ i in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ x in filter (fun t => card t.fst = i.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f x\n⊢ ∑ t in filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n    ∑ x in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ t in filter (fun t => card t.fst = x.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t\n[PROOFSTEP]\nhave disj_equiv :\n  disjiUnion ((antidiagonal k).filter (fun a ↦ a.fst < k)) (fun a ↦ filter (fun t ↦ card t.fst = a.fst) (pairs σ k))\n      pdisj =\n    filter (fun t ↦ card t.fst < k) (pairs σ k) :=\n  by\n  ext a\n  rw [mem_disjiUnion, mem_filter]\n  refine' ⟨_, fun haf ↦ ⟨(card a.fst, k - card a.fst), _, _⟩⟩\n  · rintro ⟨n, hnk, ha⟩\n    have hnk' : n.fst ≤ k := by apply le_of_lt; aesop\n    aesop\n  · simp_all only [mem_antidiagonal, mem_filter, mem_pairs, disjiUnion_eq_biUnion, add_tsub_cancel_of_le]\n  · simp_all only [mem_antidiagonal, mem_filter, mem_pairs, disjiUnion_eq_biUnion, implies_true]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhdisj :\n  ∑ x in\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj,\n      f x =\n    ∑ i in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ x in filter (fun t => card t.fst = i.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f x\n⊢ disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n      (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj =\n    filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k)\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhdisj :\n  ∑ x in\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj,\n      f x =\n    ∑ i in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ x in filter (fun t => card t.fst = i.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f x\na : Finset σ × σ\n⊢ a ∈\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj ↔\n    a ∈ filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k)\n[PROOFSTEP]\nrw [mem_disjiUnion, mem_filter]\n[GOAL]\ncase a\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhdisj :\n  ∑ x in\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj,\n      f x =\n    ∑ i in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ x in filter (fun t => card t.fst = i.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f x\na : Finset σ × σ\n⊢ (∃ a_1,\n      a_1 ∈ filter (fun a => a.fst < k) (antidiagonal k) ∧\n        a ∈ filter (fun t => card t.fst = a_1.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) ↔\n    a ∈ MvPolynomial.NewtonIdentities.pairs σ k ∧ card a.fst < k\n[PROOFSTEP]\nrefine' ⟨_, fun haf ↦ ⟨(card a.fst, k - card a.fst), _, _⟩⟩\n[GOAL]\ncase a.refine'_1\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhdisj :\n  ∑ x in\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj,\n      f x =\n    ∑ i in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ x in filter (fun t => card t.fst = i.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f x\na : Finset σ × σ\n⊢ (∃ a_1,\n      a_1 ∈ filter (fun a => a.fst < k) (antidiagonal k) ∧\n        a ∈ filter (fun t => card t.fst = a_1.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) →\n    a ∈ MvPolynomial.NewtonIdentities.pairs σ k ∧ card a.fst < k\n[PROOFSTEP]\nrintro ⟨n, hnk, ha⟩\n[GOAL]\ncase a.refine'_1.intro.intro\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhdisj :\n  ∑ x in\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj,\n      f x =\n    ∑ i in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ x in filter (fun t => card t.fst = i.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f x\na : Finset σ × σ\nn : ℕ × ℕ\nhnk : n ∈ filter (fun a => a.fst < k) (antidiagonal k)\nha : a ∈ filter (fun t => card t.fst = n.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\n⊢ a ∈ MvPolynomial.NewtonIdentities.pairs σ k ∧ card a.fst < k\n[PROOFSTEP]\nhave hnk' : n.fst ≤ k := by apply le_of_lt; aesop\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhdisj :\n  ∑ x in\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj,\n      f x =\n    ∑ i in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ x in filter (fun t => card t.fst = i.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f x\na : Finset σ × σ\nn : ℕ × ℕ\nhnk : n ∈ filter (fun a => a.fst < k) (antidiagonal k)\nha : a ∈ filter (fun t => card t.fst = n.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\n⊢ n.fst ≤ k\n[PROOFSTEP]\napply le_of_lt\n[GOAL]\ncase a\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhdisj :\n  ∑ x in\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj,\n      f x =\n    ∑ i in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ x in filter (fun t => card t.fst = i.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f x\na : Finset σ × σ\nn : ℕ × ℕ\nhnk : n ∈ filter (fun a => a.fst < k) (antidiagonal k)\nha : a ∈ filter (fun t => card t.fst = n.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\n⊢ n.fst < k\n[PROOFSTEP]\naesop\n[GOAL]\ncase a.refine'_1.intro.intro\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhdisj :\n  ∑ x in\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj,\n      f x =\n    ∑ i in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ x in filter (fun t => card t.fst = i.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f x\na : Finset σ × σ\nn : ℕ × ℕ\nhnk : n ∈ filter (fun a => a.fst < k) (antidiagonal k)\nha : a ∈ filter (fun t => card t.fst = n.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhnk' : n.fst ≤ k\n⊢ a ∈ MvPolynomial.NewtonIdentities.pairs σ k ∧ card a.fst < k\n[PROOFSTEP]\naesop\n[GOAL]\ncase a.refine'_2\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhdisj :\n  ∑ x in\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj,\n      f x =\n    ∑ i in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ x in filter (fun t => card t.fst = i.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f x\na : Finset σ × σ\nhaf : a ∈ MvPolynomial.NewtonIdentities.pairs σ k ∧ card a.fst < k\n⊢ (card a.fst, k - card a.fst) ∈ filter (fun a => a.fst < k) (antidiagonal k)\n[PROOFSTEP]\nsimp_all only [mem_antidiagonal, mem_filter, mem_pairs, disjiUnion_eq_biUnion, add_tsub_cancel_of_le]\n[GOAL]\ncase a.refine'_3\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhdisj :\n  ∑ x in\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj,\n      f x =\n    ∑ i in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ x in filter (fun t => card t.fst = i.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f x\na : Finset σ × σ\nhaf : a ∈ MvPolynomial.NewtonIdentities.pairs σ k ∧ card a.fst < k\n⊢ a ∈ filter (fun t => card t.fst = (card a.fst, k - card a.fst).fst) (MvPolynomial.NewtonIdentities.pairs σ k)\n[PROOFSTEP]\nsimp_all only [mem_antidiagonal, mem_filter, mem_pairs, disjiUnion_eq_biUnion, implies_true]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nf : Finset σ × σ → MvPolynomial σ R\nequiv_i :\n  ∀ (a : ℕ × ℕ),\n    a ∈ filter (fun a => a.fst < k) (antidiagonal k) →\n      ∑ t in filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n        ∑ A in powersetLen a.fst univ, ∑ j : σ, f (A, j)\npdisj :\n  Set.PairwiseDisjoint ↑(filter (fun a => a.fst < k) (antidiagonal k)) fun a =>\n    filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)\nhdisj :\n  ∑ x in\n      disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n        (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj,\n      f x =\n    ∑ i in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ x in filter (fun t => card t.fst = i.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f x\ndisj_equiv :\n  disjiUnion (filter (fun a => a.fst < k) (antidiagonal k))\n      (fun a => filter (fun t => card t.fst = a.fst) (MvPolynomial.NewtonIdentities.pairs σ k)) pdisj =\n    filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k)\n⊢ ∑ t in filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k), f t =\n    ∑ x in filter (fun a => a.fst < k) (antidiagonal k),\n      ∑ t in filter (fun t => card t.fst = x.fst) (MvPolynomial.NewtonIdentities.pairs σ k), f t\n[PROOFSTEP]\nsimp only [← hdisj, disj_equiv]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\n⊢ Disjoint (filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k))\n    (filter (fun t => card t.fst = k) (MvPolynomial.NewtonIdentities.pairs σ k))\n[PROOFSTEP]\nrw [disjoint_filter]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\n⊢ ∀ (x : Finset σ × σ), x ∈ MvPolynomial.NewtonIdentities.pairs σ k → card x.fst < k → ¬card x.fst = k\n[PROOFSTEP]\nexact fun _ _ h1 h2 ↦ lt_irrefl _ (h2.symm.subst h1)\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\n⊢ disjUnion (filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k))\n      (filter (fun t => card t.fst = k) (MvPolynomial.NewtonIdentities.pairs σ k))\n      (_ :\n        Disjoint (filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k))\n          (filter (fun t => card t.fst = k) (MvPolynomial.NewtonIdentities.pairs σ k))) =\n    MvPolynomial.NewtonIdentities.pairs σ k\n[PROOFSTEP]\nsimp only [disjUnion_eq_union, Finset.ext_iff, pairs, filter_filter, mem_filter]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\n⊢ ∀ (a : Finset σ × σ),\n    a ∈\n        filter (fun a => (card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst < k) univ ∪\n          filter (fun a => (card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst = k) univ ↔\n      a ∈ univ ∧ card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)\n[PROOFSTEP]\nintro a\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : Finset σ × σ\n⊢ a ∈\n      filter (fun a => (card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst < k) univ ∪\n        filter (fun a => (card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst = k) univ ↔\n    a ∈ univ ∧ card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)\n[PROOFSTEP]\nrw [← filter_or, mem_filter]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : Finset σ × σ\n⊢ a ∈ univ ∧\n      ((card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst < k ∨\n        (card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst = k) ↔\n    a ∈ univ ∧ card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)\n[PROOFSTEP]\nrefine' ⟨fun ha ↦ by tauto, fun ha ↦ _⟩\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : Finset σ × σ\nha :\n  a ∈ univ ∧\n    ((card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst < k ∨\n      (card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst = k)\n⊢ a ∈ univ ∧ card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)\n[PROOFSTEP]\ntauto\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : Finset σ × σ\nha : a ∈ univ ∧ card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)\n⊢ a ∈ univ ∧\n    ((card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst < k ∨\n      (card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst = k)\n[PROOFSTEP]\nhave hacard := le_iff_lt_or_eq.mp ha.2.1\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : Finset σ × σ\nha : a ∈ univ ∧ card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)\nhacard : card a.fst < k ∨ card a.fst = k\n⊢ a ∈ univ ∧\n    ((card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst < k ∨\n      (card a.fst ≤ k ∧ (card a.fst = k → a.snd ∈ a.fst)) ∧ card a.fst = k)\n[PROOFSTEP]\ntauto\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nA : Finset σ\nh : A ∈ powersetLen k univ\n⊢ ∑ j in A, MvPolynomial.NewtonIdentities.weight σ R k (A, j) = ↑k * (-1) ^ k * ∏ i in A, X i\n[PROOFSTEP]\nsimp [weight, mem_powerset_len_univ_iff.mp h, mul_assoc]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\n⊢ ↑k * esymm σ R k =\n    (-1) ^ k *\n      ∑ t in filter (fun t => card t.fst = k) (MvPolynomial.NewtonIdentities.pairs σ k),\n        MvPolynomial.NewtonIdentities.weight σ R k t\n[PROOFSTEP]\nrw [esymm, sum_filter_pairs_eq_sum_powersetLen_sum σ R k (fun t ↦ weight σ R k t),\n  sum_congr rfl (esymm_summand_to_weight σ R k), mul_comm (k : MvPolynomial σ R) ((-1) ^ k), ← mul_sum, ← mul_assoc, ←\n  mul_assoc, ← pow_add, Even.neg_one_pow ⟨k, rfl⟩, one_mul]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ antidiagonal k\n⊢ ∑ A in powersetLen a.fst univ, ∑ j : σ, MvPolynomial.NewtonIdentities.weight σ R k (A, j) =\n    (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\n[PROOFSTEP]\nsimp only [esymm, psum_def, weight, ← mul_assoc, mul_sum]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ antidiagonal k\n⊢ ∑ x in powersetLen a.fst univ, ∑ x_1 : σ, ((-1) ^ card x * ∏ a in x, X a) * X x_1 ^ (k - card x) =\n    ∑ x : σ, (∑ x in powersetLen a.fst univ, (-1) ^ a.fst * ∏ a in x, X a) * X x ^ a.snd\n[PROOFSTEP]\nrw [sum_comm]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ antidiagonal k\n⊢ ∑ y : σ, ∑ x in powersetLen a.fst univ, ((-1) ^ card x * ∏ a in x, X a) * X y ^ (k - card x) =\n    ∑ x : σ, (∑ x in powersetLen a.fst univ, (-1) ^ a.fst * ∏ a in x, X a) * X x ^ a.snd\n[PROOFSTEP]\nrefine' sum_congr rfl fun x _ ↦ _\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ antidiagonal k\nx : σ\nx✝ : x ∈ univ\n⊢ ∑ x_1 in powersetLen a.fst univ, ((-1) ^ card x_1 * ∏ a in x_1, X a) * X x ^ (k - card x_1) =\n    (∑ x in powersetLen a.fst univ, (-1) ^ a.fst * ∏ a in x, X a) * X x ^ a.snd\n[PROOFSTEP]\nrw [sum_mul]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ antidiagonal k\nx : σ\nx✝ : x ∈ univ\n⊢ ∑ x_1 in powersetLen a.fst univ, ((-1) ^ card x_1 * ∏ a in x_1, X a) * X x ^ (k - card x_1) =\n    ∑ x_1 in powersetLen a.fst univ, ((-1) ^ a.fst * ∏ a in x_1, X a) * X x ^ a.snd\n[PROOFSTEP]\nrefine' sum_congr rfl fun s hs ↦ _\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\na : ℕ × ℕ\nha : a ∈ antidiagonal k\nx : σ\nx✝ : x ∈ univ\ns : Finset σ\nhs : s ∈ powersetLen a.fst univ\n⊢ ((-1) ^ card s * ∏ a in s, X a) * X x ^ (k - card s) = ((-1) ^ a.fst * ∏ a in s, X a) * X x ^ a.snd\n[PROOFSTEP]\nrw [mem_powerset_len_univ_iff.mp hs, ← mem_antidiagonal.mp ha, add_sub_self_left]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\n⊢ ∑ a in filter (fun a => a.fst < k) (antidiagonal k), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    ∑ t in filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k),\n      MvPolynomial.NewtonIdentities.weight σ R k t\n[PROOFSTEP]\nrw [← sum_congr rfl (fun a ha ↦ esymm_mul_psum_summand_to_weight σ R k a (mem_filter.mp ha).left),\n  sum_filter_pairs_eq_sum_filter_antidiagonal_powersetLen_sum σ R k]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\n⊢ ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun a => a.fst < k) (antidiagonal k), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\n[PROOFSTEP]\nrw [NewtonIdentities.esymm_to_weight σ R k, NewtonIdentities.esymm_mul_psum_to_weight σ R k, eq_comm, ← sub_eq_zero,\n  sub_eq_add_neg, neg_mul_eq_neg_mul, neg_eq_neg_one_mul ((-1 : MvPolynomial σ R) ^ k)]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\n⊢ (-1) ^ (k + 1) *\n        ∑ t in filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k),\n          MvPolynomial.NewtonIdentities.weight σ R k t +\n      -1 * (-1) ^ k *\n        ∑ t in filter (fun t => card t.fst = k) (MvPolynomial.NewtonIdentities.pairs σ k),\n          MvPolynomial.NewtonIdentities.weight σ R k t =\n    0\n[PROOFSTEP]\nnth_rw 2 [← pow_one (-1 : MvPolynomial σ R)]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\n⊢ (-1) ^ (k + 1) *\n        ∑ t in filter (fun t => card t.fst < k) (MvPolynomial.NewtonIdentities.pairs σ k),\n          MvPolynomial.NewtonIdentities.weight σ R k t +\n      (-1) ^ 1 * (-1) ^ k *\n        ∑ t in filter (fun t => card t.fst = k) (MvPolynomial.NewtonIdentities.pairs σ k),\n          MvPolynomial.NewtonIdentities.weight σ R k t =\n    0\n[PROOFSTEP]\nrw [← pow_add, add_comm 1 k, ← left_distrib, ←\n  sum_disjUnion (NewtonIdentities.disjoint_filter_pairs_lt_filter_pairs_eq σ k),\n  NewtonIdentities.disjUnion_filter_pairs_eq_pairs σ k, NewtonIdentities.weight_sum σ R k,\n  neg_one_pow_mul_eq_zero_iff.mpr rfl]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\n⊢ ∑ a in antidiagonal (Fintype.card σ), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd = 0\n[PROOFSTEP]\nlet k := Fintype.card σ\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ := Fintype.card σ\n⊢ ∑ a in antidiagonal (Fintype.card σ), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd = 0\n[PROOFSTEP]\nsuffices :\n  (-1 : MvPolynomial σ R) ^ (k + 1) * ∑ a in antidiagonal k, (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd = 0\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ := Fintype.card σ\nthis : (-1) ^ (k + 1) * ∑ a in antidiagonal k, (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd = 0\n⊢ ∑ a in antidiagonal (Fintype.card σ), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd = 0\n[PROOFSTEP]\nsimpa using this\n[GOAL]\ncase this\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ := Fintype.card σ\n⊢ (-1) ^ (k + 1) * ∑ a in antidiagonal k, (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd = 0\n[PROOFSTEP]\nsimp [← sum_filter_add_sum_filter_not (antidiagonal k) (fun a ↦ a.fst < k), ← mul_esymm_eq_sum, mul_add, ← mul_assoc, ←\n  pow_add, mul_comm ↑k (esymm σ R k)]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\n⊢ psum σ R k =\n    (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ a in filter (fun a => a.fst ∈ Set.Ioo 0 k) (antidiagonal k), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\n[PROOFSTEP]\nsimp only [Set.Ioo, Set.mem_setOf_eq, and_comm]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\n⊢ psum σ R k =\n    (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ x in filter (fun a => a.fst < k ∧ 0 < a.fst) (antidiagonal k), (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd\n[PROOFSTEP]\nhave hesymm := mul_esymm_eq_sum σ R k\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun a => a.fst < k) (antidiagonal k), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\n⊢ psum σ R k =\n    (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ x in filter (fun a => a.fst < k ∧ 0 < a.fst) (antidiagonal k), (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd\n[PROOFSTEP]\nrw [←\n  (sum_filter_add_sum_filter_not ((antidiagonal k).filter (fun a ↦ a.fst < k)) (fun a ↦ 0 < a.fst)\n    (fun a ↦ (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd))] at\n  hesymm \n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\n⊢ psum σ R k =\n    (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ x in filter (fun a => a.fst < k ∧ 0 < a.fst) (antidiagonal k), (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd\n[PROOFSTEP]\nhave sub_both_sides :=\n  congrArg\n    (· -\n      (-1 : MvPolynomial σ R) ^ (k + 1) *\n        ∑ a in ((antidiagonal k).filter (fun a ↦ a.fst < k)).filter (fun a ↦ 0 < a.fst),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd)\n    hesymm\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides :\n  (fun x =>\n        x -\n          (-1) ^ (k + 1) *\n            ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n              (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd)\n      (↑k * esymm σ R k) =\n    (fun x =>\n        x -\n          (-1) ^ (k + 1) *\n            ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n              (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd)\n      ((-1) ^ (k + 1) *\n        (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n            (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n          ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n            (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd))\n⊢ psum σ R k =\n    (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ x in filter (fun a => a.fst < k ∧ 0 < a.fst) (antidiagonal k), (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd\n[PROOFSTEP]\nsimp only [left_distrib, add_sub_cancel'] at sub_both_sides \n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides :\n  ↑k * esymm σ R k -\n      (-1) ^ (k + 1) *\n        ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\n⊢ psum σ R k =\n    (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ x in filter (fun a => a.fst < k ∧ 0 < a.fst) (antidiagonal k), (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd\n[PROOFSTEP]\nhave sub_both_sides := congrArg ((-1 : MvPolynomial σ R) ^ (k + 1) * ·) sub_both_sides\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides✝ :\n  ↑k * esymm σ R k -\n      (-1) ^ (k + 1) *\n        ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\nsub_both_sides :\n  (fun x => (-1) ^ (k + 1) * x)\n      (↑k * esymm σ R k -\n        (-1) ^ (k + 1) *\n          ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n            (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd) =\n    (fun x => (-1) ^ (k + 1) * x)\n      ((-1) ^ (k + 1) *\n        ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd)\n⊢ psum σ R k =\n    (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ x in filter (fun a => a.fst < k ∧ 0 < a.fst) (antidiagonal k), (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd\n[PROOFSTEP]\nsimp only [mul_sub_left_distrib, ← mul_assoc, ← pow_add, Even.neg_one_pow ⟨k + 1, rfl⟩, one_mul, not_le, lt_one_iff,\n  filter_filter (fun a : ℕ × ℕ ↦ a.fst < k) (fun a ↦ ¬0 < a.fst)] at sub_both_sides \n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides✝ :\n  ↑k * esymm σ R k -\n      (-1) ^ (k + 1) *\n        ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\nsub_both_sides :\n  (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    ∑ a in filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\n⊢ psum σ R k =\n    (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ x in filter (fun a => a.fst < k ∧ 0 < a.fst) (antidiagonal k), (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd\n[PROOFSTEP]\nhave : filter (fun a ↦ a.fst < k ∧ ¬0 < a.fst) (antidiagonal k) = {(0, k)} :=\n  by\n  ext a\n  rw [mem_filter, mem_antidiagonal, mem_singleton]\n  refine' ⟨_, fun ha ↦ by aesop⟩\n  rintro ⟨ha, ⟨_, ha0⟩⟩\n  rw [← ha, Nat.eq_zero_of_nonpos a.fst ha0, zero_add, ← Nat.eq_zero_of_nonpos a.fst ha0]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides✝ :\n  ↑k * esymm σ R k -\n      (-1) ^ (k + 1) *\n        ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\nsub_both_sides :\n  (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    ∑ a in filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\n⊢ filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k) = {(0, k)}\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides✝ :\n  ↑k * esymm σ R k -\n      (-1) ^ (k + 1) *\n        ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\nsub_both_sides :\n  (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    ∑ a in filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\na : ℕ × ℕ\n⊢ a ∈ filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k) ↔ a ∈ {(0, k)}\n[PROOFSTEP]\nrw [mem_filter, mem_antidiagonal, mem_singleton]\n[GOAL]\ncase a\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides✝ :\n  ↑k * esymm σ R k -\n      (-1) ^ (k + 1) *\n        ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\nsub_both_sides :\n  (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    ∑ a in filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\na : ℕ × ℕ\n⊢ a.fst + a.snd = k ∧ a.fst < k ∧ ¬0 < a.fst ↔ a = (0, k)\n[PROOFSTEP]\nrefine' ⟨_, fun ha ↦ by aesop⟩\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides✝ :\n  ↑k * esymm σ R k -\n      (-1) ^ (k + 1) *\n        ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\nsub_both_sides :\n  (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    ∑ a in filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\na : ℕ × ℕ\nha : a = (0, k)\n⊢ a.fst + a.snd = k ∧ a.fst < k ∧ ¬0 < a.fst\n[PROOFSTEP]\naesop\n[GOAL]\ncase a\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides✝ :\n  ↑k * esymm σ R k -\n      (-1) ^ (k + 1) *\n        ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\nsub_both_sides :\n  (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    ∑ a in filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\na : ℕ × ℕ\n⊢ a.fst + a.snd = k ∧ a.fst < k ∧ ¬0 < a.fst → a = (0, k)\n[PROOFSTEP]\nrintro ⟨ha, ⟨_, ha0⟩⟩\n[GOAL]\ncase a.intro.intro\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides✝ :\n  ↑k * esymm σ R k -\n      (-1) ^ (k + 1) *\n        ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\nsub_both_sides :\n  (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    ∑ a in filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\na : ℕ × ℕ\nha : a.fst + a.snd = k\nleft✝ : a.fst < k\nha0 : ¬0 < a.fst\n⊢ a = (0, k)\n[PROOFSTEP]\nrw [← ha, Nat.eq_zero_of_nonpos a.fst ha0, zero_add, ← Nat.eq_zero_of_nonpos a.fst ha0]\n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides✝ :\n  ↑k * esymm σ R k -\n      (-1) ^ (k + 1) *\n        ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\nsub_both_sides :\n  (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    ∑ a in filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k), (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\nthis : filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k) = {(0, k)}\n⊢ psum σ R k =\n    (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ x in filter (fun a => a.fst < k ∧ 0 < a.fst) (antidiagonal k), (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd\n[PROOFSTEP]\nrw [this, sum_singleton] at sub_both_sides \n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides✝ :\n  ↑k * esymm σ R k -\n      (-1) ^ (k + 1) *\n        ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\nsub_both_sides :\n  (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (0, k).fst * esymm σ R (0, k).fst * psum σ R (0, k).snd\nthis : filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k) = {(0, k)}\n⊢ psum σ R k =\n    (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ x in filter (fun a => a.fst < k ∧ 0 < a.fst) (antidiagonal k), (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd\n[PROOFSTEP]\nsimp only [_root_.pow_zero, esymm_zero, mul_one, one_mul, filter_filter] at sub_both_sides \n[GOAL]\nσ : Type u_1\ninst✝² : Fintype σ\ninst✝¹ : DecidableEq σ\nR : Type u_2\ninst✝ : CommRing R\nk : ℕ\nh : 0 < k\nhesymm :\n  ↑k * esymm σ R k =\n    (-1) ^ (k + 1) *\n      (∑ x in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd +\n        ∑ x in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd)\nsub_both_sides✝ :\n  ↑k * esymm σ R k -\n      (-1) ^ (k + 1) *\n        ∑ a in filter (fun a => 0 < a.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n          (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd =\n    (-1) ^ (k + 1) *\n      ∑ a in filter (fun x => ¬0 < x.fst) (filter (fun a => a.fst < k) (antidiagonal k)),\n        (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd\nthis : filter (fun a => a.fst < k ∧ ¬0 < a.fst) (antidiagonal k) = {(0, k)}\nsub_both_sides :\n  (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ x in filter (fun a => a.fst < k ∧ 0 < a.fst) (antidiagonal k), (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd =\n    psum σ R k\n⊢ psum σ R k =\n    (-1) ^ (k + 1) * ↑k * esymm σ R k -\n      ∑ x in filter (fun a => a.fst < k ∧ 0 < a.fst) (antidiagonal k), (-1) ^ x.fst * esymm σ R x.fst * psum σ R x.snd\n[PROOFSTEP]\nexact sub_both_sides.symm\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.MvPolynomial.NewtonIdentities", "llama_tokens": 39145, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.5774953651858118, "lm_q1q2_score": 0.38225739291383515}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s✝ : α → α → Prop\ns : Set α\n⊢ DirectedOn r s ↔ Directed r Subtype.val\n[PROOFSTEP]\nsimp [Directed, DirectedOn]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s✝ : α → α → Prop\ns : Set α\n⊢ (∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → ∃ z, z ∈ s ∧ r x z ∧ r y z) ↔\n    ∀ (a : α), a ∈ s → ∀ (a_1 : α), a_1 ∈ s → ∃ a_2, r a a_2 ∧ a_2 ∈ s ∧ r a_1 a_2\n[PROOFSTEP]\nrefine' ball_congr fun x _ => by simp [And.comm, and_assoc]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s✝ : α → α → Prop\ns : Set α\nx : α\nx✝ : x ∈ s\n⊢ (∀ (y : α), y ∈ s → ∃ z, z ∈ s ∧ r x z ∧ r y z) ↔ ∀ (a : α), a ∈ s → ∃ a_1, r x a_1 ∧ a_1 ∈ s ∧ r a a_1\n[PROOFSTEP]\nsimp [And.comm, and_assoc]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\nf : ι → α\n⊢ Directed r f ↔ DirectedOn r (Set.range f)\n[PROOFSTEP]\nsimp_rw [Directed, DirectedOn, Set.forall_range_iff, Set.exists_range_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s✝ : α → α → Prop\ns : Set β\nf : β → α\n⊢ DirectedOn r (f '' s) ↔ DirectedOn (f ⁻¹'o r) s\n[PROOFSTEP]\nsimp only [DirectedOn, Set.mem_image, exists_exists_and_eq_and, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂,\n  Order.Preimage]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : OrderBot α\ne : ι → β\nf : ι → α\nhf : Directed (fun x x_1 => x ≤ x_1) f\nhe : Injective e\n⊢ Directed (fun x x_1 => x ≤ x_1) (extend e f ⊥)\n[PROOFSTEP]\nintro a b\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : OrderBot α\ne : ι → β\nf : ι → α\nhf : Directed (fun x x_1 => x ≤ x_1) f\nhe : Injective e\na b : β\n⊢ ∃ z,\n    (fun x x_1 => x ≤ x_1) (extend e f ⊥ a) (extend e f ⊥ z) ∧ (fun x x_1 => x ≤ x_1) (extend e f ⊥ b) (extend e f ⊥ z)\n[PROOFSTEP]\nrcases(em (∃ i, e i = a)).symm with (ha | ⟨i, rfl⟩)\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : OrderBot α\ne : ι → β\nf : ι → α\nhf : Directed (fun x x_1 => x ≤ x_1) f\nhe : Injective e\na b : β\nha : ¬∃ i, e i = a\n⊢ ∃ z,\n    (fun x x_1 => x ≤ x_1) (extend e f ⊥ a) (extend e f ⊥ z) ∧ (fun x x_1 => x ≤ x_1) (extend e f ⊥ b) (extend e f ⊥ z)\n[PROOFSTEP]\nuse b\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : OrderBot α\ne : ι → β\nf : ι → α\nhf : Directed (fun x x_1 => x ≤ x_1) f\nhe : Injective e\na b : β\nha : ¬∃ i, e i = a\n⊢ (fun x x_1 => x ≤ x_1) (extend e f ⊥ a) (extend e f ⊥ b) ∧ (fun x x_1 => x ≤ x_1) (extend e f ⊥ b) (extend e f ⊥ b)\n[PROOFSTEP]\nsimp [Function.extend_apply' _ _ _ ha]\n[GOAL]\ncase inr.intro\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : OrderBot α\ne : ι → β\nf : ι → α\nhf : Directed (fun x x_1 => x ≤ x_1) f\nhe : Injective e\nb : β\ni : ι\n⊢ ∃ z,\n    (fun x x_1 => x ≤ x_1) (extend e f ⊥ (e i)) (extend e f ⊥ z) ∧\n      (fun x x_1 => x ≤ x_1) (extend e f ⊥ b) (extend e f ⊥ z)\n[PROOFSTEP]\nrcases(em (∃ i, e i = b)).symm with (hb | ⟨j, rfl⟩)\n[GOAL]\ncase inr.intro.inl\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : OrderBot α\ne : ι → β\nf : ι → α\nhf : Directed (fun x x_1 => x ≤ x_1) f\nhe : Injective e\nb : β\ni : ι\nhb : ¬∃ i, e i = b\n⊢ ∃ z,\n    (fun x x_1 => x ≤ x_1) (extend e f ⊥ (e i)) (extend e f ⊥ z) ∧\n      (fun x x_1 => x ≤ x_1) (extend e f ⊥ b) (extend e f ⊥ z)\n[PROOFSTEP]\nuse e i\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : OrderBot α\ne : ι → β\nf : ι → α\nhf : Directed (fun x x_1 => x ≤ x_1) f\nhe : Injective e\nb : β\ni : ι\nhb : ¬∃ i, e i = b\n⊢ (fun x x_1 => x ≤ x_1) (extend e f ⊥ (e i)) (extend e f ⊥ (e i)) ∧\n    (fun x x_1 => x ≤ x_1) (extend e f ⊥ b) (extend e f ⊥ (e i))\n[PROOFSTEP]\nsimp [Function.extend_apply' _ _ _ hb]\n[GOAL]\ncase inr.intro.inr.intro\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : OrderBot α\ne : ι → β\nf : ι → α\nhf : Directed (fun x x_1 => x ≤ x_1) f\nhe : Injective e\ni j : ι\n⊢ ∃ z,\n    (fun x x_1 => x ≤ x_1) (extend e f ⊥ (e i)) (extend e f ⊥ z) ∧\n      (fun x x_1 => x ≤ x_1) (extend e f ⊥ (e j)) (extend e f ⊥ z)\n[PROOFSTEP]\nrcases hf i j with ⟨k, hi, hj⟩\n[GOAL]\ncase inr.intro.inr.intro.intro.intro\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : OrderBot α\ne : ι → β\nf : ι → α\nhf : Directed (fun x x_1 => x ≤ x_1) f\nhe : Injective e\ni j k : ι\nhi : f i ≤ f k\nhj : f j ≤ f k\n⊢ ∃ z,\n    (fun x x_1 => x ≤ x_1) (extend e f ⊥ (e i)) (extend e f ⊥ z) ∧\n      (fun x x_1 => x ≤ x_1) (extend e f ⊥ (e j)) (extend e f ⊥ z)\n[PROOFSTEP]\nuse e k\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : OrderBot α\ne : ι → β\nf : ι → α\nhf : Directed (fun x x_1 => x ≤ x_1) f\nhe : Injective e\ni j k : ι\nhi : f i ≤ f k\nhj : f j ≤ f k\n⊢ (fun x x_1 => x ≤ x_1) (extend e f ⊥ (e i)) (extend e f ⊥ (e k)) ∧\n    (fun x x_1 => x ≤ x_1) (extend e f ⊥ (e j)) (extend e f ⊥ (e k))\n[PROOFSTEP]\nsimp only [he.extend_apply, *, true_and_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝ : IsDirected α r\n⊢ Directed r id\n[PROOFSTEP]\nconvert directed_of r\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝ : IsTotal α r\n⊢ IsDirected α r\n[PROOFSTEP]\nrw [← directed_id_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝ : IsTotal α r\n⊢ Directed r id\n[PROOFSTEP]\nexact IsTotal.directed _\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : LE α\ninst✝ : IsDirected α fun x x_1 => x ≤ x_1\n⊢ IsDirected αᵒᵈ fun x x_1 => x ≥ x_1\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : LE α\ninst✝ : IsDirected α fun x x_1 => x ≥ x_1\n⊢ IsDirected αᵒᵈ fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s✝ : α → α → Prop\nh : Reflexive r\na : α\ns : Set α\nhd : DirectedOn r s\nha : ∀ (b : α), b ∈ s → ∃ c, c ∈ s ∧ r a c ∧ r b c\n⊢ DirectedOn r (insert a s)\n[PROOFSTEP]\nrintro x (rfl | hx) y (rfl | hy)\n[GOAL]\ncase inl.inl\nα : Type u\nβ : Type v\nι : Sort w\nr r' s✝ : α → α → Prop\nh : Reflexive r\ns : Set α\nhd : DirectedOn r s\ny : α\nha : ∀ (b : α), b ∈ s → ∃ c, c ∈ s ∧ r y c ∧ r b c\n⊢ ∃ z, z ∈ insert y s ∧ r y z ∧ r y z\n[PROOFSTEP]\nexact ⟨y, Set.mem_insert _ _, h _, h _⟩\n[GOAL]\ncase inl.inr\nα : Type u\nβ : Type v\nι : Sort w\nr r' s✝ : α → α → Prop\nh : Reflexive r\ns : Set α\nhd : DirectedOn r s\nx : α\nha : ∀ (b : α), b ∈ s → ∃ c, c ∈ s ∧ r x c ∧ r b c\ny : α\nhy : y ∈ s\n⊢ ∃ z, z ∈ insert x s ∧ r x z ∧ r y z\n[PROOFSTEP]\nobtain ⟨w, hws, hwr⟩ := ha y hy\n[GOAL]\ncase inl.inr.intro.intro\nα : Type u\nβ : Type v\nι : Sort w\nr r' s✝ : α → α → Prop\nh : Reflexive r\ns : Set α\nhd : DirectedOn r s\nx : α\nha : ∀ (b : α), b ∈ s → ∃ c, c ∈ s ∧ r x c ∧ r b c\ny : α\nhy : y ∈ s\nw : α\nhws : w ∈ s\nhwr : r x w ∧ r y w\n⊢ ∃ z, z ∈ insert x s ∧ r x z ∧ r y z\n[PROOFSTEP]\nexact ⟨w, Set.mem_insert_of_mem _ hws, hwr⟩\n[GOAL]\ncase inr.inl\nα : Type u\nβ : Type v\nι : Sort w\nr r' s✝ : α → α → Prop\nh : Reflexive r\ns : Set α\nhd : DirectedOn r s\nx : α\nhx : x ∈ s\ny : α\nha : ∀ (b : α), b ∈ s → ∃ c, c ∈ s ∧ r y c ∧ r b c\n⊢ ∃ z, z ∈ insert y s ∧ r x z ∧ r y z\n[PROOFSTEP]\nobtain ⟨w, hws, hwr⟩ := ha x hx\n[GOAL]\ncase inr.inl.intro.intro\nα : Type u\nβ : Type v\nι : Sort w\nr r' s✝ : α → α → Prop\nh : Reflexive r\ns : Set α\nhd : DirectedOn r s\nx : α\nhx : x ∈ s\ny : α\nha : ∀ (b : α), b ∈ s → ∃ c, c ∈ s ∧ r y c ∧ r b c\nw : α\nhws : w ∈ s\nhwr : r y w ∧ r x w\n⊢ ∃ z, z ∈ insert y s ∧ r x z ∧ r y z\n[PROOFSTEP]\nexact ⟨w, Set.mem_insert_of_mem _ hws, hwr.symm⟩\n[GOAL]\ncase inr.inr\nα : Type u\nβ : Type v\nι : Sort w\nr r' s✝ : α → α → Prop\nh : Reflexive r\na : α\ns : Set α\nhd : DirectedOn r s\nha : ∀ (b : α), b ∈ s → ∃ c, c ∈ s ∧ r a c ∧ r b c\nx : α\nhx : x ∈ s\ny : α\nhy : y ∈ s\n⊢ ∃ z, z ∈ insert a s ∧ r x z ∧ r y z\n[PROOFSTEP]\nobtain ⟨w, hws, hwr⟩ := hd x hx y hy\n[GOAL]\ncase inr.inr.intro.intro\nα : Type u\nβ : Type v\nι : Sort w\nr r' s✝ : α → α → Prop\nh : Reflexive r\na : α\ns : Set α\nhd : DirectedOn r s\nha : ∀ (b : α), b ∈ s → ∃ c, c ∈ s ∧ r a c ∧ r b c\nx : α\nhx : x ∈ s\ny : α\nhy : y ∈ s\nw : α\nhws : w ∈ s\nhwr : r x w ∧ r y w\n⊢ ∃ z, z ∈ insert a s ∧ r x z ∧ r y z\n[PROOFSTEP]\nexact ⟨w, Set.mem_insert_of_mem _ hws, hwr⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\nh : Reflexive r\na b : α\nhab : r a b\n⊢ DirectedOn r {b, a}\n[PROOFSTEP]\nrw [Set.pair_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\nh : Reflexive r\na b : α\nhab : r a b\n⊢ DirectedOn r {a, b}\n[PROOFSTEP]\napply directedOn_pair h hab\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝³ : Preorder α\na : α\ninst✝² : PartialOrder β\ninst✝¹ : IsDirected β fun x x_1 => x ≥ x_1\ninst✝ : Nontrivial β\n⊢ ∃ a b, a < b\n[PROOFSTEP]\nrcases exists_pair_ne β with ⟨a, b, hne⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝³ : Preorder α\na✝ : α\ninst✝² : PartialOrder β\ninst✝¹ : IsDirected β fun x x_1 => x ≥ x_1\ninst✝ : Nontrivial β\na b : β\nhne : a ≠ b\n⊢ ∃ a b, a < b\n[PROOFSTEP]\nrcases isBot_or_exists_lt a with (ha | ⟨c, hc⟩)\n[GOAL]\ncase intro.intro.inl\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝³ : Preorder α\na✝ : α\ninst✝² : PartialOrder β\ninst✝¹ : IsDirected β fun x x_1 => x ≥ x_1\ninst✝ : Nontrivial β\na b : β\nhne : a ≠ b\nha : IsBot a\n⊢ ∃ a b, a < b\ncase intro.intro.inr.intro\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝³ : Preorder α\na✝ : α\ninst✝² : PartialOrder β\ninst✝¹ : IsDirected β fun x x_1 => x ≥ x_1\ninst✝ : Nontrivial β\na b : β\nhne : a ≠ b\nc : β\nhc : c < a\n⊢ ∃ a b, a < b\n[PROOFSTEP]\nexacts [⟨a, b, (ha b).lt_of_ne hne⟩, ⟨_, _, hc⟩]\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\na : α\ninst✝ : Preorder β\nf : α → β\nh : ScottContinuous f\n⊢ Monotone f\n[PROOFSTEP]\nintro a b hab\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\na✝ : α\ninst✝ : Preorder β\nf : α → β\nh : ScottContinuous f\na b : α\nhab : a ≤ b\n⊢ f a ≤ f b\n[PROOFSTEP]\nhave e1 : IsLUB (f '' { a, b }) (f b) := by\n  apply h\n  · exact Set.insert_nonempty _ _\n  · exact directedOn_pair le_refl hab\n  · rw [IsLUB, upperBounds_insert, upperBounds_singleton,\n      Set.inter_eq_self_of_subset_right (Set.Ici_subset_Ici.mpr hab)]\n    exact isLeast_Ici\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\na✝ : α\ninst✝ : Preorder β\nf : α → β\nh : ScottContinuous f\na b : α\nhab : a ≤ b\n⊢ IsLUB (f '' {a, b}) (f b)\n[PROOFSTEP]\napply h\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\na✝ : α\ninst✝ : Preorder β\nf : α → β\nh : ScottContinuous f\na b : α\nhab : a ≤ b\n⊢ Set.Nonempty {a, b}\n[PROOFSTEP]\nexact Set.insert_nonempty _ _\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\na✝ : α\ninst✝ : Preorder β\nf : α → β\nh : ScottContinuous f\na b : α\nhab : a ≤ b\n⊢ DirectedOn (fun x x_1 => x ≤ x_1) {a, b}\n[PROOFSTEP]\nexact directedOn_pair le_refl hab\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\na✝ : α\ninst✝ : Preorder β\nf : α → β\nh : ScottContinuous f\na b : α\nhab : a ≤ b\n⊢ IsLUB {a, b} b\n[PROOFSTEP]\nrw [IsLUB, upperBounds_insert, upperBounds_singleton, Set.inter_eq_self_of_subset_right (Set.Ici_subset_Ici.mpr hab)]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\na✝ : α\ninst✝ : Preorder β\nf : α → β\nh : ScottContinuous f\na b : α\nhab : a ≤ b\n⊢ IsLeast (Set.Ici b) b\n[PROOFSTEP]\nexact isLeast_Ici\n[GOAL]\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\na✝ : α\ninst✝ : Preorder β\nf : α → β\nh : ScottContinuous f\na b : α\nhab : a ≤ b\ne1 : IsLUB (f '' {a, b}) (f b)\n⊢ f a ≤ f b\n[PROOFSTEP]\napply e1.1\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\na✝ : α\ninst✝ : Preorder β\nf : α → β\nh : ScottContinuous f\na b : α\nhab : a ≤ b\ne1 : IsLUB (f '' {a, b}) (f b)\n⊢ f a ∈ f '' {a, b}\n[PROOFSTEP]\nrw [Set.image_pair]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Sort w\nr r' s : α → α → Prop\ninst✝¹ : Preorder α\na✝ : α\ninst✝ : Preorder β\nf : α → β\nh : ScottContinuous f\na b : α\nhab : a ≤ b\ne1 : IsLUB (f '' {a, b}) (f b)\n⊢ f a ∈ {f a, f b}\n[PROOFSTEP]\nexact Set.mem_insert _ _\n", "meta": {"mathlib_filename": "Mathlib.Order.Directed", "llama_tokens": 6423, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.5774953651858118, "lm_q1q2_score": 0.38225739291383515}}
{"text": "[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\n⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖\n[PROOFSTEP]\nset e := extChartAt I c\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\n⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖\n[PROOFSTEP]\nhave hI : range I = univ := ModelWithCorners.Boundaryless.range_eq_univ\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\n⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖\n[PROOFSTEP]\nhave H₁ : 𝓝[range I] (e c) = 𝓝 (e c) := by rw [hI, nhdsWithin_univ]\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\n⊢ 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\n[PROOFSTEP]\nrw [hI, nhdsWithin_univ]\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\n⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖\n[PROOFSTEP]\nhave H₂ : map e.symm (𝓝 (e c)) = 𝓝 c\n[GOAL]\ncase H₂\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\n⊢ map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\n[PROOFSTEP]\nrw [← map_extChartAt_symm_nhdsWithin_range I c, H₁]\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\n⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖\n[PROOFSTEP]\nrw [← H₂, eventually_map]\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\n⊢ ∀ᶠ (a : E) in 𝓝 (↑e c), ‖f (↑(LocalEquiv.symm e) a)‖ = ‖f c‖\n[PROOFSTEP]\nreplace hd : ∀ᶠ y in 𝓝 (e c), DifferentiableAt ℂ (f ∘ e.symm) y\n[GOAL]\ncase hd\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\n⊢ ∀ᶠ (y : E) in 𝓝 (↑e c), DifferentiableAt ℂ (f ∘ ↑(LocalEquiv.symm e)) y\n[PROOFSTEP]\nhave : e.target ∈ 𝓝 (e c) := H₁ ▸ extChartAt_target_mem_nhdsWithin I c\n[GOAL]\ncase hd\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\nthis : e.target ∈ 𝓝 (↑e c)\n⊢ ∀ᶠ (y : E) in 𝓝 (↑e c), DifferentiableAt ℂ (f ∘ ↑(LocalEquiv.symm e)) y\n[PROOFSTEP]\nfilter_upwards [this, Tendsto.eventually H₂.le hd] with y hyt hy₂\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\nthis : e.target ∈ 𝓝 (↑e c)\ny : E\nhyt : y ∈ (extChartAt I c).target\nhy₂ : MDifferentiableAt I 𝓘(ℂ, F) f (↑(LocalEquiv.symm (extChartAt I c)) y)\n⊢ DifferentiableAt ℂ (f ∘ ↑(LocalEquiv.symm (extChartAt I c))) y\n[PROOFSTEP]\nhave hys : e.symm y ∈ (chartAt H c).source\n[GOAL]\ncase hys\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\nthis : e.target ∈ 𝓝 (↑e c)\ny : E\nhyt : y ∈ (extChartAt I c).target\nhy₂ : MDifferentiableAt I 𝓘(ℂ, F) f (↑(LocalEquiv.symm (extChartAt I c)) y)\n⊢ ↑(LocalEquiv.symm e) y ∈ (chartAt H c).toLocalEquiv.source\n[PROOFSTEP]\nrw [← extChartAt_source I c]\n[GOAL]\ncase hys\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\nthis : e.target ∈ 𝓝 (↑e c)\ny : E\nhyt : y ∈ (extChartAt I c).target\nhy₂ : MDifferentiableAt I 𝓘(ℂ, F) f (↑(LocalEquiv.symm (extChartAt I c)) y)\n⊢ ↑(LocalEquiv.symm e) y ∈ (extChartAt I c).source\n[PROOFSTEP]\nexact (extChartAt I c).map_target hyt\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\nthis : e.target ∈ 𝓝 (↑e c)\ny : E\nhyt : y ∈ (extChartAt I c).target\nhy₂ : MDifferentiableAt I 𝓘(ℂ, F) f (↑(LocalEquiv.symm (extChartAt I c)) y)\nhys : ↑(LocalEquiv.symm e) y ∈ (chartAt H c).toLocalEquiv.source\n⊢ DifferentiableAt ℂ (f ∘ ↑(LocalEquiv.symm (extChartAt I c))) y\n[PROOFSTEP]\nhave hfy : f (e.symm y) ∈ (chartAt F (0 : F)).source := mem_univ _\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\nthis : e.target ∈ 𝓝 (↑e c)\ny : E\nhyt : y ∈ (extChartAt I c).target\nhy₂ : MDifferentiableAt I 𝓘(ℂ, F) f (↑(LocalEquiv.symm (extChartAt I c)) y)\nhys : ↑(LocalEquiv.symm e) y ∈ (chartAt H c).toLocalEquiv.source\nhfy : f (↑(LocalEquiv.symm e) y) ∈ (chartAt F 0).toLocalEquiv.source\n⊢ DifferentiableAt ℂ (f ∘ ↑(LocalEquiv.symm (extChartAt I c))) y\n[PROOFSTEP]\nrw [mdifferentiableAt_iff_of_mem_source hys hfy, hI, differentiableWithinAt_univ, e.right_inv hyt] at hy₂ \n[GOAL]\ncase h\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\nthis : e.target ∈ 𝓝 (↑e c)\ny : E\nhyt : y ∈ (extChartAt I c).target\nhy₂ :\n  ContinuousAt f (↑(LocalEquiv.symm e) y) ∧\n    DifferentiableAt ℂ (↑(extChartAt 𝓘(ℂ, F) 0) ∘ f ∘ ↑(LocalEquiv.symm (extChartAt I c))) y\nhys : ↑(LocalEquiv.symm e) y ∈ (chartAt H c).toLocalEquiv.source\nhfy : f (↑(LocalEquiv.symm e) y) ∈ (chartAt F 0).toLocalEquiv.source\n⊢ DifferentiableAt ℂ (f ∘ ↑(LocalEquiv.symm (extChartAt I c))) y\n[PROOFSTEP]\nexact hy₂.2\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\nhd : ∀ᶠ (y : E) in 𝓝 (↑e c), DifferentiableAt ℂ (f ∘ ↑(LocalEquiv.symm e)) y\n⊢ ∀ᶠ (a : E) in 𝓝 (↑e c), ‖f (↑(LocalEquiv.symm e) a)‖ = ‖f c‖\n[PROOFSTEP]\nconvert norm_eventually_eq_of_isLocalMax hd _\n[GOAL]\ncase h.e'_2.h.h.e'_3.h.e'_3\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\nhd : ∀ᶠ (y : E) in 𝓝 (↑e c), DifferentiableAt ℂ (f ∘ ↑(LocalEquiv.symm e)) y\nx✝ : E\n⊢ f c = (f ∘ ↑(LocalEquiv.symm e)) (↑e c)\n[PROOFSTEP]\nexact congr_arg f (extChartAt_to_inv _ _).symm\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nc : M\nhc : IsLocalMax (norm ∘ f) c\ne : LocalEquiv M E := extChartAt I c\nhI : range ↑I = univ\nH₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)\nH₂ : map (↑(LocalEquiv.symm e)) (𝓝 (↑e c)) = 𝓝 c\nhd : ∀ᶠ (y : E) in 𝓝 (↑e c), DifferentiableAt ℂ (f ∘ ↑(LocalEquiv.symm e)) y\n⊢ IsLocalMax (norm ∘ f ∘ ↑(LocalEquiv.symm e)) (↑e c)\n[PROOFSTEP]\nsimpa only [IsLocalMax, IsMaxFilter, ← H₂, (· ∘ ·), extChartAt_to_inv] using hc\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\n⊢ EqOn (norm ∘ f) (const M ‖f c‖) U\n[PROOFSTEP]\nset V := {z ∈ U | ‖f z‖ = ‖f c‖}\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\n⊢ EqOn (norm ∘ f) (const M ‖f c‖) U\n[PROOFSTEP]\nsuffices : U ⊆ V\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\nthis : U ⊆ V\n⊢ EqOn (norm ∘ f) (const M ‖f c‖) U\ncase this\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\n⊢ U ⊆ V\n[PROOFSTEP]\nexact fun x hx => (this hx).2\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\n⊢ U ⊆ V\n[PROOFSTEP]\nhave hVo : IsOpen V\n[GOAL]\ncase hVo\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\n⊢ IsOpen V\n[PROOFSTEP]\nrefine isOpen_iff_mem_nhds.2 fun x hx ↦ inter_mem (ho.mem_nhds hx.1) ?_\n[GOAL]\ncase hVo\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\nx : M\nhx : x ∈ V\n⊢ (fun z => ‖f z‖ = ‖f c‖) ∈ 𝓝 x\n[PROOFSTEP]\nreplace hm : IsLocalMax (‖f ·‖) x := mem_of_superset (ho.mem_nhds hx.1) fun z hz ↦ (hm hz).out.trans_eq hx.2.symm\n[GOAL]\ncase hVo\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\nx : M\nhx : x ∈ V\nhm : IsLocalMax (fun x => ‖f x‖) x\n⊢ (fun z => ‖f z‖ = ‖f c‖) ∈ 𝓝 x\n[PROOFSTEP]\nreplace hd : ∀ᶠ y in 𝓝 x, MDifferentiableAt I 𝓘(ℂ, F) f y :=\n  (eventually_mem_nhds.2 (ho.mem_nhds hx.1)).mono fun z ↦ hd.mdifferentiableAt\n[GOAL]\ncase hVo\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\nx : M\nhx : x ∈ V\nhm : IsLocalMax (fun x => ‖f x‖) x\nhd : ∀ᶠ (y : M) in 𝓝 x, MDifferentiableAt I 𝓘(ℂ, F) f y\n⊢ (fun z => ‖f z‖ = ‖f c‖) ∈ 𝓝 x\n[PROOFSTEP]\nexact (Complex.norm_eventually_eq_of_mdifferentiableAt_of_isLocalMax hd hm).mono fun _ ↦ (Eq.trans · hx.2)\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\nhVo : IsOpen V\n⊢ U ⊆ V\n[PROOFSTEP]\nhave hVne : (U ∩ V).Nonempty := ⟨c, hcU, hcU, rfl⟩\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\nhVo : IsOpen V\nhVne : Set.Nonempty (U ∩ V)\n⊢ U ⊆ V\n[PROOFSTEP]\nset W := U ∩ {z | ‖f z‖ = ‖f c‖}ᶜ\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\nhVo : IsOpen V\nhVne : Set.Nonempty (U ∩ V)\nW : Set M := U ∩ {z | ‖f z‖ = ‖f c‖}ᶜ\n⊢ U ⊆ V\n[PROOFSTEP]\nhave hWo : IsOpen W := hd.continuousOn.norm.preimage_open_of_open ho isOpen_ne\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\nhVo : IsOpen V\nhVne : Set.Nonempty (U ∩ V)\nW : Set M := U ∩ {z | ‖f z‖ = ‖f c‖}ᶜ\nhWo : IsOpen W\n⊢ U ⊆ V\n[PROOFSTEP]\nhave hdVW : Disjoint V W := disjoint_compl_right.mono inf_le_right inf_le_right\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\nhVo : IsOpen V\nhVne : Set.Nonempty (U ∩ V)\nW : Set M := U ∩ {z | ‖f z‖ = ‖f c‖}ᶜ\nhWo : IsOpen W\nhdVW : Disjoint V W\n⊢ U ⊆ V\n[PROOFSTEP]\nhave hUVW : U ⊆ V ∪ W := fun x hx => (eq_or_ne ‖f x‖ ‖f c‖).imp (.intro hx) (.intro hx)\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nV : Set M := {z | z ∈ U ∧ ‖f z‖ = ‖f c‖}\nhVo : IsOpen V\nhVne : Set.Nonempty (U ∩ V)\nW : Set M := U ∩ {z | ‖f z‖ = ‖f c‖}ᶜ\nhWo : IsOpen W\nhdVW : Disjoint V W\nhUVW : U ⊆ V ∪ W\n⊢ U ⊆ V\n[PROOFSTEP]\nexact hc.subset_left_of_subset_union hVo hWo hdVW hUVW hVne\n[GOAL]\nE : Type u_1\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁶ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁵ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝⁴ : TopologicalSpace M\ninst✝³ : CompactSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : StrictConvexSpace ℝ F\nf : M → F\nU : Set M\nc : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhc : IsPreconnected U\nho : IsOpen U\nhcU : c ∈ U\nhm : IsMaxOn (norm ∘ f) U c\nx : M\nhx : x ∈ U\nH₁ : ‖f x‖ = ‖f c‖\nhd' : MDifferentiableOn I 𝓘(ℂ, F) (fun x => f x + f c) U\nH₂ : ‖f x + f c‖ = ‖f c + f c‖\n⊢ ‖f x + const M (f c) x‖ = ‖f x‖ + ‖const M (f c) x‖\n[PROOFSTEP]\nsimp only [H₂, SameRay.rfl.norm_add, H₁, Function.const]\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\na b : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhpc : IsPreconnected U\nhc : IsCompact U\nho : IsOpen U\nha : a ∈ U\nhb : b ∈ U\n⊢ f a = f b\n[PROOFSTEP]\nrefine\n  ?_\n    -- Subtract `f b` to avoid the assumption `[StrictConvexSpace ℝ F]`\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\na b : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhpc : IsPreconnected U\nhc : IsCompact U\nho : IsOpen U\nha : a ∈ U\nhb : b ∈ U\n⊢ f a = f b\n[PROOFSTEP]\nwlog hb₀ : f b = 0 generalizing f\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\na b : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhpc : IsPreconnected U\nhc : IsCompact U\nho : IsOpen U\nha : a ∈ U\nhb : b ∈ U\nthis : ∀ {f : M → F}, MDifferentiableOn I 𝓘(ℂ, F) f U → f b = 0 → f a = f b\nhb₀ : ¬f b = 0\n⊢ f a = f b\n[PROOFSTEP]\nhave hd' : MDifferentiableOn I 𝓘(ℂ, F) (f · - f b) U := fun x hx ↦\n  ⟨(hd x hx).1.sub continuousWithinAt_const, (hd x hx).2.sub_const _⟩\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nf : M → F\nU : Set M\na b : M\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhpc : IsPreconnected U\nhc : IsCompact U\nho : IsOpen U\nha : a ∈ U\nhb : b ∈ U\nthis : ∀ {f : M → F}, MDifferentiableOn I 𝓘(ℂ, F) f U → f b = 0 → f a = f b\nhb₀ : ¬f b = 0\nhd' : MDifferentiableOn I 𝓘(ℂ, F) (fun x => f x - f b) U\n⊢ f a = f b\n[PROOFSTEP]\nsimpa [sub_eq_zero] using this hd' (sub_self _)\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nU : Set M\na b : M\nhpc : IsPreconnected U\nhc : IsCompact U\nho : IsOpen U\nha : a ∈ U\nhb : b ∈ U\nf : M → F\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhb₀ : f b = 0\n⊢ f a = f b\n[PROOFSTEP]\nrcases hc.exists_isMaxOn ⟨a, ha⟩ hd.continuousOn.norm with ⟨c, hcU, hc⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nU : Set M\na b : M\nhpc : IsPreconnected U\nhc✝ : IsCompact U\nho : IsOpen U\nha : a ∈ U\nhb : b ∈ U\nf : M → F\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhb₀ : f b = 0\nc : M\nhcU : c ∈ U\nhc : IsMaxOn (fun x => ‖f x‖) U c\n⊢ f a = f b\n[PROOFSTEP]\nhave : ∀ x ∈ U, ‖f x‖ = ‖f c‖ := norm_eqOn_of_isPreconnected_of_isMaxOn hd hpc ho hcU hc\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℂ E\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℂ F\nH : Type u_3\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℂ E H\ninst✝⁴ : ModelWithCorners.Boundaryless I\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : CompactSpace M\ninst✝¹ : ChartedSpace H M\ninst✝ : SmoothManifoldWithCorners I M\nU : Set M\na b : M\nhpc : IsPreconnected U\nhc✝ : IsCompact U\nho : IsOpen U\nha : a ∈ U\nhb : b ∈ U\nf : M → F\nhd : MDifferentiableOn I 𝓘(ℂ, F) f U\nhb₀ : f b = 0\nc : M\nhcU : c ∈ U\nhc : IsMaxOn (fun x => ‖f x‖) U c\nthis : ∀ (x : M), x ∈ U → ‖f x‖ = ‖f c‖\n⊢ f a = f b\n[PROOFSTEP]\nrw [hb₀, ← norm_eq_zero, this a ha, ← this b hb, hb₀, norm_zero]\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Manifold.Complex", "llama_tokens": 15588, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7248702761768248, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.3822360739347499}}
{"text": "[GOAL]\nα : Type u\nσ σ' : Type v\nM : NFA α σ\ns : σ\nS : Set σ\na : α\n⊢ s ∈ stepSet M S a ↔ ∃ t, t ∈ S ∧ s ∈ step M t a\n[PROOFSTEP]\nsimp [stepSet]\n[GOAL]\nα : Type u\nσ σ' : Type v\nM : NFA α σ\na : α\n⊢ stepSet M ∅ a = ∅\n[PROOFSTEP]\nsimp [stepSet]\n[GOAL]\nα : Type u\nσ σ' : Type v\nM : NFA α σ\nS : Set σ\nx : List α\na : α\n⊢ evalFrom M S (x ++ [a]) = stepSet M (evalFrom M S x) a\n[PROOFSTEP]\nsimp only [evalFrom, List.foldl_append, List.foldl_cons, List.foldl_nil]\n[GOAL]\nα : Type u\nσ σ' : Type v\nM : NFA α σ\nx : List α\n⊢ x ∈ accepts M ↔ ∃ S, S ∈ M.accept ∧ S ∈ evalFrom M M.start x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nσ σ' : Type v\nM : NFA α σ\n⊢ DFA.accepts (toDFA M) = accepts M\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u\nσ σ' : Type v\nM : NFA α σ\nx : List α\n⊢ x ∈ DFA.accepts (toDFA M) ↔ x ∈ accepts M\n[PROOFSTEP]\nrw [mem_accepts, DFA.mem_accepts]\n[GOAL]\ncase h\nα : Type u\nσ σ' : Type v\nM : NFA α σ\nx : List α\n⊢ DFA.evalFrom (toDFA M) (toDFA M).start x ∈ (toDFA M).accept ↔ ∃ S, S ∈ M.accept ∧ S ∈ evalFrom M M.start x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u\nσ σ' : Type v\nM : NFA α σ\nx : List α\n⊢ DFA.evalFrom (toDFA M) (toDFA M).start x ∈ (toDFA M).accept → ∃ S, S ∈ M.accept ∧ S ∈ evalFrom M M.start x\n[PROOFSTEP]\nexact fun ⟨w, h2, h3⟩ => ⟨w, h3, h2⟩\n[GOAL]\ncase h.mpr\nα : Type u\nσ σ' : Type v\nM : NFA α σ\nx : List α\n⊢ (∃ S, S ∈ M.accept ∧ S ∈ evalFrom M M.start x) → DFA.evalFrom (toDFA M) (toDFA M).start x ∈ (toDFA M).accept\n[PROOFSTEP]\nexact fun ⟨w, h2, h3⟩ => ⟨w, h3, h2⟩\n[GOAL]\nα : Type u\nσ σ' : Type v\nM : NFA α σ\ninst✝ : Fintype σ\nx : List α\nhx : x ∈ accepts M\nhlen : Fintype.card (Set σ) ≤ List.length x\n⊢ ∃ a b c,\n    x = a ++ b ++ c ∧ List.length a + List.length b ≤ Fintype.card (Set σ) ∧ b ≠ [] ∧ {a} * {b}∗ * {c} ≤ accepts M\n[PROOFSTEP]\nrw [← toDFA_correct] at hx ⊢\n[GOAL]\nα : Type u\nσ σ' : Type v\nM : NFA α σ\ninst✝ : Fintype σ\nx : List α\nhx : x ∈ DFA.accepts (toDFA M)\nhlen : Fintype.card (Set σ) ≤ List.length x\n⊢ ∃ a b c,\n    x = a ++ b ++ c ∧\n      List.length a + List.length b ≤ Fintype.card (Set σ) ∧ b ≠ [] ∧ {a} * {b}∗ * {c} ≤ DFA.accepts (toDFA M)\n[PROOFSTEP]\nexact M.toDFA.pumping_lemma hx hlen\n[GOAL]\nα : Type u\nσ σ' : Type v\nM✝ : NFA α σ\nM : DFA α σ\nstart : σ\ns : List α\n⊢ NFA.evalFrom (toNFA M) {start} s = {evalFrom M start s}\n[PROOFSTEP]\nchange List.foldl M.toNFA.stepSet { start } s = {List.foldl M.step start s}\n[GOAL]\nα : Type u\nσ σ' : Type v\nM✝ : NFA α σ\nM : DFA α σ\nstart : σ\ns : List α\n⊢ List.foldl (NFA.stepSet (toNFA M)) {start} s = {List.foldl M.step start s}\n[PROOFSTEP]\ninduction' s with a s ih generalizing start\n[GOAL]\ncase nil\nα : Type u\nσ σ' : Type v\nM✝ : NFA α σ\nM : DFA α σ\nstart✝ start : σ\n⊢ List.foldl (NFA.stepSet (toNFA M)) {start} [] = {List.foldl M.step start []}\n[PROOFSTEP]\ntauto\n[GOAL]\ncase cons\nα : Type u\nσ σ' : Type v\nM✝ : NFA α σ\nM : DFA α σ\nstart✝ : σ\na : α\ns : List α\nih : ∀ (start : σ), List.foldl (NFA.stepSet (toNFA M)) {start} s = {List.foldl M.step start s}\nstart : σ\n⊢ List.foldl (NFA.stepSet (toNFA M)) {start} (a :: s) = {List.foldl M.step start (a :: s)}\n[PROOFSTEP]\nrw [List.foldl, List.foldl, show M.toNFA.stepSet { start } a = {M.step start a} by simp [NFA.stepSet]]\n[GOAL]\nα : Type u\nσ σ' : Type v\nM✝ : NFA α σ\nM : DFA α σ\nstart✝ : σ\na : α\ns : List α\nih : ∀ (start : σ), List.foldl (NFA.stepSet (toNFA M)) {start} s = {List.foldl M.step start s}\nstart : σ\n⊢ NFA.stepSet (toNFA M) {start} a = {step M start a}\n[PROOFSTEP]\nsimp [NFA.stepSet]\n[GOAL]\ncase cons\nα : Type u\nσ σ' : Type v\nM✝ : NFA α σ\nM : DFA α σ\nstart✝ : σ\na : α\ns : List α\nih : ∀ (start : σ), List.foldl (NFA.stepSet (toNFA M)) {start} s = {List.foldl M.step start s}\nstart : σ\n⊢ List.foldl (NFA.stepSet (toNFA M)) {step M start a} s = {List.foldl M.step (step M start a) s}\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u\nσ σ' : Type v\nM✝ : NFA α σ\nM : DFA α σ\n⊢ NFA.accepts (toNFA M) = accepts M\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u\nσ σ' : Type v\nM✝ : NFA α σ\nM : DFA α σ\nx : List α\n⊢ x ∈ NFA.accepts (toNFA M) ↔ x ∈ accepts M\n[PROOFSTEP]\nrw [NFA.mem_accepts, toNFA_start, toNFA_evalFrom_match]\n[GOAL]\ncase h\nα : Type u\nσ σ' : Type v\nM✝ : NFA α σ\nM : DFA α σ\nx : List α\n⊢ (∃ S, S ∈ (toNFA M).accept ∧ S ∈ {evalFrom M M.start x}) ↔ x ∈ accepts M\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u\nσ σ' : Type v\nM✝ : NFA α σ\nM : DFA α σ\nx : List α\n⊢ (∃ S, S ∈ (toNFA M).accept ∧ S ∈ {evalFrom M M.start x}) → x ∈ accepts M\n[PROOFSTEP]\nrintro ⟨S, hS₁, hS₂⟩\n[GOAL]\ncase h.mp.intro.intro\nα : Type u\nσ σ' : Type v\nM✝ : NFA α σ\nM : DFA α σ\nx : List α\nS : σ\nhS₁ : S ∈ (toNFA M).accept\nhS₂ : S ∈ {evalFrom M M.start x}\n⊢ x ∈ accepts M\n[PROOFSTEP]\nrwa [Set.mem_singleton_iff.mp hS₂] at hS₁ \n[GOAL]\ncase h.mpr\nα : Type u\nσ σ' : Type v\nM✝ : NFA α σ\nM : DFA α σ\nx : List α\n⊢ x ∈ accepts M → ∃ S, S ∈ (toNFA M).accept ∧ S ∈ {evalFrom M M.start x}\n[PROOFSTEP]\nexact fun h => ⟨M.eval x, h, rfl⟩\n", "meta": {"mathlib_filename": "Mathlib.Computability.NFA", "llama_tokens": 2508, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6893056295505783, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.3821996129167492}}
{"text": "[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝ : (i : ι) → Monoid (M i)\n⊢ Monoid (Monoid.CoprodI M)\n[PROOFSTEP]\ndelta Monoid.CoprodI\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝ : (i : ι) → Monoid (M i)\n⊢ Monoid (Con.Quotient (conGen (Monoid.CoprodI.Rel M)))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nf g : CoprodI M →* N\nh : ∀ (i : ι), MonoidHom.comp f of = MonoidHom.comp g of\nx✝ : (i : ι) × M i\ni : ι\nx : M i\n⊢ ↑(MonoidHom.comp f (Con.mk' (conGen (Rel M)))) (FreeMonoid.of { fst := i, snd := x }) =\n    ↑(MonoidHom.comp g (Con.mk' (conGen (Rel M)))) (FreeMonoid.of { fst := i, snd := x })\n[PROOFSTEP]\nrw [MonoidHom.comp_apply, MonoidHom.comp_apply, ← of_apply, ← MonoidHom.comp_apply, ← MonoidHom.comp_apply, h]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nfi : (i : ι) → M i →* N\n⊢ ∀ (x y : FreeMonoid ((i : ι) × M i)), Rel M x y → Setoid.r x y\n[PROOFSTEP]\nsimp_rw [Con.rel_eq_coe, Con.ker_rel]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nfi : (i : ι) → M i →* N\n⊢ ∀ (x y : FreeMonoid ((i : ι) × M i)),\n    Rel M x y → ↑(↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd) x = ↑(↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd) y\n[PROOFSTEP]\nrintro _ _ (i | ⟨x, y⟩)\n[GOAL]\ncase of_one\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nfi : (i : ι) → M i →* N\ni : ι\n⊢ ↑(↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd) (FreeMonoid.of { fst := i, snd := 1 }) =\n    ↑(↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd) 1\n[PROOFSTEP]\nchange FreeMonoid.lift _ (FreeMonoid.of _) = FreeMonoid.lift _ 1\n[GOAL]\ncase of_one\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nfi : (i : ι) → M i →* N\ni : ι\n⊢ ↑(↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd) (FreeMonoid.of { fst := i, snd := 1 }) =\n    ↑(↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd) 1\n[PROOFSTEP]\nsimp only [MonoidHom.map_one, FreeMonoid.lift_eval_of]\n[GOAL]\ncase of_mul\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nfi : (i : ι) → M i →* N\ni✝ : ι\nx y : M i✝\n⊢ ↑(↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd)\n      (FreeMonoid.of { fst := i✝, snd := x } * FreeMonoid.of { fst := i✝, snd := y }) =\n    ↑(↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd) (FreeMonoid.of { fst := i✝, snd := x * y })\n[PROOFSTEP]\nchange FreeMonoid.lift _ (FreeMonoid.of _ * FreeMonoid.of _) = FreeMonoid.lift _ (FreeMonoid.of _)\n[GOAL]\ncase of_mul\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nfi : (i : ι) → M i →* N\ni✝ : ι\nx y : M i✝\n⊢ ↑(↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd)\n      (FreeMonoid.of { fst := i✝, snd := x } * FreeMonoid.of { fst := i✝, snd := y }) =\n    ↑(↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd) (FreeMonoid.of { fst := i✝, snd := x * y })\n[PROOFSTEP]\nsimp only [MonoidHom.map_mul, FreeMonoid.lift_eval_of]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\n⊢ Function.LeftInverse (fun f i => MonoidHom.comp f of) fun fi =>\n    Con.lift (conGen (Rel M)) (↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd)\n      (_ : conGen (Rel M) ≤ Con.ker (↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd))\n[PROOFSTEP]\nintro fi\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nfi : (i : ι) → M i →* N\n⊢ (fun f i => MonoidHom.comp f of)\n      ((fun fi =>\n          Con.lift (conGen (Rel M)) (↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd)\n            (_ : conGen (Rel M) ≤ Con.ker (↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd)))\n        fi) =\n    fi\n[PROOFSTEP]\next i x\n[GOAL]\ncase h.h\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nfi : (i : ι) → M i →* N\ni : ι\nx : M i\n⊢ ↑((fun f i => MonoidHom.comp f of)\n          ((fun fi =>\n              Con.lift (conGen (Rel M)) (↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd)\n                (_ : conGen (Rel M) ≤ Con.ker (↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd)))\n            fi)\n          i)\n      x =\n    ↑(fi i) x\n[PROOFSTEP]\nrw [MonoidHom.comp_apply, of_apply, Con.lift_mk', FreeMonoid.lift_eval_of]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\n⊢ Function.RightInverse (fun f i => MonoidHom.comp f of) fun fi =>\n    Con.lift (conGen (Rel M)) (↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd)\n      (_ : conGen (Rel M) ≤ Con.ker (↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd))\n[PROOFSTEP]\nintro f\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nf : CoprodI M →* N\n⊢ (fun fi =>\n        Con.lift (conGen (Rel M)) (↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd)\n          (_ : conGen (Rel M) ≤ Con.ker (↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd)))\n      ((fun f i => MonoidHom.comp f of) f) =\n    f\n[PROOFSTEP]\next i x\n[GOAL]\ncase h.h\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nf : CoprodI M →* N\ni : ι\nx : M i\n⊢ ↑(MonoidHom.comp\n          ((fun fi =>\n              Con.lift (conGen (Rel M)) (↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd)\n                (_ : conGen (Rel M) ≤ Con.ker (↑FreeMonoid.lift fun p => ↑(fi p.fst) p.snd)))\n            ((fun f i => MonoidHom.comp f of) f))\n          of)\n      x =\n    ↑(MonoidHom.comp f of) x\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nfi : (i : ι) → M i →* N\ni : ι\nm : M i\n⊢ ↑(↑lift fi) (↑of m) = ↑(fi i) m\n[PROOFSTEP]\nconv_rhs => rw [← lift.symm_apply_apply fi, lift_symm_apply, MonoidHom.comp_apply]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nfi : (i : ι) → M i →* N\ni : ι\nm : M i\n| ↑(fi i) m\n[PROOFSTEP]\nrw [← lift.symm_apply_apply fi, lift_symm_apply, MonoidHom.comp_apply]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nfi : (i : ι) → M i →* N\ni : ι\nm : M i\n| ↑(fi i) m\n[PROOFSTEP]\nrw [← lift.symm_apply_apply fi, lift_symm_apply, MonoidHom.comp_apply]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nfi : (i : ι) → M i →* N\ni : ι\nm : M i\n| ↑(fi i) m\n[PROOFSTEP]\nrw [← lift.symm_apply_apply fi, lift_symm_apply, MonoidHom.comp_apply]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nC : CoprodI M → Prop\nm : CoprodI M\nh_one : C 1\nh_of : ∀ (i : ι) (m : M i), C (↑of m)\nh_mul : ∀ (x y : CoprodI M), C x → C y → C (x * y)\n⊢ C m\n[PROOFSTEP]\nlet S : Submonoid (CoprodI M) :=\n  { carrier := setOf C\n    mul_mem' := h_mul _ _\n    one_mem' := h_one }\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nC : CoprodI M → Prop\nm : CoprodI M\nh_one : C 1\nh_of : ∀ (i : ι) (m : M i), C (↑of m)\nh_mul : ∀ (x y : CoprodI M), C x → C y → C (x * y)\nS : Submonoid (CoprodI M) :=\n  { toSubsemigroup := { carrier := setOf C, mul_mem' := (_ : ∀ {a b : CoprodI M}, C a → C b → C (a * b)) },\n    one_mem' := h_one }\n⊢ C m\n[PROOFSTEP]\nhave : C _ := Subtype.prop (lift (fun i => of.codRestrict S (h_of i)) m)\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nC : CoprodI M → Prop\nm : CoprodI M\nh_one : C 1\nh_of : ∀ (i : ι) (m : M i), C (↑of m)\nh_mul : ∀ (x y : CoprodI M), C x → C y → C (x * y)\nS : Submonoid (CoprodI M) :=\n  { toSubsemigroup := { carrier := setOf C, mul_mem' := (_ : ∀ {a b : CoprodI M}, C a → C b → C (a * b)) },\n    one_mem' := h_one }\nthis : C ↑(↑(↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))) m)\n⊢ C m\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_1\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nC : CoprodI M → Prop\nm : CoprodI M\nh_one : C 1\nh_of : ∀ (i : ι) (m : M i), C (↑of m)\nh_mul : ∀ (x y : CoprodI M), C x → C y → C (x * y)\nS : Submonoid (CoprodI M) :=\n  { toSubsemigroup := { carrier := setOf C, mul_mem' := (_ : ∀ {a b : CoprodI M}, C a → C b → C (a * b)) },\n    one_mem' := h_one }\nthis : C ↑(↑(↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))) m)\n⊢ m = ↑(↑(↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))) m)\n[PROOFSTEP]\nchange MonoidHom.id _ m = S.subtype.comp _ m\n[GOAL]\ncase h.e'_1\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nC : CoprodI M → Prop\nm : CoprodI M\nh_one : C 1\nh_of : ∀ (i : ι) (m : M i), C (↑of m)\nh_mul : ∀ (x y : CoprodI M), C x → C y → C (x * y)\nS : Submonoid (CoprodI M) :=\n  { toSubsemigroup := { carrier := setOf C, mul_mem' := (_ : ∀ {a b : CoprodI M}, C a → C b → C (a * b)) },\n    one_mem' := h_one }\nthis : C ↑(↑(↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))) m)\n⊢ ↑(MonoidHom.id (CoprodI M)) m =\n    ↑(MonoidHom.comp (Submonoid.subtype S) (↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m)))) m\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_1.e_a\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nC : CoprodI M → Prop\nm : CoprodI M\nh_one : C 1\nh_of : ∀ (i : ι) (m : M i), C (↑of m)\nh_mul : ∀ (x y : CoprodI M), C x → C y → C (x * y)\nS : Submonoid (CoprodI M) :=\n  { toSubsemigroup := { carrier := setOf C, mul_mem' := (_ : ∀ {a b : CoprodI M}, C a → C b → C (a * b)) },\n    one_mem' := h_one }\nthis : C ↑(↑(↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))) m)\n⊢ MonoidHom.id (CoprodI M) =\n    MonoidHom.comp (Submonoid.subtype S) (↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m)))\n[PROOFSTEP]\next i\n[GOAL]\ncase h.e'_1.e_a.h.h\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nC : CoprodI M → Prop\nm : CoprodI M\nh_one : C 1\nh_of : ∀ (i : ι) (m : M i), C (↑of m)\nh_mul : ∀ (x y : CoprodI M), C x → C y → C (x * y)\nS : Submonoid (CoprodI M) :=\n  { toSubsemigroup := { carrier := setOf C, mul_mem' := (_ : ∀ {a b : CoprodI M}, C a → C b → C (a * b)) },\n    one_mem' := h_one }\nthis : C ↑(↑(↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))) m)\ni : ι\nx✝ : M i\n⊢ ↑(MonoidHom.comp (MonoidHom.id (CoprodI M)) of) x✝ =\n    ↑(MonoidHom.comp\n          (MonoidHom.comp (Submonoid.subtype S)\n            (↑lift fun i => MonoidHom.codRestrict of S (_ : ∀ (m : M i), C (↑of m))))\n          of)\n      x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : DecidableEq ι\ni : ι\nx : M i\n⊢ ↑(↑lift (Pi.mulSingle i (MonoidHom.id (M i)))) (↑of x) = x\n[PROOFSTEP]\nsimp only [lift_of, Pi.mulSingle_eq_same, MonoidHom.id_apply]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni : ι\n⊢ Function.Injective ↑of\n[PROOFSTEP]\nclassical exact (of_leftInverse i).injective\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni : ι\n⊢ Function.Injective ↑of\n[PROOFSTEP]\nexact (of_leftInverse i).injective\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nf : (i : ι) → M i →* N\ns : Submonoid N\nh : ∀ (i : ι), MonoidHom.mrange (f i) ≤ s\n⊢ MonoidHom.mrange (↑lift f) ≤ s\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩\n[GOAL]\ncase intro\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nf : (i : ι) → M i →* N\ns : Submonoid N\nh : ∀ (i : ι), MonoidHom.mrange (f i) ≤ s\nx : CoprodI fun i => M i\n⊢ ↑(↑lift f) x ∈ s\n[PROOFSTEP]\ninduction' x using CoprodI.induction_on with i x x y hx hy\n[GOAL]\ncase intro.h_one\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nf : (i : ι) → M i →* N\ns : Submonoid N\nh : ∀ (i : ι), MonoidHom.mrange (f i) ≤ s\n⊢ ↑(↑lift f) 1 ∈ s\n[PROOFSTEP]\nexact s.one_mem\n[GOAL]\ncase intro.h_of\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nf : (i : ι) → M i →* N\ns : Submonoid N\nh : ∀ (i : ι), MonoidHom.mrange (f i) ≤ s\ni : ι\nx : M i\n⊢ ↑(↑lift f) (↑of x) ∈ s\n[PROOFSTEP]\nsimp only [lift_of, SetLike.mem_coe]\n[GOAL]\ncase intro.h_of\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nf : (i : ι) → M i →* N\ns : Submonoid N\nh : ∀ (i : ι), MonoidHom.mrange (f i) ≤ s\ni : ι\nx : M i\n⊢ ↑(f i) x ∈ s\n[PROOFSTEP]\nexact h i (Set.mem_range_self x)\n[GOAL]\ncase intro.h_mul\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nf : (i : ι) → M i →* N\ns : Submonoid N\nh : ∀ (i : ι), MonoidHom.mrange (f i) ≤ s\nx y : CoprodI fun i => M i\nhx : ↑(↑lift f) x ∈ s\nhy : ↑(↑lift f) y ∈ s\n⊢ ↑(↑lift f) (x * y) ∈ s\n[PROOFSTEP]\nsimp only [map_mul, SetLike.mem_coe]\n[GOAL]\ncase intro.h_mul\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nf : (i : ι) → M i →* N\ns : Submonoid N\nh : ∀ (i : ι), MonoidHom.mrange (f i) ≤ s\nx y : CoprodI fun i => M i\nhx : ↑(↑lift f) x ∈ s\nhy : ↑(↑lift f) y ∈ s\n⊢ ↑(↑lift f) x * ↑(↑lift f) y ∈ s\n[PROOFSTEP]\nexact s.mul_mem hx hy\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nf : (i : ι) → M i →* N\n⊢ MonoidHom.mrange (↑lift f) = ⨆ (i : ι), MonoidHom.mrange (f i)\n[PROOFSTEP]\napply le_antisymm (lift_mrange_le f fun i => le_iSup (fun i => MonoidHom.mrange (f i)) i)\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nf : (i : ι) → M i →* N\n⊢ ⨆ (i : ι), MonoidHom.mrange (f i) ≤ MonoidHom.mrange (↑lift f)\n[PROOFSTEP]\napply iSup_le _\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nf : (i : ι) → M i →* N\n⊢ ∀ (i : ι), MonoidHom.mrange (f i) ≤ MonoidHom.mrange (↑lift f)\n[PROOFSTEP]\nrintro i _ ⟨x, rfl⟩\n[GOAL]\ncase intro\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nf : (i : ι) → M i →* N\ni : ι\nx : M i\n⊢ ↑(f i) x ∈ MonoidHom.mrange (↑lift f)\n[PROOFSTEP]\nexact ⟨of x, by simp only [lift_of]⟩\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝¹ : Monoid N✝\nN : Type u_4\ninst✝ : Monoid N\nf : (i : ι) → M i →* N\ni : ι\nx : M i\n⊢ ↑(↑lift f) (↑of x) = ↑(f i) x\n[PROOFSTEP]\nsimp only [lift_of]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\nsrc✝¹ : Inv (CoprodI G) := inferInstanceAs (Inv (CoprodI G))\nsrc✝ : Monoid (CoprodI G) := inferInstanceAs (Monoid (CoprodI G))\n⊢ ∀ (a : CoprodI G), a⁻¹ * a = 1\n[PROOFSTEP]\nintro m\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\nsrc✝¹ : Inv (CoprodI G) := inferInstanceAs (Inv (CoprodI G))\nsrc✝ : Monoid (CoprodI G) := inferInstanceAs (Monoid (CoprodI G))\nm : CoprodI G\n⊢ m⁻¹ * m = 1\n[PROOFSTEP]\nrw [inv_def]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\nsrc✝¹ : Inv (CoprodI G) := inferInstanceAs (Inv (CoprodI G))\nsrc✝ : Monoid (CoprodI G) := inferInstanceAs (Monoid (CoprodI G))\nm : CoprodI G\n⊢ MulOpposite.unop\n        (↑(↑lift fun i => MonoidHom.comp (↑MonoidHom.op of) (MulEquiv.toMonoidHom (MulEquiv.inv' (G i)))) m) *\n      m =\n    1\n[PROOFSTEP]\ninduction m using CoprodI.induction_on with\n| h_one => rw [MonoidHom.map_one, MulOpposite.unop_one, one_mul]\n| h_of m ih =>\n  change of _⁻¹ * of _ = 1\n  rw [← of.map_mul, mul_left_inv, of.map_one]\n| h_mul x y ihx ihy => rw [MonoidHom.map_mul, MulOpposite.unop_mul, mul_assoc, ← mul_assoc _ x y, ihx, one_mul, ihy]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\nsrc✝¹ : Inv (CoprodI G) := inferInstanceAs (Inv (CoprodI G))\nsrc✝ : Monoid (CoprodI G) := inferInstanceAs (Monoid (CoprodI G))\nm : CoprodI G\n⊢ MulOpposite.unop\n        (↑(↑lift fun i => MonoidHom.comp (↑MonoidHom.op of) (MulEquiv.toMonoidHom (MulEquiv.inv' (G i)))) m) *\n      m =\n    1\n[PROOFSTEP]\ninduction m using CoprodI.induction_on with\n| h_one => rw [MonoidHom.map_one, MulOpposite.unop_one, one_mul]\n| h_of m ih =>\n  change of _⁻¹ * of _ = 1\n  rw [← of.map_mul, mul_left_inv, of.map_one]\n| h_mul x y ihx ihy => rw [MonoidHom.map_mul, MulOpposite.unop_mul, mul_assoc, ← mul_assoc _ x y, ihx, one_mul, ihy]\n[GOAL]\ncase h_one\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\nsrc✝¹ : Inv (CoprodI G) := inferInstanceAs (Inv (CoprodI G))\nsrc✝ : Monoid (CoprodI G) := inferInstanceAs (Monoid (CoprodI G))\n⊢ MulOpposite.unop\n        (↑(↑lift fun i => MonoidHom.comp (↑MonoidHom.op of) (MulEquiv.toMonoidHom (MulEquiv.inv' (G i)))) 1) *\n      1 =\n    1\n[PROOFSTEP]\n\n| h_one => rw [MonoidHom.map_one, MulOpposite.unop_one, one_mul]\n[GOAL]\ncase h_one\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\nsrc✝¹ : Inv (CoprodI G) := inferInstanceAs (Inv (CoprodI G))\nsrc✝ : Monoid (CoprodI G) := inferInstanceAs (Monoid (CoprodI G))\n⊢ MulOpposite.unop\n        (↑(↑lift fun i => MonoidHom.comp (↑MonoidHom.op of) (MulEquiv.toMonoidHom (MulEquiv.inv' (G i)))) 1) *\n      1 =\n    1\n[PROOFSTEP]\nrw [MonoidHom.map_one, MulOpposite.unop_one, one_mul]\n[GOAL]\ncase h_of\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\nsrc✝¹ : Inv (CoprodI G) := inferInstanceAs (Inv (CoprodI G))\nsrc✝ : Monoid (CoprodI G) := inferInstanceAs (Monoid (CoprodI G))\nm : ι\nih : G m\n⊢ MulOpposite.unop\n        (↑(↑lift fun i => MonoidHom.comp (↑MonoidHom.op of) (MulEquiv.toMonoidHom (MulEquiv.inv' (G i)))) (↑of ih)) *\n      ↑of ih =\n    1\n[PROOFSTEP]\n\n| h_of m ih =>\n  change of _⁻¹ * of _ = 1\n  rw [← of.map_mul, mul_left_inv, of.map_one]\n[GOAL]\ncase h_of\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\nsrc✝¹ : Inv (CoprodI G) := inferInstanceAs (Inv (CoprodI G))\nsrc✝ : Monoid (CoprodI G) := inferInstanceAs (Monoid (CoprodI G))\nm : ι\nih : G m\n⊢ MulOpposite.unop\n        (↑(↑lift fun i => MonoidHom.comp (↑MonoidHom.op of) (MulEquiv.toMonoidHom (MulEquiv.inv' (G i)))) (↑of ih)) *\n      ↑of ih =\n    1\n[PROOFSTEP]\nchange of _⁻¹ * of _ = 1\n[GOAL]\ncase h_of\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\nsrc✝¹ : Inv (CoprodI G) := inferInstanceAs (Inv (CoprodI G))\nsrc✝ : Monoid (CoprodI G) := inferInstanceAs (Monoid (CoprodI G))\nm : ι\nih : G m\n⊢ ↑of { fst := m, snd := ih }.snd⁻¹ * ↑of ih = 1\n[PROOFSTEP]\nrw [← of.map_mul, mul_left_inv, of.map_one]\n[GOAL]\ncase h_mul\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\nsrc✝¹ : Inv (CoprodI G) := inferInstanceAs (Inv (CoprodI G))\nsrc✝ : Monoid (CoprodI G) := inferInstanceAs (Monoid (CoprodI G))\nx y : CoprodI G\nihx :\n  MulOpposite.unop\n        (↑(↑lift fun i => MonoidHom.comp (↑MonoidHom.op of) (MulEquiv.toMonoidHom (MulEquiv.inv' (G i)))) x) *\n      x =\n    1\nihy :\n  MulOpposite.unop\n        (↑(↑lift fun i => MonoidHom.comp (↑MonoidHom.op of) (MulEquiv.toMonoidHom (MulEquiv.inv' (G i)))) y) *\n      y =\n    1\n⊢ MulOpposite.unop\n        (↑(↑lift fun i => MonoidHom.comp (↑MonoidHom.op of) (MulEquiv.toMonoidHom (MulEquiv.inv' (G i)))) (x * y)) *\n      (x * y) =\n    1\n[PROOFSTEP]\n\n| h_mul x y ihx ihy => rw [MonoidHom.map_mul, MulOpposite.unop_mul, mul_assoc, ← mul_assoc _ x y, ihx, one_mul, ihy]\n[GOAL]\ncase h_mul\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\nsrc✝¹ : Inv (CoprodI G) := inferInstanceAs (Inv (CoprodI G))\nsrc✝ : Monoid (CoprodI G) := inferInstanceAs (Monoid (CoprodI G))\nx y : CoprodI G\nihx :\n  MulOpposite.unop\n        (↑(↑lift fun i => MonoidHom.comp (↑MonoidHom.op of) (MulEquiv.toMonoidHom (MulEquiv.inv' (G i)))) x) *\n      x =\n    1\nihy :\n  MulOpposite.unop\n        (↑(↑lift fun i => MonoidHom.comp (↑MonoidHom.op of) (MulEquiv.toMonoidHom (MulEquiv.inv' (G i)))) y) *\n      y =\n    1\n⊢ MulOpposite.unop\n        (↑(↑lift fun i => MonoidHom.comp (↑MonoidHom.op of) (MulEquiv.toMonoidHom (MulEquiv.inv' (G i)))) (x * y)) *\n      (x * y) =\n    1\n[PROOFSTEP]\nrw [MonoidHom.map_mul, MulOpposite.unop_mul, mul_assoc, ← mul_assoc _ x y, ihx, one_mul, ihy]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝² : Monoid N✝\nG : ι → Type u_4\ninst✝¹ : (i : ι) → Group (G i)\nN : Type u_5\ninst✝ : Group N\nf : (i : ι) → G i →* N\ns : Subgroup N\nh : ∀ (i : ι), MonoidHom.range (f i) ≤ s\n⊢ MonoidHom.range (↑lift f) ≤ s\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩\n[GOAL]\ncase intro\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝² : Monoid N✝\nG : ι → Type u_4\ninst✝¹ : (i : ι) → Group (G i)\nN : Type u_5\ninst✝ : Group N\nf : (i : ι) → G i →* N\ns : Subgroup N\nh : ∀ (i : ι), MonoidHom.range (f i) ≤ s\nx : CoprodI fun i => G i\n⊢ ↑(↑lift f) x ∈ s\n[PROOFSTEP]\ninduction' x using CoprodI.induction_on with i x x y hx hy\n[GOAL]\ncase intro.h_one\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝² : Monoid N✝\nG : ι → Type u_4\ninst✝¹ : (i : ι) → Group (G i)\nN : Type u_5\ninst✝ : Group N\nf : (i : ι) → G i →* N\ns : Subgroup N\nh : ∀ (i : ι), MonoidHom.range (f i) ≤ s\n⊢ ↑(↑lift f) 1 ∈ s\n[PROOFSTEP]\nexact s.one_mem\n[GOAL]\ncase intro.h_of\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝² : Monoid N✝\nG : ι → Type u_4\ninst✝¹ : (i : ι) → Group (G i)\nN : Type u_5\ninst✝ : Group N\nf : (i : ι) → G i →* N\ns : Subgroup N\nh : ∀ (i : ι), MonoidHom.range (f i) ≤ s\ni : ι\nx : G i\n⊢ ↑(↑lift f) (↑of x) ∈ s\n[PROOFSTEP]\nsimp only [lift_of, SetLike.mem_coe]\n[GOAL]\ncase intro.h_of\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝² : Monoid N✝\nG : ι → Type u_4\ninst✝¹ : (i : ι) → Group (G i)\nN : Type u_5\ninst✝ : Group N\nf : (i : ι) → G i →* N\ns : Subgroup N\nh : ∀ (i : ι), MonoidHom.range (f i) ≤ s\ni : ι\nx : G i\n⊢ ↑(f i) x ∈ s\n[PROOFSTEP]\nexact h i (Set.mem_range_self x)\n[GOAL]\ncase intro.h_mul\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝² : Monoid N✝\nG : ι → Type u_4\ninst✝¹ : (i : ι) → Group (G i)\nN : Type u_5\ninst✝ : Group N\nf : (i : ι) → G i →* N\ns : Subgroup N\nh : ∀ (i : ι), MonoidHom.range (f i) ≤ s\nx y : CoprodI fun i => G i\nhx : ↑(↑lift f) x ∈ s\nhy : ↑(↑lift f) y ∈ s\n⊢ ↑(↑lift f) (x * y) ∈ s\n[PROOFSTEP]\nsimp only [map_mul, SetLike.mem_coe]\n[GOAL]\ncase intro.h_mul\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝² : Monoid N✝\nG : ι → Type u_4\ninst✝¹ : (i : ι) → Group (G i)\nN : Type u_5\ninst✝ : Group N\nf : (i : ι) → G i →* N\ns : Subgroup N\nh : ∀ (i : ι), MonoidHom.range (f i) ≤ s\nx y : CoprodI fun i => G i\nhx : ↑(↑lift f) x ∈ s\nhy : ↑(↑lift f) y ∈ s\n⊢ ↑(↑lift f) x * ↑(↑lift f) y ∈ s\n[PROOFSTEP]\nexact s.mul_mem hx hy\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝² : Monoid N✝\nG : ι → Type u_4\ninst✝¹ : (i : ι) → Group (G i)\nN : Type u_5\ninst✝ : Group N\nf : (i : ι) → G i →* N\n⊢ MonoidHom.range (↑lift f) = ⨆ (i : ι), MonoidHom.range (f i)\n[PROOFSTEP]\napply le_antisymm (lift_range_le _ f fun i => le_iSup (fun i => MonoidHom.range (f i)) i)\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝² : Monoid N✝\nG : ι → Type u_4\ninst✝¹ : (i : ι) → Group (G i)\nN : Type u_5\ninst✝ : Group N\nf : (i : ι) → G i →* N\n⊢ ⨆ (i : ι), MonoidHom.range (f i) ≤ MonoidHom.range (↑lift f)\n[PROOFSTEP]\napply iSup_le _\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝² : Monoid N✝\nG : ι → Type u_4\ninst✝¹ : (i : ι) → Group (G i)\nN : Type u_5\ninst✝ : Group N\nf : (i : ι) → G i →* N\n⊢ ∀ (i : ι), MonoidHom.range (f i) ≤ MonoidHom.range (↑lift f)\n[PROOFSTEP]\nrintro i _ ⟨x, rfl⟩\n[GOAL]\ncase intro\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝² : Monoid N✝\nG : ι → Type u_4\ninst✝¹ : (i : ι) → Group (G i)\nN : Type u_5\ninst✝ : Group N\nf : (i : ι) → G i →* N\ni : ι\nx : G i\n⊢ ↑(f i) x ∈ MonoidHom.range (↑lift f)\n[PROOFSTEP]\nexact ⟨of x, by simp only [lift_of]⟩\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN✝ : Type u_3\ninst✝² : Monoid N✝\nG : ι → Type u_4\ninst✝¹ : (i : ι) → Group (G i)\nN : Type u_5\ninst✝ : Group N\nf : (i : ι) → G i →* N\ni : ι\nx : G i\n⊢ ↑(↑lift f) (↑of x) = ↑(f i) x\n[PROOFSTEP]\nsimp only [lift_of]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\n⊢ ∀ (l : (i : ι) × M i), l ∈ [] → l.snd ≠ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nw : Word M\ni : ι\n⊢ ¬fstIdx w ≠ some i ↔ ¬∀ (l : (i : ι) × M i), l ∈ List.head? w.toList → i ≠ l.fst\n[PROOFSTEP]\nsimp [fstIdx]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni : ι\n⊢ fstIdx empty ≠ some i\n[PROOFSTEP]\ntauto\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\np : Pair M i\nh : ¬p.head = 1\n⊢ ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := p.head } :: p.tail.toList → l.snd ≠ 1\n[PROOFSTEP]\nsimp only [List.mem_cons]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\np : Pair M i\nh : ¬p.head = 1\n⊢ ∀ (l : (i : ι) × M i), l = { fst := i, snd := p.head } ∨ l ∈ p.tail.toList → l.snd ≠ 1\n[PROOFSTEP]\nrintro l (rfl | hl)\n[GOAL]\ncase inl\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\np : Pair M i\nh : ¬p.head = 1\n⊢ { fst := i, snd := p.head }.snd ≠ 1\ncase inr\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\np : Pair M i\nh : ¬p.head = 1\nl : (i : ι) × M i\nhl : l ∈ p.tail.toList\n⊢ l.snd ≠ 1\n[PROOFSTEP]\nexact h\n[GOAL]\ncase inr\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\np : Pair M i\nh : ¬p.head = 1\nl : (i : ι) × M i\nhl : l ∈ p.tail.toList\n⊢ l.snd ≠ 1\n[PROOFSTEP]\nexact p.tail.ne_one l hl\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := m } :: ls)\n⊢ { toList := { fst := i, snd := m } :: ls, ne_one := h1, chain_ne := h2 } =\n    rcons\n      { head := m, tail := Monoid.CoprodI.Word.mkAux ls h1 h2,\n        fstIdx_ne := (_ : fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i) }\n[PROOFSTEP]\nrw [rcons, dif_neg]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := m } :: ls)\n⊢ { toList := { fst := i, snd := m } :: ls, ne_one := h1, chain_ne := h2 } =\n    {\n      toList :=\n        { fst := i,\n            snd :=\n              { head := m, tail := Monoid.CoprodI.Word.mkAux ls h1 h2,\n                  fstIdx_ne := (_ : fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i) }.head } ::\n          { head := m, tail := Monoid.CoprodI.Word.mkAux ls h1 h2,\n                fstIdx_ne := (_ : fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i) }.tail.toList,\n      ne_one :=\n        (_ :\n          ∀ (l : (i : ι) × M i),\n            l ∈\n                { fst := i,\n                    snd :=\n                      { head := m, tail := Monoid.CoprodI.Word.mkAux ls h1 h2,\n                          fstIdx_ne := (_ : fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i) }.head } ::\n                  { head := m, tail := Monoid.CoprodI.Word.mkAux ls h1 h2,\n                        fstIdx_ne := (_ : fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i) }.tail.toList →\n              l.snd ≠ 1),\n      chain_ne :=\n        (_ :\n          List.Chain' (fun l l' => l.fst ≠ l'.fst)\n            ({ fst := i,\n                snd :=\n                  { head := m, tail := Monoid.CoprodI.Word.mkAux ls h1 h2,\n                      fstIdx_ne := (_ : fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i) }.head } ::\n              { head := m, tail := Monoid.CoprodI.Word.mkAux ls h1 h2,\n                    fstIdx_ne := (_ : fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i) }.tail.toList)) }\ncase hnc\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := m } :: ls)\n⊢ ¬{ head := m, tail := Monoid.CoprodI.Word.mkAux ls h1 h2,\n          fstIdx_ne := (_ : fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i) }.head =\n      1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hnc\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := m } :: ls)\n⊢ ¬{ head := m, tail := Monoid.CoprodI.Word.mkAux ls h1 h2,\n          fstIdx_ne := (_ : fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i) }.head =\n      1\n[PROOFSTEP]\nexact h1 ⟨i, m⟩ (ls.mem_cons_self _)\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\np : Pair M i\nhm : p.head = 1\n⊢ prod (rcons p) = ↑of p.head * prod p.tail\n[PROOFSTEP]\nrw [rcons, dif_pos hm, hm, MonoidHom.map_one, one_mul]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\np : Pair M i\nhm : ¬p.head = 1\n⊢ prod (rcons p) = ↑of p.head * prod p.tail\n[PROOFSTEP]\nrw [rcons, dif_neg hm, prod, List.map_cons, List.prod_cons, prod]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\n⊢ Function.Injective rcons\n[PROOFSTEP]\nrintro ⟨m, w, h⟩ ⟨m', w', h'⟩ he\n[GOAL]\ncase mk.mk\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhe : rcons { head := m, tail := w, fstIdx_ne := h } = rcons { head := m', tail := w', fstIdx_ne := h' }\n⊢ { head := m, tail := w, fstIdx_ne := h } = { head := m', tail := w', fstIdx_ne := h' }\n[PROOFSTEP]\nby_cases hm : m = 1\n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhe : rcons { head := m, tail := w, fstIdx_ne := h } = rcons { head := m', tail := w', fstIdx_ne := h' }\nhm : m = 1\n⊢ { head := m, tail := w, fstIdx_ne := h } = { head := m', tail := w', fstIdx_ne := h' }\n[PROOFSTEP]\nby_cases hm' : m' = 1\n[GOAL]\ncase neg\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhe : rcons { head := m, tail := w, fstIdx_ne := h } = rcons { head := m', tail := w', fstIdx_ne := h' }\nhm : ¬m = 1\n⊢ { head := m, tail := w, fstIdx_ne := h } = { head := m', tail := w', fstIdx_ne := h' }\n[PROOFSTEP]\nby_cases hm' : m' = 1\n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhe : rcons { head := m, tail := w, fstIdx_ne := h } = rcons { head := m', tail := w', fstIdx_ne := h' }\nhm : m = 1\nhm' : m' = 1\n⊢ { head := m, tail := w, fstIdx_ne := h } = { head := m', tail := w', fstIdx_ne := h' }\n[PROOFSTEP]\nsimp only [rcons, dif_pos hm, dif_pos hm'] at he \n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhm : m = 1\nhm' : m' = 1\nhe : w = w'\n⊢ { head := m, tail := w, fstIdx_ne := h } = { head := m', tail := w', fstIdx_ne := h' }\n[PROOFSTEP]\naesop\n[GOAL]\ncase neg\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhe : rcons { head := m, tail := w, fstIdx_ne := h } = rcons { head := m', tail := w', fstIdx_ne := h' }\nhm : m = 1\nhm' : ¬m' = 1\n⊢ { head := m, tail := w, fstIdx_ne := h } = { head := m', tail := w', fstIdx_ne := h' }\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase neg.h\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhe : rcons { head := m, tail := w, fstIdx_ne := h } = rcons { head := m', tail := w', fstIdx_ne := h' }\nhm : m = 1\nhm' : ¬m' = 1\n⊢ False\n[PROOFSTEP]\nsimp only [rcons, dif_pos hm, dif_neg hm'] at he \n[GOAL]\ncase neg.h\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhm : m = 1\nhm' : ¬m' = 1\nhe :\n  w =\n    { toList := { fst := i, snd := m' } :: w'.toList,\n      ne_one :=\n        (_ :\n          ∀ (l : (i : ι) × M i),\n            l ∈\n                { fst := i, snd := { head := m', tail := w', fstIdx_ne := h' }.head } ::\n                  { head := m', tail := w', fstIdx_ne := h' }.tail.toList →\n              l.snd ≠ 1),\n      chain_ne :=\n        (_ :\n          List.Chain' (fun l l' => l.fst ≠ l'.fst)\n            ({ fst := i, snd := { head := m', tail := w', fstIdx_ne := h' }.head } ::\n              { head := m', tail := w', fstIdx_ne := h' }.tail.toList)) }\n⊢ False\n[PROOFSTEP]\nrw [he] at h \n[GOAL]\ncase neg.h\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhm : m = 1\nhm' : ¬m' = 1\nh :\n  fstIdx\n      { toList := { fst := i, snd := m' } :: w'.toList,\n        ne_one :=\n          (_ :\n            ∀ (l : (i : ι) × M i),\n              l ∈\n                  { fst := i, snd := { head := m', tail := w', fstIdx_ne := h' }.head } ::\n                    { head := m', tail := w', fstIdx_ne := h' }.tail.toList →\n                l.snd ≠ 1),\n        chain_ne :=\n          (_ :\n            List.Chain' (fun l l' => l.fst ≠ l'.fst)\n              ({ fst := i, snd := { head := m', tail := w', fstIdx_ne := h' }.head } ::\n                { head := m', tail := w', fstIdx_ne := h' }.tail.toList)) } ≠\n    some i\nhe :\n  w =\n    { toList := { fst := i, snd := m' } :: w'.toList,\n      ne_one :=\n        (_ :\n          ∀ (l : (i : ι) × M i),\n            l ∈\n                { fst := i, snd := { head := m', tail := w', fstIdx_ne := h' }.head } ::\n                  { head := m', tail := w', fstIdx_ne := h' }.tail.toList →\n              l.snd ≠ 1),\n      chain_ne :=\n        (_ :\n          List.Chain' (fun l l' => l.fst ≠ l'.fst)\n            ({ fst := i, snd := { head := m', tail := w', fstIdx_ne := h' }.head } ::\n              { head := m', tail := w', fstIdx_ne := h' }.tail.toList)) }\n⊢ False\n[PROOFSTEP]\nexact h rfl\n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhe : rcons { head := m, tail := w, fstIdx_ne := h } = rcons { head := m', tail := w', fstIdx_ne := h' }\nhm : ¬m = 1\nhm' : m' = 1\n⊢ { head := m, tail := w, fstIdx_ne := h } = { head := m', tail := w', fstIdx_ne := h' }\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase pos.h\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhe : rcons { head := m, tail := w, fstIdx_ne := h } = rcons { head := m', tail := w', fstIdx_ne := h' }\nhm : ¬m = 1\nhm' : m' = 1\n⊢ False\n[PROOFSTEP]\nsimp only [rcons, dif_pos hm', dif_neg hm] at he \n[GOAL]\ncase pos.h\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhm : ¬m = 1\nhm' : m' = 1\nhe :\n  { toList := { fst := i, snd := m } :: w.toList,\n      ne_one :=\n        (_ :\n          ∀ (l : (i : ι) × M i),\n            l ∈\n                { fst := i, snd := { head := m, tail := w, fstIdx_ne := h }.head } ::\n                  { head := m, tail := w, fstIdx_ne := h }.tail.toList →\n              l.snd ≠ 1),\n      chain_ne :=\n        (_ :\n          List.Chain' (fun l l' => l.fst ≠ l'.fst)\n            ({ fst := i, snd := { head := m, tail := w, fstIdx_ne := h }.head } ::\n              { head := m, tail := w, fstIdx_ne := h }.tail.toList)) } =\n    w'\n⊢ False\n[PROOFSTEP]\nrw [← he] at h' \n[GOAL]\ncase pos.h\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nhm : ¬m = 1\nh' :\n  fstIdx\n      { toList := { fst := i, snd := m } :: w.toList,\n        ne_one :=\n          (_ :\n            ∀ (l : (i : ι) × M i),\n              l ∈\n                  { fst := i, snd := { head := m, tail := w, fstIdx_ne := h }.head } ::\n                    { head := m, tail := w, fstIdx_ne := h }.tail.toList →\n                l.snd ≠ 1),\n        chain_ne :=\n          (_ :\n            List.Chain' (fun l l' => l.fst ≠ l'.fst)\n              ({ fst := i, snd := { head := m, tail := w, fstIdx_ne := h }.head } ::\n                { head := m, tail := w, fstIdx_ne := h }.tail.toList)) } ≠\n    some i\nhm' : m' = 1\nhe :\n  { toList := { fst := i, snd := m } :: w.toList,\n      ne_one :=\n        (_ :\n          ∀ (l : (i : ι) × M i),\n            l ∈\n                { fst := i, snd := { head := m, tail := w, fstIdx_ne := h }.head } ::\n                  { head := m, tail := w, fstIdx_ne := h }.tail.toList →\n              l.snd ≠ 1),\n      chain_ne :=\n        (_ :\n          List.Chain' (fun l l' => l.fst ≠ l'.fst)\n            ({ fst := i, snd := { head := m, tail := w, fstIdx_ne := h }.head } ::\n              { head := m, tail := w, fstIdx_ne := h }.tail.toList)) } =\n    w'\n⊢ False\n[PROOFSTEP]\nexact h' rfl\n[GOAL]\ncase neg\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhe : rcons { head := m, tail := w, fstIdx_ne := h } = rcons { head := m', tail := w', fstIdx_ne := h' }\nhm : ¬m = 1\nhm' : ¬m' = 1\n⊢ { head := m, tail := w, fstIdx_ne := h } = { head := m', tail := w', fstIdx_ne := h' }\n[PROOFSTEP]\nhave : m = m' ∧ w.toList = w'.toList := by\n  simpa [rcons, dif_neg hm, dif_neg hm', true_and_iff, eq_self_iff_true, Subtype.mk_eq_mk, heq_iff_eq, ←\n    Subtype.ext_iff_val] using he\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhe : rcons { head := m, tail := w, fstIdx_ne := h } = rcons { head := m', tail := w', fstIdx_ne := h' }\nhm : ¬m = 1\nhm' : ¬m' = 1\n⊢ m = m' ∧ w.toList = w'.toList\n[PROOFSTEP]\nsimpa [rcons, dif_neg hm, dif_neg hm', true_and_iff, eq_self_iff_true, Subtype.mk_eq_mk, heq_iff_eq, ←\n  Subtype.ext_iff_val] using he\n[GOAL]\ncase neg\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh : fstIdx w ≠ some i\nm' : M i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhe : rcons { head := m, tail := w, fstIdx_ne := h } = rcons { head := m', tail := w', fstIdx_ne := h' }\nhm : ¬m = 1\nhm' : ¬m' = 1\nthis : m = m' ∧ w.toList = w'.toList\n⊢ { head := m, tail := w, fstIdx_ne := h } = { head := m', tail := w', fstIdx_ne := h' }\n[PROOFSTEP]\nrcases this with ⟨rfl, h⟩\n[GOAL]\ncase neg.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh✝ : fstIdx w ≠ some i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhm : ¬m = 1\nh : w.toList = w'.toList\nhe : rcons { head := m, tail := w, fstIdx_ne := h✝ } = rcons { head := m, tail := w', fstIdx_ne := h' }\nhm' : ¬m = 1\n⊢ { head := m, tail := w, fstIdx_ne := h✝ } = { head := m, tail := w', fstIdx_ne := h' }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase neg.intro.e_tail\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\ninst✝ : (i : ι) → DecidableEq (M i)\ni : ι\nm : M i\nw : Word M\nh✝ : fstIdx w ≠ some i\nw' : Word M\nh' : fstIdx w' ≠ some i\nhm : ¬m = 1\nh : w.toList = w'.toList\nhe : rcons { head := m, tail := w, fstIdx_ne := h✝ } = rcons { head := m, tail := w', fstIdx_ne := h' }\nhm' : ¬m = 1\n⊢ w = w'\n[PROOFSTEP]\nexact Word.ext _ _ h\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nw : Word M\nne_one✝ : ∀ (l : (i : ι) × M i), l ∈ [] → l.snd ≠ 1\nchain_ne✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) []\nh✝ : w = { toList := [], ne_one := ne_one✝, chain_ne := chain_ne✝ }\n⊢ fstIdx w ≠ some i\n[PROOFSTEP]\nsubst w\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nne_one✝ : ∀ (l : (i : ι) × M i), l ∈ [] → l.snd ≠ 1\nchain_ne✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) []\n⊢ fstIdx { toList := [], ne_one := ne_one✝, chain_ne := chain_ne✝ } ≠ some i\n[PROOFSTEP]\nsimp [fstIdx]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nw : Word M\nne_one✝ : ∀ (l : (i : ι) × M i), l ∈ [] → l.snd ≠ 1\nchain_ne✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) []\nh✝ : w = { toList := [], ne_one := ne_one✝, chain_ne := chain_ne✝ }\n⊢ rcons { head := 1, tail := w, fstIdx_ne := (_ : fstIdx w ≠ some i) } =\n    namedPattern w { toList := [], ne_one := ne_one✝, chain_ne := chain_ne✝ } h✝\n[PROOFSTEP]\nsubst w\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nne_one✝ : ∀ (l : (i : ι) × M i), l ∈ [] → l.snd ≠ 1\nchain_ne✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) []\n⊢ rcons\n      { head := 1, tail := { toList := [], ne_one := ne_one✝, chain_ne := chain_ne✝ },\n        fstIdx_ne := (_ : fstIdx { toList := [], ne_one := ne_one✝, chain_ne := chain_ne✝ } ≠ some i) } =\n    namedPattern { toList := [], ne_one := ne_one✝, chain_ne := chain_ne✝ }\n      { toList := [], ne_one := ne_one✝, chain_ne := chain_ne✝ }\n      (_ :\n        { toList := [], ne_one := ne_one✝, chain_ne := chain_ne✝ } =\n          { toList := [], ne_one := ne_one✝, chain_ne := chain_ne✝ })\n[PROOFSTEP]\nsimp [rcons]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nw : Word M\nj : ι\nm : M j\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := j, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := j, snd := m } :: ls)\nh✝ : w = { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 }\nij : i = j\n⊢ fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i\n[PROOFSTEP]\ncases ij\n[GOAL]\ncase refl\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nw : Word M\nls : List ((i : ι) × M i)\nm : M i\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := m } :: ls)\nh✝ : w = { toList := { fst := i, snd := m } :: ls, ne_one := h1, chain_ne := h2 }\n⊢ fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i\n[PROOFSTEP]\nexact fstIdx_ne_iff.mpr h2.rel_head?\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nw : Word M\nj : ι\nm : M j\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := j, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := j, snd := m } :: ls)\nh✝ : w = { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 }\nij : i = j\n⊢ rcons\n      { head := (_ : j = i) ▸ m, tail := Monoid.CoprodI.Word.mkAux ls h1 h2,\n        fstIdx_ne := (_ : fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i) } =\n    namedPattern w { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 } h✝\n[PROOFSTEP]\ncases ij\n[GOAL]\ncase refl\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nw : Word M\nls : List ((i : ι) × M i)\nm : M i\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := m } :: ls)\nh✝ : w = { toList := { fst := i, snd := m } :: ls, ne_one := h1, chain_ne := h2 }\n⊢ rcons\n      { head := (_ : i = i) ▸ m, tail := Monoid.CoprodI.Word.mkAux ls h1 h2,\n        fstIdx_ne := (_ : fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i) } =\n    namedPattern w { toList := { fst := i, snd := m } :: ls, ne_one := h1, chain_ne := h2 } h✝\n[PROOFSTEP]\nexact cons_eq_rcons.symm\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nw : Word M\nj : ι\nm : M j\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := j, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := j, snd := m } :: ls)\nh✝ : w = { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 }\nij : ¬i = j\n⊢ fstIdx w ≠ some i\n[PROOFSTEP]\nsubst w\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni j : ι\nm : M j\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := j, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := j, snd := m } :: ls)\nij : ¬i = j\n⊢ fstIdx { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 } ≠ some i\n[PROOFSTEP]\nexact (Option.some_injective _).ne (Ne.symm ij)\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nw : Word M\nj : ι\nm : M j\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := j, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := j, snd := m } :: ls)\nh✝ : w = { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 }\nij : ¬i = j\n⊢ rcons { head := 1, tail := w, fstIdx_ne := (_ : fstIdx w ≠ some i) } =\n    namedPattern w { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 } h✝\n[PROOFSTEP]\nsubst w\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni j : ι\nm : M j\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := j, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := j, snd := m } :: ls)\nij : ¬i = j\n⊢ rcons\n      { head := 1, tail := { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 },\n        fstIdx_ne := (_ : fstIdx { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 } ≠ some i) } =\n    namedPattern { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 }\n      { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 }\n      (_ :\n        { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 } =\n          { toList := { fst := j, snd := m } :: ls, ne_one := h1, chain_ne := h2 })\n[PROOFSTEP]\nsimp [rcons]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nw : Word M\n⊢ 1 • w = w\n[PROOFSTEP]\napply (equivPair i).symm_apply_eq.mpr\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nw : Word M\n⊢ (let src := ↑(equivPair i) w;\n    { head := 1 * (↑(equivPair i) w).head, tail := src.tail, fstIdx_ne := (_ : fstIdx src.tail ≠ some i) }) =\n    ↑(equivPair i) w\n[PROOFSTEP]\nsimp [equivPair]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nm m' : M i\nw : Word M\n⊢ (m * m') • w = m • m' • w\n[PROOFSTEP]\ndsimp [instHSMul]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nm m' : M i\nw : Word M\n⊢ rcons\n      { head := m * m' * (↑(equivPair i) w).head, tail := (↑(equivPair i) w).tail,\n        fstIdx_ne := (_ : fstIdx (↑(equivPair i) w).tail ≠ some i) } =\n    rcons\n      {\n        head :=\n          m *\n            (↑(equivPair i)\n                (rcons\n                  { head := m' * (↑(equivPair i) w).head, tail := (↑(equivPair i) w).tail,\n                    fstIdx_ne := (_ : fstIdx (↑(equivPair i) w).tail ≠ some i) })).head,\n        tail :=\n          (↑(equivPair i)\n              (rcons\n                { head := m' * (↑(equivPair i) w).head, tail := (↑(equivPair i) w).tail,\n                  fstIdx_ne := (_ : fstIdx (↑(equivPair i) w).tail ≠ some i) })).tail,\n        fstIdx_ne :=\n          (_ :\n            fstIdx\n                (↑(equivPair i)\n                    (rcons\n                      { head := m' * (↑(equivPair i) w).head, tail := (↑(equivPair i) w).tail,\n                        fstIdx_ne := (_ : fstIdx (↑(equivPair i) w).tail ≠ some i) })).tail ≠\n              some i) }\n[PROOFSTEP]\nsimp [mul_assoc, ← equivPair_symm, Equiv.apply_symm_apply]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nm : M i\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := m } :: ls)\n⊢ { toList := { fst := i, snd := m } :: ls, ne_one := h1, chain_ne := h2 } = ↑of m • Monoid.CoprodI.Word.mkAux ls h1 h2\n[PROOFSTEP]\nrw [cons_eq_rcons, of_smul_def, equivPair_eq_of_fstIdx_ne _]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nm : M i\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := m } :: ls)\n⊢ rcons\n      { head := m, tail := Monoid.CoprodI.Word.mkAux ls h1 h2,\n        fstIdx_ne := (_ : fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i) } =\n    rcons\n      (let src := { head := 1, tail := Monoid.CoprodI.Word.mkAux ls h1 h2, fstIdx_ne := ?m.459575 };\n      { head := m * { head := 1, tail := Monoid.CoprodI.Word.mkAux ls h1 h2, fstIdx_ne := ?m.459575 }.head,\n        tail := src.tail, fstIdx_ne := (_ : fstIdx src.tail ≠ some i) })\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nm : M i\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := m } :: ls)\n⊢ fstIdx (Monoid.CoprodI.Word.mkAux ls h1 h2) ≠ some i\n[PROOFSTEP]\nrw [fstIdx_ne_iff]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nm : M i\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := m } :: ls)\n⊢ ∀ (l : (i : ι) × M i), l ∈ List.head? (Monoid.CoprodI.Word.mkAux ls h1 h2).toList → i ≠ l.fst\n[PROOFSTEP]\nexact (List.chain'_cons'.1 h2).1\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nC : Word M → Prop\nh_empty : C empty\nh_smul : ∀ (i : ι) (m : M i) (w : Word M), C w → C (↑of m • w)\nw : Word M\n⊢ C w\n[PROOFSTEP]\ncases' w with ls h1 h2\n[GOAL]\ncase mk\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nC : Word M → Prop\nh_empty : C empty\nh_smul : ∀ (i : ι) (m : M i) (w : Word M), C w → C (↑of m • w)\nls : List ((i : ι) × M i)\nh1 : ∀ (l : (i : ι) × M i), l ∈ ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ls\n⊢ C { toList := ls, ne_one := h1, chain_ne := h2 }\n[PROOFSTEP]\ninduction' ls with l ls ih\n[GOAL]\ncase mk.nil\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nC : Word M → Prop\nh_empty : C empty\nh_smul : ∀ (i : ι) (m : M i) (w : Word M), C w → C (↑of m • w)\nls : List ((i : ι) × M i)\nh1✝ : ∀ (l : (i : ι) × M i), l ∈ ls → l.snd ≠ 1\nh2✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) ls\nh1 : ∀ (l : (i : ι) × M i), l ∈ [] → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) []\n⊢ C { toList := [], ne_one := h1, chain_ne := h2 }\n[PROOFSTEP]\nexact h_empty\n[GOAL]\ncase mk.cons\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nC : Word M → Prop\nh_empty : C empty\nh_smul : ∀ (i : ι) (m : M i) (w : Word M), C w → C (↑of m • w)\nls✝ : List ((i : ι) × M i)\nh1✝ : ∀ (l : (i : ι) × M i), l ∈ ls✝ → l.snd ≠ 1\nh2✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) ls✝\nl : (i : ι) × M i\nls : List ((i : ι) × M i)\nih :\n  ∀ (h1 : ∀ (l : (i : ι) × M i), l ∈ ls → l.snd ≠ 1) (h2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ls),\n    C { toList := ls, ne_one := h1, chain_ne := h2 }\nh1 : ∀ (l_1 : (i : ι) × M i), l_1 ∈ l :: ls → l_1.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) (l :: ls)\n⊢ C { toList := l :: ls, ne_one := h1, chain_ne := h2 }\n[PROOFSTEP]\ncases' l with i m\n[GOAL]\ncase mk.cons.mk\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nC : Word M → Prop\nh_empty : C empty\nh_smul : ∀ (i : ι) (m : M i) (w : Word M), C w → C (↑of m • w)\nls✝ : List ((i : ι) × M i)\nh1✝ : ∀ (l : (i : ι) × M i), l ∈ ls✝ → l.snd ≠ 1\nh2✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) ls✝\nls : List ((i : ι) × M i)\nih :\n  ∀ (h1 : ∀ (l : (i : ι) × M i), l ∈ ls → l.snd ≠ 1) (h2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ls),\n    C { toList := ls, ne_one := h1, chain_ne := h2 }\ni : ι\nm : M i\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := m } :: ls)\n⊢ C { toList := { fst := i, snd := m } :: ls, ne_one := h1, chain_ne := h2 }\n[PROOFSTEP]\nrw [cons_eq_smul]\n[GOAL]\ncase mk.cons.mk\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nC : Word M → Prop\nh_empty : C empty\nh_smul : ∀ (i : ι) (m : M i) (w : Word M), C w → C (↑of m • w)\nls✝ : List ((i : ι) × M i)\nh1✝ : ∀ (l : (i : ι) × M i), l ∈ ls✝ → l.snd ≠ 1\nh2✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) ls✝\nls : List ((i : ι) × M i)\nih :\n  ∀ (h1 : ∀ (l : (i : ι) × M i), l ∈ ls → l.snd ≠ 1) (h2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ls),\n    C { toList := ls, ne_one := h1, chain_ne := h2 }\ni : ι\nm : M i\nh1 : ∀ (l : (i : ι) × M i), l ∈ { fst := i, snd := m } :: ls → l.snd ≠ 1\nh2 : List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := m } :: ls)\n⊢ C (↑of m • Monoid.CoprodI.Word.mkAux ls h1 h2)\n[PROOFSTEP]\nexact h_smul _ _ _ (ih _ _)\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nm : CoprodI M\n⊢ ∀ (w : Word M), prod (m • w) = m * prod w\n[PROOFSTEP]\ninduction m using CoprodI.induction_on with\n| h_one =>\n  intro\n  rw [one_smul, one_mul]\n| h_of _ =>\n  intros\n  rw [of_smul_def, prod_rcons, of.map_mul, mul_assoc, ← prod_rcons, ← equivPair_symm, Equiv.symm_apply_apply]\n| h_mul x y hx hy =>\n  intro w\n  rw [mul_smul, hx, hy, mul_assoc]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nm : CoprodI M\n⊢ ∀ (w : Word M), prod (m • w) = m * prod w\n[PROOFSTEP]\ninduction m using CoprodI.induction_on with\n| h_one =>\n  intro\n  rw [one_smul, one_mul]\n| h_of _ =>\n  intros\n  rw [of_smul_def, prod_rcons, of.map_mul, mul_assoc, ← prod_rcons, ← equivPair_symm, Equiv.symm_apply_apply]\n| h_mul x y hx hy =>\n  intro w\n  rw [mul_smul, hx, hy, mul_assoc]\n[GOAL]\ncase h_one\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\n⊢ ∀ (w : Word M), prod (1 • w) = 1 * prod w\n[PROOFSTEP]\n\n| h_one =>\n  intro\n  rw [one_smul, one_mul]\n[GOAL]\ncase h_one\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\n⊢ ∀ (w : Word M), prod (1 • w) = 1 * prod w\n[PROOFSTEP]\nintro\n[GOAL]\ncase h_one\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nw✝ : Word M\n⊢ prod (1 • w✝) = 1 * prod w✝\n[PROOFSTEP]\nrw [one_smul, one_mul]\n[GOAL]\ncase h_of\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni✝ : ι\nm✝ : M i✝\n⊢ ∀ (w : Word M), prod (↑of m✝ • w) = ↑of m✝ * prod w\n[PROOFSTEP]\n\n| h_of _ =>\n  intros\n  rw [of_smul_def, prod_rcons, of.map_mul, mul_assoc, ← prod_rcons, ← equivPair_symm, Equiv.symm_apply_apply]\n[GOAL]\ncase h_of\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni✝ : ι\nm✝ : M i✝\n⊢ ∀ (w : Word M), prod (↑of m✝ • w) = ↑of m✝ * prod w\n[PROOFSTEP]\nintros\n[GOAL]\ncase h_of\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni✝ : ι\nm✝ : M i✝\nw✝ : Word M\n⊢ prod (↑of m✝ • w✝) = ↑of m✝ * prod w✝\n[PROOFSTEP]\nrw [of_smul_def, prod_rcons, of.map_mul, mul_assoc, ← prod_rcons, ← equivPair_symm, Equiv.symm_apply_apply]\n[GOAL]\ncase h_mul\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nx y : CoprodI M\nhx : ∀ (w : Word M), prod (x • w) = x * prod w\nhy : ∀ (w : Word M), prod (y • w) = y * prod w\n⊢ ∀ (w : Word M), prod ((x * y) • w) = x * y * prod w\n[PROOFSTEP]\n\n| h_mul x y hx hy =>\n  intro w\n  rw [mul_smul, hx, hy, mul_assoc]\n[GOAL]\ncase h_mul\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nx y : CoprodI M\nhx : ∀ (w : Word M), prod (x • w) = x * prod w\nhy : ∀ (w : Word M), prod (y • w) = y * prod w\n⊢ ∀ (w : Word M), prod ((x * y) • w) = x * y * prod w\n[PROOFSTEP]\nintro w\n[GOAL]\ncase h_mul\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nx y : CoprodI M\nhx : ∀ (w : Word M), prod (x • w) = x * prod w\nhy : ∀ (w : Word M), prod (y • w) = y * prod w\nw : Word M\n⊢ prod ((x * y) • w) = x * y * prod w\n[PROOFSTEP]\nrw [mul_smul, hx, hy, mul_assoc]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nm : CoprodI M\n⊢ (fun w => prod w) ((fun m => m • empty) m) = m\n[PROOFSTEP]\ndsimp only\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\nm : CoprodI M\n⊢ prod (m • empty) = m\n[PROOFSTEP]\nrw [prod_smul, prod_empty, mul_one]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\n⊢ Function.RightInverse (fun w => prod w) fun m => m • empty\n[PROOFSTEP]\napply smul_induction\n[GOAL]\ncase h_empty\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\n⊢ (fun m => m • empty) ((fun w => prod w) empty) = empty\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h_empty\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\n⊢ prod empty • empty = empty\n[PROOFSTEP]\nrw [prod_empty, one_smul]\n[GOAL]\ncase h_smul\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\n⊢ ∀ (i : ι) (m : M i) (w : Word M),\n    (fun m => m • empty) ((fun w => prod w) w) = w → (fun m => m • empty) ((fun w => prod w) (↑of m • w)) = ↑of m • w\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h_smul\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\n⊢ ∀ (i : ι) (m : M i) (w : Word M), prod w • empty = w → prod (↑of m • w) • empty = ↑of m • w\n[PROOFSTEP]\nintro i m w ih\n[GOAL]\ncase h_smul\nι : Type u_1\nM : ι → Type u_2\ninst✝³ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝² : Monoid N\ninst✝¹ : (i : ι) → DecidableEq (M i)\ninst✝ : DecidableEq ι\ni : ι\nm : M i\nw : Word M\nih : prod w • empty = w\n⊢ prod (↑of m • w) • empty = ↑of m • w\n[PROOFSTEP]\nrw [prod_smul, mul_smul, ih]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\n⊢ toList w ≠ []\n[PROOFSTEP]\ninduction w\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ : ι\nx✝ : M i✝\na✝ : x✝ ≠ 1\n⊢ toList (singleton x✝ a✝) ≠ []\n[PROOFSTEP]\nrintro ⟨rfl⟩\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : toList _w₁✝ ≠ []\n_w₂_ih✝ : toList _w₂✝ ≠ []\n⊢ toList (append _w₁✝ _hne✝ _w₂✝) ≠ []\n[PROOFSTEP]\napply List.append_ne_nil_of_ne_nil_left\n[GOAL]\ncase append.a\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : toList _w₁✝ ≠ []\n_w₂_ih✝ : toList _w₂✝ ≠ []\n⊢ toList _w₁✝ ≠ []\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\n⊢ List.head? (toList w) = some { fst := i, snd := head w }\n[PROOFSTEP]\nrw [← Option.mem_def]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\n⊢ { fst := i, snd := head w } ∈ List.head? (toList w)\n[PROOFSTEP]\ninduction w\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ : ι\nx✝ : M i✝\na✝ : x✝ ≠ 1\n⊢ { fst := i✝, snd := head (singleton x✝ a✝) } ∈ List.head? (toList (singleton x✝ a✝))\n[PROOFSTEP]\nrw [Option.mem_def]\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ : ι\nx✝ : M i✝\na✝ : x✝ ≠ 1\n⊢ List.head? (toList (singleton x✝ a✝)) = some { fst := i✝, snd := head (singleton x✝ a✝) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : { fst := i✝, snd := head _w₁✝ } ∈ List.head? (toList _w₁✝)\n_w₂_ih✝ : { fst := k✝, snd := head _w₂✝ } ∈ List.head? (toList _w₂✝)\n⊢ { fst := i✝, snd := head (append _w₁✝ _hne✝ _w₂✝) } ∈ List.head? (toList (append _w₁✝ _hne✝ _w₂✝))\n[PROOFSTEP]\nexact List.head?_append (by assumption)\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : { fst := i✝, snd := head _w₁✝ } ∈ List.head? (toList _w₁✝)\n_w₂_ih✝ : { fst := k✝, snd := head _w₂✝ } ∈ List.head? (toList _w₂✝)\n⊢ { fst := i✝, snd := head (append _w₁✝ _hne✝ _w₂✝) } ∈ List.head? (toList _w₁✝)\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\n⊢ List.getLast? (toList w) = some { fst := j, snd := last w }\n[PROOFSTEP]\nrw [← Option.mem_def]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\n⊢ { fst := j, snd := last w } ∈ List.getLast? (toList w)\n[PROOFSTEP]\ninduction w\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ : ι\nx✝ : M i✝\na✝ : x✝ ≠ 1\n⊢ { fst := i✝, snd := last (singleton x✝ a✝) } ∈ List.getLast? (toList (singleton x✝ a✝))\n[PROOFSTEP]\nrw [Option.mem_def]\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ : ι\nx✝ : M i✝\na✝ : x✝ ≠ 1\n⊢ List.getLast? (toList (singleton x✝ a✝)) = some { fst := i✝, snd := last (singleton x✝ a✝) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : { fst := j✝, snd := last _w₁✝ } ∈ List.getLast? (toList _w₁✝)\n_w₂_ih✝ : { fst := l✝, snd := last _w₂✝ } ∈ List.getLast? (toList _w₂✝)\n⊢ { fst := l✝, snd := last (append _w₁✝ _hne✝ _w₂✝) } ∈ List.getLast? (toList (append _w₁✝ _hne✝ _w₂✝))\n[PROOFSTEP]\nexact List.getLast?_append (by assumption)\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : { fst := j✝, snd := last _w₁✝ } ∈ List.getLast? (toList _w₁✝)\n_w₂_ih✝ : { fst := l✝, snd := last _w₂✝ } ∈ List.getLast? (toList _w₂✝)\n⊢ { fst := l✝, snd := last (append _w₁✝ _hne✝ _w₂✝) } ∈ List.getLast? (toList _w₂✝)\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\n⊢ ∀ (l : (i : ι) × M i), l ∈ toList w → l.snd ≠ 1\n[PROOFSTEP]\ninduction w\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ : ι\nx✝ : M i✝\na✝ : x✝ ≠ 1\n⊢ ∀ (l : (i : ι) × M i), l ∈ toList (singleton x✝ a✝) → l.snd ≠ 1\n[PROOFSTEP]\nsimpa only [toList, List.mem_singleton, ne_eq, forall_eq]\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : ∀ (l : (i : ι) × M i), l ∈ toList _w₁✝ → l.snd ≠ 1\n_w₂_ih✝ : ∀ (l : (i : ι) × M i), l ∈ toList _w₂✝ → l.snd ≠ 1\n⊢ ∀ (l : (i : ι) × M i), l ∈ toList (append _w₁✝ _hne✝ _w₂✝) → l.snd ≠ 1\n[PROOFSTEP]\nintro l h\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : ∀ (l : (i : ι) × M i), l ∈ toList _w₁✝ → l.snd ≠ 1\n_w₂_ih✝ : ∀ (l : (i : ι) × M i), l ∈ toList _w₂✝ → l.snd ≠ 1\nl : (i : ι) × M i\nh : l ∈ toList (append _w₁✝ _hne✝ _w₂✝)\n⊢ l.snd ≠ 1\n[PROOFSTEP]\nsimp only [toList, List.mem_append] at h \n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : ∀ (l : (i : ι) × M i), l ∈ toList _w₁✝ → l.snd ≠ 1\n_w₂_ih✝ : ∀ (l : (i : ι) × M i), l ∈ toList _w₂✝ → l.snd ≠ 1\nl : (i : ι) × M i\nh : l ∈ toList _w₁✝ ∨ l ∈ toList _w₂✝\n⊢ l.snd ≠ 1\n[PROOFSTEP]\ncases h\n[GOAL]\ncase append.inl\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : ∀ (l : (i : ι) × M i), l ∈ toList _w₁✝ → l.snd ≠ 1\n_w₂_ih✝ : ∀ (l : (i : ι) × M i), l ∈ toList _w₂✝ → l.snd ≠ 1\nl : (i : ι) × M i\nh✝ : l ∈ toList _w₁✝\n⊢ l.snd ≠ 1\n[PROOFSTEP]\naesop\n[GOAL]\ncase append.inr\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : ∀ (l : (i : ι) × M i), l ∈ toList _w₁✝ → l.snd ≠ 1\n_w₂_ih✝ : ∀ (l : (i : ι) × M i), l ∈ toList _w₂✝ → l.snd ≠ 1\nl : (i : ι) × M i\nh✝ : l ∈ toList _w₂✝\n⊢ l.snd ≠ 1\n[PROOFSTEP]\naesop\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\n⊢ List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList w)\n[PROOFSTEP]\ninduction w\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ : ι\nx✝ : M i✝\na✝ : x✝ ≠ 1\n⊢ List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList (singleton x✝ a✝))\n[PROOFSTEP]\nexact List.chain'_singleton _\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₁✝)\n_w₂_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₂✝)\n⊢ List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList (append _w₁✝ _hne✝ _w₂✝))\n[PROOFSTEP]\nrefine List.Chain'.append (by assumption) (by assumption) ?_\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₁✝)\n_w₂_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₂✝)\n⊢ List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₁✝)\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₁✝)\n_w₂_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₂✝)\n⊢ List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₂✝)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₁✝)\n_w₂_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₂✝)\n⊢ ∀ (x : (i : ι) × M i),\n    x ∈ List.getLast? (toList _w₁✝) → ∀ (y : (i : ι) × M i), y ∈ List.head? (toList _w₂✝) → x.fst ≠ y.fst\n[PROOFSTEP]\nintro x hx y hy\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₁✝)\n_w₂_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₂✝)\nx : (i : ι) × M i\nhx : x ∈ List.getLast? (toList _w₁✝)\ny : (i : ι) × M i\nhy : y ∈ List.head? (toList _w₂✝)\n⊢ x.fst ≠ y.fst\n[PROOFSTEP]\nrw [toList_getLast?, Option.mem_some_iff] at hx \n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₁✝)\n_w₂_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₂✝)\nx : (i : ι) × M i\nhx : { fst := j✝, snd := last _w₁✝ } = x\ny : (i : ι) × M i\nhy : y ∈ List.head? (toList _w₂✝)\n⊢ x.fst ≠ y.fst\n[PROOFSTEP]\nrw [toList_head?, Option.mem_some_iff] at hy \n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₁✝)\n_w₂_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₂✝)\nx : (i : ι) × M i\nhx : { fst := j✝, snd := last _w₁✝ } = x\ny : (i : ι) × M i\nhy : { fst := k✝, snd := head _w₂✝ } = y\n⊢ x.fst ≠ y.fst\n[PROOFSTEP]\nsubst hx\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₁✝)\n_w₂_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₂✝)\ny : (i : ι) × M i\nhy : { fst := k✝, snd := head _w₂✝ } = y\n⊢ { fst := j✝, snd := last _w₁✝ }.fst ≠ y.fst\n[PROOFSTEP]\nsubst hy\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₁✝)\n_w₂_ih✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (toList _w₂✝)\n⊢ { fst := j✝, snd := last _w₁✝ }.fst ≠ { fst := k✝, snd := head _w₂✝ }.fst\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nw : Word M\nh : w ≠ empty\n⊢ ∃ i j w', toWord w' = w\n[PROOFSTEP]\nsuffices : ∃ (i j : _) (w' : NeWord M i j), w'.toWord.toList = w.toList\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nw : Word M\nh : w ≠ empty\nthis : ∃ i j w', (toWord w').toList = w.toList\n⊢ ∃ i j w', toWord w' = w\n[PROOFSTEP]\nrcases this with ⟨i, j, w, h⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nw✝ : Word M\nh✝ : w✝ ≠ empty\ni j : ι\nw : NeWord M i j\nh : (toWord w).toList = w✝.toList\n⊢ ∃ i j w', toWord w' = w✝\n[PROOFSTEP]\nrefine' ⟨i, j, w, _⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nw✝ : Word M\nh✝ : w✝ ≠ empty\ni j : ι\nw : NeWord M i j\nh : (toWord w).toList = w✝.toList\n⊢ toWord w = w✝\n[PROOFSTEP]\next\n[GOAL]\ncase intro.intro.intro.toList.a.a\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nw✝ : Word M\nh✝ : w✝ ≠ empty\ni j : ι\nw : NeWord M i j\nh : (toWord w).toList = w✝.toList\nn✝ : ℕ\na✝ : (i : ι) × M i\n⊢ a✝ ∈ List.get? (toWord w).toList n✝ ↔ a✝ ∈ List.get? w✝.toList n✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase this\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nw : Word M\nh : w ≠ empty\n⊢ ∃ i j w', (toWord w').toList = w.toList\n[PROOFSTEP]\ncases' w with l hnot1 hchain\n[GOAL]\ncase this.mk\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl : List ((i : ι) × M i)\nhnot1 : ∀ (l_1 : (i : ι) × M i), l_1 ∈ l → l_1.snd ≠ 1\nhchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) l\nh : { toList := l, ne_one := hnot1, chain_ne := hchain } ≠ empty\n⊢ ∃ i j w', (toWord w').toList = { toList := l, ne_one := hnot1, chain_ne := hchain }.toList\n[PROOFSTEP]\ninduction' l with x l hi\n[GOAL]\ncase this.mk.nil\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl : List ((i : ι) × M i)\nhnot1✝ : ∀ (l_1 : (i : ι) × M i), l_1 ∈ l → l_1.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l\nh✝ : { toList := l, ne_one := hnot1✝, chain_ne := hchain✝ } ≠ empty\nhnot1 : ∀ (l : (i : ι) × M i), l ∈ [] → l.snd ≠ 1\nhchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) []\nh : { toList := [], ne_one := hnot1, chain_ne := hchain } ≠ empty\n⊢ ∃ i j w', (toWord w').toList = { toList := [], ne_one := hnot1, chain_ne := hchain }.toList\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase this.mk.cons\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl✝ : List ((i : ι) × M i)\nhnot1✝ : ∀ (l : (i : ι) × M i), l ∈ l✝ → l.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l✝\nh✝ : { toList := l✝, ne_one := hnot1✝, chain_ne := hchain✝ } ≠ empty\nx : (i : ι) × M i\nl : List ((i : ι) × M i)\nhi :\n  ∀ (hnot1 : ∀ (l_1 : (i : ι) × M i), l_1 ∈ l → l_1.snd ≠ 1) (hchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) l),\n    { toList := l, ne_one := hnot1, chain_ne := hchain } ≠ empty →\n      ∃ i j w', (toWord w').toList = { toList := l, ne_one := hnot1, chain_ne := hchain }.toList\nhnot1 : ∀ (l_1 : (i : ι) × M i), l_1 ∈ x :: l → l_1.snd ≠ 1\nhchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) (x :: l)\nh : { toList := x :: l, ne_one := hnot1, chain_ne := hchain } ≠ empty\n⊢ ∃ i j w', (toWord w').toList = { toList := x :: l, ne_one := hnot1, chain_ne := hchain }.toList\n[PROOFSTEP]\nrw [List.forall_mem_cons] at hnot1 \n[GOAL]\ncase this.mk.cons\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl✝ : List ((i : ι) × M i)\nhnot1✝¹ : ∀ (l : (i : ι) × M i), l ∈ l✝ → l.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l✝\nh✝ : { toList := l✝, ne_one := hnot1✝¹, chain_ne := hchain✝ } ≠ empty\nx : (i : ι) × M i\nl : List ((i : ι) × M i)\nhi :\n  ∀ (hnot1 : ∀ (l_1 : (i : ι) × M i), l_1 ∈ l → l_1.snd ≠ 1) (hchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) l),\n    { toList := l, ne_one := hnot1, chain_ne := hchain } ≠ empty →\n      ∃ i j w', (toWord w').toList = { toList := l, ne_one := hnot1, chain_ne := hchain }.toList\nhnot1✝ : ∀ (l_1 : (i : ι) × M i), l_1 ∈ x :: l → l_1.snd ≠ 1\nhnot1 : x.snd ≠ 1 ∧ ∀ (x : (i : ι) × M i), x ∈ l → x.snd ≠ 1\nhchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) (x :: l)\nh : { toList := x :: l, ne_one := hnot1✝, chain_ne := hchain } ≠ empty\n⊢ ∃ i j w', (toWord w').toList = { toList := x :: l, ne_one := hnot1✝, chain_ne := hchain }.toList\n[PROOFSTEP]\ncases' l with y l\n[GOAL]\ncase this.mk.cons.nil\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl : List ((i : ι) × M i)\nhnot1✝¹ : ∀ (l_1 : (i : ι) × M i), l_1 ∈ l → l_1.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l\nh✝ : { toList := l, ne_one := hnot1✝¹, chain_ne := hchain✝ } ≠ empty\nx : (i : ι) × M i\nhi :\n  ∀ (hnot1 : ∀ (l : (i : ι) × M i), l ∈ [] → l.snd ≠ 1) (hchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) []),\n    { toList := [], ne_one := hnot1, chain_ne := hchain } ≠ empty →\n      ∃ i j w', (toWord w').toList = { toList := [], ne_one := hnot1, chain_ne := hchain }.toList\nhnot1✝ : ∀ (l : (i : ι) × M i), l ∈ [x] → l.snd ≠ 1\nhnot1 : x.snd ≠ 1 ∧ ∀ (x : (i : ι) × M i), x ∈ [] → x.snd ≠ 1\nhchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) [x]\nh : { toList := [x], ne_one := hnot1✝, chain_ne := hchain } ≠ empty\n⊢ ∃ i j w', (toWord w').toList = { toList := [x], ne_one := hnot1✝, chain_ne := hchain }.toList\n[PROOFSTEP]\nrefine' ⟨x.1, x.1, singleton x.2 hnot1.1, _⟩\n[GOAL]\ncase this.mk.cons.nil\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl : List ((i : ι) × M i)\nhnot1✝¹ : ∀ (l_1 : (i : ι) × M i), l_1 ∈ l → l_1.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l\nh✝ : { toList := l, ne_one := hnot1✝¹, chain_ne := hchain✝ } ≠ empty\nx : (i : ι) × M i\nhi :\n  ∀ (hnot1 : ∀ (l : (i : ι) × M i), l ∈ [] → l.snd ≠ 1) (hchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) []),\n    { toList := [], ne_one := hnot1, chain_ne := hchain } ≠ empty →\n      ∃ i j w', (toWord w').toList = { toList := [], ne_one := hnot1, chain_ne := hchain }.toList\nhnot1✝ : ∀ (l : (i : ι) × M i), l ∈ [x] → l.snd ≠ 1\nhnot1 : x.snd ≠ 1 ∧ ∀ (x : (i : ι) × M i), x ∈ [] → x.snd ≠ 1\nhchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) [x]\nh : { toList := [x], ne_one := hnot1✝, chain_ne := hchain } ≠ empty\n⊢ (toWord (singleton x.snd (_ : x.snd ≠ 1))).toList = { toList := [x], ne_one := hnot1✝, chain_ne := hchain }.toList\n[PROOFSTEP]\nsimp [toWord]\n[GOAL]\ncase this.mk.cons.cons\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl✝ : List ((i : ι) × M i)\nhnot1✝¹ : ∀ (l : (i : ι) × M i), l ∈ l✝ → l.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l✝\nh✝ : { toList := l✝, ne_one := hnot1✝¹, chain_ne := hchain✝ } ≠ empty\nx y : (i : ι) × M i\nl : List ((i : ι) × M i)\nhi :\n  ∀ (hnot1 : ∀ (l_1 : (i : ι) × M i), l_1 ∈ y :: l → l_1.snd ≠ 1)\n    (hchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) (y :: l)),\n    { toList := y :: l, ne_one := hnot1, chain_ne := hchain } ≠ empty →\n      ∃ i j w', (toWord w').toList = { toList := y :: l, ne_one := hnot1, chain_ne := hchain }.toList\nhnot1✝ : ∀ (l_1 : (i : ι) × M i), l_1 ∈ x :: y :: l → l_1.snd ≠ 1\nhnot1 : x.snd ≠ 1 ∧ ∀ (x : (i : ι) × M i), x ∈ y :: l → x.snd ≠ 1\nhchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) (x :: y :: l)\nh : { toList := x :: y :: l, ne_one := hnot1✝, chain_ne := hchain } ≠ empty\n⊢ ∃ i j w', (toWord w').toList = { toList := x :: y :: l, ne_one := hnot1✝, chain_ne := hchain }.toList\n[PROOFSTEP]\nrw [List.chain'_cons] at hchain \n[GOAL]\ncase this.mk.cons.cons\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl✝ : List ((i : ι) × M i)\nhnot1✝¹ : ∀ (l : (i : ι) × M i), l ∈ l✝ → l.snd ≠ 1\nhchain✝¹ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l✝\nh✝ : { toList := l✝, ne_one := hnot1✝¹, chain_ne := hchain✝¹ } ≠ empty\nx y : (i : ι) × M i\nl : List ((i : ι) × M i)\nhi :\n  ∀ (hnot1 : ∀ (l_1 : (i : ι) × M i), l_1 ∈ y :: l → l_1.snd ≠ 1)\n    (hchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) (y :: l)),\n    { toList := y :: l, ne_one := hnot1, chain_ne := hchain } ≠ empty →\n      ∃ i j w', (toWord w').toList = { toList := y :: l, ne_one := hnot1, chain_ne := hchain }.toList\nhnot1✝ : ∀ (l_1 : (i : ι) × M i), l_1 ∈ x :: y :: l → l_1.snd ≠ 1\nhnot1 : x.snd ≠ 1 ∧ ∀ (x : (i : ι) × M i), x ∈ y :: l → x.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (x :: y :: l)\nhchain : x.fst ≠ y.fst ∧ List.Chain' (fun l l' => l.fst ≠ l'.fst) (y :: l)\nh : { toList := x :: y :: l, ne_one := hnot1✝, chain_ne := hchain✝ } ≠ empty\n⊢ ∃ i j w', (toWord w').toList = { toList := x :: y :: l, ne_one := hnot1✝, chain_ne := hchain✝ }.toList\n[PROOFSTEP]\nspecialize hi hnot1.2 hchain.2 (by rintro ⟨rfl⟩)\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl✝ : List ((i : ι) × M i)\nhnot1✝¹ : ∀ (l : (i : ι) × M i), l ∈ l✝ → l.snd ≠ 1\nhchain✝¹ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l✝\nh✝ : { toList := l✝, ne_one := hnot1✝¹, chain_ne := hchain✝¹ } ≠ empty\nx y : (i : ι) × M i\nl : List ((i : ι) × M i)\nhi :\n  ∀ (hnot1 : ∀ (l_1 : (i : ι) × M i), l_1 ∈ y :: l → l_1.snd ≠ 1)\n    (hchain : List.Chain' (fun l l' => l.fst ≠ l'.fst) (y :: l)),\n    { toList := y :: l, ne_one := hnot1, chain_ne := hchain } ≠ empty →\n      ∃ i j w', (toWord w').toList = { toList := y :: l, ne_one := hnot1, chain_ne := hchain }.toList\nhnot1✝ : ∀ (l_1 : (i : ι) × M i), l_1 ∈ x :: y :: l → l_1.snd ≠ 1\nhnot1 : x.snd ≠ 1 ∧ ∀ (x : (i : ι) × M i), x ∈ y :: l → x.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (x :: y :: l)\nhchain : x.fst ≠ y.fst ∧ List.Chain' (fun l l' => l.fst ≠ l'.fst) (y :: l)\nh : { toList := x :: y :: l, ne_one := hnot1✝, chain_ne := hchain✝ } ≠ empty\n⊢ { toList := y :: l, ne_one := (_ : ∀ (x : (i : ι) × M i), x ∈ y :: l → x.snd ≠ 1),\n      chain_ne := (_ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (y :: l)) } ≠\n    empty\n[PROOFSTEP]\nrintro ⟨rfl⟩\n[GOAL]\ncase this.mk.cons.cons\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl✝ : List ((i : ι) × M i)\nhnot1✝¹ : ∀ (l : (i : ι) × M i), l ∈ l✝ → l.snd ≠ 1\nhchain✝¹ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l✝\nh✝ : { toList := l✝, ne_one := hnot1✝¹, chain_ne := hchain✝¹ } ≠ empty\nx y : (i : ι) × M i\nl : List ((i : ι) × M i)\nhnot1✝ : ∀ (l_1 : (i : ι) × M i), l_1 ∈ x :: y :: l → l_1.snd ≠ 1\nhnot1 : x.snd ≠ 1 ∧ ∀ (x : (i : ι) × M i), x ∈ y :: l → x.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (x :: y :: l)\nhchain : x.fst ≠ y.fst ∧ List.Chain' (fun l l' => l.fst ≠ l'.fst) (y :: l)\nh : { toList := x :: y :: l, ne_one := hnot1✝, chain_ne := hchain✝ } ≠ empty\nhi :\n  ∃ i j w',\n    (toWord w').toList =\n      { toList := y :: l, ne_one := (_ : ∀ (x : (i : ι) × M i), x ∈ y :: l → x.snd ≠ 1),\n          chain_ne := (_ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (y :: l)) }.toList\n⊢ ∃ i j w', (toWord w').toList = { toList := x :: y :: l, ne_one := hnot1✝, chain_ne := hchain✝ }.toList\n[PROOFSTEP]\nobtain ⟨i, j, w', hw' : w'.toList = y :: l⟩ := hi\n[GOAL]\ncase this.mk.cons.cons.intro.intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl✝ : List ((i : ι) × M i)\nhnot1✝¹ : ∀ (l : (i : ι) × M i), l ∈ l✝ → l.snd ≠ 1\nhchain✝¹ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l✝\nh✝ : { toList := l✝, ne_one := hnot1✝¹, chain_ne := hchain✝¹ } ≠ empty\nx y : (i : ι) × M i\nl : List ((i : ι) × M i)\nhnot1✝ : ∀ (l_1 : (i : ι) × M i), l_1 ∈ x :: y :: l → l_1.snd ≠ 1\nhnot1 : x.snd ≠ 1 ∧ ∀ (x : (i : ι) × M i), x ∈ y :: l → x.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (x :: y :: l)\nhchain : x.fst ≠ y.fst ∧ List.Chain' (fun l l' => l.fst ≠ l'.fst) (y :: l)\nh : { toList := x :: y :: l, ne_one := hnot1✝, chain_ne := hchain✝ } ≠ empty\ni j : ι\nw' : NeWord M i j\nhw' : toList w' = y :: l\n⊢ ∃ i j w', (toWord w').toList = { toList := x :: y :: l, ne_one := hnot1✝, chain_ne := hchain✝ }.toList\n[PROOFSTEP]\nobtain rfl : y = ⟨i, w'.head⟩ := by simpa [hw'] using w'.toList_head?\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl✝ : List ((i : ι) × M i)\nhnot1✝¹ : ∀ (l : (i : ι) × M i), l ∈ l✝ → l.snd ≠ 1\nhchain✝¹ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l✝\nh✝ : { toList := l✝, ne_one := hnot1✝¹, chain_ne := hchain✝¹ } ≠ empty\nx y : (i : ι) × M i\nl : List ((i : ι) × M i)\nhnot1✝ : ∀ (l_1 : (i : ι) × M i), l_1 ∈ x :: y :: l → l_1.snd ≠ 1\nhnot1 : x.snd ≠ 1 ∧ ∀ (x : (i : ι) × M i), x ∈ y :: l → x.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (x :: y :: l)\nhchain : x.fst ≠ y.fst ∧ List.Chain' (fun l l' => l.fst ≠ l'.fst) (y :: l)\nh : { toList := x :: y :: l, ne_one := hnot1✝, chain_ne := hchain✝ } ≠ empty\ni j : ι\nw' : NeWord M i j\nhw' : toList w' = y :: l\n⊢ y = { fst := i, snd := head w' }\n[PROOFSTEP]\nsimpa [hw'] using w'.toList_head?\n[GOAL]\ncase this.mk.cons.cons.intro.intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl✝ : List ((i : ι) × M i)\nhnot1✝¹ : ∀ (l : (i : ι) × M i), l ∈ l✝ → l.snd ≠ 1\nhchain✝¹ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l✝\nh✝ : { toList := l✝, ne_one := hnot1✝¹, chain_ne := hchain✝¹ } ≠ empty\nx : (i : ι) × M i\nl : List ((i : ι) × M i)\ni j : ι\nw' : NeWord M i j\nhnot1✝ : ∀ (l_1 : (i : ι) × M i), l_1 ∈ x :: { fst := i, snd := head w' } :: l → l_1.snd ≠ 1\nhnot1 : x.snd ≠ 1 ∧ ∀ (x : (i : ι) × M i), x ∈ { fst := i, snd := head w' } :: l → x.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (x :: { fst := i, snd := head w' } :: l)\nhchain :\n  x.fst ≠ { fst := i, snd := head w' }.fst ∧\n    List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := head w' } :: l)\nh : { toList := x :: { fst := i, snd := head w' } :: l, ne_one := hnot1✝, chain_ne := hchain✝ } ≠ empty\nhw' : toList w' = { fst := i, snd := head w' } :: l\n⊢ ∃ i_1 j_1 w'_1,\n    (toWord w'_1).toList =\n      { toList := x :: { fst := i, snd := head w' } :: l, ne_one := hnot1✝, chain_ne := hchain✝ }.toList\n[PROOFSTEP]\nrefine' ⟨x.1, j, append (singleton x.2 hnot1.1) hchain.1 w', _⟩\n[GOAL]\ncase this.mk.cons.cons.intro.intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nl✝ : List ((i : ι) × M i)\nhnot1✝¹ : ∀ (l : (i : ι) × M i), l ∈ l✝ → l.snd ≠ 1\nhchain✝¹ : List.Chain' (fun l l' => l.fst ≠ l'.fst) l✝\nh✝ : { toList := l✝, ne_one := hnot1✝¹, chain_ne := hchain✝¹ } ≠ empty\nx : (i : ι) × M i\nl : List ((i : ι) × M i)\ni j : ι\nw' : NeWord M i j\nhnot1✝ : ∀ (l_1 : (i : ι) × M i), l_1 ∈ x :: { fst := i, snd := head w' } :: l → l_1.snd ≠ 1\nhnot1 : x.snd ≠ 1 ∧ ∀ (x : (i : ι) × M i), x ∈ { fst := i, snd := head w' } :: l → x.snd ≠ 1\nhchain✝ : List.Chain' (fun l l' => l.fst ≠ l'.fst) (x :: { fst := i, snd := head w' } :: l)\nhchain :\n  x.fst ≠ { fst := i, snd := head w' }.fst ∧\n    List.Chain' (fun l l' => l.fst ≠ l'.fst) ({ fst := i, snd := head w' } :: l)\nh : { toList := x :: { fst := i, snd := head w' } :: l, ne_one := hnot1✝, chain_ne := hchain✝ } ≠ empty\nhw' : toList w' = { fst := i, snd := head w' } :: l\n⊢ (toWord (append (singleton x.snd (_ : x.snd ≠ 1)) (_ : x.fst ≠ { fst := i, snd := head w' }.fst) w')).toList =\n    { toList := x :: { fst := i, snd := head w' } :: l, ne_one := hnot1✝, chain_ne := hchain✝ }.toList\n[PROOFSTEP]\nsimpa [toWord] using hw'\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni : ι\nx : M i\nhne_one : x ≠ 1\n⊢ prod (singleton x hne_one) = ↑of x\n[PROOFSTEP]\nsimp [toWord, prod, Word.prod]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j k l : ι\nw₁ : NeWord M i j\nhne : j ≠ k\nw₂ : NeWord M k l\n⊢ prod (append w₁ hne w₂) = prod w₁ * prod w₂\n[PROOFSTEP]\nsimp [toWord, prod, Word.prod]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nx : M i\nhnotone : x ≠ 1\nw : NeWord M i j\n⊢ head (replaceHead x hnotone w) = x\n[PROOFSTEP]\ninduction w\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ : ι\nx✝ : M i✝\na✝ : x✝ ≠ 1\nx : M i✝\nhnotone : x ≠ 1\n⊢ head (replaceHead x hnotone (singleton x✝ a✝)) = x\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : ∀ (x : M i✝) (hnotone : x ≠ 1), head (replaceHead x hnotone _w₁✝) = x\n_w₂_ih✝ : ∀ (x : M k✝) (hnotone : x ≠ 1), head (replaceHead x hnotone _w₂✝) = x\nx : M i✝\nhnotone : x ≠ 1\n⊢ head (replaceHead x hnotone (append _w₁✝ _hne✝ _w₂✝)) = x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : ∀ (x : M i✝) (hnotone : x ≠ 1), head (replaceHead x hnotone _w₁✝) = x\n_w₂_ih✝ : ∀ (x : M k✝) (hnotone : x ≠ 1), head (replaceHead x hnotone _w₂✝) = x\nx : M i✝\nhnotone : x ≠ 1\n⊢ head (replaceHead x hnotone (append _w₁✝ _hne✝ _w₂✝)) = x\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\nx : M i\nhnotone : x * head w ≠ 1\n⊢ head (mulHead w x hnotone) = x * head w\n[PROOFSTEP]\ninduction w\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ : ι\nx✝ : M i✝\na✝ : x✝ ≠ 1\nx : M i✝\nhnotone : x * head (singleton x✝ a✝) ≠ 1\n⊢ head (mulHead (singleton x✝ a✝) x hnotone) = x * head (singleton x✝ a✝)\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : ∀ (x : M i✝) (hnotone : x * head _w₁✝ ≠ 1), head (mulHead _w₁✝ x hnotone) = x * head _w₁✝\n_w₂_ih✝ : ∀ (x : M k✝) (hnotone : x * head _w₂✝ ≠ 1), head (mulHead _w₂✝ x hnotone) = x * head _w₂✝\nx : M i✝\nhnotone : x * head (append _w₁✝ _hne✝ _w₂✝) ≠ 1\n⊢ head (mulHead (append _w₁✝ _hne✝ _w₂✝) x hnotone) = x * head (append _w₁✝ _hne✝ _w₂✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\n_w₁_ih✝ : ∀ (x : M i✝) (hnotone : x * head _w₁✝ ≠ 1), head (mulHead _w₁✝ x hnotone) = x * head _w₁✝\n_w₂_ih✝ : ∀ (x : M k✝) (hnotone : x * head _w₂✝ ≠ 1), head (mulHead _w₂✝ x hnotone) = x * head _w₂✝\nx : M i✝\nhnotone : x * head (append _w₁✝ _hne✝ _w₂✝) ≠ 1\n⊢ head (mulHead (append _w₁✝ _hne✝ _w₂✝) x hnotone) = x * head (append _w₁✝ _hne✝ _w₂✝)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\nx : M i\nhnotone : x * head w ≠ 1\n⊢ prod (mulHead w x hnotone) = ↑of x * prod w\n[PROOFSTEP]\nunfold mulHead\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\nx : M i\nhnotone : x * head w ≠ 1\n⊢ prod (replaceHead (x * head w) hnotone w) = ↑of x * prod w\n[PROOFSTEP]\ninduction' w with _ _ _ _ _ _ _ _ _ _ w_ih_w₁ w_ih_w₂\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\nx✝¹ : M i\nhnotone✝ : x✝¹ * head w ≠ 1\ni✝ : ι\nx✝ : M i✝\na✝ : x✝ ≠ 1\nx : M i✝\nhnotone : x * head (singleton x✝ a✝) ≠ 1\n⊢ prod (replaceHead (x * head (singleton x✝ a✝)) hnotone (singleton x✝ a✝)) = ↑of x * prod (singleton x✝ a✝)\n[PROOFSTEP]\nsimp [mulHead, replaceHead]\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\nx✝ : M i\nhnotone✝ : x✝ * head w ≠ 1\ni✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\nw_ih_w₁ :\n  ∀ (x : M i✝) (hnotone : x * head _w₁✝ ≠ 1), prod (replaceHead (x * head _w₁✝) hnotone _w₁✝) = ↑of x * prod _w₁✝\nw_ih_w₂ :\n  ∀ (x : M k✝) (hnotone : x * head _w₂✝ ≠ 1), prod (replaceHead (x * head _w₂✝) hnotone _w₂✝) = ↑of x * prod _w₂✝\nx : M i✝\nhnotone : x * head (append _w₁✝ _hne✝ _w₂✝) ≠ 1\n⊢ prod (replaceHead (x * head (append _w₁✝ _hne✝ _w₂✝)) hnotone (append _w₁✝ _hne✝ _w₂✝)) =\n    ↑of x * prod (append _w₁✝ _hne✝ _w₂✝)\n[PROOFSTEP]\nspecialize w_ih_w₁ _ hnotone\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\nx✝ : M i\nhnotone✝ : x✝ * head w ≠ 1\ni✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\nw_ih_w₂ :\n  ∀ (x : M k✝) (hnotone : x * head _w₂✝ ≠ 1), prod (replaceHead (x * head _w₂✝) hnotone _w₂✝) = ↑of x * prod _w₂✝\nx : M i✝\nhnotone : x * head (append _w₁✝ _hne✝ _w₂✝) ≠ 1\nw_ih_w₁ : prod (replaceHead (x * head _w₁✝) hnotone _w₁✝) = ↑of x * prod _w₁✝\n⊢ prod (replaceHead (x * head (append _w₁✝ _hne✝ _w₂✝)) hnotone (append _w₁✝ _hne✝ _w₂✝)) =\n    ↑of x * prod (append _w₁✝ _hne✝ _w₂✝)\n[PROOFSTEP]\nclear w_ih_w₂\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\nx✝ : M i\nhnotone✝ : x✝ * head w ≠ 1\ni✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\nx : M i✝\nhnotone : x * head (append _w₁✝ _hne✝ _w₂✝) ≠ 1\nw_ih_w₁ : prod (replaceHead (x * head _w₁✝) hnotone _w₁✝) = ↑of x * prod _w₁✝\n⊢ prod (replaceHead (x * head (append _w₁✝ _hne✝ _w₂✝)) hnotone (append _w₁✝ _hne✝ _w₂✝)) =\n    ↑of x * prod (append _w₁✝ _hne✝ _w₂✝)\n[PROOFSTEP]\nsimp [replaceHead, ← mul_assoc] at *\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝¹ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\ni j : ι\nw : NeWord M i j\nx✝ : M i\nhnotone✝ : ¬x✝ * head w = 1\ni✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord M i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord M k✝ l✝\nx : M i✝\nhnotone : x * head (append _w₁✝ _hne✝ _w₂✝) ≠ 1\nw_ih_w₁ : prod (replaceHead (x * head _w₁✝) hnotone _w₁✝) = ↑of x * prod _w₁✝\n⊢ prod (replaceHead (x * head _w₁✝) (_ : x * head _w₁✝ ≠ 1) _w₁✝) * prod _w₂✝ = ↑of x * prod _w₁✝ * prod _w₂✝\n[PROOFSTEP]\ncongr 1\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\ni j : ι\nw : NeWord G i j\n⊢ prod (inv w) = (prod w)⁻¹\n[PROOFSTEP]\ninduction w\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\ni j i✝ : ι\nx✝ : G i✝\na✝ : x✝ ≠ 1\n⊢ prod (inv (singleton x✝ a✝)) = (prod (singleton x✝ a✝))⁻¹\n[PROOFSTEP]\nsimp [inv, *]\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord G i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord G k✝ l✝\n_w₁_ih✝ : prod (inv _w₁✝) = (prod _w₁✝)⁻¹\n_w₂_ih✝ : prod (inv _w₂✝) = (prod _w₂✝)⁻¹\n⊢ prod (inv (append _w₁✝ _hne✝ _w₂✝)) = (prod (append _w₁✝ _hne✝ _w₂✝))⁻¹\n[PROOFSTEP]\nsimp [inv, *]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\ni j : ι\nw : NeWord G i j\n⊢ head (inv w) = (last w)⁻¹\n[PROOFSTEP]\ninduction w\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\ni j i✝ : ι\nx✝ : G i✝\na✝ : x✝ ≠ 1\n⊢ head (inv (singleton x✝ a✝)) = (last (singleton x✝ a✝))⁻¹\n[PROOFSTEP]\nsimp [inv, *]\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord G i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord G k✝ l✝\n_w₁_ih✝ : head (inv _w₁✝) = (last _w₁✝)⁻¹\n_w₂_ih✝ : head (inv _w₂✝) = (last _w₂✝)⁻¹\n⊢ head (inv (append _w₁✝ _hne✝ _w₂✝)) = (last (append _w₁✝ _hne✝ _w₂✝))⁻¹\n[PROOFSTEP]\nsimp [inv, *]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\ni j : ι\nw : NeWord G i j\n⊢ last (inv w) = (head w)⁻¹\n[PROOFSTEP]\ninduction w\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\ni j i✝ : ι\nx✝ : G i✝\na✝ : x✝ ≠ 1\n⊢ last (inv (singleton x✝ a✝)) = (head (singleton x✝ a✝))⁻¹\n[PROOFSTEP]\nsimp [inv, *]\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝² : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nG : ι → Type u_4\ninst✝ : (i : ι) → Group (G i)\ni j i✝ j✝ k✝ l✝ : ι\n_w₁✝ : NeWord G i✝ j✝\n_hne✝ : j✝ ≠ k✝\n_w₂✝ : NeWord G k✝ l✝\n_w₁_ih✝ : last (inv _w₁✝) = (head _w₁✝)⁻¹\n_w₂_ih✝ : last (inv _w₂✝) = (head _w₂✝)⁻¹\n⊢ last (inv (append _w₁✝ _hne✝ _w₂✝)) = (head (append _w₁✝ _hne✝ _w₂✝))⁻¹\n[PROOFSTEP]\nsimp [inv, *]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j k : ι\nw : NeWord H i j\nhk : j ≠ k\n⊢ ↑(↑lift f) (NeWord.prod w) • X k ⊆ X i\n[PROOFSTEP]\ninduction' w with i x hne_one i j k l w₁ hne w₂ hIw₁ hIw₂ generalizing k\n[GOAL]\ncase singleton\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni✝ j k✝ : ι\nhk✝ : j ≠ k✝\ni : ι\nx : H i\nhne_one : x ≠ 1\nk : ι\nhk : i ≠ k\n⊢ ↑(↑lift f) (NeWord.prod (NeWord.singleton x hne_one)) • X k ⊆ X i\n[PROOFSTEP]\nsimpa using hpp hk _ hne_one\n[GOAL]\ncase append\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni✝ j✝ k✝¹ : ι\nhk✝ : j✝ ≠ k✝¹\ni j k✝ l : ι\nw₁ : NeWord H i j\nhne : j ≠ k✝\nw₂ : NeWord H k✝ l\nhIw₁ : ∀ {k : ι}, j ≠ k → ↑(↑lift f) (NeWord.prod w₁) • X k ⊆ X i\nhIw₂ : ∀ {k : ι}, l ≠ k → ↑(↑lift f) (NeWord.prod w₂) • X k ⊆ X k✝\nk : ι\nhk : l ≠ k\n⊢ ↑(↑lift f) (NeWord.prod (NeWord.append w₁ hne w₂)) • X k ⊆ X i\n[PROOFSTEP]\ncalc\n  lift f (NeWord.append w₁ hne w₂).prod • X k = lift f w₁.prod • lift f w₂.prod • X k := by simp [MulAction.mul_smul]\n  _ ⊆ lift f w₁.prod • X _ := (set_smul_subset_set_smul_iff.mpr (hIw₂ hk))\n  _ ⊆ X i := hIw₁ hne\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni✝ j✝ k✝¹ : ι\nhk✝ : j✝ ≠ k✝¹\ni j k✝ l : ι\nw₁ : NeWord H i j\nhne : j ≠ k✝\nw₂ : NeWord H k✝ l\nhIw₁ : ∀ {k : ι}, j ≠ k → ↑(↑lift f) (NeWord.prod w₁) • X k ⊆ X i\nhIw₂ : ∀ {k : ι}, l ≠ k → ↑(↑lift f) (NeWord.prod w₂) • X k ⊆ X k✝\nk : ι\nhk : l ≠ k\n⊢ ↑(↑lift f) (NeWord.prod (NeWord.append w₁ hne w₂)) • X k =\n    ↑(↑lift f) (NeWord.prod w₁) • ↑(↑lift f) (NeWord.prod w₂) • X k\n[PROOFSTEP]\nsimp [MulAction.mul_smul]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j k : ι\nw : NeWord H i j\nhhead : k ≠ i\nhlast : k ≠ j\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nintro heq1\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j k : ι\nw : NeWord H i j\nhhead : k ≠ i\nhlast : k ≠ j\nheq1 : ↑(↑lift f) (NeWord.prod w) = 1\n⊢ False\n[PROOFSTEP]\nhave : X k ⊆ X i := by simpa [heq1] using lift_word_ping_pong f X hpp w hlast.symm\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j k : ι\nw : NeWord H i j\nhhead : k ≠ i\nhlast : k ≠ j\nheq1 : ↑(↑lift f) (NeWord.prod w) = 1\n⊢ X k ⊆ X i\n[PROOFSTEP]\nsimpa [heq1] using lift_word_ping_pong f X hpp w hlast.symm\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j k : ι\nw : NeWord H i j\nhhead : k ≠ i\nhlast : k ≠ j\nheq1 : ↑(↑lift f) (NeWord.prod w) = 1\nthis : X k ⊆ X i\n⊢ False\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := hXnonempty k\n[GOAL]\ncase intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j k : ι\nw : NeWord H i j\nhhead : k ≠ i\nhlast : k ≠ j\nheq1 : ↑(↑lift f) (NeWord.prod w) = 1\nthis : X k ⊆ X i\nx : α\nhx : x ∈ X k\n⊢ False\n[PROOFSTEP]\nexact (hXdisj hhead).le_bot ⟨hx, this hx⟩\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni : ι\nw : NeWord H i i\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := exists_ne i\n[GOAL]\ncase intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni : ι\nw : NeWord H i i\nk : ι\nhk : k ≠ i\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nexact lift_word_prod_nontrivial_of_other_i f X hXnonempty hXdisj hpp w hk hk\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard✝ : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H i)\nhheadtail : i ≠ j\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nobtain ⟨h, hn1, hnh⟩ := Cardinal.three_le hcard 1 w.head⁻¹\n[GOAL]\ncase intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard✝ : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H i)\nhheadtail : i ≠ j\nh : H i\nhn1 : h ≠ 1\nhnh : h ≠ (NeWord.head w)⁻¹\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nhave hnot1 : h * w.head ≠ 1 := by\n  rw [← div_inv_eq_mul]\n  exact div_ne_one_of_ne hnh\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard✝ : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H i)\nhheadtail : i ≠ j\nh : H i\nhn1 : h ≠ 1\nhnh : h ≠ (NeWord.head w)⁻¹\n⊢ h * NeWord.head w ≠ 1\n[PROOFSTEP]\nrw [← div_inv_eq_mul]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard✝ : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H i)\nhheadtail : i ≠ j\nh : H i\nhn1 : h ≠ 1\nhnh : h ≠ (NeWord.head w)⁻¹\n⊢ h / (NeWord.head w)⁻¹ ≠ 1\n[PROOFSTEP]\nexact div_ne_one_of_ne hnh\n[GOAL]\ncase intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard✝ : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H i)\nhheadtail : i ≠ j\nh : H i\nhn1 : h ≠ 1\nhnh : h ≠ (NeWord.head w)⁻¹\nhnot1 : h * NeWord.head w ≠ 1\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nlet w' : NeWord H i i :=\n  NeWord.append (NeWord.mulHead w h hnot1) hheadtail.symm (NeWord.singleton h⁻¹ (inv_ne_one.mpr hn1))\n[GOAL]\ncase intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard✝ : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H i)\nhheadtail : i ≠ j\nh : H i\nhn1 : h ≠ 1\nhnh : h ≠ (NeWord.head w)⁻¹\nhnot1 : h * NeWord.head w ≠ 1\nw' : NeWord H i i := NeWord.append (NeWord.mulHead w h hnot1) (_ : j ≠ i) (NeWord.singleton h⁻¹ (_ : h⁻¹ ≠ 1))\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nhave hw' : lift f w'.prod ≠ 1 := lift_word_prod_nontrivial_of_head_eq_last f X hXnonempty hXdisj hpp w'\n[GOAL]\ncase intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard✝ : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H i)\nhheadtail : i ≠ j\nh : H i\nhn1 : h ≠ 1\nhnh : h ≠ (NeWord.head w)⁻¹\nhnot1 : h * NeWord.head w ≠ 1\nw' : NeWord H i i := NeWord.append (NeWord.mulHead w h hnot1) (_ : j ≠ i) (NeWord.singleton h⁻¹ (_ : h⁻¹ ≠ 1))\nhw' : ↑(↑lift f) (NeWord.prod w') ≠ 1\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nintro heq1\n[GOAL]\ncase intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard✝ : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H i)\nhheadtail : i ≠ j\nh : H i\nhn1 : h ≠ 1\nhnh : h ≠ (NeWord.head w)⁻¹\nhnot1 : h * NeWord.head w ≠ 1\nw' : NeWord H i i := NeWord.append (NeWord.mulHead w h hnot1) (_ : j ≠ i) (NeWord.singleton h⁻¹ (_ : h⁻¹ ≠ 1))\nhw' : ↑(↑lift f) (NeWord.prod w') ≠ 1\nheq1 : ↑(↑lift f) (NeWord.prod w) = 1\n⊢ False\n[PROOFSTEP]\napply hw'\n[GOAL]\ncase intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard✝ : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H i)\nhheadtail : i ≠ j\nh : H i\nhn1 : h ≠ 1\nhnh : h ≠ (NeWord.head w)⁻¹\nhnot1 : h * NeWord.head w ≠ 1\nw' : NeWord H i i := NeWord.append (NeWord.mulHead w h hnot1) (_ : j ≠ i) (NeWord.singleton h⁻¹ (_ : h⁻¹ ≠ 1))\nhw' : ↑(↑lift f) (NeWord.prod w') ≠ 1\nheq1 : ↑(↑lift f) (NeWord.prod w) = 1\n⊢ ↑(↑lift f) (NeWord.prod w') = 1\n[PROOFSTEP]\nsimp [heq1]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nclassical\ncases' hcard with hcard hcard\n· obtain ⟨i, h1, h2⟩ := Cardinal.three_le hcard i j\n  exact lift_word_prod_nontrivial_of_other_i f X hXnonempty hXdisj hpp w h1 h2\n· cases' hcard with k hcard\n  by_cases hh : i = k <;> by_cases hl : j = k\n  · subst hh\n    subst hl\n    exact lift_word_prod_nontrivial_of_head_eq_last f X hXnonempty hXdisj hpp w\n  · subst hh\n    change j ≠ i at hl \n    exact lift_word_prod_nontrivial_of_head_card f X hXnonempty hXdisj hpp w hcard hl.symm\n  · subst hl\n    change i ≠ j at hh \n    have : lift f w.inv.prod ≠ 1 := lift_word_prod_nontrivial_of_head_card f X hXnonempty hXdisj hpp w.inv hcard hh.symm\n    intro heq\n    apply this\n    simpa using heq\n  · change i ≠ k at hh \n    change j ≠ k at hl \n    obtain ⟨h, hn1, -⟩ := Cardinal.three_le hcard 1 1\n    let w' : NeWord H k k :=\n      NeWord.append (NeWord.append (NeWord.singleton h hn1) hh.symm w) hl (NeWord.singleton h⁻¹ (inv_ne_one.mpr hn1))\n    have hw' : lift f w'.prod ≠ 1 := lift_word_prod_nontrivial_of_head_eq_last f X hXnonempty hXdisj hpp w'\n    intro heq1\n    apply hw'\n    simp [heq1]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\ncases' hcard with hcard hcard\n[GOAL]\ncase inl\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #ι\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nobtain ⟨i, h1, h2⟩ := Cardinal.three_le hcard i j\n[GOAL]\ncase inl.intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni✝ j : ι\nw : NeWord H i✝ j\nhcard : 3 ≤ #ι\ni : ι\nh1 : i ≠ i✝\nh2 : i ≠ j\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nexact lift_word_prod_nontrivial_of_other_i f X hXnonempty hXdisj hpp w h1 h2\n[GOAL]\ncase inr\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : ∃ i, 3 ≤ #(H i)\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\ncases' hcard with k hcard\n[GOAL]\ncase inr.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nby_cases hh : i = k\n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhh : i = k\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nby_cases hl : j = k\n[GOAL]\ncase neg\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhh : ¬i = k\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nby_cases hl : j = k\n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhh : i = k\nhl : j = k\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nsubst hh\n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H i)\nhl : j = i\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nsubst hl\n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\nj : ι\nw : NeWord H j j\nhcard : 3 ≤ #(H j)\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nexact lift_word_prod_nontrivial_of_head_eq_last f X hXnonempty hXdisj hpp w\n[GOAL]\ncase neg\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhh : i = k\nhl : ¬j = k\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nsubst hh\n[GOAL]\ncase neg\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H i)\nhl : ¬j = i\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nchange j ≠ i at hl \n[GOAL]\ncase neg\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H i)\nhl : j ≠ i\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nexact lift_word_prod_nontrivial_of_head_card f X hXnonempty hXdisj hpp w hcard hl.symm\n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhh : ¬i = k\nhl : j = k\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nsubst hl\n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H j)\nhh : ¬i = j\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nchange i ≠ j at hh \n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H j)\nhh : i ≠ j\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nhave : lift f w.inv.prod ≠ 1 := lift_word_prod_nontrivial_of_head_card f X hXnonempty hXdisj hpp w.inv hcard hh.symm\n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H j)\nhh : i ≠ j\nthis : ↑(↑lift f) (NeWord.prod (NeWord.inv w)) ≠ 1\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nintro heq\n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H j)\nhh : i ≠ j\nthis : ↑(↑lift f) (NeWord.prod (NeWord.inv w)) ≠ 1\nheq : ↑(↑lift f) (NeWord.prod w) = 1\n⊢ False\n[PROOFSTEP]\napply this\n[GOAL]\ncase pos\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nhcard : 3 ≤ #(H j)\nhh : i ≠ j\nthis : ↑(↑lift f) (NeWord.prod (NeWord.inv w)) ≠ 1\nheq : ↑(↑lift f) (NeWord.prod w) = 1\n⊢ ↑(↑lift f) (NeWord.prod (NeWord.inv w)) = 1\n[PROOFSTEP]\nsimpa using heq\n[GOAL]\ncase neg\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhh : ¬i = k\nhl : ¬j = k\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nchange i ≠ k at hh \n[GOAL]\ncase neg\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhl : ¬j = k\nhh : i ≠ k\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nchange j ≠ k at hl \n[GOAL]\ncase neg\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhh : i ≠ k\nhl : j ≠ k\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nobtain ⟨h, hn1, -⟩ := Cardinal.three_le hcard 1 1\n[GOAL]\ncase neg.intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhh : i ≠ k\nhl : j ≠ k\nh : H k\nhn1 : h ≠ 1\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nlet w' : NeWord H k k :=\n  NeWord.append (NeWord.append (NeWord.singleton h hn1) hh.symm w) hl (NeWord.singleton h⁻¹ (inv_ne_one.mpr hn1))\n[GOAL]\ncase neg.intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhh : i ≠ k\nhl : j ≠ k\nh : H k\nhn1 : h ≠ 1\nw' : NeWord H k k :=\n  NeWord.append (NeWord.append (NeWord.singleton h hn1) (_ : k ≠ i) w) hl (NeWord.singleton h⁻¹ (_ : h⁻¹ ≠ 1))\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nhave hw' : lift f w'.prod ≠ 1 := lift_word_prod_nontrivial_of_head_eq_last f X hXnonempty hXdisj hpp w'\n[GOAL]\ncase neg.intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhh : i ≠ k\nhl : j ≠ k\nh : H k\nhn1 : h ≠ 1\nw' : NeWord H k k :=\n  NeWord.append (NeWord.append (NeWord.singleton h hn1) (_ : k ≠ i) w) hl (NeWord.singleton h⁻¹ (_ : h⁻¹ ≠ 1))\nhw' : ↑(↑lift f) (NeWord.prod w') ≠ 1\n⊢ ↑(↑lift f) (NeWord.prod w) ≠ 1\n[PROOFSTEP]\nintro heq1\n[GOAL]\ncase neg.intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhh : i ≠ k\nhl : j ≠ k\nh : H k\nhn1 : h ≠ 1\nw' : NeWord H k k :=\n  NeWord.append (NeWord.append (NeWord.singleton h hn1) (_ : k ≠ i) w) hl (NeWord.singleton h⁻¹ (_ : h⁻¹ ≠ 1))\nhw' : ↑(↑lift f) (NeWord.prod w') ≠ 1\nheq1 : ↑(↑lift f) (NeWord.prod w) = 1\n⊢ False\n[PROOFSTEP]\napply hw'\n[GOAL]\ncase neg.intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nk : ι\nhcard : 3 ≤ #(H k)\nhh : i ≠ k\nhl : j ≠ k\nh : H k\nhn1 : h ≠ 1\nw' : NeWord H k k :=\n  NeWord.append (NeWord.append (NeWord.singleton h hn1) (_ : k ≠ i) w) hl (NeWord.singleton h⁻¹ (_ : h⁻¹ ≠ 1))\nhw' : ↑(↑lift f) (NeWord.prod w') ≠ 1\nheq1 : ↑(↑lift f) (NeWord.prod w) = 1\n⊢ ↑(↑lift f) (NeWord.prod w') = 1\n[PROOFSTEP]\nsimp [heq1]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\nw : Word H\nh : ↑(↑lift f) (Word.prod w) = 1\n⊢ w = Word.empty\n[PROOFSTEP]\nby_contra hnotempty\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\nw : Word H\nh : ↑(↑lift f) (Word.prod w) = 1\nhnotempty : ¬w = Word.empty\n⊢ False\n[PROOFSTEP]\nobtain ⟨i, j, w, rfl⟩ := NeWord.of_word w hnotempty\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\ni j : ι\nw : NeWord H i j\nh : ↑(↑lift f) (Word.prod (NeWord.toWord w)) = 1\nhnotempty : ¬NeWord.toWord w = Word.empty\n⊢ False\n[PROOFSTEP]\nexact lift_word_prod_nontrivial_of_not_empty f hcard X hXnonempty hXdisj hpp w h\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\n⊢ Function.Injective ↑(↑lift f)\n[PROOFSTEP]\nclassical\napply (injective_iff_map_eq_one (lift f)).mpr\nrw [(CoprodI.Word.equiv).forall_congr_left']\n· intro w Heq\n  dsimp [Word.equiv] at *\n  · rw [empty_of_word_prod_eq_one f hcard X hXnonempty hXdisj hpp Heq]\n    rfl\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\n⊢ Function.Injective ↑(↑lift f)\n[PROOFSTEP]\napply (injective_iff_map_eq_one (lift f)).mpr\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\n⊢ ∀ (a : CoprodI fun i => H i), ↑(↑lift f) a = 1 → a = 1\n[PROOFSTEP]\nrw [(CoprodI.Word.equiv).forall_congr_left']\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\n⊢ ∀ (y : Word fun i => H i), ↑(↑lift f) (↑Word.equiv.symm y) = 1 → ↑Word.equiv.symm y = 1\n[PROOFSTEP]\nintro w Heq\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X j ⊆ X i\nw : Word fun i => H i\nHeq : ↑(↑lift f) (↑Word.equiv.symm w) = 1\n⊢ ↑Word.equiv.symm w = 1\n[PROOFSTEP]\ndsimp [Word.equiv] at *\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), ¬h = 1 → ↑(f i) h • X j ⊆ X i\nw : Word fun i => H i\nHeq : ↑(↑lift f) (Word.prod w) = 1\n⊢ Word.prod w = 1\n[PROOFSTEP]\nrw [empty_of_word_prod_eq_one f hcard X hXnonempty hXdisj hpp Heq]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\nhnontriv : Nontrivial ι\nG : Type u_4\ninst✝² : Group G\nH : ι → Type u_5\ninst✝¹ : (i : ι) → Group (H i)\nf : (i : ι) → H i →* G\nhcard : 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\nα : Type u_6\ninst✝ : MulAction G α\nX : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhpp : Pairwise fun i j => ∀ (h : H i), ¬h = 1 → ↑(f i) h • X j ⊆ X i\nw : Word fun i => H i\nHeq : ↑(↑lift f) (Word.prod w) = 1\n⊢ Word.prod Word.empty = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝² : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nι : Type u_4\nG : ι → Type u_5\ninst✝ : (i : ι) → Group (G i)\nhG : (i : ι) → IsFreeGroup (G i)\n⊢ MonoidHom.comp (↑lift fun i => ↑IsFreeGroup.lift fun x => FreeGroup.of { fst := i, snd := x })\n      (↑FreeGroup.lift fun x => ↑of (IsFreeGroup.of x.snd)) =\n    MonoidHom.id (FreeGroup ((i : ι) × IsFreeGroup.Generators (G i)))\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝² : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nι : Type u_4\nG : ι → Type u_5\ninst✝ : (i : ι) → Group (G i)\nhG : (i : ι) → IsFreeGroup (G i)\na✝ : IsFreeGroup.Generators (FreeGroup ((i : ι) × IsFreeGroup.Generators (G i)))\n⊢ ↑(MonoidHom.comp (↑lift fun i => ↑IsFreeGroup.lift fun x => FreeGroup.of { fst := i, snd := x })\n          (↑FreeGroup.lift fun x => ↑of (IsFreeGroup.of x.snd)))\n      (IsFreeGroup.of a✝) =\n    ↑(MonoidHom.id (FreeGroup ((i : ι) × IsFreeGroup.Generators (G i)))) (IsFreeGroup.of a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝² : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nι : Type u_4\nG : ι → Type u_5\ninst✝ : (i : ι) → Group (G i)\nhG : (i : ι) → IsFreeGroup (G i)\n⊢ MonoidHom.comp (↑FreeGroup.lift fun x => ↑of (IsFreeGroup.of x.snd))\n      (↑lift fun i => ↑IsFreeGroup.lift fun x => FreeGroup.of { fst := i, snd := x }) =\n    MonoidHom.id (CoprodI G)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝² : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝¹ : Monoid N\nι : Type u_4\nG : ι → Type u_5\ninst✝ : (i : ι) → Group (G i)\nhG : (i : ι) → IsFreeGroup (G i)\ni✝ : ι\na✝ : IsFreeGroup.Generators (G i✝)\n⊢ ↑(MonoidHom.comp\n          (MonoidHom.comp (↑FreeGroup.lift fun x => ↑of (IsFreeGroup.of x.snd))\n            (↑lift fun i => ↑IsFreeGroup.lift fun x => FreeGroup.of { fst := i, snd := x }))\n          of)\n      (IsFreeGroup.of a✝) =\n    ↑(MonoidHom.comp (MonoidHom.id (CoprodI G)) of) (IsFreeGroup.of a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\n⊢ FreeGroup ι ≃* CoprodI fun x => FreeGroup Unit\n[PROOFSTEP]\nrefine' MonoidHom.toMulEquiv _ _ _ _\n[GOAL]\ncase refine'_1\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\n⊢ FreeGroup ι →* CoprodI fun x => FreeGroup Unit\ncase refine'_2\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\n⊢ (CoprodI fun x => FreeGroup Unit) →* FreeGroup ι\ncase refine'_3\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\n⊢ MonoidHom.comp ?refine'_2 ?refine'_1 = MonoidHom.id (FreeGroup ι)\ncase refine'_4\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\n⊢ MonoidHom.comp ?refine'_1 ?refine'_2 = MonoidHom.id (CoprodI fun x => FreeGroup Unit)\n[PROOFSTEP]\nexact FreeGroup.lift fun i => @CoprodI.of ι _ _ i (FreeGroup.of Unit.unit)\n[GOAL]\ncase refine'_2\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\n⊢ (CoprodI fun x => FreeGroup Unit) →* FreeGroup ι\ncase refine'_3\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\n⊢ MonoidHom.comp ?refine'_2 (↑FreeGroup.lift fun i => ↑of (FreeGroup.of ())) = MonoidHom.id (FreeGroup ι)\ncase refine'_4\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\n⊢ MonoidHom.comp (↑FreeGroup.lift fun i => ↑of (FreeGroup.of ())) ?refine'_2 =\n    MonoidHom.id (CoprodI fun x => FreeGroup Unit)\n[PROOFSTEP]\nexact CoprodI.lift fun i => FreeGroup.lift fun _ => FreeGroup.of i\n[GOAL]\ncase refine'_3\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\n⊢ MonoidHom.comp (↑lift fun i => ↑FreeGroup.lift fun x => FreeGroup.of i)\n      (↑FreeGroup.lift fun i => ↑of (FreeGroup.of ())) =\n    MonoidHom.id (FreeGroup ι)\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_3.h\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\na✝ : IsFreeGroup.Generators (FreeGroup ι)\n⊢ ↑(MonoidHom.comp (↑lift fun i => ↑FreeGroup.lift fun x => FreeGroup.of i)\n          (↑FreeGroup.lift fun i => ↑of (FreeGroup.of ())))\n      (IsFreeGroup.of a✝) =\n    ↑(MonoidHom.id (FreeGroup ι)) (IsFreeGroup.of a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_4\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\n⊢ MonoidHom.comp (↑FreeGroup.lift fun i => ↑of (FreeGroup.of ()))\n      (↑lift fun i => ↑FreeGroup.lift fun x => FreeGroup.of i) =\n    MonoidHom.id (CoprodI fun x => FreeGroup Unit)\n[PROOFSTEP]\next i a\n[GOAL]\ncase refine'_4.h.h\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\ni : ι\na : IsFreeGroup.Generators (FreeGroup Unit)\n⊢ ↑(MonoidHom.comp\n          (MonoidHom.comp (↑FreeGroup.lift fun i => ↑of (FreeGroup.of ()))\n            (↑lift fun i => ↑FreeGroup.lift fun x => FreeGroup.of i))\n          of)\n      (IsFreeGroup.of a) =\n    ↑(MonoidHom.comp (MonoidHom.id (CoprodI fun x => FreeGroup Unit)) of) (IsFreeGroup.of a)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase refine'_4.h.h.unit\nι✝ : Type u_1\nM : ι✝ → Type u_2\ninst✝¹ : (i : ι✝) → Monoid (M i)\nN : Type u_3\ninst✝ : Monoid N\nι : Type u_1\ni : ι\n⊢ ↑(MonoidHom.comp\n          (MonoidHom.comp (↑FreeGroup.lift fun i => ↑of (FreeGroup.of ()))\n            (↑lift fun i => ↑FreeGroup.lift fun x => FreeGroup.of i))\n          of)\n      (IsFreeGroup.of PUnit.unit) =\n    ↑(MonoidHom.comp (MonoidHom.id (CoprodI fun x => FreeGroup Unit)) of) (IsFreeGroup.of PUnit.unit)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\n⊢ Function.Injective ↑(↑FreeGroup.lift a)\n[PROOFSTEP]\nhave :\n  FreeGroup.lift a = (CoprodI.lift fun i => FreeGroup.lift fun _ => a i).comp (@freeGroupEquivCoprodI ι).toMonoidHom :=\n  by\n  ext i\n  simp\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\n⊢ ↑FreeGroup.lift a =\n    MonoidHom.comp (↑lift fun i => ↑FreeGroup.lift fun x => a i) (MulEquiv.toMonoidHom freeGroupEquivCoprodI)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\ni : IsFreeGroup.Generators (FreeGroup ι)\n⊢ ↑(↑FreeGroup.lift a) (IsFreeGroup.of i) =\n    ↑(MonoidHom.comp (↑lift fun i => ↑FreeGroup.lift fun x => a i) (MulEquiv.toMonoidHom freeGroupEquivCoprodI))\n      (IsFreeGroup.of i)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nthis :\n  ↑FreeGroup.lift a =\n    MonoidHom.comp (↑lift fun i => ↑FreeGroup.lift fun x => a i) (MulEquiv.toMonoidHom freeGroupEquivCoprodI)\n⊢ Function.Injective ↑(↑FreeGroup.lift a)\n[PROOFSTEP]\nrw [this, MonoidHom.coe_comp]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nthis :\n  ↑FreeGroup.lift a =\n    MonoidHom.comp (↑lift fun i => ↑FreeGroup.lift fun x => a i) (MulEquiv.toMonoidHom freeGroupEquivCoprodI)\n⊢ Function.Injective (↑(↑lift fun i => ↑FreeGroup.lift fun x => a i) ∘ ↑(MulEquiv.toMonoidHom freeGroupEquivCoprodI))\n[PROOFSTEP]\nclear this\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\n⊢ Function.Injective (↑(↑lift fun i => ↑FreeGroup.lift fun x => a i) ∘ ↑(MulEquiv.toMonoidHom freeGroupEquivCoprodI))\n[PROOFSTEP]\nrefine'\n  Function.Injective.comp _\n    (MulEquiv.injective freeGroupEquivCoprodI)\n      -- Step two: Invoke the ping-pong lemma for free products\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\n⊢ Function.Injective ↑(↑lift fun i => ↑FreeGroup.lift fun x => a i)\n[PROOFSTEP]\nshow\n  Function.Injective\n    (lift fun i : ι => FreeGroup.lift fun _ => a i)\n      -- Prepare to instantiate lift_injective_of_ping_pong\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\n⊢ Function.Injective ↑(↑lift fun i => ↑FreeGroup.lift fun x => a i)\n[PROOFSTEP]\nlet H : ι → Type _ := fun _i => FreeGroup Unit\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\n⊢ Function.Injective ↑(↑lift fun i => ↑FreeGroup.lift fun x => a i)\n[PROOFSTEP]\nlet f : ∀ i, H i →* G := fun i => FreeGroup.lift fun _ => a i\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\n⊢ Function.Injective ↑(↑lift fun i => ↑FreeGroup.lift fun x => a i)\n[PROOFSTEP]\nlet X' : ι → Set α := fun i => X i ∪ Y i\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ Function.Injective ↑(↑lift fun i => ↑FreeGroup.lift fun x => a i)\n[PROOFSTEP]\napply lift_injective_of_ping_pong f _ X'\n[GOAL]\ncase hXnonempty\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ ∀ (i : ι), Set.Nonempty (X' i)\ncase hXdisj\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ Pairwise fun i j => Disjoint (X' i) (X' j)\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X' j ⊆ X' i\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\n[PROOFSTEP]\nshow ∀ i, (X' i).Nonempty\n[GOAL]\ncase hXnonempty\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ ∀ (i : ι), Set.Nonempty (X' i)\n[PROOFSTEP]\nexact fun i => Set.Nonempty.inl (hXnonempty i)\n[GOAL]\ncase hXdisj\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ Pairwise fun i j => Disjoint (X' i) (X' j)\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X' j ⊆ X' i\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\n[PROOFSTEP]\nshow Pairwise fun i j => Disjoint (X' i) (X' j)\n[GOAL]\ncase hXdisj\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ Pairwise fun i j => Disjoint (X' i) (X' j)\n[PROOFSTEP]\nintro i j hij\n[GOAL]\ncase hXdisj\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\n⊢ Disjoint (X' i) (X' j)\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase hXdisj\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\n⊢ Disjoint (X i ∪ Y i) (X j ∪ Y j)\n[PROOFSTEP]\napply Disjoint.union_left\n[GOAL]\ncase hXdisj.hs\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\n⊢ Disjoint (X i) (X j ∪ Y j)\n[PROOFSTEP]\napply Disjoint.union_right\n[GOAL]\ncase hXdisj.ht\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\n⊢ Disjoint (Y i) (X j ∪ Y j)\n[PROOFSTEP]\napply Disjoint.union_right\n[GOAL]\ncase hXdisj.hs.ht\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\n⊢ Disjoint (X i) (X j)\n[PROOFSTEP]\nexact hXdisj hij\n[GOAL]\ncase hXdisj.hs.hu\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\n⊢ Disjoint (X i) (Y j)\n[PROOFSTEP]\nexact hXYdisj i j\n[GOAL]\ncase hXdisj.ht.ht\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\n⊢ Disjoint (Y i) (X j)\n[PROOFSTEP]\nexact (hXYdisj j i).symm\n[GOAL]\ncase hXdisj.ht.hu\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\n⊢ Disjoint (Y i) (Y j)\n[PROOFSTEP]\nexact hYdisj hij\n[GOAL]\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X' j ⊆ X' i\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\n[PROOFSTEP]\nshow Pairwise fun i j => ∀ h : H i, h ≠ 1 → f i h • X' j ⊆ X' i\n[GOAL]\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ Pairwise fun i j => ∀ (h : H i), h ≠ 1 → ↑(f i) h • X' j ⊆ X' i\n[PROOFSTEP]\nrintro i j hij\n[GOAL]\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\n⊢ ∀ (h : H i), h ≠ 1 → ↑(f i) h • X' j ⊆ X' i\n[PROOFSTEP]\nrefine' FreeGroup.freeGroupUnitEquivInt.forall_congr_left'.mpr _\n[GOAL]\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\n⊢ ∀ (y : ℤ),\n    ↑FreeGroup.freeGroupUnitEquivInt.symm y ≠ 1 → ↑(f i) (↑FreeGroup.freeGroupUnitEquivInt.symm y) • X' j ⊆ X' i\n[PROOFSTEP]\nintro n hne1\n[GOAL]\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhne1 : ↑FreeGroup.freeGroupUnitEquivInt.symm n ≠ 1\n⊢ ↑(f i) (↑FreeGroup.freeGroupUnitEquivInt.symm n) • X' j ⊆ X' i\n[PROOFSTEP]\nchange FreeGroup.lift (fun _ => a i) (FreeGroup.of () ^ n) • X' j ⊆ X' i\n[GOAL]\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhne1 : ↑FreeGroup.freeGroupUnitEquivInt.symm n ≠ 1\n⊢ ↑(↑FreeGroup.lift fun x => a i) (FreeGroup.of () ^ n) • X' j ⊆ X' i\n[PROOFSTEP]\nsimp only [map_zpow, FreeGroup.lift.of]\n[GOAL]\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhne1 : ↑FreeGroup.freeGroupUnitEquivInt.symm n ≠ 1\n⊢ a i ^ n • (X j ∪ Y j) ⊆ X i ∪ Y i\n[PROOFSTEP]\nchange a i ^ n • X' j ⊆ X' i\n[GOAL]\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhne1 : ↑FreeGroup.freeGroupUnitEquivInt.symm n ≠ 1\n⊢ a i ^ n • X' j ⊆ X' i\n[PROOFSTEP]\nhave hnne0 : n ≠ 0 := by\n  rintro rfl\n  apply hne1\n  simp; rfl\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhne1 : ↑FreeGroup.freeGroupUnitEquivInt.symm n ≠ 1\n⊢ n ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nhne1 : ↑FreeGroup.freeGroupUnitEquivInt.symm 0 ≠ 1\n⊢ False\n[PROOFSTEP]\napply hne1\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nhne1 : ↑FreeGroup.freeGroupUnitEquivInt.symm 0 ≠ 1\n⊢ ↑FreeGroup.freeGroupUnitEquivInt.symm 0 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nhne1 : ↑FreeGroup.freeGroupUnitEquivInt.symm 0 ≠ 1\n⊢ ↑FreeGroup.freeGroupUnitEquivInt.symm 0 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhne1 : ↑FreeGroup.freeGroupUnitEquivInt.symm n ≠ 1\nhnne0 : n ≠ 0\n⊢ a i ^ n • X' j ⊆ X' i\n[PROOFSTEP]\nclear hne1\n[GOAL]\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\n⊢ a i ^ n • X' j ⊆ X' i\n[PROOFSTEP]\nsimp only\n  -- Positive and negative powers separately\n[GOAL]\ncase hpp\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\n⊢ a i ^ n • (X j ∪ Y j) ⊆ X i ∪ Y i\n[PROOFSTEP]\ncases' (lt_or_gt_of_ne hnne0).symm with hlt hgt\n[GOAL]\ncase hpp.inl\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhlt : n > 0\n⊢ a i ^ n • (X j ∪ Y j) ⊆ X i ∪ Y i\n[PROOFSTEP]\nhave h1n : 1 ≤ n := hlt\n[GOAL]\ncase hpp.inl\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhlt : n > 0\nh1n : 1 ≤ n\n⊢ a i ^ n • (X j ∪ Y j) ⊆ X i ∪ Y i\n[PROOFSTEP]\ncalc\n  a i ^ n • X' j ⊆ a i ^ n • (Y i)ᶜ := smul_set_mono ((hXYdisj j i).union_left <| hYdisj hij.symm).subset_compl_right\n  _ ⊆ X i := by\n    clear hnne0 hlt\n    refine Int.le_induction (P := fun n => a i ^ n • (Y i)ᶜ ⊆ X i) ?_ ?_ n h1n\n    · dsimp\n      rw [zpow_one]\n      exact hX i\n    · dsimp\n      intro n _hle hi\n      calc\n        a i ^ (n + 1) • (Y i)ᶜ = (a i ^ n * a i) • (Y i)ᶜ := by rw [zpow_add, zpow_one]\n        _ = a i ^ n • a i • (Y i)ᶜ := (MulAction.mul_smul _ _ _)\n        _ ⊆ a i ^ n • X i := (smul_set_mono <| hX i)\n        _ ⊆ a i ^ n • (Y i)ᶜ := (smul_set_mono (hXYdisj i i).subset_compl_right)\n        _ ⊆ X i := hi\n  _ ⊆ X' i := Set.subset_union_left _ _\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhlt : n > 0\nh1n : 1 ≤ n\n⊢ a i ^ n • (Y i)ᶜ ⊆ X i\n[PROOFSTEP]\nclear hnne0 hlt\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nh1n : 1 ≤ n\n⊢ a i ^ n • (Y i)ᶜ ⊆ X i\n[PROOFSTEP]\nrefine Int.le_induction (P := fun n => a i ^ n • (Y i)ᶜ ⊆ X i) ?_ ?_ n h1n\n[GOAL]\ncase refine_1\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nh1n : 1 ≤ n\n⊢ (fun n => a i ^ n • (Y i)ᶜ ⊆ X i) 1\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine_1\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nh1n : 1 ≤ n\n⊢ a i ^ 1 • (Y i)ᶜ ⊆ X i\n[PROOFSTEP]\nrw [zpow_one]\n[GOAL]\ncase refine_1\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nh1n : 1 ≤ n\n⊢ a i • (Y i)ᶜ ⊆ X i\n[PROOFSTEP]\nexact hX i\n[GOAL]\ncase refine_2\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nh1n : 1 ≤ n\n⊢ ∀ (n : ℤ), 1 ≤ n → (fun n => a i ^ n • (Y i)ᶜ ⊆ X i) n → (fun n => a i ^ n • (Y i)ᶜ ⊆ X i) (n + 1)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine_2\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nh1n : 1 ≤ n\n⊢ ∀ (n : ℤ), 1 ≤ n → a i ^ n • (Y i)ᶜ ⊆ X i → a i ^ (n + 1) • (Y i)ᶜ ⊆ X i\n[PROOFSTEP]\nintro n _hle hi\n[GOAL]\ncase refine_2\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn✝ : ℤ\nh1n : 1 ≤ n✝\nn : ℤ\n_hle : 1 ≤ n\nhi : a i ^ n • (Y i)ᶜ ⊆ X i\n⊢ a i ^ (n + 1) • (Y i)ᶜ ⊆ X i\n[PROOFSTEP]\ncalc\n  a i ^ (n + 1) • (Y i)ᶜ = (a i ^ n * a i) • (Y i)ᶜ := by rw [zpow_add, zpow_one]\n  _ = a i ^ n • a i • (Y i)ᶜ := (MulAction.mul_smul _ _ _)\n  _ ⊆ a i ^ n • X i := (smul_set_mono <| hX i)\n  _ ⊆ a i ^ n • (Y i)ᶜ := (smul_set_mono (hXYdisj i i).subset_compl_right)\n  _ ⊆ X i := hi\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn✝ : ℤ\nh1n : 1 ≤ n✝\nn : ℤ\n_hle : 1 ≤ n\nhi : a i ^ n • (Y i)ᶜ ⊆ X i\n⊢ a i ^ (n + 1) • (Y i)ᶜ = (a i ^ n * a i) • (Y i)ᶜ\n[PROOFSTEP]\nrw [zpow_add, zpow_one]\n[GOAL]\ncase hpp.inr\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhgt : n < 0\n⊢ a i ^ n • (X j ∪ Y j) ⊆ X i ∪ Y i\n[PROOFSTEP]\nhave h1n : n ≤ -1 := by\n  apply Int.le_of_lt_add_one\n  simpa using hgt\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhgt : n < 0\n⊢ n ≤ -1\n[PROOFSTEP]\napply Int.le_of_lt_add_one\n[GOAL]\ncase H\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhgt : n < 0\n⊢ n < -1 + 1\n[PROOFSTEP]\nsimpa using hgt\n[GOAL]\ncase hpp.inr\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhgt : n < 0\nh1n : n ≤ -1\n⊢ a i ^ n • (X j ∪ Y j) ⊆ X i ∪ Y i\n[PROOFSTEP]\ncalc\n  a i ^ n • X' j ⊆ a i ^ n • (X i)ᶜ :=\n    smul_set_mono ((hXdisj hij.symm).union_left (hXYdisj i j).symm).subset_compl_right\n  _ ⊆ Y i := by\n    refine' Int.le_induction_down (P := fun n => a i ^ n • (X i)ᶜ ⊆ Y i) _ _ _ h1n\n    · dsimp\n      rw [zpow_neg, zpow_one]\n      exact hY i\n    · dsimp\n      intro n _ hi\n      calc\n        a i ^ (n - 1) • (X i)ᶜ = (a i ^ n * (a i)⁻¹) • (X i)ᶜ := by rw [zpow_sub, zpow_one]\n        _ = a i ^ n • (a i)⁻¹ • (X i)ᶜ := (MulAction.mul_smul _ _ _)\n        _ ⊆ a i ^ n • Y i := (smul_set_mono <| hY i)\n        _ ⊆ a i ^ n • (X i)ᶜ := (smul_set_mono (hXYdisj i i).symm.subset_compl_right)\n        _ ⊆ Y i := hi\n  _ ⊆ X' i := Set.subset_union_right _ _\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhgt : n < 0\nh1n : n ≤ -1\n⊢ a i ^ n • (X i)ᶜ ⊆ Y i\n[PROOFSTEP]\nrefine' Int.le_induction_down (P := fun n => a i ^ n • (X i)ᶜ ⊆ Y i) _ _ _ h1n\n[GOAL]\ncase refine'_1\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhgt : n < 0\nh1n : n ≤ -1\n⊢ (fun n => a i ^ n • (X i)ᶜ ⊆ Y i) (-1)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhgt : n < 0\nh1n : n ≤ -1\n⊢ a i ^ (-1) • (X i)ᶜ ⊆ Y i\n[PROOFSTEP]\nrw [zpow_neg, zpow_one]\n[GOAL]\ncase refine'_1\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhgt : n < 0\nh1n : n ≤ -1\n⊢ (a i)⁻¹ • (X i)ᶜ ⊆ Y i\n[PROOFSTEP]\nexact hY i\n[GOAL]\ncase refine'_2\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhgt : n < 0\nh1n : n ≤ -1\n⊢ ∀ (n : ℤ), n ≤ -1 → (fun n => a i ^ n • (X i)ᶜ ⊆ Y i) n → (fun n => a i ^ n • (X i)ᶜ ⊆ Y i) (n - 1)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_2\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn : ℤ\nhnne0 : n ≠ 0\nhgt : n < 0\nh1n : n ≤ -1\n⊢ ∀ (n : ℤ), n ≤ -1 → a i ^ n • (X i)ᶜ ⊆ Y i → a i ^ (n - 1) • (X i)ᶜ ⊆ Y i\n[PROOFSTEP]\nintro n _ hi\n[GOAL]\ncase refine'_2\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn✝ : ℤ\nhnne0 : n✝ ≠ 0\nhgt : n✝ < 0\nh1n : n✝ ≤ -1\nn : ℤ\na✝ : n ≤ -1\nhi : a i ^ n • (X i)ᶜ ⊆ Y i\n⊢ a i ^ (n - 1) • (X i)ᶜ ⊆ Y i\n[PROOFSTEP]\ncalc\n  a i ^ (n - 1) • (X i)ᶜ = (a i ^ n * (a i)⁻¹) • (X i)ᶜ := by rw [zpow_sub, zpow_one]\n  _ = a i ^ n • (a i)⁻¹ • (X i)ᶜ := (MulAction.mul_smul _ _ _)\n  _ ⊆ a i ^ n • Y i := (smul_set_mono <| hY i)\n  _ ⊆ a i ^ n • (X i)ᶜ := (smul_set_mono (hXYdisj i i).symm.subset_compl_right)\n  _ ⊆ Y i := hi\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ni j : ι\nhij : i ≠ j\nn✝ : ℤ\nhnne0 : n✝ ≠ 0\nhgt : n✝ < 0\nh1n : n✝ ≤ -1\nn : ℤ\na✝ : n ≤ -1\nhi : a i ^ n • (X i)ᶜ ⊆ Y i\n⊢ a i ^ (n - 1) • (X i)ᶜ = (a i ^ n * (a i)⁻¹) • (X i)ᶜ\n[PROOFSTEP]\nrw [zpow_sub, zpow_one]\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\n[PROOFSTEP]\nshow _ ∨ ∃ i, 3 ≤ #(H i)\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\n⊢ 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\n[PROOFSTEP]\ninhabit ι\n[GOAL]\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ninhabited_h : Inhabited ι\n⊢ 3 ≤ #ι ∨ ∃ i, 3 ≤ #(H i)\n[PROOFSTEP]\nright\n[GOAL]\ncase h\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ninhabited_h : Inhabited ι\n⊢ ∃ i, 3 ≤ #(H i)\n[PROOFSTEP]\nuse Inhabited.default\n[GOAL]\ncase h\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ninhabited_h : Inhabited ι\n⊢ 3 ≤ #(H default)\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase h\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ninhabited_h : Inhabited ι\n⊢ 3 ≤ #(FreeGroup Unit)\n[PROOFSTEP]\nrw [FreeGroup.freeGroupUnitEquivInt.cardinal_eq, Cardinal.mk_denumerable]\n[GOAL]\ncase h\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ninhabited_h : Inhabited ι\n⊢ 3 ≤ ℵ₀\n[PROOFSTEP]\napply le_of_lt\n[GOAL]\ncase h.a\nι : Type u_1\nM : ι → Type u_2\ninst✝⁴ : (i : ι) → Monoid (M i)\nN : Type u_3\ninst✝³ : Monoid N\ninst✝² : Nontrivial ι\nG : Type u_1\ninst✝¹ : Group G\na : ι → G\nα : Type u_4\ninst✝ : MulAction G α\nX Y : ι → Set α\nhXnonempty : ∀ (i : ι), Set.Nonempty (X i)\nhXdisj : Pairwise fun i j => Disjoint (X i) (X j)\nhYdisj : Pairwise fun i j => Disjoint (Y i) (Y j)\nhXYdisj : ∀ (i j : ι), Disjoint (X i) (Y j)\nhX : ∀ (i : ι), a i • (Y i)ᶜ ⊆ X i\nhY : ∀ (i : ι), a⁻¹ i • (X i)ᶜ ⊆ Y i\nH : ι → Type := fun _i => FreeGroup Unit\nf : (i : ι) → H i →* G := fun i => ↑FreeGroup.lift fun x => a i\nX' : ι → Set α := fun i => X i ∪ Y i\ninhabited_h : Inhabited ι\n⊢ 3 < ℵ₀\n[PROOFSTEP]\nexact nat_lt_aleph0 3\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.CoprodI", "llama_tokens": 111473, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7826624789529376, "lm_q2_score": 0.48828339529583464, "lm_q1q2_score": 0.3821610925937951}}
{"text": "[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH✝ : IsCoprime x y\na b : R\nH : a * x + b * y = 1\n⊢ b * y + a * x = 1\n[PROOFSTEP]\nrw [add_comm, H]\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nx✝ : IsCoprime x x\na b : R\nh : a * x + b * x = 1\n⊢ x * (a + b) = 1\n[PROOFSTEP]\nrwa [mul_comm, add_mul]\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsUnit x\nb : R\nhb : b * x = 1\n⊢ b * x + 0 * x = 1\n[PROOFSTEP]\nrwa [zero_mul, add_zero]\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nx✝ : IsCoprime 0 x\na b : R\nH : a * 0 + b * x = 1\n⊢ x * b = 1\n[PROOFSTEP]\nrwa [mul_zero, zero_add, mul_comm] at H \n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH : IsUnit x\nb : R\nhb : b * x = 1\n⊢ 1 * 0 + b * x = 1\n[PROOFSTEP]\nrwa [one_mul, zero_add]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nx y z : R\ninst✝ : Nontrivial R\np : Fin 2 → R\nh : IsCoprime (p 0) (p 1)\n⊢ p ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nx y z : R\ninst✝ : Nontrivial R\nh : IsCoprime (OfNat.ofNat 0 0) (OfNat.ofNat 0 1)\n⊢ False\n[PROOFSTEP]\nexact not_isCoprime_zero_zero h\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nx y z : R\ninst✝ : Nontrivial R\nh : IsCoprime x y\n⊢ x ≠ 0 ∨ y ≠ 0\n[PROOFSTEP]\napply not_or_of_imp\n[GOAL]\ncase a\nR : Type u\ninst✝¹ : CommSemiring R\nx y z : R\ninst✝ : Nontrivial R\nh : IsCoprime x y\n⊢ x = 0 → y ≠ 0\n[PROOFSTEP]\nrintro rfl rfl\n[GOAL]\ncase a\nR : Type u\ninst✝¹ : CommSemiring R\nz : R\ninst✝ : Nontrivial R\nh : IsCoprime 0 0\n⊢ False\n[PROOFSTEP]\nexact not_isCoprime_zero_zero h\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\n⊢ 1 * 1 + 0 * x = 1\n[PROOFSTEP]\nrw [one_mul, zero_mul, add_zero]\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\n⊢ 0 * x + 1 * 1 = 1\n[PROOFSTEP]\nrw [one_mul, zero_mul, zero_add]\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : IsCoprime x z\nH2 : x ∣ y * z\n⊢ x ∣ y\n[PROOFSTEP]\nlet ⟨a, b, H⟩ := H1\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : IsCoprime x z\nH2 : x ∣ y * z\na b : R\nH : a * x + b * z = 1\n⊢ x ∣ y\n[PROOFSTEP]\nrw [← mul_one y, ← H, mul_add, ← mul_assoc, mul_left_comm]\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : IsCoprime x z\nH2 : x ∣ y * z\na b : R\nH : a * x + b * z = 1\n⊢ x ∣ y * a * x + b * (y * z)\n[PROOFSTEP]\nexact dvd_add (dvd_mul_left _ _) (H2.mul_left _)\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : IsCoprime x y\nH2 : x ∣ y * z\n⊢ x ∣ z\n[PROOFSTEP]\nlet ⟨a, b, H⟩ := H1\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : IsCoprime x y\nH2 : x ∣ y * z\na b : R\nH : a * x + b * y = 1\n⊢ x ∣ z\n[PROOFSTEP]\nrw [← one_mul z, ← H, add_mul, mul_right_comm, mul_assoc b]\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : IsCoprime x y\nH2 : x ∣ y * z\na b : R\nH : a * x + b * y = 1\n⊢ x ∣ a * z * x + b * (y * z)\n[PROOFSTEP]\nexact dvd_add (dvd_mul_left _ _) (H2.mul_left _)\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : IsCoprime x z\nH2 : IsCoprime y z\na b : R\nh1 : a * x + b * z = 1\nc d : R\nh2 : c * y + d * z = 1\n⊢ a * c * (x * y) + (a * x * d + b * c * y + b * d * z) * z = (a * x + b * z) * (c * y + d * z)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : IsCoprime x z\nH2 : IsCoprime y z\na b : R\nh1 : a * x + b * z = 1\nc d : R\nh2 : c * y + d * z = 1\n⊢ (a * x + b * z) * (c * y + d * z) = 1\n[PROOFSTEP]\nrw [h1, h2, mul_one]\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : IsCoprime x y\nH2 : IsCoprime x z\n⊢ IsCoprime x (y * z)\n[PROOFSTEP]\nrw [isCoprime_comm] at H1 H2 ⊢\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : IsCoprime y x\nH2 : IsCoprime z x\n⊢ IsCoprime (y * z) x\n[PROOFSTEP]\nexact H1.mul_left H2\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH : IsCoprime x y\nH1 : x ∣ z\nH2 : y ∣ z\n⊢ x * y ∣ z\n[PROOFSTEP]\nobtain ⟨a, b, h⟩ := H\n[GOAL]\ncase intro.intro\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : x ∣ z\nH2 : y ∣ z\na b : R\nh : a * x + b * y = 1\n⊢ x * y ∣ z\n[PROOFSTEP]\nrw [← mul_one z, ← h, mul_add]\n[GOAL]\ncase intro.intro\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : x ∣ z\nH2 : y ∣ z\na b : R\nh : a * x + b * y = 1\n⊢ x * y ∣ z * (a * x) + z * (b * y)\n[PROOFSTEP]\napply dvd_add\n[GOAL]\ncase intro.intro.h₁\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : x ∣ z\nH2 : y ∣ z\na b : R\nh : a * x + b * y = 1\n⊢ x * y ∣ z * (a * x)\n[PROOFSTEP]\nrw [mul_comm z, mul_assoc]\n[GOAL]\ncase intro.intro.h₁\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : x ∣ z\nH2 : y ∣ z\na b : R\nh : a * x + b * y = 1\n⊢ x * y ∣ a * (x * z)\n[PROOFSTEP]\nexact (mul_dvd_mul_left _ H2).mul_left _\n[GOAL]\ncase intro.intro.h₂\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : x ∣ z\nH2 : y ∣ z\na b : R\nh : a * x + b * y = 1\n⊢ x * y ∣ z * (b * y)\n[PROOFSTEP]\nrw [mul_comm b, ← mul_assoc]\n[GOAL]\ncase intro.intro.h₂\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH1 : x ∣ z\nH2 : y ∣ z\na b : R\nh : a * x + b * y = 1\n⊢ x * y ∣ z * y * b\n[PROOFSTEP]\nexact (mul_dvd_mul_right H1 _).mul_right _\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH : IsCoprime (x * y) z\na b : R\nh : a * (x * y) + b * z = 1\n⊢ a * y * x + b * z = 1\n[PROOFSTEP]\nrwa [mul_right_comm, mul_assoc]\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH : IsCoprime (x * y) z\n⊢ IsCoprime y z\n[PROOFSTEP]\nrw [mul_comm] at H \n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH : IsCoprime (y * x) z\n⊢ IsCoprime y z\n[PROOFSTEP]\nexact H.of_mul_left_left\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH : IsCoprime x (y * z)\n⊢ IsCoprime x y\n[PROOFSTEP]\nrw [isCoprime_comm] at H ⊢\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH : IsCoprime (y * z) x\n⊢ IsCoprime y x\n[PROOFSTEP]\nexact H.of_mul_left_left\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH : IsCoprime x (y * z)\n⊢ IsCoprime x z\n[PROOFSTEP]\nrw [mul_comm] at H \n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nH : IsCoprime x (z * y)\n⊢ IsCoprime x z\n[PROOFSTEP]\nexact H.of_mul_right_left\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\n⊢ IsCoprime x (y * z) ↔ IsCoprime x y ∧ IsCoprime x z\n[PROOFSTEP]\nrw [isCoprime_comm, IsCoprime.mul_left_iff, isCoprime_comm, @isCoprime_comm _ _ z]\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime y z\nhdvd : x ∣ y\n⊢ IsCoprime x z\n[PROOFSTEP]\nobtain ⟨d, rfl⟩ := hdvd\n[GOAL]\ncase intro\nR : Type u\ninst✝ : CommSemiring R\nx z d : R\nh : IsCoprime (x * d) z\n⊢ IsCoprime x z\n[PROOFSTEP]\nexact IsCoprime.of_mul_left_left h\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nx y z : R\nH : IsCoprime x y\nS : Type v\ninst✝ : CommSemiring S\nf : R →+* S\na b : R\nh : a * x + b * y = 1\n⊢ ↑f a * ↑f x + ↑f b * ↑f y = 1\n[PROOFSTEP]\nrw [← f.map_mul, ← f.map_mul, ← f.map_add, h, f.map_one]\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime (x + y * z) y\na b : R\nH : a * (x + y * z) + b * y = 1\n⊢ a * x + (a * z + b) * y = 1\n[PROOFSTEP]\nsimpa only [add_mul, mul_add, add_assoc, add_comm, add_left_comm, mul_assoc, mul_comm, mul_left_comm] using H\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime (x + z * y) y\n⊢ IsCoprime x y\n[PROOFSTEP]\nrw [mul_comm] at h \n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime (x + y * z) y\n⊢ IsCoprime x y\n[PROOFSTEP]\nexact h.of_add_mul_left_left\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime x (y + x * z)\n⊢ IsCoprime x y\n[PROOFSTEP]\nrw [isCoprime_comm] at h ⊢\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime (y + x * z) x\n⊢ IsCoprime y x\n[PROOFSTEP]\nexact h.of_add_mul_left_left\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime x (y + z * x)\n⊢ IsCoprime x y\n[PROOFSTEP]\nrw [mul_comm] at h \n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime x (y + x * z)\n⊢ IsCoprime x y\n[PROOFSTEP]\nexact h.of_add_mul_left_right\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime (y * z + x) y\n⊢ IsCoprime x y\n[PROOFSTEP]\nrw [add_comm] at h \n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime (x + y * z) y\n⊢ IsCoprime x y\n[PROOFSTEP]\nexact h.of_add_mul_left_left\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime (z * y + x) y\n⊢ IsCoprime x y\n[PROOFSTEP]\nrw [add_comm] at h \n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime (x + z * y) y\n⊢ IsCoprime x y\n[PROOFSTEP]\nexact h.of_add_mul_right_left\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime x (x * z + y)\n⊢ IsCoprime x y\n[PROOFSTEP]\nrw [add_comm] at h \n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime x (y + x * z)\n⊢ IsCoprime x y\n[PROOFSTEP]\nexact h.of_add_mul_left_right\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime x (z * x + y)\n⊢ IsCoprime x y\n[PROOFSTEP]\nrw [add_comm] at h \n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nx y z : R\nh : IsCoprime x (y + z * x)\n⊢ IsCoprime x y\n[PROOFSTEP]\nexact h.of_add_mul_right_right\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : Group G\ninst✝² : MulAction G R\ninst✝¹ : SMulCommClass G R R\ninst✝ : IsScalarTower G R R\nx : G\ny z : R\nx✝ : IsCoprime (x • y) z\na b : R\nh : a * x • y + b * z = 1\n⊢ x • a * y + b * z = 1\n[PROOFSTEP]\nrwa [smul_mul_assoc, ← mul_smul_comm]\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : Group G\ninst✝² : MulAction G R\ninst✝¹ : SMulCommClass G R R\ninst✝ : IsScalarTower G R R\nx : G\ny z : R\nx✝ : IsCoprime y z\na b : R\nh : a * y + b * z = 1\n⊢ x⁻¹ • a * x • y + b * z = 1\n[PROOFSTEP]\nrwa [smul_mul_smul, inv_mul_self, one_smul]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime (x + y * z + y * -z) y\n[PROOFSTEP]\nsimpa only [mul_neg, add_neg_cancel_right] using h\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime (x + z * y) y\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime (x + y * z) y\n[PROOFSTEP]\nexact h.add_mul_left_left z\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime x (y + x * z)\n[PROOFSTEP]\nrw [isCoprime_comm]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime (y + x * z) x\n[PROOFSTEP]\nexact h.symm.add_mul_left_left z\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime x (y + z * x)\n[PROOFSTEP]\nrw [isCoprime_comm]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime (y + z * x) x\n[PROOFSTEP]\nexact h.symm.add_mul_right_left z\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime (y * z + x) y\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime (x + y * z) y\n[PROOFSTEP]\nexact h.add_mul_left_left z\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime (z * y + x) y\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime (x + z * y) y\n[PROOFSTEP]\nexact h.add_mul_right_left z\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime x (x * z + y)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime x (y + x * z)\n[PROOFSTEP]\nexact h.add_mul_left_right z\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime x (z * x + y)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\nz : R\n⊢ IsCoprime x (y + z * x)\n[PROOFSTEP]\nexact h.add_mul_right_right z\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx y : R\nh : IsCoprime x y\n⊢ IsCoprime (-x) y\n[PROOFSTEP]\nobtain ⟨a, b, h⟩ := h\n[GOAL]\ncase intro.intro\nR : Type u\ninst✝ : CommRing R\nx y a b : R\nh : a * x + b * y = 1\n⊢ IsCoprime (-x) y\n[PROOFSTEP]\nuse-a, b\n[GOAL]\ncase h\nR : Type u\ninst✝ : CommRing R\nx y a b : R\nh : a * x + b * y = 1\n⊢ -a * -x + b * y = 1\n[PROOFSTEP]\nrwa [neg_mul_neg]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na b : R\nh : IsCoprime a b\n⊢ a ^ 2 + b ^ 2 ≠ 0\n[PROOFSTEP]\nintro h'\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na b : R\nh : IsCoprime a b\nh' : a ^ 2 + b ^ 2 = 0\n⊢ False\n[PROOFSTEP]\nobtain ⟨ha, hb⟩ :=\n  (add_eq_zero_iff' (by rw [pow_two]; exact mul_self_nonneg _) (by rw [pow_two]; exact mul_self_nonneg _)).mp h'\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na b : R\nh : IsCoprime a b\nh' : a ^ 2 + b ^ 2 = 0\n⊢ 0 ≤ a ^ 2\n[PROOFSTEP]\nrw [pow_two]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na b : R\nh : IsCoprime a b\nh' : a ^ 2 + b ^ 2 = 0\n⊢ 0 ≤ a * a\n[PROOFSTEP]\nexact mul_self_nonneg _\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na b : R\nh : IsCoprime a b\nh' : a ^ 2 + b ^ 2 = 0\n⊢ 0 ≤ b ^ 2\n[PROOFSTEP]\nrw [pow_two]\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na b : R\nh : IsCoprime a b\nh' : a ^ 2 + b ^ 2 = 0\n⊢ 0 ≤ b * b\n[PROOFSTEP]\nexact mul_self_nonneg _\n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\na b : R\nh : IsCoprime a b\nh' : a ^ 2 + b ^ 2 = 0\nha : a ^ 2 = 0\nhb : b ^ 2 = 0\n⊢ False\n[PROOFSTEP]\nobtain rfl := pow_eq_zero ha\n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nb : R\nhb : b ^ 2 = 0\nh : IsCoprime 0 b\nh' : 0 ^ 2 + b ^ 2 = 0\nha : 0 ^ 2 = 0\n⊢ False\n[PROOFSTEP]\nobtain rfl := pow_eq_zero hb\n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nha hb : 0 ^ 2 = 0\nh : IsCoprime 0 0\nh' : 0 ^ 2 + 0 ^ 2 = 0\n⊢ False\n[PROOFSTEP]\nexact not_isCoprime_zero_zero h\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Coprime.Basic", "llama_tokens": 7161, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.640635854839898, "lm_q2_score": 0.5964331462646255, "lm_q1q2_score": 0.3820964585120883}}
{"text": "[GOAL]\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\nh : ShortExact f g\nh' : ShortExact f' g'\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\n⊢ IsIso i₂\n[PROOFSTEP]\nobtain ⟨_⟩ := h\n[GOAL]\ncase mk\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\nh' : ShortExact f' g'\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝ : Mono f\nepi✝ : Epi g\nexact✝ : Exact f g\n⊢ IsIso i₂\n[PROOFSTEP]\nobtain ⟨_⟩ := h'\n[GOAL]\ncase mk.mk\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ IsIso i₂\n[PROOFSTEP]\nrefine\n  @Abelian.isIso_of_epi_of_isIso_of_isIso_of_mono 𝒜 _ _ 0 _ _ _ 0 _ _ _ 0 f g 0 f' g' 0 i₁ i₂ i₃ ?_ comm₁ comm₂ 0 0 0 0\n    0 ?_ ?_ ?_ ?_ ?_ ?_ ?_ _ _ _ _\n[GOAL]\ncase mk.mk.refine_1\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ 0 ≫ 0 = 0 ≫ i₁\ncase mk.mk.refine_2\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ i₃ ≫ 0 = 0 ≫ 0\ncase mk.mk.refine_3\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f\ncase mk.mk.refine_4\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact f g\ncase mk.mk.refine_5\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g 0\ncase mk.mk.refine_6\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f'\ncase mk.mk.refine_7\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact f' g'\ncase mk.mk.refine_8\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g' 0\n[PROOFSTEP]\nall_goals try simp\n[GOAL]\ncase mk.mk.refine_1\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ 0 ≫ 0 = 0 ≫ i₁\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase mk.mk.refine_1\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ 0 ≫ 0 = 0 ≫ i₁\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.refine_2\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ i₃ ≫ 0 = 0 ≫ 0\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase mk.mk.refine_2\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ i₃ ≫ 0 = 0 ≫ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.refine_3\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase mk.mk.refine_3\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.refine_4\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact f g\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase mk.mk.refine_4\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact f g\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.refine_5\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g 0\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase mk.mk.refine_5\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.refine_6\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f'\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase mk.mk.refine_6\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f'\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.refine_7\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact f' g'\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase mk.mk.refine_7\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact f' g'\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.refine_8\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g' 0\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase mk.mk.refine_8\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g' 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.refine_3\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f\ncase mk.mk.refine_4\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact f g\ncase mk.mk.refine_5\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g 0\ncase mk.mk.refine_6\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f'\ncase mk.mk.refine_7\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact f' g'\ncase mk.mk.refine_8\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g' 0\n[PROOFSTEP]\nall_goals try assumption\n[GOAL]\ncase mk.mk.refine_3\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase mk.mk.refine_3\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.mk.refine_4\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact f g\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase mk.mk.refine_4\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact f g\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.mk.refine_5\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g 0\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase mk.mk.refine_5\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.mk.refine_6\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f'\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase mk.mk.refine_6\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f'\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.mk.refine_7\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact f' g'\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase mk.mk.refine_7\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact f' g'\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.mk.refine_8\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g' 0\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase mk.mk.refine_8\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g' 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.mk.refine_3\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f\ncase mk.mk.refine_5\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g 0\ncase mk.mk.refine_6\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f'\ncase mk.mk.refine_8\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g' 0\n[PROOFSTEP]\nall_goals try apply exact_zero_left_of_mono\n[GOAL]\ncase mk.mk.refine_3\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f\n[PROOFSTEP]\ntry apply exact_zero_left_of_mono\n[GOAL]\ncase mk.mk.refine_3\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f\n[PROOFSTEP]\napply exact_zero_left_of_mono\n[GOAL]\ncase mk.mk.refine_5\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g 0\n[PROOFSTEP]\ntry apply exact_zero_left_of_mono\n[GOAL]\ncase mk.mk.refine_5\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g 0\n[PROOFSTEP]\napply exact_zero_left_of_mono\n[GOAL]\ncase mk.mk.refine_6\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f'\n[PROOFSTEP]\ntry apply exact_zero_left_of_mono\n[GOAL]\ncase mk.mk.refine_6\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact 0 f'\n[PROOFSTEP]\napply exact_zero_left_of_mono\n[GOAL]\ncase mk.mk.refine_8\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g' 0\n[PROOFSTEP]\ntry apply exact_zero_left_of_mono\n[GOAL]\ncase mk.mk.refine_8\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g' 0\n[PROOFSTEP]\napply exact_zero_left_of_mono\n[GOAL]\ncase mk.mk.refine_5\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g 0\ncase mk.mk.refine_8\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g' 0\n[PROOFSTEP]\nall_goals rwa [← epi_iff_exact_zero_right]\n[GOAL]\ncase mk.mk.refine_5\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g 0\n[PROOFSTEP]\nrwa [← epi_iff_exact_zero_right]\n[GOAL]\ncase mk.mk.refine_8\n𝒜 : Type u_1\ninst✝³ : Category.{u_2, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝² : Abelian 𝒜\ni₁ : A ⟶ A'\ni₂ : B ⟶ B'\ni₃ : C ⟶ C'\ncomm₁ : autoParam (i₁ ≫ f' = f ≫ i₂) _auto✝\ncomm₂ : autoParam (i₂ ≫ g' = g ≫ i₃) _auto✝\ninst✝¹ : IsIso i₁\ninst✝ : IsIso i₃\nmono✝¹ : Mono f\nepi✝¹ : Epi g\nexact✝¹ : Exact f g\nmono✝ : Mono f'\nepi✝ : Epi g'\nexact✝ : Exact f' g'\n⊢ Exact g' 0\n[PROOFSTEP]\nrwa [← epi_iff_exact_zero_right]\n[GOAL]\n𝒜 : Type u_1\ninst✝¹ : Category.{?u.11269, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝ : Abelian 𝒜\nh : ShortExact f g\ni : A ⊞ C ⟶ B\nh1 : biprod.inl ≫ i = f\nh2 : i ≫ g = biprod.snd\nthis : IsIso i\n⊢ f ≫ (asIso i).symm.hom = biprod.inl\n[PROOFSTEP]\nrw [Iso.symm_hom, asIso_inv, IsIso.comp_inv_eq, h1]\n[GOAL]\n𝒜 : Type u_1\ninst✝¹ : Category.{?u.11269, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf : A ⟶ B\ng : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝ : Abelian 𝒜\nh : ShortExact f g\ni : A ⊞ C ⟶ B\nh1 : biprod.inl ≫ i = f\nh2 : i ≫ g = biprod.snd\nthis : IsIso i\n⊢ (asIso i).symm.hom ≫ biprod.snd = g\n[PROOFSTEP]\nrw [Iso.symm_hom, asIso_inv, IsIso.inv_comp_eq, h2]\n[GOAL]\n𝒜 : Type u_1\ninst✝¹ : Category.{?u.20215, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf✝ : A ⟶ B\ng✝ : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝ : Abelian 𝒜\nf : A ⟶ B\ng : B ⟶ C\nh : LeftSplit f g\n⊢ f ≫ biprod.lift (Exists.choose (_ : ∃ φ, f ≫ φ = 𝟙 A)) g = biprod.inl\n[PROOFSTEP]\next\n[GOAL]\ncase h₀\n𝒜 : Type u_1\ninst✝¹ : Category.{?u.20215, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf✝ : A ⟶ B\ng✝ : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝ : Abelian 𝒜\nf : A ⟶ B\ng : B ⟶ C\nh : LeftSplit f g\n⊢ (f ≫ biprod.lift (Exists.choose (_ : ∃ φ, f ≫ φ = 𝟙 A)) g) ≫ biprod.fst = biprod.inl ≫ biprod.fst\n[PROOFSTEP]\nsimpa only [biprod.inl_fst, biprod.lift_fst, Category.assoc] using h.left_split.choose_spec\n[GOAL]\ncase h₁\n𝒜 : Type u_1\ninst✝¹ : Category.{?u.20215, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf✝ : A ⟶ B\ng✝ : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝ : Abelian 𝒜\nf : A ⟶ B\ng : B ⟶ C\nh : LeftSplit f g\n⊢ (f ≫ biprod.lift (Exists.choose (_ : ∃ φ, f ≫ φ = 𝟙 A)) g) ≫ biprod.snd = biprod.inl ≫ biprod.snd\n[PROOFSTEP]\nsimp only [biprod.inl_snd, biprod.lift_snd, Category.assoc, h.exact.w]\n[GOAL]\n𝒜 : Type u_1\ninst✝¹ : Category.{?u.20215, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf✝ : A ⟶ B\ng✝ : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝ : Abelian 𝒜\nf : A ⟶ B\ng : B ⟶ C\nh : LeftSplit f g\n⊢ biprod.lift (Exists.choose (_ : ∃ φ, f ≫ φ = 𝟙 A)) g ≫ biprod.snd = g\n[PROOFSTEP]\nsimp only [biprod.lift_snd]\n[GOAL]\n𝒜 : Type u_1\ninst✝¹ : Category.{?u.22782, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf✝ : A ⟶ B\ng✝ : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝ : Abelian 𝒜\nf : A ⟶ B\ng : B ⟶ C\nh : RightSplit f g\n⊢ biprod.desc f (Exists.choose (_ : ∃ χ, χ ≫ g = 𝟙 C)) ≫ g = biprod.snd\n[PROOFSTEP]\next\n[GOAL]\ncase h₀\n𝒜 : Type u_1\ninst✝¹ : Category.{?u.22782, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf✝ : A ⟶ B\ng✝ : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝ : Abelian 𝒜\nf : A ⟶ B\ng : B ⟶ C\nh : RightSplit f g\n⊢ biprod.inl ≫ biprod.desc f (Exists.choose (_ : ∃ χ, χ ≫ g = 𝟙 C)) ≫ g = biprod.inl ≫ biprod.snd\n[PROOFSTEP]\nrw [biprod.inl_snd, ← Category.assoc, biprod.inl_desc, h.exact.w]\n[GOAL]\ncase h₁\n𝒜 : Type u_1\ninst✝¹ : Category.{?u.22782, u_1} 𝒜\nA B C A' B' C' : 𝒜\nf✝ : A ⟶ B\ng✝ : B ⟶ C\nf' : A' ⟶ B'\ng' : B' ⟶ C'\ninst✝ : Abelian 𝒜\nf : A ⟶ B\ng : B ⟶ C\nh : RightSplit f g\n⊢ biprod.inr ≫ biprod.desc f (Exists.choose (_ : ∃ χ, χ ≫ g = 𝟙 C)) ≫ g = biprod.inr ≫ biprod.snd\n[PROOFSTEP]\nrw [biprod.inr_snd, ← Category.assoc, biprod.inr_desc, h.right_split.choose_spec]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Homology.ShortExact.Abelian", "llama_tokens": 20128, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943712746406, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.38185725967749634}}
{"text": "[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝¹ : DecidableEq ι\ninst✝ : Zero M\ni : ι\nm : M\n⊢ toDFinsupp (single i m) = DFinsupp.single i m\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝¹ : DecidableEq ι\ninst✝ : Zero M\ni : ι\nm : M\ni✝ : ι\n⊢ ↑(toDFinsupp (single i m)) i✝ = ↑(DFinsupp.single i m) i✝\n[PROOFSTEP]\nsimp [Finsupp.single_apply, DFinsupp.single_apply]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝² : DecidableEq ι\ninst✝¹ : Zero M\ninst✝ : (m : M) → Decidable (m ≠ 0)\nf : ι →₀ M\n⊢ DFinsupp.support (Finsupp.toDFinsupp f) = f.support\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝² : DecidableEq ι\ninst✝¹ : Zero M\ninst✝ : (m : M) → Decidable (m ≠ 0)\nf : ι →₀ M\na✝ : ι\n⊢ a✝ ∈ DFinsupp.support (Finsupp.toDFinsupp f) ↔ a✝ ∈ f.support\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝² : DecidableEq ι\ninst✝¹ : Zero M\ninst✝ : (m : M) → Decidable (m ≠ 0)\nf : Π₀ (x : ι), M\ni : ι\n⊢ i ∈ support f ↔ ↑f i ≠ 0\n[PROOFSTEP]\nsimp only [DFinsupp.mem_support_iff]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝² : DecidableEq ι\ninst✝¹ : Zero M\ninst✝ : (m : M) → Decidable (m ≠ 0)\nf : Π₀ (x : ι), M\n⊢ (toFinsupp f).support = support f\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝² : DecidableEq ι\ninst✝¹ : Zero M\ninst✝ : (m : M) → Decidable (m ≠ 0)\nf : Π₀ (x : ι), M\na✝ : ι\n⊢ a✝ ∈ (toFinsupp f).support ↔ a✝ ∈ support f\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝² : DecidableEq ι\ninst✝¹ : Zero M\ninst✝ : (m : M) → Decidable (m ≠ 0)\ni : ι\nm : M\n⊢ toFinsupp (single i m) = Finsupp.single i m\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝² : DecidableEq ι\ninst✝¹ : Zero M\ninst✝ : (m : M) → Decidable (m ≠ 0)\ni : ι\nm : M\na✝ : ι\n⊢ ↑(toFinsupp (single i m)) a✝ = ↑(Finsupp.single i m) a✝\n[PROOFSTEP]\nsimp [Finsupp.single_apply, DFinsupp.single_apply]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝⁴ : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : (m : M) → Decidable (m ≠ 0)\ninst✝ : Module R M\n⊢ ↑(finsuppLequivDFinsupp R) = Finsupp.toDFinsupp\n[PROOFSTEP]\nsimp only [@LinearEquiv.coe_coe]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\ninst✝⁴ : DecidableEq ι\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : (m : M) → Decidable (m ≠ 0)\ninst✝ : Module R M\n⊢ ↑(finsuppLequivDFinsupp R) = Finsupp.toDFinsupp\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : (i : ι) × η i →₀ N\ni : ι\n⊢ i ∈ (splitSupport f).val ∨ split f i = 0\n[PROOFSTEP]\nrw [← Finset.mem_def, mem_splitSupport_iff_nonzero]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : (i : ι) × η i →₀ N\ni : ι\n⊢ split f i ≠ 0 ∨ split f i = 0\n[PROOFSTEP]\nexact (em _).symm\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : Π₀ (i : ι), η i →₀ N\n⊢ (i : ι) × η i →₀ N\n[PROOFSTEP]\nhaveI := Classical.decEq ι\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : Π₀ (i : ι), η i →₀ N\nthis : DecidableEq ι\n⊢ (i : ι) × η i →₀ N\n[PROOFSTEP]\nhaveI := fun i => Classical.decEq (η i →₀ N)\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : Π₀ (i : ι), η i →₀ N\nthis✝ : DecidableEq ι\nthis : (i : ι) → DecidableEq (η i →₀ N)\n⊢ (i : ι) × η i →₀ N\n[PROOFSTEP]\nrefine'\n  onFinset (Finset.sigma f.support fun j => (f j).support) (fun ji => f ji.1 ji.2) fun g hg =>\n    Finset.mem_sigma.mpr ⟨_, mem_support_iff.mpr hg⟩\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : Π₀ (i : ι), η i →₀ N\nthis✝ : DecidableEq ι\nthis : (i : ι) → DecidableEq (η i →₀ N)\ng : (i : ι) × η i\nhg : (fun ji => ↑(↑f ji.fst) ji.snd) g ≠ 0\n⊢ g.fst ∈ DFinsupp.support f\n[PROOFSTEP]\nsimp only [Ne.def, DFinsupp.mem_support_toFun]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : Π₀ (i : ι), η i →₀ N\nthis✝ : DecidableEq ι\nthis : (i : ι) → DecidableEq (η i →₀ N)\ng : (i : ι) × η i\nhg : (fun ji => ↑(↑f ji.fst) ji.snd) g ≠ 0\n⊢ ¬↑f g.fst = 0\n[PROOFSTEP]\nintro h\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : Π₀ (i : ι), η i →₀ N\nthis✝ : DecidableEq ι\nthis : (i : ι) → DecidableEq (η i →₀ N)\ng : (i : ι) × η i\nhg : (fun ji => ↑(↑f ji.fst) ji.snd) g ≠ 0\nh : ↑f g.fst = 0\n⊢ False\n[PROOFSTEP]\ndsimp at hg \n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : Π₀ (i : ι), η i →₀ N\nthis✝ : DecidableEq ι\nthis : (i : ι) → DecidableEq (η i →₀ N)\ng : (i : ι) × η i\nhg : ¬↑(↑f g.fst) g.snd = 0\nh : ↑f g.fst = 0\n⊢ False\n[PROOFSTEP]\nrw [h] at hg \n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : Π₀ (i : ι), η i →₀ N\nthis✝ : DecidableEq ι\nthis : (i : ι) → DecidableEq (η i →₀ N)\ng : (i : ι) × η i\nhg : ¬↑0 g.snd = 0\nh : ↑f g.fst = 0\n⊢ False\n[PROOFSTEP]\nsimp only [coe_zero, Pi.zero_apply, not_true] at hg \n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : (i : ι) × η i →₀ N\n⊢ (fun f =>\n        onFinset (Finset.sigma (DFinsupp.support f) fun j => (↑f j).support) (fun ji => ↑(↑f ji.fst) ji.snd)\n          (_ :\n            ∀ (g : (i : ι) × η i),\n              (fun ji => ↑(↑f ji.fst) ji.snd) g ≠ 0 → g ∈ Finset.sigma (DFinsupp.support f) fun j => (↑f j).support))\n      ((fun f =>\n          { toFun := split f,\n            support' :=\n              Trunc.mk\n                { val := (splitSupport f).val,\n                  property := (_ : ∀ (i : ι), i ∈ (splitSupport f).val ∨ split f i = 0) } })\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : (i : ι) × η i →₀ N\na✝ : (i : ι) × η i\n⊢ ↑((fun f =>\n            onFinset (Finset.sigma (DFinsupp.support f) fun j => (↑f j).support) (fun ji => ↑(↑f ji.fst) ji.snd)\n              (_ :\n                ∀ (g : (i : ι) × η i),\n                  (fun ji => ↑(↑f ji.fst) ji.snd) g ≠ 0 →\n                    g ∈ Finset.sigma (DFinsupp.support f) fun j => (↑f j).support))\n          ((fun f =>\n              { toFun := split f,\n                support' :=\n                  Trunc.mk\n                    { val := (splitSupport f).val,\n                      property := (_ : ∀ (i : ι), i ∈ (splitSupport f).val ∨ split f i = 0) } })\n            f))\n      a✝ =\n    ↑f a✝\n[PROOFSTEP]\nsimp [split]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : Π₀ (i : ι), η i →₀ N\n⊢ (fun f =>\n        { toFun := split f,\n          support' :=\n            Trunc.mk\n              { val := (splitSupport f).val, property := (_ : ∀ (i : ι), i ∈ (splitSupport f).val ∨ split f i = 0) } })\n      ((fun f =>\n          onFinset (Finset.sigma (DFinsupp.support f) fun j => (↑f j).support) (fun ji => ↑(↑f ji.fst) ji.snd)\n            (_ :\n              ∀ (g : (i : ι) × η i),\n                (fun ji => ↑(↑f ji.fst) ji.snd) g ≠ 0 → g ∈ Finset.sigma (DFinsupp.support f) fun j => (↑f j).support))\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : Zero N\nf : Π₀ (i : ι), η i →₀ N\ni✝ : ι\na✝ : η i✝\n⊢ ↑(↑((fun f =>\n                { toFun := split f,\n                  support' :=\n                    Trunc.mk\n                      { val := (splitSupport f).val,\n                        property := (_ : ∀ (i : ι), i ∈ (splitSupport f).val ∨ split f i = 0) } })\n              ((fun f =>\n                  onFinset (Finset.sigma (DFinsupp.support f) fun j => (↑f j).support) (fun ji => ↑(↑f ji.fst) ji.snd)\n                    (_ :\n                      ∀ (g : (i : ι) × η i),\n                        (fun ji => ↑(↑f ji.fst) ji.snd) g ≠ 0 →\n                          g ∈ Finset.sigma (DFinsupp.support f) fun j => (↑f j).support))\n                f))\n          i✝)\n      a✝ =\n    ↑(↑f i✝) a✝\n[PROOFSTEP]\nsimp [split]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝³ : Semiring R\ninst✝² : DecidableEq ι\ninst✝¹ : Zero N\ninst✝ : (i : ι) → (x : η i →₀ N) → Decidable (x ≠ 0)\nf : (i : ι) × η i →₀ N\n⊢ DFinsupp.support (↑sigmaFinsuppEquivDFinsupp f) = splitSupport f\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝³ : Semiring R\ninst✝² : DecidableEq ι\ninst✝¹ : Zero N\ninst✝ : (i : ι) → (x : η i →₀ N) → Decidable (x ≠ 0)\nf : (i : ι) × η i →₀ N\na✝ : ι\n⊢ a✝ ∈ DFinsupp.support (↑sigmaFinsuppEquivDFinsupp f) ↔ a✝ ∈ splitSupport f\n[PROOFSTEP]\nrw [DFinsupp.mem_support_toFun]\n[GOAL]\ncase a\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝³ : Semiring R\ninst✝² : DecidableEq ι\ninst✝¹ : Zero N\ninst✝ : (i : ι) → (x : η i →₀ N) → Decidable (x ≠ 0)\nf : (i : ι) × η i →₀ N\na✝ : ι\n⊢ ↑(↑sigmaFinsuppEquivDFinsupp f) a✝ ≠ 0 ↔ a✝ ∈ splitSupport f\n[PROOFSTEP]\nexact (Finsupp.mem_splitSupport_iff_nonzero _ _).symm\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝² : Semiring R\ninst✝¹ : DecidableEq ι\ninst✝ : Zero N\na : (i : ι) × η i\nn : N\n⊢ ↑sigmaFinsuppEquivDFinsupp (single a n) = DFinsupp.single a.fst (single a.snd n)\n[PROOFSTEP]\nobtain ⟨i, a⟩ := a\n[GOAL]\ncase mk\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝² : Semiring R\ninst✝¹ : DecidableEq ι\ninst✝ : Zero N\nn : N\ni : ι\na : η i\n⊢ ↑sigmaFinsuppEquivDFinsupp (single { fst := i, snd := a } n) =\n    DFinsupp.single { fst := i, snd := a }.fst (single { fst := i, snd := a }.snd n)\n[PROOFSTEP]\next j b\n[GOAL]\ncase mk.h.h\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝² : Semiring R\ninst✝¹ : DecidableEq ι\ninst✝ : Zero N\nn : N\ni : ι\na : η i\nj : ι\nb : η j\n⊢ ↑(↑(↑sigmaFinsuppEquivDFinsupp (single { fst := i, snd := a } n)) j) b =\n    ↑(↑(DFinsupp.single { fst := i, snd := a }.fst (single { fst := i, snd := a }.snd n)) j) b\n[PROOFSTEP]\nby_cases h : i = j\n[GOAL]\ncase pos\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝² : Semiring R\ninst✝¹ : DecidableEq ι\ninst✝ : Zero N\nn : N\ni : ι\na : η i\nj : ι\nb : η j\nh : i = j\n⊢ ↑(↑(↑sigmaFinsuppEquivDFinsupp (single { fst := i, snd := a } n)) j) b =\n    ↑(↑(DFinsupp.single { fst := i, snd := a }.fst (single { fst := i, snd := a }.snd n)) j) b\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝² : Semiring R\ninst✝¹ : DecidableEq ι\ninst✝ : Zero N\nn : N\ni : ι\na b : η i\n⊢ ↑(↑(↑sigmaFinsuppEquivDFinsupp (single { fst := i, snd := a } n)) i) b =\n    ↑(↑(DFinsupp.single { fst := i, snd := a }.fst (single { fst := i, snd := a }.snd n)) i) b\n[PROOFSTEP]\nclassical simp [split_apply, Finsupp.single_apply]\n[GOAL]\ncase pos\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝² : Semiring R\ninst✝¹ : DecidableEq ι\ninst✝ : Zero N\nn : N\ni : ι\na b : η i\n⊢ ↑(↑(↑sigmaFinsuppEquivDFinsupp (single { fst := i, snd := a } n)) i) b =\n    ↑(↑(DFinsupp.single { fst := i, snd := a }.fst (single { fst := i, snd := a }.snd n)) i) b\n[PROOFSTEP]\nsimp [split_apply, Finsupp.single_apply]\n[GOAL]\ncase neg\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝² : Semiring R\ninst✝¹ : DecidableEq ι\ninst✝ : Zero N\nn : N\ni : ι\na : η i\nj : ι\nb : η j\nh : ¬i = j\n⊢ ↑(↑(↑sigmaFinsuppEquivDFinsupp (single { fst := i, snd := a } n)) j) b =\n    ↑(↑(DFinsupp.single { fst := i, snd := a }.fst (single { fst := i, snd := a }.snd n)) j) b\n[PROOFSTEP]\nsuffices Finsupp.single (⟨i, a⟩ : Σ i, η i) n ⟨j, b⟩ = 0 by simp [split_apply, dif_neg h, this]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝² : Semiring R\ninst✝¹ : DecidableEq ι\ninst✝ : Zero N\nn : N\ni : ι\na : η i\nj : ι\nb : η j\nh : ¬i = j\nthis : ↑(single { fst := i, snd := a } n) { fst := j, snd := b } = 0\n⊢ ↑(↑(↑sigmaFinsuppEquivDFinsupp (single { fst := i, snd := a } n)) j) b =\n    ↑(↑(DFinsupp.single { fst := i, snd := a }.fst (single { fst := i, snd := a }.snd n)) j) b\n[PROOFSTEP]\nsimp [split_apply, dif_neg h, this]\n[GOAL]\ncase neg\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝² : Semiring R\ninst✝¹ : DecidableEq ι\ninst✝ : Zero N\nn : N\ni : ι\na : η i\nj : ι\nb : η j\nh : ¬i = j\n⊢ ↑(single { fst := i, snd := a } n) { fst := j, snd := b } = 0\n[PROOFSTEP]\nhave H : (⟨i, a⟩ : Σ i, η i) ≠ ⟨j, b⟩ := by simp [h]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝² : Semiring R\ninst✝¹ : DecidableEq ι\ninst✝ : Zero N\nn : N\ni : ι\na : η i\nj : ι\nb : η j\nh : ¬i = j\n⊢ { fst := i, snd := a } ≠ { fst := j, snd := b }\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝² : Semiring R\ninst✝¹ : DecidableEq ι\ninst✝ : Zero N\nn : N\ni : ι\na : η i\nj : ι\nb : η j\nh : ¬i = j\nH : { fst := i, snd := a } ≠ { fst := j, snd := b }\n⊢ ↑(single { fst := i, snd := a } n) { fst := j, snd := b } = 0\n[PROOFSTEP]\nclassical rw [Finsupp.single_apply, if_neg H]\n[GOAL]\ncase neg\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝² : Semiring R\ninst✝¹ : DecidableEq ι\ninst✝ : Zero N\nn : N\ni : ι\na : η i\nj : ι\nb : η j\nh : ¬i = j\nH : { fst := i, snd := a } ≠ { fst := j, snd := b }\n⊢ ↑(single { fst := i, snd := a } n) { fst := j, snd := b } = 0\n[PROOFSTEP]\nrw [Finsupp.single_apply, if_neg H]\n[GOAL]\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : AddZeroClass N\nf g : (i : ι) × η i →₀ N\n⊢ ↑sigmaFinsuppEquivDFinsupp (f + g) = ↑sigmaFinsuppEquivDFinsupp f + ↑sigmaFinsuppEquivDFinsupp g\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nι : Type u_1\nR : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝¹ : Semiring R\ninst✝ : AddZeroClass N\nf g : (i : ι) × η i →₀ N\ni✝ : ι\na✝ : η i✝\n⊢ ↑(↑(↑sigmaFinsuppEquivDFinsupp (f + g)) i✝) a✝ =\n    ↑(↑(↑sigmaFinsuppEquivDFinsupp f + ↑sigmaFinsuppEquivDFinsupp g) i✝) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nR✝ : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝³ : Semiring R✝\nR : Type u_6\ninst✝² : Monoid R\ninst✝¹ : AddMonoid N\ninst✝ : DistribMulAction R N\nr : R\nf : (i : ι) × η i →₀ N\n⊢ ↑sigmaFinsuppEquivDFinsupp (r • f) = SMul.smul r (↑sigmaFinsuppEquivDFinsupp f)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nι : Type u_1\nR✝ : Type u_2\nM : Type u_3\nη : ι → Type u_4\nN : Type u_5\ninst✝³ : Semiring R✝\nR : Type u_6\ninst✝² : Monoid R\ninst✝¹ : AddMonoid N\ninst✝ : DistribMulAction R N\nr : R\nf : (i : ι) × η i →₀ N\ni✝ : ι\na✝ : η i✝\n⊢ ↑(↑(↑sigmaFinsuppEquivDFinsupp (r • f)) i✝) a✝ = ↑(↑(SMul.smul r (↑sigmaFinsuppEquivDFinsupp f)) i✝) a✝\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Data.Finsupp.ToDFinsupp", "llama_tokens": 7828, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442251201477016, "lm_q2_score": 0.5926665999540698, "lm_q1q2_score": 0.38181071156294044}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\n⊢ (fun x => ‖f' x‖) =Θ[l] g ↔ f' =Θ[l] g\n[PROOFSTEP]\nsimp [IsTheta]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\n⊢ (f =Θ[l] fun x => ‖g' x‖) ↔ f =Θ[l] g'\n[PROOFSTEP]\nsimp [IsTheta]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nh : (fun x => ‖f x‖) =ᶠ[l] fun x => ‖g x‖\n⊢ ∀ᶠ (x : α) in l, ‖f x‖ ≤ 1 * ‖g x‖\n[PROOFSTEP]\nsimpa only [one_mul] using h.le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nh : (fun x => ‖f x‖) =ᶠ[l] fun x => ‖g x‖\n⊢ ∀ᶠ (x : α) in l, ‖g x‖ ≤ 1 * ‖f x‖\n[PROOFSTEP]\nsimpa only [one_mul] using h.symm.le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf : α → E\ng✝ : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\ng : α → ℝ\nh : (fun x => ‖f' x‖) =ᶠ[l] g\nx : α\nhx : (fun x => ‖f' x‖) x = g x\n⊢ (fun x => ‖f' x‖) x = (fun x => ‖g x‖) x\n[PROOFSTEP]\nsimp only [← hx, norm_norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nh : f'' =Θ[l] g''\n⊢ Tendsto f'' l (𝓝 0) ↔ Tendsto g'' l (𝓝 0)\n[PROOFSTEP]\nsimp only [← isLittleO_one_iff ℝ, h.isLittleO_congr_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nh : f' =Θ[l] g'\n⊢ Tendsto (norm ∘ f') l atTop ↔ Tendsto (norm ∘ g') l atTop\n[PROOFSTEP]\nsimp only [Function.comp, ← isLittleO_const_left_of_ne (one_ne_zero' ℝ), h.isLittleO_congr_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nh : f' =Θ[l] g'\n⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f') ↔ IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ g')\n[PROOFSTEP]\nsimp only [← isBigO_const_of_ne (one_ne_zero' ℝ), h.isBigO_congr_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf✝ : α → E\ng✝ : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nf : α → 𝕜\ng : α → 𝕜'\nh : (fun x => (f x)⁻¹) =Θ[l] fun x => (g x)⁻¹\n⊢ f =Θ[l] g\n[PROOFSTEP]\nsimpa only [inv_inv] using h.inv\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nf₁ f₂ : α → 𝕜\ng₁ g₂ : α → 𝕜'\nh₁ : f₁ =Θ[l] g₁\nh₂ : f₂ =Θ[l] g₂\n⊢ (fun x => f₁ x / f₂ x) =Θ[l] fun x => g₁ x / g₂ x\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using h₁.mul h₂.inv\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf✝ : α → E\ng✝ : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nf : α → 𝕜\ng : α → 𝕜'\nh : f =Θ[l] g\nn : ℤ\n⊢ (fun x => f x ^ n) =Θ[l] fun x => g x ^ n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf✝ : α → E\ng✝ : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nf : α → 𝕜\ng : α → 𝕜'\nh : f =Θ[l] g\na✝ : ℕ\n⊢ (fun x => f x ^ Int.ofNat a✝) =Θ[l] fun x => g x ^ Int.ofNat a✝\n[PROOFSTEP]\nsimpa only [Int.ofNat_eq_coe, zpow_coe_nat] using h.pow _\n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf✝ : α → E\ng✝ : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nf : α → 𝕜\ng : α → 𝕜'\nh : f =Θ[l] g\na✝ : ℕ\n⊢ (fun x => f x ^ Int.negSucc a✝) =Θ[l] fun x => g x ^ Int.negSucc a✝\n[PROOFSTEP]\nsimpa only [zpow_negSucc] using (h.pow _).inv\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹³ : Norm E\ninst✝¹² : Norm F\ninst✝¹¹ : Norm G\ninst✝¹⁰ : SeminormedAddCommGroup E'\ninst✝⁹ : SeminormedAddCommGroup F'\ninst✝⁸ : SeminormedAddCommGroup G'\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedAddCommGroup F''\ninst✝⁵ : NormedAddCommGroup G''\ninst✝⁴ : SeminormedRing R\ninst✝³ : SeminormedRing R'\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedField 𝕜'\nc c' c₁✝ c₂✝ : ℝ\nf : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\ninst✝ : NeBot l\nc₁ : E''\nc₂ : F''\n⊢ ((fun x => c₁) =Θ[l] fun x => c₂) ↔ (c₁ = 0 ↔ c₂ = 0)\n[PROOFSTEP]\nsimpa only [IsTheta, isBigO_const_const_iff, ← iff_def] using Iff.comm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\n⊢ (fun x => 0) =Θ[l] g'' ↔ g'' =ᶠ[l] 0\n[PROOFSTEP]\nsimp only [IsTheta, isBigO_zero, isBigO_zero_right_iff, true_and_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc✝ c' c₁ c₂ : ℝ\nf✝ : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nc : 𝕜\nf : α → 𝕜\nhc : c ≠ 0\n⊢ (fun x => c * f x) =Θ[l] g ↔ f =Θ[l] g\n[PROOFSTEP]\nsimpa only [← smul_eq_mul] using isTheta_const_smul_left hc\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc✝ c' c₁ c₂ : ℝ\nf : α → E\ng✝ : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nc : 𝕜\ng : α → 𝕜\nhc : c ≠ 0\n⊢ (f =Θ[l] fun x => c * g x) ↔ f =Θ[l] g\n[PROOFSTEP]\nsimpa only [← smul_eq_mul] using isTheta_const_smul_right hc\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nf₁ f₂ : α → E'\nh : f₂ =o[l] f₁\n⊢ f₁ =O[l] (f₁ + f₂)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\nE' : Type u_6\nF' : Type u_7\nG' : Type u_8\nE'' : Type u_9\nF'' : Type u_10\nG'' : Type u_11\nR : Type u_12\nR' : Type u_13\n𝕜 : Type u_14\n𝕜' : Type u_15\ninst✝¹² : Norm E\ninst✝¹¹ : Norm F\ninst✝¹⁰ : Norm G\ninst✝⁹ : SeminormedAddCommGroup E'\ninst✝⁸ : SeminormedAddCommGroup F'\ninst✝⁷ : SeminormedAddCommGroup G'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F''\ninst✝⁴ : NormedAddCommGroup G''\ninst✝³ : SeminormedRing R\ninst✝² : SeminormedRing R'\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedField 𝕜'\nc c' c₁ c₂ : ℝ\nf : α → E\ng : α → F\nk : α → G\nf' : α → E'\ng' : α → F'\nk' : α → G'\nf'' : α → E''\ng'' : α → F''\nl l' : Filter α\nf₁ f₂ : α → E'\nh : f₂ =o[l] f₁\n⊢ f₁ =O[l] (f₂ + f₁)\n[PROOFSTEP]\nexact h.right_isBigO_add\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Asymptotics.Theta", "llama_tokens": 8630, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7185943805178139, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.3817240705847705}}
{"text": "[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf g : X →[M'] Y\nh : f.toFun = g.toFun\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\ng : X →[M'] Y\ntoFun✝ : X → Y\nmap_smul'✝ : ∀ (m : M') (x : X), toFun✝ (m • x) = m • toFun✝ x\nh : { toFun := toFun✝, map_smul' := map_smul'✝ }.toFun = g.toFun\n⊢ { toFun := toFun✝, map_smul' := map_smul'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\ntoFun✝¹ : X → Y\nmap_smul'✝¹ : ∀ (m : M') (x : X), toFun✝¹ (m • x) = m • toFun✝¹ x\ntoFun✝ : X → Y\nmap_smul'✝ : ∀ (m : M') (x : X), toFun✝ (m • x) = m • toFun✝ x\nh : { toFun := toFun✝¹, map_smul' := map_smul'✝¹ }.toFun = { toFun := toFun✝, map_smul' := map_smul'✝ }.toFun\n⊢ { toFun := toFun✝¹, map_smul' := map_smul'✝¹ } = { toFun := toFun✝, map_smul' := map_smul'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\ng : Y →[M'] Z\nf : X →[M'] Y\nm : M'\nx : X\n⊢ ↑g (↑f (m • x)) = ↑g (m • ↑f x)\n[PROOFSTEP]\nrw [f.map_smul]\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf : X →[M'] Y\nx : X\n⊢ ↑(comp (MulActionHom.id M') f) x = ↑f x\n[PROOFSTEP]\nrw [comp_apply, id_apply]\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf : X →[M'] Y\nx : X\n⊢ ↑(comp f (MulActionHom.id M')) x = ↑f x\n[PROOFSTEP]\nrw [comp_apply, id_apply]\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf : A →[M] B\ng : B → A\nh₁ : Function.LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nm : M\nx : B\n⊢ g (m • x) = g (m • ↑f (g x))\n[PROOFSTEP]\nrw [h₂]\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf : A →[M] B\ng : B → A\nh₁ : Function.LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nm : M\nx : B\n⊢ g (m • ↑f (g x)) = g (↑f (m • g x))\n[PROOFSTEP]\nrw [f.map_smul]\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf : A →[M] B\ng : B → A\nh₁ : Function.LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nm : M\nx : B\n⊢ g (↑f (m • g x)) = m • g x\n[PROOFSTEP]\nrw [h₁]\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf g : A →+[M] B\nh : (fun m => m.toFun) f = (fun m => m.toFun) g\n⊢ f = g\n[PROOFSTEP]\nrcases f with ⟨tF, _, _⟩\n[GOAL]\ncase mk\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\ng : A →+[M] B\ntF : A →[M] B\nmap_zero'✝ : MulActionHom.toFun tF 0 = 0\nmap_add'✝ : ∀ (x y : A), MulActionHom.toFun tF (x + y) = MulActionHom.toFun tF x + MulActionHom.toFun tF y\nh : (fun m => m.toFun) { toMulActionHom := tF, map_zero' := map_zero'✝, map_add' := map_add'✝ } = (fun m => m.toFun) g\n⊢ { toMulActionHom := tF, map_zero' := map_zero'✝, map_add' := map_add'✝ } = g\n[PROOFSTEP]\nrcases g with ⟨tG, _, _⟩\n[GOAL]\ncase mk.mk\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\ntF : A →[M] B\nmap_zero'✝¹ : MulActionHom.toFun tF 0 = 0\nmap_add'✝¹ : ∀ (x y : A), MulActionHom.toFun tF (x + y) = MulActionHom.toFun tF x + MulActionHom.toFun tF y\ntG : A →[M] B\nmap_zero'✝ : MulActionHom.toFun tG 0 = 0\nmap_add'✝ : ∀ (x y : A), MulActionHom.toFun tG (x + y) = MulActionHom.toFun tG x + MulActionHom.toFun tG y\nh :\n  (fun m => m.toFun) { toMulActionHom := tF, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ } =\n    (fun m => m.toFun) { toMulActionHom := tG, map_zero' := map_zero'✝, map_add' := map_add'✝ }\n⊢ { toMulActionHom := tF, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ } =\n    { toMulActionHom := tG, map_zero' := map_zero'✝, map_add' := map_add'✝ }\n[PROOFSTEP]\ncases tF\n[GOAL]\ncase mk.mk.mk\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\ntG : A →[M] B\nmap_zero'✝¹ : MulActionHom.toFun tG 0 = 0\nmap_add'✝¹ : ∀ (x y : A), MulActionHom.toFun tG (x + y) = MulActionHom.toFun tG x + MulActionHom.toFun tG y\ntoFun✝ : A → B\nmap_smul'✝ : ∀ (m : M) (x : A), toFun✝ (m • x) = m • toFun✝ x\nmap_zero'✝ : MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } 0 = 0\nmap_add'✝ :\n  ∀ (x y : A),\n    MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } (x + y) =\n      MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } x +\n        MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } y\nh :\n  (fun m => m.toFun)\n      { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n        map_add' := map_add'✝ } =\n    (fun m => m.toFun) { toMulActionHom := tG, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ }\n⊢ { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝, map_add' := map_add'✝ } =\n    { toMulActionHom := tG, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ }\n[PROOFSTEP]\ncases tG\n[GOAL]\ncase mk.mk.mk.mk\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\ntoFun✝¹ : A → B\nmap_smul'✝¹ : ∀ (m : M) (x : A), toFun✝¹ (m • x) = m • toFun✝¹ x\nmap_zero'✝¹ : MulActionHom.toFun { toFun := toFun✝¹, map_smul' := map_smul'✝¹ } 0 = 0\nmap_add'✝¹ :\n  ∀ (x y : A),\n    MulActionHom.toFun { toFun := toFun✝¹, map_smul' := map_smul'✝¹ } (x + y) =\n      MulActionHom.toFun { toFun := toFun✝¹, map_smul' := map_smul'✝¹ } x +\n        MulActionHom.toFun { toFun := toFun✝¹, map_smul' := map_smul'✝¹ } y\ntoFun✝ : A → B\nmap_smul'✝ : ∀ (m : M) (x : A), toFun✝ (m • x) = m • toFun✝ x\nmap_zero'✝ : MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } 0 = 0\nmap_add'✝ :\n  ∀ (x y : A),\n    MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } (x + y) =\n      MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } x +\n        MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } y\nh :\n  (fun m => m.toFun)\n      { toMulActionHom := { toFun := toFun✝¹, map_smul' := map_smul'✝¹ }, map_zero' := map_zero'✝¹,\n        map_add' := map_add'✝¹ } =\n    (fun m => m.toFun)\n      { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝, map_add' := map_add'✝ }\n⊢ { toMulActionHom := { toFun := toFun✝¹, map_smul' := map_smul'✝¹ }, map_zero' := map_zero'✝¹,\n      map_add' := map_add'✝¹ } =\n    { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝, map_add' := map_add'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf g : A →+[M] B\nh : ↑f = ↑g\n⊢ f = g\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf g : A →+[M] B\nh : ↑f = ↑g\na : A\n⊢ ↑f a = ↑g a\n[PROOFSTEP]\nexact MulActionHom.congr_fun h a\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf g : A →+[M] B\nh : ↑f = ↑g\n⊢ f = g\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf g : A →+[M] B\nh : ↑f = ↑g\na : A\n⊢ ↑f a = ↑g a\n[PROOFSTEP]\nexact FunLike.congr_fun h a\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nx : A\n⊢ ↑(DistribMulActionHom.id M) x = x\n[PROOFSTEP]\nrfl\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nsrc✝ : A →+ B := 0\nm : M\nx✝ : A\n⊢ ZeroHom.toFun (↑src✝) (m • x✝) = m • ZeroHom.toFun (↑src✝) x✝\n[PROOFSTEP]\nchange (0 : B) = m • (0 : B)\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nsrc✝ : A →+ B := 0\nm : M\nx✝ : A\n⊢ 0 = m • 0\n[PROOFSTEP]\nrw [smul_zero]\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf : A →+[M] B\nx : A\n⊢ ↑(comp (DistribMulActionHom.id M) f) x = ↑f x\n[PROOFSTEP]\nrw [comp_apply, id_apply]\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf : A →+[M] B\nx : A\n⊢ ↑(comp f (DistribMulActionHom.id M)) x = ↑f x\n[PROOFSTEP]\nrw [comp_apply, id_apply]\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²⁵ : SMul M' X\nY : Type u_3\ninst✝²⁴ : SMul M' Y\nZ : Type u_4\ninst✝²³ : SMul M' Z\nM : Type u_5\ninst✝²² : Monoid M\nA : Type u_6\ninst✝²¹ : AddMonoid A\ninst✝²⁰ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁹ : AddGroup A'\ninst✝¹⁸ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁷ : AddMonoid B\ninst✝¹⁶ : DistribMulAction M B\nB' : Type u_9\ninst✝¹⁵ : AddGroup B'\ninst✝¹⁴ : DistribMulAction M B'\nC : Type u_10\ninst✝¹³ : AddMonoid C\ninst✝¹² : DistribMulAction M C\nR : Type u_11\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁹ : Ring R'\ninst✝⁸ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁷ : Semiring S\ninst✝⁶ : MulSemiringAction M S\nS' : Type u_14\ninst✝⁵ : Ring S'\ninst✝⁴ : MulSemiringAction M S'\nT : Type u_15\ninst✝³ : Semiring T\ninst✝² : MulSemiringAction M T\ninst✝¹ : AddMonoid M'\ninst✝ : DistribMulAction R M'\nf g : R →+[R] M'\nh : ↑f 1 = ↑g 1\n⊢ f = g\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nM' : Type u_1\nX : Type u_2\ninst✝²⁵ : SMul M' X\nY : Type u_3\ninst✝²⁴ : SMul M' Y\nZ : Type u_4\ninst✝²³ : SMul M' Z\nM : Type u_5\ninst✝²² : Monoid M\nA : Type u_6\ninst✝²¹ : AddMonoid A\ninst✝²⁰ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁹ : AddGroup A'\ninst✝¹⁸ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁷ : AddMonoid B\ninst✝¹⁶ : DistribMulAction M B\nB' : Type u_9\ninst✝¹⁵ : AddGroup B'\ninst✝¹⁴ : DistribMulAction M B'\nC : Type u_10\ninst✝¹³ : AddMonoid C\ninst✝¹² : DistribMulAction M C\nR : Type u_11\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁹ : Ring R'\ninst✝⁸ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁷ : Semiring S\ninst✝⁶ : MulSemiringAction M S\nS' : Type u_14\ninst✝⁵ : Ring S'\ninst✝⁴ : MulSemiringAction M S'\nT : Type u_15\ninst✝³ : Semiring T\ninst✝² : MulSemiringAction M T\ninst✝¹ : AddMonoid M'\ninst✝ : DistribMulAction R M'\nf g : R →+[R] M'\nh : ↑f 1 = ↑g 1\nx : R\n⊢ ↑f x = ↑g x\n[PROOFSTEP]\nrw [← mul_one x, ← smul_eq_mul R, f.map_smul, g.map_smul, h]\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf g : R →+*[M] S\nh : (fun m => m.toFun) f = (fun m => m.toFun) g\n⊢ f = g\n[PROOFSTEP]\nrcases f with ⟨⟨tF, _, _⟩, _, _⟩\n[GOAL]\ncase mk.mk\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\ng : R →+*[M] S\ntF : R →[M] S\nmap_zero'✝ : MulActionHom.toFun tF 0 = 0\nmap_add'✝ : ∀ (x y : R), MulActionHom.toFun tF (x + y) = MulActionHom.toFun tF x + MulActionHom.toFun tF y\nmap_one'✝ :\n  MulActionHom.toFun { toMulActionHom := tF, map_zero' := map_zero'✝, map_add' := map_add'✝ }.toMulActionHom 1 = 1\nmap_mul'✝ :\n  ∀ (x y : R),\n    MulActionHom.toFun { toMulActionHom := tF, map_zero' := map_zero'✝, map_add' := map_add'✝ }.toMulActionHom (x * y) =\n      MulActionHom.toFun { toMulActionHom := tF, map_zero' := map_zero'✝, map_add' := map_add'✝ }.toMulActionHom x *\n        MulActionHom.toFun { toMulActionHom := tF, map_zero' := map_zero'✝, map_add' := map_add'✝ }.toMulActionHom y\nh :\n  (fun m => m.toFun)\n      { toDistribMulActionHom := { toMulActionHom := tF, map_zero' := map_zero'✝, map_add' := map_add'✝ },\n        map_one' := map_one'✝, map_mul' := map_mul'✝ } =\n    (fun m => m.toFun) g\n⊢ { toDistribMulActionHom := { toMulActionHom := tF, map_zero' := map_zero'✝, map_add' := map_add'✝ },\n      map_one' := map_one'✝, map_mul' := map_mul'✝ } =\n    g\n[PROOFSTEP]\nrcases g with ⟨⟨tG, _, _⟩, _, _⟩\n[GOAL]\ncase mk.mk.mk.mk\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\ntF : R →[M] S\nmap_zero'✝¹ : MulActionHom.toFun tF 0 = 0\nmap_add'✝¹ : ∀ (x y : R), MulActionHom.toFun tF (x + y) = MulActionHom.toFun tF x + MulActionHom.toFun tF y\nmap_one'✝¹ :\n  MulActionHom.toFun { toMulActionHom := tF, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ }.toMulActionHom 1 = 1\nmap_mul'✝¹ :\n  ∀ (x y : R),\n    MulActionHom.toFun { toMulActionHom := tF, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ }.toMulActionHom\n        (x * y) =\n      MulActionHom.toFun { toMulActionHom := tF, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ }.toMulActionHom x *\n        MulActionHom.toFun { toMulActionHom := tF, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ }.toMulActionHom y\ntG : R →[M] S\nmap_zero'✝ : MulActionHom.toFun tG 0 = 0\nmap_add'✝ : ∀ (x y : R), MulActionHom.toFun tG (x + y) = MulActionHom.toFun tG x + MulActionHom.toFun tG y\nmap_one'✝ :\n  MulActionHom.toFun { toMulActionHom := tG, map_zero' := map_zero'✝, map_add' := map_add'✝ }.toMulActionHom 1 = 1\nmap_mul'✝ :\n  ∀ (x y : R),\n    MulActionHom.toFun { toMulActionHom := tG, map_zero' := map_zero'✝, map_add' := map_add'✝ }.toMulActionHom (x * y) =\n      MulActionHom.toFun { toMulActionHom := tG, map_zero' := map_zero'✝, map_add' := map_add'✝ }.toMulActionHom x *\n        MulActionHom.toFun { toMulActionHom := tG, map_zero' := map_zero'✝, map_add' := map_add'✝ }.toMulActionHom y\nh :\n  (fun m => m.toFun)\n      { toDistribMulActionHom := { toMulActionHom := tF, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ },\n        map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =\n    (fun m => m.toFun)\n      { toDistribMulActionHom := { toMulActionHom := tG, map_zero' := map_zero'✝, map_add' := map_add'✝ },\n        map_one' := map_one'✝, map_mul' := map_mul'✝ }\n⊢ { toDistribMulActionHom := { toMulActionHom := tF, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ },\n      map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =\n    { toDistribMulActionHom := { toMulActionHom := tG, map_zero' := map_zero'✝, map_add' := map_add'✝ },\n      map_one' := map_one'✝, map_mul' := map_mul'✝ }\n[PROOFSTEP]\ncases tF\n[GOAL]\ncase mk.mk.mk.mk.mk\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\ntG : R →[M] S\nmap_zero'✝¹ : MulActionHom.toFun tG 0 = 0\nmap_add'✝¹ : ∀ (x y : R), MulActionHom.toFun tG (x + y) = MulActionHom.toFun tG x + MulActionHom.toFun tG y\nmap_one'✝¹ :\n  MulActionHom.toFun { toMulActionHom := tG, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ }.toMulActionHom 1 = 1\nmap_mul'✝¹ :\n  ∀ (x y : R),\n    MulActionHom.toFun { toMulActionHom := tG, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ }.toMulActionHom\n        (x * y) =\n      MulActionHom.toFun { toMulActionHom := tG, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ }.toMulActionHom x *\n        MulActionHom.toFun { toMulActionHom := tG, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ }.toMulActionHom y\ntoFun✝ : R → S\nmap_smul'✝ : ∀ (m : M) (x : R), toFun✝ (m • x) = m • toFun✝ x\nmap_zero'✝ : MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } 0 = 0\nmap_add'✝ :\n  ∀ (x y : R),\n    MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } (x + y) =\n      MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } x +\n        MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } y\nmap_one'✝ :\n  MulActionHom.toFun\n      { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n          map_add' := map_add'✝ }.toMulActionHom\n      1 =\n    1\nmap_mul'✝ :\n  ∀ (x y : R),\n    MulActionHom.toFun\n        { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n            map_add' := map_add'✝ }.toMulActionHom\n        (x * y) =\n      MulActionHom.toFun\n          { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n              map_add' := map_add'✝ }.toMulActionHom\n          x *\n        MulActionHom.toFun\n          { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n              map_add' := map_add'✝ }.toMulActionHom\n          y\nh :\n  (fun m => m.toFun)\n      {\n        toDistribMulActionHom :=\n          { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n            map_add' := map_add'✝ },\n        map_one' := map_one'✝, map_mul' := map_mul'✝ } =\n    (fun m => m.toFun)\n      { toDistribMulActionHom := { toMulActionHom := tG, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ },\n        map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ }\n⊢ {\n      toDistribMulActionHom :=\n        { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n          map_add' := map_add'✝ },\n      map_one' := map_one'✝, map_mul' := map_mul'✝ } =\n    { toDistribMulActionHom := { toMulActionHom := tG, map_zero' := map_zero'✝¹, map_add' := map_add'✝¹ },\n      map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ }\n[PROOFSTEP]\ncases tG\n[GOAL]\ncase mk.mk.mk.mk.mk.mk\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\ntoFun✝¹ : R → S\nmap_smul'✝¹ : ∀ (m : M) (x : R), toFun✝¹ (m • x) = m • toFun✝¹ x\nmap_zero'✝¹ : MulActionHom.toFun { toFun := toFun✝¹, map_smul' := map_smul'✝¹ } 0 = 0\nmap_add'✝¹ :\n  ∀ (x y : R),\n    MulActionHom.toFun { toFun := toFun✝¹, map_smul' := map_smul'✝¹ } (x + y) =\n      MulActionHom.toFun { toFun := toFun✝¹, map_smul' := map_smul'✝¹ } x +\n        MulActionHom.toFun { toFun := toFun✝¹, map_smul' := map_smul'✝¹ } y\nmap_one'✝¹ :\n  MulActionHom.toFun\n      { toMulActionHom := { toFun := toFun✝¹, map_smul' := map_smul'✝¹ }, map_zero' := map_zero'✝¹,\n          map_add' := map_add'✝¹ }.toMulActionHom\n      1 =\n    1\nmap_mul'✝¹ :\n  ∀ (x y : R),\n    MulActionHom.toFun\n        { toMulActionHom := { toFun := toFun✝¹, map_smul' := map_smul'✝¹ }, map_zero' := map_zero'✝¹,\n            map_add' := map_add'✝¹ }.toMulActionHom\n        (x * y) =\n      MulActionHom.toFun\n          { toMulActionHom := { toFun := toFun✝¹, map_smul' := map_smul'✝¹ }, map_zero' := map_zero'✝¹,\n              map_add' := map_add'✝¹ }.toMulActionHom\n          x *\n        MulActionHom.toFun\n          { toMulActionHom := { toFun := toFun✝¹, map_smul' := map_smul'✝¹ }, map_zero' := map_zero'✝¹,\n              map_add' := map_add'✝¹ }.toMulActionHom\n          y\ntoFun✝ : R → S\nmap_smul'✝ : ∀ (m : M) (x : R), toFun✝ (m • x) = m • toFun✝ x\nmap_zero'✝ : MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } 0 = 0\nmap_add'✝ :\n  ∀ (x y : R),\n    MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } (x + y) =\n      MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } x +\n        MulActionHom.toFun { toFun := toFun✝, map_smul' := map_smul'✝ } y\nmap_one'✝ :\n  MulActionHom.toFun\n      { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n          map_add' := map_add'✝ }.toMulActionHom\n      1 =\n    1\nmap_mul'✝ :\n  ∀ (x y : R),\n    MulActionHom.toFun\n        { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n            map_add' := map_add'✝ }.toMulActionHom\n        (x * y) =\n      MulActionHom.toFun\n          { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n              map_add' := map_add'✝ }.toMulActionHom\n          x *\n        MulActionHom.toFun\n          { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n              map_add' := map_add'✝ }.toMulActionHom\n          y\nh :\n  (fun m => m.toFun)\n      {\n        toDistribMulActionHom :=\n          { toMulActionHom := { toFun := toFun✝¹, map_smul' := map_smul'✝¹ }, map_zero' := map_zero'✝¹,\n            map_add' := map_add'✝¹ },\n        map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =\n    (fun m => m.toFun)\n      {\n        toDistribMulActionHom :=\n          { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n            map_add' := map_add'✝ },\n        map_one' := map_one'✝, map_mul' := map_mul'✝ }\n⊢ {\n      toDistribMulActionHom :=\n        { toMulActionHom := { toFun := toFun✝¹, map_smul' := map_smul'✝¹ }, map_zero' := map_zero'✝¹,\n          map_add' := map_add'✝¹ },\n      map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =\n    {\n      toDistribMulActionHom :=\n        { toMulActionHom := { toFun := toFun✝, map_smul' := map_smul'✝ }, map_zero' := map_zero'✝,\n          map_add' := map_add'✝ },\n      map_one' := map_one'✝, map_mul' := map_mul'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf : R →+*[M] S\nx : R\n⊢ ↑(comp (MulSemiringActionHom.id M) f) x = ↑f x\n[PROOFSTEP]\nrw [comp_apply, id_apply]\n[GOAL]\nM' : Type u_1\nX : Type u_2\ninst✝²³ : SMul M' X\nY : Type u_3\ninst✝²² : SMul M' Y\nZ : Type u_4\ninst✝²¹ : SMul M' Z\nM : Type u_5\ninst✝²⁰ : Monoid M\nA : Type u_6\ninst✝¹⁹ : AddMonoid A\ninst✝¹⁸ : DistribMulAction M A\nA' : Type u_7\ninst✝¹⁷ : AddGroup A'\ninst✝¹⁶ : DistribMulAction M A'\nB : Type u_8\ninst✝¹⁵ : AddMonoid B\ninst✝¹⁴ : DistribMulAction M B\nB' : Type u_9\ninst✝¹³ : AddGroup B'\ninst✝¹² : DistribMulAction M B'\nC : Type u_10\ninst✝¹¹ : AddMonoid C\ninst✝¹⁰ : DistribMulAction M C\nR : Type u_11\ninst✝⁹ : Semiring R\ninst✝⁸ : MulSemiringAction M R\nR' : Type u_12\ninst✝⁷ : Ring R'\ninst✝⁶ : MulSemiringAction M R'\nS : Type u_13\ninst✝⁵ : Semiring S\ninst✝⁴ : MulSemiringAction M S\nS' : Type u_14\ninst✝³ : Ring S'\ninst✝² : MulSemiringAction M S'\nT : Type u_15\ninst✝¹ : Semiring T\ninst✝ : MulSemiringAction M T\nf : R →+*[M] S\nx : R\n⊢ ↑(comp f (MulSemiringActionHom.id M)) x = ↑f x\n[PROOFSTEP]\nrw [comp_apply, id_apply]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Hom.GroupAction", "llama_tokens": 21824, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.8006920020959544, "lm_q2_score": 0.47657965106367595, "lm_q1q2_score": 0.381593514968366}}
{"text": "[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Subsingleton R\nx✝ : Basis ι R M\nb : M ≃ₗ[R] ι →₀ R\n⊢ { repr := b } = default\n[PROOFSTEP]\nrw [Subsingleton.elim b]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nf g : Basis ι R M\nh : f.repr = g.repr\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase ofRepr\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\ng : Basis ι R M\nrepr✝ : M ≃ₗ[R] ι →₀ R\nh : { repr := repr✝ }.repr = g.repr\n⊢ { repr := repr✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase ofRepr.ofRepr\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nrepr✝¹ repr✝ : M ≃ₗ[R] ι →₀ R\nh : { repr := repr✝¹ }.repr = { repr := repr✝ }.repr\n⊢ { repr := repr✝¹ } = { repr := repr✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nf g : Basis ι R M\nh :\n  (fun b i => ↑(LinearEquiv.symm b.repr) (Finsupp.single i 1)) f =\n    (fun b i => ↑(LinearEquiv.symm b.repr) (Finsupp.single i 1)) g\n⊢ ↑(LinearEquiv.symm f.repr) = ↑(LinearEquiv.symm g.repr)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nf g : Basis ι R M\nh :\n  (fun b i => ↑(LinearEquiv.symm b.repr) (Finsupp.single i 1)) f =\n    (fun b i => ↑(LinearEquiv.symm b.repr) (Finsupp.single i 1)) g\na✝ : ι\n⊢ ↑(LinearMap.comp (↑(LinearEquiv.symm f.repr)) (Finsupp.lsingle a✝)) 1 =\n    ↑(LinearMap.comp (↑(LinearEquiv.symm g.repr)) (Finsupp.lsingle a✝)) 1\n[PROOFSTEP]\nexact congr_fun h _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\n⊢ ↑(LinearEquiv.symm b.repr) (Finsupp.single i c) = ↑(LinearEquiv.symm b.repr) (c • Finsupp.single i 1)\n[PROOFSTEP]\n{rw [Finsupp.smul_single', mul_one]\n}\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\n⊢ ↑(LinearEquiv.symm b.repr) (Finsupp.single i c) = ↑(LinearEquiv.symm b.repr) (c • Finsupp.single i 1)\n[PROOFSTEP]\nrw [Finsupp.smul_single', mul_one]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\n⊢ ↑(LinearEquiv.symm b.repr) (c • Finsupp.single i 1) = c • ↑b i\n[PROOFSTEP]\nrw [LinearEquiv.map_smul, repr_symm_single_one]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nj : ι\ninst✝ : Decidable (i = j)\n⊢ ↑(↑b.repr (↑b i)) j = if i = j then 1 else 0\n[PROOFSTEP]\nrw [repr_self, Finsupp.single_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nv : ι →₀ R\n⊢ ↑(LinearEquiv.symm b.repr) v = ↑(LinearEquiv.symm b.repr) (Finsupp.sum v Finsupp.single)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nv : ι →₀ R\n⊢ ↑(LinearEquiv.symm b.repr) (Finsupp.sum v Finsupp.single) =\n    ∑ i in v.support, ↑(LinearEquiv.symm b.repr) (Finsupp.single i (↑v i))\n[PROOFSTEP]\nrw [Finsupp.sum, LinearEquiv.map_sum]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nv : ι →₀ R\n⊢ ∑ i in v.support, ↑(LinearEquiv.symm b.repr) (Finsupp.single i (↑v i)) = ↑(Finsupp.total ι M R ↑b) v\n[PROOFSTEP]\nsimp [repr_symm_single, Finsupp.total_apply, Finsupp.sum]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nv : ι →₀ R\n⊢ ↑b.repr (↑(Finsupp.total ι M R ↑b) v) = v\n[PROOFSTEP]\nrw [← b.coe_repr_symm]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nv : ι →₀ R\n⊢ ↑b.repr (↑↑(LinearEquiv.symm b.repr) v) = v\n[PROOFSTEP]\nexact b.repr.apply_symm_apply v\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\n⊢ ↑(Finsupp.total ι M R ↑b) (↑b.repr x) = x\n[PROOFSTEP]\nrw [← b.coe_repr_symm]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\n⊢ ↑↑(LinearEquiv.symm b.repr) (↑b.repr x) = x\n[PROOFSTEP]\nexact b.repr.symm_apply_apply x\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\n⊢ LinearMap.range ↑b.repr = Finsupp.supported R R univ\n[PROOFSTEP]\nrw [LinearEquiv.range, Finsupp.supported_univ]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx m : M\n⊢ ↑b.repr m ∈ Finsupp.supported R R ↑(↑b.repr m).support ∧ ↑(Finsupp.total ι M R ↑b) (↑b.repr m) = m\n[PROOFSTEP]\nsimp [Finsupp.mem_supported_support]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\ns : Set ι\nm : M\nhm : m ∈ span R (↑b '' s)\n⊢ ↑(↑b.repr m).support ⊆ s\n[PROOFSTEP]\nrcases(Finsupp.mem_span_image_iff_total _).1 hm with ⟨l, hl, rfl⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\ns : Set ι\nl : ι →₀ R\nhl : l ∈ Finsupp.supported R R s\nhm : ↑(Finsupp.total ι M R ↑b) l ∈ span R (↑b '' s)\n⊢ ↑(↑b.repr (↑(Finsupp.total ι M R ↑b) l)).support ⊆ s\n[PROOFSTEP]\nrwa [repr_total, ← Finsupp.mem_supported R l]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\ninst✝ : Nontrivial R\ni : ι\ns : Set ι\n⊢ ↑b i ∈ span R (↑b '' s) ↔ i ∈ s\n[PROOFSTEP]\nsimp [mem_span_image, Finsupp.support_single_ne_zero]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ x : M\n⊢ (∀ (i : ι), ↑(coord b i) x = 0) ↔ ↑b.repr x = 0\n[PROOFSTEP]\nsimp only [b.coord_apply, FunLike.ext_iff, Finsupp.zero_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\n⊢ ↑(sumCoords b) = fun m => ∑ᶠ (i : ι), ↑(coord b i) m\n[PROOFSTEP]\next m\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx m : M\n⊢ ↑(sumCoords b) m = ∑ᶠ (i : ι), ↑(coord b i) m\n[PROOFSTEP]\nsimp only [Basis.sumCoords, Basis.coord, Finsupp.lapply_apply, LinearMap.id_coe, LinearEquiv.coe_coe,\n  Function.comp_apply, Finsupp.coe_lsum, LinearMap.coe_comp, finsum_eq_sum _ (b.repr m).finite_support, Finsupp.sum,\n  Finset.finite_toSet_toFinset, id.def, Finsupp.fun_support_eq]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\ninst✝ : Fintype ι\n⊢ ↑(sumCoords b) = ↑(∑ i : ι, coord b i)\n[PROOFSTEP]\next m\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\ninst✝ : Fintype ι\nm : M\n⊢ ↑(sumCoords b) m = ↑(∑ i : ι, coord b i) m\n[PROOFSTEP]\nsimp only [sumCoords, Finsupp.sum_fintype, LinearMap.id_coe, LinearEquiv.coe_coe, coord_apply, id.def,\n  Fintype.sum_apply, imp_true_iff, Finsupp.coe_lsum, LinearMap.coe_comp, comp_apply, LinearMap.coeFn_sum]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\n⊢ ↑(sumCoords b) (↑b i) = 1\n[PROOFSTEP]\nsimp only [Basis.sumCoords, LinearMap.id_coe, LinearEquiv.coe_coe, id.def, Basis.repr_self, Function.comp_apply,\n  Finsupp.coe_lsum, LinearMap.coe_comp, Finsupp.sum_single_index]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\ni : ι\nm : M\nr : R\n⊢ ↑(coord b i) (r • m) = r * ↑(coord b i) m\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb✝ b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb : Basis ι R M\ni : ι\nf : ι →₀ R\n⊢ ↑(coord b i) (↑(LinearEquiv.symm b.repr) f) = ↑f i\n[PROOFSTEP]\nsimp only [repr_symm_apply, coord_apply, repr_total]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf₁ f₂ : M →ₛₗ[σ] M₁\nh : ∀ (i : ι), ↑f₁ (↑b i) = ↑f₂ (↑b i)\n⊢ f₁ = f₂\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf₁ f₂ : M →ₛₗ[σ] M₁\nh : ∀ (i : ι), ↑f₁ (↑b i) = ↑f₂ (↑b i)\nx : M\n⊢ ↑f₁ x = ↑f₂ x\n[PROOFSTEP]\nrw [← b.total_repr x, Finsupp.total_apply, Finsupp.sum]\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf₁ f₂ : M →ₛₗ[σ] M₁\nh : ∀ (i : ι), ↑f₁ (↑b i) = ↑f₂ (↑b i)\nx : M\n⊢ ↑f₁ (∑ a in (↑b.repr x).support, ↑(↑b.repr x) a • ↑b a) = ↑f₂ (∑ a in (↑b.repr x).support, ↑(↑b.repr x) a • ↑b a)\n[PROOFSTEP]\nsimp only [LinearMap.map_sum, LinearMap.map_smulₛₗ, h]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf₁ f₂ : M ≃ₛₗ[σ] M₁\nh : ∀ (i : ι), ↑f₁ (↑b i) = ↑f₂ (↑b i)\n⊢ f₁ = f₂\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf₁ f₂ : M ≃ₛₗ[σ] M₁\nh : ∀ (i : ι), ↑f₁ (↑b i) = ↑f₂ (↑b i)\nx : M\n⊢ ↑f₁ x = ↑f₂ x\n[PROOFSTEP]\nrw [← b.total_repr x, Finsupp.total_apply, Finsupp.sum]\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf₁ f₂ : M ≃ₛₗ[σ] M₁\nh : ∀ (i : ι), ↑f₁ (↑b i) = ↑f₂ (↑b i)\nx : M\n⊢ ↑f₁ (∑ a in (↑b.repr x).support, ↑(↑b.repr x) a • ↑b a) = ↑f₂ (∑ a in (↑b.repr x).support, ↑(↑b.repr x) a • ↑b a)\n[PROOFSTEP]\nsimp only [LinearEquiv.map_sum, LinearEquiv.map_smulₛₗ, h]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nx y : M\n⊢ x = y ↔ ∀ (i : ι), ↑(↑b.repr x) i = ↑(↑b.repr y) i\n[PROOFSTEP]\nsimp only [← FunLike.ext_iff, EmbeddingLike.apply_eq_iff_eq]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M → ι → R\nhadd : ∀ (x y : M), f (x + y) = f x + f y\nhsmul : ∀ (c : R) (x : M), f (c • x) = c • f x\nf_eq : ∀ (i : ι), f (↑b i) = ↑(Finsupp.single i 1)\nx : M\ni : ι\n⊢ ↑(↑b.repr x) i = f x i\n[PROOFSTEP]\nlet f_i : M →ₗ[R] R :=\n  { toFun := fun x => f x i\n    map_add' := fun _ _ => by dsimp only []; rw [hadd, Pi.add_apply]\n    map_smul' := fun _ _ => by simp [hsmul, Pi.smul_apply] }\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝² : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M → ι → R\nhadd : ∀ (x y : M), f (x + y) = f x + f y\nhsmul : ∀ (c : R) (x : M), f (c • x) = c • f x\nf_eq : ∀ (i : ι), f (↑b i) = ↑(Finsupp.single i 1)\nx : M\ni : ι\nx✝¹ x✝ : M\n⊢ (fun x => f x i) (x✝¹ + x✝) = (fun x => f x i) x✝¹ + (fun x => f x i) x✝\n[PROOFSTEP]\ndsimp only []\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝² : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M → ι → R\nhadd : ∀ (x y : M), f (x + y) = f x + f y\nhsmul : ∀ (c : R) (x : M), f (c • x) = c • f x\nf_eq : ∀ (i : ι), f (↑b i) = ↑(Finsupp.single i 1)\nx : M\ni : ι\nx✝¹ x✝ : M\n⊢ f (x✝¹ + x✝) i = f x✝¹ i + f x✝ i\n[PROOFSTEP]\nrw [hadd, Pi.add_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝² : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M → ι → R\nhadd : ∀ (x y : M), f (x + y) = f x + f y\nhsmul : ∀ (c : R) (x : M), f (c • x) = c • f x\nf_eq : ∀ (i : ι), f (↑b i) = ↑(Finsupp.single i 1)\nx : M\ni : ι\nx✝¹ : R\nx✝ : M\n⊢ AddHom.toFun\n      { toFun := fun x => f x i,\n        map_add' := (_ : ∀ (x x_1 : M), (fun x => f x i) (x + x_1) = (fun x => f x i) x + (fun x => f x i) x_1) }\n      (x✝¹ • x✝) =\n    ↑(RingHom.id R) x✝¹ •\n      AddHom.toFun\n        { toFun := fun x => f x i,\n          map_add' := (_ : ∀ (x x_1 : M), (fun x => f x i) (x + x_1) = (fun x => f x i) x + (fun x => f x i) x_1) }\n        x✝\n[PROOFSTEP]\nsimp [hsmul, Pi.smul_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M → ι → R\nhadd : ∀ (x y : M), f (x + y) = f x + f y\nhsmul : ∀ (c : R) (x : M), f (c • x) = c • f x\nf_eq : ∀ (i : ι), f (↑b i) = ↑(Finsupp.single i 1)\nx : M\ni : ι\nf_i : M →ₗ[R] R :=\n  {\n    toAddHom :=\n      { toFun := fun x => f x i,\n        map_add' := (_ : ∀ (x x_1 : M), (fun x => f x i) (x + x_1) = (fun x => f x i) x + (fun x => f x i) x_1) },\n    map_smul' := (_ : ∀ (x : R) (x_1 : M), f (x • x_1) i = x * f x_1 i) }\n⊢ ↑(↑b.repr x) i = f x i\n[PROOFSTEP]\nhave : Finsupp.lapply i ∘ₗ ↑b.repr = f_i := by\n  refine' b.ext fun j => _\n  show b.repr (b j) i = f (b j) i\n  rw [b.repr_self, f_eq]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M → ι → R\nhadd : ∀ (x y : M), f (x + y) = f x + f y\nhsmul : ∀ (c : R) (x : M), f (c • x) = c • f x\nf_eq : ∀ (i : ι), f (↑b i) = ↑(Finsupp.single i 1)\nx : M\ni : ι\nf_i : M →ₗ[R] R :=\n  {\n    toAddHom :=\n      { toFun := fun x => f x i,\n        map_add' := (_ : ∀ (x x_1 : M), (fun x => f x i) (x + x_1) = (fun x => f x i) x + (fun x => f x i) x_1) },\n    map_smul' := (_ : ∀ (x : R) (x_1 : M), f (x • x_1) i = x * f x_1 i) }\n⊢ LinearMap.comp (Finsupp.lapply i) ↑b.repr = f_i\n[PROOFSTEP]\nrefine' b.ext fun j => _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M → ι → R\nhadd : ∀ (x y : M), f (x + y) = f x + f y\nhsmul : ∀ (c : R) (x : M), f (c • x) = c • f x\nf_eq : ∀ (i : ι), f (↑b i) = ↑(Finsupp.single i 1)\nx : M\ni : ι\nf_i : M →ₗ[R] R :=\n  {\n    toAddHom :=\n      { toFun := fun x => f x i,\n        map_add' := (_ : ∀ (x x_1 : M), (fun x => f x i) (x + x_1) = (fun x => f x i) x + (fun x => f x i) x_1) },\n    map_smul' := (_ : ∀ (x : R) (x_1 : M), f (x • x_1) i = x * f x_1 i) }\nj : ι\n⊢ ↑(LinearMap.comp (Finsupp.lapply i) ↑b.repr) (↑b j) = ↑f_i (↑b j)\n[PROOFSTEP]\nshow b.repr (b j) i = f (b j) i\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M → ι → R\nhadd : ∀ (x y : M), f (x + y) = f x + f y\nhsmul : ∀ (c : R) (x : M), f (c • x) = c • f x\nf_eq : ∀ (i : ι), f (↑b i) = ↑(Finsupp.single i 1)\nx : M\ni : ι\nf_i : M →ₗ[R] R :=\n  {\n    toAddHom :=\n      { toFun := fun x => f x i,\n        map_add' := (_ : ∀ (x x_1 : M), (fun x => f x i) (x + x_1) = (fun x => f x i) x + (fun x => f x i) x_1) },\n    map_smul' := (_ : ∀ (x : R) (x_1 : M), f (x • x_1) i = x * f x_1 i) }\nj : ι\n⊢ ↑(↑b.repr (↑b j)) i = f (↑b j) i\n[PROOFSTEP]\nrw [b.repr_self, f_eq]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M → ι → R\nhadd : ∀ (x y : M), f (x + y) = f x + f y\nhsmul : ∀ (c : R) (x : M), f (c • x) = c • f x\nf_eq : ∀ (i : ι), f (↑b i) = ↑(Finsupp.single i 1)\nx : M\ni : ι\nf_i : M →ₗ[R] R :=\n  {\n    toAddHom :=\n      { toFun := fun x => f x i,\n        map_add' := (_ : ∀ (x x_1 : M), (fun x => f x i) (x + x_1) = (fun x => f x i) x + (fun x => f x i) x_1) },\n    map_smul' := (_ : ∀ (x : R) (x_1 : M), f (x • x_1) i = x * f x_1 i) }\nthis : LinearMap.comp (Finsupp.lapply i) ↑b.repr = f_i\n⊢ ↑(↑b.repr x) i = f x i\n[PROOFSTEP]\ncalc\n  b.repr x i = f_i x := by {\n    rw [← this]\n    rfl\n  }\n  _ = f x i := rfl\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M → ι → R\nhadd : ∀ (x y : M), f (x + y) = f x + f y\nhsmul : ∀ (c : R) (x : M), f (c • x) = c • f x\nf_eq : ∀ (i : ι), f (↑b i) = ↑(Finsupp.single i 1)\nx : M\ni : ι\nf_i : M →ₗ[R] R :=\n  {\n    toAddHom :=\n      { toFun := fun x => f x i,\n        map_add' := (_ : ∀ (x x_1 : M), (fun x => f x i) (x + x_1) = (fun x => f x i) x + (fun x => f x i) x_1) },\n    map_smul' := (_ : ∀ (x : R) (x_1 : M), f (x • x_1) i = x * f x_1 i) }\nthis : LinearMap.comp (Finsupp.lapply i) ↑b.repr = f_i\n⊢ ↑(↑b.repr x) i = ↑f_i x\n[PROOFSTEP]\n{ rw [← this]\n  rfl\n}\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M → ι → R\nhadd : ∀ (x y : M), f (x + y) = f x + f y\nhsmul : ∀ (c : R) (x : M), f (c • x) = c • f x\nf_eq : ∀ (i : ι), f (↑b i) = ↑(Finsupp.single i 1)\nx : M\ni : ι\nf_i : M →ₗ[R] R :=\n  {\n    toAddHom :=\n      { toFun := fun x => f x i,\n        map_add' := (_ : ∀ (x x_1 : M), (fun x => f x i) (x + x_1) = (fun x => f x i) x + (fun x => f x i) x_1) },\n    map_smul' := (_ : ∀ (x : R) (x_1 : M), f (x • x_1) i = x * f x_1 i) }\nthis : LinearMap.comp (Finsupp.lapply i) ↑b.repr = f_i\n⊢ ↑(↑b.repr x) i = ↑f_i x\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M → ι → R\nhadd : ∀ (x y : M), f (x + y) = f x + f y\nhsmul : ∀ (c : R) (x : M), f (c • x) = c • f x\nf_eq : ∀ (i : ι), f (↑b i) = ↑(Finsupp.single i 1)\nx : M\ni : ι\nf_i : M →ₗ[R] R :=\n  {\n    toAddHom :=\n      { toFun := fun x => f x i,\n        map_add' := (_ : ∀ (x x_1 : M), (fun x => f x i) (x + x_1) = (fun x => f x i) x + (fun x => f x i) x_1) },\n    map_smul' := (_ : ∀ (x : R) (x_1 : M), f (x • x_1) i = x * f x_1 i) }\nthis : LinearMap.comp (Finsupp.lapply i) ↑b.repr = f_i\n⊢ ↑(↑b.repr x) i = ↑(LinearMap.comp (Finsupp.lapply i) ↑b.repr) x\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁✝ : Basis ι R M\ni : ι\nc : R\nx : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nb₁ b₂ : Basis ι R M\nh : ∀ (x : M) (i : ι), ↑(↑b₁.repr x) i = ↑(↑b₂.repr x) i\n⊢ b₁.repr = b₂.repr\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : Module R M'\nb b₁✝ : Basis ι R M\ni : ι\nc : R\nx : M\nR₁ : Type u_10\ninst✝⁴ : Semiring R₁\nσ : R →+* R₁\nσ' : R₁ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\nM₁ : Type u_11\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nb₁ b₂ : Basis ι R M\nh : ∀ (x : M) (i : ι), ↑(↑b₁.repr x) i = ↑(↑b₂.repr x) i\nx✝ : M\na✝ : ι\n⊢ ↑(↑b₁.repr x✝) a✝ = ↑(↑b₂.repr x✝) a✝\n[PROOFSTEP]\napply h\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nR' : Type u_10\ninst✝¹ : Semiring R'\ninst✝ : Module R' M\nf : R ≃+* R'\nh : ∀ (c : R) (x : M), ↑f c • x = c • x\n⊢ Basis ι R' M\n[PROOFSTEP]\nletI : Module R' R := Module.compHom R (↑f.symm : R' →+* R)\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nR' : Type u_10\ninst✝¹ : Semiring R'\ninst✝ : Module R' M\nf : R ≃+* R'\nh : ∀ (c : R) (x : M), ↑f c • x = c • x\nthis : Module R' R := Module.compHom R ↑(RingEquiv.symm f)\n⊢ Basis ι R' M\n[PROOFSTEP]\nhaveI : IsScalarTower R' R M :=\n  {\n    smul_assoc := fun x y z => by\n      -- Porting note: `dsimp [(· • ·)]` is unavailable because\n              --               `HSMul.hsmul` becomes `SMul.smul`.\n      change (f.symm x * y) • z = x • (y • z)\n      rw [mul_smul, ← h, f.apply_symm_apply] }\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nR' : Type u_10\ninst✝¹ : Semiring R'\ninst✝ : Module R' M\nf : R ≃+* R'\nh : ∀ (c : R) (x : M), ↑f c • x = c • x\nthis : Module R' R := Module.compHom R ↑(RingEquiv.symm f)\nx : R'\ny : R\nz : M\n⊢ (x • y) • z = x • y • z\n[PROOFSTEP]\nchange (f.symm x * y) • z = x • (y • z)\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nR' : Type u_10\ninst✝¹ : Semiring R'\ninst✝ : Module R' M\nf : R ≃+* R'\nh : ∀ (c : R) (x : M), ↑f c • x = c • x\nthis : Module R' R := Module.compHom R ↑(RingEquiv.symm f)\nx : R'\ny : R\nz : M\n⊢ (↑(RingEquiv.symm f) x * y) • z = x • y • z\n[PROOFSTEP]\nrw [mul_smul, ← h, f.apply_symm_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nR' : Type u_10\ninst✝¹ : Semiring R'\ninst✝ : Module R' M\nf : R ≃+* R'\nh : ∀ (c : R) (x : M), ↑f c • x = c • x\nthis✝ : Module R' R := Module.compHom R ↑(RingEquiv.symm f)\nthis : IsScalarTower R' R M\n⊢ Basis ι R' M\n[PROOFSTEP]\nexact\n  ofRepr <| (b.repr.restrictScalars R').trans <| Finsupp.mapRange.linearEquiv (Module.compHom.toLinearEquiv f.symm).symm\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nR' : Type u_10\ninst✝¹ : Semiring R'\ninst✝ : Module R' M\nf : R ≃+* R'\nh : ∀ (c : R) (x : M), ↑f c • x = c • x\ni : ι\n⊢ ↑(mapCoeffs b f h).repr (↑b i) = Finsupp.single i 1\n[PROOFSTEP]\nletI : Module R' R := Module.compHom R (↑f.symm : R' →+* R)\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nR' : Type u_10\ninst✝¹ : Semiring R'\ninst✝ : Module R' M\nf : R ≃+* R'\nh : ∀ (c : R) (x : M), ↑f c • x = c • x\ni : ι\nthis : Module R' R := Module.compHom R ↑(RingEquiv.symm f)\n⊢ ↑(mapCoeffs b f h).repr (↑b i) = Finsupp.single i 1\n[PROOFSTEP]\nhaveI : IsScalarTower R' R M :=\n  {\n    smul_assoc := fun x y z => by\n      -- Porting note: `dsimp [(· • ·)]` is unavailable because\n              --               `HSMul.hsmul` becomes `SMul.smul`.\n      change (f.symm x * y) • z = x • (y • z)\n      rw [mul_smul, ← h, f.apply_symm_apply] }\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nR' : Type u_10\ninst✝¹ : Semiring R'\ninst✝ : Module R' M\nf : R ≃+* R'\nh : ∀ (c : R) (x : M), ↑f c • x = c • x\ni : ι\nthis : Module R' R := Module.compHom R ↑(RingEquiv.symm f)\nx : R'\ny : R\nz : M\n⊢ (x • y) • z = x • y • z\n[PROOFSTEP]\nchange (f.symm x * y) • z = x • (y • z)\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nR' : Type u_10\ninst✝¹ : Semiring R'\ninst✝ : Module R' M\nf : R ≃+* R'\nh : ∀ (c : R) (x : M), ↑f c • x = c • x\ni : ι\nthis : Module R' R := Module.compHom R ↑(RingEquiv.symm f)\nx : R'\ny : R\nz : M\n⊢ (↑(RingEquiv.symm f) x * y) • z = x • y • z\n[PROOFSTEP]\nrw [mul_smul, ← h, f.apply_symm_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nR' : Type u_10\ninst✝¹ : Semiring R'\ninst✝ : Module R' M\nf : R ≃+* R'\nh : ∀ (c : R) (x : M), ↑f c • x = c • x\ni : ι\nthis✝ : Module R' R := Module.compHom R ↑(RingEquiv.symm f)\nthis : IsScalarTower R' R M\n⊢ ↑(mapCoeffs b f h).repr (↑b i) = Finsupp.single i 1\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ni' : ι'\n⊢ ↑(LinearEquiv.symm (LinearEquiv.trans b.repr (Finsupp.domLCongr e))) (Finsupp.single i' 1) =\n    ↑(LinearEquiv.symm b.repr) (Finsupp.single (↑e.symm i') 1)\n[PROOFSTEP]\nrw [LinearEquiv.symm_trans_apply, Finsupp.domLCongr_symm, Finsupp.domLCongr_single]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ni' : ι'\n⊢ ↑(↑(Finsupp.domLCongr e) (↑b.repr x)) i' = ↑(↑b.repr x) (↑e.symm i')\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\n⊢ ∀ (x_1 : ι'), ↑(↑(reindex b e).repr x) x_1 = ↑(Finsupp.mapDomain (↑e) (↑b.repr x)) x_1\n[PROOFSTEP]\nsimp [repr_reindex_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ni : ι\n⊢ ↑(reindex b (Equiv.refl ι)) i = ↑b i\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\n⊢ range ↑(reindex b e) = range ↑b\n[PROOFSTEP]\nsimp [coe_reindex, range_comp]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\n⊢ sumCoords (reindex b e) = sumCoords b\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx : M\n⊢ ↑(sumCoords (reindex b e)) x = ↑(sumCoords b) x\n[PROOFSTEP]\nsimp only [coe_sumCoords, repr_reindex]\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx : M\n⊢ (Finsupp.sum (Finsupp.mapDomain (↑e) (↑b.repr x)) fun x => id) = Finsupp.sum (↑b.repr x) fun x => id\n[PROOFSTEP]\nexact Finsupp.sum_mapDomain_index (fun _ => rfl) fun _ _ _ => rfl\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ni : ι\nh : optParam (↑b i ∈ range ↑b) (_ : ↑b i ∈ range ↑b)\n⊢ ↑(reindexRange b) { val := ↑b i, property := h } = ↑b i\n[PROOFSTEP]\nby_cases htr : Nontrivial R\n[GOAL]\ncase pos\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ni : ι\nh : optParam (↑b i ∈ range ↑b) (_ : ↑b i ∈ range ↑b)\nhtr : Nontrivial R\n⊢ ↑(reindexRange b) { val := ↑b i, property := h } = ↑b i\n[PROOFSTEP]\nletI := htr\n[GOAL]\ncase pos\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ni : ι\nh : optParam (↑b i ∈ range ↑b) (_ : ↑b i ∈ range ↑b)\nhtr : Nontrivial R\nthis : Nontrivial R := htr\n⊢ ↑(reindexRange b) { val := ↑b i, property := h } = ↑b i\n[PROOFSTEP]\nsimp [htr, reindexRange, reindex_apply, Equiv.apply_ofInjective_symm b.injective, Subtype.coe_mk]\n[GOAL]\ncase neg\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ni : ι\nh : optParam (↑b i ∈ range ↑b) (_ : ↑b i ∈ range ↑b)\nhtr : ¬Nontrivial R\n⊢ ↑(reindexRange b) { val := ↑b i, property := h } = ↑b i\n[PROOFSTEP]\nletI : Subsingleton R := not_nontrivial_iff_subsingleton.mp htr\n[GOAL]\ncase neg\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ni : ι\nh : optParam (↑b i ∈ range ↑b) (_ : ↑b i ∈ range ↑b)\nhtr : ¬Nontrivial R\nthis : Subsingleton R := Iff.mp not_nontrivial_iff_subsingleton htr\n⊢ ↑(reindexRange b) { val := ↑b i, property := h } = ↑b i\n[PROOFSTEP]\nletI := Module.subsingleton R M\n[GOAL]\ncase neg\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ni : ι\nh : optParam (↑b i ∈ range ↑b) (_ : ↑b i ∈ range ↑b)\nhtr : ¬Nontrivial R\nthis✝ : Subsingleton R := Iff.mp not_nontrivial_iff_subsingleton htr\nthis : Subsingleton M := Module.subsingleton R M\n⊢ ↑(reindexRange b) { val := ↑b i, property := h } = ↑b i\n[PROOFSTEP]\nsimp [reindexRange]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx : ↑(range ↑b)\n⊢ ↑(reindexRange b) x = ↑x\n[PROOFSTEP]\nrcases x with ⟨bi, ⟨i, rfl⟩⟩\n[GOAL]\ncase mk.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ni : ι\n⊢ ↑(reindexRange b) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) } =\n    ↑{ val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }\n[PROOFSTEP]\nexact b.reindexRange_self i\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx bi : M\ni : ι\nh : ↑b i = bi\n⊢ ↑(↑(reindexRange b).repr x) { val := bi, property := (_ : ∃ y, ↑b y = bi) } = ↑(↑b.repr x) i\n[PROOFSTEP]\nnontriviality\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx bi : M\ni : ι\nh : ↑b i = bi\n✝ : Nontrivial ((fun x => R) { val := bi, property := (_ : ∃ y, ↑b y = bi) })\n⊢ ↑(↑(reindexRange b).repr x) { val := bi, property := (_ : ∃ y, ↑b y = bi) } = ↑(↑b.repr x) i\n[PROOFSTEP]\nsubst h\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx : M\ni : ι\n✝ : Nontrivial ((fun x => R) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) })\n⊢ ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) } = ↑(↑b.repr x) i\n[PROOFSTEP]\napply (b.repr_apply_eq (fun x i => b.reindexRange.repr x ⟨b i, _⟩) _ _ _ x i).symm\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx : M\ni : ι\n✝ : Nontrivial ((fun x => R) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) })\n⊢ ∀ (x y : M),\n    (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) (x + y) =\n      (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) x +\n        (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) y\n[PROOFSTEP]\nintro x y\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝¹ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx✝ : M\ni : ι\n✝ : Nontrivial ((fun x => R) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) })\nx y : M\n⊢ (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) (x + y) =\n    (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) x +\n      (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) y\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝¹ : ι\nc : R\nx✝¹ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx✝ : M\ni✝ : ι\n✝ : Nontrivial ((fun x => R) { val := ↑b i✝, property := (_ : ∃ y, ↑b y = ↑b i✝) })\nx y : M\ni : ι\n⊢ (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) (x + y) i =\n    ((fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) x +\n        (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) y)\n      i\n[PROOFSTEP]\nsimp only [Pi.add_apply, LinearEquiv.map_add, Finsupp.coe_add]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx : M\ni : ι\n✝ : Nontrivial ((fun x => R) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) })\n⊢ ∀ (c : R) (x : M),\n    (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) (c • x) =\n      c • (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) x\n[PROOFSTEP]\nintro c x\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc✝ : R\nx✝¹ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx✝ : M\ni : ι\n✝ : Nontrivial ((fun x => R) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) })\nc : R\nx : M\n⊢ (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) (c • x) =\n    c • (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) x\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝¹ : ι\nc✝ : R\nx✝¹ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx✝ : M\ni✝ : ι\n✝ : Nontrivial ((fun x => R) { val := ↑b i✝, property := (_ : ∃ y, ↑b y = ↑b i✝) })\nc : R\nx : M\ni : ι\n⊢ (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) (c • x) i =\n    (c • (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) x) i\n[PROOFSTEP]\nsimp only [Pi.smul_apply, LinearEquiv.map_smul, Finsupp.coe_smul]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx : M\ni : ι\n✝ : Nontrivial ((fun x => R) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) })\n⊢ ∀ (i : ι),\n    (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) (↑b i) =\n      ↑(Finsupp.single i 1)\n[PROOFSTEP]\nintro i\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝¹ : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx : M\ni✝ : ι\n✝ : Nontrivial ((fun x => R) { val := ↑b i✝, property := (_ : ∃ y, ↑b y = ↑b i✝) })\ni : ι\n⊢ (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) (↑b i) =\n    ↑(Finsupp.single i 1)\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝¹ : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx : M\ni✝ : ι\n✝ : Nontrivial ((fun x => R) { val := ↑b i✝, property := (_ : ∃ y, ↑b y = ↑b i✝) })\ni j : ι\n⊢ (fun x i => ↑(↑(reindexRange b).repr x) { val := ↑b i, property := (_ : ∃ y, ↑b y = ↑b i) }) (↑b i) j =\n    ↑(Finsupp.single i 1) j\n[PROOFSTEP]\nsimp only [reindexRange_repr_self]\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝¹ : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx : M\ni✝ : ι\n✝ : Nontrivial ((fun x => R) { val := ↑b i✝, property := (_ : ∃ y, ↑b y = ↑b i✝) })\ni j : ι\n⊢ ↑(Finsupp.single { val := ↑b i, property := (_ : ↑b i ∈ range ↑b) } 1)\n      { val := ↑b j, property := (_ : ∃ y, ↑b y = ↑b j) } =\n    ↑(Finsupp.single i 1) j\n[PROOFSTEP]\napply Finsupp.single_apply_left (f := fun i => (⟨b i, _⟩ : Set.range b))\n[GOAL]\ncase h.hf\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝¹ : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\nx : M\ni✝ : ι\n✝ : Nontrivial ((fun x => R) { val := ↑b i✝, property := (_ : ∃ y, ↑b y = ↑b i✝) })\ni j : ι\n⊢ Injective fun i => { val := ↑b i, property := (_ : ↑b i ∈ range ↑b) }\n[PROOFSTEP]\nexact fun i j h => b.injective (Subtype.mk.inj h)\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq M\n⊢ ∀ (a : M), a ∈ range ↑b ↔ ↑(Equiv.refl M) a ∈ Finset.image (↑b) Finset.univ\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq M\ni : ι\nh : optParam (↑b i ∈ Finset.image (↑b) Finset.univ) (_ : ↑b i ∈ Finset.image (↑b) Finset.univ)\n⊢ ↑(reindexFinsetRange b) { val := ↑b i, property := h } = ↑b i\n[PROOFSTEP]\nrw [reindexFinsetRange, reindex_apply, reindexRange_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq M\ni : ι\nh : optParam (↑b i ∈ Finset.image (↑b) Finset.univ) (_ : ↑b i ∈ Finset.image (↑b) Finset.univ)\n⊢ ↑(↑(Equiv.subtypeEquiv (Equiv.refl M) (_ : ∀ (a : M), a ∈ range ↑b ↔ a ∈ Finset.image (↑b) Finset.univ)).symm\n        { val := ↑b i, property := h }) =\n    ↑b i\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq M\nx : { x // x ∈ Finset.image (↑b) Finset.univ }\n⊢ ↑(reindexFinsetRange b) x = ↑x\n[PROOFSTEP]\nrcases x with ⟨bi, hbi⟩\n[GOAL]\ncase mk\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq M\nbi : M\nhbi : bi ∈ Finset.image (↑b) Finset.univ\n⊢ ↑(reindexFinsetRange b) { val := bi, property := hbi } = ↑{ val := bi, property := hbi }\n[PROOFSTEP]\nrcases Finset.mem_image.mp hbi with ⟨i, -, rfl⟩\n[GOAL]\ncase mk.intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq M\ni : ι\nhbi : ↑b i ∈ Finset.image (↑b) Finset.univ\n⊢ ↑(reindexFinsetRange b) { val := ↑b i, property := hbi } = ↑{ val := ↑b i, property := hbi }\n[PROOFSTEP]\nexact b.reindexFinsetRange_self i\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq M\ni : ι\n⊢ ↑(reindexFinsetRange b).repr (↑b i) =\n    Finsupp.single { val := ↑b i, property := (_ : ↑b i ∈ Finset.image (↑b) Finset.univ) } 1\n[PROOFSTEP]\next ⟨bi, hbi⟩\n[GOAL]\ncase h.mk\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq M\ni : ι\nbi : M\nhbi : bi ∈ Finset.image (↑b) Finset.univ\n⊢ ↑(↑(reindexFinsetRange b).repr (↑b i)) { val := bi, property := hbi } =\n    ↑(Finsupp.single { val := ↑b i, property := (_ : ↑b i ∈ Finset.image (↑b) Finset.univ) } 1)\n      { val := bi, property := hbi }\n[PROOFSTEP]\nrw [reindexFinsetRange, repr_reindex, Finsupp.mapDomain_equiv_apply, reindexRange_repr_self]\n  -- Porting note: replaced a `convert; refl` with `simp`\n[GOAL]\ncase h.mk\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq M\ni : ι\nbi : M\nhbi : bi ∈ Finset.image (↑b) Finset.univ\n⊢ ↑(Finsupp.single { val := ↑b i, property := (_ : ↑b i ∈ range ↑b) } 1)\n      (↑(Equiv.subtypeEquiv (Equiv.refl M) (_ : ∀ (a : M), a ∈ range ↑b ↔ a ∈ Finset.image (↑b) Finset.univ)).symm\n        { val := bi, property := hbi }) =\n    ↑(Finsupp.single { val := ↑b i, property := (_ : ↑b i ∈ Finset.image (↑b) Finset.univ) } 1)\n      { val := bi, property := hbi }\n[PROOFSTEP]\nsimp [Finsupp.single_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq M\nx : M\ni : ι\nh : optParam (↑b i ∈ Finset.image (↑b) Finset.univ) (_ : ↑b i ∈ Finset.image (↑b) Finset.univ)\n⊢ ↑(↑(reindexFinsetRange b).repr x) { val := ↑b i, property := h } = ↑(↑b.repr x) i\n[PROOFSTEP]\nsimp [reindexFinsetRange]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nl : ι →₀ R\nhl : ↑(Finsupp.total ι M R ↑b) l = 0\n⊢ ↑b.repr (↑(Finsupp.total ι M R ↑b) l) = 0\n[PROOFSTEP]\nrw [hl, LinearEquiv.map_zero]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb : Basis ι R M\ninst✝ : Nontrivial M\n⊢ Nonempty ι\n[PROOFSTEP]\nobtain ⟨x, y, ne⟩ : ∃ x y : M, x ≠ y := Nontrivial.exists_pair_ne\n[GOAL]\ncase intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nb : Basis ι R M\ninst✝ : Nontrivial M\nx y : M\nne : x ≠ y\n⊢ Nonempty ι\n[PROOFSTEP]\nobtain ⟨i, _⟩ := not_forall.mp (mt b.ext_elem_iff.2 ne)\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\nb : Basis ι R M\ninst✝ : Nontrivial M\nx y : M\nne : x ≠ y\ni : ι\nh✝ : ¬↑(↑b.repr x) i = ↑(↑b.repr y) i\n⊢ Nonempty ι\n[PROOFSTEP]\nexact ⟨i⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nP : Submodule R M\nb : Basis ι R { x // x ∈ P }\nx : M\n⊢ x ∈ P ↔ ∃ c, x = Finsupp.sum c fun i x => x • ↑(↑b i)\n[PROOFSTEP]\nconv_lhs =>\n  rw [← P.range_subtype, ← Submodule.map_top, ← b.span_eq, Submodule.map_span, ← Set.range_comp, ← Finsupp.range_total]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nP : Submodule R M\nb : Basis ι R { x // x ∈ P }\nx : M\n| x ∈ P\n[PROOFSTEP]\nrw [← P.range_subtype, ← Submodule.map_top, ← b.span_eq, Submodule.map_span, ← Set.range_comp, ← Finsupp.range_total]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nP : Submodule R M\nb : Basis ι R { x // x ∈ P }\nx : M\n| x ∈ P\n[PROOFSTEP]\nrw [← P.range_subtype, ← Submodule.map_top, ← b.span_eq, Submodule.map_span, ← Set.range_comp, ← Finsupp.range_total]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nP : Submodule R M\nb : Basis ι R { x // x ∈ P }\nx : M\n| x ∈ P\n[PROOFSTEP]\nrw [← P.range_subtype, ← Submodule.map_top, ← b.span_eq, Submodule.map_span, ← Set.range_comp, ← Finsupp.range_total]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nP : Submodule R M\nb : Basis ι R { x // x ∈ P }\nx : M\n⊢ x ∈ LinearMap.range (Finsupp.total ι M R (↑(Submodule.subtype P) ∘ ↑b)) ↔\n    ∃ c, x = Finsupp.sum c fun i x => x • ↑(↑b i)\n[PROOFSTEP]\nsimp [@eq_comm _ x, Function.comp, Finsupp.total_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf g : ι → M'\n⊢ (fun f => LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr)) (f + g) =\n    (fun f => LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr)) f +\n      (fun f => LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr)) g\n[PROOFSTEP]\nrefine' b.ext fun i => _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf g : ι → M'\ni : ι\n⊢ ↑((fun f => LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr)) (f + g))\n      (↑b i) =\n    ↑((fun f => LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr)) f +\n          (fun f => LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr)) g)\n      (↑b i)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc✝ : R\nx : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nc : S\nf : ι → M'\n⊢ AddHom.toFun\n      { toFun := fun f => LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n        map_add' :=\n          (_ :\n            ∀ (f g : ι → M'),\n              (fun f => LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                  (f + g) =\n                (fun f => LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                    f +\n                  (fun f =>\n                      LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                    g) }\n      (c • f) =\n    ↑(RingHom.id S) c •\n      AddHom.toFun\n        {\n          toFun := fun f =>\n            LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n          map_add' :=\n            (_ :\n              ∀ (f g : ι → M'),\n                (fun f => LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                    (f + g) =\n                  (fun f =>\n                        LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                      f +\n                    (fun f =>\n                        LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                      g) }\n        f\n[PROOFSTEP]\nrefine' b.ext fun i => _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc✝ : R\nx : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nc : S\nf : ι → M'\ni : ι\n⊢ ↑(AddHom.toFun\n          {\n            toFun := fun f =>\n              LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n            map_add' :=\n              (_ :\n                ∀ (f g : ι → M'),\n                  (fun f =>\n                        LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                      (f + g) =\n                    (fun f =>\n                          LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                        f +\n                      (fun f =>\n                          LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                        g) }\n          (c • f))\n      (↑b i) =\n    ↑(↑(RingHom.id S) c •\n          AddHom.toFun\n            {\n              toFun := fun f =>\n                LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n              map_add' :=\n                (_ :\n                  ∀ (f g : ι → M'),\n                    (fun f =>\n                          LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                        (f + g) =\n                      (fun f =>\n                            LinearMap.comp (Finsupp.total M' M' R id)\n                              (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                          f +\n                        (fun f =>\n                            LinearMap.comp (Finsupp.total M' M' R id)\n                              (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                          g) }\n            f)\n      (↑b i)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf : ι → M'\n⊢ (fun f i => ↑f (↑b i))\n      (AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun f =>\n                  LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n                map_add' :=\n                  (_ :\n                    ∀ (f g : ι → M'),\n                      (fun f =>\n                            LinearMap.comp (Finsupp.total M' M' R id)\n                              (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                          (f + g) =\n                        (fun f =>\n                              LinearMap.comp (Finsupp.total M' M' R id)\n                                (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                            f +\n                          (fun f =>\n                              LinearMap.comp (Finsupp.total M' M' R id)\n                                (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                            g) },\n            map_smul' :=\n              (_ :\n                ∀ (c : S) (f : ι → M'),\n                  AddHom.toFun\n                      {\n                        toFun := fun f =>\n                          LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : ι → M'),\n                              (fun f =>\n                                    LinearMap.comp (Finsupp.total M' M' R id)\n                                      (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                  (f + g) =\n                                (fun f =>\n                                      LinearMap.comp (Finsupp.total M' M' R id)\n                                        (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                    f +\n                                  (fun f =>\n                                      LinearMap.comp (Finsupp.total M' M' R id)\n                                        (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                    g) }\n                      (c • f) =\n                    ↑(RingHom.id S) c •\n                      AddHom.toFun\n                        {\n                          toFun := fun f =>\n                            LinearMap.comp (Finsupp.total M' M' R id)\n                              (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : ι → M'),\n                                (fun f =>\n                                      LinearMap.comp (Finsupp.total M' M' R id)\n                                        (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                    (f + g) =\n                                  (fun f =>\n                                        LinearMap.comp (Finsupp.total M' M' R id)\n                                          (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                      f +\n                                    (fun f =>\n                                        LinearMap.comp (Finsupp.total M' M' R id)\n                                          (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                      g) }\n                        f) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf : ι → M'\nx✝ : ι\n⊢ (fun f i => ↑f (↑b i))\n      (AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun f =>\n                  LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n                map_add' :=\n                  (_ :\n                    ∀ (f g : ι → M'),\n                      (fun f =>\n                            LinearMap.comp (Finsupp.total M' M' R id)\n                              (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                          (f + g) =\n                        (fun f =>\n                              LinearMap.comp (Finsupp.total M' M' R id)\n                                (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                            f +\n                          (fun f =>\n                              LinearMap.comp (Finsupp.total M' M' R id)\n                                (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                            g) },\n            map_smul' :=\n              (_ :\n                ∀ (c : S) (f : ι → M'),\n                  AddHom.toFun\n                      {\n                        toFun := fun f =>\n                          LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : ι → M'),\n                              (fun f =>\n                                    LinearMap.comp (Finsupp.total M' M' R id)\n                                      (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                  (f + g) =\n                                (fun f =>\n                                      LinearMap.comp (Finsupp.total M' M' R id)\n                                        (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                    f +\n                                  (fun f =>\n                                      LinearMap.comp (Finsupp.total M' M' R id)\n                                        (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                    g) }\n                      (c • f) =\n                    ↑(RingHom.id S) c •\n                      AddHom.toFun\n                        {\n                          toFun := fun f =>\n                            LinearMap.comp (Finsupp.total M' M' R id)\n                              (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : ι → M'),\n                                (fun f =>\n                                      LinearMap.comp (Finsupp.total M' M' R id)\n                                        (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                    (f + g) =\n                                  (fun f =>\n                                        LinearMap.comp (Finsupp.total M' M' R id)\n                                          (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                      f +\n                                    (fun f =>\n                                        LinearMap.comp (Finsupp.total M' M' R id)\n                                          (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                      g) }\n                        f) }.toAddHom\n        f)\n      x✝ =\n    f x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf : M →ₗ[R] M'\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            {\n              toFun := fun f =>\n                LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n              map_add' :=\n                (_ :\n                  ∀ (f g : ι → M'),\n                    (fun f =>\n                          LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                        (f + g) =\n                      (fun f =>\n                            LinearMap.comp (Finsupp.total M' M' R id)\n                              (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                          f +\n                        (fun f =>\n                            LinearMap.comp (Finsupp.total M' M' R id)\n                              (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                          g) },\n          map_smul' :=\n            (_ :\n              ∀ (c : S) (f : ι → M'),\n                AddHom.toFun\n                    {\n                      toFun := fun f =>\n                        LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n                      map_add' :=\n                        (_ :\n                          ∀ (f g : ι → M'),\n                            (fun f =>\n                                  LinearMap.comp (Finsupp.total M' M' R id)\n                                    (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                (f + g) =\n                              (fun f =>\n                                    LinearMap.comp (Finsupp.total M' M' R id)\n                                      (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                  f +\n                                (fun f =>\n                                    LinearMap.comp (Finsupp.total M' M' R id)\n                                      (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                  g) }\n                    (c • f) =\n                  ↑(RingHom.id S) c •\n                    AddHom.toFun\n                      {\n                        toFun := fun f =>\n                          LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : ι → M'),\n                              (fun f =>\n                                    LinearMap.comp (Finsupp.total M' M' R id)\n                                      (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                  (f + g) =\n                                (fun f =>\n                                      LinearMap.comp (Finsupp.total M' M' R id)\n                                        (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                    f +\n                                  (fun f =>\n                                      LinearMap.comp (Finsupp.total M' M' R id)\n                                        (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                    g) }\n                      f) }.toAddHom\n      ((fun f i => ↑f (↑b i)) f) =\n    f\n[PROOFSTEP]\nrefine' b.ext fun i => _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf : M →ₗ[R] M'\ni : ι\n⊢ ↑(AddHom.toFun\n          {\n              toAddHom :=\n                {\n                  toFun := fun f =>\n                    LinearMap.comp (Finsupp.total M' M' R id) (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n                  map_add' :=\n                    (_ :\n                      ∀ (f g : ι → M'),\n                        (fun f =>\n                              LinearMap.comp (Finsupp.total M' M' R id)\n                                (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                            (f + g) =\n                          (fun f =>\n                                LinearMap.comp (Finsupp.total M' M' R id)\n                                  (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                              f +\n                            (fun f =>\n                                LinearMap.comp (Finsupp.total M' M' R id)\n                                  (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                              g) },\n              map_smul' :=\n                (_ :\n                  ∀ (c : S) (f : ι → M'),\n                    AddHom.toFun\n                        {\n                          toFun := fun f =>\n                            LinearMap.comp (Finsupp.total M' M' R id)\n                              (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : ι → M'),\n                                (fun f =>\n                                      LinearMap.comp (Finsupp.total M' M' R id)\n                                        (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                    (f + g) =\n                                  (fun f =>\n                                        LinearMap.comp (Finsupp.total M' M' R id)\n                                          (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                      f +\n                                    (fun f =>\n                                        LinearMap.comp (Finsupp.total M' M' R id)\n                                          (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                      g) }\n                        (c • f) =\n                      ↑(RingHom.id S) c •\n                        AddHom.toFun\n                          {\n                            toFun := fun f =>\n                              LinearMap.comp (Finsupp.total M' M' R id)\n                                (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr),\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : ι → M'),\n                                  (fun f =>\n                                        LinearMap.comp (Finsupp.total M' M' R id)\n                                          (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                      (f + g) =\n                                    (fun f =>\n                                          LinearMap.comp (Finsupp.total M' M' R id)\n                                            (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                        f +\n                                      (fun f =>\n                                          LinearMap.comp (Finsupp.total M' M' R id)\n                                            (LinearMap.comp (Finsupp.lmapDomain R R f) ↑b.repr))\n                                        g) }\n                          f) }.toAddHom\n          ((fun f i => ↑f (↑b i)) f))\n      (↑b i) =\n    ↑f (↑b i)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf : ι → M'\nx : M\n⊢ ↑(↑(constr b S) f) x = Finsupp.sum (↑b.repr x) fun b a => a • f b\n[PROOFSTEP]\nsimp only [constr_def, LinearMap.comp_apply, Finsupp.lmapDomain_apply, Finsupp.total_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf : ι → M'\nx : M\n⊢ (Finsupp.sum (Finsupp.mapDomain f (↑↑b.repr x)) fun i a => a • id i) = Finsupp.sum (↑b.repr x) fun b a => a • f b\n[PROOFSTEP]\nrw [Finsupp.sum_mapDomain_index]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf : ι → M'\nx : M\n⊢ (Finsupp.sum (↑↑b.repr x) fun a m => m • id (f a)) = Finsupp.sum (↑b.repr x) fun b a => a • f b\n[PROOFSTEP]\nsimp [add_smul]\n[GOAL]\ncase h_zero\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf : ι → M'\nx : M\n⊢ ∀ (b : M'), 0 • id b = 0\n[PROOFSTEP]\nsimp [add_smul]\n[GOAL]\ncase h_add\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf : ι → M'\nx : M\n⊢ ∀ (b : M') (m₁ m₂ : R), (m₁ + m₂) • id b = m₁ • id b + m₂ • id b\n[PROOFSTEP]\nsimp [add_smul]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf : ι → M'\ni : ι\n⊢ ↑(↑(constr b S) f) (↑b i) = f i\n[PROOFSTEP]\nsimp [Basis.constr_apply, b.repr_self]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nS : Type u_10\ninst✝³ : Semiring S\ninst✝² : Module S M'\ninst✝¹ : SMulCommClass R S M'\ninst✝ : Nonempty ι\nf : ι → M'\n⊢ LinearMap.range (↑(constr b S) f) = span R (range f)\n[PROOFSTEP]\nrw [b.constr_def S f, LinearMap.range_comp, LinearMap.range_comp, LinearEquiv.range, ← Finsupp.supported_univ,\n  Finsupp.lmapDomain_supported, ← Set.image_univ, ← Finsupp.span_image_eq_map_total, Set.image_id]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf : M' →ₗ[R] M'\nv : ι → M'\ni : ι\n⊢ ↑(↑(constr b S) (↑f ∘ v)) (↑b i) = ↑(LinearMap.comp f (↑(constr b S) v)) (↑b i)\n[PROOFSTEP]\nsimp only [Basis.constr_basis, LinearMap.comp_apply, Function.comp]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\n⊢ ↑(Basis.equiv b b' e) (↑b i) = ↑b' (↑e i)\n[PROOFSTEP]\nsimp [Basis.equiv]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\ni : ι\n⊢ ↑(Basis.equiv b b (Equiv.refl ι)) (↑b i) = ↑(LinearEquiv.refl R M) (↑b i)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\ni : ι'\n⊢ ↑(Basis.equiv b b' e) (↑(LinearEquiv.symm (Basis.equiv b b' e)) (↑b' i)) =\n    ↑(Basis.equiv b b' e) (↑(Basis.equiv b' b e.symm) (↑b' i))\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ne✝ : ι ≃ ι'\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nι'' : Type u_10\nb'' : Basis ι'' R M''\ne : ι ≃ ι'\ne' : ι' ≃ ι''\ni : ι\n⊢ ↑(LinearEquiv.trans (Basis.equiv b b' e) (Basis.equiv b' b'' e')) (↑b i) = ↑(Basis.equiv b b'' (e.trans e')) (↑b i)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb'✝ : Basis ι' R M'\ne✝ : ι ≃ ι'\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nb : Basis ι R M\nb' : Basis ι' R M'\ne : ι ≃ ι'\n⊢ Basis.map b (Basis.equiv b b' e) = reindex b' e.symm\n[PROOFSTEP]\next i\n[GOAL]\ncase a\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\nb✝ b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb'✝ : Basis ι' R M'\ne✝ : ι ≃ ι'\ninst✝¹ : AddCommMonoid M''\ninst✝ : Module R M''\nb : Basis ι R M\nb' : Basis ι' R M'\ne : ι ≃ ι'\ni : ι\n⊢ ↑(Basis.map b (Basis.equiv b b' e)) i = ↑(reindex b' e.symm) i\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni : ι\n⊢ ↑b.repr (↑(Basis.prod b b') (Sum.inl i)).fst = ↑b.repr (↑b i)\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni j : ι\n⊢ ↑(↑b.repr (↑(Basis.prod b b') (Sum.inl i)).fst) j = ↑(↑b.repr (↑b i)) j\n[PROOFSTEP]\nsimp only [Basis.prod, Basis.coe_ofRepr, LinearEquiv.symm_trans_apply, LinearEquiv.prod_symm, LinearEquiv.prod_apply,\n  b.repr.apply_symm_apply, LinearEquiv.symm_symm, repr_self, Equiv.toFun_as_coe,\n  Finsupp.fst_sumFinsuppLEquivProdFinsupp]\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni j : ι\n⊢ ↑(Finsupp.single (Sum.inl i) 1) (Sum.inl j) = ↑(Finsupp.single i 1) j\n[PROOFSTEP]\napply Finsupp.single_apply_left Sum.inl_injective\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni : ι'\n⊢ ↑b.repr (↑(Basis.prod b b') (Sum.inr i)).fst = ↑b.repr 0\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝¹ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni✝ : ι'\ni : ι\n⊢ ↑(↑b.repr (↑(Basis.prod b b') (Sum.inr i✝)).fst) i = ↑(↑b.repr 0) i\n[PROOFSTEP]\nsimp only [Basis.prod, Basis.coe_ofRepr, LinearEquiv.symm_trans_apply, LinearEquiv.prod_symm, LinearEquiv.prod_apply,\n  b.repr.apply_symm_apply, LinearEquiv.symm_symm, repr_self, Equiv.toFun_as_coe,\n  Finsupp.fst_sumFinsuppLEquivProdFinsupp, LinearEquiv.map_zero, Finsupp.zero_apply]\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝¹ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni✝ : ι'\ni : ι\n⊢ ↑(Finsupp.single (Sum.inr i✝) 1) (Sum.inl i) = 0\n[PROOFSTEP]\napply Finsupp.single_eq_of_ne Sum.inr_ne_inl\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni : ι\n⊢ ↑b'.repr (↑(Basis.prod b b') (Sum.inl i)).snd = ↑b'.repr 0\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni : ι\nj : ι'\n⊢ ↑(↑b'.repr (↑(Basis.prod b b') (Sum.inl i)).snd) j = ↑(↑b'.repr 0) j\n[PROOFSTEP]\nsimp only [Basis.prod, Basis.coe_ofRepr, LinearEquiv.symm_trans_apply, LinearEquiv.prod_symm, LinearEquiv.prod_apply,\n  b'.repr.apply_symm_apply, LinearEquiv.symm_symm, repr_self, Equiv.toFun_as_coe,\n  Finsupp.snd_sumFinsuppLEquivProdFinsupp, LinearEquiv.map_zero, Finsupp.zero_apply]\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni : ι\nj : ι'\n⊢ ↑(Finsupp.single (Sum.inl i) 1) (Sum.inr j) = 0\n[PROOFSTEP]\napply Finsupp.single_eq_of_ne Sum.inl_ne_inr\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni : ι'\n⊢ ↑b'.repr (↑(Basis.prod b b') (Sum.inr i)).snd = ↑b'.repr (↑b' i)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝¹ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni✝ i : ι'\n⊢ ↑(↑b'.repr (↑(Basis.prod b b') (Sum.inr i✝)).snd) i = ↑(↑b'.repr (↑b' i✝)) i\n[PROOFSTEP]\nsimp only [Basis.prod, Basis.coe_ofRepr, LinearEquiv.symm_trans_apply, LinearEquiv.prod_symm, LinearEquiv.prod_apply,\n  b'.repr.apply_symm_apply, LinearEquiv.symm_symm, repr_self, Equiv.toFun_as_coe,\n  Finsupp.snd_sumFinsuppLEquivProdFinsupp]\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝¹ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni✝ i : ι'\n⊢ ↑(Finsupp.single (Sum.inr i✝) 1) (Sum.inr i) = ↑(Finsupp.single i✝ 1) i\n[PROOFSTEP]\napply Finsupp.single_apply_left Sum.inr_injective\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni : ι ⊕ ι'\n⊢ ↑(Basis.prod b b') i = Sum.elim (↑(LinearMap.inl R M M') ∘ ↑b) (↑(LinearMap.inr R M M') ∘ ↑b') i\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni : ι ⊕ ι'\n⊢ (↑(Basis.prod b b') i).fst = (Sum.elim (↑(LinearMap.inl R M M') ∘ ↑b) (↑(LinearMap.inr R M M') ∘ ↑b') i).fst\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h₂\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni✝ : ι\nc : R\nx : M\nb' : Basis ι' R M'\ni : ι ⊕ ι'\n⊢ (↑(Basis.prod b b') i).snd = (Sum.elim (↑(LinearMap.inl R M M') ∘ ↑b) (↑(LinearMap.inr R M M') ∘ ↑b') i).snd\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h₁.inl\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb' : Basis ι' R M'\nval✝ : ι\n⊢ (↑(Basis.prod b b') (Sum.inl val✝)).fst =\n    (Sum.elim (↑(LinearMap.inl R M M') ∘ ↑b) (↑(LinearMap.inr R M M') ∘ ↑b') (Sum.inl val✝)).fst\n[PROOFSTEP]\nsimp only [prod_apply_inl_fst, Sum.elim_inl, LinearMap.inl_apply, prod_apply_inr_fst, Sum.elim_inr, LinearMap.inr_apply,\n  prod_apply_inl_snd, prod_apply_inr_snd, Function.comp]\n[GOAL]\ncase h₁.inr\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb' : Basis ι' R M'\nval✝ : ι'\n⊢ (↑(Basis.prod b b') (Sum.inr val✝)).fst =\n    (Sum.elim (↑(LinearMap.inl R M M') ∘ ↑b) (↑(LinearMap.inr R M M') ∘ ↑b') (Sum.inr val✝)).fst\n[PROOFSTEP]\nsimp only [prod_apply_inl_fst, Sum.elim_inl, LinearMap.inl_apply, prod_apply_inr_fst, Sum.elim_inr, LinearMap.inr_apply,\n  prod_apply_inl_snd, prod_apply_inr_snd, Function.comp]\n[GOAL]\ncase h₂.inl\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb' : Basis ι' R M'\nval✝ : ι\n⊢ (↑(Basis.prod b b') (Sum.inl val✝)).snd =\n    (Sum.elim (↑(LinearMap.inl R M M') ∘ ↑b) (↑(LinearMap.inr R M M') ∘ ↑b') (Sum.inl val✝)).snd\n[PROOFSTEP]\nsimp only [prod_apply_inl_fst, Sum.elim_inl, LinearMap.inl_apply, prod_apply_inr_fst, Sum.elim_inr, LinearMap.inr_apply,\n  prod_apply_inl_snd, prod_apply_inr_snd, Function.comp]\n[GOAL]\ncase h₂.inr\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb b₁ : Basis ι R M\ni : ι\nc : R\nx : M\nb' : Basis ι' R M'\nval✝ : ι'\n⊢ (↑(Basis.prod b b') (Sum.inr val✝)).snd =\n    (Sum.elim (↑(LinearMap.inl R M M') ∘ ↑b) (↑(LinearMap.inr R M M') ∘ ↑b') (Sum.inr val✝)).snd\n[PROOFSTEP]\nsimp only [prod_apply_inl_fst, Sum.elim_inl, LinearMap.inl_apply, prod_apply_inr_fst, Sum.elim_inr, LinearMap.inr_apply,\n  prod_apply_inl_snd, prod_apply_inr_snd, Function.comp]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc✝ : R\nx✝ : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nc : R\nx : M\nhcx : c • x = 0\n⊢ c = 0 ∨ x = 0\n[PROOFSTEP]\nexact\n  or_iff_not_imp_right.mpr fun hx =>\n    by\n    rw [← b.total_repr x, ← LinearMap.map_smul] at hcx \n    have := linearIndependent_iff.mp b.linearIndependent (c • b.repr x) hcx\n    rw [smul_eq_zero] at this \n    exact this.resolve_right fun hr => hx (b.repr.map_eq_zero_iff.mp hr)\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc✝ : R\nx✝ : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nc : R\nx : M\nhcx : c • x = 0\nhx : ¬x = 0\n⊢ c = 0\n[PROOFSTEP]\nrw [← b.total_repr x, ← LinearMap.map_smul] at hcx \n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc✝ : R\nx✝ : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nc : R\nx : M\nhcx : ↑(Finsupp.total ι M R ↑b) (c • ↑b.repr x) = 0\nhx : ¬x = 0\n⊢ c = 0\n[PROOFSTEP]\nhave := linearIndependent_iff.mp b.linearIndependent (c • b.repr x) hcx\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc✝ : R\nx✝ : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nc : R\nx : M\nhcx : ↑(Finsupp.total ι M R ↑b) (c • ↑b.repr x) = 0\nhx : ¬x = 0\nthis : c • ↑b.repr x = 0\n⊢ c = 0\n[PROOFSTEP]\nrw [smul_eq_zero] at this \n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc✝ : R\nx✝ : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nc : R\nx : M\nhcx : ↑(Finsupp.total ι M R ↑b) (c • ↑b.repr x) = 0\nhx : ¬x = 0\nthis : c = 0 ∨ ↑b.repr x = 0\n⊢ c = 0\n[PROOFSTEP]\nexact this.resolve_right fun hr => hx (b.repr.map_eq_zero_iff.mp hr)\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nN : Submodule R M\nrank_eq : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m = 0\n⊢ N = ⊥\n[PROOFSTEP]\nrw [Submodule.eq_bot_iff]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nN : Submodule R M\nrank_eq : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m = 0\n⊢ ∀ (x : M), x ∈ N → x = 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nN : Submodule R M\nrank_eq : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m = 0\nx : M\nhx : x ∈ N\n⊢ x = 0\n[PROOFSTEP]\ncontrapose! rank_eq with x_ne\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nN : Submodule R M\nx : M\nhx : x ∈ N\nx_ne : x ≠ 0\n⊢ Exists fun {m} => ∃ v, LinearIndependent R (Subtype.val ∘ v) ∧ m ≠ 0\n[PROOFSTEP]\nrefine' ⟨1, fun _ => ⟨x, hx⟩, _, one_ne_zero⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nN : Submodule R M\nx : M\nhx : x ∈ N\nx_ne : x ≠ 0\n⊢ LinearIndependent R (Subtype.val ∘ fun x_1 => { val := x, property := hx })\n[PROOFSTEP]\nrw [Fintype.linearIndependent_iff]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nN : Submodule R M\nx : M\nhx : x ∈ N\nx_ne : x ≠ 0\n⊢ ∀ (g : Fin 1 → R),\n    ∑ i : Fin 1, g i • (Subtype.val ∘ fun x_1 => { val := x, property := hx }) i = 0 → ∀ (i : Fin 1), g i = 0\n[PROOFSTEP]\nrintro g sum_eq i\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni✝ : ι\nc : R\nx✝ : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nN : Submodule R M\nx : M\nhx : x ∈ N\nx_ne : x ≠ 0\ng : Fin 1 → R\nsum_eq : ∑ i : Fin 1, g i • (Subtype.val ∘ fun x_1 => { val := x, property := hx }) i = 0\ni : Fin 1\n⊢ g i = 0\n[PROOFSTEP]\ncases' i with _ hi\n[GOAL]\ncase mk\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nN : Submodule R M\nx : M\nhx : x ∈ N\nx_ne : x ≠ 0\ng : Fin 1 → R\nsum_eq : ∑ i : Fin 1, g i • (Subtype.val ∘ fun x_1 => { val := x, property := hx }) i = 0\nval✝ : ℕ\nhi : val✝ < 1\n⊢ g { val := val✝, isLt := hi } = 0\n[PROOFSTEP]\nsimp only [Function.const_apply, Fin.default_eq_zero, Submodule.coe_mk, Finset.univ_unique, Function.comp_const,\n  Finset.sum_singleton] at sum_eq \n[GOAL]\ncase mk\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb✝ b₁ : Basis ι R M\ni : ι\nc : R\nx✝ : M\ninst✝ : NoZeroDivisors R\nb : Basis ι R M\nN : Submodule R M\nx : M\nhx : x ∈ N\nx_ne : x ≠ 0\ng : Fin 1 → R\nval✝ : ℕ\nhi : val✝ < 1\nsum_eq : g 0 • (Subtype.val ∘ fun x_1 => { val := x, property := hx }) 0 = 0\n⊢ g { val := val✝, isLt := hi } = 0\n[PROOFSTEP]\nconvert (b.smul_eq_zero.mp sum_eq).resolve_right x_ne\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R✝\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R✝ M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M\ni : ι✝\nc : R✝\nx✝ : M\nι : Type u_10\nR : Type u_11\ninst✝¹ : Unique ι\ninst✝ : Semiring R\nx y : R\n⊢ (fun x => Finsupp.single default x) (x + y) =\n    (fun x => Finsupp.single default x) x + (fun x => Finsupp.single default x) y\n[PROOFSTEP]\nsimp\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R✝\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R✝ M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M\ni : ι✝\nc✝ : R✝\nx✝ : M\nι : Type u_10\nR : Type u_11\ninst✝¹ : Unique ι\ninst✝ : Semiring R\nc x : R\n⊢ AddHom.toFun\n      { toFun := fun x => Finsupp.single default x,\n        map_add' :=\n          (_ : ∀ (x y : R), Finsupp.single default (x + y) = Finsupp.single default x + Finsupp.single default y) }\n      (c • x) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := fun x => Finsupp.single default x,\n          map_add' :=\n            (_ : ∀ (x y : R), Finsupp.single default (x + y) = Finsupp.single default x + Finsupp.single default y) }\n        x\n[PROOFSTEP]\nsimp\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R✝\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R✝ M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M\ni : ι✝\nc : R✝\nx✝ : M\nι : Type u_10\nR : Type u_11\ninst✝¹ : Unique ι\ninst✝ : Semiring R\nx : R\n⊢ (fun f => ↑f default)\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun x => Finsupp.single default x,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : R),\n                      Finsupp.single default (x + y) = Finsupp.single default x + Finsupp.single default y) },\n            map_smul' := (_ : ∀ (c x : R), Finsupp.single default (c * x) = c • Finsupp.single default x) }.toAddHom\n        x) =\n    x\n[PROOFSTEP]\nsimp\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R✝\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R✝ M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M\ni : ι✝\nc : R✝\nx : M\nι : Type u_10\nR : Type u_11\ninst✝¹ : Unique ι\ninst✝ : Semiring R\nf : ι →₀ R\n⊢ ↑(AddHom.toFun\n          {\n              toAddHom :=\n                { toFun := fun x => Finsupp.single default x,\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : R),\n                        Finsupp.single default (x + y) = Finsupp.single default x + Finsupp.single default y) },\n              map_smul' := (_ : ∀ (c x : R), Finsupp.single default (c * x) = c • Finsupp.single default x) }.toAddHom\n          ((fun f => ↑f default) f))\n      default =\n    ↑f default\n[PROOFSTEP]\nsimp\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R✝\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R✝ M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M\ni✝ : ι✝\nc : R✝\nx : M\nι : Type u_10\nR : Type u_11\ninst✝¹ : Unique ι\ninst✝ : Semiring R\ni : ι\n⊢ ↑(Basis.singleton ι R).repr 1 = Finsupp.single i 1\n[PROOFSTEP]\nsimp [Basis.singleton]\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R✝\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R✝ M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M\ni✝ : ι✝\nc : R✝\nx✝ : M\nι : Type u_10\nR : Type u_11\ninst✝¹ : Unique ι\ninst✝ : Semiring R\nx : R\ni : ι\n⊢ ↑(↑(Basis.singleton ι R).repr x) i = x\n[PROOFSTEP]\nsimp [Basis.singleton, Unique.eq_default i]\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc : R✝\nx : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\n⊢ Nonempty (Basis ι R M) ↔ ∃ x x_1, ∀ (y : M), ∃ r, r • x = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc : R✝\nx : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\n⊢ Nonempty (Basis ι R M) → ∃ x x_1, ∀ (y : M), ∃ r, r • x = y\n[PROOFSTEP]\nrintro ⟨b⟩\n[GOAL]\ncase mp.intro\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb✝ b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc : R✝\nx : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\nb : Basis ι R M\n⊢ ∃ x x_1, ∀ (y : M), ∃ r, r • x = y\n[PROOFSTEP]\nrefine' ⟨b default, b.linearIndependent.ne_zero _, _⟩\n[GOAL]\ncase mp.intro\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb✝ b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc : R✝\nx : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\nb : Basis ι R M\n⊢ ∀ (y : M), ∃ r, r • ↑b default = y\n[PROOFSTEP]\nsimpa [span_singleton_eq_top_iff, Set.range_unique] using b.span_eq\n[GOAL]\ncase mpr\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc : R✝\nx : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\n⊢ (∃ x x_1, ∀ (y : M), ∃ r, r • x = y) → Nonempty (Basis ι R M)\n[PROOFSTEP]\nrintro ⟨x, nz, w⟩\n[GOAL]\ncase mpr.intro.intro\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc : R✝\nx✝ : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\nx : M\nnz : x ≠ 0\nw : ∀ (y : M), ∃ r, r • x = y\n⊢ Nonempty (Basis ι R M)\n[PROOFSTEP]\nrefine\n  ⟨ofRepr <|\n      LinearEquiv.symm\n        { toFun := fun f => f default • x\n          invFun := fun y => Finsupp.single default (w y).choose\n          left_inv := fun f => Finsupp.unique_ext ?_\n          right_inv := fun y => ?_\n          map_add' := fun y z => ?_\n          map_smul' := fun c y => ?_ }⟩\n[GOAL]\ncase mpr.intro.intro.refine_1\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc : R✝\nx✝ : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\nx : M\nnz : x ≠ 0\nw : ∀ (y : M), ∃ r, r • x = y\ny z : ι →₀ R\n⊢ (fun f => ↑f default • x) (y + z) = (fun f => ↑f default • x) y + (fun f => ↑f default • x) z\n[PROOFSTEP]\nsimp [Finsupp.add_apply, add_smul]\n[GOAL]\ncase mpr.intro.intro.refine_2\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc✝ : R✝\nx✝ : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\nx : M\nnz : x ≠ 0\nw : ∀ (y : M), ∃ r, r • x = y\nc : R\ny : ι →₀ R\n⊢ AddHom.toFun\n      { toFun := fun f => ↑f default • x,\n        map_add' := (_ : ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) }\n      (c • y) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := fun f => ↑f default • x,\n          map_add' := (_ : ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) }\n        y\n[PROOFSTEP]\nsimp only [Finsupp.coe_smul, Pi.smul_apply, RingHom.id_apply]\n[GOAL]\ncase mpr.intro.intro.refine_2\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc✝ : R✝\nx✝ : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\nx : M\nnz : x ≠ 0\nw : ∀ (y : M), ∃ r, r • x = y\nc : R\ny : ι →₀ R\n⊢ (c • ↑y default) • x = c • ↑y default • x\n[PROOFSTEP]\nrw [← smul_assoc, smul_eq_mul]\n[GOAL]\ncase mpr.intro.intro.refine_3\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc : R✝\nx✝ : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\nx : M\nnz : x ≠ 0\nw : ∀ (y : M), ∃ r, r • x = y\nf : ι →₀ R\n⊢ ↑((fun y => Finsupp.single default (Exists.choose (_ : ∃ r, r • x = y)))\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f => ↑f default • x,\n                    map_add' :=\n                      (_ : ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) },\n                map_smul' :=\n                  (_ :\n                    ∀ (c : R) (y : ι →₀ R),\n                      AddHom.toFun\n                          { toFun := fun f => ↑f default • x,\n                            map_add' :=\n                              (_ : ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) }\n                          (c • y) =\n                        ↑(RingHom.id R) c •\n                          AddHom.toFun\n                            { toFun := fun f => ↑f default • x,\n                              map_add' :=\n                                (_ :\n                                  ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) }\n                            y) }.toAddHom\n            f))\n      default =\n    ↑f default\n[PROOFSTEP]\nrefine' smul_left_injective _ nz _\n[GOAL]\ncase mpr.intro.intro.refine_3\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc : R✝\nx✝ : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\nx : M\nnz : x ≠ 0\nw : ∀ (y : M), ∃ r, r • x = y\nf : ι →₀ R\n⊢ (fun c => c • x)\n      (↑((fun y => Finsupp.single default (Exists.choose (_ : ∃ r, r • x = y)))\n            (AddHom.toFun\n              {\n                  toAddHom :=\n                    { toFun := fun f => ↑f default • x,\n                      map_add' :=\n                        (_ : ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (c : R) (y : ι →₀ R),\n                        AddHom.toFun\n                            { toFun := fun f => ↑f default • x,\n                              map_add' :=\n                                (_ :\n                                  ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) }\n                            (c • y) =\n                          ↑(RingHom.id R) c •\n                            AddHom.toFun\n                              { toFun := fun f => ↑f default • x,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) }\n                              y) }.toAddHom\n              f))\n        default) =\n    (fun c => c • x) (↑f default)\n[PROOFSTEP]\nsimp only [Finsupp.single_eq_same]\n[GOAL]\ncase mpr.intro.intro.refine_3\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc : R✝\nx✝ : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\nx : M\nnz : x ≠ 0\nw : ∀ (y : M), ∃ r, r • x = y\nf : ι →₀ R\n⊢ Exists.choose\n        (_ :\n          ∃ r,\n            r • x =\n              AddHom.toFun\n                {\n                    toAddHom :=\n                      { toFun := fun f => ↑f default • x,\n                        map_add' :=\n                          (_ : ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (c : R) (y : ι →₀ R),\n                          AddHom.toFun\n                              { toFun := fun f => ↑f default • x,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) }\n                              (c • y) =\n                            ↑(RingHom.id R) c •\n                              AddHom.toFun\n                                { toFun := fun f => ↑f default • x,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (y z : ι →₀ R),\n                                        (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) }\n                                y) }.toAddHom\n                f) •\n      x =\n    ↑f default • x\n[PROOFSTEP]\nexact (w (f default • x)).choose_spec\n[GOAL]\ncase mpr.intro.intro.refine_4\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc : R✝\nx✝ : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\nx : M\nnz : x ≠ 0\nw : ∀ (y : M), ∃ r, r • x = y\ny : M\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f => ↑f default • x,\n              map_add' := (_ : ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) },\n          map_smul' :=\n            (_ :\n              ∀ (c : R) (y : ι →₀ R),\n                AddHom.toFun\n                    { toFun := fun f => ↑f default • x,\n                      map_add' :=\n                        (_ : ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) }\n                    (c • y) =\n                  ↑(RingHom.id R) c •\n                    AddHom.toFun\n                      { toFun := fun f => ↑f default • x,\n                        map_add' :=\n                          (_ : ∀ (y z : ι →₀ R), (↑y default + ↑z default) • x = ↑y default • x + ↑z default • x) }\n                      y) }.toAddHom\n      ((fun y => Finsupp.single default (Exists.choose (_ : ∃ r, r • x = y))) y) =\n    y\n[PROOFSTEP]\nsimp only [Finsupp.single_eq_same]\n[GOAL]\ncase mpr.intro.intro.refine_4\nι✝ : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM✝ : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R✝ M✝\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R✝ M'\nb b₁ : Basis ι✝ R✝ M✝\ni : ι✝\nc : R✝\nx✝ : M✝\nR : Type u_10\nM : Type u_11\ninst✝⁵ : Ring R\ninst✝⁴ : Nontrivial R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : NoZeroSMulDivisors R M\nι : Type u_12\ninst✝ : Unique ι\nx : M\nnz : x ≠ 0\nw : ∀ (y : M), ∃ r, r • x = y\ny : M\n⊢ Exists.choose (_ : ∃ r, r • x = y) • x = y\n[PROOFSTEP]\nexact (w y).choose_spec\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\ninst✝² : Fintype ι\nb✝ b : Basis ι R M\ninst✝¹ : Fintype R\ninst✝ : Fintype M\n⊢ card M = card R ^ card ι\n[PROOFSTEP]\nclassical calc\n  card M = card (ι → R) := card_congr b.equivFun.toEquiv\n  _ = card R ^ card ι := card_fun\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : Module R M'\ninst✝² : Fintype ι\nb✝ b : Basis ι R M\ninst✝¹ : Fintype R\ninst✝ : Fintype M\n⊢ card M = card R ^ card ι\n[PROOFSTEP]\ncalc\n  card M = card (ι → R) := card_congr b.equivFun.toEquiv\n  _ = card R ^ card ι := card_fun\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nx : ι → R\n⊢ ↑(LinearEquiv.symm (equivFun b)) x = ∑ i : ι, x i • ↑b i\n[PROOFSTEP]\nsimp [Basis.equivFun, Finsupp.total_apply, Finsupp.sum_fintype, Finsupp.equivFunOnFinite]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nu : M\n⊢ ∑ i : ι, ↑(equivFun b) u i • ↑b i = u\n[PROOFSTEP]\nconv_rhs => rw [← b.total_repr u]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nu : M\n| u\n[PROOFSTEP]\nrw [← b.total_repr u]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nu : M\n| u\n[PROOFSTEP]\nrw [← b.total_repr u]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nu : M\n| u\n[PROOFSTEP]\nrw [← b.total_repr u]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nu : M\n⊢ ∑ i : ι, ↑(equivFun b) u i • ↑b i = ↑(Finsupp.total ι M R ↑b) (↑b.repr u)\n[PROOFSTEP]\nsimp [Finsupp.total_apply, Finsupp.sum_fintype, b.equivFun_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\ninst✝¹ : Fintype ι\nb : Basis ι R M\ninst✝ : DecidableEq ι\ni j : ι\n⊢ ↑(equivFun b) (↑b i) j = if i = j then 1 else 0\n[PROOFSTEP]\nrw [b.equivFun_apply, b.repr_self_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nc : ι → R\n⊢ ↑(↑b.repr (∑ i : ι, c i • ↑b i)) = c\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nc : ι → R\nj : ι\n⊢ ↑(↑b.repr (∑ i : ι, c i • ↑b i)) j = c j\n[PROOFSTEP]\nsimp only [map_sum, LinearEquiv.map_smul, repr_self, Finsupp.smul_single, smul_eq_mul, mul_one, Finset.sum_apply']\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nc : ι → R\nj : ι\n⊢ ∑ x : ι, ↑(Finsupp.single x (c x)) j = c j\n[PROOFSTEP]\nrw [Finset.sum_eq_single j, Finsupp.single_eq_same]\n[GOAL]\ncase h.h₀\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nc : ι → R\nj : ι\n⊢ ∀ (b : ι), b ∈ Finset.univ → b ≠ j → ↑(Finsupp.single b (c b)) j = 0\n[PROOFSTEP]\nrintro i - hi\n[GOAL]\ncase h.h₀\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nc : ι → R\nj i : ι\nhi : i ≠ j\n⊢ ↑(Finsupp.single i (c i)) j = 0\n[PROOFSTEP]\nexact Finsupp.single_eq_of_ne hi\n[GOAL]\ncase h.h₁\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nc : ι → R\nj : ι\n⊢ ¬j ∈ Finset.univ → ↑(Finsupp.single j (c j)) j = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase h.h₁\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nc : ι → R\nj : ι\na✝ : ¬j ∈ Finset.univ\n⊢ ↑(Finsupp.single j (c j)) j = 0\n[PROOFSTEP]\nhave := Finset.mem_univ j\n[GOAL]\ncase h.h₁\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\nc : ι → R\nj : ι\na✝ : ¬j ∈ Finset.univ\nthis : j ∈ Finset.univ\n⊢ ↑(Finsupp.single j (c j)) j = 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid M'\ninst✝² : Module R M'\ninst✝¹ : Fintype ι\nb : Basis ι R M\ninst✝ : DecidableEq ι\ne : M ≃ₗ[R] ι → R\ni j : ι\n⊢ ↑e (↑(ofEquivFun e) i) j = ↑e (↑(LinearEquiv.symm e) (update 0 i 1)) j\n[PROOFSTEP]\nsimp [Basis.ofEquivFun, ← Finsupp.single_eq_pi_single, Finsupp.single_eq_update]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb v : Basis ι R M\n⊢ ofEquivFun (equivFun v) = v\n[PROOFSTEP]\nclassical\next j\nsimp only [Basis.equivFun_symm_apply, Basis.coe_ofEquivFun]\nsimp_rw [Function.update_apply, ite_smul]\nsimp only [Finset.mem_univ, if_true, Pi.zero_apply, one_smul, Finset.sum_ite_eq', zero_smul]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb v : Basis ι R M\n⊢ ofEquivFun (equivFun v) = v\n[PROOFSTEP]\next j\n[GOAL]\ncase a\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb v : Basis ι R M\nj : ι\n⊢ ↑(ofEquivFun (equivFun v)) j = ↑v j\n[PROOFSTEP]\nsimp only [Basis.equivFun_symm_apply, Basis.coe_ofEquivFun]\n[GOAL]\ncase a\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb v : Basis ι R M\nj : ι\n⊢ ∑ x : ι, update 0 j 1 x • ↑v x = ↑v j\n[PROOFSTEP]\nsimp_rw [Function.update_apply, ite_smul]\n[GOAL]\ncase a\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb v : Basis ι R M\nj : ι\n⊢ (∑ x : ι, if x = j then 1 • ↑v x else OfNat.ofNat 0 x • ↑v x) = ↑v j\n[PROOFSTEP]\nsimp only [Finset.mem_univ, if_true, Pi.zero_apply, one_smul, Finset.sum_ite_eq', zero_smul]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\ne : M ≃ₗ[R] ι → R\n⊢ equivFun (ofEquivFun e) = e\n[PROOFSTEP]\next j\n[GOAL]\ncase h.h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\ninst✝ : Fintype ι\nb : Basis ι R M\ne : M ≃ₗ[R] ι → R\nj : M\nx✝ : ι\n⊢ ↑(equivFun (ofEquivFun e)) j x✝ = ↑e j x✝\n[PROOFSTEP]\nsimp_rw [Basis.equivFun_apply, Basis.ofEquivFun_repr_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\ninst✝³ : Fintype ι\nb : Basis ι R M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nf : ι → M'\nx : M\n⊢ ↑(↑(constr b S) f) x = ∑ i : ι, ↑(equivFun b) x i • f i\n[PROOFSTEP]\nsimp [b.constr_apply, b.equivFun_apply, Finsupp.sum_fintype]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : Module R M'\ninst✝³ : Fintype ι\nb✝ : Basis ι R M\nS : Type u_10\ninst✝² : Semiring S\ninst✝¹ : Module S M'\ninst✝ : SMulCommClass R S M'\nP : Submodule R M\nb : Basis ι R { x // x ∈ P }\nx : M\nc : ι → R\n⊢ (x = Finsupp.sum (↑Finsupp.equivFunOnFinite.symm c) fun i x => x • ↑(↑b i)) ↔ x = ∑ i : ι, c i • ↑(↑b i)\n[PROOFSTEP]\nsimp [Finsupp.sum_fintype, Finsupp.equivFunOnFinite]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb : Basis ι R M\nb' : Basis ι' R M'\nf : M → M'\ng : M' → M\nhf : ∀ (i : ι), f (↑b i) ∈ range ↑b'\nhg : ∀ (i : ι'), g (↑b' i) ∈ range ↑b\nhgf : ∀ (i : ι), g (f (↑b i)) = ↑b i\nhfg : ∀ (i : ι'), f (g (↑b' i)) = ↑b' i\nsrc✝ : (fun x => M →ₗ[R] M') (f ∘ ↑b) := ↑(constr b R) (f ∘ ↑b)\ni : ι\ni' : ι'\nhi' : ↑b' i' = f (↑b i)\n⊢ ↑(LinearMap.comp (↑(constr b' R) (g ∘ ↑b')) (↑(constr b R) (f ∘ ↑b))) (↑b i) = ↑LinearMap.id (↑b i)\n[PROOFSTEP]\nrw [LinearMap.comp_apply, b.constr_basis, Function.comp_apply, ← hi', b'.constr_basis, Function.comp_apply, hi', hgf,\n  LinearMap.id_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nb : Basis ι R M\nb' : Basis ι' R M'\nf : M → M'\ng : M' → M\nhf : ∀ (i : ι), f (↑b i) ∈ range ↑b'\nhg : ∀ (i : ι'), g (↑b' i) ∈ range ↑b\nhgf : ∀ (i : ι), g (f (↑b i)) = ↑b i\nhfg : ∀ (i : ι'), f (g (↑b' i)) = ↑b' i\nsrc✝ : (fun x => M →ₗ[R] M') (f ∘ ↑b) := ↑(constr b R) (f ∘ ↑b)\ni : ι'\ni' : ι\nhi' : ↑b i' = g (↑b' i)\n⊢ ↑(LinearMap.comp (↑(constr b R) (f ∘ ↑b)) (↑(constr b' R) (g ∘ ↑b'))) (↑b' i) = ↑LinearMap.id (↑b' i)\n[PROOFSTEP]\nrw [LinearMap.comp_apply, b'.constr_basis, Function.comp_apply, ← hi', b.constr_basis, Function.comp_apply, hi', hfg,\n  LinearMap.id_apply]\n[GOAL]\nι : Type u_1\nι'✝ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb : Basis ι R M\nb'✝ : Basis ι'✝ R M'\nι' : Type u_10\ninst✝ : Fintype ι'\nb' : Basis ι' R M\nx : M\ni : ι\n⊢ ∑ j : ι', ↑(↑b.repr (↑b' j)) i * ↑(↑b'.repr x) j = ↑(↑b.repr x) i\n[PROOFSTEP]\nconv_rhs => rw [← b'.sum_repr x]\n[GOAL]\nι : Type u_1\nι'✝ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb : Basis ι R M\nb'✝ : Basis ι'✝ R M'\nι' : Type u_10\ninst✝ : Fintype ι'\nb' : Basis ι' R M\nx : M\ni : ι\n| ↑(↑b.repr x) i\n[PROOFSTEP]\nrw [← b'.sum_repr x]\n[GOAL]\nι : Type u_1\nι'✝ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb : Basis ι R M\nb'✝ : Basis ι'✝ R M'\nι' : Type u_10\ninst✝ : Fintype ι'\nb' : Basis ι' R M\nx : M\ni : ι\n| ↑(↑b.repr x) i\n[PROOFSTEP]\nrw [← b'.sum_repr x]\n[GOAL]\nι : Type u_1\nι'✝ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb : Basis ι R M\nb'✝ : Basis ι'✝ R M'\nι' : Type u_10\ninst✝ : Fintype ι'\nb' : Basis ι' R M\nx : M\ni : ι\n| ↑(↑b.repr x) i\n[PROOFSTEP]\nrw [← b'.sum_repr x]\n[GOAL]\nι : Type u_1\nι'✝ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb : Basis ι R M\nb'✝ : Basis ι'✝ R M'\nι' : Type u_10\ninst✝ : Fintype ι'\nb' : Basis ι' R M\nx : M\ni : ι\n⊢ ∑ j : ι', ↑(↑b.repr (↑b' j)) i * ↑(↑b'.repr x) j = ↑(↑b.repr (∑ i : ι', ↑(↑b'.repr x) i • ↑b' i)) i\n[PROOFSTEP]\nsimp_rw [LinearEquiv.map_sum, LinearEquiv.map_smul, Finset.sum_apply']\n[GOAL]\nι : Type u_1\nι'✝ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb : Basis ι R M\nb'✝ : Basis ι'✝ R M'\nι' : Type u_10\ninst✝ : Fintype ι'\nb' : Basis ι' R M\nx : M\ni : ι\n⊢ ∑ x_1 : ι', ↑(↑b.repr (↑b' x_1)) i * ↑(↑b'.repr x) x_1 = ∑ x_1 : ι', ↑(↑(↑b'.repr x) x_1 • ↑b.repr (↑b' x_1)) i\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun j _ => _\n[GOAL]\nι : Type u_1\nι'✝ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nb : Basis ι R M\nb'✝ : Basis ι'✝ R M'\nι' : Type u_10\ninst✝ : Fintype ι'\nb' : Basis ι' R M\nx : M\ni : ι\nj : ι'\nx✝ : j ∈ Finset.univ\n⊢ ↑(↑b.repr (↑b' j)) i * ↑(↑b'.repr x) j = ↑(↑(↑b'.repr x) j • ↑b.repr (↑b' j)) i\n[PROOFSTEP]\nrw [Finsupp.smul_apply, smul_eq_mul, mul_comm]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\n⊢ Set.range ↑b = w\n[PROOFSTEP]\napply le_antisymm h\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\n⊢ w ≤ Set.range ↑b\n[PROOFSTEP]\nintro x p\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx✝ y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\nx : M\np : x ∈ w\n⊢ x ∈ Set.range ↑b\n[PROOFSTEP]\nby_contra q\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx✝ y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\nx : M\np : x ∈ w\nq : ¬x ∈ Set.range ↑b\n⊢ False\n[PROOFSTEP]\nhave e := b.total_repr x\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx✝ y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\nx : M\np : x ∈ w\nq : ¬x ∈ Set.range ↑b\ne : ↑(Finsupp.total ι M R ↑b) (↑b.repr x) = x\n⊢ False\n[PROOFSTEP]\nlet u : ι ↪ w := ⟨fun i => ⟨b i, h ⟨i, rfl⟩⟩, fun i i' r => b.injective (by simpa only [Subtype.mk_eq_mk] using r)⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx✝ y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\nx : M\np : x ∈ w\nq : ¬x ∈ Set.range ↑b\ne : ↑(Finsupp.total ι M R ↑b) (↑b.repr x) = x\ni i' : ι\nr : (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i = (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i'\n⊢ ↑b i = ↑b i'\n[PROOFSTEP]\nsimpa only [Subtype.mk_eq_mk] using r\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx✝ y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\nx : M\np : x ∈ w\nq : ¬x ∈ Set.range ↑b\ne : ↑(Finsupp.total ι M R ↑b) (↑b.repr x) = x\nu : ι ↪ ↑w :=\n  { toFun := fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) },\n    inj' :=\n      (_ :\n        ∀ (i i' : ι),\n          (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i =\n              (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i' →\n            i = i') }\n⊢ False\n[PROOFSTEP]\nsimp_rw [Finsupp.total_apply] at e \n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx✝ y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\nx : M\np : x ∈ w\nq : ¬x ∈ Set.range ↑b\ne : (Finsupp.sum (↑b.repr x) fun i a => a • ↑b i) = x\nu : ι ↪ ↑w :=\n  { toFun := fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) },\n    inj' :=\n      (_ :\n        ∀ (i i' : ι),\n          (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i =\n              (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i' →\n            i = i') }\n⊢ False\n[PROOFSTEP]\nchange ((b.repr x).sum fun (i : ι) (a : R) ↦ a • (u i : M)) = ((⟨x, p⟩ : w) : M) at e \n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx✝ y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\nx : M\np : x ∈ w\nq : ¬x ∈ Set.range ↑b\nu : ι ↪ ↑w :=\n  { toFun := fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) },\n    inj' :=\n      (_ :\n        ∀ (i i' : ι),\n          (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i =\n              (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i' →\n            i = i') }\ne : (Finsupp.sum (↑b.repr x) fun i a => a • ↑(↑u i)) = ↑{ val := x, property := p }\n⊢ False\n[PROOFSTEP]\nrw [← Finsupp.sum_embDomain (f := u) (g := fun x r ↦ r • (x : M)), ← Finsupp.total_apply] at e \n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx✝ y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\nx : M\np : x ∈ w\nq : ¬x ∈ Set.range ↑b\nu : ι ↪ ↑w :=\n  { toFun := fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) },\n    inj' :=\n      (_ :\n        ∀ (i i' : ι),\n          (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i =\n              (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i' →\n            i = i') }\ne : ↑(Finsupp.total (↑w) M R fun x => ↑x) (Finsupp.embDomain u (↑b.repr x)) = ↑{ val := x, property := p }\n⊢ False\n[PROOFSTEP]\nrefine' hi.total_ne_of_not_mem_support _ _ e\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx✝ y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\nx : M\np : x ∈ w\nq : ¬x ∈ Set.range ↑b\nu : ι ↪ ↑w :=\n  { toFun := fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) },\n    inj' :=\n      (_ :\n        ∀ (i i' : ι),\n          (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i =\n              (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i' →\n            i = i') }\ne : ↑(Finsupp.total (↑w) M R fun x => ↑x) (Finsupp.embDomain u (↑b.repr x)) = ↑{ val := x, property := p }\n⊢ ¬{ val := x, property := p } ∈ (Finsupp.embDomain u (↑b.repr x)).support\n[PROOFSTEP]\nsimp only [Finset.mem_map, Finsupp.support_embDomain]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx✝ y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\nx : M\np : x ∈ w\nq : ¬x ∈ Set.range ↑b\nu : ι ↪ ↑w :=\n  { toFun := fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) },\n    inj' :=\n      (_ :\n        ∀ (i i' : ι),\n          (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i =\n              (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i' →\n            i = i') }\ne : ↑(Finsupp.total (↑w) M R fun x => ↑x) (Finsupp.embDomain u (↑b.repr x)) = ↑{ val := x, property := p }\n⊢ ¬∃ a,\n      a ∈ (↑b.repr x).support ∧\n        ↑{ toFun := fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) },\n                inj' :=\n                  (_ :\n                    ∀ (i i' : ι),\n                      (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i =\n                          (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i' →\n                        i = i') }\n            a =\n          { val := x, property := p }\n[PROOFSTEP]\nrintro ⟨j, -, W⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx✝ y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\nx : M\np : x ∈ w\nq : ¬x ∈ Set.range ↑b\nu : ι ↪ ↑w :=\n  { toFun := fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) },\n    inj' :=\n      (_ :\n        ∀ (i i' : ι),\n          (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i =\n              (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i' →\n            i = i') }\ne : ↑(Finsupp.total (↑w) M R fun x => ↑x) (Finsupp.embDomain u (↑b.repr x)) = ↑{ val := x, property := p }\nj : ι\nW :\n  ↑{ toFun := fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) },\n          inj' :=\n            (_ :\n              ∀ (i i' : ι),\n                (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i =\n                    (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i' →\n                  i = i') }\n      j =\n    { val := x, property := p }\n⊢ False\n[PROOFSTEP]\nsimp only [Embedding.coeFn_mk, Subtype.mk_eq_mk] at W \n[GOAL]\ncase intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx✝ y : M\nb✝ : Basis ι R M\ninst✝ : Nontrivial R\nb : Basis ι R M\nw : Set M\nhi : LinearIndependent R Subtype.val\nh : Set.range ↑b ≤ w\nx : M\np : x ∈ w\nq : ¬x ∈ Set.range ↑b\nu : ι ↪ ↑w :=\n  { toFun := fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) },\n    inj' :=\n      (_ :\n        ∀ (i i' : ι),\n          (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i =\n              (fun i => { val := ↑b i, property := (_ : ↑b i ∈ w) }) i' →\n            i = i') }\ne : ↑(Finsupp.total (↑w) M R fun x => ↑x) (Finsupp.embDomain u (↑b.repr x)) = ↑{ val := x, property := p }\nj : ι\nW : ↑b j = x\n⊢ False\n[PROOFSTEP]\napply q ⟨j, W⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nhsp : ⊤ ≤ span R (Set.range v)\ni : ι\n⊢ ↑(Finsupp.total ι M R v) (Finsupp.single i 1) = v i\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nhsp : ⊤ ≤ span R (Set.range v)\ni : ι\n⊢ ↑(↑(LinearIndependent.repr hli) { val := v i, property := (_ : v i ∈ ↑(span R (Set.range v))) }) i = 1\n[PROOFSTEP]\nsimp [hli.repr_eq_single i]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nhsp : ⊤ ≤ span R (Set.range v)\ni j : ι\nh : j ≠ i\n⊢ ↑(↑(LinearIndependent.repr hli) { val := v j, property := (_ : v j ∈ ↑(span R (Set.range v))) }) i = 0\n[PROOFSTEP]\nsimp [hli.repr_eq_single j, h]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nhsp : ⊤ ≤ span R (Set.range v)\ninst✝ : DecidableEq ι\ni j : ι\n⊢ ↑(coord (Basis.mk hli hsp) i) (v j) = if j = i then 1 else 0\n[PROOFSTEP]\ncases' eq_or_ne j i with h h\n[GOAL]\ncase inl\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nhsp : ⊤ ≤ span R (Set.range v)\ninst✝ : DecidableEq ι\ni j : ι\nh : j = i\n⊢ ↑(coord (Basis.mk hli hsp) i) (v j) = if j = i then 1 else 0\n[PROOFSTEP]\nsimp only [h, if_true, eq_self_iff_true, mk_coord_apply_eq i]\n[GOAL]\ncase inr\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nhsp : ⊤ ≤ span R (Set.range v)\ninst✝ : DecidableEq ι\ni j : ι\nh : j ≠ i\n⊢ ↑(coord (Basis.mk hli hsp) i) (v j) = if j = i then 1 else 0\n[PROOFSTEP]\nsimp only [h, if_false, mk_coord_apply_ne h]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nhli : LinearIndependent R v\n⊢ ⊤ ≤ span R (Set.range fun i => { val := v i, property := (_ : v i ∈ ↑(span R (Set.range v))) })\n[PROOFSTEP]\nintro x _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\n⊢ x ∈ span R (Set.range fun i => { val := v i, property := (_ : v i ∈ ↑(span R (Set.range v))) })\n[PROOFSTEP]\nhave : ∀ i, v i ∈ span R (range v) := fun i ↦ subset_span (Set.mem_range_self _)\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\n⊢ x ∈ span R (Set.range fun i => { val := v i, property := (_ : v i ∈ ↑(span R (Set.range v))) })\n[PROOFSTEP]\nhave h₁ : (((↑) : span R (range v) → M) '' range fun i => ⟨v i, this i⟩) = range v :=\n  by\n  simp only [SetLike.coe_sort_coe, ← Set.range_comp]\n  rfl\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\n⊢ (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\n[PROOFSTEP]\nsimp only [SetLike.coe_sort_coe, ← Set.range_comp]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\n⊢ Set.range (Subtype.val ∘ fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\nh₁ : (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\n⊢ x ∈ span R (Set.range fun i => { val := v i, property := (_ : v i ∈ ↑(span R (Set.range v))) })\n[PROOFSTEP]\nhave h₂ : map (Submodule.subtype (span R (range v))) (span R (range fun i => ⟨v i, this i⟩)) = span R (range v) :=\n  by\n  rw [← span_image, Submodule.coeSubtype]\n    -- Porting note: why doesn't `rw [h₁]` work here?\n  exact congr_arg _ h₁\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\nh₁ : (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\n⊢ map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })) =\n    span R (Set.range v)\n[PROOFSTEP]\nrw [← span_image, Submodule.coeSubtype]\n  -- Porting note: why doesn't `rw [h₁]` work here?\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\nh₁ : (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\n⊢ span R (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) =\n    span R (Set.range v)\n[PROOFSTEP]\nexact congr_arg _ h₁\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\nh₁ : (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\nh₂ :\n  map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })) =\n    span R (Set.range v)\n⊢ x ∈ span R (Set.range fun i => { val := v i, property := (_ : v i ∈ ↑(span R (Set.range v))) })\n[PROOFSTEP]\nhave h₃ : (x : M) ∈ map (Submodule.subtype (span R (range v))) (span R (Set.range fun i => Subtype.mk (v i) _)) :=\n  by\n  rw [h₂]\n  apply Subtype.mem x\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\nh₁ : (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\nh₂ :\n  map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })) =\n    span R (Set.range v)\n⊢ ↑x ∈\n    map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : ?m.886970 (v i)) }))\n[PROOFSTEP]\nrw [h₂]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\nh₁ : (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\nh₂ :\n  map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })) =\n    span R (Set.range v)\n⊢ ↑x ∈ span R (Set.range v)\n[PROOFSTEP]\napply Subtype.mem x\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\nh₁ : (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\nh₂ :\n  map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })) =\n    span R (Set.range v)\nh₃ :\n  ↑x ∈\n    map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }))\n⊢ x ∈ span R (Set.range fun i => { val := v i, property := (_ : v i ∈ ↑(span R (Set.range v))) })\n[PROOFSTEP]\nrcases mem_map.1 h₃ with ⟨y, hy₁, hy₂⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y✝ : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\nh₁ : (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\nh₂ :\n  map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })) =\n    span R (Set.range v)\nh₃ :\n  ↑x ∈\n    map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }))\ny : { x // x ∈ span R (Set.range v) }\nhy₁ : y ∈ span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })\nhy₂ : ↑(Submodule.subtype (span R (Set.range v))) y = ↑x\n⊢ x ∈ span R (Set.range fun i => { val := v i, property := (_ : v i ∈ ↑(span R (Set.range v))) })\n[PROOFSTEP]\nhave h_x_eq_y : x = y := by\n  rw [Subtype.ext_iff, ← hy₂]\n  simp\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y✝ : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\nh₁ : (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\nh₂ :\n  map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })) =\n    span R (Set.range v)\nh₃ :\n  ↑x ∈\n    map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }))\ny : { x // x ∈ span R (Set.range v) }\nhy₁ : y ∈ span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })\nhy₂ : ↑(Submodule.subtype (span R (Set.range v))) y = ↑x\n⊢ x = y\n[PROOFSTEP]\nrw [Subtype.ext_iff, ← hy₂]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y✝ : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\nh₁ : (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\nh₂ :\n  map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })) =\n    span R (Set.range v)\nh₃ :\n  ↑x ∈\n    map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }))\ny : { x // x ∈ span R (Set.range v) }\nhy₁ : y ∈ span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })\nhy₂ : ↑(Submodule.subtype (span R (Set.range v))) y = ↑x\n⊢ ↑(Submodule.subtype (span R (Set.range v))) y = ↑y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝ y✝ : M\nb : Basis ι R M\nhli : LinearIndependent R v\nx : { x // x ∈ span R (Set.range v) }\na✝ : x ∈ ⊤\nthis : ∀ (i : ι), v i ∈ span R (Set.range v)\nh₁ : (Subtype.val '' Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }) = Set.range v\nh₂ :\n  map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })) =\n    span R (Set.range v)\nh₃ :\n  ↑x ∈\n    map (Submodule.subtype (span R (Set.range v)))\n      (span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) }))\ny : { x // x ∈ span R (Set.range v) }\nhy₁ : y ∈ span R (Set.range fun i => { val := v i, property := (_ : v i ∈ span R (Set.range v)) })\nhy₂ : ↑(Submodule.subtype (span R (Set.range v))) y = ↑x\nh_x_eq_y : x = y\n⊢ x ∈ span R (Set.range fun i => { val := v i, property := (_ : v i ∈ ↑(span R (Set.range v))) })\n[PROOFSTEP]\nrwa [h_x_eq_y]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv✝ : ι → M\ninst✝¹² : Ring R\ninst✝¹¹ : CommRing R₂\ninst✝¹⁰ : AddCommGroup M\ninst✝⁹ : AddCommGroup M'\ninst✝⁸ : AddCommGroup M''\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nG : Type u_10\ninst✝³ : Group G\ninst✝² : DistribMulAction G R\ninst✝¹ : DistribMulAction G M\ninst✝ : IsScalarTower G R M\nv : ι → M\nhv : span R (Set.range v) = ⊤\nw : ι → G\n⊢ span R (Set.range (w • v)) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv✝ : ι → M\ninst✝¹² : Ring R\ninst✝¹¹ : CommRing R₂\ninst✝¹⁰ : AddCommGroup M\ninst✝⁹ : AddCommGroup M'\ninst✝⁸ : AddCommGroup M''\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nG : Type u_10\ninst✝³ : Group G\ninst✝² : DistribMulAction G R\ninst✝¹ : DistribMulAction G M\ninst✝ : IsScalarTower G R M\nv : ι → M\nhv : span R (Set.range v) = ⊤\nw : ι → G\n⊢ ⊤ ≤ span R (Set.range (w • v))\n[PROOFSTEP]\nintro j hj\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv✝ : ι → M\ninst✝¹² : Ring R\ninst✝¹¹ : CommRing R₂\ninst✝¹⁰ : AddCommGroup M\ninst✝⁹ : AddCommGroup M'\ninst✝⁸ : AddCommGroup M''\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nG : Type u_10\ninst✝³ : Group G\ninst✝² : DistribMulAction G R\ninst✝¹ : DistribMulAction G M\ninst✝ : IsScalarTower G R M\nv : ι → M\nhv : span R (Set.range v) = ⊤\nw : ι → G\nj : M\nhj : j ∈ ⊤\n⊢ j ∈ span R (Set.range (w • v))\n[PROOFSTEP]\nrw [← hv] at hj \n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv✝ : ι → M\ninst✝¹² : Ring R\ninst✝¹¹ : CommRing R₂\ninst✝¹⁰ : AddCommGroup M\ninst✝⁹ : AddCommGroup M'\ninst✝⁸ : AddCommGroup M''\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nG : Type u_10\ninst✝³ : Group G\ninst✝² : DistribMulAction G R\ninst✝¹ : DistribMulAction G M\ninst✝ : IsScalarTower G R M\nv : ι → M\nhv : span R (Set.range v) = ⊤\nw : ι → G\nj : M\nhj : j ∈ span R (Set.range v)\n⊢ j ∈ span R (Set.range (w • v))\n[PROOFSTEP]\nrw [Submodule.mem_span] at hj ⊢\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv✝ : ι → M\ninst✝¹² : Ring R\ninst✝¹¹ : CommRing R₂\ninst✝¹⁰ : AddCommGroup M\ninst✝⁹ : AddCommGroup M'\ninst✝⁸ : AddCommGroup M''\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nG : Type u_10\ninst✝³ : Group G\ninst✝² : DistribMulAction G R\ninst✝¹ : DistribMulAction G M\ninst✝ : IsScalarTower G R M\nv : ι → M\nhv : span R (Set.range v) = ⊤\nw : ι → G\nj : M\nhj : ∀ (p : Submodule R M), Set.range v ⊆ ↑p → j ∈ p\n⊢ ∀ (p : Submodule R M), Set.range (w • v) ⊆ ↑p → j ∈ p\n[PROOFSTEP]\nrefine' fun p hp => hj p fun u hu => _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv✝ : ι → M\ninst✝¹² : Ring R\ninst✝¹¹ : CommRing R₂\ninst✝¹⁰ : AddCommGroup M\ninst✝⁹ : AddCommGroup M'\ninst✝⁸ : AddCommGroup M''\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nG : Type u_10\ninst✝³ : Group G\ninst✝² : DistribMulAction G R\ninst✝¹ : DistribMulAction G M\ninst✝ : IsScalarTower G R M\nv : ι → M\nhv : span R (Set.range v) = ⊤\nw : ι → G\nj : M\nhj : ∀ (p : Submodule R M), Set.range v ⊆ ↑p → j ∈ p\np : Submodule R M\nhp : Set.range (w • v) ⊆ ↑p\nu : M\nhu : u ∈ Set.range v\n⊢ u ∈ ↑p\n[PROOFSTEP]\nobtain ⟨i, rfl⟩ := hu\n[GOAL]\ncase intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv✝ : ι → M\ninst✝¹² : Ring R\ninst✝¹¹ : CommRing R₂\ninst✝¹⁰ : AddCommGroup M\ninst✝⁹ : AddCommGroup M'\ninst✝⁸ : AddCommGroup M''\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nG : Type u_10\ninst✝³ : Group G\ninst✝² : DistribMulAction G R\ninst✝¹ : DistribMulAction G M\ninst✝ : IsScalarTower G R M\nv : ι → M\nhv : span R (Set.range v) = ⊤\nw : ι → G\nj : M\nhj : ∀ (p : Submodule R M), Set.range v ⊆ ↑p → j ∈ p\np : Submodule R M\nhp : Set.range (w • v) ⊆ ↑p\ni : ι\n⊢ v i ∈ ↑p\n[PROOFSTEP]\nhave : ((w i)⁻¹ • (1 : R)) • w i • v i ∈ p := p.smul_mem ((w i)⁻¹ • (1 : R)) (hp ⟨i, rfl⟩)\n[GOAL]\ncase intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv✝ : ι → M\ninst✝¹² : Ring R\ninst✝¹¹ : CommRing R₂\ninst✝¹⁰ : AddCommGroup M\ninst✝⁹ : AddCommGroup M'\ninst✝⁸ : AddCommGroup M''\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\nG : Type u_10\ninst✝³ : Group G\ninst✝² : DistribMulAction G R\ninst✝¹ : DistribMulAction G M\ninst✝ : IsScalarTower G R M\nv : ι → M\nhv : span R (Set.range v) = ⊤\nw : ι → G\nj : M\nhj : ∀ (p : Submodule R M), Set.range v ⊆ ↑p → j ∈ p\np : Submodule R M\nhp : Set.range (w • v) ⊆ ↑p\ni : ι\nthis : ((w i)⁻¹ • 1) • w i • v i ∈ p\n⊢ v i ∈ ↑p\n[PROOFSTEP]\nrwa [smul_one_smul, inv_smul_smul] at this \n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\ne : Basis ι R₂ M\nw : ι → R₂ˣ\ni : ι\n⊢ coord (unitsSMul e w) i = (w i)⁻¹ • coord e i\n[PROOFSTEP]\nclassical\napply e.ext\nintro j\ntrans ((unitsSMul e w).coord i) ((w j)⁻¹ • (unitsSMul e w) j)\n· congr\n  simp [Basis.unitsSMul, ← mul_smul]\nsimp only [Basis.coord_apply, LinearMap.smul_apply, Basis.repr_self, Units.smul_def, SMulHomClass.map_smul,\n  Finsupp.single_apply]\nsplit_ifs with h <;> simp [h]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\ne : Basis ι R₂ M\nw : ι → R₂ˣ\ni : ι\n⊢ coord (unitsSMul e w) i = (w i)⁻¹ • coord e i\n[PROOFSTEP]\napply e.ext\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\ne : Basis ι R₂ M\nw : ι → R₂ˣ\ni : ι\n⊢ ∀ (i_1 : ι), ↑(coord (unitsSMul e w) i) (↑e i_1) = ↑((w i)⁻¹ • coord e i) (↑e i_1)\n[PROOFSTEP]\nintro j\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\ne : Basis ι R₂ M\nw : ι → R₂ˣ\ni j : ι\n⊢ ↑(coord (unitsSMul e w) i) (↑e j) = ↑((w i)⁻¹ • coord e i) (↑e j)\n[PROOFSTEP]\ntrans ((unitsSMul e w).coord i) ((w j)⁻¹ • (unitsSMul e w) j)\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\ne : Basis ι R₂ M\nw : ι → R₂ˣ\ni j : ι\n⊢ ↑(coord (unitsSMul e w) i) (↑e j) = ↑(coord (unitsSMul e w) i) ((w j)⁻¹ • ↑(unitsSMul e w) j)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_6.h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\ne : Basis ι R₂ M\nw : ι → R₂ˣ\ni j : ι\n⊢ ↑e j = (w j)⁻¹ • ↑(unitsSMul e w) j\n[PROOFSTEP]\nsimp [Basis.unitsSMul, ← mul_smul]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\ne : Basis ι R₂ M\nw : ι → R₂ˣ\ni j : ι\n⊢ ↑(coord (unitsSMul e w) i) ((w j)⁻¹ • ↑(unitsSMul e w) j) = ↑((w i)⁻¹ • coord e i) (↑e j)\n[PROOFSTEP]\nsimp only [Basis.coord_apply, LinearMap.smul_apply, Basis.repr_self, Units.smul_def, SMulHomClass.map_smul,\n  Finsupp.single_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\ne : Basis ι R₂ M\nw : ι → R₂ˣ\ni j : ι\n⊢ ↑(↑(w j)⁻¹ • Finsupp.single j 1) i = ↑(w i)⁻¹ • if j = i then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\ne : Basis ι R₂ M\nw : ι → R₂ˣ\ni j : ι\nh : j = i\n⊢ ↑(↑(w j)⁻¹ • Finsupp.single j 1) i = ↑(w i)⁻¹ • 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y : M\nb : Basis ι R M\ne : Basis ι R₂ M\nw : ι → R₂ˣ\ni j : ι\nh : ¬j = i\n⊢ ↑(↑(w j)⁻¹ • Finsupp.single j 1) i = ↑(w i)⁻¹ • 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y✝ : M\nb✝ : Basis ι R M\nn : ℕ\nN : Submodule R M\ny : M\nb : Basis (Fin n) R { x // x ∈ N }\nhli : ∀ (c : R) (x : M), x ∈ N → c • y + x = 0 → c = 0\nhsp : ∀ (z : M), ∃ c, z + c • y ∈ N\n⊢ span R (Set.range (↑(Submodule.subtype N) ∘ ↑b)) = N\n[PROOFSTEP]\nrw [Set.range_comp, Submodule.span_image, b.span_eq, Submodule.map_subtype_top]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y✝ : M\nb✝ : Basis ι R M\nn : ℕ\nN : Submodule R M\ny : M\nb : Basis (Fin n) R { x // x ∈ N }\nhli : ∀ (c : R) (x : M), x ∈ N → c • y + x = 0 → c = 0\nhsp : ∀ (z : M), ∃ c, z + c • y ∈ N\nspan_b : span R (Set.range (↑(Submodule.subtype N) ∘ ↑b)) = N\n⊢ ∀ (c : R) (y_1 : { x // x ∈ span R (Set.range (↑(Submodule.subtype N) ∘ ↑b)) }), c • y + ↑y_1 = 0 → c = 0\n[PROOFSTEP]\nrintro c ⟨x, hx⟩ hc\n[GOAL]\ncase mk\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc✝ d : R\nx✝ y✝ : M\nb✝ : Basis ι R M\nn : ℕ\nN : Submodule R M\ny : M\nb : Basis (Fin n) R { x // x ∈ N }\nhli : ∀ (c : R) (x : M), x ∈ N → c • y + x = 0 → c = 0\nhsp : ∀ (z : M), ∃ c, z + c • y ∈ N\nspan_b : span R (Set.range (↑(Submodule.subtype N) ∘ ↑b)) = N\nc : R\nx : M\nhx : x ∈ span R (Set.range (↑(Submodule.subtype N) ∘ ↑b))\nhc : c • y + ↑{ val := x, property := hx } = 0\n⊢ c = 0\n[PROOFSTEP]\nrw [span_b] at hx \n[GOAL]\ncase mk\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc✝ d : R\nx✝ y✝ : M\nb✝ : Basis ι R M\nn : ℕ\nN : Submodule R M\ny : M\nb : Basis (Fin n) R { x // x ∈ N }\nhli : ∀ (c : R) (x : M), x ∈ N → c • y + x = 0 → c = 0\nhsp : ∀ (z : M), ∃ c, z + c • y ∈ N\nspan_b : span R (Set.range (↑(Submodule.subtype N) ∘ ↑b)) = N\nc : R\nx : M\nhx✝ : x ∈ span R (Set.range (↑(Submodule.subtype N) ∘ ↑b))\nhx : x ∈ N\nhc : c • y + ↑{ val := x, property := hx✝ } = 0\n⊢ c = 0\n[PROOFSTEP]\nexact hli c x hx hc\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝¹ y✝ : M\nb✝ : Basis ι R M\nn : ℕ\nN : Submodule R M\ny : M\nb : Basis (Fin n) R { x // x ∈ N }\nhli : ∀ (c : R) (x : M), x ∈ N → c • y + x = 0 → c = 0\nhsp : ∀ (z : M), ∃ c, z + c • y ∈ N\nspan_b : span R (Set.range (↑(Submodule.subtype N) ∘ ↑b)) = N\nx : M\nx✝ : x ∈ ⊤\n⊢ x ∈ span R (Set.range (Fin.cons y (↑(Submodule.subtype N) ∘ ↑b)))\n[PROOFSTEP]\nrw [Fin.range_cons, Submodule.mem_span_insert', span_b]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx✝¹ y✝ : M\nb✝ : Basis ι R M\nn : ℕ\nN : Submodule R M\ny : M\nb : Basis (Fin n) R { x // x ∈ N }\nhli : ∀ (c : R) (x : M), x ∈ N → c • y + x = 0 → c = 0\nhsp : ∀ (z : M), ∃ c, z + c • y ∈ N\nspan_b : span R (Set.range (↑(Submodule.subtype N) ∘ ↑b)) = N\nx : M\nx✝ : x ∈ ⊤\n⊢ ∃ a, x + a • y ∈ N\n[PROOFSTEP]\nexact hsp x\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y✝ : M\nb✝ : Basis ι R M\nn : ℕ\nN : Submodule R M\ny : M\nb : Basis (Fin n) R { x // x ∈ N }\nhli : ∀ (c : R) (x : M), x ∈ N → c • y + x = 0 → c = 0\nhsp : ∀ (z : M), ∃ c, z + c • y ∈ N\n⊢ ↑(mkFinCons y b hli hsp) = Fin.cons y (Subtype.val ∘ ↑b)\n[PROOFSTEP]\nunfold mkFinCons\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁸ : Ring R\ninst✝⁷ : CommRing R₂\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R₂ M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\nc d : R\nx y✝ : M\nb✝ : Basis ι R M\nn : ℕ\nN : Submodule R M\ny : M\nb : Basis (Fin n) R { x // x ∈ N }\nhli : ∀ (c : R) (x : M), x ∈ N → c • y + x = 0 → c = 0\nhsp : ∀ (z : M), ∃ c, z + c • y ∈ N\n⊢ ↑(let_fun span_b := (_ : span R (Set.range (↑(Submodule.subtype N) ∘ ↑b)) = N);\n      Basis.mk (_ : LinearIndependent R (Fin.cons y (↑(Submodule.subtype N) ∘ ↑b)))\n        (_ : ∀ (x : M), x ∈ ⊤ → x ∈ span R (Set.range (Fin.cons y (↑(Submodule.subtype N) ∘ ↑b))))) =\n    Fin.cons y (Subtype.val ∘ ↑b)\n[PROOFSTEP]\nexact coe_mk (v := Fin.cons y (N.subtype ∘ b)) _ _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R✝\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R✝ M\ninst✝³ : Module R₂ M\ninst✝² : Module R✝ M'\ninst✝¹ : Module R✝ M''\nc d : R✝\nx y : M\nb : Basis ι R✝ M\nR : Type u_10\ninst✝ : Semiring R\n⊢ ↑(Basis.finTwoProd R) 0 = (1, 0)\n[PROOFSTEP]\nsimp [Basis.finTwoProd, LinearEquiv.finTwoArrow]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR✝ : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nv : ι → M\ninst✝⁹ : Ring R✝\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R✝ M\ninst✝³ : Module R₂ M\ninst✝² : Module R✝ M'\ninst✝¹ : Module R✝ M''\nc d : R✝\nx y : M\nb : Basis ι R✝ M\nR : Type u_10\ninst✝ : Semiring R\n⊢ ↑(Basis.finTwoProd R) 1 = (0, 1)\n[PROOFSTEP]\nsimp [Basis.finTwoProd, LinearEquiv.finTwoArrow]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn : ℕ\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n\n⊢ P N\n[PROOFSTEP]\nhaveI : DecidableEq M := Classical.decEq M\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn : ℕ\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n\nthis : DecidableEq M\n⊢ P N\n[PROOFSTEP]\nhave Pbot : P ⊥ := by\n  apply ih\n  intro N _ x x_mem x_ortho\n  exfalso\n  rw [mem_bot] at x_mem \n  simpa [x_mem] using x_ortho 1 0 N.zero_mem\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn : ℕ\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n\nthis : DecidableEq M\n⊢ P ⊥\n[PROOFSTEP]\napply ih\n[GOAL]\ncase a\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn : ℕ\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n\nthis : DecidableEq M\n⊢ (N' : Submodule R M) → N' ≤ ⊥ → (x : M) → x ∈ ⊥ → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N'\n[PROOFSTEP]\nintro N _ x x_mem x_ortho\n[GOAL]\ncase a\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn : ℕ\nN✝ : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n\nthis : DecidableEq M\nN : Submodule R M\na✝ : N ≤ ⊥\nx : M\nx_mem : x ∈ ⊥\nx_ortho : ∀ (c : R) (y : M), y ∈ N → c • x + y = 0 → c = 0\n⊢ P N\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase a.h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn : ℕ\nN✝ : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n\nthis : DecidableEq M\nN : Submodule R M\na✝ : N ≤ ⊥\nx : M\nx_mem : x ∈ ⊥\nx_ortho : ∀ (c : R) (y : M), y ∈ N → c • x + y = 0 → c = 0\n⊢ False\n[PROOFSTEP]\nrw [mem_bot] at x_mem \n[GOAL]\ncase a.h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn : ℕ\nN✝ : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n\nthis : DecidableEq M\nN : Submodule R M\na✝ : N ≤ ⊥\nx : M\nx_mem : x = 0\nx_ortho : ∀ (c : R) (y : M), y ∈ N → c • x + y = 0 → c = 0\n⊢ False\n[PROOFSTEP]\nsimpa [x_mem] using x_ortho 1 0 N.zero_mem\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn : ℕ\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n\nthis : DecidableEq M\nPbot : P ⊥\n⊢ P N\n[PROOFSTEP]\ninduction' n with n rank_ih generalizing N\n[GOAL]\ncase zero\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n\nthis : DecidableEq M\nPbot : P ⊥\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.zero\n⊢ P N\n[PROOFSTEP]\nsuffices N = ⊥ by rwa [this]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n\nthis✝ : DecidableEq M\nPbot : P ⊥\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.zero\nthis : N = ⊥\n⊢ P N\n[PROOFSTEP]\nrwa [this]\n[GOAL]\ncase zero\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n\nthis : DecidableEq M\nPbot : P ⊥\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.zero\n⊢ N = ⊥\n[PROOFSTEP]\napply Basis.eq_bot_of_rank_eq_zero b _ fun m hv => le_zero_iff.mp (rank_le _ hv)\n[GOAL]\ncase succ\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\n⊢ P N\n[PROOFSTEP]\napply ih\n[GOAL]\ncase succ.a\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\n⊢ (N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N'\n[PROOFSTEP]\nintro N' N'_le x x_mem x_ortho\n[GOAL]\ncase succ.a\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\nN' : Submodule R M\nN'_le : N' ≤ N\nx : M\nx_mem : x ∈ N\nx_ortho : ∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0\n⊢ P N'\n[PROOFSTEP]\napply rank_ih\n[GOAL]\ncase succ.a.rank_le\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\nN' : Submodule R M\nN'_le : N' ≤ N\nx : M\nx_mem : x ∈ N\nx_ortho : ∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0\n⊢ ∀ {m : ℕ} (v : Fin m → { x // x ∈ N' }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n\n[PROOFSTEP]\nintro m v hli\n[GOAL]\ncase succ.a.rank_le\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\nN' : Submodule R M\nN'_le : N' ≤ N\nx : M\nx_mem : x ∈ N\nx_ortho : ∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0\nm : ℕ\nv : Fin m → { x // x ∈ N' }\nhli : LinearIndependent R (Subtype.val ∘ v)\n⊢ m ≤ n\n[PROOFSTEP]\nrefine' Nat.succ_le_succ_iff.mp (rank_le (Fin.cons ⟨x, x_mem⟩ fun i => ⟨v i, N'_le (v i).2⟩) _)\n[GOAL]\ncase succ.a.rank_le\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\nN' : Submodule R M\nN'_le : N' ≤ N\nx : M\nx_mem : x ∈ N\nx_ortho : ∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0\nm : ℕ\nv : Fin m → { x // x ∈ N' }\nhli : LinearIndependent R (Subtype.val ∘ v)\n⊢ LinearIndependent R\n    (Subtype.val ∘ Fin.cons { val := x, property := x_mem } fun i => { val := ↑(v i), property := (_ : ↑(v i) ∈ ?N) })\n[PROOFSTEP]\nconvert hli.fin_cons' x _ ?_\n[GOAL]\ncase h.e'_4\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\nN' : Submodule R M\nN'_le : N' ≤ N\nx : M\nx_mem : x ∈ N\nx_ortho : ∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0\nm : ℕ\nv : Fin m → { x // x ∈ N' }\nhli : LinearIndependent R (Subtype.val ∘ v)\n⊢ (Subtype.val ∘ Fin.cons { val := x, property := x_mem } fun i => { val := ↑(v i), property := (_ : ↑(v i) ∈ ?N) }) =\n    Fin.cons x (Subtype.val ∘ v)\n[PROOFSTEP]\next i\n[GOAL]\ncase h.e'_4.h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\nN' : Submodule R M\nN'_le : N' ≤ N\nx : M\nx_mem : x ∈ N\nx_ortho : ∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0\nm : ℕ\nv : Fin m → { x // x ∈ N' }\nhli : LinearIndependent R (Subtype.val ∘ v)\ni : Fin (Nat.succ m)\n⊢ (Subtype.val ∘ Fin.cons { val := x, property := x_mem } fun i => { val := ↑(v i), property := (_ : ↑(v i) ∈ ?N) }) i =\n    Fin.cons x (Subtype.val ∘ v) i\n[PROOFSTEP]\nrefine' Fin.cases _ _ i\n[GOAL]\ncase h.e'_4.h.refine'_1\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\nN' : Submodule R M\nN'_le : N' ≤ N\nx : M\nx_mem : x ∈ N\nx_ortho : ∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0\nm : ℕ\nv : Fin m → { x // x ∈ N' }\nhli : LinearIndependent R (Subtype.val ∘ v)\ni : Fin (Nat.succ m)\n⊢ (Subtype.val ∘ Fin.cons { val := x, property := x_mem } fun i => { val := ↑(v i), property := (_ : ↑(v i) ∈ ?N) }) 0 =\n    Fin.cons x (Subtype.val ∘ v) 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_4.h.refine'_2\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\nN' : Submodule R M\nN'_le : N' ≤ N\nx : M\nx_mem : x ∈ N\nx_ortho : ∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0\nm : ℕ\nv : Fin m → { x // x ∈ N' }\nhli : LinearIndependent R (Subtype.val ∘ v)\ni : Fin (Nat.succ m)\n⊢ ∀ (i : Fin m),\n    (Subtype.val ∘ Fin.cons { val := x, property := x_mem } fun i => { val := ↑(v i), property := (_ : ↑(v i) ∈ ?N) })\n        (Fin.succ i) =\n      Fin.cons x (Subtype.val ∘ v) (Fin.succ i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.a.rank_le\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\nN' : Submodule R M\nN'_le : N' ≤ N\nx : M\nx_mem : x ∈ N\nx_ortho : ∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0\nm : ℕ\nv : Fin m → { x // x ∈ N' }\nhli : LinearIndependent R (Subtype.val ∘ v)\n⊢ ∀ (c : R) (y : { x // x ∈ span R (range (Subtype.val ∘ v)) }), c • x + ↑y = 0 → c = 0\n[PROOFSTEP]\nintro c y hcy\n[GOAL]\ncase succ.a.rank_le\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\nN' : Submodule R M\nN'_le : N' ≤ N\nx : M\nx_mem : x ∈ N\nx_ortho : ∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0\nm : ℕ\nv : Fin m → { x // x ∈ N' }\nhli : LinearIndependent R (Subtype.val ∘ v)\nc : R\ny : { x // x ∈ span R (range (Subtype.val ∘ v)) }\nhcy : c • x + ↑y = 0\n⊢ c = 0\n[PROOFSTEP]\nrefine' x_ortho c y (Submodule.span_le.mpr _ y.2) hcy\n[GOAL]\ncase succ.a.rank_le\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\nN' : Submodule R M\nN'_le : N' ≤ N\nx : M\nx_mem : x ∈ N\nx_ortho : ∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0\nm : ℕ\nv : Fin m → { x // x ∈ N' }\nhli : LinearIndependent R (Subtype.val ∘ v)\nc : R\ny : { x // x ∈ span R (range (Subtype.val ∘ v)) }\nhcy : c • x + ↑y = 0\n⊢ range (Subtype.val ∘ v) ⊆ ↑N'\n[PROOFSTEP]\nrintro _ ⟨z, rfl⟩\n[GOAL]\ncase succ.a.rank_le.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\ninst✝³ : Ring R\ninst✝² : IsDomain R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nb✝ : ι → M\nb : Basis ι R M\nP : Submodule R M → Sort u_10\nih :\n  (N : Submodule R M) →\n    ((N' : Submodule R M) → N' ≤ N → (x : M) → x ∈ N → (∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0) → P N') → P N\nn✝ : ℕ\nN✝ : Submodule R M\nrank_le✝ : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N✝ }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n✝\nthis : DecidableEq M\nPbot : P ⊥\nn : ℕ\nrank_ih :\n  (N : Submodule R M) → (∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ n) → P N\nN : Submodule R M\nrank_le : ∀ {m : ℕ} (v : Fin m → { x // x ∈ N }), LinearIndependent R (Subtype.val ∘ v) → m ≤ Nat.succ n\nN' : Submodule R M\nN'_le : N' ≤ N\nx : M\nx_mem : x ∈ N\nx_ortho : ∀ (c : R) (y : M), y ∈ N' → c • x + y = 0 → c = 0\nm : ℕ\nv : Fin m → { x // x ∈ N' }\nhli : LinearIndependent R (Subtype.val ∘ v)\nc : R\ny : { x // x ∈ span R (range (Subtype.val ∘ v)) }\nhcy : c • x + ↑y = 0\nz : Fin m\n⊢ (Subtype.val ∘ v) z ∈ ↑N'\n[PROOFSTEP]\nexact (v z).2\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nS : Type u_10\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Nontrivial S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Algebra R S\ninst✝³ : Module S M\ninst✝² : Module R M\ninst✝¹ : IsScalarTower R S M\ninst✝ : NoZeroSMulDivisors R S\nb : Basis ι S M\ni : ι\n⊢ ↑(↑(restrictScalars R b) i) = ↑b i\n[PROOFSTEP]\nsimp only [Basis.restrictScalars, Basis.span_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nS : Type u_10\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Nontrivial S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Algebra R S\ninst✝³ : Module S M\ninst✝² : Module R M\ninst✝¹ : IsScalarTower R S M\ninst✝ : NoZeroSMulDivisors R S\nb : Basis ι S M\nm : { x // x ∈ span R (range ↑b) }\ni : ι\n⊢ ↑(algebraMap R S) (↑(↑(restrictScalars R b).repr m) i) = ↑(↑b.repr ↑m) i\n[PROOFSTEP]\nsuffices\n  Finsupp.mapRange.linearMap (Algebra.linearMap R S) ∘ₗ (b.restrictScalars R).repr.toLinearMap =\n    ((b.repr : M →ₗ[S] ι →₀ S).restrictScalars R).domRestrict _\n  by exact FunLike.congr_fun (LinearMap.congr_fun this m) i\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nS : Type u_10\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Nontrivial S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Algebra R S\ninst✝³ : Module S M\ninst✝² : Module R M\ninst✝¹ : IsScalarTower R S M\ninst✝ : NoZeroSMulDivisors R S\nb : Basis ι S M\nm : { x // x ∈ span R (range ↑b) }\ni : ι\nthis :\n  LinearMap.comp (Finsupp.mapRange.linearMap (Algebra.linearMap R S)) ↑(restrictScalars R b).repr =\n    LinearMap.domRestrict (↑R ↑b.repr) (span R (range ↑b))\n⊢ ↑(algebraMap R S) (↑(↑(restrictScalars R b).repr m) i) = ↑(↑b.repr ↑m) i\n[PROOFSTEP]\nexact FunLike.congr_fun (LinearMap.congr_fun this m) i\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nS : Type u_10\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Nontrivial S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Algebra R S\ninst✝³ : Module S M\ninst✝² : Module R M\ninst✝¹ : IsScalarTower R S M\ninst✝ : NoZeroSMulDivisors R S\nb : Basis ι S M\nm : { x // x ∈ span R (range ↑b) }\ni : ι\n⊢ LinearMap.comp (Finsupp.mapRange.linearMap (Algebra.linearMap R S)) ↑(restrictScalars R b).repr =\n    LinearMap.domRestrict (↑R ↑b.repr) (span R (range ↑b))\n[PROOFSTEP]\nrefine Basis.ext (b.restrictScalars R) fun _ => ?_\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nS : Type u_10\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Nontrivial S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Algebra R S\ninst✝³ : Module S M\ninst✝² : Module R M\ninst✝¹ : IsScalarTower R S M\ninst✝ : NoZeroSMulDivisors R S\nb : Basis ι S M\nm : { x // x ∈ span R (range ↑b) }\ni x✝ : ι\n⊢ ↑(LinearMap.comp (Finsupp.mapRange.linearMap (Algebra.linearMap R S)) ↑(restrictScalars R b).repr)\n      (↑(restrictScalars R b) x✝) =\n    ↑(LinearMap.domRestrict (↑R ↑b.repr) (span R (range ↑b))) (↑(restrictScalars R b) x✝)\n[PROOFSTEP]\nsimp only [LinearMap.coe_comp, LinearEquiv.coe_toLinearMap, Function.comp_apply, map_one, Basis.repr_self,\n  Finsupp.mapRange.linearMap_apply, Finsupp.mapRange_single, Algebra.linearMap_apply, LinearMap.domRestrict_apply,\n  LinearEquiv.coe_coe, Basis.restrictScalars_apply, LinearMap.coe_restrictScalars]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nS : Type u_10\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Nontrivial S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Algebra R S\ninst✝³ : Module S M\ninst✝² : Module R M\ninst✝¹ : IsScalarTower R S M\ninst✝ : NoZeroSMulDivisors R S\nb : Basis ι S M\nm : M\n⊢ m ∈ span R (range ↑b) ↔ ∀ (i : ι), ↑(↑b.repr m) i ∈ range ↑(algebraMap R S)\n[PROOFSTEP]\nrefine ⟨fun hm i => ⟨(b.restrictScalars R).repr ⟨m, hm⟩ i, b.restrictScalars_repr_apply R ⟨m, hm⟩ i⟩, fun h => ?_⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nS : Type u_10\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Nontrivial S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Algebra R S\ninst✝³ : Module S M\ninst✝² : Module R M\ninst✝¹ : IsScalarTower R S M\ninst✝ : NoZeroSMulDivisors R S\nb : Basis ι S M\nm : M\nh : ∀ (i : ι), ↑(↑b.repr m) i ∈ range ↑(algebraMap R S)\n⊢ m ∈ span R (range ↑b)\n[PROOFSTEP]\nrw [← b.total_repr m, Finsupp.total_apply S _]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nS : Type u_10\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Nontrivial S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Algebra R S\ninst✝³ : Module S M\ninst✝² : Module R M\ninst✝¹ : IsScalarTower R S M\ninst✝ : NoZeroSMulDivisors R S\nb : Basis ι S M\nm : M\nh : ∀ (i : ι), ↑(↑b.repr m) i ∈ range ↑(algebraMap R S)\n⊢ (Finsupp.sum (↑b.repr m) fun i a => a • ↑b i) ∈ span R (range ↑b)\n[PROOFSTEP]\nrefine sum_mem fun i _ => ?_\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nS : Type u_10\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Nontrivial S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Algebra R S\ninst✝³ : Module S M\ninst✝² : Module R M\ninst✝¹ : IsScalarTower R S M\ninst✝ : NoZeroSMulDivisors R S\nb : Basis ι S M\nm : M\nh : ∀ (i : ι), ↑(↑b.repr m) i ∈ range ↑(algebraMap R S)\ni : ι\nx✝ : i ∈ (↑b.repr m).support\n⊢ (fun i a => a • ↑b i) i (↑(↑b.repr m) i) ∈ span R (range ↑b)\n[PROOFSTEP]\nobtain ⟨_, h⟩ := h i\n[GOAL]\ncase intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nS : Type u_10\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Nontrivial S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Algebra R S\ninst✝³ : Module S M\ninst✝² : Module R M\ninst✝¹ : IsScalarTower R S M\ninst✝ : NoZeroSMulDivisors R S\nb : Basis ι S M\nm : M\nh✝ : ∀ (i : ι), ↑(↑b.repr m) i ∈ range ↑(algebraMap R S)\ni : ι\nx✝ : i ∈ (↑b.repr m).support\nw✝ : R\nh : ↑(algebraMap R S) w✝ = ↑(↑b.repr m) i\n⊢ (fun i a => a • ↑b i) i (↑(↑b.repr m) i) ∈ span R (range ↑b)\n[PROOFSTEP]\nsimp_rw [← h, algebraMap_smul]\n[GOAL]\ncase intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\nR₂ : Type u_4\nK : Type u_5\nM : Type u_6\nM' : Type u_7\nM'' : Type u_8\nV : Type u\nV' : Type u_9\nS : Type u_10\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Nontrivial S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Algebra R S\ninst✝³ : Module S M\ninst✝² : Module R M\ninst✝¹ : IsScalarTower R S M\ninst✝ : NoZeroSMulDivisors R S\nb : Basis ι S M\nm : M\nh✝ : ∀ (i : ι), ↑(↑b.repr m) i ∈ range ↑(algebraMap R S)\ni : ι\nx✝ : i ∈ (↑b.repr m).support\nw✝ : R\nh : ↑(algebraMap R S) w✝ = ↑(↑b.repr m) i\n⊢ w✝ • ↑b i ∈ span R (range ↑b)\n[PROOFSTEP]\nexact smul_mem _ _ (subset_span (Set.mem_range_self i))\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Basis", "llama_tokens": 115225, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6477982315512489, "lm_q2_score": 0.588889130767832, "lm_q1q2_score": 0.38148133749115376}}
{"text": "[GOAL]\nx : ℝ\nh₁ : x ≠ -1\nh₂ : x ≠ 1\n⊢ HasStrictDerivAt arcsin (1 / sqrt (1 - x ^ 2)) x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\ncases' h₁.lt_or_lt with h₁ h₁\n[GOAL]\ncase inl\nx : ℝ\nh₁✝ : x ≠ -1\nh₂ : x ≠ 1\nh₁ : x < -1\n⊢ HasStrictDerivAt arcsin (1 / sqrt (1 - x ^ 2)) x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\nhave : 1 - x ^ 2 < 0 := by nlinarith [h₁]\n[GOAL]\nx : ℝ\nh₁✝ : x ≠ -1\nh₂ : x ≠ 1\nh₁ : x < -1\n⊢ 1 - x ^ 2 < 0\n[PROOFSTEP]\nnlinarith [h₁]\n[GOAL]\ncase inl\nx : ℝ\nh₁✝ : x ≠ -1\nh₂ : x ≠ 1\nh₁ : x < -1\nthis : 1 - x ^ 2 < 0\n⊢ HasStrictDerivAt arcsin (1 / sqrt (1 - x ^ 2)) x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\nrw [sqrt_eq_zero'.2 this.le, div_zero]\n[GOAL]\ncase inl\nx : ℝ\nh₁✝ : x ≠ -1\nh₂ : x ≠ 1\nh₁ : x < -1\nthis : 1 - x ^ 2 < 0\n⊢ HasStrictDerivAt arcsin 0 x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\nhave : arcsin =ᶠ[𝓝 x] fun _ => -(π / 2) := (gt_mem_nhds h₁).mono fun y hy => arcsin_of_le_neg_one hy.le\n[GOAL]\ncase inl\nx : ℝ\nh₁✝ : x ≠ -1\nh₂ : x ≠ 1\nh₁ : x < -1\nthis✝ : 1 - x ^ 2 < 0\nthis : arcsin =ᶠ[𝓝 x] fun x => -(π / 2)\n⊢ HasStrictDerivAt arcsin 0 x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\nexact ⟨(hasStrictDerivAt_const _ _).congr_of_eventuallyEq this.symm, contDiffAt_const.congr_of_eventuallyEq this⟩\n[GOAL]\ncase inr\nx : ℝ\nh₁✝ : x ≠ -1\nh₂ : x ≠ 1\nh₁ : -1 < x\n⊢ HasStrictDerivAt arcsin (1 / sqrt (1 - x ^ 2)) x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\ncases' h₂.lt_or_lt with h₂ h₂\n[GOAL]\ncase inr.inl\nx : ℝ\nh₁✝ : x ≠ -1\nh₂✝ : x ≠ 1\nh₁ : -1 < x\nh₂ : x < 1\n⊢ HasStrictDerivAt arcsin (1 / sqrt (1 - x ^ 2)) x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\nhave : 0 < sqrt (1 - x ^ 2) := sqrt_pos.2 (by nlinarith [h₁, h₂])\n[GOAL]\nx : ℝ\nh₁✝ : x ≠ -1\nh₂✝ : x ≠ 1\nh₁ : -1 < x\nh₂ : x < 1\n⊢ 0 < 1 - x ^ 2\n[PROOFSTEP]\nnlinarith [h₁, h₂]\n[GOAL]\ncase inr.inl\nx : ℝ\nh₁✝ : x ≠ -1\nh₂✝ : x ≠ 1\nh₁ : -1 < x\nh₂ : x < 1\nthis : 0 < sqrt (1 - x ^ 2)\n⊢ HasStrictDerivAt arcsin (1 / sqrt (1 - x ^ 2)) x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\nsimp only [← cos_arcsin, one_div] at this ⊢\n[GOAL]\ncase inr.inl\nx : ℝ\nh₁✝ : x ≠ -1\nh₂✝ : x ≠ 1\nh₁ : -1 < x\nh₂ : x < 1\nthis : 0 < cos (arcsin x)\n⊢ HasStrictDerivAt arcsin (cos (arcsin x))⁻¹ x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\nexact\n  ⟨sinLocalHomeomorph.hasStrictDerivAt_symm ⟨h₁, h₂⟩ this.ne' (hasStrictDerivAt_sin _),\n    sinLocalHomeomorph.contDiffAt_symm_deriv this.ne' ⟨h₁, h₂⟩ (hasDerivAt_sin _) contDiff_sin.contDiffAt⟩\n[GOAL]\ncase inr.inr\nx : ℝ\nh₁✝ : x ≠ -1\nh₂✝ : x ≠ 1\nh₁ : -1 < x\nh₂ : 1 < x\n⊢ HasStrictDerivAt arcsin (1 / sqrt (1 - x ^ 2)) x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\nhave : 1 - x ^ 2 < 0 := by nlinarith [h₂]\n[GOAL]\nx : ℝ\nh₁✝ : x ≠ -1\nh₂✝ : x ≠ 1\nh₁ : -1 < x\nh₂ : 1 < x\n⊢ 1 - x ^ 2 < 0\n[PROOFSTEP]\nnlinarith [h₂]\n[GOAL]\ncase inr.inr\nx : ℝ\nh₁✝ : x ≠ -1\nh₂✝ : x ≠ 1\nh₁ : -1 < x\nh₂ : 1 < x\nthis : 1 - x ^ 2 < 0\n⊢ HasStrictDerivAt arcsin (1 / sqrt (1 - x ^ 2)) x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\nrw [sqrt_eq_zero'.2 this.le, div_zero]\n[GOAL]\ncase inr.inr\nx : ℝ\nh₁✝ : x ≠ -1\nh₂✝ : x ≠ 1\nh₁ : -1 < x\nh₂ : 1 < x\nthis : 1 - x ^ 2 < 0\n⊢ HasStrictDerivAt arcsin 0 x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\nhave : arcsin =ᶠ[𝓝 x] fun _ => π / 2 := (lt_mem_nhds h₂).mono fun y hy => arcsin_of_one_le hy.le\n[GOAL]\ncase inr.inr\nx : ℝ\nh₁✝ : x ≠ -1\nh₂✝ : x ≠ 1\nh₁ : -1 < x\nh₂ : 1 < x\nthis✝ : 1 - x ^ 2 < 0\nthis : arcsin =ᶠ[𝓝 x] fun x => π / 2\n⊢ HasStrictDerivAt arcsin 0 x ∧ ContDiffAt ℝ ⊤ arcsin x\n[PROOFSTEP]\nexact ⟨(hasStrictDerivAt_const _ _).congr_of_eventuallyEq this.symm, contDiffAt_const.congr_of_eventuallyEq this⟩\n[GOAL]\nx : ℝ\nh : x ≠ -1\n⊢ HasDerivWithinAt arcsin (1 / sqrt (1 - x ^ 2)) (Ici x) x\n[PROOFSTEP]\nrcases eq_or_ne x 1 with (rfl | h')\n[GOAL]\ncase inl\nh : 1 ≠ -1\n⊢ HasDerivWithinAt arcsin (1 / sqrt (1 - 1 ^ 2)) (Ici 1) 1\n[PROOFSTEP]\nconvert (hasDerivWithinAt_const (1 : ℝ) _ (π / 2)).congr _ _\n[GOAL]\ncase h.e'_7\nh : 1 ≠ -1\n⊢ 1 / sqrt (1 - 1 ^ 2) = 0\n[PROOFSTEP]\nsimp (config := { contextual := true }) [arcsin_of_one_le]\n[GOAL]\ncase inl.convert_3\nh : 1 ≠ -1\n⊢ ∀ (x : ℝ), x ∈ Ici 1 → arcsin x = π / 2\n[PROOFSTEP]\nsimp (config := { contextual := true }) [arcsin_of_one_le]\n[GOAL]\ncase inl.convert_4\nh : 1 ≠ -1\n⊢ arcsin 1 = π / 2\n[PROOFSTEP]\nsimp (config := { contextual := true }) [arcsin_of_one_le]\n[GOAL]\ncase inr\nx : ℝ\nh : x ≠ -1\nh' : x ≠ 1\n⊢ HasDerivWithinAt arcsin (1 / sqrt (1 - x ^ 2)) (Ici x) x\n[PROOFSTEP]\nexact (hasDerivAt_arcsin h h').hasDerivWithinAt\n[GOAL]\nx : ℝ\nh : x ≠ 1\n⊢ HasDerivWithinAt arcsin (1 / sqrt (1 - x ^ 2)) (Iic x) x\n[PROOFSTEP]\nrcases em (x = -1) with (rfl | h')\n[GOAL]\ncase inl\nh : -1 ≠ 1\n⊢ HasDerivWithinAt arcsin (1 / sqrt (1 - (-1) ^ 2)) (Iic (-1)) (-1)\n[PROOFSTEP]\nconvert (hasDerivWithinAt_const (-1 : ℝ) _ (-(π / 2))).congr _ _\n[GOAL]\ncase h.e'_7\nh : -1 ≠ 1\n⊢ 1 / sqrt (1 - (-1) ^ 2) = 0\n[PROOFSTEP]\nsimp (config := { contextual := true }) [arcsin_of_le_neg_one]\n[GOAL]\ncase inl.convert_3\nh : -1 ≠ 1\n⊢ ∀ (x : ℝ), x ∈ Iic (-1) → arcsin x = -(π / 2)\n[PROOFSTEP]\nsimp (config := { contextual := true }) [arcsin_of_le_neg_one]\n[GOAL]\ncase inl.convert_4\nh : -1 ≠ 1\n⊢ arcsin (-1) = -(π / 2)\n[PROOFSTEP]\nsimp (config := { contextual := true }) [arcsin_of_le_neg_one]\n[GOAL]\ncase inr\nx : ℝ\nh : x ≠ 1\nh' : ¬x = -1\n⊢ HasDerivWithinAt arcsin (1 / sqrt (1 - x ^ 2)) (Iic x) x\n[PROOFSTEP]\nexact (hasDerivAt_arcsin h' h).hasDerivWithinAt\n[GOAL]\nx : ℝ\n⊢ DifferentiableWithinAt ℝ arcsin (Ici x) x ↔ x ≠ -1\n[PROOFSTEP]\nrefine' ⟨_, fun h => (hasDerivWithinAt_arcsin_Ici h).differentiableWithinAt⟩\n[GOAL]\nx : ℝ\n⊢ DifferentiableWithinAt ℝ arcsin (Ici x) x → x ≠ -1\n[PROOFSTEP]\nrintro h rfl\n[GOAL]\nh : DifferentiableWithinAt ℝ arcsin (Ici (-1)) (-1)\n⊢ False\n[PROOFSTEP]\nhave : sin ∘ arcsin =ᶠ[𝓝[≥] (-1 : ℝ)] id := by\n  filter_upwards [Icc_mem_nhdsWithin_Ici ⟨le_rfl, neg_lt_self (zero_lt_one' ℝ)⟩] with x using sin_arcsin'\n[GOAL]\nh : DifferentiableWithinAt ℝ arcsin (Ici (-1)) (-1)\n⊢ sin ∘ arcsin =ᶠ[𝓝[Ici (-1)] (-1)] id\n[PROOFSTEP]\nfilter_upwards [Icc_mem_nhdsWithin_Ici ⟨le_rfl, neg_lt_self (zero_lt_one' ℝ)⟩] with x using sin_arcsin'\n[GOAL]\nh : DifferentiableWithinAt ℝ arcsin (Ici (-1)) (-1)\nthis : sin ∘ arcsin =ᶠ[𝓝[Ici (-1)] (-1)] id\n⊢ False\n[PROOFSTEP]\nhave := h.hasDerivWithinAt.sin.congr_of_eventuallyEq this.symm (by simp)\n[GOAL]\nh : DifferentiableWithinAt ℝ arcsin (Ici (-1)) (-1)\nthis : sin ∘ arcsin =ᶠ[𝓝[Ici (-1)] (-1)] id\n⊢ id (-1) = sin (arcsin (-1))\n[PROOFSTEP]\nsimp\n[GOAL]\nh : DifferentiableWithinAt ℝ arcsin (Ici (-1)) (-1)\nthis✝ : sin ∘ arcsin =ᶠ[𝓝[Ici (-1)] (-1)] id\nthis : HasDerivWithinAt id (cos (arcsin (-1)) * derivWithin arcsin (Ici (-1)) (-1)) (Ici (-1)) (-1)\n⊢ False\n[PROOFSTEP]\nsimpa using (uniqueDiffOn_Ici _ _ left_mem_Ici).eq_deriv _ this (hasDerivWithinAt_id _ _)\n[GOAL]\nx : ℝ\n⊢ DifferentiableWithinAt ℝ arcsin (Iic x) x ↔ x ≠ 1\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => (hasDerivWithinAt_arcsin_Iic h).differentiableWithinAt⟩\n[GOAL]\nx : ℝ\nh : DifferentiableWithinAt ℝ arcsin (Iic x) x\n⊢ x ≠ 1\n[PROOFSTEP]\nrw [← neg_neg x, ← image_neg_Ici] at h \n[GOAL]\nx : ℝ\nh : DifferentiableWithinAt ℝ arcsin (Neg.neg '' Ici (-x)) (- -x)\n⊢ x ≠ 1\n[PROOFSTEP]\nhave := (h.comp (-x) differentiableWithinAt_id.neg (mapsTo_image _ _)).neg\n[GOAL]\nx : ℝ\nh : DifferentiableWithinAt ℝ arcsin (Neg.neg '' Ici (-x)) (- -x)\nthis : DifferentiableWithinAt ℝ (fun y => -(arcsin ∘ Neg.neg) y) (Ici (-x)) (-x)\n⊢ x ≠ 1\n[PROOFSTEP]\nsimpa [(· ∘ ·), differentiableWithinAt_arcsin_Ici] using this\n[GOAL]\n⊢ deriv arcsin = fun x => 1 / sqrt (1 - x ^ 2)\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nx : ℝ\n⊢ deriv arcsin x = 1 / sqrt (1 - x ^ 2)\n[PROOFSTEP]\nby_cases h : x ≠ -1 ∧ x ≠ 1\n[GOAL]\ncase pos\nx : ℝ\nh : x ≠ -1 ∧ x ≠ 1\n⊢ deriv arcsin x = 1 / sqrt (1 - x ^ 2)\n[PROOFSTEP]\nexact (hasDerivAt_arcsin h.1 h.2).deriv\n[GOAL]\ncase neg\nx : ℝ\nh : ¬(x ≠ -1 ∧ x ≠ 1)\n⊢ deriv arcsin x = 1 / sqrt (1 - x ^ 2)\n[PROOFSTEP]\nrw [deriv_zero_of_not_differentiableAt (mt differentiableAt_arcsin.1 h)]\n[GOAL]\ncase neg\nx : ℝ\nh : ¬(x ≠ -1 ∧ x ≠ 1)\n⊢ 0 = 1 / sqrt (1 - x ^ 2)\n[PROOFSTEP]\nsimp only [not_and_or, Ne.def, Classical.not_not] at h \n[GOAL]\ncase neg\nx : ℝ\nh : x = -1 ∨ x = 1\n⊢ 0 = 1 / sqrt (1 - x ^ 2)\n[PROOFSTEP]\nrcases h with (rfl | rfl)\n[GOAL]\ncase neg.inl\n⊢ 0 = 1 / sqrt (1 - (-1) ^ 2)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.inr\n⊢ 0 = 1 / sqrt (1 - 1 ^ 2)\n[PROOFSTEP]\nsimp\n[GOAL]\nx : ℝ\n⊢ -deriv (fun y => arcsin y) x = -(1 / sqrt (1 - x ^ 2))\n[PROOFSTEP]\nsimp only [deriv_arcsin]\n[GOAL]\nx : ℝ\nn : ℕ∞\n⊢ ContDiffAt ℝ n arccos x ↔ n = 0 ∨ x ≠ -1 ∧ x ≠ 1\n[PROOFSTEP]\nrefine' Iff.trans ⟨fun h => _, fun h => _⟩ contDiffAt_arcsin_iff\n[GOAL]\ncase refine'_1\nx : ℝ\nn : ℕ∞\nh : ContDiffAt ℝ n arccos x\n⊢ ContDiffAt ℝ n arcsin x\n[PROOFSTEP]\nsimpa [arccos] using (@contDiffAt_const _ _ _ _ _ _ _ _ _ _ (π / 2)).sub h\n[GOAL]\ncase refine'_2\nx : ℝ\nn : ℕ∞\nh : ContDiffAt ℝ n arcsin x\n⊢ ContDiffAt ℝ n arccos x\n[PROOFSTEP]\nsimpa [arccos] using (@contDiffAt_const _ _ _ _ _ _ _ _ _ _ (π / 2)).sub h\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Trigonometric.InverseDeriv", "llama_tokens": 4774, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7025300698514777, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.3813777802469826}}
{"text": "[GOAL]\nds₁ ds₂ ds₃ is : List ℕ\neq : ds₁ = ds₂\nh : Forall₂ (fun x x_1 => x < x_1) is ds₁\n⊢ ↑(cast (_ : HolorIndex ds₁ = HolorIndex ds₂) { val := is, property := h }) = is\n[PROOFSTEP]\nsubst eq\n[GOAL]\nds₁ ds₃ is : List ℕ\nh : Forall₂ (fun x x_1 => x < x_1) is ds₁\n⊢ ↑(cast (_ : HolorIndex ds₁ = HolorIndex ds₁) { val := is, property := h }) = is\n[PROOFSTEP]\nrfl\n[GOAL]\nds₁ ds₂ ds₃ is : List ℕ\nh : Forall₂ (fun x x_1 => x < x_1) is (ds₁ ++ ds₂ ++ ds₃)\n⊢ ↑(take (assocRight { val := is, property := h })) = ↑(take (take { val := is, property := h }))\n[PROOFSTEP]\nsimp [assocRight, take, cast_type, List.take_take, Nat.le_add_right, min_eq_left]\n[GOAL]\nds₁ ds₂ ds₃ is : List ℕ\nh : Forall₂ (fun x x_1 => x < x_1) is (ds₁ ++ ds₂ ++ ds₃)\n⊢ ↑(take (drop (assocRight { val := is, property := h }))) = ↑(drop (take { val := is, property := h }))\n[PROOFSTEP]\nsimp [assocRight, take, drop, cast_type, List.drop_take]\n[GOAL]\nds₁ ds₂ ds₃ is : List ℕ\nh : Forall₂ (fun x x_1 => x < x_1) is (ds₁ ++ ds₂ ++ ds₃)\n⊢ ↑(drop (drop (assocRight { val := is, property := h }))) = ↑(drop { val := is, property := h })\n[PROOFSTEP]\nsimp [add_comm, assocRight, drop, cast_type, List.drop_drop]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\neq : ds₁ = ds₂\na : Holor α ds₁\n⊢ cast (_ : Holor α ds₁ = Holor α ds₂) a = fun t => a (cast (_ : HolorIndex ds₂ = HolorIndex ds₁) t)\n[PROOFSTEP]\nsubst eq\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₃ : List ℕ\na : Holor α ds₁\n⊢ cast (_ : Holor α ds₁ = Holor α ds₁) a = fun t => a (cast (_ : HolorIndex ds₁ = HolorIndex ds₁) t)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Semigroup α\nx : Holor α ds₁\ny : Holor α ds₂\nz : Holor α ds₃\nt : HolorIndex (ds₁ ++ ds₂ ++ ds₃)\n⊢ (x ⊗ y ⊗ z) t = assocLeft (x ⊗ (y ⊗ z)) t\n[PROOFSTEP]\nrw [assocLeft]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Semigroup α\nx : Holor α ds₁\ny : Holor α ds₂\nz : Holor α ds₃\nt : HolorIndex (ds₁ ++ ds₂ ++ ds₃)\n⊢ (x ⊗ y ⊗ z) t = cast (_ : Holor α (ds₁ ++ (ds₂ ++ ds₃)) = Holor α (ds₁ ++ ds₂ ++ ds₃)) (x ⊗ (y ⊗ z)) t\n[PROOFSTEP]\nunfold mul\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Semigroup α\nx : Holor α ds₁\ny : Holor α ds₂\nz : Holor α ds₃\nt : HolorIndex (ds₁ ++ ds₂ ++ ds₃)\n⊢ x (HolorIndex.take (HolorIndex.take t)) * y (HolorIndex.drop (HolorIndex.take t)) * z (HolorIndex.drop t) =\n    cast (_ : Holor α (ds₁ ++ (ds₂ ++ ds₃)) = Holor α (ds₁ ++ ds₂ ++ ds₃))\n      (fun t =>\n        x (HolorIndex.take t) * (y (HolorIndex.take (HolorIndex.drop t)) * z (HolorIndex.drop (HolorIndex.drop t))))\n      t\n[PROOFSTEP]\nrw [mul_assoc, ← HolorIndex.take_take, ← HolorIndex.drop_take, ← HolorIndex.drop_drop, cast_type]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Semigroup α\nx : Holor α ds₁\ny : Holor α ds₂\nz : Holor α ds₃\nt : HolorIndex (ds₁ ++ ds₂ ++ ds₃)\n⊢ x (HolorIndex.take (HolorIndex.assocRight t)) *\n      (y (HolorIndex.take (HolorIndex.drop (HolorIndex.assocRight t))) *\n        z (HolorIndex.drop (HolorIndex.drop (HolorIndex.assocRight t)))) =\n    (fun t =>\n        x (HolorIndex.take (cast (_ : HolorIndex (ds₁ ++ ds₂ ++ ds₃) = HolorIndex (ds₁ ++ (ds₂ ++ ds₃))) t)) *\n          (y\n              (HolorIndex.take\n                (HolorIndex.drop (cast (_ : HolorIndex (ds₁ ++ ds₂ ++ ds₃) = HolorIndex (ds₁ ++ (ds₂ ++ ds₃))) t))) *\n            z\n              (HolorIndex.drop\n                (HolorIndex.drop (cast (_ : HolorIndex (ds₁ ++ ds₂ ++ ds₃) = HolorIndex (ds₁ ++ (ds₂ ++ ds₃))) t)))))\n      t\ncase eq\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Semigroup α\nx : Holor α ds₁\ny : Holor α ds₂\nz : Holor α ds₃\nt : HolorIndex (ds₁ ++ ds₂ ++ ds₃)\n⊢ ds₁ ++ (ds₂ ++ ds₃) = ds₁ ++ ds₂ ++ ds₃\n[PROOFSTEP]\nrfl\n[GOAL]\ncase eq\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Semigroup α\nx : Holor α ds₁\ny : Holor α ds₂\nz : Holor α ds₃\nt : HolorIndex (ds₁ ++ ds₂ ++ ds₃)\n⊢ ds₁ ++ (ds₂ ++ ds₃) = ds₁ ++ ds₂ ++ ds₃\n[PROOFSTEP]\nrw [append_assoc]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Semigroup α\nx : Holor α ds₁\ny : Holor α ds₂\nz : Holor α ds₃\n⊢ HEq (x ⊗ y ⊗ z) (x ⊗ (y ⊗ z))\n[PROOFSTEP]\nsimp [cast_heq, mul_assoc0, assocLeft]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Monoid α\nx : Holor α []\ny : Holor α ds\n⊢ x ⊗ y = x { val := [], property := (_ : Forall₂ (fun x x_1 => x < x_1) [] []) } • y\n[PROOFSTEP]\nsimp [mul, SMul.smul, HolorIndex.take, HolorIndex.drop, HSMul.hSMul]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\np : HolorIndex (d :: ds) → Prop\nt : HolorIndex (d :: ds)\ni : ℕ\nis : List ℕ\nh : ↑t = i :: is\n⊢ Forall₂ (fun x x_1 => x < x_1) (i :: is) (d :: ds)\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\np : HolorIndex (d :: ds) → Prop\nt : HolorIndex (d :: ds)\ni : ℕ\nis : List ℕ\nh : ↑t = i :: is\n⊢ Forall₂ (fun x x_1 => x < x_1) (↑t) (d :: ds)\n[PROOFSTEP]\nexact t.2\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\nx y : Holor α (d :: ds)\nh : slice x = slice y\nt : HolorIndex (d :: ds)\ni : ℕ\nis : List ℕ\nhiis : ↑t = i :: is\n⊢ Forall₂ (fun x x_1 => x < x_1) (i :: is) (d :: ds)\n[PROOFSTEP]\nrw [← hiis]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\nx y : Holor α (d :: ds)\nh : slice x = slice y\nt : HolorIndex (d :: ds)\ni : ℕ\nis : List ℕ\nhiis : ↑t = i :: is\n⊢ Forall₂ (fun x x_1 => x < x_1) (↑t) (d :: ds)\n[PROOFSTEP]\nexact t.2\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\nx y : Holor α (d :: ds)\nh : slice x = slice y\nt : HolorIndex (d :: ds)\ni : ℕ\nis : List ℕ\nhiis : ↑t = i :: is\nhiisdds : Forall₂ (fun x x_1 => x < x_1) (i :: is) (d :: ds)\nhid : i < d\nhisds : Forall₂ (fun x x_1 => x < x_1) is ds\n⊢ slice x i hid { val := is, property := hisds } = slice y i hid { val := is, property := hisds }\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\ni j : ℕ\nhid : i < d\nx : Holor α ds\nt : HolorIndex ds\nh : i = j\n⊢ slice (unitVec d j ⊗ x) i hid t = ite (i = j) x 0 t\n[PROOFSTEP]\nsimp [slice, mul, HolorIndex.take, unitVec, HolorIndex.drop, h]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\ni j : ℕ\nhid : i < d\nx : Holor α ds\nt : HolorIndex ds\nh : ¬i = j\n⊢ slice (unitVec d j ⊗ x) i hid t = ite (i = j) x 0 t\n[PROOFSTEP]\nsimp [slice, mul, HolorIndex.take, unitVec, HolorIndex.drop, h]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\ni j : ℕ\nhid : i < d\nx : Holor α ds\nt : HolorIndex ds\nh : ¬i = j\n⊢ 0 = OfNat.ofNat 0 t\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Add α\ni : ℕ\nhid : i < d\nx y : Holor α (d :: ds)\nt : HolorIndex ds\n⊢ (slice x i hid + slice y i hid) t = slice (x + y) i hid t\n[PROOFSTEP]\nsimp [slice, (· + ·), Add.add]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : AddCommMonoid α\nβ : Type\ni : ℕ\nhid : i < d\ns : Finset β\nf : β → Holor α (d :: ds)\n⊢ ∑ x in s, slice (f x) i hid = slice (∑ x in s, f x) i hid\n[PROOFSTEP]\nletI := Classical.decEq β\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : AddCommMonoid α\nβ : Type\ni : ℕ\nhid : i < d\ns : Finset β\nf : β → Holor α (d :: ds)\nthis : DecidableEq β := Classical.decEq β\n⊢ ∑ x in s, slice (f x) i hid = slice (∑ x in s, f x) i hid\n[PROOFSTEP]\nrefine' Finset.induction_on s _ _\n[GOAL]\ncase refine'_1\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : AddCommMonoid α\nβ : Type\ni : ℕ\nhid : i < d\ns : Finset β\nf : β → Holor α (d :: ds)\nthis : DecidableEq β := Classical.decEq β\n⊢ ∑ x in ∅, slice (f x) i hid = slice (∑ x in ∅, f x) i hid\n[PROOFSTEP]\nsimp [slice_zero]\n[GOAL]\ncase refine'_2\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : AddCommMonoid α\nβ : Type\ni : ℕ\nhid : i < d\ns : Finset β\nf : β → Holor α (d :: ds)\nthis : DecidableEq β := Classical.decEq β\n⊢ ∀ ⦃a : β⦄ {s : Finset β},\n    ¬a ∈ s →\n      ∑ x in s, slice (f x) i hid = slice (∑ x in s, f x) i hid →\n        ∑ x in insert a s, slice (f x) i hid = slice (∑ x in insert a s, f x) i hid\n[PROOFSTEP]\nintro _ _ h_not_in ih\n[GOAL]\ncase refine'_2\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : AddCommMonoid α\nβ : Type\ni : ℕ\nhid : i < d\ns : Finset β\nf : β → Holor α (d :: ds)\nthis : DecidableEq β := Classical.decEq β\na✝ : β\ns✝ : Finset β\nh_not_in : ¬a✝ ∈ s✝\nih : ∑ x in s✝, slice (f x) i hid = slice (∑ x in s✝, f x) i hid\n⊢ ∑ x in insert a✝ s✝, slice (f x) i hid = slice (∑ x in insert a✝ s✝, f x) i hid\n[PROOFSTEP]\nrw [Finset.sum_insert h_not_in, ih, slice_add, Finset.sum_insert h_not_in]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\n⊢ ∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : Nat.succ ↑i ≤ d) = x\n[PROOFSTEP]\napply slice_eq _ _ _\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\n⊢ slice (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : Nat.succ ↑i ≤ d)) = slice x\n[PROOFSTEP]\next i hid\n[GOAL]\ncase h.h\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\ni : ℕ\nhid : i < d\n⊢ slice (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : Nat.succ ↑i ≤ d)) i hid = slice x i hid\n[PROOFSTEP]\nrw [← slice_sum]\n[GOAL]\ncase h.h\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\ni : ℕ\nhid : i < d\n⊢ ∑ x_1 in Finset.attach (Finset.range d), slice (unitVec d ↑x_1 ⊗ slice x ↑x_1 (_ : Nat.succ ↑x_1 ≤ d)) i hid =\n    slice x i hid\n[PROOFSTEP]\nsimp only [slice_unitVec_mul hid]\n[GOAL]\ncase h.h\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\ni : ℕ\nhid : i < d\n⊢ (∑ x_1 in Finset.attach (Finset.range d), if i = ↑x_1 then slice x ↑x_1 (_ : Nat.succ ↑x_1 ≤ d) else 0) =\n    slice x i hid\n[PROOFSTEP]\nrw [Finset.sum_eq_single (Subtype.mk i <| Finset.mem_range.2 hid)]\n[GOAL]\ncase h.h\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\ni : ℕ\nhid : i < d\n⊢ (if i = ↑{ val := i, property := (_ : i ∈ Finset.range d) } then\n      slice x ↑{ val := i, property := (_ : i ∈ Finset.range d) }\n        (_ : Nat.succ ↑{ val := i, property := (_ : i ∈ Finset.range d) } ≤ d)\n    else 0) =\n    slice x i hid\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.h.h₀\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\ni : ℕ\nhid : i < d\n⊢ ∀ (b : { x // x ∈ Finset.range d }),\n    b ∈ Finset.attach (Finset.range d) →\n      b ≠ { val := i, property := (_ : i ∈ Finset.range d) } →\n        (if i = ↑b then slice x ↑b (_ : Nat.succ ↑b ≤ d) else 0) = 0\n[PROOFSTEP]\nintro (b : { x // x ∈ Finset.range d }) (_ : b ∈ (Finset.range d).attach) (hbi : b ≠ ⟨i, _⟩)\n[GOAL]\ncase h.h.h₀\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\ni : ℕ\nhid : i < d\nb : { x // x ∈ Finset.range d }\nx✝ : b ∈ Finset.attach (Finset.range d)\nhbi : b ≠ { val := i, property := (_ : i ∈ Finset.range d) }\n⊢ (if i = ↑b then slice x ↑b (_ : Nat.succ ↑b ≤ d) else 0) = 0\n[PROOFSTEP]\nhave hbi' : i ≠ b := by simpa only [Ne.def, Subtype.ext_iff, Subtype.coe_mk] using hbi.symm\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\ni : ℕ\nhid : i < d\nb : { x // x ∈ Finset.range d }\nx✝ : b ∈ Finset.attach (Finset.range d)\nhbi : b ≠ { val := i, property := (_ : i ∈ Finset.range d) }\n⊢ i ≠ ↑b\n[PROOFSTEP]\nsimpa only [Ne.def, Subtype.ext_iff, Subtype.coe_mk] using hbi.symm\n[GOAL]\ncase h.h.h₀\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\ni : ℕ\nhid : i < d\nb : { x // x ∈ Finset.range d }\nx✝ : b ∈ Finset.attach (Finset.range d)\nhbi : b ≠ { val := i, property := (_ : i ∈ Finset.range d) }\nhbi' : i ≠ ↑b\n⊢ (if i = ↑b then slice x ↑b (_ : Nat.succ ↑b ≤ d) else 0) = 0\n[PROOFSTEP]\nsimp [hbi']\n[GOAL]\ncase h.h.h₁\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\ni : ℕ\nhid : i < d\n⊢ ¬{ val := i, property := (_ : i ∈ Finset.range d) } ∈ Finset.attach (Finset.range d) →\n    (if i = ↑{ val := i, property := (_ : i ∈ Finset.range d) } then\n        slice x ↑{ val := i, property := (_ : i ∈ Finset.range d) }\n          (_ : Nat.succ ↑{ val := i, property := (_ : i ∈ Finset.range d) } ≤ d)\n      else 0) =\n      0\n[PROOFSTEP]\nintro (hid' : Subtype.mk i _ ∉ Finset.attach (Finset.range d))\n[GOAL]\ncase h.h.h₁\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\ni : ℕ\nhid : i < d\nhid' : ¬{ val := i, property := (_ : i ∈ Finset.range d) } ∈ Finset.attach (Finset.range d)\n⊢ (if i = ↑{ val := i, property := (_ : i ∈ Finset.range d) } then\n      slice x ↑{ val := i, property := (_ : i ∈ Finset.range d) }\n        (_ : Nat.succ ↑{ val := i, property := (_ : i ∈ Finset.range d) } ≤ d)\n    else 0) =\n    0\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h.h.h₁.h\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α (d :: ds)\ni : ℕ\nhid : i < d\nhid' : ¬{ val := i, property := (_ : i ∈ Finset.range d) } ∈ Finset.attach (Finset.range d)\n⊢ False\n[PROOFSTEP]\nexact absurd (Finset.mem_attach _ _) hid'\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝¹ : Monoid α\ninst✝ : AddMonoid α\nx : Holor α []\n⊢ CPRankMax 1 x\n[PROOFSTEP]\nhave h := CPRankMax.succ 0 x 0 (CPRankMax1.nil x) CPRankMax.zero\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝¹ : Monoid α\ninst✝ : AddMonoid α\nx : Holor α []\nh : CPRankMax (0 + 1) (x + 0)\n⊢ CPRankMax 1 x\n[PROOFSTEP]\nrwa [add_zero x, zero_add] at h \n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝¹ : Monoid α\ninst✝ : AddMonoid α\nx : Holor α ds\nh : CPRankMax1 x\n⊢ CPRankMax 1 x\n[PROOFSTEP]\nhave h' := CPRankMax.succ 0 x 0 h CPRankMax.zero\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝¹ : Monoid α\ninst✝ : AddMonoid α\nx : Holor α ds\nh : CPRankMax1 x\nh' : CPRankMax (0 + 1) (x + 0)\n⊢ CPRankMax 1 x\n[PROOFSTEP]\nrwa [zero_add, add_zero] at h' \n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝¹ : Monoid α\ninst✝ : AddMonoid α\nn : ℕ\nx y : Holor α ds\nhx : CPRankMax 0 x\nhy : CPRankMax n y\n⊢ CPRankMax (0 + n) (x + y)\n[PROOFSTEP]\nmatch hx with\n| CPRankMax.zero => simp only [zero_add, hy]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝¹ : Monoid α\ninst✝ : AddMonoid α\nn : ℕ\nx y : Holor α ds\nhx : CPRankMax 0 x\nhy : CPRankMax n y\n⊢ CPRankMax (0 + n) (0 + y)\n[PROOFSTEP]\nsimp only [zero_add, hy]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝¹ : Monoid α\ninst✝ : AddMonoid α\nm n : ℕ\ny x₁ x₂ : Holor α ds\nhx₁ : CPRankMax1 x₁\nhx₂ : CPRankMax m x₂\nhy : CPRankMax n y\n⊢ CPRankMax (m + 1 + n) (x₁ + x₂ + y)\n[PROOFSTEP]\nsimp only [add_comm, add_assoc]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝¹ : Monoid α\ninst✝ : AddMonoid α\nm n : ℕ\ny x₁ x₂ : Holor α ds\nhx₁ : CPRankMax1 x₁\nhx₂ : CPRankMax m x₂\nhy : CPRankMax n y\n⊢ CPRankMax (n + (m + 1)) (x₁ + (x₂ + y))\n[PROOFSTEP]\napply CPRankMax.succ\n[GOAL]\ncase a\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝¹ : Monoid α\ninst✝ : AddMonoid α\nm n : ℕ\ny x₁ x₂ : Holor α ds\nhx₁ : CPRankMax1 x₁\nhx₂ : CPRankMax m x₂\nhy : CPRankMax n y\n⊢ CPRankMax1 x₁\n[PROOFSTEP]\nassumption\n[GOAL]\ncase a\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝¹ : Monoid α\ninst✝ : AddMonoid α\nm n : ℕ\ny x₁ x₂ : Holor α ds\nhx₁ : CPRankMax1 x₁\nhx₂ : CPRankMax m x₂\nhy : CPRankMax n y\n⊢ CPRankMax (Nat.add n (Nat.add m 0)) (x₂ + y)\n[PROOFSTEP]\nsimp only [Nat.add_eq, add_zero, add_comm n m]\n[GOAL]\ncase a\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝¹ : Monoid α\ninst✝ : AddMonoid α\nm n : ℕ\ny x₁ x₂ : Holor α ds\nhx₁ : CPRankMax1 x₁\nhx₂ : CPRankMax m x₂\nhy : CPRankMax n y\n⊢ CPRankMax (m + n) (x₂ + y)\n[PROOFSTEP]\nexact cprankMax_add hx₂ hy\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nx : Holor α [d]\n⊢ CPRankMax 0 (x ⊗ 0)\n[PROOFSTEP]\nsimp [mul_zero x, CPRankMax.zero]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nn : ℕ\nx : Holor α [d]\ny₁ y₂ : Holor α ds\nhy₁ : CPRankMax1 y₁\nhy₂ : CPRankMax n y₂\n⊢ CPRankMax (n + 1) (x ⊗ (y₁ + y₂))\n[PROOFSTEP]\nrw [mul_left_distrib]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nn : ℕ\nx : Holor α [d]\ny₁ y₂ : Holor α ds\nhy₁ : CPRankMax1 y₁\nhy₂ : CPRankMax n y₂\n⊢ CPRankMax (n + 1) (x ⊗ y₁ + x ⊗ y₂)\n[PROOFSTEP]\nrw [Nat.add_comm]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nn : ℕ\nx : Holor α [d]\ny₁ y₂ : Holor α ds\nhy₁ : CPRankMax1 y₁\nhy₂ : CPRankMax n y₂\n⊢ CPRankMax (1 + n) (x ⊗ y₁ + x ⊗ y₂)\n[PROOFSTEP]\napply cprankMax_add\n[GOAL]\ncase a\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nn : ℕ\nx : Holor α [d]\ny₁ y₂ : Holor α ds\nhy₁ : CPRankMax1 y₁\nhy₂ : CPRankMax n y₂\n⊢ CPRankMax 1 (x ⊗ y₁)\n[PROOFSTEP]\nexact cprankMax_1 (CPRankMax1.cons _ _ hy₁)\n[GOAL]\ncase a\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nn : ℕ\nx : Holor α [d]\ny₁ y₂ : Holor α ds\nhy₁ : CPRankMax1 y₁\nhy₂ : CPRankMax n y₂\n⊢ CPRankMax n (x ⊗ y₂)\n[PROOFSTEP]\nexact cprankMax_mul _ x y₂ hy₂\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nβ : Type u_1\nn : ℕ\ns : Finset β\nf : β → Holor α ds\nthis : DecidableEq β := Classical.decEq β\n⊢ (∀ (x : β), x ∈ ∅ → CPRankMax n (f x)) → CPRankMax (Finset.card ∅ * n) (∑ x in ∅, f x)\n[PROOFSTEP]\nsimp [CPRankMax.zero]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nβ : Type u_1\nn : ℕ\ns : Finset β\nf : β → Holor α ds\nthis : DecidableEq β := Classical.decEq β\n⊢ ∀ ⦃a : β⦄ {s : Finset β},\n    ¬a ∈ s →\n      ((∀ (x : β), x ∈ s → CPRankMax n (f x)) → CPRankMax (Finset.card s * n) (∑ x in s, f x)) →\n        (∀ (x : β), x ∈ insert a s → CPRankMax n (f x)) →\n          CPRankMax (Finset.card (insert a s) * n) (∑ x in insert a s, f x)\n[PROOFSTEP]\nintro x s (h_x_notin_s : x ∉ s) ih h_cprank\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nβ : Type u_1\nn : ℕ\ns✝ : Finset β\nf : β → Holor α ds\nthis : DecidableEq β := Classical.decEq β\nx : β\ns : Finset β\nh_x_notin_s : ¬x ∈ s\nih : (∀ (x : β), x ∈ s → CPRankMax n (f x)) → CPRankMax (Finset.card s * n) (∑ x in s, f x)\nh_cprank : ∀ (x_1 : β), x_1 ∈ insert x s → CPRankMax n (f x_1)\n⊢ CPRankMax (Finset.card (insert x s) * n) (∑ x in insert x s, f x)\n[PROOFSTEP]\nsimp only [Finset.sum_insert h_x_notin_s, Finset.card_insert_of_not_mem h_x_notin_s]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nβ : Type u_1\nn : ℕ\ns✝ : Finset β\nf : β → Holor α ds\nthis : DecidableEq β := Classical.decEq β\nx : β\ns : Finset β\nh_x_notin_s : ¬x ∈ s\nih : (∀ (x : β), x ∈ s → CPRankMax n (f x)) → CPRankMax (Finset.card s * n) (∑ x in s, f x)\nh_cprank : ∀ (x_1 : β), x_1 ∈ insert x s → CPRankMax n (f x_1)\n⊢ CPRankMax ((Finset.card s + 1) * n) (f x + ∑ x in s, f x)\n[PROOFSTEP]\nrw [Nat.right_distrib]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nβ : Type u_1\nn : ℕ\ns✝ : Finset β\nf : β → Holor α ds\nthis : DecidableEq β := Classical.decEq β\nx : β\ns : Finset β\nh_x_notin_s : ¬x ∈ s\nih : (∀ (x : β), x ∈ s → CPRankMax n (f x)) → CPRankMax (Finset.card s * n) (∑ x in s, f x)\nh_cprank : ∀ (x_1 : β), x_1 ∈ insert x s → CPRankMax n (f x_1)\n⊢ CPRankMax (Finset.card s * n + 1 * n) (f x + ∑ x in s, f x)\n[PROOFSTEP]\nsimp only [Nat.one_mul, Nat.add_comm]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nβ : Type u_1\nn : ℕ\ns✝ : Finset β\nf : β → Holor α ds\nthis : DecidableEq β := Classical.decEq β\nx : β\ns : Finset β\nh_x_notin_s : ¬x ∈ s\nih : (∀ (x : β), x ∈ s → CPRankMax n (f x)) → CPRankMax (Finset.card s * n) (∑ x in s, f x)\nh_cprank : ∀ (x_1 : β), x_1 ∈ insert x s → CPRankMax n (f x_1)\n⊢ CPRankMax (n + Finset.card s * n) (f x + ∑ x in s, f x)\n[PROOFSTEP]\nhave ih' : CPRankMax (Finset.card s * n) (∑ x in s, f x) :=\n  by\n  apply ih\n  intro (x : β) (h_x_in_s : x ∈ s)\n  simp only [h_cprank, Finset.mem_insert_of_mem, h_x_in_s]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nβ : Type u_1\nn : ℕ\ns✝ : Finset β\nf : β → Holor α ds\nthis : DecidableEq β := Classical.decEq β\nx : β\ns : Finset β\nh_x_notin_s : ¬x ∈ s\nih : (∀ (x : β), x ∈ s → CPRankMax n (f x)) → CPRankMax (Finset.card s * n) (∑ x in s, f x)\nh_cprank : ∀ (x_1 : β), x_1 ∈ insert x s → CPRankMax n (f x_1)\n⊢ CPRankMax (Finset.card s * n) (∑ x in s, f x)\n[PROOFSTEP]\napply ih\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nβ : Type u_1\nn : ℕ\ns✝ : Finset β\nf : β → Holor α ds\nthis : DecidableEq β := Classical.decEq β\nx : β\ns : Finset β\nh_x_notin_s : ¬x ∈ s\nih : (∀ (x : β), x ∈ s → CPRankMax n (f x)) → CPRankMax (Finset.card s * n) (∑ x in s, f x)\nh_cprank : ∀ (x_1 : β), x_1 ∈ insert x s → CPRankMax n (f x_1)\n⊢ ∀ (x : β), x ∈ s → CPRankMax n (f x)\n[PROOFSTEP]\nintro (x : β) (h_x_in_s : x ∈ s)\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nβ : Type u_1\nn : ℕ\ns✝ : Finset β\nf : β → Holor α ds\nthis : DecidableEq β := Classical.decEq β\nx✝ : β\ns : Finset β\nh_x_notin_s : ¬x✝ ∈ s\nih : (∀ (x : β), x ∈ s → CPRankMax n (f x)) → CPRankMax (Finset.card s * n) (∑ x in s, f x)\nh_cprank : ∀ (x : β), x ∈ insert x✝ s → CPRankMax n (f x)\nx : β\nh_x_in_s : x ∈ s\n⊢ CPRankMax n (f x)\n[PROOFSTEP]\nsimp only [h_cprank, Finset.mem_insert_of_mem, h_x_in_s]\n[GOAL]\nα : Type\nd : ℕ\nds ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nβ : Type u_1\nn : ℕ\ns✝ : Finset β\nf : β → Holor α ds\nthis : DecidableEq β := Classical.decEq β\nx : β\ns : Finset β\nh_x_notin_s : ¬x ∈ s\nih : (∀ (x : β), x ∈ s → CPRankMax n (f x)) → CPRankMax (Finset.card s * n) (∑ x in s, f x)\nh_cprank : ∀ (x_1 : β), x_1 ∈ insert x s → CPRankMax n (f x_1)\nih' : CPRankMax (Finset.card s * n) (∑ x in s, f x)\n⊢ CPRankMax (n + Finset.card s * n) (f x + ∑ x in s, f x)\n[PROOFSTEP]\nexact cprankMax_add (h_cprank x (Finset.mem_insert_self x s)) ih'\n[GOAL]\nα : Type\nd✝ : ℕ\nds✝ ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nd : ℕ\nds : List ℕ\nx : Holor α (d :: ds)\n⊢ CPRankMax (prod (d :: ds)) x\n[PROOFSTEP]\nhave h_summands :\n  ∀ i : { x // x ∈ Finset.range d }, CPRankMax ds.prod (unitVec d i.1 ⊗ slice x i.1 (mem_range.1 i.2)) := fun i =>\n  cprankMax_mul _ _ _ (cprankMax_upper_bound (slice x i.1 (mem_range.1 i.2)))\n[GOAL]\nα : Type\nd✝ : ℕ\nds✝ ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nd : ℕ\nds : List ℕ\nx : Holor α (d :: ds)\nh_summands : ∀ (i : { x // x ∈ Finset.range d }), CPRankMax (prod ds) (unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\n⊢ CPRankMax (prod (d :: ds)) x\n[PROOFSTEP]\nhave h_dds_prod : (List.cons d ds).prod = Finset.card (Finset.range d) * prod ds := by simp [Finset.card_range]\n[GOAL]\nα : Type\nd✝ : ℕ\nds✝ ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nd : ℕ\nds : List ℕ\nx : Holor α (d :: ds)\nh_summands : ∀ (i : { x // x ∈ Finset.range d }), CPRankMax (prod ds) (unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\n⊢ prod (d :: ds) = Finset.card (Finset.range d) * prod ds\n[PROOFSTEP]\nsimp [Finset.card_range]\n[GOAL]\nα : Type\nd✝ : ℕ\nds✝ ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nd : ℕ\nds : List ℕ\nx : Holor α (d :: ds)\nh_summands : ∀ (i : { x // x ∈ Finset.range d }), CPRankMax (prod ds) (unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\nh_dds_prod : prod (d :: ds) = Finset.card (Finset.range d) * prod ds\n⊢ CPRankMax (prod (d :: ds)) x\n[PROOFSTEP]\nhave :\n  CPRankMax (Finset.card (Finset.attach (Finset.range d)) * prod ds)\n    (∑ i in Finset.attach (Finset.range d), unitVec d i.val ⊗ slice x i.val (mem_range.1 i.2)) :=\n  cprankMax_sum (Finset.range d).attach _ fun i _ => h_summands i\n[GOAL]\nα : Type\nd✝ : ℕ\nds✝ ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nd : ℕ\nds : List ℕ\nx : Holor α (d :: ds)\nh_summands : ∀ (i : { x // x ∈ Finset.range d }), CPRankMax (prod ds) (unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\nh_dds_prod : prod (d :: ds) = Finset.card (Finset.range d) * prod ds\nthis :\n  CPRankMax (Finset.card (Finset.attach (Finset.range d)) * prod ds)\n    (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\n⊢ CPRankMax (prod (d :: ds)) x\n[PROOFSTEP]\nhave h_cprankMax_sum :\n  CPRankMax (Finset.card (Finset.range d) * prod ds)\n    (∑ i in Finset.attach (Finset.range d), unitVec d i.val ⊗ slice x i.val (mem_range.1 i.2)) :=\n  by rwa [Finset.card_attach] at this \n[GOAL]\nα : Type\nd✝ : ℕ\nds✝ ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nd : ℕ\nds : List ℕ\nx : Holor α (d :: ds)\nh_summands : ∀ (i : { x // x ∈ Finset.range d }), CPRankMax (prod ds) (unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\nh_dds_prod : prod (d :: ds) = Finset.card (Finset.range d) * prod ds\nthis :\n  CPRankMax (Finset.card (Finset.attach (Finset.range d)) * prod ds)\n    (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\n⊢ CPRankMax (Finset.card (Finset.range d) * prod ds)\n    (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\n[PROOFSTEP]\nrwa [Finset.card_attach] at this \n[GOAL]\nα : Type\nd✝ : ℕ\nds✝ ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nd : ℕ\nds : List ℕ\nx : Holor α (d :: ds)\nh_summands : ∀ (i : { x // x ∈ Finset.range d }), CPRankMax (prod ds) (unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\nh_dds_prod : prod (d :: ds) = Finset.card (Finset.range d) * prod ds\nthis :\n  CPRankMax (Finset.card (Finset.attach (Finset.range d)) * prod ds)\n    (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\nh_cprankMax_sum :\n  CPRankMax (Finset.card (Finset.range d) * prod ds)\n    (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\n⊢ CPRankMax (prod (d :: ds)) x\n[PROOFSTEP]\nrw [← sum_unitVec_mul_slice x]\n[GOAL]\nα : Type\nd✝ : ℕ\nds✝ ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nd : ℕ\nds : List ℕ\nx : Holor α (d :: ds)\nh_summands : ∀ (i : { x // x ∈ Finset.range d }), CPRankMax (prod ds) (unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\nh_dds_prod : prod (d :: ds) = Finset.card (Finset.range d) * prod ds\nthis :\n  CPRankMax (Finset.card (Finset.attach (Finset.range d)) * prod ds)\n    (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\nh_cprankMax_sum :\n  CPRankMax (Finset.card (Finset.range d) * prod ds)\n    (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\n⊢ CPRankMax (prod (d :: ds)) (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : Nat.succ ↑i ≤ d))\n[PROOFSTEP]\nrw [h_dds_prod]\n[GOAL]\nα : Type\nd✝ : ℕ\nds✝ ds₁ ds₂ ds₃ : List ℕ\ninst✝ : Ring α\nd : ℕ\nds : List ℕ\nx : Holor α (d :: ds)\nh_summands : ∀ (i : { x // x ∈ Finset.range d }), CPRankMax (prod ds) (unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\nh_dds_prod : prod (d :: ds) = Finset.card (Finset.range d) * prod ds\nthis :\n  CPRankMax (Finset.card (Finset.attach (Finset.range d)) * prod ds)\n    (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\nh_cprankMax_sum :\n  CPRankMax (Finset.card (Finset.range d) * prod ds)\n    (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : ↑i < d))\n⊢ CPRankMax (Finset.card (Finset.range d) * prod ds)\n    (∑ i in Finset.attach (Finset.range d), unitVec d ↑i ⊗ slice x ↑i (_ : Nat.succ ↑i ≤ d))\n[PROOFSTEP]\nexact h_cprankMax_sum\n", "meta": {"mathlib_filename": "Mathlib.Data.Holor", "llama_tokens": 13068, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7122321964553656, "lm_q2_score": 0.5350984286266116, "lm_q1q2_score": 0.38111432914054627}}
{"text": "[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\ni : Δ' ⟶ [n]\nhi : Mono i\nh₁ : len Δ' ≠ n\nh₂ : ¬Isδ₀ i\n⊢ HomologicalComplex.Hom.f PInfty n ≫ X.map i.op = 0\n[PROOFSTEP]\ninduction' Δ' using SimplexCategory.rec with m\n[GOAL]\ncase h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\ni✝ : Δ' ⟶ [n]\nhi✝ : Mono i✝\nh₁✝ : len Δ' ≠ n\nh₂✝ : ¬Isδ₀ i✝\nm : ℕ\ni : [m] ⟶ [n]\nhi : Mono i\nh₁ : len [m] ≠ n\nh₂ : ¬Isδ₀ i\n⊢ HomologicalComplex.Hom.f PInfty n ≫ X.map i.op = 0\n[PROOFSTEP]\nobtain ⟨k, hk⟩ :=\n  Nat.exists_eq_add_of_lt\n    (len_lt_of_mono i fun h => by\n      rw [← h] at h₁ \n      exact h₁ rfl)\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\ni✝ : Δ' ⟶ [n]\nhi✝ : Mono i✝\nh₁✝ : len Δ' ≠ n\nh₂✝ : ¬Isδ₀ i✝\nm : ℕ\ni : [m] ⟶ [n]\nhi : Mono i\nh₁ : len [m] ≠ n\nh₂ : ¬Isδ₀ i\nh : [n] = [m]\n⊢ False\n[PROOFSTEP]\nrw [← h] at h₁ \n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\ni✝ : Δ' ⟶ [n]\nhi✝ : Mono i✝\nh₁✝ : len Δ' ≠ n\nh₂✝ : ¬Isδ₀ i✝\nm : ℕ\ni : [m] ⟶ [n]\nhi : Mono i\nh₁ : len [n] ≠ n\nh₂ : ¬Isδ₀ i\nh : [n] = [m]\n⊢ False\n[PROOFSTEP]\nexact h₁ rfl\n[GOAL]\ncase h.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\ni✝ : Δ' ⟶ [n]\nhi✝ : Mono i✝\nh₁✝ : len Δ' ≠ n\nh₂✝ : ¬Isδ₀ i✝\nm : ℕ\ni : [m] ⟶ [n]\nhi : Mono i\nh₁ : len [m] ≠ n\nh₂ : ¬Isδ₀ i\nk : ℕ\nhk : len [n] = len [m] + k + 1\n⊢ HomologicalComplex.Hom.f PInfty n ≫ X.map i.op = 0\n[PROOFSTEP]\nsimp only [len_mk] at hk \n[GOAL]\ncase h.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\ni✝ : Δ' ⟶ [n]\nhi✝ : Mono i✝\nh₁✝ : len Δ' ≠ n\nh₂✝ : ¬Isδ₀ i✝\nm : ℕ\ni : [m] ⟶ [n]\nhi : Mono i\nh₁ : len [m] ≠ n\nh₂ : ¬Isδ₀ i\nk : ℕ\nhk : n = m + k + 1\n⊢ HomologicalComplex.Hom.f PInfty n ≫ X.map i.op = 0\n[PROOFSTEP]\nrcases k with _ | k\n[GOAL]\ncase h.intro.zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\ni✝ : Δ' ⟶ [n]\nhi✝ : Mono i✝\nh₁✝ : len Δ' ≠ n\nh₂✝ : ¬Isδ₀ i✝\nm : ℕ\ni : [m] ⟶ [n]\nhi : Mono i\nh₁ : len [m] ≠ n\nh₂ : ¬Isδ₀ i\nhk : n = m + Nat.zero + 1\n⊢ HomologicalComplex.Hom.f PInfty n ≫ X.map i.op = 0\n[PROOFSTEP]\nchange n = m + 1 at hk \n[GOAL]\ncase h.intro.zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\ni✝ : Δ' ⟶ [n]\nhi✝ : Mono i✝\nh₁✝ : len Δ' ≠ n\nh₂✝ : ¬Isδ₀ i✝\nm : ℕ\ni : [m] ⟶ [n]\nhi : Mono i\nh₁ : len [m] ≠ n\nh₂ : ¬Isδ₀ i\nhk : n = m + 1\n⊢ HomologicalComplex.Hom.f PInfty n ≫ X.map i.op = 0\n[PROOFSTEP]\nsubst hk\n[GOAL]\ncase h.intro.zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm : ℕ\ni✝ : Δ' ⟶ [m + 1]\nhi✝ : Mono i✝\nh₁✝ : len Δ' ≠ m + 1\nh₂✝ : ¬Isδ₀ i✝\ni : [m] ⟶ [m + 1]\nhi : Mono i\nh₁ : len [m] ≠ m + 1\nh₂ : ¬Isδ₀ i\n⊢ HomologicalComplex.Hom.f PInfty (m + 1) ≫ X.map i.op = 0\n[PROOFSTEP]\nobtain ⟨j, rfl⟩ := eq_δ_of_mono i\n[GOAL]\ncase h.intro.zero.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm : ℕ\ni : Δ' ⟶ [m + 1]\nhi✝ : Mono i\nh₁✝ : len Δ' ≠ m + 1\nh₂✝ : ¬Isδ₀ i\nh₁ : len [m] ≠ m + 1\nj : Fin (m + 2)\nhi : Mono (SimplexCategory.δ j)\nh₂ : ¬Isδ₀ (SimplexCategory.δ j)\n⊢ HomologicalComplex.Hom.f PInfty (m + 1) ≫ X.map (SimplexCategory.δ j).op = 0\n[PROOFSTEP]\nrw [Isδ₀.iff] at h₂ \n[GOAL]\ncase h.intro.zero.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm : ℕ\ni : Δ' ⟶ [m + 1]\nhi✝ : Mono i\nh₁✝ : len Δ' ≠ m + 1\nh₂✝ : ¬Isδ₀ i\nh₁ : len [m] ≠ m + 1\nj : Fin (m + 2)\nhi : Mono (SimplexCategory.δ j)\nh₂ : ¬j = 0\n⊢ HomologicalComplex.Hom.f PInfty (m + 1) ≫ X.map (SimplexCategory.δ j).op = 0\n[PROOFSTEP]\nhave h₃ : 1 ≤ (j : ℕ) := by\n  by_contra h\n  exact h₂ (by simpa only [Fin.ext_iff, not_le, Nat.lt_one_iff] using h)\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm : ℕ\ni : Δ' ⟶ [m + 1]\nhi✝ : Mono i\nh₁✝ : len Δ' ≠ m + 1\nh₂✝ : ¬Isδ₀ i\nh₁ : len [m] ≠ m + 1\nj : Fin (m + 2)\nhi : Mono (SimplexCategory.δ j)\nh₂ : ¬j = 0\n⊢ 1 ≤ ↑j\n[PROOFSTEP]\nby_contra h\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm : ℕ\ni : Δ' ⟶ [m + 1]\nhi✝ : Mono i\nh₁✝ : len Δ' ≠ m + 1\nh₂✝ : ¬Isδ₀ i\nh₁ : len [m] ≠ m + 1\nj : Fin (m + 2)\nhi : Mono (SimplexCategory.δ j)\nh₂ : ¬j = 0\nh : ¬1 ≤ ↑j\n⊢ False\n[PROOFSTEP]\nexact h₂ (by simpa only [Fin.ext_iff, not_le, Nat.lt_one_iff] using h)\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm : ℕ\ni : Δ' ⟶ [m + 1]\nhi✝ : Mono i\nh₁✝ : len Δ' ≠ m + 1\nh₂✝ : ¬Isδ₀ i\nh₁ : len [m] ≠ m + 1\nj : Fin (m + 2)\nhi : Mono (SimplexCategory.δ j)\nh₂ : ¬j = 0\nh : ¬1 ≤ ↑j\n⊢ j = 0\n[PROOFSTEP]\nsimpa only [Fin.ext_iff, not_le, Nat.lt_one_iff] using h\n[GOAL]\ncase h.intro.zero.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm : ℕ\ni : Δ' ⟶ [m + 1]\nhi✝ : Mono i\nh₁✝ : len Δ' ≠ m + 1\nh₂✝ : ¬Isδ₀ i\nh₁ : len [m] ≠ m + 1\nj : Fin (m + 2)\nhi : Mono (SimplexCategory.δ j)\nh₂ : ¬j = 0\nh₃ : 1 ≤ ↑j\n⊢ HomologicalComplex.Hom.f PInfty (m + 1) ≫ X.map (SimplexCategory.δ j).op = 0\n[PROOFSTEP]\nexact (HigherFacesVanish.of_P (m + 1) m).comp_δ_eq_zero j h₂ (by linarith)\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm : ℕ\ni : Δ' ⟶ [m + 1]\nhi✝ : Mono i\nh₁✝ : len Δ' ≠ m + 1\nh₂✝ : ¬Isδ₀ i\nh₁ : len [m] ≠ m + 1\nj : Fin (m + 2)\nhi : Mono (SimplexCategory.δ j)\nh₂ : ¬j = 0\nh₃ : 1 ≤ ↑j\n⊢ m + 2 ≤ ↑j + (m + 1)\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h.intro.succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\ni✝ : Δ' ⟶ [n]\nhi✝ : Mono i✝\nh₁✝ : len Δ' ≠ n\nh₂✝ : ¬Isδ₀ i✝\nm : ℕ\ni : [m] ⟶ [n]\nhi : Mono i\nh₁ : len [m] ≠ n\nh₂ : ¬Isδ₀ i\nk : ℕ\nhk : n = m + Nat.succ k + 1\n⊢ HomologicalComplex.Hom.f PInfty n ≫ X.map i.op = 0\n[PROOFSTEP]\nsimp only [Nat.succ_eq_add_one, ← add_assoc] at hk \n[GOAL]\ncase h.intro.succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\ni✝ : Δ' ⟶ [n]\nhi✝ : Mono i✝\nh₁✝ : len Δ' ≠ n\nh₂✝ : ¬Isδ₀ i✝\nm : ℕ\ni : [m] ⟶ [n]\nhi : Mono i\nh₁ : len [m] ≠ n\nh₂ : ¬Isδ₀ i\nk : ℕ\nhk : n = m + k + 1 + 1\n⊢ HomologicalComplex.Hom.f PInfty n ≫ X.map i.op = 0\n[PROOFSTEP]\nclear h₂ hi\n[GOAL]\ncase h.intro.succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\ni✝ : Δ' ⟶ [n]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ n\nh₂ : ¬Isδ₀ i✝\nm : ℕ\ni : [m] ⟶ [n]\nh₁ : len [m] ≠ n\nk : ℕ\nhk : n = m + k + 1 + 1\n⊢ HomologicalComplex.Hom.f PInfty n ≫ X.map i.op = 0\n[PROOFSTEP]\nsubst hk\n[GOAL]\ncase h.intro.succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\ni : [m] ⟶ [m + k + 1 + 1]\nh₁ : len [m] ≠ m + k + 1 + 1\n⊢ HomologicalComplex.Hom.f PInfty (m + k + 1 + 1) ≫ X.map i.op = 0\n[PROOFSTEP]\nobtain ⟨j₁ : Fin (_ + 1), i, rfl⟩ :=\n  eq_comp_δ_of_not_surjective i fun h =>\n    by\n    have h' := len_le_of_epi (SimplexCategory.epi_iff_surjective.2 h)\n    dsimp at h' \n    linarith\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\ni : [m] ⟶ [m + k + 1 + 1]\nh₁ : len [m] ≠ m + k + 1 + 1\nh : Function.Surjective ↑(Hom.toOrderHom i)\n⊢ False\n[PROOFSTEP]\nhave h' := len_le_of_epi (SimplexCategory.epi_iff_surjective.2 h)\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\ni : [m] ⟶ [m + k + 1 + 1]\nh₁ : len [m] ≠ m + k + 1 + 1\nh : Function.Surjective ↑(Hom.toOrderHom i)\nh' : len [m + k + 1 + 1] ≤ len [m]\n⊢ False\n[PROOFSTEP]\ndsimp at h' \n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\ni : [m] ⟶ [m + k + 1 + 1]\nh₁ : len [m] ≠ m + k + 1 + 1\nh : Function.Surjective ↑(Hom.toOrderHom i)\nh' : m + k + 1 + 1 ≤ m\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h.intro.succ.intro.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₁ : Fin (m + k + 2 + 1)\ni : [m] ⟶ [m + k + 1]\n⊢ HomologicalComplex.Hom.f PInfty (m + k + 1 + 1) ≫ X.map (i ≫ SimplexCategory.δ j₁).op = 0\n[PROOFSTEP]\nobtain ⟨j₂, i, rfl⟩ :=\n  eq_comp_δ_of_not_surjective i fun h =>\n    by\n    have h' := len_le_of_epi (SimplexCategory.epi_iff_surjective.2 h)\n    dsimp at h' \n    linarith\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₁ : Fin (m + k + 2 + 1)\ni : [m] ⟶ [m + k + 1]\nh : Function.Surjective ↑(Hom.toOrderHom i)\n⊢ False\n[PROOFSTEP]\nhave h' := len_le_of_epi (SimplexCategory.epi_iff_surjective.2 h)\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₁ : Fin (m + k + 2 + 1)\ni : [m] ⟶ [m + k + 1]\nh : Function.Surjective ↑(Hom.toOrderHom i)\nh' : len [m + k + 1] ≤ len [m]\n⊢ False\n[PROOFSTEP]\ndsimp at h' \n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₁ : Fin (m + k + 2 + 1)\ni : [m] ⟶ [m + k + 1]\nh : Function.Surjective ↑(Hom.toOrderHom i)\nh' : m + k + 1 ≤ m\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h.intro.succ.intro.intro.intro.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₁ : Fin (m + k + 2 + 1)\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\n⊢ HomologicalComplex.Hom.f PInfty (m + k + 1 + 1) ≫ X.map ((i ≫ SimplexCategory.δ j₂) ≫ SimplexCategory.δ j₁).op = 0\n[PROOFSTEP]\nby_cases hj₁ : j₁ = 0\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₁ : Fin (m + k + 2 + 1)\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\nhj₁ : j₁ = 0\n⊢ HomologicalComplex.Hom.f PInfty (m + k + 1 + 1) ≫ X.map ((i ≫ SimplexCategory.δ j₂) ≫ SimplexCategory.δ j₁).op = 0\n[PROOFSTEP]\nsubst hj₁\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\n⊢ HomologicalComplex.Hom.f PInfty (m + k + 1 + 1) ≫ X.map ((i ≫ SimplexCategory.δ j₂) ≫ SimplexCategory.δ 0).op = 0\n[PROOFSTEP]\nrw [assoc, ← SimplexCategory.δ_comp_δ'' (Fin.zero_le _)]\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\n⊢ HomologicalComplex.Hom.f PInfty (m + k + 1 + 1) ≫\n      X.map (i ≫ SimplexCategory.δ (Fin.castLT 0 (_ : ↑0 < m + k + 2)) ≫ SimplexCategory.δ (Fin.succ j₂)).op =\n    0\n[PROOFSTEP]\nsimp only [op_comp, X.map_comp, assoc, PInfty_f]\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\n⊢ HomologicalComplex.Hom.f (P (m + k + 1 + 1)) (m + k + 1 + 1) ≫\n      X.map (SimplexCategory.δ (Fin.succ j₂)).op ≫\n        X.map (SimplexCategory.δ (Fin.castLT 0 (_ : ↑0 < m + k + 2))).op ≫ X.map i.op =\n    0\n[PROOFSTEP]\nerw [(HigherFacesVanish.of_P _ _).comp_δ_eq_zero_assoc _ j₂.succ_ne_zero, zero_comp]\n[GOAL]\ncase pos.hj₂\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\n⊢ m + k + 1 + 2 ≤ ↑(Fin.succ j₂) + (m + k + 1 + 1)\n[PROOFSTEP]\nsimp only [Nat.succ_eq_add_one, Nat.add, Fin.succ]\n[GOAL]\ncase pos.hj₂\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\n⊢ m + k + 1 + 2 ≤ ↑j₂ + 1 + (m + k + 1 + 1)\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₁ : Fin (m + k + 2 + 1)\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\nhj₁ : ¬j₁ = 0\n⊢ HomologicalComplex.Hom.f PInfty (m + k + 1 + 1) ≫ X.map ((i ≫ SimplexCategory.δ j₂) ≫ SimplexCategory.δ j₁).op = 0\n[PROOFSTEP]\nsimp only [op_comp, X.map_comp, assoc, PInfty_f]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₁ : Fin (m + k + 2 + 1)\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\nhj₁ : ¬j₁ = 0\n⊢ HomologicalComplex.Hom.f (P (m + k + 1 + 1)) (m + k + 1 + 1) ≫\n      X.map (SimplexCategory.δ j₁).op ≫ X.map (SimplexCategory.δ j₂).op ≫ X.map i.op =\n    0\n[PROOFSTEP]\nerw [(HigherFacesVanish.of_P _ _).comp_δ_eq_zero_assoc _ hj₁, zero_comp]\n[GOAL]\ncase neg.hj₂\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₁ : Fin (m + k + 2 + 1)\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\nhj₁ : ¬j₁ = 0\n⊢ m + k + 1 + 2 ≤ ↑j₁ + (m + k + 1 + 1)\n[PROOFSTEP]\nby_contra\n[GOAL]\ncase neg.hj₂\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₁ : Fin (m + k + 2 + 1)\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\nhj₁ : ¬j₁ = 0\nx✝ : ¬m + k + 1 + 2 ≤ ↑j₁ + (m + k + 1 + 1)\n⊢ False\n[PROOFSTEP]\nexact hj₁ (by simp only [Fin.ext_iff, Fin.val_zero]; linarith)\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₁ : Fin (m + k + 2 + 1)\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\nhj₁ : ¬j₁ = 0\nx✝ : ¬m + k + 1 + 2 ≤ ↑j₁ + (m + k + 1 + 1)\n⊢ j₁ = 0\n[PROOFSTEP]\nsimp only [Fin.ext_iff, Fin.val_zero]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nm k : ℕ\ni✝ : Δ' ⟶ [m + k + 1 + 1]\nhi : Mono i✝\nh₁✝ : len Δ' ≠ m + k + 1 + 1\nh₂ : ¬Isδ₀ i✝\nh₁ : len [m] ≠ m + k + 1 + 1\nj₁ : Fin (m + k + 2 + 1)\nj₂ : Fin (m + k + 2)\ni : [m] ⟶ [m + k]\nhj₁ : ¬j₁ = 0\nx✝ : ¬m + k + 1 + 2 ≤ ↑j₁ + (m + k + 1 + 1)\n⊢ ↑j₁ = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni : Δ ⟶ Δ'\ninst✝ : Mono i\n⊢ Γ₀.Obj.Termwise.mapMono K[X] i ≫ HomologicalComplex.Hom.f PInfty (len Δ) =\n    HomologicalComplex.Hom.f PInfty (len Δ') ≫ X.map i.op\n[PROOFSTEP]\ninduction' Δ using SimplexCategory.rec with n\n[GOAL]\ncase h\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝ : Δ ⟶ Δ'\ninst✝¹ : Mono i✝\nn : ℕ\ni : [n] ⟶ Δ'\ninst✝ : Mono i\n⊢ Γ₀.Obj.Termwise.mapMono K[X] i ≫ HomologicalComplex.Hom.f PInfty (len [n]) =\n    HomologicalComplex.Hom.f PInfty (len Δ') ≫ X.map i.op\n[PROOFSTEP]\ninduction' Δ' using SimplexCategory.rec with n'\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\n⊢ Γ₀.Obj.Termwise.mapMono K[X] i ≫ HomologicalComplex.Hom.f PInfty (len [n]) =\n    HomologicalComplex.Hom.f PInfty (len [n']) ≫ X.map i.op\n[PROOFSTEP]\ndsimp\n  -- We start with the case `i` is an identity\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\n⊢ Γ₀.Obj.Termwise.mapMono K[X] i ≫ HomologicalComplex.Hom.f PInfty n = HomologicalComplex.Hom.f PInfty n' ≫ X.map i.op\n[PROOFSTEP]\nby_cases n = n'\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\n⊢ Γ₀.Obj.Termwise.mapMono K[X] i ≫ HomologicalComplex.Hom.f PInfty n = HomologicalComplex.Hom.f PInfty n' ≫ X.map i.op\n[PROOFSTEP]\nby_cases n = n'\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : n = n'\n⊢ Γ₀.Obj.Termwise.mapMono K[X] i ≫ HomologicalComplex.Hom.f PInfty n = HomologicalComplex.Hom.f PInfty n' ≫ X.map i.op\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n]\ninst✝ : Mono i\n⊢ Γ₀.Obj.Termwise.mapMono K[X] i ≫ HomologicalComplex.Hom.f PInfty n = HomologicalComplex.Hom.f PInfty n ≫ X.map i.op\n[PROOFSTEP]\nsimp only [SimplexCategory.eq_id_of_mono i, Γ₀.Obj.Termwise.mapMono_id, op_id, X.map_id]\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n]\ninst✝ : Mono i\n⊢ 𝟙 (HomologicalComplex.X K[X] (len [n])) ≫ HomologicalComplex.Hom.f PInfty n =\n    HomologicalComplex.Hom.f PInfty n ≫ 𝟙 (X.obj (op [n]))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n]\ninst✝ : Mono i\n⊢ 𝟙 (X.obj (op [n])) ≫ HomologicalComplex.Hom.f PInfty n = HomologicalComplex.Hom.f PInfty n ≫ 𝟙 (X.obj (op [n]))\n[PROOFSTEP]\nsimp only [id_comp, comp_id]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : ¬n = n'\n⊢ Γ₀.Obj.Termwise.mapMono K[X] i ≫ HomologicalComplex.Hom.f PInfty n = HomologicalComplex.Hom.f PInfty n' ≫ X.map i.op\n[PROOFSTEP]\nby_cases hi : Isδ₀ i\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : ¬n = n'\nhi : Isδ₀ i\n⊢ Γ₀.Obj.Termwise.mapMono K[X] i ≫ HomologicalComplex.Hom.f PInfty n = HomologicalComplex.Hom.f PInfty n' ≫ X.map i.op\n[PROOFSTEP]\nhave h' : n' = n + 1 := hi.left\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : ¬n = n'\nhi : Isδ₀ i\nh' : n' = n + 1\n⊢ Γ₀.Obj.Termwise.mapMono K[X] i ≫ HomologicalComplex.Hom.f PInfty n = HomologicalComplex.Hom.f PInfty n' ≫ X.map i.op\n[PROOFSTEP]\nsubst h'\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\n⊢ Γ₀.Obj.Termwise.mapMono K[X] i ≫ HomologicalComplex.Hom.f PInfty n =\n    HomologicalComplex.Hom.f PInfty (n + 1) ≫ X.map i.op\n[PROOFSTEP]\nsimp only [Γ₀.Obj.Termwise.mapMono_δ₀' _ i hi]\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\n⊢ HomologicalComplex.d K[X] (len [n + 1]) (len [n]) ≫ HomologicalComplex.Hom.f PInfty n =\n    HomologicalComplex.Hom.f PInfty (n + 1) ≫ X.map i.op\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\n⊢ HomologicalComplex.d K[X] (n + 1) n ≫ HomologicalComplex.Hom.f PInfty n =\n    HomologicalComplex.Hom.f PInfty (n + 1) ≫ X.map i.op\n[PROOFSTEP]\nrw [← PInfty.comm _ n, AlternatingFaceMapComplex.obj_d_eq]\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\n⊢ (HomologicalComplex.Hom.f PInfty (n + 1) ≫ Finset.sum Finset.univ fun i => (-1) ^ ↑i • SimplicialObject.δ X i) =\n    HomologicalComplex.Hom.f PInfty (n + 1) ≫ X.map i.op\n[PROOFSTEP]\nsimp only [eq_self_iff_true, id_comp, if_true, Preadditive.comp_sum]\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\n⊢ (Finset.sum Finset.univ fun j => HomologicalComplex.Hom.f PInfty (n + 1) ≫ ((-1) ^ ↑j • SimplicialObject.δ X j)) =\n    HomologicalComplex.Hom.f PInfty (n + 1) ≫ X.map i.op\n[PROOFSTEP]\nrw [Finset.sum_eq_single (0 : Fin (n + 2))]\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\n⊢ HomologicalComplex.Hom.f PInfty (n + 1) ≫ ((-1) ^ ↑0 • SimplicialObject.δ X 0) =\n    HomologicalComplex.Hom.f PInfty (n + 1) ≫ X.map i.op\ncase pos.h₀\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\n⊢ ∀ (b : Fin (n + 2)),\n    b ∈ Finset.univ → b ≠ 0 → HomologicalComplex.Hom.f PInfty (n + 1) ≫ ((-1) ^ ↑b • SimplicialObject.δ X b) = 0\ncase pos.h₁\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\n⊢ ¬0 ∈ Finset.univ → HomologicalComplex.Hom.f PInfty (n + 1) ≫ ((-1) ^ ↑0 • SimplicialObject.δ X 0) = 0\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase pos.h₀\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\n⊢ ∀ (b : Fin (n + 2)),\n    b ∈ Finset.univ → b ≠ 0 → HomologicalComplex.Hom.f PInfty (n + 1) ≫ ((-1) ^ ↑b • SimplicialObject.δ X b) = 0\n[PROOFSTEP]\nintro b _ hb\n[GOAL]\ncase pos.h₀\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\nb : Fin (n + 2)\na✝ : b ∈ Finset.univ\nhb : b ≠ 0\n⊢ HomologicalComplex.Hom.f PInfty (n + 1) ≫ ((-1) ^ ↑b • SimplicialObject.δ X b) = 0\n[PROOFSTEP]\nrw [Preadditive.comp_zsmul]\n[GOAL]\ncase pos.h₀\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\nb : Fin (n + 2)\na✝ : b ∈ Finset.univ\nhb : b ≠ 0\n⊢ (-1) ^ ↑b • HomologicalComplex.Hom.f PInfty (n + 1) ≫ SimplicialObject.δ X b = 0\n[PROOFSTEP]\nerw [PInfty_comp_map_mono_eq_zero X (SimplexCategory.δ b) h\n    (by\n      rw [Isδ₀.iff]\n      exact hb),\n  zsmul_zero]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\nb : Fin (n + 2)\na✝ : b ∈ Finset.univ\nhb : b ≠ 0\n⊢ ¬Isδ₀ (SimplexCategory.δ b)\n[PROOFSTEP]\nrw [Isδ₀.iff]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\nb : Fin (n + 2)\na✝ : b ∈ Finset.univ\nhb : b ≠ 0\n⊢ ¬b = 0\n[PROOFSTEP]\nexact hb\n[GOAL]\ncase pos.h₁\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\n⊢ ¬0 ∈ Finset.univ → HomologicalComplex.Hom.f PInfty (n + 1) ≫ ((-1) ^ ↑0 • SimplicialObject.δ X 0) = 0\n[PROOFSTEP]\nsimp only [Finset.mem_univ, not_true, IsEmpty.forall_iff]\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\n⊢ HomologicalComplex.Hom.f PInfty (n + 1) ≫ ((-1) ^ ↑0 • SimplicialObject.δ X 0) =\n    HomologicalComplex.Hom.f PInfty (n + 1) ≫ X.map i.op\n[PROOFSTEP]\nsimp only [hi.eq_δ₀, Fin.val_zero, pow_zero, one_zsmul]\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\ni✝ : Δ ⟶ [n + 1]\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n + 1]\ninst✝ : Mono i\nh : ¬n = n + 1\nhi : Isδ₀ i\n⊢ HomologicalComplex.Hom.f PInfty (n + 1) ≫ SimplicialObject.δ X 0 =\n    HomologicalComplex.Hom.f PInfty (n + 1) ≫ X.map (SimplexCategory.δ 0).op\n[PROOFSTEP]\nrfl\n  -- The case `i ≠ δ 0`\n[GOAL]\ncase neg\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : ¬n = n'\nhi : ¬Isδ₀ i\n⊢ Γ₀.Obj.Termwise.mapMono K[X] i ≫ HomologicalComplex.Hom.f PInfty n = HomologicalComplex.Hom.f PInfty n' ≫ X.map i.op\n[PROOFSTEP]\nrw [Γ₀.Obj.Termwise.mapMono_eq_zero _ i _ hi, zero_comp]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : ¬n = n'\nhi : ¬Isδ₀ i\n⊢ 0 = HomologicalComplex.Hom.f PInfty n' ≫ X.map i.op\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : ¬n = n'\nhi : ¬Isδ₀ i\n⊢ [n'] ≠ [n]\n[PROOFSTEP]\nswap\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : ¬n = n'\nhi : ¬Isδ₀ i\n⊢ [n'] ≠ [n]\n[PROOFSTEP]\nby_contra h'\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : ¬n = n'\nhi : ¬Isδ₀ i\nh' : [n'] = [n]\n⊢ False\n[PROOFSTEP]\nexact h (congr_arg SimplexCategory.len h'.symm)\n[GOAL]\ncase neg\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : ¬n = n'\nhi : ¬Isδ₀ i\n⊢ 0 = HomologicalComplex.Hom.f PInfty n' ≫ X.map i.op\n[PROOFSTEP]\nrw [PInfty_comp_map_mono_eq_zero]\n[GOAL]\ncase neg.h₁\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : ¬n = n'\nhi : ¬Isδ₀ i\n⊢ len [n] ≠ n'\n[PROOFSTEP]\nexact h\n[GOAL]\ncase neg.h₂\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : ¬n = n'\nhi : ¬Isδ₀ i\n⊢ ¬Isδ₀ i\n[PROOFSTEP]\nby_contra h'\n[GOAL]\ncase neg.h₂\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\nX : SimplicialObject C\nΔ Δ' : SimplexCategory\ni✝² : Δ ⟶ Δ'\ninst✝³ : Mono i✝²\nn : ℕ\ni✝¹ : [n] ⟶ Δ'\ninst✝² : Mono i✝¹\nn' : ℕ\ni✝ : Δ ⟶ [n']\ninst✝¹ : Mono i✝\ni : [n] ⟶ [n']\ninst✝ : Mono i\nh : ¬n = n'\nhi : ¬Isδ₀ i\nh' : Isδ₀ i\n⊢ False\n[PROOFSTEP]\nexact hi h'\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\nΔ Δ' : SimplexCategoryᵒᵖ\nθ : Δ ⟶ Δ'\n⊢ ((N₁ ⋙ Γ₂).obj X).X.map θ ≫\n      (fun Δ =>\n          Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n            HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op)\n        Δ' =\n    (fun Δ =>\n          Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n            HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op)\n        Δ ≫\n      ((toKaroubi (SimplicialObject C)).obj X).X.map θ\n[PROOFSTEP]\napply (Γ₀.splitting K[X]).hom_ext'\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\nΔ Δ' : SimplexCategoryᵒᵖ\nθ : Δ ⟶ Δ'\n⊢ ∀ (A : Splitting.IndexSet Δ),\n    Splitting.ιSummand (Γ₀.splitting K[X]) A ≫\n        ((N₁ ⋙ Γ₂).obj X).X.map θ ≫\n          (fun Δ =>\n              Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n                HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op)\n            Δ' =\n      Splitting.ιSummand (Γ₀.splitting K[X]) A ≫\n        (fun Δ =>\n              Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n                HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op)\n            Δ ≫\n          ((toKaroubi (SimplicialObject C)).obj X).X.map θ\n[PROOFSTEP]\nintro A\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\nΔ Δ' : SimplexCategoryᵒᵖ\nθ : Δ ⟶ Δ'\nA : Splitting.IndexSet Δ\n⊢ Splitting.ιSummand (Γ₀.splitting K[X]) A ≫\n      ((N₁ ⋙ Γ₂).obj X).X.map θ ≫\n        (fun Δ =>\n            Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n              HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op)\n          Δ' =\n    Splitting.ιSummand (Γ₀.splitting K[X]) A ≫\n      (fun Δ =>\n            Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n              HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op)\n          Δ ≫\n        ((toKaroubi (SimplicialObject C)).obj X).X.map θ\n[PROOFSTEP]\nchange _ ≫ (Γ₀.obj K[X]).map θ ≫ _ = _\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\nΔ Δ' : SimplexCategoryᵒᵖ\nθ : Δ ⟶ Δ'\nA : Splitting.IndexSet Δ\n⊢ Splitting.ιSummand (Γ₀.splitting K[X]) A ≫\n      (Γ₀.obj K[X]).map θ ≫\n        (fun Δ =>\n            Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n              HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op)\n          Δ' =\n    Splitting.ιSummand (Γ₀.splitting K[X]) A ≫\n      (fun Δ =>\n            Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n              HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op)\n          Δ ≫\n        ((toKaroubi (SimplicialObject C)).obj X).X.map θ\n[PROOFSTEP]\nsimp only [Splitting.ι_desc_assoc, assoc, Γ₀.Obj.map_on_summand'_assoc, Splitting.ι_desc]\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\nΔ Δ' : SimplexCategoryᵒᵖ\nθ : Δ ⟶ Δ'\nA : Splitting.IndexSet Δ\n⊢ Γ₀.Obj.Termwise.mapMono K[X] (image.ι (θ.unop ≫ Splitting.IndexSet.e A)) ≫\n      HomologicalComplex.Hom.f PInfty (len (Splitting.IndexSet.pull A θ).fst.unop) ≫\n        X.map (Splitting.IndexSet.e (Splitting.IndexSet.pull A θ)).op =\n    HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫\n      X.map (Splitting.IndexSet.e A).op ≫ ((toKaroubi (SimplicialObject C)).obj X).X.map θ\n[PROOFSTEP]\nerw [Γ₀_obj_termwise_mapMono_comp_PInfty_assoc X (image.ι (θ.unop ≫ A.e))]\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\nΔ Δ' : SimplexCategoryᵒᵖ\nθ : Δ ⟶ Δ'\nA : Splitting.IndexSet Δ\n⊢ HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫\n      X.map (image.ι (θ.unop ≫ Splitting.IndexSet.e A)).op ≫\n        X.map (Splitting.IndexSet.e (Splitting.IndexSet.pull A θ)).op =\n    HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫\n      X.map (Splitting.IndexSet.e A).op ≫ ((toKaroubi (SimplicialObject C)).obj X).X.map θ\n[PROOFSTEP]\ndsimp only [toKaroubi]\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\nΔ Δ' : SimplexCategoryᵒᵖ\nθ : Δ ⟶ Δ'\nA : Splitting.IndexSet Δ\n⊢ HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫\n      X.map (image.ι (θ.unop ≫ Splitting.IndexSet.e A)).op ≫\n        X.map (Splitting.IndexSet.e (Splitting.IndexSet.pull A θ)).op =\n    HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op ≫ X.map θ\n[PROOFSTEP]\nsimp only [← X.map_comp]\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\nΔ Δ' : SimplexCategoryᵒᵖ\nθ : Δ ⟶ Δ'\nA : Splitting.IndexSet Δ\n⊢ HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫\n      X.map ((image.ι (θ.unop ≫ Splitting.IndexSet.e A)).op ≫ (Splitting.IndexSet.e (Splitting.IndexSet.pull A θ)).op) =\n    HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map ((Splitting.IndexSet.e A).op ≫ θ)\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.e_a.e_a\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\nΔ Δ' : SimplexCategoryᵒᵖ\nθ : Δ ⟶ Δ'\nA : Splitting.IndexSet Δ\n⊢ (image.ι (θ.unop ≫ Splitting.IndexSet.e A)).op ≫ (Splitting.IndexSet.e (Splitting.IndexSet.pull A θ)).op =\n    (Splitting.IndexSet.e A).op ≫ θ\n[PROOFSTEP]\nsimp only [eqToHom_refl, id_comp, comp_id, ← op_comp]\n[GOAL]\ncase h.e_a.e_a\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\nΔ Δ' : SimplexCategoryᵒᵖ\nθ : Δ ⟶ Δ'\nA : Splitting.IndexSet Δ\n⊢ (Splitting.IndexSet.e (Splitting.IndexSet.pull A θ) ≫ image.ι (θ.unop ≫ Splitting.IndexSet.e A)).op =\n    (Splitting.IndexSet.e A).op ≫ θ\n[PROOFSTEP]\nexact Quiver.Hom.unop_inj (A.fac_pull θ)\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ (NatTrans.mk fun Δ =>\n      Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n        HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op) =\n    ((N₁ ⋙ Γ₂).obj X).p ≫\n      (NatTrans.mk fun Δ =>\n          Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n            HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op) ≫\n        ((toKaroubi (SimplicialObject C)).obj X).p\n[PROOFSTEP]\napply (Γ₀.splitting K[X]).hom_ext\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ ∀ (n : ℕ),\n    Splitting.φ (Γ₀.splitting K[X])\n        (NatTrans.mk fun Δ =>\n          Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n            HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op)\n        n =\n      Splitting.φ (Γ₀.splitting K[X])\n        (((N₁ ⋙ Γ₂).obj X).p ≫\n          (NatTrans.mk fun Δ =>\n              Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n                HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op) ≫\n            ((toKaroubi (SimplicialObject C)).obj X).p)\n        n\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\nn : ℕ\n⊢ Splitting.φ (Γ₀.splitting K[X])\n      (NatTrans.mk fun Δ =>\n        Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n          HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op)\n      n =\n    Splitting.φ (Γ₀.splitting K[X])\n      (((N₁ ⋙ Γ₂).obj X).p ≫\n        (NatTrans.mk fun Δ =>\n            Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n              HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op) ≫\n          ((toKaroubi (SimplicialObject C)).obj X).p)\n      n\n[PROOFSTEP]\ndsimp [N₁]\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\nn : ℕ\n⊢ (Splitting.ι (Γ₀.splitting K[X]) n ≫\n      Splitting.desc (Γ₀.splitting K[X]) (op [n]) fun A =>\n        HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op) =\n    Splitting.ι (Γ₀.splitting K[X]) n ≫\n      (Splitting.desc (Γ₀.splitting K[X]) (op [n]) fun A =>\n          HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ Splitting.ιSummand (Γ₀.splitting K[X]) A) ≫\n        (Splitting.desc (Γ₀.splitting K[X]) (op [n]) fun A =>\n            HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op) ≫\n          𝟙 (X.obj (op [n]))\n[PROOFSTEP]\nsimp only [← Splitting.ιSummand_id, Splitting.ι_desc, comp_id, Splitting.ι_desc_assoc, assoc, PInfty_f_idem_assoc]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\nf : X ⟶ Y\n⊢ (N₁ ⋙ Γ₂).map f ≫\n      (fun X =>\n          Karoubi.Hom.mk\n            (NatTrans.mk fun Δ =>\n              Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n                HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op))\n        Y =\n    (fun X =>\n          Karoubi.Hom.mk\n            (NatTrans.mk fun Δ =>\n              Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n                HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op))\n        X ≫\n      (toKaroubi (SimplicialObject C)).map f\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\nf : X ⟶ Y\n⊢ ((N₁ ⋙ Γ₂).map f ≫\n        (fun X =>\n            Karoubi.Hom.mk\n              (NatTrans.mk fun Δ =>\n                Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n                  HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op))\n          Y).f =\n    ((fun X =>\n            Karoubi.Hom.mk\n              (NatTrans.mk fun Δ =>\n                Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n                  HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op))\n          X ≫\n        (toKaroubi (SimplicialObject C)).map f).f\n[PROOFSTEP]\napply (Γ₀.splitting K[X]).hom_ext\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\nf : X ⟶ Y\n⊢ ∀ (n : ℕ),\n    Splitting.φ (Γ₀.splitting K[X])\n        ((N₁ ⋙ Γ₂).map f ≫\n            (fun X =>\n                Karoubi.Hom.mk\n                  (NatTrans.mk fun Δ =>\n                    Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n                      HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op))\n              Y).f\n        n =\n      Splitting.φ (Γ₀.splitting K[X])\n        ((fun X =>\n                Karoubi.Hom.mk\n                  (NatTrans.mk fun Δ =>\n                    Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n                      HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op))\n              X ≫\n            (toKaroubi (SimplicialObject C)).map f).f\n        n\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\nf : X ⟶ Y\nn : ℕ\n⊢ Splitting.φ (Γ₀.splitting K[X])\n      ((N₁ ⋙ Γ₂).map f ≫\n          (fun X =>\n              Karoubi.Hom.mk\n                (NatTrans.mk fun Δ =>\n                  Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n                    HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op))\n            Y).f\n      n =\n    Splitting.φ (Γ₀.splitting K[X])\n      ((fun X =>\n              Karoubi.Hom.mk\n                (NatTrans.mk fun Δ =>\n                  Splitting.desc (Γ₀.splitting K[X]) Δ fun A =>\n                    HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op))\n            X ≫\n          (toKaroubi (SimplicialObject C)).map f).f\n      n\n[PROOFSTEP]\ndsimp [N₁, toKaroubi]\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{?u.47488, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\nf : X ⟶ Y\nn : ℕ\n⊢ (Splitting.ι (Γ₀.splitting K[X]) n ≫\n      (Splitting.desc (Γ₀.splitting K[X]) (op [n]) fun A =>\n          (HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ NatTrans.app f A.fst) ≫\n            Splitting.ιSummand (Γ₀.splitting K[Y]) A) ≫\n        Splitting.desc (Γ₀.splitting K[Y]) (op [n]) fun A =>\n          HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ Y.map (Splitting.IndexSet.e A).op) =\n    Splitting.ι (Γ₀.splitting K[X]) n ≫\n      (Splitting.desc (Γ₀.splitting K[X]) (op [n]) fun A =>\n          HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ X.map (Splitting.IndexSet.e A).op) ≫\n        NatTrans.app f (op [n])\n[PROOFSTEP]\nsimp only [← Splitting.ιSummand_id, Splitting.ι_desc, Splitting.ι_desc_assoc, assoc, PInfty_f_idem_assoc,\n  Karoubi.comp_f, NatTrans.comp_app, Γ₂_map_f_app, HomologicalComplex.comp_f, AlternatingFaceMapComplex.map_f,\n  PInfty_f_naturality_assoc, NatTrans.naturality, Splitting.IndexSet.id_fst, unop_op, len_mk]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.59660, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\n⊢ toKaroubi (SimplicialObject C) ⋙ N₂ ⋙ Γ₂ = N₁ ⋙ Γ₂\n[PROOFSTEP]\nrw [← Functor.assoc, compatibility_N₁_N₂]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.80371, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ (toKaroubi (SimplicialObject C) ⋙ N₂ ⋙ Γ₂).obj X = (N₁ ⋙ Γ₂).obj X\n[PROOFSTEP]\nrw [← Functor.assoc, compatibility_N₁_N₂]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app compatibility_Γ₂N₁_Γ₂N₂.hom X =\n    eqToHom (_ : (toKaroubi (SimplicialObject C) ⋙ N₂ ⋙ Γ₂).obj X = (N₁ ⋙ Γ₂).obj X)\n[PROOFSTEP]\ndsimp only [compatibility_Γ₂N₁_Γ₂N₂, CategoryTheory.eqToIso]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app (eqToHom (_ : toKaroubi (SimplicialObject C) ⋙ N₂ ⋙ Γ₂ = N₁ ⋙ Γ₂)) X =\n    eqToHom (_ : (toKaroubi (SimplicialObject C) ⋙ N₂ ⋙ Γ₂).obj X = (N₁ ⋙ Γ₂).obj X)\n[PROOFSTEP]\napply eqToHom_app\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.83718, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ (N₁ ⋙ Γ₂).obj X = (toKaroubi (SimplicialObject C) ⋙ N₂ ⋙ Γ₂).obj X\n[PROOFSTEP]\nrw [← Functor.assoc, compatibility_N₁_N₂]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app compatibility_Γ₂N₁_Γ₂N₂.inv X =\n    eqToHom (_ : (N₁ ⋙ Γ₂).obj X = (toKaroubi (SimplicialObject C) ⋙ N₂ ⋙ Γ₂).obj X)\n[PROOFSTEP]\nrw [← cancel_mono (compatibility_Γ₂N₁_Γ₂N₂.hom.app X), Iso.inv_hom_id_app, compatibility_Γ₂N₁_Γ₂N₂_hom_app,\n  eqToHom_trans, eqToHom_refl]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.89220, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\n⊢ ((whiskeringLeft (SimplicialObject C) (Karoubi (SimplicialObject C)) (Karoubi (SimplicialObject C))).obj\n          (toKaroubi (SimplicialObject C))).obj\n      (N₂ ⋙ Γ₂) ⟶\n    ((whiskeringLeft (SimplicialObject C) (Karoubi (SimplicialObject C)) (Karoubi (SimplicialObject C))).obj\n          (toKaroubi (SimplicialObject C))).obj\n      (𝟭 (Karoubi (SimplicialObject C)))\n[PROOFSTEP]\nexact compatibility_Γ₂N₁_Γ₂N₂.hom ≫ Γ₂N₁.natTrans\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.94055, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\n⊢ (N₂ ⋙ Γ₂).obj P ⟶ (𝟭 (Karoubi (SimplicialObject C))).obj P\n[PROOFSTEP]\nexact (N₂ ⋙ Γ₂).map P.decompId_i ≫ (compatibility_Γ₂N₁_Γ₂N₂.hom ≫ Γ₂N₁.natTrans).app P.X ≫ P.decompId_p\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\n⊢ NatTrans.app natTrans P =\n    (N₂ ⋙ Γ₂).map (Karoubi.decompId_i P) ≫\n      NatTrans.app (compatibility_Γ₂N₁_Γ₂N₂.hom ≫ Γ₂N₁.natTrans) P.X ≫ Karoubi.decompId_p P\n[PROOFSTEP]\ndsimp only [natTrans]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\n⊢ NatTrans.app\n      (((whiskeringLeft (SimplicialObject C) (Karoubi (SimplicialObject C)) (Karoubi (SimplicialObject C))).obj\n            (toKaroubi (SimplicialObject C))).preimage\n        (compatibility_Γ₂N₁_Γ₂N₂.hom ≫ Γ₂N₁.natTrans))\n      P =\n    (N₂ ⋙ Γ₂).map (Karoubi.decompId_i P) ≫\n      NatTrans.app (compatibility_Γ₂N₁_Γ₂N₂.hom ≫ Γ₂N₁.natTrans) P.X ≫ Karoubi.decompId_p P\n[PROOFSTEP]\nrw [whiskeringLeft_obj_preimage_app (compatibility_Γ₂N₁_Γ₂N₂.hom ≫ Γ₂N₁.natTrans : _ ⟶ toKaroubi _ ⋙ 𝟭 _) P,\n  Functor.id_map]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app Γ₂N₁.natTrans X =\n    (compatibility_Γ₂N₁_Γ₂N₂.app X).inv ≫ NatTrans.app Γ₂N₂.natTrans ((toKaroubi (SimplicialObject C)).obj X)\n[PROOFSTEP]\nrw [Γ₂N₂.natTrans_app_f_app]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app Γ₂N₁.natTrans X =\n    (compatibility_Γ₂N₁_Γ₂N₂.app X).inv ≫\n      (N₂ ⋙ Γ₂).map (Karoubi.decompId_i ((toKaroubi (SimplicialObject C)).obj X)) ≫\n        NatTrans.app (compatibility_Γ₂N₁_Γ₂N₂.hom ≫ Γ₂N₁.natTrans) ((toKaroubi (SimplicialObject C)).obj X).X ≫\n          Karoubi.decompId_p ((toKaroubi (SimplicialObject C)).obj X)\n[PROOFSTEP]\ndsimp only [Karoubi.decompId_i_toKaroubi, Karoubi.decompId_p_toKaroubi, Functor.comp_map, NatTrans.comp_app]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app Γ₂N₁.natTrans X =\n    (compatibility_Γ₂N₁_Γ₂N₂.app X).inv ≫\n      Γ₂.map (N₂.map (𝟙 ((toKaroubi (SimplicialObject C)).obj X))) ≫\n        (NatTrans.app compatibility_Γ₂N₁_Γ₂N₂.hom ((toKaroubi (SimplicialObject C)).obj X).X ≫\n            NatTrans.app Γ₂N₁.natTrans ((toKaroubi (SimplicialObject C)).obj X).X) ≫\n          𝟙 (Karoubi.mk ((toKaroubi (SimplicialObject C)).obj X).X (𝟙 ((toKaroubi (SimplicialObject C)).obj X).X))\n[PROOFSTEP]\nrw [N₂.map_id, Γ₂.map_id, Iso.app_inv]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app Γ₂N₁.natTrans X =\n    NatTrans.app compatibility_Γ₂N₁_Γ₂N₂.inv X ≫\n      𝟙 (Γ₂.obj (N₂.obj ((toKaroubi (SimplicialObject C)).obj X))) ≫\n        (NatTrans.app compatibility_Γ₂N₁_Γ₂N₂.hom ((toKaroubi (SimplicialObject C)).obj X).X ≫\n            NatTrans.app Γ₂N₁.natTrans ((toKaroubi (SimplicialObject C)).obj X).X) ≫\n          𝟙 (Karoubi.mk ((toKaroubi (SimplicialObject C)).obj X).X (𝟙 ((toKaroubi (SimplicialObject C)).obj X).X))\n[PROOFSTEP]\ndsimp only [toKaroubi]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app Γ₂N₁.natTrans X =\n    NatTrans.app compatibility_Γ₂N₁_Γ₂N₂.inv X ≫\n      𝟙 (Γ₂.obj (N₂.obj (Karoubi.mk X (𝟙 X)))) ≫\n        (NatTrans.app compatibility_Γ₂N₁_Γ₂N₂.hom X ≫ NatTrans.app Γ₂N₁.natTrans X) ≫ 𝟙 (Karoubi.mk X (𝟙 X))\n[PROOFSTEP]\nerw [id_comp]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app Γ₂N₁.natTrans X =\n    NatTrans.app compatibility_Γ₂N₁_Γ₂N₂.inv X ≫\n      (NatTrans.app compatibility_Γ₂N₁_Γ₂N₂.hom X ≫ NatTrans.app Γ₂N₁.natTrans X) ≫ 𝟙 (Karoubi.mk X (𝟙 X))\n[PROOFSTEP]\nrw [comp_id, Iso.inv_hom_id_app_assoc]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\n⊢ NatTrans.app N₂Γ₂.inv (N₂.obj P) ≫ N₂.map (NatTrans.app Γ₂N₂.natTrans P) = 𝟙 (N₂.obj P)\n[PROOFSTEP]\next n\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\nn : ℕ\n⊢ HomologicalComplex.Hom.f (NatTrans.app N₂Γ₂.inv (N₂.obj P) ≫ N₂.map (NatTrans.app Γ₂N₂.natTrans P)).f n =\n    HomologicalComplex.Hom.f (𝟙 (N₂.obj P)).f n\n[PROOFSTEP]\nhave eq₁ :\n  (N₂Γ₂.inv.app (N₂.obj P)).f.f n =\n    PInfty.f n ≫ P.p.app (op [n]) ≫ (Γ₀.splitting (N₂.obj P).X).ιSummand (Splitting.IndexSet.id (op [n])) :=\n  by simp only [N₂Γ₂_inv_app_f_f, N₂_obj_p_f, assoc]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\nn : ℕ\n⊢ HomologicalComplex.Hom.f (NatTrans.app N₂Γ₂.inv (N₂.obj P)).f n =\n    HomologicalComplex.Hom.f PInfty n ≫\n      NatTrans.app P.p (op [n]) ≫ Splitting.ιSummand (Γ₀.splitting (N₂.obj P).X) (Splitting.IndexSet.id (op [n]))\n[PROOFSTEP]\nsimp only [N₂Γ₂_inv_app_f_f, N₂_obj_p_f, assoc]\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\nn : ℕ\neq₁ :\n  HomologicalComplex.Hom.f (NatTrans.app N₂Γ₂.inv (N₂.obj P)).f n =\n    HomologicalComplex.Hom.f PInfty n ≫\n      NatTrans.app P.p (op [n]) ≫ Splitting.ιSummand (Γ₀.splitting (N₂.obj P).X) (Splitting.IndexSet.id (op [n]))\n⊢ HomologicalComplex.Hom.f (NatTrans.app N₂Γ₂.inv (N₂.obj P) ≫ N₂.map (NatTrans.app Γ₂N₂.natTrans P)).f n =\n    HomologicalComplex.Hom.f (𝟙 (N₂.obj P)).f n\n[PROOFSTEP]\nhave eq₂ :\n  (Γ₀.splitting (N₂.obj P).X).ιSummand (Splitting.IndexSet.id (op [n])) ≫ (N₂.map (Γ₂N₂.natTrans.app P)).f.f n =\n    PInfty.f n ≫ P.p.app (op [n]) :=\n  by\n  dsimp\n  simp only [assoc, Γ₂N₂.natTrans_app_f_app, Functor.comp_map, NatTrans.comp_app, Karoubi.comp_f,\n    compatibility_Γ₂N₁_Γ₂N₂_hom_app, eqToHom_refl, Karoubi.eqToHom_f, PInfty_on_Γ₀_splitting_summand_eq_self_assoc,\n    Functor.comp_obj]\n  dsimp [N₂]\n  simp only [Splitting.ι_desc_assoc, assoc, id_comp, unop_op, Splitting.IndexSet.id_fst, len_mk, Splitting.IndexSet.e,\n    Splitting.IndexSet.id_snd_coe, op_id, P.X.map_id, id_comp, PInfty_f_naturality_assoc, PInfty_f_idem_assoc, app_idem]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\nn : ℕ\neq₁ :\n  HomologicalComplex.Hom.f (NatTrans.app N₂Γ₂.inv (N₂.obj P)).f n =\n    HomologicalComplex.Hom.f PInfty n ≫\n      NatTrans.app P.p (op [n]) ≫ Splitting.ιSummand (Γ₀.splitting (N₂.obj P).X) (Splitting.IndexSet.id (op [n]))\n⊢ Splitting.ιSummand (Γ₀.splitting (N₂.obj P).X) (Splitting.IndexSet.id (op [n])) ≫\n      HomologicalComplex.Hom.f (N₂.map (NatTrans.app Γ₂N₂.natTrans P)).f n =\n    HomologicalComplex.Hom.f PInfty n ≫ NatTrans.app P.p (op [n])\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\nn : ℕ\neq₁ :\n  HomologicalComplex.Hom.f (NatTrans.app N₂Γ₂.inv (N₂.obj P)).f n =\n    HomologicalComplex.Hom.f PInfty n ≫\n      NatTrans.app P.p (op [n]) ≫ Splitting.ιSummand (Γ₀.splitting (N₂.obj P).X) (Splitting.IndexSet.id (op [n]))\n⊢ Splitting.ιSummand (Γ₀.splitting (N₂.obj P).X) (Splitting.IndexSet.id (op [n])) ≫\n      HomologicalComplex.Hom.f PInfty n ≫ NatTrans.app (NatTrans.app Γ₂N₂.natTrans P).f (op [n]) =\n    HomologicalComplex.Hom.f PInfty n ≫ NatTrans.app P.p (op [n])\n[PROOFSTEP]\nsimp only [assoc, Γ₂N₂.natTrans_app_f_app, Functor.comp_map, NatTrans.comp_app, Karoubi.comp_f,\n  compatibility_Γ₂N₁_Γ₂N₂_hom_app, eqToHom_refl, Karoubi.eqToHom_f, PInfty_on_Γ₀_splitting_summand_eq_self_assoc,\n  Functor.comp_obj]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\nn : ℕ\neq₁ :\n  HomologicalComplex.Hom.f (NatTrans.app N₂Γ₂.inv (N₂.obj P)).f n =\n    HomologicalComplex.Hom.f PInfty n ≫\n      NatTrans.app P.p (op [n]) ≫ Splitting.ιSummand (Γ₀.splitting (N₂.obj P).X) (Splitting.IndexSet.id (op [n]))\n⊢ Splitting.ιSummand (Γ₀.splitting (N₂.obj P).X) (Splitting.IndexSet.id (op [n])) ≫\n      NatTrans.app\n        ((Γ₂.map (N₂.map (Karoubi.decompId_i P))).f ≫\n          (Γ₂.obj (N₂.obj (Karoubi.mk P.X (𝟙 P.X)))).p ≫\n            𝟙 (Γ₂.obj (N₂.obj (Karoubi.mk P.X (𝟙 P.X)))).X ≫\n              (NatTrans.app Γ₂N₁.natTrans P.X).f ≫ (Karoubi.decompId_p P).f)\n        (op [n]) =\n    HomologicalComplex.Hom.f PInfty n ≫ NatTrans.app P.p (op [n])\n[PROOFSTEP]\ndsimp [N₂]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\nn : ℕ\neq₁ :\n  HomologicalComplex.Hom.f (NatTrans.app N₂Γ₂.inv (N₂.obj P)).f n =\n    HomologicalComplex.Hom.f PInfty n ≫\n      NatTrans.app P.p (op [n]) ≫ Splitting.ιSummand (Γ₀.splitting (N₂.obj P).X) (Splitting.IndexSet.id (op [n]))\n⊢ Splitting.ιSummand (Γ₀.splitting K[P.X]) (Splitting.IndexSet.id (op [n])) ≫\n      (Splitting.desc (Γ₀.splitting K[P.X]) (op [n]) fun A =>\n          (HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ NatTrans.app P.p A.fst) ≫\n            Splitting.ιSummand (Γ₀.splitting K[P.X]) A) ≫\n        (Splitting.desc (Γ₀.splitting K[P.X]) (op [n]) fun A =>\n            (HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ 𝟙 (P.X.obj A.fst)) ≫\n              Splitting.ιSummand (Γ₀.splitting K[P.X]) A) ≫\n          𝟙 (Γ₀.Obj.obj₂ K[P.X] (op [n])) ≫\n            (Splitting.desc (Γ₀.splitting K[P.X]) (op [n]) fun A =>\n                HomologicalComplex.Hom.f PInfty (len A.fst.unop) ≫ P.X.map (Splitting.IndexSet.e A).op) ≫\n              NatTrans.app P.p (op [n]) =\n    HomologicalComplex.Hom.f PInfty n ≫ NatTrans.app P.p (op [n])\n[PROOFSTEP]\nsimp only [Splitting.ι_desc_assoc, assoc, id_comp, unop_op, Splitting.IndexSet.id_fst, len_mk, Splitting.IndexSet.e,\n  Splitting.IndexSet.id_snd_coe, op_id, P.X.map_id, id_comp, PInfty_f_naturality_assoc, PInfty_f_idem_assoc, app_idem]\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\nn : ℕ\neq₁ :\n  HomologicalComplex.Hom.f (NatTrans.app N₂Γ₂.inv (N₂.obj P)).f n =\n    HomologicalComplex.Hom.f PInfty n ≫\n      NatTrans.app P.p (op [n]) ≫ Splitting.ιSummand (Γ₀.splitting (N₂.obj P).X) (Splitting.IndexSet.id (op [n]))\neq₂ :\n  Splitting.ιSummand (Γ₀.splitting (N₂.obj P).X) (Splitting.IndexSet.id (op [n])) ≫\n      HomologicalComplex.Hom.f (N₂.map (NatTrans.app Γ₂N₂.natTrans P)).f n =\n    HomologicalComplex.Hom.f PInfty n ≫ NatTrans.app P.p (op [n])\n⊢ HomologicalComplex.Hom.f (NatTrans.app N₂Γ₂.inv (N₂.obj P) ≫ N₂.map (NatTrans.app Γ₂N₂.natTrans P)).f n =\n    HomologicalComplex.Hom.f (𝟙 (N₂.obj P)).f n\n[PROOFSTEP]\nsimp only [Karoubi.comp_f, HomologicalComplex.comp_f, Karoubi.id_eq, N₂_obj_p_f, assoc, eq₁, eq₂,\n  PInfty_f_naturality_assoc, app_idem, PInfty_f_idem_assoc]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\n⊢ (𝟙 N₂ ◫ N₂Γ₂.inv) ≫ (Functor.associator N₂ Γ₂ N₂).inv ≫ Γ₂N₂.natTrans ◫ 𝟙 N₂ = 𝟙 N₂\n[PROOFSTEP]\next P : 2\n[GOAL]\ncase w.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\n⊢ NatTrans.app ((𝟙 N₂ ◫ N₂Γ₂.inv) ≫ (Functor.associator N₂ Γ₂ N₂).inv ≫ Γ₂N₂.natTrans ◫ 𝟙 N₂) P = NatTrans.app (𝟙 N₂) P\n[PROOFSTEP]\ndsimp only [NatTrans.comp_app, NatTrans.hcomp_app, Functor.comp_map, Functor.associator, NatTrans.id_app,\n  Functor.comp_obj]\n[GOAL]\ncase w.h\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\n⊢ (NatTrans.app N₂Γ₂.inv (N₂.obj P) ≫ N₂.map (Γ₂.map (𝟙 (N₂.obj P)))) ≫\n      𝟙 (N₂.obj (Γ₂.obj (N₂.obj P))) ≫ 𝟙 (N₂.obj (Γ₂.obj (N₂.obj P))) ≫ N₂.map (NatTrans.app Γ₂N₂.natTrans P) =\n    𝟙 (N₂.obj P)\n[PROOFSTEP]\nrw [Γ₂.map_id, N₂.map_id, comp_id, id_comp, id_comp, identity_N₂_objectwise P]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.207135, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\n⊢ IsIso Γ₂N₂.natTrans\n[PROOFSTEP]\nhave : ∀ P : Karoubi (SimplicialObject C), IsIso (Γ₂N₂.natTrans.app P) :=\n  by\n  intro P\n  have : IsIso (N₂.map (Γ₂N₂.natTrans.app P)) :=\n    by\n    have h := identity_N₂_objectwise P\n    erw [hom_comp_eq_id] at h \n    rw [h]\n    infer_instance\n  exact isIso_of_reflects_iso _ N₂\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.207135, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\n⊢ ∀ (P : Karoubi (SimplicialObject C)), IsIso (NatTrans.app Γ₂N₂.natTrans P)\n[PROOFSTEP]\nintro P\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.207135, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\n⊢ IsIso (NatTrans.app Γ₂N₂.natTrans P)\n[PROOFSTEP]\nhave : IsIso (N₂.map (Γ₂N₂.natTrans.app P)) :=\n  by\n  have h := identity_N₂_objectwise P\n  erw [hom_comp_eq_id] at h \n  rw [h]\n  infer_instance\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.207135, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\n⊢ IsIso (N₂.map (NatTrans.app Γ₂N₂.natTrans P))\n[PROOFSTEP]\nhave h := identity_N₂_objectwise P\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.207135, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\nh : NatTrans.app N₂Γ₂.inv (N₂.obj P) ≫ N₂.map (NatTrans.app Γ₂N₂.natTrans P) = 𝟙 (N₂.obj P)\n⊢ IsIso (N₂.map (NatTrans.app Γ₂N₂.natTrans P))\n[PROOFSTEP]\nerw [hom_comp_eq_id] at h \n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.207135, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\nh : N₂.map (NatTrans.app Γ₂N₂.natTrans P) = inv (NatTrans.app N₂Γ₂.inv (N₂.obj P))\n⊢ IsIso (N₂.map (NatTrans.app Γ₂N₂.natTrans P))\n[PROOFSTEP]\nrw [h]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.207135, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\nh : N₂.map (NatTrans.app Γ₂N₂.natTrans P) = inv (NatTrans.app N₂Γ₂.inv (N₂.obj P))\n⊢ IsIso (inv (NatTrans.app N₂Γ₂.inv (N₂.obj P)))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.207135, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nP : Karoubi (SimplicialObject C)\nthis : IsIso (N₂.map (NatTrans.app Γ₂N₂.natTrans P))\n⊢ IsIso (NatTrans.app Γ₂N₂.natTrans P)\n[PROOFSTEP]\nexact isIso_of_reflects_iso _ N₂\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.207135, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nthis : ∀ (P : Karoubi (SimplicialObject C)), IsIso (NatTrans.app Γ₂N₂.natTrans P)\n⊢ IsIso Γ₂N₂.natTrans\n[PROOFSTEP]\napply NatIso.isIso_of_isIso_app\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.212338, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\n⊢ IsIso Γ₂N₁.natTrans\n[PROOFSTEP]\nhave : ∀ X : SimplicialObject C, IsIso (Γ₂N₁.natTrans.app X) :=\n  by\n  intro X\n  rw [compatibility_Γ₂N₁_Γ₂N₂_natTrans]\n  infer_instance\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.212338, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\n⊢ ∀ (X : SimplicialObject C), IsIso (NatTrans.app Γ₂N₁.natTrans X)\n[PROOFSTEP]\nintro X\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.212338, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ IsIso (NatTrans.app Γ₂N₁.natTrans X)\n[PROOFSTEP]\nrw [compatibility_Γ₂N₁_Γ₂N₂_natTrans]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.212338, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ IsIso ((compatibility_Γ₂N₁_Γ₂N₂.app X).inv ≫ NatTrans.app Γ₂N₂.natTrans ((toKaroubi (SimplicialObject C)).obj X))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.212338, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nthis : ∀ (X : SimplicialObject C), IsIso (NatTrans.app Γ₂N₁.natTrans X)\n⊢ IsIso Γ₂N₁.natTrans\n[PROOFSTEP]\napply NatIso.isIso_of_isIso_app\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.DoldKan.NCompGamma", "llama_tokens": 34977, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7122321842389469, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.3811143226035597}}
{"text": "[GOAL]\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\nj : J\n⊢ AddCommGroup ((F ⋙ forget (ModuleCat R)).obj j)\n[PROOFSTEP]\nchange AddCommGroup (F.obj j)\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\nj : J\n⊢ AddCommGroup ↑(F.obj j)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\nj : J\n⊢ Module R ((F ⋙ forget (ModuleCat R)).obj j)\n[PROOFSTEP]\nchange Module R (F.obj j)\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\nj : J\n⊢ Module R ↑(F.obj j)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\nsrc✝ : AddSubgroup\n  ((j : J) → ↑((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat ⋙ forget₂ AddCommGroupCat AddGroupCat).obj j)) :=\n  AddGroupCat.sectionsAddSubgroup (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat ⋙ forget₂ AddCommGroupCat AddGroupCat)\nr : R\ns : (j : J) → ↑(F.obj j)\nsh :\n  s ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := Functor.sections (F ⋙ forget (ModuleCat R)),\n              add_mem' :=\n                (_ : ∀ {a b : (j : J) → ↑(F.obj j)}, a ∈ src✝.carrier → b ∈ src✝.carrier → a + b ∈ src✝.carrier) },\n          zero_mem' :=\n            (_ :\n              ∀ {j j' : J} (f : j ⟶ j'),\n                ((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙\n                        forget AddGroupCat).map\n                    f (OfNat.ofNat 0 j) =\n                  OfNat.ofNat 0 j') }.toAddSubsemigroup.carrier\nj j' : J\nf : j ⟶ j'\n⊢ (F ⋙ forget (ModuleCat R)).map f ((r • s) j) = (r • s) j'\n[PROOFSTEP]\nsimp only [forget_map, Functor.comp_map, Pi.smul_apply, map_smul]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\nsrc✝ : AddSubgroup\n  ((j : J) → ↑((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat ⋙ forget₂ AddCommGroupCat AddGroupCat).obj j)) :=\n  AddGroupCat.sectionsAddSubgroup (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat ⋙ forget₂ AddCommGroupCat AddGroupCat)\nr : R\ns : (j : J) → ↑(F.obj j)\nsh :\n  s ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := Functor.sections (F ⋙ forget (ModuleCat R)),\n              add_mem' :=\n                (_ : ∀ {a b : (j : J) → ↑(F.obj j)}, a ∈ src✝.carrier → b ∈ src✝.carrier → a + b ∈ src✝.carrier) },\n          zero_mem' :=\n            (_ :\n              ∀ {j j' : J} (f : j ⟶ j'),\n                ((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙\n                        forget AddGroupCat).map\n                    f (OfNat.ofNat 0 j) =\n                  OfNat.ofNat 0 j') }.toAddSubsemigroup.carrier\nj j' : J\nf : j ⟶ j'\n⊢ r • ↑(F.map f) (s j) = r • s j'\n[PROOFSTEP]\ndsimp [Functor.sections] at sh \n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\nsrc✝ : AddSubgroup\n  ((j : J) → ↑((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat ⋙ forget₂ AddCommGroupCat AddGroupCat).obj j)) :=\n  AddGroupCat.sectionsAddSubgroup (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat ⋙ forget₂ AddCommGroupCat AddGroupCat)\nr : R\ns : (j : J) → ↑(F.obj j)\nsh : s ∈ {u | ∀ {j j' : J} (f : j ⟶ j'), ↑(F.map f) (u j) = u j'}\nj j' : J\nf : j ⟶ j'\n⊢ r • ↑(F.map f) (s j) = r • s j'\n[PROOFSTEP]\nrw [sh f]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\n⊢ AddCommMonoid { x // x ∈ sectionsSubmodule F }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\n⊢ AddCommGroup { x // x ∈ sectionsSubmodule F }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\n⊢ Module R { x // x ∈ sectionsSubmodule F }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\n⊢ IsLimit (limitCone F)\n[PROOFSTEP]\nrefine'\n  IsLimit.ofFaithful (forget (ModuleCat R)) (Types.limitConeIsLimit.{v, w} _)\n    (fun s => ⟨⟨(Types.limitConeIsLimit.{v, w} _).lift ((forget (ModuleCat R)).mapCone s), _⟩, _⟩) (fun s => rfl)\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\ns : Cone F\n⊢ ∀ (x y : ↑s.pt),\n    IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s) (x + y) =\n      IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s) x +\n        IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s) y\ncase refine'_2\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\ns : Cone F\n⊢ ∀ (r : R) (x : ↑s.pt),\n    AddHom.toFun\n        { toFun := IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s),\n          map_add' := ?refine'_1 }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          {\n            toFun :=\n              IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s),\n            map_add' := ?refine'_1 }\n          x\n[PROOFSTEP]\nall_goals\n  intros\n  dsimp [Types.limitConeIsLimit]\n  simp\n  rfl\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\ns : Cone F\n⊢ ∀ (x y : ↑s.pt),\n    IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s) (x + y) =\n      IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s) x +\n        IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s) y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\ns : Cone F\nx✝ y✝ : ↑s.pt\n⊢ IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s) (x✝ + y✝) =\n    IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s) x✝ +\n      IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s) y✝\n[PROOFSTEP]\ndsimp [Types.limitConeIsLimit]\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\ns : Cone F\nx✝ y✝ : ↑s.pt\n⊢ { val := fun j => ↑(NatTrans.app s.π j) (x✝ + y✝),\n      property :=\n        (_ :\n          ∀ {j j' : J} (f : j ⟶ j'),\n            (NatTrans.app ((forget (ModuleCat R)).mapCone s).π j ≫ (F ⋙ forget (ModuleCat R)).map f) (x✝ + y✝) =\n              NatTrans.app ((forget (ModuleCat R)).mapCone s).π j' (x✝ + y✝)) } =\n    { val := fun j => ↑(NatTrans.app s.π j) x✝,\n        property :=\n          (_ :\n            ∀ {j j' : J} (f : j ⟶ j'),\n              (NatTrans.app ((forget (ModuleCat R)).mapCone s).π j ≫ (F ⋙ forget (ModuleCat R)).map f) x✝ =\n                NatTrans.app ((forget (ModuleCat R)).mapCone s).π j' x✝) } +\n      { val := fun j => ↑(NatTrans.app s.π j) y✝,\n        property :=\n          (_ :\n            ∀ {j j' : J} (f : j ⟶ j'),\n              (NatTrans.app ((forget (ModuleCat R)).mapCone s).π j ≫ (F ⋙ forget (ModuleCat R)).map f) y✝ =\n                NatTrans.app ((forget (ModuleCat R)).mapCone s).π j' y✝) }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\ns : Cone F\nx✝ y✝ : ↑s.pt\n⊢ { val := fun j => ↑(NatTrans.app s.π j) x✝ + ↑(NatTrans.app s.π j) y✝,\n      property :=\n        (_ :\n          (fun x => x ∈ Functor.sections (F ⋙ forget (ModuleCat R))) fun j =>\n            ↑(NatTrans.app s.π j) x✝ + ↑(NatTrans.app s.π j) y✝) } =\n    { val := fun j => ↑(NatTrans.app s.π j) x✝,\n        property :=\n          (_ :\n            ∀ {j j' : J} (f : j ⟶ j'),\n              (NatTrans.app ((forget (ModuleCat R)).mapCone s).π j ≫ (F ⋙ forget (ModuleCat R)).map f) x✝ =\n                NatTrans.app ((forget (ModuleCat R)).mapCone s).π j' x✝) } +\n      { val := fun j => ↑(NatTrans.app s.π j) y✝,\n        property :=\n          (_ :\n            ∀ {j j' : J} (f : j ⟶ j'),\n              (NatTrans.app ((forget (ModuleCat R)).mapCone s).π j ≫ (F ⋙ forget (ModuleCat R)).map f) y✝ =\n                NatTrans.app ((forget (ModuleCat R)).mapCone s).π j' y✝) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\ns : Cone F\n⊢ ∀ (r : R) (x : ↑s.pt),\n    AddHom.toFun\n        { toFun := IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s),\n          map_add' :=\n            (_ :\n              ∀ (x y : ↑s.pt),\n                IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s)\n                    (x + y) =\n                  IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s)\n                      x +\n                    IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s)\n                      y) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          {\n            toFun :=\n              IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s),\n            map_add' :=\n              (_ :\n                ∀ (x y : ↑s.pt),\n                  IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s)\n                      (x + y) =\n                    IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s)\n                        x +\n                      IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R)))\n                        ((forget (ModuleCat R)).mapCone s) y) }\n          x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\ns : Cone F\nr✝ : R\nx✝ : ↑s.pt\n⊢ AddHom.toFun\n      { toFun := IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s),\n        map_add' :=\n          (_ :\n            ∀ (x y : ↑s.pt),\n              IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s)\n                  (x + y) =\n                IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s) x +\n                  IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s)\n                    y) }\n      (r✝ • x✝) =\n    ↑(RingHom.id R) r✝ •\n      AddHom.toFun\n        { toFun := IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s),\n          map_add' :=\n            (_ :\n              ∀ (x y : ↑s.pt),\n                IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s)\n                    (x + y) =\n                  IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s)\n                      x +\n                    IsLimit.lift (Types.limitConeIsLimit (F ⋙ forget (ModuleCat R))) ((forget (ModuleCat R)).mapCone s)\n                      y) }\n        x✝\n[PROOFSTEP]\ndsimp [Types.limitConeIsLimit]\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\ns : Cone F\nr✝ : R\nx✝ : ↑s.pt\n⊢ { val := fun j => ↑(NatTrans.app s.π j) (r✝ • x✝),\n      property :=\n        (_ :\n          ∀ {j j' : J} (f : j ⟶ j'),\n            (NatTrans.app ((forget (ModuleCat R)).mapCone s).π j ≫ (F ⋙ forget (ModuleCat R)).map f) (r✝ • x✝) =\n              NatTrans.app ((forget (ModuleCat R)).mapCone s).π j' (r✝ • x✝)) } =\n    r✝ •\n      { val := fun j => ↑(NatTrans.app s.π j) x✝,\n        property :=\n          (_ :\n            ∀ {j j' : J} (f : j ⟶ j'),\n              (NatTrans.app ((forget (ModuleCat R)).mapCone s).π j ≫ (F ⋙ forget (ModuleCat R)).map f) x✝ =\n                NatTrans.app ((forget (ModuleCat R)).mapCone s).π j' x✝) }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝¹ : Ring R\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ ModuleCatMax R\ns : Cone F\nr✝ : R\nx✝ : ↑s.pt\n⊢ { val := fun j => r✝ • ↑(NatTrans.app s.π j) x✝,\n      property :=\n        (_ : (fun x => x ∈ Functor.sections (F ⋙ forget (ModuleCat R))) fun j => r✝ • ↑(NatTrans.app s.π j) x✝) } =\n    r✝ •\n      { val := fun j => ↑(NatTrans.app s.π j) x✝,\n        property :=\n          (_ :\n            ∀ {j j' : J} (f : j ⟶ j'),\n              (NatTrans.app ((forget (ModuleCat R)).mapCone s).π j ≫ (F ⋙ forget (ModuleCat R)).map f) x✝ =\n                NatTrans.app ((forget (ModuleCat R)).mapCone s).π j' x✝) }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝⁵ : Ring R\nJ : Type v\ninst✝⁴ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝³ : Preorder ι\nG : ι → Type v\ninst✝² : (i : ι) → AddCommGroup (G i)\ninst✝¹ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\ni : ι\n⊢ { obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map (𝟙 i) =\n    𝟙 ({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.obj i)\n[PROOFSTEP]\napply LinearMap.ext\n[GOAL]\ncase h\nR : Type u\ninst✝⁵ : Ring R\nJ : Type v\ninst✝⁴ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝³ : Preorder ι\nG : ι → Type v\ninst✝² : (i : ι) → AddCommGroup (G i)\ninst✝¹ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\ni : ι\n⊢ ∀ (x : ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.obj i)),\n    ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map (𝟙 i)) x =\n      ↑(𝟙 ({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.obj i)) x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nR : Type u\ninst✝⁵ : Ring R\nJ : Type v\ninst✝⁴ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝³ : Preorder ι\nG : ι → Type v\ninst✝² : (i : ι) → AddCommGroup (G i)\ninst✝¹ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\ni : ι\nx : ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.obj i)\n⊢ ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map (𝟙 i)) x =\n    ↑(𝟙 ({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.obj i)) x\n[PROOFSTEP]\napply Module.DirectedSystem.map_self\n[GOAL]\nR : Type u\ninst✝⁵ : Ring R\nJ : Type v\ninst✝⁴ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝³ : Preorder ι\nG : ι → Type v\ninst✝² : (i : ι) → AddCommGroup (G i)\ninst✝¹ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nX✝ Y✝ Z✝ : ι\nhij : X✝ ⟶ Y✝\nhjk : Y✝ ⟶ Z✝\n⊢ { obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map (hij ≫ hjk) =\n    { obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map hij ≫\n      { obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map hjk\n[PROOFSTEP]\napply LinearMap.ext\n[GOAL]\ncase h\nR : Type u\ninst✝⁵ : Ring R\nJ : Type v\ninst✝⁴ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝³ : Preorder ι\nG : ι → Type v\ninst✝² : (i : ι) → AddCommGroup (G i)\ninst✝¹ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nX✝ Y✝ Z✝ : ι\nhij : X✝ ⟶ Y✝\nhjk : Y✝ ⟶ Z✝\n⊢ ∀ (x : ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.obj X✝)),\n    ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map (hij ≫ hjk)) x =\n      ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map hij ≫\n            { obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map hjk)\n        x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nR : Type u\ninst✝⁵ : Ring R\nJ : Type v\ninst✝⁴ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝³ : Preorder ι\nG : ι → Type v\ninst✝² : (i : ι) → AddCommGroup (G i)\ninst✝¹ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nX✝ Y✝ Z✝ : ι\nhij : X✝ ⟶ Y✝\nhjk : Y✝ ⟶ Z✝\nx : ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.obj X✝)\n⊢ ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map (hij ≫ hjk)) x =\n    ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map hij ≫\n          { obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map hjk)\n      x\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h\nR : Type u\ninst✝⁵ : Ring R\nJ : Type v\ninst✝⁴ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝³ : Preorder ι\nG : ι → Type v\ninst✝² : (i : ι) → AddCommGroup (G i)\ninst✝¹ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nX✝ Y✝ Z✝ : ι\nhij : X✝ ⟶ Y✝\nhjk : Y✝ ⟶ Z✝\nx : ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.obj X✝)\n⊢ ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map hij ≫\n          { obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map hjk)\n      x =\n    ↑({ obj := fun i => of R (G i), map := fun {X Y} hij => f X Y (_ : X ≤ Y) }.map (hij ≫ hjk)) x\n[PROOFSTEP]\napply Module.DirectedSystem.map_map\n[GOAL]\nR : Type u\ninst✝⁶ : Ring R\nJ : Type v\ninst✝⁵ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁴ : Preorder ι\nG : ι → Type v\ninst✝³ : (i : ι) → AddCommGroup (G i)\ninst✝² : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : DecidableEq ι\nx✝¹ x✝ : ι\nhij : x✝¹ ⟶ x✝\n⊢ (directLimitDiagram G f).map hij ≫ DirectLimit.of R ι G f x✝ =\n    DirectLimit.of R ι G f x✝¹ ≫ ((Functor.const ι).obj (of R (DirectLimit G f))).map hij\n[PROOFSTEP]\napply LinearMap.ext\n[GOAL]\ncase h\nR : Type u\ninst✝⁶ : Ring R\nJ : Type v\ninst✝⁵ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁴ : Preorder ι\nG : ι → Type v\ninst✝³ : (i : ι) → AddCommGroup (G i)\ninst✝² : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : DecidableEq ι\nx✝¹ x✝ : ι\nhij : x✝¹ ⟶ x✝\n⊢ ∀ (x : ↑((directLimitDiagram G f).obj x✝¹)),\n    ↑((directLimitDiagram G f).map hij ≫ DirectLimit.of R ι G f x✝) x =\n      ↑(DirectLimit.of R ι G f x✝¹ ≫ ((Functor.const ι).obj (of R (DirectLimit G f))).map hij) x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nR : Type u\ninst✝⁶ : Ring R\nJ : Type v\ninst✝⁵ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁴ : Preorder ι\nG : ι → Type v\ninst✝³ : (i : ι) → AddCommGroup (G i)\ninst✝² : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : DecidableEq ι\nx✝¹ x✝ : ι\nhij : x✝¹ ⟶ x✝\nx : ↑((directLimitDiagram G f).obj x✝¹)\n⊢ ↑((directLimitDiagram G f).map hij ≫ DirectLimit.of R ι G f x✝) x =\n    ↑(DirectLimit.of R ι G f x✝¹ ≫ ((Functor.const ι).obj (of R (DirectLimit G f))).map hij) x\n[PROOFSTEP]\nexact DirectLimit.of_f\n[GOAL]\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\ni j : ι\nh : i ≤ j\nx : G i\n⊢ ↑(NatTrans.app s.ι j) (↑(f i j h) x) = ↑(NatTrans.app s.ι i) x\n[PROOFSTEP]\nrw [← s.w (homOfLE h)]\n[GOAL]\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\ni j : ι\nh : i ≤ j\nx : G i\n⊢ ↑(NatTrans.app s.ι j) (↑(f i j h) x) = ↑((directLimitDiagram G f).map (homOfLE h) ≫ NatTrans.app s.ι j) x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\ni : ι\n⊢ NatTrans.app (directLimitCocone G f).ι i ≫\n      (fun s =>\n          DirectLimit.lift R ι G f s.ι.app\n            (_ : ∀ (i j : ι) (h : i ≤ j) (x : G i), ↑(NatTrans.app s.ι j) (↑(f i j h) x) = ↑(NatTrans.app s.ι i) x))\n        s =\n    NatTrans.app s.ι i\n[PROOFSTEP]\napply LinearMap.ext\n[GOAL]\ncase h\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\ni : ι\n⊢ ∀ (x : ↑((directLimitDiagram G f).obj i)),\n    ↑(NatTrans.app (directLimitCocone G f).ι i ≫\n            (fun s =>\n                DirectLimit.lift R ι G f s.ι.app\n                  (_ :\n                    ∀ (i j : ι) (h : i ≤ j) (x : G i), ↑(NatTrans.app s.ι j) (↑(f i j h) x) = ↑(NatTrans.app s.ι i) x))\n              s)\n        x =\n      ↑(NatTrans.app s.ι i) x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\ni : ι\nx : ↑((directLimitDiagram G f).obj i)\n⊢ ↑(NatTrans.app (directLimitCocone G f).ι i ≫\n          (fun s =>\n              DirectLimit.lift R ι G f s.ι.app\n                (_ : ∀ (i j : ι) (h : i ≤ j) (x : G i), ↑(NatTrans.app s.ι j) (↑(f i j h) x) = ↑(NatTrans.app s.ι i) x))\n            s)\n      x =\n    ↑(NatTrans.app s.ι i) x\n[PROOFSTEP]\ndsimp only [directLimitCocone, CategoryStruct.comp]\n[GOAL]\ncase h\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\ni : ι\nx : ↑((directLimitDiagram G f).obj i)\n⊢ ↑(LinearMap.comp\n          (DirectLimit.lift R ι G f s.ι.app\n            (_ : ∀ (i j : ι) (h : i ≤ j) (x : G i), ↑(NatTrans.app s.ι j) (↑(f i j h) x) = ↑(NatTrans.app s.ι i) x))\n          (DirectLimit.of R ι G f i))\n      x =\n    ↑(NatTrans.app s.ι i) x\n[PROOFSTEP]\nrw [LinearMap.comp_apply]\n[GOAL]\ncase h\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\ni : ι\nx : ↑((directLimitDiagram G f).obj i)\n⊢ ↑(DirectLimit.lift R ι G f s.ι.app\n          (_ : ∀ (i j : ι) (h : i ≤ j) (x : G i), ↑(NatTrans.app s.ι j) (↑(f i j h) x) = ↑(NatTrans.app s.ι i) x))\n      (↑(DirectLimit.of R ι G f i) x) =\n    ↑(NatTrans.app s.ι i) x\n[PROOFSTEP]\napply DirectLimit.lift_of\n[GOAL]\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\nm : (directLimitCocone G f).pt ⟶ s.pt\nh : ∀ (j : ι), NatTrans.app (directLimitCocone G f).ι j ≫ m = NatTrans.app s.ι j\n⊢ m =\n    (fun s =>\n        DirectLimit.lift R ι G f s.ι.app\n          (_ : ∀ (i j : ι) (h : i ≤ j) (x : G i), ↑(NatTrans.app s.ι j) (↑(f i j h) x) = ↑(NatTrans.app s.ι i) x))\n      s\n[PROOFSTEP]\nhave : s.ι.app = fun i => LinearMap.comp m (DirectLimit.of R ι (fun i => G i) (fun i j H => f i j H) i) :=\n  by\n  funext i\n  rw [← h]\n  rfl\n[GOAL]\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\nm : (directLimitCocone G f).pt ⟶ s.pt\nh : ∀ (j : ι), NatTrans.app (directLimitCocone G f).ι j ≫ m = NatTrans.app s.ι j\n⊢ s.ι.app = fun i => LinearMap.comp m (DirectLimit.of R ι (fun i => G i) (fun i j H => f i j H) i)\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\nm : (directLimitCocone G f).pt ⟶ s.pt\nh : ∀ (j : ι), NatTrans.app (directLimitCocone G f).ι j ≫ m = NatTrans.app s.ι j\ni : ι\n⊢ NatTrans.app s.ι i = LinearMap.comp m (DirectLimit.of R ι (fun i => G i) (fun i j H => f i j H) i)\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase h\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\nm : (directLimitCocone G f).pt ⟶ s.pt\nh : ∀ (j : ι), NatTrans.app (directLimitCocone G f).ι j ≫ m = NatTrans.app s.ι j\ni : ι\n⊢ NatTrans.app (directLimitCocone G f).ι i ≫ m =\n    LinearMap.comp m (DirectLimit.of R ι (fun i => G i) (fun i j H => f i j H) i)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\nm : (directLimitCocone G f).pt ⟶ s.pt\nh : ∀ (j : ι), NatTrans.app (directLimitCocone G f).ι j ≫ m = NatTrans.app s.ι j\nthis : s.ι.app = fun i => LinearMap.comp m (DirectLimit.of R ι (fun i => G i) (fun i j H => f i j H) i)\n⊢ m =\n    (fun s =>\n        DirectLimit.lift R ι G f s.ι.app\n          (_ : ∀ (i j : ι) (h : i ≤ j) (x : G i), ↑(NatTrans.app s.ι j) (↑(f i j h) x) = ↑(NatTrans.app s.ι i) x))\n      s\n[PROOFSTEP]\napply LinearMap.ext\n[GOAL]\ncase h\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\nm : (directLimitCocone G f).pt ⟶ s.pt\nh : ∀ (j : ι), NatTrans.app (directLimitCocone G f).ι j ≫ m = NatTrans.app s.ι j\nthis : s.ι.app = fun i => LinearMap.comp m (DirectLimit.of R ι (fun i => G i) (fun i j H => f i j H) i)\n⊢ ∀ (x : ↑(directLimitCocone G f).pt),\n    ↑m x =\n      ↑((fun s =>\n              DirectLimit.lift R ι G f s.ι.app\n                (_ : ∀ (i j : ι) (h : i ≤ j) (x : G i), ↑(NatTrans.app s.ι j) (↑(f i j h) x) = ↑(NatTrans.app s.ι i) x))\n            s)\n        x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\nm : (directLimitCocone G f).pt ⟶ s.pt\nh : ∀ (j : ι), NatTrans.app (directLimitCocone G f).ι j ≫ m = NatTrans.app s.ι j\nthis : s.ι.app = fun i => LinearMap.comp m (DirectLimit.of R ι (fun i => G i) (fun i j H => f i j H) i)\nx : ↑(directLimitCocone G f).pt\n⊢ ↑m x =\n    ↑((fun s =>\n            DirectLimit.lift R ι G f s.ι.app\n              (_ : ∀ (i j : ι) (h : i ≤ j) (x : G i), ↑(NatTrans.app s.ι j) (↑(f i j h) x) = ↑(NatTrans.app s.ι i) x))\n          s)\n      x\n[PROOFSTEP]\nsimp only [this]\n[GOAL]\ncase h\nR : Type u\ninst✝⁸ : Ring R\nJ : Type v\ninst✝⁷ : SmallCategory J\nι : Type v\ndec_ι : DecidableEq ι\ninst✝⁶ : Preorder ι\nG : ι → Type v\ninst✝⁵ : (i : ι) → AddCommGroup (G i)\ninst✝⁴ : (i : ι) → Module R (G i)\nf : (i j : ι) → i ≤ j → G i →ₗ[R] G j\ninst✝³ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝² : DecidableEq ι\ninst✝¹ : Nonempty ι\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\ns : Cocone (directLimitDiagram G f)\nm : (directLimitCocone G f).pt ⟶ s.pt\nh : ∀ (j : ι), NatTrans.app (directLimitCocone G f).ι j ≫ m = NatTrans.app s.ι j\nthis : s.ι.app = fun i => LinearMap.comp m (DirectLimit.of R ι (fun i => G i) (fun i j H => f i j H) i)\nx : ↑(directLimitCocone G f).pt\n⊢ ↑m x =\n    ↑(DirectLimit.lift R ι G f (fun i => LinearMap.comp m (DirectLimit.of R ι (fun i => G i) (fun i j H => f i j H) i))\n          (_ :\n            ∀ (i j : ι) (hij : i ≤ j) (x : G i),\n              ↑((fun i => LinearMap.comp m (DirectLimit.of R ι (fun i => G i) (fun i j H => f i j H) i)) j)\n                  (↑(f i j hij) x) =\n                ↑((fun i => LinearMap.comp m (DirectLimit.of R ι (fun i => G i) (fun i j H => f i j H) i)) i) x))\n      x\n[PROOFSTEP]\napply Module.DirectLimit.lift_unique\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.ModuleCat.Limits", "llama_tokens": 14607, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7279754489059774, "lm_q2_score": 0.5234203489363239, "lm_q1q2_score": 0.38103716348344374}}
{"text": "[GOAL]\nα✝ : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α✝\np✝ : ℝ≥0∞\nq : ℝ\nμ✝ ν : Measure α✝\ninst✝⁴ : NormedAddCommGroup E✝\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nα : Type u_5\nE : Type u_6\ninst✝¹ : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : α → E\nhfp : Memℒp f p\n⊢ snorm (↑(AEEqFun.mk f (_ : AEStronglyMeasurable f μ))) p μ < ⊤\n[PROOFSTEP]\nsimp [hfp.2]\n[GOAL]\nα✝ : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α✝\np✝ : ℝ≥0∞\nq : ℝ\nμ✝ ν : Measure α✝\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nα : Type ?u.3676\nE : Type u_5\nm : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nμ : autoParam (Measure α) _auto✝\nf g : α →ₘ[μ] E\nhf : f ∈ {f | snorm (↑f) p μ < ⊤}\nhg : g ∈ {f | snorm (↑f) p μ < ⊤}\n⊢ f + g ∈ {f | snorm (↑f) p μ < ⊤}\n[PROOFSTEP]\nsimp [snorm_congr_ae (AEEqFun.coeFn_add f g),\n  snorm_add_lt_top ⟨f.aestronglyMeasurable, hf⟩ ⟨g.aestronglyMeasurable, hg⟩]\n[GOAL]\nα✝ : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α✝\np✝ : ℝ≥0∞\nq : ℝ\nμ✝ ν : Measure α✝\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nα : Type ?u.3676\nE : Type u_5\nm : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nμ : autoParam (Measure α) _auto✝\n⊢ 0 ∈\n    { carrier := {f | snorm (↑f) p μ < ⊤},\n        add_mem' :=\n          (_ :\n            ∀ {f g : α →ₘ[μ] E},\n              f ∈ {f | snorm (↑f) p μ < ⊤} → g ∈ {f | snorm (↑f) p μ < ⊤} → snorm (↑(f + g)) p μ < ⊤) }.carrier\n[PROOFSTEP]\nsimp [snorm_congr_ae AEEqFun.coeFn_zero, snorm_zero]\n[GOAL]\nα✝ : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α✝\np✝ : ℝ≥0∞\nq : ℝ\nμ✝ ν : Measure α✝\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nα : Type ?u.3676\nE : Type u_5\nm : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nμ : autoParam (Measure α) _auto✝\nf : α →ₘ[μ] E\nhf :\n  f ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {f | snorm (↑f) p μ < ⊤},\n              add_mem' :=\n                (_ :\n                  ∀ {f g : α →ₘ[μ] E},\n                    f ∈ {f | snorm (↑f) p μ < ⊤} → g ∈ {f | snorm (↑f) p μ < ⊤} → snorm (↑(f + g)) p μ < ⊤) },\n          zero_mem' := (_ : snorm (↑0) p μ < ⊤) }.toAddSubsemigroup.carrier\n⊢ -f ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {f | snorm (↑f) p μ < ⊤},\n              add_mem' :=\n                (_ :\n                  ∀ {f g : α →ₘ[μ] E},\n                    f ∈ {f | snorm (↑f) p μ < ⊤} → g ∈ {f | snorm (↑f) p μ < ⊤} → snorm (↑(f + g)) p μ < ⊤) },\n          zero_mem' := (_ : snorm (↑0) p μ < ⊤) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrwa [Set.mem_setOf_eq, snorm_congr_ae (AEEqFun.coeFn_neg f), snorm_neg]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf g : α → E\nhf : Memℒp f p\nhg : Memℒp g p\nhfg : f =ᵐ[μ] g\n⊢ toLp f hf = toLp g hg\n[PROOFSTEP]\nsimp [toLp, hfg]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf g : α → E\nhf : Memℒp f p\nhg : Memℒp g p\n⊢ toLp f hf = toLp g hg ↔ f =ᵐ[μ] g\n[PROOFSTEP]\nsimp [toLp]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf g : { x // x ∈ Lp E p }\nh : ↑↑f =ᵐ[μ] ↑↑g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : { x // x ∈ Lp E p }\nval✝ : α →ₘ[μ] E\nproperty✝ : val✝ ∈ Lp E p\nh : ↑↑{ val := val✝, property := property✝ } =ᵐ[μ] ↑↑g\n⊢ { val := val✝, property := property✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nval✝¹ : α →ₘ[μ] E\nproperty✝¹ : val✝¹ ∈ Lp E p\nval✝ : α →ₘ[μ] E\nproperty✝ : val✝ ∈ Lp E p\nh : ↑↑{ val := val✝¹, property := property✝¹ } =ᵐ[μ] ↑↑{ val := val✝, property := property✝ }\n⊢ { val := val✝¹, property := property✝¹ } = { val := val✝, property := property✝ }\n[PROOFSTEP]\nsimp only [Subtype.mk_eq_mk]\n[GOAL]\ncase mk.mk\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nval✝¹ : α →ₘ[μ] E\nproperty✝¹ : val✝¹ ∈ Lp E p\nval✝ : α →ₘ[μ] E\nproperty✝ : val✝ ∈ Lp E p\nh : ↑↑{ val := val✝¹, property := property✝¹ } =ᵐ[μ] ↑↑{ val := val✝, property := property✝ }\n⊢ val✝¹ = val✝\n[PROOFSTEP]\nexact AEEqFun.ext h\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf g : { x // x ∈ Lp E p }\nh : f = g\n⊢ ↑↑f =ᵐ[μ] ↑↑g\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α →ₘ[μ] E\n⊢ f ∈ Lp E p ↔ Memℒp (↑f) p\n[PROOFSTEP]\nsimp [mem_Lp_iff_snorm_lt_top, Memℒp, f.stronglyMeasurable.aestronglyMeasurable]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\nhf : Memℒp (↑↑f) p\n⊢ Memℒp.toLp (↑↑f) hf = f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nval✝ : α →ₘ[μ] E\nproperty✝ : val✝ ∈ Lp E p\nhf : Memℒp (↑↑{ val := val✝, property := property✝ }) p\n⊢ Memℒp.toLp (↑↑{ val := val✝, property := property✝ }) hf = { val := val✝, property := property✝ }\n[PROOFSTEP]\nsimp [Memℒp.toLp]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\n⊢ ‖Memℒp.toLp f hf‖ = ENNReal.toReal (snorm f p μ)\n[PROOFSTEP]\nerw [norm_def, snorm_congr_ae (Memℒp.coeFn_toLp hf)]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf g : { x // x ∈ Lp E p }\n⊢ dist f g = ENNReal.toReal (snorm (↑↑f - ↑↑g) p μ)\n[PROOFSTEP]\nsimp_rw [dist, norm_def]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf g : { x // x ∈ Lp E p }\n⊢ ENNReal.toReal (snorm (↑↑(f - g)) p μ) = ENNReal.toReal (snorm (↑↑f - ↑↑g) p μ)\n[PROOFSTEP]\nrefine congr_arg _ ?_\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf g : { x // x ∈ Lp E p }\n⊢ snorm (↑↑(f - g)) p μ = snorm (↑↑f - ↑↑g) p μ\n[PROOFSTEP]\napply snorm_congr_ae (coeFn_sub _ _)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf g : { x // x ∈ Lp E p }\n⊢ edist f g = ENNReal.ofReal (dist f g)\n[PROOFSTEP]\nrw [edist_def, dist_def, ← snorm_congr_ae (coeFn_sub _ _), ENNReal.ofReal_toReal (snorm_ne_top (f - g))]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf g : α → E\nhf : Memℒp f p\nhg : Memℒp g p\n⊢ edist (Memℒp.toLp f hf) (Memℒp.toLp g hg) = snorm (f - g) p μ\n[PROOFSTEP]\nrw [edist_def]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf g : α → E\nhf : Memℒp f p\nhg : Memℒp g p\n⊢ snorm (↑↑(Memℒp.toLp f hf) - ↑↑(Memℒp.toLp g hg)) p μ = snorm (f - g) p μ\n[PROOFSTEP]\nexact snorm_congr_ae (hf.coeFn_toLp.sub hg.coeFn_toLp)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\n⊢ edist (Memℒp.toLp f hf) 0 = snorm f p μ\n[PROOFSTEP]\nconvert edist_toLp_toLp f 0 hf zero_memℒp\n[GOAL]\ncase h.e'_3.h.e'_5\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\n⊢ f = f - 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\n⊢ ‖0‖₊ = 0\n[PROOFSTEP]\nrw [nnnorm_def]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\n⊢ ENNReal.toNNReal (snorm (↑↑0) p μ) = 0\n[PROOFSTEP]\nchange (snorm (⇑(0 : α →ₘ[μ] E)) p μ).toNNReal = 0\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\n⊢ ENNReal.toNNReal (snorm (↑0) p μ) = 0\n[PROOFSTEP]\nsimp [snorm_congr_ae AEEqFun.coeFn_zero, snorm_zero]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\n⊢ ‖f‖ = 0\n[PROOFSTEP]\nsimp [norm_def]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E 0 }\n⊢ ‖f‖ = 0\n[PROOFSTEP]\nsimp [norm_def]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\nhp : 0 < p\n⊢ ‖f‖₊ = 0 ↔ f = 0\n[PROOFSTEP]\nrefine' ⟨fun hf => _, fun hf => by simp [hf]⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\nhp : 0 < p\nhf : f = 0\n⊢ ‖f‖₊ = 0\n[PROOFSTEP]\nsimp [hf]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\nhp : 0 < p\nhf : ‖f‖₊ = 0\n⊢ f = 0\n[PROOFSTEP]\nrw [nnnorm_def, ENNReal.toNNReal_eq_zero_iff] at hf \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\nhp : 0 < p\nhf : snorm (↑↑f) p μ = 0 ∨ snorm (↑↑f) p μ = ⊤\n⊢ f = 0\n[PROOFSTEP]\ncases hf with\n| inl hf =>\n  rw [snorm_eq_zero_iff (Lp.aestronglyMeasurable f) hp.ne.symm] at hf \n  exact Subtype.eq (AEEqFun.ext (hf.trans AEEqFun.coeFn_zero.symm))\n| inr hf => exact absurd hf (snorm_ne_top f)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\nhp : 0 < p\nhf : snorm (↑↑f) p μ = 0 ∨ snorm (↑↑f) p μ = ⊤\n⊢ f = 0\n[PROOFSTEP]\ncases hf with\n| inl hf =>\n  rw [snorm_eq_zero_iff (Lp.aestronglyMeasurable f) hp.ne.symm] at hf \n  exact Subtype.eq (AEEqFun.ext (hf.trans AEEqFun.coeFn_zero.symm))\n| inr hf => exact absurd hf (snorm_ne_top f)\n[GOAL]\ncase inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\nhp : 0 < p\nhf : snorm (↑↑f) p μ = 0\n⊢ f = 0\n[PROOFSTEP]\n\n| inl hf =>\n  rw [snorm_eq_zero_iff (Lp.aestronglyMeasurable f) hp.ne.symm] at hf \n  exact Subtype.eq (AEEqFun.ext (hf.trans AEEqFun.coeFn_zero.symm))\n[GOAL]\ncase inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\nhp : 0 < p\nhf : snorm (↑↑f) p μ = 0\n⊢ f = 0\n[PROOFSTEP]\nrw [snorm_eq_zero_iff (Lp.aestronglyMeasurable f) hp.ne.symm] at hf \n[GOAL]\ncase inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\nhp : 0 < p\nhf : ↑↑f =ᵐ[μ] 0\n⊢ f = 0\n[PROOFSTEP]\nexact Subtype.eq (AEEqFun.ext (hf.trans AEEqFun.coeFn_zero.symm))\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\nhp : 0 < p\nhf : snorm (↑↑f) p μ = ⊤\n⊢ f = 0\n[PROOFSTEP]\n\n| inr hf => exact absurd hf (snorm_ne_top f)\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\nhp : 0 < p\nhf : snorm (↑↑f) p μ = ⊤\n⊢ f = 0\n[PROOFSTEP]\nexact absurd hf (snorm_ne_top f)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\n⊢ f = 0 ↔ ↑↑f =ᵐ[μ] 0\n[PROOFSTEP]\nrw [← (Lp.memℒp f).toLp_eq_toLp_iff zero_memℒp, Memℒp.toLp_zero, toLp_coeFn]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\n⊢ ‖-f‖₊ = ‖f‖₊\n[PROOFSTEP]\nrw [nnnorm_def, nnnorm_def, snorm_congr_ae (coeFn_neg _), snorm_neg]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : ℝ≥0\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖₊ ≤ c * ‖↑↑g x‖₊\n⊢ ‖f‖₊ ≤ c * ‖g‖₊\n[PROOFSTEP]\nsimp only [nnnorm_def]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : ℝ≥0\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖₊ ≤ c * ‖↑↑g x‖₊\n⊢ ENNReal.toNNReal (snorm (↑↑f) p μ) ≤ c * ENNReal.toNNReal (snorm (↑↑g) p μ)\n[PROOFSTEP]\nhave := snorm_le_nnreal_smul_snorm_of_ae_le_mul h p\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : ℝ≥0\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖₊ ≤ c * ‖↑↑g x‖₊\nthis : snorm (fun x => ↑↑f x) p μ ≤ c • snorm (fun x => ↑↑g x) p μ\n⊢ ENNReal.toNNReal (snorm (↑↑f) p μ) ≤ c * ENNReal.toNNReal (snorm (↑↑g) p μ)\n[PROOFSTEP]\nrwa [← ENNReal.toNNReal_le_toNNReal, ENNReal.smul_def, smul_eq_mul, ENNReal.toNNReal_mul, ENNReal.toNNReal_coe] at this \n[GOAL]\ncase ha\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : ℝ≥0\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖₊ ≤ c * ‖↑↑g x‖₊\nthis : snorm (fun x => ↑↑f x) p μ ≤ c • snorm (fun x => ↑↑g x) p μ\n⊢ snorm (fun x => ↑↑f x) p μ ≠ ⊤\n[PROOFSTEP]\nexact (Lp.memℒp _).snorm_ne_top\n[GOAL]\ncase hb\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : ℝ≥0\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖₊ ≤ c * ‖↑↑g x‖₊\nthis : snorm (fun x => ↑↑f x) p μ ≤ c • snorm (fun x => ↑↑g x) p μ\n⊢ c • snorm (fun x => ↑↑g x) p μ ≠ ⊤\n[PROOFSTEP]\nexact ENNReal.mul_ne_top ENNReal.coe_ne_top (Lp.memℒp _).snorm_ne_top\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : ℝ\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖ ≤ c * ‖↑↑g x‖\n⊢ ‖f‖ ≤ c * ‖g‖\n[PROOFSTEP]\ncases' le_or_lt 0 c with hc hc\n[GOAL]\ncase inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : ℝ\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖ ≤ c * ‖↑↑g x‖\nhc : 0 ≤ c\n⊢ ‖f‖ ≤ c * ‖g‖\n[PROOFSTEP]\nlift c to ℝ≥0 using hc\n[GOAL]\ncase inl.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nc : ℝ≥0\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖ ≤ ↑c * ‖↑↑g x‖\n⊢ ‖f‖ ≤ ↑c * ‖g‖\n[PROOFSTEP]\nexact NNReal.coe_le_coe.mpr (nnnorm_le_mul_nnnorm_of_ae_le_mul h)\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : ℝ\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖ ≤ c * ‖↑↑g x‖\nhc : c < 0\n⊢ ‖f‖ ≤ c * ‖g‖\n[PROOFSTEP]\nsimp only [norm_def]\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : ℝ\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖ ≤ c * ‖↑↑g x‖\nhc : c < 0\n⊢ ENNReal.toReal (snorm (↑↑f) p μ) ≤ c * ENNReal.toReal (snorm (↑↑g) p μ)\n[PROOFSTEP]\nhave := snorm_eq_zero_and_zero_of_ae_le_mul_neg h hc p\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : ℝ\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖ ≤ c * ‖↑↑g x‖\nhc : c < 0\nthis : snorm (fun x => ↑↑f x) p μ = 0 ∧ snorm (fun x => ↑↑g x) p μ = 0\n⊢ ENNReal.toReal (snorm (↑↑f) p μ) ≤ c * ENNReal.toReal (snorm (↑↑g) p μ)\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖ ≤ ‖↑↑g x‖\n⊢ ‖f‖ ≤ ‖g‖\n[PROOFSTEP]\nrw [norm_def, norm_def, ENNReal.toReal_le_toReal (snorm_ne_top _) (snorm_ne_top _)]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : { x // x ∈ Lp E p }\ng : { x // x ∈ Lp F p }\nh : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖ ≤ ‖↑↑g x‖\n⊢ snorm (↑↑f) p μ ≤ snorm (↑↑g) p μ\n[PROOFSTEP]\nexact snorm_mono_ae h\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nf : { x // x ∈ Lp E p }\nC : ℝ≥0\nhfC : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖₊ ≤ C\n⊢ ‖f‖₊ ≤ measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹ * C\n[PROOFSTEP]\nby_cases hμ : μ = 0\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nf : { x // x ∈ Lp E p }\nC : ℝ≥0\nhfC : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖₊ ≤ C\nhμ : μ = 0\n⊢ ‖f‖₊ ≤ measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹ * C\n[PROOFSTEP]\nby_cases hp : p.toReal⁻¹ = 0\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nf : { x // x ∈ Lp E p }\nC : ℝ≥0\nhfC : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖₊ ≤ C\nhμ : μ = 0\nhp : (ENNReal.toReal p)⁻¹ = 0\n⊢ ‖f‖₊ ≤ measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹ * C\n[PROOFSTEP]\nsimp [hp, hμ, nnnorm_def]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nf : { x // x ∈ Lp E p }\nC : ℝ≥0\nhfC : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖₊ ≤ C\nhμ : μ = 0\nhp : ¬(ENNReal.toReal p)⁻¹ = 0\n⊢ ‖f‖₊ ≤ measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹ * C\n[PROOFSTEP]\nsimp [hμ, nnnorm_def, Real.zero_rpow hp]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nf : { x // x ∈ Lp E p }\nC : ℝ≥0\nhfC : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖₊ ≤ C\nhμ : ¬μ = 0\n⊢ ‖f‖₊ ≤ measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹ * C\n[PROOFSTEP]\nrw [← ENNReal.coe_le_coe, nnnorm_def, ENNReal.coe_toNNReal (snorm_ne_top _)]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nf : { x // x ∈ Lp E p }\nC : ℝ≥0\nhfC : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖₊ ≤ C\nhμ : ¬μ = 0\n⊢ snorm (↑↑f) p μ ≤ ↑(measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹ * C)\n[PROOFSTEP]\nrefine' (snorm_le_of_ae_nnnorm_bound hfC).trans_eq _\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nf : { x // x ∈ Lp E p }\nC : ℝ≥0\nhfC : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖₊ ≤ C\nhμ : ¬μ = 0\n⊢ C • ↑↑μ Set.univ ^ (ENNReal.toReal p)⁻¹ = ↑(measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹ * C)\n[PROOFSTEP]\nrw [← coe_measureUnivNNReal μ, ENNReal.coe_rpow_of_ne_zero (measureUnivNNReal_pos hμ).ne', ENNReal.coe_mul, mul_comm,\n  ENNReal.smul_def, smul_eq_mul]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nf : { x // x ∈ Lp E p }\nC : ℝ\nhC : 0 ≤ C\nhfC : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖ ≤ C\n⊢ ‖f‖ ≤ ↑(measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹) * C\n[PROOFSTEP]\nlift C to ℝ≥0 using hC\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nf : { x // x ∈ Lp E p }\nC : ℝ≥0\nhfC : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖ ≤ ↑C\n⊢ ‖f‖ ≤ ↑(measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹) * ↑C\n[PROOFSTEP]\nhave := nnnorm_le_of_ae_bound hfC\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nf : { x // x ∈ Lp E p }\nC : ℝ≥0\nhfC : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖ ≤ ↑C\nthis : ‖f‖₊ ≤ measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹ * C\n⊢ ‖f‖ ≤ ↑(measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹) * ↑C\n[PROOFSTEP]\nrwa [← NNReal.coe_le_coe, NNReal.coe_mul, NNReal.coe_rpow] at this \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nf g : { x // x ∈ Lp E p }\n⊢ ‖f + g‖ ≤ ‖f‖ + ‖g‖\n[PROOFSTEP]\nsimp only [norm_def]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nf g : { x // x ∈ Lp E p }\n⊢ ENNReal.toReal (snorm (↑↑(f + g)) p μ) ≤ ENNReal.toReal (snorm (↑↑f) p μ) + ENNReal.toReal (snorm (↑↑g) p μ)\n[PROOFSTEP]\nrw [← ENNReal.toReal_add (snorm_ne_top f) (snorm_ne_top g)]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nf g : { x // x ∈ Lp E p }\n⊢ ENNReal.toReal (snorm (↑↑(f + g)) p μ) ≤ ENNReal.toReal (snorm (↑↑f) p μ + snorm (↑↑g) p μ)\n[PROOFSTEP]\nsuffices h_snorm : snorm (⇑(f + g)) p μ ≤ snorm (⇑f) p μ + snorm (⇑g) p μ\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nf g : { x // x ∈ Lp E p }\nh_snorm : snorm (↑↑(f + g)) p μ ≤ snorm (↑↑f) p μ + snorm (↑↑g) p μ\n⊢ ENNReal.toReal (snorm (↑↑(f + g)) p μ) ≤ ENNReal.toReal (snorm (↑↑f) p μ + snorm (↑↑g) p μ)\n[PROOFSTEP]\nrwa [ENNReal.toReal_le_toReal (snorm_ne_top (f + g))]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nf g : { x // x ∈ Lp E p }\nh_snorm : snorm (↑↑(f + g)) p μ ≤ snorm (↑↑f) p μ + snorm (↑↑g) p μ\n⊢ snorm (↑↑f) p μ + snorm (↑↑g) p μ ≠ ⊤\n[PROOFSTEP]\nexact ENNReal.add_ne_top.mpr ⟨snorm_ne_top f, snorm_ne_top g⟩\n[GOAL]\ncase h_snorm\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nf g : { x // x ∈ Lp E p }\n⊢ snorm (↑↑(f + g)) p μ ≤ snorm (↑↑f) p μ + snorm (↑↑g) p μ\n[PROOFSTEP]\nrw [snorm_congr_ae (coeFn_add _ _)]\n[GOAL]\ncase h_snorm\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nf g : { x // x ∈ Lp E p }\n⊢ snorm (↑↑f + ↑↑g) p μ ≤ snorm (↑↑f) p μ + snorm (↑↑g) p μ\n[PROOFSTEP]\nexact snorm_add_le (Lp.aestronglyMeasurable f) (Lp.aestronglyMeasurable g) hp.1\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\n⊢ ∀ (r : { x // x ∈ Lp E p }), ‖-r‖ = ‖r‖\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedAddCommGroup G\n𝕜 : Type u_5\n𝕜' : Type u_6\ninst✝⁵ : NormedRing 𝕜\ninst✝⁴ : NormedRing 𝕜'\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜' E\ninst✝¹ : BoundedSMul 𝕜 E\ninst✝ : BoundedSMul 𝕜' E\nc : 𝕜\nf : { x // x ∈ Lp E p }\n⊢ c • ↑f ∈ Lp E p\n[PROOFSTEP]\nrw [mem_Lp_iff_snorm_lt_top, snorm_congr_ae (AEEqFun.coeFn_smul _ _)]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedAddCommGroup G\n𝕜 : Type u_5\n𝕜' : Type u_6\ninst✝⁵ : NormedRing 𝕜\ninst✝⁴ : NormedRing 𝕜'\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜' E\ninst✝¹ : BoundedSMul 𝕜 E\ninst✝ : BoundedSMul 𝕜' E\nc : 𝕜\nf : { x // x ∈ Lp E p }\n⊢ snorm (c • ↑↑f) p μ < ⊤\n[PROOFSTEP]\nrefine' (snorm_const_smul_le _ _).trans_lt _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedAddCommGroup G\n𝕜 : Type u_5\n𝕜' : Type u_6\ninst✝⁵ : NormedRing 𝕜\ninst✝⁴ : NormedRing 𝕜'\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜' E\ninst✝¹ : BoundedSMul 𝕜 E\ninst✝ : BoundedSMul 𝕜' E\nc : 𝕜\nf : { x // x ∈ Lp E p }\n⊢ ‖c‖₊ • snorm (↑↑f) p μ < ⊤\n[PROOFSTEP]\nrw [ENNReal.smul_def, smul_eq_mul, ENNReal.mul_lt_top_iff]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedAddCommGroup G\n𝕜 : Type u_5\n𝕜' : Type u_6\ninst✝⁵ : NormedRing 𝕜\ninst✝⁴ : NormedRing 𝕜'\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜' E\ninst✝¹ : BoundedSMul 𝕜 E\ninst✝ : BoundedSMul 𝕜' E\nc : 𝕜\nf : { x // x ∈ Lp E p }\n⊢ ↑‖c‖₊ < ⊤ ∧ snorm (↑↑f) p μ < ⊤ ∨ ↑‖c‖₊ = 0 ∨ snorm (↑↑f) p μ = 0\n[PROOFSTEP]\nexact Or.inl ⟨ENNReal.coe_lt_top, f.prop⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedAddCommGroup G\n𝕜 : Type u_5\n𝕜' : Type u_6\ninst✝⁵ : NormedRing 𝕜\ninst✝⁴ : NormedRing 𝕜'\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜' E\ninst✝¹ : BoundedSMul 𝕜 E\ninst✝ : BoundedSMul 𝕜' E\nsrc✝ : AddSubgroup (α →ₘ[μ] E) := Lp E p\nc : 𝕜\nf : α →ₘ[μ] E\nhf : f ∈ src✝.carrier\n⊢ c • f ∈ src✝.carrier\n[PROOFSTEP]\nsimpa using const_smul_mem_Lp c ⟨f, hf⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedAddCommGroup G\n𝕜 : Type u_5\n𝕜' : Type u_6\ninst✝⁶ : NormedRing 𝕜\ninst✝⁵ : NormedRing 𝕜'\ninst✝⁴ : Module 𝕜 E\ninst✝³ : Module 𝕜' E\ninst✝² : BoundedSMul 𝕜 E\ninst✝¹ : BoundedSMul 𝕜' E\ninst✝ : Fact (1 ≤ p)\nr : 𝕜\nf : { x // x ∈ Lp E p }\n⊢ ‖r • f‖ ≤ ‖r‖ * ‖f‖\n[PROOFSTEP]\nsuffices (‖r • f‖₊ : ℝ≥0∞) ≤ ‖r‖₊ * ‖f‖₊ by exact_mod_cast this\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedAddCommGroup G\n𝕜 : Type u_5\n𝕜' : Type u_6\ninst✝⁶ : NormedRing 𝕜\ninst✝⁵ : NormedRing 𝕜'\ninst✝⁴ : Module 𝕜 E\ninst✝³ : Module 𝕜' E\ninst✝² : BoundedSMul 𝕜 E\ninst✝¹ : BoundedSMul 𝕜' E\ninst✝ : Fact (1 ≤ p)\nr : 𝕜\nf : { x // x ∈ Lp E p }\nthis : ↑‖r • f‖₊ ≤ ↑‖r‖₊ * ↑‖f‖₊\n⊢ ‖r • f‖ ≤ ‖r‖ * ‖f‖\n[PROOFSTEP]\nexact_mod_cast this\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedAddCommGroup G\n𝕜 : Type u_5\n𝕜' : Type u_6\ninst✝⁶ : NormedRing 𝕜\ninst✝⁵ : NormedRing 𝕜'\ninst✝⁴ : Module 𝕜 E\ninst✝³ : Module 𝕜' E\ninst✝² : BoundedSMul 𝕜 E\ninst✝¹ : BoundedSMul 𝕜' E\ninst✝ : Fact (1 ≤ p)\nr : 𝕜\nf : { x // x ∈ Lp E p }\n⊢ ↑‖r • f‖₊ ≤ ↑‖r‖₊ * ↑‖f‖₊\n[PROOFSTEP]\nrw [nnnorm_def, nnnorm_def, ENNReal.coe_toNNReal (Lp.snorm_ne_top _), snorm_congr_ae (coeFn_smul _ _),\n  ENNReal.coe_toNNReal (Lp.snorm_ne_top _)]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedAddCommGroup G\n𝕜 : Type u_5\n𝕜' : Type u_6\ninst✝⁶ : NormedRing 𝕜\ninst✝⁵ : NormedRing 𝕜'\ninst✝⁴ : Module 𝕜 E\ninst✝³ : Module 𝕜' E\ninst✝² : BoundedSMul 𝕜 E\ninst✝¹ : BoundedSMul 𝕜' E\ninst✝ : Fact (1 ≤ p)\nr : 𝕜\nf : { x // x ∈ Lp E p }\n⊢ snorm (r • ↑↑f) p μ ≤ ↑‖r‖₊ * snorm (↑↑f) p μ\n[PROOFSTEP]\nexact snorm_const_smul_le r f\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → G\n⊢ snormEssSup (Set.indicator s f) μ ≤ snormEssSup f μ\n[PROOFSTEP]\nrefine' essSup_mono_ae (eventually_of_forall fun x => _)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → G\nx : α\n⊢ (fun x => ↑‖Set.indicator s f x‖₊) x ≤ (fun x => ↑‖f x‖₊) x\n[PROOFSTEP]\nrw [ENNReal.coe_le_coe, nnnorm_indicator_eq_indicator_nnnorm]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → G\nx : α\n⊢ Set.indicator s (fun a => ‖f a‖₊) x ≤ ‖f x‖₊\n[PROOFSTEP]\nexact Set.indicator_le_self s _ x\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\n⊢ snormEssSup (Set.indicator s fun x => c) μ ≤ ↑‖c‖₊\n[PROOFSTEP]\nby_cases hμ0 : μ = 0\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhμ0 : μ = 0\n⊢ snormEssSup (Set.indicator s fun x => c) μ ≤ ↑‖c‖₊\n[PROOFSTEP]\nrw [hμ0, snormEssSup_measure_zero]\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhμ0 : μ = 0\n⊢ 0 ≤ ↑‖c‖₊\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhμ0 : ¬μ = 0\n⊢ snormEssSup (Set.indicator s fun x => c) μ ≤ ↑‖c‖₊\n[PROOFSTEP]\nexact (snormEssSup_indicator_le s fun _ => c).trans (snormEssSup_const c hμ0).le\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhμs : ↑↑μ s ≠ 0\n⊢ snormEssSup (Set.indicator s fun x => c) μ = ↑‖c‖₊\n[PROOFSTEP]\nrefine' le_antisymm (snormEssSup_indicator_const_le s c) _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhμs : ↑↑μ s ≠ 0\n⊢ ↑‖c‖₊ ≤ snormEssSup (Set.indicator s fun x => c) μ\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhμs : ↑↑μ s ≠ 0\nh : snormEssSup (Set.indicator s fun x => c) μ < ↑‖c‖₊\n⊢ False\n[PROOFSTEP]\nhave h' := ae_iff.mp (ae_lt_of_essSup_lt h)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhμs : ↑↑μ s ≠ 0\nh : snormEssSup (Set.indicator s fun x => c) μ < ↑‖c‖₊\nh' : ↑↑μ {a | ¬↑‖Set.indicator s (fun x => c) a‖₊ < ↑‖c‖₊} = 0\n⊢ False\n[PROOFSTEP]\npush_neg at h' \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhμs : ↑↑μ s ≠ 0\nh : snormEssSup (Set.indicator s fun x => c) μ < ↑‖c‖₊\nh' : ↑↑μ {a | ↑‖c‖₊ ≤ ↑‖Set.indicator s (fun x => c) a‖₊} = 0\n⊢ False\n[PROOFSTEP]\nrefine' hμs (measure_mono_null (fun x hx_mem => _) h')\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhμs : ↑↑μ s ≠ 0\nh : snormEssSup (Set.indicator s fun x => c) μ < ↑‖c‖₊\nh' : ↑↑μ {a | ↑‖c‖₊ ≤ ↑‖Set.indicator s (fun x => c) a‖₊} = 0\nx : α\nhx_mem : x ∈ s\n⊢ x ∈ {a | ↑‖c‖₊ ≤ ↑‖Set.indicator s (fun x => c) a‖₊}\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, Set.indicator_of_mem hx_mem]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\nf : α → E\ns : Set α\n⊢ snorm (Set.indicator s f) p μ ≤ snorm f p μ\n[PROOFSTEP]\nrefine' snorm_mono_ae (eventually_of_forall fun x => _)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\nf : α → E\ns : Set α\nx : α\n⊢ ‖Set.indicator s f x‖ ≤ ‖f x‖\n[PROOFSTEP]\nsuffices ‖s.indicator f x‖₊ ≤ ‖f x‖₊ by exact NNReal.coe_mono this\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\nf : α → E\ns : Set α\nx : α\nthis : ‖Set.indicator s f x‖₊ ≤ ‖f x‖₊\n⊢ ‖Set.indicator s f x‖ ≤ ‖f x‖\n[PROOFSTEP]\nexact NNReal.coe_mono this\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\nf : α → E\ns : Set α\nx : α\n⊢ ‖Set.indicator s f x‖₊ ≤ ‖f x‖₊\n[PROOFSTEP]\nrw [nnnorm_indicator_eq_indicator_nnnorm]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\nf : α → E\ns : Set α\nx : α\n⊢ Set.indicator s (fun a => ‖f a‖₊) x ≤ ‖f x‖₊\n[PROOFSTEP]\nexact s.indicator_le_self _ x\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhs : NullMeasurableSet s\nhp : p ≠ 0\nhp_top : p ≠ ⊤\nhp_pos : 0 < ENNReal.toReal p\n⊢ (∫⁻ (x : α), ↑‖Set.indicator s (fun x => c) x‖₊ ^ ENNReal.toReal p ∂μ) ^ (1 / ENNReal.toReal p) =\n    (∫⁻ (x : α), Set.indicator s (fun x => ↑‖c‖₊ ^ ENNReal.toReal p) x ∂μ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_f\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhs : NullMeasurableSet s\nhp : p ≠ 0\nhp_top : p ≠ ⊤\nhp_pos : 0 < ENNReal.toReal p\n⊢ (fun x => ↑‖Set.indicator s (fun x => c) x‖₊ ^ ENNReal.toReal p) = fun x =>\n    Set.indicator s (fun x => ↑‖c‖₊ ^ ENNReal.toReal p) x\n[PROOFSTEP]\nrefine (Set.comp_indicator_const c (fun x : G ↦ (‖x‖₊ : ℝ≥0∞) ^ p.toReal) ?_)\n[GOAL]\ncase e_a.e_f\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhs : NullMeasurableSet s\nhp : p ≠ 0\nhp_top : p ≠ ⊤\nhp_pos : 0 < ENNReal.toReal p\n⊢ (fun x => ↑‖x‖₊ ^ ENNReal.toReal p) 0 = 0\n[PROOFSTEP]\nsimp [hp_pos]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhs : NullMeasurableSet s\nhp : p ≠ 0\nhp_top : p ≠ ⊤\nhp_pos : 0 < ENNReal.toReal p\n⊢ (∫⁻ (x : α), Set.indicator s (fun x => ↑‖c‖₊ ^ ENNReal.toReal p) x ∂μ) ^ (1 / ENNReal.toReal p) =\n    ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [lintegral_indicator_const₀ hs, ENNReal.mul_rpow_of_nonneg, ← ENNReal.rpow_mul, mul_one_div_cancel hp_pos.ne',\n  ENNReal.rpow_one]\n[GOAL]\ncase hz\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhs : NullMeasurableSet s\nhp : p ≠ 0\nhp_top : p ≠ ⊤\nhp_pos : 0 < ENNReal.toReal p\n⊢ 0 ≤ 1 / ENNReal.toReal p\n[PROOFSTEP]\npositivity\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ 0\nhp : p ≠ 0\n⊢ snorm (Set.indicator s fun x => c) p μ = ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nby_cases hp_top : p = ∞\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ 0\nhp : p ≠ 0\nhp_top : p = ⊤\n⊢ snorm (Set.indicator s fun x => c) p μ = ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nsimp [hp_top, snormEssSup_indicator_const_eq s c hμs]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ 0\nhp : p ≠ 0\nhp_top : ¬p = ⊤\n⊢ snorm (Set.indicator s fun x => c) p μ = ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nexact snorm_indicator_const hs hp hp_top\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\np : ℝ≥0∞\n⊢ snorm (Set.indicator s fun x => c) p μ ≤ ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrcases eq_or_ne p 0 with (rfl | hp)\n[GOAL]\ncase inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\n⊢ snorm (Set.indicator s fun x => c) 0 μ ≤ ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal 0)\n[PROOFSTEP]\nsimp only [snorm_exponent_zero, zero_le']\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\np : ℝ≥0∞\nhp : p ≠ 0\n⊢ snorm (Set.indicator s fun x => c) p μ ≤ ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrcases eq_or_ne p ∞ with (rfl | h'p)\n[GOAL]\ncase inr.inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhp : ⊤ ≠ 0\n⊢ snorm (Set.indicator s fun x => c) ⊤ μ ≤ ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal ⊤)\n[PROOFSTEP]\nsimp only [snorm_exponent_top, ENNReal.top_toReal, _root_.div_zero, ENNReal.rpow_zero, mul_one]\n[GOAL]\ncase inr.inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\nhp : ⊤ ≠ 0\n⊢ snormEssSup (Set.indicator s fun x => c) μ ≤ ↑‖c‖₊\n[PROOFSTEP]\nexact snormEssSup_indicator_const_le _ _\n[GOAL]\ncase inr.inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\np : ℝ≥0∞\nhp : p ≠ 0\nh'p : p ≠ ⊤\n⊢ snorm (Set.indicator s fun x => c) p μ ≤ ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nlet t := toMeasurable μ s\n[GOAL]\ncase inr.inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\np : ℝ≥0∞\nhp : p ≠ 0\nh'p : p ≠ ⊤\nt : Set α := toMeasurable μ s\n⊢ snorm (Set.indicator s fun x => c) p μ ≤ ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\ncalc\n  snorm (s.indicator fun _ => c) p μ ≤ snorm (t.indicator fun _ => c) p μ :=\n    snorm_mono (norm_indicator_le_of_subset (subset_toMeasurable _ _) _)\n  _ = ‖c‖₊ * μ t ^ (1 / p.toReal) := (snorm_indicator_const (measurableSet_toMeasurable _ _) hp h'p)\n  _ = ‖c‖₊ * μ s ^ (1 / p.toReal) := by rw [measure_toMeasurable]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nc : G\np : ℝ≥0∞\nhp : p ≠ 0\nh'p : p ≠ ⊤\nt : Set α := toMeasurable μ s\n⊢ ↑‖c‖₊ * ↑↑μ t ^ (1 / ENNReal.toReal p) = ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [measure_toMeasurable]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\n⊢ snormEssSup (Set.indicator s f) μ = snormEssSup f (Measure.restrict μ s)\n[PROOFSTEP]\nsimp_rw [snormEssSup, nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\n⊢ essSup (fun x => Set.indicator s (fun x => ↑‖f x‖₊) x) μ = essSup (fun x => ↑‖f x‖₊) (Measure.restrict μ s)\n[PROOFSTEP]\nby_cases hs_null : μ s = 0\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhs_null : ↑↑μ s = 0\n⊢ essSup (fun x => Set.indicator s (fun x => ↑‖f x‖₊) x) μ = essSup (fun x => ↑‖f x‖₊) (Measure.restrict μ s)\n[PROOFSTEP]\nrw [Measure.restrict_zero_set hs_null]\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhs_null : ↑↑μ s = 0\n⊢ essSup (fun x => Set.indicator s (fun x => ↑‖f x‖₊) x) μ = essSup (fun x => ↑‖f x‖₊) 0\n[PROOFSTEP]\nsimp only [essSup_measure_zero, ENNReal.essSup_eq_zero_iff, ENNReal.bot_eq_zero]\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhs_null : ↑↑μ s = 0\n⊢ (fun x => Set.indicator s (fun x => ↑‖f x‖₊) x) =ᵐ[μ] 0\n[PROOFSTEP]\nhave hs_empty : s =ᵐ[μ] (∅ : Set α) := by rw [ae_eq_set]; simpa using hs_null\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhs_null : ↑↑μ s = 0\n⊢ s =ᵐ[μ] ∅\n[PROOFSTEP]\nrw [ae_eq_set]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhs_null : ↑↑μ s = 0\n⊢ ↑↑μ (s \\ ∅) = 0 ∧ ↑↑μ (∅ \\ s) = 0\n[PROOFSTEP]\nsimpa using hs_null\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhs_null : ↑↑μ s = 0\nhs_empty : s =ᵐ[μ] ∅\n⊢ (fun x => Set.indicator s (fun x => ↑‖f x‖₊) x) =ᵐ[μ] 0\n[PROOFSTEP]\nrefine' (indicator_ae_eq_of_ae_eq_set hs_empty).trans _\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhs_null : ↑↑μ s = 0\nhs_empty : s =ᵐ[μ] ∅\n⊢ (Set.indicator ∅ fun x => ↑‖f x‖₊) =ᵐ[μ] 0\n[PROOFSTEP]\nrw [Set.indicator_empty]\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhs_null : ↑↑μ s = 0\nhs_empty : s =ᵐ[μ] ∅\n⊢ (fun x => 0) =ᵐ[μ] 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhs_null : ¬↑↑μ s = 0\n⊢ essSup (fun x => Set.indicator s (fun x => ↑‖f x‖₊) x) μ = essSup (fun x => ↑‖f x‖₊) (Measure.restrict μ s)\n[PROOFSTEP]\nrw [essSup_indicator_eq_essSup_restrict (eventually_of_forall fun x => ?_) hs hs_null]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhs_null : ¬↑↑μ s = 0\nx : α\n⊢ OfNat.ofNat 0 x ≤ ↑‖f x‖₊\n[PROOFSTEP]\nrw [Pi.zero_apply]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhs_null : ¬↑↑μ s = 0\nx : α\n⊢ 0 ≤ ↑‖f x‖₊\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\n⊢ snorm (Set.indicator s f) p μ = snorm f p (Measure.restrict μ s)\n[PROOFSTEP]\nby_cases hp_zero : p = 0\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : p = 0\n⊢ snorm (Set.indicator s f) p μ = snorm f p (Measure.restrict μ s)\n[PROOFSTEP]\nsimp only [hp_zero, snorm_exponent_zero]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : ¬p = 0\n⊢ snorm (Set.indicator s f) p μ = snorm f p (Measure.restrict μ s)\n[PROOFSTEP]\nby_cases hp_top : p = ∞\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : ¬p = 0\nhp_top : p = ⊤\n⊢ snorm (Set.indicator s f) p μ = snorm f p (Measure.restrict μ s)\n[PROOFSTEP]\nsimp_rw [hp_top, snorm_exponent_top]\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : ¬p = 0\nhp_top : p = ⊤\n⊢ snormEssSup (Set.indicator s f) μ = snormEssSup f (Measure.restrict μ s)\n[PROOFSTEP]\nexact snormEssSup_indicator_eq_snormEssSup_restrict hs\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : ¬p = 0\nhp_top : ¬p = ⊤\n⊢ snorm (Set.indicator s f) p μ = snorm f p (Measure.restrict μ s)\n[PROOFSTEP]\nsimp_rw [snorm_eq_lintegral_rpow_nnnorm hp_zero hp_top]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : ¬p = 0\nhp_top : ¬p = ⊤\n⊢ (∫⁻ (x : α), ↑‖Set.indicator s f x‖₊ ^ ENNReal.toReal p ∂μ) ^ (1 / ENNReal.toReal p) =\n    (∫⁻ (x : α) in s, ↑‖f x‖₊ ^ ENNReal.toReal p ∂μ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nsuffices (∫⁻ x, (‖s.indicator f x‖₊ : ℝ≥0∞) ^ p.toReal ∂μ) = ∫⁻ x in s, (‖f x‖₊ : ℝ≥0∞) ^ p.toReal ∂μ by rw [this]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : ¬p = 0\nhp_top : ¬p = ⊤\nthis : ∫⁻ (x : α), ↑‖Set.indicator s f x‖₊ ^ ENNReal.toReal p ∂μ = ∫⁻ (x : α) in s, ↑‖f x‖₊ ^ ENNReal.toReal p ∂μ\n⊢ (∫⁻ (x : α), ↑‖Set.indicator s f x‖₊ ^ ENNReal.toReal p ∂μ) ^ (1 / ENNReal.toReal p) =\n    (∫⁻ (x : α) in s, ↑‖f x‖₊ ^ ENNReal.toReal p ∂μ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : ¬p = 0\nhp_top : ¬p = ⊤\n⊢ ∫⁻ (x : α), ↑‖Set.indicator s f x‖₊ ^ ENNReal.toReal p ∂μ = ∫⁻ (x : α) in s, ↑‖f x‖₊ ^ ENNReal.toReal p ∂μ\n[PROOFSTEP]\nrw [← lintegral_indicator _ hs]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : ¬p = 0\nhp_top : ¬p = ⊤\n⊢ ∫⁻ (x : α), ↑‖Set.indicator s f x‖₊ ^ ENNReal.toReal p ∂μ =\n    ∫⁻ (a : α), Set.indicator s (fun x => ↑‖f x‖₊ ^ ENNReal.toReal p) a ∂μ\n[PROOFSTEP]\ncongr\n[GOAL]\ncase neg.e_f\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : ¬p = 0\nhp_top : ¬p = ⊤\n⊢ (fun x => ↑‖Set.indicator s f x‖₊ ^ ENNReal.toReal p) = fun a =>\n    Set.indicator s (fun x => ↑‖f x‖₊ ^ ENNReal.toReal p) a\n[PROOFSTEP]\nsimp_rw [nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator]\n[GOAL]\ncase neg.e_f\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : ¬p = 0\nhp_top : ¬p = ⊤\n⊢ (fun x => Set.indicator s (fun x => ↑‖f x‖₊) x ^ ENNReal.toReal p) = fun a =>\n    Set.indicator s (fun x => ↑‖f x‖₊ ^ ENNReal.toReal p) a\n[PROOFSTEP]\nhave h_zero : (fun x => x ^ p.toReal) (0 : ℝ≥0∞) = 0 := by\n  simp [ENNReal.toReal_pos hp_zero hp_top]\n    -- Porting note: The implicit argument should be specified because the elaborator can't deal with\n      --               `∘` well.\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : ¬p = 0\nhp_top : ¬p = ⊤\n⊢ (fun x => x ^ ENNReal.toReal p) 0 = 0\n[PROOFSTEP]\nsimp [ENNReal.toReal_pos hp_zero hp_top]\n  -- Porting note: The implicit argument should be specified because the elaborator can't deal with\n    --               `∘` well.\n[GOAL]\ncase neg.e_f\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf✝ : α → E\nhf : AEStronglyMeasurable f✝ μ\ns : Set α\nf : α → F\nhs : MeasurableSet s\nhp_zero : ¬p = 0\nhp_top : ¬p = ⊤\nh_zero : (fun x => x ^ ENNReal.toReal p) 0 = 0\n⊢ (fun x => Set.indicator s (fun x => ↑‖f x‖₊) x ^ ENNReal.toReal p) = fun a =>\n    Set.indicator s (fun x => ↑‖f x‖₊ ^ ENNReal.toReal p) a\n[PROOFSTEP]\nexact (Set.indicator_comp_of_zero (g := fun x : ℝ≥0∞ => x ^ p.toReal) h_zero).symm\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\nhs : MeasurableSet s\n⊢ Memℒp (Set.indicator s f) p ↔ Memℒp f p\n[PROOFSTEP]\nsimp [Memℒp, aestronglyMeasurable_indicator_iff hs, snorm_indicator_eq_snorm_restrict hs]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\np : ℝ≥0∞\nhs : MeasurableSet s\nc : E\nhμsc : c = 0 ∨ ↑↑μ s ≠ ⊤\n⊢ Memℒp (Set.indicator s fun x => c) p\n[PROOFSTEP]\nrw [memℒp_indicator_iff_restrict hs]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\np : ℝ≥0∞\nhs : MeasurableSet s\nc : E\nhμsc : c = 0 ∨ ↑↑μ s ≠ ⊤\n⊢ Memℒp (fun x => c) p\n[PROOFSTEP]\nrcases hμsc with rfl | hμ\n[GOAL]\ncase inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\np : ℝ≥0∞\nhs : MeasurableSet s\n⊢ Memℒp (fun x => 0) p\n[PROOFSTEP]\nexact zero_memℒp\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\np : ℝ≥0∞\nhs : MeasurableSet s\nc : E\nhμ : ↑↑μ s ≠ ⊤\n⊢ Memℒp (fun x => c) p\n[PROOFSTEP]\nhave := Fact.mk hμ.lt_top\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\ns : Set α\np : ℝ≥0∞\nhs : MeasurableSet s\nc : E\nhμ : ↑↑μ s ≠ ⊤\nthis : Fact (↑↑μ s < ⊤)\n⊢ Memℒp (fun x => c) p\n[PROOFSTEP]\napply memℒp_const\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\n⊢ ∃ η, 0 < η ∧ ∀ (s : Set α), ↑↑μ s ≤ ↑η → snorm (Set.indicator s fun x => c) p μ ≤ ε\n[PROOFSTEP]\nrcases eq_or_ne p 0 with (rfl | h'p)\n[GOAL]\ncase inl\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp : 0 ≠ ⊤\n⊢ ∃ η, 0 < η ∧ ∀ (s : Set α), ↑↑μ s ≤ ↑η → snorm (Set.indicator s fun x => c) 0 μ ≤ ε\n[PROOFSTEP]\nexact ⟨1, zero_lt_one, fun s _ => by simp⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp : 0 ≠ ⊤\ns : Set α\nx✝ : ↑↑μ s ≤ ↑1\n⊢ snorm (Set.indicator s fun x => c) 0 μ ≤ ε\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\n⊢ ∃ η, 0 < η ∧ ∀ (s : Set α), ↑↑μ s ≤ ↑η → snorm (Set.indicator s fun x => c) p μ ≤ ε\n[PROOFSTEP]\nhave hp₀ : 0 < p := bot_lt_iff_ne_bot.2 h'p\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\n⊢ ∃ η, 0 < η ∧ ∀ (s : Set α), ↑↑μ s ≤ ↑η → snorm (Set.indicator s fun x => c) p μ ≤ ε\n[PROOFSTEP]\nhave hp₀' : 0 ≤ 1 / p.toReal := div_nonneg zero_le_one ENNReal.toReal_nonneg\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\n⊢ ∃ η, 0 < η ∧ ∀ (s : Set α), ↑↑μ s ≤ ↑η → snorm (Set.indicator s fun x => c) p μ ≤ ε\n[PROOFSTEP]\nhave hp₀'' : 0 < p.toReal := by simpa [← ENNReal.toReal_lt_toReal ENNReal.zero_ne_top hp] using hp₀\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\n⊢ 0 < ENNReal.toReal p\n[PROOFSTEP]\nsimpa [← ENNReal.toReal_lt_toReal ENNReal.zero_ne_top hp] using hp₀\n[GOAL]\ncase inr\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\n⊢ ∃ η, 0 < η ∧ ∀ (s : Set α), ↑↑μ s ≤ ↑η → snorm (Set.indicator s fun x => c) p μ ≤ ε\n[PROOFSTEP]\nobtain ⟨η, hη_pos, hη_le⟩ : ∃ η : ℝ≥0, 0 < η ∧ (‖c‖₊ : ℝ≥0∞) * (η : ℝ≥0∞) ^ (1 / p.toReal) ≤ ε :=\n  by\n  have : Filter.Tendsto (fun x : ℝ≥0 => ((‖c‖₊ * x ^ (1 / p.toReal) : ℝ≥0) : ℝ≥0∞)) (𝓝 0) (𝓝 (0 : ℝ≥0)) :=\n    by\n    rw [ENNReal.tendsto_coe]\n    convert (NNReal.continuousAt_rpow_const (Or.inr hp₀')).tendsto.const_mul _\n    simp [hp₀''.ne']\n  have hε' : 0 < ε := hε.bot_lt\n  obtain ⟨δ, hδ, hδε'⟩ := NNReal.nhds_zero_basis.eventually_iff.mp (eventually_le_of_tendsto_lt hε' this)\n  obtain ⟨η, hη, hηδ⟩ := exists_between hδ\n  refine' ⟨η, hη, _⟩\n  rw [ENNReal.coe_rpow_of_nonneg _ hp₀', ← ENNReal.coe_mul]\n  exact hδε' hηδ\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\n⊢ ∃ η, 0 < η ∧ ↑‖c‖₊ * ↑η ^ (1 / ENNReal.toReal p) ≤ ε\n[PROOFSTEP]\nhave : Filter.Tendsto (fun x : ℝ≥0 => ((‖c‖₊ * x ^ (1 / p.toReal) : ℝ≥0) : ℝ≥0∞)) (𝓝 0) (𝓝 (0 : ℝ≥0)) :=\n  by\n  rw [ENNReal.tendsto_coe]\n  convert (NNReal.continuousAt_rpow_const (Or.inr hp₀')).tendsto.const_mul _\n  simp [hp₀''.ne']\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\n⊢ Tendsto (fun x => ↑(‖c‖₊ * x ^ (1 / ENNReal.toReal p))) (𝓝 0) (𝓝 ↑0)\n[PROOFSTEP]\nrw [ENNReal.tendsto_coe]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\n⊢ Tendsto (fun x => ‖c‖₊ * x ^ (1 / ENNReal.toReal p)) (𝓝 0) (𝓝 0)\n[PROOFSTEP]\nconvert (NNReal.continuousAt_rpow_const (Or.inr hp₀')).tendsto.const_mul _\n[GOAL]\ncase h.e'_5.h.e'_3\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\n⊢ 0 = ‖c‖₊ * 0 ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nsimp [hp₀''.ne']\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\nthis : Tendsto (fun x => ↑(‖c‖₊ * x ^ (1 / ENNReal.toReal p))) (𝓝 0) (𝓝 ↑0)\n⊢ ∃ η, 0 < η ∧ ↑‖c‖₊ * ↑η ^ (1 / ENNReal.toReal p) ≤ ε\n[PROOFSTEP]\nhave hε' : 0 < ε := hε.bot_lt\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\nthis : Tendsto (fun x => ↑(‖c‖₊ * x ^ (1 / ENNReal.toReal p))) (𝓝 0) (𝓝 ↑0)\nhε' : 0 < ε\n⊢ ∃ η, 0 < η ∧ ↑‖c‖₊ * ↑η ^ (1 / ENNReal.toReal p) ≤ ε\n[PROOFSTEP]\nobtain ⟨δ, hδ, hδε'⟩ := NNReal.nhds_zero_basis.eventually_iff.mp (eventually_le_of_tendsto_lt hε' this)\n[GOAL]\ncase intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\nthis : Tendsto (fun x => ↑(‖c‖₊ * x ^ (1 / ENNReal.toReal p))) (𝓝 0) (𝓝 ↑0)\nhε' : 0 < ε\nδ : ℝ≥0\nhδ : 0 < δ\nhδε' : ∀ ⦃x : ℝ≥0⦄, x ∈ Set.Iio δ → ↑(‖c‖₊ * x ^ (1 / ENNReal.toReal p)) ≤ ε\n⊢ ∃ η, 0 < η ∧ ↑‖c‖₊ * ↑η ^ (1 / ENNReal.toReal p) ≤ ε\n[PROOFSTEP]\nobtain ⟨η, hη, hηδ⟩ := exists_between hδ\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\nthis : Tendsto (fun x => ↑(‖c‖₊ * x ^ (1 / ENNReal.toReal p))) (𝓝 0) (𝓝 ↑0)\nhε' : 0 < ε\nδ : ℝ≥0\nhδ : 0 < δ\nhδε' : ∀ ⦃x : ℝ≥0⦄, x ∈ Set.Iio δ → ↑(‖c‖₊ * x ^ (1 / ENNReal.toReal p)) ≤ ε\nη : ℝ≥0\nhη : 0 < η\nhηδ : η < δ\n⊢ ∃ η, 0 < η ∧ ↑‖c‖₊ * ↑η ^ (1 / ENNReal.toReal p) ≤ ε\n[PROOFSTEP]\nrefine' ⟨η, hη, _⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\nthis : Tendsto (fun x => ↑(‖c‖₊ * x ^ (1 / ENNReal.toReal p))) (𝓝 0) (𝓝 ↑0)\nhε' : 0 < ε\nδ : ℝ≥0\nhδ : 0 < δ\nhδε' : ∀ ⦃x : ℝ≥0⦄, x ∈ Set.Iio δ → ↑(‖c‖₊ * x ^ (1 / ENNReal.toReal p)) ≤ ε\nη : ℝ≥0\nhη : 0 < η\nhηδ : η < δ\n⊢ ↑‖c‖₊ * ↑η ^ (1 / ENNReal.toReal p) ≤ ε\n[PROOFSTEP]\nrw [ENNReal.coe_rpow_of_nonneg _ hp₀', ← ENNReal.coe_mul]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\nthis : Tendsto (fun x => ↑(‖c‖₊ * x ^ (1 / ENNReal.toReal p))) (𝓝 0) (𝓝 ↑0)\nhε' : 0 < ε\nδ : ℝ≥0\nhδ : 0 < δ\nhδε' : ∀ ⦃x : ℝ≥0⦄, x ∈ Set.Iio δ → ↑(‖c‖₊ * x ^ (1 / ENNReal.toReal p)) ≤ ε\nη : ℝ≥0\nhη : 0 < η\nhηδ : η < δ\n⊢ ↑(‖c‖₊ * η ^ (1 / ENNReal.toReal p)) ≤ ε\n[PROOFSTEP]\nexact hδε' hηδ\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\nη : ℝ≥0\nhη_pos : 0 < η\nhη_le : ↑‖c‖₊ * ↑η ^ (1 / ENNReal.toReal p) ≤ ε\n⊢ ∃ η, 0 < η ∧ ∀ (s : Set α), ↑↑μ s ≤ ↑η → snorm (Set.indicator s fun x => c) p μ ≤ ε\n[PROOFSTEP]\nrefine' ⟨η, hη_pos, fun s hs => _⟩\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\nη : ℝ≥0\nhη_pos : 0 < η\nhη_le : ↑‖c‖₊ * ↑η ^ (1 / ENNReal.toReal p) ≤ ε\ns : Set α\nhs : ↑↑μ s ≤ ↑η\n⊢ snorm (Set.indicator s fun x => c) p μ ≤ ε\n[PROOFSTEP]\nrefine' (snorm_indicator_const_le _ _).trans (le_trans _ hη_le)\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nc✝ : E\nf : α → E\nhf : AEStronglyMeasurable f μ\nhp : p ≠ ⊤\nc : E\nε : ℝ≥0∞\nhε : ε ≠ 0\nh'p : p ≠ 0\nhp₀ : 0 < p\nhp₀' : 0 ≤ 1 / ENNReal.toReal p\nhp₀'' : 0 < ENNReal.toReal p\nη : ℝ≥0\nhη_pos : 0 < η\nhη_le : ↑‖c‖₊ * ↑η ^ (1 / ENNReal.toReal p) ≤ ε\ns : Set α\nhs : ↑↑μ s ≤ ↑η\n⊢ ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p) ≤ ↑‖c‖₊ * ↑η ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nexact mul_le_mul_left' (ENNReal.rpow_le_rpow hs hp₀') _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\n⊢ ‖indicatorConstLp p hs hμs c‖ = ‖c‖ * ENNReal.toReal (↑↑μ s) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [Lp.norm_def, snorm_congr_ae indicatorConstLp_coeFn, snorm_indicator_const hs hp_ne_zero hp_ne_top,\n  ENNReal.toReal_mul, ENNReal.toReal_rpow, ENNReal.coe_toReal, coe_nnnorm]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nhμs_ne_zero : ↑↑μ s ≠ 0\n⊢ ‖indicatorConstLp ⊤ hs hμs c‖ = ‖c‖\n[PROOFSTEP]\nrw [Lp.norm_def, snorm_congr_ae indicatorConstLp_coeFn, snorm_indicator_const' hs hμs_ne_zero ENNReal.top_ne_zero,\n  ENNReal.top_toReal, _root_.div_zero, ENNReal.rpow_zero, mul_one, ENNReal.coe_toReal, coe_nnnorm]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nhp_pos : p ≠ 0\nhμs_pos : ↑↑μ s ≠ 0\n⊢ ‖indicatorConstLp p hs hμs c‖ = ‖c‖ * ENNReal.toReal (↑↑μ s) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nby_cases hp_top : p = ∞\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nhp_pos : p ≠ 0\nhμs_pos : ↑↑μ s ≠ 0\nhp_top : p = ⊤\n⊢ ‖indicatorConstLp p hs hμs c‖ = ‖c‖ * ENNReal.toReal (↑↑μ s) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [hp_top, ENNReal.top_toReal, _root_.div_zero, Real.rpow_zero, mul_one]\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nhp_pos : p ≠ 0\nhμs_pos : ↑↑μ s ≠ 0\nhp_top : p = ⊤\n⊢ ‖indicatorConstLp ⊤ hs hμs c‖ = ‖c‖\n[PROOFSTEP]\nexact norm_indicatorConstLp_top hμs_pos\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nhp_pos : p ≠ 0\nhμs_pos : ↑↑μ s ≠ 0\nhp_top : ¬p = ⊤\n⊢ ‖indicatorConstLp p hs hμs c‖ = ‖c‖ * ENNReal.toReal (↑↑μ s) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nexact norm_indicatorConstLp hp_pos hp_top\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ ‖indicatorConstLp p hs hμs c‖ ≤ ‖c‖ * ENNReal.toReal (↑↑μ s) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [indicatorConstLp, Lp.norm_toLp]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ ENNReal.toReal (snorm (indicator s fun x => c) p μ) ≤ ‖c‖ * ENNReal.toReal (↑↑μ s) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrefine toReal_le_of_le_ofReal (by positivity) ?_\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ 0 ≤ ‖c‖ * ENNReal.toReal (↑↑μ s) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\npositivity\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ snorm (indicator s fun x => c) p μ ≤ ENNReal.ofReal (‖c‖ * ENNReal.toReal (↑↑μ s) ^ (1 / ENNReal.toReal p))\n[PROOFSTEP]\nrefine (snorm_indicator_const_le _ _).trans_eq ?_\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p) = ENNReal.ofReal (‖c‖ * ENNReal.toReal (↑↑μ s) ^ (1 / ENNReal.toReal p))\n[PROOFSTEP]\nrw [← coe_nnnorm, ENNReal.ofReal_mul (NNReal.coe_nonneg _), ENNReal.ofReal_coe_nnreal, ENNReal.toReal_rpow,\n  ENNReal.ofReal_toReal]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ ↑↑μ s ^ (1 / ENNReal.toReal p) ≠ ⊤\n[PROOFSTEP]\nexact ENNReal.rpow_ne_top_of_nonneg (by positivity) hμs\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ 0 ≤ 1 / ENNReal.toReal p\n[PROOFSTEP]\npositivity\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ ↑↑μ ∅ ≠ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ indicatorConstLp p (_ : MeasurableSet ∅) (_ : ↑↑μ ∅ ≠ ⊤) c = 0\n[PROOFSTEP]\nrw [Lp.eq_zero_iff_ae_eq_zero]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ ↑↑(indicatorConstLp p (_ : MeasurableSet ∅) (_ : ↑↑μ ∅ ≠ ⊤) c) =ᵐ[μ] 0\n[PROOFSTEP]\nconvert indicatorConstLp_coeFn (E := E)\n[GOAL]\ncase h.e'_5\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ 0 = indicator ∅ fun x => c\n[PROOFSTEP]\nsimp [Set.indicator_empty']\n[GOAL]\ncase h.e'_5\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ 0 = fun x => 0\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nf g : α → E\nh : Disjoint (support f) (support g)\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\n⊢ Memℒp (f + g) p ↔ Memℒp f p ∧ Memℒp g p\n[PROOFSTEP]\nborelize E\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nf g : α → E\nh : Disjoint (support f) (support g)\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ Memℒp (f + g) p ↔ Memℒp f p ∧ Memℒp g p\n[PROOFSTEP]\nrefine' ⟨fun hfg => ⟨_, _⟩, fun h => h.1.add h.2⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nf g : α → E\nh : Disjoint (support f) (support g)\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nhfg : Memℒp (f + g) p\n⊢ Memℒp f p\n[PROOFSTEP]\nrw [← Set.indicator_add_eq_left h]\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nf g : α → E\nh : Disjoint (support f) (support g)\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nhfg : Memℒp (f + g) p\n⊢ Memℒp (indicator (support f) (f + g)) p\n[PROOFSTEP]\nexact hfg.indicator (measurableSet_support hf.measurable)\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nf g : α → E\nh : Disjoint (support f) (support g)\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nhfg : Memℒp (f + g) p\n⊢ Memℒp g p\n[PROOFSTEP]\nrw [← Set.indicator_add_eq_right h]\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nf g : α → E\nh : Disjoint (support f) (support g)\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nhfg : Memℒp (f + g) p\n⊢ Memℒp (indicator (support g) (f + g)) p\n[PROOFSTEP]\nexact hfg.indicator (measurableSet_support hg.measurable)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns✝ : Set α\nhs✝ : MeasurableSet s✝\nhμs✝ : ↑↑μ s✝ ≠ ⊤\nc✝ : E\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nc : E\n⊢ indicatorConstLp p (_ : MeasurableSet (s ∪ t)) (_ : ↑↑μ (s ∪ t) ≠ ⊤) c =\n    indicatorConstLp p hs hμs c + indicatorConstLp p ht hμt c\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns✝ : Set α\nhs✝ : MeasurableSet s✝\nhμs✝ : ↑↑μ s✝ ≠ ⊤\nc✝ : E\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nc : E\n⊢ ↑↑(indicatorConstLp p (_ : MeasurableSet (s ∪ t)) (_ : ↑↑μ (s ∪ t) ≠ ⊤) c) =ᵐ[μ]\n    ↑↑(indicatorConstLp p hs hμs c + indicatorConstLp p ht hμt c)\n[PROOFSTEP]\nrefine' indicatorConstLp_coeFn.trans (EventuallyEq.trans _ (Lp.coeFn_add _ _).symm)\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns✝ : Set α\nhs✝ : MeasurableSet s✝\nhμs✝ : ↑↑μ s✝ ≠ ⊤\nc✝ : E\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nc : E\n⊢ (indicator (s ∪ t) fun x => c) =ᵐ[μ] ↑↑(indicatorConstLp p hs hμs c) + ↑↑(indicatorConstLp p ht hμt c)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (EventuallyEq.add indicatorConstLp_coeFn.symm indicatorConstLp_coeFn.symm)\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ns✝ : Set α\nhs✝ : MeasurableSet s✝\nhμs✝ : ↑↑μ s✝ ≠ ⊤\nc✝ : E\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nc : E\n⊢ (indicator (s ∪ t) fun x => c) =ᵐ[μ] fun x => indicator s (fun x => c) x + indicator t (fun x => c) x\n[PROOFSTEP]\nrw [Set.indicator_union_of_disjoint (Set.disjoint_iff_inter_eq_empty.mpr hst) _]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nc : E\n⊢ indicatorConstLp p (_ : MeasurableSet Set.univ) (_ : ↑↑μ Set.univ ≠ ⊤) c = ↑(Lp.const p μ) c\n[PROOFSTEP]\nrw [← Memℒp.toLp_const, indicatorConstLp]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nc : E\n⊢ Memℒp.toLp (Set.indicator Set.univ fun x => c) (_ : Memℒp (Set.indicator Set.univ fun x => c) p) =\n    Memℒp.toLp (fun x => c) (_ : Memℒp (fun x => c) p)\n[PROOFSTEP]\nsimp only [Set.indicator_univ, Function.const]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : IsFiniteMeasure μ\nc : E\ninst✝ : NeZero μ\nhp_zero : p ≠ 0\n⊢ ‖↑(Lp.const p μ) c‖ = ‖c‖ * ENNReal.toReal (↑↑μ Set.univ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nhave := NeZero.ne μ\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : IsFiniteMeasure μ\nc : E\ninst✝ : NeZero μ\nhp_zero : p ≠ 0\nthis : μ ≠ 0\n⊢ ‖↑(Lp.const p μ) c‖ = ‖c‖ * ENNReal.toReal (↑↑μ Set.univ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [← Memℒp.toLp_const, Lp.norm_toLp, snorm_const]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : IsFiniteMeasure μ\nc : E\ninst✝ : NeZero μ\nhp_zero : p ≠ 0\nthis : μ ≠ 0\n⊢ ENNReal.toReal (↑‖c‖₊ * ↑↑μ Set.univ ^ (1 / ENNReal.toReal p)) =\n    ‖c‖ * ENNReal.toReal (↑↑μ Set.univ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\ntry assumption\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : IsFiniteMeasure μ\nc : E\ninst✝ : NeZero μ\nhp_zero : p ≠ 0\nthis : μ ≠ 0\n⊢ ENNReal.toReal (↑‖c‖₊ * ↑↑μ Set.univ ^ (1 / ENNReal.toReal p)) =\n    ‖c‖ * ENNReal.toReal (↑↑μ Set.univ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h0\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : IsFiniteMeasure μ\nc : E\ninst✝ : NeZero μ\nhp_zero : p ≠ 0\nthis : μ ≠ 0\n⊢ p ≠ 0\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase h0\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : IsFiniteMeasure μ\nc : E\ninst✝ : NeZero μ\nhp_zero : p ≠ 0\nthis : μ ≠ 0\n⊢ p ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hμ\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : IsFiniteMeasure μ\nc : E\ninst✝ : NeZero μ\nhp_zero : p ≠ 0\nthis : μ ≠ 0\n⊢ μ ≠ 0\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase hμ\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : IsFiniteMeasure μ\nc : E\ninst✝ : NeZero μ\nhp_zero : p ≠ 0\nthis : μ ≠ 0\n⊢ μ ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : IsFiniteMeasure μ\nc : E\ninst✝ : NeZero μ\nhp_zero : p ≠ 0\nthis : μ ≠ 0\n⊢ ENNReal.toReal (↑‖c‖₊ * ↑↑μ Set.univ ^ (1 / ENNReal.toReal p)) =\n    ‖c‖ * ENNReal.toReal (↑↑μ Set.univ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [ENNReal.toReal_mul, ENNReal.coe_toReal, ← ENNReal.toReal_rpow, coe_nnnorm]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nc : E\nhp_zero : p ≠ 0\nhp_top : p ≠ ⊤\n⊢ ‖↑(Lp.const p μ) c‖ = ‖c‖ * ENNReal.toReal (↑↑μ Set.univ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [← Memℒp.toLp_const, Lp.norm_toLp, snorm_const']\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nc : E\nhp_zero : p ≠ 0\nhp_top : p ≠ ⊤\n⊢ ENNReal.toReal (↑‖c‖₊ * ↑↑μ Set.univ ^ (1 / ENNReal.toReal p)) =\n    ‖c‖ * ENNReal.toReal (↑↑μ Set.univ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\ntry assumption\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nc : E\nhp_zero : p ≠ 0\nhp_top : p ≠ ⊤\n⊢ ENNReal.toReal (↑‖c‖₊ * ↑↑μ Set.univ ^ (1 / ENNReal.toReal p)) =\n    ‖c‖ * ENNReal.toReal (↑↑μ Set.univ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h0\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nc : E\nhp_zero : p ≠ 0\nhp_top : p ≠ ⊤\n⊢ p ≠ 0\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase h0\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nc : E\nhp_zero : p ≠ 0\nhp_top : p ≠ ⊤\n⊢ p ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h_top\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nc : E\nhp_zero : p ≠ 0\nhp_top : p ≠ ⊤\n⊢ p ≠ ⊤\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase h_top\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nc : E\nhp_zero : p ≠ 0\nhp_top : p ≠ ⊤\n⊢ p ≠ ⊤\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nc : E\nhp_zero : p ≠ 0\nhp_top : p ≠ ⊤\n⊢ ENNReal.toReal (↑‖c‖₊ * ↑↑μ Set.univ ^ (1 / ENNReal.toReal p)) =\n    ‖c‖ * ENNReal.toReal (↑↑μ Set.univ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [ENNReal.toReal_mul, ENNReal.coe_toReal, ← ENNReal.toReal_rpow, coe_nnnorm]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nc : E\n⊢ ‖↑(Lp.const p μ) c‖ ≤ ‖c‖ * ENNReal.toReal (↑↑μ Set.univ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nrw [← indicatorConstLp_univ]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : IsFiniteMeasure μ\nc : E\n⊢ ‖indicatorConstLp p (_ : MeasurableSet Set.univ) (_ : ↑↑μ Set.univ ≠ ⊤) c‖ ≤\n    ‖c‖ * ENNReal.toReal (↑↑μ Set.univ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nexact norm_indicatorConstLp_le\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : IsFiniteMeasure μ\nc : E\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : Fact (1 ≤ p)\n⊢ 0 ≤ ENNReal.toReal (↑↑μ Set.univ) ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\npositivity\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\n⊢ Memℒp (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q)\n[PROOFSTEP]\nrefine' ⟨(hf.1.norm.aemeasurable.pow_const q.toReal).aestronglyMeasurable, _⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\n⊢ snorm (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q) μ < ⊤\n[PROOFSTEP]\nby_cases q_top : q = ∞\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\nq_top : q = ⊤\n⊢ snorm (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q) μ < ⊤\n[PROOFSTEP]\nsimp [q_top]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\nq_top : ¬q = ⊤\n⊢ snorm (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q) μ < ⊤\n[PROOFSTEP]\nby_cases q_zero : q = 0\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\nq_top : ¬q = ⊤\nq_zero : q = 0\n⊢ snorm (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q) μ < ⊤\n[PROOFSTEP]\nsimp [q_zero]\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\nq_top : ¬q = ⊤\nq_zero : q = 0\n⊢ snorm (fun x => 1) (p / 0) μ < ⊤\n[PROOFSTEP]\nby_cases p_zero : p = 0\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\nq_top : ¬q = ⊤\nq_zero : q = 0\np_zero : p = 0\n⊢ snorm (fun x => 1) (p / 0) μ < ⊤\n[PROOFSTEP]\nsimp [p_zero]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\nq_top : ¬q = ⊤\nq_zero : q = 0\np_zero : ¬p = 0\n⊢ snorm (fun x => 1) (p / 0) μ < ⊤\n[PROOFSTEP]\nrw [ENNReal.div_zero p_zero]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\nq_top : ¬q = ⊤\nq_zero : q = 0\np_zero : ¬p = 0\n⊢ snorm (fun x => 1) ⊤ μ < ⊤\n[PROOFSTEP]\nexact (memℒp_top_const (1 : ℝ)).2\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\nq_top : ¬q = ⊤\nq_zero : ¬q = 0\n⊢ snorm (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q) μ < ⊤\n[PROOFSTEP]\nrw [snorm_norm_rpow _ (ENNReal.toReal_pos q_zero q_top)]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\nq_top : ¬q = ⊤\nq_zero : ¬q = 0\n⊢ snorm (fun x => f x) (p / q * ENNReal.ofReal (ENNReal.toReal q)) μ ^ ENNReal.toReal q < ⊤\n[PROOFSTEP]\napply ENNReal.rpow_lt_top_of_nonneg ENNReal.toReal_nonneg\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\nq_top : ¬q = ⊤\nq_zero : ¬q = 0\n⊢ snorm (fun x => f x) (p / q * ENNReal.ofReal (ENNReal.toReal q)) μ ≠ ⊤\n[PROOFSTEP]\nrw [ENNReal.ofReal_toReal q_top, div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel q_zero q_top, mul_one]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nq : ℝ≥0∞\nq_top : ¬q = ⊤\nq_zero : ¬q = 0\n⊢ snorm (fun x => f x) p μ ≠ ⊤\n[PROOFSTEP]\nexact hf.2.ne\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nq : ℝ≥0∞\nf : α → E\nhf : AEStronglyMeasurable f μ\nq_zero : q ≠ 0\nq_top : q ≠ ⊤\n⊢ Memℒp (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q) ↔ Memℒp f p\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => h.norm_rpow_div q⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nq : ℝ≥0∞\nf : α → E\nhf : AEStronglyMeasurable f μ\nq_zero : q ≠ 0\nq_top : q ≠ ⊤\nh : Memℒp (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q)\n⊢ Memℒp f p\n[PROOFSTEP]\napply (memℒp_norm_iff hf).1\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nq : ℝ≥0∞\nf : α → E\nhf : AEStronglyMeasurable f μ\nq_zero : q ≠ 0\nq_top : q ≠ ⊤\nh : Memℒp (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q)\n⊢ Memℒp (fun x => ‖f x‖) p\n[PROOFSTEP]\nconvert h.norm_rpow_div q⁻¹ using 1\n[GOAL]\ncase h.e'_5\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nq : ℝ≥0∞\nf : α → E\nhf : AEStronglyMeasurable f μ\nq_zero : q ≠ 0\nq_top : q ≠ ⊤\nh : Memℒp (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q)\n⊢ (fun x => ‖f x‖) = fun x => ‖‖f x‖ ^ ENNReal.toReal q‖ ^ ENNReal.toReal q⁻¹\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nq : ℝ≥0∞\nf : α → E\nhf : AEStronglyMeasurable f μ\nq_zero : q ≠ 0\nq_top : q ≠ ⊤\nh : Memℒp (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q)\nx : α\n⊢ ‖f x‖ = ‖‖f x‖ ^ ENNReal.toReal q‖ ^ ENNReal.toReal q⁻¹\n[PROOFSTEP]\nrw [Real.norm_eq_abs, Real.abs_rpow_of_nonneg (norm_nonneg _), ← Real.rpow_mul (abs_nonneg _), ENNReal.toReal_inv,\n  mul_inv_cancel, abs_of_nonneg (norm_nonneg _), Real.rpow_one]\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nq : ℝ≥0∞\nf : α → E\nhf : AEStronglyMeasurable f μ\nq_zero : q ≠ 0\nq_top : q ≠ ⊤\nh : Memℒp (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q)\nx : α\n⊢ ENNReal.toReal q ≠ 0\n[PROOFSTEP]\nsimp [ENNReal.toReal_eq_zero_iff, not_or, q_zero, q_top]\n[GOAL]\ncase h.e'_6\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq✝ : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nq : ℝ≥0∞\nf : α → E\nhf : AEStronglyMeasurable f μ\nq_zero : q ≠ 0\nq_top : q ≠ ⊤\nh : Memℒp (fun x => ‖f x‖ ^ ENNReal.toReal q) (p / q)\n⊢ p = p / q / q⁻¹\n[PROOFSTEP]\nrw [div_eq_mul_inv, inv_inv, div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel q_zero q_top, mul_one]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\n⊢ Memℒp (fun x => ‖f x‖ ^ ENNReal.toReal p) 1\n[PROOFSTEP]\nconvert hf.norm_rpow_div p\n[GOAL]\ncase h.e'_6\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : α → E\nhf : Memℒp f p\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\n⊢ 1 = p / p\n[PROOFSTEP]\nrw [div_eq_mul_inv, ENNReal.mul_inv_cancel hp_ne_zero hp_ne_top]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nβ : Type u_5\ninst✝ : MeasurableSpace β\nμb : Measure β\ng : β →ₘ[μb] E\nhg : g ∈ Lp E p\nf : α → β\nhf : MeasurePreserving f\n⊢ compMeasurePreserving g f hf ∈ Lp E p\n[PROOFSTEP]\nrw [Lp.mem_Lp_iff_snorm_lt_top] at hg ⊢\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nβ : Type u_5\ninst✝ : MeasurableSpace β\nμb : Measure β\ng : β →ₘ[μb] E\nhg : snorm (↑g) p μb < ⊤\nf : α → β\nhf : MeasurePreserving f\n⊢ snorm (↑(compMeasurePreserving g f hf)) p μ < ⊤\n[PROOFSTEP]\nrwa [snorm_compMeasurePreserving]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nβ : Type u_5\ninst✝ : MeasurableSpace β\nμb : Measure β\nf✝ f : α → β\nhf : MeasurePreserving f\n⊢ ∀ (x y : { x // x ∈ Lp E p }),\n    ZeroHom.toFun\n        {\n          toFun := fun g =>\n            { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n              property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) },\n          map_zero' :=\n            (_ :\n              (fun g =>\n                    { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                      property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) })\n                  0 =\n                (fun g =>\n                    { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                      property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) })\n                  0) }\n        (x + y) =\n      ZeroHom.toFun\n          {\n            toFun := fun g =>\n              { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) },\n            map_zero' :=\n              (_ :\n                (fun g =>\n                      { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                        property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) })\n                    0 =\n                  (fun g =>\n                      { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                        property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) })\n                    0) }\n          x +\n        ZeroHom.toFun\n          {\n            toFun := fun g =>\n              { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) },\n            map_zero' :=\n              (_ :\n                (fun g =>\n                      { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                        property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) })\n                    0 =\n                  (fun g =>\n                      { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                        property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) })\n                    0) }\n          y\n[PROOFSTEP]\nrintro ⟨⟨_⟩, _⟩ ⟨⟨_⟩, _⟩\n[GOAL]\ncase mk.mk.mk.mk\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nβ : Type u_5\ninst✝ : MeasurableSpace β\nμb : Measure β\nf✝ f : α → β\nhf : MeasurePreserving f\nval✝¹ : β →ₘ[μb] E\na✝¹ : { f // AEStronglyMeasurable f μb }\nproperty✝¹ : Quot.mk Setoid.r a✝¹ ∈ Lp E p\nval✝ : β →ₘ[μb] E\na✝ : { f // AEStronglyMeasurable f μb }\nproperty✝ : Quot.mk Setoid.r a✝ ∈ Lp E p\n⊢ ZeroHom.toFun\n      {\n        toFun := fun g =>\n          { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n            property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) },\n        map_zero' :=\n          (_ :\n            (fun g =>\n                  { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                    property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) })\n                0 =\n              (fun g =>\n                  { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                    property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) })\n                0) }\n      ({ val := Quot.mk Setoid.r a✝¹, property := property✝¹ } +\n        { val := Quot.mk Setoid.r a✝, property := property✝ }) =\n    ZeroHom.toFun\n        {\n          toFun := fun g =>\n            { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n              property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) },\n          map_zero' :=\n            (_ :\n              (fun g =>\n                    { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                      property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) })\n                  0 =\n                (fun g =>\n                    { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                      property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) })\n                  0) }\n        { val := Quot.mk Setoid.r a✝¹, property := property✝¹ } +\n      ZeroHom.toFun\n        {\n          toFun := fun g =>\n            { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n              property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) },\n          map_zero' :=\n            (_ :\n              (fun g =>\n                    { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                      property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) })\n                  0 =\n                (fun g =>\n                    { val := AEEqFun.compMeasurePreserving (↑g) f hf,\n                      property := (_ : AEEqFun.compMeasurePreserving (↑g) f hf ∈ Lp E p) })\n                  0) }\n        { val := Quot.mk Setoid.r a✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\nβ : Type u_5\ninst✝³ : MeasurableSpace β\nμb : Measure β\nf✝ : α → β\n𝕜 : Type u_6\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nf : α → β\nhf : MeasurePreserving f\nsrc✝ : { x // x ∈ Lp E p } →+ { x // x ∈ Lp E p } := compMeasurePreserving f hf\nc : 𝕜\ng : { x // x ∈ Lp E p }\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ :\n            ∀ (x y : { x // x ∈ Lp E p }),\n              ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n      (c • g) =\n    ↑(RingHom.id 𝕜) c •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : { x // x ∈ Lp E p }),\n                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n        g\n[PROOFSTEP]\nrcases g with ⟨⟨_⟩, _⟩\n[GOAL]\ncase mk.mk\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\nβ : Type u_5\ninst✝³ : MeasurableSpace β\nμb : Measure β\nf✝ : α → β\n𝕜 : Type u_6\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nf : α → β\nhf : MeasurePreserving f\nsrc✝ : { x // x ∈ Lp E p } →+ { x // x ∈ Lp E p } := compMeasurePreserving f hf\nc : 𝕜\nval✝ : β →ₘ[μb] E\na✝ : { f // AEStronglyMeasurable f μb }\nproperty✝ : Quot.mk Setoid.r a✝ ∈ Lp E p\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ :\n            ∀ (x y : { x // x ∈ Lp E p }),\n              ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n      (c • { val := Quot.mk Setoid.r a✝, property := property✝ }) =\n    ↑(RingHom.id 𝕜) c •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : { x // x ∈ Lp E p }),\n                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n        { val := Quot.mk Setoid.r a✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nE✝ : Type u_2\nF✝ : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α✝\np : ℝ≥0∞\nq : ℝ\nμ✝ ν : Measure α✝\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedAddCommGroup G\ng✝ : E✝ → F✝\nc : ℝ≥0\nα : Type u_5\nE : Type u_6\nF : Type u_7\nK : ℝ≥0\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nf : α → E\ng : E → F\nhg : LipschitzWith K g\ng0 : g 0 = 0\nhL : Memℒp f p\n⊢ ∀ (x : α), ‖g (f x)‖ ≤ ↑K * ‖f x‖\n[PROOFSTEP]\nintro a\n[GOAL]\nα✝ : Type u_1\nE✝ : Type u_2\nF✝ : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α✝\np : ℝ≥0∞\nq : ℝ\nμ✝ ν : Measure α✝\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedAddCommGroup G\ng✝ : E✝ → F✝\nc : ℝ≥0\nα : Type u_5\nE : Type u_6\nF : Type u_7\nK : ℝ≥0\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nf : α → E\ng : E → F\nhg : LipschitzWith K g\ng0 : g 0 = 0\nhL : Memℒp f p\na : α\n⊢ ‖g (f a)‖ ≤ ↑K * ‖f a‖\n[PROOFSTEP]\nsimpa [g0] using hg.norm_sub_le (f a) 0\n[GOAL]\nα✝ : Type u_1\nE✝ : Type u_2\nF✝ : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α✝\np : ℝ≥0∞\nq : ℝ\nμ✝ ν : Measure α✝\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedAddCommGroup G\ng✝ : E✝ → F✝\nc : ℝ≥0\nα : Type u_5\nE : Type u_6\nF : Type u_7\nK' : ℝ≥0\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nf : α → E\ng : E → F\nhL : Memℒp (g ∘ f) p\nhg : UniformContinuous g\nhg' : AntilipschitzWith K' g\ng0 : g 0 = 0\n⊢ Memℒp f p\n[PROOFSTEP]\nhave A : ∀ x, ‖f x‖ ≤ K' * ‖g (f x)‖ := by\n  intro x\n  rw [← dist_zero_right, ← dist_zero_right, ← g0]\n  apply hg'.le_mul_dist\n[GOAL]\nα✝ : Type u_1\nE✝ : Type u_2\nF✝ : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α✝\np : ℝ≥0∞\nq : ℝ\nμ✝ ν : Measure α✝\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedAddCommGroup G\ng✝ : E✝ → F✝\nc : ℝ≥0\nα : Type u_5\nE : Type u_6\nF : Type u_7\nK' : ℝ≥0\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nf : α → E\ng : E → F\nhL : Memℒp (g ∘ f) p\nhg : UniformContinuous g\nhg' : AntilipschitzWith K' g\ng0 : g 0 = 0\n⊢ ∀ (x : α), ‖f x‖ ≤ ↑K' * ‖g (f x)‖\n[PROOFSTEP]\nintro x\n[GOAL]\nα✝ : Type u_1\nE✝ : Type u_2\nF✝ : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α✝\np : ℝ≥0∞\nq : ℝ\nμ✝ ν : Measure α✝\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedAddCommGroup G\ng✝ : E✝ → F✝\nc : ℝ≥0\nα : Type u_5\nE : Type u_6\nF : Type u_7\nK' : ℝ≥0\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nf : α → E\ng : E → F\nhL : Memℒp (g ∘ f) p\nhg : UniformContinuous g\nhg' : AntilipschitzWith K' g\ng0 : g 0 = 0\nx : α\n⊢ ‖f x‖ ≤ ↑K' * ‖g (f x)‖\n[PROOFSTEP]\nrw [← dist_zero_right, ← dist_zero_right, ← g0]\n[GOAL]\nα✝ : Type u_1\nE✝ : Type u_2\nF✝ : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α✝\np : ℝ≥0∞\nq : ℝ\nμ✝ ν : Measure α✝\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedAddCommGroup G\ng✝ : E✝ → F✝\nc : ℝ≥0\nα : Type u_5\nE : Type u_6\nF : Type u_7\nK' : ℝ≥0\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nf : α → E\ng : E → F\nhL : Memℒp (g ∘ f) p\nhg : UniformContinuous g\nhg' : AntilipschitzWith K' g\ng0 : g 0 = 0\nx : α\n⊢ dist (f x) 0 ≤ ↑K' * dist (g (f x)) (g 0)\n[PROOFSTEP]\napply hg'.le_mul_dist\n[GOAL]\nα✝ : Type u_1\nE✝ : Type u_2\nF✝ : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α✝\np : ℝ≥0∞\nq : ℝ\nμ✝ ν : Measure α✝\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedAddCommGroup G\ng✝ : E✝ → F✝\nc : ℝ≥0\nα : Type u_5\nE : Type u_6\nF : Type u_7\nK' : ℝ≥0\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nf : α → E\ng : E → F\nhL : Memℒp (g ∘ f) p\nhg : UniformContinuous g\nhg' : AntilipschitzWith K' g\ng0 : g 0 = 0\nA : ∀ (x : α), ‖f x‖ ≤ ↑K' * ‖g (f x)‖\n⊢ Memℒp f p\n[PROOFSTEP]\nhave B : AEStronglyMeasurable f μ := (hg'.uniformEmbedding hg).embedding.aestronglyMeasurable_comp_iff.1 hL.1\n[GOAL]\nα✝ : Type u_1\nE✝ : Type u_2\nF✝ : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α✝\np : ℝ≥0∞\nq : ℝ\nμ✝ ν : Measure α✝\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedAddCommGroup G\ng✝ : E✝ → F✝\nc : ℝ≥0\nα : Type u_5\nE : Type u_6\nF : Type u_7\nK' : ℝ≥0\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nf : α → E\ng : E → F\nhL : Memℒp (g ∘ f) p\nhg : UniformContinuous g\nhg' : AntilipschitzWith K' g\ng0 : g 0 = 0\nA : ∀ (x : α), ‖f x‖ ≤ ↑K' * ‖g (f x)‖\nB : AEStronglyMeasurable f μ\n⊢ Memℒp f p\n[PROOFSTEP]\nexact hL.of_le_mul B (Filter.eventually_of_forall A)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\nf : { x // x ∈ Lp E p }\n⊢ AEEqFun.comp g (_ : Continuous g) ↑f ∈ Lp F p\n[PROOFSTEP]\nsuffices ∀ᵐ x ∂μ, ‖AEEqFun.comp g hg.continuous (f : α →ₘ[μ] E) x‖ ≤ c * ‖f x‖ by exact Lp.mem_Lp_of_ae_le_mul this\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\nf : { x // x ∈ Lp E p }\nthis : ∀ᵐ (x : α) ∂μ, ‖↑(AEEqFun.comp g (_ : Continuous g) ↑f) x‖ ≤ ↑c * ‖↑↑f x‖\n⊢ AEEqFun.comp g (_ : Continuous g) ↑f ∈ Lp F p\n[PROOFSTEP]\nexact Lp.mem_Lp_of_ae_le_mul this\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\nf : { x // x ∈ Lp E p }\n⊢ ∀ᵐ (x : α) ∂μ, ‖↑(AEEqFun.comp g (_ : Continuous g) ↑f) x‖ ≤ ↑c * ‖↑↑f x‖\n[PROOFSTEP]\nfilter_upwards [AEEqFun.coeFn_comp g hg.continuous (f : α →ₘ[μ] E)] with a ha\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\nf : { x // x ∈ Lp E p }\na : α\nha : ↑(AEEqFun.comp g (_ : Continuous g) ↑f) a = (g ∘ ↑↑f) a\n⊢ ‖↑(AEEqFun.comp g (_ : Continuous g) ↑f) a‖ ≤ ↑c * ‖↑↑f a‖\n[PROOFSTEP]\nsimp only [ha]\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\nf : { x // x ∈ Lp E p }\na : α\nha : ↑(AEEqFun.comp g (_ : Continuous g) ↑f) a = (g ∘ ↑↑f) a\n⊢ ‖(g ∘ ↑↑f) a‖ ≤ ↑c * ‖↑↑f a‖\n[PROOFSTEP]\nrw [← dist_zero_right, ← dist_zero_right, ← g0]\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\nf : { x // x ∈ Lp E p }\na : α\nha : ↑(AEEqFun.comp g (_ : Continuous g) ↑f) a = (g ∘ ↑↑f) a\n⊢ dist ((g ∘ ↑↑f) a) (g 0) ≤ ↑c * dist (↑↑f a) 0\n[PROOFSTEP]\nexact hg.dist_le_mul (f a) 0\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\n⊢ compLp hg g0 0 = 0\n[PROOFSTEP]\nrw [Lp.eq_zero_iff_ae_eq_zero]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\n⊢ ↑↑(compLp hg g0 0) =ᵐ[μ] 0\n[PROOFSTEP]\napply (coeFn_compLp _ _ _).trans\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\n⊢ g ∘ ↑↑0 =ᵐ[μ] 0\n[PROOFSTEP]\nfilter_upwards [Lp.coeFn_zero E p μ] with _ ha\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\na✝ : α\nha : ↑↑0 a✝ = OfNat.ofNat 0 a✝\n⊢ (g ∘ ↑↑0) a✝ = OfNat.ofNat 0 a✝\n[PROOFSTEP]\nsimp only [ha, g0, Function.comp_apply, Pi.zero_apply]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\nf f' : { x // x ∈ Lp E p }\n⊢ ‖compLp hg g0 f - compLp hg g0 f'‖ ≤ ↑c * ‖f - f'‖\n[PROOFSTEP]\napply Lp.norm_le_mul_norm_of_ae_le_mul\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\nf f' : { x // x ∈ Lp E p }\n⊢ ∀ᵐ (x : α) ∂μ, ‖↑↑(compLp hg g0 f - compLp hg g0 f') x‖ ≤ ↑c * ‖↑↑(f - f') x‖\n[PROOFSTEP]\nfilter_upwards [hg.coeFn_compLp g0 f, hg.coeFn_compLp g0 f', Lp.coeFn_sub (hg.compLp g0 f) (hg.compLp g0 f'),\n  Lp.coeFn_sub f f'] with a ha1 ha2 ha3 ha4\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\nf f' : { x // x ∈ Lp E p }\na : α\nha1 : ↑↑(compLp hg g0 f) a = (g ∘ ↑↑f) a\nha2 : ↑↑(compLp hg g0 f') a = (g ∘ ↑↑f') a\nha3 : ↑↑(compLp hg g0 f - compLp hg g0 f') a = (↑↑(compLp hg g0 f) - ↑↑(compLp hg g0 f')) a\nha4 : ↑↑(f - f') a = (↑↑f - ↑↑f') a\n⊢ ‖↑↑(compLp hg g0 f - compLp hg g0 f') a‖ ≤ ↑c * ‖↑↑(f - f') a‖\n[PROOFSTEP]\nsimp only [ha1, ha2, ha3, ha4, ← dist_eq_norm, Pi.sub_apply, Function.comp_apply]\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\nf f' : { x // x ∈ Lp E p }\na : α\nha1 : ↑↑(compLp hg g0 f) a = (g ∘ ↑↑f) a\nha2 : ↑↑(compLp hg g0 f') a = (g ∘ ↑↑f') a\nha3 : ↑↑(compLp hg g0 f - compLp hg g0 f') a = (↑↑(compLp hg g0 f) - ↑↑(compLp hg g0 f')) a\nha4 : ↑↑(f - f') a = (↑↑f - ↑↑f') a\n⊢ dist (g (↑↑f a)) (g (↑↑f' a)) ≤ ↑c * dist (↑↑f a) (↑↑f' a)\n[PROOFSTEP]\nexact hg.dist_le_mul (f a) (f' a)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nhg : LipschitzWith c g\ng0 : g 0 = 0\nf : { x // x ∈ Lp E p }\n⊢ ‖compLp hg g0 f‖ ≤ ↑c * ‖f‖\n[PROOFSTEP]\nsimpa using hg.norm_compLp_sub_le g0 f 0\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng✝ : E → F\nc : ℝ≥0\ninst✝ : Fact (1 ≤ p)\nhg : LipschitzWith c g✝\ng0 : g✝ 0 = 0\nf g : { x // x ∈ Lp E p }\n⊢ dist (compLp hg g0 f) (compLp hg g0 g) ≤ ↑c * dist f g\n[PROOFSTEP]\nsimp [dist_eq_norm, norm_compLp_sub_le]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace 𝕜 F\nK : Type u_6\ninst✝ : IsROrC K\nf : α → K\n⊢ Memℒp (fun x => ↑IsROrC.re (f x)) p ∧ Memℒp (fun x => ↑IsROrC.im (f x)) p ↔ Memℒp f p\n[PROOFSTEP]\nrefine' ⟨_, fun hf => ⟨hf.re, hf.im⟩⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace 𝕜 F\nK : Type u_6\ninst✝ : IsROrC K\nf : α → K\n⊢ Memℒp (fun x => ↑IsROrC.re (f x)) p ∧ Memℒp (fun x => ↑IsROrC.im (f x)) p → Memℒp f p\n[PROOFSTEP]\nrintro ⟨hre, him⟩\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace 𝕜 F\nK : Type u_6\ninst✝ : IsROrC K\nf : α → K\nhre : Memℒp (fun x => ↑IsROrC.re (f x)) p\nhim : Memℒp (fun x => ↑IsROrC.im (f x)) p\n⊢ Memℒp f p\n[PROOFSTEP]\nconvert MeasureTheory.Memℒp.add (E := K) hre.ofReal (him.ofReal.const_mul IsROrC.I)\n[GOAL]\ncase h.e'_5\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace 𝕜 F\nK : Type u_6\ninst✝ : IsROrC K\nf : α → K\nhre : Memℒp (fun x => ↑IsROrC.re (f x)) p\nhim : Memℒp (fun x => ↑IsROrC.im (f x)) p\n⊢ f = (fun x => ↑(↑IsROrC.re (f x))) + fun x => IsROrC.I * ↑(↑IsROrC.im (f x))\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace 𝕜 F\nK : Type u_6\ninst✝ : IsROrC K\nf : α → K\nhre : Memℒp (fun x => ↑IsROrC.re (f x)) p\nhim : Memℒp (fun x => ↑IsROrC.im (f x)) p\nx : α\n⊢ f x = ((fun x => ↑(↑IsROrC.re (f x))) + fun x => IsROrC.I * ↑(↑IsROrC.im (f x))) x\n[PROOFSTEP]\nrw [Pi.add_apply, mul_comm, IsROrC.re_add_im]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL L' : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\n⊢ compLp (L + L') f = compLp L f + compLp L' f\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL L' : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\n⊢ ↑↑(compLp (L + L') f) =ᵐ[μ] ↑↑(compLp L f + compLp L' f)\n[PROOFSTEP]\nrefine' (coeFn_compLp' (L + L') f).trans _\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL L' : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\n⊢ (fun a => ↑(L + L') (↑↑f a)) =ᵐ[μ] ↑↑(compLp L f + compLp L' f)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (Lp.coeFn_add _ _).symm\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL L' : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\n⊢ (fun a => ↑(L + L') (↑↑f a)) =ᵐ[μ] ↑↑(compLp L f) + ↑↑(compLp L' f)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (EventuallyEq.add (L.coeFn_compLp' f).symm (L'.coeFn_compLp' f).symm)\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL L' : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\n⊢ (fun a => ↑(L + L') (↑↑f a)) =ᵐ[μ] fun x => ↑L (↑↑f x) + ↑L' (↑↑f x)\n[PROOFSTEP]\nrefine' eventually_of_forall fun x => _\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL L' : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\nx : α\n⊢ (fun a => ↑(L + L') (↑↑f a)) x = (fun x => ↑L (↑↑f x) + ↑L' (↑↑f x)) x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedAddCommGroup G\ng : E → F\nc✝ : ℝ≥0\n𝕜 : Type u_5\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 F\n𝕜' : Type u_6\ninst✝³ : NormedRing 𝕜'\ninst✝² : Module 𝕜' F\ninst✝¹ : BoundedSMul 𝕜' F\ninst✝ : SMulCommClass 𝕜 𝕜' F\nc : 𝕜'\nL : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\n⊢ compLp (c • L) f = c • compLp L f\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedAddCommGroup G\ng : E → F\nc✝ : ℝ≥0\n𝕜 : Type u_5\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 F\n𝕜' : Type u_6\ninst✝³ : NormedRing 𝕜'\ninst✝² : Module 𝕜' F\ninst✝¹ : BoundedSMul 𝕜' F\ninst✝ : SMulCommClass 𝕜 𝕜' F\nc : 𝕜'\nL : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\n⊢ ↑↑(compLp (c • L) f) =ᵐ[μ] ↑↑(c • compLp L f)\n[PROOFSTEP]\nrefine' (coeFn_compLp' (c • L) f).trans _\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedAddCommGroup G\ng : E → F\nc✝ : ℝ≥0\n𝕜 : Type u_5\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 F\n𝕜' : Type u_6\ninst✝³ : NormedRing 𝕜'\ninst✝² : Module 𝕜' F\ninst✝¹ : BoundedSMul 𝕜' F\ninst✝ : SMulCommClass 𝕜 𝕜' F\nc : 𝕜'\nL : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\n⊢ (fun a => ↑(c • L) (↑↑f a)) =ᵐ[μ] ↑↑(c • compLp L f)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (Lp.coeFn_smul _ _).symm\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedAddCommGroup G\ng : E → F\nc✝ : ℝ≥0\n𝕜 : Type u_5\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 F\n𝕜' : Type u_6\ninst✝³ : NormedRing 𝕜'\ninst✝² : Module 𝕜' F\ninst✝¹ : BoundedSMul 𝕜' F\ninst✝ : SMulCommClass 𝕜 𝕜' F\nc : 𝕜'\nL : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\n⊢ (fun a => ↑(c • L) (↑↑f a)) =ᵐ[μ] c • ↑↑(compLp L f)\n[PROOFSTEP]\nrefine' (L.coeFn_compLp' f).mono fun x hx => _\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedAddCommGroup G\ng : E → F\nc✝ : ℝ≥0\n𝕜 : Type u_5\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 F\n𝕜' : Type u_6\ninst✝³ : NormedRing 𝕜'\ninst✝² : Module 𝕜' F\ninst✝¹ : BoundedSMul 𝕜' F\ninst✝ : SMulCommClass 𝕜 𝕜' F\nc : 𝕜'\nL : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\nx : α\nhx : ↑↑(compLp L f) x = (fun a => ↑L (↑↑f a)) x\n⊢ (fun a => ↑(c • L) (↑↑f a)) x = (c • ↑↑(compLp L f)) x\n[PROOFSTEP]\nrw [Pi.smul_apply, hx]\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedAddCommGroup G\ng : E → F\nc✝ : ℝ≥0\n𝕜 : Type u_5\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 F\n𝕜' : Type u_6\ninst✝³ : NormedRing 𝕜'\ninst✝² : Module 𝕜' F\ninst✝¹ : BoundedSMul 𝕜' F\ninst✝ : SMulCommClass 𝕜 𝕜' F\nc : 𝕜'\nL : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\nx : α\nhx : ↑↑(compLp L f) x = (fun a => ↑L (↑↑f a)) x\n⊢ (fun a => ↑(c • L) (↑↑f a)) x = c • (fun a => ↑L (↑↑f a)) x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL : E →L[𝕜] F\n⊢ ∀ (x y : { x // x ∈ Lp E p }), (fun f => compLp L f) (x + y) = (fun f => compLp L f) x + (fun f => compLp L f) y\n[PROOFSTEP]\nintro f g\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng✝ : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL : E →L[𝕜] F\nf g : { x // x ∈ Lp E p }\n⊢ (fun f => compLp L f) (f + g) = (fun f => compLp L f) f + (fun f => compLp L f) g\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng✝ : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL : E →L[𝕜] F\nf g : { x // x ∈ Lp E p }\n⊢ ↑↑((fun f => compLp L f) (f + g)) =ᵐ[μ] ↑↑((fun f => compLp L f) f + (fun f => compLp L f) g)\n[PROOFSTEP]\nfilter_upwards [Lp.coeFn_add f g, coeFn_compLp L (f + g), coeFn_compLp L f, coeFn_compLp L g,\n  Lp.coeFn_add (L.compLp f) (L.compLp g)]\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng✝ : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL : E →L[𝕜] F\nf g : { x // x ∈ Lp E p }\n⊢ ∀ (a : α),\n    ↑↑(f + g) a = (↑↑f + ↑↑g) a →\n      ↑↑(compLp L (f + g)) a = ↑L (↑↑(f + g) a) →\n        ↑↑(compLp L f) a = ↑L (↑↑f a) →\n          ↑↑(compLp L g) a = ↑L (↑↑g a) →\n            ↑↑(compLp L f + compLp L g) a = (↑↑(compLp L f) + ↑↑(compLp L g)) a →\n              ↑↑(compLp L (f + g)) a = ↑↑(compLp L f + compLp L g) a\n[PROOFSTEP]\nintro a ha1 ha2 ha3 ha4 ha5\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng✝ : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL : E →L[𝕜] F\nf g : { x // x ∈ Lp E p }\na : α\nha1 : ↑↑(f + g) a = (↑↑f + ↑↑g) a\nha2 : ↑↑(compLp L (f + g)) a = ↑L (↑↑(f + g) a)\nha3 : ↑↑(compLp L f) a = ↑L (↑↑f a)\nha4 : ↑↑(compLp L g) a = ↑L (↑↑g a)\nha5 : ↑↑(compLp L f + compLp L g) a = (↑↑(compLp L f) + ↑↑(compLp L g)) a\n⊢ ↑↑(compLp L (f + g)) a = ↑↑(compLp L f + compLp L g) a\n[PROOFSTEP]\nsimp only [ha1, ha2, ha3, ha4, ha5, map_add, Pi.add_apply]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL : E →L[𝕜] F\n⊢ ∀ (r : 𝕜) (x : { x // x ∈ Lp E p }),\n    AddHom.toFun\n        { toFun := fun f => compLp L f,\n          map_add' :=\n            (_ :\n              ∀ (f g : { x // x ∈ Lp E p }),\n                (fun f => compLp L f) (f + g) = (fun f => compLp L f) f + (fun f => compLp L f) g) }\n        (r • x) =\n      ↑(RingHom.id 𝕜) r •\n        AddHom.toFun\n          { toFun := fun f => compLp L f,\n            map_add' :=\n              (_ :\n                ∀ (f g : { x // x ∈ Lp E p }),\n                  (fun f => compLp L f) (f + g) = (fun f => compLp L f) f + (fun f => compLp L f) g) }\n          x\n[PROOFSTEP]\nintro c f\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng : E → F\nc✝ : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL : E →L[𝕜] F\nc : 𝕜\nf : { x // x ∈ Lp E p }\n⊢ AddHom.toFun\n      { toFun := fun f => compLp L f,\n        map_add' :=\n          (_ :\n            ∀ (f g : { x // x ∈ Lp E p }),\n              (fun f => compLp L f) (f + g) = (fun f => compLp L f) f + (fun f => compLp L f) g) }\n      (c • f) =\n    ↑(RingHom.id 𝕜) c •\n      AddHom.toFun\n        { toFun := fun f => compLp L f,\n          map_add' :=\n            (_ :\n              ∀ (f g : { x // x ∈ Lp E p }),\n                (fun f => compLp L f) (f + g) = (fun f => compLp L f) f + (fun f => compLp L f) g) }\n        f\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng : E → F\nc✝ : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL : E →L[𝕜] F\nc : 𝕜\nf : { x // x ∈ Lp E p }\n⊢ compLp L (c • f) = c • compLp L f\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng : E → F\nc✝ : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL : E →L[𝕜] F\nc : 𝕜\nf : { x // x ∈ Lp E p }\n⊢ ↑↑(compLp L (c • f)) =ᵐ[μ] ↑↑(c • compLp L f)\n[PROOFSTEP]\nfilter_upwards [Lp.coeFn_smul c f, coeFn_compLp L (c • f), Lp.coeFn_smul c (L.compLp f), coeFn_compLp L f] with _ ha1\n  ha2 ha3 ha4\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\ng : E → F\nc✝ : ℝ≥0\n𝕜 : Type u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : NormedSpace 𝕜 F\nL : E →L[𝕜] F\nc : 𝕜\nf : { x // x ∈ Lp E p }\na✝ : α\nha1 : ↑↑(c • f) a✝ = (c • ↑↑f) a✝\nha2 : ↑↑(compLp L (c • f)) a✝ = ↑L (↑↑(c • f) a✝)\nha3 : ↑↑(c • compLp L f) a✝ = (c • ↑↑(compLp L f)) a✝\nha4 : ↑↑(compLp L f) a✝ = ↑L (↑↑f a✝)\n⊢ ↑↑(compLp L (c • f)) a✝ = ↑↑(c • compLp L f) a✝\n[PROOFSTEP]\nsimp only [ha1, ha2, ha3, ha4, SMulHomClass.map_smul, Pi.smul_apply]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : Fact (1 ≤ p)\nL L' : E →L[𝕜] F\n⊢ compLpL p μ (L + L') = compLpL p μ L + compLpL p μ L'\n[PROOFSTEP]\next1 f\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : Fact (1 ≤ p)\nL L' : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\n⊢ ↑(compLpL p μ (L + L')) f = ↑(compLpL p μ L + compLpL p μ L') f\n[PROOFSTEP]\nexact add_compLp L L' f\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ng : E → F\nc✝ : ℝ≥0\n𝕜 : Type u_5\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : Fact (1 ≤ p)\n𝕜' : Type u_6\ninst✝³ : NormedRing 𝕜'\ninst✝² : Module 𝕜' F\ninst✝¹ : BoundedSMul 𝕜' F\ninst✝ : SMulCommClass 𝕜 𝕜' F\nc : 𝕜'\nL : E →L[𝕜] F\n⊢ compLpL p μ (c • L) = c • compLpL p μ L\n[PROOFSTEP]\next1 f\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ng : E → F\nc✝ : ℝ≥0\n𝕜 : Type u_5\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedSpace 𝕜 F\ninst✝⁴ : Fact (1 ≤ p)\n𝕜' : Type u_6\ninst✝³ : NormedRing 𝕜'\ninst✝² : Module 𝕜' F\ninst✝¹ : BoundedSMul 𝕜' F\ninst✝ : SMulCommClass 𝕜 𝕜' F\nc : 𝕜'\nL : E →L[𝕜] F\nf : { x // x ∈ Lp E p }\n⊢ ↑(compLpL p μ (c • L)) f = ↑(c • compLpL p μ L) f\n[PROOFSTEP]\nexact smul_compLp c L f\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ns : Set α\ninst✝ : NormedSpace ℝ F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F\n⊢ indicatorConstLp 2 hs hμs x =\n    ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1)\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ns : Set α\ninst✝ : NormedSpace ℝ F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F\n⊢ ↑↑(indicatorConstLp 2 hs hμs x) =ᵐ[μ]\n    ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1))\n[PROOFSTEP]\nrefine' indicatorConstLp_coeFn.trans _\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ns : Set α\ninst✝ : NormedSpace ℝ F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F\n⊢ (Set.indicator s fun x_1 => x) =ᵐ[μ]\n    ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1))\n[PROOFSTEP]\nhave h_compLp := (ContinuousLinearMap.toSpanSingleton ℝ x).coeFn_compLp (indicatorConstLp 2 hs hμs (1 : ℝ))\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ns : Set α\ninst✝ : NormedSpace ℝ F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F\nh_compLp :\n  ∀ᵐ (a : α) ∂μ,\n    ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1)) a =\n      ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) a)\n⊢ (Set.indicator s fun x_1 => x) =ᵐ[μ]\n    ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1))\n[PROOFSTEP]\nrw [← EventuallyEq] at h_compLp \n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ns : Set α\ninst✝ : NormedSpace ℝ F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F\nh_compLp :\n  (fun a =>\n      ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1)) a) =ᵐ[μ]\n    fun a => ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) a)\n⊢ (Set.indicator s fun x_1 => x) =ᵐ[μ]\n    ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1))\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ h_compLp.symm\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ns : Set α\ninst✝ : NormedSpace ℝ F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F\nh_compLp :\n  (fun a =>\n      ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1)) a) =ᵐ[μ]\n    fun a => ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) a)\n⊢ (Set.indicator s fun x_1 => x) =ᵐ[μ] fun a =>\n    ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) a)\n[PROOFSTEP]\nrefine' (@indicatorConstLp_coeFn _ _ _ 2 μ _ s hs hμs (1 : ℝ)).mono fun y hy => _\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ns : Set α\ninst✝ : NormedSpace ℝ F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F\nh_compLp :\n  (fun a =>\n      ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1)) a) =ᵐ[μ]\n    fun a => ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) a)\ny : α\nhy : ↑↑(indicatorConstLp 2 hs hμs 1) y = Set.indicator s (fun x => 1) y\n⊢ Set.indicator s (fun x_1 => x) y =\n    (fun a => ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) a)) y\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ns : Set α\ninst✝ : NormedSpace ℝ F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F\nh_compLp :\n  (fun a =>\n      ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1)) a) =ᵐ[μ]\n    fun a => ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) a)\ny : α\nhy : ↑↑(indicatorConstLp 2 hs hμs 1) y = Set.indicator s (fun x => 1) y\n⊢ Set.indicator s (fun x_1 => x) y = ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) y)\n[PROOFSTEP]\nrw [hy]\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ns : Set α\ninst✝ : NormedSpace ℝ F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F\nh_compLp :\n  (fun a =>\n      ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1)) a) =ᵐ[μ]\n    fun a => ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) a)\ny : α\nhy : ↑↑(indicatorConstLp 2 hs hμs 1) y = Set.indicator s (fun x => 1) y\n⊢ Set.indicator s (fun x_1 => x) y = ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (Set.indicator s (fun x => 1) y)\n[PROOFSTEP]\nsimp_rw [ContinuousLinearMap.toSpanSingleton_apply]\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ns : Set α\ninst✝ : NormedSpace ℝ F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F\nh_compLp :\n  (fun a =>\n      ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1)) a) =ᵐ[μ]\n    fun a => ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) a)\ny : α\nhy : ↑↑(indicatorConstLp 2 hs hμs 1) y = Set.indicator s (fun x => 1) y\n⊢ Set.indicator s (fun x_1 => x) y = Set.indicator s (fun x => 1) y • x\n[PROOFSTEP]\nby_cases hy_mem : y ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ns : Set α\ninst✝ : NormedSpace ℝ F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F\nh_compLp :\n  (fun a =>\n      ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1)) a) =ᵐ[μ]\n    fun a => ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) a)\ny : α\nhy : ↑↑(indicatorConstLp 2 hs hμs 1) y = Set.indicator s (fun x => 1) y\nhy_mem : y ∈ s\n⊢ Set.indicator s (fun x_1 => x) y = Set.indicator s (fun x => 1) y • x\n[PROOFSTEP]\nsimp [hy_mem, ContinuousLinearMap.lsmul_apply]\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ns : Set α\ninst✝ : NormedSpace ℝ F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F\nh_compLp :\n  (fun a =>\n      ↑↑(ContinuousLinearMap.compLp (ContinuousLinearMap.toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1)) a) =ᵐ[μ]\n    fun a => ↑(ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) a)\ny : α\nhy : ↑↑(indicatorConstLp 2 hs hμs 1) y = Set.indicator s (fun x => 1) y\nhy_mem : ¬y ∈ s\n⊢ Set.indicator s (fun x_1 => x) y = Set.indicator s (fun x => 1) y • x\n[PROOFSTEP]\nsimp [hy_mem, ContinuousLinearMap.lsmul_apply]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nx y : ℝ\n⊢ dist (max x 0) (max y 0) ≤ ↑1 * dist x y\n[PROOFSTEP]\nsimp [Real.dist_eq, abs_max_sub_max_le_abs]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nf : { x // x ∈ Lp ℝ p }\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(negPart f) a = max (-↑↑f a) 0\n[PROOFSTEP]\nrw [negPart]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nf : { x // x ∈ Lp ℝ p }\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(posPart (-f)) a = max (-↑↑f a) 0\n[PROOFSTEP]\nfilter_upwards [coeFn_posPart (-f), coeFn_neg f] with _ h₁ h₂\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nf : { x // x ∈ Lp ℝ p }\na✝ : α\nh₁ : ↑↑(posPart (-f)) a✝ = max (↑↑(-f) a✝) 0\nh₂ : ↑↑(-f) a✝ = (-↑↑f) a✝\n⊢ ↑↑(posPart (-f)) a✝ = max (-↑↑f a✝) 0\n[PROOFSTEP]\nrw [h₁, h₂, Pi.neg_apply]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\nf : { x // x ∈ Lp ℝ p }\na : α\nh : ↑↑(negPart f) a = max (-↑↑f a) 0\n⊢ ↑↑(negPart f) a = -min (↑↑f a) 0\n[PROOFSTEP]\nrw [h, ← max_neg_neg, neg_zero]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ninst✝ : Fact (1 ≤ p)\n⊢ Continuous fun f => negPart f\n[PROOFSTEP]\nhave eq : (fun f : Lp ℝ p μ => negPart f) = fun f : Lp ℝ p μ => posPart (-f) := rfl\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ninst✝ : Fact (1 ≤ p)\neq : (fun f => negPart f) = fun f => posPart (-f)\n⊢ Continuous fun f => negPart f\n[PROOFSTEP]\nrw [eq]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ng : E → F\nc : ℝ≥0\ninst✝ : Fact (1 ≤ p)\neq : (fun f => negPart f) = fun f => posPart (-f)\n⊢ Continuous fun f => posPart (-f)\n[PROOFSTEP]\nexact continuous_posPart.comp continuous_neg\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\np : ℝ\nhp_nonneg : 0 ≤ p\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ snorm' f_lim p μ = (∫⁻ (a : α), liminf (fun m => ↑‖f m a‖₊ ^ p) atTop ∂μ) ^ (1 / p)\n[PROOFSTEP]\nsuffices h_no_pow : (∫⁻ a, (‖f_lim a‖₊ : ℝ≥0∞) ^ p ∂μ) = ∫⁻ a, atTop.liminf fun m => (‖f m a‖₊ : ℝ≥0∞) ^ p ∂μ\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\np : ℝ\nhp_nonneg : 0 ≤ p\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_no_pow : ∫⁻ (a : α), ↑‖f_lim a‖₊ ^ p ∂μ = ∫⁻ (a : α), liminf (fun m => ↑‖f m a‖₊ ^ p) atTop ∂μ\n⊢ snorm' f_lim p μ = (∫⁻ (a : α), liminf (fun m => ↑‖f m a‖₊ ^ p) atTop ∂μ) ^ (1 / p)\n[PROOFSTEP]\nrw [snorm', h_no_pow]\n[GOAL]\ncase h_no_pow\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\np : ℝ\nhp_nonneg : 0 ≤ p\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ ∫⁻ (a : α), ↑‖f_lim a‖₊ ^ p ∂μ = ∫⁻ (a : α), liminf (fun m => ↑‖f m a‖₊ ^ p) atTop ∂μ\n[PROOFSTEP]\nrefine' lintegral_congr_ae (h_lim.mono fun a ha => _)\n[GOAL]\ncase h_no_pow\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\np : ℝ\nhp_nonneg : 0 ≤ p\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\na : α\nha : Tendsto (fun n => f n a) atTop (𝓝 (f_lim a))\n⊢ (fun a => ↑‖f_lim a‖₊ ^ p) a = (fun a => liminf (fun m => ↑‖f m a‖₊ ^ p) atTop) a\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h_no_pow\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\np : ℝ\nhp_nonneg : 0 ≤ p\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\na : α\nha : Tendsto (fun n => f n a) atTop (𝓝 (f_lim a))\n⊢ ↑‖f_lim a‖₊ ^ p = liminf (fun m => ↑‖f m a‖₊ ^ p) atTop\n[PROOFSTEP]\nrw [Tendsto.liminf_eq]\n[GOAL]\ncase h_no_pow\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\np : ℝ\nhp_nonneg : 0 ≤ p\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\na : α\nha : Tendsto (fun n => f n a) atTop (𝓝 (f_lim a))\n⊢ Tendsto (fun m => ↑‖f m a‖₊ ^ p) atTop (𝓝 (↑‖f_lim a‖₊ ^ p))\n[PROOFSTEP]\nsimp_rw [ENNReal.coe_rpow_of_nonneg _ hp_nonneg, ENNReal.tendsto_coe]\n[GOAL]\ncase h_no_pow\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\np : ℝ\nhp_nonneg : 0 ≤ p\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\na : α\nha : Tendsto (fun n => f n a) atTop (𝓝 (f_lim a))\n⊢ Tendsto (fun a_1 => ‖f a_1 a‖₊ ^ p) atTop (𝓝 (‖f_lim a‖₊ ^ p))\n[PROOFSTEP]\nrefine' ((NNReal.continuous_rpow_const hp_nonneg).tendsto ‖f_lim a‖₊).comp _\n[GOAL]\ncase h_no_pow\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\np : ℝ\nhp_nonneg : 0 ≤ p\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\na : α\nha : Tendsto (fun n => f n a) atTop (𝓝 (f_lim a))\n⊢ Tendsto (fun a_1 => ‖f a_1 a‖₊) atTop (𝓝 ‖f_lim a‖₊)\n[PROOFSTEP]\nexact (continuous_nnnorm.tendsto (f_lim a)).comp ha\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ snorm' f_lim p μ ≤ liminf (fun n => snorm' (f n) p μ) atTop\n[PROOFSTEP]\nrw [snorm'_lim_eq_lintegral_liminf hp_pos.le h_lim]\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ (∫⁻ (a : α), liminf (fun m => ↑‖f m a‖₊ ^ p) atTop ∂μ) ^ (1 / p) ≤ liminf (fun n => snorm' (f n) p μ) atTop\n[PROOFSTEP]\nrw [← ENNReal.le_rpow_one_div_iff (by simp [hp_pos] : 0 < 1 / p), one_div_one_div]\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ 0 < 1 / p\n[PROOFSTEP]\nsimp [hp_pos]\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ ∫⁻ (a : α), liminf (fun m => ↑‖f m a‖₊ ^ p) atTop ∂μ ≤ liminf (fun n => snorm' (f n) p μ) atTop ^ p\n[PROOFSTEP]\nrefine (lintegral_liminf_le' fun m => (hf m).ennnorm.pow_const _).trans_eq ?_\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ liminf (fun n => ∫⁻ (a : α), ↑‖f n a‖₊ ^ p ∂μ) atTop = liminf (fun n => snorm' (f n) p μ) atTop ^ p\n[PROOFSTEP]\nhave h_pow_liminf : (atTop.liminf fun n => snorm' (f n) p μ) ^ p = atTop.liminf fun n => snorm' (f n) p μ ^ p :=\n  by\n  have h_rpow_mono := ENNReal.strictMono_rpow_of_pos hp_pos\n  have h_rpow_surj := (ENNReal.rpow_left_bijective hp_pos.ne.symm).2\n  refine' (h_rpow_mono.orderIsoOfSurjective _ h_rpow_surj).liminf_apply _ _ _ _\n  all_goals isBoundedDefault\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ liminf (fun n => snorm' (f n) p μ) atTop ^ p = liminf (fun n => snorm' (f n) p μ ^ p) atTop\n[PROOFSTEP]\nhave h_rpow_mono := ENNReal.strictMono_rpow_of_pos hp_pos\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_rpow_mono : StrictMono fun x => x ^ p\n⊢ liminf (fun n => snorm' (f n) p μ) atTop ^ p = liminf (fun n => snorm' (f n) p μ ^ p) atTop\n[PROOFSTEP]\nhave h_rpow_surj := (ENNReal.rpow_left_bijective hp_pos.ne.symm).2\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ liminf (fun n => snorm' (f n) p μ) atTop ^ p = liminf (fun n => snorm' (f n) p μ ^ p) atTop\n[PROOFSTEP]\nrefine' (h_rpow_mono.orderIsoOfSurjective _ h_rpow_surj).liminf_apply _ _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) atTop fun n => snorm' (f n) p μ\ncase refine'_2\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) atTop fun n => snorm' (f n) p μ\ncase refine'_3\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) atTop fun x =>\n    ↑(StrictMono.orderIsoOfSurjective (fun x => x ^ p) h_rpow_mono h_rpow_surj) (snorm' (f x) p μ)\ncase refine'_4\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) atTop fun x =>\n    ↑(StrictMono.orderIsoOfSurjective (fun x => x ^ p) h_rpow_mono h_rpow_surj) (snorm' (f x) p μ)\n[PROOFSTEP]\nall_goals isBoundedDefault\n[GOAL]\ncase refine'_1\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) atTop fun n => snorm' (f n) p μ\n[PROOFSTEP]\nisBoundedDefault\n[GOAL]\ncase refine'_2\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) atTop fun n => snorm' (f n) p μ\n[PROOFSTEP]\nisBoundedDefault\n[GOAL]\ncase refine'_3\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) atTop fun x =>\n    ↑(StrictMono.orderIsoOfSurjective (fun x => x ^ p) h_rpow_mono h_rpow_surj) (snorm' (f x) p μ)\n[PROOFSTEP]\nisBoundedDefault\n[GOAL]\ncase refine'_4\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) atTop fun x =>\n    ↑(StrictMono.orderIsoOfSurjective (fun x => x ^ p) h_rpow_mono h_rpow_surj) (snorm' (f x) p μ)\n[PROOFSTEP]\nisBoundedDefault\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_pow_liminf : liminf (fun n => snorm' (f n) p μ) atTop ^ p = liminf (fun n => snorm' (f n) p μ ^ p) atTop\n⊢ liminf (fun n => ∫⁻ (a : α), ↑‖f n a‖₊ ^ p ∂μ) atTop = liminf (fun n => snorm' (f n) p μ) atTop ^ p\n[PROOFSTEP]\nrw [h_pow_liminf]\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\np : ℝ\nhp_pos : 0 < p\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_pow_liminf : liminf (fun n => snorm' (f n) p μ) atTop ^ p = liminf (fun n => snorm' (f n) p μ ^ p) atTop\n⊢ liminf (fun n => ∫⁻ (a : α), ↑‖f n a‖₊ ^ p ∂μ) atTop = liminf (fun n => snorm' (f n) p μ ^ p) atTop\n[PROOFSTEP]\nsimp_rw [snorm', ← ENNReal.rpow_mul, one_div, inv_mul_cancel hp_pos.ne.symm, ENNReal.rpow_one]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ snorm f_lim ⊤ μ = essSup (fun x => liminf (fun m => ↑‖f m x‖₊) atTop) μ\n[PROOFSTEP]\nrw [snorm_exponent_top, snormEssSup]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ essSup (fun x => ↑‖f_lim x‖₊) μ = essSup (fun x => liminf (fun m => ↑‖f m x‖₊) atTop) μ\n[PROOFSTEP]\nrefine' essSup_congr_ae (h_lim.mono fun x hx => _)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nx : α\nhx : Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ (fun x => ↑‖f_lim x‖₊) x = (fun x => liminf (fun m => ↑‖f m x‖₊) atTop) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nx : α\nhx : Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ ↑‖f_lim x‖₊ = liminf (fun m => ↑‖f m x‖₊) atTop\n[PROOFSTEP]\nrw [Tendsto.liminf_eq]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nx : α\nhx : Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ Tendsto (fun m => ↑‖f m x‖₊) atTop (𝓝 ↑‖f_lim x‖₊)\n[PROOFSTEP]\nrw [ENNReal.tendsto_coe]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : LinearOrder ι\nf : ι → α → G\nf_lim : α → G\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nx : α\nhx : Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ Tendsto (fun m => ‖f m x‖₊) atTop (𝓝 ‖f_lim x‖₊)\n[PROOFSTEP]\nexact (continuous_nnnorm.tendsto (f_lim x)).comp hx\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\nι : Type u_5\ninst✝² : Nonempty ι\ninst✝¹ : Countable ι\ninst✝ : LinearOrder ι\nf : ι → α → F\nf_lim : α → F\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ snorm f_lim ⊤ μ ≤ liminf (fun n => snorm (f n) ⊤ μ) atTop\n[PROOFSTEP]\nrw [snorm_exponent_top_lim_eq_essSup_liminf h_lim]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\nι : Type u_5\ninst✝² : Nonempty ι\ninst✝¹ : Countable ι\ninst✝ : LinearOrder ι\nf : ι → α → F\nf_lim : α → F\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ essSup (fun x => liminf (fun m => ↑‖f m x‖₊) atTop) μ ≤ liminf (fun n => snorm (f n) ⊤ μ) atTop\n[PROOFSTEP]\nsimp_rw [snorm_exponent_top, snormEssSup]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedAddCommGroup G\nι : Type u_5\ninst✝² : Nonempty ι\ninst✝¹ : Countable ι\ninst✝ : LinearOrder ι\nf : ι → α → F\nf_lim : α → F\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ essSup (fun x => liminf (fun m => ↑‖f m x‖₊) atTop) μ ≤ liminf (fun n => essSup (fun x => ↑‖f n x‖₊) μ) atTop\n[PROOFSTEP]\nexact ENNReal.essSup_liminf_le fun n => fun x => (‖f n x‖₊ : ℝ≥0∞)\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ snorm f_lim p μ ≤ liminf (fun n => snorm (f n) p μ) atTop\n[PROOFSTEP]\nby_cases hp0 : p = 0\n[GOAL]\ncase pos\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nhp0 : p = 0\n⊢ snorm f_lim p μ ≤ liminf (fun n => snorm (f n) p μ) atTop\n[PROOFSTEP]\nsimp [hp0]\n[GOAL]\ncase neg\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nhp0 : ¬p = 0\n⊢ snorm f_lim p μ ≤ liminf (fun n => snorm (f n) p μ) atTop\n[PROOFSTEP]\nrw [← Ne.def] at hp0 \n[GOAL]\ncase neg\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nhp0 : p ≠ 0\n⊢ snorm f_lim p μ ≤ liminf (fun n => snorm (f n) p μ) atTop\n[PROOFSTEP]\nby_cases hp_top : p = ∞\n[GOAL]\ncase pos\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nhp0 : p ≠ 0\nhp_top : p = ⊤\n⊢ snorm f_lim p μ ≤ liminf (fun n => snorm (f n) p μ) atTop\n[PROOFSTEP]\nsimp_rw [hp_top]\n[GOAL]\ncase pos\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nhp0 : p ≠ 0\nhp_top : p = ⊤\n⊢ snorm f_lim ⊤ μ ≤ liminf (fun n => snorm (f n) ⊤ μ) atTop\n[PROOFSTEP]\nexact snorm_exponent_top_lim_le_liminf_snorm_exponent_top h_lim\n[GOAL]\ncase neg\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nhp0 : p ≠ 0\nhp_top : ¬p = ⊤\n⊢ snorm f_lim p μ ≤ liminf (fun n => snorm (f n) p μ) atTop\n[PROOFSTEP]\nsimp_rw [snorm_eq_snorm' hp0 hp_top]\n[GOAL]\ncase neg\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nhp0 : p ≠ 0\nhp_top : ¬p = ⊤\n⊢ snorm' f_lim (ENNReal.toReal p) μ ≤ liminf (fun n => snorm' (f n) (ENNReal.toReal p) μ) atTop\n[PROOFSTEP]\nhave hp_pos : 0 < p.toReal := ENNReal.toReal_pos hp0 hp_top\n[GOAL]\ncase neg\nα : Type u_1\nE✝ : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nE : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nhp0 : p ≠ 0\nhp_top : ¬p = ⊤\nhp_pos : 0 < ENNReal.toReal p\n⊢ snorm' f_lim (ENNReal.toReal p) μ ≤ liminf (fun n => snorm' (f n) (ENNReal.toReal p) μ) atTop\n[PROOFSTEP]\nexact snorm'_lim_le_liminf_snorm' hp_pos hf h_lim\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\nf_lim : { x // x ∈ Lp E p }\n⊢ Tendsto f fi (𝓝 f_lim) ↔ Tendsto (fun n => snorm (↑↑(f n) - ↑↑f_lim) p μ) fi (𝓝 0)\n[PROOFSTEP]\nrw [tendsto_iff_dist_tendsto_zero]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\nf_lim : { x // x ∈ Lp E p }\n⊢ Tendsto (fun b => dist (f b) f_lim) fi (𝓝 0) ↔ Tendsto (fun n => snorm (↑↑(f n) - ↑↑f_lim) p μ) fi (𝓝 0)\n[PROOFSTEP]\nsimp_rw [dist_def]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\nf_lim : { x // x ∈ Lp E p }\n⊢ Tendsto (fun b => ENNReal.toReal (snorm (↑↑(f b) - ↑↑f_lim) p μ)) fi (𝓝 0) ↔\n    Tendsto (fun n => snorm (↑↑(f n) - ↑↑f_lim) p μ) fi (𝓝 0)\n[PROOFSTEP]\nrw [← ENNReal.zero_toReal, ENNReal.tendsto_toReal_iff (fun n => ?_) ENNReal.zero_ne_top]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\nf_lim : { x // x ∈ Lp E p }\nn : ι\n⊢ snorm (↑↑(f n) - ↑↑f_lim) p μ ≠ ⊤\n[PROOFSTEP]\nrw [snorm_congr_ae (Lp.coeFn_sub _ _).symm]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\nf_lim : { x // x ∈ Lp E p }\nn : ι\n⊢ snorm (↑↑(f n - f_lim)) p μ ≠ ⊤\n[PROOFSTEP]\nexact Lp.snorm_ne_top _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\nf_lim : α → E\nf_lim_ℒp : Memℒp f_lim p\n⊢ Tendsto f fi (𝓝 (Memℒp.toLp f_lim f_lim_ℒp)) ↔ Tendsto (fun n => snorm (↑↑(f n) - f_lim) p μ) fi (𝓝 0)\n[PROOFSTEP]\nrw [tendsto_Lp_iff_tendsto_ℒp']\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\nf_lim : α → E\nf_lim_ℒp : Memℒp f_lim p\n⊢ Tendsto (fun n => snorm (↑↑(f n) - ↑↑(Memℒp.toLp f_lim f_lim_ℒp)) p μ) fi (𝓝 0) ↔\n    Tendsto (fun n => snorm (↑↑(f n) - f_lim) p μ) fi (𝓝 0)\n[PROOFSTEP]\nsuffices h_eq : (fun n => snorm (⇑(f n) - ⇑(Memℒp.toLp f_lim f_lim_ℒp)) p μ) = (fun n => snorm (⇑(f n) - f_lim) p μ)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\nf_lim : α → E\nf_lim_ℒp : Memℒp f_lim p\nh_eq : (fun n => snorm (↑↑(f n) - ↑↑(Memℒp.toLp f_lim f_lim_ℒp)) p μ) = fun n => snorm (↑↑(f n) - f_lim) p μ\n⊢ Tendsto (fun n => snorm (↑↑(f n) - ↑↑(Memℒp.toLp f_lim f_lim_ℒp)) p μ) fi (𝓝 0) ↔\n    Tendsto (fun n => snorm (↑↑(f n) - f_lim) p μ) fi (𝓝 0)\n[PROOFSTEP]\nrw [h_eq]\n[GOAL]\ncase h_eq\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\nf_lim : α → E\nf_lim_ℒp : Memℒp f_lim p\n⊢ (fun n => snorm (↑↑(f n) - ↑↑(Memℒp.toLp f_lim f_lim_ℒp)) p μ) = fun n => snorm (↑↑(f n) - f_lim) p μ\n[PROOFSTEP]\nexact funext fun n => snorm_congr_ae (EventuallyEq.rfl.sub (Memℒp.coeFn_toLp f_lim_ℒp))\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → α → E\nf_ℒp : ∀ (n : ι), Memℒp (f n) p\nf_lim : α → E\nf_lim_ℒp : Memℒp f_lim p\n⊢ Tendsto (fun n => Memℒp.toLp (f n) (_ : Memℒp (f n) p)) fi (𝓝 (Memℒp.toLp f_lim f_lim_ℒp)) ↔\n    Tendsto (fun n => snorm (f n - f_lim) p μ) fi (𝓝 0)\n[PROOFSTEP]\nrw [Lp.tendsto_Lp_iff_tendsto_ℒp' (fun n => (f_ℒp n).toLp (f n)) (f_lim_ℒp.toLp f_lim)]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → α → E\nf_ℒp : ∀ (n : ι), Memℒp (f n) p\nf_lim : α → E\nf_lim_ℒp : Memℒp f_lim p\n⊢ Tendsto (fun n => snorm (↑↑(Memℒp.toLp (f n) (_ : Memℒp (f n) p)) - ↑↑(Memℒp.toLp f_lim f_lim_ℒp)) p μ) fi (𝓝 0) ↔\n    Tendsto (fun n => snorm (f n - f_lim) p μ) fi (𝓝 0)\n[PROOFSTEP]\nrefine Filter.tendsto_congr fun n => ?_\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → α → E\nf_ℒp : ∀ (n : ι), Memℒp (f n) p\nf_lim : α → E\nf_lim_ℒp : Memℒp f_lim p\nn : ι\n⊢ snorm (↑↑(Memℒp.toLp (f n) (_ : Memℒp (f n) p)) - ↑↑(Memℒp.toLp f_lim f_lim_ℒp)) p μ = snorm (f n - f_lim) p μ\n[PROOFSTEP]\napply snorm_congr_ae\n[GOAL]\ncase hfg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → α → E\nf_ℒp : ∀ (n : ι), Memℒp (f n) p\nf_lim : α → E\nf_lim_ℒp : Memℒp f_lim p\nn : ι\n⊢ ↑↑(Memℒp.toLp (f n) (_ : Memℒp (f n) p)) - ↑↑(Memℒp.toLp f_lim f_lim_ℒp) =ᵐ[μ] f n - f_lim\n[PROOFSTEP]\nfilter_upwards [((f_ℒp n).sub f_lim_ℒp).coeFn_toLp, Lp.coeFn_sub ((f_ℒp n).toLp (f n)) (f_lim_ℒp.toLp f_lim)] with _ hx₁\n  hx₂\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → α → E\nf_ℒp : ∀ (n : ι), Memℒp (f n) p\nf_lim : α → E\nf_lim_ℒp : Memℒp f_lim p\nn : ι\na✝ : α\nhx₁ : ↑↑(Memℒp.toLp (f n - f_lim) (_ : Memℒp (f n - f_lim) p)) a✝ = (f n - f_lim) a✝\nhx₂ :\n  ↑↑(Memℒp.toLp (f n) (_ : Memℒp (f n) p) - Memℒp.toLp f_lim f_lim_ℒp) a✝ =\n    (↑↑(Memℒp.toLp (f n) (_ : Memℒp (f n) p)) - ↑↑(Memℒp.toLp f_lim f_lim_ℒp)) a✝\n⊢ (↑↑(Memℒp.toLp (f n) (_ : Memℒp (f n) p)) - ↑↑(Memℒp.toLp f_lim f_lim_ℒp)) a✝ = (f n - f_lim) a✝\n[PROOFSTEP]\nrw [← hx₂]\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\nι : Type u_5\nfi : Filter ι\ninst✝ : Fact (1 ≤ p)\nf : ι → α → E\nf_ℒp : ∀ (n : ι), Memℒp (f n) p\nf_lim : α → E\nf_lim_ℒp : Memℒp f_lim p\nn : ι\na✝ : α\nhx₁ : ↑↑(Memℒp.toLp (f n - f_lim) (_ : Memℒp (f n - f_lim) p)) a✝ = (f n - f_lim) a✝\nhx₂ :\n  ↑↑(Memℒp.toLp (f n) (_ : Memℒp (f n) p) - Memℒp.toLp f_lim f_lim_ℒp) a✝ =\n    (↑↑(Memℒp.toLp (f n) (_ : Memℒp (f n) p)) - ↑↑(Memℒp.toLp f_lim f_lim_ℒp)) a✝\n⊢ ↑↑(Memℒp.toLp (f n) (_ : Memℒp (f n) p) - Memℒp.toLp f_lim f_lim_ℒp) a✝ = (f n - f_lim) a✝\n[PROOFSTEP]\nexact hx₁\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : SemilatticeSup ι\nhp : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\n⊢ CauchySeq f ↔ Tendsto (fun n => snorm (↑↑(f n.fst) - ↑↑(f n.snd)) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nsimp_rw [cauchySeq_iff_tendsto_dist_atTop_0, dist_def]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : SemilatticeSup ι\nhp : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\n⊢ Tendsto (fun n => ENNReal.toReal (snorm (↑↑(f n.fst) - ↑↑(f n.snd)) p μ)) atTop (𝓝 0) ↔\n    Tendsto (fun n => snorm (↑↑(f n.fst) - ↑↑(f n.snd)) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nrw [← ENNReal.zero_toReal, ENNReal.tendsto_toReal_iff (fun n => ?_) ENNReal.zero_ne_top]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : SemilatticeSup ι\nhp : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\nn : ι × ι\n⊢ snorm (↑↑(f n.fst) - ↑↑(f n.snd)) p μ ≠ ⊤\n[PROOFSTEP]\nrw [snorm_congr_ae (Lp.coeFn_sub _ _).symm]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedAddCommGroup G\nι : Type u_5\ninst✝¹ : Nonempty ι\ninst✝ : SemilatticeSup ι\nhp : Fact (1 ≤ p)\nf : ι → { x // x ∈ Lp E p }\nn : ι × ι\n⊢ snorm (↑↑(f n.fst - f n.snd)) p μ ≠ ⊤\n[PROOFSTEP]\nexact snorm_ne_top _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\n⊢ CompleteSpace { x // x ∈ Lp E p }\n[PROOFSTEP]\nlet B := fun n : ℕ => ((1 : ℝ) / 2) ^ n\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\n⊢ CompleteSpace { x // x ∈ Lp E p }\n[PROOFSTEP]\nhave hB_pos : ∀ n, 0 < B n := fun n => pow_pos (div_pos zero_lt_one zero_lt_two) n\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\n⊢ CompleteSpace { x // x ∈ Lp E p }\n[PROOFSTEP]\nrefine' Metric.complete_of_convergent_controlled_sequences B hB_pos fun f hf => _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\n⊢ ∃ x, Tendsto f atTop (𝓝 x)\n[PROOFSTEP]\nrsuffices ⟨f_lim, hf_lim_meas, h_tendsto⟩ :\n  ∃ (f_lim : α → E), Memℒp f_lim p μ ∧ atTop.Tendsto (fun n => snorm (⇑(f n) - f_lim) p μ) (𝓝 0)\n[GOAL]\ncase intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nf_lim : α → E\nhf_lim_meas : Memℒp f_lim p\nh_tendsto : Tendsto (fun n => snorm (↑↑(f n) - f_lim) p μ) atTop (𝓝 0)\n⊢ ∃ x, Tendsto f atTop (𝓝 x)\n[PROOFSTEP]\nexact ⟨hf_lim_meas.toLp f_lim, tendsto_Lp_of_tendsto_ℒp f_lim hf_lim_meas h_tendsto⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\n⊢ ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (↑↑(f n) - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave hB : Summable B := summable_geometric_two\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nhB : Summable B\n⊢ ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (↑↑(f n) - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\ncases' hB with M hB\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\n⊢ ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (↑↑(f n) - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nlet B1 n := ENNReal.ofReal (B n)\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\n⊢ ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (↑↑(f n) - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave hB1_has : HasSum B1 (ENNReal.ofReal M) :=\n  by\n  have h_tsum_B1 : ∑' i, B1 i = ENNReal.ofReal M :=\n    by\n    change (∑' n : ℕ, ENNReal.ofReal (B n)) = ENNReal.ofReal M\n    rw [← hB.tsum_eq]\n    exact (ENNReal.ofReal_tsum_of_nonneg (fun n => le_of_lt (hB_pos n)) hB.summable).symm\n  have h_sum := (@ENNReal.summable _ B1).hasSum\n  rwa [h_tsum_B1] at h_sum \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\n⊢ HasSum B1 (ENNReal.ofReal M)\n[PROOFSTEP]\nhave h_tsum_B1 : ∑' i, B1 i = ENNReal.ofReal M :=\n  by\n  change (∑' n : ℕ, ENNReal.ofReal (B n)) = ENNReal.ofReal M\n  rw [← hB.tsum_eq]\n  exact (ENNReal.ofReal_tsum_of_nonneg (fun n => le_of_lt (hB_pos n)) hB.summable).symm\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\n⊢ ∑' (i : ℕ), B1 i = ENNReal.ofReal M\n[PROOFSTEP]\nchange (∑' n : ℕ, ENNReal.ofReal (B n)) = ENNReal.ofReal M\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\n⊢ ∑' (n : ℕ), ENNReal.ofReal (B n) = ENNReal.ofReal M\n[PROOFSTEP]\nrw [← hB.tsum_eq]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\n⊢ ∑' (n : ℕ), ENNReal.ofReal (B n) = ENNReal.ofReal (∑' (b : ℕ), B b)\n[PROOFSTEP]\nexact (ENNReal.ofReal_tsum_of_nonneg (fun n => le_of_lt (hB_pos n)) hB.summable).symm\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nh_tsum_B1 : ∑' (i : ℕ), B1 i = ENNReal.ofReal M\n⊢ HasSum B1 (ENNReal.ofReal M)\n[PROOFSTEP]\nhave h_sum := (@ENNReal.summable _ B1).hasSum\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nh_tsum_B1 : ∑' (i : ℕ), B1 i = ENNReal.ofReal M\nh_sum : HasSum B1 (∑' (b : ℕ), B1 b)\n⊢ HasSum B1 (ENNReal.ofReal M)\n[PROOFSTEP]\nrwa [h_tsum_B1] at h_sum \n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nhB1_has : HasSum B1 (ENNReal.ofReal M)\n⊢ ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (↑↑(f n) - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave hB1 : ∑' i, B1 i < ∞ := by\n  rw [hB1_has.tsum_eq]\n  exact ENNReal.ofReal_lt_top\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nhB1_has : HasSum B1 (ENNReal.ofReal M)\n⊢ ∑' (i : ℕ), B1 i < ⊤\n[PROOFSTEP]\nrw [hB1_has.tsum_eq]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nhB1_has : HasSum B1 (ENNReal.ofReal M)\n⊢ ENNReal.ofReal M < ⊤\n[PROOFSTEP]\nexact ENNReal.ofReal_lt_top\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nhB1_has : HasSum B1 (ENNReal.ofReal M)\nhB1 : ∑' (i : ℕ), B1 i < ⊤\n⊢ ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (↑↑(f n) - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nlet f1 : ℕ → α → E := fun n => f n\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nhB1_has : HasSum B1 (ENNReal.ofReal M)\nhB1 : ∑' (i : ℕ), B1 i < ⊤\nf1 : ℕ → α → E := fun n => ↑↑(f n)\n⊢ ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (↑↑(f n) - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nrefine' H f1 (fun n => Lp.memℒp (f n)) B1 hB1 fun N n m hn hm => _\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nhf : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (f n) (f m) < B N\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nhB1_has : HasSum B1 (ENNReal.ofReal M)\nhB1 : ∑' (i : ℕ), B1 i < ⊤\nf1 : ℕ → α → E := fun n => ↑↑(f n)\nN n m : ℕ\nhn : N ≤ n\nhm : N ≤ m\n⊢ snorm (f1 n - f1 m) p μ < B1 N\n[PROOFSTEP]\nspecialize hf N n m hn hm\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nhB1_has : HasSum B1 (ENNReal.ofReal M)\nhB1 : ∑' (i : ℕ), B1 i < ⊤\nf1 : ℕ → α → E := fun n => ↑↑(f n)\nN n m : ℕ\nhn : N ≤ n\nhm : N ≤ m\nhf : dist (f n) (f m) < B N\n⊢ snorm (f1 n - f1 m) p μ < B1 N\n[PROOFSTEP]\nrw [dist_def] at hf \n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nhB1_has : HasSum B1 (ENNReal.ofReal M)\nhB1 : ∑' (i : ℕ), B1 i < ⊤\nf1 : ℕ → α → E := fun n => ↑↑(f n)\nN n m : ℕ\nhn : N ≤ n\nhm : N ≤ m\nhf : ENNReal.toReal (snorm (↑↑(f n) - ↑↑(f m)) p μ) < B N\n⊢ snorm (f1 n - f1 m) p μ < B1 N\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nhB1_has : HasSum B1 (ENNReal.ofReal M)\nhB1 : ∑' (i : ℕ), B1 i < ⊤\nf1 : ℕ → α → E := fun n => ↑↑(f n)\nN n m : ℕ\nhn : N ≤ n\nhm : N ≤ m\nhf : ENNReal.toReal (snorm (↑↑(f n) - ↑↑(f m)) p μ) < B N\n⊢ snorm (↑↑(f n) - ↑↑(f m)) p μ < ENNReal.ofReal ((1 / 2) ^ N)\n[PROOFSTEP]\nrwa [ENNReal.lt_ofReal_iff_toReal_lt]\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nhB1_has : HasSum B1 (ENNReal.ofReal M)\nhB1 : ∑' (i : ℕ), B1 i < ⊤\nf1 : ℕ → α → E := fun n => ↑↑(f n)\nN n m : ℕ\nhn : N ≤ n\nhm : N ≤ m\nhf : ENNReal.toReal (snorm (↑↑(f n) - ↑↑(f m)) p μ) < B N\n⊢ snorm (↑↑(f n) - ↑↑(f m)) p μ ≠ ⊤\n[PROOFSTEP]\nrw [snorm_congr_ae (Lp.coeFn_sub _ _).symm]\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : Fact (1 ≤ p)\nH :\n  ∀ (f : ℕ → α → E),\n    (∀ (n : ℕ), Memℒp (f n) p) →\n      ∀ (B : ℕ → ℝ≥0∞),\n        ∑' (i : ℕ), B i < ⊤ →\n          (∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N) →\n            ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nB : ℕ → ℝ := fun n => (1 / 2) ^ n\nhB_pos : ∀ (n : ℕ), 0 < B n\nf : ℕ → { x // x ∈ Lp E p }\nM : ℝ\nhB : HasSum B M\nB1 : ℕ → ℝ≥0∞ := fun n => ENNReal.ofReal (B n)\nhB1_has : HasSum B1 (ENNReal.ofReal M)\nhB1 : ∑' (i : ℕ), B1 i < ⊤\nf1 : ℕ → α → E := fun n => ↑↑(f n)\nN n m : ℕ\nhn : N ≤ n\nhm : N ≤ m\nhf : ENNReal.toReal (snorm (↑↑(f n) - ↑↑(f m)) p μ) < B N\n⊢ snorm (↑↑(f n - f m)) p μ ≠ ⊤\n[PROOFSTEP]\nexact Lp.snorm_ne_top _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nn : ℕ\n⊢ snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nlet f_norm_diff i x := ‖f (i + 1) x - f i x‖\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nn : ℕ\nf_norm_diff : ℕ → α → ℝ := fun i x => ‖f (i + 1) x - f i x‖\n⊢ snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nhave hgf_norm_diff :\n  ∀ n, (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) = ∑ i in Finset.range (n + 1), f_norm_diff i :=\n  fun n => funext fun x => by simp\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nn✝ : ℕ\nf_norm_diff : ℕ → α → ℝ := fun i x => ‖f (i + 1) x - f i x‖\nn : ℕ\nx : α\n⊢ ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖ = Finset.sum (Finset.range (n + 1)) (fun i => f_norm_diff i) x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nn : ℕ\nf_norm_diff : ℕ → α → ℝ := fun i x => ‖f (i + 1) x - f i x‖\nhgf_norm_diff :\n  ∀ (n : ℕ), (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) = ∑ i in Finset.range (n + 1), f_norm_diff i\n⊢ snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nrw [hgf_norm_diff]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nn : ℕ\nf_norm_diff : ℕ → α → ℝ := fun i x => ‖f (i + 1) x - f i x‖\nhgf_norm_diff :\n  ∀ (n : ℕ), (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) = ∑ i in Finset.range (n + 1), f_norm_diff i\n⊢ snorm' (∑ i in Finset.range (n + 1), f_norm_diff i) p μ ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nrefine' (snorm'_sum_le (fun i _ => ((hf (i + 1)).sub (hf i)).norm) hp1).trans _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nn : ℕ\nf_norm_diff : ℕ → α → ℝ := fun i x => ‖f (i + 1) x - f i x‖\nhgf_norm_diff :\n  ∀ (n : ℕ), (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) = ∑ i in Finset.range (n + 1), f_norm_diff i\n⊢ ∑ i in Finset.range (n + 1), snorm' (fun x => ‖(f (i + 1) - f i) x‖) p μ ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nsimp_rw [snorm'_norm]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nn : ℕ\nf_norm_diff : ℕ → α → ℝ := fun i x => ‖f (i + 1) x - f i x‖\nhgf_norm_diff :\n  ∀ (n : ℕ), (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) = ∑ i in Finset.range (n + 1), f_norm_diff i\n⊢ ∑ x in Finset.range (n + 1), snorm' (fun a => (f (x + 1) - f x) a) p μ ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nrefine' (Finset.sum_le_sum _).trans (sum_le_tsum _ (fun m _ => zero_le _) ENNReal.summable)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nn : ℕ\nf_norm_diff : ℕ → α → ℝ := fun i x => ‖f (i + 1) x - f i x‖\nhgf_norm_diff :\n  ∀ (n : ℕ), (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) = ∑ i in Finset.range (n + 1), f_norm_diff i\n⊢ ∀ (i : ℕ), i ∈ Finset.range (n + 1) → snorm' (fun a => (f (i + 1) - f i) a) p μ ≤ B i\n[PROOFSTEP]\nexact fun m _ => (h_cau m (m + 1) m (Nat.le_succ m) (le_refl m)).le\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i\n⊢ ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\n[PROOFSTEP]\nhave hp_pos : 0 < p := zero_lt_one.trans_le hp1\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\n⊢ ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\n[PROOFSTEP]\nrw [← one_div_one_div p, @ENNReal.le_rpow_one_div_iff _ _ (1 / p) (by simp [hp_pos]), one_div_one_div p]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\n⊢ 0 < 1 / p\n[PROOFSTEP]\nsimp [hp_pos]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\n⊢ (∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nsimp_rw [snorm'] at hn \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : (∫⁻ (a : α), ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\n⊢ (∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nhave h_nnnorm_nonneg :\n  (fun a => (‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ : ℝ≥0∞) ^ p) = fun a =>\n    (∑ i in Finset.range (n + 1), (‖f (i + 1) a - f i a‖₊ : ℝ≥0∞)) ^ p :=\n  by\n  ext1 a\n  congr\n  simp_rw [← ofReal_norm_eq_coe_nnnorm]\n  rw [← ENNReal.ofReal_sum_of_nonneg]\n  · rw [Real.norm_of_nonneg _]\n    exact Finset.sum_nonneg fun x _ => norm_nonneg _\n  · exact fun x _ => norm_nonneg _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : (∫⁻ (a : α), ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\n⊢ (fun a => ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p) = fun a =>\n    (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p\n[PROOFSTEP]\next1 a\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : (∫⁻ (a : α), ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\na : α\n⊢ ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p =\n    (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_a\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : (∫⁻ (a : α), ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\na : α\n⊢ ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ = ∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊\n[PROOFSTEP]\nsimp_rw [← ofReal_norm_eq_coe_nnnorm]\n[GOAL]\ncase h.e_a\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : (∫⁻ (a : α), ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\na : α\n⊢ ENNReal.ofReal ‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖ =\n    ∑ x in Finset.range (n + 1), ENNReal.ofReal ‖f (x + 1) a - f x a‖\n[PROOFSTEP]\nrw [← ENNReal.ofReal_sum_of_nonneg]\n[GOAL]\ncase h.e_a\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : (∫⁻ (a : α), ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\na : α\n⊢ ENNReal.ofReal ‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖ =\n    ENNReal.ofReal (∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖)\n[PROOFSTEP]\nrw [Real.norm_of_nonneg _]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : (∫⁻ (a : α), ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\na : α\n⊢ 0 ≤ ∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖\n[PROOFSTEP]\nexact Finset.sum_nonneg fun x _ => norm_nonneg _\n[GOAL]\ncase h.e_a\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : (∫⁻ (a : α), ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\na : α\n⊢ ∀ (i : ℕ), i ∈ Finset.range (n + 1) → 0 ≤ ‖f (i + 1) a - f i a‖\n[PROOFSTEP]\nexact fun x _ => norm_nonneg _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhn : (∫⁻ (a : α), ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\nh_nnnorm_nonneg :\n  (fun a => ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p) = fun a =>\n    (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p\n⊢ (∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nchange (∫⁻ a, (fun x => ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖‖₊ ^ p) a ∂μ) ^ (1 / p) ≤ ∑' i, B i at hn \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nn : ℕ\nhp_pos : 0 < p\nh_nnnorm_nonneg :\n  (fun a => ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖‖₊ ^ p) = fun a =>\n    (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p\nhn :\n  (∫⁻ (a : α), (fun x => ↑‖∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖‖₊ ^ p) a ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\n⊢ (∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nrwa [h_nnnorm_nonneg] at hn \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\n⊢ (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nhave hp_pos : 0 < p := zero_lt_one.trans_le hp1\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\n⊢ (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nsuffices h_pow : (∫⁻ a, (∑' i, ‖f (i + 1) a - f i a‖₊ : ℝ≥0∞) ^ p ∂μ) ≤ (∑' i, B i) ^ p\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_pow : ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\n⊢ (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\n[PROOFSTEP]\nrwa [← ENNReal.le_rpow_one_div_iff (by simp [hp_pos] : 0 < 1 / p), one_div_one_div]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_pow : ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\n⊢ 0 < 1 / p\n[PROOFSTEP]\nsimp [hp_pos]\n[GOAL]\ncase h_pow\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\n⊢ ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\n[PROOFSTEP]\nhave h_tsum_1 : ∀ g : ℕ → ℝ≥0∞, ∑' i, g i = atTop.liminf fun n => ∑ i in Finset.range (n + 1), g i :=\n  by\n  intro g\n  rw [ENNReal.tsum_eq_liminf_sum_nat, ← liminf_nat_add _ 1]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\n⊢ ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\n[PROOFSTEP]\nintro g\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\ng : ℕ → ℝ≥0∞\n⊢ ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\n[PROOFSTEP]\nrw [ENNReal.tsum_eq_liminf_sum_nat, ← liminf_nat_add _ 1]\n[GOAL]\ncase h_pow\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\n⊢ ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\n[PROOFSTEP]\nsimp_rw [h_tsum_1 _]\n[GOAL]\ncase h_pow\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\n⊢ ∫⁻ (a : α), liminf (fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) atTop ^ p ∂μ ≤\n    liminf (fun n => ∑ i in Finset.range (n + 1), B i) atTop ^ p\n[PROOFSTEP]\nrw [← h_tsum_1]\n[GOAL]\ncase h_pow\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\n⊢ ∫⁻ (a : α), liminf (fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) atTop ^ p ∂μ ≤\n    (∑' (i : ℕ), B i) ^ p\n[PROOFSTEP]\nhave h_liminf_pow :\n  (∫⁻ a, (atTop.liminf fun n => ∑ i in Finset.range (n + 1), (‖f (i + 1) a - f i a‖₊ : ℝ≥0∞)) ^ p ∂μ) =\n    ∫⁻ a, atTop.liminf fun n => (∑ i in Finset.range (n + 1), (‖f (i + 1) a - f i a‖₊ : ℝ≥0∞)) ^ p ∂μ :=\n  by\n  refine' lintegral_congr fun x => _\n  have h_rpow_mono := ENNReal.strictMono_rpow_of_pos (zero_lt_one.trans_le hp1)\n  have h_rpow_surj := (ENNReal.rpow_left_bijective hp_pos.ne.symm).2\n  refine' (h_rpow_mono.orderIsoOfSurjective _ h_rpow_surj).liminf_apply _ _ _ _\n  all_goals isBoundedDefault\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\n⊢ ∫⁻ (a : α), liminf (fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) atTop ^ p ∂μ =\n    ∫⁻ (a : α), liminf (fun n => (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p) atTop ∂μ\n[PROOFSTEP]\nrefine' lintegral_congr fun x => _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nx : α\n⊢ liminf (fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) x - f i x‖₊) atTop ^ p =\n    liminf (fun n => (∑ i in Finset.range (n + 1), ↑‖f (i + 1) x - f i x‖₊) ^ p) atTop\n[PROOFSTEP]\nhave h_rpow_mono := ENNReal.strictMono_rpow_of_pos (zero_lt_one.trans_le hp1)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nx : α\nh_rpow_mono : StrictMono fun x => x ^ p\n⊢ liminf (fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) x - f i x‖₊) atTop ^ p =\n    liminf (fun n => (∑ i in Finset.range (n + 1), ↑‖f (i + 1) x - f i x‖₊) ^ p) atTop\n[PROOFSTEP]\nhave h_rpow_surj := (ENNReal.rpow_left_bijective hp_pos.ne.symm).2\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nx : α\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ liminf (fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) x - f i x‖₊) atTop ^ p =\n    liminf (fun n => (∑ i in Finset.range (n + 1), ↑‖f (i + 1) x - f i x‖₊) ^ p) atTop\n[PROOFSTEP]\nrefine' (h_rpow_mono.orderIsoOfSurjective _ h_rpow_surj).liminf_apply _ _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nx : α\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) atTop fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) x - f i x‖₊\ncase refine'_2\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nx : α\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) atTop fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) x - f i x‖₊\ncase refine'_3\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nx : α\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) atTop fun x_1 =>\n    ↑(StrictMono.orderIsoOfSurjective (fun x => x ^ p) h_rpow_mono h_rpow_surj)\n      (∑ i in Finset.range (x_1 + 1), ↑‖f (i + 1) x - f i x‖₊)\ncase refine'_4\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nx : α\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) atTop fun x_1 =>\n    ↑(StrictMono.orderIsoOfSurjective (fun x => x ^ p) h_rpow_mono h_rpow_surj)\n      (∑ i in Finset.range (x_1 + 1), ↑‖f (i + 1) x - f i x‖₊)\n[PROOFSTEP]\nall_goals isBoundedDefault\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nx : α\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) atTop fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) x - f i x‖₊\n[PROOFSTEP]\nisBoundedDefault\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nx : α\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) atTop fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) x - f i x‖₊\n[PROOFSTEP]\nisBoundedDefault\n[GOAL]\ncase refine'_3\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nx : α\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) atTop fun x_1 =>\n    ↑(StrictMono.orderIsoOfSurjective (fun x => x ^ p) h_rpow_mono h_rpow_surj)\n      (∑ i in Finset.range (x_1 + 1), ↑‖f (i + 1) x - f i x‖₊)\n[PROOFSTEP]\nisBoundedDefault\n[GOAL]\ncase refine'_4\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nx : α\nh_rpow_mono : StrictMono fun x => x ^ p\nh_rpow_surj : Function.Surjective fun y => y ^ p\n⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) atTop fun x_1 =>\n    ↑(StrictMono.orderIsoOfSurjective (fun x => x ^ p) h_rpow_mono h_rpow_surj)\n      (∑ i in Finset.range (x_1 + 1), ↑‖f (i + 1) x - f i x‖₊)\n[PROOFSTEP]\nisBoundedDefault\n[GOAL]\ncase h_pow\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nh_liminf_pow :\n  ∫⁻ (a : α), liminf (fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) atTop ^ p ∂μ =\n    ∫⁻ (a : α), liminf (fun n => (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p) atTop ∂μ\n⊢ ∫⁻ (a : α), liminf (fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) atTop ^ p ∂μ ≤\n    (∑' (i : ℕ), B i) ^ p\n[PROOFSTEP]\nrw [h_liminf_pow]\n[GOAL]\ncase h_pow\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nh_liminf_pow :\n  ∫⁻ (a : α), liminf (fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) atTop ^ p ∂μ =\n    ∫⁻ (a : α), liminf (fun n => (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p) atTop ∂μ\n⊢ ∫⁻ (a : α), liminf (fun n => (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p) atTop ∂μ ≤\n    (∑' (i : ℕ), B i) ^ p\n[PROOFSTEP]\nrefine' (lintegral_liminf_le' _).trans _\n[GOAL]\ncase h_pow.refine'_1\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nh_liminf_pow :\n  ∫⁻ (a : α), liminf (fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) atTop ^ p ∂μ =\n    ∫⁻ (a : α), liminf (fun n => (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p) atTop ∂μ\n⊢ ∀ (n : ℕ), AEMeasurable fun a => (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p\n[PROOFSTEP]\nexact fun n => (Finset.aemeasurable_sum (Finset.range (n + 1)) fun i _ => ((hf (i + 1)).sub (hf i)).ennnorm).pow_const _\n[GOAL]\ncase h_pow.refine'_2\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nh : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nhp_pos : 0 < p\nh_tsum_1 : ∀ (g : ℕ → ℝ≥0∞), ∑' (i : ℕ), g i = liminf (fun n => ∑ i in Finset.range (n + 1), g i) atTop\nh_liminf_pow :\n  ∫⁻ (a : α), liminf (fun n => ∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) atTop ^ p ∂μ =\n    ∫⁻ (a : α), liminf (fun n => (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p) atTop ∂μ\n⊢ liminf (fun n => ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) atTop ≤\n    (∑' (i : ℕ), B i) ^ p\n[PROOFSTEP]\nexact liminf_le_of_frequently_le' (frequently_of_forall h)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\n⊢ ∀ᵐ (x : α) ∂μ, ∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊ < ⊤\n[PROOFSTEP]\nhave hp_pos : 0 < p := zero_lt_one.trans_le hp1\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\n⊢ ∀ᵐ (x : α) ∂μ, ∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊ < ⊤\n[PROOFSTEP]\nhave h_integral : (∫⁻ a, (∑' i, ‖f (i + 1) a - f i a‖₊ : ℝ≥0∞) ^ p ∂μ) < ∞ :=\n  by\n  have h_tsum_lt_top : (∑' i, B i) ^ p < ∞ := ENNReal.rpow_lt_top_of_nonneg hp_pos.le hB\n  refine' lt_of_le_of_lt _ h_tsum_lt_top\n  rwa [← ENNReal.le_rpow_one_div_iff (by simp [hp_pos] : 0 < 1 / p), one_div_one_div] at h \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\n⊢ ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ < ⊤\n[PROOFSTEP]\nhave h_tsum_lt_top : (∑' i, B i) ^ p < ∞ := ENNReal.rpow_lt_top_of_nonneg hp_pos.le hB\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\nh_tsum_lt_top : (∑' (i : ℕ), B i) ^ p < ⊤\n⊢ ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ < ⊤\n[PROOFSTEP]\nrefine' lt_of_le_of_lt _ h_tsum_lt_top\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\nh_tsum_lt_top : (∑' (i : ℕ), B i) ^ p < ⊤\n⊢ ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\n[PROOFSTEP]\nrwa [← ENNReal.le_rpow_one_div_iff (by simp [hp_pos] : 0 < 1 / p), one_div_one_div] at h \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\nh_tsum_lt_top : (∑' (i : ℕ), B i) ^ p < ⊤\n⊢ 0 < 1 / p\n[PROOFSTEP]\nsimp [hp_pos]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\nh_integral : ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ < ⊤\n⊢ ∀ᵐ (x : α) ∂μ, ∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊ < ⊤\n[PROOFSTEP]\nhave rpow_ae_lt_top : ∀ᵐ x ∂μ, (∑' i, ‖f (i + 1) x - f i x‖₊ : ℝ≥0∞) ^ p < ∞ :=\n  by\n  refine' ae_lt_top' (AEMeasurable.pow_const _ _) h_integral.ne\n  exact AEMeasurable.ennreal_tsum fun n => ((hf (n + 1)).sub (hf n)).ennnorm\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\nh_integral : ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ < ⊤\n⊢ ∀ᵐ (x : α) ∂μ, (∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊) ^ p < ⊤\n[PROOFSTEP]\nrefine' ae_lt_top' (AEMeasurable.pow_const _ _) h_integral.ne\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\nh_integral : ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ < ⊤\n⊢ AEMeasurable fun x => ∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊\n[PROOFSTEP]\nexact AEMeasurable.ennreal_tsum fun n => ((hf (n + 1)).sub (hf n)).ennnorm\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\nh_integral : ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ < ⊤\nrpow_ae_lt_top : ∀ᵐ (x : α) ∂μ, (∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊) ^ p < ⊤\n⊢ ∀ᵐ (x : α) ∂μ, ∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊ < ⊤\n[PROOFSTEP]\nrefine' rpow_ae_lt_top.mono fun x hx => _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\nh_integral : ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ < ⊤\nrpow_ae_lt_top : ∀ᵐ (x : α) ∂μ, (∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊) ^ p < ⊤\nx : α\nhx : (∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊) ^ p < ⊤\n⊢ ∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊ < ⊤\n[PROOFSTEP]\nrwa [← ENNReal.lt_rpow_one_div_iff hp_pos, ENNReal.top_rpow_of_pos (by simp [hp_pos] : 0 < 1 / p)] at hx \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\np : ℝ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nhp_pos : 0 < p\nh_integral : ∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ < ⊤\nrpow_ae_lt_top : ∀ᵐ (x : α) ∂μ, (∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊) ^ p < ⊤\nx : α\nhx : ∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊ < ⊤ ^ (1 / p)\n⊢ 0 < 1 / p\n[PROOFSTEP]\nsimp [hp_pos]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\n⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nhave h_summable : ∀ᵐ x ∂μ, Summable fun i : ℕ => f (i + 1) x - f i x :=\n  by\n  have h1 : ∀ n, snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' i, B i :=\n    snorm'_sum_norm_sub_le_tsum_of_cauchy_snorm' hf hp1 h_cau\n  have h2 : ∀ n, (∫⁻ a, (∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖₊ : ℝ≥0∞) ^ p ∂μ) ≤ (∑' i, B i) ^ p :=\n    fun n => lintegral_rpow_sum_coe_nnnorm_sub_le_rpow_tsum hp1 n (h1 n)\n  have h3 : (∫⁻ a, (∑' i, ‖f (i + 1) a - f i a‖₊ : ℝ≥0∞) ^ p ∂μ) ^ (1 / p) ≤ ∑' i, B i :=\n    lintegral_rpow_tsum_coe_nnnorm_sub_le_tsum hf hp1 h2\n  have h4 : ∀ᵐ x ∂μ, (∑' i, ‖f (i + 1) x - f i x‖₊ : ℝ≥0∞) < ∞ := tsum_nnnorm_sub_ae_lt_top hf hp1 hB h3\n  exact\n    h4.mono fun x hx => summable_of_summable_nnnorm (ENNReal.tsum_coe_ne_top_iff_summable.mp (lt_top_iff_ne_top.mp hx))\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\n⊢ ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\n[PROOFSTEP]\nhave h1 : ∀ n, snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' i, B i :=\n  snorm'_sum_norm_sub_le_tsum_of_cauchy_snorm' hf hp1 h_cau\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh1 : ∀ (n : ℕ), snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i\n⊢ ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\n[PROOFSTEP]\nhave h2 : ∀ n, (∫⁻ a, (∑ i in Finset.range (n + 1), ‖f (i + 1) a - f i a‖₊ : ℝ≥0∞) ^ p ∂μ) ≤ (∑' i, B i) ^ p := fun n =>\n  lintegral_rpow_sum_coe_nnnorm_sub_le_rpow_tsum hp1 n (h1 n)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh1 : ∀ (n : ℕ), snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i\nh2 : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\n⊢ ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\n[PROOFSTEP]\nhave h3 : (∫⁻ a, (∑' i, ‖f (i + 1) a - f i a‖₊ : ℝ≥0∞) ^ p ∂μ) ^ (1 / p) ≤ ∑' i, B i :=\n  lintegral_rpow_tsum_coe_nnnorm_sub_le_tsum hf hp1 h2\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh1 : ∀ (n : ℕ), snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i\nh2 : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nh3 : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\n⊢ ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\n[PROOFSTEP]\nhave h4 : ∀ᵐ x ∂μ, (∑' i, ‖f (i + 1) x - f i x‖₊ : ℝ≥0∞) < ∞ := tsum_nnnorm_sub_ae_lt_top hf hp1 hB h3\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh1 : ∀ (n : ℕ), snorm' (fun x => ∑ i in Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i\nh2 : ∀ (n : ℕ), ∫⁻ (a : α), (∑ i in Finset.range (n + 1), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ ≤ (∑' (i : ℕ), B i) ^ p\nh3 : (∫⁻ (a : α), (∑' (i : ℕ), ↑‖f (i + 1) a - f i a‖₊) ^ p ∂μ) ^ (1 / p) ≤ ∑' (i : ℕ), B i\nh4 : ∀ᵐ (x : α) ∂μ, ∑' (i : ℕ), ↑‖f (i + 1) x - f i x‖₊ < ⊤\n⊢ ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\n[PROOFSTEP]\nexact\n  h4.mono fun x hx => summable_of_summable_nnnorm (ENNReal.tsum_coe_ne_top_iff_summable.mp (lt_top_iff_ne_top.mp hx))\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\n⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nhave h : ∀ᵐ x ∂μ, ∃ l : E, atTop.Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) (𝓝 l) :=\n  by\n  refine' h_summable.mono fun x hx => _\n  let hx_sum := hx.hasSum.tendsto_sum_nat\n  exact ⟨∑' i, (f (i + 1) x - f i x), hx_sum⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\n⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\n[PROOFSTEP]\nrefine' h_summable.mono fun x hx => _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nx : α\nhx : Summable fun i => f (i + 1) x - f i x\n⊢ ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\n[PROOFSTEP]\nlet hx_sum := hx.hasSum.tendsto_sum_nat\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nx : α\nhx : Summable fun i => f (i + 1) x - f i x\nhx_sum : Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop\n  (𝓝 (∑' (b : ℕ), (f (b + 1) x - f b x))) :=\n  HasSum.tendsto_sum_nat (Summable.hasSum hx)\n⊢ ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\n[PROOFSTEP]\nexact ⟨∑' i, (f (i + 1) x - f i x), hx_sum⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\n⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nrefine' h.mono fun x hx => _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nx : α\nhx : ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\n⊢ ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\ncases' hx with l hx\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nx : α\nl : E\nhx : Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\n⊢ ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nhave h_rw_sum : (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) = fun n => f n x - f 0 x :=\n  by\n  ext1 n\n  change (∑ i : ℕ in Finset.range n, ((fun m => f m x) (i + 1) - (fun m => f m x) i)) = f n x - f 0 x\n  rw [Finset.sum_range_sub (fun m => f m x)]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nx : α\nl : E\nhx : Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\n⊢ (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) = fun n => f n x - f 0 x\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nx : α\nl : E\nhx : Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nn : ℕ\n⊢ ∑ i in Finset.range n, (f (i + 1) x - f i x) = f n x - f 0 x\n[PROOFSTEP]\nchange (∑ i : ℕ in Finset.range n, ((fun m => f m x) (i + 1) - (fun m => f m x) i)) = f n x - f 0 x\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nx : α\nl : E\nhx : Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nn : ℕ\n⊢ ∑ i in Finset.range n, ((fun m => f m x) (i + 1) - (fun m => f m x) i) = f n x - f 0 x\n[PROOFSTEP]\nrw [Finset.sum_range_sub (fun m => f m x)]\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nx : α\nl : E\nhx : Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nh_rw_sum : (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) = fun n => f n x - f 0 x\n⊢ ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nrw [h_rw_sum] at hx \n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nx : α\nl : E\nhx : Tendsto (fun n => f n x - f 0 x) atTop (𝓝 l)\nh_rw_sum : (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) = fun n => f n x - f 0 x\n⊢ ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nhave hf_rw : (fun n => f n x) = fun n => f n x - f 0 x + f 0 x :=\n  by\n  ext1 n\n  abel\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nx : α\nl : E\nhx : Tendsto (fun n => f n x - f 0 x) atTop (𝓝 l)\nh_rw_sum : (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) = fun n => f n x - f 0 x\n⊢ (fun n => f n x) = fun n => f n x - f 0 x + f 0 x\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nx : α\nl : E\nhx : Tendsto (fun n => f n x - f 0 x) atTop (𝓝 l)\nh_rw_sum : (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) = fun n => f n x - f 0 x\nn : ℕ\n⊢ f n x = f n x - f 0 x + f 0 x\n[PROOFSTEP]\nabel\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nx : α\nl : E\nhx : Tendsto (fun n => f n x - f 0 x) atTop (𝓝 l)\nh_rw_sum : (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) = fun n => f n x - f 0 x\nn : ℕ\n⊢ f n x = f n x - f 0 x + f 0 x\n[PROOFSTEP]\nabel\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nx : α\nl : E\nhx : Tendsto (fun n => f n x - f 0 x) atTop (𝓝 l)\nh_rw_sum : (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) = fun n => f n x - f 0 x\nhf_rw : (fun n => f n x) = fun n => f n x - f 0 x + f 0 x\n⊢ ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nrw [hf_rw]\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np✝ : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\np : ℝ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp1 : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) p μ < B N\nh_summable : ∀ᵐ (x : α) ∂μ, Summable fun i => f (i + 1) x - f i x\nh : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) atTop (𝓝 l)\nx : α\nl : E\nhx : Tendsto (fun n => f n x - f 0 x) atTop (𝓝 l)\nh_rw_sum : (fun n => ∑ i in Finset.range n, (f (i + 1) x - f i x)) = fun n => f n x - f 0 x\nhf_rw : (fun n => f n x) = fun n => f n x - f 0 x + f 0 x\n⊢ ∃ l, Tendsto (fun n => f n x - f 0 x + f 0 x) atTop (𝓝 l)\n[PROOFSTEP]\nexact ⟨l + f 0 x, Tendsto.add_const _ hx⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\n⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nby_cases hp_top : p = ∞\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nhp_top : p = ⊤\n⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nsimp_rw [hp_top] at *\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp : True\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) ⊤ μ < B N\nhp_top : True\n⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nhave h_cau_ae : ∀ᵐ x ∂μ, ∀ N n m, N ≤ n → N ≤ m → (‖(f n - f m) x‖₊ : ℝ≥0∞) < B N :=\n  by\n  simp_rw [ae_all_iff]\n  exact fun N n m hnN hmN => ae_lt_of_essSup_lt (h_cau N n m hnN hmN)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp : True\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) ⊤ μ < B N\nhp_top : True\n⊢ ∀ᵐ (x : α) ∂μ, ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\n[PROOFSTEP]\nsimp_rw [ae_all_iff]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp : True\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) ⊤ μ < B N\nhp_top : True\n⊢ ∀ (i i_1 i_2 : ℕ), i ≤ i_1 → i ≤ i_2 → ∀ᵐ (a : α) ∂μ, ↑‖(f i_1 - f i_2) a‖₊ < B i\n[PROOFSTEP]\nexact fun N n m hnN hmN => ae_lt_of_essSup_lt (h_cau N n m hnN hmN)\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp : True\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) ⊤ μ < B N\nhp_top : True\nh_cau_ae : ∀ᵐ (x : α) ∂μ, ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\n⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nsimp_rw [snorm_exponent_top, snormEssSup] at h_cau \n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp hp_top : True\nh_cau_ae : ∀ᵐ (x : α) ∂μ, ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → essSup (fun x => ↑‖(f n - f m) x‖₊) μ < B N\n⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nrefine' h_cau_ae.mono fun x hx => cauchySeq_tendsto_of_complete _\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp hp_top : True\nh_cau_ae : ∀ᵐ (x : α) ∂μ, ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → essSup (fun x => ↑‖(f n - f m) x‖₊) μ < B N\nx : α\nhx : ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\n⊢ CauchySeq fun n => f n x\n[PROOFSTEP]\nrefine' cauchySeq_of_le_tendsto_0 (fun n => (B n).toReal) _ _\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp hp_top : True\nh_cau_ae : ∀ᵐ (x : α) ∂μ, ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → essSup (fun x => ↑‖(f n - f m) x‖₊) μ < B N\nx : α\nhx : ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\n⊢ ∀ (n m N : ℕ), N ≤ n → N ≤ m → dist (f n x) (f m x) ≤ (fun n => ENNReal.toReal (B n)) N\n[PROOFSTEP]\nintro n m N hnN hmN\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp hp_top : True\nh_cau_ae : ∀ᵐ (x : α) ∂μ, ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → essSup (fun x => ↑‖(f n - f m) x‖₊) μ < B N\nx : α\nhx : ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\nn m N : ℕ\nhnN : N ≤ n\nhmN : N ≤ m\n⊢ dist (f n x) (f m x) ≤ (fun n => ENNReal.toReal (B n)) N\n[PROOFSTEP]\nspecialize hx N n m hnN hmN\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp hp_top : True\nh_cau_ae : ∀ᵐ (x : α) ∂μ, ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → essSup (fun x => ↑‖(f n - f m) x‖₊) μ < B N\nx : α\nn m N : ℕ\nhnN : N ≤ n\nhmN : N ≤ m\nhx : ↑‖(f n - f m) x‖₊ < B N\n⊢ dist (f n x) (f m x) ≤ (fun n => ENNReal.toReal (B n)) N\n[PROOFSTEP]\nrw [dist_eq_norm, ← ENNReal.toReal_ofReal (norm_nonneg _),\n  ENNReal.toReal_le_toReal ENNReal.ofReal_ne_top (ENNReal.ne_top_of_tsum_ne_top hB N)]\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp hp_top : True\nh_cau_ae : ∀ᵐ (x : α) ∂μ, ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → essSup (fun x => ↑‖(f n - f m) x‖₊) μ < B N\nx : α\nn m N : ℕ\nhnN : N ≤ n\nhmN : N ≤ m\nhx : ↑‖(f n - f m) x‖₊ < B N\n⊢ ENNReal.ofReal ‖f n x - f m x‖ ≤ B N\n[PROOFSTEP]\nrw [← ofReal_norm_eq_coe_nnnorm] at hx \n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp hp_top : True\nh_cau_ae : ∀ᵐ (x : α) ∂μ, ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → essSup (fun x => ↑‖(f n - f m) x‖₊) μ < B N\nx : α\nn m N : ℕ\nhnN : N ≤ n\nhmN : N ≤ m\nhx : ENNReal.ofReal ‖(f n - f m) x‖ < B N\n⊢ ENNReal.ofReal ‖f n x - f m x‖ ≤ B N\n[PROOFSTEP]\nexact hx.le\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp hp_top : True\nh_cau_ae : ∀ᵐ (x : α) ∂μ, ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → essSup (fun x => ↑‖(f n - f m) x‖₊) μ < B N\nx : α\nhx : ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\n⊢ Tendsto (fun n => ENNReal.toReal (B n)) atTop (𝓝 0)\n[PROOFSTEP]\nrw [← ENNReal.zero_toReal]\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp hp_top : True\nh_cau_ae : ∀ᵐ (x : α) ∂μ, ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → essSup (fun x => ↑‖(f n - f m) x‖₊) μ < B N\nx : α\nhx : ∀ (N n m : ℕ), N ≤ n → N ≤ m → ↑‖(f n - f m) x‖₊ < B N\n⊢ Tendsto (fun n => ENNReal.toReal (B n)) atTop (𝓝 (ENNReal.toReal 0))\n[PROOFSTEP]\nexact\n  Tendsto.comp (g := ENNReal.toReal) (ENNReal.tendsto_toReal ENNReal.zero_ne_top)\n    (ENNReal.tendsto_atTop_zero_of_tsum_ne_top hB)\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nhp_top : ¬p = ⊤\n⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nhave hp1 : 1 ≤ p.toReal := by\n  rw [← ENNReal.ofReal_le_iff_le_toReal hp_top, ENNReal.ofReal_one]\n  exact hp\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nhp_top : ¬p = ⊤\n⊢ 1 ≤ ENNReal.toReal p\n[PROOFSTEP]\nrw [← ENNReal.ofReal_le_iff_le_toReal hp_top, ENNReal.ofReal_one]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nhp_top : ¬p = ⊤\n⊢ 1 ≤ p\n[PROOFSTEP]\nexact hp\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nhp_top : ¬p = ⊤\nhp1 : 1 ≤ ENNReal.toReal p\n⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nhave h_cau' : ∀ N n m : ℕ, N ≤ n → N ≤ m → snorm' (f n - f m) p.toReal μ < B N :=\n  by\n  intro N n m hn hm\n  specialize h_cau N n m hn hm\n  rwa [snorm_eq_snorm' (zero_lt_one.trans_le hp).ne.symm hp_top] at h_cau \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nhp_top : ¬p = ⊤\nhp1 : 1 ≤ ENNReal.toReal p\n⊢ ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) (ENNReal.toReal p) μ < B N\n[PROOFSTEP]\nintro N n m hn hm\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nhp_top : ¬p = ⊤\nhp1 : 1 ≤ ENNReal.toReal p\nN n m : ℕ\nhn : N ≤ n\nhm : N ≤ m\n⊢ snorm' (f n - f m) (ENNReal.toReal p) μ < B N\n[PROOFSTEP]\nspecialize h_cau N n m hn hm\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm✝ m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nhp_top : ¬p = ⊤\nhp1 : 1 ≤ ENNReal.toReal p\nN n m : ℕ\nhn : N ≤ n\nhm : N ≤ m\nh_cau : snorm (f n - f m) p μ < B N\n⊢ snorm' (f n - f m) (ENNReal.toReal p) μ < B N\n[PROOFSTEP]\nrwa [snorm_eq_snorm' (zero_lt_one.trans_le hp).ne.symm hp_top] at h_cau \n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhp : 1 ≤ p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nhp_top : ¬p = ⊤\nhp1 : 1 ≤ ENNReal.toReal p\nh_cau' : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm' (f n - f m) (ENNReal.toReal p) μ < B N\n⊢ ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n[PROOFSTEP]\nexact ae_tendsto_of_cauchy_snorm' hf hp1 hB h_cau'\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nrw [ENNReal.tendsto_atTop_zero]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\n[PROOFSTEP]\nintro ε hε\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\n[PROOFSTEP]\nhave h_B : ∃ N : ℕ, B N ≤ ε :=\n  by\n  suffices h_tendsto_zero : ∃ N : ℕ, ∀ n : ℕ, N ≤ n → B n ≤ ε\n  exact ⟨h_tendsto_zero.choose, h_tendsto_zero.choose_spec _ le_rfl⟩\n  exact (ENNReal.tendsto_atTop_zero.mp (ENNReal.tendsto_atTop_zero_of_tsum_ne_top hB)) ε hε\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\n⊢ ∃ N, B N ≤ ε\n[PROOFSTEP]\nsuffices h_tendsto_zero : ∃ N : ℕ, ∀ n : ℕ, N ≤ n → B n ≤ ε\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\nh_tendsto_zero : ∃ N, ∀ (n : ℕ), N ≤ n → B n ≤ ε\n⊢ ∃ N, B N ≤ ε\ncase h_tendsto_zero\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\n⊢ ∃ N, ∀ (n : ℕ), N ≤ n → B n ≤ ε\n[PROOFSTEP]\nexact ⟨h_tendsto_zero.choose, h_tendsto_zero.choose_spec _ le_rfl⟩\n[GOAL]\ncase h_tendsto_zero\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\n⊢ ∃ N, ∀ (n : ℕ), N ≤ n → B n ≤ ε\n[PROOFSTEP]\nexact (ENNReal.tendsto_atTop_zero.mp (ENNReal.tendsto_atTop_zero_of_tsum_ne_top hB)) ε hε\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\nh_B : ∃ N, B N ≤ ε\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\n[PROOFSTEP]\ncases' h_B with N h_B\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\nN : ℕ\nh_B : B N ≤ ε\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\n[PROOFSTEP]\nrefine' ⟨N, fun n hn => _⟩\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\nN : ℕ\nh_B : B N ≤ ε\nn : ℕ\nhn : n ≥ N\n⊢ snorm (f n - f_lim) p μ ≤ ε\n[PROOFSTEP]\nhave h_sub : snorm (f n - f_lim) p μ ≤ atTop.liminf fun m => snorm (f n - f m) p μ :=\n  by\n  refine' snorm_lim_le_liminf_snorm (fun m => (hf n).sub (hf m)) (f n - f_lim) _\n  refine' h_lim.mono fun x hx => _\n  simp_rw [sub_eq_add_neg]\n  exact Tendsto.add tendsto_const_nhds (Tendsto.neg hx)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\nN : ℕ\nh_B : B N ≤ ε\nn : ℕ\nhn : n ≥ N\n⊢ snorm (f n - f_lim) p μ ≤ liminf (fun m => snorm (f n - f m) p μ) atTop\n[PROOFSTEP]\nrefine' snorm_lim_le_liminf_snorm (fun m => (hf n).sub (hf m)) (f n - f_lim) _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\nN : ℕ\nh_B : B N ≤ ε\nn : ℕ\nhn : n ≥ N\n⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun n_1 => (f n - f n_1) x) atTop (𝓝 ((f n - f_lim) x))\n[PROOFSTEP]\nrefine' h_lim.mono fun x hx => _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\nN : ℕ\nh_B : B N ≤ ε\nn : ℕ\nhn : n ≥ N\nx : α\nhx : Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ Tendsto (fun n_1 => (f n - f n_1) x) atTop (𝓝 ((f n - f_lim) x))\n[PROOFSTEP]\nsimp_rw [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\nN : ℕ\nh_B : B N ≤ ε\nn : ℕ\nhn : n ≥ N\nx : α\nhx : Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ Tendsto (fun n_1 => (f n + -f n_1) x) atTop (𝓝 ((f n + -f_lim) x))\n[PROOFSTEP]\nexact Tendsto.add tendsto_const_nhds (Tendsto.neg hx)\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\nN : ℕ\nh_B : B N ≤ ε\nn : ℕ\nhn : n ≥ N\nh_sub : snorm (f n - f_lim) p μ ≤ liminf (fun m => snorm (f n - f m) p μ) atTop\n⊢ snorm (f n - f_lim) p μ ≤ ε\n[PROOFSTEP]\nrefine' h_sub.trans _\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\nN : ℕ\nh_B : B N ≤ ε\nn : ℕ\nhn : n ≥ N\nh_sub : snorm (f n - f_lim) p μ ≤ liminf (fun m => snorm (f n - f m) p μ) atTop\n⊢ liminf (fun m => snorm (f n - f m) p μ) atTop ≤ ε\n[PROOFSTEP]\nrefine' liminf_le_of_frequently_le' (frequently_atTop.mpr _)\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\nN : ℕ\nh_B : B N ≤ ε\nn : ℕ\nhn : n ≥ N\nh_sub : snorm (f n - f_lim) p μ ≤ liminf (fun m => snorm (f n - f m) p μ) atTop\n⊢ ∀ (a : ℕ), ∃ b, b ≥ a ∧ snorm (f n - f b) p μ ≤ ε\n[PROOFSTEP]\nrefine' fun N1 => ⟨max N N1, le_max_right _ _, _⟩\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nf : ℕ → α → E\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nf_lim : α → E\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nε : ℝ≥0∞\nhε : ε > 0\nN : ℕ\nh_B : B N ≤ ε\nn : ℕ\nhn : n ≥ N\nh_sub : snorm (f n - f_lim) p μ ≤ liminf (fun m => snorm (f n - f m) p μ) atTop\nN1 : ℕ\n⊢ snorm (f n - f (max N N1)) p μ ≤ ε\n[PROOFSTEP]\nexact (h_cau N n (max N N1) hn (le_max_left _ _)).le.trans h_B\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\n⊢ Memℒp f_lim p\n[PROOFSTEP]\nrefine' ⟨h_lim_meas, _⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\n⊢ snorm f_lim p μ < ⊤\n[PROOFSTEP]\nrw [ENNReal.tendsto_atTop_zero] at h_tendsto \n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\n⊢ snorm f_lim p μ < ⊤\n[PROOFSTEP]\ncases' h_tendsto 1 zero_lt_one with N h_tendsto_1\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ 1\n⊢ snorm f_lim p μ < ⊤\n[PROOFSTEP]\nspecialize h_tendsto_1 N (le_refl N)\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : snorm (f N - f_lim) p μ ≤ 1\n⊢ snorm f_lim p μ < ⊤\n[PROOFSTEP]\nhave h_add : f_lim = f_lim - f N + f N := by abel\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : snorm (f N - f_lim) p μ ≤ 1\n⊢ f_lim = f_lim - f N + f N\n[PROOFSTEP]\nabel\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : snorm (f N - f_lim) p μ ≤ 1\n⊢ f_lim = f_lim - f N + f N\n[PROOFSTEP]\nabel\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : snorm (f N - f_lim) p μ ≤ 1\nh_add : f_lim = f_lim - f N + f N\n⊢ snorm f_lim p μ < ⊤\n[PROOFSTEP]\nrw [h_add]\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : snorm (f N - f_lim) p μ ≤ 1\nh_add : f_lim = f_lim - f N + f N\n⊢ snorm (f_lim - f N + f N) p μ < ⊤\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (snorm_add_le (h_lim_meas.sub (hf N).1) (hf N).1 hp) _\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : snorm (f N - f_lim) p μ ≤ 1\nh_add : f_lim = f_lim - f N + f N\n⊢ snorm (f_lim - f N) p μ + snorm (f N) p μ < ⊤\n[PROOFSTEP]\nrw [ENNReal.add_lt_top]\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : snorm (f N - f_lim) p μ ≤ 1\nh_add : f_lim = f_lim - f N + f N\n⊢ snorm (f_lim - f N) p μ < ⊤ ∧ snorm (f N) p μ < ⊤\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.left\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : snorm (f N - f_lim) p μ ≤ 1\nh_add : f_lim = f_lim - f N + f N\n⊢ snorm (f_lim - f N) p μ < ⊤\n[PROOFSTEP]\nrefine' lt_of_le_of_lt _ ENNReal.one_lt_top\n[GOAL]\ncase intro.left\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : snorm (f N - f_lim) p μ ≤ 1\nh_add : f_lim = f_lim - f N + f N\n⊢ snorm (f_lim - f N) p μ ≤ 1\n[PROOFSTEP]\nhave h_neg : f_lim - f N = -(f N - f_lim) := by simp\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : snorm (f N - f_lim) p μ ≤ 1\nh_add : f_lim = f_lim - f N + f N\n⊢ f_lim - f N = -(f N - f_lim)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.left\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : snorm (f N - f_lim) p μ ≤ 1\nh_add : f_lim = f_lim - f N + f N\nh_neg : f_lim - f N = -(f N - f_lim)\n⊢ snorm (f_lim - f N) p μ ≤ 1\n[PROOFSTEP]\nrwa [h_neg, snorm_neg]\n[GOAL]\ncase intro.right\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedAddCommGroup G\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nf_lim : α → E\nh_lim_meas : AEStronglyMeasurable f_lim μ\nh_tendsto : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → snorm (f n - f_lim) p μ ≤ ε\nN : ℕ\nh_tendsto_1 : snorm (f N - f_lim) p μ ≤ 1\nh_add : f_lim = f_lim - f N + f N\n⊢ snorm (f N) p μ < ⊤\n[PROOFSTEP]\nexact (hf N).2\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\n⊢ ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nobtain ⟨f_lim, h_f_lim_meas, h_lim⟩ :\n  ∃ (f_lim : α → E) (_ : StronglyMeasurable f_lim), ∀ᵐ x ∂μ, Tendsto (fun n => f n x) atTop (nhds (f_lim x))\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\n⊢ ∃ f_lim x, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\ncase intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nf_lim : α → E\nh_f_lim_meas : StronglyMeasurable f_lim\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nexact\n  exists_stronglyMeasurable_limit_of_tendsto_ae (fun n => (hf n).1)\n    (ae_tendsto_of_cauchy_snorm (fun n => (hf n).1) hp hB h_cau)\n[GOAL]\ncase intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nf_lim : α → E\nh_f_lim_meas : StronglyMeasurable f_lim\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n⊢ ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave h_tendsto' : atTop.Tendsto (fun n => snorm (f n - f_lim) p μ) (𝓝 0) :=\n  cauchy_tendsto_of_tendsto (fun m => (hf m).1) f_lim hB h_cau h_lim\n[GOAL]\ncase intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nf_lim : α → E\nh_f_lim_meas : StronglyMeasurable f_lim\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_tendsto' : Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\n⊢ ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave h_ℒp_lim : Memℒp f_lim p μ := memℒp_of_cauchy_tendsto hp hf f_lim h_f_lim_meas.aestronglyMeasurable h_tendsto'\n[GOAL]\ncase intro.intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : CompleteSpace E\nhp : 1 ≤ p\nf : ℕ → α → E\nhf : ∀ (n : ℕ), Memℒp (f n) p\nB : ℕ → ℝ≥0∞\nhB : ∑' (i : ℕ), B i ≠ ⊤\nh_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → snorm (f n - f m) p μ < B N\nf_lim : α → E\nh_f_lim_meas : StronglyMeasurable f_lim\nh_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\nh_tendsto' : Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\nh_ℒp_lim : Memℒp f_lim p\n⊢ ∃ f_lim, Memℒp f_lim p ∧ Tendsto (fun n => snorm (f n - f_lim) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nexact ⟨f_lim, h_ℒp_lim, h_tendsto'⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : TopologicalSpace α\ninst✝² : BorelSpace α\ninst✝¹ : SecondCountableTopologyEither α E\ninst✝ : IsFiniteMeasure μ\nf : α →ᵇ E\n⊢ ContinuousMap.toAEEqFun μ f.toContinuousMap ∈ Lp E p\n[PROOFSTEP]\nrefine' Lp.mem_Lp_of_ae_bound ‖f‖ _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : TopologicalSpace α\ninst✝² : BorelSpace α\ninst✝¹ : SecondCountableTopologyEither α E\ninst✝ : IsFiniteMeasure μ\nf : α →ᵇ E\n⊢ ∀ᵐ (x : α) ∂μ, ‖↑(ContinuousMap.toAEEqFun μ f.toContinuousMap) x‖ ≤ ‖f‖\n[PROOFSTEP]\nfilter_upwards [f.toContinuousMap.coeFn_toAEEqFun μ] with x _\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : TopologicalSpace α\ninst✝² : BorelSpace α\ninst✝¹ : SecondCountableTopologyEither α E\ninst✝ : IsFiniteMeasure μ\nf : α →ᵇ E\nx : α\na✝ : ↑(ContinuousMap.toAEEqFun μ f.toContinuousMap) x = ↑f.toContinuousMap x\n⊢ ‖↑(ContinuousMap.toAEEqFun μ f.toContinuousMap) x‖ ≤ ‖f‖\n[PROOFSTEP]\nconvert f.norm_coe_le_norm x using 2\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : TopologicalSpace α\ninst✝² : BorelSpace α\ninst✝¹ : SecondCountableTopologyEither α E\ninst✝ : IsFiniteMeasure μ\nf : α →ᵇ E\n⊢ ‖{ val := ContinuousMap.toAEEqFun μ f.toContinuousMap,\n        property := (_ : ContinuousMap.toAEEqFun μ f.toContinuousMap ∈ Lp E p) }‖₊ ≤\n    measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹ * ‖f‖₊\n[PROOFSTEP]\napply Lp.nnnorm_le_of_ae_bound\n[GOAL]\ncase hfC\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : TopologicalSpace α\ninst✝² : BorelSpace α\ninst✝¹ : SecondCountableTopologyEither α E\ninst✝ : IsFiniteMeasure μ\nf : α →ᵇ E\n⊢ ∀ᵐ (x : α) ∂μ,\n    ‖↑↑{ val := ContinuousMap.toAEEqFun μ f.toContinuousMap,\n                property := (_ : ContinuousMap.toAEEqFun μ f.toContinuousMap ∈ Lp E p) }\n          x‖₊ ≤\n      ‖f‖₊\n[PROOFSTEP]\nrefine' (f.toContinuousMap.coeFn_toAEEqFun μ).mono _\n[GOAL]\ncase hfC\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : TopologicalSpace α\ninst✝² : BorelSpace α\ninst✝¹ : SecondCountableTopologyEither α E\ninst✝ : IsFiniteMeasure μ\nf : α →ᵇ E\n⊢ ∀ (x : α),\n    ↑(ContinuousMap.toAEEqFun μ f.toContinuousMap) x = ↑f.toContinuousMap x →\n      ‖↑↑{ val := ContinuousMap.toAEEqFun μ f.toContinuousMap,\n                  property := (_ : ContinuousMap.toAEEqFun μ f.toContinuousMap ∈ Lp E p) }\n            x‖₊ ≤\n        ‖f‖₊\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase hfC\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : TopologicalSpace α\ninst✝² : BorelSpace α\ninst✝¹ : SecondCountableTopologyEither α E\ninst✝ : IsFiniteMeasure μ\nf : α →ᵇ E\nx : α\nhx : ↑(ContinuousMap.toAEEqFun μ f.toContinuousMap) x = ↑f.toContinuousMap x\n⊢ ‖↑↑{ val := ContinuousMap.toAEEqFun μ f.toContinuousMap,\n              property := (_ : ContinuousMap.toAEEqFun μ f.toContinuousMap ∈ Lp E p) }\n        x‖₊ ≤\n    ‖f‖₊\n[PROOFSTEP]\nrw [← NNReal.coe_le_coe, coe_nnnorm, coe_nnnorm]\n[GOAL]\ncase hfC\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : TopologicalSpace α\ninst✝² : BorelSpace α\ninst✝¹ : SecondCountableTopologyEither α E\ninst✝ : IsFiniteMeasure μ\nf : α →ᵇ E\nx : α\nhx : ↑(ContinuousMap.toAEEqFun μ f.toContinuousMap) x = ↑f.toContinuousMap x\n⊢ ‖↑↑{ val := ContinuousMap.toAEEqFun μ f.toContinuousMap,\n              property := (_ : ContinuousMap.toAEEqFun μ f.toContinuousMap ∈ Lp E p) }\n        x‖ ≤\n    ‖f‖\n[PROOFSTEP]\nconvert f.norm_coe_le_norm x using 2\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : TopologicalSpace α\ninst✝³ : BorelSpace α\ninst✝² : SecondCountableTopologyEither α E\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : Fact (1 ≤ p)\n⊢ NormedAddGroupHom.range (toLpHom p μ) = Lp.boundedContinuousFunction E p μ\n[PROOFSTEP]\nsymm\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : TopologicalSpace α\ninst✝³ : BorelSpace α\ninst✝² : SecondCountableTopologyEither α E\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : Fact (1 ≤ p)\n⊢ Lp.boundedContinuousFunction E p μ = NormedAddGroupHom.range (toLpHom p μ)\n[PROOFSTEP]\nconvert\n  AddMonoidHom.addSubgroupOf_range_eq_of_le ((ContinuousMap.toAEEqFunAddHom μ).comp (toContinuousMapAddHom α E))\n    (by rintro - ⟨f, rfl⟩; exact mem_Lp f : _ ≤ Lp E p μ)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : TopologicalSpace α\ninst✝³ : BorelSpace α\ninst✝² : SecondCountableTopologyEither α E\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : Fact (1 ≤ p)\n⊢ AddMonoidHom.range (AddMonoidHom.comp (ContinuousMap.toAEEqFunAddHom μ) (toContinuousMapAddHom α E)) ≤ Lp E p\n[PROOFSTEP]\nrintro - ⟨f, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : TopologicalSpace α\ninst✝³ : BorelSpace α\ninst✝² : SecondCountableTopologyEither α E\ninst✝¹ : IsFiniteMeasure μ\ninst✝ : Fact (1 ≤ p)\nf : α →ᵇ E\n⊢ ↑(AddMonoidHom.comp (ContinuousMap.toAEEqFunAddHom μ) (toContinuousMapAddHom α E)) f ∈ Lp E p\n[PROOFSTEP]\nexact mem_Lp f\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : BorelSpace α\ninst✝⁵ : SecondCountableTopologyEither α E\ninst✝⁴ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝³ : Fact (1 ≤ p)\nf g : α →ᵇ E\ninst✝² : Measure.IsOpenPosMeasure μ\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\n⊢ ↑(toLp p μ 𝕜) f = ↑(toLp p μ 𝕜) g ↔ f = g\n[PROOFSTEP]\nrefine' ⟨fun h => _, by tauto⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : BorelSpace α\ninst✝⁵ : SecondCountableTopologyEither α E\ninst✝⁴ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝³ : Fact (1 ≤ p)\nf g : α →ᵇ E\ninst✝² : Measure.IsOpenPosMeasure μ\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\n⊢ f = g → ↑(toLp p μ 𝕜) f = ↑(toLp p μ 𝕜) g\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : BorelSpace α\ninst✝⁵ : SecondCountableTopologyEither α E\ninst✝⁴ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝³ : Fact (1 ≤ p)\nf g : α →ᵇ E\ninst✝² : Measure.IsOpenPosMeasure μ\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\nh : ↑(toLp p μ 𝕜) f = ↑(toLp p μ 𝕜) g\n⊢ f = g\n[PROOFSTEP]\nrw [← FunLike.coe_fn_eq, ← (map_continuous f).ae_eq_iff_eq μ (map_continuous g)]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : BorelSpace α\ninst✝⁵ : SecondCountableTopologyEither α E\ninst✝⁴ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝³ : Fact (1 ≤ p)\nf g : α →ᵇ E\ninst✝² : Measure.IsOpenPosMeasure μ\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\nh : ↑(toLp p μ 𝕜) f = ↑(toLp p μ 𝕜) g\n⊢ ↑f =ᵐ[μ] ↑g\n[PROOFSTEP]\nrefine' (coeFn_toLp p μ 𝕜 f).symm.trans (EventuallyEq.trans _ <| coeFn_toLp p μ 𝕜 g)\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : BorelSpace α\ninst✝⁵ : SecondCountableTopologyEither α E\ninst✝⁴ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝³ : Fact (1 ≤ p)\nf g : α →ᵇ E\ninst✝² : Measure.IsOpenPosMeasure μ\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\nh : ↑(toLp p μ 𝕜) f = ↑(toLp p μ 𝕜) g\n⊢ ↑↑(↑(toLp p μ 𝕜) f) =ᵐ[μ] ↑↑(↑(toLp p μ 𝕜) g)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : BorelSpace α\ninst✝⁵ : SecondCountableTopologyEither α E\ninst✝⁴ : CompactSpace α\ninst✝³ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝² : Fact (1 ≤ p)\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\n⊢ Submodule.toAddSubgroup (LinearMap.range (toLp p μ 𝕜)) = Lp.boundedContinuousFunction E p μ\n[PROOFSTEP]\nrefine' SetLike.ext' _\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : BorelSpace α\ninst✝⁵ : SecondCountableTopologyEither α E\ninst✝⁴ : CompactSpace α\ninst✝³ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝² : Fact (1 ≤ p)\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\n⊢ ↑(Submodule.toAddSubgroup (LinearMap.range (toLp p μ 𝕜))) = ↑(Lp.boundedContinuousFunction E p μ)\n[PROOFSTEP]\nhave := (linearIsometryBoundedOfCompact α E 𝕜).surjective\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : BorelSpace α\ninst✝⁵ : SecondCountableTopologyEither α E\ninst✝⁴ : CompactSpace α\ninst✝³ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝² : Fact (1 ≤ p)\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\nthis : Function.Surjective ↑(linearIsometryBoundedOfCompact α E 𝕜)\n⊢ ↑(Submodule.toAddSubgroup (LinearMap.range (toLp p μ 𝕜))) = ↑(Lp.boundedContinuousFunction E p μ)\n[PROOFSTEP]\nconvert Function.Surjective.range_comp this (BoundedContinuousFunction.toLp (E := E) p μ 𝕜)\n[GOAL]\ncase h.e'_3\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : BorelSpace α\ninst✝⁵ : SecondCountableTopologyEither α E\ninst✝⁴ : CompactSpace α\ninst✝³ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝² : Fact (1 ≤ p)\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\nthis : Function.Surjective ↑(linearIsometryBoundedOfCompact α E 𝕜)\n⊢ ↑(Lp.boundedContinuousFunction E p μ) = Set.range ↑(BoundedContinuousFunction.toLp p μ 𝕜)\n[PROOFSTEP]\nrw [← BoundedContinuousFunction.range_toLp p μ (𝕜 := 𝕜)]\n[GOAL]\ncase h.e'_3\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : BorelSpace α\ninst✝⁵ : SecondCountableTopologyEither α E\ninst✝⁴ : CompactSpace α\ninst✝³ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝² : Fact (1 ≤ p)\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\nthis : Function.Surjective ↑(linearIsometryBoundedOfCompact α E 𝕜)\n⊢ ↑(Submodule.toAddSubgroup (LinearMap.range (BoundedContinuousFunction.toLp p μ 𝕜))) =\n    Set.range ↑(BoundedContinuousFunction.toLp p μ 𝕜)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : TopologicalSpace α\ninst✝⁷ : BorelSpace α\ninst✝⁶ : SecondCountableTopologyEither α E\ninst✝⁵ : CompactSpace α\ninst✝⁴ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝³ : Fact (1 ≤ p)\nβ : Type u_6\ninst✝² : Measure.IsOpenPosMeasure μ\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\ng : β → C(α, E)\nf : C(α, E)\nhg : Summable g\nhg2 : HasSum (↑(toLp p μ 𝕜) ∘ g) (↑(toLp p μ 𝕜) f)\n⊢ HasSum g f\n[PROOFSTEP]\nconvert Summable.hasSum hg\n[GOAL]\ncase h.e'_6\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : TopologicalSpace α\ninst✝⁷ : BorelSpace α\ninst✝⁶ : SecondCountableTopologyEither α E\ninst✝⁵ : CompactSpace α\ninst✝⁴ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝³ : Fact (1 ≤ p)\nβ : Type u_6\ninst✝² : Measure.IsOpenPosMeasure μ\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\ng : β → C(α, E)\nf : C(α, E)\nhg : Summable g\nhg2 : HasSum (↑(toLp p μ 𝕜) ∘ g) (↑(toLp p μ 𝕜) f)\n⊢ f = ∑' (b : β), g b\n[PROOFSTEP]\nexact toLp_injective μ (hg2.unique ((toLp p μ 𝕜).hasSum <| Summable.hasSum hg))\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : BorelSpace α\ninst✝⁵ : SecondCountableTopologyEither α E\ninst✝⁴ : CompactSpace α\ninst✝³ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝² : Fact (1 ≤ p)\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\n⊢ ‖toLp p μ 𝕜‖ ≤ ↑(measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹)\n[PROOFSTEP]\nrw [toLp_norm_eq_toLp_norm_coe]\n[GOAL]\nα : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nm m0 : MeasurableSpace α\np : ℝ≥0∞\nq : ℝ\nμ ν : Measure α\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : BorelSpace α\ninst✝⁵ : SecondCountableTopologyEither α E\ninst✝⁴ : CompactSpace α\ninst✝³ : IsFiniteMeasure μ\n𝕜 : Type u_5\ninst✝² : Fact (1 ≤ p)\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : NormedSpace 𝕜 E\n⊢ ‖BoundedContinuousFunction.toLp p μ 𝕜‖ ≤ ↑(measureUnivNNReal μ ^ (ENNReal.toReal p)⁻¹)\n[PROOFSTEP]\nexact BoundedContinuousFunction.toLp_norm_le μ\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.LpSpace", "llama_tokens": 179734, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7279754371026367, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.3810371573053351}}
{"text": "[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : Fintype o\nα : m → n → Type v\nM N : DMatrix m n α\nh : M = N\n⊢ ∀ (i : m) (j : n), M i j = N i j\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : Fintype o\nα : m → n → Type v\nM : DMatrix m n α\nβ : m → n → Type w\nγ : m → n → Type z\nf : ⦃i : m⦄ → ⦃j : n⦄ → α i j → β i j\ng : ⦃i : m⦄ → ⦃j : n⦄ → β i j → γ i j\n⊢ map (map M f) g = map M fun i j x => g (f x)\n[PROOFSTEP]\next\n[GOAL]\ncase a\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : Fintype o\nα : m → n → Type v\nM : DMatrix m n α\nβ : m → n → Type w\nγ : m → n → Type z\nf : ⦃i : m⦄ → ⦃j : n⦄ → α i j → β i j\ng : ⦃i : m⦄ → ⦃j : n⦄ → β i j → γ i j\ni✝ : m\nj✝ : n\n⊢ map (map M f) g i✝ j✝ = map M (fun i j x => g (f x)) i✝ j✝\n[PROOFSTEP]\nsimp\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : Fintype o\nα : m → n → Type v\ninst✝ : ∀ (i : m) (j : n), Subsingleton (α i j)\n⊢ Subsingleton (DMatrix m n α)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : Fintype o\nα : m → n → Type v\ninst✝ : ∀ (i : m) (j : n), Subsingleton (α i j)\n⊢ ∀ (a b : DMatrix m n α), a = b\n[PROOFSTEP]\nsimp only [DMatrix, eq_iff_true_of_subsingleton, implies_true]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\nα : m → n → Type v\ninst✝¹ : (i : m) → (j : n) → Zero (α i j)\nβ : m → n → Type w\ninst✝ : (i : m) → (j : n) → Zero (β i j)\nf : ⦃i : m⦄ → ⦃j : n⦄ → α i j → β i j\nh : ∀ (i : m) (j : n), f 0 = 0\n⊢ map 0 f = 0\n[PROOFSTEP]\next\n[GOAL]\ncase a\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\nα : m → n → Type v\ninst✝¹ : (i : m) → (j : n) → Zero (α i j)\nβ : m → n → Type w\ninst✝ : (i : m) → (j : n) → Zero (β i j)\nf : ⦃i : m⦄ → ⦃j : n⦄ → α i j → β i j\nh : ∀ (i : m) (j : n), f 0 = 0\ni✝ : m\nj✝ : n\n⊢ map 0 f i✝ j✝ = OfNat.ofNat 0 i✝ j✝\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\nα : m → n → Type v\ninst✝¹ : (i : m) → (j : n) → AddMonoid (α i j)\nβ : m → n → Type w\ninst✝ : (i : m) → (j : n) → AddMonoid (β i j)\nf : ⦃i : m⦄ → ⦃j : n⦄ → α i j →+ β i j\nM N : DMatrix m n α\n⊢ (map (M + N) fun i j => ↑f) = (map M fun i j => ↑f) + map N fun i j => ↑f\n[PROOFSTEP]\next\n[GOAL]\ncase a\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\nα : m → n → Type v\ninst✝¹ : (i : m) → (j : n) → AddMonoid (α i j)\nβ : m → n → Type w\ninst✝ : (i : m) → (j : n) → AddMonoid (β i j)\nf : ⦃i : m⦄ → ⦃j : n⦄ → α i j →+ β i j\nM N : DMatrix m n α\ni✝ : m\nj✝ : n\n⊢ map (M + N) (fun i j => ↑f) i✝ j✝ = ((map M fun i j => ↑f) + map N fun i j => ↑f) i✝ j✝\n[PROOFSTEP]\nsimp\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\nα : m → n → Type v\ninst✝¹ : (i : m) → (j : n) → AddGroup (α i j)\nβ : m → n → Type w\ninst✝ : (i : m) → (j : n) → AddGroup (β i j)\nf : ⦃i : m⦄ → ⦃j : n⦄ → α i j →+ β i j\nM N : DMatrix m n α\n⊢ (map (M - N) fun i j => ↑f) = (map M fun i j => ↑f) - map N fun i j => ↑f\n[PROOFSTEP]\next\n[GOAL]\ncase a\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\nα : m → n → Type v\ninst✝¹ : (i : m) → (j : n) → AddGroup (α i j)\nβ : m → n → Type w\ninst✝ : (i : m) → (j : n) → AddGroup (β i j)\nf : ⦃i : m⦄ → ⦃j : n⦄ → α i j →+ β i j\nM N : DMatrix m n α\ni✝ : m\nj✝ : n\n⊢ map (M - N) (fun i j => ↑f) i✝ j✝ = ((map M fun i j => ↑f) - map N fun i j => ↑f) i✝ j✝\n[PROOFSTEP]\nsimp\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : Fintype o\nα : m → n → Type v\ninst✝ : IsEmpty m\nM N : DMatrix m n α\n⊢ M = N\n[PROOFSTEP]\next i\n[GOAL]\ncase a\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : Fintype o\nα : m → n → Type v\ninst✝ : IsEmpty m\nM N : DMatrix m n α\ni : m\nj✝ : n\n⊢ M i j✝ = N i j✝\n[PROOFSTEP]\nexact isEmptyElim i\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : Fintype o\nα : m → n → Type v\ninst✝ : IsEmpty n\nM N : DMatrix m n α\n⊢ M = N\n[PROOFSTEP]\next i j\n[GOAL]\ncase a\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : Fintype o\nα : m → n → Type v\ninst✝ : IsEmpty n\nM N : DMatrix m n α\ni : m\nj : n\n⊢ M i j = N i j\n[PROOFSTEP]\nexact isEmptyElim j\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\nα : m → n → Type v\ninst✝¹ : (i : m) → (j : n) → AddMonoid (α i j)\nβ : m → n → Type w\ninst✝ : (i : m) → (j : n) → AddMonoid (β i j)\nf : ⦃i : m⦄ → ⦃j : n⦄ → α i j →+ β i j\n⊢ (fun M => DMatrix.map M fun i j => ↑f) 0 = 0\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Matrix.DMatrix", "llama_tokens": 3123, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6297746074044134, "lm_q2_score": 0.6039318337259583, "lm_q1q2_score": 0.38034093348379283}}
{"text": "[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\n⊢ degree (succNthDefiningPoly p n a₁ a₂ bs) = ↑p\n[PROOFSTEP]\nhave : (X ^ p * C (a₁.coeff 0 ^ p ^ (n + 1))).degree = (p : WithBot ℕ) :=\n  by\n  rw [degree_mul, degree_C]\n  · simp only [Nat.cast_withBot, add_zero, degree_X, degree_pow, Nat.smul_one_eq_coe]\n  · exact pow_ne_zero _ ha₁\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\n⊢ degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1))) = ↑p\n[PROOFSTEP]\nrw [degree_mul, degree_C]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\n⊢ degree (X ^ p) + 0 = ↑p\n[PROOFSTEP]\nsimp only [Nat.cast_withBot, add_zero, degree_X, degree_pow, Nat.smul_one_eq_coe]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\n⊢ coeff a₁ 0 ^ p ^ (n + 1) ≠ 0\n[PROOFSTEP]\nexact pow_ne_zero _ ha₁\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nthis : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1))) = ↑p\n⊢ degree (succNthDefiningPoly p n a₁ a₂ bs) = ↑p\n[PROOFSTEP]\nhave : (X ^ p * C (a₁.coeff 0 ^ p ^ (n + 1)) - X * C (a₂.coeff 0 ^ p ^ (n + 1))).degree = (p : WithBot ℕ) :=\n  by\n  rw [degree_sub_eq_left_of_degree_lt, this]\n  rw [this, degree_mul, degree_C, degree_X, add_zero]\n  · exact_mod_cast hp.out.one_lt\n  · exact pow_ne_zero _ ha₂\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nthis : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1))) = ↑p\n⊢ degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1)) - X * ↑C (coeff a₂ 0 ^ p ^ (n + 1))) = ↑p\n[PROOFSTEP]\nrw [degree_sub_eq_left_of_degree_lt, this]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nthis : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1))) = ↑p\n⊢ degree (X * ↑C (coeff a₂ 0 ^ p ^ (n + 1))) < degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1)))\n[PROOFSTEP]\nrw [this, degree_mul, degree_C, degree_X, add_zero]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nthis : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1))) = ↑p\n⊢ 1 < ↑p\n[PROOFSTEP]\nexact_mod_cast hp.out.one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nthis : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1))) = ↑p\n⊢ coeff a₂ 0 ^ p ^ (n + 1) ≠ 0\n[PROOFSTEP]\nexact pow_ne_zero _ ha₂\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nthis✝ : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1))) = ↑p\nthis : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1)) - X * ↑C (coeff a₂ 0 ^ p ^ (n + 1))) = ↑p\n⊢ degree (succNthDefiningPoly p n a₁ a₂ bs) = ↑p\n[PROOFSTEP]\nrw [succNthDefiningPoly, degree_add_eq_left_of_degree_lt, this]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nthis✝ : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1))) = ↑p\nthis : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1)) - X * ↑C (coeff a₂ 0 ^ p ^ (n + 1))) = ↑p\n⊢ degree\n      (↑C\n        (coeff a₁ (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) + nthRemainder p n (fun v => bs v ^ p) (truncateFun (n + 1) a₁) -\n            coeff a₂ (n + 1) * bs 0 ^ p ^ (n + 1) -\n          nthRemainder p n bs (truncateFun (n + 1) a₂))) <\n    degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1)) - X * ↑C (coeff a₂ 0 ^ p ^ (n + 1)))\n[PROOFSTEP]\napply lt_of_le_of_lt degree_C_le\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nthis✝ : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1))) = ↑p\nthis : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1)) - X * ↑C (coeff a₂ 0 ^ p ^ (n + 1))) = ↑p\n⊢ 0 < degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1)) - X * ↑C (coeff a₂ 0 ^ p ^ (n + 1)))\n[PROOFSTEP]\nrw [this]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : CommRing k\ninst✝¹ : CharP k p\ninst✝ : IsDomain k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nthis✝ : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1))) = ↑p\nthis : degree (X ^ p * ↑C (coeff a₁ 0 ^ p ^ (n + 1)) - X * ↑C (coeff a₂ 0 ^ p ^ (n + 1))) = ↑p\n⊢ 0 < ↑p\n[PROOFSTEP]\nexact_mod_cast hp.out.pos\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\n⊢ Polynomial.degree (succNthDefiningPoly p n a₁ a₂ bs) ≠ 0\n[PROOFSTEP]\nsimp only [succNthDefiningPoly_degree p n a₁ a₂ bs ha₁ ha₂, ne_eq, Nat.cast_eq_zero, hp.out.ne_zero, not_false_eq_true]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\n⊢ succNthVal p n a₁ a₂ bs ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) + coeff a₁ (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) +\n      nthRemainder p n (fun v => bs v ^ p) (truncateFun (n + 1) a₁) =\n    succNthVal p n a₁ a₂ bs ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) + coeff a₂ (n + 1) * bs 0 ^ p ^ (n + 1) +\n      nthRemainder p n bs (truncateFun (n + 1) a₂)\n[PROOFSTEP]\nrw [← sub_eq_zero]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\n⊢ succNthVal p n a₁ a₂ bs ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) + coeff a₁ (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) +\n        nthRemainder p n (fun v => bs v ^ p) (truncateFun (n + 1) a₁) -\n      (succNthVal p n a₁ a₂ bs ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) + coeff a₂ (n + 1) * bs 0 ^ p ^ (n + 1) +\n        nthRemainder p n bs (truncateFun (n + 1) a₂)) =\n    0\n[PROOFSTEP]\nhave := succNthVal_spec p n a₁ a₂ bs ha₁ ha₂\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nthis : Polynomial.IsRoot (succNthDefiningPoly p n a₁ a₂ bs) (succNthVal p n a₁ a₂ bs ha₁ ha₂)\n⊢ succNthVal p n a₁ a₂ bs ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) + coeff a₁ (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) +\n        nthRemainder p n (fun v => bs v ^ p) (truncateFun (n + 1) a₁) -\n      (succNthVal p n a₁ a₂ bs ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) + coeff a₂ (n + 1) * bs 0 ^ p ^ (n + 1) +\n        nthRemainder p n bs (truncateFun (n + 1) a₂)) =\n    0\n[PROOFSTEP]\nsimp only [Polynomial.map_add, Polynomial.eval_X, Polynomial.map_pow, Polynomial.eval_C, Polynomial.eval_pow,\n  succNthDefiningPoly, Polynomial.eval_mul, Polynomial.eval_add, Polynomial.eval_sub, Polynomial.map_mul,\n  Polynomial.map_sub, Polynomial.IsRoot.def] at this \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nthis :\n  succNthVal p n a₁ a₂ bs ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) -\n        succNthVal p n a₁ a₂ bs ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) +\n      (coeff a₁ (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) + nthRemainder p n (fun v => bs v ^ p) (truncateFun (n + 1) a₁) -\n          coeff a₂ (n + 1) * bs 0 ^ p ^ (n + 1) -\n        nthRemainder p n bs (truncateFun (n + 1) a₂)) =\n    0\n⊢ succNthVal p n a₁ a₂ bs ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) + coeff a₁ (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) +\n        nthRemainder p n (fun v => bs v ^ p) (truncateFun (n + 1) a₁) -\n      (succNthVal p n a₁ a₂ bs ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) + coeff a₂ (n + 1) * bs 0 ^ p ^ (n + 1) +\n        nthRemainder p n bs (truncateFun (n + 1) a₂)) =\n    0\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nn : ℕ\na₁ a₂ : 𝕎 k\nbs : Fin (n + 1) → k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nthis :\n  succNthVal p n a₁ a₂ bs ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) -\n        succNthVal p n a₁ a₂ bs ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) +\n      (coeff a₁ (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) + nthRemainder p n (fun v => bs v ^ p) (truncateFun (n + 1) a₁) -\n          coeff a₂ (n + 1) * bs 0 ^ p ^ (n + 1) -\n        nthRemainder p n bs (truncateFun (n + 1) a₂)) =\n    0\n⊢ succNthVal p n a₁ a₂ bs ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) + coeff a₁ (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) +\n        nthRemainder p n (fun v => bs v ^ p) (truncateFun (n + 1) a₁) -\n      (succNthVal p n a₁ a₂ bs ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) + coeff a₂ (n + 1) * bs 0 ^ p ^ (n + 1) +\n        nthRemainder p n bs (truncateFun (n + 1) a₂)) =\n    succNthVal p n a₁ a₂ bs ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) -\n        succNthVal p n a₁ a₂ bs ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) +\n      (coeff a₁ (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) + nthRemainder p n (fun v => bs v ^ p) (truncateFun (n + 1) a₁) -\n          coeff a₂ (n + 1) * bs 0 ^ p ^ (n + 1) -\n        nthRemainder p n bs (truncateFun (n + 1) a₂))\n[PROOFSTEP]\nring\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\n⊢ solution p a₁ a₂ ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nh : solution p a₁ a₂ = 0\n⊢ False\n[PROOFSTEP]\nhave := solution_spec p a₁ a₂\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nh : solution p a₁ a₂ = 0\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\n⊢ False\n[PROOFSTEP]\nrw [h, zero_pow] at this \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nh : solution p a₁ a₂ = 0\nthis : 0 = coeff a₂ 0 / coeff a₁ 0\n⊢ False\n[PROOFSTEP]\nsimpa [ha₁, ha₂] using _root_.div_eq_zero_iff.mp this.symm\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nh : solution p a₁ a₂ = 0\nthis : 0 ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\n⊢ 0 < p - 1\n[PROOFSTEP]\nexact tsub_pos_of_lt hp.out.one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\n⊢ solution p a₁ a₂ ^ p * coeff a₁ 0 = solution p a₁ a₂ * coeff a₂ 0\n[PROOFSTEP]\nhave := solution_spec p a₁ a₂\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\n⊢ solution p a₁ a₂ ^ p * coeff a₁ 0 = solution p a₁ a₂ * coeff a₂ 0\n[PROOFSTEP]\ncases' Nat.exists_eq_succ_of_ne_zero hp.out.ne_zero with q hq\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\n⊢ solution p a₁ a₂ ^ p * coeff a₁ 0 = solution p a₁ a₂ * coeff a₂ 0\n[PROOFSTEP]\nhave hq' : q = p - 1 := by simp only [hq, tsub_zero, Nat.succ_sub_succ_eq_sub]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\n⊢ q = p - 1\n[PROOFSTEP]\nsimp only [hq, tsub_zero, Nat.succ_sub_succ_eq_sub]\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n⊢ solution p a₁ a₂ ^ p * coeff a₁ 0 = solution p a₁ a₂ * coeff a₂ 0\n[PROOFSTEP]\nconv_lhs =>\n  congr\n  congr\n  ·skip\n  ·rw [hq]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| solution p a₁ a₂ ^ p * coeff a₁ 0\n[PROOFSTEP]\n  congr\n  congr\n  ·skip\n  ·rw [hq]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| solution p a₁ a₂ ^ p * coeff a₁ 0\n[PROOFSTEP]\n  congr\n  congr\n  ·skip\n  ·rw [hq]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| solution p a₁ a₂ ^ p * coeff a₁ 0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| solution p a₁ a₂ ^ p\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| coeff a₁ 0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| solution p a₁ a₂\ncase a.a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| p\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| coeff a₁ 0\n[PROOFSTEP]\n·skip\n[GOAL]\ncase a.a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| solution p a₁ a₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| solution p a₁ a₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| solution p a₁ a₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase a.a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| p\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| coeff a₁ 0\n[PROOFSTEP]\n·rw [hq]\n[GOAL]\ncase a.a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| p\n[PROOFSTEP]\nrw [hq]\n[GOAL]\ncase a.a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| p\n[PROOFSTEP]\nrw [hq]\n[GOAL]\ncase a.a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n| p\n[PROOFSTEP]\nrw [hq]\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n⊢ solution p a₁ a₂ ^ Nat.succ q * coeff a₁ 0 = solution p a₁ a₂ * coeff a₂ 0\n[PROOFSTEP]\nrw [pow_succ', hq', this]\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝¹ : Field k\ninst✝ : IsAlgClosed k\na₁ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\na₂ : 𝕎 k\nthis : solution p a₁ a₂ ^ (p - 1) = coeff a₂ 0 / coeff a₁ 0\nq : ℕ\nhq : p = Nat.succ q\nhq' : q = p - 1\n⊢ coeff a₂ 0 / coeff a₁ 0 * solution p a₁ a₂ * coeff a₁ 0 = solution p a₁ a₂ * coeff a₂ 0\n[PROOFSTEP]\nfield_simp [ha₁, mul_comm]\n[GOAL]\nn : ℕ\ni : Fin (n + 1)\n⊢ (invImage (fun a => sizeOf a) instWellFoundedRelation).1 (↑i) (Nat.succ n)\n[PROOFSTEP]\napply Fin.is_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\n⊢ frobeniusRotation p ha₁ ha₂ ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nh : frobeniusRotation p ha₁ ha₂ = 0\n⊢ False\n[PROOFSTEP]\napply solution_nonzero p ha₁ ha₂\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nh : frobeniusRotation p ha₁ ha₂ = 0\n⊢ solution p a₁ a₂ = 0\n[PROOFSTEP]\nsimpa [← h, frobeniusRotation, frobeniusRotationCoeff] using WittVector.zero_coeff p k 0\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\n⊢ ↑frobenius (frobeniusRotation p ha₁ ha₂) * a₁ = frobeniusRotation p ha₁ ha₂ * a₂\n[PROOFSTEP]\next n\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nn : ℕ\n⊢ coeff (↑frobenius (frobeniusRotation p ha₁ ha₂) * a₁) n = coeff (frobeniusRotation p ha₁ ha₂ * a₂) n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase h.zero\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\n⊢ coeff (↑frobenius (frobeniusRotation p ha₁ ha₂) * a₁) Nat.zero = coeff (frobeniusRotation p ha₁ ha₂ * a₂) Nat.zero\n[PROOFSTEP]\nsimp only [WittVector.mul_coeff_zero, WittVector.coeff_frobenius_charP, frobeniusRotation, frobeniusRotationCoeff,\n  Nat.zero_eq]\n[GOAL]\ncase h.zero\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\n⊢ coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) 0 ^ p * coeff a₁ 0 =\n    coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) 0 * coeff a₂ 0\n[PROOFSTEP]\napply solution_spec' _ ha₁\n[GOAL]\ncase h.succ\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nn : ℕ\n⊢ coeff (↑frobenius (frobeniusRotation p ha₁ ha₂) * a₁) (Nat.succ n) =\n    coeff (frobeniusRotation p ha₁ ha₂ * a₂) (Nat.succ n)\n[PROOFSTEP]\nsimp only [nthRemainder_spec, WittVector.coeff_frobenius_charP, frobeniusRotationCoeff, frobeniusRotation]\n[GOAL]\ncase h.succ\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nn : ℕ\n⊢ coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) (n + 1) ^ p * coeff a₁ 0 ^ p ^ (n + 1) +\n        coeff a₁ (n + 1) * (coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) 0 ^ p) ^ p ^ (n + 1) +\n      nthRemainder p n (truncateFun (n + 1) (↑frobenius (mk p (frobeniusRotationCoeff p ha₁ ha₂))))\n        (truncateFun (n + 1) a₁) =\n    coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) (n + 1) * coeff a₂ 0 ^ p ^ (n + 1) +\n        coeff a₂ (n + 1) * coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) 0 ^ p ^ (n + 1) +\n      nthRemainder p n (truncateFun (n + 1) (mk p (frobeniusRotationCoeff p ha₁ ha₂))) (truncateFun (n + 1) a₂)\n[PROOFSTEP]\nhave := succNthVal_spec' p n a₁ a₂ (fun i : Fin (n + 1) => frobeniusRotationCoeff p ha₁ ha₂ i.val) ha₁ ha₂\n[GOAL]\ncase h.succ\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nn : ℕ\nthis :\n  succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) +\n        coeff a₁ (n + 1) * (frobeniusRotationCoeff p ha₁ ha₂ ↑0 ^ p) ^ p ^ (n + 1) +\n      nthRemainder p n (fun v => frobeniusRotationCoeff p ha₁ ha₂ ↑v ^ p) (truncateFun (n + 1) a₁) =\n    succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) +\n        coeff a₂ (n + 1) * frobeniusRotationCoeff p ha₁ ha₂ ↑0 ^ p ^ (n + 1) +\n      nthRemainder p n (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) (truncateFun (n + 1) a₂)\n⊢ coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) (n + 1) ^ p * coeff a₁ 0 ^ p ^ (n + 1) +\n        coeff a₁ (n + 1) * (coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) 0 ^ p) ^ p ^ (n + 1) +\n      nthRemainder p n (truncateFun (n + 1) (↑frobenius (mk p (frobeniusRotationCoeff p ha₁ ha₂))))\n        (truncateFun (n + 1) a₁) =\n    coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) (n + 1) * coeff a₂ 0 ^ p ^ (n + 1) +\n        coeff a₂ (n + 1) * coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) 0 ^ p ^ (n + 1) +\n      nthRemainder p n (truncateFun (n + 1) (mk p (frobeniusRotationCoeff p ha₁ ha₂))) (truncateFun (n + 1) a₂)\n[PROOFSTEP]\nsimp only [frobeniusRotationCoeff, Fin.val_zero] at this \n[GOAL]\ncase h.succ\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nn : ℕ\nthis :\n  succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) +\n        coeff a₁ (n + 1) * (solution p a₁ a₂ ^ p) ^ p ^ (n + 1) +\n      nthRemainder p n (fun v => frobeniusRotationCoeff p ha₁ ha₂ ↑v ^ p) (truncateFun (n + 1) a₁) =\n    succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) +\n        coeff a₂ (n + 1) * solution p a₁ a₂ ^ p ^ (n + 1) +\n      nthRemainder p n (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) (truncateFun (n + 1) a₂)\n⊢ coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) (n + 1) ^ p * coeff a₁ 0 ^ p ^ (n + 1) +\n        coeff a₁ (n + 1) * (coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) 0 ^ p) ^ p ^ (n + 1) +\n      nthRemainder p n (truncateFun (n + 1) (↑frobenius (mk p (frobeniusRotationCoeff p ha₁ ha₂))))\n        (truncateFun (n + 1) a₁) =\n    coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) (n + 1) * coeff a₂ 0 ^ p ^ (n + 1) +\n        coeff a₂ (n + 1) * coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) 0 ^ p ^ (n + 1) +\n      nthRemainder p n (truncateFun (n + 1) (mk p (frobeniusRotationCoeff p ha₁ ha₂))) (truncateFun (n + 1) a₂)\n[PROOFSTEP]\nconvert this using 3\n[GOAL]\ncase h.e'_2.h.e'_6.h.e'_7\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nn : ℕ\nthis :\n  succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) +\n        coeff a₁ (n + 1) * (solution p a₁ a₂ ^ p) ^ p ^ (n + 1) +\n      nthRemainder p n (fun v => frobeniusRotationCoeff p ha₁ ha₂ ↑v ^ p) (truncateFun (n + 1) a₁) =\n    succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) +\n        coeff a₂ (n + 1) * solution p a₁ a₂ ^ p ^ (n + 1) +\n      nthRemainder p n (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) (truncateFun (n + 1) a₂)\n⊢ truncateFun (n + 1) (↑frobenius (mk p (frobeniusRotationCoeff p ha₁ ha₂))) = fun v =>\n    frobeniusRotationCoeff p ha₁ ha₂ ↑v ^ p\n[PROOFSTEP]\napply TruncatedWittVector.ext\n[GOAL]\ncase h.e'_2.h.e'_6.h.e'_7.h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nn : ℕ\nthis :\n  succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) +\n        coeff a₁ (n + 1) * (solution p a₁ a₂ ^ p) ^ p ^ (n + 1) +\n      nthRemainder p n (fun v => frobeniusRotationCoeff p ha₁ ha₂ ↑v ^ p) (truncateFun (n + 1) a₁) =\n    succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) +\n        coeff a₂ (n + 1) * solution p a₁ a₂ ^ p ^ (n + 1) +\n      nthRemainder p n (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) (truncateFun (n + 1) a₂)\n⊢ ∀ (i : Fin (n + 1)),\n    TruncatedWittVector.coeff i (truncateFun (n + 1) (↑frobenius (mk p (frobeniusRotationCoeff p ha₁ ha₂)))) =\n      TruncatedWittVector.coeff i fun v => frobeniusRotationCoeff p ha₁ ha₂ ↑v ^ p\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.e'_2.h.e'_6.h.e'_7.h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nn : ℕ\nthis :\n  succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) +\n        coeff a₁ (n + 1) * (solution p a₁ a₂ ^ p) ^ p ^ (n + 1) +\n      nthRemainder p n (fun v => frobeniusRotationCoeff p ha₁ ha₂ ↑v ^ p) (truncateFun (n + 1) a₁) =\n    succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) +\n        coeff a₂ (n + 1) * solution p a₁ a₂ ^ p ^ (n + 1) +\n      nthRemainder p n (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) (truncateFun (n + 1) a₂)\ni : Fin (n + 1)\n⊢ TruncatedWittVector.coeff i (truncateFun (n + 1) (↑frobenius (mk p (frobeniusRotationCoeff p ha₁ ha₂)))) =\n    TruncatedWittVector.coeff i fun v => frobeniusRotationCoeff p ha₁ ha₂ ↑v ^ p\n[PROOFSTEP]\nsimp only [WittVector.coeff_truncateFun, WittVector.coeff_frobenius_charP]\n[GOAL]\ncase h.e'_2.h.e'_6.h.e'_7.h\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na₁ a₂ : 𝕎 k\nha₁ : coeff a₁ 0 ≠ 0\nha₂ : coeff a₂ 0 ≠ 0\nn : ℕ\nthis :\n  succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) ha₁ ha₂ ^ p * coeff a₁ 0 ^ p ^ (n + 1) +\n        coeff a₁ (n + 1) * (solution p a₁ a₂ ^ p) ^ p ^ (n + 1) +\n      nthRemainder p n (fun v => frobeniusRotationCoeff p ha₁ ha₂ ↑v ^ p) (truncateFun (n + 1) a₁) =\n    succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) ha₁ ha₂ * coeff a₂ 0 ^ p ^ (n + 1) +\n        coeff a₂ (n + 1) * solution p a₁ a₂ ^ p ^ (n + 1) +\n      nthRemainder p n (fun i => frobeniusRotationCoeff p ha₁ ha₂ ↑i) (truncateFun (n + 1) a₂)\ni : Fin (n + 1)\n⊢ coeff (mk p (frobeniusRotationCoeff p ha₁ ha₂)) ↑i ^ p =\n    TruncatedWittVector.coeff i fun v => frobeniusRotationCoeff p ha₁ ha₂ ↑v ^ p\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\n⊢ let b := frobeniusRotation p hr' hq';\n  ↑φ (↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b) *\n      Localization.mk (↑p ^ m * r') { val := ↑p ^ n * q', property := hq } =\n    ↑p ^ (↑m - ↑n) * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b\n[PROOFSTEP]\nintro b\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\n⊢ ↑φ (↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b) *\n      Localization.mk (↑p ^ m * r') { val := ↑p ^ n * q', property := hq } =\n    ↑p ^ (↑m - ↑n) * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b\n[PROOFSTEP]\nhave key : WittVector.frobenius b * (p : 𝕎 k) ^ m * r' * (p : 𝕎 k) ^ n = (p : 𝕎 k) ^ m * b * ((p : 𝕎 k) ^ n * q') :=\n  by\n  have H := congr_arg (fun x : 𝕎 k => x * (p : 𝕎 k) ^ m * (p : 𝕎 k) ^ n) (frobenius_frobeniusRotation p hr' hq')\n  dsimp at H \n  refine' (Eq.trans _ H).trans _ <;> ring\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\n⊢ ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\n[PROOFSTEP]\nhave H := congr_arg (fun x : 𝕎 k => x * (p : 𝕎 k) ^ m * (p : 𝕎 k) ^ n) (frobenius_frobeniusRotation p hr' hq')\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nH :\n  (fun x => x * ↑p ^ m * ↑p ^ n) (↑frobenius (frobeniusRotation p hr' hq') * r') =\n    (fun x => x * ↑p ^ m * ↑p ^ n) (frobeniusRotation p hr' hq' * q')\n⊢ ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\n[PROOFSTEP]\ndsimp at H \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nH : ↑frobenius (frobeniusRotation p hr' hq') * r' * ↑p ^ m * ↑p ^ n = frobeniusRotation p hr' hq' * q' * ↑p ^ m * ↑p ^ n\n⊢ ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\n[PROOFSTEP]\nrefine' (Eq.trans _ H).trans _\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nH : ↑frobenius (frobeniusRotation p hr' hq') * r' * ↑p ^ m * ↑p ^ n = frobeniusRotation p hr' hq' * q' * ↑p ^ m * ↑p ^ n\n⊢ ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑frobenius (frobeniusRotation p hr' hq') * r' * ↑p ^ m * ↑p ^ n\n[PROOFSTEP]\nring\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nH : ↑frobenius (frobeniusRotation p hr' hq') * r' * ↑p ^ m * ↑p ^ n = frobeniusRotation p hr' hq' * q' * ↑p ^ m * ↑p ^ n\n⊢ frobeniusRotation p hr' hq' * q' * ↑p ^ m * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\n[PROOFSTEP]\nring\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nkey : ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\n⊢ ↑φ (↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b) *\n      Localization.mk (↑p ^ m * r') { val := ↑p ^ n * q', property := hq } =\n    ↑p ^ (↑m - ↑n) * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b\n[PROOFSTEP]\nhave hq'' : algebraMap (𝕎 k) (FractionRing (𝕎 k)) q' ≠ 0 :=\n  by\n  have hq''' : q' ≠ 0 := fun h => hq' (by simp [h])\n  simpa only [Ne.def, map_zero] using (IsFractionRing.injective (𝕎 k) (FractionRing (𝕎 k))).ne hq'''\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nkey : ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\n⊢ ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) q' ≠ 0\n[PROOFSTEP]\nhave hq''' : q' ≠ 0 := fun h => hq' (by simp [h])\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nkey : ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\nh : q' = 0\n⊢ coeff q' 0 = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nkey : ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\nhq''' : q' ≠ 0\n⊢ ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) q' ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, map_zero] using (IsFractionRing.injective (𝕎 k) (FractionRing (𝕎 k))).ne hq'''\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nkey : ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\nhq'' : ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) q' ≠ 0\n⊢ ↑φ (↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b) *\n      Localization.mk (↑p ^ m * r') { val := ↑p ^ n * q', property := hq } =\n    ↑p ^ (↑m - ↑n) * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b\n[PROOFSTEP]\nrw [zpow_sub₀ (FractionRing.p_nonzero p k)]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nkey : ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\nhq'' : ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) q' ≠ 0\n⊢ ↑φ (↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b) *\n      Localization.mk (↑p ^ m * r') { val := ↑p ^ n * q', property := hq } =\n    ↑p ^ ↑m / ↑p ^ ↑n * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b\n[PROOFSTEP]\nfield_simp [FractionRing.p_nonzero p k]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nkey : ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\nhq'' : ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) q' ≠ 0\n⊢ ↑φ (↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) (frobeniusRotation p hr' hq')) *\n        (↑p ^ m * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) r') *\n      ↑p ^ n =\n    ↑p ^ m * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) (frobeniusRotation p hr' hq') *\n      (↑p ^ n * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) q')\n[PROOFSTEP]\nsimp only [IsFractionRing.fieldEquivOfRingEquiv, IsLocalization.ringEquivOfRingEquiv_eq, RingEquiv.coe_ofBijective]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nkey : ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\nhq'' : ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) q' ≠ 0\n⊢ ↑(algebraMap (𝕎 k) (Localization (nonZeroDivisors (𝕎 k)))) (↑(frobeniusEquiv p k) (frobeniusRotation p hr' hq')) *\n        (↑p ^ m * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) r') *\n      ↑p ^ n =\n    ↑p ^ m * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) (frobeniusRotation p hr' hq') *\n      (↑p ^ n * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) q')\n[PROOFSTEP]\nconvert congr_arg (fun x => algebraMap (𝕎 k) (FractionRing (𝕎 k)) x) key using 1\n[GOAL]\ncase h.e'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nkey : ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\nhq'' : ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) q' ≠ 0\n⊢ ↑(algebraMap (𝕎 k) (Localization (nonZeroDivisors (𝕎 k)))) (↑(frobeniusEquiv p k) (frobeniusRotation p hr' hq')) *\n        (↑p ^ m * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) r') *\n      ↑p ^ n =\n    ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) (↑frobenius b * ↑p ^ m * r' * ↑p ^ n)\n[PROOFSTEP]\nsimp only [RingHom.map_mul, RingHom.map_pow, map_natCast, frobeniusEquiv_apply]\n[GOAL]\ncase h.e'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nkey : ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\nhq'' : ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) q' ≠ 0\n⊢ ↑(algebraMap (𝕎 k) (Localization (nonZeroDivisors (𝕎 k)))) (↑frobenius (frobeniusRotation p hr' hq')) *\n        (↑p ^ m * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) r') *\n      ↑p ^ n =\n    ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) (↑frobenius (frobeniusRotation p hr' hq')) * ↑p ^ m *\n        ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) r' *\n      ↑p ^ n\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_3\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\nm n : ℕ\nr' q' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nb : 𝕎 k := frobeniusRotation p hr' hq'\nkey : ↑frobenius b * ↑p ^ m * r' * ↑p ^ n = ↑p ^ m * b * (↑p ^ n * q')\nhq'' : ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) q' ≠ 0\n⊢ ↑p ^ m * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) (frobeniusRotation p hr' hq') *\n      (↑p ^ n * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) q') =\n    ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) (↑p ^ m * b * (↑p ^ n * q'))\n[PROOFSTEP]\nsimp only [RingHom.map_mul, RingHom.map_pow, map_natCast]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na : FractionRing (𝕎 k)\nha : a ≠ 0\n⊢ ∃ b hb m, ↑φ b * a = ↑p ^ m * b\n[PROOFSTEP]\nrevert ha\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na : FractionRing (𝕎 k)\n⊢ a ≠ 0 → ∃ b hb m, ↑φ b * a = ↑p ^ m * b\n[PROOFSTEP]\nrefine' Localization.induction_on a _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na : FractionRing (𝕎 k)\n⊢ ∀ (y : 𝕎 k × { x // x ∈ nonZeroDivisors (𝕎 k) }),\n    Localization.mk y.fst y.snd ≠ 0 → ∃ b hb m, ↑φ b * Localization.mk y.fst y.snd = ↑p ^ m * b\n[PROOFSTEP]\nrintro ⟨r, q, hq⟩ hrq\n[GOAL]\ncase mk.mk\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na : FractionRing (𝕎 k)\nr q : 𝕎 k\nhq : q ∈ nonZeroDivisors (𝕎 k)\nhrq : Localization.mk (r, { val := q, property := hq }).fst (r, { val := q, property := hq }).snd ≠ 0\n⊢ ∃ b hb m,\n    ↑φ b * Localization.mk (r, { val := q, property := hq }).fst (r, { val := q, property := hq }).snd = ↑p ^ m * b\n[PROOFSTEP]\nhave hq0 : q ≠ 0 := mem_nonZeroDivisors_iff_ne_zero.1 hq\n[GOAL]\ncase mk.mk\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na : FractionRing (𝕎 k)\nr q : 𝕎 k\nhq : q ∈ nonZeroDivisors (𝕎 k)\nhrq : Localization.mk (r, { val := q, property := hq }).fst (r, { val := q, property := hq }).snd ≠ 0\nhq0 : q ≠ 0\n⊢ ∃ b hb m,\n    ↑φ b * Localization.mk (r, { val := q, property := hq }).fst (r, { val := q, property := hq }).snd = ↑p ^ m * b\n[PROOFSTEP]\nhave hr0 : r ≠ 0 := fun h => hrq (by simp [h])\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na : FractionRing (𝕎 k)\nr q : 𝕎 k\nhq : q ∈ nonZeroDivisors (𝕎 k)\nhrq : Localization.mk (r, { val := q, property := hq }).fst (r, { val := q, property := hq }).snd ≠ 0\nhq0 : q ≠ 0\nh : r = 0\n⊢ Localization.mk (r, { val := q, property := hq }).fst (r, { val := q, property := hq }).snd = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase mk.mk\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na : FractionRing (𝕎 k)\nr q : 𝕎 k\nhq : q ∈ nonZeroDivisors (𝕎 k)\nhrq : Localization.mk (r, { val := q, property := hq }).fst (r, { val := q, property := hq }).snd ≠ 0\nhq0 : q ≠ 0\nhr0 : r ≠ 0\n⊢ ∃ b hb m,\n    ↑φ b * Localization.mk (r, { val := q, property := hq }).fst (r, { val := q, property := hq }).snd = ↑p ^ m * b\n[PROOFSTEP]\nobtain ⟨m, r', hr', rfl⟩ := exists_eq_pow_p_mul r hr0\n[GOAL]\ncase mk.mk.intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na : FractionRing (𝕎 k)\nq : 𝕎 k\nhq : q ∈ nonZeroDivisors (𝕎 k)\nhq0 : q ≠ 0\nm : ℕ\nr' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhrq :\n  Localization.mk (↑p ^ m * r', { val := q, property := hq }).fst (↑p ^ m * r', { val := q, property := hq }).snd ≠ 0\nhr0 : ↑p ^ m * r' ≠ 0\n⊢ ∃ b hb m_1,\n    ↑φ b *\n        Localization.mk (↑p ^ m * r', { val := q, property := hq }).fst\n          (↑p ^ m * r', { val := q, property := hq }).snd =\n      ↑p ^ m_1 * b\n[PROOFSTEP]\nobtain ⟨n, q', hq', rfl⟩ := exists_eq_pow_p_mul q hq0\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na : FractionRing (𝕎 k)\nm : ℕ\nr' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhr0 : ↑p ^ m * r' ≠ 0\nn : ℕ\nq' : 𝕎 k\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nhq0 : ↑p ^ n * q' ≠ 0\nhrq :\n  Localization.mk (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).fst\n      (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).snd ≠\n    0\n⊢ ∃ b hb m_1,\n    ↑φ b *\n        Localization.mk (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).fst\n          (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).snd =\n      ↑p ^ m_1 * b\n[PROOFSTEP]\nlet b := frobeniusRotation p hr' hq'\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na : FractionRing (𝕎 k)\nm : ℕ\nr' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhr0 : ↑p ^ m * r' ≠ 0\nn : ℕ\nq' : 𝕎 k\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nhq0 : ↑p ^ n * q' ≠ 0\nhrq :\n  Localization.mk (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).fst\n      (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).snd ≠\n    0\nb : 𝕎 k := frobeniusRotation p hr' hq'\n⊢ ∃ b hb m_1,\n    ↑φ b *\n        Localization.mk (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).fst\n          (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).snd =\n      ↑p ^ m_1 * b\n[PROOFSTEP]\nrefine' ⟨algebraMap (𝕎 k) (FractionRing (𝕎 k)) b, _, m - n, _⟩\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro.refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na : FractionRing (𝕎 k)\nm : ℕ\nr' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhr0 : ↑p ^ m * r' ≠ 0\nn : ℕ\nq' : 𝕎 k\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nhq0 : ↑p ^ n * q' ≠ 0\nhrq :\n  Localization.mk (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).fst\n      (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).snd ≠\n    0\nb : 𝕎 k := frobeniusRotation p hr' hq'\n⊢ ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b ≠ 0\n[PROOFSTEP]\nsimpa only [map_zero] using\n  (IsFractionRing.injective (WittVector p k) (FractionRing (WittVector p k))).ne (frobeniusRotation_nonzero p hr' hq')\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.intro.refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nk : Type u_1\ninst✝² : Field k\ninst✝¹ : CharP k p\ninst✝ : IsAlgClosed k\na : FractionRing (𝕎 k)\nm : ℕ\nr' : 𝕎 k\nhr' : coeff r' 0 ≠ 0\nhr0 : ↑p ^ m * r' ≠ 0\nn : ℕ\nq' : 𝕎 k\nhq' : coeff q' 0 ≠ 0\nhq : ↑p ^ n * q' ∈ nonZeroDivisors (𝕎 k)\nhq0 : ↑p ^ n * q' ≠ 0\nhrq :\n  Localization.mk (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).fst\n      (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).snd ≠\n    0\nb : 𝕎 k := frobeniusRotation p hr' hq'\n⊢ ↑φ (↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b) *\n      Localization.mk (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).fst\n        (↑p ^ m * r', { val := ↑p ^ n * q', property := hq }).snd =\n    ↑p ^ (↑m - ↑n) * ↑(algebraMap (𝕎 k) (FractionRing (𝕎 k))) b\n[PROOFSTEP]\nexact exists_frobenius_solution_fractionRing_aux p m n r' q' hr' hq' hq\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.WittVector.FrobeniusFractionField", "llama_tokens": 25006, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7606506418255927, "lm_q2_score": 0.5, "lm_q1q2_score": 0.38032532091279636}}
{"text": "[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x y z : P\nr R✝ : ℝ\nc : P\nR : ℝ\n⊢ inversion c R c = c\n[PROOFSTEP]\nsimp [inversion]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x✝ y z : P\nr R : ℝ\nc x : P\n⊢ inversion c 0 x = c\n[PROOFSTEP]\nsimp [inversion]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b c✝ d x✝ y z : P\nr R✝ : ℝ\nc : P\na R : ℝ\nx : P\n⊢ inversion c (a * R) x = ↑(homothety c (a ^ 2)) (inversion c R x)\n[PROOFSTEP]\nsimp only [inversion_eq_lineMap, ← homothety_eq_lineMap, ← homothety_mul_apply, mul_div_assoc, mul_pow]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x✝ y z : P\nr R : ℝ\nc x : P\n⊢ inversion c (dist x c) x = x\n[PROOFSTEP]\nrcases eq_or_ne x c with (rfl | hne)\n[GOAL]\ncase inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x✝ y z : P\nr R : ℝ\nx : P\n⊢ inversion x (dist x x) x = x\n[PROOFSTEP]\napply inversion_self\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x✝ y z : P\nr R : ℝ\nc x : P\nhne : x ≠ c\n⊢ inversion c (dist x c) x = x\n[PROOFSTEP]\nrw [inversion, div_self, one_pow, one_smul, vsub_vadd]\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x✝ y z : P\nr R : ℝ\nc x : P\nhne : x ≠ c\n⊢ dist x c ≠ 0\n[PROOFSTEP]\nrwa [dist_ne_zero]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x✝ y z : P\nr R : ℝ\nc x : P\n⊢ inversion c (dist c x) x = x\n[PROOFSTEP]\nrw [dist_comm, inversion_dist_center]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x✝ y z : P\nr R✝ : ℝ\nc x : P\nR : ℝ\n⊢ dist (inversion c R x) c = R ^ 2 / dist x c\n[PROOFSTEP]\nrcases eq_or_ne x c with (rfl | hx)\n[GOAL]\ncase inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x✝ y z : P\nr R✝ : ℝ\nx : P\nR : ℝ\n⊢ dist (inversion x R x) x = R ^ 2 / dist x x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x✝ y z : P\nr R✝ : ℝ\nc x : P\nR : ℝ\nhx : x ≠ c\n⊢ dist (inversion c R x) c = R ^ 2 / dist x c\n[PROOFSTEP]\nhave : dist x c ≠ 0 := dist_ne_zero.2 hx\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x✝ y z : P\nr R✝ : ℝ\nc x : P\nR : ℝ\nhx : x ≠ c\nthis : dist x c ≠ 0\n⊢ dist (inversion c R x) c = R ^ 2 / dist x c\n[PROOFSTEP]\nfield_simp [inversion, norm_smul, abs_div, ← dist_eq_norm_vsub, sq, mul_assoc]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x✝ y z : P\nr R✝ : ℝ\nc x : P\nR : ℝ\n⊢ dist c (inversion c R x) = R ^ 2 / dist c x\n[PROOFSTEP]\nrw [dist_comm c, dist_comm c, dist_inversion_center]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x✝ y z : P\nr R✝ : ℝ\nc : P\nR : ℝ\nhR : R ≠ 0\nx : P\n⊢ inversion c R (inversion c R x) = x\n[PROOFSTEP]\nrcases eq_or_ne x c with (rfl | hne)\n[GOAL]\ncase inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x✝ y z : P\nr R✝ R : ℝ\nhR : R ≠ 0\nx : P\n⊢ inversion x R (inversion x R x) = x\n[PROOFSTEP]\nrw [inversion_self, inversion_self]\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x✝ y z : P\nr R✝ : ℝ\nc : P\nR : ℝ\nhR : R ≠ 0\nx : P\nhne : x ≠ c\n⊢ inversion c R (inversion c R x) = x\n[PROOFSTEP]\nrw [inversion, dist_inversion_center, inversion_vsub_center, smul_smul, ← mul_pow, div_mul_div_comm,\n  div_mul_cancel _ (dist_ne_zero.2 hne), ← sq, div_self, one_pow, one_smul, vsub_vadd]\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c✝ d x✝ y z : P\nr R✝ : ℝ\nc : P\nR : ℝ\nhR : R ≠ 0\nx : P\nhne : x ≠ c\n⊢ R ^ 2 ≠ 0\n[PROOFSTEP]\nexact pow_ne_zero _ hR\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\n⊢ inversion c R x = c ↔ x = c ∨ R = 0\n[PROOFSTEP]\nby_cases hR : R = 0\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhR : R = 0\n⊢ inversion c R x = c ↔ x = c ∨ R = 0\n[PROOFSTEP]\nsimp [inversion_eq_center, hR]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhR : ¬R = 0\n⊢ inversion c R x = c ↔ x = c ∨ R = 0\n[PROOFSTEP]\nsimp [inversion_eq_center, hR]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R✝ : ℝ\nhx : x ≠ c\nhy : y ≠ c\nR : ℝ\n⊢ dist (inversion c R x) (inversion c R y) = R ^ 2 / (dist x c * dist y c) * dist x y\n[PROOFSTEP]\ndsimp only [inversion]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R✝ : ℝ\nhx : x ≠ c\nhy : y ≠ c\nR : ℝ\n⊢ dist ((R / dist x c) ^ 2 • (x -ᵥ c) +ᵥ c) ((R / dist y c) ^ 2 • (y -ᵥ c) +ᵥ c) =\n    R ^ 2 / (dist x c * dist y c) * dist x y\n[PROOFSTEP]\nsimp_rw [dist_vadd_cancel_right, dist_eq_norm_vsub V _ c]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R✝ : ℝ\nhx : x ≠ c\nhy : y ≠ c\nR : ℝ\n⊢ dist ((R / ‖x -ᵥ c‖) ^ 2 • (x -ᵥ c)) ((R / ‖y -ᵥ c‖) ^ 2 • (y -ᵥ c)) = R ^ 2 / (‖x -ᵥ c‖ * ‖y -ᵥ c‖) * dist x y\n[PROOFSTEP]\nsimpa only [dist_vsub_cancel_right] using dist_div_norm_sq_smul (vsub_ne_zero.2 hx) (vsub_ne_zero.2 hy) R\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhx : x ≠ c\nhy : y ≠ c\n⊢ dist (inversion c R x) y * dist x c = dist x (inversion c R y) * dist y c\n[PROOFSTEP]\nrcases eq_or_ne R 0 with rfl | hR\n[GOAL]\ncase inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr : ℝ\nhx : x ≠ c\nhy : y ≠ c\n⊢ dist (inversion c 0 x) y * dist x c = dist x (inversion c 0 y) * dist y c\n[PROOFSTEP]\nsimp [dist_comm, mul_comm]\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhx : x ≠ c\nhy : y ≠ c\nhR : R ≠ 0\n⊢ dist (inversion c R x) y * dist x c = dist x (inversion c R y) * dist y c\n[PROOFSTEP]\nhave hy' : inversion c R y ≠ c := by simp [*]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhx : x ≠ c\nhy : y ≠ c\nhR : R ≠ 0\n⊢ inversion c R y ≠ c\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhx : x ≠ c\nhy : y ≠ c\nhR : R ≠ 0\nhy' : inversion c R y ≠ c\n⊢ dist (inversion c R x) y * dist x c = dist x (inversion c R y) * dist y c\n[PROOFSTEP]\nconv in dist _ y => rw [← inversion_inversion c hR y]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhx : x ≠ c\nhy : y ≠ c\nhR : R ≠ 0\nhy' : inversion c R y ≠ c\n| dist (inversion c R x) y\n[PROOFSTEP]\nrw [← inversion_inversion c hR y]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhx : x ≠ c\nhy : y ≠ c\nhR : R ≠ 0\nhy' : inversion c R y ≠ c\n| dist (inversion c R x) y\n[PROOFSTEP]\nrw [← inversion_inversion c hR y]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhx : x ≠ c\nhy : y ≠ c\nhR : R ≠ 0\nhy' : inversion c R y ≠ c\n| dist (inversion c R x) y\n[PROOFSTEP]\nrw [← inversion_inversion c hR y]\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhx : x ≠ c\nhy : y ≠ c\nhR : R ≠ 0\nhy' : inversion c R y ≠ c\n⊢ dist (inversion c R x) (inversion c R (inversion c R y)) * dist x c = dist x (inversion c R y) * dist y c\n[PROOFSTEP]\nrw [dist_inversion_inversion hx hy', dist_inversion_center]\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhx : x ≠ c\nhy : y ≠ c\nhR : R ≠ 0\nhy' : inversion c R y ≠ c\n⊢ R ^ 2 / (dist x c * (R ^ 2 / dist y c)) * dist x (inversion c R y) * dist x c = dist x (inversion c R y) * dist y c\n[PROOFSTEP]\nhave : dist x c ≠ 0 := dist_ne_zero.2 hx\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhx : x ≠ c\nhy : y ≠ c\nhR : R ≠ 0\nhy' : inversion c R y ≠ c\nthis : dist x c ≠ 0\n⊢ R ^ 2 / (dist x c * (R ^ 2 / dist y c)) * dist x (inversion c R y) * dist x c = dist x (inversion c R y) * dist y c\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c d x y z : P\nr R : ℝ\nhx : x ≠ c\nhy : y ≠ c\nhR : R ≠ 0\nhy' : inversion c R y ≠ c\nthis : dist x c ≠ 0\n⊢ R ^ 2 * dist y c * dist x (inversion c R y) * dist x c = dist x (inversion c R y) * dist y c * (dist x c * R ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b✝ c✝ d✝ x y z : P\nr R : ℝ\na b c d : P\n⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d\n[PROOFSTEP]\nrcases eq_or_ne b a with (rfl | hb)\n[GOAL]\ncase inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b✝ c✝ d✝ x y z : P\nr R : ℝ\nb c d : P\n⊢ dist b c * dist b d ≤ dist b b * dist c d + dist b c * dist b d\n[PROOFSTEP]\nrw [dist_self, zero_mul, zero_add]\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b✝ c✝ d✝ x y z : P\nr R : ℝ\na b c d : P\nhb : b ≠ a\n⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d\n[PROOFSTEP]\nrcases eq_or_ne c a with (rfl | hc)\n[GOAL]\ncase inr.inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b✝ c✝ d✝ x y z : P\nr R : ℝ\nb c d : P\nhb : b ≠ c\n⊢ dist c c * dist b d ≤ dist c b * dist c d + dist b c * dist c d\n[PROOFSTEP]\nrw [dist_self, zero_mul]\n[GOAL]\ncase inr.inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b✝ c✝ d✝ x y z : P\nr R : ℝ\nb c d : P\nhb : b ≠ c\n⊢ 0 ≤ dist c b * dist c d + dist b c * dist c d\n[PROOFSTEP]\napply_rules [add_nonneg, mul_nonneg, dist_nonneg]\n[GOAL]\ncase inr.inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b✝ c✝ d✝ x y z : P\nr R : ℝ\na b c d : P\nhb : b ≠ a\nhc : c ≠ a\n⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d\n[PROOFSTEP]\nrcases eq_or_ne d a with (rfl | hd)\n[GOAL]\ncase inr.inr.inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b✝ c✝ d✝ x y z : P\nr R : ℝ\nb c d : P\nhb : b ≠ d\nhc : c ≠ d\n⊢ dist d c * dist b d ≤ dist d b * dist c d + dist b c * dist d d\n[PROOFSTEP]\nrw [dist_self, mul_zero, add_zero, dist_comm d, dist_comm d, mul_comm]\n  /- Otherwise, we apply the triangle inequality to `EuclideanGeometry.inversion a 1 b`,\n      `EuclideanGeometry.inversion a 1 c`, and `EuclideanGeometry.inversion a 1 d`. -/\n[GOAL]\ncase inr.inr.inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b✝ c✝ d✝ x y z : P\nr R : ℝ\na b c d : P\nhb : b ≠ a\nhc : c ≠ a\nhd : d ≠ a\n⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d\n[PROOFSTEP]\nhave H := dist_triangle (inversion a 1 b) (inversion a 1 c) (inversion a 1 d)\n[GOAL]\ncase inr.inr.inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b✝ c✝ d✝ x y z : P\nr R : ℝ\na b c d : P\nhb : b ≠ a\nhc : c ≠ a\nhd : d ≠ a\nH :\n  dist (inversion a 1 b) (inversion a 1 d) ≤\n    dist (inversion a 1 b) (inversion a 1 c) + dist (inversion a 1 c) (inversion a 1 d)\n⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d\n[PROOFSTEP]\nrw [dist_inversion_inversion hb hd, dist_inversion_inversion hb hc, dist_inversion_inversion hc hd, one_pow] at H \n[GOAL]\ncase inr.inr.inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b✝ c✝ d✝ x y z : P\nr R : ℝ\na b c d : P\nhb : b ≠ a\nhc : c ≠ a\nhd : d ≠ a\nH : 1 / (dist b a * dist d a) * dist b d ≤ 1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d\n⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d\n[PROOFSTEP]\nrw [← dist_pos] at hb hc hd \n[GOAL]\ncase inr.inr.inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b✝ c✝ d✝ x y z : P\nr R : ℝ\na b c d : P\nhb✝ : b ≠ a\nhb : 0 < dist b a\nhc✝ : c ≠ a\nhc : 0 < dist c a\nhd✝ : d ≠ a\nhd : 0 < dist d a\nH : 1 / (dist b a * dist d a) * dist b d ≤ 1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d\n⊢ dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d\n[PROOFSTEP]\nrw [← div_le_div_right (mul_pos hb (mul_pos hc hd))]\n[GOAL]\ncase inr.inr.inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b✝ c✝ d✝ x y z : P\nr R : ℝ\na b c d : P\nhb✝ : b ≠ a\nhb : 0 < dist b a\nhc✝ : c ≠ a\nhc : 0 < dist c a\nhd✝ : d ≠ a\nhd : 0 < dist d a\nH : 1 / (dist b a * dist d a) * dist b d ≤ 1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d\n⊢ dist a c * dist b d / (dist b a * (dist c a * dist d a)) ≤\n    (dist a b * dist c d + dist b c * dist a d) / (dist b a * (dist c a * dist d a))\n[PROOFSTEP]\nconvert H using 1\n[GOAL]\ncase h.e'_3\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b✝ c✝ d✝ x y z : P\nr R : ℝ\na b c d : P\nhb✝ : b ≠ a\nhb : 0 < dist b a\nhc✝ : c ≠ a\nhc : 0 < dist c a\nhd✝ : d ≠ a\nhd : 0 < dist d a\nH : 1 / (dist b a * dist d a) * dist b d ≤ 1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d\n⊢ dist a c * dist b d / (dist b a * (dist c a * dist d a)) = 1 / (dist b a * dist d a) * dist b d\n[PROOFSTEP]\nfield_simp [hb.ne', hc.ne', hd.ne', dist_comm a]\n[GOAL]\ncase h.e'_3\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b✝ c✝ d✝ x y z : P\nr R : ℝ\na b c d : P\nhb✝ : b ≠ a\nhb : 0 < dist b a\nhc✝ : c ≠ a\nhc : 0 < dist c a\nhd✝ : d ≠ a\nhd : 0 < dist d a\nH : 1 / (dist b a * dist d a) * dist b d ≤ 1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d\n⊢ dist c a * dist b d * (dist b a * dist d a) = dist b d * (dist b a * (dist c a * dist d a))\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_4\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b✝ c✝ d✝ x y z : P\nr R : ℝ\na b c d : P\nhb✝ : b ≠ a\nhb : 0 < dist b a\nhc✝ : c ≠ a\nhc : 0 < dist c a\nhd✝ : d ≠ a\nhd : 0 < dist d a\nH : 1 / (dist b a * dist d a) * dist b d ≤ 1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d\n⊢ (dist a b * dist c d + dist b c * dist a d) / (dist b a * (dist c a * dist d a)) =\n    1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d\n[PROOFSTEP]\nfield_simp [hb.ne', hc.ne', hd.ne', dist_comm a]\n[GOAL]\ncase h.e'_4\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na✝ b✝ c✝ d✝ x y z : P\nr R : ℝ\na b c d : P\nhb✝ : b ≠ a\nhb : 0 < dist b a\nhc✝ : c ≠ a\nhc : 0 < dist c a\nhd✝ : d ≠ a\nhd : 0 < dist d a\nH : 1 / (dist b a * dist d a) * dist b d ≤ 1 / (dist b a * dist c a) * dist b c + 1 / (dist c a * dist d a) * dist c d\n⊢ (dist b a * dist c d + dist b c * dist d a) * (dist b a * dist c a * (dist c a * dist d a)) =\n    (dist b c * (dist c a * dist d a) + dist c d * (dist b a * dist c a)) * (dist b a * (dist c a * dist d a))\n[PROOFSTEP]\nring\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.Inversion.Basic", "llama_tokens": 9424, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6584175139669997, "lm_q2_score": 0.5774953651858118, "lm_q1q2_score": 0.3802330626731068}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nJ : C\n⊢ Injective J ↔ Functor.PreservesEpimorphisms (preadditiveYoneda.obj J)\n[PROOFSTEP]\nrw [injective_iff_preservesEpimorphisms_yoneda_obj]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nJ : C\n⊢ Functor.PreservesEpimorphisms (yoneda.obj J) ↔ Functor.PreservesEpimorphisms (preadditiveYoneda.obj J)\n[PROOFSTEP]\nrefine' ⟨fun h : (preadditiveYoneda.obj J ⋙ (forget AddCommGroupCat)).PreservesEpimorphisms => _, _⟩\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nJ : C\nh : Functor.PreservesEpimorphisms (preadditiveYoneda.obj J ⋙ forget AddCommGroupCat)\n⊢ Functor.PreservesEpimorphisms (preadditiveYoneda.obj J)\n[PROOFSTEP]\nexact Functor.preservesEpimorphisms_of_preserves_of_reflects (preadditiveYoneda.obj J) (forget _)\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nJ : C\n⊢ Functor.PreservesEpimorphisms (preadditiveYoneda.obj J) → Functor.PreservesEpimorphisms (yoneda.obj J)\n[PROOFSTEP]\nintro\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nJ : C\na✝ : Functor.PreservesEpimorphisms (preadditiveYoneda.obj J)\n⊢ Functor.PreservesEpimorphisms (yoneda.obj J)\n[PROOFSTEP]\nexact (inferInstance : (preadditiveYoneda.obj J ⋙ forget _).PreservesEpimorphisms)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nJ : C\n⊢ Injective J ↔ Functor.PreservesEpimorphisms (preadditiveYonedaObj J)\n[PROOFSTEP]\nrw [injective_iff_preservesEpimorphisms_yoneda_obj]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nJ : C\n⊢ Functor.PreservesEpimorphisms (yoneda.obj J) ↔ Functor.PreservesEpimorphisms (preadditiveYonedaObj J)\n[PROOFSTEP]\nrefine' ⟨fun h : (preadditiveYonedaObj J ⋙ (forget <| ModuleCat (End J))).PreservesEpimorphisms => _, _⟩\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nJ : C\nh : Functor.PreservesEpimorphisms (preadditiveYonedaObj J ⋙ forget (ModuleCat (End J)))\n⊢ Functor.PreservesEpimorphisms (preadditiveYonedaObj J)\n[PROOFSTEP]\nexact Functor.preservesEpimorphisms_of_preserves_of_reflects (preadditiveYonedaObj J) (forget _)\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nJ : C\n⊢ Functor.PreservesEpimorphisms (preadditiveYonedaObj J) → Functor.PreservesEpimorphisms (yoneda.obj J)\n[PROOFSTEP]\nintro\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nJ : C\na✝ : Functor.PreservesEpimorphisms (preadditiveYonedaObj J)\n⊢ Functor.PreservesEpimorphisms (yoneda.obj J)\n[PROOFSTEP]\nexact (inferInstance : (preadditiveYonedaObj J ⋙ forget _).PreservesEpimorphisms)\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Preadditive.Yoneda.Injective", "llama_tokens": 1227, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6584175005616829, "lm_q2_score": 0.5774953651858118, "lm_q1q2_score": 0.38023305493159854}}
{"text": "[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhr : r ≤ 1\n⊢ log b r = -↑(Nat.clog b ⌈r⁻¹⌉₊)\n[PROOFSTEP]\nobtain rfl | hr := hr.eq_or_lt\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhr : 1 ≤ 1\n⊢ log b 1 = -↑(Nat.clog b ⌈1⁻¹⌉₊)\n[PROOFSTEP]\nrw [log, if_pos hr, inv_one, Nat.ceil_one, Nat.floor_one, Nat.log_one_right, Nat.clog_one_right, Int.ofNat_zero,\n  neg_zero]\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhr✝ : r ≤ 1\nhr : r < 1\n⊢ log b r = -↑(Nat.clog b ⌈r⁻¹⌉₊)\n[PROOFSTEP]\nexact if_neg hr.not_le\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb n : ℕ\n⊢ log b ↑n = ↑(Nat.log b n)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\n⊢ log b ↑Nat.zero = ↑(Nat.log b Nat.zero)\n[PROOFSTEP]\nsimp [log_of_right_le_one]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb n✝ : ℕ\n⊢ log b ↑(Nat.succ n✝) = ↑(Nat.log b (Nat.succ n✝))\n[PROOFSTEP]\nrw [log_of_one_le_right, Nat.floor_coe]\n[GOAL]\ncase succ.hr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb n✝ : ℕ\n⊢ 1 ≤ ↑(Nat.succ n✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : b ≤ 1\nr : R\n⊢ log b r = 0\n[PROOFSTEP]\ncases' le_total 1 r with h h\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : b ≤ 1\nr : R\nh : 1 ≤ r\n⊢ log b r = 0\n[PROOFSTEP]\nrw [log_of_one_le_right _ h, Nat.log_of_left_le_one hb, Int.ofNat_zero]\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : b ≤ 1\nr : R\nh : r ≤ 1\n⊢ log b r = 0\n[PROOFSTEP]\nrw [log_of_right_le_one _ h, Nat.clog_of_left_le_one hb, Int.ofNat_zero, neg_zero]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhr : r ≤ 0\n⊢ log b r = 0\n[PROOFSTEP]\nrw [log_of_right_le_one _ (hr.trans zero_le_one),\n  Nat.clog_of_right_le_one ((Nat.ceil_eq_zero.mpr <| inv_nonpos.2 hr).trans_le zero_le_one), Int.ofNat_zero, neg_zero]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhb : 1 < b\nhr : 0 < r\n⊢ ↑b ^ log b r ≤ r\n[PROOFSTEP]\ncases' le_total 1 r with hr1 hr1\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhb : 1 < b\nhr : 0 < r\nhr1 : 1 ≤ r\n⊢ ↑b ^ log b r ≤ r\n[PROOFSTEP]\nrw [log_of_one_le_right _ hr1]\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhb : 1 < b\nhr : 0 < r\nhr1 : 1 ≤ r\n⊢ ↑b ^ ↑(Nat.log b ⌊r⌋₊) ≤ r\n[PROOFSTEP]\nrw [zpow_ofNat, ← Nat.cast_pow, ← Nat.le_floor_iff hr.le]\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhb : 1 < b\nhr : 0 < r\nhr1 : 1 ≤ r\n⊢ b ^ Nat.log b ⌊r⌋₊ ≤ ⌊r⌋₊\n[PROOFSTEP]\nexact Nat.pow_log_le_self b (Nat.floor_pos.mpr hr1).ne'\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhb : 1 < b\nhr : 0 < r\nhr1 : r ≤ 1\n⊢ ↑b ^ log b r ≤ r\n[PROOFSTEP]\nrw [log_of_right_le_one _ hr1, zpow_neg, zpow_ofNat, ← Nat.cast_pow]\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhb : 1 < b\nhr : 0 < r\nhr1 : r ≤ 1\n⊢ (↑(b ^ Nat.clog b ⌈r⁻¹⌉₊))⁻¹ ≤ r\n[PROOFSTEP]\nexact inv_le_of_inv_le hr (Nat.ceil_le.1 <| Nat.le_pow_clog hb _)\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\n⊢ r < ↑b ^ (log b r + 1)\n[PROOFSTEP]\ncases' le_or_lt r 0 with hr hr\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : r ≤ 0\n⊢ r < ↑b ^ (log b r + 1)\n[PROOFSTEP]\nrw [log_of_right_le_zero _ hr, zero_add, zpow_one]\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : r ≤ 0\n⊢ r < ↑b\n[PROOFSTEP]\nexact hr.trans_lt (zero_lt_one.trans_le <| by exact_mod_cast hb.le)\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : r ≤ 0\n⊢ 1 ≤ ↑b\n[PROOFSTEP]\nexact_mod_cast hb.le\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\n⊢ r < ↑b ^ (log b r + 1)\n[PROOFSTEP]\ncases' le_or_lt 1 r with hr1 hr1\n[GOAL]\ncase inr.inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\nhr1 : 1 ≤ r\n⊢ r < ↑b ^ (log b r + 1)\n[PROOFSTEP]\nrw [log_of_one_le_right _ hr1]\n[GOAL]\ncase inr.inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\nhr1 : 1 ≤ r\n⊢ r < ↑b ^ (↑(Nat.log b ⌊r⌋₊) + 1)\n[PROOFSTEP]\nrw [Int.ofNat_add_one_out, zpow_ofNat, ← Nat.cast_pow]\n[GOAL]\ncase inr.inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\nhr1 : 1 ≤ r\n⊢ r < ↑(b ^ Nat.succ (Nat.log b ⌊r⌋₊))\n[PROOFSTEP]\napply Nat.lt_of_floor_lt\n[GOAL]\ncase inr.inl.h\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\nhr1 : 1 ≤ r\n⊢ ⌊r⌋₊ < b ^ Nat.succ (Nat.log b ⌊r⌋₊)\n[PROOFSTEP]\nexact Nat.lt_pow_succ_log_self hb _\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\nhr1 : r < 1\n⊢ r < ↑b ^ (log b r + 1)\n[PROOFSTEP]\nrw [log_of_right_le_one _ hr1.le]\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\nhr1 : r < 1\n⊢ r < ↑b ^ (-↑(Nat.clog b ⌈r⁻¹⌉₊) + 1)\n[PROOFSTEP]\nhave hcri : 1 < r⁻¹ := one_lt_inv hr hr1\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\nhr1 : r < 1\nhcri : 1 < r⁻¹\n⊢ r < ↑b ^ (-↑(Nat.clog b ⌈r⁻¹⌉₊) + 1)\n[PROOFSTEP]\nhave : 1 ≤ Nat.clog b ⌈r⁻¹⌉₊ :=\n  Nat.succ_le_of_lt (Nat.clog_pos hb <| Nat.one_lt_cast.1 <| hcri.trans_le (Nat.le_ceil _))\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\nhr1 : r < 1\nhcri : 1 < r⁻¹\nthis : 1 ≤ Nat.clog b ⌈r⁻¹⌉₊\n⊢ r < ↑b ^ (-↑(Nat.clog b ⌈r⁻¹⌉₊) + 1)\n[PROOFSTEP]\nrw [neg_add_eq_sub, ← neg_sub, ← Int.ofNat_one, ← Int.ofNat_sub this, zpow_neg, zpow_ofNat,\n  lt_inv hr (pow_pos (Nat.cast_pos.mpr <| zero_lt_one.trans hb) _), ← Nat.cast_pow]\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\nhr1 : r < 1\nhcri : 1 < r⁻¹\nthis : 1 ≤ Nat.clog b ⌈r⁻¹⌉₊\n⊢ ↑(b ^ (Nat.clog b ⌈r⁻¹⌉₊ - 1)) < r⁻¹\n[PROOFSTEP]\nrefine' Nat.lt_ceil.1 _\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\nhr1 : r < 1\nhcri : 1 < r⁻¹\nthis : 1 ≤ Nat.clog b ⌈r⁻¹⌉₊\n⊢ b ^ (Nat.clog b ⌈r⁻¹⌉₊ - 1) < ⌈r⁻¹⌉₊\n[PROOFSTEP]\nexact Nat.pow_pred_clog_lt_self hb <| Nat.one_lt_cast.1 <| hcri.trans_le <| Nat.le_ceil _\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\n⊢ log b 1 = 0\n[PROOFSTEP]\nrw [log_of_one_le_right _ le_rfl, Nat.floor_one, Nat.log_one_right, Int.ofNat_zero]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nz : ℤ\n⊢ log b (↑b ^ z) = z\n[PROOFSTEP]\nobtain ⟨n, rfl | rfl⟩ := Int.eq_nat_or_neg z\n[GOAL]\ncase intro.inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nn : ℕ\n⊢ log b (↑b ^ ↑n) = ↑n\n[PROOFSTEP]\nrw [log_of_one_le_right _ (one_le_zpow_of_nonneg _ <| Int.coe_nat_nonneg _), zpow_ofNat, ← Nat.cast_pow, Nat.floor_coe,\n  Nat.log_pow hb]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nn : ℕ\n⊢ 1 ≤ ↑b\n[PROOFSTEP]\nexact_mod_cast hb.le\n[GOAL]\ncase intro.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nn : ℕ\n⊢ log b (↑b ^ (-↑n)) = -↑n\n[PROOFSTEP]\nrw [log_of_right_le_one _ (zpow_le_one_of_nonpos _ <| neg_nonpos.mpr (Int.coe_nat_nonneg _)), zpow_neg, inv_inv,\n  zpow_ofNat, ← Nat.cast_pow, Nat.ceil_natCast, Nat.clog_pow _ _ hb]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nn : ℕ\n⊢ 1 ≤ ↑b\n[PROOFSTEP]\nexact_mod_cast hb.le\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\n⊢ log b r₁ ≤ log b r₂\n[PROOFSTEP]\ncases' le_or_lt b 1 with hb hb\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\nhb : b ≤ 1\n⊢ log b r₁ ≤ log b r₂\n[PROOFSTEP]\nrw [log_of_left_le_one hb, log_of_left_le_one hb]\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\nhb : 1 < b\n⊢ log b r₁ ≤ log b r₂\n[PROOFSTEP]\ncases' le_total r₁ 1 with h₁ h₁\n[GOAL]\ncase inr.inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\nhb : 1 < b\nh₁ : r₁ ≤ 1\n⊢ log b r₁ ≤ log b r₂\n[PROOFSTEP]\ncases' le_total r₂ 1 with h₂ h₂\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\nhb : 1 < b\nh₁ : 1 ≤ r₁\n⊢ log b r₁ ≤ log b r₂\n[PROOFSTEP]\ncases' le_total r₂ 1 with h₂ h₂\n[GOAL]\ncase inr.inl.inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\nhb : 1 < b\nh₁ : r₁ ≤ 1\nh₂ : r₂ ≤ 1\n⊢ log b r₁ ≤ log b r₂\n[PROOFSTEP]\nrw [log_of_right_le_one _ h₁, log_of_right_le_one _ h₂, neg_le_neg_iff, Int.ofNat_le]\n[GOAL]\ncase inr.inl.inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\nhb : 1 < b\nh₁ : r₁ ≤ 1\nh₂ : r₂ ≤ 1\n⊢ Nat.clog b ⌈r₂⁻¹⌉₊ ≤ Nat.clog b ⌈r₁⁻¹⌉₊\n[PROOFSTEP]\nexact Nat.clog_mono_right _ (Nat.ceil_mono <| inv_le_inv_of_le h₀ h)\n[GOAL]\ncase inr.inl.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\nhb : 1 < b\nh₁ : r₁ ≤ 1\nh₂ : 1 ≤ r₂\n⊢ log b r₁ ≤ log b r₂\n[PROOFSTEP]\nrw [log_of_right_le_one _ h₁, log_of_one_le_right _ h₂]\n[GOAL]\ncase inr.inl.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\nhb : 1 < b\nh₁ : r₁ ≤ 1\nh₂ : 1 ≤ r₂\n⊢ -↑(Nat.clog b ⌈r₁⁻¹⌉₊) ≤ ↑(Nat.log b ⌊r₂⌋₊)\n[PROOFSTEP]\nexact (neg_nonpos.mpr (Int.coe_nat_nonneg _)).trans (Int.coe_nat_nonneg _)\n[GOAL]\ncase inr.inr.inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\nhb : 1 < b\nh₁ : 1 ≤ r₁\nh₂ : r₂ ≤ 1\n⊢ log b r₁ ≤ log b r₂\n[PROOFSTEP]\nobtain rfl := le_antisymm h (h₂.trans h₁)\n[GOAL]\ncase inr.inr.inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ : R\nh₀ : 0 < r₁\nhb : 1 < b\nh₁ : 1 ≤ r₁\nh : r₁ ≤ r₁\nh₂ : r₁ ≤ 1\n⊢ log b r₁ ≤ log b r₁\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.inr.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\nhb : 1 < b\nh₁ : 1 ≤ r₁\nh₂ : 1 ≤ r₂\n⊢ log b r₁ ≤ log b r₂\n[PROOFSTEP]\nrw [log_of_one_le_right _ h₁, log_of_one_le_right _ h₂, Int.ofNat_le]\n[GOAL]\ncase inr.inr.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\nhb : 1 < b\nh₁ : 1 ≤ r₁\nh₂ : 1 ≤ r₂\n⊢ Nat.log b ⌊r₁⌋₊ ≤ Nat.log b ⌊r₂⌋₊\n[PROOFSTEP]\nexact Nat.log_mono_right (Nat.floor_mono h)\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nz : ℤ\n⊢ 0 < ↑b\n[PROOFSTEP]\nexact_mod_cast zero_lt_one.trans hb\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nz₁ z₂ : ℤ\nhz : z₁ ≤ z₂\n⊢ 1 < ↑b\n[PROOFSTEP]\nexact_mod_cast hb\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhr : r ≤ 1\n⊢ clog b r = -↑(Nat.log b ⌊r⁻¹⌋₊)\n[PROOFSTEP]\nobtain rfl | hr := hr.eq_or_lt\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhr : 1 ≤ 1\n⊢ clog b 1 = -↑(Nat.log b ⌊1⁻¹⌋₊)\n[PROOFSTEP]\nrw [clog, if_pos hr, inv_one, Nat.ceil_one, Nat.floor_one, Nat.log_one_right, Nat.clog_one_right, Int.ofNat_zero,\n  neg_zero]\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhr✝ : r ≤ 1\nhr : r < 1\n⊢ clog b r = -↑(Nat.log b ⌊r⁻¹⌋₊)\n[PROOFSTEP]\nexact if_neg hr.not_le\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhr : r ≤ 0\n⊢ clog b r = 0\n[PROOFSTEP]\nrw [clog, if_neg (hr.trans_lt zero_lt_one).not_le, neg_eq_zero, Int.coe_nat_eq_zero, Nat.log_eq_zero_iff]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhr : r ≤ 0\n⊢ ⌊r⁻¹⌋₊ < b ∨ b ≤ 1\n[PROOFSTEP]\ncases' le_or_lt b 1 with hb hb\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhr : r ≤ 0\nhb : b ≤ 1\n⊢ ⌊r⁻¹⌋₊ < b ∨ b ≤ 1\n[PROOFSTEP]\nexact Or.inr hb\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhr : r ≤ 0\nhb : 1 < b\n⊢ ⌊r⁻¹⌋₊ < b ∨ b ≤ 1\n[PROOFSTEP]\nrefine' Or.inl (lt_of_le_of_lt _ hb)\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhr : r ≤ 0\nhb : 1 < b\n⊢ ⌊r⁻¹⌋₊ ≤ 1\n[PROOFSTEP]\nexact Nat.floor_le_one_of_le_one ((inv_nonpos.2 hr).trans zero_le_one)\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\n⊢ clog b r⁻¹ = -log b r\n[PROOFSTEP]\ncases' lt_or_le 0 r with hrp hrp\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhrp : 0 < r\n⊢ clog b r⁻¹ = -log b r\n[PROOFSTEP]\nobtain hr | hr := le_total 1 r\n[GOAL]\ncase inl.inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhrp : 0 < r\nhr : 1 ≤ r\n⊢ clog b r⁻¹ = -log b r\n[PROOFSTEP]\nrw [clog_of_right_le_one _ (inv_le_one hr), log_of_one_le_right _ hr, inv_inv]\n[GOAL]\ncase inl.inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhrp : 0 < r\nhr : r ≤ 1\n⊢ clog b r⁻¹ = -log b r\n[PROOFSTEP]\nrw [clog_of_one_le_right _ (one_le_inv hrp hr), log_of_right_le_one _ hr, neg_neg]\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhrp : r ≤ 0\n⊢ clog b r⁻¹ = -log b r\n[PROOFSTEP]\nrw [clog_of_right_le_zero _ (inv_nonpos.mpr hrp), log_of_right_le_zero _ hrp, neg_zero]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\n⊢ log b r⁻¹ = -clog b r\n[PROOFSTEP]\nrw [← inv_inv r, clog_inv, neg_neg, inv_inv]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\n⊢ -log b r⁻¹ = clog b r\n[PROOFSTEP]\nrw [log_inv, neg_neg]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\n⊢ -clog b r⁻¹ = log b r\n[PROOFSTEP]\nrw [clog_inv, neg_neg]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb n : ℕ\n⊢ clog b ↑n = ↑(Nat.clog b n)\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\n⊢ clog b ↑Nat.zero = ↑(Nat.clog b Nat.zero)\n[PROOFSTEP]\nsimp [clog_of_right_le_one]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb n : ℕ\n⊢ clog b ↑(Nat.succ n) = ↑(Nat.clog b (Nat.succ n))\n[PROOFSTEP]\nrw [clog_of_one_le_right, (Nat.ceil_eq_iff (Nat.succ_ne_zero n)).mpr]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb n : ℕ\n⊢ ↑(Nat.succ n - 1) < ↑(Nat.succ n) ∧ ↑(Nat.succ n) ≤ ↑(Nat.succ n)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.hr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb n : ℕ\n⊢ 1 ≤ ↑(Nat.succ n)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : b ≤ 1\nr : R\n⊢ clog b r = 0\n[PROOFSTEP]\nrw [← neg_log_inv_eq_clog, log_of_left_le_one hb, neg_zero]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\n⊢ r ≤ ↑b ^ clog b r\n[PROOFSTEP]\ncases' le_or_lt r 0 with hr hr\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : r ≤ 0\n⊢ r ≤ ↑b ^ clog b r\n[PROOFSTEP]\nrw [clog_of_right_le_zero _ hr, zpow_zero]\n[GOAL]\ncase inl\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : r ≤ 0\n⊢ r ≤ 1\n[PROOFSTEP]\nexact hr.trans zero_le_one\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\n⊢ r ≤ ↑b ^ clog b r\n[PROOFSTEP]\nrw [← neg_log_inv_eq_clog, zpow_neg, le_inv hr (zpow_pos_of_pos _ _)]\n[GOAL]\ncase inr\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\n⊢ ↑b ^ log b r⁻¹ ≤ r⁻¹\n[PROOFSTEP]\nexact zpow_log_le_self hb (inv_pos.mpr hr)\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nr : R\nhr : 0 < r\n⊢ 0 < ↑b\n[PROOFSTEP]\nexact Nat.cast_pos.mpr (zero_le_one.trans_lt hb)\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhb : 1 < b\nhr : 0 < r\n⊢ ↑b ^ (clog b r - 1) < r\n[PROOFSTEP]\nrw [← neg_log_inv_eq_clog, ← neg_add', zpow_neg, inv_lt _ hr]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhb : 1 < b\nhr : 0 < r\n⊢ r⁻¹ < ↑b ^ (log b r⁻¹ + 1)\n[PROOFSTEP]\nexact lt_zpow_succ_log_self hb _\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr : R\nhb : 1 < b\nhr : 0 < r\n⊢ 0 < ↑b ^ (log b r⁻¹ + 1)\n[PROOFSTEP]\nexact zpow_pos_of_pos (Nat.cast_pos.mpr <| zero_le_one.trans_lt hb) _\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\n⊢ clog b 1 = 0\n[PROOFSTEP]\nrw [clog_of_one_le_right _ le_rfl, Nat.ceil_one, Nat.clog_one_right, Int.ofNat_zero]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nz : ℤ\n⊢ clog b (↑b ^ z) = z\n[PROOFSTEP]\nrw [← neg_log_inv_eq_clog, ← zpow_neg, log_zpow hb, neg_neg]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\n⊢ clog b r₁ ≤ clog b r₂\n[PROOFSTEP]\nrw [← neg_log_inv_eq_clog, ← neg_log_inv_eq_clog, neg_le_neg_iff]\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nr₁ r₂ : R\nh₀ : 0 < r₁\nh : r₁ ≤ r₂\n⊢ log b r₂⁻¹ ≤ log b r₁⁻¹\n[PROOFSTEP]\nexact log_mono_right (inv_pos.mpr <| h₀.trans_le h) (inv_le_inv_of_le h₀ h)\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nz : ℤ\n⊢ 0 < ↑b\n[PROOFSTEP]\nexact_mod_cast zero_lt_one.trans hb\n[GOAL]\nR : Type u_1\ninst✝¹ : LinearOrderedSemifield R\ninst✝ : FloorSemiring R\nb : ℕ\nhb : 1 < b\nz₁ z₂ : ℤ\nhz : z₁ ≤ z₂\n⊢ 1 < ↑b\n[PROOFSTEP]\nexact_mod_cast hb\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Log", "llama_tokens": 10753, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6334102636778401, "lm_q2_score": 0.600188359260205, "lm_q1q2_score": 0.38016546689537667}}
{"text": "[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ map Prod.swap (Filter.lift' (𝓤 α) gen) ≤ Filter.lift' (𝓤 α) gen\n[PROOFSTEP]\nlet f := fun s : Set (α × α) => {p : CauchyFilter α × CauchyFilter α | s ∈ (p.2.val ×ˢ p.1.val : Filter (α × α))}\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : Set (α × α) → Set (CauchyFilter α × CauchyFilter α) := fun s => {p | s ∈ ↑p.snd ×ˢ ↑p.fst}\n⊢ map Prod.swap (Filter.lift' (𝓤 α) gen) ≤ Filter.lift' (𝓤 α) gen\n[PROOFSTEP]\nhave h₁ : map Prod.swap ((𝓤 α).lift' gen) = (𝓤 α).lift' f :=\n  by\n  delta gen\n  simp [map_lift'_eq, monotone_setOf, Filter.monotone_mem, Function.comp, image_swap_eq_preimage_swap]\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : Set (α × α) → Set (CauchyFilter α × CauchyFilter α) := fun s => {p | s ∈ ↑p.snd ×ˢ ↑p.fst}\n⊢ map Prod.swap (Filter.lift' (𝓤 α) gen) = Filter.lift' (𝓤 α) f\n[PROOFSTEP]\ndelta gen\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : Set (α × α) → Set (CauchyFilter α × CauchyFilter α) := fun s => {p | s ∈ ↑p.snd ×ˢ ↑p.fst}\n⊢ map Prod.swap (Filter.lift' (𝓤 α) fun s => {p | s ∈ ↑p.fst ×ˢ ↑p.snd}) = Filter.lift' (𝓤 α) f\n[PROOFSTEP]\nsimp [map_lift'_eq, monotone_setOf, Filter.monotone_mem, Function.comp, image_swap_eq_preimage_swap]\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : Set (α × α) → Set (CauchyFilter α × CauchyFilter α) := fun s => {p | s ∈ ↑p.snd ×ˢ ↑p.fst}\nh₁ : map Prod.swap (Filter.lift' (𝓤 α) gen) = Filter.lift' (𝓤 α) f\n⊢ map Prod.swap (Filter.lift' (𝓤 α) gen) ≤ Filter.lift' (𝓤 α) gen\n[PROOFSTEP]\nhave h₂ : (𝓤 α).lift' f ≤ (𝓤 α).lift' gen :=\n  uniformity_lift_le_swap\n    (monotone_principal.comp (monotone_setOf fun p => @Filter.monotone_mem _ (p.2.val ×ˢ p.1.val)))\n    (by\n      have h := fun p : CauchyFilter α × CauchyFilter α => @Filter.prod_comm _ _ p.2.val p.1.val\n      simp [Function.comp, h, mem_map']\n      exact le_rfl)\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : Set (α × α) → Set (CauchyFilter α × CauchyFilter α) := fun s => {p | s ∈ ↑p.snd ×ˢ ↑p.fst}\nh₁ : map Prod.swap (Filter.lift' (𝓤 α) gen) = Filter.lift' (𝓤 α) f\n⊢ (Filter.lift (𝓤 α) fun s => (𝓟 ∘ f) (Prod.swap ⁻¹' s)) ≤ Filter.lift' (𝓤 α) gen\n[PROOFSTEP]\nhave h := fun p : CauchyFilter α × CauchyFilter α => @Filter.prod_comm _ _ p.2.val p.1.val\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : Set (α × α) → Set (CauchyFilter α × CauchyFilter α) := fun s => {p | s ∈ ↑p.snd ×ˢ ↑p.fst}\nh₁ : map Prod.swap (Filter.lift' (𝓤 α) gen) = Filter.lift' (𝓤 α) f\nh : ∀ (p : CauchyFilter α × CauchyFilter α), ↑p.snd ×ˢ ↑p.fst = map (fun p => (p.snd, p.fst)) (↑p.fst ×ˢ ↑p.snd)\n⊢ (Filter.lift (𝓤 α) fun s => (𝓟 ∘ f) (Prod.swap ⁻¹' s)) ≤ Filter.lift' (𝓤 α) gen\n[PROOFSTEP]\nsimp [Function.comp, h, mem_map']\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : Set (α × α) → Set (CauchyFilter α × CauchyFilter α) := fun s => {p | s ∈ ↑p.snd ×ˢ ↑p.fst}\nh₁ : map Prod.swap (Filter.lift' (𝓤 α) gen) = Filter.lift' (𝓤 α) f\nh : ∀ (p : CauchyFilter α × CauchyFilter α), ↑p.snd ×ˢ ↑p.fst = map (fun p => (p.snd, p.fst)) (↑p.fst ×ˢ ↑p.snd)\n⊢ (Filter.lift (𝓤 α) fun s => 𝓟 {p | (fun p => (p.snd, p.fst)) ⁻¹' (Prod.swap ⁻¹' s) ∈ ↑p.fst ×ˢ ↑p.snd}) ≤\n    Filter.lift' (𝓤 α) gen\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : Set (α × α) → Set (CauchyFilter α × CauchyFilter α) := fun s => {p | s ∈ ↑p.snd ×ˢ ↑p.fst}\nh₁ : map Prod.swap (Filter.lift' (𝓤 α) gen) = Filter.lift' (𝓤 α) f\nh₂ : Filter.lift' (𝓤 α) f ≤ Filter.lift' (𝓤 α) gen\n⊢ map Prod.swap (Filter.lift' (𝓤 α) gen) ≤ Filter.lift' (𝓤 α) gen\n[PROOFSTEP]\nexact h₁.trans_le h₂\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ (Filter.lift' (Filter.lift' (𝓤 α) gen) fun s => s ○ s) = Filter.lift' (𝓤 α) fun s => gen s ○ gen s\n[PROOFSTEP]\nrw [lift'_lift'_assoc]\n[GOAL]\ncase hg\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ Monotone gen\n[PROOFSTEP]\nexact monotone_gen\n[GOAL]\ncase hh\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ Monotone fun s => s ○ s\n[PROOFSTEP]\nexact monotone_id.compRel monotone_id\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ (Filter.lift' (𝓤 α) fun s => gen (s ○ s)) = Filter.lift' (Filter.lift' (𝓤 α) fun s => s ○ s) gen\n[PROOFSTEP]\nrw [lift'_lift'_assoc]\n[GOAL]\ncase hg\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ Monotone fun s => s ○ s\n[PROOFSTEP]\nexact monotone_id.compRel monotone_id\n[GOAL]\ncase hh\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ Monotone gen\n[PROOFSTEP]\nexact monotone_gen\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (CauchyFilter α × CauchyFilter α)\n⊢ s ∈ 𝓤 (CauchyFilter α) ↔ ∃ t, t ∈ 𝓤 α ∧ ∀ (f g : CauchyFilter α), t ∈ ↑f ×ˢ ↑g → (f, g) ∈ s\n[PROOFSTEP]\nrefine mem_uniformity.trans (exists_congr (fun t => and_congr_right_iff.mpr (fun _h => ?_)))\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (CauchyFilter α × CauchyFilter α)\nt : Set (α × α)\n_h : t ∈ 𝓤 α\n⊢ gen t ⊆ s ↔ ∀ (f g : CauchyFilter α), t ∈ ↑f ×ˢ ↑g → (f, g) ∈ s\n[PROOFSTEP]\nexact ⟨fun h _f _g ht => h ht, fun h _p hp => h _ _ hp⟩\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\ns : Set (α × α)\nx✝ : α × α\na₁ a₂ : α\n⊢ (a₁, a₂) ∈ ((preimage fun x => (pureCauchy x.fst, pureCauchy x.snd)) ∘ gen) s ↔ (a₁, a₂) ∈ id s\n[PROOFSTEP]\nsimp [preimage, gen, pureCauchy, prod_principal_principal]\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nthis : (preimage fun x => (pureCauchy x.fst, pureCauchy x.snd)) ∘ gen = id\n⊢ Filter.lift' (𝓤 α) ((preimage fun x => (pureCauchy x.fst, pureCauchy x.snd)) ∘ gen) = 𝓤 α\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : CauchyFilter α\n⊢ f ∈ closure (range pureCauchy)\n[PROOFSTEP]\nhave h_ex : ∀ s ∈ 𝓤 (CauchyFilter α), ∃ y : α, (f, pureCauchy y) ∈ s := fun s hs =>\n  let ⟨t'', ht''₁, (ht''₂ : gen t'' ⊆ s)⟩ := (mem_lift'_sets monotone_gen).mp hs\n  let ⟨t', ht'₁, ht'₂⟩ := comp_mem_uniformity_sets ht''₁\n  have : t' ∈ f.val ×ˢ f.val := f.property.right ht'₁\n  let ⟨t, ht, (h : t ×ˢ t ⊆ t')⟩ := mem_prod_same_iff.mp this\n  let ⟨x, (hx : x ∈ t)⟩ := f.property.left.nonempty_of_mem ht\n  have : t'' ∈ f.val ×ˢ pure x :=\n    mem_prod_iff.mpr\n      ⟨t, ht, {y : α | (x, y) ∈ t'}, h <| mk_mem_prod hx hx, fun ⟨a, b⟩ ⟨(h₁ : a ∈ t), (h₂ : (x, b) ∈ t')⟩ =>\n        ht'₂ <| prod_mk_mem_compRel (@h (a, x) ⟨h₁, hx⟩) h₂⟩\n  ⟨x, ht''₂ <| by dsimp [gen]; exact this⟩\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : CauchyFilter α\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ 𝓤 (CauchyFilter α)\nt'' : Set (α × α)\nht''₁ : t'' ∈ 𝓤 α\nht''₂ : gen t'' ⊆ s\nt' : Set (α × α)\nht'₁ : t' ∈ 𝓤 α\nht'₂ : t' ○ t' ⊆ t''\nthis✝ : t' ∈ ↑f ×ˢ ↑f\nt : Set α\nht : t ∈ ↑f\nh : t ×ˢ t ⊆ t'\nx : α\nhx : x ∈ t\nthis : t'' ∈ ↑f ×ˢ pure x\n⊢ (f, pureCauchy x) ∈ gen t''\n[PROOFSTEP]\ndsimp [gen]\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : CauchyFilter α\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ 𝓤 (CauchyFilter α)\nt'' : Set (α × α)\nht''₁ : t'' ∈ 𝓤 α\nht''₂ : gen t'' ⊆ s\nt' : Set (α × α)\nht'₁ : t' ∈ 𝓤 α\nht'₂ : t' ○ t' ⊆ t''\nthis✝ : t' ∈ ↑f ×ˢ ↑f\nt : Set α\nht : t ∈ ↑f\nh : t ×ˢ t ⊆ t'\nx : α\nhx : x ∈ t\nthis : t'' ∈ ↑f ×ˢ pure x\n⊢ t'' ∈ ↑f ×ˢ ↑(pureCauchy x)\n[PROOFSTEP]\nexact this\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : CauchyFilter α\nh_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s\n⊢ f ∈ closure (range pureCauchy)\n[PROOFSTEP]\nsimp only [closure_eq_cluster_pts, ClusterPt, nhds_eq_uniformity, lift'_inf_principal_eq,\n  Set.inter_comm _ (range pureCauchy), mem_setOf_eq]\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : CauchyFilter α\nh_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s\n⊢ NeBot (Filter.lift' (𝓤 (CauchyFilter α)) fun t => range pureCauchy ∩ UniformSpace.ball f t)\n[PROOFSTEP]\nrefine (lift'_neBot_iff ?_).mpr (fun s hs => ?_)\n[GOAL]\ncase refine_1\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : CauchyFilter α\nh_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s\n⊢ Monotone fun t => range pureCauchy ∩ UniformSpace.ball f t\n[PROOFSTEP]\nrefine monotone_const.inter ?_\n[GOAL]\ncase refine_1\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : CauchyFilter α\nh_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s\n⊢ Monotone fun t => UniformSpace.ball f t\n[PROOFSTEP]\nsimp_rw [UniformSpace.ball]\n[GOAL]\ncase refine_1\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : CauchyFilter α\nh_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s\n⊢ Monotone fun t => Prod.mk f ⁻¹' t\n[PROOFSTEP]\nexact monotone_preimage\n[GOAL]\ncase refine_2\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : CauchyFilter α\nh_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ 𝓤 (CauchyFilter α)\n⊢ Set.Nonempty (range pureCauchy ∩ UniformSpace.ball f s)\n[PROOFSTEP]\nlet ⟨y, hy⟩ := h_ex s hs\n[GOAL]\ncase refine_2\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : CauchyFilter α\nh_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ 𝓤 (CauchyFilter α)\ny : α\nhy : (f, pureCauchy y) ∈ s\n⊢ Set.Nonempty (range pureCauchy ∩ UniformSpace.ball f s)\n[PROOFSTEP]\nhave : pureCauchy y ∈ range pureCauchy ∩ {y : CauchyFilter α | (f, y) ∈ s} := ⟨mem_range_self y, hy⟩\n[GOAL]\ncase refine_2\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : CauchyFilter α\nh_ex : ∀ (s : Set (CauchyFilter α × CauchyFilter α)), s ∈ 𝓤 (CauchyFilter α) → ∃ y, (f, pureCauchy y) ∈ s\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ 𝓤 (CauchyFilter α)\ny : α\nhy : (f, pureCauchy y) ∈ s\nthis : pureCauchy y ∈ range pureCauchy ∩ {y | (f, y) ∈ s}\n⊢ Set.Nonempty (range pureCauchy ∩ UniformSpace.ball f s)\n[PROOFSTEP]\nexact ⟨_, this⟩\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ Nonempty (CauchyFilter α) ↔ Nonempty α\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ Nonempty (CauchyFilter α) → Nonempty α\n[PROOFSTEP]\nrintro ⟨c⟩\n[GOAL]\ncase mpr\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ Nonempty α → Nonempty (CauchyFilter α)\n[PROOFSTEP]\nrintro ⟨c⟩\n[GOAL]\ncase mp.intro\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nc : CauchyFilter α\n⊢ Nonempty α\n[PROOFSTEP]\nhave := eq_univ_iff_forall.1 denseEmbedding_pureCauchy.toDenseInducing.closure_range c\n[GOAL]\ncase mp.intro\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nc : CauchyFilter α\nthis : c ∈ closure (range pureCauchy)\n⊢ Nonempty α\n[PROOFSTEP]\nobtain ⟨_, ⟨_, a, _⟩⟩ := mem_closure_iff.1 this _ isOpen_univ trivial\n[GOAL]\ncase mp.intro.intro.intro.intro\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nc : CauchyFilter α\nthis : c ∈ closure (range pureCauchy)\nw✝ : CauchyFilter α\nleft✝ : w✝ ∈ univ\na : α\nh✝ : pureCauchy a = w✝\n⊢ Nonempty α\n[PROOFSTEP]\nexact ⟨a⟩\n[GOAL]\ncase mpr.intro\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nc : α\n⊢ Nonempty (CauchyFilter α)\n[PROOFSTEP]\nexact ⟨pureCauchy c⟩\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : Filter α\nhf : Cauchy f\nf' : CauchyFilter α := { val := f, property := hf }\nthis : map pureCauchy f ≤ Filter.lift' (𝓤 (CauchyFilter α)) (preimage (Prod.mk f'))\n⊢ map pureCauchy f ≤ 𝓝 f'\n[PROOFSTEP]\nsimp [nhds_eq_uniformity]\n[GOAL]\nα : Type u\ninst✝² : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : Filter α\nhf : Cauchy f\nf' : CauchyFilter α := { val := f, property := hf }\nthis : map pureCauchy f ≤ Filter.lift' (𝓤 (CauchyFilter α)) (preimage (Prod.mk f'))\n⊢ map pureCauchy f ≤ Filter.lift' (𝓤 (CauchyFilter α)) (UniformSpace.ball { val := f, property := hf })\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\ninst✝³ : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace β\nf : α → β\nhf : UniformContinuous f\na : α\n⊢ extend f (pureCauchy a) = f a\n[PROOFSTEP]\nrw [extend, if_pos hf]\n[GOAL]\nα : Type u\ninst✝³ : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace β\nf : α → β\nhf : UniformContinuous f\na : α\n⊢ DenseInducing.extend (_ : DenseInducing pureCauchy) f (pureCauchy a) = f a\n[PROOFSTEP]\nexact uniformly_extend_of_ind uniformInducing_pureCauchy denseRange_pureCauchy hf _\n[GOAL]\nα : Type u\ninst✝³ : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : CompleteSpace β\nf : α → β\n⊢ UniformContinuous (extend f)\n[PROOFSTEP]\nby_cases hf : UniformContinuous f\n[GOAL]\ncase pos\nα : Type u\ninst✝³ : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : CompleteSpace β\nf : α → β\nhf : UniformContinuous f\n⊢ UniformContinuous (extend f)\n[PROOFSTEP]\nrw [extend, if_pos hf]\n[GOAL]\ncase pos\nα : Type u\ninst✝³ : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : CompleteSpace β\nf : α → β\nhf : UniformContinuous f\n⊢ UniformContinuous (DenseInducing.extend (_ : DenseInducing pureCauchy) f)\n[PROOFSTEP]\nexact uniformContinuous_uniformly_extend uniformInducing_pureCauchy denseRange_pureCauchy hf\n[GOAL]\ncase neg\nα : Type u\ninst✝³ : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : CompleteSpace β\nf : α → β\nhf : ¬UniformContinuous f\n⊢ UniformContinuous (extend f)\n[PROOFSTEP]\nrw [extend, if_neg hf]\n[GOAL]\ncase neg\nα : Type u\ninst✝³ : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : CompleteSpace β\nf : α → β\nhf : ¬UniformContinuous f\n⊢ UniformContinuous fun x => f (Nonempty.some (_ : Nonempty α))\n[PROOFSTEP]\nexact uniformContinuous_of_const fun a _b => by congr\n[GOAL]\nα : Type u\ninst✝³ : UniformSpace α\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : CompleteSpace β\nf : α → β\nhf : ¬UniformContinuous f\na _b : CauchyFilter α\n⊢ f (Nonempty.some (_ : Nonempty α)) = f (Nonempty.some (_ : Nonempty α))\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\n⊢ lim ↑f = lim ↑g ↔ (f, g) ∈ 𝓢 (CauchyFilter α)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\n⊢ lim ↑f = lim ↑g → (f, g) ∈ 𝓢 (CauchyFilter α)\n[PROOFSTEP]\nintro e s hs\n[GOAL]\ncase mp\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\ne : lim ↑f = lim ↑g\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ (𝓤 (CauchyFilter α)).sets\n⊢ (f, g) ∈ s\n[PROOFSTEP]\nrcases CauchyFilter.mem_uniformity'.1 hs with ⟨t, tu, ts⟩\n[GOAL]\ncase mp.intro.intro\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\ne : lim ↑f = lim ↑g\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ (𝓤 (CauchyFilter α)).sets\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nts : ∀ (f g : CauchyFilter α), t ∈ ↑f ×ˢ ↑g → (f, g) ∈ s\n⊢ (f, g) ∈ s\n[PROOFSTEP]\napply ts\n[GOAL]\ncase mp.intro.intro.a\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\ne : lim ↑f = lim ↑g\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ (𝓤 (CauchyFilter α)).sets\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nts : ∀ (f g : CauchyFilter α), t ∈ ↑f ×ˢ ↑g → (f, g) ∈ s\n⊢ t ∈ ↑f ×ˢ ↑g\n[PROOFSTEP]\nrcases comp_mem_uniformity_sets tu with ⟨d, du, dt⟩\n[GOAL]\ncase mp.intro.intro.a.intro.intro\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\ne : lim ↑f = lim ↑g\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ (𝓤 (CauchyFilter α)).sets\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nts : ∀ (f g : CauchyFilter α), t ∈ ↑f ×ˢ ↑g → (f, g) ∈ s\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndt : d ○ d ⊆ t\n⊢ t ∈ ↑f ×ˢ ↑g\n[PROOFSTEP]\nrefine'\n  mem_prod_iff.2\n    ⟨_, f.2.le_nhds_lim (mem_nhds_right (lim f.1) du), _, g.2.le_nhds_lim (mem_nhds_left (lim g.1) du), fun x h => _⟩\n[GOAL]\ncase mp.intro.intro.a.intro.intro\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\ne : lim ↑f = lim ↑g\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ (𝓤 (CauchyFilter α)).sets\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nts : ∀ (f g : CauchyFilter α), t ∈ ↑f ×ˢ ↑g → (f, g) ∈ s\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndt : d ○ d ⊆ t\nx : α × α\nh : x ∈ {x | (x, lim ↑f) ∈ d} ×ˢ {y | (lim ↑g, y) ∈ d}\n⊢ x ∈ t\n[PROOFSTEP]\ncases' x with a b\n[GOAL]\ncase mp.intro.intro.a.intro.intro.mk\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\ne : lim ↑f = lim ↑g\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ (𝓤 (CauchyFilter α)).sets\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nts : ∀ (f g : CauchyFilter α), t ∈ ↑f ×ˢ ↑g → (f, g) ∈ s\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndt : d ○ d ⊆ t\na b : α\nh : (a, b) ∈ {x | (x, lim ↑f) ∈ d} ×ˢ {y | (lim ↑g, y) ∈ d}\n⊢ (a, b) ∈ t\n[PROOFSTEP]\ncases' h with h₁ h₂\n[GOAL]\ncase mp.intro.intro.a.intro.intro.mk.intro\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\ne : lim ↑f = lim ↑g\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ (𝓤 (CauchyFilter α)).sets\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nts : ∀ (f g : CauchyFilter α), t ∈ ↑f ×ˢ ↑g → (f, g) ∈ s\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndt : d ○ d ⊆ t\na b : α\nh₁ : (a, b).fst ∈ {x | (x, lim ↑f) ∈ d}\nh₂ : (a, b).snd ∈ {y | (lim ↑g, y) ∈ d}\n⊢ (a, b) ∈ t\n[PROOFSTEP]\nrw [← e] at h₂ \n[GOAL]\ncase mp.intro.intro.a.intro.intro.mk.intro\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\ne : lim ↑f = lim ↑g\ns : Set (CauchyFilter α × CauchyFilter α)\nhs : s ∈ (𝓤 (CauchyFilter α)).sets\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nts : ∀ (f g : CauchyFilter α), t ∈ ↑f ×ˢ ↑g → (f, g) ∈ s\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndt : d ○ d ⊆ t\na b : α\nh₁ : (a, b).fst ∈ {x | (x, lim ↑f) ∈ d}\nh₂ : (a, b).snd ∈ {y | (lim ↑f, y) ∈ d}\n⊢ (a, b) ∈ t\n[PROOFSTEP]\nexact dt ⟨_, h₁, h₂⟩\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\n⊢ (f, g) ∈ 𝓢 (CauchyFilter α) → lim ↑f = lim ↑g\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\nH : (f, g) ∈ 𝓢 (CauchyFilter α)\n⊢ lim ↑f = lim ↑g\n[PROOFSTEP]\nrefine' separated_def.1 (by infer_instance) _ _ fun t tu => _\n[GOAL]\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\nH : (f, g) ∈ 𝓢 (CauchyFilter α)\n⊢ SeparatedSpace α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\nH : (f, g) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\n⊢ (lim ↑f, lim ↑g) ∈ t\n[PROOFSTEP]\nrcases mem_uniformity_isClosed tu with ⟨d, du, dc, dt⟩\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf g : CauchyFilter α\nH : (f, g) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\n⊢ (lim ↑f, lim ↑g) ∈ t\n[PROOFSTEP]\nrefine' H {p | (lim p.1.1, lim p.2.1) ∈ t} (CauchyFilter.mem_uniformity'.2 ⟨d, du, fun f g h => _⟩)\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝ g✝ : CauchyFilter α\nH : (f✝, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf g : CauchyFilter α\nh : d ∈ ↑f ×ˢ ↑g\n⊢ (f, g) ∈ {p | (lim ↑p.fst, lim ↑p.snd) ∈ t}\n[PROOFSTEP]\nrcases mem_prod_iff.1 h with ⟨x, xf, y, yg, h⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝ g✝ : CauchyFilter α\nH : (f✝, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf g : CauchyFilter α\nh✝ : d ∈ ↑f ×ˢ ↑g\nx : Set α\nxf : x ∈ ↑f\ny : Set α\nyg : y ∈ ↑g\nh : x ×ˢ y ⊆ d\n⊢ (f, g) ∈ {p | (lim ↑p.fst, lim ↑p.snd) ∈ t}\n[PROOFSTEP]\nhave limc : ∀ (f : CauchyFilter α), ∀ x ∈ f.1, lim f.1 ∈ closure x :=\n  by\n  intro f x xf\n  rw [closure_eq_cluster_pts]\n  exact f.2.1.mono (le_inf f.2.le_nhds_lim (le_principal_iff.2 xf))\n[GOAL]\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝ g✝ : CauchyFilter α\nH : (f✝, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf g : CauchyFilter α\nh✝ : d ∈ ↑f ×ˢ ↑g\nx : Set α\nxf : x ∈ ↑f\ny : Set α\nyg : y ∈ ↑g\nh : x ×ˢ y ⊆ d\n⊢ ∀ (f : CauchyFilter α) (x : Set α), x ∈ ↑f → lim ↑f ∈ closure x\n[PROOFSTEP]\nintro f x xf\n[GOAL]\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝¹ g✝ : CauchyFilter α\nH : (f✝¹, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf✝ g : CauchyFilter α\nh✝ : d ∈ ↑f✝ ×ˢ ↑g\nx✝ : Set α\nxf✝ : x✝ ∈ ↑f✝\ny : Set α\nyg : y ∈ ↑g\nh : x✝ ×ˢ y ⊆ d\nf : CauchyFilter α\nx : Set α\nxf : x ∈ ↑f\n⊢ lim ↑f ∈ closure x\n[PROOFSTEP]\nrw [closure_eq_cluster_pts]\n[GOAL]\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝¹ g✝ : CauchyFilter α\nH : (f✝¹, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf✝ g : CauchyFilter α\nh✝ : d ∈ ↑f✝ ×ˢ ↑g\nx✝ : Set α\nxf✝ : x✝ ∈ ↑f✝\ny : Set α\nyg : y ∈ ↑g\nh : x✝ ×ˢ y ⊆ d\nf : CauchyFilter α\nx : Set α\nxf : x ∈ ↑f\n⊢ lim ↑f ∈ {a | ClusterPt a (𝓟 x)}\n[PROOFSTEP]\nexact f.2.1.mono (le_inf f.2.le_nhds_lim (le_principal_iff.2 xf))\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝ g✝ : CauchyFilter α\nH : (f✝, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf g : CauchyFilter α\nh✝ : d ∈ ↑f ×ˢ ↑g\nx : Set α\nxf : x ∈ ↑f\ny : Set α\nyg : y ∈ ↑g\nh : x ×ˢ y ⊆ d\nlimc : ∀ (f : CauchyFilter α) (x : Set α), x ∈ ↑f → lim ↑f ∈ closure x\n⊢ (f, g) ∈ {p | (lim ↑p.fst, lim ↑p.snd) ∈ t}\n[PROOFSTEP]\nhave := dc.closure_subset_iff.2 h\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝ g✝ : CauchyFilter α\nH : (f✝, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf g : CauchyFilter α\nh✝ : d ∈ ↑f ×ˢ ↑g\nx : Set α\nxf : x ∈ ↑f\ny : Set α\nyg : y ∈ ↑g\nh : x ×ˢ y ⊆ d\nlimc : ∀ (f : CauchyFilter α) (x : Set α), x ∈ ↑f → lim ↑f ∈ closure x\nthis : closure (x ×ˢ y) ⊆ d\n⊢ (f, g) ∈ {p | (lim ↑p.fst, lim ↑p.snd) ∈ t}\n[PROOFSTEP]\nrw [closure_prod_eq] at this \n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝ g✝ : CauchyFilter α\nH : (f✝, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf g : CauchyFilter α\nh✝ : d ∈ ↑f ×ˢ ↑g\nx : Set α\nxf : x ∈ ↑f\ny : Set α\nyg : y ∈ ↑g\nh : x ×ˢ y ⊆ d\nlimc : ∀ (f : CauchyFilter α) (x : Set α), x ∈ ↑f → lim ↑f ∈ closure x\nthis : closure x ×ˢ closure y ⊆ d\n⊢ (f, g) ∈ {p | (lim ↑p.fst, lim ↑p.snd) ∈ t}\n[PROOFSTEP]\nrefine' dt (this ⟨_, _⟩)\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝ g✝ : CauchyFilter α\nH : (f✝, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf g : CauchyFilter α\nh✝ : d ∈ ↑f ×ˢ ↑g\nx : Set α\nxf : x ∈ ↑f\ny : Set α\nyg : y ∈ ↑g\nh : x ×ˢ y ⊆ d\nlimc : ∀ (f : CauchyFilter α) (x : Set α), x ∈ ↑f → lim ↑f ∈ closure x\nthis : closure x ×ˢ closure y ⊆ d\n⊢ (lim ↑(f, g).fst, lim ↑(f, g).snd).fst ∈ closure x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝ g✝ : CauchyFilter α\nH : (f✝, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf g : CauchyFilter α\nh✝ : d ∈ ↑f ×ˢ ↑g\nx : Set α\nxf : x ∈ ↑f\ny : Set α\nyg : y ∈ ↑g\nh : x ×ˢ y ⊆ d\nlimc : ∀ (f : CauchyFilter α) (x : Set α), x ∈ ↑f → lim ↑f ∈ closure x\nthis : closure x ×ˢ closure y ⊆ d\n⊢ (lim ↑(f, g).fst, lim ↑(f, g).snd).snd ∈ closure y\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝ g✝ : CauchyFilter α\nH : (f✝, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf g : CauchyFilter α\nh✝ : d ∈ ↑f ×ˢ ↑g\nx : Set α\nxf : x ∈ ↑f\ny : Set α\nyg : y ∈ ↑g\nh : x ×ˢ y ⊆ d\nlimc : ∀ (f : CauchyFilter α) (x : Set α), x ∈ ↑f → lim ↑f ∈ closure x\nthis : closure x ×ˢ closure y ⊆ d\n⊢ lim ↑f ∈ closure x\n[PROOFSTEP]\napply limc\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝ g✝ : CauchyFilter α\nH : (f✝, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf g : CauchyFilter α\nh✝ : d ∈ ↑f ×ˢ ↑g\nx : Set α\nxf : x ∈ ↑f\ny : Set α\nyg : y ∈ ↑g\nh : x ×ˢ y ⊆ d\nlimc : ∀ (f : CauchyFilter α) (x : Set α), x ∈ ↑f → lim ↑f ∈ closure x\nthis : closure x ×ˢ closure y ⊆ d\n⊢ lim ↑g ∈ closure y\n[PROOFSTEP]\napply limc\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.refine'_1.a\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝ g✝ : CauchyFilter α\nH : (f✝, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf g : CauchyFilter α\nh✝ : d ∈ ↑f ×ˢ ↑g\nx : Set α\nxf : x ∈ ↑f\ny : Set α\nyg : y ∈ ↑g\nh : x ×ˢ y ⊆ d\nlimc : ∀ (f : CauchyFilter α) (x : Set α), x ∈ ↑f → lim ↑f ∈ closure x\nthis : closure x ×ˢ closure y ⊆ d\n⊢ x ∈ ↑f\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.refine'_2.a\nα : Type u_1\ninst✝³ : Inhabited α\ninst✝² : UniformSpace α\ninst✝¹ : CompleteSpace α\ninst✝ : SeparatedSpace α\nf✝ g✝ : CauchyFilter α\nH : (f✝, g✝) ∈ 𝓢 (CauchyFilter α)\nt : Set (α × α)\ntu : t ∈ 𝓤 α\nd : Set (α × α)\ndu : d ∈ 𝓤 α\ndc : IsClosed d\ndt : d ⊆ t\nf g : CauchyFilter α\nh✝ : d ∈ ↑f ×ˢ ↑g\nx : Set α\nxf : x ∈ ↑f\ny : Set α\nyg : y ∈ ↑g\nh : x ×ˢ y ⊆ d\nlimc : ∀ (f : CauchyFilter α) (x : Set α), x ∈ ↑f → lim ↑f ∈ closure x\nthis : closure x ×ˢ closure y ⊆ d\n⊢ y ∈ ↑g\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\ninst✝ : UniformSpace α\ns : SeparatedSpace α\na b : α\nh :\n  (fun a => Quotient.mk (UniformSpace.separationSetoid (CauchyFilter α)) (pureCauchy a)) a =\n    (fun a => Quotient.mk (UniformSpace.separationSetoid (CauchyFilter α)) (pureCauchy a)) b\n⊢ a = b\n[PROOFSTEP]\nrefine separated_def.1 s _ _ (fun s hs => ?_)\n[GOAL]\nα : Type u_1\ninst✝ : UniformSpace α\ns✝ : SeparatedSpace α\na b : α\nh :\n  (fun a => Quotient.mk (UniformSpace.separationSetoid (CauchyFilter α)) (pureCauchy a)) a =\n    (fun a => Quotient.mk (UniformSpace.separationSetoid (CauchyFilter α)) (pureCauchy a)) b\ns : Set (α × α)\nhs : s ∈ 𝓤 α\n⊢ (a, b) ∈ s\n[PROOFSTEP]\nrw [← (@uniformEmbedding_pureCauchy α _).comap_uniformity, Filter.mem_comap] at hs \n[GOAL]\nα : Type u_1\ninst✝ : UniformSpace α\ns✝ : SeparatedSpace α\na b : α\nh :\n  (fun a => Quotient.mk (UniformSpace.separationSetoid (CauchyFilter α)) (pureCauchy a)) a =\n    (fun a => Quotient.mk (UniformSpace.separationSetoid (CauchyFilter α)) (pureCauchy a)) b\ns : Set (α × α)\nhs : ∃ t, t ∈ 𝓤 (CauchyFilter α) ∧ (fun x => (pureCauchy x.fst, pureCauchy x.snd)) ⁻¹' t ⊆ s\n⊢ (a, b) ∈ s\n[PROOFSTEP]\nobtain ⟨t, ht, hts⟩ := hs\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝ : UniformSpace α\ns✝ : SeparatedSpace α\na b : α\nh :\n  (fun a => Quotient.mk (UniformSpace.separationSetoid (CauchyFilter α)) (pureCauchy a)) a =\n    (fun a => Quotient.mk (UniformSpace.separationSetoid (CauchyFilter α)) (pureCauchy a)) b\ns : Set (α × α)\nt : Set (CauchyFilter α × CauchyFilter α)\nht : t ∈ 𝓤 (CauchyFilter α)\nhts : (fun x => (pureCauchy x.fst, pureCauchy x.snd)) ⁻¹' t ⊆ s\n⊢ (a, b) ∈ s\n[PROOFSTEP]\nexact @hts (a, b) (Quotient.exact h t ht)\n[GOAL]\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\nh : CompleteSpace α\n⊢ CompleteSpace (Quotient (separationSetoid α))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase complete\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\nh : CompleteSpace α\n⊢ ∀ {f : Filter (Quotient (separationSetoid α))}, Cauchy f → ∃ x, f ≤ 𝓝 x\n[PROOFSTEP]\nintro f hf\n[GOAL]\ncase complete\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\nh : CompleteSpace α\nf : Filter (Quotient (separationSetoid α))\nhf : Cauchy f\n⊢ ∃ x, f ≤ 𝓝 x\n[PROOFSTEP]\nhave : Cauchy (f.comap fun x => ⟦x⟧) :=\n  hf.comap' comap_quotient_le_uniformity <| hf.left.comap_of_surj (surjective_quotient_mk _)\n[GOAL]\ncase complete\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\nh : CompleteSpace α\nf : Filter (Quotient (separationSetoid α))\nhf : Cauchy f\nthis : Cauchy (Filter.comap (fun x => Quotient.mk (separationSetoid α) x) f)\n⊢ ∃ x, f ≤ 𝓝 x\n[PROOFSTEP]\nlet ⟨x, (hx : (f.comap fun x => ⟦x⟧) ≤ 𝓝 x)⟩ := CompleteSpace.complete this\n[GOAL]\ncase complete\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\nh : CompleteSpace α\nf : Filter (Quotient (separationSetoid α))\nhf : Cauchy f\nthis : Cauchy (Filter.comap (fun x => Quotient.mk (separationSetoid α) x) f)\nx : α\nhx : Filter.comap (fun x => Quotient.mk (separationSetoid α) x) f ≤ 𝓝 x\n⊢ ∃ x, f ≤ 𝓝 x\n[PROOFSTEP]\nexact ⟨⟦x⟧, (comap_le_comap_iff <| by simp).1 (hx.trans <| map_le_iff_le_comap.1 continuous_quotient_mk'.continuousAt)⟩\n[GOAL]\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\nh : CompleteSpace α\nf : Filter (Quotient (separationSetoid α))\nhf : Cauchy f\nthis : Cauchy (Filter.comap (fun x => Quotient.mk (separationSetoid α) x) f)\nx : α\nhx : Filter.comap (fun x => Quotient.mk (separationSetoid α) x) f ≤ 𝓝 x\n⊢ (range fun x => Quotient.mk (separationSetoid α) x) ∈ f\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\n⊢ Filter.comap (fun p => (↑α p.fst, ↑α p.snd)) (𝓤 (Completion α)) = 𝓤 α\n[PROOFSTEP]\nhave :\n  (fun x : α × α => ((x.1 : Completion α), (x.2 : Completion α))) =\n    (fun x : CauchyFilter α × CauchyFilter α => (⟦x.1⟧, ⟦x.2⟧)) ∘ fun x : α × α => (pureCauchy x.1, pureCauchy x.2) :=\n  by ext ⟨a, b⟩ <;> simp <;> rfl\n[GOAL]\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\n⊢ (fun x => (↑α x.fst, ↑α x.snd)) =\n    (fun x =>\n        (Quotient.mk (separationSetoid (CauchyFilter α)) x.fst,\n          Quotient.mk (separationSetoid (CauchyFilter α)) x.snd)) ∘\n      fun x => (pureCauchy x.fst, pureCauchy x.snd)\n[PROOFSTEP]\next ⟨a, b⟩\n[GOAL]\ncase h.mk.h₁\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\na b : α\n⊢ (↑α (a, b).fst, ↑α (a, b).snd).fst =\n    (((fun x =>\n            (Quotient.mk (separationSetoid (CauchyFilter α)) x.fst,\n              Quotient.mk (separationSetoid (CauchyFilter α)) x.snd)) ∘\n          fun x => (pureCauchy x.fst, pureCauchy x.snd))\n        (a, b)).fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mk.h₂\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\na b : α\n⊢ (↑α (a, b).fst, ↑α (a, b).snd).snd =\n    (((fun x =>\n            (Quotient.mk (separationSetoid (CauchyFilter α)) x.fst,\n              Quotient.mk (separationSetoid (CauchyFilter α)) x.snd)) ∘\n          fun x => (pureCauchy x.fst, pureCauchy x.snd))\n        (a, b)).snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mk.h₁\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\na b : α\n⊢ ↑α a = Quotient.mk (separationSetoid (CauchyFilter α)) (pureCauchy a)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.mk.h₂\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\na b : α\n⊢ ↑α b = Quotient.mk (separationSetoid (CauchyFilter α)) (pureCauchy b)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\nthis :\n  (fun x => (↑α x.fst, ↑α x.snd)) =\n    (fun x =>\n        (Quotient.mk (separationSetoid (CauchyFilter α)) x.fst,\n          Quotient.mk (separationSetoid (CauchyFilter α)) x.snd)) ∘\n      fun x => (pureCauchy x.fst, pureCauchy x.snd)\n⊢ Filter.comap (fun p => (↑α p.fst, ↑α p.snd)) (𝓤 (Completion α)) = 𝓤 α\n[PROOFSTEP]\nrw [this, ← Filter.comap_comap]\n[GOAL]\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\nthis :\n  (fun x => (↑α x.fst, ↑α x.snd)) =\n    (fun x =>\n        (Quotient.mk (separationSetoid (CauchyFilter α)) x.fst,\n          Quotient.mk (separationSetoid (CauchyFilter α)) x.snd)) ∘\n      fun x => (pureCauchy x.fst, pureCauchy x.snd)\n⊢ Filter.comap (fun x => (pureCauchy x.fst, pureCauchy x.snd))\n      (Filter.comap\n        (fun x =>\n          (Quotient.mk (separationSetoid (CauchyFilter α)) x.fst,\n            Quotient.mk (separationSetoid (CauchyFilter α)) x.snd))\n        (𝓤 (Completion α))) =\n    𝓤 α\n[PROOFSTEP]\nchange Filter.comap _ (Filter.comap _ (𝓤 <| Quotient <| separationSetoid <| CauchyFilter α)) = 𝓤 α\n[GOAL]\nα : Type u_1\ninst✝² : UniformSpace α\nβ : Type u_2\ninst✝¹ : UniformSpace β\nγ : Type u_3\ninst✝ : UniformSpace γ\nthis :\n  (fun x => (↑α x.fst, ↑α x.snd)) =\n    (fun x =>\n        (Quotient.mk (separationSetoid (CauchyFilter α)) x.fst,\n          Quotient.mk (separationSetoid (CauchyFilter α)) x.snd)) ∘\n      fun x => (pureCauchy x.fst, pureCauchy x.snd)\n⊢ Filter.comap (fun x => (pureCauchy x.fst, pureCauchy x.snd))\n      (Filter.comap\n        (fun x =>\n          (Quotient.mk (separationSetoid (CauchyFilter α)) x.fst,\n            Quotient.mk (separationSetoid (CauchyFilter α)) x.snd))\n        (𝓤 (Quotient (separationSetoid (CauchyFilter α))))) =\n    𝓤 α\n[PROOFSTEP]\nrw [comap_quotient_eq_uniformity, uniformEmbedding_pureCauchy.comap_uniformity]\n[GOAL]\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u_4\ninst✝ : UniformSpace α\n⊢ UniformSpace (Completion α)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u_4\ninst✝ : UniformSpace α\n⊢ CompleteSpace (Completion α)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u_4\ninst✝ : UniformSpace α\n⊢ SeparatedSpace (Completion α)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\ninst✝⁴ : UniformSpace α\nβ : Type u_2\ninst✝³ : UniformSpace β\nγ : Type u_3\ninst✝² : UniformSpace γ\nf✝ : α → β\ninst✝¹ : CompleteSpace γ\ninst✝ : SeparatedSpace γ\nf : β → γ\ng : α → β\nhf : UniformContinuous f\nhg : UniformContinuous g\n⊢ ∀ (a : α), (Completion.extension f ∘ Completion.map g) (↑α a) = Completion.extension (f ∘ g) (↑α a)\n[PROOFSTEP]\nintro a\n[GOAL]\nα : Type u_1\ninst✝⁴ : UniformSpace α\nβ : Type u_2\ninst✝³ : UniformSpace β\nγ : Type u_3\ninst✝² : UniformSpace γ\nf✝ : α → β\ninst✝¹ : CompleteSpace γ\ninst✝ : SeparatedSpace γ\nf : β → γ\ng : α → β\nhf : UniformContinuous f\nhg : UniformContinuous g\na : α\n⊢ (Completion.extension f ∘ Completion.map g) (↑α a) = Completion.extension (f ∘ g) (↑α a)\n[PROOFSTEP]\nrw [extension_coe (hf.comp hg), Function.comp_apply, map_coe hg, extension_coe hf, Function.comp_apply]\n[GOAL]\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\n⊢ Completion (SeparationQuotient α) ≃ Completion α\n[PROOFSTEP]\nrefine' ⟨Completion.extension (SeparationQuotient.lift ((↑) : α → Completion α)), Completion.map Quotient.mk', _, _⟩\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\n⊢ Function.LeftInverse (Completion.map Quotient.mk') (Completion.extension (SeparationQuotient.lift ↑α))\n[PROOFSTEP]\nintro a\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\na : Completion (SeparationQuotient α)\n⊢ Completion.map Quotient.mk' (Completion.extension (SeparationQuotient.lift ↑α) a) = a\n[PROOFSTEP]\nrefine' induction_on a (isClosed_eq (continuous_map.comp continuous_extension) continuous_id) _\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\na : Completion (SeparationQuotient α)\n⊢ ∀ (a : SeparationQuotient α),\n    Completion.map Quotient.mk' (Completion.extension (SeparationQuotient.lift ↑α) (↑(SeparationQuotient α) a)) =\n      ↑(SeparationQuotient α) a\n[PROOFSTEP]\nrintro\n  ⟨a⟩\n      -- porting note: had to insert rewrites to switch between Quot.mk, Quotient.mk, Quotient.mk'\n[GOAL]\ncase refine'_1.mk\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\na✝¹ : Completion (SeparationQuotient α)\na✝ : SeparationQuotient α\na : α\n⊢ Completion.map Quotient.mk'\n      (Completion.extension (SeparationQuotient.lift ↑α) (↑(SeparationQuotient α) (Quot.mk Setoid.r a))) =\n    ↑(SeparationQuotient α) (Quot.mk Setoid.r a)\n[PROOFSTEP]\nrw [← Quotient.mk, extension_coe (SeparationQuotient.uniformContinuous_lift _),\n  SeparationQuotient.lift_mk (uniformContinuous_coe α), map_coe]\n[GOAL]\ncase refine'_1.mk\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\na✝¹ : Completion (SeparationQuotient α)\na✝ : SeparationQuotient α\na : α\n⊢ ↑(SeparationQuotient α) (Quotient.mk' a) = ↑(SeparationQuotient α) (Quotient.mk (separationSetoid α) a)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.mk.hf\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\na✝¹ : Completion (SeparationQuotient α)\na✝ : SeparationQuotient α\na : α\n⊢ UniformContinuous Quotient.mk'\n[PROOFSTEP]\nexact uniformContinuous_quotient_mk\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\n⊢ Function.RightInverse (Completion.map Quotient.mk') (Completion.extension (SeparationQuotient.lift ↑α))\n[PROOFSTEP]\nintro a\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\na : Completion α\n⊢ Completion.extension (SeparationQuotient.lift ↑α) (Completion.map Quotient.mk' a) = a\n[PROOFSTEP]\nrefine' Completion.induction_on a (isClosed_eq (continuous_extension.comp continuous_map) continuous_id) fun a => _\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\na✝ : Completion α\na : α\n⊢ Completion.extension (SeparationQuotient.lift ↑α) (Completion.map Quotient.mk' (↑α a)) = ↑α a\n[PROOFSTEP]\nrw [map_coe]\n  -- porting note: add SeparationQuotient.lift_mk' for Quotient.mk' ?\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\na✝ : Completion α\na : α\n⊢ Completion.extension (SeparationQuotient.lift ↑α) (↑(SeparationQuotient α) (Quotient.mk' a)) = ↑α a\n[PROOFSTEP]\nrw [extension_coe (SeparationQuotient.uniformContinuous_lift _), Quotient.mk',\n  SeparationQuotient.lift_mk (uniformContinuous_coe α) _]\n[GOAL]\ncase refine'_2.hf\nα✝ : Type u_1\ninst✝³ : UniformSpace α✝\nβ : Type u_2\ninst✝² : UniformSpace β\nγ : Type u_3\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\na✝ : Completion α\na : α\n⊢ UniformContinuous Quotient.mk'\n[PROOFSTEP]\nexact uniformContinuous_quotient_mk\n", "meta": {"mathlib_filename": "Mathlib.Topology.UniformSpace.Completion", "llama_tokens": 22053, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7371581510799253, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.38009342373436505}}
{"text": "[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : PreservesFiniteColimits F\ninst✝ : Epi g\nex : Exact f g\n⊢ F.map f ≫ F.map g = 0\n[PROOFSTEP]\nsimp [← Functor.map_comp, ex.w]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\nP : ProjectiveResolution X\ninst✝ : PreservesFiniteColimits F\n⊢ (HomologicalComplex.xPrevIso ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n            (_ : 0 + 1 = 0 + 1)).symm.hom ≫\n      HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    F.map (HomologicalComplex.d P.complex 1 0) ≫ (Iso.refl (F.obj (HomologicalComplex.X P.complex 0))).hom\n[PROOFSTEP]\nsimp only [Iso.symm_hom, HomologicalComplex.xPrevIso_comp_dTo]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\nP : ProjectiveResolution X\ninst✝ : PreservesFiniteColimits F\n⊢ HomologicalComplex.d ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) (0 + 1) 0 =\n    F.map (HomologicalComplex.d P.complex 1 0) ≫ (Iso.refl (F.obj (HomologicalComplex.X P.complex 0))).hom\n[PROOFSTEP]\nsimp only [mapHomologicalComplex_obj_d, Iso.refl_hom, Category.comp_id]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\nP : ProjectiveResolution X\ninst✝ : PreservesFiniteColimits F\n⊢ F.map (HomologicalComplex.d P.complex (0 + 1) 0) = F.map (HomologicalComplex.d P.complex 1 0)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\nP : ProjectiveResolution X\ninst✝ : PreservesFiniteColimits F\n⊢ (Iso.refl (F.obj (HomologicalComplex.X P.complex 0))).hom ≫ F.map (HomologicalComplex.Hom.f P.π 0) =\n    F.map (HomologicalComplex.Hom.f P.π 0) ≫\n      (Iso.refl (F.obj (HomologicalComplex.X ((ChainComplex.single₀ C).obj X) 0))).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\ninst✝ : EnoughProjectives C\nX : C\nP : ProjectiveResolution X\n⊢ kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0) ≫\n      kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n        F.map (HomologicalComplex.Hom.f P.π 0) =\n    0\n[PROOFSTEP]\nrw [kernel.lift_ι_assoc, HomologicalComplex.dTo_eq _ (by simp : (ComplexShape.down ℕ).Rel 1 0),\n  mapHomologicalComplex_obj_d, Category.assoc, ← Functor.map_comp]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\ninst✝ : EnoughProjectives C\nX : C\nP : ProjectiveResolution X\n⊢ ComplexShape.Rel (ComplexShape.down ℕ) 1 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\ninst✝ : EnoughProjectives C\nX : C\nP : ProjectiveResolution X\n⊢ (HomologicalComplex.xPrevIso ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) (_ : 0 + 1 = 1)).hom ≫\n      F.map (HomologicalComplex.d P.complex 1 0 ≫ HomologicalComplex.Hom.f P.π 0) =\n    0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\n⊢ F.obj X ⟶ (leftDerived F 0).obj X\n[PROOFSTEP]\nhave := isIso_cokernel_desc_of_exact_of_epi _ _ (exact_of_map_projectiveResolution F P)\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\nthis :\n  IsIso\n    (cokernel.desc (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n      (F.map (HomologicalComplex.Hom.f P.π 0))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            F.map (HomologicalComplex.Hom.f P.π 0) =\n          0))\n⊢ F.obj X ⟶ (leftDerived F 0).obj X\n[PROOFSTEP]\nrefine'\n  (asIso (cokernel.desc _ _ (exact_of_map_projectiveResolution F P).w)).inv ≫\n    _ ≫ (homologyIsoCokernelLift _ _ _).inv ≫ (leftDerivedObjIso F 0 P).inv\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\nthis :\n  IsIso\n    (cokernel.desc (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n      (F.map (HomologicalComplex.Hom.f P.π 0))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            F.map (HomologicalComplex.Hom.f P.π 0) =\n          0))\n⊢ cokernel (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ⟶\n    cokernel\n      (kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0))\n[PROOFSTEP]\nrefine' cokernel.map _ _ (𝟙 _) (kernel.lift _ (𝟙 _) (by simp)) _\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\nthis :\n  IsIso\n    (cokernel.desc (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n      (F.map (HomologicalComplex.Hom.f P.π 0))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            F.map (HomologicalComplex.Hom.f P.π 0) =\n          0))\n⊢ 𝟙 (HomologicalComplex.X ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\nthis :\n  IsIso\n    (cokernel.desc (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n      (F.map (HomologicalComplex.Hom.f P.π 0))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            F.map (HomologicalComplex.Hom.f P.π 0) =\n          0))\n⊢ HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n      kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (𝟙 (HomologicalComplex.X ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0))\n        (_ :\n          𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n              HomologicalComplex.d ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0\n                (ComplexShape.next (ComplexShape.down ℕ) 0) =\n            0) =\n    𝟙 (HomologicalComplex.xPrev ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n      kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)\n[PROOFSTEP]\next\n  -- Porting note: this used to just be `simp`\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\nthis :\n  IsIso\n    (cokernel.desc (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n      (F.map (HomologicalComplex.Hom.f P.π 0))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            F.map (HomologicalComplex.Hom.f P.π 0) =\n          0))\n⊢ (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n        kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n          (𝟙 (HomologicalComplex.X ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0))\n          (_ :\n            𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                HomologicalComplex.d ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0\n                  (ComplexShape.next (ComplexShape.down ℕ) 0) =\n              0)) ≫\n      equalizer.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) 0 =\n    (𝟙 (HomologicalComplex.xPrev ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n        kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n          (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)) ≫\n      equalizer.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) 0\n[PROOFSTEP]\nsimp only [Category.assoc, kernel.lift_ι, Category.comp_id, Category.id_comp]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\n⊢ leftDerivedZeroToSelfApp F P ≫ leftDerivedZeroToSelfAppInv F P = 𝟙 ((leftDerived F 0).obj X)\n[PROOFSTEP]\ndsimp [leftDerivedZeroToSelfApp, leftDerivedZeroToSelfAppInv]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\n⊢ ((leftDerivedObjIso F 0 P).hom ≫\n        homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)\n          (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n            F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0) ≫\n                kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n              0)) ≫\n      inv\n          (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.Hom.f P.π 0))\n            (_ :\n              F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n                0)) ≫\n        cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0))\n            (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n            (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n              (_ :\n                𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                    F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                  0))\n            (_ :\n              F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                  kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                    (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                    (_ :\n                      𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                          F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                        0) =\n                𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                  kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                    (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                        0)) ≫\n          (homologyIsoCokernelLift\n                (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0)).inv ≫\n            (leftDerivedObjIso F 0 P).inv =\n    𝟙 ((leftDerived F 0).obj X)\n[PROOFSTEP]\nrw [← Category.assoc, ← Category.assoc, ← Category.assoc, Iso.comp_inv_eq]\n  -- Porting note: working around 'motive is not type correct'\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\n⊢ ((((leftDerivedObjIso F 0 P).hom ≫\n            homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0)\n              (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0))\n              (_ :\n                kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                      (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                      (_ :\n                        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                          0) ≫\n                    kernel.ι\n                        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                      F.map (HomologicalComplex.Hom.f P.π 0) =\n                  0)) ≫\n          inv\n            (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.Hom.f P.π 0))\n              (_ :\n                F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                    F.map (HomologicalComplex.Hom.f P.π 0) =\n                  0))) ≫\n        cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n            (_ :\n              𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                  F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                  (_ :\n                    𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                        F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                      0) =\n              𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0))) ≫\n      (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)).inv =\n    𝟙 ((leftDerived F 0).obj X) ≫ (leftDerivedObjIso F 0 P).hom\n[PROOFSTEP]\nsimp only [Category.id_comp]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\n⊢ ((((leftDerivedObjIso F 0 P).hom ≫\n            homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0)\n              (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0))\n              (_ :\n                kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                      (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                      (_ :\n                        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                          0) ≫\n                    kernel.ι\n                        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                      F.map (HomologicalComplex.Hom.f P.π 0) =\n                  0)) ≫\n          inv\n            (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.Hom.f P.π 0))\n              (_ :\n                F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                    F.map (HomologicalComplex.Hom.f P.π 0) =\n                  0))) ≫\n        cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n            (_ :\n              𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                  F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                  (_ :\n                    𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                        F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                      0) =\n              𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0))) ≫\n      (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)).inv =\n    (leftDerivedObjIso F 0 P).hom\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc, Category.assoc]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\n⊢ (leftDerivedObjIso F 0 P).hom ≫\n      homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)\n          (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n            F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0) ≫\n                kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n              0) ≫\n        inv\n            (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.Hom.f P.π 0))\n              (_ :\n                F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                    F.map (HomologicalComplex.Hom.f P.π 0) =\n                  0)) ≫\n          cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0))\n              (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n              (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                (_ :\n                  𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                      F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                    0))\n              (_ :\n                F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                    kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                      (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                      (_ :\n                        𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                            F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                          0) =\n                  𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                    kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                      (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                      (_ :\n                        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                          0)) ≫\n            (homologyIsoCokernelLift\n                (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0)).inv =\n    (leftDerivedObjIso F 0 P).hom\n[PROOFSTEP]\nconvert Category.comp_id (leftDerivedObjIso F 0 P).hom\n[GOAL]\ncase h.e'_2.h.h.e'_7.h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n⊢ homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)\n        (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n          F.map (HomologicalComplex.Hom.f P.π 0))\n        (_ :\n          kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0) ≫\n              kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0) =\n            0) ≫\n      inv\n          (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.Hom.f P.π 0))\n            (_ :\n              F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n                0)) ≫\n        cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0))\n            (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n            (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n              (_ :\n                𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                    F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                  0))\n            (_ :\n              F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                  kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                    (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                    (_ :\n                      𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                          F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                        0) =\n                𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                  kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                    (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                        0)) ≫\n          (homologyIsoCokernelLift\n              (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0)).inv =\n    𝟙 ((homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\n[PROOFSTEP]\nrw [← Category.assoc, ← Category.assoc, Iso.comp_inv_eq]\n  -- Porting note: broken ext\n[GOAL]\ncase h.e'_2.h.h.e'_7.h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n⊢ (homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)\n          (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n            F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0) ≫\n                kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n              0) ≫\n        inv\n          (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.Hom.f P.π 0))\n            (_ :\n              F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n                0))) ≫\n      cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0))\n        (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n        (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n          (_ :\n            𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n              0))\n        (_ :\n          F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n              kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                (_ :\n                  𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                      F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                    0) =\n            𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n              kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0)) =\n    𝟙\n        ((homologyFunctor D (ComplexShape.down ℕ) 0).obj\n          ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)) ≫\n      (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)).hom\n[PROOFSTEP]\napply homology.hom_from_ext\n[GOAL]\ncase h.e'_2.h.h.e'_7.h.h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n⊢ homology.π' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0) ≫\n      (homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0)\n            (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n              F.map (HomologicalComplex.Hom.f P.π 0))\n            (_ :\n              kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                    (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                        0) ≫\n                  kernel.ι\n                      (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                    F.map (HomologicalComplex.Hom.f P.π 0) =\n                0) ≫\n          inv\n            (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.Hom.f P.π 0))\n              (_ :\n                F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                    F.map (HomologicalComplex.Hom.f P.π 0) =\n                  0))) ≫\n        cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n            (_ :\n              𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                  F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                  (_ :\n                    𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                        F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                      0) =\n              𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0)) =\n    homology.π' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0) ≫\n      𝟙\n          ((homologyFunctor D (ComplexShape.down ℕ) 0).obj\n            ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)) ≫\n        (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0)).hom\n[PROOFSTEP]\nsimp only [← Category.assoc]\n[GOAL]\ncase h.e'_2.h.h.e'_7.h.h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n⊢ ((homology.π' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n            (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0) ≫\n          homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0)\n            (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n              F.map (HomologicalComplex.Hom.f P.π 0))\n            (_ :\n              kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                    (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                        0) ≫\n                  kernel.ι\n                      (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                    F.map (HomologicalComplex.Hom.f P.π 0) =\n                0)) ≫\n        inv\n          (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.Hom.f P.π 0))\n            (_ :\n              F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n                0))) ≫\n      cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0))\n        (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n        (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n          (_ :\n            𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n              0))\n        (_ :\n          F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n              kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                (_ :\n                  𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                      F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                    0) =\n            𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n              kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0)) =\n    (homology.π' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n          (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0) ≫\n        𝟙\n          ((homologyFunctor D (ComplexShape.down ℕ) 0).obj\n            ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))) ≫\n      (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)).hom\n[PROOFSTEP]\nerw [homology.π'_desc', Category.assoc, Category.assoc, ← Category.assoc (F.map _),\n  Abelian.cokernel.desc.inv _ _ (exact_of_map_projectiveResolution F P), cokernel.π_desc, homology.π', Category.comp_id,\n  Category.assoc (cokernel.π _), Iso.inv_hom_id, Category.comp_id, ← Category.assoc]\n  -- Porting note: restructured proof to avoid `convert`\n[GOAL]\ncase h.e'_2.h.h.e'_7.h.h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n⊢ (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n        kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n          (_ :\n            𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n              0)) ≫\n      cokernel.π\n        (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)) =\n    cokernel.π\n      (kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0))\n[PROOFSTEP]\nconv_rhs => rw [← Category.id_comp (cokernel.π _)]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n| cokernel.π\n    (kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n      (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0))\n[PROOFSTEP]\nrw [← Category.id_comp (cokernel.π _)]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n| cokernel.π\n    (kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n      (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0))\n[PROOFSTEP]\nrw [← Category.id_comp (cokernel.π _)]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n| cokernel.π\n    (kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n      (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0))\n[PROOFSTEP]\nrw [← Category.id_comp (cokernel.π _)]\n[GOAL]\ncase h.e'_2.h.h.e'_7.h.h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n⊢ (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n        kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n          (_ :\n            𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n              0)) ≫\n      cokernel.π\n        (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)) =\n    𝟙 (kernel (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)) ≫\n      cokernel.π\n        (kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n          (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_2.h.h.e'_7.h.h.e_a\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n⊢ kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n      kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n        (_ :\n          𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n              F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n            0) =\n    𝟙 (kernel (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0))\n[PROOFSTEP]\next\n  -- Porting note: working around 'motive is not type correct'\n[GOAL]\ncase h.e'_2.h.h.e'_7.h.h.e_a.h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n⊢ (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n        kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n          (_ :\n            𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n              0)) ≫\n      equalizer.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) 0 =\n    𝟙 (kernel (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)) ≫\n      equalizer.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) 0\n[PROOFSTEP]\nsimp only [Category.id_comp]\n[GOAL]\ncase h.e'_2.h.h.e'_7.h.h.e_a.h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n⊢ (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n        kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n          (_ :\n            𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n              0)) ≫\n      equalizer.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) 0 =\n    equalizer.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) 0\n[PROOFSTEP]\nrw [Category.assoc, equalizer_as_kernel, kernel.lift_ι]\n[GOAL]\ncase h.e'_2.h.h.e'_7.h.h.e_a.h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\ne_1✝ :\n  ((leftDerived F 0).obj X ⟶\n      homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)) =\n    ((leftDerived F 0).obj X ⟶\n      (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex))\ne_4✝ :\n  HomologicalComplex.homology ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\ne_5✝ :\n  homology (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n          0) =\n    (homologyFunctor D (ComplexShape.down ℕ) 0).obj ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n⊢ kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n      𝟙 (F.obj (HomologicalComplex.X P.complex 0)) =\n    kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n[PROOFSTEP]\nsimp only [Category.comp_id]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\n⊢ leftDerivedZeroToSelfAppInv F P ≫ leftDerivedZeroToSelfApp F P = 𝟙 (F.obj X)\n[PROOFSTEP]\ndsimp [leftDerivedZeroToSelfApp, leftDerivedZeroToSelfAppInv]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\n⊢ (inv\n          (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.Hom.f P.π 0))\n            (_ :\n              F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n                0)) ≫\n        cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0))\n            (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n            (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n              (_ :\n                𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                    F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                  0))\n            (_ :\n              F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                  kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                    (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                    (_ :\n                      𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                          F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                        0) =\n                𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                  kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                    (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                        0)) ≫\n          (homologyIsoCokernelLift\n                (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0)).inv ≫\n            (leftDerivedObjIso F 0 P).inv) ≫\n      (leftDerivedObjIso F 0 P).hom ≫\n        homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)\n          (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n            F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0) ≫\n                kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n              0) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc]\n  -- Porting note: working around 'motive is not type correct'\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\n⊢ inv\n        (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0) =\n              0)) ≫\n      cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n            (_ :\n              𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                  F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                  (_ :\n                    𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                        F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                      0) =\n              𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0)) ≫\n        ((homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0)).inv ≫\n            (leftDerivedObjIso F 0 P).inv) ≫\n          (leftDerivedObjIso F 0 P).hom ≫\n            homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0)\n              (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0))\n              (_ :\n                kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                      (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                      (_ :\n                        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                          0) ≫\n                    kernel.ι\n                        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                      F.map (HomologicalComplex.Hom.f P.π 0) =\n                  0) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nsimp only [Category.assoc]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\n⊢ inv\n        (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0) =\n              0)) ≫\n      cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n            (_ :\n              𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                  F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                  (_ :\n                    𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                        F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                      0) =\n              𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0)) ≫\n        (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0)).inv ≫\n          (leftDerivedObjIso F 0 P).inv ≫\n            (leftDerivedObjIso F 0 P).hom ≫\n              homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0)\n                (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0))\n                (_ :\n                  kernel.lift\n                        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                        (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                        (_ :\n                          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)\n                                0 =\n                            0) ≫\n                      kernel.ι\n                          (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                        F.map (HomologicalComplex.Hom.f P.π 0) =\n                    0) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nrw [← Category.assoc (F.leftDerivedObjIso 0 P).inv, Iso.inv_hom_id]\n  -- Porting note: working around 'motive is not type correct'\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\n⊢ inv\n        (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0) =\n              0)) ≫\n      cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n            (_ :\n              𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                  F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                  (_ :\n                    𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                        F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                      0) =\n              𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0)) ≫\n        (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0)).inv ≫\n          𝟙\n              ((homologyFunctor D (ComplexShape.down ℕ) 0).obj\n                ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)) ≫\n            homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0)\n              (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0))\n              (_ :\n                kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                      (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                      (_ :\n                        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                          0) ≫\n                    kernel.ι\n                        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                      F.map (HomologicalComplex.Hom.f P.π 0) =\n                  0) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nsimp only [Category.id_comp]\n  -- Porting note: instance not found even though it is present in the goal\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\n⊢ inv\n        (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0) =\n              0)) ≫\n      cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n            (_ :\n              𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                  F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                  (_ :\n                    𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                        F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                      0) =\n              𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0)) ≫\n        (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0)).inv ≫\n          homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0)\n            (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n              F.map (HomologicalComplex.Hom.f P.π 0))\n            (_ :\n              kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                    (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                        0) ≫\n                  kernel.ι\n                      (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                    F.map (HomologicalComplex.Hom.f P.π 0) =\n                0) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nhave :\n  IsIso\n    (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.Hom.f P.π 0)) (exact_of_map_projectiveResolution F P).w) :=\n  isIso_cokernel_desc_of_exact_of_epi _ _ (exact_of_map_projectiveResolution F P)\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\nthis :\n  IsIso\n    (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.Hom.f P.π 0))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            F.map (HomologicalComplex.Hom.f P.π 0) =\n          0))\n⊢ inv\n        (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0) =\n              0)) ≫\n      cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n            (_ :\n              𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                  F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                  (_ :\n                    𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                        F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                      0) =\n              𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0)) ≫\n        (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0)).inv ≫\n          homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0)\n            (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n              F.map (HomologicalComplex.Hom.f P.π 0))\n            (_ :\n              kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                    (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                        0) ≫\n                  kernel.ι\n                      (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                    F.map (HomologicalComplex.Hom.f P.π 0) =\n                0) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nrw [IsIso.inv_comp_eq]\n  -- Porting note: working around 'motive is not type correct'\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\nthis :\n  IsIso\n    (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.Hom.f P.π 0))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            F.map (HomologicalComplex.Hom.f P.π 0) =\n          0))\n⊢ cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0))\n        (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n        (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n          (_ :\n            𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n              0))\n        (_ :\n          F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n              kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                (_ :\n                  𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                      F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                    0) =\n            𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n              kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0)) ≫\n      (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0)).inv ≫\n        homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)\n          (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n            F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0) ≫\n                kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n              0) =\n    cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.Hom.f P.π 0))\n        (_ :\n          F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n              F.map (HomologicalComplex.Hom.f P.π 0) =\n            0) ≫\n      𝟙 (F.obj X)\n[PROOFSTEP]\nsimp only [Category.comp_id]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\nthis :\n  IsIso\n    (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.Hom.f P.π 0))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            F.map (HomologicalComplex.Hom.f P.π 0) =\n          0))\n⊢ cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0))\n        (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n        (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n          (_ :\n            𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n              0))\n        (_ :\n          F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n              kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                (_ :\n                  𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                      F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                    0) =\n            𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n              kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0)) ≫\n      (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0)).inv ≫\n        homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)\n          (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n            F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0) ≫\n                kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n              0) =\n    cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.Hom.f P.π 0))\n      (_ :\n        F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n            F.map (HomologicalComplex.Hom.f P.π 0) =\n          0)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\nthis :\n  IsIso\n    (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.Hom.f P.π 0))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            F.map (HomologicalComplex.Hom.f P.π 0) =\n          0))\n⊢ coequalizer.π (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0)) 0 ≫\n      cokernel.map (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))))\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n            (_ :\n              𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                  F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                0))\n          (_ :\n            F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n                  (_ :\n                    𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                        F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n                      0) =\n              𝟙 (F.obj (HomologicalComplex.X P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0))) ≫\n                kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                  (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0)) ≫\n        (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0)).inv ≫\n          homology.desc' (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0)\n            (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n              F.map (HomologicalComplex.Hom.f P.π 0))\n            (_ :\n              kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                    (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                        0) ≫\n                  kernel.ι\n                      (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                    F.map (HomologicalComplex.Hom.f P.π 0) =\n                0) =\n    coequalizer.π (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0)) 0 ≫\n      cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n        (F.map (HomologicalComplex.Hom.f P.π 0))\n        (_ :\n          F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0) ≫\n              F.map (HomologicalComplex.Hom.f P.π 0) =\n            0)\n[PROOFSTEP]\nsimp only [cokernel.π_desc_assoc, Category.assoc, cokernel.π_desc, homology.desc']\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\nthis :\n  IsIso\n    (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.Hom.f P.π 0))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            F.map (HomologicalComplex.Hom.f P.π 0) =\n          0))\n⊢ kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n        (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n        (_ :\n          𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n              F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n            0) ≫\n      cokernel.π\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0)) ≫\n        (homologyIsoCokernelLift (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0)).inv ≫\n          (homologyIsoCokernelLift\n                (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0)).hom ≫\n            cokernel.desc\n              (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n                (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0))\n              (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0))\n              (_ :\n                kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                      (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                      (_ :\n                        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                            HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                          0) ≫\n                    kernel.ι\n                        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                      F.map (HomologicalComplex.Hom.f P.π 0) =\n                  0) =\n    F.map (HomologicalComplex.Hom.f P.π 0)\n[PROOFSTEP]\nrw [← Category.assoc, ← Category.assoc (homologyIsoCokernelLift _ _ _).inv, Iso.inv_hom_id]\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{w, u} C\nD : Type u\ninst✝⁵ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y Z : C\nf : X✝ ⟶ Y\ng : Y ⟶ Z\ninst✝⁴ : Abelian C\ninst✝³ : Abelian D\ninst✝² : Functor.Additive F\ninst✝¹ : EnoughProjectives C\ninst✝ : PreservesFiniteColimits F\nX : C\nP : ProjectiveResolution X\nthis :\n  IsIso\n    (cokernel.desc (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n      (F.map (HomologicalComplex.Hom.f P.π 0))\n      (_ :\n        HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n            F.map (HomologicalComplex.Hom.f P.π 0) =\n          0))\n⊢ (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n          (𝟙 (F.obj (HomologicalComplex.X P.complex 0)))\n          (_ :\n            𝟙 (F.obj (HomologicalComplex.X P.complex 0)) ≫\n                F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)) =\n              0) ≫\n        cokernel.π\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0))) ≫\n      𝟙\n          (cokernel\n            (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n              (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                  0))) ≫\n        cokernel.desc\n          (kernel.lift (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0)))\n            (F.map (HomologicalComplex.d P.complex (ComplexShape.prev (ComplexShape.down ℕ) 0) 0))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                0))\n          (kernel.ι (F.map (HomologicalComplex.d P.complex 0 (ComplexShape.next (ComplexShape.down ℕ) 0))) ≫\n            F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0) ≫\n                kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n              0) =\n    F.map (HomologicalComplex.Hom.f P.π 0)\n[PROOFSTEP]\nsimp only [Category.assoc, cokernel.π_desc, kernel.lift_ι_assoc, Category.id_comp]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\ninst✝ : EnoughProjectives C\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\n⊢ (leftDerived F 0).map f ≫ leftDerivedZeroToSelfApp F Q = leftDerivedZeroToSelfApp F P ≫ F.map f\n[PROOFSTEP]\ndsimp only [leftDerivedZeroToSelfApp]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\ninst✝ : EnoughProjectives C\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\n⊢ (leftDerived F 0).map f ≫\n      (leftDerivedObjIso F 0 Q).hom ≫\n        homology.desc' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n          (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 =\n              0)\n          (kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0) ≫\n            F.map (HomologicalComplex.Hom.f Q.π 0))\n          (_ :\n            kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n                  (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 =\n                      0) ≫\n                kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0) ≫\n                  F.map (HomologicalComplex.Hom.f Q.π 0) =\n              0) =\n    ((leftDerivedObjIso F 0 P).hom ≫\n        homology.desc' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n          (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)\n          (kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n            F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0) ≫\n                kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n              0)) ≫\n      F.map f\n[PROOFSTEP]\nrw [Functor.leftDerived_map_eq F 0 f (ProjectiveResolution.lift f P Q) (by simp), Category.assoc, Category.assoc, ←\n  Category.assoc _ (F.leftDerivedObjIso 0 Q).hom, Iso.inv_hom_id, Category.id_comp, Category.assoc, whisker_eq]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\ninst✝ : EnoughProjectives C\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\n⊢ ProjectiveResolution.lift f P Q ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f\n[PROOFSTEP]\nsimp\n[GOAL]\ncase w\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\ninst✝ : EnoughProjectives C\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\n⊢ (homologyFunctor D (ComplexShape.down ℕ) 0).map\n        ((mapHomologicalComplex F (ComplexShape.down ℕ)).map (ProjectiveResolution.lift f P Q)) ≫\n      homology.desc' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 =\n            0)\n        (kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0) ≫\n          F.map (HomologicalComplex.Hom.f Q.π 0))\n        (_ :\n          kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n                (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 =\n                    0) ≫\n              kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0) ≫\n                F.map (HomologicalComplex.Hom.f Q.π 0) =\n            0) =\n    homology.desc' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)\n        (kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n          F.map (HomologicalComplex.Hom.f P.π 0))\n        (_ :\n          kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0) ≫\n              kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0) =\n            0) ≫\n      F.map f\n[PROOFSTEP]\ndsimp only [homologyFunctor_map]\n  -- Porting note: broken ext\n[GOAL]\ncase w\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\ninst✝ : EnoughProjectives C\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\n⊢ homology.map\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 =\n            0)\n        (HomologicalComplex.Hom.sqTo\n          ((mapHomologicalComplex F (ComplexShape.down ℕ)).map (ProjectiveResolution.lift f P Q)) 0)\n        (HomologicalComplex.Hom.sqFrom\n          ((mapHomologicalComplex F (ComplexShape.down ℕ)).map (ProjectiveResolution.lift f P Q)) 0)\n        (_ :\n          (HomologicalComplex.Hom.sqTo\n                ((mapHomologicalComplex F (ComplexShape.down ℕ)).map (ProjectiveResolution.lift f P Q)) 0).right =\n            (HomologicalComplex.Hom.sqTo\n                ((mapHomologicalComplex F (ComplexShape.down ℕ)).map (ProjectiveResolution.lift f P Q)) 0).right) ≫\n      homology.desc' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 =\n            0)\n        (kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0) ≫\n          F.map (HomologicalComplex.Hom.f Q.π 0))\n        (_ :\n          kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n                (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 =\n                    0) ≫\n              kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0) ≫\n                F.map (HomologicalComplex.Hom.f Q.π 0) =\n            0) =\n    homology.desc' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0)\n        (kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n          F.map (HomologicalComplex.Hom.f P.π 0))\n        (_ :\n          kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                    0) ≫\n              kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                F.map (HomologicalComplex.Hom.f P.π 0) =\n            0) ≫\n      F.map f\n[PROOFSTEP]\napply homology.hom_from_ext\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁵ : Category.{w, u} C\nD : Type u\ninst✝⁴ : Category.{w, u} D\nF : C ⥤ D\nX✝ Y✝ Z : C\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\ninst✝³ : Abelian C\ninst✝² : Abelian D\ninst✝¹ : Functor.Additive F\ninst✝ : EnoughProjectives C\nX Y : C\nf : X ⟶ Y\nP : ProjectiveResolution X\nQ : ProjectiveResolution Y\n⊢ homology.π' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0) ≫\n      homology.map\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 =\n              0)\n          (HomologicalComplex.Hom.sqTo\n            ((mapHomologicalComplex F (ComplexShape.down ℕ)).map (ProjectiveResolution.lift f P Q)) 0)\n          (HomologicalComplex.Hom.sqFrom\n            ((mapHomologicalComplex F (ComplexShape.down ℕ)).map (ProjectiveResolution.lift f P Q)) 0)\n          (_ :\n            (HomologicalComplex.Hom.sqTo\n                  ((mapHomologicalComplex F (ComplexShape.down ℕ)).map (ProjectiveResolution.lift f P Q)) 0).right =\n              (HomologicalComplex.Hom.sqTo\n                  ((mapHomologicalComplex F (ComplexShape.down ℕ)).map (ProjectiveResolution.lift f P Q)) 0).right) ≫\n        homology.desc' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n          (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 =\n              0)\n          (kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0) ≫\n            F.map (HomologicalComplex.Hom.f Q.π 0))\n          (_ :\n            kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n                  (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0)\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0 =\n                      0) ≫\n                kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj Q.complex) 0) ≫\n                  F.map (HomologicalComplex.Hom.f Q.π 0) =\n              0) =\n    homology.π' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n            0) ≫\n      homology.desc' (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n          (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n              0)\n          (kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n            F.map (HomologicalComplex.Hom.f P.π 0))\n          (_ :\n            kernel.lift (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0)\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 =\n                      0) ≫\n                kernel.ι (HomologicalComplex.dFrom ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0) ≫\n                  F.map (HomologicalComplex.Hom.f P.π 0) =\n              0) ≫\n        F.map f\n[PROOFSTEP]\nsimp only [HomologicalComplex.Hom.sqTo_right, mapHomologicalComplex_map_f, homology.π'_map_assoc, homology.π'_desc',\n  kernel.lift_ι_assoc, Category.assoc, homology.π'_desc'_assoc, ← map_comp,\n  show (ProjectiveResolution.lift f P Q).f 0 ≫ _ = _ ≫ f from\n    HomologicalComplex.congr_hom (ProjectiveResolution.lift_commutes f P Q) 0]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Abelian.LeftDerived", "llama_tokens": 55190, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7154239957834733, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.3800399324966877}}
{"text": "[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nhv : LinearIndependent R v\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhw : LinearIndependent R (↑g ∘ u ∘ Sum.inr)\nhm : Mono f\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\n⊢ Disjoint (span R (range (u ∘ Sum.inl))) (span R (range (u ∘ Sum.inr)))\n[PROOFSTEP]\nrw [huv, disjoint_comm]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nhv : LinearIndependent R v\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhw : LinearIndependent R (↑g ∘ u ∘ Sum.inr)\nhm : Mono f\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\n⊢ Disjoint (span R (range (u ∘ Sum.inr))) (span R (range (↑f ∘ v)))\n[PROOFSTEP]\nrefine' Disjoint.mono_right (span_mono (range_comp_subset_range _ _)) _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nhv : LinearIndependent R v\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhw : LinearIndependent R (↑g ∘ u ∘ Sum.inr)\nhm : Mono f\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\n⊢ Disjoint (span R (range (u ∘ Sum.inr))) (span R (range ↑f))\n[PROOFSTEP]\nrw [← LinearMap.range_coe, (span_eq (LinearMap.range f)), (exact_iff _ _).mp he]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nhv : LinearIndependent R v\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhw : LinearIndependent R (↑g ∘ u ∘ Sum.inr)\nhm : Mono f\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\n⊢ Disjoint (span R (range (u ∘ Sum.inr))) (LinearMap.ker g)\n[PROOFSTEP]\nexact range_ker_disjoint hw\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nhv : LinearIndependent R v\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhw✝ : LinearIndependent R (↑g ∘ u ∘ Sum.inr)\nhm : Mono f\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nw : ι' → ↑P\nhw : LinearIndependent R w\nhse : ShortExact f g\n⊢ LinearIndependent R (Sum.elim (↑f ∘ v) (Function.invFun g.toFun ∘ w))\n[PROOFSTEP]\nrefine' linearIndependent_leftExact hv _ hse.mono hse.exact _\n[GOAL]\ncase refine'_1\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nhv : LinearIndependent R v\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhw✝ : LinearIndependent R (↑g ∘ u ∘ Sum.inr)\nhm : Mono f\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nw : ι' → ↑P\nhw : LinearIndependent R w\nhse : ShortExact f g\n⊢ LinearIndependent R (↑g ∘ Sum.elim (↑f ∘ v) (Function.invFun g.toFun ∘ w) ∘ Sum.inr)\n[PROOFSTEP]\nsimp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, Sum.elim_comp_inr]\n[GOAL]\ncase refine'_1\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nhv : LinearIndependent R v\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhw✝ : LinearIndependent R (↑g ∘ u ∘ Sum.inr)\nhm : Mono f\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nw : ι' → ↑P\nhw : LinearIndependent R w\nhse : ShortExact f g\n⊢ LinearIndependent R (↑g ∘ Function.invFun ↑g ∘ w)\n[PROOFSTEP]\nrwa [← Function.comp.assoc,\n  Function.RightInverse.comp_eq_id (Function.rightInverse_invFun ((epi_iff_surjective _).mp hse.epi)),\n  Function.comp.left_id]\n[GOAL]\ncase refine'_2\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nhv : LinearIndependent R v\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhw✝ : LinearIndependent R (↑g ∘ u ∘ Sum.inr)\nhm : Mono f\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nw : ι' → ↑P\nhw : LinearIndependent R w\nhse : ShortExact f g\n⊢ Sum.elim (↑f ∘ v) (Function.invFun g.toFun ∘ w) ∘ Sum.inl = ↑f ∘ v\n[PROOFSTEP]\nsimp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, Sum.elim_comp_inl]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\n⊢ ⊤ ≤ span R (range u)\n[PROOFSTEP]\nintro m _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\n⊢ m ∈ span R (range u)\n[PROOFSTEP]\nhave hgm : g m ∈ span R (range (g ∘ u ∘ Sum.inr)) := hw mem_top\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\nhgm : ↑g m ∈ span R (range (↑g ∘ u ∘ Sum.inr))\n⊢ m ∈ span R (range u)\n[PROOFSTEP]\nrw [Finsupp.mem_span_range_iff_exists_finsupp] at hgm \n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\nhgm : ∃ c, (Finsupp.sum c fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\n⊢ m ∈ span R (range u)\n[PROOFSTEP]\nobtain ⟨cm, hm⟩ := hgm\n[GOAL]\ncase intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\n⊢ m ∈ span R (range u)\n[PROOFSTEP]\nlet m' : M := Finsupp.sum cm fun j a ↦ a • (u (Sum.inr j))\n[GOAL]\ncase intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\n⊢ m ∈ span R (range u)\n[PROOFSTEP]\nhave hsub : m - m' ∈ LinearMap.range f\n[GOAL]\ncase hsub\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\n⊢ m - m' ∈ LinearMap.range f\n[PROOFSTEP]\nrw [(exact_iff _ _).mp he]\n[GOAL]\ncase hsub\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\n⊢ m - m' ∈ LinearMap.ker g\n[PROOFSTEP]\nsimp only [LinearMap.mem_ker, map_sub, sub_eq_zero]\n[GOAL]\ncase hsub\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\n⊢ ↑g m = ↑g (Finsupp.sum cm fun j a => a • u (Sum.inr j))\n[PROOFSTEP]\nrw [← hm, map_finsupp_sum]\n[GOAL]\ncase hsub\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\n⊢ (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = Finsupp.sum cm fun a b => ↑g (b • u (Sum.inr a))\n[PROOFSTEP]\nsimp only [Function.comp_apply, SMulHomClass.map_smul]\n[GOAL]\ncase intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nhsub : m - m' ∈ LinearMap.range f\n⊢ m ∈ span R (range u)\n[PROOFSTEP]\nobtain ⟨n, hnm⟩ := hsub\n[GOAL]\ncase intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\nhnm : ↑f n = m - m'\n⊢ m ∈ span R (range u)\n[PROOFSTEP]\nhave hn : n ∈ span R (range v) := hv mem_top\n[GOAL]\ncase intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\nhnm : ↑f n = m - m'\nhn : n ∈ span R (range v)\n⊢ m ∈ span R (range u)\n[PROOFSTEP]\nrw [Finsupp.mem_span_range_iff_exists_finsupp] at hn \n[GOAL]\ncase intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\nhnm : ↑f n = m - m'\nhn : ∃ c, (Finsupp.sum c fun i a => a • v i) = n\n⊢ m ∈ span R (range u)\n[PROOFSTEP]\nobtain ⟨cn, hn⟩ := hn\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\nhnm : ↑f n = m - m'\ncn : ι →₀ R\nhn : (Finsupp.sum cn fun i a => a • v i) = n\n⊢ m ∈ span R (range u)\n[PROOFSTEP]\nrw [← hn, map_finsupp_sum] at hnm \n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\n⊢ m ∈ span R (range u)\n[PROOFSTEP]\nrw [← sub_add_cancel m m', ← hnm, ]\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\n⊢ (Finsupp.sum cn fun a b => ↑f (b • v a)) + m' ∈ span R (range u)\n[PROOFSTEP]\nsimp only [SMulHomClass.map_smul]\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\n⊢ ((Finsupp.sum cn fun a b => b • ↑f (v a)) + Finsupp.sum cm fun j a => a • u (Sum.inr j)) ∈ span R (range u)\n[PROOFSTEP]\nhave hn' : (Finsupp.sum cn fun a b ↦ b • f (v a)) = (Finsupp.sum cn fun a b ↦ b • u (Sum.inl a)) := by congr; ext a b;\n  change b • (f ∘ v) a = _; rw [← huv]; rfl\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\n⊢ (Finsupp.sum cn fun a b => b • ↑f (v a)) = Finsupp.sum cn fun a b => b • u (Sum.inl a)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\n⊢ (fun a b => b • ↑f (v a)) = fun a b => b • u (Sum.inl a)\n[PROOFSTEP]\next a b\n[GOAL]\ncase e_g.h.h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\na : ι\nb : R\n⊢ b • ↑f (v a) = b • u (Sum.inl a)\n[PROOFSTEP]\nchange b • (f ∘ v) a = _\n[GOAL]\ncase e_g.h.h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\na : ι\nb : R\n⊢ b • (↑f ∘ v) a = b • u (Sum.inl a)\n[PROOFSTEP]\nrw [← huv]\n[GOAL]\ncase e_g.h.h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\na : ι\nb : R\n⊢ b • (u ∘ Sum.inl) a = b • u (Sum.inl a)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\nhn' : (Finsupp.sum cn fun a b => b • ↑f (v a)) = Finsupp.sum cn fun a b => b • u (Sum.inl a)\n⊢ ((Finsupp.sum cn fun a b => b • ↑f (v a)) + Finsupp.sum cm fun j a => a • u (Sum.inr j)) ∈ span R (range u)\n[PROOFSTEP]\nrw [hn']\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\nhn' : (Finsupp.sum cn fun a b => b • ↑f (v a)) = Finsupp.sum cn fun a b => b • u (Sum.inl a)\n⊢ ((Finsupp.sum cn fun a b => b • u (Sum.inl a)) + Finsupp.sum cm fun j a => a • u (Sum.inr j)) ∈ span R (range u)\n[PROOFSTEP]\napply add_mem\n[GOAL]\ncase intro.intro.intro.a\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\nhn' : (Finsupp.sum cn fun a b => b • ↑f (v a)) = Finsupp.sum cn fun a b => b • u (Sum.inl a)\n⊢ (Finsupp.sum cn fun a b => b • u (Sum.inl a)) ∈ span R (range u)\n[PROOFSTEP]\nrw [Finsupp.mem_span_range_iff_exists_finsupp]\n[GOAL]\ncase intro.intro.intro.a\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\nhn' : (Finsupp.sum cn fun a b => b • ↑f (v a)) = Finsupp.sum cn fun a b => b • u (Sum.inl a)\n⊢ ∃ c, (Finsupp.sum c fun i a => a • u i) = Finsupp.sum cn fun a b => b • u (Sum.inl a)\n[PROOFSTEP]\nuse cn.mapDomain (Sum.inl)\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\nhn' : (Finsupp.sum cn fun a b => b • ↑f (v a)) = Finsupp.sum cn fun a b => b • u (Sum.inl a)\n⊢ (Finsupp.sum (Finsupp.mapDomain Sum.inl cn) fun i a => a • u i) = Finsupp.sum cn fun a b => b • u (Sum.inl a)\n[PROOFSTEP]\nrw [Finsupp.sum_mapDomain_index_inj Sum.inl_injective]\n[GOAL]\ncase intro.intro.intro.a\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\nhn' : (Finsupp.sum cn fun a b => b • ↑f (v a)) = Finsupp.sum cn fun a b => b • u (Sum.inl a)\n⊢ (Finsupp.sum cm fun j a => a • u (Sum.inr j)) ∈ span R (range u)\n[PROOFSTEP]\nrw [Finsupp.mem_span_range_iff_exists_finsupp]\n[GOAL]\ncase intro.intro.intro.a\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\nhn' : (Finsupp.sum cn fun a b => b • ↑f (v a)) = Finsupp.sum cn fun a b => b • u (Sum.inl a)\n⊢ ∃ c, (Finsupp.sum c fun i a => a • u i) = Finsupp.sum cm fun j a => a • u (Sum.inr j)\n[PROOFSTEP]\nuse cm.mapDomain (Sum.inr)\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nhe : Exact f g\nhuv : u ∘ Sum.inl = ↑f ∘ v\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range (↑g ∘ u ∘ Sum.inr))\nm : ↑M\na✝ : m ∈ ⊤\ncm : ι' →₀ R\nhm : (Finsupp.sum cm fun i a => a • (↑g ∘ u ∘ Sum.inr) i) = ↑g m\nm' : ↑M := Finsupp.sum cm fun j a => a • u (Sum.inr j)\nn : ↑N\ncn : ι →₀ R\nhnm : (Finsupp.sum cn fun a b => ↑f (b • v a)) = m - m'\nhn : (Finsupp.sum cn fun i a => a • v i) = n\nhn' : (Finsupp.sum cn fun a b => b • ↑f (v a)) = Finsupp.sum cn fun a b => b • u (Sum.inl a)\n⊢ (Finsupp.sum (Finsupp.mapDomain Sum.inr cm) fun i a => a • u i) = Finsupp.sum cm fun j a => a • u (Sum.inr j)\n[PROOFSTEP]\nrw [Finsupp.sum_mapDomain_index_inj Sum.inr_injective]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nw : ι' → ↑P\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range w)\nhE : Epi g\nhe : Exact f g\n⊢ ⊤ ≤ span R (range (Sum.elim (↑f ∘ v) (Function.invFun g.toFun ∘ w)))\n[PROOFSTEP]\nrefine' span_exact he _ hv _\n[GOAL]\ncase refine'_1\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nw : ι' → ↑P\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range w)\nhE : Epi g\nhe : Exact f g\n⊢ Sum.elim (↑f ∘ v) (Function.invFun g.toFun ∘ w) ∘ Sum.inl = ↑f ∘ v\n[PROOFSTEP]\nsimp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, Sum.elim_comp_inl]\n[GOAL]\ncase refine'_2\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nw : ι' → ↑P\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range w)\nhE : Epi g\nhe : Exact f g\n⊢ ⊤ ≤ span R (range (↑g ∘ Sum.elim (↑f ∘ v) (Function.invFun g.toFun ∘ w) ∘ Sum.inr))\n[PROOFSTEP]\nconvert hw\n[GOAL]\ncase h.e'_4.h.e'_6.h.e'_3\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nw : ι' → ↑P\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range w)\nhE : Epi g\nhe : Exact f g\n⊢ ↑g ∘ Sum.elim (↑f ∘ v) (Function.invFun g.toFun ∘ w) ∘ Sum.inr = w\n[PROOFSTEP]\nsimp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, Sum.elim_comp_inr]\n[GOAL]\ncase h.e'_4.h.e'_6.h.e'_3\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nw : ι' → ↑P\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range w)\nhE : Epi g\nhe : Exact f g\n⊢ ↑g ∘ Function.invFun ↑g ∘ w = w\n[PROOFSTEP]\nrw [ModuleCat.epi_iff_surjective] at hE \n[GOAL]\ncase h.e'_4.h.e'_6.h.e'_3\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nu : ι ⊕ ι' → ↑M\nf : N ⟶ M\ng : M ⟶ P\nw : ι' → ↑P\nhv : ⊤ ≤ span R (range v)\nhw : ⊤ ≤ span R (range w)\nhE : Function.Surjective ↑g\nhe : Exact f g\n⊢ ↑g ∘ Function.invFun ↑g ∘ w = w\n[PROOFSTEP]\nrw [← Function.comp.assoc, Function.RightInverse.comp_eq_id (Function.rightInverse_invFun hE), Function.comp.left_id]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝³ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nf : N ⟶ M\ng : M ⟶ P\nh : ShortExact f g\ninst✝² : Module.Free R ↑N\ninst✝¹ : Module.Free R ↑P\ninst✝ : StrongRankCondition R\n⊢ Module.rank R ↑M = Module.rank R ↑N + Module.rank R ↑P\n[PROOFSTEP]\nhaveI := free_shortExact h\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝³ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nf : N ⟶ M\ng : M ⟶ P\nh : ShortExact f g\ninst✝² : Module.Free R ↑N\ninst✝¹ : Module.Free R ↑P\ninst✝ : StrongRankCondition R\nthis : Module.Free R ↑M\n⊢ Module.rank R ↑M = Module.rank R ↑N + Module.rank R ↑P\n[PROOFSTEP]\nrw [Module.Free.rank_eq_card_chooseBasisIndex, Module.Free.rank_eq_card_chooseBasisIndex R N,\n  Module.Free.rank_eq_card_chooseBasisIndex R P, Cardinal.add_def, Cardinal.eq]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝³ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nM : ModuleCat R\nf : N ⟶ M\ng : M ⟶ P\nh : ShortExact f g\ninst✝² : Module.Free R ↑N\ninst✝¹ : Module.Free R ↑P\ninst✝ : StrongRankCondition R\nthis : Module.Free R ↑M\n⊢ Nonempty (Module.Free.ChooseBasisIndex R ↑M ≃ Module.Free.ChooseBasisIndex R ↑N ⊕ Module.Free.ChooseBasisIndex R ↑P)\n[PROOFSTEP]\nexact\n  ⟨Basis.indexEquiv (Module.Free.chooseBasis R M)\n      (Basis.ofShortExact h (Module.Free.chooseBasis R N) (Module.Free.chooseBasis R P))⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝⁵ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nn p : ℕ\nM : ModuleCat R\nf : N ⟶ M\ng : M ⟶ P\nh : ShortExact f g\ninst✝⁴ : Module.Free R ↑N\ninst✝³ : Module.Finite R ↑N\ninst✝² : Module.Free R ↑P\ninst✝¹ : Module.Finite R ↑P\nhN : FiniteDimensional.finrank R ↑N = n\nhP : FiniteDimensional.finrank R ↑P = p\ninst✝ : StrongRankCondition R\n⊢ FiniteDimensional.finrank R ↑M = n + p\n[PROOFSTEP]\napply FiniteDimensional.finrank_eq_of_rank_eq\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝⁵ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nn p : ℕ\nM : ModuleCat R\nf : N ⟶ M\ng : M ⟶ P\nh : ShortExact f g\ninst✝⁴ : Module.Free R ↑N\ninst✝³ : Module.Finite R ↑N\ninst✝² : Module.Free R ↑P\ninst✝¹ : Module.Finite R ↑P\nhN : FiniteDimensional.finrank R ↑N = n\nhP : FiniteDimensional.finrank R ↑P = p\ninst✝ : StrongRankCondition R\n⊢ Module.rank R ↑M = ↑(n + p)\n[PROOFSTEP]\nrw [free_shortExact_rank_add h, ← hN, ← hP]\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nR : Type u_3\ninst✝⁵ : Ring R\nN P : ModuleCat R\nv : ι → ↑N\nn p : ℕ\nM : ModuleCat R\nf : N ⟶ M\ng : M ⟶ P\nh : ShortExact f g\ninst✝⁴ : Module.Free R ↑N\ninst✝³ : Module.Finite R ↑N\ninst✝² : Module.Free R ↑P\ninst✝¹ : Module.Finite R ↑P\nhN : FiniteDimensional.finrank R ↑N = n\nhP : FiniteDimensional.finrank R ↑P = p\ninst✝ : StrongRankCondition R\n⊢ Module.rank R ↑N + Module.rank R ↑P = ↑(FiniteDimensional.finrank R ↑N + FiniteDimensional.finrank R ↑P)\n[PROOFSTEP]\nsimp only [Nat.cast_add, FiniteDimensional.finrank_eq_rank]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.ModuleCat.Free", "llama_tokens": 15005, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7718435083355188, "lm_q2_score": 0.49218813572079556, "lm_q1q2_score": 0.3798922174358573}}
{"text": "[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\n⊢ ∀ (a b : IsLimit t), a = b\n[PROOFSTEP]\nintro P Q\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nP Q : IsLimit t\n⊢ P = Q\n[PROOFSTEP]\ncases P\n[GOAL]\ncase mk\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nQ : IsLimit t\nlift✝ : (s : Cone F) → s.pt ⟶ t.pt\nfac✝ : ∀ (s : Cone F) (j : J), lift✝ s ≫ NatTrans.app t.π j = NatTrans.app s.π j\nuniq✝ : ∀ (s : Cone F) (m : s.pt ⟶ t.pt), (∀ (j : J), m ≫ NatTrans.app t.π j = NatTrans.app s.π j) → m = lift✝ s\n⊢ mk lift✝ = Q\n[PROOFSTEP]\ncases Q\n[GOAL]\ncase mk.mk\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nlift✝¹ : (s : Cone F) → s.pt ⟶ t.pt\nfac✝¹ : ∀ (s : Cone F) (j : J), lift✝¹ s ≫ NatTrans.app t.π j = NatTrans.app s.π j\nuniq✝¹ : ∀ (s : Cone F) (m : s.pt ⟶ t.pt), (∀ (j : J), m ≫ NatTrans.app t.π j = NatTrans.app s.π j) → m = lift✝¹ s\nlift✝ : (s : Cone F) → s.pt ⟶ t.pt\nfac✝ : ∀ (s : Cone F) (j : J), lift✝ s ≫ NatTrans.app t.π j = NatTrans.app s.π j\nuniq✝ : ∀ (s : Cone F) (m : s.pt ⟶ t.pt), (∀ (j : J), m ≫ NatTrans.app t.π j = NatTrans.app s.π j) → m = lift✝ s\n⊢ mk lift✝¹ = mk lift✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_lift\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nlift✝¹ : (s : Cone F) → s.pt ⟶ t.pt\nfac✝¹ : ∀ (s : Cone F) (j : J), lift✝¹ s ≫ NatTrans.app t.π j = NatTrans.app s.π j\nuniq✝¹ : ∀ (s : Cone F) (m : s.pt ⟶ t.pt), (∀ (j : J), m ≫ NatTrans.app t.π j = NatTrans.app s.π j) → m = lift✝¹ s\nlift✝ : (s : Cone F) → s.pt ⟶ t.pt\nfac✝ : ∀ (s : Cone F) (j : J), lift✝ s ≫ NatTrans.app t.π j = NatTrans.app s.π j\nuniq✝ : ∀ (s : Cone F) (m : s.pt ⟶ t.pt), (∀ (j : J), m ≫ NatTrans.app t.π j = NatTrans.app s.π j) → m = lift✝ s\n⊢ lift✝¹ = lift✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\ns t : Cone F\nh : IsLimit t\nf f' : s ⟶ t\n⊢ ∀ {g : s ⟶ t}, g = liftConeMorphism h s\n[PROOFSTEP]\nintro g\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\ns t : Cone F\nh : IsLimit t\nf f' g : s ⟶ t\n⊢ g = liftConeMorphism h s\n[PROOFSTEP]\napply ConeMorphism.ext\n[GOAL]\ncase w\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\ns t : Cone F\nh : IsLimit t\nf f' g : s ⟶ t\n⊢ g.Hom = (liftConeMorphism h s).Hom\n[PROOFSTEP]\nexact h.uniq _ _ g.w\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nht : ∀ (s : Cone F), ∃! l, ∀ (j : J), l ≫ NatTrans.app t.π j = NatTrans.app s.π j\n⊢ IsLimit t\n[PROOFSTEP]\nchoose s hs hs' using ht\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\ns : (s : Cone F) → s.pt ⟶ t.pt\nhs : ∀ (s_1 : Cone F), (fun l => ∀ (j : J), l ≫ NatTrans.app t.π j = NatTrans.app s_1.π j) (s s_1)\nhs' :\n  ∀ (s_1 : Cone F) (y : s_1.pt ⟶ t.pt),\n    (fun l => ∀ (j : J), l ≫ NatTrans.app t.π j = NatTrans.app s_1.π j) y → y = s s_1\n⊢ IsLimit t\n[PROOFSTEP]\nexact ⟨s, hs, hs'⟩\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nlift : (s : Cone F) → s ⟶ t\nuniq : ∀ (s : Cone F) (m : s ⟶ t), m = lift s\ns : Cone F\nm : s.pt ⟶ t.pt\nw : ∀ (j : J), m ≫ NatTrans.app t.π j = NatTrans.app s.π j\n⊢ ConeMorphism.mk m = lift s\n[PROOFSTEP]\napply uniq\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr s t : Cone F\nP : IsLimit s\nQ : IsLimit t\n⊢ ∀ (j : J), (lift P r ≫ (conePointUniqueUpToIso P Q).hom) ≫ NatTrans.app t.π j = NatTrans.app r.π j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr s t : Cone F\nP : IsLimit s\nQ : IsLimit t\n⊢ ∀ (j : J), (lift Q r ≫ (conePointUniqueUpToIso P Q).inv) ≫ NatTrans.app s.π j = NatTrans.app r.π j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cone F\nP : IsLimit r\ni : r ≅ t\ns : Cone F\nm : s ⟶ t\n⊢ m = (fun s => liftConeMorphism P s ≫ i.hom) s\n[PROOFSTEP]\nrw [← i.comp_inv_eq]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cone F\nP : IsLimit r\ni : r ≅ t\ns : Cone F\nm : s ⟶ t\n⊢ m ≫ i.inv = liftConeMorphism P s\n[PROOFSTEP]\napply P.uniq_cone_morphism\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cone F\ni : r ≅ t\n⊢ Function.LeftInverse (fun h => ofIsoLimit h i.symm) fun h => ofIsoLimit h i\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cone F\ni : r ≅ t\n⊢ Function.RightInverse (fun h => ofIsoLimit h i.symm) fun h => ofIsoLimit h i\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cone F\nP : IsLimit r\ni : IsIso (lift P t)\n⊢ r ≅ t\n[PROOFSTEP]\nhaveI : IsIso (P.liftConeMorphism t).Hom := i\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cone F\nP : IsLimit r\ni : IsIso (lift P t)\nthis : IsIso (liftConeMorphism P t).Hom\n⊢ r ≅ t\n[PROOFSTEP]\nhaveI : IsIso (P.liftConeMorphism t) := Cones.cone_iso_of_hom_iso _\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cone F\nP : IsLimit r\ni : IsIso (lift P t)\nthis✝ : IsIso (liftConeMorphism P t).Hom\nthis : IsIso (liftConeMorphism P t)\n⊢ r ≅ t\n[PROOFSTEP]\nsymm\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cone F\nP : IsLimit r\ni : IsIso (lift P t)\nthis✝ : IsIso (liftConeMorphism P t).Hom\nthis : IsIso (liftConeMorphism P t)\n⊢ t ≅ r\n[PROOFSTEP]\napply asIso (P.liftConeMorphism t)\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\nf f' : W ⟶ t.pt\nw : ∀ (j : J), f ≫ NatTrans.app t.π j = f' ≫ NatTrans.app t.π j\n⊢ f = f'\n[PROOFSTEP]\nrw [h.hom_lift f, h.hom_lift f']\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\nf f' : W ⟶ t.pt\nw : ∀ (j : J), f ≫ NatTrans.app t.π j = f' ≫ NatTrans.app t.π j\n⊢ lift h { pt := W, π := NatTrans.mk fun b => f ≫ NatTrans.app t.π b } =\n    lift h { pt := W, π := NatTrans.mk fun b => f' ≫ NatTrans.app t.π b }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_8.h.e_π.e_app\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\nf f' : W ⟶ t.pt\nw : ∀ (j : J), f ≫ NatTrans.app t.π j = f' ≫ NatTrans.app t.π j\n⊢ (fun b => f ≫ NatTrans.app t.π b) = fun b => f' ≫ NatTrans.app t.π b\n[PROOFSTEP]\nexact funext w\n[GOAL]\nJ : Type u₁\ninst✝³ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝² : Category.{v₂, u₂} K\nC : Type u₃\ninst✝¹ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nD : Type u₄\ninst✝ : Category.{v₄, u₄} D\nG : K ⥤ D\nh : Cone G ≌ Cone F\nc : Cone G\n⊢ Function.LeftInverse (ofRightAdjoint h.functor) fun P =>\n    ofIsoLimit (ofRightAdjoint h.inverse P) (h.unitIso.symm.app c)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝³ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝² : Category.{v₂, u₂} K\nC : Type u₃\ninst✝¹ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nD : Type u₄\ninst✝ : Category.{v₄, u₄} D\nG : K ⥤ D\nh : Cone G ≌ Cone F\nc : Cone G\n⊢ Function.RightInverse (ofRightAdjoint h.functor) fun P =>\n    ofIsoLimit (ofRightAdjoint h.inverse P) (h.unitIso.symm.app c)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF G : J ⥤ C\ns : Cone F\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\nw : F ≅ G\n⊢ ∀ (j : J), (map s Q w.hom ≫ map t P w.inv) ≫ NatTrans.app s.π j = 𝟙 s.pt ≫ NatTrans.app s.π j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF G : J ⥤ C\ns : Cone F\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\nw : F ≅ G\n⊢ ∀ (j : J), (map t P w.inv ≫ map s Q w.hom) ≫ NatTrans.app t.π j = 𝟙 t.pt ≫ NatTrans.app t.π j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF G : J ⥤ C\ns : Cone F\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\nw : F ≅ G\nj : J\n⊢ (conePointsIsoOfNatIso P Q w).hom ≫ NatTrans.app t.π j = NatTrans.app s.π j ≫ NatTrans.app w.hom j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF G : J ⥤ C\ns : Cone F\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\nw : F ≅ G\nj : J\n⊢ (conePointsIsoOfNatIso P Q w).inv ≫ NatTrans.app s.π j = NatTrans.app t.π j ≫ NatTrans.app w.inv j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF G : J ⥤ C\nr s : Cone F\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\nw : F ≅ G\n⊢ ∀ (j : J), (lift P r ≫ (conePointsIsoOfNatIso P Q w).hom) ≫ NatTrans.app t.π j = map r Q w.hom ≫ NatTrans.app t.π j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF G : J ⥤ C\nr s : Cone G\nt : Cone F\nP : IsLimit t\nQ : IsLimit s\nw : F ≅ G\n⊢ ∀ (j : J), (lift Q r ≫ (conePointsIsoOfNatIso P Q w).inv) ≫ NatTrans.app t.π j = map r P w.inv ≫ NatTrans.app t.π j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt s : Cone F\ne : K ≌ J\n⊢ Function.LeftInverse (ofWhiskerEquivalence e) fun h => whiskerEquivalence h e\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt s : Cone F\ne : K ≌ J\n⊢ Function.RightInverse (ofWhiskerEquivalence e) fun h => whiskerEquivalence h e\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF : J ⥤ C\ns : Cone F\nG : K ⥤ C\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\n⊢ lift Q ((Cones.equivalenceOfReindexing (Equivalence.symm e) w').functor.obj s) ≫\n      lift P ((Cones.equivalenceOfReindexing e w).functor.obj t) =\n    𝟙 s.pt\n[PROOFSTEP]\napply hom_ext P\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF : J ⥤ C\ns : Cone F\nG : K ⥤ C\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\n⊢ ∀ (j : J),\n    (lift Q ((Cones.equivalenceOfReindexing (Equivalence.symm e) w').functor.obj s) ≫\n          lift P ((Cones.equivalenceOfReindexing e w).functor.obj t)) ≫\n        NatTrans.app s.π j =\n      𝟙 s.pt ≫ NatTrans.app s.π j\n[PROOFSTEP]\nintro j\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF : J ⥤ C\ns : Cone F\nG : K ⥤ C\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\nj : J\n⊢ (lift Q ((Cones.equivalenceOfReindexing (Equivalence.symm e) w').functor.obj s) ≫\n        lift P ((Cones.equivalenceOfReindexing e w).functor.obj t)) ≫\n      NatTrans.app s.π j =\n    𝟙 s.pt ≫ NatTrans.app s.π j\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF : J ⥤ C\ns : Cone F\nG : K ⥤ C\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\nj : J\n⊢ (lift Q ((Cones.postcompose (whiskerLeft e.inverse w.inv ≫ (invFunIdAssoc e G).hom)).obj (Cone.whisker e.inverse s)) ≫\n        lift P ((Cones.postcompose w.hom).obj (Cone.whisker e.functor t))) ≫\n      NatTrans.app s.π j =\n    𝟙 s.pt ≫ NatTrans.app s.π j\n[PROOFSTEP]\nsimp only [Limits.Cone.whisker_π, Limits.Cones.postcompose_obj_π, fac, whiskerLeft_app, assoc, id_comp,\n  invFunIdAssoc_hom_app, fac_assoc, NatTrans.comp_app]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF : J ⥤ C\ns : Cone F\nG : K ⥤ C\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\nj : J\n⊢ NatTrans.app s.π (e.inverse.obj (e.functor.obj j)) ≫\n      NatTrans.app w.inv (e.inverse.obj (e.functor.obj j)) ≫\n        G.map (NatTrans.app (counit e) (e.functor.obj j)) ≫ NatTrans.app w.hom j =\n    NatTrans.app s.π j\n[PROOFSTEP]\nrw [counit_app_functor, ← Functor.comp_map]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF : J ⥤ C\ns : Cone F\nG : K ⥤ C\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\nj : J\n⊢ NatTrans.app s.π (e.inverse.obj (e.functor.obj j)) ≫\n      NatTrans.app w.inv (e.inverse.obj (e.functor.obj j)) ≫\n        (e.functor ⋙ G).map (NatTrans.app (unitInv e) j) ≫ NatTrans.app w.hom j =\n    NatTrans.app s.π j\n[PROOFSTEP]\nhave l : NatTrans.app w.hom j = NatTrans.app w.hom (Prefunctor.obj (𝟭 J).toPrefunctor j) := by dsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF : J ⥤ C\ns : Cone F\nG : K ⥤ C\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\nj : J\n⊢ NatTrans.app w.hom j = NatTrans.app w.hom ((𝟭 J).obj j)\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF : J ⥤ C\ns : Cone F\nG : K ⥤ C\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\nj : J\nl : NatTrans.app w.hom j = NatTrans.app w.hom ((𝟭 J).obj j)\n⊢ NatTrans.app s.π (e.inverse.obj (e.functor.obj j)) ≫\n      NatTrans.app w.inv (e.inverse.obj (e.functor.obj j)) ≫\n        (e.functor ⋙ G).map (NatTrans.app (unitInv e) j) ≫ NatTrans.app w.hom j =\n    NatTrans.app s.π j\n[PROOFSTEP]\nrw [l, w.hom.naturality]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF : J ⥤ C\ns : Cone F\nG : K ⥤ C\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\nj : J\nl : NatTrans.app w.hom j = NatTrans.app w.hom ((𝟭 J).obj j)\n⊢ NatTrans.app s.π (e.inverse.obj (e.functor.obj j)) ≫\n      NatTrans.app w.inv (e.inverse.obj (e.functor.obj j)) ≫\n        NatTrans.app w.hom ((e.functor ⋙ e.inverse).obj j) ≫ F.map (NatTrans.app (unitInv e) j) =\n    NatTrans.app s.π j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF : J ⥤ C\ns : Cone F\nG : K ⥤ C\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\n⊢ lift P ((Cones.equivalenceOfReindexing e w).functor.obj t) ≫\n      lift Q ((Cones.equivalenceOfReindexing (Equivalence.symm e) w').functor.obj s) =\n    𝟙 t.pt\n[PROOFSTEP]\napply hom_ext Q\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nF : J ⥤ C\ns : Cone F\nG : K ⥤ C\nt : Cone G\nP : IsLimit s\nQ : IsLimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\n⊢ ∀ (j : K),\n    (lift P ((Cones.equivalenceOfReindexing e w).functor.obj t) ≫\n          lift Q ((Cones.equivalenceOfReindexing (Equivalence.symm e) w').functor.obj s)) ≫\n        NatTrans.app t.π j =\n      𝟙 t.pt ≫ NatTrans.app t.π j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\n⊢ ((fun f => (Cone.extend t f.down).π) ≫ fun π => { down := lift h { pt := W, π := π } }) = 𝟙 (ULift (W ⟶ t.pt))\n[PROOFSTEP]\nfunext f\n[GOAL]\ncase h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\nf : ULift (W ⟶ t.pt)\n⊢ ((fun f => (Cone.extend t f.down).π) ≫ fun π => { down := lift h { pt := W, π := π } }) f = 𝟙 (ULift (W ⟶ t.pt)) f\n[PROOFSTEP]\napply ULift.ext\n[GOAL]\ncase h.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\nf : ULift (W ⟶ t.pt)\n⊢ (((fun f => (Cone.extend t f.down).π) ≫ fun π => { down := lift h { pt := W, π := π } }) f).down =\n    (𝟙 (ULift (W ⟶ t.pt)) f).down\n[PROOFSTEP]\napply h.hom_ext\n[GOAL]\ncase h.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\nf : ULift (W ⟶ t.pt)\n⊢ ∀ (j : J),\n    (((fun f => (Cone.extend t f.down).π) ≫ fun π => { down := lift h { pt := W, π := π } }) f).down ≫\n        NatTrans.app t.π j =\n      (𝟙 (ULift (W ⟶ t.pt)) f).down ≫ NatTrans.app t.π j\n[PROOFSTEP]\nintro j\n[GOAL]\ncase h.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\nf : ULift (W ⟶ t.pt)\nj : J\n⊢ (((fun f => (Cone.extend t f.down).π) ≫ fun π => { down := lift h { pt := W, π := π } }) f).down ≫\n      NatTrans.app t.π j =\n    (𝟙 (ULift (W ⟶ t.pt)) f).down ≫ NatTrans.app t.π j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\nπ : (const J).obj W ⟶ F\nj✝ j'✝ : J\nf : j✝ ⟶ j'✝\n⊢ (fun j => NatTrans.app π j) j✝ ≫ F.map f = (fun j => NatTrans.app π j) j'✝\n[PROOFSTEP]\nconvert ← (π.naturality f).symm\n[GOAL]\ncase h.e'_3.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\nπ : (const J).obj W ⟶ F\nj✝ j'✝ : J\nf : j✝ ⟶ j'✝\ne_1✝ : (((const J).obj W).obj j✝ ⟶ F.obj j'✝) = (W ⟶ F.obj j'✝)\n⊢ ((const J).obj W).map f ≫ NatTrans.app π j'✝ = (fun j => NatTrans.app π j) j'✝\n[PROOFSTEP]\napply id_comp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\np : { p // ∀ {j j' : J} (f : j ⟶ j'), p j ≫ F.map f = p j' }\nj j' : J\nf : j ⟶ j'\n⊢ ((const J).obj W).map f ≫ (fun j => ↑p j) j' = (fun j => ↑p j) j ≫ F.map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\np : { p // ∀ {j j' : J} (f : j ⟶ j'), p j ≫ F.map f = p j' }\nj j' : J\nf : j ⟶ j'\n⊢ 𝟙 W ≫ ↑p j' = ↑p j ≫ F.map f\n[PROOFSTEP]\nrw [id_comp]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nh : IsLimit t\nW : C\np : { p // ∀ {j j' : J} (f : j ⟶ j'), p j ≫ F.map f = p j' }\nj j' : J\nf : j ⟶ j'\n⊢ ↑p j' = ↑p j ≫ F.map f\n[PROOFSTEP]\nexact (p.2 f).symm\n[GOAL]\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsLimit (G.mapCone t)\nlift : (s : Cone F) → s.pt ⟶ t.pt\nh : ∀ (s : Cone F), G.map (lift s) = CategoryTheory.Limits.IsLimit.lift ht (G.mapCone s)\ns : Cone F\nj : J\n⊢ lift s ≫ NatTrans.app t.π j = NatTrans.app s.π j\n[PROOFSTEP]\napply G.map_injective\n[GOAL]\ncase a\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsLimit (G.mapCone t)\nlift : (s : Cone F) → s.pt ⟶ t.pt\nh : ∀ (s : Cone F), G.map (lift s) = CategoryTheory.Limits.IsLimit.lift ht (G.mapCone s)\ns : Cone F\nj : J\n⊢ G.map (lift s ≫ NatTrans.app t.π j) = G.map (NatTrans.app s.π j)\n[PROOFSTEP]\nrw [G.map_comp, h]\n[GOAL]\ncase a\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsLimit (G.mapCone t)\nlift : (s : Cone F) → s.pt ⟶ t.pt\nh : ∀ (s : Cone F), G.map (lift s) = CategoryTheory.Limits.IsLimit.lift ht (G.mapCone s)\ns : Cone F\nj : J\n⊢ CategoryTheory.Limits.IsLimit.lift ht (G.mapCone s) ≫ G.map (NatTrans.app t.π j) = G.map (NatTrans.app s.π j)\n[PROOFSTEP]\napply ht.fac\n[GOAL]\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsLimit (G.mapCone t)\nlift : (s : Cone F) → s.pt ⟶ t.pt\nh : ∀ (s : Cone F), G.map (lift s) = CategoryTheory.Limits.IsLimit.lift ht (G.mapCone s)\ns : Cone F\nm : s.pt ⟶ t.pt\nw : ∀ (j : J), m ≫ NatTrans.app t.π j = NatTrans.app s.π j\n⊢ m = lift s\n[PROOFSTEP]\napply G.map_injective\n[GOAL]\ncase a\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsLimit (G.mapCone t)\nlift : (s : Cone F) → s.pt ⟶ t.pt\nh : ∀ (s : Cone F), G.map (lift s) = CategoryTheory.Limits.IsLimit.lift ht (G.mapCone s)\ns : Cone F\nm : s.pt ⟶ t.pt\nw : ∀ (j : J), m ≫ NatTrans.app t.π j = NatTrans.app s.π j\n⊢ G.map m = G.map (lift s)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase a\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsLimit (G.mapCone t)\nlift : (s : Cone F) → s.pt ⟶ t.pt\nh : ∀ (s : Cone F), G.map (lift s) = CategoryTheory.Limits.IsLimit.lift ht (G.mapCone s)\ns : Cone F\nm : s.pt ⟶ t.pt\nw : ∀ (j : J), m ≫ NatTrans.app t.π j = NatTrans.app s.π j\n⊢ G.map m = CategoryTheory.Limits.IsLimit.lift ht (G.mapCone s)\n[PROOFSTEP]\nrefine' ht.uniq (mapCone G s) _ fun j => _\n[GOAL]\ncase a\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsLimit (G.mapCone t)\nlift : (s : Cone F) → s.pt ⟶ t.pt\nh : ∀ (s : Cone F), G.map (lift s) = CategoryTheory.Limits.IsLimit.lift ht (G.mapCone s)\ns : Cone F\nm : s.pt ⟶ t.pt\nw : ∀ (j : J), m ≫ NatTrans.app t.π j = NatTrans.app s.π j\nj : J\n⊢ G.map m ≫ NatTrans.app (G.mapCone t).π j = NatTrans.app (G.mapCone s).π j\n[PROOFSTEP]\nconvert ← congrArg (fun f => G.map f) (w j)\n[GOAL]\ncase h.e'_2.h\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsLimit (G.mapCone t)\nlift : (s : Cone F) → s.pt ⟶ t.pt\nh : ∀ (s : Cone F), G.map (lift s) = CategoryTheory.Limits.IsLimit.lift ht (G.mapCone s)\ns : Cone F\nm : s.pt ⟶ t.pt\nw : ∀ (j : J), m ≫ NatTrans.app t.π j = NatTrans.app s.π j\nj : J\ne_1✝ : (G.obj s.pt ⟶ G.obj (F.obj j)) = ((G.mapCone s).pt ⟶ (F ⋙ G).obj j)\n⊢ G.map (m ≫ NatTrans.app t.π j) = G.map m ≫ NatTrans.app (G.mapCone t).π j\n[PROOFSTEP]\napply G.map_comp\n[GOAL]\nJ : Type u₁\ninst✝³ : Category.{v₁, u₁} J\nK✝ : Type u₂\ninst✝² : Category.{v₂, u₂} K✝\nC : Type u₃\ninst✝¹ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nD : Type u₄\ninst✝ : Category.{v₄, u₄} D\nK : J ⥤ C\nF G : C ⥤ D\nh : F ≅ G\nc : Cone K\nt : IsLimit (F.mapCone c)\n⊢ IsLimit (G.mapCone c)\n[PROOFSTEP]\napply postcomposeInvEquiv (isoWhiskerLeft K h : _) (mapCone G c) _\n[GOAL]\nJ : Type u₁\ninst✝³ : Category.{v₁, u₁} J\nK✝ : Type u₂\ninst✝² : Category.{v₂, u₂} K✝\nC : Type u₃\ninst✝¹ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cone F✝\nD : Type u₄\ninst✝ : Category.{v₄, u₄} D\nK : J ⥤ C\nF G : C ⥤ D\nh : F ≅ G\nc : Cone K\nt : IsLimit (F.mapCone c)\n⊢ IsLimit ((Cones.postcompose (isoWhiskerLeft K h).inv).obj (G.mapCone c))\n[PROOFSTEP]\napply t.ofIsoLimit (postcomposeWhiskerLeftMapCone h.symm c).symm\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\n⊢ coneOfHom h (homOfCone h s) = s\n[PROOFSTEP]\ndsimp [coneOfHom, homOfCone]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\n⊢ { pt := s.pt, π := NatTrans.app h.hom (op s.pt) { down := (NatTrans.app h.inv (op s.pt) s.π).down } } = s\n[PROOFSTEP]\nmatch s with\n| .mk s_pt s_π =>\n  congr; dsimp\n  convert congrFun (congrFun (congrArg NatTrans.app h.inv_hom_id) (op s_pt)) s_π using 1\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\ns_pt : C\ns_π : (const J).obj s_pt ⟶ F\n⊢ { pt := { pt := s_pt, π := s_π }.pt,\n      π :=\n        NatTrans.app h.hom (op { pt := s_pt, π := s_π }.pt)\n          { down := (NatTrans.app h.inv (op { pt := s_pt, π := s_π }.pt) { pt := s_pt, π := s_π }.π).down } } =\n    { pt := s_pt, π := s_π }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_π\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\ns_pt : C\ns_π : (const J).obj s_pt ⟶ F\n⊢ NatTrans.app h.hom (op { pt := s_pt, π := s_π }.pt)\n      { down := (NatTrans.app h.inv (op { pt := s_pt, π := s_π }.pt) { pt := s_pt, π := s_π }.π).down } =\n    s_π\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase e_π\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\ns_pt : C\ns_π : (const J).obj s_pt ⟶ F\n⊢ NatTrans.app h.hom (op s_pt) { down := (NatTrans.app h.inv (op s_pt) s_π).down } = s_π\n[PROOFSTEP]\nconvert congrFun (congrFun (congrArg NatTrans.app h.inv_hom_id) (op s_pt)) s_π using 1\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nY : C\nf : Y ⟶ X\n⊢ coneOfHom h f = Cone.extend (limitCone h) f\n[PROOFSTEP]\ndsimp [coneOfHom, limitCone, Cone.extend]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nY : C\nf : Y ⟶ X\n⊢ { pt := Y, π := NatTrans.app h.hom (op Y) { down := f } } =\n    { pt := Y, π := (const J).map f ≫ NatTrans.app h.hom (op X) { down := 𝟙 X } }\n[PROOFSTEP]\ncongr with j\n[GOAL]\ncase e_π.w.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nY : C\nf : Y ⟶ X\nj : J\n⊢ NatTrans.app (NatTrans.app h.hom (op Y) { down := f }) j =\n    NatTrans.app ((const J).map f ≫ NatTrans.app h.hom (op X) { down := 𝟙 X }) j\n[PROOFSTEP]\nhave t := congrFun (h.hom.naturality f.op) ⟨𝟙 X⟩\n[GOAL]\ncase e_π.w.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nY : C\nf : Y ⟶ X\nj : J\nt :\n  ((yoneda.obj X ⋙ uliftFunctor.{u₁, v₃}).map f.op ≫ NatTrans.app h.hom (op Y)) { down := 𝟙 X } =\n    (NatTrans.app h.hom (op X) ≫ (Functor.cones F).map f.op) { down := 𝟙 X }\n⊢ NatTrans.app (NatTrans.app h.hom (op Y) { down := f }) j =\n    NatTrans.app ((const J).map f ≫ NatTrans.app h.hom (op X) { down := 𝟙 X }) j\n[PROOFSTEP]\ndsimp at t \n[GOAL]\ncase e_π.w.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nY : C\nf : Y ⟶ X\nj : J\nt :\n  NatTrans.app h.hom (op Y) { down := f ≫ 𝟙 X } = (Functor.cones F).map f.op (NatTrans.app h.hom (op X) { down := 𝟙 X })\n⊢ NatTrans.app (NatTrans.app h.hom (op Y) { down := f }) j =\n    NatTrans.app ((const J).map f ≫ NatTrans.app h.hom (op X) { down := 𝟙 X }) j\n[PROOFSTEP]\nsimp only [comp_id] at t \n[GOAL]\ncase e_π.w.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nY : C\nf : Y ⟶ X\nj : J\nt : NatTrans.app h.hom (op Y) { down := f } = (Functor.cones F).map f.op (NatTrans.app h.hom (op X) { down := 𝟙 X })\n⊢ NatTrans.app (NatTrans.app h.hom (op Y) { down := f }) j =\n    NatTrans.app ((const J).map f ≫ NatTrans.app h.hom (op X) { down := 𝟙 X }) j\n[PROOFSTEP]\nrw [congrFun (congrArg NatTrans.app t) j]\n[GOAL]\ncase e_π.w.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nY : C\nf : Y ⟶ X\nj : J\nt : NatTrans.app h.hom (op Y) { down := f } = (Functor.cones F).map f.op (NatTrans.app h.hom (op X) { down := 𝟙 X })\n⊢ NatTrans.app ((Functor.cones F).map f.op (NatTrans.app h.hom (op X) { down := 𝟙 X })) j =\n    NatTrans.app ((const J).map f ≫ NatTrans.app h.hom (op X) { down := 𝟙 X }) j\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\n⊢ Cone.extend (limitCone h) (homOfCone h s) = s\n[PROOFSTEP]\nrw [← coneOfHom_homOfCone h s]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\n⊢ Cone.extend (limitCone h) (homOfCone h (coneOfHom h (homOfCone h s))) = coneOfHom h (homOfCone h s)\n[PROOFSTEP]\nconv_lhs => simp only [homOfCone_coneOfHom]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\n| Cone.extend (limitCone h) (homOfCone h (coneOfHom h (homOfCone h s)))\n[PROOFSTEP]\nsimp only [homOfCone_coneOfHom]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\n| Cone.extend (limitCone h) (homOfCone h (coneOfHom h (homOfCone h s)))\n[PROOFSTEP]\nsimp only [homOfCone_coneOfHom]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\n| Cone.extend (limitCone h) (homOfCone h (coneOfHom h (homOfCone h s)))\n[PROOFSTEP]\nsimp only [homOfCone_coneOfHom]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\n⊢ Cone.extend (limitCone h) (homOfCone h s) = coneOfHom h (homOfCone h s)\n[PROOFSTEP]\napply (coneOfHom_fac _ _).symm\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\nj : J\n⊢ (fun s => homOfCone h s) s ≫ NatTrans.app (limitCone h).π j = NatTrans.app s.π j\n[PROOFSTEP]\nhave h := cone_fac h s\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh✝ : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\nj : J\nh : Cone.extend (limitCone h✝) (homOfCone h✝ s) = s\n⊢ (fun s => homOfCone h✝ s) s ≫ NatTrans.app (limitCone h✝).π j = NatTrans.app s.π j\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh✝ : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nj : J\npt✝ : C\nπ✝ : (const J).obj pt✝ ⟶ F\nh : Cone.extend (limitCone h✝) (homOfCone h✝ { pt := pt✝, π := π✝ }) = { pt := pt✝, π := π✝ }\n⊢ (fun s => homOfCone h✝ s) { pt := pt✝, π := π✝ } ≫ NatTrans.app (limitCone h✝).π j =\n    NatTrans.app { pt := pt✝, π := π✝ }.π j\n[PROOFSTEP]\ninjection h with h₁ h₂\n[GOAL]\ncase mk\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nj : J\npt✝ : C\nπ✝ : (const J).obj pt✝ ⟶ F\nh₁ : { pt := pt✝, π := π✝ }.pt = pt✝\nh₂ :\n  NatTrans.app (Cone.extensions (limitCone h)) (op { pt := pt✝, π := π✝ }.pt)\n      { down := homOfCone h { pt := pt✝, π := π✝ } } =\n    π✝\n⊢ (fun s => homOfCone h s) { pt := pt✝, π := π✝ } ≫ NatTrans.app (limitCone h).π j =\n    NatTrans.app { pt := pt✝, π := π✝ }.π j\n[PROOFSTEP]\nsimp only [heq_iff_eq] at h₂ \n[GOAL]\ncase mk\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nj : J\npt✝ : C\nπ✝ : (const J).obj pt✝ ⟶ F\nh₁ : { pt := pt✝, π := π✝ }.pt = pt✝\nh₂ : NatTrans.app (Cone.extensions (limitCone h)) (op pt✝) { down := homOfCone h { pt := pt✝, π := π✝ } } = π✝\n⊢ (fun s => homOfCone h s) { pt := pt✝, π := π✝ } ≫ NatTrans.app (limitCone h).π j =\n    NatTrans.app { pt := pt✝, π := π✝ }.π j\n[PROOFSTEP]\nconv_rhs => rw [← h₂]; rfl\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nj : J\npt✝ : C\nπ✝ : (const J).obj pt✝ ⟶ F\nh₁ : { pt := pt✝, π := π✝ }.pt = pt✝\nh₂ : NatTrans.app (Cone.extensions (limitCone h)) (op pt✝) { down := homOfCone h { pt := pt✝, π := π✝ } } = π✝\n| NatTrans.app { pt := pt✝, π := π✝ }.π j\n[PROOFSTEP]\nrw [← h₂]; rfl\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nj : J\npt✝ : C\nπ✝ : (const J).obj pt✝ ⟶ F\nh₁ : { pt := pt✝, π := π✝ }.pt = pt✝\nh₂ : NatTrans.app (Cone.extensions (limitCone h)) (op pt✝) { down := homOfCone h { pt := pt✝, π := π✝ } } = π✝\n| NatTrans.app { pt := pt✝, π := π✝ }.π j\n[PROOFSTEP]\nrw [← h₂]; rfl\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nj : J\npt✝ : C\nπ✝ : (const J).obj pt✝ ⟶ F\nh₁ : { pt := pt✝, π := π✝ }.pt = pt✝\nh₂ : NatTrans.app (Cone.extensions (limitCone h)) (op pt✝) { down := homOfCone h { pt := pt✝, π := π✝ } } = π✝\n| NatTrans.app { pt := pt✝, π := π✝ }.π j\n[PROOFSTEP]\nrw [← h₂]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\nj : J\npt✝ : C\nπ✝ : (const J).obj pt✝ ⟶ F\nh₁ : { pt := pt✝, π := π✝ }.pt = pt✝\nh₂ : NatTrans.app (Cone.extensions (limitCone h)) (op pt✝) { down := homOfCone h { pt := pt✝, π := π✝ } } = π✝\n| NatTrans.app\n    { pt := pt✝,\n        π := NatTrans.app (Cone.extensions (limitCone h)) (op pt✝) { down := homOfCone h { pt := pt✝, π := π✝ } } }.π\n    j\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\nm : s.pt ⟶ (limitCone h).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone h).π j = NatTrans.app s.π j\n⊢ m = (fun s => homOfCone h s) s\n[PROOFSTEP]\nrw [← homOfCone_coneOfHom h m]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\nm : s.pt ⟶ (limitCone h).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone h).π j = NatTrans.app s.π j\n⊢ homOfCone h (coneOfHom h m) = (fun s => homOfCone h s) s\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_8.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\nm : s.pt ⟶ (limitCone h).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone h).π j = NatTrans.app s.π j\n⊢ coneOfHom h m = s\n[PROOFSTEP]\nrw [coneOfHom_fac]\n[GOAL]\ncase h.e_8.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\nm : s.pt ⟶ (limitCone h).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone h).π j = NatTrans.app s.π j\n⊢ Cone.extend (limitCone h) m = s\n[PROOFSTEP]\ndsimp [Cone.extend]\n[GOAL]\ncase h.e_8.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\ns : Cone F\nm : s.pt ⟶ (limitCone h).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone h).π j = NatTrans.app s.π j\n⊢ { pt := s.pt, π := (const J).map m ≫ (limitCone h).π } = s\n[PROOFSTEP]\ncases s\n[GOAL]\ncase h.e_8.h.mk\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\npt✝ : C\nπ✝ : (const J).obj pt✝ ⟶ F\nm : { pt := pt✝, π := π✝ }.pt ⟶ (limitCone h).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone h).π j = NatTrans.app { pt := pt✝, π := π✝ }.π j\n⊢ { pt := { pt := pt✝, π := π✝ }.pt, π := (const J).map m ≫ (limitCone h).π } = { pt := pt✝, π := π✝ }\n[PROOFSTEP]\ncongr with j\n[GOAL]\ncase h.e_8.h.mk.e_π.w.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cone F\nX : C\nh : yoneda.obj X ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cones F\npt✝ : C\nπ✝ : (const J).obj pt✝ ⟶ F\nm : { pt := pt✝, π := π✝ }.pt ⟶ (limitCone h).pt\nw : ∀ (j : J), m ≫ NatTrans.app (limitCone h).π j = NatTrans.app { pt := pt✝, π := π✝ }.π j\nj : J\n⊢ NatTrans.app ((const J).map m ≫ (limitCone h).π) j = NatTrans.app π✝ j\n[PROOFSTEP]\nexact w j\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\n⊢ ∀ (a b : IsColimit t), a = b\n[PROOFSTEP]\nintro P Q\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nP Q : IsColimit t\n⊢ P = Q\n[PROOFSTEP]\ncases P\n[GOAL]\ncase mk\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nQ : IsColimit t\ndesc✝ : (s : Cocone F) → t.pt ⟶ s.pt\nfac✝ : ∀ (s : Cocone F) (j : J), NatTrans.app t.ι j ≫ desc✝ s = NatTrans.app s.ι j\nuniq✝ : ∀ (s : Cocone F) (m : t.pt ⟶ s.pt), (∀ (j : J), NatTrans.app t.ι j ≫ m = NatTrans.app s.ι j) → m = desc✝ s\n⊢ mk desc✝ = Q\n[PROOFSTEP]\ncases Q\n[GOAL]\ncase mk.mk\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\ndesc✝¹ : (s : Cocone F) → t.pt ⟶ s.pt\nfac✝¹ : ∀ (s : Cocone F) (j : J), NatTrans.app t.ι j ≫ desc✝¹ s = NatTrans.app s.ι j\nuniq✝¹ : ∀ (s : Cocone F) (m : t.pt ⟶ s.pt), (∀ (j : J), NatTrans.app t.ι j ≫ m = NatTrans.app s.ι j) → m = desc✝¹ s\ndesc✝ : (s : Cocone F) → t.pt ⟶ s.pt\nfac✝ : ∀ (s : Cocone F) (j : J), NatTrans.app t.ι j ≫ desc✝ s = NatTrans.app s.ι j\nuniq✝ : ∀ (s : Cocone F) (m : t.pt ⟶ s.pt), (∀ (j : J), NatTrans.app t.ι j ≫ m = NatTrans.app s.ι j) → m = desc✝ s\n⊢ mk desc✝¹ = mk desc✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_desc\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\ndesc✝¹ : (s : Cocone F) → t.pt ⟶ s.pt\nfac✝¹ : ∀ (s : Cocone F) (j : J), NatTrans.app t.ι j ≫ desc✝¹ s = NatTrans.app s.ι j\nuniq✝¹ : ∀ (s : Cocone F) (m : t.pt ⟶ s.pt), (∀ (j : J), NatTrans.app t.ι j ≫ m = NatTrans.app s.ι j) → m = desc✝¹ s\ndesc✝ : (s : Cocone F) → t.pt ⟶ s.pt\nfac✝ : ∀ (s : Cocone F) (j : J), NatTrans.app t.ι j ≫ desc✝ s = NatTrans.app s.ι j\nuniq✝ : ∀ (s : Cocone F) (m : t.pt ⟶ s.pt), (∀ (j : J), NatTrans.app t.ι j ≫ m = NatTrans.app s.ι j) → m = desc✝ s\n⊢ desc✝¹ = desc✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\ns t : Cocone F\nh : IsColimit t\nf f' : t ⟶ s\n⊢ ∀ {g : t ⟶ s}, g = descCoconeMorphism h s\n[PROOFSTEP]\nintro g\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\ns t : Cocone F\nh : IsColimit t\nf f' g : t ⟶ s\n⊢ g = descCoconeMorphism h s\n[PROOFSTEP]\naesop_cat_nonterminal\n[GOAL]\ncase w\nJ : Type u₁\ninst : Category.{v₁, u₁} J\nK : Type u₂\ninst_1 : Category.{v₂, u₂} K\nC : Type u₃\ninst_2 : Category.{v₃, u₃} C\nF : J ⥤ C\ns t : Cocone F\nh : IsColimit t\nf f' g : t ⟶ s\n⊢ g.Hom = desc h s\n[PROOFSTEP]\nexact h.uniq _ _ g.w\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nht : ∀ (s : Cocone F), ∃! d, ∀ (j : J), NatTrans.app t.ι j ≫ d = NatTrans.app s.ι j\n⊢ IsColimit t\n[PROOFSTEP]\nchoose s hs hs' using ht\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\ns : (s : Cocone F) → t.pt ⟶ s.pt\nhs : ∀ (s_1 : Cocone F), (fun d => ∀ (j : J), NatTrans.app t.ι j ≫ d = NatTrans.app s_1.ι j) (s s_1)\nhs' :\n  ∀ (s_1 : Cocone F) (y : t.pt ⟶ s_1.pt),\n    (fun d => ∀ (j : J), NatTrans.app t.ι j ≫ d = NatTrans.app s_1.ι j) y → y = s s_1\n⊢ IsColimit t\n[PROOFSTEP]\nexact ⟨s, hs, hs'⟩\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\ndesc : (s : Cocone F) → t ⟶ s\nuniq' : ∀ (s : Cocone F) (m : t ⟶ s), m = desc s\ns : Cocone F\nm : t.pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app t.ι j ≫ m = NatTrans.app s.ι j\n⊢ CoconeMorphism.mk m = desc s\n[PROOFSTEP]\napply uniq'\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr s t : Cocone F\nP : IsColimit s\nQ : IsColimit t\n⊢ ∀ (j : J), NatTrans.app s.ι j ≫ (coconePointUniqueUpToIso P Q).hom ≫ desc Q r = NatTrans.app r.ι j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr s t : Cocone F\nP : IsColimit s\nQ : IsColimit t\n⊢ ∀ (j : J), NatTrans.app t.ι j ≫ (coconePointUniqueUpToIso P Q).inv ≫ desc P r = NatTrans.app r.ι j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cocone F\nP : IsColimit r\ni : r ≅ t\ns : Cocone F\nm : t ⟶ s\n⊢ m = (fun s => i.inv ≫ descCoconeMorphism P s) s\n[PROOFSTEP]\nrw [i.eq_inv_comp]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cocone F\nP : IsColimit r\ni : r ≅ t\ns : Cocone F\nm : t ⟶ s\n⊢ i.hom ≫ m = descCoconeMorphism P s\n[PROOFSTEP]\napply P.uniq_cocone_morphism\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cocone F\ni : r ≅ t\n⊢ Function.LeftInverse (fun h => ofIsoColimit h i.symm) fun h => ofIsoColimit h i\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cocone F\ni : r ≅ t\n⊢ Function.RightInverse (fun h => ofIsoColimit h i.symm) fun h => ofIsoColimit h i\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cocone F\nP : IsColimit r\ni : IsIso (desc P t)\n⊢ r ≅ t\n[PROOFSTEP]\nhaveI : IsIso (P.descCoconeMorphism t).Hom := i\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cocone F\nP : IsColimit r\ni : IsIso (desc P t)\nthis : IsIso (descCoconeMorphism P t).Hom\n⊢ r ≅ t\n[PROOFSTEP]\nhaveI : IsIso (P.descCoconeMorphism t) := Cocones.cocone_iso_of_hom_iso _\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nr t : Cocone F\nP : IsColimit r\ni : IsIso (desc P t)\nthis✝ : IsIso (descCoconeMorphism P t).Hom\nthis : IsIso (descCoconeMorphism P t)\n⊢ r ≅ t\n[PROOFSTEP]\napply asIso (P.descCoconeMorphism t)\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\nm : t.pt ⟶ W\n⊢ ∀ ⦃X Y : J⦄ (f : X ⟶ Y),\n    F.map f ≫ (fun b => NatTrans.app t.ι b ≫ m) Y = (fun b => NatTrans.app t.ι b ≫ m) X ≫ ((const J).obj W).map f\n[PROOFSTEP]\nintros\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\nm : t.pt ⟶ W\nX✝ Y✝ : J\nf✝ : X✝ ⟶ Y✝\n⊢ F.map f✝ ≫ (fun b => NatTrans.app t.ι b ≫ m) Y✝ = (fun b => NatTrans.app t.ι b ≫ m) X✝ ≫ ((const J).obj W).map f✝\n[PROOFSTEP]\nerw [← assoc, t.ι.naturality, comp_id, comp_id]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\nf f' : t.pt ⟶ W\nw : ∀ (j : J), NatTrans.app t.ι j ≫ f = NatTrans.app t.ι j ≫ f'\n⊢ f = f'\n[PROOFSTEP]\nrw [h.hom_desc f, h.hom_desc f']\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\nf f' : t.pt ⟶ W\nw : ∀ (j : J), NatTrans.app t.ι j ≫ f = NatTrans.app t.ι j ≫ f'\n⊢ desc h { pt := W, ι := NatTrans.mk fun b => NatTrans.app t.ι b ≫ f } =\n    desc h { pt := W, ι := NatTrans.mk fun b => NatTrans.app t.ι b ≫ f' }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_8.h.e_ι.e_app\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\nf f' : t.pt ⟶ W\nw : ∀ (j : J), NatTrans.app t.ι j ≫ f = NatTrans.app t.ι j ≫ f'\n⊢ (fun b => NatTrans.app t.ι b ≫ f) = fun b => NatTrans.app t.ι b ≫ f'\n[PROOFSTEP]\nexact funext w\n[GOAL]\nJ : Type u₁\ninst✝³ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝² : Category.{v₂, u₂} K\nC : Type u₃\ninst✝¹ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nD : Type u₄\ninst✝ : Category.{v₄, u₄} D\nG : K ⥤ D\nh : Cocone G ≌ Cocone F\nc : Cocone G\n⊢ Function.LeftInverse (ofLeftAdjoint h.functor) fun P =>\n    ofIsoColimit (ofLeftAdjoint h.inverse P) (h.unitIso.symm.app c)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝³ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝² : Category.{v₂, u₂} K\nC : Type u₃\ninst✝¹ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nD : Type u₄\ninst✝ : Category.{v₄, u₄} D\nG : K ⥤ D\nh : Cocone G ≌ Cocone F\nc : Cocone G\n⊢ Function.RightInverse (ofLeftAdjoint h.functor) fun P =>\n    ofIsoColimit (ofLeftAdjoint h.inverse P) (h.unitIso.symm.app c)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF G : J ⥤ C\ns : Cocone F\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\nw : F ≅ G\n⊢ ∀ (j : J), NatTrans.app s.ι j ≫ map P t w.hom ≫ map Q s w.inv = NatTrans.app s.ι j ≫ 𝟙 s.pt\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF G : J ⥤ C\ns : Cocone F\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\nw : F ≅ G\n⊢ ∀ (j : J), NatTrans.app t.ι j ≫ map Q s w.inv ≫ map P t w.hom = NatTrans.app t.ι j ≫ 𝟙 t.pt\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF G : J ⥤ C\ns : Cocone F\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\nw : F ≅ G\nj : J\n⊢ NatTrans.app s.ι j ≫ (coconePointsIsoOfNatIso P Q w).hom = NatTrans.app w.hom j ≫ NatTrans.app t.ι j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF G : J ⥤ C\ns : Cocone F\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\nw : F ≅ G\nj : J\n⊢ NatTrans.app t.ι j ≫ (coconePointsIsoOfNatIso P Q w).inv = NatTrans.app w.inv j ≫ NatTrans.app s.ι j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF G : J ⥤ C\ns : Cocone F\nr t : Cocone G\nP : IsColimit s\nQ : IsColimit t\nw : F ≅ G\n⊢ ∀ (j : J), NatTrans.app s.ι j ≫ (coconePointsIsoOfNatIso P Q w).hom ≫ desc Q r = NatTrans.app s.ι j ≫ map P r w.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF G : J ⥤ C\ns : Cocone G\nr t : Cocone F\nP : IsColimit t\nQ : IsColimit s\nw : F ≅ G\n⊢ ∀ (j : J), NatTrans.app s.ι j ≫ (coconePointsIsoOfNatIso P Q w).inv ≫ desc P r = NatTrans.app s.ι j ≫ map Q r w.inv\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt s : Cocone F\ne : K ≌ J\n⊢ Function.LeftInverse (ofWhiskerEquivalence e) fun h => whiskerEquivalence h e\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt s : Cocone F\ne : K ≌ J\n⊢ Function.RightInverse (ofWhiskerEquivalence e) fun h => whiskerEquivalence h e\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF : J ⥤ C\ns : Cocone F\nG : K ⥤ C\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\n⊢ desc P ((Cocones.equivalenceOfReindexing e w).functor.obj t) ≫\n      desc Q ((Cocones.equivalenceOfReindexing (Equivalence.symm e) w').functor.obj s) =\n    𝟙 s.pt\n[PROOFSTEP]\napply hom_ext P\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF : J ⥤ C\ns : Cocone F\nG : K ⥤ C\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\n⊢ ∀ (j : J),\n    NatTrans.app s.ι j ≫\n        desc P ((Cocones.equivalenceOfReindexing e w).functor.obj t) ≫\n          desc Q ((Cocones.equivalenceOfReindexing (Equivalence.symm e) w').functor.obj s) =\n      NatTrans.app s.ι j ≫ 𝟙 s.pt\n[PROOFSTEP]\nintro j\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF : J ⥤ C\ns : Cocone F\nG : K ⥤ C\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\nj : J\n⊢ NatTrans.app s.ι j ≫\n      desc P ((Cocones.equivalenceOfReindexing e w).functor.obj t) ≫\n        desc Q ((Cocones.equivalenceOfReindexing (Equivalence.symm e) w').functor.obj s) =\n    NatTrans.app s.ι j ≫ 𝟙 s.pt\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF : J ⥤ C\ns : Cocone F\nG : K ⥤ C\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\nj : J\n⊢ NatTrans.app s.ι j ≫\n      desc P ((Cocones.precompose w.inv).obj (Cocone.whisker e.functor t)) ≫\n        desc Q\n          ((Cocones.precompose ((invFunIdAssoc e G).inv ≫ whiskerLeft e.inverse w.hom)).obj\n            (Cocone.whisker e.inverse s)) =\n    NatTrans.app s.ι j ≫ 𝟙 s.pt\n[PROOFSTEP]\nsimp only [Limits.Cocone.whisker_ι, fac, invFunIdAssoc_inv_app, whiskerLeft_app, assoc, comp_id,\n  Limits.Cocones.precompose_obj_ι, fac_assoc, NatTrans.comp_app]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF : J ⥤ C\ns : Cocone F\nG : K ⥤ C\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\nj : J\n⊢ NatTrans.app w.inv j ≫\n      G.map (NatTrans.app (counitInv e) (e.functor.obj j)) ≫\n        NatTrans.app w.hom (e.inverse.obj (e.functor.obj j)) ≫ NatTrans.app s.ι (e.inverse.obj (e.functor.obj j)) =\n    NatTrans.app s.ι j\n[PROOFSTEP]\nrw [counitInv_app_functor, ← Functor.comp_map, ← w.inv.naturality_assoc]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF : J ⥤ C\ns : Cocone F\nG : K ⥤ C\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\nj : J\n⊢ F.map (NatTrans.app (unit e) j) ≫\n      NatTrans.app w.inv ((e.functor ⋙ e.inverse).obj j) ≫\n        NatTrans.app w.hom (e.inverse.obj (e.functor.obj j)) ≫ NatTrans.app s.ι (e.inverse.obj (e.functor.obj j)) =\n    NatTrans.app s.ι j\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF : J ⥤ C\ns : Cocone F\nG : K ⥤ C\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\nj : J\n⊢ F.map (NatTrans.app (unit e) j) ≫\n      NatTrans.app w.inv (e.inverse.obj (e.functor.obj j)) ≫\n        NatTrans.app w.hom (e.inverse.obj (e.functor.obj j)) ≫ NatTrans.app s.ι (e.inverse.obj (e.functor.obj j)) =\n    NatTrans.app s.ι j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF : J ⥤ C\ns : Cocone F\nG : K ⥤ C\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\n⊢ desc Q ((Cocones.equivalenceOfReindexing (Equivalence.symm e) w').functor.obj s) ≫\n      desc P ((Cocones.equivalenceOfReindexing e w).functor.obj t) =\n    𝟙 t.pt\n[PROOFSTEP]\napply hom_ext Q\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nF : J ⥤ C\ns : Cocone F\nG : K ⥤ C\nt : Cocone G\nP : IsColimit s\nQ : IsColimit t\ne : J ≌ K\nw : e.functor ⋙ G ≅ F\nw' : e.inverse ⋙ F ≅ G := (isoWhiskerLeft e.inverse w).symm ≪≫ invFunIdAssoc e G\n⊢ ∀ (j : K),\n    NatTrans.app t.ι j ≫\n        desc Q ((Cocones.equivalenceOfReindexing (Equivalence.symm e) w').functor.obj s) ≫\n          desc P ((Cocones.equivalenceOfReindexing e w).functor.obj t) =\n      NatTrans.app t.ι j ≫ 𝟙 t.pt\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\n⊢ ((fun f => (Cocone.extend t f.down).ι) ≫ fun ι => { down := desc h { pt := W, ι := ι } }) = 𝟙 (ULift (t.pt ⟶ W))\n[PROOFSTEP]\nfunext f\n[GOAL]\ncase h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\nf : ULift (t.pt ⟶ W)\n⊢ ((fun f => (Cocone.extend t f.down).ι) ≫ fun ι => { down := desc h { pt := W, ι := ι } }) f = 𝟙 (ULift (t.pt ⟶ W)) f\n[PROOFSTEP]\napply ULift.ext\n[GOAL]\ncase h.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\nf : ULift (t.pt ⟶ W)\n⊢ (((fun f => (Cocone.extend t f.down).ι) ≫ fun ι => { down := desc h { pt := W, ι := ι } }) f).down =\n    (𝟙 (ULift (t.pt ⟶ W)) f).down\n[PROOFSTEP]\napply h.hom_ext\n[GOAL]\ncase h.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\nf : ULift (t.pt ⟶ W)\n⊢ ∀ (j : J),\n    NatTrans.app t.ι j ≫\n        (((fun f => (Cocone.extend t f.down).ι) ≫ fun ι => { down := desc h { pt := W, ι := ι } }) f).down =\n      NatTrans.app t.ι j ≫ (𝟙 (ULift (t.pt ⟶ W)) f).down\n[PROOFSTEP]\nintro j\n[GOAL]\ncase h.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\nf : ULift (t.pt ⟶ W)\nj : J\n⊢ NatTrans.app t.ι j ≫\n      (((fun f => (Cocone.extend t f.down).ι) ≫ fun ι => { down := desc h { pt := W, ι := ι } }) f).down =\n    NatTrans.app t.ι j ≫ (𝟙 (ULift (t.pt ⟶ W)) f).down\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\nι : F ⟶ (const J).obj W\nj j' : J\nf : j ⟶ j'\n⊢ F.map f ≫ (fun j => NatTrans.app ι j) j' = (fun j => NatTrans.app ι j) j\n[PROOFSTEP]\nconvert ← ι.naturality f\n[GOAL]\ncase h.e'_3.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\nι : F ⟶ (const J).obj W\nj j' : J\nf : j ⟶ j'\ne_1✝ : (F.obj j ⟶ ((const J).obj W).obj j') = (F.obj j ⟶ W)\n⊢ NatTrans.app ι j ≫ ((const J).obj W).map f = (fun j => NatTrans.app ι j) j\n[PROOFSTEP]\napply comp_id\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\np : { p // ∀ {j j' : J} (f : j ⟶ j'), F.map f ≫ p j' = p j }\nj j' : J\nf : j ⟶ j'\n⊢ F.map f ≫ (fun j => ↑p j) j' = (fun j => ↑p j) j ≫ ((const J).obj W).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\np : { p // ∀ {j j' : J} (f : j ⟶ j'), F.map f ≫ p j' = p j }\nj j' : J\nf : j ⟶ j'\n⊢ F.map f ≫ ↑p j' = ↑p j ≫ 𝟙 W\n[PROOFSTEP]\nrw [comp_id]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nh : IsColimit t\nW : C\np : { p // ∀ {j j' : J} (f : j ⟶ j'), F.map f ≫ p j' = p j }\nj j' : J\nf : j ⟶ j'\n⊢ F.map f ≫ ↑p j' = ↑p j\n[PROOFSTEP]\nexact p.2 f\n[GOAL]\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cocone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsColimit (G.mapCocone t)\ndesc : (s : Cocone F) → t.pt ⟶ s.pt\nh : ∀ (s : Cocone F), G.map (desc s) = CategoryTheory.Limits.IsColimit.desc ht (G.mapCocone s)\ns : Cocone F\nj : J\n⊢ NatTrans.app t.ι j ≫ desc s = NatTrans.app s.ι j\n[PROOFSTEP]\napply G.map_injective\n[GOAL]\ncase a\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cocone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsColimit (G.mapCocone t)\ndesc : (s : Cocone F) → t.pt ⟶ s.pt\nh : ∀ (s : Cocone F), G.map (desc s) = CategoryTheory.Limits.IsColimit.desc ht (G.mapCocone s)\ns : Cocone F\nj : J\n⊢ G.map (NatTrans.app t.ι j ≫ desc s) = G.map (NatTrans.app s.ι j)\n[PROOFSTEP]\nrw [G.map_comp, h]\n[GOAL]\ncase a\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cocone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsColimit (G.mapCocone t)\ndesc : (s : Cocone F) → t.pt ⟶ s.pt\nh : ∀ (s : Cocone F), G.map (desc s) = CategoryTheory.Limits.IsColimit.desc ht (G.mapCocone s)\ns : Cocone F\nj : J\n⊢ G.map (NatTrans.app t.ι j) ≫ CategoryTheory.Limits.IsColimit.desc ht (G.mapCocone s) = G.map (NatTrans.app s.ι j)\n[PROOFSTEP]\napply ht.fac\n[GOAL]\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cocone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsColimit (G.mapCocone t)\ndesc : (s : Cocone F) → t.pt ⟶ s.pt\nh : ∀ (s : Cocone F), G.map (desc s) = CategoryTheory.Limits.IsColimit.desc ht (G.mapCocone s)\ns : Cocone F\nm : t.pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app t.ι j ≫ m = NatTrans.app s.ι j\n⊢ m = desc s\n[PROOFSTEP]\napply G.map_injective\n[GOAL]\ncase a\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cocone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsColimit (G.mapCocone t)\ndesc : (s : Cocone F) → t.pt ⟶ s.pt\nh : ∀ (s : Cocone F), G.map (desc s) = CategoryTheory.Limits.IsColimit.desc ht (G.mapCocone s)\ns : Cocone F\nm : t.pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app t.ι j ≫ m = NatTrans.app s.ι j\n⊢ G.map m = G.map (desc s)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase a\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cocone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsColimit (G.mapCocone t)\ndesc : (s : Cocone F) → t.pt ⟶ s.pt\nh : ∀ (s : Cocone F), G.map (desc s) = CategoryTheory.Limits.IsColimit.desc ht (G.mapCocone s)\ns : Cocone F\nm : t.pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app t.ι j ≫ m = NatTrans.app s.ι j\n⊢ G.map m = CategoryTheory.Limits.IsColimit.desc ht (G.mapCocone s)\n[PROOFSTEP]\nrefine' ht.uniq (mapCocone G s) _ fun j => _\n[GOAL]\ncase a\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cocone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsColimit (G.mapCocone t)\ndesc : (s : Cocone F) → t.pt ⟶ s.pt\nh : ∀ (s : Cocone F), G.map (desc s) = CategoryTheory.Limits.IsColimit.desc ht (G.mapCocone s)\ns : Cocone F\nm : t.pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app t.ι j ≫ m = NatTrans.app s.ι j\nj : J\n⊢ NatTrans.app (G.mapCocone t).ι j ≫ G.map m = NatTrans.app (G.mapCocone s).ι j\n[PROOFSTEP]\nconvert ← congrArg (fun f => G.map f) (w j)\n[GOAL]\ncase h.e'_2.h\nJ : Type u₁\ninst✝⁴ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝³ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝² : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ t : Cocone F\nD : Type u₄\ninst✝¹ : Category.{v₄, u₄} D\nG : C ⥤ D\ninst✝ : Faithful G\nht : IsColimit (G.mapCocone t)\ndesc : (s : Cocone F) → t.pt ⟶ s.pt\nh : ∀ (s : Cocone F), G.map (desc s) = CategoryTheory.Limits.IsColimit.desc ht (G.mapCocone s)\ns : Cocone F\nm : t.pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app t.ι j ≫ m = NatTrans.app s.ι j\nj : J\ne_1✝ : (G.obj (F.obj j) ⟶ G.obj s.pt) = ((F ⋙ G).obj j ⟶ (G.mapCocone s).pt)\n⊢ G.map (NatTrans.app t.ι j ≫ m) = NatTrans.app (G.mapCocone t).ι j ≫ G.map m\n[PROOFSTEP]\napply G.map_comp\n[GOAL]\nJ : Type u₁\ninst✝³ : Category.{v₁, u₁} J\nK✝ : Type u₂\ninst✝² : Category.{v₂, u₂} K✝\nC : Type u₃\ninst✝¹ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nD : Type u₄\ninst✝ : Category.{v₄, u₄} D\nK : J ⥤ C\nF G : C ⥤ D\nh : F ≅ G\nc : Cocone K\nt : IsColimit (F.mapCocone c)\n⊢ IsColimit (G.mapCocone c)\n[PROOFSTEP]\napply IsColimit.ofIsoColimit _ (precomposeWhiskerLeftMapCocone h c)\n[GOAL]\nJ : Type u₁\ninst✝³ : Category.{v₁, u₁} J\nK✝ : Type u₂\ninst✝² : Category.{v₂, u₂} K✝\nC : Type u₃\ninst✝¹ : Category.{v₃, u₃} C\nF✝ : J ⥤ C\nt✝ : Cocone F✝\nD : Type u₄\ninst✝ : Category.{v₄, u₄} D\nK : J ⥤ C\nF G : C ⥤ D\nh : F ≅ G\nc : Cocone K\nt : IsColimit (F.mapCocone c)\n⊢ IsColimit ((Cocones.precompose (whiskerLeft K h.inv)).obj (F.mapCocone c))\n[PROOFSTEP]\napply (precomposeInvEquiv (isoWhiskerLeft K h : _) _).symm t\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\n⊢ coconeOfHom h (homOfCocone h s) = s\n[PROOFSTEP]\ndsimp [coconeOfHom, homOfCocone]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\n⊢ { pt := s.pt, ι := NatTrans.app h.hom s.pt { down := (NatTrans.app h.inv s.pt s.ι).down } } = s\n[PROOFSTEP]\nhave ⟨s_pt, s_ι⟩ := s\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\ns_pt : C\ns_ι : F ⟶ (const J).obj s_pt\n⊢ { pt := { pt := s_pt, ι := s_ι }.pt,\n      ι :=\n        NatTrans.app h.hom { pt := s_pt, ι := s_ι }.pt\n          { down := (NatTrans.app h.inv { pt := s_pt, ι := s_ι }.pt { pt := s_pt, ι := s_ι }.ι).down } } =\n    { pt := s_pt, ι := s_ι }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_ι\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\ns_pt : C\ns_ι : F ⟶ (const J).obj s_pt\n⊢ NatTrans.app h.hom { pt := s_pt, ι := s_ι }.pt\n      { down := (NatTrans.app h.inv { pt := s_pt, ι := s_ι }.pt { pt := s_pt, ι := s_ι }.ι).down } =\n    s_ι\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase e_ι\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\ns_pt : C\ns_ι : F ⟶ (const J).obj s_pt\n⊢ NatTrans.app h.hom s_pt { down := (NatTrans.app h.inv s_pt s_ι).down } = s_ι\n[PROOFSTEP]\nconvert congrFun (congrFun (congrArg NatTrans.app h.inv_hom_id) s_pt) s_ι using 1\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nY : C\nf : X ⟶ Y\n⊢ coconeOfHom h f = Cocone.extend (colimitCocone h) f\n[PROOFSTEP]\ndsimp [coconeOfHom, colimitCocone, Cocone.extend]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nY : C\nf : X ⟶ Y\n⊢ { pt := Y, ι := NatTrans.app h.hom Y { down := f } } =\n    { pt := Y, ι := NatTrans.app h.hom X { down := 𝟙 X } ≫ (const J).map f }\n[PROOFSTEP]\ncongr with j\n[GOAL]\ncase e_ι.w.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nY : C\nf : X ⟶ Y\nj : J\n⊢ NatTrans.app (NatTrans.app h.hom Y { down := f }) j =\n    NatTrans.app (NatTrans.app h.hom X { down := 𝟙 X } ≫ (const J).map f) j\n[PROOFSTEP]\nhave t := congrFun (h.hom.naturality f) ⟨𝟙 X⟩\n[GOAL]\ncase e_ι.w.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nY : C\nf : X ⟶ Y\nj : J\nt :\n  ((coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃}).map f ≫ NatTrans.app h.hom Y) { down := 𝟙 X } =\n    (NatTrans.app h.hom X ≫ (Functor.cocones F).map f) { down := 𝟙 X }\n⊢ NatTrans.app (NatTrans.app h.hom Y { down := f }) j =\n    NatTrans.app (NatTrans.app h.hom X { down := 𝟙 X } ≫ (const J).map f) j\n[PROOFSTEP]\ndsimp at t \n[GOAL]\ncase e_ι.w.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nY : C\nf : X ⟶ Y\nj : J\nt : NatTrans.app h.hom Y { down := 𝟙 X ≫ f } = (Functor.cocones F).map f (NatTrans.app h.hom X { down := 𝟙 X })\n⊢ NatTrans.app (NatTrans.app h.hom Y { down := f }) j =\n    NatTrans.app (NatTrans.app h.hom X { down := 𝟙 X } ≫ (const J).map f) j\n[PROOFSTEP]\nsimp only [id_comp] at t \n[GOAL]\ncase e_ι.w.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nY : C\nf : X ⟶ Y\nj : J\nt : NatTrans.app h.hom Y { down := f } = (Functor.cocones F).map f (NatTrans.app h.hom X { down := 𝟙 X })\n⊢ NatTrans.app (NatTrans.app h.hom Y { down := f }) j =\n    NatTrans.app (NatTrans.app h.hom X { down := 𝟙 X } ≫ (const J).map f) j\n[PROOFSTEP]\nrw [congrFun (congrArg NatTrans.app t) j]\n[GOAL]\ncase e_ι.w.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt✝ : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nY : C\nf : X ⟶ Y\nj : J\nt : NatTrans.app h.hom Y { down := f } = (Functor.cocones F).map f (NatTrans.app h.hom X { down := 𝟙 X })\n⊢ NatTrans.app ((Functor.cocones F).map f (NatTrans.app h.hom X { down := 𝟙 X })) j =\n    NatTrans.app (NatTrans.app h.hom X { down := 𝟙 X } ≫ (const J).map f) j\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\n⊢ Cocone.extend (colimitCocone h) (homOfCocone h s) = s\n[PROOFSTEP]\nrw [← coconeOfHom_homOfCocone h s]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\n⊢ Cocone.extend (colimitCocone h) (homOfCocone h (coconeOfHom h (homOfCocone h s))) = coconeOfHom h (homOfCocone h s)\n[PROOFSTEP]\nconv_lhs => simp only [homOfCocone_cooneOfHom]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\n| Cocone.extend (colimitCocone h) (homOfCocone h (coconeOfHom h (homOfCocone h s)))\n[PROOFSTEP]\nsimp only [homOfCocone_cooneOfHom]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\n| Cocone.extend (colimitCocone h) (homOfCocone h (coconeOfHom h (homOfCocone h s)))\n[PROOFSTEP]\nsimp only [homOfCocone_cooneOfHom]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\n| Cocone.extend (colimitCocone h) (homOfCocone h (coconeOfHom h (homOfCocone h s)))\n[PROOFSTEP]\nsimp only [homOfCocone_cooneOfHom]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\n⊢ Cocone.extend (colimitCocone h) (homOfCocone h s) = coconeOfHom h (homOfCocone h s)\n[PROOFSTEP]\napply (coconeOfHom_fac _ _).symm\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\nj : J\n⊢ NatTrans.app (colimitCocone h).ι j ≫ (fun s => homOfCocone h s) s = NatTrans.app s.ι j\n[PROOFSTEP]\nhave h := cocone_fac h s\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh✝ : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\nj : J\nh : Cocone.extend (colimitCocone h✝) (homOfCocone h✝ s) = s\n⊢ NatTrans.app (colimitCocone h✝).ι j ≫ (fun s => homOfCocone h✝ s) s = NatTrans.app s.ι j\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh✝ : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nj : J\npt✝ : C\nι✝ : F ⟶ (const J).obj pt✝\nh : Cocone.extend (colimitCocone h✝) (homOfCocone h✝ { pt := pt✝, ι := ι✝ }) = { pt := pt✝, ι := ι✝ }\n⊢ NatTrans.app (colimitCocone h✝).ι j ≫ (fun s => homOfCocone h✝ s) { pt := pt✝, ι := ι✝ } =\n    NatTrans.app { pt := pt✝, ι := ι✝ }.ι j\n[PROOFSTEP]\ninjection h with h₁ h₂\n[GOAL]\ncase mk\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nj : J\npt✝ : C\nι✝ : F ⟶ (const J).obj pt✝\nh₁ : { pt := pt✝, ι := ι✝ }.pt = pt✝\nh₂ :\n  NatTrans.app (Cocone.extensions (colimitCocone h)) { pt := pt✝, ι := ι✝ }.pt\n      { down := homOfCocone h { pt := pt✝, ι := ι✝ } } =\n    ι✝\n⊢ NatTrans.app (colimitCocone h).ι j ≫ (fun s => homOfCocone h s) { pt := pt✝, ι := ι✝ } =\n    NatTrans.app { pt := pt✝, ι := ι✝ }.ι j\n[PROOFSTEP]\nsimp only [heq_iff_eq] at h₂ \n[GOAL]\ncase mk\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nj : J\npt✝ : C\nι✝ : F ⟶ (const J).obj pt✝\nh₁ : { pt := pt✝, ι := ι✝ }.pt = pt✝\nh₂ : NatTrans.app (Cocone.extensions (colimitCocone h)) pt✝ { down := homOfCocone h { pt := pt✝, ι := ι✝ } } = ι✝\n⊢ NatTrans.app (colimitCocone h).ι j ≫ (fun s => homOfCocone h s) { pt := pt✝, ι := ι✝ } =\n    NatTrans.app { pt := pt✝, ι := ι✝ }.ι j\n[PROOFSTEP]\nconv_rhs => rw [← h₂]; rfl\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nj : J\npt✝ : C\nι✝ : F ⟶ (const J).obj pt✝\nh₁ : { pt := pt✝, ι := ι✝ }.pt = pt✝\nh₂ : NatTrans.app (Cocone.extensions (colimitCocone h)) pt✝ { down := homOfCocone h { pt := pt✝, ι := ι✝ } } = ι✝\n| NatTrans.app { pt := pt✝, ι := ι✝ }.ι j\n[PROOFSTEP]\nrw [← h₂]; rfl\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nj : J\npt✝ : C\nι✝ : F ⟶ (const J).obj pt✝\nh₁ : { pt := pt✝, ι := ι✝ }.pt = pt✝\nh₂ : NatTrans.app (Cocone.extensions (colimitCocone h)) pt✝ { down := homOfCocone h { pt := pt✝, ι := ι✝ } } = ι✝\n| NatTrans.app { pt := pt✝, ι := ι✝ }.ι j\n[PROOFSTEP]\nrw [← h₂]; rfl\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nj : J\npt✝ : C\nι✝ : F ⟶ (const J).obj pt✝\nh₁ : { pt := pt✝, ι := ι✝ }.pt = pt✝\nh₂ : NatTrans.app (Cocone.extensions (colimitCocone h)) pt✝ { down := homOfCocone h { pt := pt✝, ι := ι✝ } } = ι✝\n| NatTrans.app { pt := pt✝, ι := ι✝ }.ι j\n[PROOFSTEP]\nrw [← h₂]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\nj : J\npt✝ : C\nι✝ : F ⟶ (const J).obj pt✝\nh₁ : { pt := pt✝, ι := ι✝ }.pt = pt✝\nh₂ : NatTrans.app (Cocone.extensions (colimitCocone h)) pt✝ { down := homOfCocone h { pt := pt✝, ι := ι✝ } } = ι✝\n| NatTrans.app\n    { pt := pt✝,\n        ι := NatTrans.app (Cocone.extensions (colimitCocone h)) pt✝ { down := homOfCocone h { pt := pt✝, ι := ι✝ } } }.ι\n    j\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\nm : (colimitCocone h).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone h).ι j ≫ m = NatTrans.app s.ι j\n⊢ m = (fun s => homOfCocone h s) s\n[PROOFSTEP]\nrw [← homOfCocone_cooneOfHom h m]\n[GOAL]\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\nm : (colimitCocone h).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone h).ι j ≫ m = NatTrans.app s.ι j\n⊢ homOfCocone h (coconeOfHom h m) = (fun s => homOfCocone h s) s\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_8.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\nm : (colimitCocone h).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone h).ι j ≫ m = NatTrans.app s.ι j\n⊢ coconeOfHom h m = s\n[PROOFSTEP]\nrw [coconeOfHom_fac]\n[GOAL]\ncase h.e_8.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\nm : (colimitCocone h).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone h).ι j ≫ m = NatTrans.app s.ι j\n⊢ Cocone.extend (colimitCocone h) m = s\n[PROOFSTEP]\ndsimp [Cocone.extend]\n[GOAL]\ncase h.e_8.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\ns : Cocone F\nm : (colimitCocone h).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone h).ι j ≫ m = NatTrans.app s.ι j\n⊢ { pt := s.pt, ι := (colimitCocone h).ι ≫ (const J).map m } = s\n[PROOFSTEP]\ncases s\n[GOAL]\ncase h.e_8.h.mk\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\npt✝ : C\nι✝ : F ⟶ (const J).obj pt✝\nm : (colimitCocone h).pt ⟶ { pt := pt✝, ι := ι✝ }.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone h).ι j ≫ m = NatTrans.app { pt := pt✝, ι := ι✝ }.ι j\n⊢ { pt := { pt := pt✝, ι := ι✝ }.pt, ι := (colimitCocone h).ι ≫ (const J).map m } = { pt := pt✝, ι := ι✝ }\n[PROOFSTEP]\ncongr with j\n[GOAL]\ncase h.e_8.h.mk.e_ι.w.h\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nC : Type u₃\ninst✝ : Category.{v₃, u₃} C\nF : J ⥤ C\nt : Cocone F\nX : C\nh : coyoneda.obj (op X) ⋙ uliftFunctor.{u₁, v₃} ≅ Functor.cocones F\npt✝ : C\nι✝ : F ⟶ (const J).obj pt✝\nm : (colimitCocone h).pt ⟶ { pt := pt✝, ι := ι✝ }.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone h).ι j ≫ m = NatTrans.app { pt := pt✝, ι := ι✝ }.ι j\nj : J\n⊢ NatTrans.app ((colimitCocone h).ι ≫ (const J).map m) j = NatTrans.app ι✝ j\n[PROOFSTEP]\nexact w j\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.IsLimit", "llama_tokens": 46258, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6992544335934766, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.37959955759348524}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nα : Type u\ninst✝ : SemilatticeSup α\nX Y : α\nf g : X ⟶ Y\n⊢ f ≫ 𝟙 Y = g ≫ 𝟙 Y\n[PROOFSTEP]\napply ULift.ext\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nα : Type u\ninst✝ : SemilatticeSup α\nX Y : α\nf g : X ⟶ Y\n⊢ (f ≫ 𝟙 Y).down = (g ≫ 𝟙 Y).down\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type u\ninst✝¹ : Preorder α\ninst✝ : IsDirected α fun x x_1 => x ≤ x_1\nX Y : α\nf g : X ⟶ Y\n⊢ f ≫ 𝟙 Y = g ≫ 𝟙 Y\n[PROOFSTEP]\napply ULift.ext\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type u\ninst✝¹ : Preorder α\ninst✝ : IsDirected α fun x x_1 => x ≤ x_1\nX Y : α\nf g : X ⟶ Y\n⊢ (f ≫ 𝟙 Y).down = (g ≫ 𝟙 Y).down\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type u\ninst✝¹ : SemilatticeSup α\ninst✝ : OrderBot α\n⊢ IsFiltered α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type u\ninst✝¹ : SemilatticeSup α\ninst✝ : OrderTop α\n⊢ IsFiltered α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Discrete PUnit\n⊢ X.as = { as := PUnit.unit }.as\n[PROOFSTEP]\ntrivial\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Discrete PUnit\nf g : X ⟶ Y\n⊢ Y.as = { as := PUnit.unit }.as\n[PROOFSTEP]\ntrivial\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Discrete PUnit\nf g : X ⟶ Y\n⊢ f ≫ { down := { down := (_ : Y.as = Y.as) } } = g ≫ { down := { down := (_ : Y.as = Y.as) } }\n[PROOFSTEP]\napply ULift.ext\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Discrete PUnit\nf g : X ⟶ Y\n⊢ (f ≫ { down := { down := (_ : Y.as = Y.as) } }).down = (g ≫ { down := { down := (_ : Y.as = Y.as) } }).down\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : IsFilteredOrEmpty C\nD : Type u₁\ninst✝ : Category.{v₁, u₁} D\nL : D ⥤ C\nR : C ⥤ D\nh : L ⊣ R\nX Y : D\nf g : X ⟶ Y\n⊢ f ≫\n      ↑(Adjunction.homEquiv h Y (coeq (?m.10843 h X Y f g) (?m.10844 h X Y f g)))\n        (coeqHom (?m.10843 h X Y f g) (?m.10844 h X Y f g)) =\n    g ≫\n      ↑(Adjunction.homEquiv h Y (coeq (?m.10843 h X Y f g) (?m.10844 h X Y f g)))\n        (coeqHom (?m.10843 h X Y f g) (?m.10844 h X Y f g))\n[PROOFSTEP]\nrw [← h.homEquiv_naturality_left, ← h.homEquiv_naturality_left, coeq_condition]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\n⊢ ∃ S, ∀ {X : C}, X ∈ O → _root_.Nonempty (X ⟶ S)\n[PROOFSTEP]\nclassical\ninduction' O using Finset.induction with X O' nm h\n· exact ⟨Classical.choice IsFiltered.Nonempty, by intro; simp⟩\n· obtain ⟨S', w'⟩ := h\n  use max X S'\n  rintro Y mY\n  obtain rfl | h := eq_or_ne Y X\n  · exact ⟨leftToMax _ _⟩\n  · exact ⟨(w' (Finset.mem_of_mem_insert_of_ne mY h)).some ≫ rightToMax _ _⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\n⊢ ∃ S, ∀ {X : C}, X ∈ O → _root_.Nonempty (X ⟶ S)\n[PROOFSTEP]\ninduction' O using Finset.induction with X O' nm h\n[GOAL]\ncase empty\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\n⊢ ∃ S, ∀ {X : C}, X ∈ ∅ → _root_.Nonempty (X ⟶ S)\n[PROOFSTEP]\nexact ⟨Classical.choice IsFiltered.Nonempty, by intro; simp⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\n⊢ ∀ {X : C}, X ∈ ∅ → _root_.Nonempty (X ⟶ Classical.choice (_ : _root_.Nonempty C))\n[PROOFSTEP]\nintro\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nX✝ : C\n⊢ X✝ ∈ ∅ → _root_.Nonempty (X✝ ⟶ Classical.choice (_ : _root_.Nonempty C))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nX : C\nO' : Finset C\nnm : ¬X ∈ O'\nh : ∃ S, ∀ {X : C}, X ∈ O' → _root_.Nonempty (X ⟶ S)\n⊢ ∃ S, ∀ {X_1 : C}, X_1 ∈ insert X O' → _root_.Nonempty (X_1 ⟶ S)\n[PROOFSTEP]\nobtain ⟨S', w'⟩ := h\n[GOAL]\ncase insert.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nX : C\nO' : Finset C\nnm : ¬X ∈ O'\nS' : C\nw' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (X ⟶ S')\n⊢ ∃ S, ∀ {X_1 : C}, X_1 ∈ insert X O' → _root_.Nonempty (X_1 ⟶ S)\n[PROOFSTEP]\nuse max X S'\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nX : C\nO' : Finset C\nnm : ¬X ∈ O'\nS' : C\nw' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (X ⟶ S')\n⊢ ∀ {X_1 : C}, X_1 ∈ insert X O' → _root_.Nonempty (X_1 ⟶ max X S')\n[PROOFSTEP]\nrintro Y mY\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nX : C\nO' : Finset C\nnm : ¬X ∈ O'\nS' : C\nw' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (X ⟶ S')\nY : C\nmY : Y ∈ insert X O'\n⊢ _root_.Nonempty (Y ⟶ max X S')\n[PROOFSTEP]\nobtain rfl | h := eq_or_ne Y X\n[GOAL]\ncase h.inl\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO' : Finset C\nS' : C\nw' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (X ⟶ S')\nY : C\nnm : ¬Y ∈ O'\nmY : Y ∈ insert Y O'\n⊢ _root_.Nonempty (Y ⟶ max Y S')\n[PROOFSTEP]\nexact ⟨leftToMax _ _⟩\n[GOAL]\ncase h.inr\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nX : C\nO' : Finset C\nnm : ¬X ∈ O'\nS' : C\nw' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (X ⟶ S')\nY : C\nmY : Y ∈ insert X O'\nh : Y ≠ X\n⊢ _root_.Nonempty (Y ⟶ max X S')\n[PROOFSTEP]\nexact ⟨(w' (Finset.mem_of_mem_insert_of_ne mY h)).some ≫ rightToMax _ _⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\n⊢ ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H → f ≫ T mY = T mX\n[PROOFSTEP]\nclassical\ninduction' H using Finset.induction with h' H' nmf h''\n· obtain ⟨S, f⟩ := sup_objs_exists O\n  refine' ⟨S, fun mX => (f mX).some, by rintro - - - - - ⟨⟩⟩\n· obtain ⟨X, Y, mX, mY, f⟩ := h'\n  obtain ⟨S', T', w'⟩ := h''\n  refine' ⟨coeq (f ≫ T' mY) (T' mX), fun mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX), _⟩\n  intro X' Y' mX' mY' f' mf'\n  rw [← Category.assoc]\n  by_cases h : X = X' ∧ Y = Y'\n  · rcases h with ⟨rfl, rfl⟩\n    by_cases hf : f = f'\n    · subst hf\n      apply coeq_condition\n    · rw [@w' _ _ mX mY f']\n      simp only [Finset.mem_insert, PSigma.mk.injEq, heq_eq_eq, true_and] at mf' \n      rcases mf' with mf' | mf'\n      · exfalso\n        exact hf mf'.symm\n      · exact mf'\n  · rw [@w' _ _ mX' mY' f' _]\n    apply Finset.mem_of_mem_insert_of_ne mf'\n    contrapose! h\n    obtain ⟨rfl, h⟩ := h\n    trivial\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\n⊢ ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H → f ≫ T mY = T mX\n[PROOFSTEP]\ninduction' H using Finset.induction with h' H' nmf h''\n[GOAL]\ncase empty\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\n⊢ ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ ∅ → f ≫ T mY = T mX\n[PROOFSTEP]\nobtain ⟨S, f⟩ := sup_objs_exists O\n[GOAL]\ncase empty.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nS : C\nf : ∀ {X : C}, X ∈ O → _root_.Nonempty (X ⟶ S)\n⊢ ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ ∅ → f ≫ T mY = T mX\n[PROOFSTEP]\nrefine' ⟨S, fun mX => (f mX).some, by rintro - - - - - ⟨⟩⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nS : C\nf : ∀ {X : C}, X ∈ O → _root_.Nonempty (X ⟶ S)\n⊢ ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ ∅ →\n      f_1 ≫ (fun {X} mX => Nonempty.some (_ : _root_.Nonempty (X ⟶ S))) mY =\n        (fun {X} mX => Nonempty.some (_ : _root_.Nonempty (X ⟶ S))) mX\n[PROOFSTEP]\nrintro - - - - - ⟨⟩\n[GOAL]\ncase insert\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nh' : (X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)\nH' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nnmf : ¬h' ∈ H'\nh'' :\n  ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T mY = T mX\n⊢ ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ insert h' H' →\n        f ≫ T mY = T mX\n[PROOFSTEP]\nobtain ⟨X, Y, mX, mY, f⟩ := h'\n[GOAL]\ncase insert.mk.mk.mk.mk\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nh'' :\n  ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T mY = T mX\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\n⊢ ∃ S T,\n    ∀ {X_1 Y_1 : C} (mX_1 : X_1 ∈ O) (mY_1 : Y_1 ∈ O) {f_1 : X_1 ⟶ Y_1},\n      { fst := X_1, snd := { fst := Y_1, snd := { fst := mX_1, snd := { fst := mY_1, snd := f_1 } } } } ∈\n          insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H' →\n        f_1 ≫ T mY_1 = T mX_1\n[PROOFSTEP]\nobtain ⟨S', T', w'⟩ := h''\n[GOAL]\ncase insert.mk.mk.mk.mk.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\n⊢ ∃ S T,\n    ∀ {X_1 Y_1 : C} (mX_1 : X_1 ∈ O) (mY_1 : Y_1 ∈ O) {f_1 : X_1 ⟶ Y_1},\n      { fst := X_1, snd := { fst := Y_1, snd := { fst := mX_1, snd := { fst := mY_1, snd := f_1 } } } } ∈\n          insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H' →\n        f_1 ≫ T mY_1 = T mX_1\n[PROOFSTEP]\nrefine' ⟨coeq (f ≫ T' mY) (T' mX), fun mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX), _⟩\n[GOAL]\ncase insert.mk.mk.mk.mk.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\n⊢ ∀ {X_1 Y_1 : C} (mX_1 : X_1 ∈ O) (mY_1 : Y_1 ∈ O) {f_1 : X_1 ⟶ Y_1},\n    { fst := X_1, snd := { fst := Y_1, snd := { fst := mX_1, snd := { fst := mY_1, snd := f_1 } } } } ∈\n        insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H' →\n      f_1 ≫ (fun {X_2} mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX)) mY_1 =\n        (fun {X_2} mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX)) mX_1\n[PROOFSTEP]\nintro X' Y' mX' mY' f' mf'\n[GOAL]\ncase insert.mk.mk.mk.mk.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\n⊢ f' ≫ (fun {X_1} mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX)) mY' =\n    (fun {X_1} mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX)) mX'\n[PROOFSTEP]\nrw [← Category.assoc]\n[GOAL]\ncase insert.mk.mk.mk.mk.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\n⊢ (f' ≫ T' mY') ≫ coeqHom (f ≫ T' mY) (T' mX) = (fun {X_1} mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX)) mX'\n[PROOFSTEP]\nby_cases h : X = X' ∧ Y = Y'\n[GOAL]\ncase pos\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nh : X = X' ∧ Y = Y'\n⊢ (f' ≫ T' mY') ≫ coeqHom (f ≫ T' mY) (T' mX) = (fun {X_1} mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX)) mX'\n[PROOFSTEP]\nrcases h with ⟨rfl, rfl⟩\n[GOAL]\ncase pos.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nmf' :\n  { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\n⊢ (f' ≫ T' mY') ≫ coeqHom (f ≫ T' mY) (T' mX) = (fun {X_1} mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX)) mX'\n[PROOFSTEP]\nby_cases hf : f = f'\n[GOAL]\ncase pos\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nmf' :\n  { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nhf : f = f'\n⊢ (f' ≫ T' mY') ≫ coeqHom (f ≫ T' mY) (T' mX) = (fun {X_1} mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX)) mX'\n[PROOFSTEP]\nsubst hf\n[GOAL]\ncase pos\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nmX' : X ∈ O\nmY' : Y ∈ O\nmf' :\n  { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\n⊢ (f ≫ T' mY') ≫ coeqHom (f ≫ T' mY) (T' mX) = (fun {X_1} mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX)) mX'\n[PROOFSTEP]\napply coeq_condition\n[GOAL]\ncase neg\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nmf' :\n  { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nhf : ¬f = f'\n⊢ (f' ≫ T' mY') ≫ coeqHom (f ≫ T' mY) (T' mX) = (fun {X_1} mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX)) mX'\n[PROOFSTEP]\nrw [@w' _ _ mX mY f']\n[GOAL]\ncase neg\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nmf' :\n  { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nhf : ¬f = f'\n⊢ { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f' } } } } ∈ H'\n[PROOFSTEP]\nsimp only [Finset.mem_insert, PSigma.mk.injEq, heq_eq_eq, true_and] at mf' \n[GOAL]\ncase neg\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nhf : ¬f = f'\nmf' : f' = f ∨ { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈ H'\n⊢ { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f' } } } } ∈ H'\n[PROOFSTEP]\nrcases mf' with mf' | mf'\n[GOAL]\ncase neg.inl\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nhf : ¬f = f'\nmf' : f' = f\n⊢ { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f' } } } } ∈ H'\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase neg.inl.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nhf : ¬f = f'\nmf' : f' = f\n⊢ False\n[PROOFSTEP]\nexact hf mf'.symm\n[GOAL]\ncase neg.inr\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nhf : ¬f = f'\nmf' : { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈ H'\n⊢ { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f' } } } } ∈ H'\n[PROOFSTEP]\nexact mf'\n[GOAL]\ncase neg\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nh : ¬(X = X' ∧ Y = Y')\n⊢ (f' ≫ T' mY') ≫ coeqHom (f ≫ T' mY) (T' mX) = (fun {X_1} mZ => T' mZ ≫ coeqHom (f ≫ T' mY) (T' mX)) mX'\n[PROOFSTEP]\nrw [@w' _ _ mX' mY' f' _]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nh : ¬(X = X' ∧ Y = Y')\n⊢ { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈ H'\n[PROOFSTEP]\napply Finset.mem_of_mem_insert_of_ne mf'\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nh : ¬(X = X' ∧ Y = Y')\n⊢ { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ≠\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } }\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nh :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } =\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } }\n⊢ X = X' ∧ Y = Y'\n[PROOFSTEP]\nobtain ⟨rfl, h⟩ := h\n[GOAL]\ncase refl\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (X ⟶ S')\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → f ≫ T' mY = T' mX\nmf' :\n  { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\n⊢ X = X ∧ Y = Y\n[PROOFSTEP]\ntrivial\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\n⊢ _root_.Nonempty (Cocone F)\n[PROOFSTEP]\nclassical\nlet O := Finset.univ.image F.obj\nlet H : Finset (Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) :=\n  Finset.univ.biUnion fun X : J =>\n    Finset.univ.biUnion fun Y : J => Finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩\nobtain ⟨Z, f, w⟩ := sup_exists O H\nrefine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩\nintro j j' g\ndsimp\nsimp only [Category.comp_id]\napply w\nsimp only [Finset.mem_biUnion, Finset.mem_univ, Finset.mem_image, PSigma.mk.injEq, true_and, exists_and_left]\nexact ⟨j, rfl, j', g, by simp⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\n⊢ _root_.Nonempty (Cocone F)\n[PROOFSTEP]\nlet O := Finset.univ.image F.obj\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\n⊢ _root_.Nonempty (Cocone F)\n[PROOFSTEP]\nlet H : Finset (Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) :=\n  Finset.univ.biUnion fun X : J =>\n    Finset.univ.biUnion fun Y : J => Finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nX Y : J\nf : X ⟶ Y\n⊢ F.obj X ∈ O\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nX Y : J\nf : X ⟶ Y\n⊢ F.obj Y ∈ O\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\n⊢ _root_.Nonempty (Cocone F)\n[PROOFSTEP]\nobtain ⟨Z, f, w⟩ := sup_exists O H\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (X ⟶ Z)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f_1 ≫ f mY = f mX\n⊢ _root_.Nonempty (Cocone F)\n[PROOFSTEP]\nrefine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (X ⟶ Z)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f_1 ≫ f mY = f mX\nX : J\n⊢ F.obj X ∈ O\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (X ⟶ Z)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f_1 ≫ f mY = f mX\n⊢ ∀ ⦃X Y : J⦄ (f_1 : X ⟶ Y),\n    F.map f_1 ≫ (fun X => f (_ : F.obj X ∈ Finset.image F.obj Finset.univ)) Y =\n      (fun X => f (_ : F.obj X ∈ Finset.image F.obj Finset.univ)) X ≫ ((Functor.const J).obj Z).map f_1\n[PROOFSTEP]\nintro j j' g\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (X ⟶ Z)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f_1 ≫ f mY = f mX\nj j' : J\ng : j ⟶ j'\n⊢ F.map g ≫ (fun X => f (_ : F.obj X ∈ Finset.image F.obj Finset.univ)) j' =\n    (fun X => f (_ : F.obj X ∈ Finset.image F.obj Finset.univ)) j ≫ ((Functor.const J).obj Z).map g\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (X ⟶ Z)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f_1 ≫ f mY = f mX\nj j' : J\ng : j ⟶ j'\n⊢ F.map g ≫ f (_ : F.obj j' ∈ Finset.image F.obj Finset.univ) = f (_ : F.obj j ∈ Finset.image F.obj Finset.univ) ≫ 𝟙 Z\n[PROOFSTEP]\nsimp only [Category.comp_id]\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (X ⟶ Z)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f_1 ≫ f mY = f mX\nj j' : J\ng : j ⟶ j'\n⊢ F.map g ≫ f (_ : F.obj j' ∈ Finset.image F.obj Finset.univ) = f (_ : F.obj j ∈ Finset.image F.obj Finset.univ)\n[PROOFSTEP]\napply w\n[GOAL]\ncase intro.intro.a\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (X ⟶ Z)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f_1 ≫ f mY = f mX\nj j' : J\ng : j ⟶ j'\n⊢ { fst := F.obj j,\n      snd :=\n        { fst := F.obj j',\n          snd :=\n            { fst := (_ : F.obj j ∈ Finset.image F.obj Finset.univ),\n              snd := { fst := (_ : F.obj j' ∈ Finset.image F.obj Finset.univ), snd := F.map g } } } } ∈\n    H\n[PROOFSTEP]\nsimp only [Finset.mem_biUnion, Finset.mem_univ, Finset.mem_image, PSigma.mk.injEq, true_and, exists_and_left]\n[GOAL]\ncase intro.intro.a\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (X ⟶ Z)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f_1 ≫ f mY = f mX\nj j' : J\ng : j ⟶ j'\n⊢ ∃ a,\n    F.obj a = F.obj j ∧\n      ∃ x x_1,\n        HEq\n          { fst := F.obj x,\n            snd :=\n              { fst := (_ : F.obj a ∈ Finset.image F.obj Finset.univ),\n                snd := { fst := (_ : F.obj x ∈ Finset.image F.obj Finset.univ), snd := F.map x_1 } } }\n          { fst := F.obj j',\n            snd :=\n              { fst := (_ : F.obj j ∈ Finset.image F.obj Finset.univ),\n                snd := { fst := (_ : F.obj j' ∈ Finset.image F.obj Finset.univ), snd := F.map g } } }\n[PROOFSTEP]\nexact ⟨j, rfl, j', g, by simp⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsFiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (X ⟶ Z)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f_1 ≫ f mY = f mX\nj j' : J\ng : j ⟶ j'\n⊢ HEq\n    { fst := F.obj j',\n      snd :=\n        { fst := (_ : F.obj j ∈ Finset.image F.obj Finset.univ),\n          snd := { fst := (_ : F.obj j' ∈ Finset.image F.obj Finset.univ), snd := F.map g } } }\n    { fst := F.obj j',\n      snd :=\n        { fst := (_ : F.obj j ∈ Finset.image F.obj Finset.univ),\n          snd := { fst := (_ : F.obj j' ∈ Finset.image F.obj Finset.univ), snd := F.map g } } }\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n⊢ f ≫ coeq₃Hom f g h = g ≫ coeq₃Hom f g h\n[PROOFSTEP]\nsimp only [coeq₃Hom, ← Category.assoc, coeq_condition f g]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n⊢ g ≫ coeq₃Hom f g h = h ≫ coeq₃Hom f g h\n[PROOFSTEP]\ndsimp [coeq₃Hom]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n⊢ g ≫\n      coeqHom f g ≫\n        leftToMax (coeq f g) (coeq g h) ≫\n          coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h)) =\n    h ≫\n      coeqHom f g ≫\n        leftToMax (coeq f g) (coeq g h) ≫\n          coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\n[PROOFSTEP]\nslice_lhs 2 4 => rw [← Category.assoc, coeq_condition _ _]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n| coeqHom f g ≫\n    leftToMax (coeq f g) (coeq g h) ≫\n      coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\ncase a C : Type u inst✝¹ : Category.{v, u} C inst✝ : IsFilteredOrEmpty C j₁ j₂ : C f g h : j₁ ⟶ j₂ | g\n[PROOFSTEP]\nrw [← Category.assoc, coeq_condition _ _]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n| coeqHom f g ≫\n    leftToMax (coeq f g) (coeq g h) ≫\n      coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\ncase a C : Type u inst✝¹ : Category.{v, u} C inst✝ : IsFilteredOrEmpty C j₁ j₂ : C f g h : j₁ ⟶ j₂ | g\n[PROOFSTEP]\nrw [← Category.assoc, coeq_condition _ _]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n| coeqHom f g ≫\n    leftToMax (coeq f g) (coeq g h) ≫\n      coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\ncase a C : Type u inst✝¹ : Category.{v, u} C inst✝ : IsFilteredOrEmpty C j₁ j₂ : C f g h : j₁ ⟶ j₂ | g\n[PROOFSTEP]\nrw [← Category.assoc, coeq_condition _ _]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n⊢ g ≫\n      (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h)) ≫\n        coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h)) =\n    h ≫\n      coeqHom f g ≫\n        leftToMax (coeq f g) (coeq g h) ≫\n          coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\n[PROOFSTEP]\nslice_rhs 2 4 => rw [← Category.assoc, coeq_condition _ _]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n| coeqHom f g ≫\n    leftToMax (coeq f g) (coeq g h) ≫\n      coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\ncase a C : Type u inst✝¹ : Category.{v, u} C inst✝ : IsFilteredOrEmpty C j₁ j₂ : C f g h : j₁ ⟶ j₂ | h\n[PROOFSTEP]\nrw [← Category.assoc, coeq_condition _ _]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n| coeqHom f g ≫\n    leftToMax (coeq f g) (coeq g h) ≫\n      coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\ncase a C : Type u inst✝¹ : Category.{v, u} C inst✝ : IsFilteredOrEmpty C j₁ j₂ : C f g h : j₁ ⟶ j₂ | h\n[PROOFSTEP]\nrw [← Category.assoc, coeq_condition _ _]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n| coeqHom f g ≫\n    leftToMax (coeq f g) (coeq g h) ≫\n      coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\ncase a C : Type u inst✝¹ : Category.{v, u} C inst✝ : IsFilteredOrEmpty C j₁ j₂ : C f g h : j₁ ⟶ j₂ | h\n[PROOFSTEP]\nrw [← Category.assoc, coeq_condition _ _]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n⊢ g ≫\n      (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h)) ≫\n        coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h)) =\n    h ≫\n      (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h)) ≫\n        coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\n[PROOFSTEP]\nslice_lhs 1 3 => rw [← Category.assoc, coeq_condition _ _]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n| g ≫ coeqHom g h ≫ rightToMax (coeq f g) (coeq g h)\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n| coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\n[PROOFSTEP]\nrw [← Category.assoc, coeq_condition _ _]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n| g ≫ coeqHom g h ≫ rightToMax (coeq f g) (coeq g h)\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n| coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\n[PROOFSTEP]\nrw [← Category.assoc, coeq_condition _ _]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n| g ≫ coeqHom g h ≫ rightToMax (coeq f g) (coeq g h)\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n| coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\n[PROOFSTEP]\nrw [← Category.assoc, coeq_condition _ _]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ : C\nf g h : j₁ ⟶ j₂\n⊢ ((h ≫ coeqHom g h) ≫ rightToMax (coeq f g) (coeq g h)) ≫\n      coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h)) =\n    h ≫\n      (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h)) ≫\n        coeqHom (coeqHom f g ≫ leftToMax (coeq f g) (coeq g h)) (coeqHom g h ≫ rightToMax (coeq f g) (coeq g h))\n[PROOFSTEP]\nsimp only [Category.assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\ni j j' : C\nf : i ⟶ j\nf' : i ⟶ j'\nK : C\nG : j ⟶ K\nG' : j' ⟶ K\nh✝ : True\nk : C\ne : K ⟶ k\nhe : (f ≫ G) ≫ e = (f' ≫ G') ≫ e\n⊢ f ≫ G ≫ e = f' ≫ G' ≫ e\n[PROOFSTEP]\nsimpa only [← Category.assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ k₁ k₂ : C\nf₁ : j₁ ⟶ k₁\ng₁ : j₁ ⟶ k₂\nf₂ : j₂ ⟶ k₁\ng₂ : j₂ ⟶ k₂\n⊢ ∃ s α β, f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = g₂ ≫ β\n[PROOFSTEP]\nobtain ⟨t, k₁t, k₂t, ht⟩ := span f₁ g₁\n[GOAL]\ncase intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ k₁ k₂ : C\nf₁ : j₁ ⟶ k₁\ng₁ : j₁ ⟶ k₂\nf₂ : j₂ ⟶ k₁\ng₂ : j₂ ⟶ k₂\nt : C\nk₁t : k₁ ⟶ t\nk₂t : k₂ ⟶ t\nht : f₁ ≫ k₁t = g₁ ≫ k₂t\n⊢ ∃ s α β, f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = g₂ ≫ β\n[PROOFSTEP]\nobtain ⟨s, ts, hs⟩ := IsFilteredOrEmpty.cocone_maps (f₂ ≫ k₁t) (g₂ ≫ k₂t)\n[GOAL]\ncase intro.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ k₁ k₂ : C\nf₁ : j₁ ⟶ k₁\ng₁ : j₁ ⟶ k₂\nf₂ : j₂ ⟶ k₁\ng₂ : j₂ ⟶ k₂\nt : C\nk₁t : k₁ ⟶ t\nk₂t : k₂ ⟶ t\nht : f₁ ≫ k₁t = g₁ ≫ k₂t\ns : C\nts : t ⟶ s\nhs : (f₂ ≫ k₁t) ≫ ts = (g₂ ≫ k₂t) ≫ ts\n⊢ ∃ s α β, f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = g₂ ≫ β\n[PROOFSTEP]\nsimp_rw [Category.assoc] at hs \n[GOAL]\ncase intro.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ k₁ k₂ : C\nf₁ : j₁ ⟶ k₁\ng₁ : j₁ ⟶ k₂\nf₂ : j₂ ⟶ k₁\ng₂ : j₂ ⟶ k₂\nt : C\nk₁t : k₁ ⟶ t\nk₂t : k₂ ⟶ t\nht : f₁ ≫ k₁t = g₁ ≫ k₂t\ns : C\nts : t ⟶ s\nhs : f₂ ≫ k₁t ≫ ts = g₂ ≫ k₂t ≫ ts\n⊢ ∃ s α β, f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = g₂ ≫ β\n[PROOFSTEP]\nexact ⟨s, k₁t ≫ ts, k₂t ≫ ts, by simp only [← Category.assoc, ht], hs⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ k₁ k₂ : C\nf₁ : j₁ ⟶ k₁\ng₁ : j₁ ⟶ k₂\nf₂ : j₂ ⟶ k₁\ng₂ : j₂ ⟶ k₂\nt : C\nk₁t : k₁ ⟶ t\nk₂t : k₂ ⟶ t\nht : f₁ ≫ k₁t = g₁ ≫ k₂t\ns : C\nts : t ⟶ s\nhs : f₂ ≫ k₁t ≫ ts = g₂ ≫ k₂t ≫ ts\n⊢ f₁ ≫ k₁t ≫ ts = g₁ ≫ k₂t ≫ ts\n[PROOFSTEP]\nsimp only [← Category.assoc, ht]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ j₃ k₁ k₂ l : C\nf₁ : j₁ ⟶ k₁\nf₂ : j₂ ⟶ k₁\nf₃ : j₂ ⟶ k₂\nf₄ : j₃ ⟶ k₂\ng₁ : j₁ ⟶ l\ng₂ : j₃ ⟶ l\n⊢ ∃ s α β γ, f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = f₃ ≫ γ ∧ f₄ ≫ γ = g₂ ≫ β\n[PROOFSTEP]\nobtain ⟨l', k₁l, k₂l, hl⟩ := span f₂ f₃\n[GOAL]\ncase intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ j₃ k₁ k₂ l : C\nf₁ : j₁ ⟶ k₁\nf₂ : j₂ ⟶ k₁\nf₃ : j₂ ⟶ k₂\nf₄ : j₃ ⟶ k₂\ng₁ : j₁ ⟶ l\ng₂ : j₃ ⟶ l\nl' : C\nk₁l : k₁ ⟶ l'\nk₂l : k₂ ⟶ l'\nhl : f₂ ≫ k₁l = f₃ ≫ k₂l\n⊢ ∃ s α β γ, f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = f₃ ≫ γ ∧ f₄ ≫ γ = g₂ ≫ β\n[PROOFSTEP]\nobtain ⟨s, ls, l's, hs₁, hs₂⟩ := bowtie g₁ (f₁ ≫ k₁l) g₂ (f₄ ≫ k₂l)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ j₃ k₁ k₂ l : C\nf₁ : j₁ ⟶ k₁\nf₂ : j₂ ⟶ k₁\nf₃ : j₂ ⟶ k₂\nf₄ : j₃ ⟶ k₂\ng₁ : j₁ ⟶ l\ng₂ : j₃ ⟶ l\nl' : C\nk₁l : k₁ ⟶ l'\nk₂l : k₂ ⟶ l'\nhl : f₂ ≫ k₁l = f₃ ≫ k₂l\ns : C\nls : l ⟶ s\nl's : l' ⟶ s\nhs₁ : g₁ ≫ ls = (f₁ ≫ k₁l) ≫ l's\nhs₂ : g₂ ≫ ls = (f₄ ≫ k₂l) ≫ l's\n⊢ ∃ s α β γ, f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = f₃ ≫ γ ∧ f₄ ≫ γ = g₂ ≫ β\n[PROOFSTEP]\nrefine' ⟨s, k₁l ≫ l's, ls, k₂l ≫ l's, _, by simp only [← Category.assoc, hl], _⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ j₃ k₁ k₂ l : C\nf₁ : j₁ ⟶ k₁\nf₂ : j₂ ⟶ k₁\nf₃ : j₂ ⟶ k₂\nf₄ : j₃ ⟶ k₂\ng₁ : j₁ ⟶ l\ng₂ : j₃ ⟶ l\nl' : C\nk₁l : k₁ ⟶ l'\nk₂l : k₂ ⟶ l'\nhl : f₂ ≫ k₁l = f₃ ≫ k₂l\ns : C\nls : l ⟶ s\nl's : l' ⟶ s\nhs₁ : g₁ ≫ ls = (f₁ ≫ k₁l) ≫ l's\nhs₂ : g₂ ≫ ls = (f₄ ≫ k₂l) ≫ l's\n⊢ f₂ ≫ k₁l ≫ l's = f₃ ≫ k₂l ≫ l's\n[PROOFSTEP]\nsimp only [← Category.assoc, hl]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ j₃ k₁ k₂ l : C\nf₁ : j₁ ⟶ k₁\nf₂ : j₂ ⟶ k₁\nf₃ : j₂ ⟶ k₂\nf₄ : j₃ ⟶ k₂\ng₁ : j₁ ⟶ l\ng₂ : j₃ ⟶ l\nl' : C\nk₁l : k₁ ⟶ l'\nk₂l : k₂ ⟶ l'\nhl : f₂ ≫ k₁l = f₃ ≫ k₂l\ns : C\nls : l ⟶ s\nl's : l' ⟶ s\nhs₁ : g₁ ≫ ls = (f₁ ≫ k₁l) ≫ l's\nhs₂ : g₂ ≫ ls = (f₄ ≫ k₂l) ≫ l's\n⊢ f₁ ≫ k₁l ≫ l's = g₁ ≫ ls\n[PROOFSTEP]\nsimp only [hs₁, hs₂, Category.assoc]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nj₁ j₂ j₃ k₁ k₂ l : C\nf₁ : j₁ ⟶ k₁\nf₂ : j₂ ⟶ k₁\nf₃ : j₂ ⟶ k₂\nf₄ : j₃ ⟶ k₂\ng₁ : j₁ ⟶ l\ng₂ : j₃ ⟶ l\nl' : C\nk₁l : k₁ ⟶ l'\nk₂l : k₂ ⟶ l'\nhl : f₂ ≫ k₁l = f₃ ≫ k₂l\ns : C\nls : l ⟶ s\nl's : l' ⟶ s\nhs₁ : g₁ ≫ ls = (f₁ ≫ k₁l) ≫ l's\nhs₂ : g₂ ≫ ls = (f₄ ≫ k₂l) ≫ l's\n⊢ f₄ ≫ k₂l ≫ l's = g₂ ≫ ls\n[PROOFSTEP]\nsimp only [hs₁, hs₂, Category.assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nα : Type u\ninst✝ : SemilatticeInf α\nX Y : α\nf g : X ⟶ Y\n⊢ 𝟙 X ≫ f = 𝟙 X ≫ g\n[PROOFSTEP]\napply ULift.ext\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nα : Type u\ninst✝ : SemilatticeInf α\nX Y : α\nf g : X ⟶ Y\n⊢ (𝟙 X ≫ f).down = (𝟙 X ≫ g).down\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type u\ninst✝¹ : Preorder α\ninst✝ : IsDirected α fun x x_1 => x ≥ x_1\nX Y : α\nf g : X ⟶ Y\n⊢ 𝟙 X ≫ f = 𝟙 X ≫ g\n[PROOFSTEP]\napply ULift.ext\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type u\ninst✝¹ : Preorder α\ninst✝ : IsDirected α fun x x_1 => x ≥ x_1\nX Y : α\nf g : X ⟶ Y\n⊢ (𝟙 X ≫ f).down = (𝟙 X ≫ g).down\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type u\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\n⊢ IsCofiltered α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type u\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderTop α\n⊢ IsCofiltered α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Discrete PUnit\n⊢ { as := PUnit.unit }.as = X.as\n[PROOFSTEP]\ntrivial\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Discrete PUnit\nf g : X ⟶ Y\n⊢ { as := PUnit.unit }.as = X.as\n[PROOFSTEP]\ntrivial\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Discrete PUnit\nf g : X ⟶ Y\n⊢ { down := { down := (_ : { as := PUnit.unit }.as = { as := PUnit.unit }.as) } } ≫ f =\n    { down := { down := (_ : { as := PUnit.unit }.as = { as := PUnit.unit }.as) } } ≫ g\n[PROOFSTEP]\napply ULift.ext\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Discrete PUnit\nf g : X ⟶ Y\n⊢ ({ down := { down := (_ : { as := PUnit.unit }.as = { as := PUnit.unit }.as) } } ≫ f).down =\n    ({ down := { down := (_ : { as := PUnit.unit }.as = { as := PUnit.unit }.as) } } ≫ g).down\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofilteredOrEmpty C\ni j j' : C\nf : j ⟶ i\nf' : j' ⟶ i\nK : C\nG : K ⟶ j\nG' : K ⟶ j'\nh✝ : True\nk : C\ne : k ⟶ K\nhe : e ≫ G ≫ f = e ≫ G' ≫ f'\n⊢ (e ≫ G) ≫ f = (e ≫ G') ≫ f'\n[PROOFSTEP]\nsimpa only [Category.assoc] using he\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofilteredOrEmpty C\nF : C ⥤ Type u_1\nj : C\nx✝¹ x✝ : (i : C) ×' (i ⟶ j)\ni : C\nij : i ⟶ j\nk : C\nkj : k ⟶ j\n⊢ ∃ z,\n    (fun x x_1 => x ⊇ x_1) ((fun f => Set.range (F.map f.snd)) { fst := i, snd := ij })\n        ((fun f => Set.range (F.map f.snd)) z) ∧\n      (fun x x_1 => x ⊇ x_1) ((fun f => Set.range (F.map f.snd)) { fst := k, snd := kj })\n        ((fun f => Set.range (F.map f.snd)) z)\n[PROOFSTEP]\nlet ⟨l, li, lk, e⟩ := cospan ij kj\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofilteredOrEmpty C\nF : C ⥤ Type u_1\nj : C\nx✝¹ x✝ : (i : C) ×' (i ⟶ j)\ni : C\nij : i ⟶ j\nk : C\nkj : k ⟶ j\nl : C\nli : l ⟶ i\nlk : l ⟶ k\ne : li ≫ ij = lk ≫ kj\n⊢ ∃ z,\n    (fun x x_1 => x ⊇ x_1) ((fun f => Set.range (F.map f.snd)) { fst := i, snd := ij })\n        ((fun f => Set.range (F.map f.snd)) z) ∧\n      (fun x x_1 => x ⊇ x_1) ((fun f => Set.range (F.map f.snd)) { fst := k, snd := kj })\n        ((fun f => Set.range (F.map f.snd)) z)\n[PROOFSTEP]\nrefine' ⟨⟨l, lk ≫ kj⟩, e ▸ _, _⟩\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofilteredOrEmpty C\nF : C ⥤ Type u_1\nj : C\nx✝¹ x✝ : (i : C) ×' (i ⟶ j)\ni : C\nij : i ⟶ j\nk : C\nkj : k ⟶ j\nl : C\nli : l ⟶ i\nlk : l ⟶ k\ne : li ≫ ij = lk ≫ kj\n⊢ (fun x x_1 => x ⊇ x_1) ((fun f => Set.range (F.map f.snd)) { fst := i, snd := ij })\n    ((fun f => Set.range (F.map f.snd)) { fst := l, snd := li ≫ ij })\n[PROOFSTEP]\nsimp_rw [F.map_comp]\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofilteredOrEmpty C\nF : C ⥤ Type u_1\nj : C\nx✝¹ x✝ : (i : C) ×' (i ⟶ j)\ni : C\nij : i ⟶ j\nk : C\nkj : k ⟶ j\nl : C\nli : l ⟶ i\nlk : l ⟶ k\ne : li ≫ ij = lk ≫ kj\n⊢ (fun x x_1 => x ⊇ x_1) ((fun f => Set.range (F.map f.snd)) { fst := k, snd := kj })\n    ((fun f => Set.range (F.map f.snd)) { fst := l, snd := lk ≫ kj })\n[PROOFSTEP]\nsimp_rw [F.map_comp]\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofilteredOrEmpty C\nF : C ⥤ Type u_1\nj : C\nx✝¹ x✝ : (i : C) ×' (i ⟶ j)\ni : C\nij : i ⟶ j\nk : C\nkj : k ⟶ j\nl : C\nli : l ⟶ i\nlk : l ⟶ k\ne : li ≫ ij = lk ≫ kj\n⊢ Set.range (F.map ij) ⊇ Set.range (F.map li ≫ F.map ij)\n[PROOFSTEP]\napply Set.range_comp_subset_range\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofilteredOrEmpty C\nF : C ⥤ Type u_1\nj : C\nx✝¹ x✝ : (i : C) ×' (i ⟶ j)\ni : C\nij : i ⟶ j\nk : C\nkj : k ⟶ j\nl : C\nli : l ⟶ i\nlk : l ⟶ k\ne : li ≫ ij = lk ≫ kj\n⊢ Set.range (F.map kj) ⊇ Set.range (F.map lk ≫ F.map kj)\n[PROOFSTEP]\napply Set.range_comp_subset_range\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : IsCofilteredOrEmpty C\nD : Type u₁\ninst✝ : Category.{v₁, u₁} D\nL : C ⥤ D\nR : D ⥤ C\nh : L ⊣ R\nX Y : D\nf g : X ⟶ Y\n⊢ ↑(Adjunction.homEquiv h (eq (R.map f) (R.map g)) X).symm (eqHom (R.map f) (R.map g)) ≫ f =\n    ↑(Adjunction.homEquiv h (eq (R.map f) (R.map g)) X).symm (eqHom (R.map f) (R.map g)) ≫ g\n[PROOFSTEP]\nrw [← h.homEquiv_naturality_right_symm, ← h.homEquiv_naturality_right_symm, eq_condition]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\n⊢ ∃ S, ∀ {X : C}, X ∈ O → _root_.Nonempty (S ⟶ X)\n[PROOFSTEP]\nclassical\ninduction' O using Finset.induction with X O' nm h\n· exact ⟨Classical.choice IsCofiltered.Nonempty, by intro; simp⟩\n· obtain ⟨S', w'⟩ := h\n  use min X S'\n  rintro Y mY\n  obtain rfl | h := eq_or_ne Y X\n  · exact ⟨minToLeft _ _⟩\n  · exact ⟨minToRight _ _ ≫ (w' (Finset.mem_of_mem_insert_of_ne mY h)).some⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\n⊢ ∃ S, ∀ {X : C}, X ∈ O → _root_.Nonempty (S ⟶ X)\n[PROOFSTEP]\ninduction' O using Finset.induction with X O' nm h\n[GOAL]\ncase empty\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\n⊢ ∃ S, ∀ {X : C}, X ∈ ∅ → _root_.Nonempty (S ⟶ X)\n[PROOFSTEP]\nexact ⟨Classical.choice IsCofiltered.Nonempty, by intro; simp⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\n⊢ ∀ {X : C}, X ∈ ∅ → _root_.Nonempty (Classical.choice (_ : _root_.Nonempty C) ⟶ X)\n[PROOFSTEP]\nintro\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nX✝ : C\n⊢ X✝ ∈ ∅ → _root_.Nonempty (Classical.choice (_ : _root_.Nonempty C) ⟶ X✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nX : C\nO' : Finset C\nnm : ¬X ∈ O'\nh : ∃ S, ∀ {X : C}, X ∈ O' → _root_.Nonempty (S ⟶ X)\n⊢ ∃ S, ∀ {X_1 : C}, X_1 ∈ insert X O' → _root_.Nonempty (S ⟶ X_1)\n[PROOFSTEP]\nobtain ⟨S', w'⟩ := h\n[GOAL]\ncase insert.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nX : C\nO' : Finset C\nnm : ¬X ∈ O'\nS' : C\nw' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (S' ⟶ X)\n⊢ ∃ S, ∀ {X_1 : C}, X_1 ∈ insert X O' → _root_.Nonempty (S ⟶ X_1)\n[PROOFSTEP]\nuse min X S'\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nX : C\nO' : Finset C\nnm : ¬X ∈ O'\nS' : C\nw' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (S' ⟶ X)\n⊢ ∀ {X_1 : C}, X_1 ∈ insert X O' → _root_.Nonempty (min X S' ⟶ X_1)\n[PROOFSTEP]\nrintro Y mY\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nX : C\nO' : Finset C\nnm : ¬X ∈ O'\nS' : C\nw' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (S' ⟶ X)\nY : C\nmY : Y ∈ insert X O'\n⊢ _root_.Nonempty (min X S' ⟶ Y)\n[PROOFSTEP]\nobtain rfl | h := eq_or_ne Y X\n[GOAL]\ncase h.inl\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO' : Finset C\nS' : C\nw' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (S' ⟶ X)\nY : C\nnm : ¬Y ∈ O'\nmY : Y ∈ insert Y O'\n⊢ _root_.Nonempty (min Y S' ⟶ Y)\n[PROOFSTEP]\nexact ⟨minToLeft _ _⟩\n[GOAL]\ncase h.inr\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nX : C\nO' : Finset C\nnm : ¬X ∈ O'\nS' : C\nw' : ∀ {X : C}, X ∈ O' → _root_.Nonempty (S' ⟶ X)\nY : C\nmY : Y ∈ insert X O'\nh : Y ≠ X\n⊢ _root_.Nonempty (min X S' ⟶ Y)\n[PROOFSTEP]\nexact ⟨minToRight _ _ ≫ (w' (Finset.mem_of_mem_insert_of_ne mY h)).some⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\n⊢ ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H → T mX ≫ f = T mY\n[PROOFSTEP]\nclassical\ninduction' H using Finset.induction with h' H' nmf h''\n· obtain ⟨S, f⟩ := inf_objs_exists O\n  refine' ⟨S, fun mX => (f mX).some, by rintro - - - - - ⟨⟩⟩\n· obtain ⟨X, Y, mX, mY, f⟩ := h'\n  obtain ⟨S', T', w'⟩ := h''\n  refine' ⟨eq (T' mX ≫ f) (T' mY), fun mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ, _⟩\n  intro X' Y' mX' mY' f' mf'\n  rw [Category.assoc]\n  by_cases h : X = X' ∧ Y = Y'\n  · rcases h with ⟨rfl, rfl⟩\n    by_cases hf : f = f'\n    · subst hf\n      apply eq_condition\n    · rw [@w' _ _ mX mY f']\n      simp only [Finset.mem_insert, PSigma.mk.injEq, heq_eq_eq, true_and] at mf' \n      rcases mf' with mf' | mf'\n      · exfalso\n        exact hf mf'.symm\n      · exact mf'\n  · rw [@w' _ _ mX' mY' f' _]\n    apply Finset.mem_of_mem_insert_of_ne mf'\n    contrapose! h\n    obtain ⟨rfl, h⟩ := h\n    trivial\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\n⊢ ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H → T mX ≫ f = T mY\n[PROOFSTEP]\ninduction' H using Finset.induction with h' H' nmf h''\n[GOAL]\ncase empty\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\n⊢ ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ ∅ → T mX ≫ f = T mY\n[PROOFSTEP]\nobtain ⟨S, f⟩ := inf_objs_exists O\n[GOAL]\ncase empty.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nS : C\nf : ∀ {X : C}, X ∈ O → _root_.Nonempty (S ⟶ X)\n⊢ ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ ∅ → T mX ≫ f = T mY\n[PROOFSTEP]\nrefine' ⟨S, fun mX => (f mX).some, by rintro - - - - - ⟨⟩⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nS : C\nf : ∀ {X : C}, X ∈ O → _root_.Nonempty (S ⟶ X)\n⊢ ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ ∅ →\n      (fun {X} mX => Nonempty.some (_ : _root_.Nonempty (S ⟶ X))) mX ≫ f_1 =\n        (fun {X} mX => Nonempty.some (_ : _root_.Nonempty (S ⟶ X))) mY\n[PROOFSTEP]\nrintro - - - - - ⟨⟩\n[GOAL]\ncase insert\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nh' : (X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)\nH' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nnmf : ¬h' ∈ H'\nh'' :\n  ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T mX ≫ f = T mY\n⊢ ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ insert h' H' →\n        T mX ≫ f = T mY\n[PROOFSTEP]\nobtain ⟨X, Y, mX, mY, f⟩ := h'\n[GOAL]\ncase insert.mk.mk.mk.mk\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nh'' :\n  ∃ S T,\n    ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n      { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T mX ≫ f = T mY\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\n⊢ ∃ S T,\n    ∀ {X_1 Y_1 : C} (mX_1 : X_1 ∈ O) (mY_1 : Y_1 ∈ O) {f_1 : X_1 ⟶ Y_1},\n      { fst := X_1, snd := { fst := Y_1, snd := { fst := mX_1, snd := { fst := mY_1, snd := f_1 } } } } ∈\n          insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H' →\n        T mX_1 ≫ f_1 = T mY_1\n[PROOFSTEP]\nobtain ⟨S', T', w'⟩ := h''\n[GOAL]\ncase insert.mk.mk.mk.mk.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\n⊢ ∃ S T,\n    ∀ {X_1 Y_1 : C} (mX_1 : X_1 ∈ O) (mY_1 : Y_1 ∈ O) {f_1 : X_1 ⟶ Y_1},\n      { fst := X_1, snd := { fst := Y_1, snd := { fst := mX_1, snd := { fst := mY_1, snd := f_1 } } } } ∈\n          insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H' →\n        T mX_1 ≫ f_1 = T mY_1\n[PROOFSTEP]\nrefine' ⟨eq (T' mX ≫ f) (T' mY), fun mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ, _⟩\n[GOAL]\ncase insert.mk.mk.mk.mk.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\n⊢ ∀ {X_1 Y_1 : C} (mX_1 : X_1 ∈ O) (mY_1 : Y_1 ∈ O) {f_1 : X_1 ⟶ Y_1},\n    { fst := X_1, snd := { fst := Y_1, snd := { fst := mX_1, snd := { fst := mY_1, snd := f_1 } } } } ∈\n        insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H' →\n      (fun {X_2} mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ) mX_1 ≫ f_1 =\n        (fun {X_2} mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ) mY_1\n[PROOFSTEP]\nintro X' Y' mX' mY' f' mf'\n[GOAL]\ncase insert.mk.mk.mk.mk.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\n⊢ (fun {X_1} mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ) mX' ≫ f' = (fun {X_1} mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ) mY'\n[PROOFSTEP]\nrw [Category.assoc]\n[GOAL]\ncase insert.mk.mk.mk.mk.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\n⊢ eqHom (T' mX ≫ f) (T' mY) ≫ T' mX' ≫ f' = (fun {X_1} mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ) mY'\n[PROOFSTEP]\nby_cases h : X = X' ∧ Y = Y'\n[GOAL]\ncase pos\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nh : X = X' ∧ Y = Y'\n⊢ eqHom (T' mX ≫ f) (T' mY) ≫ T' mX' ≫ f' = (fun {X_1} mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ) mY'\n[PROOFSTEP]\nrcases h with ⟨rfl, rfl⟩\n[GOAL]\ncase pos.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nmf' :\n  { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\n⊢ eqHom (T' mX ≫ f) (T' mY) ≫ T' mX' ≫ f' = (fun {X_1} mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ) mY'\n[PROOFSTEP]\nby_cases hf : f = f'\n[GOAL]\ncase pos\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nmf' :\n  { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nhf : f = f'\n⊢ eqHom (T' mX ≫ f) (T' mY) ≫ T' mX' ≫ f' = (fun {X_1} mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ) mY'\n[PROOFSTEP]\nsubst hf\n[GOAL]\ncase pos\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nmX' : X ∈ O\nmY' : Y ∈ O\nmf' :\n  { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\n⊢ eqHom (T' mX ≫ f) (T' mY) ≫ T' mX' ≫ f = (fun {X_1} mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ) mY'\n[PROOFSTEP]\napply eq_condition\n[GOAL]\ncase neg\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nmf' :\n  { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nhf : ¬f = f'\n⊢ eqHom (T' mX ≫ f) (T' mY) ≫ T' mX' ≫ f' = (fun {X_1} mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ) mY'\n[PROOFSTEP]\nrw [@w' _ _ mX mY f']\n[GOAL]\ncase neg\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nmf' :\n  { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nhf : ¬f = f'\n⊢ { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f' } } } } ∈ H'\n[PROOFSTEP]\nsimp only [Finset.mem_insert, PSigma.mk.injEq, heq_eq_eq, true_and] at mf' \n[GOAL]\ncase neg\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nhf : ¬f = f'\nmf' : f' = f ∨ { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈ H'\n⊢ { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f' } } } } ∈ H'\n[PROOFSTEP]\nrcases mf' with mf' | mf'\n[GOAL]\ncase neg.inl\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nhf : ¬f = f'\nmf' : f' = f\n⊢ { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f' } } } } ∈ H'\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase neg.inl.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nhf : ¬f = f'\nmf' : f' = f\n⊢ False\n[PROOFSTEP]\nexact hf mf'.symm\n[GOAL]\ncase neg.inr\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nmX' : X ∈ O\nmY' : Y ∈ O\nf' : X ⟶ Y\nhf : ¬f = f'\nmf' : { fst := X, snd := { fst := Y, snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈ H'\n⊢ { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f' } } } } ∈ H'\n[PROOFSTEP]\nexact mf'\n[GOAL]\ncase neg\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nh : ¬(X = X' ∧ Y = Y')\n⊢ eqHom (T' mX ≫ f) (T' mY) ≫ T' mX' ≫ f' = (fun {X_1} mZ => eqHom (T' mX ≫ f) (T' mY) ≫ T' mZ) mY'\n[PROOFSTEP]\nrw [@w' _ _ mX' mY' f' _]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nh : ¬(X = X' ∧ Y = Y')\n⊢ { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈ H'\n[PROOFSTEP]\napply Finset.mem_of_mem_insert_of_ne mf'\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nh : ¬(X = X' ∧ Y = Y')\n⊢ { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ≠\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } }\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nX' Y' : C\nmX' : X' ∈ O\nmY' : Y' ∈ O\nf' : X' ⟶ Y'\nmf' :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\nh :\n  { fst := X', snd := { fst := Y', snd := { fst := mX', snd := { fst := mY', snd := f' } } } } =\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } }\n⊢ X = X' ∧ Y = Y'\n[PROOFSTEP]\nobtain ⟨rfl, h⟩ := h\n[GOAL]\ncase refl\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofiltered C\nO : Finset C\nH H' : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nX Y : C\nmX : X ∈ O\nmY : Y ∈ O\nf : X ⟶ Y\nnmf : ¬{ fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H'\nS' : C\nT' : {X : C} → X ∈ O → (S' ⟶ X)\nw' :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈ H' → T' mX ≫ f = T' mY\nmf' :\n  { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } ∈\n    insert { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f } } } } H'\n⊢ X = X ∧ Y = Y\n[PROOFSTEP]\ntrivial\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\n⊢ _root_.Nonempty (Cone F)\n[PROOFSTEP]\nclassical\nlet O := Finset.univ.image F.obj\nlet H : Finset (Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) :=\n  Finset.univ.biUnion fun X : J =>\n    Finset.univ.biUnion fun Y : J => Finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩\nobtain ⟨Z, f, w⟩ := inf_exists O H\nrefine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩\nintro j j' g\ndsimp\nsimp only [Category.id_comp]\nsymm\napply w\nsimp only [Finset.mem_biUnion, Finset.mem_univ, Finset.mem_image, PSigma.mk.injEq, true_and, exists_and_left]\nexact ⟨j, rfl, j', g, by simp⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\n⊢ _root_.Nonempty (Cone F)\n[PROOFSTEP]\nlet O := Finset.univ.image F.obj\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\n⊢ _root_.Nonempty (Cone F)\n[PROOFSTEP]\nlet H : Finset (Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) :=\n  Finset.univ.biUnion fun X : J =>\n    Finset.univ.biUnion fun Y : J => Finset.univ.image fun f : X ⟶ Y => ⟨F.obj X, F.obj Y, by simp, by simp, F.map f⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nX Y : J\nf : X ⟶ Y\n⊢ F.obj X ∈ O\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nX Y : J\nf : X ⟶ Y\n⊢ F.obj Y ∈ O\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\n⊢ _root_.Nonempty (Cone F)\n[PROOFSTEP]\nobtain ⟨Z, f, w⟩ := inf_exists O H\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (Z ⟶ X)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f mX ≫ f_1 = f mY\n⊢ _root_.Nonempty (Cone F)\n[PROOFSTEP]\nrefine' ⟨⟨Z, ⟨fun X => f (by simp), _⟩⟩⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (Z ⟶ X)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f mX ≫ f_1 = f mY\nX : J\n⊢ F.obj X ∈ O\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (Z ⟶ X)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f mX ≫ f_1 = f mY\n⊢ ∀ ⦃X Y : J⦄ (f_1 : X ⟶ Y),\n    ((Functor.const J).obj Z).map f_1 ≫ (fun X => f (_ : F.obj X ∈ Finset.image F.obj Finset.univ)) Y =\n      (fun X => f (_ : F.obj X ∈ Finset.image F.obj Finset.univ)) X ≫ F.map f_1\n[PROOFSTEP]\nintro j j' g\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (Z ⟶ X)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f mX ≫ f_1 = f mY\nj j' : J\ng : j ⟶ j'\n⊢ ((Functor.const J).obj Z).map g ≫ (fun X => f (_ : F.obj X ∈ Finset.image F.obj Finset.univ)) j' =\n    (fun X => f (_ : F.obj X ∈ Finset.image F.obj Finset.univ)) j ≫ F.map g\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (Z ⟶ X)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f mX ≫ f_1 = f mY\nj j' : J\ng : j ⟶ j'\n⊢ 𝟙 Z ≫ f (_ : F.obj j' ∈ Finset.image F.obj Finset.univ) = f (_ : F.obj j ∈ Finset.image F.obj Finset.univ) ≫ F.map g\n[PROOFSTEP]\nsimp only [Category.id_comp]\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (Z ⟶ X)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f mX ≫ f_1 = f mY\nj j' : J\ng : j ⟶ j'\n⊢ f (_ : F.obj j' ∈ Finset.image F.obj Finset.univ) = f (_ : F.obj j ∈ Finset.image F.obj Finset.univ) ≫ F.map g\n[PROOFSTEP]\nsymm\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (Z ⟶ X)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f mX ≫ f_1 = f mY\nj j' : J\ng : j ⟶ j'\n⊢ f (_ : F.obj j ∈ Finset.image F.obj Finset.univ) ≫ F.map g = f (_ : F.obj j' ∈ Finset.image F.obj Finset.univ)\n[PROOFSTEP]\napply w\n[GOAL]\ncase intro.intro.a\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (Z ⟶ X)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f mX ≫ f_1 = f mY\nj j' : J\ng : j ⟶ j'\n⊢ { fst := F.obj j,\n      snd :=\n        { fst := F.obj j',\n          snd :=\n            { fst := (_ : F.obj j ∈ Finset.image F.obj Finset.univ),\n              snd := { fst := (_ : F.obj j' ∈ Finset.image F.obj Finset.univ), snd := F.map g } } } } ∈\n    H\n[PROOFSTEP]\nsimp only [Finset.mem_biUnion, Finset.mem_univ, Finset.mem_image, PSigma.mk.injEq, true_and, exists_and_left]\n[GOAL]\ncase intro.intro.a\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (Z ⟶ X)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f mX ≫ f_1 = f mY\nj j' : J\ng : j ⟶ j'\n⊢ ∃ a,\n    F.obj a = F.obj j ∧\n      ∃ x x_1,\n        HEq\n          { fst := F.obj x,\n            snd :=\n              { fst := (_ : F.obj a ∈ Finset.image F.obj Finset.univ),\n                snd := { fst := (_ : F.obj x ∈ Finset.image F.obj Finset.univ), snd := F.map x_1 } } }\n          { fst := F.obj j',\n            snd :=\n              { fst := (_ : F.obj j ∈ Finset.image F.obj Finset.univ),\n                snd := { fst := (_ : F.obj j' ∈ Finset.image F.obj Finset.univ), snd := F.map g } } }\n[PROOFSTEP]\nexact ⟨j, rfl, j', g, by simp⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : IsCofiltered C\nO✝ : Finset C\nH✝ : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O✝) ×' (_ : Y ∈ O✝) ×' (X ⟶ Y))\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nF : J ⥤ C\nO : Finset C := Finset.image F.obj Finset.univ\nH : Finset ((X : C) ×' (Y : C) ×' (_ : X ∈ O) ×' (_ : Y ∈ O) ×' (X ⟶ Y)) :=\n  Finset.biUnion Finset.univ fun X =>\n    Finset.biUnion Finset.univ fun Y =>\n      Finset.image\n        (fun f =>\n          { fst := F.obj X,\n            snd :=\n              { fst := F.obj Y,\n                snd :=\n                  { fst := (_ : F.obj X ∈ Finset.image F.obj Finset.univ),\n                    snd := { fst := (_ : F.obj Y ∈ Finset.image F.obj Finset.univ), snd := F.map f } } } })\n        Finset.univ\nZ : C\nf : {X : C} → X ∈ O → (Z ⟶ X)\nw :\n  ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f_1 : X ⟶ Y},\n    { fst := X, snd := { fst := Y, snd := { fst := mX, snd := { fst := mY, snd := f_1 } } } } ∈ H → f mX ≫ f_1 = f mY\nj j' : J\ng : j ⟶ j'\n⊢ HEq\n    { fst := F.obj j',\n      snd :=\n        { fst := (_ : F.obj j ∈ Finset.image F.obj Finset.univ),\n          snd := { fst := (_ : F.obj j' ∈ Finset.image F.obj Finset.univ), snd := F.map g } } }\n    { fst := F.obj j',\n      snd :=\n        { fst := (_ : F.obj j ∈ Finset.image F.obj Finset.univ),\n          snd := { fst := (_ : F.obj j' ∈ Finset.image F.obj Finset.univ), snd := F.map g } } }\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nX Y : Cᵒᵖ\nf g : X ⟶ Y\n⊢ (IsFiltered.coeqHom f.unop g.unop).op ≫ f = (IsFiltered.coeqHom f.unop g.unop).op ≫ g\n[PROOFSTEP]\nrw [show f = f.unop.op by simp, show g = g.unop.op by simp, ← op_comp, ← op_comp]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nX Y : Cᵒᵖ\nf g : X ⟶ Y\n⊢ f = f.unop.op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nX Y : Cᵒᵖ\nf g : X ⟶ Y\n⊢ g = g.unop.op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nX Y : Cᵒᵖ\nf g : X ⟶ Y\n⊢ (f.unop ≫ IsFiltered.coeqHom f.unop.op.unop g.unop.op.unop).op =\n    (g.unop ≫ IsFiltered.coeqHom f.unop.op.unop g.unop.op.unop).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsFilteredOrEmpty C\nX Y : Cᵒᵖ\nf g : X ⟶ Y\n⊢ f.unop ≫ IsFiltered.coeqHom f.unop.op.unop g.unop.op.unop = g.unop ≫ IsFiltered.coeqHom f.unop.op.unop g.unop.op.unop\n[PROOFSTEP]\nexact IsFiltered.coeq_condition f.unop g.unop\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofilteredOrEmpty C\nX Y : Cᵒᵖ\nf g : X ⟶ Y\n⊢ f ≫ (IsCofiltered.eqHom f.unop g.unop).op = g ≫ (IsCofiltered.eqHom f.unop g.unop).op\n[PROOFSTEP]\nrw [show f = f.unop.op by simp, show g = g.unop.op by simp, ← op_comp, ← op_comp]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofilteredOrEmpty C\nX Y : Cᵒᵖ\nf g : X ⟶ Y\n⊢ f = f.unop.op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofilteredOrEmpty C\nX Y : Cᵒᵖ\nf g : X ⟶ Y\n⊢ g = g.unop.op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofilteredOrEmpty C\nX Y : Cᵒᵖ\nf g : X ⟶ Y\n⊢ (IsCofiltered.eqHom f.unop.op.unop g.unop.op.unop ≫ f.unop).op =\n    (IsCofiltered.eqHom f.unop.op.unop g.unop.op.unop ≫ g.unop).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : IsCofilteredOrEmpty C\nX Y : Cᵒᵖ\nf g : X ⟶ Y\n⊢ IsCofiltered.eqHom f.unop.op.unop g.unop.op.unop ≫ f.unop = IsCofiltered.eqHom f.unop.op.unop g.unop.op.unop ≫ g.unop\n[PROOFSTEP]\nexact IsCofiltered.eq_condition f.unop g.unop\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Filtered", "llama_tokens": 52610, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6992544210587585, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.379599550788847}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\ns : Set (β × γ)\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\n⊢ HasFiniteIntegral fun b => ENNReal.toReal (↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s))\n[PROOFSTEP]\nlet t := toMeasurable ((κ ⊗ₖ η) a) s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\ns : Set (β × γ)\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\n⊢ HasFiniteIntegral fun b => ENNReal.toReal (↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s))\n[PROOFSTEP]\nsimp_rw [HasFiniteIntegral, ennnorm_eq_ofReal toReal_nonneg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\ns : Set (β × γ)\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\n⊢ ∫⁻ (a_1 : β), ENNReal.ofReal (ENNReal.toReal (↑↑(↑η (a, a_1)) (Prod.mk a_1 ⁻¹' s))) ∂↑κ a < ⊤\n[PROOFSTEP]\ncalc\n  ∫⁻ b, ENNReal.ofReal (η (a, b) (Prod.mk b ⁻¹' s)).toReal ∂κ a\n  _ ≤ ∫⁻ b, η (a, b) (Prod.mk b ⁻¹' t) ∂κ a := by\n    refine' lintegral_mono_ae _\n    filter_upwards [ae_kernel_lt_top a h2s] with b hb\n    rw [ofReal_toReal hb.ne]\n    exact measure_mono (preimage_mono (subset_toMeasurable _ _))\n  _ ≤ (κ ⊗ₖ η) a t := (le_compProd_apply _ _ _ _)\n  _ = (κ ⊗ₖ η) a s := (measure_toMeasurable s)\n  _ < ⊤ := h2s.lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\ns : Set (β × γ)\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\n⊢ ∫⁻ (b : β), ENNReal.ofReal (ENNReal.toReal (↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s))) ∂↑κ a ≤\n    ∫⁻ (b : β), ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' t) ∂↑κ a\n[PROOFSTEP]\nrefine' lintegral_mono_ae _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\ns : Set (β × γ)\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\n⊢ ∀ᵐ (a_1 : β) ∂↑κ a,\n    ENNReal.ofReal (ENNReal.toReal (↑↑(↑η (a, a_1)) (Prod.mk a_1 ⁻¹' s))) ≤ ↑↑(↑η (a, a_1)) (Prod.mk a_1 ⁻¹' t)\n[PROOFSTEP]\nfilter_upwards [ae_kernel_lt_top a h2s] with b hb\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\ns : Set (β × γ)\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\nb : β\nhb : ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) < ⊤\n⊢ ENNReal.ofReal (ENNReal.toReal (↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s))) ≤\n    ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' toMeasurable (↑(κ ⊗ₖ η) a) s)\n[PROOFSTEP]\nrw [ofReal_toReal hb.ne]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\ns : Set (β × γ)\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\nt : Set (β × γ) := toMeasurable (↑(κ ⊗ₖ η) a) s\nb : β\nhb : ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) < ⊤\n⊢ ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s) ≤ ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' toMeasurable (↑(κ ⊗ₖ η) a) s)\n[PROOFSTEP]\nexact measure_mono (preimage_mono (subset_toMeasurable _ _))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\n⊢ Integrable fun b => ENNReal.toReal (↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\n⊢ AEStronglyMeasurable (fun b => ENNReal.toReal (↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s))) (↑κ a)\n[PROOFSTEP]\nexact (measurable_kernel_prod_mk_left' hs a).ennreal_toReal.aestronglyMeasurable\n[GOAL]\ncase right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na✝ a : α\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s ≠ ⊤\n⊢ HasFiniteIntegral fun b => ENNReal.toReal (↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s))\n[PROOFSTEP]\nexact hasFiniteIntegral_prod_mk_left a h2s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁴ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝³ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝² : IsSFiniteKernel η\na : α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : β × γ → E\nhf : AEStronglyMeasurable f (↑(κ ⊗ₖ η) a)\n⊢ (fun x => ∫ (y : γ), f (x, y) ∂↑η (a, x)) =ᵐ[↑κ a] fun x => ∫ (y : γ), AEStronglyMeasurable.mk f hf (x, y) ∂↑η (a, x)\n[PROOFSTEP]\nfilter_upwards [ae_ae_of_ae_compProd hf.ae_eq_mk] with _ hx using integral_congr_ae hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝³ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝² : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝¹ : IsSFiniteKernel η\na : α\nδ : Type u_5\ninst✝ : TopologicalSpace δ\nf : β × γ → δ\nhf : AEStronglyMeasurable f (↑(κ ⊗ₖ η) a)\n⊢ ∀ᵐ (x : β) ∂↑κ a, AEStronglyMeasurable (fun y => f (x, y)) (↑η (a, x))\n[PROOFSTEP]\nfilter_upwards [ae_ae_of_ae_compProd hf.ae_eq_mk] with x hx using\n  ⟨fun y => hf.mk f (x, y), hf.stronglyMeasurable_mk.comp_measurable measurable_prod_mk_left, hx⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\n⊢ HasFiniteIntegral f ↔\n    (∀ᵐ (x : β) ∂↑κ a, HasFiniteIntegral fun y => f (x, y)) ∧\n      HasFiniteIntegral fun x => ∫ (y : γ), ‖f (x, y)‖ ∂↑η (a, x)\n[PROOFSTEP]\nsimp only [HasFiniteIntegral]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\n⊢ ∫⁻ (a : β × γ), ↑‖f a‖₊ ∂↑(κ ⊗ₖ η) a < ⊤ ↔\n    (∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤) ∧\n      ∫⁻ (a_1 : β), ↑‖∫ (y : γ), ‖f (a_1, y)‖ ∂↑η (a, a_1)‖₊ ∂↑κ a < ⊤\n[PROOFSTEP]\nrw [kernel.lintegral_compProd _ _ _ h1f.ennnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\n⊢ ∫⁻ (b : β), ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b) ∂↑κ a < ⊤ ↔\n    (∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤) ∧\n      ∫⁻ (a_1 : β), ↑‖∫ (y : γ), ‖f (a_1, y)‖ ∂↑η (a, a_1)‖₊ ∂↑κ a < ⊤\n[PROOFSTEP]\nhave : ∀ x, ∀ᵐ y ∂η (a, x), 0 ≤ ‖f (x, y)‖ := fun x => eventually_of_forall fun y => norm_nonneg _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\n⊢ ∫⁻ (b : β), ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b) ∂↑κ a < ⊤ ↔\n    (∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤) ∧\n      ∫⁻ (a_1 : β), ↑‖∫ (y : γ), ‖f (a_1, y)‖ ∂↑η (a, a_1)‖₊ ∂↑κ a < ⊤\n[PROOFSTEP]\nsimp_rw [integral_eq_lintegral_of_nonneg_ae (this _)\n    (h1f.norm.comp_measurable measurable_prod_mk_left).aestronglyMeasurable,\n  ennnorm_eq_ofReal toReal_nonneg, ofReal_norm_eq_coe_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\n⊢ ∫⁻ (b : β), ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b) ∂↑κ a < ⊤ ↔\n    (∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤) ∧\n      ∫⁻ (a_1 : β), ENNReal.ofReal (ENNReal.toReal (∫⁻ (a : γ), ↑‖f (a_1, a)‖₊ ∂↑η (a, a_1))) ∂↑κ a < ⊤\n[PROOFSTEP]\nhave : ∀ {p q r : Prop} (_ : r → p), (r ↔ p ∧ q) ↔ p → (r ↔ q) := fun {p q r} h1 => by\n  rw [← and_congr_right_iff, and_iff_right_of_imp h1]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\np q r : Prop\nh1 : r → p\n⊢ (r ↔ p ∧ q) ↔ p → (r ↔ q)\n[PROOFSTEP]\nrw [← and_congr_right_iff, and_iff_right_of_imp h1]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\n⊢ ∫⁻ (b : β), ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b) ∂↑κ a < ⊤ ↔\n    (∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤) ∧\n      ∫⁻ (a_1 : β), ENNReal.ofReal (ENNReal.toReal (∫⁻ (a : γ), ↑‖f (a_1, a)‖₊ ∂↑η (a, a_1))) ∂↑κ a < ⊤\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\n⊢ (∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤) →\n    (∫⁻ (b : β), ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b) ∂↑κ a < ⊤ ↔\n      ∫⁻ (a_2 : β), ENNReal.ofReal (ENNReal.toReal (∫⁻ (a : γ), ↑‖f (a_2, a)‖₊ ∂↑η (a, a_2))) ∂↑κ a < ⊤)\n[PROOFSTEP]\nintro h2f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\nh2f : ∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\n⊢ ∫⁻ (b : β), ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b) ∂↑κ a < ⊤ ↔\n    ∫⁻ (a_1 : β), ENNReal.ofReal (ENNReal.toReal (∫⁻ (a : γ), ↑‖f (a_1, a)‖₊ ∂↑η (a, a_1))) ∂↑κ a < ⊤\n[PROOFSTEP]\nrw [lintegral_congr_ae]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\nh2f : ∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\n⊢ (fun b => ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b)) =ᵐ[↑κ a] fun a_1 =>\n    ENNReal.ofReal (ENNReal.toReal (∫⁻ (a : γ), ↑‖f (a_1, a)‖₊ ∂↑η (a, a_1)))\n[PROOFSTEP]\nrefine' h2f.mp _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\nh2f : ∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\n⊢ ∀ᵐ (x : β) ∂↑κ a,\n    ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤ →\n      (fun b => ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b)) x =\n        (fun a_2 => ENNReal.ofReal (ENNReal.toReal (∫⁻ (a : γ), ↑‖f (a_2, a)‖₊ ∂↑η (a, a_2)))) x\n[PROOFSTEP]\napply eventually_of_forall\n[GOAL]\ncase hp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\nh2f : ∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\n⊢ ∀ (x : β),\n    ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤ →\n      (fun b => ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b)) x =\n        (fun a_2 => ENNReal.ofReal (ENNReal.toReal (∫⁻ (a : γ), ↑‖f (a_2, a)‖₊ ∂↑η (a, a_2)))) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase hp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\nh2f : ∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\nx : β\nhx : ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\n⊢ (fun b => ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b)) x =\n    (fun a_1 => ENNReal.ofReal (ENNReal.toReal (∫⁻ (a : γ), ↑‖f (a_1, a)‖₊ ∂↑η (a, a_1)))) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase hp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\nh2f : ∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\nx : β\nhx : ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\n⊢ ∫⁻ (c : γ), ↑‖f (x, c)‖₊ ∂↑η (a, x) = ENNReal.ofReal (ENNReal.toReal (∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x)))\n[PROOFSTEP]\nrw [ofReal_toReal]\n[GOAL]\ncase hp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\nh2f : ∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\nx : β\nhx : ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\n⊢ ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) ≠ ⊤\n[PROOFSTEP]\nrw [← lt_top_iff_ne_top]\n[GOAL]\ncase hp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\nh2f : ∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\nx : β\nhx : ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\n⊢ ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\n[PROOFSTEP]\nexact hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\n⊢ ∫⁻ (b : β), ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b) ∂↑κ a < ⊤ → ∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\n[PROOFSTEP]\nintro h2f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\nh2f : ∫⁻ (b : β), ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b) ∂↑κ a < ⊤\n⊢ ∀ᵐ (x : β) ∂↑κ a, ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x) < ⊤\n[PROOFSTEP]\nrefine' ae_lt_top _ h2f.ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : StronglyMeasurable f\nthis✝ : ∀ (x : β), ∀ᵐ (y : γ) ∂↑η (a, x), 0 ≤ ‖f (x, y)‖\nthis : ∀ {p q r : Prop}, (r → p) → ((r ↔ p ∧ q) ↔ p → (r ↔ q))\nh2f : ∫⁻ (b : β), ∫⁻ (c : γ), ↑‖f (b, c)‖₊ ∂↑η (a, b) ∂↑κ a < ⊤\n⊢ Measurable fun x => ∫⁻ (a : γ), ↑‖f (x, a)‖₊ ∂↑η (a, x)\n[PROOFSTEP]\nexact h1f.ennnorm.lintegral_kernel_prod_right''\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : AEStronglyMeasurable f (↑(κ ⊗ₖ η) a)\n⊢ HasFiniteIntegral f ↔\n    (∀ᵐ (x : β) ∂↑κ a, HasFiniteIntegral fun y => f (x, y)) ∧\n      HasFiniteIntegral fun x => ∫ (y : γ), ‖f (x, y)‖ ∂↑η (a, x)\n[PROOFSTEP]\nrw [hasFiniteIntegral_congr h1f.ae_eq_mk, hasFiniteIntegral_compProd_iff h1f.stronglyMeasurable_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : AEStronglyMeasurable f (↑(κ ⊗ₖ η) a)\n⊢ ((∀ᵐ (x : β) ∂↑κ a, HasFiniteIntegral fun y => AEStronglyMeasurable.mk f h1f (x, y)) ∧\n      HasFiniteIntegral fun x => ∫ (y : γ), ‖AEStronglyMeasurable.mk f h1f (x, y)‖ ∂↑η (a, x)) ↔\n    (∀ᵐ (x : β) ∂↑κ a, HasFiniteIntegral fun y => f (x, y)) ∧\n      HasFiniteIntegral fun x => ∫ (y : γ), ‖f (x, y)‖ ∂↑η (a, x)\n[PROOFSTEP]\napply and_congr\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : AEStronglyMeasurable f (↑(κ ⊗ₖ η) a)\n⊢ (∀ᵐ (x : β) ∂↑κ a, HasFiniteIntegral fun y => AEStronglyMeasurable.mk f h1f (x, y)) ↔\n    ∀ᵐ (x : β) ∂↑κ a, HasFiniteIntegral fun y => f (x, y)\n[PROOFSTEP]\napply eventually_congr\n[GOAL]\ncase h₁.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : AEStronglyMeasurable f (↑(κ ⊗ₖ η) a)\n⊢ ∀ᵐ (x : β) ∂↑κ a,\n    (HasFiniteIntegral fun y => AEStronglyMeasurable.mk f h1f (x, y)) ↔ HasFiniteIntegral fun y => f (x, y)\n[PROOFSTEP]\nfilter_upwards [ae_ae_of_ae_compProd h1f.ae_eq_mk.symm]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : AEStronglyMeasurable f (↑(κ ⊗ₖ η) a)\n⊢ ∀ (a_1 : β),\n    (∀ᵐ (c : γ) ∂↑η (a, a_1), AEStronglyMeasurable.mk f h1f (a_1, c) = f (a_1, c)) →\n      ((HasFiniteIntegral fun y => AEStronglyMeasurable.mk f h1f (a_1, y)) ↔ HasFiniteIntegral fun y => f (a_1, y))\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : AEStronglyMeasurable f (↑(κ ⊗ₖ η) a)\nx : β\nhx : ∀ᵐ (c : γ) ∂↑η (a, x), AEStronglyMeasurable.mk f h1f (x, c) = f (x, c)\n⊢ (HasFiniteIntegral fun y => AEStronglyMeasurable.mk f h1f (x, y)) ↔ HasFiniteIntegral fun y => f (x, y)\n[PROOFSTEP]\nexact hasFiniteIntegral_congr hx\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : AEStronglyMeasurable f (↑(κ ⊗ₖ η) a)\n⊢ (HasFiniteIntegral fun x => ∫ (y : γ), ‖AEStronglyMeasurable.mk f h1f (x, y)‖ ∂↑η (a, x)) ↔\n    HasFiniteIntegral fun x => ∫ (y : γ), ‖f (x, y)‖ ∂↑η (a, x)\n[PROOFSTEP]\napply hasFiniteIntegral_congr\n[GOAL]\ncase h₂.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nh1f : AEStronglyMeasurable f (↑(κ ⊗ₖ η) a)\n⊢ (fun x => ∫ (y : γ), ‖AEStronglyMeasurable.mk f h1f (x, y)‖ ∂↑η (a, x)) =ᵐ[↑κ a] fun x =>\n    ∫ (y : γ), ‖f (x, y)‖ ∂↑η (a, x)\n[PROOFSTEP]\nfilter_upwards [ae_ae_of_ae_compProd h1f.ae_eq_mk.symm] with _ hx using integral_congr_ae (EventuallyEq.fun_comp hx _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝² : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝¹ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝ : IsSFiniteKernel η\na : α\nf : β × γ → E\nhf : AEStronglyMeasurable f (↑(κ ⊗ₖ η) a)\n⊢ Integrable f ↔ (∀ᵐ (x : β) ∂↑κ a, Integrable fun y => f (x, y)) ∧ Integrable fun x => ∫ (y : γ), ‖f (x, y)‖ ∂↑η (a, x)\n[PROOFSTEP]\nsimp only [Integrable, hasFiniteIntegral_compProd_iff' hf, hf.norm.integral_kernel_compProd, hf, hf.compProd_mk_left,\n  eventually_and, true_and_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nF : E → E'\nhf : Integrable f\nhg : Integrable g\n⊢ ∫ (x : β), F (∫ (y : γ), f (x, y) + g (x, y) ∂↑η (a, x)) ∂↑κ a =\n    ∫ (x : β), F (∫ (y : γ), f (x, y) ∂↑η (a, x) + ∫ (y : γ), g (x, y) ∂↑η (a, x)) ∂↑κ a\n[PROOFSTEP]\nrefine' integral_congr_ae _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nF : E → E'\nhf : Integrable f\nhg : Integrable g\n⊢ (fun x => F (∫ (y : γ), f (x, y) + g (x, y) ∂↑η (a, x))) =ᵐ[↑κ a] fun x =>\n    F (∫ (y : γ), f (x, y) ∂↑η (a, x) + ∫ (y : γ), g (x, y) ∂↑η (a, x))\n[PROOFSTEP]\nfilter_upwards [hf.compProd_mk_left_ae, hg.compProd_mk_left_ae] with _ h2f h2g\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nF : E → E'\nhf : Integrable f\nhg : Integrable g\na✝ : β\nh2f : Integrable fun y => f (a✝, y)\nh2g : Integrable fun y => g (a✝, y)\n⊢ F (∫ (y : γ), f (a✝, y) + g (a✝, y) ∂↑η (a, a✝)) =\n    F (∫ (y : γ), f (a✝, y) ∂↑η (a, a✝) + ∫ (y : γ), g (a✝, y) ∂↑η (a, a✝))\n[PROOFSTEP]\nsimp [integral_add h2f h2g]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nF : E → E'\nhf : Integrable f\nhg : Integrable g\n⊢ ∫ (x : β), F (∫ (y : γ), f (x, y) - g (x, y) ∂↑η (a, x)) ∂↑κ a =\n    ∫ (x : β), F (∫ (y : γ), f (x, y) ∂↑η (a, x) - ∫ (y : γ), g (x, y) ∂↑η (a, x)) ∂↑κ a\n[PROOFSTEP]\nrefine' integral_congr_ae _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nF : E → E'\nhf : Integrable f\nhg : Integrable g\n⊢ (fun x => F (∫ (y : γ), f (x, y) - g (x, y) ∂↑η (a, x))) =ᵐ[↑κ a] fun x =>\n    F (∫ (y : γ), f (x, y) ∂↑η (a, x) - ∫ (y : γ), g (x, y) ∂↑η (a, x))\n[PROOFSTEP]\nfilter_upwards [hf.compProd_mk_left_ae, hg.compProd_mk_left_ae] with _ h2f h2g\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nF : E → E'\nhf : Integrable f\nhg : Integrable g\na✝ : β\nh2f : Integrable fun y => f (a✝, y)\nh2g : Integrable fun y => g (a✝, y)\n⊢ F (∫ (y : γ), f (a✝, y) - g (a✝, y) ∂↑η (a, a✝)) =\n    F (∫ (y : γ), f (a✝, y) ∂↑η (a, a✝) - ∫ (y : γ), g (a✝, y) ∂↑η (a, a✝))\n[PROOFSTEP]\nsimp [integral_sub h2f h2g]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nF : E → ℝ≥0∞\nhf : Integrable f\nhg : Integrable g\n⊢ ∫⁻ (x : β), F (∫ (y : γ), f (x, y) - g (x, y) ∂↑η (a, x)) ∂↑κ a =\n    ∫⁻ (x : β), F (∫ (y : γ), f (x, y) ∂↑η (a, x) - ∫ (y : γ), g (x, y) ∂↑η (a, x)) ∂↑κ a\n[PROOFSTEP]\nrefine' lintegral_congr_ae _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nF : E → ℝ≥0∞\nhf : Integrable f\nhg : Integrable g\n⊢ (fun x => F (∫ (y : γ), f (x, y) - g (x, y) ∂↑η (a, x))) =ᵐ[↑κ a] fun x =>\n    F (∫ (y : γ), f (x, y) ∂↑η (a, x) - ∫ (y : γ), g (x, y) ∂↑η (a, x))\n[PROOFSTEP]\nfilter_upwards [hf.compProd_mk_left_ae, hg.compProd_mk_left_ae] with _ h2f h2g\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nF : E → ℝ≥0∞\nhf : Integrable f\nhg : Integrable g\na✝ : β\nh2f : Integrable fun y => f (a✝, y)\nh2g : Integrable fun y => g (a✝, y)\n⊢ F (∫ (y : γ), f (a✝, y) - g (a✝, y) ∂↑η (a, a✝)) =\n    F (∫ (y : γ), f (a✝, y) ∂↑η (a, a✝) - ∫ (y : γ), g (a✝, y) ∂↑η (a, a✝))\n[PROOFSTEP]\nsimp [integral_sub h2f h2g]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\n⊢ Continuous fun f => ∫ (x : β), ∫ (y : γ), ↑↑f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nrw [continuous_iff_continuousAt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\n⊢ ∀ (x : { x // x ∈ Lp E 1 }), ContinuousAt (fun f => ∫ (x : β), ∫ (y : γ), ↑↑f (x, y) ∂↑η (a, x) ∂↑κ a) x\n[PROOFSTEP]\nintro g\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\n⊢ ContinuousAt (fun f => ∫ (x : β), ∫ (y : γ), ↑↑f (x, y) ∂↑η (a, x) ∂↑κ a) g\n[PROOFSTEP]\nrefine'\n  tendsto_integral_of_L1 _ (L1.integrable_coeFn g).integral_compProd\n    (eventually_of_forall fun h => (L1.integrable_coeFn h).integral_compProd) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\n⊢ Tendsto (fun i => ∫⁻ (x : β), ↑‖∫ (y : γ), ↑↑i (x, y) ∂↑η (a, x) - ∫ (y : γ), ↑↑g (x, y) ∂↑η (a, x)‖₊ ∂↑κ a) (𝓝 g)\n    (𝓝 0)\n[PROOFSTEP]\nsimp_rw [← kernel.lintegral_fn_integral_sub (fun x => (‖x‖₊ : ℝ≥0∞)) (L1.integrable_coeFn _) (L1.integrable_coeFn g)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\n⊢ Tendsto (fun i => ∫⁻ (x : β), ↑‖∫ (y : γ), ↑↑i (x, y) - ↑↑g (x, y) ∂↑η (a, x)‖₊ ∂↑κ a) (𝓝 g) (𝓝 0)\n[PROOFSTEP]\nrefine' tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds _ (fun i => zero_le _) _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\n⊢ { x // x ∈ Lp E 1 } → ℝ≥0∞\n[PROOFSTEP]\nexact fun i => ∫⁻ x, ∫⁻ y, ‖i (x, y) - g (x, y)‖₊ ∂η (a, x) ∂κ a\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\n⊢ Tendsto (fun i => ∫⁻ (x : β), ∫⁻ (y : γ), ↑‖↑↑i (x, y) - ↑↑g (x, y)‖₊ ∂↑η (a, x) ∂↑κ a) (𝓝 g) (𝓝 0)\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\n⊢ (fun i => ∫⁻ (x : β), ↑‖∫ (y : γ), ↑↑i (x, y) - ↑↑g (x, y) ∂↑η (a, x)‖₊ ∂↑κ a) ≤ fun i =>\n    ∫⁻ (x : β), ∫⁻ (y : γ), ↑‖↑↑i (x, y) - ↑↑g (x, y)‖₊ ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\n⊢ (fun i => ∫⁻ (x : β), ↑‖∫ (y : γ), ↑↑i (x, y) - ↑↑g (x, y) ∂↑η (a, x)‖₊ ∂↑κ a) ≤ fun i =>\n    ∫⁻ (x : β), ∫⁻ (y : γ), ↑‖↑↑i (x, y) - ↑↑g (x, y)‖₊ ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nexact fun i => lintegral_mono fun x => ennnorm_integral_le_lintegral_ennnorm _\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\n⊢ Tendsto (fun i => ∫⁻ (x : β), ∫⁻ (y : γ), ↑‖↑↑i (x, y) - ↑↑g (x, y)‖₊ ∂↑η (a, x) ∂↑κ a) (𝓝 g) (𝓝 0)\n[PROOFSTEP]\nshow Tendsto (fun i : β × γ →₁[(κ ⊗ₖ η) a] E => ∫⁻ x, ∫⁻ y : γ, ‖i (x, y) - g (x, y)‖₊ ∂η (a, x) ∂κ a) (𝓝 g) (𝓝 0)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\n⊢ Tendsto (fun i => ∫⁻ (x : β), ∫⁻ (y : γ), ↑‖↑↑i (x, y) - ↑↑g (x, y)‖₊ ∂↑η (a, x) ∂↑κ a) (𝓝 g) (𝓝 0)\n[PROOFSTEP]\nhave :\n  ∀ i : (MeasureTheory.Lp (α := β × γ) E 1 (((κ ⊗ₖ η) a) : Measure (β × γ))),\n    Measurable fun z => (‖i z - g z‖₊ : ℝ≥0∞) :=\n  fun i => ((Lp.stronglyMeasurable i).sub (Lp.stronglyMeasurable g)).ennnorm\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\nthis : ∀ (i : { x // x ∈ Lp E 1 }), Measurable fun z => ↑‖↑↑i z - ↑↑g z‖₊\n⊢ Tendsto (fun i => ∫⁻ (x : β), ∫⁻ (y : γ), ↑‖↑↑i (x, y) - ↑↑g (x, y)‖₊ ∂↑η (a, x) ∂↑κ a) (𝓝 g) (𝓝 0)\n[PROOFSTEP]\nsimp_rw [← kernel.lintegral_compProd _ _ _ (this _), ← L1.ofReal_norm_sub_eq_lintegral, ← ofReal_zero]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\nthis : ∀ (i : { x // x ∈ Lp E 1 }), Measurable fun z => ↑‖↑↑i z - ↑↑g z‖₊\n⊢ Tendsto (fun i => ENNReal.ofReal ‖i - g‖) (𝓝 g) (𝓝 (ENNReal.ofReal 0))\n[PROOFSTEP]\nrefine' (continuous_ofReal.tendsto 0).comp _\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\nthis : ∀ (i : { x // x ∈ Lp E 1 }), Measurable fun z => ↑‖↑↑i z - ↑↑g z‖₊\n⊢ Tendsto (fun i => ‖i - g‖) (𝓝 g) (𝓝 0)\n[PROOFSTEP]\nrw [← tendsto_iff_norm_tendsto_zero]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\ng : { x // x ∈ Lp E 1 }\nthis : ∀ (i : { x // x ∈ Lp E 1 }), Measurable fun z => ↑‖↑↑i z - ↑↑g z‖₊\n⊢ Tendsto (fun i => i) (𝓝 g) (𝓝 g)\n[PROOFSTEP]\nexact tendsto_id\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\n⊢ ∀ {f : β × γ → E}, Integrable f → ∫ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\napply Integrable.induction\n[GOAL]\ncase h_ind\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\n⊢ ∀ (c : E) ⦃s : Set (β × γ)⦄,\n    MeasurableSet s →\n      ↑↑(↑(κ ⊗ₖ η) a) s < ⊤ →\n        ∫ (z : β × γ), indicator s (fun x => c) z ∂↑(κ ⊗ₖ η) a =\n          ∫ (x : β), ∫ (y : γ), indicator s (fun x => c) (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nintro c s hs h2s\n[GOAL]\ncase h_ind\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nc : E\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s < ⊤\n⊢ ∫ (z : β × γ), indicator s (fun x => c) z ∂↑(κ ⊗ₖ η) a =\n    ∫ (x : β), ∫ (y : γ), indicator s (fun x => c) (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp, integral_indicator (measurable_prod_mk_left hs),\n  MeasureTheory.set_integral_const, integral_smul_const]\n[GOAL]\ncase h_ind\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nc : E\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s < ⊤\n⊢ ENNReal.toReal (↑↑(↑(κ ⊗ₖ η) a) s) • c = (∫ (x : β), ENNReal.toReal (↑↑(↑η (a, x)) (Prod.mk x ⁻¹' s)) ∂↑κ a) • c\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h_ind.e_a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nc : E\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s < ⊤\n⊢ ENNReal.toReal (↑↑(↑(κ ⊗ₖ η) a) s) = ∫ (x : β), ENNReal.toReal (↑↑(↑η (a, x)) (Prod.mk x ⁻¹' s)) ∂↑κ a\n[PROOFSTEP]\nrw [integral_toReal]\n[GOAL]\ncase h_ind.e_a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nc : E\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s < ⊤\n⊢ ENNReal.toReal (↑↑(↑(κ ⊗ₖ η) a) s) = ENNReal.toReal (∫⁻ (a_1 : β), ↑↑(↑η (a, a_1)) (Prod.mk a_1 ⁻¹' s) ∂↑κ a)\ncase h_ind.e_a.hfm\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nc : E\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s < ⊤\n⊢ AEMeasurable fun x => ↑↑(↑η (a, x)) (Prod.mk x ⁻¹' s)\ncase h_ind.e_a.hf\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nc : E\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s < ⊤\n⊢ ∀ᵐ (x : β) ∂↑κ a, ↑↑(↑η (a, x)) (Prod.mk x ⁻¹' s) < ⊤\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase h_ind.e_a.hfm\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nc : E\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s < ⊤\n⊢ AEMeasurable fun x => ↑↑(↑η (a, x)) (Prod.mk x ⁻¹' s)\n[PROOFSTEP]\nexact (kernel.measurable_kernel_prod_mk_left' hs _).aemeasurable\n[GOAL]\ncase h_ind.e_a.hf\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nc : E\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s < ⊤\n⊢ ∀ᵐ (x : β) ∂↑κ a, ↑↑(↑η (a, x)) (Prod.mk x ⁻¹' s) < ⊤\n[PROOFSTEP]\nexact ae_kernel_lt_top a h2s.ne\n[GOAL]\ncase h_ind.e_a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nc : E\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s < ⊤\n⊢ ENNReal.toReal (↑↑(↑(κ ⊗ₖ η) a) s) = ENNReal.toReal (∫⁻ (a_1 : β), ↑↑(↑η (a, a_1)) (Prod.mk a_1 ⁻¹' s) ∂↑κ a)\n[PROOFSTEP]\nrw [kernel.compProd_apply _ _ _ hs]\n[GOAL]\ncase h_ind.e_a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nc : E\ns : Set (β × γ)\nhs : MeasurableSet s\nh2s : ↑↑(↑(κ ⊗ₖ η) a) s < ⊤\n⊢ ENNReal.toReal (∫⁻ (b : β), ↑↑(↑η (a, b)) {c | (b, c) ∈ s} ∂↑κ a) =\n    ENNReal.toReal (∫⁻ (a_1 : β), ↑↑(↑η (a, a_1)) (Prod.mk a_1 ⁻¹' s) ∂↑κ a)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_add\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\n⊢ ∀ ⦃f g : β × γ → E⦄,\n    Disjoint (support f) (support g) →\n      Integrable f →\n        Integrable g →\n          ∫ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a →\n            ∫ (z : β × γ), g z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), g (x, y) ∂↑η (a, x) ∂↑κ a →\n              ∫ (z : β × γ), (f + g) z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), (f + g) (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nintro f g _ i_f i_g hf hg\n[GOAL]\ncase h_add\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\na✝ : Disjoint (support f) (support g)\ni_f : Integrable f\ni_g : Integrable g\nhf : ∫ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\nhg : ∫ (z : β × γ), g z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), g (x, y) ∂↑η (a, x) ∂↑κ a\n⊢ ∫ (z : β × γ), (f + g) z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), (f + g) (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [integral_add' i_f i_g, kernel.integral_integral_add' i_f i_g, hf, hg]\n[GOAL]\ncase h_closed\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\n⊢ IsClosed {f | ∫ (z : β × γ), ↑↑f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), ↑↑f (x, y) ∂↑η (a, x) ∂↑κ a}\n[PROOFSTEP]\nexact isClosed_eq continuous_integral kernel.continuous_integral_integral\n[GOAL]\ncase h_ae\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\n⊢ ∀ ⦃f g : β × γ → E⦄,\n    f =ᵐ[↑(κ ⊗ₖ η) a] g →\n      Integrable f →\n        ∫ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a →\n          ∫ (z : β × γ), g z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), g (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nintro f g hfg _ hf\n[GOAL]\ncase h_ae\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nhfg : f =ᵐ[↑(κ ⊗ₖ η) a] g\na✝ : Integrable f\nhf : ∫ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\n⊢ ∫ (z : β × γ), g z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), g (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nconvert hf using 1\n[GOAL]\ncase h.e'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nhfg : f =ᵐ[↑(κ ⊗ₖ η) a] g\na✝ : Integrable f\nhf : ∫ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\n⊢ ∫ (z : β × γ), g z ∂↑(κ ⊗ₖ η) a = ∫ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a\n[PROOFSTEP]\nexact integral_congr_ae hfg.symm\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nhfg : f =ᵐ[↑(κ ⊗ₖ η) a] g\na✝ : Integrable f\nhf : ∫ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\n⊢ ∫ (x : β), ∫ (y : γ), g (x, y) ∂↑η (a, x) ∂↑κ a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nrefine' integral_congr_ae _\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nhfg : f =ᵐ[↑(κ ⊗ₖ η) a] g\na✝ : Integrable f\nhf : ∫ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\n⊢ (fun x => ∫ (y : γ), g (x, y) ∂↑η (a, x)) =ᵐ[↑κ a] fun x => ∫ (y : γ), f (x, y) ∂↑η (a, x)\n[PROOFSTEP]\nrefine' (ae_ae_of_ae_compProd hfg).mp (eventually_of_forall _)\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf g : β × γ → E\nhfg : f =ᵐ[↑(κ ⊗ₖ η) a] g\na✝ : Integrable f\nhf : ∫ (z : β × γ), f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\n⊢ ∀ (x : β),\n    (∀ᵐ (c : γ) ∂↑η (a, x), f (x, c) = g (x, c)) →\n      (fun x => ∫ (y : γ), g (x, y) ∂↑η (a, x)) x = (fun x => ∫ (y : γ), f (x, y) ∂↑η (a, x)) x\n[PROOFSTEP]\nexact fun x hfgx => integral_congr_ae (ae_eq_symm hfgx)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf : β × γ → E\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\nhf : IntegrableOn f (s ×ˢ t)\n⊢ ∫ (z : β × γ) in s ×ˢ t, f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β) in s, ∫ (y : γ) in t, f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nrw [← kernel.restrict_apply (κ ⊗ₖ η) (hs.prod ht), ← compProd_restrict hs ht, integral_compProd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf : β × γ → E\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\nhf : IntegrableOn f (s ×ˢ t)\n⊢ ∫ (x : β), ∫ (y : γ), f (x, y) ∂↑(kernel.restrict η ht) (a, x) ∂↑(kernel.restrict κ hs) a =\n    ∫ (x : β) in s, ∫ (y : γ) in t, f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [kernel.restrict_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf : β × γ → E\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\nhf : IntegrableOn f (s ×ˢ t)\n⊢ Integrable fun z => f z\n[PROOFSTEP]\nrw [compProd_restrict, kernel.restrict_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf : β × γ → E\ns : Set β\nt : Set γ\nhs : MeasurableSet s\nht : MeasurableSet t\nhf : IntegrableOn f (s ×ˢ t)\n⊢ Integrable fun z => f z\n[PROOFSTEP]\nexact hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf : β × γ → E\ns : Set β\nhs : MeasurableSet s\nhf : IntegrableOn f (s ×ˢ univ)\n⊢ ∫ (z : β × γ) in s ×ˢ univ, f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β) in s, ∫ (y : γ), f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [set_integral_compProd hs MeasurableSet.univ hf, Measure.restrict_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nE : Type u_4\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\ninst✝⁷ : NormedAddCommGroup E\nκ : { x // x ∈ kernel α β }\ninst✝⁶ : IsSFiniteKernel κ\nη : { x // x ∈ kernel (α × β) γ }\ninst✝⁵ : IsSFiniteKernel η\na : α\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace E\nE' : Type u_5\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : CompleteSpace E'\ninst✝ : NormedSpace ℝ E'\nf : β × γ → E\nt : Set γ\nht : MeasurableSet t\nhf : IntegrableOn f (univ ×ˢ t)\n⊢ ∫ (z : β × γ) in univ ×ˢ t, f z ∂↑(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ) in t, f (x, y) ∂↑η (a, x) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [set_integral_compProd MeasurableSet.univ ht hf, Measure.restrict_univ]\n", "meta": {"mathlib_filename": "Mathlib.Probability.Kernel.IntegralCompProd", "llama_tokens": 33300, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6893056167854461, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.37953674970687845}}
{"text": "[GOAL]\nα : Type u\n⊢ CommRing (FreeCommRing α)\n[PROOFSTEP]\ndelta FreeCommRing\n[GOAL]\nα : Type u\n⊢ CommRing (FreeAbelianGroup (Multiplicative (Multiset α)))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\n⊢ Inhabited (FreeCommRing α)\n[PROOFSTEP]\ndelta FreeCommRing\n[GOAL]\nα : Type u\n⊢ Inhabited (FreeAbelianGroup (Multiplicative (Multiset α)))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\na : α\nm : Multiset α\n⊢ FreeAbelianGroup.of (↑Multiplicative.ofAdd (a ::ₘ m)) = of a * FreeAbelianGroup.of (↑Multiplicative.ofAdd m)\n[PROOFSTEP]\ndsimp [FreeCommRing]\n[GOAL]\nα : Type u\na : α\nm : Multiset α\n⊢ FreeAbelianGroup.of (↑Multiplicative.ofAdd (a ::ₘ m)) = of a * FreeAbelianGroup.of (↑Multiplicative.ofAdd m)\n[PROOFSTEP]\nrw [← Multiset.singleton_add, ofAdd_add, of, FreeAbelianGroup.of_mul_of]\n[GOAL]\nα : Type u\nC : FreeCommRing α → Prop\nz : FreeCommRing α\nhn1 : C (-1)\nhb : ∀ (b : α), C (of b)\nha : ∀ (x y : FreeCommRing α), C x → C y → C (x + y)\nhm : ∀ (x y : FreeCommRing α), C x → C y → C (x * y)\nhn : ∀ (x : FreeCommRing α), C x → C (-x)\nh1 : C 1\nm✝ : Multiplicative (Multiset α)\na : α\nm : Multiset α\nih : C (FreeAbelianGroup.of m)\n⊢ C (FreeAbelianGroup.of (a ::ₘ m))\n[PROOFSTEP]\nconvert hm (of a) _ (hb a) ih\n[GOAL]\ncase h.e'_1\nα : Type u\nC : FreeCommRing α → Prop\nz : FreeCommRing α\nhn1 : C (-1)\nhb : ∀ (b : α), C (of b)\nha : ∀ (x y : FreeCommRing α), C x → C y → C (x + y)\nhm : ∀ (x y : FreeCommRing α), C x → C y → C (x * y)\nhn : ∀ (x : FreeCommRing α), C x → C (-x)\nh1 : C 1\nm✝ : Multiplicative (Multiset α)\na : α\nm : Multiset α\nih : C (FreeAbelianGroup.of m)\n⊢ FreeAbelianGroup.of (a ::ₘ m) = of a * FreeAbelianGroup.of m\n[PROOFSTEP]\napply of_cons\n[GOAL]\nα : Type u\nR : Type v\ninst✝ : CommRing R\nf✝ f : α → R\nx y : Multiplicative (Multiset α)\n⊢ OneHom.toFun\n      { toFun := fun s => Multiset.prod (Multiset.map f (↑Multiplicative.toAdd s)),\n        map_one' :=\n          (_ :\n            (fun s => Multiset.prod (Multiset.map f (↑Multiplicative.toAdd s))) 1 =\n              (fun s => Multiset.prod (Multiset.map f (↑Multiplicative.toAdd s))) 1) }\n      (x * y) =\n    Multiset.prod (Multiset.map f x + Multiset.map f y)\n[PROOFSTEP]\nrw [← Multiset.map_add]\n[GOAL]\nα : Type u\nR : Type v\ninst✝ : CommRing R\nf✝ f : α → R\nx y : Multiplicative (Multiset α)\n⊢ OneHom.toFun\n      { toFun := fun s => Multiset.prod (Multiset.map f (↑Multiplicative.toAdd s)),\n        map_one' :=\n          (_ :\n            (fun s => Multiset.prod (Multiset.map f (↑Multiplicative.toAdd s))) 1 =\n              (fun s => Multiset.prod (Multiset.map f (↑Multiplicative.toAdd s))) 1) }\n      (x * y) =\n    Multiset.prod (Multiset.map f (x + y))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nR : Type v\ninst✝ : CommRing R\nf✝ f : α → R\nx : α\n⊢ Multiset.prod (Multiset.map f {x}) = f x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nR : Type v\ninst✝ : CommRing R\nf : α → R\nF : Multiplicative (Multiset α) →* R\nx : Multiplicative (Multiset α)\nF' : (fun x => Multiset α →+ Additive R) F := ↑MonoidHom.toAdditive'' F\nx' : (fun x => Multiset α) x := ↑Multiplicative.toAdd x\n⊢ Multiset.sum (Multiset.map (fun a => ↑F' {a}) x') = ↑F' x'\n[PROOFSTEP]\nerw [← Multiset.map_map (fun x => F' x) (fun x => { x }), ← AddMonoidHom.map_multiset_sum]\n[GOAL]\nα : Type u\nR : Type v\ninst✝ : CommRing R\nf : α → R\nF : Multiplicative (Multiset α) →* R\nx : Multiplicative (Multiset α)\nF' : (fun x => Multiset α →+ Additive R) F := ↑MonoidHom.toAdditive'' F\nx' : (fun x => Multiset α) x := ↑Multiplicative.toAdd x\n⊢ ↑F' (Multiset.sum (Multiset.map (fun x => {x}) x')) = ↑F' x'\n[PROOFSTEP]\nexact F.congr_arg (Multiset.sum_map_singleton x')\n[GOAL]\nα : Type u\nR : Type v\ninst✝ : CommRing R\nf✝ : α → R\nf : FreeCommRing α →+* R\nx : FreeCommRing α\n⊢ ↑(↑lift (↑f ∘ of)) (-1) = ↑f (-1)\n[PROOFSTEP]\nrw [RingHom.map_neg, RingHom.map_one, f.map_neg, f.map_one]\n[GOAL]\nα : Type u\nR : Type v\ninst✝ : CommRing R\nf✝ : α → R\nf : FreeCommRing α →+* R\nx✝ x y : FreeCommRing α\nihx : ↑(↑lift (↑f ∘ of)) x = ↑f x\nihy : ↑(↑lift (↑f ∘ of)) y = ↑f y\n⊢ ↑(↑lift (↑f ∘ of)) (x + y) = ↑f (x + y)\n[PROOFSTEP]\nrw [RingHom.map_add, f.map_add, ihx, ihy]\n[GOAL]\nα : Type u\nR : Type v\ninst✝ : CommRing R\nf✝ : α → R\nf : FreeCommRing α →+* R\nx✝ x y : FreeCommRing α\nihx : ↑(↑lift (↑f ∘ of)) x = ↑f x\nihy : ↑(↑lift (↑f ∘ of)) y = ↑f y\n⊢ ↑(↑lift (↑f ∘ of)) (x * y) = ↑f (x * y)\n[PROOFSTEP]\nrw [RingHom.map_mul, f.map_mul, ihx, ihy]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nx y : FreeCommRing α\ns✝ t : Set α\ni✝ : ℤ\ns : Set α\ni : ℕ\nhi : IsSupported (↑↑i) s\n⊢ IsSupported (↑(↑i + 1)) s\n[PROOFSTEP]\nrw [Int.cast_add, Int.cast_one]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nx y : FreeCommRing α\ns✝ t : Set α\ni✝ : ℤ\ns : Set α\ni : ℕ\nhi : IsSupported (↑↑i) s\n⊢ IsSupported (↑↑i + 1) s\n[PROOFSTEP]\nexact isSupported_add hi isSupported_one\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nx y : FreeCommRing α\ns✝ t : Set α\ni✝ : ℤ\ns : Set α\ni : ℕ\nhi : IsSupported (↑(-↑i)) s\n⊢ IsSupported (↑(-↑i - 1)) s\n[PROOFSTEP]\nrw [Int.cast_sub, Int.cast_one]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nx y : FreeCommRing α\ns✝ t : Set α\ni✝ : ℤ\ns : Set α\ni : ℕ\nhi : IsSupported (↑(-↑i)) s\n⊢ IsSupported (↑(-↑i) - 1) s\n[PROOFSTEP]\nexact isSupported_sub hi isSupported_one\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\n⊢ p ∈ s\n[PROOFSTEP]\nhaveI := Classical.decPred s\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\n⊢ p ∈ s\n[PROOFSTEP]\nhave : ∀ x, IsSupported x s → ∃ n : ℤ, lift (fun a => if a ∈ s then (0 : ℤ[X]) else Polynomial.X) x = n :=\n  by\n  intro x hx\n  refine' Subring.InClosure.recOn hx _ _ _ _\n  · use 1\n    rw [RingHom.map_one]\n    norm_cast\n  · use-1\n    rw [RingHom.map_neg, RingHom.map_one, Int.cast_neg, Int.cast_one]\n  · rintro _ ⟨z, hzs, rfl⟩ _ _\n    use 0\n    rw [RingHom.map_mul, lift_of, if_pos hzs, zero_mul]\n    norm_cast\n  · rintro x y ⟨q, hq⟩ ⟨r, hr⟩\n    refine' ⟨q + r, _⟩\n    rw [RingHom.map_add, hq, hr]\n    norm_cast\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\n⊢ ∀ (x : FreeCommRing α), IsSupported x s → ∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) x = ↑n\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx : FreeCommRing α\nhx : IsSupported x s\n⊢ ∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) x = ↑n\n[PROOFSTEP]\nrefine' Subring.InClosure.recOn hx _ _ _ _\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx : FreeCommRing α\nhx : IsSupported x s\n⊢ ∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) 1 = ↑n\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx : FreeCommRing α\nhx : IsSupported x s\n⊢ ↑(↑lift fun a => if a ∈ s then 0 else X) 1 = ↑1\n[PROOFSTEP]\nrw [RingHom.map_one]\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx : FreeCommRing α\nhx : IsSupported x s\n⊢ 1 = ↑1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx : FreeCommRing α\nhx : IsSupported x s\n⊢ ∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) (-1) = ↑n\n[PROOFSTEP]\nuse-1\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx : FreeCommRing α\nhx : IsSupported x s\n⊢ ↑(↑lift fun a => if a ∈ s then 0 else X) (-1) = ↑(-1)\n[PROOFSTEP]\nrw [RingHom.map_neg, RingHom.map_one, Int.cast_neg, Int.cast_one]\n[GOAL]\ncase refine'_3\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx : FreeCommRing α\nhx : IsSupported x s\n⊢ ∀ (z : FreeCommRing α),\n    z ∈ of '' s →\n      ∀ (n : FreeCommRing α),\n        (∃ n_1, ↑(↑lift fun a => if a ∈ s then 0 else X) n = ↑n_1) →\n          ∃ n_1, ↑(↑lift fun a => if a ∈ s then 0 else X) (z * n) = ↑n_1\n[PROOFSTEP]\nrintro _ ⟨z, hzs, rfl⟩ _ _\n[GOAL]\ncase refine'_3.intro.intro\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx : FreeCommRing α\nhx : IsSupported x s\nz : α\nhzs : z ∈ s\nn✝ : FreeCommRing α\na✝ : ∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) n✝ = ↑n\n⊢ ∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) (of z * n✝) = ↑n\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx : FreeCommRing α\nhx : IsSupported x s\nz : α\nhzs : z ∈ s\nn✝ : FreeCommRing α\na✝ : ∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) n✝ = ↑n\n⊢ ↑(↑lift fun a => if a ∈ s then 0 else X) (of z * n✝) = ↑0\n[PROOFSTEP]\nrw [RingHom.map_mul, lift_of, if_pos hzs, zero_mul]\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx : FreeCommRing α\nhx : IsSupported x s\nz : α\nhzs : z ∈ s\nn✝ : FreeCommRing α\na✝ : ∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) n✝ = ↑n\n⊢ 0 = ↑0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase refine'_4\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx : FreeCommRing α\nhx : IsSupported x s\n⊢ ∀ {x y : FreeCommRing α},\n    (∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) x = ↑n) →\n      (∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) y = ↑n) →\n        ∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) (x + y) = ↑n\n[PROOFSTEP]\nrintro x y ⟨q, hq⟩ ⟨r, hr⟩\n[GOAL]\ncase refine'_4.intro.intro\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx✝ : FreeCommRing α\nhx : IsSupported x✝ s\nx y : FreeCommRing α\nq : ℤ\nhq : ↑(↑lift fun a => if a ∈ s then 0 else X) x = ↑q\nr : ℤ\nhr : ↑(↑lift fun a => if a ∈ s then 0 else X) y = ↑r\n⊢ ∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) (x + y) = ↑n\n[PROOFSTEP]\nrefine' ⟨q + r, _⟩\n[GOAL]\ncase refine'_4.intro.intro\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx✝ : FreeCommRing α\nhx : IsSupported x✝ s\nx y : FreeCommRing α\nq : ℤ\nhq : ↑(↑lift fun a => if a ∈ s then 0 else X) x = ↑q\nr : ℤ\nhr : ↑(↑lift fun a => if a ∈ s then 0 else X) y = ↑r\n⊢ ↑(↑lift fun a => if a ∈ s then 0 else X) (x + y) = ↑(q + r)\n[PROOFSTEP]\nrw [RingHom.map_add, hq, hr]\n[GOAL]\ncase refine'_4.intro.intro\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nx✝ : FreeCommRing α\nhx : IsSupported x✝ s\nx y : FreeCommRing α\nq : ℤ\nhq : ↑(↑lift fun a => if a ∈ s then 0 else X) x = ↑q\nr : ℤ\nhr : ↑(↑lift fun a => if a ∈ s then 0 else X) y = ↑r\n⊢ ↑q + ↑r = ↑(q + r)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis✝ : DecidablePred s\nthis : ∀ (x : FreeCommRing α), IsSupported x s → ∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) x = ↑n\n⊢ p ∈ s\n[PROOFSTEP]\nspecialize this (of p) hps\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis✝ : DecidablePred s\nthis : ∃ n, ↑(↑lift fun a => if a ∈ s then 0 else X) (of p) = ↑n\n⊢ p ∈ s\n[PROOFSTEP]\nrw [lift_of] at this \n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis✝ : DecidablePred s\nthis : ∃ n, (if p ∈ s then 0 else X) = ↑n\n⊢ p ∈ s\n[PROOFSTEP]\nsplit_ifs at this  with h\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis✝ : DecidablePred s\nh : p ∈ s\nthis : ∃ n, 0 = ↑n\n⊢ p ∈ s\n[PROOFSTEP]\nexact h\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis✝ : DecidablePred s\nh : ¬p ∈ s\nthis : ∃ n, X = ↑n\n⊢ p ∈ s\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase neg.h\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis✝ : DecidablePred s\nh : ¬p ∈ s\nthis : ∃ n, X = ↑n\n⊢ False\n[PROOFSTEP]\napply Ne.symm Int.zero_ne_one\n[GOAL]\ncase neg.h\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis✝ : DecidablePred s\nh : ¬p ∈ s\nthis : ∃ n, X = ↑n\n⊢ 1 = 0\n[PROOFSTEP]\nrcases this with ⟨w, H⟩\n[GOAL]\ncase neg.h.intro\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nh : ¬p ∈ s\nw : ℤ\nH : X = ↑w\n⊢ 1 = 0\n[PROOFSTEP]\nrw [← Polynomial.C_eq_int_cast] at H \n[GOAL]\ncase neg.h.intro\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nh : ¬p ∈ s\nw : ℤ\nH : X = ↑C ↑w\n⊢ 1 = 0\n[PROOFSTEP]\nhave : Polynomial.X.coeff 1 = (Polynomial.C ↑w).coeff 1 := by rw [H]; rfl\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nh : ¬p ∈ s\nw : ℤ\nH : X = ↑C ↑w\n⊢ coeff X 1 = coeff (↑C w) 1\n[PROOFSTEP]\nrw [H]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis : DecidablePred s\nh : ¬p ∈ s\nw : ℤ\nH : X = ↑C ↑w\n⊢ coeff (↑C ↑w) 1 = coeff (↑C w) 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg.h.intro\nα : Type u\nβ : Type v\nf : α → β\np : α\ns : Set α\nhps : IsSupported (of p) s\nthis✝ : DecidablePred s\nh : ¬p ∈ s\nw : ℤ\nH : X = ↑C ↑w\nthis : coeff X 1 = coeff (↑C w) 1\n⊢ 1 = 0\n[PROOFSTEP]\nrwa [Polynomial.coeff_C, if_neg (one_ne_zero : 1 ≠ 0), Polynomial.coeff_X, if_pos rfl] at this \n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nx : FreeCommRing α\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nhxs : IsSupported x s\n⊢ ↑(map Subtype.val) (↑(restriction s) x) = x\n[PROOFSTEP]\nrefine' Subring.InClosure.recOn hxs _ _ _ _\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nf : α → β\nx : FreeCommRing α\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nhxs : IsSupported x s\n⊢ ↑(map Subtype.val) (↑(restriction s) 1) = 1\n[PROOFSTEP]\nrw [RingHom.map_one]\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nf : α → β\nx : FreeCommRing α\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nhxs : IsSupported x s\n⊢ ↑(map Subtype.val) 1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nf : α → β\nx : FreeCommRing α\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nhxs : IsSupported x s\n⊢ ↑(map Subtype.val) (↑(restriction s) (-1)) = -1\n[PROOFSTEP]\nrw [map_neg, map_one]\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nf : α → β\nx : FreeCommRing α\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nhxs : IsSupported x s\n⊢ ↑(map Subtype.val) (-1) = -1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3\nα : Type u\nβ : Type v\nf : α → β\nx : FreeCommRing α\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nhxs : IsSupported x s\n⊢ ∀ (z : FreeCommRing α),\n    z ∈ of '' s →\n      ∀ (n : FreeCommRing α),\n        ↑(map Subtype.val) (↑(restriction s) n) = n → ↑(map Subtype.val) (↑(restriction s) (z * n)) = z * n\n[PROOFSTEP]\nrintro _ ⟨p, hps, rfl⟩ n ih\n[GOAL]\ncase refine'_3.intro.intro\nα : Type u\nβ : Type v\nf : α → β\nx : FreeCommRing α\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nhxs : IsSupported x s\np : α\nhps : p ∈ s\nn : FreeCommRing α\nih : ↑(map Subtype.val) (↑(restriction s) n) = n\n⊢ ↑(map Subtype.val) (↑(restriction s) (of p * n)) = of p * n\n[PROOFSTEP]\nrw [RingHom.map_mul, restriction_of, dif_pos hps, RingHom.map_mul, map_of, ih]\n[GOAL]\ncase refine'_4\nα : Type u\nβ : Type v\nf : α → β\nx : FreeCommRing α\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nhxs : IsSupported x s\n⊢ ∀ {x y : FreeCommRing α},\n    ↑(map Subtype.val) (↑(restriction s) x) = x →\n      ↑(map Subtype.val) (↑(restriction s) y) = y → ↑(map Subtype.val) (↑(restriction s) (x + y)) = x + y\n[PROOFSTEP]\nintro x y ihx ihy\n[GOAL]\ncase refine'_4\nα : Type u\nβ : Type v\nf : α → β\nx✝ : FreeCommRing α\ns : Set α\ninst✝ : DecidablePred fun x => x ∈ s\nhxs : IsSupported x✝ s\nx y : FreeCommRing α\nihx : ↑(map Subtype.val) (↑(restriction s) x) = x\nihy : ↑(map Subtype.val) (↑(restriction s) y) = y\n⊢ ↑(map Subtype.val) (↑(restriction s) (x + y)) = x + y\n[PROOFSTEP]\nrw [RingHom.map_add, RingHom.map_add, ihx, ihy]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nx : FreeCommRing α\ns : Set α\nhfs : Set.Finite s\nhxs : IsSupported x s\n⊢ IsSupported x ↑(Set.Finite.toFinset hfs)\n[PROOFSTEP]\nrwa [Set.Finite.coe_toFinset]\n[GOAL]\nα : Type u\nx : FreeRing α\n⊢ ↑(-x) = -↑x\n[PROOFSTEP]\nrw [castFreeCommRing, map_neg]\n[GOAL]\nα : Type u\nx y : FreeRing α\n⊢ ↑(x - y) = ↑x - ↑y\n[PROOFSTEP]\nrw [castFreeCommRing, map_sub]\n[GOAL]\nα : Type u\nx : FreeCommRing α\n⊢ ∃ a, ↑a = x\n[PROOFSTEP]\ninduction x using FreeCommRing.induction_on with\n| hn1 =>\n  use-1\n  rfl\n| hb b => exact ⟨FreeRing.of b, rfl⟩\n| ha _ _ hx hy =>\n  rcases hx with ⟨x, rfl⟩; rcases hy with ⟨y, rfl⟩\n  exact ⟨x + y, (FreeRing.lift _).map_add _ _⟩\n| hm _ _ hx hy =>\n  rcases hx with ⟨x, rfl⟩; rcases hy with ⟨y, rfl⟩\n  exact ⟨x * y, (FreeRing.lift _).map_mul _ _⟩\n[GOAL]\nα : Type u\nx : FreeCommRing α\n⊢ ∃ a, ↑a = x\n[PROOFSTEP]\ninduction x using FreeCommRing.induction_on with\n| hn1 =>\n  use-1\n  rfl\n| hb b => exact ⟨FreeRing.of b, rfl⟩\n| ha _ _ hx hy =>\n  rcases hx with ⟨x, rfl⟩; rcases hy with ⟨y, rfl⟩\n  exact ⟨x + y, (FreeRing.lift _).map_add _ _⟩\n| hm _ _ hx hy =>\n  rcases hx with ⟨x, rfl⟩; rcases hy with ⟨y, rfl⟩\n  exact ⟨x * y, (FreeRing.lift _).map_mul _ _⟩\n[GOAL]\ncase hn1\nα : Type u\n⊢ ∃ a, ↑a = -1\n[PROOFSTEP]\n\n| hn1 =>\n  use-1\n  rfl\n[GOAL]\ncase hn1\nα : Type u\n⊢ ∃ a, ↑a = -1\n[PROOFSTEP]\nuse-1\n[GOAL]\ncase h\nα : Type u\n⊢ ↑(-1) = -1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hb\nα : Type u\nb : α\n⊢ ∃ a, ↑a = FreeCommRing.of b\n[PROOFSTEP]\n\n| hb b => exact ⟨FreeRing.of b, rfl⟩\n[GOAL]\ncase hb\nα : Type u\nb : α\n⊢ ∃ a, ↑a = FreeCommRing.of b\n[PROOFSTEP]\nexact ⟨FreeRing.of b, rfl⟩\n[GOAL]\ncase ha\nα : Type u\nx✝ y✝ : FreeCommRing α\nhx : ∃ a, ↑a = x✝\nhy : ∃ a, ↑a = y✝\n⊢ ∃ a, ↑a = x✝ + y✝\n[PROOFSTEP]\n\n| ha _ _ hx hy =>\n  rcases hx with ⟨x, rfl⟩; rcases hy with ⟨y, rfl⟩\n  exact ⟨x + y, (FreeRing.lift _).map_add _ _⟩\n[GOAL]\ncase ha\nα : Type u\nx✝ y✝ : FreeCommRing α\nhx : ∃ a, ↑a = x✝\nhy : ∃ a, ↑a = y✝\n⊢ ∃ a, ↑a = x✝ + y✝\n[PROOFSTEP]\nrcases hx with ⟨x, rfl⟩\n[GOAL]\ncase ha.intro\nα : Type u\ny✝ : FreeCommRing α\nhy : ∃ a, ↑a = y✝\nx : FreeRing α\n⊢ ∃ a, ↑a = ↑x + y✝\n[PROOFSTEP]\nrcases hy with ⟨y, rfl⟩\n[GOAL]\ncase ha.intro.intro\nα : Type u\nx y : FreeRing α\n⊢ ∃ a, ↑a = ↑x + ↑y\n[PROOFSTEP]\nexact ⟨x + y, (FreeRing.lift _).map_add _ _⟩\n[GOAL]\ncase hm\nα : Type u\nx✝ y✝ : FreeCommRing α\nhx : ∃ a, ↑a = x✝\nhy : ∃ a, ↑a = y✝\n⊢ ∃ a, ↑a = x✝ * y✝\n[PROOFSTEP]\n\n| hm _ _ hx hy =>\n  rcases hx with ⟨x, rfl⟩; rcases hy with ⟨y, rfl⟩\n  exact ⟨x * y, (FreeRing.lift _).map_mul _ _⟩\n[GOAL]\ncase hm\nα : Type u\nx✝ y✝ : FreeCommRing α\nhx : ∃ a, ↑a = x✝\nhy : ∃ a, ↑a = y✝\n⊢ ∃ a, ↑a = x✝ * y✝\n[PROOFSTEP]\nrcases hx with ⟨x, rfl⟩\n[GOAL]\ncase hm.intro\nα : Type u\ny✝ : FreeCommRing α\nhy : ∃ a, ↑a = y✝\nx : FreeRing α\n⊢ ∃ a, ↑a = ↑x * y✝\n[PROOFSTEP]\nrcases hy with ⟨y, rfl⟩\n[GOAL]\ncase hm.intro.intro\nα : Type u\nx y : FreeRing α\n⊢ ∃ a, ↑a = ↑x * ↑y\n[PROOFSTEP]\nexact ⟨x * y, (FreeRing.lift _).map_mul _ _⟩\n[GOAL]\nα : Type u\n⊢ castFreeCommRing = Functor.map fun l => ↑l\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nα : Type u\nx : FreeRing α\n⊢ ↑x = (fun l => ↑l) <$> x\n[PROOFSTEP]\nerw [castFreeCommRing, toFreeCommRing, FreeRing.lift, Equiv.coe_trans, Function.comp,\n  FreeAbelianGroup.liftMonoid_coe (FreeMonoid.lift FreeCommRing.of)]\n[GOAL]\ncase h\nα : Type u\nx : FreeRing α\n⊢ ↑(↑FreeAbelianGroup.lift ↑(↑FreeMonoid.lift FreeCommRing.of)) x = (fun l => ↑l) <$> x\n[PROOFSTEP]\ndsimp [Functor.map]\n[GOAL]\ncase h\nα : Type u\nx : FreeRing α\n⊢ ↑(↑FreeAbelianGroup.lift ↑(↑FreeMonoid.lift FreeCommRing.of)) x =\n    ↑(↑FreeAbelianGroup.lift ((fun α_1 => FreeAbelianGroup.of α_1) ∘ fun l => ↑l)) x\n[PROOFSTEP]\nrw [← AddMonoidHom.coe_coe]\n[GOAL]\ncase h\nα : Type u\nx : FreeRing α\n⊢ ↑↑(↑FreeAbelianGroup.lift ↑(↑FreeMonoid.lift FreeCommRing.of)) x =\n    ↑(↑FreeAbelianGroup.lift ((fun α_1 => FreeAbelianGroup.of α_1) ∘ fun l => ↑l)) x\n[PROOFSTEP]\napply FreeAbelianGroup.lift.unique\n[GOAL]\ncase h.hg\nα : Type u\nx : FreeRing α\n⊢ ∀ (x : FreeMonoid α),\n    ↑↑(↑FreeAbelianGroup.lift ↑(↑FreeMonoid.lift FreeCommRing.of)) (FreeAbelianGroup.of x) =\n      ((fun α_1 => FreeAbelianGroup.of α_1) ∘ fun l => ↑l) x\n[PROOFSTEP]\nintro L\n[GOAL]\ncase h.hg\nα : Type u\nx : FreeRing α\nL : FreeMonoid α\n⊢ ↑↑(↑FreeAbelianGroup.lift ↑(↑FreeMonoid.lift FreeCommRing.of)) (FreeAbelianGroup.of L) =\n    ((fun α_1 => FreeAbelianGroup.of α_1) ∘ fun l => ↑l) L\n[PROOFSTEP]\nerw [FreeAbelianGroup.lift.of, Function.comp]\n[GOAL]\ncase h.hg\nα : Type u\nx : FreeRing α\nL : FreeMonoid α\n⊢ ↑(↑FreeMonoid.lift FreeCommRing.of) L = FreeAbelianGroup.of ↑L\n[PROOFSTEP]\nexact\n  FreeMonoid.recOn L rfl fun hd tl ih =>\n    by\n    rw [(FreeMonoid.lift _).map_mul, FreeMonoid.lift_eval_of, ih]\n    conv_lhs => reduce\n[GOAL]\nα : Type u\nx : FreeRing α\nL : FreeMonoid α\nhd : α\ntl : FreeMonoid α\nih : ↑(↑FreeMonoid.lift FreeCommRing.of) tl = FreeAbelianGroup.of ↑tl\n⊢ ↑(↑FreeMonoid.lift FreeCommRing.of) (FreeMonoid.of hd * tl) = FreeAbelianGroup.of ↑(FreeMonoid.of hd * tl)\n[PROOFSTEP]\nrw [(FreeMonoid.lift _).map_mul, FreeMonoid.lift_eval_of, ih]\n[GOAL]\nα : Type u\nx : FreeRing α\nL : FreeMonoid α\nhd : α\ntl : FreeMonoid α\nih : ↑(↑FreeMonoid.lift FreeCommRing.of) tl = FreeAbelianGroup.of ↑tl\n⊢ FreeCommRing.of hd * FreeAbelianGroup.of ↑tl = FreeAbelianGroup.of ↑(FreeMonoid.of hd * tl)\n[PROOFSTEP]\nconv_lhs => reduce\n[GOAL]\nα : Type u\nx : FreeRing α\nL : FreeMonoid α\nhd : α\ntl : FreeMonoid α\nih : ↑(↑FreeMonoid.lift FreeCommRing.of) tl = FreeAbelianGroup.of ↑tl\n| FreeCommRing.of hd * FreeAbelianGroup.of ↑tl\n[PROOFSTEP]\nreduce\n[GOAL]\nα : Type u\nx : FreeRing α\nL : FreeMonoid α\nhd : α\ntl : FreeMonoid α\nih : ↑(↑FreeMonoid.lift FreeCommRing.of) tl = FreeAbelianGroup.of ↑tl\n| FreeCommRing.of hd * FreeAbelianGroup.of ↑tl\n[PROOFSTEP]\nreduce\n[GOAL]\nα : Type u\nx : FreeRing α\nL : FreeMonoid α\nhd : α\ntl : FreeMonoid α\nih : ↑(↑FreeMonoid.lift FreeCommRing.of) tl = FreeAbelianGroup.of ↑tl\n| FreeCommRing.of hd * FreeAbelianGroup.of ↑tl\n[PROOFSTEP]\nreduce\n[GOAL]\nα : Type u\ninst✝ : Subsingleton α\n⊢ Bijective ↑(coeRingHom α)\n[PROOFSTEP]\nhave :\n  (coeRingHom _ : FreeRing α → FreeCommRing α) = Functor.mapEquiv FreeAbelianGroup (Multiset.subsingletonEquiv α) :=\n  coe_eq α\n[GOAL]\nα : Type u\ninst✝ : Subsingleton α\nthis : ↑(coeRingHom α) = ↑(Functor.mapEquiv FreeAbelianGroup (Multiset.subsingletonEquiv α))\n⊢ Bijective ↑(coeRingHom α)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u\ninst✝ : Subsingleton α\nthis : ↑(coeRingHom α) = ↑(Functor.mapEquiv FreeAbelianGroup (Multiset.subsingletonEquiv α))\n⊢ Bijective ↑(Functor.mapEquiv FreeAbelianGroup (Multiset.subsingletonEquiv α))\n[PROOFSTEP]\napply Equiv.bijective\n[GOAL]\nα : Type u\ninst✝ : Subsingleton α\nsrc✝ : Ring (FreeRing α) := inferInstanceAs (Ring (FreeRing α))\nx y : FreeRing α\n⊢ x * y = y * x\n[PROOFSTEP]\nrw [← (subsingletonEquivFreeCommRing α).symm_apply_apply (y * x), (subsingletonEquivFreeCommRing α).map_mul, mul_comm, ←\n  (subsingletonEquivFreeCommRing α).map_mul, (subsingletonEquivFreeCommRing α).symm_apply_apply]\n[GOAL]\nα : Type u\n⊢ RingHom.comp ↑(MvPolynomial.eval₂Hom (Int.castRingHom (FreeCommRing α)) FreeCommRing.of)\n      ↑(↑FreeCommRing.lift fun a => MvPolynomial.X a) =\n    RingHom.id (FreeCommRing α)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u\nx✝ : α\n⊢ ↑(RingHom.comp ↑(MvPolynomial.eval₂Hom (Int.castRingHom (FreeCommRing α)) FreeCommRing.of)\n          ↑(↑FreeCommRing.lift fun a => MvPolynomial.X a))\n      (FreeCommRing.of x✝) =\n    ↑(RingHom.id (FreeCommRing α)) (FreeCommRing.of x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\n⊢ RingHom.comp ↑(↑FreeCommRing.lift fun a => MvPolynomial.X a)\n      ↑(MvPolynomial.eval₂Hom (Int.castRingHom (FreeCommRing α)) FreeCommRing.of) =\n    RingHom.id (MvPolynomial α ℤ)\n[PROOFSTEP]\next\n[GOAL]\ncase hC.a.a\nα : Type u\nx✝ : ℤ\nm✝ : α →₀ ℕ\n⊢ MvPolynomial.coeff m✝\n      (↑(RingHom.comp\n            (RingHom.comp ↑(↑FreeCommRing.lift fun a => MvPolynomial.X a)\n              ↑(MvPolynomial.eval₂Hom (Int.castRingHom (FreeCommRing α)) FreeCommRing.of))\n            MvPolynomial.C)\n        x✝) =\n    MvPolynomial.coeff m✝ (↑(RingHom.comp (RingHom.id (MvPolynomial α ℤ)) MvPolynomial.C) x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hX.a\nα : Type u\ni✝ : α\nm✝ : α →₀ ℕ\n⊢ MvPolynomial.coeff m✝\n      (↑(RingHom.comp ↑(↑FreeCommRing.lift fun a => MvPolynomial.X a)\n            ↑(MvPolynomial.eval₂Hom (Int.castRingHom (FreeCommRing α)) FreeCommRing.of))\n        (MvPolynomial.X i✝)) =\n    MvPolynomial.coeff m✝ (↑(RingHom.id (MvPolynomial α ℤ)) (MvPolynomial.X i✝))\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.FreeCommRing", "llama_tokens": 12082, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.709019146082187, "lm_q2_score": 0.5350984286266116, "lm_q1q2_score": 0.37939503093476024}}
{"text": "[GOAL]\nk : Type u\ninst✝¹ : Field k\nG : Type u\ninst✝ : Monoid G\nV : FdRep k G\ng h : G\n⊢ character V (h * g) = character V (g * h)\n[PROOFSTEP]\nsimp only [trace_mul_comm, character, map_mul]\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nG : Type u\ninst✝ : Monoid G\nV : FdRep k G\n⊢ character V 1 = ↑(finrank k (CoeSort.coe V))\n[PROOFSTEP]\nsimp only [character, map_one, trace_one]\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nG : Type u\ninst✝ : Monoid G\nV W : FdRep k G\n⊢ character (V ⊗ W) = character V * character W\n[PROOFSTEP]\next g\n[GOAL]\ncase h\nk : Type u\ninst✝¹ : Field k\nG : Type u\ninst✝ : Monoid G\nV W : FdRep k G\ng : G\n⊢ character (V ⊗ W) g = (character V * character W) g\n[PROOFSTEP]\nconvert trace_tensorProduct' (V.ρ g) (W.ρ g)\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nG : Type u\ninst✝ : Monoid G\nV W : FdRep k G\n⊢ character\n      (Action.FunctorCategoryEquivalence.inverse.obj\n        (Action.FunctorCategoryEquivalence.functor.obj V ⊗ Action.FunctorCategoryEquivalence.functor.obj W)) =\n    character V * character W\n[PROOFSTEP]\nsimp [← char_tensor]\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nG : Type u\ninst✝ : Monoid G\nV W : FdRep k G\ni : V ≅ W\n⊢ character V = character W\n[PROOFSTEP]\next g\n[GOAL]\ncase h\nk : Type u\ninst✝¹ : Field k\nG : Type u\ninst✝ : Monoid G\nV W : FdRep k G\ni : V ≅ W\ng : G\n⊢ character V g = character W g\n[PROOFSTEP]\nsimp only [character, FdRep.Iso.conj_ρ i]\n[GOAL]\ncase h\nk : Type u\ninst✝¹ : Field k\nG : Type u\ninst✝ : Monoid G\nV W : FdRep k G\ni : V ≅ W\ng : G\n⊢ ↑(trace k (CoeSort.coe V)) (↑(ρ V) g) =\n    ↑(trace k (CoeSort.coe W)) (↑(LinearEquiv.conj (isoToLinearEquiv i)) (↑(ρ V) g))\n[PROOFSTEP]\nexact (trace_conj' (V.ρ g) _).symm\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nG : Type u\ninst✝ : Group G\nV : FdRep k G\ng h : G\n⊢ character V (h * g * h⁻¹) = character V g\n[PROOFSTEP]\nrw [char_mul_comm, inv_mul_cancel_left]\n[GOAL]\nk : Type u\ninst✝¹ : Field k\nG : Type u\ninst✝ : Group G\nV W : FdRep k G\ng : G\n⊢ character (of (linHom (ρ V) (ρ W))) g = character V g⁻¹ * character W g\n[PROOFSTEP]\nrw [← char_iso (dualTensorIsoLinHom _ _), char_tensor, Pi.mul_apply, char_dual]\n[GOAL]\nk : Type u\ninst✝³ : Field k\nG : Type u\ninst✝² : Group G\ninst✝¹ : Fintype G\ninst✝ : Invertible ↑(Fintype.card G)\nV : FdRep k G\n⊢ ⅟↑(Fintype.card G) • ∑ g : G, character V g = ↑(finrank k { x // x ∈ invariants (ρ V) })\n[PROOFSTEP]\nerw [← (isProj_averageMap V.ρ).trace]\n  -- Porting note: Changed `rw` to `erw`\n[GOAL]\nk : Type u\ninst✝³ : Field k\nG : Type u\ninst✝² : Group G\ninst✝¹ : Fintype G\ninst✝ : Invertible ↑(Fintype.card G)\nV : FdRep k G\n⊢ ⅟↑(Fintype.card G) • ∑ g : G, character V g = ↑(trace k (CoeSort.coe V)) (averageMap (ρ V))\n[PROOFSTEP]\nsimp [character, GroupAlgebra.average, _root_.map_sum]\n[GOAL]\nk : Type u\ninst✝⁵ : Field k\nG : GroupCat\ninst✝⁴ : IsAlgClosed k\ninst✝³ : Fintype ↑G\ninst✝² : Invertible ↑(Fintype.card ↑G)\nV W : FdRep k ↑G\ninst✝¹ : Simple V\ninst✝ : Simple W\n⊢ ⅟↑(Fintype.card ↑G) • ∑ g : ↑G, character V g * character W g⁻¹ = if Nonempty (V ≅ W) then 1 else 0\n[PROOFSTEP]\nconv_lhs =>\n  enter [2, 2, g]\n  rw [mul_comm, ← char_dual, ← Pi.mul_apply, ← char_tensor]\n  rw [char_iso (FdRep.dualTensorIsoLinHom W.ρ V)]\n    -- The average over the group of the character of a representation equals the dimension of the\n      -- space of invariants.\n[GOAL]\nk : Type u\ninst✝⁵ : Field k\nG : GroupCat\ninst✝⁴ : IsAlgClosed k\ninst✝³ : Fintype ↑G\ninst✝² : Invertible ↑(Fintype.card ↑G)\nV W : FdRep k ↑G\ninst✝¹ : Simple V\ninst✝ : Simple W\n| ⅟↑(Fintype.card ↑G) • ∑ g : ↑G, character V g * character W g⁻¹\n[PROOFSTEP]\n  enter [2, 2, g]\n  rw [mul_comm, ← char_dual, ← Pi.mul_apply, ← char_tensor]\n  rw [char_iso (FdRep.dualTensorIsoLinHom W.ρ V)]\n    -- The average over the group of the character of a representation equals the dimension of the\n      -- space of invariants.\n[GOAL]\nk : Type u\ninst✝⁵ : Field k\nG : GroupCat\ninst✝⁴ : IsAlgClosed k\ninst✝³ : Fintype ↑G\ninst✝² : Invertible ↑(Fintype.card ↑G)\nV W : FdRep k ↑G\ninst✝¹ : Simple V\ninst✝ : Simple W\n| ⅟↑(Fintype.card ↑G) • ∑ g : ↑G, character V g * character W g⁻¹\n[PROOFSTEP]\n  enter [2, 2, g]\n  rw [mul_comm, ← char_dual, ← Pi.mul_apply, ← char_tensor]\n  rw [char_iso (FdRep.dualTensorIsoLinHom W.ρ V)]\n    -- The average over the group of the character of a representation equals the dimension of the\n      -- space of invariants.\n[GOAL]\nk : Type u\ninst✝⁵ : Field k\nG : GroupCat\ninst✝⁴ : IsAlgClosed k\ninst✝³ : Fintype ↑G\ninst✝² : Invertible ↑(Fintype.card ↑G)\nV W : FdRep k ↑G\ninst✝¹ : Simple V\ninst✝ : Simple W\n| ⅟↑(Fintype.card ↑G) • ∑ g : ↑G, character V g * character W g⁻¹\n[PROOFSTEP]\nenter [2, 2, g]\n[GOAL]\ncase h\nk : Type u\ninst✝⁵ : Field k\nG : GroupCat\ninst✝⁴ : IsAlgClosed k\ninst✝³ : Fintype ↑G\ninst✝² : Invertible ↑(Fintype.card ↑G)\nV W : FdRep k ↑G\ninst✝¹ : Simple V\ninst✝ : Simple W\ng : ↑G\n| character V g * character W g⁻¹\n[PROOFSTEP]\nrw [mul_comm, ← char_dual, ← Pi.mul_apply, ← char_tensor]\n[GOAL]\ncase h\nk : Type u\ninst✝⁵ : Field k\nG : GroupCat\ninst✝⁴ : IsAlgClosed k\ninst✝³ : Fintype ↑G\ninst✝² : Invertible ↑(Fintype.card ↑G)\nV W : FdRep k ↑G\ninst✝¹ : Simple V\ninst✝ : Simple W\ng : ↑G\n| character (of (dual (ρ W)) ⊗ V) g\n[PROOFSTEP]\nrw [char_iso (FdRep.dualTensorIsoLinHom W.ρ V)]\n  -- The average over the group of the character of a representation equals the dimension of the\n    -- space of invariants.\n[GOAL]\nk : Type u\ninst✝⁵ : Field k\nG : GroupCat\ninst✝⁴ : IsAlgClosed k\ninst✝³ : Fintype ↑G\ninst✝² : Invertible ↑(Fintype.card ↑G)\nV W : FdRep k ↑G\ninst✝¹ : Simple V\ninst✝ : Simple W\n⊢ ⅟↑(Fintype.card ↑G) • ∑ g : ↑G, character (of (linHom (ρ W) (ρ V))) g = if Nonempty (V ≅ W) then 1 else 0\n[PROOFSTEP]\nrw [average_char_eq_finrank_invariants]\n[GOAL]\nk : Type u\ninst✝⁵ : Field k\nG : GroupCat\ninst✝⁴ : IsAlgClosed k\ninst✝³ : Fintype ↑G\ninst✝² : Invertible ↑(Fintype.card ↑G)\nV W : FdRep k ↑G\ninst✝¹ : Simple V\ninst✝ : Simple W\n⊢ ↑(finrank k { x // x ∈ invariants (ρ (of (linHom (ρ W) (ρ V)))) }) = if Nonempty (V ≅ W) then 1 else 0\n[PROOFSTEP]\nrw [show (of (linHom W.ρ V.ρ)).ρ = linHom W.ρ V.ρ from FdRep.of_ρ (linHom W.ρ V.ρ)]\n  -- The space of invariants of `Hom(W, V)` is the subspace of `G`-equivariant linear maps,\n    -- `Hom_G(W, V)`.\n[GOAL]\nk : Type u\ninst✝⁵ : Field k\nG : GroupCat\ninst✝⁴ : IsAlgClosed k\ninst✝³ : Fintype ↑G\ninst✝² : Invertible ↑(Fintype.card ↑G)\nV W : FdRep k ↑G\ninst✝¹ : Simple V\ninst✝ : Simple W\n⊢ ↑(finrank k { x // x ∈ invariants (linHom (ρ W) (ρ V)) }) = if Nonempty (V ≅ W) then 1 else 0\n[PROOFSTEP]\nerw [(linHom.invariantsEquivFdRepHom W V).finrank_eq]\n  -- Porting note: Changed `rw` to `erw`\n    -- By Schur's Lemma, the dimension of `Hom_G(W, V)` is `1` is `V ≅ W` and `0` otherwise.\n[GOAL]\nk : Type u\ninst✝⁵ : Field k\nG : GroupCat\ninst✝⁴ : IsAlgClosed k\ninst✝³ : Fintype ↑G\ninst✝² : Invertible ↑(Fintype.card ↑G)\nV W : FdRep k ↑G\ninst✝¹ : Simple V\ninst✝ : Simple W\n⊢ ↑(finrank k (W ⟶ V)) = if Nonempty (V ≅ W) then 1 else 0\n[PROOFSTEP]\nrw_mod_cast [finrank_hom_simple_simple W V, Iso.nonempty_iso_symm]\n", "meta": {"mathlib_filename": "Mathlib.RepresentationTheory.Character", "llama_tokens": 3304, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.679178699175393, "lm_q2_score": 0.5583269943353745, "lm_q1q2_score": 0.37920380172720664}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nr : ℝ\nhr : Tendsto (fun n => ∑ i in Finset.range n, |f i|) atTop (𝓝 r)\n⊢ Summable f\n[PROOFSTEP]\nrefine' summable_of_summable_norm ⟨r, (hasSum_iff_tendsto_nat_of_nonneg _ _).2 _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nr : ℝ\nhr : Tendsto (fun n => ∑ i in Finset.range n, |f i|) atTop (𝓝 r)\n⊢ ∀ (i : ℕ), 0 ≤ ‖f i‖\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nr : ℝ\nhr : Tendsto (fun n => ∑ i in Finset.range n, |f i|) atTop (𝓝 r)\n⊢ Tendsto (fun n => ∑ i in Finset.range n, ‖f i‖) atTop (𝓝 r)\n[PROOFSTEP]\nexact fun i ↦ norm_nonneg _\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nr : ℝ\nhr : Tendsto (fun n => ∑ i in Finset.range n, |f i|) atTop (𝓝 r)\n⊢ Tendsto (fun n => ∑ i in Finset.range n, ‖f i‖) atTop (𝓝 r)\n[PROOFSTEP]\nsimpa only using hr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝ : NormedField 𝕜\nm : ℤ\nhm : m < 0\n⊢ Tendsto (fun x => ‖x ^ m‖) (𝓝[{0}ᶜ] 0) atTop\n[PROOFSTEP]\nrcases neg_surjective m with ⟨m, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝ : NormedField 𝕜\nm : ℤ\nhm : -m < 0\n⊢ Tendsto (fun x => ‖x ^ (-m)‖) (𝓝[{0}ᶜ] 0) atTop\n[PROOFSTEP]\nrw [neg_lt_zero] at hm \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝ : NormedField 𝕜\nm : ℤ\nhm : 0 < m\n⊢ Tendsto (fun x => ‖x ^ (-m)‖) (𝓝[{0}ᶜ] 0) atTop\n[PROOFSTEP]\nlift m to ℕ using hm.le\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝ : NormedField 𝕜\nm : ℕ\nhm : 0 < ↑m\n⊢ Tendsto (fun x => ‖x ^ (-↑m)‖) (𝓝[{0}ᶜ] 0) atTop\n[PROOFSTEP]\nrw [Int.coe_nat_pos] at hm \n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝ : NormedField 𝕜\nm : ℕ\nhm : 0 < m\n⊢ Tendsto (fun x => ‖x ^ (-↑m)‖) (𝓝[{0}ᶜ] 0) atTop\n[PROOFSTEP]\nsimp only [norm_pow, zpow_neg, zpow_ofNat, ← inv_pow]\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝ : NormedField 𝕜\nm : ℕ\nhm : 0 < m\n⊢ Tendsto (fun x => ‖x⁻¹‖ ^ m) (𝓝[{0}ᶜ] 0) atTop\n[PROOFSTEP]\nexact (tendsto_pow_atTop hm.ne').comp NormedField.tendsto_norm_inverse_nhdsWithin_0_atTop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nι : Type u_4\n𝕜 : Type u_5\n𝔸 : Type u_6\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup 𝔸\ninst✝ : NormedSpace 𝕜 𝔸\nl : Filter ι\nε : ι → 𝕜\nf : ι → 𝔸\nhε : Tendsto ε l (𝓝 0)\nhf : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f)\n⊢ Tendsto (ε • f) l (𝓝 0)\n[PROOFSTEP]\nrw [← isLittleO_one_iff 𝕜] at hε ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nι : Type u_4\n𝕜 : Type u_5\n𝔸 : Type u_6\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup 𝔸\ninst✝ : NormedSpace 𝕜 𝔸\nl : Filter ι\nε : ι → 𝕜\nf : ι → 𝔸\nhε : ε =o[l] fun _x => 1\nhf : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f)\n⊢ (ε • f) =o[l] fun _x => 1\n[PROOFSTEP]\nsimpa using IsLittleO.smul_isBigO hε (hf.isBigO_const (one_ne_zero : (1 : 𝕜) ≠ 0))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝ : NontriviallyNormedField 𝕜\nm : ℤ\nx : 𝕜\n⊢ ContinuousAt (fun x => x ^ m) x ↔ x ≠ 0 ∨ 0 ≤ m\n[PROOFSTEP]\nrefine' ⟨_, continuousAt_zpow₀ _ _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝ : NontriviallyNormedField 𝕜\nm : ℤ\nx : 𝕜\n⊢ ContinuousAt (fun x => x ^ m) x → x ≠ 0 ∨ 0 ≤ m\n[PROOFSTEP]\ncontrapose!\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝ : NontriviallyNormedField 𝕜\nm : ℤ\nx : 𝕜\n⊢ x = 0 ∧ m < 0 → ¬ContinuousAt (fun x => x ^ m) x\n[PROOFSTEP]\nrintro ⟨rfl, hm⟩ hc\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝ : NontriviallyNormedField 𝕜\nm : ℤ\nhm : m < 0\nhc : ContinuousAt (fun x => x ^ m) 0\n⊢ False\n[PROOFSTEP]\nexact\n  not_tendsto_atTop_of_tendsto_nhds (hc.tendsto.mono_left nhdsWithin_le_nhds).norm\n    (tendsto_norm_zpow_nhdsWithin_0_atTop hm)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝ : NontriviallyNormedField 𝕜\nx : 𝕜\n⊢ ContinuousAt Inv.inv x ↔ x ≠ 0\n[PROOFSTEP]\nsimpa [(zero_lt_one' ℤ).not_le] using @continuousAt_zpow _ _ (-1) x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nr₁ r₂ : ℝ\nh : |r₁| < |r₂|\n⊢ (fun n => r₁ ^ n) =o[atTop] fun n => r₂ ^ n\n[PROOFSTEP]\nrefine' (IsLittleO.of_norm_left _).of_norm_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nr₁ r₂ : ℝ\nh : |r₁| < |r₂|\n⊢ (fun x => ‖r₁ ^ x‖) =o[atTop] fun x => ‖r₂ ^ x‖\n[PROOFSTEP]\nexact (isLittleO_pow_pow_of_lt_left (abs_nonneg r₁) h).congr (pow_abs r₁) (pow_abs r₂)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\nhave A : Ico 0 R ⊆ Ioo (-R) R := fun x hx ↦ ⟨(neg_lt_zero.2 (hx.1.trans_lt hx.2)).trans_le hx.1, hx.2⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\nhave B : Ioo 0 R ⊆ Ioo (-R) R := Subset.trans Ioo_subset_Ico_self A\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_have 1 → 3\n[GOAL]\ncase tfae_1_to_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\n⊢ (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\nexact fun ⟨a, ha, H⟩ ↦ ⟨a, ha, H.isBigO⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_have 2 → 1\n[GOAL]\ncase tfae_2_to_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n⊢ (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\nexact fun ⟨a, ha, H⟩ ↦ ⟨a, B ha, H⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_have 3 → 2\n[GOAL]\ncase tfae_3_to_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\n⊢ (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\n[PROOFSTEP]\nrintro ⟨a, ha, H⟩\n[GOAL]\ncase tfae_3_to_2.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\na : ℝ\nha : a ∈ Set.Ioo (-R) R\nH : f =O[atTop] fun x => a ^ x\n⊢ ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\n[PROOFSTEP]\nrcases exists_between (abs_lt.2 ha) with ⟨b, hab, hbR⟩\n[GOAL]\ncase tfae_3_to_2.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\na : ℝ\nha : a ∈ Set.Ioo (-R) R\nH : f =O[atTop] fun x => a ^ x\nb : ℝ\nhab : |a| < b\nhbR : b < R\n⊢ ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\n[PROOFSTEP]\nexact\n  ⟨b, ⟨(abs_nonneg a).trans_lt hab, hbR⟩,\n    H.trans_isLittleO (isLittleO_pow_pow_of_abs_lt_left (hab.trans_le (le_abs_self b)))⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_have 2 → 4\n[GOAL]\ncase tfae_2_to_4\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\n⊢ (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\nexact fun ⟨a, ha, H⟩ ↦ ⟨a, ha, H.isBigO⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_have 4 → 3\n[GOAL]\ncase tfae_4_to_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\n⊢ (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\nexact fun ⟨a, ha, H⟩ ↦\n  ⟨a, B ha, H⟩\n    -- Add 5 and 6 using 4 → 6 → 5 → 3\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_have 4 → 6\n[GOAL]\ncase tfae_4_to_6\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n⊢ (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\n[PROOFSTEP]\nrintro ⟨a, ha, H⟩\n[GOAL]\ncase tfae_4_to_6.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\na : ℝ\nha : a ∈ Set.Ioo 0 R\nH : f =O[atTop] fun x => a ^ x\n⊢ ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\n[PROOFSTEP]\nrcases bound_of_isBigO_nat_atTop H with ⟨C, hC₀, hC⟩\n[GOAL]\ncase tfae_4_to_6.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\na : ℝ\nha : a ∈ Set.Ioo 0 R\nH : f =O[atTop] fun x => a ^ x\nC : ℝ\nhC₀ : C > 0\nhC : ∀ ⦃x : ℕ⦄, a ^ x ≠ 0 → ‖f x‖ ≤ C * ‖a ^ x‖\n⊢ ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\n[PROOFSTEP]\nrefine' ⟨a, ha, C, hC₀, fun n ↦ _⟩\n[GOAL]\ncase tfae_4_to_6.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\na : ℝ\nha : a ∈ Set.Ioo 0 R\nH : f =O[atTop] fun x => a ^ x\nC : ℝ\nhC₀ : C > 0\nhC : ∀ ⦃x : ℕ⦄, a ^ x ≠ 0 → ‖f x‖ ≤ C * ‖a ^ x‖\nn : ℕ\n⊢ |f n| ≤ C * a ^ n\n[PROOFSTEP]\nsimpa only [Real.norm_eq_abs, abs_pow, abs_of_nonneg ha.1.le] using hC (pow_ne_zero n ha.1.ne')\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_have 6 → 5\n[GOAL]\ncase tfae_6_to_5\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\n⊢ (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\nexact fun ⟨a, ha, C, H₀, H⟩ ↦ ⟨a, ha.2, C, Or.inl H₀, H⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_have 5 → 3\n[GOAL]\ncase tfae_5_to_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\n⊢ (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n[PROOFSTEP]\nrintro ⟨a, ha, C, h₀, H⟩\n[GOAL]\ncase tfae_5_to_3.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\na : ℝ\nha : a < R\nC : ℝ\nh₀ : 0 < C ∨ 0 < R\nH : ∀ (n : ℕ), |f n| ≤ C * a ^ n\n⊢ ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n[PROOFSTEP]\nrcases sign_cases_of_C_mul_pow_nonneg fun n ↦ (abs_nonneg _).trans (H n) with (rfl | ⟨hC₀, ha₀⟩)\n[GOAL]\ncase tfae_5_to_3.intro.intro.intro.intro.inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\na : ℝ\nha : a < R\nh₀ : 0 < 0 ∨ 0 < R\nH : ∀ (n : ℕ), |f n| ≤ 0 * a ^ n\n⊢ ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n[PROOFSTEP]\nobtain rfl : f = 0 := by\n  ext n\n  simpa using H n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\na : ℝ\nha : a < R\nh₀ : 0 < 0 ∨ 0 < R\nH : ∀ (n : ℕ), |f n| ≤ 0 * a ^ n\n⊢ f = 0\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\na : ℝ\nha : a < R\nh₀ : 0 < 0 ∨ 0 < R\nH : ∀ (n : ℕ), |f n| ≤ 0 * a ^ n\nn : ℕ\n⊢ f n = OfNat.ofNat 0 n\n[PROOFSTEP]\nsimpa using H n\n[GOAL]\ncase tfae_5_to_3.intro.intro.intro.intro.inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\na : ℝ\nha : a < R\nh₀ : 0 < 0 ∨ 0 < R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ 0 =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ 0 =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ 0 =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ 0 =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ 0 =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ 0 =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ 0 =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ 0 =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ 0 =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ 0 =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ 0 =O[atTop] fun x => a ^ x) →\n    ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |OfNat.ofNat 0 n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |OfNat.ofNat 0 n| ≤ C * a ^ n) →\n    ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |OfNat.ofNat 0 n| ≤ C * a ^ n\nH : ∀ (n : ℕ), |OfNat.ofNat 0 n| ≤ 0 * a ^ n\n⊢ ∃ a, a ∈ Set.Ioo (-R) R ∧ 0 =O[atTop] fun x => a ^ x\n[PROOFSTEP]\nsimp only [lt_irrefl, false_or_iff] at h₀ \n[GOAL]\ncase tfae_5_to_3.intro.intro.intro.intro.inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\na : ℝ\nha : a < R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ 0 =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ 0 =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ 0 =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ 0 =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ 0 =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ 0 =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ 0 =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ 0 =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ 0 =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ 0 =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ 0 =O[atTop] fun x => a ^ x) →\n    ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |OfNat.ofNat 0 n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |OfNat.ofNat 0 n| ≤ C * a ^ n) →\n    ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |OfNat.ofNat 0 n| ≤ C * a ^ n\nH : ∀ (n : ℕ), |OfNat.ofNat 0 n| ≤ 0 * a ^ n\nh₀ : 0 < R\n⊢ ∃ a, a ∈ Set.Ioo (-R) R ∧ 0 =O[atTop] fun x => a ^ x\n[PROOFSTEP]\nexact ⟨0, ⟨neg_lt_zero.2 h₀, h₀⟩, isBigO_zero _ _⟩\n[GOAL]\ncase tfae_5_to_3.intro.intro.intro.intro.inr.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\na : ℝ\nha : a < R\nC : ℝ\nh₀ : 0 < C ∨ 0 < R\nH : ∀ (n : ℕ), |f n| ≤ C * a ^ n\nhC₀ : 0 < C\nha₀ : 0 ≤ a\n⊢ ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n[PROOFSTEP]\nexact\n  ⟨a, A ⟨ha₀, ha⟩, isBigO_of_le' _ fun n ↦ (H n).trans <| mul_le_mul_of_nonneg_left (le_abs_self _) hC₀.le⟩\n    -- Add 7 and 8 using 2 → 8 → 7 → 3\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_have 2 → 8\n[GOAL]\ncase tfae_2_to_8\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n⊢ (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\n[PROOFSTEP]\nrintro ⟨a, ha, H⟩\n[GOAL]\ncase tfae_2_to_8.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\na : ℝ\nha : a ∈ Set.Ioo 0 R\nH : f =o[atTop] fun x => a ^ x\n⊢ ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\n[PROOFSTEP]\nrefine' ⟨a, ha, (H.def zero_lt_one).mono fun n hn ↦ _⟩\n[GOAL]\ncase tfae_2_to_8.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\na : ℝ\nha : a ∈ Set.Ioo 0 R\nH : f =o[atTop] fun x => a ^ x\nn : ℕ\nhn : ‖f n‖ ≤ 1 * ‖a ^ n‖\n⊢ |f n| ≤ a ^ n\n[PROOFSTEP]\nrwa [Real.norm_eq_abs, Real.norm_eq_abs, one_mul, abs_pow, abs_of_pos ha.1] at hn \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_8 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_have 8 → 7\n[GOAL]\ncase tfae_8_to_7\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_8 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\n⊢ (∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_8 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\ntfae_8_to_7 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\nexact fun ⟨a, ha, H⟩ ↦ ⟨a, ha.2, H⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_8 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\ntfae_8_to_7 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_have 7 → 3\n[GOAL]\ncase tfae_7_to_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_8 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\ntfae_8_to_7 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\n⊢ (∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n[PROOFSTEP]\nrintro ⟨a, ha, H⟩\n[GOAL]\ncase tfae_7_to_3.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_8 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\ntfae_8_to_7 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\na : ℝ\nha : a < R\nH : ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\n⊢ ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n[PROOFSTEP]\nhave : 0 ≤ a := nonneg_of_eventually_pow_nonneg (H.mono fun n ↦ (abs_nonneg _).trans)\n[GOAL]\ncase tfae_7_to_3.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_8 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\ntfae_8_to_7 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\na : ℝ\nha : a < R\nH : ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\nthis : 0 ≤ a\n⊢ ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n[PROOFSTEP]\nrefine' ⟨a, A ⟨this, ha⟩, IsBigO.of_bound 1 _⟩\n[GOAL]\ncase tfae_7_to_3.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_8 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\ntfae_8_to_7 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\na : ℝ\nha : a < R\nH : ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\nthis : 0 ≤ a\n⊢ ∀ᶠ (x : ℕ) in atTop, ‖f x‖ ≤ 1 * ‖a ^ x‖\n[PROOFSTEP]\nsimpa only [Real.norm_eq_abs, one_mul, abs_pow, abs_of_nonneg this]\n  -- porting note: used to work without explicitly having 6 → 7\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_8 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\ntfae_8_to_7 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\ntfae_7_to_3 : (∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_have 6 → 7\n[GOAL]\ncase tfae_6_to_7\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_8 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\ntfae_8_to_7 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\ntfae_7_to_3 : (∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\n⊢ (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\n[PROOFSTEP]\nexact fun h ↦ tfae_8_to_7 <| tfae_2_to_8 <| tfae_3_to_2 <| tfae_5_to_3 <| tfae_6_to_5 h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nf : ℕ → ℝ\nR : ℝ\nA : Set.Ico 0 R ⊆ Set.Ioo (-R) R\nB : Set.Ioo 0 R ⊆ Set.Ioo (-R) R\ntfae_1_to_3 :\n  (∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_1 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x\ntfae_3_to_2 : (∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x\ntfae_2_to_4 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_3 : (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_4_to_6 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_6_to_5 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n\ntfae_5_to_3 : (∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_2_to_8 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x) → ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\ntfae_8_to_7 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\ntfae_7_to_3 : (∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n) → ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x\ntfae_6_to_7 :\n  (∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n) → ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n\n⊢ TFAE\n    [∃ a, a ∈ Set.Ioo (-R) R ∧ f =o[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =o[atTop] fun x => a ^ x,\n      ∃ a, a ∈ Set.Ioo (-R) R ∧ f =O[atTop] fun x => a ^ x, ∃ a, a ∈ Set.Ioo 0 R ∧ f =O[atTop] fun x => a ^ x,\n      ∃ a, a < R ∧ ∃ C x, ∀ (n : ℕ), |f n| ≤ C * a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |f n| ≤ C * a ^ n, ∃ a, a < R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n,\n      ∃ a, a ∈ Set.Ioo 0 R ∧ ∀ᶠ (n : ℕ) in atTop, |f n| ≤ a ^ n]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\n⊢ (fun n => ↑n ^ k) =o[atTop] fun n => r ^ n\n[PROOFSTEP]\nhave : Tendsto (fun x : ℝ ↦ x ^ k) (𝓝[>] 1) (𝓝 1) :=\n  ((continuous_id.pow k).tendsto' (1 : ℝ) 1 (one_pow _)).mono_left inf_le_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\n⊢ (fun n => ↑n ^ k) =o[atTop] fun n => r ^ n\n[PROOFSTEP]\nobtain ⟨r' : ℝ, hr' : r' ^ k < r, h1 : 1 < r'⟩ := ((this.eventually (gt_mem_nhds hr)).and self_mem_nhdsWithin).exists\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\n⊢ (fun n => ↑n ^ k) =o[atTop] fun n => r ^ n\n[PROOFSTEP]\nhave h0 : 0 ≤ r' := zero_le_one.trans h1.le\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\n⊢ (fun n => ↑n ^ k) =o[atTop] fun n => r ^ n\n[PROOFSTEP]\nsuffices : (fun n ↦ (n : R) ^ k : ℕ → R) =O[atTop] fun n : ℕ ↦ (r' ^ k) ^ n\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis✝ : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\nthis : (fun n => ↑n ^ k) =O[atTop] fun n => (r' ^ k) ^ n\n⊢ (fun n => ↑n ^ k) =o[atTop] fun n => r ^ n\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\n⊢ (fun n => ↑n ^ k) =O[atTop] fun n => (r' ^ k) ^ n\n[PROOFSTEP]\nexact this.trans_isLittleO (isLittleO_pow_pow_of_lt_left (pow_nonneg h0 _) hr')\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\n⊢ (fun n => ↑n ^ k) =O[atTop] fun n => (r' ^ k) ^ n\n[PROOFSTEP]\nconv in (r' ^ _) ^ _ => rw [← pow_mul, mul_comm, pow_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\nn : ℕ\n| (r' ^ k) ^ n\n[PROOFSTEP]\nrw [← pow_mul, mul_comm, pow_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\nn : ℕ\n| (r' ^ k) ^ n\n[PROOFSTEP]\nrw [← pow_mul, mul_comm, pow_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\nn : ℕ\n| (r' ^ k) ^ n\n[PROOFSTEP]\nrw [← pow_mul, mul_comm, pow_mul]\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\n⊢ (fun n => ↑n ^ k) =O[atTop] fun n => (r' ^ n) ^ k\n[PROOFSTEP]\nsuffices : ∀ n : ℕ, ‖(n : R)‖ ≤ (r' - 1)⁻¹ * ‖(1 : R)‖ * ‖r' ^ n‖\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis✝ : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\nthis : ∀ (n : ℕ), ‖↑n‖ ≤ (r' - 1)⁻¹ * ‖1‖ * ‖r' ^ n‖\n⊢ (fun n => ↑n ^ k) =O[atTop] fun n => (r' ^ n) ^ k\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\n⊢ ∀ (n : ℕ), ‖↑n‖ ≤ (r' - 1)⁻¹ * ‖1‖ * ‖r' ^ n‖\n[PROOFSTEP]\nexact (isBigO_of_le' _ this).pow _\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\n⊢ ∀ (n : ℕ), ‖↑n‖ ≤ (r' - 1)⁻¹ * ‖1‖ * ‖r' ^ n‖\n[PROOFSTEP]\nintro n\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\nn : ℕ\n⊢ ‖↑n‖ ≤ (r' - 1)⁻¹ * ‖1‖ * ‖r' ^ n‖\n[PROOFSTEP]\nrw [mul_right_comm]\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\nn : ℕ\n⊢ ‖↑n‖ ≤ (r' - 1)⁻¹ * ‖r' ^ n‖ * ‖1‖\n[PROOFSTEP]\nrefine' n.norm_cast_le.trans (mul_le_mul_of_nonneg_right _ (norm_nonneg _))\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : ℝ\nhr : 1 < r\nthis : Tendsto (fun x => x ^ k) (𝓝[Set.Ioi 1] 1) (𝓝 1)\nr' : ℝ\nhr' : r' ^ k < r\nh1 : 1 < r'\nh0 : 0 ≤ r'\nn : ℕ\n⊢ ↑n ≤ (r' - 1)⁻¹ * ‖r' ^ n‖\n[PROOFSTEP]\nsimpa [_root_.div_eq_inv_mul, Real.norm_eq_abs, abs_of_nonneg h0] using n.cast_le_pow_div_sub h1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nr : ℝ\nhr : 1 < r\n⊢ Nat.cast =o[atTop] fun n => r ^ n\n[PROOFSTEP]\nsimpa only [pow_one] using @isLittleO_pow_const_const_pow_of_one_lt R _ 1 _ hr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr₁ : R\nr₂ : ℝ\nh : ‖r₁‖ < r₂\n⊢ (fun n => ↑n ^ k * r₁ ^ n) =o[atTop] fun n => r₂ ^ n\n[PROOFSTEP]\nby_cases h0 : r₁ = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr₁ : R\nr₂ : ℝ\nh : ‖r₁‖ < r₂\nh0 : r₁ = 0\n⊢ (fun n => ↑n ^ k * r₁ ^ n) =o[atTop] fun n => r₂ ^ n\n[PROOFSTEP]\nrefine' (isLittleO_zero _ _).congr' (mem_atTop_sets.2 <| ⟨1, fun n hn ↦ _⟩) EventuallyEq.rfl\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr₁ : R\nr₂ : ℝ\nh : ‖r₁‖ < r₂\nh0 : r₁ = 0\nn : ℕ\nhn : n ≥ 1\n⊢ n ∈ {x | (fun x => (fun _x => 0) x = (fun n => ↑n ^ k * r₁ ^ n) x) x}\n[PROOFSTEP]\nsimp [zero_pow (zero_lt_one.trans_le hn), h0]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr₁ : R\nr₂ : ℝ\nh : ‖r₁‖ < r₂\nh0 : ¬r₁ = 0\n⊢ (fun n => ↑n ^ k * r₁ ^ n) =o[atTop] fun n => r₂ ^ n\n[PROOFSTEP]\nrw [← Ne.def, ← norm_pos_iff] at h0 \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr₁ : R\nr₂ : ℝ\nh : ‖r₁‖ < r₂\nh0 : 0 < ‖r₁‖\n⊢ (fun n => ↑n ^ k * r₁ ^ n) =o[atTop] fun n => r₂ ^ n\n[PROOFSTEP]\nhave A : (fun n ↦ (n : R) ^ k : ℕ → R) =o[atTop] fun n ↦ (r₂ / ‖r₁‖) ^ n :=\n  isLittleO_pow_const_const_pow_of_one_lt k ((one_lt_div h0).2 h)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr₁ : R\nr₂ : ℝ\nh : ‖r₁‖ < r₂\nh0 : 0 < ‖r₁‖\nA : (fun n => ↑n ^ k) =o[atTop] fun n => (r₂ / ‖r₁‖) ^ n\n⊢ (fun n => ↑n ^ k * r₁ ^ n) =o[atTop] fun n => r₂ ^ n\n[PROOFSTEP]\nsuffices (fun n ↦ r₁ ^ n) =O[atTop] fun n ↦ ‖r₁‖ ^ n by\n  simpa [div_mul_cancel _ (pow_pos h0 _).ne'] using A.mul_isBigO this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr₁ : R\nr₂ : ℝ\nh : ‖r₁‖ < r₂\nh0 : 0 < ‖r₁‖\nA : (fun n => ↑n ^ k) =o[atTop] fun n => (r₂ / ‖r₁‖) ^ n\nthis : (fun n => r₁ ^ n) =O[atTop] fun n => ‖r₁‖ ^ n\n⊢ (fun n => ↑n ^ k * r₁ ^ n) =o[atTop] fun n => r₂ ^ n\n[PROOFSTEP]\nsimpa [div_mul_cancel _ (pow_pos h0 _).ne'] using A.mul_isBigO this\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr₁ : R\nr₂ : ℝ\nh : ‖r₁‖ < r₂\nh0 : 0 < ‖r₁‖\nA : (fun n => ↑n ^ k) =o[atTop] fun n => (r₂ / ‖r₁‖) ^ n\n⊢ (fun n => r₁ ^ n) =O[atTop] fun n => ‖r₁‖ ^ n\n[PROOFSTEP]\nexact IsBigO.of_bound 1 (by simpa using eventually_norm_pow_le r₁)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr₁ : R\nr₂ : ℝ\nh : ‖r₁‖ < r₂\nh0 : 0 < ‖r₁‖\nA : (fun n => ↑n ^ k) =o[atTop] fun n => (r₂ / ‖r₁‖) ^ n\n⊢ ∀ᶠ (x : ℕ) in atTop, ‖r₁ ^ x‖ ≤ 1 * ‖‖r₁‖ ^ x‖\n[PROOFSTEP]\nsimpa using eventually_norm_pow_le r₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nk : ℕ\nr : ℝ\nhr : |r| < 1\n⊢ Tendsto (fun n => ↑n ^ k * r ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nby_cases h0 : r = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nk : ℕ\nr : ℝ\nhr : |r| < 1\nh0 : r = 0\n⊢ Tendsto (fun n => ↑n ^ k * r ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nexact tendsto_const_nhds.congr' (mem_atTop_sets.2 ⟨1, fun n hn ↦ by simp [zero_lt_one.trans_le hn, h0]⟩)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nk : ℕ\nr : ℝ\nhr : |r| < 1\nh0 : r = 0\nn : ℕ\nhn : n ≥ 1\n⊢ n ∈ {x | (fun x => 0 = (fun n => ↑n ^ k * r ^ n) x) x}\n[PROOFSTEP]\nsimp [zero_lt_one.trans_le hn, h0]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nk : ℕ\nr : ℝ\nhr : |r| < 1\nh0 : ¬r = 0\n⊢ Tendsto (fun n => ↑n ^ k * r ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nhave hr' : 1 < |r|⁻¹ := one_lt_inv (abs_pos.2 h0) hr\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nk : ℕ\nr : ℝ\nhr : |r| < 1\nh0 : ¬r = 0\nhr' : 1 < |r|⁻¹\n⊢ Tendsto (fun n => ↑n ^ k * r ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nrw [tendsto_zero_iff_norm_tendsto_zero]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nk : ℕ\nr : ℝ\nhr : |r| < 1\nh0 : ¬r = 0\nhr' : 1 < |r|⁻¹\n⊢ Tendsto (fun e => ‖↑e ^ k * r ^ e‖) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa [div_eq_mul_inv] using tendsto_pow_const_div_const_pow_of_one_lt k hr'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nr : ℝ\nhr : |r| < 1\n⊢ Tendsto (fun n => ↑n * r ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa only [pow_one] using tendsto_pow_const_mul_const_pow_of_abs_lt_one 1 hr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nr : ℝ\nhr : 0 ≤ r\nh'r : r < 1\n⊢ Tendsto (fun n => ↑n * r ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa only [pow_one] using tendsto_pow_const_mul_const_pow_of_lt_one 1 hr h'r\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nx : R\nh : ‖x‖ < 1\n⊢ Tendsto (fun n => x ^ n) atTop (𝓝 0)\n[PROOFSTEP]\napply squeeze_zero_norm' (eventually_norm_pow_le x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nx : R\nh : ‖x‖ < 1\n⊢ Tendsto (fun n => ‖x‖ ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nexact tendsto_pow_atTop_nhds_0_of_lt_1 (norm_nonneg _) h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nK : Type u_4\ninst✝ : NormedField K\nξ : K\nh : ‖ξ‖ < 1\n⊢ HasSum (fun n => ξ ^ n) (1 - ξ)⁻¹\n[PROOFSTEP]\nhave xi_ne_one : ξ ≠ 1 := by\n  contrapose! h\n  simp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nK : Type u_4\ninst✝ : NormedField K\nξ : K\nh : ‖ξ‖ < 1\n⊢ ξ ≠ 1\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nK : Type u_4\ninst✝ : NormedField K\nξ : K\nh : ξ = 1\n⊢ 1 ≤ ‖ξ‖\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nK : Type u_4\ninst✝ : NormedField K\nξ : K\nh : ‖ξ‖ < 1\nxi_ne_one : ξ ≠ 1\n⊢ HasSum (fun n => ξ ^ n) (1 - ξ)⁻¹\n[PROOFSTEP]\nhave A : Tendsto (fun n ↦ (ξ ^ n - 1) * (ξ - 1)⁻¹) atTop (𝓝 ((0 - 1) * (ξ - 1)⁻¹)) :=\n  ((tendsto_pow_atTop_nhds_0_of_norm_lt_1 h).sub tendsto_const_nhds).mul tendsto_const_nhds\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nK : Type u_4\ninst✝ : NormedField K\nξ : K\nh : ‖ξ‖ < 1\nxi_ne_one : ξ ≠ 1\nA : Tendsto (fun n => (ξ ^ n - 1) * (ξ - 1)⁻¹) atTop (𝓝 ((0 - 1) * (ξ - 1)⁻¹))\n⊢ HasSum (fun n => ξ ^ n) (1 - ξ)⁻¹\n[PROOFSTEP]\nrw [hasSum_iff_tendsto_nat_of_summable_norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nK : Type u_4\ninst✝ : NormedField K\nξ : K\nh : ‖ξ‖ < 1\nxi_ne_one : ξ ≠ 1\nA : Tendsto (fun n => (ξ ^ n - 1) * (ξ - 1)⁻¹) atTop (𝓝 ((0 - 1) * (ξ - 1)⁻¹))\n⊢ Tendsto (fun n => ∑ i in Finset.range n, ξ ^ i) atTop (𝓝 (1 - ξ)⁻¹)\n[PROOFSTEP]\nsimpa [geom_sum_eq, xi_ne_one, neg_inv, div_eq_mul_inv] using A\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nK : Type u_4\ninst✝ : NormedField K\nξ : K\nh : ‖ξ‖ < 1\nxi_ne_one : ξ ≠ 1\nA : Tendsto (fun n => (ξ ^ n - 1) * (ξ - 1)⁻¹) atTop (𝓝 ((0 - 1) * (ξ - 1)⁻¹))\n⊢ Summable fun i => ‖ξ ^ i‖\n[PROOFSTEP]\nsimp [norm_pow, summable_geometric_of_lt_1 (norm_nonneg _) h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nK : Type u_4\ninst✝ : NormedField K\nξ : K\n⊢ (Summable fun n => ξ ^ n) ↔ ‖ξ‖ < 1\n[PROOFSTEP]\nrefine' ⟨fun h ↦ _, summable_geometric_of_norm_lt_1⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nK : Type u_4\ninst✝ : NormedField K\nξ : K\nh : Summable fun n => ξ ^ n\n⊢ ‖ξ‖ < 1\n[PROOFSTEP]\nobtain ⟨k : ℕ, hk : dist (ξ ^ k) 0 < 1⟩ := (h.tendsto_cofinite_zero.eventually (ball_mem_nhds _ zero_lt_one)).exists\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nK : Type u_4\ninst✝ : NormedField K\nξ : K\nh : Summable fun n => ξ ^ n\nk : ℕ\nhk : dist (ξ ^ k) 0 < 1\n⊢ ‖ξ‖ < 1\n[PROOFSTEP]\nsimp only [norm_pow, dist_zero_right] at hk \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nK : Type u_4\ninst✝ : NormedField K\nξ : K\nh : Summable fun n => ξ ^ n\nk : ℕ\nhk : ‖ξ‖ ^ k < 1\n⊢ ‖ξ‖ < 1\n[PROOFSTEP]\nrw [← one_pow k] at hk \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nK : Type u_4\ninst✝ : NormedField K\nξ : K\nh : Summable fun n => ξ ^ n\nk : ℕ\nhk : ‖ξ‖ ^ k < 1 ^ k\n⊢ ‖ξ‖ < 1\n[PROOFSTEP]\nexact lt_of_pow_lt_pow _ zero_le_one hk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : R\nhr : ‖r‖ < 1\n⊢ Summable fun n => ‖↑n ^ k * r ^ n‖\n[PROOFSTEP]\nrcases exists_between hr with ⟨r', hrr', h⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝ : NormedRing R\nk : ℕ\nr : R\nhr : ‖r‖ < 1\nr' : ℝ\nhrr' : ‖r‖ < r'\nh : r' < 1\n⊢ Summable fun n => ‖↑n ^ k * r ^ n‖\n[PROOFSTEP]\nexact\n  summable_of_isBigO_nat (summable_geometric_of_lt_1 ((norm_nonneg _).trans hrr'.le) h)\n    (isLittleO_pow_const_mul_const_pow_const_pow_of_norm_lt _ hrr').isBigO.norm_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nr : 𝕜\nhr : ‖r‖ < 1\n⊢ HasSum (fun n => ↑n * r ^ n) (r / (1 - r) ^ 2)\n[PROOFSTEP]\nhave A : Summable (fun n ↦ (n : 𝕜) * r ^ n : ℕ → 𝕜) := by\n  simpa only [pow_one] using summable_pow_mul_geometric_of_norm_lt_1 1 hr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nr : 𝕜\nhr : ‖r‖ < 1\n⊢ Summable fun n => ↑n * r ^ n\n[PROOFSTEP]\nsimpa only [pow_one] using summable_pow_mul_geometric_of_norm_lt_1 1 hr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nr : 𝕜\nhr : ‖r‖ < 1\nA : Summable fun n => ↑n * r ^ n\n⊢ HasSum (fun n => ↑n * r ^ n) (r / (1 - r) ^ 2)\n[PROOFSTEP]\nhave B : HasSum (r ^ · : ℕ → 𝕜) (1 - r)⁻¹ := hasSum_geometric_of_norm_lt_1 hr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nr : 𝕜\nhr : ‖r‖ < 1\nA : Summable fun n => ↑n * r ^ n\nB : HasSum (fun x => r ^ x) (1 - r)⁻¹\n⊢ HasSum (fun n => ↑n * r ^ n) (r / (1 - r) ^ 2)\n[PROOFSTEP]\nrefine' A.hasSum_iff.2 _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nr : 𝕜\nhr : ‖r‖ < 1\nA : Summable fun n => ↑n * r ^ n\nB : HasSum (fun x => r ^ x) (1 - r)⁻¹\n⊢ ∑' (b : ℕ), ↑b * r ^ b = r / (1 - r) ^ 2\n[PROOFSTEP]\nhave hr' : r ≠ 1 := by\n  rintro rfl\n  simp [lt_irrefl] at hr \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nr : 𝕜\nhr : ‖r‖ < 1\nA : Summable fun n => ↑n * r ^ n\nB : HasSum (fun x => r ^ x) (1 - r)⁻¹\n⊢ r ≠ 1\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nhr : ‖1‖ < 1\nA : Summable fun n => ↑n * 1 ^ n\nB : HasSum (fun x => 1 ^ x) (1 - 1)⁻¹\n⊢ False\n[PROOFSTEP]\nsimp [lt_irrefl] at hr \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nr : 𝕜\nhr : ‖r‖ < 1\nA : Summable fun n => ↑n * r ^ n\nB : HasSum (fun x => r ^ x) (1 - r)⁻¹\nhr' : r ≠ 1\n⊢ ∑' (b : ℕ), ↑b * r ^ b = r / (1 - r) ^ 2\n[PROOFSTEP]\nset s : 𝕜 := ∑' n : ℕ, n * r ^ n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nr : 𝕜\nhr : ‖r‖ < 1\nA : Summable fun n => ↑n * r ^ n\nB : HasSum (fun x => r ^ x) (1 - r)⁻¹\nhr' : r ≠ 1\ns : 𝕜 := ∑' (n : ℕ), ↑n * r ^ n\n⊢ s = r / (1 - r) ^ 2\n[PROOFSTEP]\ncalc\n  s = (1 - r) * s / (1 - r) := (mul_div_cancel_left _ (sub_ne_zero.2 hr'.symm)).symm\n  _ = (s - r * s) / (1 - r) := by rw [_root_.sub_mul, one_mul]\n  _ = (((0 : ℕ) * r ^ 0 + ∑' n : ℕ, (n + 1 : ℕ) * r ^ (n + 1)) - r * s) / (1 - r) := by rw [← tsum_eq_zero_add A]\n  _ = ((r * ∑' n : ℕ, (n + 1) * r ^ n) - r * s) / (1 - r) := by\n    simp [_root_.pow_succ, mul_left_comm _ r, _root_.tsum_mul_left]\n  _ = r / (1 - r) ^ 2 := by simp [add_mul, tsum_add A B.summable, mul_add, B.tsum_eq, ← div_eq_mul_inv, sq, div_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nr : 𝕜\nhr : ‖r‖ < 1\nA : Summable fun n => ↑n * r ^ n\nB : HasSum (fun x => r ^ x) (1 - r)⁻¹\nhr' : r ≠ 1\ns : 𝕜 := ∑' (n : ℕ), ↑n * r ^ n\n⊢ (1 - r) * s / (1 - r) = (s - r * s) / (1 - r)\n[PROOFSTEP]\nrw [_root_.sub_mul, one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nr : 𝕜\nhr : ‖r‖ < 1\nA : Summable fun n => ↑n * r ^ n\nB : HasSum (fun x => r ^ x) (1 - r)⁻¹\nhr' : r ≠ 1\ns : 𝕜 := ∑' (n : ℕ), ↑n * r ^ n\n⊢ (s - r * s) / (1 - r) = (↑0 * r ^ 0 + ∑' (n : ℕ), ↑(n + 1) * r ^ (n + 1) - r * s) / (1 - r)\n[PROOFSTEP]\nrw [← tsum_eq_zero_add A]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nr : 𝕜\nhr : ‖r‖ < 1\nA : Summable fun n => ↑n * r ^ n\nB : HasSum (fun x => r ^ x) (1 - r)⁻¹\nhr' : r ≠ 1\ns : 𝕜 := ∑' (n : ℕ), ↑n * r ^ n\n⊢ (↑0 * r ^ 0 + ∑' (n : ℕ), ↑(n + 1) * r ^ (n + 1) - r * s) / (1 - r) =\n    (r * ∑' (n : ℕ), (↑n + 1) * r ^ n - r * s) / (1 - r)\n[PROOFSTEP]\nsimp [_root_.pow_succ, mul_left_comm _ r, _root_.tsum_mul_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\n𝕜 : Type u_4\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nr : 𝕜\nhr : ‖r‖ < 1\nA : Summable fun n => ↑n * r ^ n\nB : HasSum (fun x => r ^ x) (1 - r)⁻¹\nhr' : r ≠ 1\ns : 𝕜 := ∑' (n : ℕ), ↑n * r ^ n\n⊢ (r * ∑' (n : ℕ), (↑n + 1) * r ^ n - r * s) / (1 - r) = r / (1 - r) ^ 2\n[PROOFSTEP]\nsimp [add_mul, tsum_add A B.summable, mul_add, B.tsum_eq, ← div_eq_mul_inv, sq, div_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC r : ℝ\nhr : r < 1\nu : ℕ → α\nh : ∀ (n : ℕ), ‖u n - u (n + 1)‖ ≤ C * r ^ n\n⊢ ∀ (n : ℕ), dist (u n) (u (n + 1)) ≤ C * r ^ n\n[PROOFSTEP]\nsimpa [dist_eq_norm] using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr C : ℝ\nf : ℕ → α\nhf : ∀ (n : ℕ), ‖f n‖ ≤ C * r ^ n\nn : ℕ\n⊢ dist (∑ i in Finset.range n, f i) (∑ i in Finset.range (n + 1), f i) ≤ C * r ^ n\n[PROOFSTEP]\nrw [sum_range_succ, dist_eq_norm, ← norm_neg, neg_sub, add_sub_cancel']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr C : ℝ\nf : ℕ → α\nhf : ∀ (n : ℕ), ‖f n‖ ≤ C * r ^ n\nn : ℕ\n⊢ ‖f n‖ ≤ C * r ^ n\n[PROOFSTEP]\nexact hf n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr C : ℝ\nf : ℕ → α\nhr : r < 1\nhf : ∀ (n : ℕ), ‖f n‖ ≤ C * r ^ n\na : α\nha : HasSum f a\nn : ℕ\n⊢ ‖∑ x in Finset.range n, f x - a‖ ≤ C * r ^ n / (1 - r)\n[PROOFSTEP]\nrw [← dist_eq_norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr C : ℝ\nf : ℕ → α\nhr : r < 1\nhf : ∀ (n : ℕ), ‖f n‖ ≤ C * r ^ n\na : α\nha : HasSum f a\nn : ℕ\n⊢ dist (∑ x in Finset.range n, f x) a ≤ C * r ^ n / (1 - r)\n[PROOFSTEP]\napply dist_le_of_le_geometric_of_tendsto r C hr (dist_partial_sum_le_of_le_geometric hf)\n[GOAL]\ncase ha\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr C : ℝ\nf : ℕ → α\nhr : r < 1\nhf : ∀ (n : ℕ), ‖f n‖ ≤ C * r ^ n\na : α\nha : HasSum f a\nn : ℕ\n⊢ Tendsto (fun n => ∑ i in Finset.range n, f i) atTop (𝓝 a)\n[PROOFSTEP]\nexact ha.tendsto_sum_nat\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr C : ℝ\nf u : ℕ → α\nn : ℕ\n⊢ dist (∑ k in Finset.range (n + 1), u k) (∑ k in Finset.range n, u k) = ‖u n‖\n[PROOFSTEP]\nsimp [dist_eq_norm, sum_range_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr C : ℝ\nf u : ℕ → α\nn : ℕ\n⊢ dist (∑ k in Finset.range n, u k) (∑ k in Finset.range (n + 1), u k) = ‖u n‖\n[PROOFSTEP]\nsimp [dist_eq_norm', sum_range_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nr : ℝ\nhr : r < 1\nh : ∀ (n : ℕ), ‖u n‖ ≤ C * r ^ n\n⊢ ∀ (n : ℕ), dist (∑ k in Finset.range n, u k) (∑ k in Finset.range (n + 1), u k) ≤ C * r ^ n\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\n⊢ CauchySeq fun n => ∑ k in Finset.range (n + 1), u k\n[PROOFSTEP]\nset v : ℕ → α := fun n ↦ if n < N then 0 else u n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\n⊢ CauchySeq fun n => ∑ k in Finset.range (n + 1), u k\n[PROOFSTEP]\nhave hC : 0 ≤ C := (zero_le_mul_right <| pow_pos hr₀ N).mp ((norm_nonneg _).trans <| h N <| le_refl N)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\nhC : 0 ≤ C\n⊢ CauchySeq fun n => ∑ k in Finset.range (n + 1), u k\n[PROOFSTEP]\nhave : ∀ n ≥ N, u n = v n := by\n  intro n hn\n  simp [hn, if_neg (not_lt.mpr hn)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\nhC : 0 ≤ C\n⊢ ∀ (n : ℕ), n ≥ N → u n = v n\n[PROOFSTEP]\nintro n hn\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\nhC : 0 ≤ C\nn : ℕ\nhn : n ≥ N\n⊢ u n = v n\n[PROOFSTEP]\nsimp [hn, if_neg (not_lt.mpr hn)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\nhC : 0 ≤ C\nthis : ∀ (n : ℕ), n ≥ N → u n = v n\n⊢ CauchySeq fun n => ∑ k in Finset.range (n + 1), u k\n[PROOFSTEP]\nrefine' cauchySeq_sum_of_eventually_eq this (NormedAddCommGroup.cauchy_series_of_le_geometric' hr₁ _)\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\nhC : 0 ≤ C\nthis : ∀ (n : ℕ), n ≥ N → u n = v n\n⊢ ℝ\n[PROOFSTEP]\nexact C\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\nhC : 0 ≤ C\nthis : ∀ (n : ℕ), n ≥ N → u n = v n\n⊢ ∀ (n : ℕ), ‖v n‖ ≤ C * r ^ n\n[PROOFSTEP]\nintro n\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\nhC : 0 ≤ C\nthis : ∀ (n : ℕ), n ≥ N → u n = v n\nn : ℕ\n⊢ ‖v n‖ ≤ C * r ^ n\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\nhC : 0 ≤ C\nthis : ∀ (n : ℕ), n ≥ N → u n = v n\nn : ℕ\n⊢ ‖if n < N then 0 else u n‖ ≤ C * r ^ n\n[PROOFSTEP]\nsplit_ifs with H\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\nhC : 0 ≤ C\nthis : ∀ (n : ℕ), n ≥ N → u n = v n\nn : ℕ\nH : n < N\n⊢ ‖0‖ ≤ C * r ^ n\n[PROOFSTEP]\nrw [norm_zero]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\nhC : 0 ≤ C\nthis : ∀ (n : ℕ), n ≥ N → u n = v n\nn : ℕ\nH : n < N\n⊢ 0 ≤ C * r ^ n\n[PROOFSTEP]\nexact mul_nonneg hC (pow_nonneg hr₀.le _)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\nhC : 0 ≤ C\nthis : ∀ (n : ℕ), n ≥ N → u n = v n\nn : ℕ\nH : ¬n < N\n⊢ ‖u n‖ ≤ C * r ^ n\n[PROOFSTEP]\npush_neg at H \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : SeminormedAddCommGroup α\nr✝ C✝ : ℝ\nf : ℕ → α\nC : ℝ\nu : ℕ → α\nN : ℕ\nr : ℝ\nhr₀ : 0 < r\nhr₁ : r < 1\nh : ∀ (n : ℕ), n ≥ N → ‖u n‖ ≤ C * r ^ n\nv : ℕ → α := fun n => if n < N then 0 else u n\nhC : 0 ≤ C\nthis : ∀ (n : ℕ), n ≥ N → u n = v n\nn : ℕ\nH : N ≤ n\n⊢ ‖u n‖ ≤ C * r ^ n\n[PROOFSTEP]\nexact h _ H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\n⊢ Summable fun n => x ^ n\n[PROOFSTEP]\nhave h1 : Summable fun n : ℕ ↦ ‖x‖ ^ n := summable_geometric_of_lt_1 (norm_nonneg _) h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nh1 : Summable fun n => ‖x‖ ^ n\n⊢ Summable fun n => x ^ n\n[PROOFSTEP]\nrefine' summable_of_norm_bounded_eventually _ h1 _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nh1 : Summable fun n => ‖x‖ ^ n\n⊢ ∀ᶠ (i : ℕ) in cofinite, ‖x ^ i‖ ≤ ‖x‖ ^ i\n[PROOFSTEP]\nrw [Nat.cofinite_eq_atTop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nh1 : Summable fun n => ‖x‖ ^ n\n⊢ ∀ᶠ (i : ℕ) in atTop, ‖x ^ i‖ ≤ ‖x‖ ^ i\n[PROOFSTEP]\nexact eventually_norm_pow_le x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\n⊢ ‖∑' (n : ℕ), x ^ n‖ ≤ ‖1‖ - 1 + (1 - ‖x‖)⁻¹\n[PROOFSTEP]\nrw [tsum_eq_zero_add (NormedRing.summable_geometric_of_norm_lt_1 x h)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\n⊢ ‖x ^ 0 + ∑' (b : ℕ), x ^ (b + 1)‖ ≤ ‖1‖ - 1 + (1 - ‖x‖)⁻¹\n[PROOFSTEP]\nsimp only [_root_.pow_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\n⊢ ‖1 + ∑' (b : ℕ), x ^ (b + 1)‖ ≤ ‖1‖ - 1 + (1 - ‖x‖)⁻¹\n[PROOFSTEP]\nrefine' le_trans (norm_add_le _ _) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\n⊢ ‖1‖ + ‖∑' (b : ℕ), x ^ (b + 1)‖ ≤ ‖1‖ - 1 + (1 - ‖x‖)⁻¹\n[PROOFSTEP]\nhave : ‖∑' b : ℕ, (fun n ↦ x ^ (n + 1)) b‖ ≤ (1 - ‖x‖)⁻¹ - 1 :=\n  by\n  refine' tsum_of_norm_bounded _ fun b ↦ norm_pow_le' _ (Nat.succ_pos b)\n  convert (hasSum_nat_add_iff' 1).mpr (hasSum_geometric_of_lt_1 (norm_nonneg x) h)\n  simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\n⊢ ‖∑' (b : ℕ), (fun n => x ^ (n + 1)) b‖ ≤ (1 - ‖x‖)⁻¹ - 1\n[PROOFSTEP]\nrefine' tsum_of_norm_bounded _ fun b ↦ norm_pow_le' _ (Nat.succ_pos b)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\n⊢ HasSum (fun b => ‖x‖ ^ (b + 1)) ((1 - ‖x‖)⁻¹ - 1)\n[PROOFSTEP]\nconvert (hasSum_nat_add_iff' 1).mpr (hasSum_geometric_of_lt_1 (norm_nonneg x) h)\n[GOAL]\ncase h.e'_6.h.e'_6\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\n⊢ 1 = ∑ i in Finset.range 1, ‖x‖ ^ i\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nthis : ‖∑' (b : ℕ), (fun n => x ^ (n + 1)) b‖ ≤ (1 - ‖x‖)⁻¹ - 1\n⊢ ‖1‖ + ‖∑' (b : ℕ), x ^ (b + 1)‖ ≤ ‖1‖ - 1 + (1 - ‖x‖)⁻¹\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\n⊢ (∑' (i : ℕ), x ^ i) * (1 - x) = 1\n[PROOFSTEP]\nhave := (NormedRing.summable_geometric_of_norm_lt_1 x h).hasSum.mul_right (1 - x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nthis : HasSum (fun i => x ^ i * (1 - x)) ((∑' (b : ℕ), x ^ b) * (1 - x))\n⊢ (∑' (i : ℕ), x ^ i) * (1 - x) = 1\n[PROOFSTEP]\nrefine' tendsto_nhds_unique this.tendsto_sum_nat _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nthis : HasSum (fun i => x ^ i * (1 - x)) ((∑' (b : ℕ), x ^ b) * (1 - x))\n⊢ Tendsto (fun n => ∑ i in Finset.range n, x ^ i * (1 - x)) atTop (𝓝 1)\n[PROOFSTEP]\nhave : Tendsto (fun n : ℕ ↦ 1 - x ^ n) atTop (𝓝 1) := by\n  simpa using tendsto_const_nhds.sub (tendsto_pow_atTop_nhds_0_of_norm_lt_1 h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nthis : HasSum (fun i => x ^ i * (1 - x)) ((∑' (b : ℕ), x ^ b) * (1 - x))\n⊢ Tendsto (fun n => 1 - x ^ n) atTop (𝓝 1)\n[PROOFSTEP]\nsimpa using tendsto_const_nhds.sub (tendsto_pow_atTop_nhds_0_of_norm_lt_1 h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nthis✝ : HasSum (fun i => x ^ i * (1 - x)) ((∑' (b : ℕ), x ^ b) * (1 - x))\nthis : Tendsto (fun n => 1 - x ^ n) atTop (𝓝 1)\n⊢ Tendsto (fun n => ∑ i in Finset.range n, x ^ i * (1 - x)) atTop (𝓝 1)\n[PROOFSTEP]\nconvert ← this\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nthis✝ : HasSum (fun i => x ^ i * (1 - x)) ((∑' (b : ℕ), x ^ b) * (1 - x))\nthis : Tendsto (fun n => 1 - x ^ n) atTop (𝓝 1)\nx✝ : ℕ\n⊢ 1 - x ^ x✝ = ∑ i in Finset.range x✝, x ^ i * (1 - x)\n[PROOFSTEP]\nrw [← geom_sum_mul_neg, Finset.sum_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\n⊢ (1 - x) * ∑' (i : ℕ), x ^ i = 1\n[PROOFSTEP]\nhave := (NormedRing.summable_geometric_of_norm_lt_1 x h).hasSum.mul_left (1 - x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nthis : HasSum (fun i => (1 - x) * x ^ i) ((1 - x) * ∑' (b : ℕ), x ^ b)\n⊢ (1 - x) * ∑' (i : ℕ), x ^ i = 1\n[PROOFSTEP]\nrefine' tendsto_nhds_unique this.tendsto_sum_nat _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nthis : HasSum (fun i => (1 - x) * x ^ i) ((1 - x) * ∑' (b : ℕ), x ^ b)\n⊢ Tendsto (fun n => ∑ i in Finset.range n, (1 - x) * x ^ i) atTop (𝓝 1)\n[PROOFSTEP]\nhave : Tendsto (fun n : ℕ ↦ 1 - x ^ n) atTop (nhds 1) := by\n  simpa using tendsto_const_nhds.sub (tendsto_pow_atTop_nhds_0_of_norm_lt_1 h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nthis : HasSum (fun i => (1 - x) * x ^ i) ((1 - x) * ∑' (b : ℕ), x ^ b)\n⊢ Tendsto (fun n => 1 - x ^ n) atTop (𝓝 1)\n[PROOFSTEP]\nsimpa using tendsto_const_nhds.sub (tendsto_pow_atTop_nhds_0_of_norm_lt_1 h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nthis✝ : HasSum (fun i => (1 - x) * x ^ i) ((1 - x) * ∑' (b : ℕ), x ^ b)\nthis : Tendsto (fun n => 1 - x ^ n) atTop (𝓝 1)\n⊢ Tendsto (fun n => ∑ i in Finset.range n, (1 - x) * x ^ i) atTop (𝓝 1)\n[PROOFSTEP]\nconvert ← this\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nR : Type u_4\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nx : R\nh : ‖x‖ < 1\nthis✝ : HasSum (fun i => (1 - x) * x ^ i) ((1 - x) * ∑' (b : ℕ), x ^ b)\nthis : Tendsto (fun n => 1 - x ^ n) atTop (𝓝 1)\nx✝ : ℕ\n⊢ 1 - x ^ x✝ = ∑ i in Finset.range x✝, (1 - x) * x ^ i\n[PROOFSTEP]\nrw [← mul_neg_geom_sum, Finset.mul_sum]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nh : ∀ᶠ (n : ℕ) in atTop, ‖f (n + 1)‖ ≤ r * ‖f n‖\n⊢ Summable f\n[PROOFSTEP]\nby_cases hr₀ : 0 ≤ r\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nh : ∀ᶠ (n : ℕ) in atTop, ‖f (n + 1)‖ ≤ r * ‖f n‖\nhr₀ : 0 ≤ r\n⊢ Summable f\n[PROOFSTEP]\nrw [eventually_atTop] at h \n[GOAL]\ncase pos\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nh : ∃ a, ∀ (b : ℕ), b ≥ a → ‖f (b + 1)‖ ≤ r * ‖f b‖\nhr₀ : 0 ≤ r\n⊢ Summable f\n[PROOFSTEP]\nrcases h with ⟨N, hN⟩\n[GOAL]\ncase pos.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nhr₀ : 0 ≤ r\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ‖f (b + 1)‖ ≤ r * ‖f b‖\n⊢ Summable f\n[PROOFSTEP]\nrw [← @summable_nat_add_iff α _ _ _ _ N]\n[GOAL]\ncase pos.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nhr₀ : 0 ≤ r\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ‖f (b + 1)‖ ≤ r * ‖f b‖\n⊢ Summable fun n => f (n + N)\n[PROOFSTEP]\nrefine'\n  summable_of_norm_bounded (fun n ↦ ‖f N‖ * r ^ n) (Summable.mul_left _ <| summable_geometric_of_lt_1 hr₀ hr₁) fun n ↦ _\n[GOAL]\ncase pos.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nhr₀ : 0 ≤ r\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ‖f (b + 1)‖ ≤ r * ‖f b‖\nn : ℕ\n⊢ ‖f (n + N)‖ ≤ (fun n => ‖f N‖ * r ^ n) n\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase pos.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nhr₀ : 0 ≤ r\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ‖f (b + 1)‖ ≤ r * ‖f b‖\nn : ℕ\n⊢ ‖f (n + N)‖ ≤ ‖f N‖ * r ^ n\n[PROOFSTEP]\nconv_rhs => rw [mul_comm, ← zero_add N]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nhr₀ : 0 ≤ r\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ‖f (b + 1)‖ ≤ r * ‖f b‖\nn : ℕ\n| ‖f N‖ * r ^ n\n[PROOFSTEP]\nrw [mul_comm, ← zero_add N]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nhr₀ : 0 ≤ r\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ‖f (b + 1)‖ ≤ r * ‖f b‖\nn : ℕ\n| ‖f N‖ * r ^ n\n[PROOFSTEP]\nrw [mul_comm, ← zero_add N]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nhr₀ : 0 ≤ r\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ‖f (b + 1)‖ ≤ r * ‖f b‖\nn : ℕ\n| ‖f N‖ * r ^ n\n[PROOFSTEP]\nrw [mul_comm, ← zero_add N]\n[GOAL]\ncase pos.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nhr₀ : 0 ≤ r\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ‖f (b + 1)‖ ≤ r * ‖f b‖\nn : ℕ\n⊢ ‖f (n + N)‖ ≤ r ^ n * ‖f (0 + N)‖\n[PROOFSTEP]\nrefine' le_geom (u := fun n ↦ ‖f (n + N)‖) hr₀ n fun i _ ↦ _\n[GOAL]\ncase pos.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nhr₀ : 0 ≤ r\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ‖f (b + 1)‖ ≤ r * ‖f b‖\nn i : ℕ\nx✝ : i < n\n⊢ (fun n => ‖f (n + N)‖) (i + 1) ≤ r * (fun n => ‖f (n + N)‖) i\n[PROOFSTEP]\nconvert hN (i + N) (N.le_add_left i) using 3\n[GOAL]\ncase h.e'_3.h.e'_3.h.e'_1\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nhr₀ : 0 ≤ r\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ‖f (b + 1)‖ ≤ r * ‖f b‖\nn i : ℕ\nx✝ : i < n\n⊢ i + 1 + N = i + N + 1\n[PROOFSTEP]\nac_rfl\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nh : ∀ᶠ (n : ℕ) in atTop, ‖f (n + 1)‖ ≤ r * ‖f n‖\nhr₀ : ¬0 ≤ r\n⊢ Summable f\n[PROOFSTEP]\npush_neg at hr₀ \n[GOAL]\ncase neg\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nh : ∀ᶠ (n : ℕ) in atTop, ‖f (n + 1)‖ ≤ r * ‖f n‖\nhr₀ : r < 0\n⊢ Summable f\n[PROOFSTEP]\nrefine' summable_of_norm_bounded_eventually 0 summable_zero _\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nh : ∀ᶠ (n : ℕ) in atTop, ‖f (n + 1)‖ ≤ r * ‖f n‖\nhr₀ : r < 0\n⊢ ∀ᶠ (i : ℕ) in cofinite, ‖f i‖ ≤ OfNat.ofNat 0 i\n[PROOFSTEP]\nrw [Nat.cofinite_eq_atTop]\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nh : ∀ᶠ (n : ℕ) in atTop, ‖f (n + 1)‖ ≤ r * ‖f n‖\nhr₀ : r < 0\n⊢ ∀ᶠ (i : ℕ) in atTop, ‖f i‖ ≤ OfNat.ofNat 0 i\n[PROOFSTEP]\nfilter_upwards [h] with _ hn\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nh : ∀ᶠ (n : ℕ) in atTop, ‖f (n + 1)‖ ≤ r * ‖f n‖\nhr₀ : r < 0\na✝ : ℕ\nhn : ‖f (a✝ + 1)‖ ≤ r * ‖f a✝‖\n⊢ ‖f a✝‖ ≤ OfNat.ofNat 0 a✝\n[PROOFSTEP]\nby_contra' h\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nr : ℝ\nhr₁ : r < 1\nh✝ : ∀ᶠ (n : ℕ) in atTop, ‖f (n + 1)‖ ≤ r * ‖f n‖\nhr₀ : r < 0\na✝ : ℕ\nhn : ‖f (a✝ + 1)‖ ≤ r * ‖f a✝‖\nh : OfNat.ofNat 0 a✝ < ‖f a✝‖\n⊢ False\n[PROOFSTEP]\nexact not_lt.mpr (norm_nonneg _) (lt_of_le_of_lt hn <| mul_neg_of_neg_of_pos hr₀ h)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : NormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nl : ℝ\nhl₁ : l < 1\nhf : ∀ᶠ (n : ℕ) in atTop, f n ≠ 0\nh : Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)\n⊢ Summable f\n[PROOFSTEP]\nrcases exists_between hl₁ with ⟨r, hr₀, hr₁⟩\n[GOAL]\ncase intro.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : NormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nl : ℝ\nhl₁ : l < 1\nhf : ∀ᶠ (n : ℕ) in atTop, f n ≠ 0\nh : Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)\nr : ℝ\nhr₀ : l < r\nhr₁ : r < 1\n⊢ Summable f\n[PROOFSTEP]\nrefine' summable_of_ratio_norm_eventually_le hr₁ _\n[GOAL]\ncase intro.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : NormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nl : ℝ\nhl₁ : l < 1\nhf : ∀ᶠ (n : ℕ) in atTop, f n ≠ 0\nh : Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)\nr : ℝ\nhr₀ : l < r\nhr₁ : r < 1\n⊢ ∀ᶠ (n : ℕ) in atTop, ‖f (n + 1)‖ ≤ r * ‖f n‖\n[PROOFSTEP]\nfilter_upwards [eventually_le_of_tendsto_lt hr₀ h, hf] with _ _ h₁\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝¹ : NormedAddCommGroup α\ninst✝ : CompleteSpace α\nf : ℕ → α\nl : ℝ\nhl₁ : l < 1\nhf : ∀ᶠ (n : ℕ) in atTop, f n ≠ 0\nh : Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)\nr : ℝ\nhr₀ : l < r\nhr₁ : r < 1\na✝¹ : ℕ\na✝ : ‖f (a✝¹ + 1)‖ / ‖f a✝¹‖ ≤ r\nh₁ : f a✝¹ ≠ 0\n⊢ ‖f (a✝¹ + 1)‖ ≤ r * ‖f a✝¹‖\n[PROOFSTEP]\nrwa [← div_le_iff (norm_pos_iff.mpr h₁)]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∃ᶠ (n : ℕ) in atTop, ‖f n‖ ≠ 0\nh : ∀ᶠ (n : ℕ) in atTop, r * ‖f n‖ ≤ ‖f (n + 1)‖\n⊢ ¬Summable f\n[PROOFSTEP]\nrw [eventually_atTop] at h \n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∃ᶠ (n : ℕ) in atTop, ‖f n‖ ≠ 0\nh : ∃ a, ∀ (b : ℕ), b ≥ a → r * ‖f b‖ ≤ ‖f (b + 1)‖\n⊢ ¬Summable f\n[PROOFSTEP]\nrcases h with ⟨N₀, hN₀⟩\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∃ᶠ (n : ℕ) in atTop, ‖f n‖ ≠ 0\nN₀ : ℕ\nhN₀ : ∀ (b : ℕ), b ≥ N₀ → r * ‖f b‖ ≤ ‖f (b + 1)‖\n⊢ ¬Summable f\n[PROOFSTEP]\nrw [frequently_atTop] at hf \n[GOAL]\ncase intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ : ℕ\nhN₀ : ∀ (b : ℕ), b ≥ N₀ → r * ‖f b‖ ≤ ‖f (b + 1)‖\n⊢ ¬Summable f\n[PROOFSTEP]\nrcases hf N₀ with ⟨N, hNN₀ : N₀ ≤ N, hN⟩\n[GOAL]\ncase intro.intro.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ : ℕ\nhN₀ : ∀ (b : ℕ), b ≥ N₀ → r * ‖f b‖ ≤ ‖f (b + 1)‖\nN : ℕ\nhNN₀ : N₀ ≤ N\nhN : ‖f N‖ ≠ 0\n⊢ ¬Summable f\n[PROOFSTEP]\nrw [← @summable_nat_add_iff α _ _ _ _ N]\n[GOAL]\ncase intro.intro.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ : ℕ\nhN₀ : ∀ (b : ℕ), b ≥ N₀ → r * ‖f b‖ ≤ ‖f (b + 1)‖\nN : ℕ\nhNN₀ : N₀ ≤ N\nhN : ‖f N‖ ≠ 0\n⊢ ¬Summable fun n => f (n + N)\n[PROOFSTEP]\nrefine' mt Summable.tendsto_atTop_zero fun h' ↦ not_tendsto_atTop_of_tendsto_nhds (tendsto_norm_zero.comp h') _\n[GOAL]\ncase intro.intro.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ : ℕ\nhN₀ : ∀ (b : ℕ), b ≥ N₀ → r * ‖f b‖ ≤ ‖f (b + 1)‖\nN : ℕ\nhNN₀ : N₀ ≤ N\nhN : ‖f N‖ ≠ 0\nh' : Tendsto (fun n => f (n + N)) atTop (𝓝 0)\n⊢ Tendsto ((fun a => ‖a‖) ∘ fun n => f (n + N)) atTop atTop\n[PROOFSTEP]\nconvert tendsto_atTop_of_geom_le _ hr _\n[GOAL]\ncase intro.intro.intro.convert_2\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ : ℕ\nhN₀ : ∀ (b : ℕ), b ≥ N₀ → r * ‖f b‖ ≤ ‖f (b + 1)‖\nN : ℕ\nhNN₀ : N₀ ≤ N\nhN : ‖f N‖ ≠ 0\nh' : Tendsto (fun n => f (n + N)) atTop (𝓝 0)\n⊢ 0 < ((fun a => ‖a‖) ∘ fun n => f (n + N)) 0\n[PROOFSTEP]\nrefine' lt_of_le_of_ne (norm_nonneg _) _\n[GOAL]\ncase intro.intro.intro.convert_2\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ : ℕ\nhN₀ : ∀ (b : ℕ), b ≥ N₀ → r * ‖f b‖ ≤ ‖f (b + 1)‖\nN : ℕ\nhNN₀ : N₀ ≤ N\nhN : ‖f N‖ ≠ 0\nh' : Tendsto (fun n => f (n + N)) atTop (𝓝 0)\n⊢ 0 ≠ ((fun a => ‖a‖) ∘ fun n => f (n + N)) 0\n[PROOFSTEP]\nintro h''\n[GOAL]\ncase intro.intro.intro.convert_2\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ : ℕ\nhN₀ : ∀ (b : ℕ), b ≥ N₀ → r * ‖f b‖ ≤ ‖f (b + 1)‖\nN : ℕ\nhNN₀ : N₀ ≤ N\nhN : ‖f N‖ ≠ 0\nh' : Tendsto (fun n => f (n + N)) atTop (𝓝 0)\nh'' : 0 = ((fun a => ‖a‖) ∘ fun n => f (n + N)) 0\n⊢ False\n[PROOFSTEP]\nspecialize hN₀ N hNN₀\n[GOAL]\ncase intro.intro.intro.convert_2\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ N : ℕ\nhNN₀ : N₀ ≤ N\nhN : ‖f N‖ ≠ 0\nh' : Tendsto (fun n => f (n + N)) atTop (𝓝 0)\nh'' : 0 = ((fun a => ‖a‖) ∘ fun n => f (n + N)) 0\nhN₀ : r * ‖f N‖ ≤ ‖f (N + 1)‖\n⊢ False\n[PROOFSTEP]\nsimp only [comp_apply, zero_add] at h'' \n[GOAL]\ncase intro.intro.intro.convert_2\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ N : ℕ\nhNN₀ : N₀ ≤ N\nhN : ‖f N‖ ≠ 0\nh' : Tendsto (fun n => f (n + N)) atTop (𝓝 0)\nhN₀ : r * ‖f N‖ ≤ ‖f (N + 1)‖\nh'' : 0 = ‖f N‖\n⊢ False\n[PROOFSTEP]\nexact hN h''.symm\n[GOAL]\ncase intro.intro.intro.convert_3\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ : ℕ\nhN₀ : ∀ (b : ℕ), b ≥ N₀ → r * ‖f b‖ ≤ ‖f (b + 1)‖\nN : ℕ\nhNN₀ : N₀ ≤ N\nhN : ‖f N‖ ≠ 0\nh' : Tendsto (fun n => f (n + N)) atTop (𝓝 0)\n⊢ ∀ (n : ℕ), r * ((fun a => ‖a‖) ∘ fun n => f (n + N)) n ≤ ((fun a => ‖a‖) ∘ fun n => f (n + N)) (n + 1)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase intro.intro.intro.convert_3\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ : ℕ\nhN₀ : ∀ (b : ℕ), b ≥ N₀ → r * ‖f b‖ ≤ ‖f (b + 1)‖\nN : ℕ\nhNN₀ : N₀ ≤ N\nhN : ‖f N‖ ≠ 0\nh' : Tendsto (fun n => f (n + N)) atTop (𝓝 0)\ni : ℕ\n⊢ r * ((fun a => ‖a‖) ∘ fun n => f (n + N)) i ≤ ((fun a => ‖a‖) ∘ fun n => f (n + N)) (i + 1)\n[PROOFSTEP]\ndsimp only [comp_apply]\n[GOAL]\ncase intro.intro.intro.convert_3\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ : ℕ\nhN₀ : ∀ (b : ℕ), b ≥ N₀ → r * ‖f b‖ ≤ ‖f (b + 1)‖\nN : ℕ\nhNN₀ : N₀ ≤ N\nhN : ‖f N‖ ≠ 0\nh' : Tendsto (fun n => f (n + N)) atTop (𝓝 0)\ni : ℕ\n⊢ r * ‖f (i + N)‖ ≤ ‖f (i + 1 + N)‖\n[PROOFSTEP]\nconvert hN₀ (i + N) (hNN₀.trans (N.le_add_left i)) using 3\n[GOAL]\ncase h.e'_4.h.e'_3.h.e'_1\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nr : ℝ\nhr : 1 < r\nhf : ∀ (a : ℕ), ∃ b, b ≥ a ∧ ‖f b‖ ≠ 0\nN₀ : ℕ\nhN₀ : ∀ (b : ℕ), b ≥ N₀ → r * ‖f b‖ ≤ ‖f (b + 1)‖\nN : ℕ\nhNN₀ : N₀ ≤ N\nhN : ‖f N‖ ≠ 0\nh' : Tendsto (fun n => f (n + N)) atTop (𝓝 0)\ni : ℕ\n⊢ i + 1 + N = i + N + 1\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nl : ℝ\nhl : 1 < l\nh : Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)\n⊢ ¬Summable f\n[PROOFSTEP]\nhave key : ∀ᶠ n in atTop, ‖f n‖ ≠ 0 :=\n  by\n  filter_upwards [eventually_ge_of_tendsto_gt hl h] with _ hn hc\n  rw [hc, _root_.div_zero] at hn \n  linarith\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nl : ℝ\nhl : 1 < l\nh : Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)\n⊢ ∀ᶠ (n : ℕ) in atTop, ‖f n‖ ≠ 0\n[PROOFSTEP]\nfilter_upwards [eventually_ge_of_tendsto_gt hl h] with _ hn hc\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nl : ℝ\nhl : 1 < l\nh : Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)\na✝ : ℕ\nhn : 1 ≤ ‖f (a✝ + 1)‖ / ‖f a✝‖\nhc : ‖f a✝‖ = 0\n⊢ False\n[PROOFSTEP]\nrw [hc, _root_.div_zero] at hn \n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nl : ℝ\nhl : 1 < l\nh : Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)\na✝ : ℕ\nhn : 1 ≤ 0\nhc : ‖f a✝‖ = 0\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nl : ℝ\nhl : 1 < l\nh : Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)\nkey : ∀ᶠ (n : ℕ) in atTop, ‖f n‖ ≠ 0\n⊢ ¬Summable f\n[PROOFSTEP]\nrcases exists_between hl with ⟨r, hr₀, hr₁⟩\n[GOAL]\ncase intro.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nl : ℝ\nhl : 1 < l\nh : Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)\nkey : ∀ᶠ (n : ℕ) in atTop, ‖f n‖ ≠ 0\nr : ℝ\nhr₀ : 1 < r\nhr₁ : r < l\n⊢ ¬Summable f\n[PROOFSTEP]\nrefine' not_summable_of_ratio_norm_eventually_ge hr₀ key.frequently _\n[GOAL]\ncase intro.intro\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nl : ℝ\nhl : 1 < l\nh : Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)\nkey : ∀ᶠ (n : ℕ) in atTop, ‖f n‖ ≠ 0\nr : ℝ\nhr₀ : 1 < r\nhr₁ : r < l\n⊢ ∀ᶠ (n : ℕ) in atTop, r * ‖f n‖ ≤ ‖f (n + 1)‖\n[PROOFSTEP]\nfilter_upwards [eventually_ge_of_tendsto_gt hr₁ h, key] with _ _ h₁\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nι : Type u_3\nα : Type u_4\ninst✝ : SeminormedAddCommGroup α\nf : ℕ → α\nl : ℝ\nhl : 1 < l\nh : Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)\nkey : ∀ᶠ (n : ℕ) in atTop, ‖f n‖ ≠ 0\nr : ℝ\nhr₀ : 1 < r\nhr₁ : r < l\na✝¹ : ℕ\na✝ : r ≤ ‖f (a✝¹ + 1)‖ / ‖f a✝¹‖\nh₁ : ‖f a✝¹‖ ≠ 0\n⊢ r * ‖f a✝¹‖ ≤ ‖f (a✝¹ + 1)‖\n[PROOFSTEP]\nrwa [← le_div_iff (lt_of_le_of_ne (norm_nonneg _) h₁.symm)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Monotone f\nhf0 : Tendsto f atTop (𝓝 0)\nhgb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\n⊢ CauchySeq fun n => ∑ i in Finset.range (n + 1), f i • z i\n[PROOFSTEP]\nsimp_rw [Finset.sum_range_by_parts _ _ (Nat.succ _), sub_eq_add_neg, Nat.succ_sub_succ_eq_sub, tsub_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Monotone f\nhf0 : Tendsto f atTop (𝓝 0)\nhgb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\n⊢ CauchySeq fun n =>\n    f n • ∑ i in Finset.range (succ n), z i +\n      -∑ x in Finset.range n, (f (x + 1) + -f x) • ∑ i in Finset.range (x + 1), z i\n[PROOFSTEP]\napply\n  (NormedField.tendsto_zero_smul_of_tendsto_zero_of_bounded hf0\n      ⟨b, eventually_map.mpr <| eventually_of_forall fun n ↦ hgb <| n + 1⟩).cauchySeq.add\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Monotone f\nhf0 : Tendsto f atTop (𝓝 0)\nhgb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\n⊢ CauchySeq fun n => -∑ x in Finset.range n, (f (x + 1) + -f x) • ∑ i in Finset.range (x + 1), z i\n[PROOFSTEP]\nrefine' CauchySeq.neg _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Monotone f\nhf0 : Tendsto f atTop (𝓝 0)\nhgb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\n⊢ CauchySeq fun n => ∑ x in Finset.range n, (f (x + 1) + -f x) • ∑ i in Finset.range (x + 1), z i\n[PROOFSTEP]\nrefine'\n  cauchySeq_range_of_norm_bounded _ _\n    (fun n ↦ _ : ∀ n, ‖(f (n + 1) + -f n) • (Finset.range (n + 1)).sum z‖ ≤ b * |f (n + 1) - f n|)\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Monotone f\nhf0 : Tendsto f atTop (𝓝 0)\nhgb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\n⊢ CauchySeq fun n => ∑ i in Finset.range n, b * |f (i + 1) - f i|\n[PROOFSTEP]\nsimp_rw [abs_of_nonneg (sub_nonneg_of_le (hfa (Nat.le_succ _))), ← mul_sum]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Monotone f\nhf0 : Tendsto f atTop (𝓝 0)\nhgb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\n⊢ CauchySeq fun n => b * ∑ x in Finset.range n, (f (succ x) - f x)\n[PROOFSTEP]\napply Real.uniformContinuous_const_mul.comp_cauchySeq\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Monotone f\nhf0 : Tendsto f atTop (𝓝 0)\nhgb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\n⊢ CauchySeq fun n => ∑ x in Finset.range n, (f (succ x) - f x)\n[PROOFSTEP]\nsimp_rw [sum_range_sub, sub_eq_add_neg]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Monotone f\nhf0 : Tendsto f atTop (𝓝 0)\nhgb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\n⊢ CauchySeq fun n => f n + -f 0\n[PROOFSTEP]\nexact (Tendsto.cauchySeq hf0).add_const\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Monotone f\nhf0 : Tendsto f atTop (𝓝 0)\nhgb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\nn : ℕ\n⊢ ‖(f (n + 1) + -f n) • Finset.sum (Finset.range (n + 1)) z‖ ≤ b * |f (n + 1) - f n|\n[PROOFSTEP]\nrw [norm_smul, mul_comm]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Monotone f\nhf0 : Tendsto f atTop (𝓝 0)\nhgb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\nn : ℕ\n⊢ ‖Finset.sum (Finset.range (n + 1)) z‖ * ‖f (n + 1) + -f n‖ ≤ b * |f (n + 1) - f n|\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right (hgb _) (abs_nonneg _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Antitone f\nhf0 : Tendsto f atTop (𝓝 0)\nhzb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\n⊢ CauchySeq fun n => ∑ i in Finset.range (n + 1), f i • z i\n[PROOFSTEP]\nhave hfa' : Monotone fun n ↦ -f n := fun _ _ hab ↦ neg_le_neg <| hfa hab\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Antitone f\nhf0 : Tendsto f atTop (𝓝 0)\nhzb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\nhfa' : Monotone fun n => -f n\n⊢ CauchySeq fun n => ∑ i in Finset.range (n + 1), f i • z i\n[PROOFSTEP]\nhave hf0' : Tendsto (fun n ↦ -f n) atTop (𝓝 0) := by\n  convert hf0.neg\n  norm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Antitone f\nhf0 : Tendsto f atTop (𝓝 0)\nhzb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\nhfa' : Monotone fun n => -f n\n⊢ Tendsto (fun n => -f n) atTop (𝓝 0)\n[PROOFSTEP]\nconvert hf0.neg\n[GOAL]\ncase h.e'_5.h.e'_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Antitone f\nhf0 : Tendsto f atTop (𝓝 0)\nhzb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\nhfa' : Monotone fun n => -f n\n⊢ 0 = -0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Antitone f\nhf0 : Tendsto f atTop (𝓝 0)\nhzb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\nhfa' : Monotone fun n => -f n\nhf0' : Tendsto (fun n => -f n) atTop (𝓝 0)\n⊢ CauchySeq fun n => ∑ i in Finset.range (n + 1), f i • z i\n[PROOFSTEP]\nconvert (hfa'.cauchySeq_series_mul_of_tendsto_zero_of_bounded hf0' hzb).neg\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Antitone f\nhf0 : Tendsto f atTop (𝓝 0)\nhzb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\nhfa' : Monotone fun n => -f n\nhf0' : Tendsto (fun n => -f n) atTop (𝓝 0)\nx✝ : ℕ\n⊢ ∑ i in Finset.range (x✝ + 1), f i • z i = (-fun n => ∑ i in Finset.range (n + 1), -f i • z i) x✝\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Antitone f\nhf0 : Tendsto f atTop (𝓝 0)\nhzb : ∀ (n : ℕ), ‖∑ i in Finset.range n, z i‖ ≤ b\nhfa' : Monotone fun n => -f n\nhf0' : Tendsto (fun n => -f n) atTop (𝓝 0)\nx✝ : ℕ\n⊢ ∑ i in Finset.range (x✝ + 1), f i • z i = (-fun n => ∑ i in Finset.range (n + 1), -f i • z i) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nn : ℕ\n⊢ ‖∑ i in Finset.range n, (-1) ^ i‖ ≤ 1\n[PROOFSTEP]\nrw [neg_one_geom_sum]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nn : ℕ\n⊢ ‖if Even n then 0 else 1‖ ≤ 1\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nn : ℕ\nh✝ : Even n\n⊢ ‖0‖ ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nn : ℕ\nh✝ : ¬Even n\n⊢ ‖1‖ ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Monotone f\nhf0 : Tendsto f atTop (𝓝 0)\n⊢ CauchySeq fun n => ∑ i in Finset.range (n + 1), (-1) ^ i * f i\n[PROOFSTEP]\nsimp_rw [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Monotone f\nhf0 : Tendsto f atTop (𝓝 0)\n⊢ CauchySeq fun n => ∑ x in Finset.range (n + 1), f x * (-1) ^ x\n[PROOFSTEP]\nexact hfa.cauchySeq_series_mul_of_tendsto_zero_of_bounded hf0 norm_sum_neg_one_pow_le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Antitone f\nhf0 : Tendsto f atTop (𝓝 0)\n⊢ CauchySeq fun n => ∑ i in Finset.range (n + 1), (-1) ^ i * f i\n[PROOFSTEP]\nsimp_rw [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nb : ℝ\nf : ℕ → ℝ\nz : ℕ → E\nhfa : Antitone f\nhf0 : Tendsto f atTop (𝓝 0)\n⊢ CauchySeq fun n => ∑ x in Finset.range (n + 1), f x * (-1) ^ x\n[PROOFSTEP]\nexact hfa.cauchySeq_series_mul_of_tendsto_zero_of_bounded hf0 norm_sum_neg_one_pow_le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nx : ℝ\n⊢ Summable fun n => x ^ n / ↑n !\n[PROOFSTEP]\nhave A : (0 : ℝ) < ⌊‖x‖⌋₊ + 1 := zero_lt_one.trans_le (by simp)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nx : ℝ\n⊢ 1 ≤ ↑⌊‖x‖⌋₊ + 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nx : ℝ\nA : 0 < ↑⌊‖x‖⌋₊ + 1\n⊢ Summable fun n => x ^ n / ↑n !\n[PROOFSTEP]\nhave B : ‖x‖ / (⌊‖x‖⌋₊ + 1) < 1 :=\n  (div_lt_one A).2\n    (Nat.lt_floor_add_one _)\n      -- Then we apply the ratio test. The estimate works for `n ≥ ⌊‖x‖⌋₊`.\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nx : ℝ\nA : 0 < ↑⌊‖x‖⌋₊ + 1\nB : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1\n⊢ Summable fun n => x ^ n / ↑n !\n[PROOFSTEP]\nsuffices : ∀ n ≥ ⌊‖x‖⌋₊, ‖x ^ (n + 1) / (n + 1)!‖ ≤ ‖x‖ / (⌊‖x‖⌋₊ + 1) * ‖x ^ n / ↑n !‖\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nx : ℝ\nA : 0 < ↑⌊‖x‖⌋₊ + 1\nB : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1\nthis : ∀ (n : ℕ), n ≥ ⌊‖x‖⌋₊ → ‖x ^ (n + 1) / ↑(n + 1)!‖ ≤ ‖x‖ / (↑⌊‖x‖⌋₊ + 1) * ‖x ^ n / ↑n !‖\n⊢ Summable fun n => x ^ n / ↑n !\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nx : ℝ\nA : 0 < ↑⌊‖x‖⌋₊ + 1\nB : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1\n⊢ ∀ (n : ℕ), n ≥ ⌊‖x‖⌋₊ → ‖x ^ (n + 1) / ↑(n + 1)!‖ ≤ ‖x‖ / (↑⌊‖x‖⌋₊ + 1) * ‖x ^ n / ↑n !‖\n[PROOFSTEP]\nexact\n  summable_of_ratio_norm_eventually_le B\n    (eventually_atTop.2 ⟨⌊‖x‖⌋₊, this⟩)\n      -- Finally, we prove the upper estimate\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nx : ℝ\nA : 0 < ↑⌊‖x‖⌋₊ + 1\nB : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1\n⊢ ∀ (n : ℕ), n ≥ ⌊‖x‖⌋₊ → ‖x ^ (n + 1) / ↑(n + 1)!‖ ≤ ‖x‖ / (↑⌊‖x‖⌋₊ + 1) * ‖x ^ n / ↑n !‖\n[PROOFSTEP]\nintro n hn\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nx : ℝ\nA : 0 < ↑⌊‖x‖⌋₊ + 1\nB : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1\nn : ℕ\nhn : n ≥ ⌊‖x‖⌋₊\n⊢ ‖x ^ (n + 1) / ↑(n + 1)!‖ ≤ ‖x‖ / (↑⌊‖x‖⌋₊ + 1) * ‖x ^ n / ↑n !‖\n[PROOFSTEP]\ncalc\n  ‖x ^ (n + 1) / (n + 1)!‖ = ‖x‖ / (n + 1) * ‖x ^ n / (n !)‖ := by\n    rw [_root_.pow_succ, Nat.factorial_succ, Nat.cast_mul, ← _root_.div_mul_div_comm, norm_mul, norm_div,\n      Real.norm_coe_nat, Nat.cast_succ]\n  _ ≤ ‖x‖ / (⌊‖x‖⌋₊ + 1) * ‖x ^ n / (n !)‖ :=\n    -- Porting note: this was `by mono* with 0 ≤ ‖x ^ n / (n !)‖, 0 ≤ ‖x‖ <;> apply norm_nonneg`\n          -- but we can't wait on `mono`.mul_le_mul_of_nonneg_right\n      (div_le_div (norm_nonneg x) (le_refl ‖x‖) A (add_le_add (mono_cast hn) (le_refl 1))) (norm_nonneg (x ^ n / n !))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nx : ℝ\nA : 0 < ↑⌊‖x‖⌋₊ + 1\nB : ‖x‖ / (↑⌊‖x‖⌋₊ + 1) < 1\nn : ℕ\nhn : n ≥ ⌊‖x‖⌋₊\n⊢ ‖x ^ (n + 1) / ↑(n + 1)!‖ = ‖x‖ / (↑n + 1) * ‖x ^ n / ↑n !‖\n[PROOFSTEP]\nrw [_root_.pow_succ, Nat.factorial_succ, Nat.cast_mul, ← _root_.div_mul_div_comm, norm_mul, norm_div, Real.norm_coe_nat,\n  Nat.cast_succ]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecificLimits.Normed", "llama_tokens": 73337, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6791786861878392, "lm_q2_score": 0.5583269943353745, "lm_q1q2_score": 0.37920379447590474}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\n⊢ inv (inv r) = r\n[PROOFSTEP]\next x y\n[GOAL]\ncase a.h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\nx : α\ny : β\n⊢ inv (inv r) x y ↔ r x y\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\n⊢ codom (inv r) = dom r\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\nx : α\n⊢ x ∈ codom (inv r) ↔ x ∈ dom r\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\n⊢ dom (inv r) = codom r\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\nx : β\n⊢ x ∈ dom (inv r) ↔ x ∈ codom r\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : Rel α β\nδ : Type u_4\nr : Rel α β\ns : Rel β γ\nt : Rel γ δ\n⊢ (r • s) • t = r • s • t\n[PROOFSTEP]\nunfold comp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : Rel α β\nδ : Type u_4\nr : Rel α β\ns : Rel β γ\nt : Rel γ δ\n⊢ (fun x z => ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y z) = fun x z => ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 z\n[PROOFSTEP]\next (x w)\n[GOAL]\ncase a.h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : Rel α β\nδ : Type u_4\nr : Rel α β\ns : Rel β γ\nt : Rel γ δ\nx : α\nw : δ\n⊢ (∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y w) ↔ ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 w\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.h.a.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : Rel α β\nδ : Type u_4\nr : Rel α β\ns : Rel β γ\nt : Rel γ δ\nx : α\nw : δ\n⊢ (∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y w) → ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 w\n[PROOFSTEP]\nrintro ⟨z, ⟨y, rxy, syz⟩, tzw⟩\n[GOAL]\ncase a.h.a.mp.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : Rel α β\nδ : Type u_4\nr : Rel α β\ns : Rel β γ\nt : Rel γ δ\nx : α\nw : δ\nz : γ\ntzw : t z w\ny : β\nrxy : r x y\nsyz : s y z\n⊢ ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 w\n[PROOFSTEP]\nexact ⟨y, rxy, z, syz, tzw⟩\n[GOAL]\ncase a.h.a.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : Rel α β\nδ : Type u_4\nr : Rel α β\ns : Rel β γ\nt : Rel γ δ\nx : α\nw : δ\n⊢ (∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 w) → ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y w\n[PROOFSTEP]\nrintro ⟨y, rxy, z, syz, tzw⟩\n[GOAL]\ncase a.h.a.mpr.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : Rel α β\nδ : Type u_4\nr : Rel α β\ns : Rel β γ\nt : Rel γ δ\nx : α\nw : δ\ny : β\nrxy : r x y\nz : γ\nsyz : s y z\ntzw : t z w\n⊢ ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y w\n[PROOFSTEP]\nexact ⟨z, ⟨y, rxy, syz⟩, tzw⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r : Rel α β\n⊢ r • Eq = r\n[PROOFSTEP]\nunfold comp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r : Rel α β\n⊢ (fun x z => ∃ y, r x y ∧ y = z) = r\n[PROOFSTEP]\next y\n[GOAL]\ncase a.h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r : Rel α β\ny : α\nx✝ : β\n⊢ (∃ y_1, r y y_1 ∧ y_1 = x✝) ↔ r y x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r : Rel α β\n⊢ Eq • r = r\n[PROOFSTEP]\nunfold comp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r : Rel α β\n⊢ (fun x z => ∃ y, x = y ∧ r y z) = r\n[PROOFSTEP]\next x\n[GOAL]\ncase a.h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r : Rel α β\nx : α\nx✝ : β\n⊢ (∃ y, x = y ∧ r y x✝) ↔ r x x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\n⊢ inv Eq = Eq\n[PROOFSTEP]\next x y\n[GOAL]\ncase a.h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\nx y : α\n⊢ inv Eq x y ↔ x = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.h.a.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\nx y : α\n⊢ inv Eq x y → x = y\n[PROOFSTEP]\napply Eq.symm\n[GOAL]\ncase a.h.a.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\nx y : α\n⊢ x = y → inv Eq x y\n[PROOFSTEP]\napply Eq.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r : Rel α β\ns : Rel β γ\n⊢ inv (r • s) = inv s • inv r\n[PROOFSTEP]\next x z\n[GOAL]\ncase a.h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ r : Rel α β\ns : Rel β γ\nx : γ\nz : α\n⊢ inv (r • s) x z ↔ (inv s • inv r) x z\n[PROOFSTEP]\nsimp [comp, inv, flip, and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Set α\n⊢ image Eq s = s\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Set α\nx : α\n⊢ x ∈ image Eq s ↔ x ∈ s\n[PROOFSTEP]\nsimp [mem_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set α\n⊢ image (r • s) t = image s (image r t)\n[PROOFSTEP]\next z\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set α\nz : γ\n⊢ z ∈ image (r • s) t ↔ z ∈ image s (image r t)\n[PROOFSTEP]\nsimp only [mem_image]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set α\nz : γ\n⊢ (∃ x, x ∈ t ∧ (r • s) x z) ↔ ∃ x, (∃ x_1, x_1 ∈ t ∧ r x_1 x) ∧ s x z\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set α\nz : γ\n⊢ (∃ x, x ∈ t ∧ (r • s) x z) → ∃ x, (∃ x_1, x_1 ∈ t ∧ r x_1 x) ∧ s x z\n[PROOFSTEP]\nrintro ⟨x, xt, y, rxy, syz⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set α\nz : γ\nx : α\nxt : x ∈ t\ny : β\nrxy : r x y\nsyz : s y z\n⊢ ∃ x, (∃ x_1, x_1 ∈ t ∧ r x_1 x) ∧ s x z\n[PROOFSTEP]\nexact ⟨y, ⟨x, xt, rxy⟩, syz⟩\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set α\nz : γ\n⊢ (∃ x, (∃ x_1, x_1 ∈ t ∧ r x_1 x) ∧ s x z) → ∃ x, x ∈ t ∧ (r • s) x z\n[PROOFSTEP]\nrintro ⟨y, ⟨x, xt, rxy⟩, syz⟩\n[GOAL]\ncase h.mpr.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set α\nz : γ\ny : β\nsyz : s y z\nx : α\nxt : x ∈ t\nrxy : r x y\n⊢ ∃ x, x ∈ t ∧ (r • s) x z\n[PROOFSTEP]\nexact ⟨x, xt, y, rxy, syz⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\n⊢ image r Set.univ = codom r\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ny : β\n⊢ y ∈ image r Set.univ ↔ y ∈ codom r\n[PROOFSTEP]\nsimp [mem_image, codom]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Set α\n⊢ preimage Eq s = s\n[PROOFSTEP]\nsimp only [preimage, inv_id, image_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set γ\n⊢ preimage (r • s) t = preimage r (preimage s t)\n[PROOFSTEP]\nsimp only [preimage, inv_comp, image_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\n⊢ preimage r Set.univ = dom r\n[PROOFSTEP]\nrw [preimage, image_univ, codom_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns t : Set β\n⊢ ∀ (x : α), x ∈ core r (s ∩ t) ↔ x ∈ core r s ∩ core r t\n[PROOFSTEP]\nsimp [mem_core, imp_and, forall_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\n⊢ ∀ (x : α), x ∈ core r Set.univ ↔ x ∈ Set.univ\n[PROOFSTEP]\nsimp [mem_core]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Set α\n⊢ core Eq s = s\n[PROOFSTEP]\nsimp [core]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set γ\n⊢ core (r • s) t = core r (core s t)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set γ\nx : α\n⊢ x ∈ core (r • s) t ↔ x ∈ core r (core s t)\n[PROOFSTEP]\nsimp [core, comp]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set γ\nx : α\n⊢ (∀ (y : γ) (x_1 : β), r x x_1 → s x_1 y → y ∈ t) ↔ ∀ (y : β), r x y → ∀ (y_1 : γ), s y y_1 → y_1 ∈ t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set γ\nx : α\n⊢ (∀ (y : γ) (x_1 : β), r x x_1 → s x_1 y → y ∈ t) → ∀ (y : β), r x y → ∀ (y_1 : γ), s y y_1 → y_1 ∈ t\n[PROOFSTEP]\nexact fun h y rxy z => h z y rxy\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : Rel α β\ns : Rel β γ\nt : Set γ\nx : α\n⊢ (∀ (y : β), r x y → ∀ (y_1 : γ), s y y_1 → y_1 ∈ t) → ∀ (y : γ) (x_1 : β), r x x_1 → s x_1 y → y ∈ t\n[PROOFSTEP]\nexact fun h z y rzy => h y rzy z\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns : Set α\n⊢ f '' s = Rel.image (Function.graph f) s\n[PROOFSTEP]\nsimp [Set.image, Function.graph, Rel.image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns : Set β\n⊢ f ⁻¹' s = Rel.preimage (Function.graph f) s\n[PROOFSTEP]\nsimp [Set.preimage, Function.graph, Rel.preimage, Rel.inv, flip, Rel.image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns : Set β\n⊢ f ⁻¹' s = Rel.core (Function.graph f) s\n[PROOFSTEP]\nsimp [Set.preimage, Function.graph, Rel.core]\n", "meta": {"mathlib_filename": "Mathlib.Data.Rel", "llama_tokens": 4722, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.665410572017153, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.3791859787429856}}
{"text": "[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d : C\nf : c ⟶ d\n⊢ Groupoid.inv f ∈ arrows S d c ↔ f ∈ arrows S c d\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d : C\nf : c ⟶ d\n⊢ Groupoid.inv f ∈ arrows S d c → f ∈ arrows S c d\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d : C\nf : c ⟶ d\nh : Groupoid.inv f ∈ arrows S d c\n⊢ f ∈ arrows S c d\n[PROOFSTEP]\nsimpa only [inv_eq_inv, IsIso.inv_inv] using S.inv h\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d : C\nf : c ⟶ d\n⊢ f ∈ arrows S c d → Groupoid.inv f ∈ arrows S d c\n[PROOFSTEP]\napply S.inv\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d e : C\nf : c ⟶ d\ng : d ⟶ e\nhf : f ∈ arrows S c d\n⊢ f ≫ g ∈ arrows S c e ↔ g ∈ arrows S d e\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d e : C\nf : c ⟶ d\ng : d ⟶ e\nhf : f ∈ arrows S c d\n⊢ f ≫ g ∈ arrows S c e → g ∈ arrows S d e\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d e : C\nf : c ⟶ d\ng : d ⟶ e\nhf : f ∈ arrows S c d\nh : f ≫ g ∈ arrows S c e\n⊢ g ∈ arrows S d e\n[PROOFSTEP]\nsuffices Groupoid.inv f ≫ f ≫ g ∈ S.arrows d e by simpa only [inv_eq_inv, IsIso.inv_hom_id_assoc] using this\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d e : C\nf : c ⟶ d\ng : d ⟶ e\nhf : f ∈ arrows S c d\nh : f ≫ g ∈ arrows S c e\nthis : Groupoid.inv f ≫ f ≫ g ∈ arrows S d e\n⊢ g ∈ arrows S d e\n[PROOFSTEP]\nsimpa only [inv_eq_inv, IsIso.inv_hom_id_assoc] using this\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d e : C\nf : c ⟶ d\ng : d ⟶ e\nhf : f ∈ arrows S c d\nh : f ≫ g ∈ arrows S c e\n⊢ Groupoid.inv f ≫ f ≫ g ∈ arrows S d e\n[PROOFSTEP]\napply S.mul (S.inv hf) h\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d e : C\nf : c ⟶ d\ng : d ⟶ e\nhf : f ∈ arrows S c d\n⊢ g ∈ arrows S d e → f ≫ g ∈ arrows S c e\n[PROOFSTEP]\napply S.mul hf\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d e : C\nf : c ⟶ d\ng : d ⟶ e\nhg : g ∈ arrows S d e\n⊢ f ≫ g ∈ arrows S c e ↔ f ∈ arrows S c d\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d e : C\nf : c ⟶ d\ng : d ⟶ e\nhg : g ∈ arrows S d e\n⊢ f ≫ g ∈ arrows S c e → f ∈ arrows S c d\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d e : C\nf : c ⟶ d\ng : d ⟶ e\nhg : g ∈ arrows S d e\nh : f ≫ g ∈ arrows S c e\n⊢ f ∈ arrows S c d\n[PROOFSTEP]\nsuffices (f ≫ g) ≫ Groupoid.inv g ∈ S.arrows c d by\n  simpa only [inv_eq_inv, IsIso.hom_inv_id, Category.comp_id, Category.assoc] using this\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d e : C\nf : c ⟶ d\ng : d ⟶ e\nhg : g ∈ arrows S d e\nh : f ≫ g ∈ arrows S c e\nthis : (f ≫ g) ≫ Groupoid.inv g ∈ arrows S c d\n⊢ f ∈ arrows S c d\n[PROOFSTEP]\nsimpa only [inv_eq_inv, IsIso.hom_inv_id, Category.comp_id, Category.assoc] using this\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d e : C\nf : c ⟶ d\ng : d ⟶ e\nhg : g ∈ arrows S d e\nh : f ≫ g ∈ arrows S c e\n⊢ (f ≫ g) ≫ Groupoid.inv g ∈ arrows S c d\n[PROOFSTEP]\napply S.mul h (S.inv hg)\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d e : C\nf : c ⟶ d\ng : d ⟶ e\nhg : g ∈ arrows S d e\n⊢ f ∈ arrows S c d → f ≫ g ∈ arrows S c e\n[PROOFSTEP]\nexact fun hf => S.mul hf hg\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc : C\n⊢ c ∈ objs S → 𝟙 c ∈ arrows S c c\n[PROOFSTEP]\nrintro ⟨γ, hγ⟩\n[GOAL]\ncase intro\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc : C\nγ : c ⟶ c\nhγ : γ ∈ arrows S c c\n⊢ 𝟙 c ∈ arrows S c c\n[PROOFSTEP]\nconvert S.mul hγ (S.inv hγ)\n[GOAL]\ncase h.e'_4\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc : C\nγ : c ⟶ c\nhγ : γ ∈ arrows S c c\n⊢ 𝟙 c = γ ≫ Groupoid.inv γ\n[PROOFSTEP]\nsimp only [inv_eq_inv, IsIso.hom_inv_id]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d : ↑(objs S)\np : c ⟶ d\n⊢ ↑(inv p) = inv ↑p\n[PROOFSTEP]\nsimp only [← inv_eq_inv, coe_inv_coe]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ Function.Injective (hom S).toPrefunctor.obj\n[PROOFSTEP]\nrintro ⟨c, hc⟩ ⟨d, hd⟩ hcd\n[GOAL]\ncase mk.mk\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc : C\nhc : c ∈ objs S\nd : C\nhd : d ∈ objs S\nhcd : (hom S).obj { val := c, property := hc } = (hom S).obj { val := d, property := hd }\n⊢ { val := c, property := hc } = { val := d, property := hd }\n[PROOFSTEP]\nsimp only [Subtype.mk_eq_mk]\n[GOAL]\ncase mk.mk\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc : C\nhc : c ∈ objs S\nd : C\nhd : d ∈ objs S\nhcd : (hom S).obj { val := c, property := hc } = (hom S).obj { val := d, property := hd }\n⊢ c = d\n[PROOFSTEP]\nexact hcd\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ ∀ (c d : ↑(objs S)), Function.Injective fun f => (hom S).map f\n[PROOFSTEP]\nrintro ⟨c, hc⟩ ⟨d, hd⟩ ⟨f, hf⟩ ⟨g, hg⟩ hfg\n[GOAL]\ncase mk.mk.mk.mk\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc : C\nhc : c ∈ objs S\nd : C\nhd : d ∈ objs S\nf : ↑{ val := c, property := hc } ⟶ ↑{ val := d, property := hd }\nhf : f ∈ arrows S ↑{ val := c, property := hc } ↑{ val := d, property := hd }\ng : ↑{ val := c, property := hc } ⟶ ↑{ val := d, property := hd }\nhg : g ∈ arrows S ↑{ val := c, property := hc } ↑{ val := d, property := hd }\nhfg : (fun f => (hom S).map f) { val := f, property := hf } = (fun f => (hom S).map f) { val := g, property := hg }\n⊢ { val := f, property := hf } = { val := g, property := hg }\n[PROOFSTEP]\nexact Subtype.eq hfg\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS✝ x✝¹ x✝ : Subgroupoid C\nS : (c d : C) → Set (c ⟶ d)\ninv✝¹ : ∀ {c d : C} {p : c ⟶ d}, p ∈ S c d → Groupoid.inv p ∈ S d c\nmul✝¹ : ∀ {c d e : C} {p : c ⟶ d}, p ∈ S c d → ∀ {q : d ⟶ e}, q ∈ S d e → p ≫ q ∈ S c e\nT : (c d : C) → Set (c ⟶ d)\ninv✝ : ∀ {c d : C} {p : c ⟶ d}, p ∈ T c d → Groupoid.inv p ∈ T d c\nmul✝ : ∀ {c d e : C} {p : c ⟶ d}, p ∈ T c d → ∀ {q : d ⟶ e}, q ∈ T d e → p ≫ q ∈ T c e\nh : ↑{ arrows := S, inv := inv✝¹, mul := mul✝¹ } = ↑{ arrows := T, inv := inv✝, mul := mul✝ }\n⊢ { arrows := S, inv := inv✝¹, mul := mul✝¹ } = { arrows := T, inv := inv✝, mul := mul✝ }\n[PROOFSTEP]\next c d f\n[GOAL]\ncase arrows.h.h.h\nC : Type u\ninst✝ : Groupoid C\nS✝ x✝¹ x✝ : Subgroupoid C\nS : (c d : C) → Set (c ⟶ d)\ninv✝¹ : ∀ {c d : C} {p : c ⟶ d}, p ∈ S c d → Groupoid.inv p ∈ S d c\nmul✝¹ : ∀ {c d e : C} {p : c ⟶ d}, p ∈ S c d → ∀ {q : d ⟶ e}, q ∈ S d e → p ≫ q ∈ S c e\nT : (c d : C) → Set (c ⟶ d)\ninv✝ : ∀ {c d : C} {p : c ⟶ d}, p ∈ T c d → Groupoid.inv p ∈ T d c\nmul✝ : ∀ {c d e : C} {p : c ⟶ d}, p ∈ T c d → ∀ {q : d ⟶ e}, q ∈ T d e → p ≫ q ∈ T c e\nh : ↑{ arrows := S, inv := inv✝¹, mul := mul✝¹ } = ↑{ arrows := T, inv := inv✝, mul := mul✝ }\nc d : C\nf : c ⟶ d\n⊢ f ∈ arrows { arrows := S, inv := inv✝¹, mul := mul✝¹ } c d ↔ f ∈ arrows { arrows := T, inv := inv✝, mul := mul✝ } c d\n[PROOFSTEP]\napply Set.ext_iff.1 h ⟨c, d, f⟩\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS✝ S T : Subgroupoid C\n⊢ S ≤ T ↔ ∀ {c d : C}, arrows S c d ⊆ arrows T c d\n[PROOFSTEP]\nrw [SetLike.le_def, Sigma.forall]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS✝ S T : Subgroupoid C\n⊢ (∀ (a : C) (b : (d : C) × (a ⟶ d)), { fst := a, snd := b } ∈ S → { fst := a, snd := b } ∈ T) ↔\n    ∀ {c d : C}, arrows S c d ⊆ arrows T c d\n[PROOFSTEP]\nexact forall_congr' fun c => Sigma.forall\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ ∀ {c d : C} {p : c ⟶ d}, p ∈ (fun x x_1 => univ) c d → Groupoid.inv p ∈ (fun x x_1 => univ) d c\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc✝ d✝ : C\np✝ : c✝ ⟶ d✝\na✝ : p✝ ∈ (fun x x_1 => univ) c✝ d✝\n⊢ Groupoid.inv p✝ ∈ (fun x x_1 => univ) d✝ c✝\n[PROOFSTEP]\ntrivial\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ ∀ {c d e : C} {p : c ⟶ d},\n    p ∈ (fun x x_1 => univ) c d → ∀ {q : d ⟶ e}, q ∈ (fun x x_1 => univ) d e → p ≫ q ∈ (fun x x_1 => univ) c e\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc✝ d✝ e✝ : C\np✝ : c✝ ⟶ d✝\na✝¹ : p✝ ∈ (fun x x_1 => univ) c✝ d✝\nq✝ : d✝ ⟶ e✝\na✝ : q✝ ∈ (fun x x_1 => univ) d✝ e✝\n⊢ p✝ ≫ q✝ ∈ (fun x x_1 => univ) c✝ e✝\n[PROOFSTEP]\ntrivial\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc : C\n⊢ c ∈ objs ⊤\n[PROOFSTEP]\ndsimp [Top.top, objs]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc : C\n⊢ Set.Nonempty univ\n[PROOFSTEP]\nsimp only [univ_nonempty]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\ns : Set (Subgroupoid C)\nc✝ d✝ : C\np✝ : c✝ ⟶ d✝\nhp : p✝ ∈ (fun c d => ⋂ (S : Subgroupoid C) (_ : S ∈ s), arrows S c d) c✝ d✝\n⊢ Groupoid.inv p✝ ∈ (fun c d => ⋂ (S : Subgroupoid C) (_ : S ∈ s), arrows S c d) d✝ c✝\n[PROOFSTEP]\nrw [mem_iInter₂] at hp ⊢\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\ns : Set (Subgroupoid C)\nc✝ d✝ : C\np✝ : c✝ ⟶ d✝\nhp : ∀ (i : Subgroupoid C), i ∈ s → p✝ ∈ arrows i c✝ d✝\n⊢ ∀ (i : Subgroupoid C), i ∈ s → Groupoid.inv p✝ ∈ arrows i d✝ c✝\n[PROOFSTEP]\nexact fun S hS => S.inv (hp S hS)\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\ns : Set (Subgroupoid C)\nc✝ d✝ e✝ : C\np✝ : c✝ ⟶ d✝\nhp : p✝ ∈ (fun c d => ⋂ (S : Subgroupoid C) (_ : S ∈ s), arrows S c d) c✝ d✝\nx✝ : d✝ ⟶ e✝\nhq : x✝ ∈ (fun c d => ⋂ (S : Subgroupoid C) (_ : S ∈ s), arrows S c d) d✝ e✝\n⊢ p✝ ≫ x✝ ∈ (fun c d => ⋂ (S : Subgroupoid C) (_ : S ∈ s), arrows S c d) c✝ e✝\n[PROOFSTEP]\nrw [mem_iInter₂] at hp hq ⊢\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\ns : Set (Subgroupoid C)\nc✝ d✝ e✝ : C\np✝ : c✝ ⟶ d✝\nhp : ∀ (i : Subgroupoid C), i ∈ s → p✝ ∈ arrows i c✝ d✝\nx✝ : d✝ ⟶ e✝\nhq : ∀ (i : Subgroupoid C), i ∈ s → x✝ ∈ arrows i d✝ e✝\n⊢ ∀ (i : Subgroupoid C), i ∈ s → p✝ ≫ x✝ ∈ arrows i c✝ e✝\n[PROOFSTEP]\nexact fun S hS => S.mul (hp S hS) (hq S hS)\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ ∀ (s : Set (Subgroupoid C)), IsGLB s (sInf s)\n[PROOFSTEP]\nrefine' fun s => ⟨fun S Ss F => _, fun T Tl F fT => _⟩\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝ : Groupoid C\nS✝ : Subgroupoid C\ns : Set (Subgroupoid C)\nS : Subgroupoid C\nSs : S ∈ s\nF : (c : C) × (d : C) × (c ⟶ d)\n⊢ F ∈ sInf s → F ∈ S\n[PROOFSTEP]\nsimp only [mem_sInf]\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\ns : Set (Subgroupoid C)\nT : Subgroupoid C\nTl : T ∈ lowerBounds s\nF : (c : C) × (d : C) × (c ⟶ d)\nfT : F ∈ T\n⊢ F ∈ sInf s\n[PROOFSTEP]\nsimp only [mem_sInf]\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝ : Groupoid C\nS✝ : Subgroupoid C\ns : Set (Subgroupoid C)\nS : Subgroupoid C\nSs : S ∈ s\nF : (c : C) × (d : C) × (c ⟶ d)\n⊢ (∀ (S : Subgroupoid C), S ∈ s → F ∈ S) → F ∈ S\ncase refine'_2\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\ns : Set (Subgroupoid C)\nT : Subgroupoid C\nTl : T ∈ lowerBounds s\nF : (c : C) × (d : C) × (c ⟶ d)\nfT : F ∈ T\n⊢ ∀ (S : Subgroupoid C), S ∈ s → F ∈ S\n[PROOFSTEP]\nexacts [fun hp => hp S Ss, fun S Ss => Tl Ss fT]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS✝ S T : Subgroupoid C\nh : S ≤ T\nx✝¹ x✝ : ↑(objs S)\ns : C\nhs : s ∈ objs S\nt : C\nht : t ∈ objs S\n⊢ (inclusion h).obj { val := s, property := hs } = (inclusion h).obj { val := t, property := ht } →\n    { val := s, property := hs } = { val := t, property := ht }\n[PROOFSTEP]\nsimpa only [inclusion, Subtype.mk_eq_mk] using id\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS✝ S T : Subgroupoid C\nh : S ≤ T\ns t : ↑(objs S)\nx✝¹ x✝ : s ⟶ t\nf : ↑s ⟶ ↑t\nhf : f ∈ arrows S ↑s ↑t\ng : ↑s ⟶ ↑t\nhg : g ∈ arrows S ↑s ↑t\n⊢ (fun f => (inclusion h).map f) { val := f, property := hf } =\n      (fun f => (inclusion h).map f) { val := g, property := hg } →\n    { val := f, property := hf } = { val := g, property := hg }\n[PROOFSTEP]\ndsimp only [inclusion]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS✝ S T : Subgroupoid C\nh : S ≤ T\ns t : ↑(objs S)\nx✝¹ x✝ : s ⟶ t\nf : ↑s ⟶ ↑t\nhf : f ∈ arrows S ↑s ↑t\ng : ↑s ⟶ ↑t\nhg : g ∈ arrows S ↑s ↑t\n⊢ { val := f, property := (_ : { fst := ↑s, snd := { fst := ↑t, snd := ↑{ val := f, property := hf } } } ∈ T) } =\n      { val := g, property := (_ : { fst := ↑s, snd := { fst := ↑t, snd := ↑{ val := g, property := hg } } } ∈ T) } →\n    { val := f, property := hf } = { val := g, property := hg }\n[PROOFSTEP]\nrw [Subtype.mk_eq_mk, Subtype.mk_eq_mk]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS✝ S T : Subgroupoid C\nh : S ≤ T\ns t : ↑(objs S)\nx✝¹ x✝ : s ⟶ t\nf : ↑s ⟶ ↑t\nhf : f ∈ arrows S ↑s ↑t\ng : ↑s ⟶ ↑t\nhg : g ∈ arrows S ↑s ↑t\n⊢ f = g → f = g\n[PROOFSTEP]\nexact id\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ ∀ {c d : C} {p : c ⟶ d},\n    p ∈ (fun c d => {p | Discrete.Arrows c d p}) c d → Groupoid.inv p ∈ (fun c d => {p | Discrete.Arrows c d p}) d c\n[PROOFSTEP]\nrintro _ _ _ ⟨⟩\n[GOAL]\ncase id\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc✝ d : C\n⊢ Groupoid.inv (𝟙 c✝) ∈ (fun c d => {p | Discrete.Arrows c d p}) c✝ c✝\n[PROOFSTEP]\nsimp only [inv_eq_inv, IsIso.inv_id]\n[GOAL]\ncase id\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc✝ d : C\n⊢ 𝟙 c✝ ∈ {p | Discrete.Arrows c✝ c✝ p}\n[PROOFSTEP]\nconstructor\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ ∀ {c d e : C} {p : c ⟶ d},\n    p ∈ (fun c d => {p | Discrete.Arrows c d p}) c d →\n      ∀ {q : d ⟶ e},\n        q ∈ (fun c d => {p | Discrete.Arrows c d p}) d e → p ≫ q ∈ (fun c d => {p | Discrete.Arrows c d p}) c e\n[PROOFSTEP]\nrintro _ _ _ _ ⟨⟩ _ ⟨⟩\n[GOAL]\ncase id.id\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc✝ d✝ d : C\n⊢ 𝟙 c✝ ≫ 𝟙 c✝ ∈ (fun c d => {p | Discrete.Arrows c d p}) c✝ c✝\n[PROOFSTEP]\nrw [Category.comp_id]\n[GOAL]\ncase id.id\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc✝ d✝ d : C\n⊢ 𝟙 c✝ ∈ (fun c d => {p | Discrete.Arrows c d p}) c✝ c✝\n[PROOFSTEP]\nconstructor\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d : C\nf : c ⟶ d\n⊢ f ∈ arrows discrete c d → ∃ h, f = eqToHom h\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase id\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d : C\n⊢ ∃ h, 𝟙 c = eqToHom h\n[PROOFSTEP]\nexact ⟨rfl, rfl⟩\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc d : C\nf : c ⟶ d\n⊢ (∃ h, f = eqToHom h) → f ∈ arrows discrete c d\n[PROOFSTEP]\nrintro ⟨rfl, rfl⟩\n[GOAL]\ncase intro\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc : C\n⊢ eqToHom (_ : c = c) ∈ arrows discrete c c\n[PROOFSTEP]\nconstructor\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ IsWide S ↔ objs S = univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ IsWide S → objs S = univ\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nh : IsWide S\n⊢ objs S = univ\n[PROOFSTEP]\next x\n[GOAL]\ncase mp.h\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nh : IsWide S\nx : C\n⊢ x ∈ objs S ↔ x ∈ univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.h.mp\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nh : IsWide S\nx : C\n⊢ x ∈ objs S → x ∈ univ\n[PROOFSTEP]\nsimp only [top_eq_univ, mem_univ, imp_true_iff, forall_true_left]\n[GOAL]\ncase mp.h.mpr\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nh : IsWide S\nx : C\n⊢ x ∈ univ → x ∈ objs S\n[PROOFSTEP]\nsimp only [top_eq_univ, mem_univ, imp_true_iff, forall_true_left]\n[GOAL]\ncase mp.h.mpr\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nh : IsWide S\nx : C\n⊢ x ∈ objs S\n[PROOFSTEP]\napply mem_objs_of_src S (h.wide x)\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ objs S = univ → IsWide S\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nh : objs S = univ\n⊢ IsWide S\n[PROOFSTEP]\nrefine' ⟨fun c => _⟩\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nh : objs S = univ\nc : C\n⊢ 𝟙 c ∈ arrows S c c\n[PROOFSTEP]\nobtain ⟨γ, γS⟩ := (le_of_eq h.symm : ⊤ ⊆ S.objs) (Set.mem_univ c)\n[GOAL]\ncase mpr.intro\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nh : objs S = univ\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\n⊢ 𝟙 c ∈ arrows S c c\n[PROOFSTEP]\nexact id_mem_of_src S γS\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS✝ S : Subgroupoid C\nSw : IsWide S\nc d : C\nh : c = d\n⊢ eqToHom h ∈ arrows S c d\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nC : Type u\ninst✝ : Groupoid C\nS✝ S : Subgroupoid C\nSw : IsWide S\nc : C\n⊢ eqToHom (_ : c = c) ∈ arrows S c c\n[PROOFSTEP]\nsimp only [eqToHom_refl]\n[GOAL]\ncase refl\nC : Type u\ninst✝ : Groupoid C\nS✝ S : Subgroupoid C\nSw : IsWide S\nc : C\n⊢ 𝟙 c ∈ arrows S c c\n[PROOFSTEP]\napply Sw.id_mem c\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS✝ S : Subgroupoid C\nSn : IsNormal S\nc✝ d✝ : C\np : d✝ ⟶ c✝\nγ : c✝ ⟶ c✝\nhs : γ ∈ arrows S c✝ c✝\n⊢ p ≫ γ ≫ Groupoid.inv p ∈ arrows S d✝ d✝\n[PROOFSTEP]\nconvert Sn.conj (Groupoid.inv p) hs\n[GOAL]\ncase h.e'_4.h.e'_6\nC : Type u\ninst✝ : Groupoid C\nS✝ S : Subgroupoid C\nSn : IsNormal S\nc✝ d✝ : C\np : d✝ ⟶ c✝\nγ : c✝ ⟶ c✝\nhs : γ ∈ arrows S c✝ c✝\n⊢ p = Groupoid.inv (Groupoid.inv p)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nSn : IsNormal S\nc d : C\np : c ⟶ d\n⊢ BijOn (fun γ => Groupoid.inv p ≫ γ ≫ p) (arrows S c c) (arrows S d d)\n[PROOFSTEP]\nrefine' ⟨fun γ γS => Sn.conj p γS, fun γ₁ _ γ₂ _ h => _, fun δ δS => ⟨p ≫ δ ≫ Groupoid.inv p, Sn.conj' p δS, _⟩⟩\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nSn : IsNormal S\nc d : C\np : c ⟶ d\nγ₁ : c ⟶ c\nx✝¹ : γ₁ ∈ arrows S c c\nγ₂ : c ⟶ c\nx✝ : γ₂ ∈ arrows S c c\nh : (fun γ => Groupoid.inv p ≫ γ ≫ p) γ₁ = (fun γ => Groupoid.inv p ≫ γ ≫ p) γ₂\n⊢ γ₁ = γ₂\n[PROOFSTEP]\nsimpa only [inv_eq_inv, Category.assoc, IsIso.hom_inv_id, Category.comp_id, IsIso.hom_inv_id_assoc] using\n  p ≫= h =≫ inv p\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nSn : IsNormal S\nc d : C\np : c ⟶ d\nδ : d ⟶ d\nδS : δ ∈ arrows S d d\n⊢ (fun γ => Groupoid.inv p ≫ γ ≫ p) (p ≫ δ ≫ Groupoid.inv p) = δ\n[PROOFSTEP]\nsimp only [inv_eq_inv, Category.assoc, IsIso.inv_hom_id, Category.comp_id, IsIso.inv_hom_id_assoc]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\ns : Set (Subgroupoid C)\nsn : ∀ (S : Subgroupoid C), S ∈ s → IsNormal S\n⊢ ∀ (c : C), 𝟙 c ∈ arrows (sInf s) c c\n[PROOFSTEP]\nsimp_rw [sInf, mem_iInter₂]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\ns : Set (Subgroupoid C)\nsn : ∀ (S : Subgroupoid C), S ∈ s → IsNormal S\n⊢ ∀ (c : C) (i : Subgroupoid C), i ∈ s → 𝟙 c ∈ arrows i c c\n[PROOFSTEP]\nexact fun c S Ss => (sn S Ss).wide c\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\ns : Set (Subgroupoid C)\nsn : ∀ (S : Subgroupoid C), S ∈ s → IsNormal S\n⊢ ∀ {c d : C} (p : c ⟶ d) {γ : c ⟶ c}, γ ∈ arrows (sInf s) c c → Groupoid.inv p ≫ γ ≫ p ∈ arrows (sInf s) d d\n[PROOFSTEP]\nsimp_rw [sInf, mem_iInter₂]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\ns : Set (Subgroupoid C)\nsn : ∀ (S : Subgroupoid C), S ∈ s → IsNormal S\n⊢ ∀ {c d : C} (p : c ⟶ d) {γ : c ⟶ c},\n    (∀ (i : Subgroupoid C), i ∈ s → γ ∈ arrows i c c) →\n      ∀ (i : Subgroupoid C), i ∈ s → Groupoid.inv p ≫ γ ≫ p ∈ arrows i d d\n[PROOFSTEP]\nexact fun p γ hγ S Ss => (sn S Ss).conj p (hγ S Ss)\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc : C\n⊢ 𝟙 c ∈ arrows discrete c c\n[PROOFSTEP]\nconstructor\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc✝ d✝ : C\nf : c✝ ⟶ d✝\nγ : c✝ ⟶ c✝\nhγ : γ ∈ arrows discrete c✝ c✝\n⊢ Groupoid.inv f ≫ γ ≫ f ∈ arrows discrete d✝ d✝\n[PROOFSTEP]\ncases hγ\n[GOAL]\ncase id\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc✝ d✝ : C\nf : c✝ ⟶ d✝\n⊢ Groupoid.inv f ≫ 𝟙 c✝ ≫ f ∈ arrows discrete d✝ d✝\n[PROOFSTEP]\nsimp only [inv_eq_inv, Category.id_comp, IsIso.inv_hom_id]\n[GOAL]\ncase id\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc✝ d✝ : C\nf : c✝ ⟶ d✝\n⊢ 𝟙 d✝ ∈ arrows discrete d✝ d✝\n[PROOFSTEP]\nconstructor\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nSn : IsNormal S\nc : C\ncS : c ∈ objs S\nx : c ⟶ c\nhx : x ∈ Subgroupoid.vertexSubgroup S cS\ny : c ⟶ c\n⊢ y * x * y⁻¹ ∈ Subgroupoid.vertexSubgroup S cS\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nSn : IsNormal S\nc : C\ncS : c ∈ objs S\nx : c ⟶ c\nhx : x ∈ Subgroupoid.vertexSubgroup S cS\ny : c ⟶ c\n⊢ y * (x * y⁻¹) ∈ Subgroupoid.vertexSubgroup S cS\n[PROOFSTEP]\nexact Sn.conj' y hx\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\nc d : C\n⊢ X c d ⊆ arrows (generated X) c d\n[PROOFSTEP]\ndsimp only [generated, sInf]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\nc d : C\n⊢ X c d ⊆ ⋂ (S : Subgroupoid C) (_ : S ∈ {S | ∀ (c d : C), X c d ⊆ arrows S c d}), arrows S c d\n[PROOFSTEP]\nsimp only [subset_iInter₂_iff]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\nc d : C\n⊢ ∀ (i : Subgroupoid C), i ∈ {S | ∀ (c d : C), X c d ⊆ arrows S c d} → X c d ⊆ arrows i c d\n[PROOFSTEP]\nexact fun S hS f fS => hS _ _ fS\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\n⊢ generated X ≤ generatedNormal X\n[PROOFSTEP]\napply @sInf_le_sInf (Subgroupoid C) _\n[GOAL]\ncase h\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\n⊢ {S | (∀ (c d : C), X c d ⊆ arrows S c d) ∧ IsNormal S} ⊆ {S | ∀ (c d : C), X c d ⊆ arrows S c d}\n[PROOFSTEP]\nexact fun S ⟨h, _⟩ => h\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS✝ : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\nS : Subgroupoid C\nSn : IsNormal S\n⊢ generatedNormal X ≤ S ↔ ∀ (c d : C), X c d ⊆ arrows S c d\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS✝ : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\nS : Subgroupoid C\nSn : IsNormal S\n⊢ generatedNormal X ≤ S → ∀ (c d : C), X c d ⊆ arrows S c d\n[PROOFSTEP]\nrintro h c d\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS✝ : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\nS : Subgroupoid C\nSn : IsNormal S\nh : generatedNormal X ≤ S\nc d : C\n⊢ X c d ⊆ arrows S c d\n[PROOFSTEP]\nhave h' := generated_le_generatedNormal X\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS✝ : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\nS : Subgroupoid C\nSn : IsNormal S\nh : generatedNormal X ≤ S\nc d : C\nh' : generated X ≤ generatedNormal X\n⊢ X c d ⊆ arrows S c d\n[PROOFSTEP]\nrw [le_iff] at h h' \n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS✝ : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\nS : Subgroupoid C\nSn : IsNormal S\nh : ∀ {c d : C}, arrows (generatedNormal X) c d ⊆ arrows S c d\nc d : C\nh' : ∀ {c d : C}, arrows (generated X) c d ⊆ arrows (generatedNormal X) c d\n⊢ X c d ⊆ arrows S c d\n[PROOFSTEP]\nexact ((subset_generated X c d).trans (@h' c d)).trans (@h c d)\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Groupoid C\nS✝ : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\nS : Subgroupoid C\nSn : IsNormal S\n⊢ (∀ (c d : C), X c d ⊆ arrows S c d) → generatedNormal X ≤ S\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Groupoid C\nS✝ : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\nS : Subgroupoid C\nSn : IsNormal S\nh : ∀ (c d : C), X c d ⊆ arrows S c d\n⊢ generatedNormal X ≤ S\n[PROOFSTEP]\napply @sInf_le (Subgroupoid C) _\n[GOAL]\ncase mpr.a\nC : Type u\ninst✝ : Groupoid C\nS✝ : Subgroupoid C\nX : (c d : C) → Set (c ⟶ d)\nS : Subgroupoid C\nSn : IsNormal S\nh : ∀ (c d : C), X c d ⊆ arrows S c d\n⊢ S ∈ {S | (∀ (c d : C), X c d ⊆ arrows S c d) ∧ IsNormal S}\n[PROOFSTEP]\nexact ⟨h, Sn⟩\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nS : Subgroupoid D\nc✝ d✝ : C\np✝ : c✝ ⟶ d✝\nhp : p✝ ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) c✝ d✝\n⊢ Groupoid.inv p✝ ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) d✝ c✝\n[PROOFSTEP]\nrw [mem_setOf, inv_eq_inv, φ.map_inv, ← inv_eq_inv]\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nS : Subgroupoid D\nc✝ d✝ : C\np✝ : c✝ ⟶ d✝\nhp : p✝ ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) c✝ d✝\n⊢ Groupoid.inv (φ.map p✝) ∈ arrows S (φ.obj d✝) (φ.obj c✝)\n[PROOFSTEP]\nexact S.inv hp\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nS : Subgroupoid D\n⊢ ∀ {c d e : C} {p : c ⟶ d},\n    p ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) c d →\n      ∀ {q : d ⟶ e},\n        q ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) d e →\n          p ≫ q ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) c e\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nS : Subgroupoid D\nc✝ d✝ e✝ : C\np✝ : c✝ ⟶ d✝\na✝¹ : p✝ ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) c✝ d✝\nq✝ : d✝ ⟶ e✝\na✝ : q✝ ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) d✝ e✝\n⊢ p✝ ≫ q✝ ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) c✝ e✝\n[PROOFSTEP]\nsimp only [mem_setOf, Functor.map_comp]\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nS : Subgroupoid D\nc✝ d✝ e✝ : C\np✝ : c✝ ⟶ d✝\na✝¹ : p✝ ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) c✝ d✝\nq✝ : d✝ ⟶ e✝\na✝ : q✝ ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) d✝ e✝\n⊢ φ.map p✝ ≫ φ.map q✝ ∈ arrows S (φ.obj c✝) (φ.obj e✝)\n[PROOFSTEP]\napply S.mul\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nS : Subgroupoid D\nc✝ d✝ e✝ : C\np✝ : c✝ ⟶ d✝\na✝¹ : p✝ ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) c✝ d✝\nq✝ : d✝ ⟶ e✝\na✝ : q✝ ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) d✝ e✝\n⊢ φ.map p✝ ∈ arrows S (φ.obj c✝) (φ.obj d✝)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nS : Subgroupoid D\nc✝ d✝ e✝ : C\np✝ : c✝ ⟶ d✝\na✝¹ : p✝ ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) c✝ d✝\nq✝ : d✝ ⟶ e✝\na✝ : q✝ ∈ (fun c d => {f | φ.map f ∈ arrows S (φ.obj c) (φ.obj d)}) d✝ e✝\n⊢ φ.map q✝ ∈ arrows S (φ.obj d✝) (φ.obj e✝)\n[PROOFSTEP]\nassumption\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nS : Subgroupoid D\nSn : IsNormal S\nc : C\n⊢ 𝟙 c ∈ arrows (comap φ S) c c\n[PROOFSTEP]\nrw [comap, mem_setOf, Functor.map_id]\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nS : Subgroupoid D\nSn : IsNormal S\nc : C\n⊢ 𝟙 (φ.obj c) ∈ arrows S (φ.obj c) (φ.obj c)\n[PROOFSTEP]\napply Sn.wide\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nS : Subgroupoid D\nSn : IsNormal S\nc✝ d✝ : C\nf : c✝ ⟶ d✝\nγ : c✝ ⟶ c✝\nhγ : γ ∈ arrows (comap φ S) c✝ c✝\n⊢ Groupoid.inv f ≫ γ ≫ f ∈ arrows (comap φ S) d✝ d✝\n[PROOFSTEP]\nsimp_rw [inv_eq_inv f, comap, mem_setOf, Functor.map_comp, Functor.map_inv, ← inv_eq_inv]\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nS : Subgroupoid D\nSn : IsNormal S\nc✝ d✝ : C\nf : c✝ ⟶ d✝\nγ : c✝ ⟶ c✝\nhγ : γ ∈ arrows (comap φ S) c✝ c✝\n⊢ Groupoid.inv (φ.map f) ≫ φ.map γ ≫ φ.map f ∈ arrows S (φ.obj d✝) (φ.obj d✝)\n[PROOFSTEP]\nexact Sn.conj _ hγ\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nc d : D\nf : c ⟶ d\n⊢ Arrows φ hφ S c d f ↔ ∃ a b g ha hb _hg, f = eqToHom (_ : c = φ.obj a) ≫ φ.map g ≫ eqToHom hb\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nc d : D\nf : c ⟶ d\n⊢ Arrows φ hφ S c d f → ∃ a b g ha hb _hg, f = eqToHom (_ : c = φ.obj a) ≫ φ.map g ≫ eqToHom hb\n[PROOFSTEP]\nrintro ⟨g, hg⟩\n[GOAL]\ncase mp.im\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nc d : D\nc✝ d✝ : C\ng : c✝ ⟶ d✝\nhg : g ∈ arrows S c✝ d✝\n⊢ ∃ a b g_1 ha hb _hg, φ.map g = eqToHom (_ : φ.obj c✝ = φ.obj a) ≫ φ.map g_1 ≫ eqToHom hb\n[PROOFSTEP]\nexact ⟨_, _, g, rfl, rfl, hg, eq_conj_eqToHom _⟩\n[GOAL]\ncase mpr\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nc d : D\nf : c ⟶ d\n⊢ (∃ a b g ha hb _hg, f = eqToHom (_ : c = φ.obj a) ≫ φ.map g ≫ eqToHom hb) → Arrows φ hφ S c d f\n[PROOFSTEP]\nrintro ⟨a, b, g, rfl, rfl, hg, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\na b : C\ng : a ⟶ b\nhg : g ∈ arrows S a b\n⊢ Arrows φ hφ S (φ.obj a) (φ.obj b) (eqToHom (_ : φ.obj a = φ.obj a) ≫ φ.map g ≫ eqToHom (_ : φ.obj b = φ.obj b))\n[PROOFSTEP]\nrw [← eq_conj_eqToHom]\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\na b : C\ng : a ⟶ b\nhg : g ∈ arrows S a b\n⊢ Arrows φ hφ S (φ.obj a) (φ.obj b) (φ.map g)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.hf\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\na b : C\ng : a ⟶ b\nhg : g ∈ arrows S a b\n⊢ g ∈ arrows S a b\n[PROOFSTEP]\nexact hg\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\n⊢ ∀ {c d : D} {p : c ⟶ d},\n    p ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) c d → Groupoid.inv p ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) d c\n[PROOFSTEP]\nrintro _ _ _ ⟨⟩\n[GOAL]\ncase im\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nc d : D\nc✝ d✝ : C\nf✝ : c✝ ⟶ d✝\nhf✝ : f✝ ∈ arrows S c✝ d✝\n⊢ Groupoid.inv (φ.map f✝) ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) (φ.obj d✝) (φ.obj c✝)\n[PROOFSTEP]\nrw [inv_eq_inv, ← Functor.map_inv, ← inv_eq_inv]\n[GOAL]\ncase im\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nc d : D\nc✝ d✝ : C\nf✝ : c✝ ⟶ d✝\nhf✝ : f✝ ∈ arrows S c✝ d✝\n⊢ φ.map (Groupoid.inv f✝) ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) (φ.obj d✝) (φ.obj c✝)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase im.hf\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nc d : D\nc✝ d✝ : C\nf✝ : c✝ ⟶ d✝\nhf✝ : f✝ ∈ arrows S c✝ d✝\n⊢ Groupoid.inv f✝ ∈ arrows S d✝ c✝\n[PROOFSTEP]\napply S.inv\n[GOAL]\ncase im.hf\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nc d : D\nc✝ d✝ : C\nf✝ : c✝ ⟶ d✝\nhf✝ : f✝ ∈ arrows S c✝ d✝\n⊢ f✝ ∈ arrows S c✝ d✝\n[PROOFSTEP]\nassumption\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\n⊢ ∀ {c d e : D} {p : c ⟶ d},\n    p ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) c d →\n      ∀ {q : d ⟶ e},\n        q ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) d e → p ≫ q ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) c e\n[PROOFSTEP]\nrintro _ _ _ _ ⟨f, hf⟩ q hq\n[GOAL]\ncase im\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\ne✝ c d : D\nc✝ d✝ : C\nf : c✝ ⟶ d✝\nhf : f ∈ arrows S c✝ d✝\nq : φ.obj d✝ ⟶ e✝\nhq : q ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) (φ.obj d✝) e✝\n⊢ φ.map f ≫ q ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) (φ.obj c✝) e✝\n[PROOFSTEP]\nobtain ⟨c₃, c₄, g, he, rfl, hg, gq⟩ := (Map.arrows_iff φ hφ S q).mp hq\n[GOAL]\ncase im.intro.intro.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nc d : D\nc✝ d✝ : C\nf : c✝ ⟶ d✝\nhf : f ∈ arrows S c✝ d✝\nc₃ c₄ : C\ng : c₃ ⟶ c₄\nhe : φ.obj c₃ = φ.obj d✝\nq : φ.obj d✝ ⟶ φ.obj c₄\nhq : q ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) (φ.obj d✝) (φ.obj c₄)\nhg : g ∈ arrows S c₃ c₄\ngq : q = eqToHom (_ : φ.obj d✝ = φ.obj c₃) ≫ φ.map g ≫ eqToHom (_ : φ.obj c₄ = φ.obj c₄)\n⊢ φ.map f ≫ q ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) (φ.obj c✝) (φ.obj c₄)\n[PROOFSTEP]\ncases hφ he\n[GOAL]\ncase im.intro.intro.intro.intro.intro.intro.refl\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nc d : D\nc✝ d✝ : C\nf : c✝ ⟶ d✝\nhf : f ∈ arrows S c✝ d✝\nc₄ : C\nq : φ.obj d✝ ⟶ φ.obj c₄\nhq : q ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) (φ.obj d✝) (φ.obj c₄)\ng : d✝ ⟶ c₄\nhe : φ.obj d✝ = φ.obj d✝\nhg : g ∈ arrows S d✝ c₄\ngq : q = eqToHom (_ : φ.obj d✝ = φ.obj d✝) ≫ φ.map g ≫ eqToHom (_ : φ.obj c₄ = φ.obj c₄)\n⊢ φ.map f ≫ q ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) (φ.obj c✝) (φ.obj c₄)\n[PROOFSTEP]\nrw [gq, ← eq_conj_eqToHom, ← φ.map_comp]\n[GOAL]\ncase im.intro.intro.intro.intro.intro.intro.refl\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nc d : D\nc✝ d✝ : C\nf : c✝ ⟶ d✝\nhf : f ∈ arrows S c✝ d✝\nc₄ : C\nq : φ.obj d✝ ⟶ φ.obj c₄\nhq : q ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) (φ.obj d✝) (φ.obj c₄)\ng : d✝ ⟶ c₄\nhe : φ.obj d✝ = φ.obj d✝\nhg : g ∈ arrows S d✝ c₄\ngq : q = eqToHom (_ : φ.obj d✝ = φ.obj d✝) ≫ φ.map g ≫ eqToHom (_ : φ.obj c₄ = φ.obj c₄)\n⊢ φ.map (f ≫ g) ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) (φ.obj c✝) (φ.obj c₄)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase im.intro.intro.intro.intro.intro.intro.refl.hf\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nc d : D\nc✝ d✝ : C\nf : c✝ ⟶ d✝\nhf : f ∈ arrows S c✝ d✝\nc₄ : C\nq : φ.obj d✝ ⟶ φ.obj c₄\nhq : q ∈ (fun c d => {x | Map.Arrows φ hφ S c d x}) (φ.obj d✝) (φ.obj c₄)\ng : d✝ ⟶ c₄\nhe : φ.obj d✝ = φ.obj d✝\nhg : g ∈ arrows S d✝ c₄\ngq : q = eqToHom (_ : φ.obj d✝ = φ.obj d✝) ≫ φ.map g ≫ eqToHom (_ : φ.obj c₄ = φ.obj c₄)\n⊢ f ≫ g ∈ arrows S c✝ c₄\n[PROOFSTEP]\nexact S.mul hf hg\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\n⊢ GaloisConnection (map φ hφ) (comap φ)\n[PROOFSTEP]\nrintro S T\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nT : Subgroupoid D\n⊢ map φ hφ S ≤ T ↔ S ≤ comap φ T\n[PROOFSTEP]\nsimp_rw [le_iff]\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nT : Subgroupoid D\n⊢ (∀ {c d : D}, arrows (map φ hφ S) c d ⊆ arrows T c d) ↔ ∀ {c d : C}, arrows S c d ⊆ arrows (comap φ T) c d\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nT : Subgroupoid D\n⊢ (∀ {c d : D}, arrows (map φ hφ S) c d ⊆ arrows T c d) → ∀ {c d : C}, arrows S c d ⊆ arrows (comap φ T) c d\n[PROOFSTEP]\nexact fun h c d f fS => h (Map.Arrows.im f fS)\n[GOAL]\ncase mpr\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nT : Subgroupoid D\n⊢ (∀ {c d : C}, arrows S c d ⊆ arrows (comap φ T) c d) → ∀ {c d : D}, arrows (map φ hφ S) c d ⊆ arrows T c d\n[PROOFSTEP]\nrintro h _ _ g ⟨a, gφS⟩\n[GOAL]\ncase mpr.im\nC : Type u\ninst✝¹ : Groupoid C\nS✝ : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nS : Subgroupoid C\nT : Subgroupoid D\nh : ∀ {c d : C}, arrows S c d ⊆ arrows (comap φ T) c d\nc d : D\nc✝ d✝ : C\na : c✝ ⟶ d✝\ngφS : a ∈ arrows S c✝ d✝\n⊢ φ.map a ∈ arrows T (φ.obj c✝) (φ.obj d✝)\n[PROOFSTEP]\nexact h gφS\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nd : D\n⊢ d ∈ objs (map φ hφ S) ↔ ∃ c, c ∈ objs S ∧ φ.obj c = d\n[PROOFSTEP]\ndsimp [objs, map]\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nd : D\n⊢ Set.Nonempty {x | Map.Arrows φ hφ S d d x} ↔ ∃ c, Set.Nonempty (arrows S c c) ∧ φ.obj c = d\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nd : D\n⊢ Set.Nonempty {x | Map.Arrows φ hφ S d d x} → ∃ c, Set.Nonempty (arrows S c c) ∧ φ.obj c = d\n[PROOFSTEP]\nrintro ⟨f, hf⟩\n[GOAL]\ncase mp.intro\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nd : D\nf : d ⟶ d\nhf : f ∈ {x | Map.Arrows φ hφ S d d x}\n⊢ ∃ c, Set.Nonempty (arrows S c c) ∧ φ.obj c = d\n[PROOFSTEP]\nchange Map.Arrows φ hφ S d d f at hf \n[GOAL]\ncase mp.intro\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nd : D\nf : d ⟶ d\nhf : Map.Arrows φ hφ S d d f\n⊢ ∃ c, Set.Nonempty (arrows S c c) ∧ φ.obj c = d\n[PROOFSTEP]\nrw [Map.arrows_iff] at hf \n[GOAL]\ncase mp.intro\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nd : D\nf : d ⟶ d\nhf : ∃ a b g ha hb _hg, f = eqToHom (_ : d = φ.obj a) ≫ φ.map g ≫ eqToHom hb\n⊢ ∃ c, Set.Nonempty (arrows S c c) ∧ φ.obj c = d\n[PROOFSTEP]\nobtain ⟨c, d, g, ec, ed, eg, gS, eg⟩ := hf\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.refl\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nd✝ : D\nc d : C\ng : c ⟶ d\nec : φ.obj c = d✝\ned : φ.obj d = d✝\neg : g ∈ arrows S c d\n⊢ ∃ c, Set.Nonempty (arrows S c c) ∧ φ.obj c = d✝\n[PROOFSTEP]\nexact ⟨c, ⟨mem_objs_of_src S eg, ec⟩⟩\n[GOAL]\ncase mpr\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nd : D\n⊢ (∃ c, Set.Nonempty (arrows S c c) ∧ φ.obj c = d) → Set.Nonempty {x | Map.Arrows φ hφ S d d x}\n[PROOFSTEP]\nrintro ⟨c, ⟨γ, γS⟩, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\n⊢ Set.Nonempty {x | Map.Arrows φ hφ S (φ.obj c) (φ.obj c) x}\n[PROOFSTEP]\nexact ⟨φ.map γ, ⟨γ, γS⟩⟩\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\n⊢ objs (map φ hφ S) = φ.obj '' objs S\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nx : D\n⊢ x ∈ objs (map φ hφ S) ↔ x ∈ φ.obj '' objs S\n[PROOFSTEP]\nconvert mem_map_objs_iff S φ hφ x\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nc d : D\nf : c ⟶ d\n⊢ f ∈ arrows (im φ hφ) c d ↔ ∃ a b g ha hb, f = eqToHom (_ : c = φ.obj a) ≫ φ.map g ≫ eqToHom hb\n[PROOFSTEP]\nconvert Map.arrows_iff φ hφ ⊤ f\n[GOAL]\ncase h.e'_2.h.e'_2.h.h.e'_2.h.h.e'_2.h.h.e'_2.h.h.e'_2.h.a\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nc d : D\nf : c ⟶ d\nx✝⁴ x✝³ : C\nx✝² : x✝⁴ ⟶ x✝³\nx✝¹ : φ.obj x✝⁴ = c\nx✝ : φ.obj x✝³ = d\n⊢ f = eqToHom (_ : c = φ.obj x✝⁴) ≫ φ.map x✝² ≫ eqToHom x✝ ↔\n    ∃ _hg, f = eqToHom (_ : c = φ.obj x✝⁴) ≫ φ.map x✝² ≫ eqToHom x✝\n[PROOFSTEP]\nsimp only [Top.top, mem_univ, exists_true_left]\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nd : D\n⊢ d ∈ objs (im φ hφ) ↔ ∃ c, φ.obj c = d\n[PROOFSTEP]\nsimp only [im, mem_map_objs_iff, mem_top_objs, true_and]\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\n⊢ Function.Surjective φ.obj\n[PROOFSTEP]\nrintro d\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nd : D\n⊢ ∃ a, φ.obj a = d\n[PROOFSTEP]\nrw [← mem_im_objs_iff, hφ']\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nd : D\n⊢ d ∈ objs ⊤\n[PROOFSTEP]\napply mem_top_objs\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nd : D\n⊢ 𝟙 d ∈ arrows (map φ hφ S) d d\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := obj_surjective_of_im_eq_top φ hφ hφ' d\n[GOAL]\ncase intro\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\n⊢ 𝟙 (φ.obj c) ∈ arrows (map φ hφ S) (φ.obj c) (φ.obj c)\n[PROOFSTEP]\nchange Map.Arrows φ hφ S _ _ (𝟙 _)\n[GOAL]\ncase intro\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\n⊢ Map.Arrows φ hφ S (φ.obj c) (φ.obj c) (𝟙 (φ.obj c))\n[PROOFSTEP]\nrw [← Functor.map_id]\n[GOAL]\ncase intro\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\n⊢ Map.Arrows φ hφ S (φ.obj c) (φ.obj c) (φ.map (𝟙 c))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.hf\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\n⊢ 𝟙 c ∈ arrows S c c\n[PROOFSTEP]\nexact Sn.wide c\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nd d' : D\ng : d ⟶ d'\nδ : d ⟶ d\nhδ : δ ∈ arrows (map φ hφ S) d d\n⊢ Groupoid.inv g ≫ δ ≫ g ∈ arrows (map φ hφ S) d' d'\n[PROOFSTEP]\nrw [mem_map_iff] at hδ \n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nd d' : D\ng : d ⟶ d'\nδ : d ⟶ d\nhδ : ∃ a b g ha hb _hg, δ = eqToHom (_ : d = φ.obj a) ≫ φ.map g ≫ eqToHom hb\n⊢ Groupoid.inv g ≫ δ ≫ g ∈ arrows (map φ hφ S) d' d'\n[PROOFSTEP]\nobtain ⟨c, c', γ, cd, cd', γS, hγ⟩ := hδ\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nd d' : D\ng : d ⟶ d'\nδ : d ⟶ d\nc c' : C\nγ : c ⟶ c'\ncd : φ.obj c = d\ncd' : φ.obj c' = d\nγS : γ ∈ arrows S c c'\nhγ : δ = eqToHom (_ : d = φ.obj c) ≫ φ.map γ ≫ eqToHom cd'\n⊢ Groupoid.inv g ≫ δ ≫ g ∈ arrows (map φ hφ S) d' d'\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nd' : D\nc c' : C\nγ : c ⟶ c'\nγS : γ ∈ arrows S c c'\ng : φ.obj c ⟶ d'\ncd' : φ.obj c' = φ.obj c\n⊢ Groupoid.inv g ≫ (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map γ ≫ eqToHom cd') ≫ g ∈ arrows (map φ hφ S) d' d'\n[PROOFSTEP]\ncases hφ cd'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nd' : D\nc : C\ng : φ.obj c ⟶ d'\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\n⊢ Groupoid.inv g ≫ (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map γ ≫ eqToHom cd') ≫ g ∈ arrows (map φ hφ S) d' d'\n[PROOFSTEP]\nhave : d' ∈ (im φ hφ).objs := by rw [hφ']; apply mem_top_objs\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nd' : D\nc : C\ng : φ.obj c ⟶ d'\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\n⊢ d' ∈ objs (im φ hφ)\n[PROOFSTEP]\nrw [hφ']\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nd' : D\nc : C\ng : φ.obj c ⟶ d'\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\n⊢ d' ∈ objs ⊤\n[PROOFSTEP]\napply mem_top_objs\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nd' : D\nc : C\ng : φ.obj c ⟶ d'\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nthis : d' ∈ objs (im φ hφ)\n⊢ Groupoid.inv g ≫ (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map γ ≫ eqToHom cd') ≫ g ∈ arrows (map φ hφ S) d' d'\n[PROOFSTEP]\nrw [mem_im_objs_iff] at this \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nd' : D\nc : C\ng : φ.obj c ⟶ d'\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nthis : ∃ c, φ.obj c = d'\n⊢ Groupoid.inv g ≫ (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map γ ≫ eqToHom cd') ≫ g ∈ arrows (map φ hφ S) d' d'\n[PROOFSTEP]\nobtain ⟨c', rfl⟩ := this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl.intro\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' : C\ng : φ.obj c ⟶ φ.obj c'\n⊢ Groupoid.inv g ≫ (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map γ ≫ eqToHom cd') ≫ g ∈\n    arrows (map φ hφ S) (φ.obj c') (φ.obj c')\n[PROOFSTEP]\nhave : g ∈ (im φ hφ).arrows (φ.obj c) (φ.obj c') := by rw [hφ']; trivial\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' : C\ng : φ.obj c ⟶ φ.obj c'\n⊢ g ∈ arrows (im φ hφ) (φ.obj c) (φ.obj c')\n[PROOFSTEP]\nrw [hφ']\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' : C\ng : φ.obj c ⟶ φ.obj c'\n⊢ g ∈ arrows ⊤ (φ.obj c) (φ.obj c')\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl.intro\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' : C\ng : φ.obj c ⟶ φ.obj c'\nthis : g ∈ arrows (im φ hφ) (φ.obj c) (φ.obj c')\n⊢ Groupoid.inv g ≫ (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map γ ≫ eqToHom cd') ≫ g ∈\n    arrows (map φ hφ S) (φ.obj c') (φ.obj c')\n[PROOFSTEP]\nrw [mem_im_iff] at this \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl.intro\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' : C\ng : φ.obj c ⟶ φ.obj c'\nthis : ∃ a b g_1 ha hb, g = eqToHom (_ : φ.obj c = φ.obj a) ≫ φ.map g_1 ≫ eqToHom hb\n⊢ Groupoid.inv g ≫ (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map γ ≫ eqToHom cd') ≫ g ∈\n    arrows (map φ hφ S) (φ.obj c') (φ.obj c')\n[PROOFSTEP]\nobtain ⟨b, b', f, hb, hb', _, hf⟩ := this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl.intro.intro.intro.intro.intro.intro.refl\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' b b' : C\nf : b ⟶ b'\nhb : φ.obj b = φ.obj c\nhb' : φ.obj b' = φ.obj c'\n⊢ Groupoid.inv (eqToHom (_ : φ.obj c = φ.obj b) ≫ φ.map f ≫ eqToHom hb') ≫\n      (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map γ ≫ eqToHom cd') ≫\n        eqToHom (_ : φ.obj c = φ.obj b) ≫ φ.map f ≫ eqToHom hb' ∈\n    arrows (map φ hφ S) (φ.obj c') (φ.obj c')\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl.intro.intro.intro.intro.intro.intro.refl\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' b b' : C\nf : b ⟶ b'\nhb : φ.obj b = φ.obj c\nhb' : φ.obj b' = φ.obj c'\n⊢ Groupoid.inv (eqToHom (_ : φ.obj c = φ.obj b) ≫ φ.map f ≫ eqToHom hb') ≫\n      (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map γ ≫ eqToHom cd') ≫\n        eqToHom (_ : φ.obj c = φ.obj b) ≫ φ.map f ≫ eqToHom hb' ∈\n    arrows (map φ hφ S) (φ.obj c') (φ.obj c')\n[PROOFSTEP]\ncases hφ hb\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl.intro.intro.intro.intro.intro.intro.refl.refl\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' b' : C\nhb' : φ.obj b' = φ.obj c'\nf : c ⟶ b'\nhb : φ.obj c = φ.obj c\n⊢ Groupoid.inv (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map f ≫ eqToHom hb') ≫\n      (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map γ ≫ eqToHom cd') ≫\n        eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map f ≫ eqToHom hb' ∈\n    arrows (map φ hφ S) (φ.obj c') (φ.obj c')\n[PROOFSTEP]\ncases hφ hb'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl.intro.intro.intro.intro.intro.intro.refl.refl.refl\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' : C\nhb : φ.obj c = φ.obj c\nhb' : φ.obj c' = φ.obj c'\nf : c ⟶ c'\n⊢ Groupoid.inv (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map f ≫ eqToHom hb') ≫\n      (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map γ ≫ eqToHom cd') ≫\n        eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map f ≫ eqToHom hb' ∈\n    arrows (map φ hφ S) (φ.obj c') (φ.obj c')\n[PROOFSTEP]\nchange Map.Arrows φ hφ S (φ.obj c') (φ.obj c') _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl.intro.intro.intro.intro.intro.intro.refl.refl.refl\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' : C\nhb : φ.obj c = φ.obj c\nhb' : φ.obj c' = φ.obj c'\nf : c ⟶ c'\n⊢ Map.Arrows φ hφ S (φ.obj c') (φ.obj c')\n    (Groupoid.inv (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map f ≫ eqToHom hb') ≫\n      (eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map γ ≫ eqToHom cd') ≫\n        eqToHom (_ : φ.obj c = φ.obj c) ≫ φ.map f ≫ eqToHom hb')\n[PROOFSTEP]\nsimp only [eqToHom_refl, Category.comp_id, Category.id_comp, inv_eq_inv]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl.intro.intro.intro.intro.intro.intro.refl.refl.refl\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' : C\nhb : φ.obj c = φ.obj c\nhb' : φ.obj c' = φ.obj c'\nf : c ⟶ c'\n⊢ Map.Arrows φ hφ S (φ.obj c') (φ.obj c') (inv (φ.map f) ≫ φ.map γ ≫ φ.map f)\n[PROOFSTEP]\nsuffices Map.Arrows φ hφ S (φ.obj c') (φ.obj c') (φ.map <| Groupoid.inv f ≫ γ ≫ f) by\n  simp only [inv_eq_inv, Functor.map_comp, Functor.map_inv] at this ; exact this\n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' : C\nhb : φ.obj c = φ.obj c\nhb' : φ.obj c' = φ.obj c'\nf : c ⟶ c'\nthis : Map.Arrows φ hφ S (φ.obj c') (φ.obj c') (φ.map (Groupoid.inv f ≫ γ ≫ f))\n⊢ Map.Arrows φ hφ S (φ.obj c') (φ.obj c') (inv (φ.map f) ≫ φ.map γ ≫ φ.map f)\n[PROOFSTEP]\nsimp only [inv_eq_inv, Functor.map_comp, Functor.map_inv] at this \n[GOAL]\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' : C\nhb : φ.obj c = φ.obj c\nhb' : φ.obj c' = φ.obj c'\nf : c ⟶ c'\nthis : Map.Arrows φ hφ S (φ.obj c') (φ.obj c') (inv (φ.map f) ≫ φ.map γ ≫ φ.map f)\n⊢ Map.Arrows φ hφ S (φ.obj c') (φ.obj c') (inv (φ.map f) ≫ φ.map γ ≫ φ.map f)\n[PROOFSTEP]\nexact this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl.intro.intro.intro.intro.intro.intro.refl.refl.refl\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' : C\nhb : φ.obj c = φ.obj c\nhb' : φ.obj c' = φ.obj c'\nf : c ⟶ c'\n⊢ Map.Arrows φ hφ S (φ.obj c') (φ.obj c') (φ.map (Groupoid.inv f ≫ γ ≫ f))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refl.intro.intro.intro.intro.intro.intro.refl.refl.refl.hf\nC : Type u\ninst✝¹ : Groupoid C\nS : Subgroupoid C\nD : Type u_1\ninst✝ : Groupoid D\nφ : C ⥤ D\nhφ : Function.Injective φ.obj\nhφ' : im φ hφ = ⊤\nSn : IsNormal S\nc : C\nγ : c ⟶ c\nγS : γ ∈ arrows S c c\ncd' : φ.obj c = φ.obj c\nc' : C\nhb : φ.obj c = φ.obj c\nhb' : φ.obj c' = φ.obj c'\nf : c ⟶ c'\n⊢ Groupoid.inv f ≫ γ ≫ f ∈ arrows S c' c'\n[PROOFSTEP]\napply Sn.conj f γS\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ IsTotallyDisconnected S ↔ ∀ (c d : C), Set.Nonempty (arrows S c d) → c = d\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ IsTotallyDisconnected S → ∀ (c d : C), Set.Nonempty (arrows S c d) → c = d\n[PROOFSTEP]\nrintro h c d ⟨f, fS⟩\n[GOAL]\ncase mp.intro\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nh : IsTotallyDisconnected S\nc d : C\nf : c ⟶ d\nfS : f ∈ arrows S c d\n⊢ c = d\n[PROOFSTEP]\nhave := h ⟨c, mem_objs_of_src S fS⟩ ⟨d, mem_objs_of_tgt S fS⟩ ⟨f, fS⟩\n[GOAL]\ncase mp.intro\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nh : IsTotallyDisconnected S\nc d : C\nf : c ⟶ d\nfS : f ∈ arrows S c d\nthis : { val := c, property := (_ : c ∈ objs S) } = { val := d, property := (_ : d ∈ objs S) }\n⊢ c = d\n[PROOFSTEP]\nexact congr_arg Subtype.val this\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ (∀ (c d : C), Set.Nonempty (arrows S c d) → c = d) → IsTotallyDisconnected S\n[PROOFSTEP]\nrintro h ⟨c, hc⟩ ⟨d, hd⟩ ⟨f, fS⟩\n[GOAL]\ncase mpr.mk.mk.mk\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nh : ∀ (c d : C), Set.Nonempty (arrows S c d) → c = d\nc : C\nhc : c ∈ objs S\nd : C\nhd : d ∈ objs S\nf : ↑{ val := c, property := hc } ⟶ ↑{ val := d, property := hd }\nfS : f ∈ arrows S ↑{ val := c, property := hc } ↑{ val := d, property := hd }\n⊢ { val := c, property := hc } = { val := d, property := hd }\n[PROOFSTEP]\nsimp only [Subtype.mk_eq_mk]\n[GOAL]\ncase mpr.mk.mk.mk\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nh : ∀ (c d : C), Set.Nonempty (arrows S c d) → c = d\nc : C\nhc : c ∈ objs S\nd : C\nhd : d ∈ objs S\nf : ↑{ val := c, property := hc } ⟶ ↑{ val := d, property := hd }\nfS : f ∈ arrows S ↑{ val := c, property := hc } ↑{ val := d, property := hd }\n⊢ c = d\n[PROOFSTEP]\nexact h c d ⟨f, fS⟩\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ ∀ {c d : C} {p : c ⟶ d},\n    p ∈ (fun c d => {f | c = d ∧ f ∈ arrows S c d}) c d →\n      Groupoid.inv p ∈ (fun c d => {f | c = d ∧ f ∈ arrows S c d}) d c\n[PROOFSTEP]\nrintro _ _ _ ⟨rfl, h⟩\n[GOAL]\ncase intro\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc✝ : C\np✝ : c✝ ⟶ c✝\nh : p✝ ∈ arrows S c✝ c✝\n⊢ Groupoid.inv p✝ ∈ (fun c d => {f | c = d ∧ f ∈ arrows S c d}) c✝ c✝\n[PROOFSTEP]\nexact ⟨rfl, S.inv h⟩\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ ∀ {c d e : C} {p : c ⟶ d},\n    p ∈ (fun c d => {f | c = d ∧ f ∈ arrows S c d}) c d →\n      ∀ {q : d ⟶ e},\n        q ∈ (fun c d => {f | c = d ∧ f ∈ arrows S c d}) d e → p ≫ q ∈ (fun c d => {f | c = d ∧ f ∈ arrows S c d}) c e\n[PROOFSTEP]\nrintro _ _ _ _ ⟨rfl, h⟩ _ ⟨rfl, h'⟩\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc✝ : C\np✝ : c✝ ⟶ c✝\nh : p✝ ∈ arrows S c✝ c✝\nq✝ : c✝ ⟶ c✝\nh' : q✝ ∈ arrows S c✝ c✝\n⊢ p✝ ≫ q✝ ∈ (fun c d => {f | c = d ∧ f ∈ arrows S c d}) c✝ c✝\n[PROOFSTEP]\nexact ⟨rfl, S.mul h h'⟩\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ disconnect S ≤ S\n[PROOFSTEP]\nrw [le_iff]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ ∀ {c d : C}, arrows (disconnect S) c d ⊆ arrows S c d\n[PROOFSTEP]\nrintro _ _ _ ⟨⟩\n[GOAL]\ncase intro\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nc✝ d✝ : C\na✝ : c✝ ⟶ d✝\nleft✝ : c✝ = d✝\nright✝ : a✝ ∈ arrows S c✝ d✝\n⊢ a✝ ∈ arrows S c✝ d✝\n[PROOFSTEP]\nassumption\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ IsTotallyDisconnected (disconnect S)\n[PROOFSTEP]\nrw [isTotallyDisconnected_iff]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\n⊢ ∀ (c d : C), Set.Nonempty (arrows (disconnect S) c d) → c = d\n[PROOFSTEP]\nexact fun c d ⟨_, h, _⟩ => h\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\n⊢ ∀ {c d : C} {p : c ⟶ d},\n    p ∈ (fun c d => {_f | c ∈ D ∧ d ∈ D}) c d → Groupoid.inv p ∈ (fun c d => {_f | c ∈ D ∧ d ∈ D}) d c\n[PROOFSTEP]\nrintro _ _ _ ⟨⟩\n[GOAL]\ncase intro\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\nc✝ d✝ : C\np✝ : c✝ ⟶ d✝\nleft✝ : c✝ ∈ D\nright✝ : d✝ ∈ D\n⊢ Groupoid.inv p✝ ∈ (fun c d => {_f | c ∈ D ∧ d ∈ D}) d✝ c✝\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.left\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\nc✝ d✝ : C\np✝ : c✝ ⟶ d✝\nleft✝ : c✝ ∈ D\nright✝ : d✝ ∈ D\n⊢ d✝ ∈ D\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.right\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\nc✝ d✝ : C\np✝ : c✝ ⟶ d✝\nleft✝ : c✝ ∈ D\nright✝ : d✝ ∈ D\n⊢ c✝ ∈ D\n[PROOFSTEP]\nassumption\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\n⊢ ∀ {c d e : C} {p : c ⟶ d},\n    p ∈ (fun c d => {_f | c ∈ D ∧ d ∈ D}) c d →\n      ∀ {q : d ⟶ e}, q ∈ (fun c d => {_f | c ∈ D ∧ d ∈ D}) d e → p ≫ q ∈ (fun c d => {_f | c ∈ D ∧ d ∈ D}) c e\n[PROOFSTEP]\nrintro _ _ _ _ ⟨⟩ _ ⟨⟩\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\nc✝ d✝ e✝ : C\np✝ : c✝ ⟶ d✝\nleft✝¹ : c✝ ∈ D\nright✝¹ : d✝ ∈ D\nq✝ : d✝ ⟶ e✝\nleft✝ : d✝ ∈ D\nright✝ : e✝ ∈ D\n⊢ p✝ ≫ q✝ ∈ (fun c d => {_f | c ∈ D ∧ d ∈ D}) c✝ e✝\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.intro.left\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\nc✝ d✝ e✝ : C\np✝ : c✝ ⟶ d✝\nleft✝¹ : c✝ ∈ D\nright✝¹ : d✝ ∈ D\nq✝ : d✝ ⟶ e✝\nleft✝ : d✝ ∈ D\nright✝ : e✝ ∈ D\n⊢ c✝ ∈ D\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.right\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\nc✝ d✝ e✝ : C\np✝ : c✝ ⟶ d✝\nleft✝¹ : c✝ ∈ D\nright✝¹ : d✝ ∈ D\nq✝ : d✝ ⟶ e✝\nleft✝ : d✝ ∈ D\nright✝ : e✝ ∈ D\n⊢ e✝ ∈ D\n[PROOFSTEP]\nassumption\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\nc : C\n⊢ c ∈ objs (full D) ↔ c ∈ D\n[PROOFSTEP]\nrw [full_objs]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\n⊢ full ∅ = ⊥\n[PROOFSTEP]\next\n[GOAL]\ncase arrows.h.h.h\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\nx✝² x✝¹ : C\nx✝ : x✝² ⟶ x✝¹\n⊢ x✝ ∈ arrows (full ∅) x✝² x✝¹ ↔ x✝ ∈ arrows ⊥ x✝² x✝¹\n[PROOFSTEP]\nsimp only [Bot.bot, mem_full_iff, mem_empty_iff_false, and_self_iff]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\n⊢ full univ = ⊤\n[PROOFSTEP]\next\n[GOAL]\ncase arrows.h.h.h\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD : Set C\nx✝² x✝¹ : C\nx✝ : x✝² ⟶ x✝¹\n⊢ x✝ ∈ arrows (full univ) x✝² x✝¹ ↔ x✝ ∈ arrows ⊤ x✝² x✝¹\n[PROOFSTEP]\nsimp only [mem_full_iff, mem_univ, mem_top]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD✝ D E : Set C\nh : D ≤ E\n⊢ full D ≤ full E\n[PROOFSTEP]\nrw [le_iff]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD✝ D E : Set C\nh : D ≤ E\n⊢ ∀ {c d : C}, arrows (full D) c d ⊆ arrows (full E) c d\n[PROOFSTEP]\nrintro c d f\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD✝ D E : Set C\nh : D ≤ E\nc d : C\nf : c ⟶ d\n⊢ f ∈ arrows (full D) c d → f ∈ arrows (full E) c d\n[PROOFSTEP]\nsimp only [mem_full_iff]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nS : Subgroupoid C\nD✝ D E : Set C\nh : D ≤ E\nc d : C\nf : c ⟶ d\n⊢ c ∈ D ∧ d ∈ D → c ∈ E ∧ d ∈ E\n[PROOFSTEP]\nexact fun ⟨hc, hd⟩ => ⟨h hc, h hd⟩\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Groupoid.Subgroupoid", "llama_tokens": 33785, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6477982179521103, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.37902748501457606}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ (iteratedFDeriv 𝕜 n fun x => 0) = 0\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\n⊢ (iteratedFDeriv 𝕜 Nat.zero fun x => 0) = 0\n[PROOFSTEP]\next m\n[GOAL]\ncase zero.h.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nm : E\nx✝ : Fin Nat.zero → E\n⊢ ↑(iteratedFDeriv 𝕜 Nat.zero (fun x => 0) m) x✝ = ↑(OfNat.ofNat 0 m) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nn : ℕ\nIH : (iteratedFDeriv 𝕜 n fun x => 0) = 0\n⊢ (iteratedFDeriv 𝕜 (Nat.succ n) fun x => 0) = 0\n[PROOFSTEP]\next x m\n[GOAL]\ncase succ.h.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nn : ℕ\nIH : (iteratedFDeriv 𝕜 n fun x => 0) = 0\nx : E\nm : Fin (Nat.succ n) → E\n⊢ ↑(iteratedFDeriv 𝕜 (Nat.succ n) (fun x => 0) x) m = ↑(OfNat.ofNat 0 x) m\n[PROOFSTEP]\nrw [iteratedFDeriv_succ_apply_left, IH]\n[GOAL]\ncase succ.h.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nn : ℕ\nIH : (iteratedFDeriv 𝕜 n fun x => 0) = 0\nx : E\nm : Fin (Nat.succ n) → E\n⊢ ↑(↑(fderiv 𝕜 0 x) (m 0)) (tail m) = ↑(OfNat.ofNat 0 x) m\n[PROOFSTEP]\nchange (fderiv 𝕜 (fun _ : E => (0 : E[×n]→L[𝕜] F)) x : E → E[×n]→L[𝕜] F) (m 0) (tail m) = _\n[GOAL]\ncase succ.h.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nn : ℕ\nIH : (iteratedFDeriv 𝕜 n fun x => 0) = 0\nx : E\nm : Fin (Nat.succ n) → E\n⊢ ↑(↑(fderiv 𝕜 (fun x => 0) x) (m 0)) (tail m) = ↑(OfNat.ofNat 0 x) m\n[PROOFSTEP]\nrw [fderiv_const]\n[GOAL]\ncase succ.h.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nn : ℕ\nIH : (iteratedFDeriv 𝕜 n fun x => 0) = 0\nx : E\nm : Fin (Nat.succ n) → E\n⊢ ↑(↑(OfNat.ofNat 0 x) (m 0)) (tail m) = ↑(OfNat.ofNat 0 x) m\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nm : ℕ\nx✝ : ↑m ≤ n\n⊢ Differentiable 𝕜 (iteratedFDeriv 𝕜 m fun x => 0)\n[PROOFSTEP]\nrw [iteratedFDeriv_zero_fun]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nm : ℕ\nx✝ : ↑m ≤ n\n⊢ Differentiable 𝕜 0\n[PROOFSTEP]\nexact differentiable_const (0 : E[×m]→L[𝕜] F)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc✝ : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nc : F\n⊢ ContDiff 𝕜 n fun x => c\n[PROOFSTEP]\nsuffices h : ContDiff 𝕜 ∞ fun _ : E => c\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc✝ : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nc : F\nh : ContDiff 𝕜 ⊤ fun x => c\n⊢ ContDiff 𝕜 n fun x => c\n[PROOFSTEP]\nexact h.of_le le_top\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc✝ : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nc : F\n⊢ ContDiff 𝕜 ⊤ fun x => c\n[PROOFSTEP]\nrw [contDiff_top_iff_fderiv]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc✝ : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nc : F\n⊢ (Differentiable 𝕜 fun x => c) ∧ ContDiff 𝕜 ⊤ fun y => fderiv 𝕜 (fun x => c) y\n[PROOFSTEP]\nrefine' ⟨differentiable_const c, _⟩\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc✝ : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nc : F\n⊢ ContDiff 𝕜 ⊤ fun y => fderiv 𝕜 (fun x => c) y\n[PROOFSTEP]\nrw [fderiv_const]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc✝ : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nc : F\n⊢ ContDiff 𝕜 ⊤ fun y => OfNat.ofNat 0 y\n[PROOFSTEP]\nexact contDiff_zero_fun\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : Subsingleton F\n⊢ ContDiff 𝕜 n f\n[PROOFSTEP]\nrw [Subsingleton.elim f fun _ => 0]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : Subsingleton F\n⊢ ContDiff 𝕜 n fun x => 0\n[PROOFSTEP]\nexact contDiff_const\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : Subsingleton F\n⊢ ContDiffAt 𝕜 n f x\n[PROOFSTEP]\nrw [Subsingleton.elim f fun _ => 0]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : Subsingleton F\n⊢ ContDiffAt 𝕜 n (fun x => 0) x\n[PROOFSTEP]\nexact contDiffAt_const\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : Subsingleton F\n⊢ ContDiffWithinAt 𝕜 n f s x\n[PROOFSTEP]\nrw [Subsingleton.elim f fun _ => 0]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : Subsingleton F\n⊢ ContDiffWithinAt 𝕜 n (fun x => 0) s x\n[PROOFSTEP]\nexact contDiffWithinAt_const\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : Subsingleton F\n⊢ ContDiffOn 𝕜 n f s\n[PROOFSTEP]\nrw [Subsingleton.elim f fun _ => 0]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : Subsingleton F\n⊢ ContDiffOn 𝕜 n (fun x => 0) s\n[PROOFSTEP]\nexact contDiffOn_const\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : F\n⊢ (iteratedFDeriv 𝕜 (n + 1) fun x => c) = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝¹ x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nn : ℕ\nc : F\nx : E\nx✝ : Fin (n + 1) → E\n⊢ ↑(iteratedFDeriv 𝕜 (n + 1) (fun x => c) x) x✝ = ↑(OfNat.ofNat 0 x) x✝\n[PROOFSTEP]\nsimp only [iteratedFDeriv_succ_eq_comp_right, fderiv_const, Pi.zero_apply, iteratedFDeriv_zero_fun, comp_apply,\n  LinearIsometryEquiv.map_zero]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : n ≠ 0\nc : F\n⊢ (iteratedFDeriv 𝕜 n fun x => c) = 0\n[PROOFSTEP]\ncases' Nat.exists_eq_succ_of_ne_zero hn with k hk\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nn : ℕ\nhn : n ≠ 0\nc : F\nk : ℕ\nhk : n = Nat.succ k\n⊢ (iteratedFDeriv 𝕜 n fun x => c) = 0\n[PROOFSTEP]\nrw [hk, iteratedFDeriv_succ_const]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : IsBoundedLinearMap 𝕜 f\n⊢ ContDiff 𝕜 n f\n[PROOFSTEP]\nsuffices h : ContDiff 𝕜 ∞ f\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : IsBoundedLinearMap 𝕜 f\nh : ContDiff 𝕜 ⊤ f\n⊢ ContDiff 𝕜 n f\n[PROOFSTEP]\nexact h.of_le le_top\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : IsBoundedLinearMap 𝕜 f\n⊢ ContDiff 𝕜 ⊤ f\n[PROOFSTEP]\nrw [contDiff_top_iff_fderiv]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : IsBoundedLinearMap 𝕜 f\n⊢ Differentiable 𝕜 f ∧ ContDiff 𝕜 ⊤ fun y => _root_.fderiv 𝕜 f y\n[PROOFSTEP]\nrefine' ⟨hf.differentiable, _⟩\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : IsBoundedLinearMap 𝕜 f\n⊢ ContDiff 𝕜 ⊤ fun y => _root_.fderiv 𝕜 f y\n[PROOFSTEP]\nsimp_rw [hf.fderiv]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : IsBoundedLinearMap 𝕜 f\n⊢ ContDiff 𝕜 ⊤ fun y => toContinuousLinearMap hf\n[PROOFSTEP]\nexact contDiff_const\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhb : IsBoundedBilinearMap 𝕜 b\n⊢ ContDiff 𝕜 n b\n[PROOFSTEP]\nsuffices h : ContDiff 𝕜 ∞ b\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhb : IsBoundedBilinearMap 𝕜 b\nh : ContDiff 𝕜 ⊤ b\n⊢ ContDiff 𝕜 n b\n[PROOFSTEP]\nexact h.of_le le_top\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhb : IsBoundedBilinearMap 𝕜 b\n⊢ ContDiff 𝕜 ⊤ b\n[PROOFSTEP]\nrw [contDiff_top_iff_fderiv]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhb : IsBoundedBilinearMap 𝕜 b\n⊢ Differentiable 𝕜 b ∧ ContDiff 𝕜 ⊤ fun y => fderiv 𝕜 b y\n[PROOFSTEP]\nrefine' ⟨hb.differentiable, _⟩\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhb : IsBoundedBilinearMap 𝕜 b\n⊢ ContDiff 𝕜 ⊤ fun y => fderiv 𝕜 b y\n[PROOFSTEP]\nsimp only [hb.fderiv]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhb : IsBoundedBilinearMap 𝕜 b\n⊢ ContDiff 𝕜 ⊤ fun y => deriv hb y\n[PROOFSTEP]\nexact hb.isBoundedLinearMap_deriv.contDiff\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F →L[𝕜] G\nhf : ContDiffWithinAt 𝕜 n f s x\nm : ℕ\nhm : ↑m ≤ n\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (↑g ∘ f) p u\n[PROOFSTEP]\nrcases hf m hm with ⟨u, hu, p, hp⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np✝ : E → FormalMultilinearSeries 𝕜 E F\ng : F →L[𝕜] G\nhf : ContDiffWithinAt 𝕜 n f s x\nm : ℕ\nhm : ↑m ≤ n\nu : Set E\nhu : u ∈ 𝓝[insert x s] x\np : E → FormalMultilinearSeries 𝕜 E F\nhp : HasFTaylorSeriesUpToOn (↑m) f p u\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (↑g ∘ f) p u\n[PROOFSTEP]\nexact ⟨u, hu, _, hp.continuousLinearMap_comp g⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F\ng : F →L[𝕜] G\nhf : ContDiff 𝕜 n f\nx : E\ni : ℕ\nhi : ↑i ≤ n\n⊢ iteratedFDeriv 𝕜 i (↑g ∘ f) x = compContinuousMultilinearMap g (iteratedFDeriv 𝕜 i f x)\n[PROOFSTEP]\nsimp only [← iteratedFDerivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F\ng : F →L[𝕜] G\nhf : ContDiff 𝕜 n f\nx : E\ni : ℕ\nhi : ↑i ≤ n\n⊢ iteratedFDerivWithin 𝕜 i (↑g ∘ f) univ x = compContinuousMultilinearMap g (iteratedFDerivWithin 𝕜 i f univ x)\n[PROOFSTEP]\nexact g.iteratedFDerivWithin_comp_left hf.contDiffOn uniqueDiffOn_univ (mem_univ x) hi\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃L[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\ni : ℕ\n⊢ iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =\n    ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 i f s x)\n[PROOFSTEP]\ninduction' i with i IH generalizing x\n[GOAL]\ncase zero\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃L[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\nx : E\nhx : x ∈ s\n⊢ iteratedFDerivWithin 𝕜 Nat.zero (↑g ∘ f) s x =\n    ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 Nat.zero f s x)\n[PROOFSTEP]\next1 m\n[GOAL]\ncase zero.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃L[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\nx : E\nhx : x ∈ s\nm : Fin Nat.zero → E\n⊢ ↑(iteratedFDerivWithin 𝕜 Nat.zero (↑g ∘ f) s x) m =\n    ↑(ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 Nat.zero f s x)) m\n[PROOFSTEP]\nsimp only [Nat.zero_eq, iteratedFDerivWithin_zero_apply, comp_apply,\n  ContinuousLinearMap.compContinuousMultilinearMap_coe, coe_coe]\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃L[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : E},\n    x ∈ s →\n      iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =\n        ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 i f s x)\nx : E\nhx : x ∈ s\n⊢ iteratedFDerivWithin 𝕜 (Nat.succ i) (↑g ∘ f) s x =\n    ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 (Nat.succ i) f s x)\n[PROOFSTEP]\next1 m\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃L[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : E},\n    x ∈ s →\n      iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =\n        ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 i f s x)\nx : E\nhx : x ∈ s\nm : Fin (Nat.succ i) → E\n⊢ ↑(iteratedFDerivWithin 𝕜 (Nat.succ i) (↑g ∘ f) s x) m =\n    ↑(ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 (Nat.succ i) f s x)) m\n[PROOFSTEP]\nrw [iteratedFDerivWithin_succ_apply_left]\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃L[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : E},\n    x ∈ s →\n      iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =\n        ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 i f s x)\nx : E\nhx : x ∈ s\nm : Fin (Nat.succ i) → E\n⊢ ↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (↑g ∘ f) s) s x) (m 0)) (tail m) =\n    ↑(ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 (Nat.succ i) f s x)) m\n[PROOFSTEP]\nhave Z :\n  fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (g ∘ f) s) s x =\n    fderivWithin 𝕜 (g.compContinuousMultilinearMapL (fun _ : Fin i => E) ∘ iteratedFDerivWithin 𝕜 i f s) s x :=\n  fderivWithin_congr' (@IH) hx\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃L[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : E},\n    x ∈ s →\n      iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =\n        ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 i f s x)\nx : E\nhx : x ∈ s\nm : Fin (Nat.succ i) → E\nZ :\n  fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (↑g ∘ f) s) s x =\n    fderivWithin 𝕜 (↑(compContinuousMultilinearMapL (fun x => E) g) ∘ iteratedFDerivWithin 𝕜 i f s) s x\n⊢ ↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (↑g ∘ f) s) s x) (m 0)) (tail m) =\n    ↑(ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 (Nat.succ i) f s x)) m\n[PROOFSTEP]\nsimp_rw [Z]\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃L[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : E},\n    x ∈ s →\n      iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =\n        ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 i f s x)\nx : E\nhx : x ∈ s\nm : Fin (Nat.succ i) → E\nZ :\n  fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (↑g ∘ f) s) s x =\n    fderivWithin 𝕜 (↑(compContinuousMultilinearMapL (fun x => E) g) ∘ iteratedFDerivWithin 𝕜 i f s) s x\n⊢ ↑(↑(fderivWithin 𝕜 (↑(compContinuousMultilinearMapL (fun x => E) g) ∘ iteratedFDerivWithin 𝕜 i f s) s x) (m 0))\n      (tail m) =\n    ↑(ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 (Nat.succ i) f s x)) m\n[PROOFSTEP]\nrw [(g.compContinuousMultilinearMapL fun _ : Fin i => E).comp_fderivWithin (hs x hx)]\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃L[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : E},\n    x ∈ s →\n      iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =\n        ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 i f s x)\nx : E\nhx : x ∈ s\nm : Fin (Nat.succ i) → E\nZ :\n  fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (↑g ∘ f) s) s x =\n    fderivWithin 𝕜 (↑(compContinuousMultilinearMapL (fun x => E) g) ∘ iteratedFDerivWithin 𝕜 i f s) s x\n⊢ ↑(↑(ContinuousLinearMap.comp (↑(compContinuousMultilinearMapL (fun x => E) g))\n              (fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s) s x))\n          (m 0))\n      (tail m) =\n    ↑(ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 (Nat.succ i) f s x)) m\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe, comp_apply,\n  ContinuousLinearEquiv.compContinuousMultilinearMapL_apply, ContinuousLinearMap.compContinuousMultilinearMap_coe,\n  EmbeddingLike.apply_eq_iff_eq]\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃L[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : E},\n    x ∈ s →\n      iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =\n        ContinuousLinearMap.compContinuousMultilinearMap (↑g) (iteratedFDerivWithin 𝕜 i f s x)\nx : E\nhx : x ∈ s\nm : Fin (Nat.succ i) → E\nZ :\n  fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (↑g ∘ f) s) s x =\n    fderivWithin 𝕜 (↑(compContinuousMultilinearMapL (fun x => E) g) ∘ iteratedFDerivWithin 𝕜 i f s) s x\n⊢ ↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s) s x) (m 0)) (tail m) =\n    ↑(iteratedFDerivWithin 𝕜 (Nat.succ i) f s x) m\n[PROOFSTEP]\nrw [iteratedFDerivWithin_succ_apply_left]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F\ng : F →ₗᵢ[𝕜] G\nhf : ContDiffOn 𝕜 n f s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\ni : ℕ\nhi : ↑i ≤ n\n⊢ ‖iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\n[PROOFSTEP]\nhave :\n  iteratedFDerivWithin 𝕜 i (g ∘ f) s x =\n    g.toContinuousLinearMap.compContinuousMultilinearMap (iteratedFDerivWithin 𝕜 i f s x) :=\n  g.toContinuousLinearMap.iteratedFDerivWithin_comp_left hf hs hx hi\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F\ng : F →ₗᵢ[𝕜] G\nhf : ContDiffOn 𝕜 n f s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\ni : ℕ\nhi : ↑i ≤ n\nthis :\n  iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =\n    ContinuousLinearMap.compContinuousMultilinearMap (toContinuousLinearMap g) (iteratedFDerivWithin 𝕜 i f s x)\n⊢ ‖iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\n[PROOFSTEP]\nrw [this]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F\ng : F →ₗᵢ[𝕜] G\nhf : ContDiffOn 𝕜 n f s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\ni : ℕ\nhi : ↑i ≤ n\nthis :\n  iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =\n    ContinuousLinearMap.compContinuousMultilinearMap (toContinuousLinearMap g) (iteratedFDerivWithin 𝕜 i f s x)\n⊢ ‖ContinuousLinearMap.compContinuousMultilinearMap (toContinuousLinearMap g) (iteratedFDerivWithin 𝕜 i f s x)‖ =\n    ‖iteratedFDerivWithin 𝕜 i f s x‖\n[PROOFSTEP]\napply LinearIsometry.norm_compContinuousMultilinearMap\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F\ng : F →ₗᵢ[𝕜] G\nhf : ContDiff 𝕜 n f\nx : E\ni : ℕ\nhi : ↑i ≤ n\n⊢ ‖iteratedFDeriv 𝕜 i (↑g ∘ f) x‖ = ‖iteratedFDeriv 𝕜 i f x‖\n[PROOFSTEP]\nsimp only [← iteratedFDerivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F\ng : F →ₗᵢ[𝕜] G\nhf : ContDiff 𝕜 n f\nx : E\ni : ℕ\nhi : ↑i ≤ n\n⊢ ‖iteratedFDerivWithin 𝕜 i (↑g ∘ f) univ x‖ = ‖iteratedFDerivWithin 𝕜 i f univ x‖\n[PROOFSTEP]\nexact g.norm_iteratedFDerivWithin_comp_left hf.contDiffOn uniqueDiffOn_univ (mem_univ x) hi\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃ₗᵢ[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\n[PROOFSTEP]\nhave :\n  iteratedFDerivWithin 𝕜 i (g ∘ f) s x =\n    (g : F →L[𝕜] G).compContinuousMultilinearMap (iteratedFDerivWithin 𝕜 i f s x) :=\n  g.toContinuousLinearEquiv.iteratedFDerivWithin_comp_left f hs hx i\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃ₗᵢ[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\ni : ℕ\nthis :\n  iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =\n    ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.mk g.toLinearEquiv))\n      (iteratedFDerivWithin 𝕜 i f s x)\n⊢ ‖iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\n[PROOFSTEP]\nrw [this]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃ₗᵢ[𝕜] G\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\ni : ℕ\nthis :\n  iteratedFDerivWithin 𝕜 i (↑g ∘ f) s x =\n    ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.mk g.toLinearEquiv))\n      (iteratedFDerivWithin 𝕜 i f s x)\n⊢ ‖ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.mk g.toLinearEquiv))\n        (iteratedFDerivWithin 𝕜 i f s x)‖ =\n    ‖iteratedFDerivWithin 𝕜 i f s x‖\n[PROOFSTEP]\napply LinearIsometry.norm_compContinuousMultilinearMap g.toLinearIsometry\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃ₗᵢ[𝕜] G\nf : E → F\nx : E\ni : ℕ\n⊢ ‖iteratedFDeriv 𝕜 i (↑g ∘ f) x‖ = ‖iteratedFDeriv 𝕜 i f x‖\n[PROOFSTEP]\nrw [← iteratedFDerivWithin_univ, ← iteratedFDerivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F ≃ₗᵢ[𝕜] G\nf : E → F\nx : E\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 i (↑g ∘ f) univ x‖ = ‖iteratedFDerivWithin 𝕜 i f univ x‖\n[PROOFSTEP]\napply g.norm_iteratedFDerivWithin_comp_left f uniqueDiffOn_univ (mem_univ x) i\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : F ≃L[𝕜] G\nH : ContDiffWithinAt 𝕜 n (↑e ∘ f) s x\n⊢ ContDiffWithinAt 𝕜 n f s x\n[PROOFSTEP]\nsimpa only [(· ∘ ·), e.symm.coe_coe, e.symm_apply_apply] using H.continuousLinearMap_comp (e.symm : G →L[𝕜] F)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : F ≃L[𝕜] G\n⊢ ContDiffAt 𝕜 n (↑e ∘ f) x ↔ ContDiffAt 𝕜 n f x\n[PROOFSTEP]\nsimp only [← contDiffWithinAt_univ, e.comp_contDiffWithinAt_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : F ≃L[𝕜] G\n⊢ ContDiffOn 𝕜 n (↑e ∘ f) s ↔ ContDiffOn 𝕜 n f s\n[PROOFSTEP]\nsimp [ContDiffOn, e.comp_contDiffWithinAt_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : F ≃L[𝕜] G\n⊢ ContDiff 𝕜 n (↑e ∘ f) ↔ ContDiff 𝕜 n f\n[PROOFSTEP]\nsimp only [← contDiffOn_univ, e.comp_contDiffOn_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\n⊢ HasFTaylorSeriesUpToOn n (f ∘ ↑g)\n    (fun x k => ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) k) fun x => g) (↑g ⁻¹' s)\n[PROOFSTEP]\nlet A : ∀ m : ℕ, (E[×m]→L[𝕜] F) → G[×m]→L[𝕜] F := fun m h => h.compContinuousLinearMap fun _ => g\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\n⊢ HasFTaylorSeriesUpToOn n (f ∘ ↑g)\n    (fun x k => ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) k) fun x => g) (↑g ⁻¹' s)\n[PROOFSTEP]\nhave hA : ∀ m, IsBoundedLinearMap 𝕜 (A m) := fun m => isBoundedLinearMap_continuousMultilinearMap_comp_linear g\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\n⊢ HasFTaylorSeriesUpToOn n (f ∘ ↑g)\n    (fun x k => ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) k) fun x => g) (↑g ⁻¹' s)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase zero_eq\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\n⊢ ∀ (x : G),\n    x ∈ ↑g ⁻¹' s →\n      ContinuousMultilinearMap.uncurry0 (ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) 0) fun x => g) =\n        (f ∘ ↑g) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase zero_eq\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\nx : G\nhx : x ∈ ↑g ⁻¹' s\n⊢ ContinuousMultilinearMap.uncurry0 (ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) 0) fun x => g) =\n    (f ∘ ↑g) x\n[PROOFSTEP]\nsimp only [(hf.zero_eq (g x) hx).symm, Function.comp_apply]\n[GOAL]\ncase zero_eq\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\nx : G\nhx : x ∈ ↑g ⁻¹' s\n⊢ ContinuousMultilinearMap.uncurry0 (ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) 0) fun x => g) =\n    ContinuousMultilinearMap.uncurry0 (p (↑g x) 0)\n[PROOFSTEP]\nchange (p (g x) 0 fun _ : Fin 0 => g 0) = p (g x) 0 0\n[GOAL]\ncase zero_eq\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\nx : G\nhx : x ∈ ↑g ⁻¹' s\n⊢ (↑(p (↑g x) 0) fun x => ↑g 0) = ↑(p (↑g x) 0) 0\n[PROOFSTEP]\nrw [ContinuousLinearMap.map_zero]\n[GOAL]\ncase zero_eq\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\nx : G\nhx : x ∈ ↑g ⁻¹' s\n⊢ (↑(p (↑g x) 0) fun x => 0) = ↑(p (↑g x) 0) 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase fderivWithin\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\n⊢ ∀ (m : ℕ),\n    ↑m < n →\n      ∀ (x : G),\n        x ∈ ↑g ⁻¹' s →\n          HasFDerivWithinAt (fun x => ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) m) fun x => g)\n            (ContinuousMultilinearMap.curryLeft\n              (ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) (Nat.succ m)) fun x => g))\n            (↑g ⁻¹' s) x\n[PROOFSTEP]\nintro m hm x hx\n[GOAL]\ncase fderivWithin\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\nm : ℕ\nhm : ↑m < n\nx : G\nhx : x ∈ ↑g ⁻¹' s\n⊢ HasFDerivWithinAt (fun x => ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) m) fun x => g)\n    (ContinuousMultilinearMap.curryLeft\n      (ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) (Nat.succ m)) fun x => g))\n    (↑g ⁻¹' s) x\n[PROOFSTEP]\nconvert\n  (hA m).hasFDerivAt.comp_hasFDerivWithinAt x\n    ((hf.fderivWithin m hm (g x) hx).comp x g.hasFDerivWithinAt (Subset.refl _))\n[GOAL]\ncase h.e'_10.h.h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\nm : ℕ\nhm : ↑m < n\nx : G\nhx : x ∈ ↑g ⁻¹' s\ne_7✝ : ContinuousMultilinearMap.normedAddCommGroup = ContinuousMultilinearMap.normedAddCommGroup'\nhe✝ : ContinuousMultilinearMap.normedSpace' = ContinuousMultilinearMap.normedSpace'\n⊢ ContinuousMultilinearMap.curryLeft\n      (ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) (Nat.succ m)) fun x => g) =\n    ContinuousLinearMap.comp (IsBoundedLinearMap.toContinuousLinearMap (_ : IsBoundedLinearMap 𝕜 (A m)))\n      (ContinuousLinearMap.comp (ContinuousMultilinearMap.curryLeft (p (↑g x) (Nat.succ m))) g)\n[PROOFSTEP]\next y v\n[GOAL]\ncase h.e'_10.h.h.h.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\nm : ℕ\nhm : ↑m < n\nx : G\nhx : x ∈ ↑g ⁻¹' s\ne_7✝ : ContinuousMultilinearMap.normedAddCommGroup = ContinuousMultilinearMap.normedAddCommGroup'\nhe✝ : ContinuousMultilinearMap.normedSpace' = ContinuousMultilinearMap.normedSpace'\ny : G\nv : Fin m → G\n⊢ ↑(↑(ContinuousMultilinearMap.curryLeft\n              (ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) (Nat.succ m)) fun x => g))\n          y)\n      v =\n    ↑(↑(ContinuousLinearMap.comp (IsBoundedLinearMap.toContinuousLinearMap (_ : IsBoundedLinearMap 𝕜 (A m)))\n              (ContinuousLinearMap.comp (ContinuousMultilinearMap.curryLeft (p (↑g x) (Nat.succ m))) g))\n          y)\n      v\n[PROOFSTEP]\nchange p (g x) (Nat.succ m) (g ∘ cons y v) = p (g x) m.succ (cons (g y) (g ∘ v))\n[GOAL]\ncase h.e'_10.h.h.h.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\nm : ℕ\nhm : ↑m < n\nx : G\nhx : x ∈ ↑g ⁻¹' s\ne_7✝ : ContinuousMultilinearMap.normedAddCommGroup = ContinuousMultilinearMap.normedAddCommGroup'\nhe✝ : ContinuousMultilinearMap.normedSpace' = ContinuousMultilinearMap.normedSpace'\ny : G\nv : Fin m → G\n⊢ ↑(p (↑g x) (Nat.succ m)) (↑g ∘ cons y v) = ↑(p (↑g x) (Nat.succ m)) (cons (↑g y) (↑g ∘ v))\n[PROOFSTEP]\nrw [comp_cons]\n[GOAL]\ncase cont\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\n⊢ ∀ (m : ℕ),\n    ↑m ≤ n → ContinuousOn (fun x => ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) m) fun x => g) (↑g ⁻¹' s)\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase cont\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : G →L[𝕜] E\nA : (m : ℕ) → ContinuousMultilinearMap 𝕜 (fun i => E) F → ContinuousMultilinearMap 𝕜 (fun i => G) F :=\n  fun m h => ContinuousMultilinearMap.compContinuousLinearMap h fun x => g\nhA : ∀ (m : ℕ), IsBoundedLinearMap 𝕜 (A m)\nm : ℕ\nhm : ↑m ≤ n\n⊢ ContinuousOn (fun x => ContinuousMultilinearMap.compContinuousLinearMap (p (↑g x) m) fun x => g) (↑g ⁻¹' s)\n[PROOFSTEP]\nexact (hA m).continuous.comp_continuousOn <| (hf.cont m hm).comp g.continuous.continuousOn <| Subset.refl _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nx : G\ng : G →L[𝕜] E\nhf : ContDiffWithinAt 𝕜 n f s (↑g x)\n⊢ ContDiffWithinAt 𝕜 n (f ∘ ↑g) (↑g ⁻¹' s) x\n[PROOFSTEP]\nintro m hm\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nx : G\ng : G →L[𝕜] E\nhf : ContDiffWithinAt 𝕜 n f s (↑g x)\nm : ℕ\nhm : ↑m ≤ n\n⊢ ∃ u, u ∈ 𝓝[insert x (↑g ⁻¹' s)] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (f ∘ ↑g) p u\n[PROOFSTEP]\nrcases hf m hm with ⟨u, hu, p, hp⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np✝ : E → FormalMultilinearSeries 𝕜 E F\nx : G\ng : G →L[𝕜] E\nhf : ContDiffWithinAt 𝕜 n f s (↑g x)\nm : ℕ\nhm : ↑m ≤ n\nu : Set E\nhu : u ∈ 𝓝[insert (↑g x) s] ↑g x\np : E → FormalMultilinearSeries 𝕜 E F\nhp : HasFTaylorSeriesUpToOn (↑m) f p u\n⊢ ∃ u, u ∈ 𝓝[insert x (↑g ⁻¹' s)] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (f ∘ ↑g) p u\n[PROOFSTEP]\nrefine ⟨g ⁻¹' u, ?_, _, hp.compContinuousLinearMap g⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np✝ : E → FormalMultilinearSeries 𝕜 E F\nx : G\ng : G →L[𝕜] E\nhf : ContDiffWithinAt 𝕜 n f s (↑g x)\nm : ℕ\nhm : ↑m ≤ n\nu : Set E\nhu : u ∈ 𝓝[insert (↑g x) s] ↑g x\np : E → FormalMultilinearSeries 𝕜 E F\nhp : HasFTaylorSeriesUpToOn (↑m) f p u\n⊢ ↑g ⁻¹' u ∈ 𝓝[insert x (↑g ⁻¹' s)] x\n[PROOFSTEP]\nrefine g.continuous.continuousWithinAt.tendsto_nhdsWithin ?_ hu\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np✝ : E → FormalMultilinearSeries 𝕜 E F\nx : G\ng : G →L[𝕜] E\nhf : ContDiffWithinAt 𝕜 n f s (↑g x)\nm : ℕ\nhm : ↑m ≤ n\nu : Set E\nhu : u ∈ 𝓝[insert (↑g x) s] ↑g x\np : E → FormalMultilinearSeries 𝕜 E F\nhp : HasFTaylorSeriesUpToOn (↑m) f p u\n⊢ MapsTo (↑g) (insert x (↑g ⁻¹' s)) (insert (↑g x) s)\n[PROOFSTEP]\nexact (mapsTo_singleton.2 <| mem_singleton _).union_union (mapsTo_preimage _ _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃L[𝕜] E\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nx : G\nhx : ↑g x ∈ s\ni : ℕ\n⊢ iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s) x =\n    ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 i f s (↑g x)) fun x => ↑g\n[PROOFSTEP]\ninduction' i with i IH generalizing x\n[GOAL]\ncase zero\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃L[𝕜] E\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nx✝ : G\nhx✝ : ↑g x✝ ∈ s\nx : G\nhx : ↑g x ∈ s\n⊢ iteratedFDerivWithin 𝕜 Nat.zero (f ∘ ↑g) (↑g ⁻¹' s) x =\n    ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 Nat.zero f s (↑g x)) fun x => ↑g\n[PROOFSTEP]\next1\n[GOAL]\ncase zero.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝² x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃L[𝕜] E\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nx✝¹ : G\nhx✝ : ↑g x✝¹ ∈ s\nx : G\nhx : ↑g x ∈ s\nx✝ : Fin Nat.zero → G\n⊢ ↑(iteratedFDerivWithin 𝕜 Nat.zero (f ∘ ↑g) (↑g ⁻¹' s) x) x✝ =\n    ↑(ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 Nat.zero f s (↑g x)) fun x => ↑g) x✝\n[PROOFSTEP]\nsimp only [Nat.zero_eq, iteratedFDerivWithin_zero_apply, comp_apply,\n  ContinuousMultilinearMap.compContinuousLinearMap_apply]\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃L[𝕜] E\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nx✝ : G\nhx✝ : ↑g x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : G},\n    ↑g x ∈ s →\n      iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s) x =\n        ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 i f s (↑g x)) fun x => ↑g\nx : G\nhx : ↑g x ∈ s\n⊢ iteratedFDerivWithin 𝕜 (Nat.succ i) (f ∘ ↑g) (↑g ⁻¹' s) x =\n    ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 (Nat.succ i) f s (↑g x)) fun x => ↑g\n[PROOFSTEP]\next1 m\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃L[𝕜] E\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nx✝ : G\nhx✝ : ↑g x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : G},\n    ↑g x ∈ s →\n      iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s) x =\n        ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 i f s (↑g x)) fun x => ↑g\nx : G\nhx : ↑g x ∈ s\nm : Fin (Nat.succ i) → G\n⊢ ↑(iteratedFDerivWithin 𝕜 (Nat.succ i) (f ∘ ↑g) (↑g ⁻¹' s) x) m =\n    ↑(ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 (Nat.succ i) f s (↑g x)) fun x => ↑g) m\n[PROOFSTEP]\nsimp only [ContinuousMultilinearMap.compContinuousLinearMap_apply, ContinuousLinearEquiv.coe_coe,\n  iteratedFDerivWithin_succ_apply_left]\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃L[𝕜] E\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nx✝ : G\nhx✝ : ↑g x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : G},\n    ↑g x ∈ s →\n      iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s) x =\n        ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 i f s (↑g x)) fun x => ↑g\nx : G\nhx : ↑g x ∈ s\nm : Fin (Nat.succ i) → G\n⊢ ↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s)) (↑g ⁻¹' s) x) (m 0)) (tail m) =\n    ↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s) s (↑g x)) (↑g (m 0))) (tail fun i => ↑g (m i))\n[PROOFSTEP]\nhave :\n  fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (f ∘ g) (g ⁻¹' s)) (g ⁻¹' s) x =\n    fderivWithin 𝕜\n      (ContinuousMultilinearMap.compContinuousLinearMapEquivL _ (fun _x : Fin i => g) ∘\n        (iteratedFDerivWithin 𝕜 i f s ∘ g))\n      (g ⁻¹' s) x :=\n  fderivWithin_congr' (@IH) hx\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃L[𝕜] E\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nx✝ : G\nhx✝ : ↑g x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : G},\n    ↑g x ∈ s →\n      iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s) x =\n        ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 i f s (↑g x)) fun x => ↑g\nx : G\nhx : ↑g x ∈ s\nm : Fin (Nat.succ i) → G\nthis :\n  fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s)) (↑g ⁻¹' s) x =\n    fderivWithin 𝕜\n      (↑(ContinuousMultilinearMap.compContinuousLinearMapEquivL F fun _x => g) ∘ iteratedFDerivWithin 𝕜 i f s ∘ ↑g)\n      (↑g ⁻¹' s) x\n⊢ ↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s)) (↑g ⁻¹' s) x) (m 0)) (tail m) =\n    ↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s) s (↑g x)) (↑g (m 0))) (tail fun i => ↑g (m i))\n[PROOFSTEP]\nrw [this, ContinuousLinearEquiv.comp_fderivWithin _ (g.uniqueDiffOn_preimage_iff.2 hs x hx)]\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃L[𝕜] E\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nx✝ : G\nhx✝ : ↑g x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : G},\n    ↑g x ∈ s →\n      iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s) x =\n        ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 i f s (↑g x)) fun x => ↑g\nx : G\nhx : ↑g x ∈ s\nm : Fin (Nat.succ i) → G\nthis :\n  fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s)) (↑g ⁻¹' s) x =\n    fderivWithin 𝕜\n      (↑(ContinuousMultilinearMap.compContinuousLinearMapEquivL F fun _x => g) ∘ iteratedFDerivWithin 𝕜 i f s ∘ ↑g)\n      (↑g ⁻¹' s) x\n⊢ ↑(↑(ContinuousLinearMap.comp (↑(ContinuousMultilinearMap.compContinuousLinearMapEquivL F fun _x => g))\n              (fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s ∘ ↑g) (↑g ⁻¹' s) x))\n          (m 0))\n      (tail m) =\n    ↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s) s (↑g x)) (↑g (m 0))) (tail fun i => ↑g (m i))\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe, comp_apply,\n  ContinuousMultilinearMap.compContinuousLinearMapEquivL_apply, ContinuousMultilinearMap.compContinuousLinearMap_apply]\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃L[𝕜] E\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nx✝ : G\nhx✝ : ↑g x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : G},\n    ↑g x ∈ s →\n      iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s) x =\n        ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 i f s (↑g x)) fun x => ↑g\nx : G\nhx : ↑g x ∈ s\nm : Fin (Nat.succ i) → G\nthis :\n  fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s)) (↑g ⁻¹' s) x =\n    fderivWithin 𝕜\n      (↑(ContinuousMultilinearMap.compContinuousLinearMapEquivL F fun _x => g) ∘ iteratedFDerivWithin 𝕜 i f s ∘ ↑g)\n      (↑g ⁻¹' s) x\n⊢ (↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s ∘ ↑g) (↑g ⁻¹' s) x) (m 0)) fun i_1 => ↑g (tail m i_1)) =\n    ↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s) s (↑g x)) (↑g (m 0))) (tail fun i => ↑g (m i))\n[PROOFSTEP]\nrw [ContinuousLinearEquiv.comp_right_fderivWithin _ (g.uniqueDiffOn_preimage_iff.2 hs x hx)]\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃L[𝕜] E\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nx✝ : G\nhx✝ : ↑g x✝ ∈ s\ni : ℕ\nIH :\n  ∀ {x : G},\n    ↑g x ∈ s →\n      iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s) x =\n        ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 i f s (↑g x)) fun x => ↑g\nx : G\nhx : ↑g x ∈ s\nm : Fin (Nat.succ i) → G\nthis :\n  fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s)) (↑g ⁻¹' s) x =\n    fderivWithin 𝕜\n      (↑(ContinuousMultilinearMap.compContinuousLinearMapEquivL F fun _x => g) ∘ iteratedFDerivWithin 𝕜 i f s ∘ ↑g)\n      (↑g ⁻¹' s) x\n⊢ (↑(↑(ContinuousLinearMap.comp (fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s) s (↑g x)) ↑g) (m 0)) fun i_1 =>\n      ↑g (tail m i_1)) =\n    ↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s) s (↑g x)) (↑g (m 0))) (tail fun i => ↑g (m i))\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G →L[𝕜] E\nf : E → F\nhf : ContDiff 𝕜 n f\nx : G\ni : ℕ\nhi : ↑i ≤ n\n⊢ iteratedFDeriv 𝕜 i (f ∘ ↑g) x =\n    ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDeriv 𝕜 i f (↑g x)) fun x => g\n[PROOFSTEP]\nsimp only [← iteratedFDerivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G →L[𝕜] E\nf : E → F\nhf : ContDiff 𝕜 n f\nx : G\ni : ℕ\nhi : ↑i ≤ n\n⊢ iteratedFDerivWithin 𝕜 i (f ∘ ↑g) univ x =\n    ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 i f univ (↑g x)) fun x => g\n[PROOFSTEP]\nexact g.iteratedFDerivWithin_comp_right hf.contDiffOn uniqueDiffOn_univ uniqueDiffOn_univ (mem_univ _) hi\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃ₗᵢ[𝕜] E\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nx : G\nhx : ↑g x ∈ s\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s) x‖ = ‖iteratedFDerivWithin 𝕜 i f s (↑g x)‖\n[PROOFSTEP]\nhave :\n  iteratedFDerivWithin 𝕜 i (f ∘ g) (g ⁻¹' s) x =\n    (iteratedFDerivWithin 𝕜 i f s (g x)).compContinuousLinearMap fun _ => g :=\n  g.toContinuousLinearEquiv.iteratedFDerivWithin_comp_right f hs hx i\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃ₗᵢ[𝕜] E\nf : E → F\nhs : UniqueDiffOn 𝕜 s\nx : G\nhx : ↑g x ∈ s\ni : ℕ\nthis :\n  iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s) x =\n    ContinuousMultilinearMap.compContinuousLinearMap (iteratedFDerivWithin 𝕜 i f s (↑g x)) fun x =>\n      ↑(ContinuousLinearEquiv.mk g.toLinearEquiv)\n⊢ ‖iteratedFDerivWithin 𝕜 i (f ∘ ↑g) (↑g ⁻¹' s) x‖ = ‖iteratedFDerivWithin 𝕜 i f s (↑g x)‖\n[PROOFSTEP]\nrw [this, ContinuousMultilinearMap.norm_compContinuous_linearIsometryEquiv]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃ₗᵢ[𝕜] E\nf : E → F\nx : G\ni : ℕ\n⊢ ‖iteratedFDeriv 𝕜 i (f ∘ ↑g) x‖ = ‖iteratedFDeriv 𝕜 i f (↑g x)‖\n[PROOFSTEP]\nsimp only [← iteratedFDerivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : G ≃ₗᵢ[𝕜] E\nf : E → F\nx : G\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 i (f ∘ ↑g) univ x‖ = ‖iteratedFDerivWithin 𝕜 i f univ (↑g x)‖\n[PROOFSTEP]\napply g.norm_iteratedFDerivWithin_comp_right f uniqueDiffOn_univ (mem_univ (g x)) i\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\n⊢ ContDiffWithinAt 𝕜 n (f ∘ ↑e) (↑e ⁻¹' s) (↑(ContinuousLinearEquiv.symm e) x) ↔ ContDiffWithinAt 𝕜 n f s x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\n⊢ ContDiffWithinAt 𝕜 n (f ∘ ↑e) (↑e ⁻¹' s) (↑(ContinuousLinearEquiv.symm e) x) → ContDiffWithinAt 𝕜 n f s x\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\nH : ContDiffWithinAt 𝕜 n (f ∘ ↑e) (↑e ⁻¹' s) (↑(ContinuousLinearEquiv.symm e) x)\n⊢ ContDiffWithinAt 𝕜 n f s x\n[PROOFSTEP]\nsimpa [← preimage_comp, (· ∘ ·)] using H.comp_continuousLinearMap (e.symm : E →L[𝕜] G)\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\n⊢ ContDiffWithinAt 𝕜 n f s x → ContDiffWithinAt 𝕜 n (f ∘ ↑e) (↑e ⁻¹' s) (↑(ContinuousLinearEquiv.symm e) x)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\nH : ContDiffWithinAt 𝕜 n f s x\n⊢ ContDiffWithinAt 𝕜 n (f ∘ ↑e) (↑e ⁻¹' s) (↑(ContinuousLinearEquiv.symm e) x)\n[PROOFSTEP]\nrw [← e.apply_symm_apply x, ← e.coe_coe] at H \n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\nH : ContDiffWithinAt 𝕜 n f s (↑↑e (↑(ContinuousLinearEquiv.symm e) x))\n⊢ ContDiffWithinAt 𝕜 n (f ∘ ↑e) (↑e ⁻¹' s) (↑(ContinuousLinearEquiv.symm e) x)\n[PROOFSTEP]\nexact H.comp_continuousLinearMap _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\n⊢ ContDiffAt 𝕜 n (f ∘ ↑e) (↑(ContinuousLinearEquiv.symm e) x) ↔ ContDiffAt 𝕜 n f x\n[PROOFSTEP]\nrw [← contDiffWithinAt_univ, ← contDiffWithinAt_univ, ← preimage_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\n⊢ ContDiffWithinAt 𝕜 n (f ∘ ↑e) (?m.505075 ⁻¹' univ) (↑(ContinuousLinearEquiv.symm e) x) ↔ ContDiffWithinAt 𝕜 n f univ x\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\n⊢ Type ?u.505072\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\n⊢ G → ?m.505074\n[PROOFSTEP]\nexact e.contDiffWithinAt_comp_iff\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\nH : ContDiffOn 𝕜 n (f ∘ ↑e) (↑e ⁻¹' s)\n⊢ ContDiffOn 𝕜 n f s\n[PROOFSTEP]\nsimpa [(· ∘ ·)] using H.comp_continuousLinearMap (e.symm : E →L[𝕜] G)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\n⊢ ContDiff 𝕜 n (f ∘ ↑e) ↔ ContDiff 𝕜 n f\n[PROOFSTEP]\nrw [← contDiffOn_univ, ← contDiffOn_univ, ← preimage_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\n⊢ ContDiffOn 𝕜 n (f ∘ ↑e) (?m.518842 ⁻¹' univ) ↔ ContDiffOn 𝕜 n f univ\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\n⊢ Type ?u.518839\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ne : G ≃L[𝕜] E\n⊢ G → ?m.518841\n[PROOFSTEP]\nexact e.contDiffOn_comp_iff\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : E → G\nq : E → FormalMultilinearSeries 𝕜 E G\nhg : HasFTaylorSeriesUpToOn n g q s\n⊢ HasFTaylorSeriesUpToOn n (fun y => (f y, g y)) (fun y k => ContinuousMultilinearMap.prod (p y k) (q y k)) s\n[PROOFSTEP]\nset L := fun m => ContinuousMultilinearMap.prodL 𝕜 (fun _ : Fin m => E) F G\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : E → G\nq : E → FormalMultilinearSeries 𝕜 E G\nhg : HasFTaylorSeriesUpToOn n g q s\nL : (m : ℕ) →\n  ContinuousMultilinearMap 𝕜 (fun x => E) F × ContinuousMultilinearMap 𝕜 (fun x => E) G ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun x => E) (F × G) :=\n  fun m => ContinuousMultilinearMap.prodL 𝕜 (fun x => E) F G\n⊢ HasFTaylorSeriesUpToOn n (fun y => (f y, g y)) (fun y k => ContinuousMultilinearMap.prod (p y k) (q y k)) s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase zero_eq\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : E → G\nq : E → FormalMultilinearSeries 𝕜 E G\nhg : HasFTaylorSeriesUpToOn n g q s\nL : (m : ℕ) →\n  ContinuousMultilinearMap 𝕜 (fun x => E) F × ContinuousMultilinearMap 𝕜 (fun x => E) G ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun x => E) (F × G) :=\n  fun m => ContinuousMultilinearMap.prodL 𝕜 (fun x => E) F G\n⊢ ∀ (x : E), x ∈ s → ContinuousMultilinearMap.uncurry0 (ContinuousMultilinearMap.prod (p x 0) (q x 0)) = (f x, g x)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase zero_eq\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : E → G\nq : E → FormalMultilinearSeries 𝕜 E G\nhg : HasFTaylorSeriesUpToOn n g q s\nL : (m : ℕ) →\n  ContinuousMultilinearMap 𝕜 (fun x => E) F × ContinuousMultilinearMap 𝕜 (fun x => E) G ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun x => E) (F × G) :=\n  fun m => ContinuousMultilinearMap.prodL 𝕜 (fun x => E) F G\nx : E\nhx : x ∈ s\n⊢ ContinuousMultilinearMap.uncurry0 (ContinuousMultilinearMap.prod (p x 0) (q x 0)) = (f x, g x)\n[PROOFSTEP]\nrw [← hf.zero_eq x hx, ← hg.zero_eq x hx]\n[GOAL]\ncase zero_eq\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : E → G\nq : E → FormalMultilinearSeries 𝕜 E G\nhg : HasFTaylorSeriesUpToOn n g q s\nL : (m : ℕ) →\n  ContinuousMultilinearMap 𝕜 (fun x => E) F × ContinuousMultilinearMap 𝕜 (fun x => E) G ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun x => E) (F × G) :=\n  fun m => ContinuousMultilinearMap.prodL 𝕜 (fun x => E) F G\nx : E\nhx : x ∈ s\n⊢ ContinuousMultilinearMap.uncurry0 (ContinuousMultilinearMap.prod (p x 0) (q x 0)) =\n    (ContinuousMultilinearMap.uncurry0 (p x 0), ContinuousMultilinearMap.uncurry0 (q x 0))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase fderivWithin\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : E → G\nq : E → FormalMultilinearSeries 𝕜 E G\nhg : HasFTaylorSeriesUpToOn n g q s\nL : (m : ℕ) →\n  ContinuousMultilinearMap 𝕜 (fun x => E) F × ContinuousMultilinearMap 𝕜 (fun x => E) G ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun x => E) (F × G) :=\n  fun m => ContinuousMultilinearMap.prodL 𝕜 (fun x => E) F G\n⊢ ∀ (m : ℕ),\n    ↑m < n →\n      ∀ (x : E),\n        x ∈ s →\n          HasFDerivWithinAt (fun x => ContinuousMultilinearMap.prod (p x m) (q x m))\n            (ContinuousMultilinearMap.curryLeft (ContinuousMultilinearMap.prod (p x (Nat.succ m)) (q x (Nat.succ m)))) s\n            x\n[PROOFSTEP]\nintro m hm x hx\n[GOAL]\ncase fderivWithin\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : E → G\nq : E → FormalMultilinearSeries 𝕜 E G\nhg : HasFTaylorSeriesUpToOn n g q s\nL : (m : ℕ) →\n  ContinuousMultilinearMap 𝕜 (fun x => E) F × ContinuousMultilinearMap 𝕜 (fun x => E) G ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun x => E) (F × G) :=\n  fun m => ContinuousMultilinearMap.prodL 𝕜 (fun x => E) F G\nm : ℕ\nhm : ↑m < n\nx : E\nhx : x ∈ s\n⊢ HasFDerivWithinAt (fun x => ContinuousMultilinearMap.prod (p x m) (q x m))\n    (ContinuousMultilinearMap.curryLeft (ContinuousMultilinearMap.prod (p x (Nat.succ m)) (q x (Nat.succ m)))) s x\n[PROOFSTEP]\nconvert (L m).hasFDerivAt.comp_hasFDerivWithinAt x ((hf.fderivWithin m hm x hx).prod (hg.fderivWithin m hm x hx))\n[GOAL]\ncase cont\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : E → G\nq : E → FormalMultilinearSeries 𝕜 E G\nhg : HasFTaylorSeriesUpToOn n g q s\nL : (m : ℕ) →\n  ContinuousMultilinearMap 𝕜 (fun x => E) F × ContinuousMultilinearMap 𝕜 (fun x => E) G ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun x => E) (F × G) :=\n  fun m => ContinuousMultilinearMap.prodL 𝕜 (fun x => E) F G\n⊢ ∀ (m : ℕ), ↑m ≤ n → ContinuousOn (fun x => ContinuousMultilinearMap.prod (p x m) (q x m)) s\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase cont\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : HasFTaylorSeriesUpToOn n f p s\ng : E → G\nq : E → FormalMultilinearSeries 𝕜 E G\nhg : HasFTaylorSeriesUpToOn n g q s\nL : (m : ℕ) →\n  ContinuousMultilinearMap 𝕜 (fun x => E) F × ContinuousMultilinearMap 𝕜 (fun x => E) G ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun x => E) (F × G) :=\n  fun m => ContinuousMultilinearMap.prodL 𝕜 (fun x => E) F G\nm : ℕ\nhm : ↑m ≤ n\n⊢ ContinuousOn (fun x => ContinuousMultilinearMap.prod (p x m) (q x m)) s\n[PROOFSTEP]\nexact (L m).continuous.comp_continuousOn ((hf.cont m hm).prod (hg.cont m hm))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nf : E → F\ng : E → G\nhf : ContDiffWithinAt 𝕜 n f s x\nhg : ContDiffWithinAt 𝕜 n g s x\n⊢ ContDiffWithinAt 𝕜 n (fun x => (f x, g x)) s x\n[PROOFSTEP]\nintro m hm\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nf : E → F\ng : E → G\nhf : ContDiffWithinAt 𝕜 n f s x\nhg : ContDiffWithinAt 𝕜 n g s x\nm : ℕ\nhm : ↑m ≤ n\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (fun x => (f x, g x)) p u\n[PROOFSTEP]\nrcases hf m hm with ⟨u, hu, p, hp⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np✝ : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nf : E → F\ng : E → G\nhf : ContDiffWithinAt 𝕜 n f s x\nhg : ContDiffWithinAt 𝕜 n g s x\nm : ℕ\nhm : ↑m ≤ n\nu : Set E\nhu : u ∈ 𝓝[insert x s] x\np : E → FormalMultilinearSeries 𝕜 E F\nhp : HasFTaylorSeriesUpToOn (↑m) f p u\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (fun x => (f x, g x)) p u\n[PROOFSTEP]\nrcases hg m hm with ⟨v, hv, q, hq⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np✝ : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nf : E → F\ng : E → G\nhf : ContDiffWithinAt 𝕜 n f s x\nhg : ContDiffWithinAt 𝕜 n g s x\nm : ℕ\nhm : ↑m ≤ n\nu : Set E\nhu : u ∈ 𝓝[insert x s] x\np : E → FormalMultilinearSeries 𝕜 E F\nhp : HasFTaylorSeriesUpToOn (↑m) f p u\nv : Set E\nhv : v ∈ 𝓝[insert x s] x\nq : E → FormalMultilinearSeries 𝕜 E G\nhq : HasFTaylorSeriesUpToOn (↑m) g q v\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (fun x => (f x, g x)) p u\n[PROOFSTEP]\nexact ⟨u ∩ v, Filter.inter_mem hu hv, _, (hp.mono (inter_subset_left u v)).prod (hq.mono (inter_subset_right u v))⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁵ : NormedAddCommGroup D\ninst✝¹⁴ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\ninduction' n using ENat.nat_induction with n IH Itop generalizing Eu Fu Gu\n[GOAL]\ncase h0\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n g✝ t✝\nhf✝ : ContDiffOn 𝕜 n f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg : ContDiffOn 𝕜 0 g t\nhf : ContDiffOn 𝕜 0 f s\nst : s ⊆ f ⁻¹' t\n⊢ ContDiffOn 𝕜 0 (g ∘ f) s\n[PROOFSTEP]\nrw [contDiffOn_zero] at hf hg ⊢\n[GOAL]\ncase h0\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n g✝ t✝\nhf✝ : ContDiffOn 𝕜 n f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg : ContinuousOn g t\nhf : ContinuousOn f s\nst : s ⊆ f ⁻¹' t\n⊢ ContinuousOn (g ∘ f) s\n[PROOFSTEP]\nexact ContinuousOn.comp hg hf st\n[GOAL]\ncase hsuc\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\n⊢ ContDiffOn 𝕜 (↑(Nat.succ n)) (g ∘ f) s\n[PROOFSTEP]\nrw [contDiffOn_succ_iff_hasFDerivWithinAt] at hg ⊢\n[GOAL]\ncase hsuc\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\n⊢ ∀ (x : Eu),\n    x ∈ s →\n      ∃ u,\n        u ∈ 𝓝[insert x s] x ∧ ∃ f', (∀ (x : Eu), x ∈ u → HasFDerivWithinAt (g ∘ f) (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase hsuc\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ f', (∀ (x : Eu), x ∈ u → HasFDerivWithinAt (g ∘ f) (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\n[PROOFSTEP]\nrcases(contDiffOn_succ_iff_hasFDerivWithinAt.1 hf) x hx with ⟨u, hu, f', hf', f'_diff⟩\n[GOAL]\ncase hsuc.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[insert x s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ f', (∀ (x : Eu), x ∈ u → HasFDerivWithinAt (g ∘ f) (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\n[PROOFSTEP]\nrcases hg (f x) (st hx) with ⟨v, hv, g', hg', g'_diff⟩\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[insert x s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ f', (∀ (x : Eu), x ∈ u → HasFDerivWithinAt (g ∘ f) (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\n[PROOFSTEP]\nrw [insert_eq_of_mem hx] at hu ⊢\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\n⊢ ∃ u, u ∈ 𝓝[s] x ∧ ∃ f', (∀ (x : Eu), x ∈ u → HasFDerivWithinAt (g ∘ f) (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\n[PROOFSTEP]\nhave xu : x ∈ u := mem_of_mem_nhdsWithin hx hu\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\n⊢ ∃ u, u ∈ 𝓝[s] x ∧ ∃ f', (∀ (x : Eu), x ∈ u → HasFDerivWithinAt (g ∘ f) (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\n[PROOFSTEP]\nlet w := s ∩ (u ∩ f ⁻¹' v)\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\n⊢ ∃ u, u ∈ 𝓝[s] x ∧ ∃ f', (∀ (x : Eu), x ∈ u → HasFDerivWithinAt (g ∘ f) (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\n[PROOFSTEP]\nhave wv : w ⊆ f ⁻¹' v := fun y hy => hy.2.2\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\n⊢ ∃ u, u ∈ 𝓝[s] x ∧ ∃ f', (∀ (x : Eu), x ∈ u → HasFDerivWithinAt (g ∘ f) (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\n[PROOFSTEP]\nhave wu : w ⊆ u := fun y hy => hy.2.1\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\n⊢ ∃ u, u ∈ 𝓝[s] x ∧ ∃ f', (∀ (x : Eu), x ∈ u → HasFDerivWithinAt (g ∘ f) (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\n[PROOFSTEP]\nhave ws : w ⊆ s := fun y hy => hy.1\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ ∃ u, u ∈ 𝓝[s] x ∧ ∃ f', (∀ (x : Eu), x ∈ u → HasFDerivWithinAt (g ∘ f) (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\n[PROOFSTEP]\nrefine' ⟨w, _, fun y => (g' (f y)).comp (f' y), _, _⟩\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ w ∈ 𝓝[s] x\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ ∀ (x : Eu), x ∈ w → HasFDerivWithinAt (g ∘ f) ((fun y => ContinuousLinearMap.comp (g' (f y)) (f' y)) x) w x\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ ContDiffOn 𝕜 (↑n) (fun y => ContinuousLinearMap.comp (g' (f y)) (f' y)) w\n[PROOFSTEP]\nshow w ∈ 𝓝[s] x\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ w ∈ 𝓝[s] x\n[PROOFSTEP]\napply Filter.inter_mem self_mem_nhdsWithin\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ u ∩ f ⁻¹' v ∈ 𝓝[s] x\n[PROOFSTEP]\napply Filter.inter_mem hu\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ f ⁻¹' v ∈ 𝓝[s] x\n[PROOFSTEP]\napply ContinuousWithinAt.preimage_mem_nhdsWithin'\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.h\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ ContinuousWithinAt f s x\n[PROOFSTEP]\nrw [← continuousWithinAt_inter' hu]\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.h\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ ContinuousWithinAt f (s ∩ u) x\n[PROOFSTEP]\nexact (hf' x xu).differentiableWithinAt.continuousWithinAt.mono (inter_subset_right _ _)\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.ht\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ v ∈ 𝓝[f '' s] f x\n[PROOFSTEP]\napply nhdsWithin_mono _ _ hv\n[GOAL]\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ f '' s ⊆ insert (f x) t\n[PROOFSTEP]\nexact Subset.trans (image_subset_iff.mpr st) (subset_insert (f x) t)\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ ∀ (x : Eu), x ∈ w → HasFDerivWithinAt (g ∘ f) ((fun y => ContinuousLinearMap.comp (g' (f y)) (f' y)) x) w x\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ ContDiffOn 𝕜 (↑n) (fun y => ContinuousLinearMap.comp (g' (f y)) (f' y)) w\n[PROOFSTEP]\nshow ∀ y ∈ w, HasFDerivWithinAt (g ∘ f) ((g' (f y)).comp (f' y)) w y\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ ∀ (y : Eu), y ∈ w → HasFDerivWithinAt (g ∘ f) (ContinuousLinearMap.comp (g' (f y)) (f' y)) w y\n[PROOFSTEP]\nrintro y ⟨-, yu, yv⟩\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\ny : Eu\nyu : y ∈ u\nyv : y ∈ f ⁻¹' v\n⊢ HasFDerivWithinAt (g ∘ f) (ContinuousLinearMap.comp (g' (f y)) (f' y)) w y\n[PROOFSTEP]\nexact (hg' (f y) yv).comp y ((hf' y yu).mono wu) wv\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ ContDiffOn 𝕜 (↑n) (fun y => ContinuousLinearMap.comp (g' (f y)) (f' y)) w\n[PROOFSTEP]\nshow ContDiffOn 𝕜 n (fun y => (g' (f y)).comp (f' y)) w\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\n⊢ ContDiffOn 𝕜 (↑n) (fun y => ContinuousLinearMap.comp (g' (f y)) (f' y)) w\n[PROOFSTEP]\nhave A : ContDiffOn 𝕜 n (fun y => g' (f y)) w :=\n  IH g'_diff ((hf.of_le (WithTop.coe_le_coe.2 (Nat.le_succ n))).mono ws) wv\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\nA : ContDiffOn 𝕜 (↑n) (fun y => g' (f y)) w\n⊢ ContDiffOn 𝕜 (↑n) (fun y => ContinuousLinearMap.comp (g' (f y)) (f' y)) w\n[PROOFSTEP]\nhave B : ContDiffOn 𝕜 n f' w := f'_diff.mono wu\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\nA : ContDiffOn 𝕜 (↑n) (fun y => g' (f y)) w\nB : ContDiffOn 𝕜 (↑n) f' w\n⊢ ContDiffOn 𝕜 (↑n) (fun y => ContinuousLinearMap.comp (g' (f y)) (f' y)) w\n[PROOFSTEP]\nhave C : ContDiffOn 𝕜 n (fun y => (g' (f y), f' y)) w := A.prod B\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\nA : ContDiffOn 𝕜 (↑n) (fun y => g' (f y)) w\nB : ContDiffOn 𝕜 (↑n) f' w\nC : ContDiffOn 𝕜 (↑n) (fun y => (g' (f y), f' y)) w\n⊢ ContDiffOn 𝕜 (↑n) (fun y => ContinuousLinearMap.comp (g' (f y)) (f' y)) w\n[PROOFSTEP]\nhave D : ContDiffOn 𝕜 n (fun p : (Fu →L[𝕜] Gu) × (Eu →L[𝕜] Fu) => p.1.comp p.2) univ :=\n  isBoundedBilinearMap_comp.contDiff.contDiffOn\n[GOAL]\ncase hsuc.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝²¹ : NormedAddCommGroup D✝\ninst✝²⁰ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u✝ : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n✝ g✝ t✝\nhf✝ : ContDiffOn 𝕜 n✝ f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nn : ℕ\nIH :\n  ∀ {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg :\n  ∀ (x : Fu),\n    x ∈ t →\n      ∃ u, u ∈ 𝓝[insert x t] x ∧ ∃ f', (∀ (x : Fu), x ∈ u → HasFDerivWithinAt g (f' x) u x) ∧ ContDiffOn 𝕜 (↑n) f' u\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nst : s ⊆ f ⁻¹' t\nx : Eu\nhx : x ∈ s\nu : Set Eu\nhu : u ∈ 𝓝[s] x\nf' : Eu → Eu →L[𝕜] Fu\nhf' : ∀ (x : Eu), x ∈ u → HasFDerivWithinAt f (f' x) u x\nf'_diff : ContDiffOn 𝕜 (↑n) f' u\nv : Set Fu\nhv : v ∈ 𝓝[insert (f x) t] f x\ng' : Fu → Fu →L[𝕜] Gu\nhg' : ∀ (x : Fu), x ∈ v → HasFDerivWithinAt g (g' x) v x\ng'_diff : ContDiffOn 𝕜 (↑n) g' v\nxu : x ∈ u\nw : Set Eu := s ∩ (u ∩ f ⁻¹' v)\nwv : w ⊆ f ⁻¹' v\nwu : w ⊆ u\nws : w ⊆ s\nA : ContDiffOn 𝕜 (↑n) (fun y => g' (f y)) w\nB : ContDiffOn 𝕜 (↑n) f' w\nC : ContDiffOn 𝕜 (↑n) (fun y => (g' (f y), f' y)) w\nD : ContDiffOn 𝕜 (↑n) (fun p => ContinuousLinearMap.comp p.fst p.snd) univ\n⊢ ContDiffOn 𝕜 (↑n) (fun y => ContinuousLinearMap.comp (g' (f y)) (f' y)) w\n[PROOFSTEP]\nexact IH D C (subset_univ _)\n[GOAL]\ncase htop\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n g✝ t✝\nhf✝ : ContDiffOn 𝕜 n f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nItop :\n  ∀ (n : ℕ) {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg : ContDiffOn 𝕜 ⊤ g t\nhf : ContDiffOn 𝕜 ⊤ f s\nst : s ⊆ f ⁻¹' t\n⊢ ContDiffOn 𝕜 ⊤ (g ∘ f) s\n[PROOFSTEP]\nrw [contDiffOn_top] at hf hg ⊢\n[GOAL]\ncase htop\n𝕜 : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²¹ : NormedAddCommGroup D\ninst✝²⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁷ : NormedAddCommGroup F\ninst✝¹⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁵ : NormedAddCommGroup G\ninst✝¹⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹³ : NormedAddCommGroup X\ninst✝¹² : NormedSpace 𝕜 X\ns✝¹ s₁ t✝¹ u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nEu✝ : Type u\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\nFu✝ : Type u\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\nGu✝ : Type u\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\ns✝ : Set Eu✝\nt✝ : Set Fu✝\ng✝ : Fu✝ → Gu✝\nf✝ : Eu✝ → Fu✝\nhg✝ : ContDiffOn 𝕜 n g✝ t✝\nhf✝ : ContDiffOn 𝕜 n f✝ s✝\nst✝ : s✝ ⊆ f✝ ⁻¹' t✝\nItop :\n  ∀ (n : ℕ) {Eu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] {Fu : Type u}\n    [inst_2 : NormedAddCommGroup Fu] [inst_3 : NormedSpace 𝕜 Fu] {Gu : Type u} [inst_4 : NormedAddCommGroup Gu]\n    [inst_5 : NormedSpace 𝕜 Gu] {s : Set Eu} {t : Set Fu} {g : Fu → Gu} {f : Eu → Fu},\n    ContDiffOn 𝕜 (↑n) g t → ContDiffOn 𝕜 (↑n) f s → s ⊆ f ⁻¹' t → ContDiffOn 𝕜 (↑n) (g ∘ f) s\nEu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\nFu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ns : Set Eu\nt : Set Fu\ng : Fu → Gu\nf : Eu → Fu\nhg : ∀ (n : ℕ), ContDiffOn 𝕜 (↑n) g t\nhf : ∀ (n : ℕ), ContDiffOn 𝕜 (↑n) f s\nst : s ⊆ f ⁻¹' t\n⊢ ∀ (n : ℕ), ContDiffOn 𝕜 (↑n) (g ∘ f) s\n[PROOFSTEP]\nexact fun n => Itop n (hg n) (hf n) st\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nlet Eu : Type max uE uF uG := ULift.{max uF uG} E\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nlet Fu : Type max uE uF uG := ULift.{max uE uG} F\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nlet Gu : Type max uE uF uG := ULift.{max uE uF} G\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nhave isoE : Eu ≃L[𝕜] E := ContinuousLinearEquiv.ulift\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nhave isoF : Fu ≃L[𝕜] F := ContinuousLinearEquiv.ulift\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nhave isoG : Gu ≃L[𝕜] G := ContinuousLinearEquiv.ulift\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nlet fu : Eu → Fu := (isoF.symm ∘ f) ∘ isoE\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nhave fu_diff : ContDiffOn 𝕜 n fu (isoE ⁻¹' s) := by rwa [isoE.contDiffOn_comp_iff, isoF.symm.comp_contDiffOn_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\n⊢ ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\n[PROOFSTEP]\nrwa [isoE.contDiffOn_comp_iff, isoF.symm.comp_contDiffOn_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nlet gu : Fu → Gu := (isoG.symm ∘ g) ∘ isoF\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nhave gu_diff : ContDiffOn 𝕜 n gu (isoF ⁻¹' t) := by rwa [isoF.contDiffOn_comp_iff, isoG.symm.comp_contDiffOn_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\n⊢ ContDiffOn 𝕜 n gu (↑isoF ⁻¹' t)\n[PROOFSTEP]\nrwa [isoF.contDiffOn_comp_iff, isoG.symm.comp_contDiffOn_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\ngu_diff : ContDiffOn 𝕜 n gu (↑isoF ⁻¹' t)\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nhave main : ContDiffOn 𝕜 n (gu ∘ fu) (isoE ⁻¹' s) :=\n  by\n  apply ContDiffOn.comp_same_univ gu_diff fu_diff\n  intro y hy\n  simp only [ContinuousLinearEquiv.coe_apply, Function.comp_apply, mem_preimage]\n  rw [isoF.apply_symm_apply (f (isoE y))]\n  exact st hy\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\ngu_diff : ContDiffOn 𝕜 n gu (↑isoF ⁻¹' t)\n⊢ ContDiffOn 𝕜 n (gu ∘ fu) (↑isoE ⁻¹' s)\n[PROOFSTEP]\napply ContDiffOn.comp_same_univ gu_diff fu_diff\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\ngu_diff : ContDiffOn 𝕜 n gu (↑isoF ⁻¹' t)\n⊢ ↑isoE ⁻¹' s ⊆ fu ⁻¹' (↑isoF ⁻¹' t)\n[PROOFSTEP]\nintro y hy\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\ngu_diff : ContDiffOn 𝕜 n gu (↑isoF ⁻¹' t)\ny : Eu\nhy : y ∈ ↑isoE ⁻¹' s\n⊢ y ∈ fu ⁻¹' (↑isoF ⁻¹' t)\n[PROOFSTEP]\nsimp only [ContinuousLinearEquiv.coe_apply, Function.comp_apply, mem_preimage]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\ngu_diff : ContDiffOn 𝕜 n gu (↑isoF ⁻¹' t)\ny : Eu\nhy : y ∈ ↑isoE ⁻¹' s\n⊢ ↑isoF (↑(ContinuousLinearEquiv.symm isoF) (f (↑isoE y))) ∈ t\n[PROOFSTEP]\nrw [isoF.apply_symm_apply (f (isoE y))]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\ngu_diff : ContDiffOn 𝕜 n gu (↑isoF ⁻¹' t)\ny : Eu\nhy : y ∈ ↑isoE ⁻¹' s\n⊢ f (↑isoE y) ∈ t\n[PROOFSTEP]\nexact st hy\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\ngu_diff : ContDiffOn 𝕜 n gu (↑isoF ⁻¹' t)\nmain : ContDiffOn 𝕜 n (gu ∘ fu) (↑isoE ⁻¹' s)\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nhave : gu ∘ fu = (isoG.symm ∘ g ∘ f) ∘ isoE := by\n  ext y\n  simp only [Function.comp_apply]\n  rw [isoF.apply_symm_apply (f (isoE y))]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\ngu_diff : ContDiffOn 𝕜 n gu (↑isoF ⁻¹' t)\nmain : ContDiffOn 𝕜 n (gu ∘ fu) (↑isoE ⁻¹' s)\n⊢ gu ∘ fu = (↑(ContinuousLinearEquiv.symm isoG) ∘ g ∘ f) ∘ ↑isoE\n[PROOFSTEP]\next y\n[GOAL]\ncase h.h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\ngu_diff : ContDiffOn 𝕜 n gu (↑isoF ⁻¹' t)\nmain : ContDiffOn 𝕜 n (gu ∘ fu) (↑isoE ⁻¹' s)\ny : Eu\n⊢ ((gu ∘ fu) y).down = (((↑(ContinuousLinearEquiv.symm isoG) ∘ g ∘ f) ∘ ↑isoE) y).down\n[PROOFSTEP]\nsimp only [Function.comp_apply]\n[GOAL]\ncase h.h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\ngu_diff : ContDiffOn 𝕜 n gu (↑isoF ⁻¹' t)\nmain : ContDiffOn 𝕜 n (gu ∘ fu) (↑isoE ⁻¹' s)\ny : Eu\n⊢ (↑(ContinuousLinearEquiv.symm isoG) (g (↑isoF (↑(ContinuousLinearEquiv.symm isoF) (f (↑isoE y)))))).down =\n    (↑(ContinuousLinearEquiv.symm isoG) (g (f (↑isoE y)))).down\n[PROOFSTEP]\nrw [isoF.apply_symm_apply (f (isoE y))]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nhg : ContDiffOn 𝕜 n g t\nhf : ContDiffOn 𝕜 n f s\nst : s ⊆ f ⁻¹' t\nEu : Type (max uE uF uG) := ULift E\nFu : Type (max uE uF uG) := ULift F\nGu : Type (max uE uF uG) := ULift G\nisoE : Eu ≃L[𝕜] E\nisoF : Fu ≃L[𝕜] F\nisoG : Gu ≃L[𝕜] G\nfu : Eu → Fu := (↑(ContinuousLinearEquiv.symm isoF) ∘ f) ∘ ↑isoE\nfu_diff : ContDiffOn 𝕜 n fu (↑isoE ⁻¹' s)\ngu : Fu → Gu := (↑(ContinuousLinearEquiv.symm isoG) ∘ g) ∘ ↑isoF\ngu_diff : ContDiffOn 𝕜 n gu (↑isoF ⁻¹' t)\nmain : ContDiffOn 𝕜 n (gu ∘ fu) (↑isoE ⁻¹' s)\nthis : gu ∘ fu = (↑(ContinuousLinearEquiv.symm isoG) ∘ g ∘ f) ∘ ↑isoE\n⊢ ContDiffOn 𝕜 n (g ∘ f) s\n[PROOFSTEP]\nrwa [this, isoE.contDiffOn_comp_iff, isoG.symm.comp_contDiffOn_iff] at main \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\n⊢ ContDiffWithinAt 𝕜 n (g ∘ f) s x\n[PROOFSTEP]\nintro m hm\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u\n[PROOFSTEP]\nrcases hg.contDiffOn hm with ⟨u, u_nhd, _, hu⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u\n[PROOFSTEP]\nrcases hf.contDiffOn hm with ⟨v, v_nhd, vs, hv⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u\n[PROOFSTEP]\nhave xmem : x ∈ f ⁻¹' u ∩ v :=\n  ⟨(mem_of_mem_nhdsWithin (mem_insert (f x) _) u_nhd : _), mem_of_mem_nhdsWithin (mem_insert x s) v_nhd⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u\n[PROOFSTEP]\nhave : f ⁻¹' u ∈ 𝓝[insert x s] x :=\n  by\n  apply hf.continuousWithinAt.insert_self.preimage_mem_nhdsWithin'\n  apply nhdsWithin_mono _ _ u_nhd\n  rw [image_insert_eq]\n  exact insert_subset_insert (image_subset_iff.mpr st)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\n⊢ f ⁻¹' u ∈ 𝓝[insert x s] x\n[PROOFSTEP]\napply hf.continuousWithinAt.insert_self.preimage_mem_nhdsWithin'\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\n⊢ u ∈ 𝓝[f '' insert x s] f x\n[PROOFSTEP]\napply nhdsWithin_mono _ _ u_nhd\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\n⊢ f '' insert x s ⊆ insert (f x) t\n[PROOFSTEP]\nrw [image_insert_eq]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\n⊢ insert (f x) (f '' s) ⊆ insert (f x) t\n[PROOFSTEP]\nexact insert_subset_insert (image_subset_iff.mpr st)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\nthis : f ⁻¹' u ∈ 𝓝[insert x s] x\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u\n[PROOFSTEP]\nhave Z := (hu.comp (hv.mono (inter_subset_right (f ⁻¹' u) v)) (inter_subset_left _ _)).contDiffWithinAt xmem m le_rfl\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\nthis : f ⁻¹' u ∈ 𝓝[insert x s] x\nZ : ∃ u_1, u_1 ∈ 𝓝[insert x (f ⁻¹' u ∩ v)] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u_1\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u\n[PROOFSTEP]\nhave : 𝓝[f ⁻¹' u ∩ v] x = 𝓝[insert x s] x :=\n  by\n  have A : f ⁻¹' u ∩ v = insert x s ∩ (f ⁻¹' u ∩ v) :=\n    by\n    apply Subset.antisymm _ (inter_subset_right _ _)\n    rintro y ⟨hy1, hy2⟩\n    simpa only [mem_inter_iff, mem_preimage, hy2, and_true, true_and, vs hy2] using hy1\n  rw [A, ← nhdsWithin_restrict'']\n  exact Filter.inter_mem this v_nhd\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\nthis : f ⁻¹' u ∈ 𝓝[insert x s] x\nZ : ∃ u_1, u_1 ∈ 𝓝[insert x (f ⁻¹' u ∩ v)] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u_1\n⊢ 𝓝[f ⁻¹' u ∩ v] x = 𝓝[insert x s] x\n[PROOFSTEP]\nhave A : f ⁻¹' u ∩ v = insert x s ∩ (f ⁻¹' u ∩ v) :=\n  by\n  apply Subset.antisymm _ (inter_subset_right _ _)\n  rintro y ⟨hy1, hy2⟩\n  simpa only [mem_inter_iff, mem_preimage, hy2, and_true, true_and, vs hy2] using hy1\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\nthis : f ⁻¹' u ∈ 𝓝[insert x s] x\nZ : ∃ u_1, u_1 ∈ 𝓝[insert x (f ⁻¹' u ∩ v)] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u_1\n⊢ f ⁻¹' u ∩ v = insert x s ∩ (f ⁻¹' u ∩ v)\n[PROOFSTEP]\napply Subset.antisymm _ (inter_subset_right _ _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\nthis : f ⁻¹' u ∈ 𝓝[insert x s] x\nZ : ∃ u_1, u_1 ∈ 𝓝[insert x (f ⁻¹' u ∩ v)] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u_1\n⊢ f ⁻¹' u ∩ v ⊆ insert x s ∩ (f ⁻¹' u ∩ v)\n[PROOFSTEP]\nrintro y ⟨hy1, hy2⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\nthis : f ⁻¹' u ∈ 𝓝[insert x s] x\nZ : ∃ u_1, u_1 ∈ 𝓝[insert x (f ⁻¹' u ∩ v)] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u_1\ny : E\nhy1 : y ∈ f ⁻¹' u\nhy2 : y ∈ v\n⊢ y ∈ insert x s ∩ (f ⁻¹' u ∩ v)\n[PROOFSTEP]\nsimpa only [mem_inter_iff, mem_preimage, hy2, and_true, true_and, vs hy2] using hy1\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\nthis : f ⁻¹' u ∈ 𝓝[insert x s] x\nZ : ∃ u_1, u_1 ∈ 𝓝[insert x (f ⁻¹' u ∩ v)] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u_1\nA : f ⁻¹' u ∩ v = insert x s ∩ (f ⁻¹' u ∩ v)\n⊢ 𝓝[f ⁻¹' u ∩ v] x = 𝓝[insert x s] x\n[PROOFSTEP]\nrw [A, ← nhdsWithin_restrict'']\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\nthis : f ⁻¹' u ∈ 𝓝[insert x s] x\nZ : ∃ u_1, u_1 ∈ 𝓝[insert x (f ⁻¹' u ∩ v)] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u_1\nA : f ⁻¹' u ∩ v = insert x s ∩ (f ⁻¹' u ∩ v)\n⊢ f ⁻¹' u ∩ v ∈ 𝓝[insert x s] x\n[PROOFSTEP]\nexact Filter.inter_mem this v_nhd\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nt : Set F\ng : F → G\nf : E → F\nx : E\nhg : ContDiffWithinAt 𝕜 n g t (f x)\nhf : ContDiffWithinAt 𝕜 n f s x\nst : s ⊆ f ⁻¹' t\nm : ℕ\nhm : ↑m ≤ n\nu : Set F\nu_nhd : u ∈ 𝓝[insert (f x) t] f x\nleft✝ : u ⊆ insert (f x) t\nhu : ContDiffOn 𝕜 (↑m) g u\nv : Set E\nv_nhd : v ∈ 𝓝[insert x s] x\nvs : v ⊆ insert x s\nhv : ContDiffOn 𝕜 (↑m) f v\nxmem : x ∈ f ⁻¹' u ∩ v\nthis✝ : f ⁻¹' u ∈ 𝓝[insert x s] x\nZ : ∃ u_1, u_1 ∈ 𝓝[insert x (f ⁻¹' u ∩ v)] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u_1\nthis : 𝓝[f ⁻¹' u ∩ v] x = 𝓝[insert x s] x\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) (g ∘ f) p u\n[PROOFSTEP]\nrwa [insert_eq_of_mem xmem, this] at Z \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\n⊢ ∃ v,\n    v ∈ 𝓝[insert x₀ s] x₀ ∧\n      v ⊆ insert x₀ s ∧\n        ∃ f', (∀ (x : E), x ∈ v → HasFDerivWithinAt (f x) (f' x) t (g x)) ∧ ContDiffWithinAt 𝕜 (↑n) (fun x => f' x) s x₀\n[PROOFSTEP]\nhave hst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀) :=\n  by\n  refine' nhdsWithin_mono _ _ (nhdsWithin_prod self_mem_nhdsWithin hgt)\n  simp_rw [image_subset_iff, mk_preimage_prod, preimage_id', subset_inter_iff, subset_insert, true_and_iff,\n    subset_preimage_image]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\n⊢ insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\n[PROOFSTEP]\nrefine' nhdsWithin_mono _ _ (nhdsWithin_prod self_mem_nhdsWithin hgt)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\n⊢ (fun x => (x, g x)) '' s ⊆ insert x₀ s ×ˢ (g '' s)\n[PROOFSTEP]\nsimp_rw [image_subset_iff, mk_preimage_prod, preimage_id', subset_inter_iff, subset_insert, true_and_iff,\n  subset_preimage_image]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\n⊢ ∃ v,\n    v ∈ 𝓝[insert x₀ s] x₀ ∧\n      v ⊆ insert x₀ s ∧\n        ∃ f', (∀ (x : E), x ∈ v → HasFDerivWithinAt (f x) (f' x) t (g x)) ∧ ContDiffWithinAt 𝕜 (↑n) (fun x => f' x) s x₀\n[PROOFSTEP]\nobtain ⟨v, hv, hvs, f', hvf', hf'⟩ := contDiffWithinAt_succ_iff_hasFDerivWithinAt'.mp hf\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\nv : Set (E × F)\nhv : v ∈ 𝓝[insert (x₀, g x₀) (insert x₀ s ×ˢ t)] (x₀, g x₀)\nhvs : v ⊆ insert (x₀, g x₀) (insert x₀ s ×ˢ t)\nf' : E × F → E × F →L[𝕜] G\nhvf' : ∀ (x : E × F), x ∈ v → HasFDerivWithinAt (uncurry f) (f' x) (insert x₀ s ×ˢ t) x\nhf' : ContDiffWithinAt 𝕜 (↑↑n) f' (insert x₀ s ×ˢ t) (x₀, g x₀)\n⊢ ∃ v,\n    v ∈ 𝓝[insert x₀ s] x₀ ∧\n      v ⊆ insert x₀ s ∧\n        ∃ f', (∀ (x : E), x ∈ v → HasFDerivWithinAt (f x) (f' x) t (g x)) ∧ ContDiffWithinAt 𝕜 (↑n) (fun x => f' x) s x₀\n[PROOFSTEP]\nrefine'\n  ⟨(fun z => (z, g z)) ⁻¹' v ∩ insert x₀ s, _, inter_subset_right _ _, fun z =>\n    (f' (z, g z)).comp (ContinuousLinearMap.inr 𝕜 E F), _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\nv : Set (E × F)\nhv : v ∈ 𝓝[insert (x₀, g x₀) (insert x₀ s ×ˢ t)] (x₀, g x₀)\nhvs : v ⊆ insert (x₀, g x₀) (insert x₀ s ×ˢ t)\nf' : E × F → E × F →L[𝕜] G\nhvf' : ∀ (x : E × F), x ∈ v → HasFDerivWithinAt (uncurry f) (f' x) (insert x₀ s ×ˢ t) x\nhf' : ContDiffWithinAt 𝕜 (↑↑n) f' (insert x₀ s ×ˢ t) (x₀, g x₀)\n⊢ (fun z => (z, g z)) ⁻¹' v ∩ insert x₀ s ∈ 𝓝[insert x₀ s] x₀\n[PROOFSTEP]\nrefine' inter_mem _ self_mem_nhdsWithin\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\nv : Set (E × F)\nhv : v ∈ 𝓝[insert (x₀, g x₀) (insert x₀ s ×ˢ t)] (x₀, g x₀)\nhvs : v ⊆ insert (x₀, g x₀) (insert x₀ s ×ˢ t)\nf' : E × F → E × F →L[𝕜] G\nhvf' : ∀ (x : E × F), x ∈ v → HasFDerivWithinAt (uncurry f) (f' x) (insert x₀ s ×ˢ t) x\nhf' : ContDiffWithinAt 𝕜 (↑↑n) f' (insert x₀ s ×ˢ t) (x₀, g x₀)\n⊢ (fun z => (z, g z)) ⁻¹' v ∈ 𝓝[insert x₀ s] x₀\n[PROOFSTEP]\nhave := mem_of_mem_nhdsWithin (mem_insert _ _) hv\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\nv : Set (E × F)\nhv : v ∈ 𝓝[insert (x₀, g x₀) (insert x₀ s ×ˢ t)] (x₀, g x₀)\nhvs : v ⊆ insert (x₀, g x₀) (insert x₀ s ×ˢ t)\nf' : E × F → E × F →L[𝕜] G\nhvf' : ∀ (x : E × F), x ∈ v → HasFDerivWithinAt (uncurry f) (f' x) (insert x₀ s ×ˢ t) x\nhf' : ContDiffWithinAt 𝕜 (↑↑n) f' (insert x₀ s ×ˢ t) (x₀, g x₀)\nthis : (x₀, g x₀) ∈ v\n⊢ (fun z => (z, g z)) ⁻¹' v ∈ 𝓝[insert x₀ s] x₀\n[PROOFSTEP]\nrefine' mem_nhdsWithin_insert.mpr ⟨this, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\nv : Set (E × F)\nhv : v ∈ 𝓝[insert (x₀, g x₀) (insert x₀ s ×ˢ t)] (x₀, g x₀)\nhvs : v ⊆ insert (x₀, g x₀) (insert x₀ s ×ˢ t)\nf' : E × F → E × F →L[𝕜] G\nhvf' : ∀ (x : E × F), x ∈ v → HasFDerivWithinAt (uncurry f) (f' x) (insert x₀ s ×ˢ t) x\nhf' : ContDiffWithinAt 𝕜 (↑↑n) f' (insert x₀ s ×ˢ t) (x₀, g x₀)\nthis : (x₀, g x₀) ∈ v\n⊢ (fun z => (z, g z)) ⁻¹' v ∈ 𝓝[s] x₀\n[PROOFSTEP]\nrefine' (continuousWithinAt_id.prod hg.continuousWithinAt).preimage_mem_nhdsWithin' _\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\nv : Set (E × F)\nhv : v ∈ 𝓝[insert (x₀, g x₀) (insert x₀ s ×ˢ t)] (x₀, g x₀)\nhvs : v ⊆ insert (x₀, g x₀) (insert x₀ s ×ˢ t)\nf' : E × F → E × F →L[𝕜] G\nhvf' : ∀ (x : E × F), x ∈ v → HasFDerivWithinAt (uncurry f) (f' x) (insert x₀ s ×ˢ t) x\nhf' : ContDiffWithinAt 𝕜 (↑↑n) f' (insert x₀ s ×ˢ t) (x₀, g x₀)\nthis : (x₀, g x₀) ∈ v\n⊢ v ∈ 𝓝[(fun x => (id x, g x)) '' s] (id x₀, g x₀)\n[PROOFSTEP]\nrw [← nhdsWithin_le_iff] at hst hv ⊢\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀) ≤ 𝓝[insert x₀ s ×ˢ t] (x₀, g x₀)\nv : Set (E × F)\nhv : 𝓝[insert (x₀, g x₀) (insert x₀ s ×ˢ t)] (x₀, g x₀) ≤ 𝓝[v] (x₀, g x₀)\nhvs : v ⊆ insert (x₀, g x₀) (insert x₀ s ×ˢ t)\nf' : E × F → E × F →L[𝕜] G\nhvf' : ∀ (x : E × F), x ∈ v → HasFDerivWithinAt (uncurry f) (f' x) (insert x₀ s ×ˢ t) x\nhf' : ContDiffWithinAt 𝕜 (↑↑n) f' (insert x₀ s ×ˢ t) (x₀, g x₀)\nthis : (x₀, g x₀) ∈ v\n⊢ 𝓝[(fun x => (id x, g x)) '' s] (id x₀, g x₀) ≤ 𝓝[v] (id x₀, g x₀)\n[PROOFSTEP]\nrefine' (hst.trans <| nhdsWithin_mono _ <| subset_insert _ _).trans hv\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\nv : Set (E × F)\nhv : v ∈ 𝓝[insert (x₀, g x₀) (insert x₀ s ×ˢ t)] (x₀, g x₀)\nhvs : v ⊆ insert (x₀, g x₀) (insert x₀ s ×ˢ t)\nf' : E × F → E × F →L[𝕜] G\nhvf' : ∀ (x : E × F), x ∈ v → HasFDerivWithinAt (uncurry f) (f' x) (insert x₀ s ×ˢ t) x\nhf' : ContDiffWithinAt 𝕜 (↑↑n) f' (insert x₀ s ×ˢ t) (x₀, g x₀)\n⊢ ∀ (x : E),\n    x ∈ (fun z => (z, g z)) ⁻¹' v ∩ insert x₀ s →\n      HasFDerivWithinAt (f x) ((fun z => ContinuousLinearMap.comp (f' (z, g z)) (ContinuousLinearMap.inr 𝕜 E F)) x) t\n        (g x)\n[PROOFSTEP]\nintro z hz\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\nv : Set (E × F)\nhv : v ∈ 𝓝[insert (x₀, g x₀) (insert x₀ s ×ˢ t)] (x₀, g x₀)\nhvs : v ⊆ insert (x₀, g x₀) (insert x₀ s ×ˢ t)\nf' : E × F → E × F →L[𝕜] G\nhvf' : ∀ (x : E × F), x ∈ v → HasFDerivWithinAt (uncurry f) (f' x) (insert x₀ s ×ˢ t) x\nhf' : ContDiffWithinAt 𝕜 (↑↑n) f' (insert x₀ s ×ˢ t) (x₀, g x₀)\nz : E\nhz : z ∈ (fun z => (z, g z)) ⁻¹' v ∩ insert x₀ s\n⊢ HasFDerivWithinAt (f z) ((fun z => ContinuousLinearMap.comp (f' (z, g z)) (ContinuousLinearMap.inr 𝕜 E F)) z) t (g z)\n[PROOFSTEP]\nhave := hvf' (z, g z) hz.1\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\nv : Set (E × F)\nhv : v ∈ 𝓝[insert (x₀, g x₀) (insert x₀ s ×ˢ t)] (x₀, g x₀)\nhvs : v ⊆ insert (x₀, g x₀) (insert x₀ s ×ˢ t)\nf' : E × F → E × F →L[𝕜] G\nhvf' : ∀ (x : E × F), x ∈ v → HasFDerivWithinAt (uncurry f) (f' x) (insert x₀ s ×ˢ t) x\nhf' : ContDiffWithinAt 𝕜 (↑↑n) f' (insert x₀ s ×ˢ t) (x₀, g x₀)\nz : E\nhz : z ∈ (fun z => (z, g z)) ⁻¹' v ∩ insert x₀ s\nthis : HasFDerivWithinAt (uncurry f) (f' (z, g z)) (insert x₀ s ×ˢ t) (z, g z)\n⊢ HasFDerivWithinAt (f z) ((fun z => ContinuousLinearMap.comp (f' (z, g z)) (ContinuousLinearMap.inr 𝕜 E F)) z) t (g z)\n[PROOFSTEP]\nrefine' this.comp _ (hasFDerivAt_prod_mk_right _ _).hasFDerivWithinAt _\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\nv : Set (E × F)\nhv : v ∈ 𝓝[insert (x₀, g x₀) (insert x₀ s ×ˢ t)] (x₀, g x₀)\nhvs : v ⊆ insert (x₀, g x₀) (insert x₀ s ×ˢ t)\nf' : E × F → E × F →L[𝕜] G\nhvf' : ∀ (x : E × F), x ∈ v → HasFDerivWithinAt (uncurry f) (f' x) (insert x₀ s ×ˢ t) x\nhf' : ContDiffWithinAt 𝕜 (↑↑n) f' (insert x₀ s ×ˢ t) (x₀, g x₀)\nz : E\nhz : z ∈ (fun z => (z, g z)) ⁻¹' v ∩ insert x₀ s\nthis : HasFDerivWithinAt (uncurry f) (f' (z, g z)) (insert x₀ s ×ˢ t) (z, g z)\n⊢ MapsTo (Prod.mk z) t (insert x₀ s ×ˢ t)\n[PROOFSTEP]\nexact mapsTo'.mpr (image_prod_mk_subset_prod_right hz.2)\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_3\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀✝ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ\nx₀ : E\nhf : ContDiffWithinAt 𝕜 (↑n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 (↑n) g s x₀\nhgt : t ∈ 𝓝[g '' s] g x₀\nhst : insert x₀ s ×ˢ t ∈ 𝓝[(fun x => (x, g x)) '' s] (x₀, g x₀)\nv : Set (E × F)\nhv : v ∈ 𝓝[insert (x₀, g x₀) (insert x₀ s ×ˢ t)] (x₀, g x₀)\nhvs : v ⊆ insert (x₀, g x₀) (insert x₀ s ×ˢ t)\nf' : E × F → E × F →L[𝕜] G\nhvf' : ∀ (x : E × F), x ∈ v → HasFDerivWithinAt (uncurry f) (f' x) (insert x₀ s ×ˢ t) x\nhf' : ContDiffWithinAt 𝕜 (↑↑n) f' (insert x₀ s ×ˢ t) (x₀, g x₀)\n⊢ ContDiffWithinAt 𝕜 (↑n) (fun x => (fun z => ContinuousLinearMap.comp (f' (z, g z)) (ContinuousLinearMap.inr 𝕜 E F)) x)\n    s x₀\n[PROOFSTEP]\nexact\n  (hf'.continuousLinearMap_comp <|\n        (ContinuousLinearMap.compL 𝕜 F (E × F) G).flip (ContinuousLinearMap.inr 𝕜 E F)).comp_of_mem\n    x₀ (contDiffWithinAt_id.prod hg) hst\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 m g s x₀\nht : ∀ᶠ (x : E) in 𝓝[insert x₀ s] x₀, UniqueDiffWithinAt 𝕜 t (g x)\nhmn : m + 1 ≤ n\nhgt : t ∈ 𝓝[g '' s] g x₀\n⊢ ContDiffWithinAt 𝕜 m (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n[PROOFSTEP]\nhave : ∀ k : ℕ, (k : ℕ∞) ≤ m → ContDiffWithinAt 𝕜 k (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀ := fun k hkm ↦\n  by\n  obtain ⟨v, hv, -, f', hvf', hf'⟩ :=\n    (hf.of_le <| (add_le_add_right hkm 1).trans hmn).hasFDerivWithinAt_nhds (hg.of_le hkm) hgt\n  refine hf'.congr_of_eventuallyEq_insert ?_\n  filter_upwards [hv, ht]\n  exact fun y hy h2y => (hvf' y hy).fderivWithin h2y\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 m g s x₀\nht : ∀ᶠ (x : E) in 𝓝[insert x₀ s] x₀, UniqueDiffWithinAt 𝕜 t (g x)\nhmn : m + 1 ≤ n\nhgt : t ∈ 𝓝[g '' s] g x₀\nk : ℕ\nhkm : ↑k ≤ m\n⊢ ContDiffWithinAt 𝕜 (↑k) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n[PROOFSTEP]\nobtain ⟨v, hv, -, f', hvf', hf'⟩ :=\n  (hf.of_le <| (add_le_add_right hkm 1).trans hmn).hasFDerivWithinAt_nhds (hg.of_le hkm) hgt\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 m g s x₀\nht : ∀ᶠ (x : E) in 𝓝[insert x₀ s] x₀, UniqueDiffWithinAt 𝕜 t (g x)\nhmn : m + 1 ≤ n\nhgt : t ∈ 𝓝[g '' s] g x₀\nk : ℕ\nhkm : ↑k ≤ m\nv : Set E\nhv : v ∈ 𝓝[insert x₀ s] x₀\nf' : E → F →L[𝕜] G\nhvf' : ∀ (x : E), x ∈ v → HasFDerivWithinAt (f x) (f' x) t (g x)\nhf' : ContDiffWithinAt 𝕜 (↑k) (fun x => f' x) s x₀\n⊢ ContDiffWithinAt 𝕜 (↑k) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n[PROOFSTEP]\nrefine hf'.congr_of_eventuallyEq_insert ?_\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 m g s x₀\nht : ∀ᶠ (x : E) in 𝓝[insert x₀ s] x₀, UniqueDiffWithinAt 𝕜 t (g x)\nhmn : m + 1 ≤ n\nhgt : t ∈ 𝓝[g '' s] g x₀\nk : ℕ\nhkm : ↑k ≤ m\nv : Set E\nhv : v ∈ 𝓝[insert x₀ s] x₀\nf' : E → F →L[𝕜] G\nhvf' : ∀ (x : E), x ∈ v → HasFDerivWithinAt (f x) (f' x) t (g x)\nhf' : ContDiffWithinAt 𝕜 (↑k) (fun x => f' x) s x₀\n⊢ (fun x => fderivWithin 𝕜 (f x) t (g x)) =ᶠ[𝓝[insert x₀ s] x₀] fun x => f' x\n[PROOFSTEP]\nfilter_upwards [hv, ht]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 m g s x₀\nht : ∀ᶠ (x : E) in 𝓝[insert x₀ s] x₀, UniqueDiffWithinAt 𝕜 t (g x)\nhmn : m + 1 ≤ n\nhgt : t ∈ 𝓝[g '' s] g x₀\nk : ℕ\nhkm : ↑k ≤ m\nv : Set E\nhv : v ∈ 𝓝[insert x₀ s] x₀\nf' : E → F →L[𝕜] G\nhvf' : ∀ (x : E), x ∈ v → HasFDerivWithinAt (f x) (f' x) t (g x)\nhf' : ContDiffWithinAt 𝕜 (↑k) (fun x => f' x) s x₀\n⊢ ∀ (a : E), a ∈ v → UniqueDiffWithinAt 𝕜 t (g a) → fderivWithin 𝕜 (f a) t (g a) = f' a\n[PROOFSTEP]\nexact fun y hy h2y => (hvf' y hy).fderivWithin h2y\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 m g s x₀\nht : ∀ᶠ (x : E) in 𝓝[insert x₀ s] x₀, UniqueDiffWithinAt 𝕜 t (g x)\nhmn : m + 1 ≤ n\nhgt : t ∈ 𝓝[g '' s] g x₀\nthis : ∀ (k : ℕ), ↑k ≤ m → ContDiffWithinAt 𝕜 (↑k) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n⊢ ContDiffWithinAt 𝕜 m (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n[PROOFSTEP]\ninduction' m using WithTop.recTopCoe with m\n[GOAL]\ncase top\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg✝ : ContDiffWithinAt 𝕜 m g s x₀\nht : ∀ᶠ (x : E) in 𝓝[insert x₀ s] x₀, UniqueDiffWithinAt 𝕜 t (g x)\nhmn✝ : m + 1 ≤ n\nhgt : t ∈ 𝓝[g '' s] g x₀\nthis✝ : ∀ (k : ℕ), ↑k ≤ m → ContDiffWithinAt 𝕜 (↑k) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\nhg : ContDiffWithinAt 𝕜 ⊤ g s x₀\nhmn : ⊤ + 1 ≤ n\nthis : ∀ (k : ℕ), ↑k ≤ ⊤ → ContDiffWithinAt 𝕜 (↑k) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n⊢ ContDiffWithinAt 𝕜 ⊤ (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n[PROOFSTEP]\nobtain rfl := eq_top_iff.mpr hmn\n[GOAL]\ncase top\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nhg✝ : ContDiffWithinAt 𝕜 m g s x₀\nht : ∀ᶠ (x : E) in 𝓝[insert x₀ s] x₀, UniqueDiffWithinAt 𝕜 t (g x)\nhgt : t ∈ 𝓝[g '' s] g x₀\nthis✝ : ∀ (k : ℕ), ↑k ≤ m → ContDiffWithinAt 𝕜 (↑k) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\nhg : ContDiffWithinAt 𝕜 ⊤ g s x₀\nthis : ∀ (k : ℕ), ↑k ≤ ⊤ → ContDiffWithinAt 𝕜 (↑k) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\nhf : ContDiffWithinAt 𝕜 ⊤ (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhmn✝ : m + 1 ≤ ⊤\nhmn : ⊤ + 1 ≤ ⊤\n⊢ ContDiffWithinAt 𝕜 ⊤ (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n[PROOFSTEP]\nrw [contDiffWithinAt_top]\n[GOAL]\ncase top\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nhg✝ : ContDiffWithinAt 𝕜 m g s x₀\nht : ∀ᶠ (x : E) in 𝓝[insert x₀ s] x₀, UniqueDiffWithinAt 𝕜 t (g x)\nhgt : t ∈ 𝓝[g '' s] g x₀\nthis✝ : ∀ (k : ℕ), ↑k ≤ m → ContDiffWithinAt 𝕜 (↑k) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\nhg : ContDiffWithinAt 𝕜 ⊤ g s x₀\nthis : ∀ (k : ℕ), ↑k ≤ ⊤ → ContDiffWithinAt 𝕜 (↑k) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\nhf : ContDiffWithinAt 𝕜 ⊤ (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhmn✝ : m + 1 ≤ ⊤\nhmn : ⊤ + 1 ≤ ⊤\n⊢ ∀ (n : ℕ), ContDiffWithinAt 𝕜 (↑n) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n[PROOFSTEP]\nexact fun m => this m le_top\n[GOAL]\ncase coe\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg✝ : ContDiffWithinAt 𝕜 m✝ g s x₀\nht : ∀ᶠ (x : E) in 𝓝[insert x₀ s] x₀, UniqueDiffWithinAt 𝕜 t (g x)\nhmn✝ : m✝ + 1 ≤ n\nhgt : t ∈ 𝓝[g '' s] g x₀\nthis✝ : ∀ (k : ℕ), ↑k ≤ m✝ → ContDiffWithinAt 𝕜 (↑k) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\nm : ℕ\nhg : ContDiffWithinAt 𝕜 (↑m) g s x₀\nhmn : ↑m + 1 ≤ n\nthis : ∀ (k : ℕ), ↑k ≤ ↑m → ContDiffWithinAt 𝕜 (↑k) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n⊢ ContDiffWithinAt 𝕜 (↑m) (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n[PROOFSTEP]\nexact this _ le_rfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n (uncurry f) (s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 m g s x₀\nht : UniqueDiffOn 𝕜 t\nhmn : m + 1 ≤ n\nhx₀ : x₀ ∈ s\nhst : s ⊆ g ⁻¹' t\n⊢ ContDiffWithinAt 𝕜 m (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n[PROOFSTEP]\nrw [← insert_eq_self.mpr hx₀] at hf \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 m g s x₀\nht : UniqueDiffOn 𝕜 t\nhmn : m + 1 ≤ n\nhx₀ : x₀ ∈ s\nhst : s ⊆ g ⁻¹' t\n⊢ ContDiffWithinAt 𝕜 m (fun x => fderivWithin 𝕜 (f x) t (g x)) s x₀\n[PROOFSTEP]\nrefine' hf.fderivWithin' hg _ hmn hst\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 m g s x₀\nht : UniqueDiffOn 𝕜 t\nhmn : m + 1 ≤ n\nhx₀ : x₀ ∈ s\nhst : s ⊆ g ⁻¹' t\n⊢ ∀ᶠ (x : E) in 𝓝[insert x₀ s] x₀, UniqueDiffWithinAt 𝕜 t (g x)\n[PROOFSTEP]\nrw [insert_eq_self.mpr hx₀]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nt : Set F\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀)\nhg : ContDiffWithinAt 𝕜 m g s x₀\nht : UniqueDiffOn 𝕜 t\nhmn : m + 1 ≤ n\nhx₀ : x₀ ∈ s\nhst : s ⊆ g ⁻¹' t\n⊢ ∀ᶠ (x : E) in 𝓝[s] x₀, UniqueDiffWithinAt 𝕜 t (g x)\n[PROOFSTEP]\nexact eventually_of_mem self_mem_nhdsWithin fun x hx => ht _ (hst hx)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : ContDiffWithinAt 𝕜 n f s x₀\nhs : UniqueDiffOn 𝕜 s\nhmn : m + 1 ≤ n\nhx₀s : x₀ ∈ s\n⊢ s ⊆ (fun x => x) ⁻¹' s\n[PROOFSTEP]\nrw [preimage_id']\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni : ℕ\nhf : ContDiffWithinAt 𝕜 n f s x₀\nhs : UniqueDiffOn 𝕜 s\nhmn : m + ↑i ≤ n\nhx₀s : x₀ ∈ s\n⊢ ContDiffWithinAt 𝕜 m (iteratedFDerivWithin 𝕜 i f s) s x₀\n[PROOFSTEP]\ninduction' i with i hi generalizing m\n[GOAL]\ncase zero\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni : ℕ\nhf : ContDiffWithinAt 𝕜 n f s x₀\nhs : UniqueDiffOn 𝕜 s\nhmn✝ : m✝ + ↑i ≤ n\nhx₀s : x₀ ∈ s\nm : ℕ∞\nhmn : m + ↑Nat.zero ≤ n\n⊢ ContDiffWithinAt 𝕜 m (iteratedFDerivWithin 𝕜 Nat.zero f s) s x₀\n[PROOFSTEP]\nrw [Nat.zero_eq, ENat.coe_zero, add_zero] at hmn \n[GOAL]\ncase zero\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni : ℕ\nhf : ContDiffWithinAt 𝕜 n f s x₀\nhs : UniqueDiffOn 𝕜 s\nhmn✝ : m✝ + ↑i ≤ n\nhx₀s : x₀ ∈ s\nm : ℕ∞\nhmn : m ≤ n\n⊢ ContDiffWithinAt 𝕜 m (iteratedFDerivWithin 𝕜 Nat.zero f s) s x₀\n[PROOFSTEP]\nexact (hf.of_le hmn).continuousLinearMap_comp ((continuousMultilinearCurryFin0 𝕜 E F).symm : _ →L[𝕜] E[×0]→L[𝕜] F)\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni✝ : ℕ\nhf : ContDiffWithinAt 𝕜 n f s x₀\nhs : UniqueDiffOn 𝕜 s\nhmn✝ : m✝ + ↑i✝ ≤ n\nhx₀s : x₀ ∈ s\ni : ℕ\nhi : ∀ {m : ℕ∞}, m + ↑i ≤ n → ContDiffWithinAt 𝕜 m (iteratedFDerivWithin 𝕜 i f s) s x₀\nm : ℕ∞\nhmn : m + ↑(Nat.succ i) ≤ n\n⊢ ContDiffWithinAt 𝕜 m (iteratedFDerivWithin 𝕜 (Nat.succ i) f s) s x₀\n[PROOFSTEP]\nrw [Nat.cast_succ, add_comm _ 1, ← add_assoc] at hmn \n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni✝ : ℕ\nhf : ContDiffWithinAt 𝕜 n f s x₀\nhs : UniqueDiffOn 𝕜 s\nhmn✝ : m✝ + ↑i✝ ≤ n\nhx₀s : x₀ ∈ s\ni : ℕ\nhi : ∀ {m : ℕ∞}, m + ↑i ≤ n → ContDiffWithinAt 𝕜 m (iteratedFDerivWithin 𝕜 i f s) s x₀\nm : ℕ∞\nhmn : m + 1 + ↑i ≤ n\n⊢ ContDiffWithinAt 𝕜 m (iteratedFDerivWithin 𝕜 (Nat.succ i) f s) s x₀\n[PROOFSTEP]\nexact\n  ((hi hmn).fderivWithin_right hs le_rfl hx₀s).continuousLinearMap_comp\n    (continuousMultilinearCurryLeftEquiv 𝕜 (fun _ : Fin (i + 1) ↦ E) F : _ →L[𝕜] E[×(i + 1)]→L[𝕜] F)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nn : ℕ∞\nhf : ContDiffAt 𝕜 n (uncurry f) (x₀, g x₀)\nhg : ContDiffAt 𝕜 m g x₀\nhmn : m + 1 ≤ n\n⊢ ContDiffAt 𝕜 m (fun x => fderiv 𝕜 (f x) (g x)) x₀\n[PROOFSTEP]\nsimp_rw [← fderivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nn : ℕ∞\nhf : ContDiffAt 𝕜 n (uncurry f) (x₀, g x₀)\nhg : ContDiffAt 𝕜 m g x₀\nhmn : m + 1 ≤ n\n⊢ ContDiffAt 𝕜 m (fun x => fderivWithin 𝕜 (f x) univ (g x)) x₀\n[PROOFSTEP]\nrefine\n  (ContDiffWithinAt.fderivWithin hf.contDiffWithinAt hg.contDiffWithinAt uniqueDiffOn_univ hmn (mem_univ x₀)\n        ?_).contDiffAt\n    univ_mem\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F → G\ng : E → F\nn : ℕ∞\nhf : ContDiffAt 𝕜 n (uncurry f) (x₀, g x₀)\nhg : ContDiffAt 𝕜 m g x₀\nhmn : m + 1 ≤ n\n⊢ univ ⊆ g ⁻¹' univ\n[PROOFSTEP]\nrw [preimage_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni : ℕ\nhf : ContDiffAt 𝕜 n f x₀\nhmn : m + ↑i ≤ n\n⊢ ContDiffAt 𝕜 m (iteratedFDeriv 𝕜 i f) x₀\n[PROOFSTEP]\nrw [← iteratedFDerivWithin_univ, ← contDiffWithinAt_univ] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni : ℕ\nhf : ContDiffWithinAt 𝕜 n f univ x₀\nhmn : m + ↑i ≤ n\n⊢ ContDiffWithinAt 𝕜 m (iteratedFDerivWithin 𝕜 i f univ) univ x₀\n[PROOFSTEP]\nexact hf.iteratedFderivWithin_right uniqueDiffOn_univ hmn trivial\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nhf : ContDiffOn 𝕜 n f s\nhs : UniqueDiffOn 𝕜 s\nhn : 1 ≤ n\n⊢ ?m.1105459 hf hs hn + 1 ≤ n\n[PROOFSTEP]\nrwa [zero_add]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F\nhf : ContDiff 𝕜 n f\nhmn : m + 1 ≤ n\n⊢ ContDiff 𝕜 m fun p => ↑(fderiv 𝕜 f p.fst) p.snd\n[PROOFSTEP]\nrw [← contDiffOn_univ] at hf ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F\nhf : ContDiffOn 𝕜 n f univ\nhmn : m + 1 ≤ n\n⊢ ContDiffOn 𝕜 m (fun p => ↑(fderiv 𝕜 f p.fst) p.snd) univ\n[PROOFSTEP]\nrw [← fderivWithin_univ, ← univ_prod_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F\nhf : ContDiffOn 𝕜 n f univ\nhmn : m + 1 ≤ n\n⊢ ContDiffOn 𝕜 m (fun p => ↑(fderivWithin 𝕜 f univ p.fst) p.snd) (univ ×ˢ univ)\n[PROOFSTEP]\nexact contDiffOn_fderivWithin_apply hf uniqueDiffOn_univ hmn\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\n⊢ HasFTaylorSeriesUpToOn n (fun x i => φ i x) (fun x m => ContinuousMultilinearMap.pi fun i => p' i x m) s ↔\n    ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s\n[PROOFSTEP]\nset pr := @ContinuousLinearMap.proj 𝕜 _ ι F' _ _ _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\n⊢ HasFTaylorSeriesUpToOn n (fun x i => φ i x) (fun x m => ContinuousMultilinearMap.pi fun i => p' i x m) s ↔\n    ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s\n[PROOFSTEP]\nletI : ∀ (m : ℕ) (i : ι), NormedSpace 𝕜 (E[×m]→L[𝕜] F' i) := fun m i => inferInstance\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nthis : (m : ℕ) → (i : ι) → NormedSpace 𝕜 (ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) := fun m i => inferInstance\n⊢ HasFTaylorSeriesUpToOn n (fun x i => φ i x) (fun x m => ContinuousMultilinearMap.pi fun i => p' i x m) s ↔\n    ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s\n[PROOFSTEP]\nset L : ∀ m : ℕ, (∀ i, E[×m]→L[𝕜] F' i) ≃ₗᵢ[𝕜] E[×m]→L[𝕜] ∀ i, F' i := fun m => ContinuousMultilinearMap.piₗᵢ _ _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nthis : (m : ℕ) → (i : ι) → NormedSpace 𝕜 (ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) := fun m i => inferInstance\nL : (m : ℕ) →\n  ((i : ι) → ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun i => E) ((i : ι) → F' i) :=\n  fun m => ContinuousMultilinearMap.piₗᵢ 𝕜 fun i => E\n⊢ HasFTaylorSeriesUpToOn n (fun x i => φ i x) (fun x m => ContinuousMultilinearMap.pi fun i => p' i x m) s ↔\n    ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s\n[PROOFSTEP]\nrefine' ⟨fun h i => _, fun h => ⟨fun x hx => _, _, _⟩⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nthis : (m : ℕ) → (i : ι) → NormedSpace 𝕜 (ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) := fun m i => inferInstance\nL : (m : ℕ) →\n  ((i : ι) → ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun i => E) ((i : ι) → F' i) :=\n  fun m => ContinuousMultilinearMap.piₗᵢ 𝕜 fun i => E\nh : HasFTaylorSeriesUpToOn n (fun x i => φ i x) (fun x m => ContinuousMultilinearMap.pi fun i => p' i x m) s\ni : ι\n⊢ HasFTaylorSeriesUpToOn n (φ i) (p' i) s\n[PROOFSTEP]\nconvert h.continuousLinearMap_comp (pr i)\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nthis : (m : ℕ) → (i : ι) → NormedSpace 𝕜 (ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) := fun m i => inferInstance\nL : (m : ℕ) →\n  ((i : ι) → ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun i => E) ((i : ι) → F' i) :=\n  fun m => ContinuousMultilinearMap.piₗᵢ 𝕜 fun i => E\nh : ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s\nx : E\nhx : x ∈ s\n⊢ ContinuousMultilinearMap.uncurry0 (ContinuousMultilinearMap.pi fun i => p' i x 0) = fun i => φ i x\n[PROOFSTEP]\next1 i\n[GOAL]\ncase refine'_2.h\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nthis : (m : ℕ) → (i : ι) → NormedSpace 𝕜 (ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) := fun m i => inferInstance\nL : (m : ℕ) →\n  ((i : ι) → ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun i => E) ((i : ι) → F' i) :=\n  fun m => ContinuousMultilinearMap.piₗᵢ 𝕜 fun i => E\nh : ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s\nx : E\nhx : x ∈ s\ni : ι\n⊢ ContinuousMultilinearMap.uncurry0 (ContinuousMultilinearMap.pi fun i => p' i x 0) i = φ i x\n[PROOFSTEP]\nexact (h i).zero_eq x hx\n[GOAL]\ncase refine'_3\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nthis : (m : ℕ) → (i : ι) → NormedSpace 𝕜 (ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) := fun m i => inferInstance\nL : (m : ℕ) →\n  ((i : ι) → ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun i => E) ((i : ι) → F' i) :=\n  fun m => ContinuousMultilinearMap.piₗᵢ 𝕜 fun i => E\nh : ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s\n⊢ ∀ (m : ℕ),\n    ↑m < n →\n      ∀ (x : E),\n        x ∈ s →\n          HasFDerivWithinAt (fun x => ContinuousMultilinearMap.pi fun i => p' i x m)\n            (ContinuousMultilinearMap.curryLeft (ContinuousMultilinearMap.pi fun i => p' i x (Nat.succ m))) s x\n[PROOFSTEP]\nintro m hm x hx\n[GOAL]\ncase refine'_3\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nthis : (m : ℕ) → (i : ι) → NormedSpace 𝕜 (ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) := fun m i => inferInstance\nL : (m : ℕ) →\n  ((i : ι) → ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun i => E) ((i : ι) → F' i) :=\n  fun m => ContinuousMultilinearMap.piₗᵢ 𝕜 fun i => E\nh : ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s\nm : ℕ\nhm : ↑m < n\nx : E\nhx : x ∈ s\n⊢ HasFDerivWithinAt (fun x => ContinuousMultilinearMap.pi fun i => p' i x m)\n    (ContinuousMultilinearMap.curryLeft (ContinuousMultilinearMap.pi fun i => p' i x (Nat.succ m))) s x\n[PROOFSTEP]\nhave := hasFDerivWithinAt_pi.2 fun i => (h i).fderivWithin m hm x hx\n[GOAL]\ncase refine'_3\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nthis✝ : (m : ℕ) → (i : ι) → NormedSpace 𝕜 (ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) := fun m i => inferInstance\nL : (m : ℕ) →\n  ((i : ι) → ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun i => E) ((i : ι) → F' i) :=\n  fun m => ContinuousMultilinearMap.piₗᵢ 𝕜 fun i => E\nh : ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s\nm : ℕ\nhm : ↑m < n\nx : E\nhx : x ∈ s\nthis :\n  HasFDerivWithinAt (fun x i => p' i x m)\n    (ContinuousLinearMap.pi fun i => ContinuousMultilinearMap.curryLeft (p' i x (Nat.succ m))) s x\n⊢ HasFDerivWithinAt (fun x => ContinuousMultilinearMap.pi fun i => p' i x m)\n    (ContinuousMultilinearMap.curryLeft (ContinuousMultilinearMap.pi fun i => p' i x (Nat.succ m))) s x\n[PROOFSTEP]\nconvert (L m).hasFDerivAt.comp_hasFDerivWithinAt x this\n[GOAL]\ncase refine'_4\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nthis : (m : ℕ) → (i : ι) → NormedSpace 𝕜 (ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) := fun m i => inferInstance\nL : (m : ℕ) →\n  ((i : ι) → ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun i => E) ((i : ι) → F' i) :=\n  fun m => ContinuousMultilinearMap.piₗᵢ 𝕜 fun i => E\nh : ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s\n⊢ ∀ (m : ℕ), ↑m ≤ n → ContinuousOn (fun x => ContinuousMultilinearMap.pi fun i => p' i x m) s\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase refine'_4\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nthis : (m : ℕ) → (i : ι) → NormedSpace 𝕜 (ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) := fun m i => inferInstance\nL : (m : ℕ) →\n  ((i : ι) → ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun i => E) ((i : ι) → F' i) :=\n  fun m => ContinuousMultilinearMap.piₗᵢ 𝕜 fun i => E\nh : ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s\nm : ℕ\nhm : ↑m ≤ n\n⊢ ContinuousOn (fun x => ContinuousMultilinearMap.pi fun i => p' i x m) s\n[PROOFSTEP]\nhave := continuousOn_pi.2 fun i => (h i).cont m hm\n[GOAL]\ncase refine'_4\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nthis✝ : (m : ℕ) → (i : ι) → NormedSpace 𝕜 (ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) := fun m i => inferInstance\nL : (m : ℕ) →\n  ((i : ι) → ContinuousMultilinearMap 𝕜 (fun i => E) (F' i)) ≃ₗᵢ[𝕜]\n    ContinuousMultilinearMap 𝕜 (fun i => E) ((i : ι) → F' i) :=\n  fun m => ContinuousMultilinearMap.piₗᵢ 𝕜 fun i => E\nh : ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s\nm : ℕ\nhm : ↑m ≤ n\nthis : ContinuousOn (fun y i => p' i y m) s\n⊢ ContinuousOn (fun x => ContinuousMultilinearMap.pi fun i => p' i x m) s\n[PROOFSTEP]\nconvert (L m).continuous.comp_continuousOn this\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\n⊢ HasFTaylorSeriesUpToOn n Φ P' s ↔\n    ∀ (i : ι),\n      HasFTaylorSeriesUpToOn n (fun x => Φ x i)\n        (fun x m => ContinuousLinearMap.compContinuousMultilinearMap (ContinuousLinearMap.proj i) (P' x m)) s\n[PROOFSTEP]\nconvert hasFTaylorSeriesUpToOn_pi (𝕜 := 𝕜) (φ := fun i x ↦ Φ x i)\n[GOAL]\ncase h.e'_1.h.e'_11.h.h\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\nx✝¹ : E\nx✝ : ℕ\n⊢ P' x✝¹ x✝ =\n    ContinuousMultilinearMap.pi fun i =>\n      ContinuousLinearMap.compContinuousMultilinearMap (ContinuousLinearMap.proj i) (P' x✝¹ x✝)\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_1.h.e'_11.h.h.H.h\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\nx✝³ : E\nx✝² : ℕ\nx✝¹ : Fin x✝² → E\nx✝ : ι\n⊢ ↑(P' x✝³ x✝²) x✝¹ x✝ =\n    ↑(ContinuousMultilinearMap.pi fun i =>\n          ContinuousLinearMap.compContinuousMultilinearMap (ContinuousLinearMap.proj i) (P' x✝³ x✝²))\n      x✝¹ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\n⊢ ContDiffWithinAt 𝕜 n Φ s x ↔ ∀ (i : ι), ContDiffWithinAt 𝕜 n (fun x => Φ x i) s x\n[PROOFSTEP]\nset pr := @ContinuousLinearMap.proj 𝕜 _ ι F' _ _ _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\n⊢ ContDiffWithinAt 𝕜 n Φ s x ↔ ∀ (i : ι), ContDiffWithinAt 𝕜 n (fun x => Φ x i) s x\n[PROOFSTEP]\nrefine' ⟨fun h i => h.continuousLinearMap_comp (pr i), fun h m hm => _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nh : ∀ (i : ι), ContDiffWithinAt 𝕜 n (fun x => Φ x i) s x\nm : ℕ\nhm : ↑m ≤ n\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) Φ p u\n[PROOFSTEP]\nchoose u hux p hp using fun i => h i m hm\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np✝ : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\npr : (i : ι) → ((i : ι) → F' i) →L[𝕜] F' i := ContinuousLinearMap.proj\nh : ∀ (i : ι), ContDiffWithinAt 𝕜 n (fun x => Φ x i) s x\nm : ℕ\nhm : ↑m ≤ n\nu : ι → Set E\nhux : ∀ (i : ι), u i ∈ 𝓝[insert x s] x\np : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nhp : ∀ (i : ι), HasFTaylorSeriesUpToOn (↑m) (fun x => Φ x i) (p i) (u i)\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) Φ p u\n[PROOFSTEP]\nexact ⟨⋂ i, u i, Filter.iInter_mem.2 hux, _, hasFTaylorSeriesUpToOn_pi.2 fun i => (hp i).mono <| iInter_subset _ _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nι' : Type u_4\ninst✝³ : Fintype ι\ninst✝² : Fintype ι'\nF' : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\np' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)\nΦ : E → (i : ι) → F' i\nP' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)\n⊢ ContDiff 𝕜 n Φ ↔ ∀ (i : ι), ContDiff 𝕜 n fun x => Φ x i\n[PROOFSTEP]\nsimp only [← contDiffOn_univ, contDiffOn_pi]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nq : E → FormalMultilinearSeries 𝕜 E F\ng : E → F\nhf : HasFTaylorSeriesUpToOn n f p s\nhg : HasFTaylorSeriesUpToOn n g q s\n⊢ HasFTaylorSeriesUpToOn n (f + g) (p + q) s\n[PROOFSTEP]\nconvert\n  HasFTaylorSeriesUpToOn.continuousLinearMap_comp (ContinuousLinearMap.fst 𝕜 F F + .snd 𝕜 F F)\n    (hf.prod hg)\n      -- The sum is smooth.\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf g : E → F\nhf : ContDiffAt 𝕜 n f x\nhg : ContDiffAt 𝕜 n g x\n⊢ ContDiffAt 𝕜 n (fun x => f x + g x) x\n[PROOFSTEP]\nrw [← contDiffWithinAt_univ] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf g : E → F\nhf : ContDiffWithinAt 𝕜 n f univ x\nhg : ContDiffWithinAt 𝕜 n g univ x\n⊢ ContDiffWithinAt 𝕜 n (fun x => f x + g x) univ x\n[PROOFSTEP]\nexact hf.add hg\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni✝ i : ℕ\nf g : E → F\nhf : ContDiff 𝕜 (↑i) f\nhg : ContDiff 𝕜 (↑i) g\n⊢ iteratedFDeriv 𝕜 i (f + g) x = iteratedFDeriv 𝕜 i f x + iteratedFDeriv 𝕜 i g x\n[PROOFSTEP]\nsimp_rw [← contDiffOn_univ, ← iteratedFDerivWithin_univ] at hf hg ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni✝ i : ℕ\nf g : E → F\nhf : ContDiffOn 𝕜 (↑i) f univ\nhg : ContDiffOn 𝕜 (↑i) g univ\n⊢ iteratedFDerivWithin 𝕜 i (f + g) univ x = iteratedFDerivWithin 𝕜 i f univ x + iteratedFDerivWithin 𝕜 i g univ x\n[PROOFSTEP]\nexact iteratedFDerivWithin_add_apply hf hg uniqueDiffOn_univ (Set.mem_univ _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F\nhf : ContDiffAt 𝕜 n f x\n⊢ ContDiffAt 𝕜 n (fun x => -f x) x\n[PROOFSTEP]\nrw [← contDiffWithinAt_univ] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F\nhf : ContDiffWithinAt 𝕜 n f univ x\n⊢ ContDiffWithinAt 𝕜 n (fun x => -f x) univ x\n[PROOFSTEP]\nexact hf.neg\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni : ℕ\nf : E → F\nhu : UniqueDiffOn 𝕜 s\nhx : x ∈ s\n⊢ iteratedFDerivWithin 𝕜 i (-f) s x = -iteratedFDerivWithin 𝕜 i f s x\n[PROOFSTEP]\ninduction' i with i hi generalizing x\n[GOAL]\ncase zero\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni : ℕ\nf : E → F\nhu : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\nx : E\nhx : x ∈ s\n⊢ iteratedFDerivWithin 𝕜 Nat.zero (-f) s x = -iteratedFDerivWithin 𝕜 Nat.zero f s x\n[PROOFSTEP]\next\n[GOAL]\ncase zero.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni : ℕ\nf : E → F\nhu : UniqueDiffOn 𝕜 s\nhx✝ : x✝¹ ∈ s\nx : E\nhx : x ∈ s\nx✝ : Fin Nat.zero → E\n⊢ ↑(iteratedFDerivWithin 𝕜 Nat.zero (-f) s x) x✝ = ↑(-iteratedFDerivWithin 𝕜 Nat.zero f s x) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni✝ : ℕ\nf : E → F\nhu : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nhi : ∀ {x : E}, x ∈ s → iteratedFDerivWithin 𝕜 i (-f) s x = -iteratedFDerivWithin 𝕜 i f s x\nx : E\nhx : x ∈ s\n⊢ iteratedFDerivWithin 𝕜 (Nat.succ i) (-f) s x = -iteratedFDerivWithin 𝕜 (Nat.succ i) f s x\n[PROOFSTEP]\next h\n[GOAL]\ncase succ.H\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni✝ : ℕ\nf : E → F\nhu : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nhi : ∀ {x : E}, x ∈ s → iteratedFDerivWithin 𝕜 i (-f) s x = -iteratedFDerivWithin 𝕜 i f s x\nx : E\nhx : x ∈ s\nh : Fin (Nat.succ i) → E\n⊢ ↑(iteratedFDerivWithin 𝕜 (Nat.succ i) (-f) s x) h = ↑(-iteratedFDerivWithin 𝕜 (Nat.succ i) f s x) h\n[PROOFSTEP]\ncalc\n  iteratedFDerivWithin 𝕜 (i + 1) (-f) s x h = fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (-f) s) s x (h 0) (Fin.tail h) :=\n    rfl\n  _ = fderivWithin 𝕜 (-iteratedFDerivWithin 𝕜 i f s) s x (h 0) (Fin.tail h) := by rw [fderivWithin_congr' (@hi) hx]; rfl\n  _ = -(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s) s) x (h 0) (Fin.tail h) := by\n    rw [Pi.neg_def, fderivWithin_neg (hu x hx)]; rfl\n  _ = -(iteratedFDerivWithin 𝕜 (i + 1) f s) x h := rfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni✝ : ℕ\nf : E → F\nhu : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nhi : ∀ {x : E}, x ∈ s → iteratedFDerivWithin 𝕜 i (-f) s x = -iteratedFDerivWithin 𝕜 i f s x\nx : E\nhx : x ∈ s\nh : Fin (Nat.succ i) → E\n⊢ ↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i (-f) s) s x) (h 0)) (tail h) =\n    ↑(↑(fderivWithin 𝕜 (-iteratedFDerivWithin 𝕜 i f s) s x) (h 0)) (tail h)\n[PROOFSTEP]\nrw [fderivWithin_congr' (@hi) hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni✝ : ℕ\nf : E → F\nhu : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nhi : ∀ {x : E}, x ∈ s → iteratedFDerivWithin 𝕜 i (-f) s x = -iteratedFDerivWithin 𝕜 i f s x\nx : E\nhx : x ∈ s\nh : Fin (Nat.succ i) → E\n⊢ ↑(↑(fderivWithin 𝕜 (fun x => -iteratedFDerivWithin 𝕜 i f s x) s x) (h 0)) (tail h) =\n    ↑(↑(fderivWithin 𝕜 (-iteratedFDerivWithin 𝕜 i f s) s x) (h 0)) (tail h)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni✝ : ℕ\nf : E → F\nhu : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nhi : ∀ {x : E}, x ∈ s → iteratedFDerivWithin 𝕜 i (-f) s x = -iteratedFDerivWithin 𝕜 i f s x\nx : E\nhx : x ∈ s\nh : Fin (Nat.succ i) → E\n⊢ ↑(↑(fderivWithin 𝕜 (-iteratedFDerivWithin 𝕜 i f s) s x) (h 0)) (tail h) =\n    -↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s) s x) (h 0)) (tail h)\n[PROOFSTEP]\nrw [Pi.neg_def, fderivWithin_neg (hu x hx)]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni✝ : ℕ\nf : E → F\nhu : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\ni : ℕ\nhi : ∀ {x : E}, x ∈ s → iteratedFDerivWithin 𝕜 i (-f) s x = -iteratedFDerivWithin 𝕜 i f s x\nx : E\nhx : x ∈ s\nh : Fin (Nat.succ i) → E\n⊢ ↑(↑(-fderivWithin 𝕜 (fun i_1 => iteratedFDerivWithin 𝕜 i f s i_1) s x) (h 0)) (tail h) =\n    -↑(↑(fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 i f s) s x) (h 0)) (tail h)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni✝ i : ℕ\nf : E → F\n⊢ iteratedFDeriv 𝕜 i (-f) x = -iteratedFDeriv 𝕜 i f x\n[PROOFSTEP]\nsimp_rw [← iteratedFDerivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ni✝ i : ℕ\nf : E → F\n⊢ iteratedFDerivWithin 𝕜 i (-f) univ x = -iteratedFDerivWithin 𝕜 i f univ x\n[PROOFSTEP]\nexact iteratedFDerivWithin_neg_apply uniqueDiffOn_univ (Set.mem_univ _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nf g : E → F\nhf : ContDiffWithinAt 𝕜 n f s x\nhg : ContDiffWithinAt 𝕜 n g s x\n⊢ ContDiffWithinAt 𝕜 n (fun x => f x - g x) s x\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf g : E → F\nhf : ContDiffAt 𝕜 n f x\nhg : ContDiffAt 𝕜 n g x\n⊢ ContDiffAt 𝕜 n (fun x => f x - g x) x\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ns : Set E\nf g : E → F\nhf : ContDiffOn 𝕜 n f s\nhg : ContDiffOn 𝕜 n g s\n⊢ ContDiffOn 𝕜 n (fun x => f x - g x) s\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf g : E → F\nhf : ContDiff 𝕜 n f\nhg : ContDiff 𝕜 n g\n⊢ ContDiff 𝕜 n fun x => f x - g x\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nf : ι → E → F\ns : Finset ι\nt : Set E\nx : E\nh : ∀ (i : ι), i ∈ s → ContDiffWithinAt 𝕜 n (fun x => f i x) t x\n⊢ ContDiffWithinAt 𝕜 n (fun x => ∑ i in s, f i x) t x\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction_on with i s is IH\n· simp [contDiffWithinAt_const]\n· simp only [is, Finset.sum_insert, not_false_iff]\n  exact (h _ (Finset.mem_insert_self i s)).add (IH fun j hj => h _ (Finset.mem_insert_of_mem hj))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nf : ι → E → F\ns : Finset ι\nt : Set E\nx : E\nh : ∀ (i : ι), i ∈ s → ContDiffWithinAt 𝕜 n (fun x => f i x) t x\n⊢ ContDiffWithinAt 𝕜 n (fun x => ∑ i in s, f i x) t x\n[PROOFSTEP]\ninduction' s using Finset.induction_on with i s is IH\n[GOAL]\ncase empty\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nf : ι → E → F\ns : Finset ι\nt : Set E\nx : E\nh✝ : ∀ (i : ι), i ∈ s → ContDiffWithinAt 𝕜 n (fun x => f i x) t x\nh : ∀ (i : ι), i ∈ ∅ → ContDiffWithinAt 𝕜 n (fun x => f i x) t x\n⊢ ContDiffWithinAt 𝕜 n (fun x => ∑ i in ∅, f i x) t x\n[PROOFSTEP]\nsimp [contDiffWithinAt_const]\n[GOAL]\ncase insert\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝¹ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nf : ι → E → F\ns✝ : Finset ι\nt : Set E\nx : E\nh✝ : ∀ (i : ι), i ∈ s✝ → ContDiffWithinAt 𝕜 n (fun x => f i x) t x\ni : ι\ns : Finset ι\nis : ¬i ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → ContDiffWithinAt 𝕜 n (fun x => f i x) t x) → ContDiffWithinAt 𝕜 n (fun x => ∑ i in s, f i x) t x\nh : ∀ (i_1 : ι), i_1 ∈ insert i s → ContDiffWithinAt 𝕜 n (fun x => f i_1 x) t x\n⊢ ContDiffWithinAt 𝕜 n (fun x => ∑ i in insert i s, f i x) t x\n[PROOFSTEP]\nsimp only [is, Finset.sum_insert, not_false_iff]\n[GOAL]\ncase insert\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝¹ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nf : ι → E → F\ns✝ : Finset ι\nt : Set E\nx : E\nh✝ : ∀ (i : ι), i ∈ s✝ → ContDiffWithinAt 𝕜 n (fun x => f i x) t x\ni : ι\ns : Finset ι\nis : ¬i ∈ s\nIH :\n  (∀ (i : ι), i ∈ s → ContDiffWithinAt 𝕜 n (fun x => f i x) t x) → ContDiffWithinAt 𝕜 n (fun x => ∑ i in s, f i x) t x\nh : ∀ (i_1 : ι), i_1 ∈ insert i s → ContDiffWithinAt 𝕜 n (fun x => f i_1 x) t x\n⊢ ContDiffWithinAt 𝕜 n (fun x => f i x + ∑ i in s, f i x) t x\n[PROOFSTEP]\nexact (h _ (Finset.mem_insert_self i s)).add (IH fun j hj => h _ (Finset.mem_insert_of_mem hj))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nf : ι → E → F\ns : Finset ι\nx : E\nh : ∀ (i : ι), i ∈ s → ContDiffAt 𝕜 n (fun x => f i x) x\n⊢ ContDiffAt 𝕜 n (fun x => ∑ i in s, f i x) x\n[PROOFSTEP]\nrw [← contDiffWithinAt_univ] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nf : ι → E → F\ns : Finset ι\nx : E\nh : ∀ (i : ι), i ∈ s → ContDiffAt 𝕜 n (fun x => f i x) x\n⊢ ContDiffWithinAt 𝕜 n (fun x => ∑ i in s, f i x) univ x\n[PROOFSTEP]\nexact ContDiffWithinAt.sum h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nf : ι → E → F\ns : Finset ι\nh : ∀ (i : ι), i ∈ s → ContDiff 𝕜 n fun x => f i x\n⊢ ContDiff 𝕜 n fun x => ∑ i in s, f i x\n[PROOFSTEP]\nsimp only [← contDiffOn_univ] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nι : Type u_3\nf : ι → E → F\ns : Finset ι\nh : ∀ (i : ι), i ∈ s → ContDiffOn 𝕜 n (fun x => f i x) univ\n⊢ ContDiffOn 𝕜 n (fun x => ∑ i in s, f i x) univ\n[PROOFSTEP]\nexact ContDiffOn.sum h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁵ : NormedAddCommGroup D\ninst✝¹⁴ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\n𝔸 : Type u_3\n𝔸' : Type u_4\nι : Type u_5\n𝕜' : Type u_6\ninst✝⁵ : NormedRing 𝔸\ninst✝⁴ : NormedAlgebra 𝕜 𝔸\ninst✝³ : NormedCommRing 𝔸'\ninst✝² : NormedAlgebra 𝕜 𝔸'\ninst✝¹ : NormedField 𝕜'\ninst✝ : NormedAlgebra 𝕜 𝕜'\nt : Finset ι\nf : ι → E → 𝔸'\nh : ∀ (i : ι), i ∈ t → ContDiffWithinAt 𝕜 n (f i) s x\n⊢ ContDiffWithinAt 𝕜 n (fun y => ∏ i in t, f i y) s x\n[PROOFSTEP]\nsimpa only [← Finset.prod_apply] using contDiffWithinAt_prod' h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁵ : NormedAddCommGroup D\ninst✝¹⁴ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\n𝔸 : Type u_3\n𝔸' : Type u_4\nι : Type u_5\n𝕜' : Type u_6\ninst✝⁵ : NormedRing 𝔸\ninst✝⁴ : NormedAlgebra 𝕜 𝔸\ninst✝³ : NormedCommRing 𝔸'\ninst✝² : NormedAlgebra 𝕜 𝔸'\ninst✝¹ : NormedField 𝕜'\ninst✝ : NormedAlgebra 𝕜 𝕜'\nf : E → 𝔸\nhf : ContDiff 𝕜 n f\n⊢ ContDiff 𝕜 n fun x => f x ^ 0\n[PROOFSTEP]\nsimpa using contDiff_const\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁵ : NormedAddCommGroup D\ninst✝¹⁴ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\n𝔸 : Type u_3\n𝔸' : Type u_4\nι : Type u_5\n𝕜' : Type u_6\ninst✝⁵ : NormedRing 𝔸\ninst✝⁴ : NormedAlgebra 𝕜 𝔸\ninst✝³ : NormedCommRing 𝔸'\ninst✝² : NormedAlgebra 𝕜 𝔸'\ninst✝¹ : NormedField 𝕜'\ninst✝ : NormedAlgebra 𝕜 𝕜'\nf : E → 𝔸\nhf : ContDiff 𝕜 n f\nm : ℕ\n⊢ ContDiff 𝕜 n fun x => f x ^ (m + 1)\n[PROOFSTEP]\nsimpa [pow_succ] using hf.mul (hf.pow m)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁵ : NormedAddCommGroup D\ninst✝¹⁴ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\n𝔸 : Type u_3\n𝔸' : Type u_4\nι : Type u_5\n𝕜' : Type u_6\ninst✝⁵ : NormedRing 𝔸\ninst✝⁴ : NormedAlgebra 𝕜 𝔸\ninst✝³ : NormedCommRing 𝔸'\ninst✝² : NormedAlgebra 𝕜 𝔸'\ninst✝¹ : NormedField 𝕜'\ninst✝ : NormedAlgebra 𝕜 𝕜'\nf : E → 𝕜'\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n f s x\nc : 𝕜'\n⊢ ContDiffWithinAt 𝕜 n (fun x => f x / c) s x\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using hf.mul contDiffWithinAt_const\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁵ : NormedAddCommGroup D\ninst✝¹⁴ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\n𝔸 : Type u_3\n𝔸' : Type u_4\nι : Type u_5\n𝕜' : Type u_6\ninst✝⁵ : NormedRing 𝔸\ninst✝⁴ : NormedAlgebra 𝕜 𝔸\ninst✝³ : NormedCommRing 𝔸'\ninst✝² : NormedAlgebra 𝕜 𝔸'\ninst✝¹ : NormedField 𝕜'\ninst✝ : NormedAlgebra 𝕜 𝕜'\nf : E → 𝕜'\nn : ℕ∞\nhf : ContDiff 𝕜 n f\nc : 𝕜'\n⊢ ContDiff 𝕜 n fun x => f x / c\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using hf.mul contDiff_const\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → 𝕜\ng : E → F\nhf : ContDiffAt 𝕜 n f x\nhg : ContDiffAt 𝕜 n g x\n⊢ ContDiffAt 𝕜 n (fun x => f x • g x) x\n[PROOFSTEP]\nrw [← contDiffWithinAt_univ] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → 𝕜\ng : E → F\nhf : ContDiffWithinAt 𝕜 n f univ x\nhg : ContDiffWithinAt 𝕜 n g univ x\n⊢ ContDiffWithinAt 𝕜 n (fun x => f x • g x) univ x\n[PROOFSTEP]\nexact hf.smul hg\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc✝ : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝³ : Semiring R\ninst✝² : Module R F\ninst✝¹ : SMulCommClass 𝕜 R F\ninst✝ : ContinuousConstSMul R F\nf : E → F\nx : E\nc : R\nhf : ContDiffAt 𝕜 n f x\n⊢ ContDiffAt 𝕜 n (fun y => c • f y) x\n[PROOFSTEP]\nrw [← contDiffWithinAt_univ] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc✝ : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝³ : Semiring R\ninst✝² : Module R F\ninst✝¹ : SMulCommClass 𝕜 R F\ninst✝ : ContinuousConstSMul R F\nf : E → F\nx : E\nc : R\nhf : ContDiffWithinAt 𝕜 n f univ x\n⊢ ContDiffWithinAt 𝕜 n (fun y => c • f y) univ x\n[PROOFSTEP]\nexact hf.const_smul c\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝³ : Semiring R\ninst✝² : Module R F\ninst✝¹ : SMulCommClass 𝕜 R F\ninst✝ : ContinuousConstSMul R F\ni : ℕ\na : R\nx : E\nhf : ContDiff 𝕜 (↑i) f\n⊢ iteratedFDeriv 𝕜 i (a • f) x = a • iteratedFDeriv 𝕜 i f x\n[PROOFSTEP]\nsimp_rw [← contDiffOn_univ, ← iteratedFDerivWithin_univ] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝³ : Semiring R\ninst✝² : Module R F\ninst✝¹ : SMulCommClass 𝕜 R F\ninst✝ : ContinuousConstSMul R F\ni : ℕ\na : R\nx : E\nhf : ContDiffOn 𝕜 (↑i) f univ\n⊢ iteratedFDerivWithin 𝕜 i (a • f) univ x = a • iteratedFDerivWithin 𝕜 i f univ x\n[PROOFSTEP]\nrefine' iteratedFDerivWithin_const_smul_apply hf uniqueDiffOn_univ (Set.mem_univ _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nE' : Type u_3\ninst✝³ : NormedAddCommGroup E'\ninst✝² : NormedSpace 𝕜 E'\nF' : Type u_4\ninst✝¹ : NormedAddCommGroup F'\ninst✝ : NormedSpace 𝕜 F'\nf : E → F\ng : E' → F'\nx : E\ny : E'\nhf : ContDiffAt 𝕜 n f x\nhg : ContDiffAt 𝕜 n g y\n⊢ ContDiffAt 𝕜 n (Prod.map f g) (x, y)\n[PROOFSTEP]\nrw [ContDiffAt] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nE' : Type u_3\ninst✝³ : NormedAddCommGroup E'\ninst✝² : NormedSpace 𝕜 E'\nF' : Type u_4\ninst✝¹ : NormedAddCommGroup F'\ninst✝ : NormedSpace 𝕜 F'\nf : E → F\ng : E' → F'\nx : E\ny : E'\nhf : ContDiffWithinAt 𝕜 n f univ x\nhg : ContDiffWithinAt 𝕜 n g univ y\n⊢ ContDiffWithinAt 𝕜 n (Prod.map f g) univ (x, y)\n[PROOFSTEP]\nconvert hf.prod_map hg\n[GOAL]\ncase h.e'_11\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nE' : Type u_3\ninst✝³ : NormedAddCommGroup E'\ninst✝² : NormedSpace 𝕜 E'\nF' : Type u_4\ninst✝¹ : NormedAddCommGroup F'\ninst✝ : NormedSpace 𝕜 F'\nf : E → F\ng : E' → F'\nx : E\ny : E'\nhf : ContDiffWithinAt 𝕜 n f univ x\nhg : ContDiffWithinAt 𝕜 n g univ y\n⊢ univ = univ ×ˢ univ\n[PROOFSTEP]\nsimp only [univ_prod_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np✝ : E → FormalMultilinearSeries 𝕜 E F\nE' : Type u_3\ninst✝³ : NormedAddCommGroup E'\ninst✝² : NormedSpace 𝕜 E'\nF' : Type u_4\ninst✝¹ : NormedAddCommGroup F'\ninst✝ : NormedSpace 𝕜 F'\nf : E → F\ng : E' → F'\np : E × E'\nhf : ContDiffAt 𝕜 n f p.fst\nhg : ContDiffAt 𝕜 n g p.snd\n⊢ ContDiffAt 𝕜 n (Prod.map f g) p\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nE' : Type u_3\ninst✝³ : NormedAddCommGroup E'\ninst✝² : NormedSpace 𝕜 E'\nF' : Type u_4\ninst✝¹ : NormedAddCommGroup F'\ninst✝ : NormedSpace 𝕜 F'\nf : E → F\ng : E' → F'\nfst✝ : E\nsnd✝ : E'\nhf : ContDiffAt 𝕜 n f (fst✝, snd✝).fst\nhg : ContDiffAt 𝕜 n g (fst✝, snd✝).snd\n⊢ ContDiffAt 𝕜 n (Prod.map f g) (fst✝, snd✝)\n[PROOFSTEP]\nexact ContDiffAt.prod_map hf hg\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nE' : Type u_3\ninst✝³ : NormedAddCommGroup E'\ninst✝² : NormedSpace 𝕜 E'\nF' : Type u_4\ninst✝¹ : NormedAddCommGroup F'\ninst✝ : NormedSpace 𝕜 F'\nf : E → F\ng : E' → F'\nhf : ContDiff 𝕜 n f\nhg : ContDiff 𝕜 n g\n⊢ ContDiff 𝕜 n (Prod.map f g)\n[PROOFSTEP]\nrw [contDiff_iff_contDiffAt] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹³ : NormedAddCommGroup D\ninst✝¹² : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nE' : Type u_3\ninst✝³ : NormedAddCommGroup E'\ninst✝² : NormedSpace 𝕜 E'\nF' : Type u_4\ninst✝¹ : NormedAddCommGroup F'\ninst✝ : NormedSpace 𝕜 F'\nf : E → F\ng : E' → F'\nhf : ∀ (x : E), ContDiffAt 𝕜 n f x\nhg : ∀ (x : E'), ContDiffAt 𝕜 n g x\n⊢ ∀ (x : E × E'), ContDiffAt 𝕜 n (Prod.map f g) x\n[PROOFSTEP]\nexact fun ⟨x, y⟩ => (hf x).prod_map (hg y)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\n⊢ ContDiffAt 𝕜 n Ring.inverse ↑x\n[PROOFSTEP]\ninduction' n using ENat.nat_induction with n IH Itop\n[GOAL]\ncase h0\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\n⊢ ContDiffAt 𝕜 0 Ring.inverse ↑x\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase h0\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nm : ℕ\nhm : ↑m ≤ 0\n⊢ ∃ u, u ∈ 𝓝[insert (↑x) univ] ↑x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) Ring.inverse p u\n[PROOFSTEP]\nrefine' ⟨{y : R | IsUnit y}, _, _⟩\n[GOAL]\ncase h0.refine'_1\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nm : ℕ\nhm : ↑m ≤ 0\n⊢ {y | IsUnit y} ∈ 𝓝[insert (↑x) univ] ↑x\n[PROOFSTEP]\nsimp [nhdsWithin_univ]\n[GOAL]\ncase h0.refine'_1\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nm : ℕ\nhm : ↑m ≤ 0\n⊢ {y | IsUnit y} ∈ 𝓝 ↑x\n[PROOFSTEP]\nexact x.nhds\n[GOAL]\ncase h0.refine'_2\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nm : ℕ\nhm : ↑m ≤ 0\n⊢ ∃ p, HasFTaylorSeriesUpToOn (↑m) Ring.inverse p {y | IsUnit y}\n[PROOFSTEP]\nuse ftaylorSeriesWithin 𝕜 inverse univ\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nm : ℕ\nhm : ↑m ≤ 0\n⊢ HasFTaylorSeriesUpToOn (↑m) Ring.inverse (ftaylorSeriesWithin 𝕜 Ring.inverse univ) {y | IsUnit y}\n[PROOFSTEP]\nrw [le_antisymm hm bot_le, hasFTaylorSeriesUpToOn_zero_iff]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nm : ℕ\nhm : ↑m ≤ 0\n⊢ ContinuousOn Ring.inverse {y | IsUnit y} ∧\n    ∀ (x : R),\n      x ∈ {y | IsUnit y} →\n        ContinuousMultilinearMap.uncurry0 (ftaylorSeriesWithin 𝕜 Ring.inverse univ x 0) = Ring.inverse x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nm : ℕ\nhm : ↑m ≤ 0\n⊢ ContinuousOn Ring.inverse {y | IsUnit y}\n[PROOFSTEP]\nrintro _ ⟨x', rfl⟩\n[GOAL]\ncase h.left.intro\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nm : ℕ\nhm : ↑m ≤ 0\nx' : Rˣ\n⊢ ContinuousWithinAt Ring.inverse {y | IsUnit y} ↑x'\n[PROOFSTEP]\nexact (inverse_continuousAt x').continuousWithinAt\n[GOAL]\ncase h.right\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nm : ℕ\nhm : ↑m ≤ 0\n⊢ ∀ (x : R),\n    x ∈ {y | IsUnit y} →\n      ContinuousMultilinearMap.uncurry0 (ftaylorSeriesWithin 𝕜 Ring.inverse univ x 0) = Ring.inverse x\n[PROOFSTEP]\nsimp [ftaylorSeriesWithin]\n[GOAL]\ncase hsuc\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) Ring.inverse ↑x\n⊢ ContDiffAt 𝕜 (↑(Nat.succ n)) Ring.inverse ↑x\n[PROOFSTEP]\napply contDiffAt_succ_iff_hasFDerivAt.mpr\n[GOAL]\ncase hsuc\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) Ring.inverse ↑x\n⊢ ∃ f', (∃ u, u ∈ 𝓝 ↑x ∧ ∀ (x : R), x ∈ u → HasFDerivAt Ring.inverse (f' x) x) ∧ ContDiffAt 𝕜 (↑n) f' ↑x\n[PROOFSTEP]\nrefine' ⟨fun x : R => -mulLeftRight 𝕜 R (inverse x) (inverse x), _, _⟩\n[GOAL]\ncase hsuc.refine'_1\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) Ring.inverse ↑x\n⊢ ∃ u,\n    u ∈ 𝓝 ↑x ∧\n      ∀ (x : R),\n        x ∈ u → HasFDerivAt Ring.inverse ((fun x => -↑(↑(mulLeftRight 𝕜 R) (Ring.inverse x)) (Ring.inverse x)) x) x\n[PROOFSTEP]\nrefine' ⟨{y : R | IsUnit y}, x.nhds, _⟩\n[GOAL]\ncase hsuc.refine'_1\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) Ring.inverse ↑x\n⊢ ∀ (x : R),\n    x ∈ {y | IsUnit y} →\n      HasFDerivAt Ring.inverse ((fun x => -↑(↑(mulLeftRight 𝕜 R) (Ring.inverse x)) (Ring.inverse x)) x) x\n[PROOFSTEP]\nrintro _ ⟨y, rfl⟩\n[GOAL]\ncase hsuc.refine'_1.intro\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) Ring.inverse ↑x\ny : Rˣ\n⊢ HasFDerivAt Ring.inverse ((fun x => -↑(↑(mulLeftRight 𝕜 R) (Ring.inverse x)) (Ring.inverse x)) ↑y) ↑y\n[PROOFSTEP]\nsimp_rw [inverse_unit]\n[GOAL]\ncase hsuc.refine'_1.intro\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) Ring.inverse ↑x\ny : Rˣ\n⊢ HasFDerivAt Ring.inverse (-↑(↑(mulLeftRight 𝕜 R) ↑y⁻¹) ↑y⁻¹) ↑y\n[PROOFSTEP]\nexact hasFDerivAt_ring_inverse y\n[GOAL]\ncase hsuc.refine'_2\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) Ring.inverse ↑x\n⊢ ContDiffAt 𝕜 (↑n) (fun x => -↑(↑(mulLeftRight 𝕜 R) (Ring.inverse x)) (Ring.inverse x)) ↑x\n[PROOFSTEP]\nconvert (mulLeftRight_isBoundedBilinear 𝕜 R).contDiff.neg.comp_contDiffAt (x : R) (IH.prod IH)\n[GOAL]\ncase htop\n𝕜 : Type u_1\ninst✝¹³ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹² : NormedAddCommGroup D\ninst✝¹¹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁴ : NormedAddCommGroup X\ninst✝³ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝² : NormedRing R\ninst✝¹ : NormedAlgebra 𝕜 R\ninst✝ : CompleteSpace R\nx : Rˣ\nItop : ∀ (n : ℕ), ContDiffAt 𝕜 (↑n) Ring.inverse ↑x\n⊢ ContDiffAt 𝕜 ⊤ Ring.inverse ↑x\n[PROOFSTEP]\nexact contDiffAt_top.mpr Itop\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁴ : NormedAddCommGroup D\ninst✝¹³ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁶ : NormedAddCommGroup X\ninst✝⁵ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝⁴ : NormedRing R\ninst✝³ : NormedAlgebra 𝕜 R\n𝕜' : Type u_4\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedAlgebra 𝕜 𝕜'\ninst✝ : CompleteSpace 𝕜'\nx : 𝕜'\nhx : x ≠ 0\nn : ℕ∞\n⊢ ContDiffAt 𝕜 n Inv.inv x\n[PROOFSTEP]\nsimpa only [Ring.inverse_eq_inv'] using contDiffAt_ring_inverse 𝕜 (Units.mk0 x hx)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁴ : NormedAddCommGroup D\ninst✝¹³ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁶ : NormedAddCommGroup X\ninst✝⁵ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝⁴ : NormedRing R\ninst✝³ : NormedAlgebra 𝕜 R\n𝕜' : Type u_4\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedAlgebra 𝕜 𝕜'\ninst✝ : CompleteSpace 𝕜'\nf : E → 𝕜'\nn : ℕ∞\nhf : ContDiff 𝕜 n f\nh : ∀ (x : E), f x ≠ 0\n⊢ ContDiff 𝕜 n fun x => (f x)⁻¹\n[PROOFSTEP]\nrw [contDiff_iff_contDiffAt]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁴ : NormedAddCommGroup D\ninst✝¹³ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁶ : NormedAddCommGroup X\ninst✝⁵ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝⁴ : NormedRing R\ninst✝³ : NormedAlgebra 𝕜 R\n𝕜' : Type u_4\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedAlgebra 𝕜 𝕜'\ninst✝ : CompleteSpace 𝕜'\nf : E → 𝕜'\nn : ℕ∞\nhf : ContDiff 𝕜 n f\nh : ∀ (x : E), f x ≠ 0\n⊢ ∀ (x : E), ContDiffAt 𝕜 n (fun x => (f x)⁻¹) x\n[PROOFSTEP]\nexact fun x => hf.contDiffAt.inv (h x)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁵ : NormedAddCommGroup D\ninst✝¹⁴ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝⁵ : NormedRing R\ninst✝⁴ : NormedAlgebra 𝕜 R\n𝕜' : Type u_4\ninst✝³ : NormedField 𝕜'\ninst✝² : NormedAlgebra 𝕜 𝕜'\ninst✝¹ : CompleteSpace 𝕜'\ninst✝ : CompleteSpace 𝕜\nf g : E → 𝕜\nn : ℕ∞\nhf : ContDiffWithinAt 𝕜 n f s x\nhg : ContDiffWithinAt 𝕜 n g s x\nhx : g x ≠ 0\n⊢ ContDiffWithinAt 𝕜 n (fun x => f x / g x) s x\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using hf.mul (hg.inv hx)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁵ : NormedAddCommGroup D\ninst✝¹⁴ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝⁵ : NormedRing R\ninst✝⁴ : NormedAlgebra 𝕜 R\n𝕜' : Type u_4\ninst✝³ : NormedField 𝕜'\ninst✝² : NormedAlgebra 𝕜 𝕜'\ninst✝¹ : CompleteSpace 𝕜'\ninst✝ : CompleteSpace 𝕜\nf g : E → 𝕜\nn : ℕ∞\nhf : ContDiff 𝕜 n f\nhg : ContDiff 𝕜 n g\nh0 : ∀ (x : E), g x ≠ 0\n⊢ ContDiff 𝕜 n fun x => f x / g x\n[PROOFSTEP]\nsimp only [contDiff_iff_contDiffAt] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁵ : NormedAddCommGroup D\ninst✝¹⁴ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nR : Type u_3\ninst✝⁵ : NormedRing R\ninst✝⁴ : NormedAlgebra 𝕜 R\n𝕜' : Type u_4\ninst✝³ : NormedField 𝕜'\ninst✝² : NormedAlgebra 𝕜 𝕜'\ninst✝¹ : CompleteSpace 𝕜'\ninst✝ : CompleteSpace 𝕜\nf g : E → 𝕜\nn : ℕ∞\nh0 : ∀ (x : E), g x ≠ 0\nhf : ∀ (x : E), ContDiffAt 𝕜 n f x\nhg : ∀ (x : E), ContDiffAt 𝕜 n g x\n⊢ ∀ (x : E), ContDiffAt 𝕜 n (fun x => f x / g x) x\n[PROOFSTEP]\nexact fun x => (hf x).div (hg x) (h0 x)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\n⊢ ContDiffAt 𝕜 n inverse ↑e\n[PROOFSTEP]\nnontriviality E\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\n✝ : Nontrivial E\n⊢ ContDiffAt 𝕜 n inverse ↑e\n[PROOFSTEP]\nlet O₁ : (E →L[𝕜] E) → F →L[𝕜] E := fun f => f.comp (e.symm : F →L[𝕜] E)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\n✝ : Nontrivial E\nO₁ : (E →L[𝕜] E) → F →L[𝕜] E := fun f => ContinuousLinearMap.comp f ↑(ContinuousLinearEquiv.symm e)\n⊢ ContDiffAt 𝕜 n inverse ↑e\n[PROOFSTEP]\nlet O₂ : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\n✝ : Nontrivial E\nO₁ : (E →L[𝕜] E) → F →L[𝕜] E := fun f => ContinuousLinearMap.comp f ↑(ContinuousLinearEquiv.symm e)\nO₂ : (E →L[𝕜] F) → E →L[𝕜] E := fun f => ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm e)) f\n⊢ ContDiffAt 𝕜 n inverse ↑e\n[PROOFSTEP]\nhave : ContinuousLinearMap.inverse = O₁ ∘ Ring.inverse ∘ O₂ := funext (to_ring_inverse e)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\n✝ : Nontrivial E\nO₁ : (E →L[𝕜] E) → F →L[𝕜] E := fun f => ContinuousLinearMap.comp f ↑(ContinuousLinearEquiv.symm e)\nO₂ : (E →L[𝕜] F) → E →L[𝕜] E := fun f => ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm e)) f\nthis : inverse = O₁ ∘ Ring.inverse ∘ O₂\n⊢ ContDiffAt 𝕜 n inverse ↑e\n[PROOFSTEP]\nrw [this]\n  -- `O₁` and `O₂` are `ContDiff`,\n    -- so we reduce to proving that `Ring.inverse` is `ContDiff`\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\n✝ : Nontrivial E\nO₁ : (E →L[𝕜] E) → F →L[𝕜] E := fun f => ContinuousLinearMap.comp f ↑(ContinuousLinearEquiv.symm e)\nO₂ : (E →L[𝕜] F) → E →L[𝕜] E := fun f => ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm e)) f\nthis : inverse = O₁ ∘ Ring.inverse ∘ O₂\n⊢ ContDiffAt 𝕜 n (O₁ ∘ Ring.inverse ∘ O₂) ↑e\n[PROOFSTEP]\nhave h₁ : ContDiff 𝕜 n O₁ := contDiff_id.clm_comp contDiff_const\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\n✝ : Nontrivial E\nO₁ : (E →L[𝕜] E) → F →L[𝕜] E := fun f => ContinuousLinearMap.comp f ↑(ContinuousLinearEquiv.symm e)\nO₂ : (E →L[𝕜] F) → E →L[𝕜] E := fun f => ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm e)) f\nthis : inverse = O₁ ∘ Ring.inverse ∘ O₂\nh₁ : ContDiff 𝕜 n O₁\n⊢ ContDiffAt 𝕜 n (O₁ ∘ Ring.inverse ∘ O₂) ↑e\n[PROOFSTEP]\nhave h₂ : ContDiff 𝕜 n O₂ := contDiff_const.clm_comp contDiff_id\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\n✝ : Nontrivial E\nO₁ : (E →L[𝕜] E) → F →L[𝕜] E := fun f => ContinuousLinearMap.comp f ↑(ContinuousLinearEquiv.symm e)\nO₂ : (E →L[𝕜] F) → E →L[𝕜] E := fun f => ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm e)) f\nthis : inverse = O₁ ∘ Ring.inverse ∘ O₂\nh₁ : ContDiff 𝕜 n O₁\nh₂ : ContDiff 𝕜 n O₂\n⊢ ContDiffAt 𝕜 n (O₁ ∘ Ring.inverse ∘ O₂) ↑e\n[PROOFSTEP]\nrefine' h₁.contDiffAt.comp _ (ContDiffAt.comp _ _ h₂.contDiffAt)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\n✝ : Nontrivial E\nO₁ : (E →L[𝕜] E) → F →L[𝕜] E := fun f => ContinuousLinearMap.comp f ↑(ContinuousLinearEquiv.symm e)\nO₂ : (E →L[𝕜] F) → E →L[𝕜] E := fun f => ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm e)) f\nthis : inverse = O₁ ∘ Ring.inverse ∘ O₂\nh₁ : ContDiff 𝕜 n O₁\nh₂ : ContDiff 𝕜 n O₂\n⊢ ContDiffAt 𝕜 n Ring.inverse (O₂ ↑e)\n[PROOFSTEP]\nconvert contDiffAt_ring_inverse 𝕜 (1 : (E →L[𝕜] E)ˣ)\n[GOAL]\ncase h.e'_11\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\ne : E ≃L[𝕜] F\n✝ : Nontrivial E\nO₁ : (E →L[𝕜] E) → F →L[𝕜] E := fun f => ContinuousLinearMap.comp f ↑(ContinuousLinearEquiv.symm e)\nO₂ : (E →L[𝕜] F) → E →L[𝕜] E := fun f => ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm e)) f\nthis : inverse = O₁ ∘ Ring.inverse ∘ O₂\nh₁ : ContDiff 𝕜 n O₁\nh₂ : ContDiff 𝕜 n O₂\n⊢ O₂ ↑e = ↑1\n[PROOFSTEP]\nsimp [one_def]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf : ContDiffAt 𝕜 n (↑f) (↑(LocalHomeomorph.symm f) a)\n⊢ ContDiffAt 𝕜 n (↑(LocalHomeomorph.symm f)) a\n[PROOFSTEP]\ninduction' n using ENat.nat_induction with n IH Itop\n[GOAL]\ncase h0\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n (↑f) (↑(LocalHomeomorph.symm f) a)\nhf : ContDiffAt 𝕜 0 (↑f) (↑(LocalHomeomorph.symm f) a)\n⊢ ContDiffAt 𝕜 0 (↑(LocalHomeomorph.symm f)) a\n[PROOFSTEP]\nrw [contDiffAt_zero]\n[GOAL]\ncase h0\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n (↑f) (↑(LocalHomeomorph.symm f) a)\nhf : ContDiffAt 𝕜 0 (↑f) (↑(LocalHomeomorph.symm f) a)\n⊢ ∃ u, u ∈ 𝓝 a ∧ ContinuousOn (↑(LocalHomeomorph.symm f)) u\n[PROOFSTEP]\nexact ⟨f.target, IsOpen.mem_nhds f.open_target ha, f.continuous_invFun⟩\n[GOAL]\ncase hsuc\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\n⊢ ContDiffAt 𝕜 (↑(Nat.succ n)) (↑(LocalHomeomorph.symm f)) a\n[PROOFSTEP]\nobtain ⟨f', ⟨u, hu, hff'⟩, hf'⟩ := contDiffAt_succ_iff_hasFDerivAt.mp hf\n[GOAL]\ncase hsuc.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\n⊢ ContDiffAt 𝕜 (↑(Nat.succ n)) (↑(LocalHomeomorph.symm f)) a\n[PROOFSTEP]\napply contDiffAt_succ_iff_hasFDerivAt.mpr\n[GOAL]\ncase hsuc.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\n⊢ ∃ f', (∃ u, u ∈ 𝓝 a ∧ ∀ (x : F), x ∈ u → HasFDerivAt (↑(LocalHomeomorph.symm f)) (f' x) x) ∧ ContDiffAt 𝕜 (↑n) f' a\n[PROOFSTEP]\nhave eq_f₀' : f' (f.symm a) = f₀' := (hff' (f.symm a) (mem_of_mem_nhds hu)).unique hf₀'\n[GOAL]\ncase hsuc.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\n⊢ ∃ f', (∃ u, u ∈ 𝓝 a ∧ ∀ (x : F), x ∈ u → HasFDerivAt (↑(LocalHomeomorph.symm f)) (f' x) x) ∧ ContDiffAt 𝕜 (↑n) f' a\n[PROOFSTEP]\nrefine' ⟨inverse ∘ f' ∘ f.symm, _, _⟩\n[GOAL]\ncase hsuc.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\n⊢ ∃ u,\n    u ∈ 𝓝 a ∧\n      ∀ (x : F), x ∈ u → HasFDerivAt (↑(LocalHomeomorph.symm f)) ((inverse ∘ f' ∘ ↑(LocalHomeomorph.symm f)) x) x\n[PROOFSTEP]\nhave h_nhds : {y : E | ∃ e : E ≃L[𝕜] F, ↑e = f' y} ∈ 𝓝 (f.symm a) :=\n  by\n  have hf₀' := f₀'.nhds\n  rw [← eq_f₀'] at hf₀' \n  exact hf'.continuousAt.preimage_mem_nhds hf₀'\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\n⊢ {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\n[PROOFSTEP]\nhave hf₀' := f₀'.nhds\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀'✝ : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nhf₀' : range ContinuousLinearEquiv.toContinuousLinearMap ∈ 𝓝 ↑f₀'\n⊢ {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\n[PROOFSTEP]\nrw [← eq_f₀'] at hf₀' \n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀'✝ : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nhf₀' : range ContinuousLinearEquiv.toContinuousLinearMap ∈ 𝓝 (f' (↑(LocalHomeomorph.symm f) a))\n⊢ {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\n[PROOFSTEP]\nexact hf'.continuousAt.preimage_mem_nhds hf₀'\n[GOAL]\ncase hsuc.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_nhds : {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\n⊢ ∃ u,\n    u ∈ 𝓝 a ∧\n      ∀ (x : F), x ∈ u → HasFDerivAt (↑(LocalHomeomorph.symm f)) ((inverse ∘ f' ∘ ↑(LocalHomeomorph.symm f)) x) x\n[PROOFSTEP]\nobtain ⟨t, htu, ht, htf⟩ := mem_nhds_iff.mp (Filter.inter_mem hu h_nhds)\n[GOAL]\ncase hsuc.intro.intro.intro.intro.refine'_1.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_nhds : {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nt : Set E\nhtu : t ⊆ u ∩ {y | ∃ e, ↑e = f' y}\nht : IsOpen t\nhtf : ↑(LocalHomeomorph.symm f) a ∈ t\n⊢ ∃ u,\n    u ∈ 𝓝 a ∧\n      ∀ (x : F), x ∈ u → HasFDerivAt (↑(LocalHomeomorph.symm f)) ((inverse ∘ f' ∘ ↑(LocalHomeomorph.symm f)) x) x\n[PROOFSTEP]\nuse f.target ∩ f.symm ⁻¹' t\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_nhds : {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nt : Set E\nhtu : t ⊆ u ∩ {y | ∃ e, ↑e = f' y}\nht : IsOpen t\nhtf : ↑(LocalHomeomorph.symm f) a ∈ t\n⊢ f.target ∩ ↑(LocalHomeomorph.symm f) ⁻¹' t ∈ 𝓝 a ∧\n    ∀ (x : F),\n      x ∈ f.target ∩ ↑(LocalHomeomorph.symm f) ⁻¹' t →\n        HasFDerivAt (↑(LocalHomeomorph.symm f)) ((inverse ∘ f' ∘ ↑(LocalHomeomorph.symm f)) x) x\n[PROOFSTEP]\nrefine' ⟨IsOpen.mem_nhds _ _, _⟩\n[GOAL]\ncase h.refine'_1\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_nhds : {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nt : Set E\nhtu : t ⊆ u ∩ {y | ∃ e, ↑e = f' y}\nht : IsOpen t\nhtf : ↑(LocalHomeomorph.symm f) a ∈ t\n⊢ IsOpen (f.target ∩ ↑(LocalHomeomorph.symm f) ⁻¹' t)\n[PROOFSTEP]\nexact f.preimage_open_of_open_symm ht\n[GOAL]\ncase h.refine'_2\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_nhds : {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nt : Set E\nhtu : t ⊆ u ∩ {y | ∃ e, ↑e = f' y}\nht : IsOpen t\nhtf : ↑(LocalHomeomorph.symm f) a ∈ t\n⊢ a ∈ f.target ∩ ↑(LocalHomeomorph.symm f) ⁻¹' t\n[PROOFSTEP]\nexact mem_inter ha (mem_preimage.mpr htf)\n[GOAL]\ncase h.refine'_3\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_nhds : {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nt : Set E\nhtu : t ⊆ u ∩ {y | ∃ e, ↑e = f' y}\nht : IsOpen t\nhtf : ↑(LocalHomeomorph.symm f) a ∈ t\n⊢ ∀ (x : F),\n    x ∈ f.target ∩ ↑(LocalHomeomorph.symm f) ⁻¹' t →\n      HasFDerivAt (↑(LocalHomeomorph.symm f)) ((inverse ∘ f' ∘ ↑(LocalHomeomorph.symm f)) x) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h.refine'_3\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_nhds : {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nt : Set E\nhtu : t ⊆ u ∩ {y | ∃ e, ↑e = f' y}\nht : IsOpen t\nhtf : ↑(LocalHomeomorph.symm f) a ∈ t\nx : F\nhx : x ∈ f.target ∩ ↑(LocalHomeomorph.symm f) ⁻¹' t\n⊢ HasFDerivAt (↑(LocalHomeomorph.symm f)) ((inverse ∘ f' ∘ ↑(LocalHomeomorph.symm f)) x) x\n[PROOFSTEP]\nobtain ⟨hxu, e, he⟩ := htu hx.2\n[GOAL]\ncase h.refine'_3.intro.intro\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_nhds : {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nt : Set E\nhtu : t ⊆ u ∩ {y | ∃ e, ↑e = f' y}\nht : IsOpen t\nhtf : ↑(LocalHomeomorph.symm f) a ∈ t\nx : F\nhx : x ∈ f.target ∩ ↑(LocalHomeomorph.symm f) ⁻¹' t\nhxu : ↑(LocalHomeomorph.symm f) x ∈ u\ne : E ≃L[𝕜] F\nhe : ↑e = f' (↑(LocalHomeomorph.symm f) x)\n⊢ HasFDerivAt (↑(LocalHomeomorph.symm f)) ((inverse ∘ f' ∘ ↑(LocalHomeomorph.symm f)) x) x\n[PROOFSTEP]\nhave h_deriv : HasFDerivAt f (e : E →L[𝕜] F) (f.symm x) :=\n  by\n  rw [he]\n  exact hff' (f.symm x) hxu\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_nhds : {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nt : Set E\nhtu : t ⊆ u ∩ {y | ∃ e, ↑e = f' y}\nht : IsOpen t\nhtf : ↑(LocalHomeomorph.symm f) a ∈ t\nx : F\nhx : x ∈ f.target ∩ ↑(LocalHomeomorph.symm f) ⁻¹' t\nhxu : ↑(LocalHomeomorph.symm f) x ∈ u\ne : E ≃L[𝕜] F\nhe : ↑e = f' (↑(LocalHomeomorph.symm f) x)\n⊢ HasFDerivAt (↑f) (↑e) (↑(LocalHomeomorph.symm f) x)\n[PROOFSTEP]\nrw [he]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_nhds : {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nt : Set E\nhtu : t ⊆ u ∩ {y | ∃ e, ↑e = f' y}\nht : IsOpen t\nhtf : ↑(LocalHomeomorph.symm f) a ∈ t\nx : F\nhx : x ∈ f.target ∩ ↑(LocalHomeomorph.symm f) ⁻¹' t\nhxu : ↑(LocalHomeomorph.symm f) x ∈ u\ne : E ≃L[𝕜] F\nhe : ↑e = f' (↑(LocalHomeomorph.symm f) x)\n⊢ HasFDerivAt (↑f) (f' (↑(LocalHomeomorph.symm f) x)) (↑(LocalHomeomorph.symm f) x)\n[PROOFSTEP]\nexact hff' (f.symm x) hxu\n[GOAL]\ncase h.refine'_3.intro.intro\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_nhds : {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nt : Set E\nhtu : t ⊆ u ∩ {y | ∃ e, ↑e = f' y}\nht : IsOpen t\nhtf : ↑(LocalHomeomorph.symm f) a ∈ t\nx : F\nhx : x ∈ f.target ∩ ↑(LocalHomeomorph.symm f) ⁻¹' t\nhxu : ↑(LocalHomeomorph.symm f) x ∈ u\ne : E ≃L[𝕜] F\nhe : ↑e = f' (↑(LocalHomeomorph.symm f) x)\nh_deriv : HasFDerivAt (↑f) (↑e) (↑(LocalHomeomorph.symm f) x)\n⊢ HasFDerivAt (↑(LocalHomeomorph.symm f)) ((inverse ∘ f' ∘ ↑(LocalHomeomorph.symm f)) x) x\n[PROOFSTEP]\nconvert f.hasFDerivAt_symm hx.1 h_deriv\n[GOAL]\ncase h.e'_10\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t✝ u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_nhds : {y | ∃ e, ↑e = f' y} ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nt : Set E\nhtu : t ⊆ u ∩ {y | ∃ e, ↑e = f' y}\nht : IsOpen t\nhtf : ↑(LocalHomeomorph.symm f) a ∈ t\nx : F\nhx : x ∈ f.target ∩ ↑(LocalHomeomorph.symm f) ⁻¹' t\nhxu : ↑(LocalHomeomorph.symm f) x ∈ u\ne : E ≃L[𝕜] F\nhe : ↑e = f' (↑(LocalHomeomorph.symm f) x)\nh_deriv : HasFDerivAt (↑f) (↑e) (↑(LocalHomeomorph.symm f) x)\n⊢ (inverse ∘ f' ∘ ↑(LocalHomeomorph.symm f)) x = ↑(ContinuousLinearEquiv.symm e)\n[PROOFSTEP]\nsimp [← he]\n[GOAL]\ncase hsuc.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\n⊢ ContDiffAt 𝕜 (↑n) (inverse ∘ f' ∘ ↑(LocalHomeomorph.symm f)) a\n[PROOFSTEP]\nhave h_deriv₁ : ContDiffAt 𝕜 n inverse (f' (f.symm a)) :=\n  by\n  rw [eq_f₀']\n  exact contDiffAt_map_inverse _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\n⊢ ContDiffAt 𝕜 (↑n) inverse (f' (↑(LocalHomeomorph.symm f) a))\n[PROOFSTEP]\nrw [eq_f₀']\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\n⊢ ContDiffAt 𝕜 (↑n) inverse ↑f₀'\n[PROOFSTEP]\nexact contDiffAt_map_inverse _\n[GOAL]\ncase hsuc.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_deriv₁ : ContDiffAt 𝕜 (↑n) inverse (f' (↑(LocalHomeomorph.symm f) a))\n⊢ ContDiffAt 𝕜 (↑n) (inverse ∘ f' ∘ ↑(LocalHomeomorph.symm f)) a\n[PROOFSTEP]\nhave h_deriv₂ : ContDiffAt 𝕜 n f.symm a := by\n  refine' IH (hf.of_le _)\n  norm_cast\n  exact Nat.le_succ n\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_deriv₁ : ContDiffAt 𝕜 (↑n) inverse (f' (↑(LocalHomeomorph.symm f) a))\n⊢ ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\n[PROOFSTEP]\nrefine' IH (hf.of_le _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_deriv₁ : ContDiffAt 𝕜 (↑n) inverse (f' (↑(LocalHomeomorph.symm f) a))\n⊢ ↑n ≤ ↑(Nat.succ n)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_deriv₁ : ContDiffAt 𝕜 (↑n) inverse (f' (↑(LocalHomeomorph.symm f) a))\n⊢ n ≤ Nat.succ n\n[PROOFSTEP]\nexact Nat.le_succ n\n[GOAL]\ncase hsuc.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\nIH : ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 (↑(Nat.succ n)) (↑f) (↑(LocalHomeomorph.symm f) a)\nf' : E → E →L[𝕜] F\nhf' : ContDiffAt 𝕜 (↑n) f' (↑(LocalHomeomorph.symm f) a)\nu : Set E\nhu : u ∈ 𝓝 (↑(LocalHomeomorph.symm f) a)\nhff' : ∀ (x : E), x ∈ u → HasFDerivAt (↑f) (f' x) x\neq_f₀' : f' (↑(LocalHomeomorph.symm f) a) = ↑f₀'\nh_deriv₁ : ContDiffAt 𝕜 (↑n) inverse (f' (↑(LocalHomeomorph.symm f) a))\nh_deriv₂ : ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\n⊢ ContDiffAt 𝕜 (↑n) (inverse ∘ f' ∘ ↑(LocalHomeomorph.symm f)) a\n[PROOFSTEP]\nexact (h_deriv₁.comp _ hf').comp _ h_deriv₂\n[GOAL]\ncase htop\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n (↑f) (↑(LocalHomeomorph.symm f) a)\nItop : ∀ (n : ℕ), ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 ⊤ (↑f) (↑(LocalHomeomorph.symm f) a)\n⊢ ContDiffAt 𝕜 ⊤ (↑(LocalHomeomorph.symm f)) a\n[PROOFSTEP]\nrefine' contDiffAt_top.mpr _\n[GOAL]\ncase htop\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n (↑f) (↑(LocalHomeomorph.symm f) a)\nItop : ∀ (n : ℕ), ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 ⊤ (↑f) (↑(LocalHomeomorph.symm f) a)\n⊢ ∀ (n : ℕ), ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\n[PROOFSTEP]\nintro n\n[GOAL]\ncase htop\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁰ : NormedAddCommGroup D\ninst✝⁹ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝ : CompleteSpace E\nf : LocalHomeomorph E F\nf₀' : E ≃L[𝕜] F\na : F\nha : a ∈ f.target\nhf₀' : HasFDerivAt (↑f) (↑f₀') (↑(LocalHomeomorph.symm f) a)\nhf✝ : ContDiffAt 𝕜 n✝ (↑f) (↑(LocalHomeomorph.symm f) a)\nItop : ∀ (n : ℕ), ContDiffAt 𝕜 (↑n) (↑f) (↑(LocalHomeomorph.symm f) a) → ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\nhf : ContDiffAt 𝕜 ⊤ (↑f) (↑(LocalHomeomorph.symm f) a)\nn : ℕ\n⊢ ContDiffAt 𝕜 (↑n) (↑(LocalHomeomorph.symm f)) a\n[PROOFSTEP]\nexact Itop n (contDiffAt_top.mp hf n)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹¹ : NormedAddCommGroup D\ninst✝¹⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝³ : NormedAddCommGroup X\ninst✝² : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝¹ : CompleteSpace 𝕜\nn : ℕ∞\nf : E → F →L[𝕜] G\ns : Set E\ninst✝ : FiniteDimensional 𝕜 F\n⊢ ContDiffOn 𝕜 n f s ↔ ∀ (y : F), ContDiffOn 𝕜 n (fun x => ↑(f x) y) s\n[PROOFSTEP]\nrefine' ⟨fun h y => h.clm_apply contDiffOn_const, fun h => _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹¹ : NormedAddCommGroup D\ninst✝¹⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝³ : NormedAddCommGroup X\ninst✝² : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝¹ : CompleteSpace 𝕜\nn : ℕ∞\nf : E → F →L[𝕜] G\ns : Set E\ninst✝ : FiniteDimensional 𝕜 F\nh : ∀ (y : F), ContDiffOn 𝕜 n (fun x => ↑(f x) y) s\n⊢ ContDiffOn 𝕜 n f s\n[PROOFSTEP]\nlet d := finrank 𝕜 F\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹¹ : NormedAddCommGroup D\ninst✝¹⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝³ : NormedAddCommGroup X\ninst✝² : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝¹ : CompleteSpace 𝕜\nn : ℕ∞\nf : E → F →L[𝕜] G\ns : Set E\ninst✝ : FiniteDimensional 𝕜 F\nh : ∀ (y : F), ContDiffOn 𝕜 n (fun x => ↑(f x) y) s\nd : ℕ := finrank 𝕜 F\n⊢ ContDiffOn 𝕜 n f s\n[PROOFSTEP]\nhave hd : d = finrank 𝕜 (Fin d → 𝕜) := (finrank_fin_fun 𝕜).symm\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹¹ : NormedAddCommGroup D\ninst✝¹⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝³ : NormedAddCommGroup X\ninst✝² : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝¹ : CompleteSpace 𝕜\nn : ℕ∞\nf : E → F →L[𝕜] G\ns : Set E\ninst✝ : FiniteDimensional 𝕜 F\nh : ∀ (y : F), ContDiffOn 𝕜 n (fun x => ↑(f x) y) s\nd : ℕ := finrank 𝕜 F\nhd : d = finrank 𝕜 (Fin d → 𝕜)\n⊢ ContDiffOn 𝕜 n f s\n[PROOFSTEP]\nlet e₁ := ContinuousLinearEquiv.ofFinrankEq hd\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹¹ : NormedAddCommGroup D\ninst✝¹⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝³ : NormedAddCommGroup X\ninst✝² : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝¹ : CompleteSpace 𝕜\nn : ℕ∞\nf : E → F →L[𝕜] G\ns : Set E\ninst✝ : FiniteDimensional 𝕜 F\nh : ∀ (y : F), ContDiffOn 𝕜 n (fun x => ↑(f x) y) s\nd : ℕ := finrank 𝕜 F\nhd : d = finrank 𝕜 (Fin d → 𝕜)\ne₁ : F ≃L[𝕜] Fin d → 𝕜 := ContinuousLinearEquiv.ofFinrankEq hd\n⊢ ContDiffOn 𝕜 n f s\n[PROOFSTEP]\nlet e₂ := (e₁.arrowCongr (1 : G ≃L[𝕜] G)).trans (ContinuousLinearEquiv.piRing (Fin d))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹¹ : NormedAddCommGroup D\ninst✝¹⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝³ : NormedAddCommGroup X\ninst✝² : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝¹ : CompleteSpace 𝕜\nn : ℕ∞\nf : E → F →L[𝕜] G\ns : Set E\ninst✝ : FiniteDimensional 𝕜 F\nh : ∀ (y : F), ContDiffOn 𝕜 n (fun x => ↑(f x) y) s\nd : ℕ := finrank 𝕜 F\nhd : d = finrank 𝕜 (Fin d → 𝕜)\ne₁ : F ≃L[𝕜] Fin d → 𝕜 := ContinuousLinearEquiv.ofFinrankEq hd\ne₂ : (F →L[𝕜] G) ≃L[𝕜] Fin d → G :=\n  ContinuousLinearEquiv.trans (ContinuousLinearEquiv.arrowCongr e₁ 1) (ContinuousLinearEquiv.piRing (Fin d))\n⊢ ContDiffOn 𝕜 n f s\n[PROOFSTEP]\nrw [← comp.left_id f, ← e₂.symm_comp_self]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹¹ : NormedAddCommGroup D\ninst✝¹⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝³ : NormedAddCommGroup X\ninst✝² : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝¹ : CompleteSpace 𝕜\nn : ℕ∞\nf : E → F →L[𝕜] G\ns : Set E\ninst✝ : FiniteDimensional 𝕜 F\nh : ∀ (y : F), ContDiffOn 𝕜 n (fun x => ↑(f x) y) s\nd : ℕ := finrank 𝕜 F\nhd : d = finrank 𝕜 (Fin d → 𝕜)\ne₁ : F ≃L[𝕜] Fin d → 𝕜 := ContinuousLinearEquiv.ofFinrankEq hd\ne₂ : (F →L[𝕜] G) ≃L[𝕜] Fin d → G :=\n  ContinuousLinearEquiv.trans (ContinuousLinearEquiv.arrowCongr e₁ 1) (ContinuousLinearEquiv.piRing (Fin d))\n⊢ ContDiffOn 𝕜 n ((↑(ContinuousLinearEquiv.symm e₂) ∘ ↑e₂) ∘ f) s\n[PROOFSTEP]\nexact e₂.symm.contDiff.comp_contDiffOn (contDiffOn_pi.mpr fun i => h _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹¹ : NormedAddCommGroup D\ninst✝¹⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝³ : NormedAddCommGroup X\ninst✝² : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝¹ : CompleteSpace 𝕜\nn : ℕ∞\nf : E → F →L[𝕜] G\ninst✝ : FiniteDimensional 𝕜 F\n⊢ ContDiff 𝕜 n f ↔ ∀ (y : F), ContDiff 𝕜 n fun x => ↑(f x) y\n[PROOFSTEP]\nsimp_rw [← contDiffOn_univ, contDiffOn_clm_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹¹ : NormedAddCommGroup D\ninst✝¹⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝³ : NormedAddCommGroup X\ninst✝² : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝¹ : CompleteSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\nn : ℕ\nf : E → F\n⊢ ContDiff 𝕜 (↑(n + 1)) f ↔ Differentiable 𝕜 f ∧ ∀ (y : E), ContDiff 𝕜 ↑n fun x => ↑(fderiv 𝕜 f x) y\n[PROOFSTEP]\nrw [contDiff_succ_iff_fderiv, contDiff_clm_apply_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹¹ : NormedAddCommGroup D\ninst✝¹⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝³ : NormedAddCommGroup X\ninst✝² : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ninst✝¹ : CompleteSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\nn : ℕ\nf : E → F\ns : Set E\nhs : UniqueDiffOn 𝕜 s\n⊢ ContDiffOn 𝕜 (↑(n + 1)) f s ↔\n    DifferentiableOn 𝕜 f s ∧ ∀ (y : E), ContDiffOn 𝕜 (↑n) (fun x => ↑(fderivWithin 𝕜 f s x) y) s\n[PROOFSTEP]\nrw [contDiffOn_succ_iff_fderivWithin hs, contDiffOn_clm_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁴ : NormedAddCommGroup D\ninst✝¹³ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁶ : NormedAddCommGroup X\ninst✝⁵ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\n𝕂 : Type u_3\ninst✝⁴ : IsROrC 𝕂\nE' : Type u_4\ninst✝³ : NormedAddCommGroup E'\ninst✝² : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝¹ : NormedAddCommGroup F'\ninst✝ : NormedSpace 𝕂 F'\nf : E' → F'\nf' : E' →L[𝕂] F'\nx : E'\nhf : ContDiffAt 𝕂 n f x\nhf' : HasFDerivAt f f' x\nhn : 1 ≤ n\n⊢ HasStrictFDerivAt f f' x\n[PROOFSTEP]\nrcases hf 1 hn with ⟨u, H, p, hp⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁴ : NormedAddCommGroup D\ninst✝¹³ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁶ : NormedAddCommGroup X\ninst✝⁵ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np✝ : E → FormalMultilinearSeries 𝕜 E F\n𝕂 : Type u_3\ninst✝⁴ : IsROrC 𝕂\nE' : Type u_4\ninst✝³ : NormedAddCommGroup E'\ninst✝² : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝¹ : NormedAddCommGroup F'\ninst✝ : NormedSpace 𝕂 F'\nf : E' → F'\nf' : E' →L[𝕂] F'\nx : E'\nhf : ContDiffAt 𝕂 n f x\nhf' : HasFDerivAt f f' x\nhn : 1 ≤ n\nu : Set E'\nH : u ∈ 𝓝[insert x univ] x\np : E' → FormalMultilinearSeries 𝕂 E' F'\nhp : HasFTaylorSeriesUpToOn (↑1) f p u\n⊢ HasStrictFDerivAt f f' x\n[PROOFSTEP]\nsimp only [nhdsWithin_univ, mem_univ, insert_eq_of_mem] at H \n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁴ : NormedAddCommGroup D\ninst✝¹³ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁶ : NormedAddCommGroup X\ninst✝⁵ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np✝ : E → FormalMultilinearSeries 𝕜 E F\n𝕂 : Type u_3\ninst✝⁴ : IsROrC 𝕂\nE' : Type u_4\ninst✝³ : NormedAddCommGroup E'\ninst✝² : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝¹ : NormedAddCommGroup F'\ninst✝ : NormedSpace 𝕂 F'\nf : E' → F'\nf' : E' →L[𝕂] F'\nx : E'\nhf : ContDiffAt 𝕂 n f x\nhf' : HasFDerivAt f f' x\nhn : 1 ≤ n\nu : Set E'\np : E' → FormalMultilinearSeries 𝕂 E' F'\nhp : HasFTaylorSeriesUpToOn (↑1) f p u\nH : u ∈ 𝓝 x\n⊢ HasStrictFDerivAt f f' x\n[PROOFSTEP]\nhave := hp.hasStrictFDerivAt le_rfl H\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁴ : NormedAddCommGroup D\ninst✝¹³ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁶ : NormedAddCommGroup X\ninst✝⁵ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np✝ : E → FormalMultilinearSeries 𝕜 E F\n𝕂 : Type u_3\ninst✝⁴ : IsROrC 𝕂\nE' : Type u_4\ninst✝³ : NormedAddCommGroup E'\ninst✝² : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝¹ : NormedAddCommGroup F'\ninst✝ : NormedSpace 𝕂 F'\nf : E' → F'\nf' : E' →L[𝕂] F'\nx : E'\nhf : ContDiffAt 𝕂 n f x\nhf' : HasFDerivAt f f' x\nhn : 1 ≤ n\nu : Set E'\np : E' → FormalMultilinearSeries 𝕂 E' F'\nhp : HasFTaylorSeriesUpToOn (↑1) f p u\nH : u ∈ 𝓝 x\nthis : HasStrictFDerivAt f (↑(continuousMultilinearCurryFin1 𝕂 E' F') (p x 1)) x\n⊢ HasStrictFDerivAt f f' x\n[PROOFSTEP]\nrwa [hf'.unique this.hasFDerivAt]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\np : E → FormalMultilinearSeries ℝ E F\ns : Set E\nx : E\nhf : HasFTaylorSeriesUpToOn 1 f p (insert x s)\nhs : Convex ℝ s\nK : ℝ≥0\nhK : ‖p x 1‖₊ < K\n⊢ ∃ t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nset f' := fun y => continuousMultilinearCurryFin1 ℝ E F (p y 1)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\np : E → FormalMultilinearSeries ℝ E F\ns : Set E\nx : E\nhf : HasFTaylorSeriesUpToOn 1 f p (insert x s)\nhs : Convex ℝ s\nK : ℝ≥0\nhK : ‖p x 1‖₊ < K\nf' : E → E →L[ℝ] F := fun y => ↑(continuousMultilinearCurryFin1 ℝ E F) (p y 1)\n⊢ ∃ t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nhave hder : ∀ y ∈ s, HasFDerivWithinAt f (f' y) s y := fun y hy =>\n  (hf.hasFDerivWithinAt le_rfl (subset_insert x s hy)).mono (subset_insert x s)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\np : E → FormalMultilinearSeries ℝ E F\ns : Set E\nx : E\nhf : HasFTaylorSeriesUpToOn 1 f p (insert x s)\nhs : Convex ℝ s\nK : ℝ≥0\nhK : ‖p x 1‖₊ < K\nf' : E → E →L[ℝ] F := fun y => ↑(continuousMultilinearCurryFin1 ℝ E F) (p y 1)\nhder : ∀ (y : E), y ∈ s → HasFDerivWithinAt f (f' y) s y\n⊢ ∃ t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nhave hcont : ContinuousWithinAt f' s x :=\n  (continuousMultilinearCurryFin1 ℝ E F).continuousAt.comp_continuousWithinAt\n    ((hf.cont _ le_rfl _ (mem_insert _ _)).mono (subset_insert x s))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\np : E → FormalMultilinearSeries ℝ E F\ns : Set E\nx : E\nhf : HasFTaylorSeriesUpToOn 1 f p (insert x s)\nhs : Convex ℝ s\nK : ℝ≥0\nhK : ‖p x 1‖₊ < K\nf' : E → E →L[ℝ] F := fun y => ↑(continuousMultilinearCurryFin1 ℝ E F) (p y 1)\nhder : ∀ (y : E), y ∈ s → HasFDerivWithinAt f (f' y) s y\nhcont : ContinuousWithinAt f' s x\n⊢ ∃ t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nreplace hK : ‖f' x‖₊ < K\n[GOAL]\ncase hK\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\np : E → FormalMultilinearSeries ℝ E F\ns : Set E\nx : E\nhf : HasFTaylorSeriesUpToOn 1 f p (insert x s)\nhs : Convex ℝ s\nK : ℝ≥0\nhK : ‖p x 1‖₊ < K\nf' : E → E →L[ℝ] F := fun y => ↑(continuousMultilinearCurryFin1 ℝ E F) (p y 1)\nhder : ∀ (y : E), y ∈ s → HasFDerivWithinAt f (f' y) s y\nhcont : ContinuousWithinAt f' s x\n⊢ ‖f' x‖₊ < K\n[PROOFSTEP]\nsimpa only [LinearIsometryEquiv.nnnorm_map]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\np : E → FormalMultilinearSeries ℝ E F\ns : Set E\nx : E\nhf : HasFTaylorSeriesUpToOn 1 f p (insert x s)\nhs : Convex ℝ s\nK : ℝ≥0\nf' : E → E →L[ℝ] F := fun y => ↑(continuousMultilinearCurryFin1 ℝ E F) (p y 1)\nhder : ∀ (y : E), y ∈ s → HasFDerivWithinAt f (f' y) s y\nhcont : ContinuousWithinAt f' s x\nhK : ‖f' x‖₊ < K\n⊢ ∃ t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nexact\n  hs.exists_nhdsWithin_lipschitzOnWith_of_hasFDerivWithinAt_of_nnnorm_lt\n    (eventually_nhdsWithin_iff.2 <| eventually_of_forall hder) hcont K hK\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nhf : ContDiffWithinAt ℝ 1 f s x\nhs : Convex ℝ s\n⊢ ∃ K t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nrcases hf 1 le_rfl with ⟨t, hst, p, hp⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nhf : ContDiffWithinAt ℝ 1 f s x\nhs : Convex ℝ s\nt : Set E\nhst : t ∈ 𝓝[insert x s] x\np : E → FormalMultilinearSeries ℝ E F\nhp : HasFTaylorSeriesUpToOn (↑1) f p t\n⊢ ∃ K t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nrcases Metric.mem_nhdsWithin_iff.mp hst with ⟨ε, ε0, hε⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nhf : ContDiffWithinAt ℝ 1 f s x\nhs : Convex ℝ s\nt : Set E\nhst : t ∈ 𝓝[insert x s] x\np : E → FormalMultilinearSeries ℝ E F\nhp : HasFTaylorSeriesUpToOn (↑1) f p t\nε : ℝ\nε0 : ε > 0\nhε : Metric.ball x ε ∩ insert x s ⊆ t\n⊢ ∃ K t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nreplace hp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x ε ∩ insert x s) := hp.mono hε\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nhf : ContDiffWithinAt ℝ 1 f s x\nhs : Convex ℝ s\nt : Set E\nhst : t ∈ 𝓝[insert x s] x\np : E → FormalMultilinearSeries ℝ E F\nε : ℝ\nε0 : ε > 0\nhε : Metric.ball x ε ∩ insert x s ⊆ t\nhp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x ε ∩ insert x s)\n⊢ ∃ K t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nclear hst hε t\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nhf : ContDiffWithinAt ℝ 1 f s x\nhs : Convex ℝ s\np : E → FormalMultilinearSeries ℝ E F\nε : ℝ\nε0 : ε > 0\nhp : HasFTaylorSeriesUpToOn 1 f p (Metric.ball x ε ∩ insert x s)\n⊢ ∃ K t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nrw [← insert_eq_of_mem (Metric.mem_ball_self ε0), ← insert_inter_distrib] at hp \n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nhf : ContDiffWithinAt ℝ 1 f s x\nhs : Convex ℝ s\np : E → FormalMultilinearSeries ℝ E F\nε : ℝ\nε0 : ε > 0\nhp : HasFTaylorSeriesUpToOn 1 f p (insert x (Metric.ball x ε ∩ s))\n⊢ ∃ K t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nrcases hp.exists_lipschitzOnWith ((convex_ball _ _).inter hs) with ⟨K, t, hst, hft⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nhf : ContDiffWithinAt ℝ 1 f s x\nhs : Convex ℝ s\np : E → FormalMultilinearSeries ℝ E F\nε : ℝ\nε0 : ε > 0\nhp : HasFTaylorSeriesUpToOn 1 f p (insert x (Metric.ball x ε ∩ s))\nK : ℝ≥0\nt : Set E\nhst : t ∈ 𝓝[Metric.ball x ε ∩ s] x\nhft : LipschitzOnWith K f t\n⊢ ∃ K t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nrw [inter_comm, ← nhdsWithin_restrict' _ (Metric.ball_mem_nhds _ ε0)] at hst \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁹ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁸ : NormedAddCommGroup D\ninst✝¹⁷ : NormedSpace 𝕜 D\nE✝ : Type uE\ninst✝¹⁶ : NormedAddCommGroup E✝\ninst✝¹⁵ : NormedSpace 𝕜 E✝\nF✝ : Type uF\ninst✝¹⁴ : NormedAddCommGroup F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\nG : Type uG\ninst✝¹² : NormedAddCommGroup G\ninst✝¹¹ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁰ : NormedAddCommGroup X\ninst✝⁹ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E✝\nf✝ f₁ : E✝ → F✝\ng : F✝ → G\nx✝ x₀ : E✝\nc : F✝\nb : E✝ × F✝ → G\nm n : ℕ∞\np✝ : E✝ → FormalMultilinearSeries 𝕜 E✝ F✝\n𝕂 : Type u_3\ninst✝⁸ : IsROrC 𝕂\nE' : Type u_4\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedSpace 𝕂 E'\nF' : Type u_5\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : NormedSpace 𝕂 F'\nE : Type u_6\nF : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nhf : ContDiffWithinAt ℝ 1 f s x\nhs : Convex ℝ s\np : E → FormalMultilinearSeries ℝ E F\nε : ℝ\nε0 : ε > 0\nhp : HasFTaylorSeriesUpToOn 1 f p (insert x (Metric.ball x ε ∩ s))\nK : ℝ≥0\nt : Set E\nhst : t ∈ 𝓝[s] x\nhft : LipschitzOnWith K f t\n⊢ ∃ K t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nexact ⟨K, t, hst, hft⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\n⊢ ContDiffOn 𝕜 (↑(n + 1)) f₂ s₂ ↔ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nrw [contDiffOn_succ_iff_fderivWithin hs, and_congr_right_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\n⊢ DifferentiableOn 𝕜 f₂ s₂ →\n    (ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f₂ s₂ y) s₂ ↔ ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂)\n[PROOFSTEP]\nintro _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\n⊢ ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f₂ s₂ y) s₂ ↔ ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\n⊢ ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f₂ s₂ y) s₂ → ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f₂ s₂ y) s₂\n⊢ ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nhave : derivWithin f₂ s₂ = (fun u : 𝕜 →L[𝕜] F => u 1) ∘ fderivWithin 𝕜 f₂ s₂\n[GOAL]\ncase this\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f₂ s₂ y) s₂\n⊢ derivWithin f₂ s₂ = (fun u => ↑u 1) ∘ fderivWithin 𝕜 f₂ s₂\n[PROOFSTEP]\next x\n[GOAL]\ncase this.h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f₂ s₂ y) s₂\nx : 𝕜\n⊢ derivWithin f₂ s₂ x = ((fun u => ↑u 1) ∘ fderivWithin 𝕜 f₂ s₂) x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mp\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f₂ s₂ y) s₂\nthis : derivWithin f₂ s₂ = (fun u => ↑u 1) ∘ fderivWithin 𝕜 f₂ s₂\n⊢ ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\ncase mp\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f₂ s₂ y) s₂\nthis : derivWithin f₂ s₂ = (fun u => ↑u 1) ∘ fderivWithin 𝕜 f₂ s₂\n⊢ ContDiffOn 𝕜 (↑n) ((fun u => ↑u 1) ∘ fderivWithin 𝕜 f₂ s₂) s₂\n[PROOFSTEP]\napply ContDiff.comp_contDiffOn _ h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f₂ s₂ y) s₂\nthis : derivWithin f₂ s₂ = (fun u => ↑u 1) ∘ fderivWithin 𝕜 f₂ s₂\n⊢ ContDiff 𝕜 ↑n fun u => ↑u 1\n[PROOFSTEP]\nexact (isBoundedBilinearMapApply.isBoundedLinearMap_left _).contDiff\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\n⊢ ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂ → ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f₂ s₂ y) s₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂\n⊢ ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f₂ s₂ y) s₂\n[PROOFSTEP]\nhave : fderivWithin 𝕜 f₂ s₂ = smulRight (1 : 𝕜 →L[𝕜] 𝕜) ∘ derivWithin f₂ s₂\n[GOAL]\ncase this\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂\n⊢ fderivWithin 𝕜 f₂ s₂ = smulRight 1 ∘ derivWithin f₂ s₂\n[PROOFSTEP]\next x\n[GOAL]\ncase this.h.h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂\nx : 𝕜\n⊢ ↑(fderivWithin 𝕜 f₂ s₂ x) 1 = ↑((smulRight 1 ∘ derivWithin f₂ s₂) x) 1\n[PROOFSTEP]\nsimp [derivWithin]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂\nthis : fderivWithin 𝕜 f₂ s₂ = smulRight 1 ∘ derivWithin f₂ s₂\n⊢ ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f₂ s₂ y) s₂\n[PROOFSTEP]\nsimp only [this]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂\nthis : fderivWithin 𝕜 f₂ s₂ = smulRight 1 ∘ derivWithin f₂ s₂\n⊢ ContDiffOn 𝕜 (↑n) (fun y => (smulRight 1 ∘ derivWithin f₂ s₂) y) s₂\n[PROOFSTEP]\napply ContDiff.comp_contDiffOn _ h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂\nthis : fderivWithin 𝕜 f₂ s₂ = smulRight 1 ∘ derivWithin f₂ s₂\n⊢ ContDiff 𝕜 (↑n) (smulRight 1)\n[PROOFSTEP]\nhave : IsBoundedBilinearMap 𝕜 fun _ : (𝕜 →L[𝕜] 𝕜) × F => _ := isBoundedBilinearMap_smulRight\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : UniqueDiffOn 𝕜 s₂\na✝ : DifferentiableOn 𝕜 f₂ s₂\nh : ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂\nthis✝ : fderivWithin 𝕜 f₂ s₂ = smulRight 1 ∘ derivWithin f₂ s₂\nthis : IsBoundedBilinearMap 𝕜 fun x => smulRight x.fst x.snd\n⊢ ContDiff 𝕜 (↑n) (smulRight 1)\n[PROOFSTEP]\nexact (this.isBoundedLinearMap_right _).contDiff\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : IsOpen s₂\n⊢ ContDiffOn 𝕜 (↑(n + 1)) f₂ s₂ ↔ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 (↑n) (deriv f₂) s₂\n[PROOFSTEP]\nrw [contDiffOn_succ_iff_derivWithin hs.uniqueDiffOn]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\nhs : IsOpen s₂\n⊢ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂ ↔\n    DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 (↑n) (deriv f₂) s₂\n[PROOFSTEP]\nexact Iff.rfl.and (contDiffOn_congr fun _ => derivWithin_of_open hs)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhs : UniqueDiffOn 𝕜 s₂\n⊢ ContDiffOn 𝕜 ⊤ f₂ s₂ ↔ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ⊤ (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhs : UniqueDiffOn 𝕜 s₂\n⊢ ContDiffOn 𝕜 ⊤ f₂ s₂ → DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ⊤ (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhs : UniqueDiffOn 𝕜 s₂\nh : ContDiffOn 𝕜 ⊤ f₂ s₂\n⊢ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ⊤ (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nrefine' ⟨h.differentiableOn le_top, _⟩\n[GOAL]\ncase mp\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhs : UniqueDiffOn 𝕜 s₂\nh : ContDiffOn 𝕜 ⊤ f₂ s₂\n⊢ ContDiffOn 𝕜 ⊤ (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nrefine contDiffOn_top.2 fun n => ((contDiffOn_succ_iff_derivWithin hs).1 ?_).2\n[GOAL]\ncase mp\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhs : UniqueDiffOn 𝕜 s₂\nh : ContDiffOn 𝕜 ⊤ f₂ s₂\nn : ℕ\n⊢ ContDiffOn 𝕜 (↑(n + 1)) f₂ s₂\n[PROOFSTEP]\nexact h.of_le le_top\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhs : UniqueDiffOn 𝕜 s₂\n⊢ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ⊤ (derivWithin f₂ s₂) s₂ → ContDiffOn 𝕜 ⊤ f₂ s₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhs : UniqueDiffOn 𝕜 s₂\nh : DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ⊤ (derivWithin f₂ s₂) s₂\n⊢ ContDiffOn 𝕜 ⊤ f₂ s₂\n[PROOFSTEP]\nrefine' contDiffOn_top.2 fun n => _\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhs : UniqueDiffOn 𝕜 s₂\nh : DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ⊤ (derivWithin f₂ s₂) s₂\nn : ℕ\n⊢ ContDiffOn 𝕜 (↑n) f₂ s₂\n[PROOFSTEP]\nhave A : (n : ℕ∞) ≤ ∞ := le_top\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhs : UniqueDiffOn 𝕜 s₂\nh : DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ⊤ (derivWithin f₂ s₂) s₂\nn : ℕ\nA : ↑n ≤ ⊤\n⊢ ContDiffOn 𝕜 (↑n) f₂ s₂\n[PROOFSTEP]\napply ((contDiffOn_succ_iff_derivWithin hs).2 ⟨h.1, h.2.of_le A⟩).of_le\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhs : UniqueDiffOn 𝕜 s₂\nh : DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ⊤ (derivWithin f₂ s₂) s₂\nn : ℕ\nA : ↑n ≤ ⊤\n⊢ ↑n ≤ ↑(n + 1)\n[PROOFSTEP]\nexact WithTop.coe_le_coe.2 (Nat.le_succ n)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhs : IsOpen s₂\n⊢ ContDiffOn 𝕜 ⊤ f₂ s₂ ↔ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ⊤ (deriv f₂) s₂\n[PROOFSTEP]\nrw [contDiffOn_top_iff_derivWithin hs.uniqueDiffOn]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhs : IsOpen s₂\n⊢ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ⊤ (derivWithin f₂ s₂) s₂ ↔\n    DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ⊤ (deriv f₂) s₂\n[PROOFSTEP]\nexact Iff.rfl.and <| contDiffOn_congr fun _ => derivWithin_of_open hs\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhf : ContDiffOn 𝕜 n f₂ s₂\nhs : UniqueDiffOn 𝕜 s₂\nhmn : m + 1 ≤ n\n⊢ ContDiffOn 𝕜 m (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\ncases m\n[GOAL]\ncase none\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nn : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhf : ContDiffOn 𝕜 n f₂ s₂\nhs : UniqueDiffOn 𝕜 s₂\nhmn : none + 1 ≤ n\n⊢ ContDiffOn 𝕜 none (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nchange ∞ + 1 ≤ n at hmn \n[GOAL]\ncase none\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nn : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhf : ContDiffOn 𝕜 n f₂ s₂\nhs : UniqueDiffOn 𝕜 s₂\nhmn : ⊤ + 1 ≤ n\n⊢ ContDiffOn 𝕜 none (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nhave : n = ∞ := by simpa using hmn\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nn : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhf : ContDiffOn 𝕜 n f₂ s₂\nhs : UniqueDiffOn 𝕜 s₂\nhmn : ⊤ + 1 ≤ n\n⊢ n = ⊤\n[PROOFSTEP]\nsimpa using hmn\n[GOAL]\ncase none\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nn : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhf : ContDiffOn 𝕜 n f₂ s₂\nhs : UniqueDiffOn 𝕜 s₂\nhmn : ⊤ + 1 ≤ n\nthis : n = ⊤\n⊢ ContDiffOn 𝕜 none (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nrw [this] at hf \n[GOAL]\ncase none\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nn : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhf : ContDiffOn 𝕜 ⊤ f₂ s₂\nhs : UniqueDiffOn 𝕜 s₂\nhmn : ⊤ + 1 ≤ n\nthis : n = ⊤\n⊢ ContDiffOn 𝕜 none (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nexact ((contDiffOn_top_iff_derivWithin hs).1 hf).2\n[GOAL]\ncase some\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nn : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhf : ContDiffOn 𝕜 n f₂ s₂\nhs : UniqueDiffOn 𝕜 s₂\nval✝ : ℕ\nhmn : some val✝ + 1 ≤ n\n⊢ ContDiffOn 𝕜 (some val✝) (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nchange (Nat.succ _ : ℕ∞) ≤ n at hmn \n[GOAL]\ncase some\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nn : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nhf : ContDiffOn 𝕜 n f₂ s₂\nhs : UniqueDiffOn 𝕜 s₂\nval✝ : ℕ\nhmn : ↑(Nat.succ val✝) ≤ n\n⊢ ContDiffOn 𝕜 (some val✝) (derivWithin f₂ s₂) s₂\n[PROOFSTEP]\nexact ((contDiffOn_succ_iff_derivWithin hs).1 (hf.of_le hmn)).2\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\nn : ℕ\n⊢ ContDiff 𝕜 (↑(n + 1)) f₂ ↔ Differentiable 𝕜 f₂ ∧ ContDiff 𝕜 (↑n) (deriv f₂)\n[PROOFSTEP]\nsimp only [← contDiffOn_univ, contDiffOn_succ_iff_deriv_of_open, isOpen_univ, differentiableOn_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\n⊢ ContDiff 𝕜 ⊤ f₂ ↔ Differentiable 𝕜 f₂ ∧ ContDiff 𝕜 ⊤ (deriv f₂)\n[PROOFSTEP]\nsimp only [← contDiffOn_univ, ← differentiableOn_univ, ← derivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf₂ : 𝕜 → F\ns₂ : Set 𝕜\n⊢ ContDiffOn 𝕜 ⊤ f₂ univ ↔ DifferentiableOn 𝕜 f₂ univ ∧ ContDiffOn 𝕜 ⊤ (derivWithin f₂ univ) univ\n[PROOFSTEP]\nrw [contDiffOn_top_iff_derivWithin uniqueDiffOn_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁵ : NormedAddCommGroup D\ninst✝¹⁴ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\n𝕜' : Type u_3\ninst✝⁵ : NontriviallyNormedField 𝕜'\ninst✝⁴ : NormedAlgebra 𝕜 𝕜'\ninst✝³ : NormedSpace 𝕜' E\ninst✝² : IsScalarTower 𝕜 𝕜' E\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : IsScalarTower 𝕜 𝕜' F\np' : E → FormalMultilinearSeries 𝕜' E F\nh : HasFTaylorSeriesUpToOn n f p' s\nm : ℕ\nhm : ↑m < n\nx : E\nhx : x ∈ s\n⊢ HasFDerivWithinAt (fun x => FormalMultilinearSeries.restrictScalars 𝕜 (p' x) m)\n    (ContinuousMultilinearMap.curryLeft (FormalMultilinearSeries.restrictScalars 𝕜 (p' x) (Nat.succ m))) s x\n[PROOFSTEP]\nsimpa only using\n  -- porting note: added `by simpa only using`(ContinuousMultilinearMap.restrictScalarsLinear\n          𝕜).hasFDerivAt.comp_hasFDerivWithinAt\n      x <|\n    (h.fderivWithin m hm x hx).restrictScalars 𝕜\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁵ : NormedAddCommGroup D\ninst✝¹⁴ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\n𝕜' : Type u_3\ninst✝⁵ : NontriviallyNormedField 𝕜'\ninst✝⁴ : NormedAlgebra 𝕜 𝕜'\ninst✝³ : NormedSpace 𝕜' E\ninst✝² : IsScalarTower 𝕜 𝕜' E\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : IsScalarTower 𝕜 𝕜' F\np' : E → FormalMultilinearSeries 𝕜' E F\nh : ContDiffWithinAt 𝕜' n f s x\nm : ℕ\nhm : ↑m ≤ n\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) f p u\n[PROOFSTEP]\nrcases h m hm with ⟨u, u_mem, p', hp'⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁵ : NormedAddCommGroup D\ninst✝¹⁴ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns s₁ t u✝ : Set E\nf f₁ : E → F\ng : F → G\nx x₀ : E\nc : F\nb : E × F → G\nm✝ n : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\n𝕜' : Type u_3\ninst✝⁵ : NontriviallyNormedField 𝕜'\ninst✝⁴ : NormedAlgebra 𝕜 𝕜'\ninst✝³ : NormedSpace 𝕜' E\ninst✝² : IsScalarTower 𝕜 𝕜' E\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : IsScalarTower 𝕜 𝕜' F\np'✝ : E → FormalMultilinearSeries 𝕜' E F\nh : ContDiffWithinAt 𝕜' n f s x\nm : ℕ\nhm : ↑m ≤ n\nu : Set E\nu_mem : u ∈ 𝓝[insert x s] x\np' : E → FormalMultilinearSeries 𝕜' E F\nhp' : HasFTaylorSeriesUpToOn (↑m) f p' u\n⊢ ∃ u, u ∈ 𝓝[insert x s] x ∧ ∃ p, HasFTaylorSeriesUpToOn (↑m) f p u\n[PROOFSTEP]\nexact ⟨u, u_mem, _, hp'.restrictScalars _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹⁷ : NormedAddCommGroup D\ninst✝¹⁶ : NormedSpace 𝕜 D\nE : Type uE\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹¹ : NormedAddCommGroup G\ninst✝¹⁰ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁹ : NormedAddCommGroup X\ninst✝⁸ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu Fu Gu : Type u\ninst✝⁷ : NormedAddCommGroup Du\ninst✝⁶ : NormedSpace 𝕜 Du\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nn : ℕ\ns : Set Du\nx : Du\nhf : ContDiffOn 𝕜 (↑n) f s\nhg : ContDiffOn 𝕜 (↑n) g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\ninduction' n with n IH generalizing Eu Fu Gu\n[GOAL]\ncase zero\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑Nat.zero) f s\nhg : ContDiffOn 𝕜 (↑Nat.zero) g s\n⊢ ‖iteratedFDerivWithin 𝕜 Nat.zero (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.zero + 1),\n        ↑(Nat.choose Nat.zero i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (Nat.zero - i) g s x‖\n[PROOFSTEP]\nsimp only [Nat.zero_eq, norm_iteratedFDerivWithin_zero, zero_add, Finset.range_one, Finset.sum_singleton,\n  Nat.choose_self, Nat.cast_one, one_mul, Nat.sub_zero, ← mul_assoc]\n[GOAL]\ncase zero\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑Nat.zero) f s\nhg : ContDiffOn 𝕜 (↑Nat.zero) g s\n⊢ ‖↑(↑B (f x)) (g x)‖ ≤ ‖B‖ * ‖f x‖ * ‖g x‖\n[PROOFSTEP]\napply B.le_op_norm₂\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (Nat.succ n - i) g s x‖\n[PROOFSTEP]\nhave In : (n : ℕ∞) + 1 ≤ n.succ := by\n  simp only [Nat.cast_succ, le_refl]\n    -- Porting note: the next line is a hack allowing Lean to find the operator norm instance.\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\n⊢ ↑n + 1 ≤ ↑(Nat.succ n)\n[PROOFSTEP]\nsimp only [Nat.cast_succ, le_refl]\n  -- Porting note: the next line is a hack allowing Lean to find the operator norm instance.\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (Nat.succ n - i) g s x‖\n[PROOFSTEP]\nlet norm := @ContinuousLinearMap.hasOpNorm _ _ Eu ((Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) _ _ _ _ _ _ (RingHom.id 𝕜)\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (Nat.succ n - i) g s x‖\n[PROOFSTEP]\nhave I1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y : Du => B.precompR Du (f y) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i : ℕ in Finset.range (n + 1),\n        n.choose i * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖ :=\n  by\n  calc\n    ‖iteratedFDerivWithin 𝕜 n (fun y : Du => B.precompR Du (f y) (fderivWithin 𝕜 g s y)) s x‖ ≤\n        ‖B.precompR Du‖ *\n          ∑ i : ℕ in Finset.range (n + 1),\n            n.choose i * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 g s) s x‖ :=\n      IH _ (hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderivWithin hs In)\n    _ ≤\n        ‖B‖ *\n          ∑ i : ℕ in Finset.range (n + 1),\n            n.choose i * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 g s) s x‖ :=\n      (mul_le_mul_of_nonneg_right (B.norm_precompR_le Du) (Finset.sum_nonneg' fun i => by positivity))\n    _ = _ := by\n      congr 1\n      apply Finset.sum_congr rfl fun i hi => ?_\n      rw [Nat.succ_sub (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)), ← norm_iteratedFDerivWithin_fderivWithin hs hx]\n        -- Porting note: the next line is a hack allowing Lean to find the operator norm instance.\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\n[PROOFSTEP]\ncalc\n  ‖iteratedFDerivWithin 𝕜 n (fun y : Du => B.precompR Du (f y) (fderivWithin 𝕜 g s y)) s x‖ ≤\n      ‖B.precompR Du‖ *\n        ∑ i : ℕ in Finset.range (n + 1),\n          n.choose i * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 g s) s x‖ :=\n    IH _ (hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderivWithin hs In)\n  _ ≤\n      ‖B‖ *\n        ∑ i : ℕ in Finset.range (n + 1),\n          n.choose i * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 g s) s x‖ :=\n    (mul_le_mul_of_nonneg_right (B.norm_precompR_le Du) (Finset.sum_nonneg' fun i => by positivity))\n  _ = _ := by\n    congr 1\n    apply Finset.sum_congr rfl fun i hi => ?_\n    rw [Nat.succ_sub (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)), ← norm_iteratedFDerivWithin_fderivWithin hs hx]\n      -- Porting note: the next line is a hack allowing Lean to find the operator norm instance.\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\ni : ℕ\n⊢ 0 ≤ ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 g s) s x‖\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\n⊢ ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 g s) s x‖ =\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\n⊢ ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 g s) s x‖ =\n    ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\n[PROOFSTEP]\napply Finset.sum_congr rfl fun i hi => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 g s) s x‖ =\n    ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\n[PROOFSTEP]\nrw [Nat.succ_sub (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)), ← norm_iteratedFDerivWithin_fderivWithin hs hx]\n  -- Porting note: the next line is a hack allowing Lean to find the operator norm instance.\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (Nat.succ n - i) g s x‖\n[PROOFSTEP]\nlet norm := @ContinuousLinearMap.hasOpNorm _ _ (Du →L[𝕜] Eu) (Fu →L[𝕜] Du →L[𝕜] Gu) _ _ _ _ _ _ (RingHom.id 𝕜)\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (Nat.succ n - i) g s x‖\n[PROOFSTEP]\nhave I2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y : Du => B.precompL Du (fderivWithin 𝕜 f s y) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i : ℕ in Finset.range (n + 1),\n        n.choose i * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖ :=\n  calc\n    ‖iteratedFDerivWithin 𝕜 n (fun y : Du => B.precompL Du (fderivWithin 𝕜 f s y) (g y)) s x‖ ≤\n        ‖B.precompL Du‖ *\n          ∑ i : ℕ in Finset.range (n + 1),\n            n.choose i * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 f s) s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖ :=\n      IH _ (hf.fderivWithin hs In) (hg.of_le (Nat.cast_le.2 (Nat.le_succ n)))\n    _ ≤\n        ‖B‖ *\n          ∑ i : ℕ in Finset.range (n + 1),\n            n.choose i * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 f s) s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖ :=\n      (mul_le_mul_of_nonneg_right (B.norm_precompL_le Du) (Finset.sum_nonneg' fun i => by positivity))\n    _ = _ := by\n      congr 1\n      apply Finset.sum_congr rfl fun i _ => ?_\n      rw [← norm_iteratedFDerivWithin_fderivWithin hs hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\ni : ℕ\n⊢ 0 ≤ ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 f s) s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\n⊢ ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 f s) s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖ =\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\n⊢ ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 f s) s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖ =\n    ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\napply Finset.sum_congr rfl fun i _ => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\ni : ℕ\nx✝ : i ∈ Finset.range (n + 1)\n⊢ ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 f s) s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖ =\n    ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nrw [← norm_iteratedFDerivWithin_fderivWithin hs hx]\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (Nat.succ n - i) g s x‖\n[PROOFSTEP]\nhave J :\n  iteratedFDerivWithin 𝕜 n (fun y : Du => fderivWithin 𝕜 (fun y : Du => B (f y) (g y)) s y) s x =\n    iteratedFDerivWithin 𝕜 n\n      (fun y => B.precompR Du (f y) (fderivWithin 𝕜 g s y) + B.precompL Du (fderivWithin 𝕜 f s y) (g y)) s x :=\n  by\n  apply iteratedFDerivWithin_congr (fun y hy => ?_) hx\n  have L : (1 : ℕ∞) ≤ n.succ := by simpa only [ENat.coe_one, Nat.one_le_cast] using Nat.succ_pos n\n  exact B.fderivWithin_of_bilinear (hf.differentiableOn L y hy) (hg.differentiableOn L y hy) (hs y hy)\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n⊢ iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (fun y => ↑(↑B (f y)) (g y)) s y) s x =\n    iteratedFDerivWithin 𝕜 n\n      (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x\n[PROOFSTEP]\napply iteratedFDerivWithin_congr (fun y hy => ?_) hx\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\ny : Du\nhy : y ∈ s\n⊢ fderivWithin 𝕜 (fun y => ↑(↑B (f y)) (g y)) s y =\n    ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)\n[PROOFSTEP]\nhave L : (1 : ℕ∞) ≤ n.succ := by simpa only [ENat.coe_one, Nat.one_le_cast] using Nat.succ_pos n\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\ny : Du\nhy : y ∈ s\n⊢ 1 ≤ ↑(Nat.succ n)\n[PROOFSTEP]\nsimpa only [ENat.coe_one, Nat.one_le_cast] using Nat.succ_pos n\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\ny : Du\nhy : y ∈ s\nL : 1 ≤ ↑(Nat.succ n)\n⊢ fderivWithin 𝕜 (fun y => ↑(↑B (f y)) (g y)) s y =\n    ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)\n[PROOFSTEP]\nexact B.fderivWithin_of_bilinear (hf.differentiableOn L y hy) (hg.differentiableOn L y hy) (hs y hy)\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nJ :\n  iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (fun y => ↑(↑B (f y)) (g y)) s y) s x =\n    iteratedFDerivWithin 𝕜 n\n      (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (Nat.succ n - i) g s x‖\n[PROOFSTEP]\nrw [← norm_iteratedFDerivWithin_fderivWithin hs hx, J]\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nJ :\n  iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (fun y => ↑(↑B (f y)) (g y)) s y) s x =\n    iteratedFDerivWithin 𝕜 n\n      (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x\n⊢ ‖iteratedFDerivWithin 𝕜 n\n        (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s\n        x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (Nat.succ n - i) g s x‖\n[PROOFSTEP]\nhave A : ContDiffOn 𝕜 n (fun y => B.precompR Du (f y) (fderivWithin 𝕜 g s y)) s :=\n  (B.precompR Du).isBoundedBilinearMap.contDiff.comp_contDiff_on₂ (hf.of_le (Nat.cast_le.2 (Nat.le_succ n)))\n    (hg.fderivWithin hs In)\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nJ :\n  iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (fun y => ↑(↑B (f y)) (g y)) s y) s x =\n    iteratedFDerivWithin 𝕜 n\n      (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x\nA : ContDiffOn 𝕜 (↑n) (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s\n⊢ ‖iteratedFDerivWithin 𝕜 n\n        (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s\n        x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (Nat.succ n - i) g s x‖\n[PROOFSTEP]\nhave A' : ContDiffOn 𝕜 n (fun y => B.precompL Du (fderivWithin 𝕜 f s y) (g y)) s :=\n  (B.precompL Du).isBoundedBilinearMap.contDiff.comp_contDiff_on₂ (hf.fderivWithin hs In)\n    (hg.of_le (Nat.cast_le.2 (Nat.le_succ n)))\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nJ :\n  iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (fun y => ↑(↑B (f y)) (g y)) s y) s x =\n    iteratedFDerivWithin 𝕜 n\n      (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x\nA : ContDiffOn 𝕜 (↑n) (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s\nA' : ContDiffOn 𝕜 (↑n) (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s\n⊢ ‖iteratedFDerivWithin 𝕜 n\n        (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s\n        x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (Nat.succ n - i) g s x‖\n[PROOFSTEP]\nrw [iteratedFDerivWithin_add_apply' A A' hs hx]\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nJ :\n  iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (fun y => ↑(↑B (f y)) (g y)) s y) s x =\n    iteratedFDerivWithin 𝕜 n\n      (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x\nA : ContDiffOn 𝕜 (↑n) (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s\nA' : ContDiffOn 𝕜 (↑n) (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x +\n        iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (Nat.succ n - i) g s x‖\n[PROOFSTEP]\napply (norm_add_le _ _).trans ((add_le_add I1 I2).trans (le_of_eq ?_))\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nJ :\n  iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (fun y => ↑(↑B (f y)) (g y)) s y) s x =\n    iteratedFDerivWithin 𝕜 n\n      (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x\nA : ContDiffOn 𝕜 (↑n) (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s\nA' : ContDiffOn 𝕜 (↑n) (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s\n⊢ ‖B‖ *\n        ∑ i in Finset.range (n + 1),\n          ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖ +\n      ‖B‖ *\n        ∑ i in Finset.range (n + 1),\n          ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖ =\n    ‖B‖ *\n      ∑ i in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (Nat.succ n - i) g s x‖\n[PROOFSTEP]\nsimp_rw [← mul_add, mul_assoc]\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nJ :\n  iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (fun y => ↑(↑B (f y)) (g y)) s y) s x =\n    iteratedFDerivWithin 𝕜 n\n      (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x\nA : ContDiffOn 𝕜 (↑n) (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s\nA' : ContDiffOn 𝕜 (↑n) (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s\n⊢ ‖B‖ *\n      (∑ x_1 in Finset.range (n + 1),\n          ↑(Nat.choose n x_1) * (‖iteratedFDerivWithin 𝕜 x_1 f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - x_1) g s x‖) +\n        ∑ x_1 in Finset.range (n + 1),\n          ↑(Nat.choose n x_1) * (‖iteratedFDerivWithin 𝕜 (x_1 + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - x_1) g s x‖)) =\n    ‖B‖ *\n      ∑ x_1 in Finset.range (Nat.succ n + 1),\n        ↑(Nat.choose (Nat.succ n) x_1) *\n          (‖iteratedFDerivWithin 𝕜 x_1 f s x‖ * ‖iteratedFDerivWithin 𝕜 (Nat.succ n - x_1) g s x‖)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\n𝕜 : Type u_1\ninst✝²⁴ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝²³ : NormedAddCommGroup D\ninst✝²² : NormedSpace 𝕜 D\nE : Type uE\ninst✝²¹ : NormedAddCommGroup E\ninst✝²⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝¹⁷ : NormedAddCommGroup G\ninst✝¹⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹⁵ : NormedAddCommGroup X\ninst✝¹⁴ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nDu Eu✝ Fu✝ Gu✝ : Type u\ninst✝¹³ : NormedAddCommGroup Du\ninst✝¹² : NormedSpace 𝕜 Du\ninst✝¹¹ : NormedAddCommGroup Eu✝\ninst✝¹⁰ : NormedSpace 𝕜 Eu✝\ninst✝⁹ : NormedAddCommGroup Fu✝\ninst✝⁸ : NormedSpace 𝕜 Fu✝\ninst✝⁷ : NormedAddCommGroup Gu✝\ninst✝⁶ : NormedSpace 𝕜 Gu✝\nB✝ : Eu✝ →L[𝕜] Fu✝ →L[𝕜] Gu✝\nf✝ : Du → Eu✝\ng✝ : Du → Fu✝\nn✝ : ℕ\ns : Set Du\nx : Du\nhf✝ : ContDiffOn 𝕜 (↑n✝) f✝ s\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nIH :\n  ∀ {Eu Fu Gu : Type u} [inst : NormedAddCommGroup Eu] [inst_1 : NormedSpace 𝕜 Eu] [inst_2 : NormedAddCommGroup Fu]\n    [inst_3 : NormedSpace 𝕜 Fu] [inst_4 : NormedAddCommGroup Gu] [inst_5 : NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu)\n    {f : Du → Eu} {g : Du → Fu},\n    ContDiffOn 𝕜 (↑n) f s →\n      ContDiffOn 𝕜 (↑n) g s →\n        ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n          ‖B‖ *\n            ∑ i in Finset.range (n + 1),\n              ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nEu Fu Gu : Type u\ninst✝⁵ : NormedAddCommGroup Eu\ninst✝⁴ : NormedSpace 𝕜 Eu\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\nB : Eu →L[𝕜] Fu →L[𝕜] Gu\nf : Du → Eu\ng : Du → Fu\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g s\nIn : ↑n + 1 ≤ ↑(Nat.succ n)\nnorm✝ : Norm (Eu →L[𝕜] (Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI1 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖\nnorm : Norm ((Du →L[𝕜] Eu) →L[𝕜] Fu →L[𝕜] Du →L[𝕜] Gu) := hasOpNorm\nI2 :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\nJ :\n  iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (fun y => ↑(↑B (f y)) (g y)) s y) s x =\n    iteratedFDerivWithin 𝕜 n\n      (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y) + ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s x\nA : ContDiffOn 𝕜 (↑n) (fun y => ↑(↑(precompR Du B) (f y)) (fderivWithin 𝕜 g s y)) s\nA' : ContDiffOn 𝕜 (↑n) (fun y => ↑(↑(precompL Du B) (fderivWithin 𝕜 f s y)) (g y)) s\n⊢ ∑ x_1 in Finset.range (n + 1),\n        ↑(Nat.choose n x_1) * (‖iteratedFDerivWithin 𝕜 x_1 f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - x_1) g s x‖) +\n      ∑ x_1 in Finset.range (n + 1),\n        ↑(Nat.choose n x_1) * (‖iteratedFDerivWithin 𝕜 (x_1 + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - x_1) g s x‖) =\n    ∑ x_1 in Finset.range (Nat.succ n + 1),\n      ↑(Nat.choose (Nat.succ n) x_1) *\n        (‖iteratedFDerivWithin 𝕜 x_1 f s x‖ * ‖iteratedFDerivWithin 𝕜 (Nat.succ n - x_1) g s x‖)\n[PROOFSTEP]\nexact\n  (Finset.sum_choose_succ_mul (fun i j => ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 j g s x‖) n).symm\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nlet Du : Type max uD uE uF uG := ULift.{max uE uF uG, uD} D\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nlet Eu : Type max uD uE uF uG := ULift.{max uD uF uG, uE} E\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nlet Fu : Type max uD uE uF uG := ULift.{max uD uE uG, uF} F\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nlet Gu : Type max uD uE uF uG := ULift.{max uD uE uF, uG} G\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave isoD : Du ≃ₗᵢ[𝕜] D := LinearIsometryEquiv.ulift 𝕜 D\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave isoE : Eu ≃ₗᵢ[𝕜] E := LinearIsometryEquiv.ulift 𝕜 E\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave isoF : Fu ≃ₗᵢ[𝕜] F := LinearIsometryEquiv.ulift 𝕜 F\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave isoG : Gu ≃ₗᵢ[𝕜] G := LinearIsometryEquiv.ulift 𝕜 G\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nset fu : Du → Eu := isoE.symm ∘ f ∘ isoD with hfu\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nset gu : Du → Fu := isoF.symm ∘ g ∘ isoD with hgu\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nset Bu₀ : Eu →L[𝕜] Fu →L[𝕜] G := ((B.comp (isoE : Eu →L[𝕜] E)).flip.comp (isoF : Fu →L[𝕜] F)).flip with hBu₀\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nlet Bu : Eu →L[𝕜] Fu →L[𝕜] Gu\n[GOAL]\ncase Bu\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\n⊢ Eu →L[𝕜] Fu →L[𝕜] Gu\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu := ?Bu\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nexact\n  ContinuousLinearMap.compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu)\n    (ContinuousLinearMap.compL 𝕜 Fu G Gu (isoG.symm : G →L[𝕜] Gu)) Bu₀\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave hBu :\n  Bu =\n    ContinuousLinearMap.compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu)\n      (ContinuousLinearMap.compL 𝕜 Fu G Gu (isoG.symm : G →L[𝕜] Gu)) Bu₀ :=\n  rfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave Bu_eq : (fun y => Bu (fu y) (gu y)) = isoG.symm ∘ (fun y => B (f y) (g y)) ∘ isoD :=\n  by\n  ext1 y\n  rw [hBu]\n  iterate 2 rw [ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp', Function.comp_apply]\n  rw [hBu₀]\n  iterate 2 rw [ContinuousLinearMap.flip_apply, ContinuousLinearMap.coe_comp', Function.comp_apply]\n  rw [hfu, Function.comp_apply, LinearIsometryEquiv.coe_coe'', LinearIsometryEquiv.coe_coe'',\n    LinearIsometryEquiv.apply_symm_apply isoE, Function.comp_apply, hgu, LinearIsometryEquiv.coe_coe'',\n    Function.comp_apply, LinearIsometryEquiv.apply_symm_apply isoF]\n  simp only [Function.comp_apply]\n    -- All norms are preserved by the lifting process.\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\n⊢ (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\n[PROOFSTEP]\next1 y\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\ny : Du\n⊢ ↑(↑Bu (fu y)) (gu y) = (↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD) y\n[PROOFSTEP]\nrw [hBu]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\ny : Du\n⊢ ↑(↑(↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n                  (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n              Bu₀)\n          (fu y))\n      (gu y) =\n    (↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD) y\n[PROOFSTEP]\niterate 2 rw [ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp', Function.comp_apply]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\ny : Du\n⊢ ↑(↑(↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n                  (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n              Bu₀)\n          (fu y))\n      (gu y) =\n    (↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD) y\n[PROOFSTEP]\nrw [ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp', Function.comp_apply]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\ny : Du\n⊢ ↑(↑(↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)) (↑Bu₀ (fu y)))\n      (gu y) =\n    (↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD) y\n[PROOFSTEP]\nrw [ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp', Function.comp_apply]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\ny : Du\n⊢ ↑↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv) (↑(↑Bu₀ (fu y)) (gu y)) =\n    (↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD) y\n[PROOFSTEP]\nrw [hBu₀]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\ny : Du\n⊢ ↑↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)\n      (↑(↑(flip\n                (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n                  ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv)))\n            (fu y))\n        (gu y)) =\n    (↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD) y\n[PROOFSTEP]\niterate 2 rw [ContinuousLinearMap.flip_apply, ContinuousLinearMap.coe_comp', Function.comp_apply]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\ny : Du\n⊢ ↑↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)\n      (↑(↑(flip\n                (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n                  ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv)))\n            (fu y))\n        (gu y)) =\n    (↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD) y\n[PROOFSTEP]\nrw [ContinuousLinearMap.flip_apply, ContinuousLinearMap.coe_comp', Function.comp_apply]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\ny : Du\n⊢ ↑↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)\n      (↑(↑(flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n            (↑↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv) (gu y)))\n        (fu y)) =\n    (↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD) y\n[PROOFSTEP]\nrw [ContinuousLinearMap.flip_apply, ContinuousLinearMap.coe_comp', Function.comp_apply]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\ny : Du\n⊢ ↑↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)\n      (↑(↑B (↑↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv) (fu y)))\n        (↑↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv) (gu y))) =\n    (↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD) y\n[PROOFSTEP]\nrw [hfu, Function.comp_apply, LinearIsometryEquiv.coe_coe'', LinearIsometryEquiv.coe_coe'',\n  LinearIsometryEquiv.apply_symm_apply isoE, Function.comp_apply, hgu, LinearIsometryEquiv.coe_coe'',\n  Function.comp_apply, LinearIsometryEquiv.apply_symm_apply isoF]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\ny : Du\n⊢ ↑(LinearIsometryEquiv.symm isoG) (↑(↑B (f (↑isoD y))) ((g ∘ ↑isoD) y)) =\n    (↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD) y\n[PROOFSTEP]\nsimp only [Function.comp_apply]\n  -- All norms are preserved by the lifting process.\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave Bu_le : ‖Bu‖ ≤ ‖B‖ :=\n  by\n  refine' ContinuousLinearMap.op_norm_le_bound _ (norm_nonneg _) fun y => _\n  refine' ContinuousLinearMap.op_norm_le_bound _ (by positivity) fun x => _\n  simp only [ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp', Function.comp_apply,\n    LinearIsometryEquiv.coe_coe'', ContinuousLinearMap.flip_apply, LinearIsometryEquiv.norm_map]\n  rw [ContinuousLinearMap.coe_comp', Function.comp_apply, ContinuousLinearMap.compL_apply,\n    ContinuousLinearMap.coe_comp', Function.comp_apply]\n  iterate 2 rw [ContinuousLinearMap.flip_apply, ContinuousLinearMap.coe_comp', Function.comp_apply]\n  simp only [LinearIsometryEquiv.coe_coe'', LinearIsometryEquiv.norm_map]\n  calc\n    ‖B (isoE y) (isoF x)‖ ≤ ‖B (isoE y)‖ * ‖isoF x‖ := ContinuousLinearMap.le_op_norm _ _\n    _ ≤ ‖B‖ * ‖isoE y‖ * ‖isoF x‖ := (mul_le_mul_of_nonneg_right (ContinuousLinearMap.le_op_norm _ _) (norm_nonneg _))\n    _ = ‖B‖ * ‖y‖ * ‖x‖ := by simp only [LinearIsometryEquiv.norm_map]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\n⊢ ‖Bu‖ ≤ ‖B‖\n[PROOFSTEP]\nrefine' ContinuousLinearMap.op_norm_le_bound _ (norm_nonneg _) fun y => _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\ny : Eu\n⊢ ‖↑Bu y‖ ≤ ‖B‖ * ‖y‖\n[PROOFSTEP]\nrefine' ContinuousLinearMap.op_norm_le_bound _ (by positivity) fun x => _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\ny : Eu\n⊢ 0 ≤ ‖B‖ * ‖y‖\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx✝ : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x✝ ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\ny : Eu\nx : Fu\n⊢ ‖↑(↑Bu y) x‖ ≤ ‖B‖ * ‖y‖ * ‖x‖\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp', Function.comp_apply,\n  LinearIsometryEquiv.coe_coe'', ContinuousLinearMap.flip_apply, LinearIsometryEquiv.norm_map]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx✝ : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x✝ ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\ny : Eu\nx : Fu\n⊢ ‖↑(↑(comp (↑(compL 𝕜 (ULift F) G (ULift G)) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv))\n                (flip\n                  (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n                    ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))))\n            y)\n        x‖ ≤\n    ‖B‖ * ‖y‖ * ‖x‖\n[PROOFSTEP]\nrw [ContinuousLinearMap.coe_comp', Function.comp_apply, ContinuousLinearMap.compL_apply, ContinuousLinearMap.coe_comp',\n  Function.comp_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx✝ : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x✝ ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\ny : Eu\nx : Fu\n⊢ ‖↑↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)\n        (↑(↑(flip\n                  (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n                    ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv)))\n              y)\n          x)‖ ≤\n    ‖B‖ * ‖y‖ * ‖x‖\n[PROOFSTEP]\niterate 2 rw [ContinuousLinearMap.flip_apply, ContinuousLinearMap.coe_comp', Function.comp_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx✝ : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x✝ ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\ny : Eu\nx : Fu\n⊢ ‖↑↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)\n        (↑(↑(flip\n                  (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n                    ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv)))\n              y)\n          x)‖ ≤\n    ‖B‖ * ‖y‖ * ‖x‖\n[PROOFSTEP]\nrw [ContinuousLinearMap.flip_apply, ContinuousLinearMap.coe_comp', Function.comp_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx✝ : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x✝ ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\ny : Eu\nx : Fu\n⊢ ‖↑↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)\n        (↑(↑(flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n              (↑↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv) x))\n          y)‖ ≤\n    ‖B‖ * ‖y‖ * ‖x‖\n[PROOFSTEP]\nrw [ContinuousLinearMap.flip_apply, ContinuousLinearMap.coe_comp', Function.comp_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx✝ : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x✝ ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\ny : Eu\nx : Fu\n⊢ ‖↑↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)\n        (↑(↑B (↑↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv) y))\n          (↑↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv) x))‖ ≤\n    ‖B‖ * ‖y‖ * ‖x‖\n[PROOFSTEP]\nsimp only [LinearIsometryEquiv.coe_coe'', LinearIsometryEquiv.norm_map]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx✝ : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x✝ ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\ny : Eu\nx : Fu\n⊢ ‖↑(↑B (↑isoE y)) (↑isoF x)‖ ≤ ‖B‖ * ‖y‖ * ‖x‖\n[PROOFSTEP]\ncalc\n  ‖B (isoE y) (isoF x)‖ ≤ ‖B (isoE y)‖ * ‖isoF x‖ := ContinuousLinearMap.le_op_norm _ _\n  _ ≤ ‖B‖ * ‖isoE y‖ * ‖isoF x‖ := (mul_le_mul_of_nonneg_right (ContinuousLinearMap.le_op_norm _ _) (norm_nonneg _))\n  _ = ‖B‖ * ‖y‖ * ‖x‖ := by simp only [LinearIsometryEquiv.norm_map]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx✝ : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x✝ ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\ny : Eu\nx : Fu\n⊢ ‖B‖ * ‖↑isoE y‖ * ‖↑isoF x‖ = ‖B‖ * ‖y‖ * ‖x‖\n[PROOFSTEP]\nsimp only [LinearIsometryEquiv.norm_map]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nlet su := isoD ⁻¹' s\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave hsu : UniqueDiffOn 𝕜 su := isoD.toContinuousLinearEquiv.uniqueDiffOn_preimage_iff.2 hs\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nlet xu := isoD.symm x\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave hxu : xu ∈ su := by simpa only [Set.mem_preimage, LinearIsometryEquiv.apply_symm_apply] using hx\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\n⊢ xu ∈ su\n[PROOFSTEP]\nsimpa only [Set.mem_preimage, LinearIsometryEquiv.apply_symm_apply] using hx\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave xu_x : isoD xu = x := by simp only [LinearIsometryEquiv.apply_symm_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\n⊢ ↑isoD xu = x\n[PROOFSTEP]\nsimp only [LinearIsometryEquiv.apply_symm_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave hfu : ContDiffOn 𝕜 n fu su :=\n  isoE.symm.contDiff.comp_contDiffOn ((hf.of_le hn).comp_continuousLinearMap (isoD : Du →L[𝕜] D))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave hgu : ContDiffOn 𝕜 n gu su :=\n  isoF.symm.contDiff.comp_contDiffOn ((hg.of_le hn).comp_continuousLinearMap (isoD : Du →L[𝕜] D))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave Nfu : ∀ i, ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖ :=\n  by\n  intro i\n  rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]\n  rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]\n  rwa [← xu_x] at hx \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\n⊢ ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\n[PROOFSTEP]\nintro i\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\n[PROOFSTEP]\nrw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 i (f ∘ ↑isoD) su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\n[PROOFSTEP]\nrw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]\n[GOAL]\ncase hx\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\ni : ℕ\n⊢ ↑isoD xu ∈ s\n[PROOFSTEP]\nrwa [← xu_x] at hx \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave Ngu : ∀ i, ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖ :=\n  by\n  intro i\n  rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]\n  rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]\n  rwa [← xu_x] at hx \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\n⊢ ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\n[PROOFSTEP]\nintro i\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\n[PROOFSTEP]\nrw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 i (g ∘ ↑isoD) su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\n[PROOFSTEP]\nrw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]\n[GOAL]\ncase hx\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\ni : ℕ\n⊢ ↑isoD xu ∈ s\n[PROOFSTEP]\nrwa [← xu_x] at hx \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave NBu :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => Bu (fu y) (gu y)) su xu‖ =\n    ‖iteratedFDerivWithin 𝕜 n (fun y => B (f y) (g y)) s x‖ :=\n  by\n  rw [Bu_eq]\n  rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]\n  rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]\n  rwa [← xu_x] at hx \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑Bu (fu y)) (gu y)) su xu‖ =\n    ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖\n[PROOFSTEP]\nrw [Bu_eq]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD) su xu‖ =\n    ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖\n[PROOFSTEP]\nrw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hsu hxu]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 n ((fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD) su xu‖ =\n    ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖\n[PROOFSTEP]\nrw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ hs, xu_x]\n[GOAL]\ncase hx\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\n⊢ ↑isoD xu ∈ s\n[PROOFSTEP]\nrwa [← xu_x] at hx \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\nNBu :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑Bu (fu y)) (gu y)) su xu‖ =\n    ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => Bu (fu y) (gu y)) su xu‖ ≤\n    ‖Bu‖ *\n      ∑ i in Finset.range (n + 1),\n        (n.choose i : ℝ) * ‖iteratedFDerivWithin 𝕜 i fu su xu‖ * ‖iteratedFDerivWithin 𝕜 (n - i) gu su xu‖ :=\n  Bu.norm_iteratedFDerivWithin_le_of_bilinear_aux hfu hgu hsu hxu\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\nNBu :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑Bu (fu y)) (gu y)) su xu‖ =\n    ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖\nthis :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑Bu (fu y)) (gu y)) su xu‖ ≤\n    ‖Bu‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i fu su xu‖ * ‖iteratedFDerivWithin 𝕜 (n - i) gu su xu‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nsimp only [Nfu, Ngu, NBu] at this \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\nNBu :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑Bu (fu y)) (gu y)) su xu‖ =\n    ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖\nthis :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖↑(↑(compL 𝕜 (ULift E) (ULift F →L[𝕜] G) (ULift F →L[𝕜] ULift G))\n              (↑(compL 𝕜 (ULift F) G (ULift G))\n                ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n          (flip\n            (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n              ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv)))‖ *\n      ∑ x_1 in Finset.range (n + 1),\n        ↑(Nat.choose n x_1) * ‖iteratedFDerivWithin 𝕜 x_1 f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - x_1) g s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\napply this.trans (mul_le_mul_of_nonneg_right Bu_le ?_)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\nNBu :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑Bu (fu y)) (gu y)) su xu‖ =\n    ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖\nthis :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖↑(↑(compL 𝕜 (ULift E) (ULift F →L[𝕜] G) (ULift F →L[𝕜] ULift G))\n              (↑(compL 𝕜 (ULift F) G (ULift G))\n                ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n          (flip\n            (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n              ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv)))‖ *\n      ∑ x_1 in Finset.range (n + 1),\n        ↑(Nat.choose n x_1) * ‖iteratedFDerivWithin 𝕜 x_1 f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - x_1) g s x‖\n⊢ 0 ≤\n    ∑ x_1 in Finset.range (n + 1),\n      ↑(Nat.choose n x_1) * ‖iteratedFDerivWithin 𝕜 x_1 f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - x_1) g s x‖\n[PROOFSTEP]\nexact Finset.sum_nonneg' fun i => by positivity\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nDu : Type (max uD uE uF uG) := ULift D\nEu : Type (max uD uE uF uG) := ULift E\nFu : Type (max uD uE uF uG) := ULift F\nGu : Type (max uD uE uF uG) := ULift G\nisoD : Du ≃ₗᵢ[𝕜] D\nisoE : Eu ≃ₗᵢ[𝕜] E\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : Du → Eu := ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\nhfu✝ : fu = ↑(LinearIsometryEquiv.symm isoE) ∘ f ∘ ↑isoD\ngu : Du → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nhgu✝ : gu = ↑(LinearIsometryEquiv.symm isoF) ∘ g ∘ ↑isoD\nBu₀ : Eu →L[𝕜] Fu →L[𝕜] G :=\n  flip\n    (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv))) ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nhBu₀ :\n  Bu₀ =\n    flip\n      (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n        ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv))\nBu : Eu →L[𝕜] Fu →L[𝕜] Gu :=\n  ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n        (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n    Bu₀\nhBu :\n  Bu =\n    ↑(↑(compL 𝕜 Eu (Fu →L[𝕜] G) (Fu →L[𝕜] Gu))\n          (↑(compL 𝕜 Fu G Gu) ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n      Bu₀\nBu_eq : (fun y => ↑(↑Bu (fu y)) (gu y)) = ↑(LinearIsometryEquiv.symm isoG) ∘ (fun y => ↑(↑B (f y)) (g y)) ∘ ↑isoD\nBu_le : ‖Bu‖ ≤ ‖B‖\nsu : Set Du := ↑isoD ⁻¹' s\nhsu : UniqueDiffOn 𝕜 su\nxu : Du := ↑(LinearIsometryEquiv.symm isoD) x\nhxu : xu ∈ su\nxu_x : ↑isoD xu = x\nhfu : ContDiffOn 𝕜 (↑n) fu su\nhgu : ContDiffOn 𝕜 (↑n) gu su\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu su xu‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu su xu‖ = ‖iteratedFDerivWithin 𝕜 i g s x‖\nNBu :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑Bu (fu y)) (gu y)) su xu‖ =\n    ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖\nthis :\n  ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ‖↑(↑(compL 𝕜 (ULift E) (ULift F →L[𝕜] G) (ULift F →L[𝕜] ULift G))\n              (↑(compL 𝕜 (ULift F) G (ULift G))\n                ↑(ContinuousLinearEquiv.mk (LinearIsometryEquiv.symm isoG).toLinearEquiv)))\n          (flip\n            (comp (flip (comp B ↑(ContinuousLinearEquiv.mk isoE.toLinearEquiv)))\n              ↑(ContinuousLinearEquiv.mk isoF.toLinearEquiv)))‖ *\n      ∑ x_1 in Finset.range (n + 1),\n        ↑(Nat.choose n x_1) * ‖iteratedFDerivWithin 𝕜 x_1 f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - x_1) g s x‖\ni : ℕ\n⊢ 0 ≤ ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\nhf : ContDiff 𝕜 N f\nhg : ContDiff 𝕜 N g\nx : D\nn : ℕ\nhn : ↑n ≤ N\n⊢ ‖iteratedFDeriv 𝕜 n (fun y => ↑(↑B (f y)) (g y)) x‖ ≤\n    ‖B‖ * ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv 𝕜 i f x‖ * ‖iteratedFDeriv 𝕜 (n - i) g x‖\n[PROOFSTEP]\nsimp_rw [← iteratedFDerivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\nhf : ContDiff 𝕜 N f\nhg : ContDiff 𝕜 N g\nx : D\nn : ℕ\nhn : ↑n ≤ N\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) univ x‖ ≤\n    ‖B‖ *\n      ∑ x_1 in Finset.range (n + 1),\n        ↑(Nat.choose n x_1) * ‖iteratedFDerivWithin 𝕜 x_1 f univ x‖ * ‖iteratedFDerivWithin 𝕜 (n - x_1) g univ x‖\n[PROOFSTEP]\nexact B.norm_iteratedFDerivWithin_le_of_bilinear hf.contDiffOn hg.contDiffOn uniqueDiffOn_univ (mem_univ x) hn\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nhB : ‖B‖ ≤ 1\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) s x‖ ≤\n    ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\napply (B.norm_iteratedFDerivWithin_le_of_bilinear hf hg hs hx hn).trans\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nhB : ‖B‖ ≤ 1\n⊢ ‖B‖ *\n      ∑ i in Finset.range (n + 1),\n        ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖ ≤\n    ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\napply mul_le_of_le_one_left (Finset.sum_nonneg' fun i => ?_) hB\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\ns : Set D\nx : D\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nn : ℕ\nhn : ↑n ≤ N\nhB : ‖B‖ ≤ 1\ni : ℕ\n⊢ 0 ≤ ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\nhf : ContDiff 𝕜 N f\nhg : ContDiff 𝕜 N g\nx : D\nn : ℕ\nhn : ↑n ≤ N\nhB : ‖B‖ ≤ 1\n⊢ ‖iteratedFDeriv 𝕜 n (fun y => ↑(↑B (f y)) (g y)) x‖ ≤\n    ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv 𝕜 i f x‖ * ‖iteratedFDeriv 𝕜 (n - i) g x‖\n[PROOFSTEP]\nsimp_rw [← iteratedFDerivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nB : E →L[𝕜] F →L[𝕜] G\nf : D → E\ng : D → F\nN : ℕ∞\nhf : ContDiff 𝕜 N f\nhg : ContDiff 𝕜 N g\nx : D\nn : ℕ\nhn : ↑n ≤ N\nhB : ‖B‖ ≤ 1\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(↑B (f y)) (g y)) univ x‖ ≤\n    ∑ x_1 in Finset.range (n + 1),\n      ↑(Nat.choose n x_1) * ‖iteratedFDerivWithin 𝕜 x_1 f univ x‖ * ‖iteratedFDerivWithin 𝕜 (n - x_1) g univ x‖\n[PROOFSTEP]\nexact\n  B.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one hf.contDiffOn hg.contDiffOn uniqueDiffOn_univ (mem_univ x) hn hB\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹¹ : NormedAddCommGroup D\ninst✝¹⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝³ : NormedAddCommGroup X\ninst✝² : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nA : Type u_3\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra 𝕜 A\nf g : E → A\nN : ℕ∞\nhf : ContDiff 𝕜 N f\nhg : ContDiff 𝕜 N g\nx : E\nn : ℕ\nhn : ↑n ≤ N\n⊢ ‖iteratedFDeriv 𝕜 n (fun y => f y * g y) x‖ ≤\n    ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv 𝕜 i f x‖ * ‖iteratedFDeriv 𝕜 (n - i) g x‖\n[PROOFSTEP]\nsimp_rw [← iteratedFDerivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝¹¹ : NormedAddCommGroup D\ninst✝¹⁰ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝³ : NormedAddCommGroup X\ninst✝² : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nA : Type u_3\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra 𝕜 A\nf g : E → A\nN : ℕ∞\nhf : ContDiff 𝕜 N f\nhg : ContDiff 𝕜 N g\nx : E\nn : ℕ\nhn : ↑n ≤ N\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => f y * g y) univ x‖ ≤\n    ∑ x_1 in Finset.range (n + 1),\n      ↑(Nat.choose n x_1) * ‖iteratedFDerivWithin 𝕜 x_1 f univ x‖ * ‖iteratedFDerivWithin 𝕜 (n - x_1) g univ x‖\n[PROOFSTEP]\nexact norm_iteratedFDerivWithin_mul_le hf.contDiffOn hg.contDiffOn uniqueDiffOn_univ (mem_univ x) hn\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹³ : NormedAddCommGroup D✝\ninst✝¹² : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁵ : NormedAddCommGroup X\ninst✝⁴ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu : Type u\ninst✝³ : NormedAddCommGroup Fu\ninst✝² : NormedSpace 𝕜 Fu\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nf : E → Fu\nn : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg : ContDiffOn 𝕜 (↑n) g t\nhf : ContDiffOn 𝕜 (↑n) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\ninduction' n using Nat.case_strong_induction_on with n IH generalizing Gu\n[GOAL]\ncase hz\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑0) g t\nhf : ContDiffOn 𝕜 (↑0) f s\nhC : ∀ (i : ℕ), i ≤ 0 → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ 0 → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\n⊢ ‖iteratedFDerivWithin 𝕜 0 (g ∘ f) s x‖ ≤ ↑0! * C * D ^ 0\n[PROOFSTEP]\nsimpa [norm_iteratedFDerivWithin_zero, Nat.factorial_zero, algebraMap.coe_one, one_mul, pow_zero, mul_one,\n  comp_apply] using hC 0 le_rfl\n[GOAL]\ncase hi\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (g ∘ f) s x‖ ≤ ↑(Nat.succ n)! * C * D ^ Nat.succ n\n[PROOFSTEP]\nhave M : (n : ℕ∞) < n.succ := Nat.cast_lt.2 n.lt_succ_self\n[GOAL]\ncase hi\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (g ∘ f) s x‖ ≤ ↑(Nat.succ n)! * C * D ^ Nat.succ n\n[PROOFSTEP]\nhave Cnonneg : 0 ≤ C := (norm_nonneg _).trans (hC 0 bot_le)\n[GOAL]\ncase hi\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (g ∘ f) s x‖ ≤ ↑(Nat.succ n)! * C * D ^ Nat.succ n\n[PROOFSTEP]\nhave Dnonneg : 0 ≤ D := by\n  have : 1 ≤ n + 1 := by simp only [le_add_iff_nonneg_left, zero_le']\n  simpa only [pow_one] using\n    (norm_nonneg _).trans\n      (hD 1 le_rfl this)\n        -- use the inductive assumption to bound the derivatives of `g' ∘ f`.\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\n⊢ 0 ≤ D\n[PROOFSTEP]\nhave : 1 ≤ n + 1 := by simp only [le_add_iff_nonneg_left, zero_le']\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\n⊢ 1 ≤ n + 1\n[PROOFSTEP]\nsimp only [le_add_iff_nonneg_left, zero_le']\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nthis : 1 ≤ n + 1\n⊢ 0 ≤ D\n[PROOFSTEP]\nsimpa only [pow_one] using\n  (norm_nonneg _).trans\n    (hD 1 le_rfl this)\n      -- use the inductive assumption to bound the derivatives of `g' ∘ f`.\n[GOAL]\ncase hi\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (g ∘ f) s x‖ ≤ ↑(Nat.succ n)! * C * D ^ Nat.succ n\n[PROOFSTEP]\nhave I : ∀ i ∈ Finset.range (n + 1), ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ i ! * C * D ^ i\n[GOAL]\ncase I\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\n⊢ ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase I\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\n[PROOFSTEP]\nsimp only [Finset.mem_range_succ_iff] at hi \n[GOAL]\ncase I\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ≤ n\n⊢ ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\n[PROOFSTEP]\napply IH i hi\n[GOAL]\ncase I.hg\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ≤ n\n⊢ ContDiffOn 𝕜 (↑i) (fderivWithin 𝕜 g t) t\n[PROOFSTEP]\napply hg.fderivWithin ht\n[GOAL]\ncase I.hg\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ≤ n\n⊢ ↑i + 1 ≤ ↑(Nat.succ n)\n[PROOFSTEP]\nsimp only [Nat.cast_succ]\n[GOAL]\ncase I.hg\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ≤ n\n⊢ ↑i + 1 ≤ ↑n + 1\n[PROOFSTEP]\nexact add_le_add_right (Nat.cast_le.2 hi) _\n[GOAL]\ncase I.hf\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ≤ n\n⊢ ContDiffOn 𝕜 (↑i) f s\n[PROOFSTEP]\napply hf.of_le (Nat.cast_le.2 (hi.trans n.le_succ))\n[GOAL]\ncase I.hC\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ≤ n\n⊢ ∀ (i_1 : ℕ), i_1 ≤ i → ‖iteratedFDerivWithin 𝕜 i_1 (fderivWithin 𝕜 g t) t (f x)‖ ≤ C\n[PROOFSTEP]\nintro j hj\n[GOAL]\ncase I.hC\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ≤ n\nj : ℕ\nhj : j ≤ i\n⊢ ‖iteratedFDerivWithin 𝕜 j (fderivWithin 𝕜 g t) t (f x)‖ ≤ C\n[PROOFSTEP]\nhave : ‖iteratedFDerivWithin 𝕜 j (fderivWithin 𝕜 g t) t (f x)‖ = ‖iteratedFDerivWithin 𝕜 (j + 1) g t (f x)‖ := by\n  rw [iteratedFDerivWithin_succ_eq_comp_right ht (hst hx), comp_apply, LinearIsometryEquiv.norm_map]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ≤ n\nj : ℕ\nhj : j ≤ i\n⊢ ‖iteratedFDerivWithin 𝕜 j (fderivWithin 𝕜 g t) t (f x)‖ = ‖iteratedFDerivWithin 𝕜 (j + 1) g t (f x)‖\n[PROOFSTEP]\nrw [iteratedFDerivWithin_succ_eq_comp_right ht (hst hx), comp_apply, LinearIsometryEquiv.norm_map]\n[GOAL]\ncase I.hC\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ≤ n\nj : ℕ\nhj : j ≤ i\nthis : ‖iteratedFDerivWithin 𝕜 j (fderivWithin 𝕜 g t) t (f x)‖ = ‖iteratedFDerivWithin 𝕜 (j + 1) g t (f x)‖\n⊢ ‖iteratedFDerivWithin 𝕜 j (fderivWithin 𝕜 g t) t (f x)‖ ≤ C\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase I.hC\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ≤ n\nj : ℕ\nhj : j ≤ i\nthis : ‖iteratedFDerivWithin 𝕜 j (fderivWithin 𝕜 g t) t (f x)‖ = ‖iteratedFDerivWithin 𝕜 (j + 1) g t (f x)‖\n⊢ ‖iteratedFDerivWithin 𝕜 (j + 1) g t (f x)‖ ≤ C\n[PROOFSTEP]\nexact hC (j + 1) (add_le_add (hj.trans hi) le_rfl)\n[GOAL]\ncase I.hD\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ≤ n\n⊢ ∀ (i_1 : ℕ), 1 ≤ i_1 → i_1 ≤ i → ‖iteratedFDerivWithin 𝕜 i_1 f s x‖ ≤ D ^ i_1\n[PROOFSTEP]\nintro j hj h'j\n[GOAL]\ncase I.hD\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\ni : ℕ\nhi : i ≤ n\nj : ℕ\nhj : 1 ≤ j\nh'j : j ≤ i\n⊢ ‖iteratedFDerivWithin 𝕜 j f s x‖ ≤ D ^ j\n[PROOFSTEP]\nexact\n  hD j hj\n    (h'j.trans (hi.trans n.le_succ))\n      -- reformulate `hD` as a bound for the derivatives of `f'`.\n[GOAL]\ncase hi\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (g ∘ f) s x‖ ≤ ↑(Nat.succ n)! * C * D ^ Nat.succ n\n[PROOFSTEP]\nhave J : ∀ i, ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1) :=\n  by\n  intro i\n  have : ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ = ‖iteratedFDerivWithin 𝕜 (n - i + 1) f s x‖\n  · rw [iteratedFDerivWithin_succ_eq_comp_right hs hx, comp_apply, LinearIsometryEquiv.norm_map]\n  rw [this]\n  apply hD\n  · simp only [le_add_iff_nonneg_left, zero_le']\n  · apply Nat.succ_le_succ tsub_le_self\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\n⊢ ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n[PROOFSTEP]\nintro i\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n[PROOFSTEP]\nhave : ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ = ‖iteratedFDerivWithin 𝕜 (n - i + 1) f s x‖\n[GOAL]\ncase this\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ = ‖iteratedFDerivWithin 𝕜 (n - i + 1) f s x‖\n[PROOFSTEP]\nrw [iteratedFDerivWithin_succ_eq_comp_right hs hx, comp_apply, LinearIsometryEquiv.norm_map]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\ni : ℕ\nthis : ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ = ‖iteratedFDerivWithin 𝕜 (n - i + 1) f s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n[PROOFSTEP]\nrw [this]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\ni : ℕ\nthis : ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ = ‖iteratedFDerivWithin 𝕜 (n - i + 1) f s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 (n - i + 1) f s x‖ ≤ D ^ (n - i + 1)\n[PROOFSTEP]\napply hD\n[GOAL]\ncase a\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\ni : ℕ\nthis : ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ = ‖iteratedFDerivWithin 𝕜 (n - i + 1) f s x‖\n⊢ 1 ≤ n - i + 1\n[PROOFSTEP]\nsimp only [le_add_iff_nonneg_left, zero_le']\n[GOAL]\ncase a\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\ni : ℕ\nthis : ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ = ‖iteratedFDerivWithin 𝕜 (n - i + 1) f s x‖\n⊢ n - i + 1 ≤ Nat.succ n\n[PROOFSTEP]\napply Nat.succ_le_succ tsub_le_self\n[GOAL]\ncase hi\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ ‖iteratedFDerivWithin 𝕜 (Nat.succ n) (g ∘ f) s x‖ ≤ ↑(Nat.succ n)! * C * D ^ Nat.succ n\n[PROOFSTEP]\ncalc\n  ‖iteratedFDerivWithin 𝕜 (n + 1) (g ∘ f) s x‖ =\n      ‖iteratedFDerivWithin 𝕜 n (fun y : E => fderivWithin 𝕜 (g ∘ f) s y) s x‖ :=\n    by rw [iteratedFDerivWithin_succ_eq_comp_right hs hx, comp_apply, LinearIsometryEquiv.norm_map]\n  _ =\n      ‖iteratedFDerivWithin 𝕜 n\n          (fun y : E => ContinuousLinearMap.compL 𝕜 E Fu Gu (fderivWithin 𝕜 g t (f y)) (fderivWithin 𝕜 f s y)) s x‖ :=\n    by\n    have L : (1 : ℕ∞) ≤ n.succ := by simpa only [ENat.coe_one, Nat.one_le_cast] using n.succ_pos\n    congr 1\n    refine' iteratedFDerivWithin_congr (fun y hy => _) hx _\n    apply fderivWithin.comp _ _ _ hst (hs y hy)\n    · exact hg.differentiableOn L _ (hst hy)\n    · exact hf.differentiableOn L _ hy\n  _ ≤\n      ∑ i in Finset.range (n + 1),\n        (n.choose i : ℝ) * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ *\n          ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ :=\n    by\n    have A : ContDiffOn 𝕜 n (fderivWithin 𝕜 g t ∘ f) s :=\n      by\n      apply ContDiffOn.comp _ (hf.of_le M.le) hst\n      apply hg.fderivWithin ht\n      simp only [Nat.cast_succ, le_refl]\n    have B : ContDiffOn 𝕜 n (fderivWithin 𝕜 f s) s :=\n      by\n      apply hf.fderivWithin hs\n      simp only [Nat.cast_succ, le_refl]\n    exact\n      (ContinuousLinearMap.compL 𝕜 E Fu Gu).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one A B hs hx le_rfl\n        (ContinuousLinearMap.norm_compL_le 𝕜 E Fu Gu)\n          -- bound each of the terms using the estimates on previous derivatives (that use the inductive\n              -- assumption for `g' ∘ f`).\n  _ ≤ ∑ i in Finset.range (n + 1), (n.choose i : ℝ) * (i ! * C * D ^ i) * D ^ (n - i + 1) :=\n    by\n    apply Finset.sum_le_sum fun i hi => ?_\n    simp only [mul_assoc (n.choose i : ℝ)]\n    refine' mul_le_mul_of_nonneg_left _ (Nat.cast_nonneg _)\n    apply mul_le_mul (I i hi) (J i) (norm_nonneg _)\n    positivity\n      -- We are left with trivial algebraic manipulations to see that this is smaller than\n          -- the claimed bound.\n  _ =\n      ∑ i in Finset.range (n + 1),\n        -- porting note: had to insert a few more explicit type ascriptions in this and similar\n              -- expressions.(n ! : ℝ) * ((i ! : ℝ)⁻¹ * i !) * C * (D ^ i * D ^ (n - i + 1)) * ((n - i)! : ℝ)⁻¹ :=\n    by\n    apply Finset.sum_congr rfl fun i hi => ?_\n    simp only [Nat.cast_choose ℝ (Finset.mem_range_succ_iff.1 hi), div_eq_inv_mul, mul_inv]\n    ring\n  _ = ∑ i in Finset.range (n + 1), (n ! : ℝ) * 1 * C * D ^ (n + 1) * ((n - i)! : ℝ)⁻¹ :=\n    by\n    apply Finset.sum_congr rfl fun i hi => ?_\n    congr 2\n    · congr\n      apply inv_mul_cancel\n      simpa only [Ne.def, Nat.cast_eq_zero] using i.factorial_ne_zero\n    · rw [← pow_add]\n      congr 1\n      rw [Nat.add_succ, Nat.succ_inj']\n      exact Nat.add_sub_of_le (Finset.mem_range_succ_iff.1 hi)\n  _ ≤ ∑ i in Finset.range (n + 1), (n ! : ℝ) * 1 * C * D ^ (n + 1) * 1 :=\n    by\n    apply Finset.sum_le_sum fun i _hi => ?_\n    refine' mul_le_mul_of_nonneg_left _ (by positivity)\n    apply inv_le_one\n    simpa only [Nat.one_le_cast] using (n - i).factorial_pos\n  _ = (n + 1)! * C * D ^ (n + 1) := by\n    simp only [mul_assoc, mul_one, Finset.sum_const, Finset.card_range, nsmul_eq_mul, Nat.factorial_succ, Nat.cast_mul]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ ‖iteratedFDerivWithin 𝕜 (n + 1) (g ∘ f) s x‖ = ‖iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (g ∘ f) s y) s x‖\n[PROOFSTEP]\nrw [iteratedFDerivWithin_succ_eq_comp_right hs hx, comp_apply, LinearIsometryEquiv.norm_map]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (g ∘ f) s y) s x‖ =\n    ‖iteratedFDerivWithin 𝕜 n\n        (fun y => ↑(↑(ContinuousLinearMap.compL 𝕜 E Fu Gu) (fderivWithin 𝕜 g t (f y))) (fderivWithin 𝕜 f s y)) s x‖\n[PROOFSTEP]\nhave L : (1 : ℕ∞) ≤ n.succ := by simpa only [ENat.coe_one, Nat.one_le_cast] using n.succ_pos\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ 1 ≤ ↑(Nat.succ n)\n[PROOFSTEP]\nsimpa only [ENat.coe_one, Nat.one_le_cast] using n.succ_pos\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\nL : 1 ≤ ↑(Nat.succ n)\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (g ∘ f) s y) s x‖ =\n    ‖iteratedFDerivWithin 𝕜 n\n        (fun y => ↑(↑(ContinuousLinearMap.compL 𝕜 E Fu Gu) (fderivWithin 𝕜 g t (f y))) (fderivWithin 𝕜 f s y)) s x‖\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\nL : 1 ≤ ↑(Nat.succ n)\n⊢ iteratedFDerivWithin 𝕜 n (fun y => fderivWithin 𝕜 (g ∘ f) s y) s x =\n    iteratedFDerivWithin 𝕜 n\n      (fun y => ↑(↑(ContinuousLinearMap.compL 𝕜 E Fu Gu) (fderivWithin 𝕜 g t (f y))) (fderivWithin 𝕜 f s y)) s x\n[PROOFSTEP]\nrefine' iteratedFDerivWithin_congr (fun y hy => _) hx _\n[GOAL]\ncase e_a\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\nL : 1 ≤ ↑(Nat.succ n)\ny : E\nhy : y ∈ s\n⊢ fderivWithin 𝕜 (g ∘ f) s y =\n    ↑(↑(ContinuousLinearMap.compL 𝕜 E Fu Gu) (fderivWithin 𝕜 g t (f y))) (fderivWithin 𝕜 f s y)\n[PROOFSTEP]\napply fderivWithin.comp _ _ _ hst (hs y hy)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\nL : 1 ≤ ↑(Nat.succ n)\ny : E\nhy : y ∈ s\n⊢ DifferentiableWithinAt 𝕜 g t (f y)\n[PROOFSTEP]\nexact hg.differentiableOn L _ (hst hy)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\nL : 1 ≤ ↑(Nat.succ n)\ny : E\nhy : y ∈ s\n⊢ DifferentiableWithinAt 𝕜 f s y\n[PROOFSTEP]\nexact hf.differentiableOn L _ hy\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ ‖iteratedFDerivWithin 𝕜 n\n        (fun y => ↑(↑(ContinuousLinearMap.compL 𝕜 E Fu Gu) (fderivWithin 𝕜 g t (f y))) (fderivWithin 𝕜 f s y)) s x‖ ≤\n    ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ *\n        ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖\n[PROOFSTEP]\nhave A : ContDiffOn 𝕜 n (fderivWithin 𝕜 g t ∘ f) s :=\n  by\n  apply ContDiffOn.comp _ (hf.of_le M.le) hst\n  apply hg.fderivWithin ht\n  simp only [Nat.cast_succ, le_refl]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ ContDiffOn 𝕜 (↑n) (fderivWithin 𝕜 g t ∘ f) s\n[PROOFSTEP]\napply ContDiffOn.comp _ (hf.of_le M.le) hst\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ ContDiffOn 𝕜 (↑n) (fderivWithin 𝕜 g t) t\n[PROOFSTEP]\napply hg.fderivWithin ht\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ ↑n + 1 ≤ ↑(Nat.succ n)\n[PROOFSTEP]\nsimp only [Nat.cast_succ, le_refl]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\nA : ContDiffOn 𝕜 (↑n) (fderivWithin 𝕜 g t ∘ f) s\n⊢ ‖iteratedFDerivWithin 𝕜 n\n        (fun y => ↑(↑(ContinuousLinearMap.compL 𝕜 E Fu Gu) (fderivWithin 𝕜 g t (f y))) (fderivWithin 𝕜 f s y)) s x‖ ≤\n    ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ *\n        ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖\n[PROOFSTEP]\nhave B : ContDiffOn 𝕜 n (fderivWithin 𝕜 f s) s :=\n  by\n  apply hf.fderivWithin hs\n  simp only [Nat.cast_succ, le_refl]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\nA : ContDiffOn 𝕜 (↑n) (fderivWithin 𝕜 g t ∘ f) s\n⊢ ContDiffOn 𝕜 (↑n) (fderivWithin 𝕜 f s) s\n[PROOFSTEP]\napply hf.fderivWithin hs\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\nA : ContDiffOn 𝕜 (↑n) (fderivWithin 𝕜 g t ∘ f) s\n⊢ ↑n + 1 ≤ ↑(Nat.succ n)\n[PROOFSTEP]\nsimp only [Nat.cast_succ, le_refl]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\nA : ContDiffOn 𝕜 (↑n) (fderivWithin 𝕜 g t ∘ f) s\nB : ContDiffOn 𝕜 (↑n) (fderivWithin 𝕜 f s) s\n⊢ ‖iteratedFDerivWithin 𝕜 n\n        (fun y => ↑(↑(ContinuousLinearMap.compL 𝕜 E Fu Gu) (fderivWithin 𝕜 g t (f y))) (fderivWithin 𝕜 f s y)) s x‖ ≤\n    ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ *\n        ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖\n[PROOFSTEP]\nexact\n  (ContinuousLinearMap.compL 𝕜 E Fu Gu).norm_iteratedFDerivWithin_le_of_bilinear_of_le_one A B hs hx le_rfl\n    (ContinuousLinearMap.norm_compL_le 𝕜 E Fu Gu)\n      -- bound each of the terms using the estimates on previous derivatives (that use the inductive\n          -- assumption for `g' ∘ f`).\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ *\n        ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤\n    ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * (↑i ! * C * D ^ i) * D ^ (n - i + 1)\n[PROOFSTEP]\napply Finset.sum_le_sum fun i hi => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ *\n      ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤\n    ↑(Nat.choose n i) * (↑i ! * C * D ^ i) * D ^ (n - i + 1)\n[PROOFSTEP]\nsimp only [mul_assoc (n.choose i : ℝ)]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ↑(Nat.choose n i) *\n      (‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ *\n        ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖) ≤\n    ↑(Nat.choose n i) * (↑i ! * C * D ^ i * D ^ (n - i + 1))\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left _ (Nat.cast_nonneg _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤\n    ↑i ! * C * D ^ i * D ^ (n - i + 1)\n[PROOFSTEP]\napply mul_le_mul (I i hi) (J i) (norm_nonneg _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ 0 ≤ ↑i ! * C * D ^ i\n[PROOFSTEP]\npositivity\n  -- We are left with trivial algebraic manipulations to see that this is smaller than\n      -- the claimed bound.\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * (↑i ! * C * D ^ i) * D ^ (n - i + 1) =\n    ∑ i in Finset.range (n + 1), ↑n ! * ((↑i !)⁻¹ * ↑i !) * C * (D ^ i * D ^ (n - i + 1)) * (↑(n - i)!)⁻¹\n[PROOFSTEP]\napply Finset.sum_congr rfl fun i hi => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ↑(Nat.choose n i) * (↑i ! * C * D ^ i) * D ^ (n - i + 1) =\n    ↑n ! * ((↑i !)⁻¹ * ↑i !) * C * (D ^ i * D ^ (n - i + 1)) * (↑(n - i)!)⁻¹\n[PROOFSTEP]\nsimp only [Nat.cast_choose ℝ (Finset.mem_range_succ_iff.1 hi), div_eq_inv_mul, mul_inv]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ (↑i !)⁻¹ * (↑(n - i)!)⁻¹ * ↑n ! * (↑i ! * C * D ^ i) * D ^ (n - i + 1) =\n    ↑n ! * ((↑i !)⁻¹ * ↑i !) * C * (D ^ i * D ^ (n - i + 1)) * (↑(n - i)!)⁻¹\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ ∑ i in Finset.range (n + 1), ↑n ! * ((↑i !)⁻¹ * ↑i !) * C * (D ^ i * D ^ (n - i + 1)) * (↑(n - i)!)⁻¹ =\n    ∑ i in Finset.range (n + 1), ↑n ! * 1 * C * D ^ (n + 1) * (↑(n - i)!)⁻¹\n[PROOFSTEP]\napply Finset.sum_congr rfl fun i hi => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ↑n ! * ((↑i !)⁻¹ * ↑i !) * C * (D ^ i * D ^ (n - i + 1)) * (↑(n - i)!)⁻¹ = ↑n ! * 1 * C * D ^ (n + 1) * (↑(n - i)!)⁻¹\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_a\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ↑n ! * ((↑i !)⁻¹ * ↑i !) * C = ↑n ! * 1 * C\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_a.e_a.e_a\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ (↑i !)⁻¹ * ↑i ! = 1\n[PROOFSTEP]\napply inv_mul_cancel\n[GOAL]\ncase e_a.e_a.e_a.e_a.h\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ↑i ! ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, Nat.cast_eq_zero] using i.factorial_ne_zero\n[GOAL]\ncase e_a.e_a\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ D ^ i * D ^ (n - i + 1) = D ^ (n + 1)\n[PROOFSTEP]\nrw [← pow_add]\n[GOAL]\ncase e_a.e_a\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ D ^ (i + (n - i + 1)) = D ^ (n + 1)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a.e_a.e_a\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ i + (n - i + 1) = n + 1\n[PROOFSTEP]\nrw [Nat.add_succ, Nat.succ_inj']\n[GOAL]\ncase e_a.e_a.e_a\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ i + (n - i) = n\n[PROOFSTEP]\nexact Nat.add_sub_of_le (Finset.mem_range_succ_iff.1 hi)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ ∑ i in Finset.range (n + 1), ↑n ! * 1 * C * D ^ (n + 1) * (↑(n - i)!)⁻¹ ≤\n    ∑ i in Finset.range (n + 1), ↑n ! * 1 * C * D ^ (n + 1) * 1\n[PROOFSTEP]\napply Finset.sum_le_sum fun i _hi => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\n_hi : i ∈ Finset.range (n + 1)\n⊢ ↑n ! * 1 * C * D ^ (n + 1) * (↑(n - i)!)⁻¹ ≤ ↑n ! * 1 * C * D ^ (n + 1) * 1\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left _ (by positivity)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\n_hi : i ∈ Finset.range (n + 1)\n⊢ 0 ≤ ↑n ! * 1 * C * D ^ (n + 1)\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\n_hi : i ∈ Finset.range (n + 1)\n⊢ (↑(n - i)!)⁻¹ ≤ 1\n[PROOFSTEP]\napply inv_le_one\n[GOAL]\ncase ha\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\ni : ℕ\n_hi : i ∈ Finset.range (n + 1)\n⊢ 1 ≤ ↑(n - i)!\n[PROOFSTEP]\nsimpa only [Nat.one_le_cast] using (n - i).factorial_pos\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝¹⁵ : NormedAddCommGroup D✝\ninst✝¹⁴ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type uF\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nG : Type uG\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedSpace 𝕜 G\nX : Type u_2\ninst✝⁷ : NormedAddCommGroup X\ninst✝⁶ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝¹ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝¹ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nFu Gu✝ : Type u\ninst✝⁵ : NormedAddCommGroup Fu\ninst✝⁴ : NormedSpace 𝕜 Fu\ninst✝³ : NormedAddCommGroup Gu✝\ninst✝² : NormedSpace 𝕜 Gu✝\ng✝ : Fu → Gu✝\nf : E → Fu\nn✝ : ℕ\ns : Set E\nt : Set Fu\nx : E\nhg✝ : ContDiffOn 𝕜 (↑n✝) g✝ t\nhf✝ : ContDiffOn 𝕜 (↑n✝) f s\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC✝ : ∀ (i : ℕ), i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i g✝ t (f x)‖ ≤ C\nhD✝ : ∀ (i : ℕ), 1 ≤ i → i ≤ n✝ → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m ≤ n →\n      ∀ {Gu : Type u} [inst : NormedAddCommGroup Gu] [inst_1 : NormedSpace 𝕜 Gu] {g : Fu → Gu},\n        ContDiffOn 𝕜 (↑m) g t →\n          ContDiffOn 𝕜 (↑m) f s →\n            (∀ (i : ℕ), i ≤ m → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C) →\n              (∀ (i : ℕ), 1 ≤ i → i ≤ m → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i) →\n                ‖iteratedFDerivWithin 𝕜 m (g ∘ f) s x‖ ≤ ↑m ! * C * D ^ m\nGu : Type u\ninst✝¹ : NormedAddCommGroup Gu\ninst✝ : NormedSpace 𝕜 Gu\ng : Fu → Gu\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) g t\nhf : ContDiffOn 𝕜 (↑(Nat.succ n)) f s\nhC : ∀ (i : ℕ), i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ Nat.succ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nM : ↑n < ↑(Nat.succ n)\nCnonneg : 0 ≤ C\nDnonneg : 0 ≤ D\nI : ∀ (i : ℕ), i ∈ Finset.range (n + 1) → ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 g t ∘ f) s x‖ ≤ ↑i ! * C * D ^ i\nJ : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 f s) s x‖ ≤ D ^ (n - i + 1)\n⊢ ∑ i in Finset.range (n + 1), ↑n ! * 1 * C * D ^ (n + 1) * 1 = ↑(n + 1)! * C * D ^ (n + 1)\n[PROOFSTEP]\nsimp only [mul_assoc, mul_one, Finset.sum_const, Finset.card_range, nsmul_eq_mul, Nat.factorial_succ, Nat.cast_mul]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nlet Fu : Type max uF uG := ULift.{uG, uF} F\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nlet Gu : Type max uF uG := ULift.{uF, uG} G\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nhave isoF : Fu ≃ₗᵢ[𝕜] F := LinearIsometryEquiv.ulift 𝕜 F\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nhave isoG : Gu ≃ₗᵢ[𝕜] G := LinearIsometryEquiv.ulift 𝕜 G\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nlet fu : E → Fu := isoF.symm ∘ f\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nlet gu : Fu → Gu := isoG.symm ∘ g ∘ isoF\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nlet tu := isoF ⁻¹' t\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nhave htu : UniqueDiffOn 𝕜 tu := isoF.toContinuousLinearEquiv.uniqueDiffOn_preimage_iff.2 ht\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nhave hstu : MapsTo fu s tu := fun y hy ↦ by\n  simpa only [mem_preimage, comp_apply, LinearIsometryEquiv.apply_symm_apply] using hst hy\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\ny : E\nhy : y ∈ s\n⊢ fu y ∈ tu\n[PROOFSTEP]\nsimpa only [mem_preimage, comp_apply, LinearIsometryEquiv.apply_symm_apply] using hst hy\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nhave Ffu : isoF (fu x) = f x := by\n  simp only [comp_apply, LinearIsometryEquiv.apply_symm_apply]\n    -- All norms are preserved by the lifting process.\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\n⊢ ↑isoF (fu x) = f x\n[PROOFSTEP]\nsimp only [comp_apply, LinearIsometryEquiv.apply_symm_apply]\n  -- All norms are preserved by the lifting process.\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nhave hfu : ContDiffOn 𝕜 n fu s := isoF.symm.contDiff.comp_contDiffOn (hf.of_le hn)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nhave hgu : ContDiffOn 𝕜 n gu tu :=\n  isoG.symm.contDiff.comp_contDiffOn ((hg.of_le hn).comp_continuousLinearMap (isoF : Fu →L[𝕜] F))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nhave Nfu : ∀ i, ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖ := fun i ↦ by\n  rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hs hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\n[PROOFSTEP]\nrw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hs hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f s x‖ ≤ D ^ i\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nsimp_rw [← Nfu] at hD \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x‖ ≤ D ^ i\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nhave Ngu : ∀ i, ‖iteratedFDerivWithin 𝕜 i gu tu (fu x)‖ = ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ := fun i ↦\n  by\n  rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ htu (hstu hx)]\n  rw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ ht, Ffu]\n  rw [Ffu]\n  exact hst hx\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x‖ ≤ D ^ i\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 i gu tu (fu x)‖ = ‖iteratedFDerivWithin 𝕜 i g t (f x)‖\n[PROOFSTEP]\nrw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ htu (hstu hx)]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x‖ ≤ D ^ i\ni : ℕ\n⊢ ‖iteratedFDerivWithin 𝕜 i (g ∘ ↑isoF) tu (fu x)‖ = ‖iteratedFDerivWithin 𝕜 i g t (f x)‖\n[PROOFSTEP]\nrw [LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_right _ _ ht, Ffu]\n[GOAL]\ncase hx\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x‖ ≤ D ^ i\ni : ℕ\n⊢ ↑isoF (fu x) ∈ t\n[PROOFSTEP]\nrw [Ffu]\n[GOAL]\ncase hx\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x‖ ≤ D ^ i\ni : ℕ\n⊢ f x ∈ t\n[PROOFSTEP]\nexact hst hx\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g t (f x)‖ ≤ C\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x‖ ≤ D ^ i\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu tu (fu x)‖ = ‖iteratedFDerivWithin 𝕜 i g t (f x)‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nsimp_rw [← Ngu] at hC \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x‖ ≤ D ^ i\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu tu (fu x)‖ = ‖iteratedFDerivWithin 𝕜 i g t (f x)‖\nhC :\n  ∀ (i : ℕ),\n    i ≤ n →\n      ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF) (↑isoF ⁻¹' t)\n            ((↑(LinearIsometryEquiv.symm isoF) ∘ f) x)‖ ≤\n        C\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nhave Nfgu : ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ = ‖iteratedFDerivWithin 𝕜 n (gu ∘ fu) s x‖ :=\n  by\n  have : gu ∘ fu = isoG.symm ∘ g ∘ f := by\n    ext x\n    simp only [comp_apply, LinearIsometryEquiv.map_eq_iff, LinearIsometryEquiv.apply_symm_apply]\n  rw [this, LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hs hx]\n    -- deduce the required bound from the one for `gu ∘ fu`.\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x‖ ≤ D ^ i\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu tu (fu x)‖ = ‖iteratedFDerivWithin 𝕜 i g t (f x)‖\nhC :\n  ∀ (i : ℕ),\n    i ≤ n →\n      ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF) (↑isoF ⁻¹' t)\n            ((↑(LinearIsometryEquiv.symm isoF) ∘ f) x)‖ ≤\n        C\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ = ‖iteratedFDerivWithin 𝕜 n (gu ∘ fu) s x‖\n[PROOFSTEP]\nhave : gu ∘ fu = isoG.symm ∘ g ∘ f := by\n  ext x\n  simp only [comp_apply, LinearIsometryEquiv.map_eq_iff, LinearIsometryEquiv.apply_symm_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x‖ ≤ D ^ i\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu tu (fu x)‖ = ‖iteratedFDerivWithin 𝕜 i g t (f x)‖\nhC :\n  ∀ (i : ℕ),\n    i ≤ n →\n      ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF) (↑isoF ⁻¹' t)\n            ((↑(LinearIsometryEquiv.symm isoF) ∘ f) x)‖ ≤\n        C\n⊢ gu ∘ fu = ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ f\n[PROOFSTEP]\next x\n[GOAL]\ncase h.h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝¹ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx✝ : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x✝ ∈ s\nC D : ℝ\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x✝) = f x✝\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x✝‖ = ‖iteratedFDerivWithin 𝕜 i f s x✝‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x✝‖ ≤ D ^ i\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu tu (fu x✝)‖ = ‖iteratedFDerivWithin 𝕜 i g t (f x✝)‖\nhC :\n  ∀ (i : ℕ),\n    i ≤ n →\n      ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF) (↑isoF ⁻¹' t)\n            ((↑(LinearIsometryEquiv.symm isoF) ∘ f) x✝)‖ ≤\n        C\nx : E\n⊢ ((gu ∘ fu) x).down = ((↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ f) x).down\n[PROOFSTEP]\nsimp only [comp_apply, LinearIsometryEquiv.map_eq_iff, LinearIsometryEquiv.apply_symm_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x‖ ≤ D ^ i\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu tu (fu x)‖ = ‖iteratedFDerivWithin 𝕜 i g t (f x)‖\nhC :\n  ∀ (i : ℕ),\n    i ≤ n →\n      ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF) (↑isoF ⁻¹' t)\n            ((↑(LinearIsometryEquiv.symm isoF) ∘ f) x)‖ ≤\n        C\nthis : gu ∘ fu = ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ f\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ = ‖iteratedFDerivWithin 𝕜 n (gu ∘ fu) s x‖\n[PROOFSTEP]\nrw [this, LinearIsometryEquiv.norm_iteratedFDerivWithin_comp_left _ _ hs hx]\n  -- deduce the required bound from the one for `gu ∘ fu`.\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x‖ ≤ D ^ i\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu tu (fu x)‖ = ‖iteratedFDerivWithin 𝕜 i g t (f x)‖\nhC :\n  ∀ (i : ℕ),\n    i ≤ n →\n      ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF) (↑isoF ⁻¹' t)\n            ((↑(LinearIsometryEquiv.symm isoF) ∘ f) x)‖ ≤\n        C\nNfgu : ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ = ‖iteratedFDerivWithin 𝕜 n (gu ∘ fu) s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nrw [Nfgu]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t✝ u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\ns : Set E\nt : Set F\nx : E\nN : ℕ∞\nhg : ContDiffOn 𝕜 N g t\nhf : ContDiffOn 𝕜 N f s\nhn : ↑n ≤ N\nht : UniqueDiffOn 𝕜 t\nhs : UniqueDiffOn 𝕜 s\nhst : MapsTo f s t\nhx : x ∈ s\nC D : ℝ\nFu : Type (max uF uG) := ULift F\nGu : Type (max uF uG) := ULift G\nisoF : Fu ≃ₗᵢ[𝕜] F\nisoG : Gu ≃ₗᵢ[𝕜] G\nfu : E → Fu := ↑(LinearIsometryEquiv.symm isoF) ∘ f\ngu : Fu → Gu := ↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF\ntu : Set Fu := ↑isoF ⁻¹' t\nhtu : UniqueDiffOn 𝕜 tu\nhstu : MapsTo fu s tu\nFfu : ↑isoF (fu x) = f x\nhfu : ContDiffOn 𝕜 (↑n) fu s\nhgu : ContDiffOn 𝕜 (↑n) gu tu\nNfu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i fu s x‖ = ‖iteratedFDerivWithin 𝕜 i f s x‖\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoF) ∘ f) s x‖ ≤ D ^ i\nNgu : ∀ (i : ℕ), ‖iteratedFDerivWithin 𝕜 i gu tu (fu x)‖ = ‖iteratedFDerivWithin 𝕜 i g t (f x)‖\nhC :\n  ∀ (i : ℕ),\n    i ≤ n →\n      ‖iteratedFDerivWithin 𝕜 i (↑(LinearIsometryEquiv.symm isoG) ∘ g ∘ ↑isoF) (↑isoF ⁻¹' t)\n            ((↑(LinearIsometryEquiv.symm isoF) ∘ f) x)‖ ≤\n        C\nNfgu : ‖iteratedFDerivWithin 𝕜 n (g ∘ f) s x‖ = ‖iteratedFDerivWithin 𝕜 n (gu ∘ fu) s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (gu ∘ fu) s x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nexact norm_iteratedFDerivWithin_comp_le_aux hgu hfu htu hs hstu hx hC hD\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\nN : ℕ∞\nhg : ContDiff 𝕜 N g\nhf : ContDiff 𝕜 N f\nhn : ↑n ≤ N\nx : E\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv 𝕜 i g (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDeriv 𝕜 i f x‖ ≤ D ^ i\n⊢ ‖iteratedFDeriv 𝕜 n (g ∘ f) x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nsimp_rw [← iteratedFDerivWithin_univ] at hC hD ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD✝ : Type uD\ninst✝⁹ : NormedAddCommGroup D✝\ninst✝⁸ : NormedSpace 𝕜 D✝\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\ng : F → G\nf : E → F\nn : ℕ\nN : ℕ∞\nhg : ContDiff 𝕜 N g\nhf : ContDiff 𝕜 N f\nhn : ↑n ≤ N\nx : E\nC D : ℝ\nhC : ∀ (i : ℕ), i ≤ n → ‖iteratedFDerivWithin 𝕜 i g univ (f x)‖ ≤ C\nhD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDerivWithin 𝕜 i f univ x‖ ≤ D ^ i\n⊢ ‖iteratedFDerivWithin 𝕜 n (g ∘ f) univ x‖ ≤ ↑n ! * C * D ^ n\n[PROOFSTEP]\nexact\n  norm_iteratedFDerivWithin_comp_le hg.contDiffOn hf.contDiffOn hn uniqueDiffOn_univ uniqueDiffOn_univ (mapsTo_univ _ _)\n    (mem_univ x) hC hD\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\ng : E → F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(f y) (g y)) s x‖ ≤\n    ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nlet B : (F →L[𝕜] G) →L[𝕜] F →L[𝕜] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply 𝕜 G)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\ng : E → F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\nB : (F →L[𝕜] G) →L[𝕜] F →L[𝕜] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply 𝕜 G)\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(f y) (g y)) s x‖ ≤\n    ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nhave hB : ‖B‖ ≤ 1 := by\n  simp only [ContinuousLinearMap.op_norm_flip, ContinuousLinearMap.apply]\n  refine' ContinuousLinearMap.op_norm_le_bound _ zero_le_one fun f => _\n  simp only [ContinuousLinearMap.coe_id', id.def, one_mul]\n  rfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\ng : E → F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\nB : (F →L[𝕜] G) →L[𝕜] F →L[𝕜] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply 𝕜 G)\n⊢ ‖B‖ ≤ 1\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.op_norm_flip, ContinuousLinearMap.apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\ng : E → F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\nB : (F →L[𝕜] G) →L[𝕜] F →L[𝕜] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply 𝕜 G)\n⊢ ‖ContinuousLinearMap.id 𝕜 (F →L[𝕜] G)‖ ≤ 1\n[PROOFSTEP]\nrefine' ContinuousLinearMap.op_norm_le_bound _ zero_le_one fun f => _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf✝ : E → F →L[𝕜] G\ng : E → F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f✝ s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\nB : (F →L[𝕜] G) →L[𝕜] F →L[𝕜] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply 𝕜 G)\nf : F →L[𝕜] G\n⊢ ‖↑(ContinuousLinearMap.id 𝕜 (F →L[𝕜] G)) f‖ ≤ 1 * ‖f‖\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.coe_id', id.def, one_mul]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf✝ : E → F →L[𝕜] G\ng : E → F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f✝ s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\nB : (F →L[𝕜] G) →L[𝕜] F →L[𝕜] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply 𝕜 G)\nf : F →L[𝕜] G\n⊢ ‖f‖ ≤ ‖f‖\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\ng : E → F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f s\nhg : ContDiffOn 𝕜 N g s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\nB : (F →L[𝕜] G) →L[𝕜] F →L[𝕜] G := ContinuousLinearMap.flip (ContinuousLinearMap.apply 𝕜 G)\nhB : ‖B‖ ≤ 1\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(f y) (g y)) s x‖ ≤\n    ∑ i in Finset.range (n + 1),\n      ↑(Nat.choose n i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖\n[PROOFSTEP]\nexact B.norm_iteratedFDerivWithin_le_of_bilinear_of_le_one hf hg hs hx hn hB\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\ng : E → F\nN : ℕ∞\nn : ℕ\nhf : ContDiff 𝕜 N f\nhg : ContDiff 𝕜 N g\nx : E\nhn : ↑n ≤ N\n⊢ ‖iteratedFDeriv 𝕜 n (fun y => ↑(f y) (g y)) x‖ ≤\n    ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv 𝕜 i f x‖ * ‖iteratedFDeriv 𝕜 (n - i) g x‖\n[PROOFSTEP]\nsimp only [← iteratedFDerivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\ng : E → F\nN : ℕ∞\nn : ℕ\nhf : ContDiff 𝕜 N f\nhg : ContDiff 𝕜 N g\nx : E\nhn : ↑n ≤ N\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(f y) (g y)) univ x‖ ≤\n    ∑ x_1 in Finset.range (n + 1),\n      ↑(Nat.choose n x_1) * ‖iteratedFDerivWithin 𝕜 x_1 f univ x‖ * ‖iteratedFDerivWithin 𝕜 (n - x_1) g univ x‖\n[PROOFSTEP]\nexact norm_iteratedFDerivWithin_clm_apply hf.contDiffOn hg.contDiffOn uniqueDiffOn_univ (Set.mem_univ x) hn\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\nc : F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(f y) c) s x‖ ≤ ‖c‖ * ‖iteratedFDerivWithin 𝕜 n f s x‖\n[PROOFSTEP]\nlet g : (F →L[𝕜] G) →L[𝕜] G := ContinuousLinearMap.apply 𝕜 G c\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\nc : F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\ng : (F →L[𝕜] G) →L[𝕜] G := ↑(ContinuousLinearMap.apply 𝕜 G) c\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(f y) c) s x‖ ≤ ‖c‖ * ‖iteratedFDerivWithin 𝕜 n f s x‖\n[PROOFSTEP]\nhave h := g.norm_compContinuousMultilinearMap_le (iteratedFDerivWithin 𝕜 n f s x)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\nc : F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\ng : (F →L[𝕜] G) →L[𝕜] G := ↑(ContinuousLinearMap.apply 𝕜 G) c\nh :\n  ‖ContinuousLinearMap.compContinuousMultilinearMap g (iteratedFDerivWithin 𝕜 n f s x)‖ ≤\n    ‖g‖ * ‖iteratedFDerivWithin 𝕜 n f s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(f y) c) s x‖ ≤ ‖c‖ * ‖iteratedFDerivWithin 𝕜 n f s x‖\n[PROOFSTEP]\nrw [← g.iteratedFDerivWithin_comp_left hf hs hx hn] at h \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\nc : F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\ng : (F →L[𝕜] G) →L[𝕜] G := ↑(ContinuousLinearMap.apply 𝕜 G) c\nh : ‖iteratedFDerivWithin 𝕜 n (↑g ∘ f) s x‖ ≤ ‖g‖ * ‖iteratedFDerivWithin 𝕜 n f s x‖\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(f y) c) s x‖ ≤ ‖c‖ * ‖iteratedFDerivWithin 𝕜 n f s x‖\n[PROOFSTEP]\nrefine' h.trans (mul_le_mul_of_nonneg_right _ (norm_nonneg _))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\nc : F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\ng : (F →L[𝕜] G) →L[𝕜] G := ↑(ContinuousLinearMap.apply 𝕜 G) c\nh : ‖iteratedFDerivWithin 𝕜 n (↑g ∘ f) s x‖ ≤ ‖g‖ * ‖iteratedFDerivWithin 𝕜 n f s x‖\n⊢ ‖g‖ ≤ ‖c‖\n[PROOFSTEP]\nrefine' g.op_norm_le_bound (norm_nonneg _) fun f => _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf✝ : E → F →L[𝕜] G\nc : F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\ng : (F →L[𝕜] G) →L[𝕜] G := ↑(ContinuousLinearMap.apply 𝕜 G) c\nh : ‖iteratedFDerivWithin 𝕜 n (↑g ∘ f✝) s x‖ ≤ ‖g‖ * ‖iteratedFDerivWithin 𝕜 n f✝ s x‖\nf : F →L[𝕜] G\n⊢ ‖↑g f‖ ≤ ‖c‖ * ‖f‖\n[PROOFSTEP]\nrw [ContinuousLinearMap.apply_apply, mul_comm]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns✝ s₁ t u : Set E\nf✝¹ f₁ : E → F\ng✝ : F → G\nx✝ x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf✝ : E → F →L[𝕜] G\nc : F\ns : Set E\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiffOn 𝕜 N f✝ s\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\nhn : ↑n ≤ N\ng : (F →L[𝕜] G) →L[𝕜] G := ↑(ContinuousLinearMap.apply 𝕜 G) c\nh : ‖iteratedFDerivWithin 𝕜 n (↑g ∘ f✝) s x‖ ≤ ‖g‖ * ‖iteratedFDerivWithin 𝕜 n f✝ s x‖\nf : F →L[𝕜] G\n⊢ ‖↑f c‖ ≤ ‖f‖ * ‖c‖\n[PROOFSTEP]\nexact f.le_op_norm c\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\nc : F\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiff 𝕜 N f\nhn : ↑n ≤ N\n⊢ ‖iteratedFDeriv 𝕜 n (fun y => ↑(f y) c) x‖ ≤ ‖c‖ * ‖iteratedFDeriv 𝕜 n f x‖\n[PROOFSTEP]\nsimp only [← iteratedFDerivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nD : Type uD\ninst✝⁹ : NormedAddCommGroup D\ninst✝⁸ : NormedSpace 𝕜 D\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type uF\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type uG\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nX : Type u_2\ninst✝¹ : NormedAddCommGroup X\ninst✝ : NormedSpace 𝕜 X\ns s₁ t u : Set E\nf✝ f₁ : E → F\ng : F → G\nx✝ x₀ : E\nc✝ : F\nb : E × F → G\nm n✝ : ℕ∞\np : E → FormalMultilinearSeries 𝕜 E F\nf : E → F →L[𝕜] G\nc : F\nx : E\nN : ℕ∞\nn : ℕ\nhf : ContDiff 𝕜 N f\nhn : ↑n ≤ N\n⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(f y) c) univ x‖ ≤ ‖c‖ * ‖iteratedFDerivWithin 𝕜 n f univ x‖\n[PROOFSTEP]\nexact norm_iteratedFDerivWithin_clm_apply_const hf.contDiffOn uniqueDiffOn_univ (Set.mem_univ x) hn\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.ContDiff", "llama_tokens": 492545, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7185943925708562, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.3789266968105158}}
{"text": "[GOAL]\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nq : K[X]\nhq : degree q = 1\n⊢ eigenspace f (-coeff q 0 / leadingCoeff q) =\n    LinearMap.ker (leadingCoeff q • f - ↑(algebraMap K (End K V)) (-coeff q 0))\n[PROOFSTEP]\nrw [eigenspace_div]\n[GOAL]\ncase hb\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nq : K[X]\nhq : degree q = 1\n⊢ leadingCoeff q ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase hb\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nq : K[X]\nhq : degree q = 1\nh : leadingCoeff q = 0\n⊢ False\n[PROOFSTEP]\nrw [leadingCoeff_eq_zero_iff_deg_eq_bot.1 h] at hq \n[GOAL]\ncase hb\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nq : K[X]\nhq : ⊥ = 1\nh : leadingCoeff q = 0\n⊢ False\n[PROOFSTEP]\ncases hq\n[GOAL]\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nq : K[X]\nhq : degree q = 1\n⊢ LinearMap.ker (leadingCoeff q • f - ↑(algebraMap K (End K V)) (-coeff q 0)) =\n    LinearMap.ker (↑(aeval f) (↑C (leadingCoeff q) * X + ↑C (coeff q 0)))\n[PROOFSTEP]\nrw [C_mul', aeval_def]\n[GOAL]\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nq : K[X]\nhq : degree q = 1\n⊢ LinearMap.ker (leadingCoeff q • f - ↑(algebraMap K (End K V)) (-coeff q 0)) =\n    LinearMap.ker (eval₂ (algebraMap K (End K V)) f (leadingCoeff q • X + ↑C (coeff q 0)))\n[PROOFSTEP]\nsimp [algebraMap, Algebra.toRingHom]\n[GOAL]\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nq : K[X]\nhq : degree q = 1\n⊢ LinearMap.ker (↑(aeval f) (↑C (leadingCoeff q) * X + ↑C (coeff q 0))) = LinearMap.ker (↑(aeval f) q)\n[PROOFSTEP]\nrwa [← eq_X_add_C_of_degree_eq_one]\n[GOAL]\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nc : K[X]ˣ\n⊢ LinearMap.ker (↑(aeval f) ↑c) = ⊥\n[PROOFSTEP]\nrw [Polynomial.eq_C_of_degree_eq_zero (degree_coe_units c)]\n[GOAL]\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nc : K[X]ˣ\n⊢ LinearMap.ker (↑(aeval f) (↑C (coeff (↑c) 0))) = ⊥\n[PROOFSTEP]\nsimp only [aeval_def, eval₂_C]\n[GOAL]\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nc : K[X]ˣ\n⊢ LinearMap.ker (↑(algebraMap K (End K V)) (coeff (↑c) 0)) = ⊥\n[PROOFSTEP]\napply ker_algebraMap_end\n[GOAL]\ncase ha\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nc : K[X]ˣ\n⊢ coeff (↑c) 0 ≠ 0\n[PROOFSTEP]\napply coeff_coe_units_zero_ne_zero c\n[GOAL]\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\np : K[X]\nμ : K\nx : V\nh : HasEigenvector f μ x\n⊢ ↑(↑(aeval f) p) x = eval μ p • x\n[PROOFSTEP]\nrefine' p.induction_on _ _ _\n[GOAL]\ncase refine'_1\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\np : K[X]\nμ : K\nx : V\nh : HasEigenvector f μ x\n⊢ ∀ (a : K), ↑(↑(aeval f) (↑C a)) x = eval μ (↑C a) • x\n[PROOFSTEP]\nintro a\n[GOAL]\ncase refine'_1\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\np : K[X]\nμ : K\nx : V\nh : HasEigenvector f μ x\na : K\n⊢ ↑(↑(aeval f) (↑C a)) x = eval μ (↑C a) • x\n[PROOFSTEP]\nsimp [Module.algebraMap_end_apply]\n[GOAL]\ncase refine'_2\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\np : K[X]\nμ : K\nx : V\nh : HasEigenvector f μ x\n⊢ ∀ (p q : K[X]),\n    ↑(↑(aeval f) p) x = eval μ p • x → ↑(↑(aeval f) q) x = eval μ q • x → ↑(↑(aeval f) (p + q)) x = eval μ (p + q) • x\n[PROOFSTEP]\nintro p q hp hq\n[GOAL]\ncase refine'_2\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\np✝ : K[X]\nμ : K\nx : V\nh : HasEigenvector f μ x\np q : K[X]\nhp : ↑(↑(aeval f) p) x = eval μ p • x\nhq : ↑(↑(aeval f) q) x = eval μ q • x\n⊢ ↑(↑(aeval f) (p + q)) x = eval μ (p + q) • x\n[PROOFSTEP]\nsimp [hp, hq, add_smul]\n[GOAL]\ncase refine'_3\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\np : K[X]\nμ : K\nx : V\nh : HasEigenvector f μ x\n⊢ ∀ (n : ℕ) (a : K),\n    ↑(↑(aeval f) (↑C a * X ^ n)) x = eval μ (↑C a * X ^ n) • x →\n      ↑(↑(aeval f) (↑C a * X ^ (n + 1))) x = eval μ (↑C a * X ^ (n + 1)) • x\n[PROOFSTEP]\nintro n a hna\n[GOAL]\ncase refine'_3\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\np : K[X]\nμ : K\nx : V\nh : HasEigenvector f μ x\nn : ℕ\na : K\nhna : ↑(↑(aeval f) (↑C a * X ^ n)) x = eval μ (↑C a * X ^ n) • x\n⊢ ↑(↑(aeval f) (↑C a * X ^ (n + 1))) x = eval μ (↑C a * X ^ (n + 1)) • x\n[PROOFSTEP]\nrw [mul_comm, pow_succ, mul_assoc, AlgHom.map_mul, LinearMap.mul_apply, mul_comm, hna]\n[GOAL]\ncase refine'_3\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\np : K[X]\nμ : K\nx : V\nh : HasEigenvector f μ x\nn : ℕ\na : K\nhna : ↑(↑(aeval f) (↑C a * X ^ n)) x = eval μ (↑C a * X ^ n) • x\n⊢ ↑(↑(aeval f) X) (eval μ (↑C a * X ^ n) • x) = eval μ (X * (↑C a * X ^ n)) • x\n[PROOFSTEP]\nsimp only [mem_eigenspace_iff.1 h.1, smul_smul, aeval_X, eval_mul, eval_C, eval_pow, eval_X, LinearMap.map_smulₛₗ,\n  RingHom.id_apply, mul_comm]\n[GOAL]\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nμ : K\nh : HasEigenvalue f μ\n⊢ IsRoot (minpoly K f) μ\n[PROOFSTEP]\nrcases(Submodule.ne_bot_iff _).1 h with ⟨w, ⟨H, ne0⟩⟩\n[GOAL]\ncase intro.intro\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nμ : K\nh : HasEigenvalue f μ\nw : V\nH : w ∈ eigenspace f μ\nne0 : w ≠ 0\n⊢ IsRoot (minpoly K f) μ\n[PROOFSTEP]\nrefine' Or.resolve_right (smul_eq_zero.1 _) ne0\n[GOAL]\ncase intro.intro\nK : Type v\nV : Type w\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : End K V\nμ : K\nh : HasEigenvalue f μ\nw : V\nH : w ∈ eigenspace f μ\nne0 : w ≠ 0\n⊢ eval μ (minpoly K f) • w = 0\n[PROOFSTEP]\nsimp [← aeval_apply_of_hasEigenvector ⟨H, ne0⟩, minpoly.aeval K f]\n[GOAL]\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\n⊢ HasEigenvalue f μ\n[PROOFSTEP]\ncases' dvd_iff_isRoot.2 h with p hp\n[GOAL]\ncase intro\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\n⊢ HasEigenvalue f μ\n[PROOFSTEP]\nrw [HasEigenvalue, eigenspace]\n[GOAL]\ncase intro\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\n⊢ LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) ≠ ⊥\n[PROOFSTEP]\nintro con\n[GOAL]\ncase intro\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\n⊢ False\n[PROOFSTEP]\ncases' (LinearMap.isUnit_iff_ker_eq_bot _).2 con with u hu\n[GOAL]\ncase intro.intro\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\nu : (V →ₗ[K] V)ˣ\nhu : ↑u = f - ↑(algebraMap K (End K V)) μ\n⊢ False\n[PROOFSTEP]\nhave p_ne_0 : p ≠ 0 := by\n  intro con\n  apply minpoly.ne_zero f.isIntegral\n  rw [hp, con, mul_zero]\n[GOAL]\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\nu : (V →ₗ[K] V)ˣ\nhu : ↑u = f - ↑(algebraMap K (End K V)) μ\n⊢ p ≠ 0\n[PROOFSTEP]\nintro con\n[GOAL]\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon✝ : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\nu : (V →ₗ[K] V)ˣ\nhu : ↑u = f - ↑(algebraMap K (End K V)) μ\ncon : p = 0\n⊢ False\n[PROOFSTEP]\napply minpoly.ne_zero f.isIntegral\n[GOAL]\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon✝ : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\nu : (V →ₗ[K] V)ˣ\nhu : ↑u = f - ↑(algebraMap K (End K V)) μ\ncon : p = 0\n⊢ minpoly K f = 0\n[PROOFSTEP]\nrw [hp, con, mul_zero]\n[GOAL]\ncase intro.intro\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\nu : (V →ₗ[K] V)ˣ\nhu : ↑u = f - ↑(algebraMap K (End K V)) μ\np_ne_0 : p ≠ 0\n⊢ False\n[PROOFSTEP]\nhave : (aeval f) p = 0 := by\n  have h_aeval := minpoly.aeval K f\n  revert h_aeval\n  simp [hp, ← hu]\n[GOAL]\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\nu : (V →ₗ[K] V)ˣ\nhu : ↑u = f - ↑(algebraMap K (End K V)) μ\np_ne_0 : p ≠ 0\n⊢ ↑(aeval f) p = 0\n[PROOFSTEP]\nhave h_aeval := minpoly.aeval K f\n[GOAL]\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\nu : (V →ₗ[K] V)ˣ\nhu : ↑u = f - ↑(algebraMap K (End K V)) μ\np_ne_0 : p ≠ 0\nh_aeval : ↑(aeval f) (minpoly K f) = 0\n⊢ ↑(aeval f) p = 0\n[PROOFSTEP]\nrevert h_aeval\n[GOAL]\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\nu : (V →ₗ[K] V)ˣ\nhu : ↑u = f - ↑(algebraMap K (End K V)) μ\np_ne_0 : p ≠ 0\n⊢ ↑(aeval f) (minpoly K f) = 0 → ↑(aeval f) p = 0\n[PROOFSTEP]\nsimp [hp, ← hu]\n[GOAL]\ncase intro.intro\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\nu : (V →ₗ[K] V)ˣ\nhu : ↑u = f - ↑(algebraMap K (End K V)) μ\np_ne_0 : p ≠ 0\nthis : ↑(aeval f) p = 0\n⊢ False\n[PROOFSTEP]\nhave h_deg := minpoly.degree_le_of_ne_zero K f p_ne_0 this\n[GOAL]\ncase intro.intro\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\nu : (V →ₗ[K] V)ˣ\nhu : ↑u = f - ↑(algebraMap K (End K V)) μ\np_ne_0 : p ≠ 0\nthis : ↑(aeval f) p = 0\nh_deg : degree (minpoly K f) ≤ degree p\n⊢ False\n[PROOFSTEP]\nrw [hp, degree_mul, degree_X_sub_C, Polynomial.degree_eq_natDegree p_ne_0] at h_deg \n[GOAL]\ncase intro.intro\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\nu : (V →ₗ[K] V)ˣ\nhu : ↑u = f - ↑(algebraMap K (End K V)) μ\np_ne_0 : p ≠ 0\nthis : ↑(aeval f) p = 0\nh_deg : 1 + ↑(natDegree p) ≤ ↑(natDegree p)\n⊢ False\n[PROOFSTEP]\nnorm_cast at h_deg \n[GOAL]\ncase intro.intro\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nμ : K\nh : IsRoot (minpoly K f) μ\np : K[X]\nhp : minpoly K f = (X - ↑C μ) * p\ncon : LinearMap.ker (f - ↑(algebraMap K (End K V)) μ) = ⊥\nu : (V →ₗ[K] V)ˣ\nhu : ↑u = f - ↑(algebraMap K (End K V)) μ\np_ne_0 : p ≠ 0\nthis : ↑(aeval f) p = 0\nh_deg : 1 + natDegree p ≤ natDegree p\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf✝ : End K V\nμ : K\nf : End K V\n⊢ Set.Finite {μ | eigenspace f μ ≠ ⊥}\n[PROOFSTEP]\nhave h : minpoly K f ≠ 0 := minpoly.ne_zero f.isIntegral\n[GOAL]\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf✝ : End K V\nμ : K\nf : End K V\nh : minpoly K f ≠ 0\n⊢ Set.Finite {μ | eigenspace f μ ≠ ⊥}\n[PROOFSTEP]\nconvert (minpoly K f).rootSet_finite K\n[GOAL]\ncase h.e'_2\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf✝ : End K V\nμ : K\nf : End K V\nh : minpoly K f ≠ 0\n⊢ {μ | eigenspace f μ ≠ ⊥} = rootSet (minpoly K f) K\n[PROOFSTEP]\next μ\n[GOAL]\ncase h.e'_2.h\nK : Type v\nV : Type w\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf✝ : End K V\nμ✝ : K\nf : End K V\nh : minpoly K f ≠ 0\nμ : K\n⊢ μ ∈ {μ | eigenspace f μ ≠ ⊥} ↔ μ ∈ rootSet (minpoly K f) K\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, ← HasEigenvalue, hasEigenvalue_iff_isRoot, mem_rootSet_of_ne h, IsRoot, coe_aeval_eq_eval]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Eigenspace.Minpoly", "llama_tokens": 6988, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419831347361, "lm_q2_score": 0.546738151984614, "lm_q1q2_score": 0.3786937978460438}}
{"text": "[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : C\nf : End X\nh : IsIso f\n⊢ f * inv f = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : C\nf : End X\nh : IsIso f\n⊢ inv f * f = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : C\nf g : (End X)ˣ\n⊢ Equiv.toFun\n      { toFun := fun f => Iso.mk (↑f) f.inv,\n        invFun := fun f =>\n          { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X), inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) },\n        left_inv :=\n          (_ :\n            ∀ (x : (End X)ˣ),\n              (fun f =>\n                    { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                      inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                  ((fun f => Iso.mk (↑f) f.inv) x) =\n                x),\n        right_inv :=\n          (_ :\n            ∀ (x : Aut X),\n              (fun f => Iso.mk (↑f) f.inv)\n                  ((fun f =>\n                      { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                        inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                    x) =\n                x) }\n      (f * g) =\n    Equiv.toFun\n        { toFun := fun f => Iso.mk (↑f) f.inv,\n          invFun := fun f =>\n            { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X), inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) },\n          left_inv :=\n            (_ :\n              ∀ (x : (End X)ˣ),\n                (fun f =>\n                      { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                        inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                    ((fun f => Iso.mk (↑f) f.inv) x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : Aut X),\n                (fun f => Iso.mk (↑f) f.inv)\n                    ((fun f =>\n                        { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                          inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                      x) =\n                  x) }\n        f *\n      Equiv.toFun\n        { toFun := fun f => Iso.mk (↑f) f.inv,\n          invFun := fun f =>\n            { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X), inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) },\n          left_inv :=\n            (_ :\n              ∀ (x : (End X)ˣ),\n                (fun f =>\n                      { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                        inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                    ((fun f => Iso.mk (↑f) f.inv) x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : Aut X),\n                (fun f => Iso.mk (↑f) f.inv)\n                    ((fun f =>\n                        { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                          inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                      x) =\n                  x) }\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nC : Type u\ninst✝ : Category.{v, u} C\nX : C\ng : (End X)ˣ\nval✝ inv✝ : End X\nval_inv✝ : val✝ * inv✝ = 1\ninv_val✝ : inv✝ * val✝ = 1\n⊢ Equiv.toFun\n      { toFun := fun f => Iso.mk (↑f) f.inv,\n        invFun := fun f =>\n          { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X), inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) },\n        left_inv :=\n          (_ :\n            ∀ (x : (End X)ˣ),\n              (fun f =>\n                    { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                      inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                  ((fun f => Iso.mk (↑f) f.inv) x) =\n                x),\n        right_inv :=\n          (_ :\n            ∀ (x : Aut X),\n              (fun f => Iso.mk (↑f) f.inv)\n                  ((fun f =>\n                      { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                        inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                    x) =\n                x) }\n      ({ val := val✝, inv := inv✝, val_inv := val_inv✝, inv_val := inv_val✝ } * g) =\n    Equiv.toFun\n        { toFun := fun f => Iso.mk (↑f) f.inv,\n          invFun := fun f =>\n            { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X), inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) },\n          left_inv :=\n            (_ :\n              ∀ (x : (End X)ˣ),\n                (fun f =>\n                      { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                        inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                    ((fun f => Iso.mk (↑f) f.inv) x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : Aut X),\n                (fun f => Iso.mk (↑f) f.inv)\n                    ((fun f =>\n                        { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                          inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                      x) =\n                  x) }\n        { val := val✝, inv := inv✝, val_inv := val_inv✝, inv_val := inv_val✝ } *\n      Equiv.toFun\n        { toFun := fun f => Iso.mk (↑f) f.inv,\n          invFun := fun f =>\n            { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X), inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) },\n          left_inv :=\n            (_ :\n              ∀ (x : (End X)ˣ),\n                (fun f =>\n                      { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                        inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                    ((fun f => Iso.mk (↑f) f.inv) x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : Aut X),\n                (fun f => Iso.mk (↑f) f.inv)\n                    ((fun f =>\n                        { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                          inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                      x) =\n                  x) }\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nC : Type u\ninst✝ : Category.{v, u} C\nX : C\nval✝¹ inv✝¹ : End X\nval_inv✝¹ : val✝¹ * inv✝¹ = 1\ninv_val✝¹ : inv✝¹ * val✝¹ = 1\nval✝ inv✝ : End X\nval_inv✝ : val✝ * inv✝ = 1\ninv_val✝ : inv✝ * val✝ = 1\n⊢ Equiv.toFun\n      { toFun := fun f => Iso.mk (↑f) f.inv,\n        invFun := fun f =>\n          { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X), inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) },\n        left_inv :=\n          (_ :\n            ∀ (x : (End X)ˣ),\n              (fun f =>\n                    { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                      inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                  ((fun f => Iso.mk (↑f) f.inv) x) =\n                x),\n        right_inv :=\n          (_ :\n            ∀ (x : Aut X),\n              (fun f => Iso.mk (↑f) f.inv)\n                  ((fun f =>\n                      { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                        inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                    x) =\n                x) }\n      ({ val := val✝¹, inv := inv✝¹, val_inv := val_inv✝¹, inv_val := inv_val✝¹ } *\n        { val := val✝, inv := inv✝, val_inv := val_inv✝, inv_val := inv_val✝ }) =\n    Equiv.toFun\n        { toFun := fun f => Iso.mk (↑f) f.inv,\n          invFun := fun f =>\n            { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X), inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) },\n          left_inv :=\n            (_ :\n              ∀ (x : (End X)ˣ),\n                (fun f =>\n                      { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                        inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                    ((fun f => Iso.mk (↑f) f.inv) x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : Aut X),\n                (fun f => Iso.mk (↑f) f.inv)\n                    ((fun f =>\n                        { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                          inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                      x) =\n                  x) }\n        { val := val✝¹, inv := inv✝¹, val_inv := val_inv✝¹, inv_val := inv_val✝¹ } *\n      Equiv.toFun\n        { toFun := fun f => Iso.mk (↑f) f.inv,\n          invFun := fun f =>\n            { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X), inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) },\n          left_inv :=\n            (_ :\n              ∀ (x : (End X)ˣ),\n                (fun f =>\n                      { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                        inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                    ((fun f => Iso.mk (↑f) f.inv) x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : Aut X),\n                (fun f => Iso.mk (↑f) f.inv)\n                    ((fun f =>\n                        { val := f.hom, inv := f.inv, val_inv := (_ : f.inv ≫ f.hom = 𝟙 X),\n                          inv_val := (_ : f.hom ≫ f.inv = 𝟙 X) })\n                      x) =\n                  x) }\n        { val := val✝, inv := inv✝, val_inv := val_inv✝, inv_val := inv_val✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X Y : C\nh : X ≅ Y\nx✝ : Aut X\n⊢ (fun y => Iso.mk (h.hom ≫ y.hom ≫ h.inv) (h.hom ≫ y.inv ≫ h.inv))\n      ((fun x => Iso.mk (h.inv ≫ x.hom ≫ h.hom) (h.inv ≫ x.inv ≫ h.hom)) x✝) =\n    x✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X Y : C\nh : X ≅ Y\nx✝ : Aut Y\n⊢ (fun x => Iso.mk (h.inv ≫ x.hom ≫ h.hom) (h.inv ≫ x.inv ≫ h.hom))\n      ((fun y => Iso.mk (h.hom ≫ y.hom ≫ h.inv) (h.hom ≫ y.inv ≫ h.inv)) x✝) =\n    x✝\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ X Y : C\nh : X ≅ Y\n⊢ ∀ (x y : Aut X),\n    Equiv.toFun\n        { toFun := fun x => Iso.mk (h.inv ≫ x.hom ≫ h.hom) (h.inv ≫ x.inv ≫ h.hom),\n          invFun := fun y => Iso.mk (h.hom ≫ y.hom ≫ h.inv) (h.hom ≫ y.inv ≫ h.inv),\n          left_inv :=\n            (_ :\n              ∀ (x : Aut X),\n                (fun y => Iso.mk (h.hom ≫ y.hom ≫ h.inv) (h.hom ≫ y.inv ≫ h.inv))\n                    ((fun x => Iso.mk (h.inv ≫ x.hom ≫ h.hom) (h.inv ≫ x.inv ≫ h.hom)) x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : Aut Y),\n                (fun x => Iso.mk (h.inv ≫ x.hom ≫ h.hom) (h.inv ≫ x.inv ≫ h.hom))\n                    ((fun y => Iso.mk (h.hom ≫ y.hom ≫ h.inv) (h.hom ≫ y.inv ≫ h.inv)) x) =\n                  x) }\n        (x * y) =\n      Equiv.toFun\n          { toFun := fun x => Iso.mk (h.inv ≫ x.hom ≫ h.hom) (h.inv ≫ x.inv ≫ h.hom),\n            invFun := fun y => Iso.mk (h.hom ≫ y.hom ≫ h.inv) (h.hom ≫ y.inv ≫ h.inv),\n            left_inv :=\n              (_ :\n                ∀ (x : Aut X),\n                  (fun y => Iso.mk (h.hom ≫ y.hom ≫ h.inv) (h.hom ≫ y.inv ≫ h.inv))\n                      ((fun x => Iso.mk (h.inv ≫ x.hom ≫ h.hom) (h.inv ≫ x.inv ≫ h.hom)) x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : Aut Y),\n                  (fun x => Iso.mk (h.inv ≫ x.hom ≫ h.hom) (h.inv ≫ x.inv ≫ h.hom))\n                      ((fun y => Iso.mk (h.hom ≫ y.hom ≫ h.inv) (h.hom ≫ y.inv ≫ h.inv)) x) =\n                    x) }\n          x *\n        Equiv.toFun\n          { toFun := fun x => Iso.mk (h.inv ≫ x.hom ≫ h.hom) (h.inv ≫ x.inv ≫ h.hom),\n            invFun := fun y => Iso.mk (h.hom ≫ y.hom ≫ h.inv) (h.hom ≫ y.inv ≫ h.inv),\n            left_inv :=\n              (_ :\n                ∀ (x : Aut X),\n                  (fun y => Iso.mk (h.hom ≫ y.hom ≫ h.inv) (h.hom ≫ y.inv ≫ h.inv))\n                      ((fun x => Iso.mk (h.inv ≫ x.hom ≫ h.hom) (h.inv ≫ x.inv ≫ h.hom)) x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : Aut Y),\n                  (fun x => Iso.mk (h.inv ≫ x.hom ≫ h.hom) (h.inv ≫ x.inv ≫ h.hom))\n                      ((fun y => Iso.mk (h.hom ≫ y.hom ≫ h.inv) (h.hom ≫ y.inv ≫ h.inv)) x) =\n                    x) }\n          y\n[PROOFSTEP]\nsimp [Aut_mul_def]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Endomorphism", "llama_tokens": 5030, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419831347361, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.3786937978460437}}
{"text": "[GOAL]\nα : Type u\nh h' : LE α\nc : BoundedOrder α\ntop : α\n⊢ Top α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nh h' : LE α\nc : BoundedOrder α\ntop : α\neq_top : top = ⊤\nbot : α\n⊢ Bot α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nh h' : LE α\nc : BoundedOrder α\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nle_eq : ∀ (x y : α), x ≤ y ↔ x ≤ y\nx✝ : α\n⊢ x✝ ≤ ⊤\n[PROOFSTEP]\nsimp [eq_top, le_eq]\n[GOAL]\nα : Type u\nh h' : LE α\nc : BoundedOrder α\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nle_eq : ∀ (x y : α), x ≤ y ↔ x ≤ y\nx✝ : α\n⊢ ⊥ ≤ x✝\n[PROOFSTEP]\nsimp [eq_bot, le_eq]\n[GOAL]\nα : Type u\nc : Lattice α\nle : α → α → Prop\n⊢ LE α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\n⊢ Sup α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\n⊢ Inf α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ Lattice α\n[PROOFSTEP]\nrefine' { le := le, sup := sup, inf := inf, lt := fun a b ↦ le a b ∧ ¬le b a .. }\n[GOAL]\ncase refine'_1\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a : α), a ≤ a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ : α\n⊢ a✝ ≤ a✝\n[PROOFSTEP]\nsimp [eq_le]\n[GOAL]\ncase refine'_2\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\n[PROOFSTEP]\nintro _ _ _ hab hbc\n[GOAL]\ncase refine'_2\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ c✝ : α\nhab : a✝ ≤ b✝\nhbc : b✝ ≤ c✝\n⊢ a✝ ≤ c✝\n[PROOFSTEP]\nrw [eq_le] at hab hbc ⊢\n[GOAL]\ncase refine'_2\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ c✝ : α\nhab : a✝ ≤ b✝\nhbc : b✝ ≤ c✝\n⊢ a✝ ≤ c✝\n[PROOFSTEP]\nexact le_trans hab hbc\n[GOAL]\ncase refine'_3\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\n⊢ a✝ < b✝ ↔ a✝ ≤ b✝ ∧ ¬b✝ ≤ a✝\n[PROOFSTEP]\nsimp [eq_le]\n[GOAL]\ncase refine'_4\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b : α), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nintro _ _ hab hba\n[GOAL]\ncase refine'_4\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\nhab : a✝ ≤ b✝\nhba : b✝ ≤ a✝\n⊢ a✝ = b✝\n[PROOFSTEP]\nsimp_rw [eq_le] at hab hba \n[GOAL]\ncase refine'_4\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\nhab : a✝ ≤ b✝\nhba : b✝ ≤ a✝\n⊢ a✝ = b✝\n[PROOFSTEP]\nexact le_antisymm hab hba\n[GOAL]\ncase refine'_5\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b : α), a ≤ a ⊔ b\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\n⊢ a✝ ≤ a✝ ⊔ b✝\n[PROOFSTEP]\nsimp [eq_le, eq_sup]\n[GOAL]\ncase refine'_6\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b : α), b ≤ a ⊔ b\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\n⊢ b✝ ≤ a✝ ⊔ b✝\n[PROOFSTEP]\nsimp [eq_le, eq_sup]\n[GOAL]\ncase refine'_7\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b c_1 : α), a ≤ c_1 → b ≤ c_1 → a ⊔ b ≤ c_1\n[PROOFSTEP]\nintro _ _ _ hac hbc\n[GOAL]\ncase refine'_7\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ c✝ : α\nhac : a✝ ≤ c✝\nhbc : b✝ ≤ c✝\n⊢ a✝ ⊔ b✝ ≤ c✝\n[PROOFSTEP]\nsimp_rw [eq_le] at hac hbc ⊢\n[GOAL]\ncase refine'_7\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ c✝ : α\nhac : a✝ ≤ c✝\nhbc : b✝ ≤ c✝\n⊢ sup a✝ b✝ ≤ c✝\n[PROOFSTEP]\nsimp [eq_sup, hac, hbc]\n[GOAL]\ncase refine'_8\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b : α), a ⊓ b ≤ a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_8\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\n⊢ a✝ ⊓ b✝ ≤ a✝\n[PROOFSTEP]\nsimp [eq_le, eq_inf]\n[GOAL]\ncase refine'_9\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b : α), a ⊓ b ≤ b\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_9\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\n⊢ a✝ ⊓ b✝ ≤ b✝\n[PROOFSTEP]\nsimp [eq_le, eq_inf]\n[GOAL]\ncase refine'_10\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b c_1 : α), a ≤ b → a ≤ c_1 → a ≤ b ⊓ c_1\n[PROOFSTEP]\nintro _ _ _ hac hbc\n[GOAL]\ncase refine'_10\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ c✝ : α\nhac : a✝ ≤ b✝\nhbc : a✝ ≤ c✝\n⊢ a✝ ≤ b✝ ⊓ c✝\n[PROOFSTEP]\nsimp_rw [eq_le] at hac hbc ⊢\n[GOAL]\ncase refine'_10\nα : Type u\nc : Lattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ c✝ : α\nhac : a✝ ≤ b✝\nhbc : a✝ ≤ c✝\n⊢ a✝ ≤ inf b✝ c✝\n[PROOFSTEP]\nsimp [eq_inf, hac, hbc]\n[GOAL]\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\n⊢ LE α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\n⊢ Sup α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\n⊢ Inf α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ DistribLattice α\n[PROOFSTEP]\nrefine' { le := le, sup := sup, inf := inf, lt := fun a b ↦ le a b ∧ ¬le b a .. }\n[GOAL]\ncase refine'_1\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a : α), a ≤ a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ : α\n⊢ a✝ ≤ a✝\n[PROOFSTEP]\nsimp [eq_le]\n[GOAL]\ncase refine'_2\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\n[PROOFSTEP]\nintro _ _ _ hab hbc\n[GOAL]\ncase refine'_2\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ c✝ : α\nhab : a✝ ≤ b✝\nhbc : b✝ ≤ c✝\n⊢ a✝ ≤ c✝\n[PROOFSTEP]\nrw [eq_le] at hab hbc ⊢\n[GOAL]\ncase refine'_2\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ c✝ : α\nhab : a✝ ≤ b✝\nhbc : b✝ ≤ c✝\n⊢ a✝ ≤ c✝\n[PROOFSTEP]\nexact le_trans hab hbc\n[GOAL]\ncase refine'_3\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\n⊢ a✝ < b✝ ↔ a✝ ≤ b✝ ∧ ¬b✝ ≤ a✝\n[PROOFSTEP]\nsimp [eq_le]\n[GOAL]\ncase refine'_4\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b : α), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nintro _ _ hab hba\n[GOAL]\ncase refine'_4\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\nhab : a✝ ≤ b✝\nhba : b✝ ≤ a✝\n⊢ a✝ = b✝\n[PROOFSTEP]\nsimp_rw [eq_le] at hab hba \n[GOAL]\ncase refine'_4\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\nhab : a✝ ≤ b✝\nhba : b✝ ≤ a✝\n⊢ a✝ = b✝\n[PROOFSTEP]\nexact le_antisymm hab hba\n[GOAL]\ncase refine'_5\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b : α), a ≤ a ⊔ b\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\n⊢ a✝ ≤ a✝ ⊔ b✝\n[PROOFSTEP]\nsimp [eq_le, eq_sup]\n[GOAL]\ncase refine'_6\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b : α), b ≤ a ⊔ b\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\n⊢ b✝ ≤ a✝ ⊔ b✝\n[PROOFSTEP]\nsimp [eq_le, eq_sup]\n[GOAL]\ncase refine'_7\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b c_1 : α), a ≤ c_1 → b ≤ c_1 → a ⊔ b ≤ c_1\n[PROOFSTEP]\nintro _ _ _ hac hbc\n[GOAL]\ncase refine'_7\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ c✝ : α\nhac : a✝ ≤ c✝\nhbc : b✝ ≤ c✝\n⊢ a✝ ⊔ b✝ ≤ c✝\n[PROOFSTEP]\nsimp_rw [eq_le] at hac hbc ⊢\n[GOAL]\ncase refine'_7\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ c✝ : α\nhac : a✝ ≤ c✝\nhbc : b✝ ≤ c✝\n⊢ sup a✝ b✝ ≤ c✝\n[PROOFSTEP]\nsimp [eq_sup, hac, hbc]\n[GOAL]\ncase refine'_8\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b : α), a ⊓ b ≤ a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_8\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\n⊢ a✝ ⊓ b✝ ≤ a✝\n[PROOFSTEP]\nsimp [eq_le, eq_inf]\n[GOAL]\ncase refine'_9\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b : α), a ⊓ b ≤ b\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_9\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ : α\n⊢ a✝ ⊓ b✝ ≤ b✝\n[PROOFSTEP]\nsimp [eq_le, eq_inf]\n[GOAL]\ncase refine'_10\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (a b c_1 : α), a ≤ b → a ≤ c_1 → a ≤ b ⊓ c_1\n[PROOFSTEP]\nintro _ _ _ hac hbc\n[GOAL]\ncase refine'_10\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ c✝ : α\nhac : a✝ ≤ b✝\nhbc : a✝ ≤ c✝\n⊢ a✝ ≤ b✝ ⊓ c✝\n[PROOFSTEP]\nsimp_rw [eq_le] at hac hbc ⊢\n[GOAL]\ncase refine'_10\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\na✝ b✝ c✝ : α\nhac : a✝ ≤ b✝\nhbc : a✝ ≤ c✝\n⊢ a✝ ≤ inf b✝ c✝\n[PROOFSTEP]\nsimp [eq_inf, hac, hbc]\n[GOAL]\ncase refine'_11\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\n⊢ ∀ (x y z : α), (x ⊔ y) ⊓ (x ⊔ z) ≤ x ⊔ y ⊓ z\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_11\nα : Type u\nc : DistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nx✝ y✝ z✝ : α\n⊢ (x✝ ⊔ y✝) ⊓ (x✝ ⊔ z✝) ≤ x✝ ⊔ y✝ ⊓ z✝\n[PROOFSTEP]\nsimp [eq_le, eq_inf, eq_sup, le_sup_inf]\n[GOAL]\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\n⊢ LE α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\n⊢ Top α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\n⊢ Bot α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\n⊢ Sup α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\n⊢ Inf α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\n⊢ SupSet α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\n⊢ InfSet α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ CompleteLattice α\n[PROOFSTEP]\nrefine'\n  { Lattice.copy (@CompleteLattice.toLattice α c) le eq_le sup eq_sup inf eq_inf with le := le, top := top, bot := bot,\n    sup := sup, inf := inf, sSup := sSup, sInf := sInf .. }\n[GOAL]\ncase refine'_1\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : Lattice α := Lattice.copy toLattice le eq_le sup eq_sup inf eq_inf\n⊢ ∀ (s : Set α) (a : α), a ∈ s → a ≤ SupSet.sSup s\n[PROOFSTEP]\nintro _ _ h\n[GOAL]\ncase refine'_1\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : Lattice α := Lattice.copy toLattice le eq_le sup eq_sup inf eq_inf\ns✝ : Set α\na✝ : α\nh : a✝ ∈ s✝\n⊢ a✝ ≤ SupSet.sSup s✝\n[PROOFSTEP]\nsimp [eq_le, eq_sSup, le_sSup _ _ h]\n[GOAL]\ncase refine'_2\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : Lattice α := Lattice.copy toLattice le eq_le sup eq_sup inf eq_inf\n⊢ ∀ (s : Set α) (a : α), (∀ (b : α), b ∈ s → b ≤ a) → SupSet.sSup s ≤ a\n[PROOFSTEP]\nintro _ _ h\n[GOAL]\ncase refine'_2\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : Lattice α := Lattice.copy toLattice le eq_le sup eq_sup inf eq_inf\ns✝ : Set α\na✝ : α\nh : ∀ (b : α), b ∈ s✝ → b ≤ a✝\n⊢ SupSet.sSup s✝ ≤ a✝\n[PROOFSTEP]\nsimpa [eq_le, eq_sSup] using h\n[GOAL]\ncase refine'_3\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : Lattice α := Lattice.copy toLattice le eq_le sup eq_sup inf eq_inf\n⊢ ∀ (s : Set α) (a : α), a ∈ s → InfSet.sInf s ≤ a\n[PROOFSTEP]\nintro _ _ h\n[GOAL]\ncase refine'_3\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : Lattice α := Lattice.copy toLattice le eq_le sup eq_sup inf eq_inf\ns✝ : Set α\na✝ : α\nh : a✝ ∈ s✝\n⊢ InfSet.sInf s✝ ≤ a✝\n[PROOFSTEP]\nsimp [eq_le, eq_sInf, sInf_le _ _ h]\n[GOAL]\ncase refine'_4\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : Lattice α := Lattice.copy toLattice le eq_le sup eq_sup inf eq_inf\n⊢ ∀ (s : Set α) (a : α), (∀ (b : α), b ∈ s → a ≤ b) → a ≤ InfSet.sInf s\n[PROOFSTEP]\nintro _ _ h\n[GOAL]\ncase refine'_4\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : Lattice α := Lattice.copy toLattice le eq_le sup eq_sup inf eq_inf\ns✝ : Set α\na✝ : α\nh : ∀ (b : α), b ∈ s✝ → a✝ ≤ b\n⊢ a✝ ≤ InfSet.sInf s✝\n[PROOFSTEP]\nsimpa [eq_le, eq_sInf] using h\n[GOAL]\ncase refine'_5\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : Lattice α := Lattice.copy toLattice le eq_le sup eq_sup inf eq_inf\n⊢ ∀ (x : α), x ≤ ⊤\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : Lattice α := Lattice.copy toLattice le eq_le sup eq_sup inf eq_inf\nx✝ : α\n⊢ x✝ ≤ ⊤\n[PROOFSTEP]\nsimp [eq_le, eq_top]\n[GOAL]\ncase refine'_6\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : Lattice α := Lattice.copy toLattice le eq_le sup eq_sup inf eq_inf\n⊢ ∀ (x : α), ⊥ ≤ x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\nα : Type u\nc : CompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : Lattice α := Lattice.copy toLattice le eq_le sup eq_sup inf eq_inf\nx✝ : α\n⊢ ⊥ ≤ x✝\n[PROOFSTEP]\nsimp [eq_le, eq_bot]\n[GOAL]\nα : Type u\nc : Frame α\nle : α → α → Prop\n⊢ LE α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Frame α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\n⊢ Top α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Frame α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\n⊢ Bot α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Frame α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\n⊢ Sup α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Frame α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\n⊢ Inf α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Frame α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\n⊢ SupSet α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Frame α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\n⊢ InfSet α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Frame α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : CompleteLattice α :=\n  CompleteLattice.copy Frame.toCompleteLattice le eq_le top eq_top bot eq_bot sup eq_sup inf eq_inf sSup eq_sSup sInf\n    eq_sInf\na : α\ns : Set α\n⊢ a ⊓ SupSet.sSup s ≤ ⨆ (b : α) (_ : b ∈ s), a ⊓ b\n[PROOFSTEP]\nsimp [eq_le, eq_sup, eq_inf, eq_sSup, @Order.Frame.inf_sSup_le_iSup_inf α _ a s]\n[GOAL]\nα : Type u\nc : Coframe α\nle : α → α → Prop\n⊢ LE α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Coframe α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\n⊢ Top α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Coframe α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\n⊢ Bot α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Coframe α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\n⊢ Sup α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Coframe α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\n⊢ Inf α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Coframe α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\n⊢ SupSet α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Coframe α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\n⊢ InfSet α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : Coframe α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\nsrc✝ : CompleteLattice α :=\n  CompleteLattice.copy Coframe.toCompleteLattice le eq_le top eq_top bot eq_bot sup eq_sup inf eq_inf sSup eq_sSup sInf\n    eq_sInf\na : α\ns : Set α\n⊢ ⨅ (b : α) (_ : b ∈ s), a ⊔ b ≤ a ⊔ InfSet.sInf s\n[PROOFSTEP]\nsimp [eq_le, eq_sup, eq_inf, eq_sInf, @Order.Coframe.iInf_sup_le_sup_sInf α _ a s]\n[GOAL]\nα : Type u\nc : CompleteDistribLattice α\nle : α → α → Prop\n⊢ LE α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteDistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\n⊢ Top α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteDistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\n⊢ Bot α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteDistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\n⊢ Sup α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteDistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\n⊢ Inf α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteDistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\n⊢ SupSet α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : CompleteDistribLattice α\nle : α → α → Prop\neq_le : le = LE.le\ntop : α\neq_top : top = ⊤\nbot : α\neq_bot : bot = ⊥\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\n⊢ InfSet α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\n⊢ LE α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\n⊢ Sup α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\n⊢ Inf α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\n⊢ SupSet α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\n⊢ InfSet α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ConditionallyCompleteLattice α\n[PROOFSTEP]\nrefine' { le := le, sup := sup, inf := inf, sSup := sSup, sInf := sInf .. }\n[GOAL]\ncase refine'_1\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ α → α → Prop\n[PROOFSTEP]\nintro a b\n[GOAL]\ncase refine'_1\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na b : α\n⊢ Prop\n[PROOFSTEP]\nexact le a b ∧ ¬le b a\n[GOAL]\ncase refine'_2\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (a : α), a ≤ a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ : α\n⊢ a✝ ≤ a✝\n[PROOFSTEP]\nsimp [eq_le]\n[GOAL]\ncase refine'_3\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\n[PROOFSTEP]\nintro _ _ _ hab hbc\n[GOAL]\ncase refine'_3\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ c✝ : α\nhab : a✝ ≤ b✝\nhbc : b✝ ≤ c✝\n⊢ a✝ ≤ c✝\n[PROOFSTEP]\nrw [eq_le] at hab hbc ⊢\n[GOAL]\ncase refine'_3\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ c✝ : α\nhab : a✝ ≤ b✝\nhbc : b✝ ≤ c✝\n⊢ a✝ ≤ c✝\n[PROOFSTEP]\nexact le_trans hab hbc\n[GOAL]\ncase refine'_4\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ : α\n⊢ a✝ < b✝ ↔ a✝ ≤ b✝ ∧ ¬b✝ ≤ a✝\n[PROOFSTEP]\nsimp [eq_le]\n[GOAL]\ncase refine'_5\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (a b : α), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nintro _ _ hab hba\n[GOAL]\ncase refine'_5\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ : α\nhab : a✝ ≤ b✝\nhba : b✝ ≤ a✝\n⊢ a✝ = b✝\n[PROOFSTEP]\nsimp_rw [eq_le] at hab hba \n[GOAL]\ncase refine'_5\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ : α\nhab : a✝ ≤ b✝\nhba : b✝ ≤ a✝\n⊢ a✝ = b✝\n[PROOFSTEP]\nexact le_antisymm hab hba\n[GOAL]\ncase refine'_6\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (a b : α), a ≤ a ⊔ b\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ : α\n⊢ a✝ ≤ a✝ ⊔ b✝\n[PROOFSTEP]\nsimp [eq_le, eq_sup]\n[GOAL]\ncase refine'_7\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (a b : α), b ≤ a ⊔ b\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_7\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ : α\n⊢ b✝ ≤ a✝ ⊔ b✝\n[PROOFSTEP]\nsimp [eq_le, eq_sup]\n[GOAL]\ncase refine'_8\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (a b c_1 : α), a ≤ c_1 → b ≤ c_1 → a ⊔ b ≤ c_1\n[PROOFSTEP]\nintro _ _ _ hac hbc\n[GOAL]\ncase refine'_8\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ c✝ : α\nhac : a✝ ≤ c✝\nhbc : b✝ ≤ c✝\n⊢ a✝ ⊔ b✝ ≤ c✝\n[PROOFSTEP]\nsimp_rw [eq_le] at hac hbc ⊢\n[GOAL]\ncase refine'_8\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ c✝ : α\nhac : a✝ ≤ c✝\nhbc : b✝ ≤ c✝\n⊢ sup a✝ b✝ ≤ c✝\n[PROOFSTEP]\nsimp [eq_sup, hac, hbc]\n[GOAL]\ncase refine'_9\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (a b : α), a ⊓ b ≤ a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_9\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ : α\n⊢ a✝ ⊓ b✝ ≤ a✝\n[PROOFSTEP]\nsimp [eq_le, eq_inf]\n[GOAL]\ncase refine'_10\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (a b : α), a ⊓ b ≤ b\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_10\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ : α\n⊢ a✝ ⊓ b✝ ≤ b✝\n[PROOFSTEP]\nsimp [eq_le, eq_inf]\n[GOAL]\ncase refine'_11\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (a b c_1 : α), a ≤ b → a ≤ c_1 → a ≤ b ⊓ c_1\n[PROOFSTEP]\nintro _ _ _ hac hbc\n[GOAL]\ncase refine'_11\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ c✝ : α\nhac : a✝ ≤ b✝\nhbc : a✝ ≤ c✝\n⊢ a✝ ≤ b✝ ⊓ c✝\n[PROOFSTEP]\nsimp_rw [eq_le] at hac hbc ⊢\n[GOAL]\ncase refine'_11\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\na✝ b✝ c✝ : α\nhac : a✝ ≤ b✝\nhbc : a✝ ≤ c✝\n⊢ a✝ ≤ inf b✝ c✝\n[PROOFSTEP]\nsimp [eq_inf, hac, hbc]\n[GOAL]\ncase refine'_12\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (s : Set α) (a : α), BddAbove s → a ∈ s → a ≤ SupSet.sSup s\n[PROOFSTEP]\nintro _ _ hb h\n[GOAL]\ncase refine'_12\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\ns✝ : Set α\na✝ : α\nhb : BddAbove s✝\nh : a✝ ∈ s✝\n⊢ a✝ ≤ SupSet.sSup s✝\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase refine'_12\nα : Type u\nc : ConditionallyCompleteLattice α\ns✝ : Set α\na✝ : α\nh : a✝ ∈ s✝\nhb : BddAbove s✝\n⊢ a✝ ≤ sSup s✝\n[PROOFSTEP]\nexact le_csSup _ _ hb h\n[GOAL]\ncase refine'_13\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (s : Set α) (a : α), Set.Nonempty s → a ∈ upperBounds s → SupSet.sSup s ≤ a\n[PROOFSTEP]\nintro _ _ hb h\n[GOAL]\ncase refine'_13\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\ns✝ : Set α\na✝ : α\nhb : Set.Nonempty s✝\nh : a✝ ∈ upperBounds s✝\n⊢ SupSet.sSup s✝ ≤ a✝\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase refine'_13\nα : Type u\nc : ConditionallyCompleteLattice α\ns✝ : Set α\na✝ : α\nhb : Set.Nonempty s✝\nh : a✝ ∈ upperBounds s✝\n⊢ sSup s✝ ≤ a✝\n[PROOFSTEP]\nexact csSup_le _ _ hb h\n[GOAL]\ncase refine'_14\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (s : Set α) (a : α), BddBelow s → a ∈ s → InfSet.sInf s ≤ a\n[PROOFSTEP]\nintro _ _ hb h\n[GOAL]\ncase refine'_14\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\ns✝ : Set α\na✝ : α\nhb : BddBelow s✝\nh : a✝ ∈ s✝\n⊢ InfSet.sInf s✝ ≤ a✝\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase refine'_14\nα : Type u\nc : ConditionallyCompleteLattice α\ns✝ : Set α\na✝ : α\nh : a✝ ∈ s✝\nhb : BddBelow s✝\n⊢ sInf s✝ ≤ a✝\n[PROOFSTEP]\nexact csInf_le _ _ hb h\n[GOAL]\ncase refine'_15\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\n⊢ ∀ (s : Set α) (a : α), Set.Nonempty s → a ∈ lowerBounds s → a ≤ InfSet.sInf s\n[PROOFSTEP]\nintro _ _ hb h\n[GOAL]\ncase refine'_15\nα : Type u\nc : ConditionallyCompleteLattice α\nle : α → α → Prop\neq_le : le = LE.le\nsup : α → α → α\neq_sup : sup = Sup.sup\ninf : α → α → α\neq_inf : inf = Inf.inf\nsSup : Set α → α\neq_sSup : sSup = SupSet.sSup\nsInf : Set α → α\neq_sInf : sInf = InfSet.sInf\ns✝ : Set α\na✝ : α\nhb : Set.Nonempty s✝\nh : a✝ ∈ lowerBounds s✝\n⊢ a✝ ≤ InfSet.sInf s✝\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase refine'_15\nα : Type u\nc : ConditionallyCompleteLattice α\ns✝ : Set α\na✝ : α\nhb : Set.Nonempty s✝\nh : a✝ ∈ lowerBounds s✝\n⊢ a✝ ≤ sInf s✝\n[PROOFSTEP]\nexact le_csInf _ _ hb h\n", "meta": {"mathlib_filename": "Mathlib.Order.Copy", "llama_tokens": 20660, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7025300449389326, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.37865190625104933}}
{"text": "[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np✝ : ℕ\nμ✝ : Measure Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\n⊢ ℝ\n[PROOFSTEP]\nhave m := fun (x : Ω) =>\n  μ[X]\n    -- Porting note: Lean deems `μ[(X - fun x => μ[X]) ^ p]` ambiguous\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm✝ : MeasurableSpace Ω\nX✝ : Ω → ℝ\np✝ : ℕ\nμ✝ : Measure Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nm : Ω → ℝ\n⊢ ℝ\n[PROOFSTEP]\nexact μ[(X - m) ^ p]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nhp : p ≠ 0\n⊢ moment 0 p μ = 0\n[PROOFSTEP]\nsimp only [moment, hp, zero_pow', Ne.def, not_false_iff, Pi.zero_apply, integral_const, smul_eq_mul, mul_zero]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nhp : p ≠ 0\n⊢ centralMoment 0 p μ = 0\n[PROOFSTEP]\nsimp only [centralMoment, hp, Pi.zero_apply, integral_const, smul_eq_mul, mul_zero, zero_sub, Pi.pow_apply,\n  Pi.neg_apply, neg_zero, zero_pow', Ne.def, not_false_iff]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nh_int : Integrable X\n⊢ centralMoment X 1 μ = (1 - ENNReal.toReal (↑↑μ Set.univ)) * ∫ (x : Ω), X x ∂μ\n[PROOFSTEP]\nsimp only [centralMoment, Pi.sub_apply, pow_one]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nh_int : Integrable X\n⊢ ∫ (x : Ω), X x - ∫ (x : Ω), X x ∂μ ∂μ = (1 - ENNReal.toReal (↑↑μ Set.univ)) * ∫ (x : Ω), X x ∂μ\n[PROOFSTEP]\nrw [integral_sub h_int (integrable_const _)]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nh_int : Integrable X\n⊢ ∫ (a : Ω), X a ∂μ - ∫ (a : Ω), ∫ (x : Ω), X x ∂μ ∂μ = (1 - ENNReal.toReal (↑↑μ Set.univ)) * ∫ (x : Ω), X x ∂μ\n[PROOFSTEP]\nsimp only [sub_mul, integral_const, smul_eq_mul, one_mul]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsProbabilityMeasure μ\n⊢ centralMoment X 1 μ = 0\n[PROOFSTEP]\nby_cases h_int : Integrable X μ\n[GOAL]\ncase pos\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsProbabilityMeasure μ\nh_int : Integrable X\n⊢ centralMoment X 1 μ = 0\n[PROOFSTEP]\nrw [centralMoment_one' h_int]\n[GOAL]\ncase pos\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsProbabilityMeasure μ\nh_int : Integrable X\n⊢ (1 - ENNReal.toReal (↑↑μ Set.univ)) * ∫ (x : Ω), X x ∂μ = 0\n[PROOFSTEP]\nsimp only [measure_univ, ENNReal.one_toReal, sub_self, zero_mul]\n[GOAL]\ncase neg\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsProbabilityMeasure μ\nh_int : ¬Integrable X\n⊢ centralMoment X 1 μ = 0\n[PROOFSTEP]\nsimp only [centralMoment, Pi.sub_apply, pow_one]\n[GOAL]\ncase neg\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsProbabilityMeasure μ\nh_int : ¬Integrable X\n⊢ ∫ (x : Ω), X x - ∫ (x : Ω), X x ∂μ ∂μ = 0\n[PROOFSTEP]\nhave : ¬Integrable (fun x => X x - integral μ X) μ :=\n  by\n  refine' fun h_sub => h_int _\n  have h_add : X = (fun x => X x - integral μ X) + fun _ => integral μ X := by ext1 x; simp\n  rw [h_add]\n  exact h_sub.add (integrable_const _)\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsProbabilityMeasure μ\nh_int : ¬Integrable X\n⊢ ¬Integrable fun x => X x - integral μ X\n[PROOFSTEP]\nrefine' fun h_sub => h_int _\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsProbabilityMeasure μ\nh_int : ¬Integrable X\nh_sub : Integrable fun x => X x - integral μ X\n⊢ Integrable X\n[PROOFSTEP]\nhave h_add : X = (fun x => X x - integral μ X) + fun _ => integral μ X := by ext1 x; simp\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsProbabilityMeasure μ\nh_int : ¬Integrable X\nh_sub : Integrable fun x => X x - integral μ X\n⊢ X = (fun x => X x - integral μ X) + fun x => integral μ X\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsProbabilityMeasure μ\nh_int : ¬Integrable X\nh_sub : Integrable fun x => X x - integral μ X\nx : Ω\n⊢ X x = ((fun x => X x - integral μ X) + fun x => integral μ X) x\n[PROOFSTEP]\nsimp\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsProbabilityMeasure μ\nh_int : ¬Integrable X\nh_sub : Integrable fun x => X x - integral μ X\nh_add : X = (fun x => X x - integral μ X) + fun x => integral μ X\n⊢ Integrable X\n[PROOFSTEP]\nrw [h_add]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsProbabilityMeasure μ\nh_int : ¬Integrable X\nh_sub : Integrable fun x => X x - integral μ X\nh_add : X = (fun x => X x - integral μ X) + fun x => integral μ X\n⊢ Integrable ((fun x => X x - integral μ X) + fun x => integral μ X)\n[PROOFSTEP]\nexact h_sub.add (integrable_const _)\n[GOAL]\ncase neg\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsProbabilityMeasure μ\nh_int : ¬Integrable X\nthis : ¬Integrable fun x => X x - integral μ X\n⊢ ∫ (x : Ω), X x - ∫ (x : Ω), X x ∂μ ∂μ = 0\n[PROOFSTEP]\nrw [integral_undef this]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\n⊢ centralMoment X 2 μ = variance X μ\n[PROOFSTEP]\nrw [hX.variance_eq]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nhX : Memℒp X 2\n⊢ centralMoment X 2 μ = ∫ (x : Ω), ((X - fun x => ∫ (x : Ω), X x ∂μ) ^ 2) x ∂μ\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\n⊢ mgf 0 μ t = ENNReal.toReal (↑↑μ Set.univ)\n[PROOFSTEP]\nsimp only [mgf, Pi.zero_apply, mul_zero, exp_zero, integral_const, smul_eq_mul, mul_one]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\n⊢ cgf 0 μ t = log (ENNReal.toReal (↑↑μ Set.univ))\n[PROOFSTEP]\nsimp only [cgf, mgf_zero_fun]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\n⊢ mgf X 0 t = 0\n[PROOFSTEP]\nsimp only [mgf, integral_zero_measure]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\n⊢ cgf X 0 t = 0\n[PROOFSTEP]\nsimp only [cgf, log_zero, mgf_zero_measure]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt c : ℝ\n⊢ mgf (fun x => c) μ t = ENNReal.toReal (↑↑μ Set.univ) * exp (t * c)\n[PROOFSTEP]\nsimp only [mgf, integral_const, smul_eq_mul]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt c : ℝ\ninst✝ : IsProbabilityMeasure μ\n⊢ mgf (fun x => c) μ t = exp (t * c)\n[PROOFSTEP]\nsimp only [mgf_const', measure_univ, ENNReal.one_toReal, one_mul]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nhμ : μ ≠ 0\nc : ℝ\n⊢ cgf (fun x => c) μ t = log (ENNReal.toReal (↑↑μ Set.univ)) + t * c\n[PROOFSTEP]\nsimp only [cgf, mgf_const']\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nhμ : μ ≠ 0\nc : ℝ\n⊢ log (ENNReal.toReal (↑↑μ Set.univ) * exp (t * c)) = log (ENNReal.toReal (↑↑μ Set.univ)) + t * c\n[PROOFSTEP]\nrw [log_mul _ (exp_pos _).ne']\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nhμ : μ ≠ 0\nc : ℝ\n⊢ log (ENNReal.toReal (↑↑μ Set.univ)) + log (exp (t * c)) = log (ENNReal.toReal (↑↑μ Set.univ)) + t * c\n[PROOFSTEP]\nrw [log_exp _]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nhμ : μ ≠ 0\nc : ℝ\n⊢ ENNReal.toReal (↑↑μ Set.univ) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, ENNReal.toReal_eq_zero_iff, Measure.measure_univ_eq_zero]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nhμ : μ ≠ 0\nc : ℝ\n⊢ ¬(μ = 0 ∨ ↑↑μ Set.univ = ⊤)\n[PROOFSTEP]\nsimp only [hμ, measure_ne_top μ Set.univ, or_self_iff, not_false_iff]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nc : ℝ\n⊢ cgf (fun x => c) μ t = t * c\n[PROOFSTEP]\nsimp only [cgf, mgf_const, log_exp]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\n⊢ mgf X μ 0 = ENNReal.toReal (↑↑μ Set.univ)\n[PROOFSTEP]\nsimp only [mgf, zero_mul, exp_zero, integral_const, smul_eq_mul, mul_one]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\n⊢ mgf X μ 0 = 1\n[PROOFSTEP]\nsimp only [mgf_zero', measure_univ, ENNReal.one_toReal]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\n⊢ cgf X μ 0 = log (ENNReal.toReal (↑↑μ Set.univ))\n[PROOFSTEP]\nsimp only [cgf, mgf_zero']\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\n⊢ cgf X μ 0 = 0\n[PROOFSTEP]\nsimp only [cgf_zero', measure_univ, ENNReal.one_toReal, log_one]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhX : ¬Integrable fun ω => exp (t * X ω)\n⊢ mgf X μ t = 0\n[PROOFSTEP]\nsimp only [mgf, integral_undef hX]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhX : ¬Integrable fun ω => exp (t * X ω)\n⊢ cgf X μ t = 0\n[PROOFSTEP]\nsimp only [cgf, mgf_undef hX, log_zero]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\n⊢ 0 ≤ mgf X μ t\n[PROOFSTEP]\nrefine' integral_nonneg _\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\n⊢ 0 ≤ fun x => (fun ω => exp (t * X ω)) x\n[PROOFSTEP]\nintro ω\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nω : Ω\n⊢ OfNat.ofNat 0 ω ≤ (fun x => (fun ω => exp (t * X ω)) x) ω\n[PROOFSTEP]\nsimp only [Pi.zero_apply]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nω : Ω\n⊢ 0 ≤ exp (t * X ω)\n[PROOFSTEP]\nexact (exp_pos _).le\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\n⊢ 0 < mgf X μ t\n[PROOFSTEP]\nsimp_rw [mgf]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\n⊢ 0 < ∫ (x : Ω), exp (t * X x) ∂μ\n[PROOFSTEP]\nhave : ∫ x : Ω, exp (t * X x) ∂μ = ∫ x : Ω in Set.univ, exp (t * X x) ∂μ := by simp only [Measure.restrict_univ]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\n⊢ ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\n[PROOFSTEP]\nsimp only [Measure.restrict_univ]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\nthis : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\n⊢ 0 < ∫ (x : Ω), exp (t * X x) ∂μ\n[PROOFSTEP]\nrw [this, set_integral_pos_iff_support_of_nonneg_ae _ _]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\nthis : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\n⊢ 0 < ↑↑μ ((Function.support fun x => exp (t * X x)) ∩ Set.univ)\n[PROOFSTEP]\nhave h_eq_univ : (Function.support fun x : Ω => exp (t * X x)) = Set.univ :=\n  by\n  ext1 x\n  simp only [Function.mem_support, Set.mem_univ, iff_true_iff]\n  exact (exp_pos _).ne'\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\nthis : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\n⊢ (Function.support fun x => exp (t * X x)) = Set.univ\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\nthis : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\nx : Ω\n⊢ (x ∈ Function.support fun x => exp (t * X x)) ↔ x ∈ Set.univ\n[PROOFSTEP]\nsimp only [Function.mem_support, Set.mem_univ, iff_true_iff]\n[GOAL]\ncase h\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\nthis : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\nx : Ω\n⊢ exp (t * X x) ≠ 0\n[PROOFSTEP]\nexact (exp_pos _).ne'\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\nthis : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\nh_eq_univ : (Function.support fun x => exp (t * X x)) = Set.univ\n⊢ 0 < ↑↑μ ((Function.support fun x => exp (t * X x)) ∩ Set.univ)\n[PROOFSTEP]\nrw [h_eq_univ, Set.inter_univ _]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\nthis : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\nh_eq_univ : (Function.support fun x => exp (t * X x)) = Set.univ\n⊢ 0 < ↑↑μ Set.univ\n[PROOFSTEP]\nrefine' Ne.bot_lt _\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\nthis : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\nh_eq_univ : (Function.support fun x => exp (t * X x)) = Set.univ\n⊢ ↑↑μ Set.univ ≠ ⊥\n[PROOFSTEP]\nsimp only [hμ, ENNReal.bot_eq_zero, Ne.def, Measure.measure_univ_eq_zero, not_false_iff]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\nthis : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\n⊢ 0 ≤ᵐ[Measure.restrict μ Set.univ] fun x => exp (t * X x)\n[PROOFSTEP]\nrefine' eventually_of_forall fun x => _\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\nthis : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\nx : Ω\n⊢ OfNat.ofNat 0 x ≤ (fun x => exp (t * X x)) x\n[PROOFSTEP]\nrw [Pi.zero_apply]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\nthis : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\nx : Ω\n⊢ 0 ≤ (fun x => exp (t * X x)) x\n[PROOFSTEP]\nexact (exp_pos _).le\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nhμ : μ ≠ 0\nh_int_X : Integrable fun ω => exp (t * X ω)\nthis : ∫ (x : Ω), exp (t * X x) ∂μ = ∫ (x : Ω) in Set.univ, exp (t * X x) ∂μ\n⊢ IntegrableOn (fun x => exp (t * X x)) Set.univ\n[PROOFSTEP]\nrwa [integrableOn_univ]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\n⊢ mgf (-X) μ t = mgf X μ (-t)\n[PROOFSTEP]\nsimp_rw [mgf, Pi.neg_apply, mul_neg, neg_mul]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\n⊢ cgf (-X) μ t = cgf X μ (-t)\n[PROOFSTEP]\nsimp_rw [cgf, mgf_neg]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt✝ : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\ns t : ℝ\n⊢ IndepFun (fun ω => exp (s * X ω)) fun ω => exp (t * Y ω)\n[PROOFSTEP]\nhave h_meas : ∀ t, Measurable fun x => exp (t * x) := fun t => (measurable_id'.const_mul t).exp\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt✝ : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\ns t : ℝ\nh_meas : ∀ (t : ℝ), Measurable fun x => exp (t * x)\n⊢ IndepFun (fun ω => exp (s * X ω)) fun ω => exp (t * Y ω)\n[PROOFSTEP]\nchange IndepFun ((fun x => exp (s * x)) ∘ X) ((fun x => exp (t * x)) ∘ Y) μ\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt✝ : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\ns t : ℝ\nh_meas : ∀ (t : ℝ), Measurable fun x => exp (t * x)\n⊢ IndepFun ((fun x => exp (s * x)) ∘ X) ((fun x => exp (t * x)) ∘ Y)\n[PROOFSTEP]\nexact IndepFun.comp h_indep (h_meas s) (h_meas t)\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nhX : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ\nhY : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ\n⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t\n[PROOFSTEP]\nsimp_rw [mgf, Pi.add_apply, mul_add, exp_add]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nhX : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ\nhY : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ\n⊢ ∫ (x : Ω), exp (t * X x) * exp (t * Y x) ∂μ = (∫ (x : Ω), exp (t * X x) ∂μ) * ∫ (x : Ω), exp (t * Y x) ∂μ\n[PROOFSTEP]\nexact (h_indep.exp_mul t t).integral_mul hX hY\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nhX : AEStronglyMeasurable X μ\nhY : AEStronglyMeasurable Y μ\n⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t\n[PROOFSTEP]\nhave A : Continuous fun x : ℝ => exp (t * x) := by continuity\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nhX : AEStronglyMeasurable X μ\nhY : AEStronglyMeasurable Y μ\n⊢ Continuous fun x => exp (t * x)\n[PROOFSTEP]\ncontinuity\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nhX : AEStronglyMeasurable X μ\nhY : AEStronglyMeasurable Y μ\nA : Continuous fun x => exp (t * x)\n⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t\n[PROOFSTEP]\nhave h'X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ := A.aestronglyMeasurable.comp_aemeasurable hX.aemeasurable\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nhX : AEStronglyMeasurable X μ\nhY : AEStronglyMeasurable Y μ\nA : Continuous fun x => exp (t * x)\nh'X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ\n⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t\n[PROOFSTEP]\nhave h'Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ := A.aestronglyMeasurable.comp_aemeasurable hY.aemeasurable\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nhX : AEStronglyMeasurable X μ\nhY : AEStronglyMeasurable Y μ\nA : Continuous fun x => exp (t * x)\nh'X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ\nh'Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ\n⊢ mgf (X + Y) μ t = mgf X μ t * mgf Y μ t\n[PROOFSTEP]\nexact h_indep.mgf_add h'X h'Y\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nh_int_X : Integrable fun ω => exp (t * X ω)\nh_int_Y : Integrable fun ω => exp (t * Y ω)\n⊢ cgf (X + Y) μ t = cgf X μ t + cgf Y μ t\n[PROOFSTEP]\nby_cases hμ : μ = 0\n[GOAL]\ncase pos\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nh_int_X : Integrable fun ω => exp (t * X ω)\nh_int_Y : Integrable fun ω => exp (t * Y ω)\nhμ : μ = 0\n⊢ cgf (X + Y) μ t = cgf X μ t + cgf Y μ t\n[PROOFSTEP]\nsimp [hμ]\n[GOAL]\ncase neg\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nh_int_X : Integrable fun ω => exp (t * X ω)\nh_int_Y : Integrable fun ω => exp (t * Y ω)\nhμ : ¬μ = 0\n⊢ cgf (X + Y) μ t = cgf X μ t + cgf Y μ t\n[PROOFSTEP]\nsimp only [cgf, h_indep.mgf_add h_int_X.aestronglyMeasurable h_int_Y.aestronglyMeasurable]\n[GOAL]\ncase neg\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nh_int_X : Integrable fun ω => exp (t * X ω)\nh_int_Y : Integrable fun ω => exp (t * Y ω)\nhμ : ¬μ = 0\n⊢ log (mgf X μ t * mgf Y μ t) = log (mgf X μ t) + log (mgf Y μ t)\n[PROOFSTEP]\nexact log_mul (mgf_pos' hμ h_int_X).ne' (mgf_pos' hμ h_int_Y).ne'\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_int_X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ\nh_int_Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ\n⊢ AEStronglyMeasurable (fun ω => exp (t * (X + Y) ω)) μ\n[PROOFSTEP]\nsimp_rw [Pi.add_apply, mul_add, exp_add]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_int_X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ\nh_int_Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ\n⊢ AEStronglyMeasurable (fun ω => exp (t * X ω) * exp (t * Y ω)) μ\n[PROOFSTEP]\nexact AEStronglyMeasurable.mul h_int_X h_int_Y\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX : ι → Ω → ℝ\ns : Finset ι\nh_int : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\n⊢ AEStronglyMeasurable (fun ω => exp (t * Finset.sum s (fun i => X i) ω)) μ\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction_on with i s hi_notin_s h_rec h_int\n· simp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]\n  exact aestronglyMeasurable_const\n· have : ∀ i : ι, i ∈ s → AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i hi =>\n    h_int i (mem_insert_of_mem hi)\n  specialize h_rec this\n  rw [sum_insert hi_notin_s]\n  apply aestronglyMeasurable_exp_mul_add (h_int i (mem_insert_self _ _)) h_rec\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX : ι → Ω → ℝ\ns : Finset ι\nh_int : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\n⊢ AEStronglyMeasurable (fun ω => exp (t * Finset.sum s (fun i => X i) ω)) μ\n[PROOFSTEP]\ninduction' s using Finset.induction_on with i s hi_notin_s h_rec h_int\n[GOAL]\ncase empty\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX : ι → Ω → ℝ\ns : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\nh_int : ∀ (i : ι), i ∈ ∅ → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\n⊢ AEStronglyMeasurable (fun ω => exp (t * Finset.sum ∅ (fun i => X i) ω)) μ\n[PROOFSTEP]\nsimp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]\n[GOAL]\ncase empty\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX : ι → Ω → ℝ\ns : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\nh_int : ∀ (i : ι), i ∈ ∅ → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\n⊢ AEStronglyMeasurable (fun ω => 1) μ\n[PROOFSTEP]\nexact aestronglyMeasurable_const\n[GOAL]\ncase insert\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX : ι → Ω → ℝ\ns✝ : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s✝ → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\ni : ι\ns : Finset ι\nhi_notin_s : ¬i ∈ s\nh_rec :\n  (∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) →\n    AEStronglyMeasurable (fun ω => exp (t * Finset.sum s (fun i => X i) ω)) μ\nh_int : ∀ (i_1 : ι), i_1 ∈ insert i s → AEStronglyMeasurable (fun ω => exp (t * X i_1 ω)) μ\n⊢ AEStronglyMeasurable (fun ω => exp (t * Finset.sum (insert i s) (fun i => X i) ω)) μ\n[PROOFSTEP]\nhave : ∀ i : ι, i ∈ s → AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i hi =>\n  h_int i (mem_insert_of_mem hi)\n[GOAL]\ncase insert\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX : ι → Ω → ℝ\ns✝ : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s✝ → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\ni : ι\ns : Finset ι\nhi_notin_s : ¬i ∈ s\nh_rec :\n  (∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) →\n    AEStronglyMeasurable (fun ω => exp (t * Finset.sum s (fun i => X i) ω)) μ\nh_int : ∀ (i_1 : ι), i_1 ∈ insert i s → AEStronglyMeasurable (fun ω => exp (t * X i_1 ω)) μ\nthis : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\n⊢ AEStronglyMeasurable (fun ω => exp (t * Finset.sum (insert i s) (fun i => X i) ω)) μ\n[PROOFSTEP]\nspecialize h_rec this\n[GOAL]\ncase insert\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX : ι → Ω → ℝ\ns✝ : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s✝ → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\ni : ι\ns : Finset ι\nhi_notin_s : ¬i ∈ s\nh_int : ∀ (i_1 : ι), i_1 ∈ insert i s → AEStronglyMeasurable (fun ω => exp (t * X i_1 ω)) μ\nthis : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\nh_rec : AEStronglyMeasurable (fun ω => exp (t * Finset.sum s (fun i => X i) ω)) μ\n⊢ AEStronglyMeasurable (fun ω => exp (t * Finset.sum (insert i s) (fun i => X i) ω)) μ\n[PROOFSTEP]\nrw [sum_insert hi_notin_s]\n[GOAL]\ncase insert\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX : ι → Ω → ℝ\ns✝ : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s✝ → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\ni : ι\ns : Finset ι\nhi_notin_s : ¬i ∈ s\nh_int : ∀ (i_1 : ι), i_1 ∈ insert i s → AEStronglyMeasurable (fun ω => exp (t * X i_1 ω)) μ\nthis : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\nh_rec : AEStronglyMeasurable (fun ω => exp (t * Finset.sum s (fun i => X i) ω)) μ\n⊢ AEStronglyMeasurable (fun ω => exp (t * (X i + ∑ x in s, X x) ω)) μ\n[PROOFSTEP]\napply aestronglyMeasurable_exp_mul_add (h_int i (mem_insert_self _ _)) h_rec\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nh_int_X : Integrable fun ω => exp (t * X ω)\nh_int_Y : Integrable fun ω => exp (t * Y ω)\n⊢ Integrable fun ω => exp (t * (X + Y) ω)\n[PROOFSTEP]\nsimp_rw [Pi.add_apply, mul_add, exp_add]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\nX Y : Ω → ℝ\nh_indep : IndepFun X Y\nh_int_X : Integrable fun ω => exp (t * X ω)\nh_int_Y : Integrable fun ω => exp (t * Y ω)\n⊢ Integrable fun ω => exp (t * X ω) * exp (t * Y ω)\n[PROOFSTEP]\nexact (h_indep.exp_mul t t).integrable_mul h_int_X h_int_Y\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns : Finset ι\nh_int : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)\n⊢ Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction_on with i s hi_notin_s h_rec h_int\n· simp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]\n  exact integrable_const _\n· have : ∀ i : ι, i ∈ s → Integrable (fun ω : Ω => exp (t * X i ω)) μ := fun i hi => h_int i (mem_insert_of_mem hi)\n  specialize h_rec this\n  rw [sum_insert hi_notin_s]\n  refine' IndepFun.integrable_exp_mul_add _ (h_int i (mem_insert_self _ _)) h_rec\n  exact (h_indep.indepFun_finset_sum_of_not_mem h_meas hi_notin_s).symm\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns : Finset ι\nh_int : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)\n⊢ Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)\n[PROOFSTEP]\ninduction' s using Finset.induction_on with i s hi_notin_s h_rec h_int\n[GOAL]\ncase empty\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)\nh_int : ∀ (i : ι), i ∈ ∅ → Integrable fun ω => exp (t * X i ω)\n⊢ Integrable fun ω => exp (t * Finset.sum ∅ (fun i => X i) ω)\n[PROOFSTEP]\nsimp only [Pi.zero_apply, sum_apply, sum_empty, mul_zero, exp_zero]\n[GOAL]\ncase empty\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)\nh_int : ∀ (i : ι), i ∈ ∅ → Integrable fun ω => exp (t * X i ω)\n⊢ Integrable fun ω => 1\n[PROOFSTEP]\nexact integrable_const _\n[GOAL]\ncase insert\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns✝ : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s✝ → Integrable fun ω => exp (t * X i ω)\ni : ι\ns : Finset ι\nhi_notin_s : ¬i ∈ s\nh_rec :\n  (∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)) → Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)\nh_int : ∀ (i_1 : ι), i_1 ∈ insert i s → Integrable fun ω => exp (t * X i_1 ω)\n⊢ Integrable fun ω => exp (t * Finset.sum (insert i s) (fun i => X i) ω)\n[PROOFSTEP]\nhave : ∀ i : ι, i ∈ s → Integrable (fun ω : Ω => exp (t * X i ω)) μ := fun i hi => h_int i (mem_insert_of_mem hi)\n[GOAL]\ncase insert\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns✝ : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s✝ → Integrable fun ω => exp (t * X i ω)\ni : ι\ns : Finset ι\nhi_notin_s : ¬i ∈ s\nh_rec :\n  (∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)) → Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)\nh_int : ∀ (i_1 : ι), i_1 ∈ insert i s → Integrable fun ω => exp (t * X i_1 ω)\nthis : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)\n⊢ Integrable fun ω => exp (t * Finset.sum (insert i s) (fun i => X i) ω)\n[PROOFSTEP]\nspecialize h_rec this\n[GOAL]\ncase insert\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns✝ : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s✝ → Integrable fun ω => exp (t * X i ω)\ni : ι\ns : Finset ι\nhi_notin_s : ¬i ∈ s\nh_int : ∀ (i_1 : ι), i_1 ∈ insert i s → Integrable fun ω => exp (t * X i_1 ω)\nthis : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)\nh_rec : Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)\n⊢ Integrable fun ω => exp (t * Finset.sum (insert i s) (fun i => X i) ω)\n[PROOFSTEP]\nrw [sum_insert hi_notin_s]\n[GOAL]\ncase insert\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns✝ : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s✝ → Integrable fun ω => exp (t * X i ω)\ni : ι\ns : Finset ι\nhi_notin_s : ¬i ∈ s\nh_int : ∀ (i_1 : ι), i_1 ∈ insert i s → Integrable fun ω => exp (t * X i_1 ω)\nthis : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)\nh_rec : Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)\n⊢ Integrable fun ω => exp (t * (X i + ∑ x in s, X x) ω)\n[PROOFSTEP]\nrefine' IndepFun.integrable_exp_mul_add _ (h_int i (mem_insert_self _ _)) h_rec\n[GOAL]\ncase insert\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns✝ : Finset ι\nh_int✝ : ∀ (i : ι), i ∈ s✝ → Integrable fun ω => exp (t * X i ω)\ni : ι\ns : Finset ι\nhi_notin_s : ¬i ∈ s\nh_int : ∀ (i_1 : ι), i_1 ∈ insert i s → Integrable fun ω => exp (t * X i_1 ω)\nthis : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)\nh_rec : Integrable fun ω => exp (t * Finset.sum s (fun i => X i) ω)\n⊢ IndepFun (X i) (∑ x in s, X x)\n[PROOFSTEP]\nexact (h_indep.indepFun_finset_sum_of_not_mem h_meas hi_notin_s).symm\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns : Finset ι\n⊢ mgf (∑ i in s, X i) μ t = ∏ i in s, mgf (X i) μ t\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction_on with i s hi_notin_s h_rec h_int\n· simp only [sum_empty, mgf_zero_fun, measure_univ, ENNReal.one_toReal, prod_empty]\n· have h_int' : ∀ i : ι, AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i =>\n    ((h_meas i).const_mul t).exp.aestronglyMeasurable\n  rw [sum_insert hi_notin_s,\n    IndepFun.mgf_add (h_indep.indepFun_finset_sum_of_not_mem h_meas hi_notin_s).symm (h_int' i)\n      (aestronglyMeasurable_exp_mul_sum fun i _ => h_int' i),\n    h_rec, prod_insert hi_notin_s]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns : Finset ι\n⊢ mgf (∑ i in s, X i) μ t = ∏ i in s, mgf (X i) μ t\n[PROOFSTEP]\ninduction' s using Finset.induction_on with i s hi_notin_s h_rec h_int\n[GOAL]\ncase empty\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\n⊢ mgf (∑ i in ∅, X i) μ t = ∏ i in ∅, mgf (X i) μ t\n[PROOFSTEP]\nsimp only [sum_empty, mgf_zero_fun, measure_univ, ENNReal.one_toReal, prod_empty]\n[GOAL]\ncase insert\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ni : ι\ns : Finset ι\nhi_notin_s : ¬i ∈ s\nh_rec : mgf (∑ i in s, X i) μ t = ∏ i in s, mgf (X i) μ t\n⊢ mgf (∑ i in insert i s, X i) μ t = ∏ i in insert i s, mgf (X i) μ t\n[PROOFSTEP]\nhave h_int' : ∀ i : ι, AEStronglyMeasurable (fun ω : Ω => exp (t * X i ω)) μ := fun i =>\n  ((h_meas i).const_mul t).exp.aestronglyMeasurable\n[GOAL]\ncase insert\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ni : ι\ns : Finset ι\nhi_notin_s : ¬i ∈ s\nh_rec : mgf (∑ i in s, X i) μ t = ∏ i in s, mgf (X i) μ t\nh_int' : ∀ (i : ι), AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ\n⊢ mgf (∑ i in insert i s, X i) μ t = ∏ i in insert i s, mgf (X i) μ t\n[PROOFSTEP]\nrw [sum_insert hi_notin_s,\n  IndepFun.mgf_add (h_indep.indepFun_finset_sum_of_not_mem h_meas hi_notin_s).symm (h_int' i)\n    (aestronglyMeasurable_exp_mul_sum fun i _ => h_int' i),\n  h_rec, prod_insert hi_notin_s]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns : Finset ι\nh_int : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)\n⊢ cgf (∑ i in s, X i) μ t = ∑ i in s, cgf (X i) μ t\n[PROOFSTEP]\nsimp_rw [cgf]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns : Finset ι\nh_int : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)\n⊢ log (mgf (∑ i in s, X i) μ t) = ∑ x in s, log (mgf (X x) μ t)\n[PROOFSTEP]\nrw [← log_prod _ _ fun j hj => ?_]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns : Finset ι\nh_int : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)\n⊢ log (mgf (∑ i in s, X i) μ t) = log (∏ i in s, mgf (X i) μ t)\n[PROOFSTEP]\nrw [h_indep.mgf_sum h_meas]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX✝ : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsProbabilityMeasure μ\nX : ι → Ω → ℝ\nh_indep : iIndepFun (fun i => inferInstance) X\nh_meas : ∀ (i : ι), Measurable (X i)\ns : Finset ι\nh_int : ∀ (i : ι), i ∈ s → Integrable fun ω => exp (t * X i ω)\nj : ι\nhj : j ∈ s\n⊢ mgf (X j) μ t ≠ 0\n[PROOFSTEP]\nexact (mgf_pos (h_int j hj)).ne'\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\n⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) ≤ exp (-t * ε) * mgf X μ t\n[PROOFSTEP]\ncases' ht.eq_or_lt with ht_zero_eq ht_pos\n[GOAL]\ncase inl\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\nht_zero_eq : 0 = t\n⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) ≤ exp (-t * ε) * mgf X μ t\n[PROOFSTEP]\nrw [ht_zero_eq.symm]\n[GOAL]\ncase inl\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\nht_zero_eq : 0 = t\n⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) ≤ exp (-0 * ε) * mgf X μ 0\n[PROOFSTEP]\nsimp only [neg_zero, zero_mul, exp_zero, mgf_zero', one_mul]\n[GOAL]\ncase inl\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\nht_zero_eq : 0 = t\n⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) ≤ ENNReal.toReal (↑↑μ Set.univ)\n[PROOFSTEP]\nrw [ENNReal.toReal_le_toReal (measure_ne_top μ _) (measure_ne_top μ _)]\n[GOAL]\ncase inl\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\nht_zero_eq : 0 = t\n⊢ ↑↑μ {ω | ε ≤ X ω} ≤ ↑↑μ Set.univ\n[PROOFSTEP]\nexact measure_mono (Set.subset_univ _)\n[GOAL]\ncase inr\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\nht_pos : 0 < t\n⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) ≤ exp (-t * ε) * mgf X μ t\n[PROOFSTEP]\ncalc\n  (μ {ω | ε ≤ X ω}).toReal = (μ {ω | exp (t * ε) ≤ exp (t * X ω)}).toReal :=\n    by\n    congr with ω\n    simp only [Set.mem_setOf_eq, exp_le_exp, gt_iff_lt]\n    exact ⟨fun h => mul_le_mul_of_nonneg_left h ht_pos.le, fun h => le_of_mul_le_mul_left h ht_pos⟩\n  _ ≤ (exp (t * ε))⁻¹ * μ[fun ω => exp (t * X ω)] :=\n    by\n    have : exp (t * ε) * (μ {ω | exp (t * ε) ≤ exp (t * X ω)}).toReal ≤ μ[fun ω => exp (t * X ω)] :=\n      mul_meas_ge_le_integral_of_nonneg (fun x => (exp_pos _).le) h_int _\n    rwa [mul_comm (exp (t * ε))⁻¹, ← div_eq_mul_inv, le_div_iff' (exp_pos _)]\n  _ = exp (-t * ε) * mgf X μ t := by rw [neg_mul, exp_neg]; rfl\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\nht_pos : 0 < t\n⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) = ENNReal.toReal (↑↑μ {ω | exp (t * ε) ≤ exp (t * X ω)})\n[PROOFSTEP]\ncongr with ω\n[GOAL]\ncase e_a.e_a.h\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\nht_pos : 0 < t\nω : Ω\n⊢ ω ∈ {ω | ε ≤ X ω} ↔ ω ∈ {ω | exp (t * ε) ≤ exp (t * X ω)}\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, exp_le_exp, gt_iff_lt]\n[GOAL]\ncase e_a.e_a.h\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\nht_pos : 0 < t\nω : Ω\n⊢ ε ≤ X ω ↔ t * ε ≤ t * X ω\n[PROOFSTEP]\nexact ⟨fun h => mul_le_mul_of_nonneg_left h ht_pos.le, fun h => le_of_mul_le_mul_left h ht_pos⟩\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\nht_pos : 0 < t\n⊢ ENNReal.toReal (↑↑μ {ω | exp (t * ε) ≤ exp (t * X ω)}) ≤ (exp (t * ε))⁻¹ * ∫ (x : Ω), (fun ω => exp (t * X ω)) x ∂μ\n[PROOFSTEP]\nhave : exp (t * ε) * (μ {ω | exp (t * ε) ≤ exp (t * X ω)}).toReal ≤ μ[fun ω => exp (t * X ω)] :=\n  mul_meas_ge_le_integral_of_nonneg (fun x => (exp_pos _).le) h_int _\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\nht_pos : 0 < t\nthis : exp (t * ε) * ENNReal.toReal (↑↑μ {ω | exp (t * ε) ≤ exp (t * X ω)}) ≤ ∫ (x : Ω), (fun ω => exp (t * X ω)) x ∂μ\n⊢ ENNReal.toReal (↑↑μ {ω | exp (t * ε) ≤ exp (t * X ω)}) ≤ (exp (t * ε))⁻¹ * ∫ (x : Ω), (fun ω => exp (t * X ω)) x ∂μ\n[PROOFSTEP]\nrwa [mul_comm (exp (t * ε))⁻¹, ← div_eq_mul_inv, le_div_iff' (exp_pos _)]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\nht_pos : 0 < t\n⊢ (exp (t * ε))⁻¹ * ∫ (x : Ω), (fun ω => exp (t * X ω)) x ∂μ = exp (-t * ε) * mgf X μ t\n[PROOFSTEP]\nrw [neg_mul, exp_neg]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\nht_pos : 0 < t\n⊢ (exp (t * ε))⁻¹ * ∫ (x : Ω), (fun ω => exp (t * X ω)) x ∂μ = (exp (t * ε))⁻¹ * mgf X μ t\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : t ≤ 0\nh_int : Integrable fun ω => exp (t * X ω)\n⊢ ENNReal.toReal (↑↑μ {ω | X ω ≤ ε}) ≤ exp (-t * ε) * mgf X μ t\n[PROOFSTEP]\nrw [← neg_neg t, ← mgf_neg, neg_neg, ← neg_mul_neg (-t)]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : t ≤ 0\nh_int : Integrable fun ω => exp (t * X ω)\n⊢ ENNReal.toReal (↑↑μ {ω | X ω ≤ ε}) ≤ exp (- -t * -ε) * mgf (-X) μ (-t)\n[PROOFSTEP]\nrefine' Eq.trans_le _ (measure_ge_le_exp_mul_mgf (-ε) (neg_nonneg.mpr ht) _)\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : t ≤ 0\nh_int : Integrable fun ω => exp (t * X ω)\n⊢ ENNReal.toReal (↑↑μ {ω | X ω ≤ ε}) = ENNReal.toReal (↑↑μ {ω | -ε ≤ (-X) ω})\n[PROOFSTEP]\ncongr with ω\n[GOAL]\ncase refine'_1.e_a.e_a.h\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : t ≤ 0\nh_int : Integrable fun ω => exp (t * X ω)\nω : Ω\n⊢ ω ∈ {ω | X ω ≤ ε} ↔ ω ∈ {ω | -ε ≤ (-X) ω}\n[PROOFSTEP]\nsimp only [Pi.neg_apply, neg_le_neg_iff]\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : t ≤ 0\nh_int : Integrable fun ω => exp (t * X ω)\n⊢ Integrable fun ω => exp (-t * (-X) ω)\n[PROOFSTEP]\nsimp_rw [Pi.neg_apply, neg_mul_neg]\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : t ≤ 0\nh_int : Integrable fun ω => exp (t * X ω)\n⊢ Integrable fun ω => exp (t * X ω)\n[PROOFSTEP]\nexact h_int\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\n⊢ ENNReal.toReal (↑↑μ {ω | ε ≤ X ω}) ≤ exp (-t * ε + cgf X μ t)\n[PROOFSTEP]\nrefine' (measure_ge_le_exp_mul_mgf ε ht h_int).trans _\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\n⊢ exp (-t * ε) * mgf (fun ω => X ω) μ t ≤ exp (-t * ε + cgf X μ t)\n[PROOFSTEP]\nrw [exp_add]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : 0 ≤ t\nh_int : Integrable fun ω => exp (t * X ω)\n⊢ exp (-t * ε) * mgf (fun ω => X ω) μ t ≤ exp (-t * ε) * exp (cgf X μ t)\n[PROOFSTEP]\nexact mul_le_mul le_rfl (le_exp_log _) mgf_nonneg (exp_pos _).le\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : t ≤ 0\nh_int : Integrable fun ω => exp (t * X ω)\n⊢ ENNReal.toReal (↑↑μ {ω | X ω ≤ ε}) ≤ exp (-t * ε + cgf X μ t)\n[PROOFSTEP]\nrefine' (measure_le_le_exp_mul_mgf ε ht h_int).trans _\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : t ≤ 0\nh_int : Integrable fun ω => exp (t * X ω)\n⊢ exp (-t * ε) * mgf (fun ω => X ω) μ t ≤ exp (-t * ε + cgf X μ t)\n[PROOFSTEP]\nrw [exp_add]\n[GOAL]\nΩ : Type u_1\nι : Type u_2\nm : MeasurableSpace Ω\nX : Ω → ℝ\np : ℕ\nμ : Measure Ω\nt : ℝ\ninst✝ : IsFiniteMeasure μ\nε : ℝ\nht : t ≤ 0\nh_int : Integrable fun ω => exp (t * X ω)\n⊢ exp (-t * ε) * mgf (fun ω => X ω) μ t ≤ exp (-t * ε) * exp (cgf X μ t)\n[PROOFSTEP]\nexact mul_le_mul le_rfl (le_exp_log _) mgf_nonneg (exp_pos _).le\n", "meta": {"mathlib_filename": "Mathlib.Probability.Moments", "llama_tokens": 24496, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7025300449389326, "lm_q2_score": 0.538983220687684, "lm_q1q2_score": 0.3786519062510493}}
{"text": "[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\ni j : ι\n⊢ MeasurableSet {ω | (fun x => i) ω ≤ j}\n[PROOFSTEP]\nsimp only [MeasurableSet.const]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : PredOrder ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nby_cases hi_min : IsMin i\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : PredOrder ι\nhτ : IsStoppingTime f τ\ni : ι\nhi_min : IsMin i\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nsuffices {ω : Ω | τ ω < i} = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : PredOrder ι\nhτ : IsStoppingTime f τ\ni : ι\nhi_min : IsMin i\nthis : {ω | τ ω < i} = ∅\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : PredOrder ι\nhτ : IsStoppingTime f τ\ni : ι\nhi_min : IsMin i\nthis : {ω | τ ω < i} = ∅\n⊢ MeasurableSet ∅\n[PROOFSTEP]\nexact @MeasurableSet.empty _ (f i)\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : PredOrder ι\nhτ : IsStoppingTime f τ\ni : ι\nhi_min : IsMin i\n⊢ {ω | τ ω < i} = ∅\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase pos.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : PredOrder ι\nhτ : IsStoppingTime f τ\ni : ι\nhi_min : IsMin i\nω : Ω\n⊢ ω ∈ {ω | τ ω < i} ↔ ω ∈ ∅\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]\n[GOAL]\ncase pos.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : PredOrder ι\nhτ : IsStoppingTime f τ\ni : ι\nhi_min : IsMin i\nω : Ω\n⊢ ¬τ ω < i\n[PROOFSTEP]\nrw [isMin_iff_forall_not_lt] at hi_min \n[GOAL]\ncase pos.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : PredOrder ι\nhτ : IsStoppingTime f τ\ni : ι\nhi_min : ∀ (b : ι), ¬b < i\nω : Ω\n⊢ ¬τ ω < i\n[PROOFSTEP]\nexact hi_min (τ ω)\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : PredOrder ι\nhτ : IsStoppingTime f τ\ni : ι\nhi_min : ¬IsMin i\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nhave : {ω : Ω | τ ω < i} = τ ⁻¹' Set.Iio i := rfl\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : PredOrder ι\nhτ : IsStoppingTime f τ\ni : ι\nhi_min : ¬IsMin i\nthis : {ω | τ ω < i} = τ ⁻¹' Set.Iio i\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nrw [this, ← Iic_pred_of_not_isMin hi_min]\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : PredOrder ι\nhτ : IsStoppingTime f τ\ni : ι\nhi_min : ¬IsMin i\nthis : {ω | τ ω < i} = τ ⁻¹' Set.Iio i\n⊢ MeasurableSet (τ ⁻¹' Set.Iic (pred i))\n[PROOFSTEP]\nexact f.mono (pred_le i) _ (hτ.measurableSet_le <| pred i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\n⊢ MeasurableSet {ω | τ ω = i}\n[PROOFSTEP]\nhave : {ω | τ ω = i} = {ω | τ ω ≤ i} \\ ⋃ (j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j} :=\n  by\n  ext1 a\n  simp only [Set.mem_setOf_eq, Set.mem_range, Set.iUnion_exists, Set.iUnion_iUnion_eq', Set.mem_diff, Set.mem_iUnion,\n    exists_prop, not_exists, not_and, not_le]\n  constructor <;> intro h\n  · simp only [h, lt_iff_le_not_le, le_refl, and_imp, imp_self, imp_true_iff, and_self_iff]\n  · have h_lt_or_eq : τ a < i ∨ τ a = i := lt_or_eq_of_le h.1\n    rcases h_lt_or_eq with (h_lt | rfl)\n    · exfalso\n      exact h.2 a h_lt (le_refl (τ a))\n    · rfl\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\n⊢ {ω | τ ω = i} = {ω | τ ω ≤ i} \\ ⋃ (j : ι) (_ : j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j}\n[PROOFSTEP]\next1 a\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\na : Ω\n⊢ a ∈ {ω | τ ω = i} ↔ a ∈ {ω | τ ω ≤ i} \\ ⋃ (j : ι) (_ : j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j}\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, Set.mem_range, Set.iUnion_exists, Set.iUnion_iUnion_eq', Set.mem_diff, Set.mem_iUnion,\n  exists_prop, not_exists, not_and, not_le]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\na : Ω\n⊢ τ a = i ↔ τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\na : Ω\n⊢ τ a = i → τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\na : Ω\n⊢ (τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x) → τ a = i\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\na : Ω\nh : τ a = i\n⊢ τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x\n[PROOFSTEP]\nsimp only [h, lt_iff_le_not_le, le_refl, and_imp, imp_self, imp_true_iff, and_self_iff]\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\na : Ω\nh : τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x\n⊢ τ a = i\n[PROOFSTEP]\nhave h_lt_or_eq : τ a < i ∨ τ a = i := lt_or_eq_of_le h.1\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\na : Ω\nh : τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x\nh_lt_or_eq : τ a < i ∨ τ a = i\n⊢ τ a = i\n[PROOFSTEP]\nrcases h_lt_or_eq with (h_lt | rfl)\n[GOAL]\ncase h.mpr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\na : Ω\nh : τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x\nh_lt : τ a < i\n⊢ τ a = i\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h.mpr.inl.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\na : Ω\nh : τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x\nh_lt : τ a < i\n⊢ False\n[PROOFSTEP]\nexact h.2 a h_lt (le_refl (τ a))\n[GOAL]\ncase h.mpr.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\na : Ω\nh : τ a ≤ τ a ∧ ∀ (x : Ω), τ x < τ a → ¬τ a ≤ τ x\n⊢ τ a = τ a\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | τ ω = i} = {ω | τ ω ≤ i} \\ ⋃ (j : ι) (_ : j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j}\n⊢ MeasurableSet {ω | τ ω = i}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | τ ω = i} = {ω | τ ω ≤ i} \\ ⋃ (j : ι) (_ : j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j}\n⊢ MeasurableSet ({ω | τ ω ≤ i} \\ ⋃ (j : ι) (_ : j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j})\n[PROOFSTEP]\nrefine' (hτ.measurableSet_le i).diff _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | τ ω = i} = {ω | τ ω ≤ i} \\ ⋃ (j : ι) (_ : j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j}\n⊢ MeasurableSet (⋃ (j : ι) (_ : j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j})\n[PROOFSTEP]\nrefine' MeasurableSet.biUnion h_countable fun j _ => _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | τ ω = i} = {ω | τ ω ≤ i} \\ ⋃ (j : ι) (_ : j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j}\nj : ι\nx✝ : j ∈ Set.range τ\n⊢ MeasurableSet (⋃ (_ : j < i), {ω | τ ω ≤ j})\n[PROOFSTEP]\nby_cases hji : j < i\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | τ ω = i} = {ω | τ ω ≤ i} \\ ⋃ (j : ι) (_ : j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j}\nj : ι\nx✝ : j ∈ Set.range τ\nhji : j < i\n⊢ MeasurableSet (⋃ (_ : j < i), {ω | τ ω ≤ j})\n[PROOFSTEP]\nsimp only [hji, Set.iUnion_true]\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | τ ω = i} = {ω | τ ω ≤ i} \\ ⋃ (j : ι) (_ : j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j}\nj : ι\nx✝ : j ∈ Set.range τ\nhji : j < i\n⊢ MeasurableSet {ω | τ ω ≤ j}\n[PROOFSTEP]\nexact f.mono hji.le _ (hτ.measurableSet_le j)\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | τ ω = i} = {ω | τ ω ≤ i} \\ ⋃ (j : ι) (_ : j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j}\nj : ι\nx✝ : j ∈ Set.range τ\nhji : ¬j < i\n⊢ MeasurableSet (⋃ (_ : j < i), {ω | τ ω ≤ j})\n[PROOFSTEP]\nsimp only [hji, Set.iUnion_false]\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | τ ω = i} = {ω | τ ω ≤ i} \\ ⋃ (j : ι) (_ : j ∈ Set.range τ) (_ : j < i), {ω | τ ω ≤ j}\nj : ι\nx✝ : j ∈ Set.range τ\nhji : ¬j < i\n⊢ MeasurableSet ∅\n[PROOFSTEP]\nexact @MeasurableSet.empty _ (f i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nhave : {ω | τ ω < i} = {ω | τ ω ≤ i} \\ {ω | τ ω = i} := by ext1 ω; simp [lt_iff_le_and_ne]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\n⊢ {ω | τ ω < i} = {ω | τ ω ≤ i} \\ {ω | τ ω = i}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nω : Ω\n⊢ ω ∈ {ω | τ ω < i} ↔ ω ∈ {ω | τ ω ≤ i} \\ {ω | τ ω = i}\n[PROOFSTEP]\nsimp [lt_iff_le_and_ne]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | τ ω < i} = {ω | τ ω ≤ i} \\ {ω | τ ω = i}\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : PartialOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | τ ω < i} = {ω | τ ω ≤ i} \\ {ω | τ ω = i}\n⊢ MeasurableSet ({ω | τ ω ≤ i} \\ {ω | τ ω = i})\n[PROOFSTEP]\nexact (hτ.measurableSet_le i).diff (hτ.measurableSet_eq_of_countable_range h_countable i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : PartialOrder ι✝\nτ✝ : Ω → ι✝\nf✝ : Filtration ι✝ m\nι : Type u_4\ninst✝ : LinearOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\n⊢ MeasurableSet {ω | i ≤ τ ω}\n[PROOFSTEP]\nhave : {ω | i ≤ τ ω} = {ω | τ ω < i}ᶜ := by ext1 ω; simp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_lt]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : PartialOrder ι✝\nτ✝ : Ω → ι✝\nf✝ : Filtration ι✝ m\nι : Type u_4\ninst✝ : LinearOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\n⊢ {ω | i ≤ τ ω} = {ω | τ ω < i}ᶜ\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : PartialOrder ι✝\nτ✝ : Ω → ι✝\nf✝ : Filtration ι✝ m\nι : Type u_4\ninst✝ : LinearOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nω : Ω\n⊢ ω ∈ {ω | i ≤ τ ω} ↔ ω ∈ {ω | τ ω < i}ᶜ\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_lt]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : PartialOrder ι✝\nτ✝ : Ω → ι✝\nf✝ : Filtration ι✝ m\nι : Type u_4\ninst✝ : LinearOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | i ≤ τ ω} = {ω | τ ω < i}ᶜ\n⊢ MeasurableSet {ω | i ≤ τ ω}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : PartialOrder ι✝\nτ✝ : Ω → ι✝\nf✝ : Filtration ι✝ m\nι : Type u_4\ninst✝ : LinearOrder ι\nτ : Ω → ι\nf : Filtration ι m\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | i ≤ τ ω} = {ω | τ ω < i}ᶜ\n⊢ MeasurableSet {ω | τ ω < i}ᶜ\n[PROOFSTEP]\nexact (hτ.measurableSet_lt_of_countable_range h_countable i).compl\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ MeasurableSet {ω | i < τ ω}\n[PROOFSTEP]\nhave : {ω | i < τ ω} = {ω | τ ω ≤ i}ᶜ := by ext1 ω; simp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_le]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ {ω | i < τ ω} = {ω | τ ω ≤ i}ᶜ\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\nω : Ω\n⊢ ω ∈ {ω | i < τ ω} ↔ ω ∈ {ω | τ ω ≤ i}ᶜ\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_le]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\nthis : {ω | i < τ ω} = {ω | τ ω ≤ i}ᶜ\n⊢ MeasurableSet {ω | i < τ ω}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\nthis : {ω | i < τ ω} = {ω | τ ω ≤ i}ᶜ\n⊢ MeasurableSet {ω | τ ω ≤ i}ᶜ\n[PROOFSTEP]\nexact (hτ.measurableSet_le i).compl\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nby_cases hi_min : IsMin i\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : IsMin i\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nsuffices {ω | τ ω < i} = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : IsMin i\nthis : {ω | τ ω < i} = ∅\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : IsMin i\nthis : {ω | τ ω < i} = ∅\n⊢ MeasurableSet ∅\n[PROOFSTEP]\nexact @MeasurableSet.empty _ (f i)\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : IsMin i\n⊢ {ω | τ ω < i} = ∅\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase pos.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : IsMin i\nω : Ω\n⊢ ω ∈ {ω | τ ω < i} ↔ ω ∈ ∅\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]\n[GOAL]\ncase pos.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : IsMin i\nω : Ω\n⊢ ¬τ ω < i\n[PROOFSTEP]\nexact isMin_iff_forall_not_lt.mp hi_min (τ ω)\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nobtain ⟨seq, -, -, h_tendsto, h_bound⟩ :\n  ∃ seq : ℕ → ι, Monotone seq ∧ (∀ j, seq j ≤ i) ∧ Tendsto seq atTop (𝓝 i) ∧ ∀ j, seq j < i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\n⊢ ∃ seq, Monotone seq ∧ (∀ (j : ℕ), seq j ≤ i) ∧ Tendsto seq atTop (𝓝 i) ∧ ∀ (j : ℕ), seq j < i\ncase neg.intro.intro.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nexact h_lub.exists_seq_monotone_tendsto (not_isMin_iff.mp hi_min)\n[GOAL]\ncase neg.intro.intro.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nhave h_Ioi_eq_Union : Set.Iio i = ⋃ j, {k | k ≤ seq j} :=\n  by\n  ext1 k\n  simp only [Set.mem_Iio, Set.mem_iUnion, Set.mem_setOf_eq]\n  refine' ⟨fun hk_lt_i => _, fun h_exists_k_le_seq => _⟩\n  · rw [tendsto_atTop'] at h_tendsto \n    have h_nhds : Set.Ici k ∈ 𝓝 i := mem_nhds_iff.mpr ⟨Set.Ioi k, Set.Ioi_subset_Ici le_rfl, isOpen_Ioi, hk_lt_i⟩\n    obtain ⟨a, ha⟩ : ∃ a : ℕ, ∀ b : ℕ, b ≥ a → k ≤ seq b := h_tendsto (Set.Ici k) h_nhds\n    exact ⟨a, ha a le_rfl⟩\n  · obtain ⟨j, hk_seq_j⟩ := h_exists_k_le_seq\n    exact hk_seq_j.trans_lt (h_bound j)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\n⊢ Set.Iio i = ⋃ (j : ℕ), {k | k ≤ seq j}\n[PROOFSTEP]\next1 k\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\nk : ι\n⊢ k ∈ Set.Iio i ↔ k ∈ ⋃ (j : ℕ), {k | k ≤ seq j}\n[PROOFSTEP]\nsimp only [Set.mem_Iio, Set.mem_iUnion, Set.mem_setOf_eq]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\nk : ι\n⊢ k < i ↔ ∃ i, k ≤ seq i\n[PROOFSTEP]\nrefine' ⟨fun hk_lt_i => _, fun h_exists_k_le_seq => _⟩\n[GOAL]\ncase h.refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\nk : ι\nhk_lt_i : k < i\n⊢ ∃ i, k ≤ seq i\n[PROOFSTEP]\nrw [tendsto_atTop'] at h_tendsto \n[GOAL]\ncase h.refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : ∀ (s : Set ι), s ∈ 𝓝 i → ∃ a, ∀ (b : ℕ), b ≥ a → seq b ∈ s\nh_bound : ∀ (j : ℕ), seq j < i\nk : ι\nhk_lt_i : k < i\n⊢ ∃ i, k ≤ seq i\n[PROOFSTEP]\nhave h_nhds : Set.Ici k ∈ 𝓝 i := mem_nhds_iff.mpr ⟨Set.Ioi k, Set.Ioi_subset_Ici le_rfl, isOpen_Ioi, hk_lt_i⟩\n[GOAL]\ncase h.refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : ∀ (s : Set ι), s ∈ 𝓝 i → ∃ a, ∀ (b : ℕ), b ≥ a → seq b ∈ s\nh_bound : ∀ (j : ℕ), seq j < i\nk : ι\nhk_lt_i : k < i\nh_nhds : Set.Ici k ∈ 𝓝 i\n⊢ ∃ i, k ≤ seq i\n[PROOFSTEP]\nobtain ⟨a, ha⟩ : ∃ a : ℕ, ∀ b : ℕ, b ≥ a → k ≤ seq b := h_tendsto (Set.Ici k) h_nhds\n[GOAL]\ncase h.refine'_1.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : ∀ (s : Set ι), s ∈ 𝓝 i → ∃ a, ∀ (b : ℕ), b ≥ a → seq b ∈ s\nh_bound : ∀ (j : ℕ), seq j < i\nk : ι\nhk_lt_i : k < i\nh_nhds : Set.Ici k ∈ 𝓝 i\na : ℕ\nha : ∀ (b : ℕ), b ≥ a → k ≤ seq b\n⊢ ∃ i, k ≤ seq i\n[PROOFSTEP]\nexact ⟨a, ha a le_rfl⟩\n[GOAL]\ncase h.refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\nk : ι\nh_exists_k_le_seq : ∃ i, k ≤ seq i\n⊢ k < i\n[PROOFSTEP]\nobtain ⟨j, hk_seq_j⟩ := h_exists_k_le_seq\n[GOAL]\ncase h.refine'_2.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\nk : ι\nj : ℕ\nhk_seq_j : k ≤ seq j\n⊢ k < i\n[PROOFSTEP]\nexact hk_seq_j.trans_lt (h_bound j)\n[GOAL]\ncase neg.intro.intro.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\nh_Ioi_eq_Union : Set.Iio i = ⋃ (j : ℕ), {k | k ≤ seq j}\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nhave h_lt_eq_preimage : {ω | τ ω < i} = τ ⁻¹' Set.Iio i := by ext1 ω;\n  simp only [Set.mem_setOf_eq, Set.mem_preimage, Set.mem_Iio]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\nh_Ioi_eq_Union : Set.Iio i = ⋃ (j : ℕ), {k | k ≤ seq j}\n⊢ {ω | τ ω < i} = τ ⁻¹' Set.Iio i\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\nh_Ioi_eq_Union : Set.Iio i = ⋃ (j : ℕ), {k | k ≤ seq j}\nω : Ω\n⊢ ω ∈ {ω | τ ω < i} ↔ ω ∈ τ ⁻¹' Set.Iio i\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, Set.mem_preimage, Set.mem_Iio]\n[GOAL]\ncase neg.intro.intro.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\nh_Ioi_eq_Union : Set.Iio i = ⋃ (j : ℕ), {k | k ≤ seq j}\nh_lt_eq_preimage : {ω | τ ω < i} = τ ⁻¹' Set.Iio i\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nrw [h_lt_eq_preimage, h_Ioi_eq_Union]\n[GOAL]\ncase neg.intro.intro.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\nh_Ioi_eq_Union : Set.Iio i = ⋃ (j : ℕ), {k | k ≤ seq j}\nh_lt_eq_preimage : {ω | τ ω < i} = τ ⁻¹' Set.Iio i\n⊢ MeasurableSet (τ ⁻¹' ⋃ (j : ℕ), {k | k ≤ seq j})\n[PROOFSTEP]\nsimp only [Set.preimage_iUnion, Set.preimage_setOf_eq]\n[GOAL]\ncase neg.intro.intro.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nh_lub : IsLUB (Set.Iio i) i\nhi_min : ¬IsMin i\nseq : ℕ → ι\nh_tendsto : Tendsto seq atTop (𝓝 i)\nh_bound : ∀ (j : ℕ), seq j < i\nh_Ioi_eq_Union : Set.Iio i = ⋃ (j : ℕ), {k | k ≤ seq j}\nh_lt_eq_preimage : {ω | τ ω < i} = τ ⁻¹' Set.Iio i\n⊢ MeasurableSet (⋃ (i : ℕ), {a | τ a ≤ seq i})\n[PROOFSTEP]\nexact MeasurableSet.iUnion fun n => f.mono (h_bound n).le _ (hτ.measurableSet_le (seq n))\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nobtain ⟨i', hi'_lub⟩ : ∃ i', IsLUB (Set.Iio i) i'\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ ∃ i', IsLUB (Set.Iio i) i'\ncase intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni i' : ι\nhi'_lub : IsLUB (Set.Iio i) i'\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nexact exists_lub_Iio i\n[GOAL]\ncase intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni i' : ι\nhi'_lub : IsLUB (Set.Iio i) i'\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\ncases' lub_Iio_eq_self_or_Iio_eq_Iic i hi'_lub with hi'_eq_i h_Iio_eq_Iic\n[GOAL]\ncase intro.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni i' : ι\nhi'_lub : IsLUB (Set.Iio i) i'\nhi'_eq_i : i' = i\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nrw [← hi'_eq_i] at hi'_lub ⊢\n[GOAL]\ncase intro.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni i' : ι\nhi'_lub : IsLUB (Set.Iio i') i'\nhi'_eq_i : i' = i\n⊢ MeasurableSet {ω | τ ω < i'}\n[PROOFSTEP]\nexact hτ.measurableSet_lt_of_isLUB i' hi'_lub\n[GOAL]\ncase intro.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni i' : ι\nhi'_lub : IsLUB (Set.Iio i) i'\nh_Iio_eq_Iic : Set.Iio i = Set.Iic i'\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nhave h_lt_eq_preimage : {ω : Ω | τ ω < i} = τ ⁻¹' Set.Iio i := rfl\n[GOAL]\ncase intro.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni i' : ι\nhi'_lub : IsLUB (Set.Iio i) i'\nh_Iio_eq_Iic : Set.Iio i = Set.Iic i'\nh_lt_eq_preimage : {ω | τ ω < i} = τ ⁻¹' Set.Iio i\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nrw [h_lt_eq_preimage, h_Iio_eq_Iic]\n[GOAL]\ncase intro.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni i' : ι\nhi'_lub : IsLUB (Set.Iio i) i'\nh_Iio_eq_Iic : Set.Iio i = Set.Iic i'\nh_lt_eq_preimage : {ω | τ ω < i} = τ ⁻¹' Set.Iio i\n⊢ MeasurableSet (τ ⁻¹' Set.Iic i')\n[PROOFSTEP]\nexact f.mono (lub_Iio_le i hi'_lub) _ (hτ.measurableSet_le i')\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ MeasurableSet {ω | i ≤ τ ω}\n[PROOFSTEP]\nhave : {ω | i ≤ τ ω} = {ω | τ ω < i}ᶜ := by ext1 ω; simp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_lt]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ {ω | i ≤ τ ω} = {ω | τ ω < i}ᶜ\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nω : Ω\n⊢ ω ∈ {ω | i ≤ τ ω} ↔ ω ∈ {ω | τ ω < i}ᶜ\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_lt]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nthis : {ω | i ≤ τ ω} = {ω | τ ω < i}ᶜ\n⊢ MeasurableSet {ω | i ≤ τ ω}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nthis : {ω | i ≤ τ ω} = {ω | τ ω < i}ᶜ\n⊢ MeasurableSet {ω | τ ω < i}ᶜ\n[PROOFSTEP]\nexact (hτ.measurableSet_lt i).compl\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ MeasurableSet {ω | τ ω = i}\n[PROOFSTEP]\nhave : {ω | τ ω = i} = {ω | τ ω ≤ i} ∩ {ω | τ ω ≥ i} := by ext1 ω;\n  simp only [Set.mem_setOf_eq, ge_iff_le, Set.mem_inter_iff, le_antisymm_iff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ {ω | τ ω = i} = {ω | τ ω ≤ i} ∩ {ω | τ ω ≥ i}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nω : Ω\n⊢ ω ∈ {ω | τ ω = i} ↔ ω ∈ {ω | τ ω ≤ i} ∩ {ω | τ ω ≥ i}\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, ge_iff_le, Set.mem_inter_iff, le_antisymm_iff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nthis : {ω | τ ω = i} = {ω | τ ω ≤ i} ∩ {ω | τ ω ≥ i}\n⊢ MeasurableSet {ω | τ ω = i}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nthis : {ω | τ ω = i} = {ω | τ ω ≤ i} ∩ {ω | τ ω ≥ i}\n⊢ MeasurableSet ({ω | τ ω ≤ i} ∩ {ω | τ ω ≥ i})\n[PROOFSTEP]\nexact (hτ.measurableSet_le i).inter (hτ.measurableSet_ge i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\ninst✝ : Countable ι\nf : Filtration ι m\nτ : Ω → ι\nhτ : ∀ (i : ι), MeasurableSet {ω | τ ω = i}\n⊢ IsStoppingTime f τ\n[PROOFSTEP]\nintro i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\ninst✝ : Countable ι\nf : Filtration ι m\nτ : Ω → ι\nhτ : ∀ (i : ι), MeasurableSet {ω | τ ω = i}\ni : ι\n⊢ MeasurableSet {ω | τ ω ≤ i}\n[PROOFSTEP]\nrw [show {ω | τ ω ≤ i} = ⋃ k ≤ i, {ω | τ ω = k} by ext; simp]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\ninst✝ : Countable ι\nf : Filtration ι m\nτ : Ω → ι\nhτ : ∀ (i : ι), MeasurableSet {ω | τ ω = i}\ni : ι\n⊢ {ω | τ ω ≤ i} = ⋃ (k : ι) (_ : k ≤ i), {ω | τ ω = k}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\ninst✝ : Countable ι\nf : Filtration ι m\nτ : Ω → ι\nhτ : ∀ (i : ι), MeasurableSet {ω | τ ω = i}\ni : ι\nx✝ : Ω\n⊢ x✝ ∈ {ω | τ ω ≤ i} ↔ x✝ ∈ ⋃ (k : ι) (_ : k ≤ i), {ω | τ ω = k}\n[PROOFSTEP]\nsimp\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\ninst✝ : Countable ι\nf : Filtration ι m\nτ : Ω → ι\nhτ : ∀ (i : ι), MeasurableSet {ω | τ ω = i}\ni : ι\n⊢ MeasurableSet (⋃ (k : ι) (_ : k ≤ i), {ω | τ ω = k})\n[PROOFSTEP]\nrefine' MeasurableSet.biUnion (Set.to_countable _) fun k hk => _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\ninst✝ : Countable ι\nf : Filtration ι m\nτ : Ω → ι\nhτ : ∀ (i : ι), MeasurableSet {ω | τ ω = i}\ni k : ι\nhk : k ∈ fun k => Preorder.toLE.1 k i\n⊢ MeasurableSet {ω | τ ω = k}\n[PROOFSTEP]\nexact f.mono hk _ (hτ k)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ IsStoppingTime f fun ω => max (τ ω) (π ω)\n[PROOFSTEP]\nintro i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ni : ι\n⊢ MeasurableSet {ω | (fun ω => max (τ ω) (π ω)) ω ≤ i}\n[PROOFSTEP]\nsimp_rw [max_le_iff, Set.setOf_and]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ni : ι\n⊢ MeasurableSet ({a | τ a ≤ i} ∩ {a | π a ≤ i})\n[PROOFSTEP]\nexact (hτ i).inter (hπ i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ IsStoppingTime f fun ω => min (τ ω) (π ω)\n[PROOFSTEP]\nintro i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ni : ι\n⊢ MeasurableSet {ω | (fun ω => min (τ ω) (π ω)) ω ≤ i}\n[PROOFSTEP]\nsimp_rw [min_le_iff, Set.setOf_or]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ni : ι\n⊢ MeasurableSet ({a | τ a ≤ i} ∪ {a | π a ≤ i})\n[PROOFSTEP]\nexact (hτ i).union (hπ i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : AddGroup ι\ninst✝² : Preorder ι\ninst✝¹ : CovariantClass ι ι (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nf : Filtration ι m\nτ : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\nhi : 0 ≤ i\n⊢ IsStoppingTime f fun ω => τ ω + i\n[PROOFSTEP]\nintro j\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : AddGroup ι\ninst✝² : Preorder ι\ninst✝¹ : CovariantClass ι ι (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nf : Filtration ι m\nτ : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\nhi : 0 ≤ i\nj : ι\n⊢ MeasurableSet {ω | (fun ω => τ ω + i) ω ≤ j}\n[PROOFSTEP]\nsimp_rw [← le_sub_iff_add_le]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : AddGroup ι\ninst✝² : Preorder ι\ninst✝¹ : CovariantClass ι ι (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nf : Filtration ι m\nτ : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\nhi : 0 ≤ i\nj : ι\n⊢ MeasurableSet {ω | τ ω ≤ j - i}\n[PROOFSTEP]\nexact f.mono (sub_le_self j hi) _ (hτ (j - i))\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ : Ω → ℕ\nhτ : IsStoppingTime f τ\ni : ℕ\n⊢ IsStoppingTime f fun ω => τ ω + i\n[PROOFSTEP]\nrefine' isStoppingTime_of_measurableSet_eq fun j => _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ : Ω → ℕ\nhτ : IsStoppingTime f τ\ni j : ℕ\n⊢ MeasurableSet {ω | τ ω + i = j}\n[PROOFSTEP]\nby_cases hij : i ≤ j\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ : Ω → ℕ\nhτ : IsStoppingTime f τ\ni j : ℕ\nhij : i ≤ j\n⊢ MeasurableSet {ω | τ ω + i = j}\n[PROOFSTEP]\nsimp_rw [eq_comm, ← Nat.sub_eq_iff_eq_add hij, eq_comm]\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ : Ω → ℕ\nhτ : IsStoppingTime f τ\ni j : ℕ\nhij : i ≤ j\n⊢ MeasurableSet {ω | τ ω = j - i}\n[PROOFSTEP]\nexact f.mono (j.sub_le i) _ (hτ.measurableSet_eq (j - i))\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ : Ω → ℕ\nhτ : IsStoppingTime f τ\ni j : ℕ\nhij : ¬i ≤ j\n⊢ MeasurableSet {ω | τ ω + i = j}\n[PROOFSTEP]\nrw [not_le] at hij \n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ : Ω → ℕ\nhτ : IsStoppingTime f τ\ni j : ℕ\nhij : j < i\n⊢ MeasurableSet {ω | τ ω + i = j}\n[PROOFSTEP]\nconvert @MeasurableSet.empty _ (f.1 j)\n[GOAL]\ncase h.e'_3\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ : Ω → ℕ\nhτ : IsStoppingTime f τ\ni j : ℕ\nhij : j < i\n⊢ {ω | τ ω + i = j} = ∅\n[PROOFSTEP]\next ω\n[GOAL]\ncase h.e'_3.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ : Ω → ℕ\nhτ : IsStoppingTime f τ\ni j : ℕ\nhij : j < i\nω : Ω\n⊢ ω ∈ {ω | τ ω + i = j} ↔ ω ∈ ∅\n[PROOFSTEP]\nsimp only [Set.mem_empty_iff_false, iff_false_iff]\n[GOAL]\ncase h.e'_3.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ : Ω → ℕ\nhτ : IsStoppingTime f τ\ni j : ℕ\nhij : j < i\nω : Ω\n⊢ ¬ω ∈ {ω | τ ω + i = j}\n[PROOFSTEP]\nrintro (hx : τ ω + i = j)\n[GOAL]\ncase h.e'_3.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ : Ω → ℕ\nhτ : IsStoppingTime f τ\ni j : ℕ\nhij : j < i\nω : Ω\nhx : τ ω + i = j\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ π : Ω → ℕ\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ IsStoppingTime f (τ + π)\n[PROOFSTEP]\nintro i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ π : Ω → ℕ\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ni : ℕ\n⊢ MeasurableSet {ω | (τ + π) ω ≤ i}\n[PROOFSTEP]\nrw [(_ : {ω | (τ + π) ω ≤ i} = ⋃ k ≤ i, {ω | π ω = k} ∩ {ω | τ ω + k ≤ i})]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ π : Ω → ℕ\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ni : ℕ\n⊢ MeasurableSet (⋃ (k : ℕ) (_ : k ≤ i), {ω | π ω = k} ∩ {ω | τ ω + k ≤ i})\n[PROOFSTEP]\nexact\n  MeasurableSet.iUnion fun k => MeasurableSet.iUnion fun hk => (hπ.measurableSet_eq_le hk).inter (hτ.add_const_nat i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ π : Ω → ℕ\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ni : ℕ\n⊢ {ω | (τ + π) ω ≤ i} = ⋃ (k : ℕ) (_ : k ≤ i), {ω | π ω = k} ∩ {ω | τ ω + k ≤ i}\n[PROOFSTEP]\next ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ π : Ω → ℕ\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ni : ℕ\nω : Ω\n⊢ ω ∈ {ω | (τ + π) ω ≤ i} ↔ ω ∈ ⋃ (k : ℕ) (_ : k ≤ i), {ω | π ω = k} ∩ {ω | τ ω + k ≤ i}\n[PROOFSTEP]\nsimp only [Pi.add_apply, Set.mem_setOf_eq, Set.mem_iUnion, Set.mem_inter_iff, exists_prop]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ π : Ω → ℕ\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ni : ℕ\nω : Ω\n⊢ τ ω + π ω ≤ i ↔ ∃ i_1, i_1 ≤ i ∧ π ω = i_1 ∧ τ ω + i_1 ≤ i\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨π ω, by linarith, rfl, h⟩, _⟩\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ π : Ω → ℕ\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ni : ℕ\nω : Ω\nh : τ ω + π ω ≤ i\n⊢ π ω ≤ i\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ π : Ω → ℕ\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ni : ℕ\nω : Ω\n⊢ (∃ i_1, i_1 ≤ i ∧ π ω = i_1 ∧ τ ω + i_1 ≤ i) → τ ω + π ω ≤ i\n[PROOFSTEP]\nrintro ⟨j, hj, rfl, h⟩\n[GOAL]\ncase h.intro.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nτ π : Ω → ℕ\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ni : ℕ\nω : Ω\nhj : π ω ≤ i\nh : τ ω + π ω ≤ i\n⊢ τ ω + π ω ≤ i\n[PROOFSTEP]\nassumption\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s\ni : ι\n⊢ MeasurableSet (sᶜ ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nrw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s\ni : ι\n⊢ MeasurableSet ((sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nrefine' MeasurableSet.inter _ _\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s\ni : ι\n⊢ MeasurableSet (sᶜ ∪ {ω | τ ω ≤ i}ᶜ)\n[PROOFSTEP]\nrw [← Set.compl_inter]\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s\ni : ι\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ i})ᶜ\n[PROOFSTEP]\nexact (hs i).compl\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s\ni : ι\n⊢ MeasurableSet {ω | τ ω ≤ i}\n[PROOFSTEP]\nexact hτ i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s\ni : ι\n⊢ sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i}\n[PROOFSTEP]\nrw [Set.union_inter_distrib_right]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s\ni : ι\n⊢ sᶜ ∩ {ω | τ ω ≤ i} = sᶜ ∩ {ω | τ ω ≤ i} ∪ {ω | τ ω ≤ i}ᶜ ∩ {ω | τ ω ≤ i}\n[PROOFSTEP]\nsimp only [Set.compl_inter_self, Set.union_empty]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : ℕ → Set Ω\nhs : ∀ (i : ℕ), (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) (s i)\ni : ι\n⊢ MeasurableSet ((⋃ (i : ℕ), s i) ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nrw [forall_swap] at hs \n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : ℕ → Set Ω\nhs : ∀ (y : ι) (x : ℕ), MeasurableSet (s x ∩ {ω | τ ω ≤ y})\ni : ι\n⊢ MeasurableSet ((⋃ (i : ℕ), s i) ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nrw [Set.iUnion_inter]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : ℕ → Set Ω\nhs : ∀ (y : ι) (x : ℕ), MeasurableSet (s x ∩ {ω | τ ω ≤ y})\ni : ι\n⊢ MeasurableSet (⋃ (i_1 : ℕ), s i_1 ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nexact MeasurableSet.iUnion (hs i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nhle : τ ≤ π\n⊢ IsStoppingTime.measurableSpace hτ ≤ IsStoppingTime.measurableSpace hπ\n[PROOFSTEP]\nintro s hs i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nhle : τ ≤ π\ns : Set Ω\nhs : MeasurableSet s\ni : ι\n⊢ MeasurableSet (s ∩ {ω | π ω ≤ i})\n[PROOFSTEP]\nrw [(_ : s ∩ {ω | π ω ≤ i} = s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i})]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nhle : τ ≤ π\ns : Set Ω\nhs : MeasurableSet s\ni : ι\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i})\n[PROOFSTEP]\nexact (hs i).inter (hπ i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nhle : τ ≤ π\ns : Set Ω\nhs : MeasurableSet s\ni : ι\n⊢ s ∩ {ω | π ω ≤ i} = s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nhle : τ ≤ π\ns : Set Ω\nhs : MeasurableSet s\ni : ι\nx✝ : Ω\n⊢ x✝ ∈ s ∩ {ω | π ω ≤ i} ↔ x✝ ∈ s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i}\n[PROOFSTEP]\nsimp only [Set.mem_inter_iff, iff_self_and, and_congr_left_iff, Set.mem_setOf_eq]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nhle : τ ≤ π\ns : Set Ω\nhs : MeasurableSet s\ni : ι\nx✝ : Ω\n⊢ π x✝ ≤ i → x✝ ∈ s → τ x✝ ≤ i\n[PROOFSTEP]\nintro hle' _\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nhle : τ ≤ π\ns : Set Ω\nhs : MeasurableSet s\ni : ι\nx✝ : Ω\nhle' : π x✝ ≤ i\na✝ : x✝ ∈ s\n⊢ τ x✝ ≤ i\n[PROOFSTEP]\nexact le_trans (hle _) hle'\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝ : Countable ι\nhτ : IsStoppingTime f τ\n⊢ IsStoppingTime.measurableSpace hτ ≤ m\n[PROOFSTEP]\nintro s hs\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝ : Countable ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : MeasurableSet s\n⊢ MeasurableSet s\n[PROOFSTEP]\nchange ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs \n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝ : Countable ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\n⊢ MeasurableSet s\n[PROOFSTEP]\nrw [(_ : s = ⋃ i, s ∩ {ω | τ ω ≤ i})]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝ : Countable ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\n⊢ MeasurableSet (⋃ (i : ι), s ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nexact MeasurableSet.iUnion fun i => f.le i _ (hs i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝ : Countable ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\n⊢ s = ⋃ (i : ι), s ∩ {ω | τ ω ≤ i}\n[PROOFSTEP]\next ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝ : Countable ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\n⊢ ω ∈ s ↔ ω ∈ ⋃ (i : ι), s ∩ {ω | τ ω ≤ i}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝ : Countable ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\n⊢ ω ∈ s → ω ∈ ⋃ (i : ι), s ∩ {ω | τ ω ≤ i}\n[PROOFSTEP]\nrw [Set.mem_iUnion]\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝ : Countable ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\n⊢ ω ∈ ⋃ (i : ι), s ∩ {ω | τ ω ≤ i} → ω ∈ s\n[PROOFSTEP]\nrw [Set.mem_iUnion]\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝ : Countable ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\n⊢ ω ∈ s → ∃ i, ω ∈ s ∩ {ω | τ ω ≤ i}\n[PROOFSTEP]\nexact fun hx => ⟨τ ω, hx, le_rfl⟩\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝ : Countable ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\n⊢ (∃ i, ω ∈ s ∩ {ω | τ ω ≤ i}) → ω ∈ s\n[PROOFSTEP]\nrintro ⟨_, hx, _⟩\n[GOAL]\ncase h.mpr.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝ : Countable ι\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\nw✝ : ι\nhx : ω ∈ s\nright✝ : ω ∈ {ω | τ ω ≤ w✝}\n⊢ ω ∈ s\n[PROOFSTEP]\nexact hx\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\n⊢ IsStoppingTime.measurableSpace hτ ≤ m\n[PROOFSTEP]\nintro s hs\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : MeasurableSet s\n⊢ MeasurableSet s\n[PROOFSTEP]\nchange ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs \n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\n⊢ MeasurableSet s\n[PROOFSTEP]\nobtain ⟨seq : ℕ → ι, h_seq_tendsto⟩ := (atTop : Filter ι).exists_seq_tendsto\n[GOAL]\ncase intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\n⊢ MeasurableSet s\n[PROOFSTEP]\nrw [(_ : s = ⋃ n, s ∩ {ω | τ ω ≤ seq n})]\n[GOAL]\ncase intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\n⊢ MeasurableSet (⋃ (n : ℕ), s ∩ {ω | τ ω ≤ seq n})\n[PROOFSTEP]\nexact MeasurableSet.iUnion fun i => f.le (seq i) _ (hs (seq i))\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\n⊢ s = ⋃ (n : ℕ), s ∩ {ω | τ ω ≤ seq n}\n[PROOFSTEP]\next ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\nω : Ω\n⊢ ω ∈ s ↔ ω ∈ ⋃ (n : ℕ), s ∩ {ω | τ ω ≤ seq n}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\nω : Ω\n⊢ ω ∈ s → ω ∈ ⋃ (n : ℕ), s ∩ {ω | τ ω ≤ seq n}\n[PROOFSTEP]\nrw [Set.mem_iUnion]\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\nω : Ω\n⊢ ω ∈ ⋃ (n : ℕ), s ∩ {ω | τ ω ≤ seq n} → ω ∈ s\n[PROOFSTEP]\nrw [Set.mem_iUnion]\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\nω : Ω\n⊢ ω ∈ s → ∃ i, ω ∈ s ∩ {ω | τ ω ≤ seq i}\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\nω : Ω\nhx : ω ∈ s\n⊢ ∃ i, ω ∈ s ∩ {ω | τ ω ≤ seq i}\n[PROOFSTEP]\nsuffices : ∃ i, τ ω ≤ seq i\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\nω : Ω\nhx : ω ∈ s\nthis : ∃ i, τ ω ≤ seq i\n⊢ ∃ i, ω ∈ s ∩ {ω | τ ω ≤ seq i}\ncase this\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\nω : Ω\nhx : ω ∈ s\n⊢ ∃ i, τ ω ≤ seq i\n[PROOFSTEP]\nexact ⟨this.choose, hx, this.choose_spec⟩\n[GOAL]\ncase this\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\nω : Ω\nhx : ω ∈ s\n⊢ ∃ i, τ ω ≤ seq i\n[PROOFSTEP]\nrw [tendsto_atTop] at h_seq_tendsto \n[GOAL]\ncase this\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : ∀ (b : ι), ∀ᶠ (a : ℕ) in atTop, b ≤ seq a\nω : Ω\nhx : ω ∈ s\n⊢ ∃ i, τ ω ≤ seq i\n[PROOFSTEP]\nexact (h_seq_tendsto (τ ω)).exists\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\nω : Ω\n⊢ (∃ i, ω ∈ s ∩ {ω | τ ω ≤ seq i}) → ω ∈ s\n[PROOFSTEP]\nrintro ⟨_, hx, _⟩\n[GOAL]\ncase h.mpr.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝¹ : IsCountablyGenerated atTop\ninst✝ : NeBot atTop\nhτ : IsStoppingTime f τ\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nseq : ℕ → ι\nh_seq_tendsto : Tendsto seq atTop atTop\nω : Ω\nw✝ : ℕ\nhx : ω ∈ s\nright✝ : ω ∈ {ω | τ ω ≤ seq w✝}\n⊢ ω ∈ s\n[PROOFSTEP]\nexact hx\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι✝\nf✝ : Filtration ι✝ m\nτ✝ π : Ω → ι✝\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : IsCountablyGenerated atTop\nhτ : IsStoppingTime f τ\n⊢ IsStoppingTime.measurableSpace hτ ≤ m\n[PROOFSTEP]\ncases isEmpty_or_nonempty ι\n[GOAL]\ncase inl\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι✝\nf✝ : Filtration ι✝ m\nτ✝ π : Ω → ι✝\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : IsCountablyGenerated atTop\nhτ : IsStoppingTime f τ\nh✝ : IsEmpty ι\n⊢ IsStoppingTime.measurableSpace hτ ≤ m\n[PROOFSTEP]\nhaveI : IsEmpty Ω := ⟨fun ω => IsEmpty.false (τ ω)⟩\n[GOAL]\ncase inl\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι✝\nf✝ : Filtration ι✝ m\nτ✝ π : Ω → ι✝\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : IsCountablyGenerated atTop\nhτ : IsStoppingTime f τ\nh✝ : IsEmpty ι\nthis : IsEmpty Ω\n⊢ IsStoppingTime.measurableSpace hτ ≤ m\n[PROOFSTEP]\nintro s _\n[GOAL]\ncase inl\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι✝\nf✝ : Filtration ι✝ m\nτ✝ π : Ω → ι✝\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : IsCountablyGenerated atTop\nhτ : IsStoppingTime f τ\nh✝ : IsEmpty ι\nthis : IsEmpty Ω\ns : Set Ω\na✝ : MeasurableSet s\n⊢ MeasurableSet s\n[PROOFSTEP]\nsuffices hs : s = ∅\n[GOAL]\ncase inl\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι✝\nf✝ : Filtration ι✝ m\nτ✝ π : Ω → ι✝\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : IsCountablyGenerated atTop\nhτ : IsStoppingTime f τ\nh✝ : IsEmpty ι\nthis : IsEmpty Ω\ns : Set Ω\na✝ : MeasurableSet s\nhs : s = ∅\n⊢ MeasurableSet s\n[PROOFSTEP]\nrw [hs]\n[GOAL]\ncase inl\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι✝\nf✝ : Filtration ι✝ m\nτ✝ π : Ω → ι✝\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : IsCountablyGenerated atTop\nhτ : IsStoppingTime f τ\nh✝ : IsEmpty ι\nthis : IsEmpty Ω\ns : Set Ω\na✝ : MeasurableSet s\nhs : s = ∅\n⊢ MeasurableSet ∅\n[PROOFSTEP]\nexact MeasurableSet.empty\n[GOAL]\ncase hs\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι✝\nf✝ : Filtration ι✝ m\nτ✝ π : Ω → ι✝\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : IsCountablyGenerated atTop\nhτ : IsStoppingTime f τ\nh✝ : IsEmpty ι\nthis : IsEmpty Ω\ns : Set Ω\na✝ : MeasurableSet s\n⊢ s = ∅\n[PROOFSTEP]\nhaveI : Unique (Set Ω) := Set.uniqueEmpty\n[GOAL]\ncase hs\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι✝\nf✝ : Filtration ι✝ m\nτ✝ π : Ω → ι✝\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : IsCountablyGenerated atTop\nhτ : IsStoppingTime f τ\nh✝ : IsEmpty ι\nthis✝ : IsEmpty Ω\ns : Set Ω\na✝ : MeasurableSet s\nthis : Unique (Set Ω)\n⊢ s = ∅\n[PROOFSTEP]\nrw [Unique.eq_default s, Unique.eq_default ∅]\n[GOAL]\ncase inr\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\ninst✝² : Preorder ι✝\nf✝ : Filtration ι✝ m\nτ✝ π : Ω → ι✝\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : IsCountablyGenerated atTop\nhτ : IsStoppingTime f τ\nh✝ : Nonempty ι\n⊢ IsStoppingTime.measurableSpace hτ ≤ m\n[PROOFSTEP]\nexact measurableSpace_le' hτ\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\n⊢ IsStoppingTime.measurableSpace (_ : IsStoppingTime f fun x => i) = ↑f i\n[PROOFSTEP]\next1 s\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\ns : Set Ω\n⊢ MeasurableSet s ↔ MeasurableSet s\n[PROOFSTEP]\nchange MeasurableSet[(isStoppingTime_const f i).measurableSpace] s ↔ MeasurableSet[f i] s\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\ns : Set Ω\n⊢ MeasurableSet s ↔ MeasurableSet s\n[PROOFSTEP]\nrw [IsStoppingTime.measurableSet]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\ns : Set Ω\n⊢ (∀ (i_1 : ι), MeasurableSet (s ∩ {ω | i ≤ i_1})) ↔ MeasurableSet s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\ns : Set Ω\n⊢ (∀ (i_1 : ι), MeasurableSet (s ∩ {ω | i ≤ i_1})) → MeasurableSet s\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\ns : Set Ω\n⊢ MeasurableSet s → ∀ (i_1 : ι), MeasurableSet (s ∩ {ω | i ≤ i_1})\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\ns : Set Ω\nh : ∀ (i_1 : ι), MeasurableSet (s ∩ {ω | i ≤ i_1})\n⊢ MeasurableSet s\n[PROOFSTEP]\nspecialize h i\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\ns : Set Ω\nh : MeasurableSet (s ∩ {ω | i ≤ i})\n⊢ MeasurableSet s\n[PROOFSTEP]\nsimpa only [le_refl, Set.setOf_true, Set.inter_univ] using h\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\ns : Set Ω\nh : MeasurableSet s\n⊢ ∀ (i_1 : ι), MeasurableSet (s ∩ {ω | i ≤ i_1})\n[PROOFSTEP]\nintro j\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\ns : Set Ω\nh : MeasurableSet s\nj : ι\n⊢ MeasurableSet (s ∩ {ω | i ≤ j})\n[PROOFSTEP]\nby_cases hij : i ≤ j\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\ns : Set Ω\nh : MeasurableSet s\nj : ι\nhij : i ≤ j\n⊢ MeasurableSet (s ∩ {ω | i ≤ j})\n[PROOFSTEP]\nsimp only [hij, Set.setOf_true, Set.inter_univ]\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\ns : Set Ω\nh : MeasurableSet s\nj : ι\nhij : i ≤ j\n⊢ MeasurableSet s\n[PROOFSTEP]\nexact f.mono hij _ h\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf✝ : Filtration ι m\nτ π : Ω → ι\nf : Filtration ι m\ni : ι\ns : Set Ω\nh : MeasurableSet s\nj : ι\nhij : ¬i ≤ j\n⊢ MeasurableSet (s ∩ {ω | i ≤ j})\n[PROOFSTEP]\nsimp only [hij, Set.setOf_false, Set.inter_empty, @MeasurableSet.empty _ (f.1 j)]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\n⊢ MeasurableSet (s ∩ {ω | τ ω = i}) ↔ MeasurableSet (s ∩ {ω | τ ω = i})\n[PROOFSTEP]\nhave : ∀ j, {ω : Ω | τ ω = i} ∩ {ω : Ω | τ ω ≤ j} = {ω : Ω | τ ω = i} ∩ {_ω | i ≤ j} :=\n  by\n  intro j\n  ext1 ω\n  simp only [Set.mem_inter_iff, Set.mem_setOf_eq, and_congr_right_iff]\n  intro hxi\n  rw [hxi]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\n⊢ ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\n[PROOFSTEP]\nintro j\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni j : ι\n⊢ {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni j : ι\nω : Ω\n⊢ ω ∈ {ω | τ ω = i} ∩ {ω | τ ω ≤ j} ↔ ω ∈ {ω | τ ω = i} ∩ {_ω | i ≤ j}\n[PROOFSTEP]\nsimp only [Set.mem_inter_iff, Set.mem_setOf_eq, and_congr_right_iff]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni j : ι\nω : Ω\n⊢ τ ω = i → (τ ω ≤ j ↔ i ≤ j)\n[PROOFSTEP]\nintro hxi\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni j : ι\nω : Ω\nhxi : τ ω = i\n⊢ τ ω ≤ j ↔ i ≤ j\n[PROOFSTEP]\nrw [hxi]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nthis : ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\n⊢ MeasurableSet (s ∩ {ω | τ ω = i}) ↔ MeasurableSet (s ∩ {ω | τ ω = i})\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nthis : ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\n⊢ MeasurableSet (s ∩ {ω | τ ω = i}) → MeasurableSet (s ∩ {ω | τ ω = i})\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nthis : ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\n⊢ MeasurableSet (s ∩ {ω | τ ω = i}) → MeasurableSet (s ∩ {ω | τ ω = i})\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nthis : ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\nh : MeasurableSet (s ∩ {ω | τ ω = i})\n⊢ MeasurableSet (s ∩ {ω | τ ω = i})\n[PROOFSTEP]\nspecialize h i\n[GOAL]\ncase mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nthis : ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\nh : MeasurableSet (s ∩ {ω | τ ω = i} ∩ {ω | τ ω ≤ i})\n⊢ MeasurableSet (s ∩ {ω | τ ω = i})\n[PROOFSTEP]\nsimpa only [Set.inter_assoc, this, le_refl, Set.setOf_true, Set.inter_univ] using h\n[GOAL]\ncase mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nthis : ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\nh : MeasurableSet (s ∩ {ω | τ ω = i})\n⊢ MeasurableSet (s ∩ {ω | τ ω = i})\n[PROOFSTEP]\nintro j\n[GOAL]\ncase mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nthis : ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\nh : MeasurableSet (s ∩ {ω | τ ω = i})\nj : ι\n⊢ MeasurableSet (s ∩ {ω | τ ω = i} ∩ {ω | τ ω ≤ j})\n[PROOFSTEP]\nrw [Set.inter_assoc, this]\n[GOAL]\ncase mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nthis : ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\nh : MeasurableSet (s ∩ {ω | τ ω = i})\nj : ι\n⊢ MeasurableSet (s ∩ ({ω | τ ω = i} ∩ {_ω | i ≤ j}))\n[PROOFSTEP]\nby_cases hij : i ≤ j\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nthis : ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\nh : MeasurableSet (s ∩ {ω | τ ω = i})\nj : ι\nhij : i ≤ j\n⊢ MeasurableSet (s ∩ ({ω | τ ω = i} ∩ {_ω | i ≤ j}))\n[PROOFSTEP]\nsimp only [hij, Set.setOf_true, Set.inter_univ]\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nthis : ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\nh : MeasurableSet (s ∩ {ω | τ ω = i})\nj : ι\nhij : i ≤ j\n⊢ MeasurableSet (s ∩ {ω | τ ω = i})\n[PROOFSTEP]\nexact f.mono hij _ h\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nthis : ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\nh : MeasurableSet (s ∩ {ω | τ ω = i})\nj : ι\nhij : ¬i ≤ j\n⊢ MeasurableSet (s ∩ ({ω | τ ω = i} ∩ {_ω | i ≤ j}))\n[PROOFSTEP]\nsimp [hij]\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : Preorder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nthis : ∀ (j : ι), {ω | τ ω = i} ∩ {ω | τ ω ≤ j} = {ω | τ ω = i} ∩ {_ω | i ≤ j}\nh : MeasurableSet (s ∩ {ω | τ ω = i})\nj : ι\nhij : ¬i ≤ j\n⊢ MeasurableSet ∅\n[PROOFSTEP]\nconvert @MeasurableSet.empty _ (Filtration.seq f j)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\nι : Type ?u.96517\ninst✝³ : SemilatticeSup ι\ninst✝² : OrderBot ι\ninst✝¹ : IsCountablyGenerated atTop\nμ : Measure Ω\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : SigmaFiniteFiltration μ f\nhτ : IsStoppingTime f τ\n⊢ SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\n[PROOFSTEP]\nrefine @sigmaFiniteTrim_mono _ _ ?_ _ _ _ ?_ ?_\n[GOAL]\ncase refine_1\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\nι : Type ?u.96517\ninst✝³ : SemilatticeSup ι\ninst✝² : OrderBot ι\ninst✝¹ : IsCountablyGenerated atTop\nμ : Measure Ω\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : SigmaFiniteFiltration μ f\nhτ : IsStoppingTime f τ\n⊢ MeasurableSpace Ω\n[PROOFSTEP]\nexact f ⊥\n[GOAL]\ncase refine_2\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\nι : Type ?u.96517\ninst✝³ : SemilatticeSup ι\ninst✝² : OrderBot ι\ninst✝¹ : IsCountablyGenerated atTop\nμ : Measure Ω\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : SigmaFiniteFiltration μ f\nhτ : IsStoppingTime f τ\n⊢ ↑f ⊥ ≤ IsStoppingTime.measurableSpace hτ\n[PROOFSTEP]\nexact hτ.le_measurableSpace_of_const_le fun _ => bot_le\n[GOAL]\ncase refine_3\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\nι : Type ?u.96517\ninst✝³ : SemilatticeSup ι\ninst✝² : OrderBot ι\ninst✝¹ : IsCountablyGenerated atTop\nμ : Measure Ω\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : SigmaFiniteFiltration μ f\nhτ : IsStoppingTime f τ\n⊢ SigmaFinite (Measure.trim μ (_ : ↑f ⊥ ≤ m))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\nι : Type ?u.101660\ninst✝² : SemilatticeSup ι\ninst✝¹ : OrderBot ι\nμ : Measure Ω\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : SigmaFiniteFiltration μ f\nhτ : IsStoppingTime f τ\nn : ι\nhτ_le : ∀ (ω : Ω), τ ω ≤ n\n⊢ SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\n[PROOFSTEP]\nrefine @sigmaFiniteTrim_mono _ _ ?_ _ _ _ ?_ ?_\n[GOAL]\ncase refine_1\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\nι : Type ?u.101660\ninst✝² : SemilatticeSup ι\ninst✝¹ : OrderBot ι\nμ : Measure Ω\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : SigmaFiniteFiltration μ f\nhτ : IsStoppingTime f τ\nn : ι\nhτ_le : ∀ (ω : Ω), τ ω ≤ n\n⊢ MeasurableSpace Ω\n[PROOFSTEP]\nexact f ⊥\n[GOAL]\ncase refine_2\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\nι : Type ?u.101660\ninst✝² : SemilatticeSup ι\ninst✝¹ : OrderBot ι\nμ : Measure Ω\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : SigmaFiniteFiltration μ f\nhτ : IsStoppingTime f τ\nn : ι\nhτ_le : ∀ (ω : Ω), τ ω ≤ n\n⊢ ↑f ⊥ ≤ IsStoppingTime.measurableSpace hτ\n[PROOFSTEP]\nexact hτ.le_measurableSpace_of_const_le fun _ => bot_le\n[GOAL]\ncase refine_3\nΩ : Type u_1\nβ : Type u_2\nι✝ : Type u_3\nm : MeasurableSpace Ω\nι : Type ?u.101660\ninst✝² : SemilatticeSup ι\ninst✝¹ : OrderBot ι\nμ : Measure Ω\nf : Filtration ι m\nτ : Ω → ι\ninst✝ : SigmaFiniteFiltration μ f\nhτ : IsStoppingTime f τ\nn : ι\nhτ_le : ∀ (ω : Ω), τ ω ≤ n\n⊢ SigmaFinite (Measure.trim μ (_ : ↑f ⊥ ≤ m))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ MeasurableSet {ω | τ ω ≤ i}\n[PROOFSTEP]\nintro j\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ni j : ι\n⊢ MeasurableSet ({ω | τ ω ≤ i} ∩ {ω | τ ω ≤ j})\n[PROOFSTEP]\nhave : {ω : Ω | τ ω ≤ i} ∩ {ω : Ω | τ ω ≤ j} = {ω : Ω | τ ω ≤ min i j} := by ext1 ω;\n  simp only [Set.mem_inter_iff, Set.mem_setOf_eq, le_min_iff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ni j : ι\n⊢ {ω | τ ω ≤ i} ∩ {ω | τ ω ≤ j} = {ω | τ ω ≤ min i j}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ni j : ι\nω : Ω\n⊢ ω ∈ {ω | τ ω ≤ i} ∩ {ω | τ ω ≤ j} ↔ ω ∈ {ω | τ ω ≤ min i j}\n[PROOFSTEP]\nsimp only [Set.mem_inter_iff, Set.mem_setOf_eq, le_min_iff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ni j : ι\nthis : {ω | τ ω ≤ i} ∩ {ω | τ ω ≤ j} = {ω | τ ω ≤ min i j}\n⊢ MeasurableSet ({ω | τ ω ≤ i} ∩ {ω | τ ω ≤ j})\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ni j : ι\nthis : {ω | τ ω ≤ i} ∩ {ω | τ ω ≤ j} = {ω | τ ω ≤ min i j}\n⊢ MeasurableSet {ω | τ ω ≤ min i j}\n[PROOFSTEP]\nexact f.mono (min_le_right i j) _ (hτ _)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ MeasurableSet {ω | i < τ ω}\n[PROOFSTEP]\nhave : {ω : Ω | i < τ ω} = {ω : Ω | τ ω ≤ i}ᶜ := by ext1 ω; simp\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ {ω | i < τ ω} = {ω | τ ω ≤ i}ᶜ\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\nω : Ω\n⊢ ω ∈ {ω | i < τ ω} ↔ ω ∈ {ω | τ ω ≤ i}ᶜ\n[PROOFSTEP]\nsimp\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\nthis : {ω | i < τ ω} = {ω | τ ω ≤ i}ᶜ\n⊢ MeasurableSet {ω | i < τ ω}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\nthis : {ω | i < τ ω} = {ω | τ ω ≤ i}ᶜ\n⊢ MeasurableSet {ω | τ ω ≤ i}ᶜ\n[PROOFSTEP]\nexact (hτ.measurableSet_le' i).compl\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ MeasurableSet {ω | τ ω = i}\n[PROOFSTEP]\nrw [← Set.univ_inter {ω | τ ω = i}, measurableSet_inter_eq_iff, Set.univ_inter]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ MeasurableSet {ω | τ ω = i}\n[PROOFSTEP]\nexact hτ.measurableSet_eq i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ MeasurableSet {ω | i ≤ τ ω}\n[PROOFSTEP]\nhave : {ω | i ≤ τ ω} = {ω | τ ω = i} ∪ {ω | i < τ ω} := by\n  ext1 ω\n  simp only [le_iff_lt_or_eq, Set.mem_setOf_eq, Set.mem_union]\n  rw [@eq_comm _ i, or_comm]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ {ω | i ≤ τ ω} = {ω | τ ω = i} ∪ {ω | i < τ ω}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nω : Ω\n⊢ ω ∈ {ω | i ≤ τ ω} ↔ ω ∈ {ω | τ ω = i} ∪ {ω | i < τ ω}\n[PROOFSTEP]\nsimp only [le_iff_lt_or_eq, Set.mem_setOf_eq, Set.mem_union]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nω : Ω\n⊢ i < τ ω ∨ i = τ ω ↔ τ ω = i ∨ i < τ ω\n[PROOFSTEP]\nrw [@eq_comm _ i, or_comm]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nthis : {ω | i ≤ τ ω} = {ω | τ ω = i} ∪ {ω | i < τ ω}\n⊢ MeasurableSet {ω | i ≤ τ ω}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nthis : {ω | i ≤ τ ω} = {ω | τ ω = i} ∪ {ω | i < τ ω}\n⊢ MeasurableSet ({ω | τ ω = i} ∪ {ω | i < τ ω})\n[PROOFSTEP]\nexact (hτ.measurableSet_eq' i).union (hτ.measurableSet_gt' i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nhave : {ω | τ ω < i} = {ω | τ ω ≤ i} \\ {ω | τ ω = i} := by\n  ext1 ω\n  simp only [lt_iff_le_and_ne, Set.mem_setOf_eq, Set.mem_diff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ {ω | τ ω < i} = {ω | τ ω ≤ i} \\ {ω | τ ω = i}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nω : Ω\n⊢ ω ∈ {ω | τ ω < i} ↔ ω ∈ {ω | τ ω ≤ i} \\ {ω | τ ω = i}\n[PROOFSTEP]\nsimp only [lt_iff_le_and_ne, Set.mem_setOf_eq, Set.mem_diff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nthis : {ω | τ ω < i} = {ω | τ ω ≤ i} \\ {ω | τ ω = i}\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝³ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝² : TopologicalSpace ι\ninst✝¹ : OrderTopology ι\ninst✝ : FirstCountableTopology ι\nhτ : IsStoppingTime f τ\ni : ι\nthis : {ω | τ ω < i} = {ω | τ ω ≤ i} \\ {ω | τ ω = i}\n⊢ MeasurableSet ({ω | τ ω ≤ i} \\ {ω | τ ω = i})\n[PROOFSTEP]\nexact (hτ.measurableSet_le' i).diff (hτ.measurableSet_eq' i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\n⊢ MeasurableSet {ω | τ ω = i}\n[PROOFSTEP]\nrw [← Set.univ_inter {ω | τ ω = i}, measurableSet_inter_eq_iff, Set.univ_inter]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\n⊢ MeasurableSet {ω | τ ω = i}\n[PROOFSTEP]\nexact hτ.measurableSet_eq_of_countable_range h_countable i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\n⊢ MeasurableSet {ω | i ≤ τ ω}\n[PROOFSTEP]\nhave : {ω | i ≤ τ ω} = {ω | τ ω = i} ∪ {ω | i < τ ω} := by\n  ext1 ω\n  simp only [le_iff_lt_or_eq, Set.mem_setOf_eq, Set.mem_union]\n  rw [@eq_comm _ i, or_comm]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\n⊢ {ω | i ≤ τ ω} = {ω | τ ω = i} ∪ {ω | i < τ ω}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nω : Ω\n⊢ ω ∈ {ω | i ≤ τ ω} ↔ ω ∈ {ω | τ ω = i} ∪ {ω | i < τ ω}\n[PROOFSTEP]\nsimp only [le_iff_lt_or_eq, Set.mem_setOf_eq, Set.mem_union]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nω : Ω\n⊢ i < τ ω ∨ i = τ ω ↔ τ ω = i ∨ i < τ ω\n[PROOFSTEP]\nrw [@eq_comm _ i, or_comm]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | i ≤ τ ω} = {ω | τ ω = i} ∪ {ω | i < τ ω}\n⊢ MeasurableSet {ω | i ≤ τ ω}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | i ≤ τ ω} = {ω | τ ω = i} ∪ {ω | i < τ ω}\n⊢ MeasurableSet ({ω | τ ω = i} ∪ {ω | i < τ ω})\n[PROOFSTEP]\nexact (hτ.measurableSet_eq_of_countable_range' h_countable i).union (hτ.measurableSet_gt' i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nhave : {ω | τ ω < i} = {ω | τ ω ≤ i} \\ {ω | τ ω = i} := by\n  ext1 ω\n  simp only [lt_iff_le_and_ne, Set.mem_setOf_eq, Set.mem_diff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\n⊢ {ω | τ ω < i} = {ω | τ ω ≤ i} \\ {ω | τ ω = i}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nω : Ω\n⊢ ω ∈ {ω | τ ω < i} ↔ ω ∈ {ω | τ ω ≤ i} \\ {ω | τ ω = i}\n[PROOFSTEP]\nsimp only [lt_iff_le_and_ne, Set.mem_setOf_eq, Set.mem_diff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | τ ω < i} = {ω | τ ω ≤ i} \\ {ω | τ ω = i}\n⊢ MeasurableSet {ω | τ ω < i}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ni : ι\nthis : {ω | τ ω < i} = {ω | τ ω ≤ i} \\ {ω | τ ω = i}\n⊢ MeasurableSet ({ω | τ ω ≤ i} \\ {ω | τ ω = i})\n[PROOFSTEP]\nexact (hτ.measurableSet_le' i).diff (hτ.measurableSet_eq_of_countable_range' h_countable i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\n⊢ IsStoppingTime.measurableSpace hτ ≤ m\n[PROOFSTEP]\nintro s hs\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ns : Set Ω\nhs : MeasurableSet s\n⊢ MeasurableSet s\n[PROOFSTEP]\nchange ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs \n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\n⊢ MeasurableSet s\n[PROOFSTEP]\nrw [(_ : s = ⋃ i ∈ Set.range τ, s ∩ {ω | τ ω ≤ i})]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\n⊢ MeasurableSet (⋃ (i : ι) (_ : i ∈ Set.range τ), s ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nexact MeasurableSet.biUnion h_countable fun i _ => f.le i _ (hs i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\n⊢ s = ⋃ (i : ι) (_ : i ∈ Set.range τ), s ∩ {ω | τ ω ≤ i}\n[PROOFSTEP]\next ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\n⊢ ω ∈ s ↔ ω ∈ ⋃ (i : ι) (_ : i ∈ Set.range τ), s ∩ {ω | τ ω ≤ i}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\n⊢ ω ∈ s → ω ∈ ⋃ (i : ι) (_ : i ∈ Set.range τ), s ∩ {ω | τ ω ≤ i}\n[PROOFSTEP]\nrw [Set.mem_iUnion]\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\n⊢ ω ∈ ⋃ (i : ι) (_ : i ∈ Set.range τ), s ∩ {ω | τ ω ≤ i} → ω ∈ s\n[PROOFSTEP]\nrw [Set.mem_iUnion]\n[GOAL]\ncase h.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\n⊢ ω ∈ s → ∃ i, ω ∈ ⋃ (_ : i ∈ Set.range τ), s ∩ {ω | τ ω ≤ i}\n[PROOFSTEP]\nexact fun hx => ⟨τ ω, by simpa using hx⟩\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\nhx : ω ∈ s\n⊢ ω ∈ ⋃ (_ : τ ω ∈ Set.range τ), s ∩ {ω_1 | τ ω_1 ≤ τ ω}\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\n⊢ (∃ i, ω ∈ ⋃ (_ : i ∈ Set.range τ), s ∩ {ω | τ ω ≤ i}) → ω ∈ s\n[PROOFSTEP]\nrintro ⟨i, hx⟩\n[GOAL]\ncase h.mpr.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\ni : ι\nhx : ω ∈ ⋃ (_ : i ∈ Set.range τ), s ∩ {ω | τ ω ≤ i}\n⊢ ω ∈ s\n[PROOFSTEP]\nsimp only [Set.mem_range, Set.iUnion_exists, Set.mem_iUnion, Set.mem_inter_iff, Set.mem_setOf_eq, exists_prop,\n  exists_and_right] at hx \n[GOAL]\ncase h.mpr.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nh_countable : Set.Countable (Set.range τ)\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\nω : Ω\ni : ι\nhx : (∃ y, τ y = i) ∧ ω ∈ s ∧ τ ω ≤ i\n⊢ ω ∈ s\n[PROOFSTEP]\nexact hx.2.1\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ IsStoppingTime.measurableSpace (_ : IsStoppingTime f fun ω => min (τ ω) (π ω)) =\n    IsStoppingTime.measurableSpace hτ ⊓ IsStoppingTime.measurableSpace hπ\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ IsStoppingTime.measurableSpace (_ : IsStoppingTime f fun ω => min (τ ω) (π ω)) ≤\n    IsStoppingTime.measurableSpace hτ ⊓ IsStoppingTime.measurableSpace hπ\n[PROOFSTEP]\nexact le_inf (measurableSpace_mono _ hτ fun _ => min_le_left _ _) (measurableSpace_mono _ hπ fun _ => min_le_right _ _)\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ IsStoppingTime.measurableSpace hτ ⊓ IsStoppingTime.measurableSpace hπ ≤\n    IsStoppingTime.measurableSpace (_ : IsStoppingTime f fun ω => min (τ ω) (π ω))\n[PROOFSTEP]\nintro s\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\n⊢ MeasurableSet s → MeasurableSet s\n[PROOFSTEP]\nchange\n  MeasurableSet[hτ.measurableSpace] s ∧ MeasurableSet[hπ.measurableSpace] s →\n    MeasurableSet[(hτ.min hπ).measurableSpace] s\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\n⊢ MeasurableSet s ∧ MeasurableSet s → MeasurableSet s\n[PROOFSTEP]\nsimp_rw [IsStoppingTime.measurableSet]\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\n⊢ ((∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) ∧ ∀ (i : ι), MeasurableSet (s ∩ {ω | π ω ≤ i})) →\n    ∀ (i : ι), MeasurableSet (s ∩ {ω | min (τ ω) (π ω) ≤ i})\n[PROOFSTEP]\nhave : ∀ i, {ω | min (τ ω) (π ω) ≤ i} = {ω | τ ω ≤ i} ∪ {ω | π ω ≤ i} := by intro i; ext1 ω; simp\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\n⊢ ∀ (i : ι), {ω | min (τ ω) (π ω) ≤ i} = {ω | τ ω ≤ i} ∪ {ω | π ω ≤ i}\n[PROOFSTEP]\nintro i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\ni : ι\n⊢ {ω | min (τ ω) (π ω) ≤ i} = {ω | τ ω ≤ i} ∪ {ω | π ω ≤ i}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\ni : ι\nω : Ω\n⊢ ω ∈ {ω | min (τ ω) (π ω) ≤ i} ↔ ω ∈ {ω | τ ω ≤ i} ∪ {ω | π ω ≤ i}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nthis : ∀ (i : ι), {ω | min (τ ω) (π ω) ≤ i} = {ω | τ ω ≤ i} ∪ {ω | π ω ≤ i}\n⊢ ((∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) ∧ ∀ (i : ι), MeasurableSet (s ∩ {ω | π ω ≤ i})) →\n    ∀ (i : ι), MeasurableSet (s ∩ {ω | min (τ ω) (π ω) ≤ i})\n[PROOFSTEP]\nsimp_rw [this, Set.inter_union_distrib_left]\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nthis : ∀ (i : ι), {ω | min (τ ω) (π ω) ≤ i} = {ω | τ ω ≤ i} ∪ {ω | π ω ≤ i}\n⊢ ((∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) ∧ ∀ (i : ι), MeasurableSet (s ∩ {ω | π ω ≤ i})) →\n    ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i} ∪ s ∩ {ω | π ω ≤ i})\n[PROOFSTEP]\nexact fun h i => (h.left i).union (h.right i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\n⊢ MeasurableSet s ↔ MeasurableSet s ∧ MeasurableSet s\n[PROOFSTEP]\nrw [measurableSpace_min hτ hπ]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\n⊢ MeasurableSet s ↔ MeasurableSet s ∧ MeasurableSet s\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ IsStoppingTime.measurableSpace (_ : IsStoppingTime f fun ω => min (τ ω) i) = IsStoppingTime.measurableSpace hτ ⊓ ↑f i\n[PROOFSTEP]\nrw [hτ.measurableSpace_min (isStoppingTime_const _ i), measurableSpace_const]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\n⊢ MeasurableSet s ↔ MeasurableSet s ∧ MeasurableSet s\n[PROOFSTEP]\nrw [measurableSpace_min_const hτ]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\n⊢ MeasurableSet s ↔ MeasurableSet s ∧ MeasurableSet s\n[PROOFSTEP]\napply MeasurableSpace.measurableSet_inf\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : MeasurableSet s\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\n[PROOFSTEP]\nsimp_rw [IsStoppingTime.measurableSet] at hs ⊢\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\n⊢ ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i})\n[PROOFSTEP]\nintro i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i})\n[PROOFSTEP]\nhave :\n  s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i} =\n    s ∩ {ω | τ ω ≤ i} ∩ {ω | min (τ ω) (π ω) ≤ i} ∩ {ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i} :=\n  by\n  ext1 ω\n  simp only [min_le_iff, Set.mem_inter_iff, Set.mem_setOf_eq, le_min_iff, le_refl, true_and_iff, and_true_iff,\n    true_or_iff, or_true_iff]\n  by_cases hτi : τ ω ≤ i\n  · simp only [hτi, true_or_iff, and_true_iff, and_congr_right_iff]\n    intro\n    constructor <;> intro h\n    · exact Or.inl h\n    · cases' h with h h\n      · exact h\n      · exact hτi.trans h\n  simp only [hτi, false_or_iff, and_false_iff, false_and_iff, iff_false_iff, not_and, not_le, and_imp]\n  refine' fun _ hτ_le_π => lt_of_lt_of_le _ hτ_le_π\n  rw [← not_le]\n  exact hτi\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\n⊢ s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i} =\n    s ∩ {ω | τ ω ≤ i} ∩ {ω | min (τ ω) (π ω) ≤ i} ∩ {ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\n⊢ ω ∈ s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i} ↔\n    ω ∈ s ∩ {ω | τ ω ≤ i} ∩ {ω | min (τ ω) (π ω) ≤ i} ∩ {ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i}\n[PROOFSTEP]\nsimp only [min_le_iff, Set.mem_inter_iff, Set.mem_setOf_eq, le_min_iff, le_refl, true_and_iff, and_true_iff,\n  true_or_iff, or_true_iff]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\n⊢ (ω ∈ s ∧ τ ω ≤ π ω) ∧ (τ ω ≤ i ∨ π ω ≤ i) ↔ ((ω ∈ s ∧ τ ω ≤ i) ∧ (τ ω ≤ i ∨ π ω ≤ i)) ∧ (τ ω ≤ π ω ∨ i ≤ π ω)\n[PROOFSTEP]\nby_cases hτi : τ ω ≤ i\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : τ ω ≤ i\n⊢ (ω ∈ s ∧ τ ω ≤ π ω) ∧ (τ ω ≤ i ∨ π ω ≤ i) ↔ ((ω ∈ s ∧ τ ω ≤ i) ∧ (τ ω ≤ i ∨ π ω ≤ i)) ∧ (τ ω ≤ π ω ∨ i ≤ π ω)\n[PROOFSTEP]\nsimp only [hτi, true_or_iff, and_true_iff, and_congr_right_iff]\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : τ ω ≤ i\n⊢ ω ∈ s → (τ ω ≤ π ω ↔ τ ω ≤ π ω ∨ i ≤ π ω)\n[PROOFSTEP]\nintro\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : τ ω ≤ i\na✝ : ω ∈ s\n⊢ τ ω ≤ π ω ↔ τ ω ≤ π ω ∨ i ≤ π ω\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase pos.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : τ ω ≤ i\na✝ : ω ∈ s\n⊢ τ ω ≤ π ω → τ ω ≤ π ω ∨ i ≤ π ω\n[PROOFSTEP]\nintro h\n[GOAL]\ncase pos.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : τ ω ≤ i\na✝ : ω ∈ s\n⊢ τ ω ≤ π ω ∨ i ≤ π ω → τ ω ≤ π ω\n[PROOFSTEP]\nintro h\n[GOAL]\ncase pos.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : τ ω ≤ i\na✝ : ω ∈ s\nh : τ ω ≤ π ω\n⊢ τ ω ≤ π ω ∨ i ≤ π ω\n[PROOFSTEP]\nexact Or.inl h\n[GOAL]\ncase pos.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : τ ω ≤ i\na✝ : ω ∈ s\nh : τ ω ≤ π ω ∨ i ≤ π ω\n⊢ τ ω ≤ π ω\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase pos.mpr.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : τ ω ≤ i\na✝ : ω ∈ s\nh : τ ω ≤ π ω\n⊢ τ ω ≤ π ω\n[PROOFSTEP]\nexact h\n[GOAL]\ncase pos.mpr.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : τ ω ≤ i\na✝ : ω ∈ s\nh : i ≤ π ω\n⊢ τ ω ≤ π ω\n[PROOFSTEP]\nexact hτi.trans h\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : ¬τ ω ≤ i\n⊢ (ω ∈ s ∧ τ ω ≤ π ω) ∧ (τ ω ≤ i ∨ π ω ≤ i) ↔ ((ω ∈ s ∧ τ ω ≤ i) ∧ (τ ω ≤ i ∨ π ω ≤ i)) ∧ (τ ω ≤ π ω ∨ i ≤ π ω)\n[PROOFSTEP]\nsimp only [hτi, false_or_iff, and_false_iff, false_and_iff, iff_false_iff, not_and, not_le, and_imp]\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : ¬τ ω ≤ i\n⊢ ω ∈ s → τ ω ≤ π ω → i < π ω\n[PROOFSTEP]\nrefine' fun _ hτ_le_π => lt_of_lt_of_le _ hτ_le_π\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : ¬τ ω ≤ i\nx✝ : ω ∈ s\nhτ_le_π : τ ω ≤ π ω\n⊢ i < τ ω\n[PROOFSTEP]\nrw [← not_le]\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nω : Ω\nhτi : ¬τ ω ≤ i\nx✝ : ω ∈ s\nhτ_le_π : τ ω ≤ π ω\n⊢ ¬τ ω ≤ i\n[PROOFSTEP]\nexact hτi\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nthis :\n  s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i} =\n    s ∩ {ω | τ ω ≤ i} ∩ {ω | min (τ ω) (π ω) ≤ i} ∩ {ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i}\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i})\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nthis :\n  s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i} =\n    s ∩ {ω | τ ω ≤ i} ∩ {ω | min (τ ω) (π ω) ≤ i} ∩ {ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i}\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ i} ∩ {ω | min (τ ω) (π ω) ≤ i} ∩ {ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i})\n[PROOFSTEP]\nrefine' ((hs i).inter ((hτ.min hπ) i)).inter _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nthis :\n  s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i} =\n    s ∩ {ω | τ ω ≤ i} ∩ {ω | min (τ ω) (π ω) ≤ i} ∩ {ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i}\n⊢ MeasurableSet {ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i}\n[PROOFSTEP]\napply @measurableSet_le _ _ _ _ _ (Filtration.seq f i) _ _ _ _ _ ?_ ?_\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nthis :\n  s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i} =\n    s ∩ {ω | τ ω ≤ i} ∩ {ω | min (τ ω) (π ω) ≤ i} ∩ {ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i}\n⊢ Measurable fun a => min (τ a) i\n[PROOFSTEP]\nexact (hτ.min_const i).measurable_of_le fun _ => min_le_right _ _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nhs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})\ni : ι\nthis :\n  s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i} =\n    s ∩ {ω | τ ω ≤ i} ∩ {ω | min (τ ω) (π ω) ≤ i} ∩ {ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i}\n⊢ Measurable fun a => min (min (τ a) (π a)) i\n[PROOFSTEP]\nexact ((hτ.min hπ).min_const i).measurable_of_le fun _ => min_le_right _ _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ π ω}) ↔ MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ π ω}) → MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ π ω}) → MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nh : MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\n[PROOFSTEP]\nhave : s ∩ {ω | τ ω ≤ π ω} = s ∩ {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ π ω} := by rw [Set.inter_assoc, Set.inter_self]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nh : MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\n⊢ s ∩ {ω | τ ω ≤ π ω} = s ∩ {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ π ω}\n[PROOFSTEP]\nrw [Set.inter_assoc, Set.inter_self]\n[GOAL]\ncase mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nh : MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\nthis : s ∩ {ω | τ ω ≤ π ω} = s ∩ {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ π ω}\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nh : MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\nthis : s ∩ {ω | τ ω ≤ π ω} = s ∩ {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ π ω}\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ π ω})\n[PROOFSTEP]\nexact measurableSet_inter_le _ hπ _ h\n[GOAL]\ncase mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nh : MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\n[PROOFSTEP]\nrw [measurableSet_min_iff hτ hπ] at h \n[GOAL]\ncase mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\ns : Set Ω\nh : MeasurableSet (s ∩ {ω | τ ω ≤ π ω}) ∧ MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ π ω})\n[PROOFSTEP]\nexact h.1\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ i}) ↔ MeasurableSet (s ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nrw [IsStoppingTime.measurableSet_min_iff hτ (isStoppingTime_const _ i), IsStoppingTime.measurableSpace_const,\n  IsStoppingTime.measurableSet]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\n⊢ (∀ (i_1 : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i} ∩ {ω | τ ω ≤ i_1})) ↔\n    (∀ (i_1 : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i} ∩ {ω | τ ω ≤ i_1})) ∧ MeasurableSet (s ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨h, _⟩, fun h j => h.1 j⟩\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nh : ∀ (i_1 : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i} ∩ {ω | τ ω ≤ i_1})\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nspecialize h i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\nhτ : IsStoppingTime f τ\ns : Set Ω\ni : ι\nh : MeasurableSet (s ∩ {ω | τ ω ≤ i} ∩ {ω | τ ω ≤ i})\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nrwa [Set.inter_assoc, Set.inter_self] at h \n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ MeasurableSet {ω | τ ω ≤ π ω}\n[PROOFSTEP]\nrw [hτ.measurableSet]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ ∀ (i : ι), MeasurableSet ({ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nintro j\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\n⊢ MeasurableSet ({ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ j})\n[PROOFSTEP]\nhave : {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j ≤ min (π ω) j} ∩ {ω | τ ω ≤ j} :=\n  by\n  ext1 ω\n  simp only [Set.mem_inter_iff, Set.mem_setOf_eq, min_le_iff, le_min_iff, le_refl, and_true_iff, and_congr_left_iff]\n  intro h\n  simp only [h, or_self_iff, and_true_iff]\n  by_cases hj : j ≤ π ω\n  · simp only [hj, h.trans hj, or_self_iff]\n  · simp only [hj, or_false_iff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\n⊢ {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j ≤ min (π ω) j} ∩ {ω | τ ω ≤ j}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\n⊢ ω ∈ {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ j} ↔ ω ∈ {ω | min (τ ω) j ≤ min (π ω) j} ∩ {ω | τ ω ≤ j}\n[PROOFSTEP]\nsimp only [Set.mem_inter_iff, Set.mem_setOf_eq, min_le_iff, le_min_iff, le_refl, and_true_iff, and_congr_left_iff]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\n⊢ τ ω ≤ j → (τ ω ≤ π ω ↔ (τ ω ≤ π ω ∨ j ≤ π ω) ∧ (τ ω ≤ j ∨ True))\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh : τ ω ≤ j\n⊢ τ ω ≤ π ω ↔ (τ ω ≤ π ω ∨ j ≤ π ω) ∧ (τ ω ≤ j ∨ True)\n[PROOFSTEP]\nsimp only [h, or_self_iff, and_true_iff]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh : τ ω ≤ j\n⊢ τ ω ≤ π ω ↔ τ ω ≤ π ω ∨ j ≤ π ω\n[PROOFSTEP]\nby_cases hj : j ≤ π ω\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh : τ ω ≤ j\nhj : j ≤ π ω\n⊢ τ ω ≤ π ω ↔ τ ω ≤ π ω ∨ j ≤ π ω\n[PROOFSTEP]\nsimp only [hj, h.trans hj, or_self_iff]\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh : τ ω ≤ j\nhj : ¬j ≤ π ω\n⊢ τ ω ≤ π ω ↔ τ ω ≤ π ω ∨ j ≤ π ω\n[PROOFSTEP]\nsimp only [hj, or_false_iff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j ≤ min (π ω) j} ∩ {ω | τ ω ≤ j}\n⊢ MeasurableSet ({ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ j})\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j ≤ min (π ω) j} ∩ {ω | τ ω ≤ j}\n⊢ MeasurableSet ({ω | min (τ ω) j ≤ min (π ω) j} ∩ {ω | τ ω ≤ j})\n[PROOFSTEP]\nrefine' MeasurableSet.inter _ (hτ.measurableSet_le j)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j ≤ min (π ω) j} ∩ {ω | τ ω ≤ j}\n⊢ MeasurableSet {ω | min (τ ω) j ≤ min (π ω) j}\n[PROOFSTEP]\napply @measurableSet_le _ _ _ _ _ (Filtration.seq f j) _ _ _ _ _ ?_ ?_\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j ≤ min (π ω) j} ∩ {ω | τ ω ≤ j}\n⊢ Measurable fun a => min (τ a) j\n[PROOFSTEP]\nexact (hτ.min_const j).measurable_of_le fun _ => min_le_right _ _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j ≤ min (π ω) j} ∩ {ω | τ ω ≤ j}\n⊢ Measurable fun a => min (π a) j\n[PROOFSTEP]\nexact (hπ.min_const j).measurable_of_le fun _ => min_le_right _ _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ MeasurableSet {ω | τ ω ≤ π ω}\n[PROOFSTEP]\nsuffices MeasurableSet[(hτ.min hπ).measurableSpace] {ω : Ω | τ ω ≤ π ω} by rw [measurableSet_min_iff hτ hπ] at this ;\n  exact this.2\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nthis : MeasurableSet {ω | τ ω ≤ π ω}\n⊢ MeasurableSet {ω | τ ω ≤ π ω}\n[PROOFSTEP]\nrw [measurableSet_min_iff hτ hπ] at this \n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nthis : MeasurableSet {ω | τ ω ≤ π ω} ∧ MeasurableSet {ω | τ ω ≤ π ω}\n⊢ MeasurableSet {ω | τ ω ≤ π ω}\n[PROOFSTEP]\nexact this.2\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ MeasurableSet {ω | τ ω ≤ π ω}\n[PROOFSTEP]\nrw [← Set.univ_inter {ω : Ω | τ ω ≤ π ω}, ← hτ.measurableSet_inter_le_iff hπ, Set.univ_inter]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSpace ι\ninst✝ : BorelSpace ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ MeasurableSet {ω | τ ω ≤ π ω}\n[PROOFSTEP]\nexact measurableSet_le_stopping_time hτ hπ\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ MeasurableSet {ω | τ ω = π ω}\n[PROOFSTEP]\nrw [hτ.measurableSet]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ ∀ (i : ι), MeasurableSet ({ω | τ ω = π ω} ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nintro j\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\n⊢ MeasurableSet ({ω | τ ω = π ω} ∩ {ω | τ ω ≤ j})\n[PROOFSTEP]\nhave : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j} :=\n  by\n  ext1 ω\n  simp only [Set.mem_inter_iff, Set.mem_setOf_eq]\n  refine' ⟨fun h => ⟨⟨_, h.2⟩, _⟩, fun h => ⟨_, h.1.2⟩⟩\n  · rw [h.1]\n  · rw [← h.1]; exact h.2\n  · cases' h with h' hσ_le\n    cases' h' with h_eq hτ_le\n    rwa [min_eq_left hτ_le, min_eq_left hσ_le] at h_eq \n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\n⊢ {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\n⊢ ω ∈ {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} ↔ ω ∈ {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n[PROOFSTEP]\nsimp only [Set.mem_inter_iff, Set.mem_setOf_eq]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\n⊢ τ ω = π ω ∧ τ ω ≤ j ↔ (min (τ ω) j = min (π ω) j ∧ τ ω ≤ j) ∧ π ω ≤ j\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨⟨_, h.2⟩, _⟩, fun h => ⟨_, h.1.2⟩⟩\n[GOAL]\ncase h.refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh : τ ω = π ω ∧ τ ω ≤ j\n⊢ min (τ ω) j = min (π ω) j\n[PROOFSTEP]\nrw [h.1]\n[GOAL]\ncase h.refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh : τ ω = π ω ∧ τ ω ≤ j\n⊢ π ω ≤ j\n[PROOFSTEP]\nrw [← h.1]\n[GOAL]\ncase h.refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh : τ ω = π ω ∧ τ ω ≤ j\n⊢ τ ω ≤ j\n[PROOFSTEP]\nexact h.2\n[GOAL]\ncase h.refine'_3\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh : (min (τ ω) j = min (π ω) j ∧ τ ω ≤ j) ∧ π ω ≤ j\n⊢ τ ω = π ω\n[PROOFSTEP]\ncases' h with h' hσ_le\n[GOAL]\ncase h.refine'_3.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh' : min (τ ω) j = min (π ω) j ∧ τ ω ≤ j\nhσ_le : π ω ≤ j\n⊢ τ ω = π ω\n[PROOFSTEP]\ncases' h' with h_eq hτ_le\n[GOAL]\ncase h.refine'_3.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nhσ_le : π ω ≤ j\nh_eq : min (τ ω) j = min (π ω) j\nhτ_le : τ ω ≤ j\n⊢ τ ω = π ω\n[PROOFSTEP]\nrwa [min_eq_left hτ_le, min_eq_left hσ_le] at h_eq \n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n⊢ MeasurableSet ({ω | τ ω = π ω} ∩ {ω | τ ω ≤ j})\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n⊢ MeasurableSet ({ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j})\n[PROOFSTEP]\nrefine' MeasurableSet.inter (MeasurableSet.inter _ (hτ.measurableSet_le j)) (hπ.measurableSet_le j)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n⊢ MeasurableSet {ω | min (τ ω) j = min (π ω) j}\n[PROOFSTEP]\napply measurableSet_eq_fun\n[GOAL]\ncase hf\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n⊢ Measurable fun x => min (τ x) j\n[PROOFSTEP]\nexact (hτ.min_const j).measurable_of_le fun _ => min_le_right _ _\n[GOAL]\ncase hg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁸ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁷ : AddGroup ι\ninst✝⁶ : TopologicalSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : MeasurableSingletonClass ι\ninst✝¹ : SecondCountableTopology ι\ninst✝ : MeasurableSub₂ ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n⊢ Measurable fun x => min (π x) j\n[PROOFSTEP]\nexact (hπ.min_const j).measurable_of_le fun _ => min_le_right _ _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ MeasurableSet {ω | τ ω = π ω}\n[PROOFSTEP]\nrw [hτ.measurableSet]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\n⊢ ∀ (i : ι), MeasurableSet ({ω | τ ω = π ω} ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nintro j\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\n⊢ MeasurableSet ({ω | τ ω = π ω} ∩ {ω | τ ω ≤ j})\n[PROOFSTEP]\nhave : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j} :=\n  by\n  ext1 ω\n  simp only [Set.mem_inter_iff, Set.mem_setOf_eq]\n  refine' ⟨fun h => ⟨⟨_, h.2⟩, _⟩, fun h => ⟨_, h.1.2⟩⟩\n  · rw [h.1]\n  · rw [← h.1]; exact h.2\n  · cases' h with h' hπ_le\n    cases' h' with h_eq hτ_le\n    rwa [min_eq_left hτ_le, min_eq_left hπ_le] at h_eq \n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\n⊢ {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\n⊢ ω ∈ {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} ↔ ω ∈ {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n[PROOFSTEP]\nsimp only [Set.mem_inter_iff, Set.mem_setOf_eq]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\n⊢ τ ω = π ω ∧ τ ω ≤ j ↔ (min (τ ω) j = min (π ω) j ∧ τ ω ≤ j) ∧ π ω ≤ j\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨⟨_, h.2⟩, _⟩, fun h => ⟨_, h.1.2⟩⟩\n[GOAL]\ncase h.refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh : τ ω = π ω ∧ τ ω ≤ j\n⊢ min (τ ω) j = min (π ω) j\n[PROOFSTEP]\nrw [h.1]\n[GOAL]\ncase h.refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh : τ ω = π ω ∧ τ ω ≤ j\n⊢ π ω ≤ j\n[PROOFSTEP]\nrw [← h.1]\n[GOAL]\ncase h.refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh : τ ω = π ω ∧ τ ω ≤ j\n⊢ τ ω ≤ j\n[PROOFSTEP]\nexact h.2\n[GOAL]\ncase h.refine'_3\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh : (min (τ ω) j = min (π ω) j ∧ τ ω ≤ j) ∧ π ω ≤ j\n⊢ τ ω = π ω\n[PROOFSTEP]\ncases' h with h' hπ_le\n[GOAL]\ncase h.refine'_3.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nh' : min (τ ω) j = min (π ω) j ∧ τ ω ≤ j\nhπ_le : π ω ≤ j\n⊢ τ ω = π ω\n[PROOFSTEP]\ncases' h' with h_eq hτ_le\n[GOAL]\ncase h.refine'_3.intro.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nω : Ω\nhπ_le : π ω ≤ j\nh_eq : min (τ ω) j = min (π ω) j\nhτ_le : τ ω ≤ j\n⊢ τ ω = π ω\n[PROOFSTEP]\nrwa [min_eq_left hτ_le, min_eq_left hπ_le] at h_eq \n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n⊢ MeasurableSet ({ω | τ ω = π ω} ∩ {ω | τ ω ≤ j})\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n⊢ MeasurableSet ({ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j})\n[PROOFSTEP]\nrefine' MeasurableSet.inter (MeasurableSet.inter _ (hτ.measurableSet_le j)) (hπ.measurableSet_le j)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n⊢ MeasurableSet {ω | min (τ ω) j = min (π ω) j}\n[PROOFSTEP]\napply measurableSet_eq_fun_of_countable\n[GOAL]\ncase hf\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n⊢ Measurable fun x => min (τ x) j\n[PROOFSTEP]\nexact (hτ.min_const j).measurable_of_le fun _ => min_le_right _ _\n[GOAL]\ncase hg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\nf : Filtration ι m\nτ π : Ω → ι\ninst✝⁶ : Countable ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : MeasurableSpace ι\ninst✝³ : BorelSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : MeasurableSingletonClass ι\ninst✝ : SecondCountableTopology ι\nhτ : IsStoppingTime f τ\nhπ : IsStoppingTime f π\nj : ι\nthis : {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j}\n⊢ Measurable fun x => min (π x) j\n[PROOFSTEP]\nexact (hπ.min_const j).measurable_of_le fun _ => min_le_right _ _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nu : ι → Ω → β\nτ : Ω → ι\ni : ι\nω : Ω\nh : i ≤ τ ω\n⊢ stoppedProcess u τ i ω = u i ω\n[PROOFSTEP]\nsimp [stoppedProcess, min_eq_left h]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝ : LinearOrder ι\nu : ι → Ω → β\nτ : Ω → ι\ni : ι\nω : Ω\nh : τ ω ≤ i\n⊢ stoppedProcess u τ i ω = u (τ ω) ω\n[PROOFSTEP]\nsimp [stoppedProcess, min_eq_right h]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\n⊢ ProgMeasurable f fun i ω => min i (τ ω)\n[PROOFSTEP]\nintro i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\n⊢ StronglyMeasurable fun p => (fun i ω => min i (τ ω)) (↑p.fst) p.snd\n[PROOFSTEP]\nlet m_prod : MeasurableSpace (Set.Iic i × Ω) := Subtype.instMeasurableSpace.prod (f i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\n⊢ StronglyMeasurable fun p => (fun i ω => min i (τ ω)) (↑p.fst) p.snd\n[PROOFSTEP]\nlet m_set : ∀ t : Set (Set.Iic i × Ω), MeasurableSpace t := fun _ =>\n  @Subtype.instMeasurableSpace (Set.Iic i × Ω) _ m_prod\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\n⊢ StronglyMeasurable fun p => (fun i ω => min i (τ ω)) (↑p.fst) p.snd\n[PROOFSTEP]\nlet s := {p : Set.Iic i × Ω | τ p.2 ≤ i}\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\n⊢ StronglyMeasurable fun p => (fun i ω => min i (τ ω)) (↑p.fst) p.snd\n[PROOFSTEP]\nhave hs : MeasurableSet[m_prod] s := @measurable_snd (Set.Iic i) Ω _ (f i) _ (hτ i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\n⊢ StronglyMeasurable fun p => (fun i ω => min i (τ ω)) (↑p.fst) p.snd\n[PROOFSTEP]\nhave h_meas_fst : ∀ t : Set (Set.Iic i × Ω), Measurable[m_set t] fun x : t => ((x : Set.Iic i × Ω).fst : ι) := fun t =>\n  (@measurable_subtype_coe (Set.Iic i × Ω) m_prod _).fst.subtype_val\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\n⊢ StronglyMeasurable fun p => (fun i ω => min i (τ ω)) (↑p.fst) p.snd\n[PROOFSTEP]\napply Measurable.stronglyMeasurable\n[GOAL]\ncase hf\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\n⊢ Measurable fun p => (fun i ω => min i (τ ω)) (↑p.fst) p.snd\n[PROOFSTEP]\nrefine' measurable_of_restrict_of_restrict_compl hs _ _\n[GOAL]\ncase hf.refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\n⊢ Measurable (Set.restrict s fun p => (fun i ω => min i (τ ω)) (↑p.fst) p.snd)\n[PROOFSTEP]\nrefine @Measurable.min _ _ _ _ _ (m_set s) _ _ _ _ _ (h_meas_fst s) ?_\n[GOAL]\ncase hf.refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\n⊢ Measurable fun a => τ (↑a).snd\n[PROOFSTEP]\nrefine' @measurable_of_Iic ι s _ _ _ (m_set s) _ _ _ _ fun j => _\n[GOAL]\ncase hf.refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nj : ι\n⊢ MeasurableSet ((fun a => τ (↑a).snd) ⁻¹' Set.Iic j)\n[PROOFSTEP]\nhave h_set_eq :\n  (fun x : s => τ (x : Set.Iic i × Ω).snd) ⁻¹' Set.Iic j =\n    (fun x : s => (x : Set.Iic i × Ω).snd) ⁻¹' {ω | τ ω ≤ min i j} :=\n  by\n  ext1 ω\n  simp only [Set.mem_preimage, Set.mem_Iic, iff_and_self, le_min_iff, Set.mem_setOf_eq]\n  exact fun _ => ω.prop\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nj : ι\n⊢ (fun x => τ (↑x).snd) ⁻¹' Set.Iic j = (fun x => (↑x).snd) ⁻¹' {ω | τ ω ≤ min i j}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nj : ι\nω : ↑s\n⊢ ω ∈ (fun x => τ (↑x).snd) ⁻¹' Set.Iic j ↔ ω ∈ (fun x => (↑x).snd) ⁻¹' {ω | τ ω ≤ min i j}\n[PROOFSTEP]\nsimp only [Set.mem_preimage, Set.mem_Iic, iff_and_self, le_min_iff, Set.mem_setOf_eq]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nj : ι\nω : ↑s\n⊢ τ (↑ω).snd ≤ j → τ (↑ω).snd ≤ i\n[PROOFSTEP]\nexact fun _ => ω.prop\n[GOAL]\ncase hf.refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nj : ι\nh_set_eq : (fun x => τ (↑x).snd) ⁻¹' Set.Iic j = (fun x => (↑x).snd) ⁻¹' {ω | τ ω ≤ min i j}\n⊢ MeasurableSet ((fun a => τ (↑a).snd) ⁻¹' Set.Iic j)\n[PROOFSTEP]\nrw [h_set_eq]\n[GOAL]\ncase hf.refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nj : ι\nh_set_eq : (fun x => τ (↑x).snd) ⁻¹' Set.Iic j = (fun x => (↑x).snd) ⁻¹' {ω | τ ω ≤ min i j}\n⊢ MeasurableSet ((fun x => (↑x).snd) ⁻¹' {ω | τ ω ≤ min i j})\n[PROOFSTEP]\nsuffices h_meas : @Measurable _ _ (m_set s) (f i) fun x : s => (x : Set.Iic i × Ω).snd\n[GOAL]\ncase hf.refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nj : ι\nh_set_eq : (fun x => τ (↑x).snd) ⁻¹' Set.Iic j = (fun x => (↑x).snd) ⁻¹' {ω | τ ω ≤ min i j}\nh_meas : Measurable fun x => (↑x).snd\n⊢ MeasurableSet ((fun x => (↑x).snd) ⁻¹' {ω | τ ω ≤ min i j})\ncase h_meas\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nj : ι\nh_set_eq : (fun x => τ (↑x).snd) ⁻¹' Set.Iic j = (fun x => (↑x).snd) ⁻¹' {ω | τ ω ≤ min i j}\n⊢ Measurable fun x => (↑x).snd\n[PROOFSTEP]\nexact h_meas (f.mono (min_le_left _ _) _ (hτ.measurableSet_le (min i j)))\n[GOAL]\ncase h_meas\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nj : ι\nh_set_eq : (fun x => τ (↑x).snd) ⁻¹' Set.Iic j = (fun x => (↑x).snd) ⁻¹' {ω | τ ω ≤ min i j}\n⊢ Measurable fun x => (↑x).snd\n[PROOFSTEP]\nexact measurable_snd.comp (@measurable_subtype_coe _ m_prod _)\n[GOAL]\ncase hf.refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\n⊢ Measurable (Set.restrict sᶜ fun p => (fun i ω => min i (τ ω)) (↑p.fst) p.snd)\n[PROOFSTEP]\nletI sc := sᶜ\n[GOAL]\ncase hf.refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nsc : Set (↑(Set.Iic i) × Ω) := sᶜ\n⊢ Measurable (Set.restrict sᶜ fun p => (fun i ω => min i (τ ω)) (↑p.fst) p.snd)\n[PROOFSTEP]\nsuffices h_min_eq_left :\n  (fun x : sc => min (↑(x : Set.Iic i × Ω).fst) (τ (x : Set.Iic i × Ω).snd)) = fun x : sc => ↑(x : Set.Iic i × Ω).fst\n[GOAL]\ncase hf.refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nsc : Set (↑(Set.Iic i) × Ω) := sᶜ\nh_min_eq_left : (fun x => min (↑(↑x).fst) (τ (↑x).snd)) = fun x => ↑(↑x).fst\n⊢ Measurable (Set.restrict sᶜ fun p => (fun i ω => min i (τ ω)) (↑p.fst) p.snd)\n[PROOFSTEP]\nsimp_rw [Set.restrict, h_min_eq_left]\n[GOAL]\ncase hf.refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nsc : Set (↑(Set.Iic i) × Ω) := sᶜ\nh_min_eq_left : (fun x => min (↑(↑x).fst) (τ (↑x).snd)) = fun x => ↑(↑x).fst\n⊢ Measurable fun x => ↑(↑x).fst\n[PROOFSTEP]\nexact h_meas_fst _\n[GOAL]\ncase h_min_eq_left\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nsc : Set (↑(Set.Iic i) × Ω) := sᶜ\n⊢ (fun x => min (↑(↑x).fst) (τ (↑x).snd)) = fun x => ↑(↑x).fst\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h_min_eq_left.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nsc : Set (↑(Set.Iic i) × Ω) := sᶜ\nω : ↑sc\n⊢ min (↑(↑ω).fst) (τ (↑ω).snd) = ↑(↑ω).fst\n[PROOFSTEP]\nrw [min_eq_left]\n[GOAL]\ncase h_min_eq_left.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nsc : Set (↑(Set.Iic i) × Ω) := sᶜ\nω : ↑sc\n⊢ ↑(↑ω).fst ≤ τ (↑ω).snd\n[PROOFSTEP]\nhave hx_fst_le : ↑(ω : Set.Iic i × Ω).fst ≤ i := (ω : Set.Iic i × Ω).fst.prop\n[GOAL]\ncase h_min_eq_left.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nsc : Set (↑(Set.Iic i) × Ω) := sᶜ\nω : ↑sc\nhx_fst_le : ↑(↑ω).fst ≤ i\n⊢ ↑(↑ω).fst ≤ τ (↑ω).snd\n[PROOFSTEP]\nrefine' hx_fst_le.trans (le_of_lt _)\n[GOAL]\ncase h_min_eq_left.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nsc : Set (↑(Set.Iic i) × Ω) := sᶜ\nω : ↑sc\nhx_fst_le : ↑(↑ω).fst ≤ i\n⊢ i < τ (↑ω).snd\n[PROOFSTEP]\nconvert ω.prop\n[GOAL]\ncase a\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁷ : LinearOrder ι\ninst✝⁶ : MeasurableSpace ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : SecondCountableTopology ι\ninst✝² : BorelSpace ι\ninst✝¹ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝ : MetrizableSpace ι\nhτ : IsStoppingTime f τ\ni : ι\nm_prod : MeasurableSpace (↑(Set.Iic i) × Ω) := MeasurableSpace.prod Subtype.instMeasurableSpace (↑f i)\nm_set : (t : Set (↑(Set.Iic i) × Ω)) → MeasurableSpace ↑t := fun x => Subtype.instMeasurableSpace\ns : Set (↑(Set.Iic i) × Ω) := {p | τ p.snd ≤ i}\nhs : MeasurableSet s\nh_meas_fst : ∀ (t : Set (↑(Set.Iic i) × Ω)), Measurable fun x => ↑(↑x).fst\nsc : Set (↑(Set.Iic i) × Ω) := sᶜ\nω : ↑sc\nhx_fst_le : ↑(↑ω).fst ≤ i\n⊢ i < τ (↑ω).snd ↔ ↑ω ∈ sc\n[PROOFSTEP]\nsimp only [not_le, Set.mem_compl_iff, Set.mem_setOf_eq]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁶ : LinearOrder ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\ninst✝ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\nh : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nn : ι\nhτ_le : ∀ (ω : Ω), τ ω ≤ n\n⊢ StronglyMeasurable (stoppedValue u τ)\n[PROOFSTEP]\nhave : stoppedValue u τ = (fun p : Set.Iic n × Ω => u (↑p.fst) p.snd) ∘ fun ω => (⟨τ ω, hτ_le ω⟩, ω) := by ext1 ω;\n  simp only [stoppedValue, Function.comp_apply, Subtype.coe_mk]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁶ : LinearOrder ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\ninst✝ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\nh : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nn : ι\nhτ_le : ∀ (ω : Ω), τ ω ≤ n\n⊢ stoppedValue u τ = (fun p => u (↑p.fst) p.snd) ∘ fun ω => ({ val := τ ω, property := (_ : τ ω ≤ n) }, ω)\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁶ : LinearOrder ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\ninst✝ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\nh : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nn : ι\nhτ_le : ∀ (ω : Ω), τ ω ≤ n\nω : Ω\n⊢ stoppedValue u τ ω = ((fun p => u (↑p.fst) p.snd) ∘ fun ω => ({ val := τ ω, property := (_ : τ ω ≤ n) }, ω)) ω\n[PROOFSTEP]\nsimp only [stoppedValue, Function.comp_apply, Subtype.coe_mk]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁶ : LinearOrder ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\ninst✝ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\nh : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nn : ι\nhτ_le : ∀ (ω : Ω), τ ω ≤ n\nthis : stoppedValue u τ = (fun p => u (↑p.fst) p.snd) ∘ fun ω => ({ val := τ ω, property := (_ : τ ω ≤ n) }, ω)\n⊢ StronglyMeasurable (stoppedValue u τ)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁶ : LinearOrder ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\ninst✝ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\nh : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nn : ι\nhτ_le : ∀ (ω : Ω), τ ω ≤ n\nthis : stoppedValue u τ = (fun p => u (↑p.fst) p.snd) ∘ fun ω => ({ val := τ ω, property := (_ : τ ω ≤ n) }, ω)\n⊢ StronglyMeasurable ((fun p => u (↑p.fst) p.snd) ∘ fun ω => ({ val := τ ω, property := (_ : τ ω ≤ n) }, ω))\n[PROOFSTEP]\nrefine' StronglyMeasurable.comp_measurable (h n) _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁶ : LinearOrder ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\ninst✝ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\nh : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nn : ι\nhτ_le : ∀ (ω : Ω), τ ω ≤ n\nthis : stoppedValue u τ = (fun p => u (↑p.fst) p.snd) ∘ fun ω => ({ val := τ ω, property := (_ : τ ω ≤ n) }, ω)\n⊢ Measurable fun ω => ({ val := τ ω, property := (_ : τ ω ≤ n) }, ω)\n[PROOFSTEP]\nexact (hτ.measurable_of_le hτ_le).subtype_mk.prod_mk measurable_id\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁹ : LinearOrder ι\ninst✝⁸ : MeasurableSpace ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : OrderTopology ι\ninst✝⁵ : SecondCountableTopology ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝² : MetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nhf_prog : ProgMeasurable f u\nhτ : IsStoppingTime f τ\n⊢ Measurable (stoppedValue u τ)\n[PROOFSTEP]\nhave h_str_meas : ∀ i, StronglyMeasurable[f i] (stoppedValue u fun ω => min (τ ω) i) := fun i =>\n  stronglyMeasurable_stoppedValue_of_le hf_prog (hτ.min_const i) fun _ => min_le_right _ _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁹ : LinearOrder ι\ninst✝⁸ : MeasurableSpace ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : OrderTopology ι\ninst✝⁵ : SecondCountableTopology ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝² : MetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nhf_prog : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nh_str_meas : ∀ (i : ι), StronglyMeasurable (stoppedValue u fun ω => min (τ ω) i)\n⊢ Measurable (stoppedValue u τ)\n[PROOFSTEP]\nintro t ht i\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁹ : LinearOrder ι\ninst✝⁸ : MeasurableSpace ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : OrderTopology ι\ninst✝⁵ : SecondCountableTopology ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝² : MetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nhf_prog : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nh_str_meas : ∀ (i : ι), StronglyMeasurable (stoppedValue u fun ω => min (τ ω) i)\nt : Set β\nht : MeasurableSet t\ni : ι\n⊢ MeasurableSet (stoppedValue u τ ⁻¹' t ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nsuffices stoppedValue u τ ⁻¹' t ∩ {ω : Ω | τ ω ≤ i} = (stoppedValue u fun ω => min (τ ω) i) ⁻¹' t ∩ {ω : Ω | τ ω ≤ i} by\n  rw [this]; exact ((h_str_meas i).measurable ht).inter (hτ.measurableSet_le i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁹ : LinearOrder ι\ninst✝⁸ : MeasurableSpace ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : OrderTopology ι\ninst✝⁵ : SecondCountableTopology ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝² : MetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nhf_prog : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nh_str_meas : ∀ (i : ι), StronglyMeasurable (stoppedValue u fun ω => min (τ ω) i)\nt : Set β\nht : MeasurableSet t\ni : ι\nthis : stoppedValue u τ ⁻¹' t ∩ {ω | τ ω ≤ i} = (stoppedValue u fun ω => min (τ ω) i) ⁻¹' t ∩ {ω | τ ω ≤ i}\n⊢ MeasurableSet (stoppedValue u τ ⁻¹' t ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁹ : LinearOrder ι\ninst✝⁸ : MeasurableSpace ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : OrderTopology ι\ninst✝⁵ : SecondCountableTopology ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝² : MetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nhf_prog : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nh_str_meas : ∀ (i : ι), StronglyMeasurable (stoppedValue u fun ω => min (τ ω) i)\nt : Set β\nht : MeasurableSet t\ni : ι\nthis : stoppedValue u τ ⁻¹' t ∩ {ω | τ ω ≤ i} = (stoppedValue u fun ω => min (τ ω) i) ⁻¹' t ∩ {ω | τ ω ≤ i}\n⊢ MeasurableSet ((stoppedValue u fun ω => min (τ ω) i) ⁻¹' t ∩ {ω | τ ω ≤ i})\n[PROOFSTEP]\nexact ((h_str_meas i).measurable ht).inter (hτ.measurableSet_le i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁹ : LinearOrder ι\ninst✝⁸ : MeasurableSpace ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : OrderTopology ι\ninst✝⁵ : SecondCountableTopology ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝² : MetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nhf_prog : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nh_str_meas : ∀ (i : ι), StronglyMeasurable (stoppedValue u fun ω => min (τ ω) i)\nt : Set β\nht : MeasurableSet t\ni : ι\n⊢ stoppedValue u τ ⁻¹' t ∩ {ω | τ ω ≤ i} = (stoppedValue u fun ω => min (τ ω) i) ⁻¹' t ∩ {ω | τ ω ≤ i}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁹ : LinearOrder ι\ninst✝⁸ : MeasurableSpace ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : OrderTopology ι\ninst✝⁵ : SecondCountableTopology ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝² : MetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nhf_prog : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nh_str_meas : ∀ (i : ι), StronglyMeasurable (stoppedValue u fun ω => min (τ ω) i)\nt : Set β\nht : MeasurableSet t\ni : ι\nω : Ω\n⊢ ω ∈ stoppedValue u τ ⁻¹' t ∩ {ω | τ ω ≤ i} ↔ ω ∈ (stoppedValue u fun ω => min (τ ω) i) ⁻¹' t ∩ {ω | τ ω ≤ i}\n[PROOFSTEP]\nsimp only [stoppedValue, Set.mem_inter_iff, Set.mem_preimage, Set.mem_setOf_eq, and_congr_left_iff]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁹ : LinearOrder ι\ninst✝⁸ : MeasurableSpace ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : OrderTopology ι\ninst✝⁵ : SecondCountableTopology ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝² : MetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nhf_prog : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nh_str_meas : ∀ (i : ι), StronglyMeasurable (stoppedValue u fun ω => min (τ ω) i)\nt : Set β\nht : MeasurableSet t\ni : ι\nω : Ω\n⊢ τ ω ≤ i → (u (τ ω) ω ∈ t ↔ u (min (τ ω) i) ω ∈ t)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁹ : LinearOrder ι\ninst✝⁸ : MeasurableSpace ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : OrderTopology ι\ninst✝⁵ : SecondCountableTopology ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : TopologicalSpace β\nu : ι → Ω → β\nτ : Ω → ι\nf : Filtration ι m\ninst✝² : MetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nhf_prog : ProgMeasurable f u\nhτ : IsStoppingTime f τ\nh_str_meas : ∀ (i : ι), StronglyMeasurable (stoppedValue u fun ω => min (τ ω) i)\nt : Set β\nht : MeasurableSet t\ni : ι\nω : Ω\nh : τ ω ≤ i\n⊢ u (τ ω) ω ∈ t ↔ u (min (τ ω) i) ω ∈ t\n[PROOFSTEP]\nrw [min_eq_left h]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\n⊢ stoppedValue u τ = ∑ i in s, Set.indicator {ω | τ ω = i} (u i)\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ny : Ω\n⊢ stoppedValue u τ y = Finset.sum s (fun i => Set.indicator {ω | τ ω = i} (u i)) y\n[PROOFSTEP]\nrw [stoppedValue, Finset.sum_apply, Finset.sum_indicator_eq_sum_filter]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ny : Ω\n⊢ u (τ y) y = ∑ i in Finset.filter (fun i => y ∈ {ω | τ ω = i}) s, u i y\n[PROOFSTEP]\nsuffices Finset.filter (fun i => y ∈ {ω : Ω | τ ω = i}) s = ({τ y} : Finset ι) by rw [this, Finset.sum_singleton]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ny : Ω\nthis : Finset.filter (fun i => y ∈ {ω | τ ω = i}) s = {τ y}\n⊢ u (τ y) y = ∑ i in Finset.filter (fun i => y ∈ {ω | τ ω = i}) s, u i y\n[PROOFSTEP]\nrw [this, Finset.sum_singleton]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ny : Ω\n⊢ Finset.filter (fun i => y ∈ {ω | τ ω = i}) s = {τ y}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h.a\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ny : Ω\nω : ι\n⊢ ω ∈ Finset.filter (fun i => y ∈ {ω | τ ω = i}) s ↔ ω ∈ {τ y}\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, Finset.mem_filter, Finset.mem_singleton]\n[GOAL]\ncase h.a\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ny : Ω\nω : ι\n⊢ ω ∈ s ∧ τ y = ω ↔ ω = τ y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.a.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ny : Ω\nω : ι\n⊢ ω ∈ s ∧ τ y = ω → ω = τ y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.a.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ny : Ω\nω : ι\n⊢ ω = τ y → ω ∈ s ∧ τ y = ω\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.a.mp\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ny : Ω\nω : ι\nh : ω ∈ s ∧ τ y = ω\n⊢ ω = τ y\n[PROOFSTEP]\nexact h.2.symm\n[GOAL]\ncase h.a.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ny : Ω\nω : ι\nh : ω = τ y\n⊢ ω ∈ s ∧ τ y = ω\n[PROOFSTEP]\nrefine' ⟨_, h.symm⟩\n[GOAL]\ncase h.a.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ny : Ω\nω : ι\nh : ω = τ y\n⊢ ω ∈ s\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h.a.mpr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝ : AddCommMonoid E\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ny : Ω\nω : ι\nh : ω = τ y\n⊢ τ y ∈ s\n[PROOFSTEP]\nexact hbdd y\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\n⊢ stoppedProcess u τ n =\n    Set.indicator {a | n ≤ τ a} (u n) + ∑ i in Finset.filter (fun x => x < n) s, Set.indicator {ω | τ ω = i} (u i)\n[PROOFSTEP]\next ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\n⊢ stoppedProcess u τ n ω =\n    (Set.indicator {a | n ≤ τ a} (u n) + ∑ i in Finset.filter (fun x => x < n) s, Set.indicator {ω | τ ω = i} (u i)) ω\n[PROOFSTEP]\nrw [Pi.add_apply, Finset.sum_apply]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\n⊢ stoppedProcess u τ n ω =\n    Set.indicator {a | n ≤ τ a} (u n) ω + ∑ c in Finset.filter (fun x => x < n) s, Set.indicator {ω | τ ω = c} (u c) ω\n[PROOFSTEP]\ncases' le_or_lt n (τ ω) with h h\n[GOAL]\ncase h.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : n ≤ τ ω\n⊢ stoppedProcess u τ n ω =\n    Set.indicator {a | n ≤ τ a} (u n) ω + ∑ c in Finset.filter (fun x => x < n) s, Set.indicator {ω | τ ω = c} (u c) ω\n[PROOFSTEP]\nrw [stoppedProcess_eq_of_le h, Set.indicator_of_mem, Finset.sum_eq_zero, add_zero]\n[GOAL]\ncase h.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : n ≤ τ ω\n⊢ ∀ (x : ι), x ∈ Finset.filter (fun x => x < n) s → Set.indicator {ω | τ ω = x} (u x) ω = 0\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase h.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm✝ : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : n ≤ τ ω\nm : ι\nhm : m ∈ Finset.filter (fun x => x < n) s\n⊢ Set.indicator {ω | τ ω = m} (u m) ω = 0\n[PROOFSTEP]\nrefine' Set.indicator_of_not_mem _ _\n[GOAL]\ncase h.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm✝ : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : n ≤ τ ω\nm : ι\nhm : m ∈ Finset.filter (fun x => x < n) s\n⊢ ¬ω ∈ {ω | τ ω = m}\n[PROOFSTEP]\nrw [Finset.mem_filter] at hm \n[GOAL]\ncase h.inl\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm✝ : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : n ≤ τ ω\nm : ι\nhm : m ∈ s ∧ m < n\n⊢ ¬ω ∈ {ω | τ ω = m}\n[PROOFSTEP]\nexact (hm.2.trans_le h).ne'\n[GOAL]\ncase h.inl.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : n ≤ τ ω\n⊢ ω ∈ {a | n ≤ τ a}\n[PROOFSTEP]\nexact h\n[GOAL]\ncase h.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : τ ω < n\n⊢ stoppedProcess u τ n ω =\n    Set.indicator {a | n ≤ τ a} (u n) ω + ∑ c in Finset.filter (fun x => x < n) s, Set.indicator {ω | τ ω = c} (u c) ω\n[PROOFSTEP]\nrw [stoppedProcess_eq_of_ge (le_of_lt h), Finset.sum_eq_single_of_mem (τ ω)]\n[GOAL]\ncase h.inr\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : τ ω < n\n⊢ u (τ ω) ω = Set.indicator {a | n ≤ τ a} (u n) ω + Set.indicator {ω_1 | τ ω_1 = τ ω} (u (τ ω)) ω\n[PROOFSTEP]\nrw [Set.indicator_of_not_mem, zero_add, Set.indicator_of_mem]\n[GOAL]\ncase h.inr.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : τ ω < n\n⊢ ω ∈ {ω_1 | τ ω_1 = τ ω}\n[PROOFSTEP]\nexact rfl\n[GOAL]\ncase h.inr.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : τ ω < n\n⊢ ¬ω ∈ {a | n ≤ τ a}\n[PROOFSTEP]\nexact not_le.2 h\n[GOAL]\ncase h.inr.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : τ ω < n\n⊢ τ ω ∈ Finset.filter (fun x => x < n) s\n[PROOFSTEP]\nrw [Finset.mem_filter]\n[GOAL]\ncase h.inr.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : τ ω < n\n⊢ τ ω ∈ s ∧ τ ω < n\n[PROOFSTEP]\nexact ⟨hbdd ω h, h⟩\n[GOAL]\ncase h.inr.h₀\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : τ ω < n\n⊢ ∀ (b : ι), b ∈ Finset.filter (fun x => x < n) s → b ≠ τ ω → Set.indicator {ω | τ ω = b} (u b) ω = 0\n[PROOFSTEP]\nintro b _ hneq\n[GOAL]\ncase h.inr.h₀\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : τ ω < n\nb : ι\na✝ : b ∈ Finset.filter (fun x => x < n) s\nhneq : b ≠ τ ω\n⊢ Set.indicator {ω | τ ω = b} (u b) ω = 0\n[PROOFSTEP]\nrw [Set.indicator_of_not_mem]\n[GOAL]\ncase h.inr.h₀.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : LinearOrder ι\ninst✝ : AddCommMonoid E\ns : Finset ι\nn : ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nω : Ω\nh : τ ω < n\nb : ι\na✝ : b ∈ Finset.filter (fun x => x < n) s\nhneq : b ≠ τ ω\n⊢ ¬ω ∈ {ω | τ ω = b}\n[PROOFSTEP]\nexact hneq.symm\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝² : LinearOrder ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : AddCommMonoid E\nn : ι\n⊢ stoppedProcess u τ n = Set.indicator {a | n ≤ τ a} (u n) + ∑ i in Finset.Iio n, Set.indicator {ω | τ ω = i} (u i)\n[PROOFSTEP]\nhave h_mem : ∀ ω, τ ω < n → τ ω ∈ Finset.Iio n := fun ω h => Finset.mem_Iio.mpr h\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝² : LinearOrder ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : AddCommMonoid E\nn : ι\nh_mem : ∀ (ω : Ω), τ ω < n → τ ω ∈ Finset.Iio n\n⊢ stoppedProcess u τ n = Set.indicator {a | n ≤ τ a} (u n) + ∑ i in Finset.Iio n, Set.indicator {ω | τ ω = i} (u i)\n[PROOFSTEP]\nrw [stoppedProcess_eq_of_mem_finset n h_mem]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝² : LinearOrder ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : AddCommMonoid E\nn : ι\nh_mem : ∀ (ω : Ω), τ ω < n → τ ω ∈ Finset.Iio n\n⊢ Set.indicator {a | n ≤ τ a} (u n) +\n      ∑ i in Finset.filter (fun x => x < n) (Finset.Iio n), Set.indicator {ω | τ ω = i} (u i) =\n    Set.indicator {a | n ≤ τ a} (u n) + ∑ i in Finset.Iio n, Set.indicator {ω | τ ω = i} (u i)\n[PROOFSTEP]\ncongr with i\n[GOAL]\ncase e_a.e_s.a\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝² : LinearOrder ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : AddCommMonoid E\nn : ι\nh_mem : ∀ (ω : Ω), τ ω < n → τ ω ∈ Finset.Iio n\ni : ι\n⊢ i ∈ Finset.filter (fun x => x < n) (Finset.Iio n) ↔ i ∈ Finset.Iio n\n[PROOFSTEP]\nsimp\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : PartialOrder ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\n⊢ Memℒp (stoppedValue u τ) p\n[PROOFSTEP]\nrw [stoppedValue_eq_of_mem_finset hbdd]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : PartialOrder ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\n⊢ Memℒp (∑ i in s, Set.indicator {ω | τ ω = i} (u i)) p\n[PROOFSTEP]\nrefine' memℒp_finset_sum' _ fun i _ => Memℒp.indicator _ (hu i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : PartialOrder ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ni : ι\nx✝ : i ∈ s\n⊢ MeasurableSet {ω | τ ω = i}\n[PROOFSTEP]\nrefine' ℱ.le i {a : Ω | τ a = i} (hτ.measurableSet_eq_of_countable_range _ i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : PartialOrder ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ni : ι\nx✝ : i ∈ s\n⊢ Set.Countable (Set.range τ)\n[PROOFSTEP]\nrefine' ((Finset.finite_toSet s).subset fun ω hω => _).countable\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : PartialOrder ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ni : ι\nx✝ : i ∈ s\nω : ι\nhω : ω ∈ Set.range τ\n⊢ ω ∈ ↑s\n[PROOFSTEP]\nobtain ⟨y, rfl⟩ := hω\n[GOAL]\ncase intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : PartialOrder ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\ni : ι\nx✝ : i ∈ s\ny : Ω\n⊢ τ y ∈ ↑s\n[PROOFSTEP]\nexact hbdd y\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : PartialOrder ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Integrable (u n)\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\n⊢ Integrable (stoppedValue u τ)\n[PROOFSTEP]\nsimp_rw [← memℒp_one_iff_integrable] at hu ⊢\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝¹ : PartialOrder ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω ∈ s\nhu : ∀ (n : ι), Memℒp (u n) 1\n⊢ Memℒp (stoppedValue u τ) 1\n[PROOFSTEP]\nexact memℒp_stoppedValue_of_mem_finset hτ hu hbdd\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝⁴ : LinearOrder ι\ninst✝³ : TopologicalSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\nn : ι\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\n⊢ Memℒp (stoppedProcess u τ n) p\n[PROOFSTEP]\nrw [stoppedProcess_eq_of_mem_finset n hbdd]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝⁴ : LinearOrder ι\ninst✝³ : TopologicalSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\nn : ι\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\n⊢ Memℒp (Set.indicator {a | n ≤ τ a} (u n) + ∑ i in Finset.filter (fun x => x < n) s, Set.indicator {ω | τ ω = i} (u i))\n    p\n[PROOFSTEP]\nrefine' Memℒp.add _ _\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝⁴ : LinearOrder ι\ninst✝³ : TopologicalSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\nn : ι\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\n⊢ Memℒp (Set.indicator {a | n ≤ τ a} (u n)) p\n[PROOFSTEP]\nexact Memℒp.indicator (ℱ.le n {a : Ω | n ≤ τ a} (hτ.measurableSet_ge n)) (hu n)\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝⁴ : LinearOrder ι\ninst✝³ : TopologicalSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\nn : ι\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\n⊢ Memℒp (∑ i in Finset.filter (fun x => x < n) s, Set.indicator {ω | τ ω = i} (u i)) p\n[PROOFSTEP]\nsuffices Memℒp (fun ω => ∑ i in s.filter (· < n), {a : Ω | τ a = i}.indicator (u i) ω) p μ by convert this using 1;\n  ext1 ω; simp only [Finset.sum_apply]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝⁴ : LinearOrder ι\ninst✝³ : TopologicalSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\nn : ι\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nthis : Memℒp (fun ω => ∑ i in Finset.filter (fun x => x < n) s, Set.indicator {a | τ a = i} (u i) ω) p\n⊢ Memℒp (∑ i in Finset.filter (fun x => x < n) s, Set.indicator {ω | τ ω = i} (u i)) p\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_5\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝⁴ : LinearOrder ι\ninst✝³ : TopologicalSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\nn : ι\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nthis : Memℒp (fun ω => ∑ i in Finset.filter (fun x => x < n) s, Set.indicator {a | τ a = i} (u i) ω) p\n⊢ ∑ i in Finset.filter (fun x => x < n) s, Set.indicator {ω | τ ω = i} (u i) = fun ω =>\n    ∑ i in Finset.filter (fun x => x < n) s, Set.indicator {a | τ a = i} (u i) ω\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h.e'_5.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝⁴ : LinearOrder ι\ninst✝³ : TopologicalSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\nn : ι\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nthis : Memℒp (fun ω => ∑ i in Finset.filter (fun x => x < n) s, Set.indicator {a | τ a = i} (u i) ω) p\nω : Ω\n⊢ Finset.sum (Finset.filter (fun x => x < n) s) (fun i => Set.indicator {ω | τ ω = i} (u i)) ω =\n    ∑ i in Finset.filter (fun x => x < n) s, Set.indicator {a | τ a = i} (u i) ω\n[PROOFSTEP]\nsimp only [Finset.sum_apply]\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝⁴ : LinearOrder ι\ninst✝³ : TopologicalSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\nn : ι\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\n⊢ Memℒp (fun ω => ∑ i in Finset.filter (fun x => x < n) s, Set.indicator {a | τ a = i} (u i) ω) p\n[PROOFSTEP]\nrefine' memℒp_finset_sum _ fun i _ => Memℒp.indicator _ (hu i)\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝⁴ : LinearOrder ι\ninst✝³ : TopologicalSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Memℒp (u n) p\nn : ι\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\ni : ι\nx✝ : i ∈ Finset.filter (fun x => x < n) s\n⊢ MeasurableSet {a | τ a = i}\n[PROOFSTEP]\nexact ℱ.le i {a : Ω | τ a = i} (hτ.measurableSet_eq i)\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝⁴ : LinearOrder ι\ninst✝³ : TopologicalSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nhu : ∀ (n : ι), Integrable (u n)\nn : ι\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\n⊢ Integrable (stoppedProcess u τ n)\n[PROOFSTEP]\nsimp_rw [← memℒp_one_iff_integrable] at hu ⊢\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nμ : Measure Ω\nτ σ : Ω → ι\nE : Type u_4\np : ℝ≥0∞\nu : ι → Ω → E\ninst✝⁴ : LinearOrder ι\ninst✝³ : TopologicalSpace ι\ninst✝² : OrderTopology ι\ninst✝¹ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝ : NormedAddCommGroup E\nhτ : IsStoppingTime ℱ τ\nn : ι\ns : Finset ι\nhbdd : ∀ (ω : Ω), τ ω < n → τ ω ∈ s\nhu : ∀ (n : ι), Memℒp (u n) 1\n⊢ Memℒp (stoppedProcess u τ n) 1\n[PROOFSTEP]\nexact memℒp_stoppedProcess_of_mem_finset hτ hu n hbdd\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommGroup β\nhle : τ ≤ π\n⊢ stoppedValue u π - stoppedValue u τ = fun ω => Finset.sum (Finset.Ico (τ ω) (π ω)) (fun i => u (i + 1) - u i) ω\n[PROOFSTEP]\next ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommGroup β\nhle : τ ≤ π\nω : Ω\n⊢ (stoppedValue u π - stoppedValue u τ) ω = Finset.sum (Finset.Ico (τ ω) (π ω)) (fun i => u (i + 1) - u i) ω\n[PROOFSTEP]\nrw [Finset.sum_Ico_eq_sub _ (hle ω), Finset.sum_range_sub, Finset.sum_range_sub]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommGroup β\nhle : τ ≤ π\nω : Ω\n⊢ (stoppedValue u π - stoppedValue u τ) ω = (u (π ω) - u 0 - (u (τ ω) - u 0)) ω\n[PROOFSTEP]\nsimp [stoppedValue]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommGroup β\nhle : τ ≤ π\nN : ℕ\nhbdd : ∀ (ω : Ω), π ω ≤ N\n⊢ stoppedValue u π - stoppedValue u τ = fun ω =>\n    Finset.sum (Finset.range (N + 1)) (fun i => Set.indicator {ω | τ ω ≤ i ∧ i < π ω} (u (i + 1) - u i)) ω\n[PROOFSTEP]\nrw [stoppedValue_sub_eq_sum hle]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommGroup β\nhle : τ ≤ π\nN : ℕ\nhbdd : ∀ (ω : Ω), π ω ≤ N\n⊢ (fun ω => Finset.sum (Finset.Ico (τ ω) (π ω)) (fun i => u (i + 1) - u i) ω) = fun ω =>\n    Finset.sum (Finset.range (N + 1)) (fun i => Set.indicator {ω | τ ω ≤ i ∧ i < π ω} (u (i + 1) - u i)) ω\n[PROOFSTEP]\next ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommGroup β\nhle : τ ≤ π\nN : ℕ\nhbdd : ∀ (ω : Ω), π ω ≤ N\nω : Ω\n⊢ Finset.sum (Finset.Ico (τ ω) (π ω)) (fun i => u (i + 1) - u i) ω =\n    Finset.sum (Finset.range (N + 1)) (fun i => Set.indicator {ω | τ ω ≤ i ∧ i < π ω} (u (i + 1) - u i)) ω\n[PROOFSTEP]\nsimp only [Finset.sum_apply, Finset.sum_indicator_eq_sum_filter]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommGroup β\nhle : τ ≤ π\nN : ℕ\nhbdd : ∀ (ω : Ω), π ω ≤ N\nω : Ω\n⊢ ∑ c in Finset.Ico (τ ω) (π ω), (u (c + 1) - u c) ω =\n    ∑ c in Finset.filter (fun i => ω ∈ {ω | τ ω ≤ i ∧ i < π ω}) (Finset.range (N + 1)), (u (c + 1) - u c) ω\n[PROOFSTEP]\nrefine' Finset.sum_congr _ fun _ _ => rfl\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommGroup β\nhle : τ ≤ π\nN : ℕ\nhbdd : ∀ (ω : Ω), π ω ≤ N\nω : Ω\n⊢ Finset.Ico (τ ω) (π ω) = Finset.filter (fun i => ω ∈ {ω | τ ω ≤ i ∧ i < π ω}) (Finset.range (N + 1))\n[PROOFSTEP]\next i\n[GOAL]\ncase h.a\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommGroup β\nhle : τ ≤ π\nN : ℕ\nhbdd : ∀ (ω : Ω), π ω ≤ N\nω : Ω\ni : ℕ\n⊢ i ∈ Finset.Ico (τ ω) (π ω) ↔ i ∈ Finset.filter (fun i => ω ∈ {ω | τ ω ≤ i ∧ i < π ω}) (Finset.range (N + 1))\n[PROOFSTEP]\nsimp only [Finset.mem_filter, Set.mem_setOf_eq, Finset.mem_range, Finset.mem_Ico]\n[GOAL]\ncase h.a\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommGroup β\nhle : τ ≤ π\nN : ℕ\nhbdd : ∀ (ω : Ω), π ω ≤ N\nω : Ω\ni : ℕ\n⊢ τ ω ≤ i ∧ i < π ω ↔ i < N + 1 ∧ τ ω ≤ i ∧ i < π ω\n[PROOFSTEP]\nexact ⟨fun h => ⟨lt_trans h.2 (Nat.lt_succ_iff.2 <| hbdd _), h⟩, fun h => h.2⟩\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommMonoid β\nn : ℕ\n⊢ stoppedProcess u τ n = Set.indicator {a | n ≤ τ a} (u n) + ∑ i in Finset.range n, Set.indicator {ω | τ ω = i} (u i)\n[PROOFSTEP]\nrw [stoppedProcess_eq'' n]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommMonoid β\nn : ℕ\n⊢ Set.indicator {a | n ≤ τ a} (u n) + ∑ i in Finset.Iio n, Set.indicator {ω | τ ω = i} (u i) =\n    Set.indicator {a | n ≤ τ a} (u n) + ∑ i in Finset.range n, Set.indicator {ω | τ ω = i} (u i)\n[PROOFSTEP]\ncongr with i\n[GOAL]\ncase e_a.e_s.a\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommMonoid β\nn i : ℕ\n⊢ i ∈ Finset.Iio n ↔ i ∈ Finset.range n\n[PROOFSTEP]\nrw [Finset.mem_Iio, Finset.mem_range]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommMonoid β\nn : ℕ\n⊢ stoppedProcess u τ n =\n    Set.indicator {a | n + 1 ≤ τ a} (u n) + ∑ i in Finset.range (n + 1), Set.indicator {a | τ a = i} (u i)\n[PROOFSTEP]\nhave : {a | n ≤ τ a}.indicator (u n) = {a | n + 1 ≤ τ a}.indicator (u n) + {a | τ a = n}.indicator (u n) :=\n  by\n  ext x\n  rw [add_comm, Pi.add_apply, ← Set.indicator_union_of_not_mem_inter]\n  · simp_rw [@eq_comm _ _ n, @le_iff_eq_or_lt _ _ n, Nat.succ_le_iff]\n    rfl\n  · rintro ⟨h₁, h₂⟩\n    exact (Nat.succ_le_iff.1 h₂).ne h₁.symm\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommMonoid β\nn : ℕ\n⊢ Set.indicator {a | n ≤ τ a} (u n) = Set.indicator {a | n + 1 ≤ τ a} (u n) + Set.indicator {a | τ a = n} (u n)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommMonoid β\nn : ℕ\nx : Ω\n⊢ Set.indicator {a | n ≤ τ a} (u n) x = (Set.indicator {a | n + 1 ≤ τ a} (u n) + Set.indicator {a | τ a = n} (u n)) x\n[PROOFSTEP]\nrw [add_comm, Pi.add_apply, ← Set.indicator_union_of_not_mem_inter]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommMonoid β\nn : ℕ\nx : Ω\n⊢ Set.indicator {a | n ≤ τ a} (u n) x = Set.indicator ({a | τ a = n} ∪ {a | n + 1 ≤ τ a}) (u n) x\n[PROOFSTEP]\nsimp_rw [@eq_comm _ _ n, @le_iff_eq_or_lt _ _ n, Nat.succ_le_iff]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommMonoid β\nn : ℕ\nx : Ω\n⊢ Set.indicator {a | n = τ a ∨ n < τ a} (u n) x = Set.indicator ({a | n = τ a} ∪ {a | n < τ a}) (u n) x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommMonoid β\nn : ℕ\nx : Ω\n⊢ ¬x ∈ {a | τ a = n} ∩ {a | n + 1 ≤ τ a}\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase h.h.intro\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommMonoid β\nn : ℕ\nx : Ω\nh₁ : x ∈ {a | τ a = n}\nh₂ : x ∈ {a | n + 1 ≤ τ a}\n⊢ False\n[PROOFSTEP]\nexact (Nat.succ_le_iff.1 h₂).ne h₁.symm\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\nf : Filtration ℕ m\nu : ℕ → Ω → β\nτ π : Ω → ℕ\ninst✝ : AddCommMonoid β\nn : ℕ\nthis : Set.indicator {a | n ≤ τ a} (u n) = Set.indicator {a | n + 1 ≤ τ a} (u n) + Set.indicator {a | τ a = n} (u n)\n⊢ stoppedProcess u τ n =\n    Set.indicator {a | n + 1 ≤ τ a} (u n) + ∑ i in Finset.range (n + 1), Set.indicator {a | τ a = i} (u i)\n[PROOFSTEP]\nrw [stoppedProcess_eq, this, Finset.sum_range_succ_comm, ← add_assoc]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\n⊢ IsStoppingTime 𝒢 (Set.piecewise s τ η)\n[PROOFSTEP]\nintro n\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\n⊢ MeasurableSet {ω | Set.piecewise s τ η ω ≤ n}\n[PROOFSTEP]\nhave : {ω | s.piecewise τ η ω ≤ n} = s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n} :=\n  by\n  ext1 ω\n  simp only [Set.piecewise, Set.mem_inter_iff, Set.mem_setOf_eq, and_congr_right_iff]\n  by_cases hx : ω ∈ s <;> simp [hx]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\n⊢ {ω | Set.piecewise s τ η ω ≤ n} = s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n}\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\nω : Ω\n⊢ ω ∈ {ω | Set.piecewise s τ η ω ≤ n} ↔ ω ∈ s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n}\n[PROOFSTEP]\nsimp only [Set.piecewise, Set.mem_inter_iff, Set.mem_setOf_eq, and_congr_right_iff]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\nω : Ω\n⊢ (if ω ∈ s then τ ω else η ω) ≤ n ↔ ω ∈ s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n}\n[PROOFSTEP]\nby_cases hx : ω ∈ s\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\nω : Ω\nhx : ω ∈ s\n⊢ (if ω ∈ s then τ ω else η ω) ≤ n ↔ ω ∈ s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n}\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\nω : Ω\nhx : ¬ω ∈ s\n⊢ (if ω ∈ s then τ ω else η ω) ≤ n ↔ ω ∈ s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n}\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\nthis : {ω | Set.piecewise s τ η ω ≤ n} = s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n}\n⊢ MeasurableSet {ω | Set.piecewise s τ η ω ≤ n}\n[PROOFSTEP]\nrw [this]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\nthis : {ω | Set.piecewise s τ η ω ≤ n} = s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n}\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n})\n[PROOFSTEP]\nby_cases hin : i ≤ n\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\nthis : {ω | Set.piecewise s τ η ω ≤ n} = s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n}\nhin : i ≤ n\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n})\n[PROOFSTEP]\nhave hs_n : MeasurableSet[𝒢 n] s := 𝒢.mono hin _ hs\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\nthis : {ω | Set.piecewise s τ η ω ≤ n} = s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n}\nhin : i ≤ n\nhs_n : MeasurableSet s\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n})\n[PROOFSTEP]\nexact (hs_n.inter (hτ_st n)).union (hs_n.compl.inter (hη_st n))\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\nthis : {ω | Set.piecewise s τ η ω ≤ n} = s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n}\nhin : ¬i ≤ n\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n})\n[PROOFSTEP]\nhave hτn : ∀ ω, ¬τ ω ≤ n := fun ω hτn => hin ((hτ ω).trans hτn)\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\nthis : {ω | Set.piecewise s τ η ω ≤ n} = s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n}\nhin : ¬i ≤ n\nhτn : ∀ (ω : Ω), ¬τ ω ≤ n\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n})\n[PROOFSTEP]\nhave hηn : ∀ ω, ¬η ω ≤ n := fun ω hηn => hin ((hη ω).trans hηn)\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni j : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nhτ_st : IsStoppingTime 𝒢 τ\nhη_st : IsStoppingTime 𝒢 η\nhτ : ∀ (ω : Ω), i ≤ τ ω\nhη : ∀ (ω : Ω), i ≤ η ω\nhs : MeasurableSet s\nn : ι\nthis : {ω | Set.piecewise s τ η ω ≤ n} = s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n}\nhin : ¬i ≤ n\nhτn : ∀ (ω : Ω), ¬τ ω ≤ n\nhηn : ∀ (ω : Ω), ¬η ω ≤ n\n⊢ MeasurableSet (s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n})\n[PROOFSTEP]\nsimp [hτn, hηn, @MeasurableSet.empty _ _]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni✝ j✝ : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nι' : Type u_4\ni j : ι'\nf : ι' → Ω → ℝ\n⊢ stoppedValue f (Set.piecewise s (fun x => i) fun x => j) = Set.piecewise s (f i) (f j)\n[PROOFSTEP]\next ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni✝ j✝ : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nι' : Type u_4\ni j : ι'\nf : ι' → Ω → ℝ\nω : Ω\n⊢ stoppedValue f (Set.piecewise s (fun x => i) fun x => j) ω = Set.piecewise s (f i) (f j) ω\n[PROOFSTEP]\nrw [stoppedValue]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni✝ j✝ : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nι' : Type u_4\ni j : ι'\nf : ι' → Ω → ℝ\nω : Ω\n⊢ f (Set.piecewise s (fun x => i) (fun x => j) ω) ω = Set.piecewise s (f i) (f j) ω\n[PROOFSTEP]\nby_cases hx : ω ∈ s\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni✝ j✝ : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nι' : Type u_4\ni j : ι'\nf : ι' → Ω → ℝ\nω : Ω\nhx : ω ∈ s\n⊢ f (Set.piecewise s (fun x => i) (fun x => j) ω) ω = Set.piecewise s (f i) (f j) ω\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni✝ j✝ : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nι' : Type u_4\ni j : ι'\nf : ι' → Ω → ℝ\nω : Ω\nhx : ¬ω ∈ s\n⊢ f (Set.piecewise s (fun x => i) (fun x => j) ω) ω = Set.piecewise s (f i) (f j) ω\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni✝ j✝ : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nι' : Type u_4\ni j : ι'\nf : ι' → Ω → ℝ\n⊢ stoppedValue f (Set.piecewise s (fun x => i) fun x => j) = Set.indicator s (f i) + Set.indicator sᶜ (f j)\n[PROOFSTEP]\next ω\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni✝ j✝ : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nι' : Type u_4\ni j : ι'\nf : ι' → Ω → ℝ\nω : Ω\n⊢ stoppedValue f (Set.piecewise s (fun x => i) fun x => j) ω = (Set.indicator s (f i) + Set.indicator sᶜ (f j)) ω\n[PROOFSTEP]\nrw [stoppedValue]\n[GOAL]\ncase h\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni✝ j✝ : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nι' : Type u_4\ni j : ι'\nf : ι' → Ω → ℝ\nω : Ω\n⊢ f (Set.piecewise s (fun x => i) (fun x => j) ω) ω = (Set.indicator s (f i) + Set.indicator sᶜ (f j)) ω\n[PROOFSTEP]\nby_cases hx : ω ∈ s\n[GOAL]\ncase pos\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni✝ j✝ : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nι' : Type u_4\ni j : ι'\nf : ι' → Ω → ℝ\nω : Ω\nhx : ω ∈ s\n⊢ f (Set.piecewise s (fun x => i) (fun x => j) ω) ω = (Set.indicator s (f i) + Set.indicator sᶜ (f j)) ω\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹ : Preorder ι\n𝒢 : Filtration ι m\nτ η : Ω → ι\ni✝ j✝ : ι\ns : Set Ω\ninst✝ : DecidablePred fun x => x ∈ s\nι' : Type u_4\ni j : ι'\nf : ι' → Ω → ℝ\nω : Ω\nhx : ¬ω ∈ s\n⊢ f (Set.piecewise s (fun x => i) (fun x => j) ω) ω = (Set.indicator s (f i) + Set.indicator sᶜ (f j)) ω\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nf : Ω → E\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nhτ : IsStoppingTime ℱ τ\nh_countable : Set.Countable (Set.range τ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\n⊢ μ[f|IsStoppingTime.measurableSpace hτ] =ᵐ[Measure.restrict μ {x | τ x = i}] μ[f|↑ℱ i]\n[PROOFSTEP]\nrefine'\n  condexp_ae_eq_restrict_of_measurableSpace_eq_on (hτ.measurableSpace_le_of_countable_range h_countable) (ℱ.le i)\n    (hτ.measurableSet_eq_of_countable_range' h_countable i) fun t => _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nf : Ω → E\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nhτ : IsStoppingTime ℱ τ\nh_countable : Set.Countable (Set.range τ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nt : Set Ω\n⊢ MeasurableSet ({x | τ x = i} ∩ t) ↔ MeasurableSet ({x | τ x = i} ∩ t)\n[PROOFSTEP]\nrw [Set.inter_comm _ t, IsStoppingTime.measurableSet_inter_eq_iff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nf : Ω → E\ninst✝¹ : IsCountablyGenerated atTop\nhτ : IsStoppingTime ℱ τ\ni : ι\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) i) ≤ m))\n⊢ μ[f|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) i)] =ᵐ[Measure.restrict μ {x | τ x ≤ i}]\n    μ[f|IsStoppingTime.measurableSpace hτ]\n[PROOFSTEP]\nhave : SigmaFinite (μ.trim hτ.measurableSpace_le) :=\n  haveI h_le : (hτ.min_const i).measurableSpace ≤ hτ.measurableSpace :=\n    by\n    rw [IsStoppingTime.measurableSpace_min_const]\n    exact inf_le_left\n  sigmaFiniteTrim_mono _ h_le\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nf : Ω → E\ninst✝¹ : IsCountablyGenerated atTop\nhτ : IsStoppingTime ℱ τ\ni : ι\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) i) ≤ m))\n⊢ IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) i) ≤ IsStoppingTime.measurableSpace hτ\n[PROOFSTEP]\nrw [IsStoppingTime.measurableSpace_min_const]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nf : Ω → E\ninst✝¹ : IsCountablyGenerated atTop\nhτ : IsStoppingTime ℱ τ\ni : ι\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) i) ≤ m))\n⊢ IsStoppingTime.measurableSpace ?hτ ⊓ ↑ℱ i ≤ IsStoppingTime.measurableSpace hτ\ncase hτ\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nf : Ω → E\ninst✝¹ : IsCountablyGenerated atTop\nhτ : IsStoppingTime ℱ τ\ni : ι\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) i) ≤ m))\n⊢ IsStoppingTime ℱ fun ω => τ ω\n[PROOFSTEP]\nexact inf_le_left\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nf : Ω → E\ninst✝¹ : IsCountablyGenerated atTop\nhτ : IsStoppingTime ℱ τ\ni : ι\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) i) ≤ m))\nthis : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\n⊢ μ[f|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) i)] =ᵐ[Measure.restrict μ {x | τ x ≤ i}]\n    μ[f|IsStoppingTime.measurableSpace hτ]\n[PROOFSTEP]\nrefine'\n  (condexp_ae_eq_restrict_of_measurableSpace_eq_on hτ.measurableSpace_le (hτ.min_const i).measurableSpace_le\n      (hτ.measurableSet_le' i) fun t => _).symm\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁵ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\nf : Ω → E\ninst✝¹ : IsCountablyGenerated atTop\nhτ : IsStoppingTime ℱ τ\ni : ι\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) i) ≤ m))\nthis : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nt : Set Ω\n⊢ MeasurableSet ({ω | τ ω ≤ i} ∩ t) ↔ MeasurableSet ({ω | τ ω ≤ i} ∩ t)\n[PROOFSTEP]\nrw [Set.inter_comm _ t, hτ.measurableSet_inter_le_const_iff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁹ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nf : Ω → E\ninst✝⁵ : IsCountablyGenerated atTop\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nhτ : IsStoppingTime ℱ τ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\n⊢ μ[f|IsStoppingTime.measurableSpace hτ] =ᵐ[Measure.restrict μ {x | τ x = i}] μ[f|↑ℱ i]\n[PROOFSTEP]\nrefine'\n  condexp_ae_eq_restrict_of_measurableSpace_eq_on hτ.measurableSpace_le (ℱ.le i) (hτ.measurableSet_eq' i) fun t => _\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝⁹ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nf : Ω → E\ninst✝⁵ : IsCountablyGenerated atTop\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nhτ : IsStoppingTime ℱ τ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nt : Set Ω\n⊢ MeasurableSet ({x | τ x = i} ∩ t) ↔ MeasurableSet ({x | τ x = i} ∩ t)\n[PROOFSTEP]\nrw [Set.inter_comm _ t, IsStoppingTime.measurableSet_inter_eq_iff]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹⁰ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : CompleteSpace E\nf : Ω → E\ninst✝⁶ : IsCountablyGenerated atTop\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : MeasurableSpace ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ μ[f|IsStoppingTime.measurableSpace\n        (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω))] =ᵐ[Measure.restrict μ {x | τ x ≤ σ x}]\n    μ[f|IsStoppingTime.measurableSpace hτ]\n[PROOFSTEP]\nhave : SigmaFinite (μ.trim hτ.measurableSpace_le) :=\n  haveI h_le : (hτ.min hσ).measurableSpace ≤ hτ.measurableSpace :=\n    by\n    rw [IsStoppingTime.measurableSpace_min]\n    exact inf_le_left; simp_all only\n  sigmaFiniteTrim_mono _ h_le\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹⁰ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : CompleteSpace E\nf : Ω → E\ninst✝⁶ : IsCountablyGenerated atTop\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : MeasurableSpace ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ IsStoppingTime.measurableSpace hτ\n[PROOFSTEP]\nrw [IsStoppingTime.measurableSpace_min]\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹⁰ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : CompleteSpace E\nf : Ω → E\ninst✝⁶ : IsCountablyGenerated atTop\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : MeasurableSpace ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ IsStoppingTime.measurableSpace ?hτ ⊓ IsStoppingTime.measurableSpace ?hπ ≤ IsStoppingTime.measurableSpace hτ\ncase hτ\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹⁰ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : CompleteSpace E\nf : Ω → E\ninst✝⁶ : IsCountablyGenerated atTop\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : MeasurableSpace ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ IsStoppingTime ℱ fun ω => τ ω\ncase hπ\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹⁰ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : CompleteSpace E\nf : Ω → E\ninst✝⁶ : IsCountablyGenerated atTop\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : MeasurableSpace ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ IsStoppingTime ℱ fun ω => σ ω\n[PROOFSTEP]\nexact inf_le_left\n[GOAL]\ncase hπ\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹⁰ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : CompleteSpace E\nf : Ω → E\ninst✝⁶ : IsCountablyGenerated atTop\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : MeasurableSpace ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ IsStoppingTime ℱ fun ω => σ ω\n[PROOFSTEP]\nsimp_all only\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹⁰ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : CompleteSpace E\nf : Ω → E\ninst✝⁶ : IsCountablyGenerated atTop\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : MeasurableSpace ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nthis : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\n⊢ μ[f|IsStoppingTime.measurableSpace\n        (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω))] =ᵐ[Measure.restrict μ {x | τ x ≤ σ x}]\n    μ[f|IsStoppingTime.measurableSpace hτ]\n[PROOFSTEP]\nrefine'\n  (condexp_ae_eq_restrict_of_measurableSpace_eq_on hτ.measurableSpace_le (hτ.min hσ).measurableSpace_le\n      (hτ.measurableSet_le_stopping_time hσ) fun t => _).symm\n[GOAL]\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹⁰ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : CompleteSpace E\nf : Ω → E\ninst✝⁶ : IsCountablyGenerated atTop\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : MeasurableSpace ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nthis : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nt : Set Ω\n⊢ MeasurableSet ({ω | τ ω ≤ σ ω} ∩ t) ↔ MeasurableSet ({ω | τ ω ≤ σ ω} ∩ t)\n[PROOFSTEP]\nrw [Set.inter_comm _ t, IsStoppingTime.measurableSet_inter_le_iff]\n[GOAL]\ncase hπ\nΩ : Type u_1\nβ : Type u_2\nι : Type u_3\nm : MeasurableSpace Ω\ninst✝¹⁰ : LinearOrder ι\nμ : Measure Ω\nℱ : Filtration ι m\nτ σ : Ω → ι\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : CompleteSpace E\nf : Ω → E\ninst✝⁶ : IsCountablyGenerated atTop\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : MeasurableSpace ι\ninst✝² : SecondCountableTopology ι\ninst✝¹ : BorelSpace ι\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nthis : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nt : Set Ω\n⊢ IsStoppingTime ℱ fun ω => σ ω\n[PROOFSTEP]\nsimp_all only\n", "meta": {"mathlib_filename": "Mathlib.Probability.Process.Stopping", "llama_tokens": 125624, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802735722128, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.37859863266891153}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] β\n⊢ mk ↑f (_ : AEStronglyMeasurable (↑f) μ) = f\n[PROOFSTEP]\nconv_rhs => rw [← Quotient.out_eq' f]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] β\n| f\n[PROOFSTEP]\nrw [← Quotient.out_eq' f]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] β\n| f\n[PROOFSTEP]\nrw [← Quotient.out_eq' f]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] β\n| f\n[PROOFSTEP]\nrw [← Quotient.out_eq' f]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] β\n⊢ mk ↑f (_ : AEStronglyMeasurable (↑f) μ) = Quotient.mk'' (Quotient.out' f)\n[PROOFSTEP]\nset g : { f : α → β // AEStronglyMeasurable f μ } := Quotient.out' f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] β\ng : { f // AEStronglyMeasurable f μ } := Quotient.out' f\n⊢ mk ↑f (_ : AEStronglyMeasurable (↑f) μ) = Quotient.mk'' g\n[PROOFSTEP]\nhave : g = ⟨g.1, g.2⟩ := Subtype.eq rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] β\ng : { f // AEStronglyMeasurable f μ } := Quotient.out' f\nthis : g = { val := ↑g, property := (_ : AEStronglyMeasurable (↑g) μ) }\n⊢ mk ↑f (_ : AEStronglyMeasurable (↑f) μ) = Quotient.mk'' g\n[PROOFSTEP]\nrw [this, ← mk, mk_eq_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] β\ng : { f // AEStronglyMeasurable f μ } := Quotient.out' f\nthis : g = { val := ↑g, property := (_ : AEStronglyMeasurable (↑g) μ) }\n⊢ ↑f =ᵐ[μ] ↑g\n[PROOFSTEP]\nexact (AEStronglyMeasurable.ae_eq_mk _).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : α →ₘ[μ] β\nh : ↑f =ᵐ[μ] ↑g\n⊢ f = g\n[PROOFSTEP]\nrwa [← f.mk_coeFn, ← g.mk_coeFn, mk_eq_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : α →ₘ[μ] β\nh : f = g\n⊢ ↑f =ᵐ[μ] ↑g\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α → β\nhf : AEStronglyMeasurable f μ\n⊢ ↑(mk f hf) =ᵐ[μ] f\n[PROOFSTEP]\napply (AEStronglyMeasurable.ae_eq_mk _).symm.trans\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α → β\nhf : AEStronglyMeasurable f μ\n⊢ ↑(Quotient.out' (mk f hf)) =ᵐ[μ] f\n[PROOFSTEP]\nexact @Quotient.mk_out' _ (μ.aeEqSetoid β) (⟨f, hf⟩ : { f // AEStronglyMeasurable f μ })\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : MeasurableSpace α\nμ ν✝ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : TopologicalSpace δ\ninst✝ : MeasurableSpace β\nν : Measure β\nf : α → β\ng : β →ₘ[ν] γ\nhf : QuasiMeasurePreserving f\n⊢ compQuasiMeasurePreserving g f hf = mk (↑g ∘ f) (_ : AEStronglyMeasurable (↑g ∘ f) μ)\n[PROOFSTEP]\nrw [← compQuasiMeasurePreserving_mk g.aestronglyMeasurable hf, mk_coeFn]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : MeasurableSpace α\nμ ν✝ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : TopologicalSpace δ\ninst✝ : MeasurableSpace β\nν : Measure β\nf : α → β\ng : β →ₘ[ν] γ\nhf : QuasiMeasurePreserving f\n⊢ ↑(compQuasiMeasurePreserving g f hf) =ᵐ[μ] ↑g ∘ f\n[PROOFSTEP]\nrw [compQuasiMeasurePreserving_eq_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : MeasurableSpace α\nμ ν✝ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : TopologicalSpace δ\ninst✝ : MeasurableSpace β\nν : Measure β\nf : α → β\ng : β →ₘ[ν] γ\nhf : QuasiMeasurePreserving f\n⊢ ↑(mk (↑g ∘ f) (_ : AEStronglyMeasurable (↑g ∘ f) μ)) =ᵐ[μ] ↑g ∘ f\n[PROOFSTEP]\napply coeFn_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : β → γ\nhg : Continuous g\nf : α →ₘ[μ] β\n⊢ comp g hg f = mk (g ∘ ↑f) (_ : AEStronglyMeasurable (fun x => g (↑f x)) μ)\n[PROOFSTEP]\nrw [← comp_mk g hg f f.aestronglyMeasurable, mk_coeFn]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : β → γ\nhg : Continuous g\nf : α →ₘ[μ] β\n⊢ ↑(comp g hg f) =ᵐ[μ] g ∘ ↑f\n[PROOFSTEP]\nrw [comp_eq_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : β → γ\nhg : Continuous g\nf : α →ₘ[μ] β\n⊢ ↑(mk (g ∘ ↑f) (_ : AEStronglyMeasurable (fun x => g (↑f x)) μ)) =ᵐ[μ] g ∘ ↑f\n[PROOFSTEP]\napply coeFn_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹⁰ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁹ : TopologicalSpace β\ninst✝⁸ : TopologicalSpace γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : MeasurableSpace β\ninst✝⁵ : PseudoMetrizableSpace β\ninst✝⁴ : BorelSpace β\ninst✝³ : MeasurableSpace γ\ninst✝² : PseudoMetrizableSpace γ\ninst✝¹ : OpensMeasurableSpace γ\ninst✝ : SecondCountableTopology γ\ng : β → γ\nhg : Measurable g\nf : α →ₘ[μ] β\n⊢ compMeasurable g hg f = mk (g ∘ ↑f) (_ : AEStronglyMeasurable (g ∘ ↑f) μ)\n[PROOFSTEP]\nrw [← compMeasurable_mk g hg f f.aestronglyMeasurable, mk_coeFn]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹⁰ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁹ : TopologicalSpace β\ninst✝⁸ : TopologicalSpace γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : MeasurableSpace β\ninst✝⁵ : PseudoMetrizableSpace β\ninst✝⁴ : BorelSpace β\ninst✝³ : MeasurableSpace γ\ninst✝² : PseudoMetrizableSpace γ\ninst✝¹ : OpensMeasurableSpace γ\ninst✝ : SecondCountableTopology γ\ng : β → γ\nhg : Measurable g\nf : α →ₘ[μ] β\n⊢ ↑(compMeasurable g hg f) =ᵐ[μ] g ∘ ↑f\n[PROOFSTEP]\nrw [compMeasurable_eq_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹⁰ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁹ : TopologicalSpace β\ninst✝⁸ : TopologicalSpace γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : MeasurableSpace β\ninst✝⁵ : PseudoMetrizableSpace β\ninst✝⁴ : BorelSpace β\ninst✝³ : MeasurableSpace γ\ninst✝² : PseudoMetrizableSpace γ\ninst✝¹ : OpensMeasurableSpace γ\ninst✝ : SecondCountableTopology γ\ng : β → γ\nhg : Measurable g\nf : α →ₘ[μ] β\n⊢ ↑(mk (g ∘ ↑f) (_ : AEStronglyMeasurable (g ∘ ↑f) μ)) =ᵐ[μ] g ∘ ↑f\n[PROOFSTEP]\napply coeFn_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] β\ng : α →ₘ[μ] γ\n⊢ pair f g = mk (fun x => (↑f x, ↑g x)) (_ : AEStronglyMeasurable (fun x => (↑f x, ↑g x)) μ)\n[PROOFSTEP]\nsimp only [← pair_mk_mk, mk_coeFn, f.aestronglyMeasurable, g.aestronglyMeasurable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] β\ng : α →ₘ[μ] γ\n⊢ ↑(pair f g) =ᵐ[μ] fun x => (↑f x, ↑g x)\n[PROOFSTEP]\nrw [pair_eq_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] β\ng : α →ₘ[μ] γ\n⊢ ↑(mk (fun x => (↑f x, ↑g x)) (_ : AEStronglyMeasurable (fun x => (↑f x, ↑g x)) μ)) =ᵐ[μ] fun x => (↑f x, ↑g x)\n[PROOFSTEP]\napply coeFn_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : β → γ → δ\nhg : Continuous (uncurry g)\nf₁ : α →ₘ[μ] β\nf₂ : α →ₘ[μ] γ\n⊢ comp₂ g hg f₁ f₂ = mk (fun a => g (↑f₁ a) (↑f₂ a)) (_ : AEStronglyMeasurable (fun x => uncurry g (↑f₁ x, ↑f₂ x)) μ)\n[PROOFSTEP]\nrw [comp₂_eq_pair, pair_eq_mk, comp_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : β → γ → δ\nhg : Continuous (uncurry g)\nf₁ : α →ₘ[μ] β\nf₂ : α →ₘ[μ] γ\n⊢ mk (uncurry g ∘ fun x => (↑f₁ x, ↑f₂ x)) (_ : AEStronglyMeasurable (fun x => uncurry g (↑f₁ x, ↑f₂ x)) μ) =\n    mk (fun a => g (↑f₁ a) (↑f₂ a)) (_ : AEStronglyMeasurable (fun x => uncurry g (↑f₁ x, ↑f₂ x)) μ)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : β → γ → δ\nhg : Continuous (uncurry g)\nf₁ : α →ₘ[μ] β\nf₂ : α →ₘ[μ] γ\n⊢ ↑(comp₂ g hg f₁ f₂) =ᵐ[μ] fun a => g (↑f₁ a) (↑f₂ a)\n[PROOFSTEP]\nrw [comp₂_eq_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : β → γ → δ\nhg : Continuous (uncurry g)\nf₁ : α →ₘ[μ] β\nf₂ : α →ₘ[μ] γ\n⊢ ↑(mk (fun a => g (↑f₁ a) (↑f₂ a)) (_ : AEStronglyMeasurable (fun x => uncurry g (↑f₁ x, ↑f₂ x)) μ)) =ᵐ[μ] fun a =>\n    g (↑f₁ a) (↑f₂ a)\n[PROOFSTEP]\napply coeFn_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝¹⁴ : TopologicalSpace β\ninst✝¹³ : TopologicalSpace γ\ninst✝¹² : TopologicalSpace δ\ninst✝¹¹ : MeasurableSpace β\ninst✝¹⁰ : PseudoMetrizableSpace β\ninst✝⁹ : BorelSpace β\ninst✝⁸ : SecondCountableTopology β\ninst✝⁷ : MeasurableSpace γ\ninst✝⁶ : PseudoMetrizableSpace γ\ninst✝⁵ : BorelSpace γ\ninst✝⁴ : SecondCountableTopology γ\ninst✝³ : MeasurableSpace δ\ninst✝² : PseudoMetrizableSpace δ\ninst✝¹ : OpensMeasurableSpace δ\ninst✝ : SecondCountableTopology δ\ng : β → γ → δ\nhg : Measurable (uncurry g)\nf₁ : α →ₘ[μ] β\nf₂ : α →ₘ[μ] γ\n⊢ comp₂Measurable g hg f₁ f₂ =\n    mk (fun a => g (↑f₁ a) (↑f₂ a)) (_ : AEStronglyMeasurable (uncurry g ∘ fun x => (↑f₁ x, ↑f₂ x)) μ)\n[PROOFSTEP]\nrw [comp₂Measurable_eq_pair, pair_eq_mk, compMeasurable_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝¹⁴ : TopologicalSpace β\ninst✝¹³ : TopologicalSpace γ\ninst✝¹² : TopologicalSpace δ\ninst✝¹¹ : MeasurableSpace β\ninst✝¹⁰ : PseudoMetrizableSpace β\ninst✝⁹ : BorelSpace β\ninst✝⁸ : SecondCountableTopology β\ninst✝⁷ : MeasurableSpace γ\ninst✝⁶ : PseudoMetrizableSpace γ\ninst✝⁵ : BorelSpace γ\ninst✝⁴ : SecondCountableTopology γ\ninst✝³ : MeasurableSpace δ\ninst✝² : PseudoMetrizableSpace δ\ninst✝¹ : OpensMeasurableSpace δ\ninst✝ : SecondCountableTopology δ\ng : β → γ → δ\nhg : Measurable (uncurry g)\nf₁ : α →ₘ[μ] β\nf₂ : α →ₘ[μ] γ\n⊢ mk (uncurry g ∘ fun x => (↑f₁ x, ↑f₂ x)) (_ : AEStronglyMeasurable (uncurry g ∘ fun x => (↑f₁ x, ↑f₂ x)) μ) =\n    mk (fun a => g (↑f₁ a) (↑f₂ a)) (_ : AEStronglyMeasurable (uncurry g ∘ fun x => (↑f₁ x, ↑f₂ x)) μ)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝¹⁴ : TopologicalSpace β\ninst✝¹³ : TopologicalSpace γ\ninst✝¹² : TopologicalSpace δ\ninst✝¹¹ : MeasurableSpace β\ninst✝¹⁰ : PseudoMetrizableSpace β\ninst✝⁹ : BorelSpace β\ninst✝⁸ : SecondCountableTopology β\ninst✝⁷ : MeasurableSpace γ\ninst✝⁶ : PseudoMetrizableSpace γ\ninst✝⁵ : BorelSpace γ\ninst✝⁴ : SecondCountableTopology γ\ninst✝³ : MeasurableSpace δ\ninst✝² : PseudoMetrizableSpace δ\ninst✝¹ : OpensMeasurableSpace δ\ninst✝ : SecondCountableTopology δ\ng : β → γ → δ\nhg : Measurable (uncurry g)\nf₁ : α →ₘ[μ] β\nf₂ : α →ₘ[μ] γ\n⊢ ↑(comp₂Measurable g hg f₁ f₂) =ᵐ[μ] fun a => g (↑f₁ a) (↑f₂ a)\n[PROOFSTEP]\nrw [comp₂Measurable_eq_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝¹⁴ : TopologicalSpace β\ninst✝¹³ : TopologicalSpace γ\ninst✝¹² : TopologicalSpace δ\ninst✝¹¹ : MeasurableSpace β\ninst✝¹⁰ : PseudoMetrizableSpace β\ninst✝⁹ : BorelSpace β\ninst✝⁸ : SecondCountableTopology β\ninst✝⁷ : MeasurableSpace γ\ninst✝⁶ : PseudoMetrizableSpace γ\ninst✝⁵ : BorelSpace γ\ninst✝⁴ : SecondCountableTopology γ\ninst✝³ : MeasurableSpace δ\ninst✝² : PseudoMetrizableSpace δ\ninst✝¹ : OpensMeasurableSpace δ\ninst✝ : SecondCountableTopology δ\ng : β → γ → δ\nhg : Measurable (uncurry g)\nf₁ : α →ₘ[μ] β\nf₂ : α →ₘ[μ] γ\n⊢ ↑(mk (fun a => g (↑f₁ a) (↑f₂ a)) (_ : AEStronglyMeasurable (uncurry g ∘ fun x => (↑f₁ x, ↑f₂ x)) μ)) =ᵐ[μ] fun a =>\n    g (↑f₁ a) (↑f₂ a)\n[PROOFSTEP]\napply coeFn_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] β\n⊢ toGerm f = ↑↑f\n[PROOFSTEP]\nrw [← mk_toGerm, mk_coeFn]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : α →ₘ[μ] β\nH : toGerm f = toGerm g\n⊢ ↑↑f = ↑↑g\n[PROOFSTEP]\nrwa [← toGerm_eq, ← toGerm_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : β → γ\nhg : Continuous g\nf✝ : α →ₘ[μ] β\nf : α → β\nx✝ : AEStronglyMeasurable f μ\n⊢ toGerm (comp g hg (mk f x✝)) = Germ.map g (toGerm (mk f x✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹⁰ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁹ : TopologicalSpace β\ninst✝⁸ : TopologicalSpace γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : MeasurableSpace β\ninst✝⁵ : BorelSpace β\ninst✝⁴ : PseudoMetrizableSpace β\ninst✝³ : PseudoMetrizableSpace γ\ninst✝² : SecondCountableTopology γ\ninst✝¹ : MeasurableSpace γ\ninst✝ : OpensMeasurableSpace γ\ng : β → γ\nhg : Measurable g\nf✝ : α →ₘ[μ] β\nf : α → β\nx✝ : AEStronglyMeasurable f μ\n⊢ toGerm (compMeasurable g hg (mk f x✝)) = Germ.map g (toGerm (mk f x✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : β → γ → δ\nhg : Continuous (uncurry g)\nf₁✝ : α →ₘ[μ] β\nf₂✝ : α →ₘ[μ] γ\nf₁ : α → β\nx✝¹ : AEStronglyMeasurable f₁ μ\nf₂ : α → γ\nx✝ : AEStronglyMeasurable f₂ μ\n⊢ toGerm (comp₂ g hg (mk f₁ x✝¹) (mk f₂ x✝)) = Germ.map₂ g (toGerm (mk f₁ x✝¹)) (toGerm (mk f₂ x✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝¹⁴ : TopologicalSpace β\ninst✝¹³ : TopologicalSpace γ\ninst✝¹² : TopologicalSpace δ\ninst✝¹¹ : PseudoMetrizableSpace β\ninst✝¹⁰ : SecondCountableTopology β\ninst✝⁹ : MeasurableSpace β\ninst✝⁸ : BorelSpace β\ninst✝⁷ : PseudoMetrizableSpace γ\ninst✝⁶ : SecondCountableTopology γ\ninst✝⁵ : MeasurableSpace γ\ninst✝⁴ : BorelSpace γ\ninst✝³ : PseudoMetrizableSpace δ\ninst✝² : SecondCountableTopology δ\ninst✝¹ : MeasurableSpace δ\ninst✝ : OpensMeasurableSpace δ\ng : β → γ → δ\nhg : Measurable (uncurry g)\nf₁✝ : α →ₘ[μ] β\nf₂✝ : α →ₘ[μ] γ\nf₁ : α → β\nx✝¹ : AEStronglyMeasurable f₁ μ\nf₂ : α → γ\nx✝ : AEStronglyMeasurable f₂ μ\n⊢ toGerm (comp₂Measurable g hg (mk f₁ x✝¹) (mk f₂ x✝)) = Germ.map₂ g (toGerm (mk f₁ x✝¹)) (toGerm (mk f₂ x✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nr : β → γ → Prop\nf : α →ₘ[μ] β\ng : α →ₘ[μ] γ\n⊢ LiftRel r f g ↔ ∀ᵐ (a : α) ∂μ, r (↑f a) (↑g a)\n[PROOFSTEP]\nrw [← liftRel_mk_mk, mk_coeFn, mk_coeFn]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nf g : α →ₘ[μ] β\n⊢ f ≤ f ⊔ g\n[PROOFSTEP]\nrw [← coeFn_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nf g : α →ₘ[μ] β\n⊢ ↑f ≤ᵐ[μ] ↑(f ⊔ g)\n[PROOFSTEP]\nfilter_upwards [coeFn_sup f g] with _ ha\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nf g : α →ₘ[μ] β\na✝ : α\nha : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝\n⊢ ↑f a✝ ≤ ↑(f ⊔ g) a✝\n[PROOFSTEP]\nrw [ha]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nf g : α →ₘ[μ] β\na✝ : α\nha : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝\n⊢ ↑f a✝ ≤ ↑f a✝ ⊔ ↑g a✝\n[PROOFSTEP]\nexact le_sup_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nf g : α →ₘ[μ] β\n⊢ g ≤ f ⊔ g\n[PROOFSTEP]\nrw [← coeFn_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nf g : α →ₘ[μ] β\n⊢ ↑g ≤ᵐ[μ] ↑(f ⊔ g)\n[PROOFSTEP]\nfilter_upwards [coeFn_sup f g] with _ ha\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nf g : α →ₘ[μ] β\na✝ : α\nha : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝\n⊢ ↑g a✝ ≤ ↑(f ⊔ g) a✝\n[PROOFSTEP]\nrw [ha]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nf g : α →ₘ[μ] β\na✝ : α\nha : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝\n⊢ ↑g a✝ ≤ ↑f a✝ ⊔ ↑g a✝\n[PROOFSTEP]\nexact le_sup_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nf g f' : α →ₘ[μ] β\nhf : f ≤ f'\nhg : g ≤ f'\n⊢ f ⊔ g ≤ f'\n[PROOFSTEP]\nrw [← coeFn_le] at hf hg ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nf g f' : α →ₘ[μ] β\nhf : ↑f ≤ᵐ[μ] ↑f'\nhg : ↑g ≤ᵐ[μ] ↑f'\n⊢ ↑(f ⊔ g) ≤ᵐ[μ] ↑f'\n[PROOFSTEP]\nfilter_upwards [hf, hg, coeFn_sup f g] with _ haf hag ha_sup\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nf g f' : α →ₘ[μ] β\nhf : ↑f ≤ᵐ[μ] ↑f'\nhg : ↑g ≤ᵐ[μ] ↑f'\na✝ : α\nhaf : ↑f a✝ ≤ ↑f' a✝\nhag : ↑g a✝ ≤ ↑f' a✝\nha_sup : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝\n⊢ ↑(f ⊔ g) a✝ ≤ ↑f' a✝\n[PROOFSTEP]\nrw [ha_sup]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nf g f' : α →ₘ[μ] β\nhf : ↑f ≤ᵐ[μ] ↑f'\nhg : ↑g ≤ᵐ[μ] ↑f'\na✝ : α\nhaf : ↑f a✝ ≤ ↑f' a✝\nhag : ↑g a✝ ≤ ↑f' a✝\nha_sup : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝\n⊢ ↑f a✝ ⊔ ↑g a✝ ≤ ↑f' a✝\n[PROOFSTEP]\nexact sup_le haf hag\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nf g : α →ₘ[μ] β\n⊢ f ⊓ g ≤ f\n[PROOFSTEP]\nrw [← coeFn_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nf g : α →ₘ[μ] β\n⊢ ↑(f ⊓ g) ≤ᵐ[μ] ↑f\n[PROOFSTEP]\nfilter_upwards [coeFn_inf f g] with _ ha\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nf g : α →ₘ[μ] β\na✝ : α\nha : ↑(f ⊓ g) a✝ = ↑f a✝ ⊓ ↑g a✝\n⊢ ↑(f ⊓ g) a✝ ≤ ↑f a✝\n[PROOFSTEP]\nrw [ha]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nf g : α →ₘ[μ] β\na✝ : α\nha : ↑(f ⊓ g) a✝ = ↑f a✝ ⊓ ↑g a✝\n⊢ ↑f a✝ ⊓ ↑g a✝ ≤ ↑f a✝\n[PROOFSTEP]\nexact inf_le_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nf g : α →ₘ[μ] β\n⊢ f ⊓ g ≤ g\n[PROOFSTEP]\nrw [← coeFn_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nf g : α →ₘ[μ] β\n⊢ ↑(f ⊓ g) ≤ᵐ[μ] ↑g\n[PROOFSTEP]\nfilter_upwards [coeFn_inf f g] with _ ha\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nf g : α →ₘ[μ] β\na✝ : α\nha : ↑(f ⊓ g) a✝ = ↑f a✝ ⊓ ↑g a✝\n⊢ ↑(f ⊓ g) a✝ ≤ ↑g a✝\n[PROOFSTEP]\nrw [ha]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nf g : α →ₘ[μ] β\na✝ : α\nha : ↑(f ⊓ g) a✝ = ↑f a✝ ⊓ ↑g a✝\n⊢ ↑f a✝ ⊓ ↑g a✝ ≤ ↑g a✝\n[PROOFSTEP]\nexact inf_le_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nf' f g : α →ₘ[μ] β\nhf : f' ≤ f\nhg : f' ≤ g\n⊢ f' ≤ f ⊓ g\n[PROOFSTEP]\nrw [← coeFn_le] at hf hg ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nf' f g : α →ₘ[μ] β\nhf : ↑f' ≤ᵐ[μ] ↑f\nhg : ↑f' ≤ᵐ[μ] ↑g\n⊢ ↑f' ≤ᵐ[μ] ↑(f ⊓ g)\n[PROOFSTEP]\nfilter_upwards [hf, hg, coeFn_inf f g] with _ haf hag ha_inf\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nf' f g : α →ₘ[μ] β\nhf : ↑f' ≤ᵐ[μ] ↑f\nhg : ↑f' ≤ᵐ[μ] ↑g\na✝ : α\nhaf : ↑f' a✝ ≤ ↑f a✝\nhag : ↑f' a✝ ≤ ↑g a✝\nha_inf : ↑(f ⊓ g) a✝ = ↑f a✝ ⊓ ↑g a✝\n⊢ ↑f' a✝ ≤ ↑(f ⊓ g) a✝\n[PROOFSTEP]\nrw [ha_inf]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nf' f g : α →ₘ[μ] β\nhf : ↑f' ≤ᵐ[μ] ↑f\nhg : ↑f' ≤ᵐ[μ] ↑g\na✝ : α\nhaf : ↑f' a✝ ≤ ↑f a✝\nhag : ↑f' a✝ ≤ ↑g a✝\nha_inf : ↑(f ⊓ g) a✝ = ↑f a✝ ⊓ ↑g a✝\n⊢ ↑f' a✝ ≤ ↑f a✝ ⊓ ↑g a✝\n[PROOFSTEP]\nexact le_inf haf hag\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁸ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁷ : TopologicalSpace β\ninst✝⁶ : TopologicalSpace γ\ninst✝⁵ : TopologicalSpace δ\n𝕜 : Type u_5\n𝕜' : Type u_6\ninst✝⁴ : SMul 𝕜 γ\ninst✝³ : ContinuousConstSMul 𝕜 γ\ninst✝² : SMul 𝕜' γ\ninst✝¹ : ContinuousConstSMul 𝕜' γ\ninst✝ : SMulCommClass 𝕜 𝕜' γ\na : 𝕜\nb : 𝕜'\nf✝ : α →ₘ[μ] γ\nf : α → γ\nhf : AEStronglyMeasurable f μ\n⊢ a • b • mk f hf = b • a • mk f hf\n[PROOFSTEP]\nsimp_rw [smul_mk, smul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁹ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁸ : TopologicalSpace β\ninst✝⁷ : TopologicalSpace γ\ninst✝⁶ : TopologicalSpace δ\n𝕜 : Type u_5\n𝕜' : Type u_6\ninst✝⁵ : SMul 𝕜 γ\ninst✝⁴ : ContinuousConstSMul 𝕜 γ\ninst✝³ : SMul 𝕜' γ\ninst✝² : ContinuousConstSMul 𝕜' γ\ninst✝¹ : SMul 𝕜 𝕜'\ninst✝ : IsScalarTower 𝕜 𝕜' γ\na : 𝕜\nb : 𝕜'\nf✝ : α →ₘ[μ] γ\nf : α → γ\nhf : AEStronglyMeasurable f μ\n⊢ (a • b) • mk f hf = a • b • mk f hf\n[PROOFSTEP]\nsimp_rw [smul_mk, smul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁹ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁸ : TopologicalSpace β\ninst✝⁷ : TopologicalSpace γ\ninst✝⁶ : TopologicalSpace δ\n𝕜 : Type u_5\n𝕜' : Type u_6\ninst✝⁵ : SMul 𝕜 γ\ninst✝⁴ : ContinuousConstSMul 𝕜 γ\ninst✝³ : SMul 𝕜' γ\ninst✝² : ContinuousConstSMul 𝕜' γ\ninst✝¹ : SMul 𝕜ᵐᵒᵖ γ\ninst✝ : IsCentralScalar 𝕜 γ\na : 𝕜\nf✝ : α →ₘ[μ] γ\nf : α → γ\nhf : AEStronglyMeasurable f μ\n⊢ MulOpposite.op a • mk f hf = a • mk f hf\n[PROOFSTEP]\nsimp_rw [smul_mk, op_smul_eq_smul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α →ₘ[μ] ℝ≥0∞\n⊢ ∫⁻ (a : α), ↑f a ∂μ = lintegral f\n[PROOFSTEP]\nrw [← lintegral_mk, mk_coeFn]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf✝ g✝ : α →ₘ[μ] ℝ≥0∞\nf : α → ℝ≥0∞\nhf : AEStronglyMeasurable f μ\ng : α → ℝ≥0∞\nx✝ : AEStronglyMeasurable g μ\n⊢ lintegral (mk f hf + mk g x✝) = lintegral (mk f hf) + lintegral (mk g x✝)\n[PROOFSTEP]\nsimp [lintegral_add_left' hf.aemeasurable]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁸ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁷ : TopologicalSpace β✝\ninst✝⁶ : TopologicalSpace γ\ninst✝⁵ : TopologicalSpace δ\nβ : Type u_5\ninst✝⁴ : TopologicalSpace β\ninst✝³ : Lattice β\ninst✝² : TopologicalLattice β\ninst✝¹ : AddGroup β\ninst✝ : TopologicalAddGroup β\nf : α →ₘ[μ] β\n⊢ ↑|f| =ᵐ[μ] fun x => |↑f x|\n[PROOFSTEP]\nsimp_rw [abs_eq_sup_neg]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁸ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁷ : TopologicalSpace β✝\ninst✝⁶ : TopologicalSpace γ\ninst✝⁵ : TopologicalSpace δ\nβ : Type u_5\ninst✝⁴ : TopologicalSpace β\ninst✝³ : Lattice β\ninst✝² : TopologicalLattice β\ninst✝¹ : AddGroup β\ninst✝ : TopologicalAddGroup β\nf : α →ₘ[μ] β\n⊢ ↑(f ⊔ -f) =ᵐ[μ] fun x => ↑f x ⊔ -↑f x\n[PROOFSTEP]\nfilter_upwards [AEEqFun.coeFn_sup f (-f), AEEqFun.coeFn_neg f] with x hx_sup hx_neg\n[GOAL]\ncase h\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁸ : MeasurableSpace α\nμ ν : Measure α\ninst✝⁷ : TopologicalSpace β✝\ninst✝⁶ : TopologicalSpace γ\ninst✝⁵ : TopologicalSpace δ\nβ : Type u_5\ninst✝⁴ : TopologicalSpace β\ninst✝³ : Lattice β\ninst✝² : TopologicalLattice β\ninst✝¹ : AddGroup β\ninst✝ : TopologicalAddGroup β\nf : α →ₘ[μ] β\nx : α\nhx_sup : ↑(f ⊔ -f) x = ↑f x ⊔ ↑(-f) x\nhx_neg : ↑(-f) x = (-↑f) x\n⊢ ↑(f ⊔ -f) x = ↑f x ⊔ -↑f x\n[PROOFSTEP]\nrw [hx_sup, hx_neg, Pi.neg_apply]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.AEEqFun", "llama_tokens": 15799, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802603710085, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.37859862519678517}}
{"text": "[GOAL]\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh : maximalIdeal R = span {ϖ}\n⊢ Irreducible ϖ\n[PROOFSTEP]\nhave h2 : ¬IsUnit ϖ := show ϖ ∈ maximalIdeal R from h.symm ▸ Submodule.mem_span_singleton_self ϖ\n[GOAL]\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh : maximalIdeal R = span {ϖ}\nh2 : ¬IsUnit ϖ\n⊢ Irreducible ϖ\n[PROOFSTEP]\nrefine' ⟨h2, _⟩\n[GOAL]\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh : maximalIdeal R = span {ϖ}\nh2 : ¬IsUnit ϖ\n⊢ ∀ (a b : R), ϖ = a * b → IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nintro a b hab\n[GOAL]\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh : maximalIdeal R = span {ϖ}\nh2 : ¬IsUnit ϖ\na b : R\nhab : ϖ = a * b\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh✝ : maximalIdeal R = span {ϖ}\nh2 : ¬IsUnit ϖ\na b : R\nhab : ϖ = a * b\nh : ¬IsUnit a ∧ ¬IsUnit b\n⊢ False\n[PROOFSTEP]\nobtain ⟨ha : a ∈ maximalIdeal R, hb : b ∈ maximalIdeal R⟩ := h\n[GOAL]\ncase intro\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh : maximalIdeal R = span {ϖ}\nh2 : ¬IsUnit ϖ\na b : R\nhab : ϖ = a * b\nha : a ∈ maximalIdeal R\nhb : b ∈ maximalIdeal R\n⊢ False\n[PROOFSTEP]\nrw [h, mem_span_singleton'] at ha hb \n[GOAL]\ncase intro\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh : maximalIdeal R = span {ϖ}\nh2 : ¬IsUnit ϖ\na b : R\nhab : ϖ = a * b\nha : ∃ a_1, a_1 * ϖ = a\nhb : ∃ a, a * ϖ = b\n⊢ False\n[PROOFSTEP]\nrcases ha with ⟨a, rfl⟩\n[GOAL]\ncase intro.intro\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh : maximalIdeal R = span {ϖ}\nh2 : ¬IsUnit ϖ\nb : R\nhb : ∃ a, a * ϖ = b\na : R\nhab : ϖ = a * ϖ * b\n⊢ False\n[PROOFSTEP]\nrcases hb with ⟨b, rfl⟩\n[GOAL]\ncase intro.intro.intro\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh : maximalIdeal R = span {ϖ}\nh2 : ¬IsUnit ϖ\na b : R\nhab : ϖ = a * ϖ * (b * ϖ)\n⊢ False\n[PROOFSTEP]\nrw [show a * ϖ * (b * ϖ) = ϖ * (ϖ * (a * b)) by ring] at hab \n[GOAL]\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh : maximalIdeal R = span {ϖ}\nh2 : ¬IsUnit ϖ\na b : R\nhab : ϖ = a * ϖ * (b * ϖ)\n⊢ a * ϖ * (b * ϖ) = ϖ * (ϖ * (a * b))\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh : maximalIdeal R = span {ϖ}\nh2 : ¬IsUnit ϖ\na b : R\nhab : ϖ = ϖ * (ϖ * (a * b))\n⊢ False\n[PROOFSTEP]\napply hϖ\n[GOAL]\ncase intro.intro.intro\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh : maximalIdeal R = span {ϖ}\nh2 : ¬IsUnit ϖ\na b : R\nhab : ϖ = ϖ * (ϖ * (a * b))\n⊢ ϖ = 0\n[PROOFSTEP]\napply eq_zero_of_mul_eq_self_right _ hab.symm\n[GOAL]\nR✝ : Type u\ninst✝⁵ : CommRing R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : DiscreteValuationRing R✝\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nϖ : R\nhϖ : ϖ ≠ 0\nh : maximalIdeal R = span {ϖ}\nh2 : ¬IsUnit ϖ\na b : R\nhab : ϖ = ϖ * (ϖ * (a * b))\n⊢ ϖ * (a * b) ≠ 1\n[PROOFSTEP]\nexact fun hh => h2 (isUnit_of_dvd_one ⟨_, hh.symm⟩)\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nϖ : R\nh : maximalIdeal R = span {ϖ}\ne : ϖ = 0\n⊢ maximalIdeal R = ⊥\n[PROOFSTEP]\nrwa [h, span_singleton_eq_bot]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\n⊢ ∃ ϖ, Irreducible ϖ\n[PROOFSTEP]\nsimp_rw [irreducible_iff_uniformizer]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\n⊢ ∃ ϖ, maximalIdeal R = span {ϖ}\n[PROOFSTEP]\nexact (IsPrincipalIdealRing.principal <| maximalIdeal R).principal\n[GOAL]\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\n⊢ DiscreteValuationRing R ↔ IsPrincipalIdealRing R ∧ ∃! P, P ≠ ⊥ ∧ IsPrime P\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\n⊢ DiscreteValuationRing R → IsPrincipalIdealRing R ∧ ∃! P, P ≠ ⊥ ∧ IsPrime P\n[PROOFSTEP]\nintro RDVR\n[GOAL]\ncase mp\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\n⊢ IsPrincipalIdealRing R ∧ ∃! P, P ≠ ⊥ ∧ IsPrime P\n[PROOFSTEP]\nrcases id RDVR with ⟨Rlocal⟩\n[GOAL]\ncase mp.mk\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\n⊢ IsPrincipalIdealRing R ∧ ∃! P, P ≠ ⊥ ∧ IsPrime P\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.mk.left\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\n⊢ IsPrincipalIdealRing R\ncase mp.mk.right\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\n⊢ ∃! P, P ≠ ⊥ ∧ IsPrime P\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mp.mk.right\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\n⊢ ∃! P, P ≠ ⊥ ∧ IsPrime P\n[PROOFSTEP]\nuse LocalRing.maximalIdeal R\n[GOAL]\ncase h\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\n⊢ (fun P => P ≠ ⊥ ∧ IsPrime P) (maximalIdeal R) ∧ ∀ (y : Ideal R), (fun P => P ≠ ⊥ ∧ IsPrime P) y → y = maximalIdeal R\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\n⊢ (fun P => P ≠ ⊥ ∧ IsPrime P) (maximalIdeal R)\ncase h.right\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\n⊢ ∀ (y : Ideal R), (fun P => P ≠ ⊥ ∧ IsPrime P) y → y = maximalIdeal R\n[PROOFSTEP]\nexact ⟨Rlocal, inferInstance⟩\n[GOAL]\ncase h.right\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\n⊢ ∀ (y : Ideal R), (fun P => P ≠ ⊥ ∧ IsPrime P) y → y = maximalIdeal R\n[PROOFSTEP]\nrintro Q ⟨hQ1, hQ2⟩\n[GOAL]\ncase h.right.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\nQ : Ideal R\nhQ1 : Q ≠ ⊥\nhQ2 : IsPrime Q\n⊢ Q = maximalIdeal R\n[PROOFSTEP]\nobtain ⟨q, rfl⟩ := (IsPrincipalIdealRing.principal Q).1\n[GOAL]\ncase h.right.intro.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\nq : R\nhQ1 : Submodule.span R {q} ≠ ⊥\nhQ2 : IsPrime (Submodule.span R {q})\n⊢ Submodule.span R {q} = maximalIdeal R\n[PROOFSTEP]\nhave hq : q ≠ 0 := by\n  rintro rfl\n  apply hQ1\n  simp\n[GOAL]\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\nq : R\nhQ1 : Submodule.span R {q} ≠ ⊥\nhQ2 : IsPrime (Submodule.span R {q})\n⊢ q ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\nhQ1 : Submodule.span R {0} ≠ ⊥\nhQ2 : IsPrime (Submodule.span R {0})\n⊢ False\n[PROOFSTEP]\napply hQ1\n[GOAL]\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\nhQ1 : Submodule.span R {0} ≠ ⊥\nhQ2 : IsPrime (Submodule.span R {0})\n⊢ Submodule.span R {0} = ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.right.intro.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\nq : R\nhQ1 : Submodule.span R {q} ≠ ⊥\nhQ2 : IsPrime (Submodule.span R {q})\nhq : q ≠ 0\n⊢ Submodule.span R {q} = maximalIdeal R\n[PROOFSTEP]\nerw [span_singleton_prime hq] at hQ2 \n[GOAL]\ncase h.right.intro.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\nq : R\nhQ1 : Submodule.span R {q} ≠ ⊥\nhQ2 : Prime q\nhq : q ≠ 0\n⊢ Submodule.span R {q} = maximalIdeal R\n[PROOFSTEP]\nreplace hQ2 := hQ2.irreducible\n[GOAL]\ncase h.right.intro.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\nq : R\nhQ1 : Submodule.span R {q} ≠ ⊥\nhq : q ≠ 0\nhQ2 : Irreducible q\n⊢ Submodule.span R {q} = maximalIdeal R\n[PROOFSTEP]\nrw [irreducible_iff_uniformizer] at hQ2 \n[GOAL]\ncase h.right.intro.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRDVR : DiscreteValuationRing R\ntoIsPrincipalIdealRing✝ : IsPrincipalIdealRing R\ntoLocalRing✝ : LocalRing R\nRlocal : maximalIdeal R ≠ ⊥\nq : R\nhQ1 : Submodule.span R {q} ≠ ⊥\nhq : q ≠ 0\nhQ2✝ : Irreducible q\nhQ2 : maximalIdeal R = span {q}\n⊢ Submodule.span R {q} = maximalIdeal R\n[PROOFSTEP]\nexact hQ2.symm\n[GOAL]\ncase mpr\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\n⊢ (IsPrincipalIdealRing R ∧ ∃! P, P ≠ ⊥ ∧ IsPrime P) → DiscreteValuationRing R\n[PROOFSTEP]\nrintro ⟨RPID, Punique⟩\n[GOAL]\ncase mpr.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRPID : IsPrincipalIdealRing R\nPunique : ∃! P, P ≠ ⊥ ∧ IsPrime P\n⊢ DiscreteValuationRing R\n[PROOFSTEP]\nhaveI : LocalRing R := LocalRing.of_unique_nonzero_prime Punique\n[GOAL]\ncase mpr.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRPID : IsPrincipalIdealRing R\nPunique : ∃! P, P ≠ ⊥ ∧ IsPrime P\nthis : LocalRing R\n⊢ DiscreteValuationRing R\n[PROOFSTEP]\nrefine' { not_a_field' := _ }\n[GOAL]\ncase mpr.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRPID : IsPrincipalIdealRing R\nPunique : ∃! P, P ≠ ⊥ ∧ IsPrime P\nthis : LocalRing R\n⊢ maximalIdeal R ≠ ⊥\n[PROOFSTEP]\nrcases Punique with ⟨P, ⟨hP1, hP2⟩, _⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRPID : IsPrincipalIdealRing R\nthis : LocalRing R\nP : Ideal R\nright✝ : ∀ (y : Ideal R), (fun P => P ≠ ⊥ ∧ IsPrime P) y → y = P\nhP1 : P ≠ ⊥\nhP2 : IsPrime P\n⊢ maximalIdeal R ≠ ⊥\n[PROOFSTEP]\nhave hPM : P ≤ maximalIdeal R := le_maximalIdeal hP2.1\n[GOAL]\ncase mpr.intro.intro.intro.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRPID : IsPrincipalIdealRing R\nthis : LocalRing R\nP : Ideal R\nright✝ : ∀ (y : Ideal R), (fun P => P ≠ ⊥ ∧ IsPrime P) y → y = P\nhP1 : P ≠ ⊥\nhP2 : IsPrime P\nhPM : P ≤ maximalIdeal R\n⊢ maximalIdeal R ≠ ⊥\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr.intro.intro.intro.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRPID : IsPrincipalIdealRing R\nthis : LocalRing R\nP : Ideal R\nright✝ : ∀ (y : Ideal R), (fun P => P ≠ ⊥ ∧ IsPrime P) y → y = P\nhP1 : P ≠ ⊥\nhP2 : IsPrime P\nhPM : P ≤ maximalIdeal R\nh : maximalIdeal R = ⊥\n⊢ False\n[PROOFSTEP]\nrw [h, le_bot_iff] at hPM \n[GOAL]\ncase mpr.intro.intro.intro.intro\nR✝ : Type u\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\ninst✝² : DiscreteValuationRing R✝\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nRPID : IsPrincipalIdealRing R\nthis : LocalRing R\nP : Ideal R\nright✝ : ∀ (y : Ideal R), (fun P => P ≠ ⊥ ∧ IsPrime P) y → y = P\nhP1 : P ≠ ⊥\nhP2 : IsPrime P\nhPM : P = ⊥\nh : maximalIdeal R = ⊥\n⊢ False\n[PROOFSTEP]\nexact hP1 hPM\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nha : Irreducible a\nhb : Irreducible b\n⊢ Associated a b\n[PROOFSTEP]\nrw [irreducible_iff_uniformizer] at ha hb \n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nha✝ : Irreducible a\nha : maximalIdeal R = span {a}\nhb✝ : Irreducible b\nhb : maximalIdeal R = span {b}\n⊢ Associated a b\n[PROOFSTEP]\nrw [← span_singleton_eq_span_singleton, ← ha, hb]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\np q : R\nhp : Irreducible p\nhq : Irreducible q\n⊢ Associated p q\n[PROOFSTEP]\nrcases hR with ⟨ϖ, hϖ, hR⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝ : CommRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\n⊢ Associated p q\n[PROOFSTEP]\nsuffices ∀ {p : R} (_ : Irreducible p), Associated p ϖ by apply Associated.trans (this hp) (this hq).symm\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\nthis : ∀ {p : R}, Irreducible p → Associated p ϖ\n⊢ Associated p q\n[PROOFSTEP]\napply Associated.trans (this hp) (this hq).symm\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝ : CommRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\n⊢ ∀ {p : R}, Irreducible p → Associated p ϖ\n[PROOFSTEP]\nclear hp hq p q\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\n⊢ ∀ {p : R}, Irreducible p → Associated p ϖ\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\n⊢ Associated p ϖ\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := hR hp.ne_zero\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nn : ℕ\nhn : Associated (ϖ ^ n) p\n⊢ Associated p ϖ\n[PROOFSTEP]\nhave : Irreducible (ϖ ^ n) := hn.symm.irreducible hp\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nn : ℕ\nhn : Associated (ϖ ^ n) p\nthis : Irreducible (ϖ ^ n)\n⊢ Associated p ϖ\n[PROOFSTEP]\nrcases lt_trichotomy n 1 with (H | rfl | H)\n[GOAL]\ncase intro.intro.intro.inl\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nn : ℕ\nhn : Associated (ϖ ^ n) p\nthis : Irreducible (ϖ ^ n)\nH : n < 1\n⊢ Associated p ϖ\n[PROOFSTEP]\nobtain rfl : n = 0 := by\n  clear hn this\n  revert H n\n  exact by decide\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nn : ℕ\nhn : Associated (ϖ ^ n) p\nthis : Irreducible (ϖ ^ n)\nH : n < 1\n⊢ n = 0\n[PROOFSTEP]\nclear hn this\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nn : ℕ\nH : n < 1\n⊢ n = 0\n[PROOFSTEP]\nrevert H n\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\n⊢ ∀ (n : ℕ), n < 1 → n = 0\n[PROOFSTEP]\nexact by decide\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\n⊢ ∀ (n : ℕ), n < 1 → n = 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase intro.intro.intro.inl\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nhn : Associated (ϖ ^ 0) p\nthis : Irreducible (ϖ ^ 0)\nH : 0 < 1\n⊢ Associated p ϖ\n[PROOFSTEP]\nsimp [not_irreducible_one, pow_zero] at this \n[GOAL]\ncase intro.intro.intro.inr.inl\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nhn : Associated (ϖ ^ 1) p\nthis : Irreducible (ϖ ^ 1)\n⊢ Associated p ϖ\n[PROOFSTEP]\nsimpa only [pow_one] using hn.symm\n[GOAL]\ncase intro.intro.intro.inr.inr\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nn : ℕ\nhn : Associated (ϖ ^ n) p\nthis : Irreducible (ϖ ^ n)\nH : 1 < n\n⊢ Associated p ϖ\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ : ∃ k, n = 1 + k + 1 := Nat.exists_eq_add_of_lt H\n[GOAL]\ncase intro.intro.intro.inr.inr.intro\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nn : ℕ\nhn : Associated (ϖ ^ (1 + n + 1)) p\nthis : Irreducible (ϖ ^ (1 + n + 1))\nH : 1 < 1 + n + 1\n⊢ Associated p ϖ\n[PROOFSTEP]\nrw [pow_succ] at this \n[GOAL]\ncase intro.intro.intro.inr.inr.intro\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nn : ℕ\nhn : Associated (ϖ ^ (1 + n + 1)) p\nthis : Irreducible (ϖ * ϖ ^ (1 + n))\nH : 1 < 1 + n + 1\n⊢ Associated p ϖ\n[PROOFSTEP]\nrcases this.isUnit_or_isUnit rfl with (H0 | H0)\n[GOAL]\ncase intro.intro.intro.inr.inr.intro.inl\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nn : ℕ\nhn : Associated (ϖ ^ (1 + n + 1)) p\nthis : Irreducible (ϖ * ϖ ^ (1 + n))\nH : 1 < 1 + n + 1\nH0 : IsUnit ϖ\n⊢ Associated p ϖ\n[PROOFSTEP]\nexact (hϖ.not_unit H0).elim\n[GOAL]\ncase intro.intro.intro.inr.inr.intro.inr\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nn : ℕ\nhn : Associated (ϖ ^ (1 + n + 1)) p\nthis : Irreducible (ϖ * ϖ ^ (1 + n))\nH : 1 < 1 + n + 1\nH0 : IsUnit (ϖ ^ (1 + n))\n⊢ Associated p ϖ\n[PROOFSTEP]\nrw [add_comm, pow_succ] at H0 \n[GOAL]\ncase intro.intro.intro.inr.inr.intro.inr\nR : Type u_1\ninst✝ : CommRing R\nϖ : R\nhϖ : Irreducible ϖ\nhR : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (ϖ ^ n) x\np : R\nhp : Irreducible p\nn : ℕ\nhn : Associated (ϖ ^ (1 + n + 1)) p\nthis : Irreducible (ϖ * ϖ ^ (1 + n))\nH : 1 < 1 + n + 1\nH0 : IsUnit (ϖ * ϖ ^ n)\n⊢ Associated p ϖ\n[PROOFSTEP]\nexact (hϖ.not_unit (isUnit_of_mul_isUnit_left H0)).elim\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\n⊢ ∃ f, (∀ (b : R), b ∈ f → Prime b) ∧ Associated (Multiset.prod f) x\n[PROOFSTEP]\nuse Multiset.replicate (Classical.choose (spec.2 hx)) p\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\n⊢ (∀ (b : R), b ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p → Prime b) ∧\n    Associated (Multiset.prod (Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p)) x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\n⊢ ∀ (b : R), b ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p → Prime b\n[PROOFSTEP]\nintro q hq\n[GOAL]\ncase h.left\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\n⊢ Prime q\n[PROOFSTEP]\nhave hpq := Multiset.eq_of_mem_replicate hq\n[GOAL]\ncase h.left\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\n⊢ Prime q\n[PROOFSTEP]\nrw [hpq]\n[GOAL]\ncase h.left\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\n⊢ Prime p\n[PROOFSTEP]\nrefine' ⟨spec.1.ne_zero, spec.1.not_unit, _⟩\n[GOAL]\ncase h.left\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\n⊢ ∀ (a b : R), p ∣ a * b → p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nintro a b h\n[GOAL]\ncase h.left\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\na b : R\nh : p ∣ a * b\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\na b : R\nh : p ∣ a * b\nha : a = 0\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nrw [ha]\n[GOAL]\ncase pos\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\na b : R\nh : p ∣ a * b\nha : a = 0\n⊢ p ∣ 0 ∨ p ∣ b\n[PROOFSTEP]\nsimp only [true_or_iff, dvd_zero]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\na b : R\nh : p ∣ a * b\nha : ¬a = 0\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nobtain ⟨m, u, rfl⟩ := spec.2 ha\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\nb : R\nm : ℕ\nu : Rˣ\nh : p ∣ choose hR ^ m * ↑u * b\nha : ¬choose hR ^ m * ↑u = 0\n⊢ p ∣ choose hR ^ m * ↑u ∨ p ∣ b\n[PROOFSTEP]\nrw [mul_assoc, mul_left_comm, IsUnit.dvd_mul_left _ _ _ (Units.isUnit _)] at h \n[GOAL]\ncase neg.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\nb : R\nm : ℕ\nu : Rˣ\nh : p ∣ choose hR ^ m * b\nha : ¬choose hR ^ m * ↑u = 0\n⊢ p ∣ choose hR ^ m * ↑u ∨ p ∣ b\n[PROOFSTEP]\nrw [IsUnit.dvd_mul_right (Units.isUnit _)]\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\nb : R\nm : ℕ\nu : Rˣ\nh : p ∣ choose hR ^ m * b\nha : ¬choose hR ^ m * ↑u = 0\n⊢ p ∣ choose hR ^ m ∨ p ∣ b\n[PROOFSTEP]\nby_cases hm : m = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\nb : R\nm : ℕ\nu : Rˣ\nh : p ∣ choose hR ^ m * b\nha : ¬choose hR ^ m * ↑u = 0\nhm : m = 0\n⊢ p ∣ choose hR ^ m ∨ p ∣ b\n[PROOFSTEP]\nsimp only [hm, one_mul, pow_zero] at h ⊢\n[GOAL]\ncase pos\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\nb : R\nm : ℕ\nu : Rˣ\nha : ¬choose hR ^ m * ↑u = 0\nhm : m = 0\nh : choose hR ∣ b\n⊢ choose hR ∣ 1 ∨ choose hR ∣ b\n[PROOFSTEP]\nright\n[GOAL]\ncase pos.h\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\nb : R\nm : ℕ\nu : Rˣ\nha : ¬choose hR ^ m * ↑u = 0\nhm : m = 0\nh : choose hR ∣ b\n⊢ choose hR ∣ b\n[PROOFSTEP]\nexact h\n[GOAL]\ncase neg\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\nb : R\nm : ℕ\nu : Rˣ\nh : p ∣ choose hR ^ m * b\nha : ¬choose hR ^ m * ↑u = 0\nhm : ¬m = 0\n⊢ p ∣ choose hR ^ m ∨ p ∣ b\n[PROOFSTEP]\nleft\n[GOAL]\ncase neg.h\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\nb : R\nm : ℕ\nu : Rˣ\nh : p ∣ choose hR ^ m * b\nha : ¬choose hR ^ m * ↑u = 0\nhm : ¬m = 0\n⊢ p ∣ choose hR ^ m\n[PROOFSTEP]\nobtain ⟨m, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hm\n[GOAL]\ncase neg.h.intro\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\nb : R\nu : Rˣ\nm : ℕ\nh : p ∣ choose hR ^ Nat.succ m * b\nha : ¬choose hR ^ Nat.succ m * ↑u = 0\nhm : ¬Nat.succ m = 0\n⊢ p ∣ choose hR ^ Nat.succ m\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\ncase neg.h.intro\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\nq : R\nhq : q ∈ Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p\nhpq : q = p\nb : R\nu : Rˣ\nm : ℕ\nh : p ∣ choose hR ^ Nat.succ m * b\nha : ¬choose hR ^ Nat.succ m * ↑u = 0\nhm : ¬Nat.succ m = 0\n⊢ p ∣ choose hR * choose hR ^ m\n[PROOFSTEP]\napply dvd_mul_of_dvd_left dvd_rfl _\n[GOAL]\ncase h.right\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\n⊢ Associated (Multiset.prod (Multiset.replicate (choose (_ : ∃ n, Associated (choose hR ^ n) x)) p)) x\n[PROOFSTEP]\nrw [Multiset.prod_replicate]\n[GOAL]\ncase h.right\nR : Type u_1\ninst✝¹ : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝ : IsDomain R\np : R := choose hR\nspec : Irreducible (choose hR) ∧ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (choose hR ^ n) x := choose_spec hR\nx : R\nhx : x ≠ 0\n⊢ Associated (p ^ choose (_ : ∃ n, Associated (choose hR ^ n) x)) x\n[PROOFSTEP]\nexact Classical.choose_spec (spec.2 hx)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\n⊢ HasUnitMulPowIrreducibleFactorization R\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := h₁\n[GOAL]\ncase intro\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\n⊢ HasUnitMulPowIrreducibleFactorization R\n[PROOFSTEP]\nrefine' ⟨p, hp, _⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\n⊢ ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\nx : R\nhx : x ≠ 0\n⊢ ∃ n, Associated (p ^ n) x\n[PROOFSTEP]\ncases' WfDvdMonoid.exists_factors x hx with fx hfx\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\nx : R\nhx : x ≠ 0\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\n⊢ ∃ n, Associated (p ^ n) x\n[PROOFSTEP]\nrefine' ⟨Multiset.card fx, _⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\nx : R\nhx : x ≠ 0\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\n⊢ Associated (p ^ ↑Multiset.card fx) x\n[PROOFSTEP]\nhave H := hfx.2\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\nx : R\nhx : x ≠ 0\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associated (Multiset.prod fx) x\n⊢ Associated (p ^ ↑Multiset.card fx) x\n[PROOFSTEP]\nrw [← Associates.mk_eq_mk_iff_associated] at H ⊢\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\nx : R\nhx : x ≠ 0\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\n⊢ Associates.mk (p ^ ↑Multiset.card fx) = Associates.mk x\n[PROOFSTEP]\nrw [← H, ← Associates.prod_mk, Associates.mk_pow, ← Multiset.prod_replicate]\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\nx : R\nhx : x ≠ 0\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\n⊢ Multiset.prod (Multiset.replicate (↑Multiset.card fx) (Associates.mk p)) =\n    Multiset.prod (Multiset.map Associates.mk fx)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase intro.intro.e_a\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\nx : R\nhx : x ≠ 0\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\n⊢ Multiset.replicate (↑Multiset.card fx) (Associates.mk p) = Multiset.map Associates.mk fx\n[PROOFSTEP]\nsymm\n[GOAL]\ncase intro.intro.e_a\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\nx : R\nhx : x ≠ 0\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\n⊢ Multiset.map Associates.mk fx = Multiset.replicate (↑Multiset.card fx) (Associates.mk p)\n[PROOFSTEP]\nrw [Multiset.eq_replicate]\n[GOAL]\ncase intro.intro.e_a\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\nx : R\nhx : x ≠ 0\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\n⊢ ↑Multiset.card (Multiset.map Associates.mk fx) = ↑Multiset.card fx ∧\n    ∀ (b : Associates R), b ∈ Multiset.map Associates.mk fx → b = Associates.mk p\n[PROOFSTEP]\nsimp only [true_and_iff, and_imp, Multiset.card_map, eq_self_iff_true, Multiset.mem_map, exists_imp]\n[GOAL]\ncase intro.intro.e_a\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\nx : R\nhx : x ≠ 0\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\n⊢ ∀ (b : Associates R) (x : R), x ∈ fx → Associates.mk x = b → b = Associates.mk p\n[PROOFSTEP]\nrintro _ q hq rfl\n[GOAL]\ncase intro.intro.e_a\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\nx : R\nhx : x ≠ 0\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\nq : R\nhq : q ∈ fx\n⊢ Associates.mk q = Associates.mk p\n[PROOFSTEP]\nrw [Associates.mk_eq_mk_iff_associated]\n[GOAL]\ncase intro.intro.e_a\nR : Type u_1\ninst✝² : CommRing R\nhR : HasUnitMulPowIrreducibleFactorization R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\np : R\nhp : Irreducible p\nx : R\nhx : x ≠ 0\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\nq : R\nhq : q ∈ fx\n⊢ Associated q p\n[PROOFSTEP]\napply h₂ (hfx.1 _ hq) hp\n[GOAL]\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\n⊢ IsPrincipalIdealRing R\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase principal\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\n⊢ ∀ (S : Ideal R), Submodule.IsPrincipal S\n[PROOFSTEP]\nintro I\n[GOAL]\ncase principal\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\n⊢ Submodule.IsPrincipal I\n[PROOFSTEP]\nby_cases I0 : I = ⊥\n[GOAL]\ncase pos\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : I = ⊥\n⊢ Submodule.IsPrincipal I\n[PROOFSTEP]\nrw [I0]\n[GOAL]\ncase pos\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : I = ⊥\n⊢ Submodule.IsPrincipal ⊥\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : I = ⊥\n⊢ ⊥ = Submodule.span R {0}\n[PROOFSTEP]\nsimp only [Set.singleton_zero, Submodule.span_zero]\n[GOAL]\ncase neg\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\n⊢ Submodule.IsPrincipal I\n[PROOFSTEP]\nobtain ⟨x, hxI, hx0⟩ : ∃ x ∈ I, x ≠ (0 : R) := I.ne_bot_iff.mp I0\n[GOAL]\ncase neg.intro.intro\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\n⊢ Submodule.IsPrincipal I\n[PROOFSTEP]\nobtain ⟨p, _, H⟩ := HasUnitMulPowIrreducibleFactorization.of_ufd_of_unique_irreducible h₁ h₂\n[GOAL]\ncase neg.intro.intro.intro.intro\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\n⊢ Submodule.IsPrincipal I\n[PROOFSTEP]\nhave ex : ∃ n : ℕ, p ^ n ∈ I := by\n  obtain ⟨n, u, rfl⟩ := H hx0\n  refine' ⟨n, _⟩\n  simpa only [Units.mul_inv_cancel_right] using I.mul_mem_right (↑u⁻¹) hxI\n[GOAL]\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\n⊢ ∃ n, p ^ n ∈ I\n[PROOFSTEP]\nobtain ⟨n, u, rfl⟩ := H hx0\n[GOAL]\ncase intro.intro\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nn : ℕ\nu : Rˣ\nhxI : p ^ n * ↑u ∈ I\nhx0 : p ^ n * ↑u ≠ 0\n⊢ ∃ n, p ^ n ∈ I\n[PROOFSTEP]\nrefine' ⟨n, _⟩\n[GOAL]\ncase intro.intro\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nn : ℕ\nu : Rˣ\nhxI : p ^ n * ↑u ∈ I\nhx0 : p ^ n * ↑u ≠ 0\n⊢ p ^ n ∈ I\n[PROOFSTEP]\nsimpa only [Units.mul_inv_cancel_right] using I.mul_mem_right (↑u⁻¹) hxI\n[GOAL]\ncase neg.intro.intro.intro.intro\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\n⊢ Submodule.IsPrincipal I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase neg.intro.intro.intro.intro.principal'\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\n⊢ ∃ a, I = Submodule.span R {a}\n[PROOFSTEP]\nuse p ^ Nat.find ex\n[GOAL]\ncase h\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\n⊢ I = Submodule.span R {p ^ Nat.find ex}\n[PROOFSTEP]\nshow I = Ideal.span _\n[GOAL]\ncase h\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\n⊢ I = span {p ^ Nat.find ex}\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase h.a\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\n⊢ I ≤ span {p ^ Nat.find ex}\n[PROOFSTEP]\nintro r hr\n[GOAL]\ncase h.a\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\nr : R\nhr : r ∈ I\n⊢ r ∈ span {p ^ Nat.find ex}\n[PROOFSTEP]\nby_cases hr0 : r = 0\n[GOAL]\ncase pos\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\nr : R\nhr : r ∈ I\nhr0 : r = 0\n⊢ r ∈ span {p ^ Nat.find ex}\n[PROOFSTEP]\nsimp only [hr0, Submodule.zero_mem]\n[GOAL]\ncase neg\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\nr : R\nhr : r ∈ I\nhr0 : ¬r = 0\n⊢ r ∈ span {p ^ Nat.find ex}\n[PROOFSTEP]\nobtain ⟨n, u, rfl⟩ := H hr0\n[GOAL]\ncase neg.intro.intro\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\nn : ℕ\nu : Rˣ\nhr : p ^ n * ↑u ∈ I\nhr0 : ¬p ^ n * ↑u = 0\n⊢ p ^ n * ↑u ∈ span {p ^ Nat.find ex}\n[PROOFSTEP]\nsimp only [mem_span_singleton, Units.isUnit, IsUnit.dvd_mul_right]\n[GOAL]\ncase neg.intro.intro\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\nn : ℕ\nu : Rˣ\nhr : p ^ n * ↑u ∈ I\nhr0 : ¬p ^ n * ↑u = 0\n⊢ p ^ Nat.find ex ∣ p ^ n\n[PROOFSTEP]\napply pow_dvd_pow\n[GOAL]\ncase neg.intro.intro.h\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\nn : ℕ\nu : Rˣ\nhr : p ^ n * ↑u ∈ I\nhr0 : ¬p ^ n * ↑u = 0\n⊢ Nat.find ex ≤ n\n[PROOFSTEP]\napply Nat.find_min'\n[GOAL]\ncase neg.intro.intro.h.h\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\nn : ℕ\nu : Rˣ\nhr : p ^ n * ↑u ∈ I\nhr0 : ¬p ^ n * ↑u = 0\n⊢ p ^ n ∈ I\n[PROOFSTEP]\nsimpa only [Units.mul_inv_cancel_right] using I.mul_mem_right (↑u⁻¹) hr\n[GOAL]\ncase h.a\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\n⊢ span {p ^ Nat.find ex} ≤ I\n[PROOFSTEP]\nerw [Submodule.span_singleton_le_iff_mem]\n[GOAL]\ncase h.a\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nI : Ideal R\nI0 : ¬I = ⊥\nx : R\nhxI : x ∈ I\nhx0 : x ≠ 0\np : R\nleft✝ : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nex : ∃ n, p ^ n ∈ I\n⊢ p ^ Nat.find ex ∈ I\n[PROOFSTEP]\nexact Nat.find_spec ex\n[GOAL]\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\n⊢ DiscreteValuationRing R\n[PROOFSTEP]\nrw [iff_pid_with_one_nonzero_prime]\n[GOAL]\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\n⊢ IsPrincipalIdealRing R ∧ ∃! P, P ≠ ⊥ ∧ IsPrime P\n[PROOFSTEP]\nhaveI PID : IsPrincipalIdealRing R := aux_pid_of_ufd_of_unique_irreducible R h₁ h₂\n[GOAL]\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₁ : ∃ p, Irreducible p\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nPID : IsPrincipalIdealRing R\n⊢ IsPrincipalIdealRing R ∧ ∃! P, P ≠ ⊥ ∧ IsPrime P\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := h₁\n[GOAL]\ncase intro\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nPID : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\n⊢ IsPrincipalIdealRing R ∧ ∃! P, P ≠ ⊥ ∧ IsPrime P\n[PROOFSTEP]\nrefine' ⟨PID, ⟨Ideal.span { p }, ⟨_, _⟩, _⟩⟩\n[GOAL]\ncase intro.refine'_1\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nPID : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\n⊢ span {p} ≠ ⊥\n[PROOFSTEP]\nrw [Submodule.ne_bot_iff]\n[GOAL]\ncase intro.refine'_1\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nPID : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\n⊢ ∃ x, x ∈ span {p} ∧ x ≠ 0\n[PROOFSTEP]\nrefine' ⟨p, Ideal.mem_span_singleton.mpr (dvd_refl p), hp.ne_zero⟩\n[GOAL]\ncase intro.refine'_2\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nPID : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\n⊢ IsPrime (span {p})\n[PROOFSTEP]\nrwa [Ideal.span_singleton_prime hp.ne_zero, ← UniqueFactorizationMonoid.irreducible_iff_prime]\n[GOAL]\ncase intro.refine'_3\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nPID : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\n⊢ ∀ (y : Ideal R), (fun P => P ≠ ⊥ ∧ IsPrime P) y → y = span {p}\n[PROOFSTEP]\nintro I\n[GOAL]\ncase intro.refine'_3\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nPID : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\nI : Ideal R\n⊢ (fun P => P ≠ ⊥ ∧ IsPrime P) I → I = span {p}\n[PROOFSTEP]\nrw [← Submodule.IsPrincipal.span_singleton_generator I]\n[GOAL]\ncase intro.refine'_3\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nPID : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\nI : Ideal R\n⊢ (fun P => P ≠ ⊥ ∧ IsPrime P) (Submodule.span R {Submodule.IsPrincipal.generator I}) →\n    Submodule.span R {Submodule.IsPrincipal.generator I} = span {p}\n[PROOFSTEP]\nrintro ⟨I0, hI⟩\n[GOAL]\ncase intro.refine'_3.intro\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nPID : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\nI : Ideal R\nI0 : Submodule.span R {Submodule.IsPrincipal.generator I} ≠ ⊥\nhI : IsPrime (Submodule.span R {Submodule.IsPrincipal.generator I})\n⊢ Submodule.span R {Submodule.IsPrincipal.generator I} = span {p}\n[PROOFSTEP]\napply span_singleton_eq_span_singleton.mpr\n[GOAL]\ncase intro.refine'_3.intro\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nPID : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\nI : Ideal R\nI0 : Submodule.span R {Submodule.IsPrincipal.generator I} ≠ ⊥\nhI : IsPrime (Submodule.span R {Submodule.IsPrincipal.generator I})\n⊢ Associated (Submodule.IsPrincipal.generator I) p\n[PROOFSTEP]\napply h₂ _ hp\n[GOAL]\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nPID : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\nI : Ideal R\nI0 : Submodule.span R {Submodule.IsPrincipal.generator I} ≠ ⊥\nhI : IsPrime (Submodule.span R {Submodule.IsPrincipal.generator I})\n⊢ Irreducible (Submodule.IsPrincipal.generator I)\n[PROOFSTEP]\nerw [Ne.def, span_singleton_eq_bot] at I0 \n[GOAL]\nR✝ : Type u_1\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : UniqueFactorizationMonoid R\nh₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\nPID : IsPrincipalIdealRing R\np : R\nhp : Irreducible p\nI : Ideal R\nI0 : ¬Submodule.IsPrincipal.generator I = 0\nhI : IsPrime (Submodule.span R {Submodule.IsPrincipal.generator I})\n⊢ Irreducible (Submodule.IsPrincipal.generator I)\n[PROOFSTEP]\nrwa [UniqueFactorizationMonoid.irreducible_iff_prime, ← Ideal.span_singleton_prime I0]\n[GOAL]\nR✝ : Type u_1\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nhR : HasUnitMulPowIrreducibleFactorization R\n⊢ DiscreteValuationRing R\n[PROOFSTEP]\nletI : UniqueFactorizationMonoid R := hR.toUniqueFactorizationMonoid\n[GOAL]\nR✝ : Type u_1\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nhR : HasUnitMulPowIrreducibleFactorization R\nthis : UniqueFactorizationMonoid R := HasUnitMulPowIrreducibleFactorization.toUniqueFactorizationMonoid hR\n⊢ DiscreteValuationRing R\n[PROOFSTEP]\napply of_ufd_of_unique_irreducible _ hR.unique_irreducible\n[GOAL]\nR✝ : Type u_1\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nhR : HasUnitMulPowIrreducibleFactorization R\nthis : UniqueFactorizationMonoid R := HasUnitMulPowIrreducibleFactorization.toUniqueFactorizationMonoid hR\n⊢ ∃ p, Irreducible p\n[PROOFSTEP]\nobtain ⟨p, hp, H⟩ := hR\n[GOAL]\ncase intro.intro\nR✝ : Type u_1\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R\nhp : Irreducible p\nH : ∀ {x : R}, x ≠ 0 → ∃ n, Associated (p ^ n) x\nthis : UniqueFactorizationMonoid R :=\n  HasUnitMulPowIrreducibleFactorization.toUniqueFactorizationMonoid (Exists.intro p { left := hp, right := H })\n⊢ ∃ p, Irreducible p\n[PROOFSTEP]\nexact ⟨p, hp⟩\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\n⊢ ∃ n, Associated x (ϖ ^ n)\n[PROOFSTEP]\nhave : WfDvdMonoid R := IsNoetherianRing.wfDvdMonoid\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\n⊢ ∃ n, Associated x (ϖ ^ n)\n[PROOFSTEP]\ncases' WfDvdMonoid.exists_factors x hx with fx hfx\n[GOAL]\ncase intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\n⊢ ∃ n, Associated x (ϖ ^ n)\n[PROOFSTEP]\nuse Multiset.card fx\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\n⊢ Associated x (ϖ ^ ↑Multiset.card fx)\n[PROOFSTEP]\nhave H := hfx.2\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associated (Multiset.prod fx) x\n⊢ Associated x (ϖ ^ ↑Multiset.card fx)\n[PROOFSTEP]\nrw [← Associates.mk_eq_mk_iff_associated] at H ⊢\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\n⊢ Associates.mk x = Associates.mk (ϖ ^ ↑Multiset.card fx)\n[PROOFSTEP]\nrw [← H, ← Associates.prod_mk, Associates.mk_pow, ← Multiset.prod_replicate]\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\n⊢ Multiset.prod (Multiset.map Associates.mk fx) =\n    Multiset.prod (Multiset.replicate (↑Multiset.card fx) (Associates.mk ϖ))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e_a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\n⊢ Multiset.map Associates.mk fx = Multiset.replicate (↑Multiset.card fx) (Associates.mk ϖ)\n[PROOFSTEP]\nrw [Multiset.eq_replicate]\n[GOAL]\ncase h.e_a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\n⊢ ↑Multiset.card (Multiset.map Associates.mk fx) = ↑Multiset.card fx ∧\n    ∀ (b : Associates R), b ∈ Multiset.map Associates.mk fx → b = Associates.mk ϖ\n[PROOFSTEP]\nsimp only [true_and_iff, and_imp, Multiset.card_map, eq_self_iff_true, Multiset.mem_map, exists_imp]\n[GOAL]\ncase h.e_a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\n⊢ ∀ (b : Associates R) (x : R), x ∈ fx → Associates.mk x = b → b = Associates.mk ϖ\n[PROOFSTEP]\nrintro _ _ _ rfl\n[GOAL]\ncase h.e_a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\nx✝ : R\na✝ : x✝ ∈ fx\n⊢ Associates.mk x✝ = Associates.mk ϖ\n[PROOFSTEP]\nrw [Associates.mk_eq_mk_iff_associated]\n[GOAL]\ncase h.e_a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\nx✝ : R\na✝ : x✝ ∈ fx\n⊢ Associated x✝ ϖ\n[PROOFSTEP]\nrefine' associated_of_irreducible _ _ hirr\n[GOAL]\ncase h.e_a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\nx✝ : R\na✝ : x✝ ∈ fx\n⊢ Irreducible x✝\n[PROOFSTEP]\napply hfx.1\n[GOAL]\ncase h.e_a.a\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nthis : WfDvdMonoid R\nfx : Multiset R\nhfx : (∀ (b : R), b ∈ fx → Irreducible b) ∧ Associated (Multiset.prod fx) x\nH : Associates.mk (Multiset.prod fx) = Associates.mk x\nx✝ : R\na✝ : x✝ ∈ fx\n⊢ x✝ ∈ fx\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\n⊢ ∃ n u, x = ↑u * ϖ ^ n\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := associated_pow_irreducible hx hirr\n[GOAL]\ncase intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : x ≠ 0\nϖ : R\nhirr : Irreducible ϖ\nn : ℕ\nhn : Associated x (ϖ ^ n)\n⊢ ∃ n u, x = ↑u * ϖ ^ n\n[PROOFSTEP]\nobtain ⟨u, rfl⟩ := hn.symm\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nϖ : R\nhirr : Irreducible ϖ\nn : ℕ\nu : Rˣ\nhx : ϖ ^ n * ↑u ≠ 0\nhn : Associated (ϖ ^ n * ↑u) (ϖ ^ n)\n⊢ ∃ n_1 u_1, ϖ ^ n * ↑u = ↑u_1 * ϖ ^ n_1\n[PROOFSTEP]\nuse n, u\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nϖ : R\nhirr : Irreducible ϖ\nn : ℕ\nu : Rˣ\nhx : ϖ ^ n * ↑u ≠ 0\nhn : Associated (ϖ ^ n * ↑u) (ϖ ^ n)\n⊢ ϖ ^ n * ↑u = ↑u * ϖ ^ n\n[PROOFSTEP]\napply mul_comm\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\ns : Ideal R\nhs : s ≠ ⊥\nϖ : R\nhirr : Irreducible ϖ\n⊢ ∃ n, s = span {ϖ ^ n}\n[PROOFSTEP]\nhave gen_ne_zero : generator s ≠ 0 := by\n  rw [Ne.def, ← eq_bot_iff_generator_eq_zero]\n  assumption\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\ns : Ideal R\nhs : s ≠ ⊥\nϖ : R\nhirr : Irreducible ϖ\n⊢ generator s ≠ 0\n[PROOFSTEP]\nrw [Ne.def, ← eq_bot_iff_generator_eq_zero]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\ns : Ideal R\nhs : s ≠ ⊥\nϖ : R\nhirr : Irreducible ϖ\n⊢ ¬s = ⊥\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\ns : Ideal R\nhs : s ≠ ⊥\nϖ : R\nhirr : Irreducible ϖ\ngen_ne_zero : generator s ≠ 0\n⊢ ∃ n, s = span {ϖ ^ n}\n[PROOFSTEP]\nrcases associated_pow_irreducible gen_ne_zero hirr with ⟨n, u, hnu⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\ns : Ideal R\nhs : s ≠ ⊥\nϖ : R\nhirr : Irreducible ϖ\ngen_ne_zero : generator s ≠ 0\nn : ℕ\nu : Rˣ\nhnu : generator s * ↑u = ϖ ^ n\n⊢ ∃ n, s = span {ϖ ^ n}\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\ns : Ideal R\nhs : s ≠ ⊥\nϖ : R\nhirr : Irreducible ϖ\ngen_ne_zero : generator s ≠ 0\nn : ℕ\nu : Rˣ\nhnu : generator s * ↑u = ϖ ^ n\n⊢ s = span {ϖ ^ n}\n[PROOFSTEP]\nhave : span _ = _ := Ideal.span_singleton_generator s\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\ns : Ideal R\nhs : s ≠ ⊥\nϖ : R\nhirr : Irreducible ϖ\ngen_ne_zero : generator s ≠ 0\nn : ℕ\nu : Rˣ\nhnu : generator s * ↑u = ϖ ^ n\nthis : span {generator s} = s\n⊢ s = span {ϖ ^ n}\n[PROOFSTEP]\nrw [← this, ← hnu, span_singleton_eq_span_singleton]\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\ns : Ideal R\nhs : s ≠ ⊥\nϖ : R\nhirr : Irreducible ϖ\ngen_ne_zero : generator s ≠ 0\nn : ℕ\nu : Rˣ\nhnu : generator s * ↑u = ϖ ^ n\nthis : span {generator s} = s\n⊢ Associated (generator s) (generator s * ↑u)\n[PROOFSTEP]\nuse u\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\n⊢ m = n\n[PROOFSTEP]\nhave key : Associated (Multiset.replicate m p).prod (Multiset.replicate n q).prod :=\n  by\n  rw [Multiset.prod_replicate, Multiset.prod_replicate, Associated]\n  refine' ⟨u * v⁻¹, _⟩\n  simp only [Units.val_mul]\n  rw [mul_left_comm, ← mul_assoc, h, mul_right_comm, Units.mul_inv, one_mul]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\n⊢ Associated (Multiset.prod (Multiset.replicate m p)) (Multiset.prod (Multiset.replicate n q))\n[PROOFSTEP]\nrw [Multiset.prod_replicate, Multiset.prod_replicate, Associated]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\n⊢ ∃ u, p ^ m * ↑u = q ^ n\n[PROOFSTEP]\nrefine' ⟨u * v⁻¹, _⟩\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\n⊢ p ^ m * ↑(u * v⁻¹) = q ^ n\n[PROOFSTEP]\nsimp only [Units.val_mul]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\n⊢ p ^ m * (↑u * ↑v⁻¹) = q ^ n\n[PROOFSTEP]\nrw [mul_left_comm, ← mul_assoc, h, mul_right_comm, Units.mul_inv, one_mul]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\nkey : Associated (Multiset.prod (Multiset.replicate m p)) (Multiset.prod (Multiset.replicate n q))\n⊢ m = n\n[PROOFSTEP]\nhave := by\n  refine' Multiset.card_eq_card_of_rel (UniqueFactorizationMonoid.factors_unique _ _ key)\n  all_goals\n    intro x hx\n    obtain rfl := Multiset.eq_of_mem_replicate hx\n    assumption\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\nkey : Associated (Multiset.prod (Multiset.replicate m p)) (Multiset.prod (Multiset.replicate n q))\n⊢ ?m.283362\n[PROOFSTEP]\nrefine' Multiset.card_eq_card_of_rel (UniqueFactorizationMonoid.factors_unique _ _ key)\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\nkey : Associated (Multiset.prod (Multiset.replicate m p)) (Multiset.prod (Multiset.replicate n q))\n⊢ ∀ (x : R), x ∈ Multiset.replicate m p → Irreducible x\ncase refine'_2\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\nkey : Associated (Multiset.prod (Multiset.replicate m p)) (Multiset.prod (Multiset.replicate n q))\n⊢ ∀ (x : R), x ∈ Multiset.replicate n q → Irreducible x\n[PROOFSTEP]\nall_goals\n  intro x hx\n  obtain rfl := Multiset.eq_of_mem_replicate hx\n  assumption\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\nkey : Associated (Multiset.prod (Multiset.replicate m p)) (Multiset.prod (Multiset.replicate n q))\n⊢ ∀ (x : R), x ∈ Multiset.replicate m p → Irreducible x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\nkey : Associated (Multiset.prod (Multiset.replicate m p)) (Multiset.prod (Multiset.replicate n q))\nx : R\nhx : x ∈ Multiset.replicate m p\n⊢ Irreducible x\n[PROOFSTEP]\nobtain rfl := Multiset.eq_of_mem_replicate hx\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nq : R\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nx : R\nhp : Irreducible x\nh : ↑u * x ^ m = ↑v * q ^ n\nkey : Associated (Multiset.prod (Multiset.replicate m x)) (Multiset.prod (Multiset.replicate n q))\nhx : x ∈ Multiset.replicate m x\n⊢ Irreducible x\n[PROOFSTEP]\nassumption\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\nkey : Associated (Multiset.prod (Multiset.replicate m p)) (Multiset.prod (Multiset.replicate n q))\n⊢ ∀ (x : R), x ∈ Multiset.replicate n q → Irreducible x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\nkey : Associated (Multiset.prod (Multiset.replicate m p)) (Multiset.prod (Multiset.replicate n q))\nx : R\nhx : x ∈ Multiset.replicate n q\n⊢ Irreducible x\n[PROOFSTEP]\nobtain rfl := Multiset.eq_of_mem_replicate hx\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np : R\nhp : Irreducible p\nu v : Rˣ\nm n : ℕ\nx : R\nhq : Irreducible x\nh : ↑u * p ^ m = ↑v * x ^ n\nkey : Associated (Multiset.prod (Multiset.replicate m p)) (Multiset.prod (Multiset.replicate n x))\nhx : x ∈ Multiset.replicate n x\n⊢ Irreducible x\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\np q : R\nhp : Irreducible p\nhq : Irreducible q\nu v : Rˣ\nm n : ℕ\nh : ↑u * p ^ m = ↑v * q ^ n\nkey : Associated (Multiset.prod (Multiset.replicate m p)) (Multiset.prod (Multiset.replicate n q))\nthis : ↑Multiset.card (Multiset.replicate m p) = ↑Multiset.card (Multiset.replicate n q)\n⊢ m = n\n[PROOFSTEP]\nsimpa only [Multiset.card_replicate]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nϖ : R\nhirr : Irreducible ϖ\nu v : Rˣ\nm n : ℕ\nh : ↑u * ϖ ^ m = ↑v * ϖ ^ n\n⊢ u = v\n[PROOFSTEP]\nobtain rfl : m = n := unit_mul_pow_congr_pow hirr hirr u v m n h\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nϖ : R\nhirr : Irreducible ϖ\nu v : Rˣ\nm : ℕ\nh : ↑u * ϖ ^ m = ↑v * ϖ ^ m\n⊢ u = v\n[PROOFSTEP]\nrw [← sub_eq_zero] at h \n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nϖ : R\nhirr : Irreducible ϖ\nu v : Rˣ\nm : ℕ\nh✝ : ↑u * ϖ ^ m = ↑v * ϖ ^ m\nh : ↑u * ϖ ^ m - ↑v * ϖ ^ m = 0\n⊢ u = v\n[PROOFSTEP]\nrw [← sub_mul, mul_eq_zero] at h \n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nϖ : R\nhirr : Irreducible ϖ\nu v : Rˣ\nm : ℕ\nh✝ : ↑u * ϖ ^ m = ↑v * ϖ ^ m\nh : ↑u - ↑v = 0 ∨ ϖ ^ m = 0\n⊢ u = v\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase inl\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nϖ : R\nhirr : Irreducible ϖ\nu v : Rˣ\nm : ℕ\nh✝ : ↑u * ϖ ^ m = ↑v * ϖ ^ m\nh : ↑u - ↑v = 0\n⊢ u = v\n[PROOFSTEP]\nrw [sub_eq_zero] at h \n[GOAL]\ncase inl\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nϖ : R\nhirr : Irreducible ϖ\nu v : Rˣ\nm : ℕ\nh✝ : ↑u * ϖ ^ m = ↑v * ϖ ^ m\nh : ↑u = ↑v\n⊢ u = v\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\ncase inr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nϖ : R\nhirr : Irreducible ϖ\nu v : Rˣ\nm : ℕ\nh✝ : ↑u * ϖ ^ m = ↑v * ϖ ^ m\nh : ϖ ^ m = 0\n⊢ u = v\n[PROOFSTEP]\napply (hirr.ne_zero (pow_eq_zero h)).elim\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nr : R\nu : Rˣ\nϖ : R\nhϖ : Irreducible ϖ\nn : ℕ\nhr : r = ↑u * ϖ ^ n\n⊢ ↑(addVal R) r = ↑n\n[PROOFSTEP]\nrw [addVal, addValuation_apply, hr,\n  eq_of_associated_left (associated_of_irreducible R hϖ (Classical.choose_spec (exists_prime R)).irreducible),\n  eq_of_associated_right (Associated.symm ⟨u, mul_comm _ _⟩),\n  multiplicity_pow_self_of_prime (PrincipalIdealRing.irreducible_iff_prime.1 hϖ)]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nϖ : R\nhϖ : Irreducible ϖ\n⊢ ↑(addVal R) ϖ = 1\n[PROOFSTEP]\nsimpa only [one_mul, eq_self_iff_true, Units.val_one, pow_one, forall_true_left, Nat.cast_one] using addVal_def ϖ 1 hϖ 1\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nϖ : R\nh : Irreducible ϖ\nn : ℕ\n⊢ ↑(addVal R) (ϖ ^ n) = ↑n\n[PROOFSTEP]\nrw [addVal_pow, addVal_uniformizer h, nsmul_one]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na : R\n⊢ ↑(addVal R) a = ⊤ ↔ a = 0\n[PROOFSTEP]\nhave hi := (Classical.choose_spec (exists_prime R)).irreducible\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na : R\nhi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))\n⊢ ↑(addVal R) a = ⊤ ↔ a = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na : R\nhi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))\n⊢ ↑(addVal R) a = ⊤ → a = 0\n[PROOFSTEP]\ncontrapose\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na : R\nhi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))\n⊢ ¬a = 0 → ¬↑(addVal R) a = ⊤\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na : R\nhi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))\nh : ¬a = 0\n⊢ ¬↑(addVal R) a = ⊤\n[PROOFSTEP]\nobtain ⟨n, ha⟩ := associated_pow_irreducible h hi\n[GOAL]\ncase mp.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na : R\nhi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))\nh : ¬a = 0\nn : ℕ\nha : Associated a (choose (_ : ∃ ϖ, Prime ϖ) ^ n)\n⊢ ¬↑(addVal R) a = ⊤\n[PROOFSTEP]\nobtain ⟨u, rfl⟩ := ha.symm\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nhi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))\nn : ℕ\nu : Rˣ\nh : ¬choose (_ : ∃ ϖ, Prime ϖ) ^ n * ↑u = 0\nha : Associated (choose (_ : ∃ ϖ, Prime ϖ) ^ n * ↑u) (choose (_ : ∃ ϖ, Prime ϖ) ^ n)\n⊢ ¬↑(addVal R) (choose (_ : ∃ ϖ, Prime ϖ) ^ n * ↑u) = ⊤\n[PROOFSTEP]\nrw [mul_comm, addVal_def' u hi n]\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nhi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))\nn : ℕ\nu : Rˣ\nh : ¬choose (_ : ∃ ϖ, Prime ϖ) ^ n * ↑u = 0\nha : Associated (choose (_ : ∃ ϖ, Prime ϖ) ^ n * ↑u) (choose (_ : ∃ ϖ, Prime ϖ) ^ n)\n⊢ ¬↑n = ⊤\n[PROOFSTEP]\nexact PartENat.natCast_ne_top _\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na : R\nhi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))\n⊢ a = 0 → ↑(addVal R) a = ⊤\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nhi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))\n⊢ ↑(addVal R) 0 = ⊤\n[PROOFSTEP]\nexact addVal_zero\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\n⊢ ↑(addVal R) a ≤ ↑(addVal R) b ↔ a ∣ b\n[PROOFSTEP]\nhave hp := Classical.choose_spec (exists_prime R)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nhp : Prime (choose (_ : ∃ ϖ, Prime ϖ))\n⊢ ↑(addVal R) a ≤ ↑(addVal R) b ↔ a ∣ b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nhp : Prime (choose (_ : ∃ ϖ, Prime ϖ))\n⊢ ↑(addVal R) a ≤ ↑(addVal R) b → a ∣ b\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nhp : Prime (choose (_ : ∃ ϖ, Prime ϖ))\n⊢ a ∣ b → ↑(addVal R) a ≤ ↑(addVal R) b\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nhp : Prime (choose (_ : ∃ ϖ, Prime ϖ))\nh : ↑(addVal R) a ≤ ↑(addVal R) b\n⊢ a ∣ b\n[PROOFSTEP]\nby_cases ha0 : a = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nhp : Prime (choose (_ : ∃ ϖ, Prime ϖ))\nh : ↑(addVal R) a ≤ ↑(addVal R) b\nha0 : a = 0\n⊢ a ∣ b\n[PROOFSTEP]\nrw [ha0, addVal_zero, top_le_iff, addVal_eq_top_iff] at h \n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nhp : Prime (choose (_ : ∃ ϖ, Prime ϖ))\nh : b = 0\nha0 : a = 0\n⊢ a ∣ b\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nhp : Prime (choose (_ : ∃ ϖ, Prime ϖ))\nh : b = 0\nha0 : a = 0\n⊢ a ∣ 0\n[PROOFSTEP]\napply dvd_zero\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nhp : Prime (choose (_ : ∃ ϖ, Prime ϖ))\nh : ↑(addVal R) a ≤ ↑(addVal R) b\nha0 : ¬a = 0\n⊢ a ∣ b\n[PROOFSTEP]\nobtain ⟨n, ha⟩ := associated_pow_irreducible ha0 hp.irreducible\n[GOAL]\ncase neg.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nhp : Prime (choose (_ : ∃ ϖ, Prime ϖ))\nh : ↑(addVal R) a ≤ ↑(addVal R) b\nha0 : ¬a = 0\nn : ℕ\nha : Associated a (choose (_ : ∃ ϖ, Prime ϖ) ^ n)\n⊢ a ∣ b\n[PROOFSTEP]\nrw [addVal, addValuation_apply, addValuation_apply, multiplicity_le_multiplicity_iff] at h \n[GOAL]\ncase neg.intro\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nhp : Prime (choose (_ : ∃ ϖ, Prime ϖ))\nh : ∀ (n : ℕ), choose (_ : ∃ ϖ, Prime ϖ) ^ n ∣ a → choose (_ : ∃ ϖ, Prime ϖ) ^ n ∣ b\nha0 : ¬a = 0\nn : ℕ\nha : Associated a (choose (_ : ∃ ϖ, Prime ϖ) ^ n)\n⊢ a ∣ b\n[PROOFSTEP]\nexact ha.dvd.trans (h n ha.symm.dvd)\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nhp : Prime (choose (_ : ∃ ϖ, Prime ϖ))\nh : a ∣ b\n⊢ ↑(addVal R) a ≤ ↑(addVal R) b\n[PROOFSTEP]\nrw [addVal, addValuation_apply, addValuation_apply]\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\na b : R\nhp : Prime (choose (_ : ∃ ϖ, Prime ϖ))\nh : a ∣ b\n⊢ multiplicity (choose (_ : ∃ ϖ, Prime ϖ)) a ≤ multiplicity (choose (_ : ∃ ϖ, Prime ϖ)) b\n[PROOFSTEP]\nexact multiplicity_le_multiplicity_of_dvd_right h\n[GOAL]\nR✝ : Type u_1\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : ∀ (n : ℕ), x ≡ 0 [SMOD maximalIdeal R ^ n • ⊤]\n⊢ x = 0\n[PROOFSTEP]\nobtain ⟨ϖ, hϖ⟩ := exists_irreducible R\n[GOAL]\ncase intro\nR✝ : Type u_1\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx : R\nhx : ∀ (n : ℕ), x ≡ 0 [SMOD maximalIdeal R ^ n • ⊤]\nϖ : R\nhϖ : Irreducible ϖ\n⊢ x = 0\n[PROOFSTEP]\nsimp only [← Ideal.one_eq_top, smul_eq_mul, mul_one, SModEq.zero, hϖ.maximalIdeal_eq, Ideal.span_singleton_pow,\n  Ideal.mem_span_singleton, ← addVal_le_iff_dvd, hϖ.addVal_pow] at hx \n[GOAL]\ncase intro\nR✝ : Type u_1\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DiscreteValuationRing R\nx ϖ : R\nhϖ : Irreducible ϖ\nhx : ∀ (n : ℕ), ↑n ≤ ↑(addVal R) x\n⊢ x = 0\n[PROOFSTEP]\nrwa [← addVal_eq_top_iff, PartENat.eq_top_iff_forall_le]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.DiscreteValuationRing.Basic", "llama_tokens": 40646, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6150878555160666, "lm_q2_score": 0.6150878625719088, "lm_q1q2_score": 0.3783330743433165}}
{"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact f g ↔ imageSubobject f = kernelSubobject g\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact f g → imageSubobject f = kernelSubobject g\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ imageSubobject f = kernelSubobject g\n[PROOFSTEP]\nhave : IsIso (imageToKernel f g h.w) :=\n  have := h.epi;\n  isIso_of_mono_of_epi _\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\nthis : IsIso (imageToKernel f g (_ : f ≫ g = 0))\n⊢ imageSubobject f = kernelSubobject g\n[PROOFSTEP]\nrefine Subobject.eq_of_comm (asIso (imageToKernel _ _ h.w)) ?_\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\nthis : IsIso (imageToKernel f g (_ : f ≫ g = 0))\n⊢ (asIso (imageToKernel f g (_ : f ≫ g = 0))).hom ≫ Subobject.arrow (kernelSubobject g) =\n    Subobject.arrow (imageSubobject f)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ imageSubobject f = kernelSubobject g → Exact f g\n[PROOFSTEP]\napply exact_of_image_eq_kernel\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact f g ↔ f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact f g → f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n[PROOFSTEP]\nexact fun h ↦ ⟨h.1, kernel_comp_cokernel f g h⟩\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0 → Exact f g\n[PROOFSTEP]\nrefine fun h ↦ ⟨h.1, ?_⟩\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n⊢ Epi (imageToKernel f g (_ : f ≫ g = 0))\n[PROOFSTEP]\nsuffices hl : IsLimit (KernelFork.ofι (imageSubobject f).arrow (imageSubobject_arrow_comp_eq_zero h.1))\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nhl : IsLimit (KernelFork.ofι (Subobject.arrow (imageSubobject f)) (_ : Subobject.arrow (imageSubobject f) ≫ g = 0))\n⊢ Epi (imageToKernel f g (_ : f ≫ g = 0))\n[PROOFSTEP]\nhave : imageToKernel f g h.1 = (hl.conePointUniqueUpToIso (limit.isLimit _)).hom ≫ (kernelSubobjectIso _).inv := by ext;\n  simp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nhl : IsLimit (KernelFork.ofι (Subobject.arrow (imageSubobject f)) (_ : Subobject.arrow (imageSubobject f) ≫ g = 0))\n⊢ imageToKernel f g (_ : f ≫ g = 0) =\n    (IsLimit.conePointUniqueUpToIso hl (limit.isLimit (parallelPair g 0))).hom ≫ (kernelSubobjectIso g).inv\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nhl : IsLimit (KernelFork.ofι (Subobject.arrow (imageSubobject f)) (_ : Subobject.arrow (imageSubobject f) ≫ g = 0))\n⊢ imageToKernel f g (_ : f ≫ g = 0) ≫ Subobject.arrow (kernelSubobject g) =\n    ((IsLimit.conePointUniqueUpToIso hl (limit.isLimit (parallelPair g 0))).hom ≫ (kernelSubobjectIso g).inv) ≫\n      Subobject.arrow (kernelSubobject g)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nhl : IsLimit (KernelFork.ofι (Subobject.arrow (imageSubobject f)) (_ : Subobject.arrow (imageSubobject f) ≫ g = 0))\nthis :\n  imageToKernel f g (_ : f ≫ g = 0) =\n    (IsLimit.conePointUniqueUpToIso hl (limit.isLimit (parallelPair g 0))).hom ≫ (kernelSubobjectIso g).inv\n⊢ Epi (imageToKernel f g (_ : f ≫ g = 0))\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nhl : IsLimit (KernelFork.ofι (Subobject.arrow (imageSubobject f)) (_ : Subobject.arrow (imageSubobject f) ≫ g = 0))\nthis :\n  imageToKernel f g (_ : f ≫ g = 0) =\n    (IsLimit.conePointUniqueUpToIso hl (limit.isLimit (parallelPair g 0))).hom ≫ (kernelSubobjectIso g).inv\n⊢ Epi ((IsLimit.conePointUniqueUpToIso hl (limit.isLimit (parallelPair g 0))).hom ≫ (kernelSubobjectIso g).inv)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase hl\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n⊢ IsLimit (KernelFork.ofι (Subobject.arrow (imageSubobject f)) (_ : Subobject.arrow (imageSubobject f) ≫ g = 0))\n[PROOFSTEP]\nrefine KernelFork.IsLimit.ofι _ _ (fun u hu ↦ ?_) ?_ (fun _ _ _ h ↦ ?_)\n[GOAL]\ncase hl.refine_1\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nW'✝ : C\nu : W'✝ ⟶ Y\nhu : u ≫ g = 0\n⊢ W'✝ ⟶ Subobject.underlying.obj (imageSubobject f)\n[PROOFSTEP]\nrefine kernel.lift (cokernel.π f) u ?_ ≫ (imageIsoImage f).hom ≫ (imageSubobjectIso _).inv\n[GOAL]\ncase hl.refine_1\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nW'✝ : C\nu : W'✝ ⟶ Y\nhu : u ≫ g = 0\n⊢ u ≫ cokernel.π f = 0\n[PROOFSTEP]\nrw [← kernel.lift_ι g u hu, Category.assoc, h.2, comp_zero]\n[GOAL]\ncase hl.refine_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n⊢ ∀ {W' : C} (g' : W' ⟶ Y) (eq' : g' ≫ g = 0),\n    (fun {W'} u hu =>\n            kernel.lift (cokernel.π f) u (_ : u ≫ cokernel.π f = 0) ≫ (imageIsoImage f).hom ≫ (imageSubobjectIso f).inv)\n          g' eq' ≫\n        Subobject.arrow (imageSubobject f) =\n      g'\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase hl.refine_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nW'✝ : C\nx✝² : W'✝ ⟶ Y\nx✝¹ : x✝² ≫ g = 0\nx✝ : W'✝ ⟶ Subobject.underlying.obj (imageSubobject f)\nh : x✝ ≫ Subobject.arrow (imageSubobject f) = x✝²\n⊢ x✝ =\n    (fun {W'} u hu =>\n        kernel.lift (cokernel.π f) u (_ : u ≫ cokernel.π f = 0) ≫ (imageIsoImage f).hom ≫ (imageSubobjectIso f).inv)\n      x✝² x✝¹\n[PROOFSTEP]\nintros\n[GOAL]\ncase hl.refine_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nW'✝ : C\nx✝² : W'✝ ⟶ Y\nx✝¹ : x✝² ≫ g = 0\nx✝ : W'✝ ⟶ Subobject.underlying.obj (imageSubobject f)\nh : x✝ ≫ Subobject.arrow (imageSubobject f) = x✝²\n⊢ x✝ =\n    (fun {W'} u hu =>\n        kernel.lift (cokernel.π f) u (_ : u ≫ cokernel.π f = 0) ≫ (imageIsoImage f).hom ≫ (imageSubobjectIso f).inv)\n      x✝² x✝¹\n[PROOFSTEP]\nrw [← cancel_mono (imageSubobject f).arrow, h]\n[GOAL]\ncase hl.refine_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nW'✝ : C\nx✝² : W'✝ ⟶ Y\nx✝¹ : x✝² ≫ g = 0\nx✝ : W'✝ ⟶ Subobject.underlying.obj (imageSubobject f)\nh : x✝ ≫ Subobject.arrow (imageSubobject f) = x✝²\n⊢ x✝² =\n    (fun {W'} u hu =>\n          kernel.lift (cokernel.π f) u (_ : u ≫ cokernel.π f = 0) ≫ (imageIsoImage f).hom ≫ (imageSubobjectIso f).inv)\n        x✝² x✝¹ ≫\n      Subobject.arrow (imageSubobject f)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ncg : KernelFork g\nhg : IsLimit cg\ncf : CokernelCofork f\nhf : IsColimit cf\n⊢ Exact f g ↔ f ≫ g = 0 ∧ Fork.ι cg ≫ Cofork.π cf = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ncg : KernelFork g\nhg : IsLimit cg\ncf : CokernelCofork f\nhf : IsColimit cf\n⊢ Exact f g → f ≫ g = 0 ∧ Fork.ι cg ≫ Cofork.π cf = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ncg : KernelFork g\nhg : IsLimit cg\ncf : CokernelCofork f\nhf : IsColimit cf\nh : Exact f g\n⊢ f ≫ g = 0 ∧ Fork.ι cg ≫ Cofork.π cf = 0\n[PROOFSTEP]\nexact ⟨h.1, fork_ι_comp_cofork_π f g h cg cf⟩\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ncg : KernelFork g\nhg : IsLimit cg\ncf : CokernelCofork f\nhf : IsColimit cf\n⊢ f ≫ g = 0 ∧ Fork.ι cg ≫ Cofork.π cf = 0 → Exact f g\n[PROOFSTEP]\nrw [exact_iff]\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ncg : KernelFork g\nhg : IsLimit cg\ncf : CokernelCofork f\nhf : IsColimit cf\n⊢ f ≫ g = 0 ∧ Fork.ι cg ≫ Cofork.π cf = 0 → f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n[PROOFSTEP]\nrefine fun h => ⟨h.1, ?_⟩\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ncg : KernelFork g\nhg : IsLimit cg\ncf : CokernelCofork f\nhf : IsColimit cf\nh : f ≫ g = 0 ∧ Fork.ι cg ≫ Cofork.π cf = 0\n⊢ kernel.ι g ≫ cokernel.π f = 0\n[PROOFSTEP]\napply zero_of_epi_comp (IsLimit.conePointUniqueUpToIso hg (limit.isLimit _)).hom\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ncg : KernelFork g\nhg : IsLimit cg\ncf : CokernelCofork f\nhf : IsColimit cf\nh : f ≫ g = 0 ∧ Fork.ι cg ≫ Cofork.π cf = 0\n⊢ (IsLimit.conePointUniqueUpToIso hg (limit.isLimit (parallelPair g 0))).hom ≫ kernel.ι g ≫ cokernel.π f = 0\n[PROOFSTEP]\napply zero_of_comp_mono (IsColimit.coconePointUniqueUpToIso (colimit.isColimit _) hf).hom\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ncg : KernelFork g\nhg : IsLimit cg\ncf : CokernelCofork f\nhf : IsColimit cf\nh : f ≫ g = 0 ∧ Fork.ι cg ≫ Cofork.π cf = 0\n⊢ ((IsLimit.conePointUniqueUpToIso hg (limit.isLimit (parallelPair g 0))).hom ≫ kernel.ι g ≫ cokernel.π f) ≫\n      (IsColimit.coconePointUniqueUpToIso (colimit.isColimit (parallelPair f 0)) hf).hom =\n    0\n[PROOFSTEP]\nsimp [h.2]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ TFAE [Exact f g, f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0, imageSubobject f = kernelSubobject g]\n[PROOFSTEP]\ntfae_have 1 ↔ 2\n[GOAL]\ncase tfae_1_iff_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact f g ↔ f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n[PROOFSTEP]\napply exact_iff\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_1_iff_2 : Exact f g ↔ f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n⊢ TFAE [Exact f g, f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0, imageSubobject f = kernelSubobject g]\n[PROOFSTEP]\ntfae_have 1 ↔ 3\n[GOAL]\ncase tfae_1_iff_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_1_iff_2 : Exact f g ↔ f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n⊢ Exact f g ↔ imageSubobject f = kernelSubobject g\n[PROOFSTEP]\napply exact_iff_image_eq_kernel\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_1_iff_2 : Exact f g ↔ f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\ntfae_1_iff_3 : Exact f g ↔ imageSubobject f = kernelSubobject g\n⊢ TFAE [Exact f g, f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0, imageSubobject f = kernelSubobject g]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nD : Type u₁\ninst✝² : Category.{v₁, u₁} D\ninst✝¹ : Abelian D\nF : C ⥤ D\ninst✝ : IsEquivalence F\n⊢ Exact (F.map f) (F.map g) ↔ Exact f g\n[PROOFSTEP]\nsimp only [exact_iff, ← F.map_eq_zero_iff, F.map_comp, Category.assoc, ← kernelComparison_comp_ι g F, ←\n  π_comp_cokernelComparison f F]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nD : Type u₁\ninst✝² : Category.{v₁, u₁} D\ninst✝¹ : Abelian D\nF : C ⥤ D\ninst✝ : IsEquivalence F\n⊢ F.map f ≫ F.map g = 0 ∧ kernel.ι (F.map g) ≫ cokernel.π (F.map f) = 0 ↔\n    F.map f ≫ F.map g = 0 ∧\n      kernelComparison g F ≫ kernel.ι (F.map g) ≫ cokernel.π (F.map f) ≫ cokernelComparison f F = 0\n[PROOFSTEP]\nrw [IsIso.comp_left_eq_zero (kernelComparison g F), ← Category.assoc,\n  IsIso.comp_right_eq_zero _ (cokernelComparison f F)]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nW : C\nh : W ⟶ X\ninst✝ : Epi h\n⊢ Exact (h ≫ f) g ↔ Exact f g\n[PROOFSTEP]\nrefine' ⟨fun hfg => _, fun h => exact_epi_comp h⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nW : C\nh : W ⟶ X\ninst✝ : Epi h\nhfg : Exact (h ≫ f) g\n⊢ Exact f g\n[PROOFSTEP]\nlet hc :=\n  isCokernelOfComp _ _ (colimit.isColimit (parallelPair (h ≫ f) 0))\n    (by rw [← cancel_epi h, ← Category.assoc, CokernelCofork.condition, comp_zero]) rfl\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nW : C\nh : W ⟶ X\ninst✝ : Epi h\nhfg : Exact (h ≫ f) g\n⊢ f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0\n[PROOFSTEP]\nrw [← cancel_epi h, ← Category.assoc, CokernelCofork.condition, comp_zero]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nW : C\nh : W ⟶ X\ninst✝ : Epi h\nhfg : Exact (h ≫ f) g\nhc : IsColimit\n  (CokernelCofork.ofπ (Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)))\n    (_ : f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0)) :=\n  isCokernelOfComp h (h ≫ f) (colimit.isColimit (parallelPair (h ≫ f) 0))\n    (_ : f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0) (_ : h ≫ f = h ≫ f)\n⊢ Exact f g\n[PROOFSTEP]\nrefine' (exact_iff' _ _ (limit.isLimit _) hc).2 ⟨_, ((exact_iff _ _).1 hfg).2⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nW : C\nh : W ⟶ X\ninst✝ : Epi h\nhfg : Exact (h ≫ f) g\nhc : IsColimit\n  (CokernelCofork.ofπ (Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)))\n    (_ : f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0)) :=\n  isCokernelOfComp h (h ≫ f) (colimit.isColimit (parallelPair (h ≫ f) 0))\n    (_ : f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0) (_ : h ≫ f = h ≫ f)\n⊢ f ≫ g = 0\n[PROOFSTEP]\nexact zero_of_epi_comp h (by rw [← hfg.1, Category.assoc])\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nW : C\nh : W ⟶ X\ninst✝ : Epi h\nhfg : Exact (h ≫ f) g\nhc : IsColimit\n  (CokernelCofork.ofπ (Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)))\n    (_ : f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0)) :=\n  isCokernelOfComp h (h ≫ f) (colimit.isColimit (parallelPair (h ≫ f) 0))\n    (_ : f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0) (_ : h ≫ f = h ≫ f)\n⊢ h ≫ f ≫ g = 0\n[PROOFSTEP]\nrw [← hfg.1, Category.assoc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ IsLimit (KernelFork.ofι (image.ι f) (_ : image.ι f ≫ g = 0))\n[PROOFSTEP]\nrw [exact_iff] at h \n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : Exact f g\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n⊢ IsLimit (KernelFork.ofι (image.ι f) (_ : image.ι f ≫ g = 0))\n[PROOFSTEP]\nexact\n  KernelFork.IsLimit.ofι _ _\n    (fun u hu ↦ kernel.lift (cokernel.π f) u (by rw [← kernel.lift_ι g u hu, Category.assoc, h.2, comp_zero]))\n    (by aesop_cat) (fun _ _ _ hm => by rw [← cancel_mono (image.ι f), hm, kernel.lift_ι])\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : Exact f g\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nW'✝ : C\nu : W'✝ ⟶ Y\nhu : u ≫ g = 0\n⊢ u ≫ cokernel.π f = 0\n[PROOFSTEP]\nrw [← kernel.lift_ι g u hu, Category.assoc, h.2, comp_zero]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : Exact f g\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n⊢ ∀ {W' : C} (g' : W' ⟶ Y) (eq' : g' ≫ g = 0),\n    (fun {W'} u hu => kernel.lift (cokernel.π f) u (_ : u ≫ cokernel.π f = 0)) g' eq' ≫ image.ι f = g'\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : Exact f g\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nW'✝ : C\nx✝² : W'✝ ⟶ Y\nx✝¹ : x✝² ≫ g = 0\nx✝ : W'✝ ⟶ Abelian.image f\nhm : x✝ ≫ image.ι f = x✝²\n⊢ x✝ = (fun {W'} u hu => kernel.lift (cokernel.π f) u (_ : u ≫ cokernel.π f = 0)) x✝² x✝¹\n[PROOFSTEP]\nrw [← cancel_mono (image.ι f), hm, kernel.lift_ι]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ IsColimit (CokernelCofork.ofπ (coimage.π g) (_ : f ≫ coimage.π g = 0))\n[PROOFSTEP]\nrw [exact_iff] at h \n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : Exact f g\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n⊢ IsColimit (CokernelCofork.ofπ (coimage.π g) (_ : f ≫ coimage.π g = 0))\n[PROOFSTEP]\nrefine'\n  CokernelCofork.IsColimit.ofπ _ _\n    (fun u hu => cokernel.desc (kernel.ι g) u (by rw [← cokernel.π_desc f u hu, ← Category.assoc, h.2, zero_comp]))\n    (by aesop_cat) _\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : Exact f g\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nZ'✝ : C\nu : Y ⟶ Z'✝\nhu : f ≫ u = 0\n⊢ kernel.ι g ≫ u = 0\n[PROOFSTEP]\nrw [← cokernel.π_desc f u hu, ← Category.assoc, h.2, zero_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : Exact f g\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n⊢ ∀ {Z' : C} (g' : Y ⟶ Z') (eq' : f ≫ g' = 0),\n    coimage.π g ≫ (fun {Z'} u hu => cokernel.desc (kernel.ι g) u (_ : kernel.ι g ≫ u = 0)) g' eq' = g'\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : Exact f g\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\n⊢ ∀ {Z' : C} (g' : Y ⟶ Z') (eq' : f ≫ g' = 0) (m : Abelian.coimage g ⟶ Z'),\n    coimage.π g ≫ m = g' → m = (fun {Z'} u hu => cokernel.desc (kernel.ι g) u (_ : kernel.ι g ≫ u = 0)) g' eq'\n[PROOFSTEP]\nintros _ _ _ _ hm\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : Exact f g\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nZ'✝ : C\ng'✝ : Y ⟶ Z'✝\neq'✝ : f ≫ g'✝ = 0\nm✝ : Abelian.coimage g ⟶ Z'✝\nhm : coimage.π g ≫ m✝ = g'✝\n⊢ m✝ = (fun {Z'} u hu => cokernel.desc (kernel.ι g) u (_ : kernel.ι g ≫ u = 0)) g'✝ eq'✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh✝ : Exact f g\nh : f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0\nZ'✝ : C\ng'✝ : Y ⟶ Z'✝\neq'✝ : f ≫ g'✝ = 0\nm✝ : Abelian.coimage g ⟶ Z'✝\nhm : coimage.π g ≫ m✝ = g'✝\n⊢ coequalizer.π (kernel.ι g) 0 ≫ m✝ =\n    coequalizer.π (kernel.ι g) 0 ≫ (fun {Z'} u hu => cokernel.desc (kernel.ι g) u (_ : kernel.ι g ≫ u = 0)) g'✝ eq'✝\n[PROOFSTEP]\nrw [hm, cokernel.π_desc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ (Cofork.π (CokernelCofork.ofπ (coimage.π g) (_ : f ≫ coimage.π g = 0)) ≫ (coimageIsoImage' g).hom) ≫\n      Limits.image.ι g =\n    factorThruImage g ≫ Limits.image.ι g\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact f (cokernel.π f)\n[PROOFSTEP]\nrw [exact_iff]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ f ≫ cokernel.π f = 0 ∧ kernel.ι (cokernel.π f) ≫ cokernel.π f = 0\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ cokernel.π f ≫ cokernel.desc f g (_ : f ≫ g = 0) =\n    cokernel.π f ≫\n      (IsColimit.coconePointUniqueUpToIso (colimit.isColimit (parallelPair f 0)) (isColimitImage f g h)).hom ≫\n        Limits.image.ι g\n[PROOFSTEP]\nsimp\n  -- porting note: this can no longer be an instance in Lean4\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Epi g\nex : Exact f g\n⊢ let_fun this := (_ : IsIso (cokernel.desc f g (_ : f ≫ g = 0)));\n  g ≫ CategoryTheory.inv (cokernel.desc f g (_ : f ≫ g = 0)) = cokernel.π f\n[PROOFSTEP]\nhave := isIso_cokernel_desc_of_exact_of_epi _ _ ex\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Epi g\nex : Exact f g\nthis : IsIso (cokernel.desc f g (_ : f ≫ g = 0))\n⊢ let_fun this := (_ : IsIso (cokernel.desc f g (_ : f ≫ g = 0)));\n  g ≫ CategoryTheory.inv (cokernel.desc f g (_ : f ≫ g = 0)) = cokernel.π f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Mono f\nex : Exact f g\n⊢ let_fun this := (_ : IsIso (kernel.lift g f (_ : f ≫ g = 0)));\n  CategoryTheory.inv (kernel.lift g f (_ : f ≫ g = 0)) ≫ f = kernel.ι g\n[PROOFSTEP]\nhave := isIso_kernel_lift_of_exact_of_mono _ _ ex\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Mono f\nex : Exact f g\nthis : IsIso (kernel.lift g f (_ : f ≫ g = 0))\n⊢ let_fun this := (_ : IsIso (kernel.lift g f (_ : f ≫ g = 0)));\n  CategoryTheory.inv (kernel.lift g f (_ : f ≫ g = 0)) ≫ f = kernel.ι g\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Epi g\nh : Exact f g\n⊢ cokernel.π f ≫ cokernel.desc f g (_ : f ≫ g = 0) ≫ epiDesc g (cokernel.π f) (_ : kernel.ι g ≫ cokernel.π f = 0) =\n    cokernel.π f ≫ 𝟙 (colimit.cocone (parallelPair f 0)).pt\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Epi g\nh : Exact f g\n⊢ g ≫ epiDesc g (cokernel.π f) (_ : kernel.ι g ≫ cokernel.π f = 0) ≫ cokernel.desc f g (_ : f ≫ g = 0) =\n    g ≫ 𝟙 (CokernelCofork.ofπ g (_ : f ≫ g = 0)).pt\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Epi g\nh : Exact f g\n⊢ ∀ (j : WalkingParallelPair),\n    NatTrans.app (colimit.cocone (parallelPair f 0)).ι j ≫\n        (Iso.mk (cokernel.desc f g (_ : f ≫ g = 0))\n            (epiDesc g (cokernel.π f) (_ : kernel.ι g ≫ cokernel.π f = 0))).hom =\n      NatTrans.app (CokernelCofork.ofπ g (_ : f ≫ g = 0)).ι j\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase zero\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Epi g\nh : Exact f g\n⊢ NatTrans.app (colimit.cocone (parallelPair f 0)).ι WalkingParallelPair.zero ≫\n      (Iso.mk (cokernel.desc f g (_ : f ≫ g = 0)) (epiDesc g (cokernel.π f) (_ : kernel.ι g ≫ cokernel.π f = 0))).hom =\n    NatTrans.app (CokernelCofork.ofπ g (_ : f ≫ g = 0)).ι WalkingParallelPair.zero\n[PROOFSTEP]\nsimp [h.w]\n[GOAL]\ncase one\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Epi g\nh : Exact f g\n⊢ NatTrans.app (colimit.cocone (parallelPair f 0)).ι WalkingParallelPair.one ≫\n      (Iso.mk (cokernel.desc f g (_ : f ≫ g = 0)) (epiDesc g (cokernel.π f) (_ : kernel.ι g ≫ cokernel.π f = 0))).hom =\n    NatTrans.app (CokernelCofork.ofπ g (_ : f ≫ g = 0)).ι WalkingParallelPair.one\n[PROOFSTEP]\nsimp [h.w]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Mono f\nh : Exact f g\n⊢ (monoLift f (kernel.ι g) (_ : kernel.ι g ≫ cokernel.π f = 0) ≫ kernel.lift g f (_ : f ≫ g = 0)) ≫ kernel.ι g =\n    𝟙 (limit.cone (parallelPair g 0)).pt ≫ kernel.ι g\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Mono f\nh : Exact f g\n⊢ (kernel.lift g f (_ : f ≫ g = 0) ≫ monoLift f (kernel.ι g) (_ : kernel.ι g ≫ cokernel.π f = 0)) ≫ f =\n    𝟙 (KernelFork.ofι f (_ : f ≫ g = 0)).pt ≫ f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Mono f\nh : Exact f g\nj : WalkingParallelPair\n⊢ NatTrans.app (limit.cone (parallelPair g 0)).π j =\n    (Iso.mk (monoLift f (kernel.ι g) (_ : kernel.ι g ≫ cokernel.π f = 0)) (kernel.lift g f (_ : f ≫ g = 0))).hom ≫\n      NatTrans.app (KernelFork.ofι f (_ : f ≫ g = 0)).π j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase zero\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Mono f\nh : Exact f g\n⊢ NatTrans.app (limit.cone (parallelPair g 0)).π WalkingParallelPair.zero =\n    (Iso.mk (monoLift f (kernel.ι g) (_ : kernel.ι g ≫ cokernel.π f = 0)) (kernel.lift g f (_ : f ≫ g = 0))).hom ≫\n      NatTrans.app (KernelFork.ofι f (_ : f ≫ g = 0)).π WalkingParallelPair.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase one\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Mono f\nh : Exact f g\n⊢ NatTrans.app (limit.cone (parallelPair g 0)).π WalkingParallelPair.one =\n    (Iso.mk (monoLift f (kernel.ι g) (_ : kernel.ι g ≫ cokernel.π f = 0)) (kernel.lift g f (_ : f ≫ g = 0))).hom ≫\n      NatTrans.app (KernelFork.ofι f (_ : f ≫ g = 0)).π WalkingParallelPair.one\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nh : IsColimit (CokernelCofork.ofπ g w)\n⊢ Exact f g\n[PROOFSTEP]\nrefine' (exact_iff _ _).2 ⟨w, _⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nh : IsColimit (CokernelCofork.ofπ g w)\n⊢ kernel.ι g ≫ cokernel.π f = 0\n[PROOFSTEP]\nhave := h.fac (CokernelCofork.ofπ _ (cokernel.condition f)) WalkingParallelPair.one\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nh : IsColimit (CokernelCofork.ofπ g w)\nthis :\n  NatTrans.app (CokernelCofork.ofπ g w).ι WalkingParallelPair.one ≫\n      IsColimit.desc h (CokernelCofork.ofπ (cokernel.π f) (_ : f ≫ cokernel.π f = 0)) =\n    NatTrans.app (CokernelCofork.ofπ (cokernel.π f) (_ : f ≫ cokernel.π f = 0)).ι WalkingParallelPair.one\n⊢ kernel.ι g ≫ cokernel.π f = 0\n[PROOFSTEP]\nsimp only [Cofork.ofπ_ι_app] at this \n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nh : IsColimit (CokernelCofork.ofπ g w)\nthis : g ≫ IsColimit.desc h (CokernelCofork.ofπ (cokernel.π f) (_ : f ≫ cokernel.π f = 0)) = cokernel.π f\n⊢ kernel.ι g ≫ cokernel.π f = 0\n[PROOFSTEP]\nrw [← this, ← Category.assoc, kernel.condition, zero_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nh : IsLimit (KernelFork.ofι f w)\n⊢ Exact f g\n[PROOFSTEP]\nrefine' (exact_iff _ _).2 ⟨w, _⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nh : IsLimit (KernelFork.ofι f w)\n⊢ kernel.ι g ≫ cokernel.π f = 0\n[PROOFSTEP]\nhave := h.fac (KernelFork.ofι _ (kernel.condition g)) WalkingParallelPair.zero\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nh : IsLimit (KernelFork.ofι f w)\nthis :\n  IsLimit.lift h (KernelFork.ofι (kernel.ι g) (_ : kernel.ι g ≫ g = 0)) ≫\n      NatTrans.app (KernelFork.ofι f w).π WalkingParallelPair.zero =\n    NatTrans.app (KernelFork.ofι (kernel.ι g) (_ : kernel.ι g ≫ g = 0)).π WalkingParallelPair.zero\n⊢ kernel.ι g ≫ cokernel.π f = 0\n[PROOFSTEP]\nsimp only [Fork.ofι_π_app] at this \n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nh : IsLimit (KernelFork.ofι f w)\nthis : IsLimit.lift h (KernelFork.ofι (kernel.ι g) (_ : kernel.ι g ≫ g = 0)) ≫ f = kernel.ι g\n⊢ kernel.ι g ≫ cokernel.π f = 0\n[PROOFSTEP]\nrw [← this, Category.assoc, cokernel.condition, comp_zero]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact f g ↔ Exact (image.ι f) g\n[PROOFSTEP]\nconv_lhs => rw [← Abelian.image.fac f]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n| Exact f g\n[PROOFSTEP]\nrw [← Abelian.image.fac f]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n| Exact f g\n[PROOFSTEP]\nrw [← Abelian.image.fac f]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n| Exact f g\n[PROOFSTEP]\nrw [← Abelian.image.fac f]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact (Abelian.factorThruImage f ≫ image.ι f) g ↔ Exact (image.ι f) g\n[PROOFSTEP]\nrw [exact_epi_comp_iff]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact f g ↔ Exact f (coimage.π g)\n[PROOFSTEP]\nconv_lhs => rw [← Abelian.coimage.fac g]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n| Exact f g\n[PROOFSTEP]\nrw [← Abelian.coimage.fac g]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n| Exact f g\n[PROOFSTEP]\nrw [← Abelian.coimage.fac g]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n| Exact f g\n[PROOFSTEP]\nrw [← Abelian.coimage.fac g]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact f (coimage.π g ≫ Abelian.factorThruCoimage g) ↔ Exact f (coimage.π g)\n[PROOFSTEP]\nrw [exact_comp_mono_iff]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ TFAE [Mono f, kernel.ι f = 0, Exact 0 f]\n[PROOFSTEP]\ntfae_have 3 → 2\n[GOAL]\ncase tfae_3_to_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact 0 f → kernel.ι f = 0\n[PROOFSTEP]\nexact kernel_ι_eq_zero_of_exact_zero_left Z\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact 0 f → kernel.ι f = 0\n⊢ TFAE [Mono f, kernel.ι f = 0, Exact 0 f]\n[PROOFSTEP]\ntfae_have 1 → 3\n[GOAL]\ncase tfae_1_to_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact 0 f → kernel.ι f = 0\n⊢ Mono f → Exact 0 f\n[PROOFSTEP]\nintros\n[GOAL]\ncase tfae_1_to_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact 0 f → kernel.ι f = 0\n✝ : Mono f\n⊢ Exact 0 f\n[PROOFSTEP]\nexact exact_zero_left_of_mono Z\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact 0 f → kernel.ι f = 0\ntfae_1_to_3 : Mono f → Exact 0 f\n⊢ TFAE [Mono f, kernel.ι f = 0, Exact 0 f]\n[PROOFSTEP]\ntfae_have 2 → 1\n[GOAL]\ncase tfae_2_to_1\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact 0 f → kernel.ι f = 0\ntfae_1_to_3 : Mono f → Exact 0 f\n⊢ kernel.ι f = 0 → Mono f\n[PROOFSTEP]\nexact mono_of_kernel_ι_eq_zero _\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact 0 f → kernel.ι f = 0\ntfae_1_to_3 : Mono f → Exact 0 f\ntfae_2_to_1 : kernel.ι f = 0 → Mono f\n⊢ TFAE [Mono f, kernel.ι f = 0, Exact 0 f]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ TFAE [Epi f, cokernel.π f = 0, Exact f 0]\n[PROOFSTEP]\ntfae_have 3 → 2\n[GOAL]\ncase tfae_3_to_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact f 0 → cokernel.π f = 0\n[PROOFSTEP]\nrw [exact_iff]\n[GOAL]\ncase tfae_3_to_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ f ≫ 0 = 0 ∧ kernel.ι 0 ≫ cokernel.π f = 0 → cokernel.π f = 0\n[PROOFSTEP]\nrintro ⟨-, h⟩\n[GOAL]\ncase tfae_3_to_2.intro\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : kernel.ι 0 ≫ cokernel.π f = 0\n⊢ cokernel.π f = 0\n[PROOFSTEP]\nexact zero_of_epi_comp _ h\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact f 0 → cokernel.π f = 0\n⊢ TFAE [Epi f, cokernel.π f = 0, Exact f 0]\n[PROOFSTEP]\ntfae_have 1 → 3\n[GOAL]\ncase tfae_1_to_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact f 0 → cokernel.π f = 0\n⊢ Epi f → Exact f 0\n[PROOFSTEP]\nrw [exact_iff]\n[GOAL]\ncase tfae_1_to_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact f 0 → cokernel.π f = 0\n⊢ Epi f → f ≫ 0 = 0 ∧ kernel.ι 0 ≫ cokernel.π f = 0\n[PROOFSTEP]\nintro\n[GOAL]\ncase tfae_1_to_3\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact f 0 → cokernel.π f = 0\n✝ : Epi f\n⊢ f ≫ 0 = 0 ∧ kernel.ι 0 ≫ cokernel.π f = 0\n[PROOFSTEP]\nexact ⟨by simp, by simp [cokernel.π_of_epi]⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact f 0 → cokernel.π f = 0\n✝ : Epi f\n⊢ f ≫ 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact f 0 → cokernel.π f = 0\n✝ : Epi f\n⊢ kernel.ι 0 ≫ cokernel.π f = 0\n[PROOFSTEP]\nsimp [cokernel.π_of_epi]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact f 0 → cokernel.π f = 0\ntfae_1_to_3 : Epi f → Exact f 0\n⊢ TFAE [Epi f, cokernel.π f = 0, Exact f 0]\n[PROOFSTEP]\ntfae_have 2 → 1\n[GOAL]\ncase tfae_2_to_1\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact f 0 → cokernel.π f = 0\ntfae_1_to_3 : Epi f → Exact f 0\n⊢ cokernel.π f = 0 → Epi f\n[PROOFSTEP]\nexact epi_of_cokernel_π_eq_zero _\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ntfae_3_to_2 : Exact f 0 → cokernel.π f = 0\ntfae_1_to_3 : Epi f → Exact f 0\ntfae_2_to_1 : cokernel.π f = 0 → Epi f\n⊢ TFAE [Epi f, cokernel.π f = 0, Exact f 0]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ Exact g.op f.op\n[PROOFSTEP]\nrw [exact_iff]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ g.op ≫ f.op = 0 ∧ kernel.ι f.op ≫ cokernel.π g.op = 0\n[PROOFSTEP]\nrefine' ⟨by simp [← op_comp, h.w], Quiver.Hom.unop_inj _⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ g.op ≫ f.op = 0\n[PROOFSTEP]\nsimp [← op_comp, h.w]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ (kernel.ι f.op ≫ cokernel.π g.op).unop = 0.unop\n[PROOFSTEP]\nsimp only [unop_comp, cokernel.π_op, eqToHom_refl, kernel.ι_op, Category.id_comp, Category.assoc,\n  kernel_comp_cokernel_assoc _ _ h, zero_comp, comp_zero, unop_zero]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ne : Exact g.op f.op\n⊢ Exact f g\n[PROOFSTEP]\nrw [← IsEquivalence.exact_iff _ _ (opOpEquivalence C).inverse]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ne : Exact g.op f.op\n⊢ Exact ((opOpEquivalence C).inverse.map f) ((opOpEquivalence C).inverse.map g)\n[PROOFSTEP]\nexact Exact.op _ _ e\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nX Y Z : Cᵒᵖ\ng : X ⟶ Y\nf : Y ⟶ Z\nh : Exact g f\n⊢ Exact f.unop g.unop\n[PROOFSTEP]\nrw [← f.op_unop, ← g.op_unop] at h \n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nX Y Z : Cᵒᵖ\ng : X ⟶ Y\nf : Y ⟶ Z\nh : Exact g.unop.op f.unop.op\n⊢ Exact f.unop g.unop\n[PROOFSTEP]\nrwa [← Exact.op_iff]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nX Y Z : Cᵒᵖ\ng : X ⟶ Y\nf : Y ⟶ Z\ne : Exact f.unop g.unop\n⊢ Exact g f\n[PROOFSTEP]\nrwa [← f.op_unop, ← g.op_unop, ← Exact.op_iff] at e \n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nX Y Z : Cᵒᵖ\ng : X ⟶ Y\nf : Y ⟶ Z\ne : Exact g f\n⊢ Exact f.unop g.unop\n[PROOFSTEP]\nrw [← Exact.op_iff]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : Abelian C\nX✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nX Y Z : Cᵒᵖ\ng : X ⟶ Y\nf : Y ⟶ Z\ne : Exact g f\n⊢ Exact g.unop.op f.unop.op\n[PROOFSTEP]\nexact e\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\ninst✝ : Faithful F\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhfg : Exact (F.map f) (F.map g)\n⊢ Exact f g\n[PROOFSTEP]\nrw [Abelian.exact_iff, ← F.map_comp, F.map_eq_zero_iff] at hfg \n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\ninst✝ : Faithful F\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhfg : f ≫ g = 0 ∧ kernel.ι (F.map g) ≫ cokernel.π (F.map f) = 0\n⊢ Exact f g\n[PROOFSTEP]\nrefine' (Abelian.exact_iff _ _).2 ⟨hfg.1, F.zero_of_map_zero _ _⟩\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\ninst✝ : Faithful F\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhfg : f ≫ g = 0 ∧ kernel.ι (F.map g) ≫ cokernel.π (F.map f) = 0\n⊢ F.map (kernel.ι g ≫ cokernel.π f) = 0\n[PROOFSTEP]\nobtain ⟨k, hk⟩ :=\n  kernel.lift' (F.map g) (F.map (kernel.ι g))\n    (by simp only [← F.map_comp, kernel.condition, CategoryTheory.Functor.map_zero])\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\ninst✝ : Faithful F\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhfg : f ≫ g = 0 ∧ kernel.ι (F.map g) ≫ cokernel.π (F.map f) = 0\n⊢ F.map (kernel.ι g) ≫ F.map g = 0\n[PROOFSTEP]\nsimp only [← F.map_comp, kernel.condition, CategoryTheory.Functor.map_zero]\n[GOAL]\ncase mk\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\ninst✝ : Faithful F\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhfg : f ≫ g = 0 ∧ kernel.ι (F.map g) ≫ cokernel.π (F.map f) = 0\nk : F.obj (kernel g) ⟶ kernel (F.map g)\nhk : k ≫ kernel.ι (F.map g) = F.map (kernel.ι g)\n⊢ F.map (kernel.ι g ≫ cokernel.π f) = 0\n[PROOFSTEP]\nobtain ⟨l, hl⟩ :=\n  cokernel.desc' (F.map f) (F.map (cokernel.π f))\n    (by simp only [← F.map_comp, cokernel.condition, CategoryTheory.Functor.map_zero])\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\ninst✝ : Faithful F\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhfg : f ≫ g = 0 ∧ kernel.ι (F.map g) ≫ cokernel.π (F.map f) = 0\nk : F.obj (kernel g) ⟶ kernel (F.map g)\nhk : k ≫ kernel.ι (F.map g) = F.map (kernel.ι g)\n⊢ F.map f ≫ F.map (cokernel.π f) = 0\n[PROOFSTEP]\nsimp only [← F.map_comp, cokernel.condition, CategoryTheory.Functor.map_zero]\n[GOAL]\ncase mk.mk\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\ninst✝ : Faithful F\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nhfg : f ≫ g = 0 ∧ kernel.ι (F.map g) ≫ cokernel.π (F.map f) = 0\nk : F.obj (kernel g) ⟶ kernel (F.map g)\nhk : k ≫ kernel.ι (F.map g) = F.map (kernel.ι g)\nl : cokernel (F.map f) ⟶ F.obj (cokernel f)\nhl : cokernel.π (F.map f) ≫ l = F.map (cokernel.π f)\n⊢ F.map (kernel.ι g ≫ cokernel.π f) = 0\n[PROOFSTEP]\nrw [F.map_comp, ← hk, ← hl, Category.assoc, reassoc_of% hfg.2, zero_comp, comp_zero]\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Abelian A\ninst✝² : Abelian B\nL : A ⥤ B\ninst✝¹ : PreservesFiniteLimits L\ninst✝ : PreservesFiniteColimits L\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\ne1 : Exact f g\n⊢ Exact (L.map f) (L.map g)\n[PROOFSTEP]\nlet hcoker := isColimitOfHasCokernelOfPreservesColimit L f\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Abelian A\ninst✝² : Abelian B\nL : A ⥤ B\ninst✝¹ : PreservesFiniteLimits L\ninst✝ : PreservesFiniteColimits L\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\ne1 : Exact f g\nhcoker : IsColimit\n  (Cofork.ofπ (L.map (cokernel.π f)) (_ : L.map f ≫ L.map (cokernel.π f) = 0 ≫ L.map (cokernel.π f))) :=\n  isColimitOfHasCokernelOfPreservesColimit L f\n⊢ Exact (L.map f) (L.map g)\n[PROOFSTEP]\nlet hker := isLimitOfHasKernelOfPreservesLimit L g\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Abelian A\ninst✝² : Abelian B\nL : A ⥤ B\ninst✝¹ : PreservesFiniteLimits L\ninst✝ : PreservesFiniteColimits L\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\ne1 : Exact f g\nhcoker : IsColimit\n  (Cofork.ofπ (L.map (cokernel.π f)) (_ : L.map f ≫ L.map (cokernel.π f) = 0 ≫ L.map (cokernel.π f))) :=\n  isColimitOfHasCokernelOfPreservesColimit L f\nhker : IsLimit (Fork.ofι (L.map (kernel.ι g)) (_ : L.map (kernel.ι g) ≫ L.map g = L.map (kernel.ι g) ≫ 0)) :=\n  isLimitOfHasKernelOfPreservesLimit L g\n⊢ Exact (L.map f) (L.map g)\n[PROOFSTEP]\nrefine' (exact_iff' _ _ hker hcoker).2 ⟨by simp [← L.map_comp, e1.1], _⟩\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Abelian A\ninst✝² : Abelian B\nL : A ⥤ B\ninst✝¹ : PreservesFiniteLimits L\ninst✝ : PreservesFiniteColimits L\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\ne1 : Exact f g\nhcoker : IsColimit\n  (Cofork.ofπ (L.map (cokernel.π f)) (_ : L.map f ≫ L.map (cokernel.π f) = 0 ≫ L.map (cokernel.π f))) :=\n  isColimitOfHasCokernelOfPreservesColimit L f\nhker : IsLimit (Fork.ofι (L.map (kernel.ι g)) (_ : L.map (kernel.ι g) ≫ L.map g = L.map (kernel.ι g) ≫ 0)) :=\n  isLimitOfHasKernelOfPreservesLimit L g\n⊢ L.map f ≫ L.map g = 0\n[PROOFSTEP]\nsimp [← L.map_comp, e1.1]\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁵ : Category.{v₁, u₁} A\ninst✝⁴ : Category.{v₂, u₂} B\ninst✝³ : Abelian A\ninst✝² : Abelian B\nL : A ⥤ B\ninst✝¹ : PreservesFiniteLimits L\ninst✝ : PreservesFiniteColimits L\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\ne1 : Exact f g\nhcoker : IsColimit\n  (Cofork.ofπ (L.map (cokernel.π f)) (_ : L.map f ≫ L.map (cokernel.π f) = 0 ≫ L.map (cokernel.π f))) :=\n  isColimitOfHasCokernelOfPreservesColimit L f\nhker : IsLimit (Fork.ofι (L.map (kernel.ι g)) (_ : L.map (kernel.ι g) ≫ L.map g = L.map (kernel.ι g) ≫ 0)) :=\n  isLimitOfHasKernelOfPreservesLimit L g\n⊢ Fork.ι (Fork.ofι (L.map (kernel.ι g)) (_ : L.map (kernel.ι g) ≫ L.map g = L.map (kernel.ι g) ≫ 0)) ≫\n      Cofork.π (Cofork.ofπ (L.map (cokernel.π f)) (_ : L.map f ≫ L.map (cokernel.π f) = 0 ≫ L.map (cokernel.π f))) =\n    0\n[PROOFSTEP]\nsimp only [Fork.ι_ofι, Cofork.π_ofπ, ← L.map_comp, kernel_comp_cokernel _ _ e1, L.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\n⊢ PreservesZeroMorphisms L\n[PROOFSTEP]\nreplace h := (h (exact_of_zero (𝟙 0) (𝟙 0))).w\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : L.map (𝟙 0) ≫ L.map (𝟙 0) = 0\n⊢ PreservesZeroMorphisms L\n[PROOFSTEP]\nrw [L.map_id, Category.comp_id] at h \n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : 𝟙 (L.obj 0) = 0\n⊢ PreservesZeroMorphisms L\n[PROOFSTEP]\nexact preservesZeroMorphisms_of_map_zero_object (idZeroEquivIsoZero _ h)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX✝ Y✝ : A\nf : X✝ ⟶ Y✝\nhf : Mono f\n⊢ Mono (L.map f)\n[PROOFSTEP]\nletI := preservesZeroMorphisms_of_map_exact L h\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX✝ Y✝ : A\nf : X✝ ⟶ Y✝\nhf : Mono f\nthis : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\n⊢ Mono (L.map f)\n[PROOFSTEP]\napply ((tfae_mono (L.obj 0) (L.map f)).out 2 0).mp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX✝ Y✝ : A\nf : X✝ ⟶ Y✝\nhf : Mono f\nthis : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\n⊢ Exact 0 (L.map f)\n[PROOFSTEP]\nrw [← L.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX✝ Y✝ : A\nf : X✝ ⟶ Y✝\nhf : Mono f\nthis : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\n⊢ Exact (L.map 0) (L.map f)\n[PROOFSTEP]\nexact h (((tfae_mono 0 f).out 0 2).mp hf)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX✝ Y✝ : A\nf : X✝ ⟶ Y✝\nhf : Epi f\n⊢ Epi (L.map f)\n[PROOFSTEP]\nletI := preservesZeroMorphisms_of_map_exact L h\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX✝ Y✝ : A\nf : X✝ ⟶ Y✝\nhf : Epi f\nthis : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\n⊢ Epi (L.map f)\n[PROOFSTEP]\napply ((tfae_epi (L.obj 0) (L.map f)).out 2 0).mp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX✝ Y✝ : A\nf : X✝ ⟶ Y✝\nhf : Epi f\nthis : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\n⊢ Exact (L.map f) 0\n[PROOFSTEP]\nrw [← L.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX✝ Y✝ : A\nf : X✝ ⟶ Y✝\nhf : Epi f\nthis : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\n⊢ Exact (L.map f) (L.map 0)\n[PROOFSTEP]\nexact h (((tfae_epi 0 f).out 0 2).mp hf)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX Y : A\nf : X ⟶ Y\nc : Cone (parallelPair f 0)\nic : IsLimit c\n⊢ IsLimit (L.mapCone c)\n[PROOFSTEP]\nletI := preservesZeroMorphisms_of_map_exact L h\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX Y : A\nf : X ⟶ Y\nc : Cone (parallelPair f 0)\nic : IsLimit c\nthis : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\n⊢ IsLimit (L.mapCone c)\n[PROOFSTEP]\nletI := preservesMonomorphisms_of_map_exact L h\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX Y : A\nf : X ⟶ Y\nc : Cone (parallelPair f 0)\nic : IsLimit c\nthis✝ : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\nthis : PreservesMonomorphisms L := preservesMonomorphisms_of_map_exact L h\n⊢ IsLimit (L.mapCone c)\n[PROOFSTEP]\nletI := mono_of_isLimit_fork ic\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX Y : A\nf : X ⟶ Y\nc : Cone (parallelPair f 0)\nic : IsLimit c\nthis✝¹ : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\nthis✝ : PreservesMonomorphisms L := preservesMonomorphisms_of_map_exact L h\nthis : Mono (Fork.ι c) := mono_of_isLimit_fork ic\n⊢ IsLimit (L.mapCone c)\n[PROOFSTEP]\nhave hf :=\n  (isLimitMapConeForkEquiv' L (KernelFork.condition c)).symm\n    (isLimitOfExactOfMono (L.map (Fork.ι c)) (L.map f)\n      (h (exact_of_is_kernel (Fork.ι c) f (KernelFork.condition c) (ic.ofIsoLimit (isoOfι _)))))\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX Y : A\nf : X ⟶ Y\nc : Cone (parallelPair f 0)\nic : IsLimit c\nthis✝¹ : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\nthis✝ : PreservesMonomorphisms L := preservesMonomorphisms_of_map_exact L h\nthis : Mono (Fork.ι c) := mono_of_isLimit_fork ic\nhf :\n  (fun x => IsLimit (L.mapCone (KernelFork.ofι (Fork.ι c) (_ : Fork.ι c ≫ f = 0))))\n    (isLimitOfExactOfMono (L.map (Fork.ι c)) (L.map f) (_ : Exact (L.map (Fork.ι c)) (L.map f)))\n⊢ IsLimit (L.mapCone c)\n[PROOFSTEP]\nexact hf.ofIsoLimit ((Cones.functoriality _ L).mapIso (isoOfι _).symm)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX Y : A\nf : X ⟶ Y\nc : Cocone (parallelPair f 0)\nic : IsColimit c\n⊢ IsColimit (L.mapCocone c)\n[PROOFSTEP]\nletI := preservesZeroMorphisms_of_map_exact L h\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX Y : A\nf : X ⟶ Y\nc : Cocone (parallelPair f 0)\nic : IsColimit c\nthis : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\n⊢ IsColimit (L.mapCocone c)\n[PROOFSTEP]\nletI := preservesEpimorphisms_of_map_exact L h\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX Y : A\nf : X ⟶ Y\nc : Cocone (parallelPair f 0)\nic : IsColimit c\nthis✝ : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\nthis : PreservesEpimorphisms L := preservesEpimorphisms_of_map_exact L h\n⊢ IsColimit (L.mapCocone c)\n[PROOFSTEP]\nletI := epi_of_isColimit_cofork ic\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX Y : A\nf : X ⟶ Y\nc : Cocone (parallelPair f 0)\nic : IsColimit c\nthis✝¹ : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\nthis✝ : PreservesEpimorphisms L := preservesEpimorphisms_of_map_exact L h\nthis : Epi (Cofork.π c) := epi_of_isColimit_cofork ic\n⊢ IsColimit (L.mapCocone c)\n[PROOFSTEP]\nhave hf :=\n  (isColimitMapCoconeCoforkEquiv' L (CokernelCofork.condition c)).symm\n    (isColimitOfExactOfEpi (L.map f) (L.map (Cofork.π c))\n      (h (exact_of_is_cokernel f (Cofork.π c) (CokernelCofork.condition c) (ic.ofIsoColimit (isoOfπ _)))))\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nX Y : A\nf : X ⟶ Y\nc : Cocone (parallelPair f 0)\nic : IsColimit c\nthis✝¹ : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\nthis✝ : PreservesEpimorphisms L := preservesEpimorphisms_of_map_exact L h\nthis : Epi (Cofork.π c) := epi_of_isColimit_cofork ic\nhf :\n  (fun x => IsColimit (L.mapCocone (CokernelCofork.ofπ (Cofork.π c) (_ : f ≫ Cofork.π c = 0))))\n    (isColimitOfExactOfEpi (L.map f) (L.map (Cofork.π c)) (_ : Exact (L.map f) (L.map (Cofork.π c))))\n⊢ IsColimit (L.mapCocone c)\n[PROOFSTEP]\nexact hf.ofIsoColimit ((Cocones.functoriality _ L).mapIso (isoOfπ _).symm)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\n⊢ PreservesFiniteLimits L\n[PROOFSTEP]\nletI := preservesZeroMorphisms_of_map_exact L h\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nthis : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\n⊢ PreservesFiniteLimits L\n[PROOFSTEP]\nletI := preservesKernelsOfMapExact L h\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nthis✝ : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\nthis : (X Y : A) → (f : X ⟶ Y) → PreservesLimit (parallelPair f 0) L := preservesKernelsOfMapExact L h\n⊢ PreservesFiniteLimits L\n[PROOFSTEP]\napply preservesFiniteLimitsOfPreservesKernels\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\n⊢ PreservesFiniteColimits L\n[PROOFSTEP]\nletI := preservesZeroMorphisms_of_map_exact L h\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nthis : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\n⊢ PreservesFiniteColimits L\n[PROOFSTEP]\nletI := preservesCokernelsOfMapExact L h\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝³ : Category.{v₁, u₁} A\ninst✝² : Category.{v₂, u₂} B\ninst✝¹ : Abelian A\ninst✝ : Abelian B\nL : A ⥤ B\nh : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\nthis✝ : PreservesZeroMorphisms L := preservesZeroMorphisms_of_map_exact L h\nthis : (X Y : A) → (f : X ⟶ Y) → PreservesColimit (parallelPair f 0) L := preservesCokernelsOfMapExact L h\n⊢ PreservesFiniteColimits L\n[PROOFSTEP]\napply preservesFiniteColimitsOfPreservesCokernels\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁶ : Category.{v₁, u₁} A\ninst✝⁵ : Category.{v₂, u₂} B\ninst✝⁴ : Abelian A\ninst✝³ : Abelian B\nL : A ⥤ B\ninst✝² : PreservesZeroMorphisms L\ninst✝¹ : PreservesMonomorphisms L\ninst✝ : {X Y : A} → (f : X ⟶ Y) → PreservesColimit (parallelPair f 0) L\n⊢ PreservesFiniteLimits L\n[PROOFSTEP]\napply preservesFiniteLimitsOfMapExact\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁶ : Category.{v₁, u₁} A\ninst✝⁵ : Category.{v₂, u₂} B\ninst✝⁴ : Abelian A\ninst✝³ : Abelian B\nL : A ⥤ B\ninst✝² : PreservesZeroMorphisms L\ninst✝¹ : PreservesMonomorphisms L\ninst✝ : {X Y : A} → (f : X ⟶ Y) → PreservesColimit (parallelPair f 0) L\n⊢ ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\n[PROOFSTEP]\nintro X Y Z f g h\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁶ : Category.{v₁, u₁} A\ninst✝⁵ : Category.{v₂, u₂} B\ninst✝⁴ : Abelian A\ninst✝³ : Abelian B\nL : A ⥤ B\ninst✝² : PreservesZeroMorphisms L\ninst✝¹ : PreservesMonomorphisms L\ninst✝ : {X Y : A} → (f : X ⟶ Y) → PreservesColimit (parallelPair f 0) L\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ Exact (L.map f) (L.map g)\n[PROOFSTEP]\nrw [← Abelian.coimage.fac g, L.map_comp, exact_comp_mono_iff]\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁶ : Category.{v₁, u₁} A\ninst✝⁵ : Category.{v₂, u₂} B\ninst✝⁴ : Abelian A\ninst✝³ : Abelian B\nL : A ⥤ B\ninst✝² : PreservesZeroMorphisms L\ninst✝¹ : PreservesMonomorphisms L\ninst✝ : {X Y : A} → (f : X ⟶ Y) → PreservesColimit (parallelPair f 0) L\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ Exact (L.map f) (L.map (coimage.π g))\n[PROOFSTEP]\nexact exact_of_is_cokernel _ _ _ (isColimitCoforkMapOfIsColimit' L _ (isColimitCoimage f g h))\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁶ : Category.{v₁, u₁} A\ninst✝⁵ : Category.{v₂, u₂} B\ninst✝⁴ : Abelian A\ninst✝³ : Abelian B\nL : A ⥤ B\ninst✝² : PreservesZeroMorphisms L\ninst✝¹ : PreservesEpimorphisms L\ninst✝ : {X Y : A} → (f : X ⟶ Y) → PreservesLimit (parallelPair f 0) L\n⊢ PreservesFiniteColimits L\n[PROOFSTEP]\napply preservesFiniteColimitsOfMapExact\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁶ : Category.{v₁, u₁} A\ninst✝⁵ : Category.{v₂, u₂} B\ninst✝⁴ : Abelian A\ninst✝³ : Abelian B\nL : A ⥤ B\ninst✝² : PreservesZeroMorphisms L\ninst✝¹ : PreservesEpimorphisms L\ninst✝ : {X Y : A} → (f : X ⟶ Y) → PreservesLimit (parallelPair f 0) L\n⊢ ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)\n[PROOFSTEP]\nintro X Y Z f g h\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁶ : Category.{v₁, u₁} A\ninst✝⁵ : Category.{v₂, u₂} B\ninst✝⁴ : Abelian A\ninst✝³ : Abelian B\nL : A ⥤ B\ninst✝² : PreservesZeroMorphisms L\ninst✝¹ : PreservesEpimorphisms L\ninst✝ : {X Y : A} → (f : X ⟶ Y) → PreservesLimit (parallelPair f 0) L\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ Exact (L.map f) (L.map g)\n[PROOFSTEP]\nrw [← Abelian.image.fac f, L.map_comp, exact_epi_comp_iff]\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : Abelian C\nA : Type u₁\nB : Type u₂\ninst✝⁶ : Category.{v₁, u₁} A\ninst✝⁵ : Category.{v₂, u₂} B\ninst✝⁴ : Abelian A\ninst✝³ : Abelian B\nL : A ⥤ B\ninst✝² : PreservesZeroMorphisms L\ninst✝¹ : PreservesEpimorphisms L\ninst✝ : {X Y : A} → (f : X ⟶ Y) → PreservesLimit (parallelPair f 0) L\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Exact f g\n⊢ Exact (L.map (Abelian.image.ι f)) (L.map g)\n[PROOFSTEP]\nexact exact_of_is_kernel _ _ _ (isLimitForkMapOfIsLimit' L _ (isLimitImage f g h))\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Abelian.Exact", "llama_tokens": 32373, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6187804478040616, "lm_q2_score": 0.6113819732941511, "lm_q1q2_score": 0.3783112112142857}}
{"text": "[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\n⊢ TypeVec.id <$$> x = x\n[PROOFSTEP]\nrw [← abs_repr x]\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\n⊢ TypeVec.id <$$> abs (repr x) = abs (repr x)\n[PROOFSTEP]\ncases' repr x with a f\n[GOAL]\ncase mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ TypeVec.id <$$> abs { fst := a, snd := f } = abs { fst := a, snd := f }\n[PROOFSTEP]\nrw [← abs_map]\n[GOAL]\ncase mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ abs (TypeVec.id <$$> { fst := a, snd := f }) = abs { fst := a, snd := f }\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα β γ : TypeVec n\nf : α ⟹ β\ng : β ⟹ γ\nx : F α\n⊢ (g ⊚ f) <$$> x = g <$$> f <$$> x\n[PROOFSTEP]\nrw [← abs_repr x]\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα β γ : TypeVec n\nf : α ⟹ β\ng : β ⟹ γ\nx : F α\n⊢ (g ⊚ f) <$$> abs (repr x) = g <$$> f <$$> abs (repr x)\n[PROOFSTEP]\ncases' repr x with a f\n[GOAL]\ncase mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα β γ : TypeVec n\nf✝ : α ⟹ β\ng : β ⟹ γ\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ (g ⊚ f✝) <$$> abs { fst := a, snd := f } = g <$$> f✝ <$$> abs { fst := a, snd := f }\n[PROOFSTEP]\nrw [← abs_map, ← abs_map, ← abs_map]\n[GOAL]\ncase mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα β γ : TypeVec n\nf✝ : α ⟹ β\ng : β ⟹ γ\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ abs ((g ⊚ f✝) <$$> { fst := a, snd := f }) = abs (g <$$> f✝ <$$> { fst := a, snd := f })\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\n⊢ LiftP p x ↔ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p (f i j)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\n⊢ LiftP p x → ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p (f i j)\n[PROOFSTEP]\nrintro ⟨y, hy⟩\n[GOAL]\ncase mp.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\ny : F fun i => Subtype p\nhy : (fun i => Subtype.val) <$$> y = x\n⊢ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p (f i j)\n[PROOFSTEP]\ncases' h : repr y with a f\n[GOAL]\ncase mp.intro.mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\ny : F fun i => Subtype p\nhy : (fun i => Subtype.val) <$$> y = x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p (f i j)\n[PROOFSTEP]\nuse a, fun i j => (f i j).val\n[GOAL]\ncase h\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\ny : F fun i => Subtype p\nhy : (fun i => Subtype.val) <$$> y = x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ x = abs { fst := a, snd := fun i j => ↑(f i j) } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p ↑(f i j)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\ny : F fun i => Subtype p\nhy : (fun i => Subtype.val) <$$> y = x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ x = abs { fst := a, snd := fun i j => ↑(f i j) }\n[PROOFSTEP]\nrw [← hy, ← abs_repr y, h, ← abs_map]\n[GOAL]\ncase h.left\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\ny : F fun i => Subtype p\nhy : (fun i => Subtype.val) <$$> y = x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ abs ((fun i => Subtype.val) <$$> { fst := a, snd := f }) = abs { fst := a, snd := fun i j => ↑(f i j) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.right\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\ny : F fun i => Subtype p\nhy : (fun i => Subtype.val) <$$> y = x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p ↑(f i j)\n[PROOFSTEP]\nintro i j\n[GOAL]\ncase h.right\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\ny : F fun i => Subtype p\nhy : (fun i => Subtype.val) <$$> y = x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => Subtype p\nh : repr y = { fst := a, snd := f }\ni : Fin2 n\nj : MvPFunctor.B (P F) a i\n⊢ p ↑(f i j)\n[PROOFSTEP]\napply (f i j).property\n[GOAL]\ncase mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\n⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p (f i j)) → LiftP p x\n[PROOFSTEP]\nrintro ⟨a, f, h₀, h₁⟩\n[GOAL]\ncase mpr.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh₀ : x = abs { fst := a, snd := f }\nh₁ : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p (f i j)\n⊢ LiftP p x\n[PROOFSTEP]\nuse abs ⟨a, fun i j => ⟨f i j, h₁ i j⟩⟩\n[GOAL]\ncase h\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh₀ : x = abs { fst := a, snd := f }\nh₁ : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p (f i j)\n⊢ (fun i => Subtype.val) <$$> abs { fst := a, snd := fun i j => { val := f i j, property := (_ : p (f i j)) } } = x\n[PROOFSTEP]\nrw [← abs_map, h₀]\n[GOAL]\ncase h\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh₀ : x = abs { fst := a, snd := f }\nh₁ : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p (f i j)\n⊢ abs ((fun i => Subtype.val) <$$> { fst := a, snd := fun i j => { val := f i j, property := (_ : p (f i j)) } }) =\n    abs { fst := a, snd := f }\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\n⊢ LiftR (fun {i} => r) x y ↔\n    ∃ a f₀ f₁,\n      x = abs { fst := a, snd := f₀ } ∧\n        y = abs { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\n⊢ LiftR (fun {i} => r) x y →\n    ∃ a f₀ f₁,\n      x = abs { fst := a, snd := f₀ } ∧\n        y = abs { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)\n[PROOFSTEP]\nrintro ⟨u, xeq, yeq⟩\n[GOAL]\ncase mp.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\nu : F fun i => { p // (fun {i} => r) p.fst p.snd }\nxeq : (fun i t => (↑t).fst) <$$> u = x\nyeq : (fun i t => (↑t).snd) <$$> u = y\n⊢ ∃ a f₀ f₁,\n    x = abs { fst := a, snd := f₀ } ∧\n      y = abs { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)\n[PROOFSTEP]\ncases' h : repr u with a f\n[GOAL]\ncase mp.intro.intro.mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\nu : F fun i => { p // (fun {i} => r) p.fst p.snd }\nxeq : (fun i t => (↑t).fst) <$$> u = x\nyeq : (fun i t => (↑t).snd) <$$> u = y\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ ∃ a f₀ f₁,\n    x = abs { fst := a, snd := f₀ } ∧\n      y = abs { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)\n[PROOFSTEP]\nuse a, fun i j => (f i j).val.fst, fun i j => (f i j).val.snd\n[GOAL]\ncase h\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\nu : F fun i => { p // (fun {i} => r) p.fst p.snd }\nxeq : (fun i t => (↑t).fst) <$$> u = x\nyeq : (fun i t => (↑t).snd) <$$> u = y\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ x = abs { fst := a, snd := fun i j => (↑(f i j)).fst } ∧\n    y = abs { fst := a, snd := fun i j => (↑(f i j)).snd } ∧\n      ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (↑(f i j)).fst (↑(f i j)).snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\nu : F fun i => { p // (fun {i} => r) p.fst p.snd }\nxeq : (fun i t => (↑t).fst) <$$> u = x\nyeq : (fun i t => (↑t).snd) <$$> u = y\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ x = abs { fst := a, snd := fun i j => (↑(f i j)).fst }\n[PROOFSTEP]\nrw [← xeq, ← abs_repr u, h, ← abs_map]\n[GOAL]\ncase h.left\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\nu : F fun i => { p // (fun {i} => r) p.fst p.snd }\nxeq : (fun i t => (↑t).fst) <$$> u = x\nyeq : (fun i t => (↑t).snd) <$$> u = y\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ abs ((fun i t => (↑t).fst) <$$> { fst := a, snd := f }) = abs { fst := a, snd := fun i j => (↑(f i j)).fst }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.right\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\nu : F fun i => { p // (fun {i} => r) p.fst p.snd }\nxeq : (fun i t => (↑t).fst) <$$> u = x\nyeq : (fun i t => (↑t).snd) <$$> u = y\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ y = abs { fst := a, snd := fun i j => (↑(f i j)).snd } ∧\n    ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (↑(f i j)).fst (↑(f i j)).snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.right.left\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\nu : F fun i => { p // (fun {i} => r) p.fst p.snd }\nxeq : (fun i t => (↑t).fst) <$$> u = x\nyeq : (fun i t => (↑t).snd) <$$> u = y\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ y = abs { fst := a, snd := fun i j => (↑(f i j)).snd }\n[PROOFSTEP]\nrw [← yeq, ← abs_repr u, h, ← abs_map]\n[GOAL]\ncase h.right.left\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\nu : F fun i => { p // (fun {i} => r) p.fst p.snd }\nxeq : (fun i t => (↑t).fst) <$$> u = x\nyeq : (fun i t => (↑t).snd) <$$> u = y\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ abs ((fun i t => (↑t).snd) <$$> { fst := a, snd := f }) = abs { fst := a, snd := fun i j => (↑(f i j)).snd }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.right.right\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\nu : F fun i => { p // (fun {i} => r) p.fst p.snd }\nxeq : (fun i t => (↑t).fst) <$$> u = x\nyeq : (fun i t => (↑t).snd) <$$> u = y\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (↑(f i j)).fst (↑(f i j)).snd\n[PROOFSTEP]\nintro i j\n[GOAL]\ncase h.right.right\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\nu : F fun i => { p // (fun {i} => r) p.fst p.snd }\nxeq : (fun i t => (↑t).fst) <$$> u = x\nyeq : (fun i t => (↑t).snd) <$$> u = y\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => { p // (fun {i} => r) p.fst p.snd }\nh : repr u = { fst := a, snd := f }\ni : Fin2 n\nj : MvPFunctor.B (P F) a i\n⊢ r (↑(f i j)).fst (↑(f i j)).snd\n[PROOFSTEP]\nexact (f i j).property\n[GOAL]\ncase mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\n⊢ (∃ a f₀ f₁,\n      x = abs { fst := a, snd := f₀ } ∧\n        y = abs { fst := a, snd := f₁ } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)) →\n    LiftR (fun {i} => r) x y\n[PROOFSTEP]\nrintro ⟨a, f₀, f₁, xeq, yeq, h⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : MvPFunctor.B (P F) a ⟹ α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)\n⊢ LiftR (fun {i} => r) x y\n[PROOFSTEP]\nuse abs ⟨a, fun i j => ⟨(f₀ i j, f₁ i j), h i j⟩⟩\n[GOAL]\ncase h\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : MvPFunctor.B (P F) a ⟹ α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)\n⊢ (fun i t => (↑t).fst) <$$>\n        abs { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } } =\n      x ∧\n    (fun i t => (↑t).snd) <$$>\n        abs { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } } =\n      y\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : MvPFunctor.B (P F) a ⟹ α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)\n⊢ (fun i t => (↑t).fst) <$$>\n        abs { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } } =\n      x ∧\n    (fun i t => (↑t).snd) <$$>\n        abs { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } } =\n      y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : MvPFunctor.B (P F) a ⟹ α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)\n⊢ (fun i t => (↑t).fst) <$$>\n      abs { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } } =\n    x\n[PROOFSTEP]\nrw [xeq, ← abs_map]\n[GOAL]\ncase h.left\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : MvPFunctor.B (P F) a ⟹ α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)\n⊢ abs\n      ((fun i t => (↑t).fst) <$$>\n        { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } }) =\n    abs { fst := a, snd := f₀ }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.right\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : MvPFunctor.B (P F) a ⟹ α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)\n⊢ (fun i t => (↑t).snd) <$$>\n      abs { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } } =\n    y\n[PROOFSTEP]\nrw [yeq, ← abs_map]\n[GOAL]\ncase h.right\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nr : {i : Fin2 n} → α i → α i → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : MvPFunctor.B (P F) a ⟹ α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), r (f₀ i j) (f₁ i j)\n⊢ abs\n      ((fun i t => (↑t).snd) <$$>\n        { fst := a, snd := fun i j => { val := (f₀ i j, f₁ i j), property := (_ : r (f₀ i j) (f₁ i j)) } }) =\n    abs { fst := a, snd := f₁ }\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\n⊢ u ∈ supp x i ↔ ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ f i '' univ\n[PROOFSTEP]\nrw [supp]\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\n⊢ u ∈ {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i y} ↔\n    ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ f i '' univ\n[PROOFSTEP]\ndsimp\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\n⊢ (∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i u) ↔\n    ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ f i '' univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\n⊢ (∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i u) →\n    ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ f i '' univ\n[PROOFSTEP]\nintro h a f haf\n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\nh : ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i u\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nhaf : abs { fst := a, snd := f } = x\n⊢ u ∈ f i '' univ\n[PROOFSTEP]\nhave : LiftP (fun i u => u ∈ f i '' univ) x := by\n  rw [liftP_iff]\n  refine' ⟨a, f, haf.symm, _⟩\n  intro i u\n  exact mem_image_of_mem _ (mem_univ _)\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\nh : ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i u\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nhaf : abs { fst := a, snd := f } = x\n⊢ LiftP (fun i u => u ∈ f i '' univ) x\n[PROOFSTEP]\nrw [liftP_iff]\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\nh : ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i u\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nhaf : abs { fst := a, snd := f } = x\n⊢ ∃ a_1 f_1, x = abs { fst := a_1, snd := f_1 } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a_1 i), f_1 i j ∈ f i '' univ\n[PROOFSTEP]\nrefine' ⟨a, f, haf.symm, _⟩\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\nh : ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i u\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nhaf : abs { fst := a, snd := f } = x\n⊢ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), f i j ∈ f i '' univ\n[PROOFSTEP]\nintro i u\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni✝ : Fin2 n\nu✝ : α i✝\nh : ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i✝ u✝\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nhaf : abs { fst := a, snd := f } = x\ni : Fin2 n\nu : MvPFunctor.B (P F) a i\n⊢ f i u ∈ f i '' univ\n[PROOFSTEP]\nexact mem_image_of_mem _ (mem_univ _)\n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\nh : ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i u\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nhaf : abs { fst := a, snd := f } = x\nthis : LiftP (fun i u => u ∈ f i '' univ) x\n⊢ u ∈ f i '' univ\n[PROOFSTEP]\nexact h this\n[GOAL]\ncase mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\n⊢ (∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ f i '' univ) →\n    ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i u\n[PROOFSTEP]\nintro h p\n[GOAL]\ncase mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\nh : ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ f i '' univ\np : (i : Fin2 n) → α i → Prop\n⊢ LiftP p x → p i u\n[PROOFSTEP]\nrw [liftP_iff]\n[GOAL]\ncase mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\nh : ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ f i '' univ\np : (i : Fin2 n) → α i → Prop\n⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)) → p i u\n[PROOFSTEP]\nrintro ⟨a, f, xeq, h'⟩\n[GOAL]\ncase mpr.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni : Fin2 n\nu : α i\nh : ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ f i '' univ\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => α i\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)\n⊢ p i u\n[PROOFSTEP]\nrcases h a f xeq.symm with ⟨i, _, hi⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni✝ : Fin2 n\nu : α i✝\nh : ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ f i✝ '' univ\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => α i\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)\ni : MvPFunctor.B (P F) a i✝\nleft✝ : i ∈ univ\nhi : f i✝ i = u\n⊢ p i✝ u\n[PROOFSTEP]\nrw [← hi]\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\ni✝ : Fin2 n\nu : α i✝\nh : ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ f i✝ '' univ\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => α i\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)\ni : MvPFunctor.B (P F) a i✝\nleft✝ : i ∈ univ\nhi : f i✝ i = u\n⊢ p i✝ (f i✝ i)\n[PROOFSTEP]\napply h'\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\ni : Fin2 n\nx : F α\n⊢ supp x i = {u | ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ f i '' univ}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\ni : Fin2 n\nx : F α\nx✝ : α i\n⊢ x✝ ∈ supp x i ↔\n    x✝ ∈ {u | ∀ (a : (P F).A) (f : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f } = x → u ∈ f i '' univ}\n[PROOFSTEP]\napply mem_supp\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\n⊢ (∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u) ↔\n    ∃ a f,\n      abs { fst := a, snd := f } = x ∧\n        ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n          abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\n⊢ (∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u) →\n    ∃ a f,\n      abs { fst := a, snd := f } = x ∧\n        ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n          abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\n⊢ ∃ a f,\n    abs { fst := a, snd := f } = x ∧\n      ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n        abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\n[PROOFSTEP]\nhave : LiftP (supp x) x := by rw [h]; introv ; exact id\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\n⊢ LiftP (supp x) x\n[PROOFSTEP]\nrw [h]\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\n⊢ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → supp x i u\n[PROOFSTEP]\nintrov\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\ni : Fin2 n\nu : α i\n⊢ u ∈ supp x i → supp x i u\n[PROOFSTEP]\nexact id\n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nthis : LiftP (supp x) x\n⊢ ∃ a f,\n    abs { fst := a, snd := f } = x ∧\n      ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n        abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\n[PROOFSTEP]\nrw [liftP_iff] at this \n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nthis✝ : LiftP (supp x) x\nthis : ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), supp x i (f i j)\n⊢ ∃ a f,\n    abs { fst := a, snd := f } = x ∧\n      ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n        abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\n[PROOFSTEP]\nrcases this with ⟨a, f, xeq, h'⟩\n[GOAL]\ncase mp.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nthis : LiftP (supp x) x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => α i\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), supp x i (f i j)\n⊢ ∃ a f,\n    abs { fst := a, snd := f } = x ∧\n      ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n        abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\n[PROOFSTEP]\nrefine' ⟨a, f, xeq.symm, _⟩\n[GOAL]\ncase mp.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nthis : LiftP (supp x) x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => α i\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), supp x i (f i j)\n⊢ ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\n[PROOFSTEP]\nintro a' f' h''\n[GOAL]\ncase mp.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nthis : LiftP (supp x) x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => α i\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), supp x i (f i j)\na' : Fin2 n\nf' : (P F).A\nh'' : MvPFunctor.B (P F) f' ⟹ α\n⊢ abs { fst := f', snd := h'' } = x → f a' '' univ ⊆ h'' a' '' univ\n[PROOFSTEP]\nrintro hu u ⟨j, _h₂, hfi⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nthis : LiftP (supp x) x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => α i\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), supp x i (f i j)\na' : Fin2 n\nf' : (P F).A\nh'' : MvPFunctor.B (P F) f' ⟹ α\nhu : abs { fst := f', snd := h'' } = x\nu : α a'\nj : MvPFunctor.B (P F) a a'\n_h₂ : j ∈ univ\nhfi : f a' j = u\n⊢ u ∈ h'' a' '' univ\n[PROOFSTEP]\nhave hh : u ∈ supp x a' := by rw [← hfi]; apply h'\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nthis : LiftP (supp x) x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => α i\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), supp x i (f i j)\na' : Fin2 n\nf' : (P F).A\nh'' : MvPFunctor.B (P F) f' ⟹ α\nhu : abs { fst := f', snd := h'' } = x\nu : α a'\nj : MvPFunctor.B (P F) a a'\n_h₂ : j ∈ univ\nhfi : f a' j = u\n⊢ u ∈ supp x a'\n[PROOFSTEP]\nrw [← hfi]\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nthis : LiftP (supp x) x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => α i\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), supp x i (f i j)\na' : Fin2 n\nf' : (P F).A\nh'' : MvPFunctor.B (P F) f' ⟹ α\nhu : abs { fst := f', snd := h'' } = x\nu : α a'\nj : MvPFunctor.B (P F) a a'\n_h₂ : j ∈ univ\nhfi : f a' j = u\n⊢ f a' j ∈ supp x a'\n[PROOFSTEP]\napply h'\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\nh : ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nthis : LiftP (supp x) x\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ fun i => α i\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), supp x i (f i j)\na' : Fin2 n\nf' : (P F).A\nh'' : MvPFunctor.B (P F) f' ⟹ α\nhu : abs { fst := f', snd := h'' } = x\nu : α a'\nj : MvPFunctor.B (P F) a a'\n_h₂ : j ∈ univ\nhfi : f a' j = u\nhh : u ∈ supp x a'\n⊢ u ∈ h'' a' '' univ\n[PROOFSTEP]\nrefine' (mem_supp x _ u).mp hh _ _ hu\n[GOAL]\ncase mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\n⊢ (∃ a f,\n      abs { fst := a, snd := f } = x ∧\n        ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n          abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ) →\n    ∀ (p : (i : Fin2 n) → α i → Prop), LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\n[PROOFSTEP]\nrintro ⟨a, f, xeq, h⟩ p\n[GOAL]\ncase mpr.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\n⊢ LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\n[PROOFSTEP]\nrw [liftP_iff]\n[GOAL]\ncase mpr.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\n⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)) ↔\n    ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro.intro.intro.mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\n⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)) →\n    ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\n[PROOFSTEP]\nrintro ⟨a', f', xeq', h'⟩ i u usuppx\n[GOAL]\ncase mpr.intro.intro.intro.mp.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\na' : (P F).A\nf' : MvPFunctor.B (P F) a' ⟹ fun i => α i\nxeq' : x = abs { fst := a', snd := f' }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a' i), p i (f' i j)\ni : Fin2 n\nu : α i\nusuppx : u ∈ supp x i\n⊢ p i u\n[PROOFSTEP]\nrcases(mem_supp x _ u).mp (@usuppx) a' f' xeq'.symm with ⟨i, _, f'ieq⟩\n[GOAL]\ncase mpr.intro.intro.intro.mp.intro.intro.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\na' : (P F).A\nf' : MvPFunctor.B (P F) a' ⟹ fun i => α i\nxeq' : x = abs { fst := a', snd := f' }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a' i), p i (f' i j)\ni✝ : Fin2 n\nu : α i✝\nusuppx : u ∈ supp x i✝\ni : MvPFunctor.B (P F) a' i✝\nleft✝ : i ∈ univ\nf'ieq : f' i✝ i = u\n⊢ p i✝ u\n[PROOFSTEP]\nrw [← f'ieq]\n[GOAL]\ncase mpr.intro.intro.intro.mp.intro.intro.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\na' : (P F).A\nf' : MvPFunctor.B (P F) a' ⟹ fun i => α i\nxeq' : x = abs { fst := a', snd := f' }\nh' : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a' i), p i (f' i j)\ni✝ : Fin2 n\nu : α i✝\nusuppx : u ∈ supp x i✝\ni : MvPFunctor.B (P F) a' i✝\nleft✝ : i ∈ univ\nf'ieq : f' i✝ i = u\n⊢ p i✝ (f' i✝ i)\n[PROOFSTEP]\napply h'\n[GOAL]\ncase mpr.intro.intro.intro.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\n⊢ (∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u) →\n    ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase mpr.intro.intro.intro.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\nh' : ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\n⊢ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)\n[PROOFSTEP]\nrefine' ⟨a, f, xeq.symm, _⟩\n[GOAL]\ncase mpr.intro.intro.intro.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\nh' : ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\n⊢ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)\n[PROOFSTEP]\nintro j y\n[GOAL]\ncase mpr.intro.intro.intro.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\nh' : ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nj : Fin2 n\ny : MvPFunctor.B (P F) a j\n⊢ p j (f j y)\n[PROOFSTEP]\napply h'\n[GOAL]\ncase mpr.intro.intro.intro.mpr.a\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\nh' : ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nj : Fin2 n\ny : MvPFunctor.B (P F) a j\n⊢ f j y ∈ supp x j\n[PROOFSTEP]\nrw [mem_supp]\n[GOAL]\ncase mpr.intro.intro.intro.mpr.a\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\nh' : ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nj : Fin2 n\ny : MvPFunctor.B (P F) a j\n⊢ ∀ (a : (P F).A) (f_1 : MvPFunctor.B (P F) a ⟹ α), abs { fst := a, snd := f_1 } = x → f j y ∈ f_1 j '' univ\n[PROOFSTEP]\nintro a' f' xeq'\n[GOAL]\ncase mpr.intro.intro.intro.mpr.a\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\nh' : ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nj : Fin2 n\ny : MvPFunctor.B (P F) a j\na' : (P F).A\nf' : MvPFunctor.B (P F) a' ⟹ α\nxeq' : abs { fst := a', snd := f' } = x\n⊢ f j y ∈ f' j '' univ\n[PROOFSTEP]\napply h _ a' f' xeq'\n[GOAL]\ncase mpr.intro.intro.intro.mpr.a.a\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nα : TypeVec n\nx : F α\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nxeq : abs { fst := a, snd := f } = x\nh :\n  ∀ (i : Fin2 n) (a' : (P F).A) (f' : MvPFunctor.B (P F) a' ⟹ α),\n    abs { fst := a', snd := f' } = x → f i '' univ ⊆ f' i '' univ\np : (i : Fin2 n) → α i → Prop\nh' : ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\nj : Fin2 n\ny : MvPFunctor.B (P F) a j\na' : (P F).A\nf' : MvPFunctor.B (P F) a' ⟹ α\nxeq' : abs { fst := a', snd := f' } = x\n⊢ f j y ∈ f j '' univ\n[PROOFSTEP]\napply mem_image_of_mem _ (mem_univ _)\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ ∀ (i : Fin2 n), supp (abs { fst := a, snd := f }) i = f i '' univ\n[PROOFSTEP]\nintro\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\ni✝ : Fin2 n\n⊢ supp (abs { fst := a, snd := f }) i✝ = f i✝ '' univ\n[PROOFSTEP]\next u\n[GOAL]\ncase h\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\ni✝ : Fin2 n\nu : α i✝\n⊢ u ∈ supp (abs { fst := a, snd := f }) i✝ ↔ u ∈ f i✝ '' univ\n[PROOFSTEP]\nrw [mem_supp]\n[GOAL]\ncase h\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\ni✝ : Fin2 n\nu : α i✝\n⊢ (∀ (a_1 : (P F).A) (f_1 : MvPFunctor.B (P F) a_1 ⟹ α),\n      abs { fst := a_1, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 i✝ '' univ) ↔\n    u ∈ f i✝ '' univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\ni✝ : Fin2 n\nu : α i✝\n⊢ (∀ (a_1 : (P F).A) (f_1 : MvPFunctor.B (P F) a_1 ⟹ α),\n      abs { fst := a_1, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 i✝ '' univ) →\n    u ∈ f i✝ '' univ\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase h.mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\ni✝ : Fin2 n\nu : α i✝\nh' :\n  ∀ (a_1 : (P F).A) (f_1 : MvPFunctor.B (P F) a_1 ⟹ α),\n    abs { fst := a_1, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 i✝ '' univ\n⊢ u ∈ f i✝ '' univ\n[PROOFSTEP]\napply h' _ _ rfl\n[GOAL]\ncase h.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\ni✝ : Fin2 n\nu : α i✝\n⊢ u ∈ f i✝ '' univ →\n    ∀ (a_2 : (P F).A) (f_1 : MvPFunctor.B (P F) a_2 ⟹ α),\n      abs { fst := a_2, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 i✝ '' univ\n[PROOFSTEP]\nintro h' a' f' e\n[GOAL]\ncase h.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\ni✝ : Fin2 n\nu : α i✝\nh' : u ∈ f i✝ '' univ\na' : (P F).A\nf' : MvPFunctor.B (P F) a' ⟹ α\ne : abs { fst := a', snd := f' } = abs { fst := a, snd := f }\n⊢ u ∈ f' i✝ '' univ\n[PROOFSTEP]\nrw [← h _ _ _ _ e.symm]\n[GOAL]\ncase h.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\ni✝ : Fin2 n\nu : α i✝\nh' : u ∈ f i✝ '' univ\na' : (P F).A\nf' : MvPFunctor.B (P F) a' ⟹ α\ne : abs { fst := a', snd := f' } = abs { fst := a, snd := f }\n⊢ u ∈ f i✝ '' univ\n[PROOFSTEP]\napply h'\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\nx : F α\np : (i : Fin2 n) → α i → Prop\n⊢ LiftP p x ↔ ∀ (i : Fin2 n) (u : α i), u ∈ supp x i → p i u\n[PROOFSTEP]\nrw [liftP_iff, ← abs_repr x]\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\nx : F α\np : (i : Fin2 n) → α i → Prop\n⊢ (∃ a f, abs (repr x) = abs { fst := a, snd := f } ∧ ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a i), p i (f i j)) ↔\n    ∀ (i : Fin2 n) (u : α i), u ∈ supp (abs (repr x)) i → p i u\n[PROOFSTEP]\ncases' repr x with a f\n[GOAL]\ncase mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\nx : F α\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ (∃ a_1 f_1,\n      abs { fst := a, snd := f } = abs { fst := a_1, snd := f_1 } ∧\n        ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a_1 i), p i (f_1 i j)) ↔\n    ∀ (i : Fin2 n) (u : α i), u ∈ supp (abs { fst := a, snd := f }) i → p i u\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\nx : F α\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ (∃ a_1 f_1,\n      abs { fst := a, snd := f } = abs { fst := a_1, snd := f_1 } ∧\n        ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a_1 i), p i (f_1 i j)) →\n    ∀ (i : Fin2 n) (u : α i), u ∈ supp (abs { fst := a, snd := f }) i → p i u\n[PROOFSTEP]\nrintro ⟨a', f', abseq, hf⟩ u\n[GOAL]\ncase mk.mp.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\nx : F α\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\na' : (P F).A\nf' : MvPFunctor.B (P F) a' ⟹ fun i => α i\nabseq : abs { fst := a, snd := f } = abs { fst := a', snd := f' }\nhf : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a' i), p i (f' i j)\nu : Fin2 n\n⊢ ∀ (u_1 : α u), u_1 ∈ supp (abs { fst := a, snd := f }) u → p u u_1\n[PROOFSTEP]\nrw [supp_eq_of_isUniform h, h _ _ _ _ abseq]\n[GOAL]\ncase mk.mp.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\nx : F α\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\na' : (P F).A\nf' : MvPFunctor.B (P F) a' ⟹ fun i => α i\nabseq : abs { fst := a, snd := f } = abs { fst := a', snd := f' }\nhf : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a' i), p i (f' i j)\nu : Fin2 n\n⊢ ∀ (u_1 : α u), u_1 ∈ f' u '' univ → p u u_1\n[PROOFSTEP]\nrintro b ⟨i, _, hi⟩\n[GOAL]\ncase mk.mp.intro.intro.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\nx : F α\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\na' : (P F).A\nf' : MvPFunctor.B (P F) a' ⟹ fun i => α i\nabseq : abs { fst := a, snd := f } = abs { fst := a', snd := f' }\nhf : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a' i), p i (f' i j)\nu : Fin2 n\nb : α u\ni : MvPFunctor.B (P F) a' u\nleft✝ : i ∈ univ\nhi : f' u i = b\n⊢ p u b\n[PROOFSTEP]\nrw [← hi]\n[GOAL]\ncase mk.mp.intro.intro.intro.intro.intro\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\nx : F α\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\na' : (P F).A\nf' : MvPFunctor.B (P F) a' ⟹ fun i => α i\nabseq : abs { fst := a, snd := f } = abs { fst := a', snd := f' }\nhf : ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a' i), p i (f' i j)\nu : Fin2 n\nb : α u\ni : MvPFunctor.B (P F) a' u\nleft✝ : i ∈ univ\nhi : f' u i = b\n⊢ p u (f' u i)\n[PROOFSTEP]\napply hf\n[GOAL]\ncase mk.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\nx : F α\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ (∀ (i : Fin2 n) (u : α i), u ∈ supp (abs { fst := a, snd := f }) i → p i u) →\n    ∃ a_2 f_1,\n      abs { fst := a, snd := f } = abs { fst := a_2, snd := f_1 } ∧\n        ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a_2 i), p i (f_1 i j)\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase mk.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\nx : F α\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : ∀ (i : Fin2 n) (u : α i), u ∈ supp (abs { fst := a, snd := f }) i → p i u\n⊢ ∃ a_1 f_1,\n    abs { fst := a, snd := f } = abs { fst := a_1, snd := f_1 } ∧\n      ∀ (i : Fin2 n) (j : MvPFunctor.B (P F) a_1 i), p i (f_1 i j)\n[PROOFSTEP]\nrefine' ⟨a, f, rfl, fun _ i => h' _ _ _⟩\n[GOAL]\ncase mk.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\nx : F α\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : ∀ (i : Fin2 n) (u : α i), u ∈ supp (abs { fst := a, snd := f }) i → p i u\nx✝ : Fin2 n\ni : MvPFunctor.B (P F) a x✝\n⊢ f x✝ i ∈ supp (abs { fst := a, snd := f }) x✝\n[PROOFSTEP]\nrw [supp_eq_of_isUniform h]\n[GOAL]\ncase mk.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\nx : F α\np : (i : Fin2 n) → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : ∀ (i : Fin2 n) (u : α i), u ∈ supp (abs { fst := a, snd := f }) i → p i u\nx✝ : Fin2 n\ni : MvPFunctor.B (P F) a x✝\n⊢ f x✝ i ∈ f x✝ '' univ\n[PROOFSTEP]\nexact ⟨i, mem_univ i, rfl⟩\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα β : TypeVec n\ng : α ⟹ β\nx : F α\ni : Fin2 n\n⊢ supp (g <$$> x) i = g i '' supp x i\n[PROOFSTEP]\nrw [← abs_repr x]\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα β : TypeVec n\ng : α ⟹ β\nx : F α\ni : Fin2 n\n⊢ supp (g <$$> abs (repr x)) i = g i '' supp (abs (repr x)) i\n[PROOFSTEP]\ncases' repr x with a f\n[GOAL]\ncase mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα β : TypeVec n\ng : α ⟹ β\nx : F α\ni : Fin2 n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ supp (g <$$> abs { fst := a, snd := f }) i = g i '' supp (abs { fst := a, snd := f }) i\n[PROOFSTEP]\nrw [← abs_map, MvPFunctor.map_eq]\n[GOAL]\ncase mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα β : TypeVec n\ng : α ⟹ β\nx : F α\ni : Fin2 n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ supp (abs { fst := a, snd := g ⊚ f }) i = g i '' supp (abs { fst := a, snd := f }) i\n[PROOFSTEP]\nrw [supp_eq_of_isUniform h, supp_eq_of_isUniform h, ← image_comp]\n[GOAL]\ncase mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα β : TypeVec n\ng : α ⟹ β\nx : F α\ni : Fin2 n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ (g ⊚ f) i '' univ = g i ∘ f i '' univ\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\n⊢ SuppPreservation ↔ IsUniform\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\n⊢ SuppPreservation → IsUniform\n[PROOFSTEP]\nintro h α a a' f f' h' i\n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : SuppPreservation\nα : TypeVec n\na a' : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nf' : MvPFunctor.B (P F) a' ⟹ α\nh' : abs { fst := a, snd := f } = abs { fst := a', snd := f' }\ni : Fin2 n\n⊢ f i '' univ = f' i '' univ\n[PROOFSTEP]\nrw [← MvPFunctor.supp_eq, ← MvPFunctor.supp_eq, ← h, h', h]\n[GOAL]\ncase mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\n⊢ IsUniform → SuppPreservation\n[PROOFSTEP]\nrintro h α ⟨a, f⟩\n[GOAL]\ncase mpr.mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ supp (abs { fst := a, snd := f }) = supp { fst := a, snd := f }\n[PROOFSTEP]\next\n[GOAL]\ncase mpr.mk.h.h\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : IsUniform\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nx✝¹ : Fin2 n\nx✝ : α x✝¹\n⊢ x✝ ∈ supp (abs { fst := a, snd := f }) x✝¹ ↔ x✝ ∈ supp { fst := a, snd := f } x✝¹\n[PROOFSTEP]\nrwa [supp_eq_of_isUniform, MvPFunctor.supp_eq]\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\n⊢ SuppPreservation ↔ LiftPPreservation\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\n⊢ SuppPreservation → LiftPPreservation\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\n⊢ LiftPPreservation → SuppPreservation\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : SuppPreservation\n⊢ LiftPPreservation\n[PROOFSTEP]\nrintro α p ⟨a, f⟩\n[GOAL]\ncase mp.mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : SuppPreservation\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ LiftP p (abs { fst := a, snd := f }) ↔ LiftP p { fst := a, snd := f }\n[PROOFSTEP]\nhave h' := h\n[GOAL]\ncase mp.mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : SuppPreservation\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : SuppPreservation\n⊢ LiftP p (abs { fst := a, snd := f }) ↔ LiftP p { fst := a, snd := f }\n[PROOFSTEP]\nrw [suppPreservation_iff_isUniform] at h' \n[GOAL]\ncase mp.mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : SuppPreservation\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : IsUniform\n⊢ LiftP p (abs { fst := a, snd := f }) ↔ LiftP p { fst := a, snd := f }\n[PROOFSTEP]\ndsimp only [SuppPreservation, supp] at h \n[GOAL]\ncase mp.mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh :\n  ∀ ⦃α : TypeVec n⦄ (x : MvPFunctor.Obj (P F) α),\n    (fun i => {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P (abs x) → P i y}) = fun i =>\n      {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i y}\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : IsUniform\n⊢ LiftP p (abs { fst := a, snd := f }) ↔ LiftP p { fst := a, snd := f }\n[PROOFSTEP]\nsimp only [liftP_iff_of_isUniform, supp_eq_of_isUniform, MvPFunctor.liftP_iff', h', image_univ, mem_range, exists_imp]\n[GOAL]\ncase mp.mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh :\n  ∀ ⦃α : TypeVec n⦄ (x : MvPFunctor.Obj (P F) α),\n    (fun i => {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P (abs x) → P i y}) = fun i =>\n      {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i y}\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : IsUniform\n⊢ (∀ (i : Fin2 n) (u : α i) (x : MvPFunctor.B (P F) a i), f i x = u → p u) ↔\n    ∀ (i : Fin2 n) (x : MvPFunctor.B (P F) a i), p (f i x)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.mk.mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh :\n  ∀ ⦃α : TypeVec n⦄ (x : MvPFunctor.Obj (P F) α),\n    (fun i => {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P (abs x) → P i y}) = fun i =>\n      {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i y}\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : IsUniform\n⊢ (∀ (i : Fin2 n) (u : α i) (x : MvPFunctor.B (P F) a i), f i x = u → p u) →\n    ∀ (i : Fin2 n) (x : MvPFunctor.B (P F) a i), p (f i x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase mp.mk.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh :\n  ∀ ⦃α : TypeVec n⦄ (x : MvPFunctor.Obj (P F) α),\n    (fun i => {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P (abs x) → P i y}) = fun i =>\n      {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i y}\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : IsUniform\n⊢ (∀ (i : Fin2 n) (x : MvPFunctor.B (P F) a i), p (f i x)) →\n    ∀ (i : Fin2 n) (u : α i) (x : MvPFunctor.B (P F) a i), f i x = u → p u\n[PROOFSTEP]\nintros\n[GOAL]\ncase mp.mk.mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh :\n  ∀ ⦃α : TypeVec n⦄ (x : MvPFunctor.Obj (P F) α),\n    (fun i => {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P (abs x) → P i y}) = fun i =>\n      {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i y}\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : IsUniform\na✝ : ∀ (i : Fin2 n) (u : α i) (x : MvPFunctor.B (P F) a i), f i x = u → p u\ni✝ : Fin2 n\nx✝ : MvPFunctor.B (P F) a i✝\n⊢ p (f i✝ x✝)\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase mp.mk.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh :\n  ∀ ⦃α : TypeVec n⦄ (x : MvPFunctor.Obj (P F) α),\n    (fun i => {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P (abs x) → P i y}) = fun i =>\n      {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i y}\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : IsUniform\na✝¹ : ∀ (i : Fin2 n) (x : MvPFunctor.B (P F) a i), p (f i x)\ni✝ : Fin2 n\nu✝ : α i✝\nx✝ : MvPFunctor.B (P F) a i✝\na✝ : f i✝ x✝ = u✝\n⊢ p u✝\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase mp.mk.mp\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh :\n  ∀ ⦃α : TypeVec n⦄ (x : MvPFunctor.Obj (P F) α),\n    (fun i => {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P (abs x) → P i y}) = fun i =>\n      {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i y}\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : IsUniform\na✝ : ∀ (i : Fin2 n) (u : α i) (x : MvPFunctor.B (P F) a i), f i x = u → p u\ni✝ : Fin2 n\nx✝ : MvPFunctor.B (P F) a i✝\n⊢ p (f i✝ x✝)\n[PROOFSTEP]\nsolve_by_elim\n[GOAL]\ncase mp.mk.mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh :\n  ∀ ⦃α : TypeVec n⦄ (x : MvPFunctor.Obj (P F) α),\n    (fun i => {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P (abs x) → P i y}) = fun i =>\n      {y | ∀ ⦃P : (i : Fin2 n) → α i → Prop⦄, LiftP P x → P i y}\nα : TypeVec n\np : ⦃i : Fin2 n⦄ → α i → Prop\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nh' : IsUniform\na✝ : ∀ (i : Fin2 n) (x : MvPFunctor.B (P F) a i), p (f i x)\ni✝ : Fin2 n\nx✝ : MvPFunctor.B (P F) a i✝\n⊢ p (f i✝ x✝)\n[PROOFSTEP]\nsolve_by_elim\n[GOAL]\ncase mpr\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : LiftPPreservation\n⊢ SuppPreservation\n[PROOFSTEP]\nrintro α ⟨a, f⟩\n[GOAL]\ncase mpr.mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : LiftPPreservation\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ supp (abs { fst := a, snd := f }) = supp { fst := a, snd := f }\n[PROOFSTEP]\nsimp only [LiftPPreservation] at h \n[GOAL]\ncase mpr.mk\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : ∀ ⦃α : TypeVec n⦄ (p : ⦃i : Fin2 n⦄ → α i → Prop) (x : MvPFunctor.Obj (P F) α), LiftP p (abs x) ↔ LiftP p x\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\n⊢ supp (abs { fst := a, snd := f }) = supp { fst := a, snd := f }\n[PROOFSTEP]\next\n[GOAL]\ncase mpr.mk.h.h\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\nh : ∀ ⦃α : TypeVec n⦄ (p : ⦃i : Fin2 n⦄ → α i → Prop) (x : MvPFunctor.Obj (P F) α), LiftP p (abs x) ↔ LiftP p x\nα : TypeVec n\na : (P F).A\nf : MvPFunctor.B (P F) a ⟹ α\nx✝¹ : Fin2 n\nx✝ : α x✝¹\n⊢ x✝ ∈ supp (abs { fst := a, snd := f }) x✝¹ ↔ x✝ ∈ supp { fst := a, snd := f } x✝¹\n[PROOFSTEP]\nsimp only [supp, h, mem_setOf_eq]\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u_1\ninst✝ : MvFunctor F\nq : MvQPF F\n⊢ LiftPPreservation ↔ IsUniform\n[PROOFSTEP]\nrw [← suppPreservation_iff_liftpPreservation, suppPreservation_iff_isUniform]\n", "meta": {"mathlib_filename": "Mathlib.Data.QPF.Multivariate.Basic", "llama_tokens": 31440, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7279754371026367, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.37819876143221454}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\n⊢ 𝔠 ≤ #𝕜\n[PROOFSTEP]\nsuffices ∃ f : (ℕ → Bool) → 𝕜, range f ⊆ univ ∧ Continuous f ∧ Injective f\n  by\n  rcases this with ⟨f, -, -, f_inj⟩\n  simpa using lift_mk_le_lift_mk_of_injective f_inj\n[GOAL]\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nthis : ∃ f, range f ⊆ Set.univ ∧ Continuous f ∧ Injective f\n⊢ 𝔠 ≤ #𝕜\n[PROOFSTEP]\nrcases this with ⟨f, -, -, f_inj⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nf : (ℕ → Bool) → 𝕜\nf_inj : Injective f\n⊢ 𝔠 ≤ #𝕜\n[PROOFSTEP]\nsimpa using lift_mk_le_lift_mk_of_injective f_inj\n[GOAL]\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\n⊢ ∃ f, range f ⊆ Set.univ ∧ Continuous f ∧ Injective f\n[PROOFSTEP]\napply Perfect.exists_nat_bool_injection _ univ_nonempty\n[GOAL]\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\n⊢ Perfect Set.univ\n[PROOFSTEP]\nrefine ⟨isClosed_univ, preperfect_iff_nhds.2 (fun x _ U hU ↦ ?_)⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nx : 𝕜\nx✝ : x ∈ Set.univ\nU : Set 𝕜\nhU : U ∈ 𝓝 x\n⊢ ∃ y, y ∈ U ∩ Set.univ ∧ y ≠ x\n[PROOFSTEP]\nrcases NormedField.exists_norm_lt_one 𝕜 with ⟨c, c_pos, hc⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nx : 𝕜\nx✝ : x ∈ Set.univ\nU : Set 𝕜\nhU : U ∈ 𝓝 x\nc : 𝕜\nc_pos : 0 < ‖c‖\nhc : ‖c‖ < 1\n⊢ ∃ y, y ∈ U ∩ Set.univ ∧ y ≠ x\n[PROOFSTEP]\nhave A : Tendsto (fun n ↦ x + c ^ n) atTop (𝓝 (x + 0)) :=\n  tendsto_const_nhds.add (tendsto_pow_atTop_nhds_0_of_norm_lt_1 hc)\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nx : 𝕜\nx✝ : x ∈ Set.univ\nU : Set 𝕜\nhU : U ∈ 𝓝 x\nc : 𝕜\nc_pos : 0 < ‖c‖\nhc : ‖c‖ < 1\nA : Tendsto (fun n => x + c ^ n) atTop (𝓝 (x + 0))\n⊢ ∃ y, y ∈ U ∩ Set.univ ∧ y ≠ x\n[PROOFSTEP]\nrw [add_zero] at A \n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nx : 𝕜\nx✝ : x ∈ Set.univ\nU : Set 𝕜\nhU : U ∈ 𝓝 x\nc : 𝕜\nc_pos : 0 < ‖c‖\nhc : ‖c‖ < 1\nA : Tendsto (fun n => x + c ^ n) atTop (𝓝 x)\n⊢ ∃ y, y ∈ U ∩ Set.univ ∧ y ≠ x\n[PROOFSTEP]\nhave B : ∀ᶠ n in atTop, x + c ^ n ∈ U := tendsto_def.1 A U hU\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nx : 𝕜\nx✝ : x ∈ Set.univ\nU : Set 𝕜\nhU : U ∈ 𝓝 x\nc : 𝕜\nc_pos : 0 < ‖c‖\nhc : ‖c‖ < 1\nA : Tendsto (fun n => x + c ^ n) atTop (𝓝 x)\nB : ∀ᶠ (n : ℕ) in atTop, x + c ^ n ∈ U\n⊢ ∃ y, y ∈ U ∩ Set.univ ∧ y ≠ x\n[PROOFSTEP]\nrcases B.exists with ⟨n, hn⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nx : 𝕜\nx✝ : x ∈ Set.univ\nU : Set 𝕜\nhU : U ∈ 𝓝 x\nc : 𝕜\nc_pos : 0 < ‖c‖\nhc : ‖c‖ < 1\nA : Tendsto (fun n => x + c ^ n) atTop (𝓝 x)\nB : ∀ᶠ (n : ℕ) in atTop, x + c ^ n ∈ U\nn : ℕ\nhn : x + c ^ n ∈ U\n⊢ ∃ y, y ∈ U ∩ Set.univ ∧ y ≠ x\n[PROOFSTEP]\nrefine ⟨x + c ^ n, by simpa using hn, ?_⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nx : 𝕜\nx✝ : x ∈ Set.univ\nU : Set 𝕜\nhU : U ∈ 𝓝 x\nc : 𝕜\nc_pos : 0 < ‖c‖\nhc : ‖c‖ < 1\nA : Tendsto (fun n => x + c ^ n) atTop (𝓝 x)\nB : ∀ᶠ (n : ℕ) in atTop, x + c ^ n ∈ U\nn : ℕ\nhn : x + c ^ n ∈ U\n⊢ x + c ^ n ∈ U ∩ Set.univ\n[PROOFSTEP]\nsimpa using hn\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nx : 𝕜\nx✝ : x ∈ Set.univ\nU : Set 𝕜\nhU : U ∈ 𝓝 x\nc : 𝕜\nc_pos : 0 < ‖c‖\nhc : ‖c‖ < 1\nA : Tendsto (fun n => x + c ^ n) atTop (𝓝 x)\nB : ∀ᶠ (n : ℕ) in atTop, x + c ^ n ∈ U\nn : ℕ\nhn : x + c ^ n ∈ U\n⊢ x + c ^ n ≠ x\n[PROOFSTEP]\nsimp only [ne_eq, add_right_eq_self]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nx : 𝕜\nx✝ : x ∈ Set.univ\nU : Set 𝕜\nhU : U ∈ 𝓝 x\nc : 𝕜\nc_pos : 0 < ‖c‖\nhc : ‖c‖ < 1\nA : Tendsto (fun n => x + c ^ n) atTop (𝓝 x)\nB : ∀ᶠ (n : ℕ) in atTop, x + c ^ n ∈ U\nn : ℕ\nhn : x + c ^ n ∈ U\n⊢ ¬c ^ n = 0\n[PROOFSTEP]\napply pow_ne_zero\n[GOAL]\ncase intro.intro.intro.h\n𝕜 : Type u_1\ninst✝¹ : NontriviallyNormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nx : 𝕜\nx✝ : x ∈ Set.univ\nU : Set 𝕜\nhU : U ∈ 𝓝 x\nc : 𝕜\nc_pos : 0 < ‖c‖\nhc : ‖c‖ < 1\nA : Tendsto (fun n => x + c ^ n) atTop (𝓝 x)\nB : ∀ᶠ (n : ℕ) in atTop, x + c ^ n ∈ U\nn : ℕ\nhn : x + c ^ n ∈ U\n⊢ c ≠ 0\n[PROOFSTEP]\nsimpa using c_pos\n[GOAL]\n𝕜 : Type u\nE : Type v\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : CompleteSpace 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : Nontrivial E\n⊢ 𝔠 ≤ #E\n[PROOFSTEP]\nhave A : lift.{v} (𝔠 : Cardinal.{u}) ≤ lift.{v} (#𝕜) := by\n  simpa using continuum_le_cardinal_of_nontriviallyNormedField 𝕜\n[GOAL]\n𝕜 : Type u\nE : Type v\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : CompleteSpace 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : Nontrivial E\n⊢ lift 𝔠 ≤ lift #𝕜\n[PROOFSTEP]\nsimpa using continuum_le_cardinal_of_nontriviallyNormedField 𝕜\n[GOAL]\n𝕜 : Type u\nE : Type v\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : CompleteSpace 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : Nontrivial E\nA : lift 𝔠 ≤ lift #𝕜\n⊢ 𝔠 ≤ #E\n[PROOFSTEP]\nsimpa using A.trans (Cardinal.mk_le_of_module 𝕜 E)\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\n⊢ #↑s = #E\n[PROOFSTEP]\nobtain ⟨c, hc⟩ : ∃ x : 𝕜, 1 < ‖x‖ := NormedField.exists_lt_norm 𝕜 1\n[GOAL]\ncase intro\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\n⊢ #↑s = #E\n[PROOFSTEP]\nhave cn_ne : ∀ n, c ^ n ≠ 0 := by\n  intro n\n  apply pow_ne_zero\n  rintro rfl\n  simp only [norm_zero] at hc \n  exact lt_irrefl _ (hc.trans zero_lt_one)\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\n⊢ ∀ (n : ℕ), c ^ n ≠ 0\n[PROOFSTEP]\nintro n\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\nn : ℕ\n⊢ c ^ n ≠ 0\n[PROOFSTEP]\napply pow_ne_zero\n[GOAL]\ncase h\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\nn : ℕ\n⊢ c ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase h\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nn : ℕ\nhc : 1 < ‖0‖\n⊢ False\n[PROOFSTEP]\nsimp only [norm_zero] at hc \n[GOAL]\ncase h\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nn : ℕ\nhc : 1 < 0\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ (hc.trans zero_lt_one)\n[GOAL]\ncase intro\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\n⊢ #↑s = #E\n[PROOFSTEP]\nhave A : ∀ (x : E), ∀ᶠ n in (atTop : Filter ℕ), x ∈ c ^ n • s :=\n  by\n  intro x\n  have : Tendsto (fun n ↦ (c ^ n)⁻¹ • x) atTop (𝓝 ((0 : 𝕜) • x)) :=\n    by\n    have : Tendsto (fun n ↦ (c ^ n)⁻¹) atTop (𝓝 0) :=\n      by\n      simp_rw [← inv_pow]\n      apply tendsto_pow_atTop_nhds_0_of_norm_lt_1\n      rw [norm_inv]\n      exact inv_lt_one hc\n    exact Tendsto.smul_const this x\n  rw [zero_smul] at this \n  filter_upwards [this hs] with n (hn : (c ^ n)⁻¹ • x ∈ s)\n  exact (mem_smul_set_iff_inv_smul_mem₀ (cn_ne n) _ _).2 hn\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\n⊢ ∀ (x : E), ∀ᶠ (n : ℕ) in atTop, x ∈ c ^ n • s\n[PROOFSTEP]\nintro x\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nx : E\n⊢ ∀ᶠ (n : ℕ) in atTop, x ∈ c ^ n • s\n[PROOFSTEP]\nhave : Tendsto (fun n ↦ (c ^ n)⁻¹ • x) atTop (𝓝 ((0 : 𝕜) • x)) :=\n  by\n  have : Tendsto (fun n ↦ (c ^ n)⁻¹) atTop (𝓝 0) :=\n    by\n    simp_rw [← inv_pow]\n    apply tendsto_pow_atTop_nhds_0_of_norm_lt_1\n    rw [norm_inv]\n    exact inv_lt_one hc\n  exact Tendsto.smul_const this x\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nx : E\n⊢ Tendsto (fun n => (c ^ n)⁻¹ • x) atTop (𝓝 (0 • x))\n[PROOFSTEP]\nhave : Tendsto (fun n ↦ (c ^ n)⁻¹) atTop (𝓝 0) := by\n  simp_rw [← inv_pow]\n  apply tendsto_pow_atTop_nhds_0_of_norm_lt_1\n  rw [norm_inv]\n  exact inv_lt_one hc\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nx : E\n⊢ Tendsto (fun n => (c ^ n)⁻¹) atTop (𝓝 0)\n[PROOFSTEP]\nsimp_rw [← inv_pow]\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nx : E\n⊢ Tendsto (fun n => c⁻¹ ^ n) atTop (𝓝 0)\n[PROOFSTEP]\napply tendsto_pow_atTop_nhds_0_of_norm_lt_1\n[GOAL]\ncase h\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nx : E\n⊢ ‖c⁻¹‖ < 1\n[PROOFSTEP]\nrw [norm_inv]\n[GOAL]\ncase h\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nx : E\n⊢ ‖c‖⁻¹ < 1\n[PROOFSTEP]\nexact inv_lt_one hc\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nx : E\nthis : Tendsto (fun n => (c ^ n)⁻¹) atTop (𝓝 0)\n⊢ Tendsto (fun n => (c ^ n)⁻¹ • x) atTop (𝓝 (0 • x))\n[PROOFSTEP]\nexact Tendsto.smul_const this x\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nx : E\nthis : Tendsto (fun n => (c ^ n)⁻¹ • x) atTop (𝓝 (0 • x))\n⊢ ∀ᶠ (n : ℕ) in atTop, x ∈ c ^ n • s\n[PROOFSTEP]\nrw [zero_smul] at this \n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nx : E\nthis : Tendsto (fun n => (c ^ n)⁻¹ • x) atTop (𝓝 0)\n⊢ ∀ᶠ (n : ℕ) in atTop, x ∈ c ^ n • s\n[PROOFSTEP]\nfilter_upwards [this hs] with n (hn : (c ^ n)⁻¹ • x ∈ s)\n[GOAL]\ncase h\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nx : E\nthis : Tendsto (fun n => (c ^ n)⁻¹ • x) atTop (𝓝 0)\nn : ℕ\nhn : (c ^ n)⁻¹ • x ∈ s\n⊢ x ∈ c ^ n • s\n[PROOFSTEP]\nexact (mem_smul_set_iff_inv_smul_mem₀ (cn_ne n) _ _).2 hn\n[GOAL]\ncase intro\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nA : ∀ (x : E), ∀ᶠ (n : ℕ) in atTop, x ∈ c ^ n • s\n⊢ #↑s = #E\n[PROOFSTEP]\nhave B : ∀ n, #(c ^ n • s) = #s := by\n  intro n\n  have : c ^ n • s ≃ s :=\n    { toFun := fun x ↦ ⟨(c ^ n)⁻¹ • x.1, (mem_smul_set_iff_inv_smul_mem₀ (cn_ne n) _ _).1 x.2⟩\n      invFun := fun x ↦ ⟨(c ^ n) • x.1, smul_mem_smul_set x.2⟩\n      left_inv := fun x ↦ by simp [smul_smul, mul_inv_cancel (cn_ne n)]\n      right_inv := fun x ↦ by simp [smul_smul, inv_mul_cancel (cn_ne n)] }\n  exact Cardinal.mk_congr this\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nA : ∀ (x : E), ∀ᶠ (n : ℕ) in atTop, x ∈ c ^ n • s\n⊢ ∀ (n : ℕ), #↑(c ^ n • s) = #↑s\n[PROOFSTEP]\nintro n\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nA : ∀ (x : E), ∀ᶠ (n : ℕ) in atTop, x ∈ c ^ n • s\nn : ℕ\n⊢ #↑(c ^ n • s) = #↑s\n[PROOFSTEP]\nhave : c ^ n • s ≃ s :=\n  { toFun := fun x ↦ ⟨(c ^ n)⁻¹ • x.1, (mem_smul_set_iff_inv_smul_mem₀ (cn_ne n) _ _).1 x.2⟩\n    invFun := fun x ↦ ⟨(c ^ n) • x.1, smul_mem_smul_set x.2⟩\n    left_inv := fun x ↦ by simp [smul_smul, mul_inv_cancel (cn_ne n)]\n    right_inv := fun x ↦ by simp [smul_smul, inv_mul_cancel (cn_ne n)] }\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nA : ∀ (x : E), ∀ᶠ (n : ℕ) in atTop, x ∈ c ^ n • s\nn : ℕ\nx : ↑(c ^ n • s)\n⊢ (fun x => { val := c ^ n • ↑x, property := (_ : c ^ n • ↑x ∈ c ^ n • s) })\n      ((fun x => { val := (c ^ n)⁻¹ • ↑x, property := (_ : (c ^ n)⁻¹ • ↑x ∈ s) }) x) =\n    x\n[PROOFSTEP]\nsimp [smul_smul, mul_inv_cancel (cn_ne n)]\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nA : ∀ (x : E), ∀ᶠ (n : ℕ) in atTop, x ∈ c ^ n • s\nn : ℕ\nx : ↑s\n⊢ (fun x => { val := (c ^ n)⁻¹ • ↑x, property := (_ : (c ^ n)⁻¹ • ↑x ∈ s) })\n      ((fun x => { val := c ^ n • ↑x, property := (_ : c ^ n • ↑x ∈ c ^ n • s) }) x) =\n    x\n[PROOFSTEP]\nsimp [smul_smul, inv_mul_cancel (cn_ne n)]\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nA : ∀ (x : E), ∀ᶠ (n : ℕ) in atTop, x ∈ c ^ n • s\nn : ℕ\nthis : ↑(c ^ n • s) ≃ ↑s\n⊢ #↑(c ^ n • s) = #↑s\n[PROOFSTEP]\nexact Cardinal.mk_congr this\n[GOAL]\ncase intro\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0\nc : 𝕜\nhc : 1 < ‖c‖\ncn_ne : ∀ (n : ℕ), c ^ n ≠ 0\nA : ∀ (x : E), ∀ᶠ (n : ℕ) in atTop, x ∈ c ^ n • s\nB : ∀ (n : ℕ), #↑(c ^ n • s) = #↑s\n⊢ #↑s = #E\n[PROOFSTEP]\napply (Cardinal.mk_of_countable_eventually_mem A B).symm\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\n⊢ #↑s = #E\n[PROOFSTEP]\nlet g := Homeomorph.addLeft x\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\ng : E ≃ₜ E := Homeomorph.addLeft x\n⊢ #↑s = #E\n[PROOFSTEP]\nlet t := g ⁻¹' s\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\ng : E ≃ₜ E := Homeomorph.addLeft x\nt : Set E := ↑g ⁻¹' s\n⊢ #↑s = #E\n[PROOFSTEP]\nhave : t ∈ 𝓝 0 := g.continuous.continuousAt.preimage_mem_nhds (by simpa using hs)\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\ng : E ≃ₜ E := Homeomorph.addLeft x\nt : Set E := ↑g ⁻¹' s\n⊢ s ∈ 𝓝 (↑g 0)\n[PROOFSTEP]\nsimpa using hs\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\ng : E ≃ₜ E := Homeomorph.addLeft x\nt : Set E := ↑g ⁻¹' s\nthis : t ∈ 𝓝 0\n⊢ #↑s = #E\n[PROOFSTEP]\nhave A : #t = #E := cardinal_eq_of_mem_nhds_zero 𝕜 this\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\ng : E ≃ₜ E := Homeomorph.addLeft x\nt : Set E := ↑g ⁻¹' s\nthis : t ∈ 𝓝 0\nA : #↑t = #E\n⊢ #↑s = #E\n[PROOFSTEP]\nhave B : #t = #s := Cardinal.mk_subtype_of_equiv s g.toEquiv\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\ng : E ≃ₜ E := Homeomorph.addLeft x\nt : Set E := ↑g ⁻¹' s\nthis : t ∈ 𝓝 0\nA : #↑t = #E\nB : #↑t = #↑s\n⊢ #↑s = #E\n[PROOFSTEP]\nrwa [B] at A \n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\n⊢ #↑s = #E\n[PROOFSTEP]\nrcases h's with ⟨x, hx⟩\n[GOAL]\ncase intro\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : IsOpen s\nx : E\nhx : x ∈ s\n⊢ #↑s = #E\n[PROOFSTEP]\nexact cardinal_eq_of_mem_nhds 𝕜 (hs.mem_nhds hx)\n[GOAL]\nE : Type u_1\n𝕜 : Type u_2\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : CompleteSpace 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : Nontrivial E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\n⊢ 𝔠 ≤ #↑s\n[PROOFSTEP]\nsimpa [cardinal_eq_of_is_open 𝕜 hs h's] using continuum_le_cardinal_of_module 𝕜 E\n[GOAL]\nE : Type u\n𝕜 : Type u_1\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : CompleteSpace 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : Nontrivial E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : Set.Countable s\n⊢ Dense sᶜ\n[PROOFSTEP]\nrw [← interior_eq_empty_iff_dense_compl]\n[GOAL]\nE : Type u\n𝕜 : Type u_1\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : CompleteSpace 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : Nontrivial E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : Set.Countable s\n⊢ interior s = ∅\n[PROOFSTEP]\nby_contra H\n[GOAL]\nE : Type u\n𝕜 : Type u_1\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : CompleteSpace 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : Nontrivial E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : Set.Countable s\nH : ¬interior s = ∅\n⊢ False\n[PROOFSTEP]\napply lt_irrefl (ℵ₀ : Cardinal.{u})\n[GOAL]\nE : Type u\n𝕜 : Type u_1\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : CompleteSpace 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : Nontrivial E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : Set.Countable s\nH : ¬interior s = ∅\n⊢ ℵ₀ < ℵ₀\n[PROOFSTEP]\ncalc\n  (ℵ₀ : Cardinal.{u}) < 𝔠 := aleph0_lt_continuum\n  _ ≤ #(interior s) := (continuum_le_cardinal_of_is_open 𝕜 isOpen_interior (nmem_singleton_empty.1 H))\n  _ ≤ #s := (mk_le_mk_of_subset interior_subset)\n  _ ≤ ℵ₀ := le_aleph0 hs\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Module.Cardinality", "llama_tokens": 11134, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947425132315, "lm_q2_score": 0.5774953651858117, "lm_q1q2_score": 0.37819867848594674}}
{"text": "[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\n⊢ IsSolvable (Gal 0)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\n⊢ IsSolvable (Gal 1)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nx : F\n⊢ IsSolvable (Gal (↑C x))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\n⊢ IsSolvable (Gal X)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nx : F\n⊢ IsSolvable (Gal (X - ↑C x))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\n⊢ IsSolvable (Gal (X ^ n))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\ns : Multiset F[X]\nhs : ∀ (p : F[X]), p ∈ s → IsSolvable (Gal p)\n⊢ IsSolvable (Gal (Multiset.prod s))\n[PROOFSTEP]\napply Multiset.induction_on' s\n[GOAL]\ncase h₁\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\ns : Multiset F[X]\nhs : ∀ (p : F[X]), p ∈ s → IsSolvable (Gal p)\n⊢ IsSolvable (Gal (Multiset.prod 0))\n[PROOFSTEP]\nexact gal_one_isSolvable\n[GOAL]\ncase h₂\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\ns : Multiset F[X]\nhs : ∀ (p : F[X]), p ∈ s → IsSolvable (Gal p)\n⊢ ∀ {a : F[X]} {s_1 : Multiset F[X]},\n    a ∈ s → s_1 ⊆ s → IsSolvable (Gal (Multiset.prod s_1)) → IsSolvable (Gal (Multiset.prod (insert a s_1)))\n[PROOFSTEP]\nintro p t hps _ ht\n[GOAL]\ncase h₂\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\ns : Multiset F[X]\nhs : ∀ (p : F[X]), p ∈ s → IsSolvable (Gal p)\np : F[X]\nt : Multiset F[X]\nhps : p ∈ s\na✝ : t ⊆ s\nht : IsSolvable (Gal (Multiset.prod t))\n⊢ IsSolvable (Gal (Multiset.prod (insert p t)))\n[PROOFSTEP]\nrw [Multiset.insert_eq_cons, Multiset.prod_cons]\n[GOAL]\ncase h₂\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\ns : Multiset F[X]\nhs : ∀ (p : F[X]), p ∈ s → IsSolvable (Gal p)\np : F[X]\nt : Multiset F[X]\nhps : p ∈ s\na✝ : t ⊆ s\nht : IsSolvable (Gal (Multiset.prod t))\n⊢ IsSolvable (Gal (p * Multiset.prod t))\n[PROOFSTEP]\nexact gal_mul_isSolvable (hs p hps) ht\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np q : F[X]\nhpq : Splits (algebraMap F (SplittingField q)) p\nhp : IsSolvable (Gal p)\nhq : IsSolvable (Gal (Polynomial.map (algebraMap F (SplittingField p)) q))\n⊢ IsSolvable (Gal q)\n[PROOFSTEP]\nlet K := p.SplittingField\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np q : F[X]\nhpq : Splits (algebraMap F (SplittingField q)) p\nhp : IsSolvable (Gal p)\nhq : IsSolvable (Gal (Polynomial.map (algebraMap F (SplittingField p)) q))\nK : Type u_1 := SplittingField p\n⊢ IsSolvable (Gal q)\n[PROOFSTEP]\nlet L := q.SplittingField\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np q : F[X]\nhpq : Splits (algebraMap F (SplittingField q)) p\nhp : IsSolvable (Gal p)\nhq : IsSolvable (Gal (Polynomial.map (algebraMap F (SplittingField p)) q))\nK : Type u_1 := SplittingField p\nL : Type u_1 := SplittingField q\n⊢ IsSolvable (Gal q)\n[PROOFSTEP]\nhaveI : Fact (p.Splits (algebraMap F L)) := ⟨hpq⟩\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np q : F[X]\nhpq : Splits (algebraMap F (SplittingField q)) p\nhp : IsSolvable (Gal p)\nhq : IsSolvable (Gal (Polynomial.map (algebraMap F (SplittingField p)) q))\nK : Type u_1 := SplittingField p\nL : Type u_1 := SplittingField q\nthis : Fact (Splits (algebraMap F L) p)\n⊢ IsSolvable (Gal q)\n[PROOFSTEP]\nlet ϕ : (L ≃ₐ[K] L) ≃* (q.map (algebraMap F K)).Gal := (IsSplittingField.algEquiv L (q.map (algebraMap F K))).autCongr\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np q : F[X]\nhpq : Splits (algebraMap F (SplittingField q)) p\nhp : IsSolvable (Gal p)\nhq : IsSolvable (Gal (Polynomial.map (algebraMap F (SplittingField p)) q))\nK : Type u_1 := SplittingField p\nL : Type u_1 := SplittingField q\nthis : Fact (Splits (algebraMap F L) p)\nϕ : (L ≃ₐ[K] L) ≃* Gal (Polynomial.map (algebraMap F K) q) :=\n  AlgEquiv.autCongr (IsSplittingField.algEquiv L (Polynomial.map (algebraMap F K) q))\n⊢ IsSolvable (Gal q)\n[PROOFSTEP]\nhave ϕ_inj : Function.Injective ϕ.toMonoidHom := ϕ.injective\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np q : F[X]\nhpq : Splits (algebraMap F (SplittingField q)) p\nhp : IsSolvable (Gal p)\nhq : IsSolvable (Gal (Polynomial.map (algebraMap F (SplittingField p)) q))\nK : Type u_1 := SplittingField p\nL : Type u_1 := SplittingField q\nthis : Fact (Splits (algebraMap F L) p)\nϕ : (L ≃ₐ[K] L) ≃* Gal (Polynomial.map (algebraMap F K) q) :=\n  AlgEquiv.autCongr (IsSplittingField.algEquiv L (Polynomial.map (algebraMap F K) q))\nϕ_inj : Function.Injective ↑(MulEquiv.toMonoidHom ϕ)\n⊢ IsSolvable (Gal q)\n[PROOFSTEP]\nhaveI : IsSolvable (K ≃ₐ[F] K) := hp\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np q : F[X]\nhpq : Splits (algebraMap F (SplittingField q)) p\nhp : IsSolvable (Gal p)\nhq : IsSolvable (Gal (Polynomial.map (algebraMap F (SplittingField p)) q))\nK : Type u_1 := SplittingField p\nL : Type u_1 := SplittingField q\nthis✝ : Fact (Splits (algebraMap F L) p)\nϕ : (L ≃ₐ[K] L) ≃* Gal (Polynomial.map (algebraMap F K) q) :=\n  AlgEquiv.autCongr (IsSplittingField.algEquiv L (Polynomial.map (algebraMap F K) q))\nϕ_inj : Function.Injective ↑(MulEquiv.toMonoidHom ϕ)\nthis : IsSolvable (K ≃ₐ[F] K)\n⊢ IsSolvable (Gal q)\n[PROOFSTEP]\nhaveI : IsSolvable (L ≃ₐ[K] L) := solvable_of_solvable_injective ϕ_inj\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np q : F[X]\nhpq : Splits (algebraMap F (SplittingField q)) p\nhp : IsSolvable (Gal p)\nhq : IsSolvable (Gal (Polynomial.map (algebraMap F (SplittingField p)) q))\nK : Type u_1 := SplittingField p\nL : Type u_1 := SplittingField q\nthis✝¹ : Fact (Splits (algebraMap F L) p)\nϕ : (L ≃ₐ[K] L) ≃* Gal (Polynomial.map (algebraMap F K) q) :=\n  AlgEquiv.autCongr (IsSplittingField.algEquiv L (Polynomial.map (algebraMap F K) q))\nϕ_inj : Function.Injective ↑(MulEquiv.toMonoidHom ϕ)\nthis✝ : IsSolvable (K ≃ₐ[F] K)\nthis : IsSolvable (L ≃ₐ[K] L)\n⊢ IsSolvable (Gal q)\n[PROOFSTEP]\nexact isSolvable_of_isScalarTower F p.SplittingField q.SplittingField\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\n⊢ IsSolvable (Gal (X ^ n - 1))\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : n = 0\n⊢ IsSolvable (Gal (X ^ n - 1))\n[PROOFSTEP]\nrw [hn, pow_zero, sub_self]\n[GOAL]\ncase pos\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : n = 0\n⊢ IsSolvable (Gal 0)\n[PROOFSTEP]\nexact gal_zero_isSolvable\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : ¬n = 0\n⊢ IsSolvable (Gal (X ^ n - 1))\n[PROOFSTEP]\nhave hn' : 0 < n := pos_iff_ne_zero.mpr hn\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : ¬n = 0\nhn' : 0 < n\n⊢ IsSolvable (Gal (X ^ n - 1))\n[PROOFSTEP]\nhave hn'' : (X ^ n - 1 : F[X]) ≠ 0 := X_pow_sub_C_ne_zero hn' 1\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - 1 ≠ 0\n⊢ IsSolvable (Gal (X ^ n - 1))\n[PROOFSTEP]\napply isSolvable_of_comm\n[GOAL]\ncase neg.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - 1 ≠ 0\n⊢ ∀ (a b : Gal (X ^ n - 1)), a * b = b * a\n[PROOFSTEP]\nintro σ τ\n[GOAL]\ncase neg.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - 1 ≠ 0\nσ τ : Gal (X ^ n - 1)\n⊢ σ * τ = τ * σ\n[PROOFSTEP]\next a ha\n[GOAL]\ncase neg.h.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - 1 ≠ 0\nσ τ : Gal (X ^ n - 1)\na : SplittingField (X ^ n - 1)\nha : a ∈ rootSet (X ^ n - 1) (SplittingField (X ^ n - 1))\n⊢ ↑(σ * τ) a = ↑(τ * σ) a\n[PROOFSTEP]\nsimp only [mem_rootSet_of_ne hn'', map_sub, aeval_X_pow, aeval_one, sub_eq_zero] at ha \n[GOAL]\ncase neg.h.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - 1 ≠ 0\nσ τ : Gal (X ^ n - 1)\na : SplittingField (X ^ n - 1)\nha : a ^ n = 1\n⊢ ↑(σ * τ) a = ↑(τ * σ) a\n[PROOFSTEP]\nhave key : ∀ σ : (X ^ n - 1 : F[X]).Gal, ∃ m : ℕ, σ a = a ^ m :=\n  by\n  intro σ\n  lift n to ℕ+ using hn'\n  exact map_rootsOfUnity_eq_pow_self σ.toAlgHom (rootsOfUnity.mkOfPowEq a ha)\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - 1 ≠ 0\nσ τ : Gal (X ^ n - 1)\na : SplittingField (X ^ n - 1)\nha : a ^ n = 1\n⊢ ∀ (σ : Gal (X ^ n - 1)), ∃ m, ↑σ a = a ^ m\n[PROOFSTEP]\nintro σ\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - 1 ≠ 0\nσ✝ τ : Gal (X ^ n - 1)\na : SplittingField (X ^ n - 1)\nha : a ^ n = 1\nσ : Gal (X ^ n - 1)\n⊢ ∃ m, ↑σ a = a ^ m\n[PROOFSTEP]\nlift n to ℕ+ using hn'\n[GOAL]\ncase intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ+\nhn : ¬↑n = 0\nhn'' : X ^ ↑n - 1 ≠ 0\nσ✝ τ : Gal (X ^ ↑n - 1)\na : SplittingField (X ^ ↑n - 1)\nha : a ^ ↑n = 1\nσ : Gal (X ^ ↑n - 1)\n⊢ ∃ m, ↑σ a = a ^ m\n[PROOFSTEP]\nexact map_rootsOfUnity_eq_pow_self σ.toAlgHom (rootsOfUnity.mkOfPowEq a ha)\n[GOAL]\ncase neg.h.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - 1 ≠ 0\nσ τ : Gal (X ^ n - 1)\na : SplittingField (X ^ n - 1)\nha : a ^ n = 1\nkey : ∀ (σ : Gal (X ^ n - 1)), ∃ m, ↑σ a = a ^ m\n⊢ ↑(σ * τ) a = ↑(τ * σ) a\n[PROOFSTEP]\nobtain ⟨c, hc⟩ := key σ\n[GOAL]\ncase neg.h.h.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - 1 ≠ 0\nσ τ : Gal (X ^ n - 1)\na : SplittingField (X ^ n - 1)\nha : a ^ n = 1\nkey : ∀ (σ : Gal (X ^ n - 1)), ∃ m, ↑σ a = a ^ m\nc : ℕ\nhc : ↑σ a = a ^ c\n⊢ ↑(σ * τ) a = ↑(τ * σ) a\n[PROOFSTEP]\nobtain ⟨d, hd⟩ := key τ\n[GOAL]\ncase neg.h.h.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - 1 ≠ 0\nσ τ : Gal (X ^ n - 1)\na : SplittingField (X ^ n - 1)\nha : a ^ n = 1\nkey : ∀ (σ : Gal (X ^ n - 1)), ∃ m, ↑σ a = a ^ m\nc : ℕ\nhc : ↑σ a = a ^ c\nd : ℕ\nhd : ↑τ a = a ^ d\n⊢ ↑(σ * τ) a = ↑(τ * σ) a\n[PROOFSTEP]\nrw [σ.mul_apply, τ.mul_apply, hc, τ.map_pow, hd, σ.map_pow, hc, ← pow_mul, pow_mul']\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\n⊢ IsSolvable (Gal (X ^ n - ↑C a))\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : a = 0\n⊢ IsSolvable (Gal (X ^ n - ↑C a))\n[PROOFSTEP]\nrw [ha, C_0, sub_zero]\n[GOAL]\ncase pos\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : a = 0\n⊢ IsSolvable (Gal (X ^ n))\n[PROOFSTEP]\nexact gal_X_pow_isSolvable n\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\n⊢ IsSolvable (Gal (X ^ n - ↑C a))\n[PROOFSTEP]\nhave ha' : algebraMap F (X ^ n - C a).SplittingField a ≠ 0 :=\n  mt ((injective_iff_map_eq_zero _).mp (RingHom.injective _) a) ha\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\n⊢ IsSolvable (Gal (X ^ n - ↑C a))\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : n = 0\n⊢ IsSolvable (Gal (X ^ n - ↑C a))\n[PROOFSTEP]\nrw [hn, pow_zero, ← C_1, ← C_sub]\n[GOAL]\ncase pos\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : n = 0\n⊢ IsSolvable (Gal (↑C (1 - a)))\n[PROOFSTEP]\nexact gal_C_isSolvable (1 - a)\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\n⊢ IsSolvable (Gal (X ^ n - ↑C a))\n[PROOFSTEP]\nhave hn' : 0 < n := pos_iff_ne_zero.mpr hn\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\n⊢ IsSolvable (Gal (X ^ n - ↑C a))\n[PROOFSTEP]\nhave hn'' : X ^ n - C a ≠ 0 := X_pow_sub_C_ne_zero hn' a\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\n⊢ IsSolvable (Gal (X ^ n - ↑C a))\n[PROOFSTEP]\nhave hn''' : (X ^ n - 1 : F[X]) ≠ 0 := X_pow_sub_C_ne_zero hn' 1\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\n⊢ IsSolvable (Gal (X ^ n - ↑C a))\n[PROOFSTEP]\nhave mem_range :\n  ∀ {c : (X ^ n - C a).SplittingField}, (c ^ n = 1 → (∃ d, algebraMap F (X ^ n - C a).SplittingField d = c)) :=\n  fun {c} hc =>\n  RingHom.mem_range.mp\n    (minpoly.mem_range_of_degree_eq_one F c\n      (h.def.resolve_left hn''' (minpoly.irreducible ((SplittingField.instNormal (X ^ n - C a)).isIntegral c))\n        (minpoly.dvd F c (by rwa [map_id, AlgHom.map_sub, sub_eq_zero, aeval_X_pow, aeval_one]))))\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nc : SplittingField (X ^ n - ↑C a)\nhc : c ^ n = 1\n⊢ ↑(aeval c) (Polynomial.map (RingHom.id F) (X ^ n - 1)) = 0\n[PROOFSTEP]\nrwa [map_id, AlgHom.map_sub, sub_eq_zero, aeval_X_pow, aeval_one]\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\n⊢ IsSolvable (Gal (X ^ n - ↑C a))\n[PROOFSTEP]\napply isSolvable_of_comm\n[GOAL]\ncase neg.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\n⊢ ∀ (a_1 b : Gal (X ^ n - ↑C a)), a_1 * b = b * a_1\n[PROOFSTEP]\nintro σ τ\n[GOAL]\ncase neg.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ τ : Gal (X ^ n - ↑C a)\n⊢ σ * τ = τ * σ\n[PROOFSTEP]\next b hb\n[GOAL]\ncase neg.h.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ∈ rootSet (X ^ n - ↑C a) (SplittingField (X ^ n - ↑C a))\n⊢ ↑(σ * τ) b = ↑(τ * σ) b\n[PROOFSTEP]\nrw [mem_rootSet_of_ne hn'', map_sub, aeval_X_pow, aeval_C, sub_eq_zero] at hb \n[GOAL]\ncase neg.h.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\n⊢ ↑(σ * τ) b = ↑(τ * σ) b\n[PROOFSTEP]\nhave hb' : b ≠ 0 := by\n  intro hb'\n  rw [hb', zero_pow hn'] at hb \n  exact ha' hb.symm\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\n⊢ b ≠ 0\n[PROOFSTEP]\nintro hb'\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\nhb' : b = 0\n⊢ False\n[PROOFSTEP]\nrw [hb', zero_pow hn'] at hb \n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : 0 = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\nhb' : b = 0\n⊢ False\n[PROOFSTEP]\nexact ha' hb.symm\n[GOAL]\ncase neg.h.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\nhb' : b ≠ 0\n⊢ ↑(σ * τ) b = ↑(τ * σ) b\n[PROOFSTEP]\nhave key : ∀ σ : (X ^ n - C a).Gal, ∃ c, σ b = b * algebraMap F _ c :=\n  by\n  intro σ\n  have key : (σ b / b) ^ n = 1 := by rw [div_pow, ← σ.map_pow, hb, σ.commutes, div_self ha']\n  obtain ⟨c, hc⟩ := mem_range key\n  use c\n  rw [hc, mul_div_cancel' (σ b) hb']\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\nhb' : b ≠ 0\n⊢ ∀ (σ : Gal (X ^ n - ↑C a)), ∃ c, ↑σ b = b * ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) c\n[PROOFSTEP]\nintro σ\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ✝ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\nhb' : b ≠ 0\nσ : Gal (X ^ n - ↑C a)\n⊢ ∃ c, ↑σ b = b * ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) c\n[PROOFSTEP]\nhave key : (σ b / b) ^ n = 1 := by rw [div_pow, ← σ.map_pow, hb, σ.commutes, div_self ha']\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ✝ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\nhb' : b ≠ 0\nσ : Gal (X ^ n - ↑C a)\n⊢ (↑σ b / b) ^ n = 1\n[PROOFSTEP]\nrw [div_pow, ← σ.map_pow, hb, σ.commutes, div_self ha']\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ✝ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\nhb' : b ≠ 0\nσ : Gal (X ^ n - ↑C a)\nkey : (↑σ b / b) ^ n = 1\n⊢ ∃ c, ↑σ b = b * ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) c\n[PROOFSTEP]\nobtain ⟨c, hc⟩ := mem_range key\n[GOAL]\ncase intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ✝ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\nhb' : b ≠ 0\nσ : Gal (X ^ n - ↑C a)\nkey : (↑σ b / b) ^ n = 1\nc : F\nhc : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) c = ↑σ b / b\n⊢ ∃ c, ↑σ b = b * ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) c\n[PROOFSTEP]\nuse c\n[GOAL]\ncase h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ✝ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\nhb' : b ≠ 0\nσ : Gal (X ^ n - ↑C a)\nkey : (↑σ b / b) ^ n = 1\nc : F\nhc : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) c = ↑σ b / b\n⊢ ↑σ b = b * ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) c\n[PROOFSTEP]\nrw [hc, mul_div_cancel' (σ b) hb']\n[GOAL]\ncase neg.h.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\nhb' : b ≠ 0\nkey : ∀ (σ : Gal (X ^ n - ↑C a)), ∃ c, ↑σ b = b * ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) c\n⊢ ↑(σ * τ) b = ↑(τ * σ) b\n[PROOFSTEP]\nobtain ⟨c, hc⟩ := key σ\n[GOAL]\ncase neg.h.h.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\nhb' : b ≠ 0\nkey : ∀ (σ : Gal (X ^ n - ↑C a)), ∃ c, ↑σ b = b * ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) c\nc : F\nhc : ↑σ b = b * ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) c\n⊢ ↑(σ * τ) b = ↑(τ * σ) b\n[PROOFSTEP]\nobtain ⟨d, hd⟩ := key τ\n[GOAL]\ncase neg.h.h.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\na : F\nh : Splits (RingHom.id F) (X ^ n - 1)\nha : ¬a = 0\nha' : ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : X ^ n - ↑C a ≠ 0\nhn''' : X ^ n - 1 ≠ 0\nmem_range :\n  ∀ {c : SplittingField (X ^ n - ↑C a)}, c ^ n = 1 → ∃ d, ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d = c\nσ τ : Gal (X ^ n - ↑C a)\nb : SplittingField (X ^ n - ↑C a)\nhb : b ^ n = ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) a\nhb' : b ≠ 0\nkey : ∀ (σ : Gal (X ^ n - ↑C a)), ∃ c, ↑σ b = b * ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) c\nc : F\nhc : ↑σ b = b * ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) c\nd : F\nhd : ↑τ b = b * ↑(algebraMap F (SplittingField (X ^ n - ↑C a))) d\n⊢ ↑(σ * τ) b = ↑(τ * σ) b\n[PROOFSTEP]\nrw [σ.mul_apply, τ.mul_apply, hc, τ.map_mul, τ.commutes, hd, σ.map_mul, σ.commutes, hc, mul_assoc, mul_assoc,\n  mul_right_inj' hb', mul_comm]\n[GOAL]\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\nhave ha' : i a ≠ 0 := mt ((injective_iff_map_eq_zero i).mp i.injective a) ha\n[GOAL]\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : n = 0\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\nrw [hn, pow_zero, sub_self]\n[GOAL]\ncase pos\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : n = 0\n⊢ Splits i 0\n[PROOFSTEP]\nexact splits_zero i\n[GOAL]\ncase neg\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\nhave hn' : 0 < n := pos_iff_ne_zero.mpr hn\n[GOAL]\ncase neg\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\nhave hn'' : (X ^ n - C a).degree ≠ 0 := ne_of_eq_of_ne (degree_X_pow_sub_C hn' a) (mt WithBot.coe_eq_coe.mp hn)\n[GOAL]\ncase neg\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\nobtain ⟨b, hb⟩ := exists_root_of_splits i h hn''\n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : eval₂ i b (X ^ n - ↑C a) = 0\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\nrw [eval₂_sub, eval₂_X_pow, eval₂_C, sub_eq_zero] at hb \n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\nhave hb' : b ≠ 0 := by\n  intro hb'\n  rw [hb', zero_pow hn'] at hb \n  exact ha' hb.symm\n[GOAL]\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\n⊢ b ≠ 0\n[PROOFSTEP]\nintro hb'\n[GOAL]\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b = 0\n⊢ False\n[PROOFSTEP]\nrw [hb', zero_pow hn'] at hb \n[GOAL]\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : 0 = ↑i a\nhb' : b = 0\n⊢ False\n[PROOFSTEP]\nexact ha' hb.symm\n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\nlet s := ((X ^ n - C a).map i).roots\n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\nhave hs : _ = _ * (s.map _).prod := eq_prod_roots_of_splits h\n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs :\n  Polynomial.map i (X ^ n - ↑C a) =\n    ↑C (↑i (leadingCoeff (X ^ n - ↑C a))) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\nrw [leadingCoeff_X_pow_sub_C hn', RingHom.map_one, C_1, one_mul] at hs \n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\nhave hs' : Multiset.card s = n := (natDegree_eq_card_roots h).symm.trans natDegree_X_pow_sub_C\n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\n⊢ Splits i (X ^ n - 1)\n[PROOFSTEP]\napply @splits_of_exists_multiset F E _ _ i (X ^ n - 1) (s.map fun c : E => c / b)\n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\n⊢ Polynomial.map i (X ^ n - 1) =\n    ↑C (↑i (leadingCoeff (X ^ n - 1))) *\n      Multiset.prod (Multiset.map (fun a => X - ↑C a) (Multiset.map (fun c => c / b) s))\n[PROOFSTEP]\nrw [leadingCoeff_X_pow_sub_one hn', RingHom.map_one, C_1, one_mul, Multiset.map_map]\n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\n⊢ Polynomial.map i (X ^ n - 1) = Multiset.prod (Multiset.map ((fun a => X - ↑C a) ∘ fun c => c / b) s)\n[PROOFSTEP]\nhave C_mul_C : C (i a⁻¹) * C (i a) = 1 := by rw [← C_mul, ← i.map_mul, inv_mul_cancel ha, i.map_one, C_1]\n[GOAL]\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\n⊢ ↑C (↑i a⁻¹) * ↑C (↑i a) = 1\n[PROOFSTEP]\nrw [← C_mul, ← i.map_mul, inv_mul_cancel ha, i.map_one, C_1]\n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\nC_mul_C : ↑C (↑i a⁻¹) * ↑C (↑i a) = 1\n⊢ Polynomial.map i (X ^ n - 1) = Multiset.prod (Multiset.map ((fun a => X - ↑C a) ∘ fun c => c / b) s)\n[PROOFSTEP]\nhave key1 : (X ^ n - 1 : F[X]).map i = C (i a⁻¹) * ((X ^ n - C a).map i).comp (C b * X) := by\n  rw [Polynomial.map_sub, Polynomial.map_sub, Polynomial.map_pow, map_X, map_C, Polynomial.map_one, sub_comp, pow_comp,\n    X_comp, C_comp, mul_pow, ← C_pow, hb, mul_sub, ← mul_assoc, C_mul_C, one_mul]\n[GOAL]\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\nC_mul_C : ↑C (↑i a⁻¹) * ↑C (↑i a) = 1\n⊢ Polynomial.map i (X ^ n - 1) = ↑C (↑i a⁻¹) * comp (Polynomial.map i (X ^ n - ↑C a)) (↑C b * X)\n[PROOFSTEP]\nrw [Polynomial.map_sub, Polynomial.map_sub, Polynomial.map_pow, map_X, map_C, Polynomial.map_one, sub_comp, pow_comp,\n  X_comp, C_comp, mul_pow, ← C_pow, hb, mul_sub, ← mul_assoc, C_mul_C, one_mul]\n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\nC_mul_C : ↑C (↑i a⁻¹) * ↑C (↑i a) = 1\nkey1 : Polynomial.map i (X ^ n - 1) = ↑C (↑i a⁻¹) * comp (Polynomial.map i (X ^ n - ↑C a)) (↑C b * X)\n⊢ Polynomial.map i (X ^ n - 1) = Multiset.prod (Multiset.map ((fun a => X - ↑C a) ∘ fun c => c / b) s)\n[PROOFSTEP]\nhave key2 : ((fun q : E[X] => q.comp (C b * X)) ∘ fun c : E => X - C c) = fun c : E => C b * (X - C (c / b)) :=\n  by\n  ext1 c\n  dsimp only [Function.comp_apply]\n  rw [sub_comp, X_comp, C_comp, mul_sub, ← C_mul, mul_div_cancel' c hb']\n[GOAL]\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\nC_mul_C : ↑C (↑i a⁻¹) * ↑C (↑i a) = 1\nkey1 : Polynomial.map i (X ^ n - 1) = ↑C (↑i a⁻¹) * comp (Polynomial.map i (X ^ n - ↑C a)) (↑C b * X)\n⊢ ((fun q => comp q (↑C b * X)) ∘ fun c => X - ↑C c) = fun c => ↑C b * (X - ↑C (c / b))\n[PROOFSTEP]\next1 c\n[GOAL]\ncase h\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\nC_mul_C : ↑C (↑i a⁻¹) * ↑C (↑i a) = 1\nkey1 : Polynomial.map i (X ^ n - 1) = ↑C (↑i a⁻¹) * comp (Polynomial.map i (X ^ n - ↑C a)) (↑C b * X)\nc : E\n⊢ ((fun q => comp q (↑C b * X)) ∘ fun c => X - ↑C c) c = ↑C b * (X - ↑C (c / b))\n[PROOFSTEP]\ndsimp only [Function.comp_apply]\n[GOAL]\ncase h\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\nC_mul_C : ↑C (↑i a⁻¹) * ↑C (↑i a) = 1\nkey1 : Polynomial.map i (X ^ n - 1) = ↑C (↑i a⁻¹) * comp (Polynomial.map i (X ^ n - ↑C a)) (↑C b * X)\nc : E\n⊢ comp (X - ↑C c) (↑C b * X) = ↑C b * (X - ↑C (c / b))\n[PROOFSTEP]\nrw [sub_comp, X_comp, C_comp, mul_sub, ← C_mul, mul_div_cancel' c hb']\n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\nC_mul_C : ↑C (↑i a⁻¹) * ↑C (↑i a) = 1\nkey1 : Polynomial.map i (X ^ n - 1) = ↑C (↑i a⁻¹) * comp (Polynomial.map i (X ^ n - ↑C a)) (↑C b * X)\nkey2 : ((fun q => comp q (↑C b * X)) ∘ fun c => X - ↑C c) = fun c => ↑C b * (X - ↑C (c / b))\n⊢ Polynomial.map i (X ^ n - 1) = Multiset.prod (Multiset.map ((fun a => X - ↑C a) ∘ fun c => c / b) s)\n[PROOFSTEP]\nrw [key1, hs, multiset_prod_comp, Multiset.map_map, key2, Multiset.prod_map_mul,\n  -- Porting note: needed for `Multiset.map_const` to workshow (fun (_ : E) => C b) = Function.const E (C b) by rfl,\n  Multiset.map_const, Multiset.prod_replicate, hs', ← C_pow, hb, ← mul_assoc, C_mul_C, one_mul]\n[GOAL]\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\nC_mul_C : ↑C (↑i a⁻¹) * ↑C (↑i a) = 1\nkey1 : Polynomial.map i (X ^ n - 1) = ↑C (↑i a⁻¹) * comp (Polynomial.map i (X ^ n - ↑C a)) (↑C b * X)\nkey2 : ((fun q => comp q (↑C b * X)) ∘ fun c => X - ↑C c) = fun c => ↑C b * (X - ↑C (c / b))\n⊢ (fun x => ↑C b) = Function.const E (↑C b)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg.intro\nF✝ : Type u_1\ninst✝⁴ : Field F✝\nE✝ : Type u_2\ninst✝³ : Field E✝\ninst✝² : Algebra F✝ E✝\nF : Type u_3\ninst✝¹ : Field F\nE : Type u_4\ninst✝ : Field E\ni : F →+* E\nn : ℕ\na : F\nha : a ≠ 0\nh : Splits i (X ^ n - ↑C a)\nha' : ↑i a ≠ 0\nhn : ¬n = 0\nhn' : 0 < n\nhn'' : degree (X ^ n - ↑C a) ≠ 0\nb : E\nhb : b ^ n = ↑i a\nhb' : b ≠ 0\ns : Multiset E := roots (Polynomial.map i (X ^ n - ↑C a))\nhs : Polynomial.map i (X ^ n - ↑C a) = Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nhs' : ↑Multiset.card s = n\nC_mul_C : ↑C (↑i a⁻¹) * ↑C (↑i a) = 1\nkey1 : Polynomial.map i (X ^ n - 1) = ↑C (↑i a⁻¹) * comp (Polynomial.map i (X ^ n - ↑C a)) (↑C b * X)\nkey2 : ((fun q => comp q (↑C b * X)) ∘ fun c => X - ↑C c) = fun c => ↑C b * (X - ↑C (c / b))\n⊢ Multiset.prod (Multiset.map (fun c => X - ↑C (c / b)) s) =\n    Multiset.prod (Multiset.map ((fun a => X - ↑C a) ∘ fun c => c / b) s)\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nx : F\n⊢ IsSolvable (Gal (X ^ n - ↑C x))\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nx : F\nhx : x = 0\n⊢ IsSolvable (Gal (X ^ n - ↑C x))\n[PROOFSTEP]\nrw [hx, C_0, sub_zero]\n[GOAL]\ncase pos\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nx : F\nhx : x = 0\n⊢ IsSolvable (Gal (X ^ n))\n[PROOFSTEP]\nexact gal_X_pow_isSolvable n\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nx : F\nhx : ¬x = 0\n⊢ IsSolvable (Gal (X ^ n - ↑C x))\n[PROOFSTEP]\napply gal_isSolvable_tower (X ^ n - 1) (X ^ n - C x)\n[GOAL]\ncase neg.hpq\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nx : F\nhx : ¬x = 0\n⊢ Splits (algebraMap F (SplittingField (X ^ n - ↑C x))) (X ^ n - 1)\n[PROOFSTEP]\nexact splits_X_pow_sub_one_of_X_pow_sub_C _ n hx (SplittingField.splits _)\n[GOAL]\ncase neg.hp\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nx : F\nhx : ¬x = 0\n⊢ IsSolvable (Gal (X ^ n - 1))\n[PROOFSTEP]\nexact gal_X_pow_sub_one_isSolvable n\n[GOAL]\ncase neg.hq\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nx : F\nhx : ¬x = 0\n⊢ IsSolvable (Gal (Polynomial.map (algebraMap F (SplittingField (X ^ n - 1))) (X ^ n - ↑C x)))\n[PROOFSTEP]\nrw [Polynomial.map_sub, Polynomial.map_pow, map_X, map_C]\n[GOAL]\ncase neg.hq\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nx : F\nhx : ¬x = 0\n⊢ IsSolvable (Gal (X ^ n - ↑C (↑(algebraMap F (SplittingField (X ^ n - 1))) x)))\n[PROOFSTEP]\napply gal_X_pow_sub_C_isSolvable_aux\n[GOAL]\ncase neg.hq.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nx : F\nhx : ¬x = 0\n⊢ Splits (RingHom.id (SplittingField (X ^ n - 1))) (X ^ n - 1)\n[PROOFSTEP]\nhave key := SplittingField.splits (X ^ n - 1 : F[X])\n[GOAL]\ncase neg.hq.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nn : ℕ\nx : F\nhx : ¬x = 0\nkey : Splits (algebraMap F (SplittingField (X ^ n - 1))) (X ^ n - 1)\n⊢ Splits (RingHom.id (SplittingField (X ^ n - 1))) (X ^ n - 1)\n[PROOFSTEP]\nrwa [← splits_id_iff_splits, Polynomial.map_sub, Polynomial.map_pow, map_X, Polynomial.map_one] at key \n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\n⊢ ∀ {a b : E}, a ∈ IsSolvableByRad F → b ∈ IsSolvableByRad F → a * b ∈ IsSolvableByRad F\n[PROOFSTEP]\napply IsSolvableByRad.mul\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\n⊢ 1 ∈\n    { carrier := IsSolvableByRad F,\n        mul_mem' := (_ : ∀ (α β : E), IsSolvableByRad F α → IsSolvableByRad F β → IsSolvableByRad F (α * β)) }.carrier\n[PROOFSTEP]\nchange IsSolvableByRad F 1\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\n⊢ IsSolvableByRad F 1\n[PROOFSTEP]\nconvert IsSolvableByRad.base (E := E) (1 : F)\n[GOAL]\ncase h.e'_6\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\n⊢ 1 = ↑(algebraMap F E) 1\n[PROOFSTEP]\nrw [RingHom.map_one]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\n⊢ ∀ {a b : E},\n    a ∈\n        {\n              toSubsemigroup :=\n                { carrier := IsSolvableByRad F,\n                  mul_mem' :=\n                    (_ : ∀ (α β : E), IsSolvableByRad F α → IsSolvableByRad F β → IsSolvableByRad F (α * β)) },\n              one_mem' := (_ : IsSolvableByRad F 1) }.toSubsemigroup.carrier →\n      b ∈\n          {\n                toSubsemigroup :=\n                  { carrier := IsSolvableByRad F,\n                    mul_mem' :=\n                      (_ : ∀ (α β : E), IsSolvableByRad F α → IsSolvableByRad F β → IsSolvableByRad F (α * β)) },\n                one_mem' := (_ : IsSolvableByRad F 1) }.toSubsemigroup.carrier →\n        a + b ∈\n          {\n                toSubsemigroup :=\n                  { carrier := IsSolvableByRad F,\n                    mul_mem' :=\n                      (_ : ∀ (α β : E), IsSolvableByRad F α → IsSolvableByRad F β → IsSolvableByRad F (α * β)) },\n                one_mem' := (_ : IsSolvableByRad F 1) }.toSubsemigroup.carrier\n[PROOFSTEP]\napply IsSolvableByRad.add\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\n⊢ 0 ∈\n    {\n          toSubsemigroup :=\n            { carrier := IsSolvableByRad F,\n              mul_mem' := (_ : ∀ (α β : E), IsSolvableByRad F α → IsSolvableByRad F β → IsSolvableByRad F (α * β)) },\n          one_mem' := (_ : IsSolvableByRad F 1) }.toSubsemigroup.carrier\n[PROOFSTEP]\nchange IsSolvableByRad F 0\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\n⊢ IsSolvableByRad F 0\n[PROOFSTEP]\nconvert IsSolvableByRad.base (E := E) (0 : F)\n[GOAL]\ncase h.e'_6\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\n⊢ 0 = ↑(algebraMap F E) 0\n[PROOFSTEP]\nrw [RingHom.map_zero]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : { x // x ∈ solvableByRad F E }\n⊢ P α\n[PROOFSTEP]\nrevert α\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\n⊢ ∀ (α : { x // x ∈ solvableByRad F E }), P α\n[PROOFSTEP]\nsuffices ∀ α : E, IsSolvableByRad F α → ∃ β : solvableByRad F E, ↑β = α ∧ P β\n  by\n  intro α\n  obtain ⟨α₀, hα₀, Pα⟩ := this α (Subtype.mem α)\n  convert Pα\n  exact Subtype.ext hα₀.symm\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nthis : ∀ (α : E), IsSolvableByRad F α → ∃ β, ↑β = α ∧ P β\n⊢ ∀ (α : { x // x ∈ solvableByRad F E }), P α\n[PROOFSTEP]\nintro α\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nthis : ∀ (α : E), IsSolvableByRad F α → ∃ β, ↑β = α ∧ P β\nα : { x // x ∈ solvableByRad F E }\n⊢ P α\n[PROOFSTEP]\nobtain ⟨α₀, hα₀, Pα⟩ := this α (Subtype.mem α)\n[GOAL]\ncase intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nthis : ∀ (α : E), IsSolvableByRad F α → ∃ β, ↑β = α ∧ P β\nα α₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = ↑α\nPα : P α₀\n⊢ P α\n[PROOFSTEP]\nconvert Pα\n[GOAL]\ncase h.e'_1\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nthis : ∀ (α : E), IsSolvableByRad F α → ∃ β, ↑β = α ∧ P β\nα α₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = ↑α\nPα : P α₀\n⊢ α = α₀\n[PROOFSTEP]\nexact Subtype.ext hα₀.symm\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\n⊢ ∀ (α : E), IsSolvableByRad F α → ∃ β, ↑β = α ∧ P β\n[PROOFSTEP]\napply IsSolvableByRad.rec\n[GOAL]\ncase base\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\n⊢ ∀ (α : F), ∃ β, ↑β = ↑(algebraMap F E) α ∧ P β\n[PROOFSTEP]\nexact fun α => ⟨algebraMap F (solvableByRad F E) α, rfl, base α⟩\n[GOAL]\ncase add\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\n⊢ ∀ (α β : E),\n    IsSolvableByRad F α →\n      IsSolvableByRad F β → (∃ β, ↑β = α ∧ P β) → (∃ β_1, ↑β_1 = β ∧ P β_1) → ∃ β_1, ↑β_1 = α + β ∧ P β_1\n[PROOFSTEP]\nintro α β _ _ Pα Pβ\n[GOAL]\ncase add\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα β : E\na✝¹ : IsSolvableByRad F α\na✝ : IsSolvableByRad F β\nPα : ∃ β, ↑β = α ∧ P β\nPβ : ∃ β_1, ↑β_1 = β ∧ P β_1\n⊢ ∃ β_1, ↑β_1 = α + β ∧ P β_1\n[PROOFSTEP]\nobtain ⟨⟨α₀, hα₀, Pα⟩, β₀, hβ₀, Pβ⟩ := Pα, Pβ\n[GOAL]\ncase add.intro.intro.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα β : E\na✝¹ : IsSolvableByRad F α\na✝ : IsSolvableByRad F β\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α\nPα : P α₀\nβ₀ : { x // x ∈ solvableByRad F E }\nhβ₀ : ↑β₀ = β\nPβ : P β₀\n⊢ ∃ β_1, ↑β_1 = α + β ∧ P β_1\n[PROOFSTEP]\nexact ⟨α₀ + β₀, by rw [← hα₀, ← hβ₀]; rfl, add α₀ β₀ Pα Pβ⟩\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα β : E\na✝¹ : IsSolvableByRad F α\na✝ : IsSolvableByRad F β\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α\nPα : P α₀\nβ₀ : { x // x ∈ solvableByRad F E }\nhβ₀ : ↑β₀ = β\nPβ : P β₀\n⊢ ↑(α₀ + β₀) = α + β\n[PROOFSTEP]\nrw [← hα₀, ← hβ₀]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα β : E\na✝¹ : IsSolvableByRad F α\na✝ : IsSolvableByRad F β\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α\nPα : P α₀\nβ₀ : { x // x ∈ solvableByRad F E }\nhβ₀ : ↑β₀ = β\nPβ : P β₀\n⊢ ↑(α₀ + β₀) = ↑α₀ + ↑β₀\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\n⊢ ∀ (α : E), IsSolvableByRad F α → (∃ β, ↑β = α ∧ P β) → ∃ β, ↑β = -α ∧ P β\n[PROOFSTEP]\nintro α _ Pα\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : E\na✝ : IsSolvableByRad F α\nPα : ∃ β, ↑β = α ∧ P β\n⊢ ∃ β, ↑β = -α ∧ P β\n[PROOFSTEP]\nobtain ⟨α₀, hα₀, Pα⟩ := Pα\n[GOAL]\ncase neg.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : E\na✝ : IsSolvableByRad F α\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α\nPα : P α₀\n⊢ ∃ β, ↑β = -α ∧ P β\n[PROOFSTEP]\nexact ⟨-α₀, by rw [← hα₀]; rfl, neg α₀ Pα⟩\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : E\na✝ : IsSolvableByRad F α\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α\nPα : P α₀\n⊢ ↑(-α₀) = -α\n[PROOFSTEP]\nrw [← hα₀]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : E\na✝ : IsSolvableByRad F α\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α\nPα : P α₀\n⊢ ↑(-α₀) = -↑α₀\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mul\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\n⊢ ∀ (α β : E),\n    IsSolvableByRad F α →\n      IsSolvableByRad F β → (∃ β, ↑β = α ∧ P β) → (∃ β_1, ↑β_1 = β ∧ P β_1) → ∃ β_1, ↑β_1 = α * β ∧ P β_1\n[PROOFSTEP]\nintro α β _ _ Pα Pβ\n[GOAL]\ncase mul\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα β : E\na✝¹ : IsSolvableByRad F α\na✝ : IsSolvableByRad F β\nPα : ∃ β, ↑β = α ∧ P β\nPβ : ∃ β_1, ↑β_1 = β ∧ P β_1\n⊢ ∃ β_1, ↑β_1 = α * β ∧ P β_1\n[PROOFSTEP]\nobtain ⟨⟨α₀, hα₀, Pα⟩, β₀, hβ₀, Pβ⟩ := Pα, Pβ\n[GOAL]\ncase mul.intro.intro.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα β : E\na✝¹ : IsSolvableByRad F α\na✝ : IsSolvableByRad F β\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α\nPα : P α₀\nβ₀ : { x // x ∈ solvableByRad F E }\nhβ₀ : ↑β₀ = β\nPβ : P β₀\n⊢ ∃ β_1, ↑β_1 = α * β ∧ P β_1\n[PROOFSTEP]\nexact ⟨α₀ * β₀, by rw [← hα₀, ← hβ₀]; rfl, mul α₀ β₀ Pα Pβ⟩\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα β : E\na✝¹ : IsSolvableByRad F α\na✝ : IsSolvableByRad F β\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α\nPα : P α₀\nβ₀ : { x // x ∈ solvableByRad F E }\nhβ₀ : ↑β₀ = β\nPβ : P β₀\n⊢ ↑(α₀ * β₀) = α * β\n[PROOFSTEP]\nrw [← hα₀, ← hβ₀]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα β : E\na✝¹ : IsSolvableByRad F α\na✝ : IsSolvableByRad F β\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α\nPα : P α₀\nβ₀ : { x // x ∈ solvableByRad F E }\nhβ₀ : ↑β₀ = β\nPβ : P β₀\n⊢ ↑(α₀ * β₀) = ↑α₀ * ↑β₀\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inv\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\n⊢ ∀ (α : E), IsSolvableByRad F α → (∃ β, ↑β = α ∧ P β) → ∃ β, ↑β = α⁻¹ ∧ P β\n[PROOFSTEP]\nintro α _ Pα\n[GOAL]\ncase inv\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : E\na✝ : IsSolvableByRad F α\nPα : ∃ β, ↑β = α ∧ P β\n⊢ ∃ β, ↑β = α⁻¹ ∧ P β\n[PROOFSTEP]\nobtain ⟨α₀, hα₀, Pα⟩ := Pα\n[GOAL]\ncase inv.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : E\na✝ : IsSolvableByRad F α\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α\nPα : P α₀\n⊢ ∃ β, ↑β = α⁻¹ ∧ P β\n[PROOFSTEP]\nexact ⟨α₀⁻¹, by rw [← hα₀]; rfl, inv α₀ Pα⟩\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : E\na✝ : IsSolvableByRad F α\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α\nPα : P α₀\n⊢ ↑α₀⁻¹ = α⁻¹\n[PROOFSTEP]\nrw [← hα₀]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : E\na✝ : IsSolvableByRad F α\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α\nPα : P α₀\n⊢ ↑α₀⁻¹ = (↑α₀)⁻¹\n[PROOFSTEP]\nrfl\n[GOAL]\ncase rad\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\n⊢ ∀ (α : E) (n : ℕ), n ≠ 0 → IsSolvableByRad F (α ^ n) → (∃ β, ↑β = α ^ n ∧ P β) → ∃ β, ↑β = α ∧ P β\n[PROOFSTEP]\nintro α n hn hα Pα\n[GOAL]\ncase rad\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : E\nn : ℕ\nhn : n ≠ 0\nhα : IsSolvableByRad F (α ^ n)\nPα : ∃ β, ↑β = α ^ n ∧ P β\n⊢ ∃ β, ↑β = α ∧ P β\n[PROOFSTEP]\nobtain ⟨α₀, hα₀, Pα⟩ := Pα\n[GOAL]\ncase rad.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : E\nn : ℕ\nhn : n ≠ 0\nhα : IsSolvableByRad F (α ^ n)\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α ^ n\nPα : P α₀\n⊢ ∃ β, ↑β = α ∧ P β\n[PROOFSTEP]\nrefine' ⟨⟨α, IsSolvableByRad.rad α n hn hα⟩, rfl, rad _ n hn _⟩\n[GOAL]\ncase rad.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : E\nn : ℕ\nhn : n ≠ 0\nhα : IsSolvableByRad F (α ^ n)\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α ^ n\nPα : P α₀\n⊢ P ({ val := α, property := (_ : IsSolvableByRad F α) } ^ n)\n[PROOFSTEP]\nconvert Pα\n[GOAL]\ncase h.e'_1\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nP : { x // x ∈ solvableByRad F E } → Prop\nbase : ∀ (α : F), P (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\nadd : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α + β)\nneg : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P (-α)\nmul : ∀ (α β : { x // x ∈ solvableByRad F E }), P α → P β → P (α * β)\ninv : ∀ (α : { x // x ∈ solvableByRad F E }), P α → P α⁻¹\nrad : ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → P (α ^ n) → P α\nα : E\nn : ℕ\nhn : n ≠ 0\nhα : IsSolvableByRad F (α ^ n)\nα₀ : { x // x ∈ solvableByRad F E }\nhα₀ : ↑α₀ = α ^ n\nPα : P α₀\n⊢ { val := α, property := (_ : IsSolvableByRad F α) } ^ n = α₀\n[PROOFSTEP]\nexact Subtype.ext (Eq.trans ((solvableByRad F E).coe_pow _ n) hα₀.symm)\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\n⊢ IsIntegral F α\n[PROOFSTEP]\nrevert α\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α : { x // x ∈ solvableByRad F E }), IsIntegral F α\n[PROOFSTEP]\napply solvableByRad.induction\n[GOAL]\ncase base\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α : F), IsIntegral F (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)\n[PROOFSTEP]\nexact fun _ => isIntegral_algebraMap\n[GOAL]\ncase add\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α β : { x // x ∈ solvableByRad F E }), IsIntegral F α → IsIntegral F β → IsIntegral F (α + β)\n[PROOFSTEP]\nexact fun _ _ => isIntegral_add\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α : { x // x ∈ solvableByRad F E }), IsIntegral F α → IsIntegral F (-α)\n[PROOFSTEP]\nexact fun _ => isIntegral_neg\n[GOAL]\ncase mul\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α β : { x // x ∈ solvableByRad F E }), IsIntegral F α → IsIntegral F β → IsIntegral F (α * β)\n[PROOFSTEP]\nexact fun _ _ => isIntegral_mul\n[GOAL]\ncase inv\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α : { x // x ∈ solvableByRad F E }), IsIntegral F α → IsIntegral F α⁻¹\n[PROOFSTEP]\nintro α hα\n[GOAL]\ncase inv\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nhα : IsIntegral F α\n⊢ IsIntegral F α⁻¹\n[PROOFSTEP]\nexact\n  Subalgebra.inv_mem_of_algebraic (integralClosure F (solvableByRad F E))\n    (show IsAlgebraic F ↑(⟨α, hα⟩ : integralClosure F (solvableByRad F E)) from isAlgebraic_iff_isIntegral.mpr hα)\n[GOAL]\ncase rad\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ), n ≠ 0 → IsIntegral F (α ^ n) → IsIntegral F α\n[PROOFSTEP]\nintro α n hn hα\n[GOAL]\ncase rad\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : IsIntegral F (α ^ n)\n⊢ IsIntegral F α\n[PROOFSTEP]\nobtain ⟨p, h1, h2⟩ := isAlgebraic_iff_isIntegral.mpr hα\n[GOAL]\ncase rad.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : IsIntegral F (α ^ n)\np : F[X]\nh1 : p ≠ 0\nh2 : ↑(aeval (α ^ n)) p = 0\n⊢ IsIntegral F α\n[PROOFSTEP]\nrefine'\n  isAlgebraic_iff_isIntegral.mp\n    ⟨p.comp (X ^ n), ⟨fun h => h1 (leadingCoeff_eq_zero.mp _), by rw [aeval_comp, aeval_X_pow, h2]⟩⟩\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : IsIntegral F (α ^ n)\np : F[X]\nh1 : p ≠ 0\nh2 : ↑(aeval (α ^ n)) p = 0\n⊢ ↑(aeval α) (comp p (X ^ n)) = 0\n[PROOFSTEP]\nrw [aeval_comp, aeval_X_pow, h2]\n[GOAL]\ncase rad.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : IsIntegral F (α ^ n)\np : F[X]\nh1 : p ≠ 0\nh2 : ↑(aeval (α ^ n)) p = 0\nh : comp p (X ^ n) = 0\n⊢ leadingCoeff p = 0\n[PROOFSTEP]\nrwa [← leadingCoeff_eq_zero, leadingCoeff_comp, leadingCoeff_X_pow, one_pow, mul_one] at h \n[GOAL]\ncase rad.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : IsIntegral F (α ^ n)\np : F[X]\nh1 : p ≠ 0\nh2 : ↑(aeval (α ^ n)) p = 0\nh : leadingCoeff (comp p (X ^ n)) = 0\n⊢ natDegree (X ^ n) ≠ 0\n[PROOFSTEP]\nrwa [natDegree_X_pow]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\n⊢ P α\n[PROOFSTEP]\nlet p := minpoly F (α ^ n)\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\n⊢ P α\n[PROOFSTEP]\nhave hp : p.comp (X ^ n) ≠ 0 := by\n  intro h\n  cases' comp_eq_zero_iff.mp h with h' h'\n  · exact minpoly.ne_zero (isIntegral (α ^ n)) h'\n  · exact hn (by rw [← @natDegree_C F, ← h'.2, natDegree_X_pow])\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\n⊢ comp p (X ^ n) ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nh : comp p (X ^ n) = 0\n⊢ False\n[PROOFSTEP]\ncases' comp_eq_zero_iff.mp h with h' h'\n[GOAL]\ncase inl\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nh : comp p (X ^ n) = 0\nh' : p = 0\n⊢ False\n[PROOFSTEP]\nexact minpoly.ne_zero (isIntegral (α ^ n)) h'\n[GOAL]\ncase inr\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nh : comp p (X ^ n) = 0\nh' : eval (coeff (X ^ n) 0) p = 0 ∧ X ^ n = ↑C (coeff (X ^ n) 0)\n⊢ False\n[PROOFSTEP]\nexact hn (by rw [← @natDegree_C F, ← h'.2, natDegree_X_pow])\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nh : comp p (X ^ n) = 0\nh' : eval (coeff (X ^ n) 0) p = 0 ∧ X ^ n = ↑C (coeff (X ^ n) 0)\n⊢ n = 0\n[PROOFSTEP]\nrw [← @natDegree_C F, ← h'.2, natDegree_X_pow]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\n⊢ P α\n[PROOFSTEP]\napply gal_isSolvable_of_splits\n[GOAL]\ncase x\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\n⊢ Fact (Splits (algebraMap F (SplittingField ?q)) (minpoly F α))\n[PROOFSTEP]\nexact\n  ⟨splits_of_splits_of_dvd _ hp (SplittingField.splits (p.comp (X ^ n)))\n      (minpoly.dvd F α (by rw [aeval_comp, aeval_X_pow, minpoly.aeval]))⟩\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\n⊢ ↑(aeval α) (comp p (X ^ n)) = 0\n[PROOFSTEP]\nrw [aeval_comp, aeval_X_pow, minpoly.aeval]\n[GOAL]\ncase hq\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\n⊢ IsSolvable (Gal (comp p (X ^ n)))\n[PROOFSTEP]\nrefine' gal_isSolvable_tower p (p.comp (X ^ n)) _ hα _\n[GOAL]\ncase hq.refine'_1\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\n⊢ Splits (algebraMap F (SplittingField (comp p (X ^ n)))) p\n[PROOFSTEP]\nexact Gal.splits_in_splittingField_of_comp _ _ (by rwa [natDegree_X_pow])\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\n⊢ natDegree (X ^ n) ≠ 0\n[PROOFSTEP]\nrwa [natDegree_X_pow]\n[GOAL]\ncase hq.refine'_2\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\n⊢ IsSolvable (Gal (Polynomial.map (algebraMap F (SplittingField p)) (comp p (X ^ n))))\n[PROOFSTEP]\nobtain ⟨s, hs⟩ := (splits_iff_exists_multiset _).1 (SplittingField.splits p)\n[GOAL]\ncase hq.refine'_2.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\ns : Multiset (SplittingField p)\nhs :\n  Polynomial.map (algebraMap F (SplittingField p)) p =\n    ↑C (↑(algebraMap F (SplittingField p)) (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ IsSolvable (Gal (Polynomial.map (algebraMap F (SplittingField p)) (comp p (X ^ n))))\n[PROOFSTEP]\nrw [map_comp, Polynomial.map_pow, map_X, hs, mul_comp, C_comp]\n[GOAL]\ncase hq.refine'_2.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\ns : Multiset (SplittingField p)\nhs :\n  Polynomial.map (algebraMap F (SplittingField p)) p =\n    ↑C (↑(algebraMap F (SplittingField p)) (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ IsSolvable\n    (Gal\n      (↑C (↑(algebraMap F (SplittingField p)) (leadingCoeff p)) *\n        comp (Multiset.prod (Multiset.map (fun a => X - ↑C a) s)) (X ^ n)))\n[PROOFSTEP]\napply gal_mul_isSolvable (gal_C_isSolvable _)\n[GOAL]\ncase hq.refine'_2.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\ns : Multiset (SplittingField p)\nhs :\n  Polynomial.map (algebraMap F (SplittingField p)) p =\n    ↑C (↑(algebraMap F (SplittingField p)) (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ IsSolvable (Gal (comp (Multiset.prod (Multiset.map (fun a => X - ↑C a) s)) (X ^ n)))\n[PROOFSTEP]\nrw [multiset_prod_comp]\n[GOAL]\ncase hq.refine'_2.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\ns : Multiset (SplittingField p)\nhs :\n  Polynomial.map (algebraMap F (SplittingField p)) p =\n    ↑C (↑(algebraMap F (SplittingField p)) (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ IsSolvable (Gal (Multiset.prod (Multiset.map (fun p_1 => comp p_1 (X ^ n)) (Multiset.map (fun a => X - ↑C a) s))))\n[PROOFSTEP]\napply gal_prod_isSolvable\n[GOAL]\ncase hq.refine'_2.intro.hs\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\ns : Multiset (SplittingField p)\nhs :\n  Polynomial.map (algebraMap F (SplittingField p)) p =\n    ↑C (↑(algebraMap F (SplittingField p)) (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ ∀ (p_1 : (SplittingField p)[X]),\n    p_1 ∈ Multiset.map (fun p_2 => comp p_2 (X ^ n)) (Multiset.map (fun a => X - ↑C a) s) → IsSolvable (Gal p_1)\n[PROOFSTEP]\nintro q hq\n[GOAL]\ncase hq.refine'_2.intro.hs\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\ns : Multiset (SplittingField p)\nhs :\n  Polynomial.map (algebraMap F (SplittingField p)) p =\n    ↑C (↑(algebraMap F (SplittingField p)) (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nq : (SplittingField p)[X]\nhq : q ∈ Multiset.map (fun p_1 => comp p_1 (X ^ n)) (Multiset.map (fun a => X - ↑C a) s)\n⊢ IsSolvable (Gal q)\n[PROOFSTEP]\nrw [Multiset.mem_map] at hq \n[GOAL]\ncase hq.refine'_2.intro.hs\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\ns : Multiset (SplittingField p)\nhs :\n  Polynomial.map (algebraMap F (SplittingField p)) p =\n    ↑C (↑(algebraMap F (SplittingField p)) (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nq : (SplittingField p)[X]\nhq : ∃ a, a ∈ Multiset.map (fun a => X - ↑C a) s ∧ comp a (X ^ n) = q\n⊢ IsSolvable (Gal q)\n[PROOFSTEP]\nobtain ⟨q, hq, rfl⟩ := hq\n[GOAL]\ncase hq.refine'_2.intro.hs.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\ns : Multiset (SplittingField p)\nhs :\n  Polynomial.map (algebraMap F (SplittingField p)) p =\n    ↑C (↑(algebraMap F (SplittingField p)) (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nq : (SplittingField p)[X]\nhq : q ∈ Multiset.map (fun a => X - ↑C a) s\n⊢ IsSolvable (Gal (comp q (X ^ n)))\n[PROOFSTEP]\nrw [Multiset.mem_map] at hq \n[GOAL]\ncase hq.refine'_2.intro.hs.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\ns : Multiset (SplittingField p)\nhs :\n  Polynomial.map (algebraMap F (SplittingField p)) p =\n    ↑C (↑(algebraMap F (SplittingField p)) (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nq : (SplittingField p)[X]\nhq : ∃ a, a ∈ s ∧ X - ↑C a = q\n⊢ IsSolvable (Gal (comp q (X ^ n)))\n[PROOFSTEP]\nobtain ⟨q, _, rfl⟩ := hq\n[GOAL]\ncase hq.refine'_2.intro.hs.intro.intro.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\ns : Multiset (SplittingField p)\nhs :\n  Polynomial.map (algebraMap F (SplittingField p)) p =\n    ↑C (↑(algebraMap F (SplittingField p)) (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nq : SplittingField p\nleft✝ : q ∈ s\n⊢ IsSolvable (Gal (comp (X - ↑C q) (X ^ n)))\n[PROOFSTEP]\nrw [sub_comp, X_comp, C_comp]\n[GOAL]\ncase hq.refine'_2.intro.hs.intro.intro.intro.intro\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\nn : ℕ\nhn : n ≠ 0\nhα : P (α ^ n)\np : F[X] := minpoly F (α ^ n)\nhp : comp p (X ^ n) ≠ 0\ns : Multiset (SplittingField p)\nhs :\n  Polynomial.map (algebraMap F (SplittingField p)) p =\n    ↑C (↑(algebraMap F (SplittingField p)) (leadingCoeff p)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\nq : SplittingField p\nleft✝ : q ∈ s\n⊢ IsSolvable (Gal (X ^ n - ↑C q))\n[PROOFSTEP]\nexact gal_X_pow_sub_C_isSolvable n q\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\n⊢ P γ\n[PROOFSTEP]\nlet p := minpoly F α\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\n⊢ P γ\n[PROOFSTEP]\nlet q := minpoly F β\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\n⊢ P γ\n[PROOFSTEP]\nhave hpq :=\n  Polynomial.splits_of_splits_mul _ (mul_ne_zero (minpoly.ne_zero (isIntegral α)) (minpoly.ne_zero (isIntegral β)))\n    (SplittingField.splits (p * q))\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\n⊢ P γ\n[PROOFSTEP]\nlet f : ↥F⟮α, β⟯ →ₐ[F] (p * q).SplittingField :=\n  Classical.choice <|\n    algHom_mk_adjoin_splits\n      (by\n        intro x hx\n        cases' hx with hx hx\n        rw [hx]\n        exact ⟨isIntegral α, hpq.1⟩\n        cases hx\n        exact ⟨isIntegral β, hpq.2⟩)\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\n⊢ ∀ (s : { x // x ∈ solvableByRad F E }),\n    s ∈ {α, β} → IsIntegral F s ∧ Splits (algebraMap F (SplittingField (p * q))) (minpoly F s)\n[PROOFSTEP]\nintro x hx\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nx : { x // x ∈ solvableByRad F E }\nhx : x ∈ {α, β}\n⊢ IsIntegral F x ∧ Splits (algebraMap F (SplittingField (p * q))) (minpoly F x)\n[PROOFSTEP]\ncases' hx with hx hx\n[GOAL]\ncase inl\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nx : { x // x ∈ solvableByRad F E }\nhx : x = α\n⊢ IsIntegral F x ∧ Splits (algebraMap F (SplittingField (p * q))) (minpoly F x)\ncase inr\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nx : { x // x ∈ solvableByRad F E }\nhx : x ∈ {β}\n⊢ IsIntegral F x ∧ Splits (algebraMap F (SplittingField (p * q))) (minpoly F x)\n[PROOFSTEP]\nrw [hx]\n[GOAL]\ncase inl\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nx : { x // x ∈ solvableByRad F E }\nhx : x = α\n⊢ IsIntegral F α ∧ Splits (algebraMap F (SplittingField (p * q))) (minpoly F α)\ncase inr\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nx : { x // x ∈ solvableByRad F E }\nhx : x ∈ {β}\n⊢ IsIntegral F x ∧ Splits (algebraMap F (SplittingField (p * q))) (minpoly F x)\n[PROOFSTEP]\nexact ⟨isIntegral α, hpq.1⟩\n[GOAL]\ncase inr\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nx : { x // x ∈ solvableByRad F E }\nhx : x ∈ {β}\n⊢ IsIntegral F x ∧ Splits (algebraMap F (SplittingField (p * q))) (minpoly F x)\n[PROOFSTEP]\ncases hx\n[GOAL]\ncase inr.refl\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\n⊢ IsIntegral F β ∧ Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\n[PROOFSTEP]\nexact ⟨isIntegral β, hpq.2⟩\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nf : { x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q) :=\n  Classical.choice (_ : Nonempty ({ x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q)))\n⊢ P γ\n[PROOFSTEP]\nhave key : minpoly F γ = minpoly F (f ⟨γ, hγ⟩) :=\n  by\n  refine' minpoly.eq_of_irreducible_of_monic (minpoly.irreducible (isIntegral γ)) _ (minpoly.monic (isIntegral γ))\n  suffices aeval (⟨γ, hγ⟩ : F⟮α, β⟯) (minpoly F γ) = 0 by\n    rw [aeval_algHom_apply, this, AlgHom.map_zero]\n      -- Porting note: this instance is needed for the following `apply`\n  haveI :=\n    @IntermediateField.toAlgebra F (solvableByRad F E) _ _ _ F⟮α, β⟯ (solvableByRad F E) _\n      (Algebra.id (solvableByRad F E))\n  apply (algebraMap (↥F⟮α, β⟯) (solvableByRad F E)).injective\n  simp only [map_zero, _root_.map_eq_zero]\n    -- Porting note: end of the proof was `exact minpoly.aeval F γ`.\n  apply Subtype.val_injective\n  simp [Polynomial.aeval_subalgebra_coe (minpoly F γ)]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nf : { x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q) :=\n  Classical.choice (_ : Nonempty ({ x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q)))\n⊢ minpoly F γ = minpoly F (↑f { val := γ, property := hγ })\n[PROOFSTEP]\nrefine' minpoly.eq_of_irreducible_of_monic (minpoly.irreducible (isIntegral γ)) _ (minpoly.monic (isIntegral γ))\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nf : { x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q) :=\n  Classical.choice (_ : Nonempty ({ x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q)))\n⊢ ↑(aeval (↑f { val := γ, property := hγ })) (minpoly F γ) = 0\n[PROOFSTEP]\nsuffices aeval (⟨γ, hγ⟩ : F⟮α, β⟯) (minpoly F γ) = 0 by\n  rw [aeval_algHom_apply, this, AlgHom.map_zero]\n    -- Porting note: this instance is needed for the following `apply`\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nf : { x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q) :=\n  Classical.choice (_ : Nonempty ({ x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q)))\nthis : ↑(aeval { val := γ, property := hγ }) (minpoly F γ) = 0\n⊢ ↑(aeval (↑f { val := γ, property := hγ })) (minpoly F γ) = 0\n[PROOFSTEP]\nrw [aeval_algHom_apply, this, AlgHom.map_zero]\n  -- Porting note: this instance is needed for the following `apply`\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nf : { x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q) :=\n  Classical.choice (_ : Nonempty ({ x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q)))\n⊢ ↑(aeval { val := γ, property := hγ }) (minpoly F γ) = 0\n[PROOFSTEP]\nhaveI :=\n  @IntermediateField.toAlgebra F (solvableByRad F E) _ _ _ F⟮α, β⟯ (solvableByRad F E) _\n    (Algebra.id (solvableByRad F E))\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nf : { x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q) :=\n  Classical.choice (_ : Nonempty ({ x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q)))\nthis : Algebra { x // x ∈ F⟮α, β⟯ } { x // x ∈ solvableByRad F E }\n⊢ ↑(aeval { val := γ, property := hγ }) (minpoly F γ) = 0\n[PROOFSTEP]\napply (algebraMap (↥F⟮α, β⟯) (solvableByRad F E)).injective\n[GOAL]\ncase a\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nf : { x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q) :=\n  Classical.choice (_ : Nonempty ({ x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q)))\nthis : Algebra { x // x ∈ F⟮α, β⟯ } { x // x ∈ solvableByRad F E }\n⊢ ↑(algebraMap { x // x ∈ F⟮α, β⟯ } { x // x ∈ solvableByRad F E })\n      (↑(aeval { val := γ, property := hγ }) (minpoly F γ)) =\n    ↑(algebraMap { x // x ∈ F⟮α, β⟯ } { x // x ∈ solvableByRad F E }) 0\n[PROOFSTEP]\nsimp only [map_zero, _root_.map_eq_zero]\n  -- Porting note: end of the proof was `exact minpoly.aeval F γ`.\n[GOAL]\ncase a\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nf : { x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q) :=\n  Classical.choice (_ : Nonempty ({ x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q)))\nthis : Algebra { x // x ∈ F⟮α, β⟯ } { x // x ∈ solvableByRad F E }\n⊢ ↑(aeval { val := γ, property := hγ }) (minpoly F γ) = 0\n[PROOFSTEP]\napply Subtype.val_injective\n[GOAL]\ncase a.a\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nf : { x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q) :=\n  Classical.choice (_ : Nonempty ({ x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q)))\nthis : Algebra { x // x ∈ F⟮α, β⟯ } { x // x ∈ solvableByRad F E }\n⊢ ↑(↑(aeval { val := γ, property := hγ }) (minpoly F γ)) = ↑0\n[PROOFSTEP]\nsimp [Polynomial.aeval_subalgebra_coe (minpoly F γ)]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nf : { x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q) :=\n  Classical.choice (_ : Nonempty ({ x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q)))\nkey : minpoly F γ = minpoly F (↑f { val := γ, property := hγ })\n⊢ P γ\n[PROOFSTEP]\nrw [P, key]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nf : { x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q) :=\n  Classical.choice (_ : Nonempty ({ x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q)))\nkey : minpoly F γ = minpoly F (↑f { val := γ, property := hγ })\n⊢ IsSolvable (Gal (minpoly F (↑f { val := γ, property := hγ })))\n[PROOFSTEP]\nrefine' gal_isSolvable_of_splits ⟨Normal.splits _ (f ⟨γ, hγ⟩)⟩ (gal_mul_isSolvable hα hβ)\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα β γ : { x // x ∈ solvableByRad F E }\nhγ : γ ∈ F⟮α, β⟯\nhα : P α\nhβ : P β\np : F[X] := minpoly F α\nq : F[X] := minpoly F β\nhpq :\n  Splits (algebraMap F (SplittingField (p * q))) (minpoly F α) ∧\n    Splits (algebraMap F (SplittingField (p * q))) (minpoly F β)\nf : { x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q) :=\n  Classical.choice (_ : Nonempty ({ x // x ∈ F⟮α, β⟯ } →ₐ[F] SplittingField (p * q)))\nkey : minpoly F γ = minpoly F (↑f { val := γ, property := hγ })\n⊢ Normal F ((fun x => SplittingField (p * q)) { val := γ, property := hγ })\n[PROOFSTEP]\napply SplittingField.instNormal\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : { x // x ∈ solvableByRad F E }\n⊢ IsSolvable (Gal (minpoly F α))\n[PROOFSTEP]\nrevert α\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α : { x // x ∈ solvableByRad F E }), IsSolvable (Gal (minpoly F α))\n[PROOFSTEP]\napply solvableByRad.induction\n[GOAL]\ncase base\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α : F), IsSolvable (Gal (minpoly F (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)))\n[PROOFSTEP]\nexact fun α => by rw [minpoly.eq_X_sub_C (solvableByRad F E)]; exact gal_X_sub_C_isSolvable α\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : F\n⊢ IsSolvable (Gal (minpoly F (↑(algebraMap F { x // x ∈ solvableByRad F E }) α)))\n[PROOFSTEP]\nrw [minpoly.eq_X_sub_C (solvableByRad F E)]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ : E\nα : F\n⊢ IsSolvable (Gal (X - ↑C α))\n[PROOFSTEP]\nexact gal_X_sub_C_isSolvable α\n[GOAL]\ncase add\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α β : { x // x ∈ solvableByRad F E }),\n    IsSolvable (Gal (minpoly F α)) → IsSolvable (Gal (minpoly F β)) → IsSolvable (Gal (minpoly F (α + β)))\n[PROOFSTEP]\nexact fun α β =>\n  induction2\n    (add_mem (subset_adjoin F _ (Set.mem_insert α _))\n      (subset_adjoin F _ (Set.mem_insert_of_mem α (Set.mem_singleton β))))\n[GOAL]\ncase neg\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α : { x // x ∈ solvableByRad F E }), IsSolvable (Gal (minpoly F α)) → IsSolvable (Gal (minpoly F (-α)))\n[PROOFSTEP]\nexact fun α => induction1 (neg_mem (mem_adjoin_simple_self F α))\n[GOAL]\ncase mul\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α β : { x // x ∈ solvableByRad F E }),\n    IsSolvable (Gal (minpoly F α)) → IsSolvable (Gal (minpoly F β)) → IsSolvable (Gal (minpoly F (α * β)))\n[PROOFSTEP]\nexact fun α β =>\n  induction2\n    (mul_mem (subset_adjoin F _ (Set.mem_insert α _))\n      (subset_adjoin F _ (Set.mem_insert_of_mem α (Set.mem_singleton β))))\n[GOAL]\ncase inv\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α : { x // x ∈ solvableByRad F E }), IsSolvable (Gal (minpoly F α)) → IsSolvable (Gal (minpoly F α⁻¹))\n[PROOFSTEP]\nexact fun α => induction1 (inv_mem (mem_adjoin_simple_self F α))\n[GOAL]\ncase rad\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα : E\n⊢ ∀ (α : { x // x ∈ solvableByRad F E }) (n : ℕ),\n    n ≠ 0 → IsSolvable (Gal (minpoly F (α ^ n))) → IsSolvable (Gal (minpoly F α))\n[PROOFSTEP]\nexact fun α n => induction3\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ α : E\nq : F[X]\nq_irred : Irreducible q\nq_aeval : ↑(aeval α) q = 0\nhα : IsSolvableByRad F α\n⊢ IsSolvable (Gal q)\n[PROOFSTEP]\nhave : _root_.IsSolvable (q * C q.leadingCoeff⁻¹).Gal :=\n  by\n  rw [minpoly.eq_of_irreducible q_irred q_aeval, ←\n    show minpoly F (⟨α, hα⟩ : solvableByRad F E) = minpoly F α from\n      minpoly.eq_of_algebraMap_eq (RingHom.injective _) (isIntegral ⟨α, hα⟩) rfl]\n  exact isSolvable ⟨α, hα⟩\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ α : E\nq : F[X]\nq_irred : Irreducible q\nq_aeval : ↑(aeval α) q = 0\nhα : IsSolvableByRad F α\n⊢ IsSolvable (Gal (q * ↑C (leadingCoeff q)⁻¹))\n[PROOFSTEP]\nrw [minpoly.eq_of_irreducible q_irred q_aeval, ←\n  show minpoly F (⟨α, hα⟩ : solvableByRad F E) = minpoly F α from\n    minpoly.eq_of_algebraMap_eq (RingHom.injective _) (isIntegral ⟨α, hα⟩) rfl]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ α : E\nq : F[X]\nq_irred : Irreducible q\nq_aeval : ↑(aeval α) q = 0\nhα : IsSolvableByRad F α\n⊢ IsSolvable (Gal (minpoly F { val := α, property := hα }))\n[PROOFSTEP]\nexact isSolvable ⟨α, hα⟩\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ α : E\nq : F[X]\nq_irred : Irreducible q\nq_aeval : ↑(aeval α) q = 0\nhα : IsSolvableByRad F α\nthis : IsSolvable (Gal (q * ↑C (leadingCoeff q)⁻¹))\n⊢ IsSolvable (Gal q)\n[PROOFSTEP]\nrefine' solvable_of_surjective (Gal.restrictDvd_surjective ⟨C q.leadingCoeff⁻¹, rfl⟩ _)\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ α : E\nq : F[X]\nq_irred : Irreducible q\nq_aeval : ↑(aeval α) q = 0\nhα : IsSolvableByRad F α\nthis : IsSolvable (Gal (q * ↑C (leadingCoeff q)⁻¹))\n⊢ q * ↑C (leadingCoeff q)⁻¹ ≠ 0\n[PROOFSTEP]\nrw [mul_ne_zero_iff, Ne, Ne, C_eq_zero, inv_eq_zero]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nα✝ α : E\nq : F[X]\nq_irred : Irreducible q\nq_aeval : ↑(aeval α) q = 0\nhα : IsSolvableByRad F α\nthis : IsSolvable (Gal (q * ↑C (leadingCoeff q)⁻¹))\n⊢ ¬q = 0 ∧ ¬leadingCoeff q = 0\n[PROOFSTEP]\nexact ⟨q_irred.ne_zero, leadingCoeff_ne_zero.mpr q_irred.ne_zero⟩\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.AbelRuffini", "llama_tokens": 58036, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.626124191181315, "lm_q2_score": 0.6039318337259583, "lm_q1q2_score": 0.37813633092031407}}
{"text": "[GOAL]\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ DivisionSemiring (ULift α)\n[PROOFSTEP]\nrefine' down_injective.divisionSemiring down ..\n[GOAL]\ncase refine'_1\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ 0.down = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ 1.down = 1\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ ∀ (x y : ULift α), (x + y).down = x.down + y.down\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ ∀ (x y : ULift α), (x * y).down = x.down * y.down\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ ∀ (x : ULift α), x⁻¹.down = x.down⁻¹\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ ∀ (x y : ULift α), (x / y).down = x.down / y.down\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_7\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ ∀ (x : ULift α) (n : ℕ), (n • x).down = n • x.down\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_8\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ ∀ (x : ULift α) (n : ℕ), (x ^ n).down = x.down ^ n\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_9\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ ∀ (x : ULift α) (n : ℤ), (x ^ n).down = x.down ^ n\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_10\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ ∀ (n : ℕ), (↑n).down = ↑n\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ 0.down = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\n⊢ 1.down = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\nx✝ y✝ : ULift α\n⊢ (x✝ + y✝).down = x✝.down + y✝.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\nx✝ y✝ : ULift α\n⊢ (x✝ * y✝).down = x✝.down * y✝.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_5\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\nx✝ : ULift α\n⊢ x✝⁻¹.down = x✝.down⁻¹\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_6\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\nx✝ y✝ : ULift α\n⊢ (x✝ / y✝).down = x✝.down / y✝.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_7\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\nx✝ : ULift α\nn✝ : ℕ\n⊢ (n✝ • x✝).down = n✝ • x✝.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_8\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\nx✝ : ULift α\nn✝ : ℕ\n⊢ (x✝ ^ n✝).down = x✝.down ^ n✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_9\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\nx✝ : ULift α\nn✝ : ℤ\n⊢ (x✝ ^ n✝).down = x✝.down ^ n✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_10\nα : Type u\nx y : ULift α\ninst✝ : DivisionSemiring α\nn✝ : ℕ\n⊢ (↑n✝).down = ↑n✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ DivisionRing (ULift α)\n[PROOFSTEP]\nrefine' down_injective.divisionRing down ..\n[GOAL]\ncase refine'_1\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ 0.down = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ 1.down = 1\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (x y : ULift α), (x + y).down = x.down + y.down\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (x y : ULift α), (x * y).down = x.down * y.down\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (x : ULift α), (-x).down = -x.down\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (x y : ULift α), (x - y).down = x.down - y.down\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_7\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (x : ULift α), x⁻¹.down = x.down⁻¹\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_8\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (x y : ULift α), (x / y).down = x.down / y.down\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_9\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (x : ULift α) (n : ℕ), (n • x).down = n • x.down\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_10\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (x : ULift α) (n : ℤ), (n • x).down = n • x.down\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_11\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (x : ULift α) (n : ℚ), (n • x).down = n • x.down\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_12\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (x : ULift α) (n : ℕ), (x ^ n).down = x.down ^ n\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_13\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (x : ULift α) (n : ℤ), (x ^ n).down = x.down ^ n\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_14\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (n : ℕ), (↑n).down = ↑n\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_15\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (n : ℤ), (↑n).down = ↑n\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_16\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ ∀ (n : ℚ), (↑n).down = ↑n\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ 0.down = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\n⊢ 1.down = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nx✝ y✝ : ULift α\n⊢ (x✝ + y✝).down = x✝.down + y✝.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nx✝ y✝ : ULift α\n⊢ (x✝ * y✝).down = x✝.down * y✝.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_5\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nx✝ : ULift α\n⊢ (-x✝).down = -x✝.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_6\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nx✝ y✝ : ULift α\n⊢ (x✝ - y✝).down = x✝.down - y✝.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_7\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nx✝ : ULift α\n⊢ x✝⁻¹.down = x✝.down⁻¹\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_8\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nx✝ y✝ : ULift α\n⊢ (x✝ / y✝).down = x✝.down / y✝.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_9\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nx✝ : ULift α\nn✝ : ℕ\n⊢ (n✝ • x✝).down = n✝ • x✝.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_10\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nx✝ : ULift α\nn✝ : ℤ\n⊢ (n✝ • x✝).down = n✝ • x✝.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_11\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nx✝ : ULift α\nn✝ : ℚ\n⊢ (n✝ • x✝).down = n✝ • x✝.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_12\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nx✝ : ULift α\nn✝ : ℕ\n⊢ (x✝ ^ n✝).down = x✝.down ^ n✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_13\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nx✝ : ULift α\nn✝ : ℤ\n⊢ (x✝ ^ n✝).down = x✝.down ^ n✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_14\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nn✝ : ℕ\n⊢ (↑n✝).down = ↑n✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_15\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nn✝ : ℤ\n⊢ (↑n✝).down = ↑n✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_16\nα : Type u\nx y : ULift α\ninst✝ : DivisionRing α\nn✝ : ℚ\n⊢ (↑n✝).down = ↑n✝\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Field.ULift", "llama_tokens": 3899, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6001883735630721, "lm_q2_score": 0.6297746213017459, "lm_q1q2_score": 0.3779834056703945}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\n⊢ (CauchySeq fun s => ∑ i in s, f i) ↔ ∀ (ε : ℝ), ε > 0 → ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i in t, f i‖ < ε\n[PROOFSTEP]\nrw [cauchySeq_finset_iff_vanishing, nhds_basis_ball.forall_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\n⊢ (∀ (i : ℝ), 0 < i → ∃ s, ∀ (t : Finset ι), Disjoint t s → ∑ b in t, f b ∈ ball 0 i) ↔\n    ∀ (ε : ℝ), ε > 0 → ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i in t, f i‖ < ε\n[PROOFSTEP]\nsimp only [ball_zero_eq, Set.mem_setOf_eq]\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\n⊢ ∀ ⦃s t : Set E⦄,\n    s ⊆ t →\n      (∃ s_1, ∀ (t : Finset ι), Disjoint t s_1 → ∑ b in t, f b ∈ s) →\n        ∃ s, ∀ (t_1 : Finset ι), Disjoint t_1 s → ∑ b in t_1, f b ∈ t\n[PROOFSTEP]\nrintro s t hst ⟨s', hs'⟩\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ns t : Set E\nhst : s ⊆ t\ns' : Finset ι\nhs' : ∀ (t : Finset ι), Disjoint t s' → ∑ b in t, f b ∈ s\n⊢ ∃ s, ∀ (t_1 : Finset ι), Disjoint t_1 s → ∑ b in t_1, f b ∈ t\n[PROOFSTEP]\nexact ⟨s', fun t' ht' => hst <| hs' _ ht'⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : CompleteSpace E\nf : ι → E\n⊢ Summable f ↔ ∀ (ε : ℝ), ε > 0 → ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i in t, f i‖ < ε\n[PROOFSTEP]\nrw [summable_iff_cauchySeq_finset, cauchySeq_finset_iff_vanishing_norm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ\nhg : Summable g\nh : ∀ᶠ (i : ι) in cofinite, ‖f i‖ ≤ g i\n⊢ CauchySeq fun s => ∑ i in s, f i\n[PROOFSTEP]\nrefine' cauchySeq_finset_iff_vanishing_norm.2 fun ε hε => _\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ\nhg : Summable g\nh : ∀ᶠ (i : ι) in cofinite, ‖f i‖ ≤ g i\nε : ℝ\nhε : ε > 0\n⊢ ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i in t, f i‖ < ε\n[PROOFSTEP]\nrcases summable_iff_vanishing_norm.1 hg ε hε with ⟨s, hs⟩\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ\nhg : Summable g\nh : ∀ᶠ (i : ι) in cofinite, ‖f i‖ ≤ g i\nε : ℝ\nhε : ε > 0\ns : Finset ι\nhs : ∀ (t : Finset ι), Disjoint t s → ‖∑ i in t, g i‖ < ε\n⊢ ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i in t, f i‖ < ε\n[PROOFSTEP]\nrefine' ⟨s ∪ h.toFinset, fun t ht => _⟩\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ\nhg : Summable g\nh : ∀ᶠ (i : ι) in cofinite, ‖f i‖ ≤ g i\nε : ℝ\nhε : ε > 0\ns : Finset ι\nhs : ∀ (t : Finset ι), Disjoint t s → ‖∑ i in t, g i‖ < ε\nt : Finset ι\nht : Disjoint t (s ∪ Set.Finite.toFinset h)\n⊢ ‖∑ i in t, f i‖ < ε\n[PROOFSTEP]\nhave : ∀ i ∈ t, ‖f i‖ ≤ g i := by\n  intro i hi\n  simp only [disjoint_left, mem_union, not_or, h.mem_toFinset, Set.mem_compl_iff, Classical.not_not] at ht \n  exact (ht hi).2\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ\nhg : Summable g\nh : ∀ᶠ (i : ι) in cofinite, ‖f i‖ ≤ g i\nε : ℝ\nhε : ε > 0\ns : Finset ι\nhs : ∀ (t : Finset ι), Disjoint t s → ‖∑ i in t, g i‖ < ε\nt : Finset ι\nht : Disjoint t (s ∪ Set.Finite.toFinset h)\n⊢ ∀ (i : ι), i ∈ t → ‖f i‖ ≤ g i\n[PROOFSTEP]\nintro i hi\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ\nhg : Summable g\nh : ∀ᶠ (i : ι) in cofinite, ‖f i‖ ≤ g i\nε : ℝ\nhε : ε > 0\ns : Finset ι\nhs : ∀ (t : Finset ι), Disjoint t s → ‖∑ i in t, g i‖ < ε\nt : Finset ι\nht : Disjoint t (s ∪ Set.Finite.toFinset h)\ni : ι\nhi : i ∈ t\n⊢ ‖f i‖ ≤ g i\n[PROOFSTEP]\nsimp only [disjoint_left, mem_union, not_or, h.mem_toFinset, Set.mem_compl_iff, Classical.not_not] at ht \n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ\nhg : Summable g\nh : ∀ᶠ (i : ι) in cofinite, ‖f i‖ ≤ g i\nε : ℝ\nhε : ε > 0\ns : Finset ι\nhs : ∀ (t : Finset ι), Disjoint t s → ‖∑ i in t, g i‖ < ε\nt : Finset ι\ni : ι\nhi : i ∈ t\nht : ∀ ⦃a : ι⦄, a ∈ t → ¬a ∈ s ∧ a ∈ {x | ‖f x‖ ≤ g x}\n⊢ ‖f i‖ ≤ g i\n[PROOFSTEP]\nexact (ht hi).2\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ\nhg : Summable g\nh : ∀ᶠ (i : ι) in cofinite, ‖f i‖ ≤ g i\nε : ℝ\nhε : ε > 0\ns : Finset ι\nhs : ∀ (t : Finset ι), Disjoint t s → ‖∑ i in t, g i‖ < ε\nt : Finset ι\nht : Disjoint t (s ∪ Set.Finite.toFinset h)\nthis : ∀ (i : ι), i ∈ t → ‖f i‖ ≤ g i\n⊢ ‖∑ i in t, f i‖ < ε\n[PROOFSTEP]\ncalc\n  ‖∑ i in t, f i‖ ≤ ∑ i in t, g i := norm_sum_le_of_le _ this\n  _ ≤ ‖∑ i in t, g i‖ := (le_abs_self _)\n  _ < ε := hs _ (ht.mono_right le_sup_left)\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ℕ → E\ng : ℕ → ℝ\nhg : CauchySeq fun n => ∑ i in range n, g i\nhf : ∀ (i : ℕ), ‖f i‖ ≤ g i\n⊢ CauchySeq fun n => ∑ i in range n, f i\n[PROOFSTEP]\nrefine' Metric.cauchySeq_iff'.2 fun ε hε => _\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ℕ → E\ng : ℕ → ℝ\nhg : CauchySeq fun n => ∑ i in range n, g i\nhf : ∀ (i : ℕ), ‖f i‖ ≤ g i\nε : ℝ\nhε : ε > 0\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (∑ i in range n, f i) (∑ i in range N, f i) < ε\n[PROOFSTEP]\nrefine' (Metric.cauchySeq_iff'.1 hg ε hε).imp fun N hg n hn => _\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ℕ → E\ng : ℕ → ℝ\nhg✝ : CauchySeq fun n => ∑ i in range n, g i\nhf : ∀ (i : ℕ), ‖f i‖ ≤ g i\nε : ℝ\nhε : ε > 0\nN : ℕ\nhg : ∀ (n : ℕ), n ≥ N → dist (∑ i in range n, g i) (∑ i in range N, g i) < ε\nn : ℕ\nhn : n ≥ N\n⊢ dist (∑ i in range n, f i) (∑ i in range N, f i) < ε\n[PROOFSTEP]\nspecialize hg n hn\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ℕ → E\ng : ℕ → ℝ\nhg✝ : CauchySeq fun n => ∑ i in range n, g i\nhf : ∀ (i : ℕ), ‖f i‖ ≤ g i\nε : ℝ\nhε : ε > 0\nN n : ℕ\nhn : n ≥ N\nhg : dist (∑ i in range n, g i) (∑ i in range N, g i) < ε\n⊢ dist (∑ i in range n, f i) (∑ i in range N, f i) < ε\n[PROOFSTEP]\nrw [dist_eq_norm, ← sum_Ico_eq_sub _ hn] at hg ⊢\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ℕ → E\ng : ℕ → ℝ\nhg✝ : CauchySeq fun n => ∑ i in range n, g i\nhf : ∀ (i : ℕ), ‖f i‖ ≤ g i\nε : ℝ\nhε : ε > 0\nN n : ℕ\nhn : n ≥ N\nhg : ‖∑ k in Ico N n, g k‖ < ε\n⊢ ‖∑ k in Ico N n, f k‖ < ε\n[PROOFSTEP]\ncalc\n  ‖∑ k in Ico N n, f k‖ ≤ ∑ k in _, ‖f k‖ := norm_sum_le _ _\n  _ ≤ ∑ k in _, g k := (sum_le_sum fun x _ => hf x)\n  _ ≤ ‖∑ k in _, g k‖ := (le_abs_self _)\n  _ < ε := hg\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : CompleteSpace E\nf : ι → E\ng : ι → ℝ\nhg : Summable g\nh : ∀ (i : ι), ‖f i‖ ≤ g i\n⊢ Summable f\n[PROOFSTEP]\nrw [summable_iff_cauchySeq_finset]\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : CompleteSpace E\nf : ι → E\ng : ι → ℝ\nhg : Summable g\nh : ∀ (i : ι), ‖f i‖ ≤ g i\n⊢ CauchySeq fun s => ∑ b in s, f b\n[PROOFSTEP]\nexact cauchySeq_finset_of_norm_bounded g hg h\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ\na : ℝ\nhg : HasSum g a\nh : ∀ (i : ι), ‖f i‖ ≤ g i\n⊢ ‖∑' (i : ι), f i‖ ≤ a\n[PROOFSTEP]\nby_cases hf : Summable f\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ\na : ℝ\nhg : HasSum g a\nh : ∀ (i : ι), ‖f i‖ ≤ g i\nhf : Summable f\n⊢ ‖∑' (i : ι), f i‖ ≤ a\n[PROOFSTEP]\nexact hf.hasSum.norm_le_of_bounded hg h\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ\na : ℝ\nhg : HasSum g a\nh : ∀ (i : ι), ‖f i‖ ≤ g i\nhf : ¬Summable f\n⊢ ‖∑' (i : ι), f i‖ ≤ a\n[PROOFSTEP]\nrw [tsum_eq_zero_of_not_summable hf, norm_zero]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ\na : ℝ\nhg : HasSum g a\nh : ∀ (i : ι), ‖f i‖ ≤ g i\nhf : ¬Summable f\n⊢ 0 ≤ a\n[PROOFSTEP]\nexact ge_of_tendsto' hg fun s => sum_nonneg fun i _hi => (norm_nonneg _).trans (h i)\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ≥0\na : ℝ≥0\nhg : HasSum g a\nh : ∀ (i : ι), ‖f i‖₊ ≤ g i\n⊢ ‖∑' (i : ι), f i‖₊ ≤ a\n[PROOFSTEP]\nsimp only [← NNReal.coe_le_coe, ← NNReal.hasSum_coe, coe_nnnorm] at *\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : SeminormedAddCommGroup F\nf : ι → E\ng : ι → ℝ≥0\na : ℝ≥0\nhg : HasSum (fun a => ↑(g a)) ↑a\nh : ∀ (i : ι), ‖f i‖ ≤ ↑(g i)\n⊢ ‖∑' (i : ι), f i‖ ≤ ↑a\n[PROOFSTEP]\nexact tsum_of_norm_bounded hg h\n[GOAL]\nι : Type u_1\nα : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : SeminormedAddCommGroup F\ninst✝ : CompleteSpace E\nf : ι → E\ng : ι → ℝ≥0\nhg : Summable g\nh : ∀ (i : ι), ‖f i‖₊ ≤ g i\ni : ι\n⊢ ‖f i‖ ≤ (fun i => ↑(g i)) i\n[PROOFSTEP]\nexact_mod_cast h i\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Normed.Group.InfiniteSum", "llama_tokens": 5506, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.672331699179286, "lm_q2_score": 0.5621765008857982, "lm_q1q2_score": 0.3779690820792141}}
{"text": "[GOAL]\nm n : ℕ\nα : Fin 0 → Sort u\n⊢ Unique ((i : Fin 0) → α i)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\n⊢ tail (cons x p) = p\n[PROOFSTEP]\nsimp [tail, cons]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\n⊢ cons x p (succ i) = p i\n[PROOFSTEP]\nsimp [cons]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\n⊢ cons x p 0 = x\n[PROOFSTEP]\nsimp [cons]\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Fin (n + 2) → Type u_1\nx : α 0\np : (i : Fin (Nat.succ n)) → α (succ i)\n⊢ cons x p 1 = p 0\n[PROOFSTEP]\nrw [← cons_succ x p]\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Fin (n + 2) → Type u_1\nx : α 0\np : (i : Fin (Nat.succ n)) → α (succ i)\n⊢ cons x p 1 = cons x p (succ 0)\n[PROOFSTEP]\nrfl\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\n⊢ cons x (update p i y) = update (cons x p) (succ i) y\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\n⊢ cons x (update p i y) j = update (cons x p) (succ i) y j\n[PROOFSTEP]\nby_cases h : j = 0\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : j = 0\n⊢ cons x (update p i y) j = update (cons x p) (succ i) y j\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : j = 0\n⊢ cons x (update p i y) 0 = update (cons x p) (succ i) y 0\n[PROOFSTEP]\nsimp [Ne.symm (succ_ne_zero i)]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\n⊢ cons x (update p i y) j = update (cons x p) (succ i) y j\n[PROOFSTEP]\nlet j' := pred j h\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\n⊢ cons x (update p i y) j = update (cons x p) (succ i) y j\n[PROOFSTEP]\nhave : j'.succ = j := succ_pred j h\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\nthis : succ j' = j\n⊢ cons x (update p i y) j = update (cons x p) (succ i) y j\n[PROOFSTEP]\nrw [← this, cons_succ]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\nthis : succ j' = j\n⊢ update p i y j' = update (cons x p) (succ i) y (succ j')\n[PROOFSTEP]\nby_cases h' : j' = i\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\nthis : succ j' = j\nh' : j' = i\n⊢ update p i y j' = update (cons x p) (succ i) y (succ j')\n[PROOFSTEP]\nrw [h']\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\nthis : succ j' = j\nh' : j' = i\n⊢ update p i y i = update (cons x p) (succ i) y (succ i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\nthis : succ j' = j\nh' : ¬j' = i\n⊢ update p i y j' = update (cons x p) (succ i) y (succ j')\n[PROOFSTEP]\nhave : j'.succ ≠ i.succ := by rwa [Ne.def, succ_inj]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\nthis : succ j' = j\nh' : ¬j' = i\n⊢ succ j' ≠ succ i\n[PROOFSTEP]\nrwa [Ne.def, succ_inj]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\nthis✝ : succ j' = j\nh' : ¬j' = i\nthis : succ j' ≠ succ i\n⊢ update p i y j' = update (cons x p) (succ i) y (succ j')\n[PROOFSTEP]\nrw [update_noteq h', update_noteq this, cons_succ]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx✝ : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni✝ : Fin n\ny✝ : α (succ i✝)\nz x₀ y₀ : α 0\nx y : (i : Fin n) → α (succ i)\nh : cons x₀ x = cons y₀ y\ni : Fin n\n⊢ x i = y i\n[PROOFSTEP]\nsimpa using congr_fun h (Fin.succ i)\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\n⊢ update (cons x p) 0 z = cons z p\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\n⊢ update (cons x p) 0 z j = cons z p j\n[PROOFSTEP]\nby_cases h : j = 0\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : j = 0\n⊢ update (cons x p) 0 z j = cons z p j\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : j = 0\n⊢ update (cons x p) 0 z 0 = cons z p 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\n⊢ update (cons x p) 0 z j = cons z p j\n[PROOFSTEP]\nsimp only [h, update_noteq, Ne.def, not_false_iff]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\n⊢ cons x p j = cons z p j\n[PROOFSTEP]\nlet j' := pred j h\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\n⊢ cons x p j = cons z p j\n[PROOFSTEP]\nhave : j'.succ = j := succ_pred j h\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\nthis : succ j' = j\n⊢ cons x p j = cons z p j\n[PROOFSTEP]\nrw [← this, cons_succ, cons_succ]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\n⊢ cons (q 0) (tail q) = q\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\n⊢ cons (q 0) (tail q) j = q j\n[PROOFSTEP]\nby_cases h : j = 0\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : j = 0\n⊢ cons (q 0) (tail q) j = q j\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : j = 0\n⊢ cons (q 0) (tail q) 0 = q 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\n⊢ cons (q 0) (tail q) j = q j\n[PROOFSTEP]\nlet j' := pred j h\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\n⊢ cons (q 0) (tail q) j = q j\n[PROOFSTEP]\nhave : j'.succ = j := succ_pred j h\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\nthis : succ j' = j\n⊢ cons (q 0) (tail q) j = q j\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\nthis : succ j' = j\n⊢ cons (q 0) (tail q) (succ j') = q (succ j')\n[PROOFSTEP]\nunfold tail\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\nthis : succ j' = j\n⊢ cons (q 0) (fun i => q (succ i)) (succ j') = q (succ j')\n[PROOFSTEP]\nrw [cons_succ]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx✝ : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nP : ((i : Fin (Nat.succ n)) → α i) → Sort v\nh : (x₀ : α 0) → (x : (i : Fin n) → α (succ i)) → P (cons x₀ x)\nx : (i : Fin (Nat.succ n)) → α i\n⊢ P (cons (x 0) (tail x)) = P x\n[PROOFSTEP]\nrw [cons_self_tail]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx✝ : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nP : ((i : Fin (Nat.succ n)) → α i) → Sort v\nh : (x₀ : α 0) → (x : (i : Fin n) → α (succ i)) → P (cons x₀ x)\nx₀ : α 0\nx : (i : Fin n) → α (succ i)\n⊢ consCases h (cons x₀ x) = h x₀ x\n[PROOFSTEP]\nrw [consCases, cast_eq]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx✝ : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nP : ((i : Fin (Nat.succ n)) → α i) → Sort v\nh : (x₀ : α 0) → (x : (i : Fin n) → α (succ i)) → P (cons x₀ x)\nx₀ : α 0\nx : (i : Fin n) → α (succ i)\n⊢ h (cons x₀ x 0) (tail (cons x₀ x)) = h x₀ x\n[PROOFSTEP]\ncongr\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nP : {n : ℕ} → (Fin n → α) → Sort v\nh0 : P elim0\nh : {n : ℕ} → (x₀ : α) → (x : Fin n → α) → P x → P (cons x₀ x)\nx : Fin 0 → α\n⊢ P x\n[PROOFSTEP]\nconvert h0\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\n⊢ Injective (cons x₀ x)\n[PROOFSTEP]\nrefine' Fin.cases _ _\n[GOAL]\ncase refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\n⊢ ∀ ⦃a₂ : Fin (n + 1)⦄, cons x₀ x 0 = cons x₀ x a₂ → 0 = a₂\n[PROOFSTEP]\nrefine' Fin.cases _ _\n[GOAL]\ncase refine'_1.refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\n⊢ cons x₀ x 0 = cons x₀ x 0 → 0 = 0\n[PROOFSTEP]\nintro\n[GOAL]\ncase refine'_1.refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\na✝ : cons x₀ x 0 = cons x₀ x 0\n⊢ 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\n⊢ ∀ (i : Fin n), cons x₀ x 0 = cons x₀ x (succ i) → 0 = succ i\n[PROOFSTEP]\nintro j h\n[GOAL]\ncase refine'_1.refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\nj : Fin n\nh : cons x₀ x 0 = cons x₀ x (succ j)\n⊢ 0 = succ j\n[PROOFSTEP]\nrw [cons_zero, cons_succ] at h \n[GOAL]\ncase refine'_1.refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\nj : Fin n\nh : x₀ = x j\n⊢ 0 = succ j\n[PROOFSTEP]\nexact hx₀.elim ⟨_, h.symm⟩\n[GOAL]\ncase refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\n⊢ ∀ (i : Fin n) ⦃a₂ : Fin (n + 1)⦄, cons x₀ x (succ i) = cons x₀ x a₂ → succ i = a₂\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\ni : Fin n\n⊢ ∀ ⦃a₂ : Fin (n + 1)⦄, cons x₀ x (succ i) = cons x₀ x a₂ → succ i = a₂\n[PROOFSTEP]\nrefine' Fin.cases _ _\n[GOAL]\ncase refine'_2.refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\ni : Fin n\n⊢ cons x₀ x (succ i) = cons x₀ x 0 → succ i = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_2.refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\ni : Fin n\nh : cons x₀ x (succ i) = cons x₀ x 0\n⊢ succ i = 0\n[PROOFSTEP]\nrw [cons_zero, cons_succ] at h \n[GOAL]\ncase refine'_2.refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\ni : Fin n\nh : x i = x₀\n⊢ succ i = 0\n[PROOFSTEP]\nexact hx₀.elim ⟨_, h⟩\n[GOAL]\ncase refine'_2.refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\ni : Fin n\n⊢ ∀ (i_1 : Fin n), cons x₀ x (succ i) = cons x₀ x (succ i_1) → succ i = succ i_1\n[PROOFSTEP]\nintro j h\n[GOAL]\ncase refine'_2.refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\ni j : Fin n\nh : cons x₀ x (succ i) = cons x₀ x (succ j)\n⊢ succ i = succ j\n[PROOFSTEP]\nrw [cons_succ, cons_succ] at h \n[GOAL]\ncase refine'_2.refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nhx₀ : ¬x₀ ∈ Set.range x\nhx : Injective x\ni j : Fin n\nh : x i = x j\n⊢ succ i = succ j\n[PROOFSTEP]\nexact congr_arg _ (hx h)\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\n⊢ Injective (cons x₀ x) ↔ ¬x₀ ∈ Set.range x ∧ Injective x\n[PROOFSTEP]\nrefine' ⟨fun h ↦ ⟨_, _⟩, fun h ↦ cons_injective_of_injective h.1 h.2⟩\n[GOAL]\ncase refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nh : Injective (cons x₀ x)\n⊢ ¬x₀ ∈ Set.range x\n[PROOFSTEP]\nrintro ⟨i, hi⟩\n[GOAL]\ncase refine'_1.intro\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nh : Injective (cons x₀ x)\ni : Fin n\nhi : x i = x₀\n⊢ False\n[PROOFSTEP]\nreplace h := @h i.succ 0\n[GOAL]\ncase refine'_1.intro\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\ni : Fin n\nhi : x i = x₀\nh : cons x₀ x (succ i) = cons x₀ x 0 → succ i = 0\n⊢ False\n[PROOFSTEP]\nsimp [hi, succ_ne_zero] at h \n[GOAL]\ncase refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nx₀ : α\nx : Fin n → α\nh : Injective (cons x₀ x)\n⊢ Injective x\n[PROOFSTEP]\nsimpa [Function.comp] using h.comp (Fin.succ_injective _)\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\n⊢ tail (update q 0 z) = tail q\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin n\n⊢ tail (update q 0 z) j = tail q j\n[PROOFSTEP]\nsimp [tail, Fin.succ_ne_zero]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\n⊢ tail (update q (succ i) y) = update (tail q) i y\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin n\n⊢ tail (update q (succ i) y) j = update (tail q) i y j\n[PROOFSTEP]\nby_cases h : j = i\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin n\nh : j = i\n⊢ tail (update q (succ i) y) j = update (tail q) i y j\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin n\nh : j = i\n⊢ tail (update q (succ i) y) i = update (tail q) i y i\n[PROOFSTEP]\nsimp [tail]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\nj : Fin n\nh : ¬j = i\n⊢ tail (update q (succ i) y) j = update (tail q) i y j\n[PROOFSTEP]\nsimp [tail, (Fin.succ_injective n).ne h, h]\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny✝ : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nβ : Type u_2\ng : α → β\ny : α\nq : Fin n → α\n⊢ g ∘ cons y q = cons (g y) (g ∘ q)\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny✝ : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nβ : Type u_2\ng : α → β\ny : α\nq : Fin n → α\nj : Fin (n + 1)\n⊢ (g ∘ cons y q) j = cons (g y) (g ∘ q) j\n[PROOFSTEP]\nby_cases h : j = 0\n[GOAL]\ncase pos\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny✝ : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nβ : Type u_2\ng : α → β\ny : α\nq : Fin n → α\nj : Fin (n + 1)\nh : j = 0\n⊢ (g ∘ cons y q) j = cons (g y) (g ∘ q) j\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny✝ : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nβ : Type u_2\ng : α → β\ny : α\nq : Fin n → α\nj : Fin (n + 1)\nh : j = 0\n⊢ (g ∘ cons y q) 0 = cons (g y) (g ∘ q) 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny✝ : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nβ : Type u_2\ng : α → β\ny : α\nq : Fin n → α\nj : Fin (n + 1)\nh : ¬j = 0\n⊢ (g ∘ cons y q) j = cons (g y) (g ∘ q) j\n[PROOFSTEP]\nlet j' := pred j h\n[GOAL]\ncase neg\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny✝ : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nβ : Type u_2\ng : α → β\ny : α\nq : Fin n → α\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\n⊢ (g ∘ cons y q) j = cons (g y) (g ∘ q) j\n[PROOFSTEP]\nhave : j'.succ = j := succ_pred j h\n[GOAL]\ncase neg\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny✝ : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nβ : Type u_2\ng : α → β\ny : α\nq : Fin n → α\nj : Fin (n + 1)\nh : ¬j = 0\nj' : Fin n := pred j h\nthis : succ j' = j\n⊢ (g ∘ cons y q) j = cons (g y) (g ∘ q) j\n[PROOFSTEP]\nrw [← this, cons_succ, comp, comp, cons_succ]\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nβ : Type u_2\ng : α → β\nq : Fin (Nat.succ n) → α\n⊢ g ∘ tail q = tail (g ∘ q)\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nβ : Type u_2\ng : α → β\nq : Fin (Nat.succ n) → α\nj : Fin n\n⊢ (g ∘ tail q) j = tail (g ∘ q) j\n[PROOFSTEP]\nsimp [tail]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx✝ : α 0\nq✝ : (i : Fin (n + 1)) → α i\np✝ : (i : Fin n) → α (succ i)\ni : Fin n\ny : α (succ i)\nz : α 0\ninst✝ : (i : Fin (n + 1)) → Preorder (α i)\nx : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\nj : Fin n\n⊢ q (succ j) ≤ cons x p (succ j) ↔ tail q j ≤ p j\n[PROOFSTEP]\nsimp [tail]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx✝ : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny✝ : α (succ i)\nz : α 0\ninst✝ : (i : Fin (n + 1)) → Preorder (α i)\nx₀ y₀ : α 0\nx y : (i : Fin n) → α (succ i)\n⊢ (∀ (i : Fin n), cons x₀ x (succ i) ≤ cons y₀ y (succ i)) ↔ x ≤ y\n[PROOFSTEP]\nsimp only [cons_succ, Pi.le_def]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx✝ : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny✝ : α (succ i)\nz x₀ y₀ : α 0\nx y : (i : Fin n) → α (succ i)\ns : {i : Fin (Nat.succ n)} → α i → α i → Prop\n⊢ Pi.Lex (fun x x_1 => x < x_1) s (cons x₀ x) (cons y₀ y) ↔\n    s x₀ y₀ ∨ x₀ = y₀ ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i => s) x y\n[PROOFSTEP]\nsimp_rw [Pi.Lex, Fin.exists_fin_succ, Fin.cons_succ, Fin.cons_zero, Fin.forall_fin_succ]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx✝ : α 0\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (succ i)\ni : Fin n\ny✝ : α (succ i)\nz x₀ y₀ : α 0\nx y : (i : Fin n) → α (succ i)\ns : {i : Fin (Nat.succ n)} → α i → α i → Prop\n⊢ (((0 < 0 → cons x₀ x 0 = cons y₀ y 0) ∧ ∀ (i : Fin n), succ i < 0 → cons x₀ x (succ i) = cons y₀ y (succ i)) ∧\n        s x₀ y₀ ∨\n      ∃ i,\n        ((0 < succ i → cons x₀ x 0 = cons y₀ y 0) ∧\n            ∀ (i_1 : Fin n), succ i_1 < succ i → cons x₀ x (succ i_1) = cons y₀ y (succ i_1)) ∧\n          s (x i) (y i)) ↔\n    s x₀ y₀ ∨ x₀ = y₀ ∧ ∃ i, (∀ (j : Fin n), j < i → x j = y j) ∧ s (x i) (y i)\n[PROOFSTEP]\nsimp [and_assoc, exists_and_left]\n[GOAL]\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (succ i)\ni : Fin n✝\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nn : ℕ\nx : α\nb : Fin n → α\n⊢ Set.range (cons x b) = insert x (Set.range b)\n[PROOFSTEP]\nrw [range_fin_succ, cons_zero, tail_cons]\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nu : Fin m → α\nv : Fin n → α\nhv : n = 0\n⊢ m + n = m\n[PROOFSTEP]\nrw [hv, add_zero]\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nu : Fin m → α\nv : Fin n → α\nhv : n = 0\n⊢ append u v = u ∘ ↑(castIso (_ : m + n = m))\n[PROOFSTEP]\nrefine' funext (Fin.addCases (fun l => _) fun r => _)\n[GOAL]\ncase refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nu : Fin m → α\nv : Fin n → α\nhv : n = 0\nl : Fin m\n⊢ append u v (castAdd n l) = (u ∘ ↑(castIso (_ : m + n = m))) (castAdd n l)\n[PROOFSTEP]\nrw [append_left, Function.comp_apply]\n[GOAL]\ncase refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nu : Fin m → α\nv : Fin n → α\nhv : n = 0\nl : Fin m\n⊢ u l = u (↑(castIso (_ : m + n = m)) (castAdd n l))\n[PROOFSTEP]\nrefine' congr_arg u (Fin.ext _)\n[GOAL]\ncase refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nu : Fin m → α\nv : Fin n → α\nhv : n = 0\nl : Fin m\n⊢ ↑l = ↑(↑(castIso (_ : m + n = m)) (castAdd n l))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nu : Fin m → α\nv : Fin n → α\nhv : n = 0\nr : Fin n\n⊢ append u v (natAdd m r) = (u ∘ ↑(castIso (_ : m + n = m))) (natAdd m r)\n[PROOFSTEP]\nexact (Fin.castIso hv r).elim0'\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nu : Fin m → α\nv : Fin n → α\nhu : m = 0\n⊢ m + n = n\n[PROOFSTEP]\nrw [hu, zero_add]\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nu : Fin m → α\nv : Fin n → α\nhu : m = 0\n⊢ append u v = v ∘ ↑(castIso (_ : m + n = n))\n[PROOFSTEP]\nrefine' funext (Fin.addCases (fun l => _) fun r => _)\n[GOAL]\ncase refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nu : Fin m → α\nv : Fin n → α\nhu : m = 0\nl : Fin m\n⊢ append u v (castAdd n l) = (v ∘ ↑(castIso (_ : m + n = n))) (castAdd n l)\n[PROOFSTEP]\nexact (Fin.castIso hu l).elim0'\n[GOAL]\ncase refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nu : Fin m → α\nv : Fin n → α\nhu : m = 0\nr : Fin n\n⊢ append u v (natAdd m r) = (v ∘ ↑(castIso (_ : m + n = n))) (natAdd m r)\n[PROOFSTEP]\nrw [append_right, Function.comp_apply]\n[GOAL]\ncase refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nu : Fin m → α\nv : Fin n → α\nhu : m = 0\nr : Fin n\n⊢ v r = v (↑(castIso (_ : m + n = n)) (natAdd m r))\n[PROOFSTEP]\nrefine' congr_arg v (Fin.ext _)\n[GOAL]\ncase refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nu : Fin m → α\nv : Fin n → α\nhu : m = 0\nr : Fin n\n⊢ ↑r = ↑(↑(castIso (_ : m + n = n)) (natAdd m r))\n[PROOFSTEP]\nsimp [hu]\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\np : ℕ\nα : Type u_1\na : Fin m → α\nb : Fin n → α\nc : Fin p → α\n⊢ append (append a b) c = append a (append b c) ∘ ↑(castIso (_ : m + n + p = m + (n + p)))\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\np : ℕ\nα : Type u_1\na : Fin m → α\nb : Fin n → α\nc : Fin p → α\ni : Fin (m + n + p)\n⊢ append (append a b) c i = (append a (append b c) ∘ ↑(castIso (_ : m + n + p = m + (n + p)))) i\n[PROOFSTEP]\nrw [Function.comp_apply]\n[GOAL]\ncase h\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\np : ℕ\nα : Type u_1\na : Fin m → α\nb : Fin n → α\nc : Fin p → α\ni : Fin (m + n + p)\n⊢ append (append a b) c i = append a (append b c) (↑(castIso (_ : m + n + p = m + (n + p))) i)\n[PROOFSTEP]\nrefine' Fin.addCases (fun l => _) (fun r => _) i\n[GOAL]\ncase h.refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\np : ℕ\nα : Type u_1\na : Fin m → α\nb : Fin n → α\nc : Fin p → α\ni : Fin (m + n + p)\nl : Fin (m + n)\n⊢ append (append a b) c (castAdd p l) = append a (append b c) (↑(castIso (_ : m + n + p = m + (n + p))) (castAdd p l))\n[PROOFSTEP]\nrw [append_left]\n[GOAL]\ncase h.refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\np : ℕ\nα : Type u_1\na : Fin m → α\nb : Fin n → α\nc : Fin p → α\ni : Fin (m + n + p)\nl : Fin (m + n)\n⊢ append a b l = append a (append b c) (↑(castIso (_ : m + n + p = m + (n + p))) (castAdd p l))\n[PROOFSTEP]\nrefine' Fin.addCases (fun ll => _) (fun lr => _) l\n[GOAL]\ncase h.refine'_1.refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\np : ℕ\nα : Type u_1\na : Fin m → α\nb : Fin n → α\nc : Fin p → α\ni : Fin (m + n + p)\nl : Fin (m + n)\nll : Fin m\n⊢ append a b (castAdd n ll) =\n    append a (append b c) (↑(castIso (_ : m + n + p = m + (n + p))) (castAdd p (castAdd n ll)))\n[PROOFSTEP]\nrw [append_left]\n  -- TODO: we need to decide the simp normal form here\n        -- and potentially add `@[simp]` to `castIso_eq_cast`.\n[GOAL]\ncase h.refine'_1.refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\np : ℕ\nα : Type u_1\na : Fin m → α\nb : Fin n → α\nc : Fin p → α\ni : Fin (m + n + p)\nl : Fin (m + n)\nll : Fin m\n⊢ a ll = append a (append b c) (↑(castIso (_ : m + n + p = m + (n + p))) (castAdd p (castAdd n ll)))\n[PROOFSTEP]\nsimp [castAdd_castAdd, castIso_eq_cast]\n[GOAL]\ncase h.refine'_1.refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\np : ℕ\nα : Type u_1\na : Fin m → α\nb : Fin n → α\nc : Fin p → α\ni : Fin (m + n + p)\nl : Fin (m + n)\nlr : Fin n\n⊢ append a b (natAdd m lr) = append a (append b c) (↑(castIso (_ : m + n + p = m + (n + p))) (castAdd p (natAdd m lr)))\n[PROOFSTEP]\nrw [append_right]\n[GOAL]\ncase h.refine'_1.refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\np : ℕ\nα : Type u_1\na : Fin m → α\nb : Fin n → α\nc : Fin p → α\ni : Fin (m + n + p)\nl : Fin (m + n)\nlr : Fin n\n⊢ b lr = append a (append b c) (↑(castIso (_ : m + n + p = m + (n + p))) (castAdd p (natAdd m lr)))\n[PROOFSTEP]\nsimp [castAdd_natAdd, castIso_eq_cast]\n[GOAL]\ncase h.refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\np : ℕ\nα : Type u_1\na : Fin m → α\nb : Fin n → α\nc : Fin p → α\ni : Fin (m + n + p)\nr : Fin p\n⊢ append (append a b) c (natAdd (m + n) r) =\n    append a (append b c) (↑(castIso (_ : m + n + p = m + (n + p))) (natAdd (m + n) r))\n[PROOFSTEP]\nrw [append_right]\n[GOAL]\ncase h.refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np✝ : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\np : ℕ\nα : Type u_1\na : Fin m → α\nb : Fin n → α\nc : Fin p → α\ni : Fin (m + n + p)\nr : Fin p\n⊢ c r = append a (append b c) (↑(castIso (_ : m + n + p = m + (n + p))) (natAdd (m + n) r))\n[PROOFSTEP]\nsimp [← natAdd_natAdd, castIso_eq_cast]\n[GOAL]\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (succ i)\ni : Fin n✝\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nn : ℕ\nx₀ : Fin 1 → α\nx : Fin n → α\n⊢ append x₀ x = cons (x₀ 0) x ∘ ↑(castIso (_ : 1 + n = n + 1))\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (succ i)\ni✝ : Fin n✝\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nn : ℕ\nx₀ : Fin 1 → α\nx : Fin n → α\ni : Fin (1 + n)\n⊢ append x₀ x i = (cons (x₀ 0) x ∘ ↑(castIso (_ : 1 + n = n + 1))) i\n[PROOFSTEP]\nrefine' Fin.addCases _ _ i\n[GOAL]\ncase h.refine'_1\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (succ i)\ni✝ : Fin n✝\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nn : ℕ\nx₀ : Fin 1 → α\nx : Fin n → α\ni : Fin (1 + n)\n⊢ ∀ (i : Fin 1), append x₀ x (castAdd n i) = (cons (x₀ 0) x ∘ ↑(castIso (_ : 1 + n = n + 1))) (castAdd n i)\n[PROOFSTEP]\nclear i\n[GOAL]\ncase h.refine'_2\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (succ i)\ni✝ : Fin n✝\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nn : ℕ\nx₀ : Fin 1 → α\nx : Fin n → α\ni : Fin (1 + n)\n⊢ ∀ (i : Fin n), append x₀ x (natAdd 1 i) = (cons (x₀ 0) x ∘ ↑(castIso (_ : 1 + n = n + 1))) (natAdd 1 i)\n[PROOFSTEP]\nclear i\n[GOAL]\ncase h.refine'_1\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (succ i)\ni : Fin n✝\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nn : ℕ\nx₀ : Fin 1 → α\nx : Fin n → α\n⊢ ∀ (i : Fin 1), append x₀ x (castAdd n i) = (cons (x₀ 0) x ∘ ↑(castIso (_ : 1 + n = n + 1))) (castAdd n i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.refine'_1\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (succ i)\ni✝ : Fin n✝\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nn : ℕ\nx₀ : Fin 1 → α\nx : Fin n → α\ni : Fin 1\n⊢ append x₀ x (castAdd n i) = (cons (x₀ 0) x ∘ ↑(castIso (_ : 1 + n = n + 1))) (castAdd n i)\n[PROOFSTEP]\nrw [Subsingleton.elim i 0, Fin.append_left, Function.comp_apply, eq_comm]\n[GOAL]\ncase h.refine'_1\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (succ i)\ni✝ : Fin n✝\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nn : ℕ\nx₀ : Fin 1 → α\nx : Fin n → α\ni : Fin 1\n⊢ cons (x₀ 0) x (↑(castIso (_ : 1 + n = n + 1)) (castAdd n 0)) = x₀ 0\n[PROOFSTEP]\nexact Fin.cons_zero _ _\n[GOAL]\ncase h.refine'_2\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (succ i)\ni : Fin n✝\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\nn : ℕ\nx₀ : Fin 1 → α\nx : Fin n → α\n⊢ ∀ (i : Fin n), append x₀ x (natAdd 1 i) = (cons (x₀ 0) x ∘ ↑(castIso (_ : 1 + n = n + 1))) (natAdd 1 i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.refine'_2\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (succ i)\ni✝ : Fin n✝\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nn : ℕ\nx₀ : Fin 1 → α\nx : Fin n → α\ni : Fin n\n⊢ append x₀ x (natAdd 1 i) = (cons (x₀ 0) x ∘ ↑(castIso (_ : 1 + n = n + 1))) (natAdd 1 i)\n[PROOFSTEP]\nrw [Fin.append_right, Function.comp_apply, Fin.castIso_natAdd, eq_comm, Fin.addNat_one]\n[GOAL]\ncase h.refine'_2\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ 0\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (succ i)\ni✝ : Fin n✝\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\nn : ℕ\nx₀ : Fin 1 → α\nx : Fin n → α\ni : Fin n\n⊢ cons (x₀ 0) x (succ i) = x i\n[PROOFSTEP]\nexact Fin.cons_succ _ _ _\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\n⊢ repeat 1 a = a ∘ ↑(castIso (_ : 1 * n = n))\n[PROOFSTEP]\ngeneralize_proofs h\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nh : 1 * n = n\n⊢ repeat 1 a = a ∘ ↑(castIso h)\n[PROOFSTEP]\napply funext\n[GOAL]\ncase h\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nh : 1 * n = n\n⊢ ∀ (x : Fin (1 * n)), repeat 1 a x = (a ∘ ↑(castIso h)) x\n[PROOFSTEP]\nrw [(Fin.castIso h.symm).surjective.forall]\n[GOAL]\ncase h\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nh : 1 * n = n\n⊢ ∀ (x : Fin n), repeat 1 a (↑(castIso (_ : n = 1 * n)) x) = (a ∘ ↑(castIso h)) (↑(castIso (_ : n = 1 * n)) x)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni✝ : Fin n\ny : α✝ (succ i✝)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nh : 1 * n = n\ni : Fin n\n⊢ repeat 1 a (↑(castIso (_ : n = 1 * n)) i) = (a ∘ ↑(castIso h)) (↑(castIso (_ : n = 1 * n)) i)\n[PROOFSTEP]\nsimp [modNat, Nat.mod_eq_of_lt i.is_lt]\n[GOAL]\nm✝ n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nm : ℕ\n⊢ repeat (Nat.succ m) a = append a (repeat m a) ∘ ↑(castIso (_ : Nat.succ m * n = n + m * n))\n[PROOFSTEP]\ngeneralize_proofs h\n[GOAL]\nm✝ n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nm : ℕ\nh : Nat.succ m * n = n + m * n\n⊢ repeat (Nat.succ m) a = append a (repeat m a) ∘ ↑(castIso h)\n[PROOFSTEP]\napply funext\n[GOAL]\ncase h\nm✝ n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nm : ℕ\nh : Nat.succ m * n = n + m * n\n⊢ ∀ (x : Fin (Nat.succ m * n)), repeat (Nat.succ m) a x = (append a (repeat m a) ∘ ↑(castIso h)) x\n[PROOFSTEP]\nrw [(Fin.castIso h.symm).surjective.forall]\n[GOAL]\ncase h\nm✝ n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nm : ℕ\nh : Nat.succ m * n = n + m * n\n⊢ ∀ (x : Fin (n + m * n)),\n    repeat (Nat.succ m) a (↑(castIso (_ : n + m * n = Nat.succ m * n)) x) =\n      (append a (repeat m a) ∘ ↑(castIso h)) (↑(castIso (_ : n + m * n = Nat.succ m * n)) x)\n[PROOFSTEP]\nrefine' Fin.addCases (fun l => _) fun r => _\n[GOAL]\ncase h.refine'_1\nm✝ n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nm : ℕ\nh : Nat.succ m * n = n + m * n\nl : Fin n\n⊢ repeat (Nat.succ m) a (↑(castIso (_ : n + m * n = Nat.succ m * n)) (castAdd (m * n) l)) =\n    (append a (repeat m a) ∘ ↑(castIso h)) (↑(castIso (_ : n + m * n = Nat.succ m * n)) (castAdd (m * n) l))\n[PROOFSTEP]\nsimp [modNat, Nat.mod_eq_of_lt l.is_lt]\n[GOAL]\ncase h.refine'_2\nm✝ n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nm : ℕ\nh : Nat.succ m * n = n + m * n\nr : Fin (m * n)\n⊢ repeat (Nat.succ m) a (↑(castIso (_ : n + m * n = Nat.succ m * n)) (natAdd n r)) =\n    (append a (repeat m a) ∘ ↑(castIso h)) (↑(castIso (_ : n + m * n = Nat.succ m * n)) (natAdd n r))\n[PROOFSTEP]\nsimp [modNat]\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nm₁ m₂ : ℕ\n⊢ repeat (m₁ + m₂) a = append (repeat m₁ a) (repeat m₂ a) ∘ ↑(castIso (_ : (m₁ + m₂) * n = m₁ * n + m₂ * n))\n[PROOFSTEP]\ngeneralize_proofs h\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nm₁ m₂ : ℕ\nh : (m₁ + m₂) * n = m₁ * n + m₂ * n\n⊢ repeat (m₁ + m₂) a = append (repeat m₁ a) (repeat m₂ a) ∘ ↑(castIso h)\n[PROOFSTEP]\napply funext\n[GOAL]\ncase h\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nm₁ m₂ : ℕ\nh : (m₁ + m₂) * n = m₁ * n + m₂ * n\n⊢ ∀ (x : Fin ((m₁ + m₂) * n)), repeat (m₁ + m₂) a x = (append (repeat m₁ a) (repeat m₂ a) ∘ ↑(castIso h)) x\n[PROOFSTEP]\nrw [(Fin.castIso h.symm).surjective.forall]\n[GOAL]\ncase h\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nm₁ m₂ : ℕ\nh : (m₁ + m₂) * n = m₁ * n + m₂ * n\n⊢ ∀ (x : Fin (m₁ * n + m₂ * n)),\n    repeat (m₁ + m₂) a (↑(castIso (_ : m₁ * n + m₂ * n = (m₁ + m₂) * n)) x) =\n      (append (repeat m₁ a) (repeat m₂ a) ∘ ↑(castIso h)) (↑(castIso (_ : m₁ * n + m₂ * n = (m₁ + m₂) * n)) x)\n[PROOFSTEP]\nrefine' Fin.addCases (fun l => _) fun r => _\n[GOAL]\ncase h.refine'_1\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nm₁ m₂ : ℕ\nh : (m₁ + m₂) * n = m₁ * n + m₂ * n\nl : Fin (m₁ * n)\n⊢ repeat (m₁ + m₂) a (↑(castIso (_ : m₁ * n + m₂ * n = (m₁ + m₂) * n)) (castAdd (m₂ * n) l)) =\n    (append (repeat m₁ a) (repeat m₂ a) ∘ ↑(castIso h))\n      (↑(castIso (_ : m₁ * n + m₂ * n = (m₁ + m₂) * n)) (castAdd (m₂ * n) l))\n[PROOFSTEP]\nsimp [modNat, Nat.mod_eq_of_lt l.is_lt]\n[GOAL]\ncase h.refine'_2\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ 0\nq : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (succ i)\ni : Fin n\ny : α✝ (succ i)\nz : α✝ 0\nα : Type u_1\na : Fin n → α\nm₁ m₂ : ℕ\nh : (m₁ + m₂) * n = m₁ * n + m₂ * n\nr : Fin (m₂ * n)\n⊢ repeat (m₁ + m₂) a (↑(castIso (_ : m₁ * n + m₂ * n = (m₁ + m₂) * n)) (natAdd (m₁ * n) r)) =\n    (append (repeat m₁ a) (repeat m₂ a) ∘ ↑(castIso h))\n      (↑(castIso (_ : m₁ * n + m₂ * n = (m₁ + m₂) * n)) (natAdd (m₁ * n) r))\n[PROOFSTEP]\nsimp [modNat, Nat.add_mod]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx✝ : α (last n)\nq : (i : Fin (n + 1)) → α i\np✝ : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\np : (i : Fin n) → α (castSucc i)\nx : α (last n)\ni : Fin (n + 1)\nh : ↑i < n\n⊢ α (castSucc (castLT i h)) = α i\n[PROOFSTEP]\nrw [Fin.castSucc_castLT i h]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx✝ : α (last n)\nq : (i : Fin (n + 1)) → α i\np✝ : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\np : (i : Fin n) → α (castSucc i)\nx : α (last n)\ni : Fin (n + 1)\nh : ¬↑i < n\n⊢ α (last n) = α i\n[PROOFSTEP]\nrw [eq_last_of_not_lt h]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\n⊢ init (snoc p x) = p\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\ni : Fin n\n⊢ init (snoc p x) i = p i\n[PROOFSTEP]\nsimp only [init, snoc, coe_castSucc, is_lt, cast_eq, dite_true]\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\ni : Fin n\n⊢ p (castLT (castSucc i) (_ : ↑i < n)) = p i\n[PROOFSTEP]\nconvert cast_eq rfl (p i)\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\n⊢ snoc p x (castSucc i) = p i\n[PROOFSTEP]\nsimp only [snoc, coe_castSucc, is_lt, cast_eq, dite_true]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\n⊢ p (castLT (castSucc i) (_ : ↑i < n)) = p i\n[PROOFSTEP]\nconvert cast_eq rfl (p i)\n[GOAL]\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝ : Fin n✝\ny : α✝ (castSucc i✝)\nz : α✝ (last n✝)\nn : ℕ\nα : Type u_1\na : α\nf : Fin n → α\ni : Fin n\n⊢ (snoc f a ∘ castSucc) i = f i\n[PROOFSTEP]\nrw [Function.comp_apply, snoc_castSucc]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\n⊢ snoc p x (last n) = x\n[PROOFSTEP]\nsimp [snoc]\n[GOAL]\nm✝ n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni : Fin n✝\ny : α✝ (castSucc i)\nz : α✝ (last n✝)\nn m : ℕ\nα : Type u_1\nf : Fin (m + n) → α\na : α\n⊢ snoc f a ∘ natAdd m = snoc (f ∘ natAdd m) a\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nm✝ n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝ : Fin n✝\ny : α✝ (castSucc i✝)\nz : α✝ (last n✝)\nn m : ℕ\nα : Type u_1\nf : Fin (m + n) → α\na : α\ni : Fin (n + 1)\n⊢ (snoc f a ∘ natAdd m) i = snoc (f ∘ natAdd m) a i\n[PROOFSTEP]\nrefine' Fin.lastCases _ (fun i ↦ _) i\n[GOAL]\ncase h.refine'_1\nm✝ n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝ : Fin n✝\ny : α✝ (castSucc i✝)\nz : α✝ (last n✝)\nn m : ℕ\nα : Type u_1\nf : Fin (m + n) → α\na : α\ni : Fin (n + 1)\n⊢ (snoc f a ∘ natAdd m) (last n) = snoc (f ∘ natAdd m) a (last n)\n[PROOFSTEP]\nsimp only [Function.comp_apply]\n[GOAL]\ncase h.refine'_1\nm✝ n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝ : Fin n✝\ny : α✝ (castSucc i✝)\nz : α✝ (last n✝)\nn m : ℕ\nα : Type u_1\nf : Fin (m + n) → α\na : α\ni : Fin (n + 1)\n⊢ snoc f a (natAdd m (last n)) = snoc (f ∘ natAdd m) a (last n)\n[PROOFSTEP]\nrw [snoc_last, natAdd_last, snoc_last]\n[GOAL]\ncase h.refine'_2\nm✝ n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝¹ : Fin n✝\ny : α✝ (castSucc i✝¹)\nz : α✝ (last n✝)\nn m : ℕ\nα : Type u_1\nf : Fin (m + n) → α\na : α\ni✝ : Fin (n + 1)\ni : Fin n\n⊢ (snoc f a ∘ natAdd m) (castSucc i) = snoc (f ∘ natAdd m) a (castSucc i)\n[PROOFSTEP]\nsimp only [comp_apply, snoc_castSucc]\n[GOAL]\ncase h.refine'_2\nm✝ n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝¹ : Fin n✝\ny : α✝ (castSucc i✝¹)\nz : α✝ (last n✝)\nn m : ℕ\nα : Type u_1\nf : Fin (m + n) → α\na : α\ni✝ : Fin (n + 1)\ni : Fin n\n⊢ snoc f a (natAdd m (castSucc i)) = f (natAdd m i)\n[PROOFSTEP]\nrw [natAdd_castSucc, snoc_castSucc]\n[GOAL]\nm✝ n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni : Fin n✝\ny : α✝ (castSucc i)\nz : α✝ (last n✝)\nn m : ℕ\nα : Type u_1\nf : Fin (n + m) → α\na : α\n⊢ ∀ (x : Fin n), (snoc f a ∘ castAdd (m + 1)) x = (f ∘ castAdd m) x\n[PROOFSTEP]\nunfold comp\n[GOAL]\nm✝ n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni : Fin n✝\ny : α✝ (castSucc i)\nz : α✝ (last n✝)\nn m : ℕ\nα : Type u_1\nf : Fin (n + m) → α\na : α\n⊢ ∀ (x : Fin n), snoc f a (castAdd (m + 1) x) = f (castAdd m x)\n[PROOFSTEP]\nexact snoc_cast_add _ _\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\n⊢ snoc (update p i y) x = update (snoc p x) (castSucc i) y\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\n⊢ snoc (update p i y) x j = update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nby_cases h : j.val < n\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\n⊢ snoc (update p i y) x j = update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nrw [snoc]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\n⊢ (if h : ↑j < n then _root_.cast (_ : α (castSucc (castLT j h)) = α j) (update p i y (castLT j h))\n    else _root_.cast (_ : α (last n) = α j) x) =\n    update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\n⊢ (if h_1 : True then\n      _root_.cast (_ : α (castSucc (castLT j (_ : ↑j < n))) = α j) (update p i y (castLT j (_ : ↑j < n)))\n    else _root_.cast (_ : α (last n) = α j) x) =\n    update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nsimp only [dif_pos]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\n⊢ _root_.cast (_ : α (castSucc (castLT j (_ : ↑j < n))) = α j) (update p i y (castLT j (_ : ↑j < n))) =\n    update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nby_cases h' : j = castSucc i\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\n⊢ _root_.cast (_ : α (castSucc (castLT j (_ : ↑j < n))) = α j) (update p i y (castLT j (_ : ↑j < n))) =\n    update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nhave C1 : α (castSucc i) = α j := by rw [h']\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\n⊢ α (castSucc i) = α j\n[PROOFSTEP]\nrw [h']\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\n⊢ _root_.cast (_ : α (castSucc (castLT j (_ : ↑j < n))) = α j) (update p i y (castLT j (_ : ↑j < n))) =\n    update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nhave E1 : update (snoc p x) (castSucc i) y j = _root_.cast C1 y :=\n  by\n  have : update (snoc p x) j (_root_.cast C1 y) j = _root_.cast C1 y := by simp\n  convert this\n  · exact h'.symm\n  · exact heq_of_cast_eq (congr_arg α (Eq.symm h')) rfl\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\n⊢ update (snoc p x) (castSucc i) y j = _root_.cast C1 y\n[PROOFSTEP]\nhave : update (snoc p x) j (_root_.cast C1 y) j = _root_.cast C1 y := by simp\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\n⊢ update (snoc p x) j (_root_.cast C1 y) j = _root_.cast C1 y\n[PROOFSTEP]\nsimp\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nthis : update (snoc p x) j (_root_.cast C1 y) j = _root_.cast C1 y\n⊢ update (snoc p x) (castSucc i) y j = _root_.cast C1 y\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_2.h.e'_5\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nthis : update (snoc p x) j (_root_.cast C1 y) j = _root_.cast C1 y\n⊢ castSucc i = j\n[PROOFSTEP]\nexact h'.symm\n[GOAL]\ncase h.e'_2.h.e'_6\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nthis : update (snoc p x) j (_root_.cast C1 y) j = _root_.cast C1 y\ne_5✝ : castSucc i = j\n⊢ HEq y (_root_.cast C1 y)\n[PROOFSTEP]\nexact heq_of_cast_eq (congr_arg α (Eq.symm h')) rfl\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nE1 : update (snoc p x) (castSucc i) y j = _root_.cast C1 y\n⊢ _root_.cast (_ : α (castSucc (castLT j (_ : ↑j < n))) = α j) (update p i y (castLT j (_ : ↑j < n))) =\n    update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nhave C2 : α (castSucc i) = α (castSucc (castLT j h)) := by rw [castSucc_castLT, h']\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nE1 : update (snoc p x) (castSucc i) y j = _root_.cast C1 y\n⊢ α (castSucc i) = α (castSucc (castLT j h))\n[PROOFSTEP]\nrw [castSucc_castLT, h']\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nE1 : update (snoc p x) (castSucc i) y j = _root_.cast C1 y\nC2 : α (castSucc i) = α (castSucc (castLT j h))\n⊢ _root_.cast (_ : α (castSucc (castLT j (_ : ↑j < n))) = α j) (update p i y (castLT j (_ : ↑j < n))) =\n    update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nhave E2 : update p i y (castLT j h) = _root_.cast C2 y :=\n  by\n  have : update p (castLT j h) (_root_.cast C2 y) (castLT j h) = _root_.cast C2 y := by simp\n  convert this\n  · simp [h, h']\n  · exact heq_of_cast_eq C2 rfl\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nE1 : update (snoc p x) (castSucc i) y j = _root_.cast C1 y\nC2 : α (castSucc i) = α (castSucc (castLT j h))\n⊢ update p i y (castLT j h) = _root_.cast C2 y\n[PROOFSTEP]\nhave : update p (castLT j h) (_root_.cast C2 y) (castLT j h) = _root_.cast C2 y := by simp\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nE1 : update (snoc p x) (castSucc i) y j = _root_.cast C1 y\nC2 : α (castSucc i) = α (castSucc (castLT j h))\n⊢ update p (castLT j h) (_root_.cast C2 y) (castLT j h) = _root_.cast C2 y\n[PROOFSTEP]\nsimp\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nE1 : update (snoc p x) (castSucc i) y j = _root_.cast C1 y\nC2 : α (castSucc i) = α (castSucc (castLT j h))\nthis : update p (castLT j h) (_root_.cast C2 y) (castLT j h) = _root_.cast C2 y\n⊢ update p i y (castLT j h) = _root_.cast C2 y\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_2.h.e'_5\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nE1 : update (snoc p x) (castSucc i) y j = _root_.cast C1 y\nC2 : α (castSucc i) = α (castSucc (castLT j h))\nthis : update p (castLT j h) (_root_.cast C2 y) (castLT j h) = _root_.cast C2 y\n⊢ i = castLT j h\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\ncase h.e'_2.h.e'_6\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nE1 : update (snoc p x) (castSucc i) y j = _root_.cast C1 y\nC2 : α (castSucc i) = α (castSucc (castLT j h))\nthis : update p (castLT j h) (_root_.cast C2 y) (castLT j h) = _root_.cast C2 y\ne_5✝ : i = castLT j h\n⊢ HEq y (_root_.cast C2 y)\n[PROOFSTEP]\nexact heq_of_cast_eq C2 rfl\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nE1 : update (snoc p x) (castSucc i) y j = _root_.cast C1 y\nC2 : α (castSucc i) = α (castSucc (castLT j h))\nE2 : update p i y (castLT j h) = _root_.cast C2 y\n⊢ _root_.cast (_ : α (castSucc (castLT j (_ : ↑j < n))) = α j) (update p i y (castLT j (_ : ↑j < n))) =\n    update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nrw [E1, E2]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : j = castSucc i\nC1 : α (castSucc i) = α j\nE1 : update (snoc p x) (castSucc i) y j = _root_.cast C1 y\nC2 : α (castSucc i) = α (castSucc (castLT j h))\nE2 : update p i y (castLT j h) = _root_.cast C2 y\n⊢ _root_.cast (_ : α (castSucc (castLT j (_ : ↑j < n))) = α j) (_root_.cast C2 y) = _root_.cast C1 y\n[PROOFSTEP]\nexact eq_rec_compose (Eq.trans C2.symm C1) C2 y\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : ¬j = castSucc i\n⊢ _root_.cast (_ : α (castSucc (castLT j (_ : ↑j < n))) = α j) (update p i y (castLT j (_ : ↑j < n))) =\n    update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nhave : ¬castLT j h = i := by\n  intro E\n  apply h'\n  rw [← E, castSucc_castLT]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : ¬j = castSucc i\n⊢ ¬castLT j h = i\n[PROOFSTEP]\nintro E\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : ¬j = castSucc i\nE : castLT j h = i\n⊢ False\n[PROOFSTEP]\napply h'\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : ¬j = castSucc i\nE : castLT j h = i\n⊢ j = castSucc i\n[PROOFSTEP]\nrw [← E, castSucc_castLT]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nh' : ¬j = castSucc i\nthis : ¬castLT j h = i\n⊢ _root_.cast (_ : α (castSucc (castLT j (_ : ↑j < n))) = α j) (update p i y (castLT j (_ : ↑j < n))) =\n    update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nsimp [h', this, snoc, h]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ¬↑j < n\n⊢ snoc (update p i y) x j = update (snoc p x) (castSucc i) y j\n[PROOFSTEP]\nrw [eq_last_of_not_lt h]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ¬↑j < n\n⊢ snoc (update p i y) x (last n) = update (snoc p x) (castSucc i) y (last n)\n[PROOFSTEP]\nsimp [Ne.symm (ne_of_lt (castSucc_lt_last i))]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\n⊢ update (snoc p x) (last n) z = snoc p z\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\n⊢ update (snoc p x) (last n) z j = snoc p z j\n[PROOFSTEP]\nby_cases h : j.val < n\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\n⊢ update (snoc p x) (last n) z j = snoc p z j\n[PROOFSTEP]\nhave : j ≠ last n := ne_of_lt h\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nthis : j ≠ last n\n⊢ update (snoc p x) (last n) z j = snoc p z j\n[PROOFSTEP]\nsimp [h, update_noteq, this, snoc]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ¬↑j < n\n⊢ update (snoc p x) (last n) z j = snoc p z j\n[PROOFSTEP]\nrw [eq_last_of_not_lt h]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ¬↑j < n\n⊢ update (snoc p x) (last n) z (last n) = snoc p z (last n)\n[PROOFSTEP]\nsimp\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\n⊢ snoc (init q) (q (last n)) = q\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\n⊢ snoc (init q) (q (last n)) j = q j\n[PROOFSTEP]\nby_cases h : j.val < n\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\n⊢ snoc (init q) (q (last n)) j = q j\n[PROOFSTEP]\nsimp only [init, snoc, h, cast_eq, dite_true]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\n⊢ q (castSucc (castLT j (_ : ↑j < n))) = q j\n[PROOFSTEP]\nhave _ : castSucc (castLT j h) = j := castSucc_castLT _ _\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nx✝ : castSucc (castLT j h) = j\n⊢ q (castSucc (castLT j (_ : ↑j < n))) = q j\n[PROOFSTEP]\nrw [← cast_eq rfl (q j)]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ↑j < n\nx✝ : castSucc (castLT j h) = j\n⊢ q (castSucc (castLT j (_ : ↑j < n))) = _root_.cast (_ : α j = α j) (q j)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ¬↑j < n\n⊢ snoc (init q) (q (last n)) j = q j\n[PROOFSTEP]\nrw [eq_last_of_not_lt h]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin (n + 1)\nh : ¬↑j < n\n⊢ snoc (init q) (q (last n)) (last n) = q (last n)\n[PROOFSTEP]\nsimp\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\n⊢ init (update q (last n) z) = init q\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin n\n⊢ init (update q (last n) z) j = init q j\n[PROOFSTEP]\nsimp [init, ne_of_lt, castSucc_lt_last]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\n⊢ init (update q (castSucc i) y) = update (init q) i y\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin n\n⊢ init (update q (castSucc i) y) j = update (init q) i y j\n[PROOFSTEP]\nby_cases h : j = i\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin n\nh : j = i\n⊢ init (update q (castSucc i) y) j = update (init q) i y j\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin n\nh : j = i\n⊢ init (update q (castSucc i) y) i = update (init q) i y i\n[PROOFSTEP]\nsimp [init]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nj : Fin n\nh : ¬j = i\n⊢ init (update q (castSucc i) y) j = update (init q) i y j\n[PROOFSTEP]\nsimp [init, h, castSucc_inj]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nβ : Type u_1\nq : Fin (n + 2) → β\n⊢ tail (init q) = init (tail q)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\nq : Fin (n + 2) → β\ni : Fin n\n⊢ tail (init q) i = init (tail q) i\n[PROOFSTEP]\nsimp [tail, init, castSucc_fin_succ]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni : Fin n\ny : α (castSucc i)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\n⊢ cons a (snoc q b) = snoc (cons a q) b\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\n⊢ cons a (snoc q b) i = snoc (cons a q) b i\n[PROOFSTEP]\nby_cases h : i = 0\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : i = 0\n⊢ cons a (snoc q b) i = snoc (cons a q) b i\n[PROOFSTEP]\nrw [h]\n  -- Porting note: `refl` finished it here in Lean 3, but I had to add more.\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : i = 0\n⊢ cons a (snoc q b) 0 = snoc (cons a q) b 0\n[PROOFSTEP]\nsimp [snoc, castLT]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\n⊢ cons a (snoc q b) i = snoc (cons a q) b i\n[PROOFSTEP]\nset j := pred i h with ji\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\nj : Fin (n + 1) := pred i h\nji : j = pred i h\n⊢ cons a (snoc q b) i = snoc (cons a q) b i\n[PROOFSTEP]\nhave : i = j.succ := by rw [ji, succ_pred]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\nj : Fin (n + 1) := pred i h\nji : j = pred i h\n⊢ i = succ j\n[PROOFSTEP]\nrw [ji, succ_pred]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\nj : Fin (n + 1) := pred i h\nji : j = pred i h\nthis : i = succ j\n⊢ cons a (snoc q b) i = snoc (cons a q) b i\n[PROOFSTEP]\nrw [this, cons_succ]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\nj : Fin (n + 1) := pred i h\nji : j = pred i h\nthis : i = succ j\n⊢ snoc q b j = snoc (cons a q) b (succ j)\n[PROOFSTEP]\nby_cases h' : j.val < n\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\nj : Fin (n + 1) := pred i h\nji : j = pred i h\nthis : i = succ j\nh' : ↑j < n\n⊢ snoc q b j = snoc (cons a q) b (succ j)\n[PROOFSTEP]\nset k := castLT j h' with jk\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\nj : Fin (n + 1) := pred i h\nji : j = pred i h\nthis : i = succ j\nh' : ↑j < n\nk : Fin n := castLT j h'\njk : k = castLT j h'\n⊢ snoc q b j = snoc (cons a q) b (succ j)\n[PROOFSTEP]\nhave : j = castSucc k := by rw [jk, castSucc_castLT]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\nj : Fin (n + 1) := pred i h\nji : j = pred i h\nthis : i = succ j\nh' : ↑j < n\nk : Fin n := castLT j h'\njk : k = castLT j h'\n⊢ j = castSucc k\n[PROOFSTEP]\nrw [jk, castSucc_castLT]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\nj : Fin (n + 1) := pred i h\nji : j = pred i h\nthis✝ : i = succ j\nh' : ↑j < n\nk : Fin n := castLT j h'\njk : k = castLT j h'\nthis : j = castSucc k\n⊢ snoc q b j = snoc (cons a q) b (succ j)\n[PROOFSTEP]\nrw [this, ← castSucc_fin_succ, snoc]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\nj : Fin (n + 1) := pred i h\nji : j = pred i h\nthis✝ : i = succ j\nh' : ↑j < n\nk : Fin n := castLT j h'\njk : k = castLT j h'\nthis : j = castSucc k\n⊢ (if h : ↑(castSucc k) < n then\n      _root_.cast (_ : (fun x => β) (succ (castSucc (castLT (castSucc k) h))) = (fun x => β) (succ (castSucc k)))\n        (q (castLT (castSucc k) h))\n    else _root_.cast (_ : (fun x => β) (succ (last n)) = (fun x => β) (succ (castSucc k))) b) =\n    snoc (cons a q) b (castSucc (succ k))\n[PROOFSTEP]\nsimp [pred, snoc, cons]\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\nj : Fin (n + 1) := pred i h\nji : j = pred i h\nthis✝ : i = succ j\nh' : ↑j < n\nk : Fin n := castLT j h'\njk : k = castLT j h'\nthis : j = castSucc k\n⊢ (if h_1 : ↑i - 1 < n then q (castLT (subNat 1 i (_ : 0 < ↑i)) (_ : ↑(subNat 1 i (_ : 0 < ↑i)) < n)) else b) =\n    if ↑i - 1 < n then q (castLT (subNat 1 i (_ : 0 < ↑i)) (_ : ↑(subNat 1 i (_ : 0 < ↑i)) < n)) else b\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\nj : Fin (n + 1) := pred i h\nji : j = pred i h\nthis : i = succ j\nh' : ¬↑j < n\n⊢ snoc q b j = snoc (cons a q) b (succ j)\n[PROOFSTEP]\nrw [eq_last_of_not_lt h', succ_last]\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nx : α (last n)\nq✝ : (i : Fin (n + 1)) → α i\np : (i : Fin n) → α (castSucc i)\ni✝ : Fin n\ny : α (castSucc i✝)\nz : α (last n)\nβ : Type u_1\na : β\nq : Fin n → β\nb : β\ni : Fin (Nat.succ n + 1)\nh : ¬i = 0\nj : Fin (n + 1) := pred i h\nji : j = pred i h\nthis : i = succ j\nh' : ¬↑j < n\n⊢ snoc q b (last n) = snoc (cons a q) b (last (Nat.succ n))\n[PROOFSTEP]\nsimp\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ (last n)\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (castSucc i)\ni : Fin n\ny✝ : α✝ (castSucc i)\nz : α✝ (last n)\nα : Type u_1\nβ : Type u_2\ng : α → β\nq : Fin n → α\ny : α\n⊢ g ∘ snoc q y = snoc (g ∘ q) (g y)\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ (last n)\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (castSucc i)\ni : Fin n\ny✝ : α✝ (castSucc i)\nz : α✝ (last n)\nα : Type u_1\nβ : Type u_2\ng : α → β\nq : Fin n → α\ny : α\nj : Fin (n + 1)\n⊢ (g ∘ snoc q y) j = snoc (g ∘ q) (g y) j\n[PROOFSTEP]\nby_cases h : j.val < n\n[GOAL]\ncase pos\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ (last n)\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (castSucc i)\ni : Fin n\ny✝ : α✝ (castSucc i)\nz : α✝ (last n)\nα : Type u_1\nβ : Type u_2\ng : α → β\nq : Fin n → α\ny : α\nj : Fin (n + 1)\nh : ↑j < n\n⊢ (g ∘ snoc q y) j = snoc (g ∘ q) (g y) j\n[PROOFSTEP]\nsimp [h, snoc, castSucc_castLT]\n[GOAL]\ncase neg\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ (last n)\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (castSucc i)\ni : Fin n\ny✝ : α✝ (castSucc i)\nz : α✝ (last n)\nα : Type u_1\nβ : Type u_2\ng : α → β\nq : Fin n → α\ny : α\nj : Fin (n + 1)\nh : ¬↑j < n\n⊢ (g ∘ snoc q y) j = snoc (g ∘ q) (g y) j\n[PROOFSTEP]\nrw [eq_last_of_not_lt h]\n[GOAL]\ncase neg\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ (last n)\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (castSucc i)\ni : Fin n\ny✝ : α✝ (castSucc i)\nz : α✝ (last n)\nα : Type u_1\nβ : Type u_2\ng : α → β\nq : Fin n → α\ny : α\nj : Fin (n + 1)\nh : ¬↑j < n\n⊢ (g ∘ snoc q y) (last n) = snoc (g ∘ q) (g y) (last n)\n[PROOFSTEP]\nsimp\n[GOAL]\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni : Fin n✝\ny : α✝ (castSucc i)\nz : α✝ (last n✝)\nα : Type u_1\nn : ℕ\nx : Fin n → α\nx₀ : Fin 1 → α\n⊢ append x x₀ = snoc x (x₀ 0)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝ : Fin n✝\ny : α✝ (castSucc i✝)\nz : α✝ (last n✝)\nα : Type u_1\nn : ℕ\nx : Fin n → α\nx₀ : Fin 1 → α\ni : Fin (n + 1)\n⊢ append x x₀ i = snoc x (x₀ 0) i\n[PROOFSTEP]\nrefine' Fin.addCases _ _ i\n[GOAL]\ncase h.refine'_1\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝ : Fin n✝\ny : α✝ (castSucc i✝)\nz : α✝ (last n✝)\nα : Type u_1\nn : ℕ\nx : Fin n → α\nx₀ : Fin 1 → α\ni : Fin (n + 1)\n⊢ ∀ (i : Fin n), append x x₀ (castAdd 1 i) = snoc x (x₀ 0) (castAdd 1 i)\n[PROOFSTEP]\nclear i\n[GOAL]\ncase h.refine'_2\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝ : Fin n✝\ny : α✝ (castSucc i✝)\nz : α✝ (last n✝)\nα : Type u_1\nn : ℕ\nx : Fin n → α\nx₀ : Fin 1 → α\ni : Fin (n + 1)\n⊢ ∀ (i : Fin 1), append x x₀ (natAdd n i) = snoc x (x₀ 0) (natAdd n i)\n[PROOFSTEP]\nclear i\n[GOAL]\ncase h.refine'_1\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni : Fin n✝\ny : α✝ (castSucc i)\nz : α✝ (last n✝)\nα : Type u_1\nn : ℕ\nx : Fin n → α\nx₀ : Fin 1 → α\n⊢ ∀ (i : Fin n), append x x₀ (castAdd 1 i) = snoc x (x₀ 0) (castAdd 1 i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.refine'_1\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝ : Fin n✝\ny : α✝ (castSucc i✝)\nz : α✝ (last n✝)\nα : Type u_1\nn : ℕ\nx : Fin n → α\nx₀ : Fin 1 → α\ni : Fin n\n⊢ append x x₀ (castAdd 1 i) = snoc x (x₀ 0) (castAdd 1 i)\n[PROOFSTEP]\nrw [Fin.append_left]\n[GOAL]\ncase h.refine'_1\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝ : Fin n✝\ny : α✝ (castSucc i✝)\nz : α✝ (last n✝)\nα : Type u_1\nn : ℕ\nx : Fin n → α\nx₀ : Fin 1 → α\ni : Fin n\n⊢ x i = snoc x (x₀ 0) (castAdd 1 i)\n[PROOFSTEP]\nexact (@snoc_castSucc _ (fun _ => α) _ _ i).symm\n[GOAL]\ncase h.refine'_2\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni : Fin n✝\ny : α✝ (castSucc i)\nz : α✝ (last n✝)\nα : Type u_1\nn : ℕ\nx : Fin n → α\nx₀ : Fin 1 → α\n⊢ ∀ (i : Fin 1), append x x₀ (natAdd n i) = snoc x (x₀ 0) (natAdd n i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.refine'_2\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝ : Fin n✝\ny : α✝ (castSucc i✝)\nz : α✝ (last n✝)\nα : Type u_1\nn : ℕ\nx : Fin n → α\nx₀ : Fin 1 → α\ni : Fin 1\n⊢ append x x₀ (natAdd n i) = snoc x (x₀ 0) (natAdd n i)\n[PROOFSTEP]\nrw [Subsingleton.elim i 0, Fin.append_right]\n[GOAL]\ncase h.refine'_2\nm n✝ : ℕ\nα✝ : Fin (n✝ + 1) → Type u\nx✝ : α✝ (last n✝)\nq : (i : Fin (n✝ + 1)) → α✝ i\np : (i : Fin n✝) → α✝ (castSucc i)\ni✝ : Fin n✝\ny : α✝ (castSucc i✝)\nz : α✝ (last n✝)\nα : Type u_1\nn : ℕ\nx : Fin n → α\nx₀ : Fin 1 → α\ni : Fin 1\n⊢ x₀ 0 = snoc x (x₀ 0) (natAdd n 0)\n[PROOFSTEP]\nexact (@snoc_last _ (fun _ => α) _ _).symm\n[GOAL]\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ (last n)\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (castSucc i)\ni : Fin n\ny : α✝ (castSucc i)\nz : α✝ (last n)\nα : Type u_1\nβ : Type u_2\ng : α → β\nq : Fin (Nat.succ n) → α\n⊢ g ∘ init q = init (g ∘ q)\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα✝ : Fin (n + 1) → Type u\nx : α✝ (last n)\nq✝ : (i : Fin (n + 1)) → α✝ i\np : (i : Fin n) → α✝ (castSucc i)\ni : Fin n\ny : α✝ (castSucc i)\nz : α✝ (last n)\nα : Type u_1\nβ : Type u_2\ng : α → β\nq : Fin (Nat.succ n) → α\nj : Fin n\n⊢ (g ∘ init q) j = init (g ∘ q) j\n[PROOFSTEP]\nsimp [init]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\n⊢ insertNth i x p i = x\n[PROOFSTEP]\nsimp [insertNth, succAboveCases]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\n⊢ insertNth i x p (succAbove i j) = p j\n[PROOFSTEP]\nsimp only [insertNth, succAboveCases, dif_neg (succAbove_ne _ _), succAbove_lt_iff]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\n⊢ (if h : castSucc j < i then\n      (_ : succAbove i (castLT (succAbove i j) (_ : ↑(succAbove i j) < n)) = succAbove i j) ▸\n        p (castLT (succAbove i j) (_ : ↑(succAbove i j) < n))\n    else\n      (_ : succAbove i (pred (succAbove i j) (_ : succAbove i j ≠ 0)) = succAbove i j) ▸\n        p (pred (succAbove i j) (_ : succAbove i j ≠ 0))) =\n    p j\n[PROOFSTEP]\nsplit_ifs with hlt\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : castSucc j < i\n⊢ (_ : succAbove i (castLT (succAbove i j) (_ : ↑(succAbove i j) < n)) = succAbove i j) ▸\n      p (castLT (succAbove i j) (_ : ↑(succAbove i j) < n)) =\n    p j\n[PROOFSTEP]\ngeneralize_proofs H₁ H₂\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : castSucc j < i\nH₁ : ↑(succAbove i j) < n\nH₂ : succAbove i (castLT (succAbove i j) (_ : ↑(succAbove i j) < n)) = succAbove i j\n⊢ H₂ ▸ p (castLT (succAbove i j) H₁) = p j\n[PROOFSTEP]\nrevert H₂\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : castSucc j < i\nH₁ : ↑(succAbove i j) < n\n⊢ ∀ (H₂ : succAbove i (castLT (succAbove i j) (_ : ↑(succAbove i j) < n)) = succAbove i j),\n    H₂ ▸ p (castLT (succAbove i j) H₁) = p j\n[PROOFSTEP]\ngeneralize hk : castLT ((succAbove i) j) H₁ = k\n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : castSucc j < i\nH₁ : ↑(succAbove i j) < n\nk : Fin n\nhk : castLT (succAbove i j) H₁ = k\n⊢ ∀ (H₂ : succAbove i k = succAbove i j), H₂ ▸ p k = p j\n[PROOFSTEP]\nrw [castLT_succAbove hlt] at hk \n[GOAL]\ncase pos\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : castSucc j < i\nH₁ : ↑(succAbove i j) < n\nk : Fin n\nhk : j = k\n⊢ ∀ (H₂ : succAbove i k = succAbove i j), H₂ ▸ p k = p j\n[PROOFSTEP]\ncases hk\n[GOAL]\ncase pos.refl\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : castSucc j < i\nH₁ : ↑(succAbove i j) < n\n⊢ ∀ (H₂ : succAbove i j = succAbove i j), H₂ ▸ p j = p j\n[PROOFSTEP]\nintro\n[GOAL]\ncase pos.refl\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : castSucc j < i\nH₁ : ↑(succAbove i j) < n\nH₂✝ : succAbove i j = succAbove i j\n⊢ H₂✝ ▸ p j = p j\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : ¬castSucc j < i\n⊢ (_ : succAbove i (pred (succAbove i j) (_ : succAbove i j ≠ 0)) = succAbove i j) ▸\n      p (pred (succAbove i j) (_ : succAbove i j ≠ 0)) =\n    p j\n[PROOFSTEP]\ngeneralize_proofs H₁ H₂\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : ¬castSucc j < i\nH₁ : succAbove i j ≠ 0\nH₂ : succAbove i (pred (succAbove i j) (_ : succAbove i j ≠ 0)) = succAbove i j\n⊢ H₂ ▸ p (pred (succAbove i j) H₁) = p j\n[PROOFSTEP]\nrevert H₂\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : ¬castSucc j < i\nH₁ : succAbove i j ≠ 0\n⊢ ∀ (H₂ : succAbove i (pred (succAbove i j) (_ : succAbove i j ≠ 0)) = succAbove i j),\n    H₂ ▸ p (pred (succAbove i j) H₁) = p j\n[PROOFSTEP]\ngeneralize hk : pred ((succAboveEmb i).toEmbedding j) H₁ = k\n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : ¬castSucc j < i\nH₁ : succAbove i j ≠ 0\nk : Fin n\nhk : pred (↑(succAboveEmb i).toEmbedding j) H₁ = k\n⊢ ∀ (H₂ : succAbove i k = succAbove i j), H₂ ▸ p k = p j\n[PROOFSTEP]\nerw [pred_succAbove (le_of_not_lt hlt)] at hk \n[GOAL]\ncase neg\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : ¬castSucc j < i\nH₁ : succAbove i j ≠ 0\nk : Fin n\nhk : j = k\n⊢ ∀ (H₂ : succAbove i k = succAbove i j), H₂ ▸ p k = p j\n[PROOFSTEP]\ncases hk\n[GOAL]\ncase neg.refl\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : ¬castSucc j < i\nH₁ : succAbove i j ≠ 0\n⊢ ∀ (H₂ : succAbove i j = succAbove i j), H₂ ▸ p j = p j\n[PROOFSTEP]\nintro\n[GOAL]\ncase neg.refl\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nj : Fin n\nhlt : ¬castSucc j < i\nH₁ : succAbove i j ≠ 0\nH₂✝ : succAbove i j = succAbove i j\n⊢ H₂✝ ▸ p j = p j\n[PROOFSTEP]\nrfl\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : β\np : Fin n → β\n⊢ ∀ (x_1 : Fin n), (insertNth i x p ∘ succAbove i) x_1 = p x_1\n[PROOFSTEP]\nunfold comp\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : β\np : Fin n → β\n⊢ ∀ (x_1 : Fin n), insertNth i x p (succAbove i x_1) = p x_1\n[PROOFSTEP]\nexact insertNth_apply_succAbove i _ _\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nq : (j : Fin (n + 1)) → α j\n⊢ insertNth i x p = q ↔ q i = x ∧ p = fun j => q (succAbove i j)\n[PROOFSTEP]\nsimp [funext_iff, forall_iff_succAbove i, eq_comm]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni j : Fin (n + 1)\nh : j < i\nx : α i\np : (k : Fin n) → α (succAbove i k)\n⊢ insertNth i x p j = Eq.recOn (_ : succAbove i (castLT j (_ : ↑j < n)) = j) (p (castLT j (_ : ↑j < n)))\n[PROOFSTEP]\nrw [insertNth, succAboveCases, dif_neg h.ne, dif_pos h]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ni j : Fin (n + 1)\nh : i < j\nx : α i\np : (k : Fin n) → α (succAbove i k)\n⊢ insertNth i x p j = Eq.recOn (_ : succAbove i (pred j (_ : j ≠ 0)) = j) (p (pred j (_ : j ≠ 0)))\n[PROOFSTEP]\nrw [insertNth, succAboveCases, dif_neg h.ne', dif_neg h.not_lt]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α 0\np : (j : Fin n) → α (succAbove 0 j)\n⊢ insertNth 0 x p = cons x fun j => _root_.cast (_ : α (succAbove 0 j) = α (succ j)) (p j)\n[PROOFSTEP]\nrefine' insertNth_eq_iff.2 ⟨by simp, _⟩\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α 0\np : (j : Fin n) → α (succAbove 0 j)\n⊢ cons x (fun j => _root_.cast (_ : α (succAbove 0 j) = α (succ j)) (p j)) 0 = x\n[PROOFSTEP]\nsimp\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α 0\np : (j : Fin n) → α (succAbove 0 j)\n⊢ p = fun j => cons x (fun j => _root_.cast (_ : α (succAbove 0 j) = α (succ j)) (p j)) (succAbove 0 j)\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α 0\np : (j : Fin n) → α (succAbove 0 j)\nj : Fin n\n⊢ p j = cons x (fun j => _root_.cast (_ : α (succAbove 0 j) = α (succ j)) (p j)) (succAbove 0 j)\n[PROOFSTEP]\nconvert (cons_succ x p j).symm\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : β\np : Fin n → β\n⊢ insertNth 0 x p = cons x p\n[PROOFSTEP]\nsimp [insertNth_zero]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α (last n)\np : (j : Fin n) → α (succAbove (last n) j)\n⊢ insertNth (last n) x p = snoc (fun j => _root_.cast (_ : α (succAbove (last n) j) = α (castSucc j)) (p j)) x\n[PROOFSTEP]\nrefine' insertNth_eq_iff.2 ⟨by simp, _⟩\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α (last n)\np : (j : Fin n) → α (succAbove (last n) j)\n⊢ snoc (fun j => _root_.cast (_ : α (succAbove (last n) j) = α (castSucc j)) (p j)) x (last n) = x\n[PROOFSTEP]\nsimp\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α (last n)\np : (j : Fin n) → α (succAbove (last n) j)\n⊢ p = fun j =>\n    snoc (fun j => _root_.cast (_ : α (succAbove (last n) j) = α (castSucc j)) (p j)) x (succAbove (last n) j)\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α (last n)\np : (j : Fin n) → α (succAbove (last n) j)\nj : Fin n\n⊢ p j = snoc (fun j => _root_.cast (_ : α (succAbove (last n) j) = α (castSucc j)) (p j)) x (succAbove (last n) j)\n[PROOFSTEP]\napply eq_of_heq\n[GOAL]\ncase h.h\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α (last n)\np : (j : Fin n) → α (succAbove (last n) j)\nj : Fin n\n⊢ HEq (p j) (snoc (fun j => _root_.cast (_ : α (succAbove (last n) j) = α (castSucc j)) (p j)) x (succAbove (last n) j))\n[PROOFSTEP]\ntrans snoc (fun j ↦ _root_.cast (congr_arg α (succAbove_last_apply j)) (p j)) x (castSucc j)\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α (last n)\np : (j : Fin n) → α (succAbove (last n) j)\nj : Fin n\n⊢ HEq (p j) (snoc (fun j => _root_.cast (_ : α (succAbove (last n) j) = α (castSucc j)) (p j)) x (castSucc j))\n[PROOFSTEP]\nrw [snoc_castSucc]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α (last n)\np : (j : Fin n) → α (succAbove (last n) j)\nj : Fin n\n⊢ HEq (p j) (_root_.cast (_ : α (succAbove (last n) j) = α (castSucc j)) (p j))\n[PROOFSTEP]\nexact (cast_heq _ _).symm\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α (last n)\np : (j : Fin n) → α (succAbove (last n) j)\nj : Fin n\n⊢ HEq (snoc (fun j => _root_.cast (_ : α (succAbove (last n) j) = α (castSucc j)) (p j)) x (castSucc j))\n    (snoc (fun j => _root_.cast (_ : α (succAbove (last n) j) = α (castSucc j)) (p j)) x (succAbove (last n) j))\n[PROOFSTEP]\napply congr_arg_heq\n[GOAL]\ncase a\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : α (last n)\np : (j : Fin n) → α (succAbove (last n) j)\nj : Fin n\n⊢ castSucc j = succAbove (last n) j\n[PROOFSTEP]\nrw [succAbove_last]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nx : β\np : Fin n → β\n⊢ insertNth (last n) x p = snoc p x\n[PROOFSTEP]\nsimp [insertNth_last]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ninst✝ : (j : Fin (n + 1)) → Zero (α j)\ni : Fin (n + 1)\nx : α i\n⊢ Pi.single i x i = x ∧ 0 = fun j => Pi.single i x (succAbove i j)\n[PROOFSTEP]\nsimp [succAbove_ne, Pi.zero_def]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\nop : (j : Fin (n + 1)) → α j → α j → α j\ni : Fin (n + 1)\nx y : α i\np q : (j : Fin n) → α (succAbove i j)\n⊢ op i (insertNth i x p i) (insertNth i y q i) = op i x y ∧\n    (fun j => op (succAbove i j) (p j) (q j)) = fun j =>\n      op (succAbove i j) (insertNth i x p (succAbove i j)) (insertNth i y q (succAbove i j))\n[PROOFSTEP]\nsimp\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ninst✝ : (j : Fin (n + 1)) → AddGroup (α j)\ni : Fin (n + 1)\nx y : α i\np : (j : Fin n) → α (succAbove i j)\n⊢ insertNth i x p - insertNth i y p = Pi.single i (x - y)\n[PROOFSTEP]\nsimp_rw [← insertNth_sub, ← insertNth_zero_right, Pi.sub_def, sub_self, Pi.zero_def]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ninst✝ : (i : Fin (n + 1)) → Preorder (α i)\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nq : (j : Fin (n + 1)) → α j\n⊢ insertNth i x p ≤ q ↔ x ≤ q i ∧ p ≤ fun j => q (succAbove i j)\n[PROOFSTEP]\nsimp [Pi.le_def, forall_iff_succAbove i]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ninst✝ : (i : Fin (n + 1)) → Preorder (α i)\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nq : (j : Fin (n + 1)) → α j\n⊢ q ≤ insertNth i x p ↔ q i ≤ x ∧ (fun j => q (succAbove i j)) ≤ p\n[PROOFSTEP]\nsimp [Pi.le_def, forall_iff_succAbove i]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ninst✝ : (i : Fin (n + 1)) → Preorder (α i)\ni : Fin (n + 1)\nx : α i\np : (j : Fin n) → α (succAbove i j)\nq₁ q₂ : (j : Fin (n + 1)) → α j\n⊢ insertNth i x p ∈ Icc q₁ q₂ ↔\n    x ∈ Icc (q₁ i) (q₂ i) ∧ p ∈ Icc (fun j => q₁ (succAbove i j)) fun j => q₂ (succAbove i j)\n[PROOFSTEP]\nsimp only [mem_Icc, insertNth_le_iff, le_insertNth_iff, and_assoc, @and_left_comm (x ≤ q₂ i)]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ninst✝ : (i : Fin (n + 1)) → Preorder (α i)\ni : Fin (n + 1)\nx : α i\nq₁ q₂ : (j : Fin (n + 1)) → α j\nhx : x ∈ Icc (q₁ i) (q₂ i)\np : (j : Fin n) → α (succAbove i j)\n⊢ p ∈ insertNth i x ⁻¹' Icc q₁ q₂ ↔ p ∈ Icc (fun j => q₁ (succAbove i j)) fun j => q₂ (succAbove i j)\n[PROOFSTEP]\nsimp only [mem_preimage, insertNth_mem_Icc, hx, true_and_iff]\n[GOAL]\nm n : ℕ\nα : Fin (n + 1) → Type u\nβ : Type v\ninst✝ : (i : Fin (n + 1)) → Preorder (α i)\ni : Fin (n + 1)\nx : α i\nq₁ q₂ : (j : Fin (n + 1)) → α j\nhx : ¬x ∈ Icc (q₁ i) (q₂ i)\np : (j : Fin n) → α (succAbove i j)\n⊢ p ∈ insertNth i x ⁻¹' Icc q₁ q₂ ↔ p ∈ ∅\n[PROOFSTEP]\nsimp only [mem_preimage, insertNth_mem_Icc, hx, false_and_iff, mem_empty_iff_false]\n[GOAL]\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\n⊢ Option (Fin (n + 1))\n[PROOFSTEP]\nexact\n  Option.casesOn (@find n (fun i ↦ p (i.castLT (Nat.lt_succ_of_lt i.2))) _)\n    (if _ : p (Fin.last n) then some (Fin.last n) else none) fun i ↦ some (i.castLT (Nat.lt_succ_of_lt i.2))\n[GOAL]\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nI : DecidablePred p\ni : Fin (n + 1)\nhi : i ∈ find p\n⊢ p i\n[PROOFSTEP]\nrw [find] at hi \n[GOAL]\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nI : DecidablePred p\ni : Fin (n + 1)\nhi :\n  i ∈\n    Option.casesOn (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) (if x : p (last n) then some (last n) else none)\n      fun i => some (castLT i (_ : ↑i < Nat.succ n))\n⊢ p i\n[PROOFSTEP]\ncases' h : find fun i : Fin n ↦ p (i.castLT (Nat.lt_succ_of_lt i.2)) with j\n[GOAL]\ncase none\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nI : DecidablePred p\ni : Fin (n + 1)\nhi :\n  i ∈\n    Option.casesOn (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) (if x : p (last n) then some (last n) else none)\n      fun i => some (castLT i (_ : ↑i < Nat.succ n))\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\n⊢ p i\n[PROOFSTEP]\nrw [h] at hi \n[GOAL]\ncase none\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nI : DecidablePred p\ni : Fin (n + 1)\nhi :\n  i ∈\n    Option.casesOn none (if x : p (last n) then some (last n) else none) fun i => some (castLT i (_ : ↑i < Nat.succ n))\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\n⊢ p i\n[PROOFSTEP]\ndsimp at hi \n[GOAL]\ncase none\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nI : DecidablePred p\ni : Fin (n + 1)\nhi : i ∈ if p (last n) then some (last n) else none\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\n⊢ p i\n[PROOFSTEP]\nsplit_ifs at hi  with hl\n[GOAL]\ncase pos\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nI : DecidablePred p\ni : Fin (n + 1)\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhl : p (last n)\nhi : i ∈ some (last n)\n⊢ p i\n[PROOFSTEP]\nsimp only [Option.mem_def, Option.some.injEq] at hi \n[GOAL]\ncase pos\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nI : DecidablePred p\ni : Fin (n + 1)\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhl : p (last n)\nhi : last n = i\n⊢ p i\n[PROOFSTEP]\nexact hi ▸ hl\n[GOAL]\ncase neg\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nI : DecidablePred p\ni : Fin (n + 1)\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhl : ¬p (last n)\nhi : i ∈ none\n⊢ p i\n[PROOFSTEP]\nexact (Option.not_mem_none _ hi).elim\n[GOAL]\ncase some\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nI : DecidablePred p\ni : Fin (n + 1)\nhi :\n  i ∈\n    Option.casesOn (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) (if x : p (last n) then some (last n) else none)\n      fun i => some (castLT i (_ : ↑i < Nat.succ n))\nj : Fin n\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = some j\n⊢ p i\n[PROOFSTEP]\nrw [h] at hi \n[GOAL]\ncase some\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nI : DecidablePred p\ni : Fin (n + 1)\nj : Fin n\nhi :\n  i ∈\n    Option.casesOn (some j) (if x : p (last n) then some (last n) else none) fun i =>\n      some (castLT i (_ : ↑i < Nat.succ n))\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = some j\n⊢ p i\n[PROOFSTEP]\ndsimp at hi \n[GOAL]\ncase some\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nI : DecidablePred p\ni : Fin (n + 1)\nj : Fin n\nhi : i ∈ some (castLT j (_ : ↑j < Nat.succ n))\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = some j\n⊢ p i\n[PROOFSTEP]\nrw [← Option.some_inj.1 hi]\n[GOAL]\ncase some\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nI : DecidablePred p\ni : Fin (n + 1)\nj : Fin n\nhi : i ∈ some (castLT j (_ : ↑j < Nat.succ n))\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = some j\n⊢ p (castLT j (_ : ↑j < Nat.succ n))\n[PROOFSTEP]\nrefine @find_spec n (fun i ↦ p (i.castLT (Nat.lt_succ_of_lt i.2))) _ _ h\n[GOAL]\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\nh : Option.isSome (find p) = true\n⊢ ∃ i, p i\n[PROOFSTEP]\nrw [Option.isSome_iff_exists] at h \n[GOAL]\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\nh : ∃ a, find p = some a\n⊢ ∃ i, p i\n[PROOFSTEP]\ncases' h with i hi\n[GOAL]\ncase intro\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\ni : Fin (n + 1)\nhi : find p = some i\n⊢ ∃ i, p i\n[PROOFSTEP]\nexact ⟨i, find_spec _ hi⟩\n[GOAL]\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝¹ : DecidablePred p\nx✝ : ∃ i, p i\ni : ℕ\nhin : i < n + 1\nhi : p { val := i, isLt := hin }\n⊢ Option.isSome (find p) = true\n[PROOFSTEP]\ndsimp [find]\n[GOAL]\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝¹ : DecidablePred p\nx✝ : ∃ i, p i\ni : ℕ\nhin : i < n + 1\nhi : p { val := i, isLt := hin }\n⊢ Option.isSome\n      (Option.rec (if p (last n) then some (last n) else none) (fun val => some (castLT val (_ : ↑val < Nat.succ n)))\n        (find fun i => p (castLT i (_ : ↑i < Nat.succ n)))) =\n    true\n[PROOFSTEP]\ncases' h : find fun i : Fin n ↦ p (i.castLT (Nat.lt_succ_of_lt i.2)) with j\n[GOAL]\ncase none\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝¹ : DecidablePred p\nx✝ : ∃ i, p i\ni : ℕ\nhin : i < n + 1\nhi : p { val := i, isLt := hin }\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\n⊢ Option.isSome\n      (Option.rec (if p (last n) then some (last n) else none) (fun val => some (castLT val (_ : ↑val < Nat.succ n)))\n        none) =\n    true\n[PROOFSTEP]\nsplit_ifs with hl\n[GOAL]\ncase pos\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝¹ : DecidablePred p\nx✝ : ∃ i, p i\ni : ℕ\nhin : i < n + 1\nhi : p { val := i, isLt := hin }\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhl : p (last n)\n⊢ Option.isSome (Option.rec (some (last n)) (fun val => some (castLT val (_ : ↑val < Nat.succ n))) none) = true\n[PROOFSTEP]\nexact Option.isSome_some\n[GOAL]\ncase neg\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝¹ : DecidablePred p\nx✝ : ∃ i, p i\ni : ℕ\nhin : i < n + 1\nhi : p { val := i, isLt := hin }\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhl : ¬p (last n)\n⊢ Option.isSome (Option.rec none (fun val => some (castLT val (_ : ↑val < Nat.succ n))) none) = true\n[PROOFSTEP]\nhave :=\n  (@isSome_find_iff n (fun x ↦ p (x.castLT (Nat.lt_succ_of_lt x.2))) _).2\n    ⟨⟨i, lt_of_le_of_ne (Nat.le_of_lt_succ hin) fun h ↦ by cases h; exact hl hi⟩, hi⟩\n[GOAL]\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝¹ : DecidablePred p\nx✝ : ∃ i, p i\ni : ℕ\nhin : i < n + 1\nhi : p { val := i, isLt := hin }\nh✝ : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhl : ¬p (last n)\nh : i = n\n⊢ False\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝¹ : DecidablePred p\nx✝ : ∃ i, p i\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhl : ¬p (last n)\nhin : n < n + 1\nhi : p { val := n, isLt := hin }\n⊢ False\n[PROOFSTEP]\nexact hl hi\n[GOAL]\ncase neg\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝¹ : DecidablePred p\nx✝ : ∃ i, p i\ni : ℕ\nhin : i < n + 1\nhi : p { val := i, isLt := hin }\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhl : ¬p (last n)\nthis : Option.isSome (find fun x => p (castLT x (_ : ↑x < Nat.succ n))) = true\n⊢ Option.isSome (Option.rec none (fun val => some (castLT val (_ : ↑val < Nat.succ n))) none) = true\n[PROOFSTEP]\nrw [h] at this \n[GOAL]\ncase neg\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝¹ : DecidablePred p\nx✝ : ∃ i, p i\ni : ℕ\nhin : i < n + 1\nhi : p { val := i, isLt := hin }\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhl : ¬p (last n)\nthis : Option.isSome none = true\n⊢ Option.isSome (Option.rec none (fun val => some (castLT val (_ : ↑val < Nat.succ n))) none) = true\n[PROOFSTEP]\nexact this\n[GOAL]\ncase some\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝¹ : DecidablePred p\nx✝ : ∃ i, p i\ni : ℕ\nhin : i < n + 1\nhi : p { val := i, isLt := hin }\nj : Fin n\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = some j\n⊢ Option.isSome\n      (Option.rec (if p (last n) then some (last n) else none) (fun val => some (castLT val (_ : ↑val < Nat.succ n)))\n        (some j)) =\n    true\n[PROOFSTEP]\nsimp\n[GOAL]\nm n✝ n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\n⊢ find p = none ↔ ∀ (i : Fin n), ¬p i\n[PROOFSTEP]\nrw [← not_exists, ← isSome_find_iff]\n[GOAL]\nm n✝ n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\n⊢ find p = none ↔ ¬Option.isSome (find fun x => p x) = true\n[PROOFSTEP]\ncases find p\n[GOAL]\ncase none\nm n✝ n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\n⊢ none = none ↔ ¬Option.isSome none = true\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nm n✝ n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\nval✝ : Fin n\n⊢ some val✝ = none ↔ ¬Option.isSome (some val✝) = true\n[PROOFSTEP]\nsimp\n[GOAL]\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\ni : Fin (n + 1)\nhi : i ∈ find p\nj : ℕ\nhjn : j < n + 1\nhj : { val := j, isLt := hjn } < i\nhpj : p { val := j, isLt := hjn }\n⊢ False\n[PROOFSTEP]\nrw [find] at hi \n[GOAL]\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\ni : Fin (n + 1)\nhi :\n  i ∈\n    Option.casesOn (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) (if x : p (last n) then some (last n) else none)\n      fun i => some (castLT i (_ : ↑i < Nat.succ n))\nj : ℕ\nhjn : j < n + 1\nhj : { val := j, isLt := hjn } < i\nhpj : p { val := j, isLt := hjn }\n⊢ False\n[PROOFSTEP]\ncases' h : find fun i : Fin n ↦ p (i.castLT (Nat.lt_succ_of_lt i.2)) with k\n[GOAL]\ncase none\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\ni : Fin (n + 1)\nhi :\n  i ∈\n    Option.casesOn (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) (if x : p (last n) then some (last n) else none)\n      fun i => some (castLT i (_ : ↑i < Nat.succ n))\nj : ℕ\nhjn : j < n + 1\nhj : { val := j, isLt := hjn } < i\nhpj : p { val := j, isLt := hjn }\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\n⊢ False\n[PROOFSTEP]\nsimp only [h] at hi \n[GOAL]\ncase none\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\ni : Fin (n + 1)\nj : ℕ\nhjn : j < n + 1\nhj : { val := j, isLt := hjn } < i\nhpj : p { val := j, isLt := hjn }\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhi : i ∈ if x : p (last n) then some (last n) else none\n⊢ False\n[PROOFSTEP]\nsplit_ifs at hi  with hl\n[GOAL]\ncase pos\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\ni : Fin (n + 1)\nj : ℕ\nhjn : j < n + 1\nhj : { val := j, isLt := hjn } < i\nhpj : p { val := j, isLt := hjn }\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhl : p (last n)\nhi : i ∈ some (last n)\n⊢ False\n[PROOFSTEP]\ncases hi\n[GOAL]\ncase pos.refl\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\nj : ℕ\nhjn : j < n + 1\nhpj : p { val := j, isLt := hjn }\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhl : p (last n)\nhj : { val := j, isLt := hjn } < last n\n⊢ False\n[PROOFSTEP]\nrw [find_eq_none_iff] at h \n[GOAL]\ncase pos.refl\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\nj : ℕ\nhjn : j < n + 1\nhpj : p { val := j, isLt := hjn }\nh : ∀ (i : Fin n), ¬p (castLT i (_ : ↑i < Nat.succ n))\nhl : p (last n)\nhj : { val := j, isLt := hjn } < last n\n⊢ False\n[PROOFSTEP]\nrefine h ⟨j, hj⟩ hpj\n[GOAL]\ncase neg\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\ni : Fin (n + 1)\nj : ℕ\nhjn : j < n + 1\nhj : { val := j, isLt := hjn } < i\nhpj : p { val := j, isLt := hjn }\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = none\nhl : ¬p (last n)\nhi : i ∈ none\n⊢ False\n[PROOFSTEP]\nexact Option.not_mem_none _ hi\n[GOAL]\ncase some\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\ni : Fin (n + 1)\nhi :\n  i ∈\n    Option.casesOn (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) (if x : p (last n) then some (last n) else none)\n      fun i => some (castLT i (_ : ↑i < Nat.succ n))\nj : ℕ\nhjn : j < n + 1\nhj : { val := j, isLt := hjn } < i\nhpj : p { val := j, isLt := hjn }\nk : Fin n\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = some k\n⊢ False\n[PROOFSTEP]\nrw [h] at hi \n[GOAL]\ncase some\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\ni : Fin (n + 1)\nj : ℕ\nhjn : j < n + 1\nhj : { val := j, isLt := hjn } < i\nhpj : p { val := j, isLt := hjn }\nk : Fin n\nhi :\n  i ∈\n    Option.casesOn (some k) (if x : p (last n) then some (last n) else none) fun i =>\n      some (castLT i (_ : ↑i < Nat.succ n))\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = some k\n⊢ False\n[PROOFSTEP]\ndsimp at hi \n[GOAL]\ncase some\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\ni : Fin (n + 1)\nj : ℕ\nhjn : j < n + 1\nhj : { val := j, isLt := hjn } < i\nhpj : p { val := j, isLt := hjn }\nk : Fin n\nhi : i ∈ some (castLT k (_ : ↑k < Nat.succ n))\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = some k\n⊢ False\n[PROOFSTEP]\nobtain rfl := Option.some_inj.1 hi\n[GOAL]\ncase some\nm n✝ n : ℕ\np : Fin (n + 1) → Prop\nx✝ : DecidablePred p\nj : ℕ\nhjn : j < n + 1\nhpj : p { val := j, isLt := hjn }\nk : Fin n\nh : (find fun i => p (castLT i (_ : ↑i < Nat.succ n))) = some k\nhj : { val := j, isLt := hjn } < castLT k (_ : ↑k < Nat.succ n)\nhi : castLT k (_ : ↑k < Nat.succ n) ∈ some (castLT k (_ : ↑k < Nat.succ n))\n⊢ False\n[PROOFSTEP]\nexact find_min h (show (⟨j, lt_trans hj k.2⟩ : Fin n) < k from hj) hpj\n[GOAL]\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\nh : ∃ i hin, p { val := i, isLt := hin }\n⊢ { val := Nat.find h, isLt := (_ : Nat.find h < n) } ∈ find p\n[PROOFSTEP]\nlet ⟨i, hin, hi⟩ := h\n[GOAL]\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\nh : ∃ i hin, p { val := i, isLt := hin }\ni : ℕ\nhin : i < n\nhi : p { val := i, isLt := hin }\n⊢ { val := Nat.find (_ : ∃ i hin, p { val := i, isLt := hin }),\n      isLt := (_ : Nat.find (_ : ∃ i hin, p { val := i, isLt := hin }) < n) } ∈\n    find p\n[PROOFSTEP]\ncases' hf : find p with f\n[GOAL]\ncase none\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\nh : ∃ i hin, p { val := i, isLt := hin }\ni : ℕ\nhin : i < n\nhi : p { val := i, isLt := hin }\nhf : find p = none\n⊢ { val := Nat.find (_ : ∃ i hin, p { val := i, isLt := hin }),\n      isLt := (_ : Nat.find (_ : ∃ i hin, p { val := i, isLt := hin }) < n) } ∈\n    none\n[PROOFSTEP]\nrw [find_eq_none_iff] at hf \n[GOAL]\ncase none\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\nh : ∃ i hin, p { val := i, isLt := hin }\ni : ℕ\nhin : i < n\nhi : p { val := i, isLt := hin }\nhf : ∀ (i : Fin n), ¬p i\n⊢ { val := Nat.find (_ : ∃ i hin, p { val := i, isLt := hin }),\n      isLt := (_ : Nat.find (_ : ∃ i hin, p { val := i, isLt := hin }) < n) } ∈\n    none\n[PROOFSTEP]\nexact (hf ⟨i, hin⟩ hi).elim\n[GOAL]\ncase some\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\nh : ∃ i hin, p { val := i, isLt := hin }\ni : ℕ\nhin : i < n\nhi : p { val := i, isLt := hin }\nf : Fin n\nhf : find p = some f\n⊢ { val := Nat.find (_ : ∃ i hin, p { val := i, isLt := hin }),\n      isLt := (_ : Nat.find (_ : ∃ i hin, p { val := i, isLt := hin }) < n) } ∈\n    some f\n[PROOFSTEP]\nrefine' Option.some_inj.2 (le_antisymm _ _)\n[GOAL]\ncase some.refine'_1\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\nh : ∃ i hin, p { val := i, isLt := hin }\ni : ℕ\nhin : i < n\nhi : p { val := i, isLt := hin }\nf : Fin n\nhf : find p = some f\n⊢ f ≤\n    { val := Nat.find (_ : ∃ i hin, p { val := i, isLt := hin }),\n      isLt := (_ : Nat.find (_ : ∃ i hin, p { val := i, isLt := hin }) < n) }\n[PROOFSTEP]\nexact find_min' hf (Nat.find_spec h).snd\n[GOAL]\ncase some.refine'_2\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\nh : ∃ i hin, p { val := i, isLt := hin }\ni : ℕ\nhin : i < n\nhi : p { val := i, isLt := hin }\nf : Fin n\nhf : find p = some f\n⊢ { val := Nat.find (_ : ∃ i hin, p { val := i, isLt := hin }),\n      isLt := (_ : Nat.find (_ : ∃ i hin, p { val := i, isLt := hin }) < n) } ≤\n    f\n[PROOFSTEP]\nexact Nat.find_min' _ ⟨f.2, by convert find_spec p hf⟩\n[GOAL]\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\nh : ∃ i hin, p { val := i, isLt := hin }\ni : ℕ\nhin : i < n\nhi : p { val := i, isLt := hin }\nf : Fin n\nhf : find p = some f\n⊢ p { val := ↑f, isLt := (_ : ↑f < n) }\n[PROOFSTEP]\nconvert find_spec p hf\n[GOAL]\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\ni : Fin n\n⊢ (p i ∧ ∀ (j : Fin n), p j → i ≤ j) → i ∈ find p\n[PROOFSTEP]\nrintro ⟨hpi, hj⟩\n[GOAL]\ncase intro\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\ni : Fin n\nhpi : p i\nhj : ∀ (j : Fin n), p j → i ≤ j\n⊢ i ∈ find p\n[PROOFSTEP]\ncases hfp : Fin.find p\n[GOAL]\ncase intro.none\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\ni : Fin n\nhpi : p i\nhj : ∀ (j : Fin n), p j → i ≤ j\nhfp : find p = none\n⊢ i ∈ none\n[PROOFSTEP]\nrw [find_eq_none_iff] at hfp \n[GOAL]\ncase intro.none\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\ni : Fin n\nhpi : p i\nhj : ∀ (j : Fin n), p j → i ≤ j\nhfp : ∀ (i : Fin n), ¬p i\n⊢ i ∈ none\n[PROOFSTEP]\nexact (hfp _ hpi).elim\n[GOAL]\ncase intro.some\nm n : ℕ\np : Fin n → Prop\ninst✝ : DecidablePred p\ni : Fin n\nhpi : p i\nhj : ∀ (j : Fin n), p j → i ≤ j\nval✝ : Fin n\nhfp : find p = some val✝\n⊢ i ∈ some val✝\n[PROOFSTEP]\nexact Option.some_inj.2 (le_antisymm (find_min' hfp hpi) (hj _ (find_spec _ hfp)))\n[GOAL]\nm n : ℕ\nα : Type u_1\nj : Fin (n + 1)\nop : α → α → α\ng : Fin (n + 1) → α\nk : Fin n\nh : ↑k = ↑j\n⊢ contractNth j op g k = op (g (castSucc k)) (g (succ k))\n[PROOFSTEP]\nhave : ¬(k : ℕ) < j := not_lt.2 (le_of_eq h.symm)\n[GOAL]\nm n : ℕ\nα : Type u_1\nj : Fin (n + 1)\nop : α → α → α\ng : Fin (n + 1) → α\nk : Fin n\nh : ↑k = ↑j\nthis : ¬↑k < ↑j\n⊢ contractNth j op g k = op (g (castSucc k)) (g (succ k))\n[PROOFSTEP]\nrw [contractNth, if_neg this, if_pos h]\n[GOAL]\nm n : ℕ\nα : Type u_1\nj : Fin (n + 1)\nop : α → α → α\ng : Fin (n + 1) → α\nk : Fin n\nh : ↑j < ↑k\n⊢ contractNth j op g k = g (succ k)\n[PROOFSTEP]\nrw [contractNth, if_neg (not_lt_of_gt h), if_neg (Ne.symm <| ne_of_lt h)]\n[GOAL]\nm n : ℕ\nα : Type u_1\nj : Fin (n + 1)\nop : α → α → α\ng : Fin (n + 1) → α\nk : Fin n\nhjk : ↑j ≠ ↑k\n⊢ contractNth j op g k = g (succAbove j k)\n[PROOFSTEP]\nrcases lt_trichotomy (k : ℕ) j with (h | h | h)\n[GOAL]\ncase inl\nm n : ℕ\nα : Type u_1\nj : Fin (n + 1)\nop : α → α → α\ng : Fin (n + 1) → α\nk : Fin n\nhjk : ↑j ≠ ↑k\nh : ↑k < ↑j\n⊢ contractNth j op g k = g (succAbove j k)\n[PROOFSTEP]\nrwa [j.succAbove_below, contractNth_apply_of_lt]\n[GOAL]\ncase inl.h\nm n : ℕ\nα : Type u_1\nj : Fin (n + 1)\nop : α → α → α\ng : Fin (n + 1) → α\nk : Fin n\nhjk : ↑j ≠ ↑k\nh : ↑k < ↑j\n⊢ castSucc k < j\n[PROOFSTEP]\nrwa [Fin.lt_iff_val_lt_val]\n[GOAL]\ncase inr.inl\nm n : ℕ\nα : Type u_1\nj : Fin (n + 1)\nop : α → α → α\ng : Fin (n + 1) → α\nk : Fin n\nhjk : ↑j ≠ ↑k\nh : ↑k = ↑j\n⊢ contractNth j op g k = g (succAbove j k)\n[PROOFSTEP]\nexact False.elim (hjk h.symm)\n[GOAL]\ncase inr.inr\nm n : ℕ\nα : Type u_1\nj : Fin (n + 1)\nop : α → α → α\ng : Fin (n + 1) → α\nk : Fin n\nhjk : ↑j ≠ ↑k\nh : ↑j < ↑k\n⊢ contractNth j op g k = g (succAbove j k)\n[PROOFSTEP]\nrwa [j.succAbove_above, contractNth_apply_of_gt]\n[GOAL]\ncase inr.inr.h\nm n : ℕ\nα : Type u_1\nj : Fin (n + 1)\nop : α → α → α\ng : Fin (n + 1) → α\nk : Fin n\nhjk : ↑j ≠ ↑k\nh : ↑j < ↑k\n⊢ j ≤ castSucc k\n[PROOFSTEP]\nexact Fin.le_iff_val_le_val.2 (le_of_lt h)\n[GOAL]\nm n : ℕ\nα : Type u_1\nai : ℕ\na : Fin ai → α\nbi : ℕ\nb : Fin bi → α\nhi : { fst := ai, snd := a }.fst = { fst := bi, snd := b }.fst\nh : { fst := ai, snd := a }.snd = { fst := bi, snd := b }.snd ∘ ↑(castIso hi)\n⊢ { fst := ai, snd := a } = { fst := bi, snd := b }\n[PROOFSTEP]\ndsimp only at hi \n[GOAL]\nm n : ℕ\nα : Type u_1\nai : ℕ\na : Fin ai → α\nbi : ℕ\nb : Fin bi → α\nhi : ai = bi\nh : { fst := ai, snd := a }.snd = { fst := bi, snd := b }.snd ∘ ↑(castIso hi)\n⊢ { fst := ai, snd := a } = { fst := bi, snd := b }\n[PROOFSTEP]\nsubst hi\n[GOAL]\nm n : ℕ\nα : Type u_1\nai : ℕ\na b : Fin ai → α\nh : { fst := ai, snd := a }.snd = { fst := ai, snd := b }.snd ∘ ↑(castIso (_ : ai = ai))\n⊢ { fst := ai, snd := a } = { fst := ai, snd := b }\n[PROOFSTEP]\nsimpa using h\n", "meta": {"mathlib_filename": "Mathlib.Data.Fin.Tuple.Basic", "llama_tokens": 61371, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583250334526, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.3778102212788976}}
{"text": "[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx y : R_hat R K\n⊢ ZeroHom.toFun { toFun := fun x v => ↑(x v), map_zero' := (_ : (fun x v => ↑(x v)) 0 = (fun x v => ↑(x v)) 0) }\n      (x + y) =\n    ZeroHom.toFun { toFun := fun x v => ↑(x v), map_zero' := (_ : (fun x v => ↑(x v)) 0 = (fun x v => ↑(x v)) 0) } x +\n      ZeroHom.toFun { toFun := fun x v => ↑(x v), map_zero' := (_ : (fun x v => ↑(x v)) 0 = (fun x v => ↑(x v)) 0) } y\n[PROOFSTEP]\nrefine funext fun v => ?_\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : R_hat R K\nv : HeightOneSpectrum R\n⊢ ZeroHom.toFun { toFun := fun x v => ↑(x v), map_zero' := (_ : (fun x v => ↑(x v)) 0 = (fun x v => ↑(x v)) 0) } (x + y)\n      v =\n    (ZeroHom.toFun { toFun := fun x v => ↑(x v), map_zero' := (_ : (fun x v => ↑(x v)) 0 = (fun x v => ↑(x v)) 0) } x +\n        ZeroHom.toFun { toFun := fun x v => ↑(x v), map_zero' := (_ : (fun x v => ↑(x v)) 0 = (fun x v => ↑(x v)) 0) }\n          y)\n      v\n[PROOFSTEP]\nsimp only [coe_apply, Pi.add_apply, Subring.coe_add]\n  -- Porting note: added\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : R_hat R K\nv : HeightOneSpectrum R\n⊢ ↑((x + y) v) = ((fun v => ↑(x v)) + fun v => ↑(y v)) v\n[PROOFSTEP]\nerw [Pi.add_apply, Pi.add_apply, Subring.coe_add]\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nsrc✝ : R_hat R K →+ K_hat R K := addMonoidHom R K\nx y : R_hat R K\n⊢ OneHom.toFun { toFun := fun x v => ↑(x v), map_one' := (_ : (fun x v => ↑(x v)) 1 = (fun x v => ↑(x v)) 1) } (x * y) =\n    OneHom.toFun { toFun := fun x v => ↑(x v), map_one' := (_ : (fun x v => ↑(x v)) 1 = (fun x v => ↑(x v)) 1) } x *\n      OneHom.toFun { toFun := fun x v => ↑(x v), map_one' := (_ : (fun x v => ↑(x v)) 1 = (fun x v => ↑(x v)) 1) } y\n[PROOFSTEP]\nrefine funext fun p => ?_\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nsrc✝ : R_hat R K →+ K_hat R K := addMonoidHom R K\nx y : R_hat R K\np : HeightOneSpectrum R\n⊢ OneHom.toFun { toFun := fun x v => ↑(x v), map_one' := (_ : (fun x v => ↑(x v)) 1 = (fun x v => ↑(x v)) 1) } (x * y)\n      p =\n    (OneHom.toFun { toFun := fun x v => ↑(x v), map_one' := (_ : (fun x v => ↑(x v)) 1 = (fun x v => ↑(x v)) 1) } x *\n        OneHom.toFun { toFun := fun x v => ↑(x v), map_one' := (_ : (fun x v => ↑(x v)) 1 = (fun x v => ↑(x v)) 1) } y)\n      p\n[PROOFSTEP]\nsimp only [Pi.mul_apply, Subring.coe_mul]\n  -- Porting note: added\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nsrc✝ : R_hat R K →+ K_hat R K := addMonoidHom R K\nx y : R_hat R K\np : HeightOneSpectrum R\n⊢ ↑((x * y) p) = ((fun v => ↑(x v)) * fun v => ↑(y v)) p\n[PROOFSTEP]\nerw [Pi.mul_apply, Pi.mul_apply, Subring.coe_mul]\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\n⊢ Algebra K ((v : HeightOneSpectrum R) → HeightOneSpectrum.adicCompletion K v)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\n⊢ Algebra R ((v : HeightOneSpectrum R) → HeightOneSpectrum.adicCompletion K v)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\n⊢ IsScalarTower R K ((v : HeightOneSpectrum R) → HeightOneSpectrum.adicCompletion K v)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\n⊢ Algebra R ((v : HeightOneSpectrum R) → { x // x ∈ adicCompletionIntegers K v })\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\n⊢ IsScalarTower R ((v : HeightOneSpectrum R) → { x // x ∈ adicCompletionIntegers K v })\n    ((v : HeightOneSpectrum R) → HeightOneSpectrum.adicCompletion K v)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx y : K_hat R K\nhx : IsFiniteAdele x\nhy : IsFiniteAdele y\n⊢ IsFiniteAdele (x + y)\n[PROOFSTEP]\nrw [IsFiniteAdele, Filter.eventually_cofinite] at hx hy ⊢\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\n⊢ Set.Finite {x_1 | ¬(x + y) x_1 ∈ adicCompletionIntegers K x_1}\n[PROOFSTEP]\nhave h_subset :\n  {v : HeightOneSpectrum R | ¬(x + y) v ∈ v.adicCompletionIntegers K} ⊆\n    {v : HeightOneSpectrum R | ¬x v ∈ v.adicCompletionIntegers K} ∪\n      {v : HeightOneSpectrum R | ¬y v ∈ v.adicCompletionIntegers K} :=\n  by\n  intro v hv\n  rw [mem_union, mem_setOf, mem_setOf]\n  rw [mem_setOf] at hv \n  contrapose! hv\n  rw [mem_adicCompletionIntegers, mem_adicCompletionIntegers, ← max_le_iff] at hv \n  rw [mem_adicCompletionIntegers, Pi.add_apply]\n  exact le_trans (Valued.v.map_add_le_max' (x v) (y v)) hv\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\n⊢ {v | ¬(x + y) v ∈ adicCompletionIntegers K v} ⊆\n    {v | ¬x v ∈ adicCompletionIntegers K v} ∪ {v | ¬y v ∈ adicCompletionIntegers K v}\n[PROOFSTEP]\nintro v hv\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : v ∈ {v | ¬(x + y) v ∈ adicCompletionIntegers K v}\n⊢ v ∈ {v | ¬x v ∈ adicCompletionIntegers K v} ∪ {v | ¬y v ∈ adicCompletionIntegers K v}\n[PROOFSTEP]\nrw [mem_union, mem_setOf, mem_setOf]\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : v ∈ {v | ¬(x + y) v ∈ adicCompletionIntegers K v}\n⊢ ¬x v ∈ adicCompletionIntegers K v ∨ ¬y v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nrw [mem_setOf] at hv \n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : ¬(x + y) v ∈ adicCompletionIntegers K v\n⊢ ¬x v ∈ adicCompletionIntegers K v ∨ ¬y v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\ncontrapose! hv\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : x v ∈ adicCompletionIntegers K v ∧ y v ∈ adicCompletionIntegers K v\n⊢ (x + y) v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nrw [mem_adicCompletionIntegers, mem_adicCompletionIntegers, ← max_le_iff] at hv \n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : max (↑Valued.v (x v)) (↑Valued.v (y v)) ≤ 1\n⊢ (x + y) v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nrw [mem_adicCompletionIntegers, Pi.add_apply]\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : max (↑Valued.v (x v)) (↑Valued.v (y v)) ≤ 1\n⊢ ↑Valued.v (x v + y v) ≤ 1\n[PROOFSTEP]\nexact le_trans (Valued.v.map_add_le_max' (x v) (y v)) hv\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nh_subset :\n  {v | ¬(x + y) v ∈ adicCompletionIntegers K v} ⊆\n    {v | ¬x v ∈ adicCompletionIntegers K v} ∪ {v | ¬y v ∈ adicCompletionIntegers K v}\n⊢ Set.Finite {x_1 | ¬(x + y) x_1 ∈ adicCompletionIntegers K x_1}\n[PROOFSTEP]\nexact (hx.union hy).subset h_subset\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\n⊢ IsFiniteAdele 0\n[PROOFSTEP]\nrw [IsFiniteAdele, Filter.eventually_cofinite]\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\n⊢ Set.Finite {x | ¬OfNat.ofNat 0 x ∈ adicCompletionIntegers K x}\n[PROOFSTEP]\nhave h_empty : {v : HeightOneSpectrum R | ¬(0 : v.adicCompletion K) ∈ v.adicCompletionIntegers K} = ∅ :=\n  by\n  ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv\n  rw [mem_setOf] at hv ; apply hv; rw [mem_adicCompletionIntegers]\n  have h_zero : (Valued.v (0 : v.adicCompletion K) : WithZero (Multiplicative ℤ)) = 0 := Valued.v.map_zero'\n  rw [h_zero];\n  exact\n    zero_le_one'\n      _\n        -- Porting note: was `exact`, but `OfNat` got in the way.\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\n⊢ {v | ¬0 ∈ adicCompletionIntegers K v} = ∅\n[PROOFSTEP]\next v\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\n⊢ v ∈ {v | ¬0 ∈ adicCompletionIntegers K v} ↔ v ∈ ∅\n[PROOFSTEP]\nrw [mem_empty_iff_false, iff_false_iff]\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\n⊢ ¬v ∈ {v | ¬0 ∈ adicCompletionIntegers K v}\n[PROOFSTEP]\nintro hv\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\nhv : v ∈ {v | ¬0 ∈ adicCompletionIntegers K v}\n⊢ False\n[PROOFSTEP]\nrw [mem_setOf] at hv \n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\nhv : ¬0 ∈ adicCompletionIntegers K v\n⊢ False\n[PROOFSTEP]\napply hv\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\nhv : ¬0 ∈ adicCompletionIntegers K v\n⊢ 0 ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nrw [mem_adicCompletionIntegers]\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\nhv : ¬0 ∈ adicCompletionIntegers K v\n⊢ ↑Valued.v 0 ≤ 1\n[PROOFSTEP]\nhave h_zero : (Valued.v (0 : v.adicCompletion K) : WithZero (Multiplicative ℤ)) = 0 := Valued.v.map_zero'\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\nhv : ¬0 ∈ adicCompletionIntegers K v\nh_zero : ↑Valued.v 0 = 0\n⊢ ↑Valued.v 0 ≤ 1\n[PROOFSTEP]\nrw [h_zero]\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\nhv : ¬0 ∈ adicCompletionIntegers K v\nh_zero : ↑Valued.v 0 = 0\n⊢ 0 ≤ 1\n[PROOFSTEP]\nexact\n  zero_le_one'\n    _\n      -- Porting note: was `exact`, but `OfNat` got in the way.\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nh_empty : {v | ¬0 ∈ adicCompletionIntegers K v} = ∅\n⊢ Set.Finite {x | ¬OfNat.ofNat 0 x ∈ adicCompletionIntegers K x}\n[PROOFSTEP]\nconvert finite_empty\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx : K_hat R K\nhx : IsFiniteAdele x\n⊢ IsFiniteAdele (-x)\n[PROOFSTEP]\nrw [IsFiniteAdele] at hx ⊢\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx : K_hat R K\nhx : ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, x v ∈ adicCompletionIntegers K v\n⊢ ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, (-x) v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nhave h : ∀ v : HeightOneSpectrum R, -x v ∈ v.adicCompletionIntegers K ↔ x v ∈ v.adicCompletionIntegers K :=\n  by\n  intro v\n  rw [mem_adicCompletionIntegers, mem_adicCompletionIntegers, Valuation.map_neg]\n    -- Porting note: was `simpa only [Pi.neg_apply, h] using hx` but `Pi.neg_apply` no longer works\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx : K_hat R K\nhx : ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, x v ∈ adicCompletionIntegers K v\n⊢ ∀ (v : HeightOneSpectrum R), -x v ∈ adicCompletionIntegers K v ↔ x v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nintro v\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx : K_hat R K\nhx : ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, x v ∈ adicCompletionIntegers K v\nv : HeightOneSpectrum R\n⊢ -x v ∈ adicCompletionIntegers K v ↔ x v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nrw [mem_adicCompletionIntegers, mem_adicCompletionIntegers, Valuation.map_neg]\n  -- Porting note: was `simpa only [Pi.neg_apply, h] using hx` but `Pi.neg_apply` no longer works\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx : K_hat R K\nhx : ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, x v ∈ adicCompletionIntegers K v\nh : ∀ (v : HeightOneSpectrum R), -x v ∈ adicCompletionIntegers K v ↔ x v ∈ adicCompletionIntegers K v\n⊢ ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, (-x) v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nconvert hx using 2 with v\n[GOAL]\ncase h.e'_2.h.a\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx : K_hat R K\nhx : ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, x v ∈ adicCompletionIntegers K v\nh : ∀ (v : HeightOneSpectrum R), -x v ∈ adicCompletionIntegers K v ↔ x v ∈ adicCompletionIntegers K v\nv : HeightOneSpectrum R\n⊢ (-x) v ∈ adicCompletionIntegers K v ↔ x v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nconvert h v\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx y : K_hat R K\nhx : IsFiniteAdele x\nhy : IsFiniteAdele y\n⊢ IsFiniteAdele (x * y)\n[PROOFSTEP]\nrw [IsFiniteAdele, Filter.eventually_cofinite] at hx hy ⊢\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\n⊢ Set.Finite {x_1 | ¬(x * y) x_1 ∈ adicCompletionIntegers K x_1}\n[PROOFSTEP]\nhave h_subset :\n  {v : HeightOneSpectrum R | ¬(x * y) v ∈ v.adicCompletionIntegers K} ⊆\n    {v : HeightOneSpectrum R | ¬x v ∈ v.adicCompletionIntegers K} ∪\n      {v : HeightOneSpectrum R | ¬y v ∈ v.adicCompletionIntegers K} :=\n  by\n  intro v hv\n  rw [mem_union, mem_setOf, mem_setOf]\n  rw [mem_setOf] at hv \n  contrapose! hv\n  rw [mem_adicCompletionIntegers, mem_adicCompletionIntegers] at hv \n  have h_mul : Valued.v (x v * y v) = Valued.v (x v) * Valued.v (y v) := Valued.v.map_mul' (x v) (y v)\n  rw [mem_adicCompletionIntegers, Pi.mul_apply, h_mul]\n  exact @mul_le_one' (WithZero (Multiplicative ℤ)) _ _ (OrderedCommMonoid.to_covariantClass_left _) _ _ hv.left hv.right\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\n⊢ {v | ¬(x * y) v ∈ adicCompletionIntegers K v} ⊆\n    {v | ¬x v ∈ adicCompletionIntegers K v} ∪ {v | ¬y v ∈ adicCompletionIntegers K v}\n[PROOFSTEP]\nintro v hv\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : v ∈ {v | ¬(x * y) v ∈ adicCompletionIntegers K v}\n⊢ v ∈ {v | ¬x v ∈ adicCompletionIntegers K v} ∪ {v | ¬y v ∈ adicCompletionIntegers K v}\n[PROOFSTEP]\nrw [mem_union, mem_setOf, mem_setOf]\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : v ∈ {v | ¬(x * y) v ∈ adicCompletionIntegers K v}\n⊢ ¬x v ∈ adicCompletionIntegers K v ∨ ¬y v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nrw [mem_setOf] at hv \n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : ¬(x * y) v ∈ adicCompletionIntegers K v\n⊢ ¬x v ∈ adicCompletionIntegers K v ∨ ¬y v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\ncontrapose! hv\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : x v ∈ adicCompletionIntegers K v ∧ y v ∈ adicCompletionIntegers K v\n⊢ (x * y) v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nrw [mem_adicCompletionIntegers, mem_adicCompletionIntegers] at hv \n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : ↑Valued.v (x v) ≤ 1 ∧ ↑Valued.v (y v) ≤ 1\n⊢ (x * y) v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nhave h_mul : Valued.v (x v * y v) = Valued.v (x v) * Valued.v (y v) := Valued.v.map_mul' (x v) (y v)\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : ↑Valued.v (x v) ≤ 1 ∧ ↑Valued.v (y v) ≤ 1\nh_mul : ↑Valued.v (x v * y v) = ↑Valued.v (x v) * ↑Valued.v (y v)\n⊢ (x * y) v ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nrw [mem_adicCompletionIntegers, Pi.mul_apply, h_mul]\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nv : HeightOneSpectrum R\nhv : ↑Valued.v (x v) ≤ 1 ∧ ↑Valued.v (y v) ≤ 1\nh_mul : ↑Valued.v (x v * y v) = ↑Valued.v (x v) * ↑Valued.v (y v)\n⊢ ↑Valued.v (x v) * ↑Valued.v (y v) ≤ 1\n[PROOFSTEP]\nexact @mul_le_one' (WithZero (Multiplicative ℤ)) _ _ (OrderedCommMonoid.to_covariantClass_left _) _ _ hv.left hv.right\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nx y : K_hat R K\nhx : Set.Finite {x_1 | ¬x x_1 ∈ adicCompletionIntegers K x_1}\nhy : Set.Finite {x | ¬y x ∈ adicCompletionIntegers K x}\nh_subset :\n  {v | ¬(x * y) v ∈ adicCompletionIntegers K v} ⊆\n    {v | ¬x v ∈ adicCompletionIntegers K v} ∪ {v | ¬y v ∈ adicCompletionIntegers K v}\n⊢ Set.Finite {x_1 | ¬(x * y) x_1 ∈ adicCompletionIntegers K x_1}\n[PROOFSTEP]\nexact (hx.union hy).subset h_subset\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\n⊢ IsFiniteAdele 1\n[PROOFSTEP]\nrw [IsFiniteAdele, Filter.eventually_cofinite]\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\n⊢ Set.Finite {x | ¬OfNat.ofNat 1 x ∈ adicCompletionIntegers K x}\n[PROOFSTEP]\nhave h_empty : {v : HeightOneSpectrum R | ¬(1 : v.adicCompletion K) ∈ v.adicCompletionIntegers K} = ∅ :=\n  by\n  ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv\n  rw [mem_setOf] at hv ; apply hv; rw [mem_adicCompletionIntegers]\n  exact le_of_eq Valued.v.map_one'\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\n⊢ {v | ¬1 ∈ adicCompletionIntegers K v} = ∅\n[PROOFSTEP]\next v\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\n⊢ v ∈ {v | ¬1 ∈ adicCompletionIntegers K v} ↔ v ∈ ∅\n[PROOFSTEP]\nrw [mem_empty_iff_false, iff_false_iff]\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\n⊢ ¬v ∈ {v | ¬1 ∈ adicCompletionIntegers K v}\n[PROOFSTEP]\nintro hv\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\nhv : v ∈ {v | ¬1 ∈ adicCompletionIntegers K v}\n⊢ False\n[PROOFSTEP]\nrw [mem_setOf] at hv \n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\nhv : ¬1 ∈ adicCompletionIntegers K v\n⊢ False\n[PROOFSTEP]\napply hv\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\nhv : ¬1 ∈ adicCompletionIntegers K v\n⊢ 1 ∈ adicCompletionIntegers K v\n[PROOFSTEP]\nrw [mem_adicCompletionIntegers]\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv✝ v : HeightOneSpectrum R\nhv : ¬1 ∈ adicCompletionIntegers K v\n⊢ ↑Valued.v 1 ≤ 1\n[PROOFSTEP]\nexact le_of_eq Valued.v.map_one'\n[GOAL]\nR : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nv : HeightOneSpectrum R\nh_empty : {v | ¬1 ∈ adicCompletionIntegers K v} = ∅\n⊢ Set.Finite {x | ¬OfNat.ofNat 1 x ∈ adicCompletionIntegers K x}\n[PROOFSTEP]\nconvert finite_empty\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.DedekindDomain.FiniteAdeleRing", "llama_tokens": 13203, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6334102636778401, "lm_q2_score": 0.5964331462646255, "lm_q1q2_score": 0.37778687644168024}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Set (Setoid α)\n⊢ Rel (sInf s) = sInf (Rel '' s)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.a\nα : Type u_1\nβ : Type u_2\ns : Set (Setoid α)\nx✝¹ x✝ : α\n⊢ Rel (sInf s) x✝¹ x✝ ↔ sInf (Rel '' s) x✝¹ x✝\n[PROOFSTEP]\nsimp only [sInf_image, iInf_apply, iInf_Prop_eq]\n[GOAL]\ncase h.h.a\nα : Type u_1\nβ : Type u_2\ns : Set (Setoid α)\nx✝¹ x✝ : α\n⊢ Rel (sInf s) x✝¹ x✝ ↔ ∀ (i : Setoid α), i ∈ s → Rel i x✝¹ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Setoid α\n⊢ s = ⊤ ↔ ∀ (x y : α), Rel s x y\n[PROOFSTEP]\nrw [_root_.eq_top_iff, Setoid.le_def, Setoid.top_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Setoid α\n⊢ (∀ {x y : α}, ⊤ x y → Rel s x y) ↔ ∀ (x y : α), Rel s x y\n[PROOFSTEP]\nsimp only [Pi.top_apply, Prop.top_eq_true, forall_true_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr s : Setoid α\n⊢ r ⊔ s = EqvGen.Setoid fun x y => Rel r x y ∨ Rel s x y\n[PROOFSTEP]\nrw [eqvGen_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr s : Setoid α\n⊢ r ⊔ s = sInf {s_1 | ∀ ⦃x y : α⦄, Rel r x y ∨ Rel s x y → Rel s_1 x y}\n[PROOFSTEP]\napply congr_arg sInf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr s : Setoid α\n⊢ {x | r ≤ x ∧ s ≤ x} = {s_1 | ∀ ⦃x y : α⦄, Rel r x y ∨ Rel s x y → Rel s_1 x y}\n[PROOFSTEP]\nsimp only [le_def, or_imp, ← forall_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr s : Setoid α\n⊢ r ⊔ s = EqvGen.Setoid (Rel r ⊔ Rel s)\n[PROOFSTEP]\nrw [sup_eq_eqvGen]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr s : Setoid α\n⊢ (EqvGen.Setoid fun x y => Rel r x y ∨ Rel s x y) = EqvGen.Setoid (Rel r ⊔ Rel s)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nS : Set (Setoid α)\n⊢ sSup S = EqvGen.Setoid fun x y => ∃ r, r ∈ S ∧ Rel r x y\n[PROOFSTEP]\nrw [eqvGen_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nS : Set (Setoid α)\n⊢ sSup S = sInf {s | ∀ ⦃x y : α⦄, (∃ r, r ∈ S ∧ Rel r x y) → Rel s x y}\n[PROOFSTEP]\napply congr_arg sInf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nS : Set (Setoid α)\n⊢ upperBounds S = {s | ∀ ⦃x y : α⦄, (∃ r, r ∈ S ∧ Rel r x y) → Rel s x y}\n[PROOFSTEP]\nsimp only [upperBounds, le_def, and_imp, exists_imp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nS : Set (Setoid α)\n⊢ {x | ∀ ⦃a : Setoid α⦄, a ∈ S → ∀ {x_1 y : α}, Rel a x_1 y → Rel x x_1 y} =\n    {s | ∀ ⦃x y : α⦄ (x_1 : Setoid α), x_1 ∈ S → Rel x_1 x y → Rel s x y}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nS : Set (Setoid α)\nx✝ : Setoid α\n⊢ x✝ ∈ {x | ∀ ⦃a : Setoid α⦄, a ∈ S → ∀ {x_1 y : α}, Rel a x_1 y → Rel x x_1 y} ↔\n    x✝ ∈ {s | ∀ ⦃x y : α⦄ (x_1 : Setoid α), x_1 ∈ S → Rel x_1 x y → Rel s x y}\n[PROOFSTEP]\nexact ⟨fun H x y r hr => H hr, fun H r hr x y => H r hr⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Set (Setoid α)\n⊢ sSup s = EqvGen.Setoid (sSup (Rel '' s))\n[PROOFSTEP]\nrw [sSup_eq_eqvGen, sSup_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Set (Setoid α)\n⊢ (EqvGen.Setoid fun x y => ∃ r, r ∈ s ∧ Rel r x y) = EqvGen.Setoid (⨆ (a : Setoid α) (_ : a ∈ s), Rel a)\n[PROOFSTEP]\ncongr with (x y)\n[GOAL]\ncase e_r.h.h.a\nα : Type u_1\nβ : Type u_2\ns : Set (Setoid α)\nx y : α\n⊢ (∃ r, r ∈ s ∧ Rel r x y) ↔ iSup (fun a => ⨆ (_ : a ∈ s), Rel a) x y\n[PROOFSTEP]\nsimp only [iSup_apply, iSup_Prop_eq, exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : Setoid α\n⊢ EqvGen.Setoid Setoid.r ≤ r\n[PROOFSTEP]\nrw [eqvGen_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : Setoid α\n⊢ sInf {s | ∀ ⦃x y : α⦄, Setoid.r x y → Rel s x y} ≤ r\n[PROOFSTEP]\nexact sInf_le fun _ _ => id\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ns : Setoid α\nh : ∀ (x y : α), r x y → Rel s x y\n⊢ EqvGen.Setoid r ≤ s\n[PROOFSTEP]\nrw [eqvGen_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ns : Setoid α\nh : ∀ (x y : α), r x y → Rel s x y\n⊢ sInf {s | ∀ ⦃x y : α⦄, r x y → Rel s x y} ≤ s\n[PROOFSTEP]\nexact sInf_le h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : Quotient r → β\nx y : α\nh : Rel r x y\n⊢ Rel (ker (f ∘ Quotient.mk'')) x y\n[PROOFSTEP]\nsimp [ker_def, Quotient.sound' h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : α → β\nH : r ≤ ker f\ng : Quotient r → β\nHg : f = g ∘ Quotient.mk''\n⊢ Quotient.lift f H = g\n[PROOFSTEP]\next ⟨x⟩\n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : α → β\nH : r ≤ ker f\ng : Quotient r → β\nHg : f = g ∘ Quotient.mk''\nx✝ : Quotient r\nx : α\n⊢ Quotient.lift f H (Quot.mk Setoid.r x) = g (Quot.mk Setoid.r x)\n[PROOFSTEP]\nerw [Quotient.lift_mk f H, Hg]\n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : α → β\nH : r ≤ ker f\ng : Quotient r → β\nHg : f = g ∘ Quotient.mk''\nx✝ : Quotient r\nx : α\n⊢ (g ∘ Quotient.mk'') x = g (Quot.mk Setoid.r x)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : α → β\nx y : Quotient (ker f)\nh :\n  Quotient.lift (fun x => { val := f x, property := (_ : f x ∈ Set.range f) })\n      (_ :\n        ∀ (x x_1 : α),\n          x ≈ x_1 →\n            { val := f x, property := (_ : f x ∈ Set.range f) } =\n              { val := f x_1, property := (_ : f x_1 ∈ Set.range f) })\n      x =\n    Quotient.lift (fun x => { val := f x, property := (_ : f x ∈ Set.range f) })\n      (_ :\n        ∀ (x x_1 : α),\n          x ≈ x_1 →\n            { val := f x, property := (_ : f x ∈ Set.range f) } =\n              { val := f x_1, property := (_ : f x_1 ∈ Set.range f) })\n      y\n⊢ Quotient.lift f (_ : ∀ (x x_1 : α), x ≈ x_1 → x ≈ x_1) x = Quotient.lift f (_ : ∀ (x x_1 : α), x ≈ x_1 → x ≈ x_1) y\n[PROOFSTEP]\nrcases x with ⟨⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : α → β\nx y : Quotient (ker f)\na✝ : α\nh :\n  Quotient.lift (fun x => { val := f x, property := (_ : f x ∈ Set.range f) })\n      (_ :\n        ∀ (x x_1 : α),\n          x ≈ x_1 →\n            { val := f x, property := (_ : f x ∈ Set.range f) } =\n              { val := f x_1, property := (_ : f x_1 ∈ Set.range f) })\n      (Quot.mk Setoid.r a✝) =\n    Quotient.lift (fun x => { val := f x, property := (_ : f x ∈ Set.range f) })\n      (_ :\n        ∀ (x x_1 : α),\n          x ≈ x_1 →\n            { val := f x, property := (_ : f x ∈ Set.range f) } =\n              { val := f x_1, property := (_ : f x_1 ∈ Set.range f) })\n      y\n⊢ Quotient.lift f (_ : ∀ (x x_1 : α), x ≈ x_1 → x ≈ x_1) (Quot.mk Setoid.r a✝) =\n    Quotient.lift f (_ : ∀ (x x_1 : α), x ≈ x_1 → x ≈ x_1) y\n[PROOFSTEP]\nrcases y with ⟨⟩\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : α → β\nx y : Quotient (ker f)\na✝¹ a✝ : α\nh :\n  Quotient.lift (fun x => { val := f x, property := (_ : f x ∈ Set.range f) })\n      (_ :\n        ∀ (x x_1 : α),\n          x ≈ x_1 →\n            { val := f x, property := (_ : f x ∈ Set.range f) } =\n              { val := f x_1, property := (_ : f x_1 ∈ Set.range f) })\n      (Quot.mk Setoid.r a✝¹) =\n    Quotient.lift (fun x => { val := f x, property := (_ : f x ∈ Set.range f) })\n      (_ :\n        ∀ (x x_1 : α),\n          x ≈ x_1 →\n            { val := f x, property := (_ : f x ∈ Set.range f) } =\n              { val := f x_1, property := (_ : f x_1 ∈ Set.range f) })\n      (Quot.mk Setoid.r a✝)\n⊢ Quotient.lift f (_ : ∀ (x x_1 : α), x ≈ x_1 → x ≈ x_1) (Quot.mk Setoid.r a✝¹) =\n    Quotient.lift f (_ : ∀ (x x_1 : α), x ≈ x_1 → x ≈ x_1) (Quot.mk Setoid.r a✝)\n[PROOFSTEP]\ninjections\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf✝ : α → β\nr : Setoid α\nf : α → β\nh : ker f ≤ r\nhf : Surjective f\nx✝² y✝ z✝ : β\nx✝¹ : ∃ a b, f a = x✝² ∧ f b = y✝ ∧ Rel r a b\nx✝ : ∃ a b, f a = y✝ ∧ f b = z✝ ∧ Rel r a b\nx y : α\nhx : f x = x✝²\nhy : f y = y✝\nh₁ : Rel r x y\ny' z : α\nhy' : f y' = y✝\nhz : f z = z✝\nh₂ : Rel r y' z\n⊢ Rel (ker f) y y'\n[PROOFSTEP]\nrwa [← hy'] at hy \n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : α → β\nh : ker f ≤ r\nhf : Surjective f\n⊢ map r f = mapOfSurjective r f h hf\n[PROOFSTEP]\nrw [← eqvGen_of_setoid (mapOfSurjective r f h hf)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : α → β\nh : ker f ≤ r\nhf : Surjective f\n⊢ map r f = EqvGen.Setoid Setoid.r\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf✝ f : α → β\nr : Setoid β\nx y : α\n⊢ Setoid.r x y ↔ Quotient.mk r (f x) = Quotient.mk r (f y)\n[PROOFSTEP]\nrw [Quotient.eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf✝ f : α → β\nr : Setoid β\nx y : α\n⊢ Setoid.r x y ↔ f x ≈ f y\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : α → β\ns : Setoid α\nh : r ≤ s\nx : Quotient (ker (Quot.mapRight h))\ny : Quot fun a₁ a₂ => Rel r a₁ a₂\nw : α\n⊢ (fun x =>\n        Quotient.liftOn' x (fun w => Quotient.mk'' (Quotient.mk'' w))\n          (_ : ∀ (x y : α), Setoid.r x y → Quotient.mk'' (Quotient.mk'' x) = Quotient.mk'' (Quotient.mk'' y)))\n      ((fun x =>\n          Quotient.liftOn' x\n            (fun w =>\n              Quotient.liftOn' w Quotient.mk'' (_ : ∀ (x y : α), Setoid.r x y → Quotient.mk s x = Quotient.mk s y))\n            (_ :\n              ∀ (x y : Quot fun a₁ a₂ => Rel r a₁ a₂),\n                Setoid.r x y →\n                  Quotient.liftOn' x Quotient.mk'' (_ : ∀ (x y : α), Setoid.r x y → Quotient.mk s x = Quotient.mk s y) =\n                    Quotient.liftOn' y Quotient.mk''\n                      (_ : ∀ (x y : α), Setoid.r x y → Quotient.mk s x = Quotient.mk s y)))\n        (Quotient.mk'' (Quotient.mk'' w))) =\n    Quotient.mk'' (Quotient.mk'' w)\n[PROOFSTEP]\nshow ⟦_⟧ = _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : α → β\ns : Setoid α\nh : r ≤ s\nx : Quotient (ker (Quot.mapRight h))\ny : Quot fun a₁ a₂ => Rel r a₁ a₂\nw : α\n⊢ Quotient.mk (ker (Quot.mapRight h)) (Quotient.mk'' w) = Quotient.mk'' (Quotient.mk'' w)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : α → β\ns : Setoid α\nh : r ≤ s\nx : Quotient s\ny : α\n⊢ (fun x =>\n        Quotient.liftOn' x\n          (fun w =>\n            Quotient.liftOn' w Quotient.mk'' (_ : ∀ (x y : α), Setoid.r x y → Quotient.mk s x = Quotient.mk s y))\n          (_ :\n            ∀ (x y : Quot fun a₁ a₂ => Rel r a₁ a₂),\n              Setoid.r x y →\n                Quotient.liftOn' x Quotient.mk'' (_ : ∀ (x y : α), Setoid.r x y → Quotient.mk s x = Quotient.mk s y) =\n                  Quotient.liftOn' y Quotient.mk'' (_ : ∀ (x y : α), Setoid.r x y → Quotient.mk s x = Quotient.mk s y)))\n      ((fun x =>\n          Quotient.liftOn' x (fun w => Quotient.mk'' (Quotient.mk'' w))\n            (_ : ∀ (x y : α), Setoid.r x y → Quotient.mk'' (Quotient.mk'' x) = Quotient.mk'' (Quotient.mk'' y)))\n        (Quotient.mk'' y)) =\n    Quotient.mk'' y\n[PROOFSTEP]\nshow ⟦_⟧ = _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : Setoid α\nf : α → β\ns : Setoid α\nh : r ≤ s\nx : Quotient s\ny : α\n⊢ Quotient.mk s y = Quotient.mk'' y\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\ns : Setoid (Quotient r)\nx y : α\nh : Rel r x y\n⊢ Rel (comap Quotient.mk' s) x y\n[PROOFSTEP]\nrw [comap_rel, eq_rel.2 h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\ns : { s // r ≤ s }\n⊢ (fun s => { val := comap Quotient.mk' s, property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n      ((fun s =>\n          mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n            (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n        s) =\n    s\n[PROOFSTEP]\next\n[GOAL]\ncase a.H\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\ns : { s // r ≤ s }\na✝ b✝ : α\n⊢ Rel\n      (↑((fun s =>\n            { val := comap Quotient.mk' s, property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n          ((fun s =>\n              mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n            s)))\n      a✝ b✝ ↔\n    Rel (↑s) a✝ b✝\n[PROOFSTEP]\nrefine ⟨?_, fun h => ⟨_, _, rfl, rfl, h⟩⟩\n[GOAL]\ncase a.H\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\ns : { s // r ≤ s }\na✝ b✝ : α\n⊢ Rel\n      (↑((fun s =>\n            { val := comap Quotient.mk' s, property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n          ((fun s =>\n              mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n            s)))\n      a✝ b✝ →\n    Rel (↑s) a✝ b✝\n[PROOFSTEP]\nintro ⟨a, b, hx, hy, H⟩\n[GOAL]\ncase a.H\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\ns : { s // r ≤ s }\na✝ b✝ a b : α\nhx : Quotient.mk'' a = Quotient.mk' a✝\nhy : Quotient.mk'' b = Quotient.mk' b✝\nH : Rel (↑s) a b\n⊢ Rel (↑s) a✝ b✝\n[PROOFSTEP]\nrefine s.1.trans' (s.1.symm' <| s.2 <| eq_rel.1 hx) (s.1.trans' H <| s.2 <| (eq_rel.1 hy))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\n⊢ ∀ {a b : { s // r ≤ s }},\n    ↑{\n              toFun := fun s =>\n                mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                  (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n              invFun := fun s =>\n                { val := comap Quotient.mk' s,\n                  property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n              left_inv :=\n                (_ :\n                  ∀ (s : { s // r ≤ s }),\n                    (fun s =>\n                          { val := comap Quotient.mk' s,\n                            property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                        ((fun s =>\n                            mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                              (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                          s) =\n                      s),\n              right_inv :=\n                (_ :\n                  ∀ (s : Setoid (Quotient r)),\n                    (fun s =>\n                          mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                            (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                        ((fun s =>\n                            { val := comap Quotient.mk' s,\n                              property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                          s) =\n                      s) }\n          a ≤\n        ↑{\n              toFun := fun s =>\n                mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                  (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n              invFun := fun s =>\n                { val := comap Quotient.mk' s,\n                  property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n              left_inv :=\n                (_ :\n                  ∀ (s : { s // r ≤ s }),\n                    (fun s =>\n                          { val := comap Quotient.mk' s,\n                            property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                        ((fun s =>\n                            mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                              (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                          s) =\n                      s),\n              right_inv :=\n                (_ :\n                  ∀ (s : Setoid (Quotient r)),\n                    (fun s =>\n                          mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                            (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                        ((fun s =>\n                            { val := comap Quotient.mk' s,\n                              property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                          s) =\n                      s) }\n          b ↔\n      a ≤ b\n[PROOFSTEP]\nintro s t\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\ns t : { s // r ≤ s }\n⊢ ↑{\n            toFun := fun s =>\n              mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n            invFun := fun s =>\n              { val := comap Quotient.mk' s,\n                property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n            left_inv :=\n              (_ :\n                ∀ (s : { s // r ≤ s }),\n                  (fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      ((fun s =>\n                          mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                            (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                        s) =\n                    s),\n            right_inv :=\n              (_ :\n                ∀ (s : Setoid (Quotient r)),\n                  (fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      ((fun s =>\n                          { val := comap Quotient.mk' s,\n                            property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                        s) =\n                    s) }\n        s ≤\n      ↑{\n            toFun := fun s =>\n              mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n            invFun := fun s =>\n              { val := comap Quotient.mk' s,\n                property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n            left_inv :=\n              (_ :\n                ∀ (s : { s // r ≤ s }),\n                  (fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      ((fun s =>\n                          mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                            (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                        s) =\n                    s),\n            right_inv :=\n              (_ :\n                ∀ (s : Setoid (Quotient r)),\n                  (fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      ((fun s =>\n                          { val := comap Quotient.mk' s,\n                            property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                        s) =\n                    s) }\n        t ↔\n    s ≤ t\n[PROOFSTEP]\nrefine ⟨?_, ?_⟩\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\ns t : { s // r ≤ s }\n⊢ ↑{\n            toFun := fun s =>\n              mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n            invFun := fun s =>\n              { val := comap Quotient.mk' s,\n                property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n            left_inv :=\n              (_ :\n                ∀ (s : { s // r ≤ s }),\n                  (fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      ((fun s =>\n                          mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                            (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                        s) =\n                    s),\n            right_inv :=\n              (_ :\n                ∀ (s : Setoid (Quotient r)),\n                  (fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      ((fun s =>\n                          { val := comap Quotient.mk' s,\n                            property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                        s) =\n                    s) }\n        s ≤\n      ↑{\n            toFun := fun s =>\n              mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n            invFun := fun s =>\n              { val := comap Quotient.mk' s,\n                property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n            left_inv :=\n              (_ :\n                ∀ (s : { s // r ≤ s }),\n                  (fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      ((fun s =>\n                          mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                            (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                        s) =\n                    s),\n            right_inv :=\n              (_ :\n                ∀ (s : Setoid (Quotient r)),\n                  (fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      ((fun s =>\n                          { val := comap Quotient.mk' s,\n                            property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                        s) =\n                    s) }\n        t →\n    s ≤ t\n[PROOFSTEP]\nintro h x y hs\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\ns t : { s // r ≤ s }\nh :\n  ↑{\n          toFun := fun s =>\n            mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n              (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n          invFun := fun s =>\n            { val := comap Quotient.mk' s, property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n          left_inv :=\n            (_ :\n              ∀ (s : { s // r ≤ s }),\n                (fun s =>\n                      { val := comap Quotient.mk' s,\n                        property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                    ((fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      s) =\n                  s),\n          right_inv :=\n            (_ :\n              ∀ (s : Setoid (Quotient r)),\n                (fun s =>\n                      mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                        (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                    ((fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      s) =\n                  s) }\n      s ≤\n    ↑{\n          toFun := fun s =>\n            mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n              (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n          invFun := fun s =>\n            { val := comap Quotient.mk' s, property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n          left_inv :=\n            (_ :\n              ∀ (s : { s // r ≤ s }),\n                (fun s =>\n                      { val := comap Quotient.mk' s,\n                        property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                    ((fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      s) =\n                  s),\n          right_inv :=\n            (_ :\n              ∀ (s : Setoid (Quotient r)),\n                (fun s =>\n                      mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                        (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                    ((fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      s) =\n                  s) }\n      t\nx y : α\nhs : Rel (↑s) x y\n⊢ Rel (↑t) x y\n[PROOFSTEP]\nlet ⟨a, b, hx, hy, ht⟩ := h ⟨x, y, rfl, rfl, hs⟩\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\ns t : { s // r ≤ s }\nh :\n  ↑{\n          toFun := fun s =>\n            mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n              (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n          invFun := fun s =>\n            { val := comap Quotient.mk' s, property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n          left_inv :=\n            (_ :\n              ∀ (s : { s // r ≤ s }),\n                (fun s =>\n                      { val := comap Quotient.mk' s,\n                        property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                    ((fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      s) =\n                  s),\n          right_inv :=\n            (_ :\n              ∀ (s : Setoid (Quotient r)),\n                (fun s =>\n                      mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                        (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                    ((fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      s) =\n                  s) }\n      s ≤\n    ↑{\n          toFun := fun s =>\n            mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n              (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n          invFun := fun s =>\n            { val := comap Quotient.mk' s, property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n          left_inv :=\n            (_ :\n              ∀ (s : { s // r ≤ s }),\n                (fun s =>\n                      { val := comap Quotient.mk' s,\n                        property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                    ((fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      s) =\n                  s),\n          right_inv :=\n            (_ :\n              ∀ (s : Setoid (Quotient r)),\n                (fun s =>\n                      mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                        (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                    ((fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      s) =\n                  s) }\n      t\nx y : α\nhs : Rel (↑s) x y\na b : α\nhx : Quotient.mk'' a = Quotient.mk'' x\nhy : Quotient.mk'' b = Quotient.mk'' y\nht : Rel (↑t) a b\n⊢ Rel (↑t) x y\n[PROOFSTEP]\nexact t.1.trans' (t.1.symm' <| t.2 <| eq_rel.1 hx) <| t.1.trans' ht <| t.2 <| eq_rel.1 hy\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\ns t : { s // r ≤ s }\n⊢ s ≤ t →\n    ↑{\n            toFun := fun s =>\n              mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n            invFun := fun s =>\n              { val := comap Quotient.mk' s,\n                property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n            left_inv :=\n              (_ :\n                ∀ (s : { s // r ≤ s }),\n                  (fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      ((fun s =>\n                          mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                            (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                        s) =\n                    s),\n            right_inv :=\n              (_ :\n                ∀ (s : Setoid (Quotient r)),\n                  (fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      ((fun s =>\n                          { val := comap Quotient.mk' s,\n                            property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                        s) =\n                    s) }\n        s ≤\n      ↑{\n            toFun := fun s =>\n              mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n            invFun := fun s =>\n              { val := comap Quotient.mk' s,\n                property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n            left_inv :=\n              (_ :\n                ∀ (s : { s // r ≤ s }),\n                  (fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      ((fun s =>\n                          mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                            (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                        s) =\n                    s),\n            right_inv :=\n              (_ :\n                ∀ (s : Setoid (Quotient r)),\n                  (fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      ((fun s =>\n                          { val := comap Quotient.mk' s,\n                            property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                        s) =\n                    s) }\n        t\n[PROOFSTEP]\nintro h x y hs\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\ns t : { s // r ≤ s }\nh : s ≤ t\nx y : Quotient r\nhs :\n  Rel\n    (↑{\n          toFun := fun s =>\n            mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n              (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n          invFun := fun s =>\n            { val := comap Quotient.mk' s, property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n          left_inv :=\n            (_ :\n              ∀ (s : { s // r ≤ s }),\n                (fun s =>\n                      { val := comap Quotient.mk' s,\n                        property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                    ((fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      s) =\n                  s),\n          right_inv :=\n            (_ :\n              ∀ (s : Setoid (Quotient r)),\n                (fun s =>\n                      mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                        (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                    ((fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      s) =\n                  s) }\n      s)\n    x y\n⊢ Rel\n    (↑{\n          toFun := fun s =>\n            mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n              (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n          invFun := fun s =>\n            { val := comap Quotient.mk' s, property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n          left_inv :=\n            (_ :\n              ∀ (s : { s // r ≤ s }),\n                (fun s =>\n                      { val := comap Quotient.mk' s,\n                        property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                    ((fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      s) =\n                  s),\n          right_inv :=\n            (_ :\n              ∀ (s : Setoid (Quotient r)),\n                (fun s =>\n                      mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                        (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                    ((fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      s) =\n                  s) }\n      t)\n    x y\n[PROOFSTEP]\nlet ⟨a, b, hx, hy, Hs⟩ := hs\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Type u_2\nr✝ : Setoid α\nf : α → β\nr : Setoid α\ns t : { s // r ≤ s }\nh : s ≤ t\nx y : Quotient r\nhs :\n  Rel\n    (↑{\n          toFun := fun s =>\n            mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n              (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n          invFun := fun s =>\n            { val := comap Quotient.mk' s, property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n          left_inv :=\n            (_ :\n              ∀ (s : { s // r ≤ s }),\n                (fun s =>\n                      { val := comap Quotient.mk' s,\n                        property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                    ((fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      s) =\n                  s),\n          right_inv :=\n            (_ :\n              ∀ (s : Setoid (Quotient r)),\n                (fun s =>\n                      mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                        (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                    ((fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      s) =\n                  s) }\n      s)\n    x y\na b : α\nhx : Quotient.mk'' a = x\nhy : Quotient.mk'' b = y\nHs : Rel (↑s) a b\n⊢ Rel\n    (↑{\n          toFun := fun s =>\n            mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n              (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q),\n          invFun := fun s =>\n            { val := comap Quotient.mk' s, property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) },\n          left_inv :=\n            (_ :\n              ∀ (s : { s // r ≤ s }),\n                (fun s =>\n                      { val := comap Quotient.mk' s,\n                        property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                    ((fun s =>\n                        mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                          (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                      s) =\n                  s),\n          right_inv :=\n            (_ :\n              ∀ (s : Setoid (Quotient r)),\n                (fun s =>\n                      mapOfSurjective (↑s) Quotient.mk'' (_ : ker Quotient.mk'' ≤ ↑s)\n                        (_ : ∀ (q : Quotient r), ∃ a, Quotient.mk r a = q))\n                    ((fun s =>\n                        { val := comap Quotient.mk' s,\n                          property := (_ : ∀ (x y : α), Rel r x y → Rel (comap Quotient.mk' s) x y) })\n                      s) =\n                  s) }\n      t)\n    x y\n[PROOFSTEP]\nexact ⟨a, b, hx, hy, h Hs⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Setoid α\n⊢ Subsingleton (Quotient s) ↔ s = ⊤\n[PROOFSTEP]\nsimp only [_root_.subsingleton_iff, eq_top_iff, Setoid.le_def, Setoid.top_def, Pi.top_apply, forall_const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Setoid α\n⊢ (∀ (x y : Quotient s), x = y) ↔ ∀ {x y : α}, ⊤ → Setoid.Rel s x y\n[PROOFSTEP]\nrefine' (surjective_quotient_mk _).forall.trans (forall_congr' fun a => _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Setoid α\na : α\n⊢ (∀ (y : Quotient s), Quotient.mk s a = y) ↔ ∀ {y : α}, ⊤ → Setoid.Rel s a y\n[PROOFSTEP]\nrefine' (surjective_quotient_mk _).forall.trans (forall_congr' fun b => _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Setoid α\na b : α\n⊢ Quotient.mk s a = Quotient.mk s b ↔ ⊤ → Setoid.Rel s a b\n[PROOFSTEP]\nsimp_rw [← Quotient.mk''_eq_mk, Prop.top_eq_true, true_implies, Quotient.eq'']\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Setoid α\na b : α\n⊢ Setoid.r a b ↔ Setoid.Rel s a b\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\n⊢ Subsingleton (Quot r) ↔ EqvGen r = ⊤\n[PROOFSTEP]\nsimp only [_root_.subsingleton_iff, _root_.eq_top_iff, Pi.le_def, Pi.top_apply, forall_const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\n⊢ (∀ (x y : Quot r), x = y) ↔ ∀ (i i_1 : α), ⊤ ≤ EqvGen r i i_1\n[PROOFSTEP]\nrefine' (surjective_quot_mk _).forall.trans (forall_congr' fun a => _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\na : α\n⊢ (∀ (y : Quot r), mk r a = y) ↔ ∀ (i : α), ⊤ ≤ EqvGen r a i\n[PROOFSTEP]\nrefine' (surjective_quot_mk _).forall.trans (forall_congr' fun b => _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\na b : α\n⊢ mk r a = mk r b ↔ ⊤ ≤ EqvGen r a b\n[PROOFSTEP]\nrw [Quot.eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\na b : α\n⊢ EqvGen r a b ↔ ⊤ ≤ EqvGen r a b\n[PROOFSTEP]\nsimp only [forall_const, le_Prop_eq, OrderTop.toTop, Pi.orderTop, Pi.top_apply, Prop.top_eq_true, true_implies]\n", "meta": {"mathlib_filename": "Mathlib.Data.Setoid.Basic", "llama_tokens": 15393, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6334102636778401, "lm_q2_score": 0.5964331462646254, "lm_q1q2_score": 0.3777868764416802}}
{"text": "[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\ns t u : Set M\nS : Submonoid M\nhs : s ⊆ ↑S\nht : t ⊆ ↑S\n⊢ s * t ⊆ ↑S\n[PROOFSTEP]\nrintro _ ⟨p, q, hp, hq, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\ns t u : Set M\nS : Submonoid M\nhs : s ⊆ ↑S\nht : t ⊆ ↑S\np q : M\nhp : p ∈ s\nhq : q ∈ t\n⊢ (fun x x_1 => x * x_1) p q ∈ ↑S\n[PROOFSTEP]\nexact Submonoid.mul_mem _ (hs hp) (ht hq)\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\ns✝ t u : Set M\ns : Submonoid M\n⊢ ↑s * ↑s = ↑s\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\ns✝ t u : Set M\ns : Submonoid M\nx : M\n⊢ x ∈ ↑s * ↑s ↔ x ∈ ↑s\n[PROOFSTEP]\nrefine' ⟨_, fun h => ⟨x, 1, h, s.one_mem, mul_one x⟩⟩\n[GOAL]\ncase h\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\ns✝ t u : Set M\ns : Submonoid M\nx : M\n⊢ x ∈ ↑s * ↑s → x ∈ ↑s\n[PROOFSTEP]\nrintro ⟨a, b, ha, hb, rfl⟩\n[GOAL]\ncase h.intro.intro.intro.intro\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\ns✝ t u : Set M\ns : Submonoid M\na b : M\nha : a ∈ ↑s\nhb : b ∈ ↑s\n⊢ (fun x x_1 => x * x_1) a b ∈ ↑s\n[PROOFSTEP]\nexact s.mul_mem ha hb\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝¹ : Monoid M\ninst✝ : AddMonoid A\ns t u : Set M\nH K : Submonoid M\n⊢ closure ↑H ⊔ closure ↑K ≤ H ⊔ K\n[PROOFSTEP]\nrw [closure_eq, closure_eq]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝⁴ : Monoid M\ninst✝³ : AddMonoid A\ns✝ t u : Set M\nN : Type u_6\ninst✝² : CommMonoid N\ninst✝¹ : MulAction M N\ninst✝ : IsScalarTower M N N\nr : M\ns : Set N\nx : N\nhx : x ∈ closure s\n⊢ ∃ n, r ^ n • x ∈ closure (r • s)\n[PROOFSTEP]\nrefine' @closure_induction N _ s (fun x : N => ∃ n : ℕ, r ^ n • x ∈ closure (r • s)) _ hx _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝⁴ : Monoid M\ninst✝³ : AddMonoid A\ns✝ t u : Set M\nN : Type u_6\ninst✝² : CommMonoid N\ninst✝¹ : MulAction M N\ninst✝ : IsScalarTower M N N\nr : M\ns : Set N\nx : N\nhx : x ∈ closure s\n⊢ ∀ (x : N), x ∈ s → (fun x => ∃ n, r ^ n • x ∈ closure (r • s)) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_1\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝⁴ : Monoid M\ninst✝³ : AddMonoid A\ns✝ t u : Set M\nN : Type u_6\ninst✝² : CommMonoid N\ninst✝¹ : MulAction M N\ninst✝ : IsScalarTower M N N\nr : M\ns : Set N\nx✝ : N\nhx✝ : x✝ ∈ closure s\nx : N\nhx : x ∈ s\n⊢ ∃ n, r ^ n • x ∈ closure (r • s)\n[PROOFSTEP]\nexact ⟨1, subset_closure ⟨_, hx, by rw [pow_one]⟩⟩\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝⁴ : Monoid M\ninst✝³ : AddMonoid A\ns✝ t u : Set M\nN : Type u_6\ninst✝² : CommMonoid N\ninst✝¹ : MulAction M N\ninst✝ : IsScalarTower M N N\nr : M\ns : Set N\nx✝ : N\nhx✝ : x✝ ∈ closure s\nx : N\nhx : x ∈ s\n⊢ (fun x => r • x) x = r ^ 1 • x\n[PROOFSTEP]\nrw [pow_one]\n[GOAL]\ncase refine'_2\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝⁴ : Monoid M\ninst✝³ : AddMonoid A\ns✝ t u : Set M\nN : Type u_6\ninst✝² : CommMonoid N\ninst✝¹ : MulAction M N\ninst✝ : IsScalarTower M N N\nr : M\ns : Set N\nx : N\nhx : x ∈ closure s\n⊢ (fun x => ∃ n, r ^ n • x ∈ closure (r • s)) 1\n[PROOFSTEP]\nexact ⟨0, by simpa using one_mem _⟩\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝⁴ : Monoid M\ninst✝³ : AddMonoid A\ns✝ t u : Set M\nN : Type u_6\ninst✝² : CommMonoid N\ninst✝¹ : MulAction M N\ninst✝ : IsScalarTower M N N\nr : M\ns : Set N\nx : N\nhx : x ∈ closure s\n⊢ r ^ 0 • 1 ∈ closure (r • s)\n[PROOFSTEP]\nsimpa using one_mem _\n[GOAL]\ncase refine'_3\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝⁴ : Monoid M\ninst✝³ : AddMonoid A\ns✝ t u : Set M\nN : Type u_6\ninst✝² : CommMonoid N\ninst✝¹ : MulAction M N\ninst✝ : IsScalarTower M N N\nr : M\ns : Set N\nx : N\nhx : x ∈ closure s\n⊢ ∀ (x y : N),\n    (fun x => ∃ n, r ^ n • x ∈ closure (r • s)) x →\n      (fun x => ∃ n, r ^ n • x ∈ closure (r • s)) y → (fun x => ∃ n, r ^ n • x ∈ closure (r • s)) (x * y)\n[PROOFSTEP]\nrintro x y ⟨nx, hx⟩ ⟨ny, hy⟩\n[GOAL]\ncase refine'_3.intro.intro\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝⁴ : Monoid M\ninst✝³ : AddMonoid A\ns✝ t u : Set M\nN : Type u_6\ninst✝² : CommMonoid N\ninst✝¹ : MulAction M N\ninst✝ : IsScalarTower M N N\nr : M\ns : Set N\nx✝ : N\nhx✝ : x✝ ∈ closure s\nx y : N\nnx : ℕ\nhx : r ^ nx • x ∈ closure (r • s)\nny : ℕ\nhy : r ^ ny • y ∈ closure (r • s)\n⊢ ∃ n, r ^ n • (x * y) ∈ closure (r • s)\n[PROOFSTEP]\nuse ny + nx\n[GOAL]\ncase h\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝⁴ : Monoid M\ninst✝³ : AddMonoid A\ns✝ t u : Set M\nN : Type u_6\ninst✝² : CommMonoid N\ninst✝¹ : MulAction M N\ninst✝ : IsScalarTower M N N\nr : M\ns : Set N\nx✝ : N\nhx✝ : x✝ ∈ closure s\nx y : N\nnx : ℕ\nhx : r ^ nx • x ∈ closure (r • s)\nny : ℕ\nhy : r ^ ny • y ∈ closure (r • s)\n⊢ r ^ (ny + nx) • (x * y) ∈ closure (r • s)\n[PROOFSTEP]\nrw [pow_add, mul_smul, ← smul_mul_assoc, mul_comm, ← smul_mul_assoc]\n[GOAL]\ncase h\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝⁴ : Monoid M\ninst✝³ : AddMonoid A\ns✝ t u : Set M\nN : Type u_6\ninst✝² : CommMonoid N\ninst✝¹ : MulAction M N\ninst✝ : IsScalarTower M N N\nr : M\ns : Set N\nx✝ : N\nhx✝ : x✝ ∈ closure s\nx y : N\nnx : ℕ\nhx : r ^ nx • x ∈ closure (r • s)\nny : ℕ\nhy : r ^ ny • y ∈ closure (r • s)\n⊢ r ^ ny • y * r ^ nx • x ∈ closure (r • s)\n[PROOFSTEP]\nexact mul_mem hy hx\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ns t u : Set M\ninst✝ : Group G\nS : Submonoid G\na✝ b✝ : G\nha : a✝ ∈ (↑S)⁻¹\nhb : b✝ ∈ (↑S)⁻¹\n⊢ a✝ * b✝ ∈ (↑S)⁻¹\n[PROOFSTEP]\nrw [mem_inv, mul_inv_rev]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ns t u : Set M\ninst✝ : Group G\nS : Submonoid G\na✝ b✝ : G\nha : a✝ ∈ (↑S)⁻¹\nhb : b✝ ∈ (↑S)⁻¹\n⊢ b✝⁻¹ * a✝⁻¹ ∈ ↑S\n[PROOFSTEP]\nexact mul_mem hb ha\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ns t u : Set M\ninst✝ : Group G\nS : Submonoid G\n⊢ 1⁻¹ ∈ ↑S\n[PROOFSTEP]\nrw [inv_one]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ns t u : Set M\ninst✝ : Group G\nS : Submonoid G\n⊢ 1 ∈ ↑S\n[PROOFSTEP]\nexact S.one_mem'\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ns✝ t u : Set M\ninst✝ : Group G\ns : Set G\n⊢ closure s⁻¹ = (closure s)⁻¹\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ns✝ t u : Set M\ninst✝ : Group G\ns : Set G\n⊢ closure s⁻¹ ≤ (closure s)⁻¹\n[PROOFSTEP]\nrw [closure_le, coe_inv, ← Set.inv_subset, inv_inv]\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ns✝ t u : Set M\ninst✝ : Group G\ns : Set G\n⊢ s ⊆ ↑(closure s)\n[PROOFSTEP]\nexact subset_closure\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ns✝ t u : Set M\ninst✝ : Group G\ns : Set G\n⊢ (closure s)⁻¹ ≤ closure s⁻¹\n[PROOFSTEP]\nrw [inv_le, closure_le, coe_inv, ← Set.inv_subset]\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ns✝ t u : Set M\ninst✝ : Group G\ns : Set G\n⊢ s⁻¹ ⊆ ↑(closure s⁻¹)\n[PROOFSTEP]\nexact subset_closure\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝³ : Monoid M\ninst✝² : AddMonoid A\ninst✝¹ : Monoid α\ninst✝ : MulDistribMulAction α M\nS : Submonoid M\n⊢ 1 • S = S\n[PROOFSTEP]\nchange S.map _ = S\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝³ : Monoid M\ninst✝² : AddMonoid A\ninst✝¹ : Monoid α\ninst✝ : MulDistribMulAction α M\nS : Submonoid M\n⊢ map (↑(MulDistribMulAction.toMonoidEnd α M) 1) S = S\n[PROOFSTEP]\nsimpa only [map_one] using S.map_id\n[GOAL]\nα : Type u_1\nG✝ : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\nG : Type u_6\ninst✝ : Group G\nS : Set G\nx : G\n⊢ x ∈ closure S⁻¹ ↔ x⁻¹ ∈ closure S\n[PROOFSTEP]\nrw [closure_inv, mem_inv]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : AddMonoidWithOne R\n⊢ 1 = closure {1}\n[PROOFSTEP]\nrw [closure_singleton_eq, one_eq_mrange]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : AddMonoidWithOne R\n⊢ AddMonoidHom.mrange (Nat.castAddMonoidHom R) = AddMonoidHom.mrange (↑(multiplesHom R) 1)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : AddMonoidWithOne R\n⊢ Nat.castAddMonoidHom R = ↑(multiplesHom R) 1\n[PROOFSTEP]\next\n[GOAL]\ncase e_f.a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : AddMonoidWithOne R\n⊢ ↑(Nat.castAddMonoidHom R) 1 = ↑(↑(multiplesHom R) 1) 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nG : Type u_2\nM✝ : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M✝\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nM N : AddSubmonoid R\nm n : R\nhm : m ∈ M\nhn : n ∈ N\n⊢ ↑(↑AddMonoidHom.mul ↑{ val := m, property := hm }) n = m * n\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nG : Type u_2\nM✝ : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M✝\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nM N : AddSubmonoid R\nC : R → Prop\nr : R\nhr : r ∈ M * N\nhm : ∀ (m : R), m ∈ M → ∀ (n : R), n ∈ N → C (m * n)\nha : ∀ (x y : R), C x → C y → C (x + y)\n⊢ 0 ∈ { carrier := setOf C, add_mem' := (_ : ∀ {a b : R}, C a → C b → C (a + b)) }.carrier\n[PROOFSTEP]\nsimpa only [zero_mul] using hm _ (zero_mem _) _ (zero_mem _)\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS T : Set R\n⊢ closure S * closure T = closure (S * T)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS T : Set R\n⊢ closure S * closure T ≤ closure (S * T)\n[PROOFSTEP]\nrefine mul_le.2 fun a ha b hb => ?_\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS T : Set R\na : R\nha : a ∈ closure S\nb : R\nhb : b ∈ closure T\n⊢ a * b ∈ closure (S * T)\n[PROOFSTEP]\nrw [← AddMonoidHom.mulRight_apply, ← AddSubmonoid.mem_comap]\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS T : Set R\na : R\nha : a ∈ closure S\nb : R\nhb : b ∈ closure T\n⊢ a ∈ comap (AddMonoidHom.mulRight b) (closure (S * T))\n[PROOFSTEP]\nrefine (closure_le.2 fun a' ha' => ?_) ha\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS T : Set R\na : R\nha : a ∈ closure S\nb : R\nhb : b ∈ closure T\na' : R\nha' : a' ∈ S\n⊢ a' ∈ ↑(comap (AddMonoidHom.mulRight b) (closure (S * T)))\n[PROOFSTEP]\nchange b ∈ (closure (S * T)).comap (AddMonoidHom.mulLeft a')\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS T : Set R\na : R\nha : a ∈ closure S\nb : R\nhb : b ∈ closure T\na' : R\nha' : a' ∈ S\n⊢ b ∈ comap (AddMonoidHom.mulLeft a') (closure (S * T))\n[PROOFSTEP]\nrefine (closure_le.2 fun b' hb' => ?_) hb\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS T : Set R\na : R\nha : a ∈ closure S\nb : R\nhb : b ∈ closure T\na' : R\nha' : a' ∈ S\nb' : R\nhb' : b' ∈ T\n⊢ b' ∈ ↑(comap (AddMonoidHom.mulLeft a') (closure (S * T)))\n[PROOFSTEP]\nchange a' * b' ∈ closure (S * T)\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS T : Set R\na : R\nha : a ∈ closure S\nb : R\nhb : b ∈ closure T\na' : R\nha' : a' ∈ S\nb' : R\nhb' : b' ∈ T\n⊢ a' * b' ∈ closure (S * T)\n[PROOFSTEP]\nexact subset_closure (Set.mul_mem_mul ha' hb')\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS T : Set R\n⊢ closure (S * T) ≤ closure S * closure T\n[PROOFSTEP]\nrw [closure_le]\n[GOAL]\ncase a\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS T : Set R\n⊢ S * T ⊆ ↑(closure S * closure T)\n[PROOFSTEP]\nrintro _ ⟨a, b, ha, hb, rfl⟩\n[GOAL]\ncase a.intro.intro.intro.intro\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS T : Set R\na b : R\nha : a ∈ S\nhb : b ∈ T\n⊢ (fun x x_1 => x * x_1) a b ∈ ↑(closure S * closure T)\n[PROOFSTEP]\nexact mul_mem_mul (subset_closure ha) (subset_closure hb)\n[GOAL]\nα : Type u_1\nG : Type u_2\nM✝ : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M✝\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nM N : AddSubmonoid R\n⊢ M * N = closure (↑M * ↑N)\n[PROOFSTEP]\nrw [← closure_mul_closure, closure_eq, closure_eq]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS : AddSubmonoid R\nm : R\nx✝ : m ∈ S\nn : R\nhn : n ∈ ⊥\n⊢ m * n ∈ ⊥\n[PROOFSTEP]\nrw [AddSubmonoid.mem_bot] at hn ⊢\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS : AddSubmonoid R\nm : R\nx✝ : m ∈ S\nn : R\nhn : n = 0\n⊢ m * n = 0\n[PROOFSTEP]\nrw [hn, mul_zero]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS : AddSubmonoid R\nm : R\nhm : m ∈ ⊥\nn : R\nhn : n ∈ S\n⊢ m * n ∈ ⊥\n[PROOFSTEP]\nrw [AddSubmonoid.mem_bot] at hm ⊢\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nS : AddSubmonoid R\nm : R\nhm : m = 0\nn : R\nhn : n ∈ S\n⊢ m * n = 0\n[PROOFSTEP]\nrw [hm, zero_mul]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM✝ : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M✝\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nM N : AddSubmonoid R\n⊢ ↑M * ↑N ⊆ ↑(M * N)\n[PROOFSTEP]\nrintro _ ⟨i, j, hi, hj, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nG : Type u_2\nM✝ : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M✝\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocSemiring R\nM N : AddSubmonoid R\ni j : R\nhi : i ∈ ↑M\nhj : j ∈ ↑N\n⊢ (fun x x_1 => x * x_1) i j ∈ ↑(M * N)\n[PROOFSTEP]\nexact mul_mem_mul hi hj\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocRing R\nsrc✝ : InvolutiveNeg (AddSubmonoid R) := involutiveNeg\nx y : AddSubmonoid R\n⊢ -x * y = -(x * y)\n[PROOFSTEP]\nrefine' le_antisymm (mul_le.2 fun m hm n hn => _) ((AddSubmonoid.neg_le _ _).2 <| mul_le.2 fun m hm n hn => _)\n[GOAL]\ncase refine'_1\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocRing R\nsrc✝ : InvolutiveNeg (AddSubmonoid R) := involutiveNeg\nx y : AddSubmonoid R\nm : R\nhm : m ∈ -x\nn : R\nhn : n ∈ y\n⊢ m * n ∈ -(x * y)\n[PROOFSTEP]\nsimp only [AddSubmonoid.mem_neg, ← neg_mul] at *\n[GOAL]\ncase refine'_2\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocRing R\nsrc✝ : InvolutiveNeg (AddSubmonoid R) := involutiveNeg\nx y : AddSubmonoid R\nm : R\nhm : m ∈ x\nn : R\nhn : n ∈ y\n⊢ m * n ∈ -(-x * y)\n[PROOFSTEP]\nsimp only [AddSubmonoid.mem_neg, ← neg_mul] at *\n[GOAL]\ncase refine'_1\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocRing R\nsrc✝ : InvolutiveNeg (AddSubmonoid R) := involutiveNeg\nx y : AddSubmonoid R\nm n : R\nhn : n ∈ y\nhm : -m ∈ x\n⊢ -m * n ∈ x * y\n[PROOFSTEP]\nexact mul_mem_mul hm hn\n[GOAL]\ncase refine'_2\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocRing R\nsrc✝ : InvolutiveNeg (AddSubmonoid R) := involutiveNeg\nx y : AddSubmonoid R\nm : R\nhm : m ∈ x\nn : R\nhn : n ∈ y\n⊢ -m * n ∈ -x * y\n[PROOFSTEP]\nexact mul_mem_mul (neg_mem_neg.2 hm) hn\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocRing R\nsrc✝ : InvolutiveNeg (AddSubmonoid R) := involutiveNeg\nx y : AddSubmonoid R\n⊢ x * -y = -(x * y)\n[PROOFSTEP]\nrefine' le_antisymm (mul_le.2 fun m hm n hn => _) ((AddSubmonoid.neg_le _ _).2 <| mul_le.2 fun m hm n hn => _)\n[GOAL]\ncase refine'_1\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocRing R\nsrc✝ : InvolutiveNeg (AddSubmonoid R) := involutiveNeg\nx y : AddSubmonoid R\nm : R\nhm : m ∈ x\nn : R\nhn : n ∈ -y\n⊢ m * n ∈ -(x * y)\n[PROOFSTEP]\nsimp only [AddSubmonoid.mem_neg, ← mul_neg] at *\n[GOAL]\ncase refine'_2\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocRing R\nsrc✝ : InvolutiveNeg (AddSubmonoid R) := involutiveNeg\nx y : AddSubmonoid R\nm : R\nhm : m ∈ x\nn : R\nhn : n ∈ y\n⊢ m * n ∈ -(x * -y)\n[PROOFSTEP]\nsimp only [AddSubmonoid.mem_neg, ← mul_neg] at *\n[GOAL]\ncase refine'_1\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocRing R\nsrc✝ : InvolutiveNeg (AddSubmonoid R) := involutiveNeg\nx y : AddSubmonoid R\nm : R\nhm : m ∈ x\nn : R\nhn : -n ∈ y\n⊢ m * -n ∈ x * y\n[PROOFSTEP]\nexact mul_mem_mul hm hn\n[GOAL]\ncase refine'_2\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : NonUnitalNonAssocRing R\nsrc✝ : InvolutiveNeg (AddSubmonoid R) := involutiveNeg\nx y : AddSubmonoid R\nm : R\nhm : m ∈ x\nn : R\nhn : n ∈ y\n⊢ m * -n ∈ x * -y\n[PROOFSTEP]\nexact mul_mem_mul hm (neg_mem_neg.2 hn)\n[GOAL]\nα : Type u_1\nG : Type u_2\nM✝ : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M✝\ninst✝¹ : AddMonoid A\ninst✝ : NonAssocSemiring R\nM : AddSubmonoid R\n⊢ 1 * M = M\n[PROOFSTEP]\nrw [one_eq_closure_one_set, ← closure_eq M, closure_mul_closure, one_mul]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM✝ : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M✝\ninst✝¹ : AddMonoid A\ninst✝ : NonAssocSemiring R\nM : AddSubmonoid R\n⊢ M * 1 = M\n[PROOFSTEP]\nrw [one_eq_closure_one_set, ← closure_eq M, closure_mul_closure, mul_one]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : Semiring R\ns : Set R\n⊢ closure s ^ 0 = closure (s ^ 0)\n[PROOFSTEP]\nrw [pow_zero, pow_zero, one_eq_closure_one_set]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : Semiring R\ns : Set R\nn : ℕ\n⊢ closure s ^ (n + 1) = closure (s ^ (n + 1))\n[PROOFSTEP]\nrw [pow_succ, pow_succ, closure_pow s n, closure_mul_closure]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : Semiring R\ns : AddSubmonoid R\nn : ℕ\n⊢ s ^ n = closure (↑s ^ n)\n[PROOFSTEP]\nrw [← closure_pow, closure_eq]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : OrderedCancelCommMonoid α\ns : Set α\nhpos : ∀ (x : α), x ∈ s → 1 ≤ x\nh : IsPwo s\n⊢ IsPwo ↑(Submonoid.closure s)\n[PROOFSTEP]\nrw [Submonoid.closure_eq_image_prod]\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : OrderedCancelCommMonoid α\ns : Set α\nhpos : ∀ (x : α), x ∈ s → 1 ≤ x\nh : IsPwo s\n⊢ IsPwo (List.prod '' {l | ∀ (x : α), x ∈ l → x ∈ s})\n[PROOFSTEP]\nrefine' (h.partiallyWellOrderedOn_sublistForall₂ (· ≤ ·)).image_of_monotone_on _\n[GOAL]\nα : Type u_1\nG : Type u_2\nM : Type u_3\nR : Type u_4\nA : Type u_5\ninst✝² : Monoid M\ninst✝¹ : AddMonoid A\ninst✝ : OrderedCancelCommMonoid α\ns : Set α\nhpos : ∀ (x : α), x ∈ s → 1 ≤ x\nh : IsPwo s\n⊢ ∀ (a₁ : List α),\n    a₁ ∈ {l | ∀ (x : α), x ∈ l → x ∈ s} →\n      ∀ (a₂ : List α),\n        a₂ ∈ {l | ∀ (x : α), x ∈ l → x ∈ s} →\n          List.SublistForall₂ (fun x x_1 => x ≤ x_1) a₁ a₂ → List.prod a₁ ≤ List.prod a₂\n[PROOFSTEP]\nexact fun l1 _ l2 hl2 h12 => h12.prod_le_prod' fun x hx => hpos x <| hl2 x hx\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Submonoid.Pointwise", "llama_tokens": 11258, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.658417500561683, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.37771990316108817}}
{"text": "[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\n⊢ P (Scheme.Γ.map (f ∣_ Scheme.basicOpen Y r).op) ↔\n    P\n      (IsLocalization.Away.map (↑(Y.presheaf.obj (Opposite.op (Scheme.basicOpen Y r))))\n        (↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))) (Scheme.Γ.map f.op) r)\n[PROOFSTEP]\nrw [Γ_map_morphismRestrict, hP.cancel_left_isIso, hP.cancel_right_isIso, ←\n  hP.cancel_right_isIso (f.val.c.app (Opposite.op (Y.basicOpen r)))\n    (X.presheaf.map (eqToHom (Scheme.preimage_basicOpen f r).symm).op),\n  ← eq_iff_iff]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\n⊢ P\n      (NatTrans.app f.val.c (Opposite.op (Scheme.basicOpen Y r)) ≫\n        X.presheaf.map\n          (eqToHom\n              (_ :\n                Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r) =\n                  (Opens.map f.val.base).obj (Scheme.basicOpen Y r))).op) =\n    P\n      (IsLocalization.Away.map (↑(Y.presheaf.obj (Opposite.op (Scheme.basicOpen Y r))))\n        (↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))) (Scheme.Γ.map f.op) r)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\n⊢ NatTrans.app f.val.c (Opposite.op (Scheme.basicOpen Y r)) ≫\n      X.presheaf.map\n        (eqToHom\n            (_ :\n              Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r) =\n                (Opens.map f.val.base).obj (Scheme.basicOpen Y r))).op =\n    IsLocalization.Away.map (↑(Y.presheaf.obj (Opposite.op (Scheme.basicOpen Y r))))\n      (↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))) (Scheme.Γ.map f.op) r\n[PROOFSTEP]\ndelta IsLocalization.Away.map\n[GOAL]\ncase e_a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\n⊢ NatTrans.app f.val.c (Opposite.op (Scheme.basicOpen Y r)) ≫\n      X.presheaf.map\n        (eqToHom\n            (_ :\n              Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r) =\n                (Opens.map f.val.base).obj (Scheme.basicOpen Y r))).op =\n    IsLocalization.map (↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r)))))\n      (Scheme.Γ.map f.op)\n      (_ : Submonoid.powers r ≤ Submonoid.comap (Scheme.Γ.map f.op) (Submonoid.powers (↑(Scheme.Γ.map f.op) r)))\n[PROOFSTEP]\nrefine' IsLocalization.ringHom_ext (Submonoid.powers r) _\n[GOAL]\ncase e_a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\n⊢ comp\n      (NatTrans.app f.val.c (Opposite.op (Scheme.basicOpen Y r)) ≫\n        X.presheaf.map\n          (eqToHom\n              (_ :\n                Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r) =\n                  (Opens.map f.val.base).obj (Scheme.basicOpen Y r))).op)\n      (algebraMap ↑(Y.presheaf.obj (Opposite.op ⊤)) ↑(Y.presheaf.obj (Opposite.op (Scheme.basicOpen Y r)))) =\n    comp\n      (IsLocalization.map (↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r)))))\n        (Scheme.Γ.map f.op)\n        (_ : Submonoid.powers r ≤ Submonoid.comap (Scheme.Γ.map f.op) (Submonoid.powers (↑(Scheme.Γ.map f.op) r))))\n      (algebraMap ↑(Y.presheaf.obj (Opposite.op ⊤)) ↑(Y.presheaf.obj (Opposite.op (Scheme.basicOpen Y r))))\n[PROOFSTEP]\ngeneralize_proofs h1 h2 h3\n[GOAL]\ncase e_a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nh1 : Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r) = (Opens.map f.val.base).obj (Scheme.basicOpen Y r)\nh2 :\n  IsLocalization.Away (↑(Scheme.Γ.map f.op) r)\n    ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))\nh3 : Submonoid.powers r ≤ Submonoid.comap (Scheme.Γ.map f.op) (Submonoid.powers (↑(Scheme.Γ.map f.op) r))\n⊢ comp (NatTrans.app f.val.c (Opposite.op (Scheme.basicOpen Y r)) ≫ X.presheaf.map (eqToHom h1).op)\n      (algebraMap ↑(Y.presheaf.obj (Opposite.op ⊤)) ↑(Y.presheaf.obj (Opposite.op (Scheme.basicOpen Y r)))) =\n    comp\n      (IsLocalization.map (↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r)))))\n        (Scheme.Γ.map f.op) h3)\n      (algebraMap ↑(Y.presheaf.obj (Opposite.op ⊤)) ↑(Y.presheaf.obj (Opposite.op (Scheme.basicOpen Y r))))\n[PROOFSTEP]\nhaveI i1 :=\n  @isLocalization_away_of_isAffine X _\n    (Scheme.Γ.map f.op r)\n      -- Porting note : needs to be very explicit here\n[GOAL]\ncase e_a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nh1 : Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r) = (Opens.map f.val.base).obj (Scheme.basicOpen Y r)\nh2 :\n  IsLocalization.Away (↑(Scheme.Γ.map f.op) r)\n    ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))\nh3 : Submonoid.powers r ≤ Submonoid.comap (Scheme.Γ.map f.op) (Submonoid.powers (↑(Scheme.Γ.map f.op) r))\ni1 :\n  IsLocalization.Away (↑(Scheme.Γ.map f.op) r)\n    ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))\n⊢ comp (NatTrans.app f.val.c (Opposite.op (Scheme.basicOpen Y r)) ≫ X.presheaf.map (eqToHom h1).op)\n      (algebraMap ↑(Y.presheaf.obj (Opposite.op ⊤)) ↑(Y.presheaf.obj (Opposite.op (Scheme.basicOpen Y r)))) =\n    comp\n      (IsLocalization.map (↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r)))))\n        (Scheme.Γ.map f.op) h3)\n      (algebraMap ↑(Y.presheaf.obj (Opposite.op ⊤)) ↑(Y.presheaf.obj (Opposite.op (Scheme.basicOpen Y r))))\n[PROOFSTEP]\nconvert\n  (@IsLocalization.map_comp (hy := h3) (Y.presheaf.obj <| Opposite.op (Scheme.basicOpen Y r)) _ _\n      (isLocalization_away_of_isAffine _) _ _ _ i1).symm using\n  1\n[GOAL]\ncase h.e'_2.h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nh1 : Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r) = (Opens.map f.val.base).obj (Scheme.basicOpen Y r)\nh2 :\n  IsLocalization.Away (↑(Scheme.Γ.map f.op) r)\n    ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))\nh3 : Submonoid.powers r ≤ Submonoid.comap (Scheme.Γ.map f.op) (Submonoid.powers (↑(Scheme.Γ.map f.op) r))\ni1 :\n  IsLocalization.Away (↑(Scheme.Γ.map f.op) r)\n    ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))\ne_1✝ :\n  (↑(Y.presheaf.obj (Opposite.op ⊤)) →+*\n      ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r))))) =\n    (↑(Y.presheaf.obj (Opposite.op ⊤)) →+*\n      ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r)))))\n⊢ comp (NatTrans.app f.val.c (Opposite.op (Scheme.basicOpen Y r)) ≫ X.presheaf.map (eqToHom h1).op)\n      (algebraMap ↑(Y.presheaf.obj (Opposite.op ⊤)) ↑(Y.presheaf.obj (Opposite.op (Scheme.basicOpen Y r)))) =\n    comp\n      (algebraMap ((fun x => ↑(X.presheaf.obj (Opposite.op ⊤))) r)\n        ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r)))))\n      (Scheme.Γ.map f.op)\n[PROOFSTEP]\nchange Y.presheaf.map _ ≫ _ = _ ≫ X.presheaf.map _\n[GOAL]\ncase h.e'_2.h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nh1 : Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r) = (Opens.map f.val.base).obj (Scheme.basicOpen Y r)\nh2 :\n  IsLocalization.Away (↑(Scheme.Γ.map f.op) r)\n    ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))\nh3 : Submonoid.powers r ≤ Submonoid.comap (Scheme.Γ.map f.op) (Submonoid.powers (↑(Scheme.Γ.map f.op) r))\ni1 :\n  IsLocalization.Away (↑(Scheme.Γ.map f.op) r)\n    ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))\ne_1✝ :\n  (↑(Y.presheaf.obj (Opposite.op ⊤)) →+*\n      ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r))))) =\n    (↑(Y.presheaf.obj (Opposite.op ⊤)) →+*\n      ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r)))))\n⊢ Y.presheaf.map (homOfLE (_ : RingedSpace.basicOpen Y.toSheafedSpace r ≤ ⊤)).op ≫\n      NatTrans.app f.val.c (Opposite.op (Scheme.basicOpen Y r)) ≫ X.presheaf.map (eqToHom h1).op =\n    Scheme.Γ.map f.op ≫\n      X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace (↑(Scheme.Γ.map f.op) r) ≤ ⊤)).op\n[PROOFSTEP]\nrw [f.val.c.naturality_assoc]\n[GOAL]\ncase h.e'_2.h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nh1 : Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r) = (Opens.map f.val.base).obj (Scheme.basicOpen Y r)\nh2 :\n  IsLocalization.Away (↑(Scheme.Γ.map f.op) r)\n    ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))\nh3 : Submonoid.powers r ≤ Submonoid.comap (Scheme.Γ.map f.op) (Submonoid.powers (↑(Scheme.Γ.map f.op) r))\ni1 :\n  IsLocalization.Away (↑(Scheme.Γ.map f.op) r)\n    ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))\ne_1✝ :\n  (↑(Y.presheaf.obj (Opposite.op ⊤)) →+*\n      ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r))))) =\n    (↑(Y.presheaf.obj (Opposite.op ⊤)) →+*\n      ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r)))))\n⊢ NatTrans.app f.val.c (Opposite.op ⊤) ≫\n      (f.val.base _* X.presheaf).map (homOfLE (_ : RingedSpace.basicOpen Y.toSheafedSpace r ≤ ⊤)).op ≫\n        X.presheaf.map (eqToHom h1).op =\n    Scheme.Γ.map f.op ≫\n      X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace (↑(Scheme.Γ.map f.op) r) ≤ ⊤)).op\n[PROOFSTEP]\nerw [← X.presheaf.map_comp]\n[GOAL]\ncase h.e'_2.h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nh1 : Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r) = (Opens.map f.val.base).obj (Scheme.basicOpen Y r)\nh2 :\n  IsLocalization.Away (↑(Scheme.Γ.map f.op) r)\n    ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))\nh3 : Submonoid.powers r ≤ Submonoid.comap (Scheme.Γ.map f.op) (Submonoid.powers (↑(Scheme.Γ.map f.op) r))\ni1 :\n  IsLocalization.Away (↑(Scheme.Γ.map f.op) r)\n    ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))\ne_1✝ :\n  (↑(Y.presheaf.obj (Opposite.op ⊤)) →+*\n      ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r))))) =\n    (↑(Y.presheaf.obj (Opposite.op ⊤)) →+*\n      ↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r)))))\n⊢ NatTrans.app f.val.c (Opposite.op ⊤) ≫\n      X.presheaf.map\n        ((Opens.map f.val.base).op.map (homOfLE (_ : RingedSpace.basicOpen Y.toSheafedSpace r ≤ ⊤)).op ≫\n          (eqToHom h1).op) =\n    Scheme.Γ.map f.op ≫\n      X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace (↑(Scheme.Γ.map f.op) r) ≤ ⊤)).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\n⊢ P (Scheme.Γ.map (f ∣_ Scheme.basicOpen Y r).op) ↔ P (Localization.awayMap (Scheme.Γ.map f.op) r)\n[PROOFSTEP]\nrefine\n  (hP.basicOpen_iff _ _).trans\n    ?_\n      -- Porting note : was a one line term mode proof, but this `dsimp` is vital so the term mode\n        -- one liner is not possible\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\n⊢ P\n      (IsLocalization.Away.map (↑(Y.presheaf.obj (Opposite.op (Scheme.basicOpen Y r))))\n        (↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r))))) (Scheme.Γ.map f.op) r) ↔\n    P (Localization.awayMap (Scheme.Γ.map f.op) r)\n[PROOFSTEP]\ndsimp\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝¹ : IsAffine X\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\n⊢ P\n      (IsLocalization.Away.map (↑(Y.presheaf.obj (Opposite.op (Scheme.basicOpen Y r))))\n        (↑(X.presheaf.obj (Opposite.op (Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r)))))\n        (NatTrans.app f.val.c (Opposite.op ⊤)) r) ↔\n    P (Localization.awayMap (NatTrans.app f.val.c (Opposite.op ⊤)) r)\n[PROOFSTEP]\nrw [← hP.is_localization_away_iff]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nV :\n  Opens\n    ↑↑(Scheme.restrict X\n                (_ :\n                  OpenEmbedding\n                    ↑(Opens.inclusion\n                        ((Opens.map f.val.base).obj\n                          (Scheme.basicOpen Y r))))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\ne :\n  V =\n    (Opens.map\n          (Scheme.ofRestrict X\n                (_ :\n                  OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n      U\n⊢ P\n      (Scheme.Γ.map\n        (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n            f ∣_ Scheme.basicOpen Y r).op) ↔\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n[PROOFSTEP]\nsubst e\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ P\n      (Scheme.Γ.map\n        (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U))) ≫\n            f ∣_ Scheme.basicOpen Y r).op) ↔\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n[PROOFSTEP]\nletI a1 :\n  Algebra (Scheme.Γ.obj (Opposite.op Y)) (Scheme.Γ.obj (Opposite.op (Y.restrict (Y.basicOpen r).openEmbedding))) :=\n  ΓRestrictAlgebra _\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\n⊢ P\n      (Scheme.Γ.map\n        (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U))) ≫\n            f ∣_ Scheme.basicOpen Y r).op) ↔\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n[PROOFSTEP]\nlet U' :=\n  ((Opens.map (X.ofRestrict ((Opens.map f.val.base).obj (Y.basicOpen r)).openEmbedding).val.base).obj U).openEmbedding\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\n⊢ P\n      (Scheme.Γ.map\n        (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U))) ≫\n            f ∣_ Scheme.basicOpen Y r).op) ↔\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n[PROOFSTEP]\nletI a2 :\n  Algebra (Scheme.Γ.obj (Opposite.op (X.restrict U.openEmbedding)))\n    (Scheme.Γ.obj <|\n      Opposite.op <| (X.restrict ((Opens.map f.val.base).obj (Y.basicOpen r)).openEmbedding).restrict U') :=\n  by\n  apply RingHom.toAlgebra\n  refine X.presheaf.map (@homOfLE _ _ ((IsOpenMap.functor _).obj _) ((IsOpenMap.functor _).obj _) ?_).op\n  rw [← SetLike.coe_subset_coe, Functor.op_obj]\n  dsimp [Opens.inclusion]\n  simp only [Set.image_univ, Set.image_subset_iff, Subtype.range_val]\n  rw [ContinuousMap.coe_mk, Subtype.range_val, ContinuousMap.coe_mk, ContinuousMap.coe_mk, Subtype.range_val]\n  rfl\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\n⊢ Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\n[PROOFSTEP]\napply RingHom.toAlgebra\n[GOAL]\ncase i\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\n⊢ ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))))) →+*\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\n[PROOFSTEP]\nrefine X.presheaf.map (@homOfLE _ _ ((IsOpenMap.functor _).obj _) ((IsOpenMap.functor _).obj _) ?_).op\n[GOAL]\ncase i\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n      ((IsOpenMap.functor\n                (_ :\n                  IsOpenMap\n                    ↑(Opens.inclusion\n                        ((Opens.map\n                              (Scheme.ofRestrict X\n                                    (_ :\n                                      OpenEmbedding\n                                        ↑(Opens.inclusion\n                                            ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                          U)))).op.obj\n          (Opposite.op ⊤)).unop ≤\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop\n[PROOFSTEP]\nrw [← SetLike.coe_subset_coe, Functor.op_obj]\n[GOAL]\ncase i\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\n⊢ ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n        (Opposite.op\n            ((IsOpenMap.functor\n                  (_ :\n                    IsOpenMap\n                      ↑(Opens.inclusion\n                          ((Opens.map\n                                (Scheme.ofRestrict X\n                                      (_ :\n                                        OpenEmbedding\n                                          ↑(Opens.inclusion\n                                              ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                            U)))).obj\n              (Opposite.op ⊤).unop)).unop) ⊆\n    ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)\n[PROOFSTEP]\ndsimp [Opens.inclusion]\n[GOAL]\ncase i\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\n⊢ ↑(ContinuousMap.mk Subtype.val) '' (↑(ContinuousMap.mk Subtype.val) '' Set.univ) ⊆\n    ↑(ContinuousMap.mk Subtype.val) '' Set.univ\n[PROOFSTEP]\nsimp only [Set.image_univ, Set.image_subset_iff, Subtype.range_val]\n[GOAL]\ncase i\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\n⊢ Set.range ↑(ContinuousMap.mk Subtype.val) ⊆\n    ↑(ContinuousMap.mk Subtype.val) ⁻¹' Set.range ↑(ContinuousMap.mk Subtype.val)\n[PROOFSTEP]\nrw [ContinuousMap.coe_mk, Subtype.range_val, ContinuousMap.coe_mk, ContinuousMap.coe_mk, Subtype.range_val]\n[GOAL]\ncase i\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\n⊢ ↑((Opens.map (ContinuousMap.mk Subtype.val)).obj U) ⊆ Subtype.val ⁻¹' ↑U\n[PROOFSTEP]\nrfl\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\n⊢ P\n      (Scheme.Γ.map\n        (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U))) ≫\n            f ∣_ Scheme.basicOpen Y r).op) ↔\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n[PROOFSTEP]\nhave i1 := AlgebraicGeometry.Γ_restrict_isLocalization Y r\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\n⊢ P\n      (Scheme.Γ.map\n        (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U))) ≫\n            f ∣_ Scheme.basicOpen Y r).op) ↔\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n[PROOFSTEP]\nhave i2 :\n  IsLocalization.Away ((Scheme.Γ.map (X.ofRestrict U.openEmbedding ≫ f).op) r)\n    (Scheme.Γ.obj <|\n      Opposite.op <| (X.restrict ((Opens.map f.val.base).obj (Y.basicOpen r)).openEmbedding).restrict U') :=\n  by\n  rw [← U.openEmbedding_obj_top] at hU \n  dsimp [Scheme.Γ_obj_op, Scheme.Γ_map_op, Scheme.restrict]\n  apply AlgebraicGeometry.isLocalization_of_eq_basicOpen _ hU\n  rw [Opens.openEmbedding_obj_top, Opens.functor_obj_map_obj]\n  convert (X.basicOpen_res (Scheme.Γ.map f.op r) (homOfLE le_top).op).symm using 1\n  rw [Opens.openEmbedding_obj_top, Opens.openEmbedding_obj_top, inf_comm, Scheme.Γ_map_op]\n    -- Porting note : changed `rw` to `erw`\n  erw [← Scheme.preimage_basicOpen]\n    -- Porting note : have to add many explicit variables\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\n⊢ IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\n[PROOFSTEP]\nrw [← U.openEmbedding_obj_top] at hU \n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\n⊢ IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\n[PROOFSTEP]\ndsimp [Scheme.Γ_obj_op, Scheme.Γ_map_op, Scheme.restrict]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\n⊢ IsLocalization.Away\n    (↑(NatTrans.app f.val.c (Opposite.op ⊤) ≫\n          X.presheaf.map\n            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit\n                ((Opens.map f.val.base).obj ⊤)).op)\n      r)\n    ↑(X.presheaf.obj\n        (Opposite.op\n          ((IsOpenMap.functor\n                (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n            ((IsOpenMap.functor\n                  (_ :\n                    IsOpenMap\n                      ↑(Opens.inclusion\n                          ((Opens.map (Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).obj\n                            U)))).obj\n              ⊤))))\n[PROOFSTEP]\napply AlgebraicGeometry.isLocalization_of_eq_basicOpen _ hU\n[GOAL]\ncase e\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n      ((IsOpenMap.functor\n            (_ :\n              IsOpenMap\n                ↑(Opens.inclusion\n                    ((Opens.map (Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).obj U)))).obj\n        ⊤) =\n    Scheme.basicOpen X\n      (↑(NatTrans.app f.val.c (Opposite.op ⊤) ≫\n            X.presheaf.map\n              (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit\n                  ((Opens.map f.val.base).obj ⊤)).op)\n        r)\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top, Opens.functor_obj_map_obj]\n[GOAL]\ncase e\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj ⊤ ⊓ U =\n    Scheme.basicOpen X\n      (↑(NatTrans.app f.val.c (Opposite.op ⊤) ≫\n            X.presheaf.map\n              (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit\n                  ((Opens.map f.val.base).obj ⊤)).op)\n        r)\n[PROOFSTEP]\nconvert (X.basicOpen_res (Scheme.Γ.map f.op r) (homOfLE le_top).op).symm using 1\n[GOAL]\ncase h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj ⊤ ⊓ U =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ ⊓ Scheme.basicOpen X (↑(Scheme.Γ.map f.op) r)\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top, Opens.openEmbedding_obj_top, inf_comm, Scheme.Γ_map_op]\n  -- Porting note : changed `rw` to `erw`\n[GOAL]\ncase h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\n⊢ U ⊓ (Opens.map f.val.base).obj (Scheme.basicOpen Y r) =\n    U ⊓ Scheme.basicOpen X (↑(NatTrans.app f.val.c (Opposite.op ⊤)) r)\n[PROOFSTEP]\nerw [← Scheme.preimage_basicOpen]\n  -- Porting note : have to add many explicit variables\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\n⊢ P\n      (Scheme.Γ.map\n        (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U))) ≫\n            f ∣_ Scheme.basicOpen Y r).op) ↔\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n[PROOFSTEP]\nhave :=\n  @RespectsIso.is_localization_away_iff (hP := hP) (R := Scheme.Γ.obj <| Opposite.op Y) (S :=\n    Scheme.Γ.obj (Opposite.op (X.restrict U.openEmbedding))) (R' :=\n    Scheme.Γ.obj (Opposite.op (Y.restrict (Y.basicOpen r).openEmbedding))) (S' :=\n    Scheme.Γ.obj <| Opposite.op <| (X.restrict ((Opens.map f.val.base).obj (Y.basicOpen r)).openEmbedding).restrict U')\n    _ _ _ _ _ _ (Scheme.Γ.map (X.ofRestrict U.openEmbedding ≫ f).op) r\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\nthis :\n  ∀\n    [inst :\n      IsLocalization.Away r\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))]\n    [inst_1 :\n      IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U')))],\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r) ↔\n      P\n        (IsLocalization.Away.map\n          (↑(Scheme.Γ.obj\n              (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n          (↑(Scheme.Γ.obj\n              (Opposite.op\n                (Scheme.restrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  U'))))\n          (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n⊢ P\n      (Scheme.Γ.map\n        (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U))) ≫\n            f ∣_ Scheme.basicOpen Y r).op) ↔\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n[PROOFSTEP]\nrw [this, iff_iff_eq]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\nthis :\n  ∀\n    [inst :\n      IsLocalization.Away r\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))]\n    [inst_1 :\n      IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U')))],\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r) ↔\n      P\n        (IsLocalization.Away.map\n          (↑(Scheme.Γ.obj\n              (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n          (↑(Scheme.Γ.obj\n              (Opposite.op\n                (Scheme.restrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  U'))))\n          (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n⊢ P\n      (Scheme.Γ.map\n        (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U))) ≫\n            f ∣_ Scheme.basicOpen Y r).op) =\n    P\n      (IsLocalization.Away.map\n        (↑(Scheme.Γ.obj\n            (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n        (↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U'))))\n        (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\nthis :\n  ∀\n    [inst :\n      IsLocalization.Away r\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))]\n    [inst_1 :\n      IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U')))],\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r) ↔\n      P\n        (IsLocalization.Away.map\n          (↑(Scheme.Γ.obj\n              (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n          (↑(Scheme.Γ.obj\n              (Opposite.op\n                (Scheme.restrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  U'))))\n          (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n⊢ Scheme.Γ.map\n      (Scheme.ofRestrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            (_ :\n              OpenEmbedding\n                ↑(Opens.inclusion\n                    ((Opens.map\n                          (Scheme.ofRestrict X\n                                (_ :\n                                  OpenEmbedding\n                                    ↑(Opens.inclusion\n                                        ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                      U))) ≫\n          f ∣_ Scheme.basicOpen Y r).op =\n    IsLocalization.Away.map\n      (↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n      (↑(Scheme.Γ.obj\n          (Opposite.op\n            (Scheme.restrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              U'))))\n      (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r\n[PROOFSTEP]\napply IsLocalization.ringHom_ext (R := Scheme.Γ.obj (Opposite.op Y)) (Submonoid.powers r) _\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\nthis :\n  ∀\n    [inst :\n      IsLocalization.Away r\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))]\n    [inst_1 :\n      IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U')))],\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r) ↔\n      P\n        (IsLocalization.Away.map\n          (↑(Scheme.Γ.obj\n              (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n          (↑(Scheme.Γ.obj\n              (Opposite.op\n                (Scheme.restrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  U'))))\n          (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n⊢ comp\n      (Scheme.Γ.map\n        (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U))) ≫\n            f ∣_ Scheme.basicOpen Y r).op)\n      (algebraMap ↑(Scheme.Γ.obj (Opposite.op Y))\n        ↑(Scheme.Γ.obj\n            (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))) =\n    comp\n      (IsLocalization.Away.map\n        (↑(Scheme.Γ.obj\n            (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n        (↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U'))))\n        (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n      (algebraMap ↑(Scheme.Γ.obj (Opposite.op Y))\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n[PROOFSTEP]\nrw [IsLocalization.Away.map, IsLocalization.map_comp, RingHom.algebraMap_toAlgebra]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\nthis :\n  ∀\n    [inst :\n      IsLocalization.Away r\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))]\n    [inst_1 :\n      IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U')))],\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r) ↔\n      P\n        (IsLocalization.Away.map\n          (↑(Scheme.Γ.obj\n              (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n          (↑(Scheme.Γ.obj\n              (Opposite.op\n                (Scheme.restrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  U'))))\n          (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n⊢ comp\n      (Scheme.Γ.map\n        (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U))) ≫\n            f ∣_ Scheme.basicOpen Y r).op)\n      (Scheme.Γ.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))).op) =\n    comp\n      (algebraMap ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                (_ :\n                  OpenEmbedding\n                    ↑(Opens.inclusion\n                        ((Opens.map\n                              (Scheme.ofRestrict X\n                                    (_ :\n                                      OpenEmbedding\n                                        ↑(Opens.inclusion\n                                            ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                          U)))))))\n      (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op)\n[PROOFSTEP]\nrw [op_comp, op_comp, Functor.map_comp, Functor.map_comp]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\nthis :\n  ∀\n    [inst :\n      IsLocalization.Away r\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))]\n    [inst_1 :\n      IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U')))],\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r) ↔\n      P\n        (IsLocalization.Away.map\n          (↑(Scheme.Γ.obj\n              (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n          (↑(Scheme.Γ.obj\n              (Opposite.op\n                (Scheme.restrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  U'))))\n          (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n⊢ comp\n      (Scheme.Γ.map (f ∣_ Scheme.basicOpen Y r).op ≫\n        Scheme.Γ.map\n          (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U)))).op)\n      (Scheme.Γ.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))).op) =\n    comp\n      (algebraMap ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                (_ :\n                  OpenEmbedding\n                    ↑(Opens.inclusion\n                        ((Opens.map\n                              (Scheme.ofRestrict X\n                                    (_ :\n                                      OpenEmbedding\n                                        ↑(Opens.inclusion\n                                            ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                          U)))))))\n      (Scheme.Γ.map f.op ≫ Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).op)\n[PROOFSTEP]\nchange _ = comp (X.presheaf.map _) _\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\nthis :\n  ∀\n    [inst :\n      IsLocalization.Away r\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))]\n    [inst_1 :\n      IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U')))],\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r) ↔\n      P\n        (IsLocalization.Away.map\n          (↑(Scheme.Γ.obj\n              (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n          (↑(Scheme.Γ.obj\n              (Opposite.op\n                (Scheme.restrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  U'))))\n          (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n⊢ comp\n      (Scheme.Γ.map (f ∣_ Scheme.basicOpen Y r).op ≫\n        Scheme.Γ.map\n          (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U)))).op)\n      (Scheme.Γ.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))).op) =\n    comp\n      (X.presheaf.map\n        (homOfLE\n            (_ :\n              (IsOpenMap.functor\n                      (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                  ((IsOpenMap.functor\n                            (_ :\n                              IsOpenMap\n                                ↑(Opens.inclusion\n                                    ((Opens.map\n                                          (Scheme.ofRestrict X\n                                                (_ :\n                                                  OpenEmbedding\n                                                    ↑(Opens.inclusion\n                                                        ((Opens.map f.val.base).obj\n                                                          (Scheme.basicOpen Y r))))).val.base).obj\n                                      U)))).op.obj\n                      (Opposite.op ⊤)).unop ≤\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\n      (Scheme.Γ.map f.op ≫ Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).op)\n[PROOFSTEP]\nrefine' (@Category.assoc CommRingCat _ _ _ _ _ _ _ _).symm.trans _\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\nthis :\n  ∀\n    [inst :\n      IsLocalization.Away r\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))]\n    [inst_1 :\n      IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U')))],\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r) ↔\n      P\n        (IsLocalization.Away.map\n          (↑(Scheme.Γ.obj\n              (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n          (↑(Scheme.Γ.obj\n              (Opposite.op\n                (Scheme.restrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  U'))))\n          (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n⊢ (Scheme.Γ.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))).op ≫\n        Scheme.Γ.map (f ∣_ Scheme.basicOpen Y r).op) ≫\n      Scheme.Γ.map\n        (Scheme.ofRestrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            (_ :\n              OpenEmbedding\n                ↑(Opens.inclusion\n                    ((Opens.map\n                          (Scheme.ofRestrict X\n                                (_ :\n                                  OpenEmbedding\n                                    ↑(Opens.inclusion\n                                        ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                      U)))).op =\n    comp\n      (X.presheaf.map\n        (homOfLE\n            (_ :\n              (IsOpenMap.functor\n                      (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                  ((IsOpenMap.functor\n                            (_ :\n                              IsOpenMap\n                                ↑(Opens.inclusion\n                                    ((Opens.map\n                                          (Scheme.ofRestrict X\n                                                (_ :\n                                                  OpenEmbedding\n                                                    ↑(Opens.inclusion\n                                                        ((Opens.map f.val.base).obj\n                                                          (Scheme.basicOpen Y r))))).val.base).obj\n                                      U)))).op.obj\n                      (Opposite.op ⊤)).unop ≤\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\n      (Scheme.Γ.map f.op ≫ Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).op)\n[PROOFSTEP]\nrefine' Eq.trans _ (@Category.assoc CommRingCat _ _ _ _ _ _ _ _)\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\nthis :\n  ∀\n    [inst :\n      IsLocalization.Away r\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))]\n    [inst_1 :\n      IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U')))],\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r) ↔\n      P\n        (IsLocalization.Away.map\n          (↑(Scheme.Γ.obj\n              (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n          (↑(Scheme.Γ.obj\n              (Opposite.op\n                (Scheme.restrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  U'))))\n          (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n⊢ (Scheme.Γ.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))).op ≫\n        Scheme.Γ.map (f ∣_ Scheme.basicOpen Y r).op) ≫\n      Scheme.Γ.map\n        (Scheme.ofRestrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            (_ :\n              OpenEmbedding\n                ↑(Opens.inclusion\n                    ((Opens.map\n                          (Scheme.ofRestrict X\n                                (_ :\n                                  OpenEmbedding\n                                    ↑(Opens.inclusion\n                                        ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                      U)))).op =\n    (Scheme.Γ.map f.op ≫ Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).op) ≫\n      X.presheaf.map\n        (homOfLE\n            (_ :\n              (IsOpenMap.functor\n                      (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                  ((IsOpenMap.functor\n                            (_ :\n                              IsOpenMap\n                                ↑(Opens.inclusion\n                                    ((Opens.map\n                                          (Scheme.ofRestrict X\n                                                (_ :\n                                                  OpenEmbedding\n                                                    ↑(Opens.inclusion\n                                                        ((Opens.map f.val.base).obj\n                                                          (Scheme.basicOpen Y r))))).val.base).obj\n                                      U)))).op.obj\n                      (Opposite.op ⊤)).unop ≤\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op\n[PROOFSTEP]\ndsimp only [Scheme.Γ_map, Quiver.Hom.unop_op]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\nthis :\n  ∀\n    [inst :\n      IsLocalization.Away r\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))]\n    [inst_1 :\n      IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U')))],\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r) ↔\n      P\n        (IsLocalization.Away.map\n          (↑(Scheme.Γ.obj\n              (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n          (↑(Scheme.Γ.obj\n              (Opposite.op\n                (Scheme.restrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  U'))))\n          (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n⊢ (NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))).val.c\n          (Opposite.op ⊤) ≫\n        NatTrans.app (f ∣_ Scheme.basicOpen Y r).val.c (Opposite.op ⊤)) ≫\n      NatTrans.app\n        (Scheme.ofRestrict\n              (Scheme.restrict X\n                (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                        U)))).val.c\n        (Opposite.op ⊤) =\n    (NatTrans.app f.val.c (Opposite.op ⊤) ≫\n        NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (Opposite.op ⊤)) ≫\n      X.presheaf.map\n        (homOfLE\n            (_ :\n              (IsOpenMap.functor\n                      (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                  ((IsOpenMap.functor\n                            (_ :\n                              IsOpenMap\n                                ↑(Opens.inclusion\n                                    ((Opens.map\n                                          (Scheme.ofRestrict X\n                                                (_ :\n                                                  OpenEmbedding\n                                                    ↑(Opens.inclusion\n                                                        ((Opens.map f.val.base).obj\n                                                          (Scheme.basicOpen Y r))))).val.base).obj\n                                      U)))).op.obj\n                      (Opposite.op ⊤)).unop ≤\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op\n[PROOFSTEP]\nrw [morphismRestrict_c_app, Category.assoc, Category.assoc, Category.assoc]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\nthis :\n  ∀\n    [inst :\n      IsLocalization.Away r\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))]\n    [inst_1 :\n      IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U')))],\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r) ↔\n      P\n        (IsLocalization.Away.map\n          (↑(Scheme.Γ.obj\n              (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n          (↑(Scheme.Γ.obj\n              (Opposite.op\n                (Scheme.restrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  U'))))\n          (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n⊢ NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))).val.c\n        (Opposite.op ⊤) ≫\n      NatTrans.app f.val.c\n          (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen Y r)))).obj ⊤)) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor\n                          (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                      ((Opens.map (f ∣_ Scheme.basicOpen Y r).val.base).obj ⊤) =\n                    (Opens.map f.val.base).obj\n                      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen Y r)))).obj ⊤))).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  (_ :\n                    OpenEmbedding\n                      ↑(Opens.inclusion\n                          ((Opens.map\n                                (Scheme.ofRestrict X\n                                      (_ :\n                                        OpenEmbedding\n                                          ↑(Opens.inclusion\n                                              ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                            U)))).val.c\n            (Opposite.op ⊤) =\n    NatTrans.app f.val.c (Opposite.op ⊤) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (Opposite.op ⊤) ≫\n        X.presheaf.map\n          (homOfLE\n              (_ :\n                (IsOpenMap.functor\n                        (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                    ((IsOpenMap.functor\n                              (_ :\n                                IsOpenMap\n                                  ↑(Opens.inclusion\n                                      ((Opens.map\n                                            (Scheme.ofRestrict X\n                                                  (_ :\n                                                    OpenEmbedding\n                                                      ↑(Opens.inclusion\n                                                          ((Opens.map f.val.base).obj\n                                                            (Scheme.basicOpen Y r))))).val.base).obj\n                                        U)))).op.obj\n                        (Opposite.op ⊤)).unop ≤\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op\n[PROOFSTEP]\nerw [f.1.c.naturality_assoc, ← X.presheaf.map_comp, ← X.presheaf.map_comp, ← X.presheaf.map_comp]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (Opposite.op ⊤))\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\na1 : Algebra ↑(Scheme.Γ.obj (Opposite.op Y))\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))) :=\n  ΓRestrictAlgebra (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))\nU' : OpenEmbedding\n  ↑(Opens.inclusion\n      ((Opens.map\n            (Scheme.ofRestrict X\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n        U)) :=\n  Opens.openEmbedding\n    ((Opens.map\n          (Scheme.ofRestrict X (Opens.openEmbedding ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))).val.base).obj\n      U)\na2 : Algebra ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))))\n  ↑(Scheme.Γ.obj\n      (Opposite.op\n        (Scheme.restrict\n          (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n          U'))) :=\n  toAlgebra\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                ((IsOpenMap.functor\n                          (_ :\n                            IsOpenMap\n                              ↑(Opens.inclusion\n                                  ((Opens.map\n                                        (Scheme.ofRestrict X\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      ((Opens.map f.val.base).obj\n                                                        (Scheme.basicOpen Y r))))).val.base).obj\n                                    U)))).op.obj\n                    (Opposite.op ⊤)).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\ni1 :\n  IsLocalization.Away r\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))\ni2 :\n  IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n    ↑(Scheme.Γ.obj\n        (Opposite.op\n          (Scheme.restrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            U')))\nthis :\n  ∀\n    [inst :\n      IsLocalization.Away r\n        ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r))))))]\n    [inst_1 :\n      IsLocalization.Away (↑(Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n        ↑(Scheme.Γ.obj\n            (Opposite.op\n              (Scheme.restrict\n                (Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                U')))],\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r) ↔\n      P\n        (IsLocalization.Away.map\n          (↑(Scheme.Γ.obj\n              (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen Y r)))))))\n          (↑(Scheme.Γ.obj\n              (Opposite.op\n                (Scheme.restrict\n                  (Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n                  U'))))\n          (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) ≫ f).op) r)\n⊢ NatTrans.app f.val.c (Opposite.op ⊤) ≫\n      X.presheaf.map\n        ((Opens.map f.val.base).op.map\n            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen Y r)))).counit\n                (Opposite.op ⊤).unop).op ≫\n          (eqToHom\n                (_ :\n                  (IsOpenMap.functor\n                          (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                      ((Opens.map (f ∣_ Scheme.basicOpen Y r).val.base).obj ⊤) =\n                    (Opens.map f.val.base).obj\n                      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen Y r)))).obj ⊤))).op ≫\n            (IsOpenMap.functor\n                    (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).op.map\n              (NatTrans.app\n                  (IsOpenMap.adjunction\n                      (_ :\n                        IsOpenMap\n                          ↑(Opens.inclusion\n                              ((Opens.map\n                                    (Scheme.ofRestrict X\n                                          (_ :\n                                            OpenEmbedding\n                                              ↑(Opens.inclusion\n                                                  ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).val.base).obj\n                                U)))).counit\n                  (Opposite.op ⊤).unop).op) =\n    NatTrans.app f.val.c (Opposite.op ⊤) ≫\n      X.presheaf.map\n        ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit (Opposite.op ⊤).unop).op ≫\n          (homOfLE\n              (_ :\n                (IsOpenMap.functor\n                        (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))).obj\n                    ((IsOpenMap.functor\n                              (_ :\n                                IsOpenMap\n                                  ↑(Opens.inclusion\n                                      ((Opens.map\n                                            (Scheme.ofRestrict X\n                                                  (_ :\n                                                    OpenEmbedding\n                                                      ↑(Opens.inclusion\n                                                          ((Opens.map f.val.base).obj\n                                                            (Scheme.basicOpen Y r))))).val.base).obj\n                                        U)))).op.obj\n                        (Opposite.op ⊤)).unop ≤\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj (Opposite.op ⊤).unop)).op)\n[PROOFSTEP]\ncongr 1\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nX Y S : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Y\ninst✝ : IsAffine S\nf : X ⟶ S\ng : Y ⟶ S\nH : P (Scheme.Γ.map g.op)\n⊢ P (Scheme.Γ.map pullback.fst.op)\n[PROOFSTEP]\nerw [← PreservesPullback.iso_inv_fst AffineScheme.forgetToScheme (AffineScheme.ofHom f) (AffineScheme.ofHom g)]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nX Y S : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Y\ninst✝ : IsAffine S\nf : X ⟶ S\ng : Y ⟶ S\nH : P (Scheme.Γ.map g.op)\n⊢ P\n    (Scheme.Γ.map\n      ((PreservesPullback.iso AffineScheme.forgetToScheme (AffineScheme.ofHom f) (AffineScheme.ofHom g)).inv ≫\n          AffineScheme.forgetToScheme.map pullback.fst).op)\n[PROOFSTEP]\nrw [op_comp, Functor.map_comp, hP'.cancel_right_isIso, AffineScheme.forgetToScheme_map]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nX Y S : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Y\ninst✝ : IsAffine S\nf : X ⟶ S\ng : Y ⟶ S\nH : P (Scheme.Γ.map g.op)\n⊢ P (Scheme.Γ.map pullback.fst.op)\n[PROOFSTEP]\nhave :=\n  _root_.congr_arg Quiver.Hom.unop\n    (PreservesPullback.iso_hom_fst AffineScheme.Γ.rightOp (AffineScheme.ofHom f) (AffineScheme.ofHom g))\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nX Y S : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Y\ninst✝ : IsAffine S\nf : X ⟶ S\ng : Y ⟶ S\nH : P (Scheme.Γ.map g.op)\nthis :\n  ((PreservesPullback.iso AffineScheme.Γ.rightOp (AffineScheme.ofHom f) (AffineScheme.ofHom g)).hom ≫\n        pullback.fst).unop =\n    (AffineScheme.Γ.rightOp.map pullback.fst).unop\n⊢ P (Scheme.Γ.map pullback.fst.op)\n[PROOFSTEP]\nsimp only [Quiver.Hom.unop_op, Functor.rightOp_map, unop_comp] at this \n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nX Y S : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Y\ninst✝ : IsAffine S\nf : X ⟶ S\ng : Y ⟶ S\nH : P (Scheme.Γ.map g.op)\nthis :\n  pullback.fst.unop ≫\n      (PreservesPullback.iso AffineScheme.Γ.rightOp (AffineScheme.ofHom f) (AffineScheme.ofHom g)).hom.unop =\n    AffineScheme.Γ.map pullback.fst.op\n⊢ P (Scheme.Γ.map pullback.fst.op)\n[PROOFSTEP]\ndelta AffineScheme.Γ at this \n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nX Y S : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Y\ninst✝ : IsAffine S\nf : X ⟶ S\ng : Y ⟶ S\nH : P (Scheme.Γ.map g.op)\nthis :\n  pullback.fst.unop ≫\n      (PreservesPullback.iso (AffineScheme.forgetToScheme.op ⋙ Scheme.Γ).rightOp (AffineScheme.ofHom f)\n            (AffineScheme.ofHom g)).hom.unop =\n    (AffineScheme.forgetToScheme.op ⋙ Scheme.Γ).map pullback.fst.op\n⊢ P (Scheme.Γ.map pullback.fst.op)\n[PROOFSTEP]\nsimp only [Quiver.Hom.unop_op, Functor.comp_map, AffineScheme.forgetToScheme_map, Functor.op_map] at this \n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nX Y S : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Y\ninst✝ : IsAffine S\nf : X ⟶ S\ng : Y ⟶ S\nH : P (Scheme.Γ.map g.op)\nthis :\n  pullback.fst.unop ≫\n      (PreservesPullback.iso (AffineScheme.forgetToScheme.op ⋙ Scheme.Γ).rightOp (AffineScheme.ofHom f)\n            (AffineScheme.ofHom g)).hom.unop =\n    Scheme.Γ.map pullback.fst.op\n⊢ P (Scheme.Γ.map pullback.fst.op)\n[PROOFSTEP]\nrw [← this, hP'.cancel_right_isIso, ← pushoutIsoUnopPullback_inl_hom (Quiver.Hom.unop _) (Quiver.Hom.unop _),\n  hP'.cancel_right_isIso]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nX Y S : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Y\ninst✝ : IsAffine S\nf : X ⟶ S\ng : Y ⟶ S\nH : P (Scheme.Γ.map g.op)\nthis :\n  pullback.fst.unop ≫\n      (PreservesPullback.iso (AffineScheme.forgetToScheme.op ⋙ Scheme.Γ).rightOp (AffineScheme.ofHom f)\n            (AffineScheme.ofHom g)).hom.unop =\n    Scheme.Γ.map pullback.fst.op\n⊢ P pushout.inl\n[PROOFSTEP]\nexact hP.pushout_inl _ hP' _ _ H\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\n⊢ MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty (sourceAffineLocally P))\n[PROOFSTEP]\napply AffineTargetMorphismProperty.respectsIso_mk\n[GOAL]\ncase h₁\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\n⊢ ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z],\n    sourceAffineLocally P f → sourceAffineLocally P (e.hom ≫ f)\n[PROOFSTEP]\nintrov H U\n[GOAL]\ncase h₁\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ne : X ≅ Y\nf : Y ⟶ Z\ninst✝ : IsAffine Z\nH : sourceAffineLocally P f\nU : ↑(Scheme.affineOpens X)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ e.hom ≫ f).op)\n[PROOFSTEP]\nrw [← h₁.cancel_right_isIso _ (Scheme.Γ.map (Scheme.restrictMapIso e.inv U.1).hom.op), ← Functor.map_comp, ← op_comp]\n[GOAL]\ncase h₁\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ne : X ≅ Y\nf : Y ⟶ Z\ninst✝ : IsAffine Z\nH : sourceAffineLocally P f\nU : ↑(Scheme.affineOpens X)\n⊢ P\n    (Scheme.Γ.map\n      ((Scheme.restrictMapIso e.inv ↑U).hom ≫\n          Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ e.hom ≫ f).op)\n[PROOFSTEP]\nconvert H ⟨_, U.prop.map_isIso e.inv⟩ using 3\n  -- Porting note : have to add this instance manually\n[GOAL]\ncase h.e'_5.h.e'_8.h.e'_5\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ne : X ≅ Y\nf : Y ⟶ Z\ninst✝ : IsAffine Z\nH : sourceAffineLocally P f\nU : ↑(Scheme.affineOpens X)\n⊢ (Scheme.restrictMapIso e.inv ↑U).hom ≫ Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ e.hom ≫ f =\n    Scheme.ofRestrict Y\n        (_ :\n          OpenEmbedding\n            ↑(Opens.inclusion\n                ↑{ val := (Opens.map e.inv.val.base).obj ↑U,\n                    property := (_ : IsAffineOpen ((Opens.map e.inv.val.base).obj ↑U)) })) ≫\n      f\n[PROOFSTEP]\nhaveI i1 : IsOpenImmersion (Scheme.ofRestrict Y ((Opens.map e.inv.val.base).obj U.1).openEmbedding ≫ e.inv) :=\n  PresheafedSpace.IsOpenImmersion.comp _ _\n[GOAL]\ncase h.e'_5.h.e'_8.h.e'_5\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ne : X ≅ Y\nf : Y ⟶ Z\ninst✝ : IsAffine Z\nH : sourceAffineLocally P f\nU : ↑(Scheme.affineOpens X)\ni1 :\n  IsOpenImmersion\n    (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map e.inv.val.base).obj ↑U))) ≫ e.inv)\n⊢ (Scheme.restrictMapIso e.inv ↑U).hom ≫ Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ e.hom ≫ f =\n    Scheme.ofRestrict Y\n        (_ :\n          OpenEmbedding\n            ↑(Opens.inclusion\n                ↑{ val := (Opens.map e.inv.val.base).obj ↑U,\n                    property := (_ : IsAffineOpen ((Opens.map e.inv.val.base).obj ↑U)) })) ≫\n      f\n[PROOFSTEP]\nrw [IsOpenImmersion.isoOfRangeEq_hom, IsOpenImmersion.lift_fac_assoc, Category.assoc, e.inv_hom_id_assoc]\n[GOAL]\ncase h₂\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\n⊢ ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y],\n    sourceAffineLocally P f → sourceAffineLocally P (f ≫ e.hom)\n[PROOFSTEP]\nintrov H U\n[GOAL]\ncase h₂\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ne : Y ≅ Z\nf : X ⟶ Y\nh : IsAffine Y\nH : sourceAffineLocally P f\nU : ↑(Scheme.affineOpens X)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f ≫ e.hom).op)\n[PROOFSTEP]\nrw [← Category.assoc, op_comp, Functor.map_comp, h₁.cancel_left_isIso]\n[GOAL]\ncase h₂\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ne : Y ≅ Z\nf : X ⟶ Y\nh : IsAffine Y\nH : sourceAffineLocally P f\nU : ↑(Scheme.affineOpens X)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n[PROOFSTEP]\nexact H U\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\n⊢ affineLocally P f ↔\n    ∀ (U : ↑(Scheme.affineOpens Y)) (V : ↑(Scheme.affineOpens X)) (e : ↑V ≤ (Opens.map f.val.base).obj ↑U),\n      P (Scheme.Hom.appLe f e)\n[PROOFSTEP]\napply forall_congr'\n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\n⊢ ∀ (a : ↑(Scheme.affineOpens Y)),\n    sourceAffineLocally P (f ∣_ ↑a) ↔\n      ∀ (V : ↑(Scheme.affineOpens X)) (e : ↑V ≤ (Opens.map f.val.base).obj ↑a), P (Scheme.Hom.appLe f e)\n[PROOFSTEP]\nintro U\n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\n⊢ sourceAffineLocally P (f ∣_ ↑U) ↔\n    ∀ (V : ↑(Scheme.affineOpens X)) (e : ↑V ≤ (Opens.map f.val.base).obj ↑U), P (Scheme.Hom.appLe f e)\n[PROOFSTEP]\ndelta sourceAffineLocally\n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\n⊢ (∀\n      (U_1 :\n        ↑(Scheme.affineOpens\n            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n      P\n        (Scheme.Γ.map\n          (Scheme.ofRestrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1)) ≫\n              f ∣_ ↑U).op)) ↔\n    ∀ (V : ↑(Scheme.affineOpens X)) (e : ↑V ≤ (Opens.map f.val.base).obj ↑U), P (Scheme.Hom.appLe f e)\n[PROOFSTEP]\nsimp_rw [op_comp, Scheme.Γ.map_comp, Γ_map_morphismRestrict, Category.assoc, Scheme.Γ_map_op, hP.cancel_left_isIso]\n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\n⊢ (∀\n      (U_1 :\n        ↑(Scheme.affineOpens\n            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n      P\n        (NatTrans.app f.val.c (op ↑U) ≫\n          X.presheaf.map\n              (eqToHom\n                  (_ :\n                    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                      (Opens.map f.val.base).obj ↑U)).op ≫\n            NatTrans.app\n              (Scheme.ofRestrict\n                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                    (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n              (op ⊤))) ↔\n    ∀ (V : ↑(Scheme.affineOpens X)) (e : ↑V ≤ (Opens.map f.val.base).obj ↑U), P (Scheme.Hom.appLe f e)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\n⊢ (∀\n      (U_1 :\n        ↑(Scheme.affineOpens\n            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n      P\n        (NatTrans.app f.val.c (op ↑U) ≫\n          X.presheaf.map\n              (eqToHom\n                  (_ :\n                    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                      (Opens.map f.val.base).obj ↑U)).op ≫\n            NatTrans.app\n              (Scheme.ofRestrict\n                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                    (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n              (op ⊤))) →\n    ∀ (V : ↑(Scheme.affineOpens X)) (e : ↑V ≤ (Opens.map f.val.base).obj ↑U), P (Scheme.Hom.appLe f e)\n[PROOFSTEP]\nintro H V e\n[GOAL]\ncase h.mp\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\n⊢ P (Scheme.Hom.appLe f e)\n[PROOFSTEP]\nlet U' := (Opens.map f.val.base).obj U.1\n[GOAL]\ncase h.mp\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\n⊢ P (Scheme.Hom.appLe f e)\n[PROOFSTEP]\nhave e' : U'.openEmbedding.isOpenMap.functor.obj ((Opens.map U'.inclusion).obj V.1) = V.1 :=\n  by\n  ext1; refine' Set.image_preimage_eq_inter_range.trans (Set.inter_eq_left_iff_subset.mpr _)\n  erw [Subtype.range_val]\n  convert e\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\n⊢ ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V)) = ↑↑V\n[PROOFSTEP]\nrefine' Set.image_preimage_eq_inter_range.trans (Set.inter_eq_left_iff_subset.mpr _)\n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\n⊢ (↑V).1 ⊆ Set.range fun x => ↑(Opens.inclusion U') x\n[PROOFSTEP]\nerw [Subtype.range_val]\n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\n⊢ (↑V).1 ⊆ ↑U'\n[PROOFSTEP]\nconvert e\n[GOAL]\ncase h.mp\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ P (Scheme.Hom.appLe f e)\n[PROOFSTEP]\nhave := H ⟨(Opens.map (X.ofRestrict U'.openEmbedding).1.base).obj V.1, ?_⟩\n[GOAL]\ncase h.mp.refine_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\nthis :\n  P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n          (eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n        NatTrans.app\n          (Scheme.ofRestrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                (_ :\n                  OpenEmbedding\n                    ↑(Opens.inclusion\n                        ↑{\n                            val :=\n                              (Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                ↑V,\n                            property := ?h.mp.refine_1 }))).val.c\n          (op ⊤))\n⊢ P (Scheme.Hom.appLe f e)\ncase h.mp.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ (Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj ↑V ∈\n    Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n[PROOFSTEP]\nerw [← X.presheaf.map_comp] at this \n[GOAL]\ncase h.mp.refine_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\nthis :\n  P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n        ((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.map\n            (NatTrans.app\n                (IsOpenMap.adjunction\n                    (_ :\n                      IsOpenMap\n                        ↑(Opens.inclusion\n                            ↑{\n                                val :=\n                                  (Opens.map\n                                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                    ↑V,\n                                property := ?h.mp.refine_1 }))).counit\n                (op ⊤).unop).op))\n⊢ P (Scheme.Hom.appLe f e)\ncase h.mp.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ (Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj ↑V ∈\n    Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\ncase h.mp.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ (Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj ↑V ∈\n    Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n[PROOFSTEP]\nrw [← hP.cancel_right_isIso _ (X.presheaf.map (eqToHom _)), Category.assoc, ← X.presheaf.map_comp]\n[GOAL]\ncase h.mp.refine_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\nthis :\n  P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n        ((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.map\n            (NatTrans.app\n                (IsOpenMap.adjunction\n                    (_ :\n                      IsOpenMap\n                        ↑(Opens.inclusion\n                            ↑{\n                                val :=\n                                  (Opens.map\n                                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                    ↑V,\n                                property := ?h.mp.refine_1 }))).counit\n                (op ⊤).unop).op))\n⊢ P (NatTrans.app f.val.c (op ↑U) ≫ X.presheaf.map ((homOfLE e).op ≫ eqToHom ?m.92694))\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\nthis :\n  P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n        ((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.map\n            (NatTrans.app\n                (IsOpenMap.adjunction\n                    (_ :\n                      IsOpenMap\n                        ↑(Opens.inclusion\n                            ↑{\n                                val :=\n                                  (Opens.map\n                                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                    ↑V,\n                                property := ?h.mp.refine_1 }))).counit\n                (op ⊤).unop).op))\n⊢ (Opens ↑↑X.toPresheafedSpace)ᵒᵖ\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\nthis :\n  P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n        ((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.map\n            (NatTrans.app\n                (IsOpenMap.adjunction\n                    (_ :\n                      IsOpenMap\n                        ↑(Opens.inclusion\n                            ↑{\n                                val :=\n                                  (Opens.map\n                                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                    ↑V,\n                                property := ?h.mp.refine_1 }))).counit\n                (op ⊤).unop).op))\n⊢ op ↑V = ?m.93449\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\nthis :\n  P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n        ((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.map\n            (NatTrans.app\n                (IsOpenMap.adjunction\n                    (_ :\n                      IsOpenMap\n                        ↑(Opens.inclusion\n                            ↑{\n                                val :=\n                                  (Opens.map\n                                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                    ↑V,\n                                property := ?h.mp.refine_1 }))).counit\n                (op ⊤).unop).op))\n⊢ op ↑V = ?m.93449\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\nthis :\n  P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n        ((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.map\n            (NatTrans.app\n                (IsOpenMap.adjunction\n                    (_ :\n                      IsOpenMap\n                        ↑(Opens.inclusion\n                            ↑{\n                                val :=\n                                  (Opens.map\n                                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                    ↑V,\n                                property := ?h.mp.refine_1 }))).counit\n                (op ⊤).unop).op))\n⊢ op ↑V = ?m.93449\ncase h.mp.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ (Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj ↑V ∈\n    Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\ncase h.mp.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ (Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj ↑V ∈\n    Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.mp.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ (Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj ↑V ∈\n    Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n[PROOFSTEP]\napply (@isAffineOpen_iff_of_isOpenImmersion _ _ (@Scheme.ofRestrict _ X U'.inclusion _) ?_ _).mp\n[GOAL]\ncase h.mp.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ IsAffineOpen\n    ((PresheafedSpace.IsOpenImmersion.openFunctor ?m.94942).obj\n      ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj ↑V))\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n[PROOFSTEP]\nerw [e']\n[GOAL]\ncase h.mp.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ IsAffineOpen ↑V\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n[PROOFSTEP]\napply V.2\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\n⊢ IsOpenImmersion (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\nthis :\n  P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n        ((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.map\n            (NatTrans.app\n                (IsOpenMap.adjunction\n                    (_ :\n                      IsOpenMap\n                        ↑(Opens.inclusion\n                            ↑{\n                                val :=\n                                  (Opens.map\n                                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                    ↑V,\n                                property :=\n                                  (_ :\n                                    IsAffineOpen\n                                      ((Opens.map\n                                            (Scheme.ofRestrict X\n                                                  (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                        ↑V)) }))).counit\n                (op ⊤).unop).op))\n⊢ op ↑V =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      ↑{\n                          val :=\n                            (Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj ↑V,\n                          property :=\n                            (_ :\n                              IsAffineOpen\n                                ((Opens.map\n                                      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                  ↑V)) }))).op.obj\n        (op ⊤))\n[PROOFSTEP]\ndsimp only [Functor.op, unop_op]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\nthis :\n  P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n        ((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.map\n            (NatTrans.app\n                (IsOpenMap.adjunction\n                    (_ :\n                      IsOpenMap\n                        ↑(Opens.inclusion\n                            ↑{\n                                val :=\n                                  (Opens.map\n                                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                    ↑V,\n                                property :=\n                                  (_ :\n                                    IsAffineOpen\n                                      ((Opens.map\n                                            (Scheme.ofRestrict X\n                                                  (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                        ↑V)) }))).counit\n                (op ⊤).unop).op))\n⊢ op ↑V =\n    op\n      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj\n        ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      ((Opens.map\n                            (Scheme.ofRestrict X\n                                  (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).val.base).obj\n                        ↑V)))).obj\n          ⊤))\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\nthis :\n  P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n        ((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.map\n            (NatTrans.app\n                (IsOpenMap.adjunction\n                    (_ :\n                      IsOpenMap\n                        ↑(Opens.inclusion\n                            ↑{\n                                val :=\n                                  (Opens.map\n                                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                    ↑V,\n                                property :=\n                                  (_ :\n                                    IsAffineOpen\n                                      ((Opens.map\n                                            (Scheme.ofRestrict X\n                                                  (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                        ↑V)) }))).counit\n                (op ⊤).unop).op))\n⊢ op ↑V =\n    op\n      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj\n        ((Opens.map\n              (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).val.base).obj\n          ↑V))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH :\n  ∀\n    (U_1 :\n      ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n    P\n      (NatTrans.app f.val.c (op ↑U) ≫\n        X.presheaf.map\n            (eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n          NatTrans.app\n            (Scheme.ofRestrict\n                  (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n            (op ⊤))\nV : ↑(Scheme.affineOpens X)\ne : ↑V ≤ (Opens.map f.val.base).obj ↑U\nU' : Opens ↑↑X.toPresheafedSpace := (Opens.map f.val.base).obj ↑U\ne' : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U'))).obj ((Opens.map (Opens.inclusion U')).obj ↑V) = ↑V\nthis :\n  P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n        ((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.map\n            (NatTrans.app\n                (IsOpenMap.adjunction\n                    (_ :\n                      IsOpenMap\n                        ↑(Opens.inclusion\n                            ↑{\n                                val :=\n                                  (Opens.map\n                                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                    ↑V,\n                                property :=\n                                  (_ :\n                                    IsAffineOpen\n                                      ((Opens.map\n                                            (Scheme.ofRestrict X\n                                                  (_ : OpenEmbedding ↑(Opens.inclusion U'))).val.base).obj\n                                        ↑V)) }))).counit\n                (op ⊤).unop).op))\n⊢ ↑V =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj\n      ((Opens.map\n            (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).val.base).obj\n        ↑V)\n[PROOFSTEP]\napply e'.symm\n[GOAL]\ncase h.mpr\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\n⊢ (∀ (V : ↑(Scheme.affineOpens X)) (e : ↑V ≤ (Opens.map f.val.base).obj ↑U), P (Scheme.Hom.appLe f e)) →\n    ∀\n      (U_1 :\n        ↑(Scheme.affineOpens\n            (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))),\n      P\n        (NatTrans.app f.val.c (op ↑U) ≫\n          X.presheaf.map\n              (eqToHom\n                  (_ :\n                    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                      (Opens.map f.val.base).obj ↑U)).op ≫\n            NatTrans.app\n              (Scheme.ofRestrict\n                    (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                    (_ : OpenEmbedding ↑(Opens.inclusion ↑U_1))).val.c\n              (op ⊤))\n[PROOFSTEP]\nintro H V\n[GOAL]\ncase h.mpr\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nH : ∀ (V : ↑(Scheme.affineOpens X)) (e : ↑V ≤ (Opens.map f.val.base).obj ↑U), P (Scheme.Hom.appLe f e)\nV : ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\n⊢ P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n          (eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n        NatTrans.app\n          (Scheme.ofRestrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                (_ : OpenEmbedding ↑(Opens.inclusion ↑V))).val.c\n          (op ⊤))\n[PROOFSTEP]\nspecialize H ⟨_, V.2.imageIsOpenImmersion (X.ofRestrict _)⟩ (Subtype.coe_image_subset _ _)\n[GOAL]\ncase h.mpr\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nV : ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\nH : P (Scheme.Hom.appLe f (_ : Subtype.val '' ↑↑V ⊆ ↑((Opens.map f.val.base).obj ↑U)))\n⊢ P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n          (eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n        NatTrans.app\n          (Scheme.ofRestrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))\n                (_ : OpenEmbedding ↑(Opens.inclusion ↑V))).val.c\n          (op ⊤))\n[PROOFSTEP]\nerw [← X.presheaf.map_comp]\n[GOAL]\ncase h.mpr\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nV : ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\nH : P (Scheme.Hom.appLe f (_ : Subtype.val '' ↑↑V ⊆ ↑((Opens.map f.val.base).obj ↑U)))\n⊢ P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n        ((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj ↑U)).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.map\n            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion ↑V))).counit (op ⊤).unop).op))\n[PROOFSTEP]\nrw [← hP.cancel_right_isIso _ (X.presheaf.map (eqToHom _)), Category.assoc, ← X.presheaf.map_comp]\n[GOAL]\ncase h.mpr\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nV : ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\nH : P (Scheme.Hom.appLe f (_ : Subtype.val '' ↑↑V ⊆ ↑((Opens.map f.val.base).obj ↑U)))\n⊢ P\n    (NatTrans.app f.val.c (op ↑U) ≫\n      X.presheaf.map\n        (((eqToHom\n                (_ :\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj ⊤ =\n                    (Opens.map f.val.base).obj ↑U)).op ≫\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.map\n              (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion ↑V))).counit (op ⊤).unop).op) ≫\n          eqToHom ?m.96601))\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nV : ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\nH : P (Scheme.Hom.appLe f (_ : Subtype.val '' ↑↑V ⊆ ↑((Opens.map f.val.base).obj ↑U)))\n⊢ (Opens ↑↑X.toPresheafedSpace)ᵒᵖ\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nV : ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\nH : P (Scheme.Hom.appLe f (_ : Subtype.val '' ↑↑V ⊆ ↑((Opens.map f.val.base).obj ↑U)))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.obj\n      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑V))).op.obj (op ⊤)) =\n    ?m.97455\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nV : ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\nH : P (Scheme.Hom.appLe f (_ : Subtype.val '' ↑↑V ⊆ ↑((Opens.map f.val.base).obj ↑U)))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.obj\n      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑V))).op.obj (op ⊤)) =\n    ?m.97455\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nV : ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\nH : P (Scheme.Hom.appLe f (_ : Subtype.val '' ↑↑V ⊆ ↑((Opens.map f.val.base).obj ↑U)))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.obj\n      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑V))).op.obj (op ⊤)) =\n    ?m.97455\n[PROOFSTEP]\nconvert H\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nV : ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\nH : P (Scheme.Hom.appLe f (_ : Subtype.val '' ↑↑V ⊆ ↑((Opens.map f.val.base).obj ↑U)))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).op.obj\n      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑V))).op.obj (op ⊤)) =\n    op\n      ↑{\n          val :=\n            (Scheme.Hom.opensFunctor\n                  (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))).obj\n              ↑V,\n          property :=\n            (_ :\n              IsAffineOpen\n                ((Scheme.Hom.opensFunctor\n                      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))).obj\n                  ↑V)) }\n[PROOFSTEP]\ndsimp only [Functor.op, unop_op]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.RespectsIso P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens Y)\nV : ↑(Scheme.affineOpens (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\nH : P (Scheme.Hom.appLe f (_ : Subtype.val '' ↑↑V ⊆ ↑((Opens.map f.val.base).obj ↑U)))\n⊢ op\n      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))).obj\n        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑V))).obj ⊤)) =\n    op\n      ((Scheme.Hom.opensFunctor\n            (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))).obj\n        ↑V)\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (op ⊤))\nH : sourceAffineLocally P f\nU :\n  ↑(Scheme.affineOpens\n      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))))\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫\n          f ∣_ Scheme.basicOpen Y r).op)\n[PROOFSTEP]\nspecialize H ⟨_, U.2.imageIsOpenImmersion (X.ofRestrict _)⟩\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (op ⊤))\nU :\n  ↑(Scheme.affineOpens\n      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))))\nH :\n  P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict X\n            (_ :\n              OpenEmbedding\n                ↑(Opens.inclusion\n                    ↑{\n                        val :=\n                          (Scheme.Hom.opensFunctor\n                                (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))).obj\n                            ↑U,\n                        property :=\n                          (_ :\n                            IsAffineOpen\n                              ((Scheme.Hom.opensFunctor\n                                    (Scheme.ofRestrict X\n                                      (_ :\n                                        OpenEmbedding\n                                          ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))).obj\n                                ↑U)) })) ≫\n          f).op)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫\n          f ∣_ Scheme.basicOpen Y r).op)\n[PROOFSTEP]\nletI i1 : Algebra (Y.presheaf.obj <| Opposite.op ⊤) (Localization.Away r) := Localization.algebra\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (op ⊤))\nU :\n  ↑(Scheme.affineOpens\n      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))))\nH :\n  P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict X\n            (_ :\n              OpenEmbedding\n                ↑(Opens.inclusion\n                    ↑{\n                        val :=\n                          (Scheme.Hom.opensFunctor\n                                (Scheme.ofRestrict X\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))).obj\n                            ↑U,\n                        property :=\n                          (_ :\n                            IsAffineOpen\n                              ((Scheme.Hom.opensFunctor\n                                    (Scheme.ofRestrict X\n                                      (_ :\n                                        OpenEmbedding\n                                          ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))).obj\n                                ↑U)) })) ≫\n          f).op)\ni1 : Algebra (↑(Y.presheaf.obj (op ⊤))) (Localization.Away r) := Localization.algebra\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫\n          f ∣_ Scheme.basicOpen Y r).op)\n[PROOFSTEP]\nexact\n  (h₁.ofRestrict_morphismRestrict_iff f r\n        ((Scheme.Hom.opensFunctor (X.ofRestrict ((Opens.map f.1.base).obj <| Y.basicOpen r).openEmbedding)).obj U.1)\n        (IsAffineOpen.imageIsOpenImmersion U.2 (X.ofRestrict ((Opens.map f.1.base).obj <| Y.basicOpen r).openEmbedding))\n        (Opens.ext (Set.preimage_image_eq _ Subtype.coe_injective).symm)).mpr\n    (h₂.away r H)\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\n⊢ AffineTargetMorphismProperty.IsLocal (sourceAffineLocally P)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase RespectsIso\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\n⊢ MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty (sourceAffineLocally P))\n[PROOFSTEP]\nexact sourceAffineLocally_respectsIso h₁\n[GOAL]\ncase toBasicOpen\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\n⊢ ∀ {X Y : Scheme} [inst : IsAffine Y] (f : X ⟶ Y) (r : ↑(Y.presheaf.obj (op ⊤))),\n    sourceAffineLocally P f → sourceAffineLocally P (f ∣_ Scheme.basicOpen Y r)\n[PROOFSTEP]\nintrov H U\n[GOAL]\ncase toBasicOpen\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (op ⊤))\nH : sourceAffineLocally P f\nU :\n  ↑(Scheme.affineOpens\n      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))))\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))))\n            (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫\n          f ∣_ Scheme.basicOpen Y r).op)\n[PROOFSTEP]\napply scheme_restrict_basicOpen_of_localizationPreserves h₁ h₂\n[GOAL]\ncase toBasicOpen.H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (op ⊤))\nH : sourceAffineLocally P f\nU :\n  ↑(Scheme.affineOpens\n      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y r))))))\n⊢ sourceAffineLocally P f\n[PROOFSTEP]\nassumption\n[GOAL]\ncase ofBasicOpenCover\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\n⊢ ∀ {X Y : Scheme} [inst : IsAffine Y] (f : X ⟶ Y) (s : Finset ↑(Y.presheaf.obj (op ⊤))),\n    Ideal.span ↑s = ⊤ →\n      (∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)) → sourceAffineLocally P f\n[PROOFSTEP]\nintrov hs hs' U\n[GOAL]\ncase ofBasicOpenCover\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n[PROOFSTEP]\nskip\n[GOAL]\ncase ofBasicOpenCover\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n[PROOFSTEP]\napply h₃ _ _ hs\n[GOAL]\ncase ofBasicOpenCover\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\n⊢ ∀ (r : ↑↑s),\n    P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op) ↑r)\n[PROOFSTEP]\nintro r\n[GOAL]\ncase ofBasicOpenCover\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\nr : ↑↑s\n⊢ P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op) ↑r)\n[PROOFSTEP]\nhave := hs' r ⟨(Opens.map (X.ofRestrict _).1.base).obj U.1, ?_⟩\n[GOAL]\ncase ofBasicOpenCover.refine_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\nr : ↑↑s\nthis :\n  P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r)))))\n            (_ :\n              OpenEmbedding\n                ↑(Opens.inclusion\n                    ↑{\n                        val :=\n                          (Opens.map\n                                (Scheme.ofRestrict X\n                                      (_ :\n                                        OpenEmbedding\n                                          ↑(Opens.inclusion\n                                              ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r))))).val.base).obj\n                            ↑U,\n                        property := ?ofBasicOpenCover.refine_1 })) ≫\n          f ∣_ Scheme.basicOpen Y ↑r).op)\n⊢ P (Localization.awayMap (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op) ↑r)\ncase ofBasicOpenCover.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\nr : ↑↑s\n⊢ (Opens.map\n          (Scheme.ofRestrict X\n                (_ :\n                  OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r))))).val.base).obj\n      ↑U ∈\n    Scheme.affineOpens\n      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r)))))\n[PROOFSTEP]\nrwa [h₁.ofRestrict_morphismRestrict_iff] at this \n[GOAL]\ncase ofBasicOpenCover.refine_2.hU\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\nr : ↑↑s\nthis :\n  P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r)))))\n            (_ :\n              OpenEmbedding\n                ↑(Opens.inclusion\n                    ↑{\n                        val :=\n                          (Opens.map\n                                (Scheme.ofRestrict X\n                                      (_ :\n                                        OpenEmbedding\n                                          ↑(Opens.inclusion\n                                              ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r))))).val.base).obj\n                            ↑U,\n                        property := ?ofBasicOpenCover.refine_1 })) ≫\n          f ∣_ Scheme.basicOpen Y ↑r).op)\n⊢ IsAffineOpen ↑U\n[PROOFSTEP]\nexact U.2\n[GOAL]\ncase ofBasicOpenCover.refine_2.e\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\nr : ↑↑s\nthis :\n  P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict\n            (Scheme.restrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r)))))\n            (_ :\n              OpenEmbedding\n                ↑(Opens.inclusion\n                    ↑{\n                        val :=\n                          (Opens.map\n                                (Scheme.ofRestrict X\n                                      (_ :\n                                        OpenEmbedding\n                                          ↑(Opens.inclusion\n                                              ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r))))).val.base).obj\n                            ↑U,\n                        property := ?ofBasicOpenCover.refine_1 })) ≫\n          f ∣_ Scheme.basicOpen Y ↑r).op)\n⊢ ↑{\n        val :=\n          (Opens.map\n                (Scheme.ofRestrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r))))).val.base).obj\n            ↑U,\n        property := ?ofBasicOpenCover.refine_1 } =\n    (Opens.map\n          (Scheme.ofRestrict X\n                (_ :\n                  OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r))))).val.base).obj\n      ↑U\n[PROOFSTEP]\nrfl\n[GOAL]\ncase ofBasicOpenCover.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\nr : ↑↑s\n⊢ (Opens.map\n          (Scheme.ofRestrict X\n                (_ :\n                  OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r))))).val.base).obj\n      ↑U ∈\n    Scheme.affineOpens\n      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r)))))\n[PROOFSTEP]\nsuffices\n  ∀ (V) (_ : V = (Opens.map f.val.base).obj (Y.basicOpen r.val)),\n    IsAffineOpen ((Opens.map (X.ofRestrict V.openEmbedding).1.base).obj U.1)\n  by exact this _ rfl\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\nr : ↑↑s\nthis :\n  ∀ (V : Opens ↑↑X.toPresheafedSpace),\n    V = (Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r) →\n      IsAffineOpen ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base).obj ↑U)\n⊢ (Opens.map\n          (Scheme.ofRestrict X\n                (_ :\n                  OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r))))).val.base).obj\n      ↑U ∈\n    Scheme.affineOpens\n      (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r)))))\n[PROOFSTEP]\nexact this _ rfl\n[GOAL]\ncase ofBasicOpenCover.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\nr : ↑↑s\n⊢ ∀ (V : Opens ↑↑X.toPresheafedSpace),\n    V = (Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r) →\n      IsAffineOpen ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base).obj ↑U)\n[PROOFSTEP]\nintro V hV\n[GOAL]\ncase ofBasicOpenCover.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\nr : ↑↑s\nV : Opens ↑↑X.toPresheafedSpace\nhV : V = (Opens.map f.val.base).obj (Scheme.basicOpen Y ↑r)\n⊢ IsAffineOpen ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base).obj ↑U)\n[PROOFSTEP]\nrw [Scheme.preimage_basicOpen] at hV \n[GOAL]\ncase ofBasicOpenCover.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\nr : ↑↑s\nV : Opens ↑↑X.toPresheafedSpace\nhV : V = Scheme.basicOpen X (↑(NatTrans.app f.val.c (op ⊤)) ↑r)\n⊢ IsAffineOpen ((Opens.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base).obj ↑U)\n[PROOFSTEP]\nsubst hV\n[GOAL]\ncase ofBasicOpenCover.refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RingHom.RespectsIso P\nh₂ : RingHom.LocalizationPreserves P\nh₃ : RingHom.OfLocalizationSpan P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ns : Finset ↑(Y.presheaf.obj (op ⊤))\nhs : Ideal.span ↑s = ⊤\nhs' : ∀ (r : { x // x ∈ s }), sourceAffineLocally P (f ∣_ Scheme.basicOpen Y ↑r)\nU : ↑(Scheme.affineOpens X)\nr : ↑↑s\n⊢ IsAffineOpen\n    ((Opens.map\n          (Scheme.ofRestrict X\n                (_ :\n                  OpenEmbedding\n                    ↑(Opens.inclusion (Scheme.basicOpen X (↑(NatTrans.app f.val.c (op ⊤)) ↑r))))).val.base).obj\n      ↑U)\n[PROOFSTEP]\nexact U.2.mapRestrictBasicOpen (Scheme.Γ.map f.op r.1)\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs : Ideal.span s = ⊤\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n[PROOFSTEP]\napply_fun Ideal.map (X.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op) at hs \n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.map (X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n      (Ideal.span s) =\n    Ideal.map (X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) ⊤\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n[PROOFSTEP]\nrw [Ideal.map_span, Ideal.map_top] at hs \n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n[PROOFSTEP]\napply h₃ _ _ hs\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\n⊢ ∀\n    (r :\n      ↑(↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) ''\n          s)),\n    P\n      (RingHom.comp\n        (algebraMap (↑(X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))))\n          (Localization.Away ↑r))\n        (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op))\n[PROOFSTEP]\nrintro ⟨s, r, hr, hs⟩\n[GOAL]\ncase mk.intro.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns✝ : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s✝),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs✝ :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) ''\n        s✝) =\n    ⊤\ns : ↑(X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)))\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s✝\nhs : ↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r = s\n⊢ P\n    (RingHom.comp\n      (algebraMap (↑(X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))))\n        (Localization.Away\n          ↑{ val := s,\n              property :=\n                (_ :\n                  ∃ a,\n                    a ∈ s✝ ∧\n                      ↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          a =\n                        s) }))\n      (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op))\n[PROOFSTEP]\nhave :=\n  (@Localization.algEquiv _ _ _ _ _ _\n      (@AlgebraicGeometry.Γ_restrict_isLocalization _ U.2 s)).toRingEquiv.toCommRingCatIso\n[GOAL]\ncase mk.intro.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns✝ : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s✝),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs✝ :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) ''\n        s✝) =\n    ⊤\ns : ↑(X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)))\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s✝\nhs : ↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r = s\nthis :\n  CommRingCat.of (Localization (Submonoid.powers s)) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))) s))))))\n⊢ P\n    (RingHom.comp\n      (algebraMap (↑(X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))))\n        (Localization.Away\n          ↑{ val := s,\n              property :=\n                (_ :\n                  ∃ a,\n                    a ∈ s✝ ∧\n                      ↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          a =\n                        s) }))\n      (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op))\n[PROOFSTEP]\nrefine\n  (h₁.cancel_right_isIso _\n        (@Localization.algEquiv _ _ _ _ _ _\n            (@AlgebraicGeometry.Γ_restrict_isLocalization _ U.2 s)).toRingEquiv.toCommRingCatIso.hom).mp\n    ?_\n[GOAL]\ncase mk.intro.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns✝ : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s✝),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs✝ :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) ''\n        s✝) =\n    ⊤\ns : ↑(X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)))\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s✝\nhs : ↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r = s\nthis :\n  CommRingCat.of (Localization (Submonoid.powers s)) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))) s))))))\n⊢ P\n    (RingHom.comp\n        (algebraMap (↑(X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))))\n          (Localization.Away\n            ↑{ val := s,\n                property :=\n                  (_ :\n                    ∃ a,\n                      a ∈ s✝ ∧\n                        ↑(X.presheaf.map\n                                (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                            a =\n                          s) }))\n        (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op) ≫\n      (RingEquiv.toCommRingCatIso\n          (AlgEquiv.toRingEquiv\n            (Localization.algEquiv (Submonoid.powers s)\n              ↑(Scheme.Γ.obj\n                  (op\n                    (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                                s))))))))).hom)\n[PROOFSTEP]\nsubst hs\n[GOAL]\ncase mk.intro.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ P\n    (RingHom.comp\n        (algebraMap (↑(X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))))\n          (Localization.Away\n            ↑{\n                val :=\n                  ↑(X.presheaf.map\n                        (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                    r,\n                property :=\n                  (_ :\n                    ∃ a,\n                      a ∈ s ∧\n                        ↑(X.presheaf.map\n                                (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                            a =\n                          ↑(X.presheaf.map\n                                (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                            r) }))\n        (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op) ≫\n      (RingEquiv.toCommRingCatIso\n          (AlgEquiv.toRingEquiv\n            (Localization.algEquiv\n              (Submonoid.powers\n                (↑(X.presheaf.map\n                      (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                  r))\n              ↑(Scheme.Γ.obj\n                  (op\n                    (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                                (↑(X.presheaf.map\n                                      (eqToHom\n                                          (_ :\n                                            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                                  r)))))))))).hom)\n[PROOFSTEP]\nrw [CommRingCat.comp_eq_ring_hom_comp, ← RingHom.comp_assoc]\n  -- Porting note: here is where it gets bad; previously `erw [IsLocalization.map_comp]`\n    -- ask Lean to synthesize instances and it runs away\n    -- we also have to pass in one `Localization` instance now (and not before)\n[GOAL]\ncase mk.intro.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ P\n    (RingHom.comp\n      (RingHom.comp\n        (RingEquiv.toCommRingCatIso\n            (AlgEquiv.toRingEquiv\n              (Localization.algEquiv\n                (Submonoid.powers\n                  (↑(X.presheaf.map\n                        (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                    r))\n                ↑(Scheme.Γ.obj\n                    (op\n                      (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (_ :\n                          OpenEmbedding\n                            ↑(Opens.inclusion\n                                (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                                  (↑(X.presheaf.map\n                                        (eqToHom\n                                            (_ :\n                                              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                                    r)))))))))).hom\n        (algebraMap (↑(X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))))\n          (Localization.Away\n            ↑{\n                val :=\n                  ↑(X.presheaf.map\n                        (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                    r,\n                property :=\n                  (_ :\n                    ∃ a,\n                      a ∈ s ∧\n                        ↑(X.presheaf.map\n                                (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                            a =\n                          ↑(X.presheaf.map\n                                (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                            r) })))\n      (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op))\n[PROOFSTEP]\nerw [@IsLocalization.map_comp _ _ _ _ _ (_) (Scheme.Γ.obj (Opposite.op (X.restrict U.1.openEmbedding))) _ (_) _\n    (Submonoid.powers (X.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op r))\n    ((Scheme.Γ.obj\n      (Opposite.op\n        ((X.restrict U.1.openEmbedding).restrict\n          ((X.restrict U.1.openEmbedding).basicOpen\n              (X.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op r)).openEmbedding))))\n    _ (le_of_eq rfl) (_) (@AlgebraicGeometry.Γ_restrict_isLocalization _ U.2 _)]\n[GOAL]\ncase mk.intro.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ P\n    (RingHom.comp\n      (RingHom.comp\n        (algebraMap ↑(Scheme.Γ.obj (op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))))\n          ↑(Scheme.Γ.obj\n              (op\n                (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                  (_ :\n                    OpenEmbedding\n                      ↑(Opens.inclusion\n                          (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                            (↑(X.presheaf.map\n                                  (eqToHom\n                                      (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                              r))))))))\n        ↑(RingEquiv.refl ↑(Scheme.Γ.obj (op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))))))\n      (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op))\n[PROOFSTEP]\nerw [RingHom.comp_id]\n[GOAL]\ncase mk.intro.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ P\n    (RingHom.comp\n      (algebraMap ↑(Scheme.Γ.obj (op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))))\n        ↑(Scheme.Γ.obj\n            (op\n              (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                (_ :\n                  OpenEmbedding\n                    ↑(Opens.inclusion\n                        (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                          (↑(X.presheaf.map\n                                (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                            r))))))))\n      (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op))\n[PROOFSTEP]\nrw [RingHom.algebraMap_toAlgebra, op_comp, Functor.map_comp, ← CommRingCat.comp_eq_ring_hom_comp, Scheme.Γ_map_op,\n  Scheme.Γ_map_op, Scheme.Γ_map_op, Category.assoc]\n[GOAL]\ncase mk.intro.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ P\n    (NatTrans.app f.val.c (op ⊤) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))).val.c (op ⊤) ≫\n        NatTrans.app\n          (Scheme.ofRestrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                (_ :\n                  OpenEmbedding\n                    ↑(Opens.inclusion\n                        (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                          (↑(X.presheaf.map\n                                (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                            r))))).val.c\n          (op ⊤))\n[PROOFSTEP]\nerw [← X.presheaf.map_comp]\n[GOAL]\ncase mk.intro.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ P\n    (NatTrans.app f.val.c (op ⊤) ≫\n      X.presheaf.map\n        ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion ↑U))).counit (op ⊤).unop).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.map\n            (NatTrans.app\n                (IsOpenMap.adjunction\n                    (_ :\n                      IsOpenMap\n                        ↑(Opens.inclusion\n                            (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                              (↑(X.presheaf.map\n                                    (eqToHom\n                                        (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                                r))))).counit\n                (op ⊤).unop).op))\n[PROOFSTEP]\nrw [← h₁.cancel_right_isIso _ (X.presheaf.map (eqToHom _))]\n[GOAL]\ncase mk.intro.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ P\n    ((NatTrans.app f.val.c (op ⊤) ≫\n        X.presheaf.map\n          ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion ↑U))).counit (op ⊤).unop).op ≫\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.map\n              (NatTrans.app\n                  (IsOpenMap.adjunction\n                      (_ :\n                        IsOpenMap\n                          ↑(Opens.inclusion\n                              (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                                (↑(X.presheaf.map\n                                      (eqToHom\n                                          (_ :\n                                            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                                  r))))).counit\n                  (op ⊤).unop).op)) ≫\n      X.presheaf.map (eqToHom ?m.148221))\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (Opens ↑↑X.toPresheafedSpace)ᵒᵖ\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    ?m.148220\n[PROOFSTEP]\nconvert hs' ⟨r, hr⟩ using 1\n[GOAL]\ncase h.e'_5.h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\ne_4✝ :\n  CommRingCat.instCommRingα\n      (X.presheaf.obj\n        ((IsOpenMap.functor\n                (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n          (op ⊤))) =\n    CommRingCat.instCommRingα\n      (Scheme.Γ.obj\n        (op\n          (Scheme.restrict X\n            (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr }))))))\n⊢ (NatTrans.app f.val.c (op ⊤) ≫\n        X.presheaf.map\n          ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion ↑U))).counit (op ⊤).unop).op ≫\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.map\n              (NatTrans.app\n                  (IsOpenMap.adjunction\n                      (_ :\n                        IsOpenMap\n                          ↑(Opens.inclusion\n                              (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                                (↑(X.presheaf.map\n                                      (eqToHom\n                                          (_ :\n                                            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                                  r))))).counit\n                  (op ⊤).unop).op)) ≫\n      X.presheaf.map (eqToHom ?m.148221) =\n    Scheme.Γ.map\n      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr }))) ≫\n          f).op\n[PROOFSTEP]\nerw [Category.assoc]\n[GOAL]\ncase h.e'_5.h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\ne_4✝ :\n  CommRingCat.instCommRingα\n      (X.presheaf.obj\n        ((IsOpenMap.functor\n                (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n          (op ⊤))) =\n    CommRingCat.instCommRingα\n      (Scheme.Γ.obj\n        (op\n          (Scheme.restrict X\n            (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr }))))))\n⊢ NatTrans.app f.val.c (op ⊤) ≫\n      X.presheaf.map\n          ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion ↑U))).counit (op ⊤).unop).op ≫\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.map\n              (NatTrans.app\n                  (IsOpenMap.adjunction\n                      (_ :\n                        IsOpenMap\n                          ↑(Opens.inclusion\n                              (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                                (↑(X.presheaf.map\n                                      (eqToHom\n                                          (_ :\n                                            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                                  r))))).counit\n                  (op ⊤).unop).op) ≫\n        X.presheaf.map (eqToHom ?m.148221) =\n    Scheme.Γ.map\n      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr }))) ≫\n          f).op\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\n[PROOFSTEP]\nrw [← X.presheaf.map_comp, op_comp, Scheme.Γ.map_comp, Scheme.Γ_map_op, Scheme.Γ_map_op]\n[GOAL]\ncase h.e'_5.h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\ne_4✝ :\n  CommRingCat.instCommRingα\n      (X.presheaf.obj\n        ((IsOpenMap.functor\n                (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n          (op ⊤))) =\n    CommRingCat.instCommRingα\n      (Scheme.Γ.obj\n        (op\n          (Scheme.restrict X\n            (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr }))))))\n⊢ NatTrans.app f.val.c (op ⊤) ≫\n      X.presheaf.map\n        (((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion ↑U))).counit (op ⊤).unop).op ≫\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.map\n              (NatTrans.app\n                  (IsOpenMap.adjunction\n                      (_ :\n                        IsOpenMap\n                          ↑(Opens.inclusion\n                              (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                                (↑(X.presheaf.map\n                                      (eqToHom\n                                          (_ :\n                                            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                                  r))))).counit\n                  (op ⊤).unop).op) ≫\n          eqToHom ?m.148221) =\n    NatTrans.app f.val.c (op ⊤) ≫\n      NatTrans.app\n        (Scheme.ofRestrict X\n              (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).val.c\n        (op ⊤)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\n[PROOFSTEP]\ncongr!\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\n[PROOFSTEP]\nall_goals\n  · dsimp [Functor.op]\n    conv_lhs => rw [Opens.openEmbedding_obj_top]\n    conv_rhs => rw [Opens.openEmbedding_obj_top]\n    erw [Scheme.image_basicOpen (X.ofRestrict U.1.openEmbedding)]\n    erw [PresheafedSpace.IsOpenImmersion.ofRestrict_invApp_apply]\n    rw [Scheme.basicOpen_res_eq]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).op.obj\n      ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).op.obj\n        (op ⊤)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X ↑{ val := r, property := hr })))).op.obj\n      (op ⊤)\n[PROOFSTEP]\ndsimp [Functor.op]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ op\n      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj\n        ((IsOpenMap.functor\n              (_ :\n                IsOpenMap\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r))))).obj\n          ⊤)) =\n    op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤)\n[PROOFSTEP]\nconv_lhs => rw [Opens.openEmbedding_obj_top]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n| op\n    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj\n      ((IsOpenMap.functor\n            (_ :\n              IsOpenMap\n                ↑(Opens.inclusion\n                    (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                      (↑(X.presheaf.map\n                            (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                        r))))).obj\n        ⊤))\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n| op\n    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj\n      ((IsOpenMap.functor\n            (_ :\n              IsOpenMap\n                ↑(Opens.inclusion\n                    (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                      (↑(X.presheaf.map\n                            (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                        r))))).obj\n        ⊤))\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n| op\n    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj\n      ((IsOpenMap.functor\n            (_ :\n              IsOpenMap\n                ↑(Opens.inclusion\n                    (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                      (↑(X.presheaf.map\n                            (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                        r))))).obj\n        ⊤))\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ op\n      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj\n        (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) =\n    op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤)\n[PROOFSTEP]\nconv_rhs => rw [Opens.openEmbedding_obj_top]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n| op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤)\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n| op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤)\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n| op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤)\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ op\n      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj\n        (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) =\n    op (Scheme.basicOpen X r)\n[PROOFSTEP]\nerw [Scheme.image_basicOpen (X.ofRestrict U.1.openEmbedding)]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ op\n      (Scheme.basicOpen X\n        (↑(Scheme.Hom.invApp (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))) ⊤)\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) =\n    op (Scheme.basicOpen X r)\n[PROOFSTEP]\nerw [PresheafedSpace.IsOpenImmersion.ofRestrict_invApp_apply]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nh₃ : RingHom.OfLocalizationSpanTarget P\nX Y : Scheme\nf : X ⟶ Y\nU : ↑(Scheme.affineOpens X)\ns : Set ↑(X.presheaf.obj (op ↑U))\nhs' :\n  ∀ (r : ↑s),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X ↑r))) ≫ f).op)\nhs :\n  Ideal.span\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) '' s) =\n    ⊤\nr : ↑(X.presheaf.obj (op ↑U))\nhr : r ∈ s\nthis :\n  CommRingCat.of\n      (Localization\n        (Submonoid.powers\n          (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n            r))) ≅\n    CommRingCat.of\n      ↑(Scheme.Γ.obj\n          (op\n            (Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Scheme.basicOpen (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                        (↑(X.presheaf.map\n                              (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n                          r)))))))\n⊢ op\n      (Scheme.basicOpen X\n        (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)) =\n    op (Scheme.basicOpen X r)\n[PROOFSTEP]\nrw [Scheme.basicOpen_res_eq]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ P (Scheme.Γ.map (f ≫ g).op)\n[PROOFSTEP]\nrw [← h₁.cancel_right_isIso _ (Scheme.Γ.map (IsOpenImmersion.isoOfRangeEq (Y.ofRestrict _) f _).hom.op), ←\n  Functor.map_comp, ← op_comp]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ P (Scheme.Γ.map ((IsOpenImmersion.isoOfRangeEq (Scheme.ofRestrict Y ?m.164260) f ?m.164267).hom ≫ f ≫ g).op)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ TopCat\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ ?m.164258 ⟶ TopCat.of ↑↑Y.toPresheafedSpace\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ OpenEmbedding ↑?m.164259\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ Set.range ↑(Scheme.ofRestrict Y ?m.164260).val.base = Set.range ↑f.val.base\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ TopCat\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ ?m.164258 ⟶ TopCat.of ↑↑Y.toPresheafedSpace\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ OpenEmbedding ↑?m.164259\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ Set.range ↑(Scheme.ofRestrict Y ?m.164260).val.base = Set.range ↑f.val.base\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ TopCat\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ ?m.164258 ⟶ TopCat.of ↑↑Y.toPresheafedSpace\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ OpenEmbedding ↑?m.164259\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ Set.range ↑(Scheme.ofRestrict Y ?m.164260).val.base = Set.range ↑f.val.base\n[PROOFSTEP]\nconvert h₂ ⟨_, rangeIsAffineOpenOfOpenImmersion f⟩ using 3\n[GOAL]\ncase h.e'_5.h.h.e'_8.h.e'_5\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ (IsOpenImmersion.isoOfRangeEq\n          (Scheme.ofRestrict Y\n            (_ :\n              OpenEmbedding\n                ↑(Opens.inclusion\n                    ↑{ val := Scheme.Hom.opensRange f, property := (_ : IsAffineOpen (Scheme.Hom.opensRange f)) })))\n          f ?m.164267).hom ≫\n      f ≫ g =\n    Scheme.ofRestrict Y\n        (_ :\n          OpenEmbedding\n            ↑(Opens.inclusion\n                ↑{ val := Scheme.Hom.opensRange f, property := (_ : IsAffineOpen (Scheme.Hom.opensRange f)) })) ≫\n      g\n[PROOFSTEP]\nrw [IsOpenImmersion.isoOfRangeEq_hom, IsOpenImmersion.lift_fac_assoc]\n[GOAL]\ncase h.e'_5.h.h.e'_8.h.e'_5.e\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RingHom.PropertyIsLocal P\nh₁ : RingHom.RespectsIso P\nX Y Z : Scheme\ninst✝² : IsAffine X\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ninst✝ : IsOpenImmersion f\ng : Y ⟶ Z\nh₂ : sourceAffineLocally P g\n⊢ Set.range\n      ↑(Scheme.ofRestrict Y\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ↑{ val := Scheme.Hom.opensRange f,\n                          property := (_ : IsAffineOpen (Scheme.Hom.opensRange f)) }))).val.base =\n    Set.range ↑f.val.base\n[PROOFSTEP]\nexact Subtype.range_coe\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ sourceAffineLocally P f\n[PROOFSTEP]\nlet S i :=\n  (⟨⟨Set.range (𝒰.map i).1.base, (𝒰.IsOpen i).base_open.open_range⟩, rangeIsAffineOpenOfOpenImmersion (𝒰.map i)⟩ :\n    X.affineOpens)\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\n⊢ sourceAffineLocally P f\n[PROOFSTEP]\nintro U\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n[PROOFSTEP]\napply of_affine_open_cover (P := fun V => P (Scheme.Γ.map (X.ofRestrict (Opens.openEmbedding V.val) ≫ f).op)) U\n[GOAL]\ncase hP₁\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\n⊢ ∀ (U : ↑(Scheme.affineOpens X)) (f_1 : ↑(X.presheaf.obj (Opposite.op ↑U))),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op) →\n      P\n        (Scheme.Γ.map\n          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen X f_1))) ≫ f).op)\ncase hP₂\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\n⊢ ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (Opposite.op ↑U))),\n    Ideal.span ↑s = ⊤ →\n      (∀ (f_1 : { x // x ∈ s }),\n          P\n            (Scheme.Γ.map\n              (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen X ↑f_1))) ≫ f).op)) →\n        P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\ncase hS\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\n⊢ ⋃ (i : ↑?S), ↑↑↑i = Set.univ\ncase hS'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\n⊢ ∀ (U : ↑?S), P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑↑U)) ≫ f).op)\ncase S\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\n⊢ Set ↑(Scheme.affineOpens X)\n[PROOFSTEP]\npick_goal 5\n[GOAL]\ncase S\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\n⊢ Set ↑(Scheme.affineOpens X)\n[PROOFSTEP]\nexact Set.range S\n[GOAL]\ncase hP₁\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\n⊢ ∀ (U : ↑(Scheme.affineOpens X)) (f_1 : ↑(X.presheaf.obj (Opposite.op ↑U))),\n    P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op) →\n      P\n        (Scheme.Γ.map\n          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen X f_1))) ≫ f).op)\n[PROOFSTEP]\nintro U r H\n[GOAL]\ncase hP₁\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen X r))) ≫ f).op)\n[PROOFSTEP]\nconvert\n  hP.StableUnderComposition (S := Scheme.Γ.obj (Opposite.op (X.restrict <| Opens.openEmbedding U.val))) (T :=\n    Scheme.Γ.obj (Opposite.op (X.restrict <| Opens.openEmbedding (X.basicOpen r)))) ?_ ?_ H ?_ using\n  1\n[GOAL]\ncase h.e'_5\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen X r))) ≫ f).op =\n    comp ?hP₁.convert_1 (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\ncase hP₁.convert_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))) →+*\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X r))))))\ncase hP₁.convert_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ P ?hP₁.convert_1\n[PROOFSTEP]\nswap\n[GOAL]\ncase hP₁.convert_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))) →+*\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X r))))))\n[PROOFSTEP]\nrefine' X.presheaf.map (@homOfLE _ _ ((IsOpenMap.functor _).obj _) ((IsOpenMap.functor _).obj _) _).op\n[GOAL]\ncase hP₁.convert_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj (Opposite.op ⊤).unop ≤\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj (Opposite.op ⊤).unop\n[PROOFSTEP]\nrw [unop_op, unop_op, Opens.openEmbedding_obj_top, Opens.openEmbedding_obj_top]\n[GOAL]\ncase hP₁.convert_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ Scheme.basicOpen X r ≤ ↑U\n[PROOFSTEP]\nexact X.basicOpen_le _\n[GOAL]\ncase h.e'_5\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen X r))) ≫ f).op =\n    comp\n      (X.presheaf.map\n        (homOfLE\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj (Opposite.op ⊤).unop ≤\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj (Opposite.op ⊤).unop)).op)\n      (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n[PROOFSTEP]\nrw [op_comp, op_comp, Functor.map_comp, Functor.map_comp]\n[GOAL]\ncase h.e'_5\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ Scheme.Γ.map f.op ≫\n      Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen X r)))).op =\n    comp\n      (X.presheaf.map\n        (homOfLE\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj (Opposite.op ⊤).unop ≤\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj (Opposite.op ⊤).unop)).op)\n      (Scheme.Γ.map f.op ≫ Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))).op)\n[PROOFSTEP]\nrefine' (Eq.trans _ (Category.assoc (obj := CommRingCat) _ _ _).symm : _)\n[GOAL]\ncase h.e'_5\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ Scheme.Γ.map f.op ≫\n      Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen X r)))).op =\n    Scheme.Γ.map f.op ≫\n      Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))).op ≫\n        X.presheaf.map\n          (homOfLE\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj (Opposite.op ⊤).unop ≤\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj (Opposite.op ⊤).unop)).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_5.e_a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen X r)))).op =\n    Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))).op ≫\n      X.presheaf.map\n        (homOfLE\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj (Opposite.op ⊤).unop ≤\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj (Opposite.op ⊤).unop)).op\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_5.e_a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ X.presheaf.map\n      (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).counit ⊤).op =\n    X.presheaf.map (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion ↑U))).counit ⊤).op ≫\n      X.presheaf.map\n        (homOfLE\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ ≤\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op\n[PROOFSTEP]\nrefine' Eq.trans _ (X.presheaf.map_comp _ _)\n[GOAL]\ncase h.e'_5.e_a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ X.presheaf.map\n      (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).counit ⊤).op =\n    X.presheaf.map\n      ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion ↑U))).counit ⊤).op ≫\n        (homOfLE\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ ≤\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)\n[PROOFSTEP]\nchange X.presheaf.map _ = _\n[GOAL]\ncase h.e'_5.e_a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ X.presheaf.map\n      (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).counit ⊤).op =\n    X.presheaf.map\n      ((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion ↑U))).counit ⊤).op ≫\n        (homOfLE\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ ≤\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)).op)\n[PROOFSTEP]\ncongr!\n  -- Porting note: need to pass Algebra through explicitly\n[GOAL]\ncase hP₁.convert_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ P\n    (X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj (Opposite.op ⊤).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj (Opposite.op ⊤).unop)).op)\n[PROOFSTEP]\nconvert\n  @HoldsForLocalizationAway _ hP _ (Scheme.Γ.obj (Opposite.op (X.restrict (X.basicOpen r).openEmbedding))) _ _ ?_\n    (X.presheaf.map (eqToHom U.1.openEmbedding_obj_top).op r) ?_\n[GOAL]\ncase h.e'_5.h.h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\ne_1✝ :\n  ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))) =\n    (fun x =>\n        (forget CommRingCat).obj\n          (X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))))\n      r\nhe✝ :\n  CommRingCat.instCommRingα (Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))) =\n    CommRingCat.instCommRing'\n      (X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)))\n⊢ X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj (Opposite.op ⊤).unop ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj (Opposite.op ⊤).unop)).op =\n    algebraMap\n      ((fun x =>\n          (forget CommRingCat).obj\n            (X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))))\n        r)\n      ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X r))))))\n[PROOFSTEP]\nexact\n  RingHom.algebraMap_toAlgebra (R := Scheme.Γ.obj <| Opposite.op <| X.restrict (U.1.openEmbedding)) (S :=\n      Scheme.Γ.obj (Opposite.op <| X.restrict (X.affineBasicOpen r).1.openEmbedding)) _ |>.symm\n[GOAL]\ncase hP₁.convert_2.convert_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ IsLocalization.Away\n    (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n    ↑(Scheme.Γ.obj (Opposite.op (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion (Scheme.basicOpen X r))))))\n[PROOFSTEP]\ndsimp [Scheme.Γ]\n[GOAL]\ncase hP₁.convert_2.convert_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n⊢ IsLocalization.Away\n    (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n    ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤)))\n[PROOFSTEP]\nhave := U.2\n[GOAL]\ncase hP₁.convert_2.convert_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : ↑U ∈ Scheme.affineOpens X\n⊢ IsLocalization.Away\n    (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n    ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤)))\n[PROOFSTEP]\nrw [← U.1.openEmbedding_obj_top] at this \n[GOAL]\ncase hP₁.convert_2.convert_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\n⊢ IsLocalization.Away\n    (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n    ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤)))\n[PROOFSTEP]\nconvert (config := { typeEqs := true, transparency := .default }) isLocalization_basicOpen this _ using 5\n[GOAL]\ncase h.e'_4.h.e'_2.h.e'_6.h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ =\n    Scheme.basicOpen X\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\ncase h.e'_5.e'_2.e'_1.h.e'_6.h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\ne_4✝ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (Scheme.basicOpen X\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ =\n    Scheme.basicOpen X\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\ncase h.e'_6.e'_2.h.e'_2.h.e'_6.h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\ne_4✝ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (Scheme.basicOpen X\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\ne_5✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ =\n    RingedSpace.basicOpen X.toSheafedSpace\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\ncase h.e'_6.e'_5.h.e'_7.h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\ne_4✝¹ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (Scheme.basicOpen X\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\ne_5✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\ne_1✝ :\n  ↑(X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))) =\n    ↑(X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)))\ne_2✝ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (RingedSpace.basicOpen X.toSheafedSpace\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\ne_4✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ =\n    RingedSpace.basicOpen X.toSheafedSpace\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\ncase h.e'_6.e'_5.h.e'_8.e'_3\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\ne_4✝¹ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (Scheme.basicOpen X\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\ne_5✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\ne_1✝ :\n  ↑(X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))) =\n    ↑(X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)))\ne_2✝ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (RingedSpace.basicOpen X.toSheafedSpace\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\ne_4✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\ne_7✝ :\n  Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤) =\n    Opposite.op\n      (RingedSpace.basicOpen X.toSheafedSpace\n        (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ =\n    RingedSpace.basicOpen X.toSheafedSpace\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n[PROOFSTEP]\nall_goals rw [Opens.openEmbedding_obj_top]; exact (Scheme.basicOpen_res_eq _ _ _).symm\n[GOAL]\ncase h.e'_4.h.e'_2.h.e'_6.h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ =\n    Scheme.basicOpen X\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\ncase h.e'_4.h.e'_2.h.e'_6.h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\n⊢ Scheme.basicOpen X r =\n    Scheme.basicOpen X\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n[PROOFSTEP]\nexact (Scheme.basicOpen_res_eq _ _ _).symm\n[GOAL]\ncase h.e'_5.e'_2.e'_1.h.e'_6.h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\ne_4✝ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (Scheme.basicOpen X\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ =\n    Scheme.basicOpen X\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\ncase h.e'_5.e'_2.e'_1.h.e'_6.h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\ne_4✝ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (Scheme.basicOpen X\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\n⊢ Scheme.basicOpen X r =\n    Scheme.basicOpen X\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n[PROOFSTEP]\nexact (Scheme.basicOpen_res_eq _ _ _).symm\n[GOAL]\ncase h.e'_6.e'_2.h.e'_2.h.e'_6.h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\ne_4✝ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (Scheme.basicOpen X\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\ne_5✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ =\n    RingedSpace.basicOpen X.toSheafedSpace\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\ncase h.e'_6.e'_2.h.e'_2.h.e'_6.h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\ne_4✝ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (Scheme.basicOpen X\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\ne_5✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\n⊢ Scheme.basicOpen X r =\n    RingedSpace.basicOpen X.toSheafedSpace\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n[PROOFSTEP]\nexact (Scheme.basicOpen_res_eq _ _ _).symm\n[GOAL]\ncase h.e'_6.e'_5.h.e'_7.h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\ne_4✝¹ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (Scheme.basicOpen X\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\ne_5✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\ne_1✝ :\n  ↑(X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))) =\n    ↑(X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)))\ne_2✝ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (RingedSpace.basicOpen X.toSheafedSpace\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\ne_4✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ =\n    RingedSpace.basicOpen X.toSheafedSpace\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\ncase h.e'_6.e'_5.h.e'_7.h.e'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\ne_4✝¹ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (Scheme.basicOpen X\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\ne_5✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\ne_1✝ :\n  ↑(X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))) =\n    ↑(X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)))\ne_2✝ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (RingedSpace.basicOpen X.toSheafedSpace\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\ne_4✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\n⊢ Scheme.basicOpen X r =\n    RingedSpace.basicOpen X.toSheafedSpace\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n[PROOFSTEP]\nexact (Scheme.basicOpen_res_eq _ _ _).symm\n[GOAL]\ncase h.e'_6.e'_5.h.e'_8.e'_3\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\ne_4✝¹ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (Scheme.basicOpen X\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\ne_5✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\ne_1✝ :\n  ↑(X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))) =\n    ↑(X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)))\ne_2✝ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (RingedSpace.basicOpen X.toSheafedSpace\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\ne_4✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\ne_7✝ :\n  Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤) =\n    Opposite.op\n      (RingedSpace.basicOpen X.toSheafedSpace\n        (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤ =\n    RingedSpace.basicOpen X.toSheafedSpace\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\ncase h.e'_6.e'_5.h.e'_8.e'_3\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH✝ : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\nr : ↑(X.presheaf.obj (Opposite.op ↑U))\nH : P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\nthis : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ ∈ Scheme.affineOpens X\ne_4✝¹ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (Scheme.basicOpen X\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\ne_5✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\ne_1✝ :\n  ↑(X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤))) =\n    ↑(X.presheaf.obj (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤)))\ne_2✝ :\n  ↑(X.presheaf.obj\n        (Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤))) =\n    ↑(X.presheaf.obj\n        (Opposite.op\n          (RingedSpace.basicOpen X.toSheafedSpace\n            (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op)\n              r))))\nhe✝ : CommRing.toCommSemiring = CommRing.toCommSemiring\ne_4✝ : HEq CommRing.toCommSemiring CommRing.toCommSemiring\ne_7✝ :\n  Opposite.op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion (Scheme.basicOpen X r)))).obj ⊤) =\n    Opposite.op\n      (RingedSpace.basicOpen X.toSheafedSpace\n        (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r))\n⊢ Scheme.basicOpen X r =\n    RingedSpace.basicOpen X.toSheafedSpace\n      (↑(X.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ↑U))).obj ⊤ = ↑U)).op) r)\n[PROOFSTEP]\nexact (Scheme.basicOpen_res_eq _ _ _).symm\n[GOAL]\ncase hP₂\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\n⊢ ∀ (U : ↑(Scheme.affineOpens X)) (s : Finset ↑(X.presheaf.obj (Opposite.op ↑U))),\n    Ideal.span ↑s = ⊤ →\n      (∀ (f_1 : { x // x ∈ s }),\n          P\n            (Scheme.Γ.map\n              (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen X ↑f_1))) ≫ f).op)) →\n        P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n[PROOFSTEP]\nintrov hs hs'\n[GOAL]\ncase hP₂\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU✝ U : ↑(Scheme.affineOpens X)\ns : Finset ↑(X.presheaf.obj (Opposite.op ↑U))\nhs : Ideal.span ↑s = ⊤\nhs' :\n  ∀ (f_1 : { x // x ∈ s }),\n    P\n      (Scheme.Γ.map\n        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑(Scheme.affineBasicOpen X ↑f_1))) ≫ f).op)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)) ≫ f).op)\n[PROOFSTEP]\nexact sourceAffineLocally_of_source_open_cover_aux hP.respectsIso hP.2 _ _ _ hs hs'\n[GOAL]\ncase hS\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\n⊢ ⋃ (i : ↑(Set.range S)), ↑↑↑i = Set.univ\n[PROOFSTEP]\nrw [Set.eq_univ_iff_forall]\n[GOAL]\ncase hS\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\n⊢ ∀ (x : ↑↑X.toPresheafedSpace), x ∈ ⋃ (i : ↑(Set.range S)), ↑↑↑i\n[PROOFSTEP]\nintro x\n[GOAL]\ncase hS\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈ ⋃ (i : ↑(Set.range S)), ↑↑↑i\n[PROOFSTEP]\nrw [Set.mem_iUnion]\n[GOAL]\ncase hS\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\nx : ↑↑X.toPresheafedSpace\n⊢ ∃ i, x ∈ ↑↑↑i\n[PROOFSTEP]\nexact ⟨⟨_, 𝒰.f x, rfl⟩, 𝒰.Covers x⟩\n[GOAL]\ncase hS'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\n⊢ ∀ (U : ↑(Set.range S)), P (Scheme.Γ.map (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑↑U)) ≫ f).op)\n[PROOFSTEP]\nrintro ⟨_, i, rfl⟩\n[GOAL]\ncase hS'.mk.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\ni : 𝒰.J\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑↑{ val := S i, property := (_ : ∃ y, S y = S i) })) ≫\n          f).op)\n[PROOFSTEP]\nspecialize H i\n[GOAL]\ncase hS'.mk.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\ni : 𝒰.J\nH : P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑↑{ val := S i, property := (_ : ∃ y, S y = S i) })) ≫\n          f).op)\n[PROOFSTEP]\nrw [←\n  hP.respectsIso.cancel_right_isIso _\n    (Scheme.Γ.map\n      (IsOpenImmersion.isoOfRangeEq (𝒰.map i) (X.ofRestrict (S i).1.openEmbedding) Subtype.range_coe.symm).inv.op)] at\n  H \n[GOAL]\ncase hS'.mk.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nS : 𝒰.J → { x // x ∈ Scheme.affineOpens X } :=\n  fun i =>\n    {\n      val :=\n        { carrier := Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base,\n          is_open' := (_ : IsOpen (Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base)) },\n      property := (_ : IsAffineOpen (Scheme.Hom.opensRange (Scheme.OpenCover.map 𝒰 i))) }\nU : ↑(Scheme.affineOpens X)\ni : 𝒰.J\nH :\n  P\n    (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op ≫\n      Scheme.Γ.map\n        (IsOpenImmersion.isoOfRangeEq (Scheme.OpenCover.map 𝒰 i)\n              (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑(S i))))\n              (_ : Set.range ↑(Scheme.OpenCover.map 𝒰 i).val.base = Set.range Subtype.val)).inv.op)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑↑{ val := S i, property := (_ : ∃ y, S y = S i) })) ≫\n          f).op)\n[PROOFSTEP]\nrwa [← Scheme.Γ.map_comp, ← op_comp, IsOpenImmersion.isoOfRangeEq_inv, IsOpenImmersion.lift_fac_assoc] at H \n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\n⊢ List.TFAE\n    [sourceAffineLocally P f, ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op),\n      ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n        P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op),\n      ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)]\n[PROOFSTEP]\ntfae_have 1 → 4\n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\n⊢ sourceAffineLocally P f →\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\n[PROOFSTEP]\nintro H U g _ hg\n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝¹ : IsAffine Y\nf : X ⟶ Y\nH : sourceAffineLocally P f\nU : Scheme\ng : U ⟶ X\ninst✝ : IsAffine U\nhg : IsOpenImmersion g\n⊢ P (Scheme.Γ.map (g ≫ f).op)\n[PROOFSTEP]\nskip\n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝¹ : IsAffine Y\nf : X ⟶ Y\nH : sourceAffineLocally P f\nU : Scheme\ng : U ⟶ X\ninst✝ : IsAffine U\nhg : IsOpenImmersion g\n⊢ P (Scheme.Γ.map (g ≫ f).op)\n[PROOFSTEP]\nspecialize H ⟨⟨_, hg.base_open.open_range⟩, rangeIsAffineOpenOfOpenImmersion g⟩\n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝¹ : IsAffine Y\nf : X ⟶ Y\nU : Scheme\ng : U ⟶ X\ninst✝ : IsAffine U\nhg : IsOpenImmersion g\nH :\n  P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict X\n            (_ :\n              OpenEmbedding\n                ↑(Opens.inclusion\n                    ↑{ val := { carrier := Set.range ↑g.val.base, is_open' := (_ : IsOpen (Set.range ↑g.val.base)) },\n                        property := (_ : IsAffineOpen (Scheme.Hom.opensRange g)) })) ≫\n          f).op)\n⊢ P (Scheme.Γ.map (g ≫ f).op)\n[PROOFSTEP]\nrw [←\n  hP.respectsIso.cancel_right_isIso _\n    (Scheme.Γ.map\n      (IsOpenImmersion.isoOfRangeEq g (X.ofRestrict (Opens.openEmbedding ⟨_, hg.base_open.open_range⟩))\n          Subtype.range_coe.symm).hom.op),\n  ← Scheme.Γ.map_comp, ← op_comp, IsOpenImmersion.isoOfRangeEq_hom] at H \n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝¹ : IsAffine Y\nf : X ⟶ Y\nU : Scheme\ng : U ⟶ X\ninst✝ : IsAffine U\nhg : IsOpenImmersion g\nH :\n  P\n    (Scheme.Γ.map\n      (IsOpenImmersion.lift\n            (Scheme.ofRestrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      { carrier := Set.range ↑g.val.base, is_open' := (_ : IsOpen (Set.range ↑g.val.base)) })))\n            g\n            (_ :\n              Set.range ↑g.val.base ≤\n                Set.range\n                  ↑(Scheme.ofRestrict X\n                          (_ :\n                            OpenEmbedding\n                              ↑(Opens.inclusion\n                                  { carrier := Set.range ↑g.val.base,\n                                    is_open' := (_ : IsOpen (Set.range ↑g.val.base)) }))).val.base) ≫\n          Scheme.ofRestrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ↑{ val := { carrier := Set.range ↑g.val.base, is_open' := (_ : IsOpen (Set.range ↑g.val.base)) },\n                          property := (_ : IsAffineOpen (Scheme.Hom.opensRange g)) })) ≫\n            f).op)\n⊢ P (Scheme.Γ.map (g ≫ f).op)\n[PROOFSTEP]\nerw [IsOpenImmersion.lift_fac_assoc] at H \n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝¹ : IsAffine Y\nf : X ⟶ Y\nU : Scheme\ng : U ⟶ X\ninst✝ : IsAffine U\nhg : IsOpenImmersion g\nH : P (Scheme.Γ.map (g ≫ f).op)\n⊢ P (Scheme.Γ.map (g ≫ f).op)\n[PROOFSTEP]\nexact H\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f →\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\n⊢ List.TFAE\n    [sourceAffineLocally P f, ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op),\n      ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n        P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op),\n      ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)]\n[PROOFSTEP]\ntfae_have 4 → 3\n[GOAL]\ncase tfae_4_to_3\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f →\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\n⊢ (∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)) →\n    ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n[PROOFSTEP]\nintro H 𝒰 _ i\n[GOAL]\ncase tfae_4_to_3\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝¹ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f →\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\nH : ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\ni : 𝒰.J\n⊢ P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n[PROOFSTEP]\nskip\n[GOAL]\ncase tfae_4_to_3\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝¹ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f →\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\nH : ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\ni : 𝒰.J\n⊢ P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n[PROOFSTEP]\napply H\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f →\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)) →\n    ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ List.TFAE\n    [sourceAffineLocally P f, ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op),\n      ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n        P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op),\n      ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)]\n[PROOFSTEP]\ntfae_have 3 → 2\n[GOAL]\ncase tfae_3_to_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f →\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)) →\n    ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ (∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)) →\n    ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase tfae_3_to_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f →\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)) →\n    ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nH :\n  ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n    P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n[PROOFSTEP]\nrefine' ⟨X.affineCover, inferInstance, H _⟩\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f →\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)) →\n    ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)) →\n    ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ List.TFAE\n    [sourceAffineLocally P f, ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op),\n      ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n        P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op),\n      ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)]\n[PROOFSTEP]\ntfae_have 2 → 1\n[GOAL]\ncase tfae_2_to_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f →\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)) →\n    ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)) →\n    ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ (∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)) → sourceAffineLocally P f\n[PROOFSTEP]\nrintro ⟨𝒰, _, h𝒰⟩\n[GOAL]\ncase tfae_2_to_1.intro.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f →\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)) →\n    ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)) →\n    ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n𝒰 : Scheme.OpenCover X\nw✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nh𝒰 : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ sourceAffineLocally P f\n[PROOFSTEP]\nexact sourceAffineLocally_of_source_openCover hP f 𝒰 h𝒰\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f →\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)) →\n    ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)) →\n    ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ntfae_2_to_1 : (∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)) → sourceAffineLocally P f\n⊢ List.TFAE\n    [sourceAffineLocally P f, ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op),\n      ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n        P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op),\n      ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\n⊢ List.TFAE\n    [sourceAffineLocally P f, ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f),\n      ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f),\n      ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)]\n[PROOFSTEP]\ntfae_have 1 → 4\n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\n⊢ sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\n[PROOFSTEP]\nintro H U g hg V\n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH : sourceAffineLocally P f\nU : Scheme\ng : U ⟶ X\nhg : IsOpenImmersion g\nV : ↑(Scheme.affineOpens U)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict U (_ : OpenEmbedding ↑(Opens.inclusion ↑V)) ≫ g ≫ f).op)\n[PROOFSTEP]\nskip\n  -- Porting note: this has metavariable if I put it directly into rw\n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH : sourceAffineLocally P f\nU : Scheme\ng : U ⟶ X\nhg : IsOpenImmersion g\nV : ↑(Scheme.affineOpens U)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict U (_ : OpenEmbedding ↑(Opens.inclusion ↑V)) ≫ g ≫ f).op)\n[PROOFSTEP]\nhave := (hP.affine_openCover_TFAE f).out 0 3\n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH : sourceAffineLocally P f\nU : Scheme\ng : U ⟶ X\nhg : IsOpenImmersion g\nV : ↑(Scheme.affineOpens U)\nthis :\n  sourceAffineLocally P f ↔\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict U (_ : OpenEmbedding ↑(Opens.inclusion ↑V)) ≫ g ≫ f).op)\n[PROOFSTEP]\nrw [this] at H \n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH : ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\nU : Scheme\ng : U ⟶ X\nhg : IsOpenImmersion g\nV : ↑(Scheme.affineOpens U)\nthis :\n  sourceAffineLocally P f ↔\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict U (_ : OpenEmbedding ↑(Opens.inclusion ↑V)) ≫ g ≫ f).op)\n[PROOFSTEP]\nhaveI : IsAffine _ := V.2\n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH : ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\nU : Scheme\ng : U ⟶ X\nhg : IsOpenImmersion g\nV : ↑(Scheme.affineOpens U)\nthis✝ :\n  sourceAffineLocally P f ↔\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\nthis : IsAffine (Scheme.restrict U (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))\n⊢ P (Scheme.Γ.map (Scheme.ofRestrict U (_ : OpenEmbedding ↑(Opens.inclusion ↑V)) ≫ g ≫ f).op)\n[PROOFSTEP]\nrw [← Category.assoc]\n  -- Porting note: Lean could find this previously\n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH : ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\nU : Scheme\ng : U ⟶ X\nhg : IsOpenImmersion g\nV : ↑(Scheme.affineOpens U)\nthis✝ :\n  sourceAffineLocally P f ↔\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\nthis : IsAffine (Scheme.restrict U (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))\n⊢ P (Scheme.Γ.map ((Scheme.ofRestrict U (_ : OpenEmbedding ↑(Opens.inclusion ↑V)) ≫ g) ≫ f).op)\n[PROOFSTEP]\nhave : IsOpenImmersion <| (Scheme.ofRestrict U (Opens.openEmbedding V.val)) ≫ g :=\n  LocallyRingedSpace.IsOpenImmersion.comp _ _\n[GOAL]\ncase tfae_1_to_4\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH : ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\nU : Scheme\ng : U ⟶ X\nhg : IsOpenImmersion g\nV : ↑(Scheme.affineOpens U)\nthis✝¹ :\n  sourceAffineLocally P f ↔\n    ∀ {U : Scheme} (g : U ⟶ X) [inst : IsAffine U] [inst : IsOpenImmersion g], P (Scheme.Γ.map (g ≫ f).op)\nthis✝ : IsAffine (Scheme.restrict U (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))\nthis : IsOpenImmersion (Scheme.ofRestrict U (_ : OpenEmbedding ↑(Opens.inclusion ↑V)) ≫ g)\n⊢ P (Scheme.Γ.map ((Scheme.ofRestrict U (_ : OpenEmbedding ↑(Opens.inclusion ↑V)) ≫ g) ≫ f).op)\n[PROOFSTEP]\napply H\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\n⊢ List.TFAE\n    [sourceAffineLocally P f, ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f),\n      ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f),\n      ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)]\n[PROOFSTEP]\ntfae_have 4 → 3\n[GOAL]\ncase tfae_4_to_3\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\n⊢ (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n[PROOFSTEP]\nintro H 𝒰 _ i\n[GOAL]\ncase tfae_4_to_3\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\nH : ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\n𝒰 : Scheme.OpenCover X\ni✝ : 𝒰.J\ni : ↑(Scheme.affineOpens (Scheme.OpenCover.obj 𝒰 i✝))\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict (Scheme.OpenCover.obj 𝒰 i✝) (_ : OpenEmbedding ↑(Opens.inclusion ↑i)) ≫\n          Scheme.OpenCover.map 𝒰 i✝ ≫ f).op)\n[PROOFSTEP]\nskip\n[GOAL]\ncase tfae_4_to_3\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\nH : ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\n𝒰 : Scheme.OpenCover X\ni✝ : 𝒰.J\ni : ↑(Scheme.affineOpens (Scheme.OpenCover.obj 𝒰 i✝))\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.ofRestrict (Scheme.OpenCover.obj 𝒰 i✝) (_ : OpenEmbedding ↑(Opens.inclusion ↑i)) ≫\n          Scheme.OpenCover.map 𝒰 i✝ ≫ f).op)\n[PROOFSTEP]\napply H\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n⊢ List.TFAE\n    [sourceAffineLocally P f, ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f),\n      ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f),\n      ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)]\n[PROOFSTEP]\ntfae_have 3 → 2\n[GOAL]\ncase tfae_3_to_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n⊢ (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase tfae_3_to_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nH : ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n⊢ ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n[PROOFSTEP]\nrefine' ⟨X.affineCover, H _⟩\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n⊢ List.TFAE\n    [sourceAffineLocally P f, ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f),\n      ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f),\n      ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)]\n[PROOFSTEP]\ntfae_have 2 → 1\n[GOAL]\ncase tfae_2_to_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n⊢ (∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) → sourceAffineLocally P f\n[PROOFSTEP]\nrintro\n  ⟨𝒰, h𝒰⟩\n      -- Porting note: this has metavariable if I put it directly into rw\n[GOAL]\ncase tfae_2_to_1.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nh𝒰 : ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n⊢ sourceAffineLocally P f\n[PROOFSTEP]\nhave := (hP.affine_openCover_TFAE f).out 0 1\n[GOAL]\ncase tfae_2_to_1.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nh𝒰 : ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nthis : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ sourceAffineLocally P f\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase tfae_2_to_1.intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nh𝒰 : ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nthis : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n[PROOFSTEP]\nrefine' ⟨𝒰.bind fun _ => Scheme.affineCover _, _, _⟩\n[GOAL]\ncase tfae_2_to_1.intro.refine'_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nh𝒰 : ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nthis : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ ∀ (i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J),\n    IsAffine (Scheme.OpenCover.obj (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase tfae_2_to_1.intro.refine'_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nh𝒰 : ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nthis : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ni : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J\n⊢ IsAffine (Scheme.OpenCover.obj (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase tfae_2_to_1.intro.refine'_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nh𝒰 : ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nthis : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ni : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J\n⊢ IsAffine (Scheme.OpenCover.obj (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase tfae_2_to_1.intro.refine'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nh𝒰 : ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nthis : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ ∀ (i : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J),\n    P\n      (Scheme.Γ.map\n        (Scheme.OpenCover.map (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i ≫\n            f).op)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase tfae_2_to_1.intro.refine'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nh𝒰 : ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nthis : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ni : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i ≫ f).op)\n[PROOFSTEP]\nspecialize\n  h𝒰\n    i.1\n      -- Porting note: this has metavariable if I put it directly into rw\n[GOAL]\ncase tfae_2_to_1.intro.refine'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nthis : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ni : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J\nh𝒰 : sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i.fst ≫ f)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i ≫ f).op)\n[PROOFSTEP]\nhave := (hP.affine_openCover_TFAE (𝒰.map i.fst ≫ f)).out 0 3\n[GOAL]\ncase tfae_2_to_1.intro.refine'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nthis✝ : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ni : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J\nh𝒰 : sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i.fst ≫ f)\nthis :\n  sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i.fst ≫ f) ↔\n    ∀ {U : Scheme} (g : U ⟶ Scheme.OpenCover.obj 𝒰 i.fst) [inst : IsAffine U] [inst : IsOpenImmersion g],\n      P (Scheme.Γ.map (g ≫ Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i ≫ f).op)\n[PROOFSTEP]\nrw [this] at h𝒰 \n[GOAL]\ncase tfae_2_to_1.intro.refine'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nthis✝ : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ni : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J\nh𝒰 :\n  ∀ {U : Scheme} (g : U ⟶ Scheme.OpenCover.obj 𝒰 i.fst) [inst : IsAffine U] [inst : IsOpenImmersion g],\n    P (Scheme.Γ.map (g ≫ Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\nthis :\n  sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i.fst ≫ f) ↔\n    ∀ {U : Scheme} (g : U ⟶ Scheme.OpenCover.obj 𝒰 i.fst) [inst : IsAffine U] [inst : IsOpenImmersion g],\n      P (Scheme.Γ.map (g ≫ Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i ≫ f).op)\n[PROOFSTEP]\nerw [Category.assoc]\n  -- Porting note: this was discharged after the apply previously\n[GOAL]\ncase tfae_2_to_1.intro.refine'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nthis✝ : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ni : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J\nh𝒰 :\n  ∀ {U : Scheme} (g : U ⟶ Scheme.OpenCover.obj 𝒰 i.fst) [inst : IsAffine U] [inst : IsOpenImmersion g],\n    P (Scheme.Γ.map (g ≫ Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\nthis :\n  sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i.fst ≫ f) ↔\n    ∀ {U : Scheme} (g : U ⟶ Scheme.OpenCover.obj 𝒰 i.fst) [inst : IsAffine U] [inst : IsOpenImmersion g],\n      P (Scheme.Γ.map (g ≫ Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map ((fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i.fst) i.snd ≫\n          Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\n[PROOFSTEP]\nhave :\n  IsAffine (Scheme.OpenCover.obj (Scheme.OpenCover.bind 𝒰 fun x ↦ Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i) :=\n  by dsimp; infer_instance\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nthis✝ : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ni : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J\nh𝒰 :\n  ∀ {U : Scheme} (g : U ⟶ Scheme.OpenCover.obj 𝒰 i.fst) [inst : IsAffine U] [inst : IsOpenImmersion g],\n    P (Scheme.Γ.map (g ≫ Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\nthis :\n  sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i.fst ≫ f) ↔\n    ∀ {U : Scheme} (g : U ⟶ Scheme.OpenCover.obj 𝒰 i.fst) [inst : IsAffine U] [inst : IsOpenImmersion g],\n      P (Scheme.Γ.map (g ≫ Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\n⊢ IsAffine (Scheme.OpenCover.obj (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i)\n[PROOFSTEP]\ndsimp\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nthis✝ : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ni : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J\nh𝒰 :\n  ∀ {U : Scheme} (g : U ⟶ Scheme.OpenCover.obj 𝒰 i.fst) [inst : IsAffine U] [inst : IsOpenImmersion g],\n    P (Scheme.Γ.map (g ≫ Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\nthis :\n  sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i.fst ≫ f) ↔\n    ∀ {U : Scheme} (g : U ⟶ Scheme.OpenCover.obj 𝒰 i.fst) [inst : IsAffine U] [inst : IsOpenImmersion g],\n      P (Scheme.Γ.map (g ≫ Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\n⊢ IsAffine (Scheme.OpenCover.obj (Scheme.affineCover (Scheme.OpenCover.obj 𝒰 i.fst)) i.snd)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase tfae_2_to_1.intro.refine'_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n𝒰 : Scheme.OpenCover X\nthis✝¹ : sourceAffineLocally P f ↔ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\ni : (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)).J\nh𝒰 :\n  ∀ {U : Scheme} (g : U ⟶ Scheme.OpenCover.obj 𝒰 i.fst) [inst : IsAffine U] [inst : IsOpenImmersion g],\n    P (Scheme.Γ.map (g ≫ Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\nthis✝ :\n  sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i.fst ≫ f) ↔\n    ∀ {U : Scheme} (g : U ⟶ Scheme.OpenCover.obj 𝒰 i.fst) [inst : IsAffine U] [inst : IsOpenImmersion g],\n      P (Scheme.Γ.map (g ≫ Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\nthis :\n  IsAffine (Scheme.OpenCover.obj (Scheme.OpenCover.bind 𝒰 fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map ((fun x => Scheme.affineCover (Scheme.OpenCover.obj 𝒰 x)) i.fst) i.snd ≫\n          Scheme.OpenCover.map 𝒰 i.fst ≫ f).op)\n[PROOFSTEP]\napply @h𝒰 _ (show _ from _)\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\ntfae_1_to_4 :\n  sourceAffineLocally P f → ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)\ntfae_4_to_3 :\n  (∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)) →\n    ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_3_to_2 :\n  (∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) →\n    ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\ntfae_2_to_1 : (∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) → sourceAffineLocally P f\n⊢ List.TFAE\n    [sourceAffineLocally P f, ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f),\n      ∀ (𝒰 : Scheme.OpenCover X) (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f),\n      ∀ {U : Scheme} (g : U ⟶ X) [inst : IsOpenImmersion g], sourceAffineLocally P (g ≫ f)]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y Z : Scheme\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsOpenImmersion f\nH : sourceAffineLocally P g\n⊢ sourceAffineLocally P (f ≫ g)\n[PROOFSTEP]\nhave := (hP.openCover_TFAE g).out 0 3\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y Z : Scheme\ninst✝¹ : IsAffine Z\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsOpenImmersion f\nH : sourceAffineLocally P g\nthis :\n  sourceAffineLocally P g ↔ ∀ {U : Scheme} (g_1 : U ⟶ Y) [inst : IsOpenImmersion g_1], sourceAffineLocally P (g_1 ≫ g)\n⊢ sourceAffineLocally P (f ≫ g)\n[PROOFSTEP]\napply this.mp H\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\n⊢ sourceAffineLocally P f ↔ ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n[PROOFSTEP]\nrefine ⟨fun H => ?_, fun H => ?_⟩\n[GOAL]\ncase refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : sourceAffineLocally P f\n⊢ ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n[PROOFSTEP]\nhave h := (hP.affine_openCover_TFAE f).out 0 2\n[GOAL]\ncase refine_1\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : sourceAffineLocally P f\nh :\n  sourceAffineLocally P f ↔\n    ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n[PROOFSTEP]\napply h.mp\n[GOAL]\ncase refine_1.a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : sourceAffineLocally P f\nh :\n  sourceAffineLocally P f ↔\n    ∀ (𝒰 : Scheme.OpenCover X) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ sourceAffineLocally P f\n[PROOFSTEP]\nexact H\n[GOAL]\ncase refine_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n⊢ sourceAffineLocally P f\n[PROOFSTEP]\nhave h := (hP.affine_openCover_TFAE f).out 1 0\n[GOAL]\ncase refine_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nh : (∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)) ↔ sourceAffineLocally P f\n⊢ sourceAffineLocally P f\n[PROOFSTEP]\napply h.mp\n[GOAL]\ncase refine_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\ninst✝¹ : IsAffine Y\n𝒰 : Scheme.OpenCover X\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nH : ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\nh : (∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)) ↔ sourceAffineLocally P f\n⊢ ∃ 𝒰 x, ∀ (i : 𝒰.J), P (Scheme.Γ.map (Scheme.OpenCover.map 𝒰 i ≫ f).op)\n[PROOFSTEP]\nuse 𝒰\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\n⊢ affineLocally P f ↔ ∀ (i : 𝒰.J), affineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\n⊢ affineLocally P f → ∀ (i : 𝒰.J), affineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\n[PROOFSTEP]\nintro H i U\n[GOAL]\ncase mp\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nH : affineLocally P f\ni : 𝒰.J\nU : ↑(Scheme.affineOpens Y)\n⊢ sourceAffineLocally P ((Scheme.OpenCover.map 𝒰 i ≫ f) ∣_ ↑U)\n[PROOFSTEP]\nrw [morphismRestrict_comp]\n[GOAL]\ncase mp\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nH : affineLocally P f\ni : 𝒰.J\nU : ↑(Scheme.affineOpens Y)\n⊢ sourceAffineLocally P ((Scheme.OpenCover.map 𝒰 i ∣_ (Opens.map f.val.base).obj ↑U) ≫ f ∣_ ↑U)\n[PROOFSTEP]\ndelta morphismRestrict\n[GOAL]\ncase mp\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nH : affineLocally P f\ni : 𝒰.J\nU : ↑(Scheme.affineOpens Y)\n⊢ sourceAffineLocally P\n    (((pullbackRestrictIsoRestrict (Scheme.OpenCover.map 𝒰 i) ((Opens.map f.val.base).obj ↑U)).inv ≫ pullback.snd) ≫\n      (pullbackRestrictIsoRestrict f ↑U).inv ≫ pullback.snd)\n[PROOFSTEP]\nhave : IsAffine (Scheme.restrict Y <| Opens.openEmbedding U.val) := U.property\n[GOAL]\ncase mp\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nH : affineLocally P f\ni : 𝒰.J\nU : ↑(Scheme.affineOpens Y)\nthis : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n⊢ sourceAffineLocally P\n    (((pullbackRestrictIsoRestrict (Scheme.OpenCover.map 𝒰 i) ((Opens.map f.val.base).obj ↑U)).inv ≫ pullback.snd) ≫\n      (pullbackRestrictIsoRestrict f ↑U).inv ≫ pullback.snd)\n[PROOFSTEP]\nhave :\n  IsOpenImmersion\n    ((pullbackRestrictIsoRestrict (Scheme.OpenCover.map 𝒰 i) ((Opens.map f.val.base).obj ↑U)).inv ≫ pullback.snd) :=\n  LocallyRingedSpace.IsOpenImmersion.comp _ _\n[GOAL]\ncase mp\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nH : affineLocally P f\ni : 𝒰.J\nU : ↑(Scheme.affineOpens Y)\nthis✝ : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\nthis :\n  IsOpenImmersion\n    ((pullbackRestrictIsoRestrict (Scheme.OpenCover.map 𝒰 i) ((Opens.map f.val.base).obj ↑U)).inv ≫ pullback.snd)\n⊢ sourceAffineLocally P\n    (((pullbackRestrictIsoRestrict (Scheme.OpenCover.map 𝒰 i) ((Opens.map f.val.base).obj ↑U)).inv ≫ pullback.snd) ≫\n      (pullbackRestrictIsoRestrict f ↑U).inv ≫ pullback.snd)\n[PROOFSTEP]\napply hP.sourceAffineLocally_comp_of_isOpenImmersion\n[GOAL]\ncase mp.H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nH : affineLocally P f\ni : 𝒰.J\nU : ↑(Scheme.affineOpens Y)\nthis✝ : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\nthis :\n  IsOpenImmersion\n    ((pullbackRestrictIsoRestrict (Scheme.OpenCover.map 𝒰 i) ((Opens.map f.val.base).obj ↑U)).inv ≫ pullback.snd)\n⊢ sourceAffineLocally P ((pullbackRestrictIsoRestrict f ↑U).inv ≫ pullback.snd)\n[PROOFSTEP]\napply H\n[GOAL]\ncase mpr\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\n⊢ (∀ (i : 𝒰.J), affineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)) → affineLocally P f\n[PROOFSTEP]\nintro H U\n[GOAL]\ncase mpr\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nH : ∀ (i : 𝒰.J), affineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nU : ↑(Scheme.affineOpens Y)\n⊢ sourceAffineLocally P (f ∣_ ↑U)\n[PROOFSTEP]\nhaveI : IsAffine _ := U.2\n[GOAL]\ncase mpr\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nH : ∀ (i : 𝒰.J), affineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nU : ↑(Scheme.affineOpens Y)\nthis : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n⊢ sourceAffineLocally P (f ∣_ ↑U)\n[PROOFSTEP]\napply ((hP.openCover_TFAE (f ∣_ U.1)).out 1 0).mp\n[GOAL]\ncase mpr\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nH : ∀ (i : 𝒰.J), affineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nU : ↑(Scheme.affineOpens Y)\nthis : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n⊢ ∃ 𝒰, ∀ (i : 𝒰.J), sourceAffineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f ∣_ ↑U)\n[PROOFSTEP]\nuse 𝒰.pullbackCover (X.ofRestrict _)\n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nH : ∀ (i : 𝒰.J), affineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nU : ↑(Scheme.affineOpens Y)\nthis : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n⊢ ∀\n    (i :\n      (Scheme.OpenCover.pullbackCover 𝒰\n          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))).J),\n    sourceAffineLocally P\n      (Scheme.OpenCover.map\n          (Scheme.OpenCover.pullbackCover 𝒰\n            (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\n          i ≫\n        f ∣_ ↑U)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nH : ∀ (i : 𝒰.J), affineLocally P (Scheme.OpenCover.map 𝒰 i ≫ f)\nU : ↑(Scheme.affineOpens Y)\nthis : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni :\n  (Scheme.OpenCover.pullbackCover 𝒰\n      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))).J\n⊢ sourceAffineLocally P\n    (Scheme.OpenCover.map\n        (Scheme.OpenCover.pullbackCover 𝒰\n          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\n        i ≫\n      f ∣_ ↑U)\n[PROOFSTEP]\nspecialize H i U\n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nU : ↑(Scheme.affineOpens Y)\nthis : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni :\n  (Scheme.OpenCover.pullbackCover 𝒰\n      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))).J\nH : sourceAffineLocally P ((Scheme.OpenCover.map 𝒰 i ≫ f) ∣_ ↑U)\n⊢ sourceAffineLocally P\n    (Scheme.OpenCover.map\n        (Scheme.OpenCover.pullbackCover 𝒰\n          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\n        i ≫\n      f ∣_ ↑U)\n[PROOFSTEP]\nrw [morphismRestrict_comp] at H \n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nU : ↑(Scheme.affineOpens Y)\nthis : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni :\n  (Scheme.OpenCover.pullbackCover 𝒰\n      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))).J\nH : sourceAffineLocally P ((Scheme.OpenCover.map 𝒰 i ∣_ (Opens.map f.val.base).obj ↑U) ≫ f ∣_ ↑U)\n⊢ sourceAffineLocally P\n    (Scheme.OpenCover.map\n        (Scheme.OpenCover.pullbackCover 𝒰\n          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\n        i ≫\n      f ∣_ ↑U)\n[PROOFSTEP]\ndelta morphismRestrict at H \n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nU : ↑(Scheme.affineOpens Y)\nthis : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni :\n  (Scheme.OpenCover.pullbackCover 𝒰\n      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))).J\nH :\n  sourceAffineLocally P\n    (((pullbackRestrictIsoRestrict (Scheme.OpenCover.map 𝒰 i) ((Opens.map f.val.base).obj ↑U)).inv ≫ pullback.snd) ≫\n      (pullbackRestrictIsoRestrict f ↑U).inv ≫ pullback.snd)\n⊢ sourceAffineLocally P\n    (Scheme.OpenCover.map\n        (Scheme.OpenCover.pullbackCover 𝒰\n          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\n        i ≫\n      f ∣_ ↑U)\n[PROOFSTEP]\nhave := sourceAffineLocally_respectsIso hP.respectsIso\n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nU : ↑(Scheme.affineOpens Y)\nthis✝ : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni :\n  (Scheme.OpenCover.pullbackCover 𝒰\n      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))).J\nH :\n  sourceAffineLocally P\n    (((pullbackRestrictIsoRestrict (Scheme.OpenCover.map 𝒰 i) ((Opens.map f.val.base).obj ↑U)).inv ≫ pullback.snd) ≫\n      (pullbackRestrictIsoRestrict f ↑U).inv ≫ pullback.snd)\nthis : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty (sourceAffineLocally P))\n⊢ sourceAffineLocally P\n    (Scheme.OpenCover.map\n        (Scheme.OpenCover.pullbackCover 𝒰\n          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\n        i ≫\n      f ∣_ ↑U)\n[PROOFSTEP]\nrw [Category.assoc, affine_cancel_left_isIso this, ← affine_cancel_left_isIso this (pullbackSymmetry _ _).hom,\n  pullbackSymmetry_hom_comp_snd_assoc] at H \n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\n𝒰 : Scheme.OpenCover X\nU : ↑(Scheme.affineOpens Y)\nthis✝ : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni :\n  (Scheme.OpenCover.pullbackCover 𝒰\n      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U))))).J\nH✝ : sourceAffineLocally P (pullback.snd ≫ (pullbackRestrictIsoRestrict f ↑U).inv ≫ pullback.snd)\nH : sourceAffineLocally P (pullback.fst ≫ (pullbackRestrictIsoRestrict f ↑U).inv ≫ pullback.snd)\nthis : MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty (sourceAffineLocally P))\n⊢ sourceAffineLocally P\n    (Scheme.OpenCover.map\n        (Scheme.OpenCover.pullbackCover 𝒰\n          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj ↑U)))))\n        i ≫\n      f ∣_ ↑U)\n[PROOFSTEP]\nexact H\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\n⊢ affineLocally P f\n[PROOFSTEP]\nintro U\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\n⊢ sourceAffineLocally P (f ∣_ ↑U)\n[PROOFSTEP]\nhaveI H : IsAffine _ := U.2\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n⊢ sourceAffineLocally P (f ∣_ ↑U)\n[PROOFSTEP]\nrw [← Category.comp_id (f ∣_ U)]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n⊢ sourceAffineLocally P ((f ∣_ ↑U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))\n[PROOFSTEP]\napply hP.sourceAffineLocally_comp_of_isOpenImmersion\n[GOAL]\ncase H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n⊢ sourceAffineLocally P (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))\n[PROOFSTEP]\nrw [@source_affine_openCover_iff _ hP _ _ _ _ (Scheme.openCoverOfIsIso (𝟙 _)) (_)]\n[GOAL]\ncase H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n⊢ ∀ (i : (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))).J),\n    P\n      (Scheme.Γ.map\n        (Scheme.OpenCover.map\n              (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))) i ≫\n            𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))).op)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni : (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))).J\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))))\n            i ≫\n          𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))).op)\n[PROOFSTEP]\nerw [Category.id_comp, op_id, Scheme.Γ.map_id]\n[GOAL]\ncase H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni : (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))).J\n⊢ P (𝟙 (Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))))\n[PROOFSTEP]\nlet esto := Scheme.Γ.obj (Opposite.op (Y.restrict <| Opens.openEmbedding U.val))\n[GOAL]\ncase H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni : (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))).J\nesto : CommRingCat := Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))\n⊢ P (𝟙 (Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))))\n[PROOFSTEP]\nlet eso :=\n  Scheme.Γ.obj\n    (Opposite.op ((Scheme.openCoverOfIsIso (𝟙 (Y.restrict <| Opens.openEmbedding U.val))).obj i))\n      -- Porting note: Lean this needed this spelled out before\n          -- convert hP.HoldsAwayLocalizationAway _ (1 : Scheme.Γ.obj _) _\n[GOAL]\ncase H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni : (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))).J\nesto : CommRingCat := Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))\neso : CommRingCat :=\n  Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))))\n        i))\n⊢ P (𝟙 (Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))))\n[PROOFSTEP]\nhave : 𝟙 (Scheme.Γ.obj (Opposite.op (Y.restrict <| Opens.openEmbedding U.val))) = @algebraMap esto eso _ _ (_) :=\n  (RingHom.algebraMap_toAlgebra _).symm\n[GOAL]\ncase H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni : (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))).J\nesto : CommRingCat := Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))\neso : CommRingCat :=\n  Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))))\n        i))\nthis :\n  𝟙 (Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))) = algebraMap ↑esto ↑eso\n⊢ P (𝟙 (Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))))\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni : (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))).J\nesto : CommRingCat := Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))\neso : CommRingCat :=\n  Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))))\n        i))\nthis :\n  𝟙 (Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))) = algebraMap ↑esto ↑eso\n⊢ P (algebraMap ↑esto ↑eso)\n[PROOFSTEP]\nhave := hP.HoldsForLocalizationAway\n[GOAL]\ncase H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni : (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))).J\nesto : CommRingCat := Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))\neso : CommRingCat :=\n  Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))))\n        i))\nthis✝ :\n  𝟙 (Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))) = algebraMap ↑esto ↑eso\nthis : RingHom.HoldsForLocalizationAway P\n⊢ P (algebraMap ↑esto ↑eso)\n[PROOFSTEP]\nconvert @this esto eso _ _ ?_ ?_ ?_\n[GOAL]\ncase H.convert_2\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni : (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))).J\nesto : CommRingCat := Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))\neso : CommRingCat :=\n  Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))))\n        i))\nthis✝ :\n  𝟙 (Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))) = algebraMap ↑esto ↑eso\nthis : RingHom.HoldsForLocalizationAway P\n⊢ ↑esto\n[PROOFSTEP]\nexact\n  1\n    -- Porting note: again we have to bypass TC synthesis to keep Lean from running away\n[GOAL]\ncase H.convert_3\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni : (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))).J\nesto : CommRingCat := Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))\neso : CommRingCat :=\n  Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))))\n        i))\nthis✝ :\n  𝟙 (Scheme.Γ.obj (Opposite.op (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))) = algebraMap ↑esto ↑eso\nthis : RingHom.HoldsForLocalizationAway P\n⊢ IsLocalization.Away 1 ↑eso\n[PROOFSTEP]\nrefine' @IsLocalization.away_of_isUnit_of_bijective _ _ _ _ (_) _ isUnit_one Function.bijective_id\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n⊢ ∀ (i : (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))).J),\n    IsAffine\n      (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))))\n        i)\n[PROOFSTEP]\nintro\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP✝ hP : PropertyIsLocal P\nX Y : Scheme\nf : X ⟶ Y\nhf : IsOpenImmersion f\nU : ↑(Scheme.affineOpens Y)\nH : IsAffine (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\ni✝ : (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U))))).J\n⊢ IsAffine\n    (Scheme.OpenCover.obj (Scheme.openCoverOfIsIso (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))))\n      i✝)\n[PROOFSTEP]\nexact H\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\n⊢ affineLocally P f\n[PROOFSTEP]\nlet 𝒰 : ∀ i, ((Z.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=\n  by\n  intro i\n  refine' Scheme.OpenCover.bind _ fun i => Scheme.affineCover _\n  apply Scheme.OpenCover.pushforwardIso _ (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom\n  apply Scheme.Pullback.openCoverOfRight\n  exact (pullback g (Z.affineCover.map i)).affineCover\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\n⊢ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n    Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i)\n[PROOFSTEP]\nintro i\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J\n⊢ Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i)\n[PROOFSTEP]\nrefine' Scheme.OpenCover.bind _ fun i => Scheme.affineCover _\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J\n⊢ Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i)\n[PROOFSTEP]\napply Scheme.OpenCover.pushforwardIso _ (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J\n⊢ Scheme.OpenCover (pullback f pullback.fst)\n[PROOFSTEP]\napply Scheme.Pullback.openCoverOfRight\n[GOAL]\ncase 𝒰\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J\n⊢ Scheme.OpenCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))\n[PROOFSTEP]\nexact (pullback g (Z.affineCover.map i)).affineCover\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\n⊢ affineLocally P f\n[PROOFSTEP]\nhave h𝒰 : ∀ i j, IsAffine ((𝒰 i).obj j) := by dsimp; infer_instance\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\n⊢ ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n[PROOFSTEP]\ndsimp\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\n⊢ ∀ (i : (Scheme.affineCover Z).J)\n    (j :\n      (i_1 : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J) ×\n        (Scheme.affineCover\n            (pullback f\n              (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i)))\n                  i_1 ≫\n                pullback.fst))).J),\n    IsAffine\n      (Scheme.OpenCover.obj\n        (Scheme.affineCover\n          (pullback f\n            (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i)))\n                j.fst ≫\n              pullback.fst)))\n        j.snd)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n⊢ affineLocally P f\n[PROOFSTEP]\nlet 𝒰' := (Z.affineCover.pullbackCover g).bind fun i => Scheme.affineCover _\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\n⊢ affineLocally P f\n[PROOFSTEP]\nhave h𝒰' : ∀ i, IsAffine (𝒰'.obj i) := by dsimp; infer_instance\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\n⊢ ∀ (i : 𝒰'.J), IsAffine (Scheme.OpenCover.obj 𝒰' i)\n[PROOFSTEP]\ndsimp\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\n⊢ ∀\n    (i :\n      (i : (Scheme.affineCover Z).J) ×\n        (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J),\n    IsAffine\n      (Scheme.OpenCover.obj (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i.fst))) i.snd)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\nh𝒰' : ∀ (i : 𝒰'.J), IsAffine (Scheme.OpenCover.obj 𝒰' i)\n⊢ affineLocally P f\n[PROOFSTEP]\nrw [hP.affine_openCover_iff f 𝒰' fun i => Scheme.affineCover _]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nh : affineLocally P (f ≫ g)\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\nh𝒰' : ∀ (i : 𝒰'.J), IsAffine (Scheme.OpenCover.obj 𝒰' i)\n⊢ ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰' f).J)\n    (j : (Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover 𝒰' f) i)).J),\n    P\n      (Scheme.Γ.map\n        (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover 𝒰' f) i)) j ≫\n            pullback.snd).op)\n[PROOFSTEP]\nrw [hP.affine_openCover_iff (f ≫ g) Z.affineCover 𝒰] at h \n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    P (Scheme.Γ.map (Scheme.OpenCover.map (𝒰 i) j ≫ pullback.snd).op)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\nh𝒰' : ∀ (i : 𝒰'.J), IsAffine (Scheme.OpenCover.obj 𝒰' i)\n⊢ ∀ (i : (Scheme.OpenCover.pullbackCover 𝒰' f).J)\n    (j : (Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover 𝒰' f) i)).J),\n    P\n      (Scheme.Γ.map\n        (Scheme.OpenCover.map (Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover 𝒰' f) i)) j ≫\n            pullback.snd).op)\n[PROOFSTEP]\nrintro ⟨i, j⟩ k\n[GOAL]\ncase mk\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    P (Scheme.Γ.map (Scheme.OpenCover.map (𝒰 i) j ≫ pullback.snd).op)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\nh𝒰' : ∀ (i : 𝒰'.J), IsAffine (Scheme.OpenCover.obj 𝒰' i)\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g).J\nj :\n  ((fun i => Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)) i).J\nk : (Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover 𝒰' f) { fst := i, snd := j })).J\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover 𝒰' f) { fst := i, snd := j })) k ≫\n          pullback.snd).op)\n[PROOFSTEP]\ndsimp at i j k \n[GOAL]\ncase mk\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    P (Scheme.Γ.map (Scheme.OpenCover.map (𝒰 i) j ≫ pullback.snd).op)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\nh𝒰' : ∀ (i : 𝒰'.J), IsAffine (Scheme.OpenCover.obj 𝒰' i)\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n          pullback.fst))).J\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover 𝒰' f) { fst := i, snd := j })) k ≫\n          pullback.snd).op)\n[PROOFSTEP]\nspecialize h i ⟨j, k⟩\n[GOAL]\ncase mk\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\nh𝒰' : ∀ (i : 𝒰'.J), IsAffine (Scheme.OpenCover.obj 𝒰' i)\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n          pullback.fst))).J\nh : P (Scheme.Γ.map (Scheme.OpenCover.map (𝒰 i) { fst := j, snd := k } ≫ pullback.snd).op)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover 𝒰' f) { fst := i, snd := j })) k ≫\n          pullback.snd).op)\n[PROOFSTEP]\ndsimp only [Scheme.OpenCover.bind_map, Scheme.OpenCover.pushforwardIso_obj, Scheme.Pullback.openCoverOfRight_obj,\n  Scheme.OpenCover.pushforwardIso_map, Scheme.Pullback.openCoverOfRight_map, Scheme.OpenCover.bind_obj,\n  Scheme.OpenCover.pullbackCover_obj, Scheme.OpenCover.pullbackCover_map] at h ⊢\n[GOAL]\ncase mk\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\nh𝒰' : ∀ (i : 𝒰'.J), IsAffine (Scheme.OpenCover.obj 𝒰' i)\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n          pullback.fst))).J\nh :\n  P\n    (Scheme.Γ.map\n      ((Scheme.OpenCover.map\n              (Scheme.affineCover\n                (pullback f\n                  (Scheme.OpenCover.map\n                      (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n                    pullback.fst)))\n              k ≫\n            pullback.map f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i)))\n                    j ≫\n                  pullback.fst)\n                f pullback.fst (𝟙 X)\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i)))\n                  j)\n                (𝟙 Y) (_ : f ≫ 𝟙 Y = 𝟙 X ≫ f)\n                (_ :\n                  (Scheme.OpenCover.map\n                          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n                        pullback.fst) ≫\n                      𝟙 Y =\n                    Scheme.OpenCover.map\n                        (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n                      pullback.fst) ≫\n              (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom) ≫\n          pullback.snd).op)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover\n              (pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i)))\n                    j ≫\n                  pullback.fst)))\n            k ≫\n          pullback.snd).op)\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc, pullbackRightPullbackFstIso_hom_snd, pullback.lift_snd_assoc, Category.assoc, ←\n  Category.assoc, op_comp, Functor.map_comp] at h \n[GOAL]\ncase mk\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\nh𝒰' : ∀ (i : 𝒰'.J), IsAffine (Scheme.OpenCover.obj 𝒰' i)\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n          pullback.fst))).J\nh :\n  P\n    (Scheme.Γ.map\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n            pullback.snd).op ≫\n      Scheme.Γ.map\n        (Scheme.OpenCover.map\n              (Scheme.affineCover\n                (pullback f\n                  (Scheme.OpenCover.map\n                      (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n                    pullback.fst)))\n              k ≫\n            pullback.snd).op)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover\n              (pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i)))\n                    j ≫\n                  pullback.fst)))\n            k ≫\n          pullback.snd).op)\n[PROOFSTEP]\nlet f' :=\n  Scheme.Γ.map\n    (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n        pullback.snd).op\n[GOAL]\ncase mk\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\nh𝒰' : ∀ (i : 𝒰'.J), IsAffine (Scheme.OpenCover.obj 𝒰' i)\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n          pullback.fst))).J\nh :\n  P\n    (Scheme.Γ.map\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n            pullback.snd).op ≫\n      Scheme.Γ.map\n        (Scheme.OpenCover.map\n              (Scheme.affineCover\n                (pullback f\n                  (Scheme.OpenCover.map\n                      (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n                    pullback.fst)))\n              k ≫\n            pullback.snd).op)\nf' : Scheme.Γ.obj (Opposite.op (Scheme.OpenCover.obj (Scheme.affineCover Z) i)) ⟶\n  Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j)) :=\n  Scheme.Γ.map\n    (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n        pullback.snd).op\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover\n              (pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i)))\n                    j ≫\n                  pullback.fst)))\n            k ≫\n          pullback.snd).op)\n[PROOFSTEP]\nlet g' :=\n  Scheme.Γ.map\n    (Scheme.OpenCover.map\n          (Scheme.affineCover\n            (pullback f\n              (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i)))\n                  j ≫\n                pullback.fst)))\n          k ≫\n        pullback.snd).op\n[GOAL]\ncase mk\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\nh𝒰' : ∀ (i : 𝒰'.J), IsAffine (Scheme.OpenCover.obj 𝒰' i)\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n          pullback.fst))).J\nh :\n  P\n    (Scheme.Γ.map\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n            pullback.snd).op ≫\n      Scheme.Γ.map\n        (Scheme.OpenCover.map\n              (Scheme.affineCover\n                (pullback f\n                  (Scheme.OpenCover.map\n                      (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n                    pullback.fst)))\n              k ≫\n            pullback.snd).op)\nf' : Scheme.Γ.obj (Opposite.op (Scheme.OpenCover.obj (Scheme.affineCover Z) i)) ⟶\n  Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j)) :=\n  Scheme.Γ.map\n    (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n        pullback.snd).op\ng' : Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j)) ⟶\n  Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj\n        (Scheme.affineCover\n          (pullback f\n            (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n              pullback.fst)))\n        k)) :=\n  Scheme.Γ.map\n    (Scheme.OpenCover.map\n          (Scheme.affineCover\n            (pullback f\n              (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i)))\n                  j ≫\n                pullback.fst)))\n          k ≫\n        pullback.snd).op\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover\n              (pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i)))\n                    j ≫\n                  pullback.fst)))\n            k ≫\n          pullback.snd).op)\n[PROOFSTEP]\nconvert H f' g' ?_\n[GOAL]\ncase mk\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nH :\n  ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    P (comp g f) → P g\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n          i_1)\nh𝒰 :\n  ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n𝒰' : Scheme.OpenCover Y :=\n  Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun i =>\n    Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) i)\nh𝒰' : ∀ (i : 𝒰'.J), IsAffine (Scheme.OpenCover.obj 𝒰' i)\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n          pullback.fst))).J\nh :\n  P\n    (Scheme.Γ.map\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n            pullback.snd).op ≫\n      Scheme.Γ.map\n        (Scheme.OpenCover.map\n              (Scheme.affineCover\n                (pullback f\n                  (Scheme.OpenCover.map\n                      (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n                    pullback.fst)))\n              k ≫\n            pullback.snd).op)\nf' : Scheme.Γ.obj (Opposite.op (Scheme.OpenCover.obj (Scheme.affineCover Z) i)) ⟶\n  Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j)) :=\n  Scheme.Γ.map\n    (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n        pullback.snd).op\ng' : Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j)) ⟶\n  Scheme.Γ.obj\n    (Opposite.op\n      (Scheme.OpenCover.obj\n        (Scheme.affineCover\n          (pullback f\n            (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))) j ≫\n              pullback.fst)))\n        k)) :=\n  Scheme.Γ.map\n    (Scheme.OpenCover.map\n          (Scheme.affineCover\n            (pullback f\n              (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i)))\n                  j ≫\n                pullback.fst)))\n          k ≫\n        pullback.snd).op\n⊢ P (comp g' f')\n[PROOFSTEP]\nexact h\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\n⊢ MorphismProperty.StableUnderComposition (affineLocally P)\n[PROOFSTEP]\nintro X Y S f g hf hg\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n⊢ affineLocally P (f ≫ g)\n[PROOFSTEP]\nlet 𝒰 : ∀ i, ((S.affineCover.pullbackCover (f ≫ g)).obj i).OpenCover :=\n  by\n  intro i\n  refine' Scheme.OpenCover.bind _ fun i => Scheme.affineCover _\n  apply Scheme.OpenCover.pushforwardIso _ (pullbackRightPullbackFstIso g (S.affineCover.map i) f).hom\n  apply Scheme.Pullback.openCoverOfRight\n  exact (pullback g (S.affineCover.map i)).affineCover\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n⊢ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n    Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i)\n[PROOFSTEP]\nintro i\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J\n⊢ Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i)\n[PROOFSTEP]\nrefine' Scheme.OpenCover.bind _ fun i => Scheme.affineCover _\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J\n⊢ Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i)\n[PROOFSTEP]\napply Scheme.OpenCover.pushforwardIso _ (pullbackRightPullbackFstIso g (S.affineCover.map i) f).hom\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J\n⊢ Scheme.OpenCover (pullback f pullback.fst)\n[PROOFSTEP]\napply Scheme.Pullback.openCoverOfRight\n[GOAL]\ncase 𝒰\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J\n⊢ Scheme.OpenCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))\n[PROOFSTEP]\nexact (pullback g (S.affineCover.map i)).affineCover\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\n⊢ affineLocally P (f ≫ g)\n[PROOFSTEP]\napply (@affine_openCover_iff _ hP _ _ (f ≫ g) S.affineCover _ ?_ ?_).mpr\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\n⊢ ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) (j : (?m.591569 i).J),\n    P (Scheme.Γ.map (Scheme.OpenCover.map (?m.591569 i) j ≫ pullback.snd).op)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\n⊢ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n    Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i)\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\n⊢ ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) (j : (?m.591569 i).J),\n    IsAffine (Scheme.OpenCover.obj (?m.591569 i) j)\n[PROOFSTEP]\nrotate_left\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\n⊢ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n    Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i)\n[PROOFSTEP]\nexact 𝒰\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\n⊢ ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) (j : (𝒰 i).J),\n    IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n[PROOFSTEP]\nintro i j\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J\nj : (𝒰 i).J\n⊢ IsAffine (Scheme.OpenCover.obj (𝒰 i) j)\n[PROOFSTEP]\ndsimp at *\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J\nj : (𝒰 i).J\n⊢ IsAffine\n    (Scheme.OpenCover.obj\n      (Scheme.affineCover\n        (pullback f\n          (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i)))\n              j.fst ≫\n            pullback.fst)))\n      j.snd)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\n⊢ ∀ (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) (j : (𝒰 i).J),\n    P (Scheme.Γ.map (Scheme.OpenCover.map (𝒰 i) j ≫ pullback.snd).op)\n[PROOFSTEP]\nrintro i ⟨j, k⟩\n[GOAL]\ncase mk\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J\nj :\n  (Scheme.OpenCover.pushforwardIso\n      (Scheme.Pullback.openCoverOfRight\n        (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n      (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom).J\nk :\n  ((fun i_1 =>\n        Scheme.affineCover\n          (Scheme.OpenCover.obj\n            (Scheme.OpenCover.pushforwardIso\n              (Scheme.Pullback.openCoverOfRight\n                (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n              (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n            i_1))\n      j).J\n⊢ P (Scheme.Γ.map (Scheme.OpenCover.map (𝒰 i) { fst := j, snd := k } ≫ pullback.snd).op)\n[PROOFSTEP]\ndsimp at i j k \n[GOAL]\ncase mk\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\n⊢ P (Scheme.Γ.map (Scheme.OpenCover.map (𝒰 i) { fst := j, snd := k } ≫ pullback.snd).op)\n[PROOFSTEP]\ndsimp only [Scheme.OpenCover.bind_map, Scheme.OpenCover.pushforwardIso_obj, Scheme.Pullback.openCoverOfRight_obj,\n  Scheme.OpenCover.pushforwardIso_map, Scheme.Pullback.openCoverOfRight_map, Scheme.OpenCover.bind_obj]\n[GOAL]\ncase mk\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\n⊢ P\n    (Scheme.Γ.map\n      ((Scheme.OpenCover.map\n              (Scheme.affineCover\n                (pullback f\n                  (Scheme.OpenCover.map\n                      (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n                    pullback.fst)))\n              k ≫\n            pullback.map f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i)))\n                    j ≫\n                  pullback.fst)\n                f pullback.fst (𝟙 X)\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i)))\n                  j)\n                (𝟙 Y) (_ : f ≫ 𝟙 Y = 𝟙 X ≫ f)\n                (_ :\n                  (Scheme.OpenCover.map\n                          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n                        pullback.fst) ≫\n                      𝟙 Y =\n                    Scheme.OpenCover.map\n                        (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n                      pullback.fst) ≫\n              (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom) ≫\n          pullback.snd).op)\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc, pullbackRightPullbackFstIso_hom_snd, pullback.lift_snd_assoc, Category.assoc, ←\n  Category.assoc, op_comp, Functor.map_comp]\n[GOAL]\ncase mk\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\n⊢ P\n    (Scheme.Γ.map\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n            pullback.snd).op ≫\n      Scheme.Γ.map\n        (Scheme.OpenCover.map\n              (Scheme.affineCover\n                (pullback f\n                  (Scheme.OpenCover.map\n                      (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n                    pullback.fst)))\n              k ≫\n            pullback.snd).op)\n[PROOFSTEP]\napply hP.StableUnderComposition\n[GOAL]\ncase mk.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.snd).op)\n[PROOFSTEP]\napply hP.affine_openCover_iff _ _ _ |>.mp\n[GOAL]\ncase mk.x.a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\n⊢ affineLocally P g\n[PROOFSTEP]\nexact hg\n[GOAL]\ncase mk.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : affineLocally P f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover\n              (pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i)))\n                    j ≫\n                  pullback.fst)))\n            k ≫\n          pullback.snd).op)\n[PROOFSTEP]\ndelta affineLocally at hf \n[GOAL]\ncase mk.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : targetAffineLocally (sourceAffineLocally P) f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover\n              (pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i)))\n                    j ≫\n                  pullback.fst)))\n            k ≫\n          pullback.snd).op)\n[PROOFSTEP]\nhave := (hP.isLocal_sourceAffineLocally.affine_openCover_TFAE f).out 0 3\n[GOAL]\ncase mk.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : targetAffineLocally (sourceAffineLocally P) f\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\nthis :\n  targetAffineLocally (sourceAffineLocally P) f ↔\n    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], sourceAffineLocally P pullback.snd\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover\n              (pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i)))\n                    j ≫\n                  pullback.fst)))\n            k ≫\n          pullback.snd).op)\n[PROOFSTEP]\nrw [this] at hf \n[GOAL]\ncase mk.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], sourceAffineLocally P pullback.snd\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\nthis :\n  targetAffineLocally (sourceAffineLocally P) f ↔\n    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], sourceAffineLocally P pullback.snd\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover\n              (pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i)))\n                    j ≫\n                  pullback.fst)))\n            k ≫\n          pullback.snd).op)\n[PROOFSTEP]\nhave : IsOpenImmersion <| ((pullback g (S.affineCover.map i)).affineCover.map j ≫ pullback.fst) :=\n  LocallyRingedSpace.IsOpenImmersion.comp _ _\n[GOAL]\ncase mk.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhf : ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], sourceAffineLocally P pullback.snd\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\nthis✝ :\n  targetAffineLocally (sourceAffineLocally P) f ↔\n    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], sourceAffineLocally P pullback.snd\nthis :\n  IsOpenImmersion\n    (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n      pullback.fst)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover\n              (pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i)))\n                    j ≫\n                  pullback.fst)))\n            k ≫\n          pullback.snd).op)\n[PROOFSTEP]\nspecialize\n  hf\n    ((pullback g (S.affineCover.map i)).affineCover.map j ≫ pullback.fst)\n      -- Porting note: again strange behavior of TFAE\n[GOAL]\ncase mk.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\nthis✝ :\n  targetAffineLocally (sourceAffineLocally P) f ↔\n    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], sourceAffineLocally P pullback.snd\nthis :\n  IsOpenImmersion\n    (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n      pullback.fst)\nhf : sourceAffineLocally P pullback.snd\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover\n              (pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i)))\n                    j ≫\n                  pullback.fst)))\n            k ≫\n          pullback.snd).op)\n[PROOFSTEP]\nhave :=\n  (hP.affine_openCover_TFAE\n        (pullback.snd : pullback f ((pullback g (S.affineCover.map i)).affineCover.map j ≫ pullback.fst) ⟶ _)).out\n    0 3\n[GOAL]\ncase mk.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\nthis✝¹ :\n  targetAffineLocally (sourceAffineLocally P) f ↔\n    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], sourceAffineLocally P pullback.snd\nthis✝ :\n  IsOpenImmersion\n    (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n      pullback.fst)\nhf : sourceAffineLocally P pullback.snd\nthis :\n  sourceAffineLocally P pullback.snd ↔\n    ∀ {U : Scheme}\n      (g_1 :\n        U ⟶\n          pullback f\n            (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n              pullback.fst))\n      [inst : IsAffine U] [inst : IsOpenImmersion g_1], P (Scheme.Γ.map (g_1 ≫ pullback.snd).op)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover\n              (pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i)))\n                    j ≫\n                  pullback.fst)))\n            k ≫\n          pullback.snd).op)\n[PROOFSTEP]\nrw [this] at hf \n[GOAL]\ncase mk.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nX Y S : Scheme\nf : X ⟶ Y\ng : Y ⟶ S\nhg : affineLocally P g\n𝒰 : (i : (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)).J) →\n  Scheme.OpenCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover S) (f ≫ g)) i) :=\n  fun i =>\n    Scheme.OpenCover.bind\n      (Scheme.OpenCover.pushforwardIso\n        (Scheme.Pullback.openCoverOfRight\n          (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n        (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n      fun i_1 =>\n      Scheme.affineCover\n        (Scheme.OpenCover.obj\n          (Scheme.OpenCover.pushforwardIso\n            (Scheme.Pullback.openCoverOfRight\n              (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) f pullback.fst)\n            (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover S) i) f).hom)\n          i_1)\ni : (Scheme.affineCover S).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))).J\nk :\n  (Scheme.affineCover\n      (pullback f\n        (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n          pullback.fst))).J\nthis✝¹ :\n  targetAffineLocally (sourceAffineLocally P) f ↔\n    ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], sourceAffineLocally P pullback.snd\nthis✝ :\n  IsOpenImmersion\n    (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n      pullback.fst)\nhf :\n  ∀ {U : Scheme}\n    (g_1 :\n      U ⟶\n        pullback f\n          (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n            pullback.fst))\n    [inst : IsAffine U] [inst : IsOpenImmersion g_1], P (Scheme.Γ.map (g_1 ≫ pullback.snd).op)\nthis :\n  sourceAffineLocally P pullback.snd ↔\n    ∀ {U : Scheme}\n      (g_1 :\n        U ⟶\n          pullback f\n            (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i))) j ≫\n              pullback.fst))\n      [inst : IsAffine U] [inst : IsOpenImmersion g_1], P (Scheme.Γ.map (g_1 ≫ pullback.snd).op)\n⊢ P\n    (Scheme.Γ.map\n      (Scheme.OpenCover.map\n            (Scheme.affineCover\n              (pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover S) i)))\n                    j ≫\n                  pullback.fst)))\n            k ≫\n          pullback.snd).op)\n[PROOFSTEP]\napply hf\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.Morphisms.RingHomProperties", "llama_tokens": 228369, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.685949467848392, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.37768882938230314}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\n⊢ Continuous (thickenedIndicatorAux δ E)\n[PROOFSTEP]\nunfold thickenedIndicatorAux\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\n⊢ Continuous fun x => 1 - infEdist x E / ENNReal.ofReal δ\n[PROOFSTEP]\nlet f := fun x : α => (⟨1, infEdist x E / ENNReal.ofReal δ⟩ : ℝ≥0 × ℝ≥0∞)\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nf : α → ℝ≥0 × ℝ≥0∞ := fun x => (1, infEdist x E / ENNReal.ofReal δ)\n⊢ Continuous fun x => 1 - infEdist x E / ENNReal.ofReal δ\n[PROOFSTEP]\nlet sub := fun p : ℝ≥0 × ℝ≥0∞ => (p.1 : ℝ≥0∞) - p.2\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nf : α → ℝ≥0 × ℝ≥0∞ := fun x => (1, infEdist x E / ENNReal.ofReal δ)\nsub : ℝ≥0 × ℝ≥0∞ → ℝ≥0∞ := fun p => ↑p.fst - p.snd\n⊢ Continuous fun x => 1 - infEdist x E / ENNReal.ofReal δ\n[PROOFSTEP]\nrw [show (fun x : α => (1 : ℝ≥0∞) - infEdist x E / ENNReal.ofReal δ) = sub ∘ f by rfl]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nf : α → ℝ≥0 × ℝ≥0∞ := fun x => (1, infEdist x E / ENNReal.ofReal δ)\nsub : ℝ≥0 × ℝ≥0∞ → ℝ≥0∞ := fun p => ↑p.fst - p.snd\n⊢ (fun x => 1 - infEdist x E / ENNReal.ofReal δ) = sub ∘ f\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nf : α → ℝ≥0 × ℝ≥0∞ := fun x => (1, infEdist x E / ENNReal.ofReal δ)\nsub : ℝ≥0 × ℝ≥0∞ → ℝ≥0∞ := fun p => ↑p.fst - p.snd\n⊢ Continuous (sub ∘ f)\n[PROOFSTEP]\napply (@ENNReal.continuous_nnreal_sub 1).comp\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nf : α → ℝ≥0 × ℝ≥0∞ := fun x => (1, infEdist x E / ENNReal.ofReal δ)\nsub : ℝ≥0 × ℝ≥0∞ → ℝ≥0∞ := fun p => ↑p.fst - p.snd\n⊢ Continuous fun x => (f x).snd\n[PROOFSTEP]\napply (ENNReal.continuous_div_const (ENNReal.ofReal δ) _).comp continuous_infEdist\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nf : α → ℝ≥0 × ℝ≥0∞ := fun x => (1, infEdist x E / ENNReal.ofReal δ)\nsub : ℝ≥0 × ℝ≥0∞ → ℝ≥0∞ := fun p => ↑p.fst - p.snd\n⊢ ENNReal.ofReal δ ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nf : α → ℝ≥0 × ℝ≥0∞ := fun x => (1, infEdist x E / ENNReal.ofReal δ)\nsub : ℝ≥0 × ℝ≥0∞ → ℝ≥0∞ := fun p => ↑p.fst - p.snd\n⊢ 0 < δ\n[PROOFSTEP]\nexact δ_pos\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nE : Set α\nx : α\n⊢ thickenedIndicatorAux δ E x ≤ 1\n[PROOFSTEP]\napply @tsub_le_self _ _ _ _ (1 : ℝ≥0∞)\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nE : Set α\n⊢ thickenedIndicatorAux δ (closure E) = thickenedIndicatorAux δ E\n[PROOFSTEP]\nsimp_rw [thickenedIndicatorAux, infEdist_closure]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nE : Set α\nx : α\nx_in_E : x ∈ E\n⊢ thickenedIndicatorAux δ E x = 1\n[PROOFSTEP]\nsimp [thickenedIndicatorAux, infEdist_zero_of_mem x_in_E, tsub_zero]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nE : Set α\nx : α\nx_mem : x ∈ closure E\n⊢ thickenedIndicatorAux δ E x = 1\n[PROOFSTEP]\nrw [← thickenedIndicatorAux_closure_eq, thickenedIndicatorAux_one δ (closure E) x_mem]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx : α\nx_out : ¬x ∈ thickening δ E\n⊢ thickenedIndicatorAux δ E x = 0\n[PROOFSTEP]\nrw [thickening, mem_setOf_eq, not_lt] at x_out \n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx : α\nx_out : ENNReal.ofReal δ ≤ infEdist x E\n⊢ thickenedIndicatorAux δ E x = 0\n[PROOFSTEP]\nunfold thickenedIndicatorAux\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx : α\nx_out : ENNReal.ofReal δ ≤ infEdist x E\n⊢ 1 - infEdist x E / ENNReal.ofReal δ = 0\n[PROOFSTEP]\napply le_antisymm _ bot_le\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx : α\nx_out : ENNReal.ofReal δ ≤ infEdist x E\n⊢ 1 - infEdist x E / ENNReal.ofReal δ ≤ ⊥\n[PROOFSTEP]\nhave key := tsub_le_tsub (@rfl _ (1 : ℝ≥0∞)).le (ENNReal.div_le_div x_out (@rfl _ (ENNReal.ofReal δ : ℝ≥0∞)).le)\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx : α\nx_out : ENNReal.ofReal δ ≤ infEdist x E\nkey : 1 - infEdist x E / ENNReal.ofReal δ ≤ 1 - ENNReal.ofReal δ / ENNReal.ofReal δ\n⊢ 1 - infEdist x E / ENNReal.ofReal δ ≤ ⊥\n[PROOFSTEP]\nrw [ENNReal.div_self (ne_of_gt (ENNReal.ofReal_pos.mpr δ_pos)) ofReal_ne_top] at key \n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx : α\nx_out : ENNReal.ofReal δ ≤ infEdist x E\nkey : 1 - infEdist x E / ENNReal.ofReal δ ≤ 1 - 1\n⊢ 1 - infEdist x E / ENNReal.ofReal δ ≤ ⊥\n[PROOFSTEP]\nsimpa using key\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nE : Set α\n⊢ (indicator E fun x => 1) ≤ thickenedIndicatorAux δ E\n[PROOFSTEP]\nintro a\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nE : Set α\na : α\n⊢ indicator E (fun x => 1) a ≤ thickenedIndicatorAux δ E a\n[PROOFSTEP]\nby_cases a ∈ E\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nE : Set α\na : α\n⊢ indicator E (fun x => 1) a ≤ thickenedIndicatorAux δ E a\n[PROOFSTEP]\nby_cases a ∈ E\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nE : Set α\na : α\nh : a ∈ E\n⊢ indicator E (fun x => 1) a ≤ thickenedIndicatorAux δ E a\n[PROOFSTEP]\nsimp only [h, indicator_of_mem, thickenedIndicatorAux_one δ E h, le_refl]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nE : Set α\na : α\nh : ¬a ∈ E\n⊢ indicator E (fun x => 1) a ≤ thickenedIndicatorAux δ E a\n[PROOFSTEP]\nsimp only [h, indicator_of_not_mem, not_false_iff, zero_le]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\n⊢ Tendsto (fun n => thickenedIndicatorAux (δseq n) E) atTop (𝓝 (indicator (closure E) fun x => 1))\n[PROOFSTEP]\nrw [tendsto_pi_nhds]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\n⊢ ∀ (x : α), Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nx : α\n⊢ Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\n[PROOFSTEP]\nby_cases x_mem_closure : x ∈ closure E\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nx : α\nx_mem_closure : x ∈ closure E\n⊢ Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\n[PROOFSTEP]\nsimp_rw [thickenedIndicatorAux_one_of_mem_closure _ E x_mem_closure]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nx : α\nx_mem_closure : x ∈ closure E\n⊢ Tendsto (fun i => 1) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\n[PROOFSTEP]\nrw [show (indicator (closure E) fun _ => (1 : ℝ≥0∞)) x = 1 by simp only [x_mem_closure, indicator_of_mem]]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nx : α\nx_mem_closure : x ∈ closure E\n⊢ indicator (closure E) (fun x => 1) x = 1\n[PROOFSTEP]\nsimp only [x_mem_closure, indicator_of_mem]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nx : α\nx_mem_closure : x ∈ closure E\n⊢ Tendsto (fun i => 1) atTop (𝓝 1)\n[PROOFSTEP]\nexact tendsto_const_nhds\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\n⊢ Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\n[PROOFSTEP]\nrw [show (closure E).indicator (fun _ => (1 : ℝ≥0∞)) x = 0 by\n    simp only [x_mem_closure, indicator_of_not_mem, not_false_iff]]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\n⊢ indicator (closure E) (fun x => 1) x = 0\n[PROOFSTEP]\nsimp only [x_mem_closure, indicator_of_not_mem, not_false_iff]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\n⊢ Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 0)\n[PROOFSTEP]\nrcases exists_real_pos_lt_infEdist_of_not_mem_closure x_mem_closure with ⟨ε, ⟨ε_pos, ε_lt⟩⟩\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nε : ℝ\nε_pos : 0 < ε\nε_lt : ENNReal.ofReal ε < infEdist x E\n⊢ Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 0)\n[PROOFSTEP]\nrw [Metric.tendsto_nhds] at δseq_lim \n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_lim : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : ℕ) in atTop, dist (δseq x) 0 < ε\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nε : ℝ\nε_pos : 0 < ε\nε_lt : ENNReal.ofReal ε < infEdist x E\n⊢ Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 0)\n[PROOFSTEP]\nspecialize δseq_lim ε ε_pos\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nε : ℝ\nε_pos : 0 < ε\nε_lt : ENNReal.ofReal ε < infEdist x E\nδseq_lim : ∀ᶠ (x : ℕ) in atTop, dist (δseq x) 0 < ε\n⊢ Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 0)\n[PROOFSTEP]\nsimp only [dist_zero_right, Real.norm_eq_abs, eventually_atTop, ge_iff_le] at δseq_lim \n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nε : ℝ\nε_pos : 0 < ε\nε_lt : ENNReal.ofReal ε < infEdist x E\nδseq_lim : ∃ a, ∀ (b : ℕ), a ≤ b → |δseq b| < ε\n⊢ Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 0)\n[PROOFSTEP]\nrcases δseq_lim with ⟨N, hN⟩\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nε : ℝ\nε_pos : 0 < ε\nε_lt : ENNReal.ofReal ε < infEdist x E\nN : ℕ\nhN : ∀ (b : ℕ), N ≤ b → |δseq b| < ε\n⊢ Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 0)\n[PROOFSTEP]\napply @tendsto_atTop_of_eventually_const _ _ _ _ _ _ _ N\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nε : ℝ\nε_pos : 0 < ε\nε_lt : ENNReal.ofReal ε < infEdist x E\nN : ℕ\nhN : ∀ (b : ℕ), N ≤ b → |δseq b| < ε\n⊢ ∀ (i : ℕ), i ≥ N → thickenedIndicatorAux (δseq i) E x = 0\n[PROOFSTEP]\nintro n n_large\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nε : ℝ\nε_pos : 0 < ε\nε_lt : ENNReal.ofReal ε < infEdist x E\nN : ℕ\nhN : ∀ (b : ℕ), N ≤ b → |δseq b| < ε\nn : ℕ\nn_large : n ≥ N\n⊢ thickenedIndicatorAux (δseq n) E x = 0\n[PROOFSTEP]\nhave key : x ∉ thickening ε E := by simpa only [thickening, mem_setOf_eq, not_lt] using ε_lt.le\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nε : ℝ\nε_pos : 0 < ε\nε_lt : ENNReal.ofReal ε < infEdist x E\nN : ℕ\nhN : ∀ (b : ℕ), N ≤ b → |δseq b| < ε\nn : ℕ\nn_large : n ≥ N\n⊢ ¬x ∈ thickening ε E\n[PROOFSTEP]\nsimpa only [thickening, mem_setOf_eq, not_lt] using ε_lt.le\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nε : ℝ\nε_pos : 0 < ε\nε_lt : ENNReal.ofReal ε < infEdist x E\nN : ℕ\nhN : ∀ (b : ℕ), N ≤ b → |δseq b| < ε\nn : ℕ\nn_large : n ≥ N\nkey : ¬x ∈ thickening ε E\n⊢ thickenedIndicatorAux (δseq n) E x = 0\n[PROOFSTEP]\nrefine' le_antisymm _ bot_le\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nε : ℝ\nε_pos : 0 < ε\nε_lt : ENNReal.ofReal ε < infEdist x E\nN : ℕ\nhN : ∀ (b : ℕ), N ≤ b → |δseq b| < ε\nn : ℕ\nn_large : n ≥ N\nkey : ¬x ∈ thickening ε E\n⊢ thickenedIndicatorAux (δseq n) E x ≤ 0\n[PROOFSTEP]\napply (thickenedIndicatorAux_mono (lt_of_abs_lt (hN n n_large)).le E x).trans\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nε : ℝ\nε_pos : 0 < ε\nε_lt : ENNReal.ofReal ε < infEdist x E\nN : ℕ\nhN : ∀ (b : ℕ), N ≤ b → |δseq b| < ε\nn : ℕ\nn_large : n ≥ N\nkey : ¬x ∈ thickening ε E\n⊢ thickenedIndicatorAux ε E x ≤ 0\n[PROOFSTEP]\nexact (thickenedIndicatorAux_zero ε_pos E key).le\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\n⊢ Continuous fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)\n[PROOFSTEP]\napply ContinuousOn.comp_continuous continuousOn_toNNReal (continuous_thickenedIndicatorAux δ_pos E)\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\n⊢ ∀ (x : α), thickenedIndicatorAux δ E x ∈ {a | a ≠ ⊤}\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx : α\n⊢ thickenedIndicatorAux δ E x ∈ {a | a ≠ ⊤}\n[PROOFSTEP]\nexact (lt_of_le_of_lt (@thickenedIndicatorAux_le_one _ _ δ E x) one_lt_top).ne\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\n⊢ ∃ C,\n    ∀ (x y : α),\n      dist (ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) x)\n          (ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) y) ≤\n        C\n[PROOFSTEP]\nuse 2\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\n⊢ ∀ (x y : α),\n    dist (ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) x)\n        (ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) y) ≤\n      2\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx y : α\n⊢ dist (ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) x)\n      (ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) y) ≤\n    2\n[PROOFSTEP]\nrw [NNReal.dist_eq]\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx y : α\n⊢ |↑(ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) x) -\n        ↑(ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) y)| ≤\n    2\n[PROOFSTEP]\napply (abs_sub _ _).trans\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx y : α\n⊢ |↑(ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) x)| +\n      |↑(ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) y)| ≤\n    2\n[PROOFSTEP]\nrw [NNReal.abs_eq, NNReal.abs_eq, ← one_add_one_eq_two]\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx y : α\n⊢ ↑(ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) x) +\n      ↑(ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) y) ≤\n    1 + 1\n[PROOFSTEP]\nhave key := @thickenedIndicatorAux_le_one _ _ δ E\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx y : α\nkey : ∀ (x : α), thickenedIndicatorAux δ E x ≤ 1\n⊢ ↑(ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) x) +\n      ↑(ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) y) ≤\n    1 + 1\n[PROOFSTEP]\napply add_le_add\n[GOAL]\ncase h.h₁\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx y : α\nkey : ∀ (x : α), thickenedIndicatorAux δ E x ≤ 1\n⊢ ↑(ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) x) ≤ 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.h₁\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx y : α\nkey : ∀ (x : α), thickenedIndicatorAux δ E x ≤ 1\n⊢ ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) x ≤ 1\n[PROOFSTEP]\nrefine' (toNNReal_le_toNNReal (lt_of_le_of_lt (key _) one_lt_top).ne one_ne_top).mpr (key _)\n[GOAL]\ncase h.h₂\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx y : α\nkey : ∀ (x : α), thickenedIndicatorAux δ E x ≤ 1\n⊢ ↑(ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) y) ≤ 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.h₂\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx y : α\nkey : ∀ (x : α), thickenedIndicatorAux δ E x ≤ 1\n⊢ ContinuousMap.toFun (ContinuousMap.mk fun x => ENNReal.toNNReal (thickenedIndicatorAux δ E x)) y ≤ 1\n[PROOFSTEP]\nrefine' (toNNReal_le_toNNReal (lt_of_le_of_lt (key _) one_lt_top).ne one_ne_top).mpr (key _)\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx : α\n⊢ ↑(thickenedIndicator δ_pos E) x ≤ 1\n[PROOFSTEP]\nrw [thickenedIndicator.coeFn_eq_comp]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx : α\n⊢ (ENNReal.toNNReal ∘ thickenedIndicatorAux δ E) x ≤ 1\n[PROOFSTEP]\nsimpa using (toNNReal_le_toNNReal thickenedIndicatorAux_lt_top.ne one_ne_top).mpr (thickenedIndicatorAux_le_one δ E x)\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx : α\nx_mem : x ∈ closure E\n⊢ ↑(thickenedIndicator δ_pos E) x = 1\n[PROOFSTEP]\nrw [thickenedIndicator_apply, thickenedIndicatorAux_one_of_mem_closure δ E x_mem, one_toNNReal]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\nx : α\nx_out : ¬x ∈ thickening δ E\n⊢ ↑(thickenedIndicator δ_pos E) x = 0\n[PROOFSTEP]\nrw [thickenedIndicator_apply, thickenedIndicatorAux_zero δ_pos E x_out, zero_toNNReal]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\n⊢ (indicator E fun x => 1) ≤ ↑(thickenedIndicator δ_pos E)\n[PROOFSTEP]\nintro a\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\na : α\n⊢ indicator E (fun x => 1) a ≤ ↑(thickenedIndicator δ_pos E) a\n[PROOFSTEP]\nby_cases a ∈ E\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\na : α\n⊢ indicator E (fun x => 1) a ≤ ↑(thickenedIndicator δ_pos E) a\n[PROOFSTEP]\nby_cases a ∈ E\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\na : α\nh : a ∈ E\n⊢ indicator E (fun x => 1) a ≤ ↑(thickenedIndicator δ_pos E) a\n[PROOFSTEP]\nsimp only [h, indicator_of_mem, thickenedIndicator_one δ_pos E h, le_refl]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ : ℝ\nδ_pos : 0 < δ\nE : Set α\na : α\nh : ¬a ∈ E\n⊢ indicator E (fun x => 1) a ≤ ↑(thickenedIndicator δ_pos E) a\n[PROOFSTEP]\nsimp only [h, indicator_of_not_mem, not_false_iff, zero_le]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ₁ δ₂ : ℝ\nδ₁_pos : 0 < δ₁\nδ₂_pos : 0 < δ₂\nhle : δ₁ ≤ δ₂\nE : Set α\n⊢ ↑(thickenedIndicator δ₁_pos E) ≤ ↑(thickenedIndicator δ₂_pos E)\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ₁ δ₂ : ℝ\nδ₁_pos : 0 < δ₁\nδ₂_pos : 0 < δ₂\nhle : δ₁ ≤ δ₂\nE : Set α\nx : α\n⊢ ↑(thickenedIndicator δ₁_pos E) x ≤ ↑(thickenedIndicator δ₂_pos E) x\n[PROOFSTEP]\napply (toNNReal_le_toNNReal thickenedIndicatorAux_lt_top.ne thickenedIndicatorAux_lt_top.ne).mpr\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδ₁ δ₂ : ℝ\nδ₁_pos : 0 < δ₁\nδ₂_pos : 0 < δ₂\nhle : δ₁ ≤ δ₂\nE : Set α\nx : α\n⊢ thickenedIndicatorAux δ₁ E x ≤ thickenedIndicatorAux δ₂ E x\n[PROOFSTEP]\napply thickenedIndicatorAux_mono hle\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_pos : ∀ (n : ℕ), 0 < δseq n\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\n⊢ Tendsto (fun n => ↑(thickenedIndicator (_ : 0 < δseq n) E)) atTop (𝓝 (indicator (closure E) fun x => 1))\n[PROOFSTEP]\nhave key := thickenedIndicatorAux_tendsto_indicator_closure δseq_lim E\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_pos : ∀ (n : ℕ), 0 < δseq n\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nkey : Tendsto (fun n => thickenedIndicatorAux (δseq n) E) atTop (𝓝 (indicator (closure E) fun x => 1))\n⊢ Tendsto (fun n => ↑(thickenedIndicator (_ : 0 < δseq n) E)) atTop (𝓝 (indicator (closure E) fun x => 1))\n[PROOFSTEP]\nrw [tendsto_pi_nhds] at *\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_pos : ∀ (n : ℕ), 0 < δseq n\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nkey : ∀ (x : α), Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\n⊢ ∀ (x : α),\n    Tendsto (fun i => ↑(thickenedIndicator (_ : 0 < δseq i) E) x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_pos : ∀ (n : ℕ), 0 < δseq n\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nkey : ∀ (x : α), Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\nx : α\n⊢ Tendsto (fun i => ↑(thickenedIndicator (_ : 0 < δseq i) E) x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\n[PROOFSTEP]\nrw [show indicator (closure E) (fun _ => (1 : ℝ≥0)) x = (indicator (closure E) (fun _ => (1 : ℝ≥0∞)) x).toNNReal by\n    refine' (congr_fun (comp_indicator_const 1 ENNReal.toNNReal zero_toNNReal) x).symm]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_pos : ∀ (n : ℕ), 0 < δseq n\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nkey : ∀ (x : α), Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\nx : α\n⊢ indicator (closure E) (fun x => 1) x = ENNReal.toNNReal (indicator (closure E) (fun x => 1) x)\n[PROOFSTEP]\nrefine' (congr_fun (comp_indicator_const 1 ENNReal.toNNReal zero_toNNReal) x).symm\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_pos : ∀ (n : ℕ), 0 < δseq n\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nkey : ∀ (x : α), Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\nx : α\n⊢ Tendsto (fun i => ↑(thickenedIndicator (_ : 0 < δseq i) E) x) atTop\n    (𝓝 (ENNReal.toNNReal (indicator (closure E) (fun x => 1) x)))\n[PROOFSTEP]\nrefine' Tendsto.comp (tendsto_toNNReal _) (key x)\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_pos : ∀ (n : ℕ), 0 < δseq n\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nkey : ∀ (x : α), Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\nx : α\n⊢ indicator (closure E) (fun x => 1) x ≠ ⊤\n[PROOFSTEP]\nby_cases x_mem : x ∈ closure E\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_pos : ∀ (n : ℕ), 0 < δseq n\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nkey : ∀ (x : α), Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\nx : α\nx_mem : x ∈ closure E\n⊢ indicator (closure E) (fun x => 1) x ≠ ⊤\n[PROOFSTEP]\nsimp [x_mem]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nδseq : ℕ → ℝ\nδseq_pos : ∀ (n : ℕ), 0 < δseq n\nδseq_lim : Tendsto δseq atTop (𝓝 0)\nE : Set α\nkey : ∀ (x : α), Tendsto (fun i => thickenedIndicatorAux (δseq i) E x) atTop (𝓝 (indicator (closure E) (fun x => 1) x))\nx : α\nx_mem : ¬x ∈ closure E\n⊢ indicator (closure E) (fun x => 1) x ≠ ⊤\n[PROOFSTEP]\nsimp [x_mem]\n[GOAL]\nα : Type u_1\ninst✝¹ : PseudoEMetricSpace α\nβ : Type u_2\ninst✝ : One β\nf : α → β\nE : Set α\nx : α\n⊢ ∀ᶠ (δ : ℝ) in 𝓝[Ioi 0] 0, mulIndicator (thickening δ E) f x = mulIndicator (closure E) f x\n[PROOFSTEP]\nby_cases x_mem_closure : x ∈ closure E\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : PseudoEMetricSpace α\nβ : Type u_2\ninst✝ : One β\nf : α → β\nE : Set α\nx : α\nx_mem_closure : x ∈ closure E\n⊢ ∀ᶠ (δ : ℝ) in 𝓝[Ioi 0] 0, mulIndicator (thickening δ E) f x = mulIndicator (closure E) f x\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin] with δ δ_pos\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : PseudoEMetricSpace α\nβ : Type u_2\ninst✝ : One β\nf : α → β\nE : Set α\nx : α\nx_mem_closure : x ∈ closure E\nδ : ℝ\nδ_pos : δ ∈ Ioi 0\n⊢ mulIndicator (thickening δ E) f x = mulIndicator (closure E) f x\n[PROOFSTEP]\nsimp only [closure_subset_thickening δ_pos E x_mem_closure, mulIndicator_of_mem, x_mem_closure]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : PseudoEMetricSpace α\nβ : Type u_2\ninst✝ : One β\nf : α → β\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\n⊢ ∀ᶠ (δ : ℝ) in 𝓝[Ioi 0] 0, mulIndicator (thickening δ E) f x = mulIndicator (closure E) f x\n[PROOFSTEP]\nhave obs := eventually_not_mem_thickening_of_infEdist_pos x_mem_closure\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : PseudoEMetricSpace α\nβ : Type u_2\ninst✝ : One β\nf : α → β\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nobs : ∀ᶠ (δ : ℝ) in 𝓝 0, ¬x ∈ thickening δ E\n⊢ ∀ᶠ (δ : ℝ) in 𝓝[Ioi 0] 0, mulIndicator (thickening δ E) f x = mulIndicator (closure E) f x\n[PROOFSTEP]\nfilter_upwards [mem_nhdsWithin_of_mem_nhds obs, self_mem_nhdsWithin] with δ x_notin_thE _\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : PseudoEMetricSpace α\nβ : Type u_2\ninst✝ : One β\nf : α → β\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nobs : ∀ᶠ (δ : ℝ) in 𝓝 0, ¬x ∈ thickening δ E\nδ : ℝ\nx_notin_thE : ¬x ∈ thickening δ E\na✝ : δ ∈ Ioi 0\n⊢ mulIndicator (thickening δ E) f x = mulIndicator (closure E) f x\n[PROOFSTEP]\nsimp only [x_notin_thE, not_false_eq_true, mulIndicator_of_not_mem, x_mem_closure]\n[GOAL]\nα : Type u_1\ninst✝¹ : PseudoEMetricSpace α\nβ : Type u_2\ninst✝ : One β\nf : α → β\nE : Set α\nx : α\n⊢ ∀ᶠ (δ : ℝ) in 𝓝 0, mulIndicator (cthickening δ E) f x = mulIndicator (closure E) f x\n[PROOFSTEP]\nby_cases x_mem_closure : x ∈ closure E\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : PseudoEMetricSpace α\nβ : Type u_2\ninst✝ : One β\nf : α → β\nE : Set α\nx : α\nx_mem_closure : x ∈ closure E\n⊢ ∀ᶠ (δ : ℝ) in 𝓝 0, mulIndicator (cthickening δ E) f x = mulIndicator (closure E) f x\n[PROOFSTEP]\nfilter_upwards [univ_mem] with δ _\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : PseudoEMetricSpace α\nβ : Type u_2\ninst✝ : One β\nf : α → β\nE : Set α\nx : α\nx_mem_closure : x ∈ closure E\nδ : ℝ\na✝ : δ ∈ univ\n⊢ mulIndicator (cthickening δ E) f x = mulIndicator (closure E) f x\n[PROOFSTEP]\nhave obs : x ∈ cthickening δ E := closure_subset_cthickening δ E x_mem_closure\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : PseudoEMetricSpace α\nβ : Type u_2\ninst✝ : One β\nf : α → β\nE : Set α\nx : α\nx_mem_closure : x ∈ closure E\nδ : ℝ\na✝ : δ ∈ univ\nobs : x ∈ cthickening δ E\n⊢ mulIndicator (cthickening δ E) f x = mulIndicator (closure E) f x\n[PROOFSTEP]\nrw [mulIndicator_of_mem obs f, mulIndicator_of_mem x_mem_closure f]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : PseudoEMetricSpace α\nβ : Type u_2\ninst✝ : One β\nf : α → β\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\n⊢ ∀ᶠ (δ : ℝ) in 𝓝 0, mulIndicator (cthickening δ E) f x = mulIndicator (closure E) f x\n[PROOFSTEP]\nfilter_upwards [eventually_not_mem_cthickening_of_infEdist_pos x_mem_closure] with δ hδ\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : PseudoEMetricSpace α\nβ : Type u_2\ninst✝ : One β\nf : α → β\nE : Set α\nx : α\nx_mem_closure : ¬x ∈ closure E\nδ : ℝ\nhδ : ¬x ∈ cthickening δ E\n⊢ mulIndicator (cthickening δ E) f x = mulIndicator (closure E) f x\n[PROOFSTEP]\nsimp only [hδ, not_false_eq_true, mulIndicator_of_not_mem, x_mem_closure]\n[GOAL]\nα : Type u_1\ninst✝² : PseudoEMetricSpace α\nβ : Type u_2\ninst✝¹ : One β\ninst✝ : TopologicalSpace β\nf : α → β\nE : Set α\n⊢ Tendsto (fun δ => mulIndicator (thickening δ E) f) (𝓝[Ioi 0] 0) (𝓝 (mulIndicator (closure E) f))\n[PROOFSTEP]\nrw [tendsto_pi_nhds]\n[GOAL]\nα : Type u_1\ninst✝² : PseudoEMetricSpace α\nβ : Type u_2\ninst✝¹ : One β\ninst✝ : TopologicalSpace β\nf : α → β\nE : Set α\n⊢ ∀ (x : α), Tendsto (fun i => mulIndicator (thickening i E) f x) (𝓝[Ioi 0] 0) (𝓝 (mulIndicator (closure E) f x))\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\ninst✝² : PseudoEMetricSpace α\nβ : Type u_2\ninst✝¹ : One β\ninst✝ : TopologicalSpace β\nf : α → β\nE : Set α\nx : α\n⊢ Tendsto (fun i => mulIndicator (thickening i E) f x) (𝓝[Ioi 0] 0) (𝓝 (mulIndicator (closure E) f x))\n[PROOFSTEP]\nrw [tendsto_congr' (mulIndicator_thickening_eventually_eq_mulIndicator_closure f E x)]\n[GOAL]\nα : Type u_1\ninst✝² : PseudoEMetricSpace α\nβ : Type u_2\ninst✝¹ : One β\ninst✝ : TopologicalSpace β\nf : α → β\nE : Set α\nx : α\n⊢ Tendsto (fun x_1 => mulIndicator (closure E) f x) (𝓝[Ioi 0] 0) (𝓝 (mulIndicator (closure E) f x))\n[PROOFSTEP]\napply tendsto_const_nhds\n[GOAL]\nα : Type u_1\ninst✝² : PseudoEMetricSpace α\nβ : Type u_2\ninst✝¹ : One β\ninst✝ : TopologicalSpace β\nf : α → β\nE : Set α\n⊢ Tendsto (fun δ => mulIndicator (cthickening δ E) f) (𝓝 0) (𝓝 (mulIndicator (closure E) f))\n[PROOFSTEP]\nrw [tendsto_pi_nhds]\n[GOAL]\nα : Type u_1\ninst✝² : PseudoEMetricSpace α\nβ : Type u_2\ninst✝¹ : One β\ninst✝ : TopologicalSpace β\nf : α → β\nE : Set α\n⊢ ∀ (x : α), Tendsto (fun i => mulIndicator (cthickening i E) f x) (𝓝 0) (𝓝 (mulIndicator (closure E) f x))\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\ninst✝² : PseudoEMetricSpace α\nβ : Type u_2\ninst✝¹ : One β\ninst✝ : TopologicalSpace β\nf : α → β\nE : Set α\nx : α\n⊢ Tendsto (fun i => mulIndicator (cthickening i E) f x) (𝓝 0) (𝓝 (mulIndicator (closure E) f x))\n[PROOFSTEP]\nrw [tendsto_congr' (mulIndicator_cthickening_eventually_eq_mulIndicator_closure f E x)]\n[GOAL]\nα : Type u_1\ninst✝² : PseudoEMetricSpace α\nβ : Type u_2\ninst✝¹ : One β\ninst✝ : TopologicalSpace β\nf : α → β\nE : Set α\nx : α\n⊢ Tendsto (fun x_1 => mulIndicator (closure E) f x) (𝓝 0) (𝓝 (mulIndicator (closure E) f x))\n[PROOFSTEP]\napply tendsto_const_nhds\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.ThickenedIndicator", "llama_tokens": 14482, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5926665999540697, "lm_q2_score": 0.6370308082623217, "lm_q1q2_score": 0.37754688319882307}}
{"text": "[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nG : L ⥤ D\nx : L\nf : ι ⋙ G ⟶ F\n⊢ ∀ ⦃X Y : StructuredArrow x ι⦄ (f_1 : X ⟶ Y),\n    ((Functor.const (StructuredArrow x ι)).obj (G.obj x)).map f_1 ≫ (fun i => G.map i.hom ≫ NatTrans.app f i.right) Y =\n      (fun i => G.map i.hom ≫ NatTrans.app f i.right) X ≫ (diagram ι F x).map f_1\n[PROOFSTEP]\nrintro ⟨⟨il⟩, ir, i⟩ ⟨⟨jl⟩, jr, j⟩ ⟨⟨⟨fl⟩⟩, fr, ff⟩\n[GOAL]\ncase mk.mk.mk.mk.mk.up.up\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nG : L ⥤ D\nx : L\nf : ι ⋙ G ⟶ F\nir : S\nil : PUnit\ni : (Functor.fromPUnit x).obj { as := il } ⟶ ι.obj ir\njr : S\njl : PUnit\nj : (Functor.fromPUnit x).obj { as := jl } ⟶ ι.obj jr\nfr : { left := { as := il }, right := ir, hom := i }.right ⟶ { left := { as := jl }, right := jr, hom := j }.right\nfl : { left := { as := il }, right := ir, hom := i }.left.as = { left := { as := jl }, right := jr, hom := j }.left.as\nff :\n  (Functor.fromPUnit x).map { down := { down := fl } } ≫ { left := { as := jl }, right := jr, hom := j }.hom =\n    { left := { as := il }, right := ir, hom := i }.hom ≫ ι.map fr\n⊢ ((Functor.const (StructuredArrow x ι)).obj (G.obj x)).map (CommaMorphism.mk { down := { down := fl } } fr) ≫\n      (fun i => G.map i.hom ≫ NatTrans.app f i.right) { left := { as := jl }, right := jr, hom := j } =\n    (fun i => G.map i.hom ≫ NatTrans.app f i.right) { left := { as := il }, right := ir, hom := i } ≫\n      (diagram ι F x).map (CommaMorphism.mk { down := { down := fl } } fr)\n[PROOFSTEP]\ndsimp at *\n[GOAL]\ncase mk.mk.mk.mk.mk.up.up\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nG : L ⥤ D\nx : L\nf : ι ⋙ G ⟶ F\nir : S\nil : PUnit\ni : (Functor.fromPUnit x).obj { as := il } ⟶ ι.obj ir\njr : S\njl : PUnit\nj : (Functor.fromPUnit x).obj { as := jl } ⟶ ι.obj jr\nfr : { left := { as := il }, right := ir, hom := i }.right ⟶ { left := { as := jl }, right := jr, hom := j }.right\nfl : { left := { as := il }, right := ir, hom := i }.left.as = { left := { as := jl }, right := jr, hom := j }.left.as\nff :\n  (Functor.fromPUnit x).map { down := { down := fl } } ≫ { left := { as := jl }, right := jr, hom := j }.hom =\n    { left := { as := il }, right := ir, hom := i }.hom ≫ ι.map fr\n⊢ 𝟙 (G.obj x) ≫ G.map j ≫ NatTrans.app f jr = (G.map i ≫ NatTrans.app f ir) ≫ F.map fr\n[PROOFSTEP]\ndsimp at ff \n[GOAL]\ncase mk.mk.mk.mk.mk.up.up\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nG : L ⥤ D\nx : L\nf : ι ⋙ G ⟶ F\nir : S\nil : PUnit\ni : (Functor.fromPUnit x).obj { as := il } ⟶ ι.obj ir\njr : S\njl : PUnit\nj : (Functor.fromPUnit x).obj { as := jl } ⟶ ι.obj jr\nfr : { left := { as := il }, right := ir, hom := i }.right ⟶ { left := { as := jl }, right := jr, hom := j }.right\nfl : { left := { as := il }, right := ir, hom := i }.left.as = { left := { as := jl }, right := jr, hom := j }.left.as\nff : 𝟙 x ≫ j = i ≫ ι.map fr\n⊢ 𝟙 (G.obj x) ≫ G.map j ≫ NatTrans.app f jr = (G.map i ≫ NatTrans.app f ir) ≫ F.map fr\n[PROOFSTEP]\nsimp only [Category.id_comp, Category.assoc] at *\n[GOAL]\ncase mk.mk.mk.mk.mk.up.up\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nG : L ⥤ D\nx : L\nf : ι ⋙ G ⟶ F\nir : S\nil : PUnit\ni : (Functor.fromPUnit x).obj { as := il } ⟶ ι.obj ir\njr : S\njl : PUnit\nj : (Functor.fromPUnit x).obj { as := jl } ⟶ ι.obj jr\nfr : { left := { as := il }, right := ir, hom := i }.right ⟶ { left := { as := jl }, right := jr, hom := j }.right\nfl : True\nff : j = i ≫ ι.map fr\n⊢ G.map j ≫ NatTrans.app f jr = G.map i ≫ NatTrans.app f ir ≫ F.map fr\n[PROOFSTEP]\nrw [ff]\n[GOAL]\ncase mk.mk.mk.mk.mk.up.up\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nG : L ⥤ D\nx : L\nf : ι ⋙ G ⟶ F\nir : S\nil : PUnit\ni : (Functor.fromPUnit x).obj { as := il } ⟶ ι.obj ir\njr : S\njl : PUnit\nj : (Functor.fromPUnit x).obj { as := jl } ⟶ ι.obj jr\nfr : { left := { as := il }, right := ir, hom := i }.right ⟶ { left := { as := jl }, right := jr, hom := j }.right\nfl : True\nff : j = i ≫ ι.map fr\n⊢ G.map (i ≫ ι.map fr) ≫ NatTrans.app f jr = G.map i ≫ NatTrans.app f ir ≫ F.map fr\n[PROOFSTEP]\nhave := f.naturality\n[GOAL]\ncase mk.mk.mk.mk.mk.up.up\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nG : L ⥤ D\nx : L\nf : ι ⋙ G ⟶ F\nir : S\nil : PUnit\ni : (Functor.fromPUnit x).obj { as := il } ⟶ ι.obj ir\njr : S\njl : PUnit\nj : (Functor.fromPUnit x).obj { as := jl } ⟶ ι.obj jr\nfr : { left := { as := il }, right := ir, hom := i }.right ⟶ { left := { as := jl }, right := jr, hom := j }.right\nfl : True\nff : j = i ≫ ι.map fr\nthis : ∀ ⦃X Y : S⦄ (f_1 : X ⟶ Y), (ι ⋙ G).map f_1 ≫ NatTrans.app f Y = NatTrans.app f X ≫ F.map f_1\n⊢ G.map (i ≫ ι.map fr) ≫ NatTrans.app f jr = G.map i ≫ NatTrans.app f ir ≫ F.map fr\n[PROOFSTEP]\naesop_cat\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\n⊢ ∀ (X : L),\n    { obj := fun x => limit (diagram ι F x),\n            map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n        (𝟙 X) =\n      𝟙\n        ({ obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.obj\n          X)\n[PROOFSTEP]\nintro l\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nl : L\n⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n      (𝟙 l) =\n    𝟙\n      ({ obj := fun x => limit (diagram ι F x),\n            map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.obj\n        l)\n[PROOFSTEP]\nhaveI : HasLimit (StructuredArrow.map (𝟙 _) ⋙ diagram ι F l) := h _\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nl : L\nthis : HasLimit (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l)\n⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n      (𝟙 l) =\n    𝟙\n      ({ obj := fun x => limit (diagram ι F x),\n            map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.obj\n        l)\n[PROOFSTEP]\ndsimp\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nl : L\nthis : HasLimit (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l)\n⊢ limit.pre (diagram ι F l) (StructuredArrow.map (𝟙 l)) = 𝟙 (limit (diagram ι F l))\n[PROOFSTEP]\next j\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nl : L\nthis : HasLimit (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l)\nj : StructuredArrow l ι\n⊢ limit.pre (diagram ι F l) (StructuredArrow.map (𝟙 l)) ≫ limit.π (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l) j =\n    𝟙 (limit (diagram ι F l)) ≫ limit.π (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l) j\n[PROOFSTEP]\nsimp only [Category.id_comp, limit.pre_π]\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nl : L\nthis : HasLimit (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l)\nj : StructuredArrow l ι\n⊢ limit.π (diagram ι F l) ((StructuredArrow.map (𝟙 l)).obj j) = limit.π (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l) j\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase w.h.e_7.h\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nl : L\nthis : HasLimit (StructuredArrow.map (𝟙 l) ⋙ diagram ι F l)\nj : StructuredArrow l ι\n⊢ (StructuredArrow.map (𝟙 l)).obj j = j\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\n⊢ ∀ {X Y Z : L} (f : X ⟶ Y) (g : Y ⟶ Z),\n    { obj := fun x => limit (diagram ι F x),\n            map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n        (f ≫ g) =\n      { obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          f ≫\n        { obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          g\n[PROOFSTEP]\nintro x y z f g\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\n⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n      (f ≫ g) =\n    { obj := fun x => limit (diagram ι F x),\n            map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n        f ≫\n      { obj := fun x => limit (diagram ι F x),\n            map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n        g\n[PROOFSTEP]\napply limit.hom_ext\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\n⊢ ∀ (j : StructuredArrow z ι),\n    { obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          (f ≫ g) ≫\n        limit.π (diagram ι F z) j =\n      ({ obj := fun x => limit (diagram ι F x),\n                map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n            f ≫\n          { obj := fun x => limit (diagram ι F x),\n                map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n            g) ≫\n        limit.π (diagram ι F z) j\n[PROOFSTEP]\nintro j\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nj : StructuredArrow z ι\n⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n        (f ≫ g) ≫\n      limit.π (diagram ι F z) j =\n    ({ obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          f ≫\n        { obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          g) ≫\n      limit.π (diagram ι F z) j\n[PROOFSTEP]\nhaveI : HasLimit (StructuredArrow.map f ⋙ diagram ι F _) := h _\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nj : StructuredArrow z ι\nthis : HasLimit (StructuredArrow.map f ⋙ diagram ι F x)\n⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n        (f ≫ g) ≫\n      limit.π (diagram ι F z) j =\n    ({ obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          f ≫\n        { obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          g) ≫\n      limit.π (diagram ι F z) j\n[PROOFSTEP]\nhaveI : HasLimit (StructuredArrow.map g ⋙ diagram ι F _) := h _\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nj : StructuredArrow z ι\nthis✝ : HasLimit (StructuredArrow.map f ⋙ diagram ι F x)\nthis : HasLimit (StructuredArrow.map g ⋙ diagram ι F y)\n⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n        (f ≫ g) ≫\n      limit.π (diagram ι F z) j =\n    ({ obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          f ≫\n        { obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          g) ≫\n      limit.π (diagram ι F z) j\n[PROOFSTEP]\nhaveI : HasLimit (StructuredArrow.map (f ≫ g) ⋙ diagram ι F _) := h _\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nj : StructuredArrow z ι\nthis✝¹ : HasLimit (StructuredArrow.map f ⋙ diagram ι F x)\nthis✝ : HasLimit (StructuredArrow.map g ⋙ diagram ι F y)\nthis : HasLimit (StructuredArrow.map (f ≫ g) ⋙ diagram ι F x)\n⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n        (f ≫ g) ≫\n      limit.π (diagram ι F z) j =\n    ({ obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          f ≫\n        { obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          g) ≫\n      limit.π (diagram ι F z) j\n[PROOFSTEP]\nhaveI : HasLimit (StructuredArrow.map g ⋙ StructuredArrow.map f ⋙ diagram ι F _) := h _\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nj : StructuredArrow z ι\nthis✝² : HasLimit (StructuredArrow.map f ⋙ diagram ι F x)\nthis✝¹ : HasLimit (StructuredArrow.map g ⋙ diagram ι F y)\nthis✝ : HasLimit (StructuredArrow.map (f ≫ g) ⋙ diagram ι F x)\nthis : HasLimit (StructuredArrow.map g ⋙ StructuredArrow.map f ⋙ diagram ι F x)\n⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n        (f ≫ g) ≫\n      limit.π (diagram ι F z) j =\n    ({ obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          f ≫\n        { obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          g) ≫\n      limit.π (diagram ι F z) j\n[PROOFSTEP]\nhaveI : HasLimit ((StructuredArrow.map g ⋙ StructuredArrow.map f) ⋙ diagram ι F _) := h _\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nj : StructuredArrow z ι\nthis✝³ : HasLimit (StructuredArrow.map f ⋙ diagram ι F x)\nthis✝² : HasLimit (StructuredArrow.map g ⋙ diagram ι F y)\nthis✝¹ : HasLimit (StructuredArrow.map (f ≫ g) ⋙ diagram ι F x)\nthis✝ : HasLimit (StructuredArrow.map g ⋙ StructuredArrow.map f ⋙ diagram ι F x)\nthis : HasLimit ((StructuredArrow.map g ⋙ StructuredArrow.map f) ⋙ diagram ι F x)\n⊢ { obj := fun x => limit (diagram ι F x), map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n        (f ≫ g) ≫\n      limit.π (diagram ι F z) j =\n    ({ obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          f ≫\n        { obj := fun x => limit (diagram ι F x),\n              map := fun {X Y} f => limit.pre (diagram ι F X) (StructuredArrow.map f) }.map\n          g) ≫\n      limit.π (diagram ι F z) j\n[PROOFSTEP]\nerw [limit.pre_pre, limit.pre_π, limit.pre_π]\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nj : StructuredArrow z ι\nthis✝³ : HasLimit (StructuredArrow.map f ⋙ diagram ι F x)\nthis✝² : HasLimit (StructuredArrow.map g ⋙ diagram ι F y)\nthis✝¹ : HasLimit (StructuredArrow.map (f ≫ g) ⋙ diagram ι F x)\nthis✝ : HasLimit (StructuredArrow.map g ⋙ StructuredArrow.map f ⋙ diagram ι F x)\nthis : HasLimit ((StructuredArrow.map g ⋙ StructuredArrow.map f) ⋙ diagram ι F x)\n⊢ limit.π (diagram ι F x) ((StructuredArrow.map (f ≫ g)).obj j) =\n    limit.π (diagram ι F x) ((StructuredArrow.map g ⋙ StructuredArrow.map f).obj j)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase w.h.e_7.h\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nj : StructuredArrow z ι\nthis✝³ : HasLimit (StructuredArrow.map f ⋙ diagram ι F x)\nthis✝² : HasLimit (StructuredArrow.map g ⋙ diagram ι F y)\nthis✝¹ : HasLimit (StructuredArrow.map (f ≫ g) ⋙ diagram ι F x)\nthis✝ : HasLimit (StructuredArrow.map g ⋙ StructuredArrow.map f ⋙ diagram ι F x)\nthis : HasLimit ((StructuredArrow.map g ⋙ StructuredArrow.map f) ⋙ diagram ι F x)\n⊢ (StructuredArrow.map (f ≫ g)).obj j = (StructuredArrow.map g ⋙ StructuredArrow.map f).obj j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : G ⟶ loc ι F\n⊢ ∀ ⦃X Y : S⦄ (f_1 : X ⟶ Y),\n    (((whiskeringLeft S L D).obj ι).obj G).map f_1 ≫\n        (fun x => NatTrans.app f (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x)))) Y =\n      (fun x => NatTrans.app f (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x)))) X ≫\n        F.map f_1\n[PROOFSTEP]\nintro x y ff\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : G ⟶ loc ι F\nx y : S\nff : x ⟶ y\n⊢ (((whiskeringLeft S L D).obj ι).obj G).map ff ≫\n      (fun x => NatTrans.app f (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x)))) y =\n    (fun x => NatTrans.app f (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x)))) x ≫\n      F.map ff\n[PROOFSTEP]\ndsimp only [whiskeringLeft]\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : G ⟶ loc ι F\nx y : S\nff : x ⟶ y\n⊢ (ι ⋙ G).map ff ≫ NatTrans.app f (ι.obj y) ≫ limit.π (diagram ι F (ι.obj y)) (StructuredArrow.mk (𝟙 (ι.obj y))) =\n    (NatTrans.app f (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x)))) ≫ F.map ff\n[PROOFSTEP]\nsimp only [Functor.comp_map, NatTrans.naturality_assoc, loc_map, Category.assoc]\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : G ⟶ loc ι F\nx y : S\nff : x ⟶ y\n⊢ NatTrans.app f (ι.obj x) ≫\n      limit.pre (diagram ι F (ι.obj x)) (StructuredArrow.map (ι.map ff)) ≫\n        limit.π (diagram ι F (ι.obj y)) (StructuredArrow.mk (𝟙 (ι.obj y))) =\n    NatTrans.app f (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))) ≫ F.map ff\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : G ⟶ loc ι F\nx y : S\nff : x ⟶ y\n⊢ limit.pre (diagram ι F (ι.obj x)) (StructuredArrow.map (ι.map ff)) ≫\n      limit.π (diagram ι F (ι.obj y)) (StructuredArrow.mk (𝟙 (ι.obj y))) =\n    limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))) ≫ F.map ff\n[PROOFSTEP]\nhaveI : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x)) := h _\n[GOAL]\ncase e_a\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : G ⟶ loc ι F\nx y : S\nff : x ⟶ y\nthis : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x))\n⊢ limit.pre (diagram ι F (ι.obj x)) (StructuredArrow.map (ι.map ff)) ≫\n      limit.π (diagram ι F (ι.obj y)) (StructuredArrow.mk (𝟙 (ι.obj y))) =\n    limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))) ≫ F.map ff\n[PROOFSTEP]\nerw [limit.pre_π]\n[GOAL]\ncase e_a\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : G ⟶ loc ι F\nx y : S\nff : x ⟶ y\nthis : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x))\n⊢ limit.π (diagram ι F (ι.obj x)) ((StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y)))) =\n    limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))) ≫ F.map ff\n[PROOFSTEP]\nlet t : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶ (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=\n  StructuredArrow.homMk ff ?_\n[GOAL]\ncase e_a.refine_2\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : G ⟶ loc ι F\nx y : S\nff : x ⟶ y\nthis : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x))\nt : StructuredArrow.mk (𝟙 (ι.obj x)) ⟶ (StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y))) :=\n  StructuredArrow.homMk ff\n⊢ limit.π (diagram ι F (ι.obj x)) ((StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y)))) =\n    limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))) ≫ F.map ff\ncase e_a.refine_1\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : G ⟶ loc ι F\nx y : S\nff : x ⟶ y\nthis : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x))\n⊢ (StructuredArrow.mk (𝟙 (ι.obj x))).hom ≫ ι.map ff =\n    ((StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y)))).hom\n[PROOFSTEP]\nconvert (limit.w (diagram ι F (ι.obj x)) t).symm using 1\n[GOAL]\ncase e_a.refine_1\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : G ⟶ loc ι F\nx y : S\nff : x ⟶ y\nthis : HasLimit (StructuredArrow.map (ι.map ff) ⋙ diagram ι F (ι.obj x))\n⊢ (StructuredArrow.mk (𝟙 (ι.obj x))).hom ≫ ι.map ff =\n    ((StructuredArrow.map (ι.map ff)).obj (StructuredArrow.mk (𝟙 (ι.obj y)))).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : ((whiskeringLeft S L D).obj ι).obj G ⟶ F\n⊢ ∀ ⦃X Y : L⦄ (f_1 : X ⟶ Y),\n    G.map f_1 ≫ (fun x => limit.lift (diagram ι F x) (cone x f)) Y =\n      (fun x => limit.lift (diagram ι F x) (cone x f)) X ≫ (loc ι F).map f_1\n[PROOFSTEP]\nintro x y ff\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : ((whiskeringLeft S L D).obj ι).obj G ⟶ F\nx y : L\nff : x ⟶ y\n⊢ G.map ff ≫ (fun x => limit.lift (diagram ι F x) (cone x f)) y =\n    (fun x => limit.lift (diagram ι F x) (cone x f)) x ≫ (loc ι F).map ff\n[PROOFSTEP]\napply limit.hom_ext\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : ((whiskeringLeft S L D).obj ι).obj G ⟶ F\nx y : L\nff : x ⟶ y\n⊢ ∀ (j : StructuredArrow y ι),\n    (G.map ff ≫ (fun x => limit.lift (diagram ι F x) (cone x f)) y) ≫ limit.π (diagram ι F y) j =\n      ((fun x => limit.lift (diagram ι F x) (cone x f)) x ≫ (loc ι F).map ff) ≫ limit.π (diagram ι F y) j\n[PROOFSTEP]\nintros j\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : ((whiskeringLeft S L D).obj ι).obj G ⟶ F\nx y : L\nff : x ⟶ y\nj : StructuredArrow y ι\n⊢ (G.map ff ≫ (fun x => limit.lift (diagram ι F x) (cone x f)) y) ≫ limit.π (diagram ι F y) j =\n    ((fun x => limit.lift (diagram ι F x) (cone x f)) x ≫ (loc ι F).map ff) ≫ limit.π (diagram ι F y) j\n[PROOFSTEP]\nhaveI : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x) := h _\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : ((whiskeringLeft S L D).obj ι).obj G ⟶ F\nx y : L\nff : x ⟶ y\nj : StructuredArrow y ι\nthis : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x)\n⊢ (G.map ff ≫ (fun x => limit.lift (diagram ι F x) (cone x f)) y) ≫ limit.π (diagram ι F y) j =\n    ((fun x => limit.lift (diagram ι F x) (cone x f)) x ≫ (loc ι F).map ff) ≫ limit.π (diagram ι F y) j\n[PROOFSTEP]\nerw [limit.lift_pre, limit.lift_π, Category.assoc, limit.lift_π (cone _ f) j]\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nf : ((whiskeringLeft S L D).obj ι).obj G ⟶ F\nx y : L\nff : x ⟶ y\nj : StructuredArrow y ι\nthis : HasLimit (StructuredArrow.map ff ⋙ diagram ι F x)\n⊢ G.map ff ≫ NatTrans.app (cone y f).π j = NatTrans.app (Cone.whisker (StructuredArrow.map ff) (cone x f)).π j\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\n⊢ Function.LeftInverse (fun f => NatTrans.mk fun x => limit.lift (diagram ι F x) (cone x f)) fun f =>\n    NatTrans.mk fun x => NatTrans.app f (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x)))\n[PROOFSTEP]\nintro x\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nx : G ⟶ loc ι F\n⊢ (fun f => NatTrans.mk fun x => limit.lift (diagram ι F x) (cone x f))\n      ((fun f =>\n          NatTrans.mk fun x =>\n            NatTrans.app f (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))))\n        x) =\n    x\n[PROOFSTEP]\next k\n[GOAL]\ncase w.h\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nx : G ⟶ loc ι F\nk : L\n⊢ NatTrans.app\n      ((fun f => NatTrans.mk fun x => limit.lift (diagram ι F x) (cone x f))\n        ((fun f =>\n            NatTrans.mk fun x =>\n              NatTrans.app f (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))))\n          x))\n      k =\n    NatTrans.app x k\n[PROOFSTEP]\napply limit.hom_ext\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nx : G ⟶ loc ι F\nk : L\n⊢ ∀ (j : StructuredArrow k ι),\n    NatTrans.app\n          ((fun f => NatTrans.mk fun x => limit.lift (diagram ι F x) (cone x f))\n            ((fun f =>\n                NatTrans.mk fun x =>\n                  NatTrans.app f (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))))\n              x))\n          k ≫\n        limit.π (diagram ι F k) j =\n      NatTrans.app x k ≫ limit.π (diagram ι F k) j\n[PROOFSTEP]\nintros j\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nx : G ⟶ loc ι F\nk : L\nj : StructuredArrow k ι\n⊢ NatTrans.app\n        ((fun f => NatTrans.mk fun x => limit.lift (diagram ι F x) (cone x f))\n          ((fun f =>\n              NatTrans.mk fun x =>\n                NatTrans.app f (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x))))\n            x))\n        k ≫\n      limit.π (diagram ι F k) j =\n    NatTrans.app x k ≫ limit.π (diagram ι F k) j\n[PROOFSTEP]\ndsimp only [cone]\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nx : G ⟶ loc ι F\nk : L\nj : StructuredArrow k ι\n⊢ limit.lift (diagram ι F k)\n        { pt := G.obj k,\n          π :=\n            NatTrans.mk fun i =>\n              G.map i.hom ≫\n                NatTrans.app x (ι.obj i.right) ≫\n                  limit.π (diagram ι F (ι.obj i.right)) (StructuredArrow.mk (𝟙 (ι.obj i.right))) } ≫\n      limit.π (diagram ι F k) j =\n    NatTrans.app x k ≫ limit.π (diagram ι F k) j\n[PROOFSTEP]\nrw [limit.lift_π]\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nx : G ⟶ loc ι F\nk : L\nj : StructuredArrow k ι\n⊢ NatTrans.app\n      { pt := G.obj k,\n          π :=\n            NatTrans.mk fun i =>\n              G.map i.hom ≫\n                NatTrans.app x (ι.obj i.right) ≫\n                  limit.π (diagram ι F (ι.obj i.right)) (StructuredArrow.mk (𝟙 (ι.obj i.right))) }.π\n      j =\n    NatTrans.app x k ≫ limit.π (diagram ι F k) j\n[PROOFSTEP]\nsimp only [NatTrans.naturality_assoc, loc_map]\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nx : G ⟶ loc ι F\nk : L\nj : StructuredArrow k ι\n⊢ NatTrans.app x k ≫\n      limit.pre (diagram ι F k) (StructuredArrow.map j.hom) ≫\n        limit.π (diagram ι F (ι.obj j.right)) (StructuredArrow.mk (𝟙 (ι.obj j.right))) =\n    NatTrans.app x k ≫ limit.π (diagram ι F k) j\n[PROOFSTEP]\nhaveI : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k) := h _\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nx : G ⟶ loc ι F\nk : L\nj : StructuredArrow k ι\nthis : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k)\n⊢ NatTrans.app x k ≫\n      limit.pre (diagram ι F k) (StructuredArrow.map j.hom) ≫\n        limit.π (diagram ι F (ι.obj j.right)) (StructuredArrow.mk (𝟙 (ι.obj j.right))) =\n    NatTrans.app x k ≫ limit.π (diagram ι F k) j\n[PROOFSTEP]\nerw [limit.pre_π]\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nx : G ⟶ loc ι F\nk : L\nj : StructuredArrow k ι\nthis : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k)\n⊢ NatTrans.app x k ≫\n      limit.π (diagram ι F k) ((StructuredArrow.map j.hom).obj (StructuredArrow.mk (𝟙 (ι.obj j.right)))) =\n    NatTrans.app x k ≫ limit.π (diagram ι F k) j\n[PROOFSTEP]\ncongr\n[GOAL]\ncase w.h.w.e_a.h.e_7.h\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nx : G ⟶ loc ι F\nk : L\nj : StructuredArrow k ι\nthis : HasLimit (StructuredArrow.map j.hom ⋙ diagram ι F k)\n⊢ (StructuredArrow.map j.hom).obj (StructuredArrow.mk (𝟙 (ι.obj j.right))) = j\n[PROOFSTEP]\nrcases j with ⟨⟨⟩, _, _⟩\n[GOAL]\ncase w.h.w.e_a.h.e_7.h.mk.mk\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\nx : G ⟶ loc ι F\nk : L\nright✝ : S\nas✝ : PUnit\nhom✝ : (Functor.fromPUnit k).obj { as := as✝ } ⟶ ι.obj right✝\nthis : HasLimit (StructuredArrow.map { left := { as := as✝ }, right := right✝, hom := hom✝ }.hom ⋙ diagram ι F k)\n⊢ (StructuredArrow.map { left := { as := as✝ }, right := right✝, hom := hom✝ }.hom).obj\n      (StructuredArrow.mk (𝟙 (ι.obj { left := { as := as✝ }, right := right✝, hom := hom✝ }.right))) =\n    { left := { as := as✝ }, right := right✝, hom := hom✝ }\n[PROOFSTEP]\naesop_cat\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nh : ∀ (x : L), HasLimit (diagram ι F x)\nG : L ⥤ D\n⊢ Function.RightInverse (fun f => NatTrans.mk fun x => limit.lift (diagram ι F x) (cone x f)) fun f =>\n    NatTrans.mk fun x => NatTrans.app f (ι.obj x) ≫ limit.π (diagram ι F (ι.obj x)) (StructuredArrow.mk (𝟙 (ι.obj x)))\n[PROOFSTEP]\naesop_cat\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝³ : Category.{v₁, u₁} S\ninst✝² : Category.{v₂, u₂} L\ninst✝¹ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\n⊢ ∀ (X' X : L ⥤ D) (Y : S ⥤ D) (f : X' ⟶ X) (g : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y),\n    ↑((fun F G => (Ran.equiv ι G F).symm) X' Y) (((whiskeringLeft S L D).obj ι).map f ≫ g) =\n      f ≫ ↑((fun F G => (Ran.equiv ι G F).symm) X Y) g\n[PROOFSTEP]\n{\n  -- Porting note: was `tidy`\n  intros X' X Y f g\n  ext t\n  apply limit.hom_ext\n  intros j\n  dsimp [Ran.equiv]\n  simp\n}\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝³ : Category.{v₁, u₁} S\ninst✝² : Category.{v₂, u₂} L\ninst✝¹ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\n⊢ ∀ (X' X : L ⥤ D) (Y : S ⥤ D) (f : X' ⟶ X) (g : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y),\n    ↑((fun F G => (Ran.equiv ι G F).symm) X' Y) (((whiskeringLeft S L D).obj ι).map f ≫ g) =\n      f ≫ ↑((fun F G => (Ran.equiv ι G F).symm) X Y) g\n[PROOFSTEP]\nintros X' X Y f g\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝³ : Category.{v₁, u₁} S\ninst✝² : Category.{v₂, u₂} L\ninst✝¹ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\nX' X : L ⥤ D\nY : S ⥤ D\nf : X' ⟶ X\ng : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y\n⊢ ↑((fun F G => (Ran.equiv ι G F).symm) X' Y) (((whiskeringLeft S L D).obj ι).map f ≫ g) =\n    f ≫ ↑((fun F G => (Ran.equiv ι G F).symm) X Y) g\n[PROOFSTEP]\next t\n[GOAL]\ncase w.h\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝³ : Category.{v₁, u₁} S\ninst✝² : Category.{v₂, u₂} L\ninst✝¹ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\nX' X : L ⥤ D\nY : S ⥤ D\nf : X' ⟶ X\ng : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y\nt : L\n⊢ NatTrans.app (↑((fun F G => (Ran.equiv ι G F).symm) X' Y) (((whiskeringLeft S L D).obj ι).map f ≫ g)) t =\n    NatTrans.app (f ≫ ↑((fun F G => (Ran.equiv ι G F).symm) X Y) g) t\n[PROOFSTEP]\napply limit.hom_ext\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝³ : Category.{v₁, u₁} S\ninst✝² : Category.{v₂, u₂} L\ninst✝¹ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\nX' X : L ⥤ D\nY : S ⥤ D\nf : X' ⟶ X\ng : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y\nt : L\n⊢ ∀ (j : StructuredArrow t ι),\n    NatTrans.app (↑((fun F G => (Ran.equiv ι G F).symm) X' Y) (((whiskeringLeft S L D).obj ι).map f ≫ g)) t ≫\n        limit.π (Ran.diagram ι Y t) j =\n      NatTrans.app (f ≫ ↑((fun F G => (Ran.equiv ι G F).symm) X Y) g) t ≫ limit.π (Ran.diagram ι Y t) j\n[PROOFSTEP]\nintros j\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝³ : Category.{v₁, u₁} S\ninst✝² : Category.{v₂, u₂} L\ninst✝¹ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\nX' X : L ⥤ D\nY : S ⥤ D\nf : X' ⟶ X\ng : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y\nt : L\nj : StructuredArrow t ι\n⊢ NatTrans.app (↑((fun F G => (Ran.equiv ι G F).symm) X' Y) (((whiskeringLeft S L D).obj ι).map f ≫ g)) t ≫\n      limit.π (Ran.diagram ι Y t) j =\n    NatTrans.app (f ≫ ↑((fun F G => (Ran.equiv ι G F).symm) X Y) g) t ≫ limit.π (Ran.diagram ι Y t) j\n[PROOFSTEP]\ndsimp [Ran.equiv]\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝³ : Category.{v₁, u₁} S\ninst✝² : Category.{v₂, u₂} L\ninst✝¹ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\nX' X : L ⥤ D\nY : S ⥤ D\nf : X' ⟶ X\ng : ((whiskeringLeft S L D).obj ι).obj X ⟶ Y\nt : L\nj : StructuredArrow t ι\n⊢ limit.lift (Ran.diagram ι Y t)\n        { pt := X'.obj t,\n          π := NatTrans.mk fun i => X'.map i.hom ≫ NatTrans.app f (ι.obj i.right) ≫ NatTrans.app g i.right } ≫\n      limit.π (Ran.diagram ι Y t) j =\n    (NatTrans.app f t ≫\n        limit.lift (Ran.diagram ι Y t)\n          { pt := X.obj t, π := NatTrans.mk fun i => X.map i.hom ≫ NatTrans.app g i.right }) ≫\n      limit.π (Ran.diagram ι Y t) j\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\n⊢ IsIso (adjunction D ι).counit\n[PROOFSTEP]\nsuffices : ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).counit X)\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\nthis : ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).counit X)\n⊢ IsIso (adjunction D ι).counit\n[PROOFSTEP]\napply NatIso.isIso_of_isIso_app\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\n⊢ ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).counit X)\n[PROOFSTEP]\nintro F\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\nF : S ⥤ D\n⊢ IsIso (NatTrans.app (adjunction D ι).counit F)\n[PROOFSTEP]\nsuffices : ∀ (X : S), IsIso (NatTrans.app (NatTrans.app (adjunction D ι).counit F) X)\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\nF : S ⥤ D\nthis : ∀ (X : S), IsIso (NatTrans.app (NatTrans.app (adjunction D ι).counit F) X)\n⊢ IsIso (NatTrans.app (adjunction D ι).counit F)\n[PROOFSTEP]\napply NatIso.isIso_of_isIso_app\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\nF : S ⥤ D\n⊢ ∀ (X : S), IsIso (NatTrans.app (NatTrans.app (adjunction D ι).counit F) X)\n[PROOFSTEP]\nintro X\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\nF : S ⥤ D\nX : S\n⊢ IsIso (NatTrans.app (NatTrans.app (adjunction D ι).counit F) X)\n[PROOFSTEP]\ndsimp [adjunction, equiv]\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\nF : S ⥤ D\nX : S\n⊢ IsIso (𝟙 (limit (diagram ι F (ι.obj X))) ≫ limit.π (diagram ι F (ι.obj X)) (StructuredArrow.mk (𝟙 (ι.obj X))))\n[PROOFSTEP]\nsimp only [Category.id_comp]\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasLimitsOfShape (StructuredArrow X ι) D\nF : S ⥤ D\nX : S\n⊢ IsIso (limit.π (diagram ι F (ι.obj X)) (StructuredArrow.mk (𝟙 (ι.obj X))))\n[PROOFSTEP]\nexact IsIso.of_iso ((limit.isLimit _).conePointUniqueUpToIso (limitOfDiagramInitial StructuredArrow.mkIdInitial _))\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nG : L ⥤ D\nx : L\nf : F ⟶ ι ⋙ G\n⊢ ∀ ⦃X Y : CostructuredArrow ι x⦄ (f_1 : X ⟶ Y),\n    (diagram ι F x).map f_1 ≫ (fun i => NatTrans.app f i.left ≫ G.map i.hom) Y =\n      (fun i => NatTrans.app f i.left ≫ G.map i.hom) X ≫ ((Functor.const (CostructuredArrow ι x)).obj (G.obj x)).map f_1\n[PROOFSTEP]\nrintro ⟨ir, ⟨il⟩, i⟩ ⟨jl, ⟨jr⟩, j⟩ ⟨fl, ⟨⟨fl⟩⟩, ff⟩\n[GOAL]\ncase mk.mk.mk.mk.mk.up.up\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nG : L ⥤ D\nx : L\nf : F ⟶ ι ⋙ G\nir : S\nil : PUnit\ni : ι.obj ir ⟶ (Functor.fromPUnit x).obj { as := il }\njl : S\njr : PUnit\nj : ι.obj jl ⟶ (Functor.fromPUnit x).obj { as := jr }\nfl✝ : { left := ir, right := { as := il }, hom := i }.left ⟶ { left := jl, right := { as := jr }, hom := j }.left\nfl : { left := ir, right := { as := il }, hom := i }.right.as = { left := jl, right := { as := jr }, hom := j }.right.as\nff :\n  ι.map fl✝ ≫ { left := jl, right := { as := jr }, hom := j }.hom =\n    { left := ir, right := { as := il }, hom := i }.hom ≫ (Functor.fromPUnit x).map { down := { down := fl } }\n⊢ (diagram ι F x).map (CommaMorphism.mk fl✝ { down := { down := fl } }) ≫\n      (fun i => NatTrans.app f i.left ≫ G.map i.hom) { left := jl, right := { as := jr }, hom := j } =\n    (fun i => NatTrans.app f i.left ≫ G.map i.hom) { left := ir, right := { as := il }, hom := i } ≫\n      ((Functor.const (CostructuredArrow ι x)).obj (G.obj x)).map (CommaMorphism.mk fl✝ { down := { down := fl } })\n[PROOFSTEP]\ndsimp at *\n[GOAL]\ncase mk.mk.mk.mk.mk.up.up\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nG : L ⥤ D\nx : L\nf : F ⟶ ι ⋙ G\nir : S\nil : PUnit\ni : ι.obj ir ⟶ (Functor.fromPUnit x).obj { as := il }\njl : S\njr : PUnit\nj : ι.obj jl ⟶ (Functor.fromPUnit x).obj { as := jr }\nfl✝ : { left := ir, right := { as := il }, hom := i }.left ⟶ { left := jl, right := { as := jr }, hom := j }.left\nfl : { left := ir, right := { as := il }, hom := i }.right.as = { left := jl, right := { as := jr }, hom := j }.right.as\nff :\n  ι.map fl✝ ≫ { left := jl, right := { as := jr }, hom := j }.hom =\n    { left := ir, right := { as := il }, hom := i }.hom ≫ (Functor.fromPUnit x).map { down := { down := fl } }\n⊢ F.map fl✝ ≫ NatTrans.app f jl ≫ G.map j = (NatTrans.app f ir ≫ G.map i) ≫ 𝟙 (G.obj x)\n[PROOFSTEP]\nsimp only [Functor.comp_map, Category.comp_id, NatTrans.naturality_assoc]\n[GOAL]\ncase mk.mk.mk.mk.mk.up.up\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nG : L ⥤ D\nx : L\nf : F ⟶ ι ⋙ G\nir : S\nil : PUnit\ni : ι.obj ir ⟶ (Functor.fromPUnit x).obj { as := il }\njl : S\njr : PUnit\nj : ι.obj jl ⟶ (Functor.fromPUnit x).obj { as := jr }\nfl✝ : { left := ir, right := { as := il }, hom := i }.left ⟶ { left := jl, right := { as := jr }, hom := j }.left\nfl : { left := ir, right := { as := il }, hom := i }.right.as = { left := jl, right := { as := jr }, hom := j }.right.as\nff :\n  ι.map fl✝ ≫ { left := jl, right := { as := jr }, hom := j }.hom =\n    { left := ir, right := { as := il }, hom := i }.hom ≫ (Functor.fromPUnit x).map { down := { down := fl } }\n⊢ NatTrans.app f ir ≫ G.map (ι.map fl✝) ≫ G.map j = NatTrans.app f ir ≫ G.map i\n[PROOFSTEP]\nrw [← G.map_comp, ff]\n[GOAL]\ncase mk.mk.mk.mk.mk.up.up\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nG : L ⥤ D\nx : L\nf : F ⟶ ι ⋙ G\nir : S\nil : PUnit\ni : ι.obj ir ⟶ (Functor.fromPUnit x).obj { as := il }\njl : S\njr : PUnit\nj : ι.obj jl ⟶ (Functor.fromPUnit x).obj { as := jr }\nfl✝ : { left := ir, right := { as := il }, hom := i }.left ⟶ { left := jl, right := { as := jr }, hom := j }.left\nfl : { left := ir, right := { as := il }, hom := i }.right.as = { left := jl, right := { as := jr }, hom := j }.right.as\nff :\n  ι.map fl✝ ≫ { left := jl, right := { as := jr }, hom := j }.hom =\n    { left := ir, right := { as := il }, hom := i }.hom ≫ (Functor.fromPUnit x).map { down := { down := fl } }\n⊢ NatTrans.app f ir ≫\n      G.map\n        ({ left := ir, right := { as := il }, hom := i }.hom ≫ (Functor.fromPUnit x).map { down := { down := fl } }) =\n    NatTrans.app f ir ≫ G.map i\n[PROOFSTEP]\naesop_cat\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\n⊢ ∀ (X : L),\n    { obj := fun x => colimit (diagram ι F x),\n            map := fun {x y} f => colimit.pre (diagram ι F y) (CostructuredArrow.map f) }.map\n        (𝟙 X) =\n      𝟙\n        ({ obj := fun x => colimit (diagram ι F x),\n              map := fun {x y} f => colimit.pre (diagram ι F y) (CostructuredArrow.map f) }.obj\n          X)\n[PROOFSTEP]\nintro l\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nl : L\n⊢ { obj := fun x => colimit (diagram ι F x),\n          map := fun {x y} f => colimit.pre (diagram ι F y) (CostructuredArrow.map f) }.map\n      (𝟙 l) =\n    𝟙\n      ({ obj := fun x => colimit (diagram ι F x),\n            map := fun {x y} f => colimit.pre (diagram ι F y) (CostructuredArrow.map f) }.obj\n        l)\n[PROOFSTEP]\ndsimp\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nl : L\n⊢ colimit.pre (diagram ι F l) (CostructuredArrow.map (𝟙 l)) = 𝟙 (colimit (diagram ι F l))\n[PROOFSTEP]\nhaveI : HasColimit (CostructuredArrow.map (𝟙 l) ⋙ diagram ι F l) := I _\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nl : L\nthis : HasColimit (CostructuredArrow.map (𝟙 l) ⋙ diagram ι F l)\n⊢ colimit.pre (diagram ι F l) (CostructuredArrow.map (𝟙 l)) = 𝟙 (colimit (diagram ι F l))\n[PROOFSTEP]\next j\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nl : L\nthis : HasColimit (CostructuredArrow.map (𝟙 l) ⋙ diagram ι F l)\nj : CostructuredArrow ι l\n⊢ colimit.ι (CostructuredArrow.map (𝟙 l) ⋙ diagram ι F l) j ≫\n      colimit.pre (diagram ι F l) (CostructuredArrow.map (𝟙 l)) =\n    colimit.ι (CostructuredArrow.map (𝟙 l) ⋙ diagram ι F l) j ≫ 𝟙 (colimit (diagram ι F l))\n[PROOFSTEP]\nerw [colimit.ι_pre, Category.comp_id]\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nl : L\nthis : HasColimit (CostructuredArrow.map (𝟙 l) ⋙ diagram ι F l)\nj : CostructuredArrow ι l\n⊢ colimit.ι (diagram ι F l) ((CostructuredArrow.map (𝟙 l)).obj j) =\n    colimit.ι (CostructuredArrow.map (𝟙 l) ⋙ diagram ι F l) j\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase w.h.e_7.h\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nl : L\nthis : HasColimit (CostructuredArrow.map (𝟙 l) ⋙ diagram ι F l)\nj : CostructuredArrow ι l\n⊢ (CostructuredArrow.map (𝟙 l)).obj j = j\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\n⊢ ∀ {X Y Z : L} (f : X ⟶ Y) (g : Y ⟶ Z),\n    { obj := fun x => colimit (diagram ι F x),\n            map := fun {x y} f => colimit.pre (diagram ι F y) (CostructuredArrow.map f) }.map\n        (f ≫ g) =\n      { obj := fun x => colimit (diagram ι F x),\n              map := fun {x y} f => colimit.pre (diagram ι F y) (CostructuredArrow.map f) }.map\n          f ≫\n        { obj := fun x => colimit (diagram ι F x),\n              map := fun {x y} f => colimit.pre (diagram ι F y) (CostructuredArrow.map f) }.map\n          g\n[PROOFSTEP]\nintro x y z f g\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\n⊢ { obj := fun x => colimit (diagram ι F x),\n          map := fun {x y} f => colimit.pre (diagram ι F y) (CostructuredArrow.map f) }.map\n      (f ≫ g) =\n    { obj := fun x => colimit (diagram ι F x),\n            map := fun {x y} f => colimit.pre (diagram ι F y) (CostructuredArrow.map f) }.map\n        f ≫\n      { obj := fun x => colimit (diagram ι F x),\n            map := fun {x y} f => colimit.pre (diagram ι F y) (CostructuredArrow.map f) }.map\n        g\n[PROOFSTEP]\ndsimp\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\n⊢ colimit.pre (diagram ι F z) (CostructuredArrow.map (f ≫ g)) =\n    colimit.pre (diagram ι F y) (CostructuredArrow.map f) ≫ colimit.pre (diagram ι F z) (CostructuredArrow.map g)\n[PROOFSTEP]\nhaveI : HasColimit (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) := I _\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nthis : HasColimit (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z)\n⊢ colimit.pre (diagram ι F z) (CostructuredArrow.map (f ≫ g)) =\n    colimit.pre (diagram ι F y) (CostructuredArrow.map f) ≫ colimit.pre (diagram ι F z) (CostructuredArrow.map g)\n[PROOFSTEP]\next j\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nthis : HasColimit (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z)\nj : CostructuredArrow ι x\n⊢ colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F z) (CostructuredArrow.map (f ≫ g)) =\n    colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F y) (CostructuredArrow.map f) ≫ colimit.pre (diagram ι F z) (CostructuredArrow.map g)\n[PROOFSTEP]\nlet ff : CostructuredArrow ι _ ⥤ _ := CostructuredArrow.map f\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nthis : HasColimit (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z)\nj : CostructuredArrow ι x\nff : CostructuredArrow ι x ⥤ CostructuredArrow ι y := CostructuredArrow.map f\n⊢ colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F z) (CostructuredArrow.map (f ≫ g)) =\n    colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F y) (CostructuredArrow.map f) ≫ colimit.pre (diagram ι F z) (CostructuredArrow.map g)\n[PROOFSTEP]\nlet gg : CostructuredArrow ι _ ⥤ _ := CostructuredArrow.map g\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nthis : HasColimit (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z)\nj : CostructuredArrow ι x\nff : CostructuredArrow ι x ⥤ CostructuredArrow ι y := CostructuredArrow.map f\ngg : CostructuredArrow ι y ⥤ CostructuredArrow ι z := CostructuredArrow.map g\n⊢ colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F z) (CostructuredArrow.map (f ≫ g)) =\n    colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F y) (CostructuredArrow.map f) ≫ colimit.pre (diagram ι F z) (CostructuredArrow.map g)\n[PROOFSTEP]\nlet dd := diagram ι F z\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nthis : HasColimit (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z)\nj : CostructuredArrow ι x\nff : CostructuredArrow ι x ⥤ CostructuredArrow ι y := CostructuredArrow.map f\ngg : CostructuredArrow ι y ⥤ CostructuredArrow ι z := CostructuredArrow.map g\ndd : CostructuredArrow ι z ⥤ D := diagram ι F z\n⊢ colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F z) (CostructuredArrow.map (f ≫ g)) =\n    colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F y) (CostructuredArrow.map f) ≫ colimit.pre (diagram ι F z) (CostructuredArrow.map g)\n[PROOFSTEP]\nhaveI : HasColimit (ff ⋙ gg ⋙ dd) := I _\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nthis✝ : HasColimit (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z)\nj : CostructuredArrow ι x\nff : CostructuredArrow ι x ⥤ CostructuredArrow ι y := CostructuredArrow.map f\ngg : CostructuredArrow ι y ⥤ CostructuredArrow ι z := CostructuredArrow.map g\ndd : CostructuredArrow ι z ⥤ D := diagram ι F z\nthis : HasColimit (ff ⋙ gg ⋙ dd)\n⊢ colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F z) (CostructuredArrow.map (f ≫ g)) =\n    colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F y) (CostructuredArrow.map f) ≫ colimit.pre (diagram ι F z) (CostructuredArrow.map g)\n[PROOFSTEP]\nhaveI : HasColimit ((ff ⋙ gg) ⋙ dd) := I _\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nthis✝¹ : HasColimit (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z)\nj : CostructuredArrow ι x\nff : CostructuredArrow ι x ⥤ CostructuredArrow ι y := CostructuredArrow.map f\ngg : CostructuredArrow ι y ⥤ CostructuredArrow ι z := CostructuredArrow.map g\ndd : CostructuredArrow ι z ⥤ D := diagram ι F z\nthis✝ : HasColimit (ff ⋙ gg ⋙ dd)\nthis : HasColimit ((ff ⋙ gg) ⋙ dd)\n⊢ colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F z) (CostructuredArrow.map (f ≫ g)) =\n    colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F y) (CostructuredArrow.map f) ≫ colimit.pre (diagram ι F z) (CostructuredArrow.map g)\n[PROOFSTEP]\nhaveI : HasColimit (gg ⋙ dd) := I _\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nthis✝² : HasColimit (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z)\nj : CostructuredArrow ι x\nff : CostructuredArrow ι x ⥤ CostructuredArrow ι y := CostructuredArrow.map f\ngg : CostructuredArrow ι y ⥤ CostructuredArrow ι z := CostructuredArrow.map g\ndd : CostructuredArrow ι z ⥤ D := diagram ι F z\nthis✝¹ : HasColimit (ff ⋙ gg ⋙ dd)\nthis✝ : HasColimit ((ff ⋙ gg) ⋙ dd)\nthis : HasColimit (gg ⋙ dd)\n⊢ colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F z) (CostructuredArrow.map (f ≫ g)) =\n    colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F y) (CostructuredArrow.map f) ≫ colimit.pre (diagram ι F z) (CostructuredArrow.map g)\n[PROOFSTEP]\nchange _ = colimit.ι ((ff ⋙ gg) ⋙ dd) j ≫ _ ≫ _\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nthis✝² : HasColimit (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z)\nj : CostructuredArrow ι x\nff : CostructuredArrow ι x ⥤ CostructuredArrow ι y := CostructuredArrow.map f\ngg : CostructuredArrow ι y ⥤ CostructuredArrow ι z := CostructuredArrow.map g\ndd : CostructuredArrow ι z ⥤ D := diagram ι F z\nthis✝¹ : HasColimit (ff ⋙ gg ⋙ dd)\nthis✝ : HasColimit ((ff ⋙ gg) ⋙ dd)\nthis : HasColimit (gg ⋙ dd)\n⊢ colimit.ι (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z) j ≫\n      colimit.pre (diagram ι F z) (CostructuredArrow.map (f ≫ g)) =\n    colimit.ι ((ff ⋙ gg) ⋙ dd) j ≫\n      colimit.pre (diagram ι F y) (CostructuredArrow.map f) ≫ colimit.pre (diagram ι F z) (CostructuredArrow.map g)\n[PROOFSTEP]\nerw [colimit.pre_pre dd gg ff, colimit.ι_pre, colimit.ι_pre]\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nthis✝² : HasColimit (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z)\nj : CostructuredArrow ι x\nff : CostructuredArrow ι x ⥤ CostructuredArrow ι y := CostructuredArrow.map f\ngg : CostructuredArrow ι y ⥤ CostructuredArrow ι z := CostructuredArrow.map g\ndd : CostructuredArrow ι z ⥤ D := diagram ι F z\nthis✝¹ : HasColimit (ff ⋙ gg ⋙ dd)\nthis✝ : HasColimit ((ff ⋙ gg) ⋙ dd)\nthis : HasColimit (gg ⋙ dd)\n⊢ colimit.ι (diagram ι F z) ((CostructuredArrow.map (f ≫ g)).obj j) = colimit.ι dd ((ff ⋙ gg).obj j)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase w.h.e_7.h\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nx y z : L\nf : x ⟶ y\ng : y ⟶ z\nthis✝² : HasColimit (CostructuredArrow.map (f ≫ g) ⋙ diagram ι F z)\nj : CostructuredArrow ι x\nff : CostructuredArrow ι x ⥤ CostructuredArrow ι y := CostructuredArrow.map f\ngg : CostructuredArrow ι y ⥤ CostructuredArrow ι z := CostructuredArrow.map g\ndd : CostructuredArrow ι z ⥤ D := diagram ι F z\nthis✝¹ : HasColimit (ff ⋙ gg ⋙ dd)\nthis✝ : HasColimit ((ff ⋙ gg) ⋙ dd)\nthis : HasColimit (gg ⋙ dd)\n⊢ (CostructuredArrow.map (f ≫ g)).obj j = (ff ⋙ gg).obj j\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\n⊢ ∀ ⦃X Y : S⦄ (f_1 : X ⟶ Y),\n    F.map f_1 ≫\n        (fun x => colimit.ι (diagram ι F (ι.obj x)) (CostructuredArrow.mk (𝟙 (ι.obj x))) ≫ NatTrans.app f (ι.obj x)) Y =\n      (fun x => colimit.ι (diagram ι F (ι.obj x)) (CostructuredArrow.mk (𝟙 (ι.obj x))) ≫ NatTrans.app f (ι.obj x)) X ≫\n        (((whiskeringLeft S L D).obj ι).obj G).map f_1\n[PROOFSTEP]\nintro x y ff\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\n⊢ F.map ff ≫\n      (fun x => colimit.ι (diagram ι F (ι.obj x)) (CostructuredArrow.mk (𝟙 (ι.obj x))) ≫ NatTrans.app f (ι.obj x)) y =\n    (fun x => colimit.ι (diagram ι F (ι.obj x)) (CostructuredArrow.mk (𝟙 (ι.obj x))) ≫ NatTrans.app f (ι.obj x)) x ≫\n      (((whiskeringLeft S L D).obj ι).obj G).map ff\n[PROOFSTEP]\ndsimp only [whiskeringLeft]\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\n⊢ F.map ff ≫ colimit.ι (diagram ι F (ι.obj y)) (CostructuredArrow.mk (𝟙 (ι.obj y))) ≫ NatTrans.app f (ι.obj y) =\n    (colimit.ι (diagram ι F (ι.obj x)) (CostructuredArrow.mk (𝟙 (ι.obj x))) ≫ NatTrans.app f (ι.obj x)) ≫ (ι ⋙ G).map ff\n[PROOFSTEP]\nsimp only [Functor.comp_map, Category.assoc]\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\n⊢ F.map ff ≫ colimit.ι (diagram ι F (ι.obj y)) (CostructuredArrow.mk (𝟙 (ι.obj y))) ≫ NatTrans.app f (ι.obj y) =\n    colimit.ι (diagram ι F (ι.obj x)) (CostructuredArrow.mk (𝟙 (ι.obj x))) ≫ NatTrans.app f (ι.obj x) ≫ G.map (ι.map ff)\n[PROOFSTEP]\nrw [← f.naturality (ι.map ff), ← Category.assoc, ← Category.assoc]\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\n⊢ (F.map ff ≫ colimit.ι (diagram ι F (ι.obj y)) (CostructuredArrow.mk (𝟙 (ι.obj y)))) ≫ NatTrans.app f (ι.obj y) =\n    (colimit.ι (diagram ι F (ι.obj x)) (CostructuredArrow.mk (𝟙 (ι.obj x))) ≫ (loc ι F).map (ι.map ff)) ≫\n      NatTrans.app f (ι.obj y)\n[PROOFSTEP]\nlet fff : CostructuredArrow ι _ ⥤ _ :=\n  CostructuredArrow.map\n    (ι.map ff)\n      -- same issue :-(\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\nfff : CostructuredArrow ι (ι.obj x) ⥤ CostructuredArrow ι (ι.obj y) := CostructuredArrow.map (ι.map ff)\n⊢ (F.map ff ≫ colimit.ι (diagram ι F (ι.obj y)) (CostructuredArrow.mk (𝟙 (ι.obj y)))) ≫ NatTrans.app f (ι.obj y) =\n    (colimit.ι (diagram ι F (ι.obj x)) (CostructuredArrow.mk (𝟙 (ι.obj x))) ≫ (loc ι F).map (ι.map ff)) ≫\n      NatTrans.app f (ι.obj y)\n[PROOFSTEP]\nhaveI : HasColimit (fff ⋙ diagram ι F (ι.obj y)) := I _\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\nfff : CostructuredArrow ι (ι.obj x) ⥤ CostructuredArrow ι (ι.obj y) := CostructuredArrow.map (ι.map ff)\nthis : HasColimit (fff ⋙ diagram ι F (ι.obj y))\n⊢ (F.map ff ≫ colimit.ι (diagram ι F (ι.obj y)) (CostructuredArrow.mk (𝟙 (ι.obj y)))) ≫ NatTrans.app f (ι.obj y) =\n    (colimit.ι (diagram ι F (ι.obj x)) (CostructuredArrow.mk (𝟙 (ι.obj x))) ≫ (loc ι F).map (ι.map ff)) ≫\n      NatTrans.app f (ι.obj y)\n[PROOFSTEP]\nerw [colimit.ι_pre (diagram ι F (ι.obj y)) fff (CostructuredArrow.mk (𝟙 _))]\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\nfff : CostructuredArrow ι (ι.obj x) ⥤ CostructuredArrow ι (ι.obj y) := CostructuredArrow.map (ι.map ff)\nthis : HasColimit (fff ⋙ diagram ι F (ι.obj y))\n⊢ (F.map ff ≫ colimit.ι (diagram ι F (ι.obj y)) (CostructuredArrow.mk (𝟙 (ι.obj y)))) ≫ NatTrans.app f (ι.obj y) =\n    colimit.ι (diagram ι F (ι.obj y)) (fff.obj (CostructuredArrow.mk (𝟙 (ι.obj x)))) ≫ NatTrans.app f (ι.obj y)\n[PROOFSTEP]\nlet xx : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (ι.map ff)\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\nfff : CostructuredArrow ι (ι.obj x) ⥤ CostructuredArrow ι (ι.obj y) := CostructuredArrow.map (ι.map ff)\nthis : HasColimit (fff ⋙ diagram ι F (ι.obj y))\nxx : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (ι.map ff)\n⊢ (F.map ff ≫ colimit.ι (diagram ι F (ι.obj y)) (CostructuredArrow.mk (𝟙 (ι.obj y)))) ≫ NatTrans.app f (ι.obj y) =\n    colimit.ι (diagram ι F (ι.obj y)) (fff.obj (CostructuredArrow.mk (𝟙 (ι.obj x)))) ≫ NatTrans.app f (ι.obj y)\n[PROOFSTEP]\nlet yy : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (𝟙 _)\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\nfff : CostructuredArrow ι (ι.obj x) ⥤ CostructuredArrow ι (ι.obj y) := CostructuredArrow.map (ι.map ff)\nthis : HasColimit (fff ⋙ diagram ι F (ι.obj y))\nxx : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (ι.map ff)\nyy : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (𝟙 (ι.obj y))\n⊢ (F.map ff ≫ colimit.ι (diagram ι F (ι.obj y)) (CostructuredArrow.mk (𝟙 (ι.obj y)))) ≫ NatTrans.app f (ι.obj y) =\n    colimit.ι (diagram ι F (ι.obj y)) (fff.obj (CostructuredArrow.mk (𝟙 (ι.obj x)))) ≫ NatTrans.app f (ι.obj y)\n[PROOFSTEP]\nlet fff : xx ⟶ yy :=\n  CostructuredArrow.homMk ff\n    (by\n      simp only [CostructuredArrow.mk_hom_eq_self]\n      erw [Category.comp_id])\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\nfff : CostructuredArrow ι (ι.obj x) ⥤ CostructuredArrow ι (ι.obj y) := CostructuredArrow.map (ι.map ff)\nthis : HasColimit (fff ⋙ diagram ι F (ι.obj y))\nxx : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (ι.map ff)\nyy : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (𝟙 (ι.obj y))\n⊢ ι.map ff ≫ yy.hom = xx.hom\n[PROOFSTEP]\nsimp only [CostructuredArrow.mk_hom_eq_self]\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\nfff : CostructuredArrow ι (ι.obj x) ⥤ CostructuredArrow ι (ι.obj y) := CostructuredArrow.map (ι.map ff)\nthis : HasColimit (fff ⋙ diagram ι F (ι.obj y))\nxx : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (ι.map ff)\nyy : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (𝟙 (ι.obj y))\n⊢ ι.map ff ≫ 𝟙 (ι.obj y) = ι.map ff\n[PROOFSTEP]\nerw [Category.comp_id]\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\nfff✝ : CostructuredArrow ι (ι.obj x) ⥤ CostructuredArrow ι (ι.obj y) := CostructuredArrow.map (ι.map ff)\nthis : HasColimit (fff✝ ⋙ diagram ι F (ι.obj y))\nxx : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (ι.map ff)\nyy : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (𝟙 (ι.obj y))\nfff : xx ⟶ yy := CostructuredArrow.homMk ff\n⊢ (F.map ff ≫ colimit.ι (diagram ι F (ι.obj y)) (CostructuredArrow.mk (𝟙 (ι.obj y)))) ≫ NatTrans.app f (ι.obj y) =\n    colimit.ι (diagram ι F (ι.obj y)) (fff✝.obj (CostructuredArrow.mk (𝟙 (ι.obj x)))) ≫ NatTrans.app f (ι.obj y)\n[PROOFSTEP]\nerw [colimit.w (diagram ι F (ι.obj y)) fff]\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\nfff✝ : CostructuredArrow ι (ι.obj x) ⥤ CostructuredArrow ι (ι.obj y) := CostructuredArrow.map (ι.map ff)\nthis : HasColimit (fff✝ ⋙ diagram ι F (ι.obj y))\nxx : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (ι.map ff)\nyy : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (𝟙 (ι.obj y))\nfff : xx ⟶ yy := CostructuredArrow.homMk ff\n⊢ colimit.ι (diagram ι F (ι.obj y)) xx ≫ NatTrans.app f (ι.obj y) =\n    colimit.ι (diagram ι F (ι.obj y)) (fff✝.obj (CostructuredArrow.mk (𝟙 (ι.obj x)))) ≫ NatTrans.app f (ι.obj y)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.h.e_7.h\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : loc ι F ⟶ G\nx y : S\nff : x ⟶ y\nfff✝ : CostructuredArrow ι (ι.obj x) ⥤ CostructuredArrow ι (ι.obj y) := CostructuredArrow.map (ι.map ff)\nthis : HasColimit (fff✝ ⋙ diagram ι F (ι.obj y))\nxx : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (ι.map ff)\nyy : CostructuredArrow ι (ι.obj y) := CostructuredArrow.mk (𝟙 (ι.obj y))\nfff : xx ⟶ yy := CostructuredArrow.homMk ff\n⊢ xx = fff✝.obj (CostructuredArrow.mk (𝟙 (ι.obj x)))\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : F ⟶ ((whiskeringLeft S L D).obj ι).obj G\n⊢ ∀ ⦃X Y : L⦄ (f_1 : X ⟶ Y),\n    (loc ι F).map f_1 ≫ (fun x => colimit.desc (diagram ι F x) (cocone x f)) Y =\n      (fun x => colimit.desc (diagram ι F x) (cocone x f)) X ≫ G.map f_1\n[PROOFSTEP]\nintro x y ff\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : F ⟶ ((whiskeringLeft S L D).obj ι).obj G\nx y : L\nff : x ⟶ y\n⊢ (loc ι F).map ff ≫ (fun x => colimit.desc (diagram ι F x) (cocone x f)) y =\n    (fun x => colimit.desc (diagram ι F x) (cocone x f)) x ≫ G.map ff\n[PROOFSTEP]\napply colimit.hom_ext\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : F ⟶ ((whiskeringLeft S L D).obj ι).obj G\nx y : L\nff : x ⟶ y\n⊢ ∀ (j : CostructuredArrow ι x),\n    colimit.ι (diagram ι F x) j ≫ (loc ι F).map ff ≫ (fun x => colimit.desc (diagram ι F x) (cocone x f)) y =\n      colimit.ι (diagram ι F x) j ≫ (fun x => colimit.desc (diagram ι F x) (cocone x f)) x ≫ G.map ff\n[PROOFSTEP]\nintros j\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : F ⟶ ((whiskeringLeft S L D).obj ι).obj G\nx y : L\nff : x ⟶ y\nj : CostructuredArrow ι x\n⊢ colimit.ι (diagram ι F x) j ≫ (loc ι F).map ff ≫ (fun x => colimit.desc (diagram ι F x) (cocone x f)) y =\n    colimit.ι (diagram ι F x) j ≫ (fun x => colimit.desc (diagram ι F x) (cocone x f)) x ≫ G.map ff\n[PROOFSTEP]\nhaveI : HasColimit (CostructuredArrow.map ff ⋙ diagram ι F y) := I _\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : F ⟶ ((whiskeringLeft S L D).obj ι).obj G\nx y : L\nff : x ⟶ y\nj : CostructuredArrow ι x\nthis : HasColimit (CostructuredArrow.map ff ⋙ diagram ι F y)\n⊢ colimit.ι (diagram ι F x) j ≫ (loc ι F).map ff ≫ (fun x => colimit.desc (diagram ι F x) (cocone x f)) y =\n    colimit.ι (diagram ι F x) j ≫ (fun x => colimit.desc (diagram ι F x) (cocone x f)) x ≫ G.map ff\n[PROOFSTEP]\nerw [colimit.pre_desc, ← Category.assoc, colimit.ι_desc, colimit.ι_desc]\n[GOAL]\ncase w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nf : F ⟶ ((whiskeringLeft S L D).obj ι).obj G\nx y : L\nff : x ⟶ y\nj : CostructuredArrow ι x\nthis : HasColimit (CostructuredArrow.map ff ⋙ diagram ι F y)\n⊢ NatTrans.app (Cocone.whisker (CostructuredArrow.map ff) (cocone y f)).ι j = NatTrans.app (cocone x f).ι j ≫ G.map ff\n[PROOFSTEP]\nsimp\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\n⊢ Function.LeftInverse (fun f => NatTrans.mk fun x => colimit.desc (diagram ι F x) (cocone x f)) fun f =>\n    NatTrans.mk fun x =>\n      colimit.ι (diagram ι F (ι.obj x)) (CostructuredArrow.mk (𝟙 (ι.obj x))) ≫ NatTrans.app f (ι.obj x)\n[PROOFSTEP]\nintros x\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\n⊢ (fun f => NatTrans.mk fun x => colimit.desc (diagram ι F x) (cocone x f))\n      ((fun f =>\n          NatTrans.mk fun x =>\n            colimit.ι (diagram ι F (ι.obj x)) (CostructuredArrow.mk (𝟙 (ι.obj x))) ≫ NatTrans.app f (ι.obj x))\n        x) =\n    x\n[PROOFSTEP]\ndsimp\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\n⊢ (NatTrans.mk fun x_1 =>\n      colimit.desc (diagram ι F x_1)\n        { pt := G.obj x_1,\n          ι :=\n            NatTrans.mk fun i =>\n              (colimit.ι (diagram ι F (ι.obj i.left)) (CostructuredArrow.mk (𝟙 (ι.obj i.left))) ≫\n                  NatTrans.app x (ι.obj i.left)) ≫\n                G.map i.hom }) =\n    x\n[PROOFSTEP]\next k\n[GOAL]\ncase w.h\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\n⊢ NatTrans.app\n      (NatTrans.mk fun x_1 =>\n        colimit.desc (diagram ι F x_1)\n          { pt := G.obj x_1,\n            ι :=\n              NatTrans.mk fun i =>\n                (colimit.ι (diagram ι F (ι.obj i.left)) (CostructuredArrow.mk (𝟙 (ι.obj i.left))) ≫\n                    NatTrans.app x (ι.obj i.left)) ≫\n                  G.map i.hom })\n      k =\n    NatTrans.app x k\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\n⊢ colimit.desc (diagram ι F k)\n      { pt := G.obj k,\n        ι :=\n          NatTrans.mk fun i =>\n            (colimit.ι (diagram ι F (ι.obj i.left)) (CostructuredArrow.mk (𝟙 (ι.obj i.left))) ≫\n                NatTrans.app x (ι.obj i.left)) ≫\n              G.map i.hom } =\n    NatTrans.app x k\n[PROOFSTEP]\napply colimit.hom_ext\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\n⊢ ∀ (j : CostructuredArrow ι k),\n    colimit.ι (diagram ι F k) j ≫\n        colimit.desc (diagram ι F k)\n          { pt := G.obj k,\n            ι :=\n              NatTrans.mk fun i =>\n                (colimit.ι (diagram ι F (ι.obj i.left)) (CostructuredArrow.mk (𝟙 (ι.obj i.left))) ≫\n                    NatTrans.app x (ι.obj i.left)) ≫\n                  G.map i.hom } =\n      colimit.ι (diagram ι F k) j ≫ NatTrans.app x k\n[PROOFSTEP]\nintros j\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\nj : CostructuredArrow ι k\n⊢ colimit.ι (diagram ι F k) j ≫\n      colimit.desc (diagram ι F k)\n        { pt := G.obj k,\n          ι :=\n            NatTrans.mk fun i =>\n              (colimit.ι (diagram ι F (ι.obj i.left)) (CostructuredArrow.mk (𝟙 (ι.obj i.left))) ≫\n                  NatTrans.app x (ι.obj i.left)) ≫\n                G.map i.hom } =\n    colimit.ι (diagram ι F k) j ≫ NatTrans.app x k\n[PROOFSTEP]\nrw [colimit.ι_desc]\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\nj : CostructuredArrow ι k\n⊢ NatTrans.app\n      { pt := G.obj k,\n          ι :=\n            NatTrans.mk fun i =>\n              (colimit.ι (diagram ι F (ι.obj i.left)) (CostructuredArrow.mk (𝟙 (ι.obj i.left))) ≫\n                  NatTrans.app x (ι.obj i.left)) ≫\n                G.map i.hom }.ι\n      j =\n    colimit.ι (diagram ι F k) j ≫ NatTrans.app x k\n[PROOFSTEP]\ndsimp only [cocone]\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\nj : CostructuredArrow ι k\n⊢ (colimit.ι (diagram ι F (ι.obj j.left)) (CostructuredArrow.mk (𝟙 (ι.obj j.left))) ≫ NatTrans.app x (ι.obj j.left)) ≫\n      G.map j.hom =\n    colimit.ι (diagram ι F k) j ≫ NatTrans.app x k\n[PROOFSTEP]\nrw [Category.assoc, ← x.naturality j.hom, ← Category.assoc]\n[GOAL]\ncase w.h.w\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\nj : CostructuredArrow ι k\n⊢ (colimit.ι (diagram ι F (ι.obj j.left)) (CostructuredArrow.mk (𝟙 (ι.obj j.left))) ≫ (loc ι F).map j.hom) ≫\n      NatTrans.app x ((Functor.fromPUnit k).obj j.right) =\n    colimit.ι (diagram ι F k) j ≫ NatTrans.app x k\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase w.h.w.e_a\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\nj : CostructuredArrow ι k\n⊢ colimit.ι (diagram ι F (ι.obj j.left)) (CostructuredArrow.mk (𝟙 (ι.obj j.left))) ≫ (loc ι F).map j.hom =\n    colimit.ι (diagram ι F k) j\n[PROOFSTEP]\ndsimp [loc]\n[GOAL]\ncase w.h.w.e_a\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\nj : CostructuredArrow ι k\n⊢ colimit.ι (diagram ι F (ι.obj j.left)) (CostructuredArrow.mk (𝟙 (ι.obj j.left))) ≫\n      colimit.pre (diagram ι F k) (CostructuredArrow.map j.hom) =\n    colimit.ι (diagram ι F k) j\n[PROOFSTEP]\nhaveI : HasColimit (CostructuredArrow.map j.hom ⋙ diagram ι F k) := I _\n[GOAL]\ncase w.h.w.e_a\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\nj : CostructuredArrow ι k\nthis : HasColimit (CostructuredArrow.map j.hom ⋙ diagram ι F k)\n⊢ colimit.ι (diagram ι F (ι.obj j.left)) (CostructuredArrow.mk (𝟙 (ι.obj j.left))) ≫\n      colimit.pre (diagram ι F k) (CostructuredArrow.map j.hom) =\n    colimit.ι (diagram ι F k) j\n[PROOFSTEP]\nerw [colimit.ι_pre (diagram ι F k) (CostructuredArrow.map j.hom)]\n[GOAL]\ncase w.h.w.e_a\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\nj : CostructuredArrow ι k\nthis : HasColimit (CostructuredArrow.map j.hom ⋙ diagram ι F k)\n⊢ colimit.ι (diagram ι F k) ((CostructuredArrow.map j.hom).obj (CostructuredArrow.mk (𝟙 (ι.obj j.left)))) =\n    colimit.ι (diagram ι F k) j\n[PROOFSTEP]\ncongr\n[GOAL]\ncase w.h.w.e_a.h.e_7.h\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\nj : CostructuredArrow ι k\nthis : HasColimit (CostructuredArrow.map j.hom ⋙ diagram ι F k)\n⊢ (CostructuredArrow.map j.hom).obj (CostructuredArrow.mk (𝟙 (ι.obj j.left))) = j\n[PROOFSTEP]\nrcases j with ⟨_, ⟨⟩, _⟩\n[GOAL]\ncase w.h.w.e_a.h.e_7.h.mk.mk\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\nleft✝ : S\nas✝ : PUnit\nhom✝ : ι.obj left✝ ⟶ (Functor.fromPUnit k).obj { as := as✝ }\nthis : HasColimit (CostructuredArrow.map { left := left✝, right := { as := as✝ }, hom := hom✝ }.hom ⋙ diagram ι F k)\n⊢ (CostructuredArrow.map { left := left✝, right := { as := as✝ }, hom := hom✝ }.hom).obj\n      (CostructuredArrow.mk (𝟙 (ι.obj { left := left✝, right := { as := as✝ }, hom := hom✝ }.left))) =\n    { left := left✝, right := { as := as✝ }, hom := hom✝ }\n[PROOFSTEP]\nsimp only [CostructuredArrow.map_mk, Category.id_comp]\n[GOAL]\ncase w.h.w.e_a.h.e_7.h.mk.mk\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\nx : loc ι F ⟶ G\nk : L\nleft✝ : S\nas✝ : PUnit\nhom✝ : ι.obj left✝ ⟶ (Functor.fromPUnit k).obj { as := as✝ }\nthis : HasColimit (CostructuredArrow.map { left := left✝, right := { as := as✝ }, hom := hom✝ }.hom ⋙ diagram ι F k)\n⊢ CostructuredArrow.mk hom✝ = { left := left✝, right := { as := as✝ }, hom := hom✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝² : Category.{v₁, u₁} S\ninst✝¹ : Category.{v₂, u₂} L\ninst✝ : Category.{v₃, u₃} D\nι : S ⥤ L\nF : S ⥤ D\nI : ∀ (x : L), HasColimit (diagram ι F x)\nG : L ⥤ D\n⊢ Function.RightInverse (fun f => NatTrans.mk fun x => colimit.desc (diagram ι F x) (cocone x f)) fun f =>\n    NatTrans.mk fun x =>\n      colimit.ι (diagram ι F (ι.obj x)) (CostructuredArrow.mk (𝟙 (ι.obj x))) ≫ NatTrans.app f (ι.obj x)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝³ : Category.{v₁, u₁} S\ninst✝² : Category.{v₂, u₂} L\ninst✝¹ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\n⊢ ∀ (X : S ⥤ D) (Y Y' : L ⥤ D) (g : Y ⟶ Y') (h : Lan.loc ι X ⟶ Y),\n    ↑((fun F G => Lan.equiv ι F G) X Y') (h ≫ g) =\n      ↑((fun F G => Lan.equiv ι F G) X Y) h ≫ ((whiskeringLeft S L D).obj ι).map g\n[PROOFSTEP]\n{ intros X' X Y f g\n  ext\n  simp [Lan.equiv]\n}\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝³ : Category.{v₁, u₁} S\ninst✝² : Category.{v₂, u₂} L\ninst✝¹ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\n⊢ ∀ (X : S ⥤ D) (Y Y' : L ⥤ D) (g : Y ⟶ Y') (h : Lan.loc ι X ⟶ Y),\n    ↑((fun F G => Lan.equiv ι F G) X Y') (h ≫ g) =\n      ↑((fun F G => Lan.equiv ι F G) X Y) h ≫ ((whiskeringLeft S L D).obj ι).map g\n[PROOFSTEP]\nintros X' X Y f g\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝³ : Category.{v₁, u₁} S\ninst✝² : Category.{v₂, u₂} L\ninst✝¹ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\nX' : S ⥤ D\nX Y : L ⥤ D\nf : X ⟶ Y\ng : Lan.loc ι X' ⟶ X\n⊢ ↑((fun F G => Lan.equiv ι F G) X' Y) (g ≫ f) =\n    ↑((fun F G => Lan.equiv ι F G) X' X) g ≫ ((whiskeringLeft S L D).obj ι).map f\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝³ : Category.{v₁, u₁} S\ninst✝² : Category.{v₂, u₂} L\ninst✝¹ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\nX' : S ⥤ D\nX Y : L ⥤ D\nf : X ⟶ Y\ng : Lan.loc ι X' ⟶ X\nx✝ : S\n⊢ NatTrans.app (↑((fun F G => Lan.equiv ι F G) X' Y) (g ≫ f)) x✝ =\n    NatTrans.app (↑((fun F G => Lan.equiv ι F G) X' X) g ≫ ((whiskeringLeft S L D).obj ι).map f) x✝\n[PROOFSTEP]\nsimp [Lan.equiv]\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\n⊢ IsIso (adjunction D ι).unit\n[PROOFSTEP]\nsuffices : ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).unit X)\n[GOAL]\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\nthis : ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).unit X)\n⊢ IsIso (adjunction D ι).unit\n[PROOFSTEP]\napply NatIso.isIso_of_isIso_app\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\n⊢ ∀ (X : S ⥤ D), IsIso (NatTrans.app (adjunction D ι).unit X)\n[PROOFSTEP]\nintro F\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\nF : S ⥤ D\n⊢ IsIso (NatTrans.app (adjunction D ι).unit F)\n[PROOFSTEP]\nsuffices : ∀ (X : S), IsIso (NatTrans.app (NatTrans.app (adjunction D ι).unit F) X)\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\nF : S ⥤ D\nthis : ∀ (X : S), IsIso (NatTrans.app (NatTrans.app (adjunction D ι).unit F) X)\n⊢ IsIso (NatTrans.app (adjunction D ι).unit F)\n[PROOFSTEP]\napply NatIso.isIso_of_isIso_app\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\nF : S ⥤ D\n⊢ ∀ (X : S), IsIso (NatTrans.app (NatTrans.app (adjunction D ι).unit F) X)\n[PROOFSTEP]\nintro X\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\nF : S ⥤ D\nX : S\n⊢ IsIso (NatTrans.app (NatTrans.app (adjunction D ι).unit F) X)\n[PROOFSTEP]\ndsimp [adjunction, equiv]\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\nF : S ⥤ D\nX : S\n⊢ IsIso (colimit.ι (diagram ι F (ι.obj X)) (CostructuredArrow.mk (𝟙 (ι.obj X))) ≫ 𝟙 (colimit (diagram ι F (ι.obj X))))\n[PROOFSTEP]\nsimp only [Category.comp_id]\n[GOAL]\ncase this\nS : Type u₁\nL : Type u₂\nD : Type u₃\ninst✝⁵ : Category.{v₁, u₁} S\ninst✝⁴ : Category.{v₂, u₂} L\ninst✝³ : Category.{v₃, u₃} D\nι : S ⥤ L\ninst✝² : Full ι\ninst✝¹ : Faithful ι\ninst✝ : ∀ (X : L), HasColimitsOfShape (CostructuredArrow ι X) D\nF : S ⥤ D\nX : S\n⊢ IsIso (colimit.ι (diagram ι F (ι.obj X)) (CostructuredArrow.mk (𝟙 (ι.obj X))))\n[PROOFSTEP]\nexact\n  IsIso.of_iso\n    ((colimit.isColimit _).coconePointUniqueUpToIso (colimitOfDiagramTerminal CostructuredArrow.mkIdTerminal _)).symm\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.KanExtension", "llama_tokens": 44397, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7490872243177518, "lm_q2_score": 0.5039061705290806, "lm_q1q2_score": 0.3774696745982167}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abs' (f j - f i) < ε\n[PROOFSTEP]\nlet ⟨k, hk⟩ := Archimedean.arch a ε0\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abs' (f j - f i) < ε\n[PROOFSTEP]\nhave h : ∃ l, ∀ n ≥ m, a - l • ε < f n :=\n  ⟨k + k + 1, fun n hnm =>\n    lt_of_lt_of_le\n      (show a - (k + (k + 1)) • ε < -|f n| from\n        lt_neg.1 <|\n          lt_of_le_of_lt (ham n hnm)\n            (by\n              rw [neg_sub, lt_sub_iff_add_lt, add_nsmul, add_nsmul, one_nsmul]\n              exact add_lt_add_of_le_of_lt hk (lt_of_le_of_lt hk (lt_add_of_pos_right _ ε0))))\n      (neg_le.2 <| abs_neg (f n) ▸ le_abs_self _)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm✝ : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nn : ℕ\nhnm : n ≥ m\n⊢ a < -(a - (k + (k + 1)) • ε)\n[PROOFSTEP]\nrw [neg_sub, lt_sub_iff_add_lt, add_nsmul, add_nsmul, one_nsmul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm✝ : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nn : ℕ\nhnm : n ≥ m\n⊢ a + a < k • ε + (k • ε + ε)\n[PROOFSTEP]\nexact add_lt_add_of_le_of_lt hk (lt_of_le_of_lt hk (lt_add_of_pos_right _ ε0))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abs' (f j - f i) < ε\n[PROOFSTEP]\nlet l := Nat.find h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abs' (f j - f i) < ε\n[PROOFSTEP]\nhave hl : ∀ n : ℕ, n ≥ m → f n > a - l • ε := Nat.find_spec h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abs' (f j - f i) < ε\n[PROOFSTEP]\nhave hl0 : l ≠ 0 := fun hl0 =>\n  not_lt_of_ge (ham m le_rfl) (lt_of_lt_of_le (by have := hl m (le_refl m); simpa [hl0] using this) (le_abs_self (f m)))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l = 0\n⊢ a < f m\n[PROOFSTEP]\nhave := hl m (le_refl m)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l = 0\nthis : f m > a - l • ε\n⊢ a < f m\n[PROOFSTEP]\nsimpa [hl0] using this\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l ≠ 0\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abs' (f j - f i) < ε\n[PROOFSTEP]\ncases' not_forall.1 (Nat.find_min h (Nat.pred_lt hl0)) with i hi\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l ≠ 0\ni : ℕ\nhi : ¬(i ≥ m → a - Nat.pred (Nat.find h) • ε < f i)\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abs' (f j - f i) < ε\n[PROOFSTEP]\nrw [not_imp, not_lt] at hi \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l ≠ 0\ni : ℕ\nhi : i ≥ m ∧ f i ≤ a - Nat.pred (Nat.find h) • ε\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abs' (f j - f i) < ε\n[PROOFSTEP]\nexists i\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l ≠ 0\ni : ℕ\nhi : i ≥ m ∧ f i ≤ a - Nat.pred (Nat.find h) • ε\n⊢ ∀ (j : ℕ), j ≥ i → abs' (f j - f i) < ε\n[PROOFSTEP]\nintro j hj\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l ≠ 0\ni : ℕ\nhi : i ≥ m ∧ f i ≤ a - Nat.pred (Nat.find h) • ε\nj : ℕ\nhj : j ≥ i\n⊢ abs' (f j - f i) < ε\n[PROOFSTEP]\nhave hfij : f j ≤ f i := (Nat.rel_of_forall_rel_succ_of_le_of_le (· ≥ ·) hnm hi.1 hj).le\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l ≠ 0\ni : ℕ\nhi : i ≥ m ∧ f i ≤ a - Nat.pred (Nat.find h) • ε\nj : ℕ\nhj : j ≥ i\nhfij : f j ≤ f i\n⊢ abs' (f j - f i) < ε\n[PROOFSTEP]\nrw [abs_of_nonpos (sub_nonpos.2 hfij), neg_sub, sub_lt_iff_lt_add']\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l ≠ 0\ni : ℕ\nhi : i ≥ m ∧ f i ≤ a - Nat.pred (Nat.find h) • ε\nj : ℕ\nhj : j ≥ i\nhfij : f j ≤ f i\n⊢ f i < f j + ε\n[PROOFSTEP]\ncalc\n  f i ≤ a - Nat.pred l • ε := hi.2\n  _ = a - l • ε + ε := by\n    conv =>\n      rhs\n      rw [← Nat.succ_pred_eq_of_pos (Nat.pos_of_ne_zero hl0), succ_nsmul', sub_add, add_sub_cancel]\n  _ < f j + ε := add_lt_add_right (hl j (le_trans hi.1 hj)) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l ≠ 0\ni : ℕ\nhi : i ≥ m ∧ f i ≤ a - Nat.pred (Nat.find h) • ε\nj : ℕ\nhj : j ≥ i\nhfij : f j ≤ f i\n⊢ a - Nat.pred l • ε = a - l • ε + ε\n[PROOFSTEP]\nconv =>\n  rhs\n  rw [← Nat.succ_pred_eq_of_pos (Nat.pos_of_ne_zero hl0), succ_nsmul', sub_add, add_sub_cancel]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l ≠ 0\ni : ℕ\nhi : i ≥ m ∧ f i ≤ a - Nat.pred (Nat.find h) • ε\nj : ℕ\nhj : j ≥ i\nhfij : f j ≤ f i\n| a - Nat.pred l • ε = a - l • ε + ε\n[PROOFSTEP]\n  rhs\n  rw [← Nat.succ_pred_eq_of_pos (Nat.pos_of_ne_zero hl0), succ_nsmul', sub_add, add_sub_cancel]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l ≠ 0\ni : ℕ\nhi : i ≥ m ∧ f i ≤ a - Nat.pred (Nat.find h) • ε\nj : ℕ\nhj : j ≥ i\nhfij : f j ≤ f i\n| a - Nat.pred l • ε = a - l • ε + ε\n[PROOFSTEP]\n  rhs\n  rw [← Nat.succ_pred_eq_of_pos (Nat.pos_of_ne_zero hl0), succ_nsmul', sub_add, add_sub_cancel]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l ≠ 0\ni : ℕ\nhi : i ≥ m ∧ f i ≤ a - Nat.pred (Nat.find h) • ε\nj : ℕ\nhj : j ≥ i\nhfij : f j ≤ f i\n| a - Nat.pred l • ε = a - l • ε + ε\n[PROOFSTEP]\nrhs\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f (Nat.succ n) ≤ f n\nε : α\nε0 : ε > 0\nk : ℕ\nhk : a ≤ k • ε\nh : ∃ l, ∀ (n : ℕ), n ≥ m → a - l • ε < f n\nl : ℕ := Nat.find h\nhl : ∀ (n : ℕ), n ≥ m → f n > a - l • ε\nhl0 : l ≠ 0\ni : ℕ\nhi : i ≥ m ∧ f i ≤ a - Nat.pred (Nat.find h) • ε\nj : ℕ\nhj : j ≥ i\nhfij : f j ≤ f i\n| a - l • ε + ε\n[PROOFSTEP]\nrw [← Nat.succ_pred_eq_of_pos (Nat.pos_of_ne_zero hl0), succ_nsmul', sub_add, add_sub_cancel]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f n ≤ f (Nat.succ n)\n⊢ IsCauSeq abs' f\n[PROOFSTEP]\nrefine'\n  @Eq.ndrecOn (ℕ → α) _ (IsCauSeq abs) _ _\n    (-⟨_, @isCauSeq_of_decreasing_bounded _ _ _ (fun n => -f n) a m (by simpa) (by simpa)⟩ : CauSeq α abs).2\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f n ≤ f (Nat.succ n)\n⊢ ∀ (n : ℕ), n ≥ m → abs' ((fun n => -f n) n) ≤ a\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f n ≤ f (Nat.succ n)\n⊢ ∀ (n : ℕ), n ≥ m → (fun n => -f n) (Nat.succ n) ≤ (fun n => -f n) n\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f n ≤ f (Nat.succ n)\n⊢ ↑(-{ val := fun n => -f n, property := (_ : IsCauSeq abs' fun n => -f n) }) = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝³ : Ring β\ninst✝² : LinearOrderedField α\ninst✝¹ : Archimedean α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → α\na : α\nm : ℕ\nham : ∀ (n : ℕ), n ≥ m → abs' (f n) ≤ a\nhnm : ∀ (n : ℕ), n ≥ m → f n ≤ f (Nat.succ n)\nx✝ : ℕ\n⊢ ↑(-{ val := fun n => -f n, property := (_ : IsCauSeq abs' fun n => -f n) }) x✝ = f x✝\n[PROOFSTEP]\nexact neg_neg _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\n⊢ (∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m) →\n    (IsCauSeq abs' fun n => ∑ i in range n, g i) → IsCauSeq abv fun n => ∑ i in range n, f i\n[PROOFSTEP]\nintro hm hg ε ε0\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\nhg : IsCauSeq abs' fun n => ∑ i in range n, g i\nε : α\nε0 : ε > 0\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) i) < ε\n[PROOFSTEP]\ncases' hg (ε / 2) (div_pos ε0 (by norm_num)) with i hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\nhg : IsCauSeq abs' fun n => ∑ i in range n, g i\nε : α\nε0 : ε > 0\n⊢ 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\nhg : IsCauSeq abs' fun n => ∑ i in range n, g i\nε : α\nε0 : ε > 0\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) i) < ε\n[PROOFSTEP]\nexists max n i\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\nhg : IsCauSeq abs' fun n => ∑ i in range n, g i\nε : α\nε0 : ε > 0\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\n⊢ ∀ (j : ℕ), j ≥ max n i → abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) (max n i)) < ε\n[PROOFSTEP]\nintro j ji\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\nhg : IsCauSeq abs' fun n => ∑ i in range n, g i\nε : α\nε0 : ε > 0\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nj : ℕ\nji : j ≥ max n i\n⊢ abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) (max n i)) < ε\n[PROOFSTEP]\nhave hi₁ := hi j (le_trans (le_max_right n i) ji)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\nhg : IsCauSeq abs' fun n => ∑ i in range n, g i\nε : α\nε0 : ε > 0\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nj : ℕ\nji : j ≥ max n i\nhi₁ : abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\n⊢ abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) (max n i)) < ε\n[PROOFSTEP]\nhave hi₂ := hi (max n i) (le_max_right n i)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\nhg : IsCauSeq abs' fun n => ∑ i in range n, g i\nε : α\nε0 : ε > 0\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nj : ℕ\nji : j ≥ max n i\nhi₁ : abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nhi₂ : abs' ((fun n => ∑ i in range n, g i) (max n i) - (fun n => ∑ i in range n, g i) i) < ε / 2\n⊢ abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) (max n i)) < ε\n[PROOFSTEP]\nhave sub_le := abs_sub_le (∑ k in range j, g k) (∑ k in range i, g k) (∑ k in range (max n i), g k)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\nhg : IsCauSeq abs' fun n => ∑ i in range n, g i\nε : α\nε0 : ε > 0\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nj : ℕ\nji : j ≥ max n i\nhi₁ : abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nhi₂ : abs' ((fun n => ∑ i in range n, g i) (max n i) - (fun n => ∑ i in range n, g i) i) < ε / 2\nsub_le :\n  abs' (∑ k in range j, g k - ∑ k in range (max n i), g k) ≤\n    abs' (∑ k in range j, g k - ∑ k in range i, g k) + abs' (∑ k in range i, g k - ∑ k in range (max n i), g k)\n⊢ abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) (max n i)) < ε\n[PROOFSTEP]\nhave := add_lt_add hi₁ hi₂\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\nhg : IsCauSeq abs' fun n => ∑ i in range n, g i\nε : α\nε0 : ε > 0\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nj : ℕ\nji : j ≥ max n i\nhi₁ : abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nhi₂ : abs' ((fun n => ∑ i in range n, g i) (max n i) - (fun n => ∑ i in range n, g i) i) < ε / 2\nsub_le :\n  abs' (∑ k in range j, g k - ∑ k in range (max n i), g k) ≤\n    abs' (∑ k in range j, g k - ∑ k in range i, g k) + abs' (∑ k in range i, g k - ∑ k in range (max n i), g k)\nthis :\n  abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) +\n      abs' ((fun n => ∑ i in range n, g i) (max n i) - (fun n => ∑ i in range n, g i) i) <\n    ε / 2 + ε / 2\n⊢ abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) (max n i)) < ε\n[PROOFSTEP]\nrw [abs_sub_comm (∑ k in range (max n i), g k), add_halves ε] at this \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\nhg : IsCauSeq abs' fun n => ∑ i in range n, g i\nε : α\nε0 : ε > 0\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nj : ℕ\nji : j ≥ max n i\nhi₁ : abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nhi₂ : abs' ((fun n => ∑ i in range n, g i) (max n i) - (fun n => ∑ i in range n, g i) i) < ε / 2\nsub_le :\n  abs' (∑ k in range j, g k - ∑ k in range (max n i), g k) ≤\n    abs' (∑ k in range j, g k - ∑ k in range i, g k) + abs' (∑ k in range i, g k - ∑ k in range (max n i), g k)\nthis :\n  abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) +\n      abs' ((fun n => ∑ i in range n, g i) i - ∑ k in range (max n i), g k) <\n    ε\n⊢ abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) (max n i)) < ε\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (le_trans (le_trans _ (le_abs_self _)) sub_le) this\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\nhg : IsCauSeq abs' fun n => ∑ i in range n, g i\nε : α\nε0 : ε > 0\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nj : ℕ\nji : j ≥ max n i\nhi₁ : abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nhi₂ : abs' ((fun n => ∑ i in range n, g i) (max n i) - (fun n => ∑ i in range n, g i) i) < ε / 2\nsub_le :\n  abs' (∑ k in range j, g k - ∑ k in range (max n i), g k) ≤\n    abs' (∑ k in range j, g k - ∑ k in range i, g k) + abs' (∑ k in range i, g k - ∑ k in range (max n i), g k)\nthis :\n  abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) +\n      abs' ((fun n => ∑ i in range n, g i) i - ∑ k in range (max n i), g k) <\n    ε\n⊢ abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) (max n i)) ≤\n    ∑ k in range j, g k - ∑ k in range (max n i), g k\n[PROOFSTEP]\ngeneralize hk : j - max n i = k\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\nhg : IsCauSeq abs' fun n => ∑ i in range n, g i\nε : α\nε0 : ε > 0\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nj : ℕ\nji : j ≥ max n i\nhi₁ : abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) < ε / 2\nhi₂ : abs' ((fun n => ∑ i in range n, g i) (max n i) - (fun n => ∑ i in range n, g i) i) < ε / 2\nsub_le :\n  abs' (∑ k in range j, g k - ∑ k in range (max n i), g k) ≤\n    abs' (∑ k in range j, g k - ∑ k in range i, g k) + abs' (∑ k in range i, g k - ∑ k in range (max n i), g k)\nthis :\n  abs' ((fun n => ∑ i in range n, g i) j - (fun n => ∑ i in range n, g i) i) +\n      abs' ((fun n => ∑ i in range n, g i) i - ∑ k in range (max n i), g k) <\n    ε\nk : ℕ\nhk : j - max n i = k\n⊢ abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) (max n i)) ≤\n    ∑ k in range j, g k - ∑ k in range (max n i), g k\n[PROOFSTEP]\nclear this hi₂ hi₁ hi ε0 ε hg sub_le\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\ni j : ℕ\nji : j ≥ max n i\nk : ℕ\nhk : j - max n i = k\n⊢ abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) (max n i)) ≤\n    ∑ k in range j, g k - ∑ k in range (max n i), g k\n[PROOFSTEP]\nrw [tsub_eq_iff_eq_add_of_le ji] at hk \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\ni j : ℕ\nji : j ≥ max n i\nk : ℕ\nhk : j = k + max n i\n⊢ abv ((fun n => ∑ i in range n, f i) j - (fun n => ∑ i in range n, f i) (max n i)) ≤\n    ∑ k in range j, g k - ∑ k in range (max n i), g k\n[PROOFSTEP]\nrw [hk]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\ni j : ℕ\nji : j ≥ max n i\nk : ℕ\nhk : j = k + max n i\n⊢ abv ((fun n => ∑ i in range n, f i) (k + max n i) - (fun n => ∑ i in range n, f i) (max n i)) ≤\n    ∑ k in range (k + max n i), g k - ∑ k in range (max n i), g k\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\ni j : ℕ\nji : j ≥ max n i\nk : ℕ\nhk : j = k + max n i\n⊢ abv (∑ i in range (k + max n i), f i - ∑ i in range (max n i), f i) ≤\n    ∑ k in range (k + max n i), g k - ∑ k in range (max n i), g k\n[PROOFSTEP]\nclear hk ji j\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\ni k : ℕ\n⊢ abv (∑ i in range (k + max n i), f i - ∑ i in range (max n i), f i) ≤\n    ∑ k in range (k + max n i), g k - ∑ k in range (max n i), g k\n[PROOFSTEP]\ninduction' k with k' hi\n[GOAL]\ncase intro.zero\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\ni : ℕ\n⊢ abv (∑ i in range (Nat.zero + max n i), f i - ∑ i in range (max n i), f i) ≤\n    ∑ k in range (Nat.zero + max n i), g k - ∑ k in range (max n i), g k\n[PROOFSTEP]\nsimp [abv_zero abv]\n[GOAL]\ncase intro.succ\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\ni k' : ℕ\nhi :\n  abv (∑ i in range (k' + max n i), f i - ∑ i in range (max n i), f i) ≤\n    ∑ k in range (k' + max n i), g k - ∑ k in range (max n i), g k\n⊢ abv (∑ i in range (Nat.succ k' + max n i), f i - ∑ i in range (max n i), f i) ≤\n    ∑ k in range (Nat.succ k' + max n i), g k - ∑ k in range (max n i), g k\n[PROOFSTEP]\nsimp only [Nat.succ_add, Nat.succ_eq_add_one, Finset.sum_range_succ_comm]\n[GOAL]\ncase intro.succ\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\ni k' : ℕ\nhi :\n  abv (∑ i in range (k' + max n i), f i - ∑ i in range (max n i), f i) ≤\n    ∑ k in range (k' + max n i), g k - ∑ k in range (max n i), g k\n⊢ abv (f (k' + max n i) + ∑ x in range (k' + max n i), f x - ∑ x in range (max n i), f x) ≤\n    g (k' + max n i) + ∑ x in range (k' + max n i), g x - ∑ x in range (max n i), g x\n[PROOFSTEP]\nsimp only [add_assoc, sub_eq_add_neg]\n[GOAL]\ncase intro.succ\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\ni k' : ℕ\nhi :\n  abv (∑ i in range (k' + max n i), f i - ∑ i in range (max n i), f i) ≤\n    ∑ k in range (k' + max n i), g k - ∑ k in range (max n i), g k\n⊢ abv (f (k' + max n i) + (∑ x in range (k' + max n i), f x + -∑ x in range (max n i), f x)) ≤\n    g (k' + max n i) + (∑ x in range (k' + max n i), g x + -∑ x in range (max n i), g x)\n[PROOFSTEP]\nrefine le_trans (abv_add _ _ _) ?_\n[GOAL]\ncase intro.succ\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\ni k' : ℕ\nhi :\n  abv (∑ i in range (k' + max n i), f i - ∑ i in range (max n i), f i) ≤\n    ∑ k in range (k' + max n i), g k - ∑ k in range (max n i), g k\n⊢ abv (f (k' + max n i)) + abv (∑ x in range (k' + max n i), f x + -∑ x in range (max n i), f x) ≤\n    g (k' + max n i) + (∑ x in range (k' + max n i), g x + -∑ x in range (max n i), g x)\n[PROOFSTEP]\nsimp only [sub_eq_add_neg] at hi \n[GOAL]\ncase intro.succ\nα : Type u_1\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : LinearOrderedField α\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\ng : ℕ → α\nn : ℕ\nhm : ∀ (m : ℕ), n ≤ m → abv (f m) ≤ g m\ni k' : ℕ\nhi :\n  abv (∑ i in range (k' + max n i), f i + -∑ i in range (max n i), f i) ≤\n    ∑ k in range (k' + max n i), g k + -∑ k in range (max n i), g k\n⊢ abv (f (k' + max n i)) + abv (∑ x in range (k' + max n i), f x + -∑ x in range (max n i), f x) ≤\n    g (k' + max n i) + (∑ x in range (k' + max n i), g x + -∑ x in range (max n i), g x)\n[PROOFSTEP]\nrefine add_le_add (hm _ (le_add_of_nonneg_of_le (Nat.zero_le _) (le_max_left _ _))) hi\n[GOAL]\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nh : abv x = 1\n⊢ False\n[PROOFSTEP]\nsimp [h, lt_irrefl] at hx1 \n[GOAL]\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\n⊢ IsCauSeq abs' fun m => ∑ n in range m, abv (x ^ n)\n[PROOFSTEP]\nsimp only [abv_pow abv, geom_sum_eq hx1']\n[GOAL]\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\n⊢ IsCauSeq abs' fun m => (abv x ^ m - 1) / (abv x - 1)\n[PROOFSTEP]\nconv in _ / _ => rw [← neg_div_neg_eq, neg_sub, neg_sub]\n[GOAL]\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nm : ℕ\n| (abv x ^ m - 1) / (abv x - 1)\n[PROOFSTEP]\nrw [← neg_div_neg_eq, neg_sub, neg_sub]\n[GOAL]\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nm : ℕ\n| (abv x ^ m - 1) / (abv x - 1)\n[PROOFSTEP]\nrw [← neg_div_neg_eq, neg_sub, neg_sub]\n[GOAL]\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nm : ℕ\n| (abv x ^ m - 1) / (abv x - 1)\n[PROOFSTEP]\nrw [← neg_div_neg_eq, neg_sub, neg_sub]\n[GOAL]\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\n⊢ IsCauSeq abs' fun m => (1 - abv x ^ m) / (1 - abv x)\n[PROOFSTEP]\nhave : 0 < 1 - abv x := sub_pos.2 hx1\n[GOAL]\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nthis : 0 < 1 - abv x\n⊢ IsCauSeq abs' fun m => (1 - abv x ^ m) / (1 - abv x)\n[PROOFSTEP]\nrefine' @isCauSeq_of_mono_bounded _ _ _ _ ((1 : α) / (1 - abv x)) 0 _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nthis : 0 < 1 - abv x\n⊢ ∀ (n : ℕ), n ≥ 0 → abs' ((1 - abv x ^ n) / (1 - abv x)) ≤ 1 / (1 - abv x)\n[PROOFSTEP]\nintro n _\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nthis : 0 < 1 - abv x\nn : ℕ\na✝ : n ≥ 0\n⊢ abs' ((1 - abv x ^ n) / (1 - abv x)) ≤ 1 / (1 - abv x)\n[PROOFSTEP]\nrw [abs_of_nonneg]\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nthis : 0 < 1 - abv x\nn : ℕ\na✝ : n ≥ 0\n⊢ (1 - abv x ^ n) / (1 - abv x) ≤ 1 / (1 - abv x)\ncase refine'_1\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nthis : 0 < 1 - abv x\nn : ℕ\na✝ : n ≥ 0\n⊢ 0 ≤ (1 - abv x ^ n) / (1 - abv x)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase refine'_1.h\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nthis : 0 < 1 - abv x\nn : ℕ\na✝ : n ≥ 0\n⊢ 1 - abv x ^ n ≤ 1\n[PROOFSTEP]\nexact sub_le_self _ (abv_pow abv x n ▸ abv_nonneg _ _)\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nthis : 0 < 1 - abv x\nn : ℕ\na✝ : n ≥ 0\n⊢ 0 ≤ (1 - abv x ^ n) / (1 - abv x)\n[PROOFSTEP]\nrefine' div_nonneg (sub_nonneg.2 _) (sub_nonneg.2 <| le_of_lt hx1)\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nthis : 0 < 1 - abv x\nn : ℕ\na✝ : n ≥ 0\n⊢ abv x ^ n ≤ 1\n[PROOFSTEP]\nexact pow_le_one _ (by positivity) hx1.le\n[GOAL]\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nthis : 0 < 1 - abv x\nn : ℕ\na✝ : n ≥ 0\n⊢ 0 ≤ abv x\n[PROOFSTEP]\npositivity\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nthis : 0 < 1 - abv x\n⊢ ∀ (n : ℕ), n ≥ 0 → (1 - abv x ^ n) / (1 - abv x) ≤ (1 - abv x ^ Nat.succ n) / (1 - abv x)\n[PROOFSTEP]\nintro n _\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nthis : 0 < 1 - abv x\nn : ℕ\na✝ : n ≥ 0\n⊢ (1 - abv x ^ n) / (1 - abv x) ≤ (1 - abv x ^ Nat.succ n) / (1 - abv x)\n[PROOFSTEP]\nrw [← one_mul (abv x ^ n), pow_succ]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝⁴ : LinearOrderedField α\ninst✝³ : Archimedean α\nβ : Type u_2\ninst✝² : Ring β\ninst✝¹ : Nontrivial β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nx : β\nhx1 : abv x < 1\nhx1' : abv x ≠ 1\nthis : 0 < 1 - abv x\nn : ℕ\na✝ : n ≥ 0\n⊢ (1 - 1 * abv x ^ n) / (1 - abv x) ≤ (1 - abv x * abv x ^ n) / (1 - abv x)\n[PROOFSTEP]\ngcongr\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\na x : α\nhx1 : abs' x < 1\n⊢ IsCauSeq abs' fun m => ∑ n in range m, a * x ^ n\n[PROOFSTEP]\nhave : IsCauSeq abs fun m => a * ∑ n in range m, (x ^ n) :=\n  (CauSeq.const abs a * (show CauSeq α abs from ⟨fun n => ∑ m in range n, x ^ m, isCauSeq_geo_series x hx1⟩)).2\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrderedField α\ninst✝ : Archimedean α\na x : α\nhx1 : abs' x < 1\nthis : IsCauSeq abs' fun m => a * ∑ n in range m, x ^ n\n⊢ IsCauSeq abs' fun m => ∑ n in range m, a * x ^ n\n[PROOFSTEP]\nsimpa [mul_sum] using this\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\n⊢ IsCauSeq abv fun m => ∑ n in range m, f n\n[PROOFSTEP]\nhave har1 : |r| < 1 := by rwa [abs_of_nonneg hr0]\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\n⊢ abs' r < 1\n[PROOFSTEP]\nrwa [abs_of_nonneg hr0]\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\n⊢ IsCauSeq abv fun m => ∑ n in range m, f n\n[PROOFSTEP]\nrefine' isCauSeq_series_of_abv_le_of_isCauSeq n.succ _ (isCauSeq_geo_series_const (abv (f n.succ) * r⁻¹ ^ n.succ) har1)\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\n⊢ ∀ (m : ℕ), Nat.succ n ≤ m → abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\n[PROOFSTEP]\nintro m hmn\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm : ℕ\nhmn : Nat.succ n ≤ m\n⊢ abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\n[PROOFSTEP]\ncases' Classical.em (r = 0) with r_zero r_ne_zero\n[GOAL]\ncase inl\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm : ℕ\nhmn : Nat.succ n ≤ m\nr_zero : r = 0\n⊢ abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\n[PROOFSTEP]\nhave m_pos := lt_of_lt_of_le (Nat.succ_pos n) hmn\n[GOAL]\ncase inl\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm : ℕ\nhmn : Nat.succ n ≤ m\nr_zero : r = 0\nm_pos : 0 < m\n⊢ abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\n[PROOFSTEP]\nhave := h m.pred (Nat.le_of_succ_le_succ (by rwa [Nat.succ_pred_eq_of_pos m_pos]))\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm : ℕ\nhmn : Nat.succ n ≤ m\nr_zero : r = 0\nm_pos : 0 < m\n⊢ Nat.succ n ≤ Nat.succ (Nat.pred m)\n[PROOFSTEP]\nrwa [Nat.succ_pred_eq_of_pos m_pos]\n[GOAL]\ncase inl\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm : ℕ\nhmn : Nat.succ n ≤ m\nr_zero : r = 0\nm_pos : 0 < m\nthis : abv (f (Nat.succ (Nat.pred m))) ≤ r * abv (f (Nat.pred m))\n⊢ abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\n[PROOFSTEP]\nsimpa [r_zero, Nat.succ_pred_eq_of_pos m_pos, pow_succ] using this\n[GOAL]\ncase inr\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm : ℕ\nhmn : Nat.succ n ≤ m\nr_ne_zero : ¬r = 0\n⊢ abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\n[PROOFSTEP]\ngeneralize hk : m - n.succ = k\n[GOAL]\ncase inr\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm : ℕ\nhmn : Nat.succ n ≤ m\nr_ne_zero : ¬r = 0\nk : ℕ\nhk : m - Nat.succ n = k\n⊢ abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\n[PROOFSTEP]\nhave r_pos : 0 < r := lt_of_le_of_ne hr0 (Ne.symm r_ne_zero)\n[GOAL]\ncase inr\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm : ℕ\nhmn : Nat.succ n ≤ m\nr_ne_zero : ¬r = 0\nk : ℕ\nhk : m - Nat.succ n = k\nr_pos : 0 < r\n⊢ abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\n[PROOFSTEP]\nreplace hk : m = k + n.succ := (tsub_eq_iff_eq_add_of_le hmn).1 hk\n[GOAL]\ncase inr\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm : ℕ\nhmn : Nat.succ n ≤ m\nr_ne_zero : ¬r = 0\nk : ℕ\nr_pos : 0 < r\nhk : m = k + Nat.succ n\n⊢ abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\n[PROOFSTEP]\ninduction' k with k ih generalizing m n\n[GOAL]\ncase inr.zero\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn✝ : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh✝ : ∀ (m : ℕ), n✝ ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm✝ : ℕ\nhmn✝ : Nat.succ n✝ ≤ m✝\nr_ne_zero : ¬r = 0\nk : ℕ\nr_pos : 0 < r\nhk✝ : m✝ = k + Nat.succ n✝\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nm : ℕ\nhmn : Nat.succ n ≤ m\nhk : m = Nat.zero + Nat.succ n\n⊢ abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\n[PROOFSTEP]\nrw [hk, Nat.zero_add, mul_right_comm, inv_pow _ _, ← div_eq_mul_inv, mul_div_cancel]\n[GOAL]\ncase inr.zero.h\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn✝ : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh✝ : ∀ (m : ℕ), n✝ ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm✝ : ℕ\nhmn✝ : Nat.succ n✝ ≤ m✝\nr_ne_zero : ¬r = 0\nk : ℕ\nr_pos : 0 < r\nhk✝ : m✝ = k + Nat.succ n✝\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nm : ℕ\nhmn : Nat.succ n ≤ m\nhk : m = Nat.zero + Nat.succ n\n⊢ r ^ Nat.succ n ≠ 0\n[PROOFSTEP]\nexact (ne_of_lt (pow_pos r_pos _)).symm\n[GOAL]\ncase inr.succ\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn✝ : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh✝ : ∀ (m : ℕ), n✝ ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm✝ : ℕ\nhmn✝ : Nat.succ n✝ ≤ m✝\nr_ne_zero : ¬r = 0\nk✝ : ℕ\nr_pos : 0 < r\nhk✝ : m✝ = k✝ + Nat.succ n✝\nk : ℕ\nih :\n  ∀ (n : ℕ),\n    (∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)) →\n      ∀ (m : ℕ), Nat.succ n ≤ m → m = k + Nat.succ n → abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nm : ℕ\nhmn : Nat.succ n ≤ m\nhk : m = Nat.succ k + Nat.succ n\n⊢ abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\n[PROOFSTEP]\nhave kn : k + n.succ ≥ n.succ := by rw [← zero_add n.succ]; exact add_le_add (Nat.zero_le _) (by simp)\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn✝ : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh✝ : ∀ (m : ℕ), n✝ ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm✝ : ℕ\nhmn✝ : Nat.succ n✝ ≤ m✝\nr_ne_zero : ¬r = 0\nk✝ : ℕ\nr_pos : 0 < r\nhk✝ : m✝ = k✝ + Nat.succ n✝\nk : ℕ\nih :\n  ∀ (n : ℕ),\n    (∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)) →\n      ∀ (m : ℕ), Nat.succ n ≤ m → m = k + Nat.succ n → abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nm : ℕ\nhmn : Nat.succ n ≤ m\nhk : m = Nat.succ k + Nat.succ n\n⊢ k + Nat.succ n ≥ Nat.succ n\n[PROOFSTEP]\nrw [← zero_add n.succ]\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn✝ : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh✝ : ∀ (m : ℕ), n✝ ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm✝ : ℕ\nhmn✝ : Nat.succ n✝ ≤ m✝\nr_ne_zero : ¬r = 0\nk✝ : ℕ\nr_pos : 0 < r\nhk✝ : m✝ = k✝ + Nat.succ n✝\nk : ℕ\nih :\n  ∀ (n : ℕ),\n    (∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)) →\n      ∀ (m : ℕ), Nat.succ n ≤ m → m = k + Nat.succ n → abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nm : ℕ\nhmn : Nat.succ n ≤ m\nhk : m = Nat.succ k + Nat.succ n\n⊢ k + (0 + Nat.succ n) ≥ 0 + Nat.succ n\n[PROOFSTEP]\nexact add_le_add (Nat.zero_le _) (by simp)\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn✝ : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh✝ : ∀ (m : ℕ), n✝ ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm✝ : ℕ\nhmn✝ : Nat.succ n✝ ≤ m✝\nr_ne_zero : ¬r = 0\nk✝ : ℕ\nr_pos : 0 < r\nhk✝ : m✝ = k✝ + Nat.succ n✝\nk : ℕ\nih :\n  ∀ (n : ℕ),\n    (∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)) →\n      ∀ (m : ℕ), Nat.succ n ≤ m → m = k + Nat.succ n → abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nm : ℕ\nhmn : Nat.succ n ≤ m\nhk : m = Nat.succ k + Nat.succ n\n⊢ Nat.succ n ≤ 0 + Nat.succ n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.succ\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn✝ : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh✝ : ∀ (m : ℕ), n✝ ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm✝ : ℕ\nhmn✝ : Nat.succ n✝ ≤ m✝\nr_ne_zero : ¬r = 0\nk✝ : ℕ\nr_pos : 0 < r\nhk✝ : m✝ = k✝ + Nat.succ n✝\nk : ℕ\nih :\n  ∀ (n : ℕ),\n    (∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)) →\n      ∀ (m : ℕ), Nat.succ n ≤ m → m = k + Nat.succ n → abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nm : ℕ\nhmn : Nat.succ n ≤ m\nhk : m = Nat.succ k + Nat.succ n\nkn : k + Nat.succ n ≥ Nat.succ n\n⊢ abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\n[PROOFSTEP]\nerw [hk, Nat.succ_add, pow_succ' r, ← mul_assoc]\n[GOAL]\ncase inr.succ\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn✝ : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh✝ : ∀ (m : ℕ), n✝ ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm✝ : ℕ\nhmn✝ : Nat.succ n✝ ≤ m✝\nr_ne_zero : ¬r = 0\nk✝ : ℕ\nr_pos : 0 < r\nhk✝ : m✝ = k✝ + Nat.succ n✝\nk : ℕ\nih :\n  ∀ (n : ℕ),\n    (∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)) →\n      ∀ (m : ℕ), Nat.succ n ≤ m → m = k + Nat.succ n → abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nm : ℕ\nhmn : Nat.succ n ≤ m\nhk : m = Nat.succ k + Nat.succ n\nkn : k + Nat.succ n ≥ Nat.succ n\n⊢ abv (f (Nat.succ (k + Nat.succ n))) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ (k + Nat.succ n) * r\n[PROOFSTEP]\nrefine le_trans (by rw [mul_comm] <;> exact h _ (Nat.le_of_succ_le kn)) (mul_le_mul_of_nonneg_right ?_ hr0)\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn✝ : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh✝ : ∀ (m : ℕ), n✝ ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm✝ : ℕ\nhmn✝ : Nat.succ n✝ ≤ m✝\nr_ne_zero : ¬r = 0\nk✝ : ℕ\nr_pos : 0 < r\nhk✝ : m✝ = k✝ + Nat.succ n✝\nk : ℕ\nih :\n  ∀ (n : ℕ),\n    (∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)) →\n      ∀ (m : ℕ), Nat.succ n ≤ m → m = k + Nat.succ n → abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nm : ℕ\nhmn : Nat.succ n ≤ m\nhk : m = Nat.succ k + Nat.succ n\nkn : k + Nat.succ n ≥ Nat.succ n\n⊢ abv (f (Nat.succ (k + Nat.succ n))) ≤ ?m.61292 * r\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn✝ : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh✝ : ∀ (m : ℕ), n✝ ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm✝ : ℕ\nhmn✝ : Nat.succ n✝ ≤ m✝\nr_ne_zero : ¬r = 0\nk✝ : ℕ\nr_pos : 0 < r\nhk✝ : m✝ = k✝ + Nat.succ n✝\nk : ℕ\nih :\n  ∀ (n : ℕ),\n    (∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)) →\n      ∀ (m : ℕ), Nat.succ n ≤ m → m = k + Nat.succ n → abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nm : ℕ\nhmn : Nat.succ n ≤ m\nhk : m = Nat.succ k + Nat.succ n\nkn : k + Nat.succ n ≥ Nat.succ n\n⊢ abv (f (Nat.succ (k + Nat.succ n))) ≤ r * ?a\n[PROOFSTEP]\nexact h _ (Nat.le_of_succ_le kn)\n[GOAL]\ncase inr.succ\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn✝ : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh✝ : ∀ (m : ℕ), n✝ ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm✝ : ℕ\nhmn✝ : Nat.succ n✝ ≤ m✝\nr_ne_zero : ¬r = 0\nk✝ : ℕ\nr_pos : 0 < r\nhk✝ : m✝ = k✝ + Nat.succ n✝\nk : ℕ\nih :\n  ∀ (n : ℕ),\n    (∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)) →\n      ∀ (m : ℕ), Nat.succ n ≤ m → m = k + Nat.succ n → abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nm : ℕ\nhmn : Nat.succ n ≤ m\nhk : m = Nat.succ k + Nat.succ n\nkn : k + Nat.succ n ≥ Nat.succ n\n⊢ abv (f (k + Nat.succ n)) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ (k + Nat.succ n)\n[PROOFSTEP]\nexact ih _ h _ (by simp) rfl\n[GOAL]\nα : Type u_1\ninst✝³ : LinearOrderedField α\ninst✝² : Archimedean α\nβ : Type u_2\ninst✝¹ : Ring β\nabv : β → α\ninst✝ : IsAbsoluteValue abv\nf : ℕ → β\nn✝ : ℕ\nr : α\nhr0 : 0 ≤ r\nhr1 : r < 1\nh✝ : ∀ (m : ℕ), n✝ ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nhar1 : abs' r < 1\nm✝ : ℕ\nhmn✝ : Nat.succ n✝ ≤ m✝\nr_ne_zero : ¬r = 0\nk✝ : ℕ\nr_pos : 0 < r\nhk✝ : m✝ = k✝ + Nat.succ n✝\nk : ℕ\nih :\n  ∀ (n : ℕ),\n    (∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)) →\n      ∀ (m : ℕ), Nat.succ n ≤ m → m = k + Nat.succ n → abv (f m) ≤ abv (f (Nat.succ n)) * r⁻¹ ^ Nat.succ n * r ^ m\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → abv (f (Nat.succ m)) ≤ r * abv (f m)\nm : ℕ\nhmn : Nat.succ n ≤ m\nhk : m = Nat.succ k + Nat.succ n\nkn : k + Nat.succ n ≥ Nat.succ n\n⊢ Nat.succ n ≤ k + Nat.succ n\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\ninst✝⁴ : LinearOrderedField α✝\ninst✝³ : Archimedean α✝\nβ : Type u_2\ninst✝² : Ring β\nabv : β → α✝\ninst✝¹ : IsAbsoluteValue abv\nα : Type u_3\ninst✝ : AddCommMonoid α\nn : ℕ\nf : ℕ → ℕ → α\n⊢ ∑ m in range n, ∑ k in range (m + 1), f k (m - k) = ∑ m in range n, ∑ k in range (n - m), f m k\n[PROOFSTEP]\nrw [sum_sigma', sum_sigma']\n[GOAL]\nα✝ : Type u_1\ninst✝⁴ : LinearOrderedField α✝\ninst✝³ : Archimedean α✝\nβ : Type u_2\ninst✝² : Ring β\nabv : β → α✝\ninst✝¹ : IsAbsoluteValue abv\nα : Type u_3\ninst✝ : AddCommMonoid α\nn : ℕ\nf : ℕ → ℕ → α\n⊢ ∑ x in Finset.sigma (range n) fun m => range (m + 1), f x.snd (x.fst - x.snd) =\n    ∑ x in Finset.sigma (range n) fun m => range (n - m), f x.fst x.snd\n[PROOFSTEP]\nexact\n  sum_bij (fun a _ => ⟨a.2, a.1 - a.2⟩)\n    (fun a ha =>\n      have h₁ : a.1 < n := mem_range.1 (mem_sigma.1 ha).1\n      have h₂ : a.2 < Nat.succ a.1 := mem_range.1 (mem_sigma.1 ha).2\n      mem_sigma.2\n        ⟨mem_range.2 (lt_of_lt_of_le h₂ h₁), mem_range.2 ((tsub_lt_tsub_iff_right (Nat.le_of_lt_succ h₂)).2 h₁)⟩)\n    (fun _ _ => rfl)\n    (fun ⟨a₁, a₂⟩ ⟨b₁, b₂⟩ ha hb h =>\n      have ha : a₁ < n ∧ a₂ ≤ a₁ := ⟨mem_range.1 (mem_sigma.1 ha).1, Nat.le_of_lt_succ (mem_range.1 (mem_sigma.1 ha).2)⟩\n      have hb : b₁ < n ∧ b₂ ≤ b₁ := ⟨mem_range.1 (mem_sigma.1 hb).1, Nat.le_of_lt_succ (mem_range.1 (mem_sigma.1 hb).2)⟩\n      have h : a₂ = b₂ ∧ _ := by simpa using h\n      have h' : a₁ = b₁ - b₂ + a₂ := (tsub_eq_iff_eq_add_of_le ha.2).1 (eq_of_heq h.2)\n      Sigma.mk.inj_iff.2 ⟨tsub_add_cancel_of_le hb.2 ▸ h'.symm ▸ h.1 ▸ rfl, heq_of_eq h.1⟩)\n    fun ⟨a₁, a₂⟩ ha =>\n    have ha : a₁ < n ∧ a₂ < n - a₁ := ⟨mem_range.1 (mem_sigma.1 ha).1, mem_range.1 (mem_sigma.1 ha).2⟩\n    ⟨⟨a₂ + a₁, a₁⟩,\n      ⟨mem_sigma.2 ⟨mem_range.2 (lt_tsub_iff_right.1 ha.2), mem_range.2 (Nat.lt_succ_of_le (Nat.le_add_left _ _))⟩,\n        Sigma.mk.inj_iff.2 ⟨rfl, heq_of_eq (add_tsub_cancel_right _ _).symm⟩⟩⟩\n[GOAL]\nα✝ : Type u_1\ninst✝⁴ : LinearOrderedField α✝\ninst✝³ : Archimedean α✝\nβ : Type u_2\ninst✝² : Ring β\nabv : β → α✝\ninst✝¹ : IsAbsoluteValue abv\nα : Type u_3\ninst✝ : AddCommMonoid α\nn : ℕ\nf : ℕ → ℕ → α\nx✝¹ x✝ : (_ : ℕ) × ℕ\na₁ a₂ : ℕ\nha✝ : { fst := a₁, snd := a₂ } ∈ Finset.sigma (range n) fun m => range (m + 1)\nb₁ b₂ : ℕ\nhb✝ : { fst := b₁, snd := b₂ } ∈ Finset.sigma (range n) fun m => range (m + 1)\nh :\n  (fun a x => { fst := a.snd, snd := a.fst - a.snd }) { fst := a₁, snd := a₂ } ha✝ =\n    (fun a x => { fst := a.snd, snd := a.fst - a.snd }) { fst := b₁, snd := b₂ } hb✝\nha : a₁ < n ∧ a₂ ≤ a₁\nhb : b₁ < n ∧ b₂ ≤ b₁\n⊢ a₂ = b₂ ∧ HEq (a₁ - a₂) (b₁ - b₂)\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Semiring β\ninst✝ : IsAbsoluteValue abv\nγ : Type u_3\nf : γ → β\ns : Finset γ\nthis : DecidableEq γ\n⊢ abv (∑ k in ∅, f k) ≤ ∑ k in ∅, abv (f k)\n[PROOFSTEP]\nsimp [abv_zero abv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Semiring β\ninst✝ : IsAbsoluteValue abv\nγ : Type u_3\nf : γ → β\ns✝ : Finset γ\nthis : DecidableEq γ\na : γ\ns : Finset γ\nhas : ¬a ∈ s\nih : abv (∑ k in s, f k) ≤ ∑ k in s, abv (f k)\n⊢ abv (∑ k in insert a s, f k) ≤ ∑ k in insert a s, abv (f k)\n[PROOFSTEP]\nrw [sum_insert has, sum_insert has]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Semiring β\ninst✝ : IsAbsoluteValue abv\nγ : Type u_3\nf : γ → β\ns✝ : Finset γ\nthis : DecidableEq γ\na : γ\ns : Finset γ\nhas : ¬a ∈ s\nih : abv (∑ k in s, f k) ≤ ∑ k in s, abv (f k)\n⊢ abv (f a + ∑ x in s, f x) ≤ abv (f a) + ∑ x in s, abv (f x)\n[PROOFSTEP]\nexact le_trans (abv_add abv _ _) (add_le_add_left ih _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\n⊢ 2 > 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\n⊢ 0 < 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\n⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε\n[PROOFSTEP]\nhave h₁ : (∑ m in range K, ∑ k in range (m + 1), a k * b (m - k)) = ∑ m in range K, ∑ n in range (K - m), a m * b n :=\n  by simpa using sum_range_diag_flip K fun m n => a m * b n\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\n⊢ ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\n[PROOFSTEP]\nsimpa using sum_range_diag_flip K fun m n => a m * b n\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\n⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε\n[PROOFSTEP]\nhave h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k := by\n  simp [Finset.mul_sum]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\n⊢ (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\n[PROOFSTEP]\nsimp [Finset.mul_sum]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\n⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε\n[PROOFSTEP]\nhave h₃ :\n  (∑ i in range K, a i * ∑ k in range (K - i), b k) =\n    (∑ i in range K, a i * ((∑ k in range (K - i), b k) - ∑ k in range K, b k)) +\n      ∑ i in range K, a i * ∑ k in range K, b k :=\n  by rw [← sum_add_distrib]; simp [(mul_add _ _ _).symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\n⊢ ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\n[PROOFSTEP]\nrw [← sum_add_distrib]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\n⊢ ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ x in range K, (a x * (∑ k in range (K - x), b k - ∑ k in range K, b k) + a x * ∑ k in range K, b k)\n[PROOFSTEP]\nsimp [(mul_add _ _ _).symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\n⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε\n[PROOFSTEP]\nhave two_mul_two : (4 : α) = 2 * 2 := by norm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\n⊢ 4 = 2 * 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\n⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε\n[PROOFSTEP]\nhave hQ0 : Q ≠ 0 := fun h => by simp [h, lt_irrefl] at hQε0 \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nh : Q = 0\n⊢ False\n[PROOFSTEP]\nsimp [h, lt_irrefl] at hQε0 \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\n⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε\n[PROOFSTEP]\nhave h2Q0 : 2 * Q ≠ 0 := mul_ne_zero two_ne_zero hQ0\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\n⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε\n[PROOFSTEP]\nhave hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε := by\n  rw [← div_div, div_mul_cancel _ (Ne.symm (ne_of_lt hP0)), two_mul_two, mul_assoc, ← div_div, div_mul_cancel _ h2Q0,\n    add_halves]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\n⊢ ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\n[PROOFSTEP]\nrw [← div_div, div_mul_cancel _ (Ne.symm (ne_of_lt hP0)), two_mul_two, mul_assoc, ← div_div, div_mul_cancel _ h2Q0,\n  add_halves]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\n⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε\n[PROOFSTEP]\nhave hNMK : max N M + 1 < K := lt_of_lt_of_le (by rw [two_mul]; exact lt_add_of_pos_left _ (Nat.succ_pos _)) hK\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\n⊢ max N M + 1 < 2 * (max N M + 1)\n[PROOFSTEP]\nrw [two_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\n⊢ max N M + 1 < max N M + 1 + (max N M + 1)\n[PROOFSTEP]\nexact lt_add_of_pos_left _ (Nat.succ_pos _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\n⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε\n[PROOFSTEP]\nhave hKN : N < K :=\n  calc\n    N ≤ max N M := le_max_left _ _\n    _ < max N M + 1 := (Nat.lt_succ_self _)\n    _ < K := hNMK\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\n⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε\n[PROOFSTEP]\nhave hsumlesum :\n  (∑ i in range (max N M + 1), abv (a i) * abv ((∑ k in range (K - i), b k) - ∑ k in range K, b k)) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\n[GOAL]\ncase hsumlesum\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\n⊢ ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\n[PROOFSTEP]\ngcongr with m hmJ\n[GOAL]\ncase hsumlesum.h.h\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nm : ℕ\nhmJ : m ∈ range (max N M + 1)\n⊢ abv (∑ k in range (K - m), b k - ∑ k in range K, b k) ≤ ε / (2 * P)\n[PROOFSTEP]\nexact\n  le_of_lt\n    (hN (K - m)\n      (le_tsub_of_add_le_left\n        (le_trans\n          (by\n            rw [two_mul]\n            gcongr\n            · exact le_of_lt (mem_range.1 hmJ)\n            · exact le_trans (le_max_left _ _) (le_of_lt (lt_add_one _)))\n          hK))\n      K (le_of_lt hKN))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nm : ℕ\nhmJ : m ∈ range (max N M + 1)\n⊢ m + N ≤ 2 * (max N M + 1)\n[PROOFSTEP]\nrw [two_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nm : ℕ\nhmJ : m ∈ range (max N M + 1)\n⊢ m + N ≤ max N M + 1 + (max N M + 1)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nm : ℕ\nhmJ : m ∈ range (max N M + 1)\n⊢ m ≤ max N M + 1\n[PROOFSTEP]\nexact le_of_lt (mem_range.1 hmJ)\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nm : ℕ\nhmJ : m ∈ range (max N M + 1)\n⊢ N ≤ max N M + 1\n[PROOFSTEP]\nexact le_trans (le_max_left _ _) (le_of_lt (lt_add_one _))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\n⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε\n[PROOFSTEP]\nhave hsumltP : (∑ n in range (max N M + 1), abv (a n)) < P :=\n  calc\n    (∑ n in range (max N M + 1), abv (a n)) = |∑ n in range (max N M + 1), abv (a n)| :=\n      Eq.symm (abs_of_nonneg (sum_nonneg fun x _ => abv_nonneg abv (a x)))\n    _ < P := hP (max N M + 1)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\n⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε\n[PROOFSTEP]\nrw [h₁, h₂, h₃, sum_mul, ← sub_sub, sub_right_comm, sub_self, zero_sub, abv_neg abv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\n⊢ abv (∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k)) < ε\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (abv_sum_le_sum_abv _ _) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\n⊢ ∑ k in range K, abv (a k * (∑ k in range (K - k), b k - ∑ k in range K, b k)) < ε\n[PROOFSTEP]\nsuffices\n  (∑ i in range (max N M + 1), abv (a i) * abv ((∑ k in range (K - i), b k) - ∑ k in range K, b k)) +\n      ((∑ i in range K, abv (a i) * abv ((∑ k in range (K - i), b k) - ∑ k in range K, b k)) -\n        ∑ i in range (max N M + 1), abv (a i) * abv ((∑ k in range (K - i), b k) - ∑ k in range K, b k)) <\n    ε / (2 * P) * P + ε / (4 * Q) * (2 * Q)\n  by\n  rw [hε] at this \n  simpa [abv_mul abv] using this\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\nthis :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) +\n      (∑ i in range K, abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) -\n        ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k)) <\n    ε / (2 * P) * P + ε / (4 * Q) * (2 * Q)\n⊢ ∑ k in range K, abv (a k * (∑ k in range (K - k), b k - ∑ k in range K, b k)) < ε\n[PROOFSTEP]\nrw [hε] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\nthis :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) +\n      (∑ i in range K, abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) -\n        ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k)) <\n    ε\n⊢ ∑ k in range K, abv (a k * (∑ k in range (K - k), b k - ∑ k in range K, b k)) < ε\n[PROOFSTEP]\nsimpa [abv_mul abv] using this\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\n⊢ ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) +\n      (∑ i in range K, abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) -\n        ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k)) <\n    ε / (2 * P) * P + ε / (4 * Q) * (2 * Q)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\n⊢ ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) < ε / (2 * P) * P\n[PROOFSTEP]\nexact lt_of_le_of_lt hsumlesum (by rw [← sum_mul, mul_comm]; gcongr)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\n⊢ ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P)) < ε / (2 * P) * P\n[PROOFSTEP]\nrw [← sum_mul, mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\n⊢ ε / (2 * P) * ∑ x in range (max N M + 1), abv (a x) < ε / (2 * P) * P\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\n⊢ ∑ i in range K, abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) -\n      ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) <\n    ε / (4 * Q) * (2 * Q)\n[PROOFSTEP]\nrw [sum_range_sub_sum_range (le_of_lt hNMK)]\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\n⊢ ∑ k in filter (fun k => max N M + 1 ≤ k) (range K),\n      abv (a k) * abv (∑ k in range (K - k), b k - ∑ k in range K, b k) <\n    ε / (4 * Q) * (2 * Q)\n[PROOFSTEP]\ncalc\n  (∑ i in (range K).filter fun k => max N M + 1 ≤ k,\n        abv (a i) * abv ((∑ k in range (K - i), b k) - ∑ k in range K, b k)) ≤\n      ∑ i in (range K).filter fun k => max N M + 1 ≤ k, abv (a i) * (2 * Q) :=\n    by\n    gcongr\n    rw [sub_eq_add_neg]\n    refine' le_trans (abv_add _ _ _) _\n    rw [two_mul, abv_neg abv]\n    gcongr <;> exact le_of_lt (hQ _)\n  _ < ε / (4 * Q) * (2 * Q) := by\n    rw [← sum_mul, ← sum_range_sub_sum_range (le_of_lt hNMK)]\n    have := lt_of_le_of_lt (abv_nonneg _ _) (hQ 0)\n    gcongr\n    refine'\n      lt_of_le_of_lt (le_abs_self _)\n        (hM _ (le_trans (Nat.le_succ_of_le (le_max_right _ _)) (le_of_lt hNMK)) _\n          (Nat.le_succ_of_le (le_max_right _ _)))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\n⊢ ∑ i in filter (fun k => max N M + 1 ≤ k) (range K),\n      abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in filter (fun k => max N M + 1 ≤ k) (range K), abv (a i) * (2 * Q)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\ni✝ : ℕ\na✝ : i✝ ∈ filter (fun k => max N M + 1 ≤ k) (range K)\n⊢ abv (∑ k in range (K - i✝), b k - ∑ k in range K, b k) ≤ 2 * Q\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\ni✝ : ℕ\na✝ : i✝ ∈ filter (fun k => max N M + 1 ≤ k) (range K)\n⊢ abv (∑ k in range (K - i✝), b k + -∑ k in range K, b k) ≤ 2 * Q\n[PROOFSTEP]\nrefine' le_trans (abv_add _ _ _) _\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\ni✝ : ℕ\na✝ : i✝ ∈ filter (fun k => max N M + 1 ≤ k) (range K)\n⊢ abv (∑ k in range (K - i✝), b k) + abv (-∑ k in range K, b k) ≤ 2 * Q\n[PROOFSTEP]\nrw [two_mul, abv_neg abv]\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\ni✝ : ℕ\na✝ : i✝ ∈ filter (fun k => max N M + 1 ≤ k) (range K)\n⊢ abv (∑ k in range (K - i✝), b k) + abv (∑ k in range K, b k) ≤ Q + Q\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.h.h₁\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\ni✝ : ℕ\na✝ : i✝ ∈ filter (fun k => max N M + 1 ≤ k) (range K)\n⊢ abv (∑ k in range (K - i✝), b k) ≤ Q\n[PROOFSTEP]\nexact le_of_lt (hQ _)\n[GOAL]\ncase h.h.h₂\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\ni✝ : ℕ\na✝ : i✝ ∈ filter (fun k => max N M + 1 ≤ k) (range K)\n⊢ abv (∑ k in range K, b k) ≤ Q\n[PROOFSTEP]\nexact le_of_lt (hQ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\n⊢ ∑ i in filter (fun k => max N M + 1 ≤ k) (range K), abv (a i) * (2 * Q) < ε / (4 * Q) * (2 * Q)\n[PROOFSTEP]\nrw [← sum_mul, ← sum_range_sub_sum_range (le_of_lt hNMK)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\n⊢ (∑ k in range K, abv (a k) - ∑ k in range (max N M + 1), abv (a k)) * (2 * Q) < ε / (4 * Q) * (2 * Q)\n[PROOFSTEP]\nhave := lt_of_le_of_lt (abv_nonneg _ _) (hQ 0)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\nthis : 0 < Q\n⊢ (∑ k in range K, abv (a k) - ∑ k in range (max N M + 1), abv (a k)) * (2 * Q) < ε / (4 * Q) * (2 * Q)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase bc\nα : Type u_1\nβ : Type u_2\ninst✝² : LinearOrderedField α\nabv : β → α\ninst✝¹ : Ring β\ninst✝ : IsAbsoluteValue abv\na b : ℕ → β\nha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)\nhb : IsCauSeq abv fun m => ∑ n in range m, b n\nε : α\nε0 : 0 < ε\nQ : α\nhQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q\nP : α\nhP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P\nhP0 : 0 < P\nhPε0 : 0 < ε / (2 * P)\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N →\n      ∀ (k : ℕ),\n        k ≥ N →\n          abv\n              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -\n                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <\n            ε / (2 * P)\nhQε0 : 0 < ε / (4 * Q)\nM : ℕ\nhM :\n  ∀ (j : ℕ),\n    j ≥ M →\n      ∀ (k : ℕ),\n        k ≥ M →\n          abs'\n              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -\n                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <\n            ε / (4 * Q)\nK : ℕ\nhK : K ≥ 2 * (max N M + 1)\nh₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n\nh₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k\nh₃ :\n  ∑ i in range K, a i * ∑ k in range (K - i), b k =\n    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k\ntwo_mul_two : 4 = 2 * 2\nhQ0 : Q ≠ 0\nh2Q0 : 2 * Q ≠ 0\nhε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε\nhNMK : max N M + 1 < K\nhKN : N < K\nhsumlesum :\n  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤\n    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))\nhsumltP : ∑ n in range (max N M + 1), abv (a n) < P\nthis : 0 < Q\n⊢ ∑ k in range K, abv (a k) - ∑ k in range (max N M + 1), abv (a k) < ε / (4 * Q)\n[PROOFSTEP]\nrefine'\n  lt_of_le_of_lt (le_abs_self _)\n    (hM _ (le_trans (Nat.le_succ_of_le (le_max_right _ _)) (le_of_lt hNMK)) _ (Nat.le_succ_of_le (le_max_right _ _)))\n[GOAL]\nz : ℂ\nn : ℕ\nhn : ↑abs z < ↑n\nhn0 : 0 < ↑n\n⊢ ↑abs z / ↑n < 1\n[PROOFSTEP]\nrwa [div_lt_iff hn0, one_mul]\n[GOAL]\nz : ℂ\nn : ℕ\nhn : ↑abs z < ↑n\nhn0 : 0 < ↑n\nm : ℕ\nhm : n ≤ m\n⊢ abs' (↑abs (z ^ Nat.succ m / ↑(Nat.factorial (Nat.succ m)))) ≤ ↑abs z / ↑n * abs' (↑abs (z ^ m / ↑(Nat.factorial m)))\n[PROOFSTEP]\nrw [abs_abs, abs_abs, Nat.factorial_succ, pow_succ, mul_comm m.succ, Nat.cast_mul, ← div_div, mul_div_assoc,\n  mul_div_right_comm, map_mul, map_div₀, abs_cast_nat]\n[GOAL]\nz : ℂ\nn : ℕ\nhn : ↑abs z < ↑n\nhn0 : 0 < ↑n\nm : ℕ\nhm : n ≤ m\n⊢ ↑abs z / ↑(Nat.succ m) * ↑abs (z ^ m / ↑(Nat.factorial m)) ≤ ↑abs z / ↑n * ↑abs (z ^ m / ↑(Nat.factorial m))\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.h.h\nz : ℂ\nn : ℕ\nhn : ↑abs z < ↑n\nhn0 : 0 < ↑n\nm : ℕ\nhm : n ≤ m\n⊢ n ≤ Nat.succ m\n[PROOFSTEP]\nexact le_trans hm (Nat.le_succ _)\n[GOAL]\nx y : ℂ\n⊢ exp 0 = 1\n[PROOFSTEP]\nrw [exp]\n[GOAL]\nx y : ℂ\n⊢ CauSeq.lim (exp' 0) = 1\n[PROOFSTEP]\nrefine' lim_eq_of_equiv_const fun ε ε0 => ⟨1, fun j hj => _⟩\n[GOAL]\nx y : ℂ\nε : ℝ\nε0 : ε > 0\nj : ℕ\nhj : j ≥ 1\n⊢ ↑abs (↑(exp' 0 - const (↑abs) 1) j) < ε\n[PROOFSTEP]\nconvert (config := .unfoldSameFun) ε0\n[GOAL]\ncase h.e'_3\nx y : ℂ\nε : ℝ\nε0 : ε > 0\nj : ℕ\nhj : j ≥ 1\n⊢ ↑abs (↑(exp' 0 - const (↑abs) 1) j) = 0\n[PROOFSTEP]\ncases' j with j j\n[GOAL]\ncase h.e'_3.zero\nx y : ℂ\nε : ℝ\nε0 : ε > 0\nhj : Nat.zero ≥ 1\n⊢ ↑abs (↑(exp' 0 - const (↑abs) 1) Nat.zero) = 0\n[PROOFSTEP]\nexact absurd hj (not_le_of_gt zero_lt_one)\n[GOAL]\ncase h.e'_3.succ\nx y : ℂ\nε : ℝ\nε0 : ε > 0\nj : ℕ\nhj : Nat.succ j ≥ 1\n⊢ ↑abs (↑(exp' 0 - const (↑abs) 1) (Nat.succ j)) = 0\n[PROOFSTEP]\ndsimp [exp']\n[GOAL]\ncase h.e'_3.succ\nx y : ℂ\nε : ℝ\nε0 : ε > 0\nj : ℕ\nhj : Nat.succ j ≥ 1\n⊢ ↑abs (∑ m in range (Nat.succ j), 0 ^ m / ↑(Nat.factorial m) - 1) = 0\n[PROOFSTEP]\ninduction' j with j ih\n[GOAL]\ncase h.e'_3.succ.zero\nx y : ℂ\nε : ℝ\nε0 : ε > 0\nj : ℕ\nhj✝ : Nat.succ j ≥ 1\nhj : Nat.succ Nat.zero ≥ 1\n⊢ ↑abs (∑ m in range (Nat.succ Nat.zero), 0 ^ m / ↑(Nat.factorial m) - 1) = 0\n[PROOFSTEP]\ndsimp [exp']\n[GOAL]\ncase h.e'_3.succ.zero\nx y : ℂ\nε : ℝ\nε0 : ε > 0\nj : ℕ\nhj✝ : Nat.succ j ≥ 1\nhj : Nat.succ Nat.zero ≥ 1\n⊢ ↑abs (∑ m in {0}, 0 ^ m / ↑(Nat.factorial m) - 1) = 0\n[PROOFSTEP]\nsimp [show Nat.succ 0 = 1 from rfl]\n[GOAL]\ncase h.e'_3.succ.succ\nx y : ℂ\nε : ℝ\nε0 : ε > 0\nj✝ : ℕ\nhj✝ : Nat.succ j✝ ≥ 1\nj : ℕ\nih : Nat.succ j ≥ 1 → ↑abs (∑ m in range (Nat.succ j), 0 ^ m / ↑(Nat.factorial m) - 1) = 0\nhj : Nat.succ (Nat.succ j) ≥ 1\n⊢ ↑abs (∑ m in range (Nat.succ (Nat.succ j)), 0 ^ m / ↑(Nat.factorial m) - 1) = 0\n[PROOFSTEP]\nrw [← ih (by simp [show 1 = Nat.succ 0 from rfl, Nat.succ_le_succ])]\n[GOAL]\nx y : ℂ\nε : ℝ\nε0 : ε > 0\nj✝ : ℕ\nhj✝ : Nat.succ j✝ ≥ 1\nj : ℕ\nih : Nat.succ j ≥ 1 → ↑abs (∑ m in range (Nat.succ j), 0 ^ m / ↑(Nat.factorial m) - 1) = 0\nhj : Nat.succ (Nat.succ j) ≥ 1\n⊢ Nat.succ j ≥ 1\n[PROOFSTEP]\nsimp [show 1 = Nat.succ 0 from rfl, Nat.succ_le_succ]\n[GOAL]\ncase h.e'_3.succ.succ\nx y : ℂ\nε : ℝ\nε0 : ε > 0\nj✝ : ℕ\nhj✝ : Nat.succ j✝ ≥ 1\nj : ℕ\nih : Nat.succ j ≥ 1 → ↑abs (∑ m in range (Nat.succ j), 0 ^ m / ↑(Nat.factorial m) - 1) = 0\nhj : Nat.succ (Nat.succ j) ≥ 1\n⊢ ↑abs (∑ m in range (Nat.succ (Nat.succ j)), 0 ^ m / ↑(Nat.factorial m) - 1) =\n    ↑abs (∑ m in range (Nat.succ j), 0 ^ m / ↑(Nat.factorial m) - 1)\n[PROOFSTEP]\nsimp only [sum_range_succ, pow_succ]\n[GOAL]\ncase h.e'_3.succ.succ\nx y : ℂ\nε : ℝ\nε0 : ε > 0\nj✝ : ℕ\nhj✝ : Nat.succ j✝ ≥ 1\nj : ℕ\nih : Nat.succ j ≥ 1 → ↑abs (∑ m in range (Nat.succ j), 0 ^ m / ↑(Nat.factorial m) - 1) = 0\nhj : Nat.succ (Nat.succ j) ≥ 1\n⊢ ↑abs\n      (∑ m in range j, 0 ^ m / ↑(Nat.factorial m) + 0 ^ j / ↑(Nat.factorial j) + 0 * 0 ^ j / ↑(Nat.factorial (j + 1)) -\n        1) =\n    ↑abs (∑ m in range j, 0 ^ m / ↑(Nat.factorial m) + 0 ^ j / ↑(Nat.factorial j) - 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℂ\n⊢ exp (x + y) = exp x * exp y\n[PROOFSTEP]\nhave hj :\n  ∀ j : ℕ,\n    (∑ m in range j, (x + y) ^ m / m.factorial) =\n      ∑ i in range j, ∑ k in range (i + 1), x ^ k / k.factorial * (y ^ (i - k) / (i - k).factorial) :=\n  by\n  intro j\n  refine' Finset.sum_congr rfl fun m _ => _\n  rw [add_pow, div_eq_mul_inv, sum_mul]\n  refine' Finset.sum_congr rfl fun I hi => _\n  have h₁ : (m.choose I : ℂ) ≠ 0 :=\n    Nat.cast_ne_zero.2 (pos_iff_ne_zero.1 (Nat.choose_pos (Nat.le_of_lt_succ (mem_range.1 hi))))\n  have h₂ := Nat.choose_mul_factorial_mul_factorial (Nat.le_of_lt_succ <| Finset.mem_range.1 hi)\n  rw [← h₂, Nat.cast_mul, Nat.cast_mul, mul_inv, mul_inv]\n  simp only [mul_left_comm (m.choose I : ℂ), mul_assoc, mul_left_comm (m.choose I : ℂ)⁻¹, mul_comm (m.choose I : ℂ)]\n  rw [inv_mul_cancel h₁]\n  simp [div_eq_mul_inv, mul_comm, mul_assoc, mul_left_comm]\n[GOAL]\nx y : ℂ\n⊢ ∀ (j : ℕ),\n    ∑ m in range j, (x + y) ^ m / ↑(Nat.factorial m) =\n      ∑ i in range j, ∑ k in range (i + 1), x ^ k / ↑(Nat.factorial k) * (y ^ (i - k) / ↑(Nat.factorial (i - k)))\n[PROOFSTEP]\nintro j\n[GOAL]\nx y : ℂ\nj : ℕ\n⊢ ∑ m in range j, (x + y) ^ m / ↑(Nat.factorial m) =\n    ∑ i in range j, ∑ k in range (i + 1), x ^ k / ↑(Nat.factorial k) * (y ^ (i - k) / ↑(Nat.factorial (i - k)))\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun m _ => _\n[GOAL]\nx y : ℂ\nj m : ℕ\nx✝ : m ∈ range j\n⊢ (x + y) ^ m / ↑(Nat.factorial m) =\n    ∑ k in range (m + 1), x ^ k / ↑(Nat.factorial k) * (y ^ (m - k) / ↑(Nat.factorial (m - k)))\n[PROOFSTEP]\nrw [add_pow, div_eq_mul_inv, sum_mul]\n[GOAL]\nx y : ℂ\nj m : ℕ\nx✝ : m ∈ range j\n⊢ ∑ x_1 in range (m + 1), x ^ x_1 * y ^ (m - x_1) * ↑(Nat.choose m x_1) * (↑(Nat.factorial m))⁻¹ =\n    ∑ k in range (m + 1), x ^ k / ↑(Nat.factorial k) * (y ^ (m - k) / ↑(Nat.factorial (m - k)))\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun I hi => _\n[GOAL]\nx y : ℂ\nj m : ℕ\nx✝ : m ∈ range j\nI : ℕ\nhi : I ∈ range (m + 1)\n⊢ x ^ I * y ^ (m - I) * ↑(Nat.choose m I) * (↑(Nat.factorial m))⁻¹ =\n    x ^ I / ↑(Nat.factorial I) * (y ^ (m - I) / ↑(Nat.factorial (m - I)))\n[PROOFSTEP]\nhave h₁ : (m.choose I : ℂ) ≠ 0 :=\n  Nat.cast_ne_zero.2 (pos_iff_ne_zero.1 (Nat.choose_pos (Nat.le_of_lt_succ (mem_range.1 hi))))\n[GOAL]\nx y : ℂ\nj m : ℕ\nx✝ : m ∈ range j\nI : ℕ\nhi : I ∈ range (m + 1)\nh₁ : ↑(Nat.choose m I) ≠ 0\n⊢ x ^ I * y ^ (m - I) * ↑(Nat.choose m I) * (↑(Nat.factorial m))⁻¹ =\n    x ^ I / ↑(Nat.factorial I) * (y ^ (m - I) / ↑(Nat.factorial (m - I)))\n[PROOFSTEP]\nhave h₂ := Nat.choose_mul_factorial_mul_factorial (Nat.le_of_lt_succ <| Finset.mem_range.1 hi)\n[GOAL]\nx y : ℂ\nj m : ℕ\nx✝ : m ∈ range j\nI : ℕ\nhi : I ∈ range (m + 1)\nh₁ : ↑(Nat.choose m I) ≠ 0\nh₂ : Nat.choose m I * Nat.factorial I * Nat.factorial (m - I) = Nat.factorial m\n⊢ x ^ I * y ^ (m - I) * ↑(Nat.choose m I) * (↑(Nat.factorial m))⁻¹ =\n    x ^ I / ↑(Nat.factorial I) * (y ^ (m - I) / ↑(Nat.factorial (m - I)))\n[PROOFSTEP]\nrw [← h₂, Nat.cast_mul, Nat.cast_mul, mul_inv, mul_inv]\n[GOAL]\nx y : ℂ\nj m : ℕ\nx✝ : m ∈ range j\nI : ℕ\nhi : I ∈ range (m + 1)\nh₁ : ↑(Nat.choose m I) ≠ 0\nh₂ : Nat.choose m I * Nat.factorial I * Nat.factorial (m - I) = Nat.factorial m\n⊢ x ^ I * y ^ (m - I) * ↑(Nat.choose m I) *\n      ((↑(Nat.choose m I))⁻¹ * (↑(Nat.factorial I))⁻¹ * (↑(Nat.factorial (m - I)))⁻¹) =\n    x ^ I / ↑(Nat.factorial I) * (y ^ (m - I) / ↑(Nat.factorial (m - I)))\n[PROOFSTEP]\nsimp only [mul_left_comm (m.choose I : ℂ), mul_assoc, mul_left_comm (m.choose I : ℂ)⁻¹, mul_comm (m.choose I : ℂ)]\n[GOAL]\nx y : ℂ\nj m : ℕ\nx✝ : m ∈ range j\nI : ℕ\nhi : I ∈ range (m + 1)\nh₁ : ↑(Nat.choose m I) ≠ 0\nh₂ : Nat.choose m I * Nat.factorial I * Nat.factorial (m - I) = Nat.factorial m\n⊢ x ^ I *\n      (y ^ (m - I) *\n        ((↑(Nat.factorial I))⁻¹ * ((↑(Nat.factorial (m - I)))⁻¹ * ((↑(Nat.choose m I))⁻¹ * ↑(Nat.choose m I))))) =\n    x ^ I / ↑(Nat.factorial I) * (y ^ (m - I) / ↑(Nat.factorial (m - I)))\n[PROOFSTEP]\nrw [inv_mul_cancel h₁]\n[GOAL]\nx y : ℂ\nj m : ℕ\nx✝ : m ∈ range j\nI : ℕ\nhi : I ∈ range (m + 1)\nh₁ : ↑(Nat.choose m I) ≠ 0\nh₂ : Nat.choose m I * Nat.factorial I * Nat.factorial (m - I) = Nat.factorial m\n⊢ x ^ I * (y ^ (m - I) * ((↑(Nat.factorial I))⁻¹ * ((↑(Nat.factorial (m - I)))⁻¹ * 1))) =\n    x ^ I / ↑(Nat.factorial I) * (y ^ (m - I) / ↑(Nat.factorial (m - I)))\n[PROOFSTEP]\nsimp [div_eq_mul_inv, mul_comm, mul_assoc, mul_left_comm]\n[GOAL]\nx y : ℂ\nhj :\n  ∀ (j : ℕ),\n    ∑ m in range j, (x + y) ^ m / ↑(Nat.factorial m) =\n      ∑ i in range j, ∑ k in range (i + 1), x ^ k / ↑(Nat.factorial k) * (y ^ (i - k) / ↑(Nat.factorial (i - k)))\n⊢ exp (x + y) = exp x * exp y\n[PROOFSTEP]\nsimp_rw [exp, exp', lim_mul_lim]\n[GOAL]\nx y : ℂ\nhj :\n  ∀ (j : ℕ),\n    ∑ m in range j, (x + y) ^ m / ↑(Nat.factorial m) =\n      ∑ i in range j, ∑ k in range (i + 1), x ^ k / ↑(Nat.factorial k) * (y ^ (i - k) / ↑(Nat.factorial (i - k)))\n⊢ CauSeq.lim\n      { val := fun n => ∑ m in range n, (x + y) ^ m / ↑(Nat.factorial m),\n        property := (_ : IsCauSeq ↑abs fun n => ∑ m in range n, (x + y) ^ m / ↑(Nat.factorial m)) } =\n    CauSeq.lim\n      ({ val := fun n => ∑ m in range n, x ^ m / ↑(Nat.factorial m),\n          property := (_ : IsCauSeq ↑abs fun n => ∑ m in range n, x ^ m / ↑(Nat.factorial m)) } *\n        { val := fun n => ∑ m in range n, y ^ m / ↑(Nat.factorial m),\n          property := (_ : IsCauSeq ↑abs fun n => ∑ m in range n, y ^ m / ↑(Nat.factorial m)) })\n[PROOFSTEP]\napply (lim_eq_lim_of_equiv _).symm\n[GOAL]\nx y : ℂ\nhj :\n  ∀ (j : ℕ),\n    ∑ m in range j, (x + y) ^ m / ↑(Nat.factorial m) =\n      ∑ i in range j, ∑ k in range (i + 1), x ^ k / ↑(Nat.factorial k) * (y ^ (i - k) / ↑(Nat.factorial (i - k)))\n⊢ { val := fun n => ∑ m in range n, x ^ m / ↑(Nat.factorial m),\n        property := (_ : IsCauSeq ↑abs fun n => ∑ m in range n, x ^ m / ↑(Nat.factorial m)) } *\n      { val := fun n => ∑ m in range n, y ^ m / ↑(Nat.factorial m),\n        property := (_ : IsCauSeq ↑abs fun n => ∑ m in range n, y ^ m / ↑(Nat.factorial m)) } ≈\n    { val := fun n => ∑ m in range n, (x + y) ^ m / ↑(Nat.factorial m),\n      property := (_ : IsCauSeq ↑abs fun n => ∑ m in range n, (x + y) ^ m / ↑(Nat.factorial m)) }\n[PROOFSTEP]\nsimp only [hj]\n[GOAL]\nx y : ℂ\nhj :\n  ∀ (j : ℕ),\n    ∑ m in range j, (x + y) ^ m / ↑(Nat.factorial m) =\n      ∑ i in range j, ∑ k in range (i + 1), x ^ k / ↑(Nat.factorial k) * (y ^ (i - k) / ↑(Nat.factorial (i - k)))\n⊢ { val := fun n => ∑ m in range n, x ^ m / ↑(Nat.factorial m),\n        property := (_ : IsCauSeq ↑abs fun n => ∑ m in range n, x ^ m / ↑(Nat.factorial m)) } *\n      { val := fun n => ∑ m in range n, y ^ m / ↑(Nat.factorial m),\n        property := (_ : IsCauSeq ↑abs fun n => ∑ m in range n, y ^ m / ↑(Nat.factorial m)) } ≈\n    {\n      val := fun n =>\n        ∑ i in range n, ∑ k in range (i + 1), x ^ k / ↑(Nat.factorial k) * (y ^ (i - k) / ↑(Nat.factorial (i - k))),\n      property :=\n        (_ :\n          (fun f => IsCauSeq (↑abs) f) fun n =>\n            ∑ i in range n,\n              ∑ k in range (i + 1), x ^ k / ↑(Nat.factorial k) * (y ^ (i - k) / ↑(Nat.factorial (i - k)))) }\n[PROOFSTEP]\nexact cauchy_product (isCauSeq_abs_exp x) (isCauSeq_exp y)\n[GOAL]\nx y : ℂ\n⊢ (fun z => exp (↑Multiplicative.toAdd z)) 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℂ\n⊢ ∀ (x y : Multiplicative ℂ),\n    OneHom.toFun { toFun := fun z => exp (↑Multiplicative.toAdd z), map_one' := (_ : exp 0 = 1) } (x * y) =\n      OneHom.toFun { toFun := fun z => exp (↑Multiplicative.toAdd z), map_one' := (_ : exp 0 = 1) } x *\n        OneHom.toFun { toFun := fun z => exp (↑Multiplicative.toAdd z), map_one' := (_ : exp 0 = 1) } y\n[PROOFSTEP]\nsimp [exp_add]\n[GOAL]\nx✝ y x : ℂ\n⊢ exp (↑0 * x) = exp x ^ 0\n[PROOFSTEP]\nrw [Nat.cast_zero, zero_mul, exp_zero, pow_zero]\n[GOAL]\nx✝ y x : ℂ\nn : ℕ\n⊢ exp (↑(Nat.succ n) * x) = exp x ^ Nat.succ n\n[PROOFSTEP]\nrw [pow_succ', Nat.cast_add_one, add_mul, exp_add, ← exp_nat_mul _ n, one_mul]\n[GOAL]\nx y : ℂ\nh : exp x = 0\n⊢ 0 = 1\n[PROOFSTEP]\nrw [← exp_zero, ← add_neg_self x, exp_add, h]\n[GOAL]\nx y : ℂ\nh : exp x = 0\n⊢ x + -x = 0 * exp (-x)\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℂ\n⊢ exp (-x) = (exp x)⁻¹\n[PROOFSTEP]\nrw [← mul_right_inj' (exp_ne_zero x), ← exp_add]\n[GOAL]\nx y : ℂ\n⊢ exp (x + -x) = exp x * (exp x)⁻¹\n[PROOFSTEP]\nsimp [mul_inv_cancel (exp_ne_zero x)]\n[GOAL]\nx y : ℂ\n⊢ exp (x - y) = exp x / exp y\n[PROOFSTEP]\nsimp [sub_eq_add_neg, exp_add, exp_neg, div_eq_mul_inv]\n[GOAL]\nx y z : ℂ\nn : ℤ\n⊢ exp (↑n * z) = exp z ^ n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase ofNat\nx y z : ℂ\na✝ : ℕ\n⊢ exp (↑(Int.ofNat a✝) * z) = exp z ^ Int.ofNat a✝\n[PROOFSTEP]\nsimp [exp_nat_mul]\n[GOAL]\ncase negSucc\nx y z : ℂ\na✝ : ℕ\n⊢ exp (↑(Int.negSucc a✝) * z) = exp z ^ Int.negSucc a✝\n[PROOFSTEP]\nsimp [exp_add, add_mul, pow_add, exp_neg, exp_nat_mul]\n[GOAL]\nx y : ℂ\n⊢ exp (↑(starRingEnd ℂ) x) = ↑(starRingEnd ℂ) (exp x)\n[PROOFSTEP]\ndsimp [exp]\n[GOAL]\nx y : ℂ\n⊢ CauSeq.lim (exp' (↑(starRingEnd ℂ) x)) = ↑(starRingEnd ℂ) (CauSeq.lim (exp' x))\n[PROOFSTEP]\nrw [← lim_conj]\n[GOAL]\nx y : ℂ\n⊢ CauSeq.lim (exp' (↑(starRingEnd ℂ) x)) = CauSeq.lim (cauSeqConj (exp' x))\n[PROOFSTEP]\nrefine' congr_arg CauSeq.lim (CauSeq.ext fun _ => _)\n[GOAL]\nx y : ℂ\nx✝ : ℕ\n⊢ ↑(exp' (↑(starRingEnd ℂ) x)) x✝ = ↑(cauSeqConj (exp' x)) x✝\n[PROOFSTEP]\ndsimp [exp', Function.comp, isCauSeq_conj, cauSeqConj]\n[GOAL]\nx y : ℂ\nx✝ : ℕ\n⊢ ∑ m in range x✝, ↑(starRingEnd ℂ) x ^ m / ↑(Nat.factorial m) =\n    ↑(starRingEnd ℂ) (∑ m in range x✝, x ^ m / ↑(Nat.factorial m))\n[PROOFSTEP]\nrw [(starRingEnd _).map_sum]\n[GOAL]\nx y : ℂ\nx✝ : ℕ\n⊢ ∑ m in range x✝, ↑(starRingEnd ℂ) x ^ m / ↑(Nat.factorial m) =\n    ∑ x_1 in range x✝, ↑(starRingEnd ℂ) (x ^ x_1 / ↑(Nat.factorial x_1))\n[PROOFSTEP]\nrefine' sum_congr rfl fun n _ => _\n[GOAL]\nx y : ℂ\nx✝¹ n : ℕ\nx✝ : n ∈ range x✝¹\n⊢ ↑(starRingEnd ℂ) x ^ n / ↑(Nat.factorial n) = ↑(starRingEnd ℂ) (x ^ n / ↑(Nat.factorial n))\n[PROOFSTEP]\nrw [map_div₀, map_pow, ← ofReal_nat_cast, conj_ofReal]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ ↑(starRingEnd ℂ) (exp ↑x) = exp ↑x\n[PROOFSTEP]\nrw [← exp_conj, conj_ofReal]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ (exp ↑x).im = 0\n[PROOFSTEP]\nrw [← ofReal_exp_ofReal_re, ofReal_im]\n[GOAL]\nx y : ℂ\n⊢ sinh 0 = 0\n[PROOFSTEP]\nsimp [sinh]\n[GOAL]\nx y : ℂ\n⊢ sinh (-x) = -sinh x\n[PROOFSTEP]\nsimp [sinh, exp_neg, (neg_div _ _).symm, add_mul]\n[GOAL]\nx y a b c d : ℂ\n⊢ (a - b) * (c + d) + (a + b) * (c - d) = 2 * (a * c - b * d)\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ sinh (x + y) = sinh x * cosh y + cosh x * sinh y\n[PROOFSTEP]\nrw [← mul_right_inj' (two_ne_zero' ℂ), two_sinh, exp_add, neg_add, exp_add, eq_comm, mul_add, ← mul_assoc, two_sinh,\n  mul_left_comm, two_sinh, ← mul_right_inj' (two_ne_zero' ℂ), mul_add, mul_left_comm, two_cosh, ← mul_assoc, two_cosh]\n[GOAL]\nx y : ℂ\n⊢ (exp x - exp (-x)) * (exp y + exp (-y)) + (exp x + exp (-x)) * (exp y - exp (-y)) =\n    2 * (exp x * exp y - exp (-x) * exp (-y))\n[PROOFSTEP]\nexact sinh_add_aux\n[GOAL]\nx y : ℂ\n⊢ cosh 0 = 1\n[PROOFSTEP]\nsimp [cosh]\n[GOAL]\nx y : ℂ\n⊢ cosh (-x) = cosh x\n[PROOFSTEP]\nsimp [add_comm, cosh, exp_neg]\n[GOAL]\nx y a b c d : ℂ\n⊢ (a + b) * (c + d) + (a - b) * (c - d) = 2 * (a * c + b * d)\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ cosh (x + y) = cosh x * cosh y + sinh x * sinh y\n[PROOFSTEP]\nrw [← mul_right_inj' (two_ne_zero' ℂ), two_cosh, exp_add, neg_add, exp_add, eq_comm, mul_add, ← mul_assoc, two_cosh, ←\n  mul_assoc, two_sinh, ← mul_right_inj' (two_ne_zero' ℂ), mul_add, mul_left_comm, two_cosh, mul_left_comm, two_sinh]\n[GOAL]\nx y : ℂ\n⊢ (exp x + exp (-x)) * (exp y + exp (-y)) + (exp x - exp (-x)) * (exp y - exp (-y)) =\n    2 * (exp x * exp y + exp (-x) * exp (-y))\n[PROOFSTEP]\nexact cosh_add_aux\n[GOAL]\nx y : ℂ\n⊢ sinh (x - y) = sinh x * cosh y - cosh x * sinh y\n[PROOFSTEP]\nsimp [sub_eq_add_neg, sinh_add, sinh_neg, cosh_neg]\n[GOAL]\nx y : ℂ\n⊢ cosh (x - y) = cosh x * cosh y - sinh x * sinh y\n[PROOFSTEP]\nsimp [sub_eq_add_neg, cosh_add, sinh_neg, cosh_neg]\n[GOAL]\nx y : ℂ\n⊢ sinh (↑(starRingEnd ℂ) x) = ↑(starRingEnd ℂ) (sinh x)\n[PROOFSTEP]\nrw [sinh, ← RingHom.map_neg, exp_conj, exp_conj, ← RingHom.map_sub, sinh, map_div₀]\n  --Porting note: not nice\n[GOAL]\nx y : ℂ\n⊢ ↑(starRingEnd ℂ) (exp x - exp (-x)) / 2 = ↑(starRingEnd ℂ) (exp x - exp (-x)) / ↑(starRingEnd ℂ) 2\n[PROOFSTEP]\nsimp [← one_add_one_eq_two]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ ↑(starRingEnd ℂ) (sinh ↑x) = sinh ↑x\n[PROOFSTEP]\nrw [← sinh_conj, conj_ofReal]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ (sinh ↑x).im = 0\n[PROOFSTEP]\nrw [← ofReal_sinh_ofReal_re, ofReal_im]\n[GOAL]\nx y : ℂ\n⊢ cosh (↑(starRingEnd ℂ) x) = ↑(starRingEnd ℂ) (cosh x)\n[PROOFSTEP]\nrw [cosh, ← RingHom.map_neg, exp_conj, exp_conj, ← RingHom.map_add, cosh, map_div₀]\n  --Porting note: not nice\n[GOAL]\nx y : ℂ\n⊢ ↑(starRingEnd ℂ) (exp x + exp (-x)) / 2 = ↑(starRingEnd ℂ) (exp x + exp (-x)) / ↑(starRingEnd ℂ) 2\n[PROOFSTEP]\nsimp [← one_add_one_eq_two]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ ↑(starRingEnd ℂ) (cosh ↑x) = cosh ↑x\n[PROOFSTEP]\nrw [← cosh_conj, conj_ofReal]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ (cosh ↑x).im = 0\n[PROOFSTEP]\nrw [← ofReal_cosh_ofReal_re, ofReal_im]\n[GOAL]\nx y : ℂ\n⊢ tanh 0 = 0\n[PROOFSTEP]\nsimp [tanh]\n[GOAL]\nx y : ℂ\n⊢ tanh (-x) = -tanh x\n[PROOFSTEP]\nsimp [tanh, neg_div]\n[GOAL]\nx y : ℂ\n⊢ tanh (↑(starRingEnd ℂ) x) = ↑(starRingEnd ℂ) (tanh x)\n[PROOFSTEP]\nrw [tanh, sinh_conj, cosh_conj, ← map_div₀, tanh]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ ↑(starRingEnd ℂ) (tanh ↑x) = tanh ↑x\n[PROOFSTEP]\nrw [← tanh_conj, conj_ofReal]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ (tanh ↑x).im = 0\n[PROOFSTEP]\nrw [← ofReal_tanh_ofReal_re, ofReal_im]\n[GOAL]\nx y : ℂ\n⊢ cosh x + sinh x = exp x\n[PROOFSTEP]\nrw [← mul_right_inj' (two_ne_zero' ℂ), mul_add, two_cosh, two_sinh, add_add_sub_cancel, two_mul]\n[GOAL]\nx y : ℂ\n⊢ sinh x + cosh x = exp x\n[PROOFSTEP]\nrw [add_comm, cosh_add_sinh]\n[GOAL]\nx y : ℂ\n⊢ cosh x - sinh x = exp (-x)\n[PROOFSTEP]\nrw [← mul_right_inj' (two_ne_zero' ℂ), mul_sub, two_cosh, two_sinh, add_sub_sub_cancel, two_mul]\n[GOAL]\nx y : ℂ\n⊢ sinh x - cosh x = -exp (-x)\n[PROOFSTEP]\nrw [← neg_sub, cosh_sub_sinh]\n[GOAL]\nx y : ℂ\n⊢ cosh x ^ 2 - sinh x ^ 2 = 1\n[PROOFSTEP]\nrw [sq_sub_sq, cosh_add_sinh, cosh_sub_sinh, ← exp_add, add_neg_self, exp_zero]\n[GOAL]\nx y : ℂ\n⊢ cosh x ^ 2 = sinh x ^ 2 + 1\n[PROOFSTEP]\nrw [← cosh_sq_sub_sinh_sq x]\n[GOAL]\nx y : ℂ\n⊢ cosh x ^ 2 = sinh x ^ 2 + (cosh x ^ 2 - sinh x ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ sinh x ^ 2 = cosh x ^ 2 - 1\n[PROOFSTEP]\nrw [← cosh_sq_sub_sinh_sq x]\n[GOAL]\nx y : ℂ\n⊢ sinh x ^ 2 = cosh x ^ 2 - (cosh x ^ 2 - sinh x ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ cosh (2 * x) = cosh x ^ 2 + sinh x ^ 2\n[PROOFSTEP]\nrw [two_mul, cosh_add, sq, sq]\n[GOAL]\nx y : ℂ\n⊢ sinh (2 * x) = 2 * sinh x * cosh x\n[PROOFSTEP]\nrw [two_mul, sinh_add]\n[GOAL]\nx y : ℂ\n⊢ sinh x * cosh x + cosh x * sinh x = 2 * sinh x * cosh x\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ cosh (3 * x) = 4 * cosh x ^ 3 - 3 * cosh x\n[PROOFSTEP]\nhave h1 : x + 2 * x = 3 * x := by ring\n[GOAL]\nx y : ℂ\n⊢ x + 2 * x = 3 * x\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ cosh (3 * x) = 4 * cosh x ^ 3 - 3 * cosh x\n[PROOFSTEP]\nrw [← h1, cosh_add x (2 * x)]\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ cosh x * cosh (2 * x) + sinh x * sinh (2 * x) = 4 * cosh x ^ 3 - 3 * cosh x\n[PROOFSTEP]\nsimp only [cosh_two_mul, sinh_two_mul]\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ cosh x * (cosh x ^ 2 + sinh x ^ 2) + sinh x * (2 * sinh x * cosh x) = 4 * cosh x ^ 3 - 3 * cosh x\n[PROOFSTEP]\nhave h2 : sinh x * (2 * sinh x * cosh x) = 2 * cosh x * sinh x ^ 2 := by ring\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ sinh x * (2 * sinh x * cosh x) = 2 * cosh x * sinh x ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\nh2 : sinh x * (2 * sinh x * cosh x) = 2 * cosh x * sinh x ^ 2\n⊢ cosh x * (cosh x ^ 2 + sinh x ^ 2) + sinh x * (2 * sinh x * cosh x) = 4 * cosh x ^ 3 - 3 * cosh x\n[PROOFSTEP]\nrw [h2, sinh_sq]\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\nh2 : sinh x * (2 * sinh x * cosh x) = 2 * cosh x * sinh x ^ 2\n⊢ cosh x * (cosh x ^ 2 + (cosh x ^ 2 - 1)) + 2 * cosh x * (cosh x ^ 2 - 1) = 4 * cosh x ^ 3 - 3 * cosh x\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ sinh (3 * x) = 4 * sinh x ^ 3 + 3 * sinh x\n[PROOFSTEP]\nhave h1 : x + 2 * x = 3 * x := by ring\n[GOAL]\nx y : ℂ\n⊢ x + 2 * x = 3 * x\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ sinh (3 * x) = 4 * sinh x ^ 3 + 3 * sinh x\n[PROOFSTEP]\nrw [← h1, sinh_add x (2 * x)]\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ sinh x * cosh (2 * x) + cosh x * sinh (2 * x) = 4 * sinh x ^ 3 + 3 * sinh x\n[PROOFSTEP]\nsimp only [cosh_two_mul, sinh_two_mul]\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ sinh x * (cosh x ^ 2 + sinh x ^ 2) + cosh x * (2 * sinh x * cosh x) = 4 * sinh x ^ 3 + 3 * sinh x\n[PROOFSTEP]\nhave h2 : cosh x * (2 * sinh x * cosh x) = 2 * sinh x * cosh x ^ 2 := by ring\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ cosh x * (2 * sinh x * cosh x) = 2 * sinh x * cosh x ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\nh2 : cosh x * (2 * sinh x * cosh x) = 2 * sinh x * cosh x ^ 2\n⊢ sinh x * (cosh x ^ 2 + sinh x ^ 2) + cosh x * (2 * sinh x * cosh x) = 4 * sinh x ^ 3 + 3 * sinh x\n[PROOFSTEP]\nrw [h2, cosh_sq]\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\nh2 : cosh x * (2 * sinh x * cosh x) = 2 * sinh x * cosh x ^ 2\n⊢ sinh x * (sinh x ^ 2 + 1 + sinh x ^ 2) + 2 * sinh x * (sinh x ^ 2 + 1) = 4 * sinh x ^ 3 + 3 * sinh x\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ sin 0 = 0\n[PROOFSTEP]\nsimp [sin]\n[GOAL]\nx y : ℂ\n⊢ sin (-x) = -sin x\n[PROOFSTEP]\nsimp [sin, sub_eq_add_neg, exp_neg, (neg_div _ _).symm, add_mul]\n[GOAL]\nx y : ℂ\n⊢ sinh (x * I) = sin x * I\n[PROOFSTEP]\nrw [← mul_right_inj' (two_ne_zero' ℂ), two_sinh, ← mul_assoc, two_sin, mul_assoc, I_mul_I, mul_neg_one, neg_sub,\n  neg_mul_eq_neg_mul]\n[GOAL]\nx y : ℂ\n⊢ cosh (x * I) = cos x\n[PROOFSTEP]\nrw [← mul_right_inj' (two_ne_zero' ℂ), two_cosh, two_cos, neg_mul_eq_neg_mul]\n[GOAL]\nx y : ℂ\n⊢ tanh (x * I) = tan x * I\n[PROOFSTEP]\nrw [tanh_eq_sinh_div_cosh, cosh_mul_I, sinh_mul_I, mul_div_right_comm, tan]\n[GOAL]\nx y : ℂ\n⊢ cos (x * I) = cosh x\n[PROOFSTEP]\nrw [← cosh_mul_I]\n[GOAL]\nx y : ℂ\n⊢ cosh (x * I * I) = cosh x\n[PROOFSTEP]\nring_nf\n[GOAL]\nx y : ℂ\n⊢ cosh (x * I ^ 2) = cosh x\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℂ\n⊢ sin (x * I) = sinh x * I\n[PROOFSTEP]\nhave h : I * sin (x * I) = -sinh x := by\n  rw [mul_comm, ← sinh_mul_I]\n  ring_nf\n  simp\n[GOAL]\nx y : ℂ\n⊢ I * sin (x * I) = -sinh x\n[PROOFSTEP]\nrw [mul_comm, ← sinh_mul_I]\n[GOAL]\nx y : ℂ\n⊢ sinh (x * I * I) = -sinh x\n[PROOFSTEP]\nring_nf\n[GOAL]\nx y : ℂ\n⊢ sinh (x * I ^ 2) = -sinh x\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℂ\nh : I * sin (x * I) = -sinh x\n⊢ sin (x * I) = sinh x * I\n[PROOFSTEP]\nrw [← neg_neg (sinh x), ← h]\n[GOAL]\nx y : ℂ\nh : I * sin (x * I) = -sinh x\n⊢ sin (x * I) = -(I * sin (x * I)) * I\n[PROOFSTEP]\next\n[GOAL]\ncase a\nx y : ℂ\nh : I * sin (x * I) = -sinh x\n⊢ (sin (x * I)).re = (-(I * sin (x * I)) * I).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nx y : ℂ\nh : I * sin (x * I) = -sinh x\n⊢ (sin (x * I)).im = (-(I * sin (x * I)) * I).im\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℂ\n⊢ tan (x * I) = tanh x * I\n[PROOFSTEP]\nrw [tan, sin_mul_I, cos_mul_I, mul_div_right_comm, tanh_eq_sinh_div_cosh]\n[GOAL]\nx y : ℂ\n⊢ sin (x + y) = sin x * cos y + cos x * sin y\n[PROOFSTEP]\nrw [← mul_left_inj' I_ne_zero, ← sinh_mul_I, add_mul, add_mul, mul_right_comm, ← sinh_mul_I, mul_assoc, ← sinh_mul_I, ←\n  cosh_mul_I, ← cosh_mul_I, sinh_add]\n[GOAL]\nx y : ℂ\n⊢ cos 0 = 1\n[PROOFSTEP]\nsimp [cos]\n[GOAL]\nx y : ℂ\n⊢ cos (-x) = cos x\n[PROOFSTEP]\nsimp [cos, sub_eq_add_neg, exp_neg, add_comm]\n[GOAL]\nx y a b c d : ℂ\n⊢ (a + b) * (c + d) - (b - a) * (d - c) * -1 = 2 * (a * c + b * d)\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ cos (x + y) = cos x * cos y - sin x * sin y\n[PROOFSTEP]\nrw [← cosh_mul_I, add_mul, cosh_add, cosh_mul_I, cosh_mul_I, sinh_mul_I, sinh_mul_I, mul_mul_mul_comm, I_mul_I,\n  mul_neg_one, sub_eq_add_neg]\n[GOAL]\nx y : ℂ\n⊢ sin (x - y) = sin x * cos y - cos x * sin y\n[PROOFSTEP]\nsimp [sub_eq_add_neg, sin_add, sin_neg, cos_neg]\n[GOAL]\nx y : ℂ\n⊢ cos (x - y) = cos x * cos y + sin x * sin y\n[PROOFSTEP]\nsimp [sub_eq_add_neg, cos_add, sin_neg, cos_neg]\n[GOAL]\nx✝ y✝ x y : ℂ\n⊢ sin (x + y * I) = sin x * cosh y + cos x * sinh y * I\n[PROOFSTEP]\nrw [sin_add, cos_mul_I, sin_mul_I, mul_assoc]\n[GOAL]\nx y z : ℂ\n⊢ sin z = sin ↑z.re * cosh ↑z.im + cos ↑z.re * sinh ↑z.im * I\n[PROOFSTEP]\nconvert sin_add_mul_I z.re z.im\n[GOAL]\ncase h.e'_2.h.e'_1\nx y z : ℂ\n⊢ z = ↑z.re + ↑z.im * I\n[PROOFSTEP]\nexact (re_add_im z).symm\n[GOAL]\nx✝ y✝ x y : ℂ\n⊢ cos (x + y * I) = cos x * cosh y - sin x * sinh y * I\n[PROOFSTEP]\nrw [cos_add, cos_mul_I, sin_mul_I, mul_assoc]\n[GOAL]\nx y z : ℂ\n⊢ cos z = cos ↑z.re * cosh ↑z.im - sin ↑z.re * sinh ↑z.im * I\n[PROOFSTEP]\nconvert cos_add_mul_I z.re z.im\n[GOAL]\ncase h.e'_2.h.e'_1\nx y z : ℂ\n⊢ z = ↑z.re + ↑z.im * I\n[PROOFSTEP]\nexact (re_add_im z).symm\n[GOAL]\nx y : ℂ\n⊢ sin x - sin y = 2 * sin ((x - y) / 2) * cos ((x + y) / 2)\n[PROOFSTEP]\nhave s1 := sin_add ((x + y) / 2) ((x - y) / 2)\n[GOAL]\nx y : ℂ\ns1 : sin ((x + y) / 2 + (x - y) / 2) = sin ((x + y) / 2) * cos ((x - y) / 2) + cos ((x + y) / 2) * sin ((x - y) / 2)\n⊢ sin x - sin y = 2 * sin ((x - y) / 2) * cos ((x + y) / 2)\n[PROOFSTEP]\nhave s2 := sin_sub ((x + y) / 2) ((x - y) / 2)\n[GOAL]\nx y : ℂ\ns1 : sin ((x + y) / 2 + (x - y) / 2) = sin ((x + y) / 2) * cos ((x - y) / 2) + cos ((x + y) / 2) * sin ((x - y) / 2)\ns2 : sin ((x + y) / 2 - (x - y) / 2) = sin ((x + y) / 2) * cos ((x - y) / 2) - cos ((x + y) / 2) * sin ((x - y) / 2)\n⊢ sin x - sin y = 2 * sin ((x - y) / 2) * cos ((x + y) / 2)\n[PROOFSTEP]\nrw [div_add_div_same, add_sub, add_right_comm, add_sub_cancel, half_add_self] at s1 \n[GOAL]\nx y : ℂ\ns1 : sin x = sin ((x + y) / 2) * cos ((x - y) / 2) + cos ((x + y) / 2) * sin ((x - y) / 2)\ns2 : sin ((x + y) / 2 - (x - y) / 2) = sin ((x + y) / 2) * cos ((x - y) / 2) - cos ((x + y) / 2) * sin ((x - y) / 2)\n⊢ sin x - sin y = 2 * sin ((x - y) / 2) * cos ((x + y) / 2)\n[PROOFSTEP]\nrw [div_sub_div_same, ← sub_add, add_sub_cancel', half_add_self] at s2 \n[GOAL]\nx y : ℂ\ns1 : sin x = sin ((x + y) / 2) * cos ((x - y) / 2) + cos ((x + y) / 2) * sin ((x - y) / 2)\ns2 : sin y = sin ((x + y) / 2) * cos ((x - y) / 2) - cos ((x + y) / 2) * sin ((x - y) / 2)\n⊢ sin x - sin y = 2 * sin ((x - y) / 2) * cos ((x + y) / 2)\n[PROOFSTEP]\nrw [s1, s2]\n[GOAL]\nx y : ℂ\ns1 : sin x = sin ((x + y) / 2) * cos ((x - y) / 2) + cos ((x + y) / 2) * sin ((x - y) / 2)\ns2 : sin y = sin ((x + y) / 2) * cos ((x - y) / 2) - cos ((x + y) / 2) * sin ((x - y) / 2)\n⊢ sin ((x + y) / 2) * cos ((x - y) / 2) + cos ((x + y) / 2) * sin ((x - y) / 2) -\n      (sin ((x + y) / 2) * cos ((x - y) / 2) - cos ((x + y) / 2) * sin ((x - y) / 2)) =\n    2 * sin ((x - y) / 2) * cos ((x + y) / 2)\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ cos x - cos y = -2 * sin ((x + y) / 2) * sin ((x - y) / 2)\n[PROOFSTEP]\nhave s1 := cos_add ((x + y) / 2) ((x - y) / 2)\n[GOAL]\nx y : ℂ\ns1 : cos ((x + y) / 2 + (x - y) / 2) = cos ((x + y) / 2) * cos ((x - y) / 2) - sin ((x + y) / 2) * sin ((x - y) / 2)\n⊢ cos x - cos y = -2 * sin ((x + y) / 2) * sin ((x - y) / 2)\n[PROOFSTEP]\nhave s2 := cos_sub ((x + y) / 2) ((x - y) / 2)\n[GOAL]\nx y : ℂ\ns1 : cos ((x + y) / 2 + (x - y) / 2) = cos ((x + y) / 2) * cos ((x - y) / 2) - sin ((x + y) / 2) * sin ((x - y) / 2)\ns2 : cos ((x + y) / 2 - (x - y) / 2) = cos ((x + y) / 2) * cos ((x - y) / 2) + sin ((x + y) / 2) * sin ((x - y) / 2)\n⊢ cos x - cos y = -2 * sin ((x + y) / 2) * sin ((x - y) / 2)\n[PROOFSTEP]\nrw [div_add_div_same, add_sub, add_right_comm, add_sub_cancel, half_add_self] at s1 \n[GOAL]\nx y : ℂ\ns1 : cos x = cos ((x + y) / 2) * cos ((x - y) / 2) - sin ((x + y) / 2) * sin ((x - y) / 2)\ns2 : cos ((x + y) / 2 - (x - y) / 2) = cos ((x + y) / 2) * cos ((x - y) / 2) + sin ((x + y) / 2) * sin ((x - y) / 2)\n⊢ cos x - cos y = -2 * sin ((x + y) / 2) * sin ((x - y) / 2)\n[PROOFSTEP]\nrw [div_sub_div_same, ← sub_add, add_sub_cancel', half_add_self] at s2 \n[GOAL]\nx y : ℂ\ns1 : cos x = cos ((x + y) / 2) * cos ((x - y) / 2) - sin ((x + y) / 2) * sin ((x - y) / 2)\ns2 : cos y = cos ((x + y) / 2) * cos ((x - y) / 2) + sin ((x + y) / 2) * sin ((x - y) / 2)\n⊢ cos x - cos y = -2 * sin ((x + y) / 2) * sin ((x - y) / 2)\n[PROOFSTEP]\nrw [s1, s2]\n[GOAL]\nx y : ℂ\ns1 : cos x = cos ((x + y) / 2) * cos ((x - y) / 2) - sin ((x + y) / 2) * sin ((x - y) / 2)\ns2 : cos y = cos ((x + y) / 2) * cos ((x - y) / 2) + sin ((x + y) / 2) * sin ((x - y) / 2)\n⊢ cos ((x + y) / 2) * cos ((x - y) / 2) - sin ((x + y) / 2) * sin ((x - y) / 2) -\n      (cos ((x + y) / 2) * cos ((x - y) / 2) + sin ((x + y) / 2) * sin ((x - y) / 2)) =\n    -2 * sin ((x + y) / 2) * sin ((x - y) / 2)\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ cos x + cos y = 2 * cos ((x + y) / 2) * cos ((x - y) / 2)\n[PROOFSTEP]\nhave h2 : (2 : ℂ) ≠ 0 := by norm_num\n[GOAL]\nx y : ℂ\n⊢ 2 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx y : ℂ\nh2 : 2 ≠ 0\n⊢ cos x + cos y = 2 * cos ((x + y) / 2) * cos ((x - y) / 2)\n[PROOFSTEP]\ncalc\n  cos x + cos y = cos ((x + y) / 2 + (x - y) / 2) + cos ((x + y) / 2 - (x - y) / 2) := ?_\n  _ =\n      cos ((x + y) / 2) * cos ((x - y) / 2) - sin ((x + y) / 2) * sin ((x - y) / 2) +\n        (cos ((x + y) / 2) * cos ((x - y) / 2) + sin ((x + y) / 2) * sin ((x - y) / 2)) :=\n    ?_\n  _ = 2 * cos ((x + y) / 2) * cos ((x - y) / 2) := ?_\n[GOAL]\ncase calc_1\nx y : ℂ\nh2 : 2 ≠ 0\n⊢ cos x + cos y = cos ((x + y) / 2 + (x - y) / 2) + cos ((x + y) / 2 - (x - y) / 2)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase calc_1.e_a.e_z\nx y : ℂ\nh2 : 2 ≠ 0\n⊢ x = (x + y) / 2 + (x - y) / 2\n[PROOFSTEP]\nfield_simp [h2]\n[GOAL]\ncase calc_1.e_a.e_z\nx y : ℂ\nh2 : 2 ≠ 0\n⊢ y = (x + y) / 2 - (x - y) / 2\n[PROOFSTEP]\nfield_simp [h2]\n[GOAL]\ncase calc_2\nx y : ℂ\nh2 : 2 ≠ 0\n⊢ cos ((x + y) / 2 + (x - y) / 2) + cos ((x + y) / 2 - (x - y) / 2) =\n    cos ((x + y) / 2) * cos ((x - y) / 2) - sin ((x + y) / 2) * sin ((x - y) / 2) +\n      (cos ((x + y) / 2) * cos ((x - y) / 2) + sin ((x + y) / 2) * sin ((x - y) / 2))\n[PROOFSTEP]\nrw [cos_add, cos_sub]\n[GOAL]\ncase calc_3\nx y : ℂ\nh2 : 2 ≠ 0\n⊢ cos ((x + y) / 2) * cos ((x - y) / 2) - sin ((x + y) / 2) * sin ((x - y) / 2) +\n      (cos ((x + y) / 2) * cos ((x - y) / 2) + sin ((x + y) / 2) * sin ((x - y) / 2)) =\n    2 * cos ((x + y) / 2) * cos ((x - y) / 2)\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ sin (↑(starRingEnd ℂ) x) = ↑(starRingEnd ℂ) (sin x)\n[PROOFSTEP]\nrw [← mul_left_inj' I_ne_zero, ← sinh_mul_I, ← conj_neg_I, ← RingHom.map_mul, ← RingHom.map_mul, sinh_conj, mul_neg,\n  sinh_neg, sinh_mul_I, mul_neg]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ ↑(starRingEnd ℂ) (sin ↑x) = sin ↑x\n[PROOFSTEP]\nrw [← sin_conj, conj_ofReal]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ (sin ↑x).im = 0\n[PROOFSTEP]\nrw [← ofReal_sin_ofReal_re, ofReal_im]\n[GOAL]\nx y : ℂ\n⊢ cos (↑(starRingEnd ℂ) x) = ↑(starRingEnd ℂ) (cos x)\n[PROOFSTEP]\nrw [← cosh_mul_I, ← conj_neg_I, ← RingHom.map_mul, ← cosh_mul_I, cosh_conj, mul_neg, cosh_neg]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ ↑(starRingEnd ℂ) (cos ↑x) = cos ↑x\n[PROOFSTEP]\nrw [← cos_conj, conj_ofReal]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ (cos ↑x).im = 0\n[PROOFSTEP]\nrw [← ofReal_cos_ofReal_re, ofReal_im]\n[GOAL]\nx y : ℂ\n⊢ tan 0 = 0\n[PROOFSTEP]\nsimp [tan]\n[GOAL]\nx✝ y x : ℂ\nhx : cos x ≠ 0\n⊢ tan x * cos x = sin x\n[PROOFSTEP]\nrw [tan_eq_sin_div_cos, div_mul_cancel _ hx]\n[GOAL]\nx y : ℂ\n⊢ tan (-x) = -tan x\n[PROOFSTEP]\nsimp [tan, neg_div]\n[GOAL]\nx y : ℂ\n⊢ tan (↑(starRingEnd ℂ) x) = ↑(starRingEnd ℂ) (tan x)\n[PROOFSTEP]\nrw [tan, sin_conj, cos_conj, ← map_div₀, tan]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ ↑(starRingEnd ℂ) (tan ↑x) = tan ↑x\n[PROOFSTEP]\nrw [← tan_conj, conj_ofReal]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ (tan ↑x).im = 0\n[PROOFSTEP]\nrw [← ofReal_tan_ofReal_re, ofReal_im]\n[GOAL]\nx y : ℂ\n⊢ cos x + sin x * I = exp (x * I)\n[PROOFSTEP]\nrw [← cosh_add_sinh, sinh_mul_I, cosh_mul_I]\n[GOAL]\nx y : ℂ\n⊢ cos x - sin x * I = exp (-x * I)\n[PROOFSTEP]\nrw [neg_mul, ← cosh_sub_sinh, sinh_mul_I, cosh_mul_I]\n[GOAL]\nx y : ℂ\n⊢ sin x ^ 2 + cos x ^ 2 = cosh (x * I) ^ 2 - sinh (x * I) ^ 2\n[PROOFSTEP]\nrw [cosh_mul_I, sinh_mul_I, mul_pow, I_sq, mul_neg_one, sub_neg_eq_add, add_comm]\n[GOAL]\nx y : ℂ\n⊢ cos x ^ 2 + sin x ^ 2 = 1\n[PROOFSTEP]\nrw [add_comm, sin_sq_add_cos_sq]\n[GOAL]\nx y : ℂ\n⊢ cos (2 * x) = cos x ^ 2 - sin x ^ 2\n[PROOFSTEP]\nrw [two_mul, cos_add, ← sq, ← sq]\n[GOAL]\nx y : ℂ\n⊢ cos (2 * x) = 2 * cos x ^ 2 - 1\n[PROOFSTEP]\nrw [cos_two_mul', eq_sub_iff_add_eq.2 (sin_sq_add_cos_sq x), ← sub_add, sub_add_eq_add_sub, two_mul]\n[GOAL]\nx y : ℂ\n⊢ sin (2 * x) = 2 * sin x * cos x\n[PROOFSTEP]\nrw [two_mul, sin_add, two_mul, add_mul, mul_comm]\n[GOAL]\nx y : ℂ\n⊢ cos x ^ 2 = 1 / 2 + cos (2 * x) / 2\n[PROOFSTEP]\nsimp [cos_two_mul, div_add_div_same, mul_div_cancel_left, two_ne_zero, -one_div]\n[GOAL]\nx y : ℂ\n⊢ cos x ^ 2 = 1 - sin x ^ 2\n[PROOFSTEP]\nrw [← sin_sq_add_cos_sq x, add_sub_cancel']\n[GOAL]\nx y : ℂ\n⊢ sin x ^ 2 = 1 - cos x ^ 2\n[PROOFSTEP]\nrw [← sin_sq_add_cos_sq x, add_sub_cancel]\n[GOAL]\nx✝ y x : ℂ\nhx : cos x ≠ 0\n⊢ (1 + tan x ^ 2)⁻¹ = cos x ^ 2\n[PROOFSTEP]\nhave : cos x ^ 2 ≠ 0 := pow_ne_zero 2 hx\n[GOAL]\nx✝ y x : ℂ\nhx : cos x ≠ 0\nthis : cos x ^ 2 ≠ 0\n⊢ (1 + tan x ^ 2)⁻¹ = cos x ^ 2\n[PROOFSTEP]\nrw [tan_eq_sin_div_cos, div_pow]\n[GOAL]\nx✝ y x : ℂ\nhx : cos x ≠ 0\nthis : cos x ^ 2 ≠ 0\n⊢ (1 + sin x ^ 2 / cos x ^ 2)⁻¹ = cos x ^ 2\n[PROOFSTEP]\nfield_simp [this]\n[GOAL]\nx✝ y x : ℂ\nhx : cos x ≠ 0\n⊢ tan x ^ 2 / (1 + tan x ^ 2) = sin x ^ 2\n[PROOFSTEP]\nsimp only [← tan_mul_cos hx, mul_pow, ← inv_one_add_tan_sq hx, div_eq_mul_inv, one_mul]\n[GOAL]\nx y : ℂ\n⊢ cos (3 * x) = 4 * cos x ^ 3 - 3 * cos x\n[PROOFSTEP]\nhave h1 : x + 2 * x = 3 * x := by ring\n[GOAL]\nx y : ℂ\n⊢ x + 2 * x = 3 * x\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ cos (3 * x) = 4 * cos x ^ 3 - 3 * cos x\n[PROOFSTEP]\nrw [← h1, cos_add x (2 * x)]\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ cos x * cos (2 * x) - sin x * sin (2 * x) = 4 * cos x ^ 3 - 3 * cos x\n[PROOFSTEP]\nsimp only [cos_two_mul, sin_two_mul, mul_add, mul_sub, mul_one, sq]\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ cos x * (2 * (cos x * cos x)) - cos x - sin x * (2 * sin x * cos x) = 4 * cos x ^ 3 - 3 * cos x\n[PROOFSTEP]\nhave h2 : 4 * cos x ^ 3 = 2 * cos x * cos x * cos x + 2 * cos x * cos x ^ 2 := by ring\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ 4 * cos x ^ 3 = 2 * cos x * cos x * cos x + 2 * cos x * cos x ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\nh2 : 4 * cos x ^ 3 = 2 * cos x * cos x * cos x + 2 * cos x * cos x ^ 2\n⊢ cos x * (2 * (cos x * cos x)) - cos x - sin x * (2 * sin x * cos x) = 4 * cos x ^ 3 - 3 * cos x\n[PROOFSTEP]\nrw [h2, cos_sq']\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\nh2 : 4 * cos x ^ 3 = 2 * cos x * cos x * cos x + 2 * cos x * cos x ^ 2\n⊢ cos x * (2 * (cos x * cos x)) - cos x - sin x * (2 * sin x * cos x) =\n    2 * cos x * cos x * cos x + 2 * cos x * (1 - sin x ^ 2) - 3 * cos x\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ sin (3 * x) = 3 * sin x - 4 * sin x ^ 3\n[PROOFSTEP]\nhave h1 : x + 2 * x = 3 * x := by ring\n[GOAL]\nx y : ℂ\n⊢ x + 2 * x = 3 * x\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ sin (3 * x) = 3 * sin x - 4 * sin x ^ 3\n[PROOFSTEP]\nrw [← h1, sin_add x (2 * x)]\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ sin x * cos (2 * x) + cos x * sin (2 * x) = 3 * sin x - 4 * sin x ^ 3\n[PROOFSTEP]\nsimp only [cos_two_mul, sin_two_mul, cos_sq']\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ sin x * (2 * (1 - sin x ^ 2) - 1) + cos x * (2 * sin x * cos x) = 3 * sin x - 4 * sin x ^ 3\n[PROOFSTEP]\nhave h2 : cos x * (2 * sin x * cos x) = 2 * sin x * cos x ^ 2 := by ring\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\n⊢ cos x * (2 * sin x * cos x) = 2 * sin x * cos x ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\nh2 : cos x * (2 * sin x * cos x) = 2 * sin x * cos x ^ 2\n⊢ sin x * (2 * (1 - sin x ^ 2) - 1) + cos x * (2 * sin x * cos x) = 3 * sin x - 4 * sin x ^ 3\n[PROOFSTEP]\nrw [h2, cos_sq']\n[GOAL]\nx y : ℂ\nh1 : x + 2 * x = 3 * x\nh2 : cos x * (2 * sin x * cos x) = 2 * sin x * cos x ^ 2\n⊢ sin x * (2 * (1 - sin x ^ 2) - 1) + 2 * sin x * (1 - sin x ^ 2) = 3 * sin x - 4 * sin x ^ 3\n[PROOFSTEP]\nring\n[GOAL]\nx y : ℂ\n⊢ exp (x + y * I) = exp x * (cos y + sin y * I)\n[PROOFSTEP]\nrw [exp_add, exp_mul_I]\n[GOAL]\nx y : ℂ\n⊢ exp x = exp ↑x.re * (cos ↑x.im + sin ↑x.im * I)\n[PROOFSTEP]\nrw [← exp_add_mul_I, re_add_im]\n[GOAL]\nx y : ℂ\n⊢ (exp x).re = Real.exp x.re * Real.cos x.im\n[PROOFSTEP]\nrw [exp_eq_exp_re_mul_sin_add_cos]\n[GOAL]\nx y : ℂ\n⊢ (exp ↑x.re * (cos ↑x.im + sin ↑x.im * I)).re = Real.exp x.re * Real.cos x.im\n[PROOFSTEP]\nsimp [exp_ofReal_re, cos_ofReal_re]\n[GOAL]\nx y : ℂ\n⊢ (exp x).im = Real.exp x.re * Real.sin x.im\n[PROOFSTEP]\nrw [exp_eq_exp_re_mul_sin_add_cos]\n[GOAL]\nx y : ℂ\n⊢ (exp ↑x.re * (cos ↑x.im + sin ↑x.im * I)).im = Real.exp x.re * Real.sin x.im\n[PROOFSTEP]\nsimp [exp_ofReal_re, sin_ofReal_re]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ (exp (↑x * I)).re = Real.cos x\n[PROOFSTEP]\nsimp [exp_mul_I, cos_ofReal_re]\n[GOAL]\nx✝ y : ℂ\nx : ℝ\n⊢ (exp (↑x * I)).im = Real.sin x\n[PROOFSTEP]\nsimp [exp_mul_I, sin_ofReal_re]\n[GOAL]\nx y : ℂ\nn : ℕ\nz : ℂ\n⊢ (cos z + sin z * I) ^ n = cos (↑n * z) + sin (↑n * z) * I\n[PROOFSTEP]\nrw [← exp_mul_I, ← exp_mul_I]\n[GOAL]\nx y : ℂ\nn : ℕ\nz : ℂ\n⊢ exp (z * I) ^ n = exp (↑n * z * I)\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nx y z : ℂ\n⊢ exp (z * I) ^ Nat.zero = exp (↑Nat.zero * z * I)\n[PROOFSTEP]\nrw [pow_zero, Nat.cast_zero, zero_mul, zero_mul, exp_zero]\n[GOAL]\ncase succ\nx y z : ℂ\nn : ℕ\nih : exp (z * I) ^ n = exp (↑n * z * I)\n⊢ exp (z * I) ^ Nat.succ n = exp (↑(Nat.succ n) * z * I)\n[PROOFSTEP]\nrw [pow_succ', ih, Nat.cast_succ, add_mul, add_mul, one_mul, exp_add]\n[GOAL]\nx y : ℝ\n⊢ exp 0 = 1\n[PROOFSTEP]\nsimp [Real.exp]\n[GOAL]\nx y : ℝ\n⊢ exp (x + y) = exp x * exp y\n[PROOFSTEP]\nsimp [exp_add, exp]\n[GOAL]\nx y : ℝ\n⊢ (fun x => exp (↑Multiplicative.toAdd x)) 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℝ\n⊢ ∀ (x y : Multiplicative ℝ),\n    OneHom.toFun { toFun := fun x => exp (↑Multiplicative.toAdd x), map_one' := (_ : exp 0 = 1) } (x * y) =\n      OneHom.toFun { toFun := fun x => exp (↑Multiplicative.toAdd x), map_one' := (_ : exp 0 = 1) } x *\n        OneHom.toFun { toFun := fun x => exp (↑Multiplicative.toAdd x), map_one' := (_ : exp 0 = 1) } y\n[PROOFSTEP]\nsimp [exp_add]\n[GOAL]\nx✝ y x : ℝ\nn : ℕ\n⊢ ↑(exp (↑n * x)) = ↑(exp x ^ n)\n[PROOFSTEP]\nsimp [exp_nat_mul]\n[GOAL]\nx y : ℝ\nh : exp x = 0\n⊢ Complex.exp ↑x = 0\n[PROOFSTEP]\nrw [exp, ← ofReal_inj] at h \n[GOAL]\nx y : ℝ\nh : ↑(Complex.exp ↑x).re = ↑0\n⊢ Complex.exp ↑x = 0\n[PROOFSTEP]\nsimp_all\n[GOAL]\nx y : ℝ\n⊢ ↑(exp (-x)) = ↑(exp x)⁻¹\n[PROOFSTEP]\nsimp [exp_neg]\n[GOAL]\nx y : ℝ\n⊢ exp (x - y) = exp x / exp y\n[PROOFSTEP]\nsimp [sub_eq_add_neg, exp_add, exp_neg, div_eq_mul_inv]\n[GOAL]\nx y : ℝ\n⊢ sin 0 = 0\n[PROOFSTEP]\nsimp [sin]\n[GOAL]\nx y : ℝ\n⊢ sin (-x) = -sin x\n[PROOFSTEP]\nsimp [sin, exp_neg, (neg_div _ _).symm, add_mul]\n[GOAL]\nx y : ℝ\n⊢ ↑(sin (x + y)) = ↑(sin x * cos y + cos x * sin y)\n[PROOFSTEP]\nsimp [sin_add]\n[GOAL]\nx y : ℝ\n⊢ cos 0 = 1\n[PROOFSTEP]\nsimp [cos]\n[GOAL]\nx y : ℝ\n⊢ cos (-x) = cos x\n[PROOFSTEP]\nsimp [cos, exp_neg]\n[GOAL]\nx y : ℝ\n⊢ cos (abs' x) = cos x\n[PROOFSTEP]\ncases le_total x 0\n[GOAL]\ncase inl\nx y : ℝ\nh✝ : x ≤ 0\n⊢ cos (abs' x) = cos x\n[PROOFSTEP]\nsimp only [*, _root_.abs_of_nonneg, abs_of_nonpos, cos_neg]\n[GOAL]\ncase inr\nx y : ℝ\nh✝ : 0 ≤ x\n⊢ cos (abs' x) = cos x\n[PROOFSTEP]\nsimp only [*, _root_.abs_of_nonneg, abs_of_nonpos, cos_neg]\n[GOAL]\nx y : ℝ\n⊢ ↑(cos (x + y)) = ↑(cos x * cos y - sin x * sin y)\n[PROOFSTEP]\nsimp [cos_add]\n[GOAL]\nx y : ℝ\n⊢ sin (x - y) = sin x * cos y - cos x * sin y\n[PROOFSTEP]\nsimp [sub_eq_add_neg, sin_add, sin_neg, cos_neg]\n[GOAL]\nx y : ℝ\n⊢ cos (x - y) = cos x * cos y + sin x * sin y\n[PROOFSTEP]\nsimp [sub_eq_add_neg, cos_add, sin_neg, cos_neg]\n[GOAL]\nx y : ℝ\n⊢ ↑(sin x - sin y) = ↑(2 * sin ((x - y) / 2) * cos ((x + y) / 2))\n[PROOFSTEP]\nsimp [sin_sub_sin]\n[GOAL]\nx y : ℝ\n⊢ ↑(cos x - cos y) = ↑(-2 * sin ((x + y) / 2) * sin ((x - y) / 2))\n[PROOFSTEP]\nsimp [cos_sub_cos]\n[GOAL]\nx y : ℝ\n⊢ ↑(cos x + cos y) = ↑(2 * cos ((x + y) / 2) * cos ((x - y) / 2))\n[PROOFSTEP]\nsimp [cos_add_cos]\n[GOAL]\nx y : ℝ\n⊢ ↑(tan x) = ↑(sin x / cos x)\n[PROOFSTEP]\nsimp [tan_eq_sin_div_cos]\n[GOAL]\nx✝ y x : ℝ\nhx : cos x ≠ 0\n⊢ tan x * cos x = sin x\n[PROOFSTEP]\nrw [tan_eq_sin_div_cos, div_mul_cancel _ hx]\n[GOAL]\nx y : ℝ\n⊢ tan 0 = 0\n[PROOFSTEP]\nsimp [tan]\n[GOAL]\nx y : ℝ\n⊢ tan (-x) = -tan x\n[PROOFSTEP]\nsimp [tan, neg_div]\n[GOAL]\nx y : ℝ\n⊢ ↑(sin x ^ 2 + cos x ^ 2) = ↑1\n[PROOFSTEP]\nsimp [sin_sq_add_cos_sq]\n[GOAL]\nx y : ℝ\n⊢ cos x ^ 2 + sin x ^ 2 = 1\n[PROOFSTEP]\nrw [add_comm, sin_sq_add_cos_sq]\n[GOAL]\nx y : ℝ\n⊢ sin x ^ 2 ≤ 1\n[PROOFSTEP]\nrw [← sin_sq_add_cos_sq x]\n[GOAL]\nx y : ℝ\n⊢ sin x ^ 2 ≤ sin x ^ 2 + cos x ^ 2\n[PROOFSTEP]\nexact le_add_of_nonneg_right (sq_nonneg _)\n[GOAL]\nx y : ℝ\n⊢ cos x ^ 2 ≤ 1\n[PROOFSTEP]\nrw [← sin_sq_add_cos_sq x]\n[GOAL]\nx y : ℝ\n⊢ cos x ^ 2 ≤ sin x ^ 2 + cos x ^ 2\n[PROOFSTEP]\nexact le_add_of_nonneg_left (sq_nonneg _)\n[GOAL]\nx y : ℝ\n⊢ sin x * sin x ≤ 1\n[PROOFSTEP]\nsimp only [← sq, sin_sq_le_one]\n[GOAL]\nx y : ℝ\n⊢ cos x * cos x ≤ 1\n[PROOFSTEP]\nsimp only [← sq, cos_sq_le_one]\n[GOAL]\nx y : ℝ\n⊢ ↑(cos (2 * x)) = ↑(2 * cos x ^ 2 - 1)\n[PROOFSTEP]\nsimp [cos_two_mul]\n[GOAL]\nx y : ℝ\n⊢ ↑(cos (2 * x)) = ↑(cos x ^ 2 - sin x ^ 2)\n[PROOFSTEP]\nsimp [cos_two_mul']\n[GOAL]\nx y : ℝ\n⊢ ↑(sin (2 * x)) = ↑(2 * sin x * cos x)\n[PROOFSTEP]\nsimp [sin_two_mul]\n[GOAL]\nx y : ℝ\n⊢ ↑(cos x ^ 2) = ↑(1 / 2 + cos (2 * x) / 2)\n[PROOFSTEP]\nsimp [cos_sq]\n[GOAL]\nx y : ℝ\n⊢ cos x ^ 2 = 1 - sin x ^ 2\n[PROOFSTEP]\nrw [← sin_sq_add_cos_sq x, add_sub_cancel']\n[GOAL]\nx✝ y x : ℝ\n⊢ abs' (sin x) = sqrt (1 - cos x ^ 2)\n[PROOFSTEP]\nrw [← sin_sq, sqrt_sq_eq_abs]\n[GOAL]\nx✝ y x : ℝ\n⊢ abs' (cos x) = sqrt (1 - sin x ^ 2)\n[PROOFSTEP]\nrw [← cos_sq', sqrt_sq_eq_abs]\n[GOAL]\nx✝ y x : ℝ\nhx : cos x ≠ 0\nthis : Complex.cos ↑x ≠ 0\n⊢ ↑(1 + tan x ^ 2)⁻¹ = ↑(cos x ^ 2)\n[PROOFSTEP]\nsimpa using Complex.inv_one_add_tan_sq this\n[GOAL]\nx✝ y x : ℝ\nhx : cos x ≠ 0\n⊢ tan x ^ 2 / (1 + tan x ^ 2) = sin x ^ 2\n[PROOFSTEP]\nsimp only [← tan_mul_cos hx, mul_pow, ← inv_one_add_tan_sq hx, div_eq_mul_inv, one_mul]\n[GOAL]\nx✝ y x : ℝ\nhx : 0 < cos x\n⊢ (sqrt (1 + tan x ^ 2))⁻¹ = cos x\n[PROOFSTEP]\nrw [← sqrt_sq hx.le, ← sqrt_inv, inv_one_add_tan_sq hx.ne']\n[GOAL]\nx✝ y x : ℝ\nhx : 0 < cos x\n⊢ tan x / sqrt (1 + tan x ^ 2) = sin x\n[PROOFSTEP]\nrw [← tan_mul_cos hx.ne', ← inv_sqrt_one_add_tan_sq hx, div_eq_mul_inv]\n[GOAL]\nx y : ℝ\n⊢ cos (3 * x) = 4 * cos x ^ 3 - 3 * cos x\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx y : ℝ\n⊢ ↑(cos (3 * x)) = ↑(4 * cos x ^ 3 - 3 * cos x)\n[PROOFSTEP]\nsimp [cos_three_mul]\n[GOAL]\nx y : ℝ\n⊢ sin (3 * x) = 3 * sin x - 4 * sin x ^ 3\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx y : ℝ\n⊢ ↑(sin (3 * x)) = ↑(3 * sin x - 4 * sin x ^ 3)\n[PROOFSTEP]\nsimp [sin_three_mul]\n[GOAL]\nx✝ y x : ℝ\n⊢ ↑(sinh x) = ↑((exp x - exp (-x)) / 2)\n[PROOFSTEP]\nsimp [Complex.sinh]\n[GOAL]\nx y : ℝ\n⊢ sinh 0 = 0\n[PROOFSTEP]\nsimp [sinh]\n[GOAL]\nx y : ℝ\n⊢ sinh (-x) = -sinh x\n[PROOFSTEP]\nsimp [sinh, exp_neg, (neg_div _ _).symm, add_mul]\n[GOAL]\nx y : ℝ\n⊢ sinh (x + y) = sinh x * cosh y + cosh x * sinh y\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx y : ℝ\n⊢ ↑(sinh (x + y)) = ↑(sinh x * cosh y + cosh x * sinh y)\n[PROOFSTEP]\nsimp [sinh_add]\n[GOAL]\nx✝ y x : ℝ\n⊢ cosh x * 2 = exp x + exp (-x)\n[PROOFSTEP]\nrw [cosh, exp, exp, Complex.ofReal_neg, Complex.cosh, mul_two, ← Complex.add_re, ← mul_two,\n  div_mul_cancel _ (two_ne_zero' ℂ), Complex.add_re]\n[GOAL]\nx y : ℝ\n⊢ cosh 0 = 1\n[PROOFSTEP]\nsimp [cosh]\n[GOAL]\nx y : ℝ\n⊢ ↑(cosh (-x)) = ↑(cosh x)\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℝ\n⊢ cosh (abs' x) = cosh x\n[PROOFSTEP]\ncases le_total x 0\n[GOAL]\ncase inl\nx y : ℝ\nh✝ : x ≤ 0\n⊢ cosh (abs' x) = cosh x\n[PROOFSTEP]\nsimp [*, _root_.abs_of_nonneg, abs_of_nonpos]\n[GOAL]\ncase inr\nx y : ℝ\nh✝ : 0 ≤ x\n⊢ cosh (abs' x) = cosh x\n[PROOFSTEP]\nsimp [*, _root_.abs_of_nonneg, abs_of_nonpos]\n[GOAL]\nx y : ℝ\n⊢ cosh (x + y) = cosh x * cosh y + sinh x * sinh y\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx y : ℝ\n⊢ ↑(cosh (x + y)) = ↑(cosh x * cosh y + sinh x * sinh y)\n[PROOFSTEP]\nsimp [cosh_add]\n[GOAL]\nx y : ℝ\n⊢ sinh (x - y) = sinh x * cosh y - cosh x * sinh y\n[PROOFSTEP]\nsimp [sub_eq_add_neg, sinh_add, sinh_neg, cosh_neg]\n[GOAL]\nx y : ℝ\n⊢ cosh (x - y) = cosh x * cosh y - sinh x * sinh y\n[PROOFSTEP]\nsimp [sub_eq_add_neg, cosh_add, sinh_neg, cosh_neg]\n[GOAL]\nx y : ℝ\n⊢ ↑(tanh x) = ↑(sinh x / cosh x)\n[PROOFSTEP]\nsimp [tanh_eq_sinh_div_cosh]\n[GOAL]\nx y : ℝ\n⊢ tanh 0 = 0\n[PROOFSTEP]\nsimp [tanh]\n[GOAL]\nx y : ℝ\n⊢ tanh (-x) = -tanh x\n[PROOFSTEP]\nsimp [tanh, neg_div]\n[GOAL]\nx y : ℝ\n⊢ cosh x + sinh x = exp x\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx y : ℝ\n⊢ ↑(cosh x + sinh x) = ↑(exp x)\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℝ\n⊢ sinh x + cosh x = exp x\n[PROOFSTEP]\nrw [add_comm, cosh_add_sinh]\n[GOAL]\nx y : ℝ\n⊢ cosh x - sinh x = exp (-x)\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx y : ℝ\n⊢ ↑(cosh x - sinh x) = ↑(exp (-x))\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℝ\n⊢ sinh x - cosh x = -exp (-x)\n[PROOFSTEP]\nrw [← neg_sub, cosh_sub_sinh]\n[GOAL]\nx✝ y x : ℝ\n⊢ cosh x ^ 2 - sinh x ^ 2 = 1\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx✝ y x : ℝ\n⊢ ↑(cosh x ^ 2 - sinh x ^ 2) = ↑1\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℝ\n⊢ cosh x ^ 2 = sinh x ^ 2 + 1\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx y : ℝ\n⊢ ↑(cosh x ^ 2) = ↑(sinh x ^ 2 + 1)\n[PROOFSTEP]\nsimp [cosh_sq]\n[GOAL]\nx y : ℝ\n⊢ sinh x ^ 2 = cosh x ^ 2 - 1\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx y : ℝ\n⊢ ↑(sinh x ^ 2) = ↑(cosh x ^ 2 - 1)\n[PROOFSTEP]\nsimp [sinh_sq]\n[GOAL]\nx y : ℝ\n⊢ cosh (2 * x) = cosh x ^ 2 + sinh x ^ 2\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx y : ℝ\n⊢ ↑(cosh (2 * x)) = ↑(cosh x ^ 2 + sinh x ^ 2)\n[PROOFSTEP]\nsimp [cosh_two_mul]\n[GOAL]\nx y : ℝ\n⊢ sinh (2 * x) = 2 * sinh x * cosh x\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx y : ℝ\n⊢ ↑(sinh (2 * x)) = ↑(2 * sinh x * cosh x)\n[PROOFSTEP]\nsimp [sinh_two_mul]\n[GOAL]\nx y : ℝ\n⊢ cosh (3 * x) = 4 * cosh x ^ 3 - 3 * cosh x\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx y : ℝ\n⊢ ↑(cosh (3 * x)) = ↑(4 * cosh x ^ 3 - 3 * cosh x)\n[PROOFSTEP]\nsimp [cosh_three_mul]\n[GOAL]\nx y : ℝ\n⊢ sinh (3 * x) = 4 * sinh x ^ 3 + 3 * sinh x\n[PROOFSTEP]\nrw [← ofReal_inj]\n[GOAL]\nx y : ℝ\n⊢ ↑(sinh (3 * x)) = ↑(4 * sinh x ^ 3 + 3 * sinh x)\n[PROOFSTEP]\nsimp [sinh_three_mul]\n[GOAL]\nx✝ y x : ℝ\nhx : 0 ≤ x\nn : ℕ\n⊢ ∑ i in range n, x ^ i / ↑i ! ≤\n    CauSeq.lim { val := fun n => (↑(exp' ↑x) n).re, property := (_ : IsCauSeq abs' fun n => (↑(exp' ↑x) n).re) }\n[PROOFSTEP]\nrefine' le_lim (CauSeq.le_of_exists ⟨n, fun j hj => _⟩)\n[GOAL]\nx✝ y x : ℝ\nhx : 0 ≤ x\nn j : ℕ\nhj : j ≥ n\n⊢ ↑(const abs' (∑ i in range n, x ^ i / ↑i !)) j ≤\n    ↑{ val := fun n => (↑(exp' ↑x) n).re, property := (_ : IsCauSeq abs' fun n => (↑(exp' ↑x) n).re) } j\n[PROOFSTEP]\nsimp only [exp', const_apply, re_sum]\n[GOAL]\nx✝ y x : ℝ\nhx : 0 ≤ x\nn j : ℕ\nhj : j ≥ n\n⊢ ∑ i in range n, x ^ i / ↑i ! ≤ ∑ i in range j, (↑x ^ i / ↑i !).re\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nx✝ y x : ℝ\nhx : 0 ≤ x\nn j : ℕ\nhj : j ≥ n\n⊢ ∑ i in range n, x ^ i / ↑i ! ≤ ∑ i in range j, x ^ i / ↑i !\n[PROOFSTEP]\nrw [← Nat.add_sub_of_le hj, Finset.sum_range_add]\n[GOAL]\nx✝ y x : ℝ\nhx : 0 ≤ x\nn j : ℕ\nhj : j ≥ n\n⊢ ∑ i in range n, x ^ i / ↑i ! ≤\n    ∑ x_1 in range n, x ^ x_1 / ↑x_1 ! + ∑ x_1 in range (j - n), x ^ (n + x_1) / ↑(n + x_1)!\n[PROOFSTEP]\nrefine' le_add_of_nonneg_right (sum_nonneg fun i _ => _)\n[GOAL]\nx✝¹ y x : ℝ\nhx : 0 ≤ x\nn j : ℕ\nhj : j ≥ n\ni : ℕ\nx✝ : i ∈ range (j - n)\n⊢ 0 ≤ x ^ (n + i) / ↑(n + i)!\n[PROOFSTEP]\npositivity\n[GOAL]\nx✝ y x : ℝ\nhx : 0 ≤ x\nn : ℕ\n⊢ CauSeq.lim { val := fun n => (↑(exp' ↑x) n).re, property := (_ : IsCauSeq abs' fun n => (↑(exp' ↑x) n).re) } = exp x\n[PROOFSTEP]\nrw [exp, Complex.exp, ← cauSeqRe, lim_re]\n[GOAL]\nx✝ y x : ℝ\nhx : 0 ≤ x\n⊢ 1 + x + x ^ 2 / 2 = ∑ i in range 3, x ^ i / ↑i !\n[PROOFSTEP]\nsimp [Finset.sum_range_succ]\n[GOAL]\nx✝ y x : ℝ\nhx : 0 ≤ x\n⊢ x ^ 2 / 2 = x ^ 2 / (1 + 1)\n[PROOFSTEP]\nring_nf\n[GOAL]\nx✝ y x : ℝ\nhx : 0 < x\n⊢ x + 1 < 1 + x + x ^ 2 / 2\n[PROOFSTEP]\nnlinarith\n[GOAL]\nx✝ y x : ℝ\nhx : 0 ≤ x\n⊢ x + 1 ≤ exp x\n[PROOFSTEP]\nrcases eq_or_lt_of_le hx with (rfl | h)\n[GOAL]\ncase inl\nx y : ℝ\nhx : 0 ≤ 0\n⊢ 0 + 1 ≤ exp 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nx✝ y x : ℝ\nhx : 0 ≤ x\nh : 0 < x\n⊢ x + 1 ≤ exp x\n[PROOFSTEP]\nexact (add_one_lt_exp_of_pos h).le\n[GOAL]\nx✝ y x : ℝ\nhx : 0 ≤ x\n⊢ 1 ≤ exp x\n[PROOFSTEP]\nlinarith [add_one_le_exp_of_nonneg hx]\n[GOAL]\nx✝ y x : ℝ\nh : x ≤ 0\n⊢ 0 < exp x\n[PROOFSTEP]\nrw [← neg_neg x, Real.exp_neg]\n[GOAL]\nx✝ y x : ℝ\nh : x ≤ 0\n⊢ 0 < (exp (-x))⁻¹\n[PROOFSTEP]\nexact inv_pos.2 (lt_of_lt_of_le zero_lt_one (one_le_exp (neg_nonneg.2 h)))\n[GOAL]\nx✝ y✝ x y : ℝ\nh : x < y\n⊢ exp x < exp y\n[PROOFSTEP]\nrw [← sub_add_cancel y x, Real.exp_add]\n[GOAL]\nx✝ y✝ x y : ℝ\nh : x < y\n⊢ exp x < exp (y - x) * exp x\n[PROOFSTEP]\nexact (lt_mul_iff_one_lt_left (exp_pos _)).2 (lt_of_lt_of_le (by linarith) (add_one_le_exp_of_nonneg (by linarith)))\n[GOAL]\nx✝ y✝ x y : ℝ\nh : x < y\n⊢ 1 < y - x + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nx✝ y✝ x y : ℝ\nh : x < y\n⊢ 0 ≤ y - x\n[PROOFSTEP]\nlinarith\n[GOAL]\nx✝ y x : ℝ\n⊢ 1 < exp x ↔ 0 < x\n[PROOFSTEP]\nrw [← exp_zero, exp_lt_exp]\n[GOAL]\nx✝ y x : ℝ\n⊢ exp x < 1 ↔ x < 0\n[PROOFSTEP]\nrw [← exp_zero, exp_lt_exp]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nm : ℕ\nhm : m ∈ filter (fun k => n ≤ k) (range j)\n⊢ n ≤ m\n[PROOFSTEP]\nsimp at hm \n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nm : ℕ\nhm : m < j ∧ n ≤ m\n⊢ n ≤ m\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nm : ℕ\nhm : m ∈ filter (fun k => n ≤ k) (range j)\n⊢ m < j\n[PROOFSTEP]\nsimp at hm \n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nm : ℕ\nhm : m < j ∧ n ≤ m\n⊢ m < j\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nm : ℕ\nhm : m ∈ filter (fun k => n ≤ k) (range j)\n⊢ 1 / ↑(Nat.factorial m) = 1 / ↑(Nat.factorial ((fun m x => m - n) m hm + n))\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nm : ℕ\nhm : m ∈ filter (fun k => n ≤ k) (range j)\n⊢ n ≤ m\n[PROOFSTEP]\nsimp at *\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nm : ℕ\nhm : m < j ∧ n ≤ m\n⊢ n ≤ m\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\na₁ a₂ : ℕ\nha₁ : a₁ ∈ filter (fun k => n ≤ k) (range j)\nha₂ : a₂ ∈ filter (fun k => n ≤ k) (range j)\nh : (fun m x => m - n) a₁ ha₁ = (fun m x => m - n) a₂ ha₂\n⊢ a₁ = a₂\n[PROOFSTEP]\nrwa [tsub_eq_iff_eq_add_of_le, tsub_add_eq_add_tsub, eq_comm, tsub_eq_iff_eq_add_of_le, add_left_inj, eq_comm] at h \n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\na₁ a₂ : ℕ\nha₁ : a₁ ∈ filter (fun k => n ≤ k) (range j)\nha₂ : a₂ ∈ filter (fun k => n ≤ k) (range j)\nh✝ : (fun m x => m - n) a₁ ha₁ = (fun m x => m - n) a₂ ha₂\nh : a₂ + n - n = a₁\n⊢ n ≤ a₂ + n\n[PROOFSTEP]\nsimp at *\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\na₁ a₂ : ℕ\nha₁ : a₁ ∈ filter (fun k => n ≤ k) (range j)\nha₂ : a₂ ∈ filter (fun k => n ≤ k) (range j)\nh✝ : (fun m x => m - n) a₁ ha₁ = (fun m x => m - n) a₂ ha₂\nh : a₁ = (fun m x => m - n) a₂ ha₂ + n\n⊢ n ≤ a₂\n[PROOFSTEP]\nsimp at *\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\na₁ a₂ : ℕ\nha₁ : a₁ ∈ filter (fun k => n ≤ k) (range j)\nha₂ : a₂ ∈ filter (fun k => n ≤ k) (range j)\nh : (fun m x => m - n) a₁ ha₁ = (fun m x => m - n) a₂ ha₂\n⊢ n ≤ a₁\n[PROOFSTEP]\nsimp at *\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\na₁ a₂ : ℕ\nha₁ : a₁ ∈ filter (fun k => n ≤ k) (range j)\nha₂ : a₂ ∈ filter (fun k => n ≤ k) (range j)\nh✝ : a₁ - n = a₂ - n\nh : a₁ = a₂ - n + n\n⊢ n ≤ a₂\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\na₁ a₂ : ℕ\nha₁ : a₁ ∈ filter (fun k => n ≤ k) (range j)\nha₂ : a₂ ∈ filter (fun k => n ≤ k) (range j)\nh : a₁ - n = a₂ - n\n⊢ n ≤ a₁\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nb : ℕ\nhb : b ∈ range (j - n)\n⊢ b = (fun m x => m - n) (b + n) (_ : b + n ∈ filter (fun k => n ≤ k) (range j))\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nb : ℕ\nhb : b ∈ range (j - n)\n⊢ b = b + n - n\n[PROOFSTEP]\nrw [add_tsub_cancel_right]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\n⊢ ∑ m in range (j - n), 1 / ↑(Nat.factorial (m + n)) ≤ ∑ m in range (j - n), (↑(Nat.factorial n) * ↑(Nat.succ n) ^ m)⁻¹\n[PROOFSTEP]\nsimp_rw [one_div]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\n⊢ ∑ x in range (j - n), (↑(Nat.factorial (x + n)))⁻¹ ≤ ∑ m in range (j - n), (↑(Nat.factorial n) * ↑(Nat.succ n) ^ m)⁻¹\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.h\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\ni✝ : ℕ\na✝ : i✝ ∈ range (j - n)\n⊢ ↑(Nat.factorial n) * ↑(Nat.succ n) ^ i✝ ≤ ↑(Nat.factorial (i✝ + n))\n[PROOFSTEP]\nrw [← Nat.cast_pow, ← Nat.cast_mul, Nat.cast_le, add_comm]\n[GOAL]\ncase h.h\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\ni✝ : ℕ\na✝ : i✝ ∈ range (j - n)\n⊢ Nat.factorial n * Nat.succ n ^ i✝ ≤ Nat.factorial (n + i✝)\n[PROOFSTEP]\nexact Nat.factorial_mul_pow_le_factorial\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\n⊢ ∑ m in range (j - n), (↑(Nat.factorial n) * ↑(Nat.succ n) ^ m)⁻¹ =\n    (↑(Nat.factorial n))⁻¹ * ∑ m in range (j - n), (↑(Nat.succ n))⁻¹ ^ m\n[PROOFSTEP]\nsimp [mul_inv, mul_sum.symm, sum_mul.symm, -Nat.factorial_succ, mul_comm, inv_pow]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\n⊢ (↑(Nat.factorial n))⁻¹ * ∑ m in range (j - n), (↑(Nat.succ n))⁻¹ ^ m =\n    (↑(Nat.succ n) - ↑(Nat.succ n) * (↑(Nat.succ n))⁻¹ ^ (j - n)) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\nhave h₁ : (n.succ : α) ≠ 1 := @Nat.cast_one α _ ▸ mt Nat.cast_inj.1 (mt Nat.succ.inj (pos_iff_ne_zero.1 hn))\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nh₁ : ↑(Nat.succ n) ≠ 1\n⊢ (↑(Nat.factorial n))⁻¹ * ∑ m in range (j - n), (↑(Nat.succ n))⁻¹ ^ m =\n    (↑(Nat.succ n) - ↑(Nat.succ n) * (↑(Nat.succ n))⁻¹ ^ (j - n)) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\nhave h₂ : (n.succ : α) ≠ 0 := by positivity\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nh₁ : ↑(Nat.succ n) ≠ 1\n⊢ ↑(Nat.succ n) ≠ 0\n[PROOFSTEP]\npositivity\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nh₁ : ↑(Nat.succ n) ≠ 1\nh₂ : ↑(Nat.succ n) ≠ 0\n⊢ (↑(Nat.factorial n))⁻¹ * ∑ m in range (j - n), (↑(Nat.succ n))⁻¹ ^ m =\n    (↑(Nat.succ n) - ↑(Nat.succ n) * (↑(Nat.succ n))⁻¹ ^ (j - n)) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\nhave h₃ : (n.factorial * n : α) ≠ 0 := by positivity\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nh₁ : ↑(Nat.succ n) ≠ 1\nh₂ : ↑(Nat.succ n) ≠ 0\n⊢ ↑(Nat.factorial n) * ↑n ≠ 0\n[PROOFSTEP]\npositivity\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nh₁ : ↑(Nat.succ n) ≠ 1\nh₂ : ↑(Nat.succ n) ≠ 0\nh₃ : ↑(Nat.factorial n) * ↑n ≠ 0\n⊢ (↑(Nat.factorial n))⁻¹ * ∑ m in range (j - n), (↑(Nat.succ n))⁻¹ ^ m =\n    (↑(Nat.succ n) - ↑(Nat.succ n) * (↑(Nat.succ n))⁻¹ ^ (j - n)) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\nhave h₄ : (n.succ - 1 : α) = n := by simp\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nh₁ : ↑(Nat.succ n) ≠ 1\nh₂ : ↑(Nat.succ n) ≠ 0\nh₃ : ↑(Nat.factorial n) * ↑n ≠ 0\n⊢ ↑(Nat.succ n) - 1 = ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\nh₁ : ↑(Nat.succ n) ≠ 1\nh₂ : ↑(Nat.succ n) ≠ 0\nh₃ : ↑(Nat.factorial n) * ↑n ≠ 0\nh₄ : ↑(Nat.succ n) - 1 = ↑n\n⊢ (↑(Nat.factorial n))⁻¹ * ∑ m in range (j - n), (↑(Nat.succ n))⁻¹ ^ m =\n    (↑(Nat.succ n) - ↑(Nat.succ n) * (↑(Nat.succ n))⁻¹ ^ (j - n)) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\nrw [geom_sum_inv h₁ h₂, eq_div_iff_mul_eq h₃, mul_comm _ (n.factorial * n : α), ← mul_assoc (n.factorial⁻¹ : α), ←\n  mul_inv_rev, h₄, ← mul_assoc (n.factorial * n : α), mul_comm (n : α) n.factorial, mul_inv_cancel h₃, one_mul,\n  mul_comm]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\n⊢ (↑(Nat.succ n) - ↑(Nat.succ n) * (↑(Nat.succ n))⁻¹ ^ (j - n)) / (↑(Nat.factorial n) * ↑n) ≤\n    ↑(Nat.succ n) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\n⊢ ↑(Nat.succ n) - ↑(Nat.succ n) * (↑(Nat.succ n))⁻¹ ^ (j - n) ≤ ↑(Nat.succ n)\n[PROOFSTEP]\napply sub_le_self\n[GOAL]\ncase h.a\nα : Type u_1\ninst✝ : LinearOrderedField α\nn j : ℕ\nhn : 0 < n\n⊢ 0 ≤ ↑(Nat.succ n) * (↑(Nat.succ n))⁻¹ ^ (j - n)\n[PROOFSTEP]\npositivity\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\n⊢ ↑abs (exp x - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) ≤ ↑abs x ^ n * (↑(Nat.succ n) * (↑(Nat.factorial n) * ↑n)⁻¹)\n[PROOFSTEP]\nrw [← lim_const (abv := Complex.abs) (∑ m in range n, _), exp, sub_eq_add_neg, ← lim_neg, lim_add, ← lim_abs]\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\n⊢ CauSeq.lim (cauSeqAbs (exp' x + -const (↑abs) (∑ m in range n, x ^ m / ↑(Nat.factorial m)))) ≤\n    ↑abs x ^ n * (↑(Nat.succ n) * (↑(Nat.factorial n) * ↑n)⁻¹)\n[PROOFSTEP]\nrefine' lim_le (CauSeq.le_of_exists ⟨n, fun j hj => _⟩)\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\n⊢ ↑(cauSeqAbs (exp' x + -const (↑abs) (∑ m in range n, x ^ m / ↑(Nat.factorial m)))) j ≤\n    ↑(const abs' (↑abs x ^ n * (↑(Nat.succ n) * (↑(Nat.factorial n) * ↑n)⁻¹))) j\n[PROOFSTEP]\nsimp_rw [← sub_eq_add_neg]\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\n⊢ ↑(cauSeqAbs (exp' x - const (↑abs) (∑ m in range n, x ^ m / ↑(Nat.factorial m)))) j ≤\n    ↑(const abs' (↑abs x ^ n * (↑(Nat.succ n) * (↑(Nat.factorial n) * ↑n)⁻¹))) j\n[PROOFSTEP]\nshow\n  abs ((∑ m in range j, x ^ m / m.factorial) - ∑ m in range n, x ^ m / m.factorial) ≤\n    abs x ^ n * ((n.succ : ℝ) * (n.factorial * n : ℝ)⁻¹)\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\n⊢ ↑abs (∑ m in range j, x ^ m / ↑(Nat.factorial m) - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) ≤\n    ↑abs x ^ n * (↑(Nat.succ n) * (↑(Nat.factorial n) * ↑n)⁻¹)\n[PROOFSTEP]\nrw [sum_range_sub_sum_range hj]\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\n⊢ ↑abs (∑ k in filter (fun k => n ≤ k) (range j), x ^ k / ↑(Nat.factorial k)) ≤\n    ↑abs x ^ n * (↑(Nat.succ n) * (↑(Nat.factorial n) * ↑n)⁻¹)\n[PROOFSTEP]\ncalc\n  abs (∑ m in (range j).filter fun k => n ≤ k, (x ^ m / m.factorial : ℂ)) =\n      abs (∑ m in (range j).filter fun k => n ≤ k, (x ^ n * (x ^ (m - n) / m.factorial) : ℂ)) :=\n    by\n    refine' congr_arg abs (sum_congr rfl fun m hm => _)\n    rw [mem_filter, mem_range] at hm \n    rw [← mul_div_assoc, ← pow_add, add_tsub_cancel_of_le hm.2]\n  _ ≤ ∑ m in filter (fun k => n ≤ k) (range j), abs (x ^ n * (x ^ (m - n) / m.factorial)) :=\n    (abv_sum_le_sum_abv (abv := Complex.abs) _ _)\n  _ ≤ ∑ m in filter (fun k => n ≤ k) (range j), abs x ^ n * (1 / m.factorial) :=\n    by\n    simp_rw [map_mul, map_pow, map_div₀, abs_cast_nat]\n    gcongr\n    · rw [abv_pow abs]\n      exact pow_le_one _ (abs.nonneg _) hx\n  _ = abs x ^ n * ∑ m in (range j).filter fun k => n ≤ k, (1 / m.factorial : ℝ) := by\n    simp [abs_mul, abv_pow abs, abs_div, mul_sum.symm]\n  _ ≤ abs x ^ n * (n.succ * (n.factorial * n : ℝ)⁻¹) := by\n    gcongr\n    exact sum_div_factorial_le _ _ hn\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\n⊢ ↑abs (∑ m in filter (fun k => n ≤ k) (range j), x ^ m / ↑(Nat.factorial m)) =\n    ↑abs (∑ m in filter (fun k => n ≤ k) (range j), x ^ n * (x ^ (m - n) / ↑(Nat.factorial m)))\n[PROOFSTEP]\nrefine' congr_arg abs (sum_congr rfl fun m hm => _)\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\nm : ℕ\nhm : m ∈ filter (fun k => n ≤ k) (range j)\n⊢ x ^ m / ↑(Nat.factorial m) = x ^ n * (x ^ (m - n) / ↑(Nat.factorial m))\n[PROOFSTEP]\nrw [mem_filter, mem_range] at hm \n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\nm : ℕ\nhm : m < j ∧ n ≤ m\n⊢ x ^ m / ↑(Nat.factorial m) = x ^ n * (x ^ (m - n) / ↑(Nat.factorial m))\n[PROOFSTEP]\nrw [← mul_div_assoc, ← pow_add, add_tsub_cancel_of_le hm.2]\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\n⊢ ∑ m in filter (fun k => n ≤ k) (range j), ↑abs (x ^ n * (x ^ (m - n) / ↑(Nat.factorial m))) ≤\n    ∑ m in filter (fun k => n ≤ k) (range j), ↑abs x ^ n * (1 / ↑(Nat.factorial m))\n[PROOFSTEP]\nsimp_rw [map_mul, map_pow, map_div₀, abs_cast_nat]\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\n⊢ ∑ x_1 in filter (fun k => n ≤ k) (range j), ↑abs x ^ n * (↑abs (x ^ (x_1 - n)) / ↑(Nat.factorial x_1)) ≤\n    ∑ x_1 in filter (fun k => n ≤ k) (range j), ↑abs x ^ n * (1 / ↑(Nat.factorial x_1))\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.h.h\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\ni✝ : ℕ\na✝ : i✝ ∈ filter (fun k => n ≤ k) (range j)\n⊢ ↑abs (x ^ (i✝ - n)) ≤ 1\n[PROOFSTEP]\nrw [abv_pow abs]\n[GOAL]\ncase h.h.h\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\ni✝ : ℕ\na✝ : i✝ ∈ filter (fun k => n ≤ k) (range j)\n⊢ ↑abs x ^ (i✝ - n) ≤ 1\n[PROOFSTEP]\nexact pow_le_one _ (abs.nonneg _) hx\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\n⊢ ∑ m in filter (fun k => n ≤ k) (range j), ↑abs x ^ n * (1 / ↑(Nat.factorial m)) =\n    ↑abs x ^ n * ∑ m in filter (fun k => n ≤ k) (range j), 1 / ↑(Nat.factorial m)\n[PROOFSTEP]\nsimp [abs_mul, abv_pow abs, abs_div, mul_sum.symm]\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\n⊢ ↑abs x ^ n * ∑ m in filter (fun k => n ≤ k) (range j), 1 / ↑(Nat.factorial m) ≤\n    ↑abs x ^ n * (↑(Nat.succ n) * (↑(Nat.factorial n) * ↑n)⁻¹)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nx : ℂ\nhx : ↑abs x ≤ 1\nn : ℕ\nhn : 0 < n\nj : ℕ\nhj : j ≥ n\n⊢ ∑ m in filter (fun k => n ≤ k) (range j), 1 / ↑(Nat.factorial m) ≤ ↑(Nat.succ n) * (↑(Nat.factorial n) * ↑n)⁻¹\n[PROOFSTEP]\nexact sum_div_factorial_le _ _ hn\n[GOAL]\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\n⊢ ↑abs (exp x - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) ≤ ↑abs x ^ n / ↑(Nat.factorial n) * 2\n[PROOFSTEP]\nrw [← lim_const (abv := Complex.abs) (∑ m in range n, _), exp, sub_eq_add_neg, ← lim_neg, lim_add, ← lim_abs]\n[GOAL]\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\n⊢ CauSeq.lim (cauSeqAbs (exp' x + -const (↑abs) (∑ m in range n, x ^ m / ↑(Nat.factorial m)))) ≤\n    ↑abs x ^ n / ↑(Nat.factorial n) * 2\n[PROOFSTEP]\nrefine' lim_le (CauSeq.le_of_exists ⟨n, fun j hj => _⟩)\n[GOAL]\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj : j ≥ n\n⊢ ↑(cauSeqAbs (exp' x + -const (↑abs) (∑ m in range n, x ^ m / ↑(Nat.factorial m)))) j ≤\n    ↑(const abs' (↑abs x ^ n / ↑(Nat.factorial n) * 2)) j\n[PROOFSTEP]\nsimp_rw [← sub_eq_add_neg]\n[GOAL]\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj : j ≥ n\n⊢ ↑(cauSeqAbs (exp' x - const (↑abs) (∑ m in range n, x ^ m / ↑(Nat.factorial m)))) j ≤\n    ↑(const abs' (↑abs x ^ n / ↑(Nat.factorial n) * 2)) j\n[PROOFSTEP]\nshow abs ((∑ m in range j, x ^ m / m.factorial) - ∑ m in range n, x ^ m / m.factorial) ≤ abs x ^ n / n.factorial * 2\n[GOAL]\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj : j ≥ n\n⊢ ↑abs (∑ m in range j, x ^ m / ↑(Nat.factorial m) - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) ≤\n    ↑abs x ^ n / ↑(Nat.factorial n) * 2\n[PROOFSTEP]\nlet k := j - n\n[GOAL]\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj : j ≥ n\nk : ℕ := j - n\n⊢ ↑abs (∑ m in range j, x ^ m / ↑(Nat.factorial m) - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) ≤\n    ↑abs x ^ n / ↑(Nat.factorial n) * 2\n[PROOFSTEP]\nhave hj : j = n + k := (add_tsub_cancel_of_le hj).symm\n[GOAL]\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ ↑abs (∑ m in range j, x ^ m / ↑(Nat.factorial m) - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) ≤\n    ↑abs x ^ n / ↑(Nat.factorial n) * 2\n[PROOFSTEP]\nrw [hj, sum_range_add_sub_sum_range]\n[GOAL]\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ ↑abs (∑ k in range k, x ^ (n + k) / ↑(Nat.factorial (n + k))) ≤ ↑abs x ^ n / ↑(Nat.factorial n) * 2\n[PROOFSTEP]\ncalc\n  abs (∑ i : ℕ in range k, x ^ (n + i) / ((n + i).factorial : ℂ)) ≤\n      ∑ i : ℕ in range k, abs (x ^ (n + i) / ((n + i).factorial : ℂ)) :=\n    abv_sum_le_sum_abv _ _\n  _ ≤ ∑ i : ℕ in range k, abs x ^ (n + i) / (n + i).factorial := by simp [Complex.abs_cast_nat, map_div₀, abv_pow abs]\n  _ ≤ ∑ i : ℕ in range k, abs x ^ (n + i) / ((n.factorial : ℝ) * (n.succ : ℝ) ^ i) := ?_\n  _ = ∑ i : ℕ in range k, abs x ^ n / n.factorial * (abs x ^ i / (n.succ : ℝ) ^ i) := ?_\n  _ ≤ abs x ^ n / ↑n.factorial * 2 := ?_\n[GOAL]\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ ∑ i in range k, ↑abs (x ^ (n + i) / ↑(Nat.factorial (n + i))) ≤\n    ∑ i in range k, ↑abs x ^ (n + i) / ↑(Nat.factorial (n + i))\n[PROOFSTEP]\nsimp [Complex.abs_cast_nat, map_div₀, abv_pow abs]\n[GOAL]\ncase calc_1\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ ∑ i in range k, ↑abs x ^ (n + i) / ↑(Nat.factorial (n + i)) ≤\n    ∑ i in range k, ↑abs x ^ (n + i) / (↑(Nat.factorial n) * ↑(Nat.succ n) ^ i)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase calc_1.h.h\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\ni✝ : ℕ\na✝ : i✝ ∈ range k\n⊢ ↑(Nat.factorial n) * ↑(Nat.succ n) ^ i✝ ≤ ↑(Nat.factorial (n + i✝))\n[PROOFSTEP]\nexact_mod_cast Nat.factorial_mul_pow_le_factorial\n[GOAL]\ncase calc_2\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ ∑ i in range k, ↑abs x ^ (n + i) / (↑(Nat.factorial n) * ↑(Nat.succ n) ^ i) =\n    ∑ i in range k, ↑abs x ^ n / ↑(Nat.factorial n) * (↑abs x ^ i / ↑(Nat.succ n) ^ i)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun _ _ => _\n[GOAL]\ncase calc_2\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\nx✝¹ : ℕ\nx✝ : x✝¹ ∈ range k\n⊢ ↑abs x ^ (n + x✝¹) / (↑(Nat.factorial n) * ↑(Nat.succ n) ^ x✝¹) =\n    ↑abs x ^ n / ↑(Nat.factorial n) * (↑abs x ^ x✝¹ / ↑(Nat.succ n) ^ x✝¹)\n[PROOFSTEP]\nsimp only [pow_add, div_eq_inv_mul, mul_inv, mul_left_comm, mul_assoc]\n[GOAL]\ncase calc_3\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ ∑ i in range k, ↑abs x ^ n / ↑(Nat.factorial n) * (↑abs x ^ i / ↑(Nat.succ n) ^ i) ≤\n    ↑abs x ^ n / ↑(Nat.factorial n) * 2\n[PROOFSTEP]\nrw [← mul_sum]\n[GOAL]\ncase calc_3\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ ↑abs x ^ n / ↑(Nat.factorial n) * ∑ x_1 in range k, ↑abs x ^ x_1 / ↑(Nat.succ n) ^ x_1 ≤\n    ↑abs x ^ n / ↑(Nat.factorial n) * 2\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase calc_3.h\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ ∑ x_1 in range k, ↑abs x ^ x_1 / ↑(Nat.succ n) ^ x_1 ≤ 2\n[PROOFSTEP]\nsimp_rw [← div_pow]\n[GOAL]\ncase calc_3.h\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ ∑ x_1 in range (j - n), (↑abs x / ↑(Nat.succ n)) ^ x_1 ≤ 2\n[PROOFSTEP]\nrw [geom_sum_eq, div_le_iff_of_neg]\n[GOAL]\ncase calc_3.h\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ 2 * (↑abs x / ↑(Nat.succ n) - 1) ≤ (↑abs x / ↑(Nat.succ n)) ^ (j - n) - 1\n[PROOFSTEP]\ntrans (-1 : ℝ)\n[GOAL]\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ 2 * (↑abs x / ↑(Nat.succ n) - 1) ≤ -1\n[PROOFSTEP]\nlinarith\n[GOAL]\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ -1 ≤ (↑abs x / ↑(Nat.succ n)) ^ (j - n) - 1\n[PROOFSTEP]\nsimp only [neg_le_sub_iff_le_add, div_pow, Nat.cast_succ, le_add_iff_nonneg_left]\n[GOAL]\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ 0 ≤ ↑abs x ^ (j - n) / (↑n + 1) ^ (j - n)\n[PROOFSTEP]\npositivity\n[GOAL]\ncase calc_3.h\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ ↑abs x / ↑(Nat.succ n) - 1 < 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase calc_3.h.h\nx : ℂ\nn : ℕ\nhx : ↑abs x / ↑(Nat.succ n) ≤ 1 / 2\nj : ℕ\nhj✝ : j ≥ n\nk : ℕ := j - n\nhj : j = n + k\n⊢ ↑abs x / ↑(Nat.succ n) ≠ 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\n⊢ ↑abs (exp x - 1) = ↑abs (exp x - ∑ m in range 1, x ^ m / ↑(Nat.factorial m))\n[PROOFSTEP]\nsimp [sum_range_succ]\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\n⊢ 0 < 1\n[PROOFSTEP]\ndecide\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\n⊢ ↑abs x ^ 1 * (↑(Nat.succ 1) * (↑(Nat.factorial 1) * ↑1)⁻¹) = 2 * ↑abs x\n[PROOFSTEP]\nsimp [two_mul, mul_two, mul_add, mul_comm, add_mul]\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\n⊢ ↑abs (exp x - 1 - x) = ↑abs (exp x - ∑ m in range 2, x ^ m / ↑(Nat.factorial m))\n[PROOFSTEP]\nsimp [sub_eq_add_neg, sum_range_succ_comm, add_assoc]\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\n⊢ ↑abs x ^ 2 * (↑(Nat.succ 2) * (↑(Nat.factorial 2) * ↑2)⁻¹) ≤ ↑abs x ^ 2 * 1\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nx : ℂ\nhx : ↑abs x ≤ 1\n⊢ ↑(Nat.succ 2) * (↑(Nat.factorial 2) * ↑2)⁻¹ ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx : ℂ\nhx : ↑abs x ≤ 1\n⊢ ↑abs x ^ 2 * 1 = ↑abs x ^ 2\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\nn : ℕ\nhn : 0 < n\n⊢ abs' (exp x - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) ≤ abs' x ^ n * (↑(Nat.succ n) / (↑(Nat.factorial n) * ↑n))\n[PROOFSTEP]\nhave hxc : Complex.abs x ≤ 1 := by exact_mod_cast hx\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\nn : ℕ\nhn : 0 < n\n⊢ ↑Complex.abs ↑x ≤ 1\n[PROOFSTEP]\nexact_mod_cast hx\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\nn : ℕ\nhn : 0 < n\nhxc : ↑Complex.abs ↑x ≤ 1\n⊢ abs' (exp x - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) ≤ abs' x ^ n * (↑(Nat.succ n) / (↑(Nat.factorial n) * ↑n))\n[PROOFSTEP]\nconvert exp_bound hxc hn using 2\n[GOAL]\ncase h.e'_3\nx : ℝ\nhx : abs' x ≤ 1\nn : ℕ\nhn : 0 < n\nhxc : ↑Complex.abs ↑x ≤ 1\n⊢ abs' (exp x - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) =\n    ↑Complex.abs (Complex.exp ↑x - ∑ m in range n, ↑x ^ m / ↑(Nat.factorial m))\n[PROOFSTEP]\nsimp only [← abs_ofReal, ← ofReal_sub, ← ofReal_exp, ← ofReal_sum, ← ofReal_pow, ← ofReal_div, ← ofReal_nat_cast]\n[GOAL]\ncase h.e'_4.h.e'_5\nx : ℝ\nhx : abs' x ≤ 1\nn : ℕ\nhn : 0 < n\nhxc : ↑Complex.abs ↑x ≤ 1\n⊢ abs' x ^ n = ↑Complex.abs ↑x ^ n\n[PROOFSTEP]\nsimp only [← abs_ofReal, ← ofReal_sub, ← ofReal_exp, ← ofReal_sum, ← ofReal_pow, ← ofReal_div, ← ofReal_nat_cast]\n[GOAL]\nx : ℝ\nh1 : 0 ≤ x\nh2 : x ≤ 1\nn : ℕ\nhn : 0 < n\n⊢ exp x ≤ ∑ m in range n, x ^ m / ↑(Nat.factorial m) + x ^ n * (↑n + 1) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\nhave h3 : |x| = x := by simpa\n[GOAL]\nx : ℝ\nh1 : 0 ≤ x\nh2 : x ≤ 1\nn : ℕ\nhn : 0 < n\n⊢ abs' x = x\n[PROOFSTEP]\nsimpa\n[GOAL]\nx : ℝ\nh1 : 0 ≤ x\nh2 : x ≤ 1\nn : ℕ\nhn : 0 < n\nh3 : abs' x = x\n⊢ exp x ≤ ∑ m in range n, x ^ m / ↑(Nat.factorial m) + x ^ n * (↑n + 1) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\nhave h4 : |x| ≤ 1 := by rwa [h3]\n[GOAL]\nx : ℝ\nh1 : 0 ≤ x\nh2 : x ≤ 1\nn : ℕ\nhn : 0 < n\nh3 : abs' x = x\n⊢ abs' x ≤ 1\n[PROOFSTEP]\nrwa [h3]\n[GOAL]\nx : ℝ\nh1 : 0 ≤ x\nh2 : x ≤ 1\nn : ℕ\nhn : 0 < n\nh3 : abs' x = x\nh4 : abs' x ≤ 1\n⊢ exp x ≤ ∑ m in range n, x ^ m / ↑(Nat.factorial m) + x ^ n * (↑n + 1) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\nhave h' := Real.exp_bound h4 hn\n[GOAL]\nx : ℝ\nh1 : 0 ≤ x\nh2 : x ≤ 1\nn : ℕ\nhn : 0 < n\nh3 : abs' x = x\nh4 : abs' x ≤ 1\nh' :\n  abs' (exp x - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) ≤ abs' x ^ n * (↑(Nat.succ n) / (↑(Nat.factorial n) * ↑n))\n⊢ exp x ≤ ∑ m in range n, x ^ m / ↑(Nat.factorial m) + x ^ n * (↑n + 1) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\nrw [h3] at h' \n[GOAL]\nx : ℝ\nh1 : 0 ≤ x\nh2 : x ≤ 1\nn : ℕ\nhn : 0 < n\nh3 : abs' x = x\nh4 : abs' x ≤ 1\nh' : abs' (exp x - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) ≤ x ^ n * (↑(Nat.succ n) / (↑(Nat.factorial n) * ↑n))\n⊢ exp x ≤ ∑ m in range n, x ^ m / ↑(Nat.factorial m) + x ^ n * (↑n + 1) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\nhave h'' := (abs_sub_le_iff.1 h').1\n[GOAL]\nx : ℝ\nh1 : 0 ≤ x\nh2 : x ≤ 1\nn : ℕ\nhn : 0 < n\nh3 : abs' x = x\nh4 : abs' x ≤ 1\nh' : abs' (exp x - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) ≤ x ^ n * (↑(Nat.succ n) / (↑(Nat.factorial n) * ↑n))\nh'' : exp x - ∑ m in range n, x ^ m / ↑(Nat.factorial m) ≤ x ^ n * (↑(Nat.succ n) / (↑(Nat.factorial n) * ↑n))\n⊢ exp x ≤ ∑ m in range n, x ^ m / ↑(Nat.factorial m) + x ^ n * (↑n + 1) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\nhave t := sub_le_iff_le_add'.1 h''\n[GOAL]\nx : ℝ\nh1 : 0 ≤ x\nh2 : x ≤ 1\nn : ℕ\nhn : 0 < n\nh3 : abs' x = x\nh4 : abs' x ≤ 1\nh' : abs' (exp x - ∑ m in range n, x ^ m / ↑(Nat.factorial m)) ≤ x ^ n * (↑(Nat.succ n) / (↑(Nat.factorial n) * ↑n))\nh'' : exp x - ∑ m in range n, x ^ m / ↑(Nat.factorial m) ≤ x ^ n * (↑(Nat.succ n) / (↑(Nat.factorial n) * ↑n))\nt : exp x ≤ ∑ m in range n, x ^ m / ↑(Nat.factorial m) + x ^ n * (↑(Nat.succ n) / (↑(Nat.factorial n) * ↑n))\n⊢ exp x ≤ ∑ m in range n, x ^ m / ↑(Nat.factorial m) + x ^ n * (↑n + 1) / (↑(Nat.factorial n) * ↑n)\n[PROOFSTEP]\nsimpa [mul_div_assoc] using t\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ abs' (exp x - 1) ≤ 2 * abs' x\n[PROOFSTEP]\nhave : abs' x ≤ 1 := by exact_mod_cast hx\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ abs' x ≤ 1\n[PROOFSTEP]\nexact_mod_cast hx\n[GOAL]\nx : ℝ\nhx this : abs' x ≤ 1\n⊢ abs' (exp x - 1) ≤ 2 * abs' x\n[PROOFSTEP]\nhave := Complex.abs_exp_sub_one_le (x := x) (by simpa using this)\n[GOAL]\nx : ℝ\nhx this : abs' x ≤ 1\n⊢ ↑Complex.abs ↑x ≤ 1\n[PROOFSTEP]\nsimpa using this\n[GOAL]\nx : ℝ\nhx this✝ : abs' x ≤ 1\nthis : ↑Complex.abs (Complex.exp ↑x - 1) ≤ 2 * ↑Complex.abs ↑x\n⊢ abs' (exp x - 1) ≤ 2 * abs' x\n[PROOFSTEP]\nrw [← ofReal_exp, ← ofReal_one, ← ofReal_sub, abs_ofReal, abs_ofReal] at this \n[GOAL]\nx : ℝ\nhx this✝ : abs' x ≤ 1\nthis : abs' (exp x - 1) ≤ 2 * abs' x\n⊢ abs' (exp x - 1) ≤ 2 * abs' x\n[PROOFSTEP]\nexact this\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ abs' (exp x - 1 - x) ≤ x ^ 2\n[PROOFSTEP]\nrw [← _root_.sq_abs]\n  --Porting note: was\n    --exact_mod_cast Complex.abs_exp_sub_one_sub_id_le this\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ abs' (exp x - 1 - x) ≤ abs' x ^ 2\n[PROOFSTEP]\nhave : Complex.abs x ≤ 1 := by exact_mod_cast hx\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs ↑x ≤ 1\n[PROOFSTEP]\nexact_mod_cast hx\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\nthis : ↑Complex.abs ↑x ≤ 1\n⊢ abs' (exp x - 1 - x) ≤ abs' x ^ 2\n[PROOFSTEP]\nhave := Complex.abs_exp_sub_one_sub_id_le this\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\nthis✝ : ↑Complex.abs ↑x ≤ 1\nthis : ↑Complex.abs (Complex.exp ↑x - 1 - ↑x) ≤ ↑Complex.abs ↑x ^ 2\n⊢ abs' (exp x - 1 - x) ≤ abs' x ^ 2\n[PROOFSTEP]\nrw [← ofReal_one, ← ofReal_exp, ← ofReal_sub, ← ofReal_sub, abs_ofReal, abs_ofReal] at this \n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\nthis✝ : ↑Complex.abs ↑x ≤ 1\nthis : abs' (exp x - 1 - x) ≤ abs' x ^ 2\n⊢ abs' (exp x - 1 - x) ≤ abs' x ^ 2\n[PROOFSTEP]\nexact this\n[GOAL]\nx r : ℝ\n⊢ expNear 0 x r = r\n[PROOFSTEP]\nsimp [expNear]\n[GOAL]\nn : ℕ\nx r : ℝ\n⊢ expNear (n + 1) x r = expNear n x (1 + x / (↑n + 1) * r)\n[PROOFSTEP]\nsimp [expNear, range_succ, mul_add, add_left_comm, add_assoc, pow_succ, div_eq_mul_inv, mul_inv]\n[GOAL]\nn : ℕ\nx r : ℝ\n⊢ x * x ^ n * ((↑(Nat.factorial n))⁻¹ * (↑n + 1)⁻¹) * r = x ^ n * (↑(Nat.factorial n))⁻¹ * (x * (↑n + 1)⁻¹ * r)\n[PROOFSTEP]\nac_rfl\n[GOAL]\nn : ℕ\nx r₁ r₂ : ℝ\n⊢ expNear n x r₁ - expNear n x r₂ = x ^ n / ↑(Nat.factorial n) * (r₁ - r₂)\n[PROOFSTEP]\nsimp [expNear, mul_sub]\n[GOAL]\nn m : ℕ\nx : ℝ\ne₁ : n + 1 = m\nh : abs' x ≤ 1\n⊢ abs' (exp x - expNear m x 0) ≤ abs' x ^ m / ↑(Nat.factorial m) * ((↑m + 1) / ↑m)\n[PROOFSTEP]\nsimp [expNear]\n[GOAL]\nn m : ℕ\nx : ℝ\ne₁ : n + 1 = m\nh : abs' x ≤ 1\n⊢ abs' (exp x - ∑ m in range m, x ^ m / ↑(Nat.factorial m)) ≤ abs' x ^ m / ↑(Nat.factorial m) * ((↑m + 1) / ↑m)\n[PROOFSTEP]\nconvert exp_bound (n := m) h ?_ using 1\n[GOAL]\ncase h.e'_4\nn m : ℕ\nx : ℝ\ne₁ : n + 1 = m\nh : abs' x ≤ 1\n⊢ abs' x ^ m / ↑(Nat.factorial m) * ((↑m + 1) / ↑m) = abs' x ^ m * (↑(Nat.succ m) / (↑(Nat.factorial m) * ↑m))\nn m : ℕ x : ℝ e₁ : n + 1 = m h : abs' x ≤ 1 ⊢ 0 < m\n[PROOFSTEP]\nfield_simp [mul_comm]\n[GOAL]\nn m : ℕ\nx : ℝ\ne₁ : n + 1 = m\nh : abs' x ≤ 1\n⊢ 0 < m\n[PROOFSTEP]\nlinarith\n[GOAL]\nn : ℕ\nx a₁ b₁ : ℝ\nm : ℕ\ne₁ : n + 1 = m\na₂ b₂ : ℝ\ne : abs' (1 + x / ↑m * a₂ - a₁) ≤ b₁ - abs' x / ↑m * b₂\nh : abs' (exp x - expNear m x a₂) ≤ abs' x ^ m / ↑(Nat.factorial m) * b₂\n⊢ abs' (exp x - expNear n x a₁) ≤ abs' x ^ n / ↑(Nat.factorial n) * b₁\n[PROOFSTEP]\nrefine' (abs_sub_le _ _ _).trans ((add_le_add_right h _).trans _)\n[GOAL]\nn : ℕ\nx a₁ b₁ : ℝ\nm : ℕ\ne₁ : n + 1 = m\na₂ b₂ : ℝ\ne : abs' (1 + x / ↑m * a₂ - a₁) ≤ b₁ - abs' x / ↑m * b₂\nh : abs' (exp x - expNear m x a₂) ≤ abs' x ^ m / ↑(Nat.factorial m) * b₂\n⊢ abs' x ^ m / ↑(Nat.factorial m) * b₂ + abs' (expNear m x a₂ - expNear n x a₁) ≤ abs' x ^ n / ↑(Nat.factorial n) * b₁\n[PROOFSTEP]\nsubst e₁\n[GOAL]\nn : ℕ\nx a₁ b₁ a₂ b₂ : ℝ\ne : abs' (1 + x / ↑(n + 1) * a₂ - a₁) ≤ b₁ - abs' x / ↑(n + 1) * b₂\nh : abs' (exp x - expNear (n + 1) x a₂) ≤ abs' x ^ (n + 1) / ↑(Nat.factorial (n + 1)) * b₂\n⊢ abs' x ^ (n + 1) / ↑(Nat.factorial (n + 1)) * b₂ + abs' (expNear (n + 1) x a₂ - expNear n x a₁) ≤\n    abs' x ^ n / ↑(Nat.factorial n) * b₁\n[PROOFSTEP]\nrw [expNear_succ, expNear_sub, abs_mul]\n[GOAL]\nn : ℕ\nx a₁ b₁ a₂ b₂ : ℝ\ne : abs' (1 + x / ↑(n + 1) * a₂ - a₁) ≤ b₁ - abs' x / ↑(n + 1) * b₂\nh : abs' (exp x - expNear (n + 1) x a₂) ≤ abs' x ^ (n + 1) / ↑(Nat.factorial (n + 1)) * b₂\n⊢ abs' x ^ (n + 1) / ↑(Nat.factorial (n + 1)) * b₂ +\n      abs' (x ^ n / ↑(Nat.factorial n)) * abs' (1 + x / (↑n + 1) * a₂ - a₁) ≤\n    abs' x ^ n / ↑(Nat.factorial n) * b₁\n[PROOFSTEP]\nconvert mul_le_mul_of_nonneg_left (a := abs' x ^ n / ↑(Nat.factorial n)) (le_sub_iff_add_le'.1 e) ?_ using 1\n[GOAL]\ncase h.e'_3\nn : ℕ\nx a₁ b₁ a₂ b₂ : ℝ\ne : abs' (1 + x / ↑(n + 1) * a₂ - a₁) ≤ b₁ - abs' x / ↑(n + 1) * b₂\nh : abs' (exp x - expNear (n + 1) x a₂) ≤ abs' x ^ (n + 1) / ↑(Nat.factorial (n + 1)) * b₂\n⊢ abs' x ^ (n + 1) / ↑(Nat.factorial (n + 1)) * b₂ +\n      abs' (x ^ n / ↑(Nat.factorial n)) * abs' (1 + x / (↑n + 1) * a₂ - a₁) =\n    abs' x ^ n / ↑(Nat.factorial n) * (abs' x / ↑(n + 1) * b₂ + abs' (1 + x / ↑(n + 1) * a₂ - a₁))\n[PROOFSTEP]\nsimp [mul_add, pow_succ', div_eq_mul_inv, abs_mul, abs_inv, ← pow_abs, mul_inv]\n[GOAL]\ncase h.e'_3\nn : ℕ\nx a₁ b₁ a₂ b₂ : ℝ\ne : abs' (1 + x / ↑(n + 1) * a₂ - a₁) ≤ b₁ - abs' x / ↑(n + 1) * b₂\nh : abs' (exp x - expNear (n + 1) x a₂) ≤ abs' x ^ (n + 1) / ↑(Nat.factorial (n + 1)) * b₂\n⊢ abs' x ^ n * abs' x * ((↑(Nat.factorial n))⁻¹ * (↑n + 1)⁻¹) * b₂ =\n    abs' x ^ n * (↑(Nat.factorial n))⁻¹ * (abs' x * (↑n + 1)⁻¹ * b₂)\n[PROOFSTEP]\nac_rfl\n[GOAL]\nn : ℕ\nx a₁ b₁ a₂ b₂ : ℝ\ne : abs' (1 + x / ↑(n + 1) * a₂ - a₁) ≤ b₁ - abs' x / ↑(n + 1) * b₂\nh : abs' (exp x - expNear (n + 1) x a₂) ≤ abs' x ^ (n + 1) / ↑(Nat.factorial (n + 1)) * b₂\n⊢ 0 ≤ abs' x ^ n / ↑(Nat.factorial n)\n[PROOFSTEP]\nsimp [div_nonneg, abs_nonneg]\n[GOAL]\nn : ℕ\nx a b : ℝ\nm : ℕ\ne₁ : n + 1 = m\nrm : ℝ\ner : ↑m = rm\nh : abs' x ≤ 1\ne : abs' (1 - a) ≤ b - abs' x / rm * ((rm + 1) / rm)\n⊢ abs' (exp x - expNear n x a) ≤ abs' x ^ n / ↑(Nat.factorial n) * b\n[PROOFSTEP]\nsubst er\n[GOAL]\nn : ℕ\nx a b : ℝ\nm : ℕ\ne₁ : n + 1 = m\nh : abs' x ≤ 1\ne : abs' (1 - a) ≤ b - abs' x / ↑m * ((↑m + 1) / ↑m)\n⊢ abs' (exp x - expNear n x a) ≤ abs' x ^ n / ↑(Nat.factorial n) * b\n[PROOFSTEP]\nexact exp_approx_succ _ e₁ _ _ (by simpa using e) (exp_approx_end _ _ _ e₁ h)\n[GOAL]\nn : ℕ\nx a b : ℝ\nm : ℕ\ne₁ : n + 1 = m\nh : abs' x ≤ 1\ne : abs' (1 - a) ≤ b - abs' x / ↑m * ((↑m + 1) / ↑m)\n⊢ abs' (1 + x / ↑m * 0 - a) ≤ b - abs' x / ↑m * ((↑m + 1) / ↑m)\n[PROOFSTEP]\nsimpa using e\n[GOAL]\nn : ℕ\na₁ b₁ : ℝ\nm : ℕ\nen : n + 1 = m\nrm : ℝ\ner : ↑m = rm\nh : abs' (exp 1 - expNear m 1 ((a₁ - 1) * rm)) ≤ abs' 1 ^ m / ↑(Nat.factorial m) * (b₁ * rm)\n⊢ abs' (exp 1 - expNear n 1 a₁) ≤ abs' 1 ^ n / ↑(Nat.factorial n) * b₁\n[PROOFSTEP]\nsubst er\n[GOAL]\nn : ℕ\na₁ b₁ : ℝ\nm : ℕ\nen : n + 1 = m\nh : abs' (exp 1 - expNear m 1 ((a₁ - 1) * ↑m)) ≤ abs' 1 ^ m / ↑(Nat.factorial m) * (b₁ * ↑m)\n⊢ abs' (exp 1 - expNear n 1 a₁) ≤ abs' 1 ^ n / ↑(Nat.factorial n) * b₁\n[PROOFSTEP]\nrefine' exp_approx_succ _ en _ _ _ h\n[GOAL]\nn : ℕ\na₁ b₁ : ℝ\nm : ℕ\nen : n + 1 = m\nh : abs' (exp 1 - expNear m 1 ((a₁ - 1) * ↑m)) ≤ abs' 1 ^ m / ↑(Nat.factorial m) * (b₁ * ↑m)\n⊢ abs' (1 + 1 / ↑m * ((a₁ - 1) * ↑m) - a₁) ≤ b₁ - abs' 1 / ↑m * (b₁ * ↑m)\n[PROOFSTEP]\nfield_simp [show (m : ℝ) ≠ 0 by norm_cast; linarith]\n[GOAL]\nn : ℕ\na₁ b₁ : ℝ\nm : ℕ\nen : n + 1 = m\nh : abs' (exp 1 - expNear m 1 ((a₁ - 1) * ↑m)) ≤ abs' 1 ^ m / ↑(Nat.factorial m) * (b₁ * ↑m)\n⊢ ↑m ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn : ℕ\na₁ b₁ : ℝ\nm : ℕ\nen : n + 1 = m\nh : abs' (exp 1 - expNear m 1 ((a₁ - 1) * ↑m)) ≤ abs' 1 ^ m / ↑(Nat.factorial m) * (b₁ * ↑m)\n⊢ ¬m = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nx a b : ℝ\nh : abs' (exp x - expNear 0 x a) ≤ abs' x ^ 0 / ↑(Nat.factorial 0) * b\n⊢ abs' (exp x - a) ≤ b\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ abs' (cos x - (1 - x ^ 2 / 2)) = ↑Complex.abs (Complex.cos ↑x - (1 - ↑x ^ 2 / 2))\n[PROOFSTEP]\nrw [← abs_ofReal]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs ↑(cos x - (1 - x ^ 2 / 2)) = ↑Complex.abs (Complex.cos ↑x - (1 - ↑x ^ 2 / 2))\n[PROOFSTEP]\nsimp\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (Complex.cos ↑x - (1 - ↑x ^ 2 / 2)) =\n    ↑Complex.abs ((Complex.exp (↑x * I) + Complex.exp (-↑x * I) - (2 - ↑x ^ 2)) / 2)\n[PROOFSTEP]\nsimp [Complex.cos, sub_div, add_div, neg_div, div_self (two_ne_zero' ℂ)]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ Complex.exp (↑x * I) + Complex.exp (-↑x * I) - (2 - ↑x ^ 2) =\n    Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m) +\n      (Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m))\n[PROOFSTEP]\nsimp only [sum_range_succ]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ Complex.exp (↑x * I) + Complex.exp (-↑x * I) - (2 - ↑x ^ 2) =\n    Complex.exp (↑x * I) -\n        (∑ m in range 0, (↑x * I) ^ m / ↑(Nat.factorial m) + (↑x * I) ^ 0 / ↑(Nat.factorial 0) +\n              (↑x * I) ^ 1 / ↑(Nat.factorial 1) +\n            (↑x * I) ^ 2 / ↑(Nat.factorial 2) +\n          (↑x * I) ^ 3 / ↑(Nat.factorial 3)) +\n      (Complex.exp (-↑x * I) -\n        (∑ m in range 0, (-↑x * I) ^ m / ↑(Nat.factorial m) + (-↑x * I) ^ 0 / ↑(Nat.factorial 0) +\n              (-↑x * I) ^ 1 / ↑(Nat.factorial 1) +\n            (-↑x * I) ^ 2 / ↑(Nat.factorial 2) +\n          (-↑x * I) ^ 3 / ↑(Nat.factorial 3)))\n[PROOFSTEP]\nsimp [pow_succ]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ Complex.exp (↑x * I) + Complex.exp (-(↑x * I)) - (2 - ↑x * ↑x) =\n    Complex.exp (↑x * I) -\n        (1 + ↑x * I + ↑x * I * (↑x * I) / (1 + 1) + ↑x * I * (↑x * I * (↑x * I)) / ((2 + 1) * (1 + 1))) +\n      (Complex.exp (-(↑x * I)) -\n        (1 + -(↑x * I) + ↑x * I * (↑x * I) / (1 + 1) + -(↑x * I * (↑x * I * (↑x * I))) / ((2 + 1) * (1 + 1))))\n[PROOFSTEP]\napply Complex.ext\n[GOAL]\ncase a\nx : ℝ\nhx : abs' x ≤ 1\n⊢ (Complex.exp (↑x * I) + Complex.exp (-(↑x * I)) - (2 - ↑x * ↑x)).re =\n    (Complex.exp (↑x * I) -\n          (1 + ↑x * I + ↑x * I * (↑x * I) / (1 + 1) + ↑x * I * (↑x * I * (↑x * I)) / ((2 + 1) * (1 + 1))) +\n        (Complex.exp (-(↑x * I)) -\n          (1 + -(↑x * I) + ↑x * I * (↑x * I) / (1 + 1) + -(↑x * I * (↑x * I * (↑x * I))) / ((2 + 1) * (1 + 1))))).re\n[PROOFSTEP]\nsimp [div_eq_mul_inv, normSq]\n[GOAL]\ncase a\nx : ℝ\nhx : abs' x ≤ 1\n⊢ (Complex.exp (↑x * I) + Complex.exp (-(↑x * I)) - (2 - ↑x * ↑x)).im =\n    (Complex.exp (↑x * I) -\n          (1 + ↑x * I + ↑x * I * (↑x * I) / (1 + 1) + ↑x * I * (↑x * I * (↑x * I)) / ((2 + 1) * (1 + 1))) +\n        (Complex.exp (-(↑x * I)) -\n          (1 + -(↑x * I) + ↑x * I * (↑x * I) / (1 + 1) + -(↑x * I * (↑x * I * (↑x * I))) / ((2 + 1) * (1 + 1))))).im\n[PROOFSTEP]\nsimp [div_eq_mul_inv, normSq]\n[GOAL]\ncase a\nx : ℝ\nhx : abs' x ≤ 1\n⊢ cos x + (Complex.exp (-(↑x * I))).re - (2 - x * x) =\n    cos x - (1 + -(x * x * (1 + 1)⁻¹)) + ((Complex.exp (-(↑x * I))).re - (1 + -(x * x * (1 + 1)⁻¹)))\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase a\nx : ℝ\nhx : abs' x ≤ 1\n⊢ sin x + (Complex.exp (-(↑x * I))).im =\n    sin x - (x + -(x * (x * x) * ((1 + 1)⁻¹ * ((2 + 1) * ((2 + 1)⁻¹ * (2 + 1)⁻¹))))) +\n      ((Complex.exp (-(↑x * I))).im - (-x + x * (x * x) * ((1 + 1)⁻¹ * ((2 + 1) * ((2 + 1)⁻¹ * (2 + 1)⁻¹)))))\n[PROOFSTEP]\nring_nf\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs\n      ((Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m) +\n          (Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m))) /\n        2) ≤\n    ↑Complex.abs ((Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) / 2) +\n      ↑Complex.abs ((Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) / 2)\n[PROOFSTEP]\nrw [add_div]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs\n      ((Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) / 2 +\n        (Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) / 2) ≤\n    ↑Complex.abs ((Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) / 2) +\n      ↑Complex.abs ((Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) / 2)\n[PROOFSTEP]\nexact Complex.abs.add_le _ _\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs ((Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) / 2) +\n      ↑Complex.abs ((Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) / 2) =\n    ↑Complex.abs (Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) / 2 +\n      ↑Complex.abs (Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) / 2\n[PROOFSTEP]\nsimp [map_div₀]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) / 2 +\n      ↑Complex.abs (Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) / 2 ≤\n    ↑Complex.abs (↑x * I) ^ 4 * (↑(Nat.succ 4) * (↑(Nat.factorial 4) * ↑4)⁻¹) / 2 +\n      ↑Complex.abs (-↑x * I) ^ 4 * (↑(Nat.succ 4) * (↑(Nat.factorial 4) * ↑4)⁻¹) / 2\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h₁.h\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) ≤\n    ↑Complex.abs (↑x * I) ^ 4 * (↑(Nat.succ 4) * (↑(Nat.factorial 4) * ↑4)⁻¹)\n[PROOFSTEP]\nexact Complex.exp_bound (by simpa) (by decide)\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (↑x * I) ≤ 1\n[PROOFSTEP]\nsimpa\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ 0 < 4\n[PROOFSTEP]\ndecide\n[GOAL]\ncase h₂.h\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) ≤\n    ↑Complex.abs (-↑x * I) ^ 4 * (↑(Nat.succ 4) * (↑(Nat.factorial 4) * ↑4)⁻¹)\n[PROOFSTEP]\nexact Complex.exp_bound (by simpa) (by decide)\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (-↑x * I) ≤ 1\n[PROOFSTEP]\nsimpa\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ 0 < 4\n[PROOFSTEP]\ndecide\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (↑x * I) ^ 4 * (↑(Nat.succ 4) * (↑(Nat.factorial 4) * ↑4)⁻¹) / 2 +\n      ↑Complex.abs (-↑x * I) ^ 4 * (↑(Nat.succ 4) * (↑(Nat.factorial 4) * ↑4)⁻¹) / 2 ≤\n    abs' x ^ 4 * (5 / 96)\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ abs' (sin x - (x - x ^ 3 / 6)) = ↑Complex.abs (Complex.sin ↑x - ↑(x - x ^ 3 / 6))\n[PROOFSTEP]\nrw [← abs_ofReal]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs ↑(sin x - (x - x ^ 3 / 6)) = ↑Complex.abs (Complex.sin ↑x - ↑(x - x ^ 3 / 6))\n[PROOFSTEP]\nsimp\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (Complex.sin ↑x - ↑(x - x ^ 3 / 6)) =\n    ↑Complex.abs (((Complex.exp (-↑x * I) - Complex.exp (↑x * I)) * I - ↑(2 * x - x ^ 3 / 3)) / 2)\n[PROOFSTEP]\nsimp [Complex.sin, sub_div, add_div, neg_div, mul_div_cancel_left _ (two_ne_zero' ℂ), div_div,\n  show (3 : ℂ) * 2 = 6 by norm_num]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ 3 * 2 = 6\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ (Complex.exp (-↑x * I) - Complex.exp (↑x * I)) * I - ↑(2 * x - x ^ 3 / 3) =\n    (Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m) -\n        (Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m))) *\n      I\n[PROOFSTEP]\nsimp only [sum_range_succ]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ (Complex.exp (-↑x * I) - Complex.exp (↑x * I)) * I - ↑(2 * x - x ^ 3 / 3) =\n    (Complex.exp (-↑x * I) -\n          (∑ m in range 0, (-↑x * I) ^ m / ↑(Nat.factorial m) + (-↑x * I) ^ 0 / ↑(Nat.factorial 0) +\n                (-↑x * I) ^ 1 / ↑(Nat.factorial 1) +\n              (-↑x * I) ^ 2 / ↑(Nat.factorial 2) +\n            (-↑x * I) ^ 3 / ↑(Nat.factorial 3)) -\n        (Complex.exp (↑x * I) -\n          (∑ m in range 0, (↑x * I) ^ m / ↑(Nat.factorial m) + (↑x * I) ^ 0 / ↑(Nat.factorial 0) +\n                (↑x * I) ^ 1 / ↑(Nat.factorial 1) +\n              (↑x * I) ^ 2 / ↑(Nat.factorial 2) +\n            (↑x * I) ^ 3 / ↑(Nat.factorial 3)))) *\n      I\n[PROOFSTEP]\nsimp [pow_succ]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ (Complex.exp (-(↑x * I)) - Complex.exp (↑x * I)) * I - (2 * ↑x - ↑x * (↑x * ↑x) / 3) =\n    (Complex.exp (-(↑x * I)) -\n          (1 + -(↑x * I) + ↑x * I * (↑x * I) / (1 + 1) + -(↑x * I * (↑x * I * (↑x * I))) / ((2 + 1) * (1 + 1))) -\n        (Complex.exp (↑x * I) -\n          (1 + ↑x * I + ↑x * I * (↑x * I) / (1 + 1) + ↑x * I * (↑x * I * (↑x * I)) / ((2 + 1) * (1 + 1))))) *\n      I\n[PROOFSTEP]\napply Complex.ext\n[GOAL]\ncase a\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ((Complex.exp (-(↑x * I)) - Complex.exp (↑x * I)) * I - (2 * ↑x - ↑x * (↑x * ↑x) / 3)).re =\n    ((Complex.exp (-(↑x * I)) -\n            (1 + -(↑x * I) + ↑x * I * (↑x * I) / (1 + 1) + -(↑x * I * (↑x * I * (↑x * I))) / ((2 + 1) * (1 + 1))) -\n          (Complex.exp (↑x * I) -\n            (1 + ↑x * I + ↑x * I * (↑x * I) / (1 + 1) + ↑x * I * (↑x * I * (↑x * I)) / ((2 + 1) * (1 + 1))))) *\n        I).re\n[PROOFSTEP]\nsimp [div_eq_mul_inv, normSq]\n[GOAL]\ncase a\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ((Complex.exp (-(↑x * I)) - Complex.exp (↑x * I)) * I - (2 * ↑x - ↑x * (↑x * ↑x) / 3)).im =\n    ((Complex.exp (-(↑x * I)) -\n            (1 + -(↑x * I) + ↑x * I * (↑x * I) / (1 + 1) + -(↑x * I * (↑x * I * (↑x * I))) / ((2 + 1) * (1 + 1))) -\n          (Complex.exp (↑x * I) -\n            (1 + ↑x * I + ↑x * I * (↑x * I) / (1 + 1) + ↑x * I * (↑x * I * (↑x * I)) / ((2 + 1) * (1 + 1))))) *\n        I).im\n[PROOFSTEP]\nsimp [div_eq_mul_inv, normSq]\n[GOAL]\ncase a\nx : ℝ\nhx : abs' x ≤ 1\n⊢ sin x - (Complex.exp (-(↑x * I))).im - (2 * x - x * (x * x) * 3⁻¹) =\n    sin x - (x + -(x * (x * x) * ((1 + 1)⁻¹ * ((2 + 1) * ((2 + 1)⁻¹ * (2 + 1)⁻¹))))) -\n      ((Complex.exp (-(↑x * I))).im - (-x + x * (x * x) * ((1 + 1)⁻¹ * ((2 + 1) * ((2 + 1)⁻¹ * (2 + 1)⁻¹)))))\n[PROOFSTEP]\nring\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs\n      ((Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m) -\n            (Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m))) *\n          I /\n        2) ≤\n    ↑Complex.abs ((Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) * I / 2) +\n      ↑Complex.abs (-((Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) * I) / 2)\n[PROOFSTEP]\nrw [sub_mul, sub_eq_add_neg, add_div]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs\n      ((Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) * I / 2 +\n        -((Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) * I) / 2) ≤\n    ↑Complex.abs ((Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) * I / 2) +\n      ↑Complex.abs (-((Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) * I) / 2)\n[PROOFSTEP]\nexact Complex.abs.add_le _ _\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs ((Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) * I / 2) +\n      ↑Complex.abs (-((Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) * I) / 2) =\n    ↑Complex.abs (Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) / 2 +\n      ↑Complex.abs (Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) / 2\n[PROOFSTEP]\nsimp [add_comm, map_div₀]\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) / 2 +\n      ↑Complex.abs (Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) / 2 ≤\n    ↑Complex.abs (↑x * I) ^ 4 * (↑(Nat.succ 4) * (↑(Nat.factorial 4) * ↑4)⁻¹) / 2 +\n      ↑Complex.abs (-↑x * I) ^ 4 * (↑(Nat.succ 4) * (↑(Nat.factorial 4) * ↑4)⁻¹) / 2\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h₁.h\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (Complex.exp (↑x * I) - ∑ m in range 4, (↑x * I) ^ m / ↑(Nat.factorial m)) ≤\n    ↑Complex.abs (↑x * I) ^ 4 * (↑(Nat.succ 4) * (↑(Nat.factorial 4) * ↑4)⁻¹)\n[PROOFSTEP]\nexact Complex.exp_bound (by simpa) (by decide)\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (↑x * I) ≤ 1\n[PROOFSTEP]\nsimpa\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ 0 < 4\n[PROOFSTEP]\ndecide\n[GOAL]\ncase h₂.h\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (Complex.exp (-↑x * I) - ∑ m in range 4, (-↑x * I) ^ m / ↑(Nat.factorial m)) ≤\n    ↑Complex.abs (-↑x * I) ^ 4 * (↑(Nat.succ 4) * (↑(Nat.factorial 4) * ↑4)⁻¹)\n[PROOFSTEP]\nexact Complex.exp_bound (by simpa) (by decide)\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (-↑x * I) ≤ 1\n[PROOFSTEP]\nsimpa\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ 0 < 4\n[PROOFSTEP]\ndecide\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ ↑Complex.abs (↑x * I) ^ 4 * (↑(Nat.succ 4) * (↑(Nat.factorial 4) * ↑4)⁻¹) / 2 +\n      ↑Complex.abs (-↑x * I) ^ 4 * (↑(Nat.succ 4) * (↑(Nat.factorial 4) * ↑4)⁻¹) / 2 ≤\n    abs' x ^ 4 * (5 / 96)\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ abs' x ^ 4 * (5 / 96) + x ^ 2 / 2 ≤ 1 * (5 / 96) + 1 / 2\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h₁.h\nx : ℝ\nhx : abs' x ≤ 1\n⊢ abs' x ^ 4 ≤ 1\n[PROOFSTEP]\nexact pow_le_one _ (abs_nonneg _) hx\n[GOAL]\ncase h₂.h\nx : ℝ\nhx : abs' x ≤ 1\n⊢ x ^ 2 ≤ 1\n[PROOFSTEP]\nrw [sq, ← abs_mul_self, abs_mul]\n[GOAL]\ncase h₂.h\nx : ℝ\nhx : abs' x ≤ 1\n⊢ abs' x * abs' x ≤ 1\n[PROOFSTEP]\nexact mul_le_one hx (abs_nonneg _) hx\n[GOAL]\nx : ℝ\nhx : abs' x ≤ 1\n⊢ 1 * (5 / 96) + 1 / 2 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 1\n⊢ abs' x ^ 4 * (5 / 96) + x ^ 3 / 6 ≤ x * (5 / 96) + x / 6\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h₁.h\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 1\n⊢ abs' x ^ 4 ≤ x\n[PROOFSTEP]\ncalc\n  |x| ^ 4 ≤ |x| ^ 1 := pow_le_pow_of_le_one (abs_nonneg _) (by rwa [_root_.abs_of_nonneg (le_of_lt hx0)]) (by decide)\n  _ = x := by simp [_root_.abs_of_nonneg (le_of_lt hx0)]\n[GOAL]\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 1\n⊢ abs' x ≤ 1\n[PROOFSTEP]\nrwa [_root_.abs_of_nonneg (le_of_lt hx0)]\n[GOAL]\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 1\n⊢ 1 ≤ 4\n[PROOFSTEP]\ndecide\n[GOAL]\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 1\n⊢ abs' x ^ 1 = x\n[PROOFSTEP]\nsimp [_root_.abs_of_nonneg (le_of_lt hx0)]\n[GOAL]\ncase h₂.h\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 1\n⊢ x ^ 3 ≤ x\n[PROOFSTEP]\ncalc\n  x ^ 3 ≤ x ^ 1 := pow_le_pow_of_le_one (le_of_lt hx0) hx (by decide)\n  _ = x := pow_one _\n[GOAL]\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 1\n⊢ 1 ≤ 3\n[PROOFSTEP]\ndecide\n[GOAL]\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 1\n⊢ x * (5 / 96) + x / 6 < x\n[PROOFSTEP]\nlinarith\n[GOAL]\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 1\n⊢ abs' x ≤ 1\n[PROOFSTEP]\nrwa [_root_.abs_of_nonneg (le_of_lt hx0)]\n[GOAL]\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 2\n⊢ 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 2\n⊢ x ≤ 1 * 2\n[PROOFSTEP]\nsimpa\n[GOAL]\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 2\nthis : x / 2 ≤ 1\n⊢ 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 2\nthis : x / 2 ≤ 1\n⊢ abs' (x / 2) ≤ 1\n[PROOFSTEP]\nrwa [_root_.abs_of_nonneg (le_of_lt (half_pos hx0))]\n[GOAL]\nx : ℝ\nhx0 : 0 < x\nhx : x ≤ 2\nthis : x / 2 ≤ 1\n⊢ 2 * sin (x / 2) * cos (x / 2) = sin x\n[PROOFSTEP]\nrw [← sin_two_mul, two_mul, add_halves]\n[GOAL]\n⊢ abs' 1 ≤ 1\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ abs' 1 ^ 4 * (5 / 96) + (1 - 1 ^ 2 / 2) ≤ 2 / 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ 2 * cos 1 ^ 2 - 1 ≤ 2 * (2 / 3) ^ 2 - 1\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.h.ha\n⊢ 0 ≤ cos 1\n[PROOFSTEP]\nexact cos_one_pos.le\n[GOAL]\ncase h.h.hab\n⊢ cos 1 ≤ 2 / 3\n[PROOFSTEP]\napply cos_one_le\n[GOAL]\n⊢ 2 * (2 / 3) ^ 2 - 1 < 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\n⊢ exp x < 1 / (1 - x)\n[PROOFSTEP]\nhave H : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n[GOAL]\ncase H\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\n⊢ 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n[PROOFSTEP]\ncalc\n  0 < x ^ 3 := by positivity\n  _ = 1 - (1 + x + x ^ 2) * (1 - x) := by ring\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\n⊢ 0 < x ^ 3\n[PROOFSTEP]\npositivity\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\n⊢ x ^ 3 = 1 - (1 + x + x ^ 2) * (1 - x)\n[PROOFSTEP]\nring\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ exp x < 1 / (1 - x)\n[PROOFSTEP]\ncalc\n  exp x ≤ _ := exp_bound' h1.le h2.le zero_lt_three\n  _ ≤ 1 + x + x ^ 2 := by\n    -- Porting note: was `norm_num [Finset.sum] <;> nlinarith`\n          -- This proof should be restored after the norm_num plugin for big operators is ported.\n          -- (It may also need the positivity extensions in #3907.)\n    rw [Finset.sum, range_val]\n    nth_rw 1 [← two_add_one_eq_three]\n    rw [← Nat.succ_eq_add_one, Multiset.range_succ, Multiset.map_cons, Multiset.sum_cons]\n    nth_rw 3 [← one_add_one_eq_two]\n    rw [← Nat.succ_eq_add_one, Multiset.range_succ, Multiset.map_cons, Multiset.sum_cons]\n    nth_rw 3 [← zero_add 1]\n    rw [← Nat.succ_eq_add_one, Multiset.range_succ, Multiset.map_cons, Multiset.sum_cons]\n    rw [Multiset.range_zero, Multiset.map_zero, Multiset.sum_zero]\n    norm_num\n    nlinarith\n  _ < 1 / (1 - x) := by rw [lt_div_iff] <;> nlinarith\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ ∑ m in range 3, x ^ m / ↑(Nat.factorial m) + x ^ 3 * (↑3 + 1) / (↑(Nat.factorial 3) * ↑3) ≤ 1 + x + x ^ 2\n[PROOFSTEP]\nrw [Finset.sum, range_val]\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ Multiset.sum (Multiset.map (fun m => x ^ m / ↑(Nat.factorial m)) (Multiset.range 3)) +\n      x ^ 3 * (↑3 + 1) / (↑(Nat.factorial 3) * ↑3) ≤\n    1 + x + x ^ 2\n[PROOFSTEP]\nnth_rw 1 [← two_add_one_eq_three]\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ Multiset.sum (Multiset.map (fun m => x ^ m / ↑(Nat.factorial m)) (Multiset.range (2 + 1))) +\n      x ^ 3 * (↑3 + 1) / (↑(Nat.factorial 3) * ↑3) ≤\n    1 + x + x ^ 2\n[PROOFSTEP]\nrw [← Nat.succ_eq_add_one, Multiset.range_succ, Multiset.map_cons, Multiset.sum_cons]\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ x ^ 2 / ↑(Nat.factorial 2) + Multiset.sum (Multiset.map (fun m => x ^ m / ↑(Nat.factorial m)) (Multiset.range 2)) +\n      x ^ 3 * (↑3 + 1) / (↑(Nat.factorial 3) * ↑3) ≤\n    1 + x + x ^ 2\n[PROOFSTEP]\nnth_rw 3 [← one_add_one_eq_two]\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ x ^ 2 / ↑(Nat.factorial 2) +\n        Multiset.sum (Multiset.map (fun m => x ^ m / ↑(Nat.factorial m)) (Multiset.range (1 + 1))) +\n      x ^ 3 * (↑3 + 1) / (↑(Nat.factorial 3) * ↑3) ≤\n    1 + x + x ^ 2\n[PROOFSTEP]\nrw [← Nat.succ_eq_add_one, Multiset.range_succ, Multiset.map_cons, Multiset.sum_cons]\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ x ^ 2 / ↑(Nat.factorial 2) +\n        (x ^ 1 / ↑(Nat.factorial 1) +\n          Multiset.sum (Multiset.map (fun m => x ^ m / ↑(Nat.factorial m)) (Multiset.range 1))) +\n      x ^ 3 * (↑3 + 1) / (↑(Nat.factorial 3) * ↑3) ≤\n    1 + x + x ^ 2\n[PROOFSTEP]\nnth_rw 3 [← zero_add 1]\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ x ^ 2 / ↑(Nat.factorial 2) +\n        (x ^ 1 / ↑(Nat.factorial 1) +\n          Multiset.sum (Multiset.map (fun m => x ^ m / ↑(Nat.factorial m)) (Multiset.range (0 + 1)))) +\n      x ^ 3 * (↑3 + 1) / (↑(Nat.factorial 3) * ↑3) ≤\n    1 + x + x ^ 2\n[PROOFSTEP]\nrw [← Nat.succ_eq_add_one, Multiset.range_succ, Multiset.map_cons, Multiset.sum_cons]\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ x ^ 2 / ↑(Nat.factorial 2) +\n        (x ^ 1 / ↑(Nat.factorial 1) +\n          (x ^ 0 / ↑(Nat.factorial 0) +\n            Multiset.sum (Multiset.map (fun m => x ^ m / ↑(Nat.factorial m)) (Multiset.range 0)))) +\n      x ^ 3 * (↑3 + 1) / (↑(Nat.factorial 3) * ↑3) ≤\n    1 + x + x ^ 2\n[PROOFSTEP]\nrw [Multiset.range_zero, Multiset.map_zero, Multiset.sum_zero]\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ x ^ 2 / ↑(Nat.factorial 2) + (x ^ 1 / ↑(Nat.factorial 1) + (x ^ 0 / ↑(Nat.factorial 0) + 0)) +\n      x ^ 3 * (↑3 + 1) / (↑(Nat.factorial 3) * ↑3) ≤\n    1 + x + x ^ 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ x ^ 2 / 2 + (x + 1) + x ^ 3 * 4 / 18 ≤ 1 + x + x ^ 2\n[PROOFSTEP]\nnlinarith\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ 1 + x + x ^ 2 < 1 / (1 - x)\n[PROOFSTEP]\nrw [lt_div_iff]\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ (1 + x + x ^ 2) * (1 - x) < 1\n[PROOFSTEP]\nnlinarith\n[GOAL]\nx : ℝ\nh1 : 0 < x\nh2 : x < 1\nH : 0 < 1 - (1 + x + x ^ 2) * (1 - x)\n⊢ 0 < 1 - x\n[PROOFSTEP]\nnlinarith\n[GOAL]\nx : ℝ\nh1 : 0 ≤ x\nh2 : x < 1\n⊢ exp x ≤ 1 / (1 - x)\n[PROOFSTEP]\nrcases eq_or_lt_of_le h1 with (rfl | h1)\n[GOAL]\ncase inl\nh1 : 0 ≤ 0\nh2 : 0 < 1\n⊢ exp 0 ≤ 1 / (1 - 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nx : ℝ\nh1✝ : 0 ≤ x\nh2 : x < 1\nh1 : 0 < x\n⊢ exp x ≤ 1 / (1 - x)\n[PROOFSTEP]\nexact (exp_bound_div_one_sub_of_interval' h1 h2).le\n[GOAL]\ny : ℝ\nh : 0 < y\n⊢ 1 - y < exp (-y)\n[PROOFSTEP]\ncases' le_or_lt 1 y with h' h'\n[GOAL]\ncase inl\ny : ℝ\nh : 0 < y\nh' : 1 ≤ y\n⊢ 1 - y < exp (-y)\n[PROOFSTEP]\nlinarith [(-y).exp_pos]\n[GOAL]\ncase inr\ny : ℝ\nh : 0 < y\nh' : y < 1\n⊢ 1 - y < exp (-y)\n[PROOFSTEP]\nrw [exp_neg, lt_inv _ y.exp_pos, inv_eq_one_div]\n[GOAL]\ncase inr\ny : ℝ\nh : 0 < y\nh' : y < 1\n⊢ exp y < 1 / (1 - y)\n[PROOFSTEP]\nexact exp_bound_div_one_sub_of_interval' h h'\n[GOAL]\ny : ℝ\nh : 0 < y\nh' : y < 1\n⊢ 0 < 1 - y\n[PROOFSTEP]\nlinarith\n[GOAL]\ny : ℝ\nh : 0 ≤ y\n⊢ 1 - y ≤ exp (-y)\n[PROOFSTEP]\nrcases eq_or_lt_of_le h with (rfl | h)\n[GOAL]\ncase inl\nh : 0 ≤ 0\n⊢ 1 - 0 ≤ exp (-0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\ny : ℝ\nh✝ : 0 ≤ y\nh : 0 < y\n⊢ 1 - y ≤ exp (-y)\n[PROOFSTEP]\nexact (one_sub_lt_exp_minus_of_pos h).le\n[GOAL]\nx : ℝ\nh : x < 0\n⊢ x + 1 < exp x\n[PROOFSTEP]\nhave h1 : 0 < -x := by linarith\n[GOAL]\nx : ℝ\nh : x < 0\n⊢ 0 < -x\n[PROOFSTEP]\nlinarith\n[GOAL]\nx : ℝ\nh : x < 0\nh1 : 0 < -x\n⊢ x + 1 < exp x\n[PROOFSTEP]\nsimpa [add_comm] using one_sub_lt_exp_minus_of_pos h1\n[GOAL]\nx : ℝ\nhx : x ≠ 0\n⊢ x + 1 < exp x\n[PROOFSTEP]\ncases' lt_or_gt_of_ne hx with h h\n[GOAL]\ncase inl\nx : ℝ\nhx : x ≠ 0\nh : x < 0\n⊢ x + 1 < exp x\n[PROOFSTEP]\nexact add_one_lt_exp_of_neg h\n[GOAL]\ncase inr\nx : ℝ\nhx : x ≠ 0\nh : x > 0\n⊢ x + 1 < exp x\n[PROOFSTEP]\nexact add_one_lt_exp_of_pos h\n[GOAL]\nx : ℝ\n⊢ x + 1 ≤ exp x\n[PROOFSTEP]\ncases' le_or_lt 0 x with h h\n[GOAL]\ncase inl\nx : ℝ\nh : 0 ≤ x\n⊢ x + 1 ≤ exp x\n[PROOFSTEP]\nexact Real.add_one_le_exp_of_nonneg h\n[GOAL]\ncase inr\nx : ℝ\nh : x < 0\n⊢ x + 1 ≤ exp x\n[PROOFSTEP]\nexact (add_one_lt_exp_of_neg h).le\n[GOAL]\nn : ℕ\nt : ℝ\nht' : t ≤ ↑n\n⊢ (1 - t / ↑n) ^ n ≤ exp (-t)\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\nt : ℝ\nht' : t ≤ ↑0\n⊢ (1 - t / ↑0) ^ 0 ≤ exp (-t)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl\nt : ℝ\nht' : t ≤ ↑0\n⊢ t ≤ 0\n[PROOFSTEP]\nrwa [Nat.cast_zero] at ht' \n[GOAL]\ncase inr\nn : ℕ\nt : ℝ\nht' : t ≤ ↑n\nhn : n ≠ 0\n⊢ (1 - t / ↑n) ^ n ≤ exp (-t)\n[PROOFSTEP]\nconvert pow_le_pow_of_le_left ?_ (add_one_le_exp (-(t / n))) n using 2\n[GOAL]\ncase h.e'_3.h.e'_5\nn : ℕ\nt : ℝ\nht' : t ≤ ↑n\nhn : n ≠ 0\n⊢ 1 - t / ↑n = -(t / ↑n) + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_3.h.e'_5\nn : ℕ\nt : ℝ\nht' : t ≤ ↑n\nhn : n ≠ 0\n⊢ 1 - t / ↑n = -(t / ↑n) + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_4\nn : ℕ\nt : ℝ\nht' : t ≤ ↑n\nhn : n ≠ 0\n⊢ exp (-t) = exp (-(t / ↑n)) ^ n\n[PROOFSTEP]\nrw [← Real.exp_nat_mul]\n[GOAL]\ncase h.e'_4\nn : ℕ\nt : ℝ\nht' : t ≤ ↑n\nhn : n ≠ 0\n⊢ exp (-t) = exp (↑n * -(t / ↑n))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_4.e_x\nn : ℕ\nt : ℝ\nht' : t ≤ ↑n\nhn : n ≠ 0\n⊢ -t = ↑n * -(t / ↑n)\n[PROOFSTEP]\nfield_simp [(Nat.cast_ne_zero (R := ℝ)).mpr hn]\n[GOAL]\ncase h.e'_4.e_x\nn : ℕ\nt : ℝ\nht' : t ≤ ↑n\nhn : n ≠ 0\n⊢ t * ↑n = ↑n * t\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase inr\nn : ℕ\nt : ℝ\nht' : t ≤ ↑n\nhn : n ≠ 0\n⊢ 0 ≤ -(t / ↑n) + 1\n[PROOFSTEP]\nrwa [add_comm, ← sub_eq_add_neg, sub_nonneg, div_le_one]\n[GOAL]\ncase inr\nn : ℕ\nt : ℝ\nht' : t ≤ ↑n\nhn : n ≠ 0\n⊢ 0 < ↑n\n[PROOFSTEP]\npositivity\n[GOAL]\nx : ℝ\n⊢ ↑abs (cos ↑x + sin ↑x * I) = 1\n[PROOFSTEP]\nhave := Real.sin_sq_add_cos_sq x\n[GOAL]\nx : ℝ\nthis : Real.sin x ^ 2 + Real.cos x ^ 2 = 1\n⊢ ↑abs (cos ↑x + sin ↑x * I) = 1\n[PROOFSTEP]\nsimp_all [add_comm, abs, normSq, sq, sin_ofReal_re, cos_ofReal_re, mul_re]\n[GOAL]\nx : ℝ\n⊢ ↑abs (exp ↑x) = Real.exp x\n[PROOFSTEP]\nrw [← ofReal_exp]\n[GOAL]\nx : ℝ\n⊢ ↑abs ↑(Real.exp x) = Real.exp x\n[PROOFSTEP]\nexact abs_of_nonneg (le_of_lt (Real.exp_pos _))\n[GOAL]\nx : ℝ\n⊢ ↑abs (exp (↑x * I)) = 1\n[PROOFSTEP]\nrw [exp_mul_I, abs_cos_add_sin_mul_I]\n[GOAL]\nz : ℂ\n⊢ ↑abs (exp z) = Real.exp z.re\n[PROOFSTEP]\nrw [exp_eq_exp_re_mul_sin_add_cos, map_mul, abs_exp_ofReal, abs_cos_add_sin_mul_I, mul_one]\n[GOAL]\nx y : ℂ\n⊢ ↑abs (exp x) = ↑abs (exp y) ↔ x.re = y.re\n[PROOFSTEP]\nrw [abs_exp, abs_exp, Real.exp_eq_exp]\n", "meta": {"mathlib_filename": "Mathlib.Data.Complex.Exponential", "llama_tokens": 132499, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7154239957834733, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.3772548941988592}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : LocallyCompactSpace α\ninst✝¹ : Mul β\ninst✝ : ContinuousMul β\n⊢ Continuous fun p => p.fst * p.snd\n[PROOFSTEP]\nrefine' continuous_of_continuous_uncurry _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : LocallyCompactSpace α\ninst✝¹ : Mul β\ninst✝ : ContinuousMul β\n⊢ Continuous (Function.uncurry fun x y => ↑(x.fst * x.snd) y)\n[PROOFSTEP]\nhave h1 : Continuous fun x : (C(α, β) × C(α, β)) × α => x.fst.fst x.snd :=\n  continuous_eval'.comp (continuous_fst.prod_map continuous_id)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : LocallyCompactSpace α\ninst✝¹ : Mul β\ninst✝ : ContinuousMul β\nh1 : Continuous fun x => ↑x.fst.fst x.snd\n⊢ Continuous (Function.uncurry fun x y => ↑(x.fst * x.snd) y)\n[PROOFSTEP]\nhave h2 : Continuous fun x : (C(α, β) × C(α, β)) × α => x.fst.snd x.snd :=\n  continuous_eval'.comp (continuous_snd.prod_map continuous_id)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : LocallyCompactSpace α\ninst✝¹ : Mul β\ninst✝ : ContinuousMul β\nh1 : Continuous fun x => ↑x.fst.fst x.snd\nh2 : Continuous fun x => ↑x.fst.snd x.snd\n⊢ Continuous (Function.uncurry fun x y => ↑(x.fst * x.snd) y)\n[PROOFSTEP]\nexact h1.mul h2\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommMonoid β\ninst✝ : ContinuousMul β\nι : Type u_3\ns : Finset ι\nf : ι → C(α, β)\na : α\n⊢ ↑(∏ i in s, f i) a = ∏ i in s, ↑(f i) a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommGroup β\ninst✝ : TopologicalGroup β\n⊢ Continuous fun p => p.fst * p.snd\n[PROOFSTEP]\nletI : UniformSpace β := TopologicalGroup.toUniformSpace β\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommGroup β\ninst✝ : TopologicalGroup β\nthis : UniformSpace β := TopologicalGroup.toUniformSpace β\n⊢ Continuous fun p => p.fst * p.snd\n[PROOFSTEP]\nhave : UniformGroup β := comm_topologicalGroup_is_uniform\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommGroup β\ninst✝ : TopologicalGroup β\nthis✝ : UniformSpace β := TopologicalGroup.toUniformSpace β\nthis : UniformGroup β\n⊢ Continuous fun p => p.fst * p.snd\n[PROOFSTEP]\nrw [continuous_iff_continuousAt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommGroup β\ninst✝ : TopologicalGroup β\nthis✝ : UniformSpace β := TopologicalGroup.toUniformSpace β\nthis : UniformGroup β\n⊢ ∀ (x : C(α, β) × C(α, β)), ContinuousAt (fun p => p.fst * p.snd) x\n[PROOFSTEP]\nrintro ⟨f, g⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommGroup β\ninst✝ : TopologicalGroup β\nthis✝ : UniformSpace β := TopologicalGroup.toUniformSpace β\nthis : UniformGroup β\nf g : C(α, β)\n⊢ ContinuousAt (fun p => p.fst * p.snd) (f, g)\n[PROOFSTEP]\nrw [ContinuousAt, tendsto_iff_forall_compact_tendstoUniformlyOn, nhds_prod_eq]\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommGroup β\ninst✝ : TopologicalGroup β\nthis✝ : UniformSpace β := TopologicalGroup.toUniformSpace β\nthis : UniformGroup β\nf g : C(α, β)\n⊢ ∀ (K : Set α),\n    IsCompact K → TendstoUniformlyOn (fun i a => ↑(i.fst * i.snd) a) (↑((f, g).fst * (f, g).snd)) (nhds f ×ˢ nhds g) K\n[PROOFSTEP]\nexact fun K hK =>\n  uniformContinuous_mul.comp_tendstoUniformlyOn\n    ((tendsto_iff_forall_compact_tendstoUniformlyOn.mp Filter.tendsto_id K hK).prod\n      (tendsto_iff_forall_compact_tendstoUniformlyOn.mp Filter.tendsto_id K hK))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommGroup β\ninst✝ : TopologicalGroup β\n⊢ Continuous fun a => a⁻¹\n[PROOFSTEP]\nletI : UniformSpace β := TopologicalGroup.toUniformSpace β\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommGroup β\ninst✝ : TopologicalGroup β\nthis : UniformSpace β := TopologicalGroup.toUniformSpace β\n⊢ Continuous fun a => a⁻¹\n[PROOFSTEP]\nhave : UniformGroup β := comm_topologicalGroup_is_uniform\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommGroup β\ninst✝ : TopologicalGroup β\nthis✝ : UniformSpace β := TopologicalGroup.toUniformSpace β\nthis : UniformGroup β\n⊢ Continuous fun a => a⁻¹\n[PROOFSTEP]\nrw [continuous_iff_continuousAt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommGroup β\ninst✝ : TopologicalGroup β\nthis✝ : UniformSpace β := TopologicalGroup.toUniformSpace β\nthis : UniformGroup β\n⊢ ∀ (x : C(α, β)), ContinuousAt (fun a => a⁻¹) x\n[PROOFSTEP]\nintro f\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommGroup β\ninst✝ : TopologicalGroup β\nthis✝ : UniformSpace β := TopologicalGroup.toUniformSpace β\nthis : UniformGroup β\nf : C(α, β)\n⊢ ContinuousAt (fun a => a⁻¹) f\n[PROOFSTEP]\nrw [ContinuousAt, tendsto_iff_forall_compact_tendstoUniformlyOn]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CommGroup β\ninst✝ : TopologicalGroup β\nthis✝ : UniformSpace β := TopologicalGroup.toUniformSpace β\nthis : UniformGroup β\nf : C(α, β)\n⊢ ∀ (K : Set α), IsCompact K → TendstoUniformlyOn (fun i a => ↑i⁻¹ a) (↑f⁻¹) (nhds f) K\n[PROOFSTEP]\nexact fun K hK =>\n  uniformContinuous_inv.comp_tendstoUniformlyOn\n    (tendsto_iff_forall_compact_tendstoUniformlyOn.mp Filter.tendsto_id K hK)\n      -- TODO: rewrite the next three lemmas for products and deduce sum case via `to_additive`, once\n      -- definition of `tprod` is in place\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\nγ : Type u_3\ninst✝¹ : AddCommMonoid β\ninst✝ : ContinuousAdd β\nf : γ → C(α, β)\ng : C(α, β)\nhf : HasSum f g\nx : α\n⊢ HasSum (fun i => ↑(f i) x) (↑g x)\n[PROOFSTEP]\nlet ev : C(α, β) →+ β := (Pi.evalAddMonoidHom _ x).comp coeFnAddMonoidHom\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\nγ : Type u_3\ninst✝¹ : AddCommMonoid β\ninst✝ : ContinuousAdd β\nf : γ → C(α, β)\ng : C(α, β)\nhf : HasSum f g\nx : α\nev : C(α, β) →+ β := AddMonoidHom.comp (Pi.evalAddMonoidHom (fun a => β) x) coeFnAddMonoidHom\n⊢ HasSum (fun i => ↑(f i) x) (↑g x)\n[PROOFSTEP]\nexact hf.map ev (ContinuousMap.continuous_eval_const x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : TopologicalSpace β\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : TopologicalSpace M\nM₂ : Type u_6\ninst✝⁴ : TopologicalSpace M₂\ninst✝³ : LocallyCompactSpace α\ninst✝² : TopologicalSpace R\ninst✝¹ : SMul R M\ninst✝ : ContinuousSMul R M\n⊢ Continuous fun p => p.fst • p.snd\n[PROOFSTEP]\nrefine' continuous_of_continuous_uncurry _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : TopologicalSpace β\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : TopologicalSpace M\nM₂ : Type u_6\ninst✝⁴ : TopologicalSpace M₂\ninst✝³ : LocallyCompactSpace α\ninst✝² : TopologicalSpace R\ninst✝¹ : SMul R M\ninst✝ : ContinuousSMul R M\n⊢ Continuous (Function.uncurry fun x y => ↑(x.fst • x.snd) y)\n[PROOFSTEP]\nhave h : Continuous fun x : (R × C(α, M)) × α => x.fst.snd x.snd :=\n  continuous_eval'.comp (continuous_snd.prod_map continuous_id)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : TopologicalSpace β\nR : Type u_3\nR₁ : Type u_4\nM : Type u_5\ninst✝⁵ : TopologicalSpace M\nM₂ : Type u_6\ninst✝⁴ : TopologicalSpace M₂\ninst✝³ : LocallyCompactSpace α\ninst✝² : TopologicalSpace R\ninst✝¹ : SMul R M\ninst✝ : ContinuousSMul R M\nh : Continuous fun x => ↑x.fst.snd x.snd\n⊢ Continuous (Function.uncurry fun x y => ↑(x.fst • x.snd) y)\n[PROOFSTEP]\nexact (continuous_fst.comp continuous_fst).smul h\n[GOAL]\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\n⊢ (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1\n[PROOFSTEP]\next _\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\na✝ : α\n⊢ ↑((fun c => mk fun x => ↑(algebraMap R A) c) 1) a✝ = ↑1 a✝\n[PROOFSTEP]\nexact (algebraMap R A).map_one\n[GOAL]\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\nc₁ c₂ : R\n⊢ OneHom.toFun\n      { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n        map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n      (c₁ * c₂) =\n    OneHom.toFun\n        { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n          map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n        c₁ *\n      OneHom.toFun\n        { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n          map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n        c₂\n[PROOFSTEP]\next _\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\nc₁ c₂ : R\na✝ : α\n⊢ ↑(OneHom.toFun\n          { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n            map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n          (c₁ * c₂))\n      a✝ =\n    ↑(OneHom.toFun\n            { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n              map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n            c₁ *\n          OneHom.toFun\n            { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n              map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n            c₂)\n      a✝\n[PROOFSTEP]\nexact (algebraMap R A).map_mul _ _\n[GOAL]\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n              map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (c₁ c₂ : R),\n                OneHom.toFun\n                    { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                      map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                    (c₁ * c₂) =\n                  OneHom.toFun\n                      { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                        map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                      c₁ *\n                    OneHom.toFun\n                      { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                        map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                      c₂) })\n      0 =\n    0\n[PROOFSTEP]\next _\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\na✝ : α\n⊢ ↑(OneHom.toFun\n          (↑{\n              toOneHom :=\n                { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                  map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (c₁ c₂ : R),\n                    OneHom.toFun\n                        { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                          map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                        (c₁ * c₂) =\n                      OneHom.toFun\n                          { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                            map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                          c₁ *\n                        OneHom.toFun\n                          { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                            map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                          c₂) })\n          0)\n      a✝ =\n    ↑0 a✝\n[PROOFSTEP]\nexact (algebraMap R A).map_zero\n[GOAL]\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\nc₁ c₂ : R\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n              map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (c₁ c₂ : R),\n                OneHom.toFun\n                    { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                      map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                    (c₁ * c₂) =\n                  OneHom.toFun\n                      { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                        map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                      c₁ *\n                    OneHom.toFun\n                      { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                        map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                      c₂) })\n      (c₁ + c₂) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (c₁ c₂ : R),\n                  OneHom.toFun\n                      { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                        map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                      (c₁ * c₂) =\n                    OneHom.toFun\n                        { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                          map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                        c₁ *\n                      OneHom.toFun\n                        { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                          map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                        c₂) })\n        c₁ +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (c₁ c₂ : R),\n                  OneHom.toFun\n                      { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                        map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                      (c₁ * c₂) =\n                    OneHom.toFun\n                        { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                          map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                        c₁ *\n                      OneHom.toFun\n                        { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                          map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                        c₂) })\n        c₂\n[PROOFSTEP]\next _\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\nc₁ c₂ : R\na✝ : α\n⊢ ↑(OneHom.toFun\n          (↑{\n              toOneHom :=\n                { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                  map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (c₁ c₂ : R),\n                    OneHom.toFun\n                        { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                          map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                        (c₁ * c₂) =\n                      OneHom.toFun\n                          { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                            map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                          c₁ *\n                        OneHom.toFun\n                          { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                            map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                          c₂) })\n          (c₁ + c₂))\n      a✝ =\n    ↑(OneHom.toFun\n            (↑{\n                toOneHom :=\n                  { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                    map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (c₁ c₂ : R),\n                      OneHom.toFun\n                          { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                            map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                          (c₁ * c₂) =\n                        OneHom.toFun\n                            { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                              map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                            c₁ *\n                          OneHom.toFun\n                            { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                              map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                            c₂) })\n            c₁ +\n          OneHom.toFun\n            (↑{\n                toOneHom :=\n                  { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                    map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (c₁ c₂ : R),\n                      OneHom.toFun\n                          { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                            map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                          (c₁ * c₂) =\n                        OneHom.toFun\n                            { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                              map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                            c₁ *\n                          OneHom.toFun\n                            { toFun := fun c => mk fun x => ↑(algebraMap R A) c,\n                              map_one' := (_ : (fun c => mk fun x => ↑(algebraMap R A) c) 1 = 1) }\n                            c₂) })\n            c₂)\n      a✝\n[PROOFSTEP]\nexact (algebraMap R A).map_add _ _\n[GOAL]\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\nc : R\nf : (fun x => C(α, A)) c\n⊢ ↑C c * f = f * ↑C c\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\nc : R\nf : (fun x => C(α, A)) c\nx : α\n⊢ ↑(↑C c * f) x = ↑(f * ↑C c) x\n[PROOFSTEP]\nexact Algebra.commutes' _ _\n[GOAL]\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\nc : R\nf : (fun x => C(α, A)) c\n⊢ c • f = ↑C c * f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\nc : R\nf : (fun x => C(α, A)) c\nx : α\n⊢ ↑(c • f) x = ↑(↑C c * f) x\n[PROOFSTEP]\nexact Algebra.smul_def' _ _\n[GOAL]\nα✝ : Type u_1\ninst✝¹¹ : TopologicalSpace α✝\nR : Type u_2\ninst✝¹⁰ : CommSemiring R\nA : Type u_3\ninst✝⁹ : TopologicalSpace A\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁵ : TopologicalSpace A₂\ninst✝⁴ : Semiring A₂\ninst✝³ : Algebra R A₂\ninst✝² : TopologicalSemiring A₂\nα : Type u_5\nβ : Type u_6\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : C(α, β)\n⊢ (fun g => comp g f) 1 = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα✝ : Type u_1\ninst✝¹¹ : TopologicalSpace α✝\nR : Type u_2\ninst✝¹⁰ : CommSemiring R\nA : Type u_3\ninst✝⁹ : TopologicalSpace A\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁵ : TopologicalSpace A₂\ninst✝⁴ : Semiring A₂\ninst✝³ : Algebra R A₂\ninst✝² : TopologicalSemiring A₂\nα : Type u_5\nβ : Type u_6\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : C(α, β)\na✝ : α\n⊢ ↑((fun g => comp g f) 1) a✝ = ↑1 a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\ninst✝¹¹ : TopologicalSpace α✝\nR : Type u_2\ninst✝¹⁰ : CommSemiring R\nA : Type u_3\ninst✝⁹ : TopologicalSpace A\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁵ : TopologicalSpace A₂\ninst✝⁴ : Semiring A₂\ninst✝³ : Algebra R A₂\ninst✝² : TopologicalSemiring A₂\nα : Type u_5\nβ : Type u_6\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : C(α, β)\ng₁ g₂ : C(β, A)\n⊢ OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =\n    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n      OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα✝ : Type u_1\ninst✝¹¹ : TopologicalSpace α✝\nR : Type u_2\ninst✝¹⁰ : CommSemiring R\nA : Type u_3\ninst✝⁹ : TopologicalSpace A\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁵ : TopologicalSpace A₂\ninst✝⁴ : Semiring A₂\ninst✝³ : Algebra R A₂\ninst✝² : TopologicalSemiring A₂\nα : Type u_5\nβ : Type u_6\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : C(α, β)\ng₁ g₂ : C(β, A)\na✝ : α\n⊢ ↑(OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂)) a✝ =\n    ↑(OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n          OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂)\n      a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\ninst✝¹¹ : TopologicalSpace α✝\nR : Type u_2\ninst✝¹⁰ : CommSemiring R\nA : Type u_3\ninst✝⁹ : TopologicalSpace A\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁵ : TopologicalSpace A₂\ninst✝⁴ : Semiring A₂\ninst✝³ : Algebra R A₂\ninst✝² : TopologicalSemiring A₂\nα : Type u_5\nβ : Type u_6\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : C(α, β)\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (g₁ g₂ : C(β, A)),\n                OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =\n                  OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })\n      0 =\n    0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα✝ : Type u_1\ninst✝¹¹ : TopologicalSpace α✝\nR : Type u_2\ninst✝¹⁰ : CommSemiring R\nA : Type u_3\ninst✝⁹ : TopologicalSpace A\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁵ : TopologicalSpace A₂\ninst✝⁴ : Semiring A₂\ninst✝³ : Algebra R A₂\ninst✝² : TopologicalSemiring A₂\nα : Type u_5\nβ : Type u_6\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : C(α, β)\na✝ : α\n⊢ ↑(OneHom.toFun\n          (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (g₁ g₂ : C(β, A)),\n                    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =\n                      OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                        OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })\n          0)\n      a✝ =\n    ↑0 a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\ninst✝¹¹ : TopologicalSpace α✝\nR : Type u_2\ninst✝¹⁰ : CommSemiring R\nA : Type u_3\ninst✝⁹ : TopologicalSpace A\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁵ : TopologicalSpace A₂\ninst✝⁴ : Semiring A₂\ninst✝³ : Algebra R A₂\ninst✝² : TopologicalSemiring A₂\nα : Type u_5\nβ : Type u_6\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : C(α, β)\ng₁ g₂ : C(β, A)\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (g₁ g₂ : C(β, A)),\n                OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =\n                  OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })\n      (g₁ + g₂) =\n    OneHom.toFun\n        (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (g₁ g₂ : C(β, A)),\n                  OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =\n                    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                      OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })\n        g₁ +\n      OneHom.toFun\n        (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (g₁ g₂ : C(β, A)),\n                  OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =\n                    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                      OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })\n        g₂\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα✝ : Type u_1\ninst✝¹¹ : TopologicalSpace α✝\nR : Type u_2\ninst✝¹⁰ : CommSemiring R\nA : Type u_3\ninst✝⁹ : TopologicalSpace A\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁵ : TopologicalSpace A₂\ninst✝⁴ : Semiring A₂\ninst✝³ : Algebra R A₂\ninst✝² : TopologicalSemiring A₂\nα : Type u_5\nβ : Type u_6\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : C(α, β)\ng₁ g₂ : C(β, A)\na✝ : α\n⊢ ↑(OneHom.toFun\n          (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (g₁ g₂ : C(β, A)),\n                    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =\n                      OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                        OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })\n          (g₁ + g₂))\n      a✝ =\n    ↑(OneHom.toFun\n            (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (g₁ g₂ : C(β, A)),\n                      OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                          (g₁ * g₂) =\n                        OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                          OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                            g₂) })\n            g₁ +\n          OneHom.toFun\n            (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (g₁ g₂ : C(β, A)),\n                      OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                          (g₁ * g₂) =\n                        OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                          OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                            g₂) })\n            g₂)\n      a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\ninst✝¹¹ : TopologicalSpace α✝\nR : Type u_2\ninst✝¹⁰ : CommSemiring R\nA : Type u_3\ninst✝⁹ : TopologicalSpace A\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁵ : TopologicalSpace A₂\ninst✝⁴ : Semiring A₂\ninst✝³ : Algebra R A₂\ninst✝² : TopologicalSemiring A₂\nα : Type u_5\nβ : Type u_6\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : C(α, β)\nr : R\n⊢ OneHom.toFun\n      (↑↑{\n            toMonoidHom :=\n              { toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (g₁ g₂ : C(β, A)),\n                      OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                          (g₁ * g₂) =\n                        OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                          OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                            g₂) },\n            map_zero' :=\n              (_ :\n                OneHom.toFun\n                    (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (g₁ g₂ : C(β, A)),\n                              OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                  (g₁ * g₂) =\n                                OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                    g₁ *\n                                  OneHom.toFun\n                                    { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (g₁ g₂ : C(β, A)),\n                  OneHom.toFun\n                      (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (g₁ g₂ : C(β, A)),\n                                OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                    (g₁ * g₂) =\n                                  OneHom.toFun\n                                      { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                                    OneHom.toFun\n                                      { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })\n                      (g₁ + g₂) =\n                    OneHom.toFun\n                        (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (g₁ g₂ : C(β, A)),\n                                  OneHom.toFun\n                                      { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                      (g₁ * g₂) =\n                                    OneHom.toFun\n                                        { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                                      OneHom.toFun\n                                        { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                        g₂) })\n                        g₁ +\n                      OneHom.toFun\n                        (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (g₁ g₂ : C(β, A)),\n                                  OneHom.toFun\n                                      { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                      (g₁ * g₂) =\n                                    OneHom.toFun\n                                        { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                                      OneHom.toFun\n                                        { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                        g₂) })\n                        g₂) })\n      (↑(algebraMap R C(β, A)) r) =\n    ↑(algebraMap R C(α, A)) r\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα✝ : Type u_1\ninst✝¹¹ : TopologicalSpace α✝\nR : Type u_2\ninst✝¹⁰ : CommSemiring R\nA : Type u_3\ninst✝⁹ : TopologicalSpace A\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁵ : TopologicalSpace A₂\ninst✝⁴ : Semiring A₂\ninst✝³ : Algebra R A₂\ninst✝² : TopologicalSemiring A₂\nα : Type u_5\nβ : Type u_6\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : C(α, β)\nr : R\na✝ : α\n⊢ ↑(OneHom.toFun\n          (↑↑{\n                toMonoidHom :=\n                  { toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n                    map_mul' :=\n                      (_ :\n                        ∀ (g₁ g₂ : C(β, A)),\n                          OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                              (g₁ * g₂) =\n                            OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                g₁ *\n                              OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                g₂) },\n                map_zero' :=\n                  (_ :\n                    OneHom.toFun\n                        (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (g₁ g₂ : C(β, A)),\n                                  OneHom.toFun\n                                      { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                      (g₁ * g₂) =\n                                    OneHom.toFun\n                                        { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *\n                                      OneHom.toFun\n                                        { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                        g₂) })\n                        0 =\n                      0),\n                map_add' :=\n                  (_ :\n                    ∀ (g₁ g₂ : C(β, A)),\n                      OneHom.toFun\n                          (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (g₁ g₂ : C(β, A)),\n                                    OneHom.toFun\n                                        { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                        (g₁ * g₂) =\n                                      OneHom.toFun\n                                          { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                          g₁ *\n                                        OneHom.toFun\n                                          { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                          g₂) })\n                          (g₁ + g₂) =\n                        OneHom.toFun\n                            (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (g₁ g₂ : C(β, A)),\n                                      OneHom.toFun\n                                          { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                          (g₁ * g₂) =\n                                        OneHom.toFun\n                                            { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                            g₁ *\n                                          OneHom.toFun\n                                            { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                            g₂) })\n                            g₁ +\n                          OneHom.toFun\n                            (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (g₁ g₂ : C(β, A)),\n                                      OneHom.toFun\n                                          { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                          (g₁ * g₂) =\n                                        OneHom.toFun\n                                            { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                            g₁ *\n                                          OneHom.toFun\n                                            { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) }\n                                            g₂) })\n                            g₂) })\n          (↑(algebraMap R C(β, A)) r))\n      a✝ =\n    ↑(↑(algebraMap R C(α, A)) r) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\ns s' : Subalgebra R C(α, A)\nr : s ≤ s'\nh : (fun s => SeparatesPoints s) s\nx y : α\nn : x ≠ y\n⊢ ∃ f, f ∈ (fun f => ↑f) '' ↑s' ∧ f x ≠ f y\n[PROOFSTEP]\nobtain ⟨f, m, w⟩ := h n\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\ns s' : Subalgebra R C(α, A)\nr : s ≤ s'\nh : (fun s => SeparatesPoints s) s\nx y : α\nn : x ≠ y\nf : α → A\nm : f ∈ (fun f => ↑f) '' ↑s\nw : f x ≠ f y\n⊢ ∃ f, f ∈ (fun f => ↑f) '' ↑s' ∧ f x ≠ f y\n[PROOFSTEP]\nrcases m with ⟨f, ⟨m, rfl⟩⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\ns s' : Subalgebra R C(α, A)\nr : s ≤ s'\nh : (fun s => SeparatesPoints s) s\nx y : α\nn : x ≠ y\nf : C(α, A)\nm : f ∈ ↑s\nw : (fun f => ↑f) f x ≠ (fun f => ↑f) f y\n⊢ ∃ f, f ∈ (fun f => ↑f) '' ↑s' ∧ f x ≠ f y\n[PROOFSTEP]\nexact ⟨_, ⟨f, ⟨r m, rfl⟩⟩, w⟩\n[GOAL]\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\nk : R\na : α\n⊢ ↑(↑(algebraMap R C(α, A)) k) a = k • 1\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one]\n[GOAL]\nα : Type u_1\ninst✝⁹ : TopologicalSpace α\nR : Type u_2\ninst✝⁸ : CommSemiring R\nA : Type u_3\ninst✝⁷ : TopologicalSpace A\ninst✝⁶ : Semiring A\ninst✝⁵ : Algebra R A\ninst✝⁴ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝³ : TopologicalSpace A₂\ninst✝² : Semiring A₂\ninst✝¹ : Algebra R A₂\ninst✝ : TopologicalSemiring A₂\nk : R\na : α\n⊢ ↑(k • 1) a = k • 1\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝¹² : TopologicalSpace α\nR : Type u_2\ninst✝¹¹ : CommSemiring R\nA : Type u_3\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁶ : TopologicalSpace A₂\ninst✝⁵ : Semiring A₂\ninst✝⁴ : Algebra R A₂\ninst✝³ : TopologicalSemiring A₂\n𝕜 : Type u_5\ninst✝² : TopologicalSpace 𝕜\ns✝ : Set C(α, 𝕜)\nf : ↑s✝\nx✝ : α\ninst✝¹ : Field 𝕜\ninst✝ : TopologicalRing 𝕜\ns : Subalgebra 𝕜 C(α, 𝕜)\nh : SeparatesPoints s\nv : α → 𝕜\nx y : α\n⊢ ∃ f, f ∈ ↑s ∧ ↑f x = v x ∧ ↑f y = v y\n[PROOFSTEP]\nby_cases n : x = y\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹² : TopologicalSpace α\nR : Type u_2\ninst✝¹¹ : CommSemiring R\nA : Type u_3\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁶ : TopologicalSpace A₂\ninst✝⁵ : Semiring A₂\ninst✝⁴ : Algebra R A₂\ninst✝³ : TopologicalSemiring A₂\n𝕜 : Type u_5\ninst✝² : TopologicalSpace 𝕜\ns✝ : Set C(α, 𝕜)\nf : ↑s✝\nx✝ : α\ninst✝¹ : Field 𝕜\ninst✝ : TopologicalRing 𝕜\ns : Subalgebra 𝕜 C(α, 𝕜)\nh : SeparatesPoints s\nv : α → 𝕜\nx y : α\nn : x = y\n⊢ ∃ f, f ∈ ↑s ∧ ↑f x = v x ∧ ↑f y = v y\n[PROOFSTEP]\nsubst n\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹² : TopologicalSpace α\nR : Type u_2\ninst✝¹¹ : CommSemiring R\nA : Type u_3\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁶ : TopologicalSpace A₂\ninst✝⁵ : Semiring A₂\ninst✝⁴ : Algebra R A₂\ninst✝³ : TopologicalSemiring A₂\n𝕜 : Type u_5\ninst✝² : TopologicalSpace 𝕜\ns✝ : Set C(α, 𝕜)\nf : ↑s✝\nx✝ : α\ninst✝¹ : Field 𝕜\ninst✝ : TopologicalRing 𝕜\ns : Subalgebra 𝕜 C(α, 𝕜)\nh : SeparatesPoints s\nv : α → 𝕜\nx : α\n⊢ ∃ f, f ∈ ↑s ∧ ↑f x = v x ∧ ↑f x = v x\n[PROOFSTEP]\nrefine' ⟨_, (v x • (1 : s) : s).prop, mul_one _, mul_one _⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹² : TopologicalSpace α\nR : Type u_2\ninst✝¹¹ : CommSemiring R\nA : Type u_3\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁶ : TopologicalSpace A₂\ninst✝⁵ : Semiring A₂\ninst✝⁴ : Algebra R A₂\ninst✝³ : TopologicalSemiring A₂\n𝕜 : Type u_5\ninst✝² : TopologicalSpace 𝕜\ns✝ : Set C(α, 𝕜)\nf : ↑s✝\nx✝ : α\ninst✝¹ : Field 𝕜\ninst✝ : TopologicalRing 𝕜\ns : Subalgebra 𝕜 C(α, 𝕜)\nh : SeparatesPoints s\nv : α → 𝕜\nx y : α\nn : ¬x = y\n⊢ ∃ f, f ∈ ↑s ∧ ↑f x = v x ∧ ↑f y = v y\n[PROOFSTEP]\nobtain ⟨_, ⟨f, hf, rfl⟩, hxy⟩ := h n\n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\ninst✝¹² : TopologicalSpace α\nR : Type u_2\ninst✝¹¹ : CommSemiring R\nA : Type u_3\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁶ : TopologicalSpace A₂\ninst✝⁵ : Semiring A₂\ninst✝⁴ : Algebra R A₂\ninst✝³ : TopologicalSemiring A₂\n𝕜 : Type u_5\ninst✝² : TopologicalSpace 𝕜\ns✝ : Set C(α, 𝕜)\nf✝ : ↑s✝\nx✝ : α\ninst✝¹ : Field 𝕜\ninst✝ : TopologicalRing 𝕜\ns : Subalgebra 𝕜 C(α, 𝕜)\nh : SeparatesPoints s\nv : α → 𝕜\nx y : α\nn : ¬x = y\nf : C(α, 𝕜)\nhf : f ∈ ↑s\nhxy : (fun f => ↑f) f x ≠ (fun f => ↑f) f y\n⊢ ∃ f, f ∈ ↑s ∧ ↑f x = v x ∧ ↑f y = v y\n[PROOFSTEP]\nreplace hxy : f x - f y ≠ 0 := sub_ne_zero_of_ne hxy\n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\ninst✝¹² : TopologicalSpace α\nR : Type u_2\ninst✝¹¹ : CommSemiring R\nA : Type u_3\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁶ : TopologicalSpace A₂\ninst✝⁵ : Semiring A₂\ninst✝⁴ : Algebra R A₂\ninst✝³ : TopologicalSemiring A₂\n𝕜 : Type u_5\ninst✝² : TopologicalSpace 𝕜\ns✝ : Set C(α, 𝕜)\nf✝ : ↑s✝\nx✝ : α\ninst✝¹ : Field 𝕜\ninst✝ : TopologicalRing 𝕜\ns : Subalgebra 𝕜 C(α, 𝕜)\nh : SeparatesPoints s\nv : α → 𝕜\nx y : α\nn : ¬x = y\nf : C(α, 𝕜)\nhf : f ∈ ↑s\nhxy : ↑f x - ↑f y ≠ 0\n⊢ ∃ f, f ∈ ↑s ∧ ↑f x = v x ∧ ↑f y = v y\n[PROOFSTEP]\nlet a := v x\n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\ninst✝¹² : TopologicalSpace α\nR : Type u_2\ninst✝¹¹ : CommSemiring R\nA : Type u_3\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁶ : TopologicalSpace A₂\ninst✝⁵ : Semiring A₂\ninst✝⁴ : Algebra R A₂\ninst✝³ : TopologicalSemiring A₂\n𝕜 : Type u_5\ninst✝² : TopologicalSpace 𝕜\ns✝ : Set C(α, 𝕜)\nf✝ : ↑s✝\nx✝ : α\ninst✝¹ : Field 𝕜\ninst✝ : TopologicalRing 𝕜\ns : Subalgebra 𝕜 C(α, 𝕜)\nh : SeparatesPoints s\nv : α → 𝕜\nx y : α\nn : ¬x = y\nf : C(α, 𝕜)\nhf : f ∈ ↑s\nhxy : ↑f x - ↑f y ≠ 0\na : 𝕜 := v x\n⊢ ∃ f, f ∈ ↑s ∧ ↑f x = v x ∧ ↑f y = v y\n[PROOFSTEP]\nlet b := v y\n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\ninst✝¹² : TopologicalSpace α\nR : Type u_2\ninst✝¹¹ : CommSemiring R\nA : Type u_3\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁶ : TopologicalSpace A₂\ninst✝⁵ : Semiring A₂\ninst✝⁴ : Algebra R A₂\ninst✝³ : TopologicalSemiring A₂\n𝕜 : Type u_5\ninst✝² : TopologicalSpace 𝕜\ns✝ : Set C(α, 𝕜)\nf✝ : ↑s✝\nx✝ : α\ninst✝¹ : Field 𝕜\ninst✝ : TopologicalRing 𝕜\ns : Subalgebra 𝕜 C(α, 𝕜)\nh : SeparatesPoints s\nv : α → 𝕜\nx y : α\nn : ¬x = y\nf : C(α, 𝕜)\nhf : f ∈ ↑s\nhxy : ↑f x - ↑f y ≠ 0\na : 𝕜 := v x\nb : 𝕜 := v y\n⊢ ∃ f, f ∈ ↑s ∧ ↑f x = v x ∧ ↑f y = v y\n[PROOFSTEP]\nlet f' : s := ((b - a) * (f x - f y)⁻¹) • (algebraMap _ s (f x) - (⟨f, hf⟩ : s)) + algebraMap _ s a\n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\ninst✝¹² : TopologicalSpace α\nR : Type u_2\ninst✝¹¹ : CommSemiring R\nA : Type u_3\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁶ : TopologicalSpace A₂\ninst✝⁵ : Semiring A₂\ninst✝⁴ : Algebra R A₂\ninst✝³ : TopologicalSemiring A₂\n𝕜 : Type u_5\ninst✝² : TopologicalSpace 𝕜\ns✝ : Set C(α, 𝕜)\nf✝ : ↑s✝\nx✝ : α\ninst✝¹ : Field 𝕜\ninst✝ : TopologicalRing 𝕜\ns : Subalgebra 𝕜 C(α, 𝕜)\nh : SeparatesPoints s\nv : α → 𝕜\nx y : α\nn : ¬x = y\nf : C(α, 𝕜)\nhf : f ∈ ↑s\nhxy : ↑f x - ↑f y ≠ 0\na : 𝕜 := v x\nb : 𝕜 := v y\nf' : { x // x ∈ s } :=\n  ((b - a) * (↑f x - ↑f y)⁻¹) • (↑(algebraMap ((fun x => 𝕜) x) { x // x ∈ s }) (↑f x) - { val := f, property := hf }) +\n    ↑(algebraMap 𝕜 { x // x ∈ s }) a\n⊢ ∃ f, f ∈ ↑s ∧ ↑f x = v x ∧ ↑f y = v y\n[PROOFSTEP]\nrefine' ⟨f', f'.prop, _, _⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝¹² : TopologicalSpace α\nR : Type u_2\ninst✝¹¹ : CommSemiring R\nA : Type u_3\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁶ : TopologicalSpace A₂\ninst✝⁵ : Semiring A₂\ninst✝⁴ : Algebra R A₂\ninst✝³ : TopologicalSemiring A₂\n𝕜 : Type u_5\ninst✝² : TopologicalSpace 𝕜\ns✝ : Set C(α, 𝕜)\nf✝ : ↑s✝\nx✝ : α\ninst✝¹ : Field 𝕜\ninst✝ : TopologicalRing 𝕜\ns : Subalgebra 𝕜 C(α, 𝕜)\nh : SeparatesPoints s\nv : α → 𝕜\nx y : α\nn : ¬x = y\nf : C(α, 𝕜)\nhf : f ∈ ↑s\nhxy : ↑f x - ↑f y ≠ 0\na : 𝕜 := v x\nb : 𝕜 := v y\nf' : { x // x ∈ s } :=\n  ((b - a) * (↑f x - ↑f y)⁻¹) • (↑(algebraMap ((fun x => 𝕜) x) { x // x ∈ s }) (↑f x) - { val := f, property := hf }) +\n    ↑(algebraMap 𝕜 { x // x ∈ s }) a\n⊢ ↑↑f' x = v x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝¹² : TopologicalSpace α\nR : Type u_2\ninst✝¹¹ : CommSemiring R\nA : Type u_3\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : Algebra R A\ninst✝⁷ : TopologicalSemiring A\nA₂ : Type u_4\ninst✝⁶ : TopologicalSpace A₂\ninst✝⁵ : Semiring A₂\ninst✝⁴ : Algebra R A₂\ninst✝³ : TopologicalSemiring A₂\n𝕜 : Type u_5\ninst✝² : TopologicalSpace 𝕜\ns✝ : Set C(α, 𝕜)\nf✝ : ↑s✝\nx✝ : α\ninst✝¹ : Field 𝕜\ninst✝ : TopologicalRing 𝕜\ns : Subalgebra 𝕜 C(α, 𝕜)\nh : SeparatesPoints s\nv : α → 𝕜\nx y : α\nn : ¬x = y\nf : C(α, 𝕜)\nhf : f ∈ ↑s\nhxy : ↑f x - ↑f y ≠ 0\na : 𝕜 := v x\nb : 𝕜 := v y\nf' : { x // x ∈ s } :=\n  ((b - a) * (↑f x - ↑f y)⁻¹) • (↑(algebraMap ((fun x => 𝕜) x) { x // x ∈ s }) (↑f x) - { val := f, property := hf }) +\n    ↑(algebraMap 𝕜 { x // x ∈ s }) a\n⊢ ↑↑f' y = v y\n[PROOFSTEP]\nsimp [inv_mul_cancel_right₀ hxy]\n[GOAL]\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : Subsingleton α\ns₁ s₂ : Subalgebra R C(α, R)\n⊢ s₁ = s₂\n[PROOFSTEP]\ncases isEmpty_or_nonempty α\n[GOAL]\ncase inl\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : Subsingleton α\ns₁ s₂ : Subalgebra R C(α, R)\nh✝ : IsEmpty α\n⊢ s₁ = s₂\n[PROOFSTEP]\nhaveI : Subsingleton C(α, R) := FunLike.coe_injective.subsingleton\n[GOAL]\ncase inl\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : Subsingleton α\ns₁ s₂ : Subalgebra R C(α, R)\nh✝ : IsEmpty α\nthis : Subsingleton C(α, R)\n⊢ s₁ = s₂\n[PROOFSTEP]\nexact Subsingleton.elim _ _\n[GOAL]\ncase inr\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : Subsingleton α\ns₁ s₂ : Subalgebra R C(α, R)\nh✝ : Nonempty α\n⊢ s₁ = s₂\n[PROOFSTEP]\ninhabit α\n[GOAL]\ncase inr\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : Subsingleton α\ns₁ s₂ : Subalgebra R C(α, R)\nh✝ : Nonempty α\ninhabited_h : Inhabited α\n⊢ s₁ = s₂\n[PROOFSTEP]\next f\n[GOAL]\ncase inr.h\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : Subsingleton α\ns₁ s₂ : Subalgebra R C(α, R)\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : C(α, R)\n⊢ f ∈ s₁ ↔ f ∈ s₂\n[PROOFSTEP]\nhave h : f = algebraMap R C(α, R) (f default) := by\n  ext x'\n  simp only [mul_one, Algebra.id.smul_eq_mul, algebraMap_apply]\n  congr\n  simp\n[GOAL]\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : Subsingleton α\ns₁ s₂ : Subalgebra R C(α, R)\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : C(α, R)\n⊢ f = ↑(algebraMap R C(α, R)) (↑f default)\n[PROOFSTEP]\next x'\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : Subsingleton α\ns₁ s₂ : Subalgebra R C(α, R)\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : C(α, R)\nx' : α\n⊢ ↑f x' = ↑(↑(algebraMap R C(α, R)) (↑f default)) x'\n[PROOFSTEP]\nsimp only [mul_one, Algebra.id.smul_eq_mul, algebraMap_apply]\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : Subsingleton α\ns₁ s₂ : Subalgebra R C(α, R)\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : C(α, R)\nx' : α\n⊢ ↑f x' = ↑f default\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.h.e_6.h\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : Subsingleton α\ns₁ s₂ : Subalgebra R C(α, R)\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : C(α, R)\nx' : α\n⊢ x' = default\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.h\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : Subsingleton α\ns₁ s₂ : Subalgebra R C(α, R)\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : C(α, R)\nh : f = ↑(algebraMap R C(α, R)) (↑f default)\n⊢ f ∈ s₁ ↔ f ∈ s₂\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase inr.h\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : TopologicalSemiring R\ninst✝ : Subsingleton α\ns₁ s₂ : Subalgebra R C(α, R)\nh✝ : Nonempty α\ninhabited_h : Inhabited α\nf : C(α, R)\nh : f = ↑(algebraMap R C(α, R)) (↑f default)\n⊢ ↑(algebraMap R C(α, R)) (↑f default) ∈ s₁ ↔ ↑(algebraMap R C(α, R)) (↑f default) ∈ s₂\n[PROOFSTEP]\nsimp only [Subalgebra.algebraMap_mem]\n[GOAL]\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nR : Type u_2\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nM : Type u_3\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid M\ninst✝² : ContinuousAdd M\ninst✝¹ : Module R M\ninst✝ : ContinuousSMul R M\nf : C(α, M)\n⊢ 1 • f = f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nR : Type u_2\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nM : Type u_3\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid M\ninst✝² : ContinuousAdd M\ninst✝¹ : Module R M\ninst✝ : ContinuousSMul R M\nf : C(α, M)\nx : α\n⊢ ↑(1 • f) x = ↑f x\n[PROOFSTEP]\nexact one_smul R (f x)\n[GOAL]\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nR : Type u_2\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nM : Type u_3\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid M\ninst✝² : ContinuousAdd M\ninst✝¹ : Module R M\ninst✝ : ContinuousSMul R M\nc₁ c₂ : C(α, R)\nf : C(α, M)\n⊢ (c₁ * c₂) • f = c₁ • c₂ • f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nR : Type u_2\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nM : Type u_3\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid M\ninst✝² : ContinuousAdd M\ninst✝¹ : Module R M\ninst✝ : ContinuousSMul R M\nc₁ c₂ : C(α, R)\nf : C(α, M)\nx : α\n⊢ ↑((c₁ * c₂) • f) x = ↑(c₁ • c₂ • f) x\n[PROOFSTEP]\nexact mul_smul (c₁ x) (c₂ x) (f x)\n[GOAL]\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nR : Type u_2\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nM : Type u_3\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid M\ninst✝² : ContinuousAdd M\ninst✝¹ : Module R M\ninst✝ : ContinuousSMul R M\nr : C(α, R)\n⊢ r • 0 = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nR : Type u_2\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nM : Type u_3\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid M\ninst✝² : ContinuousAdd M\ninst✝¹ : Module R M\ninst✝ : ContinuousSMul R M\nr : C(α, R)\nx : α\n⊢ ↑(r • 0) x = ↑0 x\n[PROOFSTEP]\nexact smul_zero _\n[GOAL]\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nR : Type u_2\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nM : Type u_3\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid M\ninst✝² : ContinuousAdd M\ninst✝¹ : Module R M\ninst✝ : ContinuousSMul R M\nc : C(α, R)\nf g : C(α, M)\n⊢ c • (f + g) = c • f + c • g\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nR : Type u_2\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nM : Type u_3\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid M\ninst✝² : ContinuousAdd M\ninst✝¹ : Module R M\ninst✝ : ContinuousSMul R M\nc : C(α, R)\nf g : C(α, M)\nx : α\n⊢ ↑(c • (f + g)) x = ↑(c • f + c • g) x\n[PROOFSTEP]\nexact smul_add (c x) (f x) (g x)\n[GOAL]\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nR : Type u_2\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nM : Type u_3\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid M\ninst✝² : ContinuousAdd M\ninst✝¹ : Module R M\ninst✝ : ContinuousSMul R M\nc₁ c₂ : C(α, R)\nf : C(α, M)\n⊢ (c₁ + c₂) • f = c₁ • f + c₂ • f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nR : Type u_2\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nM : Type u_3\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid M\ninst✝² : ContinuousAdd M\ninst✝¹ : Module R M\ninst✝ : ContinuousSMul R M\nc₁ c₂ : C(α, R)\nf : C(α, M)\nx : α\n⊢ ↑((c₁ + c₂) • f) x = ↑(c₁ • f + c₂ • f) x\n[PROOFSTEP]\nexact add_smul (c₁ x) (c₂ x) (f x)\n[GOAL]\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nR : Type u_2\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nM : Type u_3\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid M\ninst✝² : ContinuousAdd M\ninst✝¹ : Module R M\ninst✝ : ContinuousSMul R M\nf : C(α, M)\n⊢ 0 • f = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nR : Type u_2\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nM : Type u_3\ninst✝⁴ : TopologicalSpace M\ninst✝³ : AddCommMonoid M\ninst✝² : ContinuousAdd M\ninst✝¹ : Module R M\ninst✝ : ContinuousSMul R M\nf : C(α, M)\nx : α\n⊢ ↑(0 • f) x = ↑0 x\n[PROOFSTEP]\nexact zero_smul _ _\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝¹⁴ : TopologicalSpace X\ninst✝¹³ : TopologicalSpace Y\ninst✝¹² : TopologicalSpace Z\n𝕜 : Type u_4\ninst✝¹¹ : CommSemiring 𝕜\nA : Type u_5\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : TopologicalSemiring A\ninst✝⁷ : StarRing A\ninst✝⁶ : ContinuousStar A\ninst✝⁵ : Algebra 𝕜 A\ninst✝⁴ : AddCommGroup X\ninst✝³ : TopologicalAddGroup X\ninst✝² : AddCommMonoid Y\ninst✝¹ : ContinuousAdd Y\ninst✝ : T2Space Y\nf : C(X, Y)\np : X\n⊢ Function.Periodic (↑(∑' (n : ℤ), comp f (ContinuousMap.addRight (n • p)))) p\n[PROOFSTEP]\nintro x\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝¹⁴ : TopologicalSpace X\ninst✝¹³ : TopologicalSpace Y\ninst✝¹² : TopologicalSpace Z\n𝕜 : Type u_4\ninst✝¹¹ : CommSemiring 𝕜\nA : Type u_5\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : TopologicalSemiring A\ninst✝⁷ : StarRing A\ninst✝⁶ : ContinuousStar A\ninst✝⁵ : Algebra 𝕜 A\ninst✝⁴ : AddCommGroup X\ninst✝³ : TopologicalAddGroup X\ninst✝² : AddCommMonoid Y\ninst✝¹ : ContinuousAdd Y\ninst✝ : T2Space Y\nf : C(X, Y)\np x : X\n⊢ ↑(∑' (n : ℤ), comp f (ContinuousMap.addRight (n • p))) (x + p) =\n    ↑(∑' (n : ℤ), comp f (ContinuousMap.addRight (n • p))) x\n[PROOFSTEP]\nby_cases h : Summable fun n : ℤ => f.comp (ContinuousMap.addRight (n • p))\n[GOAL]\ncase pos\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝¹⁴ : TopologicalSpace X\ninst✝¹³ : TopologicalSpace Y\ninst✝¹² : TopologicalSpace Z\n𝕜 : Type u_4\ninst✝¹¹ : CommSemiring 𝕜\nA : Type u_5\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : TopologicalSemiring A\ninst✝⁷ : StarRing A\ninst✝⁶ : ContinuousStar A\ninst✝⁵ : Algebra 𝕜 A\ninst✝⁴ : AddCommGroup X\ninst✝³ : TopologicalAddGroup X\ninst✝² : AddCommMonoid Y\ninst✝¹ : ContinuousAdd Y\ninst✝ : T2Space Y\nf : C(X, Y)\np x : X\nh : Summable fun n => comp f (ContinuousMap.addRight (n • p))\n⊢ ↑(∑' (n : ℤ), comp f (ContinuousMap.addRight (n • p))) (x + p) =\n    ↑(∑' (n : ℤ), comp f (ContinuousMap.addRight (n • p))) x\n[PROOFSTEP]\nconvert congr_arg (fun f : C(X, Y) => f x) ((Equiv.addRight (1 : ℤ)).tsum_eq _) using 1\n  -- Porting note: in mathlib3 the proof from here was:\n      -- simp_rw [←tsum_apply h, ←tsum_apply ((equiv.add_right (1 : ℤ)).summable_iff.mpr h),\n      --   equiv.coe_add_right, comp_apply, coe_add_right, add_one_zsmul, add_comm (_ • p) p,\n      --   ←add_assoc]\n      -- However now the second `←tsum_apply` doesn't fire unless we use `erw`.\n[GOAL]\ncase h.e'_2\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝¹⁴ : TopologicalSpace X\ninst✝¹³ : TopologicalSpace Y\ninst✝¹² : TopologicalSpace Z\n𝕜 : Type u_4\ninst✝¹¹ : CommSemiring 𝕜\nA : Type u_5\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : TopologicalSemiring A\ninst✝⁷ : StarRing A\ninst✝⁶ : ContinuousStar A\ninst✝⁵ : Algebra 𝕜 A\ninst✝⁴ : AddCommGroup X\ninst✝³ : TopologicalAddGroup X\ninst✝² : AddCommMonoid Y\ninst✝¹ : ContinuousAdd Y\ninst✝ : T2Space Y\nf : C(X, Y)\np x : X\nh : Summable fun n => comp f (ContinuousMap.addRight (n • p))\n⊢ ↑(∑' (n : ℤ), comp f (ContinuousMap.addRight (n • p))) (x + p) =\n    ↑(∑' (c : ℤ), comp f (ContinuousMap.addRight (↑(Equiv.addRight 1) c • p))) x\n[PROOFSTEP]\nsimp_rw [← tsum_apply h]\n[GOAL]\ncase h.e'_2\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝¹⁴ : TopologicalSpace X\ninst✝¹³ : TopologicalSpace Y\ninst✝¹² : TopologicalSpace Z\n𝕜 : Type u_4\ninst✝¹¹ : CommSemiring 𝕜\nA : Type u_5\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : TopologicalSemiring A\ninst✝⁷ : StarRing A\ninst✝⁶ : ContinuousStar A\ninst✝⁵ : Algebra 𝕜 A\ninst✝⁴ : AddCommGroup X\ninst✝³ : TopologicalAddGroup X\ninst✝² : AddCommMonoid Y\ninst✝¹ : ContinuousAdd Y\ninst✝ : T2Space Y\nf : C(X, Y)\np x : X\nh : Summable fun n => comp f (ContinuousMap.addRight (n • p))\n⊢ ∑' (i : ℤ), ↑(comp f (ContinuousMap.addRight (i • p))) (x + p) =\n    ↑(∑' (c : ℤ), comp f (ContinuousMap.addRight (↑(Equiv.addRight 1) c • p))) x\n[PROOFSTEP]\nerw [← tsum_apply ((Equiv.addRight (1 : ℤ)).summable_iff.mpr h)]\n[GOAL]\ncase h.e'_2\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝¹⁴ : TopologicalSpace X\ninst✝¹³ : TopologicalSpace Y\ninst✝¹² : TopologicalSpace Z\n𝕜 : Type u_4\ninst✝¹¹ : CommSemiring 𝕜\nA : Type u_5\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : TopologicalSemiring A\ninst✝⁷ : StarRing A\ninst✝⁶ : ContinuousStar A\ninst✝⁵ : Algebra 𝕜 A\ninst✝⁴ : AddCommGroup X\ninst✝³ : TopologicalAddGroup X\ninst✝² : AddCommMonoid Y\ninst✝¹ : ContinuousAdd Y\ninst✝ : T2Space Y\nf : C(X, Y)\np x : X\nh : Summable fun n => comp f (ContinuousMap.addRight (n • p))\n⊢ ∑' (i : ℤ), ↑(comp f (ContinuousMap.addRight (i • p))) (x + p) =\n    ∑' (i : ℤ), ↑(((fun n => comp f (ContinuousMap.addRight (n • p))) ∘ ↑(Equiv.addRight 1)) i) x\n[PROOFSTEP]\nsimp [coe_addRight, add_one_zsmul, add_comm (_ • p) p, ← add_assoc]\n[GOAL]\ncase neg\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝¹⁴ : TopologicalSpace X\ninst✝¹³ : TopologicalSpace Y\ninst✝¹² : TopologicalSpace Z\n𝕜 : Type u_4\ninst✝¹¹ : CommSemiring 𝕜\nA : Type u_5\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : TopologicalSemiring A\ninst✝⁷ : StarRing A\ninst✝⁶ : ContinuousStar A\ninst✝⁵ : Algebra 𝕜 A\ninst✝⁴ : AddCommGroup X\ninst✝³ : TopologicalAddGroup X\ninst✝² : AddCommMonoid Y\ninst✝¹ : ContinuousAdd Y\ninst✝ : T2Space Y\nf : C(X, Y)\np x : X\nh : ¬Summable fun n => comp f (ContinuousMap.addRight (n • p))\n⊢ ↑(∑' (n : ℤ), comp f (ContinuousMap.addRight (n • p))) (x + p) =\n    ↑(∑' (n : ℤ), comp f (ContinuousMap.addRight (n • p))) x\n[PROOFSTEP]\nrw [tsum_eq_zero_of_not_summable h]\n[GOAL]\ncase neg\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝¹⁴ : TopologicalSpace X\ninst✝¹³ : TopologicalSpace Y\ninst✝¹² : TopologicalSpace Z\n𝕜 : Type u_4\ninst✝¹¹ : CommSemiring 𝕜\nA : Type u_5\ninst✝¹⁰ : TopologicalSpace A\ninst✝⁹ : Semiring A\ninst✝⁸ : TopologicalSemiring A\ninst✝⁷ : StarRing A\ninst✝⁶ : ContinuousStar A\ninst✝⁵ : Algebra 𝕜 A\ninst✝⁴ : AddCommGroup X\ninst✝³ : TopologicalAddGroup X\ninst✝² : AddCommMonoid Y\ninst✝¹ : ContinuousAdd Y\ninst✝ : T2Space Y\nf : C(X, Y)\np x : X\nh : ¬Summable fun n => comp f (ContinuousMap.addRight (n • p))\n⊢ ↑0 (x + p) = ↑0 x\n[PROOFSTEP]\nsimp only [coe_zero, Pi.zero_apply]\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝⁸ : TopologicalSpace X\ninst✝⁷ : TopologicalSpace Y\n𝕜 : Type u_3\ninst✝⁶ : CommSemiring 𝕜\nA : Type u_4\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : Semiring A\ninst✝³ : TopologicalSemiring A\ninst✝² : StarRing A\ninst✝¹ : ContinuousStar A\ninst✝ : Algebra 𝕜 A\nf : X ≃ₜ Y\nsrc✝ : C(Y, A) →⋆ₐ[𝕜] C(X, A) := ContinuousMap.compStarAlgHom' 𝕜 A (toContinuousMap f)\ng : C(Y, A)\n⊢ ↑(ContinuousMap.compStarAlgHom' 𝕜 A (toContinuousMap (Homeomorph.symm f)))\n      (↑(ContinuousMap.compStarAlgHom' 𝕜 A (toContinuousMap f)) g) =\n    g\n[PROOFSTEP]\nsimp only [ContinuousMap.compStarAlgHom'_apply, ContinuousMap.comp_assoc, toContinuousMap_comp_symm,\n  ContinuousMap.comp_id]\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝⁸ : TopologicalSpace X\ninst✝⁷ : TopologicalSpace Y\n𝕜 : Type u_3\ninst✝⁶ : CommSemiring 𝕜\nA : Type u_4\ninst✝⁵ : TopologicalSpace A\ninst✝⁴ : Semiring A\ninst✝³ : TopologicalSemiring A\ninst✝² : StarRing A\ninst✝¹ : ContinuousStar A\ninst✝ : Algebra 𝕜 A\nf : X ≃ₜ Y\nsrc✝ : C(Y, A) →⋆ₐ[𝕜] C(X, A) := ContinuousMap.compStarAlgHom' 𝕜 A (toContinuousMap f)\ng : C(X, A)\n⊢ ↑(ContinuousMap.compStarAlgHom' 𝕜 A (toContinuousMap f))\n      (↑(ContinuousMap.compStarAlgHom' 𝕜 A (toContinuousMap (Homeomorph.symm f))) g) =\n    g\n[PROOFSTEP]\nsimp only [ContinuousMap.compStarAlgHom'_apply, ContinuousMap.comp_assoc, symm_comp_toContinuousMap,\n  ContinuousMap.comp_id]\n", "meta": {"mathlib_filename": "Mathlib.Topology.ContinuousFunction.Algebra", "llama_tokens": 28920, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.37719850583480313}}
{"text": "[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nhbdd : BddBelow (range fun n => u n / ↑n)\nn : ℕ\nhn : n ≠ 0\n⊢ Subadditive.lim h ≤ u n / ↑n\n[PROOFSTEP]\nrw [Subadditive.lim]\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nhbdd : BddBelow (range fun n => u n / ↑n)\nn : ℕ\nhn : n ≠ 0\n⊢ sInf ((fun n => u n / ↑n) '' Ici 1) ≤ u n / ↑n\n[PROOFSTEP]\nexact csInf_le (hbdd.mono <| image_subset_range _ _) ⟨n, hn.bot_lt, rfl⟩\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nk n r : ℕ\n⊢ u (k * n + r) ≤ ↑k * u n + u r\n[PROOFSTEP]\ninduction k with\n| zero => simp only [Nat.zero_eq, Nat.cast_zero, zero_mul, zero_add]; rfl\n| succ k IH =>\n  calc\n    u ((k + 1) * n + r) = u (n + (k * n + r)) := by congr 1; ring\n    _ ≤ u n + u (k * n + r) := (h _ _)\n    _ ≤ u n + (k * u n + u r) := (add_le_add_left IH _)\n    _ = (k + 1 : ℕ) * u n + u r := by simp; ring\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nk n r : ℕ\n⊢ u (k * n + r) ≤ ↑k * u n + u r\n[PROOFSTEP]\ninduction k with\n| zero => simp only [Nat.zero_eq, Nat.cast_zero, zero_mul, zero_add]; rfl\n| succ k IH =>\n  calc\n    u ((k + 1) * n + r) = u (n + (k * n + r)) := by congr 1; ring\n    _ ≤ u n + u (k * n + r) := (h _ _)\n    _ ≤ u n + (k * u n + u r) := (add_le_add_left IH _)\n    _ = (k + 1 : ℕ) * u n + u r := by simp; ring\n[GOAL]\ncase zero\nu : ℕ → ℝ\nh : Subadditive u\nn r : ℕ\n⊢ u (Nat.zero * n + r) ≤ ↑Nat.zero * u n + u r\n[PROOFSTEP]\n\n| zero => simp only [Nat.zero_eq, Nat.cast_zero, zero_mul, zero_add]; rfl\n[GOAL]\ncase zero\nu : ℕ → ℝ\nh : Subadditive u\nn r : ℕ\n⊢ u (Nat.zero * n + r) ≤ ↑Nat.zero * u n + u r\n[PROOFSTEP]\nsimp only [Nat.zero_eq, Nat.cast_zero, zero_mul, zero_add]\n[GOAL]\ncase zero\nu : ℕ → ℝ\nh : Subadditive u\nn r : ℕ\n⊢ u r ≤ u r\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nu : ℕ → ℝ\nh : Subadditive u\nn r k : ℕ\nIH : u (k * n + r) ≤ ↑k * u n + u r\n⊢ u (Nat.succ k * n + r) ≤ ↑(Nat.succ k) * u n + u r\n[PROOFSTEP]\n\n| succ k IH =>\n  calc\n    u ((k + 1) * n + r) = u (n + (k * n + r)) := by congr 1; ring\n    _ ≤ u n + u (k * n + r) := (h _ _)\n    _ ≤ u n + (k * u n + u r) := (add_le_add_left IH _)\n    _ = (k + 1 : ℕ) * u n + u r := by simp; ring\n[GOAL]\ncase succ\nu : ℕ → ℝ\nh : Subadditive u\nn r k : ℕ\nIH : u (k * n + r) ≤ ↑k * u n + u r\n⊢ u (Nat.succ k * n + r) ≤ ↑(Nat.succ k) * u n + u r\n[PROOFSTEP]\ncalc\n  u ((k + 1) * n + r) = u (n + (k * n + r)) := by congr 1; ring\n  _ ≤ u n + u (k * n + r) := (h _ _)\n  _ ≤ u n + (k * u n + u r) := (add_le_add_left IH _)\n  _ = (k + 1 : ℕ) * u n + u r := by simp; ring\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nn r k : ℕ\nIH : u (k * n + r) ≤ ↑k * u n + u r\n⊢ u ((k + 1) * n + r) = u (n + (k * n + r))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nu : ℕ → ℝ\nh : Subadditive u\nn r k : ℕ\nIH : u (k * n + r) ≤ ↑k * u n + u r\n⊢ (k + 1) * n + r = n + (k * n + r)\n[PROOFSTEP]\nring\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nn r k : ℕ\nIH : u (k * n + r) ≤ ↑k * u n + u r\n⊢ u n + (↑k * u n + u r) = ↑(k + 1) * u n + u r\n[PROOFSTEP]\nsimp\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nn r k : ℕ\nIH : u (k * n + r) ≤ ↑k * u n + u r\n⊢ u n + (↑k * u n + u r) = (↑k + 1) * u n + u r\n[PROOFSTEP]\nring\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nL : ℝ\nn : ℕ\nhn : n ≠ 0\nhL : u n / ↑n < L\n⊢ ∀ᶠ (p : ℕ) in atTop, u p / ↑p < L\n[PROOFSTEP]\nrefine\n  .atTop_of_arithmetic hn fun r _ =>\n    ?_\n      /- `(k * u n + u r) / (k * n + r)` tends to `u n / n < L`, hence\n        `(k * u n + u r) / (k * n + r) < L` for sufficiently large `k`. -/\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nL : ℝ\nn : ℕ\nhn : n ≠ 0\nhL : u n / ↑n < L\nr : ℕ\nx✝ : r < n\n⊢ ∀ᶠ (a : ℕ) in atTop, u (n * a + r) / ↑(n * a + r) < L\n[PROOFSTEP]\nhave A : Tendsto (fun x : ℝ => (u n + u r / x) / (n + r / x)) atTop (𝓝 ((u n + 0) / (n + 0))) :=\n  (tendsto_const_nhds.add <| tendsto_const_nhds.div_atTop tendsto_id).div\n      (tendsto_const_nhds.add <| tendsto_const_nhds.div_atTop tendsto_id) <|\n    by simpa\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nL : ℝ\nn : ℕ\nhn : n ≠ 0\nhL : u n / ↑n < L\nr : ℕ\nx✝ : r < n\n⊢ ↑n + 0 ≠ 0\n[PROOFSTEP]\nsimpa\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nL : ℝ\nn : ℕ\nhn : n ≠ 0\nhL : u n / ↑n < L\nr : ℕ\nx✝ : r < n\nA : Tendsto (fun x => (u n + u r / x) / (↑n + ↑r / x)) atTop (𝓝 ((u n + 0) / (↑n + 0)))\n⊢ ∀ᶠ (a : ℕ) in atTop, u (n * a + r) / ↑(n * a + r) < L\n[PROOFSTEP]\nhave B : Tendsto (fun x => (x * u n + u r) / (x * n + r)) atTop (𝓝 (u n / n)) :=\n  by\n  rw [add_zero, add_zero] at A \n  refine A.congr' <| (eventually_ne_atTop 0).mono fun x hx => ?_\n  simp only [(· ∘ ·), add_div' _ _ _ hx, div_div_div_cancel_right _ hx, mul_comm]\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nL : ℝ\nn : ℕ\nhn : n ≠ 0\nhL : u n / ↑n < L\nr : ℕ\nx✝ : r < n\nA : Tendsto (fun x => (u n + u r / x) / (↑n + ↑r / x)) atTop (𝓝 ((u n + 0) / (↑n + 0)))\n⊢ Tendsto (fun x => (x * u n + u r) / (x * ↑n + ↑r)) atTop (𝓝 (u n / ↑n))\n[PROOFSTEP]\nrw [add_zero, add_zero] at A \n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nL : ℝ\nn : ℕ\nhn : n ≠ 0\nhL : u n / ↑n < L\nr : ℕ\nx✝ : r < n\nA : Tendsto (fun x => (u n + u r / x) / (↑n + ↑r / x)) atTop (𝓝 (u n / ↑n))\n⊢ Tendsto (fun x => (x * u n + u r) / (x * ↑n + ↑r)) atTop (𝓝 (u n / ↑n))\n[PROOFSTEP]\nrefine A.congr' <| (eventually_ne_atTop 0).mono fun x hx => ?_\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nL : ℝ\nn : ℕ\nhn : n ≠ 0\nhL : u n / ↑n < L\nr : ℕ\nx✝ : r < n\nA : Tendsto (fun x => (u n + u r / x) / (↑n + ↑r / x)) atTop (𝓝 (u n / ↑n))\nx : ℝ\nhx : x ≠ 0\n⊢ (u n + u r / x) / (↑n + ↑r / x) = (fun x => (x * u n + u r) / (x * ↑n + ↑r)) x\n[PROOFSTEP]\nsimp only [(· ∘ ·), add_div' _ _ _ hx, div_div_div_cancel_right _ hx, mul_comm]\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nL : ℝ\nn : ℕ\nhn : n ≠ 0\nhL : u n / ↑n < L\nr : ℕ\nx✝ : r < n\nA : Tendsto (fun x => (u n + u r / x) / (↑n + ↑r / x)) atTop (𝓝 ((u n + 0) / (↑n + 0)))\nB : Tendsto (fun x => (x * u n + u r) / (x * ↑n + ↑r)) atTop (𝓝 (u n / ↑n))\n⊢ ∀ᶠ (a : ℕ) in atTop, u (n * a + r) / ↑(n * a + r) < L\n[PROOFSTEP]\nrefine\n  ((B.comp tendsto_nat_cast_atTop_atTop).eventually (gt_mem_nhds hL)).mono fun k hk =>\n    ?_\n      /- Finally, we use an upper estimate on `u (k * n + r)` to get an estimate on\n        `u (k * n + r) / (k * n + r)`. -/\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nL : ℝ\nn : ℕ\nhn : n ≠ 0\nhL : u n / ↑n < L\nr : ℕ\nx✝ : r < n\nA : Tendsto (fun x => (u n + u r / x) / (↑n + ↑r / x)) atTop (𝓝 ((u n + 0) / (↑n + 0)))\nB : Tendsto (fun x => (x * u n + u r) / (x * ↑n + ↑r)) atTop (𝓝 (u n / ↑n))\nk : ℕ\nhk : ((fun x => (x * u n + u r) / (x * ↑n + ↑r)) ∘ Nat.cast) k < L\n⊢ u (n * k + r) / ↑(n * k + r) < L\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nL : ℝ\nn : ℕ\nhn : n ≠ 0\nhL : u n / ↑n < L\nr : ℕ\nx✝ : r < n\nA : Tendsto (fun x => (u n + u r / x) / (↑n + ↑r / x)) atTop (𝓝 ((u n + 0) / (↑n + 0)))\nB : Tendsto (fun x => (x * u n + u r) / (x * ↑n + ↑r)) atTop (𝓝 (u n / ↑n))\nk : ℕ\nhk : ((fun x => (x * u n + u r) / (x * ↑n + ↑r)) ∘ Nat.cast) k < L\n⊢ u (k * n + r) / ↑(k * n + r) < L\n[PROOFSTEP]\nrefine lt_of_le_of_lt ?_ hk\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nL : ℝ\nn : ℕ\nhn : n ≠ 0\nhL : u n / ↑n < L\nr : ℕ\nx✝ : r < n\nA : Tendsto (fun x => (u n + u r / x) / (↑n + ↑r / x)) atTop (𝓝 ((u n + 0) / (↑n + 0)))\nB : Tendsto (fun x => (x * u n + u r) / (x * ↑n + ↑r)) atTop (𝓝 (u n / ↑n))\nk : ℕ\nhk : ((fun x => (x * u n + u r) / (x * ↑n + ↑r)) ∘ Nat.cast) k < L\n⊢ u (k * n + r) / ↑(k * n + r) ≤ ((fun x => (x * u n + u r) / (x * ↑n + ↑r)) ∘ Nat.cast) k\n[PROOFSTEP]\nsimp only [(· ∘ ·), ← Nat.cast_add, ← Nat.cast_mul]\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nL : ℝ\nn : ℕ\nhn : n ≠ 0\nhL : u n / ↑n < L\nr : ℕ\nx✝ : r < n\nA : Tendsto (fun x => (u n + u r / x) / (↑n + ↑r / x)) atTop (𝓝 ((u n + 0) / (↑n + 0)))\nB : Tendsto (fun x => (x * u n + u r) / (x * ↑n + ↑r)) atTop (𝓝 (u n / ↑n))\nk : ℕ\nhk : ((fun x => (x * u n + u r) / (x * ↑n + ↑r)) ∘ Nat.cast) k < L\n⊢ u (k * n + r) / ↑(k * n + r) ≤ (↑k * u n + u r) / ↑(k * n + r)\n[PROOFSTEP]\nexact div_le_div_of_le (Nat.cast_nonneg _) (h.apply_mul_add_le _ _ _)\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nhbdd : BddBelow (range fun n => u n / ↑n)\n⊢ Tendsto (fun n => u n / ↑n) atTop (𝓝 (Subadditive.lim h))\n[PROOFSTEP]\nrefine' tendsto_order.2 ⟨fun l hl => _, fun L hL => _⟩\n[GOAL]\ncase refine'_1\nu : ℕ → ℝ\nh : Subadditive u\nhbdd : BddBelow (range fun n => u n / ↑n)\nl : ℝ\nhl : l < Subadditive.lim h\n⊢ ∀ᶠ (b : ℕ) in atTop, l < u b / ↑b\n[PROOFSTEP]\nrefine' eventually_atTop.2 ⟨1, fun n hn => hl.trans_le (h.lim_le_div hbdd (zero_lt_one.trans_le hn).ne')⟩\n[GOAL]\ncase refine'_2\nu : ℕ → ℝ\nh : Subadditive u\nhbdd : BddBelow (range fun n => u n / ↑n)\nL : ℝ\nhL : L > Subadditive.lim h\n⊢ ∀ᶠ (b : ℕ) in atTop, u b / ↑b < L\n[PROOFSTEP]\nobtain ⟨n, npos, hn⟩ : ∃ n : ℕ, 0 < n ∧ u n / n < L :=\n  by\n  rw [Subadditive.lim] at hL \n  rcases exists_lt_of_csInf_lt (by simp) hL with ⟨x, hx, xL⟩\n  rcases(mem_image _ _ _).1 hx with ⟨n, hn, rfl⟩\n  exact ⟨n, zero_lt_one.trans_le hn, xL⟩\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nhbdd : BddBelow (range fun n => u n / ↑n)\nL : ℝ\nhL : L > Subadditive.lim h\n⊢ ∃ n, 0 < n ∧ u n / ↑n < L\n[PROOFSTEP]\nrw [Subadditive.lim] at hL \n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nhbdd : BddBelow (range fun n => u n / ↑n)\nL : ℝ\nhL : L > sInf ((fun n => u n / ↑n) '' Ici 1)\n⊢ ∃ n, 0 < n ∧ u n / ↑n < L\n[PROOFSTEP]\nrcases exists_lt_of_csInf_lt (by simp) hL with ⟨x, hx, xL⟩\n[GOAL]\nu : ℕ → ℝ\nh : Subadditive u\nhbdd : BddBelow (range fun n => u n / ↑n)\nL : ℝ\nhL : L > sInf ((fun n => u n / ↑n) '' Ici 1)\n⊢ Set.Nonempty ((fun n => u n / ↑n) '' Ici 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro\nu : ℕ → ℝ\nh : Subadditive u\nhbdd : BddBelow (range fun n => u n / ↑n)\nL : ℝ\nhL : L > sInf ((fun n => u n / ↑n) '' Ici 1)\nx : ℝ\nhx : x ∈ (fun n => u n / ↑n) '' Ici 1\nxL : x < L\n⊢ ∃ n, 0 < n ∧ u n / ↑n < L\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 hx with ⟨n, hn, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nu : ℕ → ℝ\nh : Subadditive u\nhbdd : BddBelow (range fun n => u n / ↑n)\nL : ℝ\nhL : L > sInf ((fun n => u n / ↑n) '' Ici 1)\nn : ℕ\nhn : n ∈ Ici 1\nhx : u n / ↑n ∈ (fun n => u n / ↑n) '' Ici 1\nxL : u n / ↑n < L\n⊢ ∃ n, 0 < n ∧ u n / ↑n < L\n[PROOFSTEP]\nexact ⟨n, zero_lt_one.trans_le hn, xL⟩\n[GOAL]\ncase refine'_2.intro.intro\nu : ℕ → ℝ\nh : Subadditive u\nhbdd : BddBelow (range fun n => u n / ↑n)\nL : ℝ\nhL : L > Subadditive.lim h\nn : ℕ\nnpos : 0 < n\nhn : u n / ↑n < L\n⊢ ∀ᶠ (b : ℕ) in atTop, u b / ↑b < L\n[PROOFSTEP]\nexact h.eventually_div_lt_of_div_lt npos.ne' hn\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Subadditive", "llama_tokens": 5607, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442251201477016, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.3769368613651355}}
{"text": "[GOAL]\n⊢ LargeCategory SSet\n[PROOFSTEP]\ndsimp only [SSet]\n[GOAL]\n⊢ LargeCategory (SimplicialObject (Type ?u.23))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ HasLimits SSet\n[PROOFSTEP]\ndsimp only [SSet]\n[GOAL]\n⊢ HasLimits (SimplicialObject (Type ?u.489))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n⊢ HasColimits SSet\n[PROOFSTEP]\ndsimp only [SSet]\n[GOAL]\n⊢ HasColimits (SimplicialObject (Type ?u.577))\n[PROOFSTEP]\ninfer_instance\n  -- Porting note: added an `ext` lemma.\n  -- See https://github.com/leanprover-community/mathlib4/issues/5229\n[GOAL]\nn : ℕ\nm₁ m₂ : SimplexCategoryᵒᵖ\nf : m₁ ⟶ m₂\nα : (fun m => { α // ¬Function.Surjective ↑(asOrderHom α) }) m₁\n⊢ ¬Function.Surjective ↑(asOrderHom (f.unop ≫ ↑α))\n[PROOFSTEP]\nintro h\n[GOAL]\nn : ℕ\nm₁ m₂ : SimplexCategoryᵒᵖ\nf : m₁ ⟶ m₂\nα : (fun m => { α // ¬Function.Surjective ↑(asOrderHom α) }) m₁\nh : Function.Surjective ↑(asOrderHom (f.unop ≫ ↑α))\n⊢ False\n[PROOFSTEP]\napply α.property\n[GOAL]\nn : ℕ\nm₁ m₂ : SimplexCategoryᵒᵖ\nf : m₁ ⟶ m₂\nα : (fun m => { α // ¬Function.Surjective ↑(asOrderHom α) }) m₁\nh : Function.Surjective ↑(asOrderHom (f.unop ≫ ↑α))\n⊢ Function.Surjective ↑(asOrderHom ↑α)\n[PROOFSTEP]\nexact Function.Surjective.of_comp h\n[GOAL]\nn : ℕ\ni : Fin (n + 1)\nm₁ m₂ : SimplexCategoryᵒᵖ\nf : m₁ ⟶ m₂\nα : (fun m => { α // Set.range ↑(asOrderHom α) ∪ {i} ≠ Set.univ }) m₁\n⊢ Set.range ↑(asOrderHom (f.unop ≫ ↑α)) ∪ {i} ≠ Set.univ\n[PROOFSTEP]\nintro h\n[GOAL]\nn : ℕ\ni : Fin (n + 1)\nm₁ m₂ : SimplexCategoryᵒᵖ\nf : m₁ ⟶ m₂\nα : (fun m => { α // Set.range ↑(asOrderHom α) ∪ {i} ≠ Set.univ }) m₁\nh : Set.range ↑(asOrderHom (f.unop ≫ ↑α)) ∪ {i} = Set.univ\n⊢ False\n[PROOFSTEP]\napply α.property\n[GOAL]\nn : ℕ\ni : Fin (n + 1)\nm₁ m₂ : SimplexCategoryᵒᵖ\nf : m₁ ⟶ m₂\nα : (fun m => { α // Set.range ↑(asOrderHom α) ∪ {i} ≠ Set.univ }) m₁\nh : Set.range ↑(asOrderHom (f.unop ≫ ↑α)) ∪ {i} = Set.univ\n⊢ Set.range ↑(asOrderHom ↑α) ∪ {i} = Set.univ\n[PROOFSTEP]\nrw [Set.eq_univ_iff_forall] at h ⊢\n[GOAL]\nn : ℕ\ni : Fin (n + 1)\nm₁ m₂ : SimplexCategoryᵒᵖ\nf : m₁ ⟶ m₂\nα : (fun m => { α // Set.range ↑(asOrderHom α) ∪ {i} ≠ Set.univ }) m₁\nh : ∀ (x : Fin (n + 1)), x ∈ Set.range ↑(asOrderHom (f.unop ≫ ↑α)) ∪ {i}\n⊢ ∀ (x : Fin (n + 1)), x ∈ Set.range ↑(asOrderHom ↑α) ∪ {i}\n[PROOFSTEP]\nintro j\n[GOAL]\nn : ℕ\ni : Fin (n + 1)\nm₁ m₂ : SimplexCategoryᵒᵖ\nf : m₁ ⟶ m₂\nα : (fun m => { α // Set.range ↑(asOrderHom α) ∪ {i} ≠ Set.univ }) m₁\nh : ∀ (x : Fin (n + 1)), x ∈ Set.range ↑(asOrderHom (f.unop ≫ ↑α)) ∪ {i}\nj : Fin (n + 1)\n⊢ j ∈ Set.range ↑(asOrderHom ↑α) ∪ {i}\n[PROOFSTEP]\napply Or.imp _ id (h j)\n[GOAL]\nn : ℕ\ni : Fin (n + 1)\nm₁ m₂ : SimplexCategoryᵒᵖ\nf : m₁ ⟶ m₂\nα : (fun m => { α // Set.range ↑(asOrderHom α) ∪ {i} ≠ Set.univ }) m₁\nh : ∀ (x : Fin (n + 1)), x ∈ Set.range ↑(asOrderHom (f.unop ≫ ↑α)) ∪ {i}\nj : Fin (n + 1)\n⊢ j ∈ Set.range ↑(asOrderHom (f.unop ≫ ↑α)) → j ∈ Set.range ↑(asOrderHom ↑α)\n[PROOFSTEP]\nintro hj\n[GOAL]\nn : ℕ\ni : Fin (n + 1)\nm₁ m₂ : SimplexCategoryᵒᵖ\nf : m₁ ⟶ m₂\nα : (fun m => { α // Set.range ↑(asOrderHom α) ∪ {i} ≠ Set.univ }) m₁\nh : ∀ (x : Fin (n + 1)), x ∈ Set.range ↑(asOrderHom (f.unop ≫ ↑α)) ∪ {i}\nj : Fin (n + 1)\nhj : j ∈ Set.range ↑(asOrderHom (f.unop ≫ ↑α))\n⊢ j ∈ Set.range ↑(asOrderHom ↑α)\n[PROOFSTEP]\nexact Set.range_comp_subset_range _ _ hj\n[GOAL]\nn : ℕ\n⊢ LargeCategory (Truncated n)\n[PROOFSTEP]\ndsimp only [Truncated]\n[GOAL]\nn : ℕ\n⊢ LargeCategory (SimplicialObject.Truncated (Type ?u.74955) n)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nn : ℕ\n⊢ HasLimits (Truncated n)\n[PROOFSTEP]\ndsimp only [Truncated]\n[GOAL]\nn : ℕ\n⊢ HasLimits (SimplicialObject.Truncated (Type ?u.75436) n)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nn : ℕ\n⊢ HasColimits (Truncated n)\n[PROOFSTEP]\ndsimp only [Truncated]\n[GOAL]\nn : ℕ\n⊢ HasColimits (SimplicialObject.Truncated (Type ?u.75544) n)\n[PROOFSTEP]\ninfer_instance\n  -- Porting note: added an `ext` lemma.\n  -- See https://github.com/leanprover-community/mathlib4/issues/5229\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.SimplicialSet", "llama_tokens": 1992, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442251064863697, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.3769368533718744}}
{"text": "[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF₁ : Type u_3\nF₂ : Type u_4\nM : Type u_5\nE₁ : B → Type u_6\nE₂ : B → Type u_7\ninst✝³⁵ : NontriviallyNormedField 𝕜\ninst✝³⁴ : (x : B) → AddCommGroup (E₁ x)\ninst✝³³ : (x : B) → Module 𝕜 (E₁ x)\ninst✝³² : NormedAddCommGroup F₁\ninst✝³¹ : NormedSpace 𝕜 F₁\ninst✝³⁰ : TopologicalSpace (TotalSpace F₁ E₁)\ninst✝²⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝²⁸ : (x : B) → AddCommGroup (E₂ x)\ninst✝²⁷ : (x : B) → Module 𝕜 (E₂ x)\ninst✝²⁶ : NormedAddCommGroup F₂\ninst✝²⁵ : NormedSpace 𝕜 F₂\ninst✝²⁴ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝²³ : (x : B) → TopologicalSpace (E₂ x)\ninst✝²² : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝²¹ : ∀ (x : B), ContinuousSMul 𝕜 (E₂ x)\nEB : Type u_8\ninst✝²⁰ : NormedAddCommGroup EB\ninst✝¹⁹ : NormedSpace 𝕜 EB\nHB : Type u_9\ninst✝¹⁸ : TopologicalSpace HB\nIB : ModelWithCorners 𝕜 EB HB\ninst✝¹⁷ : TopologicalSpace B\ninst✝¹⁶ : ChartedSpace HB B\nEM : Type u_10\ninst✝¹⁵ : NormedAddCommGroup EM\ninst✝¹⁴ : NormedSpace 𝕜 EM\nHM : Type u_11\ninst✝¹³ : TopologicalSpace HM\nIM : ModelWithCorners 𝕜 EM HM\ninst✝¹² : TopologicalSpace M\ninst✝¹¹ : ChartedSpace HM M\ninst✝¹⁰ : SmoothManifoldWithCorners IM M\nn : ℕ∞\ninst✝⁹ : FiberBundle F₁ E₁\ninst✝⁸ : VectorBundle 𝕜 F₁ E₁\ninst✝⁷ : FiberBundle F₂ E₂\ninst✝⁶ : VectorBundle 𝕜 F₂ E₂\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁵ : SmoothVectorBundle F₁ E₁ IB\ninst✝⁴ : SmoothVectorBundle F₂ E₂ IB\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\n⊢ SmoothOn IB 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] F₁ →L[𝕜] F₂) (continuousLinearMapCoordChange (RingHom.id 𝕜) e₁ e₁' e₂ e₂')\n    (e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet))\n[PROOFSTEP]\nhave h₁ := smoothOn_coordChangeL IB e₁' e₁\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF₁ : Type u_3\nF₂ : Type u_4\nM : Type u_5\nE₁ : B → Type u_6\nE₂ : B → Type u_7\ninst✝³⁵ : NontriviallyNormedField 𝕜\ninst✝³⁴ : (x : B) → AddCommGroup (E₁ x)\ninst✝³³ : (x : B) → Module 𝕜 (E₁ x)\ninst✝³² : NormedAddCommGroup F₁\ninst✝³¹ : NormedSpace 𝕜 F₁\ninst✝³⁰ : TopologicalSpace (TotalSpace F₁ E₁)\ninst✝²⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝²⁸ : (x : B) → AddCommGroup (E₂ x)\ninst✝²⁷ : (x : B) → Module 𝕜 (E₂ x)\ninst✝²⁶ : NormedAddCommGroup F₂\ninst✝²⁵ : NormedSpace 𝕜 F₂\ninst✝²⁴ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝²³ : (x : B) → TopologicalSpace (E₂ x)\ninst✝²² : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝²¹ : ∀ (x : B), ContinuousSMul 𝕜 (E₂ x)\nEB : Type u_8\ninst✝²⁰ : NormedAddCommGroup EB\ninst✝¹⁹ : NormedSpace 𝕜 EB\nHB : Type u_9\ninst✝¹⁸ : TopologicalSpace HB\nIB : ModelWithCorners 𝕜 EB HB\ninst✝¹⁷ : TopologicalSpace B\ninst✝¹⁶ : ChartedSpace HB B\nEM : Type u_10\ninst✝¹⁵ : NormedAddCommGroup EM\ninst✝¹⁴ : NormedSpace 𝕜 EM\nHM : Type u_11\ninst✝¹³ : TopologicalSpace HM\nIM : ModelWithCorners 𝕜 EM HM\ninst✝¹² : TopologicalSpace M\ninst✝¹¹ : ChartedSpace HM M\ninst✝¹⁰ : SmoothManifoldWithCorners IM M\nn : ℕ∞\ninst✝⁹ : FiberBundle F₁ E₁\ninst✝⁸ : VectorBundle 𝕜 F₁ E₁\ninst✝⁷ : FiberBundle F₂ E₂\ninst✝⁶ : VectorBundle 𝕜 F₂ E₂\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁵ : SmoothVectorBundle F₁ E₁ IB\ninst✝⁴ : SmoothVectorBundle F₂ E₂ IB\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : SmoothOn IB 𝓘(𝕜, F₁ →L[𝕜] F₁) (fun b => ↑(Trivialization.coordChangeL 𝕜 e₁' e₁ b)) (e₁'.baseSet ∩ e₁.baseSet)\n⊢ SmoothOn IB 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] F₁ →L[𝕜] F₂) (continuousLinearMapCoordChange (RingHom.id 𝕜) e₁ e₁' e₂ e₂')\n    (e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet))\n[PROOFSTEP]\nhave h₂ := smoothOn_coordChangeL IB e₂ e₂'\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF₁ : Type u_3\nF₂ : Type u_4\nM : Type u_5\nE₁ : B → Type u_6\nE₂ : B → Type u_7\ninst✝³⁵ : NontriviallyNormedField 𝕜\ninst✝³⁴ : (x : B) → AddCommGroup (E₁ x)\ninst✝³³ : (x : B) → Module 𝕜 (E₁ x)\ninst✝³² : NormedAddCommGroup F₁\ninst✝³¹ : NormedSpace 𝕜 F₁\ninst✝³⁰ : TopologicalSpace (TotalSpace F₁ E₁)\ninst✝²⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝²⁸ : (x : B) → AddCommGroup (E₂ x)\ninst✝²⁷ : (x : B) → Module 𝕜 (E₂ x)\ninst✝²⁶ : NormedAddCommGroup F₂\ninst✝²⁵ : NormedSpace 𝕜 F₂\ninst✝²⁴ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝²³ : (x : B) → TopologicalSpace (E₂ x)\ninst✝²² : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝²¹ : ∀ (x : B), ContinuousSMul 𝕜 (E₂ x)\nEB : Type u_8\ninst✝²⁰ : NormedAddCommGroup EB\ninst✝¹⁹ : NormedSpace 𝕜 EB\nHB : Type u_9\ninst✝¹⁸ : TopologicalSpace HB\nIB : ModelWithCorners 𝕜 EB HB\ninst✝¹⁷ : TopologicalSpace B\ninst✝¹⁶ : ChartedSpace HB B\nEM : Type u_10\ninst✝¹⁵ : NormedAddCommGroup EM\ninst✝¹⁴ : NormedSpace 𝕜 EM\nHM : Type u_11\ninst✝¹³ : TopologicalSpace HM\nIM : ModelWithCorners 𝕜 EM HM\ninst✝¹² : TopologicalSpace M\ninst✝¹¹ : ChartedSpace HM M\ninst✝¹⁰ : SmoothManifoldWithCorners IM M\nn : ℕ∞\ninst✝⁹ : FiberBundle F₁ E₁\ninst✝⁸ : VectorBundle 𝕜 F₁ E₁\ninst✝⁷ : FiberBundle F₂ E₂\ninst✝⁶ : VectorBundle 𝕜 F₂ E₂\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁵ : SmoothVectorBundle F₁ E₁ IB\ninst✝⁴ : SmoothVectorBundle F₂ E₂ IB\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : SmoothOn IB 𝓘(𝕜, F₁ →L[𝕜] F₁) (fun b => ↑(Trivialization.coordChangeL 𝕜 e₁' e₁ b)) (e₁'.baseSet ∩ e₁.baseSet)\nh₂ : SmoothOn IB 𝓘(𝕜, F₂ →L[𝕜] F₂) (fun b => ↑(Trivialization.coordChangeL 𝕜 e₂ e₂' b)) (e₂.baseSet ∩ e₂'.baseSet)\n⊢ SmoothOn IB 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] F₁ →L[𝕜] F₂) (continuousLinearMapCoordChange (RingHom.id 𝕜) e₁ e₁' e₂ e₂')\n    (e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet))\n[PROOFSTEP]\nrefine (h₁.mono ?_).cle_arrowCongr (h₂.mono ?_)\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\nB : Type u_2\nF₁ : Type u_3\nF₂ : Type u_4\nM : Type u_5\nE₁ : B → Type u_6\nE₂ : B → Type u_7\ninst✝³⁵ : NontriviallyNormedField 𝕜\ninst✝³⁴ : (x : B) → AddCommGroup (E₁ x)\ninst✝³³ : (x : B) → Module 𝕜 (E₁ x)\ninst✝³² : NormedAddCommGroup F₁\ninst✝³¹ : NormedSpace 𝕜 F₁\ninst✝³⁰ : TopologicalSpace (TotalSpace F₁ E₁)\ninst✝²⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝²⁸ : (x : B) → AddCommGroup (E₂ x)\ninst✝²⁷ : (x : B) → Module 𝕜 (E₂ x)\ninst✝²⁶ : NormedAddCommGroup F₂\ninst✝²⁵ : NormedSpace 𝕜 F₂\ninst✝²⁴ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝²³ : (x : B) → TopologicalSpace (E₂ x)\ninst✝²² : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝²¹ : ∀ (x : B), ContinuousSMul 𝕜 (E₂ x)\nEB : Type u_8\ninst✝²⁰ : NormedAddCommGroup EB\ninst✝¹⁹ : NormedSpace 𝕜 EB\nHB : Type u_9\ninst✝¹⁸ : TopologicalSpace HB\nIB : ModelWithCorners 𝕜 EB HB\ninst✝¹⁷ : TopologicalSpace B\ninst✝¹⁶ : ChartedSpace HB B\nEM : Type u_10\ninst✝¹⁵ : NormedAddCommGroup EM\ninst✝¹⁴ : NormedSpace 𝕜 EM\nHM : Type u_11\ninst✝¹³ : TopologicalSpace HM\nIM : ModelWithCorners 𝕜 EM HM\ninst✝¹² : TopologicalSpace M\ninst✝¹¹ : ChartedSpace HM M\ninst✝¹⁰ : SmoothManifoldWithCorners IM M\nn : ℕ∞\ninst✝⁹ : FiberBundle F₁ E₁\ninst✝⁸ : VectorBundle 𝕜 F₁ E₁\ninst✝⁷ : FiberBundle F₂ E₂\ninst✝⁶ : VectorBundle 𝕜 F₂ E₂\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁵ : SmoothVectorBundle F₁ E₁ IB\ninst✝⁴ : SmoothVectorBundle F₂ E₂ IB\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : SmoothOn IB 𝓘(𝕜, F₁ →L[𝕜] F₁) (fun b => ↑(Trivialization.coordChangeL 𝕜 e₁' e₁ b)) (e₁'.baseSet ∩ e₁.baseSet)\nh₂ : SmoothOn IB 𝓘(𝕜, F₂ →L[𝕜] F₂) (fun b => ↑(Trivialization.coordChangeL 𝕜 e₂ e₂' b)) (e₂.baseSet ∩ e₂'.baseSet)\n⊢ e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet) ⊆ e₁'.baseSet ∩ e₁.baseSet\n[PROOFSTEP]\nmfld_set_tac\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\nB : Type u_2\nF₁ : Type u_3\nF₂ : Type u_4\nM : Type u_5\nE₁ : B → Type u_6\nE₂ : B → Type u_7\ninst✝³⁵ : NontriviallyNormedField 𝕜\ninst✝³⁴ : (x : B) → AddCommGroup (E₁ x)\ninst✝³³ : (x : B) → Module 𝕜 (E₁ x)\ninst✝³² : NormedAddCommGroup F₁\ninst✝³¹ : NormedSpace 𝕜 F₁\ninst✝³⁰ : TopologicalSpace (TotalSpace F₁ E₁)\ninst✝²⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝²⁸ : (x : B) → AddCommGroup (E₂ x)\ninst✝²⁷ : (x : B) → Module 𝕜 (E₂ x)\ninst✝²⁶ : NormedAddCommGroup F₂\ninst✝²⁵ : NormedSpace 𝕜 F₂\ninst✝²⁴ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝²³ : (x : B) → TopologicalSpace (E₂ x)\ninst✝²² : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝²¹ : ∀ (x : B), ContinuousSMul 𝕜 (E₂ x)\nEB : Type u_8\ninst✝²⁰ : NormedAddCommGroup EB\ninst✝¹⁹ : NormedSpace 𝕜 EB\nHB : Type u_9\ninst✝¹⁸ : TopologicalSpace HB\nIB : ModelWithCorners 𝕜 EB HB\ninst✝¹⁷ : TopologicalSpace B\ninst✝¹⁶ : ChartedSpace HB B\nEM : Type u_10\ninst✝¹⁵ : NormedAddCommGroup EM\ninst✝¹⁴ : NormedSpace 𝕜 EM\nHM : Type u_11\ninst✝¹³ : TopologicalSpace HM\nIM : ModelWithCorners 𝕜 EM HM\ninst✝¹² : TopologicalSpace M\ninst✝¹¹ : ChartedSpace HM M\ninst✝¹⁰ : SmoothManifoldWithCorners IM M\nn : ℕ∞\ninst✝⁹ : FiberBundle F₁ E₁\ninst✝⁸ : VectorBundle 𝕜 F₁ E₁\ninst✝⁷ : FiberBundle F₂ E₂\ninst✝⁶ : VectorBundle 𝕜 F₂ E₂\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁵ : SmoothVectorBundle F₁ E₁ IB\ninst✝⁴ : SmoothVectorBundle F₂ E₂ IB\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : SmoothOn IB 𝓘(𝕜, F₁ →L[𝕜] F₁) (fun b => ↑(Trivialization.coordChangeL 𝕜 e₁' e₁ b)) (e₁'.baseSet ∩ e₁.baseSet)\nh₂ : SmoothOn IB 𝓘(𝕜, F₂ →L[𝕜] F₂) (fun b => ↑(Trivialization.coordChangeL 𝕜 e₂ e₂' b)) (e₂.baseSet ∩ e₂'.baseSet)\n⊢ e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet) ⊆ e₂.baseSet ∩ e₂'.baseSet\n[PROOFSTEP]\nmfld_set_tac\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF₁ : Type u_3\nF₂ : Type u_4\nM : Type u_5\nE₁ : B → Type u_6\nE₂ : B → Type u_7\ninst✝²⁹ : NontriviallyNormedField 𝕜\ninst✝²⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝²⁷ : (x : B) → Module 𝕜 (E₁ x)\ninst✝²⁶ : NormedAddCommGroup F₁\ninst✝²⁵ : NormedSpace 𝕜 F₁\ninst✝²⁴ : TopologicalSpace (TotalSpace F₁ E₁)\ninst✝²³ : (x : B) → TopologicalSpace (E₁ x)\ninst✝²² : (x : B) → AddCommGroup (E₂ x)\ninst✝²¹ : (x : B) → Module 𝕜 (E₂ x)\ninst✝²⁰ : NormedAddCommGroup F₂\ninst✝¹⁹ : NormedSpace 𝕜 F₂\ninst✝¹⁸ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁷ : (x : B) → TopologicalSpace (E₂ x)\ninst✝¹⁶ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝¹⁵ : ∀ (x : B), ContinuousSMul 𝕜 (E₂ x)\nEB : Type u_8\ninst✝¹⁴ : NormedAddCommGroup EB\ninst✝¹³ : NormedSpace 𝕜 EB\nHB : Type u_9\ninst✝¹² : TopologicalSpace HB\nIB : ModelWithCorners 𝕜 EB HB\ninst✝¹¹ : TopologicalSpace B\ninst✝¹⁰ : ChartedSpace HB B\nEM : Type u_10\ninst✝⁹ : NormedAddCommGroup EM\ninst✝⁸ : NormedSpace 𝕜 EM\nHM : Type u_11\ninst✝⁷ : TopologicalSpace HM\nIM : ModelWithCorners 𝕜 EM HM\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace HM M\ninst✝⁴ : SmoothManifoldWithCorners IM M\nn : ℕ∞\ninst✝³ : FiberBundle F₁ E₁\ninst✝² : VectorBundle 𝕜 F₁ E₁\ninst✝¹ : FiberBundle F₂ E₂\ninst✝ : VectorBundle 𝕜 F₂ E₂\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ny₀ y : LE₁E₂\n⊢ ↑(chartAt (ModelProd HB (F₁ →L[𝕜] F₂)) y₀) y =\n    (↑(chartAt HB y₀.proj) y.proj, inCoordinates F₁ E₁ F₂ E₂ y₀.proj y.proj y₀.proj y.proj y.snd)\n[PROOFSTEP]\nrw [FiberBundle.chartedSpace_chartAt, trans_apply, LocalHomeomorph.prod_apply, Trivialization.coe_coe,\n  LocalHomeomorph.refl_apply, Function.id_def, hom_trivializationAt_apply]\n[GOAL]\n𝕜 : Type u_1\nB : Type u_2\nF₁ : Type u_3\nF₂ : Type u_4\nM : Type u_5\nE₁ : B → Type u_6\nE₂ : B → Type u_7\ninst✝³¹ : NontriviallyNormedField 𝕜\ninst✝³⁰ : (x : B) → AddCommGroup (E₁ x)\ninst✝²⁹ : (x : B) → Module 𝕜 (E₁ x)\ninst✝²⁸ : NormedAddCommGroup F₁\ninst✝²⁷ : NormedSpace 𝕜 F₁\ninst✝²⁶ : TopologicalSpace (TotalSpace F₁ E₁)\ninst✝²⁵ : (x : B) → TopologicalSpace (E₁ x)\ninst✝²⁴ : (x : B) → AddCommGroup (E₂ x)\ninst✝²³ : (x : B) → Module 𝕜 (E₂ x)\ninst✝²² : NormedAddCommGroup F₂\ninst✝²¹ : NormedSpace 𝕜 F₂\ninst✝²⁰ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁹ : (x : B) → TopologicalSpace (E₂ x)\ninst✝¹⁸ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝¹⁷ : ∀ (x : B), ContinuousSMul 𝕜 (E₂ x)\nEB : Type u_8\ninst✝¹⁶ : NormedAddCommGroup EB\ninst✝¹⁵ : NormedSpace 𝕜 EB\nHB : Type u_9\ninst✝¹⁴ : TopologicalSpace HB\nIB : ModelWithCorners 𝕜 EB HB\ninst✝¹³ : TopologicalSpace B\ninst✝¹² : ChartedSpace HB B\nEM : Type u_10\ninst✝¹¹ : NormedAddCommGroup EM\ninst✝¹⁰ : NormedSpace 𝕜 EM\nHM : Type u_11\ninst✝⁹ : TopologicalSpace HM\nIM : ModelWithCorners 𝕜 EM HM\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace HM M\ninst✝⁶ : SmoothManifoldWithCorners IM M\nn : ℕ∞\ninst✝⁵ : FiberBundle F₁ E₁\ninst✝⁴ : VectorBundle 𝕜 F₁ E₁\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜 F₂ E₂\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝¹ : SmoothVectorBundle F₁ E₁ IB\ninst✝ : SmoothVectorBundle F₂ E₂ IB\n⊢ ∀ (e : Pretrivialization (F₁ →L[𝕜] F₂) TotalSpace.proj),\n    e ∈ (vectorPrebundle (RingHom.id 𝕜) F₁ E₁ F₂ E₂).pretrivializationAtlas →\n      ∀ (e' : Pretrivialization (F₁ →L[𝕜] F₂) TotalSpace.proj),\n        e' ∈ (vectorPrebundle (RingHom.id 𝕜) F₁ E₁ F₂ E₂).pretrivializationAtlas →\n          ∃ f,\n            SmoothOn IB 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] F₁ →L[𝕜] F₂) f (e.baseSet ∩ e'.baseSet) ∧\n              ∀ (b : B),\n                b ∈ e.baseSet ∩ e'.baseSet →\n                  ∀ (v : F₁ →L[𝕜] F₂), ↑(f b) v = (↑e' { proj := b, snd := Pretrivialization.symm e b v }).snd\n[PROOFSTEP]\nrintro _ ⟨e₁, e₂, he₁, he₂, rfl⟩ _ ⟨e₁', e₂', he₁', he₂', rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nB : Type u_2\nF₁ : Type u_3\nF₂ : Type u_4\nM : Type u_5\nE₁ : B → Type u_6\nE₂ : B → Type u_7\ninst✝³¹ : NontriviallyNormedField 𝕜\ninst✝³⁰ : (x : B) → AddCommGroup (E₁ x)\ninst✝²⁹ : (x : B) → Module 𝕜 (E₁ x)\ninst✝²⁸ : NormedAddCommGroup F₁\ninst✝²⁷ : NormedSpace 𝕜 F₁\ninst✝²⁶ : TopologicalSpace (TotalSpace F₁ E₁)\ninst✝²⁵ : (x : B) → TopologicalSpace (E₁ x)\ninst✝²⁴ : (x : B) → AddCommGroup (E₂ x)\ninst✝²³ : (x : B) → Module 𝕜 (E₂ x)\ninst✝²² : NormedAddCommGroup F₂\ninst✝²¹ : NormedSpace 𝕜 F₂\ninst✝²⁰ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁹ : (x : B) → TopologicalSpace (E₂ x)\ninst✝¹⁸ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝¹⁷ : ∀ (x : B), ContinuousSMul 𝕜 (E₂ x)\nEB : Type u_8\ninst✝¹⁶ : NormedAddCommGroup EB\ninst✝¹⁵ : NormedSpace 𝕜 EB\nHB : Type u_9\ninst✝¹⁴ : TopologicalSpace HB\nIB : ModelWithCorners 𝕜 EB HB\ninst✝¹³ : TopologicalSpace B\ninst✝¹² : ChartedSpace HB B\nEM : Type u_10\ninst✝¹¹ : NormedAddCommGroup EM\ninst✝¹⁰ : NormedSpace 𝕜 EM\nHM : Type u_11\ninst✝⁹ : TopologicalSpace HM\nIM : ModelWithCorners 𝕜 EM HM\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace HM M\ninst✝⁶ : SmoothManifoldWithCorners IM M\nn : ℕ∞\ninst✝⁵ : FiberBundle F₁ E₁\ninst✝⁴ : VectorBundle 𝕜 F₁ E₁\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜 F₂ E₂\ne₁✝ e₁'✝ : Trivialization F₁ TotalSpace.proj\ne₂✝ e₂'✝ : Trivialization F₂ TotalSpace.proj\ninst✝¹ : SmoothVectorBundle F₁ E₁ IB\ninst✝ : SmoothVectorBundle F₂ E₂ IB\ne₁ : Trivialization F₁ TotalSpace.proj\ne₂ : Trivialization F₂ TotalSpace.proj\nhe₁ : MemTrivializationAtlas e₁\nhe₂ : MemTrivializationAtlas e₂\ne₁' : Trivialization F₁ TotalSpace.proj\ne₂' : Trivialization F₂ TotalSpace.proj\nhe₁' : MemTrivializationAtlas e₁'\nhe₂' : MemTrivializationAtlas e₂'\n⊢ ∃ f,\n    SmoothOn IB 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] F₁ →L[𝕜] F₂) f\n        ((continuousLinearMap (RingHom.id 𝕜) e₁ e₂).baseSet ∩ (continuousLinearMap (RingHom.id 𝕜) e₁' e₂').baseSet) ∧\n      ∀ (b : B),\n        b ∈ (continuousLinearMap (RingHom.id 𝕜) e₁ e₂).baseSet ∩ (continuousLinearMap (RingHom.id 𝕜) e₁' e₂').baseSet →\n          ∀ (v : F₁ →L[𝕜] F₂),\n            ↑(f b) v =\n              (↑(continuousLinearMap (RingHom.id 𝕜) e₁' e₂')\n                  { proj := b, snd := Pretrivialization.symm (continuousLinearMap (RingHom.id 𝕜) e₁ e₂) b v }).snd\n[PROOFSTEP]\nexact\n  ⟨continuousLinearMapCoordChange (RingHom.id 𝕜) e₁ e₁' e₂ e₂', smoothOn_continuousLinearMapCoordChange IB,\n    continuousLinearMapCoordChange_apply (RingHom.id 𝕜) e₁ e₁' e₂ e₂'⟩\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Manifold.VectorBundle.Hom", "llama_tokens": 7730, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.8244619177503205, "lm_q2_score": 0.4571367168274948, "lm_q1q2_score": 0.3768918142296816}}
{"text": "[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nx : σ → R\n⊢ comap (AlgHom.id R (MvPolynomial σ R)) x = x\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nx : σ → R\ni : σ\n⊢ comap (AlgHom.id R (MvPolynomial σ R)) x i = x i\n[PROOFSTEP]\nsimp only [comap, AlgHom.id_apply, id.def, aeval_X]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\n⊢ comap (AlgHom.id R (MvPolynomial σ R)) = id\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nx : σ → R\n⊢ comap (AlgHom.id R (MvPolynomial σ R)) x = id x\n[PROOFSTEP]\nexact comap_id_apply x\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\nx : υ → R\n⊢ comap (AlgHom.comp g f) x = comap f (comap g x)\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\nx : υ → R\ni : σ\n⊢ comap (AlgHom.comp g f) x i = comap f (comap g x) i\n[PROOFSTEP]\ntrans aeval x (aeval (fun i => g (X i)) (f (X i)))\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\nx : υ → R\ni : σ\n⊢ comap (AlgHom.comp g f) x i = ↑(aeval x) (↑(aeval fun i => ↑g (X i)) (↑f (X i)))\n[PROOFSTEP]\napply eval₂Hom_congr rfl rfl\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\nx : υ → R\ni : σ\n⊢ ↑(AlgHom.comp g f) (X i) = ↑(aeval fun i => ↑g (X i)) (↑f (X i))\n[PROOFSTEP]\nrw [AlgHom.comp_apply]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\nx : υ → R\ni : σ\n⊢ ↑g (↑f (X i)) = ↑(aeval fun i => ↑g (X i)) (↑f (X i))\n[PROOFSTEP]\nsuffices g = aeval fun i => g (X i) by rw [← this]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\nx : υ → R\ni : σ\nthis : g = aeval fun i => ↑g (X i)\n⊢ ↑g (↑f (X i)) = ↑(aeval fun i => ↑g (X i)) (↑f (X i))\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\nx : υ → R\ni : σ\n⊢ g = aeval fun i => ↑g (X i)\n[PROOFSTEP]\nexact aeval_unique g\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\nx : υ → R\ni : σ\n⊢ ↑(aeval x) (↑(aeval fun i => ↑g (X i)) (↑f (X i))) = comap f (comap g x) i\n[PROOFSTEP]\nsimp only [comap, aeval_eq_eval₂Hom, map_eval₂Hom, AlgHom.comp_apply]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\nx : υ → R\ni : σ\n⊢ ↑(eval₂Hom (RingHom.comp (eval₂Hom (algebraMap R R) x) (algebraMap R (MvPolynomial υ R))) fun i =>\n          ↑(eval₂Hom (algebraMap R R) x) (↑g (X i)))\n      (↑f (X i)) =\n    ↑(eval₂Hom (algebraMap R R) fun i => ↑(eval₂Hom (algebraMap R R) x) (↑g (X i))) (↑f (X i))\n[PROOFSTEP]\nrefine' eval₂Hom_congr _ rfl rfl\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\nx : υ → R\ni : σ\n⊢ RingHom.comp (eval₂Hom (algebraMap R R) x) (algebraMap R (MvPolynomial υ R)) = algebraMap R R\n[PROOFSTEP]\next r\n[GOAL]\ncase a\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\nx : υ → R\ni : σ\nr : R\n⊢ ↑(RingHom.comp (eval₂Hom (algebraMap R R) x) (algebraMap R (MvPolynomial υ R))) r = ↑(algebraMap R R) r\n[PROOFSTEP]\napply aeval_C\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\n⊢ comap (AlgHom.comp g f) = comap f ∘ comap g\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial τ R\ng : MvPolynomial τ R →ₐ[R] MvPolynomial υ R\nx : υ → R\n⊢ comap (AlgHom.comp g f) x = (comap f ∘ comap g) x\n[PROOFSTEP]\nexact comap_comp_apply _ _ _\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial σ R\nhf : ∀ (φ : MvPolynomial σ R), ↑f φ = φ\nx : σ → R\n⊢ comap f x = x\n[PROOFSTEP]\nconvert comap_id_apply x\n[GOAL]\ncase h.e'_2.h.e'_5\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial σ R\nhf : ∀ (φ : MvPolynomial σ R), ↑f φ = φ\nx : σ → R\n⊢ f = AlgHom.id R (MvPolynomial σ R)\n[PROOFSTEP]\next1 φ\n[GOAL]\ncase h.e'_2.h.e'_5.hf\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R →ₐ[R] MvPolynomial σ R\nhf : ∀ (φ : MvPolynomial σ R), ↑f φ = φ\nx : σ → R\nφ : σ\n⊢ ↑f (X φ) = ↑(AlgHom.id R (MvPolynomial σ R)) (X φ)\n[PROOFSTEP]\nsimp [hf, AlgHom.id_apply]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : σ → τ\nx : τ → R\n⊢ comap (rename f) x = x ∘ f\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : σ → τ\nx : τ → R\nx✝ : σ\n⊢ comap (rename f) x x✝ = (x ∘ f) x✝\n[PROOFSTEP]\nsimp [rename_X, comap_apply, aeval_X]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R\n⊢ Function.LeftInverse (comap ↑(AlgEquiv.symm f)) (comap ↑f)\n[PROOFSTEP]\nintro x\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R\nx : τ → R\n⊢ comap (↑(AlgEquiv.symm f)) (comap (↑f) x) = x\n[PROOFSTEP]\nrw [← comap_comp_apply]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R\nx : τ → R\n⊢ comap (AlgHom.comp ↑f ↑(AlgEquiv.symm f)) x = x\n[PROOFSTEP]\napply comap_eq_id_of_eq_id\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R\nx : τ → R\n⊢ ∀ (φ : MvPolynomial τ R), ↑(AlgHom.comp ↑f ↑(AlgEquiv.symm f)) φ = φ\n[PROOFSTEP]\nintro\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R\nx : τ → R\nφ✝ : MvPolynomial τ R\n⊢ ↑(AlgHom.comp ↑f ↑(AlgEquiv.symm f)) φ✝ = φ✝\n[PROOFSTEP]\nsimp only [AlgHom.id_apply, AlgEquiv.comp_symm]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R\n⊢ Function.RightInverse (comap ↑(AlgEquiv.symm f)) (comap ↑f)\n[PROOFSTEP]\nintro x\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R\nx : σ → R\n⊢ comap (↑f) (comap (↑(AlgEquiv.symm f)) x) = x\n[PROOFSTEP]\nrw [← comap_comp_apply]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R\nx : σ → R\n⊢ comap (AlgHom.comp ↑(AlgEquiv.symm f) ↑f) x = x\n[PROOFSTEP]\napply comap_eq_id_of_eq_id\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R\nx : σ → R\n⊢ ∀ (φ : MvPolynomial σ R), ↑(AlgHom.comp ↑(AlgEquiv.symm f) ↑f) φ = φ\n[PROOFSTEP]\nintro\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nυ : Type u_3\nR : Type u_4\ninst✝ : CommSemiring R\nf : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R\nx : σ → R\nφ✝ : MvPolynomial σ R\n⊢ ↑(AlgHom.comp ↑(AlgEquiv.symm f) ↑f) φ✝ = φ✝\n[PROOFSTEP]\nsimp only [AlgHom.id_apply, AlgEquiv.symm_comp]\n", "meta": {"mathlib_filename": "Mathlib.Data.MvPolynomial.Comap", "llama_tokens": 4362, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6893056167854461, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.37686967907388924}}
{"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nL : C ⥤ D\nR : D ⥤ C\nadj : L ⊣ R\nc : C\nu : StructuredArrow c R := StructuredArrow.mk (NatTrans.app adj.unit c)\nf g : StructuredArrow c R\n⊢ u.hom ≫ R.map (↑(Adjunction.homEquiv adj c f.right).symm f.hom) = f.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nL : C ⥤ D\nR : D ⥤ C\nadj : L ⊣ R\nc : C\nu : StructuredArrow c R := StructuredArrow.mk (NatTrans.app adj.unit c)\nf g : StructuredArrow c R\n⊢ u.hom ≫ R.map (↑(Adjunction.homEquiv adj c g.right).symm g.hom) = g.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nL : C ⥤ D\nR : D ⥤ C\nadj : L ⊣ R\nd : D\nu : CostructuredArrow L d := CostructuredArrow.mk (NatTrans.app adj.counit d)\nf g : CostructuredArrow L d\n⊢ L.map (↑(Adjunction.homEquiv adj f.left d) f.hom) ≫ u.hom = f.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nL : C ⥤ D\nR : D ⥤ C\nadj : L ⊣ R\nd : D\nu : CostructuredArrow L d := CostructuredArrow.mk (NatTrans.app adj.counit d)\nf g : CostructuredArrow L d\n⊢ L.map (↑(Adjunction.homEquiv adj g.left d) g.hom) ≫ u.hom = g.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (d ⟶ F.obj X) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : d ⟶ F.obj X₀\nz : Z X₀ k₀\n⊢ Z (lift F d) (homToLift F d)\n[PROOFSTEP]\napply Nonempty.some\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (d ⟶ F.obj X) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : d ⟶ F.obj X₀\nz : Z X₀ k₀\n⊢ Nonempty (Z (lift F d) (homToLift F d))\n[PROOFSTEP]\napply @isPreconnected_induction _ _ _ (fun Y : StructuredArrow d F => Z Y.right Y.hom) _ _ (StructuredArrow.mk k₀) z\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (d ⟶ F.obj X) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : d ⟶ F.obj X₀\nz : Z X₀ k₀\n⊢ {j₁ j₂ : StructuredArrow d F} → (j₁ ⟶ j₂) → (fun Y => Z Y.right Y.hom) j₁ → (fun Y => Z Y.right Y.hom) j₂\n[PROOFSTEP]\nintro j₁ j₂ f a\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (d ⟶ F.obj X) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : d ⟶ F.obj X₀\nz : Z X₀ k₀\nj₁ j₂ : StructuredArrow d F\nf : j₁ ⟶ j₂\na : Z j₁.right j₁.hom\n⊢ Z j₂.right j₂.hom\n[PROOFSTEP]\nfapply h₁ _ _ _ _ f.right _ a\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (d ⟶ F.obj X) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : d ⟶ F.obj X₀\nz : Z X₀ k₀\nj₁ j₂ : StructuredArrow d F\nf : j₁ ⟶ j₂\na : Z j₁.right j₁.hom\n⊢ j₁.hom ≫ F.map f.right = j₂.hom\n[PROOFSTEP]\nconvert f.w.symm\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (d ⟶ F.obj X) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : d ⟶ F.obj X₀\nz : Z X₀ k₀\nj₁ j₂ : StructuredArrow d F\nf : j₁ ⟶ j₂\na : Z j₁.right j₁.hom\ne_1✝ : (d ⟶ F.obj j₂.right) = ((fromPUnit d).obj j₁.left ⟶ F.obj j₂.right)\n⊢ j₂.hom = (fromPUnit d).map f.left ≫ j₂.hom\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (d ⟶ F.obj X) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : d ⟶ F.obj X₀\nz : Z X₀ k₀\nj₁ j₂ : StructuredArrow d F\nf : j₁ ⟶ j₂\na : Z j₁.right j₁.hom\ne_1✝ : (d ⟶ F.obj j₂.right) = ((fromPUnit d).obj j₁.left ⟶ F.obj j₂.right)\n⊢ j₂.hom = 𝟙 d ≫ j₂.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (d ⟶ F.obj X) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : d ⟶ F.obj X₀\nz : Z X₀ k₀\n⊢ {j₁ j₂ : StructuredArrow d F} → (j₁ ⟶ j₂) → (fun Y => Z Y.right Y.hom) j₂ → (fun Y => Z Y.right Y.hom) j₁\n[PROOFSTEP]\nintro j₁ j₂ f a\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (d ⟶ F.obj X) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : d ⟶ F.obj X₀\nz : Z X₀ k₀\nj₁ j₂ : StructuredArrow d F\nf : j₁ ⟶ j₂\na : Z j₂.right j₂.hom\n⊢ Z j₁.right j₁.hom\n[PROOFSTEP]\nfapply h₂ _ _ _ _ f.right _ a\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (d ⟶ F.obj X) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : d ⟶ F.obj X₀\nz : Z X₀ k₀\nj₁ j₂ : StructuredArrow d F\nf : j₁ ⟶ j₂\na : Z j₂.right j₂.hom\n⊢ j₁.hom ≫ F.map f.right = j₂.hom\n[PROOFSTEP]\nconvert f.w.symm\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (d ⟶ F.obj X) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : d ⟶ F.obj X₀\nz : Z X₀ k₀\nj₁ j₂ : StructuredArrow d F\nf : j₁ ⟶ j₂\na : Z j₂.right j₂.hom\ne_1✝ : (d ⟶ F.obj j₂.right) = ((fromPUnit d).obj j₁.left ⟶ F.obj j₂.right)\n⊢ j₂.hom = (fromPUnit d).map f.left ≫ j₂.hom\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (d ⟶ F.obj X) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : d ⟶ F.obj X₁) → (k₂ : d ⟶ F.obj X₂) → (f : X₁ ⟶ X₂) → k₁ ≫ F.map f = k₂ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : d ⟶ F.obj X₀\nz : Z X₀ k₀\nj₁ j₂ : StructuredArrow d F\nf : j₁ ⟶ j₂\na : Z j₂.right j₂.hom\ne_1✝ : (d ⟶ F.obj j₂.right) = ((fromPUnit d).obj j₁.left ⟶ F.obj j₂.right)\n⊢ j₂.hom = 𝟙 d ≫ j₂.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cocone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\n⊢ G.map f ≫ (fun X => G.map (homToLift F X) ≫ NatTrans.app c.ι (lift F X)) Y =\n    (fun X => G.map (homToLift F X) ≫ NatTrans.app c.ι (lift F X)) X ≫ ((const D).obj c.pt).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cocone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\n⊢ G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) =\n    (G.map (homToLift F X) ≫ NatTrans.app c.ι (lift F X)) ≫ 𝟙 c.pt\n[PROOFSTEP]\nsimp\n  -- This would be true if we'd chosen `lift F X` to be `lift F Y`\n              -- and `homToLift F X` to be `f ≫ homToLift F Y`.\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cocone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\n⊢ G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) = G.map (homToLift F X) ≫ NatTrans.app c.ι (lift F X)\n[PROOFSTEP]\napply induction F fun Z k => G.map f ≫ G.map (homToLift F Y) ≫ c.ι.app (lift F Y) = G.map k ≫ c.ι.app Z\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cocone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\n⊢ ∀ (X₁ X₂ : C) (k₁ : X ⟶ F.obj X₁) (k₂ : X ⟶ F.obj X₂) (f_1 : X₁ ⟶ X₂),\n    k₁ ≫ F.map f_1 = k₂ →\n      G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) = G.map k₁ ≫ NatTrans.app c.ι X₁ →\n        G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) = G.map k₂ ≫ NatTrans.app c.ι X₂\n[PROOFSTEP]\nintro Z₁ Z₂ k₁ k₂ g a z\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cocone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\nZ₁ Z₂ : C\nk₁ : X ⟶ F.obj Z₁\nk₂ : X ⟶ F.obj Z₂\ng : Z₁ ⟶ Z₂\na : k₁ ≫ F.map g = k₂\nz : G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) = G.map k₁ ≫ NatTrans.app c.ι Z₁\n⊢ G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) = G.map k₂ ≫ NatTrans.app c.ι Z₂\n[PROOFSTEP]\nrw [← a, Functor.map_comp, Category.assoc, ← Functor.comp_map, c.w, z]\n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cocone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\n⊢ ∀ (X₁ X₂ : C) (k₁ : X ⟶ F.obj X₁) (k₂ : X ⟶ F.obj X₂) (f_1 : X₁ ⟶ X₂),\n    k₁ ≫ F.map f_1 = k₂ →\n      G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) = G.map k₂ ≫ NatTrans.app c.ι X₂ →\n        G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) = G.map k₁ ≫ NatTrans.app c.ι X₁\n[PROOFSTEP]\nintro Z₁ Z₂ k₁ k₂ g a z\n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cocone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\nZ₁ Z₂ : C\nk₁ : X ⟶ F.obj Z₁\nk₂ : X ⟶ F.obj Z₂\ng : Z₁ ⟶ Z₂\na : k₁ ≫ F.map g = k₂\nz : G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) = G.map k₂ ≫ NatTrans.app c.ι Z₂\n⊢ G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) = G.map k₁ ≫ NatTrans.app c.ι Z₁\n[PROOFSTEP]\nrw [← a, Functor.map_comp, Category.assoc, ← Functor.comp_map, c.w] at z \n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cocone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\nZ₁ Z₂ : C\nk₁ : X ⟶ F.obj Z₁\nk₂ : X ⟶ F.obj Z₂\ng : Z₁ ⟶ Z₂\na : k₁ ≫ F.map g = k₂\nz : G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) = G.map k₁ ≫ NatTrans.app c.ι Z₁\n⊢ G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) = G.map k₁ ≫ NatTrans.app c.ι Z₁\n[PROOFSTEP]\nrw [z]\n[GOAL]\ncase z\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cocone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\n⊢ G.map f ≫ G.map (homToLift F Y) ≫ NatTrans.app c.ι (lift F Y) = G.map ?k₀ ≫ NatTrans.app c.ι ?X₀\n[PROOFSTEP]\nrw [← Functor.map_comp_assoc]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cocone (F ⋙ G)\nj : C\n⊢ G.map (homToLift F (F.obj j)) ≫ NatTrans.app s.ι (lift F (F.obj j)) = NatTrans.app s.ι j\n[PROOFSTEP]\napply induction F fun X k => G.map k ≫ s.ι.app X = (s.ι.app j : _)\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cocone (F ⋙ G)\nj : C\n⊢ ∀ (X₁ X₂ : C) (k₁ : F.obj j ⟶ F.obj X₁) (k₂ : F.obj j ⟶ F.obj X₂) (f : X₁ ⟶ X₂),\n    k₁ ≫ F.map f = k₂ →\n      G.map k₁ ≫ NatTrans.app s.ι X₁ = NatTrans.app s.ι j → G.map k₂ ≫ NatTrans.app s.ι X₂ = NatTrans.app s.ι j\n[PROOFSTEP]\nintro j₁ j₂ k₁ k₂ f w h\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cocone (F ⋙ G)\nj j₁ j₂ : C\nk₁ : F.obj j ⟶ F.obj j₁\nk₂ : F.obj j ⟶ F.obj j₂\nf : j₁ ⟶ j₂\nw : k₁ ≫ F.map f = k₂\nh : G.map k₁ ≫ NatTrans.app s.ι j₁ = NatTrans.app s.ι j\n⊢ G.map k₂ ≫ NatTrans.app s.ι j₂ = NatTrans.app s.ι j\n[PROOFSTEP]\nrw [← w]\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cocone (F ⋙ G)\nj j₁ j₂ : C\nk₁ : F.obj j ⟶ F.obj j₁\nk₂ : F.obj j ⟶ F.obj j₂\nf : j₁ ⟶ j₂\nw : k₁ ≫ F.map f = k₂\nh : G.map k₁ ≫ NatTrans.app s.ι j₁ = NatTrans.app s.ι j\n⊢ G.map (k₁ ≫ F.map f) ≫ NatTrans.app s.ι j₂ = NatTrans.app s.ι j\n[PROOFSTEP]\nrw [← s.w f] at h \n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cocone (F ⋙ G)\nj j₁ j₂ : C\nk₁ : F.obj j ⟶ F.obj j₁\nk₂ : F.obj j ⟶ F.obj j₂\nf : j₁ ⟶ j₂\nw : k₁ ≫ F.map f = k₂\nh : G.map k₁ ≫ (F ⋙ G).map f ≫ NatTrans.app s.ι j₂ = NatTrans.app s.ι j\n⊢ G.map (k₁ ≫ F.map f) ≫ NatTrans.app s.ι j₂ = NatTrans.app s.ι j\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cocone (F ⋙ G)\nj : C\n⊢ ∀ (X₁ X₂ : C) (k₁ : F.obj j ⟶ F.obj X₁) (k₂ : F.obj j ⟶ F.obj X₂) (f : X₁ ⟶ X₂),\n    k₁ ≫ F.map f = k₂ →\n      G.map k₂ ≫ NatTrans.app s.ι X₂ = NatTrans.app s.ι j → G.map k₁ ≫ NatTrans.app s.ι X₁ = NatTrans.app s.ι j\n[PROOFSTEP]\nintro j₁ j₂ k₁ k₂ f w h\n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cocone (F ⋙ G)\nj j₁ j₂ : C\nk₁ : F.obj j ⟶ F.obj j₁\nk₂ : F.obj j ⟶ F.obj j₂\nf : j₁ ⟶ j₂\nw : k₁ ≫ F.map f = k₂\nh : G.map k₂ ≫ NatTrans.app s.ι j₂ = NatTrans.app s.ι j\n⊢ G.map k₁ ≫ NatTrans.app s.ι j₁ = NatTrans.app s.ι j\n[PROOFSTEP]\nrw [← w] at h \n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cocone (F ⋙ G)\nj j₁ j₂ : C\nk₁ : F.obj j ⟶ F.obj j₁\nk₂ : F.obj j ⟶ F.obj j₂\nf : j₁ ⟶ j₂\nw : k₁ ≫ F.map f = k₂\nh : G.map (k₁ ≫ F.map f) ≫ NatTrans.app s.ι j₂ = NatTrans.app s.ι j\n⊢ G.map k₁ ≫ NatTrans.app s.ι j₁ = NatTrans.app s.ι j\n[PROOFSTEP]\nrw [← s.w f]\n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cocone (F ⋙ G)\nj j₁ j₂ : C\nk₁ : F.obj j ⟶ F.obj j₁\nk₂ : F.obj j ⟶ F.obj j₂\nf : j₁ ⟶ j₂\nw : k₁ ≫ F.map f = k₂\nh : G.map (k₁ ≫ F.map f) ≫ NatTrans.app s.ι j₂ = NatTrans.app s.ι j\n⊢ G.map k₁ ≫ (F ⋙ G).map f ≫ NatTrans.app s.ι j₂ = NatTrans.app s.ι j\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase z\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cocone (F ⋙ G)\nj : C\n⊢ G.map ?k₀ ≫ NatTrans.app s.ι ?X₀ = NatTrans.app s.ι j\n[PROOFSTEP]\nexact s.w (𝟙 _)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nt : Cocone G\nP : IsColimit t\n⊢ IsColimit.desc (↑(isColimitWhiskerEquiv F t).symm P) (Cocone.whisker F t) = 𝟙 t.pt\n[PROOFSTEP]\ndsimp [isColimitWhiskerEquiv]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nt : Cocone G\nP : IsColimit t\n⊢ IsColimit.desc (↑(IsColimit.ofCoconeEquiv (Equivalence.symm (coconesEquiv F G))).symm P) (Cocone.whisker F t) = 𝟙 t.pt\n[PROOFSTEP]\napply P.hom_ext\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nt : Cocone G\nP : IsColimit t\n⊢ ∀ (j : D),\n    NatTrans.app t.ι j ≫\n        IsColimit.desc (↑(IsColimit.ofCoconeEquiv (Equivalence.symm (coconesEquiv F G))).symm P) (Cocone.whisker F t) =\n      NatTrans.app t.ι j ≫ 𝟙 t.pt\n[PROOFSTEP]\nintro j\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nt : Cocone G\nP : IsColimit t\nj : D\n⊢ NatTrans.app t.ι j ≫\n      IsColimit.desc (↑(IsColimit.ofCoconeEquiv (Equivalence.symm (coconesEquiv F G))).symm P) (Cocone.whisker F t) =\n    NatTrans.app t.ι j ≫ 𝟙 t.pt\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Final F\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝ : HasColimit G\n⊢ IsIso (colimit.pre G F)\n[PROOFSTEP]\nrw [colimit.pre_eq (colimitCoconeComp F (getColimitCocone G)) (getColimitCocone G)]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Final F\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝ : HasColimit G\n⊢ IsIso\n    ((colimit.isoColimitCocone (colimitCoconeComp F (getColimitCocone G))).hom ≫\n      IsColimit.desc (colimitCoconeComp F (getColimitCocone G)).isColimit\n          (Cocone.whisker F (getColimitCocone G).cocone) ≫\n        (colimit.isoColimitCocone (getColimitCocone G)).inv)\n[PROOFSTEP]\nerw [colimit_pre_is_iso_aux]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Final F\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝ : HasColimit G\n⊢ IsIso\n    ((colimit.isoColimitCocone (colimitCoconeComp F (getColimitCocone G))).hom ≫\n      𝟙 (getColimitCocone G).cocone.pt ≫ (colimit.isoColimitCocone (getColimitCocone G)).inv)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Final F\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝ : HasColimit G\n⊢ IsIso\n    ((colimit.isoColimitCocone (colimitCoconeComp F (getColimitCocone G))).hom ≫\n      𝟙 (getColimitCocone G).cocone.pt ≫ (colimit.isoColimitCocone (getColimitCocone G)).inv)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ : (X : C) × (d ⟶ F.obj X)\nt : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) f₁ f₂\n⊢ Zigzag (StructuredArrow.mk f₁.snd) (StructuredArrow.mk f₂.snd)\n[PROOFSTEP]\ninduction t\n[GOAL]\ncase rel\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x✝ y✝ : (X : C) × (d ⟶ F.obj X)\na✝ : Types.Quot.Rel (F ⋙ coyoneda.obj (op d)) x✝ y✝\n⊢ Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk y✝.snd)\ncase refl\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x✝ : (X : C) × (d ⟶ F.obj X)\n⊢ Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk x✝.snd)\ncase symm\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x✝ y✝ : (X : C) × (d ⟶ F.obj X)\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x✝ y✝\na_ih✝ : Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk y✝.snd)\n⊢ Zigzag (StructuredArrow.mk y✝.snd) (StructuredArrow.mk x✝.snd)\ncase trans\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x✝ y✝ z✝ : (X : C) × (d ⟶ F.obj X)\na✝¹ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x✝ y✝\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) y✝ z✝\na_ih✝¹ : Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk y✝.snd)\na_ih✝ : Zigzag (StructuredArrow.mk y✝.snd) (StructuredArrow.mk z✝.snd)\n⊢ Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk z✝.snd)\n[PROOFSTEP]\ncase rel x y r =>\n  obtain ⟨f, w⟩ := r\n  fconstructor\n  swap; fconstructor\n  left; fconstructor\n  exact StructuredArrow.homMk f\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\nr : Types.Quot.Rel (F ⋙ coyoneda.obj (op d)) x y\n⊢ Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\n[PROOFSTEP]\ncase rel x y r =>\n  obtain ⟨f, w⟩ := r\n  fconstructor\n  swap; fconstructor\n  left; fconstructor\n  exact StructuredArrow.homMk f\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\nr : Types.Quot.Rel (F ⋙ coyoneda.obj (op d)) x y\n⊢ Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\n[PROOFSTEP]\nobtain ⟨f, w⟩ := r\n[GOAL]\ncase intro\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\nf : x.fst ⟶ y.fst\nw : y.snd = (F ⋙ coyoneda.obj (op d)).map f x.snd\n⊢ Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase intro.b\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\nf : x.fst ⟶ y.fst\nw : y.snd = (F ⋙ coyoneda.obj (op d)).map f x.snd\n⊢ StructuredArrow d F\ncase intro.a\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\nf : x.fst ⟶ y.fst\nw : y.snd = (F ⋙ coyoneda.obj (op d)).map f x.snd\n⊢ Relation.ReflTransGen Zag (StructuredArrow.mk x.snd) ?intro.b\ncase intro.a\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\nf : x.fst ⟶ y.fst\nw : y.snd = (F ⋙ coyoneda.obj (op d)).map f x.snd\n⊢ Zag ?intro.b (StructuredArrow.mk y.snd)\n[PROOFSTEP]\nswap\n[GOAL]\ncase intro.a\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\nf : x.fst ⟶ y.fst\nw : y.snd = (F ⋙ coyoneda.obj (op d)).map f x.snd\n⊢ Relation.ReflTransGen Zag (StructuredArrow.mk x.snd) ?intro.b\ncase intro.b\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\nf : x.fst ⟶ y.fst\nw : y.snd = (F ⋙ coyoneda.obj (op d)).map f x.snd\n⊢ StructuredArrow d F\ncase intro.a\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\nf : x.fst ⟶ y.fst\nw : y.snd = (F ⋙ coyoneda.obj (op d)).map f x.snd\n⊢ Zag ?intro.b (StructuredArrow.mk y.snd)\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase intro.a\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\nf : x.fst ⟶ y.fst\nw : y.snd = (F ⋙ coyoneda.obj (op d)).map f x.snd\n⊢ Zag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\n[PROOFSTEP]\nleft\n[GOAL]\ncase intro.a.h\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\nf : x.fst ⟶ y.fst\nw : y.snd = (F ⋙ coyoneda.obj (op d)).map f x.snd\n⊢ Nonempty (StructuredArrow.mk x.snd ⟶ StructuredArrow.mk y.snd)\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase intro.a.h.val\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\nf : x.fst ⟶ y.fst\nw : y.snd = (F ⋙ coyoneda.obj (op d)).map f x.snd\n⊢ StructuredArrow.mk x.snd ⟶ StructuredArrow.mk y.snd\n[PROOFSTEP]\nexact StructuredArrow.homMk f\n[GOAL]\ncase refl\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x✝ : (X : C) × (d ⟶ F.obj X)\n⊢ Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk x✝.snd)\ncase symm\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x✝ y✝ : (X : C) × (d ⟶ F.obj X)\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x✝ y✝\na_ih✝ : Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk y✝.snd)\n⊢ Zigzag (StructuredArrow.mk y✝.snd) (StructuredArrow.mk x✝.snd)\ncase trans\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x✝ y✝ z✝ : (X : C) × (d ⟶ F.obj X)\na✝¹ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x✝ y✝\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) y✝ z✝\na_ih✝¹ : Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk y✝.snd)\na_ih✝ : Zigzag (StructuredArrow.mk y✝.snd) (StructuredArrow.mk z✝.snd)\n⊢ Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk z✝.snd)\n[PROOFSTEP]\ncase refl => fconstructor\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x✝ : (X : C) × (d ⟶ F.obj X)\n⊢ Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk x✝.snd)\n[PROOFSTEP]\ncase refl => fconstructor\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x✝ : (X : C) × (d ⟶ F.obj X)\n⊢ Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk x✝.snd)\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase symm\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x✝ y✝ : (X : C) × (d ⟶ F.obj X)\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x✝ y✝\na_ih✝ : Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk y✝.snd)\n⊢ Zigzag (StructuredArrow.mk y✝.snd) (StructuredArrow.mk x✝.snd)\ncase trans\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x✝ y✝ z✝ : (X : C) × (d ⟶ F.obj X)\na✝¹ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x✝ y✝\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) y✝ z✝\na_ih✝¹ : Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk y✝.snd)\na_ih✝ : Zigzag (StructuredArrow.mk y✝.snd) (StructuredArrow.mk z✝.snd)\n⊢ Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk z✝.snd)\n[PROOFSTEP]\ncase symm x y _ ih =>\n  apply zigzag_symmetric\n  exact ih\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x y\nih : Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\n⊢ Zigzag (StructuredArrow.mk y.snd) (StructuredArrow.mk x.snd)\n[PROOFSTEP]\ncase symm x y _ ih =>\n  apply zigzag_symmetric\n  exact ih\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x y\nih : Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\n⊢ Zigzag (StructuredArrow.mk y.snd) (StructuredArrow.mk x.snd)\n[PROOFSTEP]\napply zigzag_symmetric\n[GOAL]\ncase a\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y : (X : C) × (d ⟶ F.obj X)\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x y\nih : Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\n⊢ Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\n[PROOFSTEP]\nexact ih\n[GOAL]\ncase trans\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x✝ y✝ z✝ : (X : C) × (d ⟶ F.obj X)\na✝¹ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x✝ y✝\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) y✝ z✝\na_ih✝¹ : Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk y✝.snd)\na_ih✝ : Zigzag (StructuredArrow.mk y✝.snd) (StructuredArrow.mk z✝.snd)\n⊢ Zigzag (StructuredArrow.mk x✝.snd) (StructuredArrow.mk z✝.snd)\n[PROOFSTEP]\ncase trans x y z _ _ ih₁ ih₂ =>\n  apply Relation.ReflTransGen.trans\n  exact ih₁; exact ih₂\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y z : (X : C) × (d ⟶ F.obj X)\na✝¹ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x y\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) y z\nih₁ : Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\nih₂ : Zigzag (StructuredArrow.mk y.snd) (StructuredArrow.mk z.snd)\n⊢ Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk z.snd)\n[PROOFSTEP]\ncase trans x y z _ _ ih₁ ih₂ =>\n  apply Relation.ReflTransGen.trans\n  exact ih₁; exact ih₂\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y z : (X : C) × (d ⟶ F.obj X)\na✝¹ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x y\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) y z\nih₁ : Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\nih₂ : Zigzag (StructuredArrow.mk y.snd) (StructuredArrow.mk z.snd)\n⊢ Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk z.snd)\n[PROOFSTEP]\napply Relation.ReflTransGen.trans\n[GOAL]\ncase hab\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y z : (X : C) × (d ⟶ F.obj X)\na✝¹ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x y\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) y z\nih₁ : Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\nih₂ : Zigzag (StructuredArrow.mk y.snd) (StructuredArrow.mk z.snd)\n⊢ Relation.ReflTransGen Zag (StructuredArrow.mk x.snd) ?b\ncase hbc\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y z : (X : C) × (d ⟶ F.obj X)\na✝¹ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x y\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) y z\nih₁ : Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\nih₂ : Zigzag (StructuredArrow.mk y.snd) (StructuredArrow.mk z.snd)\n⊢ Relation.ReflTransGen Zag ?b (StructuredArrow.mk z.snd)\ncase b\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y z : (X : C) × (d ⟶ F.obj X)\na✝¹ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x y\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) y z\nih₁ : Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\nih₂ : Zigzag (StructuredArrow.mk y.snd) (StructuredArrow.mk z.snd)\n⊢ StructuredArrow d F\n[PROOFSTEP]\nexact ih₁\n[GOAL]\ncase hbc\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF✝ F : C ⥤ D\nd : D\nf₁ f₂ x y z : (X : C) × (d ⟶ F.obj X)\na✝¹ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) x y\na✝ : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) y z\nih₁ : Zigzag (StructuredArrow.mk x.snd) (StructuredArrow.mk y.snd)\nih₂ : Zigzag (StructuredArrow.mk y.snd) (StructuredArrow.mk z.snd)\n⊢ Relation.ReflTransGen Zag (StructuredArrow.mk y.snd) (StructuredArrow.mk z.snd)\n[PROOFSTEP]\nexact ih₂\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\n⊢ IsConnected (StructuredArrow d F)\n[PROOFSTEP]\nhave : Nonempty (StructuredArrow d F) := by\n  have := (I d).inv PUnit.unit\n  obtain ⟨j, y, rfl⟩ := Limits.Types.jointly_surjective'.{v, v} this\n  exact ⟨StructuredArrow.mk y⟩\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\n⊢ Nonempty (StructuredArrow d F)\n[PROOFSTEP]\nhave := (I d).inv PUnit.unit\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\nthis : colimit (F ⋙ coyoneda.obj (op d))\n⊢ Nonempty (StructuredArrow d F)\n[PROOFSTEP]\nobtain ⟨j, y, rfl⟩ := Limits.Types.jointly_surjective'.{v, v} this\n[GOAL]\ncase intro.intro\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\nj : C\ny : (F ⋙ coyoneda.obj (op d)).obj j\n⊢ Nonempty (StructuredArrow d F)\n[PROOFSTEP]\nexact ⟨StructuredArrow.mk y⟩\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\nthis : Nonempty (StructuredArrow d F)\n⊢ IsConnected (StructuredArrow d F)\n[PROOFSTEP]\napply zigzag_isConnected\n[GOAL]\ncase h\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\nthis : Nonempty (StructuredArrow d F)\n⊢ ∀ (j₁ j₂ : StructuredArrow d F), Zigzag j₁ j₂\n[PROOFSTEP]\nrintro ⟨⟨⟨⟩⟩, X₁, f₁⟩ ⟨⟨⟨⟩⟩, X₂, f₂⟩\n[GOAL]\ncase h.mk.mk.unit.mk.mk.unit\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\nthis : Nonempty (StructuredArrow d F)\nX₁ : C\nf₁ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₁\nX₂ : C\nf₂ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₂\n⊢ Zigzag { left := { as := PUnit.unit }, right := X₁, hom := f₁ }\n    { left := { as := PUnit.unit }, right := X₂, hom := f₂ }\n[PROOFSTEP]\nlet y₁ := colimit.ι (F ⋙ coyoneda.obj (op d)) X₁ f₁\n[GOAL]\ncase h.mk.mk.unit.mk.mk.unit\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\nthis : Nonempty (StructuredArrow d F)\nX₁ : C\nf₁ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₁\nX₂ : C\nf₂ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₂\ny₁ : colimit (F ⋙ coyoneda.obj (op d)) := colimit.ι (F ⋙ coyoneda.obj (op d)) X₁ f₁\n⊢ Zigzag { left := { as := PUnit.unit }, right := X₁, hom := f₁ }\n    { left := { as := PUnit.unit }, right := X₂, hom := f₂ }\n[PROOFSTEP]\nlet y₂ := colimit.ι (F ⋙ coyoneda.obj (op d)) X₂ f₂\n[GOAL]\ncase h.mk.mk.unit.mk.mk.unit\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\nthis : Nonempty (StructuredArrow d F)\nX₁ : C\nf₁ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₁\nX₂ : C\nf₂ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₂\ny₁ : colimit (F ⋙ coyoneda.obj (op d)) := colimit.ι (F ⋙ coyoneda.obj (op d)) X₁ f₁\ny₂ : colimit (F ⋙ coyoneda.obj (op d)) := colimit.ι (F ⋙ coyoneda.obj (op d)) X₂ f₂\n⊢ Zigzag { left := { as := PUnit.unit }, right := X₁, hom := f₁ }\n    { left := { as := PUnit.unit }, right := X₂, hom := f₂ }\n[PROOFSTEP]\nhave e : y₁ = y₂ := by\n  apply (I d).toEquiv.injective\n  ext\n[GOAL]\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\nthis : Nonempty (StructuredArrow d F)\nX₁ : C\nf₁ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₁\nX₂ : C\nf₂ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₂\ny₁ : colimit (F ⋙ coyoneda.obj (op d)) := colimit.ι (F ⋙ coyoneda.obj (op d)) X₁ f₁\ny₂ : colimit (F ⋙ coyoneda.obj (op d)) := colimit.ι (F ⋙ coyoneda.obj (op d)) X₂ f₂\n⊢ y₁ = y₂\n[PROOFSTEP]\napply (I d).toEquiv.injective\n[GOAL]\ncase a\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\nthis : Nonempty (StructuredArrow d F)\nX₁ : C\nf₁ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₁\nX₂ : C\nf₂ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₂\ny₁ : colimit (F ⋙ coyoneda.obj (op d)) := colimit.ι (F ⋙ coyoneda.obj (op d)) X₁ f₁\ny₂ : colimit (F ⋙ coyoneda.obj (op d)) := colimit.ι (F ⋙ coyoneda.obj (op d)) X₂ f₂\n⊢ ↑(I d).toEquiv y₁ = ↑(I d).toEquiv y₂\n[PROOFSTEP]\next\n[GOAL]\ncase h.mk.mk.unit.mk.mk.unit\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\nthis : Nonempty (StructuredArrow d F)\nX₁ : C\nf₁ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₁\nX₂ : C\nf₂ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₂\ny₁ : colimit (F ⋙ coyoneda.obj (op d)) := colimit.ι (F ⋙ coyoneda.obj (op d)) X₁ f₁\ny₂ : colimit (F ⋙ coyoneda.obj (op d)) := colimit.ι (F ⋙ coyoneda.obj (op d)) X₂ f₂\ne : y₁ = y₂\n⊢ Zigzag { left := { as := PUnit.unit }, right := X₁, hom := f₁ }\n    { left := { as := PUnit.unit }, right := X₂, hom := f₂ }\n[PROOFSTEP]\nhave t := Types.colimit_eq.{v, v} e\n[GOAL]\ncase h.mk.mk.unit.mk.mk.unit\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\nthis : Nonempty (StructuredArrow d F)\nX₁ : C\nf₁ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₁\nX₂ : C\nf₂ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₂\ny₁ : colimit (F ⋙ coyoneda.obj (op d)) := colimit.ι (F ⋙ coyoneda.obj (op d)) X₁ f₁\ny₂ : colimit (F ⋙ coyoneda.obj (op d)) := colimit.ι (F ⋙ coyoneda.obj (op d)) X₂ f₂\ne : y₁ = y₂\nt : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) { fst := X₁, snd := f₁ } { fst := X₂, snd := f₂ }\n⊢ Zigzag { left := { as := PUnit.unit }, right := X₁, hom := f₁ }\n    { left := { as := PUnit.unit }, right := X₂, hom := f₂ }\n[PROOFSTEP]\nclear e y₁ y₂\n[GOAL]\ncase h.mk.mk.unit.mk.mk.unit\nC : Type v\ninst✝¹ : Category.{v, v} C\nD : Type u₁\ninst✝ : Category.{v, u₁} D\nF : C ⥤ D\nI : (d : D) → colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit\nd : D\nthis : Nonempty (StructuredArrow d F)\nX₁ : C\nf₁ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₁\nX₂ : C\nf₂ : (fromPUnit d).obj { as := PUnit.unit } ⟶ F.obj X₂\nt : EqvGen (Types.Quot.Rel (F ⋙ coyoneda.obj (op d))) { fst := X₁, snd := f₁ } { fst := X₂, snd := f₂ }\n⊢ Zigzag { left := { as := PUnit.unit }, right := X₁, hom := f₁ }\n    { left := { as := PUnit.unit }, right := X₂, hom := f₂ }\n[PROOFSTEP]\nexact Final.zigzag_of_eqvGen_quot_rel t\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (F.obj X ⟶ d) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : F.obj X₀ ⟶ d\nz : Z X₀ k₀\n⊢ Z (lift F d) (homToLift F d)\n[PROOFSTEP]\napply Nonempty.some\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (F.obj X ⟶ d) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : F.obj X₀ ⟶ d\nz : Z X₀ k₀\n⊢ Nonempty (Z (lift F d) (homToLift F d))\n[PROOFSTEP]\napply @isPreconnected_induction _ _ _ (fun Y : CostructuredArrow F d => Z Y.left Y.hom) _ _ (CostructuredArrow.mk k₀) z\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (F.obj X ⟶ d) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : F.obj X₀ ⟶ d\nz : Z X₀ k₀\n⊢ {j₁ j₂ : CostructuredArrow F d} → (j₁ ⟶ j₂) → (fun Y => Z Y.left Y.hom) j₁ → (fun Y => Z Y.left Y.hom) j₂\n[PROOFSTEP]\nintro j₁ j₂ f a\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (F.obj X ⟶ d) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : F.obj X₀ ⟶ d\nz : Z X₀ k₀\nj₁ j₂ : CostructuredArrow F d\nf : j₁ ⟶ j₂\na : Z j₁.left j₁.hom\n⊢ Z j₂.left j₂.hom\n[PROOFSTEP]\nfapply h₁ _ _ _ _ f.left _ a\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (F.obj X ⟶ d) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : F.obj X₀ ⟶ d\nz : Z X₀ k₀\nj₁ j₂ : CostructuredArrow F d\nf : j₁ ⟶ j₂\na : Z j₁.left j₁.hom\n⊢ F.map f.left ≫ j₂.hom = j₁.hom\n[PROOFSTEP]\nconvert f.w\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (F.obj X ⟶ d) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : F.obj X₀ ⟶ d\nz : Z X₀ k₀\nj₁ j₂ : CostructuredArrow F d\nf : j₁ ⟶ j₂\na : Z j₁.left j₁.hom\ne_1✝ : (F.obj j₁.left ⟶ d) = (F.obj j₁.left ⟶ (fromPUnit d).obj j₂.right)\n⊢ j₁.hom = j₁.hom ≫ (fromPUnit d).map f.right\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (F.obj X ⟶ d) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : F.obj X₀ ⟶ d\nz : Z X₀ k₀\nj₁ j₂ : CostructuredArrow F d\nf : j₁ ⟶ j₂\na : Z j₁.left j₁.hom\ne_1✝ : (F.obj j₁.left ⟶ d) = (F.obj j₁.left ⟶ (fromPUnit d).obj j₂.right)\n⊢ j₁.hom = j₁.hom ≫ 𝟙 d\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (F.obj X ⟶ d) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : F.obj X₀ ⟶ d\nz : Z X₀ k₀\n⊢ {j₁ j₂ : CostructuredArrow F d} → (j₁ ⟶ j₂) → (fun Y => Z Y.left Y.hom) j₂ → (fun Y => Z Y.left Y.hom) j₁\n[PROOFSTEP]\nintro j₁ j₂ f a\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (F.obj X ⟶ d) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : F.obj X₀ ⟶ d\nz : Z X₀ k₀\nj₁ j₂ : CostructuredArrow F d\nf : j₁ ⟶ j₂\na : Z j₂.left j₂.hom\n⊢ Z j₁.left j₁.hom\n[PROOFSTEP]\nfapply h₂ _ _ _ _ f.left _ a\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (F.obj X ⟶ d) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : F.obj X₀ ⟶ d\nz : Z X₀ k₀\nj₁ j₂ : CostructuredArrow F d\nf : j₁ ⟶ j₂\na : Z j₂.left j₂.hom\n⊢ F.map f.left ≫ j₂.hom = j₁.hom\n[PROOFSTEP]\nconvert f.w\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (F.obj X ⟶ d) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : F.obj X₀ ⟶ d\nz : Z X₀ k₀\nj₁ j₂ : CostructuredArrow F d\nf : j₁ ⟶ j₂\na : Z j₂.left j₂.hom\ne_1✝ : (F.obj j₁.left ⟶ d) = (F.obj j₁.left ⟶ (fromPUnit d).obj j₂.right)\n⊢ j₁.hom = j₁.hom ≫ (fromPUnit d).map f.right\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_3.h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nd : D\nZ : (X : C) → (F.obj X ⟶ d) → Sort u_1\nh₁ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₁ k₁ → Z X₂ k₂\nh₂ : (X₁ X₂ : C) → (k₁ : F.obj X₁ ⟶ d) → (k₂ : F.obj X₂ ⟶ d) → (f : X₁ ⟶ X₂) → F.map f ≫ k₂ = k₁ → Z X₂ k₂ → Z X₁ k₁\nX₀ : C\nk₀ : F.obj X₀ ⟶ d\nz : Z X₀ k₀\nj₁ j₂ : CostructuredArrow F d\nf : j₁ ⟶ j₂\na : Z j₂.left j₂.hom\ne_1✝ : (F.obj j₁.left ⟶ d) = (F.obj j₁.left ⟶ (fromPUnit d).obj j₂.right)\n⊢ j₁.hom = j₁.hom ≫ 𝟙 d\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\n⊢ ((const D).obj c.pt).map f ≫ (fun d => NatTrans.app c.π (lift F d) ≫ G.map (homToLift F d)) Y =\n    (fun d => NatTrans.app c.π (lift F d) ≫ G.map (homToLift F d)) X ≫ G.map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\n⊢ 𝟙 c.pt ≫ NatTrans.app c.π (lift F Y) ≫ G.map (homToLift F Y) =\n    (NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X)) ≫ G.map f\n[PROOFSTEP]\nsimp\n  -- This would be true if we'd chosen `lift F Y` to be `lift F X`\n              -- and `homToLift F Y` to be `homToLift F X ≫ f`.\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\n⊢ NatTrans.app c.π (lift F Y) ≫ G.map (homToLift F Y) = NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X) ≫ G.map f\n[PROOFSTEP]\napply induction F fun Z k => (c.π.app Z ≫ G.map k : c.pt ⟶ _) = c.π.app (lift F X) ≫ G.map (homToLift F X) ≫ G.map f\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\n⊢ ∀ (X₁ X₂ : C) (k₁ : F.obj X₁ ⟶ Y) (k₂ : F.obj X₂ ⟶ Y) (f_1 : X₁ ⟶ X₂),\n    F.map f_1 ≫ k₂ = k₁ →\n      NatTrans.app c.π X₁ ≫ G.map k₁ = NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X) ≫ G.map f →\n        NatTrans.app c.π X₂ ≫ G.map k₂ = NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X) ≫ G.map f\n[PROOFSTEP]\nintro Z₁ Z₂ k₁ k₂ g a z\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\nZ₁ Z₂ : C\nk₁ : F.obj Z₁ ⟶ Y\nk₂ : F.obj Z₂ ⟶ Y\ng : Z₁ ⟶ Z₂\na : F.map g ≫ k₂ = k₁\nz : NatTrans.app c.π Z₁ ≫ G.map k₁ = NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X) ≫ G.map f\n⊢ NatTrans.app c.π Z₂ ≫ G.map k₂ = NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X) ≫ G.map f\n[PROOFSTEP]\nrw [← a, Functor.map_comp, ← Functor.comp_map, ← Category.assoc, ← Category.assoc, c.w] at z \n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\nZ₁ Z₂ : C\nk₁ : F.obj Z₁ ⟶ Y\nk₂ : F.obj Z₂ ⟶ Y\ng : Z₁ ⟶ Z₂\na : F.map g ≫ k₂ = k₁\nz : NatTrans.app c.π Z₂ ≫ G.map k₂ = (NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X)) ≫ G.map f\n⊢ NatTrans.app c.π Z₂ ≫ G.map k₂ = NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X) ≫ G.map f\n[PROOFSTEP]\nrw [z, Category.assoc]\n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\n⊢ ∀ (X₁ X₂ : C) (k₁ : F.obj X₁ ⟶ Y) (k₂ : F.obj X₂ ⟶ Y) (f_1 : X₁ ⟶ X₂),\n    F.map f_1 ≫ k₂ = k₁ →\n      NatTrans.app c.π X₂ ≫ G.map k₂ = NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X) ≫ G.map f →\n        NatTrans.app c.π X₁ ≫ G.map k₁ = NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X) ≫ G.map f\n[PROOFSTEP]\nintro Z₁ Z₂ k₁ k₂ g a z\n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\nZ₁ Z₂ : C\nk₁ : F.obj Z₁ ⟶ Y\nk₂ : F.obj Z₂ ⟶ Y\ng : Z₁ ⟶ Z₂\na : F.map g ≫ k₂ = k₁\nz : NatTrans.app c.π Z₂ ≫ G.map k₂ = NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X) ≫ G.map f\n⊢ NatTrans.app c.π Z₁ ≫ G.map k₁ = NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X) ≫ G.map f\n[PROOFSTEP]\nrw [← a, Functor.map_comp, ← Functor.comp_map, ← Category.assoc, ← Category.assoc, c.w, z, Category.assoc]\n[GOAL]\ncase z\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nc : Cone (F ⋙ G)\nX Y : D\nf : X ⟶ Y\n⊢ NatTrans.app c.π ?X₀ ≫ G.map ?k₀ = NatTrans.app c.π (lift F X) ≫ G.map (homToLift F X) ≫ G.map f\n[PROOFSTEP]\nrw [← Functor.map_comp]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cone (F ⋙ G)\nj : C\n⊢ NatTrans.app s.π (lift F (F.obj j)) ≫ G.map (homToLift F (F.obj j)) = NatTrans.app s.π j\n[PROOFSTEP]\napply induction F fun X k => s.π.app X ≫ G.map k = (s.π.app j : _)\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cone (F ⋙ G)\nj : C\n⊢ ∀ (X₁ X₂ : C) (k₁ : F.obj X₁ ⟶ F.obj j) (k₂ : F.obj X₂ ⟶ F.obj j) (f : X₁ ⟶ X₂),\n    F.map f ≫ k₂ = k₁ →\n      NatTrans.app s.π X₁ ≫ G.map k₁ = NatTrans.app s.π j → NatTrans.app s.π X₂ ≫ G.map k₂ = NatTrans.app s.π j\n[PROOFSTEP]\nintro j₁ j₂ k₁ k₂ f w h\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cone (F ⋙ G)\nj j₁ j₂ : C\nk₁ : F.obj j₁ ⟶ F.obj j\nk₂ : F.obj j₂ ⟶ F.obj j\nf : j₁ ⟶ j₂\nw : F.map f ≫ k₂ = k₁\nh : NatTrans.app s.π j₁ ≫ G.map k₁ = NatTrans.app s.π j\n⊢ NatTrans.app s.π j₂ ≫ G.map k₂ = NatTrans.app s.π j\n[PROOFSTEP]\nrw [← s.w f]\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cone (F ⋙ G)\nj j₁ j₂ : C\nk₁ : F.obj j₁ ⟶ F.obj j\nk₂ : F.obj j₂ ⟶ F.obj j\nf : j₁ ⟶ j₂\nw : F.map f ≫ k₂ = k₁\nh : NatTrans.app s.π j₁ ≫ G.map k₁ = NatTrans.app s.π j\n⊢ (NatTrans.app s.π j₁ ≫ (F ⋙ G).map f) ≫ G.map k₂ = NatTrans.app s.π j\n[PROOFSTEP]\nrw [← w] at h \n[GOAL]\ncase h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cone (F ⋙ G)\nj j₁ j₂ : C\nk₁ : F.obj j₁ ⟶ F.obj j\nk₂ : F.obj j₂ ⟶ F.obj j\nf : j₁ ⟶ j₂\nw : F.map f ≫ k₂ = k₁\nh : NatTrans.app s.π j₁ ≫ G.map (F.map f ≫ k₂) = NatTrans.app s.π j\n⊢ (NatTrans.app s.π j₁ ≫ (F ⋙ G).map f) ≫ G.map k₂ = NatTrans.app s.π j\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cone (F ⋙ G)\nj : C\n⊢ ∀ (X₁ X₂ : C) (k₁ : F.obj X₁ ⟶ F.obj j) (k₂ : F.obj X₂ ⟶ F.obj j) (f : X₁ ⟶ X₂),\n    F.map f ≫ k₂ = k₁ →\n      NatTrans.app s.π X₂ ≫ G.map k₂ = NatTrans.app s.π j → NatTrans.app s.π X₁ ≫ G.map k₁ = NatTrans.app s.π j\n[PROOFSTEP]\nintro j₁ j₂ k₁ k₂ f w h\n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cone (F ⋙ G)\nj j₁ j₂ : C\nk₁ : F.obj j₁ ⟶ F.obj j\nk₂ : F.obj j₂ ⟶ F.obj j\nf : j₁ ⟶ j₂\nw : F.map f ≫ k₂ = k₁\nh : NatTrans.app s.π j₂ ≫ G.map k₂ = NatTrans.app s.π j\n⊢ NatTrans.app s.π j₁ ≫ G.map k₁ = NatTrans.app s.π j\n[PROOFSTEP]\nrw [← s.w f] at h \n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cone (F ⋙ G)\nj j₁ j₂ : C\nk₁ : F.obj j₁ ⟶ F.obj j\nk₂ : F.obj j₂ ⟶ F.obj j\nf : j₁ ⟶ j₂\nw : F.map f ≫ k₂ = k₁\nh : (NatTrans.app s.π j₁ ≫ (F ⋙ G).map f) ≫ G.map k₂ = NatTrans.app s.π j\n⊢ NatTrans.app s.π j₁ ≫ G.map k₁ = NatTrans.app s.π j\n[PROOFSTEP]\nrw [← w]\n[GOAL]\ncase h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cone (F ⋙ G)\nj j₁ j₂ : C\nk₁ : F.obj j₁ ⟶ F.obj j\nk₂ : F.obj j₂ ⟶ F.obj j\nf : j₁ ⟶ j₂\nw : F.map f ≫ k₂ = k₁\nh : (NatTrans.app s.π j₁ ≫ (F ⋙ G).map f) ≫ G.map k₂ = NatTrans.app s.π j\n⊢ NatTrans.app s.π j₁ ≫ G.map (F.map f ≫ k₂) = NatTrans.app s.π j\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase z\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\ns : Cone (F ⋙ G)\nj : C\n⊢ NatTrans.app s.π ?X₀ ≫ G.map ?k₀ = NatTrans.app s.π j\n[PROOFSTEP]\nexact s.w (𝟙 _)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nt : Cone G\nP : IsLimit t\n⊢ IsLimit.lift (↑(isLimitWhiskerEquiv F t).symm P) (Cone.whisker F t) = 𝟙 t.pt\n[PROOFSTEP]\nchange 𝟙 t.pt ≫ P.lift (extendCone.obj (Cone.whisker F t)) = 𝟙 t.pt\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nt : Cone G\nP : IsLimit t\n⊢ 𝟙 t.pt ≫ IsLimit.lift P (extendCone.obj (Cone.whisker F t)) = 𝟙 t.pt\n[PROOFSTEP]\napply P.hom_ext\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nt : Cone G\nP : IsLimit t\n⊢ ∀ (j : D),\n    (𝟙 t.pt ≫ IsLimit.lift P (extendCone.obj (Cone.whisker F t))) ≫ NatTrans.app t.π j = 𝟙 t.pt ≫ NatTrans.app t.π j\n[PROOFSTEP]\nintro j\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Initial F\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nG : D ⥤ E\nt : Cone G\nP : IsLimit t\nj : D\n⊢ (𝟙 t.pt ≫ IsLimit.lift P (extendCone.obj (Cone.whisker F t))) ≫ NatTrans.app t.π j = 𝟙 t.pt ≫ NatTrans.app t.π j\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Initial F\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝ : HasLimit G\n⊢ IsIso (limit.pre G F)\n[PROOFSTEP]\nrw [limit.pre_eq (limitConeComp F (getLimitCone G)) (getLimitCone G)]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Initial F\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝ : HasLimit G\n⊢ IsIso\n    ((limit.isoLimitCone (getLimitCone G)).hom ≫\n      IsLimit.lift (limitConeComp F (getLimitCone G)).isLimit (Cone.whisker F (getLimitCone G).cone) ≫\n        (limit.isoLimitCone (limitConeComp F (getLimitCone G))).inv)\n[PROOFSTEP]\nerw [limit_pre_is_iso_aux]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Initial F\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝ : HasLimit G\n⊢ IsIso\n    ((limit.isoLimitCone (getLimitCone G)).hom ≫\n      𝟙 (getLimitCone G).cone.pt ≫ (limit.isoLimitCone (limitConeComp F (getLimitCone G))).inv)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Initial F\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nG : D ⥤ E\ninst✝ : HasLimit G\n⊢ IsIso\n    ((limit.isoLimitCone (getLimitCone G)).hom ≫\n      𝟙 (getLimitCone G).cone.pt ≫ (limit.isoLimitCone (limitConeComp F (getLimitCone G))).inv)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhF : Final F\nhG : Final G\n⊢ Final (F ⋙ G)\n[PROOFSTEP]\nlet s₁ : C ≌ AsSmall.{max u₁ v₁ u₂ v₂ u₃ v₃} C := AsSmall.equiv\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhF : Final F\nhG : Final G\ns₁ : C ≌ AsSmall C := AsSmall.equiv\n⊢ Final (F ⋙ G)\n[PROOFSTEP]\nlet s₂ : D ≌ AsSmall.{max u₁ v₁ u₂ v₂ u₃ v₃} D := AsSmall.equiv\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhF : Final F\nhG : Final G\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\n⊢ Final (F ⋙ G)\n[PROOFSTEP]\nlet s₃ : E ≌ AsSmall.{max u₁ v₁ u₂ v₂ u₃ v₃} E := AsSmall.equiv\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhF : Final F\nhG : Final G\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\ns₃ : E ≌ AsSmall E := AsSmall.equiv\n⊢ Final (F ⋙ G)\n[PROOFSTEP]\nlet i : s₁.inverse ⋙ (F ⋙ G) ⋙ s₃.functor ≅ (s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ (s₂.inverse ⋙ G ⋙ s₃.functor) :=\n  isoWhiskerLeft (s₁.inverse ⋙ F) (isoWhiskerRight s₂.unitIso (G ⋙ s₃.functor))\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhF : Final F\nhG : Final G\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\ns₃ : E ≌ AsSmall E := AsSmall.equiv\ni : s₁.inverse ⋙ (F ⋙ G) ⋙ s₃.functor ≅ (s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor :=\n  isoWhiskerLeft (s₁.inverse ⋙ F) (isoWhiskerRight s₂.unitIso (G ⋙ s₃.functor))\n⊢ Final (F ⋙ G)\n[PROOFSTEP]\nrw [final_iff_comp_equivalence (F ⋙ G) s₃.functor, final_iff_equivalence_comp s₁.inverse, final_natIso_iff i,\n  final_iff_isIso_colimit_pre]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhF : Final F\nhG : Final G\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\ns₃ : E ≌ AsSmall E := AsSmall.equiv\ni : s₁.inverse ⋙ (F ⋙ G) ⋙ s₃.functor ≅ (s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor :=\n  isoWhiskerLeft (s₁.inverse ⋙ F) (isoWhiskerRight s₂.unitIso (G ⋙ s₃.functor))\n⊢ ∀ (G_1 : AsSmall E ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G_1 ((s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor))\n[PROOFSTEP]\nrw [final_iff_comp_equivalence F s₂.functor, final_iff_equivalence_comp s₁.inverse, final_iff_isIso_colimit_pre] at hF \n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhG : Final G\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\nhF :\n  ∀ (G : AsSmall D ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G (s₁.inverse ⋙ F ⋙ s₂.functor))\ns₃ : E ≌ AsSmall E := AsSmall.equiv\ni : s₁.inverse ⋙ (F ⋙ G) ⋙ s₃.functor ≅ (s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor :=\n  isoWhiskerLeft (s₁.inverse ⋙ F) (isoWhiskerRight s₂.unitIso (G ⋙ s₃.functor))\n⊢ ∀ (G_1 : AsSmall E ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G_1 ((s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor))\n[PROOFSTEP]\nrw [final_iff_comp_equivalence G s₃.functor, final_iff_equivalence_comp s₂.inverse, final_iff_isIso_colimit_pre] at hG \n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\nhF :\n  ∀ (G : AsSmall D ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G (s₁.inverse ⋙ F ⋙ s₂.functor))\ns₃ : E ≌ AsSmall E := AsSmall.equiv\nhG :\n  ∀ (G_1 : AsSmall E ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G_1 (s₂.inverse ⋙ G ⋙ s₃.functor))\ni : s₁.inverse ⋙ (F ⋙ G) ⋙ s₃.functor ≅ (s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor :=\n  isoWhiskerLeft (s₁.inverse ⋙ F) (isoWhiskerRight s₂.unitIso (G ⋙ s₃.functor))\n⊢ ∀ (G_1 : AsSmall E ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G_1 ((s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor))\n[PROOFSTEP]\nsimp only [← colimit.pre_pre]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\nhF :\n  ∀ (G : AsSmall D ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G (s₁.inverse ⋙ F ⋙ s₂.functor))\ns₃ : E ≌ AsSmall E := AsSmall.equiv\nhG :\n  ∀ (G_1 : AsSmall E ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G_1 (s₂.inverse ⋙ G ⋙ s₃.functor))\ni : s₁.inverse ⋙ (F ⋙ G) ⋙ s₃.functor ≅ (s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor :=\n  isoWhiskerLeft (s₁.inverse ⋙ F) (isoWhiskerRight s₂.unitIso (G ⋙ s₃.functor))\n⊢ ∀ (G_1 : AsSmall E ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso\n      (colimit.pre ((AsSmall.equiv.inverse ⋙ G ⋙ AsSmall.equiv.functor) ⋙ G_1)\n          (AsSmall.equiv.inverse ⋙ F ⋙ AsSmall.equiv.functor) ≫\n        colimit.pre G_1 (AsSmall.equiv.inverse ⋙ G ⋙ AsSmall.equiv.functor))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : Initial F\ninst✝ : Initial G\n⊢ Initial (F ⋙ G)\n[PROOFSTEP]\nsuffices : Final (F ⋙ G).op\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : Initial F\ninst✝ : Initial G\nthis : Final (F ⋙ G).op\n⊢ Initial (F ⋙ G)\n[PROOFSTEP]\nexact initial_of_final_op _\n[GOAL]\ncase this\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : Initial F\ninst✝ : Initial G\n⊢ Final (F ⋙ G).op\n[PROOFSTEP]\nexact final_comp F.op G.op\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhF : Final F\nhFG : Final (F ⋙ G)\n⊢ Final G\n[PROOFSTEP]\nlet s₁ : C ≌ AsSmall.{max u₁ v₁ u₂ v₂ u₃ v₃} C := AsSmall.equiv\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhF : Final F\nhFG : Final (F ⋙ G)\ns₁ : C ≌ AsSmall C := AsSmall.equiv\n⊢ Final G\n[PROOFSTEP]\nlet s₂ : D ≌ AsSmall.{max u₁ v₁ u₂ v₂ u₃ v₃} D := AsSmall.equiv\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhF : Final F\nhFG : Final (F ⋙ G)\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\n⊢ Final G\n[PROOFSTEP]\nlet s₃ : E ≌ AsSmall.{max u₁ v₁ u₂ v₂ u₃ v₃} E := AsSmall.equiv\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhF : Final F\nhFG : Final (F ⋙ G)\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\ns₃ : E ≌ AsSmall E := AsSmall.equiv\n⊢ Final G\n[PROOFSTEP]\nlet _i : s₁.inverse ⋙ (F ⋙ G) ⋙ s₃.functor ≅ (s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ (s₂.inverse ⋙ G ⋙ s₃.functor) :=\n  isoWhiskerLeft (s₁.inverse ⋙ F) (isoWhiskerRight s₂.unitIso (G ⋙ s₃.functor))\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhF : Final F\nhFG : Final (F ⋙ G)\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\ns₃ : E ≌ AsSmall E := AsSmall.equiv\n_i : s₁.inverse ⋙ (F ⋙ G) ⋙ s₃.functor ≅ (s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor :=\n  isoWhiskerLeft (s₁.inverse ⋙ F) (isoWhiskerRight s₂.unitIso (G ⋙ s₃.functor))\n⊢ Final G\n[PROOFSTEP]\nrw [final_iff_comp_equivalence G s₃.functor, final_iff_equivalence_comp s₂.inverse, final_iff_isIso_colimit_pre]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhF : Final F\nhFG : Final (F ⋙ G)\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\ns₃ : E ≌ AsSmall E := AsSmall.equiv\n_i : s₁.inverse ⋙ (F ⋙ G) ⋙ s₃.functor ≅ (s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor :=\n  isoWhiskerLeft (s₁.inverse ⋙ F) (isoWhiskerRight s₂.unitIso (G ⋙ s₃.functor))\n⊢ ∀ (G_1 : AsSmall E ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G_1 (s₂.inverse ⋙ G ⋙ s₃.functor))\n[PROOFSTEP]\nrw [final_iff_comp_equivalence F s₂.functor, final_iff_equivalence_comp s₁.inverse, final_iff_isIso_colimit_pre] at hF \n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\nhFG : Final (F ⋙ G)\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\nhF :\n  ∀ (G : AsSmall D ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G (s₁.inverse ⋙ F ⋙ s₂.functor))\ns₃ : E ≌ AsSmall E := AsSmall.equiv\n_i : s₁.inverse ⋙ (F ⋙ G) ⋙ s₃.functor ≅ (s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor :=\n  isoWhiskerLeft (s₁.inverse ⋙ F) (isoWhiskerRight s₂.unitIso (G ⋙ s₃.functor))\n⊢ ∀ (G_1 : AsSmall E ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G_1 (s₂.inverse ⋙ G ⋙ s₃.functor))\n[PROOFSTEP]\nrw [final_iff_comp_equivalence (F ⋙ G) s₃.functor, final_iff_equivalence_comp s₁.inverse, final_natIso_iff _i,\n  final_iff_isIso_colimit_pre] at hFG \n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\nhF :\n  ∀ (G : AsSmall D ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G (s₁.inverse ⋙ F ⋙ s₂.functor))\ns₃ : E ≌ AsSmall E := AsSmall.equiv\nhFG :\n  ∀ (G_1 : AsSmall E ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G_1 ((s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor))\n_i : s₁.inverse ⋙ (F ⋙ G) ⋙ s₃.functor ≅ (s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor :=\n  isoWhiskerLeft (s₁.inverse ⋙ F) (isoWhiskerRight s₂.unitIso (G ⋙ s₃.functor))\n⊢ ∀ (G_1 : AsSmall E ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G_1 (s₂.inverse ⋙ G ⋙ s₃.functor))\n[PROOFSTEP]\nsimp only [← colimit.pre_pre] at hFG \n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ns₁ : C ≌ AsSmall C := AsSmall.equiv\ns₂ : D ≌ AsSmall D := AsSmall.equiv\nhF :\n  ∀ (G : AsSmall D ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G (s₁.inverse ⋙ F ⋙ s₂.functor))\ns₃ : E ≌ AsSmall E := AsSmall.equiv\n_i : s₁.inverse ⋙ (F ⋙ G) ⋙ s₃.functor ≅ (s₁.inverse ⋙ F ⋙ s₂.functor) ⋙ s₂.inverse ⋙ G ⋙ s₃.functor :=\n  isoWhiskerLeft (s₁.inverse ⋙ F) (isoWhiskerRight s₂.unitIso (G ⋙ s₃.functor))\nhFG :\n  ∀ (G_1 : AsSmall E ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso\n      (colimit.pre ((AsSmall.equiv.inverse ⋙ G ⋙ AsSmall.equiv.functor) ⋙ G_1)\n          (AsSmall.equiv.inverse ⋙ F ⋙ AsSmall.equiv.functor) ≫\n        colimit.pre G_1 (AsSmall.equiv.inverse ⋙ G ⋙ AsSmall.equiv.functor))\n⊢ ∀ (G_1 : AsSmall E ⥤ Type (max (max (max (max (max u₁ u₂) u₃) v₁) v₂) v₃)),\n    IsIso (colimit.pre G_1 (s₂.inverse ⋙ G ⋙ s₃.functor))\n[PROOFSTEP]\nexact fun H => IsIso.of_isIso_comp_left (colimit.pre _ (s₁.inverse ⋙ F ⋙ s₂.functor)) _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : Initial F\ninst✝ : Initial (F ⋙ G)\n⊢ Initial G\n[PROOFSTEP]\nsuffices : Final G.op\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : Initial F\ninst✝ : Initial (F ⋙ G)\nthis : Final G.op\n⊢ Initial G\n[PROOFSTEP]\nexact initial_of_final_op _\n[GOAL]\ncase this\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : Initial F\ninst✝ : Initial (F ⋙ G)\n⊢ Final G.op\n[PROOFSTEP]\nhave : Final (F.op ⋙ G.op) := show Final (F ⋙ G).op from inferInstance\n[GOAL]\ncase this\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : Initial F\ninst✝ : Initial (F ⋙ G)\nthis : Final (F.op ⋙ G.op)\n⊢ Final G.op\n[PROOFSTEP]\nexact final_of_final_comp F.op G.op\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\n⊢ ∃ Z h, f ≫ h = g ≫ h\n[PROOFSTEP]\nlet P : StructuredArrow X F → Prop := fun h =>\n  ∃ (Z : C) (q₁ : h.right ⟶ Z) (q₂ : Final.lift F Y ⟶ Z), h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n⊢ ∃ Z h, f ≫ h = g ≫ h\n[PROOFSTEP]\nrsuffices ⟨Z, q₁, q₂, h⟩ : Nonempty (P (StructuredArrow.mk (g ≫ Final.homToLift F Y)))\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nZ : C\nq₁ : (StructuredArrow.mk (g ≫ Final.homToLift F Y)).right ⟶ Z\nq₂ : Final.lift F Y ⟶ Z\nh : (StructuredArrow.mk (g ≫ Final.homToLift F Y)).hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n⊢ ∃ Z h, f ≫ h = g ≫ h\n[PROOFSTEP]\nrefine' ⟨F.obj (IsFiltered.coeq q₁ q₂), Final.homToLift F Y ≫ F.map (q₁ ≫ IsFiltered.coeqHom q₁ q₂), _⟩\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nZ : C\nq₁ : (StructuredArrow.mk (g ≫ Final.homToLift F Y)).right ⟶ Z\nq₂ : Final.lift F Y ⟶ Z\nh : (StructuredArrow.mk (g ≫ Final.homToLift F Y)).hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n⊢ f ≫ Final.homToLift F Y ≫ F.map (q₁ ≫ IsFiltered.coeqHom q₁ q₂) =\n    g ≫ Final.homToLift F Y ≫ F.map (q₁ ≫ IsFiltered.coeqHom q₁ q₂)\n[PROOFSTEP]\nconv_lhs => rw [IsFiltered.coeq_condition]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nZ : C\nq₁ : (StructuredArrow.mk (g ≫ Final.homToLift F Y)).right ⟶ Z\nq₂ : Final.lift F Y ⟶ Z\nh : (StructuredArrow.mk (g ≫ Final.homToLift F Y)).hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n| f ≫ Final.homToLift F Y ≫ F.map (q₁ ≫ IsFiltered.coeqHom q₁ q₂)\n[PROOFSTEP]\nrw [IsFiltered.coeq_condition]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nZ : C\nq₁ : (StructuredArrow.mk (g ≫ Final.homToLift F Y)).right ⟶ Z\nq₂ : Final.lift F Y ⟶ Z\nh : (StructuredArrow.mk (g ≫ Final.homToLift F Y)).hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n| f ≫ Final.homToLift F Y ≫ F.map (q₁ ≫ IsFiltered.coeqHom q₁ q₂)\n[PROOFSTEP]\nrw [IsFiltered.coeq_condition]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nZ : C\nq₁ : (StructuredArrow.mk (g ≫ Final.homToLift F Y)).right ⟶ Z\nq₂ : Final.lift F Y ⟶ Z\nh : (StructuredArrow.mk (g ≫ Final.homToLift F Y)).hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n| f ≫ Final.homToLift F Y ≫ F.map (q₁ ≫ IsFiltered.coeqHom q₁ q₂)\n[PROOFSTEP]\nrw [IsFiltered.coeq_condition]\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nZ : C\nq₁ : (StructuredArrow.mk (g ≫ Final.homToLift F Y)).right ⟶ Z\nq₂ : Final.lift F Y ⟶ Z\nh : (StructuredArrow.mk (g ≫ Final.homToLift F Y)).hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n⊢ f ≫ Final.homToLift F Y ≫ F.map (q₂ ≫ IsFiltered.coeqHom q₁ q₂) =\n    g ≫ Final.homToLift F Y ≫ F.map (q₁ ≫ IsFiltered.coeqHom q₁ q₂)\n[PROOFSTEP]\nsimp only [F.map_comp, ← reassoc_of% h, StructuredArrow.mk_hom_eq_self, Category.assoc]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n⊢ Nonempty (P (StructuredArrow.mk (g ≫ Final.homToLift F Y)))\n[PROOFSTEP]\nhave h₀ : P (StructuredArrow.mk (f ≫ Final.homToLift F Y)) := ⟨_, 𝟙 _, 𝟙 _, by simp⟩\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n⊢ (StructuredArrow.mk (f ≫ Final.homToLift F Y)).hom ≫ F.map (𝟙 (StructuredArrow.mk (f ≫ Final.homToLift F Y)).right) =\n    f ≫ Final.homToLift F Y ≫ F.map (𝟙 (Final.lift F Y))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nh₀ : P (StructuredArrow.mk (f ≫ Final.homToLift F Y))\n⊢ Nonempty (P (StructuredArrow.mk (g ≫ Final.homToLift F Y)))\n[PROOFSTEP]\nrefine' isPreconnected_induction P _ _ h₀ _\n[GOAL]\ncase refine'_1\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nh₀ : P (StructuredArrow.mk (f ≫ Final.homToLift F Y))\n⊢ ∀ {j₁ j₂ : StructuredArrow X F}, (j₁ ⟶ j₂) → P j₁ → P j₂\n[PROOFSTEP]\nrintro U V h ⟨Z, q₁, q₂, hq⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nh₀ : P (StructuredArrow.mk (f ≫ Final.homToLift F Y))\nU V : StructuredArrow X F\nh : U ⟶ V\nZ : C\nq₁ : U.right ⟶ Z\nq₂ : Final.lift F Y ⟶ Z\nhq : U.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n⊢ P V\n[PROOFSTEP]\nobtain ⟨W, q₃, q₄, hq'⟩ := IsFiltered.span q₁ h.right\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nh₀ : P (StructuredArrow.mk (f ≫ Final.homToLift F Y))\nU V : StructuredArrow X F\nh : U ⟶ V\nZ : C\nq₁ : U.right ⟶ Z\nq₂ : Final.lift F Y ⟶ Z\nhq : U.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nW : C\nq₃ : Z ⟶ W\nq₄ : V.right ⟶ W\nhq' : q₁ ≫ q₃ = h.right ≫ q₄\n⊢ P V\n[PROOFSTEP]\nrefine' ⟨W, q₄, q₂ ≫ q₃, _⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nh₀ : P (StructuredArrow.mk (f ≫ Final.homToLift F Y))\nU V : StructuredArrow X F\nh : U ⟶ V\nZ : C\nq₁ : U.right ⟶ Z\nq₂ : Final.lift F Y ⟶ Z\nhq : U.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nW : C\nq₃ : Z ⟶ W\nq₄ : V.right ⟶ W\nhq' : q₁ ≫ q₃ = h.right ≫ q₄\n⊢ V.hom ≫ F.map q₄ = f ≫ Final.homToLift F Y ≫ F.map (q₂ ≫ q₃)\n[PROOFSTEP]\nrw [F.map_comp, ← reassoc_of% hq, ← F.map_comp, hq', F.map_comp, StructuredArrow.w_assoc]\n[GOAL]\ncase refine'_2\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nh₀ : P (StructuredArrow.mk (f ≫ Final.homToLift F Y))\n⊢ ∀ {j₁ j₂ : StructuredArrow X F}, (j₁ ⟶ j₂) → P j₂ → P j₁\n[PROOFSTEP]\nrintro U V h ⟨Z, q₁, q₂, hq⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nh₀ : P (StructuredArrow.mk (f ≫ Final.homToLift F Y))\nU V : StructuredArrow X F\nh : U ⟶ V\nZ : C\nq₁ : V.right ⟶ Z\nq₂ : Final.lift F Y ⟶ Z\nhq : V.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n⊢ P U\n[PROOFSTEP]\nexact ⟨Z, h.right ≫ q₁, q₂, by simp only [F.map_comp, StructuredArrow.w_assoc, hq]⟩\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝¹ : Final F\ninst✝ : IsFilteredOrEmpty C\nX Y : D\nf g : X ⟶ Y\nP : StructuredArrow X F → Prop := fun h => ∃ Z q₁ q₂, h.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\nh₀ : P (StructuredArrow.mk (f ≫ Final.homToLift F Y))\nU V : StructuredArrow X F\nh : U ⟶ V\nZ : C\nq₁ : V.right ⟶ Z\nq₂ : Final.lift F Y ⟶ Z\nhq : V.hom ≫ F.map q₁ = f ≫ Final.homToLift F Y ≫ F.map q₂\n⊢ U.hom ≫ F.map (h.right ≫ q₁) = f ≫ Final.homToLift F Y ≫ F.map q₂\n[PROOFSTEP]\nsimp only [F.map_comp, StructuredArrow.w_assoc, hq]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Final", "llama_tokens": 45623, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191337850932, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.37663760976798283}}
{"text": "[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\n⊢ IsOpen {a} ↔ ¬IsLimit a\n[PROOFSTEP]\nrefine' ⟨fun h ⟨h₀, hsucc⟩ => _, fun ha => _⟩\n[GOAL]\ncase refine'_1\ns : Set Ordinal.{u}\na : Ordinal.{u}\nh : IsOpen {a}\nx✝ : IsLimit a\nh₀ : a ≠ 0\nhsucc : ∀ (a_1 : Ordinal.{u}), a_1 < a → succ a_1 < a\n⊢ False\n[PROOFSTEP]\nobtain ⟨b, c, hbc, hbc'⟩ :=\n  (mem_nhds_iff_exists_Ioo_subset' ⟨0, Ordinal.pos_iff_ne_zero.2 h₀⟩ ⟨_, lt_succ a⟩).1 (h.mem_nhds rfl)\n[GOAL]\ncase refine'_1.intro.intro.intro\ns : Set Ordinal.{u}\na : Ordinal.{u}\nh : IsOpen {a}\nx✝ : IsLimit a\nh₀ : a ≠ 0\nhsucc : ∀ (a_1 : Ordinal.{u}), a_1 < a → succ a_1 < a\nb c : Ordinal.{u}\nhbc : a ∈ Set.Ioo b c\nhbc' : Set.Ioo b c ⊆ {a}\n⊢ False\n[PROOFSTEP]\nhave hba := hsucc b hbc.1\n[GOAL]\ncase refine'_1.intro.intro.intro\ns : Set Ordinal.{u}\na : Ordinal.{u}\nh : IsOpen {a}\nx✝ : IsLimit a\nh₀ : a ≠ 0\nhsucc : ∀ (a_1 : Ordinal.{u}), a_1 < a → succ a_1 < a\nb c : Ordinal.{u}\nhbc : a ∈ Set.Ioo b c\nhbc' : Set.Ioo b c ⊆ {a}\nhba : succ b < a\n⊢ False\n[PROOFSTEP]\nexact hba.ne (hbc' ⟨lt_succ b, hba.trans hbc.2⟩)\n[GOAL]\ncase refine'_2\ns : Set Ordinal.{u}\na : Ordinal.{u}\nha : ¬IsLimit a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrcases zero_or_succ_or_limit a with (rfl | ⟨b, rfl⟩ | ha')\n[GOAL]\ncase refine'_2.inl\ns : Set Ordinal.{u}\nha : ¬IsLimit 0\n⊢ IsOpen {0}\n[PROOFSTEP]\nrw [← bot_eq_zero, ← Set.Iic_bot, ← Iio_succ]\n[GOAL]\ncase refine'_2.inl\ns : Set Ordinal.{u}\nha : ¬IsLimit 0\n⊢ IsOpen (Set.Iio (succ ⊥))\n[PROOFSTEP]\nexact isOpen_Iio\n[GOAL]\ncase refine'_2.inr.inl.intro\ns : Set Ordinal.{u}\nb : Ordinal.{u}\nha : ¬IsLimit (succ b)\n⊢ IsOpen {succ b}\n[PROOFSTEP]\nrw [← Set.Icc_self, Icc_succ_left, ← Ioo_succ_right]\n[GOAL]\ncase refine'_2.inr.inl.intro\ns : Set Ordinal.{u}\nb : Ordinal.{u}\nha : ¬IsLimit (succ b)\n⊢ IsOpen (Set.Ioo b (succ (succ b)))\n[PROOFSTEP]\nexact isOpen_Ioo\n[GOAL]\ncase refine'_2.inr.inr\ns : Set Ordinal.{u}\na : Ordinal.{u}\nha : ¬IsLimit a\nha' : IsLimit a\n⊢ IsOpen {a}\n[PROOFSTEP]\nexact (ha ha').elim\n[GOAL]\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\na : Ordinal.{u_1}\n⊢ 𝓝[Set.Iio a] a = 𝓝[{a}ᶜ] a\n[PROOFSTEP]\nrw [← nhds_left'_sup_nhds_right', nhds_right', sup_bot_eq]\n  -- todo: generalize to a `SuccOrder`\n[GOAL]\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\na : Ordinal.{u_1}\n⊢ 𝓝[Set.Iic a] a = 𝓝 a\n[PROOFSTEP]\nrw [← nhds_left_sup_nhds_right', nhds_right', sup_bot_eq]\n  -- todo: generalize to a `SuccOrder`\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\n⊢ IsOpen s ↔ ∀ (o : Ordinal.{u}), o ∈ s → IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s\n[PROOFSTEP]\nrefine isOpen_iff_mem_nhds.trans <| forall₂_congr fun o ho => ?_\n[GOAL]\ns : Set Ordinal.{u}\na o : Ordinal.{u}\nho : o ∈ s\n⊢ s ∈ 𝓝 o ↔ IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s\n[PROOFSTEP]\nby_cases ho' : IsLimit o\n[GOAL]\ncase pos\ns : Set Ordinal.{u}\na o : Ordinal.{u}\nho : o ∈ s\nho' : IsLimit o\n⊢ s ∈ 𝓝 o ↔ IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s\n[PROOFSTEP]\nsimp only [(nhdsBasis_Ioc ho'.1).mem_iff, ho', true_implies]\n[GOAL]\ncase pos\ns : Set Ordinal.{u}\na o : Ordinal.{u}\nho : o ∈ s\nho' : IsLimit o\n⊢ (∃ i, i < o ∧ Set.Ioc i o ⊆ s) ↔ ∃ a, a < o ∧ Set.Ioo a o ⊆ s\n[PROOFSTEP]\nrefine exists_congr fun a => and_congr_right fun ha => ?_\n[GOAL]\ncase pos\ns : Set Ordinal.{u}\na✝ o : Ordinal.{u}\nho : o ∈ s\nho' : IsLimit o\na : Ordinal.{u}\nha : a < o\n⊢ Set.Ioc a o ⊆ s ↔ Set.Ioo a o ⊆ s\n[PROOFSTEP]\nsimp only [← Set.Ioo_insert_right ha, Set.insert_subset_iff, ho, true_and]\n[GOAL]\ncase neg\ns : Set Ordinal.{u}\na o : Ordinal.{u}\nho : o ∈ s\nho' : ¬IsLimit o\n⊢ s ∈ 𝓝 o ↔ IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s\n[PROOFSTEP]\nsimp [nhds_eq_pure.2 ho', ho, ho']\n[GOAL]\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\n⊢ TFAE\n    [a ∈ closure s, a ∈ closure (s ∩ Iic a), Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a,\n      ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a,\n      ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a,\n      ∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a]\n[PROOFSTEP]\ntfae_have 1 → 2\n[GOAL]\ncase tfae_1_to_2\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\n⊢ a ∈ closure s → a ∈ closure (s ∩ Iic a)\n[PROOFSTEP]\nsimp only [mem_closure_iff_nhdsWithin_neBot, inter_comm s, nhdsWithin_inter', nhds_left_eq_nhds]\n[GOAL]\ncase tfae_1_to_2\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\n⊢ Filter.NeBot (𝓝[s] a) → Filter.NeBot (𝓝 a ⊓ Filter.principal s)\n[PROOFSTEP]\nexact id\n[GOAL]\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\n⊢ TFAE\n    [a ∈ closure s, a ∈ closure (s ∩ Iic a), Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a,\n      ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a,\n      ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a,\n      ∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a]\n[PROOFSTEP]\ntfae_have 2 → 3\n[GOAL]\ncase tfae_2_to_3\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\n⊢ a ∈ closure (s ∩ Iic a) → Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\n[PROOFSTEP]\nintro h\n[GOAL]\ncase tfae_2_to_3\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\nh : a ∈ closure (s ∩ Iic a)\n⊢ Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\n[PROOFSTEP]\ncases' (s ∩ Iic a).eq_empty_or_nonempty with he hne\n[GOAL]\ncase tfae_2_to_3.inl\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\nh : a ∈ closure (s ∩ Iic a)\nhe : s ∩ Iic a = ∅\n⊢ Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\n[PROOFSTEP]\nsimp [he] at h \n[GOAL]\ncase tfae_2_to_3.inr\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\nh : a ∈ closure (s ∩ Iic a)\nhne : Set.Nonempty (s ∩ Iic a)\n⊢ Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\n[PROOFSTEP]\nrefine ⟨hne, (isLUB_of_mem_closure ?_ h).csSup_eq hne⟩\n[GOAL]\ncase tfae_2_to_3.inr\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\nh : a ∈ closure (s ∩ Iic a)\nhne : Set.Nonempty (s ∩ Iic a)\n⊢ a ∈ upperBounds (s ∩ Iic a)\n[PROOFSTEP]\nexact fun x hx => hx.2\n[GOAL]\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\ntfae_2_to_3 : a ∈ closure (s ∩ Iic a) → Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\n⊢ TFAE\n    [a ∈ closure s, a ∈ closure (s ∩ Iic a), Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a,\n      ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a,\n      ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a,\n      ∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a]\n[PROOFSTEP]\ntfae_have 3 → 4\n[GOAL]\ncase tfae_3_to_4\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\ntfae_2_to_3 : a ∈ closure (s ∩ Iic a) → Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\n⊢ Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a → ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a\n[PROOFSTEP]\nexact fun h => ⟨_, inter_subset_left _ _, h.1, bddAbove_Iic.mono (inter_subset_right _ _), h.2⟩\n[GOAL]\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\ntfae_2_to_3 : a ∈ closure (s ∩ Iic a) → Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\ntfae_3_to_4 : Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a → ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a\n⊢ TFAE\n    [a ∈ closure s, a ∈ closure (s ∩ Iic a), Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a,\n      ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a,\n      ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a,\n      ∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a]\n[PROOFSTEP]\ntfae_have 4 → 5\n[GOAL]\ncase tfae_4_to_5\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\ntfae_2_to_3 : a ∈ closure (s ∩ Iic a) → Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\ntfae_3_to_4 : Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a → ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a\n⊢ (∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a) →\n    ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a\n[PROOFSTEP]\nrintro ⟨t, hts, hne, hbdd, rfl⟩\n[GOAL]\ncase tfae_4_to_5.intro.intro.intro.intro\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\n⊢ ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = sSup t\n[PROOFSTEP]\nhave hlub : IsLUB t (sSup t) := isLUB_csSup hne hbdd\n[GOAL]\ncase tfae_4_to_5.intro.intro.intro.intro\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\nhlub : IsLUB t (sSup t)\n⊢ ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = sSup t\n[PROOFSTEP]\nlet ⟨y, hyt⟩ := hne\n[GOAL]\ncase tfae_4_to_5.intro.intro.intro.intro\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\nhlub : IsLUB t (sSup t)\ny : Ordinal.{u}\nhyt : y ∈ t\n⊢ ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = sSup t\n[PROOFSTEP]\nclassical\nrefine ⟨succ (sSup t), succ_ne_zero _, fun x _ => if x ∈ t then x else y, fun x _ => ?_, ?_⟩\n· simp only\n  split_ifs with h <;> exact hts ‹_›\n· refine le_antisymm (bsup_le fun x _ => ?_) (csSup_le hne fun x hx => ?_)\n  · split_ifs <;> exact hlub.1 ‹_›\n  · refine (if_pos hx).symm.trans_le (le_bsup _ _ <| (hlub.1 hx).trans_lt (lt_succ _))\n[GOAL]\ncase tfae_4_to_5.intro.intro.intro.intro\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\nhlub : IsLUB t (sSup t)\ny : Ordinal.{u}\nhyt : y ∈ t\n⊢ ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = sSup t\n[PROOFSTEP]\nrefine ⟨succ (sSup t), succ_ne_zero _, fun x _ => if x ∈ t then x else y, fun x _ => ?_, ?_⟩\n[GOAL]\ncase tfae_4_to_5.intro.intro.intro.intro.refine_1\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\nhlub : IsLUB t (sSup t)\ny : Ordinal.{u}\nhyt : y ∈ t\nx : Ordinal.{u}\nx✝ : x < succ (sSup t)\n⊢ (fun x x_1 => if x ∈ t then x else y) x x✝ ∈ s\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase tfae_4_to_5.intro.intro.intro.intro.refine_1\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\nhlub : IsLUB t (sSup t)\ny : Ordinal.{u}\nhyt : y ∈ t\nx : Ordinal.{u}\nx✝ : x < succ (sSup t)\n⊢ (if x ∈ t then x else y) ∈ s\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\nhlub : IsLUB t (sSup t)\ny : Ordinal.{u}\nhyt : y ∈ t\nx : Ordinal.{u}\nx✝ : x < succ (sSup t)\nh : x ∈ t\n⊢ x ∈ s\n[PROOFSTEP]\nexact hts ‹_›\n[GOAL]\ncase neg\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\nhlub : IsLUB t (sSup t)\ny : Ordinal.{u}\nhyt : y ∈ t\nx : Ordinal.{u}\nx✝ : x < succ (sSup t)\nh : ¬x ∈ t\n⊢ y ∈ s\n[PROOFSTEP]\nexact hts ‹_›\n[GOAL]\ncase tfae_4_to_5.intro.intro.intro.intro.refine_2\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\nhlub : IsLUB t (sSup t)\ny : Ordinal.{u}\nhyt : y ∈ t\n⊢ (bsup (succ (sSup t)) fun x x_1 => if x ∈ t then x else y) = sSup t\n[PROOFSTEP]\nrefine le_antisymm (bsup_le fun x _ => ?_) (csSup_le hne fun x hx => ?_)\n[GOAL]\ncase tfae_4_to_5.intro.intro.intro.intro.refine_2.refine_1\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\nhlub : IsLUB t (sSup t)\ny : Ordinal.{u}\nhyt : y ∈ t\nx : Ordinal.{u}\nx✝ : x < succ (sSup t)\n⊢ (if x ∈ t then x else y) ≤ sSup t\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\nhlub : IsLUB t (sSup t)\ny : Ordinal.{u}\nhyt : y ∈ t\nx : Ordinal.{u}\nx✝ : x < succ (sSup t)\nh✝ : x ∈ t\n⊢ x ≤ sSup t\n[PROOFSTEP]\nexact hlub.1 ‹_›\n[GOAL]\ncase neg\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\nhlub : IsLUB t (sSup t)\ny : Ordinal.{u}\nhyt : y ∈ t\nx : Ordinal.{u}\nx✝ : x < succ (sSup t)\nh✝ : ¬x ∈ t\n⊢ y ≤ sSup t\n[PROOFSTEP]\nexact hlub.1 ‹_›\n[GOAL]\ncase tfae_4_to_5.intro.intro.intro.intro.refine_2.refine_2\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns t : Set Ordinal.{u}\nhts : t ⊆ s\nhne : Set.Nonempty t\nhbdd : BddAbove t\ntfae_1_to_2 : sSup t ∈ closure s → sSup t ∈ closure (s ∩ Iic (sSup t))\ntfae_2_to_3 : sSup t ∈ closure (s ∩ Iic (sSup t)) → Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sSup t)) ∧ sSup (s ∩ Iic (sSup t)) = sSup t →\n    ∃ t_1, t_1 ⊆ s ∧ Set.Nonempty t_1 ∧ BddAbove t_1 ∧ sSup t_1 = sSup t\nhlub : IsLUB t (sSup t)\ny : Ordinal.{u}\nhyt : y ∈ t\nx : Ordinal.{u}\nhx : x ∈ t\n⊢ x ≤ bsup (succ (sSup t)) fun x x_1 => if x ∈ t then x else y\n[PROOFSTEP]\nrefine (if_pos hx).symm.trans_le (le_bsup _ _ <| (hlub.1 hx).trans_lt (lt_succ _))\n[GOAL]\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\ntfae_2_to_3 : a ∈ closure (s ∩ Iic a) → Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\ntfae_3_to_4 : Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a → ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a\ntfae_4_to_5 :\n  (∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a) →\n    ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a\n⊢ TFAE\n    [a ∈ closure s, a ∈ closure (s ∩ Iic a), Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a,\n      ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a,\n      ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a,\n      ∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a]\n[PROOFSTEP]\ntfae_have 5 → 6\n[GOAL]\ncase tfae_5_to_6\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\ntfae_2_to_3 : a ∈ closure (s ∩ Iic a) → Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\ntfae_3_to_4 : Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a → ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a\ntfae_4_to_5 :\n  (∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a) →\n    ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a\n⊢ (∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a) →\n    ∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a\n[PROOFSTEP]\nrintro ⟨o, h₀, f, hfs, rfl⟩\n[GOAL]\ncase tfae_5_to_6.intro.intro.intro.intro\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns : Set Ordinal.{u}\no : Ordinal.{u}\nh₀ : o ≠ 0\nf : (x : Ordinal.{u}) → x < o → Ordinal.{u}\nhfs : ∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s\ntfae_1_to_2 : bsup o f ∈ closure s → bsup o f ∈ closure (s ∩ Iic (bsup o f))\ntfae_2_to_3 :\n  bsup o f ∈ closure (s ∩ Iic (bsup o f)) → Set.Nonempty (s ∩ Iic (bsup o f)) ∧ sSup (s ∩ Iic (bsup o f)) = bsup o f\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (bsup o f)) ∧ sSup (s ∩ Iic (bsup o f)) = bsup o f →\n    ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = bsup o f\ntfae_4_to_5 :\n  (∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = bsup o f) →\n    ∃ o_1, o_1 ≠ 0 ∧ ∃ f_1, (∀ (x : Ordinal.{u}) (hx : x < o_1), f_1 x hx ∈ s) ∧ bsup o_1 f_1 = bsup o f\n⊢ ∃ ι, Nonempty ι ∧ ∃ f_1, (∀ (i : ι), f_1 i ∈ s) ∧ sup f_1 = bsup o f\n[PROOFSTEP]\nexact ⟨_, out_nonempty_iff_ne_zero.2 h₀, familyOfBFamily o f, fun _ => hfs _ _, rfl⟩\n[GOAL]\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\ntfae_2_to_3 : a ∈ closure (s ∩ Iic a) → Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\ntfae_3_to_4 : Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a → ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a\ntfae_4_to_5 :\n  (∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a) →\n    ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a\ntfae_5_to_6 :\n  (∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a) →\n    ∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a\n⊢ TFAE\n    [a ∈ closure s, a ∈ closure (s ∩ Iic a), Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a,\n      ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a,\n      ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a,\n      ∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a]\n[PROOFSTEP]\ntfae_have 6 → 1\n[GOAL]\ncase tfae_6_to_1\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\ntfae_2_to_3 : a ∈ closure (s ∩ Iic a) → Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\ntfae_3_to_4 : Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a → ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a\ntfae_4_to_5 :\n  (∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a) →\n    ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a\ntfae_5_to_6 :\n  (∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a) →\n    ∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a\n⊢ (∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a) → a ∈ closure s\n[PROOFSTEP]\nrintro ⟨ι, hne, f, hfs, rfl⟩\n[GOAL]\ncase tfae_6_to_1.intro.intro.intro.intro\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns : Set Ordinal.{u}\nι : Type u\nhne : Nonempty ι\nf : ι → Ordinal.{u}\nhfs : ∀ (i : ι), f i ∈ s\ntfae_1_to_2 : sup f ∈ closure s → sup f ∈ closure (s ∩ Iic (sup f))\ntfae_2_to_3 : sup f ∈ closure (s ∩ Iic (sup f)) → Set.Nonempty (s ∩ Iic (sup f)) ∧ sSup (s ∩ Iic (sup f)) = sup f\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sup f)) ∧ sSup (s ∩ Iic (sup f)) = sup f →\n    ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = sup f\ntfae_4_to_5 :\n  (∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = sup f) →\n    ∃ o, o ≠ 0 ∧ ∃ f_1, (∀ (x : Ordinal.{u}) (hx : x < o), f_1 x hx ∈ s) ∧ bsup o f_1 = sup f\ntfae_5_to_6 :\n  (∃ o, o ≠ 0 ∧ ∃ f_1, (∀ (x : Ordinal.{u}) (hx : x < o), f_1 x hx ∈ s) ∧ bsup o f_1 = sup f) →\n    ∃ ι_1, Nonempty ι_1 ∧ ∃ f_1, (∀ (i : ι_1), f_1 i ∈ s) ∧ sup f_1 = sup f\n⊢ sup f ∈ closure s\n[PROOFSTEP]\nrw [sup, iSup]\n[GOAL]\ncase tfae_6_to_1.intro.intro.intro.intro\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\ns : Set Ordinal.{u}\nι : Type u\nhne : Nonempty ι\nf : ι → Ordinal.{u}\nhfs : ∀ (i : ι), f i ∈ s\ntfae_1_to_2 : sup f ∈ closure s → sup f ∈ closure (s ∩ Iic (sup f))\ntfae_2_to_3 : sup f ∈ closure (s ∩ Iic (sup f)) → Set.Nonempty (s ∩ Iic (sup f)) ∧ sSup (s ∩ Iic (sup f)) = sup f\ntfae_3_to_4 :\n  Set.Nonempty (s ∩ Iic (sup f)) ∧ sSup (s ∩ Iic (sup f)) = sup f →\n    ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = sup f\ntfae_4_to_5 :\n  (∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = sup f) →\n    ∃ o, o ≠ 0 ∧ ∃ f_1, (∀ (x : Ordinal.{u}) (hx : x < o), f_1 x hx ∈ s) ∧ bsup o f_1 = sup f\ntfae_5_to_6 :\n  (∃ o, o ≠ 0 ∧ ∃ f_1, (∀ (x : Ordinal.{u}) (hx : x < o), f_1 x hx ∈ s) ∧ bsup o f_1 = sup f) →\n    ∃ ι_1, Nonempty ι_1 ∧ ∃ f_1, (∀ (i : ι_1), f_1 i ∈ s) ∧ sup f_1 = sup f\n⊢ sSup (Set.range f) ∈ closure s\n[PROOFSTEP]\nexact closure_mono (range_subset_iff.2 hfs) <| csSup_mem_closure (range_nonempty f) (bddAbove_range.{u, u} f)\n[GOAL]\ns✝ : Set Ordinal.{u}\na✝ a : Ordinal.{u}\ns : Set Ordinal.{u}\ntfae_1_to_2 : a ∈ closure s → a ∈ closure (s ∩ Iic a)\ntfae_2_to_3 : a ∈ closure (s ∩ Iic a) → Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a\ntfae_3_to_4 : Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a → ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a\ntfae_4_to_5 :\n  (∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a) →\n    ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a\ntfae_5_to_6 :\n  (∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a) →\n    ∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a\ntfae_6_to_1 : (∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a) → a ∈ closure s\n⊢ TFAE\n    [a ∈ closure s, a ∈ closure (s ∩ Iic a), Set.Nonempty (s ∩ Iic a) ∧ sSup (s ∩ Iic a) = a,\n      ∃ t, t ⊆ s ∧ Set.Nonempty t ∧ BddAbove t ∧ sSup t = a,\n      ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a,\n      ∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\n⊢ (∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ sup f = a) ↔ ∃ ι x f, (∀ (i : ι), f i ∈ s) ∧ sup f = a\n[PROOFSTEP]\nsimp only [exists_prop]\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : IsClosed s\n⊢ a ∈ s ↔ ∃ ι _hι f, (∀ (i : ι), f i ∈ s) ∧ sup f = a\n[PROOFSTEP]\nrw [← mem_closure_iff_sup, hs.closure_eq]\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\n⊢ (∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ bsup o f = a) ↔\n    ∃ o _ho f, (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) ∧ bsup o f = a\n[PROOFSTEP]\nsimp only [exists_prop]\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : IsClosed s\n⊢ a ∈ s ↔ ∃ o _ho f, (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) ∧ bsup o f = a\n[PROOFSTEP]\nrw [← mem_closure_iff_bsup, hs.closure_eq]\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\n⊢ IsClosed s ↔ ∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal.{u}), (∀ (i : ι), f i ∈ s) → sup f ∈ s\n[PROOFSTEP]\nuse fun hs ι hι f hf => (mem_closed_iff_sup hs).2 ⟨ι, hι, f, hf, rfl⟩\n[GOAL]\ncase mpr\ns : Set Ordinal.{u}\na : Ordinal.{u}\n⊢ (∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal.{u}), (∀ (i : ι), f i ∈ s) → sup f ∈ s) → IsClosed s\n[PROOFSTEP]\nrw [← closure_subset_iff_isClosed]\n[GOAL]\ncase mpr\ns : Set Ordinal.{u}\na : Ordinal.{u}\n⊢ (∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal.{u}), (∀ (i : ι), f i ∈ s) → sup f ∈ s) → closure s ⊆ s\n[PROOFSTEP]\nintro h x hx\n[GOAL]\ncase mpr\ns : Set Ordinal.{u}\na : Ordinal.{u}\nh : ∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal.{u}), (∀ (i : ι), f i ∈ s) → sup f ∈ s\nx : Ordinal.{u}\nhx : x ∈ closure s\n⊢ x ∈ s\n[PROOFSTEP]\nrcases mem_closure_iff_sup.1 hx with ⟨ι, hι, f, hf, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\ns : Set Ordinal.{u}\na : Ordinal.{u}\nh : ∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal.{u}), (∀ (i : ι), f i ∈ s) → sup f ∈ s\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\nhx : sup f ∈ closure s\n⊢ sup f ∈ s\n[PROOFSTEP]\nexact h hι f hf\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\n⊢ IsClosed s ↔\n    ∀ {o : Ordinal.{u}},\n      o ≠ 0 →\n        ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\n[PROOFSTEP]\nrw [isClosed_iff_sup]\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\n⊢ (∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal.{u}), (∀ (i : ι), f i ∈ s) → sup f ∈ s) ↔\n    ∀ {o : Ordinal.{u}},\n      o ≠ 0 →\n        ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\n[PROOFSTEP]\nrefine' ⟨fun H o ho f hf => H (out_nonempty_iff_ne_zero.2 ho) _ _, fun H ι hι f hf => _⟩\n[GOAL]\ncase refine'_1\ns : Set Ordinal.{u}\na : Ordinal.{u}\nH : ∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal.{u}), (∀ (i : ι), f i ∈ s) → sup f ∈ s\no : Ordinal.{u}\nho : o ≠ 0\nf : (a : Ordinal.{u}) → a < o → Ordinal.{u}\nhf : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s\n⊢ ∀ (i : (Quotient.out o).α), familyOfBFamily o f i ∈ s\n[PROOFSTEP]\nexact fun i => hf _ _\n[GOAL]\ncase refine'_2\ns : Set Ordinal.{u}\na : Ordinal.{u}\nH :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\n⊢ sup f ∈ s\n[PROOFSTEP]\nrw [← bsup_eq_sup]\n[GOAL]\ncase refine'_2\ns : Set Ordinal.{u}\na : Ordinal.{u}\nH :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\n⊢ bsup (type WellOrderingRel) (bfamilyOfFamily f) ∈ s\n[PROOFSTEP]\napply H (type_ne_zero_iff_nonempty.2 hι)\n[GOAL]\ncase refine'_2.a\ns : Set Ordinal.{u}\na : Ordinal.{u}\nH :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\n⊢ ∀ (i : Ordinal.{u}) (hi : i < type WellOrderingRel), bfamilyOfFamily f i hi ∈ s\n[PROOFSTEP]\nexact fun i hi => hf _\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\nha : a ∈ frontier s\n⊢ IsLimit a\n[PROOFSTEP]\nsimp only [frontier_eq_closure_inter_closure, Set.mem_inter_iff, mem_closure_iff] at ha \n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\nha :\n  (∀ (o : Set Ordinal.{u}), IsOpen o → a ∈ o → Set.Nonempty (o ∩ s)) ∧\n    ∀ (o : Set Ordinal.{u}), IsOpen o → a ∈ o → Set.Nonempty (o ∩ sᶜ)\n⊢ IsLimit a\n[PROOFSTEP]\nby_contra h\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\nha :\n  (∀ (o : Set Ordinal.{u}), IsOpen o → a ∈ o → Set.Nonempty (o ∩ s)) ∧\n    ∀ (o : Set Ordinal.{u}), IsOpen o → a ∈ o → Set.Nonempty (o ∩ sᶜ)\nh : ¬IsLimit a\n⊢ False\n[PROOFSTEP]\nrw [← isOpen_singleton_iff] at h \n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\nha :\n  (∀ (o : Set Ordinal.{u}), IsOpen o → a ∈ o → Set.Nonempty (o ∩ s)) ∧\n    ∀ (o : Set Ordinal.{u}), IsOpen o → a ∈ o → Set.Nonempty (o ∩ sᶜ)\nh : IsOpen {a}\n⊢ False\n[PROOFSTEP]\nrcases ha.1 _ h rfl with ⟨b, hb, hb'⟩\n[GOAL]\ncase intro.intro\ns : Set Ordinal.{u}\na : Ordinal.{u}\nha :\n  (∀ (o : Set Ordinal.{u}), IsOpen o → a ∈ o → Set.Nonempty (o ∩ s)) ∧\n    ∀ (o : Set Ordinal.{u}), IsOpen o → a ∈ o → Set.Nonempty (o ∩ sᶜ)\nh : IsOpen {a}\nb : Ordinal.{u}\nhb : b ∈ {a}\nhb' : b ∈ s\n⊢ False\n[PROOFSTEP]\nrcases ha.2 _ h rfl with ⟨c, hc, hc'⟩\n[GOAL]\ncase intro.intro.intro.intro\ns : Set Ordinal.{u}\na : Ordinal.{u}\nha :\n  (∀ (o : Set Ordinal.{u}), IsOpen o → a ∈ o → Set.Nonempty (o ∩ s)) ∧\n    ∀ (o : Set Ordinal.{u}), IsOpen o → a ∈ o → Set.Nonempty (o ∩ sᶜ)\nh : IsOpen {a}\nb : Ordinal.{u}\nhb : b ∈ {a}\nhb' : b ∈ s\nc : Ordinal.{u}\nhc : c ∈ {a}\nhc' : c ∈ sᶜ\n⊢ False\n[PROOFSTEP]\nrw [Set.mem_singleton_iff] at *\n[GOAL]\ncase intro.intro.intro.intro\ns : Set Ordinal.{u}\na : Ordinal.{u}\nha :\n  (∀ (o : Set Ordinal.{u}), IsOpen o → a ∈ o → Set.Nonempty (o ∩ s)) ∧\n    ∀ (o : Set Ordinal.{u}), IsOpen o → a ∈ o → Set.Nonempty (o ∩ sᶜ)\nh : IsOpen {a}\nb : Ordinal.{u}\nhb : b = a\nhb' : b ∈ s\nc : Ordinal.{u}\nhc : c = a\nhc' : c ∈ sᶜ\n⊢ False\n[PROOFSTEP]\nsubst hb\n[GOAL]\ncase intro.intro.intro.intro\ns : Set Ordinal.{u}\nb : Ordinal.{u}\nhb' : b ∈ s\nc : Ordinal.{u}\nhc' : c ∈ sᶜ\nha :\n  (∀ (o : Set Ordinal.{u}), IsOpen o → b ∈ o → Set.Nonempty (o ∩ s)) ∧\n    ∀ (o : Set Ordinal.{u}), IsOpen o → b ∈ o → Set.Nonempty (o ∩ sᶜ)\nh : IsOpen {b}\nhc : c = b\n⊢ False\n[PROOFSTEP]\nsubst hc\n[GOAL]\ncase intro.intro.intro.intro\ns : Set Ordinal.{u}\nc : Ordinal.{u}\nhc' : c ∈ sᶜ\nhb' : c ∈ s\nha :\n  (∀ (o : Set Ordinal.{u}), IsOpen o → c ∈ o → Set.Nonempty (o ∩ s)) ∧\n    ∀ (o : Set Ordinal.{u}), IsOpen o → c ∈ o → Set.Nonempty (o ∩ sᶜ)\nh : IsOpen {c}\n⊢ False\n[PROOFSTEP]\nexact hc' hb'\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\n⊢ IsNormal f ↔ StrictMono f ∧ Continuous f\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨h.strictMono, _⟩, _⟩\n[GOAL]\ncase refine'_1\ns : Set Ordinal.{u}\na : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh : IsNormal f\n⊢ Continuous f\n[PROOFSTEP]\nrw [continuous_def]\n[GOAL]\ncase refine'_1\ns : Set Ordinal.{u}\na : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh : IsNormal f\n⊢ ∀ (s : Set Ordinal.{u}), IsOpen s → IsOpen (f ⁻¹' s)\n[PROOFSTEP]\nintro s hs\n[GOAL]\ncase refine'_1\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh : IsNormal f\ns : Set Ordinal.{u}\nhs : IsOpen s\n⊢ IsOpen (f ⁻¹' s)\n[PROOFSTEP]\nrw [isOpen_iff] at *\n[GOAL]\ncase refine'_1\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh : IsNormal f\ns : Set Ordinal.{u}\nhs : ∀ (o : Ordinal.{u}), o ∈ s → IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s\n⊢ ∀ (o : Ordinal.{u}), o ∈ f ⁻¹' s → IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ f ⁻¹' s\n[PROOFSTEP]\nintro o ho ho'\n[GOAL]\ncase refine'_1\ns✝ : Set Ordinal.{u}\na : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh : IsNormal f\ns : Set Ordinal.{u}\nhs : ∀ (o : Ordinal.{u}), o ∈ s → IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s\no : Ordinal.{u}\nho : o ∈ f ⁻¹' s\nho' : IsLimit o\n⊢ ∃ a, a < o ∧ Set.Ioo a o ⊆ f ⁻¹' s\n[PROOFSTEP]\nrcases hs _ ho (h.isLimit ho') with ⟨a, ha, has⟩\n[GOAL]\ncase refine'_1.intro.intro\ns✝ : Set Ordinal.{u}\na✝ : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh : IsNormal f\ns : Set Ordinal.{u}\nhs : ∀ (o : Ordinal.{u}), o ∈ s → IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s\no : Ordinal.{u}\nho : o ∈ f ⁻¹' s\nho' : IsLimit o\na : Ordinal.{u}\nha : a < f o\nhas : Set.Ioo a (f o) ⊆ s\n⊢ ∃ a, a < o ∧ Set.Ioo a o ⊆ f ⁻¹' s\n[PROOFSTEP]\nrw [← IsNormal.bsup_eq.{u, u} h ho', lt_bsup] at ha \n[GOAL]\ncase refine'_1.intro.intro\ns✝ : Set Ordinal.{u}\na✝ : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh : IsNormal f\ns : Set Ordinal.{u}\nhs : ∀ (o : Ordinal.{u}), o ∈ s → IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s\no : Ordinal.{u}\nho : o ∈ f ⁻¹' s\nho' : IsLimit o\na : Ordinal.{u}\nha : ∃ i hi, a < f i\nhas : Set.Ioo a (f o) ⊆ s\n⊢ ∃ a, a < o ∧ Set.Ioo a o ⊆ f ⁻¹' s\n[PROOFSTEP]\nrcases ha with ⟨b, hb, hab⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\ns✝ : Set Ordinal.{u}\na✝ : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh : IsNormal f\ns : Set Ordinal.{u}\nhs : ∀ (o : Ordinal.{u}), o ∈ s → IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s\no : Ordinal.{u}\nho : o ∈ f ⁻¹' s\nho' : IsLimit o\na : Ordinal.{u}\nhas : Set.Ioo a (f o) ⊆ s\nb : Ordinal.{u}\nhb : b < o\nhab : a < f b\n⊢ ∃ a, a < o ∧ Set.Ioo a o ⊆ f ⁻¹' s\n[PROOFSTEP]\nexact ⟨b, hb, fun c hc => Set.mem_preimage.2 (has ⟨hab.trans (h.strictMono hc.1), h.strictMono hc.2⟩)⟩\n[GOAL]\ncase refine'_2\ns : Set Ordinal.{u}\na : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\n⊢ StrictMono f ∧ Continuous f → IsNormal f\n[PROOFSTEP]\nrw [isNormal_iff_strictMono_limit]\n[GOAL]\ncase refine'_2\ns : Set Ordinal.{u}\na : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\n⊢ StrictMono f ∧ Continuous f →\n    StrictMono f ∧\n      ∀ (o : Ordinal.{u}), IsLimit o → ∀ (a : Ordinal.{u}), (∀ (b : Ordinal.{u}), b < o → f b ≤ a) → f o ≤ a\n[PROOFSTEP]\nrintro ⟨h, h'⟩\n[GOAL]\ncase refine'_2.intro\ns : Set Ordinal.{u}\na : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh : StrictMono f\nh' : Continuous f\n⊢ StrictMono f ∧ ∀ (o : Ordinal.{u}), IsLimit o → ∀ (a : Ordinal.{u}), (∀ (b : Ordinal.{u}), b < o → f b ≤ a) → f o ≤ a\n[PROOFSTEP]\nrefine' ⟨h, fun o ho a h => _⟩\n[GOAL]\ncase refine'_2.intro\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh✝ : StrictMono f\nh' : Continuous f\no : Ordinal.{u}\nho : IsLimit o\na : Ordinal.{u}\nh : ∀ (b : Ordinal.{u}), b < o → f b ≤ a\n⊢ f o ≤ a\n[PROOFSTEP]\nsuffices : o ∈ f ⁻¹' Set.Iic a\n[GOAL]\ncase refine'_2.intro\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh✝ : StrictMono f\nh' : Continuous f\no : Ordinal.{u}\nho : IsLimit o\na : Ordinal.{u}\nh : ∀ (b : Ordinal.{u}), b < o → f b ≤ a\nthis : o ∈ f ⁻¹' Set.Iic a\n⊢ f o ≤ a\ncase this\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh✝ : StrictMono f\nh' : Continuous f\no : Ordinal.{u}\nho : IsLimit o\na : Ordinal.{u}\nh : ∀ (b : Ordinal.{u}), b < o → f b ≤ a\n⊢ o ∈ f ⁻¹' Set.Iic a\n[PROOFSTEP]\nexact Set.mem_preimage.1 this\n[GOAL]\ncase this\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh✝ : StrictMono f\nh' : Continuous f\no : Ordinal.{u}\nho : IsLimit o\na : Ordinal.{u}\nh : ∀ (b : Ordinal.{u}), b < o → f b ≤ a\n⊢ o ∈ f ⁻¹' Set.Iic a\n[PROOFSTEP]\nrw [mem_closed_iff_sup (IsClosed.preimage h' (@isClosed_Iic _ _ _ _ a))]\n[GOAL]\ncase this\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nh✝ : StrictMono f\nh' : Continuous f\no : Ordinal.{u}\nho : IsLimit o\na : Ordinal.{u}\nh : ∀ (b : Ordinal.{u}), b < o → f b ≤ a\n⊢ ∃ ι _hι f_1, (∀ (i : ι), f_1 i ∈ f ⁻¹' Set.Iic a) ∧ sup f_1 = o\n[PROOFSTEP]\nexact ⟨_, out_nonempty_iff_ne_zero.2 ho.1, typein (· < ·), fun i => h _ (typein_lt_self i), sup_typein_limit ho.2⟩\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\n⊢ IsNormal (enumOrd s) ↔ IsClosed s\n[PROOFSTEP]\nhave Hs := enumOrd_strictMono hs\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\n⊢ IsNormal (enumOrd s) ↔ IsClosed s\n[PROOFSTEP]\nrefine'\n  ⟨fun h => isClosed_iff_sup.2 fun {ι} hι f hf => _, fun h =>\n    (isNormal_iff_strictMono_limit _).2 ⟨Hs, fun a ha o H => _⟩⟩\n[GOAL]\ncase refine'_1\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh : IsNormal (enumOrd s)\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\n⊢ sup f ∈ s\n[PROOFSTEP]\nlet g : ι → Ordinal.{u} := fun i => (enumOrdOrderIso hs).symm ⟨_, hf i⟩\n[GOAL]\ncase refine'_1\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh : IsNormal (enumOrd s)\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\ng : ι → Ordinal.{u} := fun i => ↑(OrderIso.symm (enumOrdOrderIso hs)) { val := f i, property := (_ : f i ∈ s) }\n⊢ sup f ∈ s\n[PROOFSTEP]\nsuffices enumOrd s (sup.{u, u} g) = sup.{u, u} f by\n  rw [← this]\n  exact enumOrd_mem hs _\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh : IsNormal (enumOrd s)\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\ng : ι → Ordinal.{u} := fun i => ↑(OrderIso.symm (enumOrdOrderIso hs)) { val := f i, property := (_ : f i ∈ s) }\nthis : enumOrd s (sup g) = sup f\n⊢ sup f ∈ s\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh : IsNormal (enumOrd s)\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\ng : ι → Ordinal.{u} := fun i => ↑(OrderIso.symm (enumOrdOrderIso hs)) { val := f i, property := (_ : f i ∈ s) }\nthis : enumOrd s (sup g) = sup f\n⊢ enumOrd s (sup g) ∈ s\n[PROOFSTEP]\nexact enumOrd_mem hs _\n[GOAL]\ncase refine'_1\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh : IsNormal (enumOrd s)\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\ng : ι → Ordinal.{u} := fun i => ↑(OrderIso.symm (enumOrdOrderIso hs)) { val := f i, property := (_ : f i ∈ s) }\n⊢ enumOrd s (sup g) = sup f\n[PROOFSTEP]\nrw [@IsNormal.sup.{u, u, u} _ h ι g hι]\n[GOAL]\ncase refine'_1\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh : IsNormal (enumOrd s)\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\ng : ι → Ordinal.{u} := fun i => ↑(OrderIso.symm (enumOrdOrderIso hs)) { val := f i, property := (_ : f i ∈ s) }\n⊢ sup (enumOrd s ∘ g) = sup f\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine'_1.e_f\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh : IsNormal (enumOrd s)\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\ng : ι → Ordinal.{u} := fun i => ↑(OrderIso.symm (enumOrdOrderIso hs)) { val := f i, property := (_ : f i ∈ s) }\n⊢ enumOrd s ∘ g = f\n[PROOFSTEP]\next x\n[GOAL]\ncase refine'_1.e_f.h\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh : IsNormal (enumOrd s)\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\ng : ι → Ordinal.{u} := fun i => ↑(OrderIso.symm (enumOrdOrderIso hs)) { val := f i, property := (_ : f i ∈ s) }\nx : ι\n⊢ (enumOrd s ∘ g) x = f x\n[PROOFSTEP]\nchange ((enumOrdOrderIso hs) _).val = f x\n[GOAL]\ncase refine'_1.e_f.h\ns : Set Ordinal.{u}\na : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh : IsNormal (enumOrd s)\nι : Type u\nhι : Nonempty ι\nf : ι → Ordinal.{u}\nhf : ∀ (i : ι), f i ∈ s\ng : ι → Ordinal.{u} := fun i => ↑(OrderIso.symm (enumOrdOrderIso hs)) { val := f i, property := (_ : f i ∈ s) }\nx : ι\n⊢ ↑(↑(enumOrdOrderIso hs) (g x)) = f x\n[PROOFSTEP]\nrw [OrderIso.apply_symm_apply]\n[GOAL]\ncase refine'_2\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh : IsClosed s\na : Ordinal.{u}\nha : IsLimit a\no : Ordinal.{u}\nH : ∀ (b : Ordinal.{u}), b < a → enumOrd s b ≤ o\n⊢ enumOrd s a ≤ o\n[PROOFSTEP]\nrw [isClosed_iff_bsup] at h \n[GOAL]\ncase refine'_2\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\na : Ordinal.{u}\nha : IsLimit a\no : Ordinal.{u}\nH : ∀ (b : Ordinal.{u}), b < a → enumOrd s b ≤ o\n⊢ enumOrd s a ≤ o\n[PROOFSTEP]\nsuffices : enumOrd s a ≤ bsup.{u, u} a fun b (_ : b < a) => enumOrd s b\n[GOAL]\ncase refine'_2\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\na : Ordinal.{u}\nha : IsLimit a\no : Ordinal.{u}\nH : ∀ (b : Ordinal.{u}), b < a → enumOrd s b ≤ o\nthis : enumOrd s a ≤ bsup a fun b x => enumOrd s b\n⊢ enumOrd s a ≤ o\ncase this\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\na : Ordinal.{u}\nha : IsLimit a\no : Ordinal.{u}\nH : ∀ (b : Ordinal.{u}), b < a → enumOrd s b ≤ o\n⊢ enumOrd s a ≤ bsup a fun b x => enumOrd s b\n[PROOFSTEP]\nexact this.trans (bsup_le H)\n[GOAL]\ncase this\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\na : Ordinal.{u}\nha : IsLimit a\no : Ordinal.{u}\nH : ∀ (b : Ordinal.{u}), b < a → enumOrd s b ≤ o\n⊢ enumOrd s a ≤ bsup a fun b x => enumOrd s b\n[PROOFSTEP]\ncases' enumOrd_surjective hs _ (h ha.1 (fun b _ => enumOrd s b) fun b _ => enumOrd_mem hs b) with b hb\n[GOAL]\ncase this.intro\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\na : Ordinal.{u}\nha : IsLimit a\no : Ordinal.{u}\nH : ∀ (b : Ordinal.{u}), b < a → enumOrd s b ≤ o\nb : Ordinal.{u}\nhb : enumOrd s b = bsup a fun b x => enumOrd s b\n⊢ enumOrd s a ≤ bsup a fun b x => enumOrd s b\n[PROOFSTEP]\nrw [← hb]\n[GOAL]\ncase this.intro\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\na : Ordinal.{u}\nha : IsLimit a\no : Ordinal.{u}\nH : ∀ (b : Ordinal.{u}), b < a → enumOrd s b ≤ o\nb : Ordinal.{u}\nhb : enumOrd s b = bsup a fun b x => enumOrd s b\n⊢ enumOrd s a ≤ enumOrd s b\n[PROOFSTEP]\napply Hs.monotone\n[GOAL]\ncase this.intro.a\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\na : Ordinal.{u}\nha : IsLimit a\no : Ordinal.{u}\nH : ∀ (b : Ordinal.{u}), b < a → enumOrd s b ≤ o\nb : Ordinal.{u}\nhb : enumOrd s b = bsup a fun b x => enumOrd s b\n⊢ a ≤ b\n[PROOFSTEP]\nby_contra' hba\n[GOAL]\ncase this.intro.a\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\na : Ordinal.{u}\nha : IsLimit a\no : Ordinal.{u}\nH : ∀ (b : Ordinal.{u}), b < a → enumOrd s b ≤ o\nb : Ordinal.{u}\nhb : enumOrd s b = bsup a fun b x => enumOrd s b\nhba : b < a\n⊢ False\n[PROOFSTEP]\napply (Hs (lt_succ b)).not_le\n[GOAL]\ncase this.intro.a\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\na : Ordinal.{u}\nha : IsLimit a\no : Ordinal.{u}\nH : ∀ (b : Ordinal.{u}), b < a → enumOrd s b ≤ o\nb : Ordinal.{u}\nhb : enumOrd s b = bsup a fun b x => enumOrd s b\nhba : b < a\n⊢ enumOrd s (succ b) ≤ enumOrd s b\n[PROOFSTEP]\nrw [hb]\n[GOAL]\ncase this.intro.a\ns : Set Ordinal.{u}\na✝ : Ordinal.{u}\nhs : Set.Unbounded (fun x x_1 => x < x_1) s\nHs : StrictMono (enumOrd s)\nh :\n  ∀ {o : Ordinal.{u}},\n    o ≠ 0 →\n      ∀ (f : (a : Ordinal.{u}) → a < o → Ordinal.{u}), (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) → bsup o f ∈ s\na : Ordinal.{u}\nha : IsLimit a\no : Ordinal.{u}\nH : ∀ (b : Ordinal.{u}), b < a → enumOrd s b ≤ o\nb : Ordinal.{u}\nhb : enumOrd s b = bsup a fun b x => enumOrd s b\nhba : b < a\n⊢ enumOrd s (succ b) ≤ bsup a fun b x => enumOrd s b\n[PROOFSTEP]\nexact le_bsup.{u, u} _ _ (ha.2 _ hba)\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Ordinal.Topology", "llama_tokens": 24697, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.665410572017153, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.3766347172771489}}
{"text": "[GOAL]\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\n⊢ ContinuousAt hatInv x\n[PROOFSTEP]\nhaveI : T3Space (hat K) := Completion.t3Space K\n[GOAL]\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis : T3Space (hat K)\n⊢ ContinuousAt hatInv x\n[PROOFSTEP]\nrefine' denseInducing_coe.continuousAt_extend _\n[GOAL]\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis : T3Space (hat K)\n⊢ ∀ᶠ (x : hat K) in 𝓝 x, ∃ c, Tendsto (fun x => ↑K x⁻¹) (Filter.comap (↑K) (𝓝 x)) (𝓝 c)\n[PROOFSTEP]\napply mem_of_superset (compl_singleton_mem_nhds h)\n[GOAL]\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis : T3Space (hat K)\n⊢ {0}ᶜ ⊆ {x | (fun x => ∃ c, Tendsto (fun x => ↑K x⁻¹) (Filter.comap (↑K) (𝓝 x)) (𝓝 c)) x}\n[PROOFSTEP]\nintro y y_ne\n[GOAL]\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis : T3Space (hat K)\ny : hat K\ny_ne : y ∈ {0}ᶜ\n⊢ y ∈ {x | (fun x => ∃ c, Tendsto (fun x => ↑K x⁻¹) (Filter.comap (↑K) (𝓝 x)) (𝓝 c)) x}\n[PROOFSTEP]\nrw [mem_compl_singleton_iff] at y_ne \n[GOAL]\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\n⊢ y ∈ {x | (fun x => ∃ c, Tendsto (fun x => ↑K x⁻¹) (Filter.comap (↑K) (𝓝 x)) (𝓝 c)) x}\n[PROOFSTEP]\napply CompleteSpace.complete\n[GOAL]\ncase a\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\n⊢ Cauchy (map (fun x => ↑K x⁻¹) (Filter.comap (↑K) (𝓝 y)))\n[PROOFSTEP]\nhave : (fun (x : K) => (↑x⁻¹ : hat K)) = ((fun (y : K) => (↑y : hat K)) ∘ (fun (x : K) => (x⁻¹ : K))) :=\n  by\n  unfold Function.comp\n  simp\n[GOAL]\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\n⊢ (fun x => ↑K x⁻¹) = (fun y => ↑K y) ∘ fun x => x⁻¹\n[PROOFSTEP]\nunfold Function.comp\n[GOAL]\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\n⊢ (fun x => ↑K x⁻¹) = fun x => (fun y => ↑K y) ((fun x => x⁻¹) x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis✝ : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\nthis : (fun x => ↑K x⁻¹) = (fun y => ↑K y) ∘ fun x => x⁻¹\n⊢ Cauchy (map (fun x => ↑K x⁻¹) (Filter.comap (↑K) (𝓝 y)))\n[PROOFSTEP]\nrw [this, ← Filter.map_map]\n[GOAL]\ncase a\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis✝ : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\nthis : (fun x => ↑K x⁻¹) = (fun y => ↑K y) ∘ fun x => x⁻¹\n⊢ Cauchy (map (fun y => ↑K y) (map (fun x => x⁻¹) (Filter.comap (↑K) (𝓝 y))))\n[PROOFSTEP]\napply Cauchy.map _ (Completion.uniformContinuous_coe K)\n[GOAL]\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis✝ : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\nthis : (fun x => ↑K x⁻¹) = (fun y => ↑K y) ∘ fun x => x⁻¹\n⊢ Cauchy (map (fun x => x⁻¹) (Filter.comap (↑K) (𝓝 y)))\n[PROOFSTEP]\napply CompletableTopField.nice\n[GOAL]\ncase a\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis✝ : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\nthis : (fun x => ↑K x⁻¹) = (fun y => ↑K y) ∘ fun x => x⁻¹\n⊢ Cauchy (Filter.comap (↑K) (𝓝 y))\n[PROOFSTEP]\nhaveI := denseInducing_coe.comap_nhds_neBot y\n[GOAL]\ncase a\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis✝¹ : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\nthis✝ : (fun x => ↑K x⁻¹) = (fun y => ↑K y) ∘ fun x => x⁻¹\nthis : NeBot (Filter.comap (↑K) (𝓝 y))\n⊢ Cauchy (Filter.comap (↑K) (𝓝 y))\n[PROOFSTEP]\napply cauchy_nhds.comap\n[GOAL]\ncase a.hm\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis✝¹ : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\nthis✝ : (fun x => ↑K x⁻¹) = (fun y => ↑K y) ∘ fun x => x⁻¹\nthis : NeBot (Filter.comap (↑K) (𝓝 y))\n⊢ Filter.comap (fun p => (↑K p.fst, ↑K p.snd)) (uniformity (hat K)) ≤ uniformity K\n[PROOFSTEP]\nrw [Completion.comap_coe_eq_uniformity]\n[GOAL]\ncase a\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis✝ : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\nthis : (fun x => ↑K x⁻¹) = (fun y => ↑K y) ∘ fun x => x⁻¹\n⊢ 𝓝 0 ⊓ Filter.comap (↑K) (𝓝 y) = ⊥\n[PROOFSTEP]\nhave eq_bot : 𝓝 (0 : hat K) ⊓ 𝓝 y = ⊥ := by\n  by_contra h\n  exact y_ne (eq_of_nhds_neBot <| neBot_iff.mpr h).symm\n[GOAL]\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis✝ : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\nthis : (fun x => ↑K x⁻¹) = (fun y => ↑K y) ∘ fun x => x⁻¹\n⊢ 𝓝 0 ⊓ 𝓝 y = ⊥\n[PROOFSTEP]\nby_contra h\n[GOAL]\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh✝ : x ≠ 0\nthis✝ : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\nthis : (fun x => ↑K x⁻¹) = (fun y => ↑K y) ∘ fun x => x⁻¹\nh : ¬𝓝 0 ⊓ 𝓝 y = ⊥\n⊢ False\n[PROOFSTEP]\nexact y_ne (eq_of_nhds_neBot <| neBot_iff.mpr h).symm\n[GOAL]\ncase a\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis✝ : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\nthis : (fun x => ↑K x⁻¹) = (fun y => ↑K y) ∘ fun x => x⁻¹\neq_bot : 𝓝 0 ⊓ 𝓝 y = ⊥\n⊢ 𝓝 0 ⊓ Filter.comap (↑K) (𝓝 y) = ⊥\n[PROOFSTEP]\nerw [denseInducing_coe.nhds_eq_comap (0 : K), ← Filter.comap_inf, eq_bot]\n[GOAL]\ncase a\nK : Type u_1\ninst✝² : Field K\ninst✝¹ : UniformSpace K\ninst✝ : CompletableTopField K\nx : hat K\nh : x ≠ 0\nthis✝ : T3Space (hat K)\ny : hat K\ny_ne : y ≠ 0\nthis : (fun x => ↑K x⁻¹) = (fun y => ↑K y) ∘ fun x => x⁻¹\neq_bot : 𝓝 0 ⊓ 𝓝 y = ⊥\n⊢ Filter.comap ↑K ⊥ = ⊥\n[PROOFSTEP]\nexact comap_bot\n[GOAL]\nK : Type u_1\ninst✝³ : Field K\ninst✝² : UniformSpace K\ninst✝¹ : TopologicalDivisionRing K\ninst✝ : CompletableTopField K\nx : K\n⊢ (↑K x)⁻¹ = ↑K x⁻¹\n[PROOFSTEP]\nby_cases h : x = 0\n[GOAL]\ncase pos\nK : Type u_1\ninst✝³ : Field K\ninst✝² : UniformSpace K\ninst✝¹ : TopologicalDivisionRing K\ninst✝ : CompletableTopField K\nx : K\nh : x = 0\n⊢ (↑K x)⁻¹ = ↑K x⁻¹\n[PROOFSTEP]\nrw [h, inv_zero]\n[GOAL]\ncase pos\nK : Type u_1\ninst✝³ : Field K\ninst✝² : UniformSpace K\ninst✝¹ : TopologicalDivisionRing K\ninst✝ : CompletableTopField K\nx : K\nh : x = 0\n⊢ (↑K 0)⁻¹ = ↑K 0\n[PROOFSTEP]\ndsimp [Inv.inv]\n[GOAL]\ncase pos\nK : Type u_1\ninst✝³ : Field K\ninst✝² : UniformSpace K\ninst✝¹ : TopologicalDivisionRing K\ninst✝ : CompletableTopField K\nx : K\nh : x = 0\n⊢ (if ↑K 0 = 0 then 0 else hatInv (↑K 0)) = ↑K 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase pos\nK : Type u_1\ninst✝³ : Field K\ninst✝² : UniformSpace K\ninst✝¹ : TopologicalDivisionRing K\ninst✝ : CompletableTopField K\nx : K\nh : x = 0\n⊢ (if 0 = 0 then 0 else hatInv 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nK : Type u_1\ninst✝³ : Field K\ninst✝² : UniformSpace K\ninst✝¹ : TopologicalDivisionRing K\ninst✝ : CompletableTopField K\nx : K\nh : ¬x = 0\n⊢ (↑K x)⁻¹ = ↑K x⁻¹\n[PROOFSTEP]\nconv_lhs => dsimp [Inv.inv]\n[GOAL]\nK : Type u_1\ninst✝³ : Field K\ninst✝² : UniformSpace K\ninst✝¹ : TopologicalDivisionRing K\ninst✝ : CompletableTopField K\nx : K\nh : ¬x = 0\n| (↑K x)⁻¹\n[PROOFSTEP]\ndsimp [Inv.inv]\n[GOAL]\nK : Type u_1\ninst✝³ : Field K\ninst✝² : UniformSpace K\ninst✝¹ : TopologicalDivisionRing K\ninst✝ : CompletableTopField K\nx : K\nh : ¬x = 0\n| (↑K x)⁻¹\n[PROOFSTEP]\ndsimp [Inv.inv]\n[GOAL]\nK : Type u_1\ninst✝³ : Field K\ninst✝² : UniformSpace K\ninst✝¹ : TopologicalDivisionRing K\ninst✝ : CompletableTopField K\nx : K\nh : ¬x = 0\n| (↑K x)⁻¹\n[PROOFSTEP]\ndsimp [Inv.inv]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝³ : Field K\ninst✝² : UniformSpace K\ninst✝¹ : TopologicalDivisionRing K\ninst✝ : CompletableTopField K\nx : K\nh : ¬x = 0\n⊢ (if ↑K x = 0 then 0 else hatInv (↑K x)) = ↑K x⁻¹\n[PROOFSTEP]\nrw [if_neg]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝³ : Field K\ninst✝² : UniformSpace K\ninst✝¹ : TopologicalDivisionRing K\ninst✝ : CompletableTopField K\nx : K\nh : ¬x = 0\n⊢ hatInv (↑K x) = ↑K x⁻¹\n[PROOFSTEP]\nexact hatInv_extends h\n[GOAL]\ncase neg.hnc\nK : Type u_1\ninst✝³ : Field K\ninst✝² : UniformSpace K\ninst✝¹ : TopologicalDivisionRing K\ninst✝ : CompletableTopField K\nx : K\nh : ¬x = 0\n⊢ ¬↑K x = 0\n[PROOFSTEP]\nexact fun H => h (denseEmbedding_coe.inj H)\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\n⊢ x * hatInv x = 1\n[PROOFSTEP]\nhaveI : T1Space (hat K) := T2Space.t1Space\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\n⊢ x * hatInv x = 1\n[PROOFSTEP]\nlet f := fun x : hat K => x * hatInv x\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\n⊢ x * hatInv x = 1\n[PROOFSTEP]\nlet c := (fun (x : K) => (x : hat K))\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\n⊢ x * hatInv x = 1\n[PROOFSTEP]\nchange f x = 1\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\n⊢ f x = 1\n[PROOFSTEP]\nhave cont : ContinuousAt f x :=\n  by\n  letI : TopologicalSpace (hat K × hat K) := instTopologicalSpaceProd\n  have : ContinuousAt (fun y : hat K => ((y, hatInv y) : hat K × hat K)) x :=\n    continuous_id.continuousAt.prod (continuous_hatInv x_ne)\n  exact (_root_.continuous_mul.continuousAt.comp this : _)\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\n⊢ ContinuousAt f x\n[PROOFSTEP]\nletI : TopologicalSpace (hat K × hat K) := instTopologicalSpaceProd\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis✝ : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\nthis : TopologicalSpace (hat K × hat K) := instTopologicalSpaceProd\n⊢ ContinuousAt f x\n[PROOFSTEP]\nhave : ContinuousAt (fun y : hat K => ((y, hatInv y) : hat K × hat K)) x :=\n  continuous_id.continuousAt.prod (continuous_hatInv x_ne)\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis✝¹ : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\nthis✝ : TopologicalSpace (hat K × hat K) := instTopologicalSpaceProd\nthis : ContinuousAt (fun y => (y, hatInv y)) x\n⊢ ContinuousAt f x\n[PROOFSTEP]\nexact (_root_.continuous_mul.continuousAt.comp this : _)\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\n⊢ f x = 1\n[PROOFSTEP]\nhave clo : x ∈ closure (c '' {0}ᶜ) := by\n  have := denseInducing_coe.dense x\n  rw [← image_univ, show (univ : Set K) = {0} ∪ {0}ᶜ from (union_compl_self _).symm, image_union] at this \n  apply mem_closure_of_mem_closure_union this\n  rw [image_singleton]\n  exact compl_singleton_mem_nhds x_ne\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\n⊢ x ∈ closure (c '' {0}ᶜ)\n[PROOFSTEP]\nhave := denseInducing_coe.dense x\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis✝ : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nthis : x ∈ closure (range ↑K)\n⊢ x ∈ closure (c '' {0}ᶜ)\n[PROOFSTEP]\nrw [← image_univ, show (univ : Set K) = {0} ∪ {0}ᶜ from (union_compl_self _).symm, image_union] at this \n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis✝ : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nthis : x ∈ closure (↑K '' {0} ∪ ↑K '' {0}ᶜ)\n⊢ x ∈ closure (c '' {0}ᶜ)\n[PROOFSTEP]\napply mem_closure_of_mem_closure_union this\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis✝ : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nthis : x ∈ closure (↑K '' {0} ∪ ↑K '' {0}ᶜ)\n⊢ (↑K '' {0})ᶜ ∈ 𝓝 x\n[PROOFSTEP]\nrw [image_singleton]\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis✝ : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nthis : x ∈ closure (↑K '' {0} ∪ ↑K '' {0}ᶜ)\n⊢ {↑K 0}ᶜ ∈ 𝓝 x\n[PROOFSTEP]\nexact compl_singleton_mem_nhds x_ne\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nclo : x ∈ closure (c '' {0}ᶜ)\n⊢ f x = 1\n[PROOFSTEP]\nhave fxclo : f x ∈ closure (f '' (c '' {0}ᶜ)) := mem_closure_image cont clo\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nclo : x ∈ closure (c '' {0}ᶜ)\nfxclo : f x ∈ closure (f '' (c '' {0}ᶜ))\n⊢ f x = 1\n[PROOFSTEP]\nhave : f '' (c '' {0}ᶜ) ⊆ {1} := by\n  rw [image_image]\n  rintro _ ⟨z, z_ne, rfl⟩\n  rw [mem_singleton_iff]\n  rw [mem_compl_singleton_iff] at z_ne \n  dsimp\n  rw [hatInv_extends z_ne, ← coe_mul]\n  rw [mul_inv_cancel z_ne, coe_one]\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nclo : x ∈ closure (c '' {0}ᶜ)\nfxclo : f x ∈ closure (f '' (c '' {0}ᶜ))\n⊢ f '' (c '' {0}ᶜ) ⊆ {1}\n[PROOFSTEP]\nrw [image_image]\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nclo : x ∈ closure (c '' {0}ᶜ)\nfxclo : f x ∈ closure (f '' (c '' {0}ᶜ))\n⊢ (fun x => f (c x)) '' {0}ᶜ ⊆ {1}\n[PROOFSTEP]\nrintro _ ⟨z, z_ne, rfl⟩\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nclo : x ∈ closure (c '' {0}ᶜ)\nfxclo : f x ∈ closure (f '' (c '' {0}ᶜ))\nz : K\nz_ne : z ∈ {0}ᶜ\n⊢ (fun x => f (c x)) z ∈ {1}\n[PROOFSTEP]\nrw [mem_singleton_iff]\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nclo : x ∈ closure (c '' {0}ᶜ)\nfxclo : f x ∈ closure (f '' (c '' {0}ᶜ))\nz : K\nz_ne : z ∈ {0}ᶜ\n⊢ (fun x => f (c x)) z = 1\n[PROOFSTEP]\nrw [mem_compl_singleton_iff] at z_ne \n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nclo : x ∈ closure (c '' {0}ᶜ)\nfxclo : f x ∈ closure (f '' (c '' {0}ᶜ))\nz : K\nz_ne : z ≠ 0\n⊢ (fun x => f (c x)) z = 1\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nclo : x ∈ closure (c '' {0}ᶜ)\nfxclo : f x ∈ closure (f '' (c '' {0}ᶜ))\nz : K\nz_ne : z ≠ 0\n⊢ ↑K z * hatInv (↑K z) = 1\n[PROOFSTEP]\nrw [hatInv_extends z_ne, ← coe_mul]\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nclo : x ∈ closure (c '' {0}ᶜ)\nfxclo : f x ∈ closure (f '' (c '' {0}ᶜ))\nz : K\nz_ne : z ≠ 0\n⊢ ↑K (z * z⁻¹) = 1\n[PROOFSTEP]\nrw [mul_inv_cancel z_ne, coe_one]\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis✝ : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nclo : x ∈ closure (c '' {0}ᶜ)\nfxclo : f x ∈ closure (f '' (c '' {0}ᶜ))\nthis : f '' (c '' {0}ᶜ) ⊆ {1}\n⊢ f x = 1\n[PROOFSTEP]\nreplace fxclo := closure_mono this fxclo\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nx : hat K\nx_ne : x ≠ 0\nthis✝ : T1Space (hat K)\nf : hat K → hat K := fun x => x * hatInv x\nc : K → hat K := fun x => ↑K x\ncont : ContinuousAt f x\nclo : x ∈ closure (c '' {0}ᶜ)\nthis : f '' (c '' {0}ᶜ) ⊆ {1}\nfxclo : f x ∈ closure {1}\n⊢ f x = 1\n[PROOFSTEP]\nrwa [closure_singleton, mem_singleton_iff] at fxclo \n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nsrc✝ : Inv (hat K) := instInvCompletion\n⊢ CommRing (hat K)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nsrc✝¹ : Inv (hat K) := instInvCompletion\nsrc✝ : CommRing (hat K) := inferInstance\nx : hat K\nx_ne : x ≠ 0\n⊢ x * x⁻¹ = 1\n[PROOFSTEP]\nsimp only [Inv.inv, if_neg x_ne, mul_hatInv_cancel x_ne]\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nsrc✝¹ : Inv (hat K) := instInvCompletion\nsrc✝ : CommRing (hat K) := inferInstance\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nsimp only [Inv.inv, ite_true]\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nsrc✝ : TopologicalRing (hat K) := topologicalRing\n⊢ ∀ ⦃x : hat K⦄, x ≠ 0 → ContinuousAt Inv.inv x\n[PROOFSTEP]\nintro x x_ne\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nsrc✝ : TopologicalRing (hat K) := topologicalRing\nx : hat K\nx_ne : x ≠ 0\n⊢ ContinuousAt Inv.inv x\n[PROOFSTEP]\nhave : {y | hatInv y = y⁻¹} ∈ 𝓝 x :=\n  haveI : {(0 : hat K)}ᶜ ⊆ {y : hat K | hatInv y = y⁻¹} :=\n    by\n    intro y y_ne\n    rw [mem_compl_singleton_iff] at y_ne \n    dsimp [Inv.inv]\n    rw [if_neg y_ne]\n  mem_of_superset (compl_singleton_mem_nhds x_ne) this\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nsrc✝ : TopologicalRing (hat K) := topologicalRing\nx : hat K\nx_ne : x ≠ 0\n⊢ {0}ᶜ ⊆ {y | hatInv y = y⁻¹}\n[PROOFSTEP]\nintro y y_ne\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nsrc✝ : TopologicalRing (hat K) := topologicalRing\nx : hat K\nx_ne : x ≠ 0\ny : hat K\ny_ne : y ∈ {0}ᶜ\n⊢ y ∈ {y | hatInv y = y⁻¹}\n[PROOFSTEP]\nrw [mem_compl_singleton_iff] at y_ne \n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nsrc✝ : TopologicalRing (hat K) := topologicalRing\nx : hat K\nx_ne : x ≠ 0\ny : hat K\ny_ne : y ≠ 0\n⊢ y ∈ {y | hatInv y = y⁻¹}\n[PROOFSTEP]\ndsimp [Inv.inv]\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nsrc✝ : TopologicalRing (hat K) := topologicalRing\nx : hat K\nx_ne : x ≠ 0\ny : hat K\ny_ne : y ≠ 0\n⊢ hatInv y = if y = 0 then 0 else hatInv y\n[PROOFSTEP]\nrw [if_neg y_ne]\n[GOAL]\nK : Type u_1\ninst✝⁴ : Field K\ninst✝³ : UniformSpace K\ninst✝² : TopologicalDivisionRing K\ninst✝¹ : CompletableTopField K\ninst✝ : UniformAddGroup K\nsrc✝ : TopologicalRing (hat K) := topologicalRing\nx : hat K\nx_ne : x ≠ 0\nthis : {y | hatInv y = y⁻¹} ∈ 𝓝 x\n⊢ ContinuousAt Inv.inv x\n[PROOFSTEP]\nexact ContinuousAt.congr (continuous_hatInv x_ne) this\n[GOAL]\nK✝ : Type u_1\ninst✝⁴ : Field K✝\ninst✝³ : UniformSpace K✝\nL : Type u_2\ninst✝² : Field L\ninst✝¹ : UniformSpace L\ninst✝ : CompletableTopField L\nK : Subfield L\nsrc✝ : SeparatedSpace ↑↑K := Subtype.separatedSpace ↑K\n⊢ ∀ (F : Filter { x // x ∈ K }), Cauchy F → 𝓝 0 ⊓ F = ⊥ → Cauchy (Filter.map (fun x => x⁻¹) F)\n[PROOFSTEP]\nintro F F_cau inf_F\n[GOAL]\nK✝ : Type u_1\ninst✝⁴ : Field K✝\ninst✝³ : UniformSpace K✝\nL : Type u_2\ninst✝² : Field L\ninst✝¹ : UniformSpace L\ninst✝ : CompletableTopField L\nK : Subfield L\nsrc✝ : SeparatedSpace ↑↑K := Subtype.separatedSpace ↑K\nF : Filter { x // x ∈ K }\nF_cau : Cauchy F\ninf_F : 𝓝 0 ⊓ F = ⊥\n⊢ Cauchy (Filter.map (fun x => x⁻¹) F)\n[PROOFSTEP]\nlet i : K →+* L := K.subtype\n[GOAL]\nK✝ : Type u_1\ninst✝⁴ : Field K✝\ninst✝³ : UniformSpace K✝\nL : Type u_2\ninst✝² : Field L\ninst✝¹ : UniformSpace L\ninst✝ : CompletableTopField L\nK : Subfield L\nsrc✝ : SeparatedSpace ↑↑K := Subtype.separatedSpace ↑K\nF : Filter { x // x ∈ K }\nF_cau : Cauchy F\ninf_F : 𝓝 0 ⊓ F = ⊥\ni : { x // x ∈ K } →+* L := subtype K\n⊢ Cauchy (Filter.map (fun x => x⁻¹) F)\n[PROOFSTEP]\nhave hi : UniformInducing i := uniformEmbedding_subtype_val.toUniformInducing\n[GOAL]\nK✝ : Type u_1\ninst✝⁴ : Field K✝\ninst✝³ : UniformSpace K✝\nL : Type u_2\ninst✝² : Field L\ninst✝¹ : UniformSpace L\ninst✝ : CompletableTopField L\nK : Subfield L\nsrc✝ : SeparatedSpace ↑↑K := Subtype.separatedSpace ↑K\nF : Filter { x // x ∈ K }\nF_cau : Cauchy F\ninf_F : 𝓝 0 ⊓ F = ⊥\ni : { x // x ∈ K } →+* L := subtype K\nhi : UniformInducing ↑i\n⊢ Cauchy (Filter.map (fun x => x⁻¹) F)\n[PROOFSTEP]\nrw [← hi.cauchy_map_iff] at F_cau ⊢\n[GOAL]\nK✝ : Type u_1\ninst✝⁴ : Field K✝\ninst✝³ : UniformSpace K✝\nL : Type u_2\ninst✝² : Field L\ninst✝¹ : UniformSpace L\ninst✝ : CompletableTopField L\nK : Subfield L\nsrc✝ : SeparatedSpace ↑↑K := Subtype.separatedSpace ↑K\nF : Filter { x // x ∈ K }\ninf_F : 𝓝 0 ⊓ F = ⊥\ni : { x // x ∈ K } →+* L := subtype K\nF_cau : Cauchy (Filter.map (↑i) F)\nhi : UniformInducing ↑i\n⊢ Cauchy (Filter.map (↑i) (Filter.map (fun x => x⁻¹) F))\n[PROOFSTEP]\nrw [map_comm (show (i ∘ fun x => x⁻¹) = (fun x => x⁻¹) ∘ i by ext; rfl)]\n[GOAL]\nK✝ : Type u_1\ninst✝⁴ : Field K✝\ninst✝³ : UniformSpace K✝\nL : Type u_2\ninst✝² : Field L\ninst✝¹ : UniformSpace L\ninst✝ : CompletableTopField L\nK : Subfield L\nsrc✝ : SeparatedSpace ↑↑K := Subtype.separatedSpace ↑K\nF : Filter { x // x ∈ K }\ninf_F : 𝓝 0 ⊓ F = ⊥\ni : { x // x ∈ K } →+* L := subtype K\nF_cau : Cauchy (Filter.map (↑i) F)\nhi : UniformInducing ↑i\n⊢ (↑i ∘ fun x => x⁻¹) = (fun x => x⁻¹) ∘ ↑i\n[PROOFSTEP]\next\n[GOAL]\ncase h\nK✝ : Type u_1\ninst✝⁴ : Field K✝\ninst✝³ : UniformSpace K✝\nL : Type u_2\ninst✝² : Field L\ninst✝¹ : UniformSpace L\ninst✝ : CompletableTopField L\nK : Subfield L\nsrc✝ : SeparatedSpace ↑↑K := Subtype.separatedSpace ↑K\nF : Filter { x // x ∈ K }\ninf_F : 𝓝 0 ⊓ F = ⊥\ni : { x // x ∈ K } →+* L := subtype K\nF_cau : Cauchy (Filter.map (↑i) F)\nhi : UniformInducing ↑i\nx✝ : { x // x ∈ K }\n⊢ (↑i ∘ fun x => x⁻¹) x✝ = ((fun x => x⁻¹) ∘ ↑i) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nK✝ : Type u_1\ninst✝⁴ : Field K✝\ninst✝³ : UniformSpace K✝\nL : Type u_2\ninst✝² : Field L\ninst✝¹ : UniformSpace L\ninst✝ : CompletableTopField L\nK : Subfield L\nsrc✝ : SeparatedSpace ↑↑K := Subtype.separatedSpace ↑K\nF : Filter { x // x ∈ K }\ninf_F : 𝓝 0 ⊓ F = ⊥\ni : { x // x ∈ K } →+* L := subtype K\nF_cau : Cauchy (Filter.map (↑i) F)\nhi : UniformInducing ↑i\n⊢ Cauchy (Filter.map (fun x => x⁻¹) (Filter.map (↑i) F))\n[PROOFSTEP]\napply CompletableTopField.nice _ F_cau\n[GOAL]\nK✝ : Type u_1\ninst✝⁴ : Field K✝\ninst✝³ : UniformSpace K✝\nL : Type u_2\ninst✝² : Field L\ninst✝¹ : UniformSpace L\ninst✝ : CompletableTopField L\nK : Subfield L\nsrc✝ : SeparatedSpace ↑↑K := Subtype.separatedSpace ↑K\nF : Filter { x // x ∈ K }\ninf_F : 𝓝 0 ⊓ F = ⊥\ni : { x // x ∈ K } →+* L := subtype K\nF_cau : Cauchy (Filter.map (↑i) F)\nhi : UniformInducing ↑i\n⊢ 𝓝 0 ⊓ Filter.map (↑i) F = ⊥\n[PROOFSTEP]\nrw [← Filter.push_pull', ← map_zero i, ← hi.inducing.nhds_eq_comap, inf_F, Filter.map_bot]\n[GOAL]\nK : Type u_1\ninst✝⁹ : Field K\ninst✝⁸ : UniformSpace K\nL✝ : Type u_2\ninst✝⁷ : Field L✝\ninst✝⁶ : UniformSpace L✝\ninst✝⁵ : CompletableTopField L✝\nL : Type u_3\ninst✝⁴ : Field L\ninst✝³ : UniformSpace L\ninst✝² : TopologicalDivisionRing L\ninst✝¹ : SeparatedSpace L\ninst✝ : CompleteSpace L\nsrc✝ : SeparatedSpace L := inst✝¹\nF : Filter L\ncau_F : Cauchy F\nhF : 𝓝 0 ⊓ F = ⊥\n⊢ Cauchy (map (fun x => x⁻¹) F)\n[PROOFSTEP]\nhaveI : NeBot F := cau_F.1\n[GOAL]\nK : Type u_1\ninst✝⁹ : Field K\ninst✝⁸ : UniformSpace K\nL✝ : Type u_2\ninst✝⁷ : Field L✝\ninst✝⁶ : UniformSpace L✝\ninst✝⁵ : CompletableTopField L✝\nL : Type u_3\ninst✝⁴ : Field L\ninst✝³ : UniformSpace L\ninst✝² : TopologicalDivisionRing L\ninst✝¹ : SeparatedSpace L\ninst✝ : CompleteSpace L\nsrc✝ : SeparatedSpace L := inst✝¹\nF : Filter L\ncau_F : Cauchy F\nhF : 𝓝 0 ⊓ F = ⊥\nthis : NeBot F\n⊢ Cauchy (map (fun x => x⁻¹) F)\n[PROOFSTEP]\nrcases CompleteSpace.complete cau_F with ⟨x, hx⟩\n[GOAL]\ncase intro\nK : Type u_1\ninst✝⁹ : Field K\ninst✝⁸ : UniformSpace K\nL✝ : Type u_2\ninst✝⁷ : Field L✝\ninst✝⁶ : UniformSpace L✝\ninst✝⁵ : CompletableTopField L✝\nL : Type u_3\ninst✝⁴ : Field L\ninst✝³ : UniformSpace L\ninst✝² : TopologicalDivisionRing L\ninst✝¹ : SeparatedSpace L\ninst✝ : CompleteSpace L\nsrc✝ : SeparatedSpace L := inst✝¹\nF : Filter L\ncau_F : Cauchy F\nhF : 𝓝 0 ⊓ F = ⊥\nthis : NeBot F\nx : L\nhx : F ≤ 𝓝 x\n⊢ Cauchy (map (fun x => x⁻¹) F)\n[PROOFSTEP]\nhave hx' : x ≠ 0 := by\n  rintro rfl\n  rw [inf_eq_right.mpr hx] at hF \n  exact cau_F.1.ne hF\n[GOAL]\nK : Type u_1\ninst✝⁹ : Field K\ninst✝⁸ : UniformSpace K\nL✝ : Type u_2\ninst✝⁷ : Field L✝\ninst✝⁶ : UniformSpace L✝\ninst✝⁵ : CompletableTopField L✝\nL : Type u_3\ninst✝⁴ : Field L\ninst✝³ : UniformSpace L\ninst✝² : TopologicalDivisionRing L\ninst✝¹ : SeparatedSpace L\ninst✝ : CompleteSpace L\nsrc✝ : SeparatedSpace L := inst✝¹\nF : Filter L\ncau_F : Cauchy F\nhF : 𝓝 0 ⊓ F = ⊥\nthis : NeBot F\nx : L\nhx : F ≤ 𝓝 x\n⊢ x ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nK : Type u_1\ninst✝⁹ : Field K\ninst✝⁸ : UniformSpace K\nL✝ : Type u_2\ninst✝⁷ : Field L✝\ninst✝⁶ : UniformSpace L✝\ninst✝⁵ : CompletableTopField L✝\nL : Type u_3\ninst✝⁴ : Field L\ninst✝³ : UniformSpace L\ninst✝² : TopologicalDivisionRing L\ninst✝¹ : SeparatedSpace L\ninst✝ : CompleteSpace L\nsrc✝ : SeparatedSpace L := inst✝¹\nF : Filter L\ncau_F : Cauchy F\nhF : 𝓝 0 ⊓ F = ⊥\nthis : NeBot F\nhx : F ≤ 𝓝 0\n⊢ False\n[PROOFSTEP]\nrw [inf_eq_right.mpr hx] at hF \n[GOAL]\nK : Type u_1\ninst✝⁹ : Field K\ninst✝⁸ : UniformSpace K\nL✝ : Type u_2\ninst✝⁷ : Field L✝\ninst✝⁶ : UniformSpace L✝\ninst✝⁵ : CompletableTopField L✝\nL : Type u_3\ninst✝⁴ : Field L\ninst✝³ : UniformSpace L\ninst✝² : TopologicalDivisionRing L\ninst✝¹ : SeparatedSpace L\ninst✝ : CompleteSpace L\nsrc✝ : SeparatedSpace L := inst✝¹\nF : Filter L\ncau_F : Cauchy F\nhF : F = ⊥\nthis : NeBot F\nhx : F ≤ 𝓝 0\n⊢ False\n[PROOFSTEP]\nexact cau_F.1.ne hF\n[GOAL]\ncase intro\nK : Type u_1\ninst✝⁹ : Field K\ninst✝⁸ : UniformSpace K\nL✝ : Type u_2\ninst✝⁷ : Field L✝\ninst✝⁶ : UniformSpace L✝\ninst✝⁵ : CompletableTopField L✝\nL : Type u_3\ninst✝⁴ : Field L\ninst✝³ : UniformSpace L\ninst✝² : TopologicalDivisionRing L\ninst✝¹ : SeparatedSpace L\ninst✝ : CompleteSpace L\nsrc✝ : SeparatedSpace L := inst✝¹\nF : Filter L\ncau_F : Cauchy F\nhF : 𝓝 0 ⊓ F = ⊥\nthis : NeBot F\nx : L\nhx : F ≤ 𝓝 x\nhx' : x ≠ 0\n⊢ Cauchy (map (fun x => x⁻¹) F)\n[PROOFSTEP]\nexact\n  Filter.Tendsto.cauchy_map\n    (calc\n      map (fun x => x⁻¹) F ≤ map (fun x => x⁻¹) (𝓝 x) := map_mono hx\n      _ ≤ 𝓝 x⁻¹ := continuousAt_inv₀ hx')\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.UniformField", "llama_tokens": 14965, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.679178699175393, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.37658452912299833}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na : α\n⊢ HasBasis (𝓝 a) (?m.55 a) (?m.56 a)\n[PROOFSTEP]\nrw [nhds_eq_comap_uniformity]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na : α\n⊢ HasBasis (Filter.comap (Prod.mk a) (𝓤 α)) (?m.55 a) (?m.56 a)\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ α → Sort ?u.51\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ (a : α) → ?m.54 a → Prop\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ (a : α) → ?m.54 a → Set α\n[PROOFSTEP]\nexact uniformity_hasBasis_closed.comap _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na : α\nV : Set (α × α)\nhV : V ∈ 𝓤 α ∧ IsClosed V\n⊢ IsClosed (Prod.mk a ⁻¹' id V)\n[PROOFSTEP]\nexact hV.2.preimage <| continuous_const.prod_mk continuous_id\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na b : α\n⊢ (a, b) ∈ 𝓢 α ↔ a ⤳ b\n[PROOFSTEP]\nsimp only [(𝓤 α).basis_sets.mem_separationRel, id, mem_setOf_eq,\n  (nhds_basis_uniformity (𝓤 α).basis_sets).specializes_iff]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\n⊢ SeparatedSpace α ↔ ∀ (x y : α), (∀ (r : Set (α × α)), r ∈ 𝓤 α → (x, y) ∈ r) → x = y\n[PROOFSTEP]\nsimp only [separatedSpace_iff, Set.ext_iff, Prod.forall, mem_idRel, separationRel, mem_sInter]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\n⊢ (∀ (a b : α), (∀ (t : Set (α × α)), t ∈ (𝓤 α).sets → (a, b) ∈ t) ↔ a = b) ↔\n    ∀ (x y : α), (∀ (r : Set (α × α)), r ∈ 𝓤 α → (x, y) ∈ r) → x = y\n[PROOFSTEP]\nexact forall₂_congr fun _ _ => ⟨Iff.mp, fun h => ⟨h, fun H U hU => H ▸ refl_mem_uniformity hU⟩⟩\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\nx y : α\n⊢ (∀ (r : Set (α × α)), r ∈ 𝓤 α → (x, y) ∈ r) → x = y ↔ x ≠ y → ∃ r, r ∈ 𝓤 α ∧ ¬(x, y) ∈ r\n[PROOFSTEP]\nrw [← not_imp_not]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\nx y : α\n⊢ (¬x = y → ¬∀ (r : Set (α × α)), r ∈ 𝓤 α → (x, y) ∈ r) ↔ x ≠ y → ∃ r, r ∈ 𝓤 α ∧ ¬(x, y) ∈ r\n[PROOFSTEP]\nsimp [not_forall]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝⁴ : UniformSpace α✝\ninst✝³ : UniformSpace β\ninst✝² : UniformSpace γ\nα : Type u_1\ninst✝¹ : UniformSpace α\ninst✝ : SeparatedSpace α\nx y : α\nh : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → SymmetricRel V → (x, y) ∈ V\n⊢ ∀ {i : Set (α × α)}, i ∈ 𝓤 α ∧ SymmetricRel i → (x, y) ∈ id i\n[PROOFSTEP]\nsimpa [and_imp]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u_1\ninst✝ : UniformSpace α\n⊢ idRel ⊆ 𝓢 α\n[PROOFSTEP]\nunfold separationRel\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u_1\ninst✝ : UniformSpace α\n⊢ idRel ⊆ ⋂₀ (𝓤 α).sets\n[PROOFSTEP]\nrw [idRel_subset]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u_1\ninst✝ : UniformSpace α\n⊢ ∀ (a : α), (a, a) ∈ ⋂₀ (𝓤 α).sets\n[PROOFSTEP]\nintro x\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u_1\ninst✝ : UniformSpace α\nx : α\n⊢ (x, x) ∈ ⋂₀ (𝓤 α).sets\n[PROOFSTEP]\nsuffices ∀ t ∈ 𝓤 α, (x, x) ∈ t by simpa only [refl_mem_uniformity]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u_1\ninst✝ : UniformSpace α\nx : α\nthis : ∀ (t : Set (α × α)), t ∈ 𝓤 α → (x, x) ∈ t\n⊢ (x, x) ∈ ⋂₀ (𝓤 α).sets\n[PROOFSTEP]\nsimpa only [refl_mem_uniformity]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u_1\ninst✝ : UniformSpace α\nx : α\n⊢ ∀ (t : Set (α × α)), t ∈ 𝓤 α → (x, x) ∈ t\n[PROOFSTEP]\nexact fun t => refl_mem_uniformity\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\nh : inst✝² = UniformSpace.comap f inst✝¹\n⊢ 𝓢 α = Prod.map f f ⁻¹' 𝓢 β\n[PROOFSTEP]\nsubst h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\n⊢ 𝓢 α = Prod.map f f ⁻¹' 𝓢 β\n[PROOFSTEP]\ndsimp [separationRel]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\n⊢ ⋂₀ (𝓤 α).sets = Prod.map f f ⁻¹' ⋂₀ (𝓤 β).sets\n[PROOFSTEP]\nsimp_rw [uniformity_comap, (Filter.comap_hasBasis (Prod.map f f) (𝓤 β)).sInter_sets, ← preimage_iInter,\n  sInter_eq_biInter]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\n⊢ Prod.map f f ⁻¹' ⋂ (i : Set (β × β)) (_ : i ∈ 𝓤 β), i = Prod.map f f ⁻¹' ⋂ (i : Set (β × β)) (_ : i ∈ (𝓤 β).sets), i\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nι : Sort u_1\np : ι → Prop\ns : ι → Set (α × α)\nh : HasBasis (𝓤 α) p s\n⊢ 𝓢 α = ⋂ (i : ι) (_ : p i), s i\n[PROOFSTEP]\nunfold separationRel\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nι : Sort u_1\np : ι → Prop\ns : ι → Set (α × α)\nh : HasBasis (𝓤 α) p s\n⊢ ⋂₀ (𝓤 α).sets = ⋂ (i : ι) (_ : p i), s i\n[PROOFSTEP]\nrw [h.sInter_sets]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ 𝓢 α = ⋂₀ (closure '' (𝓤 α).sets)\n[PROOFSTEP]\nsimp [uniformity_hasBasis_closure.separationRel]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ IsClosed (𝓢 α)\n[PROOFSTEP]\nrw [separationRel_eq_inter_closure]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ IsClosed (⋂₀ (closure '' (𝓤 α).sets))\n[PROOFSTEP]\napply isClosed_sInter\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ ∀ (t : Set (α × α)), t ∈ closure '' (𝓤 α).sets → IsClosed t\n[PROOFSTEP]\nrintro _ ⟨t, -, rfl⟩\n[GOAL]\ncase a.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nt : Set (α × α)\n⊢ IsClosed (closure t)\n[PROOFSTEP]\nexact isClosed_closure\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ SeparatedSpace α ↔ T2Space α\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ SeparatedSpace α → T2Space α\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\n⊢ T2Space α → SeparatedSpace α\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nh : SeparatedSpace α\n⊢ T2Space α\n[PROOFSTEP]\nrw [t2_iff_isClosed_diagonal, ← show 𝓢 α = diagonal α from h.1]\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nh : SeparatedSpace α\n⊢ IsClosed (𝓢 α)\n[PROOFSTEP]\nexact isClosed_separationRel\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nh : T2Space α\n⊢ SeparatedSpace α\n[PROOFSTEP]\nrw [separated_def']\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nh : T2Space α\n⊢ ∀ (x y : α), x ≠ y → ∃ r, r ∈ 𝓤 α ∧ ¬(x, y) ∈ r\n[PROOFSTEP]\nintro x y hxy\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nh : T2Space α\nx y : α\nhxy : x ≠ y\n⊢ ∃ r, r ∈ 𝓤 α ∧ ¬(x, y) ∈ r\n[PROOFSTEP]\nrcases t2_separation hxy with ⟨u, v, uo, -, hx, hy, h⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nh✝ : T2Space α\nx y : α\nhxy : x ≠ y\nu v : Set α\nuo : IsOpen u\nhx : x ∈ u\nhy : y ∈ v\nh : Disjoint u v\n⊢ ∃ r, r ∈ 𝓤 α ∧ ¬(x, y) ∈ r\n[PROOFSTEP]\nrcases isOpen_iff_ball_subset.1 uo x hx with ⟨r, hrU, hr⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nh✝ : T2Space α\nx y : α\nhxy : x ≠ y\nu v : Set α\nuo : IsOpen u\nhx : x ∈ u\nhy : y ∈ v\nh : Disjoint u v\nr : Set (α × α)\nhrU : r ∈ 𝓤 α\nhr : ball x r ⊆ u\n⊢ ∃ r, r ∈ 𝓤 α ∧ ¬(x, y) ∈ r\n[PROOFSTEP]\nexact ⟨r, hrU, fun H => h.le_bot ⟨hr H, hy⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\n⊢ IsClosed s\n[PROOFSTEP]\nrcases comp_symm_mem_uniformity_sets V₀_in with ⟨V₁, V₁_in, V₁_symm, h_comp⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\n⊢ IsClosed s\n[PROOFSTEP]\napply isClosed_of_closure_subset\n[GOAL]\ncase intro.intro.intro.h\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\n⊢ closure s ⊆ s\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.h\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\nx : α\nhx : x ∈ closure s\n⊢ x ∈ s\n[PROOFSTEP]\nrw [mem_closure_iff_ball] at hx \n[GOAL]\ncase intro.intro.intro.h\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\nx : α\nhx : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → Set.Nonempty (ball x V ∩ s)\n⊢ x ∈ s\n[PROOFSTEP]\nrcases hx V₁_in with ⟨y, hy, hy'⟩\n[GOAL]\ncase intro.intro.intro.h.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\nx : α\nhx : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → Set.Nonempty (ball x V ∩ s)\ny : α\nhy : y ∈ ball x V₁\nhy' : y ∈ s\n⊢ x ∈ s\n[PROOFSTEP]\nsuffices x = y by rwa [this]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\nx : α\nhx : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → Set.Nonempty (ball x V ∩ s)\ny : α\nhy : y ∈ ball x V₁\nhy' : y ∈ s\nthis : x = y\n⊢ x ∈ s\n[PROOFSTEP]\nrwa [this]\n[GOAL]\ncase intro.intro.intro.h.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\nx : α\nhx : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → Set.Nonempty (ball x V ∩ s)\ny : α\nhy : y ∈ ball x V₁\nhy' : y ∈ s\n⊢ x = y\n[PROOFSTEP]\napply eq_of_forall_symmetric\n[GOAL]\ncase intro.intro.intro.h.intro.intro.h\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\nx : α\nhx : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → Set.Nonempty (ball x V ∩ s)\ny : α\nhy : y ∈ ball x V₁\nhy' : y ∈ s\n⊢ ∀ {V : Set (α × α)}, V ∈ 𝓤 α → SymmetricRel V → (x, y) ∈ V\n[PROOFSTEP]\nintro V V_in _\n[GOAL]\ncase intro.intro.intro.h.intro.intro.h\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\nx : α\nhx : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → Set.Nonempty (ball x V ∩ s)\ny : α\nhy : y ∈ ball x V₁\nhy' : y ∈ s\nV : Set (α × α)\nV_in : V ∈ 𝓤 α\na✝ : SymmetricRel V\n⊢ (x, y) ∈ V\n[PROOFSTEP]\nrcases hx (inter_mem V₁_in V_in) with ⟨z, hz, hz'⟩\n[GOAL]\ncase intro.intro.intro.h.intro.intro.h.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\nx : α\nhx : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → Set.Nonempty (ball x V ∩ s)\ny : α\nhy : y ∈ ball x V₁\nhy' : y ∈ s\nV : Set (α × α)\nV_in : V ∈ 𝓤 α\na✝ : SymmetricRel V\nz : α\nhz : z ∈ ball x (V₁ ∩ V)\nhz' : z ∈ s\n⊢ (x, y) ∈ V\n[PROOFSTEP]\nobtain rfl : z = y := by\n  by_contra hzy\n  exact hs hz' hy' hzy (h_comp <| mem_comp_of_mem_ball V₁_symm (ball_inter_left x _ _ hz) hy)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\nx : α\nhx : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → Set.Nonempty (ball x V ∩ s)\ny : α\nhy : y ∈ ball x V₁\nhy' : y ∈ s\nV : Set (α × α)\nV_in : V ∈ 𝓤 α\na✝ : SymmetricRel V\nz : α\nhz : z ∈ ball x (V₁ ∩ V)\nhz' : z ∈ s\n⊢ z = y\n[PROOFSTEP]\nby_contra hzy\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\nx : α\nhx : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → Set.Nonempty (ball x V ∩ s)\ny : α\nhy : y ∈ ball x V₁\nhy' : y ∈ s\nV : Set (α × α)\nV_in : V ∈ 𝓤 α\na✝ : SymmetricRel V\nz : α\nhz : z ∈ ball x (V₁ ∩ V)\nhz' : z ∈ s\nhzy : ¬z = y\n⊢ False\n[PROOFSTEP]\nexact hs hz' hy' hzy (h_comp <| mem_comp_of_mem_ball V₁_symm (ball_inter_left x _ _ hz) hy)\n[GOAL]\ncase intro.intro.intro.h.intro.intro.h.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\ns : Set α\nhs : Set.Pairwise s fun x y => ¬(x, y) ∈ V₀\nV₁ : Set (α × α)\nV₁_in : V₁ ∈ 𝓤 α\nV₁_symm : SymmetricRel V₁\nh_comp : V₁ ○ V₁ ⊆ V₀\nx : α\nhx : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → Set.Nonempty (ball x V ∩ s)\nV : Set (α × α)\nV_in : V ∈ 𝓤 α\na✝ : SymmetricRel V\nz : α\nhz : z ∈ ball x (V₁ ∩ V)\nhz' : z ∈ s\nhy : z ∈ ball x V₁\nhy' : z ∈ s\n⊢ (x, z) ∈ V\n[PROOFSTEP]\nexact ball_inter_right x _ _ hz\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nι : Type u_1\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\nf : ι → α\nhf : Pairwise fun x y => ¬(f x, f y) ∈ V₀\n⊢ Set.Pairwise (range f) fun x y => ¬(x, y) ∈ V₀\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩ _ ⟨y, rfl⟩ h\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nι : Type u_1\ninst✝ : SeparatedSpace α\nV₀ : Set (α × α)\nV₀_in : V₀ ∈ 𝓤 α\nf : ι → α\nhf : Pairwise fun x y => ¬(f x, f y) ∈ V₀\nx y : ι\nh : f x ≠ f y\n⊢ ¬(f x, f y) ∈ V₀\n[PROOFSTEP]\nexact hf (ne_of_apply_ne f h)\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\n⊢ 𝓟 idRel ≤ map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) (𝓟 idRel)\n[PROOFSTEP]\nsimp [Quotient.exists_rep]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\ns : Set (Quotient (separationSetoid α) × Quotient (separationSetoid α))\nhs : s ∈ map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) (𝓤 α)\n⊢ s ∈\n    Filter.lift' (map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) (𝓤 α))\n      fun s => s ○ s\n[PROOFSTEP]\nrcases comp_open_symm_mem_uniformity_sets hs with ⟨U, hU, hUo, -, hUs⟩\n[GOAL]\ncase intro.intro.intro.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\ns : Set (Quotient (separationSetoid α) × Quotient (separationSetoid α))\nhs : s ∈ map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) (𝓤 α)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhUo : IsOpen U\nhUs : U ○ U ⊆ (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) ⁻¹' s\n⊢ s ∈\n    Filter.lift' (map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) (𝓤 α))\n      fun s => s ○ s\n[PROOFSTEP]\nrefine' mem_of_superset (mem_lift' <| image_mem_map hU) ?_\n[GOAL]\ncase intro.intro.intro.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\ns : Set (Quotient (separationSetoid α) × Quotient (separationSetoid α))\nhs : s ∈ map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) (𝓤 α)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhUo : IsOpen U\nhUs : U ○ U ⊆ (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) ⁻¹' s\n⊢ (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) '' U ○\n      (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) '' U ⊆\n    s\n[PROOFSTEP]\nsimp only [subset_def, Prod.forall, mem_compRel, mem_image, Prod.ext_iff]\n[GOAL]\ncase intro.intro.intro.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\ns : Set (Quotient (separationSetoid α) × Quotient (separationSetoid α))\nhs : s ∈ map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) (𝓤 α)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhUo : IsOpen U\nhUs : U ○ U ⊆ (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) ⁻¹' s\n⊢ ∀ (a b : Quotient (separationSetoid α)),\n    (∃ z,\n        (∃ x, x ∈ U ∧ Quotient.mk (separationSetoid α) x.fst = a ∧ Quotient.mk (separationSetoid α) x.snd = z) ∧\n          ∃ x, x ∈ U ∧ Quotient.mk (separationSetoid α) x.fst = z ∧ Quotient.mk (separationSetoid α) x.snd = b) →\n      (a, b) ∈ s\n[PROOFSTEP]\nrintro _ _ ⟨_, ⟨⟨x, y⟩, hxyU, rfl, rfl⟩, ⟨⟨y', z⟩, hyzU, hy, rfl⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.mk.intro.intro.intro.mk.intro.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\ns : Set (Quotient (separationSetoid α) × Quotient (separationSetoid α))\nhs : s ∈ map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) (𝓤 α)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhUo : IsOpen U\nhUs : U ○ U ⊆ (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) ⁻¹' s\nx y : α\nhxyU : (x, y) ∈ U\ny' z : α\nhyzU : (y', z) ∈ U\nhy : Quotient.mk (separationSetoid α) (y', z).fst = Quotient.mk (separationSetoid α) (x, y).snd\n⊢ (Quotient.mk (separationSetoid α) (x, y).fst, Quotient.mk (separationSetoid α) (y', z).snd) ∈ s\n[PROOFSTEP]\nhave : y' ⤳ y := separationRel_iff_specializes.1 (Quotient.exact hy)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.mk.intro.intro.intro.mk.intro.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\ns : Set (Quotient (separationSetoid α) × Quotient (separationSetoid α))\nhs : s ∈ map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) (𝓤 α)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhUo : IsOpen U\nhUs : U ○ U ⊆ (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) ⁻¹' s\nx y : α\nhxyU : (x, y) ∈ U\ny' z : α\nhyzU : (y', z) ∈ U\nhy : Quotient.mk (separationSetoid α) (y', z).fst = Quotient.mk (separationSetoid α) (x, y).snd\nthis : y' ⤳ y\n⊢ (Quotient.mk (separationSetoid α) (x, y).fst, Quotient.mk (separationSetoid α) (y', z).snd) ∈ s\n[PROOFSTEP]\nexact @hUs (x, z) ⟨y', this.mem_open (UniformSpace.isOpen_ball _ hUo) hxyU, hyzU⟩\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\ns : Set (Quotient (separationSetoid α))\n⊢ IsOpen (Quotient.mk' ⁻¹' s) ↔\n    ∀ (x : Quotient (separationSetoid α)),\n      x ∈ s →\n        {p | p.fst = x → p.snd ∈ s} ∈\n          {\n              uniformity :=\n                map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) (𝓤 α),\n              refl :=\n                (_ :\n                  𝓟 idRel ≤\n                    map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd))\n                      (𝓤 α)),\n              symm :=\n                (_ :\n                  Tendsto Prod.swap\n                    (map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd))\n                      (𝓤 α))\n                    (map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd))\n                      (𝓤 α))),\n              comp :=\n                (_ :\n                  ∀ (s : Set (Quotient (separationSetoid α) × Quotient (separationSetoid α))),\n                    s ∈\n                        map (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd))\n                          (𝓤 α) →\n                      s ∈\n                        Filter.lift'\n                          (map\n                            (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd))\n                            (𝓤 α))\n                          fun s => s ○ s) }.uniformity\n[PROOFSTEP]\nsimp only [_root_.isOpen_uniformity, forall_quotient_iff, mem_map', mem_setOf_eq]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\ns : Set (Quotient (separationSetoid α))\n⊢ (∀ (x : α), x ∈ Quotient.mk' ⁻¹' s → {p | p.fst = x → p.snd ∈ Quotient.mk' ⁻¹' s} ∈ 𝓤 α) ↔\n    ∀ (a : α),\n      Quotient.mk (separationSetoid α) a ∈ s →\n        {x |\n            Quotient.mk (separationSetoid α) x.fst = Quotient.mk (separationSetoid α) a →\n              Quotient.mk (separationSetoid α) x.snd ∈ s} ∈\n          𝓤 α\n[PROOFSTEP]\nrefine forall₂_congr fun x _ => ⟨fun h => ?_, fun h => mem_of_superset h ?_⟩\n[GOAL]\ncase refine_1\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\ns : Set (Quotient (separationSetoid α))\nx : α\nx✝ : x ∈ Quotient.mk' ⁻¹' s\nh : {p | p.fst = x → p.snd ∈ Quotient.mk' ⁻¹' s} ∈ 𝓤 α\n⊢ {x_1 |\n      Quotient.mk (separationSetoid α) x_1.fst = Quotient.mk (separationSetoid α) x →\n        Quotient.mk (separationSetoid α) x_1.snd ∈ s} ∈\n    𝓤 α\n[PROOFSTEP]\nrcases comp_mem_uniformity_sets h with ⟨t, ht, hts⟩\n[GOAL]\ncase refine_1.intro.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\ns : Set (Quotient (separationSetoid α))\nx : α\nx✝ : x ∈ Quotient.mk' ⁻¹' s\nh : {p | p.fst = x → p.snd ∈ Quotient.mk' ⁻¹' s} ∈ 𝓤 α\nt : Set (α × α)\nht : t ∈ 𝓤 α\nhts : t ○ t ⊆ {p | p.fst = x → p.snd ∈ Quotient.mk' ⁻¹' s}\n⊢ {x_1 |\n      Quotient.mk (separationSetoid α) x_1.fst = Quotient.mk (separationSetoid α) x →\n        Quotient.mk (separationSetoid α) x_1.snd ∈ s} ∈\n    𝓤 α\n[PROOFSTEP]\nrefine mem_of_superset ht fun (y, z) hyz hyx => @hts (x, z) ⟨y, ?_, hyz⟩ rfl\n[GOAL]\ncase refine_1.intro.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\ns : Set (Quotient (separationSetoid α))\nx : α\nx✝¹ : x ∈ Quotient.mk' ⁻¹' s\nh : {p | p.fst = x → p.snd ∈ Quotient.mk' ⁻¹' s} ∈ 𝓤 α\nt : Set (α × α)\nht : t ∈ 𝓤 α\nhts : t ○ t ⊆ {p | p.fst = x → p.snd ∈ Quotient.mk' ⁻¹' s}\nx✝ : α × α\ny z : α\nhyz : (y, z) ∈ t\nhyx : Quotient.mk (separationSetoid α) (y, z).fst = Quotient.mk (separationSetoid α) x\n⊢ ((x, z).fst, y) ∈ t\n[PROOFSTEP]\nexact Quotient.exact hyx.symm _ ht\n[GOAL]\ncase refine_2\nα✝ : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α✝\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\nα : Type u\ninst✝ : UniformSpace α\ns : Set (Quotient (separationSetoid α))\nx : α\nx✝ : x ∈ Quotient.mk' ⁻¹' s\nh :\n  {x_1 |\n      Quotient.mk (separationSetoid α) x_1.fst = Quotient.mk (separationSetoid α) x →\n        Quotient.mk (separationSetoid α) x_1.snd ∈ s} ∈\n    𝓤 α\n⊢ {x_1 |\n      Quotient.mk (separationSetoid α) x_1.fst = Quotient.mk (separationSetoid α) x →\n        Quotient.mk (separationSetoid α) x_1.snd ∈ s} ⊆\n    {p | p.fst = x → p.snd ∈ Quotient.mk' ⁻¹' s}\n[PROOFSTEP]\nexact fun y hy hyx => hy <| congr_arg _ hyx\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β → γ\nh : ∀ (a : α) (c : β) (b : α) (d : β), (a, b) ∈ 𝓢 α → (c, d) ∈ 𝓢 β → f a c = f b d\nhf : UniformContinuous fun p => f p.fst p.snd\n⊢ UniformContinuous fun p => Quotient.lift₂ f h p.fst p.snd\n[PROOFSTEP]\nrw [UniformContinuous, uniformity_prod_eq_prod, uniformity_quotient, uniformity_quotient, Filter.prod_map_map_eq,\n  Filter.tendsto_map'_iff, Filter.tendsto_map'_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β → γ\nh : ∀ (a : α) (c : β) (b : α) (d : β), (a, b) ∈ 𝓢 α → (c, d) ∈ 𝓢 β → f a c = f b d\nhf : UniformContinuous fun p => f p.fst p.snd\n⊢ Tendsto\n    (((fun x => (Quotient.lift₂ f h x.fst.fst x.fst.snd, Quotient.lift₂ f h x.snd.fst x.snd.snd)) ∘ fun p =>\n        ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ∘\n      fun p =>\n      ((Quotient.mk (separationSetoid α) p.fst.fst, Quotient.mk (separationSetoid α) p.fst.snd),\n        Quotient.mk (separationSetoid β) p.snd.fst, Quotient.mk (separationSetoid β) p.snd.snd))\n    (𝓤 α ×ˢ 𝓤 β) (𝓤 γ)\n[PROOFSTEP]\nrwa [UniformContinuous, uniformity_prod_eq_prod, Filter.tendsto_map'_iff] at hf \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nU : Set (α × α)\nhU : U ∈ 𝓤 α ∧ IsOpen U\nx✝¹ : α × α\nx y : α\nx✝ :\n  (x, y) ∈\n    (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) ⁻¹'\n      ((fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) '' id U)\nx' y' : α\nhx' : (x', y') ∈ id U\nh :\n  (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) (x', y') =\n    (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) (x, y)\n⊢ (x, y) ∈ id U\n[PROOFSTEP]\nsimp only [Prod.ext_iff, Quotient.eq] at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nU : Set (α × α)\nhU : U ∈ 𝓤 α ∧ IsOpen U\nx✝¹ : α × α\nx y : α\nx✝ :\n  (x, y) ∈\n    (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) ⁻¹'\n      ((fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) '' id U)\nx' y' : α\nhx' : (x', y') ∈ id U\nh : x' ≈ x ∧ y' ≈ y\n⊢ (x, y) ∈ id U\n[PROOFSTEP]\nexact (((separationRel_iff_inseparable.1 h.1).prod (separationRel_iff_inseparable.1 h.2)).mem_open_iff hU.2).1 hx'\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nx✝ : Quotient (separationSetoid α) × Quotient (separationSetoid α)\na✝ b✝ : Quotient (separationSetoid α)\na b : α\nh : (Quotient.mk (separationSetoid α) a, Quotient.mk (separationSetoid α) b) ∈ 𝓢 (Quotient (separationSetoid α))\ns : Set (α × α)\nhs : s ∈ (𝓤 α).sets\nthis :\n  s ∈\n    Filter.comap (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd))\n      (𝓤 (Quotient (separationSetoid α)))\nt : Set (Quotient (separationSetoid α) × Quotient (separationSetoid α))\nht : t ∈ 𝓤 (Quotient (separationSetoid α))\nhts : (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) ⁻¹' t ⊆ s\n⊢ (a, b) ∈ (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) ⁻¹' t\n[PROOFSTEP]\ndsimp [preimage]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nx✝ : Quotient (separationSetoid α) × Quotient (separationSetoid α)\na✝ b✝ : Quotient (separationSetoid α)\na b : α\nh : (Quotient.mk (separationSetoid α) a, Quotient.mk (separationSetoid α) b) ∈ 𝓢 (Quotient (separationSetoid α))\ns : Set (α × α)\nhs : s ∈ (𝓤 α).sets\nthis :\n  s ∈\n    Filter.comap (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd))\n      (𝓤 (Quotient (separationSetoid α)))\nt : Set (Quotient (separationSetoid α) × Quotient (separationSetoid α))\nht : t ∈ 𝓤 (Quotient (separationSetoid α))\nhts : (fun p => (Quotient.mk (separationSetoid α) p.fst, Quotient.mk (separationSetoid α) p.snd)) ⁻¹' t ⊆ s\n⊢ (Quotient.mk (separationSetoid α) a, Quotient.mk (separationSetoid α) b) ∈ t\n[PROOFSTEP]\nexact h t ht\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace β\nf : α → β\nx y : α\nH : UniformContinuous f\nh : x ≈ y\n⊢ SeparatedSpace β\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace β\nf : α → β\nh : UniformContinuous f\na : α\n⊢ lift f (Quotient.mk (separationSetoid α) a) = f a\n[PROOFSTEP]\nrw [lift, dif_pos h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace β\nf : α → β\nh : UniformContinuous f\na : α\n⊢ Quotient.lift f (_ : ∀ (x x_1 : α), x ≈ x_1 → f x = f x_1) (Quotient.mk (separationSetoid α) a) = f a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace β\nf : α → β\n⊢ UniformContinuous (lift f)\n[PROOFSTEP]\nby_cases hf : UniformContinuous f\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace β\nf : α → β\nhf : UniformContinuous f\n⊢ UniformContinuous (lift f)\n[PROOFSTEP]\nrw [lift, dif_pos hf]\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace β\nf : α → β\nhf : UniformContinuous f\n⊢ UniformContinuous (Quotient.lift f (_ : ∀ (x x_1 : α), x ≈ x_1 → f x = f x_1))\n[PROOFSTEP]\nexact uniformContinuous_quotient_lift hf\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace β\nf : α → β\nhf : ¬UniformContinuous f\n⊢ UniformContinuous (lift f)\n[PROOFSTEP]\nrw [lift, dif_neg hf]\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nγ : Type w\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : UniformSpace γ\ninst✝ : SeparatedSpace β\nf : α → β\nhf : ¬UniformContinuous f\n⊢ UniformContinuous fun x => f (Nonempty.some (_ : Nonempty α))\n[PROOFSTEP]\nexact uniformContinuous_of_const fun a _ => rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\nh : UniformContinuous f\na : α\n⊢ map f (Quotient.mk (separationSetoid α) a) = Quotient.mk (separationSetoid β) (f a)\n[PROOFSTEP]\nrw [map, lift_mk (uniformContinuous_quotient_mk'.comp h)]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\nh : UniformContinuous f\na : α\n⊢ (Quotient.mk' ∘ f) a = Quotient.mk (separationSetoid β) (f a)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\nhf : UniformContinuous f\ng : SeparationQuotient α → SeparationQuotient β\ncomm : Quotient.mk (separationSetoid β) ∘ f = g ∘ Quotient.mk (separationSetoid α)\n⊢ map f = g\n[PROOFSTEP]\next ⟨a⟩\n[GOAL]\ncase h.mk\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\nhf : UniformContinuous f\ng : SeparationQuotient α → SeparationQuotient β\ncomm : Quotient.mk (separationSetoid β) ∘ f = g ∘ Quotient.mk (separationSetoid α)\nx✝ : SeparationQuotient α\na : α\n⊢ map f (Quot.mk Setoid.r a) = g (Quot.mk Setoid.r a)\n[PROOFSTEP]\ncalc\n  map f ⟦a⟧ = ⟦f a⟧ := map_mk hf a\n  _ = g ⟦a⟧ := congr_fun comm a\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\nf : α → β\ng : β → γ\nhf : UniformContinuous f\nhg : UniformContinuous g\n⊢ Quotient.mk (separationSetoid γ) ∘ g ∘ f = (map g ∘ map f) ∘ Quotient.mk (separationSetoid α)\n[PROOFSTEP]\nsimp only [Function.comp, map_mk, hf, hg]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\n⊢ (a₁, b₁) ≈ (a₂, b₂) ↔ a₁ ≈ a₂ ∧ b₁ ≈ b₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\n⊢ (a₁, b₁) ≈ (a₂, b₂) → a₁ ≈ a₂ ∧ b₁ ≈ b₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\nh : (a₁, b₁) ≈ (a₂, b₂)\n⊢ a₁ ≈ a₂ ∧ b₁ ≈ b₂\n[PROOFSTEP]\nexact ⟨separated_of_uniformContinuous uniformContinuous_fst h, separated_of_uniformContinuous uniformContinuous_snd h⟩\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\n⊢ a₁ ≈ a₂ ∧ b₁ ≈ b₂ → (a₁, b₁) ≈ (a₂, b₂)\n[PROOFSTEP]\nrintro ⟨eqv_α, eqv_β⟩ r r_in\n[GOAL]\ncase mpr.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\neqv_α : a₁ ≈ a₂\neqv_β : b₁ ≈ b₂\nr : Set ((α × β) × α × β)\nr_in : r ∈ (𝓤 (α × β)).sets\n⊢ ((a₁, b₁), a₂, b₂) ∈ r\n[PROOFSTEP]\nrw [uniformity_prod] at r_in \n[GOAL]\ncase mpr.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\neqv_α : a₁ ≈ a₂\neqv_β : b₁ ≈ b₂\nr : Set ((α × β) × α × β)\nr_in :\n  r ∈ (Filter.comap (fun p => (p.fst.fst, p.snd.fst)) (𝓤 α) ⊓ Filter.comap (fun p => (p.fst.snd, p.snd.snd)) (𝓤 β)).sets\n⊢ ((a₁, b₁), a₂, b₂) ∈ r\n[PROOFSTEP]\nrcases r_in with ⟨t_α, ⟨r_α, r_α_in, h_α⟩, t_β, ⟨r_β, r_β_in, h_β⟩, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\neqv_α : a₁ ≈ a₂\neqv_β : b₁ ≈ b₂\nt_α : Set ((α × β) × α × β)\nr_α : Set (α × α)\nr_α_in : r_α ∈ 𝓤 α\nh_α : (fun p => (p.fst.fst, p.snd.fst)) ⁻¹' r_α ⊆ t_α\nt_β : Set ((α × β) × α × β)\nr_β : Set (β × β)\nr_β_in : r_β ∈ 𝓤 β\nh_β : (fun p => (p.fst.snd, p.snd.snd)) ⁻¹' r_β ⊆ t_β\n⊢ ((a₁, b₁), a₂, b₂) ∈ t_α ∩ t_β\n[PROOFSTEP]\nlet p_α := fun p : (α × β) × α × β => (p.1.1, p.2.1)\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\neqv_α : a₁ ≈ a₂\neqv_β : b₁ ≈ b₂\nt_α : Set ((α × β) × α × β)\nr_α : Set (α × α)\nr_α_in : r_α ∈ 𝓤 α\nh_α : (fun p => (p.fst.fst, p.snd.fst)) ⁻¹' r_α ⊆ t_α\nt_β : Set ((α × β) × α × β)\nr_β : Set (β × β)\nr_β_in : r_β ∈ 𝓤 β\nh_β : (fun p => (p.fst.snd, p.snd.snd)) ⁻¹' r_β ⊆ t_β\np_α : (α × β) × α × β → α × α := fun p => (p.fst.fst, p.snd.fst)\n⊢ ((a₁, b₁), a₂, b₂) ∈ t_α ∩ t_β\n[PROOFSTEP]\nlet p_β := fun p : (α × β) × α × β => (p.1.2, p.2.2)\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\neqv_α : a₁ ≈ a₂\neqv_β : b₁ ≈ b₂\nt_α : Set ((α × β) × α × β)\nr_α : Set (α × α)\nr_α_in : r_α ∈ 𝓤 α\nh_α : (fun p => (p.fst.fst, p.snd.fst)) ⁻¹' r_α ⊆ t_α\nt_β : Set ((α × β) × α × β)\nr_β : Set (β × β)\nr_β_in : r_β ∈ 𝓤 β\nh_β : (fun p => (p.fst.snd, p.snd.snd)) ⁻¹' r_β ⊆ t_β\np_α : (α × β) × α × β → α × α := fun p => (p.fst.fst, p.snd.fst)\np_β : (α × β) × α × β → β × β := fun p => (p.fst.snd, p.snd.snd)\n⊢ ((a₁, b₁), a₂, b₂) ∈ t_α ∩ t_β\n[PROOFSTEP]\nhave key_α : p_α ((a₁, b₁), (a₂, b₂)) ∈ r_α := by simp [eqv_α r_α r_α_in]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\neqv_α : a₁ ≈ a₂\neqv_β : b₁ ≈ b₂\nt_α : Set ((α × β) × α × β)\nr_α : Set (α × α)\nr_α_in : r_α ∈ 𝓤 α\nh_α : (fun p => (p.fst.fst, p.snd.fst)) ⁻¹' r_α ⊆ t_α\nt_β : Set ((α × β) × α × β)\nr_β : Set (β × β)\nr_β_in : r_β ∈ 𝓤 β\nh_β : (fun p => (p.fst.snd, p.snd.snd)) ⁻¹' r_β ⊆ t_β\np_α : (α × β) × α × β → α × α := fun p => (p.fst.fst, p.snd.fst)\np_β : (α × β) × α × β → β × β := fun p => (p.fst.snd, p.snd.snd)\n⊢ p_α ((a₁, b₁), a₂, b₂) ∈ r_α\n[PROOFSTEP]\nsimp [eqv_α r_α r_α_in]\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\neqv_α : a₁ ≈ a₂\neqv_β : b₁ ≈ b₂\nt_α : Set ((α × β) × α × β)\nr_α : Set (α × α)\nr_α_in : r_α ∈ 𝓤 α\nh_α : (fun p => (p.fst.fst, p.snd.fst)) ⁻¹' r_α ⊆ t_α\nt_β : Set ((α × β) × α × β)\nr_β : Set (β × β)\nr_β_in : r_β ∈ 𝓤 β\nh_β : (fun p => (p.fst.snd, p.snd.snd)) ⁻¹' r_β ⊆ t_β\np_α : (α × β) × α × β → α × α := fun p => (p.fst.fst, p.snd.fst)\np_β : (α × β) × α × β → β × β := fun p => (p.fst.snd, p.snd.snd)\nkey_α : p_α ((a₁, b₁), a₂, b₂) ∈ r_α\n⊢ ((a₁, b₁), a₂, b₂) ∈ t_α ∩ t_β\n[PROOFSTEP]\nhave key_β : p_β ((a₁, b₁), (a₂, b₂)) ∈ r_β := by simp [eqv_β r_β r_β_in]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\neqv_α : a₁ ≈ a₂\neqv_β : b₁ ≈ b₂\nt_α : Set ((α × β) × α × β)\nr_α : Set (α × α)\nr_α_in : r_α ∈ 𝓤 α\nh_α : (fun p => (p.fst.fst, p.snd.fst)) ⁻¹' r_α ⊆ t_α\nt_β : Set ((α × β) × α × β)\nr_β : Set (β × β)\nr_β_in : r_β ∈ 𝓤 β\nh_β : (fun p => (p.fst.snd, p.snd.snd)) ⁻¹' r_β ⊆ t_β\np_α : (α × β) × α × β → α × α := fun p => (p.fst.fst, p.snd.fst)\np_β : (α × β) × α × β → β × β := fun p => (p.fst.snd, p.snd.snd)\nkey_α : p_α ((a₁, b₁), a₂, b₂) ∈ r_α\n⊢ p_β ((a₁, b₁), a₂, b₂) ∈ r_β\n[PROOFSTEP]\nsimp [eqv_β r_β r_β_in]\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : UniformSpace γ\na₁ a₂ : α\nb₁ b₂ : β\neqv_α : a₁ ≈ a₂\neqv_β : b₁ ≈ b₂\nt_α : Set ((α × β) × α × β)\nr_α : Set (α × α)\nr_α_in : r_α ∈ 𝓤 α\nh_α : (fun p => (p.fst.fst, p.snd.fst)) ⁻¹' r_α ⊆ t_α\nt_β : Set ((α × β) × α × β)\nr_β : Set (β × β)\nr_β_in : r_β ∈ 𝓤 β\nh_β : (fun p => (p.fst.snd, p.snd.snd)) ⁻¹' r_β ⊆ t_β\np_α : (α × β) × α × β → α × α := fun p => (p.fst.fst, p.snd.fst)\np_β : (α × β) × α × β → β × β := fun p => (p.fst.snd, p.snd.snd)\nkey_α : p_α ((a₁, b₁), a₂, b₂) ∈ r_α\nkey_β : p_β ((a₁, b₁), a₂, b₂) ∈ r_β\n⊢ ((a₁, b₁), a₂, b₂) ∈ t_α ∩ t_β\n[PROOFSTEP]\nexact ⟨h_α key_α, h_β key_β⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.UniformSpace.Separation", "llama_tokens": 21627, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6477982179521103, "lm_q2_score": 0.5813030906443133, "lm_q1q2_score": 0.3765671062094402}}
{"text": "[GOAL]\nG✝ : Type u_1\nH : Type u_2\ninst✝² : Mul G✝\ninst✝¹ : Mul H\nA✝ B✝ : Finset G✝\na0✝ b0✝ : G✝\nG : Type u_3\ninst✝ : Mul G\nA B : Finset G\na0 b0 : G\nh : UniqueMul A B a0 b0\nx✝¹ x✝ : G\nha : x✝¹ ∈ A\nhb : x✝ ∈ B\nk : x✝¹ ≠ a0 ∨ x✝ ≠ b0\n⊢ x✝¹ * x✝ ≠ a0 * b0\n[PROOFSTEP]\ncontrapose! k\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\ninst✝² : Mul G✝\ninst✝¹ : Mul H\nA✝ B✝ : Finset G✝\na0✝ b0✝ : G✝\nG : Type u_3\ninst✝ : Mul G\nA B : Finset G\na0 b0 : G\nh : UniqueMul A B a0 b0\nx✝¹ x✝ : G\nha : x✝¹ ∈ A\nhb : x✝ ∈ B\nk : x✝¹ * x✝ = a0 * b0\n⊢ x✝¹ = a0 ∧ x✝ = b0\n[PROOFSTEP]\nexact h ha hb k\n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA✝ B✝ : Finset G\na0✝ b0✝ : G\nA B : Finset G\na0 b0 : G\nh : UniqueMul A B a0 b0\n⊢ Set.Subsingleton {ab | ab.fst ∈ A ∧ ab.snd ∈ B ∧ ab.fst * ab.snd = a0 * b0}\n[PROOFSTEP]\nrintro ⟨x1, y1⟩ (hx : x1 ∈ A ∧ y1 ∈ B ∧ x1 * y1 = a0 * b0) ⟨x2, y2⟩ (hy : x2 ∈ A ∧ y2 ∈ B ∧ x2 * y2 = a0 * b0)\n[GOAL]\ncase mk.mk\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA✝ B✝ : Finset G\na0✝ b0✝ : G\nA B : Finset G\na0 b0 : G\nh : UniqueMul A B a0 b0\nx1 y1 : G\nhx : x1 ∈ A ∧ y1 ∈ B ∧ x1 * y1 = a0 * b0\nx2 y2 : G\nhy : x2 ∈ A ∧ y2 ∈ B ∧ x2 * y2 = a0 * b0\n⊢ (x1, y1) = (x2, y2)\n[PROOFSTEP]\nrcases h hx.1 hx.2.1 hx.2.2 with ⟨rfl, rfl⟩\n[GOAL]\ncase mk.mk.intro\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA✝ B✝ : Finset G\na0 b0 : G\nA B : Finset G\nx1 y1 x2 y2 : G\nh : UniqueMul A B x1 y1\nhx : x1 ∈ A ∧ y1 ∈ B ∧ x1 * y1 = x1 * y1\nhy : x2 ∈ A ∧ y2 ∈ B ∧ x2 * y2 = x1 * y1\n⊢ (x1, y1) = (x2, y2)\n[PROOFSTEP]\nrcases h hy.1 hy.2.1 hy.2.2 with ⟨rfl, rfl⟩\n[GOAL]\ncase mk.mk.intro.intro\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA✝ B✝ : Finset G\na0 b0 : G\nA B : Finset G\nx2 y2 : G\nh : UniqueMul A B x2 y2\nhx hy : x2 ∈ A ∧ y2 ∈ B ∧ x2 * y2 = x2 * y2\n⊢ (x2, y2) = (x2, y2)\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\naA : a0 ∈ A\nbB : b0 ∈ B\nx✝ : UniqueMul A B a0 b0\n⊢ ∀ (y : (a0, b0) ∈ A ×ˢ B), (fun x => (a0, b0).fst * (a0, b0).snd = a0 * b0) y → y = (_ : (a0, b0) ∈ A ×ˢ B)\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\naA : a0 ∈ A\nbB : b0 ∈ B\nx✝ : UniqueMul A B a0 b0\n⊢ ∀ (y : G × G), (fun ab => ∃! x, ab.fst * ab.snd = a0 * b0) y → y = (a0, b0)\n[PROOFSTEP]\nsimpa\n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\naA : a0 ∈ A\nbB : b0 ∈ B\nh : ∃! ab x, ab.fst * ab.snd = a0 * b0\n⊢ ∀ (x : G × G),\n    x ∈ A ×ˢ B →\n      x.fst * x.snd = a0 * b0 → (∀ (y : G × G), y ∈ A ×ˢ B → y.fst * y.snd = a0 * b0 → y = x) → UniqueMul A B a0 b0\n[PROOFSTEP]\nrintro ⟨x1, x2⟩ _ _ J x y hx hy l\n[GOAL]\ncase mk\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\naA : a0 ∈ A\nbB : b0 ∈ B\nh : ∃! ab x, ab.fst * ab.snd = a0 * b0\nx1 x2 : G\nh✝ : (x1, x2) ∈ A ×ˢ B\na✝ : (x1, x2).fst * (x1, x2).snd = a0 * b0\nJ : ∀ (y : G × G), y ∈ A ×ˢ B → y.fst * y.snd = a0 * b0 → y = (x1, x2)\nx y : G\nhx : x ∈ A\nhy : y ∈ B\nl : x * y = a0 * b0\n⊢ x = a0 ∧ y = b0\n[PROOFSTEP]\nrcases Prod.mk.inj_iff.mp (J (a0, b0) (Finset.mk_mem_product aA bB) rfl) with ⟨rfl, rfl⟩\n[GOAL]\ncase mk.intro\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\naA : a0 ∈ A\nbB : b0 ∈ B\nh : ∃! ab x, ab.fst * ab.snd = a0 * b0\nx y : G\nhx : x ∈ A\nhy : y ∈ B\nl : x * y = a0 * b0\nh✝ : (a0, b0) ∈ A ×ˢ B\na✝ : (a0, b0).fst * (a0, b0).snd = a0 * b0\nJ : ∀ (y : G × G), y ∈ A ×ˢ B → y.fst * y.snd = a0 * b0 → y = (a0, b0)\n⊢ x = a0 ∧ y = b0\n[PROOFSTEP]\nexact Prod.mk.inj_iff.mp (J (x, y) (Finset.mk_mem_product hx hy) l)\n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\nx✝ : ∃ g, ∃! ab x, ab.fst * ab.snd = g\ng : G\nh : ∃! ab x, ab.fst * ab.snd = g\n⊢ ∃ a0 b0, a0 ∈ A ∧ b0 ∈ B ∧ UniqueMul A B a0 b0\n[PROOFSTEP]\nhave h' := h\n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\nx✝ : ∃ g, ∃! ab x, ab.fst * ab.snd = g\ng : G\nh h' : ∃! ab x, ab.fst * ab.snd = g\n⊢ ∃ a0 b0, a0 ∈ A ∧ b0 ∈ B ∧ UniqueMul A B a0 b0\n[PROOFSTEP]\nrcases h' with ⟨⟨a, b⟩, ⟨hab, rfl, -⟩, -⟩\n[GOAL]\ncase intro.mk.intro.intro.intro\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\nx✝ : ∃ g, ∃! ab x, ab.fst * ab.snd = g\na b : G\nhab : (a, b) ∈ A ×ˢ B\nh : ∃! ab x, ab.fst * ab.snd = (a, b).fst * (a, b).snd\n⊢ ∃ a0 b0, a0 ∈ A ∧ b0 ∈ B ∧ UniqueMul A B a0 b0\n[PROOFSTEP]\ncases' Finset.mem_product.mp hab with ha hb\n[GOAL]\ncase intro.mk.intro.intro.intro.intro\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\nx✝ : ∃ g, ∃! ab x, ab.fst * ab.snd = g\na b : G\nhab : (a, b) ∈ A ×ˢ B\nh : ∃! ab x, ab.fst * ab.snd = (a, b).fst * (a, b).snd\nha : (a, b).fst ∈ A\nhb : (a, b).snd ∈ B\n⊢ ∃ a0 b0, a0 ∈ A ∧ b0 ∈ B ∧ UniqueMul A B a0 b0\n[PROOFSTEP]\nexact ⟨a, b, ha, hb, (iff_existsUnique ha hb).mpr h⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA✝ B✝ : Finset G\na0✝ b0✝ : G\nf : G →ₙ* H\nhf : Function.Injective ↑f\na0 b0 : G\nA B : Finset H\nu : UniqueMul A B (↑f a0) (↑f b0)\n⊢ UniqueMul (Finset.preimage A ↑f (_ : Set.InjOn (↑f) (↑f ⁻¹' ↑A)))\n    (Finset.preimage B ↑f (_ : Set.InjOn (↑f) (↑f ⁻¹' ↑B))) a0 b0\n[PROOFSTEP]\nintro a b ha hb ab\n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA✝ B✝ : Finset G\na0✝ b0✝ : G\nf : G →ₙ* H\nhf : Function.Injective ↑f\na0 b0 : G\nA B : Finset H\nu : UniqueMul A B (↑f a0) (↑f b0)\na b : G\nha : a ∈ Finset.preimage A ↑f (_ : Set.InjOn (↑f) (↑f ⁻¹' ↑A))\nhb : b ∈ Finset.preimage B ↑f (_ : Set.InjOn (↑f) (↑f ⁻¹' ↑B))\nab : a * b = a0 * b0\n⊢ a = a0 ∧ b = b0\n[PROOFSTEP]\nrw [← hf.eq_iff, ← hf.eq_iff]\n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA✝ B✝ : Finset G\na0✝ b0✝ : G\nf : G →ₙ* H\nhf : Function.Injective ↑f\na0 b0 : G\nA B : Finset H\nu : UniqueMul A B (↑f a0) (↑f b0)\na b : G\nha : a ∈ Finset.preimage A ↑f (_ : Set.InjOn (↑f) (↑f ⁻¹' ↑A))\nhb : b ∈ Finset.preimage B ↑f (_ : Set.InjOn (↑f) (↑f ⁻¹' ↑B))\nab : a * b = a0 * b0\n⊢ ↑f a = ↑f a0 ∧ ↑f b = ↑f b0\n[PROOFSTEP]\nrw [← hf.eq_iff, map_mul, map_mul] at ab \n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA✝ B✝ : Finset G\na0✝ b0✝ : G\nf : G →ₙ* H\nhf : Function.Injective ↑f\na0 b0 : G\nA B : Finset H\nu : UniqueMul A B (↑f a0) (↑f b0)\na b : G\nha : a ∈ Finset.preimage A ↑f (_ : Set.InjOn (↑f) (↑f ⁻¹' ↑A))\nhb : b ∈ Finset.preimage B ↑f (_ : Set.InjOn (↑f) (↑f ⁻¹' ↑B))\nab : ↑f a * ↑f b = ↑f a0 * ↑f b0\n⊢ ↑f a = ↑f a0 ∧ ↑f b = ↑f b0\n[PROOFSTEP]\nexact u (Finset.mem_preimage.mp ha) (Finset.mem_preimage.mp hb) ab\n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝² : Mul G\ninst✝¹ : Mul H\nA B : Finset G\na0 b0 : G\ninst✝ : DecidableEq H\nf : G →ₙ* H\nhf : Function.Injective ↑f\n⊢ UniqueMul (Finset.image (↑f) A) (Finset.image (↑f) B) (↑f a0) (↑f b0) ↔ UniqueMul A B a0 b0\n[PROOFSTEP]\nrefine' ⟨fun h ↦ _, fun h ↦ _⟩\n[GOAL]\ncase refine'_1\nG : Type u_1\nH : Type u_2\ninst✝² : Mul G\ninst✝¹ : Mul H\nA B : Finset G\na0 b0 : G\ninst✝ : DecidableEq H\nf : G →ₙ* H\nhf : Function.Injective ↑f\nh : UniqueMul (Finset.image (↑f) A) (Finset.image (↑f) B) (↑f a0) (↑f b0)\n⊢ UniqueMul A B a0 b0\n[PROOFSTEP]\nintro a b ha hb ab\n[GOAL]\ncase refine'_1\nG : Type u_1\nH : Type u_2\ninst✝² : Mul G\ninst✝¹ : Mul H\nA B : Finset G\na0 b0 : G\ninst✝ : DecidableEq H\nf : G →ₙ* H\nhf : Function.Injective ↑f\nh : UniqueMul (Finset.image (↑f) A) (Finset.image (↑f) B) (↑f a0) (↑f b0)\na b : G\nha : a ∈ A\nhb : b ∈ B\nab : a * b = a0 * b0\n⊢ a = a0 ∧ b = b0\n[PROOFSTEP]\nrw [← hf.eq_iff, ← hf.eq_iff]\n[GOAL]\ncase refine'_1\nG : Type u_1\nH : Type u_2\ninst✝² : Mul G\ninst✝¹ : Mul H\nA B : Finset G\na0 b0 : G\ninst✝ : DecidableEq H\nf : G →ₙ* H\nhf : Function.Injective ↑f\nh : UniqueMul (Finset.image (↑f) A) (Finset.image (↑f) B) (↑f a0) (↑f b0)\na b : G\nha : a ∈ A\nhb : b ∈ B\nab : a * b = a0 * b0\n⊢ ↑f a = ↑f a0 ∧ ↑f b = ↑f b0\n[PROOFSTEP]\nrw [← hf.eq_iff, map_mul, map_mul] at ab \n[GOAL]\ncase refine'_1\nG : Type u_1\nH : Type u_2\ninst✝² : Mul G\ninst✝¹ : Mul H\nA B : Finset G\na0 b0 : G\ninst✝ : DecidableEq H\nf : G →ₙ* H\nhf : Function.Injective ↑f\nh : UniqueMul (Finset.image (↑f) A) (Finset.image (↑f) B) (↑f a0) (↑f b0)\na b : G\nha : a ∈ A\nhb : b ∈ B\nab : ↑f a * ↑f b = ↑f a0 * ↑f b0\n⊢ ↑f a = ↑f a0 ∧ ↑f b = ↑f b0\n[PROOFSTEP]\nexact h (Finset.mem_image.mpr ⟨_, ha, rfl⟩) (Finset.mem_image.mpr ⟨_, hb, rfl⟩) ab\n[GOAL]\ncase refine'_2\nG : Type u_1\nH : Type u_2\ninst✝² : Mul G\ninst✝¹ : Mul H\nA B : Finset G\na0 b0 : G\ninst✝ : DecidableEq H\nf : G →ₙ* H\nhf : Function.Injective ↑f\nh : UniqueMul A B a0 b0\n⊢ UniqueMul (Finset.image (↑f) A) (Finset.image (↑f) B) (↑f a0) (↑f b0)\n[PROOFSTEP]\nintro a b aA bB ab\n[GOAL]\ncase refine'_2\nG : Type u_1\nH : Type u_2\ninst✝² : Mul G\ninst✝¹ : Mul H\nA B : Finset G\na0 b0 : G\ninst✝ : DecidableEq H\nf : G →ₙ* H\nhf : Function.Injective ↑f\nh : UniqueMul A B a0 b0\na b : H\naA : a ∈ Finset.image (↑f) A\nbB : b ∈ Finset.image (↑f) B\nab : a * b = ↑f a0 * ↑f b0\n⊢ a = ↑f a0 ∧ b = ↑f b0\n[PROOFSTEP]\nobtain ⟨a, ha, rfl⟩ : ∃ a' ∈ A, f a' = a := Finset.mem_image.mp aA\n[GOAL]\ncase refine'_2.intro.intro\nG : Type u_1\nH : Type u_2\ninst✝² : Mul G\ninst✝¹ : Mul H\nA B : Finset G\na0 b0 : G\ninst✝ : DecidableEq H\nf : G →ₙ* H\nhf : Function.Injective ↑f\nh : UniqueMul A B a0 b0\nb : H\nbB : b ∈ Finset.image (↑f) B\na : G\nha : a ∈ A\naA : ↑f a ∈ Finset.image (↑f) A\nab : ↑f a * b = ↑f a0 * ↑f b0\n⊢ ↑f a = ↑f a0 ∧ b = ↑f b0\n[PROOFSTEP]\nobtain ⟨b, hb, rfl⟩ : ∃ b' ∈ B, f b' = b := Finset.mem_image.mp bB\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nG : Type u_1\nH : Type u_2\ninst✝² : Mul G\ninst✝¹ : Mul H\nA B : Finset G\na0 b0 : G\ninst✝ : DecidableEq H\nf : G →ₙ* H\nhf : Function.Injective ↑f\nh : UniqueMul A B a0 b0\na : G\nha : a ∈ A\naA : ↑f a ∈ Finset.image (↑f) A\nb : G\nhb : b ∈ B\nbB : ↑f b ∈ Finset.image (↑f) B\nab : ↑f a * ↑f b = ↑f a0 * ↑f b0\n⊢ ↑f a = ↑f a0 ∧ ↑f b = ↑f b0\n[PROOFSTEP]\nrw [hf.eq_iff, hf.eq_iff]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nG : Type u_1\nH : Type u_2\ninst✝² : Mul G\ninst✝¹ : Mul H\nA B : Finset G\na0 b0 : G\ninst✝ : DecidableEq H\nf : G →ₙ* H\nhf : Function.Injective ↑f\nh : UniqueMul A B a0 b0\na : G\nha : a ∈ A\naA : ↑f a ∈ Finset.image (↑f) A\nb : G\nhb : b ∈ B\nbB : ↑f b ∈ Finset.image (↑f) B\nab : ↑f a * ↑f b = ↑f a0 * ↑f b0\n⊢ a = a0 ∧ b = b0\n[PROOFSTEP]\nrw [← map_mul, ← map_mul, hf.eq_iff] at ab \n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nG : Type u_1\nH : Type u_2\ninst✝² : Mul G\ninst✝¹ : Mul H\nA B : Finset G\na0 b0 : G\ninst✝ : DecidableEq H\nf : G →ₙ* H\nhf : Function.Injective ↑f\nh : UniqueMul A B a0 b0\na : G\nha : a ∈ A\naA : ↑f a ∈ Finset.image (↑f) A\nb : G\nhb : b ∈ B\nbB : ↑f b ∈ Finset.image (↑f) B\nab : a * b = a0 * b0\n⊢ a = a0 ∧ b = b0\n[PROOFSTEP]\nexact h ha hb ab\n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\nf : G ↪ H\nmul : ∀ (x y : G), ↑f (x * y) = ↑f x * ↑f y\n⊢ UniqueMul (Finset.map f A) (Finset.map f B) (↑f a0) (↑f b0) ↔ UniqueMul A B a0 b0\n[PROOFSTEP]\nclassical convert @mulHom_image_iff G H _ _ A B a0 b0 _ ⟨f, mul⟩ f.2 using 2 <;>\n  · ext\n    simp only [Finset.mem_map, MulHom.coe_mk, Finset.mem_image]\n[GOAL]\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\nf : G ↪ H\nmul : ∀ (x y : G), ↑f (x * y) = ↑f x * ↑f y\n⊢ UniqueMul (Finset.map f A) (Finset.map f B) (↑f a0) (↑f b0) ↔ UniqueMul A B a0 b0\n[PROOFSTEP]\nconvert @mulHom_image_iff G H _ _ A B a0 b0 _ ⟨f, mul⟩ f.2 using 2\n[GOAL]\ncase h.e'_1.h.e'_3\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\nf : G ↪ H\nmul : ∀ (x y : G), ↑f (x * y) = ↑f x * ↑f y\n⊢ Finset.map f A = Finset.image (↑{ toFun := ↑f, map_mul' := mul }) A\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_1.h.e'_3.a\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\nf : G ↪ H\nmul : ∀ (x y : G), ↑f (x * y) = ↑f x * ↑f y\na✝ : H\n⊢ a✝ ∈ Finset.map f A ↔ a✝ ∈ Finset.image (↑{ toFun := ↑f, map_mul' := mul }) A\n[PROOFSTEP]\nsimp only [Finset.mem_map, MulHom.coe_mk, Finset.mem_image]\n[GOAL]\ncase h.e'_1.h.e'_4\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\nf : G ↪ H\nmul : ∀ (x y : G), ↑f (x * y) = ↑f x * ↑f y\n⊢ Finset.map f B = Finset.image (↑{ toFun := ↑f, map_mul' := mul }) B\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_1.h.e'_4.a\nG : Type u_1\nH : Type u_2\ninst✝¹ : Mul G\ninst✝ : Mul H\nA B : Finset G\na0 b0 : G\nf : G ↪ H\nmul : ∀ (x y : G), ↑f (x * y) = ↑f x * ↑f y\na✝ : H\n⊢ a✝ ∈ Finset.map f B ↔ a✝ ∈ Finset.image (↑{ toFun := ↑f, map_mul' := mul }) B\n[PROOFSTEP]\nsimp only [Finset.mem_map, MulHom.coe_mk, Finset.mem_image]\n[GOAL]\nM : Type ?u.148083\ninst✝¹ : Add M\ninst✝ : UniqueSums M\nA B : Finset (Multiplicative M)\nhA : Finset.Nonempty A\nhB : Finset.Nonempty B\n⊢ ∃ a0, a0 ∈ A ∧ ∃ b0, b0 ∈ B ∧ UniqueMul A B a0 b0\n[PROOFSTEP]\nlet A' : Finset M := A\n[GOAL]\nM : Type ?u.148083\ninst✝¹ : Add M\ninst✝ : UniqueSums M\nA B : Finset (Multiplicative M)\nhA : Finset.Nonempty A\nhB : Finset.Nonempty B\nA' : Finset M := A\n⊢ ∃ a0, a0 ∈ A ∧ ∃ b0, b0 ∈ B ∧ UniqueMul A B a0 b0\n[PROOFSTEP]\nhave hA' : A'.Nonempty := hA\n[GOAL]\nM : Type ?u.148083\ninst✝¹ : Add M\ninst✝ : UniqueSums M\nA B : Finset (Multiplicative M)\nhA : Finset.Nonempty A\nhB : Finset.Nonempty B\nA' : Finset M := A\nhA' : Finset.Nonempty A'\n⊢ ∃ a0, a0 ∈ A ∧ ∃ b0, b0 ∈ B ∧ UniqueMul A B a0 b0\n[PROOFSTEP]\nobtain ⟨a0, hA0, b0, hB0, J⟩ := UniqueSums.uniqueAdd_of_nonempty hA' hB\n[GOAL]\ncase intro.intro.intro.intro\nM : Type ?u.148083\ninst✝¹ : Add M\ninst✝ : UniqueSums M\nA B : Finset (Multiplicative M)\nhA : Finset.Nonempty A\nhB : Finset.Nonempty B\nA' : Finset M := A\nhA' : Finset.Nonempty A'\na0 : M\nhA0 : a0 ∈ A'\nb0 : M\nhB0 : b0 ∈ B\nJ : UniqueAdd A' B a0 b0\n⊢ ∃ a0, a0 ∈ A ∧ ∃ b0, b0 ∈ B ∧ UniqueMul A B a0 b0\n[PROOFSTEP]\nexact ⟨ofAdd a0, hA0, ofAdd b0, hB0, fun a b aA bB H ↦ J aA bB H⟩\n[GOAL]\nM : Type ?u.148565\ninst✝¹ : Mul M\ninst✝ : UniqueProds M\nA B : Finset (Additive M)\nhA : Finset.Nonempty A\nhB : Finset.Nonempty B\n⊢ ∃ a0, a0 ∈ A ∧ ∃ b0, b0 ∈ B ∧ UniqueAdd A B a0 b0\n[PROOFSTEP]\nlet A' : Finset M := A\n[GOAL]\nM : Type ?u.148565\ninst✝¹ : Mul M\ninst✝ : UniqueProds M\nA B : Finset (Additive M)\nhA : Finset.Nonempty A\nhB : Finset.Nonempty B\nA' : Finset M := A\n⊢ ∃ a0, a0 ∈ A ∧ ∃ b0, b0 ∈ B ∧ UniqueAdd A B a0 b0\n[PROOFSTEP]\nhave hA' : A'.Nonempty := hA\n[GOAL]\nM : Type ?u.148565\ninst✝¹ : Mul M\ninst✝ : UniqueProds M\nA B : Finset (Additive M)\nhA : Finset.Nonempty A\nhB : Finset.Nonempty B\nA' : Finset M := A\nhA' : Finset.Nonempty A'\n⊢ ∃ a0, a0 ∈ A ∧ ∃ b0, b0 ∈ B ∧ UniqueAdd A B a0 b0\n[PROOFSTEP]\nobtain ⟨a0, hA0, b0, hB0, J⟩ := UniqueProds.uniqueMul_of_nonempty hA' hB\n[GOAL]\ncase intro.intro.intro.intro\nM : Type ?u.148565\ninst✝¹ : Mul M\ninst✝ : UniqueProds M\nA B : Finset (Additive M)\nhA : Finset.Nonempty A\nhB : Finset.Nonempty B\nA' : Finset M := A\nhA' : Finset.Nonempty A'\na0 : M\nhA0 : a0 ∈ A'\nb0 : M\nhB0 : b0 ∈ B\nJ : UniqueMul A' B a0 b0\n⊢ ∃ a0, a0 ∈ A ∧ ∃ b0, b0 ∈ B ∧ UniqueAdd A B a0 b0\n[PROOFSTEP]\nexact ⟨ofMul a0, hA0, ofMul b0, hB0, fun a b aA bB H ↦ J aA bB H⟩\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Group.UniqueProds", "llama_tokens": 8701, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6513548782017745, "lm_q2_score": 0.5774953651858117, "lm_q1q2_score": 0.37615442325269366}}
{"text": "[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.9027, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX : C\n⊢ Nonempty\n    (Octahedron (_ : 𝟙 X ≫ 𝟙 X = 𝟙 X) (_ : contractibleTriangle X ∈ distinguishedTriangles)\n      (_ : contractibleTriangle X ∈ distinguishedTriangles) (_ : contractibleTriangle X ∈ distinguishedTriangles))\n[PROOFSTEP]\nrefine'\n  ⟨⟨0, 0, _, _, _, _,\n      isomorphic_distinguished _ (contractible_distinguished (0 : C)) _\n        (Triangle.isoMk _ _ (by rfl) (by rfl) (by rfl))⟩⟩\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.9027, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX : C\n⊢ (Triangle.mk 0 0 (0 ≫ (shiftFunctor C 1).map 0)).obj₁ ≅ (contractibleTriangle 0).obj₁\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.9027, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX : C\n⊢ (Triangle.mk 0 0 (0 ≫ (shiftFunctor C 1).map 0)).obj₂ ≅ (contractibleTriangle 0).obj₂\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.9027, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX : C\n⊢ (Triangle.mk 0 0 (0 ≫ (shiftFunctor C 1).map 0)).obj₃ ≅ (contractibleTriangle 0).obj₃\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1\nC : Type u_1\ninst✝⁵ : Category.{?u.9027, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX : C\n⊢ 0 ≫ 0 = 𝟙 X ≫ 0\ncase refine'_2\nC : Type u_1\ninst✝⁵ : Category.{?u.9027, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX : C\n⊢ 0 ≫ 0 = 0\ncase refine'_3\nC : Type u_1\ninst✝⁵ : Category.{?u.9027, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX : C\n⊢ 0 ≫ 0 = 0\ncase refine'_4\nC : Type u_1\ninst✝⁵ : Category.{?u.9027, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX : C\n⊢ 0 ≫ (shiftFunctor C 1).map (𝟙 X) = 0 ≫ 0\n[PROOFSTEP]\nall_goals apply Subsingleton.elim\n[GOAL]\ncase refine'_1\nC : Type u_1\ninst✝⁵ : Category.{?u.9027, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX : C\n⊢ 0 ≫ 0 = 𝟙 X ≫ 0\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\ncase refine'_2\nC : Type u_1\ninst✝⁵ : Category.{?u.9027, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX : C\n⊢ 0 ≫ 0 = 0\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\ncase refine'_3\nC : Type u_1\ninst✝⁵ : Category.{?u.9027, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX : C\n⊢ 0 ≫ 0 = 0\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\ncase refine'_4\nC : Type u_1\ninst✝⁵ : Category.{?u.9027, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX : C\n⊢ 0 ≫ (shiftFunctor C 1).map (𝟙 X) = 0 ≫ 0\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.25095, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C\nu₁₂ : X₁ ⟶ X₂\nu₂₃ : X₂ ⟶ X₃\nu₁₃ : X₁ ⟶ X₃\ncomm : u₁₂ ≫ u₂₃ = u₁₃\nv₁₂ : X₂ ⟶ Z₁₂\nw₁₂ : Z₁₂ ⟶ (shiftFunctor C 1).obj X₁\nh₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distinguishedTriangles\nv₂₃ : X₃ ⟶ Z₂₃\nw₂₃ : Z₂₃ ⟶ (shiftFunctor C 1).obj X₂\nh₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distinguishedTriangles\nv₁₃ : X₃ ⟶ Z₁₃\nw₁₃ : Z₁₃ ⟶ (shiftFunctor C 1).obj X₁\nh₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distinguishedTriangles\nh : Octahedron comm h₁₂ h₂₃ h₁₃\n⊢ (Triangle.mk u₁₂ v₁₂ w₁₂).mor₁ ≫ u₂₃ = 𝟙 X₁ ≫ (Triangle.mk u₁₃ v₁₃ w₁₃).mor₁\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.25095, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C\nu₁₂ : X₁ ⟶ X₂\nu₂₃ : X₂ ⟶ X₃\nu₁₃ : X₁ ⟶ X₃\ncomm : u₁₂ ≫ u₂₃ = u₁₃\nv₁₂ : X₂ ⟶ Z₁₂\nw₁₂ : Z₁₂ ⟶ (shiftFunctor C 1).obj X₁\nh₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distinguishedTriangles\nv₂₃ : X₃ ⟶ Z₂₃\nw₂₃ : Z₂₃ ⟶ (shiftFunctor C 1).obj X₂\nh₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distinguishedTriangles\nv₁₃ : X₃ ⟶ Z₁₃\nw₁₃ : Z₁₃ ⟶ (shiftFunctor C 1).obj X₁\nh₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distinguishedTriangles\nh : Octahedron comm h₁₂ h₂₃ h₁₃\n⊢ u₁₂ ≫ u₂₃ = 𝟙 X₁ ≫ u₁₃\n[PROOFSTEP]\nrw [id_comp, comm]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.25095, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C\nu₁₂ : X₁ ⟶ X₂\nu₂₃ : X₂ ⟶ X₃\nu₁₃ : X₁ ⟶ X₃\ncomm : u₁₂ ≫ u₂₃ = u₁₃\nv₁₂ : X₂ ⟶ Z₁₂\nw₁₂ : Z₁₂ ⟶ (shiftFunctor C 1).obj X₁\nh₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distinguishedTriangles\nv₂₃ : X₃ ⟶ Z₂₃\nw₂₃ : Z₂₃ ⟶ (shiftFunctor C 1).obj X₂\nh₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distinguishedTriangles\nv₁₃ : X₃ ⟶ Z₁₃\nw₁₃ : Z₁₃ ⟶ (shiftFunctor C 1).obj X₁\nh₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distinguishedTriangles\nh : Octahedron comm h₁₂ h₂₃ h₁₃\n⊢ (Triangle.mk u₁₂ v₁₂ w₁₂).mor₃ ≫ (shiftFunctor C 1).map (𝟙 X₁) = h.m₁ ≫ (Triangle.mk u₁₃ v₁₃ w₁₃).mor₃\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.25095, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C\nu₁₂ : X₁ ⟶ X₂\nu₂₃ : X₂ ⟶ X₃\nu₁₃ : X₁ ⟶ X₃\ncomm : u₁₂ ≫ u₂₃ = u₁₃\nv₁₂ : X₂ ⟶ Z₁₂\nw₁₂ : Z₁₂ ⟶ (shiftFunctor C 1).obj X₁\nh₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distinguishedTriangles\nv₂₃ : X₃ ⟶ Z₂₃\nw₂₃ : Z₂₃ ⟶ (shiftFunctor C 1).obj X₂\nh₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distinguishedTriangles\nv₁₃ : X₃ ⟶ Z₁₃\nw₁₃ : Z₁₃ ⟶ (shiftFunctor C 1).obj X₁\nh₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distinguishedTriangles\nh : Octahedron comm h₁₂ h₂₃ h₁₃\n⊢ w₁₂ ≫ (shiftFunctor C 1).map (𝟙 X₁) = h.m₁ ≫ w₁₃\n[PROOFSTEP]\nsimpa only [Functor.map_id, comp_id] using h.comm₂.symm\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.30829, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C\nu₁₂ : X₁ ⟶ X₂\nu₂₃ : X₂ ⟶ X₃\nu₁₃ : X₁ ⟶ X₃\ncomm : u₁₂ ≫ u₂₃ = u₁₃\nv₁₂ : X₂ ⟶ Z₁₂\nw₁₂ : Z₁₂ ⟶ (shiftFunctor C 1).obj X₁\nh₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distinguishedTriangles\nv₂₃ : X₃ ⟶ Z₂₃\nw₂₃ : Z₂₃ ⟶ (shiftFunctor C 1).obj X₂\nh₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distinguishedTriangles\nv₁₃ : X₃ ⟶ Z₁₃\nw₁₃ : Z₁₃ ⟶ (shiftFunctor C 1).obj X₁\nh₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distinguishedTriangles\nh : Octahedron comm h₁₂ h₂₃ h₁₃\n⊢ (Triangle.mk u₁₃ v₁₃ w₁₃).mor₁ ≫ 𝟙 X₃ = u₁₂ ≫ (Triangle.mk u₂₃ v₂₃ w₂₃).mor₁\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.30829, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C\nu₁₂ : X₁ ⟶ X₂\nu₂₃ : X₂ ⟶ X₃\nu₁₃ : X₁ ⟶ X₃\ncomm : u₁₂ ≫ u₂₃ = u₁₃\nv₁₂ : X₂ ⟶ Z₁₂\nw₁₂ : Z₁₂ ⟶ (shiftFunctor C 1).obj X₁\nh₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distinguishedTriangles\nv₂₃ : X₃ ⟶ Z₂₃\nw₂₃ : Z₂₃ ⟶ (shiftFunctor C 1).obj X₂\nh₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distinguishedTriangles\nv₁₃ : X₃ ⟶ Z₁₃\nw₁₃ : Z₁₃ ⟶ (shiftFunctor C 1).obj X₁\nh₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distinguishedTriangles\nh : Octahedron comm h₁₂ h₂₃ h₁₃\n⊢ u₁₃ ≫ 𝟙 X₃ = u₁₂ ≫ u₂₃\n[PROOFSTEP]\nrw [comp_id, comm]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.30829, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C\nu₁₂ : X₁ ⟶ X₂\nu₂₃ : X₂ ⟶ X₃\nu₁₃ : X₁ ⟶ X₃\ncomm : u₁₂ ≫ u₂₃ = u₁₃\nv₁₂ : X₂ ⟶ Z₁₂\nw₁₂ : Z₁₂ ⟶ (shiftFunctor C 1).obj X₁\nh₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distinguishedTriangles\nv₂₃ : X₃ ⟶ Z₂₃\nw₂₃ : Z₂₃ ⟶ (shiftFunctor C 1).obj X₂\nh₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distinguishedTriangles\nv₁₃ : X₃ ⟶ Z₁₃\nw₁₃ : Z₁₃ ⟶ (shiftFunctor C 1).obj X₁\nh₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distinguishedTriangles\nh : Octahedron comm h₁₂ h₂₃ h₁₃\n⊢ (Triangle.mk u₁₃ v₁₃ w₁₃).mor₂ ≫ h.m₃ = 𝟙 X₃ ≫ (Triangle.mk u₂₃ v₂₃ w₂₃).mor₂\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{?u.30829, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : HasZeroObject C\ninst✝² : HasShift C ℤ\ninst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)\ninst✝ : Pretriangulated C\nX₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C\nu₁₂ : X₁ ⟶ X₂\nu₂₃ : X₂ ⟶ X₃\nu₁₃ : X₁ ⟶ X₃\ncomm : u₁₂ ≫ u₂₃ = u₁₃\nv₁₂ : X₂ ⟶ Z₁₂\nw₁₂ : Z₁₂ ⟶ (shiftFunctor C 1).obj X₁\nh₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distinguishedTriangles\nv₂₃ : X₃ ⟶ Z₂₃\nw₂₃ : Z₂₃ ⟶ (shiftFunctor C 1).obj X₂\nh₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distinguishedTriangles\nv₁₃ : X₃ ⟶ Z₁₃\nw₁₃ : Z₁₃ ⟶ (shiftFunctor C 1).obj X₁\nh₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distinguishedTriangles\nh : Octahedron comm h₁₂ h₂₃ h₁₃\n⊢ v₁₃ ≫ h.m₃ = 𝟙 X₃ ≫ v₂₃\n[PROOFSTEP]\nrw [id_comp, h.comm₃]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Triangulated.Triangulated", "llama_tokens": 5251, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7185943925708562, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.3761269277031234}}
{"text": "[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : Mul G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\nc : ℝ≥0∞\ng : G\n⊢ Measure.map (fun x => g * x) (c • μ) = c • μ\n[PROOFSTEP]\nrw [Measure.map_smul, map_mul_left_eq_self]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : Mul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\nc : ℝ≥0∞\ng : G\n⊢ Measure.map (fun x => x * g) (c • μ) = c • μ\n[PROOFSTEP]\nrw [Measure.map_smul, map_mul_right_eq_self]\n[GOAL]\n𝕜 : Type u_1\nG✝ : Type u_2\nH✝ : Type u_3\ninst✝⁷ : MeasurableSpace G✝\ninst✝⁶ : MeasurableSpace H✝\ninst✝⁵ : Mul G✝\nμ✝ : Measure G✝\ninst✝⁴ : MeasurableMul G✝\nG : Type u_4\nα : Type u_5\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace α\nμ : Measure α\ninst✝ : SMulInvariantMeasure G α μ\nH : Subgroup G\ny : { x // x ∈ H }\ns : Set α\nhs : MeasurableSet s\n⊢ ↑↑μ ((fun x => y • x) ⁻¹' s) = ↑↑μ s\n[PROOFSTEP]\nconvert SMulInvariantMeasure.measure_preimage_smul (μ := μ) (y : G) hs\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : Mul G\nμ✝ : Measure G\ninst✝ : MeasurableMul G\nμ : Measure G\n⊢ (∀ (g : G) (A : Set G), MeasurableSet A → ↑↑μ ((fun h => g * h) ⁻¹' A) = ↑↑μ A) ↔ IsMulLeftInvariant μ\n[PROOFSTEP]\ntrans ∀ g, map (g * ·) μ = μ\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : Mul G\nμ✝ : Measure G\ninst✝ : MeasurableMul G\nμ : Measure G\n⊢ (∀ (g : G) (A : Set G), MeasurableSet A → ↑↑μ ((fun h => g * h) ⁻¹' A) = ↑↑μ A) ↔\n    ∀ (g : G), Measure.map (fun x => g * x) μ = μ\n[PROOFSTEP]\nsimp_rw [Measure.ext_iff]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : Mul G\nμ✝ : Measure G\ninst✝ : MeasurableMul G\nμ : Measure G\n⊢ (∀ (g : G) (A : Set G), MeasurableSet A → ↑↑μ ((fun h => g * h) ⁻¹' A) = ↑↑μ A) ↔\n    ∀ (g : G) (s : Set G), MeasurableSet s → ↑↑(Measure.map (fun x => g * x) μ) s = ↑↑μ s\n[PROOFSTEP]\nrefine' forall_congr' fun g => forall_congr' fun A => forall_congr' fun hA => _\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : Mul G\nμ✝ : Measure G\ninst✝ : MeasurableMul G\nμ : Measure G\ng : G\nA : Set G\nhA : MeasurableSet A\n⊢ ↑↑μ ((fun h => g * h) ⁻¹' A) = ↑↑μ A ↔ ↑↑(Measure.map (fun x => g * x) μ) A = ↑↑μ A\n[PROOFSTEP]\nrw [map_apply (measurable_const_mul g) hA]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : Mul G\nμ✝ : Measure G\ninst✝ : MeasurableMul G\nμ : Measure G\n⊢ (∀ (g : G), Measure.map (fun x => g * x) μ = μ) ↔ IsMulLeftInvariant μ\n[PROOFSTEP]\nexact ⟨fun h => ⟨h⟩, fun h => h.1⟩\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : Mul G\nμ✝ : Measure G\ninst✝ : MeasurableMul G\nμ : Measure G\n⊢ (∀ (g : G) (A : Set G), MeasurableSet A → ↑↑μ ((fun h => h * g) ⁻¹' A) = ↑↑μ A) ↔ IsMulRightInvariant μ\n[PROOFSTEP]\ntrans ∀ g, map (· * g) μ = μ\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : Mul G\nμ✝ : Measure G\ninst✝ : MeasurableMul G\nμ : Measure G\n⊢ (∀ (g : G) (A : Set G), MeasurableSet A → ↑↑μ ((fun h => h * g) ⁻¹' A) = ↑↑μ A) ↔\n    ∀ (g : G), Measure.map (fun x => x * g) μ = μ\n[PROOFSTEP]\nsimp_rw [Measure.ext_iff]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : Mul G\nμ✝ : Measure G\ninst✝ : MeasurableMul G\nμ : Measure G\n⊢ (∀ (g : G) (A : Set G), MeasurableSet A → ↑↑μ ((fun h => h * g) ⁻¹' A) = ↑↑μ A) ↔\n    ∀ (g : G) (s : Set G), MeasurableSet s → ↑↑(Measure.map (fun x => x * g) μ) s = ↑↑μ s\n[PROOFSTEP]\nrefine' forall_congr' fun g => forall_congr' fun A => forall_congr' fun hA => _\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : Mul G\nμ✝ : Measure G\ninst✝ : MeasurableMul G\nμ : Measure G\ng : G\nA : Set G\nhA : MeasurableSet A\n⊢ ↑↑μ ((fun h => h * g) ⁻¹' A) = ↑↑μ A ↔ ↑↑(Measure.map (fun x => x * g) μ) A = ↑↑μ A\n[PROOFSTEP]\nrw [map_apply (measurable_mul_const g) hA]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : Mul G\nμ✝ : Measure G\ninst✝ : MeasurableMul G\nμ : Measure G\n⊢ (∀ (g : G), Measure.map (fun x => x * g) μ = μ) ↔ IsMulRightInvariant μ\n[PROOFSTEP]\nexact ⟨fun h => ⟨h⟩, fun h => h.1⟩\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulLeftInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulLeftInvariant ν\ninst✝ : SigmaFinite ν\n⊢ IsMulLeftInvariant (Measure.prod μ ν)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase map_mul_left_eq_self\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulLeftInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulLeftInvariant ν\ninst✝ : SigmaFinite ν\n⊢ ∀ (g : G × H), map (fun x => g * x) (Measure.prod μ ν) = Measure.prod μ ν\n[PROOFSTEP]\nrintro ⟨g, h⟩\n[GOAL]\ncase map_mul_left_eq_self.mk\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulLeftInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulLeftInvariant ν\ninst✝ : SigmaFinite ν\ng : G\nh : H\n⊢ map (fun x => (g, h) * x) (Measure.prod μ ν) = Measure.prod μ ν\n[PROOFSTEP]\nchange map (Prod.map (g * ·) (h * ·)) (μ.prod ν) = μ.prod ν\n[GOAL]\ncase map_mul_left_eq_self.mk\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulLeftInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulLeftInvariant ν\ninst✝ : SigmaFinite ν\ng : G\nh : H\n⊢ map (Prod.map (fun x => g * x) fun x => h * x) (Measure.prod μ ν) = Measure.prod μ ν\n[PROOFSTEP]\nrw [← map_prod_map _ _ (measurable_const_mul g) (measurable_const_mul h), map_mul_left_eq_self μ g,\n  map_mul_left_eq_self ν h]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulLeftInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulLeftInvariant ν\ninst✝ : SigmaFinite ν\ng : G\nh : H\n⊢ SigmaFinite (map (fun x => g * x) μ)\n[PROOFSTEP]\nrw [map_mul_left_eq_self μ g]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulLeftInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulLeftInvariant ν\ninst✝ : SigmaFinite ν\ng : G\nh : H\n⊢ SigmaFinite μ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulLeftInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulLeftInvariant ν\ninst✝ : SigmaFinite ν\ng : G\nh : H\n⊢ SigmaFinite (map (fun x => h * x) ν)\n[PROOFSTEP]\nrw [map_mul_left_eq_self ν h]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulLeftInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulLeftInvariant ν\ninst✝ : SigmaFinite ν\ng : G\nh : H\n⊢ SigmaFinite ν\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulRightInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulRightInvariant ν\ninst✝ : SigmaFinite ν\n⊢ IsMulRightInvariant (Measure.prod μ ν)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase map_mul_right_eq_self\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulRightInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulRightInvariant ν\ninst✝ : SigmaFinite ν\n⊢ ∀ (g : G × H), map (fun x => x * g) (Measure.prod μ ν) = Measure.prod μ ν\n[PROOFSTEP]\nrintro ⟨g, h⟩\n[GOAL]\ncase map_mul_right_eq_self.mk\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulRightInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulRightInvariant ν\ninst✝ : SigmaFinite ν\ng : G\nh : H\n⊢ map (fun x => x * (g, h)) (Measure.prod μ ν) = Measure.prod μ ν\n[PROOFSTEP]\nchange map (Prod.map (· * g) (· * h)) (μ.prod ν) = μ.prod ν\n[GOAL]\ncase map_mul_right_eq_self.mk\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulRightInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulRightInvariant ν\ninst✝ : SigmaFinite ν\ng : G\nh : H\n⊢ map (Prod.map (fun x => x * g) fun x => x * h) (Measure.prod μ ν) = Measure.prod μ ν\n[PROOFSTEP]\nrw [← map_prod_map _ _ (measurable_mul_const g) (measurable_mul_const h), map_mul_right_eq_self μ g,\n  map_mul_right_eq_self ν h]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulRightInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulRightInvariant ν\ninst✝ : SigmaFinite ν\ng : G\nh : H\n⊢ SigmaFinite (map (fun x => x * g) μ)\n[PROOFSTEP]\nrw [map_mul_right_eq_self μ g]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulRightInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulRightInvariant ν\ninst✝ : SigmaFinite ν\ng : G\nh : H\n⊢ SigmaFinite μ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulRightInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulRightInvariant ν\ninst✝ : SigmaFinite ν\ng : G\nh : H\n⊢ SigmaFinite (map (fun x => x * h) ν)\n[PROOFSTEP]\nrw [map_mul_right_eq_self ν h]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : MeasurableSpace H✝\ninst✝⁷ : Mul G\nμ : Measure G\ninst✝⁶ : MeasurableMul G\ninst✝⁵ : IsMulRightInvariant μ\ninst✝⁴ : SigmaFinite μ\nH : Type u_4\ninst✝³ : Mul H\nmH : MeasurableSpace H\nν : Measure H\ninst✝² : MeasurableMul H\ninst✝¹ : IsMulRightInvariant ν\ninst✝ : SigmaFinite ν\ng : G\nh : H\n⊢ SigmaFinite ν\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H✝\ninst✝⁵ : Mul G\nμ : Measure G\ninst✝⁴ : MeasurableMul G\nH : Type u_4\ninst✝³ : MeasurableSpace H\ninst✝² : Mul H\ninst✝¹ : MeasurableMul H\ninst✝ : IsMulLeftInvariant μ\nf : G →ₙ* H\nhf : Measurable ↑f\nh_surj : Surjective ↑f\n⊢ IsMulLeftInvariant (Measure.map (↑f) μ)\n[PROOFSTEP]\nrefine' ⟨fun h => _⟩\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H✝\ninst✝⁵ : Mul G\nμ : Measure G\ninst✝⁴ : MeasurableMul G\nH : Type u_4\ninst✝³ : MeasurableSpace H\ninst✝² : Mul H\ninst✝¹ : MeasurableMul H\ninst✝ : IsMulLeftInvariant μ\nf : G →ₙ* H\nhf : Measurable ↑f\nh_surj : Surjective ↑f\nh : H\n⊢ Measure.map (fun x => h * x) (Measure.map (↑f) μ) = Measure.map (↑f) μ\n[PROOFSTEP]\nrw [map_map (measurable_const_mul _) hf]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H✝\ninst✝⁵ : Mul G\nμ : Measure G\ninst✝⁴ : MeasurableMul G\nH : Type u_4\ninst✝³ : MeasurableSpace H\ninst✝² : Mul H\ninst✝¹ : MeasurableMul H\ninst✝ : IsMulLeftInvariant μ\nf : G →ₙ* H\nhf : Measurable ↑f\nh_surj : Surjective ↑f\nh : H\n⊢ Measure.map ((fun x => h * x) ∘ ↑f) μ = Measure.map (↑f) μ\n[PROOFSTEP]\nobtain ⟨g, rfl⟩ := h_surj h\n[GOAL]\ncase intro\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H✝\ninst✝⁵ : Mul G\nμ : Measure G\ninst✝⁴ : MeasurableMul G\nH : Type u_4\ninst✝³ : MeasurableSpace H\ninst✝² : Mul H\ninst✝¹ : MeasurableMul H\ninst✝ : IsMulLeftInvariant μ\nf : G →ₙ* H\nhf : Measurable ↑f\nh_surj : Surjective ↑f\ng : G\n⊢ Measure.map ((fun x => ↑f g * x) ∘ ↑f) μ = Measure.map (↑f) μ\n[PROOFSTEP]\nconv_rhs => rw [← map_mul_left_eq_self μ g]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H✝\ninst✝⁵ : Mul G\nμ : Measure G\ninst✝⁴ : MeasurableMul G\nH : Type u_4\ninst✝³ : MeasurableSpace H\ninst✝² : Mul H\ninst✝¹ : MeasurableMul H\ninst✝ : IsMulLeftInvariant μ\nf : G →ₙ* H\nhf : Measurable ↑f\nh_surj : Surjective ↑f\ng : G\n| Measure.map (↑f) μ\n[PROOFSTEP]\nrw [← map_mul_left_eq_self μ g]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H✝\ninst✝⁵ : Mul G\nμ : Measure G\ninst✝⁴ : MeasurableMul G\nH : Type u_4\ninst✝³ : MeasurableSpace H\ninst✝² : Mul H\ninst✝¹ : MeasurableMul H\ninst✝ : IsMulLeftInvariant μ\nf : G →ₙ* H\nhf : Measurable ↑f\nh_surj : Surjective ↑f\ng : G\n| Measure.map (↑f) μ\n[PROOFSTEP]\nrw [← map_mul_left_eq_self μ g]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H✝\ninst✝⁵ : Mul G\nμ : Measure G\ninst✝⁴ : MeasurableMul G\nH : Type u_4\ninst✝³ : MeasurableSpace H\ninst✝² : Mul H\ninst✝¹ : MeasurableMul H\ninst✝ : IsMulLeftInvariant μ\nf : G →ₙ* H\nhf : Measurable ↑f\nh_surj : Surjective ↑f\ng : G\n| Measure.map (↑f) μ\n[PROOFSTEP]\nrw [← map_mul_left_eq_self μ g]\n[GOAL]\ncase intro\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H✝\ninst✝⁵ : Mul G\nμ : Measure G\ninst✝⁴ : MeasurableMul G\nH : Type u_4\ninst✝³ : MeasurableSpace H\ninst✝² : Mul H\ninst✝¹ : MeasurableMul H\ninst✝ : IsMulLeftInvariant μ\nf : G →ₙ* H\nhf : Measurable ↑f\nh_surj : Surjective ↑f\ng : G\n⊢ Measure.map ((fun x => ↑f g * x) ∘ ↑f) μ = Measure.map (↑f) (Measure.map (fun x => g * x) μ)\n[PROOFSTEP]\nrw [map_map hf (measurable_const_mul _)]\n[GOAL]\ncase intro\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H✝\ninst✝⁵ : Mul G\nμ : Measure G\ninst✝⁴ : MeasurableMul G\nH : Type u_4\ninst✝³ : MeasurableSpace H\ninst✝² : Mul H\ninst✝¹ : MeasurableMul H\ninst✝ : IsMulLeftInvariant μ\nf : G →ₙ* H\nhf : Measurable ↑f\nh_surj : Surjective ↑f\ng : G\n⊢ Measure.map ((fun x => ↑f g * x) ∘ ↑f) μ = Measure.map (↑f ∘ fun x => g * x) μ\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase intro.e_f\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H✝\ninst✝⁵ : Mul G\nμ : Measure G\ninst✝⁴ : MeasurableMul G\nH : Type u_4\ninst✝³ : MeasurableSpace H\ninst✝² : Mul H\ninst✝¹ : MeasurableMul H\ninst✝ : IsMulLeftInvariant μ\nf : G →ₙ* H\nhf : Measurable ↑f\nh_surj : Surjective ↑f\ng : G\n⊢ (fun x => ↑f g * x) ∘ ↑f = ↑f ∘ fun x => g * x\n[PROOFSTEP]\next y\n[GOAL]\ncase intro.e_f.h\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H✝\ninst✝⁵ : Mul G\nμ : Measure G\ninst✝⁴ : MeasurableMul G\nH : Type u_4\ninst✝³ : MeasurableSpace H\ninst✝² : Mul H\ninst✝¹ : MeasurableMul H\ninst✝ : IsMulLeftInvariant μ\nf : G →ₙ* H\nhf : Measurable ↑f\nh_surj : Surjective ↑f\ng y : G\n⊢ ((fun x => ↑f g * x) ∘ ↑f) y = (↑f ∘ fun x => g * x) y\n[PROOFSTEP]\nsimp only [comp_apply, map_mul]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : DivInvMonoid G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\ng : G\n⊢ Measure.map (fun x => x / g) μ = μ\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, map_mul_right_eq_self μ g⁻¹]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\ng : G\n⊢ MeasurePreserving fun x => x / g\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, measurePreserving_mul_right μ g⁻¹]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\ng : G\nA : Set G\n⊢ ↑↑(Measure.map (fun h => g * h) μ) A = ↑↑μ A\n[PROOFSTEP]\nrw [map_mul_left_eq_self μ g]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set G\n⊢ ↑↑(Measure.map (fun h => h * g) μ) A = ↑↑μ A\n[PROOFSTEP]\nrw [map_mul_right_eq_self μ g]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\nt : G\np : G → Prop\n⊢ (∀ᵐ (x : G) ∂μ, p (t * x)) ↔ ∀ᵐ (x : G) ∂μ, p x\n[PROOFSTEP]\nconv_rhs => rw [Filter.Eventually, ← map_mul_left_ae μ t]; rfl\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\nt : G\np : G → Prop\n| ∀ᵐ (x : G) ∂μ, p x\n[PROOFSTEP]\nrw [Filter.Eventually, ← map_mul_left_ae μ t]; rfl\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\nt : G\np : G → Prop\n| ∀ᵐ (x : G) ∂μ, p x\n[PROOFSTEP]\nrw [Filter.Eventually, ← map_mul_left_ae μ t]; rfl\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\nt : G\np : G → Prop\n| ∀ᵐ (x : G) ∂μ, p x\n[PROOFSTEP]\nrw [Filter.Eventually, ← map_mul_left_ae μ t]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\nt : G\np : G → Prop\n| {x | p x} ∈ Filter.map (fun h => t * h) (ae μ)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\nt : G\np : G → Prop\n⊢ (∀ᵐ (x : G) ∂μ, p (x * t)) ↔ ∀ᵐ (x : G) ∂μ, p x\n[PROOFSTEP]\nconv_rhs => rw [Filter.Eventually, ← map_mul_right_ae μ t]; rfl\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\nt : G\np : G → Prop\n| ∀ᵐ (x : G) ∂μ, p x\n[PROOFSTEP]\nrw [Filter.Eventually, ← map_mul_right_ae μ t]; rfl\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\nt : G\np : G → Prop\n| ∀ᵐ (x : G) ∂μ, p x\n[PROOFSTEP]\nrw [Filter.Eventually, ← map_mul_right_ae μ t]; rfl\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\nt : G\np : G → Prop\n| ∀ᵐ (x : G) ∂μ, p x\n[PROOFSTEP]\nrw [Filter.Eventually, ← map_mul_right_ae μ t]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\nt : G\np : G → Prop\n| {x | p x} ∈ Filter.map (fun h => h * t) (ae μ)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\nt : G\np : G → Prop\n⊢ (∀ᵐ (x : G) ∂μ, p (x / t)) ↔ ∀ᵐ (x : G) ∂μ, p x\n[PROOFSTEP]\nconv_rhs => rw [Filter.Eventually, ← map_div_right_ae μ t]; rfl\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\nt : G\np : G → Prop\n| ∀ᵐ (x : G) ∂μ, p x\n[PROOFSTEP]\nrw [Filter.Eventually, ← map_div_right_ae μ t]; rfl\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\nt : G\np : G → Prop\n| ∀ᵐ (x : G) ∂μ, p x\n[PROOFSTEP]\nrw [Filter.Eventually, ← map_div_right_ae μ t]; rfl\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\nt : G\np : G → Prop\n| ∀ᵐ (x : G) ∂μ, p x\n[PROOFSTEP]\nrw [Filter.Eventually, ← map_div_right_ae μ t]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : Group G\ninst✝¹ : MeasurableMul G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\nt : G\np : G → Prop\n| {x | p x} ∈ Filter.map (fun t_1 => t_1 / t) (ae μ)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : MeasurableSpace G\ninst✝³ : MeasurableSpace H\ninst✝² : InvolutiveInv G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsInvInvariant μ\nA : Set G\n⊢ ↑↑μ A⁻¹ = ↑↑μ A\n[PROOFSTEP]\nrw [← inv_apply, inv_eq_self]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\n⊢ IsMulRightInvariant (Measure.inv μ)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase map_mul_right_eq_self\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\n⊢ ∀ (g : G), map (fun x => x * g) (Measure.inv μ) = Measure.inv μ\n[PROOFSTEP]\nintro g\n[GOAL]\ncase map_mul_right_eq_self\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ map (fun x => x * g) (Measure.inv μ) = Measure.inv μ\n[PROOFSTEP]\nconv_rhs => rw [← map_mul_left_eq_self μ g⁻¹]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\ng : G\n| Measure.inv μ\n[PROOFSTEP]\nrw [← map_mul_left_eq_self μ g⁻¹]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\ng : G\n| Measure.inv μ\n[PROOFSTEP]\nrw [← map_mul_left_eq_self μ g⁻¹]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\ng : G\n| Measure.inv μ\n[PROOFSTEP]\nrw [← map_mul_left_eq_self μ g⁻¹]\n[GOAL]\ncase map_mul_right_eq_self\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ map (fun x => x * g) (Measure.inv μ) = Measure.inv (map (fun x => g⁻¹ * x) μ)\n[PROOFSTEP]\nsimp_rw [Measure.inv, map_map (measurable_mul_const g) measurable_inv,\n  map_map measurable_inv (measurable_const_mul g⁻¹), Function.comp, mul_inv_rev, inv_inv]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\n⊢ IsMulLeftInvariant (Measure.inv μ)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase map_mul_left_eq_self\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\n⊢ ∀ (g : G), map (fun x => g * x) (Measure.inv μ) = Measure.inv μ\n[PROOFSTEP]\nintro g\n[GOAL]\ncase map_mul_left_eq_self\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\ng : G\n⊢ map (fun x => g * x) (Measure.inv μ) = Measure.inv μ\n[PROOFSTEP]\nconv_rhs => rw [← map_mul_right_eq_self μ g⁻¹]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\ng : G\n| Measure.inv μ\n[PROOFSTEP]\nrw [← map_mul_right_eq_self μ g⁻¹]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\ng : G\n| Measure.inv μ\n[PROOFSTEP]\nrw [← map_mul_right_eq_self μ g⁻¹]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\ng : G\n| Measure.inv μ\n[PROOFSTEP]\nrw [← map_mul_right_eq_self μ g⁻¹]\n[GOAL]\ncase map_mul_left_eq_self\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSpace H\ninst✝³ : DivisionMonoid G\ninst✝² : MeasurableMul G\ninst✝¹ : MeasurableInv G\nμ : Measure G\ninst✝ : IsMulRightInvariant μ\ng : G\n⊢ map (fun x => g * x) (Measure.inv μ) = Measure.inv (map (fun x => x * g⁻¹) μ)\n[PROOFSTEP]\nsimp_rw [Measure.inv, map_map (measurable_const_mul g) measurable_inv,\n  map_map measurable_inv (measurable_mul_const g⁻¹), Function.comp, mul_inv_rev, inv_inv]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : DivisionMonoid G\ninst✝³ : MeasurableMul G\ninst✝² : MeasurableInv G\nμ✝ μ : Measure G\ninst✝¹ : IsInvInvariant μ\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ MeasurePreserving fun t => g / t\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : DivisionMonoid G\ninst✝³ : MeasurableMul G\ninst✝² : MeasurableInv G\nμ✝ μ : Measure G\ninst✝¹ : IsInvInvariant μ\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ MeasurePreserving fun t => g * t⁻¹\n[PROOFSTEP]\nexact (measurePreserving_mul_left μ g).comp (measurePreserving_inv μ)\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\n⊢ Regular (Measure.inv μ) ↔ Regular μ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\n⊢ Regular (Measure.inv μ) → Regular μ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nh : Regular (Measure.inv μ)\n⊢ Regular μ\n[PROOFSTEP]\nrw [← μ.inv_inv]\n[GOAL]\ncase mp\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nh : Regular (Measure.inv μ)\n⊢ Regular (Measure.inv (Measure.inv μ))\n[PROOFSTEP]\nexact Measure.Regular.inv\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\n⊢ Regular μ → Regular (Measure.inv μ)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : T2Space G\nh : Regular μ\n⊢ Regular (Measure.inv μ)\n[PROOFSTEP]\nexact Measure.Regular.inv\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nh : ↑↑μ K ≠ 0\n⊢ IsOpenPosMeasure μ\n[PROOFSTEP]\nrefine' ⟨fun U hU hne => _⟩\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nh : ↑↑μ K ≠ 0\nU : Set G\nhU : IsOpen U\nhne : Set.Nonempty U\n⊢ ↑↑μ U ≠ 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nU : Set G\nhU : IsOpen U\nhne : Set.Nonempty U\nh : ↑↑μ U = 0\n⊢ ↑↑μ K = 0\n[PROOFSTEP]\nrw [← nonpos_iff_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nU : Set G\nhU : IsOpen U\nhne : Set.Nonempty U\nh : ↑↑μ U = 0\n⊢ ↑↑μ K ≤ 0\n[PROOFSTEP]\nrw [← hU.interior_eq] at hne \n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nU : Set G\nhU : IsOpen U\nhne : Set.Nonempty (interior U)\nh : ↑↑μ U = 0\n⊢ ↑↑μ K ≤ 0\n[PROOFSTEP]\nobtain ⟨t, hKt⟩ : ∃ t : Finset G, K ⊆ ⋃ (g : G) (_ : g ∈ t), (fun h : G => g * h) ⁻¹' U :=\n  compact_covered_by_mul_left_translates hK hne\n[GOAL]\ncase intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nU : Set G\nhU : IsOpen U\nhne : Set.Nonempty (interior U)\nh : ↑↑μ U = 0\nt : Finset G\nhKt : K ⊆ ⋃ (g : G) (_ : g ∈ t), (fun h => g * h) ⁻¹' U\n⊢ ↑↑μ K ≤ 0\n[PROOFSTEP]\ncalc\n  μ K ≤ μ (⋃ (g : G) (_ : g ∈ t), (fun h : G => g * h) ⁻¹' U) := measure_mono hKt\n  _ ≤ ∑ g in t, μ ((fun h : G => g * h) ⁻¹' U) := (measure_biUnion_finset_le _ _)\n  _ = 0 := by simp [measure_preimage_mul, h]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nU : Set G\nhU : IsOpen U\nhne : Set.Nonempty (interior U)\nh : ↑↑μ U = 0\nt : Finset G\nhKt : K ⊆ ⋃ (g : G) (_ : g ∈ t), (fun h => g * h) ⁻¹' U\n⊢ ∑ g in t, ↑↑μ ((fun h => g * h) ⁻¹' U) = 0\n[PROOFSTEP]\nsimp [measure_preimage_mul, h]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : BorelSpace G\nμ : Measure G\ninst✝³ : Group G\ninst✝² : TopologicalGroup G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : Regular μ\ns : Set G\nhs : IsOpen s\n⊢ ↑↑μ s = 0 ↔ s = ∅ ∨ μ = 0\n[PROOFSTEP]\nby_cases h3μ : μ = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : BorelSpace G\nμ : Measure G\ninst✝³ : Group G\ninst✝² : TopologicalGroup G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : Regular μ\ns : Set G\nhs : IsOpen s\nh3μ : μ = 0\n⊢ ↑↑μ s = 0 ↔ s = ∅ ∨ μ = 0\n[PROOFSTEP]\nsimp [h3μ]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : BorelSpace G\nμ : Measure G\ninst✝³ : Group G\ninst✝² : TopologicalGroup G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : Regular μ\ns : Set G\nhs : IsOpen s\nh3μ : ¬μ = 0\n⊢ ↑↑μ s = 0 ↔ s = ∅ ∨ μ = 0\n[PROOFSTEP]\nhaveI := isOpenPosMeasure_of_mulLeftInvariant_of_regular h3μ\n[GOAL]\ncase neg\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : BorelSpace G\nμ : Measure G\ninst✝³ : Group G\ninst✝² : TopologicalGroup G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : Regular μ\ns : Set G\nhs : IsOpen s\nh3μ : ¬μ = 0\nthis : IsOpenPosMeasure μ\n⊢ ↑↑μ s = 0 ↔ s = ∅ ∨ μ = 0\n[PROOFSTEP]\nsimp only [h3μ, or_false_iff, hs.measure_eq_zero_iff μ]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : MeasurableSpace H\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : BorelSpace G\nμ : Measure G\ninst✝³ : Group G\ninst✝² : TopologicalGroup G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : Regular μ\nhμ : μ ≠ 0\ns : Set G\nhs : IsOpen s\n⊢ ↑↑μ s ≠ 0 ↔ Set.Nonempty s\n[PROOFSTEP]\nsimpa [null_iff_of_isMulLeftInvariant (μ := μ) hs, hμ] using nonempty_iff_ne_empty.symm\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : IsMulLeftInvariant μ\nU : Set G\nhU : IsOpen U\nh'U : Set.Nonempty U\nh : ↑↑μ U ≠ ⊤\nK : Set G\nhK : IsCompact K\n⊢ ↑↑μ K < ⊤\n[PROOFSTEP]\nrw [← hU.interior_eq] at h'U \n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : IsMulLeftInvariant μ\nU : Set G\nhU : IsOpen U\nh'U : Set.Nonempty (interior U)\nh : ↑↑μ U ≠ ⊤\nK : Set G\nhK : IsCompact K\n⊢ ↑↑μ K < ⊤\n[PROOFSTEP]\nobtain ⟨t, hKt⟩ : ∃ t : Finset G, K ⊆ ⋃ (g : G) (_ : g ∈ t), (fun h : G => g * h) ⁻¹' U :=\n  compact_covered_by_mul_left_translates hK h'U\n[GOAL]\ncase intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : IsMulLeftInvariant μ\nU : Set G\nhU : IsOpen U\nh'U : Set.Nonempty (interior U)\nh : ↑↑μ U ≠ ⊤\nK : Set G\nhK : IsCompact K\nt : Finset G\nhKt : K ⊆ ⋃ (g : G) (_ : g ∈ t), (fun h => g * h) ⁻¹' U\n⊢ ↑↑μ K < ⊤\n[PROOFSTEP]\ncalc\n  μ K ≤ μ (⋃ (g : G) (_ : g ∈ t), (fun h : G => g * h) ⁻¹' U) := measure_mono hKt\n  _ ≤ ∑ g in t, μ ((fun h : G => g * h) ⁻¹' U) := (measure_biUnion_finset_le _ _)\n  _ = Finset.card t * μ U := by simp only [measure_preimage_mul, Finset.sum_const, nsmul_eq_mul]\n  _ < ∞ := ENNReal.mul_lt_top (ENNReal.nat_ne_top _) h\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : TopologicalSpace G\ninst✝³ : BorelSpace G\nμ : Measure G\ninst✝² : Group G\ninst✝¹ : TopologicalGroup G\ninst✝ : IsMulLeftInvariant μ\nU : Set G\nhU : IsOpen U\nh'U : Set.Nonempty (interior U)\nh : ↑↑μ U ≠ ⊤\nK : Set G\nhK : IsCompact K\nt : Finset G\nhKt : K ⊆ ⋃ (g : G) (_ : g ∈ t), (fun h => g * h) ⁻¹' U\n⊢ ∑ g in t, ↑↑μ ((fun h => g * h) ⁻¹' U) = ↑(Finset.card t) * ↑↑μ U\n[PROOFSTEP]\nsimp only [measure_preimage_mul, Finset.sum_const, nsmul_eq_mul]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\n⊢ ↑↑μ univ = ⊤\n[PROOFSTEP]\nobtain ⟨K, hK, Kclosed, Kint⟩ : ∃ K : Set G, IsCompact K ∧ IsClosed K ∧ (1 : G) ∈ interior K :=\n  by\n  rcases local_isCompact_isClosed_nhds_of_group (isOpen_univ.mem_nhds (mem_univ (1 : G))) with ⟨K, hK⟩\n  exact ⟨K, hK.1, hK.2.1, hK.2.2.2⟩\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\n⊢ ∃ K, IsCompact K ∧ IsClosed K ∧ 1 ∈ interior K\n[PROOFSTEP]\nrcases local_isCompact_isClosed_nhds_of_group (isOpen_univ.mem_nhds (mem_univ (1 : G))) with ⟨K, hK⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K ∧ IsClosed K ∧ K ⊆ univ ∧ 1 ∈ interior K\n⊢ ∃ K, IsCompact K ∧ IsClosed K ∧ 1 ∈ interior K\n[PROOFSTEP]\nexact ⟨K, hK.1, hK.2.1, hK.2.2.2⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\n⊢ ↑↑μ univ = ⊤\n[PROOFSTEP]\nhave K_pos : 0 < μ K := measure_pos_of_nonempty_interior _ ⟨_, Kint⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\n⊢ ↑↑μ univ = ⊤\n[PROOFSTEP]\nhave A : ∀ L : Set G, IsCompact L → ∃ g : G, Disjoint L (g • K) := fun L hL => exists_disjoint_smul_of_isCompact hL hK\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\nA : ∀ (L : Set G), IsCompact L → ∃ g, Disjoint L (g • K)\n⊢ ↑↑μ univ = ⊤\n[PROOFSTEP]\nchoose! g hg using A\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\n⊢ ↑↑μ univ = ⊤\n[PROOFSTEP]\nset L : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\n⊢ ↑↑μ univ = ⊤\n[PROOFSTEP]\nhave Lcompact : ∀ n, IsCompact (L n) := by\n  intro n\n  induction' n with n IH\n  · exact hK\n  · simp_rw [iterate_succ']\n    apply IsCompact.union IH (hK.smul (g (L n)))\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\n⊢ ∀ (n : ℕ), IsCompact (L n)\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nn : ℕ\n⊢ IsCompact (L n)\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\n⊢ IsCompact (L Nat.zero)\n[PROOFSTEP]\nexact hK\n[GOAL]\ncase succ\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nn : ℕ\nIH : IsCompact (L n)\n⊢ IsCompact (L (Nat.succ n))\n[PROOFSTEP]\nsimp_rw [iterate_succ']\n[GOAL]\ncase succ\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nn : ℕ\nIH : IsCompact (L n)\n⊢ IsCompact (((fun T => T ∪ g T • K) ∘ (fun T => T ∪ g T • K)^[n]) K)\n[PROOFSTEP]\napply IsCompact.union IH (hK.smul (g (L n)))\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\n⊢ ↑↑μ univ = ⊤\n[PROOFSTEP]\nhave Lclosed : ∀ n, IsClosed (L n) := by\n  intro n\n  induction' n with n IH\n  · exact Kclosed\n  · simp_rw [iterate_succ']\n    apply IsClosed.union IH (Kclosed.smul (g (L n)))\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\n⊢ ∀ (n : ℕ), IsClosed (L n)\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nn : ℕ\n⊢ IsClosed (L n)\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\n⊢ IsClosed (L Nat.zero)\n[PROOFSTEP]\nexact Kclosed\n[GOAL]\ncase succ\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nn : ℕ\nIH : IsClosed (L n)\n⊢ IsClosed (L (Nat.succ n))\n[PROOFSTEP]\nsimp_rw [iterate_succ']\n[GOAL]\ncase succ\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nn : ℕ\nIH : IsClosed (L n)\n⊢ IsClosed (((fun T => T ∪ g T • K) ∘ (fun T => T ∪ g T • K)^[n]) K)\n[PROOFSTEP]\napply IsClosed.union IH (Kclosed.smul (g (L n)))\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\n⊢ ↑↑μ univ = ⊤\n[PROOFSTEP]\nhave M : ∀ n, μ (L n) = (n + 1 : ℕ) * μ K := by\n  intro n\n  induction' n with n IH\n  · simp only [one_mul, Nat.cast_one, iterate_zero, id.def, Nat.zero_eq, Nat.zero_add]\n  ·\n    calc\n      μ (L (n + 1)) = μ (L n) + μ (g (L n) • K) := by\n        simp_rw [iterate_succ']\n        exact measure_union' (hg _ (Lcompact _)) (Lclosed _).measurableSet\n      _ = (n + 1 + 1 : ℕ) * μ K := by simp only [IH, measure_smul, add_mul, Nat.cast_add, Nat.cast_one, one_mul]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\n⊢ ∀ (n : ℕ), ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\nn : ℕ\n⊢ ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\n⊢ ↑↑μ (L Nat.zero) = ↑(Nat.zero + 1) * ↑↑μ K\n[PROOFSTEP]\nsimp only [one_mul, Nat.cast_one, iterate_zero, id.def, Nat.zero_eq, Nat.zero_add]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\nn : ℕ\nIH : ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\n⊢ ↑↑μ (L (Nat.succ n)) = ↑(Nat.succ n + 1) * ↑↑μ K\n[PROOFSTEP]\ncalc\n  μ (L (n + 1)) = μ (L n) + μ (g (L n) • K) := by\n    simp_rw [iterate_succ']\n    exact measure_union' (hg _ (Lcompact _)) (Lclosed _).measurableSet\n  _ = (n + 1 + 1 : ℕ) * μ K := by simp only [IH, measure_smul, add_mul, Nat.cast_add, Nat.cast_one, one_mul]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\nn : ℕ\nIH : ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\n⊢ ↑↑μ (L (n + 1)) = ↑↑μ (L n) + ↑↑μ (g (L n) • K)\n[PROOFSTEP]\nsimp_rw [iterate_succ']\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\nn : ℕ\nIH : ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\n⊢ ↑↑μ (((fun T => T ∪ g T • K) ∘ (fun T => T ∪ g T • K)^[n]) K) =\n    ↑↑μ ((fun T => T ∪ g T • K)^[n] K) + ↑↑μ (g ((fun T => T ∪ g T • K)^[n] K) • K)\n[PROOFSTEP]\nexact measure_union' (hg _ (Lcompact _)) (Lclosed _).measurableSet\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\nn : ℕ\nIH : ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\n⊢ ↑↑μ (L n) + ↑↑μ (g (L n) • K) = ↑(n + 1 + 1) * ↑↑μ K\n[PROOFSTEP]\nsimp only [IH, measure_smul, add_mul, Nat.cast_add, Nat.cast_one, one_mul]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\nM : ∀ (n : ℕ), ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\n⊢ ↑↑μ univ = ⊤\n[PROOFSTEP]\nhave N : Tendsto (fun n => μ (L n)) atTop (𝓝 (∞ * μ K)) :=\n  by\n  simp_rw [M]\n  apply ENNReal.Tendsto.mul_const _ (Or.inl ENNReal.top_ne_zero)\n  exact ENNReal.tendsto_nat_nhds_top.comp (tendsto_add_atTop_nat _)\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\nM : ∀ (n : ℕ), ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\n⊢ Tendsto (fun n => ↑↑μ (L n)) atTop (𝓝 (⊤ * ↑↑μ K))\n[PROOFSTEP]\nsimp_rw [M]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\nM : ∀ (n : ℕ), ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\n⊢ Tendsto (fun n => ↑(n + 1) * ↑↑μ K) atTop (𝓝 (⊤ * ↑↑μ K))\n[PROOFSTEP]\napply ENNReal.Tendsto.mul_const _ (Or.inl ENNReal.top_ne_zero)\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\nM : ∀ (n : ℕ), ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\n⊢ Tendsto (fun x => ↑(x + 1)) atTop (𝓝 ⊤)\n[PROOFSTEP]\nexact ENNReal.tendsto_nat_nhds_top.comp (tendsto_add_atTop_nat _)\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\nM : ∀ (n : ℕ), ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\nN : Tendsto (fun n => ↑↑μ (L n)) atTop (𝓝 (⊤ * ↑↑μ K))\n⊢ ↑↑μ univ = ⊤\n[PROOFSTEP]\nsimp only [ENNReal.top_mul', K_pos.ne', if_false] at N \n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\nM : ∀ (n : ℕ), ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\nN : Tendsto (fun n => ↑↑μ ((fun T => T ∪ g T • K)^[n] K)) atTop (𝓝 ⊤)\n⊢ ↑↑μ univ = ⊤\n[PROOFSTEP]\napply top_le_iff.1\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : BorelSpace G\nμ✝ : Measure G\ninst✝⁶ : Group G\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : IsMulLeftInvariant μ✝\ninst✝³ : LocallyCompactSpace G\ninst✝² : NoncompactSpace G\nμ : Measure G\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsMulLeftInvariant μ\nK : Set G\nhK : IsCompact K\nKclosed : IsClosed K\nKint : 1 ∈ interior K\nK_pos : 0 < ↑↑μ K\ng : Set G → G\nhg : ∀ (L : Set G), IsCompact L → Disjoint L (g L • K)\nL : ℕ → Set G := fun n => (fun T => T ∪ g T • K)^[n] K\nLcompact : ∀ (n : ℕ), IsCompact (L n)\nLclosed : ∀ (n : ℕ), IsClosed (L n)\nM : ∀ (n : ℕ), ↑↑μ (L n) = ↑(n + 1) * ↑↑μ K\nN : Tendsto (fun n => ↑↑μ ((fun T => T ∪ g T • K)^[n] K)) atTop (𝓝 ⊤)\n⊢ ⊤ ≤ ↑↑μ univ\n[PROOFSTEP]\nexact le_of_tendsto' N fun n => measure_mono (subset_univ _)\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝³ : MeasurableSpace G\ninst✝² : MeasurableSpace H\ninst✝¹ : CommSemigroup G\nμ : Measure G\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ Measure.map (fun x => x * g) μ = μ\n[PROOFSTEP]\nsimp_rw [mul_comm, map_mul_left_eq_self]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\nμ : Measure G\ninst✝² : IsHaarMeasure μ\ninst✝¹ : TopologicalGroup G\ninst✝ : BorelSpace G\ng : G\n⊢ ↑↑μ {g} = ↑↑μ {1}\n[PROOFSTEP]\nconvert measure_preimage_mul μ g⁻¹ _\n[GOAL]\ncase h.e'_2.h.e'_3\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSpace H\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\nμ : Measure G\ninst✝² : IsHaarMeasure μ\ninst✝¹ : TopologicalGroup G\ninst✝ : BorelSpace G\ng : G\n⊢ {g} = (fun h => g⁻¹ * h) ⁻¹' {1}\n[PROOFSTEP]\nsimp only [mul_one, preimage_mul_left_singleton, inv_inv]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝¹² : MeasurableSpace G\ninst✝¹¹ : MeasurableSpace H✝\ninst✝¹⁰ : Group G\ninst✝⁹ : TopologicalSpace G\nμ : Measure G\ninst✝⁸ : IsHaarMeasure μ\ninst✝⁷ : BorelSpace G\ninst✝⁶ : TopologicalGroup G\nH : Type u_4\ninst✝⁵ : Group H\ninst✝⁴ : TopologicalSpace H\ninst✝³ : MeasurableSpace H\ninst✝² : BorelSpace H\ninst✝¹ : T2Space H\ninst✝ : TopologicalGroup H\nf : G →* H\nhf : Continuous ↑f\nh_surj : Surjective ↑f\nh_prop : Tendsto (↑f) (cocompact G) (cocompact H)\n⊢ ∀ ⦃K : Set H⦄, IsCompact K → ↑↑(map (↑f) μ) K < ⊤\n[PROOFSTEP]\nintro K hK\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝¹² : MeasurableSpace G\ninst✝¹¹ : MeasurableSpace H✝\ninst✝¹⁰ : Group G\ninst✝⁹ : TopologicalSpace G\nμ : Measure G\ninst✝⁸ : IsHaarMeasure μ\ninst✝⁷ : BorelSpace G\ninst✝⁶ : TopologicalGroup G\nH : Type u_4\ninst✝⁵ : Group H\ninst✝⁴ : TopologicalSpace H\ninst✝³ : MeasurableSpace H\ninst✝² : BorelSpace H\ninst✝¹ : T2Space H\ninst✝ : TopologicalGroup H\nf : G →* H\nhf : Continuous ↑f\nh_surj : Surjective ↑f\nh_prop : Tendsto (↑f) (cocompact G) (cocompact H)\nK : Set H\nhK : IsCompact K\n⊢ ↑↑(map (↑f) μ) K < ⊤\n[PROOFSTEP]\nrw [map_apply hf.measurable hK.measurableSet]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝¹² : MeasurableSpace G\ninst✝¹¹ : MeasurableSpace H✝\ninst✝¹⁰ : Group G\ninst✝⁹ : TopologicalSpace G\nμ : Measure G\ninst✝⁸ : IsHaarMeasure μ\ninst✝⁷ : BorelSpace G\ninst✝⁶ : TopologicalGroup G\nH : Type u_4\ninst✝⁵ : Group H\ninst✝⁴ : TopologicalSpace H\ninst✝³ : MeasurableSpace H\ninst✝² : BorelSpace H\ninst✝¹ : T2Space H\ninst✝ : TopologicalGroup H\nf : G →* H\nhf : Continuous ↑f\nh_surj : Surjective ↑f\nh_prop : Tendsto (↑f) (cocompact G) (cocompact H)\nK : Set H\nhK : IsCompact K\n⊢ ↑↑μ (↑f ⁻¹' K) < ⊤\n[PROOFSTEP]\nexact IsCompact.measure_lt_top ((⟨⟨f, hf⟩, h_prop⟩ : CocompactMap G H).isCompact_preimage hK)\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\n⊢ NoAtoms μ\n[PROOFSTEP]\nsuffices H : μ {(1 : G)} ≤ 0\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H✝\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nH : ↑↑μ {1} ≤ 0\n⊢ NoAtoms μ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase measure_singleton\n𝕜 : Type u_1\nG : Type u_2\nH✝ : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H✝\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nH : ↑↑μ {1} ≤ 0\n⊢ ∀ (x : G), ↑↑μ {x} = 0\n[PROOFSTEP]\nsimp [le_bot_iff.1 H]\n[GOAL]\ncase H\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\n⊢ ↑↑μ {1} ≤ 0\n[PROOFSTEP]\nobtain ⟨K, K_compact, K_int⟩ : ∃ K : Set G, IsCompact K ∧ (1 : G) ∈ interior K :=\n  by\n  rcases exists_compact_subset isOpen_univ (mem_univ (1 : G)) with ⟨K, hK⟩\n  exact ⟨K, hK.1, hK.2.1⟩\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\n⊢ ∃ K, IsCompact K ∧ 1 ∈ interior K\n[PROOFSTEP]\nrcases exists_compact_subset isOpen_univ (mem_univ (1 : G)) with ⟨K, hK⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nhK : IsCompact K ∧ 1 ∈ interior K ∧ K ⊆ univ\n⊢ ∃ K, IsCompact K ∧ 1 ∈ interior K\n[PROOFSTEP]\nexact ⟨K, hK.1, hK.2.1⟩\n[GOAL]\ncase H.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\n⊢ ↑↑μ {1} ≤ 0\n[PROOFSTEP]\nhave K_inf : Set.Infinite K := infinite_of_mem_nhds (1 : G) (mem_interior_iff_mem_nhds.1 K_int)\n[GOAL]\ncase H.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\n⊢ ↑↑μ {1} ≤ 0\n[PROOFSTEP]\nhave μKlt : μ K ≠ ∞ := K_compact.measure_lt_top.ne\n[GOAL]\ncase H.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\n⊢ ↑↑μ {1} ≤ 0\n[PROOFSTEP]\nhave I : ∀ n : ℕ, μ {(1 : G)} ≤ μ K / n := by\n  intro n\n  obtain ⟨t, tK, tn⟩ : ∃ t : Finset G, ↑t ⊆ K ∧ t.card = n := K_inf.exists_subset_card_eq n\n  have A : μ t ≤ μ K := measure_mono tK\n  have B : μ t = n * μ {(1 : G)} := by\n    rw [← biUnion_of_singleton (t : Set G)]\n    change μ (⋃ x ∈ t, { x }) = n * μ {1}\n    rw [@measure_biUnion_finset G G _ μ t fun i => { i }]\n    · simp only [tn, Finset.sum_const, nsmul_eq_mul, haar_singleton]\n    · intro x _ y _ xy\n      simp only [onFun, xy.symm, mem_singleton_iff, not_false_iff, disjoint_singleton_right]\n    · intro b _; exact measurableSet_singleton b\n  rw [B] at A \n  rwa [ENNReal.le_div_iff_mul_le _ (Or.inr μKlt), mul_comm]\n  right\n  apply (measure_pos_of_nonempty_interior μ ⟨_, K_int⟩).ne'\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\n⊢ ∀ (n : ℕ), ↑↑μ {1} ≤ ↑↑μ K / ↑n\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\n⊢ ↑↑μ {1} ≤ ↑↑μ K / ↑n\n[PROOFSTEP]\nobtain ⟨t, tK, tn⟩ : ∃ t : Finset G, ↑t ⊆ K ∧ t.card = n := K_inf.exists_subset_card_eq n\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\n⊢ ↑↑μ {1} ≤ ↑↑μ K / ↑n\n[PROOFSTEP]\nhave A : μ t ≤ μ K := measure_mono tK\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑↑μ ↑t ≤ ↑↑μ K\n⊢ ↑↑μ {1} ≤ ↑↑μ K / ↑n\n[PROOFSTEP]\nhave B : μ t = n * μ {(1 : G)} := by\n  rw [← biUnion_of_singleton (t : Set G)]\n  change μ (⋃ x ∈ t, { x }) = n * μ {1}\n  rw [@measure_biUnion_finset G G _ μ t fun i => { i }]\n  · simp only [tn, Finset.sum_const, nsmul_eq_mul, haar_singleton]\n  · intro x _ y _ xy\n    simp only [onFun, xy.symm, mem_singleton_iff, not_false_iff, disjoint_singleton_right]\n  · intro b _; exact measurableSet_singleton b\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑↑μ ↑t ≤ ↑↑μ K\n⊢ ↑↑μ ↑t = ↑n * ↑↑μ {1}\n[PROOFSTEP]\nrw [← biUnion_of_singleton (t : Set G)]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑↑μ ↑t ≤ ↑↑μ K\n⊢ ↑↑μ (⋃ (x : G) (_ : x ∈ ↑t), {x}) = ↑n * ↑↑μ {1}\n[PROOFSTEP]\nchange μ (⋃ x ∈ t, { x }) = n * μ {1}\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑↑μ ↑t ≤ ↑↑μ K\n⊢ ↑↑μ (⋃ (x : G) (_ : x ∈ t), {x}) = ↑n * ↑↑μ {1}\n[PROOFSTEP]\nrw [@measure_biUnion_finset G G _ μ t fun i => { i }]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑↑μ ↑t ≤ ↑↑μ K\n⊢ ∑ p in t, ↑↑μ {p} = ↑n * ↑↑μ {1}\n[PROOFSTEP]\nsimp only [tn, Finset.sum_const, nsmul_eq_mul, haar_singleton]\n[GOAL]\ncase hd\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑↑μ ↑t ≤ ↑↑μ K\n⊢ PairwiseDisjoint ↑t fun i => {i}\n[PROOFSTEP]\nintro x _ y _ xy\n[GOAL]\ncase hd\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑↑μ ↑t ≤ ↑↑μ K\nx : G\na✝¹ : x ∈ ↑t\ny : G\na✝ : y ∈ ↑t\nxy : x ≠ y\n⊢ (Disjoint on fun i => {i}) x y\n[PROOFSTEP]\nsimp only [onFun, xy.symm, mem_singleton_iff, not_false_iff, disjoint_singleton_right]\n[GOAL]\ncase hm\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑↑μ ↑t ≤ ↑↑μ K\n⊢ ∀ (b : G), b ∈ t → MeasurableSet {b}\n[PROOFSTEP]\nintro b _\n[GOAL]\ncase hm\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑↑μ ↑t ≤ ↑↑μ K\nb : G\na✝ : b ∈ t\n⊢ MeasurableSet {b}\n[PROOFSTEP]\nexact measurableSet_singleton b\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑↑μ ↑t ≤ ↑↑μ K\nB : ↑↑μ ↑t = ↑n * ↑↑μ {1}\n⊢ ↑↑μ {1} ≤ ↑↑μ K / ↑n\n[PROOFSTEP]\nrw [B] at A \n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑n * ↑↑μ {1} ≤ ↑↑μ K\nB : ↑↑μ ↑t = ↑n * ↑↑μ {1}\n⊢ ↑↑μ {1} ≤ ↑↑μ K / ↑n\n[PROOFSTEP]\nrwa [ENNReal.le_div_iff_mul_le _ (Or.inr μKlt), mul_comm]\n[GOAL]\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑n * ↑↑μ {1} ≤ ↑↑μ K\nB : ↑↑μ ↑t = ↑n * ↑↑μ {1}\n⊢ ↑n ≠ 0 ∨ ↑↑μ K ≠ 0\n[PROOFSTEP]\nright\n[GOAL]\ncase h\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nn : ℕ\nt : Finset G\ntK : ↑t ⊆ K\ntn : Finset.card t = n\nA : ↑n * ↑↑μ {1} ≤ ↑↑μ K\nB : ↑↑μ ↑t = ↑n * ↑↑μ {1}\n⊢ ↑↑μ K ≠ 0\n[PROOFSTEP]\napply (measure_pos_of_nonempty_interior μ ⟨_, K_int⟩).ne'\n[GOAL]\ncase H.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nI : ∀ (n : ℕ), ↑↑μ {1} ≤ ↑↑μ K / ↑n\n⊢ ↑↑μ {1} ≤ 0\n[PROOFSTEP]\nhave J : Tendsto (fun n : ℕ => μ K / n) atTop (𝓝 (μ K / ∞)) :=\n  ENNReal.Tendsto.const_div ENNReal.tendsto_nat_nhds_top (Or.inr μKlt)\n[GOAL]\ncase H.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nI : ∀ (n : ℕ), ↑↑μ {1} ≤ ↑↑μ K / ↑n\nJ : Tendsto (fun n => ↑↑μ K / ↑n) atTop (𝓝 (↑↑μ K / ⊤))\n⊢ ↑↑μ {1} ≤ 0\n[PROOFSTEP]\nsimp only [ENNReal.div_top] at J \n[GOAL]\ncase H.intro.intro\n𝕜 : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝¹⁰ : MeasurableSpace G\ninst✝⁹ : MeasurableSpace H\ninst✝⁸ : Group G\ninst✝⁷ : TopologicalSpace G\nμ✝ : Measure G\ninst✝⁶ : IsHaarMeasure μ✝\ninst✝⁵ : TopologicalGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : T1Space G\ninst✝² : LocallyCompactSpace G\ninst✝¹ : NeBot (𝓝[{1}ᶜ] 1)\nμ : Measure G\ninst✝ : IsHaarMeasure μ\nK : Set G\nK_compact : IsCompact K\nK_int : 1 ∈ interior K\nK_inf : Set.Infinite K\nμKlt : ↑↑μ K ≠ ⊤\nI : ∀ (n : ℕ), ↑↑μ {1} ≤ ↑↑μ K / ↑n\nJ : Tendsto (fun n => ↑↑μ K / ↑n) atTop (𝓝 0)\n⊢ ↑↑μ {1} ≤ 0\n[PROOFSTEP]\nexact ge_of_tendsto' J I\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Group.Measure", "llama_tokens": 42215, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6150878414043816, "lm_q2_score": 0.6113819732941511, "lm_q1q2_score": 0.37605361822705063}}
{"text": "[GOAL]\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\nhp : p ∈ R[X]⁰\n⊢ ↑(taylor r) p ∈ R[X]⁰\n[PROOFSTEP]\nrw [mem_nonZeroDivisors_iff]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\nhp : p ∈ R[X]⁰\n⊢ ∀ (x : (fun x => R[X]) p), x * ↑(taylor r) p = 0 → x = 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\nhp : p ∈ R[X]⁰\nx : R[X]\nhx : x * ↑(taylor r) p = 0\n⊢ x = 0\n[PROOFSTEP]\nhave : x = taylor (r - r) x := by simp\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\nhp : p ∈ R[X]⁰\nx : R[X]\nhx : x * ↑(taylor r) p = 0\n⊢ x = ↑(taylor (r - r)) x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\nhp : p ∈ R[X]⁰\nx : R[X]\nhx : x * ↑(taylor r) p = 0\nthis : x = ↑(taylor (r - r)) x\n⊢ x = 0\n[PROOFSTEP]\nrwa [this, sub_eq_add_neg, ← taylor_taylor, ← taylor_mul, LinearMap.map_eq_zero_iff _ (taylor_injective _),\n  mul_right_mem_nonZeroDivisors_eq_zero_iff hp, LinearMap.map_eq_zero_iff _ (taylor_injective _)] at hx \n[GOAL]\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\n⊢ R[X]⁰ ≤\n    Submonoid.comap\n      {\n        toMonoidHom :=\n          { toOneHom := { toFun := ↑(taylor r), map_one' := (_ : ↑(taylor r) 1 = ↑Polynomial.C 1) },\n            map_mul' := (_ : ∀ (p q : R[X]), ↑(taylor r) (p * q) = ↑(taylor r) p * ↑(taylor r) q) },\n        map_zero' := (_ : ↑(taylor r) 0 = 0),\n        map_add' := (_ : ∀ (x y : R[X]), ↑(taylor r) (x + y) = ↑(taylor r) x + ↑(taylor r) y) }\n      R[X]⁰\n[PROOFSTEP]\nexact taylor_mem_nonZeroDivisors r\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\n⊢ ↑(laurentAux r) (↑(algebraMap R[X] (RatFunc R)) p) = ↑(algebraMap ((fun x => R[X]) p) (RatFunc R)) (↑(taylor r) p)\n[PROOFSTEP]\nrw [← mk_one, ← mk_one, mk_eq_div, laurentAux_div, mk_eq_div, taylor_one, map_one, map_one, map_one]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\n⊢ ↑(laurent r) X = X + ↑C r\n[PROOFSTEP]\nrw [← algebraMap_X, laurent_algebraMap, taylor_X, _root_.map_add, algebraMap_C]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\nx : R\n⊢ ↑(laurent r) (↑C x) = ↑C x\n[PROOFSTEP]\nrw [← algebraMap_C, laurent_algebraMap, taylor_C]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\n⊢ ↑(laurent 0) f = f\n[PROOFSTEP]\ninduction f using RatFunc.induction_on\n[GOAL]\ncase f\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\np✝ q✝ : R[X]\nhq✝ : q✝ ≠ 0\n⊢ ↑(laurent 0) (↑(algebraMap R[X] (RatFunc R)) p✝ / ↑(algebraMap R[X] (RatFunc R)) q✝) =\n    ↑(algebraMap R[X] (RatFunc R)) p✝ / ↑(algebraMap R[X] (RatFunc R)) q✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\n⊢ ↑(laurent r) (↑(laurent s) f) = ↑(laurent (r + s)) f\n[PROOFSTEP]\ninduction f using RatFunc.induction_on\n[GOAL]\ncase f\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf : RatFunc R\np✝ q✝ : R[X]\nhq✝ : q✝ ≠ 0\n⊢ ↑(laurent r) (↑(laurent s) (↑(algebraMap R[X] (RatFunc R)) p✝ / ↑(algebraMap R[X] (RatFunc R)) q✝)) =\n    ↑(laurent (r + s)) (↑(algebraMap R[X] (RatFunc R)) p✝ / ↑(algebraMap R[X] (RatFunc R)) q✝)\n[PROOFSTEP]\nsimp_rw [laurent_div, taylor_taylor]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nhdomain : IsDomain R\nr s : R\np q : R[X]\nf x✝¹ x✝ : RatFunc R\nh : ↑(laurent r) x✝¹ = ↑(laurent r) x✝\n⊢ x✝¹ = x✝\n[PROOFSTEP]\nsimpa [laurent_laurent] using congr_arg (laurent (-r)) h\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.Laurent", "llama_tokens": 1931, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802603710086, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.37602876428695514}}
{"text": "[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\ne : u ⟶ v\n⊢ (u ⟶ v) = (u' ⟶ v')\n[PROOFSTEP]\n{rw [hu, hv]\n}\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\ne : u ⟶ v\n⊢ (u ⟶ v) = (u' ⟶ v')\n[PROOFSTEP]\nrw [hu, hv]\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\ne : u ⟶ v\n⊢ cast hu hv e = _root_.cast (_ : (u ⟶ v) = (u' ⟶ v')) e\n[PROOFSTEP]\nsubst_vars\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu' v' : U\ne : u' ⟶ v'\n⊢ cast (_ : u' = u') (_ : v' = v') e = _root_.cast (_ : (u' ⟶ v') = (u' ⟶ v')) e\n[PROOFSTEP]\nrfl\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' u'' v'' : U\ne : u ⟶ v\nhu : u = u'\nhv : v = v'\nhu' : u' = u''\nhv' : v' = v''\n⊢ cast hu' hv' (cast hu hv e) = cast (_ : u = u'') (_ : v = v'') e\n[PROOFSTEP]\nsubst_vars\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu'' v'' : U\ne : u'' ⟶ v''\n⊢ cast (_ : u'' = u'') (_ : v'' = v'') (cast (_ : u'' = u'') (_ : v'' = v'') e) = cast (_ : u'' = u'') (_ : v'' = v'') e\n[PROOFSTEP]\nrfl\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\ne : u ⟶ v\n⊢ HEq (cast hu hv e) e\n[PROOFSTEP]\nsubst_vars\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu' v' : U\ne : u' ⟶ v'\n⊢ HEq (cast (_ : u' = u') (_ : v' = v') e) e\n[PROOFSTEP]\nrfl\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\ne : u ⟶ v\ne' : u' ⟶ v'\n⊢ cast hu hv e = e' ↔ HEq e e'\n[PROOFSTEP]\nrw [Hom.cast_eq_cast]\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\ne : u ⟶ v\ne' : u' ⟶ v'\n⊢ _root_.cast (_ : (u ⟶ v) = (u' ⟶ v')) e = e' ↔ HEq e e'\n[PROOFSTEP]\nexact _root_.cast_eq_iff_heq\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\ne : u ⟶ v\ne' : u' ⟶ v'\n⊢ e' = cast hu hv e ↔ HEq e' e\n[PROOFSTEP]\nrw [eq_comm, Hom.cast_eq_iff_heq]\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\ne : u ⟶ v\ne' : u' ⟶ v'\n⊢ HEq e e' ↔ HEq e' e\n[PROOFSTEP]\nexact ⟨HEq.symm, HEq.symm⟩\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\np : Path u v\n⊢ Path u v = Path u' v'\n[PROOFSTEP]\nrw [hu, hv]\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\np : Path u v\n⊢ cast hu hv p = _root_.cast (_ : Path u v = Path u' v') p\n[PROOFSTEP]\nsubst_vars\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu' v' : U\np : Path u' v'\n⊢ cast (_ : u' = u') (_ : v' = v') p = _root_.cast (_ : Path u' v' = Path u' v') p\n[PROOFSTEP]\nrfl\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' u'' v'' : U\np : Path u v\nhu : u = u'\nhv : v = v'\nhu' : u' = u''\nhv' : v' = v''\n⊢ cast hu' hv' (cast hu hv p) = cast (_ : u = u'') (_ : v = v'') p\n[PROOFSTEP]\nsubst_vars\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu'' v'' : U\np : Path u'' v''\n⊢ cast (_ : u'' = u'') (_ : v'' = v'') (cast (_ : u'' = u'') (_ : v'' = v'') p) = cast (_ : u'' = u'') (_ : v'' = v'') p\n[PROOFSTEP]\nrfl\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu u' : U\nhu : u = u'\n⊢ cast hu hu nil = nil\n[PROOFSTEP]\nsubst_vars\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu' : U\n⊢ cast (_ : u' = u') (_ : u' = u') nil = nil\n[PROOFSTEP]\nrfl\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\np : Path u v\n⊢ HEq (cast hu hv p) p\n[PROOFSTEP]\nrw [Path.cast_eq_cast]\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\np : Path u v\n⊢ HEq (_root_.cast (_ : Path u v = Path u' v') p) p\n[PROOFSTEP]\nexact _root_.cast_heq _ _\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\np : Path u v\np' : Path u' v'\n⊢ cast hu hv p = p' ↔ HEq p p'\n[PROOFSTEP]\nrw [Path.cast_eq_cast]\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v u' v' : U\nhu : u = u'\nhv : v = v'\np : Path u v\np' : Path u' v'\n⊢ _root_.cast (_ : Path u v = Path u' v') p = p' ↔ HEq p p'\n[PROOFSTEP]\nexact _root_.cast_eq_iff_heq\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v w u' w' : U\np : Path u v\ne : v ⟶ w\nhu : u = u'\nhw : w = w'\n⊢ cast hu hw (cons p e) = cons (cast hu (_ : v = v) p) (Hom.cast (_ : v = v) hw e)\n[PROOFSTEP]\nsubst_vars\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nv u' w' : U\np : Path u' v\ne : v ⟶ w'\n⊢ cast (_ : u' = u') (_ : w' = w') (cons p e) =\n    cons (cast (_ : u' = u') (_ : v = v) p) (Hom.cast (_ : v = v) (_ : w' = w') e)\n[PROOFSTEP]\nrfl\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v v' w : U\np : Path u v\np' : Path u v'\ne : v ⟶ w\ne' : v' ⟶ w\nh : cons p e = cons p' e'\n⊢ Path.cast (_ : u = u) (_ : v = v') p = p'\n[PROOFSTEP]\nrw [Path.cast_eq_iff_heq]\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v v' w : U\np : Path u v\np' : Path u v'\ne : v ⟶ w\ne' : v' ⟶ w\nh : cons p e = cons p' e'\n⊢ HEq p p'\n[PROOFSTEP]\nexact heq_of_cons_eq_cons h\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v v' w : U\np : Path u v\np' : Path u v'\ne : v ⟶ w\ne' : v' ⟶ w\nh : cons p e = cons p' e'\n⊢ Hom.cast (_ : v = v') (_ : w = w) e = e'\n[PROOFSTEP]\nrw [Hom.cast_eq_iff_heq]\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v v' w : U\np : Path u v\np' : Path u v'\ne : v ⟶ w\ne' : v' ⟶ w\nh : cons p e = cons p' e'\n⊢ HEq e e'\n[PROOFSTEP]\nexact hom_heq_of_cons_eq_cons h\n[GOAL]\nU : Type u_1\ninst✝ : Quiver U\nu v : U\np : Path u v\nhzero : length p = 0\n⊢ Path.cast (_ : u = v) (_ : v = v) p = nil\n[PROOFSTEP]\ncases p\n[GOAL]\ncase nil\nU : Type u_1\ninst✝ : Quiver U\nu : U\nhzero : length nil = 0\n⊢ Path.cast (_ : u = u) (_ : u = u) nil = nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nU : Type u_1\ninst✝ : Quiver U\nu v b✝ : U\na✝¹ : Path u b✝\na✝ : b✝ ⟶ v\nhzero : length (cons a✝¹ a✝) = 0\n⊢ Path.cast (_ : u = v) (_ : v = v) (cons a✝¹ a✝) = nil\n[PROOFSTEP]\nsimp only [Nat.succ_ne_zero, length_cons] at hzero \n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Quiver.Cast", "llama_tokens": 3013, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6187804337438501, "lm_q2_score": 0.6076631698328916, "lm_q1q2_score": 0.37601007979935946}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{v}\n⊢ lift (succ a) = succ (lift a)\n[PROOFSTEP]\nrw [← add_one_eq_succ, lift_add, lift_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{v}\n⊢ lift a + 1 = succ (lift a)\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ b c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\na : α\n⊢ ↑f (Sum.inl a) = Sum.inl a\n[PROOFSTEP]\nsimpa only [InitialSeg.trans_apply, InitialSeg.leAdd_apply] using\n  @InitialSeg.eq _ _ _ _ _ ((InitialSeg.leAdd r s₁).trans f) (InitialSeg.leAdd r s₂) a\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\n⊢ (b : β₁) → { b' // ↑f (Sum.inr b) = Sum.inr b' }\n[PROOFSTEP]\nintro b\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nb : β₁\n⊢ { b' // ↑f (Sum.inr b) = Sum.inr b' }\n[PROOFSTEP]\ncases e : f (Sum.inr b)\n[GOAL]\ncase inl\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nb : β₁\nval✝ : α\ne : ↑f (Sum.inr b) = Sum.inl val✝\n⊢ { b' // Sum.inl val✝ = Sum.inr b' }\n[PROOFSTEP]\nrw [← fl] at e \n[GOAL]\ncase inl\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nb : β₁\nval✝ : α\ne : ↑f (Sum.inr b) = ↑f (Sum.inl val✝)\n⊢ { b' // Sum.inl val✝ = Sum.inr b' }\n[PROOFSTEP]\nhave := f.inj' e\n[GOAL]\ncase inl\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nb : β₁\nval✝ : α\ne : ↑f (Sum.inr b) = ↑f (Sum.inl val✝)\nthis : Sum.inr b = Sum.inl val✝\n⊢ { b' // Sum.inl val✝ = Sum.inr b' }\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nb : β₁\nval✝ : β₂\ne : ↑f (Sum.inr b) = Sum.inr val✝\n⊢ { b' // Sum.inr val✝ = Sum.inr b' }\n[PROOFSTEP]\nexact ⟨_, rfl⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nthis : (b : β₁) → { b' // ↑f (Sum.inr b) = Sum.inr b' }\ng : β₁ → β₂ := fun b => ↑(this b)\nfr : ∀ (b : β₁), ↑f (Sum.inr b) = Sum.inr (g b)\nx y : β₁\nh : g x = g y\n⊢ x = y\n[PROOFSTEP]\ninjection f.inj' (by rw [fr, fr, h] : f (Sum.inr x) = f (Sum.inr y))\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nthis : (b : β₁) → { b' // ↑f (Sum.inr b) = Sum.inr b' }\ng : β₁ → β₂ := fun b => ↑(this b)\nfr : ∀ (b : β₁), ↑f (Sum.inr b) = Sum.inr (g b)\nx y : β₁\nh : g x = g y\n⊢ ↑f (Sum.inr x) = ↑f (Sum.inr y)\n[PROOFSTEP]\nrw [fr, fr, h]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nthis : (b : β₁) → { b' // ↑f (Sum.inr b) = Sum.inr b' }\ng : β₁ → β₂ := fun b => ↑(this b)\nfr : ∀ (b : β₁), ↑f (Sum.inr b) = Sum.inr (g b)\na b : β₁\n⊢ s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n      (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n    s₁ a b\n[PROOFSTEP]\nsimpa only [Sum.lex_inr_inr, fr, InitialSeg.coe_coe_fn, Embedding.coeFn_mk] using\n  @RelEmbedding.map_rel_iff _ _ _ _ f.toRelEmbedding (Sum.inr a) (Sum.inr b)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nthis : (b : β₁) → { b' // ↑f (Sum.inr b) = Sum.inr b' }\ng : β₁ → β₂ := fun b => ↑(this b)\nfr : ∀ (b : β₁), ↑f (Sum.inr b) = Sum.inr (g b)\na : β₁\nb : β₂\nH :\n  s₂ b\n    (↑{ toEmbedding := { toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) },\n          map_rel_iff' :=\n            (_ :\n              ∀ (a b : β₁),\n                s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n                    (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n                  s₁ a b) }\n      a)\n⊢ ∃ a',\n    ↑{ toEmbedding := { toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) },\n            map_rel_iff' :=\n              (_ :\n                ∀ (a b : β₁),\n                  s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n                      (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n                    s₁ a b) }\n        a' =\n      b\n[PROOFSTEP]\nrcases f.init (by rw [fr] <;> exact Sum.lex_inr_inr.2 H) with ⟨a' | a', h⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nthis : (b : β₁) → { b' // ↑f (Sum.inr b) = Sum.inr b' }\ng : β₁ → β₂ := fun b => ↑(this b)\nfr : ∀ (b : β₁), ↑f (Sum.inr b) = Sum.inr (g b)\na : β₁\nb : β₂\nH :\n  s₂ b\n    (↑{ toEmbedding := { toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) },\n          map_rel_iff' :=\n            (_ :\n              ∀ (a b : β₁),\n                s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n                    (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n                  s₁ a b) }\n      a)\n⊢ Sum.Lex r s₂ ?m.57687 (↑f ?m.57686)\n[PROOFSTEP]\nrw [fr]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nthis : (b : β₁) → { b' // ↑f (Sum.inr b) = Sum.inr b' }\ng : β₁ → β₂ := fun b => ↑(this b)\nfr : ∀ (b : β₁), ↑f (Sum.inr b) = Sum.inr (g b)\na : β₁\nb : β₂\nH :\n  s₂ b\n    (↑{ toEmbedding := { toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) },\n          map_rel_iff' :=\n            (_ :\n              ∀ (a b : β₁),\n                s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n                    (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n                  s₁ a b) }\n      a)\n⊢ Sum.Lex r s₂ ?m.57687 (Sum.inr (g ?m.57775))\n[PROOFSTEP]\nexact Sum.lex_inr_inr.2 H\n[GOAL]\ncase intro.inl\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nthis : (b : β₁) → { b' // ↑f (Sum.inr b) = Sum.inr b' }\ng : β₁ → β₂ := fun b => ↑(this b)\nfr : ∀ (b : β₁), ↑f (Sum.inr b) = Sum.inr (g b)\na : β₁\nb : β₂\nH :\n  s₂ b\n    (↑{ toEmbedding := { toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) },\n          map_rel_iff' :=\n            (_ :\n              ∀ (a b : β₁),\n                s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n                    (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n                  s₁ a b) }\n      a)\na' : α\nh : ↑f (Sum.inl a') = Sum.inr b\n⊢ ∃ a',\n    ↑{ toEmbedding := { toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) },\n            map_rel_iff' :=\n              (_ :\n                ∀ (a b : β₁),\n                  s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n                      (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n                    s₁ a b) }\n        a' =\n      b\n[PROOFSTEP]\nrw [fl] at h \n[GOAL]\ncase intro.inl\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nthis : (b : β₁) → { b' // ↑f (Sum.inr b) = Sum.inr b' }\ng : β₁ → β₂ := fun b => ↑(this b)\nfr : ∀ (b : β₁), ↑f (Sum.inr b) = Sum.inr (g b)\na : β₁\nb : β₂\nH :\n  s₂ b\n    (↑{ toEmbedding := { toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) },\n          map_rel_iff' :=\n            (_ :\n              ∀ (a b : β₁),\n                s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n                    (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n                  s₁ a b) }\n      a)\na' : α\nh : Sum.inl a' = Sum.inr b\n⊢ ∃ a',\n    ↑{ toEmbedding := { toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) },\n            map_rel_iff' :=\n              (_ :\n                ∀ (a b : β₁),\n                  s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n                      (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n                    s₁ a b) }\n        a' =\n      b\n[PROOFSTEP]\ncases h\n[GOAL]\ncase intro.inr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nthis : (b : β₁) → { b' // ↑f (Sum.inr b) = Sum.inr b' }\ng : β₁ → β₂ := fun b => ↑(this b)\nfr : ∀ (b : β₁), ↑f (Sum.inr b) = Sum.inr (g b)\na : β₁\nb : β₂\nH :\n  s₂ b\n    (↑{ toEmbedding := { toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) },\n          map_rel_iff' :=\n            (_ :\n              ∀ (a b : β₁),\n                s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n                    (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n                  s₁ a b) }\n      a)\na' : β₁\nh : ↑f (Sum.inr a') = Sum.inr b\n⊢ ∃ a',\n    ↑{ toEmbedding := { toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) },\n            map_rel_iff' :=\n              (_ :\n                ∀ (a b : β₁),\n                  s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n                      (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n                    s₁ a b) }\n        a' =\n      b\n[PROOFSTEP]\nrw [fr] at h \n[GOAL]\ncase intro.inr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ b✝ c : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nhr : IsWellOrder α r\nβ₁ : Type u\ns₁ : β₁ → β₁ → Prop\nhs₁ : IsWellOrder β₁ s₁\nβ₂ : Type u\ns₂ : β₂ → β₂ → Prop\nhs₂ : IsWellOrder β₂ s₂\nx✝ : type r + type s₁ ≤ type r + type s₂\nf : Sum.Lex r s₁ ≼i Sum.Lex r s₂\nfl : ∀ (a : α), ↑f (Sum.inl a) = Sum.inl a\nthis : (b : β₁) → { b' // ↑f (Sum.inr b) = Sum.inr b' }\ng : β₁ → β₂ := fun b => ↑(this b)\nfr : ∀ (b : β₁), ↑f (Sum.inr b) = Sum.inr (g b)\na : β₁\nb : β₂\nH :\n  s₂ b\n    (↑{ toEmbedding := { toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) },\n          map_rel_iff' :=\n            (_ :\n              ∀ (a b : β₁),\n                s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n                    (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n                  s₁ a b) }\n      a)\na' : β₁\nh : Sum.inr (g a') = Sum.inr b\n⊢ ∃ a',\n    ↑{ toEmbedding := { toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) },\n            map_rel_iff' :=\n              (_ :\n                ∀ (a b : β₁),\n                  s₂ (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } a)\n                      (↑{ toFun := g, inj' := (_ : ∀ (x y : β₁), g x = g y → x = y) } b) ↔\n                    s₁ a b) }\n        a' =\n      b\n[PROOFSTEP]\nexact ⟨a', Sum.inr.inj h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\n⊢ a + b = a + c ↔ b = c\n[PROOFSTEP]\nsimp only [le_antisymm_iff, add_le_add_iff_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\n⊢ a + b < a + c ↔ b < c\n[PROOFSTEP]\nrw [← not_le, ← not_le, add_le_add_iff_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\n⊢ a + ↑0 ≤ b + ↑0 ↔ a ≤ b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nn : ℕ\n⊢ a + ↑(n + 1) ≤ b + ↑(n + 1) ↔ a ≤ b\n[PROOFSTEP]\nsimp only [nat_cast_succ, add_succ, add_succ, succ_le_succ_iff, add_le_add_iff_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nn : ℕ\n⊢ a + ↑n = b + ↑n ↔ a = b\n[PROOFSTEP]\nsimp only [le_antisymm_iff, add_le_add_iff_right]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\nx✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\nx✝ : IsWellOrder β s\n⊢ type r + type s = 0 ↔ type r = 0 ∧ type s = 0\n[PROOFSTEP]\nsimp_rw [← type_sum_lex, type_eq_zero_iff_isEmpty]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\nx✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\nx✝ : IsWellOrder β s\n⊢ IsEmpty (α ⊕ β) ↔ IsEmpty α ∧ IsEmpty β\n[PROOFSTEP]\nexact isEmpty_sum\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\n⊢ pred (succ o) = o\n[PROOFSTEP]\nhave h : ∃ a, succ o = succ a := ⟨_, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nh : ∃ a, succ o = succ a\n⊢ pred (succ o) = o\n[PROOFSTEP]\nsimpa only [pred, dif_pos h] using (succ_injective <| Classical.choose_spec h).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nh : ∃ a, o = succ a\n⊢ pred o ≤ o\n[PROOFSTEP]\nlet ⟨a, e⟩ := h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nh : ∃ a, o = succ a\na : Ordinal.{u_4}\ne : o = succ a\n⊢ pred o ≤ o\n[PROOFSTEP]\nrw [e, pred_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nh : ∃ a, o = succ a\na : Ordinal.{u_4}\ne : o = succ a\n⊢ a ≤ succ a\n[PROOFSTEP]\nexact le_succ a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nh : ¬∃ a, o = succ a\n⊢ pred o ≤ o\n[PROOFSTEP]\nrw [pred, dif_neg h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\ne : pred o = o\nx✝ : ∃ a, o = succ a\na : Ordinal.{u_4}\ne' : o = succ a\n⊢ False\n[PROOFSTEP]\nrw [e', pred_succ] at e \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nx✝ : ∃ a, o = succ a\na : Ordinal.{u_4}\ne : a = succ a\ne' : o = succ a\n⊢ False\n[PROOFSTEP]\nexact (lt_succ a).ne e\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\n⊢ pred o = o ↔ ∀ (a : Ordinal.{u_4}), o ≠ succ a\n[PROOFSTEP]\nsimpa using pred_eq_iff_not_succ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\n⊢ pred o < o ↔ ¬pred o = o\n[PROOFSTEP]\nsimp only [le_antisymm_iff, pred_le_self, true_and_iff, not_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nx✝ : ∃ a, o = succ a\na : Ordinal.{u_4}\ne : o = succ a\n⊢ succ (pred o) = o\n[PROOFSTEP]\nsimp only [e, pred_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : ∃ a, b = succ a\n⊢ a < pred b ↔ succ a < b\n[PROOFSTEP]\nlet ⟨c, e⟩ := h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : ∃ a, b = succ a\nc : Ordinal.{u_4}\ne : b = succ c\n⊢ a < pred b ↔ succ a < b\n[PROOFSTEP]\nrw [e, pred_succ, succ_lt_succ_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : ¬∃ a, b = succ a\n⊢ a < pred b ↔ succ a < b\n[PROOFSTEP]\nsimp only [pred, dif_neg h, succ_lt_of_not_succ h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{v}\nx✝ : ∃ a, lift o = succ a\na : Ordinal.{max v u}\nh : lift o = succ a\nb : Ordinal.{v}\ne : lift b = a\n⊢ lift o = lift (succ b)\n[PROOFSTEP]\nrw [h, ← e, lift_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{v}\nx✝ : ∃ a, o = succ a\na : Ordinal.{v}\nh : o = succ a\n⊢ lift o = succ (lift a)\n[PROOFSTEP]\nsimp only [h, lift_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{v}\nh : ∃ a, o = succ a\n⊢ lift (pred o) = pred (lift o)\n[PROOFSTEP]\ncases' h with a e\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no a : Ordinal.{v}\ne : o = succ a\n⊢ lift (pred o) = pred (lift o)\n[PROOFSTEP]\nsimp only [e, pred_succ, lift_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{v}\nh : ¬∃ a, o = succ a\n⊢ lift (pred o) = pred (lift o)\n[PROOFSTEP]\nrw [pred_eq_iff_not_succ.2 h, pred_eq_iff_not_succ.2 (mt lift_is_succ.1 h)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nh : IsLimit o\na : Ordinal.{u_4}\n⊢ a < o ↔ ∃ x, x < o ∧ a < x\n[PROOFSTEP]\nsimpa only [not_ball, not_le, bex_def] using not_congr (@limit_le _ h a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\n⊢ lift o = 0 ↔ o = 0\n[PROOFSTEP]\nsimpa only [lift_zero] using @lift_inj o 0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nH : ∀ (a : Ordinal.{max u_4 u_5}), a < lift o → succ a < lift o\na : Ordinal.{u_4}\nh : a < o\n⊢ lift (succ a) < lift o\n[PROOFSTEP]\nsimpa only [lift_succ] using H _ (lift_lt.2 h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nH : ∀ (a : Ordinal.{u_4}), a < o → succ a < o\na : Ordinal.{max u_4 u_5}\nh : a < lift o\n⊢ succ a < lift o\n[PROOFSTEP]\nobtain ⟨a', rfl⟩ := lift_down h.le\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nH : ∀ (a : Ordinal.{u_4}), a < o → succ a < o\na' : Ordinal.{u_4}\nh : lift a' < lift o\n⊢ succ (lift a') < lift o\n[PROOFSTEP]\nrw [← lift_succ, lift_lt]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nH : ∀ (a : Ordinal.{u_4}), a < o → succ a < o\na' : Ordinal.{u_4}\nh : lift a' < lift o\n⊢ succ a' < o\n[PROOFSTEP]\nexact H a' (lift_lt.1 h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nh : IsLimit o\n⊢ 1 < o\n[PROOFSTEP]\nsimpa only [succ_zero] using h.2 _ h.pos\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{?u.99300} → Sort u_4\no✝ : Ordinal.{?u.99300}\nH₁ : C 0\nH₂ : (o : Ordinal.{?u.99300}) → C o → C (succ o)\nH₃ : (o : Ordinal.{?u.99300}) → IsLimit o → ((o' : Ordinal.{?u.99300}) → o' < o → C o') → C o\no : Ordinal.{?u.99300}\nIH : (y : Ordinal.{?u.99300}) → y < o → C y\no0 : o = 0\n⊢ C o\n[PROOFSTEP]\nrw [o0]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{?u.99300} → Sort u_4\no✝ : Ordinal.{?u.99300}\nH₁ : C 0\nH₂ : (o : Ordinal.{?u.99300}) → C o → C (succ o)\nH₃ : (o : Ordinal.{?u.99300}) → IsLimit o → ((o' : Ordinal.{?u.99300}) → o' < o → C o') → C o\no : Ordinal.{?u.99300}\nIH : (y : Ordinal.{?u.99300}) → y < o → C y\no0 : o = 0\n⊢ C 0\n[PROOFSTEP]\nexact H₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{?u.99300} → Sort u_4\no✝ : Ordinal.{?u.99300}\nH₁ : C 0\nH₂ : (o : Ordinal.{?u.99300}) → C o → C (succ o)\nH₃ : (o : Ordinal.{?u.99300}) → IsLimit o → ((o' : Ordinal.{?u.99300}) → o' < o → C o') → C o\no : Ordinal.{?u.99300}\nIH : (y : Ordinal.{?u.99300}) → y < o → C y\no0 : ¬o = 0\nh : ∃ a, o = succ a\n⊢ C o\n[PROOFSTEP]\nrw [← succ_pred_iff_is_succ.2 h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{?u.99300} → Sort u_4\no✝ : Ordinal.{?u.99300}\nH₁ : C 0\nH₂ : (o : Ordinal.{?u.99300}) → C o → C (succ o)\nH₃ : (o : Ordinal.{?u.99300}) → IsLimit o → ((o' : Ordinal.{?u.99300}) → o' < o → C o') → C o\no : Ordinal.{?u.99300}\nIH : (y : Ordinal.{?u.99300}) → y < o → C y\no0 : ¬o = 0\nh : ∃ a, o = succ a\n⊢ C (succ (pred o))\n[PROOFSTEP]\nexact H₂ _ (IH _ <| pred_lt_iff_is_succ.2 h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\n⊢ limitRecOn 0 H₁ H₂ H₃ = H₁\n[PROOFSTEP]\nrw [limitRecOn, lt_wf.fix_eq, dif_pos rfl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\n⊢ Eq.mpr (_ : C 0 = C 0) H₁ = H₁\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\no : Ordinal.{u_4}\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\n⊢ limitRecOn (succ o) H₁ H₂ H₃ = H₂ o (limitRecOn o H₁ H₂ H₃)\n[PROOFSTEP]\nhave h : ∃ a, succ o = succ a := ⟨_, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\no : Ordinal.{u_4}\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\nh : ∃ a, succ o = succ a\n⊢ limitRecOn (succ o) H₁ H₂ H₃ = H₂ o (limitRecOn o H₁ H₂ H₃)\n[PROOFSTEP]\nrw [limitRecOn, lt_wf.fix_eq, dif_neg (succ_ne_zero o), dif_pos h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\no : Ordinal.{u_4}\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\nh : ∃ a, succ o = succ a\n⊢ Eq.mpr (_ : C (succ o) = C (succ (pred (succ o))))\n      (H₂ (pred (succ o))\n        ((fun y x =>\n            WellFounded.fix lt_wf\n              (fun o IH =>\n                if o0 : o = 0 then Eq.mpr (_ : C o = C 0) H₁\n                else\n                  if h : ∃ a, o = succ a then\n                    Eq.mpr (_ : C o = C (succ (pred o))) (H₂ (pred o) (IH (pred o) (_ : pred o < o)))\n                  else H₃ o (_ : o ≠ 0 ∧ ∀ (a : Ordinal.{u_4}), a < o → succ a < o) IH)\n              y)\n          (pred (succ o)) (_ : pred (succ o) < succ o))) =\n    H₂ o (limitRecOn o H₁ H₂ H₃)\n[PROOFSTEP]\ngeneralize limitRecOn.proof_2 (succ o) h = h₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\no : Ordinal.{u_4}\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\nh : ∃ a, succ o = succ a\nh₂ : C (succ o) = C (succ (pred (succ o)))\n⊢ Eq.mpr h₂\n      (H₂ (pred (succ o))\n        ((fun y x =>\n            WellFounded.fix lt_wf\n              (fun o IH =>\n                if o0 : o = 0 then Eq.mpr (_ : C o = C 0) H₁\n                else\n                  if h : ∃ a, o = succ a then\n                    Eq.mpr (_ : C o = C (succ (pred o))) (H₂ (pred o) (IH (pred o) (_ : pred o < o)))\n                  else H₃ o (_ : o ≠ 0 ∧ ∀ (a : Ordinal.{u_4}), a < o → succ a < o) IH)\n              y)\n          (pred (succ o)) (_ : pred (succ o) < succ o))) =\n    H₂ o (limitRecOn o H₁ H₂ H₃)\n[PROOFSTEP]\ngeneralize limitRecOn.proof_3 (succ o) h = h₃\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\no : Ordinal.{u_4}\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\nh : ∃ a, succ o = succ a\nh₂ : C (succ o) = C (succ (pred (succ o)))\nh₃ : pred (succ o) < succ o\n⊢ Eq.mpr h₂\n      (H₂ (pred (succ o))\n        ((fun y x =>\n            WellFounded.fix lt_wf\n              (fun o IH =>\n                if o0 : o = 0 then Eq.mpr (_ : C o = C 0) H₁\n                else\n                  if h : ∃ a, o = succ a then\n                    Eq.mpr (_ : C o = C (succ (pred o))) (H₂ (pred o) (IH (pred o) (_ : pred o < o)))\n                  else H₃ o (_ : o ≠ 0 ∧ ∀ (a : Ordinal.{u_4}), a < o → succ a < o) IH)\n              y)\n          (pred (succ o)) h₃)) =\n    H₂ o (limitRecOn o H₁ H₂ H₃)\n[PROOFSTEP]\nrevert h₂ h₃\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\no : Ordinal.{u_4}\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\nh : ∃ a, succ o = succ a\n⊢ ∀ (h₂ : C (succ o) = C (succ (pred (succ o)))) (h₃ : pred (succ o) < succ o),\n    Eq.mpr h₂\n        (H₂ (pred (succ o))\n          ((fun y x =>\n              WellFounded.fix lt_wf\n                (fun o IH =>\n                  if o0 : o = 0 then Eq.mpr (_ : C o = C 0) H₁\n                  else\n                    if h : ∃ a, o = succ a then\n                      Eq.mpr (_ : C o = C (succ (pred o))) (H₂ (pred o) (IH (pred o) (_ : pred o < o)))\n                    else H₃ o (_ : o ≠ 0 ∧ ∀ (a : Ordinal.{u_4}), a < o → succ a < o) IH)\n                y)\n            (pred (succ o)) h₃)) =\n      H₂ o (limitRecOn o H₁ H₂ H₃)\n[PROOFSTEP]\ngeneralize e : pred (succ o) = o'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\no : Ordinal.{u_4}\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\nh : ∃ a, succ o = succ a\no' : Ordinal.{u_4}\ne : pred (succ o) = o'\n⊢ ∀ (h₂ : C (succ o) = C (succ o')) (h₃ : o' < succ o),\n    Eq.mpr h₂\n        (H₂ o'\n          ((fun y x =>\n              WellFounded.fix lt_wf\n                (fun o IH =>\n                  if o0 : o = 0 then Eq.mpr (_ : C o = C 0) H₁\n                  else\n                    if h : ∃ a, o = succ a then\n                      Eq.mpr (_ : C o = C (succ (pred o))) (H₂ (pred o) (IH (pred o) (_ : pred o < o)))\n                    else H₃ o (_ : o ≠ 0 ∧ ∀ (a : Ordinal.{u_4}), a < o → succ a < o) IH)\n                y)\n            o' h₃)) =\n      H₂ o (limitRecOn o H₁ H₂ H₃)\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\no : Ordinal.{u_4}\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\nh : ∃ a, succ o = succ a\no' : Ordinal.{u_4}\ne : pred (succ o) = o'\nh₂✝ : C (succ o) = C (succ o')\nh₃✝ : o' < succ o\n⊢ Eq.mpr h₂✝\n      (H₂ o'\n        ((fun y x =>\n            WellFounded.fix lt_wf\n              (fun o IH =>\n                if o0 : o = 0 then Eq.mpr (_ : C o = C 0) H₁\n                else\n                  if h : ∃ a, o = succ a then\n                    Eq.mpr (_ : C o = C (succ (pred o))) (H₂ (pred o) (IH (pred o) (_ : pred o < o)))\n                  else H₃ o (_ : o ≠ 0 ∧ ∀ (a : Ordinal.{u_4}), a < o → succ a < o) IH)\n              y)\n          o' h₃✝)) =\n    H₂ o (limitRecOn o H₁ H₂ H₃)\n[PROOFSTEP]\nrw [pred_succ] at e \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\no : Ordinal.{u_4}\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\nh : ∃ a, succ o = succ a\no' : Ordinal.{u_4}\ne : o = o'\nh₂✝ : C (succ o) = C (succ o')\nh₃✝ : o' < succ o\n⊢ Eq.mpr h₂✝\n      (H₂ o'\n        ((fun y x =>\n            WellFounded.fix lt_wf\n              (fun o IH =>\n                if o0 : o = 0 then Eq.mpr (_ : C o = C 0) H₁\n                else\n                  if h : ∃ a, o = succ a then\n                    Eq.mpr (_ : C o = C (succ (pred o))) (H₂ (pred o) (IH (pred o) (_ : pred o < o)))\n                  else H₃ o (_ : o ≠ 0 ∧ ∀ (a : Ordinal.{u_4}), a < o → succ a < o) IH)\n              y)\n          o' h₃✝)) =\n    H₂ o (limitRecOn o H₁ H₂ H₃)\n[PROOFSTEP]\nsubst o'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\no : Ordinal.{u_4}\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\nh : ∃ a, succ o = succ a\nh₂✝ : C (succ o) = C (succ o)\nh₃✝ : o < succ o\n⊢ Eq.mpr h₂✝\n      (H₂ o\n        ((fun y x =>\n            WellFounded.fix lt_wf\n              (fun o IH =>\n                if o0 : o = 0 then Eq.mpr (_ : C o = C 0) H₁\n                else\n                  if h : ∃ a, o = succ a then\n                    Eq.mpr (_ : C o = C (succ (pred o))) (H₂ (pred o) (IH (pred o) (_ : pred o < o)))\n                  else H₃ o (_ : o ≠ 0 ∧ ∀ (a : Ordinal.{u_4}), a < o → succ a < o) IH)\n              y)\n          o h₃✝)) =\n    H₂ o (limitRecOn o H₁ H₂ H₃)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\no : Ordinal.{u_4}\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\nh : IsLimit o\n⊢ limitRecOn o H₁ H₂ H₃ = H₃ o h fun x _h => limitRecOn x H₁ H₂ H₃\n[PROOFSTEP]\nrw [limitRecOn, lt_wf.fix_eq, dif_neg h.1, dif_neg (not_succ_of_isLimit h)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nC : Ordinal.{u_4} → Sort u_5\no : Ordinal.{u_4}\nH₁ : C 0\nH₂ : (o : Ordinal.{u_4}) → C o → C (succ o)\nH₃ : (o : Ordinal.{u_4}) → IsLimit o → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o\nh : IsLimit o\n⊢ (H₃ o (_ : o ≠ 0 ∧ ∀ (a : Ordinal.{u_4}), a < o → succ a < o) fun y x =>\n      WellFounded.fix lt_wf\n        (fun o IH =>\n          if o0 : o = 0 then Eq.mpr (_ : C o = C 0) H₁\n          else\n            if h : ∃ a, o = succ a then\n              Eq.mpr (_ : C o = C (succ (pred o))) (H₂ (pred o) (IH (pred o) (_ : pred o < o)))\n            else H₃ o (_ : o ≠ 0 ∧ ∀ (a : Ordinal.{u_4}), a < o → succ a < o) IH)\n        y) =\n    H₃ o h fun x _h => limitRecOn x H₁ H₂ H₃\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{?u.103711}\n⊢ o < type fun x x_1 => x < x_1\n[PROOFSTEP]\nrw [type_lt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{?u.103711}\n⊢ o < succ o\n[PROOFSTEP]\nexact lt_succ o\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα : Type u_4\nr : α → α → Prop\nwo : IsWellOrder α r\nh : ∀ (a : Ordinal.{u_4}), a < type r → succ a < type r\nx : α\n⊢ ∃ y, r x y\n[PROOFSTEP]\nuse enum r (succ (typein r x)) (h _ (typein_lt_type r x))\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα : Type u_4\nr : α → α → Prop\nwo : IsWellOrder α r\nh : ∀ (a : Ordinal.{u_4}), a < type r → succ a < type r\nx : α\n⊢ r x (enum r (succ (typein r x)) (_ : succ (typein r x) < type r))\n[PROOFSTEP]\nconvert (enum_lt_enum (typein_lt_type r x) (h _ (typein_lt_type r x))).mpr (lt_succ _)\n[GOAL]\ncase h.e'_1\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα : Type u_4\nr : α → α → Prop\nwo : IsWellOrder α r\nh : ∀ (a : Ordinal.{u_4}), a < type r → succ a < type r\nx : α\n⊢ x = enum r (typein r x) (_ : typein r x < type r)\n[PROOFSTEP]\nrw [enum_typein]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nho : ∀ (a : Ordinal.{u_4}), a < o → succ a < o\n⊢ ∀ (a : Ordinal.{u_4}), (a < type fun a b => a < b) → succ a < type fun a b => a < b\n[PROOFSTEP]\nrwa [type_lt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhr : IsLimit (type r)\nx : α\n⊢ Bounded r {x}\n[PROOFSTEP]\nrefine' ⟨enum r (succ (typein r x)) (hr.2 _ (typein_lt_type r x)), _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhr : IsLimit (type r)\nx : α\n⊢ ∀ (b : α), b ∈ {x} → r b (enum r (succ (typein r x)) (_ : succ (typein r x) < type r))\n[PROOFSTEP]\nintro b hb\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhr : IsLimit (type r)\nx b : α\nhb : b ∈ {x}\n⊢ r b (enum r (succ (typein r x)) (_ : succ (typein r x) < type r))\n[PROOFSTEP]\nrw [mem_singleton_iff.1 hb]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhr : IsLimit (type r)\nx b : α\nhb : b ∈ {x}\n⊢ r x (enum r (succ (typein r x)) (_ : succ (typein r x) < type r))\n[PROOFSTEP]\nnth_rw 1 [← enum_typein r x]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhr : IsLimit (type r)\nx b : α\nhb : b ∈ {x}\n⊢ r (enum r (typein r x) (_ : typein r x < type r)) (enum r (succ (typein r x)) (_ : succ (typein r x) < type r))\n[PROOFSTEP]\nrw [@enum_lt_enum _ r]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhr : IsLimit (type r)\nx b : α\nhb : b ∈ {x}\n⊢ typein r x < succ (typein r x)\n[PROOFSTEP]\napply lt_succ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\n⊢ type (Subrel (fun x x_1 => x < x_1) {o' | o' < o}) = lift o\n[PROOFSTEP]\nrefine' Quotient.inductionOn o _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\n⊢ ∀ (a : WellOrder),\n    type (Subrel (fun x x_1 => x < x_1) {o' | o' < Quotient.mk isEquivalent a}) = lift (Quotient.mk isEquivalent a)\n[PROOFSTEP]\nrintro ⟨α, r, wo⟩\n[GOAL]\ncase mk\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nwo : IsWellOrder α r\n⊢ type (Subrel (fun x x_1 => x < x_1) {o' | o' < Quotient.mk isEquivalent { α := α, r := r, wo := wo }}) =\n    lift (Quotient.mk isEquivalent { α := α, r := r, wo := wo })\n[PROOFSTEP]\nskip\n[GOAL]\ncase mk\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nwo : IsWellOrder α r\n⊢ type (Subrel (fun x x_1 => x < x_1) {o' | o' < Quotient.mk isEquivalent { α := α, r := r, wo := wo }}) =\n    lift (Quotient.mk isEquivalent { α := α, r := r, wo := wo })\n[PROOFSTEP]\napply Quotient.sound\n[GOAL]\ncase mk.a\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nwo : IsWellOrder α r\n⊢ { α := ↑{o' | o' < Quotient.mk isEquivalent { α := α, r := r, wo := wo }},\n      r := Subrel (fun x x_1 => x < x_1) {o' | o' < Quotient.mk isEquivalent { α := α, r := r, wo := wo }},\n      wo :=\n        (_ :\n          IsWellOrder (↑{o' | o' < Quotient.mk isEquivalent { α := α, r := r, wo := wo }})\n            (Subrel (fun x x_1 => x < x_1) {o' | o' < Quotient.mk isEquivalent { α := α, r := r, wo := wo }})) } ≈\n    { α := ULift { α := α, r := r, wo := wo }.α, r := ULift.down ⁻¹'o { α := α, r := r, wo := wo }.r,\n      wo := (_ : IsWellOrder (ULift { α := α, r := r, wo := wo }.α) (ULift.down ⁻¹'o { α := α, r := r, wo := wo }.r)) }\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.a.val\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nwo : IsWellOrder α r\n⊢ Subrel (fun x x_1 => x < x_1) {o' | o' < Quotient.mk isEquivalent { α := α, r := r, wo := wo }} ≃r\n    ULift.down ⁻¹'o { α := α, r := r, wo := wo }.r\n[PROOFSTEP]\nrefine' ((RelIso.preimage Equiv.ulift r).trans (enumIso r).symm).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\n⊢ #↑{o' | o' < o} = Cardinal.lift (card o)\n[PROOFSTEP]\nrw [lift_card, ← type_subrel_lt, card_type]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\nH : IsNormal f\no : Ordinal.{u_4}\nh : IsLimit o\na : Ordinal.{u_5}\n⊢ ¬a < f o ↔ ¬∃ b, b < o ∧ a < f b\n[PROOFSTEP]\nsimpa only [exists_prop, not_exists, not_and, not_lt] using H.2 _ h a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\nH : IsNormal f\na b : Ordinal.{u_4}\n⊢ f a = f b ↔ a = b\n[PROOFSTEP]\nsimp only [le_antisymm_iff, H.le_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\np0 : Set.Nonempty p\nb : Ordinal.{u_4}\nH₂ : ∀ (o : Ordinal.{u_4}), b ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\n⊢ f b ≤ o\n[PROOFSTEP]\ninduction b using limitRecOn with\n| H₁ =>\n  cases' p0 with x px\n  have := Ordinal.le_zero.1 ((H₂ _).1 (Ordinal.zero_le _) _ px)\n  rw [this] at px \n  exact h _ px\n| H₂ S _ =>\n  rcases not_ball.1 (mt (H₂ S).2 <| (lt_succ S).not_le) with ⟨a, h₁, h₂⟩\n  exact (H.le_iff.2 <| succ_le_of_lt <| not_le.1 h₂).trans (h _ h₁)\n| H₃ S L _ =>\n  refine' (H.2 _ L _).2 fun a h' => _\n  rcases not_ball.1 (mt (H₂ a).2 h'.not_le) with ⟨b, h₁, h₂⟩\n  exact (H.le_iff.2 <| (not_le.1 h₂).le).trans (h _ h₁)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\np0 : Set.Nonempty p\nb : Ordinal.{u_4}\nH₂ : ∀ (o : Ordinal.{u_4}), b ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\n⊢ f b ≤ o\n[PROOFSTEP]\ninduction b using limitRecOn with\n| H₁ =>\n  cases' p0 with x px\n  have := Ordinal.le_zero.1 ((H₂ _).1 (Ordinal.zero_le _) _ px)\n  rw [this] at px \n  exact h _ px\n| H₂ S _ =>\n  rcases not_ball.1 (mt (H₂ S).2 <| (lt_succ S).not_le) with ⟨a, h₁, h₂⟩\n  exact (H.le_iff.2 <| succ_le_of_lt <| not_le.1 h₂).trans (h _ h₁)\n| H₃ S L _ =>\n  refine' (H.2 _ L _).2 fun a h' => _\n  rcases not_ball.1 (mt (H₂ a).2 h'.not_le) with ⟨b, h₁, h₂⟩\n  exact (H.le_iff.2 <| (not_le.1 h₂).le).trans (h _ h₁)\n[GOAL]\ncase H₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\np0 : Set.Nonempty p\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\nH₂ : ∀ (o : Ordinal.{u_4}), 0 ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\n⊢ f 0 ≤ o\n[PROOFSTEP]\n\n| H₁ =>\n  cases' p0 with x px\n  have := Ordinal.le_zero.1 ((H₂ _).1 (Ordinal.zero_le _) _ px)\n  rw [this] at px \n  exact h _ px\n[GOAL]\ncase H₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\np0 : Set.Nonempty p\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\nH₂ : ∀ (o : Ordinal.{u_4}), 0 ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\n⊢ f 0 ≤ o\n[PROOFSTEP]\ncases' p0 with x px\n[GOAL]\ncase H₁.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\nH₂ : ∀ (o : Ordinal.{u_4}), 0 ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\nx : Ordinal.{u_4}\npx : x ∈ p\n⊢ f 0 ≤ o\n[PROOFSTEP]\nhave := Ordinal.le_zero.1 ((H₂ _).1 (Ordinal.zero_le _) _ px)\n[GOAL]\ncase H₁.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\nH₂ : ∀ (o : Ordinal.{u_4}), 0 ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\nx : Ordinal.{u_4}\npx : x ∈ p\nthis : x = 0\n⊢ f 0 ≤ o\n[PROOFSTEP]\nrw [this] at px \n[GOAL]\ncase H₁.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\nH₂ : ∀ (o : Ordinal.{u_4}), 0 ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\nx : Ordinal.{u_4}\npx : 0 ∈ p\nthis : x = 0\n⊢ f 0 ≤ o\n[PROOFSTEP]\nexact h _ px\n[GOAL]\ncase H₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\np0 : Set.Nonempty p\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\nS : Ordinal.{u_4}\na✝ : (∀ (o : Ordinal.{u_4}), S ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o) → f S ≤ o\nH₂ : ∀ (o : Ordinal.{u_4}), succ S ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\n⊢ f (succ S) ≤ o\n[PROOFSTEP]\n\n| H₂ S _ =>\n  rcases not_ball.1 (mt (H₂ S).2 <| (lt_succ S).not_le) with ⟨a, h₁, h₂⟩\n  exact (H.le_iff.2 <| succ_le_of_lt <| not_le.1 h₂).trans (h _ h₁)\n[GOAL]\ncase H₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\np0 : Set.Nonempty p\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\nS : Ordinal.{u_4}\na✝ : (∀ (o : Ordinal.{u_4}), S ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o) → f S ≤ o\nH₂ : ∀ (o : Ordinal.{u_4}), succ S ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\n⊢ f (succ S) ≤ o\n[PROOFSTEP]\nrcases not_ball.1 (mt (H₂ S).2 <| (lt_succ S).not_le) with ⟨a, h₁, h₂⟩\n[GOAL]\ncase H₂.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\np0 : Set.Nonempty p\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\nS : Ordinal.{u_4}\na✝ : (∀ (o : Ordinal.{u_4}), S ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o) → f S ≤ o\nH₂ : ∀ (o : Ordinal.{u_4}), succ S ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\na : Ordinal.{u_4}\nh₁ : a ∈ p\nh₂ : ¬a ≤ S\n⊢ f (succ S) ≤ o\n[PROOFSTEP]\nexact (H.le_iff.2 <| succ_le_of_lt <| not_le.1 h₂).trans (h _ h₁)\n[GOAL]\ncase H₃\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\np0 : Set.Nonempty p\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\nS : Ordinal.{u_4}\nL : IsLimit S\na✝ : ∀ (o' : Ordinal.{u_4}), o' < S → (∀ (o : Ordinal.{u_4}), o' ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o) → f o' ≤ o\nH₂ : ∀ (o : Ordinal.{u_4}), S ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\n⊢ f S ≤ o\n[PROOFSTEP]\n\n| H₃ S L _ =>\n  refine' (H.2 _ L _).2 fun a h' => _\n  rcases not_ball.1 (mt (H₂ a).2 h'.not_le) with ⟨b, h₁, h₂⟩\n  exact (H.le_iff.2 <| (not_le.1 h₂).le).trans (h _ h₁)\n[GOAL]\ncase H₃\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\np0 : Set.Nonempty p\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\nS : Ordinal.{u_4}\nL : IsLimit S\na✝ : ∀ (o' : Ordinal.{u_4}), o' < S → (∀ (o : Ordinal.{u_4}), o' ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o) → f o' ≤ o\nH₂ : ∀ (o : Ordinal.{u_4}), S ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\n⊢ f S ≤ o\n[PROOFSTEP]\nrefine' (H.2 _ L _).2 fun a h' => _\n[GOAL]\ncase H₃\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\np0 : Set.Nonempty p\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\nS : Ordinal.{u_4}\nL : IsLimit S\na✝ : ∀ (o' : Ordinal.{u_4}), o' < S → (∀ (o : Ordinal.{u_4}), o' ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o) → f o' ≤ o\nH₂ : ∀ (o : Ordinal.{u_4}), S ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\na : Ordinal.{u_4}\nh' : a < S\n⊢ f a ≤ o\n[PROOFSTEP]\nrcases not_ball.1 (mt (H₂ a).2 h'.not_le) with ⟨b, h₁, h₂⟩\n[GOAL]\ncase H₃.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set Ordinal.{u_4}\np0 : Set.Nonempty p\nh : ∀ (a : Ordinal.{u_4}), a ∈ p → f a ≤ o\nS : Ordinal.{u_4}\nL : IsLimit S\na✝ : ∀ (o' : Ordinal.{u_4}), o' < S → (∀ (o : Ordinal.{u_4}), o' ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o) → f o' ≤ o\nH₂ : ∀ (o : Ordinal.{u_4}), S ≤ o ↔ ∀ (a : Ordinal.{u_4}), a ∈ p → a ≤ o\na : Ordinal.{u_4}\nh' : a < S\nb : Ordinal.{u_4}\nh₁ : b ∈ p\nh₂ : ¬b ≤ a\n⊢ f a ≤ o\n[PROOFSTEP]\nexact (H.le_iff.2 <| (not_le.1 h₂).le).trans (h _ h₁)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u_4} → Ordinal.{u_5}\no : Ordinal.{u_5}\nH : IsNormal f\np : Set α\np0 : Set.Nonempty p\ng : α → Ordinal.{u_4}\nb : Ordinal.{u_4}\nH₂ : ∀ (o : Ordinal.{u_4}), b ≤ o ↔ ∀ (a : α), a ∈ p → g a ≤ o\n⊢ f b ≤ o ↔ ∀ (a : α), a ∈ p → f (g a) ≤ o\n[PROOFSTEP]\nsimpa [H₂] using H.le_set (g '' p) (p0.image g) b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nh : IsLimit b\nH : ∀ (b' : Ordinal.{u_4}), b' < b → a + b' ≤ c\n⊢ ¬c < a + b\n[PROOFSTEP]\ninduction a using inductionOn with\n| H α r =>\n  induction b using inductionOn with\n  | H β s =>\n    intro l\n    suffices ∀ x : β, Sum.Lex r s (Sum.inr x) (enum _ _ l) by\n      -- Porting note: `revert` & `intro` is required because `cases'` doesn't replace\n                  --               `enum _ _ l` in `this`.\n      revert this; cases' enum _ _ l with x x <;> intro this\n      · cases this (enum s 0 h.pos)\n      · exact irrefl _ (this _)\n    intro x\n    rw [← typein_lt_typein (Sum.Lex r s), typein_enum]\n    have := H _ (h.2 _ (typein_lt_type s x))\n    rw [add_succ, succ_le_iff] at this \n    refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this\n    · rcases a with ⟨a | b, h⟩\n      · exact Sum.inl a\n      · exact Sum.inr ⟨b, by cases h; assumption⟩\n    ·\n      rcases a with ⟨a | a, h₁⟩ <;> rcases b with ⟨b | b, h₂⟩ <;> cases h₁ <;> cases h₂ <;> rintro ⟨⟩ <;>\n          constructor <;>\n        assumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nh : IsLimit b\nH : ∀ (b' : Ordinal.{u_4}), b' < b → a + b' ≤ c\n⊢ ¬c < a + b\n[PROOFSTEP]\ninduction a using inductionOn with\n| H α r =>\n  induction b using inductionOn with\n  | H β s =>\n    intro l\n    suffices ∀ x : β, Sum.Lex r s (Sum.inr x) (enum _ _ l) by\n      -- Porting note: `revert` & `intro` is required because `cases'` doesn't replace\n                  --               `enum _ _ l` in `this`.\n      revert this; cases' enum _ _ l with x x <;> intro this\n      · cases this (enum s 0 h.pos)\n      · exact irrefl _ (this _)\n    intro x\n    rw [← typein_lt_typein (Sum.Lex r s), typein_enum]\n    have := H _ (h.2 _ (typein_lt_type s x))\n    rw [add_succ, succ_le_iff] at this \n    refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this\n    · rcases a with ⟨a | b, h⟩\n      · exact Sum.inl a\n      · exact Sum.inr ⟨b, by cases h; assumption⟩\n    ·\n      rcases a with ⟨a | a, h₁⟩ <;> rcases b with ⟨b | b, h₂⟩ <;> cases h₁ <;> cases h₂ <;> rintro ⟨⟩ <;>\n          constructor <;>\n        assumption\n[GOAL]\ncase H\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nh : IsLimit b\nα : Type u_4\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nH : ∀ (b' : Ordinal.{u_4}), b' < b → type r + b' ≤ c\n⊢ ¬c < type r + b\n[PROOFSTEP]\n\n| H α r =>\n  induction b using inductionOn with\n  | H β s =>\n    intro l\n    suffices ∀ x : β, Sum.Lex r s (Sum.inr x) (enum _ _ l) by\n      -- Porting note: `revert` & `intro` is required because `cases'` doesn't replace\n                  --               `enum _ _ l` in `this`.\n      revert this; cases' enum _ _ l with x x <;> intro this\n      · cases this (enum s 0 h.pos)\n      · exact irrefl _ (this _)\n    intro x\n    rw [← typein_lt_typein (Sum.Lex r s), typein_enum]\n    have := H _ (h.2 _ (typein_lt_type s x))\n    rw [add_succ, succ_le_iff] at this \n    refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this\n    · rcases a with ⟨a | b, h⟩\n      · exact Sum.inl a\n      · exact Sum.inr ⟨b, by cases h; assumption⟩\n    ·\n      rcases a with ⟨a | a, h₁⟩ <;> rcases b with ⟨b | b, h₂⟩ <;> cases h₁ <;> cases h₂ <;> rintro ⟨⟩ <;>\n          constructor <;>\n        assumption\n[GOAL]\ncase H\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nh : IsLimit b\nα : Type u_4\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nH : ∀ (b' : Ordinal.{u_4}), b' < b → type r + b' ≤ c\n⊢ ¬c < type r + b\n[PROOFSTEP]\ninduction b using inductionOn with\n| H β s =>\n  intro l\n  suffices ∀ x : β, Sum.Lex r s (Sum.inr x) (enum _ _ l) by\n    -- Porting note: `revert` & `intro` is required because `cases'` doesn't replace\n                --               `enum _ _ l` in `this`.\n    revert this; cases' enum _ _ l with x x <;> intro this\n    · cases this (enum s 0 h.pos)\n    · exact irrefl _ (this _)\n  intro x\n  rw [← typein_lt_typein (Sum.Lex r s), typein_enum]\n  have := H _ (h.2 _ (typein_lt_type s x))\n  rw [add_succ, succ_le_iff] at this \n  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this\n  · rcases a with ⟨a | b, h⟩\n    · exact Sum.inl a\n    · exact Sum.inr ⟨b, by cases h; assumption⟩\n  ·\n    rcases a with ⟨a | a, h₁⟩ <;> rcases b with ⟨b | b, h₂⟩ <;> cases h₁ <;> cases h₂ <;> rintro ⟨⟩ <;> constructor <;>\n      assumption\n[GOAL]\ncase H\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nh : IsLimit b\nα : Type u_4\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nH : ∀ (b' : Ordinal.{u_4}), b' < b → type r + b' ≤ c\n⊢ ¬c < type r + b\n[PROOFSTEP]\ninduction b using inductionOn with\n| H β s =>\n  intro l\n  suffices ∀ x : β, Sum.Lex r s (Sum.inr x) (enum _ _ l) by\n    -- Porting note: `revert` & `intro` is required because `cases'` doesn't replace\n                --               `enum _ _ l` in `this`.\n    revert this; cases' enum _ _ l with x x <;> intro this\n    · cases this (enum s 0 h.pos)\n    · exact irrefl _ (this _)\n  intro x\n  rw [← typein_lt_typein (Sum.Lex r s), typein_enum]\n  have := H _ (h.2 _ (typein_lt_type s x))\n  rw [add_succ, succ_le_iff] at this \n  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this\n  · rcases a with ⟨a | b, h⟩\n    · exact Sum.inl a\n    · exact Sum.inr ⟨b, by cases h; assumption⟩\n  ·\n    rcases a with ⟨a | a, h₁⟩ <;> rcases b with ⟨b | b, h₂⟩ <;> cases h₁ <;> cases h₂ <;> rintro ⟨⟩ <;> constructor <;>\n      assumption\n[GOAL]\ncase H.H\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\n⊢ ¬c < type r + type s\n[PROOFSTEP]\n\n| H β s =>\n  intro l\n  suffices ∀ x : β, Sum.Lex r s (Sum.inr x) (enum _ _ l) by\n    -- Porting note: `revert` & `intro` is required because `cases'` doesn't replace\n                --               `enum _ _ l` in `this`.\n    revert this; cases' enum _ _ l with x x <;> intro this\n    · cases this (enum s 0 h.pos)\n    · exact irrefl _ (this _)\n  intro x\n  rw [← typein_lt_typein (Sum.Lex r s), typein_enum]\n  have := H _ (h.2 _ (typein_lt_type s x))\n  rw [add_succ, succ_le_iff] at this \n  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this\n  · rcases a with ⟨a | b, h⟩\n    · exact Sum.inl a\n    · exact Sum.inr ⟨b, by cases h; assumption⟩\n  ·\n    rcases a with ⟨a | a, h₁⟩ <;> rcases b with ⟨b | b, h₂⟩ <;> cases h₁ <;> cases h₂ <;> rintro ⟨⟩ <;> constructor <;>\n      assumption\n[GOAL]\ncase H.H\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\n⊢ ¬c < type r + type s\n[PROOFSTEP]\nintro l\n[GOAL]\ncase H.H\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\n⊢ False\n[PROOFSTEP]\nsuffices ∀ x : β, Sum.Lex r s (Sum.inr x) (enum _ _ l) by\n  -- Porting note: `revert` & `intro` is required because `cases'` doesn't replace\n              --               `enum _ _ l` in `this`.\n  revert this; cases' enum _ _ l with x x <;> intro this\n  · cases this (enum s 0 h.pos)\n  · exact irrefl _ (this _)\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nthis : ∀ (x : β), Sum.Lex r s (Sum.inr x) (enum (Sum.Lex r s) c l)\n⊢ False\n[PROOFSTEP]\nrevert this\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\n⊢ (∀ (x : β), Sum.Lex r s (Sum.inr x) (enum (Sum.Lex r s) c l)) → False\n[PROOFSTEP]\ncases' enum _ _ l with x x\n[GOAL]\ncase inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : α\n⊢ (∀ (x_1 : β), Sum.Lex r s (Sum.inr x_1) (Sum.inl x)) → False\n[PROOFSTEP]\nintro this\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\n⊢ (∀ (x_1 : β), Sum.Lex r s (Sum.inr x_1) (Sum.inr x)) → False\n[PROOFSTEP]\nintro this\n[GOAL]\ncase inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : α\nthis : ∀ (x_1 : β), Sum.Lex r s (Sum.inr x_1) (Sum.inl x)\n⊢ False\n[PROOFSTEP]\ncases this (enum s 0 h.pos)\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : ∀ (x_1 : β), Sum.Lex r s (Sum.inr x_1) (Sum.inr x)\n⊢ False\n[PROOFSTEP]\nexact irrefl _ (this _)\n[GOAL]\ncase H.H\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\n⊢ ∀ (x : β), Sum.Lex r s (Sum.inr x) (enum (Sum.Lex r s) c l)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase H.H\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\n⊢ Sum.Lex r s (Sum.inr x) (enum (Sum.Lex r s) c l)\n[PROOFSTEP]\nrw [← typein_lt_typein (Sum.Lex r s), typein_enum]\n[GOAL]\ncase H.H\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\n⊢ typein (Sum.Lex r s) (Sum.inr x) < c\n[PROOFSTEP]\nhave := H _ (h.2 _ (typein_lt_type s x))\n[GOAL]\ncase H.H\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + succ (typein s x) ≤ c\n⊢ typein (Sum.Lex r s) (Sum.inr x) < c\n[PROOFSTEP]\nrw [add_succ, succ_le_iff] at this \n[GOAL]\ncase H.H\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\n⊢ typein (Sum.Lex r s) (Sum.inr x) < c\n[PROOFSTEP]\nrefine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this\n[GOAL]\ncase H.H.refine'_1\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na : ↑{b | Sum.Lex r s b (Sum.inr x)}\n⊢ α ⊕ ↑{b | s b x}\n[PROOFSTEP]\nrcases a with ⟨a | b, h⟩\n[GOAL]\ncase H.H.refine'_1.mk.inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na : α\nh : Sum.inl a ∈ {b | Sum.Lex r s b (Sum.inr x)}\n⊢ α ⊕ ↑{b | s b x}\n[PROOFSTEP]\nexact Sum.inl a\n[GOAL]\ncase H.H.refine'_1.mk.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\nb : β\nh : Sum.inr b ∈ {b | Sum.Lex r s b (Sum.inr x)}\n⊢ α ⊕ ↑{b | s b x}\n[PROOFSTEP]\nexact Sum.inr ⟨b, by cases h; assumption⟩\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\nb : β\nh : Sum.inr b ∈ {b | Sum.Lex r s b (Sum.inr x)}\n⊢ b ∈ {b | s b x}\n[PROOFSTEP]\ncases h\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\nb : β\nh✝ : s b x\n⊢ b ∈ {b | s b x}\n[PROOFSTEP]\nassumption\n[GOAL]\ncase H.H.refine'_2\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na b : ↑{b | Sum.Lex r s b (Sum.inr x)}\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)} a b →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        a)\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        b)\n[PROOFSTEP]\nrcases a with ⟨a | a, h₁⟩\n[GOAL]\ncase H.H.refine'_2.mk.inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\nb : ↑{b | Sum.Lex r s b (Sum.inr x)}\na : α\nh₁ : Sum.inl a ∈ {b | Sum.Lex r s b (Sum.inr x)}\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)} { val := Sum.inl a, property := h₁ } b →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl a, property := h₁ })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        b)\n[PROOFSTEP]\nrcases b with ⟨b | b, h₂⟩\n[GOAL]\ncase H.H.refine'_2.mk.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\nb : ↑{b | Sum.Lex r s b (Sum.inr x)}\na : β\nh₁ : Sum.inr a ∈ {b | Sum.Lex r s b (Sum.inr x)}\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)} { val := Sum.inr a, property := h₁ } b →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr a, property := h₁ })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        b)\n[PROOFSTEP]\nrcases b with ⟨b | b, h₂⟩\n[GOAL]\ncase H.H.refine'_2.mk.inl.mk.inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na : α\nh₁ : Sum.inl a ∈ {b | Sum.Lex r s b (Sum.inr x)}\nb : α\nh₂ : Sum.inl b ∈ {b | Sum.Lex r s b (Sum.inr x)}\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)} { val := Sum.inl a, property := h₁ }\n      { val := Sum.inl b, property := h₂ } →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl a, property := h₁ })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl b, property := h₂ })\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase H.H.refine'_2.mk.inl.mk.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na : α\nh₁ : Sum.inl a ∈ {b | Sum.Lex r s b (Sum.inr x)}\nb : β\nh₂ : Sum.inr b ∈ {b | Sum.Lex r s b (Sum.inr x)}\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)} { val := Sum.inl a, property := h₁ }\n      { val := Sum.inr b, property := h₂ } →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl a, property := h₁ })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr b, property := h₂ })\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase H.H.refine'_2.mk.inr.mk.inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na : β\nh₁ : Sum.inr a ∈ {b | Sum.Lex r s b (Sum.inr x)}\nb : α\nh₂ : Sum.inl b ∈ {b | Sum.Lex r s b (Sum.inr x)}\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)} { val := Sum.inr a, property := h₁ }\n      { val := Sum.inl b, property := h₂ } →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr a, property := h₁ })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl b, property := h₂ })\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase H.H.refine'_2.mk.inr.mk.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na : β\nh₁ : Sum.inr a ∈ {b | Sum.Lex r s b (Sum.inr x)}\nb : β\nh₂ : Sum.inr b ∈ {b | Sum.Lex r s b (Sum.inr x)}\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)} { val := Sum.inr a, property := h₁ }\n      { val := Sum.inr b, property := h₂ } →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr a, property := h₁ })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr b, property := h₂ })\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase H.H.refine'_2.mk.inl.mk.inl.sep\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na b : α\nh₂ : Sum.inl b ∈ {b | Sum.Lex r s b (Sum.inr x)}\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)}\n      { val := Sum.inl a, property := (_ : Sum.Lex r s (Sum.inl a) (Sum.inr x)) } { val := Sum.inl b, property := h₂ } →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl a, property := (_ : Sum.Lex r s (Sum.inl a) (Sum.inr x)) })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl b, property := h₂ })\n[PROOFSTEP]\ncases h₂\n[GOAL]\ncase H.H.refine'_2.mk.inl.mk.inr.sep\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na : α\nb : β\nh₂ : Sum.inr b ∈ {b | Sum.Lex r s b (Sum.inr x)}\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)}\n      { val := Sum.inl a, property := (_ : Sum.Lex r s (Sum.inl a) (Sum.inr x)) } { val := Sum.inr b, property := h₂ } →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl a, property := (_ : Sum.Lex r s (Sum.inl a) (Sum.inr x)) })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr b, property := h₂ })\n[PROOFSTEP]\ncases h₂\n[GOAL]\ncase H.H.refine'_2.mk.inr.mk.inl.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na : β\nb : α\nh₂ : Sum.inl b ∈ {b | Sum.Lex r s b (Sum.inr x)}\nh✝ : s a x\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)}\n      { val := Sum.inr a, property := (_ : Sum.Lex r s (Sum.inr a) (Sum.inr x)) } { val := Sum.inl b, property := h₂ } →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr a, property := (_ : Sum.Lex r s (Sum.inr a) (Sum.inr x)) })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl b, property := h₂ })\n[PROOFSTEP]\ncases h₂\n[GOAL]\ncase H.H.refine'_2.mk.inr.mk.inr.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na b : β\nh₂ : Sum.inr b ∈ {b | Sum.Lex r s b (Sum.inr x)}\nh✝ : s a x\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)}\n      { val := Sum.inr a, property := (_ : Sum.Lex r s (Sum.inr a) (Sum.inr x)) } { val := Sum.inr b, property := h₂ } →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr a, property := (_ : Sum.Lex r s (Sum.inr a) (Sum.inr x)) })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr b, property := h₂ })\n[PROOFSTEP]\ncases h₂\n[GOAL]\ncase H.H.refine'_2.mk.inl.mk.inl.sep.sep\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na b : α\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)}\n      { val := Sum.inl a, property := (_ : Sum.Lex r s (Sum.inl a) (Sum.inr x)) }\n      { val := Sum.inl b, property := (_ : Sum.Lex r s (Sum.inl b) (Sum.inr x)) } →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl a, property := (_ : Sum.Lex r s (Sum.inl a) (Sum.inr x)) })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl b, property := (_ : Sum.Lex r s (Sum.inl b) (Sum.inr x)) })\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase H.H.refine'_2.mk.inl.mk.inr.sep.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na : α\nb : β\nh✝ : s b x\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)}\n      { val := Sum.inl a, property := (_ : Sum.Lex r s (Sum.inl a) (Sum.inr x)) }\n      { val := Sum.inr b, property := (_ : Sum.Lex r s (Sum.inr b) (Sum.inr x)) } →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl a, property := (_ : Sum.Lex r s (Sum.inl a) (Sum.inr x)) })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr b, property := (_ : Sum.Lex r s (Sum.inr b) (Sum.inr x)) })\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase H.H.refine'_2.mk.inr.mk.inl.inr.sep\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na : β\nb : α\nh✝ : s a x\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)}\n      { val := Sum.inr a, property := (_ : Sum.Lex r s (Sum.inr a) (Sum.inr x)) }\n      { val := Sum.inl b, property := (_ : Sum.Lex r s (Sum.inl b) (Sum.inr x)) } →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr a, property := (_ : Sum.Lex r s (Sum.inr a) (Sum.inr x)) })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inl b, property := (_ : Sum.Lex r s (Sum.inl b) (Sum.inr x)) })\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase H.H.refine'_2.mk.inr.mk.inr.inr.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na b : β\nh✝¹ : s a x\nh✝ : s b x\n⊢ Subrel (Sum.Lex r s) {b | Sum.Lex r s b (Sum.inr x)}\n      { val := Sum.inr a, property := (_ : Sum.Lex r s (Sum.inr a) (Sum.inr x)) }\n      { val := Sum.inr b, property := (_ : Sum.Lex r s (Sum.inr b) (Sum.inr x)) } →\n    Sum.Lex r (Subrel s {b | s b x})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr a, property := (_ : Sum.Lex r s (Sum.inr a) (Sum.inr x)) })\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n              (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n        { val := Sum.inr b, property := (_ : Sum.Lex r s (Sum.inr b) (Sum.inr x)) })\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase H.H.refine'_2.mk.inl.mk.inl.sep.sep.inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na b : α\nh✝ : r a b\n⊢ Sum.Lex r (Subrel s {b | s b x})\n    ((fun a =>\n        Subtype.casesOn a fun val h =>\n          Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n            (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n      { val := Sum.inl a, property := (_ : Sum.Lex r s (Sum.inl a) (Sum.inr x)) })\n    ((fun a =>\n        Subtype.casesOn a fun val h =>\n          Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n            (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n      { val := Sum.inl b, property := (_ : Sum.Lex r s (Sum.inl b) (Sum.inr x)) })\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase H.H.refine'_2.mk.inl.mk.inr.sep.inr.sep\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na : α\nb : β\nh✝ : s b x\n⊢ Sum.Lex r (Subrel s {b | s b x})\n    ((fun a =>\n        Subtype.casesOn a fun val h =>\n          Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n            (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n      { val := Sum.inl a, property := (_ : Sum.Lex r s (Sum.inl a) (Sum.inr x)) })\n    ((fun a =>\n        Subtype.casesOn a fun val h =>\n          Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n            (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n      { val := Sum.inr b, property := (_ : Sum.Lex r s (Sum.inr b) (Sum.inr x)) })\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase H.H.refine'_2.mk.inr.mk.inr.inr.inr.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na b : β\nh✝² : s a x\nh✝¹ : s b x\nh✝ : s a b\n⊢ Sum.Lex r (Subrel s {b | s b x})\n    ((fun a =>\n        Subtype.casesOn a fun val h =>\n          Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n            (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n      { val := Sum.inr a, property := (_ : Sum.Lex r s (Sum.inr a) (Sum.inr x)) })\n    ((fun a =>\n        Subtype.casesOn a fun val h =>\n          Sum.casesOn (motive := fun x_1 => x_1 ∈ {b | Sum.Lex r s b (Sum.inr x)} → α ⊕ ↑{b | s b x}) val\n            (fun a h => Sum.inl a) (fun b h => Sum.inr { val := b, property := (_ : b ∈ {b | s b x}) }) h)\n      { val := Sum.inr b, property := (_ : Sum.Lex r s (Sum.inr b) (Sum.inr x)) })\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase H.H.refine'_2.mk.inl.mk.inl.sep.sep.inl.h\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na b : α\nh✝ : r a b\n⊢ r a b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase H.H.refine'_2.mk.inr.mk.inr.inr.inr.inr.h\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r + b' ≤ c\nl : c < type r + type s\nx : β\nthis : type r + typein s x < c\na b : β\nh✝² : s a x\nh✝¹ : s b x\nh✝ : s a b\n⊢ Subrel s {b | s b x} { val := a, property := (_ : a ∈ {b | s b x}) } { val := b, property := (_ : b ∈ {b | s b x}) }\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : b ≤ a\n⊢ b + (a - b) ≤ a\n[PROOFSTEP]\nrcases zero_or_succ_or_limit (a - b) with (e | ⟨c, e⟩ | l)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : b ≤ a\ne : a - b = 0\n⊢ b + (a - b) ≤ a\n[PROOFSTEP]\nsimp only [e, add_zero, h]\n[GOAL]\ncase inr.inl.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : b ≤ a\nc : Ordinal.{u_4}\ne : a - b = succ c\n⊢ b + (a - b) ≤ a\n[PROOFSTEP]\nrw [e, add_succ, succ_le_iff, ← lt_sub, e]\n[GOAL]\ncase inr.inl.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : b ≤ a\nc : Ordinal.{u_4}\ne : a - b = succ c\n⊢ c < succ c\n[PROOFSTEP]\nexact lt_succ c\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : b ≤ a\nl : IsLimit (a - b)\n⊢ b + (a - b) ≤ a\n[PROOFSTEP]\nexact (add_le_of_limit l).2 fun c l => (lt_sub.1 l).le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nh : b ≤ a\n⊢ c ≤ a - b ↔ b + c ≤ a\n[PROOFSTEP]\nrw [← add_le_add_iff_left b, Ordinal.add_sub_cancel_of_le h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\n⊢ a - 0 = a\n[PROOFSTEP]\nsimpa only [zero_add] using add_sub_cancel 0 a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\n⊢ 0 - a = 0\n[PROOFSTEP]\nrw [← Ordinal.le_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\n⊢ 0 - a ≤ 0\n[PROOFSTEP]\napply sub_le_self\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\n⊢ a - a = 0\n[PROOFSTEP]\nsimpa only [add_zero] using add_sub_cancel a 0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : a - b = 0\n⊢ a ≤ b\n[PROOFSTEP]\nsimpa only [h, add_zero] using le_add_sub a b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : a ≤ b\n⊢ a - b = 0\n[PROOFSTEP]\nrwa [← Ordinal.le_zero, sub_le, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c d : Ordinal.{u_4}\n⊢ a - b - c ≤ d ↔ a - (b + c) ≤ d\n[PROOFSTEP]\nrw [sub_le, sub_le, sub_le, add_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\n⊢ a + b - (a + c) = b - c\n[PROOFSTEP]\nrw [← sub_sub, add_sub_cancel]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nl : IsLimit a\nh : b < a\n⊢ b + 0 < a\n[PROOFSTEP]\nrwa [add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nl : IsLimit a\nh✝ : b < a\nc : Ordinal.{u_4}\nh : c < a - b\n⊢ succ c < a - b\n[PROOFSTEP]\nrw [lt_sub, add_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nl : IsLimit a\nh✝ : b < a\nc : Ordinal.{u_4}\nh : c < a - b\n⊢ succ (b + c) < a\n[PROOFSTEP]\nexact l.2 _ (lt_sub.1 h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ 1 + ω = ω\n[PROOFSTEP]\nrefine' le_antisymm _ (le_add_left _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ 1 + ω ≤ ω\n[PROOFSTEP]\nrw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ type (Sum.Lex EmptyRelation fun x x_1 => x < x_1) ≤ type fun x x_1 => x < x_1\n[PROOFSTEP]\nrefine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ Unit ⊕ ℕ → ℕ\n[PROOFSTEP]\napply Sum.rec\n[GOAL]\ncase refine'_1.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ Unit → ℕ\ncase refine'_1.inr α : Type u_1 β : Type u_2 γ : Type u_3 r : α → α → Prop s : β → β → Prop t : γ → γ → Prop ⊢ ℕ → ℕ\n[PROOFSTEP]\nexact fun _ => 0\n[GOAL]\ncase refine'_1.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ ℕ → ℕ\n[PROOFSTEP]\nexact Nat.succ\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ ∀ (a b : Unit ⊕ ℕ),\n    Sum.Lex EmptyRelation (fun x x_1 => x < x_1) a b → Sum.rec (fun x => 0) Nat.succ a < Sum.rec (fun x => 0) Nat.succ b\n[PROOFSTEP]\nintro a b\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Unit ⊕ ℕ\n⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) a b → Sum.rec (fun x => 0) Nat.succ a < Sum.rec (fun x => 0) Nat.succ b\n[PROOFSTEP]\ncases a <;> cases b <;> intro H <;> cases' H with _ _ H _ _ H <;> [exact H.elim; exact Nat.succ_pos _;\n  exact Nat.succ_lt_succ H]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Unit ⊕ ℕ\n⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) a b → Sum.rec (fun x => 0) Nat.succ a < Sum.rec (fun x => 0) Nat.succ b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase refine'_2.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb : Unit ⊕ ℕ\nval✝ : Unit\n⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inl val✝) b →\n    Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝) < Sum.rec (fun x => 0) Nat.succ b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase refine'_2.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb : Unit ⊕ ℕ\nval✝ : ℕ\n⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inr val✝) b →\n    Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝) < Sum.rec (fun x => 0) Nat.succ b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase refine'_2.inl.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nval✝¹ val✝ : Unit\n⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inl val✝¹) (Sum.inl val✝) →\n    Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase refine'_2.inl.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nval✝¹ : Unit\nval✝ : ℕ\n⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inl val✝¹) (Sum.inr val✝) →\n    Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase refine'_2.inr.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nval✝¹ : ℕ\nval✝ : Unit\n⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inr val✝¹) (Sum.inl val✝) →\n    Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase refine'_2.inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nval✝¹ val✝ : ℕ\n⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inr val✝¹) (Sum.inr val✝) →\n    Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase refine'_2.inl.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nval✝¹ val✝ : Unit\nH : Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inl val✝¹) (Sum.inl val✝)\n⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝)\n[PROOFSTEP]\ncases' H with _ _ H _ _ H\n[GOAL]\ncase refine'_2.inl.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nval✝¹ : Unit\nval✝ : ℕ\nH : Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inl val✝¹) (Sum.inr val✝)\n⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝)\n[PROOFSTEP]\ncases' H with _ _ H _ _ H\n[GOAL]\ncase refine'_2.inr.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nval✝¹ : ℕ\nval✝ : Unit\nH : Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inr val✝¹) (Sum.inl val✝)\n⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝)\n[PROOFSTEP]\ncases' H with _ _ H _ _ H\n[GOAL]\ncase refine'_2.inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nval✝¹ val✝ : ℕ\nH : Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inr val✝¹) (Sum.inr val✝)\n⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝)\n[PROOFSTEP]\ncases' H with _ _ H _ _ H\n[GOAL]\ncase refine'_2.inl.inl.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nval✝¹ val✝ a₁✝ a₂✝ : Unit\nH : EmptyRelation a₁✝ a₂✝\n⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝)\n[PROOFSTEP]\nexact H.elim\n[GOAL]\ncase refine'_2.inl.inr.sep\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nval✝¹ : Unit\nval✝ : ℕ\na✝ : Unit\n⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝)\n[PROOFSTEP]\nexact Nat.succ_pos _\n[GOAL]\ncase refine'_2.inr.inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nval✝¹ val✝ : ℕ\nH : val✝¹ < val✝\n⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝)\n[PROOFSTEP]\nexact Nat.succ_lt_succ H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nh : ω ≤ o\n⊢ 1 + o = o\n[PROOFSTEP]\nrw [← Ordinal.add_sub_cancel_of_le h, ← add_assoc, one_add_omega]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\na✝ b✝ c : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na b : (γ × β) × α\n⊢ Prod.Lex t (Prod.Lex s r) (↑(prodAssoc γ β α) a) (↑(prodAssoc γ β α) b) ↔ Prod.Lex (Prod.Lex t s) r a b\n[PROOFSTEP]\nrcases a with ⟨⟨a₁, a₂⟩, a₃⟩\n[GOAL]\ncase mk.mk\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\na b✝ c : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\nb : (γ × β) × α\na₃ : α\na₁ : γ\na₂ : β\n⊢ Prod.Lex t (Prod.Lex s r) (↑(prodAssoc γ β α) ((a₁, a₂), a₃)) (↑(prodAssoc γ β α) b) ↔\n    Prod.Lex (Prod.Lex t s) r ((a₁, a₂), a₃) b\n[PROOFSTEP]\nrcases b with ⟨⟨b₁, b₂⟩, b₃⟩\n[GOAL]\ncase mk.mk.mk.mk\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\na b c : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na₃ : α\na₁ : γ\na₂ : β\nb₃ : α\nb₁ : γ\nb₂ : β\n⊢ Prod.Lex t (Prod.Lex s r) (↑(prodAssoc γ β α) ((a₁, a₂), a₃)) (↑(prodAssoc γ β α) ((b₁, b₂), b₃)) ↔\n    Prod.Lex (Prod.Lex t s) r ((a₁, a₂), a₃) ((b₁, b₂), b₃)\n[PROOFSTEP]\nsimp [Prod.lex_def, and_or_left, or_assoc, and_assoc]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\na b : α × PUnit\n⊢ r (↑(prodPUnit α) a) (↑(prodPUnit α) b) ↔ Prod.Lex r EmptyRelation a b\n[PROOFSTEP]\nrcases a with ⟨a, ⟨⟨⟩⟩⟩\n[GOAL]\ncase mk.unit\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\nb : α × PUnit\na : α\n⊢ r (↑(prodPUnit α) (a, PUnit.unit)) (↑(prodPUnit α) b) ↔ Prod.Lex r EmptyRelation (a, PUnit.unit) b\n[PROOFSTEP]\nrcases b with ⟨b, ⟨⟨⟩⟩⟩\n[GOAL]\ncase mk.unit.mk.unit\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\na b : α\n⊢ r (↑(prodPUnit α) (a, PUnit.unit)) (↑(prodPUnit α) (b, PUnit.unit)) ↔\n    Prod.Lex r EmptyRelation (a, PUnit.unit) (b, PUnit.unit)\n[PROOFSTEP]\nsimp only [Prod.lex_def, EmptyRelation, and_false_iff, or_false_iff]\n[GOAL]\ncase mk.unit.mk.unit\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\na b : α\n⊢ r (↑(prodPUnit α) (a, PUnit.unit)) (↑(prodPUnit α) (b, PUnit.unit)) ↔ r a b\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\na b : PUnit × α\n⊢ r (↑(punitProd α) a) (↑(punitProd α) b) ↔ Prod.Lex EmptyRelation r a b\n[PROOFSTEP]\nrcases a with ⟨⟨⟨⟩⟩, a⟩\n[GOAL]\ncase mk.unit\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\nb : PUnit × α\na : α\n⊢ r (↑(punitProd α) (PUnit.unit, a)) (↑(punitProd α) b) ↔ Prod.Lex EmptyRelation r (PUnit.unit, a) b\n[PROOFSTEP]\nrcases b with ⟨⟨⟨⟩⟩, b⟩\n[GOAL]\ncase mk.unit.mk.unit\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\na b : α\n⊢ r (↑(punitProd α) (PUnit.unit, a)) (↑(punitProd α) (PUnit.unit, b)) ↔\n    Prod.Lex EmptyRelation r (PUnit.unit, a) (PUnit.unit, b)\n[PROOFSTEP]\nsimp only [Prod.lex_def, EmptyRelation, false_or_iff]\n[GOAL]\ncase mk.unit.mk.unit\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\na b : α\n⊢ r (↑(punitProd α) (PUnit.unit, a)) (↑(punitProd α) (PUnit.unit, b)) ↔ True ∧ r a b\n[PROOFSTEP]\nsimp only [eq_self_iff_true, true_and_iff]\n[GOAL]\ncase mk.unit.mk.unit\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\na b : α\n⊢ r (↑(punitProd α) (PUnit.unit, a)) (↑(punitProd α) (PUnit.unit, b)) ↔ r a b\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nα : Type u_4\nx✝³ : α → α → Prop\nx✝² : IsWellOrder α x✝³\nβ : Type u_4\nx✝¹ : β → β → Prop\nx✝ : IsWellOrder β x✝¹\n⊢ type x✝³ * type x✝¹ = 0 ↔ type x✝³ = 0 ∨ type x✝¹ = 0\n[PROOFSTEP]\nsimp_rw [← type_prod_lex, type_eq_zero_iff_isEmpty]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nα : Type u_4\nx✝³ : α → α → Prop\nx✝² : IsWellOrder α x✝³\nβ : Type u_4\nx✝¹ : β → β → Prop\nx✝ : IsWellOrder β x✝¹\n⊢ IsEmpty (β × α) ↔ IsEmpty α ∨ IsEmpty β\n[PROOFSTEP]\nrw [or_comm]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nα : Type u_4\nx✝³ : α → α → Prop\nx✝² : IsWellOrder α x✝³\nβ : Type u_4\nx✝¹ : β → β → Prop\nx✝ : IsWellOrder β x✝¹\n⊢ IsEmpty (β × α) ↔ IsEmpty β ∨ IsEmpty α\n[PROOFSTEP]\nexact isEmpty_prod\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\na b c : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\n⊢ ∀ {a b : (β ⊕ γ) × α},\n    Sum.Lex (Prod.Lex s r) (Prod.Lex t r) (↑(sumProdDistrib β γ α) a) (↑(sumProdDistrib β γ α) b) ↔\n      Prod.Lex (Sum.Lex s t) r a b\n[PROOFSTEP]\nrintro ⟨a₁ | a₁, a₂⟩ ⟨b₁ | b₁, b₂⟩\n[GOAL]\ncase mk.inl.mk.inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\na b c : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na₂ : α\na₁ : β\nb₂ : α\nb₁ : β\n⊢ Sum.Lex (Prod.Lex s r) (Prod.Lex t r) (↑(sumProdDistrib β γ α) (Sum.inl a₁, a₂))\n      (↑(sumProdDistrib β γ α) (Sum.inl b₁, b₂)) ↔\n    Prod.Lex (Sum.Lex s t) r (Sum.inl a₁, a₂) (Sum.inl b₁, b₂)\n[PROOFSTEP]\nsimp only [Prod.lex_def, Sum.lex_inl_inl, Sum.Lex.sep, Sum.lex_inr_inl, Sum.lex_inr_inr, sumProdDistrib_apply_left,\n  sumProdDistrib_apply_right]\n[GOAL]\ncase mk.inl.mk.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\na b c : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na₂ : α\na₁ : β\nb₂ : α\nb₁ : γ\n⊢ Sum.Lex (Prod.Lex s r) (Prod.Lex t r) (↑(sumProdDistrib β γ α) (Sum.inl a₁, a₂))\n      (↑(sumProdDistrib β γ α) (Sum.inr b₁, b₂)) ↔\n    Prod.Lex (Sum.Lex s t) r (Sum.inl a₁, a₂) (Sum.inr b₁, b₂)\n[PROOFSTEP]\nsimp only [Prod.lex_def, Sum.lex_inl_inl, Sum.Lex.sep, Sum.lex_inr_inl, Sum.lex_inr_inr, sumProdDistrib_apply_left,\n  sumProdDistrib_apply_right]\n[GOAL]\ncase mk.inr.mk.inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\na b c : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na₂ : α\na₁ : γ\nb₂ : α\nb₁ : β\n⊢ Sum.Lex (Prod.Lex s r) (Prod.Lex t r) (↑(sumProdDistrib β γ α) (Sum.inr a₁, a₂))\n      (↑(sumProdDistrib β γ α) (Sum.inl b₁, b₂)) ↔\n    Prod.Lex (Sum.Lex s t) r (Sum.inr a₁, a₂) (Sum.inl b₁, b₂)\n[PROOFSTEP]\nsimp only [Prod.lex_def, Sum.lex_inl_inl, Sum.Lex.sep, Sum.lex_inr_inl, Sum.lex_inr_inr, sumProdDistrib_apply_left,\n  sumProdDistrib_apply_right]\n[GOAL]\ncase mk.inr.mk.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\na b c : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na₂ : α\na₁ : γ\nb₂ : α\nb₁ : γ\n⊢ Sum.Lex (Prod.Lex s r) (Prod.Lex t r) (↑(sumProdDistrib β γ α) (Sum.inr a₁, a₂))\n      (↑(sumProdDistrib β γ α) (Sum.inr b₁, b₂)) ↔\n    Prod.Lex (Sum.Lex s t) r (Sum.inr a₁, a₂) (Sum.inr b₁, b₂)\n[PROOFSTEP]\nsimp only [Prod.lex_def, Sum.lex_inl_inl, Sum.Lex.sep, Sum.lex_inr_inl, Sum.lex_inr_inr, sumProdDistrib_apply_left,\n  sumProdDistrib_apply_right]\n[GOAL]\ncase mk.inl.mk.inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\na b c : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na₂ : α\na₁ : β\nb₂ : α\nb₁ : β\n⊢ s a₁ b₁ ∨ a₁ = b₁ ∧ r a₂ b₂ ↔ s a₁ b₁ ∨ Sum.inl a₁ = Sum.inl b₁ ∧ r a₂ b₂\n[PROOFSTEP]\nsimp only [Sum.inl.inj_iff, Sum.inr.inj_iff, true_or_iff, false_and_iff, false_or_iff]\n[GOAL]\ncase mk.inl.mk.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\na b c : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na₂ : α\na₁ : β\nb₂ : α\nb₁ : γ\n⊢ True ↔ True ∨ False ∧ r a₂ b₂\n[PROOFSTEP]\nsimp only [Sum.inl.inj_iff, Sum.inr.inj_iff, true_or_iff, false_and_iff, false_or_iff]\n[GOAL]\ncase mk.inr.mk.inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\na b c : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na₂ : α\na₁ : γ\nb₂ : α\nb₁ : β\n⊢ False ↔ False ∨ False ∧ r a₂ b₂\n[PROOFSTEP]\nsimp only [Sum.inl.inj_iff, Sum.inr.inj_iff, true_or_iff, false_and_iff, false_or_iff]\n[GOAL]\ncase mk.inr.mk.inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\na b c : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na₂ : α\na₁ : γ\nb₂ : α\nb₁ : γ\n⊢ t a₁ b₁ ∨ a₁ = b₁ ∧ r a₂ b₂ ↔ t a₁ b₁ ∨ Sum.inr a₁ = Sum.inr b₁ ∧ r a₂ b₂\n[PROOFSTEP]\nsimp only [Sum.inl.inj_iff, Sum.inr.inj_iff, true_or_iff, false_and_iff, false_or_iff]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\nc a b : Ordinal.{u}\nx✝³ x✝² x✝¹ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nx✝ : Quotient.mk isEquivalent { α := α, r := r, wo := wo✝² } ≤ Quotient.mk isEquivalent { α := β, r := s, wo := wo✝¹ }\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\nf : r ≼i s\n⊢ Quotient.mk isEquivalent { α := γ, r := t, wo := wo✝ } * Quotient.mk isEquivalent { α := α, r := r, wo := wo✝² } ≤\n    Quotient.mk isEquivalent { α := γ, r := t, wo := wo✝ } * Quotient.mk isEquivalent { α := β, r := s, wo := wo✝¹ }\n[PROOFSTEP]\nrefine' (RelEmbedding.ofMonotone (fun a : α × γ => (f a.1, a.2)) fun a b h => _).ordinal_type_le\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\nc a✝ b✝ : Ordinal.{u}\nx✝³ x✝² x✝¹ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nx✝ : Quotient.mk isEquivalent { α := α, r := r, wo := wo✝² } ≤ Quotient.mk isEquivalent { α := β, r := s, wo := wo✝¹ }\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\nf : r ≼i s\na b : α × γ\nh : Prod.Lex r t a b\n⊢ Prod.Lex s t ((fun a => (↑f a.fst, a.snd)) a) ((fun a => (↑f a.fst, a.snd)) b)\n[PROOFSTEP]\ncases' h with a₁ b₁ a₂ b₂ h' a b₁ b₂ h'\n[GOAL]\ncase left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\nc a b : Ordinal.{u}\nx✝³ x✝² x✝¹ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nx✝ : Quotient.mk isEquivalent { α := α, r := r, wo := wo✝² } ≤ Quotient.mk isEquivalent { α := β, r := s, wo := wo✝¹ }\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\nf : r ≼i s\na₁ : α\nb₁ : γ\na₂ : α\nb₂ : γ\nh' : r a₁ a₂\n⊢ Prod.Lex s t ((fun a => (↑f a.fst, a.snd)) (a₁, b₁)) ((fun a => (↑f a.fst, a.snd)) (a₂, b₂))\n[PROOFSTEP]\nexact Prod.Lex.left _ _ (f.toRelEmbedding.map_rel_iff.2 h')\n[GOAL]\ncase right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\nc a✝ b : Ordinal.{u}\nx✝³ x✝² x✝¹ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nx✝ : Quotient.mk isEquivalent { α := α, r := r, wo := wo✝² } ≤ Quotient.mk isEquivalent { α := β, r := s, wo := wo✝¹ }\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\nf : r ≼i s\na : α\nb₁ b₂ : γ\nh' : t b₁ b₂\n⊢ Prod.Lex s t ((fun a => (↑f a.fst, a.snd)) (a, b₁)) ((fun a => (↑f a.fst, a.snd)) (a, b₂))\n[PROOFSTEP]\nexact Prod.Lex.right _ h'\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\nc a b : Ordinal.{u}\nx✝³ x✝² x✝¹ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nx✝ : Quotient.mk isEquivalent { α := α, r := r, wo := wo✝² } ≤ Quotient.mk isEquivalent { α := β, r := s, wo := wo✝¹ }\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\nf : r ≼i s\n⊢ Function.swap (fun x x_1 => x * x_1) (Quotient.mk isEquivalent { α := γ, r := t, wo := wo✝ })\n      (Quotient.mk isEquivalent { α := α, r := r, wo := wo✝² }) ≤\n    Function.swap (fun x x_1 => x * x_1) (Quotient.mk isEquivalent { α := γ, r := t, wo := wo✝ })\n      (Quotient.mk isEquivalent { α := β, r := s, wo := wo✝¹ })\n[PROOFSTEP]\nrefine' (RelEmbedding.ofMonotone (fun a : γ × α => (a.1, f a.2)) fun a b h => _).ordinal_type_le\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\nc a✝ b✝ : Ordinal.{u}\nx✝³ x✝² x✝¹ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nx✝ : Quotient.mk isEquivalent { α := α, r := r, wo := wo✝² } ≤ Quotient.mk isEquivalent { α := β, r := s, wo := wo✝¹ }\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\nf : r ≼i s\na b : γ × α\nh : Prod.Lex t r a b\n⊢ Prod.Lex t s ((fun a => (a.fst, ↑f a.snd)) a) ((fun a => (a.fst, ↑f a.snd)) b)\n[PROOFSTEP]\ncases' h with a₁ b₁ a₂ b₂ h' a b₁ b₂ h'\n[GOAL]\ncase left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\nc a b : Ordinal.{u}\nx✝³ x✝² x✝¹ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nx✝ : Quotient.mk isEquivalent { α := α, r := r, wo := wo✝² } ≤ Quotient.mk isEquivalent { α := β, r := s, wo := wo✝¹ }\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\nf : r ≼i s\na₁ : γ\nb₁ : α\na₂ : γ\nb₂ : α\nh' : t a₁ a₂\n⊢ Prod.Lex t s ((fun a => (a.fst, ↑f a.snd)) (a₁, b₁)) ((fun a => (a.fst, ↑f a.snd)) (a₂, b₂))\n[PROOFSTEP]\nexact Prod.Lex.left _ _ h'\n[GOAL]\ncase right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\nc a✝ b : Ordinal.{u}\nx✝³ x✝² x✝¹ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nx✝ : Quotient.mk isEquivalent { α := α, r := r, wo := wo✝² } ≤ Quotient.mk isEquivalent { α := β, r := s, wo := wo✝¹ }\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\nf : r ≼i s\na : γ\nb₁ b₂ : α\nh' : r b₁ b₂\n⊢ Prod.Lex t s ((fun a => (a.fst, ↑f a.snd)) (a, b₁)) ((fun a => (a.fst, ↑f a.snd)) (a, b₂))\n[PROOFSTEP]\nexact Prod.Lex.right _ (f.toRelEmbedding.map_rel_iff.2 h')\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nhb : 0 < b\n⊢ a ≤ a * b\n[PROOFSTEP]\nconvert mul_le_mul_left' (one_le_iff_pos.2 hb) a\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nhb : 0 < b\n⊢ a = a * 1\n[PROOFSTEP]\nrw [mul_one a]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nhb : 0 < b\n⊢ a ≤ b * a\n[PROOFSTEP]\nconvert mul_le_mul_right' (one_le_iff_pos.2 hb) a\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nhb : 0 < b\n⊢ a = 1 * a\n[PROOFSTEP]\nrw [one_mul a]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\n⊢ False\n[PROOFSTEP]\nsuffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l)\n  by\n  cases' enum _ _ l with b a\n  exact irrefl _ (this _ _)\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\nthis : ∀ (a : α) (b : β), Prod.Lex s r (b, a) (enum (Prod.Lex s r) c l)\n⊢ False\n[PROOFSTEP]\ncases' enum _ _ l with b a\n[GOAL]\ncase mk\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\nthis : ∀ (a : α) (b : β), Prod.Lex s r (b, a) (enum (Prod.Lex s r) c l)\nb : β\na : α\n⊢ False\n[PROOFSTEP]\nexact irrefl _ (this _ _)\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\n⊢ ∀ (a : α) (b : β), Prod.Lex s r (b, a) (enum (Prod.Lex s r) c l)\n[PROOFSTEP]\nintro a b\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\n⊢ Prod.Lex s r (b, a) (enum (Prod.Lex s r) c l)\n[PROOFSTEP]\nrw [← typein_lt_typein (Prod.Lex s r), typein_enum]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\n⊢ typein (Prod.Lex s r) (b, a) < c\n[PROOFSTEP]\nhave := H _ (h.2 _ (typein_lt_type s b))\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis : type r * succ (typein s b) ≤ c\n⊢ typein (Prod.Lex s r) (b, a) < c\n[PROOFSTEP]\nrw [mul_succ] at this \n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis : type r * typein s b + type r ≤ c\n⊢ typein (Prod.Lex s r) (b, a) < c\n[PROOFSTEP]\nhave := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\n⊢ typein (Prod.Lex s r) (b, a) < c\n[PROOFSTEP]\nrefine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na✝ : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a✝ < c\na : ↑{b_1 | Prod.Lex s r b_1 (b, a✝)}\n⊢ ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a✝}\n[PROOFSTEP]\nrcases a with ⟨⟨b', a'⟩, h⟩\n[GOAL]\ncase refine'_1.mk.mk\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb' : β\na' : α\nh : (b', a') ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\n⊢ ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a}\n[PROOFSTEP]\nby_cases e : b = b'\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb' : β\na' : α\nh : (b', a') ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\ne : b = b'\n⊢ ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a}\n[PROOFSTEP]\nrefine' Sum.inr ⟨a', _⟩\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb' : β\na' : α\nh : (b', a') ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\ne : b = b'\n⊢ a' ∈ {b | r b a}\n[PROOFSTEP]\nsubst e\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\na' : α\nh : (b, a') ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\n⊢ a' ∈ {b | r b a}\n[PROOFSTEP]\ncases' h with _ _ _ _ h _ _ _ h\n[GOAL]\ncase pos.left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\na' : α\nh : s b b\n⊢ a' ∈ {b | r b a}\n[PROOFSTEP]\nexact (irrefl _ h).elim\n[GOAL]\ncase pos.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\na' : α\nh : r a' a\n⊢ a' ∈ {b | r b a}\n[PROOFSTEP]\nexact h\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb' : β\na' : α\nh : (b', a') ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\ne : ¬b = b'\n⊢ ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a}\n[PROOFSTEP]\nrefine' Sum.inl (⟨b', _⟩, a')\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb' : β\na' : α\nh : (b', a') ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\ne : ¬b = b'\n⊢ b' ∈ {b_1 | s b_1 b}\n[PROOFSTEP]\ncases' h with _ _ _ _ h _ _ _ h\n[GOAL]\ncase neg.left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb' : β\na' : α\ne : ¬b = b'\nh : s b' b\n⊢ b' ∈ {b_1 | s b_1 b}\n[PROOFSTEP]\nexact h\n[GOAL]\ncase neg.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\na' : α\ne : ¬b = b\nh : r a' a\n⊢ b ∈ {b_1 | s b_1 b}\n[PROOFSTEP]\nexact (e rfl).elim\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na✝ : α\nb✝ : β\nthis✝ : type r * typein s b✝ + type r ≤ c\nthis : type r * typein s b✝ + typein r a✝ < c\na b : ↑{b | Prod.Lex s r b (b✝, a✝)}\n⊢ Subrel (Prod.Lex s r) {b | Prod.Lex s r b (b✝, a✝)} a b →\n    Sum.Lex (Prod.Lex (Subrel s {b | s b b✝}) r) (Subrel r {b | r b a✝})\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Prod.casesOn (motive := fun x => x ∈ {b | Prod.Lex s r b (b✝, a✝)} → ↑{b | s b b✝} × α ⊕ ↑{b | r b a✝}) val\n              (fun b' a' h =>\n                if e : b✝ = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a✝}) }\n                else Sum.inl ({ val := b', property := (_ : b' ∈ {b | s b b✝}) }, a'))\n              h)\n        a)\n      ((fun a =>\n          Subtype.casesOn a fun val h =>\n            Prod.casesOn (motive := fun x => x ∈ {b | Prod.Lex s r b (b✝, a✝)} → ↑{b | s b b✝} × α ⊕ ↑{b | r b a✝}) val\n              (fun b' a' h =>\n                if e : b✝ = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a✝}) }\n                else Sum.inl ({ val := b', property := (_ : b' ∈ {b | s b b✝}) }, a'))\n              h)\n        b)\n[PROOFSTEP]\nrcases a with ⟨⟨b₁, a₁⟩, h₁⟩\n[GOAL]\ncase refine'_2.mk.mk\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb✝ : β\nthis✝ : type r * typein s b✝ + type r ≤ c\nthis : type r * typein s b✝ + typein r a < c\nb : ↑{b | Prod.Lex s r b (b✝, a)}\nb₁ : β\na₁ : α\nh₁ : (b₁, a₁) ∈ {b | Prod.Lex s r b (b✝, a)}\n⊢ Subrel (Prod.Lex s r) {b | Prod.Lex s r b (b✝, a)} { val := (b₁, a₁), property := h₁ } b →\n    Sum.Lex (Prod.Lex (Subrel s {b | s b b✝}) r) (Subrel r {b | r b a})\n      ((fun a_2 =>\n          Subtype.casesOn a_2 fun val h =>\n            Prod.casesOn (motive := fun x => x ∈ {b | Prod.Lex s r b (b✝, a)} → ↑{b | s b b✝} × α ⊕ ↑{b | r b a}) val\n              (fun b' a' h =>\n                if e : b✝ = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n                else Sum.inl ({ val := b', property := (_ : b' ∈ {b | s b b✝}) }, a'))\n              h)\n        { val := (b₁, a₁), property := h₁ })\n      ((fun a_2 =>\n          Subtype.casesOn a_2 fun val h =>\n            Prod.casesOn (motive := fun x => x ∈ {b | Prod.Lex s r b (b✝, a)} → ↑{b | s b b✝} × α ⊕ ↑{b | r b a}) val\n              (fun b' a' h =>\n                if e : b✝ = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n                else Sum.inl ({ val := b', property := (_ : b' ∈ {b | s b b✝}) }, a'))\n              h)\n        b)\n[PROOFSTEP]\nrcases b with ⟨⟨b₂, a₂⟩, h₂⟩\n[GOAL]\ncase refine'_2.mk.mk.mk.mk\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb₁ : β\na₁ : α\nh₁ : (b₁, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nb₂ : β\na₂ : α\nh₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\n⊢ Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b₁, a₁), property := h₁ }\n      { val := (b₂, a₂), property := h₂ } →\n    Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})\n      ((fun a_2 =>\n          Subtype.casesOn a_2 fun val h =>\n            Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n              val\n              (fun b' a' h =>\n                if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n                else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n              h)\n        { val := (b₁, a₁), property := h₁ })\n      ((fun a_2 =>\n          Subtype.casesOn a_2 fun val h =>\n            Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n              val\n              (fun b' a' h =>\n                if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n                else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n              h)\n        { val := (b₂, a₂), property := h₂ })\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_2.mk.mk.mk.mk\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb₁ : β\na₁ : α\nh₁ : (b₁, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nb₂ : β\na₂ : α\nh₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh :\n  Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b₁, a₁), property := h₁ }\n    { val := (b₂, a₂), property := h₂ }\n⊢ Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₁, a₁), property := h₁ })\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₂, a₂), property := h₂ })\n[PROOFSTEP]\nby_cases e₁ : b = b₁\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb₁ : β\na₁ : α\nh₁ : (b₁, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nb₂ : β\na₂ : α\nh₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh :\n  Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b₁, a₁), property := h₁ }\n    { val := (b₂, a₂), property := h₂ }\ne₁ : b = b₁\n⊢ Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₁, a₁), property := h₁ })\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₂, a₂), property := h₂ })\n[PROOFSTEP]\nby_cases e₂ : b = b₂\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb₁ : β\na₁ : α\nh₁ : (b₁, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nb₂ : β\na₂ : α\nh₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh :\n  Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b₁, a₁), property := h₁ }\n    { val := (b₂, a₂), property := h₂ }\ne₁ : ¬b = b₁\n⊢ Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₁, a₁), property := h₁ })\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₂, a₂), property := h₂ })\n[PROOFSTEP]\nby_cases e₂ : b = b₂\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb₁ : β\na₁ : α\nh₁ : (b₁, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nb₂ : β\na₂ : α\nh₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh :\n  Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b₁, a₁), property := h₁ }\n    { val := (b₂, a₂), property := h₂ }\ne₁ : b = b₁\ne₂ : b = b₂\n⊢ Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₁, a₁), property := h₁ })\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₂, a₂), property := h₂ })\n[PROOFSTEP]\nsubsts b₁ b₂\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\na₁ a₂ : α\nh₁ : (b, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh₂ : (b, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh :\n  Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b, a₁), property := h₁ }\n    { val := (b, a₂), property := h₂ }\n⊢ Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b, a₁), property := h₁ })\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b, a₂), property := h₂ })\n[PROOFSTEP]\nsimpa only [subrel_val, Prod.lex_def, @irrefl _ s _ b, true_and_iff, false_or_iff, eq_self_iff_true, dif_pos,\n  Sum.lex_inr_inr] using h\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb₁ : β\na₁ : α\nh₁ : (b₁, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nb₂ : β\na₂ : α\nh₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh :\n  Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b₁, a₁), property := h₁ }\n    { val := (b₂, a₂), property := h₂ }\ne₁ : b = b₁\ne₂ : ¬b = b₂\n⊢ Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₁, a₁), property := h₁ })\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₂, a₂), property := h₂ })\n[PROOFSTEP]\nsubst b₁\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\na₁ : α\nb₂ : β\na₂ : α\nh₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\ne₂ : ¬b = b₂\nh₁ : (b, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh :\n  Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b, a₁), property := h₁ }\n    { val := (b₂, a₂), property := h₂ }\n⊢ Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b, a₁), property := h₁ })\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₂, a₂), property := h₂ })\n[PROOFSTEP]\nsimp only [subrel_val, Prod.lex_def, e₂, Prod.lex_def, dif_pos, subrel_val, eq_self_iff_true, or_false_iff, dif_neg,\n  not_false_iff, Sum.lex_inr_inl, false_and_iff] at h ⊢\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\na₁ : α\nb₂ : β\na₂ : α\nh₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\ne₂ : ¬b = b₂\nh₁ : (b, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh : s b b₂\n⊢ False\n[PROOFSTEP]\ncases' h₂ with _ _ _ _ h₂_h h₂_h <;> [exact asymm h h₂_h; exact e₂ rfl]\n  -- Porting note: `cc` hadn't ported yet.\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\na₁ : α\nb₂ : β\na₂ : α\nh₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\ne₂ : ¬b = b₂\nh₁ : (b, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh : s b b₂\n⊢ False\n[PROOFSTEP]\ncases' h₂ with _ _ _ _ h₂_h h₂_h\n[GOAL]\ncase neg.left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\na₁ : α\nb₂ : β\na₂ : α\ne₂ : ¬b = b₂\nh₁ : (b, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh : s b b₂\nh₂_h : s b₂ b\n⊢ False\n[PROOFSTEP]\nexact asymm h h₂_h\n[GOAL]\ncase neg.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝¹ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\na₁ a₂ : α\nh₁ : (b, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\ne₂ : ¬b = b\nh : s b b\nh✝ : r a₂ a\n⊢ False\n[PROOFSTEP]\nexact e₂ rfl\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb₁ : β\na₁ : α\nh₁ : (b₁, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nb₂ : β\na₂ : α\nh₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh :\n  Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b₁, a₁), property := h₁ }\n    { val := (b₂, a₂), property := h₂ }\ne₁ : ¬b = b₁\ne₂ : b = b₂\n⊢ Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₁, a₁), property := h₁ })\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₂, a₂), property := h₂ })\n[PROOFSTEP]\nsimp [e₂, dif_neg e₁, show b₂ ≠ b₁ from e₂ ▸ e₁]\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_4\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : Ordinal.{u_4}\nh✝ : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\nl : c < type r * type s\na : α\nb : β\nthis✝ : type r * typein s b + type r ≤ c\nthis : type r * typein s b + typein r a < c\nb₁ : β\na₁ : α\nh₁ : (b₁, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nb₂ : β\na₂ : α\nh₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}\nh :\n  Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b₁, a₁), property := h₁ }\n    { val := (b₂, a₂), property := h₂ }\ne₁ : ¬b = b₁\ne₂ : ¬b = b₂\n⊢ Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₁, a₁), property := h₁ })\n    ((fun a_1 =>\n        Subtype.casesOn a_1 fun val h =>\n          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})\n            val\n            (fun b' a' h =>\n              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }\n              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))\n            h)\n      { val := (b₂, a₂), property := h₂ })\n[PROOFSTEP]\nsimpa only [dif_neg e₁, dif_neg e₂, Prod.lex_def, subrel_val, Subtype.mk_eq_mk, Sum.lex_inl_inl] using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nh : IsLimit b\nH : ∀ (b' : Ordinal.{u_4}), b' < b → a * b' ≤ c\n⊢ ¬c < a * b\n[PROOFSTEP]\ninduction a using inductionOn with\n| H α r =>\n  induction b using inductionOn with\n  | H β s => exact mul_le_of_limit_aux h H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nh : IsLimit b\nH : ∀ (b' : Ordinal.{u_4}), b' < b → a * b' ≤ c\n⊢ ¬c < a * b\n[PROOFSTEP]\ninduction a using inductionOn with\n| H α r =>\n  induction b using inductionOn with\n  | H β s => exact mul_le_of_limit_aux h H\n[GOAL]\ncase H\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nh : IsLimit b\nα : Type u_4\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nH : ∀ (b' : Ordinal.{u_4}), b' < b → type r * b' ≤ c\n⊢ ¬c < type r * b\n[PROOFSTEP]\n\n| H α r =>\n  induction b using inductionOn with\n  | H β s => exact mul_le_of_limit_aux h H\n[GOAL]\ncase H\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nh : IsLimit b\nα : Type u_4\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nH : ∀ (b' : Ordinal.{u_4}), b' < b → type r * b' ≤ c\n⊢ ¬c < type r * b\n[PROOFSTEP]\ninduction b using inductionOn with\n| H β s => exact mul_le_of_limit_aux h H\n[GOAL]\ncase H\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nh : IsLimit b\nα : Type u_4\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nH : ∀ (b' : Ordinal.{u_4}), b' < b → type r * b' ≤ c\n⊢ ¬c < type r * b\n[PROOFSTEP]\ninduction b using inductionOn with\n| H β s => exact mul_le_of_limit_aux h H\n[GOAL]\ncase H.H\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\n⊢ ¬c < type r * type s\n[PROOFSTEP]\n\n| H β s => exact mul_le_of_limit_aux h H\n[GOAL]\ncase H.H\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\nα : Type u_4\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : IsLimit (type s)\nH : ∀ (b' : Ordinal.{u_4}), b' < type s → type r * b' ≤ c\n⊢ ¬c < type r * type s\n[PROOFSTEP]\nexact mul_le_of_limit_aux h H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\nh : 0 < a\nb : Ordinal.{u_4}\n⊢ (fun x x_1 => x * x_1) a b < (fun x x_1 => x * x_1) a (succ b)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\nh : 0 < a\nb : Ordinal.{u_4}\n⊢ a * b < a * succ b\n[PROOFSTEP]\nrw [mul_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\nh : 0 < a\nb : Ordinal.{u_4}\n⊢ a * b < a * b + a\n[PROOFSTEP]\nsimpa only [add_zero] using (add_lt_add_iff_left (a * b)).2 h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nh : IsLimit c\n⊢ a < b * c ↔ ∃ c', c' < c ∧ a < b * c'\n[PROOFSTEP]\nsimpa only [not_ball, not_le, bex_def] using not_congr (@mul_le_of_limit b c a h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh₁ : 0 < a\nh₂ : 0 < b\n⊢ 0 < a * b\n[PROOFSTEP]\nsimpa only [mul_zero] using mul_lt_mul_of_pos_left h₂ h₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\n⊢ a ≠ 0 → b ≠ 0 → a * b ≠ 0\n[PROOFSTEP]\nsimpa only [Ordinal.pos_iff_ne_zero] using mul_pos\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nl : IsLimit a\nb0 : 0 < b\n⊢ IsLimit (a * b)\n[PROOFSTEP]\nrcases zero_or_succ_or_limit b with (rfl | ⟨b, rfl⟩ | lb)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\nl : IsLimit a\nb0 : 0 < 0\n⊢ IsLimit (a * 0)\n[PROOFSTEP]\nexact b0.false.elim\n[GOAL]\ncase inr.inl.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\nl : IsLimit a\nb : Ordinal.{u_4}\nb0 : 0 < succ b\n⊢ IsLimit (a * succ b)\n[PROOFSTEP]\nrw [mul_succ]\n[GOAL]\ncase inr.inl.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\nl : IsLimit a\nb : Ordinal.{u_4}\nb0 : 0 < succ b\n⊢ IsLimit (a * b + a)\n[PROOFSTEP]\nexact add_isLimit _ l\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nl : IsLimit a\nb0 : 0 < b\nlb : IsLimit b\n⊢ IsLimit (a * b)\n[PROOFSTEP]\nexact mul_isLimit l.pos lb\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\n⊢ 0 • a = a * ↑0\n[PROOFSTEP]\nrw [zero_smul, Nat.cast_zero, mul_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nn : ℕ\na : Ordinal.{u_4}\n⊢ (n + 1) • a = a * ↑(n + 1)\n[PROOFSTEP]\nrw [succ_nsmul', Nat.cast_add, mul_add, Nat.cast_one, mul_one, smul_eq_mul n]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : b ≠ 0\n⊢ succ a ≤ b * succ a\n[PROOFSTEP]\nsimpa only [succ_zero, one_mul] using mul_le_mul_right' (succ_le_of_lt (Ordinal.pos_iff_ne_zero.2 h)) (succ a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : b ≠ 0\n⊢ a < b * succ (a / b)\n[PROOFSTEP]\nrw [div_def a h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : b ≠ 0\n⊢ a < b * succ (sInf {o | a < b * succ o})\n[PROOFSTEP]\nexact csInf_mem (div_nonempty h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : b ≠ 0\n⊢ a < b * (a / b) + b\n[PROOFSTEP]\nsimpa only [mul_succ] using lt_mul_succ_div a h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nb0 : b ≠ 0\nh : a < b * succ c\n⊢ a / b ≤ c\n[PROOFSTEP]\nrw [div_def a b0]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nb0 : b ≠ 0\nh : a < b * succ c\n⊢ sInf {o | a < b * succ o} ≤ c\n[PROOFSTEP]\nexact csInf_le' h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nh : c ≠ 0\n⊢ a < b / c ↔ c * succ a ≤ b\n[PROOFSTEP]\nrw [← not_le, div_le h, not_lt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nh : c ≠ 0\n⊢ 0 < b / c ↔ c ≤ b\n[PROOFSTEP]\nsimp [lt_div h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nc0 : c ≠ 0\n⊢ a ≤ b / c ↔ c * a ≤ b\n[PROOFSTEP]\ninduction a using limitRecOn with\n| H₁ => simp only [mul_zero, Ordinal.zero_le]\n| H₂ _ _ => rw [succ_le_iff, lt_div c0]\n| H₃ _ h₁ h₂ =>\n  revert h₁ h₂\n  simp (config := { contextual := true }) only [mul_le_of_limit, limit_le, iff_self_iff, forall_true_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nc0 : c ≠ 0\n⊢ a ≤ b / c ↔ c * a ≤ b\n[PROOFSTEP]\ninduction a using limitRecOn with\n| H₁ => simp only [mul_zero, Ordinal.zero_le]\n| H₂ _ _ => rw [succ_le_iff, lt_div c0]\n| H₃ _ h₁ h₂ =>\n  revert h₁ h₂\n  simp (config := { contextual := true }) only [mul_le_of_limit, limit_le, iff_self_iff, forall_true_iff]\n[GOAL]\ncase H₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nc0 : c ≠ 0\n⊢ 0 ≤ b / c ↔ c * 0 ≤ b\n[PROOFSTEP]\n\n| H₁ => simp only [mul_zero, Ordinal.zero_le]\n[GOAL]\ncase H₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nc0 : c ≠ 0\n⊢ 0 ≤ b / c ↔ c * 0 ≤ b\n[PROOFSTEP]\nsimp only [mul_zero, Ordinal.zero_le]\n[GOAL]\ncase H₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nc0 : c ≠ 0\no✝ : Ordinal.{u_4}\na✝ : o✝ ≤ b / c ↔ c * o✝ ≤ b\n⊢ succ o✝ ≤ b / c ↔ c * succ o✝ ≤ b\n[PROOFSTEP]\n\n| H₂ _ _ => rw [succ_le_iff, lt_div c0]\n[GOAL]\ncase H₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nc0 : c ≠ 0\no✝ : Ordinal.{u_4}\na✝ : o✝ ≤ b / c ↔ c * o✝ ≤ b\n⊢ succ o✝ ≤ b / c ↔ c * succ o✝ ≤ b\n[PROOFSTEP]\nrw [succ_le_iff, lt_div c0]\n[GOAL]\ncase H₃\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nc0 : c ≠ 0\no✝ : Ordinal.{u_4}\nh₁ : IsLimit o✝\nh₂ : ∀ (o' : Ordinal.{u_4}), o' < o✝ → (o' ≤ b / c ↔ c * o' ≤ b)\n⊢ o✝ ≤ b / c ↔ c * o✝ ≤ b\n[PROOFSTEP]\n\n| H₃ _ h₁ h₂ =>\n  revert h₁ h₂\n  simp (config := { contextual := true }) only [mul_le_of_limit, limit_le, iff_self_iff, forall_true_iff]\n[GOAL]\ncase H₃\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nc0 : c ≠ 0\no✝ : Ordinal.{u_4}\nh₁ : IsLimit o✝\nh₂ : ∀ (o' : Ordinal.{u_4}), o' < o✝ → (o' ≤ b / c ↔ c * o' ≤ b)\n⊢ o✝ ≤ b / c ↔ c * o✝ ≤ b\n[PROOFSTEP]\nrevert h₁ h₂\n[GOAL]\ncase H₃\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nc0 : c ≠ 0\no✝ : Ordinal.{u_4}\n⊢ IsLimit o✝ → (∀ (o' : Ordinal.{u_4}), o' < o✝ → (o' ≤ b / c ↔ c * o' ≤ b)) → (o✝ ≤ b / c ↔ c * o✝ ≤ b)\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [mul_le_of_limit, limit_le, iff_self_iff, forall_true_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nh : a ≤ b * c\nb0 : b = 0\n⊢ a / b ≤ c\n[PROOFSTEP]\nsimp only [b0, div_zero, Ordinal.zero_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nb0 : b = 0\n⊢ b * (a / b) ≤ a\n[PROOFSTEP]\nsimp only [b0, zero_mul, Ordinal.zero_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nb0 : b ≠ 0\nc : Ordinal.{u_4}\n⊢ (b * a + c) / b = a + c / b\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nb0 : b ≠ 0\nc : Ordinal.{u_4}\n⊢ (b * a + c) / b ≤ a + c / b\n[PROOFSTEP]\napply (div_le b0).2\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nb0 : b ≠ 0\nc : Ordinal.{u_4}\n⊢ b * a + c < b * succ (a + c / b)\n[PROOFSTEP]\nrw [mul_succ, mul_add, add_assoc, add_lt_add_iff_left]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nb0 : b ≠ 0\nc : Ordinal.{u_4}\n⊢ c < b * (c / b) + b\n[PROOFSTEP]\napply lt_mul_div_add _ b0\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nb0 : b ≠ 0\nc : Ordinal.{u_4}\n⊢ a + c / b ≤ (b * a + c) / b\n[PROOFSTEP]\nrw [le_div b0, mul_add, add_le_add_iff_left]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nb0 : b ≠ 0\nc : Ordinal.{u_4}\n⊢ b * (c / b) ≤ c\n[PROOFSTEP]\napply mul_div_le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : a < b\n⊢ a / b = 0\n[PROOFSTEP]\nrw [← Ordinal.le_zero, div_le <| Ordinal.pos_iff_ne_zero.1 <| (Ordinal.zero_le _).trans_lt h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : a < b\n⊢ a < b * succ 0\n[PROOFSTEP]\nsimpa only [succ_zero, mul_one] using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nb0 : b ≠ 0\n⊢ b * a / b = a\n[PROOFSTEP]\nsimpa only [add_zero, zero_div] using mul_add_div a b0 0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\n⊢ a / 1 = a\n[PROOFSTEP]\nsimpa only [one_mul] using mul_div_cancel a Ordinal.one_ne_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\nh : a ≠ 0\n⊢ a / a = 1\n[PROOFSTEP]\nsimpa only [mul_one] using mul_div_cancel 1 h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\na0 : a = 0\n⊢ a * (b - c) = a * b - a * c\n[PROOFSTEP]\nsimp only [a0, zero_mul, sub_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\na0 : ¬a = 0\nd : Ordinal.{u_4}\n⊢ a * (b - c) ≤ d ↔ a * b - a * c ≤ d\n[PROOFSTEP]\nrw [sub_le, ← le_div a0, sub_le, ← le_div a0, mul_add_div _ a0]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\n⊢ IsLimit (a + b) ↔ IsLimit b ∨ b = 0 ∧ IsLimit a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\n⊢ IsLimit (a + b) → IsLimit b ∨ b = 0 ∧ IsLimit a\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\n⊢ IsLimit b ∨ b = 0 ∧ IsLimit a → IsLimit (a + b)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit (a + b)\n⊢ IsLimit b ∨ b = 0 ∧ IsLimit a\n[PROOFSTEP]\nby_cases h' : b = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit (a + b)\nh' : b = 0\n⊢ IsLimit b ∨ b = 0 ∧ IsLimit a\n[PROOFSTEP]\nrw [h', add_zero] at h \n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit a\nh' : b = 0\n⊢ IsLimit b ∨ b = 0 ∧ IsLimit a\n[PROOFSTEP]\nright\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit a\nh' : b = 0\n⊢ b = 0 ∧ IsLimit a\n[PROOFSTEP]\nexact ⟨h', h⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit (a + b)\nh' : ¬b = 0\n⊢ IsLimit b ∨ b = 0 ∧ IsLimit a\n[PROOFSTEP]\nleft\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit (a + b)\nh' : ¬b = 0\n⊢ IsLimit b\n[PROOFSTEP]\nrw [← add_sub_cancel a b]\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit (a + b)\nh' : ¬b = 0\n⊢ IsLimit (a + b - a)\n[PROOFSTEP]\napply sub_isLimit h\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit (a + b)\nh' : ¬b = 0\n⊢ a < a + b\n[PROOFSTEP]\nsuffices : a + 0 < a + b\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit (a + b)\nh' : ¬b = 0\nthis : a + 0 < a + b\n⊢ a < a + b\ncase this\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit (a + b)\nh' : ¬b = 0\n⊢ a + 0 < a + b\n[PROOFSTEP]\nsimpa only [add_zero] using this\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit (a + b)\nh' : ¬b = 0\n⊢ a + 0 < a + b\n[PROOFSTEP]\nrwa [add_lt_add_iff_left, Ordinal.pos_iff_ne_zero]\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit b ∨ b = 0 ∧ IsLimit a\n⊢ IsLimit (a + b)\n[PROOFSTEP]\nrcases h with (h | ⟨rfl, h⟩)\n[GOAL]\ncase mpr.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : IsLimit b\n⊢ IsLimit (a + b)\ncase mpr.inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\nh : IsLimit a\n⊢ IsLimit (a + 0)\n[PROOFSTEP]\nexact add_isLimit a h\n[GOAL]\ncase mpr.inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\nh : IsLimit a\n⊢ IsLimit (a + 0)\n[PROOFSTEP]\nsimpa only [add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na c b : Ordinal.{u_4}\nx✝ : a ∣ a * b + c\nd : Ordinal.{u_4}\ne : a * b + c = a * d\n⊢ c = a * (d - b)\n[PROOFSTEP]\nrw [mul_sub, ← e, add_sub_cancel]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na c b : Ordinal.{u_4}\nx✝ : a ∣ c\nd : Ordinal.{u_4}\ne : c = a * d\n⊢ a ∣ a * b + c\n[PROOFSTEP]\nrw [e, ← mul_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na c b : Ordinal.{u_4}\nx✝ : a ∣ c\nd : Ordinal.{u_4}\ne : c = a * d\n⊢ a ∣ a * (b + d)\n[PROOFSTEP]\napply dvd_mul_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\na0 : a ≠ 0\nb : Ordinal.{u_4}\n⊢ a * (a * b / a) = a * b\n[PROOFSTEP]\nrw [mul_div_cancel _ a0]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na x✝ : Ordinal.{u_4}\nb0 : x✝ ≠ 0\nb : Ordinal.{u_4}\ne : x✝ = a * b\n⊢ a ≤ x✝\n[PROOFSTEP]\nsubst e\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nb0 : a * b ≠ 0\n⊢ a ≤ a * b\n[PROOFSTEP]\nsimpa only [mul_one] using\n  mul_le_mul_left' (one_le_iff_ne_zero.2 fun h : b = 0 => by simp only [h, mul_zero, Ne] at b0 ) a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nb0 : a * b ≠ 0\nh : b = 0\n⊢ False\n[PROOFSTEP]\nsimp only [h, mul_zero, Ne] at b0 \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh₁ : a ∣ b\nh₂ : b ∣ a\na0 : a = 0\n⊢ a = b\n[PROOFSTEP]\nsubst a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb : Ordinal.{u_4}\nh₁ : 0 ∣ b\nh₂ : b ∣ 0\n⊢ 0 = b\n[PROOFSTEP]\nexact (eq_zero_of_zero_dvd h₁).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh₁ : a ∣ b\nh₂ : b ∣ a\na0 : ¬a = 0\nb0 : b = 0\n⊢ a = b\n[PROOFSTEP]\nsubst b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\na0 : ¬a = 0\nh₁ : a ∣ 0\nh₂ : 0 ∣ a\n⊢ a = 0\n[PROOFSTEP]\nexact eq_zero_of_zero_dvd h₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\n⊢ a % 0 = a\n[PROOFSTEP]\nsimp only [mod_def, div_zero, zero_mul, sub_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : a < b\n⊢ a % b = a\n[PROOFSTEP]\nsimp only [mod_def, div_eq_zero_of_lt h, mul_zero, sub_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb : Ordinal.{u_4}\n⊢ 0 % b = 0\n[PROOFSTEP]\nsimp only [mod_def, zero_div, mul_zero, sub_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : b ≠ 0\n⊢ b * (a / b) + a % b < b * (a / b) + b\n[PROOFSTEP]\nrw [div_add_mod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nh : b ≠ 0\n⊢ a < b * (a / b) + b\n[PROOFSTEP]\nexact lt_mul_div_add a h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\na0 : a = 0\n⊢ a % a = 0\n[PROOFSTEP]\nsimp only [a0, zero_mod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\na0 : ¬a = 0\n⊢ a % a = 0\n[PROOFSTEP]\nsimp only [mod_def, div_self a0, mul_one, sub_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_4}\n⊢ a % 1 = 0\n[PROOFSTEP]\nsimp only [mod_def, div_one, one_mul, sub_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nH : a % b = 0\n⊢ a = b * (a / b)\n[PROOFSTEP]\nsimpa [H] using (div_add_mod a b).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_4}\nH : b ∣ a\n⊢ a % b = 0\n[PROOFSTEP]\nrcases H with ⟨c, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\n⊢ b * c % b = 0\n[PROOFSTEP]\nrcases eq_or_ne b 0 with (rfl | hb)\n[GOAL]\ncase intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Ordinal.{u_4}\n⊢ 0 * c % 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb c : Ordinal.{u_4}\nhb : b ≠ 0\n⊢ b * c % b = 0\n[PROOFSTEP]\nsimp [mod_def, hb]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nx y z : Ordinal.{u_4}\n⊢ (x * y + z) % x = z % x\n[PROOFSTEP]\nrcases eq_or_ne x 0 with rfl | hx\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ny z : Ordinal.{u_4}\n⊢ (0 * y + z) % 0 = z % 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nx y z : Ordinal.{u_4}\nhx : x ≠ 0\n⊢ (x * y + z) % x = z % x\n[PROOFSTEP]\nrwa [mod_def, mul_add_div, mul_add, ← sub_sub, add_sub_cancel, mod_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nx y : Ordinal.{u_4}\n⊢ x * y % x = 0\n[PROOFSTEP]\nsimpa using mul_add_mod_self x y 0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nh : c ∣ b\n⊢ a % b % c = a % c\n[PROOFSTEP]\nnth_rw 2 [← div_add_mod a b]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b c : Ordinal.{u_4}\nh : c ∣ b\n⊢ a % b % c = (b * (a / b) + a % b) % c\n[PROOFSTEP]\nrcases h with ⟨d, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na c d : Ordinal.{u_4}\n⊢ a % (c * d) % c = (c * d * (a / (c * d)) + a % (c * d)) % c\n[PROOFSTEP]\nrw [mul_assoc, mul_add_mod_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\no : Ordinal.{u}\nho : type r = o\nf : (a : Ordinal.{u}) → a < o → α\ni : ι\n⊢ typein r i < o\n[PROOFSTEP]\nrw [← ho]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\no : Ordinal.{u}\nho : type r = o\nf : (a : Ordinal.{u}) → a < o → α\ni : ι\n⊢ typein r i < type r\n[PROOFSTEP]\nexact typein_lt_type r i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u_4\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\nf : ι → α\ni : ι\n⊢ bfamilyOfFamily' r f (typein r i) (_ : typein r i < type r) = f i\n[PROOFSTEP]\nsimp only [bfamilyOfFamily', enum_typein]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\no : Ordinal.{u}\nho : type r = o\nf : (a : Ordinal.{u}) → a < o → α\ni : Ordinal.{u}\nhi : i < o\n⊢ i < type r\n[PROOFSTEP]\nrwa [ho]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\no : Ordinal.{u}\nho : type r = o\nf : (a : Ordinal.{u}) → a < o → α\ni : Ordinal.{u}\nhi : i < o\n⊢ familyOfBFamily' r ho f (enum r i (_ : i < type r)) = f i hi\n[PROOFSTEP]\nsimp only [familyOfBFamily', typein_enum]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{?u.274180}\nf : (a : Ordinal.{?u.274180}) → a < o → α\ni : Ordinal.{?u.274180}\nhi : i < o\n⊢ i < type fun x x_1 => x < x_1\n[PROOFSTEP]\nconvert hi\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{?u.274180}\nf : (a : Ordinal.{?u.274180}) → a < o → α\ni : Ordinal.{?u.274180}\nhi : i < o\n⊢ (type fun x x_1 => x < x_1) = o\n[PROOFSTEP]\nexact type_lt _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\no : Ordinal.{u}\nho : type r = o\nf : (a : Ordinal.{u}) → a < o → α\n⊢ range (familyOfBFamily' r ho f) = brange o f\n[PROOFSTEP]\nrefine' Set.ext fun a => ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\no : Ordinal.{u}\nho : type r = o\nf : (a : Ordinal.{u}) → a < o → α\na : α\n⊢ a ∈ range (familyOfBFamily' r ho f) → a ∈ brange o f\n[PROOFSTEP]\nrintro ⟨b, rfl⟩\n[GOAL]\ncase refine'_1.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\no : Ordinal.{u}\nho : type r = o\nf : (a : Ordinal.{u}) → a < o → α\nb : ι\n⊢ familyOfBFamily' r ho f b ∈ brange o f\n[PROOFSTEP]\napply mem_brange_self\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\no : Ordinal.{u}\nho : type r = o\nf : (a : Ordinal.{u}) → a < o → α\na : α\n⊢ a ∈ brange o f → a ∈ range (familyOfBFamily' r ho f)\n[PROOFSTEP]\nrintro ⟨i, hi, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\no : Ordinal.{u}\nho : type r = o\nf : (a : Ordinal.{u}) → a < o → α\ni : Ordinal.{u}\nhi : i < o\n⊢ f i hi ∈ range (familyOfBFamily' r ho f)\n[PROOFSTEP]\nexact ⟨_, familyOfBFamily'_enum _ _ _ _ _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\nf : ι → α\n⊢ brange (type r) (bfamilyOfFamily' r f) = range f\n[PROOFSTEP]\nrefine' Set.ext fun a => ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\nf : ι → α\na : α\n⊢ a ∈ brange (type r) (bfamilyOfFamily' r f) → a ∈ range f\n[PROOFSTEP]\nrintro ⟨i, hi, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\nf : ι → α\ni : Ordinal.{u}\nhi : i < type r\n⊢ bfamilyOfFamily' r f i hi ∈ range f\n[PROOFSTEP]\napply mem_range_self\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\nf : ι → α\na : α\n⊢ a ∈ range f → a ∈ brange (type r) (bfamilyOfFamily' r f)\n[PROOFSTEP]\nrintro ⟨b, rfl⟩\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\nf : ι → α\nb : ι\n⊢ f b ∈ brange (type r) (bfamilyOfFamily' r f)\n[PROOFSTEP]\nexact ⟨_, _, bfamilyOfFamily'_typein _ _ _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nho : o ≠ 0\nc : α\n⊢ (brange o fun x x => c) = {c}\n[PROOFSTEP]\nrw [← range_familyOfBFamily]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nho : o ≠ 0\nc : α\n⊢ range (familyOfBFamily o fun x x => c) = {c}\n[PROOFSTEP]\nexact @Set.range_const _ o.out.α (out_nonempty_iff_ne_zero.2 ho) c\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\n⊢ ord (iSup (succ ∘ card ∘ f)) ∈ upperBounds (range f)\n[PROOFSTEP]\nrintro a ⟨i, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\ni : ι\n⊢ f i ≤ ord (iSup (succ ∘ card ∘ f))\n[PROOFSTEP]\nexact le_of_lt (Cardinal.lt_ord.2 ((lt_succ _).trans_le (le_ciSup (Cardinal.bddAbove_range.{_, v} _) _)))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\na : Ordinal.{max u v}\n⊢ (∀ (x : Ordinal.{max u v}), x ∈ range f → x ≤ a) ↔ ∀ (i : ι), f i ≤ a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\na : Ordinal.{max u v}\n⊢ a < sup f ↔ ∃ i, a < f i\n[PROOFSTEP]\nsimpa only [not_forall, not_le] using not_congr (@sup_le_iff.{_, v} _ f a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nhf : ∀ (i : ι), f i ≠ sup f\na : Ordinal.{max u v}\nhao : a < sup f\n⊢ succ a < sup f\n[PROOFSTEP]\nby_contra' hoa\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nhf : ∀ (i : ι), f i ≠ sup f\na : Ordinal.{max u v}\nhao : a < sup f\nhoa : sup f ≤ succ a\n⊢ False\n[PROOFSTEP]\nexact hao.not_le (sup_le fun i => le_of_lt_succ <| (lt_of_le_of_ne (le_sup _ _) (hf i)).trans_le hoa)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\n⊢ sup f = 0 ↔ ∀ (i : ι), f i = 0\n[PROOFSTEP]\nrefine' ⟨fun h i => _, fun h => le_antisymm (sup_le fun i => Ordinal.le_zero.2 (h i)) (Ordinal.zero_le _)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : sup f = 0\ni : ι\n⊢ f i = 0\n[PROOFSTEP]\nrw [← Ordinal.le_zero, ← h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : sup f = 0\ni : ι\n⊢ f i ≤ sup f\n[PROOFSTEP]\nexact le_sup f i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{max u v} → Ordinal.{max u w}\nH : IsNormal f\nι : Type u\ng : ι → Ordinal.{max u v}\ninst✝ : Nonempty ι\na : Ordinal.{max u w}\n⊢ f (Ordinal.sup g) ≤ a ↔ Ordinal.sup (f ∘ g) ≤ a\n[PROOFSTEP]\nrw [sup_le_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{max u v} → Ordinal.{max u w}\nH : IsNormal f\nι : Type u\ng : ι → Ordinal.{max u v}\ninst✝ : Nonempty ι\na : Ordinal.{max u w}\n⊢ f (Ordinal.sup g) ≤ a ↔ ∀ (i : ι), (f ∘ g) i ≤ a\n[PROOFSTEP]\nsimp only [comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{max u v} → Ordinal.{max u w}\nH : IsNormal f\nι : Type u\ng : ι → Ordinal.{max u v}\ninst✝ : Nonempty ι\na : Ordinal.{max u w}\n⊢ f (Ordinal.sup g) ≤ a ↔ ∀ (i : ι), f (g i) ≤ a\n[PROOFSTEP]\nrw [H.le_set' Set.univ Set.univ_nonempty g]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{max u v} → Ordinal.{max u w}\nH : IsNormal f\nι : Type u\ng : ι → Ordinal.{max u v}\ninst✝ : Nonempty ι\na : Ordinal.{max u w}\n⊢ (∀ (a_1 : ι), a_1 ∈ Set.univ → f (g a_1) ≤ a) ↔ ∀ (i : ι), f (g i) ≤ a\n[PROOFSTEP]\nsimp [sup_le_iff]\n[GOAL]\ncase H₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{max u v} → Ordinal.{max u w}\nH : IsNormal f\nι : Type u\ng : ι → Ordinal.{max u v}\ninst✝ : Nonempty ι\na : Ordinal.{max u w}\n⊢ ∀ (o : Ordinal.{max u v}), Ordinal.sup g ≤ o ↔ ∀ (a : ι), a ∈ Set.univ → g a ≤ o\n[PROOFSTEP]\nsimp [sup_le_iff]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nf : α ⊕ β → Ordinal.{max (max u v) w}\n⊢ sup f = max (sup fun a => f (Sum.inl a)) (sup fun b => f (Sum.inr b))\n[PROOFSTEP]\napply (sup_le_iff.2 _).antisymm (max_le_iff.2 ⟨_, _⟩)\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nf : α ⊕ β → Ordinal.{max (max u v) w}\n⊢ ∀ (i : α ⊕ β), f i ≤ max (sup fun a => f (Sum.inl a)) (sup fun b => f (Sum.inr b))\n[PROOFSTEP]\nrintro (i | i)\n[GOAL]\ncase inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nf : α ⊕ β → Ordinal.{max (max u v) w}\ni : α\n⊢ f (Sum.inl i) ≤ max (sup fun a => f (Sum.inl a)) (sup fun b => f (Sum.inr b))\n[PROOFSTEP]\nexact le_max_of_le_left (le_sup _ i)\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nf : α ⊕ β → Ordinal.{max (max u v) w}\ni : β\n⊢ f (Sum.inr i) ≤ max (sup fun a => f (Sum.inl a)) (sup fun b => f (Sum.inr b))\n[PROOFSTEP]\nexact le_max_of_le_right (le_sup _ i)\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nf : α ⊕ β → Ordinal.{max (max u v) w}\n⊢ (sup fun a => f (Sum.inl a)) ≤ sup f\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nf : α ⊕ β → Ordinal.{max (max u v) w}\n⊢ (sup fun b => f (Sum.inr b)) ≤ sup f\n[PROOFSTEP]\nall_goals\n  apply sup_le_of_range_subset.{_, max u v, w}\n  rintro i ⟨a, rfl⟩\n  apply mem_range_self\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nf : α ⊕ β → Ordinal.{max (max u v) w}\n⊢ (sup fun a => f (Sum.inl a)) ≤ sup f\n[PROOFSTEP]\napply sup_le_of_range_subset.{_, max u v, w}\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nf : α ⊕ β → Ordinal.{max (max u v) w}\n⊢ (range fun a => f (Sum.inl a)) ⊆ range f\n[PROOFSTEP]\nrintro i ⟨a, rfl⟩\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nf : α ⊕ β → Ordinal.{max (max u v) w}\na : α\n⊢ (fun a => f (Sum.inl a)) a ∈ range f\n[PROOFSTEP]\napply mem_range_self\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nf : α ⊕ β → Ordinal.{max (max u v) w}\n⊢ (sup fun b => f (Sum.inr b)) ≤ sup f\n[PROOFSTEP]\napply sup_le_of_range_subset.{_, max u v, w}\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nf : α ⊕ β → Ordinal.{max (max u v) w}\n⊢ (range fun b => f (Sum.inr b)) ⊆ range f\n[PROOFSTEP]\nrintro i ⟨a, rfl⟩\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nf : α ⊕ β → Ordinal.{max (max u v) w}\na : β\n⊢ (fun b => f (Sum.inr b)) a ∈ range f\n[PROOFSTEP]\napply mem_range_self\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ : β → β → Prop\nt : γ → γ → Prop\ns : Set Ordinal.{u}\nhs : Small.{u, u + 1} ↑s\na : Ordinal.{u}\nha : a ∈ s\n⊢ a ≤ sup fun x => ↑(↑(equivShrink ↑s).symm x)\n[PROOFSTEP]\nconvert le_sup.{u, u} (fun x => ((@equivShrink s hs).symm x).val) ((@equivShrink s hs) ⟨a, ha⟩)\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ : β → β → Prop\nt : γ → γ → Prop\ns : Set Ordinal.{u}\nhs : Small.{u, u + 1} ↑s\na : Ordinal.{u}\nha : a ∈ s\n⊢ a = ↑(↑(equivShrink ↑s).symm (↑(equivShrink ↑s) { val := a, property := ha }))\n[PROOFSTEP]\nrw [symm_apply_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (Quotient.out o).α → ↑(Iio o) :=\n  fun x => { val := typein (fun x x_1 => x < x_1) x, property := (_ : typein (fun x x_1 => x < x_1) x < o) }\nb : ↑(Iio o)\n⊢ ↑b < type fun x x_1 => x < x_1\n[PROOFSTEP]\nrw [type_lt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (Quotient.out o).α → ↑(Iio o) :=\n  fun x => { val := typein (fun x x_1 => x < x_1) x, property := (_ : typein (fun x x_1 => x < x_1) x < o) }\nb : ↑(Iio o)\n⊢ ↑b < o\n[PROOFSTEP]\nexact b.prop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\n⊢ Small.{u, u + 1} ↑(Iic o)\n[PROOFSTEP]\nrw [← Iio_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\n⊢ Small.{u, u + 1} ↑(Iio (succ o))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ : β → β → Prop\nt : γ → γ → Prop\ns : Set Cardinal.{u}\nhs : BddAbove s\na : Ordinal.{u}\n⊢ ord (sSup s) ≤ a ↔ sSup (ord '' s) ≤ a\n[PROOFSTEP]\nrw [csSup_le_iff' (bddAbove_iff_small.2 (@small_image _ _ _ s (Cardinal.bddAbove_iff_small.1 hs))), ord_le,\n  csSup_le_iff' hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ : β → β → Prop\nt : γ → γ → Prop\ns : Set Cardinal.{u}\nhs : BddAbove s\na : Ordinal.{u}\n⊢ (∀ (x : Cardinal.{u}), x ∈ s → x ≤ card a) ↔ ∀ (x : Ordinal.{u}), x ∈ ord '' s → x ≤ a\n[PROOFSTEP]\nsimp [ord_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Sort u_4\nf : ι → Cardinal.{u_5}\nhf : BddAbove (range f)\n⊢ ord (iSup f) = ⨆ (i : ι), ord (f i)\n[PROOFSTEP]\nunfold iSup\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Sort u_4\nf : ι → Cardinal.{u_5}\nhf : BddAbove (range f)\n⊢ ord (sSup (range f)) = sSup (range fun i => ord (f i))\n[PROOFSTEP]\nconvert sSup_ord hf\n[GOAL]\ncase h.e'_3.h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Sort u_4\nf : ι → Cardinal.{u_5}\nhf : BddAbove (range f)\n⊢ (range fun i => ord (f i)) = ord '' range f\n[PROOFSTEP]\nconv_lhs => change range (ord ∘ f)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Sort u_4\nf : ι → Cardinal.{u_5}\nhf : BddAbove (range f)\n| range fun i => ord (f i)\n[PROOFSTEP]\nchange range (ord ∘ f)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Sort u_4\nf : ι → Cardinal.{u_5}\nhf : BddAbove (range f)\n| range fun i => ord (f i)\n[PROOFSTEP]\nchange range (ord ∘ f)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Sort u_4\nf : ι → Cardinal.{u_5}\nhf : BddAbove (range f)\n| range fun i => ord (f i)\n[PROOFSTEP]\nchange range (ord ∘ f)\n[GOAL]\ncase h.e'_3.h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Sort u_4\nf : ι → Cardinal.{u_5}\nhf : BddAbove (range f)\n⊢ range (ord ∘ f) = ord '' range f\n[PROOFSTEP]\nrw [range_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι ι' : Type u\nr : ι → ι → Prop\nr' : ι' → ι' → Prop\ninst✝¹ : IsWellOrder ι r\ninst✝ : IsWellOrder ι' r'\no : Ordinal.{u}\nho : type r = o\nho' : type r' = o\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\ni : ι\n⊢ familyOfBFamily' r ho f i ≤ sup (familyOfBFamily' r' ho' f)\n[PROOFSTEP]\ncases'\n  typein_surj r'\n    (by\n      rw [ho', ← ho]\n      exact typein_lt_type r i) with\n  j hj\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι ι' : Type u\nr : ι → ι → Prop\nr' : ι' → ι' → Prop\ninst✝¹ : IsWellOrder ι r\ninst✝ : IsWellOrder ι' r'\no : Ordinal.{u}\nho : type r = o\nho' : type r' = o\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\ni : ι\n⊢ ?m.307394 < type r'\n[PROOFSTEP]\nrw [ho', ← ho]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι ι' : Type u\nr : ι → ι → Prop\nr' : ι' → ι' → Prop\ninst✝¹ : IsWellOrder ι r\ninst✝ : IsWellOrder ι' r'\no : Ordinal.{u}\nho : type r = o\nho' : type r' = o\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\ni : ι\n⊢ ?m.307394 < type r\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι ι' : Type u\nr : ι → ι → Prop\nr' : ι' → ι' → Prop\ninst✝¹ : IsWellOrder ι r\ninst✝ : IsWellOrder ι' r'\no : Ordinal.{u}\nho : type r = o\nho' : type r' = o\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\ni : ι\n⊢ Ordinal.{u}\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι ι' : Type u\nr : ι → ι → Prop\nr' : ι' → ι' → Prop\ninst✝¹ : IsWellOrder ι r\ninst✝ : IsWellOrder ι' r'\no : Ordinal.{u}\nho : type r = o\nho' : type r' = o\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\ni : ι\n⊢ Ordinal.{u}\n[PROOFSTEP]\nexact typein_lt_type r i\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι ι' : Type u\nr : ι → ι → Prop\nr' : ι' → ι' → Prop\ninst✝¹ : IsWellOrder ι r\ninst✝ : IsWellOrder ι' r'\no : Ordinal.{u}\nho : type r = o\nho' : type r' = o\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\ni : ι\nj : ι'\nhj : typein r' j = typein r i\n⊢ familyOfBFamily' r ho f i ≤ sup (familyOfBFamily' r' ho' f)\n[PROOFSTEP]\nsimp_rw [familyOfBFamily', ← hj]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι ι' : Type u\nr : ι → ι → Prop\nr' : ι' → ι' → Prop\ninst✝¹ : IsWellOrder ι r\ninst✝ : IsWellOrder ι' r'\no : Ordinal.{u}\nho : type r = o\nho' : type r' = o\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\ni : ι\nj : ι'\nhj : typein r' j = typein r i\n⊢ f (typein r' j) (_ : typein r' j < o) ≤ sup fun i => f (typein r' i) (_ : typein r' i < o)\n[PROOFSTEP]\napply le_sup\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι ι' : Type u\nr : ι → ι → Prop\nr' : ι' → ι' → Prop\ninst✝¹ : IsWellOrder ι r\ninst✝ : IsWellOrder ι' r'\no : Ordinal.{u}\nho : type r = o\nho' : type r' = o\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\n⊢ range (familyOfBFamily' r ho f) = range (familyOfBFamily' r' ho' f)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\n⊢ sSup (brange o f) = bsup o f\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\n⊢ brange o f = range (familyOfBFamily o f)\n[PROOFSTEP]\nrw [range_familyOfBFamily]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr : ι → ι → Prop\ninst✝ : IsWellOrder ι r\nf : ι → Ordinal.{max u v}\n⊢ bsup (type r) (bfamilyOfFamily' r f) = sup f\n[PROOFSTEP]\nsimp only [← sup_eq_bsup' r, enum_typein, familyOfBFamily', bfamilyOfFamily']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr r' : ι → ι → Prop\ninst✝¹ : IsWellOrder ι r\ninst✝ : IsWellOrder ι r'\nf : ι → Ordinal.{max u v}\n⊢ bsup (type r) (bfamilyOfFamily' r f) = bsup (type r') (bfamilyOfFamily' r' f)\n[PROOFSTEP]\nrw [bsup_eq_sup', bsup_eq_sup']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no₁ o₂ : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o₁ → Ordinal.{max u v}\nho : o₁ = o₂\n⊢ bsup o₁ f = bsup o₂ fun a h => f a (_ : a < o₁)\n[PROOFSTEP]\nsubst ho\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no₁ : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o₁ → Ordinal.{max u v}\n⊢ bsup o₁ f = bsup o₁ fun a h => f a (_ : a < o₁)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\na : Ordinal.{max u v}\nh : ∀ (i : (Quotient.out o).α), familyOfBFamily o f i ≤ a\ni : Ordinal.{u}\nhi : i < o\n⊢ f i hi ≤ a\n[PROOFSTEP]\nrw [← familyOfBFamily_enum o f]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\na : Ordinal.{max u v}\nh : ∀ (i : (Quotient.out o).α), familyOfBFamily o f i ≤ a\ni : Ordinal.{u}\nhi : i < o\n⊢ familyOfBFamily o f (enum (fun x x_1 => x < x_1) i (_ : i < type fun x x_1 => x < x_1)) ≤ a\n[PROOFSTEP]\nexact h _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\na : Ordinal.{max u v}\n⊢ a < bsup o f ↔ ∃ i hi, a < f i hi\n[PROOFSTEP]\nsimpa only [not_forall, not_le] using not_congr (@bsup_le_iff.{_, v} _ f a)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{max u v} → Ordinal.{max u w}\nH : IsNormal f\no : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\ng : (a : Ordinal.{u}) → a < type r → Ordinal.{max u v}\nh : type r ≠ 0\n⊢ f (Ordinal.bsup (type r) g) = Ordinal.bsup (type r) fun a h => f (g a h)\n[PROOFSTEP]\nhaveI := type_ne_zero_iff_nonempty.1 h\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{max u v} → Ordinal.{max u w}\nH : IsNormal f\no : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\ng : (a : Ordinal.{u}) → a < type r → Ordinal.{max u v}\nh : type r ≠ 0\nthis : Nonempty α\n⊢ f (Ordinal.bsup (type r) g) = Ordinal.bsup (type r) fun a h => f (g a h)\n[PROOFSTEP]\nrw [← sup_eq_bsup' r, IsNormal.sup.{_, v, w} H, ← sup_eq_bsup' r]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{max u v} → Ordinal.{max u w}\nH : IsNormal f\no : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\ng : (a : Ordinal.{u}) → a < type r → Ordinal.{max u v}\nh : type r ≠ 0\nthis : Nonempty α\n⊢ Ordinal.sup (f ∘ familyOfBFamily' r ?ho g) = Ordinal.sup (familyOfBFamily' r ?ho fun a h => f (g a h))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase ho\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{max u v} → Ordinal.{max u w}\nH : IsNormal f\no : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\ng : (a : Ordinal.{u}) → a < type r → Ordinal.{max u v}\nh : type r ≠ 0\nthis : Nonempty α\n⊢ type r = type r\n[PROOFSTEP]\nrfl\n[GOAL]\ncase ho\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{max u v} → Ordinal.{max u w}\nH : IsNormal f\no : Ordinal.{u}\nα : Type u\nr : α → α → Prop\nx✝ : IsWellOrder α r\ng : (a : Ordinal.{u}) → a < type r → Ordinal.{max u v}\nh : type r ≠ 0\nthis : Nonempty α\n⊢ type r = type r\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\nhf : ∀ {i : Ordinal.{u}} (h : i < o), f i h ≠ bsup o f\na : Ordinal.{max u v}\n⊢ a < bsup o f → succ a < bsup o f\n[PROOFSTEP]\nrw [← sup_eq_bsup] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\nhf : ∀ {i : Ordinal.{u}} (h : i < o), f i h ≠ sup (familyOfBFamily o f)\na : Ordinal.{max u v}\n⊢ a < sup (familyOfBFamily o f) → succ a < sup (familyOfBFamily o f)\n[PROOFSTEP]\nexact sup_not_succ_of_ne_sup fun i => hf _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nf : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_5 u_4}\n⊢ bsup o f = 0 ↔ ∀ (i : Ordinal.{u_4}) (hi : i < o), f i hi = 0\n[PROOFSTEP]\nrefine' ⟨fun h i hi => _, fun h => le_antisymm (bsup_le fun i hi => Ordinal.le_zero.2 (h i hi)) (Ordinal.zero_le _)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nf : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_5 u_4}\nh : bsup o f = 0\ni : Ordinal.{u_4}\nhi : i < o\n⊢ f i hi = 0\n[PROOFSTEP]\nrw [← Ordinal.le_zero, ← h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nf : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_5 u_4}\nh : bsup o f = 0\ni : Ordinal.{u_4}\nhi : i < o\n⊢ f i hi ≤ bsup o f\n[PROOFSTEP]\nexact le_bsup f i hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : (a : Ordinal.{u_4}) → a < 1 → Ordinal.{max u_4 u_5}\n⊢ bsup 1 f = f 0 (_ : 0 < 1)\n[PROOFSTEP]\nsimp_rw [← sup_eq_bsup, sup_unique, familyOfBFamily, familyOfBFamily', typein_one_out]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\no' : Ordinal.{v}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max (max u v) w}\ng : (a : Ordinal.{v}) → a < o' → Ordinal.{max (max u v) w}\nh : brange o f ⊆ brange o' g\ni : Ordinal.{u}\nhi : i < o\n⊢ f i hi ≤ bsup o' g\n[PROOFSTEP]\nobtain ⟨j, hj, hj'⟩ := h ⟨i, hi, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\no' : Ordinal.{v}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max (max u v) w}\ng : (a : Ordinal.{v}) → a < o' → Ordinal.{max (max u v) w}\nh : brange o f ⊆ brange o' g\ni : Ordinal.{u}\nhi : i < o\nj : Ordinal.{v}\nhj : j < o'\nhj' : g j hj = f i hi\n⊢ f i hi ≤ bsup o' g\n[PROOFSTEP]\nrw [← hj']\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\no' : Ordinal.{v}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max (max u v) w}\ng : (a : Ordinal.{v}) → a < o' → Ordinal.{max (max u v) w}\nh : brange o f ⊆ brange o' g\ni : Ordinal.{u}\nhi : i < o\nj : Ordinal.{v}\nhj : j < o'\nhj' : g j hj = f i hi\n⊢ g j hj ≤ bsup o' g\n[PROOFSTEP]\napply le_bsup\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\na : Ordinal.{max v u}\n⊢ lsub f ≤ a ↔ ∀ (i : ι), f i < a\n[PROOFSTEP]\nconvert sup_le_iff.{_, v} (f := succ ∘ f) (a := a) using 2\n  -- Porting note: `comp_apply` is required.\n[GOAL]\ncase h.e'_2.h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\na : Ordinal.{max v u}\na✝ : ι\n⊢ f a✝ < a ↔ (succ ∘ f) a✝ ≤ a\n[PROOFSTEP]\nsimp only [comp_apply, succ_le_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\na : Ordinal.{max v u}\n⊢ a < lsub f ↔ ∃ i, a ≤ f i\n[PROOFSTEP]\nsimpa only [not_forall, not_lt, not_le] using not_congr (@lsub_le_iff.{_, v} _ f a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\n⊢ sup f = lsub f ∨ succ (sup f) = lsub f\n[PROOFSTEP]\ncases' eq_or_lt_of_le (sup_le_lsub.{_, v} f) with h h\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : sup f = lsub f\n⊢ sup f = lsub f ∨ succ (sup f) = lsub f\n[PROOFSTEP]\nexact Or.inl h\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : sup f < lsub f\n⊢ sup f = lsub f ∨ succ (sup f) = lsub f\n[PROOFSTEP]\nexact Or.inr ((succ_le_of_lt h).antisymm (lsub_le_sup_succ f))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\n⊢ succ (sup f) ≤ lsub f ↔ ∃ i, f i = sup f\n[PROOFSTEP]\nrefine' ⟨fun h => _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : succ (sup f) ≤ lsub f\n⊢ ∃ i, f i = sup f\n[PROOFSTEP]\nby_contra' hf\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : succ (sup f) ≤ lsub f\nhf : ∀ (i : ι), f i ≠ sup f\n⊢ False\n[PROOFSTEP]\nexact (succ_le_iff.1 h).ne ((sup_le_lsub f).antisymm (lsub_le (ne_sup_iff_lt_sup.1 hf)))\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\n⊢ (∃ i, f i = sup f) → succ (sup f) ≤ lsub f\n[PROOFSTEP]\nrintro ⟨_, hf⟩\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nw✝ : ι\nhf : f w✝ = sup f\n⊢ succ (sup f) ≤ lsub f\n[PROOFSTEP]\nrw [succ_le_iff, ← hf]\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nw✝ : ι\nhf : f w✝ = sup f\n⊢ f w✝ < lsub f\n[PROOFSTEP]\nexact lt_lsub _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\n⊢ sup f = lsub f ↔ ∀ (a : Ordinal.{max v u}), a < lsub f → succ a < lsub f\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun hf => le_antisymm (sup_le_lsub f) (lsub_le fun i => _)⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : sup f = lsub f\n⊢ ∀ (a : Ordinal.{max v u}), a < lsub f → succ a < lsub f\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : sup f = lsub f\n⊢ ∀ (a : Ordinal.{max v u}), a < sup f → succ a < sup f\n[PROOFSTEP]\nexact fun a => sup_not_succ_of_ne_sup fun i => (lsub_le_iff.1 (le_of_eq h.symm) i).ne\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nhf : ∀ (a : Ordinal.{max v u}), a < lsub f → succ a < lsub f\ni : ι\n⊢ f i < sup f\n[PROOFSTEP]\nby_contra' hle\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nhf : ∀ (a : Ordinal.{max v u}), a < lsub f → succ a < lsub f\ni : ι\nhle : sup f ≤ f i\n⊢ False\n[PROOFSTEP]\nhave heq := (sup_succ_eq_lsub f).2 ⟨i, le_antisymm (le_sup _ _) hle⟩\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nhf : ∀ (a : Ordinal.{max v u}), a < lsub f → succ a < lsub f\ni : ι\nhle : sup f ≤ f i\nheq : succ (sup f) = lsub f\n⊢ False\n[PROOFSTEP]\nhave :=\n  hf _\n    (by\n      rw [← heq]\n      exact lt_succ (sup f))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nhf : ∀ (a : Ordinal.{max v u}), a < lsub f → succ a < lsub f\ni : ι\nhle : sup f ≤ f i\nheq : succ (sup f) = lsub f\n⊢ ?m.327001 < lsub f\n[PROOFSTEP]\nrw [← heq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nhf : ∀ (a : Ordinal.{max v u}), a < lsub f → succ a < lsub f\ni : ι\nhle : sup f ≤ f i\nheq : succ (sup f) = lsub f\n⊢ ?m.327001 < succ (sup f)\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nhf : ∀ (a : Ordinal.{max v u}), a < lsub f → succ a < lsub f\ni : ι\nhle : sup f ≤ f i\nheq : succ (sup f) = lsub f\n⊢ Ordinal.{max v u}\n[PROOFSTEP]\nexact lt_succ (sup f)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nhf : ∀ (a : Ordinal.{max v u}), a < lsub f → succ a < lsub f\ni : ι\nhle : sup f ≤ f i\nheq : succ (sup f) = lsub f\nthis : succ (sup f) < lsub f\n⊢ False\n[PROOFSTEP]\nrw [heq] at this \n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nhf : ∀ (a : Ordinal.{max v u}), a < lsub f → succ a < lsub f\ni : ι\nhle : sup f ≤ f i\nheq : succ (sup f) = lsub f\nthis : lsub f < lsub f\n⊢ False\n[PROOFSTEP]\nexact this.false\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : sup f = lsub f\ni : ι\n⊢ f i < sup f\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : sup f = lsub f\ni : ι\n⊢ f i < lsub f\n[PROOFSTEP]\napply lt_lsub\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u_4\nh : IsEmpty ι\nf : ι → Ordinal.{max u_5 u_4}\n⊢ lsub f = 0\n[PROOFSTEP]\nrw [← Ordinal.le_zero, lsub_le_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u_4\nh : IsEmpty ι\nf : ι → Ordinal.{max u_5 u_4}\n⊢ ∀ (i : ι), f i < 0\n[PROOFSTEP]\nexact h.elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\n⊢ lsub f = 0 ↔ IsEmpty ι\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨fun i => _⟩, fun h => @lsub_empty _ h _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : lsub f = 0\ni : ι\n⊢ False\n[PROOFSTEP]\nhave := @lsub_pos.{_, v} _ ⟨i⟩ f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : lsub f = 0\ni : ι\nthis : 0 < lsub f\n⊢ False\n[PROOFSTEP]\nrw [h] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\nh : lsub f = 0\ni : ι\nthis : 0 < 0\n⊢ False\n[PROOFSTEP]\nexact this.false\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nι' : Type v\nf : ι → Ordinal.{max (max u v) w}\ng : ι' → Ordinal.{max (max u v) w}\nh : range f ⊆ range g\n⊢ range (succ ∘ f) ⊆ range (succ ∘ g)\n[PROOFSTEP]\nconvert Set.image_subset succ h\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nι' : Type v\nf : ι → Ordinal.{max (max u v) w}\ng : ι' → Ordinal.{max (max u v) w}\nh : range f ⊆ range g\n⊢ range (succ ∘ f) = succ '' range f\n[PROOFSTEP]\napply Set.range_comp\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nι' : Type v\nf : ι → Ordinal.{max (max u v) w}\ng : ι' → Ordinal.{max (max u v) w}\nh : range f ⊆ range g\n⊢ range (succ ∘ g) = succ '' range g\n[PROOFSTEP]\napply Set.range_comp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\n⊢ o ≤ lsub fun i => typein (fun x x_1 => x < x_1) i\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nh : (lsub fun i => typein (fun x x_1 => x < x_1) i) < o\n⊢ False\n[PROOFSTEP]\nconv_rhs at h => rw [← type_lt o]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nh : (lsub fun i => typein (fun x x_1 => x < x_1) i) < o\n| o\n[PROOFSTEP]\nrw [← type_lt o]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nh : (lsub fun i => typein (fun x x_1 => x < x_1) i) < o\n| o\n[PROOFSTEP]\nrw [← type_lt o]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nh : (lsub fun i => typein (fun x x_1 => x < x_1) i) < o\n| o\n[PROOFSTEP]\nrw [← type_lt o]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nh : (lsub fun i => typein (fun x x_1 => x < x_1) i) < type fun x x_1 => x < x_1\n⊢ False\n[PROOFSTEP]\nsimpa [typein_enum] using lt_lsub.{u, u} (typein (· < ·)) (enum (· < ·) _ h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nho : ∀ (a : Ordinal.{u}), a < o → succ a < o\n⊢ sup (typein fun x x_1 => x < x_1) = o\n[PROOFSTEP]\nrw [(sup_eq_lsub_iff_succ.{u, u} (typein (· < ·))).2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nho : ∀ (a : Ordinal.{u}), a < o → succ a < o\n⊢ lsub (typein fun x x_1 => x < x_1) = o\n[PROOFSTEP]\nrw [lsub_typein o]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nho : ∀ (a : Ordinal.{u}), a < o → succ a < o\n⊢ ∀ (a : Ordinal.{u}), a < lsub (typein fun x x_1 => x < x_1) → succ a < lsub (typein fun x x_1 => x < x_1)\n[PROOFSTEP]\nrw [lsub_typein o]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nho : ∀ (a : Ordinal.{u}), a < o → succ a < o\n⊢ ∀ (a : Ordinal.{u}), a < o → succ a < o\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\n⊢ sup (typein fun x x_1 => x < x_1) = o\n[PROOFSTEP]\ncases' sup_eq_lsub_or_sup_succ_eq_lsub.{u, u} (typein ((· < ·) : (succ o).out.α → (succ o).out.α → Prop)) with h h\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nh : sup (typein fun x x_1 => x < x_1) = lsub (typein fun x x_1 => x < x_1)\n⊢ sup (typein fun x x_1 => x < x_1) = o\n[PROOFSTEP]\nrw [sup_eq_lsub_iff_succ] at h \n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nh : ∀ (a : Ordinal.{u}), a < lsub (typein fun x x_1 => x < x_1) → succ a < lsub (typein fun x x_1 => x < x_1)\n⊢ sup (typein fun x x_1 => x < x_1) = o\n[PROOFSTEP]\nsimp only [lsub_typein] at h \n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nh : ∀ (a : Ordinal.{u}), a < succ o → succ a < succ o\n⊢ sup (typein fun x x_1 => x < x_1) = o\n[PROOFSTEP]\nexact (h o (lt_succ o)).false.elim\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nh : succ (sup (typein fun x x_1 => x < x_1)) = lsub (typein fun x x_1 => x < x_1)\n⊢ sup (typein fun x x_1 => x < x_1) = o\n[PROOFSTEP]\nrw [← succ_eq_succ_iff, h]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nh : succ (sup (typein fun x x_1 => x < x_1)) = lsub (typein fun x x_1 => x < x_1)\n⊢ lsub (typein fun x x_1 => x < x_1) = succ o\n[PROOFSTEP]\napply lsub_typein\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι ι' : Type u\nr : ι → ι → Prop\nr' : ι' → ι' → Prop\ninst✝¹ : IsWellOrder ι r\ninst✝ : IsWellOrder ι' r'\no : Ordinal.{u}\nho : type r = o\nho' : type r' = o\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\n⊢ lsub (familyOfBFamily' r ho f) = lsub (familyOfBFamily' r' ho' f)\n[PROOFSTEP]\nrw [lsub_eq_blsub', lsub_eq_blsub']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nr r' : ι → ι → Prop\ninst✝¹ : IsWellOrder ι r\ninst✝ : IsWellOrder ι r'\nf : ι → Ordinal.{max u v}\n⊢ blsub (type r) (bfamilyOfFamily' r f) = blsub (type r') (bfamilyOfFamily' r' f)\n[PROOFSTEP]\nrw [blsub_eq_lsub', blsub_eq_lsub']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no₁ o₂ : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o₁ → Ordinal.{max u v}\nho : o₁ = o₂\n⊢ blsub o₁ f = blsub o₂ fun a h => f a (_ : a < o₁)\n[PROOFSTEP]\nsubst ho\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no₁ : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o₁ → Ordinal.{max u v}\n⊢ blsub o₁ f = blsub o₁ fun a h => f a (_ : a < o₁)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\na : Ordinal.{max u v}\n⊢ blsub o f ≤ a ↔ ∀ (i : Ordinal.{u}) (h : i < o), f i h < a\n[PROOFSTEP]\nconvert bsup_le_iff.{_, v} (f := fun a ha => succ (f a ha)) (a := a) using 2\n[GOAL]\ncase h.e'_2.h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\na : Ordinal.{max u v}\na✝ : Ordinal.{u}\n⊢ (∀ (h : a✝ < o), f a✝ h < a) ↔ ∀ (h : a✝ < o), succ (f a✝ h) ≤ a\n[PROOFSTEP]\nsimp_rw [succ_le_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (b : Ordinal.{u}) → b < o → Ordinal.{max u v}\na : Ordinal.{max u v}\n⊢ a < blsub o f ↔ ∃ i hi, a ≤ f i hi\n[PROOFSTEP]\nsimpa only [not_forall, not_lt, not_le] using not_congr (@blsub_le_iff.{_, v} _ f a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\n⊢ bsup o f = blsub o f ∨ succ (bsup o f) = blsub o f\n[PROOFSTEP]\nrw [← sup_eq_bsup, ← lsub_eq_blsub]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\n⊢ sup (familyOfBFamily o f) = lsub (familyOfBFamily o f) ∨ succ (sup (familyOfBFamily o f)) = lsub (familyOfBFamily o f)\n[PROOFSTEP]\nexact sup_eq_lsub_or_sup_succ_eq_lsub _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\n⊢ succ (bsup o f) ≤ blsub o f ↔ ∃ i hi, f i hi = bsup o f\n[PROOFSTEP]\nrefine' ⟨fun h => _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\nh : succ (bsup o f) ≤ blsub o f\n⊢ ∃ i hi, f i hi = bsup o f\n[PROOFSTEP]\nby_contra' hf\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\nh : succ (bsup o f) ≤ blsub o f\nhf : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi ≠ bsup o f\n⊢ False\n[PROOFSTEP]\nexact ne_of_lt (succ_le_iff.1 h) (le_antisymm (bsup_le_blsub f) (blsub_le (lt_bsup_of_ne_bsup.1 hf)))\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\n⊢ (∃ i hi, f i hi = bsup o f) → succ (bsup o f) ≤ blsub o f\n[PROOFSTEP]\nrintro ⟨_, _, hf⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\nw✝¹ : Ordinal.{u}\nw✝ : w✝¹ < o\nhf : f w✝¹ w✝ = bsup o f\n⊢ succ (bsup o f) ≤ blsub o f\n[PROOFSTEP]\nrw [succ_le_iff, ← hf]\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\nw✝¹ : Ordinal.{u}\nw✝ : w✝¹ < o\nhf : f w✝¹ w✝ = bsup o f\n⊢ f w✝¹ w✝ < blsub o f\n[PROOFSTEP]\nexact lt_blsub _ _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\n⊢ bsup o f = blsub o f ↔ ∀ (a : Ordinal.{max u v}), a < blsub o f → succ a < blsub o f\n[PROOFSTEP]\nrw [← sup_eq_bsup, ← lsub_eq_blsub]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\n⊢ sup (familyOfBFamily o f) = lsub (familyOfBFamily o f) ↔\n    ∀ (a : Ordinal.{max u v}), a < lsub (familyOfBFamily o f) → succ a < lsub (familyOfBFamily o f)\n[PROOFSTEP]\napply sup_eq_lsub_iff_succ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\nh : bsup o f = blsub o f\ni : Ordinal.{u}\n⊢ ∀ (hi : i < o), f i hi < bsup o f\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\nh : bsup o f = blsub o f\ni : Ordinal.{u}\n⊢ ∀ (hi : i < o), f i hi < blsub o f\n[PROOFSTEP]\napply lt_blsub\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nho : IsLimit o\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\nhf : ∀ (a : Ordinal.{u}) (ha : a < o), f a ha < f (succ a) (_ : succ a < o)\n⊢ bsup o f = blsub o f\n[PROOFSTEP]\nrw [bsup_eq_blsub_iff_lt_bsup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nho : IsLimit o\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\nhf : ∀ (a : Ordinal.{u}) (ha : a < o), f a ha < f (succ a) (_ : succ a < o)\n⊢ ∀ (i : Ordinal.{u}) (hi : i < o), f i hi < bsup o f\n[PROOFSTEP]\nexact fun i hi => (hf i hi).trans_le (le_bsup f _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nf : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_5 u_4}\n⊢ blsub o f = 0 ↔ o = 0\n[PROOFSTEP]\nrw [← lsub_eq_blsub, lsub_eq_zero_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nf : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_5 u_4}\n⊢ IsEmpty (Quotient.out o).α ↔ o = 0\n[PROOFSTEP]\nexact out_empty_iff_eq_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : (a : Ordinal.{u_4}) → a < 0 → Ordinal.{max u_4 u_5}\n⊢ blsub 0 f = 0\n[PROOFSTEP]\nrw [blsub_eq_zero_iff]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nf : (a : Ordinal.{u}) → a < type r → Ordinal.{max u v}\no : Ordinal.{max u v}\n⊢ blsub (type r) f ≤ o ↔ (lsub fun a => f (typein r a) (_ : typein r a < type r)) ≤ o\n[PROOFSTEP]\nrw [blsub_le_iff, lsub_le_iff]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nf : (a : Ordinal.{u}) → a < type r → Ordinal.{max u v}\no : Ordinal.{max u v}\n⊢ (∀ (i : Ordinal.{u}) (h : i < type r), f i h < o) ↔ ∀ (i : α), f (typein r i) (_ : typein r i < type r) < o\n[PROOFSTEP]\nexact ⟨fun H b => H _ _, fun H i h => by simpa only [typein_enum] using H (enum r i h)⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nf : (a : Ordinal.{u}) → a < type r → Ordinal.{max u v}\no : Ordinal.{max u v}\nH : ∀ (i : α), f (typein r i) (_ : typein r i < type r) < o\ni : Ordinal.{u}\nh : i < type r\n⊢ f i h < o\n[PROOFSTEP]\nsimpa only [typein_enum] using H (enum r i h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\no' : Ordinal.{v}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max (max u v) w}\ng : (a : Ordinal.{v}) → a < o' → Ordinal.{max (max u v) w}\nh : brange o f ⊆ brange o' g\na : Ordinal.{max (max u v) w}\nx✝ : a ∈ brange o fun a ha => succ (f a ha)\nb : Ordinal.{u}\nhb : b < o\nhb' : (fun a ha => succ (f a ha)) b hb = a\n⊢ a ∈ brange o' fun a ha => succ (g a ha)\n[PROOFSTEP]\nobtain ⟨c, hc, hc'⟩ := h ⟨b, hb, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\no' : Ordinal.{v}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max (max u v) w}\ng : (a : Ordinal.{v}) → a < o' → Ordinal.{max (max u v) w}\nh : brange o f ⊆ brange o' g\na : Ordinal.{max (max u v) w}\nx✝ : a ∈ brange o fun a ha => succ (f a ha)\nb : Ordinal.{u}\nhb : b < o\nhb' : (fun a ha => succ (f a ha)) b hb = a\nc : Ordinal.{v}\nhc : c < o'\nhc' : g c hc = f b hb\n⊢ a ∈ brange o' fun a ha => succ (g a ha)\n[PROOFSTEP]\nsimp_rw [← hc'] at hb' \n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\no' : Ordinal.{v}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max (max u v) w}\ng : (a : Ordinal.{v}) → a < o' → Ordinal.{max (max u v) w}\nh : brange o f ⊆ brange o' g\na : Ordinal.{max (max u v) w}\nx✝ : a ∈ brange o fun a ha => succ (f a ha)\nb : Ordinal.{u}\nhb : b < o\nc : Ordinal.{v}\nhc : c < o'\nhc' : g c hc = f b hb\nhb' : succ (g c hc) = a\n⊢ a ∈ brange o' fun a ha => succ (g a ha)\n[PROOFSTEP]\nexact ⟨c, hc, hb'⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no o' : Ordinal.{max u v}\nf : (a : Ordinal.{max u v}) → a < o → Ordinal.{max u v w}\nhf : ∀ {i j : Ordinal.{max u v}} (hi : i < o) (hj : j < o), i ≤ j → f i hi ≤ f j hj\ng : (a : Ordinal.{max u v}) → a < o' → Ordinal.{max u v}\nhg : blsub o' g = o\na : Ordinal.{max u v}\nha : a < o'\n⊢ g a ha < o\n[PROOFSTEP]\nrw [← hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no o' : Ordinal.{max u v}\nf : (a : Ordinal.{max u v}) → a < o → Ordinal.{max u v w}\nhf : ∀ {i j : Ordinal.{max u v}} (hi : i < o) (hj : j < o), i ≤ j → f i hi ≤ f j hj\ng : (a : Ordinal.{max u v}) → a < o' → Ordinal.{max u v}\nhg : blsub o' g = o\na : Ordinal.{max u v}\nha : a < o'\n⊢ g a ha < blsub o' g\n[PROOFSTEP]\napply lt_blsub\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no o' : Ordinal.{max u v}\nf : (a : Ordinal.{max u v}) → a < o → Ordinal.{max u v w}\nhf : ∀ {i j : Ordinal.{max u v}} (hi : i < o) (hj : j < o), i ≤ j → f i hi ≤ f j hj\ng : (a : Ordinal.{max u v}) → a < o' → Ordinal.{max u v}\nhg : blsub o' g = o\n⊢ (bsup o' fun a ha => f (g a ha) (_ : g a ha < o)) = bsup o f\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no o' : Ordinal.{max u v}\nf : (a : Ordinal.{max u v}) → a < o → Ordinal.{max u v w}\nhf : ∀ {i j : Ordinal.{max u v}} (hi : i < o) (hj : j < o), i ≤ j → f i hi ≤ f j hj\ng : (a : Ordinal.{max u v}) → a < o' → Ordinal.{max u v}\nhg : blsub o' g = o\n⊢ (bsup o' fun a ha => f (g a ha) (_ : g a ha < o)) ≤ bsup o f\n[PROOFSTEP]\nrefine' bsup_le fun i hi => _\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no o' : Ordinal.{max u v}\nf : (a : Ordinal.{max u v}) → a < o → Ordinal.{max u v w}\nhf : ∀ {i j : Ordinal.{max u v}} (hi : i < o) (hj : j < o), i ≤ j → f i hi ≤ f j hj\ng : (a : Ordinal.{max u v}) → a < o' → Ordinal.{max u v}\nhg : blsub o' g = o\n⊢ bsup o f ≤ bsup o' fun a ha => f (g a ha) (_ : g a ha < o)\n[PROOFSTEP]\nrefine' bsup_le fun i hi => _\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no o' : Ordinal.{max u v}\nf : (a : Ordinal.{max u v}) → a < o → Ordinal.{max u v w}\nhf : ∀ {i j : Ordinal.{max u v}} (hi : i < o) (hj : j < o), i ≤ j → f i hi ≤ f j hj\ng : (a : Ordinal.{max u v}) → a < o' → Ordinal.{max u v}\nhg : blsub o' g = o\ni : Ordinal.{max u v}\nhi : i < o'\n⊢ f (g i hi) (_ : g i hi < o) ≤ bsup o f\n[PROOFSTEP]\napply le_bsup\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no o' : Ordinal.{max u v}\nf : (a : Ordinal.{max u v}) → a < o → Ordinal.{max u v w}\nhf : ∀ {i j : Ordinal.{max u v}} (hi : i < o) (hj : j < o), i ≤ j → f i hi ≤ f j hj\ng : (a : Ordinal.{max u v}) → a < o' → Ordinal.{max u v}\nhg : blsub o' g = o\ni : Ordinal.{max u v}\nhi : i < o\n⊢ f i hi ≤ bsup o' fun a ha => f (g a ha) (_ : g a ha < o)\n[PROOFSTEP]\nrw [← hg, lt_blsub_iff] at hi \n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no o' : Ordinal.{max u v}\nf : (a : Ordinal.{max u v}) → a < o → Ordinal.{max u v w}\nhf : ∀ {i j : Ordinal.{max u v}} (hi : i < o) (hj : j < o), i ≤ j → f i hi ≤ f j hj\ng : (a : Ordinal.{max u v}) → a < o' → Ordinal.{max u v}\nhg : blsub o' g = o\ni : Ordinal.{max u v}\nhi✝ : i < o\nhi : ∃ i_1 hi, i ≤ g i_1 hi\n⊢ f i hi✝ ≤ bsup o' fun a ha => f (g a ha) (_ : g a ha < o)\n[PROOFSTEP]\nrcases hi with ⟨j, hj, hj'⟩\n[GOAL]\ncase a.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no o' : Ordinal.{max u v}\nf : (a : Ordinal.{max u v}) → a < o → Ordinal.{max u v w}\nhf : ∀ {i j : Ordinal.{max u v}} (hi : i < o) (hj : j < o), i ≤ j → f i hi ≤ f j hj\ng : (a : Ordinal.{max u v}) → a < o' → Ordinal.{max u v}\nhg : blsub o' g = o\ni : Ordinal.{max u v}\nhi : i < o\nj : Ordinal.{max u v}\nhj : j < o'\nhj' : i ≤ g j hj\n⊢ f i hi ≤ bsup o' fun a ha => f (g a ha) (_ : g a ha < o)\n[PROOFSTEP]\nexact (hf _ _ hj').trans (le_bsup _ _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no o' : Ordinal.{max u v}\nf : (a : Ordinal.{max u v}) → a < o → Ordinal.{max u v w}\nhf : ∀ {i j : Ordinal.{max u v}} (hi : i < o) (hj : j < o), i ≤ j → f i hi ≤ f j hj\ng : (a : Ordinal.{max u v}) → a < o' → Ordinal.{max u v}\nhg : blsub o' g = o\na : Ordinal.{max u v}\nha : a < o'\n⊢ g a ha < o\n[PROOFSTEP]\nrw [← hg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no o' : Ordinal.{max u v}\nf : (a : Ordinal.{max u v}) → a < o → Ordinal.{max u v w}\nhf : ∀ {i j : Ordinal.{max u v}} (hi : i < o) (hj : j < o), i ≤ j → f i hi ≤ f j hj\ng : (a : Ordinal.{max u v}) → a < o' → Ordinal.{max u v}\nhg : blsub o' g = o\na : Ordinal.{max u v}\nha : a < o'\n⊢ g a ha < blsub o' g\n[PROOFSTEP]\napply lt_blsub\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\nH : IsNormal f\no : Ordinal.{u}\nh : IsLimit o\n⊢ (Ordinal.bsup o fun x x_1 => f x) = f o\n[PROOFSTEP]\nrw [← IsNormal.bsup.{u, u, v} H (fun x _ => x) h.1, bsup_id_limit h.2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\nH : IsNormal f\no : Ordinal.{u}\nh : IsLimit o\n⊢ (blsub o fun x x_1 => f x) = f o\n[PROOFSTEP]\nrw [← IsNormal.bsup_eq.{u, v} H h, bsup_eq_blsub_of_lt_succ_limit h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\nH : IsNormal f\no : Ordinal.{u}\nh : IsLimit o\n⊢ ∀ (a : Ordinal.{u}), a < o → f a < f (succ a)\n[PROOFSTEP]\nexact fun a _ => H.1 a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\nx✝ : (∀ (a : Ordinal.{u}), f a < f (succ a)) ∧ ∀ (o : Ordinal.{u}), IsLimit o → (bsup o fun x x_1 => f x) = f o\nh₁ : ∀ (a : Ordinal.{u}), f a < f (succ a)\nh₂ : ∀ (o : Ordinal.{u}), IsLimit o → (bsup o fun x x_1 => f x) = f o\no : Ordinal.{u}\nho : IsLimit o\na : Ordinal.{max u v}\n⊢ f o ≤ a ↔ ∀ (b : Ordinal.{u}), b < o → f b ≤ a\n[PROOFSTEP]\nrw [← h₂ o ho]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\nx✝ : (∀ (a : Ordinal.{u}), f a < f (succ a)) ∧ ∀ (o : Ordinal.{u}), IsLimit o → (bsup o fun x x_1 => f x) = f o\nh₁ : ∀ (a : Ordinal.{u}), f a < f (succ a)\nh₂ : ∀ (o : Ordinal.{u}), IsLimit o → (bsup o fun x x_1 => f x) = f o\no : Ordinal.{u}\nho : IsLimit o\na : Ordinal.{max u v}\n⊢ (bsup o fun x x_1 => f x) ≤ a ↔ ∀ (b : Ordinal.{u}), b < o → f b ≤ a\n[PROOFSTEP]\nexact bsup_le_iff\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\n⊢ IsNormal f ↔\n    (∀ (a : Ordinal.{u}), f a < f (succ a)) ∧ ∀ (o : Ordinal.{u}), IsLimit o → (blsub o fun x x_1 => f x) = f o\n[PROOFSTEP]\nrw [isNormal_iff_lt_succ_and_bsup_eq.{u, v}, and_congr_right_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\n⊢ (∀ (a : Ordinal.{u}), f a < f (succ a)) →\n    ((∀ (o : Ordinal.{u}), IsLimit o → (bsup o fun x x_1 => f x) = f o) ↔\n      ∀ (o : Ordinal.{u}), IsLimit o → (blsub o fun x x_1 => f x) = f o)\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\nh : ∀ (a : Ordinal.{u}), f a < f (succ a)\n⊢ (∀ (o : Ordinal.{u}), IsLimit o → (bsup o fun x x_1 => f x) = f o) ↔\n    ∀ (o : Ordinal.{u}), IsLimit o → (blsub o fun x x_1 => f x) = f o\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\nh : ∀ (a : Ordinal.{u}), f a < f (succ a)\n⊢ (∀ (o : Ordinal.{u}), IsLimit o → (bsup o fun x x_1 => f x) = f o) →\n    ∀ (o : Ordinal.{u}), IsLimit o → (blsub o fun x x_1 => f x) = f o\n[PROOFSTEP]\nintro H o ho\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\nh : ∀ (a : Ordinal.{u}), f a < f (succ a)\n⊢ (∀ (o : Ordinal.{u}), IsLimit o → (blsub o fun x x_1 => f x) = f o) →\n    ∀ (o : Ordinal.{u}), IsLimit o → (bsup o fun x x_1 => f x) = f o\n[PROOFSTEP]\nintro H o ho\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\nh : ∀ (a : Ordinal.{u}), f a < f (succ a)\nH : ∀ (o : Ordinal.{u}), IsLimit o → (bsup o fun x x_1 => f x) = f o\no : Ordinal.{u}\nho : IsLimit o\n⊢ (blsub o fun x x_1 => f x) = f o\n[PROOFSTEP]\nhave := H o ho\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\nh : ∀ (a : Ordinal.{u}), f a < f (succ a)\nH : ∀ (o : Ordinal.{u}), IsLimit o → (blsub o fun x x_1 => f x) = f o\no : Ordinal.{u}\nho : IsLimit o\n⊢ (bsup o fun x x_1 => f x) = f o\n[PROOFSTEP]\nhave := H o ho\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\nh : ∀ (a : Ordinal.{u}), f a < f (succ a)\nH : ∀ (o : Ordinal.{u}), IsLimit o → (bsup o fun x x_1 => f x) = f o\no : Ordinal.{u}\nho : IsLimit o\nthis : (bsup o fun x x_1 => f x) = f o\n⊢ (blsub o fun x x_1 => f x) = f o\n[PROOFSTEP]\nrwa [← bsup_eq_blsub_of_lt_succ_limit ho fun a _ => h a] at *\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : Ordinal.{u} → Ordinal.{max u v}\nh : ∀ (a : Ordinal.{u}), f a < f (succ a)\nH : ∀ (o : Ordinal.{u}), IsLimit o → (blsub o fun x x_1 => f x) = f o\no : Ordinal.{u}\nho : IsLimit o\nthis : (blsub o fun x x_1 => f x) = f o\n⊢ (bsup o fun x x_1 => f x) = f o\n[PROOFSTEP]\nrwa [← bsup_eq_blsub_of_lt_succ_limit ho fun a _ => h a] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf g : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\nhg : IsNormal g\nh : f = g\n⊢ f 0 = g 0 ∧ ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf g : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\nhg : IsNormal g\nx✝ : f 0 = g 0 ∧ ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\nh₁ : f 0 = g 0\nh₂ : ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\na : Ordinal.{u}\n⊢ f a = g a\n[PROOFSTEP]\ninduction' a using limitRecOn with _ _ _ ho H\n[GOAL]\ncase H₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf g : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\nhg : IsNormal g\nx✝ : f 0 = g 0 ∧ ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\nh₁ : f 0 = g 0\nh₂ : ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\n⊢ f 0 = g 0\ncase H₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf g : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\nhg : IsNormal g\nx✝ : f 0 = g 0 ∧ ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\nh₁ : f 0 = g 0\nh₂ : ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\no✝ : Ordinal.{u}\na✝ : f o✝ = g o✝\n⊢ f (succ o✝) = g (succ o✝)\ncase H₃\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf g : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\nhg : IsNormal g\nx✝ : f 0 = g 0 ∧ ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\nh₁ : f 0 = g 0\nh₂ : ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\no✝ : Ordinal.{u}\nho : IsLimit o✝\nH : ∀ (o' : Ordinal.{u}), o' < o✝ → f o' = g o'\n⊢ f o✝ = g o✝\n[PROOFSTEP]\nany_goals solve_by_elim\n[GOAL]\ncase H₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf g : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\nhg : IsNormal g\nx✝ : f 0 = g 0 ∧ ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\nh₁ : f 0 = g 0\nh₂ : ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\n⊢ f 0 = g 0\n[PROOFSTEP]\nsolve_by_elim\n[GOAL]\ncase H₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf g : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\nhg : IsNormal g\nx✝ : f 0 = g 0 ∧ ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\nh₁ : f 0 = g 0\nh₂ : ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\no✝ : Ordinal.{u}\na✝ : f o✝ = g o✝\n⊢ f (succ o✝) = g (succ o✝)\n[PROOFSTEP]\nsolve_by_elim\n[GOAL]\ncase H₃\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf g : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\nhg : IsNormal g\nx✝ : f 0 = g 0 ∧ ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\nh₁ : f 0 = g 0\nh₂ : ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\no✝ : Ordinal.{u}\nho : IsLimit o✝\nH : ∀ (o' : Ordinal.{u}), o' < o✝ → f o' = g o'\n⊢ f o✝ = g o✝\n[PROOFSTEP]\nsolve_by_elim\n[GOAL]\ncase H₃\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf g : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\nhg : IsNormal g\nx✝ : f 0 = g 0 ∧ ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\nh₁ : f 0 = g 0\nh₂ : ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\no✝ : Ordinal.{u}\nho : IsLimit o✝\nH : ∀ (o' : Ordinal.{u}), o' < o✝ → f o' = g o'\n⊢ f o✝ = g o✝\n[PROOFSTEP]\nrw [← IsNormal.bsup_eq.{u, u} hf ho, ← IsNormal.bsup_eq.{u, u} hg ho]\n[GOAL]\ncase H₃\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf g : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\nhg : IsNormal g\nx✝ : f 0 = g 0 ∧ ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\nh₁ : f 0 = g 0\nh₂ : ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\no✝ : Ordinal.{u}\nho : IsLimit o✝\nH : ∀ (o' : Ordinal.{u}), o' < o✝ → f o' = g o'\n⊢ (Ordinal.bsup o✝ fun x x_1 => f x) = Ordinal.bsup o✝ fun x x_1 => g x\n[PROOFSTEP]\ncongr\n[GOAL]\ncase H₃.e_f\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf g : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\nhg : IsNormal g\nx✝ : f 0 = g 0 ∧ ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\nh₁ : f 0 = g 0\nh₂ : ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\no✝ : Ordinal.{u}\nho : IsLimit o✝\nH : ∀ (o' : Ordinal.{u}), o' < o✝ → f o' = g o'\n⊢ (fun x x_1 => f x) = fun x x_1 => g x\n[PROOFSTEP]\next b hb\n[GOAL]\ncase H₃.e_f.h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf g : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\nhg : IsNormal g\nx✝ : f 0 = g 0 ∧ ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\nh₁ : f 0 = g 0\nh₂ : ∀ (a : Ordinal.{u}), f a = g a → f (succ a) = g (succ a)\no✝ : Ordinal.{u}\nho : IsLimit o✝\nH : ∀ (o' : Ordinal.{u}), o' < o✝ → f o' = g o'\nb : Ordinal.{u}\nhb : b < o✝\n⊢ f b = g b\n[PROOFSTEP]\nexact H b hb\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no₁ : Ordinal.{u_4}\no₂ : Ordinal.{u_5}\nop : {a : Ordinal.{u_4}} → a < o₁ → {b : Ordinal.{u_5}} → b < o₂ → Ordinal.{max (max u_4 u_5) u_6}\na : Ordinal.{u_4}\nb : Ordinal.{u_5}\nha : a < o₁\nhb : b < o₂\n⊢ op ha hb < blsub₂ o₁ o₂ fun {a} => op\n[PROOFSTEP]\nconvert lt_lsub _ (Prod.mk (enum (· < ·) a (by rwa [type_lt])) (enum (· < ·) b (by rwa [type_lt])))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no₁ : Ordinal.{u_4}\no₂ : Ordinal.{u_5}\nop : {a : Ordinal.{u_4}} → a < o₁ → {b : Ordinal.{u_5}} → b < o₂ → Ordinal.{max (max u_4 u_5) u_6}\na : Ordinal.{u_4}\nb : Ordinal.{u_5}\nha : a < o₁\nhb : b < o₂\n⊢ a < type fun x x_1 => x < x_1\n[PROOFSTEP]\nrwa [type_lt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no₁ : Ordinal.{u_4}\no₂ : Ordinal.{u_5}\nop : {a : Ordinal.{u_4}} → a < o₁ → {b : Ordinal.{u_5}} → b < o₂ → Ordinal.{max (max u_4 u_5) u_6}\na : Ordinal.{u_4}\nb : Ordinal.{u_5}\nha : a < o₁\nhb : b < o₂\n⊢ b < type fun x x_1 => x < x_1\n[PROOFSTEP]\nrwa [type_lt]\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no₁ : Ordinal.{u_4}\no₂ : Ordinal.{u_5}\nop : {a : Ordinal.{u_4}} → a < o₁ → {b : Ordinal.{u_5}} → b < o₂ → Ordinal.{max (max u_4 u_5) u_6}\na : Ordinal.{u_4}\nb : Ordinal.{u_5}\nha : a < o₁\nhb : b < o₂\n⊢ op ha hb =\n    (fun {a} => op)\n      (_ :\n        typein (fun x x_1 => x < x_1)\n            (enum (fun x x_1 => x < x_1) a (_ : a < type fun x x_1 => x < x_1),\n                enum (fun x x_1 => x < x_1) b (_ : b < type fun x x_1 => x < x_1)).fst <\n          o₁)\n      (_ :\n        typein (fun x x_1 => x < x_1)\n            (enum (fun x x_1 => x < x_1) a (_ : a < type fun x x_1 => x < x_1),\n                enum (fun x x_1 => x < x_1) b (_ : b < type fun x x_1 => x < x_1)).snd <\n          o₂)\n[PROOFSTEP]\nsimp only [typein_enum]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\na : Ordinal.{max u v}\nH : ∀ (b : Ordinal.{max u v}), b < a → ∃ i, f i = b\n⊢ a ≤ mex f\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\na : Ordinal.{max u v}\nH : ∀ (b : Ordinal.{max u v}), b < a → ∃ i, f i = b\nh : mex f < a\n⊢ False\n[PROOFSTEP]\nexact mex_not_mem_range f (H _ h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{max u v}\n⊢ ∀ (i : ι), f i ≠ mex f\n[PROOFSTEP]\nsimpa using mex_not_mem_range.{_, v} f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u_4\nf : ι → Ordinal.{max u_5 u_4}\na : Ordinal.{max u_5 u_4}\nha : ∀ (i : ι), f i ≠ a\n⊢ a ∈ (range f)ᶜ\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u_4\nf : ι → Ordinal.{max u_5 u_4}\na : Ordinal.{max u_4 u_5}\nha : a < mex f\n⊢ ∃ i, f i = a\n[PROOFSTEP]\nby_contra' ha'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u_4\nf : ι → Ordinal.{max u_5 u_4}\na : Ordinal.{max u_4 u_5}\nha : a < mex f\nha' : ∀ (i : ι), f i ≠ a\n⊢ False\n[PROOFSTEP]\nexact ha.not_le (mex_le_of_ne ha')\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u\nf : α → Ordinal.{max u v}\ng : β → Ordinal.{max u v}\nh : range f ⊆ range g\n⊢ mex f ≤ mex g\n[PROOFSTEP]\nrefine' mex_le_of_ne fun i hi => _\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u\nf : α → Ordinal.{max u v}\ng : β → Ordinal.{max u v}\nh : range f ⊆ range g\ni : α\nhi : f i = mex g\n⊢ False\n[PROOFSTEP]\ncases' h ⟨i, rfl⟩ with j hj\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u\nf : α → Ordinal.{max u v}\ng : β → Ordinal.{max u v}\nh : range f ⊆ range g\ni : α\nhi : f i = mex g\nj : β\nhj : g j = f i\n⊢ False\n[PROOFSTEP]\nrw [← hj] at hi \n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u\nf : α → Ordinal.{max u v}\ng : β → Ordinal.{max u v}\nh : range f ⊆ range g\ni : α\nj : β\nhi : g j = mex g\nhj : g j = f i\n⊢ False\n[PROOFSTEP]\nexact ne_mex g j hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{u}\n⊢ mex f < ord (succ #ι)\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{u}\nh : ord (succ #ι) ≤ mex f\n⊢ False\n[PROOFSTEP]\napply (lt_succ #ι).not_le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{u}\nh : ord (succ #ι) ≤ mex f\n⊢ succ #ι ≤ #ι\n[PROOFSTEP]\nhave H := fun a => exists_of_lt_mex ((typein_lt_self a).trans_le h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{u}\nh : ord (succ #ι) ≤ mex f\nH : ∀ (a : (Quotient.out (ord (succ #ι))).α), ∃ i, f i = typein (fun x x_1 => x < x_1) a\n⊢ succ #ι ≤ #ι\n[PROOFSTEP]\nlet g : (succ #ι).ord.out.α → ι := fun a => Classical.choose (H a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{u}\nh : ord (succ #ι) ≤ mex f\nH : ∀ (a : (Quotient.out (ord (succ #ι))).α), ∃ i, f i = typein (fun x x_1 => x < x_1) a\ng : (Quotient.out (ord (succ #ι))).α → ι := fun a => choose (_ : ∃ i, f i = typein (fun x x_1 => x < x_1) a)\n⊢ succ #ι ≤ #ι\n[PROOFSTEP]\nhave hg : Injective g := fun a b h' =>\n  by\n  have Hf : ∀ x, f (g x) = typein ((· < ·) : (succ #ι).ord.out.α → (succ #ι).ord.out.α → Prop) x := fun a =>\n    Classical.choose_spec (H a)\n  apply_fun f at h' \n  rwa [Hf, Hf, typein_inj] at h' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{u}\nh : ord (succ #ι) ≤ mex f\nH : ∀ (a : (Quotient.out (ord (succ #ι))).α), ∃ i, f i = typein (fun x x_1 => x < x_1) a\ng : (Quotient.out (ord (succ #ι))).α → ι := fun a => choose (_ : ∃ i, f i = typein (fun x x_1 => x < x_1) a)\na b : (Quotient.out (ord (succ #ι))).α\nh' : g a = g b\n⊢ a = b\n[PROOFSTEP]\nhave Hf : ∀ x, f (g x) = typein ((· < ·) : (succ #ι).ord.out.α → (succ #ι).ord.out.α → Prop) x := fun a =>\n  Classical.choose_spec (H a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{u}\nh : ord (succ #ι) ≤ mex f\nH : ∀ (a : (Quotient.out (ord (succ #ι))).α), ∃ i, f i = typein (fun x x_1 => x < x_1) a\ng : (Quotient.out (ord (succ #ι))).α → ι := fun a => choose (_ : ∃ i, f i = typein (fun x x_1 => x < x_1) a)\na b : (Quotient.out (ord (succ #ι))).α\nh' : g a = g b\nHf : ∀ (x : (Quotient.out (ord (succ #ι))).α), f (g x) = typein (fun x x_1 => x < x_1) x\n⊢ a = b\n[PROOFSTEP]\napply_fun f at h' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{u}\nh : ord (succ #ι) ≤ mex f\nH : ∀ (a : (Quotient.out (ord (succ #ι))).α), ∃ i, f i = typein (fun x x_1 => x < x_1) a\ng : (Quotient.out (ord (succ #ι))).α → ι := fun a => choose (_ : ∃ i, f i = typein (fun x x_1 => x < x_1) a)\na b : (Quotient.out (ord (succ #ι))).α\nHf : ∀ (x : (Quotient.out (ord (succ #ι))).α), f (g x) = typein (fun x x_1 => x < x_1) x\nh' : f (g a) = f (g b)\n⊢ a = b\n[PROOFSTEP]\nrwa [Hf, Hf, typein_inj] at h' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{u}\nh : ord (succ #ι) ≤ mex f\nH : ∀ (a : (Quotient.out (ord (succ #ι))).α), ∃ i, f i = typein (fun x x_1 => x < x_1) a\ng : (Quotient.out (ord (succ #ι))).α → ι := fun a => choose (_ : ∃ i, f i = typein (fun x x_1 => x < x_1) a)\nhg : Injective g\n⊢ succ #ι ≤ #ι\n[PROOFSTEP]\nconvert Cardinal.mk_le_of_injective hg\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nι : Type u\nf : ι → Ordinal.{u}\nh : ord (succ #ι) ≤ mex f\nH : ∀ (a : (Quotient.out (ord (succ #ι))).α), ∃ i, f i = typein (fun x x_1 => x < x_1) a\ng : (Quotient.out (ord (succ #ι))).α → ι := fun a => choose (_ : ∃ i, f i = typein (fun x x_1 => x < x_1) a)\nhg : Injective g\n⊢ succ #ι = #(Quotient.out (ord (succ #ι))).α\n[PROOFSTEP]\nrw [Cardinal.mk_ord_out (succ #ι)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nf : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_4 u_5}\n⊢ ¬bmex o f ∈ brange o f\n[PROOFSTEP]\nrw [← range_familyOfBFamily]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nf : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_4 u_5}\n⊢ ¬bmex o f ∈ range (familyOfBFamily o f)\n[PROOFSTEP]\napply mex_not_mem_range\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nf : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_4 u_5}\na : Ordinal.{max u_4 u_5}\nH : ∀ (b : Ordinal.{max u_4 u_5}), b < a → ∃ i hi, f i hi = b\n⊢ a ≤ bmex o f\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nf : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_4 u_5}\na : Ordinal.{max u_4 u_5}\nH : ∀ (b : Ordinal.{max u_4 u_5}), b < a → ∃ i hi, f i hi = b\nh : bmex o f < a\n⊢ False\n[PROOFSTEP]\nexact bmex_not_mem_brange f (H _ h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\ni : Ordinal.{u}\nhi : i < o\n⊢ f i hi ≠ bmex o f\n[PROOFSTEP]\nconvert (config := { transparency := .default })\n  ne_mex.{_, v} (familyOfBFamily o f) (enum (· < ·) i (by rwa [type_lt])) using 2\n  -- Porting note: `familyOfBFamily_enum` → `typein_enum`\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\ni : Ordinal.{u}\nhi : i < o\n⊢ i < type fun x x_1 => x < x_1\n[PROOFSTEP]\nrwa [type_lt]\n[GOAL]\ncase h.e'_2.h.e'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\ni : Ordinal.{u}\nhi : i < o\n⊢ i = typein (fun x x_1 => x < x_1) (enum (fun x x_1 => x < x_1) i (_ : i < type fun x x_1 => x < x_1))\n[PROOFSTEP]\nrw [typein_enum]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nf : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_4 u_5}\na : Ordinal.{max u_5 u_4}\nha : a < bmex o f\n⊢ ∃ i hi, f i hi = a\n[PROOFSTEP]\ncases' exists_of_lt_mex ha with i hi\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_4}\nf : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_4 u_5}\na : Ordinal.{max u_5 u_4}\nha : a < bmex o f\ni : (Quotient.out o).α\nhi : familyOfBFamily o f i = a\n⊢ ∃ i hi, f i hi = a\n[PROOFSTEP]\nexact ⟨_, typein_lt_self i, hi⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no o' : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}\ng : (a : Ordinal.{u}) → a < o' → Ordinal.{max u v}\nh : brange o f ⊆ brange o' g\n⊢ range (familyOfBFamily o f) ⊆ range (familyOfBFamily o' g)\n[PROOFSTEP]\nrwa [range_familyOfBFamily, range_familyOfBFamily]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{u}\n⊢ bmex o f < ord (succ (card o))\n[PROOFSTEP]\nrw [← mk_ordinal_out]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u}\nf : (a : Ordinal.{u}) → a < o → Ordinal.{u}\n⊢ bmex o f < ord (succ #(Quotient.out o).α)\n[PROOFSTEP]\nexact mex_lt_ord_succ_mk (familyOfBFamily o f)\n[GOAL]\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\no : Ordinal.{u}\n⊢ enumOrd S o ∈ S ∩ Ici (blsub o fun c x => enumOrd S c)\n[PROOFSTEP]\nrw [enumOrd_def']\n[GOAL]\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\no : Ordinal.{u}\n⊢ sInf (S ∩ Ici (blsub o fun a x => enumOrd S a)) ∈ S ∩ Ici (blsub o fun c x => enumOrd S c)\n[PROOFSTEP]\nexact csInf_mem (enumOrd_def'_nonempty hS _)\n[GOAL]\nS : Set Ordinal.{u}\no : Ordinal.{u}\n⊢ enumOrd S o = sInf (S ∩ {b | ∀ (c : Ordinal.{u}), c < o → enumOrd S c < b})\n[PROOFSTEP]\nrw [enumOrd_def']\n[GOAL]\nS : Set Ordinal.{u}\no : Ordinal.{u}\n⊢ sInf (S ∩ Ici (blsub o fun a x => enumOrd S a)) = sInf (S ∩ {b | ∀ (c : Ordinal.{u}), c < o → enumOrd S c < b})\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_a\nS : Set Ordinal.{u}\no : Ordinal.{u}\n⊢ Ici (blsub o fun a x => enumOrd S a) = {b | ∀ (c : Ordinal.{u}), c < o → enumOrd S c < b}\n[PROOFSTEP]\next\n[GOAL]\ncase e_a.e_a.h\nS : Set Ordinal.{u}\no x✝ : Ordinal.{u}\n⊢ x✝ ∈ Ici (blsub o fun a x => enumOrd S a) ↔ x✝ ∈ {b | ∀ (c : Ordinal.{u}), c < o → enumOrd S c < b}\n[PROOFSTEP]\nexact ⟨fun h a hao => (lt_blsub.{u, u} _ _ hao).trans_le h, blsub_le⟩\n[GOAL]\nS : Set Ordinal.{u}\nf : Ordinal.{u_1} → Ordinal.{u_1}\nhf : StrictMono f\no : Ordinal.{u_1}\n⊢ enumOrd (range f) o = f o\n[PROOFSTEP]\napply Ordinal.induction o\n[GOAL]\nS : Set Ordinal.{u}\nf : Ordinal.{u_1} → Ordinal.{u_1}\nhf : StrictMono f\no : Ordinal.{u_1}\n⊢ ∀ (j : Ordinal.{u_1}), (∀ (k : Ordinal.{u_1}), k < j → enumOrd (range f) k = f k) → enumOrd (range f) j = f j\n[PROOFSTEP]\nintro a H\n[GOAL]\nS : Set Ordinal.{u}\nf : Ordinal.{u_1} → Ordinal.{u_1}\nhf : StrictMono f\no a : Ordinal.{u_1}\nH : ∀ (k : Ordinal.{u_1}), k < a → enumOrd (range f) k = f k\n⊢ enumOrd (range f) a = f a\n[PROOFSTEP]\nrw [enumOrd_def a]\n[GOAL]\nS : Set Ordinal.{u}\nf : Ordinal.{u_1} → Ordinal.{u_1}\nhf : StrictMono f\no a : Ordinal.{u_1}\nH : ∀ (k : Ordinal.{u_1}), k < a → enumOrd (range f) k = f k\n⊢ sInf (range f ∩ {b | ∀ (c : Ordinal.{u_1}), c < a → enumOrd (range f) c < b}) = f a\n[PROOFSTEP]\nhave Hfa : f a ∈ range f ∩ {b | ∀ c, c < a → enumOrd (range f) c < b} :=\n  ⟨mem_range_self a, fun b hb => by\n    rw [H b hb]\n    exact hf hb⟩\n[GOAL]\nS : Set Ordinal.{u}\nf : Ordinal.{u_1} → Ordinal.{u_1}\nhf : StrictMono f\no a : Ordinal.{u_1}\nH : ∀ (k : Ordinal.{u_1}), k < a → enumOrd (range f) k = f k\nb : Ordinal.{u_1}\nhb : b < a\n⊢ enumOrd (range f) b < f a\n[PROOFSTEP]\nrw [H b hb]\n[GOAL]\nS : Set Ordinal.{u}\nf : Ordinal.{u_1} → Ordinal.{u_1}\nhf : StrictMono f\no a : Ordinal.{u_1}\nH : ∀ (k : Ordinal.{u_1}), k < a → enumOrd (range f) k = f k\nb : Ordinal.{u_1}\nhb : b < a\n⊢ f b < f a\n[PROOFSTEP]\nexact hf hb\n[GOAL]\nS : Set Ordinal.{u}\nf : Ordinal.{u_1} → Ordinal.{u_1}\nhf : StrictMono f\no a : Ordinal.{u_1}\nH : ∀ (k : Ordinal.{u_1}), k < a → enumOrd (range f) k = f k\nHfa : f a ∈ range f ∩ {b | ∀ (c : Ordinal.{u_1}), c < a → enumOrd (range f) c < b}\n⊢ sInf (range f ∩ {b | ∀ (c : Ordinal.{u_1}), c < a → enumOrd (range f) c < b}) = f a\n[PROOFSTEP]\nrefine' (csInf_le' Hfa).antisymm ((le_csInf_iff'' ⟨_, Hfa⟩).2 _)\n[GOAL]\nS : Set Ordinal.{u}\nf : Ordinal.{u_1} → Ordinal.{u_1}\nhf : StrictMono f\no a : Ordinal.{u_1}\nH : ∀ (k : Ordinal.{u_1}), k < a → enumOrd (range f) k = f k\nHfa : f a ∈ range f ∩ {b | ∀ (c : Ordinal.{u_1}), c < a → enumOrd (range f) c < b}\n⊢ ∀ (b : Ordinal.{u_1}), b ∈ range f ∩ {b | ∀ (c : Ordinal.{u_1}), c < a → enumOrd (range f) c < b} → f a ≤ b\n[PROOFSTEP]\nrintro _ ⟨⟨c, rfl⟩, hc : ∀ b < a, enumOrd (range f) b < f c⟩\n[GOAL]\ncase intro.intro\nS : Set Ordinal.{u}\nf : Ordinal.{u_1} → Ordinal.{u_1}\nhf : StrictMono f\no a : Ordinal.{u_1}\nH : ∀ (k : Ordinal.{u_1}), k < a → enumOrd (range f) k = f k\nHfa : f a ∈ range f ∩ {b | ∀ (c : Ordinal.{u_1}), c < a → enumOrd (range f) c < b}\nc : Ordinal.{u_1}\nhc : ∀ (b : Ordinal.{u_1}), b < a → enumOrd (range f) b < f c\n⊢ f a ≤ f c\n[PROOFSTEP]\nrw [hf.le_iff_le]\n[GOAL]\ncase intro.intro\nS : Set Ordinal.{u}\nf : Ordinal.{u_1} → Ordinal.{u_1}\nhf : StrictMono f\no a : Ordinal.{u_1}\nH : ∀ (k : Ordinal.{u_1}), k < a → enumOrd (range f) k = f k\nHfa : f a ∈ range f ∩ {b | ∀ (c : Ordinal.{u_1}), c < a → enumOrd (range f) c < b}\nc : Ordinal.{u_1}\nhc : ∀ (b : Ordinal.{u_1}), b < a → enumOrd (range f) b < f c\n⊢ a ≤ c\n[PROOFSTEP]\ncontrapose! hc\n[GOAL]\ncase intro.intro\nS : Set Ordinal.{u}\nf : Ordinal.{u_1} → Ordinal.{u_1}\nhf : StrictMono f\no a : Ordinal.{u_1}\nH : ∀ (k : Ordinal.{u_1}), k < a → enumOrd (range f) k = f k\nHfa : f a ∈ range f ∩ {b | ∀ (c : Ordinal.{u_1}), c < a → enumOrd (range f) c < b}\nc : Ordinal.{u_1}\nhc : c < a\n⊢ ∃ b, b < a ∧ f c ≤ enumOrd (range f) b\n[PROOFSTEP]\nexact ⟨c, hc, (H c hc).ge⟩\n[GOAL]\nS : Set Ordinal.{u}\n⊢ enumOrd Set.univ = id\n[PROOFSTEP]\nrw [← range_id]\n[GOAL]\nS : Set Ordinal.{u}\n⊢ enumOrd (range id) = id\n[PROOFSTEP]\nexact enumOrd_range strictMono_id\n[GOAL]\nS : Set Ordinal.{u}\n⊢ enumOrd S 0 = sInf S\n[PROOFSTEP]\nrw [enumOrd_def]\n[GOAL]\nS : Set Ordinal.{u}\n⊢ sInf (S ∩ {b | ∀ (c : Ordinal.{u}), c < 0 → enumOrd S c < b}) = sInf S\n[PROOFSTEP]\nsimp [Ordinal.not_lt_zero]\n[GOAL]\nS : Set Ordinal.{u}\na b : Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\nha : a ∈ S\nhb : enumOrd S b < a\n⊢ enumOrd S (succ b) ≤ a\n[PROOFSTEP]\nrw [enumOrd_def]\n[GOAL]\nS : Set Ordinal.{u}\na b : Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\nha : a ∈ S\nhb : enumOrd S b < a\n⊢ sInf (S ∩ {b_1 | ∀ (c : Ordinal.{u}), c < succ b → enumOrd S c < b_1}) ≤ a\n[PROOFSTEP]\nexact csInf_le' ⟨ha, fun c hc => ((enumOrd_strictMono hS).monotone (le_of_lt_succ hc)).trans_lt hb⟩\n[GOAL]\nS✝ : Set Ordinal.{u}\nS T : Set Ordinal.{u_1}\nhS : Unbounded (fun x x_1 => x < x_1) S\nhST : S ⊆ T\na : Ordinal.{u_1}\n⊢ enumOrd T a ≤ enumOrd S a\n[PROOFSTEP]\napply Ordinal.induction a\n[GOAL]\nS✝ : Set Ordinal.{u}\nS T : Set Ordinal.{u_1}\nhS : Unbounded (fun x x_1 => x < x_1) S\nhST : S ⊆ T\na : Ordinal.{u_1}\n⊢ ∀ (j : Ordinal.{u_1}), (∀ (k : Ordinal.{u_1}), k < j → enumOrd T k ≤ enumOrd S k) → enumOrd T j ≤ enumOrd S j\n[PROOFSTEP]\nintro b H\n[GOAL]\nS✝ : Set Ordinal.{u}\nS T : Set Ordinal.{u_1}\nhS : Unbounded (fun x x_1 => x < x_1) S\nhST : S ⊆ T\na b : Ordinal.{u_1}\nH : ∀ (k : Ordinal.{u_1}), k < b → enumOrd T k ≤ enumOrd S k\n⊢ enumOrd T b ≤ enumOrd S b\n[PROOFSTEP]\nrw [enumOrd_def]\n[GOAL]\nS✝ : Set Ordinal.{u}\nS T : Set Ordinal.{u_1}\nhS : Unbounded (fun x x_1 => x < x_1) S\nhST : S ⊆ T\na b : Ordinal.{u_1}\nH : ∀ (k : Ordinal.{u_1}), k < b → enumOrd T k ≤ enumOrd S k\n⊢ sInf (T ∩ {b_1 | ∀ (c : Ordinal.{u_1}), c < b → enumOrd T c < b_1}) ≤ enumOrd S b\n[PROOFSTEP]\nexact csInf_le' ⟨hST (enumOrd_mem hS b), fun c h => (H c h).trans_lt (enumOrd_strictMono hS h)⟩\n[GOAL]\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\ns : Ordinal.{u}\nhs : s ∈ S\n⊢ enumOrd S (sSup {a | enumOrd S a ≤ s}) = s\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\ns : Ordinal.{u}\nhs : s ∈ S\n⊢ enumOrd S (sSup {a | enumOrd S a ≤ s}) ≤ s\n[PROOFSTEP]\nrw [enumOrd_def]\n[GOAL]\ncase a\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\ns : Ordinal.{u}\nhs : s ∈ S\n⊢ sInf (S ∩ {b | ∀ (c : Ordinal.{u}), c < sSup {a | enumOrd S a ≤ s} → enumOrd S c < b}) ≤ s\n[PROOFSTEP]\nrefine' csInf_le' ⟨hs, fun a ha => _⟩\n[GOAL]\ncase a\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\ns : Ordinal.{u}\nhs : s ∈ S\na : Ordinal.{u}\nha : a < sSup {a | enumOrd S a ≤ s}\n⊢ enumOrd S a < s\n[PROOFSTEP]\nhave : enumOrd S 0 ≤ s := by\n  rw [enumOrd_zero]\n  exact csInf_le' hs\n[GOAL]\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\ns : Ordinal.{u}\nhs : s ∈ S\na : Ordinal.{u}\nha : a < sSup {a | enumOrd S a ≤ s}\n⊢ enumOrd S 0 ≤ s\n[PROOFSTEP]\nrw [enumOrd_zero]\n[GOAL]\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\ns : Ordinal.{u}\nhs : s ∈ S\na : Ordinal.{u}\nha : a < sSup {a | enumOrd S a ≤ s}\n⊢ sInf S ≤ s\n[PROOFSTEP]\nexact csInf_le' hs\n[GOAL]\ncase a\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\ns : Ordinal.{u}\nhs : s ∈ S\na : Ordinal.{u}\nha : a < sSup {a | enumOrd S a ≤ s}\nthis : enumOrd S 0 ≤ s\n⊢ enumOrd S a < s\n[PROOFSTEP]\nrcases flip exists_lt_of_lt_csSup ha ⟨0, this⟩ with ⟨b, hb, hab⟩\n[GOAL]\ncase a.intro.intro\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\ns : Ordinal.{u}\nhs : s ∈ S\na : Ordinal.{u}\nha : a < sSup {a | enumOrd S a ≤ s}\nthis : enumOrd S 0 ≤ s\nb : Ordinal.{u}\nhb : b ∈ {a | enumOrd S a ≤ s}\nhab : a < b\n⊢ enumOrd S a < s\n[PROOFSTEP]\nexact (enumOrd_strictMono hS hab).trans_le hb\n[GOAL]\ncase a\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\ns : Ordinal.{u}\nhs : s ∈ S\n⊢ s ≤ enumOrd S (sSup {a | enumOrd S a ≤ s})\n[PROOFSTEP]\nby_contra' h\n[GOAL]\ncase a\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\ns : Ordinal.{u}\nhs : s ∈ S\nh : enumOrd S (sSup {a | enumOrd S a ≤ s}) < s\n⊢ False\n[PROOFSTEP]\nexact\n  (le_csSup ⟨s, fun a => (lt_wf.self_le_of_strictMono (enumOrd_strictMono hS) a).trans⟩\n        (enumOrd_succ_le hS hs h)).not_lt\n    (lt_succ _)\n[GOAL]\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\n⊢ range (enumOrd S) = S\n[PROOFSTEP]\nrw [range_eq_iff]\n[GOAL]\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\n⊢ (∀ (a : Ordinal.{u}), enumOrd S a ∈ S) ∧ ∀ (b : Ordinal.{u}), b ∈ S → ∃ a, enumOrd S a = b\n[PROOFSTEP]\nexact ⟨enumOrd_mem hS, enumOrd_surjective hS⟩\n[GOAL]\nS : Set Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\n⊢ StrictMono f ∧ range f = S ↔ f = enumOrd S\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nS : Set Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\n⊢ StrictMono f ∧ range f = S → f = enumOrd S\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase mp.intro\nS : Set Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\nh₁ : StrictMono f\nh₂ : range f = S\n⊢ f = enumOrd S\n[PROOFSTEP]\nrwa [← lt_wf.eq_strictMono_iff_eq_range h₁ (enumOrd_strictMono hS), range_enumOrd hS]\n[GOAL]\ncase mpr\nS : Set Ordinal.{u}\nf : Ordinal.{u} → Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\n⊢ f = enumOrd S → StrictMono f ∧ range f = S\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nS : Set Ordinal.{u}\nhS : Unbounded (fun x x_1 => x < x_1) S\n⊢ StrictMono (enumOrd S) ∧ range (enumOrd S) = S\n[PROOFSTEP]\nexact ⟨enumOrd_strictMono hS, range_enumOrd hS⟩\n[GOAL]\nm : ℕ\n⊢ 1 + ↑m = ↑(succ m)\n[PROOFSTEP]\nrw [← Nat.cast_one, ← Nat.cast_add, add_comm]\n[GOAL]\nm : ℕ\n⊢ ↑(m + 1) = ↑(succ m)\n[PROOFSTEP]\nrfl\n[GOAL]\nm : ℕ\n⊢ ↑(m * 0) = ↑m * ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\nm n : ℕ\n⊢ ↑(m * (n + 1)) = ↑m * ↑(n + 1)\n[PROOFSTEP]\nrw [Nat.mul_succ, Nat.cast_add, nat_cast_mul m n, Nat.cast_succ, mul_add_one]\n[GOAL]\nm n : ℕ\n⊢ ↑m ≤ ↑n ↔ m ≤ n\n[PROOFSTEP]\nrw [← Cardinal.ord_nat, ← Cardinal.ord_nat, Cardinal.ord_le_ord, Cardinal.natCast_le]\n[GOAL]\nm n : ℕ\n⊢ ↑m < ↑n ↔ m < n\n[PROOFSTEP]\nsimp only [lt_iff_le_not_le, nat_cast_le]\n[GOAL]\nm n : ℕ\n⊢ ↑m = ↑n ↔ m = n\n[PROOFSTEP]\nsimp only [le_antisymm_iff, nat_cast_le]\n[GOAL]\nm n : ℕ\n⊢ ↑(m - n) = ↑m - ↑n\n[PROOFSTEP]\ncases' le_total m n with h h\n[GOAL]\ncase inl\nm n : ℕ\nh : m ≤ n\n⊢ ↑(m - n) = ↑m - ↑n\n[PROOFSTEP]\nrw [tsub_eq_zero_iff_le.2 h, Ordinal.sub_eq_zero_iff_le.2 (nat_cast_le.2 h)]\n[GOAL]\ncase inl\nm n : ℕ\nh : m ≤ n\n⊢ ↑0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nm n : ℕ\nh : n ≤ m\n⊢ ↑(m - n) = ↑m - ↑n\n[PROOFSTEP]\napply (add_left_cancel n).1\n[GOAL]\ncase inr\nm n : ℕ\nh : n ≤ m\n⊢ ↑n + ↑(m - n) = ↑n + (↑m - ↑n)\n[PROOFSTEP]\nrw [← Nat.cast_add, add_tsub_cancel_of_le h, Ordinal.add_sub_cancel_of_le (nat_cast_le.2 h)]\n[GOAL]\nm n : ℕ\n⊢ ↑(m / n) = ↑m / ↑n\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\nm : ℕ\n⊢ ↑(m / 0) = ↑m / ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nm n : ℕ\nhn : n ≠ 0\n⊢ ↑(m / n) = ↑m / ↑n\n[PROOFSTEP]\nhave hn' := nat_cast_ne_zero.2 hn\n[GOAL]\ncase inr\nm n : ℕ\nhn : n ≠ 0\nhn' : ↑n ≠ 0\n⊢ ↑(m / n) = ↑m / ↑n\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase inr.a\nm n : ℕ\nhn : n ≠ 0\nhn' : ↑n ≠ 0\n⊢ ↑(m / n) ≤ ↑m / ↑n\n[PROOFSTEP]\nrw [le_div hn', ← nat_cast_mul, nat_cast_le, mul_comm]\n[GOAL]\ncase inr.a\nm n : ℕ\nhn : n ≠ 0\nhn' : ↑n ≠ 0\n⊢ m / n * n ≤ m\n[PROOFSTEP]\napply Nat.div_mul_le_self\n[GOAL]\ncase inr.a\nm n : ℕ\nhn : n ≠ 0\nhn' : ↑n ≠ 0\n⊢ ↑m / ↑n ≤ ↑(m / n)\n[PROOFSTEP]\nrw [div_le hn', ← add_one_eq_succ, ← Nat.cast_succ, ← nat_cast_mul, nat_cast_lt, mul_comm, ←\n  Nat.div_lt_iff_lt_mul (Nat.pos_of_ne_zero hn)]\n[GOAL]\ncase inr.a\nm n : ℕ\nhn : n ≠ 0\nhn' : ↑n ≠ 0\n⊢ m / n < Nat.succ (m / n)\n[PROOFSTEP]\napply Nat.lt_succ_self\n[GOAL]\nm n : ℕ\n⊢ ↑(m % n) = ↑m % ↑n\n[PROOFSTEP]\nrw [← add_left_cancel, div_add_mod, ← nat_cast_div, ← nat_cast_mul, ← Nat.cast_add, Nat.div_add_mod]\n[GOAL]\n⊢ lift ↑0 = ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ lift ↑(n + 1) = ↑(n + 1)\n[PROOFSTEP]\nsimp [lift_nat_cast n]\n[GOAL]\no : Ordinal.{u}\nh : o < ω\n⊢ o < ord ℵ₀\n[PROOFSTEP]\nrcases Ordinal.lt_lift_iff.1 h with ⟨o, rfl, h'⟩\n[GOAL]\ncase intro.intro\no : Ordinal.{0}\nh' : o < type fun x x_1 => x < x_1\nh : Ordinal.lift o < ω\n⊢ Ordinal.lift o < ord ℵ₀\n[PROOFSTEP]\nrw [lt_ord, ← lift_card, lift_lt_aleph0, ← typein_enum (· < ·) h']\n[GOAL]\ncase intro.intro\no : Ordinal.{0}\nh' : o < type fun x x_1 => x < x_1\nh : Ordinal.lift o < ω\n⊢ card (typein (fun x x_1 => x < x_1) (enum (fun x x_1 => x < x_1) o h')) < ℵ₀\n[PROOFSTEP]\nexact lt_aleph0_iff_fintype.2 ⟨Set.fintypeLTNat _⟩\n[GOAL]\nc : Cardinal.{u_1}\nh : ℵ₀ ≤ c\n⊢ c + 1 = c\n[PROOFSTEP]\nrw [add_comm, ← card_ord c, ← card_one, ← card_add, one_add_of_omega_le]\n[GOAL]\nc : Cardinal.{u_1}\nh : ℵ₀ ≤ c\n⊢ ω ≤ ord c\n[PROOFSTEP]\nrwa [← ord_aleph0, ord_le_ord]\n[GOAL]\na b c : Ordinal.{u}\nh : IsLimit c\n⊢ a < b + c ↔ ∃ c', c' < c ∧ a < b + c'\n[PROOFSTEP]\nhave := IsNormal.bsup_eq.{u, u} (add_isNormal b) h\n[GOAL]\na b c : Ordinal.{u}\nh : IsLimit c\nthis : (bsup c fun x x_1 => (fun x x_2 => x + x_2) b x) = (fun x x_1 => x + x_1) b c\n⊢ a < b + c ↔ ∃ c', c' < c ∧ a < b + c'\n[PROOFSTEP]\ndsimp only at this \n[GOAL]\na b c : Ordinal.{u}\nh : IsLimit c\nthis : (bsup c fun x x_1 => b + x) = b + c\n⊢ a < b + c ↔ ∃ c', c' < c ∧ a < b + c'\n[PROOFSTEP]\nrw [← this, lt_bsup, bex_def]\n[GOAL]\no : Ordinal.{u_1}\n⊢ o < ω ↔ ∃ n, o = ↑n\n[PROOFSTEP]\nsimp_rw [← Cardinal.ord_aleph0, Cardinal.lt_ord, lt_aleph0, card_eq_nat]\n[GOAL]\n⊢ 1 < ω\n[PROOFSTEP]\nsimpa only [Nat.cast_one] using nat_lt_omega 1\n[GOAL]\no : Ordinal.{u_1}\nh : o < ω\n⊢ succ o < ω\n[PROOFSTEP]\nlet ⟨n, e⟩ := lt_omega.1 h\n[GOAL]\no : Ordinal.{u_1}\nh : o < ω\nn : ℕ\ne : o = ↑n\n⊢ succ o < ω\n[PROOFSTEP]\nrw [e]\n[GOAL]\no : Ordinal.{u_1}\nh : o < ω\nn : ℕ\ne : o = ↑n\n⊢ succ ↑n < ω\n[PROOFSTEP]\nexact nat_lt_omega (n + 1)\n[GOAL]\no : Ordinal.{u_1}\nH : ∀ (n : ℕ), ↑n ≤ o\na : Ordinal.{u_1}\nh : a < ω\n⊢ a < o\n[PROOFSTEP]\nlet ⟨n, e⟩ := lt_omega.1 h\n[GOAL]\no : Ordinal.{u_1}\nH : ∀ (n : ℕ), ↑n ≤ o\na : Ordinal.{u_1}\nh : a < ω\nn : ℕ\ne : a = ↑n\n⊢ a < o\n[PROOFSTEP]\nrw [e, ← succ_le_iff]\n[GOAL]\no : Ordinal.{u_1}\nH : ∀ (n : ℕ), ↑n ≤ o\na : Ordinal.{u_1}\nh : a < ω\nn : ℕ\ne : a = ↑n\n⊢ succ ↑n ≤ o\n[PROOFSTEP]\nexact H (n + 1)\n[GOAL]\na : Ordinal.{u_1}\n⊢ IsLimit a ↔ a ≠ 0 ∧ ω ∣ a\n[PROOFSTEP]\nrefine' ⟨fun l => ⟨l.1, ⟨a / ω, le_antisymm _ (mul_div_le _ _)⟩⟩, fun h => _⟩\n[GOAL]\ncase refine'_1\na : Ordinal.{u_1}\nl : IsLimit a\n⊢ a ≤ ω * (a / ω)\n[PROOFSTEP]\nrefine' (limit_le l).2 fun x hx => le_of_lt _\n[GOAL]\ncase refine'_1\na : Ordinal.{u_1}\nl : IsLimit a\nx : Ordinal.{u_1}\nhx : x < a\n⊢ x < ω * (a / ω)\n[PROOFSTEP]\nrw [← div_lt omega_ne_zero, ← succ_le_iff, le_div omega_ne_zero, mul_succ, add_le_of_limit omega_isLimit]\n[GOAL]\ncase refine'_1\na : Ordinal.{u_1}\nl : IsLimit a\nx : Ordinal.{u_1}\nhx : x < a\n⊢ ∀ (b' : Ordinal.{u_1}), b' < ω → ω * (x / ω) + b' ≤ a\n[PROOFSTEP]\nintro b hb\n[GOAL]\ncase refine'_1\na : Ordinal.{u_1}\nl : IsLimit a\nx : Ordinal.{u_1}\nhx : x < a\nb : Ordinal.{u_1}\nhb : b < ω\n⊢ ω * (x / ω) + b ≤ a\n[PROOFSTEP]\nrcases lt_omega.1 hb with ⟨n, rfl⟩\n[GOAL]\ncase refine'_1.intro\na : Ordinal.{u_1}\nl : IsLimit a\nx : Ordinal.{u_1}\nhx : x < a\nn : ℕ\nhb : ↑n < ω\n⊢ ω * (x / ω) + ↑n ≤ a\n[PROOFSTEP]\nexact (add_le_add_right (mul_div_le _ _) _).trans (lt_sub.1 <| nat_lt_limit (sub_isLimit l hx) _).le\n[GOAL]\ncase refine'_2\na : Ordinal.{u_1}\nh : a ≠ 0 ∧ ω ∣ a\n⊢ IsLimit a\n[PROOFSTEP]\nrcases h with ⟨a0, b, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro\nb : Ordinal.{u_1}\na0 : ω * b ≠ 0\n⊢ IsLimit (ω * b)\n[PROOFSTEP]\nrefine' mul_isLimit_left omega_isLimit (Ordinal.pos_iff_ne_zero.2 <| mt _ a0)\n[GOAL]\ncase refine'_2.intro.intro\nb : Ordinal.{u_1}\na0 : ω * b ≠ 0\n⊢ b = 0 → ω * b = 0\n[PROOFSTEP]\nintro e\n[GOAL]\ncase refine'_2.intro.intro\nb : Ordinal.{u_1}\na0 : ω * b ≠ 0\ne : b = 0\n⊢ ω * b = 0\n[PROOFSTEP]\nsimp only [e, mul_zero]\n[GOAL]\na b c : Ordinal.{u_1}\nba : b + a = a\nl : IsLimit c\nIH : ∀ (c' : Ordinal.{u_1}), c' < c → (a + b) * succ c' = a * succ c' + b\nc' : Ordinal.{u_1}\nh : c' < c\n⊢ (a + b) * c' ≤ a * c\n[PROOFSTEP]\napply (mul_le_mul_left' (le_succ c') _).trans\n[GOAL]\na b c : Ordinal.{u_1}\nba : b + a = a\nl : IsLimit c\nIH : ∀ (c' : Ordinal.{u_1}), c' < c → (a + b) * succ c' = a * succ c' + b\nc' : Ordinal.{u_1}\nh : c' < c\n⊢ (a + b) * succ c' ≤ a * c\n[PROOFSTEP]\nrw [IH _ h]\n[GOAL]\na b c : Ordinal.{u_1}\nba : b + a = a\nl : IsLimit c\nIH : ∀ (c' : Ordinal.{u_1}), c' < c → (a + b) * succ c' = a * succ c' + b\nc' : Ordinal.{u_1}\nh : c' < c\n⊢ a * succ c' + b ≤ a * c\n[PROOFSTEP]\napply (add_le_add_left _ _).trans\n[GOAL]\na b c : Ordinal.{u_1}\nba : b + a = a\nl : IsLimit c\nIH : ∀ (c' : Ordinal.{u_1}), c' < c → (a + b) * succ c' = a * succ c' + b\nc' : Ordinal.{u_1}\nh : c' < c\n⊢ a * succ c' + ?m.440069 ≤ a * c\n[PROOFSTEP]\nrw [← mul_succ]\n[GOAL]\na b c : Ordinal.{u_1}\nba : b + a = a\nl : IsLimit c\nIH : ∀ (c' : Ordinal.{u_1}), c' < c → (a + b) * succ c' = a * succ c' + b\nc' : Ordinal.{u_1}\nh : c' < c\n⊢ a * succ (succ c') ≤ a * c\n[PROOFSTEP]\nexact mul_le_mul_left' (succ_le_of_lt <| l.2 _ h) _\n[GOAL]\na b c : Ordinal.{u_1}\nba : b + a = a\nl : IsLimit c\nIH : ∀ (c' : Ordinal.{u_1}), c' < c → (a + b) * succ c' = a * succ c' + b\nc' : Ordinal.{u_1}\nh : c' < c\n⊢ b ≤ a\n[PROOFSTEP]\nrw [← ba]\n[GOAL]\na b c : Ordinal.{u_1}\nba : b + a = a\nl : IsLimit c\nIH : ∀ (c' : Ordinal.{u_1}), c' < c → (a + b) * succ c' = a * succ c' + b\nc' : Ordinal.{u_1}\nh : c' < c\n⊢ b ≤ b + a\n[PROOFSTEP]\nexact le_add_right _ _\n[GOAL]\na b c : Ordinal.{u_1}\nba : b + a = a\n⊢ (a + b) * succ c = a * succ c + b\n[PROOFSTEP]\ninduction c using limitRecOn with\n| H₁ => simp only [succ_zero, mul_one]\n| H₂ c IH => rw [mul_succ, IH, ← add_assoc, add_assoc _ b, ba, ← mul_succ]\n| H₃ c l IH =>\n  -- Porting note: Unused.\n      -- have := add_mul_limit_aux ba l IHrw [mul_succ, add_mul_limit_aux ba l IH, mul_succ, add_assoc]\n[GOAL]\na b c : Ordinal.{u_1}\nba : b + a = a\n⊢ (a + b) * succ c = a * succ c + b\n[PROOFSTEP]\ninduction c using limitRecOn with\n| H₁ => simp only [succ_zero, mul_one]\n| H₂ c IH => rw [mul_succ, IH, ← add_assoc, add_assoc _ b, ba, ← mul_succ]\n| H₃ c l IH =>\n  -- Porting note: Unused.\n      -- have := add_mul_limit_aux ba l IHrw [mul_succ, add_mul_limit_aux ba l IH, mul_succ, add_assoc]\n[GOAL]\ncase H₁\na b : Ordinal.{u_1}\nba : b + a = a\n⊢ (a + b) * succ 0 = a * succ 0 + b\n[PROOFSTEP]\n\n| H₁ => simp only [succ_zero, mul_one]\n[GOAL]\ncase H₁\na b : Ordinal.{u_1}\nba : b + a = a\n⊢ (a + b) * succ 0 = a * succ 0 + b\n[PROOFSTEP]\nsimp only [succ_zero, mul_one]\n[GOAL]\ncase H₂\na b : Ordinal.{u_1}\nba : b + a = a\nc : Ordinal.{u_1}\nIH : (a + b) * succ c = a * succ c + b\n⊢ (a + b) * succ (succ c) = a * succ (succ c) + b\n[PROOFSTEP]\n\n| H₂ c IH => rw [mul_succ, IH, ← add_assoc, add_assoc _ b, ba, ← mul_succ]\n[GOAL]\ncase H₂\na b : Ordinal.{u_1}\nba : b + a = a\nc : Ordinal.{u_1}\nIH : (a + b) * succ c = a * succ c + b\n⊢ (a + b) * succ (succ c) = a * succ (succ c) + b\n[PROOFSTEP]\nrw [mul_succ, IH, ← add_assoc, add_assoc _ b, ba, ← mul_succ]\n[GOAL]\ncase H₃\na b : Ordinal.{u_1}\nba : b + a = a\nc : Ordinal.{u_1}\nl : IsLimit c\nIH : ∀ (o' : Ordinal.{u_1}), o' < c → (a + b) * succ o' = a * succ o' + b\n⊢ (a + b) * succ c = a * succ c + b\n[PROOFSTEP]\n\n| H₃ c l IH =>\n  -- Porting note: Unused.\n      -- have := add_mul_limit_aux ba l IHrw [mul_succ, add_mul_limit_aux ba l IH, mul_succ, add_assoc]\n[GOAL]\ncase H₃\na b : Ordinal.{u_1}\nba : b + a = a\nc : Ordinal.{u_1}\nl : IsLimit c\nIH : ∀ (o' : Ordinal.{u_1}), o' < c → (a + b) * succ o' = a * succ o' + b\n⊢ (a + b) * succ c = a * succ c + b\n[PROOFSTEP]\nrw [mul_succ, add_mul_limit_aux ba l IH, mul_succ, add_assoc]\n[GOAL]\na b c : Ordinal.{u_1}\nhb : 0 < b\nh : ∀ (d : Ordinal.{u_1}), d < b → a + d < c\n⊢ a + b ≤ c\n[PROOFSTEP]\nhave H : a + (c - a) = c :=\n  Ordinal.add_sub_cancel_of_le\n    (by\n      rw [← add_zero a]\n      exact (h _ hb).le)\n[GOAL]\na b c : Ordinal.{u_1}\nhb : 0 < b\nh : ∀ (d : Ordinal.{u_1}), d < b → a + d < c\n⊢ a ≤ c\n[PROOFSTEP]\nrw [← add_zero a]\n[GOAL]\na b c : Ordinal.{u_1}\nhb : 0 < b\nh : ∀ (d : Ordinal.{u_1}), d < b → a + d < c\n⊢ a + 0 ≤ c\n[PROOFSTEP]\nexact (h _ hb).le\n[GOAL]\na b c : Ordinal.{u_1}\nhb : 0 < b\nh : ∀ (d : Ordinal.{u_1}), d < b → a + d < c\nH : a + (c - a) = c\n⊢ a + b ≤ c\n[PROOFSTEP]\nrw [← H]\n[GOAL]\na b c : Ordinal.{u_1}\nhb : 0 < b\nh : ∀ (d : Ordinal.{u_1}), d < b → a + d < c\nH : a + (c - a) = c\n⊢ a + b ≤ a + (c - a)\n[PROOFSTEP]\napply add_le_add_left _ a\n[GOAL]\na b c : Ordinal.{u_1}\nhb : 0 < b\nh : ∀ (d : Ordinal.{u_1}), d < b → a + d < c\nH : a + (c - a) = c\n⊢ b ≤ c - a\n[PROOFSTEP]\nby_contra' hb\n[GOAL]\na b c : Ordinal.{u_1}\nhb✝ : 0 < b\nh : ∀ (d : Ordinal.{u_1}), d < b → a + d < c\nH : a + (c - a) = c\nhb : c - a < b\n⊢ False\n[PROOFSTEP]\nexact (h _ hb).ne H\n[GOAL]\nf : Ordinal.{u} → Ordinal.{u}\nhf : IsNormal f\n⊢ Ordinal.sup (f ∘ Nat.cast) = f ω\n[PROOFSTEP]\nrw [← sup_nat_cast, IsNormal.sup.{0, u, u} hf]\n[GOAL]\no : Ordinal.{u_1}\n⊢ (sup fun n => o * ↑n) = o * ω\n[PROOFSTEP]\nrcases eq_zero_or_pos o with (rfl | ho)\n[GOAL]\ncase inl\n⊢ (sup fun n => 0 * ↑n) = 0 * ω\n[PROOFSTEP]\nrw [zero_mul]\n[GOAL]\ncase inl\n⊢ (sup fun n => 0 * ↑n) = 0\n[PROOFSTEP]\nexact sup_eq_zero_iff.2 fun n => zero_mul (n : Ordinal)\n[GOAL]\ncase inr\no : Ordinal.{u_1}\nho : 0 < o\n⊢ (sup fun n => o * ↑n) = o * ω\n[PROOFSTEP]\nexact (mul_isNormal ho).apply_omega\n[GOAL]\nα : Type u\nr : α → α → Prop\na b : α\nh : Acc r a\n⊢ rank h = sup fun b => succ (rank (_ : Acc r ↑b))\n[PROOFSTEP]\nchange (Acc.intro a fun _ => h.inv).rank = _\n[GOAL]\nα : Type u\nr : α → α → Prop\na b : α\nh : Acc r a\n⊢ rank (_ : Acc (fun x => r x) a) = sup fun b => succ (rank (_ : Acc r ↑b))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nr : α → α → Prop\na b : α\nhb : Acc r b\nh : r a b\n⊢ succ (rank (_ : Acc r a)) ≤ rank hb\n[PROOFSTEP]\nrw [hb.rank_eq]\n[GOAL]\nα : Type u\nr : α → α → Prop\na b : α\nhb : Acc r b\nh : r a b\n⊢ succ (rank (_ : Acc r a)) ≤ sup fun b_1 => succ (rank (_ : Acc r ↑b_1))\n[PROOFSTEP]\nrefine' le_trans _ (Ordinal.le_sup _ ⟨a, h⟩)\n[GOAL]\nα : Type u\nr : α → α → Prop\na b : α\nhb : Acc r b\nh : r a b\n⊢ succ (rank (_ : Acc r a)) ≤ succ (rank (_ : Acc r ↑{ val := a, property := h }))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nr : α → α → Prop\na b : α\nhwf : WellFounded r\n⊢ rank hwf a = sup fun b => succ (rank hwf ↑b)\n[PROOFSTEP]\nrw [rank, Acc.rank_eq]\n[GOAL]\nα : Type u\nr : α → α → Prop\na b : α\nhwf : WellFounded r\n⊢ (sup fun b => succ (Acc.rank (_ : Acc r ↑b))) = sup fun b => succ (rank hwf ↑b)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Ordinal.Arithmetic", "llama_tokens": 145944, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419958239131, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.3760099079161261}}
{"text": "[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\n⊢ IsConformalMap (restrictScalars ℝ map)\n[PROOFSTEP]\nhave minor₁ : ‖map 1‖ ≠ 0 := by simpa only [ext_ring_iff, Ne.def, norm_eq_zero] using nonzero\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\n⊢ ‖↑map 1‖ ≠ 0\n[PROOFSTEP]\nsimpa only [ext_ring_iff, Ne.def, norm_eq_zero] using nonzero\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\nminor₁ : ‖↑map 1‖ ≠ 0\n⊢ IsConformalMap (restrictScalars ℝ map)\n[PROOFSTEP]\nrefine' ⟨‖map 1‖, minor₁, ⟨‖map 1‖⁻¹ • ((map : ℂ →ₗ[ℂ] E) : ℂ →ₗ[ℝ] E), _⟩, _⟩\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\nminor₁ : ‖↑map 1‖ ≠ 0\n⊢ ∀ (x : ℂ), ‖↑(‖↑map 1‖⁻¹ • ↑ℝ ↑map) x‖ = ‖x‖\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\nminor₁ : ‖↑map 1‖ ≠ 0\nx : ℂ\n⊢ ‖↑(‖↑map 1‖⁻¹ • ↑ℝ ↑map) x‖ = ‖x‖\n[PROOFSTEP]\nsimp only [LinearMap.smul_apply]\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\nminor₁ : ‖↑map 1‖ ≠ 0\nx : ℂ\n⊢ ‖‖↑map 1‖⁻¹ • ↑(↑ℝ ↑map) x‖ = ‖x‖\n[PROOFSTEP]\nhave : x = x • (1 : ℂ) := by rw [smul_eq_mul, mul_one]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\nminor₁ : ‖↑map 1‖ ≠ 0\nx : ℂ\n⊢ x = x • 1\n[PROOFSTEP]\nrw [smul_eq_mul, mul_one]\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\nminor₁ : ‖↑map 1‖ ≠ 0\nx : ℂ\nthis : x = x • 1\n⊢ ‖‖↑map 1‖⁻¹ • ↑(↑ℝ ↑map) x‖ = ‖x‖\n[PROOFSTEP]\nnth_rw 1 [this]\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\nminor₁ : ‖↑map 1‖ ≠ 0\nx : ℂ\nthis : x = x • 1\n⊢ ‖‖↑map 1‖⁻¹ • ↑(↑ℝ ↑map) (x • 1)‖ = ‖x‖\n[PROOFSTEP]\nrw [LinearMap.coe_restrictScalars]\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\nminor₁ : ‖↑map 1‖ ≠ 0\nx : ℂ\nthis : x = x • 1\n⊢ ‖‖↑map 1‖⁻¹ • ↑↑map (x • 1)‖ = ‖x‖\n[PROOFSTEP]\nsimp only [map.coe_coe, map.map_smul, norm_smul, norm_inv, norm_norm]\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\nminor₁ : ‖↑map 1‖ ≠ 0\nx : ℂ\nthis : x = x • 1\n⊢ ‖↑map 1‖⁻¹ * (‖x‖ * ‖↑map 1‖) = ‖x‖\n[PROOFSTEP]\nfield_simp only [one_mul]\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\nminor₁ : ‖↑map 1‖ ≠ 0\n⊢ restrictScalars ℝ map =\n    ‖↑map 1‖ •\n      LinearIsometry.toContinuousLinearMap\n        { toLinearMap := ‖↑map 1‖⁻¹ • ↑ℝ ↑map, norm_map' := (_ : ∀ (x : ℂ), ‖↑(‖↑map 1‖⁻¹ • ↑ℝ ↑map) x‖ = ‖x‖) }\n[PROOFSTEP]\next1\n  -- Porting note: was simp\n[GOAL]\ncase refine'_2.h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : NormedSpace ℂ E\nz : ℂ\ng : ℂ →L[ℝ] E\nf : ℂ → E\nmap : ℂ →L[ℂ] E\nnonzero : map ≠ 0\nminor₁ : ‖↑map 1‖ ≠ 0\nx✝ : ℂ\n⊢ ↑(restrictScalars ℝ map) x✝ =\n    ↑(‖↑map 1‖ •\n          LinearIsometry.toContinuousLinearMap\n            { toLinearMap := ‖↑map 1‖⁻¹ • ↑ℝ ↑map, norm_map' := (_ : ∀ (x : ℂ), ‖↑(‖↑map 1‖⁻¹ • ↑ℝ ↑map) x‖ = ‖x‖) })\n      x✝\n[PROOFSTEP]\nrw [coe_restrictScalars', coe_smul', LinearIsometry.coe_toContinuousLinearMap, LinearIsometry.coe_mk, Pi.smul_apply,\n  LinearMap.smul_apply, LinearMap.coe_restrictScalars, coe_coe, smul_inv_smul₀ minor₁]\n[GOAL]\nf : ℂ → ℂ\nz : ℂ\ng : ℂ →L[ℝ] ℂ\nh : IsConformalMap g\n⊢ (∃ map, restrictScalars ℝ map = g) ∨ ∃ map, restrictScalars ℝ map = ContinuousLinearMap.comp g ↑conjCle\n[PROOFSTEP]\nrcases h with ⟨c, -, li, rfl⟩\n[GOAL]\ncase intro.intro.intro\nf : ℂ → ℂ\nz : ℂ\nc : ℝ\nli : ℂ →ₗᵢ[ℝ] ℂ\n⊢ (∃ map, restrictScalars ℝ map = c • LinearIsometry.toContinuousLinearMap li) ∨\n    ∃ map, restrictScalars ℝ map = ContinuousLinearMap.comp (c • LinearIsometry.toContinuousLinearMap li) ↑conjCle\n[PROOFSTEP]\nobtain ⟨li, rfl⟩ : ∃ li' : ℂ ≃ₗᵢ[ℝ] ℂ, li'.toLinearIsometry = li := ⟨li.toLinearIsometryEquiv rfl, by ext1; rfl⟩\n[GOAL]\nf : ℂ → ℂ\nz : ℂ\nc : ℝ\nli : ℂ →ₗᵢ[ℝ] ℂ\n⊢ LinearIsometryEquiv.toLinearIsometry\n      (LinearIsometry.toLinearIsometryEquiv li (_ : FiniteDimensional.finrank ℝ ℂ = FiniteDimensional.finrank ℝ ℂ)) =\n    li\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nf : ℂ → ℂ\nz : ℂ\nc : ℝ\nli : ℂ →ₗᵢ[ℝ] ℂ\nx✝ : ℂ\n⊢ ↑(LinearIsometryEquiv.toLinearIsometry\n          (LinearIsometry.toLinearIsometryEquiv li (_ : FiniteDimensional.finrank ℝ ℂ = FiniteDimensional.finrank ℝ ℂ)))\n      x✝ =\n    ↑li x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.intro.intro\nf : ℂ → ℂ\nz : ℂ\nc : ℝ\nli : ℂ ≃ₗᵢ[ℝ] ℂ\n⊢ (∃ map, restrictScalars ℝ map = c • LinearIsometry.toContinuousLinearMap (LinearIsometryEquiv.toLinearIsometry li)) ∨\n    ∃ map,\n      restrictScalars ℝ map =\n        ContinuousLinearMap.comp (c • LinearIsometry.toContinuousLinearMap (LinearIsometryEquiv.toLinearIsometry li))\n          ↑conjCle\n[PROOFSTEP]\nrcases linear_isometry_complex li with\n  ⟨a, rfl | rfl⟩\n    -- let rot := c • (a : ℂ) • ContinuousLinearMap.id ℂ ℂ,\n[GOAL]\ncase intro.intro.intro.intro.intro.inl\nf : ℂ → ℂ\nz : ℂ\nc : ℝ\na : { x // x ∈ circle }\n⊢ (∃ map,\n      restrictScalars ℝ map =\n        c • LinearIsometry.toContinuousLinearMap (LinearIsometryEquiv.toLinearIsometry (↑rotation a))) ∨\n    ∃ map,\n      restrictScalars ℝ map =\n        ContinuousLinearMap.comp\n          (c • LinearIsometry.toContinuousLinearMap (LinearIsometryEquiv.toLinearIsometry (↑rotation a))) ↑conjCle\n[PROOFSTEP]\nrefine' Or.inl ⟨c • (a : ℂ) • ContinuousLinearMap.id ℂ ℂ, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.inl\nf : ℂ → ℂ\nz : ℂ\nc : ℝ\na : { x // x ∈ circle }\n⊢ restrictScalars ℝ (c • ↑a • ContinuousLinearMap.id ℂ ℂ) =\n    c • LinearIsometry.toContinuousLinearMap (LinearIsometryEquiv.toLinearIsometry (↑rotation a))\n[PROOFSTEP]\next1\n  -- Porting note: was simp\n[GOAL]\ncase intro.intro.intro.intro.intro.inl.h\nf : ℂ → ℂ\nz : ℂ\nc : ℝ\na : { x // x ∈ circle }\nx✝ : ℂ\n⊢ ↑(restrictScalars ℝ (c • ↑a • ContinuousLinearMap.id ℂ ℂ)) x✝ =\n    ↑(c • LinearIsometry.toContinuousLinearMap (LinearIsometryEquiv.toLinearIsometry (↑rotation a))) x✝\n[PROOFSTEP]\nrw [coe_restrictScalars', smul_apply, smul_apply, smul_apply, LinearIsometry.coe_toContinuousLinearMap,\n  LinearIsometryEquiv.coe_toLinearIsometry, rotation_apply, id_apply, smul_eq_mul]\n[GOAL]\ncase intro.intro.intro.intro.intro.inr\nf : ℂ → ℂ\nz : ℂ\nc : ℝ\na : { x // x ∈ circle }\n⊢ (∃ map,\n      restrictScalars ℝ map =\n        c •\n          LinearIsometry.toContinuousLinearMap\n            (LinearIsometryEquiv.toLinearIsometry (LinearIsometryEquiv.trans conjLie (↑rotation a)))) ∨\n    ∃ map,\n      restrictScalars ℝ map =\n        ContinuousLinearMap.comp\n          (c •\n            LinearIsometry.toContinuousLinearMap\n              (LinearIsometryEquiv.toLinearIsometry (LinearIsometryEquiv.trans conjLie (↑rotation a))))\n          ↑conjCle\n[PROOFSTEP]\nrefine' Or.inr ⟨c • (a : ℂ) • ContinuousLinearMap.id ℂ ℂ, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.inr\nf : ℂ → ℂ\nz : ℂ\nc : ℝ\na : { x // x ∈ circle }\n⊢ restrictScalars ℝ (c • ↑a • ContinuousLinearMap.id ℂ ℂ) =\n    ContinuousLinearMap.comp\n      (c •\n        LinearIsometry.toContinuousLinearMap\n          (LinearIsometryEquiv.toLinearIsometry (LinearIsometryEquiv.trans conjLie (↑rotation a))))\n      ↑conjCle\n[PROOFSTEP]\next1\n  -- Porting note: was simp\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.h\nf : ℂ → ℂ\nz : ℂ\nc : ℝ\na : { x // x ∈ circle }\nx✝ : ℂ\n⊢ ↑(restrictScalars ℝ (c • ↑a • ContinuousLinearMap.id ℂ ℂ)) x✝ =\n    ↑(ContinuousLinearMap.comp\n          (c •\n            LinearIsometry.toContinuousLinearMap\n              (LinearIsometryEquiv.toLinearIsometry (LinearIsometryEquiv.trans conjLie (↑rotation a))))\n          ↑conjCle)\n      x✝\n[PROOFSTEP]\nrw [coe_restrictScalars', smul_apply, smul_apply, comp_apply, smul_apply, LinearIsometry.coe_toContinuousLinearMap,\n  LinearIsometryEquiv.coe_toLinearIsometry, LinearIsometryEquiv.trans_apply, rotation_apply, id_apply, smul_eq_mul,\n  ContinuousLinearEquiv.coe_coe, conjCle_apply, conjLie_apply, conj_conj]\n[GOAL]\nf : ℂ → ℂ\nz : ℂ\ng : ℂ →L[ℝ] ℂ\n⊢ IsConformalMap g ↔ ((∃ map, restrictScalars ℝ map = g) ∨ ∃ map, restrictScalars ℝ map = comp g ↑conjCle) ∧ g ≠ 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nf : ℂ → ℂ\nz : ℂ\ng : ℂ →L[ℝ] ℂ\n⊢ IsConformalMap g → ((∃ map, restrictScalars ℝ map = g) ∨ ∃ map, restrictScalars ℝ map = comp g ↑conjCle) ∧ g ≠ 0\n[PROOFSTEP]\nexact fun h => ⟨h.is_complex_or_conj_linear, h.ne_zero⟩\n[GOAL]\ncase mpr\nf : ℂ → ℂ\nz : ℂ\ng : ℂ →L[ℝ] ℂ\n⊢ ((∃ map, restrictScalars ℝ map = g) ∨ ∃ map, restrictScalars ℝ map = comp g ↑conjCle) ∧ g ≠ 0 → IsConformalMap g\n[PROOFSTEP]\nrintro ⟨⟨map, rfl⟩ | ⟨map, hmap⟩, h₂⟩\n[GOAL]\ncase mpr.intro.inl.intro\nf : ℂ → ℂ\nz : ℂ\nmap : ℂ →L[ℂ] ℂ\nh₂ : restrictScalars ℝ map ≠ 0\n⊢ IsConformalMap (restrictScalars ℝ map)\n[PROOFSTEP]\nrefine' isConformalMap_complex_linear _\n[GOAL]\ncase mpr.intro.inl.intro\nf : ℂ → ℂ\nz : ℂ\nmap : ℂ →L[ℂ] ℂ\nh₂ : restrictScalars ℝ map ≠ 0\n⊢ map ≠ 0\n[PROOFSTEP]\ncontrapose! h₂ with w\n[GOAL]\ncase mpr.intro.inl.intro\nf : ℂ → ℂ\nz : ℂ\nmap : ℂ →L[ℂ] ℂ\nw : map = 0\n⊢ restrictScalars ℝ map = 0\n[PROOFSTEP]\nsimp only [w, restrictScalars_zero]\n[GOAL]\ncase mpr.intro.inr.intro\nf : ℂ → ℂ\nz : ℂ\ng : ℂ →L[ℝ] ℂ\nh₂ : g ≠ 0\nmap : ℂ →L[ℂ] ℂ\nhmap : restrictScalars ℝ map = comp g ↑conjCle\n⊢ IsConformalMap g\n[PROOFSTEP]\nhave minor₁ : g = map.restrictScalars ℝ ∘L ↑conjCle := by\n  ext1\n  simp only [hmap, coe_comp', ContinuousLinearEquiv.coe_coe, Function.comp_apply, conjCle_apply, starRingEnd_self_apply]\n[GOAL]\nf : ℂ → ℂ\nz : ℂ\ng : ℂ →L[ℝ] ℂ\nh₂ : g ≠ 0\nmap : ℂ →L[ℂ] ℂ\nhmap : restrictScalars ℝ map = comp g ↑conjCle\n⊢ g = comp (restrictScalars ℝ map) ↑conjCle\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nf : ℂ → ℂ\nz : ℂ\ng : ℂ →L[ℝ] ℂ\nh₂ : g ≠ 0\nmap : ℂ →L[ℂ] ℂ\nhmap : restrictScalars ℝ map = comp g ↑conjCle\nx✝ : ℂ\n⊢ ↑g x✝ = ↑(comp (restrictScalars ℝ map) ↑conjCle) x✝\n[PROOFSTEP]\nsimp only [hmap, coe_comp', ContinuousLinearEquiv.coe_coe, Function.comp_apply, conjCle_apply, starRingEnd_self_apply]\n[GOAL]\ncase mpr.intro.inr.intro\nf : ℂ → ℂ\nz : ℂ\ng : ℂ →L[ℝ] ℂ\nh₂ : g ≠ 0\nmap : ℂ →L[ℂ] ℂ\nhmap : restrictScalars ℝ map = comp g ↑conjCle\nminor₁ : g = comp (restrictScalars ℝ map) ↑conjCle\n⊢ IsConformalMap g\n[PROOFSTEP]\nrw [minor₁] at h₂ ⊢\n[GOAL]\ncase mpr.intro.inr.intro\nf : ℂ → ℂ\nz : ℂ\ng : ℂ →L[ℝ] ℂ\nmap : ℂ →L[ℂ] ℂ\nh₂ : comp (restrictScalars ℝ map) ↑conjCle ≠ 0\nhmap : restrictScalars ℝ map = comp g ↑conjCle\nminor₁ : g = comp (restrictScalars ℝ map) ↑conjCle\n⊢ IsConformalMap (comp (restrictScalars ℝ map) ↑conjCle)\n[PROOFSTEP]\nrefine' isConformalMap_complex_linear_conj _\n[GOAL]\ncase mpr.intro.inr.intro\nf : ℂ → ℂ\nz : ℂ\ng : ℂ →L[ℝ] ℂ\nmap : ℂ →L[ℂ] ℂ\nh₂ : comp (restrictScalars ℝ map) ↑conjCle ≠ 0\nhmap : restrictScalars ℝ map = comp g ↑conjCle\nminor₁ : g = comp (restrictScalars ℝ map) ↑conjCle\n⊢ map ≠ 0\n[PROOFSTEP]\ncontrapose! h₂ with w\n[GOAL]\ncase mpr.intro.inr.intro\nf : ℂ → ℂ\nz : ℂ\ng : ℂ →L[ℝ] ℂ\nmap : ℂ →L[ℂ] ℂ\nhmap : restrictScalars ℝ map = comp g ↑conjCle\nminor₁ : g = comp (restrictScalars ℝ map) ↑conjCle\nw : map = 0\n⊢ comp (restrictScalars ℝ map) ↑conjCle = 0\n[PROOFSTEP]\nsimp only [w, restrictScalars_zero, zero_comp]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.Conformal", "llama_tokens": 5951, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7461389930307512, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.3759840426605501}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : Group α\ninst✝ : HasDistribNeg α\na : α\n⊢ (-a)⁻¹ = -a⁻¹\n[PROOFSTEP]\nrw [eq_comm, eq_inv_iff_mul_eq_one, neg_mul, mul_neg, neg_neg, mul_left_inv]\n[GOAL]\nα : Type u_1\ninst✝ : NonUnitalCommRing α\na b✝ c✝ b c x : α\nh : x * x - b * x + c = 0\n⊢ ∃ y, y * y - b * y + c = 0 ∧ x + y = b ∧ x * y = c\n[PROOFSTEP]\nhave : c = x * (b - x) := (eq_neg_of_add_eq_zero_right h).trans (by simp [mul_sub, mul_comm])\n[GOAL]\nα : Type u_1\ninst✝ : NonUnitalCommRing α\na b✝ c✝ b c x : α\nh : x * x - b * x + c = 0\n⊢ -(x * x - b * x) = x * (b - x)\n[PROOFSTEP]\nsimp [mul_sub, mul_comm]\n[GOAL]\nα : Type u_1\ninst✝ : NonUnitalCommRing α\na b✝ c✝ b c x : α\nh : x * x - b * x + c = 0\nthis : c = x * (b - x)\n⊢ ∃ y, y * y - b * y + c = 0 ∧ x + y = b ∧ x * y = c\n[PROOFSTEP]\nrefine' ⟨b - x, _, by simp, by rw [this]⟩\n[GOAL]\nα : Type u_1\ninst✝ : NonUnitalCommRing α\na b✝ c✝ b c x : α\nh : x * x - b * x + c = 0\nthis : c = x * (b - x)\n⊢ x + (b - x) = b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : NonUnitalCommRing α\na b✝ c✝ b c x : α\nh : x * x - b * x + c = 0\nthis : c = x * (b - x)\n⊢ x * (b - x) = c\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\ninst✝ : NonUnitalCommRing α\na b✝ c✝ b c x : α\nh : x * x - b * x + c = 0\nthis : c = x * (b - x)\n⊢ (b - x) * (b - x) - b * (b - x) + c = 0\n[PROOFSTEP]\nrw [this, sub_add, ← sub_mul, sub_self]\n[GOAL]\nα : Type u_1\ninst✝¹ : NonAssocRing α\ninst✝ : Nontrivial α\na : α\nh : a + 1 = a\n⊢ a + 1 = a + 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\ninst✝¹ : NonAssocRing α\ninst✝ : Nontrivial α\na : α\nh : a - 1 = a\n⊢ a + -1 = a + -0\n[PROOFSTEP]\nsimp [← sub_eq_add_neg, h]\n[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsLeftCancelMulZero α\nx y : α\nh : x * y = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsLeftCancelMulZero α\nx y : α\nh : x * y = 0\nhx : x = 0\n⊢ x = 0 ∨ y = 0\ncase neg α : Type u_1 inst✝¹ : Ring α inst✝ : IsLeftCancelMulZero α x y : α h : x * y = 0 hx : ¬x = 0 ⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\n{ left\n  exact hx\n}\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsLeftCancelMulZero α\nx y : α\nh : x * y = 0\nhx : x = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.h\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsLeftCancelMulZero α\nx y : α\nh : x * y = 0\nhx : x = 0\n⊢ x = 0\n[PROOFSTEP]\nexact hx\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsLeftCancelMulZero α\nx y : α\nh : x * y = 0\nhx : ¬x = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\n{ right\n  rw [← sub_zero (x * y), ← mul_zero x, ← mul_sub] at h \n  have := (IsLeftCancelMulZero.mul_left_cancel_of_ne_zero) hx h\n  rwa [sub_zero] at this \n}\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsLeftCancelMulZero α\nx y : α\nh : x * y = 0\nhx : ¬x = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.h\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsLeftCancelMulZero α\nx y : α\nh : x * y = 0\nhx : ¬x = 0\n⊢ y = 0\n[PROOFSTEP]\nrw [← sub_zero (x * y), ← mul_zero x, ← mul_sub] at h \n[GOAL]\ncase neg.h\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsLeftCancelMulZero α\nx y : α\nh : x * (y - 0) = x * 0\nhx : ¬x = 0\n⊢ y = 0\n[PROOFSTEP]\nhave := (IsLeftCancelMulZero.mul_left_cancel_of_ne_zero) hx h\n[GOAL]\ncase neg.h\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsLeftCancelMulZero α\nx y : α\nh : x * (y - 0) = x * 0\nhx : ¬x = 0\nthis : y - 0 = 0\n⊢ y = 0\n[PROOFSTEP]\nrwa [sub_zero] at this \n[GOAL]\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsRightCancelMulZero α\nx y : α\nh : x * y = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsRightCancelMulZero α\nx y : α\nh : x * y = 0\nhy : y = 0\n⊢ x = 0 ∨ y = 0\ncase neg α : Type u_1 inst✝¹ : Ring α inst✝ : IsRightCancelMulZero α x y : α h : x * y = 0 hy : ¬y = 0 ⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\n{ right\n  exact hy\n}\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsRightCancelMulZero α\nx y : α\nh : x * y = 0\nhy : y = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\nright\n[GOAL]\ncase pos.h\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsRightCancelMulZero α\nx y : α\nh : x * y = 0\nhy : y = 0\n⊢ y = 0\n[PROOFSTEP]\nexact hy\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsRightCancelMulZero α\nx y : α\nh : x * y = 0\nhy : ¬y = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\n{ left\n  rw [← sub_zero (x * y), ← zero_mul y, ← sub_mul] at h \n  have := (IsRightCancelMulZero.mul_right_cancel_of_ne_zero) hy h\n  rwa [sub_zero] at this \n}\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsRightCancelMulZero α\nx y : α\nh : x * y = 0\nhy : ¬y = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase neg.h\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsRightCancelMulZero α\nx y : α\nh : x * y = 0\nhy : ¬y = 0\n⊢ x = 0\n[PROOFSTEP]\nrw [← sub_zero (x * y), ← zero_mul y, ← sub_mul] at h \n[GOAL]\ncase neg.h\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsRightCancelMulZero α\nx y : α\nh : (x - 0) * y = 0 * y\nhy : ¬y = 0\n⊢ x = 0\n[PROOFSTEP]\nhave := (IsRightCancelMulZero.mul_right_cancel_of_ne_zero) hy h\n[GOAL]\ncase neg.h\nα : Type u_1\ninst✝¹ : Ring α\ninst✝ : IsRightCancelMulZero α\nx y : α\nh : (x - 0) * y = 0 * y\nhy : ¬y = 0\nthis : x - 0 = 0\n⊢ x = 0\n[PROOFSTEP]\nrwa [sub_zero] at this \n[GOAL]\nα : Type ?u.21715\ninst✝¹ : Ring α\ninst✝ : NoZeroDivisors α\na✝ b✝ c✝ : α\nha : a✝ ≠ 0\nh : a✝ * b✝ = a✝ * c✝\n⊢ b✝ = c✝\n[PROOFSTEP]\nrw [← sub_eq_zero, ← mul_sub] at h \n[GOAL]\nα : Type ?u.21715\ninst✝¹ : Ring α\ninst✝ : NoZeroDivisors α\na✝ b✝ c✝ : α\nha : a✝ ≠ 0\nh✝ : a✝ * b✝ = a✝ * c✝\nh : a✝ * (b✝ - c✝) = 0\n⊢ b✝ = c✝\n[PROOFSTEP]\nexact sub_eq_zero.1 ((eq_zero_or_eq_zero_of_mul_eq_zero h).resolve_left ha)\n[GOAL]\nα : Type ?u.21715\ninst✝¹ : Ring α\ninst✝ : NoZeroDivisors α\na✝ b✝ c✝ : α\nhb : b✝ ≠ 0\nh : a✝ * b✝ = c✝ * b✝\n⊢ a✝ = c✝\n[PROOFSTEP]\nrw [← sub_eq_zero, ← sub_mul] at h \n[GOAL]\nα : Type ?u.21715\ninst✝¹ : Ring α\ninst✝ : NoZeroDivisors α\na✝ b✝ c✝ : α\nhb : b✝ ≠ 0\nh✝ : a✝ * b✝ = c✝ * b✝\nh : (a✝ - c✝) * b✝ = 0\n⊢ a✝ = c✝\n[PROOFSTEP]\nexact sub_eq_zero.1 ((eq_zero_or_eq_zero_of_mul_eq_zero h).resolve_right hb)\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Ring.Basic", "llama_tokens": 3338, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6224593312018546, "lm_q2_score": 0.6039318337259583, "lm_q1q2_score": 0.3759230053125696}}
{"text": "[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : KernelFork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ G.map (Fork.ι c) ≫ G.map f = 0\n[PROOFSTEP]\nrw [← G.map_comp, c.condition, G.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : KernelFork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ IsLimit (G.mapCone c) ≃ IsLimit (map c G)\n[PROOFSTEP]\nrefine' (IsLimit.postcomposeHomEquiv _ _).symm.trans (IsLimit.equivIsoLimit _)\n[GOAL]\ncase refine'_1\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : KernelFork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ parallelPair f 0 ⋙ G ≅ parallelPair (G.map f) 0\n[PROOFSTEP]\nrefine' parallelPair.ext (Iso.refl _) (Iso.refl _) _ _\n[GOAL]\ncase refine'_1.refine'_1\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : KernelFork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ (parallelPair f 0 ⋙ G).map WalkingParallelPairHom.left ≫\n      (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.one)).hom =\n    (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.zero)).hom ≫\n      (parallelPair (G.map f) 0).map WalkingParallelPairHom.left\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_1.refine'_2\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : KernelFork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ (parallelPair f 0 ⋙ G).map WalkingParallelPairHom.right ≫\n      (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.one)).hom =\n    (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.zero)).hom ≫\n      (parallelPair (G.map f) 0).map WalkingParallelPairHom.right\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : KernelFork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ (Cones.postcompose\n          (parallelPair.ext (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.zero))\n              (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.one))\n              (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n              (_ : G.map 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ 0)).hom).obj\n      (G.mapCone c) ≅\n    map c G\n[PROOFSTEP]\nexact Cones.ext (Iso.refl _) (by rintro (_ | _) <;> aesop_cat)\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : KernelFork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ ∀ (j : WalkingParallelPair),\n    NatTrans.app\n        ((Cones.postcompose\n                (parallelPair.ext (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.zero))\n                    (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.one))\n                    (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n                    (_ : G.map 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ 0)).hom).obj\n            (G.mapCone c)).π\n        j =\n      (Iso.refl\n            ((Cones.postcompose\n                    (parallelPair.ext (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.zero))\n                        (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.one))\n                        (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n                        (_ : G.map 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ 0)).hom).obj\n                (G.mapCone c)).pt).hom ≫\n        NatTrans.app (map c G).π j\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase zero\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : KernelFork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ NatTrans.app\n      ((Cones.postcompose\n              (parallelPair.ext (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.zero))\n                  (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.one))\n                  (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n                  (_ : G.map 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ 0)).hom).obj\n          (G.mapCone c)).π\n      WalkingParallelPair.zero =\n    (Iso.refl\n          ((Cones.postcompose\n                  (parallelPair.ext (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.zero))\n                      (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.one))\n                      (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n                      (_ : G.map 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ 0)).hom).obj\n              (G.mapCone c)).pt).hom ≫\n      NatTrans.app (map c G).π WalkingParallelPair.zero\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase one\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : KernelFork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ NatTrans.app\n      ((Cones.postcompose\n              (parallelPair.ext (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.zero))\n                  (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.one))\n                  (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n                  (_ : G.map 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ 0)).hom).obj\n          (G.mapCone c)).π\n      WalkingParallelPair.one =\n    (Iso.refl\n          ((Cones.postcompose\n                  (parallelPair.ext (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.zero))\n                      (Iso.refl ((parallelPair f 0 ⋙ G).obj WalkingParallelPair.one))\n                      (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n                      (_ : G.map 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ 0)).hom).obj\n              (G.mapCone c)).pt).hom ≫\n      NatTrans.app (map c G).π WalkingParallelPair.one\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Z ⟶ X\nw : h ≫ f = 0\n⊢ G.map h ≫ G.map f = 0\n[PROOFSTEP]\nsimp only [← G.map_comp, w, Functor.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : HasZeroMorphisms C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasZeroMorphisms D\nG : C ⥤ D\ninst✝¹ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Z ⟶ X\nw : h ≫ f = 0\ninst✝ : PreservesLimit (parallelPair f 0) G\nl : IsLimit (KernelFork.ofι h w)\n⊢ G.map h ≫ G.map f = 0\n[PROOFSTEP]\nsimp only [← G.map_comp, w, Functor.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Z ⟶ X\nw : h ≫ f = 0\ninst✝¹ : HasKernel f\ninst✝ : PreservesLimit (parallelPair f 0) G\n⊢ G.map (kernel.ι f) ≫ G.map f = G.map (kernel.ι f) ≫ 0\n[PROOFSTEP]\nsimp only [← G.map_comp, kernel.condition, comp_zero, Functor.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Z ⟶ X\nw : h ≫ f = 0\ninst✝¹ : HasKernel f\ninst✝ : HasKernel (G.map f)\ni : IsIso (kernelComparison f G)\n⊢ PreservesLimit (parallelPair f 0) G\n[PROOFSTEP]\napply preservesLimitOfPreservesLimitCone (kernelIsKernel f)\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Z ⟶ X\nw : h ≫ f = 0\ninst✝¹ : HasKernel f\ninst✝ : HasKernel (G.map f)\ni : IsIso (kernelComparison f G)\n⊢ IsLimit (G.mapCone (Fork.ofι (kernel.ι f) (_ : kernel.ι f ≫ f = kernel.ι f ≫ 0)))\n[PROOFSTEP]\napply (isLimitMapConeForkEquiv' G (kernel.condition f)).symm _\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Z ⟶ X\nw : h ≫ f = 0\ninst✝¹ : HasKernel f\ninst✝ : HasKernel (G.map f)\ni : IsIso (kernelComparison f G)\n⊢ IsLimit (KernelFork.ofι (G.map (kernel.ι f)) (_ : G.map (kernel.ι f) ≫ G.map f = 0))\n[PROOFSTEP]\nexact @IsLimit.ofPointIso _ _ _ _ _ _ _ (kernelIsKernel (G.map f)) i\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝³ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Z ⟶ X\nw : h ≫ f = 0\ninst✝² : HasKernel f\ninst✝¹ : HasKernel (G.map f)\ninst✝ : PreservesLimit (parallelPair f 0) G\n⊢ (iso G f).hom = kernelComparison f G\n[PROOFSTEP]\nrw [← cancel_mono (kernel.ι _)]\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝³ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Z ⟶ X\nw : h ≫ f = 0\ninst✝² : HasKernel f\ninst✝¹ : HasKernel (G.map f)\ninst✝ : PreservesLimit (parallelPair f 0) G\n⊢ (iso G f).hom ≫ kernel.ι (G.map f) = kernelComparison f G ≫ kernel.ι (G.map f)\n[PROOFSTEP]\nsimp [PreservesKernel.iso]\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝³ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Z ⟶ X\nw : h ≫ f = 0\ninst✝² : HasKernel f\ninst✝¹ : HasKernel (G.map f)\ninst✝ : PreservesLimit (parallelPair f 0) G\n⊢ IsIso (kernelComparison f G)\n[PROOFSTEP]\nrw [← PreservesKernel.iso_hom]\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝³ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Z ⟶ X\nw : h ≫ f = 0\ninst✝² : HasKernel f\ninst✝¹ : HasKernel (G.map f)\ninst✝ : PreservesLimit (parallelPair f 0) G\n⊢ IsIso (PreservesKernel.iso G f).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝¹⁰ : Category.{v₁, u₁} C\ninst✝⁹ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁸ : Category.{v₂, u₂} D\ninst✝⁷ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝⁶ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Z ⟶ X\nw : h ≫ f = 0\ninst✝⁵ : HasKernel f\ninst✝⁴ : HasKernel (G.map f)\ninst✝³ : PreservesLimit (parallelPair f 0) G\nX' Y' : C\ng : X' ⟶ Y'\ninst✝² : HasKernel g\ninst✝¹ : HasKernel (G.map g)\ninst✝ : PreservesLimit (parallelPair g 0) G\np : X ⟶ X'\nq : Y ⟶ Y'\nhpq : f ≫ q = p ≫ g\n⊢ G.map f ≫ G.map q = G.map p ≫ G.map g\n[PROOFSTEP]\nrw [← G.map_comp, hpq, G.map_comp]\n[GOAL]\nC : Type u₁\ninst✝¹⁰ : Category.{v₁, u₁} C\ninst✝⁹ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁸ : Category.{v₂, u₂} D\ninst✝⁷ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝⁶ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Z ⟶ X\nw : h ≫ f = 0\ninst✝⁵ : HasKernel f\ninst✝⁴ : HasKernel (G.map f)\ninst✝³ : PreservesLimit (parallelPair f 0) G\nX' Y' : C\ng : X' ⟶ Y'\ninst✝² : HasKernel g\ninst✝¹ : HasKernel (G.map g)\ninst✝ : PreservesLimit (parallelPair g 0) G\np : X ⟶ X'\nq : Y ⟶ Y'\nhpq : f ≫ q = p ≫ g\n⊢ kernel.map (G.map f) (G.map g) (G.map p) (G.map q) (_ : G.map f ≫ G.map q = G.map p ≫ G.map g) ≫\n      (PreservesKernel.iso G g).inv =\n    (PreservesKernel.iso G f).inv ≫ G.map (kernel.map f g p q hpq)\n[PROOFSTEP]\nrw [Iso.comp_inv_eq, Category.assoc, PreservesKernel.iso_hom, Iso.eq_inv_comp, PreservesKernel.iso_hom,\n  kernelComparison_comp_kernel_map]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : CokernelCofork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ G.map f ≫ G.map (Cofork.π c) = 0\n[PROOFSTEP]\nrw [← G.map_comp, c.condition, G.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : CokernelCofork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ IsColimit (G.mapCocone c) ≃ IsColimit (map c G)\n[PROOFSTEP]\nrefine' (IsColimit.precomposeHomEquiv _ _).symm.trans (IsColimit.equivIsoColimit _)\n[GOAL]\ncase refine'_1\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : CokernelCofork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ parallelPair (G.map f) 0 ≅ parallelPair f 0 ⋙ G\n[PROOFSTEP]\nrefine' parallelPair.ext (Iso.refl _) (Iso.refl _) _ _\n[GOAL]\ncase refine'_1.refine'_1\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : CokernelCofork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ (parallelPair (G.map f) 0).map WalkingParallelPairHom.left ≫\n      (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.one)).hom =\n    (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.zero)).hom ≫\n      (parallelPair f 0 ⋙ G).map WalkingParallelPairHom.left\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_1.refine'_2\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : CokernelCofork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ (parallelPair (G.map f) 0).map WalkingParallelPairHom.right ≫\n      (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.one)).hom =\n    (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.zero)).hom ≫\n      (parallelPair f 0 ⋙ G).map WalkingParallelPairHom.right\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : CokernelCofork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ (Cocones.precompose\n          (parallelPair.ext (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.zero))\n              (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.one))\n              (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n              (_ : 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map 0)).hom).obj\n      (G.mapCocone c) ≅\n    map c G\n[PROOFSTEP]\nexact Cocones.ext (Iso.refl _) (by rintro (_ | _) <;> aesop_cat)\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : CokernelCofork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ ∀ (j : WalkingParallelPair),\n    NatTrans.app\n          ((Cocones.precompose\n                  (parallelPair.ext (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.zero))\n                      (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.one))\n                      (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n                      (_ : 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map 0)).hom).obj\n              (G.mapCocone c)).ι\n          j ≫\n        (Iso.refl\n            ((Cocones.precompose\n                    (parallelPair.ext (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.zero))\n                        (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.one))\n                        (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n                        (_ : 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map 0)).hom).obj\n                (G.mapCocone c)).pt).hom =\n      NatTrans.app (map c G).ι j\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase zero\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : CokernelCofork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ NatTrans.app\n        ((Cocones.precompose\n                (parallelPair.ext (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.zero))\n                    (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.one))\n                    (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n                    (_ : 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map 0)).hom).obj\n            (G.mapCocone c)).ι\n        WalkingParallelPair.zero ≫\n      (Iso.refl\n          ((Cocones.precompose\n                  (parallelPair.ext (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.zero))\n                      (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.one))\n                      (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n                      (_ : 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map 0)).hom).obj\n              (G.mapCocone c)).pt).hom =\n    NatTrans.app (map c G).ι WalkingParallelPair.zero\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase one\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nf : X ⟶ Y\nc : CokernelCofork f\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\n⊢ NatTrans.app\n        ((Cocones.precompose\n                (parallelPair.ext (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.zero))\n                    (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.one))\n                    (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n                    (_ : 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map 0)).hom).obj\n            (G.mapCocone c)).ι\n        WalkingParallelPair.one ≫\n      (Iso.refl\n          ((Cocones.precompose\n                  (parallelPair.ext (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.zero))\n                      (Iso.refl ((parallelPair (G.map f) 0).obj WalkingParallelPair.one))\n                      (_ : G.map f ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map f)\n                      (_ : 0 ≫ 𝟙 (G.obj Y) = 𝟙 (G.obj X) ≫ G.map 0)).hom).obj\n              (G.mapCocone c)).pt).hom =\n    NatTrans.app (map c G).ι WalkingParallelPair.one\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Y ⟶ Z\nw : f ≫ h = 0\n⊢ G.map f ≫ G.map h = 0\n[PROOFSTEP]\nsimp only [← G.map_comp, w, Functor.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : HasZeroMorphisms C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasZeroMorphisms D\nG : C ⥤ D\ninst✝¹ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Y ⟶ Z\nw : f ≫ h = 0\ninst✝ : PreservesColimit (parallelPair f 0) G\nl : IsColimit (CokernelCofork.ofπ h w)\n⊢ G.map f ≫ G.map h = 0\n[PROOFSTEP]\nsimp only [← G.map_comp, w, Functor.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Y ⟶ Z\nw : f ≫ h = 0\ninst✝¹ : HasCokernel f\ninst✝ : PreservesColimit (parallelPair f 0) G\n⊢ G.map f ≫ G.map (cokernel.π f) = 0 ≫ G.map (cokernel.π f)\n[PROOFSTEP]\nsimp only [← G.map_comp, cokernel.condition, zero_comp, Functor.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Y ⟶ Z\nw : f ≫ h = 0\ninst✝¹ : HasCokernel f\ninst✝ : HasCokernel (G.map f)\ni : IsIso (cokernelComparison f G)\n⊢ PreservesColimit (parallelPair f 0) G\n[PROOFSTEP]\napply preservesColimitOfPreservesColimitCocone (cokernelIsCokernel f)\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Y ⟶ Z\nw : f ≫ h = 0\ninst✝¹ : HasCokernel f\ninst✝ : HasCokernel (G.map f)\ni : IsIso (cokernelComparison f G)\n⊢ IsColimit (G.mapCocone (Cofork.ofπ (cokernel.π f) (_ : f ≫ cokernel.π f = 0 ≫ cokernel.π f)))\n[PROOFSTEP]\napply (isColimitMapCoconeCoforkEquiv' G (cokernel.condition f)).symm _\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Y ⟶ Z\nw : f ≫ h = 0\ninst✝¹ : HasCokernel f\ninst✝ : HasCokernel (G.map f)\ni : IsIso (cokernelComparison f G)\n⊢ IsColimit (CokernelCofork.ofπ (G.map (cokernel.π f)) (_ : G.map f ≫ G.map (cokernel.π f) = 0))\n[PROOFSTEP]\nexact @IsColimit.ofPointIso _ _ _ _ _ _ _ (cokernelIsCokernel (G.map f)) i\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝³ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Y ⟶ Z\nw : f ≫ h = 0\ninst✝² : HasCokernel f\ninst✝¹ : HasCokernel (G.map f)\ninst✝ : PreservesColimit (parallelPair f 0) G\n⊢ (iso G f).inv = cokernelComparison f G\n[PROOFSTEP]\nrw [← cancel_epi (cokernel.π _)]\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝³ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Y ⟶ Z\nw : f ≫ h = 0\ninst✝² : HasCokernel f\ninst✝¹ : HasCokernel (G.map f)\ninst✝ : PreservesColimit (parallelPair f 0) G\n⊢ cokernel.π (G.map f) ≫ (iso G f).inv = cokernel.π (G.map f) ≫ cokernelComparison f G\n[PROOFSTEP]\nsimp [PreservesCokernel.iso]\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝³ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Y ⟶ Z\nw : f ≫ h = 0\ninst✝² : HasCokernel f\ninst✝¹ : HasCokernel (G.map f)\ninst✝ : PreservesColimit (parallelPair f 0) G\n⊢ IsIso (cokernelComparison f G)\n[PROOFSTEP]\nrw [← PreservesCokernel.iso_inv]\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝³ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Y ⟶ Z\nw : f ≫ h = 0\ninst✝² : HasCokernel f\ninst✝¹ : HasCokernel (G.map f)\ninst✝ : PreservesColimit (parallelPair f 0) G\n⊢ IsIso (PreservesCokernel.iso G f).inv\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝¹⁰ : Category.{v₁, u₁} C\ninst✝⁹ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁸ : Category.{v₂, u₂} D\ninst✝⁷ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝⁶ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Y ⟶ Z\nw : f ≫ h = 0\ninst✝⁵ : HasCokernel f\ninst✝⁴ : HasCokernel (G.map f)\ninst✝³ : PreservesColimit (parallelPair f 0) G\nX' Y' : C\ng : X' ⟶ Y'\ninst✝² : HasCokernel g\ninst✝¹ : HasCokernel (G.map g)\ninst✝ : PreservesColimit (parallelPair g 0) G\np : X ⟶ X'\nq : Y ⟶ Y'\nhpq : f ≫ q = p ≫ g\n⊢ G.map f ≫ G.map q = G.map p ≫ G.map g\n[PROOFSTEP]\nrw [← G.map_comp, hpq, G.map_comp]\n[GOAL]\nC : Type u₁\ninst✝¹⁰ : Category.{v₁, u₁} C\ninst✝⁹ : HasZeroMorphisms C\nD : Type u₂\ninst✝⁸ : Category.{v₂, u₂} D\ninst✝⁷ : HasZeroMorphisms D\nG : C ⥤ D\ninst✝⁶ : Functor.PreservesZeroMorphisms G\nX Y Z : C\nf : X ⟶ Y\nh : Y ⟶ Z\nw : f ≫ h = 0\ninst✝⁵ : HasCokernel f\ninst✝⁴ : HasCokernel (G.map f)\ninst✝³ : PreservesColimit (parallelPair f 0) G\nX' Y' : C\ng : X' ⟶ Y'\ninst✝² : HasCokernel g\ninst✝¹ : HasCokernel (G.map g)\ninst✝ : PreservesColimit (parallelPair g 0) G\np : X ⟶ X'\nq : Y ⟶ Y'\nhpq : f ≫ q = p ≫ g\n⊢ (PreservesCokernel.iso G f).hom ≫\n      cokernel.map (G.map f) (G.map g) (G.map p) (G.map q) (_ : G.map f ≫ G.map q = G.map p ≫ G.map g) =\n    G.map (cokernel.map f g p q hpq) ≫ (PreservesCokernel.iso G g).hom\n[PROOFSTEP]\nrw [← Iso.comp_inv_eq, Category.assoc, ← Iso.eq_inv_comp, PreservesCokernel.iso_inv,\n  cokernel_map_comp_cokernelComparison, PreservesCokernel.iso_inv]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nc : Cone (parallelPair 0 0)\nhc : IsLimit c\n⊢ IsLimit (G.mapCone c)\n[PROOFSTEP]\nhave := KernelFork.IsLimit.isIso_ι c hc rfl\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nc : Cone (parallelPair 0 0)\nhc : IsLimit c\nthis : IsIso (Fork.ι c)\n⊢ IsLimit (G.mapCone c)\n[PROOFSTEP]\nrefine' (KernelFork.isLimitMapConeEquiv c G).symm _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nc : Cone (parallelPair 0 0)\nhc : IsLimit c\nthis : IsIso (Fork.ι c)\n⊢ IsLimit (KernelFork.map c G)\n[PROOFSTEP]\nrefine' IsLimit.ofIsoLimit (KernelFork.IsLimit.ofId _ (G.map_zero _ _)) _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nc : Cone (parallelPair 0 0)\nhc : IsLimit c\nthis : IsIso (Fork.ι c)\n⊢ KernelFork.ofι (𝟙 (G.obj X)) (_ : 𝟙 (G.obj X) ≫ G.map 0 = 0) ≅ KernelFork.map c G\n[PROOFSTEP]\nexact (Fork.ext (G.mapIso (asIso (Fork.ι c))).symm (by simp))\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nc : Cone (parallelPair 0 0)\nhc : IsLimit c\nthis : IsIso (Fork.ι c)\n⊢ (G.mapIso (asIso (Fork.ι c))).symm.hom ≫ Fork.ι (KernelFork.map c G) =\n    Fork.ι (KernelFork.ofι (𝟙 (G.obj X)) (_ : 𝟙 (G.obj X) ≫ G.map 0 = 0))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nc : Cocone (parallelPair 0 0)\nhc : IsColimit c\n⊢ IsColimit (G.mapCocone c)\n[PROOFSTEP]\nhave := CokernelCofork.IsColimit.isIso_π c hc rfl\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nc : Cocone (parallelPair 0 0)\nhc : IsColimit c\nthis : IsIso (Cofork.π c)\n⊢ IsColimit (G.mapCocone c)\n[PROOFSTEP]\nrefine' (CokernelCofork.isColimitMapCoconeEquiv c G).symm _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nc : Cocone (parallelPair 0 0)\nhc : IsColimit c\nthis : IsIso (Cofork.π c)\n⊢ IsColimit (CokernelCofork.map c G)\n[PROOFSTEP]\nrefine' IsColimit.ofIsoColimit (CokernelCofork.IsColimit.ofId _ (G.map_zero _ _)) _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nc : Cocone (parallelPair 0 0)\nhc : IsColimit c\nthis : IsIso (Cofork.π c)\n⊢ CokernelCofork.ofπ (𝟙 (G.obj Y)) (_ : G.map 0 ≫ 𝟙 (G.obj Y) = 0) ≅ CokernelCofork.map c G\n[PROOFSTEP]\nexact (Cofork.ext (G.mapIso (asIso (Cofork.π c))) (by simp))\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nc : Cocone (parallelPair 0 0)\nhc : IsColimit c\nthis : IsIso (Cofork.π c)\n⊢ Cofork.π (CokernelCofork.ofπ (𝟙 (G.obj Y)) (_ : G.map 0 ≫ 𝟙 (G.obj Y) = 0)) ≫ (G.mapIso (asIso (Cofork.π c))).hom =\n    Cofork.π (CokernelCofork.map c G)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nf : X ⟶ Y\nhf : f = 0\n⊢ PreservesLimit (parallelPair f 0) G\n[PROOFSTEP]\nrw [hf]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nf : X ⟶ Y\nhf : f = 0\n⊢ PreservesLimit (parallelPair 0 0) G\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nf : X ⟶ Y\nhf : f = 0\n⊢ PreservesColimit (parallelPair f 0) G\n[PROOFSTEP]\nrw [hf]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : HasZeroMorphisms D\nX Y : C\nG : C ⥤ D\ninst✝ : Functor.PreservesZeroMorphisms G\nf : X ⟶ Y\nhf : f = 0\n⊢ PreservesColimit (parallelPair 0 0) G\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Preserves.Shapes.Kernels", "llama_tokens": 14403, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7025300698514778, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.3759227364404694}}
{"text": "[GOAL]\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.1655, u_3} D₁\ninst✝⁴ : Category.{?u.1659, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\n⊢ 𝟭 D₁ ⟶ G' ⋙ F'\n[PROOFSTEP]\nletI : Lifting L₁ W₁ ((G ⋙ F) ⋙ L₁) (G' ⋙ F') := Lifting.mk (CatCommSq.hComp G F L₁ L₂ L₁ G' F').iso'.symm\n[GOAL]\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.1655, u_3} D₁\ninst✝⁴ : Category.{?u.1659, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nthis : Lifting L₁ W₁ ((G ⋙ F) ⋙ L₁) (G' ⋙ F') := { iso' := CatCommSq.iso'.symm }\n⊢ 𝟭 D₁ ⟶ G' ⋙ F'\n[PROOFSTEP]\nexact Localization.liftNatTrans L₁ W₁ L₁ ((G ⋙ F) ⋙ L₁) (𝟭 D₁) (G' ⋙ F') (whiskerRight adj.unit L₁)\n[GOAL]\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{u_5, u_3} D₁\ninst✝⁴ : Category.{u_6, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₁ : C₁\n⊢ NatTrans.app (ε adj L₁ W₁ L₂ G' F') (L₁.obj X₁) =\n    L₁.map (NatTrans.app adj.unit X₁) ≫\n      NatTrans.app (CatCommSq.iso F L₂ L₁ F').hom (G.obj X₁) ≫ F'.map (NatTrans.app (CatCommSq.iso G L₁ L₂ G').hom X₁)\n[PROOFSTEP]\nletI : Lifting L₁ W₁ ((G ⋙ F) ⋙ L₁) (G' ⋙ F') := Lifting.mk (CatCommSq.hComp G F L₁ L₂ L₁ G' F').iso'.symm\n[GOAL]\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{u_5, u_3} D₁\ninst✝⁴ : Category.{u_6, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₁ : C₁\nthis : Lifting L₁ W₁ ((G ⋙ F) ⋙ L₁) (G' ⋙ F') := { iso' := CatCommSq.iso'.symm }\n⊢ NatTrans.app (ε adj L₁ W₁ L₂ G' F') (L₁.obj X₁) =\n    L₁.map (NatTrans.app adj.unit X₁) ≫\n      NatTrans.app (CatCommSq.iso F L₂ L₁ F').hom (G.obj X₁) ≫ F'.map (NatTrans.app (CatCommSq.iso G L₁ L₂ G').hom X₁)\n[PROOFSTEP]\nsimp only [ε, liftNatTrans_app, Lifting.iso, Iso.symm, Functor.id_obj, Functor.comp_obj, Lifting.id_iso',\n  Functor.rightUnitor_hom_app, whiskerRight_app, CatCommSq.hComp_iso'_hom_app, id_comp]\n[GOAL]\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.13571, u_3} D₁\ninst✝⁴ : Category.{?u.13575, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\n⊢ F' ⋙ G' ⟶ 𝟭 D₂\n[PROOFSTEP]\nletI : Lifting L₂ W₂ ((F ⋙ G) ⋙ L₂) (F' ⋙ G') := Lifting.mk (CatCommSq.hComp F G L₂ L₁ L₂ F' G').iso'.symm\n[GOAL]\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.13571, u_3} D₁\ninst✝⁴ : Category.{?u.13575, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nthis : Lifting L₂ W₂ ((F ⋙ G) ⋙ L₂) (F' ⋙ G') := { iso' := CatCommSq.iso'.symm }\n⊢ F' ⋙ G' ⟶ 𝟭 D₂\n[PROOFSTEP]\nexact liftNatTrans L₂ W₂ ((F ⋙ G) ⋙ L₂) L₂ (F' ⋙ G') (𝟭 D₂) (whiskerRight adj.counit L₂)\n[GOAL]\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{u_6, u_3} D₁\ninst✝⁴ : Category.{u_5, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₂ : C₂\n⊢ NatTrans.app (η adj L₁ L₂ W₂ G' F') (L₂.obj X₂) =\n    G'.map (NatTrans.app (CatCommSq.iso F L₂ L₁ F').inv X₂) ≫\n      NatTrans.app (CatCommSq.iso G L₁ L₂ G').inv (F.obj X₂) ≫ L₂.map (NatTrans.app adj.counit X₂)\n[PROOFSTEP]\nletI : Lifting L₂ W₂ ((F ⋙ G) ⋙ L₂) (F' ⋙ G') := Lifting.mk (CatCommSq.hComp F G L₂ L₁ L₂ F' G').iso'.symm\n[GOAL]\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{u_6, u_3} D₁\ninst✝⁴ : Category.{u_5, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₂ : C₂\nthis : Lifting L₂ W₂ ((F ⋙ G) ⋙ L₂) (F' ⋙ G') := { iso' := CatCommSq.iso'.symm }\n⊢ NatTrans.app (η adj L₁ L₂ W₂ G' F') (L₂.obj X₂) =\n    G'.map (NatTrans.app (CatCommSq.iso F L₂ L₁ F').inv X₂) ≫\n      NatTrans.app (CatCommSq.iso G L₁ L₂ G').inv (F.obj X₂) ≫ L₂.map (NatTrans.app adj.counit X₂)\n[PROOFSTEP]\nsimp only [η, liftNatTrans_app, Lifting.iso, Iso.symm, CatCommSq.hComp_iso'_inv_app, whiskerRight_app, Lifting.id_iso',\n  Functor.rightUnitor_inv_app, comp_id, assoc]\n[GOAL]\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\n⊢ whiskerRight (Localization.ε adj L₁ W₁ L₂ G' F') G' ≫\n      (Functor.associator G' F' G').hom ≫ whiskerLeft G' (Localization.η adj L₁ L₂ W₂ G' F') =\n    NatTrans.id (𝟭 D₁ ⋙ G')\n[PROOFSTEP]\napply natTrans_ext L₁ W₁\n[GOAL]\ncase h\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\n⊢ ∀ (X : C₁),\n    NatTrans.app\n        (whiskerRight (Localization.ε adj L₁ W₁ L₂ G' F') G' ≫\n          (Functor.associator G' F' G').hom ≫ whiskerLeft G' (Localization.η adj L₁ L₂ W₂ G' F'))\n        (L₁.obj X) =\n      NatTrans.app (NatTrans.id (𝟭 D₁ ⋙ G')) (L₁.obj X)\n[PROOFSTEP]\nintro X₁\n[GOAL]\ncase h\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₁ : C₁\n⊢ NatTrans.app\n      (whiskerRight (Localization.ε adj L₁ W₁ L₂ G' F') G' ≫\n        (Functor.associator G' F' G').hom ≫ whiskerLeft G' (Localization.η adj L₁ L₂ W₂ G' F'))\n      (L₁.obj X₁) =\n    NatTrans.app (NatTrans.id (𝟭 D₁ ⋙ G')) (L₁.obj X₁)\n[PROOFSTEP]\nhave eq := congr_app adj.left_triangle X₁\n[GOAL]\ncase h\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₁ : C₁\neq : NatTrans.app (whiskerRight adj.unit G ≫ whiskerLeft G adj.counit) X₁ = NatTrans.app (𝟙 (𝟭 C₁ ⋙ G)) X₁\n⊢ NatTrans.app\n      (whiskerRight (Localization.ε adj L₁ W₁ L₂ G' F') G' ≫\n        (Functor.associator G' F' G').hom ≫ whiskerLeft G' (Localization.η adj L₁ L₂ W₂ G' F'))\n      (L₁.obj X₁) =\n    NatTrans.app (NatTrans.id (𝟭 D₁ ⋙ G')) (L₁.obj X₁)\n[PROOFSTEP]\ndsimp at eq \n[GOAL]\ncase h\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₁ : C₁\neq : G.map (NatTrans.app adj.unit X₁) ≫ NatTrans.app adj.counit (G.obj X₁) = 𝟙 (G.obj X₁)\n⊢ NatTrans.app\n      (whiskerRight (Localization.ε adj L₁ W₁ L₂ G' F') G' ≫\n        (Functor.associator G' F' G').hom ≫ whiskerLeft G' (Localization.η adj L₁ L₂ W₂ G' F'))\n      (L₁.obj X₁) =\n    NatTrans.app (NatTrans.id (𝟭 D₁ ⋙ G')) (L₁.obj X₁)\n[PROOFSTEP]\nrw [NatTrans.comp_app, NatTrans.comp_app, whiskerRight_app, Localization.ε_app, Functor.associator_hom_app, id_comp,\n  whiskerLeft_app, G'.map_comp, G'.map_comp, assoc, assoc]\n[GOAL]\ncase h\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₁ : C₁\neq : G.map (NatTrans.app adj.unit X₁) ≫ NatTrans.app adj.counit (G.obj X₁) = 𝟙 (G.obj X₁)\n⊢ G'.map (L₁.map (NatTrans.app adj.unit X₁)) ≫\n      G'.map (NatTrans.app (CatCommSq.iso F L₂ L₁ F').hom (G.obj X₁)) ≫\n        G'.map (F'.map (NatTrans.app (CatCommSq.iso G L₁ L₂ G').hom X₁)) ≫\n          NatTrans.app (Localization.η adj L₁ L₂ W₂ G' F') (G'.obj (L₁.obj X₁)) =\n    NatTrans.app (NatTrans.id (𝟭 D₁ ⋙ G')) (L₁.obj X₁)\n[PROOFSTEP]\nerw [(Localization.η adj L₁ L₂ W₂ G' F').naturality, Localization.η_app, assoc, assoc, ← G'.map_comp_assoc, ←\n  G'.map_comp_assoc, assoc, Iso.hom_inv_id_app, comp_id, (CatCommSq.iso G L₁ L₂ G').inv.naturality_assoc, ←\n  L₂.map_comp_assoc, eq, L₂.map_id, id_comp, Iso.inv_hom_id_app]\n[GOAL]\ncase h\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₁ : C₁\neq : G.map (NatTrans.app adj.unit X₁) ≫ NatTrans.app adj.counit (G.obj X₁) = 𝟙 (G.obj X₁)\n⊢ 𝟙 ((L₁ ⋙ G').obj ((𝟭 C₁).obj X₁)) = NatTrans.app (NatTrans.id (𝟭 D₁ ⋙ G')) (L₁.obj X₁)\n[PROOFSTEP]\nrfl\n[GOAL]\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\n⊢ whiskerLeft F' (Localization.ε adj L₁ W₁ L₂ G' F') ≫\n      (Functor.associator F' G' F').inv ≫ whiskerRight (Localization.η adj L₁ L₂ W₂ G' F') F' =\n    NatTrans.id (F' ⋙ 𝟭 D₁)\n[PROOFSTEP]\napply natTrans_ext L₂ W₂\n[GOAL]\ncase h\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\n⊢ ∀ (X : C₂),\n    NatTrans.app\n        (whiskerLeft F' (Localization.ε adj L₁ W₁ L₂ G' F') ≫\n          (Functor.associator F' G' F').inv ≫ whiskerRight (Localization.η adj L₁ L₂ W₂ G' F') F')\n        (L₂.obj X) =\n      NatTrans.app (NatTrans.id (F' ⋙ 𝟭 D₁)) (L₂.obj X)\n[PROOFSTEP]\nintro X₂\n[GOAL]\ncase h\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₂ : C₂\n⊢ NatTrans.app\n      (whiskerLeft F' (Localization.ε adj L₁ W₁ L₂ G' F') ≫\n        (Functor.associator F' G' F').inv ≫ whiskerRight (Localization.η adj L₁ L₂ W₂ G' F') F')\n      (L₂.obj X₂) =\n    NatTrans.app (NatTrans.id (F' ⋙ 𝟭 D₁)) (L₂.obj X₂)\n[PROOFSTEP]\nhave eq := congr_app adj.right_triangle X₂\n[GOAL]\ncase h\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₂ : C₂\neq : NatTrans.app (whiskerLeft F adj.unit ≫ whiskerRight adj.counit F) X₂ = NatTrans.app (𝟙 (F ⋙ 𝟭 C₁)) X₂\n⊢ NatTrans.app\n      (whiskerLeft F' (Localization.ε adj L₁ W₁ L₂ G' F') ≫\n        (Functor.associator F' G' F').inv ≫ whiskerRight (Localization.η adj L₁ L₂ W₂ G' F') F')\n      (L₂.obj X₂) =\n    NatTrans.app (NatTrans.id (F' ⋙ 𝟭 D₁)) (L₂.obj X₂)\n[PROOFSTEP]\ndsimp at eq \n[GOAL]\ncase h\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₂ : C₂\neq : NatTrans.app adj.unit (F.obj X₂) ≫ F.map (NatTrans.app adj.counit X₂) = 𝟙 (F.obj X₂)\n⊢ NatTrans.app\n      (whiskerLeft F' (Localization.ε adj L₁ W₁ L₂ G' F') ≫\n        (Functor.associator F' G' F').inv ≫ whiskerRight (Localization.η adj L₁ L₂ W₂ G' F') F')\n      (L₂.obj X₂) =\n    NatTrans.app (NatTrans.id (F' ⋙ 𝟭 D₁)) (L₂.obj X₂)\n[PROOFSTEP]\nrw [NatTrans.comp_app, NatTrans.comp_app, whiskerLeft_app, whiskerRight_app, Localization.η_app,\n  Functor.associator_inv_app, id_comp, F'.map_comp, F'.map_comp]\n[GOAL]\ncase h\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₂ : C₂\neq : NatTrans.app adj.unit (F.obj X₂) ≫ F.map (NatTrans.app adj.counit X₂) = 𝟙 (F.obj X₂)\n⊢ NatTrans.app (Localization.ε adj L₁ W₁ L₂ G' F') (F'.obj (L₂.obj X₂)) ≫\n      F'.map (G'.map (NatTrans.app (CatCommSq.iso F L₂ L₁ F').inv X₂)) ≫\n        F'.map (NatTrans.app (CatCommSq.iso G L₁ L₂ G').inv (F.obj X₂)) ≫ F'.map (L₂.map (NatTrans.app adj.counit X₂)) =\n    NatTrans.app (NatTrans.id (F' ⋙ 𝟭 D₁)) (L₂.obj X₂)\n[PROOFSTEP]\nerw [← (Localization.ε _ _ _ _ _ _).naturality_assoc, Localization.ε_app, assoc, assoc, ← F'.map_comp_assoc,\n  Iso.hom_inv_id_app, F'.map_id, id_comp, ← NatTrans.naturality, ← L₁.map_comp_assoc, eq, L₁.map_id, id_comp,\n  Iso.inv_hom_id_app]\n[GOAL]\ncase h\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{?u.24676, u_3} D₁\ninst✝⁴ : Category.{?u.24680, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₂ : C₂\neq : NatTrans.app adj.unit (F.obj X₂) ≫ F.map (NatTrans.app adj.counit X₂) = 𝟙 (F.obj X₂)\n⊢ 𝟙 ((L₂ ⋙ F').obj X₂) = NatTrans.app (NatTrans.id (F' ⋙ 𝟭 D₁)) (L₂.obj X₂)\n[PROOFSTEP]\nrfl\n[GOAL]\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{u_5, u_3} D₁\ninst✝⁴ : Category.{u_6, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₁ : C₁\n⊢ NatTrans.app (localization adj L₁ W₁ L₂ W₂ G' F').unit (L₁.obj X₁) =\n    L₁.map (NatTrans.app adj.unit X₁) ≫\n      NatTrans.app (CatCommSq.iso F L₂ L₁ F').hom (G.obj X₁) ≫ F'.map (NatTrans.app (CatCommSq.iso G L₁ L₂ G').hom X₁)\n[PROOFSTEP]\napply Localization.ε_app\n[GOAL]\nC₁ : Type u_1\nC₂ : Type u_2\nD₁ : Type u_3\nD₂ : Type u_4\ninst✝⁷ : Category.{u_1, u_1} C₁\ninst✝⁶ : Category.{u_2, u_2} C₂\ninst✝⁵ : Category.{u_6, u_3} D₁\ninst✝⁴ : Category.{u_5, u_4} D₂\nG : C₁ ⥤ C₂\nF : C₂ ⥤ C₁\nadj : G ⊣ F\nL₁ : C₁ ⥤ D₁\nW₁ : MorphismProperty C₁\ninst✝³ : Functor.IsLocalization L₁ W₁\nL₂ : C₂ ⥤ D₂\nW₂ : MorphismProperty C₂\ninst✝² : Functor.IsLocalization L₂ W₂\nG' : D₁ ⥤ D₂\nF' : D₂ ⥤ D₁\ninst✝¹ : CatCommSq G L₁ L₂ G'\ninst✝ : CatCommSq F L₂ L₁ F'\nX₂ : C₂\n⊢ NatTrans.app (localization adj L₁ W₁ L₂ W₂ G' F').counit (L₂.obj X₂) =\n    G'.map (NatTrans.app (CatCommSq.iso F L₂ L₁ F').inv X₂) ≫\n      NatTrans.app (CatCommSq.iso G L₁ L₂ G').inv (F.obj X₂) ≫ L₂.map (NatTrans.app adj.counit X₂)\n[PROOFSTEP]\napply Localization.η_app\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Localization.Adjunction", "llama_tokens": 10925, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7401743620390163, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.3758693226787037}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ng✝ : β → γ\nf g : α → β\ns : Set β\nh : ∀ (x : α), f x = g x\n⊢ f ⁻¹' s = g ⁻¹' s\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ng✝ : β → γ\nf g : α → β\ns : Set β\nh : ∀ (x : α), f x = g x\nx : α\n⊢ x ∈ f ⁻¹' s ↔ x ∈ g ⁻¹' s\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ng : β → γ\nb : β\ns : Set β\ninst✝ : Decidable (b ∈ s)\n⊢ (fun x => b) ⁻¹' s = if b ∈ s then univ else ∅\n[PROOFSTEP]\nsplit_ifs with hb\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ng : β → γ\nb : β\ns : Set β\ninst✝ : Decidable (b ∈ s)\nhb : b ∈ s\n⊢ (fun x => b) ⁻¹' s = univ\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ng : β → γ\nb : β\ns : Set β\ninst✝ : Decidable (b ∈ s)\nhb : ¬b ∈ s\n⊢ (fun x => b) ⁻¹' s = ∅\n[PROOFSTEP]\nexacts [preimage_const_of_mem hb, preimage_const_of_not_mem hb]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ng : β → γ\nf : α → α\nn : ℕ\n⊢ preimage f^[n] = (preimage f)^[n]\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ng : β → γ\nf : α → α\n⊢ preimage f^[Nat.zero] = (preimage f)^[Nat.zero]\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ng : β → γ\nf : α → α\nn : ℕ\nih : preimage f^[n] = (preimage f)^[n]\n⊢ preimage f^[Nat.succ n] = (preimage f)^[Nat.succ n]\n[PROOFSTEP]\nrw [iterate_succ, iterate_succ', Set.preimage_comp_eq, ih]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ng : β → γ\np : α → Prop\ns : Set (Subtype p)\nt : Set α\ns_eq : s = Subtype.val ⁻¹' t\nx : α\nh : p x\n⊢ { val := x, property := h } ∈ s ↔ x ∈ t\n[PROOFSTEP]\nrw [s_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ng : β → γ\np : α → Prop\ns : Set (Subtype p)\nt : Set α\ns_eq : s = Subtype.val ⁻¹' t\nx : α\nh : p x\n⊢ { val := x, property := h } ∈ Subtype.val ⁻¹' t ↔ x ∈ t\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ng : β → γ\np : α → Prop\ns : Set (Subtype p)\nt : Set α\nh : ∀ (x : α) (h : p x), { val := x, property := h } ∈ s ↔ x ∈ t\nx✝ : Subtype p\nx : α\nhx : p x\n⊢ { val := x, property := hx } ∈ s ↔ { val := x, property := hx } ∈ Subtype.val ⁻¹' t\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α✝ → β\ng : β → γ\nα : Type u_6\ns u v : Set α\nhsuv : s ⊆ u ∪ v\nH : s ∩ (u ∩ v) = ∅\n⊢ Subtype.val ⁻¹' u = (Subtype.val ⁻¹' v)ᶜ\n[PROOFSTEP]\next ⟨x, x_in_s⟩\n[GOAL]\ncase h.mk\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α✝ → β\ng : β → γ\nα : Type u_6\ns u v : Set α\nhsuv : s ⊆ u ∪ v\nH : s ∩ (u ∩ v) = ∅\nx : α\nx_in_s : x ∈ s\n⊢ { val := x, property := x_in_s } ∈ Subtype.val ⁻¹' u ↔ { val := x, property := x_in_s } ∈ (Subtype.val ⁻¹' v)ᶜ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mk.mp\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α✝ → β\ng : β → γ\nα : Type u_6\ns u v : Set α\nhsuv : s ⊆ u ∪ v\nH : s ∩ (u ∩ v) = ∅\nx : α\nx_in_s : x ∈ s\n⊢ { val := x, property := x_in_s } ∈ Subtype.val ⁻¹' u → { val := x, property := x_in_s } ∈ (Subtype.val ⁻¹' v)ᶜ\n[PROOFSTEP]\nintro x_in_u x_in_v\n[GOAL]\ncase h.mk.mp\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α✝ → β\ng : β → γ\nα : Type u_6\ns u v : Set α\nhsuv : s ⊆ u ∪ v\nH : s ∩ (u ∩ v) = ∅\nx : α\nx_in_s : x ∈ s\nx_in_u : { val := x, property := x_in_s } ∈ Subtype.val ⁻¹' u\nx_in_v : { val := x, property := x_in_s } ∈ Subtype.val ⁻¹' v\n⊢ False\n[PROOFSTEP]\nexact eq_empty_iff_forall_not_mem.mp H x ⟨x_in_s, ⟨x_in_u, x_in_v⟩⟩\n[GOAL]\ncase h.mk.mpr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α✝ → β\ng : β → γ\nα : Type u_6\ns u v : Set α\nhsuv : s ⊆ u ∪ v\nH : s ∩ (u ∩ v) = ∅\nx : α\nx_in_s : x ∈ s\n⊢ { val := x, property := x_in_s } ∈ (Subtype.val ⁻¹' v)ᶜ → { val := x, property := x_in_s } ∈ Subtype.val ⁻¹' u\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase h.mk.mpr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α✝ → β\ng : β → γ\nα : Type u_6\ns u v : Set α\nhsuv : s ⊆ u ∪ v\nH : s ∩ (u ∩ v) = ∅\nx : α\nx_in_s : x ∈ s\nhx : { val := x, property := x_in_s } ∈ (Subtype.val ⁻¹' v)ᶜ\n⊢ { val := x, property := x_in_s } ∈ Subtype.val ⁻¹' u\n[PROOFSTEP]\nexact Or.elim (hsuv x_in_s) id fun hx' => hx.elim hx'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf : α → β\ns : Set α\np : β → Prop\n⊢ (∀ (y : β), y ∈ f '' s → p y) ↔ ∀ (x : α), x ∈ s → p (f x)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf : α → β\ns : Set α\np : β → Prop\n⊢ (∃ y, y ∈ f '' s ∧ p y) ↔ ∃ x, x ∈ s ∧ p (f x)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf g : α → β\ns : Set α\nh : ∀ (a : α), a ∈ s → f a = g a\n⊢ f '' s = g '' s\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf g : α → β\ns : Set α\nh : ∀ (a : α), a ∈ s → f a = g a\nx : β\n⊢ x ∈ f '' s ↔ x ∈ g '' s\n[PROOFSTEP]\nrw [mem_image, mem_image]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf g : α → β\ns : Set α\nh : ∀ (a : α), a ∈ s → f a = g a\nx : β\n⊢ (∃ x_1, x_1 ∈ s ∧ f x_1 = x) ↔ ∃ x_1, x_1 ∈ s ∧ g x_1 = x\n[PROOFSTEP]\nexact\n  {\n    mp := by\n      rintro ⟨a, ha1, ha2⟩\n      exact ⟨a, ⟨ha1, (h a ha1) ▸ ha2⟩⟩,\n    mpr := by\n      rintro ⟨a, ha1, ha2⟩\n      exact ⟨a, ⟨ha1, (h a ha1) ▸ ha2⟩⟩ }\n    -- safe [ext_iff, iff_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf g : α → β\ns : Set α\nh : ∀ (a : α), a ∈ s → f a = g a\nx : β\n⊢ (∃ x_1, x_1 ∈ s ∧ f x_1 = x) → ∃ x_1, x_1 ∈ s ∧ g x_1 = x\n[PROOFSTEP]\nrintro ⟨a, ha1, ha2⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf g : α → β\ns : Set α\nh : ∀ (a : α), a ∈ s → f a = g a\nx : β\na : α\nha1 : a ∈ s\nha2 : f a = x\n⊢ ∃ x_1, x_1 ∈ s ∧ g x_1 = x\n[PROOFSTEP]\nexact ⟨a, ⟨ha1, (h a ha1) ▸ ha2⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf g : α → β\ns : Set α\nh : ∀ (a : α), a ∈ s → f a = g a\nx : β\n⊢ (∃ x_1, x_1 ∈ s ∧ g x_1 = x) → ∃ x_1, x_1 ∈ s ∧ f x_1 = x\n[PROOFSTEP]\nrintro ⟨a, ha1, ha2⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf g : α → β\ns : Set α\nh : ∀ (a : α), a ∈ s → f a = g a\nx : β\na : α\nha1 : a ∈ s\nha2 : g a = x\n⊢ ∃ x_1, x_1 ∈ s ∧ f x_1 = x\n[PROOFSTEP]\nexact ⟨a, ⟨ha1, (h a ha1) ▸ ha2⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t : Set α\nβ' : Type u_6\nf : β → γ\ng : α → β\nf' : α → β'\ng' : β' → γ\nh_comm : ∀ (a : α), f (g a) = g' (f' a)\n⊢ f '' (g '' s) = g' '' (f' '' s)\n[PROOFSTEP]\nsimp_rw [image_image, h_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t a b : Set α\nf : α → β\nh : a ⊆ b\n⊢ f '' a ⊆ f '' b\n[PROOFSTEP]\nsimp only [subset_def, mem_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t a b : Set α\nf : α → β\nh : a ⊆ b\n⊢ ∀ (x : β), (∃ x_1, x_1 ∈ a ∧ f x_1 = x) → ∃ x_1, x_1 ∈ b ∧ f x_1 = x\n[PROOFSTEP]\nexact fun x => fun ⟨w, h1, h2⟩ => ⟨w, h h1, h2⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\nx : β\n⊢ x ∈ f '' (s ∪ t) → x ∈ f '' s ∪ f '' t\n[PROOFSTEP]\nrintro ⟨a, h | h, rfl⟩ <;> [left; right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\nx : β\n⊢ x ∈ f '' (s ∪ t) → x ∈ f '' s ∪ f '' t\n[PROOFSTEP]\nrintro ⟨a, h | h, rfl⟩\n[GOAL]\ncase intro.intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\na : α\nh : a ∈ s\n⊢ f a ∈ f '' s ∪ f '' t\n[PROOFSTEP]\nleft\n[GOAL]\ncase intro.intro.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\na : α\nh : a ∈ t\n⊢ f a ∈ f '' s ∪ f '' t\n[PROOFSTEP]\nright\n[GOAL]\ncase intro.intro.inl.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\na : α\nh : a ∈ s\n⊢ f a ∈ f '' s\n[PROOFSTEP]\nexact ⟨_, h, rfl⟩\n[GOAL]\ncase intro.intro.inr.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\na : α\nh : a ∈ t\n⊢ f a ∈ f '' t\n[PROOFSTEP]\nexact ⟨_, h, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\nx : β\n⊢ x ∈ f '' s ∪ f '' t → x ∈ f '' (s ∪ t)\n[PROOFSTEP]\nrintro (⟨a, h, rfl⟩ | ⟨a, h, rfl⟩) <;> refine' ⟨_, _, rfl⟩ <;> [left; right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\nx : β\n⊢ x ∈ f '' s ∪ f '' t → x ∈ f '' (s ∪ t)\n[PROOFSTEP]\nrintro (⟨a, h, rfl⟩ | ⟨a, h, rfl⟩)\n[GOAL]\ncase inl.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\na : α\nh : a ∈ s\n⊢ f a ∈ f '' (s ∪ t)\n[PROOFSTEP]\nrefine' ⟨_, _, rfl⟩\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\na : α\nh : a ∈ t\n⊢ f a ∈ f '' (s ∪ t)\n[PROOFSTEP]\nrefine' ⟨_, _, rfl⟩\n[GOAL]\ncase inl.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\na : α\nh : a ∈ s\n⊢ a ∈ s ∪ t\n[PROOFSTEP]\nleft\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\na : α\nh : a ∈ t\n⊢ a ∈ s ∪ t\n[PROOFSTEP]\nright\n[GOAL]\ncase inl.intro.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\na : α\nh : a ∈ s\n⊢ a ∈ s\n[PROOFSTEP]\nexact h\n[GOAL]\ncase inr.intro.intro.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\na : α\nh : a ∈ t\n⊢ a ∈ t\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t : Set α\nf : α → β\n⊢ f '' ∅ = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t : Set α\nf : α → β\nx✝ : β\n⊢ x✝ ∈ f '' ∅ ↔ x✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\nh : ∀ (x : α), x ∈ t → ∀ (y : α), y ∈ s → f x = f y → x = y\nb : β\nx✝ : b ∈ f '' s ∩ f '' t\na₁ : α\nha₁ : a₁ ∈ s\nh₁ : f a₁ = b\na₂ : α\nha₂ : a₂ ∈ t\nh₂ : f a₂ = b\n⊢ f a₂ = f a₁\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t : Set α\nι : Type u_6\nf : ι → β\nH : Surjective f\n⊢ ∀ (x : β), x ∈ f '' univ\n[PROOFSTEP]\nsimpa [image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t : Set α\nf : α → β\na : α\n⊢ f '' {a} = {f a}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t : Set α\nf : α → β\na : α\nx✝ : β\n⊢ x✝ ∈ f '' {a} ↔ x✝ ∈ {f a}\n[PROOFSTEP]\nsimp [image, eq_comm]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α✝ → β✝\ns✝ t : Set α✝\nα : Type u_6\nβ : Type u_7\nf : α → β\ns : Set α\n⊢ f '' s = ∅ ↔ s = ∅\n[PROOFSTEP]\nsimp only [eq_empty_iff_forall_not_mem]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α✝ → β✝\ns✝ t : Set α✝\nα : Type u_6\nβ : Type u_7\nf : α → β\ns : Set α\n⊢ (∀ (x : β), ¬x ∈ f '' s) ↔ ∀ (x : α), ¬x ∈ s\n[PROOFSTEP]\nexact ⟨fun H a ha => H _ ⟨_, ha, rfl⟩, fun H b ⟨_, ha, _⟩ => H _ ha⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns t✝ : Set α\ninst✝ : BooleanAlgebra α\nt : α\nS : Set α\n⊢ t ∈ compl '' S ↔ tᶜ ∈ S\n[PROOFSTEP]\nsimp [← preimage_compl_eq_image_compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t s : Set α\n⊢ (fun x => x) '' s = s\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t s : Set α\nx✝ : α\n⊢ x✝ ∈ (fun x => x) '' s ↔ x✝ ∈ s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t s : Set α\n⊢ id '' s = s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns t : Set α\ninst✝ : BooleanAlgebra α\nS : Set α\n⊢ compl '' (compl '' S) = S\n[PROOFSTEP]\nrw [← image_comp, compl_comp_compl, image_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf : α → β\na : α\ns : Set α\n⊢ f '' insert a s = insert (f a) (f '' s)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf : α → β\na : α\ns : Set α\nx✝ : β\n⊢ x✝ ∈ f '' insert a s ↔ x✝ ∈ insert (f a) (f '' s)\n[PROOFSTEP]\nsimp [and_or_left, exists_or, eq_comm, or_comm, and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t : Set α\nf : α → β\na b : α\n⊢ f '' {a, b} = {f a, f b}\n[PROOFSTEP]\nsimp only [image_insert_eq, image_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf : α → β\ng : β → α\nb : β\ns : Set α\nh₁ : LeftInverse g f\nh₂ : Function.RightInverse g f\n⊢ b ∈ f '' s ↔ g b ∈ s\n[PROOFSTEP]\nrw [image_eq_preimage_of_inverse h₁ h₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf : α → β\ng : β → α\nb : β\ns : Set α\nh₁ : LeftInverse g f\nh₂ : Function.RightInverse g f\n⊢ b ∈ g ⁻¹' s ↔ g b ∈ s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf : α → β\ns : Set α\nH : Injective f\n⊢ Disjoint (f '' s) (f '' sᶜ)\n[PROOFSTEP]\nsimp [disjoint_iff_inf_le, ← image_inter H]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf : α → β\ns : Set α\nH : Surjective f\n⊢ f '' s ∪ f '' sᶜ = univ\n[PROOFSTEP]\nrw [← image_union]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t : Set α\nf : α → β\ns : Set α\nH : Surjective f\n⊢ f '' (s ∪ sᶜ) = univ\n[PROOFSTEP]\nsimp [image_univ_of_surjective H]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\n⊢ f '' s \\ f '' t ⊆ f '' (s \\ t)\n[PROOFSTEP]\nrw [diff_subset_iff, ← image_union, union_diff_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns t : Set α\n⊢ f '' s ⊆ f '' (t ∪ s)\n[PROOFSTEP]\nexact image_subset f (subset_union_right t s)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t✝ : Set α\nhf : Injective f\ns t : Set α\n⊢ f '' s ∆ t = (f '' s) ∆ (f '' t)\n[PROOFSTEP]\nsimp_rw [Set.symmDiff_def, image_union, image_diff hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t : Set α\nf : β → α\nhf : Surjective f\neq : f ⁻¹' s = f ⁻¹' t\n⊢ s = t\n[PROOFSTEP]\nrw [← image_preimage_eq s hf, ← image_preimage_eq t hf, eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns : Set α\nt : Set β\n⊢ f '' (s ∩ f ⁻¹' t) = f '' s ∩ t\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns : Set α\nt : Set β\n⊢ f '' (s ∩ f ⁻¹' t) ⊆ f '' s ∩ t\n[PROOFSTEP]\ncalc\n  f '' (s ∩ f ⁻¹' t) ⊆ f '' s ∩ f '' (f ⁻¹' t) := image_inter_subset _ _ _\n  _ ⊆ f '' s ∩ t := inter_subset_inter_right _ (image_preimage_subset f t)\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns : Set α\nt : Set β\n⊢ f '' s ∩ t ⊆ f '' (s ∩ f ⁻¹' t)\n[PROOFSTEP]\nrintro _ ⟨⟨x, h', rfl⟩, h⟩\n[GOAL]\ncase h₂.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns : Set α\nt : Set β\nx : α\nh' : x ∈ s\nh : f x ∈ t\n⊢ f x ∈ f '' (s ∩ f ⁻¹' t)\n[PROOFSTEP]\nexact ⟨x, ⟨h', h⟩, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns : Set α\nt : Set β\n⊢ f '' (f ⁻¹' t ∩ s) = t ∩ f '' s\n[PROOFSTEP]\nsimp only [inter_comm, image_inter_preimage]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns : Set α\nt : Set β\n⊢ Set.Nonempty (f '' s ∩ t) ↔ Set.Nonempty (s ∩ f ⁻¹' t)\n[PROOFSTEP]\nrw [← image_inter_preimage, nonempty_image_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns✝ t✝ : Set α\nf : α → β\ns : Set α\nt : Set β\n⊢ f '' (s \\ f ⁻¹' t) = f '' s \\ t\n[PROOFSTEP]\nsimp_rw [diff_eq, ← preimage_compl, image_inter_preimage]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t : Set α\nf : α → β\nhf : Injective f\neq : f '' s = f '' t\n⊢ s = t\n[PROOFSTEP]\nrw [← preimage_image_eq s hf, ← preimage_image_eq t hf, eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t : Set α\nf : α → β\nhf : Injective f\n⊢ f '' s ⊆ f '' t ↔ s ⊆ t\n[PROOFSTEP]\nrefine' Iff.symm <| (Iff.intro (image_subset f)) fun h => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t : Set α\nf : α → β\nhf : Injective f\nh : f '' s ⊆ f '' t\n⊢ s ⊆ t\n[PROOFSTEP]\nrw [← preimage_image_eq s hf, ← preimage_image_eq t hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : α → β\ns t : Set α\nf : α → β\nhf : Injective f\nh : f '' s ⊆ f '' t\n⊢ f ⁻¹' (f '' s) ⊆ f ⁻¹' (f '' t)\n[PROOFSTEP]\nexact preimage_mono h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t s : Set α\nσ : Equiv.Perm α\nhs : {a | ↑σ a ≠ a} ⊆ s\n⊢ ↑σ '' s = s\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t s : Set α\nσ : Equiv.Perm α\nhs : {a | ↑σ a ≠ a} ⊆ s\ni : α\n⊢ i ∈ ↑σ '' s ↔ i ∈ s\n[PROOFSTEP]\nobtain hi | hi := eq_or_ne (σ i) i\n[GOAL]\ncase h.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t s : Set α\nσ : Equiv.Perm α\nhs : {a | ↑σ a ≠ a} ⊆ s\ni : α\nhi : ↑σ i = i\n⊢ i ∈ ↑σ '' s ↔ i ∈ s\n[PROOFSTEP]\nrefine' ⟨_, fun h => ⟨i, h, hi⟩⟩\n[GOAL]\ncase h.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t s : Set α\nσ : Equiv.Perm α\nhs : {a | ↑σ a ≠ a} ⊆ s\ni : α\nhi : ↑σ i = i\n⊢ i ∈ ↑σ '' s → i ∈ s\n[PROOFSTEP]\nrintro ⟨j, hj, h⟩\n[GOAL]\ncase h.inl.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t s : Set α\nσ : Equiv.Perm α\nhs : {a | ↑σ a ≠ a} ⊆ s\ni : α\nhi : ↑σ i = i\nj : α\nhj : j ∈ s\nh : ↑σ j = i\n⊢ i ∈ s\n[PROOFSTEP]\nrwa [σ.injective (hi.trans h.symm)]\n[GOAL]\ncase h.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t s : Set α\nσ : Equiv.Perm α\nhs : {a | ↑σ a ≠ a} ⊆ s\ni : α\nhi : ↑σ i ≠ i\n⊢ i ∈ ↑σ '' s ↔ i ∈ s\n[PROOFSTEP]\nrefine' iff_of_true ⟨σ.symm i, hs fun h => hi _, σ.apply_symm_apply _⟩ (hs hi)\n[GOAL]\ncase h.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t s : Set α\nσ : Equiv.Perm α\nhs : {a | ↑σ a ≠ a} ⊆ s\ni : α\nhi : ↑σ i ≠ i\nh : ↑σ (↑σ.symm i) = ↑σ.symm i\n⊢ ↑σ i = i\n[PROOFSTEP]\nconvert congr_arg σ h\n[GOAL]\ncase h.e'_2.h.e'_6\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t s : Set α\nσ : Equiv.Perm α\nhs : {a | ↑σ a ≠ a} ⊆ s\ni : α\nhi : ↑σ i ≠ i\nh : ↑σ (↑σ.symm i) = ↑σ.symm i\n⊢ i = ↑σ (↑σ.symm i)\n[PROOFSTEP]\nexact (σ.apply_symm_apply _).symm\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : α → β\ns✝ t s : Set α\nσ : Equiv.Perm α\nhs : {a | ↑σ a ≠ a} ⊆ s\ni : α\nhi : ↑σ i ≠ i\nh : ↑σ (↑σ.symm i) = ↑σ.symm i\n⊢ i = ↑σ (↑σ.symm i)\n[PROOFSTEP]\nexact (σ.apply_symm_apply _).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\n⊢ 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s\n[PROOFSTEP]\next t\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\n⊢ t ∈ 𝒫 insert a s ↔ t ∈ 𝒫 s ∪ insert a '' 𝒫 s\n[PROOFSTEP]\nsimp_rw [mem_union, mem_image, mem_powerset_iff]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\n⊢ t ⊆ insert a s ↔ t ⊆ s ∨ ∃ x, x ⊆ s ∧ insert a x = t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\n⊢ t ⊆ insert a s → t ⊆ s ∨ ∃ x, x ⊆ s ∧ insert a x = t\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\nh : t ⊆ insert a s\n⊢ t ⊆ s ∨ ∃ x, x ⊆ s ∧ insert a x = t\n[PROOFSTEP]\nby_cases hs : a ∈ t\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\nh : t ⊆ insert a s\nhs : a ∈ t\n⊢ t ⊆ s ∨ ∃ x, x ⊆ s ∧ insert a x = t\n[PROOFSTEP]\nright\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\nh : t ⊆ insert a s\nhs : a ∈ t\n⊢ ∃ x, x ⊆ s ∧ insert a x = t\n[PROOFSTEP]\nrefine' ⟨t \\ { a }, _, _⟩\n[GOAL]\ncase pos.h.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\nh : t ⊆ insert a s\nhs : a ∈ t\n⊢ t \\ {a} ⊆ s\n[PROOFSTEP]\nrw [diff_singleton_subset_iff]\n[GOAL]\ncase pos.h.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\nh : t ⊆ insert a s\nhs : a ∈ t\n⊢ t ⊆ insert a s\n[PROOFSTEP]\nassumption\n[GOAL]\ncase pos.h.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\nh : t ⊆ insert a s\nhs : a ∈ t\n⊢ insert a (t \\ {a}) = t\n[PROOFSTEP]\nrw [insert_diff_singleton, insert_eq_of_mem hs]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\nh : t ⊆ insert a s\nhs : ¬a ∈ t\n⊢ t ⊆ s ∨ ∃ x, x ⊆ s ∧ insert a x = t\n[PROOFSTEP]\nleft\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\nh : t ⊆ insert a s\nhs : ¬a ∈ t\n⊢ t ⊆ s\n[PROOFSTEP]\nexact (subset_insert_iff_of_not_mem hs).mp h\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\n⊢ (t ⊆ s ∨ ∃ x, x ⊆ s ∧ insert a x = t) → t ⊆ insert a s\n[PROOFSTEP]\nrintro (h | ⟨s', h₁, rfl⟩)\n[GOAL]\ncase h.mpr.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\nt : Set α\nh : t ⊆ s\n⊢ t ⊆ insert a s\n[PROOFSTEP]\nexact subset_trans h (subset_insert a s)\n[GOAL]\ncase h.mpr.inr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns : Set α\na : α\ns' : Set α\nh₁ : s' ⊆ s\n⊢ insert a s' ⊆ insert a s\n[PROOFSTEP]\nexact insert_subset_insert h₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\np : α → Prop\n⊢ (∀ (a : α), a ∈ range f → p a) ↔ ∀ (i : ι), p (f i)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\np : ↑(range f) → Prop\nH : ∀ (i : ι), p { val := f i, property := (_ : f i ∈ range f) }\nx✝ : ↑(range f)\ny : α\ni : ι\nhi : f i = y\n⊢ p { val := y, property := (_ : ∃ y_1, f y_1 = y) }\n[PROOFSTEP]\nsubst hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\np : ↑(range f) → Prop\nH : ∀ (i : ι), p { val := f i, property := (_ : f i ∈ range f) }\nx✝ : ↑(range f)\ni : ι\n⊢ p { val := f i, property := (_ : ∃ y, f y = f i) }\n[PROOFSTEP]\napply H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\np : α → Prop\n⊢ (∃ a, a ∈ range f ∧ p a) ↔ ∃ i, p (f i)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\np : α → Prop\n⊢ (∃ a, a ∈ range f ∧ p a) ↔ ∃ i, p (f i)\n[PROOFSTEP]\nsimpa only [exists_prop] using exists_range_iff\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\np : ↑(range f) → Prop\nx✝ : ∃ a, p a\na : α\ni : ι\nhi : f i = a\nha : p { val := a, property := (_ : ∃ y, f y = a) }\n⊢ ∃ i, p { val := f i, property := (_ : f i ∈ range f) }\n[PROOFSTEP]\nsubst a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\np : ↑(range f) → Prop\nx✝ : ∃ a, p a\ni : ι\nha : p { val := f i, property := (_ : ∃ y, f y = f i) }\n⊢ ∃ i, p { val := f i, property := (_ : f i ∈ range f) }\n[PROOFSTEP]\nexact ⟨i, ha⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\n⊢ f '' univ = range f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx✝ : β\n⊢ x✝ ∈ f '' univ ↔ x✝ ∈ range f\n[PROOFSTEP]\nsimp [image, range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set α\n⊢ f '' s ⊆ range f\n[PROOFSTEP]\nrw [← image_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set α\n⊢ f '' s ⊆ f '' univ\n[PROOFSTEP]\nexact image_subset _ (subset_univ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\ni : ℕ\n⊢ i ∈ range Nat.succ → 0 < i\n[PROOFSTEP]\nrintro ⟨n, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nn : ℕ\n⊢ 0 < Nat.succ n\n[PROOFSTEP]\nexact Nat.succ_pos n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → γ\ng : β → γ\n⊢ range f ⊆ range g ↔ ∃ h, f = g ∘ h\n[PROOFSTEP]\nsimp only [range_subset_iff, mem_range, Classical.skolem, Function.funext_iff, (· ∘ ·), eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set β\n⊢ range f = s ↔ (∀ (a : α), f a ∈ s) ∧ ∀ (b : β), b ∈ s → ∃ a, f a = b\n[PROOFSTEP]\nrw [← range_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set β\n⊢ range f = s ↔ (range fun a => f a) ⊆ s ∧ ∀ (b : β), b ∈ s → ∃ a, f a = b\n[PROOFSTEP]\nexact le_antisymm_iff\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\ng : β → γ\n⊢ range (g ∘ f) ⊆ range g\n[PROOFSTEP]\nrw [range_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\ng : β → γ\n⊢ g '' range f ⊆ range g\n[PROOFSTEP]\napply image_subset_range\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : ι → α\n⊢ range f = ∅ ↔ IsEmpty ι\n[PROOFSTEP]\nrw [← not_nonempty_iff, ← range_nonempty_iff_nonempty, not_nonempty_iff_eq_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\n⊢ f '' s ∪ f '' sᶜ = range f\n[PROOFSTEP]\nrw [← image_union, ← image_univ, ← union_compl_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\n⊢ insert (f x) (f '' {x}ᶜ) = range f\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\n⊢ y ∈ insert (f x) (f '' {x}ᶜ) ↔ y ∈ range f\n[PROOFSTEP]\nrw [mem_range, mem_insert_iff, mem_image]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\n⊢ (y = f x ∨ ∃ x_1, x_1 ∈ {x}ᶜ ∧ f x_1 = y) ↔ ∃ y_1, f y_1 = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\n⊢ (y = f x ∨ ∃ x_1, x_1 ∈ {x}ᶜ ∧ f x_1 = y) → ∃ y_1, f y_1 = y\n[PROOFSTEP]\nrintro (h | ⟨x', _, h⟩)\n[GOAL]\ncase h.mp.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\nh : y = f x\n⊢ ∃ y_1, f y_1 = y\n[PROOFSTEP]\nexact ⟨x, h.symm⟩\n[GOAL]\ncase h.mp.inr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\nx' : α\nleft✝ : x' ∈ {x}ᶜ\nh : f x' = y\n⊢ ∃ y_1, f y_1 = y\n[PROOFSTEP]\nexact ⟨x', h⟩\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\n⊢ (∃ y_1, f y_1 = y) → y = f x ∨ ∃ x_1, x_1 ∈ {x}ᶜ ∧ f x_1 = y\n[PROOFSTEP]\nrintro ⟨x', h⟩\n[GOAL]\ncase h.mpr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\nx' : α\nh : f x' = y\n⊢ y = f x ∨ ∃ x_1, x_1 ∈ {x}ᶜ ∧ f x_1 = y\n[PROOFSTEP]\nby_cases hx : x' = x\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\nx' : α\nh : f x' = y\nhx : x' = x\n⊢ y = f x ∨ ∃ x_1, x_1 ∈ {x}ᶜ ∧ f x_1 = y\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\nx' : α\nh : f x' = y\nhx : x' = x\n⊢ y = f x\n[PROOFSTEP]\nrw [← h, hx]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\nx' : α\nh : f x' = y\nhx : ¬x' = x\n⊢ y = f x ∨ ∃ x_1, x_1 ∈ {x}ᶜ ∧ f x_1 = y\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\nx' : α\nh : f x' = y\nhx : ¬x' = x\n⊢ ∃ x_1, x_1 ∈ {x}ᶜ ∧ f x_1 = y\n[PROOFSTEP]\nrefine' ⟨_, _, h⟩\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\nx' : α\nh : f x' = y\nhx : ¬x' = x\n⊢ x' ∈ {x}ᶜ\n[PROOFSTEP]\nrw [mem_compl_singleton_iff]\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : α\ny : β\nx' : α\nh : f x' = y\nhx : ¬x' = x\n⊢ x' ≠ x\n[PROOFSTEP]\nexact hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t✝ : Set α\nf : α → β\nt : Set β\nx : β\nx✝ : x ∈ t ∩ range f\nhx : x ∈ t\ny : α\nh_eq : f y = x\n⊢ y ∈ f ⁻¹' t\n[PROOFSTEP]\nrw [preimage, mem_setOf, h_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t✝ : Set α\nf : α → β\nt : Set β\nx : β\nx✝ : x ∈ t ∩ range f\nhx : x ∈ t\ny : α\nh_eq : f y = x\n⊢ x ∈ t\n[PROOFSTEP]\nexact hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set β\nhs : s ⊆ range f\n⊢ f '' (f ⁻¹' s) = s\n[PROOFSTEP]\nrw [image_preimage_eq_inter_range, inter_eq_self_of_subset_left hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set β\n⊢ f '' (f ⁻¹' s) = s → s ⊆ range f\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set β\nh : f '' (f ⁻¹' s) = s\n⊢ s ⊆ range f\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set β\nh : f '' (f ⁻¹' s) = s\n⊢ f '' (f ⁻¹' s) ⊆ range f\n[PROOFSTEP]\napply image_subset_range\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\np : Set β → Prop\n⊢ (∃ s, s ⊆ range f ∧ p s) ↔ ∃ s, p (f '' s)\n[PROOFSTEP]\nrw [← exists_range_iff, range_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\np : Set β → Prop\n⊢ (∃ s, s ⊆ range f ∧ p s) ↔ ∃ a, a ∈ 𝒫 range f ∧ p a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\np : Set β → Prop\n⊢ (∃ s x, p s) ↔ ∃ s, p (f '' s)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\np : Set β → Prop\n⊢ (∀ (s : Set β), s ⊆ range f → p s) ↔ ∀ (s : Set α), p (f '' s)\n[PROOFSTEP]\nrw [← forall_range_iff, range_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\np : Set β → Prop\n⊢ (∀ (s : Set β), s ⊆ range f → p s) ↔ ∀ (a : Set β), a ∈ 𝒫 range f → p a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t✝ s t : Set α\nf : β → α\nhs : s ⊆ range f\n⊢ f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t✝ s t : Set α\nf : β → α\nhs : s ⊆ range f\n⊢ f ⁻¹' s ⊆ f ⁻¹' t → s ⊆ t\n[PROOFSTEP]\nintro h x hx\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t✝ s t : Set α\nf : β → α\nhs : s ⊆ range f\nh : f ⁻¹' s ⊆ f ⁻¹' t\nx : α\nhx : x ∈ s\n⊢ x ∈ t\n[PROOFSTEP]\nrcases hs hx with ⟨y, rfl⟩\n[GOAL]\ncase mp.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t✝ s t : Set α\nf : β → α\nhs : s ⊆ range f\nh : f ⁻¹' s ⊆ f ⁻¹' t\ny : β\nhx : f y ∈ s\n⊢ f y ∈ t\n[PROOFSTEP]\nexact h hx\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t✝ s t : Set α\nf : β → α\nhs : s ⊆ range f\n⊢ s ⊆ t → f ⁻¹' s ⊆ f ⁻¹' t\n[PROOFSTEP]\nintro h x\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t✝ s t : Set α\nf : β → α\nhs : s ⊆ range f\nh : s ⊆ t\nx : β\n⊢ x ∈ f ⁻¹' s → x ∈ f ⁻¹' t\n[PROOFSTEP]\napply h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t✝ s t : Set α\nf : β → α\nhs : s ⊆ range f\nht : t ⊆ range f\n⊢ f ⁻¹' s = f ⁻¹' t ↔ s = t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t✝ s t : Set α\nf : β → α\nhs : s ⊆ range f\nht : t ⊆ range f\n⊢ f ⁻¹' s = f ⁻¹' t → s = t\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t✝ s t : Set α\nf : β → α\nhs : s ⊆ range f\nht : t ⊆ range f\nh : f ⁻¹' s = f ⁻¹' t\n⊢ s = t\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase mp.h₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t✝ s t : Set α\nf : β → α\nhs : s ⊆ range f\nht : t ⊆ range f\nh : f ⁻¹' s = f ⁻¹' t\n⊢ s ⊆ t\n[PROOFSTEP]\nrw [← preimage_subset_preimage_iff hs, h]\n[GOAL]\ncase mp.h₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t✝ s t : Set α\nf : β → α\nhs : s ⊆ range f\nht : t ⊆ range f\nh : f ⁻¹' s = f ⁻¹' t\n⊢ t ⊆ s\n[PROOFSTEP]\nrw [← preimage_subset_preimage_iff ht, h]\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t✝ s t : Set α\nf : β → α\nhs : s ⊆ range f\nht : t ⊆ range f\n⊢ s = t → f ⁻¹' s = f ⁻¹' t\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t s : Set α\nf : β → α\nhs ht : s ⊆ range f\n⊢ f ⁻¹' s = f ⁻¹' s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set β\n⊢ f ⁻¹' (range f ∩ s) = f ⁻¹' s\n[PROOFSTEP]\nrw [inter_comm, preimage_inter_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set β\n⊢ f ⁻¹' (f '' (f ⁻¹' s)) = f ⁻¹' s\n[PROOFSTEP]\nrw [image_preimage_eq_inter_range, preimage_inter_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\n⊢ range Sum.inl = {x | Sum.isLeft x = true}\n[PROOFSTEP]\next (_ | _)\n[GOAL]\ncase h.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nval✝ : α\n⊢ Sum.inl val✝ ∈ range Sum.inl ↔ Sum.inl val✝ ∈ {x | Sum.isLeft x = true}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nval✝ : β\n⊢ Sum.inr val✝ ∈ range Sum.inl ↔ Sum.inr val✝ ∈ {x | Sum.isLeft x = true}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\n⊢ range Sum.inr = {x | Sum.isRight x = true}\n[PROOFSTEP]\next (_ | _)\n[GOAL]\ncase h.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nval✝ : α\n⊢ Sum.inl val✝ ∈ range Sum.inr ↔ Sum.inl val✝ ∈ {x | Sum.isRight x = true}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nval✝ : β\n⊢ Sum.inr val✝ ∈ range Sum.inr ↔ Sum.inr val✝ ∈ {x | Sum.isRight x = true}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\n⊢ range Sum.inl ⊓ range Sum.inr ≤ ⊥\n[PROOFSTEP]\nrintro y ⟨⟨x₁, rfl⟩, ⟨x₂, h⟩⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nx₁ : α\nx₂ : β\nh : Sum.inr x₂ = Sum.inl x₁\n⊢ Sum.inl x₁ ∈ ⊥\n[PROOFSTEP]\nexact Sum.noConfusion h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\n⊢ ⊤ ≤ range Sum.inl ⊔ range Sum.inr\n[PROOFSTEP]\nrintro (x | y) - <;> [left; right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\n⊢ ⊤ ≤ range Sum.inl ⊔ range Sum.inr\n[PROOFSTEP]\nrintro (x | y) -\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nx : α\n⊢ Sum.inl x ∈ range Sum.inl ⊔ range Sum.inr\n[PROOFSTEP]\nleft\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\ny : β\n⊢ Sum.inr y ∈ range Sum.inl ⊔ range Sum.inr\n[PROOFSTEP]\nright\n[GOAL]\ncase inl.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nx : α\n⊢ Sum.inl x ∈ range Sum.inl\n[PROOFSTEP]\nexact mem_range_self _\n[GOAL]\ncase inr.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\ny : β\n⊢ Sum.inr y ∈ range Sum.inr\n[PROOFSTEP]\nexact mem_range_self _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns✝ t : Set α\ns : Set β\n⊢ Sum.inl ⁻¹' (Sum.inr '' s) = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns✝ t : Set α\ns : Set β\nx✝ : α\n⊢ x✝ ∈ Sum.inl ⁻¹' (Sum.inr '' s) ↔ x✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns✝ t s : Set α\n⊢ Sum.inr ⁻¹' (Sum.inl '' s) = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns✝ t s : Set α\nx✝ : β\n⊢ x✝ ∈ Sum.inr ⁻¹' (Sum.inl '' s) ↔ x✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\n⊢ Sum.inl ⁻¹' range Sum.inr = ∅\n[PROOFSTEP]\nrw [← image_univ, preimage_inl_image_inr]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\n⊢ Sum.inr ⁻¹' range Sum.inl = ∅\n[PROOFSTEP]\nrw [← image_univ, preimage_inr_image_inl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns✝ t : Set α\ns : Set (α ⊕ β)\n⊢ Sum.inl '' (Sum.inl ⁻¹' s) ∪ Sum.inr '' (Sum.inr ⁻¹' s) = s\n[PROOFSTEP]\nrw [image_preimage_eq_inter_range, image_preimage_eq_inter_range, ← inter_distrib_left, range_inl_union_range_inr,\n  inter_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\nq : β → Prop\nf : α → β\nh : ∀ (x : α), p x → q (f x)\n⊢ range (Subtype.map f h) = Subtype.val ⁻¹' (f '' {x | p x})\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\nq : β → Prop\nf : α → β\nh : ∀ (x : α), p x → q (f x)\nx : β\nhx : q x\n⊢ { val := x, property := hx } ∈ range (Subtype.map f h) ↔\n    { val := x, property := hx } ∈ Subtype.val ⁻¹' (f '' {x | p x})\n[PROOFSTEP]\nrw [mem_preimage, mem_range, mem_image, Subtype.exists, Subtype.coe_mk]\n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\nq : β → Prop\nf : α → β\nh : ∀ (x : α), p x → q (f x)\nx : β\nhx : q x\n⊢ (∃ a b, Subtype.map f h { val := a, property := b } = { val := x, property := hx }) ↔\n    ∃ x_1, x_1 ∈ {x | p x} ∧ f x_1 = x\n[PROOFSTEP]\napply Iff.intro\n[GOAL]\ncase h.mk.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\nq : β → Prop\nf : α → β\nh : ∀ (x : α), p x → q (f x)\nx : β\nhx : q x\n⊢ (∃ a b, Subtype.map f h { val := a, property := b } = { val := x, property := hx }) →\n    ∃ x_1, x_1 ∈ {x | p x} ∧ f x_1 = x\n[PROOFSTEP]\nrintro ⟨a, b, hab⟩\n[GOAL]\ncase h.mk.mp.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\nq : β → Prop\nf : α → β\nh : ∀ (x : α), p x → q (f x)\nx : β\nhx : q x\na : α\nb : p a\nhab : Subtype.map f h { val := a, property := b } = { val := x, property := hx }\n⊢ ∃ x_1, x_1 ∈ {x | p x} ∧ f x_1 = x\n[PROOFSTEP]\nrw [Subtype.map, Subtype.mk.injEq] at hab \n[GOAL]\ncase h.mk.mp.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\nq : β → Prop\nf : α → β\nh : ∀ (x : α), p x → q (f x)\nx : β\nhx : q x\na : α\nb : p a\nhab : f ↑{ val := a, property := b } = x\n⊢ ∃ x_1, x_1 ∈ {x | p x} ∧ f x_1 = x\n[PROOFSTEP]\nuse a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\nq : β → Prop\nf : α → β\nh : ∀ (x : α), p x → q (f x)\nx : β\nhx : q x\na : α\nb : p a\nhab : f ↑{ val := a, property := b } = x\n⊢ a ∈ {x | p x} ∧ f a = x\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase h.mk.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\nq : β → Prop\nf : α → β\nh : ∀ (x : α), p x → q (f x)\nx : β\nhx : q x\n⊢ (∃ x_1, x_1 ∈ {x | p x} ∧ f x_1 = x) →\n    ∃ a b, Subtype.map f h { val := a, property := b } = { val := x, property := hx }\n[PROOFSTEP]\nrintro ⟨a, b, hab⟩\n[GOAL]\ncase h.mk.mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\nq : β → Prop\nf : α → β\nh : ∀ (x : α), p x → q (f x)\nx : β\nhx : q x\na : α\nb : a ∈ {x | p x}\nhab : f a = x\n⊢ ∃ a b, Subtype.map f h { val := a, property := b } = { val := x, property := hx }\n[PROOFSTEP]\nuse a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\nq : β → Prop\nf : α → β\nh : ∀ (x : α), p x → q (f x)\nx : β\nhx : q x\na : α\nb : a ∈ {x | p x}\nhab : f a = x\n⊢ ∃ b, Subtype.map f h { val := a, property := b } = { val := x, property := hx }\n[PROOFSTEP]\nuse b\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\nq : β → Prop\nf : α → β\nh : ∀ (x : α), p x → q (f x)\nx : β\nhx : q x\na : α\nb : a ∈ {x | p x}\nhab : f a = x\n⊢ Subtype.map f h { val := a, property := b } = { val := x, property := hx }\n[PROOFSTEP]\nrw [Subtype.map, Subtype.mk.injEq]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\nq : β → Prop\nf : α → β\nh : ∀ (x : α), p x → q (f x)\nx : β\nhx : q x\na : α\nb : a ∈ {x | p x}\nhab : f a = x\n⊢ f ↑{ val := a, property := b } = x\n[PROOFSTEP]\nexact hab\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : ι → α\nx : α\n⊢ range f ⊆ {x} ↔ f = const ι x\n[PROOFSTEP]\nsimp [range_subset_iff, funext_iff, mem_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set β\n⊢ f '' (f ⁻¹' s)ᶜ = range f \\ s\n[PROOFSTEP]\nrw [compl_eq_univ_diff, image_diff_preimage, image_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set α\n⊢ f '' s = range fun x => f ↑x\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set α\nx✝ : β\n⊢ x✝ ∈ f '' s ↔ x✝ ∈ range fun x => f ↑x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set α\nx✝ : β\n⊢ x✝ ∈ f '' s → x✝ ∈ range fun x => f ↑x\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set α\nx✝ : β\n⊢ (x✝ ∈ range fun x => f ↑x) → x✝ ∈ f '' s\n[PROOFSTEP]\nrintro ⟨x, h1, h2⟩\n[GOAL]\ncase h.mp.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set α\nx✝ : β\nx : α\nh1 : x ∈ s\nh2 : f x = x✝\n⊢ x✝ ∈ range fun x => f ↑x\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set α\nx✝ : β\n⊢ (x✝ ∈ range fun x => f ↑x) → x✝ ∈ f '' s\n[PROOFSTEP]\nexact ⟨⟨x, h1⟩, h2⟩\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set α\nx✝ : β\n⊢ (x✝ ∈ range fun x => f ↑x) → x✝ ∈ f '' s\n[PROOFSTEP]\nrintro ⟨⟨x, h1⟩, h2⟩\n[GOAL]\ncase h.mpr.intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns✝ t : Set α\nf : α → β\ns : Set α\nx✝ : β\nx : α\nh1 : x ∈ s\nh2 : (fun x => f ↑x) { val := x, property := h1 } = x✝\n⊢ x✝ ∈ f '' s\n[PROOFSTEP]\nexact ⟨x, h1, h2⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : Prop\ninst✝ : Decidable p\nf g : α → β\n⊢ range (if p then f else g) ⊆ range f ∪ range g\n[PROOFSTEP]\nby_cases h : p\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : Prop\ninst✝ : Decidable p\nf g : α → β\nh : p\n⊢ range (if p then f else g) ⊆ range f ∪ range g\n[PROOFSTEP]\nrw [if_pos h]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : Prop\ninst✝ : Decidable p\nf g : α → β\nh : p\n⊢ range f ⊆ range f ∪ range g\n[PROOFSTEP]\nexact subset_union_left _ _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : Prop\ninst✝ : Decidable p\nf g : α → β\nh : ¬p\n⊢ range (if p then f else g) ⊆ range f ∪ range g\n[PROOFSTEP]\nrw [if_neg h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : Prop\ninst✝ : Decidable p\nf g : α → β\nh : ¬p\n⊢ range g ⊆ range f ∪ range g\n[PROOFSTEP]\nexact subset_union_right _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nf g : α → β\n⊢ (range fun x => if p x then f x else g x) ⊆ range f ∪ range g\n[PROOFSTEP]\nrw [range_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nf g : α → β\n⊢ ∀ (y : α), (if p y then f y else g y) ∈ range f ∪ range g\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nf g : α → β\nx : α\n⊢ (if p x then f x else g x) ∈ range f ∪ range g\n[PROOFSTEP]\nby_cases h : p x\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nf g : α → β\nx : α\nh : p x\n⊢ (if p x then f x else g x) ∈ range f ∪ range g\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nf g : α → β\nx : α\nh : ¬p x\n⊢ (if p x then f x else g x) ∈ range f ∪ range g\n[PROOFSTEP]\nsimp [if_pos h, mem_union, mem_range_self]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\np : α → Prop\ninst✝ : DecidablePred p\nf g : α → β\nx : α\nh : ¬p x\n⊢ (if p x then f x else g x) ∈ range f ∪ range g\n[PROOFSTEP]\nsimp [if_neg h, mem_union, mem_range_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : Unique ι\n⊢ range f = {f default}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : Unique ι\nx : α\n⊢ x ∈ range f ↔ x ∈ {f default}\n[PROOFSTEP]\nrw [mem_range]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : Unique ι\nx : α\n⊢ (∃ y, f y = x) ↔ x ∈ {f default}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : Unique ι\nx : α\n⊢ (∃ y, f y = x) → x ∈ {f default}\n[PROOFSTEP]\nrintro ⟨i, hi⟩\n[GOAL]\ncase h.mp.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : Unique ι\nx : α\ni : ι\nhi : f i = x\n⊢ x ∈ {f default}\n[PROOFSTEP]\nrw [h.uniq i] at hi \n[GOAL]\ncase h.mp.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : Unique ι\nx : α\ni : ι\nhi : f default = x\n⊢ x ∈ {f default}\n[PROOFSTEP]\nexact hi ▸ mem_singleton _\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : Unique ι\nx : α\n⊢ x ∈ {f default} → ∃ y, f y = x\n[PROOFSTEP]\nexact fun h => ⟨default, h.symm⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : s ⊆ t\n⊢ range (inclusion h) = {x | ↑x ∈ s}\n[PROOFSTEP]\next\n  ⟨x, hx⟩\n      -- Porting note: `simp [inclusion]` doesn't solve goal\n[GOAL]\ncase h.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : s ⊆ t\nx : α\nhx : x ∈ t\n⊢ { val := x, property := hx } ∈ range (inclusion h) ↔ { val := x, property := hx } ∈ {x | ↑x ∈ s}\n[PROOFSTEP]\napply Iff.intro\n[GOAL]\ncase h.mk.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : s ⊆ t\nx : α\nhx : x ∈ t\n⊢ { val := x, property := hx } ∈ range (inclusion h) → { val := x, property := hx } ∈ {x | ↑x ∈ s}\n[PROOFSTEP]\nrw [mem_range]\n[GOAL]\ncase h.mk.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : s ⊆ t\nx : α\nhx : x ∈ t\n⊢ (∃ y, inclusion h y = { val := x, property := hx }) → { val := x, property := hx } ∈ {x | ↑x ∈ s}\n[PROOFSTEP]\nrintro ⟨a, ha⟩\n[GOAL]\ncase h.mk.mp.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : s ⊆ t\nx : α\nhx : x ∈ t\na : ↑s\nha : inclusion h a = { val := x, property := hx }\n⊢ { val := x, property := hx } ∈ {x | ↑x ∈ s}\n[PROOFSTEP]\nrw [inclusion, Subtype.mk.injEq] at ha \n[GOAL]\ncase h.mk.mp.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : s ⊆ t\nx : α\nhx : x ∈ t\na : ↑s\nha : ↑a = x\n⊢ { val := x, property := hx } ∈ {x | ↑x ∈ s}\n[PROOFSTEP]\nrw [mem_setOf, Subtype.coe_mk, ← ha]\n[GOAL]\ncase h.mk.mp.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : s ⊆ t\nx : α\nhx : x ∈ t\na : ↑s\nha : ↑a = x\n⊢ ↑a ∈ s\n[PROOFSTEP]\nexact Subtype.coe_prop _\n[GOAL]\ncase h.mk.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : s ⊆ t\nx : α\nhx : x ∈ t\n⊢ { val := x, property := hx } ∈ {x | ↑x ∈ s} → { val := x, property := hx } ∈ range (inclusion h)\n[PROOFSTEP]\nrw [mem_setOf, Subtype.coe_mk, mem_range]\n[GOAL]\ncase h.mk.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : s ⊆ t\nx : α\nhx : x ∈ t\n⊢ x ∈ s → ∃ y, inclusion h y = { val := x, property := hx }\n[PROOFSTEP]\nintro hx'\n[GOAL]\ncase h.mk.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : s ⊆ t\nx : α\nhx : x ∈ t\nhx' : x ∈ s\n⊢ ∃ y, inclusion h y = { val := x, property := hx }\n[PROOFSTEP]\nuse⟨x, hx'⟩\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf : ι → α\ns t : Set α\nh : s ⊆ t\nx : α\nhx : x ∈ t\nhx' : x ∈ s\n⊢ inclusion h { val := x, property := hx' } = { val := x, property := hx }\n[PROOFSTEP]\ntrivial\n  -- simp_rw [inclusion, mem_range, Subtype.mk_eq_mk]\n    -- rw [SetCoe.exists, Subtype.coe_mk, exists_prop, exists_eq_right, mem_set_of, Subtype.coe_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\n⊢ f ∘ rangeSplitting f = Subtype.val\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx✝ : ↑(range f)\n⊢ (f ∘ rangeSplitting f) x✝ = ↑x✝\n[PROOFSTEP]\nsimp only [Function.comp_apply]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx✝ : ↑(range f)\n⊢ f (rangeSplitting f x✝) = ↑x✝\n[PROOFSTEP]\napply apply_rangeSplitting\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : ↑(range f)\n⊢ rangeFactorization f (rangeSplitting f x) = x\n[PROOFSTEP]\napply Subtype.ext\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : ↑(range f)\n⊢ ↑(rangeFactorization f (rangeSplitting f x)) = ↑x\n[PROOFSTEP]\nsimp only [rangeFactorization_coe]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nf✝ : ι → α\ns t : Set α\nf : α → β\nx : ↑(range f)\n⊢ f (rangeSplitting f x) = ↑x\n[PROOFSTEP]\napply apply_rangeSplitting\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns✝ : Set α✝\nα : Type u_6\nβ : Type u_7\nf : α → β\nhf : Surjective f\ns : Set β\nhs : Set.Subsingleton (f ⁻¹' s)\nfx : β\nhx : fx ∈ s\nfy : β\nhy : fy ∈ s\n⊢ fx = fy\n[PROOFSTEP]\nrcases hf fx, hf fy with ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩\n[GOAL]\ncase intro.intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns✝ : Set α✝\nα : Type u_6\nβ : Type u_7\nf : α → β\nhf : Surjective f\ns : Set β\nhs : Set.Subsingleton (f ⁻¹' s)\nx : α\nhx : f x ∈ s\ny : α\nhy : f y ∈ s\n⊢ f x = f y\n[PROOFSTEP]\nexact congr_arg f (hs hx hy)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns✝ : Set α\ns : Set β\nhs : Set.Nontrivial s\nf : α → β\nhf : Surjective f\n⊢ Set.Nontrivial (f ⁻¹' s)\n[PROOFSTEP]\nrcases hs with ⟨fx, hx, fy, hy, hxy⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns✝ : Set α\ns : Set β\nf : α → β\nhf : Surjective f\nfx : β\nhx : fx ∈ s\nfy : β\nhy : fy ∈ s\nhxy : fx ≠ fy\n⊢ Set.Nontrivial (f ⁻¹' s)\n[PROOFSTEP]\nrcases hf fx, hf fy with ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\ns✝ : Set α\ns : Set β\nf : α → β\nhf : Surjective f\nx : α\nhx : f x ∈ s\ny : α\nhy : f y ∈ s\nhxy : f x ≠ f y\n⊢ Set.Nontrivial (f ⁻¹' s)\n[PROOFSTEP]\nexact ⟨x, hx, y, hy, mt (congr_arg f) hxy⟩\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Injective f\n⊢ Surjective (preimage f)\n[PROOFSTEP]\nintro s\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Injective f\ns : Set α\n⊢ ∃ a, f ⁻¹' a = s\n[PROOFSTEP]\nuse f '' s\n[GOAL]\ncase h\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Injective f\ns : Set α\n⊢ f ⁻¹' (f '' s) = s\n[PROOFSTEP]\nrw [hf.preimage_image]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Surjective f\n⊢ Surjective (image f)\n[PROOFSTEP]\nintro s\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Surjective f\ns : Set β\n⊢ ∃ a, f '' a = s\n[PROOFSTEP]\nuse f ⁻¹' s\n[GOAL]\ncase h\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Surjective f\ns : Set β\n⊢ f '' (f ⁻¹' s) = s\n[PROOFSTEP]\nrw [hf.image_preimage]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Surjective f\ns : Set β\n⊢ Set.Nonempty (f ⁻¹' s) ↔ Set.Nonempty s\n[PROOFSTEP]\nrw [← nonempty_image_iff, hf.image_preimage]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Injective f\n⊢ Injective (image f)\n[PROOFSTEP]\nintro s t h\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Injective f\ns t : Set α\nh : f '' s = f '' t\n⊢ s = t\n[PROOFSTEP]\nrw [← preimage_image_eq s hf, ← preimage_image_eq t hf, h]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\ns t : Set β\nhf : Surjective f\n⊢ f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t\n[PROOFSTEP]\napply Set.preimage_subset_preimage_iff\n[GOAL]\ncase hs\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\ns t : Set β\nhf : Surjective f\n⊢ s ⊆ range f\n[PROOFSTEP]\nrw [Function.Surjective.range_eq hf]\n[GOAL]\ncase hs\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\ns t : Set β\nhf : Surjective f\n⊢ s ⊆ univ\n[PROOFSTEP]\napply subset_univ\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Injective f\ns : Set α\n⊢ (f '' s)ᶜ = f '' sᶜ ∪ (range f)ᶜ\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Injective f\ns : Set α\ny : β\n⊢ y ∈ (f '' s)ᶜ ↔ y ∈ f '' sᶜ ∪ (range f)ᶜ\n[PROOFSTEP]\nrcases em (y ∈ range f) with (⟨x, rfl⟩ | hx)\n[GOAL]\ncase h.inl.intro\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Injective f\ns : Set α\nx : α\n⊢ f x ∈ (f '' s)ᶜ ↔ f x ∈ f '' sᶜ ∪ (range f)ᶜ\n[PROOFSTEP]\nsimp [hf.eq_iff]\n[GOAL]\ncase h.inr\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Injective f\ns : Set α\ny : β\nhx : ¬y ∈ range f\n⊢ y ∈ (f '' s)ᶜ ↔ y ∈ f '' sᶜ ∪ (range f)ᶜ\n[PROOFSTEP]\nrw [mem_range, not_exists] at hx \n[GOAL]\ncase h.inr\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\nhf : Injective f\ns : Set α\ny : β\nhx : ∀ (x : α), ¬f x = y\n⊢ y ∈ (f '' s)ᶜ ↔ y ∈ f '' sᶜ ∪ (range f)ᶜ\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\ng : β → α\nh : LeftInverse g f\ns : Set α\n⊢ g '' (f '' s) = s\n[PROOFSTEP]\nrw [← image_comp, h.comp_eq_id, image_id]\n[GOAL]\nι : Sort u_1\nα : Type u_2\nβ : Type u_3\nf : α → β\ng : β → α\nh : LeftInverse g f\ns : Set α\n⊢ f ⁻¹' (g ⁻¹' s) = s\n[PROOFSTEP]\nrw [← preimage_comp, h.comp_eq_id, preimage_id]\n[GOAL]\nα : Type u_1\ns t : Set α\nh : t ⊆ s\n⊢ val '' {x | ↑x ∈ t} = t\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ns t : Set α\nh : t ⊆ s\nx : α\n⊢ x ∈ val '' {x | ↑x ∈ t} ↔ x ∈ t\n[PROOFSTEP]\nrw [Set.mem_image]\n[GOAL]\ncase h\nα : Type u_1\ns t : Set α\nh : t ⊆ s\nx : α\n⊢ (∃ x_1, x_1 ∈ {x | ↑x ∈ t} ∧ ↑x_1 = x) ↔ x ∈ t\n[PROOFSTEP]\nexact ⟨fun ⟨_, hx', hx⟩ => hx ▸ hx', fun hx => ⟨⟨x, h hx⟩, hx, rfl⟩⟩\n[GOAL]\nα : Type u_1\ns : Set α\n⊢ range val = s\n[PROOFSTEP]\nrw [← Set.image_univ]\n[GOAL]\nα : Type u_1\ns : Set α\n⊢ val '' univ = s\n[PROOFSTEP]\nsimp [-Set.image_univ, coe_image]\n[GOAL]\nα : Type u_1\ns : Set α\n⊢ val ⁻¹' s = univ\n[PROOFSTEP]\nrw [← preimage_range, range_coe]\n[GOAL]\nα : Type u_1\ns : Set α\nt : Set ↑s\nx : α\nx✝ : x ∈ val '' t\ny : { x // x ∈ s }\nleft✝ : y ∈ t\nyvaleq : ↑y = x\n⊢ x ∈ s\n[PROOFSTEP]\nrw [← yvaleq]\n[GOAL]\nα : Type u_1\ns : Set α\nt : Set ↑s\nx : α\nx✝ : x ∈ val '' t\ny : { x // x ∈ s }\nleft✝ : y ∈ t\nyvaleq : ↑y = x\n⊢ ↑y ∈ s\n[PROOFSTEP]\nexact y.property\n[GOAL]\nα : Type u_1\ns t u : Set α\n⊢ val ⁻¹' t = val ⁻¹' u ↔ t ∩ s = u ∩ s\n[PROOFSTEP]\nrw [← image_preimage_coe, ← image_preimage_coe, coe_injective.image_injective.eq_iff]\n[GOAL]\nα : Type u_1\ns t : Set α\n⊢ val ⁻¹' (t ∩ s) = val ⁻¹' t\n[PROOFSTEP]\nrw [preimage_coe_eq_preimage_coe_iff, inter_assoc, inter_self]\n[GOAL]\nα : Type u_1\nt : Set α\np : Set α → Prop\n⊢ (∃ s, p (val '' s)) ↔ ∃ s, s ⊆ t ∧ p s\n[PROOFSTEP]\nrw [← exists_subset_range_and_iff, range_coe]\n[GOAL]\nα : Type u_1\nt : Set α\np : Set α → Prop\n⊢ (∀ (s : Set ↑t), p (val '' s)) ↔ ∀ (s : Set α), s ⊆ t → p s\n[PROOFSTEP]\nrw [← forall_subset_range_iff, range_coe]\n[GOAL]\nα : Type u_1\ns t : Set α\n⊢ Set.Nonempty (val ⁻¹' t) ↔ Set.Nonempty (s ∩ t)\n[PROOFSTEP]\nrw [inter_comm, ← image_preimage_coe, nonempty_image_iff]\n[GOAL]\nα : Type u_1\ns t : Set α\n⊢ val ⁻¹' t = ∅ ↔ s ∩ t = ∅\n[PROOFSTEP]\nsimp [← not_nonempty_iff_eq_empty, preimage_coe_nonempty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : Option α → β\n⊢ Injective f ↔ Injective (f ∘ some) ∧ ¬f none ∈ range (f ∘ some)\n[PROOFSTEP]\nsimp only [mem_range, not_exists, (· ∘ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : Option α → β\n⊢ Injective f ↔ (Injective fun x => f (some x)) ∧ ∀ (x : α), ¬f (some x) = f none\n[PROOFSTEP]\nrefine' ⟨fun hf => ⟨hf.comp (Option.some_injective _), fun x => hf.ne <| Option.some_ne_none _⟩, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : Option α → β\n⊢ ((Injective fun x => f (some x)) ∧ ∀ (x : α), ¬f (some x) = f none) → Injective f\n[PROOFSTEP]\nrintro ⟨h_some, h_none⟩ (_ | a) (_ | b) hab\n[GOAL]\ncase intro.none.none\nα : Type u_1\nβ : Type u_2\nf : Option α → β\nh_some : Injective fun x => f (some x)\nh_none : ∀ (x : α), ¬f (some x) = f none\nhab : f none = f none\n⊢ none = none\ncase intro.none.some\nα : Type u_1\nβ : Type u_2\nf : Option α → β\nh_some : Injective fun x => f (some x)\nh_none : ∀ (x : α), ¬f (some x) = f none\nb : α\nhab : f none = f (some b)\n⊢ none = some b\ncase intro.some.none\nα : Type u_1\nβ : Type u_2\nf : Option α → β\nh_some : Injective fun x => f (some x)\nh_none : ∀ (x : α), ¬f (some x) = f none\na : α\nhab : f (some a) = f none\n⊢ some a = none\ncase intro.some.some\nα : Type u_1\nβ : Type u_2\nf : Option α → β\nh_some : Injective fun x => f (some x)\nh_none : ∀ (x : α), ¬f (some x) = f none\na b : α\nhab : f (some a) = f (some b)\n⊢ some a = some b\n[PROOFSTEP]\nexacts [rfl, (h_none _ hab.symm).elim, (h_none _ hab).elim, congr_arg some (h_some hab)]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\n⊢ Injective (preimage f) ↔ Surjective f\n[PROOFSTEP]\nrefine' ⟨fun h y => _, Surjective.preimage_injective⟩\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nh : Injective (preimage f)\ny : β\n⊢ ∃ a, f a = y\n[PROOFSTEP]\nobtain ⟨x, hx⟩ : (f ⁻¹' { y }).Nonempty :=\n  by\n  rw [h.nonempty_apply_iff preimage_empty]\n  apply singleton_nonempty\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nh : Injective (preimage f)\ny : β\n⊢ Set.Nonempty (f ⁻¹' {y})\n[PROOFSTEP]\nrw [h.nonempty_apply_iff preimage_empty]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nh : Injective (preimage f)\ny : β\n⊢ Set.Nonempty {y}\n[PROOFSTEP]\napply singleton_nonempty\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nf : α → β\nh : Injective (preimage f)\ny : β\nx : α\nhx : x ∈ f ⁻¹' {y}\n⊢ ∃ a, f a = y\n[PROOFSTEP]\nexact ⟨x, hx⟩\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\n⊢ Surjective (preimage f) ↔ Injective f\n[PROOFSTEP]\nrefine' ⟨fun h x x' hx => _, Injective.preimage_surjective⟩\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nh : Surjective (preimage f)\nx x' : α\nhx : f x = f x'\n⊢ x = x'\n[PROOFSTEP]\ncases' h { x } with s hs\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nf : α → β\nh : Surjective (preimage f)\nx x' : α\nhx : f x = f x'\ns : Set β\nhs : f ⁻¹' s = {x}\n⊢ x = x'\n[PROOFSTEP]\nhave := mem_singleton x\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nf : α → β\nh : Surjective (preimage f)\nx x' : α\nhx : f x = f x'\ns : Set β\nhs : f ⁻¹' s = {x}\nthis : x ∈ {x}\n⊢ x = x'\n[PROOFSTEP]\nrwa [← hs, mem_preimage, hx, ← mem_preimage, hs, mem_singleton_iff, eq_comm] at this \n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\n⊢ Surjective (image f) ↔ Surjective f\n[PROOFSTEP]\nrefine' ⟨fun h y => _, Surjective.image_surjective⟩\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nh : Surjective (image f)\ny : β\n⊢ ∃ a, f a = y\n[PROOFSTEP]\ncases' h { y } with s hs\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nf : α → β\nh : Surjective (image f)\ny : β\ns : Set α\nhs : f '' s = {y}\n⊢ ∃ a, f a = y\n[PROOFSTEP]\nhave := mem_singleton y\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nf : α → β\nh : Surjective (image f)\ny : β\ns : Set α\nhs : f '' s = {y}\nthis : y ∈ {y}\n⊢ ∃ a, f a = y\n[PROOFSTEP]\nrw [← hs] at this \n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nf : α → β\nh : Surjective (image f)\ny : β\ns : Set α\nhs : f '' s = {y}\nthis : y ∈ f '' s\n⊢ ∃ a, f a = y\n[PROOFSTEP]\nrcases this with ⟨x, _, hx⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u\nβ : Type v\nf : α → β\nh : Surjective (image f)\ny : β\ns : Set α\nhs : f '' s = {y}\nx : α\nleft✝ : x ∈ s\nhx : f x = y\n⊢ ∃ a, f a = y\n[PROOFSTEP]\nexact ⟨x, hx⟩\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\n⊢ Injective (image f) ↔ Injective f\n[PROOFSTEP]\nrefine' ⟨fun h x x' hx => _, Injective.image_injective⟩\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nh : Injective (image f)\nx x' : α\nhx : f x = f x'\n⊢ x = x'\n[PROOFSTEP]\nrw [← singleton_eq_singleton_iff]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\nh : Injective (image f)\nx x' : α\nhx : f x = f x'\n⊢ {x} = {x'}\n[PROOFSTEP]\napply h\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nf : α → β\nh : Injective (image f)\nx x' : α\nhx : f x = f x'\n⊢ f '' {x} = f '' {x'}\n[PROOFSTEP]\nrw [image_singleton, image_singleton, hx]\n[GOAL]\nα : Type u\nβ : Type v\nf✝ f : α → β\nhf : Bijective f\ns : Set β\nt : Set α\n⊢ f ⁻¹' s = t ↔ s = f '' t\n[PROOFSTEP]\nrw [← image_eq_image hf.1, hf.2.image_preimage]\n[GOAL]\nα : Type u\nβ : Type v\nf✝ f : α → β\nhf : Bijective f\ns : Set α\nt : Set β\n⊢ s = f ⁻¹' t ↔ f '' s = t\n[PROOFSTEP]\nrw [← image_eq_image hf.1, hf.2.image_preimage]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf✝ : α → β\ns✝ t✝ : Set α\nf : β → α\ng : γ → α\ns : Set β\nt : Set γ\nh : ∀ (b : β), b ∈ s → ∀ (c : γ), c ∈ t → f b ≠ g c\n⊢ f '' s ⊓ g '' t ≤ ⊥\n[PROOFSTEP]\nrintro a ⟨⟨b, hb, eq⟩, c, hc, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf✝ : α → β\ns✝ t✝ : Set α\nf : β → α\ng : γ → α\ns : Set β\nt : Set γ\nh : ∀ (b : β), b ∈ s → ∀ (c : γ), c ∈ t → f b ≠ g c\nb : β\nhb : b ∈ s\nc : γ\nhc : c ∈ t\neq : f b = g c\n⊢ g c ∈ ⊥\n[PROOFSTEP]\nexact h b hb c hc eq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns✝ t✝ : Set α\nhf : Surjective f\ns t : Set β\nh : Disjoint (f ⁻¹' s) (f ⁻¹' t)\n⊢ Disjoint s t\n[PROOFSTEP]\nrw [disjoint_iff_inter_eq_empty, ← image_preimage_eq (_ ∩ _) hf, preimage_inter, h.inter_eq, image_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns✝ t : Set α\ns : Set β\nh : Disjoint s (range f)\n⊢ f ⁻¹' s = ∅\n[PROOFSTEP]\nsimpa using h.preimage f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns✝ t : Set α\ns : Set β\nh : f ⁻¹' s = ∅\n⊢ Disjoint s (range f)\n[PROOFSTEP]\nsimp only [eq_empty_iff_forall_not_mem, disjoint_iff_inter_eq_empty, not_exists, mem_inter_iff, not_and, mem_range,\n  mem_preimage] at h ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns✝ t : Set α\ns : Set β\nh : ∀ (x : α), ¬f x ∈ s\n⊢ ∀ (x : β), x ∈ s → ∀ (x_1 : α), ¬f x_1 = x\n[PROOFSTEP]\nintro y hy x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns✝ t : Set α\ns : Set β\nh : ∀ (x : α), ¬f x ∈ s\ny : β\nhy : y ∈ s\nx : α\nhx : f x = y\n⊢ False\n[PROOFSTEP]\nrw [← hx] at hy \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns✝ t : Set α\ns : Set β\nh : ∀ (x : α), ¬f x ∈ s\ny : β\nx : α\nhy : f x ∈ s\nhx : f x = y\n⊢ False\n[PROOFSTEP]\nexact h x hy\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ni j : α\ns : Set (β i)\nh : i ≠ j\n⊢ Sigma.mk j ⁻¹' (Sigma.mk i '' s) = ∅\n[PROOFSTEP]\nchange Sigma.mk j ⁻¹' {⟨i, u⟩ | u ∈ s} = ∅\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ni j : α\ns : Set (β i)\nh : i ≠ j\n⊢ Sigma.mk j ⁻¹' {x | ∃ u, u ∈ s ∧ { fst := i, snd := u } = x} = ∅\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ni j : α\ns : Set (β i)\n⊢ Sigma.mk i ⁻¹' (Sigma.mk i '' s) = s\n[PROOFSTEP]\nchange Sigma.mk i ⁻¹' {⟨i, u⟩ | u ∈ s} = s\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ni j : α\ns : Set (β i)\n⊢ Sigma.mk i ⁻¹' {x | ∃ u, u ∈ s ∧ { fst := i, snd := u } = x} = s\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Image", "llama_tokens": 38070, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6825737344123242, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.37583012568832064}}
{"text": "[GOAL]\nR : Type u\ninst✝ : Ring R\n⊢ ∀ (X : Type u),\n    { obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (𝟙 X) =\n      𝟙 ({ obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.obj X)\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u\ninst✝ : Ring R\nX✝ : Type u\n⊢ { obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (𝟙 X✝) =\n    𝟙 ({ obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.obj X✝)\n[PROOFSTEP]\nexact Finsupp.lmapDomain_id _ _\n[GOAL]\nR : Type u\ninst✝ : Ring R\n⊢ ∀ {X Y Z : Type u} (f : X ⟶ Y) (g : Y ⟶ Z),\n    { obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (f ≫ g) =\n      { obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map f ≫\n        { obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map g\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u\ninst✝ : Ring R\nX✝ Y✝ Z✝ : Type u\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\n⊢ { obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (f✝ ≫ g✝) =\n    { obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map f✝ ≫\n      { obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map g✝\n[PROOFSTEP]\nexact Finsupp.lmapDomain_comp _ _ _ _\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nX Y X' Y' : Type u\nf : X ⟶ Y\ng : X' ⟶ Y'\n⊢ ((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom = (μ R X X').hom ≫ (free R).map (f ⊗ g)\n[PROOFSTEP]\nintros\n  -- Porting note: broken ext\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nX Y X' Y' : Type u\nf : X ⟶ Y\ng : X' ⟶ Y'\n⊢ ((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom = (μ R X X').hom ≫ (free R).map (f ⊗ g)\n[PROOFSTEP]\napply TensorProduct.ext\n[GOAL]\ncase H\nR : Type u\ninst✝ : CommRing R\nX Y X' Y' : Type u\nf : X ⟶ Y\ng : X' ⟶ Y'\n⊢ LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n      (((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom) =\n    LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X')) ((μ R X X').hom ≫ (free R).map (f ⊗ g))\n[PROOFSTEP]\napply Finsupp.lhom_ext'\n[GOAL]\ncase H.h\nR : Type u\ninst✝ : CommRing R\nX Y X' Y' : Type u\nf : X ⟶ Y\ng : X' ⟶ Y'\n⊢ ∀ (a : X),\n    LinearMap.comp\n        (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n          (((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom))\n        (Finsupp.lsingle a) =\n      LinearMap.comp\n        (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n          ((μ R X X').hom ≫ (free R).map (f ⊗ g)))\n        (Finsupp.lsingle a)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase H.h\nR : Type u\ninst✝ : CommRing R\nX Y X' Y' : Type u\nf : X ⟶ Y\ng : X' ⟶ Y'\nx : X\n⊢ LinearMap.comp\n      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n        (((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom))\n      (Finsupp.lsingle x) =\n    LinearMap.comp\n      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n        ((μ R X X').hom ≫ (free R).map (f ⊗ g)))\n      (Finsupp.lsingle x)\n[PROOFSTEP]\napply LinearMap.ext_ring\n[GOAL]\ncase H.h.h\nR : Type u\ninst✝ : CommRing R\nX Y X' Y' : Type u\nf : X ⟶ Y\ng : X' ⟶ Y'\nx : X\n⊢ ↑(LinearMap.comp\n          (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n            (((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom))\n          (Finsupp.lsingle x))\n      1 =\n    ↑(LinearMap.comp\n          (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n            ((μ R X X').hom ≫ (free R).map (f ⊗ g)))\n          (Finsupp.lsingle x))\n      1\n[PROOFSTEP]\napply Finsupp.lhom_ext'\n[GOAL]\ncase H.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y X' Y' : Type u\nf : X ⟶ Y\ng : X' ⟶ Y'\nx : X\n⊢ ∀ (a : X'),\n    LinearMap.comp\n        (↑(LinearMap.comp\n              (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n                (((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom))\n              (Finsupp.lsingle x))\n          1)\n        (Finsupp.lsingle a) =\n      LinearMap.comp\n        (↑(LinearMap.comp\n              (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n                ((μ R X X').hom ≫ (free R).map (f ⊗ g)))\n              (Finsupp.lsingle x))\n          1)\n        (Finsupp.lsingle a)\n[PROOFSTEP]\nintro x'\n[GOAL]\ncase H.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y X' Y' : Type u\nf : X ⟶ Y\ng : X' ⟶ Y'\nx : X\nx' : X'\n⊢ LinearMap.comp\n      (↑(LinearMap.comp\n            (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n              (((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom))\n            (Finsupp.lsingle x))\n        1)\n      (Finsupp.lsingle x') =\n    LinearMap.comp\n      (↑(LinearMap.comp\n            (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n              ((μ R X X').hom ≫ (free R).map (f ⊗ g)))\n            (Finsupp.lsingle x))\n        1)\n      (Finsupp.lsingle x')\n[PROOFSTEP]\napply LinearMap.ext_ring\n[GOAL]\ncase H.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y X' Y' : Type u\nf : X ⟶ Y\ng : X' ⟶ Y'\nx : X\nx' : X'\n⊢ ↑(LinearMap.comp\n          (↑(LinearMap.comp\n                (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n                  (((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom))\n                (Finsupp.lsingle x))\n            1)\n          (Finsupp.lsingle x'))\n      1 =\n    ↑(LinearMap.comp\n          (↑(LinearMap.comp\n                (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n                  ((μ R X X').hom ≫ (free R).map (f ⊗ g)))\n                (Finsupp.lsingle x))\n            1)\n          (Finsupp.lsingle x'))\n      1\n[PROOFSTEP]\napply Finsupp.ext\n[GOAL]\ncase H.h.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y X' Y' : Type u\nf : X ⟶ Y\ng : X' ⟶ Y'\nx : X\nx' : X'\n⊢ ∀ (a : Y ⊗ Y'),\n    ↑(↑(LinearMap.comp\n                (↑(LinearMap.comp\n                      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n                        (((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom))\n                      (Finsupp.lsingle x))\n                  1)\n                (Finsupp.lsingle x'))\n            1)\n        a =\n      ↑(↑(LinearMap.comp\n                (↑(LinearMap.comp\n                      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n                        ((μ R X X').hom ≫ (free R).map (f ⊗ g)))\n                      (Finsupp.lsingle x))\n                  1)\n                (Finsupp.lsingle x'))\n            1)\n        a\n[PROOFSTEP]\nintro\n  ⟨y, y'⟩\n    -- Porting note: used to be dsimp [μ]\n[GOAL]\ncase H.h.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y X' Y' : Type u\nf : X ⟶ Y\ng : X' ⟶ Y'\nx : X\nx' : X'\ny : Y\ny' : Y'\n⊢ ↑(↑(LinearMap.comp\n              (↑(LinearMap.comp\n                    (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n                      (((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom))\n                    (Finsupp.lsingle x))\n                1)\n              (Finsupp.lsingle x'))\n          1)\n      (y, y') =\n    ↑(↑(LinearMap.comp\n              (↑(LinearMap.comp\n                    (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj X'))\n                      ((μ R X X').hom ≫ (free R).map (f ⊗ g)))\n                    (Finsupp.lsingle x))\n                1)\n              (Finsupp.lsingle x'))\n          1)\n      (y, y')\n[PROOFSTEP]\nchange\n  (finsuppTensorFinsupp' R Y Y')\n      (Finsupp.mapDomain f (Finsupp.single x 1) ⊗ₜ[R] Finsupp.mapDomain g (Finsupp.single x' 1)) _ =\n    (Finsupp.mapDomain (f ⊗ g) (finsuppTensorFinsupp' R X X' (Finsupp.single x 1 ⊗ₜ[R] Finsupp.single x' 1))) _\n[GOAL]\ncase H.h.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y X' Y' : Type u\nf : X ⟶ Y\ng : X' ⟶ Y'\nx : X\nx' : X'\ny : Y\ny' : Y'\n⊢ ↑(↑(finsuppTensorFinsupp' R Y Y')\n          (Finsupp.mapDomain f (Finsupp.single x 1) ⊗ₜ[R] Finsupp.mapDomain g (Finsupp.single x' 1)))\n      (y, y') =\n    ↑(Finsupp.mapDomain (f ⊗ g) (↑(finsuppTensorFinsupp' R X X') (Finsupp.single x 1 ⊗ₜ[R] Finsupp.single x' 1)))\n      (y, y')\n[PROOFSTEP]\nsimp_rw [Finsupp.mapDomain_single, finsuppTensorFinsupp'_single_tmul_single, mul_one, Finsupp.mapDomain_single,\n  CategoryTheory.tensor_apply]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nX : Type u\n⊢ (λ_ ((free R).obj X)).hom =\n    (ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom\n[PROOFSTEP]\nintros\n  -- Porting note: broken ext\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nX : Type u\n⊢ (λ_ ((free R).obj X)).hom =\n    (ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom\n[PROOFSTEP]\napply TensorProduct.ext\n[GOAL]\ncase H\nR : Type u\ninst✝ : CommRing R\nX : Type u\n⊢ LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom =\n    LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))\n      ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom)\n[PROOFSTEP]\napply LinearMap.ext_ring\n[GOAL]\ncase H.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\n⊢ ↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1 =\n    ↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))\n          ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))\n      1\n[PROOFSTEP]\napply Finsupp.lhom_ext'\n[GOAL]\ncase H.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\n⊢ ∀ (a : X),\n    LinearMap.comp (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1)\n        (Finsupp.lsingle a) =\n      LinearMap.comp\n        (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))\n              ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))\n          1)\n        (Finsupp.lsingle a)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase H.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx : X\n⊢ LinearMap.comp (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1)\n      (Finsupp.lsingle x) =\n    LinearMap.comp\n      (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))\n            ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))\n        1)\n      (Finsupp.lsingle x)\n[PROOFSTEP]\napply LinearMap.ext_ring\n[GOAL]\ncase H.h.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx : X\n⊢ ↑(LinearMap.comp (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1)\n          (Finsupp.lsingle x))\n      1 =\n    ↑(LinearMap.comp\n          (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))\n                ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))\n            1)\n          (Finsupp.lsingle x))\n      1\n[PROOFSTEP]\napply Finsupp.ext\n[GOAL]\ncase H.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx : X\n⊢ ∀ (a : X),\n    ↑(↑(LinearMap.comp\n                (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1)\n                (Finsupp.lsingle x))\n            1)\n        a =\n      ↑(↑(LinearMap.comp\n                (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))\n                      ((ε R ⊗ 𝟙 ((free R).obj X)) ≫\n                        (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))\n                  1)\n                (Finsupp.lsingle x))\n            1)\n        a\n[PROOFSTEP]\nintro x'\n[GOAL]\ncase H.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx x' : X\n⊢ ↑(↑(LinearMap.comp\n              (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1)\n              (Finsupp.lsingle x))\n          1)\n      x' =\n    ↑(↑(LinearMap.comp\n              (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))\n                    ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))\n                1)\n              (Finsupp.lsingle x))\n          1)\n      x'\n[PROOFSTEP]\nlet q : X →₀ R := ((λ_ (of R (X →₀ R))).hom) (1 ⊗ₜ[R] Finsupp.single x 1)\n[GOAL]\ncase H.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx x' : X\nq : X →₀ R := ↑(λ_ (of R (X →₀ R))).hom (1 ⊗ₜ[R] Finsupp.single x 1)\n⊢ ↑(↑(LinearMap.comp\n              (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1)\n              (Finsupp.lsingle x))\n          1)\n      x' =\n    ↑(↑(LinearMap.comp\n              (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))\n                    ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))\n                1)\n              (Finsupp.lsingle x))\n          1)\n      x'\n[PROOFSTEP]\nchange\n  q x' =\n    Finsupp.mapDomain (λ_ X).hom\n      (finsuppTensorFinsupp' R (𝟙_ (Type u)) X (Finsupp.single PUnit.unit 1 ⊗ₜ[R] Finsupp.single x 1)) x'\n[GOAL]\ncase H.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx x' : X\nq : X →₀ R := ↑(λ_ (of R (X →₀ R))).hom (1 ⊗ₜ[R] Finsupp.single x 1)\n⊢ ↑q x' =\n    ↑(Finsupp.mapDomain (λ_ X).hom\n          (↑(finsuppTensorFinsupp' R (𝟙_ (Type u)) X) (Finsupp.single PUnit.unit 1 ⊗ₜ[R] Finsupp.single x 1)))\n      x'\n[PROOFSTEP]\nsimp_rw [finsuppTensorFinsupp'_single_tmul_single, ModuleCat.MonoidalCategory.leftUnitor_hom_apply, mul_one,\n  Finsupp.mapDomain_single, CategoryTheory.leftUnitor_hom_apply, one_smul]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nX : Type u\n⊢ (ρ_ ((free R).obj X)).hom =\n    (𝟙 ((free R).obj X) ⊗ ε R) ≫ (μ R X (𝟙_ (Type u))).hom ≫ map (free R).toPrefunctor.obj (ρ_ X).hom\n[PROOFSTEP]\nintros\n  -- Porting note: broken ext\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nX : Type u\n⊢ (ρ_ ((free R).obj X)).hom =\n    (𝟙 ((free R).obj X) ⊗ ε R) ≫ (μ R X (𝟙_ (Type u))).hom ≫ map (free R).toPrefunctor.obj (ρ_ X).hom\n[PROOFSTEP]\napply TensorProduct.ext\n[GOAL]\ncase H\nR : Type u\ninst✝ : CommRing R\nX : Type u\n⊢ LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit') (ρ_ ((free R).obj X)).hom =\n    LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit')\n      ((𝟙 ((free R).obj X) ⊗ ε R) ≫ (μ R X (𝟙_ (Type u))).hom ≫ map (free R).toPrefunctor.obj (ρ_ X).hom)\n[PROOFSTEP]\napply Finsupp.lhom_ext'\n[GOAL]\ncase H.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\n⊢ ∀ (a : X),\n    LinearMap.comp (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit') (ρ_ ((free R).obj X)).hom)\n        (Finsupp.lsingle a) =\n      LinearMap.comp\n        (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit')\n          ((𝟙 ((free R).obj X) ⊗ ε R) ≫ (μ R X (𝟙_ (Type u))).hom ≫ map (free R).toPrefunctor.obj (ρ_ X).hom))\n        (Finsupp.lsingle a)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase H.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx : X\n⊢ LinearMap.comp (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit') (ρ_ ((free R).obj X)).hom)\n      (Finsupp.lsingle x) =\n    LinearMap.comp\n      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit')\n        ((𝟙 ((free R).obj X) ⊗ ε R) ≫ (μ R X (𝟙_ (Type u))).hom ≫ map (free R).toPrefunctor.obj (ρ_ X).hom))\n      (Finsupp.lsingle x)\n[PROOFSTEP]\napply LinearMap.ext_ring\n[GOAL]\ncase H.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx : X\n⊢ ↑(LinearMap.comp (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit') (ρ_ ((free R).obj X)).hom)\n          (Finsupp.lsingle x))\n      1 =\n    ↑(LinearMap.comp\n          (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit')\n            ((𝟙 ((free R).obj X) ⊗ ε R) ≫ (μ R X (𝟙_ (Type u))).hom ≫ map (free R).toPrefunctor.obj (ρ_ X).hom))\n          (Finsupp.lsingle x))\n      1\n[PROOFSTEP]\napply LinearMap.ext_ring\n[GOAL]\ncase H.h.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx : X\n⊢ ↑(↑(LinearMap.comp (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit') (ρ_ ((free R).obj X)).hom)\n              (Finsupp.lsingle x))\n          1)\n      1 =\n    ↑(↑(LinearMap.comp\n              (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit')\n                ((𝟙 ((free R).obj X) ⊗ ε R) ≫ (μ R X (𝟙_ (Type u))).hom ≫ map (free R).toPrefunctor.obj (ρ_ X).hom))\n              (Finsupp.lsingle x))\n          1)\n      1\n[PROOFSTEP]\napply Finsupp.ext\n[GOAL]\ncase H.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx : X\n⊢ ∀ (a : X),\n    ↑(↑(↑(LinearMap.comp\n                    (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit') (ρ_ ((free R).obj X)).hom)\n                    (Finsupp.lsingle x))\n                1)\n            1)\n        a =\n      ↑(↑(↑(LinearMap.comp\n                    (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit')\n                      ((𝟙 ((free R).obj X) ⊗ ε R) ≫\n                        (μ R X (𝟙_ (Type u))).hom ≫ map (free R).toPrefunctor.obj (ρ_ X).hom))\n                    (Finsupp.lsingle x))\n                1)\n            1)\n        a\n[PROOFSTEP]\nintro x'\n[GOAL]\ncase H.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx x' : X\n⊢ ↑(↑(↑(LinearMap.comp (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit') (ρ_ ((free R).obj X)).hom)\n                  (Finsupp.lsingle x))\n              1)\n          1)\n      x' =\n    ↑(↑(↑(LinearMap.comp\n                  (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit')\n                    ((𝟙 ((free R).obj X) ⊗ ε R) ≫ (μ R X (𝟙_ (Type u))).hom ≫ map (free R).toPrefunctor.obj (ρ_ X).hom))\n                  (Finsupp.lsingle x))\n              1)\n          1)\n      x'\n[PROOFSTEP]\nlet q : X →₀ R := ((ρ_ (of R (X →₀ R))).hom) (Finsupp.single x 1 ⊗ₜ[R] 1)\n[GOAL]\ncase H.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx x' : X\nq : X →₀ R := ↑(ρ_ (of R (X →₀ R))).hom (Finsupp.single x 1 ⊗ₜ[R] 1)\n⊢ ↑(↑(↑(LinearMap.comp (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit') (ρ_ ((free R).obj X)).hom)\n                  (Finsupp.lsingle x))\n              1)\n          1)\n      x' =\n    ↑(↑(↑(LinearMap.comp\n                  (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑tensorUnit')\n                    ((𝟙 ((free R).obj X) ⊗ ε R) ≫ (μ R X (𝟙_ (Type u))).hom ≫ map (free R).toPrefunctor.obj (ρ_ X).hom))\n                  (Finsupp.lsingle x))\n              1)\n          1)\n      x'\n[PROOFSTEP]\nchange\n  q x' =\n    Finsupp.mapDomain (ρ_ X).hom\n      (finsuppTensorFinsupp' R X (𝟙_ (Type u)) (Finsupp.single x 1 ⊗ₜ[R] Finsupp.single PUnit.unit 1)) x'\n[GOAL]\ncase H.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX : Type u\nx x' : X\nq : X →₀ R := ↑(ρ_ (of R (X →₀ R))).hom (Finsupp.single x 1 ⊗ₜ[R] 1)\n⊢ ↑q x' =\n    ↑(Finsupp.mapDomain (ρ_ X).hom\n          (↑(finsuppTensorFinsupp' R X (𝟙_ (Type u))) (Finsupp.single x 1 ⊗ₜ[R] Finsupp.single PUnit.unit 1)))\n      x'\n[PROOFSTEP]\nsimp_rw [finsuppTensorFinsupp'_single_tmul_single, ModuleCat.MonoidalCategory.rightUnitor_hom_apply, mul_one,\n  Finsupp.mapDomain_single, CategoryTheory.rightUnitor_hom_apply, one_smul]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\n⊢ ((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫ (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom =\n    (α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n      (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom\n[PROOFSTEP]\nintros\n  -- Porting note: broken ext\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\n⊢ ((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫ (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom =\n    (α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n      (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom\n[PROOFSTEP]\napply TensorProduct.ext\n[GOAL]\ncase H\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\n⊢ LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n      (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫ (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom) =\n    LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n      ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n        (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom)\n[PROOFSTEP]\napply TensorProduct.ext\n[GOAL]\ncase H.H\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\n⊢ LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n        (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫ (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom)) =\n    LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n        ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n          (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom))\n[PROOFSTEP]\napply Finsupp.lhom_ext'\n[GOAL]\ncase H.H.h\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\n⊢ ∀ (a : X),\n    LinearMap.comp\n        (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n          (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n            (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫\n              (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom)))\n        (Finsupp.lsingle a) =\n      LinearMap.comp\n        (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n          (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n            ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n              (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom)))\n        (Finsupp.lsingle a)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase H.H.h\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\nx : X\n⊢ LinearMap.comp\n      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n        (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n          (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫ (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom)))\n      (Finsupp.lsingle x) =\n    LinearMap.comp\n      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n        (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n          ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n            (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom)))\n      (Finsupp.lsingle x)\n[PROOFSTEP]\napply LinearMap.ext_ring\n[GOAL]\ncase H.H.h.h\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\nx : X\n⊢ ↑(LinearMap.comp\n          (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n            (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n              (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫\n                (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom)))\n          (Finsupp.lsingle x))\n      1 =\n    ↑(LinearMap.comp\n          (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n            (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n              ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n                (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom)))\n          (Finsupp.lsingle x))\n      1\n[PROOFSTEP]\napply Finsupp.lhom_ext'\n[GOAL]\ncase H.H.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\nx : X\n⊢ ∀ (a : Y),\n    LinearMap.comp\n        (↑(LinearMap.comp\n              (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                  (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫\n                    (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom)))\n              (Finsupp.lsingle x))\n          1)\n        (Finsupp.lsingle a) =\n      LinearMap.comp\n        (↑(LinearMap.comp\n              (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                  ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n                    (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom)))\n              (Finsupp.lsingle x))\n          1)\n        (Finsupp.lsingle a)\n[PROOFSTEP]\nintro y\n[GOAL]\ncase H.H.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\nx : X\ny : Y\n⊢ LinearMap.comp\n      (↑(LinearMap.comp\n            (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n              (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫\n                  (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom)))\n            (Finsupp.lsingle x))\n        1)\n      (Finsupp.lsingle y) =\n    LinearMap.comp\n      (↑(LinearMap.comp\n            (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n              (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n                  (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom)))\n            (Finsupp.lsingle x))\n        1)\n      (Finsupp.lsingle y)\n[PROOFSTEP]\napply LinearMap.ext_ring\n[GOAL]\ncase H.H.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\nx : X\ny : Y\n⊢ ↑(LinearMap.comp\n          (↑(LinearMap.comp\n                (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                  (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                    (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫\n                      (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom)))\n                (Finsupp.lsingle x))\n            1)\n          (Finsupp.lsingle y))\n      1 =\n    ↑(LinearMap.comp\n          (↑(LinearMap.comp\n                (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                  (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                    ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n                      (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom)))\n                (Finsupp.lsingle x))\n            1)\n          (Finsupp.lsingle y))\n      1\n[PROOFSTEP]\napply Finsupp.lhom_ext'\n[GOAL]\ncase H.H.h.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\nx : X\ny : Y\n⊢ ∀ (a : Z),\n    LinearMap.comp\n        (↑(LinearMap.comp\n              (↑(LinearMap.comp\n                    (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                        (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫\n                          (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom)))\n                    (Finsupp.lsingle x))\n                1)\n              (Finsupp.lsingle y))\n          1)\n        (Finsupp.lsingle a) =\n      LinearMap.comp\n        (↑(LinearMap.comp\n              (↑(LinearMap.comp\n                    (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                        ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n                          (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom)))\n                    (Finsupp.lsingle x))\n                1)\n              (Finsupp.lsingle y))\n          1)\n        (Finsupp.lsingle a)\n[PROOFSTEP]\nintro z\n[GOAL]\ncase H.H.h.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\nx : X\ny : Y\nz : Z\n⊢ LinearMap.comp\n      (↑(LinearMap.comp\n            (↑(LinearMap.comp\n                  (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                    (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                      (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫\n                        (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom)))\n                  (Finsupp.lsingle x))\n              1)\n            (Finsupp.lsingle y))\n        1)\n      (Finsupp.lsingle z) =\n    LinearMap.comp\n      (↑(LinearMap.comp\n            (↑(LinearMap.comp\n                  (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                    (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                      ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n                        (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom)))\n                  (Finsupp.lsingle x))\n              1)\n            (Finsupp.lsingle y))\n        1)\n      (Finsupp.lsingle z)\n[PROOFSTEP]\napply LinearMap.ext_ring\n[GOAL]\ncase H.H.h.h.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\nx : X\ny : Y\nz : Z\n⊢ ↑(LinearMap.comp\n          (↑(LinearMap.comp\n                (↑(LinearMap.comp\n                      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                        (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                          (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫\n                            (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom)))\n                      (Finsupp.lsingle x))\n                  1)\n                (Finsupp.lsingle y))\n            1)\n          (Finsupp.lsingle z))\n      1 =\n    ↑(LinearMap.comp\n          (↑(LinearMap.comp\n                (↑(LinearMap.comp\n                      (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                        (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                          ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n                            (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom)))\n                      (Finsupp.lsingle x))\n                  1)\n                (Finsupp.lsingle y))\n            1)\n          (Finsupp.lsingle z))\n      1\n[PROOFSTEP]\napply Finsupp.ext\n[GOAL]\ncase H.H.h.h.h.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\nx : X\ny : Y\nz : Z\n⊢ ∀ (a : X ⊗ Y ⊗ Z),\n    ↑(↑(LinearMap.comp\n                (↑(LinearMap.comp\n                      (↑(LinearMap.comp\n                            (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                              (LinearMap.compr₂\n                                (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                                (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫\n                                  (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom)))\n                            (Finsupp.lsingle x))\n                        1)\n                      (Finsupp.lsingle y))\n                  1)\n                (Finsupp.lsingle z))\n            1)\n        a =\n      ↑(↑(LinearMap.comp\n                (↑(LinearMap.comp\n                      (↑(LinearMap.comp\n                            (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                              (LinearMap.compr₂\n                                (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                                ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n                                  (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom)))\n                            (Finsupp.lsingle x))\n                        1)\n                      (Finsupp.lsingle y))\n                  1)\n                (Finsupp.lsingle z))\n            1)\n        a\n[PROOFSTEP]\nintro a\n[GOAL]\ncase H.H.h.h.h.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\nx : X\ny : Y\nz : Z\na : X ⊗ Y ⊗ Z\n⊢ ↑(↑(LinearMap.comp\n              (↑(LinearMap.comp\n                    (↑(LinearMap.comp\n                          (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                            (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                              (((μ R X Y).hom ⊗ 𝟙 ((free R).obj Z)) ≫\n                                (μ R (X ⊗ Y) Z).hom ≫ map (free R).toPrefunctor.obj (α_ X Y Z).hom)))\n                          (Finsupp.lsingle x))\n                      1)\n                    (Finsupp.lsingle y))\n                1)\n              (Finsupp.lsingle z))\n          1)\n      a =\n    ↑(↑(LinearMap.comp\n              (↑(LinearMap.comp\n                    (↑(LinearMap.comp\n                          (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X) ↑((free R).obj Y))\n                            (LinearMap.compr₂ (TensorProduct.mk R ↑((free R).obj X ⊗ (free R).obj Y) ↑((free R).obj Z))\n                              ((α_ ((free R).obj X) ((free R).obj Y) ((free R).obj Z)).hom ≫\n                                (𝟙 ((free R).obj X) ⊗ (μ R Y Z).hom) ≫ (μ R X (Y ⊗ Z)).hom)))\n                          (Finsupp.lsingle x))\n                      1)\n                    (Finsupp.lsingle y))\n                1)\n              (Finsupp.lsingle z))\n          1)\n      a\n[PROOFSTEP]\nchange\n  Finsupp.mapDomain (α_ X Y Z).hom\n      (finsuppTensorFinsupp' R (X ⊗ Y) Z\n        (finsuppTensorFinsupp' R X Y (Finsupp.single x 1 ⊗ₜ[R] Finsupp.single y 1) ⊗ₜ[R] Finsupp.single z 1))\n      a =\n    finsuppTensorFinsupp' R X (Y ⊗ Z)\n      (Finsupp.single x 1 ⊗ₜ[R] finsuppTensorFinsupp' R Y Z (Finsupp.single y 1 ⊗ₜ[R] Finsupp.single z 1)) a\n[GOAL]\ncase H.H.h.h.h.h.h.h.h\nR : Type u\ninst✝ : CommRing R\nX Y Z : Type u\nx : X\ny : Y\nz : Z\na : X ⊗ Y ⊗ Z\n⊢ ↑(Finsupp.mapDomain (α_ X Y Z).hom\n          (↑(finsuppTensorFinsupp' R (X ⊗ Y) Z)\n            (↑(finsuppTensorFinsupp' R X Y) (Finsupp.single x 1 ⊗ₜ[R] Finsupp.single y 1) ⊗ₜ[R] Finsupp.single z 1)))\n      a =\n    ↑(↑(finsuppTensorFinsupp' R X (Y ⊗ Z))\n          (Finsupp.single x 1 ⊗ₜ[R] ↑(finsuppTensorFinsupp' R Y Z) (Finsupp.single y 1 ⊗ₜ[R] Finsupp.single z 1)))\n      a\n[PROOFSTEP]\nsimp_rw [finsuppTensorFinsupp'_single_tmul_single, Finsupp.mapDomain_single, mul_one,\n  CategoryTheory.associator_hom_apply]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\n⊢ IsIso LaxMonoidal.ε\n[PROOFSTEP]\nrefine' ⟨⟨Finsupp.lapply PUnit.unit, ⟨_, _⟩⟩⟩\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝ : CommRing R\n⊢ LaxMonoidal.ε ≫ Finsupp.lapply PUnit.unit = 𝟙 (𝟙_ (ModuleCat R))\n[PROOFSTEP]\napply LinearMap.ext_ring\n[GOAL]\ncase refine'_1.h\nR : Type u\ninst✝ : CommRing R\n⊢ ↑(LaxMonoidal.ε ≫ Finsupp.lapply PUnit.unit) 1 = ↑(𝟙 (𝟙_ (ModuleCat R))) 1\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1.h\nR : Type u\ninst✝ : CommRing R\n⊢ ↑(ε R ≫ Finsupp.lapply PUnit.unit) 1 = ↑(𝟙 (𝟙_ (ModuleCat R))) 1\n[PROOFSTEP]\nerw [ModuleCat.comp_def, LinearMap.comp_apply, ε_apply, Finsupp.lapply_apply, Finsupp.single_eq_same, id_apply]\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝ : CommRing R\n⊢ Finsupp.lapply PUnit.unit ≫ LaxMonoidal.ε = 𝟙 ((free R).obj (𝟙_ (Type u)))\n[PROOFSTEP]\napply Finsupp.lhom_ext'\n[GOAL]\ncase refine'_2.h\nR : Type u\ninst✝ : CommRing R\n⊢ ∀ (a : 𝟙_ (Type u)),\n    LinearMap.comp (Finsupp.lapply PUnit.unit ≫ LaxMonoidal.ε) (Finsupp.lsingle a) =\n      LinearMap.comp (𝟙 ((free R).obj (𝟙_ (Type u)))) (Finsupp.lsingle a)\n[PROOFSTEP]\nintro ⟨⟩\n[GOAL]\ncase refine'_2.h\nR : Type u\ninst✝ : CommRing R\n⊢ LinearMap.comp (Finsupp.lapply PUnit.unit ≫ LaxMonoidal.ε) (Finsupp.lsingle PUnit.unit) =\n    LinearMap.comp (𝟙 ((free R).obj (𝟙_ (Type u)))) (Finsupp.lsingle PUnit.unit)\n[PROOFSTEP]\napply LinearMap.ext_ring\n[GOAL]\ncase refine'_2.h.h\nR : Type u\ninst✝ : CommRing R\n⊢ ↑(LinearMap.comp (Finsupp.lapply PUnit.unit ≫ LaxMonoidal.ε) (Finsupp.lsingle PUnit.unit)) 1 =\n    ↑(LinearMap.comp (𝟙 ((free R).obj (𝟙_ (Type u)))) (Finsupp.lsingle PUnit.unit)) 1\n[PROOFSTEP]\napply Finsupp.ext\n[GOAL]\ncase refine'_2.h.h.h\nR : Type u\ninst✝ : CommRing R\n⊢ ∀ (a : 𝟙_ (Type u)),\n    ↑(↑(LinearMap.comp (Finsupp.lapply PUnit.unit ≫ LaxMonoidal.ε) (Finsupp.lsingle PUnit.unit)) 1) a =\n      ↑(↑(LinearMap.comp (𝟙 ((free R).obj (𝟙_ (Type u)))) (Finsupp.lsingle PUnit.unit)) 1) a\n[PROOFSTEP]\nintro\n  ⟨⟩\n    -- Porting note: simp used to be able to close this goal\n[GOAL]\ncase refine'_2.h.h.h\nR : Type u\ninst✝ : CommRing R\n⊢ ↑(↑(LinearMap.comp (Finsupp.lapply PUnit.unit ≫ LaxMonoidal.ε) (Finsupp.lsingle PUnit.unit)) 1) PUnit.unit =\n    ↑(↑(LinearMap.comp (𝟙 ((free R).obj (𝟙_ (Type u)))) (Finsupp.lsingle PUnit.unit)) 1) PUnit.unit\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_2.h.h.h\nR : Type u\ninst✝ : CommRing R\n⊢ ↑(↑(Finsupp.lapply PUnit.unit ≫ ε R) (Finsupp.single PUnit.unit 1)) PUnit.unit =\n    ↑(↑(𝟙 (of R (𝟙_ (Type u) →₀ R))) (Finsupp.single PUnit.unit 1)) PUnit.unit\n[PROOFSTEP]\nerw [ModuleCat.comp_def, LinearMap.comp_apply, ε_apply, Finsupp.lapply_apply, Finsupp.single_eq_same]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nsrc✝ : LaxMonoidalFunctor (Type u) (ModuleCat R) := LaxMonoidalFunctor.of (free R).toPrefunctor.obj\n⊢ IsIso LaxMonoidal.ε\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nsrc✝ : LaxMonoidalFunctor (Type u) (ModuleCat R) := LaxMonoidalFunctor.of (free R).toPrefunctor.obj\nX Y : Type u\n⊢ IsIso (LaxMonoidalFunctor.μ (LaxMonoidalFunctor.mk src✝.toFunctor src✝.ε src✝.μ) X Y)\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nsrc✝ : LaxMonoidalFunctor (Type u) (ModuleCat R) := LaxMonoidalFunctor.of (free R).toPrefunctor.obj\nX Y : Type u\n⊢ IsIso (Free.μ R X Y).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : Free R C\nf : W ⟶ X\ng : X ⟶ Y\nh : Y ⟶ Z\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ndsimp\n  -- This imitates the proof of associativity for `MonoidAlgebra`.\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : Free R C\nf : W ⟶ X\ng : X ⟶ Y\nh : Y ⟶ Z\n⊢ (sum (sum f fun f' s => sum g fun g' t => single (f' ≫ g') (s * t)) fun f' s =>\n      sum h fun g' t => single (f' ≫ g') (s * t)) =\n    sum f fun f' s =>\n      sum (sum g fun f' s => sum h fun g' t => single (f' ≫ g') (s * t)) fun g' t => single (f' ≫ g') (s * t)\n[PROOFSTEP]\nsimp only [sum_sum_index, sum_single_index, single_zero, single_add, eq_self_iff_true, forall_true_iff,\n  forall₃_true_iff, add_mul, mul_add, Category.assoc, mul_assoc, zero_mul, mul_zero, sum_zero, sum_add]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf f' : X ⟶ Y\ng : Y ⟶ Z\n⊢ (f + f') ≫ g = f ≫ g + f' ≫ g\n[PROOFSTEP]\ndsimp [CategoryTheory.categoryFree]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf f' : X ⟶ Y\ng : Y ⟶ Z\n⊢ (sum (f + f') fun f' s => sum g fun g' t => single (f' ≫ g') (s * t)) =\n    (sum f fun f' s => sum g fun g' t => single (f' ≫ g') (s * t)) +\n      sum f' fun f' s => sum g fun g' t => single (f' ≫ g') (s * t)\n[PROOFSTEP]\nrw [Finsupp.sum_add_index']\n[GOAL]\ncase h_zero\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf f' : X ⟶ Y\ng : Y ⟶ Z\n⊢ ∀ (a : X ⟶ Y), (sum g fun g' t => single (a ≫ g') (0 * t)) = 0\n[PROOFSTEP]\nsimp [add_mul]\n[GOAL]\ncase h_add\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf f' : X ⟶ Y\ng : Y ⟶ Z\n⊢ ∀ (a : X ⟶ Y) (b₁ b₂ : R),\n    (sum g fun g' t => single (a ≫ g') ((b₁ + b₂) * t)) =\n      (sum g fun g' t => single (a ≫ g') (b₁ * t)) + sum g fun g' t => single (a ≫ g') (b₂ * t)\n[PROOFSTEP]\nsimp [add_mul]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\ng g' : Y ⟶ Z\n⊢ f ≫ (g + g') = f ≫ g + f ≫ g'\n[PROOFSTEP]\ndsimp [CategoryTheory.categoryFree]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\ng g' : Y ⟶ Z\n⊢ (sum f fun f' s => sum (g + g') fun g' t => single (f' ≫ g') (s * t)) =\n    (sum f fun f' s => sum g fun g' t => single (f' ≫ g') (s * t)) +\n      sum f fun f' s => sum g' fun g' t => single (f' ≫ g') (s * t)\n[PROOFSTEP]\nrw [← Finsupp.sum_add]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\ng g' : Y ⟶ Z\n⊢ (sum f fun f' s => sum (g + g') fun g' t => single (f' ≫ g') (s * t)) =\n    sum f fun a b => (sum g fun g' t => single (a ≫ g') (b * t)) + sum g' fun g' t => single (a ≫ g') (b * t)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\ng g' : Y ⟶ Z\n⊢ (fun f' s => sum (g + g') fun g' t => single (f' ≫ g') (s * t)) = fun a b =>\n    (sum g fun g' t => single (a ≫ g') (b * t)) + sum g' fun g' t => single (a ≫ g') (b * t)\n[PROOFSTEP]\next r h\n[GOAL]\ncase e_g.h.h.h\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\ng g' : Y ⟶ Z\nr : X ⟶ Y\nh : R\na✝ : X ⟶ Z\n⊢ ↑(sum (g + g') fun g' t => single (r ≫ g') (h * t)) a✝ =\n    ↑((sum g fun g' t => single (r ≫ g') (h * t)) + sum g' fun g' t => single (r ≫ g') (h * t)) a✝\n[PROOFSTEP]\nrw [Finsupp.sum_add_index']\n[GOAL]\ncase e_g.h.h.h.h_zero\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\ng g' : Y ⟶ Z\nr : X ⟶ Y\nh : R\na✝ : X ⟶ Z\n⊢ ∀ (a : Y ⟶ Z), single (r ≫ a) (h * 0) = 0\n[PROOFSTEP]\nsimp [mul_add]\n[GOAL]\ncase e_g.h.h.h.h_add\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\ng g' : Y ⟶ Z\nr : X ⟶ Y\nh : R\na✝ : X ⟶ Z\n⊢ ∀ (a : Y ⟶ Z) (b₁ b₂ : R), single (r ≫ a) (h * (b₁ + b₂)) = single (r ≫ a) (h * b₁) + single (r ≫ a) (h * b₂)\n[PROOFSTEP]\nsimp [mul_add]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nr : R\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ (r • f) ≫ g = r • f ≫ g\n[PROOFSTEP]\ndsimp [CategoryTheory.categoryFree]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nr : R\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ (sum (r • f) fun f' s => sum g fun g' t => single (f' ≫ g') (s * t)) =\n    r • sum f fun f' s => sum g fun g' t => single (f' ≫ g') (s * t)\n[PROOFSTEP]\nrw [Finsupp.sum_smul_index]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nr : R\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ (sum f fun i a => sum g fun g' t => single (i ≫ g') (r * a * t)) =\n    r • sum f fun f' s => sum g fun g' t => single (f' ≫ g') (s * t)\n[PROOFSTEP]\nsimp [Finsupp.smul_sum, mul_assoc]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nr : R\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ ∀ (i : X ⟶ Y), (sum g fun g' t => single (i ≫ g') (0 * t)) = 0\n[PROOFSTEP]\nsimp [Finsupp.smul_sum, mul_assoc]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\nr : R\ng : Y ⟶ Z\n⊢ f ≫ (r • g) = r • f ≫ g\n[PROOFSTEP]\ndsimp [CategoryTheory.categoryFree]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\nr : R\ng : Y ⟶ Z\n⊢ (sum f fun f' s => sum (r • g) fun g' t => single (f' ≫ g') (s * t)) =\n    r • sum f fun f' s => sum g fun g' t => single (f' ≫ g') (s * t)\n[PROOFSTEP]\nsimp_rw [Finsupp.smul_sum]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\nr : R\ng : Y ⟶ Z\n⊢ (sum f fun f' s => sum (r • g) fun g' t => single (f' ≫ g') (s * t)) =\n    sum f fun a b => sum g fun a_1 b_1 => r • single (a ≫ a_1) (b * b_1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_g\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\nr : R\ng : Y ⟶ Z\n⊢ (fun f' s => sum (r • g) fun g' t => single (f' ≫ g') (s * t)) = fun a b =>\n    sum g fun a_1 b_1 => r • single (a ≫ a_1) (b * b_1)\n[PROOFSTEP]\next h s\n[GOAL]\ncase e_g.h.h.h\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\nr : R\ng : Y ⟶ Z\nh : X ⟶ Y\ns : R\na✝ : X ⟶ Z\n⊢ ↑(sum (r • g) fun g' t => single (h ≫ g') (s * t)) a✝ = ↑(sum g fun a b => r • single (h ≫ a) (s * b)) a✝\n[PROOFSTEP]\nrw [Finsupp.sum_smul_index]\n[GOAL]\ncase e_g.h.h.h\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\nr : R\ng : Y ⟶ Z\nh : X ⟶ Y\ns : R\na✝ : X ⟶ Z\n⊢ ↑(sum g fun i a => single (h ≫ i) (s * (r * a))) a✝ = ↑(sum g fun a b => r • single (h ≫ a) (s * b)) a✝\n[PROOFSTEP]\nsimp [Finsupp.smul_sum, mul_left_comm]\n[GOAL]\ncase e_g.h.h.h\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Free R C\nf : X ⟶ Y\nr : R\ng : Y ⟶ Z\nh : X ⟶ Y\ns : R\na✝ : X ⟶ Z\n⊢ ∀ (i : Y ⟶ Z), single (h ≫ i) (s * 0) = 0\n[PROOFSTEP]\nsimp [Finsupp.smul_sum, mul_left_comm]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nr s : R\n⊢ single f r ≫ single g s = single (f ≫ g) (r * s)\n[PROOFSTEP]\ndsimp [CategoryTheory.categoryFree]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nr s : R\n⊢ (sum (single f r) fun f' s_1 => sum (single g s) fun g' t => single (f' ≫ g') (s_1 * t)) = single (f ≫ g) (r * s)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ { obj := fun X => X, map := fun {X Y} f => single f 1 }.map (f ≫ g) =\n    { obj := fun X => X, map := fun {X Y} f => single f 1 }.map f ≫\n      { obj := fun X => X, map := fun {X Y} f => single f 1 }.map g\n[PROOFSTEP]\ndsimp only []\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ single (f ≫ g) 1 = single f 1 ≫ single g 1\n[PROOFSTEP]\nrw [single_comp_single, one_mul]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\n⊢ ∀ (X : Free R C),\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (𝟙 X) =\n      𝟙 ({ obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.obj X)\n[PROOFSTEP]\ndsimp [CategoryTheory.categoryFree]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\n⊢ ∀ (X : Free R C), (sum (single (𝟙 X) 1) fun f' r => r • F.map f') = 𝟙 (F.obj X)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f ≫ g) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map f ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g\n[PROOFSTEP]\napply Finsupp.induction_linear f\n[GOAL]\ncase h0\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (0 ≫ g) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map 0 ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h0\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ (sum (0 ≫ g) fun f' r => r • F.map f') = 0 ≫ sum g fun f' r => r • F.map f'\n[PROOFSTEP]\nrw [Limits.zero_comp, sum_zero_index, Limits.zero_comp]\n[GOAL]\ncase hadd\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ ∀ (f g_1 : (X ⟶ Y) →₀ R),\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f ≫ g) =\n        { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map f ≫\n          { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g →\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (g_1 ≫ g) =\n          { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g_1 ≫\n            { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g →\n        { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map ((f + g_1) ≫ g) =\n          { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f + g_1) ≫\n            { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g\n[PROOFSTEP]\nintro f₁ f₂ w₁ w₂\n[GOAL]\ncase hadd\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ :\n  { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f₁ ≫ g) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map f₁ ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g\nw₂ :\n  { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f₂ ≫ g) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map f₂ ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g\n⊢ { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map ((f₁ + f₂) ≫ g) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f₁ + f₂) ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g\n[PROOFSTEP]\nrw [add_comp]\n[GOAL]\ncase hadd\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ :\n  { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f₁ ≫ g) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map f₁ ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g\nw₂ :\n  { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f₂ ≫ g) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map f₂ ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g\n⊢ { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f₁ ≫ g + f₂ ≫ g) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f₁ + f₂) ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g\n[PROOFSTEP]\ndsimp at *\n[GOAL]\ncase hadd\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ : (sum (f₁ ≫ g) fun f' r => r • F.map f') = (sum f₁ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\nw₂ : (sum (f₂ ≫ g) fun f' r => r • F.map f') = (sum f₂ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\n⊢ (sum (f₁ ≫ g + f₂ ≫ g) fun f' r => r • F.map f') =\n    (sum (f₁ + f₂) fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\n[PROOFSTEP]\nrw [Finsupp.sum_add_index', Finsupp.sum_add_index']\n[GOAL]\ncase hadd\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ : (sum (f₁ ≫ g) fun f' r => r • F.map f') = (sum f₁ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\nw₂ : (sum (f₂ ≫ g) fun f' r => r • F.map f') = (sum f₂ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\n⊢ ((sum (f₁ ≫ g) fun f' r => r • F.map f') + sum (f₂ ≫ g) fun f' r => r • F.map f') =\n    ((sum f₁ fun f' r => r • F.map f') + sum f₂ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\n[PROOFSTEP]\nsimp only [w₁, w₂, add_comp]\n[GOAL]\ncase hadd.h_zero\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ : (sum (f₁ ≫ g) fun f' r => r • F.map f') = (sum f₁ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\nw₂ : (sum (f₂ ≫ g) fun f' r => r • F.map f') = (sum f₂ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\n⊢ ∀ (a : X ⟶ Y), 0 • F.map a = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase hadd.h_zero\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ : (sum (f₁ ≫ g) fun f' r => r • F.map f') = (sum f₁ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\nw₂ : (sum (f₂ ≫ g) fun f' r => r • F.map f') = (sum f₂ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\na✝ : X ⟶ Y\n⊢ 0 • F.map a✝ = 0\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\ncase hadd.h_add\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ : (sum (f₁ ≫ g) fun f' r => r • F.map f') = (sum f₁ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\nw₂ : (sum (f₂ ≫ g) fun f' r => r • F.map f') = (sum f₂ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\n⊢ ∀ (a : X ⟶ Y) (b₁ b₂ : R), (b₁ + b₂) • F.map a = b₁ • F.map a + b₂ • F.map a\n[PROOFSTEP]\nintros\n[GOAL]\ncase hadd.h_add\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ : (sum (f₁ ≫ g) fun f' r => r • F.map f') = (sum f₁ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\nw₂ : (sum (f₂ ≫ g) fun f' r => r • F.map f') = (sum f₂ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\na✝ : X ⟶ Y\nb₁✝ b₂✝ : R\n⊢ (b₁✝ + b₂✝) • F.map a✝ = b₁✝ • F.map a✝ + b₂✝ • F.map a✝\n[PROOFSTEP]\nsimp only [add_smul]\n[GOAL]\ncase hadd.h_zero\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ : (sum (f₁ ≫ g) fun f' r => r • F.map f') = (sum f₁ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\nw₂ : (sum (f₂ ≫ g) fun f' r => r • F.map f') = (sum f₂ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\n⊢ ∀ (a : X ⟶ Z), 0 • F.map a = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase hadd.h_zero\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ : (sum (f₁ ≫ g) fun f' r => r • F.map f') = (sum f₁ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\nw₂ : (sum (f₂ ≫ g) fun f' r => r • F.map f') = (sum f₂ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\na✝ : X ⟶ Z\n⊢ 0 • F.map a✝ = 0\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\ncase hadd.h_add\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ : (sum (f₁ ≫ g) fun f' r => r • F.map f') = (sum f₁ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\nw₂ : (sum (f₂ ≫ g) fun f' r => r • F.map f') = (sum f₂ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\n⊢ ∀ (a : X ⟶ Z) (b₁ b₂ : R), (b₁ + b₂) • F.map a = b₁ • F.map a + b₂ • F.map a\n[PROOFSTEP]\nintros\n[GOAL]\ncase hadd.h_add\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ : (sum (f₁ ≫ g) fun f' r => r • F.map f') = (sum f₁ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\nw₂ : (sum (f₂ ≫ g) fun f' r => r • F.map f') = (sum f₂ fun f' r => r • F.map f') ≫ sum g fun f' r => r • F.map f'\na✝ : X ⟶ Z\nb₁✝ b₂✝ : R\n⊢ (b₁✝ + b₂✝) • F.map a✝ = b₁✝ • F.map a✝ + b₂✝ • F.map a✝\n[PROOFSTEP]\nsimp only [add_smul]\n[GOAL]\ncase hsingle\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ ∀ (a : X ⟶ Y) (b : R),\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single a b ≫ g) =\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single a b) ≫\n        { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g\n[PROOFSTEP]\nintro f' r\n[GOAL]\ncase hsingle\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\n⊢ { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r ≫ g) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g\n[PROOFSTEP]\napply Finsupp.induction_linear g\n[GOAL]\ncase hsingle.h0\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\n⊢ { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r ≫ 0) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map 0\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase hsingle.h0\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\n⊢ (sum (single f' r ≫ 0) fun f' r => r • F.map f') = (sum (single f' r) fun f' r => r • F.map f') ≫ 0\n[PROOFSTEP]\nrw [Limits.comp_zero, sum_zero_index, Limits.comp_zero]\n[GOAL]\ncase hsingle.hadd\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\n⊢ ∀ (f g : (Y ⟶ Z) →₀ R),\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r ≫ f) =\n        { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n          { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map f →\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r ≫ g) =\n          { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n            { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map g →\n        { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r ≫ (f + g)) =\n          { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n            { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f + g)\n[PROOFSTEP]\nintro f₁ f₂ w₁ w₂\n[GOAL]\ncase hsingle.hadd\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\nf₁ f₂ : (Y ⟶ Z) →₀ R\nw₁ :\n  { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r ≫ f₁) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map f₁\nw₂ :\n  { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r ≫ f₂) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map f₂\n⊢ { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r ≫ (f₁ + f₂)) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f₁ + f₂)\n[PROOFSTEP]\nrw [comp_add]\n[GOAL]\ncase hsingle.hadd\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\nf₁ f₂ : (Y ⟶ Z) →₀ R\nw₁ :\n  { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r ≫ f₁) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map f₁\nw₂ :\n  { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r ≫ f₂) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map f₂\n⊢ { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map\n      (single f' r ≫ f₁ + single f' r ≫ f₂) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (f₁ + f₂)\n[PROOFSTEP]\ndsimp at *\n[GOAL]\ncase hsingle.hadd\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\nf₁ f₂ : (Y ⟶ Z) →₀ R\nw₁ :\n  (sum (single f' r ≫ f₁) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₁ fun f' r => r • F.map f'\nw₂ :\n  (sum (single f' r ≫ f₂) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₂ fun f' r => r • F.map f'\n⊢ (sum (single f' r ≫ f₁ + single f' r ≫ f₂) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum (f₁ + f₂) fun f' r => r • F.map f'\n[PROOFSTEP]\nrw [Finsupp.sum_add_index', Finsupp.sum_add_index']\n[GOAL]\ncase hsingle.hadd\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\nf₁ f₂ : (Y ⟶ Z) →₀ R\nw₁ :\n  (sum (single f' r ≫ f₁) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₁ fun f' r => r • F.map f'\nw₂ :\n  (sum (single f' r ≫ f₂) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₂ fun f' r => r • F.map f'\n⊢ ((sum (single f' r ≫ f₁) fun f' r => r • F.map f') + sum (single f' r ≫ f₂) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ ((sum f₁ fun f' r => r • F.map f') + sum f₂ fun f' r => r • F.map f')\n[PROOFSTEP]\nsimp only [w₁, w₂, comp_add]\n[GOAL]\ncase hsingle.hadd.h_zero\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\nf₁ f₂ : (Y ⟶ Z) →₀ R\nw₁ :\n  (sum (single f' r ≫ f₁) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₁ fun f' r => r • F.map f'\nw₂ :\n  (sum (single f' r ≫ f₂) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₂ fun f' r => r • F.map f'\n⊢ ∀ (a : Y ⟶ Z), 0 • F.map a = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase hsingle.hadd.h_zero\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\nf₁ f₂ : (Y ⟶ Z) →₀ R\nw₁ :\n  (sum (single f' r ≫ f₁) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₁ fun f' r => r • F.map f'\nw₂ :\n  (sum (single f' r ≫ f₂) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₂ fun f' r => r • F.map f'\na✝ : Y ⟶ Z\n⊢ 0 • F.map a✝ = 0\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\ncase hsingle.hadd.h_add\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\nf₁ f₂ : (Y ⟶ Z) →₀ R\nw₁ :\n  (sum (single f' r ≫ f₁) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₁ fun f' r => r • F.map f'\nw₂ :\n  (sum (single f' r ≫ f₂) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₂ fun f' r => r • F.map f'\n⊢ ∀ (a : Y ⟶ Z) (b₁ b₂ : R), (b₁ + b₂) • F.map a = b₁ • F.map a + b₂ • F.map a\n[PROOFSTEP]\nintros\n[GOAL]\ncase hsingle.hadd.h_add\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\nf₁ f₂ : (Y ⟶ Z) →₀ R\nw₁ :\n  (sum (single f' r ≫ f₁) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₁ fun f' r => r • F.map f'\nw₂ :\n  (sum (single f' r ≫ f₂) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₂ fun f' r => r • F.map f'\na✝ : Y ⟶ Z\nb₁✝ b₂✝ : R\n⊢ (b₁✝ + b₂✝) • F.map a✝ = b₁✝ • F.map a✝ + b₂✝ • F.map a✝\n[PROOFSTEP]\nsimp only [add_smul]\n[GOAL]\ncase hsingle.hadd.h_zero\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\nf₁ f₂ : (Y ⟶ Z) →₀ R\nw₁ :\n  (sum (single f' r ≫ f₁) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₁ fun f' r => r • F.map f'\nw₂ :\n  (sum (single f' r ≫ f₂) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₂ fun f' r => r • F.map f'\n⊢ ∀ (a : X ⟶ Z), 0 • F.map a = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase hsingle.hadd.h_zero\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\nf₁ f₂ : (Y ⟶ Z) →₀ R\nw₁ :\n  (sum (single f' r ≫ f₁) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₁ fun f' r => r • F.map f'\nw₂ :\n  (sum (single f' r ≫ f₂) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₂ fun f' r => r • F.map f'\na✝ : X ⟶ Z\n⊢ 0 • F.map a✝ = 0\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\ncase hsingle.hadd.h_add\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\nf₁ f₂ : (Y ⟶ Z) →₀ R\nw₁ :\n  (sum (single f' r ≫ f₁) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₁ fun f' r => r • F.map f'\nw₂ :\n  (sum (single f' r ≫ f₂) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₂ fun f' r => r • F.map f'\n⊢ ∀ (a : X ⟶ Z) (b₁ b₂ : R), (b₁ + b₂) • F.map a = b₁ • F.map a + b₂ • F.map a\n[PROOFSTEP]\nintros\n[GOAL]\ncase hsingle.hadd.h_add\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\nf₁ f₂ : (Y ⟶ Z) →₀ R\nw₁ :\n  (sum (single f' r ≫ f₁) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₁ fun f' r => r • F.map f'\nw₂ :\n  (sum (single f' r ≫ f₂) fun f' r => r • F.map f') =\n    (sum (single f' r) fun f' r => r • F.map f') ≫ sum f₂ fun f' r => r • F.map f'\na✝ : X ⟶ Z\nb₁✝ b₂✝ : R\n⊢ (b₁✝ + b₂✝) • F.map a✝ = b₁✝ • F.map a✝ + b₂✝ • F.map a✝\n[PROOFSTEP]\nsimp only [add_smul]\n[GOAL]\ncase hsingle.hsingle\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\n⊢ ∀ (a : Y ⟶ Z) (b : R),\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r ≫ single a b) =\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n        { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single a b)\n[PROOFSTEP]\nintro g' s\n[GOAL]\ncase hsingle.hsingle\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\ng' : Y ⟶ Z\ns : R\n⊢ { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r ≫ single g' s) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single g' s)\n[PROOFSTEP]\nrw [single_comp_single _ _ f' g' r s]\n[GOAL]\ncase hsingle.hsingle\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y Z : Free R C\nf : X ⟶ Y\ng : Y ⟶ Z\nf' : X ⟶ Y\nr : R\ng' : Y ⟶ Z\ns : R\n⊢ { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single (f' ≫ g') (r * s)) =\n    { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single f' r) ≫\n      { obj := fun X => F.obj X, map := fun {X Y} f => sum f fun f' r => r • F.map f' }.map (single g' s)\n[PROOFSTEP]\nsimp [mul_comm r s, mul_smul]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\nr : R\n⊢ (lift R F).map (single f r) = r • F.map f\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y : Free R C\nf g : X ⟶ Y\n⊢ (lift R F).map (f + g) = (lift R F).map f + (lift R F).map g\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y : Free R C\nf g : X ⟶ Y\n⊢ (sum (f + g) fun f' r => r • F.map f') = (sum f fun f' r => r • F.map f') + sum g fun f' r => r • F.map f'\n[PROOFSTEP]\nrw [Finsupp.sum_add_index']\n[GOAL]\ncase h_zero\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y : Free R C\nf g : X ⟶ Y\n⊢ ∀ (a : X ⟶ Y), 0 • F.map a = 0\n[PROOFSTEP]\nsimp [add_smul]\n[GOAL]\ncase h_add\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y : Free R C\nf g : X ⟶ Y\n⊢ ∀ (a : X ⟶ Y) (b₁ b₂ : R), (b₁ + b₂) • F.map a = b₁ • F.map a + b₂ • F.map a\n[PROOFSTEP]\nsimp [add_smul]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y : Free R C\nf : X ⟶ Y\nr : R\n⊢ (lift R F).map (r • f) = r • (lift R F).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y : Free R C\nf : X ⟶ Y\nr : R\n⊢ (sum (r • f) fun f' r => r • F.map f') = r • sum f fun f' r => r • F.map f'\n[PROOFSTEP]\nrw [Finsupp.sum_smul_index]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y : Free R C\nf : X ⟶ Y\nr : R\n⊢ (sum f fun i a => (r * a) • F.map i) = r • sum f fun f' r => r • F.map f'\n[PROOFSTEP]\nsimp [Finsupp.smul_sum, mul_smul]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u\ninst✝² : Category.{v, u} D\ninst✝¹ : Preadditive D\ninst✝ : Linear R D\nF : C ⥤ D\nX Y : Free R C\nf : X ⟶ Y\nr : R\n⊢ ∀ (i : X ⟶ Y), 0 • F.map i = 0\n[PROOFSTEP]\nsimp [Finsupp.smul_sum, mul_smul]\n[GOAL]\nR : Type u_1\ninst✝⁸ : CommRing R\nC : Type u\ninst✝⁷ : Category.{v, u} C\nD : Type u\ninst✝⁶ : Category.{v, u} D\ninst✝⁵ : Preadditive D\ninst✝⁴ : Linear R D\nF G : Free R C ⥤ D\ninst✝³ : Functor.Additive F\ninst✝² : Functor.Linear R F\ninst✝¹ : Functor.Additive G\ninst✝ : Functor.Linear R G\nα : embedding R C ⋙ F ≅ embedding R C ⋙ G\n⊢ ∀ {X Y : Free R C} (f : X ⟶ Y), F.map f ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map f\n[PROOFSTEP]\nintro X Y f\n[GOAL]\nR : Type u_1\ninst✝⁸ : CommRing R\nC : Type u\ninst✝⁷ : Category.{v, u} C\nD : Type u\ninst✝⁶ : Category.{v, u} D\ninst✝⁵ : Preadditive D\ninst✝⁴ : Linear R D\nF G : Free R C ⥤ D\ninst✝³ : Functor.Additive F\ninst✝² : Functor.Linear R F\ninst✝¹ : Functor.Additive G\ninst✝ : Functor.Linear R G\nα : embedding R C ⋙ F ≅ embedding R C ⋙ G\nX Y : Free R C\nf : X ⟶ Y\n⊢ F.map f ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map f\n[PROOFSTEP]\napply Finsupp.induction_linear f\n[GOAL]\ncase h0\nR : Type u_1\ninst✝⁸ : CommRing R\nC : Type u\ninst✝⁷ : Category.{v, u} C\nD : Type u\ninst✝⁶ : Category.{v, u} D\ninst✝⁵ : Preadditive D\ninst✝⁴ : Linear R D\nF G : Free R C ⥤ D\ninst✝³ : Functor.Additive F\ninst✝² : Functor.Linear R F\ninst✝¹ : Functor.Additive G\ninst✝ : Functor.Linear R G\nα : embedding R C ⋙ F ≅ embedding R C ⋙ G\nX Y : Free R C\nf : X ⟶ Y\n⊢ F.map 0 ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map 0\n[PROOFSTEP]\nrw [Functor.map_zero, Limits.zero_comp, Functor.map_zero, Limits.comp_zero]\n[GOAL]\ncase hadd\nR : Type u_1\ninst✝⁸ : CommRing R\nC : Type u\ninst✝⁷ : Category.{v, u} C\nD : Type u\ninst✝⁶ : Category.{v, u} D\ninst✝⁵ : Preadditive D\ninst✝⁴ : Linear R D\nF G : Free R C ⥤ D\ninst✝³ : Functor.Additive F\ninst✝² : Functor.Linear R F\ninst✝¹ : Functor.Additive G\ninst✝ : Functor.Linear R G\nα : embedding R C ⋙ F ≅ embedding R C ⋙ G\nX Y : Free R C\nf : X ⟶ Y\n⊢ ∀ (f g : (X ⟶ Y) →₀ R),\n    F.map f ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map f →\n      F.map g ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map g →\n        F.map (f + g) ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map (f + g)\n[PROOFSTEP]\nintro f₁ f₂ w₁ w₂\n[GOAL]\ncase hadd\nR : Type u_1\ninst✝⁸ : CommRing R\nC : Type u\ninst✝⁷ : Category.{v, u} C\nD : Type u\ninst✝⁶ : Category.{v, u} D\ninst✝⁵ : Preadditive D\ninst✝⁴ : Linear R D\nF G : Free R C ⥤ D\ninst✝³ : Functor.Additive F\ninst✝² : Functor.Linear R F\ninst✝¹ : Functor.Additive G\ninst✝ : Functor.Linear R G\nα : embedding R C ⋙ F ≅ embedding R C ⋙ G\nX Y : Free R C\nf : X ⟶ Y\nf₁ f₂ : (X ⟶ Y) →₀ R\nw₁ : F.map f₁ ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map f₁\nw₂ : F.map f₂ ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map f₂\n⊢ F.map (f₁ + f₂) ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map (f₁ + f₂)\n[PROOFSTEP]\nrw [Functor.map_add, add_comp, w₁, w₂, Functor.map_add, comp_add]\n[GOAL]\ncase hsingle\nR : Type u_1\ninst✝⁸ : CommRing R\nC : Type u\ninst✝⁷ : Category.{v, u} C\nD : Type u\ninst✝⁶ : Category.{v, u} D\ninst✝⁵ : Preadditive D\ninst✝⁴ : Linear R D\nF G : Free R C ⥤ D\ninst✝³ : Functor.Additive F\ninst✝² : Functor.Linear R F\ninst✝¹ : Functor.Additive G\ninst✝ : Functor.Linear R G\nα : embedding R C ⋙ F ≅ embedding R C ⋙ G\nX Y : Free R C\nf : X ⟶ Y\n⊢ ∀ (a : X ⟶ Y) (b : R),\n    F.map (single a b) ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map (single a b)\n[PROOFSTEP]\nintro f' r\n[GOAL]\ncase hsingle\nR : Type u_1\ninst✝⁸ : CommRing R\nC : Type u\ninst✝⁷ : Category.{v, u} C\nD : Type u\ninst✝⁶ : Category.{v, u} D\ninst✝⁵ : Preadditive D\ninst✝⁴ : Linear R D\nF G : Free R C ⥤ D\ninst✝³ : Functor.Additive F\ninst✝² : Functor.Linear R F\ninst✝¹ : Functor.Additive G\ninst✝ : Functor.Linear R G\nα : embedding R C ⋙ F ≅ embedding R C ⋙ G\nX Y : Free R C\nf : X ⟶ Y\nf' : X ⟶ Y\nr : R\n⊢ F.map (single f' r) ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map (single f' r)\n[PROOFSTEP]\nrw [Iso.app_hom, Iso.app_hom, ← smul_single_one, F.map_smul, G.map_smul, smul_comp, comp_smul]\n[GOAL]\ncase hsingle\nR : Type u_1\ninst✝⁸ : CommRing R\nC : Type u\ninst✝⁷ : Category.{v, u} C\nD : Type u\ninst✝⁶ : Category.{v, u} D\ninst✝⁵ : Preadditive D\ninst✝⁴ : Linear R D\nF G : Free R C ⥤ D\ninst✝³ : Functor.Additive F\ninst✝² : Functor.Linear R F\ninst✝¹ : Functor.Additive G\ninst✝ : Functor.Linear R G\nα : embedding R C ⋙ F ≅ embedding R C ⋙ G\nX Y : Free R C\nf : X ⟶ Y\nf' : X ⟶ Y\nr : R\n⊢ r • F.map (single f' 1) ≫ NatTrans.app α.hom Y = r • NatTrans.app α.hom X ≫ G.map (single f' 1)\n[PROOFSTEP]\nchange r • (embedding R C ⋙ F).map f' ≫ _ = r • _ ≫ (embedding R C ⋙ G).map f'\n[GOAL]\ncase hsingle\nR : Type u_1\ninst✝⁸ : CommRing R\nC : Type u\ninst✝⁷ : Category.{v, u} C\nD : Type u\ninst✝⁶ : Category.{v, u} D\ninst✝⁵ : Preadditive D\ninst✝⁴ : Linear R D\nF G : Free R C ⥤ D\ninst✝³ : Functor.Additive F\ninst✝² : Functor.Linear R F\ninst✝¹ : Functor.Additive G\ninst✝ : Functor.Linear R G\nα : embedding R C ⋙ F ≅ embedding R C ⋙ G\nX Y : Free R C\nf : X ⟶ Y\nf' : X ⟶ Y\nr : R\n⊢ r • (embedding R C ⋙ F).map f' ≫ NatTrans.app α.hom Y = r • NatTrans.app α.hom X ≫ (embedding R C ⋙ G).map f'\n[PROOFSTEP]\nrw [α.hom.naturality f']\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.ModuleCat.Adjunctions", "llama_tokens": 38114, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6825737214979746, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.37583011857758464}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasBinaryProducts C\nX✝ Y✝ : Coalgebra (prodComonad X)\nf : X✝ ⟶ Y✝\n⊢ f.f ≫ ((fun A => Over.mk (A.a ≫ prod.fst)) Y✝).hom = ((fun A => Over.mk (A.a ≫ prod.fst)) X✝).hom\n[PROOFSTEP]\nrw [Over.mk_hom, ← f.h_assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasBinaryProducts C\nX✝ Y✝ : Coalgebra (prodComonad X)\nf : X✝ ⟶ Y✝\n⊢ X✝.a ≫ (prodComonad X).toFunctor.map f.f ≫ prod.fst = ((fun A => Over.mk (A.a ≫ prod.fst)) X✝).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasBinaryProducts C\nX✝ Y✝ : Coalgebra (prodComonad X)\nf : X✝ ⟶ Y✝\n⊢ X✝.a ≫ prod.map (𝟙 X) f.f ≫ prod.fst = X✝.a ≫ prod.fst\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasBinaryProducts C\nA : Coalgebra (prodComonad X)\n⊢ (((𝟭 (Coalgebra (prodComonad X))).obj A).a ≫\n        (prodComonad X).toFunctor.map (Iso.refl ((𝟭 (Coalgebra (prodComonad X))).obj A).A).hom) ≫\n      prod.fst =\n    ((Iso.refl ((𝟭 (Coalgebra (prodComonad X))).obj A).A).hom ≫ ((coalgebraToOver X ⋙ overToCoalgebra X).obj A).a) ≫\n      prod.fst\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasBinaryProducts C\nA : Coalgebra (prodComonad X)\n⊢ (((𝟭 (Coalgebra (prodComonad X))).obj A).a ≫\n        (prodComonad X).toFunctor.map (Iso.refl ((𝟭 (Coalgebra (prodComonad X))).obj A).A).hom) ≫\n      prod.snd =\n    ((Iso.refl ((𝟭 (Coalgebra (prodComonad X))).obj A).A).hom ≫ ((coalgebraToOver X ⋙ overToCoalgebra X).obj A).a) ≫\n      prod.snd\n[PROOFSTEP]\nsimpa using A.counit\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasBinaryCoproducts C\nX✝ Y✝ : Algebra (coprodMonad X)\nf : X✝ ⟶ Y✝\n⊢ ((fun A => Under.mk (coprod.inl ≫ A.a)) X✝).hom ≫ f.f = ((fun A => Under.mk (coprod.inl ≫ A.a)) Y✝).hom\n[PROOFSTEP]\nrw [Under.mk_hom, Category.assoc, ← f.h]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasBinaryCoproducts C\nX✝ Y✝ : Algebra (coprodMonad X)\nf : X✝ ⟶ Y✝\n⊢ coprod.inl ≫ (coprodMonad X).toFunctor.map f.f ≫ Y✝.a = ((fun A => Under.mk (coprod.inl ≫ A.a)) Y✝).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasBinaryCoproducts C\nX✝ Y✝ : Algebra (coprodMonad X)\nf : X✝ ⟶ Y✝\n⊢ coprod.inl ≫ coprod.map (𝟙 X) f.f ≫ Y✝.a = coprod.inl ≫ Y✝.a\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasBinaryCoproducts C\nA : Algebra (coprodMonad X)\n⊢ coprod.inl ≫\n      (coprodMonad X).toFunctor.map (Iso.refl ((𝟭 (Algebra (coprodMonad X))).obj A).A).hom ≫\n        ((algebraToUnder X ⋙ underToAlgebra X).obj A).a =\n    coprod.inl ≫ ((𝟭 (Algebra (coprodMonad X))).obj A).a ≫ (Iso.refl ((𝟭 (Algebra (coprodMonad X))).obj A).A).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasBinaryCoproducts C\nA : Algebra (coprodMonad X)\n⊢ coprod.inr ≫\n      (coprodMonad X).toFunctor.map (Iso.refl ((𝟭 (Algebra (coprodMonad X))).obj A).A).hom ≫\n        ((algebraToUnder X ⋙ underToAlgebra X).obj A).a =\n    coprod.inr ≫ ((𝟭 (Algebra (coprodMonad X))).obj A).a ≫ (Iso.refl ((𝟭 (Algebra (coprodMonad X))).obj A).A).hom\n[PROOFSTEP]\nsimpa using A.unit.symm\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monad.Products", "llama_tokens": 1643, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7634837743174788, "lm_q2_score": 0.49218813572079556, "lm_q1q2_score": 0.3757776555343965}}
{"text": "[GOAL]\nn✝ n : ℕ\n⊢ boddDiv2 n = (bodd n, div2 n)\n[PROOFSTEP]\nunfold bodd div2\n[GOAL]\nn✝ n : ℕ\n⊢ boddDiv2 n = ((boddDiv2 n).fst, (boddDiv2 n).snd)\n[PROOFSTEP]\ncases boddDiv2 n\n[GOAL]\ncase mk\nn✝ n : ℕ\nfst✝ : Bool\nsnd✝ : ℕ\n⊢ (fst✝, snd✝) = ((fst✝, snd✝).fst, (fst✝, snd✝).snd)\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ m n : ℕ\nh : m = n\n⊢ bit0 m = bit0 n\n[PROOFSTEP]\nsubst h\n[GOAL]\nn m : ℕ\n⊢ bit0 m = bit0 m\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ m n : ℕ\nh : m = n\n⊢ bit1 m = bit1 n\n[PROOFSTEP]\nsubst h\n[GOAL]\nn m : ℕ\n⊢ bit1 m = bit1 m\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ n : ℕ\nh : n = 0\n⊢ bit1 n = 1\n[PROOFSTEP]\nsubst h\n[GOAL]\nn : ℕ\n⊢ bit1 0 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ n : ℕ\nh : n = 0\n⊢ 1 = bit1 n\n[PROOFSTEP]\nsubst h\n[GOAL]\nn : ℕ\n⊢ 1 = bit1 0\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ : ℕ\nb : Bool\nn : ℕ\nh : n ≠ 0\n⊢ bit b n ≠ 0\n[PROOFSTEP]\ncases b <;> [exact Nat.bit0_ne_zero h; exact Nat.bit1_ne_zero _]\n[GOAL]\nn✝ : ℕ\nb : Bool\nn : ℕ\nh : n ≠ 0\n⊢ bit b n ≠ 0\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nn✝ n : ℕ\nh : n ≠ 0\n⊢ bit false n ≠ 0\n[PROOFSTEP]\nexact Nat.bit0_ne_zero h\n[GOAL]\ncase true\nn✝ n : ℕ\nh : n ≠ 0\n⊢ bit true n ≠ 0\n[PROOFSTEP]\nexact Nat.bit1_ne_zero _\n[GOAL]\nn : ℕ\n⊢ bit0 n % 2 = 0\n[PROOFSTEP]\nrw [Nat.mod_two_of_bodd]\n[GOAL]\nn : ℕ\n⊢ (bif bodd (bit0 n) then 1 else 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ bit1 n % 2 = 1\n[PROOFSTEP]\nrw [Nat.mod_two_of_bodd]\n[GOAL]\nn : ℕ\n⊢ (bif bodd (bit1 n) then 1 else 0) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nn✝ n : ℕ\nh : 0 < bit0 n\n⊢ 0 < n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nn : ℕ\nh : 0 < bit0 zero\n⊢ 0 < zero\n[PROOFSTEP]\ncases h\n[GOAL]\ncase succ\nn n✝ : ℕ\nh : 0 < bit0 (succ n✝)\n⊢ 0 < succ n✝\n[PROOFSTEP]\napply succ_pos\n[GOAL]\nn✝ : ℕ\nC : ℕ → Sort u\nH : (b : Bool) → (n : ℕ) → C (bit b n)\nb : Bool\nn : ℕ\n⊢ HEq (H (bodd (bit b n)) (div2 (bit b n))) (H b n)\n[PROOFSTEP]\nrw [bodd_bit, div2_bit]\n[GOAL]\nn : ℕ\nC : ℕ → Sort u\n⊢ Function.Injective fun H n => bitCasesOn n H\n[PROOFSTEP]\nintro H₁ H₂ h\n[GOAL]\nn : ℕ\nC : ℕ → Sort u\nH₁ H₂ : (b : Bool) → (n : ℕ) → C (bit b n)\nh : (fun H n => bitCasesOn n H) H₁ = (fun H n => bitCasesOn n H) H₂\n⊢ H₁ = H₂\n[PROOFSTEP]\next b n\n[GOAL]\ncase h.h\nn✝ : ℕ\nC : ℕ → Sort u\nH₁ H₂ : (b : Bool) → (n : ℕ) → C (bit b n)\nh : (fun H n => bitCasesOn n H) H₁ = (fun H n => bitCasesOn n H) H₂\nb : Bool\nn : ℕ\n⊢ H₁ b n = H₂ b n\n[PROOFSTEP]\nsimpa only [bitCasesOn_bit] using congr_fun h (bit b n)\n[GOAL]\nn✝ n : ℕ\nh : n = 0\n⊢ bit0 n = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nn✝ n : ℕ\nb : Bool\n⊢ bit b n = 0 ↔ n = 0 ∧ b = false\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn✝ n : ℕ\nb : Bool\n⊢ bit b n = 0 → n = 0 ∧ b = false\n[PROOFSTEP]\ncases b\n[GOAL]\ncase mp.false\nn✝ n : ℕ\n⊢ bit false n = 0 → n = 0 ∧ false = false\n[PROOFSTEP]\nsimp [Nat.bit, Nat.bit0_eq_zero, Nat.bit1_ne_zero]\n[GOAL]\ncase mp.true\nn✝ n : ℕ\n⊢ bit true n = 0 → n = 0 ∧ true = false\n[PROOFSTEP]\nsimp [Nat.bit, Nat.bit0_eq_zero, Nat.bit1_ne_zero]\n[GOAL]\ncase mpr\nn✝ n : ℕ\nb : Bool\n⊢ n = 0 ∧ b = false → bit b n = 0\n[PROOFSTEP]\nrintro ⟨rfl, rfl⟩\n[GOAL]\ncase mpr.intro\nn : ℕ\n⊢ bit false 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nb : Bool\nn : ℕ\nh : f false 0 z = z ∨ (n = 0 → b = true)\n⊢ binaryRec z f (bit b n) = f b n (binaryRec z f n)\n[PROOFSTEP]\nrw [binaryRec]\n[GOAL]\nn✝ : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nb : Bool\nn : ℕ\nh : f false 0 z = z ∨ (n = 0 → b = true)\n⊢ (if n0 : bit b n = 0 then Eq.mpr (_ : C (bit b n) = C 0) z\n    else\n      let n' := div2 (bit b n);\n      let_fun _x := (_ : bit (bodd (bit b n)) (div2 (bit b n)) = bit b n);\n      Eq.mpr (_ : C (bit b n) = C (bit (bodd (bit b n)) n')) (f (bodd (bit b n)) n' (binaryRec z f n'))) =\n    f b n (binaryRec z f n)\n[PROOFSTEP]\nsplit_ifs with h'\n[GOAL]\ncase pos\nn✝ : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nb : Bool\nn : ℕ\nh : f false 0 z = z ∨ (n = 0 → b = true)\nh' : bit b n = 0\n⊢ Eq.mpr (_ : C (bit b n) = C 0) z = f b n (binaryRec z f n)\n[PROOFSTEP]\nrcases bit_eq_zero_iff.mp h' with ⟨rfl, rfl⟩\n[GOAL]\ncase pos.intro\nn : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh : f false 0 z = z ∨ (0 = 0 → false = true)\nh' : bit false 0 = 0\n⊢ Eq.mpr (_ : C (bit false 0) = C 0) z = f false 0 (binaryRec z f 0)\n[PROOFSTEP]\nrw [binaryRec_zero]\n[GOAL]\ncase pos.intro\nn : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh : f false 0 z = z ∨ (0 = 0 → false = true)\nh' : bit false 0 = 0\n⊢ Eq.mpr (_ : C (bit false 0) = C 0) z = f false 0 z\n[PROOFSTEP]\nsimp only [imp_false, or_false_iff, eq_self_iff_true, not_true] at h \n[GOAL]\ncase pos.intro\nn : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nh' : bit false 0 = 0\nh : f false 0 z = z\n⊢ Eq.mpr (_ : C (bit false 0) = C 0) z = f false 0 z\n[PROOFSTEP]\nexact h.symm\n[GOAL]\ncase neg\nn✝ : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nb : Bool\nn : ℕ\nh : f false 0 z = z ∨ (n = 0 → b = true)\nh' : ¬bit b n = 0\n⊢ (let n' := div2 (bit b n);\n    let_fun _x := (_ : bit (bodd (bit b n)) (div2 (bit b n)) = bit b n);\n    Eq.mpr (_ : C (bit b n) = C (bit (bodd (bit b n)) n')) (f (bodd (bit b n)) n' (binaryRec z f n'))) =\n    f b n (binaryRec z f n)\n[PROOFSTEP]\ndsimp only []\n  -- Porting note: this line was `generalize_proofs e`:\n[GOAL]\ncase neg\nn✝ : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nb : Bool\nn : ℕ\nh : f false 0 z = z ∨ (n = 0 → b = true)\nh' : ¬bit b n = 0\n⊢ Eq.mpr (_ : C (bit b n) = C (bit (bodd (bit b n)) (div2 (bit b n))))\n      (f (bodd (bit b n)) (div2 (bit b n)) (binaryRec z f (div2 (bit b n)))) =\n    f b n (binaryRec z f n)\n[PROOFSTEP]\ngeneralize\n  @id (C (bit b n) = C (bit (bodd (bit b n)) (div2 (bit b n))))\n    (Eq.symm (bit_decomp (bit b n)) ▸ Eq.refl (C (bit b n))) =\n  e\n[GOAL]\ncase neg\nn✝ : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nb : Bool\nn : ℕ\nh : f false 0 z = z ∨ (n = 0 → b = true)\nh' : ¬bit b n = 0\ne : C (bit b n) = C (bit (bodd (bit b n)) (div2 (bit b n)))\n⊢ Eq.mpr e (f (bodd (bit b n)) (div2 (bit b n)) (binaryRec z f (div2 (bit b n)))) = f b n (binaryRec z f n)\n[PROOFSTEP]\nrevert e\n[GOAL]\ncase neg\nn✝ : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nb : Bool\nn : ℕ\nh : f false 0 z = z ∨ (n = 0 → b = true)\nh' : ¬bit b n = 0\n⊢ ∀ (e : C (bit b n) = C (bit (bodd (bit b n)) (div2 (bit b n)))),\n    Eq.mpr e (f (bodd (bit b n)) (div2 (bit b n)) (binaryRec z f (div2 (bit b n)))) = f b n (binaryRec z f n)\n[PROOFSTEP]\nrw [bodd_bit, div2_bit]\n[GOAL]\ncase neg\nn✝ : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nb : Bool\nn : ℕ\nh : f false 0 z = z ∨ (n = 0 → b = true)\nh' : ¬bit b n = 0\n⊢ ∀ (e : C (bit b n) = C (bit b n)), Eq.mpr e (f b n (binaryRec z f n)) = f b n (binaryRec z f n)\n[PROOFSTEP]\nintros\n[GOAL]\ncase neg\nn✝ : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → C n → C (bit b n)\nb : Bool\nn : ℕ\nh : f false 0 z = z ∨ (n = 0 → b = true)\nh' : ¬bit b n = 0\ne✝ : C (bit b n) = C (bit b n)\n⊢ Eq.mpr e✝ (f b n (binaryRec z f n)) = f b n (binaryRec z f n)\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → (n = 0 → b = true) → C n → C (bit b n)\nb : Bool\nn : ℕ\nih : C n\nh : ¬(n = 0 → b = true)\n⊢ C (bit b n)\n[PROOFSTEP]\nconvert z\n[GOAL]\ncase h.e'_1\nn✝ : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → (n = 0 → b = true) → C n → C (bit b n)\nb : Bool\nn : ℕ\nih : C n\nh : ¬(n = 0 → b = true)\n⊢ bit b n = 0\n[PROOFSTEP]\nrw [bit_eq_zero_iff]\n[GOAL]\ncase h.e'_1\nn✝ : ℕ\nC : ℕ → Sort u_1\nz : C 0\nf : (b : Bool) → (n : ℕ) → (n = 0 → b = true) → C n → C (bit b n)\nb : Bool\nn : ℕ\nih : C n\nh : ¬(n = 0 → b = true)\n⊢ n = 0 ∧ b = false\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nn✝ : ℕ\nC : ℕ → Sort u_1\nz₀ : C 0\nz₁ : C 1\nf : (b : Bool) → (n : ℕ) → n ≠ 0 → C n → C (bit b n)\nb : Bool\nn : ℕ\nh : n = 0 → b = true\nih : C n\nh' : n = 0\n⊢ C (bit b n)\n[PROOFSTEP]\nrw [h', h h']\n[GOAL]\nn✝ : ℕ\nC : ℕ → Sort u_1\nz₀ : C 0\nz₁ : C 1\nf : (b : Bool) → (n : ℕ) → n ≠ 0 → C n → C (bit b n)\nb : Bool\nn : ℕ\nh : n = 0 → b = true\nih : C n\nh' : n = 0\n⊢ C (bit true 0)\n[PROOFSTEP]\nexact z₁\n[GOAL]\nn : ℕ\n⊢ bits 0 = []\n[PROOFSTEP]\nsimp [Nat.bits]\n[GOAL]\nn✝ n : ℕ\nb : Bool\nhn : n = 0 → b = true\n⊢ bits (bit b n) = b :: bits n\n[PROOFSTEP]\nrw [Nat.bits, binaryRec_eq']\n[GOAL]\ncase h\nn✝ n : ℕ\nb : Bool\nhn : n = 0 → b = true\n⊢ [false] = [] ∨ (n = 0 → b = true)\n[PROOFSTEP]\nsimpa\n[GOAL]\nn : ℕ\n⊢ bits 1 = [true]\n[PROOFSTEP]\nconvert bit1_bits 0\n[GOAL]\nn✝ n : ℕ\n⊢ bodd n = List.headI (bits n)\n[PROOFSTEP]\ninduction' n using Nat.binaryRec' with b n h _\n[GOAL]\ncase z\nn : ℕ\n⊢ bodd 0 = List.headI (bits 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase f\nn✝ : ℕ\nb : Bool\nn : ℕ\nh : n = 0 → b = true\na✝ : bodd n = List.headI (bits n)\n⊢ bodd (bit b n) = List.headI (bits (bit b n))\n[PROOFSTEP]\nsimp [bodd_bit, bits_append_bit _ _ h]\n[GOAL]\nn✝ n : ℕ\n⊢ bits (div2 n) = List.tail (bits n)\n[PROOFSTEP]\ninduction' n using Nat.binaryRec' with b n h _\n[GOAL]\ncase z\nn : ℕ\n⊢ bits (div2 0) = List.tail (bits 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase f\nn✝ : ℕ\nb : Bool\nn : ℕ\nh : n = 0 → b = true\na✝ : bits (div2 n) = List.tail (bits n)\n⊢ bits (div2 (bit b n)) = List.tail (bits (bit b n))\n[PROOFSTEP]\nsimp [div2_bit, bits_append_bit _ _ h]\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Bits", "llama_tokens": 5052, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7341195269001831, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.3756611517523899}}
{"text": "[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.28, u_1} C\ninst✝ : Preadditive C\nY : C\nX : SimplicialObject C\nn b q : ℕ\nφ : Y ⟶ X.obj (Opposite.op [n + 1])\nv : HigherFacesVanish q φ\nhnbq : n + 1 = b + q\n⊢ b < n + 1 + 1\n[PROOFSTEP]\nsimp only [hnbq, Nat.lt_add_one_iff, le_add_iff_nonneg_right, zero_le]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nY : C\nX : SimplicialObject C\nn b q : ℕ\nφ : Y ⟶ X.obj (Opposite.op [n + 1])\nv : HigherFacesVanish q φ\nhnbq : n + 1 = b + q\nj : Fin (n + 1 + 1)\nhj : n + 1 + 1 ≤ ↑j + q\n⊢ (φ ≫ SimplicialObject.σ X { val := b, isLt := (_ : b < n + 1 + 1) }) ≫ SimplicialObject.δ X (Fin.succ j) = 0\n[PROOFSTEP]\nrw [assoc, SimplicialObject.δ_comp_σ_of_gt', Fin.pred_succ, v.comp_δ_eq_zero_assoc _ _ hj, zero_comp]\n[GOAL]\ncase H\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nY : C\nX : SimplicialObject C\nn b q : ℕ\nφ : Y ⟶ X.obj (Opposite.op [n + 1])\nv : HigherFacesVanish q φ\nhnbq : n + 1 = b + q\nj : Fin (n + 1 + 1)\nhj : n + 1 + 1 ≤ ↑j + q\n⊢ Fin.succ { val := b, isLt := (_ : b < n + 1 + 1) } < Fin.succ j\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase H\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nY : C\nX : SimplicialObject C\nn b q : ℕ\nφ : Y ⟶ X.obj (Opposite.op [n + 1])\nv : HigherFacesVanish q φ\nhnbq : n + 1 = b + q\nj : Fin (n + 1 + 1)\nhj : n + 1 + 1 ≤ ↑j + q\n⊢ { val := b + 1, isLt := (_ : Nat.succ b < Nat.succ (n + 2)) } < Fin.succ j\n[PROOFSTEP]\nrw [Fin.lt_iff_val_lt_val, Fin.val_succ]\n[GOAL]\ncase H\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nY : C\nX : SimplicialObject C\nn b q : ℕ\nφ : Y ⟶ X.obj (Opposite.op [n + 1])\nv : HigherFacesVanish q φ\nhnbq : n + 1 = b + q\nj : Fin (n + 1 + 1)\nhj : n + 1 + 1 ≤ ↑j + q\n⊢ ↑{ val := b + 1, isLt := (_ : Nat.succ b < Nat.succ (n + 2)) } < ↑j + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nY : C\nX : SimplicialObject C\nn b q : ℕ\nφ : Y ⟶ X.obj (Opposite.op [n + 1])\nv : HigherFacesVanish q φ\nhnbq : n + 1 = b + q\nj : Fin (n + 1 + 1)\nhj : n + 1 + 1 ≤ ↑j + q\n⊢ j ≠ 0\n[PROOFSTEP]\nintro hj'\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nY : C\nX : SimplicialObject C\nn b q : ℕ\nφ : Y ⟶ X.obj (Opposite.op [n + 1])\nv : HigherFacesVanish q φ\nhnbq : n + 1 = b + q\nj : Fin (n + 1 + 1)\nhj : n + 1 + 1 ≤ ↑j + q\nhj' : j = 0\n⊢ False\n[PROOFSTEP]\nsimp only [hnbq, add_comm b, add_assoc, hj', Fin.val_zero, zero_add, add_le_iff_nonpos_right, nonpos_iff_eq_zero,\n  add_eq_zero, false_and] at hj \n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn q : ℕ\ni : Fin (n + 1)\nhi : n + 1 ≤ ↑i + q\n⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0\n[PROOFSTEP]\nrevert i hi\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn q : ℕ\n⊢ ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0\n[PROOFSTEP]\ninduction' q with q hq\n[GOAL]\ncase zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\n⊢ ∀ (i : Fin (n + 1)),\n    n + 1 ≤ ↑i + Nat.zero → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P Nat.zero) (n + 1) = 0\n[PROOFSTEP]\nintro i (hi : n + 1 ≤ i)\n[GOAL]\ncase zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 1)\nhi : n + 1 ≤ ↑i\n⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P Nat.zero) (n + 1) = 0\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase zero.h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 1)\nhi : n + 1 ≤ ↑i\n⊢ False\n[PROOFSTEP]\nlinarith [Fin.is_lt i]\n[GOAL]\ncase succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn q : ℕ\nhq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0\n⊢ ∀ (i : Fin (n + 1)),\n    n + 1 ≤ ↑i + Nat.succ q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (n + 1) = 0\n[PROOFSTEP]\nintro i (hi : n + 1 ≤ i + q + 1)\n[GOAL]\ncase succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn q : ℕ\nhq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0\ni : Fin (n + 1)\nhi : n + 1 ≤ ↑i + q + 1\n⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (n + 1) = 0\n[PROOFSTEP]\nby_cases n + 1 ≤ (i : ℕ) + q\n[GOAL]\ncase succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn q : ℕ\nhq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0\ni : Fin (n + 1)\nhi : n + 1 ≤ ↑i + q + 1\n⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (n + 1) = 0\n[PROOFSTEP]\nby_cases n + 1 ≤ (i : ℕ) + q\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn q : ℕ\nhq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0\ni : Fin (n + 1)\nhi : n + 1 ≤ ↑i + q + 1\nh : n + 1 ≤ ↑i + q\n⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (n + 1) = 0\n[PROOFSTEP]\nrw [P_succ, HomologicalComplex.comp_f, ← assoc, hq i h, zero_comp]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn q : ℕ\nhq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0\ni : Fin (n + 1)\nhi : n + 1 ≤ ↑i + q + 1\nh : ¬n + 1 ≤ ↑i + q\n⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (n + 1) = 0\n[PROOFSTEP]\nreplace hi : n = i + q := by\n  obtain ⟨j, hj⟩ := le_iff_exists_add.mp hi\n  rw [← Nat.lt_succ_iff, Nat.succ_eq_add_one, hj, not_lt, add_le_iff_nonpos_right, nonpos_iff_eq_zero] at h \n  rw [← add_left_inj 1, hj, self_eq_add_right, h]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn q : ℕ\nhq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0\ni : Fin (n + 1)\nhi : n + 1 ≤ ↑i + q + 1\nh : ¬n + 1 ≤ ↑i + q\n⊢ n = ↑i + q\n[PROOFSTEP]\nobtain ⟨j, hj⟩ := le_iff_exists_add.mp hi\n[GOAL]\ncase intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn q : ℕ\nhq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0\ni : Fin (n + 1)\nhi : n + 1 ≤ ↑i + q + 1\nh : ¬n + 1 ≤ ↑i + q\nj : ℕ\nhj : ↑i + q + 1 = n + 1 + j\n⊢ n = ↑i + q\n[PROOFSTEP]\nrw [← Nat.lt_succ_iff, Nat.succ_eq_add_one, hj, not_lt, add_le_iff_nonpos_right, nonpos_iff_eq_zero] at h \n[GOAL]\ncase intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn q : ℕ\nhq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0\ni : Fin (n + 1)\nhi : n + 1 ≤ ↑i + q + 1\nj : ℕ\nh : j = 0\nhj : ↑i + q + 1 = n + 1 + j\n⊢ n = ↑i + q\n[PROOFSTEP]\nrw [← add_left_inj 1, hj, self_eq_add_right, h]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn q : ℕ\nhq : ∀ (i : Fin (n + 1)), n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (n + 1) = 0\ni : Fin (n + 1)\nh : ¬n + 1 ≤ ↑i + q\nhi : n = ↑i + q\n⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (n + 1) = 0\n[PROOFSTEP]\nrcases n with _ | n\n[GOAL]\ncase neg.zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nhq :\n  ∀ (i : Fin (Nat.zero + 1)),\n    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0\ni : Fin (Nat.zero + 1)\nh : ¬Nat.zero + 1 ≤ ↑i + q\nhi : Nat.zero = ↑i + q\n⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (Nat.zero + 1) = 0\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase neg.zero.head\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nhq :\n  ∀ (i : Fin (Nat.zero + 1)),\n    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0\nh : ¬Nat.zero + 1 ≤ ↑{ val := 0, isLt := (_ : 0 < Nat.zero + 1) } + q\nhi : Nat.zero = ↑{ val := 0, isLt := (_ : 0 < Nat.zero + 1) } + q\n⊢ SimplicialObject.σ X { val := 0, isLt := (_ : 0 < Nat.zero + 1) } ≫\n      HomologicalComplex.Hom.f (P (Nat.succ q)) (Nat.zero + 1) =\n    0\n[PROOFSTEP]\ndsimp at h hi \n[GOAL]\ncase neg.zero.head\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nhq :\n  ∀ (i : Fin (Nat.zero + 1)),\n    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0\nh : ¬0 + 1 ≤ 0 + q\nhi : 0 = 0 + q\n⊢ SimplicialObject.σ X { val := 0, isLt := (_ : 0 < Nat.zero + 1) } ≫\n      HomologicalComplex.Hom.f (P (Nat.succ q)) (Nat.zero + 1) =\n    0\n[PROOFSTEP]\nrw [show q = 0 by linarith]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nhq :\n  ∀ (i : Fin (Nat.zero + 1)),\n    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0\nh : ¬0 + 1 ≤ 0 + q\nhi : 0 = 0 + q\n⊢ q = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg.zero.head\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nhq :\n  ∀ (i : Fin (Nat.zero + 1)),\n    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0\nh : ¬0 + 1 ≤ 0 + q\nhi : 0 = 0 + q\n⊢ SimplicialObject.σ X { val := 0, isLt := (_ : 0 < Nat.zero + 1) } ≫\n      HomologicalComplex.Hom.f (P (Nat.succ 0)) (Nat.zero + 1) =\n    0\n[PROOFSTEP]\nchange X.σ 0 ≫ (P 1).f 1 = 0\n[GOAL]\ncase neg.zero.head\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nhq :\n  ∀ (i : Fin (Nat.zero + 1)),\n    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0\nh : ¬0 + 1 ≤ 0 + q\nhi : 0 = 0 + q\n⊢ SimplicialObject.σ X 0 ≫ HomologicalComplex.Hom.f (P 1) 1 = 0\n[PROOFSTEP]\nsimp only [P_succ, HomologicalComplex.add_f_apply, comp_add, HomologicalComplex.id_f,\n  AlternatingFaceMapComplex.obj_d_eq, Hσ, HomologicalComplex.comp_f,\n  Homotopy.nullHomotopicMap'_f (c_mk 2 1 rfl) (c_mk 1 0 rfl), comp_id]\n[GOAL]\ncase neg.zero.head\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nhq :\n  ∀ (i : Fin (Nat.zero + 1)),\n    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0\nh : ¬0 + 1 ≤ 0 + q\nhi : 0 = 0 + q\n⊢ SimplicialObject.σ X 0 ≫ HomologicalComplex.Hom.f (P 0) 1 +\n      (SimplicialObject.σ X 0 ≫\n          HomologicalComplex.Hom.f (P 0) 1 ≫\n            (Finset.sum Finset.univ fun i => (-1) ^ ↑i • SimplicialObject.δ X i) ≫\n              hσ' 0 0 1 (_ : ComplexShape.Rel c 1 0) +\n        SimplicialObject.σ X 0 ≫\n          HomologicalComplex.Hom.f (P 0) 1 ≫\n            hσ' 0 1 2 (_ : ComplexShape.Rel c 2 1) ≫\n              Finset.sum Finset.univ fun i => (-1) ^ ↑i • SimplicialObject.δ X i) =\n    0\n[PROOFSTEP]\nerw [hσ'_eq' (zero_add 0).symm, hσ'_eq' (add_zero 1).symm, comp_id, Fin.sum_univ_two, Fin.sum_univ_succ,\n  Fin.sum_univ_two]\n[GOAL]\ncase neg.zero.head\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nhq :\n  ∀ (i : Fin (Nat.zero + 1)),\n    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0\nh : ¬0 + 1 ≤ 0 + q\nhi : 0 = 0 + q\n⊢ SimplicialObject.σ X 0 +\n      (SimplicialObject.σ X 0 ≫\n          HomologicalComplex.Hom.f (P 0) 1 ≫\n            ((-1) ^ ↑0 • SimplicialObject.δ X 0 + (-1) ^ ↑1 • SimplicialObject.δ X 1) ≫\n              ((-1) ^ 0 • SimplicialObject.σ X { val := 0, isLt := (_ : 0 < Nat.succ 0) }) +\n        SimplicialObject.σ X 0 ≫\n          HomologicalComplex.Hom.f (P 0) 1 ≫\n            ((-1) ^ 1 • SimplicialObject.σ X { val := 1, isLt := (_ : 1 < Nat.succ 1) }) ≫\n              ((-1) ^ ↑0 • SimplicialObject.δ X 0 +\n                ((-1) ^ ↑(Fin.succ 0) • SimplicialObject.δ X (Fin.succ 0) +\n                  (-1) ^ ↑(Fin.succ 1) • SimplicialObject.δ X (Fin.succ 1)))) =\n    0\n[PROOFSTEP]\nsimp only [Fin.val_zero, pow_zero, pow_one, pow_add, one_smul, neg_smul, Fin.mk_one, Fin.val_succ, Fin.val_one,\n  Fin.succ_one_eq_two, P_zero, HomologicalComplex.id_f, Fin.val_two, pow_two, mul_neg, one_mul, neg_mul, neg_neg,\n  id_comp, add_comp, comp_add, Fin.mk_zero, neg_comp, comp_neg, Fin.succ_zero_eq_one]\n[GOAL]\ncase neg.zero.head\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nhq :\n  ∀ (i : Fin (Nat.zero + 1)),\n    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0\nh : ¬0 + 1 ≤ 0 + q\nhi : 0 = 0 + q\n⊢ SimplicialObject.σ X 0 +\n      (SimplicialObject.σ X 0 ≫ SimplicialObject.δ X 0 ≫ SimplicialObject.σ X 0 +\n          -SimplicialObject.σ X 0 ≫ SimplicialObject.δ X 1 ≫ SimplicialObject.σ X 0 +\n        (-SimplicialObject.σ X 0 ≫ SimplicialObject.σ X 1 ≫ SimplicialObject.δ X 0 +\n          (SimplicialObject.σ X 0 ≫ SimplicialObject.σ X 1 ≫ SimplicialObject.δ X 1 +\n            -SimplicialObject.σ X 0 ≫ SimplicialObject.σ X 1 ≫ SimplicialObject.δ X 2))) =\n    0\n[PROOFSTEP]\nerw [SimplicialObject.δ_comp_σ_self, SimplicialObject.δ_comp_σ_self_assoc, SimplicialObject.δ_comp_σ_succ, comp_id,\n  SimplicialObject.δ_comp_σ_of_le X (show (0 : Fin 2) ≤ Fin.castSucc 0 by rw [Fin.castSucc_zero]),\n  SimplicialObject.δ_comp_σ_self_assoc, SimplicialObject.δ_comp_σ_succ_assoc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nhq :\n  ∀ (i : Fin (Nat.zero + 1)),\n    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0\nh : ¬0 + 1 ≤ 0 + q\nhi : 0 = 0 + q\n⊢ 0 ≤ Fin.castSucc 0\n[PROOFSTEP]\nrw [Fin.castSucc_zero]\n[GOAL]\ncase neg.zero.head\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nhq :\n  ∀ (i : Fin (Nat.zero + 1)),\n    Nat.zero + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.zero + 1) = 0\nh : ¬0 + 1 ≤ 0 + q\nhi : 0 = 0 + q\n⊢ SimplicialObject.σ X 0 +\n      (SimplicialObject.σ X 0 + -SimplicialObject.σ X 0 +\n        (-SimplicialObject.σ X 0 + (SimplicialObject.σ X 0 + -SimplicialObject.σ X 0))) =\n    0\n[PROOFSTEP]\nsimp only [add_right_neg, add_zero, zero_add]\n[GOAL]\ncase neg.succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : Nat.succ n = ↑i + q\n⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P (Nat.succ q)) (Nat.succ n + 1) = 0\n[PROOFSTEP]\nrw [← id_comp (X.σ i), ← (P_add_Q_f q n.succ : _ = 𝟙 (X.obj _)), add_comp, add_comp, P_succ]\n[GOAL]\ncase neg.succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : Nat.succ n = ↑i + q\n⊢ (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i) ≫\n        HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) +\n      (HomologicalComplex.Hom.f (Q q) (Nat.succ n) ≫ SimplicialObject.σ X i) ≫\n        HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =\n    0\n[PROOFSTEP]\nhave v : HigherFacesVanish q ((P q).f n.succ ≫ X.σ i) := (HigherFacesVanish.of_P q n).comp_σ hi\n[GOAL]\ncase neg.succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : Nat.succ n = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\n⊢ (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i) ≫\n        HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) +\n      (HomologicalComplex.Hom.f (Q q) (Nat.succ n) ≫ SimplicialObject.σ X i) ≫\n        HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =\n    0\n[PROOFSTEP]\nerw [← assoc, v.comp_P_eq_self, HomologicalComplex.add_f_apply, Preadditive.comp_add, comp_id, v.comp_Hσ_eq hi, assoc,\n  SimplicialObject.δ_comp_σ_succ_assoc, Fin.eta, decomposition_Q n q, sum_comp, sum_comp, Finset.sum_eq_zero, add_zero,\n  add_neg_eq_zero]\n[GOAL]\ncase neg.succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : Nat.succ n = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\n⊢ ∀ (x : Fin (n + 1)),\n    x ∈ Finset.filter (fun i => ↑i < q) Finset.univ →\n      ((HomologicalComplex.Hom.f (P ↑x) (n + 1) ≫\n              SimplicialObject.δ X (Fin.succ (↑Fin.revPerm x)) ≫ SimplicialObject.σ X (↑Fin.revPerm x)) ≫\n            SimplicialObject.σ X i) ≫\n          HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =\n        0\n[PROOFSTEP]\nintro j hj\n[GOAL]\ncase neg.succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : Nat.succ n = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : j ∈ Finset.filter (fun i => ↑i < q) Finset.univ\n⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm j)) ≫ SimplicialObject.σ X (↑Fin.revPerm j)) ≫\n        SimplicialObject.σ X i) ≫\n      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =\n    0\n[PROOFSTEP]\nsimp only [true_and_iff, Finset.mem_univ, Finset.mem_filter] at hj \n[GOAL]\ncase neg.succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : Nat.succ n = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\n⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm j)) ≫ SimplicialObject.σ X (↑Fin.revPerm j)) ≫\n        SimplicialObject.σ X i) ≫\n      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =\n    0\n[PROOFSTEP]\nsimp only [Nat.succ_eq_add_one] at hi \n[GOAL]\ncase neg.succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : n + 1 = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\n⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm j)) ≫ SimplicialObject.σ X (↑Fin.revPerm j)) ≫\n        SimplicialObject.σ X i) ≫\n      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =\n    0\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := Nat.le.dest (Nat.lt_succ_iff.mp (Fin.is_lt j))\n[GOAL]\ncase neg.succ.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : n + 1 = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\nk : ℕ\nhk : ↑j + k = n\n⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm j)) ≫ SimplicialObject.σ X (↑Fin.revPerm j)) ≫\n        SimplicialObject.σ X i) ≫\n      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =\n    0\n[PROOFSTEP]\nrw [add_comm] at hk \n[GOAL]\ncase neg.succ.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : n + 1 = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\nk : ℕ\nhk : k + ↑j = n\n⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm j)) ≫ SimplicialObject.σ X (↑Fin.revPerm j)) ≫\n        SimplicialObject.σ X i) ≫\n      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =\n    0\n[PROOFSTEP]\nhave hi' : i = Fin.castSucc ⟨i, by linarith⟩ := by\n  ext\n  simp only [Fin.castSucc_mk, Fin.eta]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : n + 1 = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\nk : ℕ\nhk : k + ↑j = n\n⊢ ↑i < n + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : n + 1 = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\nk : ℕ\nhk : k + ↑j = n\n⊢ i = Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : n + 1 = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\nk : ℕ\nhk : k + ↑j = n\n⊢ ↑i = ↑(Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) })\n[PROOFSTEP]\nsimp only [Fin.castSucc_mk, Fin.eta]\n[GOAL]\ncase neg.succ.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : n + 1 = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\nk : ℕ\nhk : k + ↑j = n\nhi' : i = Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }\n⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm j)) ≫ SimplicialObject.σ X (↑Fin.revPerm j)) ≫\n        SimplicialObject.σ X i) ≫\n      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =\n    0\n[PROOFSTEP]\nhave eq :=\n  hq j.revPerm.succ\n    (by\n      simp only [← hk, Fin.revPerm_eq j hk.symm, Nat.succ_eq_add_one, Fin.succ_mk, Fin.val_mk]\n      linarith)\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : n + 1 = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\nk : ℕ\nhk : k + ↑j = n\nhi' : i = Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }\n⊢ Nat.succ n + 1 ≤ ↑(Fin.succ (↑Fin.revPerm j)) + q\n[PROOFSTEP]\nsimp only [← hk, Fin.revPerm_eq j hk.symm, Nat.succ_eq_add_one, Fin.succ_mk, Fin.val_mk]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : n + 1 = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\nk : ℕ\nhk : k + ↑j = n\nhi' : i = Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }\n⊢ k + ↑j + 1 + 1 ≤ k + 1 + q\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg.succ.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : n + 1 = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\nk : ℕ\nhk : k + ↑j = n\nhi' : i = Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }\neq : SimplicialObject.σ X (Fin.succ (↑Fin.revPerm j)) ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\n⊢ ((HomologicalComplex.Hom.f (P ↑j) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm j)) ≫ SimplicialObject.σ X (↑Fin.revPerm j)) ≫\n        SimplicialObject.σ X i) ≫\n      HomologicalComplex.Hom.f (P q ≫ (𝟙 (AlternatingFaceMapComplex.obj X) + Hσ q)) (Nat.succ n + 1) =\n    0\n[PROOFSTEP]\nrw [HomologicalComplex.comp_f, assoc, assoc, assoc, hi', SimplicialObject.σ_comp_σ_assoc, reassoc_of% eq, zero_comp,\n  comp_zero, comp_zero, comp_zero]\n[GOAL]\ncase neg.succ.intro.H\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : n + 1 = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\nk : ℕ\nhk : k + ↑j = n\nhi' : i = Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }\neq : SimplicialObject.σ X (Fin.succ (↑Fin.revPerm j)) ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\n⊢ { val := ↑i, isLt := (_ : ↑i < n + 1) } ≤ ↑Fin.revPerm j\n[PROOFSTEP]\nsimp only [Fin.revPerm_eq j hk.symm, Fin.le_iff_val_le_val, Fin.val_mk]\n[GOAL]\ncase neg.succ.intro.H\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n : ℕ\nhq :\n  ∀ (i : Fin (Nat.succ n + 1)),\n    Nat.succ n + 1 ≤ ↑i + q → SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\ni : Fin (Nat.succ n + 1)\nh : ¬Nat.succ n + 1 ≤ ↑i + q\nhi : n + 1 = ↑i + q\nv : HigherFacesVanish q (HomologicalComplex.Hom.f (P q) (Nat.succ n) ≫ SimplicialObject.σ X i)\nj : Fin (n + 1)\nhj : ↑j < q\nk : ℕ\nhk : k + ↑j = n\nhi' : i = Fin.castSucc { val := ↑i, isLt := (_ : ↑i < n + 1) }\neq : SimplicialObject.σ X (Fin.succ (↑Fin.revPerm j)) ≫ HomologicalComplex.Hom.f (P q) (Nat.succ n + 1) = 0\n⊢ ↑i ≤ k\n[PROOFSTEP]\nlinarith\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ SimplicialObject.σ X i ≫ HomologicalComplex.Hom.f PInfty (n + 1) = 0\n[PROOFSTEP]\nrw [PInfty_f, σ_comp_P_eq_zero X i]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\ni : Fin (n + 1)\n⊢ n + 1 ≤ ↑i + (n + 1)\n[PROOFSTEP]\nsimp only [le_add_iff_nonneg_left, zero_le]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\nθ : [n] ⟶ Δ'\nhθ : ¬Mono θ\n⊢ X.map θ.op ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\nrw [SimplexCategory.mono_iff_injective] at hθ \n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nn : ℕ\nΔ' : SimplexCategory\nθ : [n] ⟶ Δ'\nhθ : ¬Function.Injective ↑(SimplexCategory.Hom.toOrderHom θ)\n⊢ X.map θ.op ≫ HomologicalComplex.Hom.f PInfty n = 0\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nθ : [Nat.zero] ⟶ Δ'\nhθ : ¬Function.Injective ↑(SimplexCategory.Hom.toOrderHom θ)\n⊢ X.map θ.op ≫ HomologicalComplex.Hom.f PInfty Nat.zero = 0\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase zero.h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nθ : [Nat.zero] ⟶ Δ'\nhθ : ¬Function.Injective ↑(SimplexCategory.Hom.toOrderHom θ)\n⊢ False\n[PROOFSTEP]\napply hθ\n[GOAL]\ncase zero.h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nθ : [Nat.zero] ⟶ Δ'\nhθ : ¬Function.Injective ↑(SimplexCategory.Hom.toOrderHom θ)\n⊢ Function.Injective ↑(SimplexCategory.Hom.toOrderHom θ)\n[PROOFSTEP]\nintro x y h\n[GOAL]\ncase zero.h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nθ : [Nat.zero] ⟶ Δ'\nhθ : ¬Function.Injective ↑(SimplexCategory.Hom.toOrderHom θ)\nx y : Fin (SimplexCategory.len [Nat.zero] + 1)\nh : ↑(SimplexCategory.Hom.toOrderHom θ) x = ↑(SimplexCategory.Hom.toOrderHom θ) y\n⊢ x = y\n[PROOFSTEP]\nfin_cases x\n[GOAL]\ncase zero.h.head\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nθ : [Nat.zero] ⟶ Δ'\nhθ : ¬Function.Injective ↑(SimplexCategory.Hom.toOrderHom θ)\ny : Fin (SimplexCategory.len [Nat.zero] + 1)\nh :\n  ↑(SimplexCategory.Hom.toOrderHom θ) { val := 0, isLt := (_ : 0 < SimplexCategory.len [Nat.zero] + 1) } =\n    ↑(SimplexCategory.Hom.toOrderHom θ) y\n⊢ { val := 0, isLt := (_ : 0 < SimplexCategory.len [Nat.zero] + 1) } = y\n[PROOFSTEP]\nfin_cases y\n[GOAL]\ncase zero.h.head.head\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nθ : [Nat.zero] ⟶ Δ'\nhθ : ¬Function.Injective ↑(SimplexCategory.Hom.toOrderHom θ)\nh :\n  ↑(SimplexCategory.Hom.toOrderHom θ) { val := 0, isLt := (_ : 0 < SimplexCategory.len [Nat.zero] + 1) } =\n    ↑(SimplexCategory.Hom.toOrderHom θ) { val := 0, isLt := (_ : 0 < SimplexCategory.len [Nat.zero] + 1) }\n⊢ { val := 0, isLt := (_ : 0 < SimplexCategory.len [Nat.zero] + 1) } =\n    { val := 0, isLt := (_ : 0 < SimplexCategory.len [Nat.zero] + 1) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nn✝ : ℕ\nθ : [Nat.succ n✝] ⟶ Δ'\nhθ : ¬Function.Injective ↑(SimplexCategory.Hom.toOrderHom θ)\n⊢ X.map θ.op ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n✝) = 0\n[PROOFSTEP]\nobtain ⟨i, α, h⟩ := SimplexCategory.eq_σ_comp_of_not_injective θ hθ\n[GOAL]\ncase succ.intro.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nn✝ : ℕ\nθ : [Nat.succ n✝] ⟶ Δ'\nhθ : ¬Function.Injective ↑(SimplexCategory.Hom.toOrderHom θ)\ni : Fin (n✝ + 1)\nα : [n✝] ⟶ Δ'\nh : θ = SimplexCategory.σ i ≫ α\n⊢ X.map θ.op ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n✝) = 0\n[PROOFSTEP]\nrw [h, op_comp, X.map_comp, assoc, show X.map (SimplexCategory.σ i).op = X.σ i by rfl, σ_comp_PInfty, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nΔ' : SimplexCategory\nn✝ : ℕ\nθ : [Nat.succ n✝] ⟶ Δ'\nhθ : ¬Function.Injective ↑(SimplexCategory.Hom.toOrderHom θ)\ni : Fin (n✝ + 1)\nα : [n✝] ⟶ Δ'\nh : θ = SimplexCategory.σ i ≫ α\n⊢ X.map (SimplexCategory.σ i).op = SimplicialObject.σ X i\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.DoldKan.Degeneracies", "llama_tokens": 17177, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.712232184238947, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.37557179923191686}}
{"text": "[GOAL]\nV : Type u_1\nW : Type u_2\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : SeminormedAddCommGroup W\nf : V → W\nM : ℝ\nh : ∀ (x : V), ‖f x‖ ≤ M * ‖x‖\nx : V\n⊢ M * ‖x‖ ≤ max M 1 * ‖x‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nV : Type u_1\nW : Type u_2\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : SeminormedAddCommGroup W\nf : V → W\nM : ℝ\nh : ∀ (x : V), ‖f x‖ ≤ M * ‖x‖\nx : V\n⊢ M ≤ max M 1\n[PROOFSTEP]\napply le_max_left\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nf : V₁ →+ V₂\nK : ℝ≥0\nh : LipschitzWith K ↑f\nx : V₁\n⊢ ‖↑f x‖ ≤ ↑K * ‖x‖\n[PROOFSTEP]\nsimpa only [map_zero, dist_zero_right] using\n  h.dist_le_mul x\n    0\n      -- porting note: moved this declaration up so we could get a `FunLike` instance sooner.\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f g : NormedAddGroupHom V₁ V₂\nh : f.toFun = g.toFun\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g✝ g : NormedAddGroupHom V₁ V₂\ntoFun✝ : V₁ → V₂\nmap_add'✝ : ∀ (v₁ v₂ : V₁), toFun✝ (v₁ + v₂) = toFun✝ v₁ + toFun✝ v₂\nbound'✝ : ∃ C, ∀ (v : V₁), ‖toFun✝ v‖ ≤ C * ‖v‖\nh : { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ }.toFun = g.toFun\n⊢ { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\ntoFun✝¹ : V₁ → V₂\nmap_add'✝¹ : ∀ (v₁ v₂ : V₁), toFun✝¹ (v₁ + v₂) = toFun✝¹ v₁ + toFun✝¹ v₂\nbound'✝¹ : ∃ C, ∀ (v : V₁), ‖toFun✝¹ v‖ ≤ C * ‖v‖\ntoFun✝ : V₁ → V₂\nmap_add'✝ : ∀ (v₁ v₂ : V₁), toFun✝ (v₁ + v₂) = toFun✝ v₁ + toFun✝ v₂\nbound'✝ : ∃ C, ∀ (v : V₁), ‖toFun✝ v‖ ≤ C * ‖v‖\nh :\n  { toFun := toFun✝¹, map_add' := map_add'✝¹, bound' := bound'✝¹ }.toFun =\n    { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ }.toFun\n⊢ { toFun := toFun✝¹, map_add' := map_add'✝¹, bound' := bound'✝¹ } =\n    { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nH : ↑f = ↑g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\ng : NormedAddGroupHom V₁ V₂\ntoFun✝ : V₁ → V₂\nmap_add'✝ : ∀ (v₁ v₂ : V₁), toFun✝ (v₁ + v₂) = toFun✝ v₁ + toFun✝ v₂\nbound'✝ : ∃ C, ∀ (v : V₁), ‖toFun✝ v‖ ≤ C * ‖v‖\nH : ↑{ toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ } = ↑g\n⊢ { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\ntoFun✝¹ : V₁ → V₂\nmap_add'✝¹ : ∀ (v₁ v₂ : V₁), toFun✝¹ (v₁ + v₂) = toFun✝¹ v₁ + toFun✝¹ v₂\nbound'✝¹ : ∃ C, ∀ (v : V₁), ‖toFun✝¹ v‖ ≤ C * ‖v‖\ntoFun✝ : V₁ → V₂\nmap_add'✝ : ∀ (v₁ v₂ : V₁), toFun✝ (v₁ + v₂) = toFun✝ v₁ + toFun✝ v₂\nbound'✝ : ∃ C, ∀ (v : V₁), ‖toFun✝ v‖ ≤ C * ‖v‖\nH :\n  ↑{ toFun := toFun✝¹, map_add' := map_add'✝¹, bound' := bound'✝¹ } =\n    ↑{ toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ }\n⊢ { toFun := toFun✝¹, map_add' := map_add'✝¹, bound' := bound'✝¹ } =\n    { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\n⊢ Function.Injective toFun\n[PROOFSTEP]\napply coe_inj\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\n⊢ f = g → ∀ (x : V₁), ↑f x = ↑g x\n[PROOFSTEP]\nrintro rfl x\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\nx : V₁\n⊢ ↑f x = ↑f x\n[PROOFSTEP]\nrfl\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f g : NormedAddGroupHom V₁ V₂\nh : toAddMonoidHom f = toAddMonoidHom g\n⊢ ↑f = ↑g\n[PROOFSTEP]\nrw [← coe_toAddMonoidHom f, ← coe_toAddMonoidHom g, h]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nK : ℝ≥0\nh : ∀ (x : V₁), ‖x‖ ≤ ↑K * ‖↑f x‖\nx y : V₁\n⊢ dist x y ≤ ↑K * dist (↑f x) (↑f y)\n[PROOFSTEP]\nsimpa only [dist_eq_norm, map_sub] using h (x - y)\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g f : NormedAddGroupHom V₁ V₂\nK : AddSubgroup V₂\nC C' : ℝ\nh : SurjectiveOnWith f K C\nH : C ≤ C'\n⊢ SurjectiveOnWith f K C'\n[PROOFSTEP]\nintro k k_in\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g f : NormedAddGroupHom V₁ V₂\nK : AddSubgroup V₂\nC C' : ℝ\nh : SurjectiveOnWith f K C\nH : C ≤ C'\nk : V₂\nk_in : k ∈ K\n⊢ ∃ g, ↑f g = k ∧ ‖g‖ ≤ C' * ‖k‖\n[PROOFSTEP]\nrcases h k k_in with ⟨g, rfl, hg⟩\n[GOAL]\ncase intro.intro\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f : NormedAddGroupHom V₁ V₂\nK : AddSubgroup V₂\nC C' : ℝ\nh : SurjectiveOnWith f K C\nH : C ≤ C'\ng : V₁\nk_in : ↑f g ∈ K\nhg : ‖g‖ ≤ C * ‖↑f g‖\n⊢ ∃ g_1, ↑f g_1 = ↑f g ∧ ‖g_1‖ ≤ C' * ‖↑f g‖\n[PROOFSTEP]\nuse g, rfl\n[GOAL]\ncase right\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f : NormedAddGroupHom V₁ V₂\nK : AddSubgroup V₂\nC C' : ℝ\nh : SurjectiveOnWith f K C\nH : C ≤ C'\ng : V₁\nk_in : ↑f g ∈ K\nhg : ‖g‖ ≤ C * ‖↑f g‖\n⊢ ‖g‖ ≤ C' * ‖↑f g‖\n[PROOFSTEP]\nby_cases Hg : ‖f g‖ = 0\n[GOAL]\ncase pos\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f : NormedAddGroupHom V₁ V₂\nK : AddSubgroup V₂\nC C' : ℝ\nh : SurjectiveOnWith f K C\nH : C ≤ C'\ng : V₁\nk_in : ↑f g ∈ K\nhg : ‖g‖ ≤ C * ‖↑f g‖\nHg : ‖↑f g‖ = 0\n⊢ ‖g‖ ≤ C' * ‖↑f g‖\n[PROOFSTEP]\nsimpa [Hg] using hg\n[GOAL]\ncase neg\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f : NormedAddGroupHom V₁ V₂\nK : AddSubgroup V₂\nC C' : ℝ\nh : SurjectiveOnWith f K C\nH : C ≤ C'\ng : V₁\nk_in : ↑f g ∈ K\nhg : ‖g‖ ≤ C * ‖↑f g‖\nHg : ¬‖↑f g‖ = 0\n⊢ ‖g‖ ≤ C' * ‖↑f g‖\n[PROOFSTEP]\nexact hg.trans (by gcongr)\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f : NormedAddGroupHom V₁ V₂\nK : AddSubgroup V₂\nC C' : ℝ\nh : SurjectiveOnWith f K C\nH : C ≤ C'\ng : V₁\nk_in : ↑f g ∈ K\nhg : ‖g‖ ≤ C * ‖↑f g‖\nHg : ¬‖↑f g‖ = 0\n⊢ C * ‖↑f g‖ ≤ C' * ‖↑f g‖\n[PROOFSTEP]\ngcongr\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g f : NormedAddGroupHom V₁ V₂\nK : AddSubgroup V₂\nC : ℝ\nh : SurjectiveOnWith f K C\n⊢ ∃ C', C' > 0 ∧ SurjectiveOnWith f K C'\n[PROOFSTEP]\nrefine' ⟨|C| + 1, _, _⟩\n[GOAL]\ncase refine'_1\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g f : NormedAddGroupHom V₁ V₂\nK : AddSubgroup V₂\nC : ℝ\nh : SurjectiveOnWith f K C\n⊢ |C| + 1 > 0\n[PROOFSTEP]\nlinarith [abs_nonneg C]\n[GOAL]\ncase refine'_2\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g f : NormedAddGroupHom V₁ V₂\nK : AddSubgroup V₂\nC : ℝ\nh : SurjectiveOnWith f K C\n⊢ SurjectiveOnWith f K (|C| + 1)\n[PROOFSTEP]\napply h.mono\n[GOAL]\ncase refine'_2\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g f : NormedAddGroupHom V₁ V₂\nK : AddSubgroup V₂\nC : ℝ\nh : SurjectiveOnWith f K C\n⊢ C ≤ |C| + 1\n[PROOFSTEP]\nlinarith [le_abs_self C]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nx : V₁\n⊢ ‖↑f x‖ ≤ ‖f‖ * ‖x‖\n[PROOFSTEP]\nobtain ⟨C, _Cpos, hC⟩ := f.bound\n[GOAL]\ncase intro.intro\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nx : V₁\nC : ℝ\n_Cpos : 0 < C\nhC : ∀ (x : V₁), ‖↑f x‖ ≤ C * ‖x‖\n⊢ ‖↑f x‖ ≤ ‖f‖ * ‖x‖\n[PROOFSTEP]\nreplace hC := hC x\n[GOAL]\ncase intro.intro\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nx : V₁\nC : ℝ\n_Cpos : 0 < C\nhC : ‖↑f x‖ ≤ C * ‖x‖\n⊢ ‖↑f x‖ ≤ ‖f‖ * ‖x‖\n[PROOFSTEP]\nby_cases h : ‖x‖ = 0\n[GOAL]\ncase pos\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nx : V₁\nC : ℝ\n_Cpos : 0 < C\nhC : ‖↑f x‖ ≤ C * ‖x‖\nh : ‖x‖ = 0\n⊢ ‖↑f x‖ ≤ ‖f‖ * ‖x‖\n[PROOFSTEP]\nrwa [h, mul_zero] at hC ⊢\n[GOAL]\ncase neg\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nx : V₁\nC : ℝ\n_Cpos : 0 < C\nhC : ‖↑f x‖ ≤ C * ‖x‖\nh : ¬‖x‖ = 0\n⊢ ‖↑f x‖ ≤ ‖f‖ * ‖x‖\n[PROOFSTEP]\nhave hlt : 0 < ‖x‖ := lt_of_le_of_ne (norm_nonneg x) (Ne.symm h)\n[GOAL]\ncase neg\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nx : V₁\nC : ℝ\n_Cpos : 0 < C\nhC : ‖↑f x‖ ≤ C * ‖x‖\nh : ¬‖x‖ = 0\nhlt : 0 < ‖x‖\n⊢ ‖↑f x‖ ≤ ‖f‖ * ‖x‖\n[PROOFSTEP]\nexact (div_le_iff hlt).mp (le_csInf bounds_nonempty fun c ⟨_, hc⟩ => (div_le_iff hlt).mpr <| by apply hc)\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nx : V₁\nC : ℝ\n_Cpos : 0 < C\nhC : ‖↑f x‖ ≤ C * ‖x‖\nh : ¬‖x‖ = 0\nhlt : 0 < ‖x‖\nc : ℝ\nx✝ : c ∈ {c | 0 ≤ c ∧ ∀ (x : V₁), ‖↑f x‖ ≤ c * ‖x‖}\nleft✝ : 0 ≤ c\nhc : ∀ (x : V₁), ‖↑f x‖ ≤ c * ‖x‖\n⊢ ‖↑f x‖ ≤ c * ‖x‖\n[PROOFSTEP]\napply hc\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nc : ℝ\nx : V₁\nh : ‖x‖ ≤ c\n⊢ ‖f‖ * ‖x‖ ≤ ‖f‖ * c\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase a0\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nc : ℝ\nx : V₁\nh : ‖x‖ ≤ c\n⊢ 0 ≤ ‖f‖\n[PROOFSTEP]\nexact f.opNorm_nonneg\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nc : ℝ\nh : ‖f‖ ≤ c\nx : V₁\n⊢ ‖f‖ * ‖x‖ ≤ c * ‖x‖\n[PROOFSTEP]\ngcongr\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nx y : V₁\n⊢ dist (↑f x) (↑f y) ≤ ↑{ val := ‖f‖, property := (_ : 0 ≤ ‖f‖) } * dist x y\n[PROOFSTEP]\nrw [dist_eq_norm, dist_eq_norm, ← map_sub]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nx y : V₁\n⊢ ‖↑f (x - y)‖ ≤ ↑{ val := ‖f‖, property := (_ : 0 ≤ ‖f‖) } * ‖x - y‖\n[PROOFSTEP]\napply le_opNorm\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g f : NormedAddGroupHom V₁ V₂\nK : ℝ≥0\nhf : LipschitzWith K ↑f\nx : V₁\n⊢ ‖↑f x‖ ≤ ↑K * ‖x‖\n[PROOFSTEP]\nsimpa only [dist_zero_right, map_zero] using hf.dist_le_mul x 0\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nf : V₁ →+ V₂\nC : ℝ\nh : ∀ (x : V₁), ‖↑f x‖ ≤ C * ‖x‖\nx : V₁\n⊢ C * ‖x‖ ≤ max C 0 * ‖x‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nf : V₁ →+ V₂\nC : ℝ\nh : ∀ (x : V₁), ‖↑f x‖ ≤ C * ‖x‖\nx : V₁\n⊢ C ≤ max C 0\n[PROOFSTEP]\napply le_max_left\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f g : NormedAddGroupHom V₁ V₂\nv : V₁\n⊢ ‖↑f v‖ + ‖↑g v‖ ≤ ‖f‖ * ‖v‖ + ‖g‖ * ‖v‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h₁\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f g : NormedAddGroupHom V₁ V₂\nv : V₁\n⊢ ‖↑f v‖ ≤ ‖f‖ * ‖v‖\n[PROOFSTEP]\napply le_opNorm\n[GOAL]\ncase h₂\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f g : NormedAddGroupHom V₁ V₂\nv : V₁\n⊢ ‖↑g v‖ ≤ ‖g‖ * ‖v‖\n[PROOFSTEP]\napply le_opNorm\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f g : NormedAddGroupHom V₁ V₂\nv : V₁\n⊢ ‖f‖ * ‖v‖ + ‖g‖ * ‖v‖ = (‖f‖ + ‖g‖) * ‖v‖\n[PROOFSTEP]\nrw [add_mul]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\n⊢ ∀ (v : V₁), ‖↑0 v‖ ≤ 0 * ‖v‖\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nx✝ : V₁\n⊢ ‖↑0 x✝‖ = 0 * ‖x✝‖\n[PROOFSTEP]\nrw [zero_mul]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nx✝ : V₁\n⊢ ‖↑0 x✝‖ = 0\n[PROOFSTEP]\nexact norm_zero\n[GOAL]\nV : Type u_1\nV₁✝ : Type u_2\nV₂✝ : Type u_3\nV₃ : Type u_4\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : SeminormedAddCommGroup V₁✝\ninst✝³ : SeminormedAddCommGroup V₂✝\ninst✝² : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁✝ V₂✝\nV₁ : Type u_5\nV₂ : Type u_6\ninst✝¹ : NormedAddCommGroup V₁\ninst✝ : NormedAddCommGroup V₂\nf : NormedAddGroupHom V₁ V₂\nhn : ‖f‖ = 0\nx : V₁\n⊢ ‖f‖ * ‖x‖ = 0\n[PROOFSTEP]\nrw [hn, zero_mul]\n[GOAL]\nV : Type u_1\nV₁✝ : Type u_2\nV₂✝ : Type u_3\nV₃ : Type u_4\ninst✝⁵ : SeminormedAddCommGroup V\ninst✝⁴ : SeminormedAddCommGroup V₁✝\ninst✝³ : SeminormedAddCommGroup V₂✝\ninst✝² : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁✝ V₂✝\nV₁ : Type u_5\nV₂ : Type u_6\ninst✝¹ : NormedAddCommGroup V₁\ninst✝ : NormedAddCommGroup V₂\nf : NormedAddGroupHom V₁ V₂\nhf : f = 0\n⊢ ‖f‖ = 0\n[PROOFSTEP]\nrw [hf, opNorm_zero]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\n⊢ ∀ (v : V), ‖↑(AddMonoidHom.id V) v‖ ≤ 1 * ‖v‖\n[PROOFSTEP]\nsimp [le_refl]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nx : V\n⊢ ‖↑(id V) x‖ ≤ 1 * ‖x‖\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nh : ∃ x, ‖x‖ ≠ 0\n⊢ 1 ≤ ‖id V‖\n[PROOFSTEP]\nlet ⟨x, hx⟩ := h\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nh : ∃ x, ‖x‖ ≠ 0\nx : V\nhx : ‖x‖ ≠ 0\n⊢ 1 ≤ ‖id V‖\n[PROOFSTEP]\nhave := (id V).ratio_le_opNorm x\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nh : ∃ x, ‖x‖ ≠ 0\nx : V\nhx : ‖x‖ ≠ 0\nthis : ‖↑(id V) x‖ / ‖x‖ ≤ ‖id V‖\n⊢ 1 ≤ ‖id V‖\n[PROOFSTEP]\nrwa [id_apply, div_self hx] at this \n[GOAL]\nV✝ : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝⁵ : SeminormedAddCommGroup V✝\ninst✝⁴ : SeminormedAddCommGroup V₁\ninst✝³ : SeminormedAddCommGroup V₂\ninst✝² : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nV : Type u_5\ninst✝¹ : NormedAddCommGroup V\ninst✝ : Nontrivial V\n⊢ ‖id V‖ = 1\n[PROOFSTEP]\nrefine' norm_id_of_nontrivial_seminorm V _\n[GOAL]\nV✝ : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝⁵ : SeminormedAddCommGroup V✝\ninst✝⁴ : SeminormedAddCommGroup V₁\ninst✝³ : SeminormedAddCommGroup V₂\ninst✝² : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nV : Type u_5\ninst✝¹ : NormedAddCommGroup V\ninst✝ : Nontrivial V\n⊢ ∃ x, ‖x‖ ≠ 0\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := exists_ne (0 : V)\n[GOAL]\ncase intro\nV✝ : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝⁵ : SeminormedAddCommGroup V✝\ninst✝⁴ : SeminormedAddCommGroup V₁\ninst✝³ : SeminormedAddCommGroup V₂\ninst✝² : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\nV : Type u_5\ninst✝¹ : NormedAddCommGroup V\ninst✝ : Nontrivial V\nx : V\nhx : x ≠ 0\n⊢ ∃ x, ‖x‖ ≠ 0\n[PROOFSTEP]\nexact ⟨x, ne_of_gt (norm_pos_iff.2 hx)⟩\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g f : NormedAddGroupHom V₁ V₂\nv : V₁\n⊢ ‖↑(-toAddMonoidHom f) v‖ ≤ ‖f‖ * ‖v‖\n[PROOFSTEP]\nsimp [le_opNorm f v]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g f : NormedAddGroupHom V₁ V₂\n⊢ ‖-f‖ = ‖f‖\n[PROOFSTEP]\nsimp only [norm_def, coe_neg, norm_neg, Pi.neg_apply]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f g : NormedAddGroupHom V₁ V₂\nsrc✝ : V₁ →+ V₂ := toAddMonoidHom f - toAddMonoidHom g\n⊢ ∃ C, ∀ (v : V₁), ‖ZeroHom.toFun (↑src✝) v‖ ≤ C * ‖v‖\n[PROOFSTEP]\nsimp only [AddMonoidHom.sub_apply, AddMonoidHom.toFun_eq_coe, sub_eq_add_neg]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ f g : NormedAddGroupHom V₁ V₂\nsrc✝ : V₁ →+ V₂ := toAddMonoidHom f - toAddMonoidHom g\n⊢ ∃ C, ∀ (v : V₁), ‖↑(toAddMonoidHom f + -toAddMonoidHom g) v‖ ≤ C * ‖v‖\n[PROOFSTEP]\nexact (f + -g).bound'\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝¹¹ : SeminormedAddCommGroup V\ninst✝¹⁰ : SeminormedAddCommGroup V₁\ninst✝⁹ : SeminormedAddCommGroup V₂\ninst✝⁸ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nR : Type u_5\nR' : Type u_6\ninst✝⁷ : MonoidWithZero R\ninst✝⁶ : DistribMulAction R V₂\ninst✝⁵ : PseudoMetricSpace R\ninst✝⁴ : BoundedSMul R V₂\ninst✝³ : MonoidWithZero R'\ninst✝² : DistribMulAction R' V₂\ninst✝¹ : PseudoMetricSpace R'\ninst✝ : BoundedSMul R' V₂\nr : R\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nx : V₁\n⊢ ‖(r • ↑f) x‖ ≤ dist r 0 * b * ‖x‖\n[PROOFSTEP]\nhave := dist_smul_pair r (f x) (f 0)\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝¹¹ : SeminormedAddCommGroup V\ninst✝¹⁰ : SeminormedAddCommGroup V₁\ninst✝⁹ : SeminormedAddCommGroup V₂\ninst✝⁸ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nR : Type u_5\nR' : Type u_6\ninst✝⁷ : MonoidWithZero R\ninst✝⁶ : DistribMulAction R V₂\ninst✝⁵ : PseudoMetricSpace R\ninst✝⁴ : BoundedSMul R V₂\ninst✝³ : MonoidWithZero R'\ninst✝² : DistribMulAction R' V₂\ninst✝¹ : PseudoMetricSpace R'\ninst✝ : BoundedSMul R' V₂\nr : R\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nx : V₁\nthis : dist (r • ↑f x) (r • ↑f 0) ≤ dist r 0 * dist (↑f x) (↑f 0)\n⊢ ‖(r • ↑f) x‖ ≤ dist r 0 * b * ‖x‖\n[PROOFSTEP]\nrw [map_zero, smul_zero, dist_zero_right, dist_zero_right] at this \n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝¹¹ : SeminormedAddCommGroup V\ninst✝¹⁰ : SeminormedAddCommGroup V₁\ninst✝⁹ : SeminormedAddCommGroup V₂\ninst✝⁸ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nR : Type u_5\nR' : Type u_6\ninst✝⁷ : MonoidWithZero R\ninst✝⁶ : DistribMulAction R V₂\ninst✝⁵ : PseudoMetricSpace R\ninst✝⁴ : BoundedSMul R V₂\ninst✝³ : MonoidWithZero R'\ninst✝² : DistribMulAction R' V₂\ninst✝¹ : PseudoMetricSpace R'\ninst✝ : BoundedSMul R' V₂\nr : R\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nx : V₁\nthis : ‖r • ↑f x‖ ≤ dist r 0 * ‖↑f x‖\n⊢ ‖(r • ↑f) x‖ ≤ dist r 0 * b * ‖x‖\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝¹¹ : SeminormedAddCommGroup V\ninst✝¹⁰ : SeminormedAddCommGroup V₁\ninst✝⁹ : SeminormedAddCommGroup V₂\ninst✝⁸ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nR : Type u_5\nR' : Type u_6\ninst✝⁷ : MonoidWithZero R\ninst✝⁶ : DistribMulAction R V₂\ninst✝⁵ : PseudoMetricSpace R\ninst✝⁴ : BoundedSMul R V₂\ninst✝³ : MonoidWithZero R'\ninst✝² : DistribMulAction R' V₂\ninst✝¹ : PseudoMetricSpace R'\ninst✝ : BoundedSMul R' V₂\nr : R\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nx : V₁\nthis : ‖r • ↑f x‖ ≤ dist r 0 * ‖↑f x‖\n⊢ ‖(r • ↑f) x‖ ≤ dist r 0 * (b * ‖x‖)\n[PROOFSTEP]\nrefine' this.trans _\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝¹¹ : SeminormedAddCommGroup V\ninst✝¹⁰ : SeminormedAddCommGroup V₁\ninst✝⁹ : SeminormedAddCommGroup V₂\ninst✝⁸ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nR : Type u_5\nR' : Type u_6\ninst✝⁷ : MonoidWithZero R\ninst✝⁶ : DistribMulAction R V₂\ninst✝⁵ : PseudoMetricSpace R\ninst✝⁴ : BoundedSMul R V₂\ninst✝³ : MonoidWithZero R'\ninst✝² : DistribMulAction R' V₂\ninst✝¹ : PseudoMetricSpace R'\ninst✝ : BoundedSMul R' V₂\nr : R\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nx : V₁\nthis : ‖r • ↑f x‖ ≤ dist r 0 * ‖↑f x‖\n⊢ dist r 0 * ‖↑f x‖ ≤ dist r 0 * (b * ‖x‖)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝¹¹ : SeminormedAddCommGroup V\ninst✝¹⁰ : SeminormedAddCommGroup V₁\ninst✝⁹ : SeminormedAddCommGroup V₂\ninst✝⁸ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nR : Type u_5\nR' : Type u_6\ninst✝⁷ : MonoidWithZero R\ninst✝⁶ : DistribMulAction R V₂\ninst✝⁵ : PseudoMetricSpace R\ninst✝⁴ : BoundedSMul R V₂\ninst✝³ : MonoidWithZero R'\ninst✝² : DistribMulAction R' V₂\ninst✝¹ : PseudoMetricSpace R'\ninst✝ : BoundedSMul R' V₂\nr : R\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nx : V₁\nthis : ‖r • ↑f x‖ ≤ dist r 0 * ‖↑f x‖\n⊢ ‖↑f x‖ ≤ b * ‖x‖\n[PROOFSTEP]\nexact hb x\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nn : ℕ\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nv : V₁\n⊢ ‖(n • ↑f) v‖ ≤ n • b * ‖v‖\n[PROOFSTEP]\nrw [Pi.smul_apply, nsmul_eq_mul, mul_assoc]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nn : ℕ\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nv : V₁\n⊢ ‖n • ↑f v‖ ≤ ↑n * (b * ‖v‖)\n[PROOFSTEP]\nexact (norm_nsmul_le _ _).trans (by gcongr; apply hb)\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nn : ℕ\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nv : V₁\n⊢ ↑n * ‖↑f v‖ ≤ ↑n * (b * ‖v‖)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nn : ℕ\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nv : V₁\n⊢ ‖↑f v‖ ≤ b * ‖v‖\n[PROOFSTEP]\napply hb\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nz : ℤ\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nv : V₁\n⊢ ‖(z • ↑f) v‖ ≤ ‖z‖ • b * ‖v‖\n[PROOFSTEP]\nrw [Pi.smul_apply, smul_eq_mul, mul_assoc]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nz : ℤ\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nv : V₁\n⊢ ‖z • ↑f v‖ ≤ ‖z‖ * (b * ‖v‖)\n[PROOFSTEP]\nexact (norm_zsmul_le _ _).trans (by gcongr; apply hb)\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nz : ℤ\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nv : V₁\n⊢ ‖z‖ * ‖↑f v‖ ≤ ‖z‖ * (b * ‖v‖)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nz : ℤ\nf : NormedAddGroupHom V₁ V₂\nb : ℝ\nhb : ∀ (v : V₁), ‖toFun f v‖ ≤ b * ‖v‖\nv : V₁\n⊢ ‖↑f v‖ ≤ b * ‖v‖\n[PROOFSTEP]\napply hb\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nι : Type u_5\ns : Finset ι\nf : ι → NormedAddGroupHom V₁ V₂\nv : V₁\n⊢ ↑(∑ i in s, f i) v = ∑ i in s, ↑(f i) v\n[PROOFSTEP]\nsimp only [coe_sum, Finset.sum_apply]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nf : NormedAddGroupHom V₁ V₂\nv : V₁\n⊢ ‖g‖ * ‖↑f v‖ ≤ ‖g‖ * (‖f‖ * ‖v‖)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nf : NormedAddGroupHom V₁ V₂\nv : V₁\n⊢ ‖↑f v‖ ≤ ‖f‖ * ‖v‖\n[PROOFSTEP]\napply le_opNorm\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g✝ : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nf : NormedAddGroupHom V₁ V₂\nv : V₁\n⊢ ‖g‖ * (‖f‖ * ‖v‖) = ‖g‖ * ‖f‖ * ‖v‖\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g✝ : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nC₁ C₂ : ℝ\nhg : ‖g‖ ≤ C₂\nhf : ‖f‖ ≤ C₁\n⊢ ‖g‖ * ‖f‖ ≤ C₂ * C₁\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase b0\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g✝ : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nC₁ C₂ : ℝ\nhg : ‖g‖ ≤ C₂\nhf : ‖f‖ ≤ C₁\n⊢ 0 ≤ C₂\n[PROOFSTEP]\nexact le_trans (norm_nonneg _) hg\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g✝ : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nC₁ C₂ C₃ : ℝ\nh : C₃ = C₂ * C₁\nhg : ‖g‖ ≤ C₂\nhf : ‖f‖ ≤ C₁\n⊢ ‖NormedAddGroupHom.comp g f‖ ≤ C₃\n[PROOFSTEP]\nrw [h]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g✝ : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nC₁ C₂ C₃ : ℝ\nh : C₃ = C₂ * C₁\nhg : ‖g‖ ≤ C₂\nhf : ‖f‖ ≤ C₁\n⊢ ‖NormedAddGroupHom.comp g f‖ ≤ C₂ * C₁\n[PROOFSTEP]\nexact norm_comp_le_of_le hg hf\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g✝ : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\n⊢ ∀ (a b : NormedAddGroupHom V₁ V₂),\n    (fun f => NormedAddGroupHom.comp g f) (a + b) =\n      (fun f => NormedAddGroupHom.comp g f) a + (fun f => NormedAddGroupHom.comp g f) b\n[PROOFSTEP]\nintros\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g✝ : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\na✝ b✝ : NormedAddGroupHom V₁ V₂\n⊢ (fun f => NormedAddGroupHom.comp g f) (a✝ + b✝) =\n    (fun f => NormedAddGroupHom.comp g f) a✝ + (fun f => NormedAddGroupHom.comp g f) b✝\n[PROOFSTEP]\next\n[GOAL]\ncase H\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g✝ : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\na✝ b✝ : NormedAddGroupHom V₁ V₂\nx✝ : V₁\n⊢ ↑((fun f => NormedAddGroupHom.comp g f) (a✝ + b✝)) x✝ =\n    ↑((fun f => NormedAddGroupHom.comp g f) a✝ + (fun f => NormedAddGroupHom.comp g f) b✝) x✝\n[PROOFSTEP]\nexact map_add g _ _\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\n⊢ ∀ (a b : NormedAddGroupHom V₂ V₃),\n    (fun g =>\n          AddMonoidHom.mk' (fun f => NormedAddGroupHom.comp g f)\n            (_ :\n              ∀ (a b : NormedAddGroupHom V₁ V₂),\n                (fun f => NormedAddGroupHom.comp g f) (a + b) =\n                  (fun f => NormedAddGroupHom.comp g f) a + (fun f => NormedAddGroupHom.comp g f) b))\n        (a + b) =\n      (fun g =>\n            AddMonoidHom.mk' (fun f => NormedAddGroupHom.comp g f)\n              (_ :\n                ∀ (a b : NormedAddGroupHom V₁ V₂),\n                  (fun f => NormedAddGroupHom.comp g f) (a + b) =\n                    (fun f => NormedAddGroupHom.comp g f) a + (fun f => NormedAddGroupHom.comp g f) b))\n          a +\n        (fun g =>\n            AddMonoidHom.mk' (fun f => NormedAddGroupHom.comp g f)\n              (_ :\n                ∀ (a b : NormedAddGroupHom V₁ V₂),\n                  (fun f => NormedAddGroupHom.comp g f) (a + b) =\n                    (fun f => NormedAddGroupHom.comp g f) a + (fun f => NormedAddGroupHom.comp g f) b))\n          b\n[PROOFSTEP]\nintros\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\na✝ b✝ : NormedAddGroupHom V₂ V₃\n⊢ (fun g =>\n        AddMonoidHom.mk' (fun f => NormedAddGroupHom.comp g f)\n          (_ :\n            ∀ (a b : NormedAddGroupHom V₁ V₂),\n              (fun f => NormedAddGroupHom.comp g f) (a + b) =\n                (fun f => NormedAddGroupHom.comp g f) a + (fun f => NormedAddGroupHom.comp g f) b))\n      (a✝ + b✝) =\n    (fun g =>\n          AddMonoidHom.mk' (fun f => NormedAddGroupHom.comp g f)\n            (_ :\n              ∀ (a b : NormedAddGroupHom V₁ V₂),\n                (fun f => NormedAddGroupHom.comp g f) (a + b) =\n                  (fun f => NormedAddGroupHom.comp g f) a + (fun f => NormedAddGroupHom.comp g f) b))\n        a✝ +\n      (fun g =>\n          AddMonoidHom.mk' (fun f => NormedAddGroupHom.comp g f)\n            (_ :\n              ∀ (a b : NormedAddGroupHom V₁ V₂),\n                (fun f => NormedAddGroupHom.comp g f) (a + b) =\n                  (fun f => NormedAddGroupHom.comp g f) a + (fun f => NormedAddGroupHom.comp g f) b))\n        b✝\n[PROOFSTEP]\next\n[GOAL]\ncase h.H\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf g : NormedAddGroupHom V₁ V₂\na✝ b✝ : NormedAddGroupHom V₂ V₃\nx✝¹ : NormedAddGroupHom V₁ V₂\nx✝ : V₁\n⊢ ↑(↑((fun g =>\n                AddMonoidHom.mk' (fun f => NormedAddGroupHom.comp g f)\n                  (_ :\n                    ∀ (a b : NormedAddGroupHom V₁ V₂),\n                      (fun f => NormedAddGroupHom.comp g f) (a + b) =\n                        (fun f => NormedAddGroupHom.comp g f) a + (fun f => NormedAddGroupHom.comp g f) b))\n              (a✝ + b✝))\n          x✝¹)\n      x✝ =\n    ↑(↑((fun g =>\n                  AddMonoidHom.mk' (fun f => NormedAddGroupHom.comp g f)\n                    (_ :\n                      ∀ (a b : NormedAddGroupHom V₁ V₂),\n                        (fun f => NormedAddGroupHom.comp g f) (a + b) =\n                          (fun f => NormedAddGroupHom.comp g f) a + (fun f => NormedAddGroupHom.comp g f) b))\n                a✝ +\n              (fun g =>\n                  AddMonoidHom.mk' (fun f => NormedAddGroupHom.comp g f)\n                    (_ :\n                      ∀ (a b : NormedAddGroupHom V₁ V₂),\n                        (fun f => NormedAddGroupHom.comp g f) (a + b) =\n                          (fun f => NormedAddGroupHom.comp g f) a + (fun f => NormedAddGroupHom.comp g f) b))\n                b✝)\n          x✝¹)\n      x✝\n[PROOFSTEP]\nsimp only [comp_apply, Pi.add_apply, Function.comp_apply, AddMonoidHom.add_apply, AddMonoidHom.mk'_apply, coe_add]\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nf : NormedAddGroupHom V₂ V₃\n⊢ NormedAddGroupHom.comp f 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase H\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g : NormedAddGroupHom V₁ V₂\nf : NormedAddGroupHom V₂ V₃\nx✝ : V₁\n⊢ ↑(NormedAddGroupHom.comp f 0) x✝ = ↑0 x✝\n[PROOFSTEP]\nexact map_zero f\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g f : NormedAddGroupHom V₁ V₂\n⊢ NormedAddGroupHom.comp 0 f = 0\n[PROOFSTEP]\next\n[GOAL]\ncase H\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ g f : NormedAddGroupHom V₁ V₂\nx✝ : V₁\n⊢ ↑(NormedAddGroupHom.comp 0 f) x✝ = ↑0 x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup V₁\ninst✝² : SeminormedAddCommGroup V₂\ninst✝¹ : SeminormedAddCommGroup V₃\nf✝ g✝ : NormedAddGroupHom V₁ V₂\nV₄ : Type u_5\ninst✝ : SeminormedAddCommGroup V₄\nh : NormedAddGroupHom V₃ V₄\ng : NormedAddGroupHom V₂ V₃\nf : NormedAddGroupHom V₁ V₂\n⊢ NormedAddGroupHom.comp (NormedAddGroupHom.comp h g) f = NormedAddGroupHom.comp h (NormedAddGroupHom.comp g f)\n[PROOFSTEP]\next\n[GOAL]\ncase H\nV : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nV₃ : Type u_4\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup V₁\ninst✝² : SeminormedAddCommGroup V₂\ninst✝¹ : SeminormedAddCommGroup V₃\nf✝ g✝ : NormedAddGroupHom V₁ V₂\nV₄ : Type u_5\ninst✝ : SeminormedAddCommGroup V₄\nh : NormedAddGroupHom V₃ V₄\ng : NormedAddGroupHom V₂ V₃\nf : NormedAddGroupHom V₁ V₂\nx✝ : V₁\n⊢ ↑(NormedAddGroupHom.comp (NormedAddGroupHom.comp h g) f) x✝ =\n    ↑(NormedAddGroupHom.comp h (NormedAddGroupHom.comp g f)) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\ns : AddSubgroup V\nv : { x // x ∈ s }\n⊢ ‖↑v‖ ≤ 1 * ‖v‖\n[PROOFSTEP]\nrw [one_mul, AddSubgroup.coe_norm]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nv : V₁\n⊢ v ∈ ker f ↔ ↑f v = 0\n[PROOFSTEP]\nerw [f.toAddMonoidHom.mem_ker, coe_toAddMonoidHom]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nh : NormedAddGroupHom.comp g f = 0\nv : V₁\n⊢ ↑f v ∈ ker g\n[PROOFSTEP]\nrw [g.mem_ker, ← comp_apply g f, h, zero_apply]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nh : NormedAddGroupHom.comp g f = 0\nv w : V₁\n⊢ (fun v => { val := ↑f v, property := (_ : ↑f v ∈ ker g) }) (v + w) =\n    (fun v => { val := ↑f v, property := (_ : ↑f v ∈ ker g) }) v +\n      (fun v => { val := ↑f v, property := (_ : ↑f v ∈ ker g) }) w\n[PROOFSTEP]\nsimp only [map_add, AddSubmonoid.mk_add_mk]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nh : NormedAddGroupHom.comp g f = 0\n⊢ NormedAddGroupHom.comp (incl (ker g)) (lift f g h) = f\n[PROOFSTEP]\next\n[GOAL]\ncase H\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nh : NormedAddGroupHom.comp g f = 0\nx✝ : V₁\n⊢ ↑(NormedAddGroupHom.comp (incl (ker g)) (lift f g h)) x✝ = ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\n⊢ ker 0 = ⊤\n[PROOFSTEP]\next\n[GOAL]\ncase h\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\nx✝ : V₁\n⊢ x✝ ∈ ker 0 ↔ x✝ ∈ ⊤\n[PROOFSTEP]\nsimp [mem_ker]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\n⊢ range (NormedAddGroupHom.comp g f) = AddSubgroup.map (toAddMonoidHom g) (range f)\n[PROOFSTEP]\nerw [AddMonoidHom.map_range]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\n⊢ range (NormedAddGroupHom.comp g f) = AddMonoidHom.range (AddMonoidHom.comp (toAddMonoidHom g) (toAddMonoidHom f))\n[PROOFSTEP]\nrfl\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\ns : AddSubgroup V₁\n⊢ range (incl s) = s\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\ns : AddSubgroup V₁\nx : V₁\n⊢ x ∈ range (incl s) ↔ x ∈ s\n[PROOFSTEP]\nexact ⟨fun ⟨y, hy⟩ => by rw [← hy]; simp, fun hx => ⟨⟨x, hx⟩, by simp⟩⟩\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\ns : AddSubgroup V₁\nx : V₁\nx✝ : x ∈ range (incl s)\ny : { x // x ∈ s }\nhy : ↑(toAddMonoidHom (incl s)) y = x\n⊢ x ∈ s\n[PROOFSTEP]\nrw [← hy]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\ns : AddSubgroup V₁\nx : V₁\nx✝ : x ∈ range (incl s)\ny : { x // x ∈ s }\nhy : ↑(toAddMonoidHom (incl s)) y = x\n⊢ ↑(toAddMonoidHom (incl s)) y ∈ s\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\ns : AddSubgroup V₁\nx : V₁\nhx : x ∈ s\n⊢ ↑(toAddMonoidHom (incl s)) { val := x, property := hx } = x\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\n⊢ range (NormedAddGroupHom.comp f (incl ⊤)) = range f\n[PROOFSTEP]\nsimp [comp_range, incl_range, ← AddMonoidHom.range_eq_map]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V₁ V₂\ng : NormedAddGroupHom V₂ V₃\n⊢ AddMonoidHom.range (toAddMonoidHom f) = range f\n[PROOFSTEP]\nrfl\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\n⊢ NormNoninc f ↔ ‖f‖ ≤ 1\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => fun v => _⟩\n[GOAL]\ncase refine'_1\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nh : NormNoninc f\n⊢ ‖f‖ ≤ 1\n[PROOFSTEP]\nrefine' opNorm_le_bound _ zero_le_one fun v => _\n[GOAL]\ncase refine'_1\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nh : NormNoninc f\nv : V\n⊢ ‖↑f v‖ ≤ 1 * ‖v‖\n[PROOFSTEP]\nsimpa [one_mul] using h v\n[GOAL]\ncase refine'_2\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nh : ‖f‖ ≤ 1\nv : V\n⊢ ‖↑f v‖ ≤ ‖v‖\n[PROOFSTEP]\nsimpa using le_of_opNorm_le f h v\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nv : V₁\n⊢ ‖↑0 v‖ ≤ ‖v‖\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁴ : SeminormedAddCommGroup V\ninst✝³ : SeminormedAddCommGroup W\ninst✝² : SeminormedAddCommGroup V₁\ninst✝¹ : SeminormedAddCommGroup V₂\ninst✝ : SeminormedAddCommGroup V₃\nf✝ : NormedAddGroupHom V W\nf : NormedAddGroupHom V₁ V₂\nh : NormNoninc (-f)\nx : V₁\n⊢ ‖↑f x‖ ≤ ‖x‖\n[PROOFSTEP]\nsimpa using h x\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\n⊢ NormedAddGroupHom.comp f (ι f g) = NormedAddGroupHom.comp g (ι f g)\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nx : { x // x ∈ equalizer f g }\n⊢ ↑(NormedAddGroupHom.comp f (ι f g)) x = ↑(NormedAddGroupHom.comp g (ι f g)) x\n[PROOFSTEP]\nrw [comp_apply, comp_apply, ← sub_eq_zero, ← NormedAddGroupHom.sub_apply]\n[GOAL]\ncase H\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nx : { x // x ∈ equalizer f g }\n⊢ ↑(f - g) (↑(ι f g) x) = 0\n[PROOFSTEP]\nexact x.2\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V\nh : NormedAddGroupHom.comp f φ = NormedAddGroupHom.comp g φ\nv : V₁\n⊢ ↑(f - g) (↑φ v) = 0\n[PROOFSTEP]\nrw [NormedAddGroupHom.sub_apply, sub_eq_zero, ← comp_apply, h, comp_apply]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V\nh : NormedAddGroupHom.comp f φ = NormedAddGroupHom.comp g φ\nv₁ v₂ : V₁\n⊢ (fun v => { val := ↑φ v, property := (_ : ↑(f - g) (↑φ v) = 0) }) (v₁ + v₂) =\n    (fun v => { val := ↑φ v, property := (_ : ↑(f - g) (↑φ v) = 0) }) v₁ +\n      (fun v => { val := ↑φ v, property := (_ : ↑(f - g) (↑φ v) = 0) }) v₂\n[PROOFSTEP]\next\n[GOAL]\ncase a\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V\nh : NormedAddGroupHom.comp f φ = NormedAddGroupHom.comp g φ\nv₁ v₂ : V₁\n⊢ ↑((fun v => { val := ↑φ v, property := (_ : ↑(f - g) (↑φ v) = 0) }) (v₁ + v₂)) =\n    ↑((fun v => { val := ↑φ v, property := (_ : ↑(f - g) (↑φ v) = 0) }) v₁ +\n        (fun v => { val := ↑φ v, property := (_ : ↑(f - g) (↑φ v) = 0) }) v₂)\n[PROOFSTEP]\nsimp only [map_add, AddSubgroup.coe_add, Subtype.coe_mk]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V\nh : NormedAddGroupHom.comp f φ = NormedAddGroupHom.comp g φ\n⊢ ∃ C, ∀ (v : V₁), ‖(fun v => { val := ↑φ v, property := (_ : ↑(f - g) (↑φ v) = 0) }) v‖ ≤ C * ‖v‖\n[PROOFSTEP]\nobtain ⟨C, _C_pos, hC⟩ := φ.bound\n[GOAL]\ncase intro.intro\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V\nh : NormedAddGroupHom.comp f φ = NormedAddGroupHom.comp g φ\nC : ℝ\n_C_pos : 0 < C\nhC : ∀ (x : V₁), ‖↑φ x‖ ≤ C * ‖x‖\n⊢ ∃ C, ∀ (v : V₁), ‖(fun v => { val := ↑φ v, property := (_ : ↑(f - g) (↑φ v) = 0) }) v‖ ≤ C * ‖v‖\n[PROOFSTEP]\nexact ⟨C, hC⟩\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V\nh : NormedAddGroupHom.comp f φ = NormedAddGroupHom.comp g φ\n⊢ NormedAddGroupHom.comp (ι f g) (lift φ h) = φ\n[PROOFSTEP]\next\n[GOAL]\ncase H\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V\nh : NormedAddGroupHom.comp f φ = NormedAddGroupHom.comp g φ\nx✝ : V₁\n⊢ ↑(NormedAddGroupHom.comp (ι f g) (lift φ h)) x✝ = ↑φ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nψ : NormedAddGroupHom V₁ { x // x ∈ equalizer f g }\n⊢ NormedAddGroupHom.comp f (NormedAddGroupHom.comp (ι f g) ψ) =\n    NormedAddGroupHom.comp g (NormedAddGroupHom.comp (ι f g) ψ)\n[PROOFSTEP]\nrw [← comp_assoc, ← comp_assoc, comp_ι_eq]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : { φ // NormedAddGroupHom.comp f φ = NormedAddGroupHom.comp g φ }\n⊢ (fun ψ =>\n        { val := NormedAddGroupHom.comp (ι f g) ψ,\n          property :=\n            (_ :\n              NormedAddGroupHom.comp f (NormedAddGroupHom.comp (ι f g) ψ) =\n                NormedAddGroupHom.comp g (NormedAddGroupHom.comp (ι f g) ψ)) })\n      ((fun φ => lift ↑φ (_ : NormedAddGroupHom.comp f ↑φ = NormedAddGroupHom.comp g ↑φ)) φ) =\n    φ\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nψ : NormedAddGroupHom V₁ { x // x ∈ equalizer f g }\n⊢ (fun φ => lift ↑φ (_ : NormedAddGroupHom.comp f ↑φ = NormedAddGroupHom.comp g ↑φ))\n      ((fun ψ =>\n          { val := NormedAddGroupHom.comp (ι f g) ψ,\n            property :=\n              (_ :\n                NormedAddGroupHom.comp f (NormedAddGroupHom.comp (ι f g) ψ) =\n                  NormedAddGroupHom.comp g (NormedAddGroupHom.comp (ι f g) ψ)) })\n        ψ) =\n    ψ\n[PROOFSTEP]\next\n[GOAL]\ncase H.a\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nψ : NormedAddGroupHom V₁ { x // x ∈ equalizer f g }\nx✝ : V₁\n⊢ ↑(↑((fun φ => lift ↑φ (_ : NormedAddGroupHom.comp f ↑φ = NormedAddGroupHom.comp g ↑φ))\n            ((fun ψ =>\n                { val := NormedAddGroupHom.comp (ι f g) ψ,\n                  property :=\n                    (_ :\n                      NormedAddGroupHom.comp f (NormedAddGroupHom.comp (ι f g) ψ) =\n                        NormedAddGroupHom.comp g (NormedAddGroupHom.comp (ι f g) ψ)) })\n              ψ))\n        x✝) =\n    ↑(↑ψ x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V₂\nψ : NormedAddGroupHom W₁ W₂\nhf : NormedAddGroupHom.comp ψ f₁ = NormedAddGroupHom.comp f₂ φ\nhg : NormedAddGroupHom.comp ψ g₁ = NormedAddGroupHom.comp g₂ φ\n⊢ NormedAddGroupHom.comp f₂ (NormedAddGroupHom.comp φ (ι f₁ g₁)) =\n    NormedAddGroupHom.comp g₂ (NormedAddGroupHom.comp φ (ι f₁ g₁))\n[PROOFSTEP]\nsimp only [← comp_assoc, ← hf, ← hg]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V₂\nψ : NormedAddGroupHom W₁ W₂\nhf : NormedAddGroupHom.comp ψ f₁ = NormedAddGroupHom.comp f₂ φ\nhg : NormedAddGroupHom.comp ψ g₁ = NormedAddGroupHom.comp g₂ φ\n⊢ NormedAddGroupHom.comp (NormedAddGroupHom.comp ψ f₁) (ι f₁ g₁) =\n    NormedAddGroupHom.comp (NormedAddGroupHom.comp ψ g₁) (ι f₁ g₁)\n[PROOFSTEP]\nsimp only [comp_assoc, comp_ι_eq f₁ g₁]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V₂\nψ : NormedAddGroupHom W₁ W₂\nφ' : NormedAddGroupHom V₂ V₃\nψ' : NormedAddGroupHom W₂ W₃\n⊢ map (id V₁) (id W₁) (_ : NormedAddGroupHom.comp (id W₁) f₁ = NormedAddGroupHom.comp (id W₁) f₁)\n      (_ : NormedAddGroupHom.comp (id W₁) g₁ = NormedAddGroupHom.comp (id W₁) g₁) =\n    id { x // x ∈ equalizer f₁ g₁ }\n[PROOFSTEP]\next\n[GOAL]\ncase H.a\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V₂\nψ : NormedAddGroupHom W₁ W₂\nφ' : NormedAddGroupHom V₂ V₃\nψ' : NormedAddGroupHom W₂ W₃\nx✝ : { x // x ∈ equalizer f₁ g₁ }\n⊢ ↑(↑(map (id V₁) (id W₁) (_ : NormedAddGroupHom.comp (id W₁) f₁ = NormedAddGroupHom.comp (id W₁) f₁)\n            (_ : NormedAddGroupHom.comp (id W₁) g₁ = NormedAddGroupHom.comp (id W₁) g₁))\n        x✝) =\n    ↑(↑(id { x // x ∈ equalizer f₁ g₁ }) x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V₂\nψ : NormedAddGroupHom W₁ W₂\nφ' : NormedAddGroupHom V₂ V₃\nψ' : NormedAddGroupHom W₂ W₃\nhf : NormedAddGroupHom.comp ψ f₁ = NormedAddGroupHom.comp f₂ φ\nhf' : NormedAddGroupHom.comp ψ' f₂ = NormedAddGroupHom.comp f₃ φ'\n⊢ NormedAddGroupHom.comp (NormedAddGroupHom.comp ψ' ψ) f₁ = NormedAddGroupHom.comp f₃ (NormedAddGroupHom.comp φ' φ)\n[PROOFSTEP]\nrw [comp_assoc, hf, ← comp_assoc, hf', comp_assoc]\n[GOAL]\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V₂\nψ : NormedAddGroupHom W₁ W₂\nφ' : NormedAddGroupHom V₂ V₃\nψ' : NormedAddGroupHom W₂ W₃\nhf : NormedAddGroupHom.comp ψ f₁ = NormedAddGroupHom.comp f₂ φ\nhg : NormedAddGroupHom.comp ψ g₁ = NormedAddGroupHom.comp g₂ φ\nhf' : NormedAddGroupHom.comp ψ' f₂ = NormedAddGroupHom.comp f₃ φ'\nhg' : NormedAddGroupHom.comp ψ' g₂ = NormedAddGroupHom.comp g₃ φ'\n⊢ NormedAddGroupHom.comp (map φ' ψ' hf' hg') (map φ ψ hf hg) =\n    map (NormedAddGroupHom.comp φ' φ) (NormedAddGroupHom.comp ψ' ψ)\n      (_ :\n        NormedAddGroupHom.comp (NormedAddGroupHom.comp ψ' ψ) f₁ =\n          NormedAddGroupHom.comp f₃ (NormedAddGroupHom.comp φ' φ))\n      (_ :\n        NormedAddGroupHom.comp (NormedAddGroupHom.comp ψ' ψ) g₁ =\n          NormedAddGroupHom.comp g₃ (NormedAddGroupHom.comp φ' φ))\n[PROOFSTEP]\next\n[GOAL]\ncase H.a\nV : Type u_1\nW : Type u_2\nV₁ : Type u_3\nV₂ : Type u_4\nV₃ : Type u_5\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : SeminormedAddCommGroup W\ninst✝⁵ : SeminormedAddCommGroup V₁\ninst✝⁴ : SeminormedAddCommGroup V₂\ninst✝³ : SeminormedAddCommGroup V₃\nf : NormedAddGroupHom V W\nW₁ : Type u_6\nW₂ : Type u_7\nW₃ : Type u_8\ninst✝² : SeminormedAddCommGroup W₁\ninst✝¹ : SeminormedAddCommGroup W₂\ninst✝ : SeminormedAddCommGroup W₃\ng : NormedAddGroupHom V W\nf₁ g₁ : NormedAddGroupHom V₁ W₁\nf₂ g₂ : NormedAddGroupHom V₂ W₂\nf₃ g₃ : NormedAddGroupHom V₃ W₃\nφ : NormedAddGroupHom V₁ V₂\nψ : NormedAddGroupHom W₁ W₂\nφ' : NormedAddGroupHom V₂ V₃\nψ' : NormedAddGroupHom W₂ W₃\nhf : NormedAddGroupHom.comp ψ f₁ = NormedAddGroupHom.comp f₂ φ\nhg : NormedAddGroupHom.comp ψ g₁ = NormedAddGroupHom.comp g₂ φ\nhf' : NormedAddGroupHom.comp ψ' f₂ = NormedAddGroupHom.comp f₃ φ'\nhg' : NormedAddGroupHom.comp ψ' g₂ = NormedAddGroupHom.comp g₃ φ'\nx✝ : { x // x ∈ equalizer f₁ g₁ }\n⊢ ↑(↑(NormedAddGroupHom.comp (map φ' ψ' hf' hg') (map φ ψ hf hg)) x✝) =\n    ↑(↑(map (NormedAddGroupHom.comp φ' φ) (NormedAddGroupHom.comp ψ' ψ)\n            (_ :\n              NormedAddGroupHom.comp (NormedAddGroupHom.comp ψ' ψ) f₁ =\n                NormedAddGroupHom.comp f₃ (NormedAddGroupHom.comp φ' φ))\n            (_ :\n              NormedAddGroupHom.comp (NormedAddGroupHom.comp ψ' ψ) g₁ =\n                NormedAddGroupHom.comp g₃ (NormedAddGroupHom.comp φ' φ)))\n        x✝)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Normed.Group.Hom", "llama_tokens": 34103, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7122321842389469, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.3755717992319168}}
{"text": "[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\n⊢ HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\ninduction' q with q hq\n[GOAL]\ncase zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\n⊢ HomologicalComplex.Hom.f (Q Nat.zero) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < Nat.zero) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\nsimp only [Nat.zero_eq, Q_zero, HomologicalComplex.zero_f_apply, Nat.not_lt_zero, Finset.filter_False, Finset.sum_empty]\n[GOAL]\ncase succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n⊢ HomologicalComplex.Hom.f (Q (Nat.succ q)) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\nby_cases hqn : q + 1 ≤ n + 1\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\n⊢ HomologicalComplex.Hom.f (Q (Nat.succ q)) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : ¬q + 1 ≤ n + 1\n⊢ HomologicalComplex.Hom.f (Q (Nat.succ q)) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : ¬q + 1 ≤ n + 1\n⊢ HomologicalComplex.Hom.f (Q (Nat.succ q)) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\nrw [Q_is_eventually_constant (show n + 1 ≤ q by linarith), hq]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : ¬q + 1 ≤ n + 1\n⊢ n + 1 ≤ q\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : ¬q + 1 ≤ n + 1\n⊢ ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i) =\n    ∑ i in Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase neg.e_s\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : ¬q + 1 ≤ n + 1\n⊢ Finset.filter (fun i => ↑i < q) Finset.univ = Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase neg.e_s.a.mk\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : ¬q + 1 ≤ n + 1\nx : ℕ\nhx : x < n + 1\n⊢ { val := x, isLt := hx } ∈ Finset.filter (fun i => ↑i < q) Finset.univ ↔\n    { val := x, isLt := hx } ∈ Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ\n[PROOFSTEP]\nsimp only [Nat.succ_eq_add_one, Finset.mem_filter, Finset.mem_univ, true_and]\n[GOAL]\ncase neg.e_s.a.mk\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : ¬q + 1 ≤ n + 1\nx : ℕ\nhx : x < n + 1\n⊢ x < q ↔ x < q + 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase neg.e_s.a.mk.mp\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : ¬q + 1 ≤ n + 1\nx : ℕ\nhx : x < n + 1\n⊢ x < q → x < q + 1\n[PROOFSTEP]\nintro\n[GOAL]\ncase neg.e_s.a.mk.mpr\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : ¬q + 1 ≤ n + 1\nx : ℕ\nhx : x < n + 1\n⊢ x < q + 1 → x < q\n[PROOFSTEP]\nintro\n[GOAL]\ncase neg.e_s.a.mk.mp\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : ¬q + 1 ≤ n + 1\nx : ℕ\nhx : x < n + 1\na✝ : x < q\n⊢ x < q + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg.e_s.a.mk.mpr\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : ¬q + 1 ≤ n + 1\nx : ℕ\nhx : x < n + 1\na✝ : x < q + 1\n⊢ x < q\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\n⊢ HomologicalComplex.Hom.f (Q (Nat.succ q)) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\ncases' Nat.le.dest (Nat.succ_le_succ_iff.mp hqn) with a ha\n[GOAL]\ncase pos.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\n⊢ HomologicalComplex.Hom.f (Q (Nat.succ q)) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\nrw [Q_succ, HomologicalComplex.sub_f_apply, HomologicalComplex.comp_f, hq]\n[GOAL]\ncase pos.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\n⊢ ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n        HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i) -\n      HomologicalComplex.Hom.f (P q) (n + 1) ≫ HomologicalComplex.Hom.f (Hσ q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase pos.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\n⊢ ∑ i in Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n        HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i) -\n      HomologicalComplex.Hom.f (P q) (n + 1) ≫ HomologicalComplex.Hom.f (Hσ q) (n + 1)\n[PROOFSTEP]\nconv_rhs => rw [sub_eq_add_neg, add_comm]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\n| ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i) -\n    HomologicalComplex.Hom.f (P q) (n + 1) ≫ HomologicalComplex.Hom.f (Hσ q) (n + 1)\n[PROOFSTEP]\nrw [sub_eq_add_neg, add_comm]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\n| ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i) -\n    HomologicalComplex.Hom.f (P q) (n + 1) ≫ HomologicalComplex.Hom.f (Hσ q) (n + 1)\n[PROOFSTEP]\nrw [sub_eq_add_neg, add_comm]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\n| ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i) -\n    HomologicalComplex.Hom.f (P q) (n + 1) ≫ HomologicalComplex.Hom.f (Hσ q) (n + 1)\n[PROOFSTEP]\nrw [sub_eq_add_neg, add_comm]\n[GOAL]\ncase pos.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\n⊢ ∑ i in Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i) =\n    -HomologicalComplex.Hom.f (P q) (n + 1) ≫ HomologicalComplex.Hom.f (Hσ q) (n + 1) +\n      ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n        HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\nlet q' : Fin (n + 1) := ⟨q, Nat.succ_le_iff.mp hqn⟩\n[GOAL]\ncase pos.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\nq' : Fin (n + 1) := { val := q, isLt := (_ : q < n + 1) }\n⊢ ∑ i in Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i) =\n    -HomologicalComplex.Hom.f (P q) (n + 1) ≫ HomologicalComplex.Hom.f (Hσ q) (n + 1) +\n      ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n        HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\nrw [← @Finset.add_sum_erase _ _ _ _ _ _ q' (by simp)]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\nq' : Fin (n + 1) := { val := q, isLt := (_ : q < n + 1) }\n⊢ q' ∈ Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\nq' : Fin (n + 1) := { val := q, isLt := (_ : q < n + 1) }\n⊢ HomologicalComplex.Hom.f (P ↑q') (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm q')) ≫ SimplicialObject.σ X (↑Fin.revPerm q') +\n      ∑ x in Finset.erase (Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ) q',\n        HomologicalComplex.Hom.f (P ↑x) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm x)) ≫ SimplicialObject.σ X (↑Fin.revPerm x) =\n    -HomologicalComplex.Hom.f (P q) (n + 1) ≫ HomologicalComplex.Hom.f (Hσ q) (n + 1) +\n      ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n        HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase pos.intro.e_a\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\nq' : Fin (n + 1) := { val := q, isLt := (_ : q < n + 1) }\n⊢ HomologicalComplex.Hom.f (P ↑q') (n + 1) ≫\n      SimplicialObject.δ X (Fin.succ (↑Fin.revPerm q')) ≫ SimplicialObject.σ X (↑Fin.revPerm q') =\n    -HomologicalComplex.Hom.f (P q) (n + 1) ≫ HomologicalComplex.Hom.f (Hσ q) (n + 1)\n[PROOFSTEP]\nhave hnaq' : n = a + q := by linarith\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\nq' : Fin (n + 1) := { val := q, isLt := (_ : q < n + 1) }\n⊢ n = a + q\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase pos.intro.e_a\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\nq' : Fin (n + 1) := { val := q, isLt := (_ : q < n + 1) }\nhnaq' : n = a + q\n⊢ HomologicalComplex.Hom.f (P ↑q') (n + 1) ≫\n      SimplicialObject.δ X (Fin.succ (↑Fin.revPerm q')) ≫ SimplicialObject.σ X (↑Fin.revPerm q') =\n    -HomologicalComplex.Hom.f (P q) (n + 1) ≫ HomologicalComplex.Hom.f (Hσ q) (n + 1)\n[PROOFSTEP]\nsimp only [Fin.val_mk, (HigherFacesVanish.of_P q n).comp_Hσ_eq hnaq', q'.revPerm_eq hnaq', neg_neg]\n[GOAL]\ncase pos.intro.e_a\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\nq' : Fin (n + 1) := { val := q, isLt := (_ : q < n + 1) }\nhnaq' : n = a + q\n⊢ HomologicalComplex.Hom.f (P q) (n + 1) ≫\n      SimplicialObject.δ X (Fin.succ { val := a, isLt := (_ : a < Nat.succ n) }) ≫\n        SimplicialObject.σ X { val := a, isLt := (_ : a < Nat.succ n) } =\n    HomologicalComplex.Hom.f (P q) (n + 1) ≫\n      SimplicialObject.δ X { val := a + 1, isLt := (_ : Nat.succ a < Nat.succ (n + 1)) } ≫\n        SimplicialObject.σ X { val := a, isLt := (_ : a < Nat.succ n) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos.intro.e_a.e_s\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\nq' : Fin (n + 1) := { val := q, isLt := (_ : q < n + 1) }\n⊢ Finset.erase (Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ) q' = Finset.filter (fun i => ↑i < q) Finset.univ\n[PROOFSTEP]\next ⟨i, hi⟩\n[GOAL]\ncase pos.intro.e_a.e_s.a.mk\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\nq' : Fin (n + 1) := { val := q, isLt := (_ : q < n + 1) }\ni : ℕ\nhi : i < n + 1\n⊢ { val := i, isLt := hi } ∈ Finset.erase (Finset.filter (fun i => ↑i < Nat.succ q) Finset.univ) q' ↔\n    { val := i, isLt := hi } ∈ Finset.filter (fun i => ↑i < q) Finset.univ\n[PROOFSTEP]\nsimp only [Nat.succ_eq_add_one, Nat.lt_succ_iff_lt_or_eq, Finset.mem_univ, forall_true_left, Finset.mem_filter,\n  lt_self_iff_false, or_true, and_self, not_true, Finset.mem_erase, ne_eq, Fin.mk.injEq, true_and]\n[GOAL]\ncase pos.intro.e_a.e_s.a.mk\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn q : ℕ\nhq :\n  HomologicalComplex.Hom.f (Q q) (n + 1) =\n    ∑ i in Finset.filter (fun i => ↑i < q) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\nhqn : q + 1 ≤ n + 1\na : ℕ\nha : q + a = n\nq' : Fin (n + 1) := { val := q, isLt := (_ : q < n + 1) }\ni : ℕ\nhi : i < n + 1\n⊢ ¬i = q ∧ (i < q ∨ i = q) ↔ i < q\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ φ (id X n) = 𝟙 (X.obj (op [n + 1]))\n[PROOFSTEP]\nsimp only [← P_add_Q_f (n + 1) (n + 1), φ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ HomologicalComplex.Hom.f PInfty (n + 1) ≫ (id X n).a +\n      ∑ x : Fin (n + 1),\n        HomologicalComplex.Hom.f (P ↑x) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm x)) ≫ b (id X n) (↑Fin.revPerm x) =\n    HomologicalComplex.Hom.f (P (n + 1)) (n + 1) + HomologicalComplex.Hom.f (Q (n + 1)) (n + 1)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ HomologicalComplex.Hom.f PInfty (n + 1) ≫ (id X n).a = HomologicalComplex.Hom.f (P (n + 1)) (n + 1)\n[PROOFSTEP]\nsimp only [id, PInfty_f, P_f_idem]\n[GOAL]\ncase e_a\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ ∑ x : Fin (n + 1),\n      HomologicalComplex.Hom.f (P ↑x) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm x)) ≫ b (id X n) (↑Fin.revPerm x) =\n    HomologicalComplex.Hom.f (Q (n + 1)) (n + 1)\n[PROOFSTEP]\nexact Eq.trans (by congr; simp) (decomposition_Q n (n + 1)).symm\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ ∑ x : Fin (n + 1),\n      HomologicalComplex.Hom.f (P ↑x) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm x)) ≫ b (id X n) (↑Fin.revPerm x) =\n    ∑ i in Finset.filter (fun i => ↑i < n + 1) Finset.univ,\n      HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n        SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ SimplicialObject.σ X (↑Fin.revPerm i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_s\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ Finset.univ = Finset.filter (fun i => ↑i < n + 1) Finset.univ\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ φ (postComp f h) = φ f ≫ h\n[PROOFSTEP]\nunfold φ postComp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ HomologicalComplex.Hom.f PInfty (n + 1) ≫ { a := f.a ≫ h, b := fun i => b f i ≫ h }.a +\n      ∑ i : Fin (n + 1),\n        HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫\n            b { a := f.a ≫ h, b := fun i => b f i ≫ h } (↑Fin.revPerm i) =\n    (HomologicalComplex.Hom.f PInfty (n + 1) ≫ f.a +\n        ∑ i : Fin (n + 1),\n          HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n            SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ b f (↑Fin.revPerm i)) ≫\n      h\n[PROOFSTEP]\nsimp only [add_comp, sum_comp, assoc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ φ (preComp f g) = NatTrans.app g (op [n + 1]) ≫ φ f\n[PROOFSTEP]\nunfold φ preComp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ HomologicalComplex.Hom.f PInfty (n + 1) ≫\n        { a := NatTrans.app g (op [n + 1]) ≫ f.a, b := fun i => NatTrans.app g (op [n]) ≫ b f i }.a +\n      ∑ i : Fin (n + 1),\n        HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n          SimplicialObject.δ X' (Fin.succ (↑Fin.revPerm i)) ≫\n            b { a := NatTrans.app g (op [n + 1]) ≫ f.a, b := fun i => NatTrans.app g (op [n]) ≫ b f i }\n              (↑Fin.revPerm i) =\n    NatTrans.app g (op [n + 1]) ≫\n      (HomologicalComplex.Hom.f PInfty (n + 1) ≫ f.a +\n        ∑ i : Fin (n + 1),\n          HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫\n            SimplicialObject.δ X (Fin.succ (↑Fin.revPerm i)) ≫ b f (↑Fin.revPerm i))\n[PROOFSTEP]\nsimp only [PInfty_f, comp_add]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ HomologicalComplex.Hom.f (P (n + 1)) (n + 1) ≫ NatTrans.app g (op [n + 1]) ≫ f.a +\n      ∑ x : Fin (n + 1),\n        HomologicalComplex.Hom.f (P ↑x) (n + 1) ≫\n          SimplicialObject.δ X' (Fin.succ (↑Fin.revPerm x)) ≫ NatTrans.app g (op [n]) ≫ b f (↑Fin.revPerm x) =\n    NatTrans.app g (op [n + 1]) ≫ HomologicalComplex.Hom.f (P (n + 1)) (n + 1) ≫ f.a +\n      NatTrans.app g (op [n + 1]) ≫\n        ∑ x : Fin (n + 1),\n          HomologicalComplex.Hom.f (P ↑x) (n + 1) ≫\n            SimplicialObject.δ X (Fin.succ (↑Fin.revPerm x)) ≫ b f (↑Fin.revPerm x)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ HomologicalComplex.Hom.f (P (n + 1)) (n + 1) ≫ NatTrans.app g (op [n + 1]) ≫ f.a =\n    NatTrans.app g (op [n + 1]) ≫ HomologicalComplex.Hom.f (P (n + 1)) (n + 1) ≫ f.a\n[PROOFSTEP]\nsimp only [P_f_naturality_assoc]\n[GOAL]\ncase e_a\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX X' : SimplicialObject C\nn : ℕ\nZ Z' : C\nf : MorphComponents X n Z\ng : X' ⟶ X\nh : Z ⟶ Z'\n⊢ ∑ x : Fin (n + 1),\n      HomologicalComplex.Hom.f (P ↑x) (n + 1) ≫\n        SimplicialObject.δ X' (Fin.succ (↑Fin.revPerm x)) ≫ NatTrans.app g (op [n]) ≫ b f (↑Fin.revPerm x) =\n    NatTrans.app g (op [n + 1]) ≫\n      ∑ x : Fin (n + 1),\n        HomologicalComplex.Hom.f (P ↑x) (n + 1) ≫\n          SimplicialObject.δ X (Fin.succ (↑Fin.revPerm x)) ≫ b f (↑Fin.revPerm x)\n[PROOFSTEP]\nsimp only [comp_sum, P_f_naturality_assoc, SimplicialObject.δ_naturality_assoc]\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.DoldKan.Decomposition", "llama_tokens": 14271, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7279754371026367, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.37535863352728693}}
{"text": "[GOAL]\n⊢ ConcreteCategory TopCat\n[PROOFSTEP]\ndsimp [TopCat]\n[GOAL]\n⊢ ConcreteCategory (Bundled TopologicalSpace)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX Y : TopCat\nf : ↑X ≃ₜ ↑Y\n⊢ Homeomorph.toContinuousMap f ≫ Homeomorph.toContinuousMap (Homeomorph.symm f) = 𝟙 X\n[PROOFSTEP]\next\n[GOAL]\ncase w\nX Y : TopCat\nf : ↑X ≃ₜ ↑Y\nx✝ : (forget TopCat).obj X\n⊢ ↑(Homeomorph.toContinuousMap f ≫ Homeomorph.toContinuousMap (Homeomorph.symm f)) x✝ = ↑(𝟙 X) x✝\n[PROOFSTEP]\nexact f.symm_apply_apply _\n[GOAL]\nX Y : TopCat\nf : ↑X ≃ₜ ↑Y\n⊢ Homeomorph.toContinuousMap (Homeomorph.symm f) ≫ Homeomorph.toContinuousMap f = 𝟙 Y\n[PROOFSTEP]\next\n[GOAL]\ncase w\nX Y : TopCat\nf : ↑X ≃ₜ ↑Y\nx✝ : (forget TopCat).obj Y\n⊢ ↑(Homeomorph.toContinuousMap (Homeomorph.symm f) ≫ Homeomorph.toContinuousMap f) x✝ = ↑(𝟙 Y) x✝\n[PROOFSTEP]\nexact f.apply_symm_apply _\n[GOAL]\nX Y : TopCat\nf : X ≅ Y\nx : ↑X\n⊢ ↑f.inv (↑f.hom x) = x\n[PROOFSTEP]\nsimp\n[GOAL]\nX Y : TopCat\nf : X ≅ Y\nx : ↑Y\n⊢ ↑f.hom (↑f.inv x) = x\n[PROOFSTEP]\nsimp\n[GOAL]\nX Y : TopCat\nf : ↑X ≃ₜ ↑Y\n⊢ homeoOfIso (isoOfHomeo f) = f\n[PROOFSTEP]\ndsimp [homeoOfIso, isoOfHomeo]\n[GOAL]\nX Y : TopCat\nf : ↑X ≃ₜ ↑Y\n⊢ Homeomorph.mk\n      { toFun := ↑(Homeomorph.toContinuousMap f), invFun := ↑(Homeomorph.toContinuousMap (Homeomorph.symm f)),\n        left_inv :=\n          (_ :\n            ∀ (x : ↑X),\n              ↑(Iso.mk (Homeomorph.toContinuousMap f) (Homeomorph.toContinuousMap (Homeomorph.symm f))).2\n                  (↑(Iso.mk (Homeomorph.toContinuousMap f) (Homeomorph.toContinuousMap (Homeomorph.symm f))).1 x) =\n                x),\n        right_inv :=\n          (_ :\n            ∀ (x : ↑Y),\n              ↑(Iso.mk (Homeomorph.toContinuousMap f) (Homeomorph.toContinuousMap (Homeomorph.symm f))).1\n                  (↑(Iso.mk (Homeomorph.toContinuousMap f) (Homeomorph.toContinuousMap (Homeomorph.symm f))).2 x) =\n                x) } =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase H\nX Y : TopCat\nf : ↑X ≃ₜ ↑Y\nx✝ : ↑X\n⊢ ↑(Homeomorph.mk\n          { toFun := ↑(Homeomorph.toContinuousMap f), invFun := ↑(Homeomorph.toContinuousMap (Homeomorph.symm f)),\n            left_inv :=\n              (_ :\n                ∀ (x : ↑X),\n                  ↑(Iso.mk (Homeomorph.toContinuousMap f) (Homeomorph.toContinuousMap (Homeomorph.symm f))).2\n                      (↑(Iso.mk (Homeomorph.toContinuousMap f) (Homeomorph.toContinuousMap (Homeomorph.symm f))).1 x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : ↑Y),\n                  ↑(Iso.mk (Homeomorph.toContinuousMap f) (Homeomorph.toContinuousMap (Homeomorph.symm f))).1\n                      (↑(Iso.mk (Homeomorph.toContinuousMap f) (Homeomorph.toContinuousMap (Homeomorph.symm f))).2 x) =\n                    x) })\n      x✝ =\n    ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y : TopCat\nf : X ≅ Y\n⊢ isoOfHomeo (homeoOfIso f) = f\n[PROOFSTEP]\ndsimp [homeoOfIso, isoOfHomeo]\n[GOAL]\nX Y : TopCat\nf : X ≅ Y\n⊢ Iso.mk\n      (Homeomorph.toContinuousMap\n        (Homeomorph.mk\n          { toFun := ↑f.hom, invFun := ↑f.inv, left_inv := (_ : ∀ (x : ↑X), ↑f.2 (↑f.1 x) = x),\n            right_inv := (_ : ∀ (x : ↑Y), ↑f.1 (↑f.2 x) = x) }))\n      (Homeomorph.toContinuousMap\n        (Homeomorph.symm\n          (Homeomorph.mk\n            { toFun := ↑f.hom, invFun := ↑f.inv, left_inv := (_ : ∀ (x : ↑X), ↑f.2 (↑f.1 x) = x),\n              right_inv := (_ : ∀ (x : ↑Y), ↑f.1 (↑f.2 x) = x) }))) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nX Y : TopCat\nf : X ≅ Y\nx✝ : (forget TopCat).obj X\n⊢ ↑(Iso.mk\n            (Homeomorph.toContinuousMap\n              (Homeomorph.mk\n                { toFun := ↑f.hom, invFun := ↑f.inv, left_inv := (_ : ∀ (x : ↑X), ↑f.2 (↑f.1 x) = x),\n                  right_inv := (_ : ∀ (x : ↑Y), ↑f.1 (↑f.2 x) = x) }))\n            (Homeomorph.toContinuousMap\n              (Homeomorph.symm\n                (Homeomorph.mk\n                  { toFun := ↑f.hom, invFun := ↑f.inv, left_inv := (_ : ∀ (x : ↑X), ↑f.2 (↑f.1 x) = x),\n                    right_inv := (_ : ∀ (x : ↑Y), ↑f.1 (↑f.2 x) = x) })))).hom\n      x✝ =\n    ↑f.hom x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y Z : TopCat\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsIso g\n⊢ OpenEmbedding ((forget TopCat).map f ≫ (forget TopCat).map g) ↔ OpenEmbedding ↑f\n[PROOFSTEP]\nsimp only [← Functor.map_comp]\n[GOAL]\nX Y Z : TopCat\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsIso g\n⊢ OpenEmbedding ((forget TopCat).map (f ≫ g)) ↔ OpenEmbedding ↑f\n[PROOFSTEP]\nexact openEmbedding_iff_comp_isIso f g\n[GOAL]\nX Y Z : TopCat\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsIso f\n⊢ OpenEmbedding ↑(f ≫ g) ↔ OpenEmbedding ↑g\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX Y Z : TopCat\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsIso f\n⊢ OpenEmbedding ↑(f ≫ g) → OpenEmbedding ↑g\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nX Y Z : TopCat\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsIso f\nh : OpenEmbedding ↑(f ≫ g)\n⊢ OpenEmbedding ↑g\n[PROOFSTEP]\nconvert h.comp (TopCat.homeoOfIso (asIso f).symm).openEmbedding\n[GOAL]\ncase h.e'_5.h\nX Y Z : TopCat\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsIso f\nh : OpenEmbedding ↑(f ≫ g)\ne_1✝ : (forget TopCat).obj Y = ↑Y\n⊢ ↑g = ↑(f ≫ g) ∘ ↑(homeoOfIso (asIso f).symm)\n[PROOFSTEP]\nexact congrArg _ (IsIso.inv_hom_id_assoc f g).symm\n[GOAL]\ncase mpr\nX Y Z : TopCat\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsIso f\n⊢ OpenEmbedding ↑g → OpenEmbedding ↑(f ≫ g)\n[PROOFSTEP]\nexact fun h => h.comp (TopCat.homeoOfIso (asIso f)).openEmbedding\n[GOAL]\nX Y Z : TopCat\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsIso f\n⊢ OpenEmbedding ((forget TopCat).map f ≫ (forget TopCat).map g) ↔ OpenEmbedding ↑g\n[PROOFSTEP]\nsimp only [← Functor.map_comp]\n[GOAL]\nX Y Z : TopCat\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : IsIso f\n⊢ OpenEmbedding ((forget TopCat).map (f ≫ g)) ↔ OpenEmbedding ↑g\n[PROOFSTEP]\nexact openEmbedding_iff_isIso_comp f g\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.TopCat.Basic", "llama_tokens": 2646, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6584175139669997, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.3752009660716126}}
{"text": "[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nF F' : MonoFactorisation f\nhI : F.I = F'.I\nhm : F.m = eqToHom hI ≫ F'.m\n⊢ F = F'\n[PROOFSTEP]\ncases' F with _ Fm _ _ Ffac\n[GOAL]\ncase mk\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nF' : MonoFactorisation f\nI✝ : C\nFm : I✝ ⟶ Y\nm_mono✝ : Mono Fm\ne✝ : X ⟶ I✝\nFfac : e✝ ≫ Fm = f\nhI : (mk I✝ Fm e✝).I = F'.I\nhm : (mk I✝ Fm e✝).m = eqToHom hI ≫ F'.m\n⊢ mk I✝ Fm e✝ = F'\n[PROOFSTEP]\ncases' F' with _ Fm' _ _ Ffac'\n[GOAL]\ncase mk.mk\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nI✝¹ : C\nFm : I✝¹ ⟶ Y\nm_mono✝¹ : Mono Fm\ne✝¹ : X ⟶ I✝¹\nFfac : e✝¹ ≫ Fm = f\nI✝ : C\nFm' : I✝ ⟶ Y\nm_mono✝ : Mono Fm'\ne✝ : X ⟶ I✝\nFfac' : e✝ ≫ Fm' = f\nhI : (mk I✝¹ Fm e✝¹).I = (mk I✝ Fm' e✝).I\nhm : (mk I✝¹ Fm e✝¹).m = eqToHom hI ≫ (mk I✝ Fm' e✝).m\n⊢ mk I✝¹ Fm e✝¹ = mk I✝ Fm' e✝\n[PROOFSTEP]\ncases' hI\n[GOAL]\ncase mk.mk.refl\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nI✝ : C\nFm : I✝ ⟶ Y\nm_mono✝¹ : Mono Fm\ne✝¹ : X ⟶ I✝\nFfac : e✝¹ ≫ Fm = f\nFm' : I✝ ⟶ Y\nm_mono✝ : Mono Fm'\ne✝ : X ⟶ I✝\nFfac' : e✝ ≫ Fm' = f\nhm : (mk I✝ Fm e✝¹).m = eqToHom (_ : (mk I✝ Fm e✝¹).I = (mk I✝ Fm e✝¹).I) ≫ (mk I✝ Fm' e✝).m\n⊢ mk I✝ Fm e✝¹ = mk I✝ Fm' e✝\n[PROOFSTEP]\nsimp at hm \n[GOAL]\ncase mk.mk.refl\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nI✝ : C\nFm : I✝ ⟶ Y\nm_mono✝¹ : Mono Fm\ne✝¹ : X ⟶ I✝\nFfac : e✝¹ ≫ Fm = f\nFm' : I✝ ⟶ Y\nm_mono✝ : Mono Fm'\ne✝ : X ⟶ I✝\nFfac' : e✝ ≫ Fm' = f\nhm : Fm = Fm'\n⊢ mk I✝ Fm e✝¹ = mk I✝ Fm' e✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.refl.e_e\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nI✝ : C\nFm : I✝ ⟶ Y\nm_mono✝¹ : Mono Fm\ne✝¹ : X ⟶ I✝\nFfac : e✝¹ ≫ Fm = f\nFm' : I✝ ⟶ Y\nm_mono✝ : Mono Fm'\ne✝ : X ⟶ I✝\nFfac' : e✝ ≫ Fm' = f\nhm : Fm = Fm'\n⊢ e✝¹ = e✝\n[PROOFSTEP]\napply (cancel_mono Fm).1\n[GOAL]\ncase mk.mk.refl.e_e\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nI✝ : C\nFm : I✝ ⟶ Y\nm_mono✝¹ : Mono Fm\ne✝¹ : X ⟶ I✝\nFfac : e✝¹ ≫ Fm = f\nFm' : I✝ ⟶ Y\nm_mono✝ : Mono Fm'\ne✝ : X ⟶ I✝\nFfac' : e✝ ≫ Fm' = f\nhm : Fm = Fm'\n⊢ e✝¹ ≫ Fm = e✝ ≫ Fm\n[PROOFSTEP]\nrw [Ffac, hm, Ffac']\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nf✝ : X ⟶ Y\nf g : Arrow C\nF : MonoFactorisation f.hom\nsq : f ⟶ g\ninst✝ : IsIso sq\n⊢ (inv sq.left ≫ F.e) ≫ F.m ≫ sq.right = g.hom\n[PROOFSTEP]\nsimp only [fac_assoc, Arrow.w, IsIso.inv_comp_eq, Category.assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nF : MonoFactorisation f\nhF : IsImage F\nF' : MonoFactorisation f\n⊢ (F.e ≫ lift hF F') ≫ F'.m = F'.e ≫ F'.m\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nF F' : MonoFactorisation f\nhF : IsImage F\nhF' : IsImage F'\n⊢ (lift hF F' ≫ lift hF' F) ≫ F.m = 𝟙 F.I ≫ F.m\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nF F' : MonoFactorisation f\nhF : IsImage F\nhF' : IsImage F'\n⊢ (lift hF' F ≫ lift hF F') ≫ F'.m = 𝟙 F'.I ≫ F'.m\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nF F' : MonoFactorisation f\nhF : IsImage F\nhF' : IsImage F'\n⊢ (isoExt hF hF').hom ≫ F'.m = F.m\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nF F' : MonoFactorisation f\nhF : IsImage F\nhF' : IsImage F'\n⊢ (isoExt hF hF').inv ≫ F.m = F'.m\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nF F' : MonoFactorisation f\nhF : IsImage F\nhF' : IsImage F'\n⊢ F.e ≫ (isoExt hF hF').hom = F'.e\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nF F' : MonoFactorisation f\nhF : IsImage F\nhF' : IsImage F'\n⊢ F'.e ≫ (isoExt hF hF').inv = F.e\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nf✝ : X ⟶ Y\nF✝ F'✝ : MonoFactorisation f✝\nhF✝ : IsImage F✝\nhF' : IsImage F'✝\nf g : Arrow C\nF : MonoFactorisation f.hom\nhF : IsImage F\nsq : f ⟶ g\ninst✝ : IsIso sq\nF' : MonoFactorisation g.hom\n⊢ (fun F' => lift hF (MonoFactorisation.ofArrowIso F' (inv sq))) F' ≫ F'.m = (MonoFactorisation.ofArrowIso F sq).m\n[PROOFSTEP]\nsimpa only [MonoFactorisation.ofArrowIso_m, Arrow.inv_right, ← Category.assoc, IsIso.comp_inv_eq] using\n  hF.lift_fac (F'.ofArrowIso (inv sq))\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝ : HasImage f\nF' : MonoFactorisation f\n⊢ Mono (lift F')\n[PROOFSTEP]\nrefine @mono_of_mono _ _ _ _ _ _ F'.m ?_\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝ : HasImage f\nF' : MonoFactorisation f\n⊢ Mono (lift F' ≫ F'.m)\n[PROOFSTEP]\nsimpa using MonoFactorisation.m_mono _\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝ : HasImage f\nF' : MonoFactorisation f\nl : image f ⟶ F'.I\nw : l ≫ F'.m = image.ι f\n⊢ l ≫ F'.m = image.lift F' ≫ F'.m\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝ : Mono f\n⊢ (imageMonoIsoSource f).inv ≫ image.ι f = f\n[PROOFSTEP]\nsimp [imageMonoIsoSource]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝ : Mono f\n⊢ (imageMonoIsoSource f).hom ≫ f = image.ι f\n[PROOFSTEP]\nsimp only [← imageMonoIsoSource_inv_ι f]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝ : Mono f\n⊢ (imageMonoIsoSource f).hom ≫ (imageMonoIsoSource f).inv ≫ image.ι f = image.ι f\n[PROOFSTEP]\nrw [← Category.assoc, Iso.hom_inv_id, Category.id_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\n⊢ g = h\n[PROOFSTEP]\nlet q := equalizer.ι g h\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\n⊢ g = h\n[PROOFSTEP]\nlet e' := equalizer.lift _ w\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\n⊢ g = h\n[PROOFSTEP]\nlet F' : MonoFactorisation f :=\n  { I := equalizer g h\n    m := q ≫ image.ι f\n    m_mono := by apply mono_comp\n    e := e' }\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\n⊢ Mono (q ≫ ι f)\n[PROOFSTEP]\napply mono_comp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\nF' : MonoFactorisation f := MonoFactorisation.mk (equalizer g h) (q ≫ ι f) e'\n⊢ g = h\n[PROOFSTEP]\nlet v := image.lift F'\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\nF' : MonoFactorisation f := MonoFactorisation.mk (equalizer g h) (q ≫ ι f) e'\nv : image f ⟶ F'.I := lift F'\n⊢ g = h\n[PROOFSTEP]\nhave t₀ : v ≫ q ≫ image.ι f = image.ι f := image.lift_fac F'\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\nF' : MonoFactorisation f := MonoFactorisation.mk (equalizer g h) (q ≫ ι f) e'\nv : image f ⟶ F'.I := lift F'\nt₀ : v ≫ q ≫ ι f = ι f\n⊢ g = h\n[PROOFSTEP]\nhave t : v ≫ q = 𝟙 (image f) :=\n  (cancel_mono_id (image.ι f)).1\n    (by\n      convert t₀ using 1\n      rw [Category.assoc])\n      -- The proof from wikipedia next proves `q ≫ v = 𝟙 _`,\n        -- and concludes that `equalizer g h ≅ image f`,\n        -- but this isn't necessary.\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\nF' : MonoFactorisation f := MonoFactorisation.mk (equalizer g h) (q ≫ ι f) e'\nv : image f ⟶ F'.I := lift F'\nt₀ : v ≫ q ≫ ι f = ι f\n⊢ (v ≫ q) ≫ ι f = ι f\n[PROOFSTEP]\nconvert t₀ using 1\n[GOAL]\ncase h.e'_2\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\nF' : MonoFactorisation f := MonoFactorisation.mk (equalizer g h) (q ≫ ι f) e'\nv : image f ⟶ F'.I := lift F'\nt₀ : v ≫ q ≫ ι f = ι f\n⊢ (v ≫ q) ≫ ι f = v ≫ q ≫ ι f\n[PROOFSTEP]\nrw [Category.assoc]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\nF' : MonoFactorisation f := MonoFactorisation.mk (equalizer g h) (q ≫ ι f) e'\nv : image f ⟶ F'.I := lift F'\nt₀ : v ≫ q ≫ ι f = ι f\nt : v ≫ q = 𝟙 (image f)\n⊢ g = h\n[PROOFSTEP]\ncalc\n  g = 𝟙 (image f) ≫ g := by rw [Category.id_comp]\n  _ = v ≫ q ≫ g := by rw [← t, Category.assoc]\n  _ = v ≫ q ≫ h := by rw [equalizer.condition g h]\n  _ = 𝟙 (image f) ≫ h := by rw [← Category.assoc, t]\n  _ = h := by rw [Category.id_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\nF' : MonoFactorisation f := MonoFactorisation.mk (equalizer g h) (q ≫ ι f) e'\nv : image f ⟶ F'.I := lift F'\nt₀ : v ≫ q ≫ ι f = ι f\nt : v ≫ q = 𝟙 (image f)\n⊢ g = 𝟙 (image f) ≫ g\n[PROOFSTEP]\nrw [Category.id_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\nF' : MonoFactorisation f := MonoFactorisation.mk (equalizer g h) (q ≫ ι f) e'\nv : image f ⟶ F'.I := lift F'\nt₀ : v ≫ q ≫ ι f = ι f\nt : v ≫ q = 𝟙 (image f)\n⊢ 𝟙 (image f) ≫ g = v ≫ q ≫ g\n[PROOFSTEP]\nrw [← t, Category.assoc]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\nF' : MonoFactorisation f := MonoFactorisation.mk (equalizer g h) (q ≫ ι f) e'\nv : image f ⟶ F'.I := lift F'\nt₀ : v ≫ q ≫ ι f = ι f\nt : v ≫ q = 𝟙 (image f)\n⊢ v ≫ q ≫ g = v ≫ q ≫ h\n[PROOFSTEP]\nrw [equalizer.condition g h]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\nF' : MonoFactorisation f := MonoFactorisation.mk (equalizer g h) (q ≫ ι f) e'\nv : image f ⟶ F'.I := lift F'\nt₀ : v ≫ q ≫ ι f = ι f\nt : v ≫ q = 𝟙 (image f)\n⊢ v ≫ q ≫ h = 𝟙 (image f) ≫ h\n[PROOFSTEP]\nrw [← Category.assoc, t]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝¹ : HasImage f\nW : C\ng h : image f ⟶ W\ninst✝ : HasLimit (parallelPair g h)\nw : factorThruImage f ≫ g = factorThruImage f ≫ h\nq : equalizer g h ⟶ image f := equalizer.ι g h\ne' : X ⟶ equalizer g h := equalizer.lift (factorThruImage f) w\nF' : MonoFactorisation f := MonoFactorisation.mk (equalizer g h) (q ≫ ι f) e'\nv : image f ⟶ F'.I := lift F'\nt₀ : v ≫ q ≫ ι f = ι f\nt : v ≫ q = 𝟙 (image f)\n⊢ 𝟙 (image f) ≫ h = h\n[PROOFSTEP]\nrw [Category.id_comp]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\nX Y : C\nf : X ⟶ Y\ninst✝ : HasImage f\nE : Epi f\n⊢ Epi (image.ι f)\n[PROOFSTEP]\nrw [← image.fac f] at E \n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\nX Y : C\nf : X ⟶ Y\ninst✝ : HasImage f\nE : Epi (factorThruImage f ≫ image.ι f)\n⊢ Epi (image.ι f)\n[PROOFSTEP]\nskip\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\nX Y : C\nf : X ⟶ Y\ninst✝ : HasImage f\nE : Epi (factorThruImage f ≫ image.ι f)\n⊢ Epi (image.ι f)\n[PROOFSTEP]\nexact epi_of_epi (factorThruImage f) (image.ι f)\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\nX Y : C\nf : X ⟶ Y\ninst✝² : HasImage f\ninst✝¹ : Epi (image.ι f)\ninst✝ : Epi (factorThruImage f)\n⊢ Epi f\n[PROOFSTEP]\nrw [← image.fac f]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\nX Y : C\nf : X ⟶ Y\ninst✝² : HasImage f\ninst✝¹ : Epi (image.ι f)\ninst✝ : Epi (factorThruImage f)\n⊢ Epi (factorThruImage f ≫ image.ι f)\n[PROOFSTEP]\napply epi_comp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\n⊢ factorThruImage f' ≫ ι f' = f\n[PROOFSTEP]\nrw [h]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\n⊢ factorThruImage f' ≫ ι f' = f'\n[PROOFSTEP]\nsimp only [image.fac]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\n⊢ (image.eqToHom h ≫ image.eqToHom (_ : f' = f)) ≫ image.ι f = 𝟙 (image f) ≫ image.ι f\n[PROOFSTEP]\nlet F : MonoFactorisation f' := ⟨image f, image.ι f, factorThruImage f, (by aesop_cat)⟩\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\n⊢ factorThruImage f ≫ image.ι f = f'\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\nF : MonoFactorisation f' := MonoFactorisation.mk (image f) (image.ι f) (factorThruImage f)\n⊢ (image.eqToHom h ≫ image.eqToHom (_ : f' = f)) ≫ image.ι f = 𝟙 (image f) ≫ image.ι f\n[PROOFSTEP]\ndsimp [image.eqToHom]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\nF : MonoFactorisation f' := MonoFactorisation.mk (image f) (image.ι f) (factorThruImage f)\n⊢ (image.lift (MonoFactorisation.mk (image f') (image.ι f') (factorThruImage f')) ≫\n        image.lift (MonoFactorisation.mk (image f) (image.ι f) (factorThruImage f))) ≫\n      image.ι f =\n    𝟙 (image f) ≫ image.ι f\n[PROOFSTEP]\nrw [Category.id_comp, Category.assoc, image.lift_fac F]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\nF : MonoFactorisation f' := MonoFactorisation.mk (image f) (image.ι f) (factorThruImage f)\n⊢ image.lift (MonoFactorisation.mk (image f') (image.ι f') (factorThruImage f')) ≫ image.ι f' = image.ι f\n[PROOFSTEP]\nlet F' : MonoFactorisation f := ⟨image f', image.ι f', factorThruImage f', (by aesop_cat)⟩\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\nF : MonoFactorisation f' := MonoFactorisation.mk (image f) (image.ι f) (factorThruImage f)\n⊢ factorThruImage f' ≫ image.ι f' = f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\nF : MonoFactorisation f' := MonoFactorisation.mk (image f) (image.ι f) (factorThruImage f)\nF' : MonoFactorisation f := MonoFactorisation.mk (image f') (image.ι f') (factorThruImage f')\n⊢ image.lift (MonoFactorisation.mk (image f') (image.ι f') (factorThruImage f')) ≫ image.ι f' = image.ι f\n[PROOFSTEP]\nrw [image.lift_fac F']\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\n⊢ (image.eqToHom (_ : f' = f) ≫ image.eqToHom h) ≫ image.ι f' = 𝟙 (image f') ≫ image.ι f'\n[PROOFSTEP]\nlet F' : MonoFactorisation f := ⟨image f', image.ι f', factorThruImage f', (by aesop_cat)⟩\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\n⊢ factorThruImage f' ≫ image.ι f' = f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\nF' : MonoFactorisation f := MonoFactorisation.mk (image f') (image.ι f') (factorThruImage f')\n⊢ (image.eqToHom (_ : f' = f) ≫ image.eqToHom h) ≫ image.ι f' = 𝟙 (image f') ≫ image.ι f'\n[PROOFSTEP]\ndsimp [image.eqToHom]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\nF' : MonoFactorisation f := MonoFactorisation.mk (image f') (image.ι f') (factorThruImage f')\n⊢ (image.lift (MonoFactorisation.mk (image f) (image.ι f) (factorThruImage f)) ≫\n        image.lift (MonoFactorisation.mk (image f') (image.ι f') (factorThruImage f'))) ≫\n      image.ι f' =\n    𝟙 (image f') ≫ image.ι f'\n[PROOFSTEP]\nrw [Category.id_comp, Category.assoc, image.lift_fac F']\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\nF' : MonoFactorisation f := MonoFactorisation.mk (image f') (image.ι f') (factorThruImage f')\n⊢ image.lift (MonoFactorisation.mk (image f) (image.ι f) (factorThruImage f)) ≫ image.ι f = image.ι f'\n[PROOFSTEP]\nlet F : MonoFactorisation f' := ⟨image f, image.ι f, factorThruImage f, (by aesop_cat)⟩\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\nF' : MonoFactorisation f := MonoFactorisation.mk (image f') (image.ι f') (factorThruImage f')\n⊢ factorThruImage f ≫ image.ι f = f'\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝¹ : HasImage f\ninst✝ : HasImage f'\nh : f = f'\nF' : MonoFactorisation f := MonoFactorisation.mk (image f') (image.ι f') (factorThruImage f')\nF : MonoFactorisation f' := MonoFactorisation.mk (image f) (image.ι f) (factorThruImage f)\n⊢ image.lift (MonoFactorisation.mk (image f) (image.ι f) (factorThruImage f)) ≫ image.ι f = image.ι f'\n[PROOFSTEP]\nrw [image.lift_fac F]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝² : HasImage f\ninst✝¹ : HasImage f'\ninst✝ : HasEqualizers C\nh : f = f'\n⊢ ι f = (eqToIso h).hom ≫ ι f'\n[PROOFSTEP]\napply image.ext\n[GOAL]\ncase w\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝² : HasImage f\ninst✝¹ : HasImage f'\ninst✝ : HasEqualizers C\nh : f = f'\n⊢ factorThruImage f ≫ ι f = factorThruImage f ≫ (eqToIso h).hom ≫ ι f'\n[PROOFSTEP]\ndsimp [asIso, image.eqToIso, image.eqToHom]\n[GOAL]\ncase w\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf f' : X ⟶ Y\ninst✝² : HasImage f\ninst✝¹ : HasImage f'\ninst✝ : HasEqualizers C\nh : f = f'\n⊢ factorThruImage f ≫ ι f =\n    factorThruImage f ≫ lift (MonoFactorisation.mk (image f') (ι f') (factorThruImage f')) ≫ ι f'\n[PROOFSTEP]\nrw [image.lift_fac]\n  -- Porting note: simp did not fire with this it seems\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝¹ : HasImage g\ninst✝ : HasImage (f ≫ g)\n⊢ preComp f g ≫ ι g = ι (f ≫ g)\n[PROOFSTEP]\ndsimp [image.preComp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝¹ : HasImage g\ninst✝ : HasImage (f ≫ g)\n⊢ lift (MonoFactorisation.mk (image g) (ι g) (f ≫ factorThruImage g)) ≫ ι g = ι (f ≫ g)\n[PROOFSTEP]\nrw [image.lift_fac]\n  -- Porting note: also here, see image.eq_fac\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝¹ : HasImage g\ninst✝ : HasImage (f ≫ g)\n⊢ factorThruImage (f ≫ g) ≫ preComp f g = f ≫ factorThruImage g\n[PROOFSTEP]\nsimp [image.preComp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝¹ : HasImage g\ninst✝ : HasImage (f ≫ g)\n⊢ Mono (preComp f g)\n[PROOFSTEP]\nrefine @mono_of_mono _ _ _ _ _ _ (image.ι g) ?_\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝¹ : HasImage g\ninst✝ : HasImage (f ≫ g)\n⊢ Mono (preComp f g ≫ ι g)\n[PROOFSTEP]\nsimp only [image.preComp_ι]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝¹ : HasImage g\ninst✝ : HasImage (f ≫ g)\n⊢ Mono (ι (f ≫ g))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\nW : C\nh : Z ⟶ W\ninst✝³ : HasImage (g ≫ h)\ninst✝² : HasImage (f ≫ g ≫ h)\ninst✝¹ : HasImage h\ninst✝ : HasImage ((f ≫ g) ≫ h)\n⊢ preComp f (g ≫ h) ≫ preComp g h = eqToHom (_ : f ≫ g ≫ h = (f ≫ g) ≫ h) ≫ preComp (f ≫ g) h\n[PROOFSTEP]\napply (cancel_mono (image.ι h)).1\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\nW : C\nh : Z ⟶ W\ninst✝³ : HasImage (g ≫ h)\ninst✝² : HasImage (f ≫ g ≫ h)\ninst✝¹ : HasImage h\ninst✝ : HasImage ((f ≫ g) ≫ h)\n⊢ (preComp f (g ≫ h) ≫ preComp g h) ≫ ι h = (eqToHom (_ : f ≫ g ≫ h = (f ≫ g) ≫ h) ≫ preComp (f ≫ g) h) ≫ ι h\n[PROOFSTEP]\ndsimp [image.preComp, image.eqToHom]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\nW : C\nh : Z ⟶ W\ninst✝³ : HasImage (g ≫ h)\ninst✝² : HasImage (f ≫ g ≫ h)\ninst✝¹ : HasImage h\ninst✝ : HasImage ((f ≫ g) ≫ h)\n⊢ (lift (MonoFactorisation.mk (image (g ≫ h)) (ι (g ≫ h)) (f ≫ factorThruImage (g ≫ h))) ≫\n        lift (MonoFactorisation.mk (image h) (ι h) (g ≫ factorThruImage h))) ≫\n      ι h =\n    (lift (MonoFactorisation.mk (image ((f ≫ g) ≫ h)) (ι ((f ≫ g) ≫ h)) (factorThruImage ((f ≫ g) ≫ h))) ≫\n        lift (MonoFactorisation.mk (image h) (ι h) ((f ≫ g) ≫ factorThruImage h))) ≫\n      ι h\n[PROOFSTEP]\nrepeat (rw [Category.assoc, image.lift_fac])\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\nW : C\nh : Z ⟶ W\ninst✝³ : HasImage (g ≫ h)\ninst✝² : HasImage (f ≫ g ≫ h)\ninst✝¹ : HasImage h\ninst✝ : HasImage ((f ≫ g) ≫ h)\n⊢ (lift (MonoFactorisation.mk (image (g ≫ h)) (ι (g ≫ h)) (f ≫ factorThruImage (g ≫ h))) ≫\n        lift (MonoFactorisation.mk (image h) (ι h) (g ≫ factorThruImage h))) ≫\n      ι h =\n    (lift (MonoFactorisation.mk (image ((f ≫ g) ≫ h)) (ι ((f ≫ g) ≫ h)) (factorThruImage ((f ≫ g) ≫ h))) ≫\n        lift (MonoFactorisation.mk (image h) (ι h) ((f ≫ g) ≫ factorThruImage h))) ≫\n      ι h\n[PROOFSTEP]\nrw [Category.assoc, image.lift_fac]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\nW : C\nh : Z ⟶ W\ninst✝³ : HasImage (g ≫ h)\ninst✝² : HasImage (f ≫ g ≫ h)\ninst✝¹ : HasImage h\ninst✝ : HasImage ((f ≫ g) ≫ h)\n⊢ lift (MonoFactorisation.mk (image (g ≫ h)) (ι (g ≫ h)) (f ≫ factorThruImage (g ≫ h))) ≫ ι (g ≫ h) =\n    (lift (MonoFactorisation.mk (image ((f ≫ g) ≫ h)) (ι ((f ≫ g) ≫ h)) (factorThruImage ((f ≫ g) ≫ h))) ≫\n        lift (MonoFactorisation.mk (image h) (ι h) ((f ≫ g) ≫ factorThruImage h))) ≫\n      ι h\n[PROOFSTEP]\nrw [Category.assoc, image.lift_fac]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\nW : C\nh : Z ⟶ W\ninst✝³ : HasImage (g ≫ h)\ninst✝² : HasImage (f ≫ g ≫ h)\ninst✝¹ : HasImage h\ninst✝ : HasImage ((f ≫ g) ≫ h)\n⊢ ι (f ≫ g ≫ h) =\n    lift (MonoFactorisation.mk (image ((f ≫ g) ≫ h)) (ι ((f ≫ g) ≫ h)) (factorThruImage ((f ≫ g) ≫ h))) ≫\n      lift (MonoFactorisation.mk (image h) (ι h) ((f ≫ g) ≫ factorThruImage h)) ≫ ι h\n[PROOFSTEP]\nrw [Category.assoc, image.lift_fac]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\nW : C\nh : Z ⟶ W\ninst✝³ : HasImage (g ≫ h)\ninst✝² : HasImage (f ≫ g ≫ h)\ninst✝¹ : HasImage h\ninst✝ : HasImage ((f ≫ g) ≫ h)\n⊢ ι (f ≫ g ≫ h) =\n    lift (MonoFactorisation.mk (image ((f ≫ g) ≫ h)) (ι ((f ≫ g) ≫ h)) (factorThruImage ((f ≫ g) ≫ h))) ≫\n      lift (MonoFactorisation.mk (image h) (ι h) ((f ≫ g) ≫ factorThruImage h)) ≫ ι h\n[PROOFSTEP]\nrw [image.lift_fac, image.lift_fac]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝³ : HasEqualizers C\ninst✝² : HasImage g\ninst✝¹ : HasImage (f ≫ g)\ninst✝ : Epi f\n⊢ Epi (preComp f g)\n[PROOFSTEP]\napply @epi_of_epi_fac _ _ _ _ _ _ _ _ ?_ (image.factorThruImage_preComp _ _)\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝³ : HasEqualizers C\ninst✝² : HasImage g\ninst✝¹ : HasImage (f ≫ g)\ninst✝ : Epi f\n⊢ Epi (f ≫ factorThruImage g)\n[PROOFSTEP]\nexact epi_comp _ _\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\ninst✝¹ : IsIso f\ninst✝ : HasImage g\nF' : MonoFactorisation (f ≫ g)\n⊢ (fun F' => image.lift (MonoFactorisation.ofIsoComp f F')) F' ≫ F'.m =\n    (MonoFactorisation.isoComp (Image.monoFactorisation g) f).m\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\ninst✝¹ : IsIso f\ninst✝ : HasImage g\nF' : MonoFactorisation (f ≫ g)\n⊢ image.lift (MonoFactorisation.ofIsoComp f F') ≫ F'.m = image.ι g\n[PROOFSTEP]\nhave : (MonoFactorisation.ofIsoComp f F').m = F'.m := rfl\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\ninst✝¹ : IsIso f\ninst✝ : HasImage g\nF' : MonoFactorisation (f ≫ g)\nthis : (MonoFactorisation.ofIsoComp f F').m = F'.m\n⊢ image.lift (MonoFactorisation.ofIsoComp f F') ≫ F'.m = image.ι g\n[PROOFSTEP]\nrw [← this, image.lift_fac (MonoFactorisation.ofIsoComp f F')]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf✝ : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\nf : X ⟶ Y\ninst✝¹ : IsIso f\ninst✝ : HasImage g\n⊢ preComp f g ≫ lift (MonoFactorisation.mk (image (f ≫ g)) (ι (f ≫ g)) (inv f ≫ factorThruImage (f ≫ g))) =\n    𝟙 (image (f ≫ g))\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf✝ : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\nf : X ⟶ Y\ninst✝¹ : IsIso f\ninst✝ : HasImage g\n⊢ factorThruImage (f ≫ g) ≫\n      preComp f g ≫ lift (MonoFactorisation.mk (image (f ≫ g)) (ι (f ≫ g)) (inv f ≫ factorThruImage (f ≫ g))) =\n    factorThruImage (f ≫ g) ≫ 𝟙 (image (f ≫ g))\n[PROOFSTEP]\nsimp [image.preComp]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf✝ : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\nf : X ⟶ Y\ninst✝¹ : IsIso f\ninst✝ : HasImage g\n⊢ lift (MonoFactorisation.mk (image (f ≫ g)) (ι (f ≫ g)) (inv f ≫ factorThruImage (f ≫ g))) ≫ preComp f g = 𝟙 (image g)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf✝ : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\nf : X ⟶ Y\ninst✝¹ : IsIso f\ninst✝ : HasImage g\n⊢ factorThruImage g ≫\n      lift (MonoFactorisation.mk (image (f ≫ g)) (ι (f ≫ g)) (inv f ≫ factorThruImage (f ≫ g))) ≫ preComp f g =\n    factorThruImage g ≫ 𝟙 (image g)\n[PROOFSTEP]\nsimp [image.preComp]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\ninst✝¹ : HasImage f\ninst✝ : IsIso g\nF' : MonoFactorisation (f ≫ g)\n⊢ (fun F' => image.lift (MonoFactorisation.ofCompIso F')) F' ≫ F'.m =\n    (MonoFactorisation.compMono (Image.monoFactorisation f) g).m\n[PROOFSTEP]\nrw [← Category.comp_id (image.lift (MonoFactorisation.ofCompIso F') ≫ F'.m), ← IsIso.inv_hom_id g, ← Category.assoc]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\ninst✝¹ : HasImage f\ninst✝ : IsIso g\nF' : MonoFactorisation (f ≫ g)\n⊢ ((image.lift (MonoFactorisation.ofCompIso F') ≫ F'.m) ≫ inv g) ≫ g =\n    (MonoFactorisation.compMono (Image.monoFactorisation f) g).m\n[PROOFSTEP]\nrefine congrArg (· ≫ g) ?_\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\ninst✝¹ : HasImage f\ninst✝ : IsIso g\nF' : MonoFactorisation (f ≫ g)\n⊢ (image.lift (MonoFactorisation.ofCompIso F') ≫ F'.m) ≫ inv g = (Image.monoFactorisation f).m\n[PROOFSTEP]\nhave :\n  (image.lift (MonoFactorisation.ofCompIso F') ≫ F'.m) ≫ inv g =\n    image.lift (MonoFactorisation.ofCompIso F') ≫ ((MonoFactorisation.ofCompIso F').m) :=\n  by simp only [MonoFactorisation.ofCompIso_I, Category.assoc, MonoFactorisation.ofCompIso_m]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\ninst✝¹ : HasImage f\ninst✝ : IsIso g\nF' : MonoFactorisation (f ≫ g)\n⊢ (image.lift (MonoFactorisation.ofCompIso F') ≫ F'.m) ≫ inv g =\n    image.lift (MonoFactorisation.ofCompIso F') ≫ (MonoFactorisation.ofCompIso F').m\n[PROOFSTEP]\nsimp only [MonoFactorisation.ofCompIso_I, Category.assoc, MonoFactorisation.ofCompIso_m]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\ninst✝¹ : HasImage f\ninst✝ : IsIso g\nF' : MonoFactorisation (f ≫ g)\nthis :\n  (image.lift (MonoFactorisation.ofCompIso F') ≫ F'.m) ≫ inv g =\n    image.lift (MonoFactorisation.ofCompIso F') ≫ (MonoFactorisation.ofCompIso F').m\n⊢ (image.lift (MonoFactorisation.ofCompIso F') ≫ F'.m) ≫ inv g = (Image.monoFactorisation f).m\n[PROOFSTEP]\nrw [this, image.lift_fac (MonoFactorisation.ofCompIso F'), image.as_ι]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\ninst✝¹ : HasImage f\ninst✝ : IsIso g\n⊢ (compIso f g).hom ≫ ι (f ≫ g) = ι f ≫ g\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\ninst✝¹ : HasImage f\ninst✝ : IsIso g\n⊢ factorThruImage f ≫ (compIso f g).hom ≫ ι (f ≫ g) = factorThruImage f ≫ ι f ≫ g\n[PROOFSTEP]\nsimp [image.compIso]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\ninst✝¹ : HasImage f\ninst✝ : IsIso g\n⊢ (compIso f g).inv ≫ ι f = ι (f ≫ g) ≫ inv g\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nZ : C\ng : Y ⟶ Z\ninst✝² : HasEqualizers C\ninst✝¹ : HasImage f\ninst✝ : IsIso g\n⊢ factorThruImage (f ≫ g) ≫ (compIso f g).inv ≫ ι f = factorThruImage (f ≫ g) ≫ ι (f ≫ g) ≫ inv g\n[PROOFSTEP]\nsimp [image.compIso]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝ : HasImage f\n⊢ HasImage f\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nf : Arrow C\ninst✝ : HasImage f.hom\n⊢ 𝟙 (image f.hom) ≫ image.ι f.hom = image.ι f.hom ≫ (𝟙 f).right\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nf g : Arrow C\ninst✝¹ : HasImage f.hom\ninst✝ : HasImage g.hom\nsq : f ⟶ g\nm : ImageMap sq\n⊢ (factorThruImage f.hom ≫ m.map) ≫ image.ι g.hom = (sq.left ≫ factorThruImage g.hom) ≫ image.ι g.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nf g : Arrow C\ninst✝¹ : HasImage f.hom\ninst✝ : HasImage g.hom\nsq : f ⟶ g\nF : MonoFactorisation f.hom\nF' : MonoFactorisation g.hom\nhF' : IsImage F'\nmap : F.I ⟶ F'.I\nmap_ι : map ≫ F'.m = F.m ≫ sq.right\n⊢ (image.lift F ≫ map ≫ IsImage.lift hF' (Image.monoFactorisation g.hom)) ≫ image.ι g.hom = image.ι f.hom ≫ sq.right\n[PROOFSTEP]\nsimp [map_ι]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nf g : Arrow C\ninst✝² : HasImage f.hom\ninst✝¹ : HasImage g.hom\nsq : f ⟶ g\ninst✝ : IsIso sq\n⊢ image.lift (MonoFactorisation.ofArrowIso (Image.monoFactorisation g.hom) (inv sq)) ≫ image.ι g.hom =\n    image.ι f.hom ≫ sq.right\n[PROOFSTEP]\nerw [← cancel_mono (inv sq).right, Category.assoc, ← MonoFactorisation.ofArrowIso_m, image.lift_fac, Category.assoc, ←\n  Comma.comp_right, IsIso.hom_inv_id, Comma.id_right, Category.comp_id]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nf g h : Arrow C\ninst✝⁴ : HasImage f.hom\ninst✝³ : HasImage g.hom\ninst✝² : HasImage h.hom\nsq1 : f ⟶ g\nsq2 : g ⟶ h\ninst✝¹ : HasImageMap sq1\ninst✝ : HasImageMap sq2\n⊢ ((imageMap sq1).map ≫ (imageMap sq2).map) ≫ image.ι h.hom = image.ι f.hom ≫ (sq1 ≫ sq2).right\n[PROOFSTEP]\nrw [Category.assoc, ImageMap.map_ι, ImageMap.map_ι_assoc, Comma.comp_right]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nf✝ g✝ : Arrow C\ninst✝³ : HasImage f✝.hom\ninst✝² : HasImage g✝.hom\nsq✝ : f✝ ⟶ g✝\nf g : Arrow C\ninst✝¹ : HasImage f.hom\ninst✝ : HasImage g.hom\nsq : f ⟶ g\nmap : image f.hom ⟶ image g.hom\nmap_ι : autoParam (map ≫ image.ι g.hom = image.ι f.hom ≫ sq.right) _auto✝\nmap' : image f.hom ⟶ image g.hom\nmap_ι' : map' ≫ image.ι g.hom = image.ι f.hom ≫ sq.right\n⊢ map = map'\n[PROOFSTEP]\nhave : map ≫ image.ι g.hom = map' ≫ image.ι g.hom := by rw [map_ι, map_ι']\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nf✝ g✝ : Arrow C\ninst✝³ : HasImage f✝.hom\ninst✝² : HasImage g✝.hom\nsq✝ : f✝ ⟶ g✝\nf g : Arrow C\ninst✝¹ : HasImage f.hom\ninst✝ : HasImage g.hom\nsq : f ⟶ g\nmap : image f.hom ⟶ image g.hom\nmap_ι : autoParam (map ≫ image.ι g.hom = image.ι f.hom ≫ sq.right) _auto✝\nmap' : image f.hom ⟶ image g.hom\nmap_ι' : map' ≫ image.ι g.hom = image.ι f.hom ≫ sq.right\n⊢ map ≫ image.ι g.hom = map' ≫ image.ι g.hom\n[PROOFSTEP]\nrw [map_ι, map_ι']\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nf✝ g✝ : Arrow C\ninst✝³ : HasImage f✝.hom\ninst✝² : HasImage g✝.hom\nsq✝ : f✝ ⟶ g✝\nf g : Arrow C\ninst✝¹ : HasImage f.hom\ninst✝ : HasImage g.hom\nsq : f ⟶ g\nmap : image f.hom ⟶ image g.hom\nmap_ι : autoParam (map ≫ image.ι g.hom = image.ι f.hom ≫ sq.right) _auto✝\nmap' : image f.hom ⟶ image g.hom\nmap_ι' : map' ≫ image.ι g.hom = image.ι f.hom ≫ sq.right\nthis : map ≫ image.ι g.hom = map' ≫ image.ι g.hom\n⊢ map = map'\n[PROOFSTEP]\napply (cancel_mono (image.ι g.hom)).1 this\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nf✝ g✝ : Arrow C\ninst✝³ : HasImage f✝.hom\ninst✝² : HasImage g✝.hom\nsq✝ : f✝ ⟶ g✝\nf g : Arrow C\ninst✝¹ : HasImage f.hom\ninst✝ : HasImage g.hom\nsq : f ⟶ g\nF G : ImageMap sq\n⊢ F.map = G.map\n[PROOFSTEP]\napply ImageMap.map_uniq_aux _ F.map_ι _ G.map_ι\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nf✝ g✝ : Arrow C\ninst✝³ : HasImage f✝.hom\ninst✝² : HasImage g✝.hom\nsq✝ : f✝ ⟶ g✝\nf g : Arrow C\ninst✝¹ : HasImage f.hom\ninst✝ : HasImage g.hom\nsq : f ⟶ g\nmap : image f.hom ⟶ image g.hom\nmap_ι : autoParam (map ≫ image.ι g.hom = image.ι f.hom ≫ sq.right) _auto✝\nmap' : image f.hom ⟶ image g.hom\nmap_ι' : map' ≫ image.ι g.hom = image.ι f.hom ≫ sq.right\n⊢ (map = map') = True\n[PROOFSTEP]\nsimp only [Functor.id_obj, eq_iff_iff, iff_true]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nf✝ g✝ : Arrow C\ninst✝³ : HasImage f✝.hom\ninst✝² : HasImage g✝.hom\nsq✝ : f✝ ⟶ g✝\nf g : Arrow C\ninst✝¹ : HasImage f.hom\ninst✝ : HasImage g.hom\nsq : f ⟶ g\nmap : image f.hom ⟶ image g.hom\nmap_ι : autoParam (map ≫ image.ι g.hom = image.ι f.hom ≫ sq.right) _auto✝\nmap' : image f.hom ⟶ image g.hom\nmap_ι' : map' ≫ image.ι g.hom = image.ι f.hom ≫ sq.right\n⊢ map = map'\n[PROOFSTEP]\napply ImageMap.map_uniq_aux _ map_ι _ map_ι'\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nf g : Arrow C\ninst✝² : HasImage f.hom\ninst✝¹ : HasImage g.hom\nsq : f ⟶ g\ninst✝ : HasImageMap sq\n⊢ factorThruImage f.hom ≫ map sq = sq.left ≫ factorThruImage g.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nf g : Arrow C\ninst✝² : HasImage f.hom\ninst✝¹ : HasImage g.hom\nsq : f ⟶ g\ninst✝ : HasImageMap sq\n⊢ map sq ≫ ι g.hom = ι f.hom ≫ sq.right\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nf g : Arrow C\ninst✝⁵ : HasImage f.hom\ninst✝⁴ : HasImage g.hom\nsq : f ⟶ g\ninst✝³ : HasImageMap sq\nh : Arrow C\ninst✝² : HasImage h.hom\nsq' : g ⟶ h\ninst✝¹ : HasImageMap sq'\ninst✝ : HasImageMap (sq ≫ sq')\n⊢ (HasImageMap.imageMap (sq ≫ sq')).map = (imageMapComp sq sq').map\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_self\nC : Type u\ninst✝⁶ : Category.{v, u} C\nf g : Arrow C\ninst✝⁵ : HasImage f.hom\ninst✝⁴ : HasImage g.hom\nsq : f ⟶ g\ninst✝³ : HasImageMap sq\nh : Arrow C\ninst✝² : HasImage h.hom\nsq' : g ⟶ h\ninst✝¹ : HasImageMap sq'\ninst✝ : HasImageMap (sq ≫ sq')\n⊢ HasImageMap.imageMap (sq ≫ sq') = imageMapComp sq sq'\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nf g : Arrow C\ninst✝³ : HasImage f.hom\ninst✝² : HasImage g.hom\nsq : f ⟶ g\ninst✝¹ : HasImageMap sq\ninst✝ : HasImageMap (𝟙 f)\n⊢ (HasImageMap.imageMap (𝟙 f)).map = (imageMapId f).map\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_self\nC : Type u\ninst✝⁴ : Category.{v, u} C\nf g : Arrow C\ninst✝³ : HasImage f.hom\ninst✝² : HasImage g.hom\nsq : f ⟶ g\ninst✝¹ : HasImageMap sq\ninst✝ : HasImageMap (𝟙 f)\n⊢ HasImageMap.imageMap (𝟙 f) = imageMapId f\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\ninst✝ : StrongEpi f\n⊢ f ≫ 𝟙 Y = f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nF : StrongEpiMonoFactorisation f\nG : MonoFactorisation f\n⊢ G.e ≫ G.m = F.e ≫ F.m\n[PROOFSTEP]\nrw [F.toMonoFactorisation.fac, G.fac]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nF : StrongEpiMonoFactorisation f\nF' : MonoFactorisation f\nhF' : IsImage F'\n⊢ StrongEpi F'.e\n[PROOFSTEP]\nrw [← IsImage.e_isoExt_hom F.toMonoIsImage hF']\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nf : X ⟶ Y\nF : StrongEpiMonoFactorisation f\nF' : MonoFactorisation f\nhF' : IsImage F'\n⊢ StrongEpi (F.e ≫ (IsImage.isoExt (StrongEpiMonoFactorisation.toMonoIsImage F) hF').hom)\n[PROOFSTEP]\napply strongEpi_comp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasImages C\ninst✝ : HasStrongEpiImages C\nf g : Arrow C\nst : f ⟶ g\n⊢ (st.left ≫ factorThruImage g.hom) ≫ image.ι g.hom = factorThruImage f.hom ≫ image.ι f.hom ≫ st.right\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasImages C\ninst✝¹ : HasPullbacks C\ninst✝ : HasEqualizers C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nA B : C\nh : A ⟶ B\nh_mono : Mono h\nx : X✝ ⟶ A\ny : image f ⟶ B\nsq : CommSq x (factorThruImage f) h y\n⊢ factorThruImage f ≫\n      image.lift\n          (MonoFactorisation.mk (pullback h y) (pullback.snd ≫ image.ι f)\n            (pullback.lift x (factorThruImage f) (_ : x ≫ h = factorThruImage f ≫ y))) ≫\n        pullback.fst =\n    x\n[PROOFSTEP]\nsimp only [image.fac_lift_assoc, pullback.lift_fst]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasImages C\ninst✝¹ : HasPullbacks C\ninst✝ : HasEqualizers C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nA B : C\nh : A ⟶ B\nh_mono : Mono h\nx : X✝ ⟶ A\ny : image f ⟶ B\nsq : CommSq x (factorThruImage f) h y\n⊢ (image.lift\n          (MonoFactorisation.mk (pullback h y) (pullback.snd ≫ image.ι f)\n            (pullback.lift x (factorThruImage f) (_ : x ≫ h = factorThruImage f ≫ y))) ≫\n        pullback.fst) ≫\n      h =\n    y\n[PROOFSTEP]\napply image.ext\n[GOAL]\ncase w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasImages C\ninst✝¹ : HasPullbacks C\ninst✝ : HasEqualizers C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nA B : C\nh : A ⟶ B\nh_mono : Mono h\nx : X✝ ⟶ A\ny : image f ⟶ B\nsq : CommSq x (factorThruImage f) h y\n⊢ factorThruImage f ≫\n      (image.lift\n            (MonoFactorisation.mk (pullback h y) (pullback.snd ≫ image.ι f)\n              (pullback.lift x (factorThruImage f) (_ : x ≫ h = factorThruImage f ≫ y))) ≫\n          pullback.fst) ≫\n        h =\n    factorThruImage f ≫ y\n[PROOFSTEP]\nsimp only [sq.w, Category.assoc, image.fac_lift_assoc, pullback.lift_fst_assoc]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasStrongEpiMonoFactorisations C\nX Y : C\nf : X ⟶ Y\nI' : C\ne : X ⟶ I'\nm : I' ⟶ Y\ncomm : e ≫ m = f\ninst✝¹ : StrongEpi e\ninst✝ : Mono m\n⊢ (isoStrongEpiMono e m comm).hom ≫ ι f = m\n[PROOFSTEP]\ndsimp [isoStrongEpiMono]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasStrongEpiMonoFactorisations C\nX Y : C\nf : X ⟶ Y\nI' : C\ne : X ⟶ I'\nm : I' ⟶ Y\ncomm : e ≫ m = f\ninst✝¹ : StrongEpi e\ninst✝ : Mono m\n⊢ IsImage.lift (StrongEpiMonoFactorisation.toMonoIsImage (StrongEpiMonoFactorisation.mk (MonoFactorisation.mk I' m e)))\n        (Image.monoFactorisation f) ≫\n      ι f =\n    m\n[PROOFSTEP]\napply IsImage.lift_fac\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{u_3, u_1} C\ninst✝¹ : Category.{u_4, u_2} D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nh : HasStrongEpiMonoFactorisations C\nX Y : D\nf : X ⟶ Y\n⊢ Nonempty (StrongEpiMonoFactorisation f)\n[PROOFSTEP]\nlet em : StrongEpiMonoFactorisation (F.inv.map f) := (HasStrongEpiMonoFactorisations.has_fac (F.inv.map f)).some\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{u_3, u_1} C\ninst✝¹ : Category.{u_4, u_2} D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nh : HasStrongEpiMonoFactorisations C\nX Y : D\nf : X ⟶ Y\nem : StrongEpiMonoFactorisation ((inv F).map f) :=\n  Nonempty.some (_ : Nonempty (StrongEpiMonoFactorisation ((inv F).map f)))\n⊢ Nonempty (StrongEpiMonoFactorisation f)\n[PROOFSTEP]\nhaveI : Mono (F.map em.m ≫ F.asEquivalence.counitIso.hom.app Y) := mono_comp _ _\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{u_3, u_1} C\ninst✝¹ : Category.{u_4, u_2} D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nh : HasStrongEpiMonoFactorisations C\nX Y : D\nf : X ⟶ Y\nem : StrongEpiMonoFactorisation ((inv F).map f) :=\n  Nonempty.some (_ : Nonempty (StrongEpiMonoFactorisation ((inv F).map f)))\nthis : Mono (F.map em.m ≫ NatTrans.app (asEquivalence F).counitIso.hom Y)\n⊢ Nonempty (StrongEpiMonoFactorisation f)\n[PROOFSTEP]\nhaveI : StrongEpi (F.asEquivalence.counitIso.inv.app X ≫ F.map em.e) := strongEpi_comp _ _\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{u_3, u_1} C\ninst✝¹ : Category.{u_4, u_2} D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nh : HasStrongEpiMonoFactorisations C\nX Y : D\nf : X ⟶ Y\nem : StrongEpiMonoFactorisation ((inv F).map f) :=\n  Nonempty.some (_ : Nonempty (StrongEpiMonoFactorisation ((inv F).map f)))\nthis✝ : Mono (F.map em.m ≫ NatTrans.app (asEquivalence F).counitIso.hom Y)\nthis : StrongEpi (NatTrans.app (asEquivalence F).counitIso.inv X ≫ F.map em.e)\n⊢ Nonempty (StrongEpiMonoFactorisation f)\n[PROOFSTEP]\nexact\n  Nonempty.intro\n    { I := F.obj em.I\n      e := F.asEquivalence.counitIso.inv.app X ≫ F.map em.e\n      m := F.map em.m ≫ F.asEquivalence.counitIso.hom.app Y\n      fac := by\n        simpa only [Category.assoc, ← F.map_comp_assoc, em.fac, IsEquivalence.fun_inv_map, Iso.inv_hom_id_app,\n          Iso.inv_hom_id_app_assoc] using Category.comp_id _ }\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{u_3, u_1} C\ninst✝¹ : Category.{u_4, u_2} D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nh : HasStrongEpiMonoFactorisations C\nX Y : D\nf : X ⟶ Y\nem : StrongEpiMonoFactorisation ((inv F).map f) :=\n  Nonempty.some (_ : Nonempty (StrongEpiMonoFactorisation ((inv F).map f)))\nthis✝ : Mono (F.map em.m ≫ NatTrans.app (asEquivalence F).counitIso.hom Y)\nthis : StrongEpi (NatTrans.app (asEquivalence F).counitIso.inv X ≫ F.map em.e)\n⊢ (NatTrans.app (asEquivalence F).counitIso.inv X ≫ F.map em.e) ≫\n      F.map em.m ≫ NatTrans.app (asEquivalence F).counitIso.hom Y =\n    f\n[PROOFSTEP]\nsimpa only [Category.assoc, ← F.map_comp_assoc, em.fac, IsEquivalence.fun_inv_map, Iso.inv_hom_id_app,\n  Iso.inv_hom_id_app_assoc] using Category.comp_id _\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.Images", "llama_tokens": 21816, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.658417500561683, "lm_q2_score": 0.5698526514141572, "lm_q1q2_score": 0.3752009584325574}}
{"text": "[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → Zero (N a)\nf✝ g✝ f g : Π₀ (a : α), N a\na : α\n⊢ a ∈ neLocus f g ↔ ↑f a ≠ ↑g a\n[PROOFSTEP]\nsimpa only [neLocus, Finset.mem_filter, Finset.mem_union, mem_support_iff, and_iff_right_iff_imp] using Ne.ne_or_ne _\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → Zero (N a)\nf✝ g✝ f g : Π₀ (a : α), N a\nh : f = g\n⊢ neLocus f f = ∅\n[PROOFSTEP]\nsimp only [neLocus, Ne.def, eq_self_iff_true, not_true, Finset.filter_False]\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → Zero (N a)\nf g : Π₀ (a : α), N a\n⊢ neLocus f g = neLocus g f\n[PROOFSTEP]\nsimp_rw [neLocus, Finset.union_comm, ne_comm]\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → Zero (N a)\nf g : Π₀ (a : α), N a\n⊢ neLocus f 0 = support f\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → Zero (N a)\nf g : Π₀ (a : α), N a\na✝ : α\n⊢ a✝ ∈ neLocus f 0 ↔ a✝ ∈ support f\n[PROOFSTEP]\nrw [mem_neLocus, mem_support_iff, coe_zero, Pi.zero_apply]\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝⁵ : DecidableEq α\nM : α → Type u_3\nP : α → Type u_4\ninst✝⁴ : (a : α) → Zero (N a)\ninst✝³ : (a : α) → Zero (M a)\ninst✝² : (a : α) → Zero (P a)\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → DecidableEq (M a)\nf g : Π₀ (a : α), N a\nF : (a : α) → N a → M a\nF0 : ∀ (a : α), F a 0 = 0\na : α\n⊢ a ∈ neLocus (mapRange F F0 f) (mapRange F F0 g) → a ∈ neLocus f g\n[PROOFSTEP]\nsimpa only [mem_neLocus, mapRange_apply, not_imp_not] using congr_arg (F a)\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝⁵ : DecidableEq α\nM : α → Type u_3\nP : α → Type u_4\ninst✝⁴ : (a : α) → Zero (N a)\ninst✝³ : (a : α) → Zero (M a)\ninst✝² : (a : α) → Zero (P a)\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → DecidableEq (P a)\nF : (a : α) → M a → N a → P a\nF0 : ∀ (a : α), F a 0 0 = 0\nf : Π₀ (a : α), M a\ng₁ g₂ : Π₀ (a : α), N a\nhF : ∀ (a : α) (f : M a), Function.Injective fun g => F a f g\n⊢ neLocus (zipWith F F0 f g₁) (zipWith F F0 f g₂) = neLocus g₁ g₂\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nα : Type u_1\nN : α → Type u_2\ninst✝⁵ : DecidableEq α\nM : α → Type u_3\nP : α → Type u_4\ninst✝⁴ : (a : α) → Zero (N a)\ninst✝³ : (a : α) → Zero (M a)\ninst✝² : (a : α) → Zero (P a)\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → DecidableEq (P a)\nF : (a : α) → M a → N a → P a\nF0 : ∀ (a : α), F a 0 0 = 0\nf : Π₀ (a : α), M a\ng₁ g₂ : Π₀ (a : α), N a\nhF : ∀ (a : α) (f : M a), Function.Injective fun g => F a f g\na : α\n⊢ a ∈ neLocus (zipWith F F0 f g₁) (zipWith F F0 f g₂) ↔ a ∈ neLocus g₁ g₂\n[PROOFSTEP]\nsimpa only [mem_neLocus] using (hF a _).ne_iff\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝⁵ : DecidableEq α\nM : α → Type u_3\nP : α → Type u_4\ninst✝⁴ : (a : α) → Zero (N a)\ninst✝³ : (a : α) → Zero (M a)\ninst✝² : (a : α) → Zero (P a)\ninst✝¹ : (a : α) → DecidableEq (M a)\ninst✝ : (a : α) → DecidableEq (P a)\nF : (a : α) → M a → N a → P a\nF0 : ∀ (a : α), F a 0 0 = 0\nf₁ f₂ : Π₀ (a : α), M a\ng : Π₀ (a : α), N a\nhF : ∀ (a : α) (g : N a), Function.Injective fun f => F a f g\n⊢ neLocus (zipWith F F0 f₁ g) (zipWith F F0 f₂ g) = neLocus f₁ f₂\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nα : Type u_1\nN : α → Type u_2\ninst✝⁵ : DecidableEq α\nM : α → Type u_3\nP : α → Type u_4\ninst✝⁴ : (a : α) → Zero (N a)\ninst✝³ : (a : α) → Zero (M a)\ninst✝² : (a : α) → Zero (P a)\ninst✝¹ : (a : α) → DecidableEq (M a)\ninst✝ : (a : α) → DecidableEq (P a)\nF : (a : α) → M a → N a → P a\nF0 : ∀ (a : α), F a 0 0 = 0\nf₁ f₂ : Π₀ (a : α), M a\ng : Π₀ (a : α), N a\nhF : ∀ (a : α) (g : N a), Function.Injective fun f => F a f g\na : α\n⊢ a ∈ neLocus (zipWith F F0 f₁ g) (zipWith F F0 f₂ g) ↔ a ∈ neLocus f₁ f₂\n[PROOFSTEP]\nsimpa only [mem_neLocus] using (hF a _).ne_iff\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝⁵ : DecidableEq α\nM : α → Type u_3\nP : α → Type u_4\ninst✝⁴ : (a : α) → Zero (N a)\ninst✝³ : (a : α) → Zero (M a)\ninst✝² : (a : α) → Zero (P a)\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → DecidableEq (M a)\nf g : Π₀ (a : α), N a\nF : (a : α) → N a → M a\nF0 : ∀ (a : α), F a 0 = 0\nhF : ∀ (a : α), Function.Injective (F a)\n⊢ neLocus (mapRange F F0 f) (mapRange F F0 g) = neLocus f g\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nα : Type u_1\nN : α → Type u_2\ninst✝⁵ : DecidableEq α\nM : α → Type u_3\nP : α → Type u_4\ninst✝⁴ : (a : α) → Zero (N a)\ninst✝³ : (a : α) → Zero (M a)\ninst✝² : (a : α) → Zero (P a)\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → DecidableEq (M a)\nf g : Π₀ (a : α), N a\nF : (a : α) → N a → M a\nF0 : ∀ (a : α), F a 0 = 0\nhF : ∀ (a : α), Function.Injective (F a)\na : α\n⊢ a ∈ neLocus (mapRange F F0 f) (mapRange F F0 g) ↔ a ∈ neLocus f g\n[PROOFSTEP]\nsimpa only [mem_neLocus] using (hF a).ne_iff\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → AddGroup (N a)\nf f₁ f₂ g g₁ g₂ : Π₀ (a : α), N a\n⊢ neLocus (-f) g = neLocus f (-g)\n[PROOFSTEP]\nrw [← neLocus_neg_neg, neg_neg]\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → AddGroup (N a)\nf f₁ f₂ g g₁ g₂ : Π₀ (a : α), N a\n⊢ neLocus f g = support (f - g)\n[PROOFSTEP]\nrw [← @neLocus_add_right α N _ _ _ _ _ (-g), add_right_neg, neLocus_zero_right, sub_eq_add_neg]\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → AddGroup (N a)\nf f₁ f₂ g g₁ g₂ : Π₀ (a : α), N a\n⊢ neLocus (f - g₁) (f - g₂) = neLocus g₁ g₂\n[PROOFSTEP]\nsimp only [sub_eq_add_neg, @neLocus_add_left α N _ _ _, neLocus_neg_neg]\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → AddGroup (N a)\nf f₁ f₂ g g₁ g₂ : Π₀ (a : α), N a\n⊢ neLocus (f₁ - g) (f₂ - g) = neLocus f₁ f₂\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using @neLocus_add_right α N _ _ _ _ _ _\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → AddGroup (N a)\nf f₁ f₂ g g₁ g₂ : Π₀ (a : α), N a\n⊢ neLocus f (f + g) = support g\n[PROOFSTEP]\nrw [← neLocus_zero_left, ← @neLocus_add_left α N _ _ _ f 0 g, add_zero]\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → AddGroup (N a)\nf f₁ f₂ g g₁ g₂ : Π₀ (a : α), N a\n⊢ neLocus (f + g) f = support g\n[PROOFSTEP]\nrw [neLocus_comm, neLocus_self_add_right]\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → AddGroup (N a)\nf f₁ f₂ g g₁ g₂ : Π₀ (a : α), N a\n⊢ neLocus f (f - g) = support g\n[PROOFSTEP]\nrw [sub_eq_add_neg, neLocus_self_add_right, support_neg]\n[GOAL]\nα : Type u_1\nN : α → Type u_2\ninst✝² : DecidableEq α\ninst✝¹ : (a : α) → DecidableEq (N a)\ninst✝ : (a : α) → AddGroup (N a)\nf f₁ f₂ g g₁ g₂ : Π₀ (a : α), N a\n⊢ neLocus (f - g) f = support g\n[PROOFSTEP]\nrw [neLocus_comm, neLocus_self_sub_right]\n", "meta": {"mathlib_filename": "Mathlib.Data.DFinsupp.NeLocus", "llama_tokens": 3860, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583250334526, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.37510985949093634}}
{"text": "[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : { x // x ∈ 𝓞 K }\n⊢ ↑(norm K) (↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) x) = x ^ finrank K L\n[PROOFSTEP]\nrw [← Subtype.coe_inj, RingOfIntegers.coe_norm_algebraMap, Algebra.norm_algebraMap, SubsemiringClass.coe_pow]\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\n⊢ IsUnit (↑(norm K) x) ↔ IsUnit x\n[PROOFSTEP]\nclassical\nrefine' ⟨fun hx => _, IsUnit.map _⟩\nreplace hx : IsUnit (algebraMap (𝓞 K) (𝓞 L) <| norm K x) := hx.map (algebraMap (𝓞 K) <| 𝓞 L)\nrefine'\n  @isUnit_of_mul_isUnit_right (𝓞 L) _\n    ⟨(univ \\ { AlgEquiv.refl }).prod fun σ : L ≃ₐ[K] L => σ x,\n      prod_mem fun σ _ => map_isIntegral (σ : L →+* L).toIntAlgHom x.2⟩\n    _ _\nconvert hx using 1\next\npush_cast\nconvert_to\n  ((univ \\ { AlgEquiv.refl }).prod fun σ : L ≃ₐ[K] L => σ x) * ∏ σ : L ≃ₐ[K] L in { AlgEquiv.refl }, σ (x : L) = _\n· rw [prod_singleton, AlgEquiv.coe_refl, _root_.id]\n· rw [prod_sdiff <| subset_univ _, ← norm_eq_prod_automorphisms, coe_algebraMap_norm]\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\n⊢ IsUnit (↑(norm K) x) ↔ IsUnit x\n[PROOFSTEP]\nrefine' ⟨fun hx => _, IsUnit.map _⟩\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\nhx : IsUnit (↑(norm K) x)\n⊢ IsUnit x\n[PROOFSTEP]\nreplace hx : IsUnit (algebraMap (𝓞 K) (𝓞 L) <| norm K x) := hx.map (algebraMap (𝓞 K) <| 𝓞 L)\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\nhx : IsUnit (↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x))\n⊢ IsUnit x\n[PROOFSTEP]\nrefine'\n  @isUnit_of_mul_isUnit_right (𝓞 L) _\n    ⟨(univ \\ { AlgEquiv.refl }).prod fun σ : L ≃ₐ[K] L => σ x,\n      prod_mem fun σ _ => map_isIntegral (σ : L →+* L).toIntAlgHom x.2⟩\n    _ _\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\nhx : IsUnit (↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x))\n⊢ IsUnit\n    ({ val := ∏ σ in univ \\ {AlgEquiv.refl}, ↑σ ↑x, property := (_ : ∏ c in univ \\ {AlgEquiv.refl}, ↑c ↑x ∈ 𝓞 L) } * x)\n[PROOFSTEP]\nconvert hx using 1\n[GOAL]\ncase h.e'_3\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\nhx : IsUnit (↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x))\n⊢ { val := ∏ σ in univ \\ {AlgEquiv.refl}, ↑σ ↑x, property := (_ : ∏ c in univ \\ {AlgEquiv.refl}, ↑c ↑x ∈ 𝓞 L) } * x =\n    ↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x)\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_3.a\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\nhx : IsUnit (↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x))\n⊢ ↑({ val := ∏ σ in univ \\ {AlgEquiv.refl}, ↑σ ↑x, property := (_ : ∏ c in univ \\ {AlgEquiv.refl}, ↑c ↑x ∈ 𝓞 L) } * x) =\n    ↑(↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x))\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_3.a\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\nhx : IsUnit (↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x))\n⊢ (∏ x_1 in univ \\ {AlgEquiv.refl}, ↑x_1 ↑x) * ↑x = ↑(↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x))\n[PROOFSTEP]\nconvert_to\n  ((univ \\ { AlgEquiv.refl }).prod fun σ : L ≃ₐ[K] L => σ x) * ∏ σ : L ≃ₐ[K] L in { AlgEquiv.refl }, σ (x : L) = _\n[GOAL]\ncase h.e'_2\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\nhx : IsUnit (↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x))\n⊢ (∏ x_1 in univ \\ {AlgEquiv.refl}, ↑x_1 ↑x) * ↑x =\n    (∏ σ in univ \\ {AlgEquiv.refl}, ↑σ ↑x) * ∏ σ in {AlgEquiv.refl}, ↑σ ↑x\n[PROOFSTEP]\nrw [prod_singleton, AlgEquiv.coe_refl, _root_.id]\n[GOAL]\ncase h.e'_3.a.convert_2\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\nhx : IsUnit (↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x))\n⊢ (∏ σ in univ \\ {AlgEquiv.refl}, ↑σ ↑x) * ∏ σ in {AlgEquiv.refl}, ↑σ ↑x =\n    ↑(↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x))\n[PROOFSTEP]\nrw [prod_sdiff <| subset_univ _, ← norm_eq_prod_automorphisms, coe_algebraMap_norm]\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\n⊢ x ∣ ↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x)\n[PROOFSTEP]\nclassical\nhave hint : ∏ σ : L ≃ₐ[K] L in univ.erase AlgEquiv.refl, σ x ∈ 𝓞 L :=\n  Subalgebra.prod_mem _ fun σ _ => (mem_ringOfIntegers _ _).2 (map_isIntegral σ (RingOfIntegers.isIntegral_coe x))\nrefine' ⟨⟨_, hint⟩, Subtype.ext _⟩\nrw [coe_algebraMap_norm K x, norm_eq_prod_automorphisms]\nsimp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\n⊢ x ∣ ↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x)\n[PROOFSTEP]\nhave hint : ∏ σ : L ≃ₐ[K] L in univ.erase AlgEquiv.refl, σ x ∈ 𝓞 L :=\n  Subalgebra.prod_mem _ fun σ _ => (mem_ringOfIntegers _ _).2 (map_isIntegral σ (RingOfIntegers.isIntegral_coe x))\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\nhint : ∏ σ in erase univ AlgEquiv.refl, ↑σ ↑x ∈ 𝓞 L\n⊢ x ∣ ↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x)\n[PROOFSTEP]\nrefine' ⟨⟨_, hint⟩, Subtype.ext _⟩\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\nhint : ∏ σ in erase univ AlgEquiv.refl, ↑σ ↑x ∈ 𝓞 L\n⊢ ↑(↑(algebraMap { x // x ∈ 𝓞 K } { x // x ∈ 𝓞 L }) (↑(norm K) x)) =\n    ↑(x * { val := ∏ σ in erase univ AlgEquiv.refl, ↑σ ↑x, property := hint })\n[PROOFSTEP]\nrw [coe_algebraMap_norm K x, norm_eq_prod_automorphisms]\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : { x // x ∈ 𝓞 L }\nhint : ∏ σ in erase univ AlgEquiv.refl, ↑σ ↑x ∈ 𝓞 L\n⊢ ∏ σ : L ≃ₐ[K] L, ↑σ ↑x = ↑(x * { val := ∏ σ in erase univ AlgEquiv.refl, ↑σ ↑x, property := hint })\n[PROOFSTEP]\nsimp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra K L\ninst✝⁹ : FiniteDimensional K L\nF : Type u_3\ninst✝⁸ : Field F\ninst✝⁷ : Algebra K F\ninst✝⁶ : IsSeparable K F\ninst✝⁵ : FiniteDimensional K F\ninst✝⁴ : IsSeparable K L\ninst✝³ : Algebra F L\ninst✝² : IsSeparable F L\ninst✝¹ : FiniteDimensional F L\ninst✝ : IsScalarTower K F L\nx : { x // x ∈ 𝓞 L }\n⊢ ↑(norm K) (↑(norm F) x) = ↑(norm K) x\n[PROOFSTEP]\nrw [← Subtype.coe_inj, norm_apply_coe, norm_apply_coe, norm_apply_coe, Algebra.norm_norm]\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\nF : Type u_3\ninst✝⁴ : Field F\ninst✝³ : Algebra K F\ninst✝² : IsSeparable K F\ninst✝¹ : FiniteDimensional K F\ninst✝ : CharZero K\nx : { x // x ∈ 𝓞 F }\n⊢ IsUnit (↑(norm K) x) ↔ IsUnit x\n[PROOFSTEP]\nletI : Algebra K (AlgebraicClosure K) := AlgebraicClosure.instAlgebra K\n[GOAL]\nL : Type u_1\nK : Type u_2\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\nF : Type u_3\ninst✝⁴ : Field F\ninst✝³ : Algebra K F\ninst✝² : IsSeparable K F\ninst✝¹ : FiniteDimensional K F\ninst✝ : CharZero K\nx : { x // x ∈ 𝓞 F }\nthis : Algebra K (AlgebraicClosure K) := AlgebraicClosure.instAlgebra K\n⊢ IsUnit (↑(norm K) x) ↔ IsUnit x\n[PROOFSTEP]\nlet L := normalClosure K F (AlgebraicClosure F)\n[GOAL]\nL✝ : Type u_1\nK : Type u_2\ninst✝⁸ : Field K\ninst✝⁷ : Field L✝\ninst✝⁶ : Algebra K L✝\ninst✝⁵ : FiniteDimensional K L✝\nF : Type u_3\ninst✝⁴ : Field F\ninst✝³ : Algebra K F\ninst✝² : IsSeparable K F\ninst✝¹ : FiniteDimensional K F\ninst✝ : CharZero K\nx : { x // x ∈ 𝓞 F }\nthis : Algebra K (AlgebraicClosure K) := AlgebraicClosure.instAlgebra K\nL : IntermediateField F (AlgebraicClosure F) := normalClosure K F (AlgebraicClosure F)\n⊢ IsUnit (↑(norm K) x) ↔ IsUnit x\n[PROOFSTEP]\nhaveI : FiniteDimensional F L := FiniteDimensional.right K F L\n[GOAL]\nL✝ : Type u_1\nK : Type u_2\ninst✝⁸ : Field K\ninst✝⁷ : Field L✝\ninst✝⁶ : Algebra K L✝\ninst✝⁵ : FiniteDimensional K L✝\nF : Type u_3\ninst✝⁴ : Field F\ninst✝³ : Algebra K F\ninst✝² : IsSeparable K F\ninst✝¹ : FiniteDimensional K F\ninst✝ : CharZero K\nx : { x // x ∈ 𝓞 F }\nthis✝ : Algebra K (AlgebraicClosure K) := AlgebraicClosure.instAlgebra K\nL : IntermediateField F (AlgebraicClosure F) := normalClosure K F (AlgebraicClosure F)\nthis : FiniteDimensional F { x // x ∈ L }\n⊢ IsUnit (↑(norm K) x) ↔ IsUnit x\n[PROOFSTEP]\nhaveI : IsAlgClosure K (AlgebraicClosure F) :=\n  IsAlgClosure.ofAlgebraic K F (AlgebraicClosure F) (Algebra.isAlgebraic_of_finite K F)\n[GOAL]\nL✝ : Type u_1\nK : Type u_2\ninst✝⁸ : Field K\ninst✝⁷ : Field L✝\ninst✝⁶ : Algebra K L✝\ninst✝⁵ : FiniteDimensional K L✝\nF : Type u_3\ninst✝⁴ : Field F\ninst✝³ : Algebra K F\ninst✝² : IsSeparable K F\ninst✝¹ : FiniteDimensional K F\ninst✝ : CharZero K\nx : { x // x ∈ 𝓞 F }\nthis✝¹ : Algebra K (AlgebraicClosure K) := AlgebraicClosure.instAlgebra K\nL : IntermediateField F (AlgebraicClosure F) := normalClosure K F (AlgebraicClosure F)\nthis✝ : FiniteDimensional F { x // x ∈ L }\nthis : IsAlgClosure K (AlgebraicClosure F)\n⊢ IsUnit (↑(norm K) x) ↔ IsUnit x\n[PROOFSTEP]\nhaveI : IsGalois F L := IsGalois.tower_top_of_isGalois K F L\n[GOAL]\nL✝ : Type u_1\nK : Type u_2\ninst✝⁸ : Field K\ninst✝⁷ : Field L✝\ninst✝⁶ : Algebra K L✝\ninst✝⁵ : FiniteDimensional K L✝\nF : Type u_3\ninst✝⁴ : Field F\ninst✝³ : Algebra K F\ninst✝² : IsSeparable K F\ninst✝¹ : FiniteDimensional K F\ninst✝ : CharZero K\nx : { x // x ∈ 𝓞 F }\nthis✝² : Algebra K (AlgebraicClosure K) := AlgebraicClosure.instAlgebra K\nL : IntermediateField F (AlgebraicClosure F) := normalClosure K F (AlgebraicClosure F)\nthis✝¹ : FiniteDimensional F { x // x ∈ L }\nthis✝ : IsAlgClosure K (AlgebraicClosure F)\nthis : IsGalois F { x // x ∈ L }\n⊢ IsUnit (↑(norm K) x) ↔ IsUnit x\n[PROOFSTEP]\ncalc\n  IsUnit (norm K x) ↔ IsUnit ((norm K) x ^ finrank F L) := (isUnit_pow_iff (pos_iff_ne_zero.mp finrank_pos)).symm\n  _ ↔ IsUnit (norm K (algebraMap (𝓞 F) (𝓞 L) x)) := by\n    rw [← norm_norm K F (algebraMap (𝓞 F) (𝓞 L) x), norm_algebraMap F _, map_pow]\n  _ ↔ IsUnit (algebraMap (𝓞 F) (𝓞 L) x) := (isUnit_norm_of_isGalois K)\n  _ ↔ IsUnit (norm F (algebraMap (𝓞 F) (𝓞 L) x)) := (isUnit_norm_of_isGalois F).symm\n  _ ↔ IsUnit (x ^ finrank F L) := (congr_arg IsUnit (norm_algebraMap F _)).to_iff\n  _ ↔ IsUnit x := isUnit_pow_iff (pos_iff_ne_zero.mp finrank_pos)\n[GOAL]\nL✝ : Type u_1\nK : Type u_2\ninst✝⁸ : Field K\ninst✝⁷ : Field L✝\ninst✝⁶ : Algebra K L✝\ninst✝⁵ : FiniteDimensional K L✝\nF : Type u_3\ninst✝⁴ : Field F\ninst✝³ : Algebra K F\ninst✝² : IsSeparable K F\ninst✝¹ : FiniteDimensional K F\ninst✝ : CharZero K\nx : { x // x ∈ 𝓞 F }\nthis✝² : Algebra K (AlgebraicClosure K) := AlgebraicClosure.instAlgebra K\nL : IntermediateField F (AlgebraicClosure F) := normalClosure K F (AlgebraicClosure F)\nthis✝¹ : FiniteDimensional F { x // x ∈ L }\nthis✝ : IsAlgClosure K (AlgebraicClosure F)\nthis : IsGalois F { x // x ∈ L }\n⊢ IsUnit (↑(norm K) x ^ finrank F { x // x ∈ L }) ↔\n    IsUnit (↑(norm K) (↑(algebraMap { x // x ∈ 𝓞 F } { x // x ∈ 𝓞 { x // x ∈ L } }) x))\n[PROOFSTEP]\nrw [← norm_norm K F (algebraMap (𝓞 F) (𝓞 L) x), norm_algebraMap F _, map_pow]\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.NumberField.Norm", "llama_tokens": 6442, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.705785040214066, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.37491962894868536}}
{"text": "[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nx : MvPolynomial σ R\ns : Set (σ →₀ ℕ)\n⊢ x ∈ Ideal.span ((fun s => ↑(monomial s) 1) '' s) ↔ ∀ (xi : σ →₀ ℕ), xi ∈ support x → ∃ si, si ∈ s ∧ si ≤ xi\n[PROOFSTEP]\nrefine' AddMonoidAlgebra.mem_ideal_span_of'_image.trans _\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nx : MvPolynomial σ R\ns : Set (σ →₀ ℕ)\n⊢ (∀ (m : σ →₀ ℕ), m ∈ x.support → ∃ m', m' ∈ s ∧ ∃ d, m = d + m') ↔\n    ∀ (xi : σ →₀ ℕ), xi ∈ support x → ∃ si, si ∈ s ∧ si ≤ xi\n[PROOFSTEP]\nsimp_rw [le_iff_exists_add, add_comm]\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nx : MvPolynomial σ R\ns : Set (σ →₀ ℕ)\n⊢ (∀ (m : σ →₀ ℕ), m ∈ x.support → ∃ m', m' ∈ s ∧ ∃ d, m = m' + d) ↔\n    ∀ (xi : σ →₀ ℕ), xi ∈ support x → ∃ si, si ∈ s ∧ ∃ c, xi = si + c\n[PROOFSTEP]\nrfl\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nx : MvPolynomial σ R\ns : Set (σ →₀ ℕ)\n⊢ x ∈ Ideal.span ((fun s => ↑(monomial s) 1) '' s) ↔\n    ∀ (xi : σ →₀ ℕ), xi ∈ support x → ∃ si, si ∈ s ∧ ↑(monomial si) 1 ∣ ↑(monomial xi) (coeff xi x)\n[PROOFSTEP]\nrefine' mem_ideal_span_monomial_image.trans (forall₂_congr fun xi hxi => _)\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nx : MvPolynomial σ R\ns : Set (σ →₀ ℕ)\nxi : σ →₀ ℕ\nhxi : xi ∈ support x\n⊢ (∃ si, si ∈ s ∧ si ≤ xi) ↔ ∃ si, si ∈ s ∧ ↑(monomial si) 1 ∣ ↑(monomial xi) (coeff xi x)\n[PROOFSTEP]\nsimp_rw [monomial_dvd_monomial, one_dvd, and_true_iff, mem_support_iff.mp hxi, false_or_iff]\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nx : MvPolynomial σ R\ns : Set σ\n⊢ x ∈ Ideal.span (X '' s) ↔ ∀ (m : σ →₀ ℕ), m ∈ support x → ∃ i, i ∈ s ∧ ↑m i ≠ 0\n[PROOFSTEP]\nhave := @mem_ideal_span_monomial_image σ R _ x ((fun i => Finsupp.single i 1) '' s)\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nx : MvPolynomial σ R\ns : Set σ\nthis :\n  x ∈ Ideal.span ((fun s => ↑(monomial s) 1) '' ((fun i => Finsupp.single i 1) '' s)) ↔\n    ∀ (xi : σ →₀ ℕ), xi ∈ support x → ∃ si, si ∈ (fun i => Finsupp.single i 1) '' s ∧ si ≤ xi\n⊢ x ∈ Ideal.span (X '' s) ↔ ∀ (m : σ →₀ ℕ), m ∈ support x → ∃ i, i ∈ s ∧ ↑m i ≠ 0\n[PROOFSTEP]\nrw [Set.image_image] at this \n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nx : MvPolynomial σ R\ns : Set σ\nthis :\n  x ∈ Ideal.span ((fun x => ↑(monomial (Finsupp.single x 1)) 1) '' s) ↔\n    ∀ (xi : σ →₀ ℕ), xi ∈ support x → ∃ si, si ∈ (fun i => Finsupp.single i 1) '' s ∧ si ≤ xi\n⊢ x ∈ Ideal.span (X '' s) ↔ ∀ (m : σ →₀ ℕ), m ∈ support x → ∃ i, i ∈ s ∧ ↑m i ≠ 0\n[PROOFSTEP]\nrefine' this.trans _\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nx : MvPolynomial σ R\ns : Set σ\nthis :\n  x ∈ Ideal.span ((fun x => ↑(monomial (Finsupp.single x 1)) 1) '' s) ↔\n    ∀ (xi : σ →₀ ℕ), xi ∈ support x → ∃ si, si ∈ (fun i => Finsupp.single i 1) '' s ∧ si ≤ xi\n⊢ (∀ (xi : σ →₀ ℕ), xi ∈ support x → ∃ si, si ∈ (fun i => Finsupp.single i 1) '' s ∧ si ≤ xi) ↔\n    ∀ (m : σ →₀ ℕ), m ∈ support x → ∃ i, i ∈ s ∧ ↑m i ≠ 0\n[PROOFSTEP]\nsimp [Nat.one_le_iff_ne_zero]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.MvPolynomial.Ideal", "llama_tokens": 1581, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850278370112, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.3749196223738779}}
{"text": "[GOAL]\nα : Type u\nf g : Filter α\ns t : Set α\n⊢ f = g ↔ ∀ (s : Set α), s ∈ f ↔ s ∈ g\n[PROOFSTEP]\nsimp only [filter_eq_iff, ext_iff, Filter.mem_sets]\n[GOAL]\nα : Type u\nf g : Filter α\ns✝ t : Set α\nβ : Type v\ns : β → Set α\nis : Set β\nhf : Set.Finite is\n⊢ ⋂ (i : β) (_ : i ∈ ∅), s i ∈ f ↔ ∀ (i : β), i ∈ ∅ → s i ∈ f\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nf g : Filter α\ns✝¹ t : Set α\nβ : Type v\ns : β → Set α\nis : Set β\nhf : Set.Finite is\na✝ : β\ns✝ : Set β\nx✝¹ : ¬a✝ ∈ s✝\nx✝ : Set.Finite s✝\nhs : ⋂ (i : β) (_ : i ∈ s✝), s i ∈ f ↔ ∀ (i : β), i ∈ s✝ → s i ∈ f\n⊢ ⋂ (i : β) (_ : i ∈ insert a✝ s✝), s i ∈ f ↔ ∀ (i : β), i ∈ insert a✝ s✝ → s i ∈ f\n[PROOFSTEP]\nsimp [hs]\n[GOAL]\nα : Type u\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nhfin : Set.Finite s\n⊢ ⋂₀ s ∈ f ↔ ∀ (U : Set α), U ∈ s → U ∈ f\n[PROOFSTEP]\nrw [sInter_eq_biInter, biInter_mem hfin]\n[GOAL]\nα : Type u\nf g : Filter α\ns t : Set α\nP Q : Set α → Prop\nhP : Antitone P\nhQ : Antitone Q\n⊢ ((∃ u, u ∈ f ∧ P u) ∧ ∃ u, u ∈ f ∧ Q u) ↔ ∃ u, u ∈ f ∧ P u ∧ Q u\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nf g : Filter α\ns t : Set α\nP Q : Set α → Prop\nhP : Antitone P\nhQ : Antitone Q\n⊢ ((∃ u, u ∈ f ∧ P u) ∧ ∃ u, u ∈ f ∧ Q u) → ∃ u, u ∈ f ∧ P u ∧ Q u\n[PROOFSTEP]\nrintro ⟨⟨u, huf, hPu⟩, v, hvf, hQv⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nα : Type u\nf g : Filter α\ns t : Set α\nP Q : Set α → Prop\nhP : Antitone P\nhQ : Antitone Q\nu : Set α\nhuf : u ∈ f\nhPu : P u\nv : Set α\nhvf : v ∈ f\nhQv : Q v\n⊢ ∃ u, u ∈ f ∧ P u ∧ Q u\n[PROOFSTEP]\nexact ⟨u ∩ v, inter_mem huf hvf, hP (inter_subset_left _ _) hPu, hQ (inter_subset_right _ _) hQv⟩\n[GOAL]\ncase mpr\nα : Type u\nf g : Filter α\ns t : Set α\nP Q : Set α → Prop\nhP : Antitone P\nhQ : Antitone Q\n⊢ (∃ u, u ∈ f ∧ P u ∧ Q u) → (∃ u, u ∈ f ∧ P u) ∧ ∃ u, u ∈ f ∧ Q u\n[PROOFSTEP]\nrintro ⟨u, huf, hPu, hQu⟩\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u\nf g : Filter α\ns t : Set α\nP Q : Set α → Prop\nhP : Antitone P\nhQ : Antitone Q\nu : Set α\nhuf : u ∈ f\nhPu : P u\nhQu : Q u\n⊢ (∃ u, u ∈ f ∧ P u) ∧ ∃ u, u ∈ f ∧ Q u\n[PROOFSTEP]\nexact ⟨⟨u, huf, hPu⟩, u, huf, hQu⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter (Filter α)\n⊢ univ ∈ {s | {t | s ∈ t} ∈ f}\n[PROOFSTEP]\nsimp only [mem_setOf_eq, univ_sets, ← Filter.mem_sets, setOf_true]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns t : Set α\n⊢ ¬f ≤ g ↔ ∃ s, s ∈ g ∧ ¬s ∈ f\n[PROOFSTEP]\nsimp_rw [le_def, not_forall, exists_prop]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU : Set α\n⊢ U ∈ generate s ↔ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ U\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU : Set α\n⊢ U ∈ generate s → ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ U\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU : Set α\n⊢ (∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ U) → U ∈ generate s\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU : Set α\nh : U ∈ generate s\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ U\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase mp.basic\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝¹ t : Set α\ns : Set (Set α)\nU s✝ : Set α\na✝ : s✝ ∈ s\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ s✝\ncase mp.univ\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU : Set α\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ univ\ncase mp.superset\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝¹ t : Set α\ns : Set (Set α)\nU s✝ t✝ : Set α\na✝¹ : GenerateSets s s✝\na✝ : s✝ ⊆ t✝\na_ih✝ : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ s✝\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ t✝\ncase mp.inter\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝¹ t : Set α\ns : Set (Set α)\nU s✝ t✝ : Set α\na✝¹ : GenerateSets s s✝\na✝ : GenerateSets s t✝\na_ih✝¹ : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ s✝\na_ih✝ : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ t✝\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ s✝ ∩ t✝\n[PROOFSTEP]\ncase basic V V_in => exact ⟨{ V }, singleton_subset_iff.2 V_in, finite_singleton _, (sInter_singleton _).subset⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU V : Set α\nV_in : V ∈ s\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ V\n[PROOFSTEP]\ncase basic V V_in => exact ⟨{ V }, singleton_subset_iff.2 V_in, finite_singleton _, (sInter_singleton _).subset⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU V : Set α\nV_in : V ∈ s\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ V\n[PROOFSTEP]\nexact ⟨{ V }, singleton_subset_iff.2 V_in, finite_singleton _, (sInter_singleton _).subset⟩\n[GOAL]\ncase mp.univ\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU : Set α\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ univ\ncase mp.superset\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝¹ t : Set α\ns : Set (Set α)\nU s✝ t✝ : Set α\na✝¹ : GenerateSets s s✝\na✝ : s✝ ⊆ t✝\na_ih✝ : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ s✝\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ t✝\ncase mp.inter\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝¹ t : Set α\ns : Set (Set α)\nU s✝ t✝ : Set α\na✝¹ : GenerateSets s s✝\na✝ : GenerateSets s t✝\na_ih✝¹ : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ s✝\na_ih✝ : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ t✝\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ s✝ ∩ t✝\n[PROOFSTEP]\ncase univ => exact ⟨∅, empty_subset _, finite_empty, subset_univ _⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU : Set α\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ univ\n[PROOFSTEP]\ncase univ => exact ⟨∅, empty_subset _, finite_empty, subset_univ _⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU : Set α\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ univ\n[PROOFSTEP]\nexact ⟨∅, empty_subset _, finite_empty, subset_univ _⟩\n[GOAL]\ncase mp.superset\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝¹ t : Set α\ns : Set (Set α)\nU s✝ t✝ : Set α\na✝¹ : GenerateSets s s✝\na✝ : s✝ ⊆ t✝\na_ih✝ : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ s✝\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ t✝\ncase mp.inter\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝¹ t : Set α\ns : Set (Set α)\nU s✝ t✝ : Set α\na✝¹ : GenerateSets s s✝\na✝ : GenerateSets s t✝\na_ih✝¹ : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ s✝\na_ih✝ : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ t✝\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ s✝ ∩ t✝\n[PROOFSTEP]\ncase superset V W _ hVW hV =>\n  rcases hV with ⟨t, hts, ht, htV⟩\n  exact ⟨t, hts, ht, htV.trans hVW⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU V W : Set α\na✝ : GenerateSets s V\nhVW : V ⊆ W\nhV : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ V\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ W\n[PROOFSTEP]\ncase superset V W _ hVW hV =>\n  rcases hV with ⟨t, hts, ht, htV⟩\n  exact ⟨t, hts, ht, htV.trans hVW⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU V W : Set α\na✝ : GenerateSets s V\nhVW : V ⊆ W\nhV : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ V\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ W\n[PROOFSTEP]\nrcases hV with ⟨t, hts, ht, htV⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t✝ : Set α\ns : Set (Set α)\nU V W : Set α\na✝ : GenerateSets s V\nhVW : V ⊆ W\nt : Set (Set α)\nhts : t ⊆ s\nht : Set.Finite t\nhtV : ⋂₀ t ⊆ V\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ W\n[PROOFSTEP]\nexact ⟨t, hts, ht, htV.trans hVW⟩\n[GOAL]\ncase mp.inter\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝¹ t : Set α\ns : Set (Set α)\nU s✝ t✝ : Set α\na✝¹ : GenerateSets s s✝\na✝ : GenerateSets s t✝\na_ih✝¹ : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ s✝\na_ih✝ : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ t✝\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ s✝ ∩ t✝\n[PROOFSTEP]\ncase inter V W _ _ hV hW =>\n  rcases hV, hW with ⟨⟨t, hts, ht, htV⟩, u, hus, hu, huW⟩\n  exact ⟨t ∪ u, union_subset hts hus, ht.union hu, (sInter_union _ _).subset.trans <| inter_subset_inter htV huW⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU V W : Set α\na✝¹ : GenerateSets s V\na✝ : GenerateSets s W\nhV : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ V\nhW : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ W\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ V ∩ W\n[PROOFSTEP]\ncase inter V W _ _ hV hW =>\n  rcases hV, hW with ⟨⟨t, hts, ht, htV⟩, u, hus, hu, huW⟩\n  exact ⟨t ∪ u, union_subset hts hus, ht.union hu, (sInter_union _ _).subset.trans <| inter_subset_inter htV huW⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU V W : Set α\na✝¹ : GenerateSets s V\na✝ : GenerateSets s W\nhV : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ V\nhW : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ W\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ V ∩ W\n[PROOFSTEP]\nrcases hV, hW with ⟨⟨t, hts, ht, htV⟩, u, hus, hu, huW⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t✝ : Set α\ns : Set (Set α)\nU V W : Set α\na✝¹ : GenerateSets s V\na✝ : GenerateSets s W\nt : Set (Set α)\nhts : t ⊆ s\nht : Set.Finite t\nhtV : ⋂₀ t ⊆ V\nu : Set (Set α)\nhus : u ⊆ s\nhu : Set.Finite u\nhuW : ⋂₀ u ⊆ W\n⊢ ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ V ∩ W\n[PROOFSTEP]\nexact ⟨t ∪ u, union_subset hts hus, ht.union hu, (sInter_union _ _).subset.trans <| inter_subset_inter htV huW⟩\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ns : Set (Set α)\nU : Set α\nh : ∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ U\n⊢ U ∈ generate s\n[PROOFSTEP]\nrcases h with ⟨t, hts, tfin, h⟩\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t✝ : Set α\ns : Set (Set α)\nU : Set α\nt : Set (Set α)\nhts : t ⊆ s\ntfin : Set.Finite t\nh : ⋂₀ t ⊆ U\n⊢ U ∈ generate s\n[PROOFSTEP]\nexact mem_of_superset ((sInter_mem tfin).2 fun V hV => GenerateSets.basic <| hts hV) h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g✝ : Filter α\ns t : Set α\nf g : Filter α\n⊢ univ = univ ∩ univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g✝ : Filter α\ns t : Set α\nf g : Filter α\n⊢ ∀ {x y : Set α}, x ∈ {s | ∃ a, a ∈ f ∧ ∃ b, b ∈ g ∧ s = a ∩ b} → x ⊆ y → y ∈ {s | ∃ a, a ∈ f ∧ ∃ b, b ∈ g ∧ s = a ∩ b}\n[PROOFSTEP]\nrintro x y ⟨a, ha, b, hb, rfl⟩ xy\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g✝ : Filter α\ns t : Set α\nf g : Filter α\ny a : Set α\nha : a ∈ f\nb : Set α\nhb : b ∈ g\nxy : a ∩ b ⊆ y\n⊢ y ∈ {s | ∃ a, a ∈ f ∧ ∃ b, b ∈ g ∧ s = a ∩ b}\n[PROOFSTEP]\nrefine' ⟨a ∪ y, mem_of_superset ha (subset_union_left a y), b ∪ y, mem_of_superset hb (subset_union_left b y), _⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g✝ : Filter α\ns t : Set α\nf g : Filter α\ny a : Set α\nha : a ∈ f\nb : Set α\nhb : b ∈ g\nxy : a ∩ b ⊆ y\n⊢ y = (a ∪ y) ∩ (b ∪ y)\n[PROOFSTEP]\nrw [← inter_union_distrib_right, union_eq_self_of_subset_left xy]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g✝ : Filter α\ns t : Set α\nf g : Filter α\n⊢ ∀ {x y : Set α},\n    x ∈ {s | ∃ a, a ∈ f ∧ ∃ b, b ∈ g ∧ s = a ∩ b} →\n      y ∈ {s | ∃ a, a ∈ f ∧ ∃ b, b ∈ g ∧ s = a ∩ b} → x ∩ y ∈ {s | ∃ a, a ∈ f ∧ ∃ b, b ∈ g ∧ s = a ∩ b}\n[PROOFSTEP]\nrintro x y ⟨a, ha, b, hb, rfl⟩ ⟨c, hc, d, hd, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g✝ : Filter α\ns t : Set α\nf g : Filter α\na : Set α\nha : a ∈ f\nb : Set α\nhb : b ∈ g\nc : Set α\nhc : c ∈ f\nd : Set α\nhd : d ∈ g\n⊢ a ∩ b ∩ (c ∩ d) ∈ {s | ∃ a, a ∈ f ∧ ∃ b, b ∈ g ∧ s = a ∩ b}\n[PROOFSTEP]\nrefine' ⟨a ∩ c, inter_mem ha hc, b ∩ d, inter_mem hb hd, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g✝ : Filter α\ns t : Set α\nf g : Filter α\na : Set α\nha : a ∈ f\nb : Set α\nhb : b ∈ g\nc : Set α\nhc : c ∈ f\nd : Set α\nhd : d ∈ g\n⊢ a ∩ b ∩ (c ∩ d) = a ∩ c ∩ (b ∩ d)\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t s : Set α\n⊢ s ∈ ⊤ ↔ s = univ\n[PROOFSTEP]\nrw [mem_top_iff_forall, eq_univ_iff_forall]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g✝ : Filter α\ns t : Set α\nf g : Filter α\n⊢ NeBot (f ⊔ g) ↔ NeBot f ∨ NeBot g\n[PROOFSTEP]\nsimp only [neBot_iff, not_and_or, Ne.def, sup_eq_bot_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns t : Set α\n⊢ ¬Disjoint f f ↔ NeBot f\n[PROOFSTEP]\nrw [disjoint_self, neBot_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t x : Set α\nf : ι → Filter α\n⊢ x ∈ iSup f ↔ ∀ (i : ι), x ∈ f i\n[PROOFSTEP]\nsimp only [← Filter.mem_sets, iSup_sets_eq, iff_self_iff, mem_iInter]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\n⊢ NeBot (⨆ (i : ι), f i) ↔ ∃ i, NeBot (f i)\n[PROOFSTEP]\nsimp [neBot_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nI_fin : Set.Finite I\nV : ↑I → Set α\nhV : ∀ (i : ↑I), V i ∈ s ↑i\nhU : ⋂ (i : ↑I), V i ⊆ U\n⊢ U ∈ ⨅ (i : ι), s i\n[PROOFSTEP]\nhaveI := I_fin.fintype\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nI_fin : Set.Finite I\nV : ↑I → Set α\nhV : ∀ (i : ↑I), V i ∈ s ↑i\nhU : ⋂ (i : ↑I), V i ⊆ U\nthis : Fintype ↑I\n⊢ U ∈ ⨅ (i : ι), s i\n[PROOFSTEP]\nrefine' mem_of_superset (iInter_mem.2 fun i => _) hU\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nI_fin : Set.Finite I\nV : ↑I → Set α\nhV : ∀ (i : ↑I), V i ∈ s ↑i\nhU : ⋂ (i : ↑I), V i ⊆ U\nthis : Fintype ↑I\ni : ↑I\n⊢ V i ∈ ⨅ (i : ι), s i\n[PROOFSTEP]\nexact mem_iInf_of_mem (i : ι) (hV _)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\n⊢ U ∈ ⨅ (i : ι), s i ↔ ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ (i : ↑I), V i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\n⊢ U ∈ ⨅ (i : ι), s i → ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ (i : ↑I), V i\n[PROOFSTEP]\nrw [iInf_eq_generate, mem_generate_iff]\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\n⊢ (∃ t x, Set.Finite t ∧ ⋂₀ t ⊆ U) → ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ (i : ↑I), V i\n[PROOFSTEP]\nrintro ⟨t, tsub, tfin, tinter⟩\n[GOAL]\ncase mp.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t✝ : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nt : Set (Set α)\ntsub : t ⊆ ⋃ (i : ι), (s i).sets\ntfin : Set.Finite t\ntinter : ⋂₀ t ⊆ U\n⊢ ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ (i : ↑I), V i\n[PROOFSTEP]\nrcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nIfin : Set.Finite I\nσ : ↑{i | i ∈ I} → Set (Set α)\nσfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)\nσsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets\ntsub : ⋃ (i : ↑{i | i ∈ I}), σ i ⊆ ⋃ (i : ι), (s i).sets\ntfin : Set.Finite (⋃ (i : ↑{i | i ∈ I}), σ i)\ntinter : ⋂₀ ⋃ (i : ↑{i | i ∈ I}), σ i ⊆ U\n⊢ ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ (i : ↑I), V i\n[PROOFSTEP]\nrw [sInter_iUnion] at tinter \n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nIfin : Set.Finite I\nσ : ↑{i | i ∈ I} → Set (Set α)\nσfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)\nσsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets\ntsub : ⋃ (i : ↑{i | i ∈ I}), σ i ⊆ ⋃ (i : ι), (s i).sets\ntfin : Set.Finite (⋃ (i : ↑{i | i ∈ I}), σ i)\ntinter : ⋂ (i : ↑{i | i ∈ I}), ⋂₀ σ i ⊆ U\n⊢ ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ (i : ↑I), V i\n[PROOFSTEP]\nset V := fun i => U ∪ ⋂₀ σ i with hV\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nIfin : Set.Finite I\nσ : ↑{i | i ∈ I} → Set (Set α)\nσfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)\nσsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets\ntsub : ⋃ (i : ↑{i | i ∈ I}), σ i ⊆ ⋃ (i : ι), (s i).sets\ntfin : Set.Finite (⋃ (i : ↑{i | i ∈ I}), σ i)\ntinter : ⋂ (i : ↑{i | i ∈ I}), ⋂₀ σ i ⊆ U\nV : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i\nhV : V = fun i => U ∪ ⋂₀ σ i\n⊢ ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ (i : ↑I), V i\n[PROOFSTEP]\nhave V_in : ∀ i, V i ∈ s i := by\n  rintro i\n  have : ⋂₀ σ i ∈ s i := by\n    rw [sInter_mem (σfin _)]\n    apply σsub\n  exact mem_of_superset this (subset_union_right _ _)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nIfin : Set.Finite I\nσ : ↑{i | i ∈ I} → Set (Set α)\nσfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)\nσsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets\ntsub : ⋃ (i : ↑{i | i ∈ I}), σ i ⊆ ⋃ (i : ι), (s i).sets\ntfin : Set.Finite (⋃ (i : ↑{i | i ∈ I}), σ i)\ntinter : ⋂ (i : ↑{i | i ∈ I}), ⋂₀ σ i ⊆ U\nV : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i\nhV : V = fun i => U ∪ ⋂₀ σ i\n⊢ ∀ (i : ↑{i | i ∈ I}), V i ∈ s ↑i\n[PROOFSTEP]\nrintro i\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nIfin : Set.Finite I\nσ : ↑{i | i ∈ I} → Set (Set α)\nσfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)\nσsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets\ntsub : ⋃ (i : ↑{i | i ∈ I}), σ i ⊆ ⋃ (i : ι), (s i).sets\ntfin : Set.Finite (⋃ (i : ↑{i | i ∈ I}), σ i)\ntinter : ⋂ (i : ↑{i | i ∈ I}), ⋂₀ σ i ⊆ U\nV : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i\nhV : V = fun i => U ∪ ⋂₀ σ i\ni : ↑{i | i ∈ I}\n⊢ V i ∈ s ↑i\n[PROOFSTEP]\nhave : ⋂₀ σ i ∈ s i := by\n  rw [sInter_mem (σfin _)]\n  apply σsub\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nIfin : Set.Finite I\nσ : ↑{i | i ∈ I} → Set (Set α)\nσfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)\nσsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets\ntsub : ⋃ (i : ↑{i | i ∈ I}), σ i ⊆ ⋃ (i : ι), (s i).sets\ntfin : Set.Finite (⋃ (i : ↑{i | i ∈ I}), σ i)\ntinter : ⋂ (i : ↑{i | i ∈ I}), ⋂₀ σ i ⊆ U\nV : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i\nhV : V = fun i => U ∪ ⋂₀ σ i\ni : ↑{i | i ∈ I}\n⊢ ⋂₀ σ i ∈ s ↑i\n[PROOFSTEP]\nrw [sInter_mem (σfin _)]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nIfin : Set.Finite I\nσ : ↑{i | i ∈ I} → Set (Set α)\nσfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)\nσsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets\ntsub : ⋃ (i : ↑{i | i ∈ I}), σ i ⊆ ⋃ (i : ι), (s i).sets\ntfin : Set.Finite (⋃ (i : ↑{i | i ∈ I}), σ i)\ntinter : ⋂ (i : ↑{i | i ∈ I}), ⋂₀ σ i ⊆ U\nV : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i\nhV : V = fun i => U ∪ ⋂₀ σ i\ni : ↑{i | i ∈ I}\n⊢ ∀ (U : Set α), U ∈ σ i → U ∈ s ↑i\n[PROOFSTEP]\napply σsub\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nIfin : Set.Finite I\nσ : ↑{i | i ∈ I} → Set (Set α)\nσfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)\nσsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets\ntsub : ⋃ (i : ↑{i | i ∈ I}), σ i ⊆ ⋃ (i : ι), (s i).sets\ntfin : Set.Finite (⋃ (i : ↑{i | i ∈ I}), σ i)\ntinter : ⋂ (i : ↑{i | i ∈ I}), ⋂₀ σ i ⊆ U\nV : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i\nhV : V = fun i => U ∪ ⋂₀ σ i\ni : ↑{i | i ∈ I}\nthis : ⋂₀ σ i ∈ s ↑i\n⊢ V i ∈ s ↑i\n[PROOFSTEP]\nexact mem_of_superset this (subset_union_right _ _)\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nIfin : Set.Finite I\nσ : ↑{i | i ∈ I} → Set (Set α)\nσfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)\nσsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets\ntsub : ⋃ (i : ↑{i | i ∈ I}), σ i ⊆ ⋃ (i : ι), (s i).sets\ntfin : Set.Finite (⋃ (i : ↑{i | i ∈ I}), σ i)\ntinter : ⋂ (i : ↑{i | i ∈ I}), ⋂₀ σ i ⊆ U\nV : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i\nhV : V = fun i => U ∪ ⋂₀ σ i\nV_in : ∀ (i : ↑{i | i ∈ I}), V i ∈ s ↑i\n⊢ ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ (i : ↑I), V i\n[PROOFSTEP]\nrefine' ⟨I, Ifin, V, V_in, _⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\nI : Set ι\nIfin : Set.Finite I\nσ : ↑{i | i ∈ I} → Set (Set α)\nσfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)\nσsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets\ntsub : ⋃ (i : ↑{i | i ∈ I}), σ i ⊆ ⋃ (i : ι), (s i).sets\ntfin : Set.Finite (⋃ (i : ↑{i | i ∈ I}), σ i)\ntinter : ⋂ (i : ↑{i | i ∈ I}), ⋂₀ σ i ⊆ U\nV : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i\nhV : V = fun i => U ∪ ⋂₀ σ i\nV_in : ∀ (i : ↑{i | i ∈ I}), V i ∈ s ↑i\n⊢ U = ⋂ (i : ↑I), V i\n[PROOFSTEP]\nrwa [hV, ← union_iInter, union_eq_self_of_subset_right]\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\n⊢ (∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ (i : ↑I), V i) → U ∈ ⨅ (i : ι), s i\n[PROOFSTEP]\nrintro ⟨I, Ifin, V, V_in, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nI : Set ι\nIfin : Set.Finite I\nV : ↑I → Set α\nV_in : ∀ (i : ↑I), V i ∈ s ↑i\n⊢ ⋂ (i : ↑I), V i ∈ ⨅ (i : ι), s i\n[PROOFSTEP]\nexact mem_iInf_of_iInter Ifin V_in Subset.rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\n⊢ U ∈ ⨅ (i : ι), s i ↔\n    ∃ I,\n      Set.Finite I ∧\n        ∃ V,\n          (∀ (i : ι), V i ∈ s i) ∧\n            (∀ (i : ι), ¬i ∈ I → V i = univ) ∧ U = ⋂ (i : ι) (_ : i ∈ I), V i ∧ U = ⋂ (i : ι), V i\n[PROOFSTEP]\nsimp only [mem_iInf, SetCoe.forall', biInter_eq_iInter]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\n⊢ (∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ (i : ↑I), V i) ↔\n    ∃ I,\n      Set.Finite I ∧\n        ∃ V, (∀ (i : ι), V i ∈ s i) ∧ (∀ (i : ι), ¬i ∈ I → V i = univ) ∧ U = ⋂ (x : ↑I), V ↑x ∧ U = ⋂ (i : ι), V i\n[PROOFSTEP]\nrefine' ⟨_, fun ⟨I, If, V, hVs, _, hVU, _⟩ => ⟨I, If, fun i => V i, fun i => hVs i, hVU⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nU : Set α\n⊢ (∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ (i : ↑I), V i) →\n    ∃ I,\n      Set.Finite I ∧\n        ∃ V, (∀ (i : ι), V i ∈ s i) ∧ (∀ (i : ι), ¬i ∈ I → V i = univ) ∧ U = ⋂ (x : ↑I), V ↑x ∧ U = ⋂ (i : ι), V i\n[PROOFSTEP]\nrintro ⟨I, If, V, hV, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nI : Set ι\nIf : Set.Finite I\nV : ↑I → Set α\nhV : ∀ (i : ↑I), V i ∈ s ↑i\n⊢ ∃ I_1,\n    Set.Finite I_1 ∧\n      ∃ V_1,\n        (∀ (i : ι), V_1 i ∈ s i) ∧\n          (∀ (i : ι), ¬i ∈ I_1 → V_1 i = univ) ∧\n            ⋂ (i : ↑I), V i = ⋂ (x : ↑I_1), V_1 ↑x ∧ ⋂ (i : ↑I), V i = ⋂ (i : ι), V_1 i\n[PROOFSTEP]\nrefine' ⟨I, If, fun i => if hi : i ∈ I then V ⟨i, hi⟩ else univ, fun i => _, fun i hi => _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nI : Set ι\nIf : Set.Finite I\nV : ↑I → Set α\nhV : ∀ (i : ↑I), V i ∈ s ↑i\ni : ι\n⊢ (fun i => if hi : i ∈ I then V { val := i, property := hi } else univ) i ∈ s i\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nI : Set ι\nIf : Set.Finite I\nV : ↑I → Set α\nhV : ∀ (i : ↑I), V i ∈ s ↑i\ni : ι\n⊢ (if hi : i ∈ I then V { val := i, property := hi } else univ) ∈ s i\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nI : Set ι\nIf : Set.Finite I\nV : ↑I → Set α\nhV : ∀ (i : ↑I), V i ∈ s ↑i\ni : ι\nh✝ : i ∈ I\n⊢ V { val := i, property := h✝ } ∈ s i\ncase neg\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nI : Set ι\nIf : Set.Finite I\nV : ↑I → Set α\nhV : ∀ (i : ↑I), V i ∈ s ↑i\ni : ι\nh✝ : ¬i ∈ I\n⊢ univ ∈ s i\n[PROOFSTEP]\nexacts [hV _, univ_mem]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nI : Set ι\nIf : Set.Finite I\nV : ↑I → Set α\nhV : ∀ (i : ↑I), V i ∈ s ↑i\ni : ι\nhi : ¬i ∈ I\n⊢ (fun i => if hi : i ∈ I then V { val := i, property := hi } else univ) i = univ\n[PROOFSTEP]\nexact dif_neg hi\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Type u_2\ns : ι → Filter α\nI : Set ι\nIf : Set.Finite I\nV : ↑I → Set α\nhV : ∀ (i : ↑I), V i ∈ s ↑i\n⊢ ⋂ (i : ↑I), V i = ⋂ (x : ↑I), (fun i => if hi : i ∈ I then V { val := i, property := hi } else univ) ↑x ∧\n    ⋂ (i : ↑I), V i = ⋂ (i : ι), (fun i => if hi : i ∈ I then V { val := i, property := hi } else univ) i\n[PROOFSTEP]\nsimp only [iInter_dite, biInter_eq_iInter, dif_pos (Subtype.coe_prop _), Subtype.coe_eta, iInter_univ, inter_univ,\n  eq_self_iff_true, true_and_iff]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α✝\ns✝ t : Set α✝\nι : Type u_2\ninst✝ : Finite ι\nα : Type u_3\nf : ι → Filter α\ns : Set α\n⊢ s ∈ ⨅ (i : ι), f i ↔ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ s = ⋂ (i : ι), t i\n[PROOFSTEP]\nrefine' ⟨exists_iInter_of_mem_iInf, _⟩\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α✝\ns✝ t : Set α✝\nι : Type u_2\ninst✝ : Finite ι\nα : Type u_3\nf : ι → Filter α\ns : Set α\n⊢ (∃ t, (∀ (i : ι), t i ∈ f i) ∧ s = ⋂ (i : ι), t i) → s ∈ ⨅ (i : ι), f i\n[PROOFSTEP]\nrintro ⟨t, ht, rfl⟩\n[GOAL]\ncase intro.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α✝\ns t✝ : Set α✝\nι : Type u_2\ninst✝ : Finite ι\nα : Type u_3\nf : ι → Filter α\nt : ι → Set α\nht : ∀ (i : ι), t i ∈ f i\n⊢ ⋂ (i : ι), t i ∈ ⨅ (i : ι), f i\n[PROOFSTEP]\nexact iInter_mem.2 fun i => mem_iInf_of_mem i (ht i)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t✝ s t : Set α\n⊢ 𝓟 s ≤ 𝓟 t ↔ s ⊆ t\n[PROOFSTEP]\nsimp only [le_principal_iff, iff_self_iff, mem_principal]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t✝ s t : Set α\n⊢ 𝓟 s = 𝓟 t ↔ s = t\n[PROOFSTEP]\nsimp only [le_antisymm_iff, le_principal_iff, mem_principal]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t✝ s t : Set α\n⊢ s ⊆ t ∧ t ⊆ s ↔ s ≤ t ∧ t ≤ s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns t : Set α\n⊢ ⊤ ≤ 𝓟 univ\n[PROOFSTEP]\nsimp only [le_principal_iff, mem_top, eq_self_iff_true]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nS : Set (Set α)\nf : Filter α\n⊢ f ≤ generate S ↔ f ≤ ⨅ (s : Set α) (_ : s ∈ S), 𝓟 s\n[PROOFSTEP]\nsimp [le_generate_iff, le_principal_iff, subset_def]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g✝ : Filter α\ns t : Set α\nf g : Filter α\n⊢ Disjoint f g ↔ ∃ s, s ∈ f ∧ ∃ t, t ∈ g ∧ Disjoint s t\n[PROOFSTEP]\nsimp only [disjoint_iff, ← empty_mem_iff_bot, mem_inf_iff, inf_eq_inter, bot_eq_empty, @eq_comm _ ∅]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g✝ : Filter α\ns t : Set α\nf g : Filter α\n⊢ f ⊓ g = ⊥ ↔ ∃ U, U ∈ f ∧ ∃ V, V ∈ g ∧ U ∩ V = ∅\n[PROOFSTEP]\nsimp only [← disjoint_iff, Filter.disjoint_iff, Set.disjoint_iff_inter_eq_empty]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns t : Set α\nι : Type u_2\ninst✝ : Finite ι\nl : ι → Filter α\nhd : Pairwise (Disjoint on l)\n⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ Pairwise (Disjoint on s)\n[PROOFSTEP]\nhave : ∀ i j, i ≠ j → ∃ (s : { s // s ∈ l i }) (t : { t // t ∈ l j }), Disjoint s.1 t.1\n[GOAL]\ncase this\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns t : Set α\nι : Type u_2\ninst✝ : Finite ι\nl : ι → Filter α\nhd : Pairwise (Disjoint on l)\n⊢ ∀ (i j : ι), i ≠ j → ∃ s t, Disjoint ↑s ↑t\n[PROOFSTEP]\nsimpa only [Pairwise, Function.onFun, Filter.disjoint_iff, exists_prop, Subtype.exists] using hd\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns t : Set α\nι : Type u_2\ninst✝ : Finite ι\nl : ι → Filter α\nhd : Pairwise (Disjoint on l)\nthis : ∀ (i j : ι), i ≠ j → ∃ s t, Disjoint ↑s ↑t\n⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ Pairwise (Disjoint on s)\n[PROOFSTEP]\nchoose! s t hst using this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t✝ : Set α\nι : Type u_2\ninst✝ : Finite ι\nl : ι → Filter α\nhd : Pairwise (Disjoint on l)\ns : (i : ι) → ι → { s // s ∈ l i }\nt : ι → (j : ι) → { t // t ∈ l j }\nhst : ∀ (i j : ι), i ≠ j → Disjoint ↑(s i j) ↑(t i j)\n⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ Pairwise (Disjoint on s)\n[PROOFSTEP]\nrefine' ⟨fun i => ⋂ j, s i j ∩ t j i, fun i => _, fun i j hij => _⟩\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t✝ : Set α\nι : Type u_2\ninst✝ : Finite ι\nl : ι → Filter α\nhd : Pairwise (Disjoint on l)\ns : (i : ι) → ι → { s // s ∈ l i }\nt : ι → (j : ι) → { t // t ∈ l j }\nhst : ∀ (i j : ι), i ≠ j → Disjoint ↑(s i j) ↑(t i j)\ni : ι\n⊢ (fun i => ⋂ (j : ι), ↑(s i j) ∩ ↑(t j i)) i ∈ l i\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t✝ : Set α\nι : Type u_2\ninst✝ : Finite ι\nl : ι → Filter α\nhd : Pairwise (Disjoint on l)\ns : (i : ι) → ι → { s // s ∈ l i }\nt : ι → (j : ι) → { t // t ∈ l j }\nhst : ∀ (i j : ι), i ≠ j → Disjoint ↑(s i j) ↑(t i j)\ni j : ι\nhij : i ≠ j\n⊢ (Disjoint on fun i => ⋂ (j : ι), ↑(s i j) ∩ ↑(t j i)) i j\n[PROOFSTEP]\nexacts [iInter_mem.2 fun j => inter_mem (@s i j).2 (@t j i).2,\n  (hst _ _ hij).mono ((iInter_subset _ j).trans (inter_subset_left _ _))\n    ((iInter_subset _ i).trans (inter_subset_right _ _))]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns t✝ : Set α\nι : Type u_2\nl : ι → Filter α\nt : Set ι\nhd : PairwiseDisjoint t l\nht : Set.Finite t\n⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ PairwiseDisjoint t s\n[PROOFSTEP]\nhaveI := ht.to_subtype\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns t✝ : Set α\nι : Type u_2\nl : ι → Filter α\nt : Set ι\nhd : PairwiseDisjoint t l\nht : Set.Finite t\nthis : Finite ↑t\n⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ PairwiseDisjoint t s\n[PROOFSTEP]\nrcases(hd.subtype _ _).exists_mem_filter_of_disjoint with ⟨s, hsl, hsd⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t✝ : Set α\nι : Type u_2\nl : ι → Filter α\nt : Set ι\nhd : PairwiseDisjoint t l\nht : Set.Finite t\nthis : Finite ↑t\ns : ↑t → Set α\nhsl : ∀ (i : ↑t), s i ∈ l ↑i\nhsd : Pairwise (Disjoint on s)\n⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ PairwiseDisjoint t s\n[PROOFSTEP]\nlift s to (i : t) → { s // s ∈ l i } using hsl\n[GOAL]\ncase intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t✝ : Set α\nι : Type u_2\nl : ι → Filter α\nt : Set ι\nhd : PairwiseDisjoint t l\nht : Set.Finite t\nthis : Finite ↑t\ns : (i : ↑t) → { s // s ∈ l ↑i }\nhsd : Pairwise (Disjoint on fun i => ↑(s i))\n⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ PairwiseDisjoint t s\n[PROOFSTEP]\nrcases@Subtype.exists_pi_extension ι (fun i => { s // s ∈ l i }) _ _ s with ⟨s, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t✝ : Set α\nι : Type u_2\nl : ι → Filter α\nt : Set ι\nhd : PairwiseDisjoint t l\nht : Set.Finite t\nthis : Finite ↑t\ns : (i : ι) → { s // s ∈ l i }\nhsd : Pairwise (Disjoint on fun i => ↑((fun i => s ↑i) i))\n⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ PairwiseDisjoint t s\n[PROOFSTEP]\nexact ⟨fun i => s i, fun i => (s i).2, hsd.set_of_subtype _ _⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns t : Set α\ninst✝¹ : Subsingleton α\nl : Filter α\ninst✝ : NeBot l\n⊢ l = ⊤\n[PROOFSTEP]\nrefine' top_unique fun s hs => _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ninst✝¹ : Subsingleton α\nl : Filter α\ninst✝ : NeBot l\ns : Set α\nhs : s ∈ l\n⊢ s ∈ ⊤\n[PROOFSTEP]\nobtain rfl : s = univ\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ninst✝¹ : Subsingleton α\nl : Filter α\ninst✝ : NeBot l\ns : Set α\nhs : s ∈ l\n⊢ s = univ\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns t : Set α\ninst✝¹ : Subsingleton α\nl : Filter α\ninst✝ : NeBot l\nhs : univ ∈ l\n⊢ univ ∈ ⊤\n[PROOFSTEP]\nexact Subsingleton.eq_univ_of_nonempty (nonempty_of_mem hs)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns t : Set α\ninst✝¹ : Subsingleton α\nl : Filter α\ninst✝ : NeBot l\nhs : univ ∈ l\n⊢ univ ∈ ⊤\n[PROOFSTEP]\nexact univ_mem\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\ninst✝ : Nonempty α\ns : Set α\nhs : s ∈ ⊤\n⊢ Set.Nonempty s\n[PROOFSTEP]\nrwa [mem_top.1 hs, ← nonempty_iff_univ_nonempty]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\np : ι → Prop\nl : Filter α\nh : ∀ {s : Set α}, s ∈ l ↔ ∃ i, p i ∧ s ∈ f i\n⊢ l = ⨅ (i : ι) (_ : p i), f i\n[PROOFSTEP]\nrw [iInf_subtype']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\np : ι → Prop\nl : Filter α\nh : ∀ {s : Set α}, s ∈ l ↔ ∃ i, p i ∧ s ∈ f i\n⊢ l = ⨅ (x : { i // p i }), f ↑x\n[PROOFSTEP]\nexact eq_iInf_of_mem_iff_exists_mem <| fun {_} => by simp only [Subtype.exists, h, exists_prop]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\np : ι → Prop\nl : Filter α\nh : ∀ {s : Set α}, s ∈ l ↔ ∃ i, p i ∧ s ∈ f i\nx✝ : Set α\n⊢ x✝ ∈ l ↔ ∃ i, x✝ ∈ f ↑i\n[PROOFSTEP]\nsimp only [Subtype.exists, h, exists_prop]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\nh : Directed (fun x x_1 => x ≥ x_1) f\nne : Nonempty ι\ni : ι\n⊢ ∀ {x y : Set α}, x ∈ ⋃ (i : ι), (f i).sets → x ⊆ y → y ∈ ⋃ (i : ι), (f i).sets\n[PROOFSTEP]\nsimp only [mem_iUnion, exists_imp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\nh : Directed (fun x x_1 => x ≥ x_1) f\nne : Nonempty ι\ni : ι\n⊢ ∀ {x y : Set α} (x_1 : ι), x ∈ (f x_1).sets → x ⊆ y → ∃ i, y ∈ (f i).sets\n[PROOFSTEP]\nexact fun i hx hxy => ⟨i, mem_of_superset hx hxy⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\nh : Directed (fun x x_1 => x ≥ x_1) f\nne : Nonempty ι\ni : ι\n⊢ ∀ {x y : Set α}, x ∈ ⋃ (i : ι), (f i).sets → y ∈ ⋃ (i : ι), (f i).sets → x ∩ y ∈ ⋃ (i : ι), (f i).sets\n[PROOFSTEP]\nsimp only [mem_iUnion, exists_imp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\nh : Directed (fun x x_1 => x ≥ x_1) f\nne : Nonempty ι\ni : ι\n⊢ ∀ {x y : Set α} (x_1 : ι), x ∈ (f x_1).sets → ∀ (x_2 : ι), y ∈ (f x_2).sets → ∃ i, x ∩ y ∈ (f i).sets\n[PROOFSTEP]\nintro x y a hx b hy\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\nh : Directed (fun x x_1 => x ≥ x_1) f\nne : Nonempty ι\ni : ι\nx y : Set α\na : ι\nhx : x ∈ (f a).sets\nb : ι\nhy : y ∈ (f b).sets\n⊢ ∃ i, x ∩ y ∈ (f i).sets\n[PROOFSTEP]\nrcases h a b with ⟨c, ha, hb⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\nh : Directed (fun x x_1 => x ≥ x_1) f\nne : Nonempty ι\ni : ι\nx y : Set α\na : ι\nhx : x ∈ (f a).sets\nb : ι\nhy : y ∈ (f b).sets\nc : ι\nha : f a ≥ f c\nhb : f b ≥ f c\n⊢ ∃ i, x ∩ y ∈ (f i).sets\n[PROOFSTEP]\nexact ⟨c, inter_mem (ha hx) (hb hy)⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\nh : Directed (fun x x_1 => x ≥ x_1) f\nne : Nonempty ι\ni : ι\nu : Filter α :=\n  { sets := ⋃ (i : ι), (f i).sets, univ_sets := (_ : univ ∈ ⋃ (i : ι), (f i).sets), sets_of_superset := ?m.89808,\n    inter_sets := ?m.89809 }\nthis : u = iInf f\n⊢ u.sets = ⋃ (i : ι), (f i).sets\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nf : ι → Filter α\nh : Directed (fun x x_1 => x ≥ x_1) f\ninst✝ : Nonempty ι\ns : Set α\n⊢ s ∈ iInf f ↔ ∃ i, s ∈ f i\n[PROOFSTEP]\nsimp only [← Filter.mem_sets, iInf_sets_eq h, mem_iUnion]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nf : β → Filter α\ns : Set β\nh : DirectedOn (f ⁻¹'o fun x x_1 => x ≥ x_1) s\nne : Set.Nonempty s\nt : Set α\n⊢ t ∈ ⨅ (i : β) (_ : i ∈ s), f i ↔ ∃ i, i ∈ s ∧ t ∈ f i\n[PROOFSTEP]\nhaveI := ne.to_subtype\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nf : β → Filter α\ns : Set β\nh : DirectedOn (f ⁻¹'o fun x x_1 => x ≥ x_1) s\nne : Set.Nonempty s\nt : Set α\nthis : Nonempty ↑s\n⊢ t ∈ ⨅ (i : β) (_ : i ∈ s), f i ↔ ∃ i, i ∈ s ∧ t ∈ f i\n[PROOFSTEP]\nsimp_rw [iInf_subtype', mem_iInf_of_directed h.directed_val, Subtype.exists, exists_prop]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nf : β → Filter α\ns : Set β\nh : DirectedOn (f ⁻¹'o fun x x_1 => x ≥ x_1) s\nne : Set.Nonempty s\nt : Set α\n⊢ t ∈ (⨅ (i : β) (_ : i ∈ s), f i).sets ↔ t ∈ ⋃ (i : β) (_ : i ∈ s), (f i).sets\n[PROOFSTEP]\nsimp [mem_biInf_of_directed h ne]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α\ns t : Set α\nι : Type u_2\nf : ι → Filter α\n⊢ (⨅ (i : ι), f i).sets = ⋃ (t : Finset ι), (⨅ (i : ι) (_ : i ∈ t), f i).sets\n[PROOFSTEP]\nrw [iInf_eq_iInf_finset, iInf_sets_eq]\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α\ns t : Set α\nι : Type u_2\nf : ι → Filter α\n⊢ Directed (fun x x_1 => x ≥ x_1) fun t => ⨅ (i : ι) (_ : i ∈ t), f i\n[PROOFSTEP]\nexact directed_of_sup fun _ _ => biInf_mono\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\n⊢ (⨅ (i : ι), f i).sets = ⋃ (t : Finset (PLift ι)), (⨅ (i : PLift ι) (_ : i ∈ t), f i.down).sets\n[PROOFSTEP]\nrw [← iInf_sets_eq_finite, ← Equiv.plift.surjective.iInf_comp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\n⊢ (⨅ (x : PLift ι), f (↑Equiv.plift x)).sets = (⨅ (i : PLift ι), f i.down).sets\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns t : Set α\nf₁ f₂ : Filter (Filter α)\nx : Set α\n⊢ x ∈ join f₁ ⊔ join f₂ ↔ x ∈ join (f₁ ⊔ f₂)\n[PROOFSTEP]\nsimp only [mem_sup, mem_join]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α\ns t : Set α\nι : Sort w\nf : ι → Filter (Filter α)\nx : Set α\n⊢ x ∈ ⨆ (x : ι), join (f x) ↔ x ∈ join (⨆ (x : ι), f x)\n[PROOFSTEP]\nsimp only [mem_iSup, mem_join]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns t : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\n⊢ ∀ (x y z : Filter α), (x ⊔ y) ⊓ (x ⊔ z) ≤ x ⊔ y ⊓ z\n[PROOFSTEP]\nintro x y z s\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\nx y z : Filter α\ns : Set α\n⊢ s ∈ x ⊔ y ⊓ z → s ∈ (x ⊔ y) ⊓ (x ⊔ z)\n[PROOFSTEP]\nsimp only [and_assoc, mem_inf_iff, mem_sup, exists_prop, exists_imp, and_imp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\nx y z : Filter α\ns : Set α\n⊢ s ∈ x →\n    ∀ (x_1 : Set α),\n      x_1 ∈ y → ∀ (x_2 : Set α), x_2 ∈ z → s = x_1 ∩ x_2 → ∃ t₁, t₁ ∈ x ∧ t₁ ∈ y ∧ ∃ t₂, t₂ ∈ x ∧ t₂ ∈ z ∧ s = t₁ ∩ t₂\n[PROOFSTEP]\nrintro hs t₁ ht₁ t₂ ht₂ rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns t : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\nx y z : Filter α\nt₁ : Set α\nht₁ : t₁ ∈ y\nt₂ : Set α\nht₂ : t₂ ∈ z\nhs : t₁ ∩ t₂ ∈ x\n⊢ ∃ t₁_1, t₁_1 ∈ x ∧ t₁_1 ∈ y ∧ ∃ t₂_1, t₂_1 ∈ x ∧ t₂_1 ∈ z ∧ t₁ ∩ t₂ = t₁_1 ∩ t₂_1\n[PROOFSTEP]\nexact\n  ⟨t₁, x.sets_of_superset hs (inter_subset_left t₁ t₂), ht₁, t₂, x.sets_of_superset hs (inter_subset_right t₁ t₂), ht₂,\n    rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\nf : Filter α\ns : Set (Filter α)\nt : Set α\nx✝ : t ∈ f ⊔ sInf s\nh₁ : t ∈ f.sets\nh₂ : t ∈ (sInf s).sets\n⊢ t ∈ ⨅ (b : Filter α) (_ : b ∈ s), f ⊔ b\n[PROOFSTEP]\nrw [iInf_subtype']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\nf : Filter α\ns : Set (Filter α)\nt : Set α\nx✝ : t ∈ f ⊔ sInf s\nh₁ : t ∈ f.sets\nh₂ : t ∈ (sInf s).sets\n⊢ t ∈ ⨅ (x : { b // b ∈ s }), f ⊔ ↑x\n[PROOFSTEP]\nrw [sInf_eq_iInf', iInf_sets_eq_finite, mem_iUnion] at h₂ \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\nf : Filter α\ns : Set (Filter α)\nt : Set α\nx✝ : t ∈ f ⊔ sInf s\nh₁ : t ∈ f.sets\nh₂ : ∃ i, t ∈ (⨅ (i_1 : ↑s) (_ : i_1 ∈ i), ↑i_1).sets\n⊢ t ∈ ⨅ (x : { b // b ∈ s }), f ⊔ ↑x\n[PROOFSTEP]\nobtain ⟨u, hu⟩ := h₂\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\nf : Filter α\ns : Set (Filter α)\nt : Set α\nx✝ : t ∈ f ⊔ sInf s\nh₁ : t ∈ f.sets\nu : Finset ↑s\nhu : t ∈ (⨅ (i : ↑s) (_ : i ∈ u), ↑i).sets\n⊢ t ∈ ⨅ (x : { b // b ∈ s }), f ⊔ ↑x\n[PROOFSTEP]\nrw [← Finset.inf_eq_iInf] at hu \n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\nf : Filter α\ns : Set (Filter α)\nt : Set α\nx✝ : t ∈ f ⊔ sInf s\nh₁ : t ∈ f.sets\nu : Finset ↑s\nhu : t ∈ (Finset.inf u fun i => ↑i).sets\n⊢ t ∈ ⨅ (x : { b // b ∈ s }), f ⊔ ↑x\n[PROOFSTEP]\nsuffices ⨅ i : s, f ⊔ ↑i ≤ f ⊔ u.inf fun i => ↑i from this ⟨h₁, hu⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\nf : Filter α\ns : Set (Filter α)\nt : Set α\nx✝ : t ∈ f ⊔ sInf s\nh₁ : t ∈ f.sets\nu : Finset ↑s\nhu : t ∈ (Finset.inf u fun i => ↑i).sets\n⊢ ⨅ (i : ↑s), f ⊔ ↑i ≤ f ⊔ Finset.inf u fun i => ↑i\n[PROOFSTEP]\nrefine' Finset.induction_on u (le_sup_of_le_right le_top) _\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\nf : Filter α\ns : Set (Filter α)\nt : Set α\nx✝ : t ∈ f ⊔ sInf s\nh₁ : t ∈ f.sets\nu : Finset ↑s\nhu : t ∈ (Finset.inf u fun i => ↑i).sets\n⊢ ∀ ⦃a : ↑s⦄ {s_1 : Finset ↑s},\n    ¬a ∈ s_1 →\n      (⨅ (i : ↑s), f ⊔ ↑i ≤ f ⊔ Finset.inf s_1 fun i => ↑i) →\n        ⨅ (i : ↑s), f ⊔ ↑i ≤ f ⊔ Finset.inf (insert a s_1) fun i => ↑i\n[PROOFSTEP]\nrintro ⟨i⟩ u _ ih\n[GOAL]\ncase intro.mk\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\nf : Filter α\ns : Set (Filter α)\nt : Set α\nx✝ : t ∈ f ⊔ sInf s\nh₁ : t ∈ f.sets\nu✝ : Finset ↑s\nhu : t ∈ (Finset.inf u✝ fun i => ↑i).sets\ni : Filter α\nproperty✝ : i ∈ s\nu : Finset ↑s\na✝ : ¬{ val := i, property := property✝ } ∈ u\nih : ⨅ (i : ↑s), f ⊔ ↑i ≤ f ⊔ Finset.inf u fun i => ↑i\n⊢ ⨅ (i : ↑s), f ⊔ ↑i ≤ f ⊔ Finset.inf (insert { val := i, property := property✝ } u) fun i => ↑i\n[PROOFSTEP]\nrw [Finset.inf_insert, sup_inf_left]\n[GOAL]\ncase intro.mk\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nsrc✝ : CompleteLattice (Filter α) := instCompleteLatticeFilter\nf : Filter α\ns : Set (Filter α)\nt : Set α\nx✝ : t ∈ f ⊔ sInf s\nh₁ : t ∈ f.sets\nu✝ : Finset ↑s\nhu : t ∈ (Finset.inf u✝ fun i => ↑i).sets\ni : Filter α\nproperty✝ : i ∈ s\nu : Finset ↑s\na✝ : ¬{ val := i, property := property✝ } ∈ u\nih : ⨅ (i : ↑s), f ⊔ ↑i ≤ f ⊔ Finset.inf u fun i => ↑i\n⊢ ⨅ (i : ↑s), f ⊔ ↑i ≤ (f ⊔ ↑{ val := i, property := property✝ }) ⊓ (f ⊔ Finset.inf u fun i => ↑i)\n[PROOFSTEP]\nexact le_inf (iInf_le _ _) ih\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\ns : Finset α\nf : α → Filter β\nt : Set β\n⊢ t ∈ ⨅ (a : α) (_ : a ∈ s), f a ↔ ∃ p, (∀ (a : α), a ∈ s → p a ∈ f a) ∧ t = ⋂ (a : α) (_ : a ∈ s), p a\n[PROOFSTEP]\nsimp only [← Finset.set_biInter_coe, biInter_eq_iInter, iInf_subtype']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\ns : Finset α\nf : α → Filter β\nt : Set β\n⊢ t ∈ ⨅ (x : { i // i ∈ s }), f ↑x ↔ ∃ p, (∀ (a : α), a ∈ s → p a ∈ f a) ∧ t = ⋂ (x : ↑↑s), p ↑x\n[PROOFSTEP]\nrefine' ⟨fun h => _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\ns : Finset α\nf : α → Filter β\nt : Set β\nh : t ∈ ⨅ (x : { i // i ∈ s }), f ↑x\n⊢ ∃ p, (∀ (a : α), a ∈ s → p a ∈ f a) ∧ t = ⋂ (x : ↑↑s), p ↑x\n[PROOFSTEP]\nrcases(mem_iInf_of_finite _).1 h with ⟨p, hp, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\ns : Finset α\nf : α → Filter β\np : { i // i ∈ s } → Set β\nhp : ∀ (i : { i // i ∈ s }), p i ∈ f ↑i\nh : ⋂ (i : { i // i ∈ s }), p i ∈ ⨅ (x : { i // i ∈ s }), f ↑x\n⊢ ∃ p_1, (∀ (a : α), a ∈ s → p_1 a ∈ f a) ∧ ⋂ (i : { i // i ∈ s }), p i = ⋂ (x : ↑↑s), p_1 ↑x\n[PROOFSTEP]\nrefine' ⟨fun a => if h : a ∈ s then p ⟨a, h⟩ else univ, fun a ha => by simpa [ha] using hp ⟨a, ha⟩, _⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\ns : Finset α\nf : α → Filter β\np : { i // i ∈ s } → Set β\nhp : ∀ (i : { i // i ∈ s }), p i ∈ f ↑i\nh : ⋂ (i : { i // i ∈ s }), p i ∈ ⨅ (x : { i // i ∈ s }), f ↑x\na : α\nha : a ∈ s\n⊢ (fun a => if h : a ∈ s then p { val := a, property := h } else univ) a ∈ f a\n[PROOFSTEP]\nsimpa [ha] using hp ⟨a, ha⟩\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\ns : Finset α\nf : α → Filter β\np : { i // i ∈ s } → Set β\nhp : ∀ (i : { i // i ∈ s }), p i ∈ f ↑i\nh : ⋂ (i : { i // i ∈ s }), p i ∈ ⨅ (x : { i // i ∈ s }), f ↑x\n⊢ ⋂ (i : { i // i ∈ s }), p i = ⋂ (x : ↑↑s), (fun a => if h : a ∈ s then p { val := a, property := h } else univ) ↑x\n[PROOFSTEP]\nrefine' iInter_congr_of_surjective id surjective_id _\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\ns : Finset α\nf : α → Filter β\np : { i // i ∈ s } → Set β\nhp : ∀ (i : { i // i ∈ s }), p i ∈ f ↑i\nh : ⋂ (i : { i // i ∈ s }), p i ∈ ⨅ (x : { i // i ∈ s }), f ↑x\n⊢ ∀ (x : { i // i ∈ s }), (fun a => if h : a ∈ s then p { val := a, property := h } else univ) ↑(id x) = p x\n[PROOFSTEP]\nrintro ⟨a, ha⟩\n[GOAL]\ncase refine'_1.intro.intro.mk\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\ns : Finset α\nf : α → Filter β\np : { i // i ∈ s } → Set β\nhp : ∀ (i : { i // i ∈ s }), p i ∈ f ↑i\nh : ⋂ (i : { i // i ∈ s }), p i ∈ ⨅ (x : { i // i ∈ s }), f ↑x\na : α\nha : a ∈ s\n⊢ (fun a => if h : a ∈ s then p { val := a, property := h } else univ) ↑(id { val := a, property := ha }) =\n    p { val := a, property := ha }\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\ns : Finset α\nf : α → Filter β\nt : Set β\n⊢ (∃ p, (∀ (a : α), a ∈ s → p a ∈ f a) ∧ t = ⋂ (x : ↑↑s), p ↑x) → t ∈ ⨅ (x : { i // i ∈ s }), f ↑x\n[PROOFSTEP]\nrintro ⟨p, hpf, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\ns : Finset α\nf : α → Filter β\np : α → Set β\nhpf : ∀ (a : α), a ∈ s → p a ∈ f a\n⊢ ⋂ (x : ↑↑s), p ↑x ∈ ⨅ (x : { i // i ∈ s }), f ↑x\n[PROOFSTEP]\nexact iInter_mem.2 fun a => mem_iInf_of_mem a (hpf a a.2)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\ninst✝ : Nonempty ι\nhd : Directed (fun x x_1 => x ≥ x_1) f\n⊢ ¬NeBot (iInf f) → ¬∀ (i : ι), NeBot (f i)\n[PROOFSTEP]\nsimpa only [not_forall, not_neBot, ← empty_mem_iff_bot, mem_iInf_of_directed hd] using id\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\nhn : Nonempty α\nhd : Directed (fun x x_1 => x ≥ x_1) f\nhb : ∀ (i : ι), NeBot (f i)\n⊢ NeBot (iInf f)\n[PROOFSTEP]\ncases isEmpty_or_nonempty ι\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\nhn : Nonempty α\nhd : Directed (fun x x_1 => x ≥ x_1) f\nhb : ∀ (i : ι), NeBot (f i)\nh✝ : IsEmpty ι\n⊢ NeBot (iInf f)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase inl.ne'\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\nhn : Nonempty α\nhd : Directed (fun x x_1 => x ≥ x_1) f\nhb : ∀ (i : ι), NeBot (f i)\nh✝ : IsEmpty ι\n⊢ iInf f ≠ ⊥\n[PROOFSTEP]\nsimp [iInf_of_empty f, top_ne_bot]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\nhn : Nonempty α\nhd : Directed (fun x x_1 => x ≥ x_1) f\nhb : ∀ (i : ι), NeBot (f i)\nh✝ : Nonempty ι\n⊢ NeBot (iInf f)\n[PROOFSTEP]\nexact iInf_neBot_of_directed' hd hb\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nf : ι → Filter α\ns : Set α\nhs : s ∈ iInf f\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\n⊢ p s\n[PROOFSTEP]\nrw [mem_iInf_finite'] at hs \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nf : ι → Filter α\ns : Set α\nhs : ∃ t, s ∈ ⨅ (i : PLift ι) (_ : i ∈ t), f i.down\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\n⊢ p s\n[PROOFSTEP]\nsimp only [← Finset.inf_eq_iInf] at hs \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nf : ι → Filter α\ns : Set α\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\nhs : ∃ t, s ∈ Finset.inf t fun a => f a.down\n⊢ p s\n[PROOFSTEP]\nrcases hs with ⟨is, his⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nf : ι → Filter α\ns : Set α\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\nis : Finset (PLift ι)\nhis : s ∈ Finset.inf is fun a => f a.down\n⊢ p s\n[PROOFSTEP]\ninduction is using Finset.induction_on generalizing s\n[GOAL]\ncase intro.empty\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nf : ι → Filter α\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\ns : Set α\nhis : s ∈ Finset.inf ∅ fun a => f a.down\n⊢ p s\ncase intro.insert\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝¹ t : Set α\nf : ι → Filter α\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\na✝² : PLift ι\ns✝ : Finset (PLift ι)\na✝¹ : ¬a✝² ∈ s✝\na✝ : ∀ {s : Set α}, (s ∈ Finset.inf s✝ fun a => f a.down) → p s\ns : Set α\nhis : s ∈ Finset.inf (insert a✝² s✝) fun a => f a.down\n⊢ p s\n[PROOFSTEP]\ncase empty => rwa [mem_top.1 his]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nf : ι → Filter α\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\ns : Set α\nhis : s ∈ Finset.inf ∅ fun a => f a.down\n⊢ p s\n[PROOFSTEP]\ncase empty => rwa [mem_top.1 his]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nf : ι → Filter α\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\ns : Set α\nhis : s ∈ Finset.inf ∅ fun a => f a.down\n⊢ p s\n[PROOFSTEP]\nrwa [mem_top.1 his]\n[GOAL]\ncase intro.insert\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝¹ t : Set α\nf : ι → Filter α\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\na✝² : PLift ι\ns✝ : Finset (PLift ι)\na✝¹ : ¬a✝² ∈ s✝\na✝ : ∀ {s : Set α}, (s ∈ Finset.inf s✝ fun a => f a.down) → p s\ns : Set α\nhis : s ∈ Finset.inf (insert a✝² s✝) fun a => f a.down\n⊢ p s\n[PROOFSTEP]\ncase insert ih =>\n  rw [Finset.inf_insert, mem_inf_iff] at his \n  rcases his with ⟨s₁, hs₁, s₂, hs₂, rfl⟩\n  exact ins hs₁ (ih hs₂)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝¹ t : Set α\nf : ι → Filter α\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\na✝¹ : PLift ι\ns✝ : Finset (PLift ι)\na✝ : ¬a✝¹ ∈ s✝\nih : ∀ {s : Set α}, (s ∈ Finset.inf s✝ fun a => f a.down) → p s\ns : Set α\nhis : s ∈ Finset.inf (insert a✝¹ s✝) fun a => f a.down\n⊢ p s\n[PROOFSTEP]\ncase insert ih =>\n  rw [Finset.inf_insert, mem_inf_iff] at his \n  rcases his with ⟨s₁, hs₁, s₂, hs₂, rfl⟩\n  exact ins hs₁ (ih hs₂)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝¹ t : Set α\nf : ι → Filter α\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\na✝¹ : PLift ι\ns✝ : Finset (PLift ι)\na✝ : ¬a✝¹ ∈ s✝\nih : ∀ {s : Set α}, (s ∈ Finset.inf s✝ fun a => f a.down) → p s\ns : Set α\nhis : s ∈ Finset.inf (insert a✝¹ s✝) fun a => f a.down\n⊢ p s\n[PROOFSTEP]\nrw [Finset.inf_insert, mem_inf_iff] at his \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝¹ t : Set α\nf : ι → Filter α\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\na✝¹ : PLift ι\ns✝ : Finset (PLift ι)\na✝ : ¬a✝¹ ∈ s✝\nih : ∀ {s : Set α}, (s ∈ Finset.inf s✝ fun a => f a.down) → p s\ns : Set α\nhis : ∃ t₁, t₁ ∈ f a✝¹.down ∧ ∃ t₂, (t₂ ∈ Finset.inf s✝ fun a => f a.down) ∧ s = t₁ ∩ t₂\n⊢ p s\n[PROOFSTEP]\nrcases his with ⟨s₁, hs₁, s₂, hs₂, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns t : Set α\nf : ι → Filter α\np : Set α → Prop\nuni : p univ\nins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)\na✝¹ : PLift ι\ns✝ : Finset (PLift ι)\na✝ : ¬a✝¹ ∈ s✝\nih : ∀ {s : Set α}, (s ∈ Finset.inf s✝ fun a => f a.down) → p s\ns₁ : Set α\nhs₁ : s₁ ∈ f a✝¹.down\ns₂ : Set α\nhs₂ : s₂ ∈ Finset.inf s✝ fun a => f a.down\n⊢ p (s₁ ∩ s₂)\n[PROOFSTEP]\nexact ins hs₁ (ih hs₂)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t✝ s t : Set α\n⊢ 𝓟 s ⊓ 𝓟 t ≤ 𝓟 (s ∩ t)\n[PROOFSTEP]\nsimp only [le_principal_iff, mem_inf_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t✝ s t : Set α\n⊢ ∃ t₁, t₁ ∈ 𝓟 s ∧ ∃ t₂, t₂ ∈ 𝓟 t ∧ s ∩ t = t₁ ∩ t₂\n[PROOFSTEP]\nexact ⟨s, Subset.rfl, t, Subset.rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t✝ s t : Set α\n⊢ 𝓟 (s ∩ t) ≤ 𝓟 s ⊓ 𝓟 t\n[PROOFSTEP]\nsimp [le_inf_iff, inter_subset_left, inter_subset_right]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t✝ s t u : Set α\n⊢ u ∈ 𝓟 s ⊔ 𝓟 t ↔ u ∈ 𝓟 (s ∪ t)\n[PROOFSTEP]\nsimp only [union_subset_iff, mem_sup, mem_principal]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf g : Filter α\ns✝ t : Set α\nι : Sort w\ns : ι → Set α\nx : Set α\n⊢ x ∈ ⨆ (x : ι), 𝓟 (s x) ↔ x ∈ 𝓟 (⋃ (i : ι), s i)\n[PROOFSTEP]\nsimp only [mem_iSup, mem_principal, iUnion_subset_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t s : Set α\n⊢ 𝓟 s ⊓ 𝓟 sᶜ = ⊥\n[PROOFSTEP]\nrw [inf_principal, inter_compl_self, principal_empty]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\ns✝ t s : Set α\n⊢ 𝓟 s ⊔ 𝓟 sᶜ = ⊤\n[PROOFSTEP]\nrw [sup_principal, union_compl_self, principal_univ]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nf : Filter α\ns t : Set α\n⊢ s ∈ f ⊓ 𝓟 t ↔ tᶜ ∪ s ∈ f\n[PROOFSTEP]\nsimp only [← le_principal_iff, (isCompl_principal s).le_left_iff, disjoint_assoc, inf_principal, ←\n  (isCompl_principal (t ∩ sᶜ)).le_right_iff, compl_inter, compl_compl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nf : Filter α\ns t : Set α\n⊢ s ∈ f ⊓ 𝓟 t ↔ {x | x ∈ t → x ∈ s} ∈ f\n[PROOFSTEP]\nsimp only [mem_inf_principal', imp_iff_not_or]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t✝ : Set α\nf : Filter α\ns t : Set α\n⊢ tᶜ ∪ s ∈ f ↔ {x | ¬x ∈ t ∨ x ∈ s} ∈ f\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nf : ι → Filter α\ns : Set α\n⊢ ⨆ (i : ι), f i ⊓ 𝓟 s = (⨆ (i : ι), f i) ⊓ 𝓟 s\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝¹ t : Set α\nf : ι → Filter α\ns s✝ : Set α\n⊢ s✝ ∈ ⨆ (i : ι), f i ⊓ 𝓟 s ↔ s✝ ∈ (⨆ (i : ι), f i) ⊓ 𝓟 s\n[PROOFSTEP]\nsimp only [mem_iSup, mem_inf_principal]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nf : Filter α\ns : Set α\n⊢ f ⊓ 𝓟 s = ⊥ ↔ sᶜ ∈ f\n[PROOFSTEP]\nrw [← empty_mem_iff_bot, mem_inf_principal]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nf : Filter α\ns : Set α\n⊢ {x | x ∈ s → x ∈ ∅} ∈ f ↔ sᶜ ∈ f\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nf : Filter α\ns : Set α\nh : f ⊓ 𝓟 sᶜ = ⊥\n⊢ s ∈ f\n[PROOFSTEP]\nrwa [inf_principal_eq_bot, compl_compl] at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t s : Set α\nf : Filter α\n⊢ 𝓟 s ≤ f ↔ ∀ (V : Set α), V ∈ f → s ⊆ V\n[PROOFSTEP]\nchange (∀ V, V ∈ f → V ∈ _) ↔ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ g : Filter α\ns✝ t s : Set α\nf : Filter α\n⊢ (∀ (V : Set α), V ∈ f → V ∈ 𝓟 s) ↔ ∀ (V : Set α), V ∈ f → s ⊆ V\n[PROOFSTEP]\nsimp_rw [mem_principal]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nι : Type w\ns : Finset ι\nf : ι → Set α\n⊢ ⨅ (i : ι) (_ : i ∈ s), 𝓟 (f i) = 𝓟 (⋂ (i : ι) (_ : i ∈ s), f i)\n[PROOFSTEP]\ninduction' s using Finset.induction_on with i s _ hs\n[GOAL]\ncase empty\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α\ns t : Set α\nι : Type w\nf : ι → Set α\n⊢ ⨅ (i : ι) (_ : i ∈ ∅), 𝓟 (f i) = 𝓟 (⋂ (i : ι) (_ : i ∈ ∅), f i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nι : Type w\nf : ι → Set α\ni : ι\ns : Finset ι\na✝ : ¬i ∈ s\nhs : ⨅ (i : ι) (_ : i ∈ s), 𝓟 (f i) = 𝓟 (⋂ (i : ι) (_ : i ∈ s), f i)\n⊢ ⨅ (i_1 : ι) (_ : i_1 ∈ insert i s), 𝓟 (f i_1) = 𝓟 (⋂ (i_1 : ι) (_ : i_1 ∈ insert i s), f i_1)\n[PROOFSTEP]\nrw [Finset.iInf_insert, Finset.set_biInter_insert, hs, inf_principal]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α\ns t : Set α\nι : Type w\ninst✝ : Finite ι\nf : ι → Set α\n⊢ ⨅ (i : ι), 𝓟 (f i) = 𝓟 (⋂ (i : ι), f i)\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α\ns t : Set α\nι : Type w\ninst✝ : Finite ι\nf : ι → Set α\nval✝ : Fintype ι\n⊢ ⨅ (i : ι), 𝓟 (f i) = 𝓟 (⋂ (i : ι), f i)\n[PROOFSTEP]\nsimpa using iInf_principal_finset Finset.univ f\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nι : Type w\ns : Set ι\nhs : Set.Finite s\nf : ι → Set α\n⊢ ⨅ (i : ι) (_ : i ∈ s), 𝓟 (f i) = 𝓟 (⋂ (i : ι) (_ : i ∈ s), f i)\n[PROOFSTEP]\nlift s to Finset ι using hs\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ g : Filter α\ns✝ t : Set α\nι : Type w\nf : ι → Set α\ns : Finset ι\n⊢ ⨅ (i : ι) (_ : i ∈ ↑s), 𝓟 (f i) = 𝓟 (⋂ (i : ι) (_ : i ∈ ↑s), f i)\n[PROOFSTEP]\nexact_mod_cast iInf_principal_finset s f\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\nt : NeBot f\np : Prop\nh : p\n⊢ (∀ᶠ (x : α) in f, p) ↔ p\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\nt : NeBot f\np : Prop\nh : ¬p\n⊢ (∀ᶠ (x : α) in f, p) ↔ p\n[PROOFSTEP]\nsimpa [h] using t.ne\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\np q : α → Prop\nh : ∀ᶠ (x : α) in f, p x ↔ q x\nhq : ∀ᶠ (x : α) in f, q x\n⊢ ∀ᶠ (x : α) in f, q x ↔ p x\n[PROOFSTEP]\nsimpa only [Iff.comm] using h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nι : Type u_2\ninst✝ : Finite ι\nl : Filter α\np : ι → α → Prop\n⊢ (∀ᶠ (x : α) in l, ∀ (i : ι), p i x) ↔ ∀ (i : ι), ∀ᶠ (x : α) in l, p i x\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nι : Type u_2\ninst✝ : Finite ι\nl : Filter α\np : ι → α → Prop\nval✝ : Fintype ι\n⊢ (∀ᶠ (x : α) in l, ∀ (i : ι), p i x) ↔ ∀ (i : ι), ∀ᶠ (x : α) in l, p i x\n[PROOFSTEP]\nsimpa only [Filter.Eventually, setOf_forall] using iInter_mem\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nι : Type u_2\nI : Set ι\nhI : Set.Finite I\nl : Filter α\np : ι → α → Prop\n⊢ (∀ᶠ (x : α) in l, ∀ (i : ι), i ∈ I → p i x) ↔ ∀ (i : ι), i ∈ I → ∀ᶠ (x : α) in l, p i x\n[PROOFSTEP]\nsimpa only [Filter.Eventually, setOf_forall] using biInter_mem hI\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\np : Prop\nq : α → Prop\nh : p\n⊢ (∀ᶠ (x : α) in f, p ∨ q x) ↔ p ∨ ∀ᶠ (x : α) in f, q x\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\np : Prop\nq : α → Prop\nh : ¬p\n⊢ (∀ᶠ (x : α) in f, p ∨ q x) ↔ p ∨ ∀ᶠ (x : α) in f, q x\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\np : α → Prop\nq : Prop\n⊢ (∀ᶠ (x : α) in f, p x ∨ q) ↔ (∀ᶠ (x : α) in f, p x) ∨ q\n[PROOFSTEP]\nsimp only [@or_comm _ q, eventually_or_distrib_left]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\np : Prop\nq : α → Prop\n⊢ (∀ᶠ (x : α) in f, p → q x) ↔ p → ∀ᶠ (x : α) in f, q x\n[PROOFSTEP]\nsimp only [imp_iff_not_or, eventually_or_distrib_left]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np q : α → Prop\nf : Filter α\nhp : ∃ᶠ (x : α) in f, p x\nhq : ∀ᶠ (x : α) in f, q x\n⊢ ∃ᶠ (x : α) in f, p x ∧ q x\n[PROOFSTEP]\nrefine' mt (fun h => hq.mp <| h.mono _) hp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np q : α → Prop\nf : Filter α\nhp : ∃ᶠ (x : α) in f, p x\nhq : ∀ᶠ (x : α) in f, q x\nh : ∀ᶠ (x : α) in f, ¬(fun x => p x ∧ q x) x\n⊢ ∀ (x : α), ¬(fun x => p x ∧ q x) x → q x → ¬(fun x => p x) x\n[PROOFSTEP]\nexact fun x hpq hq hp => hpq ⟨hp, hq⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np q : α → Prop\nf : Filter α\nhp : ∀ᶠ (x : α) in f, p x\nhq : ∃ᶠ (x : α) in f, q x\n⊢ ∃ᶠ (x : α) in f, p x ∧ q x\n[PROOFSTEP]\nsimpa only [and_comm] using hq.and_eventually hp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\nf : Filter α\nhp : ∃ᶠ (x : α) in f, p x\n⊢ ∃ x, p x\n[PROOFSTEP]\nby_contra H\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\nf : Filter α\nhp : ∃ᶠ (x : α) in f, p x\nH : ¬∃ x, p x\n⊢ False\n[PROOFSTEP]\nreplace H : ∀ᶠ x in f, ¬p x\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\nf : Filter α\nhp : ∃ᶠ (x : α) in f, p x\nH : ¬∃ x, p x\n⊢ ∀ᶠ (x : α) in f, ¬p x\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\nf : Filter α\nhp : ∃ᶠ (x : α) in f, p x\nH : ∀ᶠ (x : α) in f, ¬p x\n⊢ False\n[PROOFSTEP]\nexact eventually_of_forall (not_exists.1 H)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\nf : Filter α\nhp : ∃ᶠ (x : α) in f, p x\nH : ∀ᶠ (x : α) in f, ¬p x\n⊢ False\n[PROOFSTEP]\nexact hp H\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\nf : Filter α\nH : ∀ {q : α → Prop}, (∀ᶠ (x : α) in f, q x) → ∃ x, p x ∧ q x\nhp : ∀ᶠ (x : α) in f, ¬(fun x => p x) x\n⊢ False\n[PROOFSTEP]\nsimpa only [and_not_self_iff, exists_false] using H hp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\nP : α → Prop\n⊢ (∃ᶠ (x : α) in f, P x) ↔ ∀ {U : Set α}, U ∈ f → ∃ x, x ∈ U ∧ P x\n[PROOFSTEP]\nsimp only [frequently_iff_forall_eventually_exists_and, exists_prop, @and_comm (P _)]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\nP : α → Prop\n⊢ (∀ {q : α → Prop}, (∀ᶠ (x : α) in f, q x) → ∃ x, q x ∧ P x) ↔ ∀ {U : Set α}, U ∈ f → ∃ x, x ∈ U ∧ P x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\nf : Filter α\n⊢ (¬∀ᶠ (x : α) in f, p x) ↔ ∃ᶠ (x : α) in f, ¬p x\n[PROOFSTEP]\nsimp [Filter.Frequently]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\nf : Filter α\n⊢ (¬∃ᶠ (x : α) in f, p x) ↔ ∀ᶠ (x : α) in f, ¬p x\n[PROOFSTEP]\nsimp only [Filter.Frequently, not_not]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\n⊢ (∃ᶠ (x : α) in f, True) ↔ NeBot f\n[PROOFSTEP]\nsimp [Filter.Frequently, -not_eventually, eventually_false_iff_eq_bot, neBot_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\n⊢ ¬∃ᶠ (x : α) in f, False\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ninst✝ : NeBot f\np : Prop\nh : p\n⊢ (∃ᶠ (x : α) in f, p) ↔ p\n[PROOFSTEP]\nsimpa [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ninst✝ : NeBot f\np : Prop\nh : ¬p\n⊢ (∃ᶠ (x : α) in f, p) ↔ p\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\np q : α → Prop\n⊢ (∃ᶠ (x : α) in f, p x ∨ q x) ↔ (∃ᶠ (x : α) in f, p x) ∨ ∃ᶠ (x : α) in f, q x\n[PROOFSTEP]\nsimp only [Filter.Frequently, ← not_and_or, not_or, eventually_and]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ninst✝ : NeBot f\np : Prop\nq : α → Prop\n⊢ (∃ᶠ (x : α) in f, p ∨ q x) ↔ p ∨ ∃ᶠ (x : α) in f, q x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ninst✝ : NeBot f\np : α → Prop\nq : Prop\n⊢ (∃ᶠ (x : α) in f, p x ∨ q) ↔ (∃ᶠ (x : α) in f, p x) ∨ q\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\np q : α → Prop\n⊢ (∃ᶠ (x : α) in f, p x → q x) ↔ (∀ᶠ (x : α) in f, p x) → ∃ᶠ (x : α) in f, q x\n[PROOFSTEP]\nsimp [imp_iff_not_or, not_eventually, frequently_or_distrib]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ninst✝ : NeBot f\np : Prop\nq : α → Prop\n⊢ (∃ᶠ (x : α) in f, p → q x) ↔ p → ∃ᶠ (x : α) in f, q x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ninst✝ : NeBot f\np : α → Prop\nq : Prop\n⊢ (∃ᶠ (x : α) in f, p x → q) ↔ (∀ᶠ (x : α) in f, p x) → q\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\np : α → Prop\nq : Prop\n⊢ (∀ᶠ (x : α) in f, p x → q) ↔ (∃ᶠ (x : α) in f, p x) → q\n[PROOFSTEP]\nsimp only [imp_iff_not_or, eventually_or_distrib_right, not_frequently]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\np : Prop\nq : α → Prop\n⊢ (∃ᶠ (x : α) in f, p ∧ q x) ↔ p ∧ ∃ᶠ (x : α) in f, q x\n[PROOFSTEP]\nsimp only [Filter.Frequently, not_and, eventually_imp_distrib_left, not_imp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\np : α → Prop\nq : Prop\n⊢ (∃ᶠ (x : α) in f, p x ∧ q) ↔ (∃ᶠ (x : α) in f, p x) ∧ q\n[PROOFSTEP]\nsimp only [@and_comm _ q, frequently_and_distrib_left]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\n⊢ ¬∃ᶠ (x : α) in ⊥, p x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\n⊢ (∃ᶠ (x : α) in ⊤, p x) ↔ ∃ x, p x\n[PROOFSTEP]\nsimp [Filter.Frequently]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\na : Set α\np : α → Prop\n⊢ (∃ᶠ (x : α) in 𝓟 a, p x) ↔ ∃ x, x ∈ a ∧ p x\n[PROOFSTEP]\nsimp [Filter.Frequently, not_forall]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\nf g : Filter α\n⊢ (∃ᶠ (x : α) in f ⊔ g, p x) ↔ (∃ᶠ (x : α) in f, p x) ∨ ∃ᶠ (x : α) in g, p x\n[PROOFSTEP]\nsimp only [Filter.Frequently, eventually_sup, not_and_or]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\nfs : Set (Filter α)\n⊢ (∃ᶠ (x : α) in sSup fs, p x) ↔ ∃ f, f ∈ fs ∧ ∃ᶠ (x : α) in f, p x\n[PROOFSTEP]\nsimp only [Filter.Frequently, not_forall, eventually_sSup, exists_prop]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\np : α → Prop\nfs : β → Filter α\n⊢ (∃ᶠ (x : α) in ⨆ (b : β), fs b, p x) ↔ ∃ b, ∃ᶠ (x : α) in fs b, p x\n[PROOFSTEP]\nsimp only [Filter.Frequently, eventually_iSup, not_forall]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nr : α → β → Prop\nl : Filter α\ninst✝ : NeBot l\nh : ∀ᶠ (x : α) in l, ∃ y, r x y\n⊢ ∃ f, ∀ᶠ (x : α) in l, r x (f x)\n[PROOFSTEP]\nhaveI : Nonempty β :=\n  let ⟨_, hx⟩ := h.exists;\n  hx.nonempty\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nr : α → β → Prop\nl : Filter α\ninst✝ : NeBot l\nh : ∀ᶠ (x : α) in l, ∃ y, r x y\nthis : Nonempty β\n⊢ ∃ f, ∀ᶠ (x : α) in l, r x (f x)\n[PROOFSTEP]\nchoose! f hf using fun x (hx : ∃ y, r x y) => hx\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nr : α → β → Prop\nl : Filter α\ninst✝ : NeBot l\nh : ∀ᶠ (x : α) in l, ∃ y, r x y\nthis : Nonempty β\nf : α → β\nhf : ∀ (x : α), (∃ y, r x y) → r x (f x)\n⊢ ∃ f, ∀ᶠ (x : α) in l, r x (f x)\n[PROOFSTEP]\nexact ⟨f, h.mono hf⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ns : Set α\nl : Filter α\n⊢ s =ᶠ[l] univ ↔ s ∈ l\n[PROOFSTEP]\nsimp [eventuallyEq_set]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nl : Filter α\nf f' : α → β\nhf : f =ᶠ[l] f'\ng g' : α → γ\nhg : g =ᶠ[l] g'\n⊢ ∀ (x : α), g x = g' x → f x = f' x → (fun x => (f x, g x)) x = (fun x => (f' x, g' x)) x\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nl : Filter α\nf f' : α → β\nhf : f =ᶠ[l] f'\ng g' : α → γ\nhg : g =ᶠ[l] g'\nx✝ : α\na✝¹ : g x✝ = g' x✝\na✝ : f x✝ = f' x✝\n⊢ (fun x => (f x, g x)) x✝ = (fun x => (f' x, g' x)) x✝\n[PROOFSTEP]\nsimp only [*]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ns : Set α\nl : Filter α\n⊢ (∀ᶠ (x : α) in l, x ∈ s ↔ x ∈ ∅) ↔ ∀ᶠ (x : α) in l, ¬x ∈ s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ns t : Set α\nl : Filter α\n⊢ s ∩ t =ᶠ[l] s ↔ ∀ᶠ (x : α) in l, x ∈ s → x ∈ t\n[PROOFSTEP]\nsimp only [eventuallyEq_set, mem_inter_iff, and_iff_left_iff_imp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ns t : Set α\nl : Filter α\n⊢ s ∩ t =ᶠ[l] t ↔ ∀ᶠ (x : α) in l, x ∈ t → x ∈ s\n[PROOFSTEP]\nrw [inter_comm, inter_eventuallyEq_left]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ninst✝ : AddGroup β\nf g : α → β\nl : Filter α\nh : f =ᶠ[l] g\n⊢ f - g =ᶠ[l] 0\n[PROOFSTEP]\nsimpa using ((EventuallyEq.refl l f).sub h).symm\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ninst✝ : AddGroup β\nf g : α → β\nl : Filter α\nh : f - g =ᶠ[l] 0\n⊢ f =ᶠ[l] g\n[PROOFSTEP]\nsimpa using h.add (EventuallyEq.refl l g)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ninst✝ : LE β\nl : Filter α\nf f' g g' : α → β\nH✝ : f ≤ᶠ[l] g\nhf✝ : f =ᶠ[l] f'\nhg✝ : g =ᶠ[l] g'\nx : α\nhf : f x = f' x\nhg : g x = g' x\nH : f x ≤ g x\n⊢ f' x ≤ g' x\n[PROOFSTEP]\nrwa [hf, hg] at H \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ninst✝ : PartialOrder β\nl : Filter α\nf g : α → β\n⊢ f =ᶠ[l] g ↔ f ≤ᶠ[l] g ∧ g ≤ᶠ[l] f\n[PROOFSTEP]\nsimp only [EventuallyEq, EventuallyLE, le_antisymm_iff, eventually_and]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ns t : Set α\nl : Filter α\n⊢ t ∈ l ⊓ 𝓟 s ↔ l ⊓ 𝓟 s ≤ l ⊓ 𝓟 t\n[PROOFSTEP]\nsimp only [le_inf_iff, inf_le_left, true_and_iff, le_principal_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ns t : Set α\nl : Filter α\n⊢ s =ᶠ[l] t ↔ l ⊓ 𝓟 s = l ⊓ 𝓟 t\n[PROOFSTEP]\nsimp only [eventuallyLE_antisymm_iff, le_antisymm_iff, set_eventuallyLE_iff_inf_principal_le]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ninst✝³ : MulZeroClass β\ninst✝² : PartialOrder β\ninst✝¹ : PosMulMono β\ninst✝ : MulPosMono β\nl : Filter α\nf₁ f₂ g₁ g₂ : α → β\nhf : f₁ ≤ᶠ[l] f₂\nhg : g₁ ≤ᶠ[l] g₂\nhg₀ : 0 ≤ᶠ[l] g₁\nhf₀ : 0 ≤ᶠ[l] f₂\n⊢ f₁ * g₁ ≤ᶠ[l] f₂ * g₂\n[PROOFSTEP]\nfilter_upwards [hf, hg, hg₀, hf₀] with x using _root_.mul_le_mul\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ninst✝³ : Mul β\ninst✝² : Preorder β\ninst✝¹ : CovariantClass β β (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass β β (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : Filter α\nf₁ f₂ g₁ g₂ : α → β\nhf : f₁ ≤ᶠ[l] f₂\nhg : g₁ ≤ᶠ[l] g₂\n⊢ f₁ * g₁ ≤ᶠ[l] f₂ * g₂\n[PROOFSTEP]\nfilter_upwards [hf, hg] with x hfx hgx using _root_.mul_le_mul' hfx hgx\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ninst✝ : OrderedSemiring β\nl : Filter α\nf g : α → β\nhf : 0 ≤ᶠ[l] f\nhg : 0 ≤ᶠ[l] g\n⊢ 0 ≤ᶠ[l] f * g\n[PROOFSTEP]\nfilter_upwards [hf, hg] with x using _root_.mul_nonneg\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ninst✝ : SemilatticeSup β\nl : Filter α\nf₁ f₂ g₁ g₂ : α → β\nhf : f₁ ≤ᶠ[l] f₂\nhg : g₁ ≤ᶠ[l] g₂\n⊢ f₁ ⊔ g₁ ≤ᶠ[l] f₂ ⊔ g₂\n[PROOFSTEP]\nfilter_upwards [hf, hg] with x hfx hgx using sup_le_sup hfx hgx\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ninst✝ : SemilatticeSup β\nl : Filter α\nf g h : α → β\nhf : f ≤ᶠ[l] h\nhg : g ≤ᶠ[l] h\n⊢ f ⊔ g ≤ᶠ[l] h\n[PROOFSTEP]\nfilter_upwards [hf, hg] with x hfx hgx using _root_.sup_le hfx hgx\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nhf : Injective m\nh : m '' s ∈ map m f\n⊢ s ∈ f\n[PROOFSTEP]\nrwa [← preimage_image_eq s hf]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\n⊢ range m ∈ map m f\n[PROOFSTEP]\nrw [← image_univ]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\n⊢ m '' univ ∈ map m f\n[PROOFSTEP]\nexact image_mem_map univ_mem\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter β\n⊢ m ⁻¹' univ ⊆ univ\n[PROOFSTEP]\nsimp only [subset_univ, preimage_univ]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nl : Filter β\np : α → Prop\ns : Set α\nx✝ : s ∈ comap f l\nt : Set β\nht : t ∈ l\nhts : f ⁻¹' t ⊆ s\ny : β\nhy : y ∈ t\nx : α\nhx : f x = y\n⊢ f x ∈ t\n[PROOFSTEP]\nrwa [hx]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nl : Filter β\np : α → Prop\ns✝ : Set α\nx : α\ns : Set β\nF : Filter (α × β)\n⊢ s ∈ comap (Prod.mk x) F ↔ {p | p.fst = x → p.snd ∈ s} ∈ F\n[PROOFSTEP]\nsimp_rw [mem_comap', Prod.ext_iff, and_imp, @forall_swap β (_ = _), forall_eq, eq_comm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nl : Filter β\np : α → Prop\ns : Set α\n⊢ (∃ᶠ (a : α) in comap f l, p a) ↔ ∃ᶠ (b : β) in l, ∃ a, f a = b ∧ p a\n[PROOFSTEP]\nsimp only [Filter.Frequently, eventually_comap, not_exists, not_and]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nl : Filter β\np : α → Prop\ns : Set α\n⊢ s ∈ comap f l ↔ (f '' sᶜ)ᶜ ∈ l\n[PROOFSTEP]\nsimp only [mem_comap'', kernImage_eq_compl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nl : Filter β\np : α → Prop\ns : Set α\n⊢ sᶜ ∈ comap f l ↔ (f '' s)ᶜ ∈ l\n[PROOFSTEP]\nrw [mem_comap_iff_compl, compl_compl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter α\n⊢ kernImage m univ = univ\n[PROOFSTEP]\nsimp [kernImage_eq_compl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter α\n⊢ ∀ {x y : Set β}, x ∈ kernImage m '' f.sets → x ⊆ y → y ∈ kernImage m '' f.sets\n[PROOFSTEP]\nrintro _ t ⟨s, hs, rfl⟩ hst\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter α\nt : Set β\ns : Set α\nhs : s ∈ f.sets\nhst : kernImage m s ⊆ t\n⊢ t ∈ kernImage m '' f.sets\n[PROOFSTEP]\nrefine ⟨s ∪ m ⁻¹' t, mem_of_superset hs (subset_union_left s _), ?_⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter α\nt : Set β\ns : Set α\nhs : s ∈ f.sets\nhst : kernImage m s ⊆ t\n⊢ kernImage m (s ∪ m ⁻¹' t) = t\n[PROOFSTEP]\nrw [kernImage_union_preimage, union_eq_right_iff_subset.mpr hst]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter α\n⊢ ∀ {x y : Set β}, x ∈ kernImage m '' f.sets → y ∈ kernImage m '' f.sets → x ∩ y ∈ kernImage m '' f.sets\n[PROOFSTEP]\nrintro _ _ ⟨s₁, h₁, rfl⟩ ⟨s₂, h₂, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter α\ns₁ : Set α\nh₁ : s₁ ∈ f.sets\ns₂ : Set α\nh₂ : s₂ ∈ f.sets\n⊢ kernImage m s₁ ∩ kernImage m s₂ ∈ kernImage m '' f.sets\n[PROOFSTEP]\nexact ⟨s₁ ∩ s₂, f.inter_sets h₁ h₂, Set.preimage_kernImage.u_inf⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter α\ns : Set β\n⊢ s ∈ kernMap m f ↔ ∃ t, tᶜ ∈ f ∧ m '' t = sᶜ\n[PROOFSTEP]\nrw [mem_kernMap, compl_surjective.exists]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter α\ns : Set β\n⊢ (∃ x, xᶜ ∈ f ∧ kernImage m xᶜ = s) ↔ ∃ t, tᶜ ∈ f ∧ m '' t = sᶜ\n[PROOFSTEP]\nrefine exists_congr (fun x ↦ and_congr_right fun _ ↦ ?_)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter α\ns : Set β\nx : Set α\nx✝ : xᶜ ∈ f\n⊢ kernImage m xᶜ = s ↔ m '' x = sᶜ\n[PROOFSTEP]\nrw [kernImage_compl, compl_eq_comm, eq_comm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter α\ns : Set β\n⊢ sᶜ ∈ kernMap m f ↔ ∃ t, tᶜ ∈ f ∧ m '' t = s\n[PROOFSTEP]\nsimp_rw [mem_kernMap_iff_compl, compl_compl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\na : α\ns : Set α\n⊢ s ∈ 𝓟 {a} ↔ s ∈ pure a\n[PROOFSTEP]\nsimp only [mem_pure, mem_principal, singleton_subset_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\na : α\nm : α → Filter β\n⊢ bind (pure a) m = m a\n[PROOFSTEP]\nsimp only [Bind.bind, bind, map_pure, join_pure]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\ninst✝ : NeBot f\nc : β\n⊢ map (fun x => c) f = pure c\n[PROOFSTEP]\next s\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\ninst✝ : NeBot f\nc : β\ns : Set β\n⊢ s ∈ map (fun x => c) f ↔ s ∈ pure c\n[PROOFSTEP]\nby_cases h : c ∈ s\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\ninst✝ : NeBot f\nc : β\ns : Set β\nh : c ∈ s\n⊢ s ∈ map (fun x => c) f ↔ s ∈ pure c\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\ninst✝ : NeBot f\nc : β\ns : Set β\nh : ¬c ∈ s\n⊢ s ∈ map (fun x => c) f ↔ s ∈ pure c\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\nm : γ → β\nn : β → α\ns : Set γ\n⊢ sᶜ ∈ comap m (comap n f) ↔ sᶜ ∈ comap (n ∘ m) f\n[PROOFSTEP]\nsimp only [compl_mem_comap, image_image, (· ∘ ·)]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nφ : α → β\nθ : α → γ\nψ : β → δ\nρ : γ → δ\nH : ψ ∘ φ = ρ ∘ θ\nF : Filter α\n⊢ map ψ (map φ F) = map ρ (map θ F)\n[PROOFSTEP]\nrw [Filter.map_map, H, ← Filter.map_map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nφ : α → β\nθ : α → γ\nψ : β → δ\nρ : γ → δ\nH : ψ ∘ φ = ρ ∘ θ\nG : Filter δ\n⊢ comap φ (comap ψ G) = comap θ (comap ρ G)\n[PROOFSTEP]\nrw [Filter.comap_comap, H, ← Filter.comap_comap]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nb : β\n⊢ comap m (pure b) = 𝓟 (m ⁻¹' {b})\n[PROOFSTEP]\nrw [← principal_singleton, comap_principal]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\n⊢ comap m g ≤ f ↔ g ≤ kernMap m f\n[PROOFSTEP]\nsimp [Filter.le_def, mem_comap'', mem_kernMap, -mem_comap]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\ns : Set α\n⊢ kernMap m (𝓟 s) = 𝓟 (kernImage m s)\n[PROOFSTEP]\nrefine eq_of_forall_le_iff (fun g ↦ ?_)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng✝ g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\ns : Set α\ng : Filter β\n⊢ g ≤ kernMap m (𝓟 s) ↔ g ≤ 𝓟 (kernImage m s)\n[PROOFSTEP]\nrw [← comap_le_iff_le_kernMap, le_principal_iff, le_principal_iff, mem_comap'']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\n⊢ map f ⊤ = 𝓟 (range f)\n[PROOFSTEP]\nrw [← principal_univ, map_principal, image_univ]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\nl : Filter α\n⊢ l ≤ comap f ⊤\n[PROOFSTEP]\nrw [comap_top]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\nl : Filter α\n⊢ l ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\ns : Set α\nx✝ : s ∈ ⊥\n⊢ m ⁻¹' ∅ ⊆ s\n[PROOFSTEP]\nsimp only [empty_subset, preimage_empty]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nh : NeBot (comap m g)\n⊢ NeBot g\n[PROOFSTEP]\nrw [neBot_iff] at *\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nh : comap m g ≠ ⊥\n⊢ g ≠ ⊥\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nh : g = ⊥\n⊢ comap m g = ⊥\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nh : g = ⊥\n⊢ comap m ⊥ = ⊥\n[PROOFSTEP]\nexact comap_bot\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\n⊢ comap m (g ⊓ 𝓟 (range m)) = comap m g\n[PROOFSTEP]\nsimpa only [le_principal_iff, comap_inf, comap_principal, preimage_range, principal_univ, inf_eq_left] using le_top\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nh : Disjoint g₁ g₂\n⊢ Disjoint (comap m g₁) (comap m g₂)\n[PROOFSTEP]\nsimp only [disjoint_iff, ← comap_inf, h.eq_bot, comap_bot]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\ns : Set (Filter β)\nm : α → β\n⊢ comap m (sSup s) = ⨆ (f : Filter β) (_ : f ∈ s), comap m f\n[PROOFSTEP]\nsimp only [sSup_eq_iSup, comap_iSup, eq_self_iff_true]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\n⊢ comap m (g₁ ⊔ g₂) = comap m g₁ ⊔ comap m g₂\n[PROOFSTEP]\nrw [sup_eq_iSup, comap_iSup, iSup_bool_eq, Bool.cond_true, Bool.cond_false]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter β\nm : α → β\n⊢ map m (comap m f) = f ⊓ 𝓟 (range m)\n[PROOFSTEP]\nrefine' le_antisymm (le_inf map_comap_le <| le_principal_iff.2 range_mem_map) _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter β\nm : α → β\n⊢ f ⊓ 𝓟 (range m) ≤ map m (comap m f)\n[PROOFSTEP]\nrintro t' ⟨t, ht, sub⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns : Set α\nt✝ : Set β\nf : Filter β\nm : α → β\nt' t : Set β\nht : t ∈ f\nsub : m ⁻¹' t ⊆ m ⁻¹' t'\n⊢ t' ∈ f ⊓ 𝓟 (range m)\n[PROOFSTEP]\nrefine' mem_inf_principal.2 (mem_of_superset ht _)\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns : Set α\nt✝ : Set β\nf : Filter β\nm : α → β\nt' t : Set β\nht : t ∈ f\nsub : m ⁻¹' t ⊆ m ⁻¹' t'\n⊢ t ⊆ {x | x ∈ range m → x ∈ t'}\n[PROOFSTEP]\nrintro _ hxt ⟨x, rfl⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns : Set α\nt✝ : Set β\nf : Filter β\nm : α → β\nt' t : Set β\nht : t ∈ f\nsub : m ⁻¹' t ⊆ m ⁻¹' t'\nx : α\nhxt : m x ∈ t\n⊢ m x ∈ t'\n[PROOFSTEP]\nexact sub hxt\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\nf : Filter β\ns : Set β\n⊢ map Subtype.val (comap Subtype.val f) = f ⊓ 𝓟 s\n[PROOFSTEP]\nrw [map_comap, Subtype.range_val]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter β\nm : α → β\nhf : range m ∈ f\n⊢ map m (comap m f) = f\n[PROOFSTEP]\nrw [map_comap, inf_eq_left.2 (le_principal_iff.2 hf)]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\nhf : Surjective f\nl : Filter β\n⊢ range f ∈ l\n[PROOFSTEP]\nsimp only [hf.range_eq, univ_mem]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\ns : Set α\nf : Filter α\n⊢ map Subtype.val (comap Subtype.val f) = f ⊓ 𝓟 s\n[PROOFSTEP]\nrw [map_comap, Subtype.range_coe]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter α\nc : β → α\nh : range c ∈ f\nW : Set β\nW_in : W ∈ comap c f\n⊢ c '' W ∈ f\n[PROOFSTEP]\nrw [← map_comap_of_mem h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter α\nc : β → α\nh : range c ∈ f\nW : Set β\nW_in : W ∈ comap c f\n⊢ c '' W ∈ map c (comap c f)\n[PROOFSTEP]\nexact image_mem_map W_in\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter α\nU : Set α\nh : U ∈ f\nW : Set ↑U\nW_in : W ∈ comap Subtype.val f\n⊢ range Subtype.val ∈ f\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\nf : Filter α\nm : α → β\nh : Injective m\ns : Set α\nhs : s ∈ f\n⊢ m ⁻¹' (m '' s) ⊆ s\n[PROOFSTEP]\nsimp only [preimage_image_eq s h, Subset.rfl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter β\nm : α → β\ninj : Injective m\nlarge : range m ∈ f\nS : Set α\n⊢ S ∈ comap m f ↔ m '' S ∈ f\n[PROOFSTEP]\nrw [← image_mem_map_iff inj, map_comap_of_mem large]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng✝ g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf g : Filter α\nm : α → β\nhm : Injective m\n⊢ map m f ≤ map m g ↔ f ≤ g\n[PROOFSTEP]\nrw [map_le_iff_le_comap, comap_map hm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng✝ g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\nf g : Filter α\nm : α → β\ns : Set α\nhsf : s ∈ f\nhsg : s ∈ g\nhm : InjOn m s\n⊢ map m f = map m g ↔ f = g\n[PROOFSTEP]\nsimp only [le_antisymm_iff, map_le_map_iff_of_injOn hsf hsg hm, map_le_map_iff_of_injOn hsg hsf hm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter β\nm : α → β\n⊢ NeBot (comap m f) ↔ ∀ (t : Set β), t ∈ f → ∃ a, m a ∈ t\n[PROOFSTEP]\nsimp only [← forall_mem_nonempty_iff_neBot, mem_comap, forall_exists_index, and_imp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter β\nm : α → β\n⊢ (∀ (s : Set α) (x : Set β), x ∈ f → m ⁻¹' x ⊆ s → Set.Nonempty s) ↔ ∀ (t : Set β), t ∈ f → ∃ a, m a ∈ t\n[PROOFSTEP]\nexact ⟨fun h t t_in => h (m ⁻¹' t) t t_in Subset.rfl, fun h s t ht hst => (h t ht).imp hst⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter β\nm : α → β\n⊢ NeBot (comap m f) ↔ ∃ᶠ (y : β) in f, y ∈ range m\n[PROOFSTEP]\nsimp only [comap_neBot_iff, frequently_iff, mem_range, @and_comm (_ ∈ _), exists_exists_eq_and]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter β\nm : α → β\nhm : Surjective m\n⊢ comap m f = ⊥ ↔ f = ⊥\n[PROOFSTEP]\nrw [comap_eq_bot_iff_compl_range, hm.range_eq, compl_univ, empty_mem_iff_bot]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nh : Surjective m\n⊢ Disjoint (comap m g₁) (comap m g₂) ↔ Disjoint g₁ g₂\n[PROOFSTEP]\nrw [disjoint_iff, disjoint_iff, ← comap_inf, comap_surjective_eq_bot h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter α\n⊢ NeBot (comap Prod.fst f) ↔ NeBot f ∧ Nonempty β\n[PROOFSTEP]\ncases isEmpty_or_nonempty β\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter α\nh✝ : IsEmpty β\n⊢ NeBot (comap Prod.fst f) ↔ NeBot f ∧ Nonempty β\n[PROOFSTEP]\nrw [filter_eq_bot_of_isEmpty (f.comap _), ← not_iff_not]\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter α\nh✝ : IsEmpty β\n⊢ ¬NeBot ⊥ ↔ ¬(NeBot f ∧ Nonempty β)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter α\nh✝ : Nonempty β\n⊢ NeBot (comap Prod.fst f) ↔ NeBot f ∧ Nonempty β\n[PROOFSTEP]\nsimp [comap_neBot_iff_frequently, *]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter β\n⊢ NeBot (comap Prod.snd f) ↔ Nonempty α ∧ NeBot f\n[PROOFSTEP]\ncases' isEmpty_or_nonempty α with hα hα\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter β\nhα : IsEmpty α\n⊢ NeBot (comap Prod.snd f) ↔ Nonempty α ∧ NeBot f\n[PROOFSTEP]\nrw [filter_eq_bot_of_isEmpty (f.comap _), ← not_iff_not]\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter β\nhα : IsEmpty α\n⊢ ¬NeBot ⊥ ↔ ¬(Nonempty α ∧ NeBot f)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : Filter β\nhα : Nonempty α\n⊢ NeBot (comap Prod.snd f) ↔ Nonempty α ∧ NeBot f\n[PROOFSTEP]\nsimp [comap_neBot_iff_frequently, hα]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ f₁ f₂ : Filter α✝\ng g₁ g₂ : Filter β\nm : α✝ → β\nm' : β → γ\ns : Set α✝\nt : Set β\nι : Type u_2\nα : ι → Type u_3\ni : ι\nf : Filter (α i)\n⊢ NeBot (comap (eval i) f) ↔ (∀ (j : ι), Nonempty (α j)) ∧ NeBot f\n[PROOFSTEP]\ncases' isEmpty_or_nonempty (∀ j, α j) with H H\n[GOAL]\ncase inl\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ f₁ f₂ : Filter α✝\ng g₁ g₂ : Filter β\nm : α✝ → β\nm' : β → γ\ns : Set α✝\nt : Set β\nι : Type u_2\nα : ι → Type u_3\ni : ι\nf : Filter (α i)\nH : IsEmpty ((j : ι) → α j)\n⊢ NeBot (comap (eval i) f) ↔ (∀ (j : ι), Nonempty (α j)) ∧ NeBot f\n[PROOFSTEP]\nrw [filter_eq_bot_of_isEmpty (f.comap _), ← not_iff_not]\n[GOAL]\ncase inl\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ f₁ f₂ : Filter α✝\ng g₁ g₂ : Filter β\nm : α✝ → β\nm' : β → γ\ns : Set α✝\nt : Set β\nι : Type u_2\nα : ι → Type u_3\ni : ι\nf : Filter (α i)\nH : IsEmpty ((j : ι) → α j)\n⊢ ¬NeBot ⊥ ↔ ¬((∀ (j : ι), Nonempty (α j)) ∧ NeBot f)\n[PROOFSTEP]\nsimp [← Classical.nonempty_pi]\n[GOAL]\ncase inr\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ f₁ f₂ : Filter α✝\ng g₁ g₂ : Filter β\nm : α✝ → β\nm' : β → γ\ns : Set α✝\nt : Set β\nι : Type u_2\nα : ι → Type u_3\ni : ι\nf : Filter (α i)\nH : Nonempty ((j : ι) → α j)\n⊢ NeBot (comap (eval i) f) ↔ (∀ (j : ι), Nonempty (α j)) ∧ NeBot f\n[PROOFSTEP]\nhave : ∀ j, Nonempty (α j) := Classical.nonempty_pi.1 H\n[GOAL]\ncase inr\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ f₁ f₂ : Filter α✝\ng g₁ g₂ : Filter β\nm : α✝ → β\nm' : β → γ\ns : Set α✝\nt : Set β\nι : Type u_2\nα : ι → Type u_3\ni : ι\nf : Filter (α i)\nH : Nonempty ((j : ι) → α j)\nthis : ∀ (j : ι), Nonempty (α j)\n⊢ NeBot (comap (eval i) f) ↔ (∀ (j : ι), Nonempty (α j)) ∧ NeBot f\n[PROOFSTEP]\nsimp [comap_neBot_iff_frequently, *]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nf✝ f₁ f₂ : Filter α✝\ng g₁ g₂ : Filter β\nm : α✝ → β\nm' : β → γ\ns : Set α✝\nt : Set β\nι : Type u_2\nα : ι → Type u_3\ninst✝ : ∀ (j : ι), Nonempty (α j)\ni : ι\nf : Filter (α i)\n⊢ NeBot (comap (eval i) f) ↔ NeBot f\n[PROOFSTEP]\nsimp [comap_eval_neBot_iff', *]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\nf : Filter β\nm : α → β\nhf : NeBot f\ns : Set α\nhs : m '' s ∈ f\n⊢ NeBot (comap m f ⊓ 𝓟 s)\n[PROOFSTEP]\nrefine' ⟨compl_compl s ▸ mt mem_of_eq_bot _⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns✝ : Set α\nt : Set β\nf : Filter β\nm : α → β\nhf : NeBot f\ns : Set α\nhs : m '' s ∈ f\n⊢ ¬sᶜ ∈ comap m f\n[PROOFSTEP]\nrintro ⟨t, ht, hts⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns✝ : Set α\nt✝ : Set β\nf : Filter β\nm : α → β\nhf : NeBot f\ns : Set α\nhs : m '' s ∈ f\nt : Set β\nht : t ∈ f\nhts : m ⁻¹' t ⊆ sᶜ\n⊢ False\n[PROOFSTEP]\nrcases hf.nonempty_of_mem (inter_mem hs ht) with ⟨_, ⟨x, hxs, rfl⟩, hxt⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm✝ : α → β\nm' : β → γ\ns✝ : Set α\nt✝ : Set β\nf : Filter β\nm : α → β\nhf : NeBot f\ns : Set α\nhs : m '' s ∈ f\nt : Set β\nht : t ∈ f\nhts : m ⁻¹' t ⊆ sᶜ\nx : α\nhxs : x ∈ s\nhxt : m x ∈ t\n⊢ False\n[PROOFSTEP]\nexact absurd hxs (hts hxt)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\n⊢ map m f = ⊥ → f = ⊥\n[PROOFSTEP]\nrw [← empty_mem_iff_bot, ← empty_mem_iff_bot]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\n⊢ ∅ ∈ map m f → ∅ ∈ f\n[PROOFSTEP]\nexact id\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nh : f = ⊥\n⊢ map m f = ⊥\n[PROOFSTEP]\nsimp only [h, map_bot]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\nF : Filter α\n⊢ NeBot (map f F) ↔ NeBot F\n[PROOFSTEP]\nsimp only [neBot_iff, Ne, map_eq_bot_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\nF : Filter β\n⊢ ⋂₀ (comap f F).sets = ⋂ (U : Set β) (_ : U ∈ F), f ⁻¹' U\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\nF : Filter β\nx : α\n⊢ x ∈ ⋂₀ (comap f F).sets ↔ x ∈ ⋂ (U : Set β) (_ : U ∈ F), f ⁻¹' U\n[PROOFSTEP]\nsuffices (∀ (A : Set α) (B : Set β), B ∈ F → f ⁻¹' B ⊆ A → x ∈ A) ↔ ∀ B : Set β, B ∈ F → f x ∈ B by\n  simp only [mem_sInter, mem_iInter, Filter.mem_sets, mem_comap, this, and_imp, exists_prop, mem_preimage, exists_imp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\nF : Filter β\nx : α\nthis : (∀ (A : Set α) (B : Set β), B ∈ F → f ⁻¹' B ⊆ A → x ∈ A) ↔ ∀ (B : Set β), B ∈ F → f x ∈ B\n⊢ x ∈ ⋂₀ (comap f F).sets ↔ x ∈ ⋂ (U : Set β) (_ : U ∈ F), f ⁻¹' U\n[PROOFSTEP]\nsimp only [mem_sInter, mem_iInter, Filter.mem_sets, mem_comap, this, and_imp, exists_prop, mem_preimage, exists_imp]\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\nF : Filter β\nx : α\n⊢ (∀ (A : Set α) (B : Set β), B ∈ F → f ⁻¹' B ⊆ A → x ∈ A) ↔ ∀ (B : Set β), B ∈ F → f x ∈ B\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\nF : Filter β\nx : α\n⊢ (∀ (A : Set α) (B : Set β), B ∈ F → f ⁻¹' B ⊆ A → x ∈ A) → ∀ (B : Set β), B ∈ F → f x ∈ B\n[PROOFSTEP]\nintro h U U_in\n[GOAL]\ncase h.mp\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\nF : Filter β\nx : α\nh : ∀ (A : Set α) (B : Set β), B ∈ F → f ⁻¹' B ⊆ A → x ∈ A\nU : Set β\nU_in : U ∈ F\n⊢ f x ∈ U\n[PROOFSTEP]\nsimpa only [Subset.rfl, forall_prop_of_true, mem_preimage] using h (f ⁻¹' U) U U_in\n[GOAL]\ncase h.mpr\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\nF : Filter β\nx : α\n⊢ (∀ (B : Set β), B ∈ F → f x ∈ B) → ∀ (A : Set α) (B : Set β), B ∈ F → f ⁻¹' B ⊆ A → x ∈ A\n[PROOFSTEP]\nintro h V U U_in f_U_V\n[GOAL]\ncase h.mpr\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf✝ f₁ f₂ : Filter α\ng g₁ g₂ : Filter β\nm : α → β\nm' : β → γ\ns : Set α\nt : Set β\nf : α → β\nF : Filter β\nx : α\nh : ∀ (B : Set β), B ∈ F → f x ∈ B\nV : Set α\nU : Set β\nU_in : U ∈ F\nf_U_V : f ⁻¹' U ⊆ V\n⊢ x ∈ V\n[PROOFSTEP]\nexact f_U_V (h U U_in)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : ι → Filter α\nm : α → β\nhf : Directed (fun x x_1 => x ≥ x_1) f\ninst✝ : Nonempty ι\ns : Set β\nhs : m ⁻¹' s ∈ iInf f\ni : ι\nhi : m ⁻¹' s ∈ f i\n⊢ map m (f i) ≤ 𝓟 s\n[PROOFSTEP]\nsimp only [le_principal_iff, mem_map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : ι → Filter α\nm : α → β\nhf : Directed (fun x x_1 => x ≥ x_1) f\ninst✝ : Nonempty ι\ns : Set β\nhs : m ⁻¹' s ∈ iInf f\ni : ι\nhi : m ⁻¹' s ∈ f i\n⊢ m ⁻¹' s ∈ f i\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nι : Type w\nf : ι → Filter α\nm : α → β\np : ι → Prop\nh : DirectedOn (f ⁻¹'o fun x x_1 => x ≥ x_1) {x | p x}\nne : ∃ i, p i\n⊢ map m (⨅ (i : ι) (_ : p i), f i) = ⨅ (i : ι) (_ : p i), map m (f i)\n[PROOFSTEP]\nhaveI := nonempty_subtype.2 ne\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nι : Type w\nf : ι → Filter α\nm : α → β\np : ι → Prop\nh : DirectedOn (f ⁻¹'o fun x x_1 => x ≥ x_1) {x | p x}\nne : ∃ i, p i\nthis : Nonempty { a // p a }\n⊢ map m (⨅ (i : ι) (_ : p i), f i) = ⨅ (i : ι) (_ : p i), map m (f i)\n[PROOFSTEP]\nsimp only [iInf_subtype']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι✝ : Sort x\nι : Type w\nf : ι → Filter α\nm : α → β\np : ι → Prop\nh : DirectedOn (f ⁻¹'o fun x x_1 => x ≥ x_1) {x | p x}\nne : ∃ i, p i\nthis : Nonempty { a // p a }\n⊢ map m (⨅ (x : { i // p i }), f ↑x) = ⨅ (x : { i // p i }), map m (f ↑x)\n[PROOFSTEP]\nexact map_iInf_eq h.directed_val\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\nm : α → β\nh : Injective m\n⊢ map m (f ⊓ g) = map m f ⊓ map m g\n[PROOFSTEP]\nrefine' map_inf_le.antisymm _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\nm : α → β\nh : Injective m\n⊢ map m f ⊓ map m g ≤ map m (f ⊓ g)\n[PROOFSTEP]\nrintro t ⟨s₁, hs₁, s₂, hs₂, ht : m ⁻¹' t = s₁ ∩ s₂⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\nm : α → β\nh : Injective m\nt : Set β\ns₁ : Set α\nhs₁ : s₁ ∈ f\ns₂ : Set α\nhs₂ : s₂ ∈ g\nht : m ⁻¹' t = s₁ ∩ s₂\n⊢ t ∈ map m f ⊓ map m g\n[PROOFSTEP]\nrefine' mem_inf_of_inter (image_mem_map hs₁) (image_mem_map hs₂) _\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\nm : α → β\nh : Injective m\nt : Set β\ns₁ : Set α\nhs₁ : s₁ ∈ f\ns₂ : Set α\nhs₂ : s₂ ∈ g\nht : m ⁻¹' t = s₁ ∩ s₂\n⊢ m '' s₁ ∩ m '' s₂ ⊆ t\n[PROOFSTEP]\nrw [← image_inter h, image_subset_iff, ht]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf g : Filter α\nm : α → β\nt : Set α\nhtf : t ∈ f\nhtg : t ∈ g\nh : InjOn m t\n⊢ map m (f ⊓ g) = map m f ⊓ map m g\n[PROOFSTEP]\nlift f to Filter t using htf\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ng : Filter α\nm : α → β\nt : Set α\nhtg : t ∈ g\nh : InjOn m t\nf : Filter ↑t\n⊢ map m (map Subtype.val f ⊓ g) = map m (map Subtype.val f) ⊓ map m g\n[PROOFSTEP]\nlift g to Filter t using htg\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nt : Set α\nh : InjOn m t\nf g : Filter ↑t\n⊢ map m (map Subtype.val f ⊓ map Subtype.val g) = map m (map Subtype.val f) ⊓ map m (map Subtype.val g)\n[PROOFSTEP]\nreplace h : Injective (m ∘ ((↑) : t → α)) := h.injective\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nt : Set α\nf g : Filter ↑t\nh : Injective (m ∘ Subtype.val)\n⊢ map m (map Subtype.val f ⊓ map Subtype.val g) = map m (map Subtype.val f) ⊓ map m (map Subtype.val g)\n[PROOFSTEP]\nsimp only [map_map, ← map_inf Subtype.coe_injective, map_inf h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nhm : Injective m\nf₁ f₂ : Filter α\n⊢ Disjoint (map m f₁) (map m f₂) ↔ Disjoint f₁ f₂\n[PROOFSTEP]\nsimp only [disjoint_iff, ← map_inf hm, map_eq_bot_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ne : α ≃ β\nf : Filter β\n⊢ map (↑e) (map (↑e.symm) f) = map (↑e) (comap (↑e) f)\n[PROOFSTEP]\nrw [map_map, e.self_comp_symm, map_id, map_comap_of_surjective e.surjective]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nF : Filter α\nG : Filter β\n⊢ map f (F ⊓ comap f G) = map f F ⊓ G\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nF : Filter α\nG : Filter β\n⊢ map f (F ⊓ comap f G) ≤ map f F ⊓ G\n[PROOFSTEP]\ncalc\n  map f (F ⊓ comap f G) ≤ map f F ⊓ (map f <| comap f G) := map_inf_le\n  _ ≤ map f F ⊓ G := inf_le_inf_left (map f F) map_comap_le\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nF : Filter α\nG : Filter β\n⊢ map f F ⊓ G ≤ map f (F ⊓ comap f G)\n[PROOFSTEP]\nrintro U ⟨V, V_in, W, ⟨Z, Z_in, hZ⟩, h⟩\n[GOAL]\ncase a.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nF : Filter α\nG : Filter β\nU : Set β\nV : Set α\nV_in : V ∈ F\nW : Set α\nh : f ⁻¹' U = V ∩ W\nZ : Set β\nZ_in : Z ∈ G\nhZ : f ⁻¹' Z ⊆ W\n⊢ U ∈ map f F ⊓ G\n[PROOFSTEP]\napply mem_inf_of_inter (image_mem_map V_in) Z_in\n[GOAL]\ncase a.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nF : Filter α\nG : Filter β\nU : Set β\nV : Set α\nV_in : V ∈ F\nW : Set α\nh : f ⁻¹' U = V ∩ W\nZ : Set β\nZ_in : Z ∈ G\nhZ : f ⁻¹' Z ⊆ W\n⊢ f '' V ∩ Z ⊆ U\n[PROOFSTEP]\ncalc\n  f '' V ∩ Z = f '' (V ∩ f ⁻¹' Z) := by rw [image_inter_preimage]\n  _ ⊆ f '' (V ∩ W) := (image_subset _ (inter_subset_inter_right _ ‹_›))\n  _ = f '' (f ⁻¹' U) := by rw [h]\n  _ ⊆ U := image_preimage_subset f U\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nF : Filter α\nG : Filter β\nU : Set β\nV : Set α\nV_in : V ∈ F\nW : Set α\nh : f ⁻¹' U = V ∩ W\nZ : Set β\nZ_in : Z ∈ G\nhZ : f ⁻¹' Z ⊆ W\n⊢ f '' V ∩ Z = f '' (V ∩ f ⁻¹' Z)\n[PROOFSTEP]\nrw [image_inter_preimage]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nF : Filter α\nG : Filter β\nU : Set β\nV : Set α\nV_in : V ∈ F\nW : Set α\nh : f ⁻¹' U = V ∩ W\nZ : Set β\nZ_in : Z ∈ G\nhZ : f ⁻¹' Z ⊆ W\n⊢ f '' (V ∩ W) = f '' (f ⁻¹' U)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nF : Filter α\nG : Filter β\n⊢ map f (comap f G ⊓ F) = G ⊓ map f F\n[PROOFSTEP]\nsimp only [Filter.push_pull, inf_comm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ns : Set α\n⊢ 𝓟 s = map Subtype.val ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nF : Filter α\ns : Set α\n⊢ F ⊓ 𝓟 s = ⊥ ↔ comap Subtype.val F = ⊥\n[PROOFSTEP]\nrw [principal_eq_map_coe_top s, ← Filter.push_pull', inf_top_eq, map_eq_bot_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\na : α\n⊢ f ≤ pure a ↔ {a} ∈ f\n[PROOFSTEP]\nrw [← principal_singleton, le_principal_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter (α → β)\ng : Filter α\ns : Set β\n⊢ s ∈ seq f g ↔ ∃ u, u ∈ f ∧ ∃ t, t ∈ g ∧ Set.seq u t ⊆ s\n[PROOFSTEP]\nsimp only [mem_seq_def, seq_subset, exists_prop, iff_self_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ng : α → β\nf : Filter α\n⊢ seq (pure g) f = map g f\n[PROOFSTEP]\nrefine' le_antisymm (le_map fun s hs => _) (le_seq fun s hs t ht => _)\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ng : α → β\nf : Filter α\ns : Set α\nhs : s ∈ f\n⊢ g '' s ∈ seq (pure g) f\n[PROOFSTEP]\nrw [← singleton_seq]\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ng : α → β\nf : Filter α\ns : Set α\nhs : s ∈ f\n⊢ Set.seq {g} s ∈ seq (pure g) f\n[PROOFSTEP]\napply seq_mem_seq _ hs\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ng : α → β\nf : Filter α\ns : Set α\nhs : s ∈ f\n⊢ {g} ∈ pure g\n[PROOFSTEP]\nexact singleton_mem_pure\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ng : α → β\nf : Filter α\ns : Set (α → β)\nhs : s ∈ pure g\nt : Set α\nht : t ∈ f\n⊢ Set.seq s t ∈ map g f\n[PROOFSTEP]\nrefine' sets_of_superset (map g f) (image_mem_map ht) _\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ng : α → β\nf : Filter α\ns : Set (α → β)\nhs : s ∈ pure g\nt : Set α\nht : t ∈ f\n⊢ g '' t ⊆ Set.seq s t\n[PROOFSTEP]\nrintro b ⟨a, ha, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ng : α → β\nf : Filter α\ns : Set (α → β)\nhs : s ∈ pure g\nt : Set α\nht : t ∈ f\na : α\nha : a ∈ t\n⊢ g a ∈ Set.seq s t\n[PROOFSTEP]\nexact ⟨g, hs, a, ha, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter (α → β)\na : α\n⊢ seq f (pure a) = map (fun g => g a) f\n[PROOFSTEP]\nrefine' le_antisymm (le_map fun s hs => _) (le_seq fun s hs t ht => _)\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter (α → β)\na : α\ns : Set (α → β)\nhs : s ∈ f\n⊢ (fun g => g a) '' s ∈ seq f (pure a)\n[PROOFSTEP]\nrw [← seq_singleton]\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter (α → β)\na : α\ns : Set (α → β)\nhs : s ∈ f\n⊢ Set.seq s {a} ∈ seq f (pure a)\n[PROOFSTEP]\nexact seq_mem_seq hs singleton_mem_pure\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter (α → β)\na : α\ns : Set (α → β)\nhs : s ∈ f\nt : Set α\nht : t ∈ pure a\n⊢ Set.seq s t ∈ map (fun g => g a) f\n[PROOFSTEP]\nrefine' sets_of_superset (map (fun g : α → β => g a) f) (image_mem_map hs) _\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter (α → β)\na : α\ns : Set (α → β)\nhs : s ∈ f\nt : Set α\nht : t ∈ pure a\n⊢ (fun g => g a) '' s ⊆ Set.seq s t\n[PROOFSTEP]\nrintro b ⟨g, hg, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter (α → β)\na : α\ns : Set (α → β)\nhs : s ∈ f\nt : Set α\nht : t ∈ pure a\ng : α → β\nhg : g ∈ s\n⊢ (fun g => g a) g ∈ Set.seq s t\n[PROOFSTEP]\nexact ⟨g, hg, a, ht, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nx : Filter α\ng : Filter (α → β)\nh : Filter (β → γ)\n⊢ seq h (seq g x) = seq (seq (map (fun x x_1 => x ∘ x_1) h) g) x\n[PROOFSTEP]\nrefine' le_antisymm (le_seq fun s hs t ht => _) (le_seq fun s hs t ht => _)\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nx : Filter α\ng : Filter (α → β)\nh : Filter (β → γ)\ns : Set (α → γ)\nhs : s ∈ seq (map (fun x x_1 => x ∘ x_1) h) g\nt : Set α\nht : t ∈ x\n⊢ Set.seq s t ∈ seq h (seq g x)\n[PROOFSTEP]\nrcases mem_seq_iff.1 hs with ⟨u, hu, v, hv, hs⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nx : Filter α\ng : Filter (α → β)\nh : Filter (β → γ)\ns : Set (α → γ)\nhs✝ : s ∈ seq (map (fun x x_1 => x ∘ x_1) h) g\nt : Set α\nht : t ∈ x\nu : Set ((α → β) → α → γ)\nhu : u ∈ map (fun x x_1 => x ∘ x_1) h\nv : Set (α → β)\nhv : v ∈ g\nhs : Set.seq u v ⊆ s\n⊢ Set.seq s t ∈ seq h (seq g x)\n[PROOFSTEP]\nrcases mem_map_iff_exists_image.1 hu with ⟨w, hw, hu⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nx : Filter α\ng : Filter (α → β)\nh : Filter (β → γ)\ns : Set (α → γ)\nhs✝ : s ∈ seq (map (fun x x_1 => x ∘ x_1) h) g\nt : Set α\nht : t ∈ x\nu : Set ((α → β) → α → γ)\nhu✝ : u ∈ map (fun x x_1 => x ∘ x_1) h\nv : Set (α → β)\nhv : v ∈ g\nhs : Set.seq u v ⊆ s\nw : Set (β → γ)\nhw : w ∈ h\nhu : (fun x x_1 => x ∘ x_1) '' w ⊆ u\n⊢ Set.seq s t ∈ seq h (seq g x)\n[PROOFSTEP]\nrefine' mem_of_superset _ (Set.seq_mono ((Set.seq_mono hu Subset.rfl).trans hs) Subset.rfl)\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nx : Filter α\ng : Filter (α → β)\nh : Filter (β → γ)\ns : Set (α → γ)\nhs✝ : s ∈ seq (map (fun x x_1 => x ∘ x_1) h) g\nt : Set α\nht : t ∈ x\nu : Set ((α → β) → α → γ)\nhu✝ : u ∈ map (fun x x_1 => x ∘ x_1) h\nv : Set (α → β)\nhv : v ∈ g\nhs : Set.seq u v ⊆ s\nw : Set (β → γ)\nhw : w ∈ h\nhu : (fun x x_1 => x ∘ x_1) '' w ⊆ u\n⊢ Set.seq (Set.seq ((fun x x_1 => x ∘ x_1) '' w) v) t ∈ seq h (seq g x)\n[PROOFSTEP]\nrw [← Set.seq_seq]\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nx : Filter α\ng : Filter (α → β)\nh : Filter (β → γ)\ns : Set (α → γ)\nhs✝ : s ∈ seq (map (fun x x_1 => x ∘ x_1) h) g\nt : Set α\nht : t ∈ x\nu : Set ((α → β) → α → γ)\nhu✝ : u ∈ map (fun x x_1 => x ∘ x_1) h\nv : Set (α → β)\nhv : v ∈ g\nhs : Set.seq u v ⊆ s\nw : Set (β → γ)\nhw : w ∈ h\nhu : (fun x x_1 => x ∘ x_1) '' w ⊆ u\n⊢ Set.seq w (Set.seq v t) ∈ seq h (seq g x)\n[PROOFSTEP]\nexact seq_mem_seq hw (seq_mem_seq hv ht)\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nx : Filter α\ng : Filter (α → β)\nh : Filter (β → γ)\ns : Set (β → γ)\nhs : s ∈ h\nt : Set β\nht : t ∈ seq g x\n⊢ Set.seq s t ∈ seq (seq (map (fun x x_1 => x ∘ x_1) h) g) x\n[PROOFSTEP]\nrcases mem_seq_iff.1 ht with ⟨u, hu, v, hv, ht⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nx : Filter α\ng : Filter (α → β)\nh : Filter (β → γ)\ns : Set (β → γ)\nhs : s ∈ h\nt : Set β\nht✝ : t ∈ seq g x\nu : Set (α → β)\nhu : u ∈ g\nv : Set α\nhv : v ∈ x\nht : Set.seq u v ⊆ t\n⊢ Set.seq s t ∈ seq (seq (map (fun x x_1 => x ∘ x_1) h) g) x\n[PROOFSTEP]\nrefine' mem_of_superset _ (Set.seq_mono Subset.rfl ht)\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nx : Filter α\ng : Filter (α → β)\nh : Filter (β → γ)\ns : Set (β → γ)\nhs : s ∈ h\nt : Set β\nht✝ : t ∈ seq g x\nu : Set (α → β)\nhu : u ∈ g\nv : Set α\nhv : v ∈ x\nht : Set.seq u v ⊆ t\n⊢ Set.seq s (Set.seq u v) ∈ seq (seq (map (fun x x_1 => x ∘ x_1) h) g) x\n[PROOFSTEP]\nrw [Set.seq_seq]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nx : Filter α\ng : Filter (α → β)\nh : Filter (β → γ)\ns : Set (β → γ)\nhs : s ∈ h\nt : Set β\nht✝ : t ∈ seq g x\nu : Set (α → β)\nhu : u ∈ g\nv : Set α\nhv : v ∈ x\nht : Set.seq u v ⊆ t\n⊢ Set.seq (Set.seq ((fun x x_1 => x ∘ x_1) '' s) u) v ∈ seq (seq (map (fun x x_1 => x ∘ x_1) h) g) x\n[PROOFSTEP]\nexact seq_mem_seq (seq_mem_seq (image_mem_map hs) hu) hv\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\n⊢ seq (map Prod.mk f) g = seq (map (fun b a => (a, b)) g) f\n[PROOFSTEP]\nrefine' le_antisymm (le_seq fun s hs t ht => _) (le_seq fun s hs t ht => _)\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\ns : Set (α → α × β)\nhs : s ∈ map (fun b a => (a, b)) g\nt : Set α\nht : t ∈ f\n⊢ Set.seq s t ∈ seq (map Prod.mk f) g\n[PROOFSTEP]\nrcases mem_map_iff_exists_image.1 hs with ⟨u, hu, hs⟩\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\ns : Set (α → α × β)\nhs✝ : s ∈ map (fun b a => (a, b)) g\nt : Set α\nht : t ∈ f\nu : Set β\nhu : u ∈ g\nhs : (fun b a => (a, b)) '' u ⊆ s\n⊢ Set.seq s t ∈ seq (map Prod.mk f) g\n[PROOFSTEP]\nrefine' mem_of_superset _ (Set.seq_mono hs Subset.rfl)\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\ns : Set (α → α × β)\nhs✝ : s ∈ map (fun b a => (a, b)) g\nt : Set α\nht : t ∈ f\nu : Set β\nhu : u ∈ g\nhs : (fun b a => (a, b)) '' u ⊆ s\n⊢ Set.seq ((fun b a => (a, b)) '' u) t ∈ seq (map Prod.mk f) g\n[PROOFSTEP]\nrw [← Set.prod_image_seq_comm]\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\ns : Set (α → α × β)\nhs✝ : s ∈ map (fun b a => (a, b)) g\nt : Set α\nht : t ∈ f\nu : Set β\nhu : u ∈ g\nhs : (fun b a => (a, b)) '' u ⊆ s\n⊢ Set.seq (Prod.mk '' t) u ∈ seq (map Prod.mk f) g\n[PROOFSTEP]\nexact seq_mem_seq (image_mem_map ht) hu\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\ns : Set (β → α × β)\nhs : s ∈ map Prod.mk f\nt : Set β\nht : t ∈ g\n⊢ Set.seq s t ∈ seq (map (fun b a => (a, b)) g) f\n[PROOFSTEP]\nrcases mem_map_iff_exists_image.1 hs with ⟨u, hu, hs⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\ns : Set (β → α × β)\nhs✝ : s ∈ map Prod.mk f\nt : Set β\nht : t ∈ g\nu : Set α\nhu : u ∈ f\nhs : Prod.mk '' u ⊆ s\n⊢ Set.seq s t ∈ seq (map (fun b a => (a, b)) g) f\n[PROOFSTEP]\nrefine' mem_of_superset _ (Set.seq_mono hs Subset.rfl)\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\ns : Set (β → α × β)\nhs✝ : s ∈ map Prod.mk f\nt : Set β\nht : t ∈ g\nu : Set α\nhu : u ∈ f\nhs : Prod.mk '' u ⊆ s\n⊢ Set.seq (Prod.mk '' u) t ∈ seq (map (fun b a => (a, b)) g) f\n[PROOFSTEP]\nrw [Set.prod_image_seq_comm]\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\ns : Set (β → α × β)\nhs✝ : s ∈ map Prod.mk f\nt : Set β\nht : t ∈ g\nu : Set α\nhu : u ∈ f\nhs : Prod.mk '' u ⊆ s\n⊢ Set.seq ((fun b a => (a, b)) '' t) u ∈ seq (map (fun b a => (a, b)) g) f\n[PROOFSTEP]\nexact seq_mem_seq (image_mem_map ht) hu\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf₁ f₂ : Filter α\ng₁ g₂ : α → Filter β\nhf : f₁ ≤ f₂\nhg : g₁ ≤ᶠ[f₁] g₂\n⊢ bind f₁ g₁ ≤ bind f₂ g₂\n[PROOFSTEP]\nrefine' le_trans (fun s hs => _) (join_mono <| map_mono hf)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf₁ f₂ : Filter α\ng₁ g₂ : α → Filter β\nhf : f₁ ≤ f₂\nhg : g₁ ≤ᶠ[f₁] g₂\ns : Set β\nhs : s ∈ join (map g₂ f₁)\n⊢ s ∈ bind f₁ g₁\n[PROOFSTEP]\nsimp only [mem_join, mem_bind', mem_map] at hs ⊢\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf₁ f₂ : Filter α\ng₁ g₂ : α → Filter β\nhf : f₁ ≤ f₂\nhg : g₁ ≤ᶠ[f₁] g₂\ns : Set β\nhs : g₂ ⁻¹' {t | s ∈ t} ∈ f₁\n⊢ {a | s ∈ g₁ a} ∈ f₁\n[PROOFSTEP]\nfilter_upwards [hg, hs] with _ hx hs using hx hs\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : α → Filter β\ns✝ s : Set β\n⊢ (s ∈ bind f fun x => g x ⊓ 𝓟 s✝) ↔ s ∈ bind f g ⊓ 𝓟 s✝\n[PROOFSTEP]\nsimp only [mem_bind, mem_inf_principal]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ns : Set α\nf : α → Filter β\n⊢ join (map f (𝓟 s)) = ⨆ (x : α) (_ : x ∈ s), f x\n[PROOFSTEP]\nsimp only [sSup_image, join_principal_eq_sSup, map_principal, eq_self_iff_true]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nfs : List β'\nt : Set (List α')\n⊢ t ∈ traverse f fs ↔ ∃ us, Forall₂ (fun b s => s ∈ f b) fs us ∧ sequence us ⊆ t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nfs : List β'\nt : Set (List α')\n⊢ t ∈ traverse f fs → ∃ us, Forall₂ (fun b s => s ∈ f b) fs us ∧ sequence us ⊆ t\n[PROOFSTEP]\ninduction fs generalizing t\n[GOAL]\ncase mp.nil\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nt : Set (List α')\n⊢ t ∈ traverse f [] → ∃ us, Forall₂ (fun b s => s ∈ f b) [] us ∧ sequence us ⊆ t\ncase mp.cons\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nhead✝ : β'\ntail✝ : List β'\ntail_ih✝ : ∀ (t : Set (List α')), t ∈ traverse f tail✝ → ∃ us, Forall₂ (fun b s => s ∈ f b) tail✝ us ∧ sequence us ⊆ t\nt : Set (List α')\n⊢ t ∈ traverse f (head✝ :: tail✝) → ∃ us, Forall₂ (fun b s => s ∈ f b) (head✝ :: tail✝) us ∧ sequence us ⊆ t\n[PROOFSTEP]\ncase nil =>\n  simp only [sequence, mem_pure, imp_self, forall₂_nil_left_iff, exists_eq_left, Set.pure_def, singleton_subset_iff,\n    traverse_nil]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nt : Set (List α')\n⊢ t ∈ traverse f [] → ∃ us, Forall₂ (fun b s => s ∈ f b) [] us ∧ sequence us ⊆ t\n[PROOFSTEP]\ncase nil =>\n  simp only [sequence, mem_pure, imp_self, forall₂_nil_left_iff, exists_eq_left, Set.pure_def, singleton_subset_iff,\n    traverse_nil]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nt : Set (List α')\n⊢ t ∈ traverse f [] → ∃ us, Forall₂ (fun b s => s ∈ f b) [] us ∧ sequence us ⊆ t\n[PROOFSTEP]\nsimp only [sequence, mem_pure, imp_self, forall₂_nil_left_iff, exists_eq_left, Set.pure_def, singleton_subset_iff,\n  traverse_nil]\n[GOAL]\ncase mp.cons\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nhead✝ : β'\ntail✝ : List β'\ntail_ih✝ : ∀ (t : Set (List α')), t ∈ traverse f tail✝ → ∃ us, Forall₂ (fun b s => s ∈ f b) tail✝ us ∧ sequence us ⊆ t\nt : Set (List α')\n⊢ t ∈ traverse f (head✝ :: tail✝) → ∃ us, Forall₂ (fun b s => s ∈ f b) (head✝ :: tail✝) us ∧ sequence us ⊆ t\n[PROOFSTEP]\ncase cons b fs ih =>\n  intro ht\n  rcases mem_seq_iff.1 ht with ⟨u, hu, v, hv, ht⟩\n  rcases mem_map_iff_exists_image.1 hu with ⟨w, hw, hwu⟩\n  rcases ih v hv with ⟨us, hus, hu⟩\n  exact ⟨w :: us, Forall₂.cons hw hus, (Set.seq_mono hwu hu).trans ht⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nb : β'\nfs : List β'\nih : ∀ (t : Set (List α')), t ∈ traverse f fs → ∃ us, Forall₂ (fun b s => s ∈ f b) fs us ∧ sequence us ⊆ t\nt : Set (List α')\n⊢ t ∈ traverse f (b :: fs) → ∃ us, Forall₂ (fun b s => s ∈ f b) (b :: fs) us ∧ sequence us ⊆ t\n[PROOFSTEP]\ncase cons b fs ih =>\n  intro ht\n  rcases mem_seq_iff.1 ht with ⟨u, hu, v, hv, ht⟩\n  rcases mem_map_iff_exists_image.1 hu with ⟨w, hw, hwu⟩\n  rcases ih v hv with ⟨us, hus, hu⟩\n  exact ⟨w :: us, Forall₂.cons hw hus, (Set.seq_mono hwu hu).trans ht⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nb : β'\nfs : List β'\nih : ∀ (t : Set (List α')), t ∈ traverse f fs → ∃ us, Forall₂ (fun b s => s ∈ f b) fs us ∧ sequence us ⊆ t\nt : Set (List α')\n⊢ t ∈ traverse f (b :: fs) → ∃ us, Forall₂ (fun b s => s ∈ f b) (b :: fs) us ∧ sequence us ⊆ t\n[PROOFSTEP]\nintro ht\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nb : β'\nfs : List β'\nih : ∀ (t : Set (List α')), t ∈ traverse f fs → ∃ us, Forall₂ (fun b s => s ∈ f b) fs us ∧ sequence us ⊆ t\nt : Set (List α')\nht : t ∈ traverse f (b :: fs)\n⊢ ∃ us, Forall₂ (fun b s => s ∈ f b) (b :: fs) us ∧ sequence us ⊆ t\n[PROOFSTEP]\nrcases mem_seq_iff.1 ht with ⟨u, hu, v, hv, ht⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nb : β'\nfs : List β'\nih : ∀ (t : Set (List α')), t ∈ traverse f fs → ∃ us, Forall₂ (fun b s => s ∈ f b) fs us ∧ sequence us ⊆ t\nt : Set (List α')\nht✝ : t ∈ traverse f (b :: fs)\nu : Set (List α' → List α')\nhu : u ∈ cons <$> f b\nv : Set (List α')\nhv : v ∈ (fun x => List.traverse f fs) ()\nht : Set.seq u v ⊆ t\n⊢ ∃ us, Forall₂ (fun b s => s ∈ f b) (b :: fs) us ∧ sequence us ⊆ t\n[PROOFSTEP]\nrcases mem_map_iff_exists_image.1 hu with ⟨w, hw, hwu⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nb : β'\nfs : List β'\nih : ∀ (t : Set (List α')), t ∈ traverse f fs → ∃ us, Forall₂ (fun b s => s ∈ f b) fs us ∧ sequence us ⊆ t\nt : Set (List α')\nht✝ : t ∈ traverse f (b :: fs)\nu : Set (List α' → List α')\nhu : u ∈ cons <$> f b\nv : Set (List α')\nhv : v ∈ (fun x => List.traverse f fs) ()\nht : Set.seq u v ⊆ t\nw : Set α'\nhw : w ∈ f b\nhwu : cons '' w ⊆ u\n⊢ ∃ us, Forall₂ (fun b s => s ∈ f b) (b :: fs) us ∧ sequence us ⊆ t\n[PROOFSTEP]\nrcases ih v hv with ⟨us, hus, hu⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nb : β'\nfs : List β'\nih : ∀ (t : Set (List α')), t ∈ traverse f fs → ∃ us, Forall₂ (fun b s => s ∈ f b) fs us ∧ sequence us ⊆ t\nt : Set (List α')\nht✝ : t ∈ traverse f (b :: fs)\nu : Set (List α' → List α')\nhu✝ : u ∈ cons <$> f b\nv : Set (List α')\nhv : v ∈ (fun x => List.traverse f fs) ()\nht : Set.seq u v ⊆ t\nw : Set α'\nhw : w ∈ f b\nhwu : cons '' w ⊆ u\nus : List (Set α')\nhus : Forall₂ (fun b s => s ∈ f b) fs us\nhu : sequence us ⊆ v\n⊢ ∃ us, Forall₂ (fun b s => s ∈ f b) (b :: fs) us ∧ sequence us ⊆ t\n[PROOFSTEP]\nexact ⟨w :: us, Forall₂.cons hw hus, (Set.seq_mono hwu hu).trans ht⟩\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nfs : List β'\nt : Set (List α')\n⊢ (∃ us, Forall₂ (fun b s => s ∈ f b) fs us ∧ sequence us ⊆ t) → t ∈ traverse f fs\n[PROOFSTEP]\nrintro ⟨us, hus, hs⟩\n[GOAL]\ncase mpr.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nα' β' γ' : Type u\nf : β' → Filter α'\ns : γ' → Set α'\nfs : List β'\nt : Set (List α')\nus : List (Set α')\nhus : Forall₂ (fun b s => s ∈ f b) fs us\nhs : sequence us ⊆ t\n⊢ t ∈ traverse f fs\n[PROOFSTEP]\nexact mem_of_superset (mem_traverse _ _ hus) hs\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nl : Filter β\n⊢ Tendsto f ⊥ l\n[PROOFSTEP]\nsimp [Tendsto]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nmab : α → β\nmba : β → α\nf : Filter α\ng : Filter β\nh₁ : mab ∘ mba =ᶠ[g] id\nh₂ : Tendsto mba g f\n⊢ g ≤ map mab f\n[PROOFSTEP]\nrw [← @map_id _ g, ← map_congr h₁, ← map_map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nmab : α → β\nmba : β → α\nf : Filter α\ng : Filter β\nh₁ : mab ∘ mba =ᶠ[g] id\nh₂ : Tendsto mba g f\n⊢ map mab (map mba g) ≤ map mab f\n[PROOFSTEP]\nexact map_mono h₂\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\ninst✝ : IsEmpty α\nf : α → β\nla : Filter α\nlb : Filter β\n⊢ Tendsto f la lb\n[PROOFSTEP]\nsimp only [filter_eq_bot_of_isEmpty la, tendsto_bot]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf₁ f₂ : α → β\nl₁ : Filter α\nl₂ : Filter β\nhl : f₁ =ᶠ[l₁] f₂\n⊢ Tendsto f₁ l₁ l₂ ↔ Tendsto f₂ l₁ l₂\n[PROOFSTEP]\nrw [Tendsto, Tendsto, map_congr hl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : β → γ\ng : α → β\nx : Filter α\ny : Filter γ\n⊢ Tendsto f (map g x) y ↔ Tendsto (f ∘ g) x y\n[PROOFSTEP]\nrw [Tendsto, Tendsto, map_map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\ng : β → γ\na : Filter α\nc : Filter γ\nh : Tendsto (g ∘ f) a c\n⊢ map g (map f a) ≤ c\n[PROOFSTEP]\nrwa [map_map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter α\ng : Filter β\ni : γ → α\nh : range i ∈ f\n⊢ Tendsto (m ∘ i) (comap i f) g ↔ Tendsto m f g\n[PROOFSTEP]\nrw [Tendsto, ← map_compose]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nm : α → β\nf : Filter α\ng : Filter β\ni : γ → α\nh : range i ∈ f\n⊢ (map m ∘ map i) (comap i f) ≤ g ↔ Tendsto m f g\n[PROOFSTEP]\nsimp only [(· ∘ ·), map_comap_of_mem h, Tendsto]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\ng : β → γ\na : Filter α\nb : Filter β\nc : Filter γ\nhfg : Tendsto (g ∘ f) a c\nhg : comap g c ≤ b\n⊢ Tendsto f a b\n[PROOFSTEP]\nrw [tendsto_iff_comap] at hfg ⊢\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\ng : β → γ\na : Filter α\nb : Filter β\nc : Filter γ\nhfg : a ≤ comap (g ∘ f) c\nhg : comap g c ≤ b\n⊢ a ≤ comap f b\n[PROOFSTEP]\ncalc\n  a ≤ comap (g ∘ f) c := hfg\n  _ ≤ comap f b := by simpa [comap_comap] using comap_mono hg\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\ng : β → γ\na : Filter α\nb : Filter β\nc : Filter γ\nhfg : a ≤ comap (g ∘ f) c\nhg : comap g c ≤ b\n⊢ comap (g ∘ f) c ≤ comap f b\n[PROOFSTEP]\nsimpa [comap_comap] using comap_mono hg\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\nφ : α → β\nψ : β → α\neq : ψ ∘ φ = id\nhφ : Tendsto φ f g\nhψ : Tendsto ψ g f\n⊢ comap φ g = f\n[PROOFSTEP]\nrefine' ((comap_mono <| map_le_iff_le_comap.1 hψ).trans _).antisymm (map_le_iff_le_comap.1 hφ)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\nφ : α → β\nψ : β → α\neq : ψ ∘ φ = id\nhφ : Tendsto φ f g\nhψ : Tendsto ψ g f\n⊢ comap φ (comap ψ f) ≤ f\n[PROOFSTEP]\nrw [comap_comap, eq, comap_id]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\nφ : α → β\nψ : β → α\neq : φ ∘ ψ = id\nhφ : Tendsto φ f g\nhψ : Tendsto ψ g f\n⊢ map φ f = g\n[PROOFSTEP]\nrefine' le_antisymm hφ (le_trans _ (map_mono hψ))\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : Filter α\ng : Filter β\nφ : α → β\nψ : β → α\neq : φ ∘ ψ = id\nhφ : Tendsto φ f g\nhψ : Tendsto ψ g f\n⊢ g ≤ map φ (map ψ g)\n[PROOFSTEP]\nrw [map_map, eq, map_id]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nx : Filter α\ny₁ y₂ : Filter β\n⊢ Tendsto f x (y₁ ⊓ y₂) ↔ Tendsto f x y₁ ∧ Tendsto f x y₂\n[PROOFSTEP]\nsimp only [Tendsto, le_inf_iff, iff_self_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nx : Filter α\ny : ι → Filter β\n⊢ Tendsto f x (⨅ (i : ι), y i) ↔ ∀ (i : ι), Tendsto f x (y i)\n[PROOFSTEP]\nsimp only [Tendsto, iff_self_iff, le_iInf_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nx₁ x₂ : Filter α\ny : Filter β\n⊢ Tendsto f (x₁ ⊔ x₂) y ↔ Tendsto f x₁ y ∧ Tendsto f x₂ y\n[PROOFSTEP]\nsimp only [Tendsto, map_sup, sup_le_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nx : ι → Filter α\ny : Filter β\n⊢ Tendsto f (⨆ (i : ι), x i) y ↔ ∀ (i : ι), Tendsto f (x i) y\n[PROOFSTEP]\nsimp only [Tendsto, map_iSup, iSup_le_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\nl : Filter α\ns : Set β\n⊢ Tendsto f l (𝓟 s) ↔ ∀ᶠ (a : α) in l, f a ∈ s\n[PROOFSTEP]\nsimp only [Tendsto, le_principal_iff, mem_map', Filter.Eventually]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\ns : Set α\nt : Set β\n⊢ Tendsto f (𝓟 s) (𝓟 t) ↔ ∀ (a : α), a ∈ s → f a ∈ t\n[PROOFSTEP]\nsimp only [tendsto_principal, eventually_principal]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\na : Filter α\nb : β\n⊢ Tendsto f a (pure b) ↔ ∀ᶠ (x : α) in a, f x = b\n[PROOFSTEP]\nsimp only [Tendsto, le_pure_iff, mem_map', mem_singleton_iff, Filter.Eventually]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nf : α → β\ns : Set β\nl : Filter α\nt : Set β\n⊢ t ∈ map f (l ⊓ 𝓟 (f ⁻¹' s)) ↔ t ∈ map f l ⊓ 𝓟 s\n[PROOFSTEP]\nsimp only [mem_map', mem_inf_principal, mem_setOf_eq, mem_preimage]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nl₁ : Filter α\nl₂ : Filter β\nf g : α → β\np : α → Prop\ninst✝ : (x : α) → Decidable (p x)\nh₀ : Tendsto f (l₁ ⊓ 𝓟 {x | p x}) l₂\nh₁ : Tendsto g (l₁ ⊓ 𝓟 {x | ¬p x}) l₂\n⊢ Tendsto (fun x => if p x then f x else g x) l₁ l₂\n[PROOFSTEP]\nsimp only [tendsto_def, mem_inf_principal] at *\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nl₁ : Filter α\nl₂ : Filter β\nf g : α → β\np : α → Prop\ninst✝ : (x : α) → Decidable (p x)\nh₀ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁\nh₁ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁\n⊢ ∀ (s : Set β), s ∈ l₂ → (fun x => if p x then f x else g x) ⁻¹' s ∈ l₁\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nl₁ : Filter α\nl₂ : Filter β\nf g : α → β\np : α → Prop\ninst✝ : (x : α) → Decidable (p x)\nh₀ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁\nh₁ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁\ns : Set β\nhs : s ∈ l₂\n⊢ (fun x => if p x then f x else g x) ⁻¹' s ∈ l₁\n[PROOFSTEP]\nfilter_upwards [h₀ s hs, h₁ s hs] with x hp₀ hp₁\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nl₁ : Filter α\nl₂ : Filter β\nf g : α → β\np : α → Prop\ninst✝ : (x : α) → Decidable (p x)\nh₀ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁\nh₁ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁\ns : Set β\nhs : s ∈ l₂\nx : α\nhp₀ : p x → x ∈ f ⁻¹' s\nhp₁ : ¬p x → x ∈ g ⁻¹' s\n⊢ x ∈ (fun x => if p x then f x else g x) ⁻¹' s\n[PROOFSTEP]\nrw [mem_preimage]\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nl₁ : Filter α\nl₂ : Filter β\nf g : α → β\np : α → Prop\ninst✝ : (x : α) → Decidable (p x)\nh₀ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁\nh₁ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁\ns : Set β\nhs : s ∈ l₂\nx : α\nhp₀ : p x → x ∈ f ⁻¹' s\nhp₁ : ¬p x → x ∈ g ⁻¹' s\n⊢ (if p x then f x else g x) ∈ s\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nl₁ : Filter α\nl₂ : Filter β\nf g : α → β\np : α → Prop\ninst✝ : (x : α) → Decidable (p x)\nh₀ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁\nh₁ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁\ns : Set β\nhs : s ∈ l₂\nx : α\nhp₀ : p x → x ∈ f ⁻¹' s\nhp₁ : ¬p x → x ∈ g ⁻¹' s\nh : p x\n⊢ f x ∈ s\ncase neg\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nι : Sort x\nl₁ : Filter α\nl₂ : Filter β\nf g : α → β\np : α → Prop\ninst✝ : (x : α) → Decidable (p x)\nh₀ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁\nh₁ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁\ns : Set β\nhs : s ∈ l₂\nx : α\nhp₀ : p x → x ∈ f ⁻¹' s\nhp₁ : ¬p x → x ∈ g ⁻¹' s\nh : ¬p x\n⊢ g x ∈ s\n[PROOFSTEP]\nexacts [hp₀ h, hp₁ h]\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.Basic", "llama_tokens": 72930, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.640635854839898, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.374836778090798}}
{"text": "[GOAL]\nα : Sort u_1\np : α → Prop\nx✝¹ : ∃! a, p a\na : α\nha : (fun a => p a) a\nhe : ∀ (y : α), (fun a => p a) y → y = a\nx✝ : Subtype p\nb : α\nhb : p b\n⊢ { val := b, property := hb } = default\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_val\nα : Sort u_1\np : α → Prop\nx✝¹ : ∃! a, p a\na : α\nha : (fun a => p a) a\nhe : ∀ (y : α), (fun a => p a) y → y = a\nx✝ : Subtype p\nb : α\nhb : p b\n⊢ b = a\n[PROOFSTEP]\nexact he b hb\n[GOAL]\nn : ℕ\n⊢ 0 < 1 + n\n[PROOFSTEP]\nrw [Nat.add_comm]\n[GOAL]\nn : ℕ\n⊢ 0 < n + 1\n[PROOFSTEP]\nexact Nat.zero_lt_succ _\n[GOAL]\nα : Sort u_1\ninst✝ : Unique α\np : α → Prop\nh : p default\nx : α\n⊢ p x\n[PROOFSTEP]\nrwa [Unique.eq_default x]\n[GOAL]\nα : Sort u_1\nx : α\nh : ∀ (a : α), a = default\ny : α\nuniq✝ : ∀ (a : α), a = default\n⊢ { toInhabited := { default := x }, uniq := h } = { toInhabited := { default := y }, uniq := uniq✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_toInhabited.e_default\nα : Sort u_1\nx : α\nh : ∀ (a : α), a = default\ny : α\nuniq✝ : ∀ (a : α), a = default\n⊢ x = y\n[PROOFSTEP]\nrw [h x, h y]\n[GOAL]\nα : Sort u\nx✝ : Nonempty (Unique α)\nu : Unique α\n⊢ Subsingleton α ∧ Nonempty α\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Sort u\nx✝ : Nonempty (Unique α)\nu : Unique α\n⊢ Subsingleton α\n[PROOFSTEP]\nexact inferInstance\n[GOAL]\ncase right\nα : Sort u\nx✝ : Nonempty (Unique α)\nu : Unique α\n⊢ Nonempty α\n[PROOFSTEP]\nexact inferInstance\n[GOAL]\nα : Sort u\nx✝ : Subsingleton α ∧ Nonempty α\nhs : Subsingleton α\nhn : Nonempty α\n⊢ Unique α\n[PROOFSTEP]\ninhabit α\n[GOAL]\nα : Sort u\nx✝ : Subsingleton α ∧ Nonempty α\nhs : Subsingleton α\nhn : Nonempty α\ninhabited_h : Inhabited α\n⊢ Unique α\n[PROOFSTEP]\nexact Unique.mk' α\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\ninst✝ : Unique α\nf : α → β\n⊢ f = Function.const α (f default)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Sort u_1\nβ : Sort u_2\ninst✝ : Unique α\nf : α → β\nx : α\n⊢ f x = Function.const α (f default) x\n[PROOFSTEP]\nrw [Subsingleton.elim x default]\n[GOAL]\ncase h\nα : Sort u_1\nβ : Sort u_2\ninst✝ : Unique α\nf : α → β\nx : α\n⊢ f default = Function.const α (f default) default\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u_1\ninst✝ : Unique α\nβ : α → Sort v\nf : (a : α) → β a\ni x✝¹ : α\nx✝ : HEq i x✝¹\n⊢ HEq (f i) (Function.const α (f default) x✝¹)\n[PROOFSTEP]\nrw [Subsingleton.elim i default]\n[GOAL]\nα : Sort u_1\ninst✝ : Unique α\nβ : α → Sort v\nf : (a : α) → β a\ni x✝¹ : α\nx✝ : HEq i x✝¹\n⊢ HEq (f default) (Function.const α (f default) x✝¹)\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Sort u_1\nB : Sort u_2\ninst✝¹ : Unique A\ninst✝ : Unique B\nf : A → B\n⊢ Function.Bijective f\n[PROOFSTEP]\nrw [Function.bijective_iff_has_inverse]\n[GOAL]\nA : Sort u_1\nB : Sort u_2\ninst✝¹ : Unique A\ninst✝ : Unique B\nf : A → B\n⊢ ∃ g, Function.LeftInverse g f ∧ Function.RightInverse g f\n[PROOFSTEP]\nrefine' ⟨default, _, _⟩\n[GOAL]\ncase refine'_1\nA : Sort u_1\nB : Sort u_2\ninst✝¹ : Unique A\ninst✝ : Unique B\nf : A → B\n⊢ Function.LeftInverse default f\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_2\nA : Sort u_1\nB : Sort u_2\ninst✝¹ : Unique A\ninst✝ : Unique B\nf : A → B\n⊢ Function.RightInverse default f\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_1\nA : Sort u_1\nB : Sort u_2\ninst✝¹ : Unique A\ninst✝ : Unique B\nf : A → B\nx : A\n⊢ default (f x) = x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nA : Sort u_1\nB : Sort u_2\ninst✝¹ : Unique A\ninst✝ : Unique B\nf : A → B\nx : B\n⊢ f (default x) = x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Sort u\ny : α\nx✝ : { x // x = y }\nx : α\nhx : x = y\n⊢ { val := x, property := hx } = default\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Sort u\ny : α\nx✝ : { x // y = x }\nx : α\nhx : y = x\n⊢ { val := x, property := hx } = default\n[PROOFSTEP]\nsubst hx\n[GOAL]\nα : Sort u\ny : α\nx✝ : { x // y = x }\n⊢ { val := y, property := (_ : y = y) } = default\n[PROOFSTEP]\ncongr\n", "meta": {"mathlib_filename": "Mathlib.Logic.Unique", "llama_tokens": 1833, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646010190476, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.37469151253082894}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α ⊕ β ↪ γ\n⊢ Disjoint (Set.range ↑(Function.Embedding.trans inl f, Function.Embedding.trans inr f).fst)\n    (Set.range ↑(Function.Embedding.trans inl f, Function.Embedding.trans inr f).snd)\n[PROOFSTEP]\nrw [Set.disjoint_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α ⊕ β ↪ γ\n⊢ ∀ ⦃a : γ⦄,\n    a ∈ Set.range ↑(Function.Embedding.trans inl f, Function.Embedding.trans inr f).fst →\n      ¬a ∈ Set.range ↑(Function.Embedding.trans inl f, Function.Embedding.trans inr f).snd\n[PROOFSTEP]\nrintro _ ⟨a, h⟩ ⟨b, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α ⊕ β ↪ γ\na : α\nb : β\nh :\n  ↑(Function.Embedding.trans inl f, Function.Embedding.trans inr f).fst a =\n    ↑(Function.Embedding.trans inl f, Function.Embedding.trans inr f).snd b\n⊢ False\n[PROOFSTEP]\nsimp only [trans_apply, inl_apply, inr_apply] at h \n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α ⊕ β ↪ γ\na : α\nb : β\nh : ↑(Function.Embedding.trans inl f) a = ↑(Function.Embedding.trans inr f) b\n⊢ False\n[PROOFSTEP]\nhave : Sum.inl a = Sum.inr b := f.injective h\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α ⊕ β ↪ γ\na : α\nb : β\nh : ↑(Function.Embedding.trans inl f) a = ↑(Function.Embedding.trans inr f) b\nthis : Sum.inl a = Sum.inr b\n⊢ False\n[PROOFSTEP]\nsimp only at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\ndisj : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\n⊢ Function.Injective fun x =>\n    match x with\n    | Sum.inl a => ↑f a\n    | Sum.inr b => ↑g b\n[PROOFSTEP]\nrintro (a₁ | b₁) (a₂ | b₂) f_eq\n[GOAL]\ncase inl.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\ndisj : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\na₁ a₂ : α\nf_eq :\n  (fun x =>\n        match x with\n        | Sum.inl a => ↑f a\n        | Sum.inr b => ↑g b)\n      (Sum.inl a₁) =\n    (fun x =>\n        match x with\n        | Sum.inl a => ↑f a\n        | Sum.inr b => ↑g b)\n      (Sum.inl a₂)\n⊢ Sum.inl a₁ = Sum.inl a₂\n[PROOFSTEP]\nsimp only [Equiv.coe_fn_symm_mk, Sum.elim_inl, Sum.elim_inr] at f_eq \n[GOAL]\ncase inl.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\ndisj : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\na₁ : α\nb₂ : β\nf_eq :\n  (fun x =>\n        match x with\n        | Sum.inl a => ↑f a\n        | Sum.inr b => ↑g b)\n      (Sum.inl a₁) =\n    (fun x =>\n        match x with\n        | Sum.inl a => ↑f a\n        | Sum.inr b => ↑g b)\n      (Sum.inr b₂)\n⊢ Sum.inl a₁ = Sum.inr b₂\n[PROOFSTEP]\nsimp only [Equiv.coe_fn_symm_mk, Sum.elim_inl, Sum.elim_inr] at f_eq \n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\ndisj : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\nb₁ : β\na₂ : α\nf_eq :\n  (fun x =>\n        match x with\n        | Sum.inl a => ↑f a\n        | Sum.inr b => ↑g b)\n      (Sum.inr b₁) =\n    (fun x =>\n        match x with\n        | Sum.inl a => ↑f a\n        | Sum.inr b => ↑g b)\n      (Sum.inl a₂)\n⊢ Sum.inr b₁ = Sum.inl a₂\n[PROOFSTEP]\nsimp only [Equiv.coe_fn_symm_mk, Sum.elim_inl, Sum.elim_inr] at f_eq \n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\ndisj : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\nb₁ b₂ : β\nf_eq :\n  (fun x =>\n        match x with\n        | Sum.inl a => ↑f a\n        | Sum.inr b => ↑g b)\n      (Sum.inr b₁) =\n    (fun x =>\n        match x with\n        | Sum.inl a => ↑f a\n        | Sum.inr b => ↑g b)\n      (Sum.inr b₂)\n⊢ Sum.inr b₁ = Sum.inr b₂\n[PROOFSTEP]\nsimp only [Equiv.coe_fn_symm_mk, Sum.elim_inl, Sum.elim_inr] at f_eq \n[GOAL]\ncase inl.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\ndisj : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\na₁ a₂ : α\nf_eq : ↑f a₁ = ↑f a₂\n⊢ Sum.inl a₁ = Sum.inl a₂\n[PROOFSTEP]\nrw [f.injective f_eq]\n[GOAL]\ncase inl.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\ndisj : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\na₁ : α\nb₂ : β\nf_eq : ↑f a₁ = ↑g b₂\n⊢ Sum.inl a₁ = Sum.inr b₂\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase inl.inr.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\ndisj : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\na₁ : α\nb₂ : β\nf_eq : ↑f a₁ = ↑g b₂\n⊢ False\n[PROOFSTEP]\nrefine disj.le_bot ⟨⟨a₁, f_eq⟩, ⟨b₂, by simp [f_eq]⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\ndisj : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\na₁ : α\nb₂ : β\nf_eq : ↑f a₁ = ↑g b₂\n⊢ ↑(f, g).snd b₂ = ↑g b₂\n[PROOFSTEP]\nsimp [f_eq]\n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\ndisj : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\nb₁ : β\na₂ : α\nf_eq : ↑g b₁ = ↑f a₂\n⊢ Sum.inr b₁ = Sum.inl a₂\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase inr.inl.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\ndisj : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\nb₁ : β\na₂ : α\nf_eq : ↑g b₁ = ↑f a₂\n⊢ False\n[PROOFSTEP]\nexact disj.le_bot ⟨⟨a₂, rfl⟩, ⟨b₁, f_eq⟩⟩\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\ndisj : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\nb₁ b₂ : β\nf_eq : ↑g b₁ = ↑g b₂\n⊢ Sum.inr b₁ = Sum.inr b₂\n[PROOFSTEP]\nrw [g.injective f_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α ⊕ β ↪ γ\n⊢ (fun x =>\n        match x with\n        | { val := (f, g), property := disj } =>\n          {\n            toFun := fun x =>\n              match x with\n              | Sum.inl a => ↑f a\n              | Sum.inr b => ↑g b,\n            inj' :=\n              (_ :\n                ∀ ⦃a₁ a₂ : α ⊕ β⦄,\n                  (fun x =>\n                          match x with\n                          | Sum.inl a => ↑f a\n                          | Sum.inr b => ↑g b)\n                        a₁ =\n                      (fun x =>\n                          match x with\n                          | Sum.inl a => ↑f a\n                          | Sum.inr b => ↑g b)\n                        a₂ →\n                    a₁ = a₂) })\n      ((fun f =>\n          { val := (Function.Embedding.trans inl f, Function.Embedding.trans inr f),\n            property :=\n              (_ :\n                Disjoint (Set.range ↑(Function.Embedding.trans inl f, Function.Embedding.trans inr f).fst)\n                  (Set.range ↑(Function.Embedding.trans inl f, Function.Embedding.trans inr f).snd)) })\n        f) =\n    f\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α ⊕ β ↪ γ\n⊢ {\n      toFun := fun x =>\n        match x with\n        | Sum.inl a => ↑(Function.Embedding.trans inl f) a\n        | Sum.inr b => ↑(Function.Embedding.trans inr f) b,\n      inj' :=\n        (_ :\n          ∀ ⦃a₁ a₂ : α ⊕ β⦄,\n            ((match a₁ with\n                | Sum.inl a => ↑(Function.Embedding.trans inl f) a\n                | Sum.inr b => ↑(Function.Embedding.trans inr f) b) =\n                match a₂ with\n                | Sum.inl a => ↑(Function.Embedding.trans inl f) a\n                | Sum.inr b => ↑(Function.Embedding.trans inr f) b) →\n              a₁ = a₂) } =\n    f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α ⊕ β ↪ γ\nx : α ⊕ β\n⊢ ↑{\n          toFun := fun x =>\n            match x with\n            | Sum.inl a => ↑(Function.Embedding.trans inl f) a\n            | Sum.inr b => ↑(Function.Embedding.trans inr f) b,\n          inj' :=\n            (_ :\n              ∀ ⦃a₁ a₂ : α ⊕ β⦄,\n                ((match a₁ with\n                    | Sum.inl a => ↑(Function.Embedding.trans inl f) a\n                    | Sum.inr b => ↑(Function.Embedding.trans inr f) b) =\n                    match a₂ with\n                    | Sum.inl a => ↑(Function.Embedding.trans inl f) a\n                    | Sum.inr b => ↑(Function.Embedding.trans inr f) b) →\n                  a₁ = a₂) }\n      x =\n    ↑f x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase h.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α ⊕ β ↪ γ\nval✝ : α\n⊢ ↑{\n          toFun := fun x =>\n            match x with\n            | Sum.inl a => ↑(Function.Embedding.trans inl f) a\n            | Sum.inr b => ↑(Function.Embedding.trans inr f) b,\n          inj' :=\n            (_ :\n              ∀ ⦃a₁ a₂ : α ⊕ β⦄,\n                ((match a₁ with\n                    | Sum.inl a => ↑(Function.Embedding.trans inl f) a\n                    | Sum.inr b => ↑(Function.Embedding.trans inr f) b) =\n                    match a₂ with\n                    | Sum.inl a => ↑(Function.Embedding.trans inl f) a\n                    | Sum.inr b => ↑(Function.Embedding.trans inr f) b) →\n                  a₁ = a₂) }\n      (Sum.inl val✝) =\n    ↑f (Sum.inl val✝)\n[PROOFSTEP]\nsimp!\n[GOAL]\ncase h.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α ⊕ β ↪ γ\nval✝ : β\n⊢ ↑{\n          toFun := fun x =>\n            match x with\n            | Sum.inl a => ↑(Function.Embedding.trans inl f) a\n            | Sum.inr b => ↑(Function.Embedding.trans inr f) b,\n          inj' :=\n            (_ :\n              ∀ ⦃a₁ a₂ : α ⊕ β⦄,\n                ((match a₁ with\n                    | Sum.inl a => ↑(Function.Embedding.trans inl f) a\n                    | Sum.inr b => ↑(Function.Embedding.trans inr f) b) =\n                    match a₂ with\n                    | Sum.inl a => ↑(Function.Embedding.trans inl f) a\n                    | Sum.inr b => ↑(Function.Embedding.trans inr f) b) →\n                  a₁ = a₂) }\n      (Sum.inr val✝) =\n    ↑f (Sum.inr val✝)\n[PROOFSTEP]\nsimp!\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\nproperty✝ : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\n⊢ (fun f =>\n        { val := (Function.Embedding.trans inl f, Function.Embedding.trans inr f),\n          property :=\n            (_ :\n              Disjoint (Set.range ↑(Function.Embedding.trans inl f, Function.Embedding.trans inr f).fst)\n                (Set.range ↑(Function.Embedding.trans inl f, Function.Embedding.trans inr f).snd)) })\n      ((fun x =>\n          match x with\n          | { val := (f, g), property := disj } =>\n            {\n              toFun := fun x =>\n                match x with\n                | Sum.inl a => ↑f a\n                | Sum.inr b => ↑g b,\n              inj' :=\n                (_ :\n                  ∀ ⦃a₁ a₂ : α ⊕ β⦄,\n                    (fun x =>\n                            match x with\n                            | Sum.inl a => ↑f a\n                            | Sum.inr b => ↑g b)\n                          a₁ =\n                        (fun x =>\n                            match x with\n                            | Sum.inl a => ↑f a\n                            | Sum.inr b => ↑g b)\n                          a₂ →\n                      a₁ = a₂) })\n        { val := (f, g), property := property✝ }) =\n    { val := (f, g), property := property✝ }\n[PROOFSTEP]\nsimp only [Prod.mk.inj_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nx✝ : { f // Disjoint (Set.range ↑f.fst) (Set.range ↑f.snd) }\nf : α ↪ γ\ng : β ↪ γ\nproperty✝ : Disjoint (Set.range ↑(f, g).fst) (Set.range ↑(f, g).snd)\n⊢ {\n      val :=\n        (Function.Embedding.trans inl\n            {\n              toFun := fun x =>\n                match x with\n                | Sum.inl a => ↑f a\n                | Sum.inr b => ↑g b,\n              inj' :=\n                (_ :\n                  ∀ ⦃a₁ a₂ : α ⊕ β⦄,\n                    (fun x =>\n                            match x with\n                            | Sum.inl a => ↑f a\n                            | Sum.inr b => ↑g b)\n                          a₁ =\n                        (fun x =>\n                            match x with\n                            | Sum.inl a => ↑f a\n                            | Sum.inr b => ↑g b)\n                          a₂ →\n                      a₁ = a₂) },\n          Function.Embedding.trans inr\n            {\n              toFun := fun x =>\n                match x with\n                | Sum.inl a => ↑f a\n                | Sum.inr b => ↑g b,\n              inj' :=\n                (_ :\n                  ∀ ⦃a₁ a₂ : α ⊕ β⦄,\n                    (fun x =>\n                            match x with\n                            | Sum.inl a => ↑f a\n                            | Sum.inr b => ↑g b)\n                          a₁ =\n                        (fun x =>\n                            match x with\n                            | Sum.inl a => ↑f a\n                            | Sum.inr b => ↑g b)\n                          a₂ →\n                      a₁ = a₂) }),\n      property :=\n        (_ :\n          Disjoint\n            (Set.range\n              ↑(Function.Embedding.trans inl\n                      ((fun x =>\n                          match x with\n                          | { val := (f, g), property := disj } =>\n                            {\n                              toFun := fun x =>\n                                match x with\n                                | Sum.inl a => ↑f a\n                                | Sum.inr b => ↑g b,\n                              inj' :=\n                                (_ :\n                                  ∀ ⦃a₁ a₂ : α ⊕ β⦄,\n                                    (fun x =>\n                                            match x with\n                                            | Sum.inl a => ↑f a\n                                            | Sum.inr b => ↑g b)\n                                          a₁ =\n                                        (fun x =>\n                                            match x with\n                                            | Sum.inl a => ↑f a\n                                            | Sum.inr b => ↑g b)\n                                          a₂ →\n                                      a₁ = a₂) })\n                        { val := (f, g), property := property✝ }),\n                    Function.Embedding.trans inr\n                      ((fun x =>\n                          match x with\n                          | { val := (f, g), property := disj } =>\n                            {\n                              toFun := fun x =>\n                                match x with\n                                | Sum.inl a => ↑f a\n                                | Sum.inr b => ↑g b,\n                              inj' :=\n                                (_ :\n                                  ∀ ⦃a₁ a₂ : α ⊕ β⦄,\n                                    (fun x =>\n                                            match x with\n                                            | Sum.inl a => ↑f a\n                                            | Sum.inr b => ↑g b)\n                                          a₁ =\n                                        (fun x =>\n                                            match x with\n                                            | Sum.inl a => ↑f a\n                                            | Sum.inr b => ↑g b)\n                                          a₂ →\n                                      a₁ = a₂) })\n                        { val := (f, g), property := property✝ })).fst)\n            (Set.range\n              ↑(Function.Embedding.trans inl\n                      ((fun x =>\n                          match x with\n                          | { val := (f, g), property := disj } =>\n                            {\n                              toFun := fun x =>\n                                match x with\n                                | Sum.inl a => ↑f a\n                                | Sum.inr b => ↑g b,\n                              inj' :=\n                                (_ :\n                                  ∀ ⦃a₁ a₂ : α ⊕ β⦄,\n                                    (fun x =>\n                                            match x with\n                                            | Sum.inl a => ↑f a\n                                            | Sum.inr b => ↑g b)\n                                          a₁ =\n                                        (fun x =>\n                                            match x with\n                                            | Sum.inl a => ↑f a\n                                            | Sum.inr b => ↑g b)\n                                          a₂ →\n                                      a₁ = a₂) })\n                        { val := (f, g), property := property✝ }),\n                    Function.Embedding.trans inr\n                      ((fun x =>\n                          match x with\n                          | { val := (f, g), property := disj } =>\n                            {\n                              toFun := fun x =>\n                                match x with\n                                | Sum.inl a => ↑f a\n                                | Sum.inr b => ↑g b,\n                              inj' :=\n                                (_ :\n                                  ∀ ⦃a₁ a₂ : α ⊕ β⦄,\n                                    (fun x =>\n                                            match x with\n                                            | Sum.inl a => ↑f a\n                                            | Sum.inr b => ↑g b)\n                                          a₁ =\n                                        (fun x =>\n                                            match x with\n                                            | Sum.inl a => ↑f a\n                                            | Sum.inr b => ↑g b)\n                                          a₂ →\n                                      a₁ = a₂) })\n                        { val := (f, g), property := property✝ })).snd)) } =\n    { val := (f, g), property := property✝ }\n[PROOFSTEP]\nconstructor\n[GOAL]\nα : Type u_1\nβ : Type u_2\nbs : Set β\nx : { f // ∀ (a : α), ↑f a ∈ bs }\n⊢ (fun f => { val := Function.Embedding.trans f (subtype fun x => x ∈ bs), property := (_ : ∀ (a : α), ↑(↑f a) ∈ bs) })\n      ((fun f => Function.Embedding.codRestrict bs ↑f (_ : ∀ (a : α), ↑↑f a ∈ bs)) x) =\n    x\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nbs : Set β\nx : { f // ∀ (a : α), ↑f a ∈ bs }\nx✝ : α\n⊢ ↑↑((fun f =>\n              { val := Function.Embedding.trans f (subtype fun x => x ∈ bs),\n                property := (_ : ∀ (a : α), ↑(↑f a) ∈ bs) })\n            ((fun f => Function.Embedding.codRestrict bs ↑f (_ : ∀ (a : α), ↑↑f a ∈ bs)) x))\n      x✝ =\n    ↑↑x x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nbs : Set β\nx : α ↪ ↑bs\n⊢ (fun f => Function.Embedding.codRestrict bs ↑f (_ : ∀ (a : α), ↑↑f a ∈ bs))\n      ((fun f =>\n          { val := Function.Embedding.trans f (subtype fun x => x ∈ bs), property := (_ : ∀ (a : α), ↑(↑f a) ∈ bs) })\n        x) =\n    x\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nα : Type u_1\nβ : Type u_2\nbs : Set β\nx : α ↪ ↑bs\nx✝ : α\n⊢ ↑(↑((fun f => Function.Embedding.codRestrict bs ↑f (_ : ∀ (a : α), ↑↑f a ∈ bs))\n            ((fun f =>\n                { val := Function.Embedding.trans f (subtype fun x => x ∈ bs),\n                  property := (_ : ∀ (a : α), ↑(↑f a) ∈ bs) })\n              x))\n        x✝) =\n    ↑(↑x x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α ↪ γ\n⊢ (fun b => Disjoint (Set.range ↑a) (Set.range ↑b)) = fun f => ∀ (a_1 : β), ↑f a_1 ∈ (Set.range ↑a)ᶜ\n[PROOFSTEP]\next f\n[GOAL]\ncase h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α ↪ γ\nf : β ↪ γ\n⊢ Disjoint (Set.range ↑a) (Set.range ↑f) ↔ ∀ (a_1 : β), ↑f a_1 ∈ (Set.range ↑a)ᶜ\n[PROOFSTEP]\nrw [← Set.range_subset_iff, Set.subset_compl_iff_disjoint_right, disjoint_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Unique α\nx✝ : α ↪ β\n⊢ (fun x =>\n        { toFun := fun x_1 => x, inj' := (_ : ∀ (x_1 x_2 : α), (fun x_3 => x) x_1 = (fun x_3 => x) x_2 → x_1 = x_2) })\n      ((fun f => ↑f default) x✝) =\n    x✝\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝ : Unique α\nx✝ : α ↪ β\nx : α\n⊢ ↑((fun x =>\n            { toFun := fun x_1 => x,\n              inj' := (_ : ∀ (x_1 x_2 : α), (fun x_3 => x) x_1 = (fun x_3 => x) x_2 → x_1 = x_2) })\n          ((fun f => ↑f default) x✝))\n      x =\n    ↑x✝ x\n[PROOFSTEP]\nsimp_rw [Function.Embedding.coeFn_mk]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝ : Unique α\nx✝ : α ↪ β\nx : α\n⊢ ↑x✝ default = ↑x✝ x\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.h.e_6.h\nα : Type u_1\nβ : Type u_2\ninst✝ : Unique α\nx✝ : α ↪ β\nx : α\n⊢ default = x\n[PROOFSTEP]\nexact Subsingleton.elim _ x\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Unique α\nx✝ : β\n⊢ (fun f => ↑f default)\n      ((fun x =>\n          { toFun := fun x_1 => x, inj' := (_ : ∀ (x_1 x_2 : α), (fun x_3 => x) x_1 = (fun x_3 => x) x_2 → x_1 = x_2) })\n        x✝) =\n    x✝\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Logic.Equiv.Embedding", "llama_tokens": 8473, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646010190476, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.37469151253082894}}
{"text": "[GOAL]\nz✝ y x✝ : ℝ\nx z : ℂ\nhz : ‖z‖ ≤ 1\n⊢ ‖exp (x + z) - exp x - z * exp x‖ = ‖exp x * (exp z - 1 - z)‖\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nz✝ y x✝ : ℝ\nx z : ℂ\nhz : ‖z‖ ≤ 1\n⊢ exp (x + z) - exp x - z * exp x = exp x * (exp z - 1 - z)\n[PROOFSTEP]\nrw [exp_add]\n[GOAL]\ncase e_a\nz✝ y x✝ : ℝ\nx z : ℂ\nhz : ‖z‖ ≤ 1\n⊢ exp x * exp z - exp x - z * exp x = exp x * (exp z - 1 - z)\n[PROOFSTEP]\nring\n[GOAL]\nz y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\n⊢ ‖exp y - exp x‖ ≤ (1 + r) * ‖exp x‖ * ‖y - x‖\n[PROOFSTEP]\nhave hy_eq : y = x + (y - x) := by abel\n[GOAL]\nz y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\n⊢ y = x + (y - x)\n[PROOFSTEP]\nabel\n[GOAL]\nz y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\n⊢ y = x + (y - x)\n[PROOFSTEP]\nabel\n[GOAL]\nz y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\nhy_eq : y = x + (y - x)\n⊢ ‖exp y - exp x‖ ≤ (1 + r) * ‖exp x‖ * ‖y - x‖\n[PROOFSTEP]\nhave hyx_sq_le : ‖y - x‖ ^ 2 ≤ r * ‖y - x‖ := by\n  rw [pow_two]\n  exact mul_le_mul hyx.le le_rfl (norm_nonneg _) hr_nonneg\n[GOAL]\nz y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\nhy_eq : y = x + (y - x)\n⊢ ‖y - x‖ ^ 2 ≤ r * ‖y - x‖\n[PROOFSTEP]\nrw [pow_two]\n[GOAL]\nz y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\nhy_eq : y = x + (y - x)\n⊢ ‖y - x‖ * ‖y - x‖ ≤ r * ‖y - x‖\n[PROOFSTEP]\nexact mul_le_mul hyx.le le_rfl (norm_nonneg _) hr_nonneg\n[GOAL]\nz y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\nhy_eq : y = x + (y - x)\nhyx_sq_le : ‖y - x‖ ^ 2 ≤ r * ‖y - x‖\n⊢ ‖exp y - exp x‖ ≤ (1 + r) * ‖exp x‖ * ‖y - x‖\n[PROOFSTEP]\nhave h_sq : ∀ z, ‖z‖ ≤ 1 → ‖exp (x + z) - exp x‖ ≤ ‖z‖ * ‖exp x‖ + ‖exp x‖ * ‖z‖ ^ 2 :=\n  by\n  intro z hz\n  have : ‖exp (x + z) - exp x - z • exp x‖ ≤ ‖exp x‖ * ‖z‖ ^ 2 := exp_bound_sq x z hz\n  rw [← sub_le_iff_le_add', ← norm_smul z]\n  exact (norm_sub_norm_le _ _).trans this\n[GOAL]\nz y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\nhy_eq : y = x + (y - x)\nhyx_sq_le : ‖y - x‖ ^ 2 ≤ r * ‖y - x‖\n⊢ ∀ (z : ℂ), ‖z‖ ≤ 1 → ‖exp (x + z) - exp x‖ ≤ ‖z‖ * ‖exp x‖ + ‖exp x‖ * ‖z‖ ^ 2\n[PROOFSTEP]\nintro z hz\n[GOAL]\nz✝ y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\nhy_eq : y = x + (y - x)\nhyx_sq_le : ‖y - x‖ ^ 2 ≤ r * ‖y - x‖\nz : ℂ\nhz : ‖z‖ ≤ 1\n⊢ ‖exp (x + z) - exp x‖ ≤ ‖z‖ * ‖exp x‖ + ‖exp x‖ * ‖z‖ ^ 2\n[PROOFSTEP]\nhave : ‖exp (x + z) - exp x - z • exp x‖ ≤ ‖exp x‖ * ‖z‖ ^ 2 := exp_bound_sq x z hz\n[GOAL]\nz✝ y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\nhy_eq : y = x + (y - x)\nhyx_sq_le : ‖y - x‖ ^ 2 ≤ r * ‖y - x‖\nz : ℂ\nhz : ‖z‖ ≤ 1\nthis : ‖exp (x + z) - exp x - z • exp x‖ ≤ ‖exp x‖ * ‖z‖ ^ 2\n⊢ ‖exp (x + z) - exp x‖ ≤ ‖z‖ * ‖exp x‖ + ‖exp x‖ * ‖z‖ ^ 2\n[PROOFSTEP]\nrw [← sub_le_iff_le_add', ← norm_smul z]\n[GOAL]\nz✝ y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\nhy_eq : y = x + (y - x)\nhyx_sq_le : ‖y - x‖ ^ 2 ≤ r * ‖y - x‖\nz : ℂ\nhz : ‖z‖ ≤ 1\nthis : ‖exp (x + z) - exp x - z • exp x‖ ≤ ‖exp x‖ * ‖z‖ ^ 2\n⊢ ‖exp (x + z) - exp x‖ - ‖z • exp x‖ ≤ ‖exp x‖ * ‖z‖ ^ 2\n[PROOFSTEP]\nexact (norm_sub_norm_le _ _).trans this\n[GOAL]\nz y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\nhy_eq : y = x + (y - x)\nhyx_sq_le : ‖y - x‖ ^ 2 ≤ r * ‖y - x‖\nh_sq : ∀ (z : ℂ), ‖z‖ ≤ 1 → ‖exp (x + z) - exp x‖ ≤ ‖z‖ * ‖exp x‖ + ‖exp x‖ * ‖z‖ ^ 2\n⊢ ‖exp y - exp x‖ ≤ (1 + r) * ‖exp x‖ * ‖y - x‖\n[PROOFSTEP]\ncalc\n  ‖exp y - exp x‖ = ‖exp (x + (y - x)) - exp x‖ := by nth_rw 1 [hy_eq]\n  _ ≤ ‖y - x‖ * ‖exp x‖ + ‖exp x‖ * ‖y - x‖ ^ 2 := (h_sq (y - x) (hyx.le.trans hr_le))\n  _ ≤ ‖y - x‖ * ‖exp x‖ + ‖exp x‖ * (r * ‖y - x‖) :=\n    (add_le_add_left (mul_le_mul le_rfl hyx_sq_le (sq_nonneg _) (norm_nonneg _)) _)\n  _ = (1 + r) * ‖exp x‖ * ‖y - x‖ := by ring\n[GOAL]\nz y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\nhy_eq : y = x + (y - x)\nhyx_sq_le : ‖y - x‖ ^ 2 ≤ r * ‖y - x‖\nh_sq : ∀ (z : ℂ), ‖z‖ ≤ 1 → ‖exp (x + z) - exp x‖ ≤ ‖z‖ * ‖exp x‖ + ‖exp x‖ * ‖z‖ ^ 2\n⊢ ‖exp y - exp x‖ = ‖exp (x + (y - x)) - exp x‖\n[PROOFSTEP]\nnth_rw 1 [hy_eq]\n[GOAL]\nz y✝ x✝ r : ℝ\nhr_nonneg : 0 ≤ r\nhr_le : r ≤ 1\nx y : ℂ\nhyx : ‖y - x‖ < r\nhy_eq : y = x + (y - x)\nhyx_sq_le : ‖y - x‖ ^ 2 ≤ r * ‖y - x‖\nh_sq : ∀ (z : ℂ), ‖z‖ ≤ 1 → ‖exp (x + z) - exp x‖ ≤ ‖z‖ * ‖exp x‖ + ‖exp x‖ * ‖z‖ ^ 2\n⊢ ‖y - x‖ * ‖exp x‖ + ‖exp x‖ * (r * ‖y - x‖) = (1 + r) * ‖exp x‖ * ‖y - x‖\n[PROOFSTEP]\nring\n[GOAL]\nz y✝ x✝ : ℝ\nx y : ℂ\n⊢ dist y x < 1 → dist (exp y) (exp x) ≤ 2 * ‖exp x‖ * dist y x\n[PROOFSTEP]\nconvert locally_lipschitz_exp zero_le_one le_rfl x y using 2\n[GOAL]\ncase h'.h.e'_4\nz y✝ x✝ : ℝ\nx y : ℂ\na✝ : ‖y - x‖ < 1\n⊢ 2 * ‖exp x‖ * dist y x = (1 + 1) * ‖exp x‖ * ‖y - x‖\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h'.h.e'_4.e_a.e_a\nz y✝ x✝ : ℝ\nx y : ℂ\na✝ : ‖y - x‖ < 1\n⊢ 2 = 1 + 1\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nx : ℝ\n⊢ exp (x / 2) = sqrt (exp x)\n[PROOFSTEP]\nrw [eq_comm, sqrt_eq_iff_sq_eq, sq, ← exp_add, add_halves]\n[GOAL]\ncase hx\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nx : ℝ\n⊢ 0 ≤ exp x\n[PROOFSTEP]\nexact (exp_pos _).le\n[GOAL]\ncase hy\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nx : ℝ\n⊢ 0 ≤ exp (x / 2)\n[PROOFSTEP]\nexact (exp_pos _).le\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\n⊢ Tendsto exp atTop atTop\n[PROOFSTEP]\nhave A : Tendsto (fun x : ℝ => x + 1) atTop atTop := tendsto_atTop_add_const_right atTop 1 tendsto_id\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nA : Tendsto (fun x => x + 1) atTop atTop\n⊢ Tendsto exp atTop atTop\n[PROOFSTEP]\nhave B : ∀ᶠ x in atTop, x + 1 ≤ exp x := eventually_atTop.2 ⟨0, fun x _ => add_one_le_exp x⟩\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nA : Tendsto (fun x => x + 1) atTop atTop\nB : ∀ᶠ (x : ℝ) in atTop, x + 1 ≤ exp x\n⊢ Tendsto exp atTop atTop\n[PROOFSTEP]\nexact tendsto_atTop_mono' atTop B A\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\n⊢ Tendsto exp (𝓝 0) (𝓝 1)\n[PROOFSTEP]\nconvert continuous_exp.tendsto 0\n[GOAL]\ncase h.e'_5.h.e'_3\nα : Type u_1\nx y z : ℝ\nl : Filter α\n⊢ 1 = exp 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nn : ℕ\n⊢ Tendsto (fun x => exp x / x ^ n) atTop atTop\n[PROOFSTEP]\nrefine' (atTop_basis_Ioi.tendsto_iff (atTop_basis' 1)).2 fun C hC₁ => _\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nn : ℕ\nC : ℝ\nhC₁ : 1 ≤ C\n⊢ ∃ ia, True ∧ ∀ (x : ℝ), x ∈ Set.Ioi ia → exp x / x ^ n ∈ Set.Ici C\n[PROOFSTEP]\nhave hC₀ : 0 < C := zero_lt_one.trans_le hC₁\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nn : ℕ\nC : ℝ\nhC₁ : 1 ≤ C\nhC₀ : 0 < C\n⊢ ∃ ia, True ∧ ∀ (x : ℝ), x ∈ Set.Ioi ia → exp x / x ^ n ∈ Set.Ici C\n[PROOFSTEP]\nhave : 0 < (exp 1 * C)⁻¹ := inv_pos.2 (mul_pos (exp_pos _) hC₀)\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nn : ℕ\nC : ℝ\nhC₁ : 1 ≤ C\nhC₀ : 0 < C\nthis : 0 < (exp 1 * C)⁻¹\n⊢ ∃ ia, True ∧ ∀ (x : ℝ), x ∈ Set.Ioi ia → exp x / x ^ n ∈ Set.Ici C\n[PROOFSTEP]\nobtain ⟨N, hN⟩ : ∃ N : ℕ, ∀ k ≥ N, (↑k : ℝ) ^ n / exp 1 ^ k < (exp 1 * C)⁻¹ :=\n  eventually_atTop.1\n    ((tendsto_pow_const_div_const_pow_of_one_lt n (one_lt_exp_iff.2 zero_lt_one)).eventually (gt_mem_nhds this))\n[GOAL]\ncase intro\nα : Type u_1\nx y z : ℝ\nl : Filter α\nn : ℕ\nC : ℝ\nhC₁ : 1 ≤ C\nhC₀ : 0 < C\nthis : 0 < (exp 1 * C)⁻¹\nN : ℕ\nhN : ∀ (k : ℕ), k ≥ N → ↑k ^ n / exp 1 ^ k < (exp 1 * C)⁻¹\n⊢ ∃ ia, True ∧ ∀ (x : ℝ), x ∈ Set.Ioi ia → exp x / x ^ n ∈ Set.Ici C\n[PROOFSTEP]\nsimp only [← exp_nat_mul, mul_one, div_lt_iff, exp_pos, ← div_eq_inv_mul] at hN \n[GOAL]\ncase intro\nα : Type u_1\nx y z : ℝ\nl : Filter α\nn : ℕ\nC : ℝ\nhC₁ : 1 ≤ C\nhC₀ : 0 < C\nthis : 0 < (exp 1 * C)⁻¹\nN : ℕ\nhN : ∀ (k : ℕ), k ≥ N → ↑k ^ n < exp ↑k / (exp 1 * C)\n⊢ ∃ ia, True ∧ ∀ (x : ℝ), x ∈ Set.Ioi ia → exp x / x ^ n ∈ Set.Ici C\n[PROOFSTEP]\nrefine' ⟨N, trivial, fun x hx => _⟩\n[GOAL]\ncase intro\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nn : ℕ\nC : ℝ\nhC₁ : 1 ≤ C\nhC₀ : 0 < C\nthis : 0 < (exp 1 * C)⁻¹\nN : ℕ\nhN : ∀ (k : ℕ), k ≥ N → ↑k ^ n < exp ↑k / (exp 1 * C)\nx : ℝ\nhx : x ∈ Set.Ioi ↑N\n⊢ exp x / x ^ n ∈ Set.Ici C\n[PROOFSTEP]\nrw [Set.mem_Ioi] at hx \n[GOAL]\ncase intro\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nn : ℕ\nC : ℝ\nhC₁ : 1 ≤ C\nhC₀ : 0 < C\nthis : 0 < (exp 1 * C)⁻¹\nN : ℕ\nhN : ∀ (k : ℕ), k ≥ N → ↑k ^ n < exp ↑k / (exp 1 * C)\nx : ℝ\nhx : ↑N < x\n⊢ exp x / x ^ n ∈ Set.Ici C\n[PROOFSTEP]\nhave hx₀ : 0 < x := (Nat.cast_nonneg N).trans_lt hx\n[GOAL]\ncase intro\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nn : ℕ\nC : ℝ\nhC₁ : 1 ≤ C\nhC₀ : 0 < C\nthis : 0 < (exp 1 * C)⁻¹\nN : ℕ\nhN : ∀ (k : ℕ), k ≥ N → ↑k ^ n < exp ↑k / (exp 1 * C)\nx : ℝ\nhx : ↑N < x\nhx₀ : 0 < x\n⊢ exp x / x ^ n ∈ Set.Ici C\n[PROOFSTEP]\nrw [Set.mem_Ici, le_div_iff (pow_pos hx₀ _), ← le_div_iff' hC₀]\n[GOAL]\ncase intro\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nn : ℕ\nC : ℝ\nhC₁ : 1 ≤ C\nhC₀ : 0 < C\nthis : 0 < (exp 1 * C)⁻¹\nN : ℕ\nhN : ∀ (k : ℕ), k ≥ N → ↑k ^ n < exp ↑k / (exp 1 * C)\nx : ℝ\nhx : ↑N < x\nhx₀ : 0 < x\n⊢ x ^ n ≤ exp x / C\n[PROOFSTEP]\ncalc\n  x ^ n ≤ ⌈x⌉₊ ^ n := by exact_mod_cast pow_le_pow_of_le_left hx₀.le (Nat.le_ceil _) _\n  _ ≤ exp ⌈x⌉₊ / (exp 1 * C) := by exact_mod_cast (hN _ (Nat.lt_ceil.2 hx).le).le\n  _ ≤ exp (x + 1) / (exp 1 * C) :=\n    (div_le_div_of_le (mul_pos (exp_pos _) hC₀).le (exp_le_exp.2 <| (Nat.ceil_lt_add_one hx₀.le).le))\n  _ = exp x / C := by rw [add_comm, exp_add, mul_div_mul_left _ _ (exp_pos _).ne']\n[GOAL]\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nn : ℕ\nC : ℝ\nhC₁ : 1 ≤ C\nhC₀ : 0 < C\nthis : 0 < (exp 1 * C)⁻¹\nN : ℕ\nhN : ∀ (k : ℕ), k ≥ N → ↑k ^ n < exp ↑k / (exp 1 * C)\nx : ℝ\nhx : ↑N < x\nhx₀ : 0 < x\n⊢ x ^ n ≤ ↑(⌈x⌉₊ ^ n)\n[PROOFSTEP]\nexact_mod_cast pow_le_pow_of_le_left hx₀.le (Nat.le_ceil _) _\n[GOAL]\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nn : ℕ\nC : ℝ\nhC₁ : 1 ≤ C\nhC₀ : 0 < C\nthis : 0 < (exp 1 * C)⁻¹\nN : ℕ\nhN : ∀ (k : ℕ), k ≥ N → ↑k ^ n < exp ↑k / (exp 1 * C)\nx : ℝ\nhx : ↑N < x\nhx₀ : 0 < x\n⊢ ↑(⌈x⌉₊ ^ n) ≤ exp ↑⌈x⌉₊ / (exp 1 * C)\n[PROOFSTEP]\nexact_mod_cast (hN _ (Nat.lt_ceil.2 hx).le).le\n[GOAL]\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nn : ℕ\nC : ℝ\nhC₁ : 1 ≤ C\nhC₀ : 0 < C\nthis : 0 < (exp 1 * C)⁻¹\nN : ℕ\nhN : ∀ (k : ℕ), k ≥ N → ↑k ^ n < exp ↑k / (exp 1 * C)\nx : ℝ\nhx : ↑N < x\nhx₀ : 0 < x\n⊢ exp (x + 1) / (exp 1 * C) = exp x / C\n[PROOFSTEP]\nrw [add_comm, exp_add, mul_div_mul_left _ _ (exp_pos _).ne']\n[GOAL]\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nn : ℕ\nx : ℝ\n⊢ ((fun r => r⁻¹) ∘ fun x => exp x / x ^ n) x = x ^ n * exp (-x)\n[PROOFSTEP]\nrw [comp_apply, inv_eq_one_div, div_div_eq_mul_div, one_mul, div_eq_mul_inv, exp_neg]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 < b\n⊢ Tendsto (fun x => (b * exp x + c) / x ^ n) atTop atTop\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nhb : 0 < b\n⊢ Tendsto (fun x => (b * exp x + c) / x ^ 0) atTop atTop\n[PROOFSTEP]\nsimp only [pow_zero, div_one]\n[GOAL]\ncase inl\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nhb : 0 < b\n⊢ Tendsto (fun x => b * exp x + c) atTop atTop\n[PROOFSTEP]\nexact (tendsto_exp_atTop.const_mul_atTop hb).atTop_add tendsto_const_nhds\n[GOAL]\ncase inr\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 < b\nhn : n ≠ 0\n⊢ Tendsto (fun x => (b * exp x + c) / x ^ n) atTop atTop\n[PROOFSTEP]\nsimp only [add_div, mul_div_assoc]\n[GOAL]\ncase inr\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 < b\nhn : n ≠ 0\n⊢ Tendsto (fun x => b * (exp x / x ^ n) + c / x ^ n) atTop atTop\n[PROOFSTEP]\nexact ((tendsto_exp_div_pow_atTop n).const_mul_atTop hb).atTop_add (tendsto_const_nhds.div_atTop (tendsto_pow_atTop hn))\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 ≠ b\n⊢ Tendsto (fun x => x ^ n / (b * exp x + c)) atTop (𝓝 0)\n[PROOFSTEP]\nhave H : ∀ d e, 0 < d → Tendsto (fun x : ℝ => x ^ n / (d * exp x + e)) atTop (𝓝 0) :=\n  by\n  intro b' c' h\n  convert (tendsto_mul_exp_add_div_pow_atTop b' c' n h).inv_tendsto_atTop using 1\n  ext x\n  simp\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 ≠ b\n⊢ ∀ (d e : ℝ), 0 < d → Tendsto (fun x => x ^ n / (d * exp x + e)) atTop (𝓝 0)\n[PROOFSTEP]\nintro b' c' h\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 ≠ b\nb' c' : ℝ\nh : 0 < b'\n⊢ Tendsto (fun x => x ^ n / (b' * exp x + c')) atTop (𝓝 0)\n[PROOFSTEP]\nconvert (tendsto_mul_exp_add_div_pow_atTop b' c' n h).inv_tendsto_atTop using 1\n[GOAL]\ncase h.e'_3\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 ≠ b\nb' c' : ℝ\nh : 0 < b'\n⊢ (fun x => x ^ n / (b' * exp x + c')) = (fun x => (b' * exp x + c') / x ^ n)⁻¹\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 ≠ b\nb' c' : ℝ\nh : 0 < b'\nx : ℝ\n⊢ x ^ n / (b' * exp x + c') = (fun x => (b' * exp x + c') / x ^ n)⁻¹ x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 ≠ b\nH : ∀ (d e : ℝ), 0 < d → Tendsto (fun x => x ^ n / (d * exp x + e)) atTop (𝓝 0)\n⊢ Tendsto (fun x => x ^ n / (b * exp x + c)) atTop (𝓝 0)\n[PROOFSTEP]\ncases' lt_or_gt_of_ne hb with h h\n[GOAL]\ncase inl\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 ≠ b\nH : ∀ (d e : ℝ), 0 < d → Tendsto (fun x => x ^ n / (d * exp x + e)) atTop (𝓝 0)\nh : 0 < b\n⊢ Tendsto (fun x => x ^ n / (b * exp x + c)) atTop (𝓝 0)\n[PROOFSTEP]\nexact H b c h\n[GOAL]\ncase inr\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 ≠ b\nH : ∀ (d e : ℝ), 0 < d → Tendsto (fun x => x ^ n / (d * exp x + e)) atTop (𝓝 0)\nh : 0 > b\n⊢ Tendsto (fun x => x ^ n / (b * exp x + c)) atTop (𝓝 0)\n[PROOFSTEP]\nconvert (H (-b) (-c) (neg_pos.mpr h)).neg using 1\n[GOAL]\ncase h.e'_3\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 ≠ b\nH : ∀ (d e : ℝ), 0 < d → Tendsto (fun x => x ^ n / (d * exp x + e)) atTop (𝓝 0)\nh : 0 > b\n⊢ (fun x => x ^ n / (b * exp x + c)) = fun x => -(x ^ n / (-b * exp x + -c))\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 ≠ b\nH : ∀ (d e : ℝ), 0 < d → Tendsto (fun x => x ^ n / (d * exp x + e)) atTop (𝓝 0)\nh : 0 > b\nx : ℝ\n⊢ x ^ n / (b * exp x + c) = -(x ^ n / (-b * exp x + -c))\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nx✝ y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 ≠ b\nH : ∀ (d e : ℝ), 0 < d → Tendsto (fun x => x ^ n / (d * exp x + e)) atTop (𝓝 0)\nh : 0 > b\nx : ℝ\n⊢ x ^ n / (b * exp x + c) = -x ^ n / (-(b * exp x) + -c)\n[PROOFSTEP]\nrw [← neg_add (b * exp x) c, neg_div_neg_eq]\n[GOAL]\ncase h.e'_5\nα : Type u_1\nx y z : ℝ\nl : Filter α\nb c : ℝ\nn : ℕ\nhb : 0 ≠ b\nH : ∀ (d e : ℝ), 0 < d → Tendsto (fun x => x ^ n / (d * exp x + e)) atTop (𝓝 0)\nh : 0 > b\n⊢ 𝓝 0 = 𝓝 (-0)\n[PROOFSTEP]\nrw [neg_zero]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\n⊢ Tendsto (fun x => { val := exp x, property := (_ : 0 < exp x) }) atTop atTop\n[PROOFSTEP]\nsimp only [tendsto_Ioi_atTop, Subtype.coe_mk, tendsto_exp_atTop]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\n⊢ Tendsto (fun x => { val := exp x, property := (_ : 0 < exp x) }) atBot atBot\n[PROOFSTEP]\nsimp [tendsto_exp_atBot_nhdsWithin]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\n⊢ Set.range exp = Set.Ioi 0\n[PROOFSTEP]\nrw [← coe_comp_expOrderIso, range_comp, expOrderIso.range_eq, image_univ, Subtype.range_coe]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\n⊢ Filter.map exp atTop = atTop\n[PROOFSTEP]\nrw [← coe_comp_expOrderIso, ← Filter.map_map, OrderIso.map_atTop, map_val_Ioi_atTop]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\n⊢ comap exp atTop = atTop\n[PROOFSTEP]\nrw [← map_exp_atTop, comap_map exp_injective, map_exp_atTop]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nf : α → ℝ\n⊢ Tendsto (fun x => exp (f x)) l atTop ↔ Tendsto f l atTop\n[PROOFSTEP]\nsimp_rw [← comp_apply (f := exp), ← tendsto_comap_iff, comap_exp_atTop]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nf : ℝ → α\n⊢ Tendsto (fun x => f (exp x)) atTop l ↔ Tendsto f atTop l\n[PROOFSTEP]\nsimp_rw [← comp_apply (g := exp), ← tendsto_map'_iff, map_exp_atTop]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\n⊢ Filter.map exp atBot = 𝓝[Set.Ioi 0] 0\n[PROOFSTEP]\nrw [← coe_comp_expOrderIso, ← Filter.map_map, expOrderIso.map_atBot, ← map_coe_Ioi_atBot]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\n⊢ comap exp (𝓝[Set.Ioi 0] 0) = atBot\n[PROOFSTEP]\nrw [← map_exp_atBot, comap_map exp_injective]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nf : ℝ → α\n⊢ Tendsto (fun x => f (exp x)) atBot l ↔ Tendsto f (𝓝[Set.Ioi 0] 0) l\n[PROOFSTEP]\nrw [← map_exp_atBot, tendsto_map'_iff]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nf : ℝ → α\n⊢ Tendsto (fun x => f (exp x)) atBot l ↔ Tendsto (f ∘ exp) atBot l\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\n⊢ comap exp (𝓝[Set.range exp] 0) = atBot\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nf : α → ℝ\n⊢ Tendsto (fun x => exp (f x)) l (𝓝 0) ↔ Tendsto f l atBot\n[PROOFSTEP]\nsimp_rw [← comp_apply (f := exp), ← tendsto_comap_iff, comap_exp_nhds_zero]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nn : ℕ\n⊢ (fun x => x ^ n) =o[atTop] exp\n[PROOFSTEP]\nsimpa [isLittleO_iff_tendsto fun x hx => ((exp_pos x).ne' hx).elim] using\n  tendsto_div_pow_mul_exp_add_atTop 1 0 n zero_ne_one\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nf g : α → ℝ\n⊢ (IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun x => ‖exp (f x)‖ / ‖exp (g x)‖) ↔\n    IsBoundedUnder (fun x x_1 => x ≤ x_1) l (f - g)\n[PROOFSTEP]\nsimp only [norm_eq_abs, abs_exp, ← exp_sub, isBoundedUnder_le_exp_comp, Pi.sub_def]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nf g : α → ℝ\n⊢ ((fun x => exp (f x)) =Θ[l] fun x => exp (g x)) ↔ IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun x => |f x - g x|\n[PROOFSTEP]\nsimp only [isBoundedUnder_le_abs, ← isBoundedUnder_le_neg, neg_sub, IsTheta, isBigO_exp_comp_exp_comp, Pi.sub_def]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nf g : α → ℝ\n⊢ ((fun x => exp (f x)) =o[l] fun x => exp (g x)) ↔ Tendsto (fun x => g x - f x) l atTop\n[PROOFSTEP]\nsimp only [isLittleO_iff_tendsto, exp_ne_zero, ← exp_sub, ← tendsto_neg_atTop_iff, false_imp_iff, imp_true_iff,\n  tendsto_exp_comp_nhds_zero, neg_sub]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nf : α → ℝ\n⊢ ((fun x => 1) =o[l] fun x => exp (f x)) ↔ Tendsto f l atTop\n[PROOFSTEP]\nsimp only [← exp_zero, isLittleO_exp_comp_exp_comp, sub_zero]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nf : α → ℝ\n⊢ ((fun x => 1) =O[l] fun x => exp (f x)) ↔ IsBoundedUnder (fun x x_1 => x ≥ x_1) l f\n[PROOFSTEP]\nsimp only [← exp_zero, isBigO_exp_comp_exp_comp, Pi.sub_def, zero_sub, isBoundedUnder_le_neg]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nf : α → ℝ\n⊢ ((fun x => exp (f x)) =O[l] fun x => 1) ↔ IsBoundedUnder (fun x x_1 => x ≤ x_1) l f\n[PROOFSTEP]\nsimp only [isBigO_one_iff, norm_eq_abs, abs_exp, isBoundedUnder_le_exp_comp]\n[GOAL]\nα : Type u_1\nx y z : ℝ\nl : Filter α\nf : α → ℝ\n⊢ ((fun x => exp (f x)) =Θ[l] fun x => 1) ↔ IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun x => |f x|\n[PROOFSTEP]\nsimp only [← exp_zero, isTheta_exp_comp_exp_comp, sub_zero]\n[GOAL]\n⊢ comap exp (comap (↑abs) atTop) = comap re (comap Real.exp atTop)\n[PROOFSTEP]\nsimp only [comap_comap, (· ∘ ·), abs_exp]\n[GOAL]\n⊢ comap re (comap Real.exp atTop) = comap re atTop\n[PROOFSTEP]\nrw [Real.comap_exp_atTop]\n[GOAL]\n⊢ comap exp (𝓝 0) = comap re (comap Real.exp (𝓝 0))\n[PROOFSTEP]\nsimp only [comap_comap, ← comap_abs_nhds_zero, (· ∘ ·), abs_exp]\n[GOAL]\n⊢ comap re (comap Real.exp (𝓝 0)) = comap re atBot\n[PROOFSTEP]\nrw [Real.comap_exp_nhds_zero]\n[GOAL]\n⊢ comap exp (𝓝[{0}ᶜ] 0) = comap re atBot\n[PROOFSTEP]\nhave : (exp ⁻¹' {0})ᶜ = Set.univ := eq_univ_of_forall exp_ne_zero\n[GOAL]\nthis : (exp ⁻¹' {0})ᶜ = Set.univ\n⊢ comap exp (𝓝[{0}ᶜ] 0) = comap re atBot\n[PROOFSTEP]\nsimp [nhdsWithin, comap_exp_nhds_zero, this]\n[GOAL]\nα : Type u_1\nl : Filter α\nf : α → ℂ\n⊢ Tendsto (fun x => exp (f x)) l (𝓝 0) ↔ Tendsto (fun x => (f x).re) l atBot\n[PROOFSTEP]\nsimp_rw [← comp_apply (f := exp), ← tendsto_comap_iff, comap_exp_nhds_zero, tendsto_comap_iff]\n[GOAL]\nα : Type u_1\nl : Filter α\nf : α → ℂ\n⊢ Tendsto (re ∘ f) l atBot ↔ Tendsto (fun x => (f x).re) l atBot\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Exp", "llama_tokens": 11177, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7606506418255928, "lm_q2_score": 0.4921881357207956, "lm_q1q2_score": 0.37438322133496515}}
{"text": "[GOAL]\nV : Type u\nG : SimpleGraph V\nP : Partition G\nv : V\n⊢ partOfVertex P v ∈ P.parts\n[PROOFSTEP]\nobtain ⟨h, -⟩ := (P.isPartition.2 v).choose_spec.1\n[GOAL]\ncase intro\nV : Type u\nG : SimpleGraph V\nP : Partition G\nv : V\nh : Exists.choose (_ : ∃! b x, v ∈ b) ∈ P.parts\n⊢ partOfVertex P v ∈ P.parts\n[PROOFSTEP]\nexact h\n[GOAL]\nV : Type u\nG : SimpleGraph V\nP : Partition G\nv : V\n⊢ v ∈ partOfVertex P v\n[PROOFSTEP]\nobtain ⟨⟨h1, h2⟩, _h3⟩ := (P.isPartition.2 v).choose_spec\n[GOAL]\ncase intro.intro\nV : Type u\nG : SimpleGraph V\nP : Partition G\nv : V\n_h3 : ∀ (y : Set V), (fun b => ∃! x, v ∈ b) y → y = Exists.choose (_ : ∃! b x, v ∈ b)\nh1 : Exists.choose (_ : ∃! b x, v ∈ b) ∈ P.parts\nh2 :\n  (fun x => v ∈ Exists.choose (_ : ∃! b x, v ∈ b)) h1 ∧\n    ∀ (y : Exists.choose (_ : ∃! b x, v ∈ b) ∈ P.parts), (fun x => v ∈ Exists.choose (_ : ∃! b x, v ∈ b)) y → y = h1\n⊢ v ∈ partOfVertex P v\n[PROOFSTEP]\nexact h2.1\n[GOAL]\nV : Type u\nG : SimpleGraph V\nP : Partition G\nv w : V\nh : Adj G v w\n⊢ partOfVertex P v ≠ partOfVertex P w\n[PROOFSTEP]\nintro hn\n[GOAL]\nV : Type u\nG : SimpleGraph V\nP : Partition G\nv w : V\nh : Adj G v w\nhn : partOfVertex P v = partOfVertex P w\n⊢ False\n[PROOFSTEP]\nhave hw := P.mem_partOfVertex w\n[GOAL]\nV : Type u\nG : SimpleGraph V\nP : Partition G\nv w : V\nh : Adj G v w\nhn : partOfVertex P v = partOfVertex P w\nhw : w ∈ partOfVertex P w\n⊢ False\n[PROOFSTEP]\nrw [← hn] at hw \n[GOAL]\nV : Type u\nG : SimpleGraph V\nP : Partition G\nv w : V\nh : Adj G v w\nhn : partOfVertex P v = partOfVertex P w\nhw : w ∈ partOfVertex P v\n⊢ False\n[PROOFSTEP]\nexact P.independent _ (P.partOfVertex_mem v) (P.mem_partOfVertex v) hw (G.ne_of_adj h) h\n[GOAL]\nV : Type u\nG : SimpleGraph V\nP : Partition G\nv✝ w✝ : V\nhvw : Adj G v✝ w✝\n⊢ (fun v => { val := partOfVertex P v, property := (_ : partOfVertex P v ∈ P.parts) }) v✝ ≠\n    (fun v => { val := partOfVertex P v, property := (_ : partOfVertex P v ∈ P.parts) }) w✝\n[PROOFSTEP]\nrw [Ne.def, Subtype.mk_eq_mk]\n[GOAL]\nV : Type u\nG : SimpleGraph V\nP : Partition G\nv✝ w✝ : V\nhvw : Adj G v✝ w✝\n⊢ ¬partOfVertex P v✝ = partOfVertex P w✝\n[PROOFSTEP]\nexact P.partOfVertex_ne_of_adj hvw\n[GOAL]\nV : Type u\nG : SimpleGraph V\nα : Type v\nC : Coloring G α\n⊢ ∀ (s : Set V), s ∈ colorClasses C → IsAntichain G.Adj s\n[PROOFSTEP]\nrintro s ⟨c, rfl⟩\n[GOAL]\ncase intro\nV : Type u\nG : SimpleGraph V\nα : Type v\nC : Coloring G α\nc : V\n⊢ IsAntichain G.Adj {x | Setoid.Rel (Setoid.ker ↑C) x c}\n[PROOFSTEP]\napply C.color_classes_independent\n[GOAL]\nV : Type u\nG : SimpleGraph V\nn : ℕ\n⊢ Partitionable G n ↔ Colorable G n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nV : Type u\nG : SimpleGraph V\nn : ℕ\n⊢ Partitionable G n → Colorable G n\n[PROOFSTEP]\nrintro ⟨P, hf, hc⟩\n[GOAL]\ncase mp.intro.intro\nV : Type u\nG : SimpleGraph V\nn : ℕ\nP : Partition G\nhf : Set.Finite P.parts\nhc : Finset.card (Set.Finite.toFinset hf) ≤ n\n⊢ Colorable G n\n[PROOFSTEP]\nhave : Fintype P.parts := hf.fintype\n[GOAL]\ncase mp.intro.intro\nV : Type u\nG : SimpleGraph V\nn : ℕ\nP : Partition G\nhf : Set.Finite P.parts\nhc : Finset.card (Set.Finite.toFinset hf) ≤ n\nthis : Fintype ↑P.parts\n⊢ Colorable G n\n[PROOFSTEP]\nrw [Set.Finite.card_toFinset hf] at hc \n[GOAL]\ncase mp.intro.intro\nV : Type u\nG : SimpleGraph V\nn : ℕ\nP : Partition G\nhf : Set.Finite P.parts\nthis : Fintype ↑P.parts\nhc : Fintype.card ↑P.parts ≤ n\n⊢ Colorable G n\n[PROOFSTEP]\napply P.to_colorable.mono hc\n[GOAL]\ncase mpr\nV : Type u\nG : SimpleGraph V\nn : ℕ\n⊢ Colorable G n → Partitionable G n\n[PROOFSTEP]\nrintro ⟨C⟩\n[GOAL]\ncase mpr.intro\nV : Type u\nG : SimpleGraph V\nn : ℕ\nC : Coloring G (Fin n)\n⊢ Partitionable G n\n[PROOFSTEP]\nrefine' ⟨C.toPartition, C.colorClasses_finite, le_trans _ (Fintype.card_fin n).le⟩\n[GOAL]\ncase mpr.intro\nV : Type u\nG : SimpleGraph V\nn : ℕ\nC : Coloring G (Fin n)\n⊢ Finset.card (Set.Finite.toFinset (_ : Set.Finite (Coloring.colorClasses C))) ≤ Fintype.card (Fin n)\n[PROOFSTEP]\ngeneralize_proofs h\n[GOAL]\ncase mpr.intro\nV : Type u\nG : SimpleGraph V\nn : ℕ\nC : Coloring G (Fin n)\nh : Set.Finite (Coloring.colorClasses C)\n⊢ Finset.card (Set.Finite.toFinset h) ≤ Fintype.card (Fin n)\n[PROOFSTEP]\nhaveI : Fintype C.colorClasses := C.colorClasses_finite.fintype\n[GOAL]\ncase mpr.intro\nV : Type u\nG : SimpleGraph V\nn : ℕ\nC : Coloring G (Fin n)\nh : Set.Finite (Coloring.colorClasses C)\nthis : Fintype ↑(Coloring.colorClasses C)\n⊢ Finset.card (Set.Finite.toFinset h) ≤ Fintype.card (Fin n)\n[PROOFSTEP]\nrw [h.card_toFinset]\n[GOAL]\ncase mpr.intro\nV : Type u\nG : SimpleGraph V\nn : ℕ\nC : Coloring G (Fin n)\nh : Set.Finite (Coloring.colorClasses C)\nthis : Fintype ↑(Coloring.colorClasses C)\n⊢ Fintype.card ↑(Coloring.colorClasses C) ≤ Fintype.card (Fin n)\n[PROOFSTEP]\nexact C.card_colorClasses_le\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SimpleGraph.Partition", "llama_tokens": 2130, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.689305616785446, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.3741987102373959}}
{"text": "[GOAL]\nα : Type u_1\nt : α\nts is : List α\n⊢ (invImage (fun a => PSigma.casesOn a fun ts snd => (length ts + length snd, length ts))\n        Prod.instWellFoundedRelationProd).1\n    { fst := ts, snd := t :: is } { fst := t :: ts, snd := is }\n[PROOFSTEP]\nsimp_wf\n[GOAL]\nα : Type u_1\nt : α\nts is : List α\n⊢ Prod.Lex (fun a₁ a₂ => a₁ < a₂) (fun a₁ a₂ => a₁ < a₂) (length ts + succ (length is), length ts)\n    (succ (length ts) + length is, succ (length ts))\n[PROOFSTEP]\nsimp [Nat.succ_add]\n[GOAL]\nα : Type u_1\nt : α\nts is : List α\n⊢ Prod.Lex (fun a₁ a₂ => a₁ < a₂) (fun a₁ a₂ => a₁ < a₂) (length ts + succ (length is), length ts)\n    (succ (length ts + length is), succ (length ts))\n[PROOFSTEP]\ndecreasing_tactic\n[GOAL]\nα : Type u_1\nt : α\nts is : List α\n⊢ (invImage (fun a => PSigma.casesOn a fun ts snd => (length ts + length snd, length ts))\n        Prod.instWellFoundedRelationProd).1\n    { fst := is, snd := [] } { fst := t :: ts, snd := is }\n[PROOFSTEP]\nsimp_wf\n[GOAL]\nα : Type u_1\nt : α\nts is : List α\n⊢ Prod.Lex (fun a₁ a₂ => a₁ < a₂) (fun a₁ a₂ => a₁ < a₂) (length is, length is)\n    (succ (length ts) + length is, succ (length ts))\n[PROOFSTEP]\nsimp [Nat.succ_add]\n[GOAL]\nα : Type u_1\nt : α\nts is : List α\n⊢ Prod.Lex (fun a₁ a₂ => a₁ < a₂) (fun a₁ a₂ => a₁ < a₂) (length is, length is)\n    (succ (length ts + length is), succ (length ts))\n[PROOFSTEP]\ndecreasing_tactic\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\na : α\nl : List α\n⊢ Decidable (Chain R a l)\n[PROOFSTEP]\ninduction l generalizing a with\n| nil => simp only [List.Chain.nil]; infer_instance\n| cons a as ih => haveI := ih; simp only [List.chain_cons]; infer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\na : α\nl : List α\n⊢ Decidable (Chain R a l)\n[PROOFSTEP]\ninduction l generalizing a with\n| nil => simp only [List.Chain.nil]; infer_instance\n| cons a as ih => haveI := ih; simp only [List.chain_cons]; infer_instance\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\na : α\n⊢ Decidable (Chain R a [])\n[PROOFSTEP]\n\n| nil => simp only [List.Chain.nil]; infer_instance\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\na : α\n⊢ Decidable (Chain R a [])\n[PROOFSTEP]\nsimp only [List.Chain.nil]\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\na : α\n⊢ Decidable True\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\na✝ : α\nas : List α\nih : (a : α) → Decidable (Chain R a as)\na : α\n⊢ Decidable (Chain R a (a✝ :: as))\n[PROOFSTEP]\n\n| cons a as ih => haveI := ih; simp only [List.chain_cons]; infer_instance\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\na✝ : α\nas : List α\nih : (a : α) → Decidable (Chain R a as)\na : α\n⊢ Decidable (Chain R a (a✝ :: as))\n[PROOFSTEP]\nhaveI := ih\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\na✝ : α\nas : List α\nih : (a : α) → Decidable (Chain R a as)\na : α\nthis : (a : α) → Decidable (Chain R a as)\n⊢ Decidable (Chain R a (a✝ :: as))\n[PROOFSTEP]\nsimp only [List.chain_cons]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\na✝ : α\nas : List α\nih : (a : α) → Decidable (Chain R a as)\na : α\nthis : (a : α) → Decidable (Chain R a as)\n⊢ Decidable (R a a✝ ∧ Chain R a✝ as)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\nl : List α\n⊢ Decidable (Chain' R l)\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\n⊢ Decidable (Chain' R [])\n[PROOFSTEP]\ndsimp only [List.Chain']\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\nhead✝ : α\ntail✝ : List α\n⊢ Decidable (Chain' R (head✝ :: tail✝))\n[PROOFSTEP]\ndsimp only [List.Chain']\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\n⊢ Decidable True\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nε : Type u_5\nζ : Type u_6\nR : α → α → Prop\ninst✝ : DecidableRel R\nhead✝ : α\ntail✝ : List α\n⊢ Decidable (Chain R head✝ tail✝)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Defs", "llama_tokens": 2291, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.689305616785446, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.3741987102373959}}
{"text": "[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ AddCommGroup (Cotangent I)\n[PROOFSTEP]\ndelta Cotangent\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ AddCommGroup ({ x // x ∈ I } ⧸ I • ⊤)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ Module (R ⧸ I) (Cotangent I)\n[PROOFSTEP]\ndelta Cotangent\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ Module (R ⧸ I) ({ x // x ∈ I } ⧸ I • ⊤)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ Submodule.map (Submodule.subtype I) (LinearMap.ker (toCotangent I)) = I ^ 2\n[PROOFSTEP]\nrw [Ideal.toCotangent, Submodule.ker_mkQ, pow_two, Submodule.map_smul'' I ⊤ (Submodule.subtype I),\n  Algebra.id.smul_eq_mul, Submodule.map_subtype_top]\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nx : { x // x ∈ I }\n⊢ x ∈ LinearMap.ker (toCotangent I) ↔ ↑x ∈ I ^ 2\n[PROOFSTEP]\nrw [← I.map_toCotangent_ker]\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nx : { x // x ∈ I }\n⊢ x ∈ LinearMap.ker (toCotangent I) ↔ ↑x ∈ Submodule.map (Submodule.subtype I) (LinearMap.ker (toCotangent I))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nx y : { x // x ∈ I }\n⊢ ↑(toCotangent I) x = ↑(toCotangent I) y ↔ ↑x - ↑y ∈ I ^ 2\n[PROOFSTEP]\nrw [← sub_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nx y : { x // x ∈ I }\n⊢ ↑(toCotangent I) x - ↑(toCotangent I) y = 0 ↔ ↑x - ↑y ∈ I ^ 2\n[PROOFSTEP]\nexact I.mem_toCotangent_ker\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ Subsingleton (Cotangent I) ↔ IsIdempotentElem I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ Subsingleton (Cotangent I) → IsIdempotentElem I\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nH : Subsingleton (Cotangent I)\n⊢ IsIdempotentElem I\n[PROOFSTEP]\nrefine' (pow_two I).symm.trans (le_antisymm (Ideal.pow_le_self two_ne_zero) _)\n[GOAL]\ncase mp\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nH : Subsingleton (Cotangent I)\n⊢ I ≤ I ^ 2\n[PROOFSTEP]\nexact fun x hx => (I.toCotangent_eq_zero ⟨x, hx⟩).mp (Subsingleton.elim _ _)\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ IsIdempotentElem I → Subsingleton (Cotangent I)\n[PROOFSTEP]\nexact fun e =>\n  ⟨fun x y =>\n    Quotient.inductionOn₂' x y fun x y => I.toCotangent_eq.mpr <| ((pow_two I).trans e).symm ▸ I.sub_mem x.prop y.prop⟩\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ I • ⊤ ≤ Submodule.comap (Submodule.subtype I) (I ^ 2)\n[PROOFSTEP]\nrw [← Submodule.map_le_iff_le_comap, Submodule.map_smul'', Submodule.map_top, Submodule.range_subtype, smul_eq_mul,\n  pow_two]\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI✝ I : Ideal R\n⊢ cotangentIdeal I ^ 2 = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff, pow_two I.cotangentIdeal, ← smul_eq_mul]\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI✝ I : Ideal R\n⊢ cotangentIdeal I • cotangentIdeal I ≤ ⊥\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI✝ I : Ideal R\nx : R ⧸ I ^ 2\nhx : x ∈ cotangentIdeal I • cotangentIdeal I\n⊢ x ∈ ⊥\n[PROOFSTEP]\nrefine Submodule.smul_induction_on hx ?_ ?_\n[GOAL]\ncase refine_1\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI✝ I : Ideal R\nx : R ⧸ I ^ 2\nhx : x ∈ cotangentIdeal I • cotangentIdeal I\n⊢ ∀ (r : R ⧸ I ^ 2), r ∈ cotangentIdeal I → ∀ (n : R ⧸ I ^ 2), n ∈ cotangentIdeal I → r • n ∈ ⊥\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩\n[GOAL]\ncase refine_1.intro.intro.intro.intro\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI✝ I : Ideal R\nx✝ : R ⧸ I ^ 2\nhx✝ : x✝ ∈ cotangentIdeal I • cotangentIdeal I\nx : R\nhx : x ∈ ↑I\ny : R\nhy : y ∈ ↑I\n⊢ ↑(RingHom.toSemilinearMap (Quotient.mk (I ^ 2))) x • ↑(RingHom.toSemilinearMap (Quotient.mk (I ^ 2))) y ∈ ⊥\n[PROOFSTEP]\napply (Submodule.Quotient.eq _).mpr _\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI✝ I : Ideal R\nx✝ : R ⧸ I ^ 2\nhx✝ : x✝ ∈ cotangentIdeal I • cotangentIdeal I\nx : R\nhx : x ∈ ↑I\ny : R\nhy : y ∈ ↑I\n⊢ (fun x x_1 => x * x_1) x y - 0 ∈ I ^ 2\n[PROOFSTEP]\nrw [sub_zero, pow_two]\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI✝ I : Ideal R\nx✝ : R ⧸ I ^ 2\nhx✝ : x✝ ∈ cotangentIdeal I • cotangentIdeal I\nx : R\nhx : x ∈ ↑I\ny : R\nhy : y ∈ ↑I\n⊢ (fun x x_1 => x * x_1) x y ∈ I * I\n[PROOFSTEP]\nexact Ideal.mul_mem_mul hx hy\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI✝ I : Ideal R\nx : R ⧸ I ^ 2\nhx : x ∈ cotangentIdeal I • cotangentIdeal I\n⊢ ∀ (x y : R ⧸ I ^ 2), x ∈ ⊥ → y ∈ ⊥ → x + y ∈ ⊥\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI✝ I : Ideal R\nx✝ : R ⧸ I ^ 2\nhx✝ : x✝ ∈ cotangentIdeal I • cotangentIdeal I\nx y : R ⧸ I ^ 2\nhx : x ∈ ⊥\nhy : y ∈ ⊥\n⊢ x + y ∈ ⊥\n[PROOFSTEP]\nexact add_mem hx hy\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ LinearMap.range (cotangentToQuotientSquare I) = Submodule.restrictScalars R (cotangentIdeal I)\n[PROOFSTEP]\ntrans LinearMap.range (I.cotangentToQuotientSquare.comp I.toCotangent)\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ LinearMap.range (cotangentToQuotientSquare I) =\n    LinearMap.range (LinearMap.comp (cotangentToQuotientSquare I) (toCotangent I))\n[PROOFSTEP]\nrw [LinearMap.range_comp, I.toCotangent_range, Submodule.map_top]\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ LinearMap.range (LinearMap.comp (cotangentToQuotientSquare I) (toCotangent I)) =\n    Submodule.restrictScalars R (cotangentIdeal I)\n[PROOFSTEP]\nrw [to_quotient_square_comp_toCotangent, LinearMap.range_comp, I.range_subtype]\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ Submodule.map (Submodule.mkQ (I ^ 2)) I = Submodule.restrictScalars R (cotangentIdeal I)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nx✝ : R ⧸ I ^ 2\n⊢ x✝ ∈ Submodule.map (Submodule.mkQ (I ^ 2)) I ↔ x✝ ∈ Submodule.restrictScalars R (cotangentIdeal I)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\n⊢ Cotangent I ≃ₗ[R] { x // x ∈ cotangentIdeal I }\n[PROOFSTEP]\nrefine\n  {\n    LinearMap.codRestrict (I.cotangentIdeal.restrictScalars R) I.cotangentToQuotientSquare fun x => by\n      {rw [← to_quotient_square_range]; exact LinearMap.mem_range_self _ _\n    },\n    Equiv.ofBijective _ ⟨?_, ?_⟩ with }\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nx : Cotangent I\n⊢ ↑(cotangentToQuotientSquare I) x ∈ Submodule.restrictScalars R (cotangentIdeal I)\n[PROOFSTEP]\n{rw [← to_quotient_square_range]; exact LinearMap.mem_range_self _ _\n}\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nx : Cotangent I\n⊢ ↑(cotangentToQuotientSquare I) x ∈ Submodule.restrictScalars R (cotangentIdeal I)\n[PROOFSTEP]\nrw [← to_quotient_square_range]\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nx : Cotangent I\n⊢ ↑(cotangentToQuotientSquare I) x ∈ LinearMap.range (cotangentToQuotientSquare I)\n[PROOFSTEP]\nexact LinearMap.mem_range_self _ _\n[GOAL]\ncase refine_1\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nsrc✝ : Cotangent I →ₗ[R] { x // x ∈ Submodule.restrictScalars R (cotangentIdeal I) } :=\n  LinearMap.codRestrict (Submodule.restrictScalars R (cotangentIdeal I)) (cotangentToQuotientSquare I)\n    (_ : ∀ (x : Cotangent I), ↑(cotangentToQuotientSquare I) x ∈ Submodule.restrictScalars R (cotangentIdeal I))\n⊢ Function.Injective fun c =>\n    { val := ↑(cotangentToQuotientSquare I) c,\n      property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) }\n[PROOFSTEP]\nrintro x y e\n[GOAL]\ncase refine_1\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nsrc✝ : Cotangent I →ₗ[R] { x // x ∈ Submodule.restrictScalars R (cotangentIdeal I) } :=\n  LinearMap.codRestrict (Submodule.restrictScalars R (cotangentIdeal I)) (cotangentToQuotientSquare I)\n    (_ : ∀ (x : Cotangent I), ↑(cotangentToQuotientSquare I) x ∈ Submodule.restrictScalars R (cotangentIdeal I))\nx y : Cotangent I\ne :\n  (fun c =>\n        { val := ↑(cotangentToQuotientSquare I) c,\n          property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) })\n      x =\n    (fun c =>\n        { val := ↑(cotangentToQuotientSquare I) c,\n          property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) })\n      y\n⊢ x = y\n[PROOFSTEP]\nreplace e := congr_arg Subtype.val e\n[GOAL]\ncase refine_1\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nsrc✝ : Cotangent I →ₗ[R] { x // x ∈ Submodule.restrictScalars R (cotangentIdeal I) } :=\n  LinearMap.codRestrict (Submodule.restrictScalars R (cotangentIdeal I)) (cotangentToQuotientSquare I)\n    (_ : ∀ (x : Cotangent I), ↑(cotangentToQuotientSquare I) x ∈ Submodule.restrictScalars R (cotangentIdeal I))\nx y : Cotangent I\ne :\n  ↑((fun c =>\n          { val := ↑(cotangentToQuotientSquare I) c,\n            property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) })\n        x) =\n    ↑((fun c =>\n          { val := ↑(cotangentToQuotientSquare I) c,\n            property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) })\n        y)\n⊢ x = y\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ := I.toCotangent_surjective x\n[GOAL]\ncase refine_1.intro\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nsrc✝ : Cotangent I →ₗ[R] { x // x ∈ Submodule.restrictScalars R (cotangentIdeal I) } :=\n  LinearMap.codRestrict (Submodule.restrictScalars R (cotangentIdeal I)) (cotangentToQuotientSquare I)\n    (_ : ∀ (x : Cotangent I), ↑(cotangentToQuotientSquare I) x ∈ Submodule.restrictScalars R (cotangentIdeal I))\ny : Cotangent I\nx : { x // x ∈ I }\ne :\n  ↑((fun c =>\n          { val := ↑(cotangentToQuotientSquare I) c,\n            property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) })\n        (↑(toCotangent I) x)) =\n    ↑((fun c =>\n          { val := ↑(cotangentToQuotientSquare I) c,\n            property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) })\n        y)\n⊢ ↑(toCotangent I) x = y\n[PROOFSTEP]\nobtain ⟨y, rfl⟩ := I.toCotangent_surjective y\n[GOAL]\ncase refine_1.intro.intro\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nsrc✝ : Cotangent I →ₗ[R] { x // x ∈ Submodule.restrictScalars R (cotangentIdeal I) } :=\n  LinearMap.codRestrict (Submodule.restrictScalars R (cotangentIdeal I)) (cotangentToQuotientSquare I)\n    (_ : ∀ (x : Cotangent I), ↑(cotangentToQuotientSquare I) x ∈ Submodule.restrictScalars R (cotangentIdeal I))\nx y : { x // x ∈ I }\ne :\n  ↑((fun c =>\n          { val := ↑(cotangentToQuotientSquare I) c,\n            property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) })\n        (↑(toCotangent I) x)) =\n    ↑((fun c =>\n          { val := ↑(cotangentToQuotientSquare I) c,\n            property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) })\n        (↑(toCotangent I) y))\n⊢ ↑(toCotangent I) x = ↑(toCotangent I) y\n[PROOFSTEP]\nrw [I.toCotangent_eq]\n[GOAL]\ncase refine_1.intro.intro\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nsrc✝ : Cotangent I →ₗ[R] { x // x ∈ Submodule.restrictScalars R (cotangentIdeal I) } :=\n  LinearMap.codRestrict (Submodule.restrictScalars R (cotangentIdeal I)) (cotangentToQuotientSquare I)\n    (_ : ∀ (x : Cotangent I), ↑(cotangentToQuotientSquare I) x ∈ Submodule.restrictScalars R (cotangentIdeal I))\nx y : { x // x ∈ I }\ne :\n  ↑((fun c =>\n          { val := ↑(cotangentToQuotientSquare I) c,\n            property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) })\n        (↑(toCotangent I) x)) =\n    ↑((fun c =>\n          { val := ↑(cotangentToQuotientSquare I) c,\n            property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) })\n        (↑(toCotangent I) y))\n⊢ ↑x - ↑y ∈ I ^ 2\n[PROOFSTEP]\ndsimp only [toCotangent_to_quotient_square, Submodule.mkQ_apply] at e \n[GOAL]\ncase refine_1.intro.intro\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nsrc✝ : Cotangent I →ₗ[R] { x // x ∈ Submodule.restrictScalars R (cotangentIdeal I) } :=\n  LinearMap.codRestrict (Submodule.restrictScalars R (cotangentIdeal I)) (cotangentToQuotientSquare I)\n    (_ : ∀ (x : Cotangent I), ↑(cotangentToQuotientSquare I) x ∈ Submodule.restrictScalars R (cotangentIdeal I))\nx y : { x // x ∈ I }\ne : Submodule.Quotient.mk ↑x = Submodule.Quotient.mk ↑y\n⊢ ↑x - ↑y ∈ I ^ 2\n[PROOFSTEP]\nrwa [Submodule.Quotient.eq] at e \n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nsrc✝ : Cotangent I →ₗ[R] { x // x ∈ Submodule.restrictScalars R (cotangentIdeal I) } :=\n  LinearMap.codRestrict (Submodule.restrictScalars R (cotangentIdeal I)) (cotangentToQuotientSquare I)\n    (_ : ∀ (x : Cotangent I), ↑(cotangentToQuotientSquare I) x ∈ Submodule.restrictScalars R (cotangentIdeal I))\n⊢ Function.Surjective fun c =>\n    { val := ↑(cotangentToQuotientSquare I) c,\n      property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) }\n[PROOFSTEP]\nrintro ⟨_, x, hx, rfl⟩\n[GOAL]\ncase refine_2.mk.intro.intro\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nsrc✝ : Cotangent I →ₗ[R] { x // x ∈ Submodule.restrictScalars R (cotangentIdeal I) } :=\n  LinearMap.codRestrict (Submodule.restrictScalars R (cotangentIdeal I)) (cotangentToQuotientSquare I)\n    (_ : ∀ (x : Cotangent I), ↑(cotangentToQuotientSquare I) x ∈ Submodule.restrictScalars R (cotangentIdeal I))\nx : R\nhx : x ∈ ↑I\n⊢ ∃ a,\n    (fun c =>\n          { val := ↑(cotangentToQuotientSquare I) c,\n            property := (_ : ↑(cotangentToQuotientSquare I) c ∈ Submodule.restrictScalars R (cotangentIdeal I)) })\n        a =\n      { val := ↑(RingHom.toSemilinearMap (Quotient.mk (I ^ 2))) x,\n        property :=\n          (_ :\n            ∃ a,\n              a ∈ ↑I ∧\n                ↑(RingHom.toSemilinearMap (Quotient.mk (I ^ 2))) a =\n                  ↑(RingHom.toSemilinearMap (Quotient.mk (I ^ 2))) x) }\n[PROOFSTEP]\nexact ⟨I.toCotangent ⟨x, hx⟩, Subtype.ext rfl⟩\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nx : R\nhx : x ∈ I\n⊢ ↑(LinearEquiv.symm (cotangentEquivIdeal I))\n      { val := ↑(Submodule.mkQ (I ^ 2)) x,\n        property := (_ : ↑(Submodule.mkQ (I ^ 2)) x ∈ Submodule.map (Submodule.mkQ (I ^ 2)) I) } =\n    ↑(toCotangent I) { val := x, property := hx }\n[PROOFSTEP]\napply I.cotangentEquivIdeal.injective\n[GOAL]\ncase a\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nx : R\nhx : x ∈ I\n⊢ ↑(cotangentEquivIdeal I)\n      (↑(LinearEquiv.symm (cotangentEquivIdeal I))\n        { val := ↑(Submodule.mkQ (I ^ 2)) x,\n          property := (_ : ↑(Submodule.mkQ (I ^ 2)) x ∈ Submodule.map (Submodule.mkQ (I ^ 2)) I) }) =\n    ↑(cotangentEquivIdeal I) (↑(toCotangent I) { val := x, property := hx })\n[PROOFSTEP]\nrw [I.cotangentEquivIdeal.apply_symm_apply]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nx : R\nhx : x ∈ I\n⊢ { val := ↑(Submodule.mkQ (I ^ 2)) x,\n      property := (_ : ↑(Submodule.mkQ (I ^ 2)) x ∈ Submodule.map (Submodule.mkQ (I ^ 2)) I) } =\n    ↑(cotangentEquivIdeal I) (↑(toCotangent I) { val := x, property := hx })\n[PROOFSTEP]\next\n[GOAL]\ncase a.a\nR : Type u\nS : Type v\nS' : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra S R\ninst✝³ : CommSemiring S'\ninst✝² : Algebra S' R\ninst✝¹ : Algebra S S'\ninst✝ : IsScalarTower S S' R\nI : Ideal R\nx : R\nhx : x ∈ I\n⊢ ↑{ val := ↑(Submodule.mkQ (I ^ 2)) x,\n        property := (_ : ↑(Submodule.mkQ (I ^ 2)) x ∈ Submodule.map (Submodule.mkQ (I ^ 2)) I) } =\n    ↑(↑(cotangentEquivIdeal I) (↑(toCotangent I) { val := x, property := hx }))\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\n⊢ A ⧸ RingHom.ker ↑f ^ 2 →ₐ[R] B\n[PROOFSTEP]\nrefine { Ideal.Quotient.lift (RingHom.ker f.toRingHom ^ 2) f.toRingHom ?_ with commutes' := ?_ }\n[GOAL]\ncase refine_1\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\n⊢ ∀ (a : A), a ∈ RingHom.ker ↑f ^ 2 → ↑↑f a = 0\n[PROOFSTEP]\nintro a ha\n[GOAL]\ncase refine_1\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\na : A\nha : a ∈ RingHom.ker ↑f ^ 2\n⊢ ↑↑f a = 0\n[PROOFSTEP]\nexact Ideal.pow_le_self two_ne_zero ha\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nsrc✝ : A ⧸ RingHom.ker ↑f ^ 2 →+* B :=\n  Quotient.lift (RingHom.ker ↑f ^ 2) ↑f (_ : ∀ (a : A), a ∈ RingHom.ker ↑f ^ 2 → a ∈ RingHom.ker ↑f)\n⊢ ∀ (r : R),\n    OneHom.toFun\n        (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n              map_add' :=\n                (_ :\n                  ∀ (x y : A ⧸ RingHom.ker ↑f ^ 2),\n                    OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n        (↑(algebraMap R (A ⧸ RingHom.ker ↑f ^ 2)) r) =\n      ↑(algebraMap R B) r\n[PROOFSTEP]\nintro r\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nsrc✝ : A ⧸ RingHom.ker ↑f ^ 2 →+* B :=\n  Quotient.lift (RingHom.ker ↑f ^ 2) ↑f (_ : ∀ (a : A), a ∈ RingHom.ker ↑f ^ 2 → a ∈ RingHom.ker ↑f)\nr : R\n⊢ OneHom.toFun\n      (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : A ⧸ RingHom.ker ↑f ^ 2),\n                  OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n      (↑(algebraMap R (A ⧸ RingHom.ker ↑f ^ 2)) r) =\n    ↑(algebraMap R B) r\n[PROOFSTEP]\nrw [IsScalarTower.algebraMap_apply R A, RingHom.toFun_eq_coe, Ideal.Quotient.algebraMap_eq, Ideal.Quotient.lift_mk]\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nsrc✝ : A ⧸ RingHom.ker ↑f ^ 2 →+* B :=\n  Quotient.lift (RingHom.ker ↑f ^ 2) ↑f (_ : ∀ (a : A), a ∈ RingHom.ker ↑f ^ 2 → a ∈ RingHom.ker ↑f)\nr : R\n⊢ ↑↑f (↑(algebraMap R A) r) = ↑(algebraMap R B) r\n[PROOFSTEP]\nexact f.map_algebraMap r\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\n⊢ RingHom.ker ↑(AlgHom.kerSquareLift f) = cotangentIdeal (RingHom.ker ↑f)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\n⊢ RingHom.ker ↑(AlgHom.kerSquareLift f) ≤ cotangentIdeal (RingHom.ker ↑f)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase a\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nx : A ⧸ RingHom.ker ↑f ^ 2\nhx : x ∈ RingHom.ker ↑(AlgHom.kerSquareLift f)\n⊢ x ∈ cotangentIdeal (RingHom.ker ↑f)\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ := Ideal.Quotient.mk_surjective x\n[GOAL]\ncase a.intro\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nx : A\nhx : ↑(Quotient.mk (RingHom.ker ↑f ^ 2)) x ∈ RingHom.ker ↑(AlgHom.kerSquareLift f)\n⊢ ↑(Quotient.mk (RingHom.ker ↑f ^ 2)) x ∈ cotangentIdeal (RingHom.ker ↑f)\n[PROOFSTEP]\nexact ⟨x, hx, rfl⟩\n[GOAL]\ncase a\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\n⊢ cotangentIdeal (RingHom.ker ↑f) ≤ RingHom.ker ↑(AlgHom.kerSquareLift f)\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase a.intro.intro\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nx : A\nhx : x ∈ ↑(RingHom.ker ↑f)\n⊢ ↑(RingHom.toSemilinearMap (Quotient.mk (RingHom.ker ↑f ^ 2))) x ∈ RingHom.ker ↑(AlgHom.kerSquareLift f)\n[PROOFSTEP]\nexact hx\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\n⊢ (R ⧸ I ^ 2) ⧸ cotangentIdeal I ≃+* R ⧸ I\n[PROOFSTEP]\nrefine (Ideal.quotEquivOfEq (Ideal.map_eq_submodule_map _ _).symm).trans ?_\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\n⊢ (R ⧸ I ^ 2) ⧸ map (Quotient.mk (I ^ 2)) I ≃+* R ⧸ I\n[PROOFSTEP]\nrefine (DoubleQuot.quotQuotEquivQuotSup _ _).trans ?_\n[GOAL]\nR : Type u\nS : Type v\nS' : Type w\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommSemiring S\ninst✝⁸ : Algebra S R\ninst✝⁷ : CommSemiring S'\ninst✝⁶ : Algebra S' R\ninst✝⁵ : Algebra S S'\ninst✝⁴ : IsScalarTower S S' R\nI : Ideal R\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\n⊢ R ⧸ I ^ 2 ⊔ I ≃+* R ⧸ I\n[PROOFSTEP]\nexact Ideal.quotEquivOfEq (sup_eq_right.mpr <| Ideal.pow_le_self two_ne_zero)\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Ideal.Cotangent", "llama_tokens": 15264, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6893056040203135, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.3741987033076742}}
{"text": "[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\na : S\n⊢ 1 ⊗ₜ[R] a - a ⊗ₜ[R] 1 ∈ ideal R S\n[PROOFSTEP]\nsimp [RingHom.mem_ker]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\n⊢ ↑(tensorProductTo D) (x * y) =\n    ↑(TensorProduct.lmul' R) x • ↑(tensorProductTo D) y + ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) x\n[PROOFSTEP]\nrefine TensorProduct.induction_on x ?_ ?_ ?_\n[GOAL]\ncase refine_1\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\n⊢ ↑(tensorProductTo D) (0 * y) =\n    ↑(TensorProduct.lmul' R) 0 • ↑(tensorProductTo D) y + ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) 0\n[PROOFSTEP]\nrw [zero_mul, map_zero, map_zero, zero_smul, smul_zero, add_zero]\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\n⊢ ∀ (x y_1 : S),\n    ↑(tensorProductTo D) (x ⊗ₜ[R] y_1 * y) =\n      ↑(TensorProduct.lmul' R) (x ⊗ₜ[R] y_1) • ↑(tensorProductTo D) y +\n        ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) (x ⊗ₜ[R] y_1)\ncase refine_3\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\n⊢ ∀ (x y_1 : S ⊗[R] S),\n    ↑(tensorProductTo D) (x * y) =\n        ↑(TensorProduct.lmul' R) x • ↑(tensorProductTo D) y + ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) x →\n      ↑(tensorProductTo D) (y_1 * y) =\n          ↑(TensorProduct.lmul' R) y_1 • ↑(tensorProductTo D) y +\n            ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) y_1 →\n        ↑(tensorProductTo D) ((x + y_1) * y) =\n          ↑(TensorProduct.lmul' R) (x + y_1) • ↑(tensorProductTo D) y +\n            ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) (x + y_1)\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine_3\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\n⊢ ∀ (x y_1 : S ⊗[R] S),\n    ↑(tensorProductTo D) (x * y) =\n        ↑(TensorProduct.lmul' R) x • ↑(tensorProductTo D) y + ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) x →\n      ↑(tensorProductTo D) (y_1 * y) =\n          ↑(TensorProduct.lmul' R) y_1 • ↑(tensorProductTo D) y +\n            ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) y_1 →\n        ↑(tensorProductTo D) ((x + y_1) * y) =\n          ↑(TensorProduct.lmul' R) (x + y_1) • ↑(tensorProductTo D) y +\n            ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) (x + y_1)\n[PROOFSTEP]\nintro x₁ y₁ h₁ h₂\n[GOAL]\ncase refine_3\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y x₁ y₁ : S ⊗[R] S\nh₁ :\n  ↑(tensorProductTo D) (x₁ * y) =\n    ↑(TensorProduct.lmul' R) x₁ • ↑(tensorProductTo D) y + ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) x₁\nh₂ :\n  ↑(tensorProductTo D) (y₁ * y) =\n    ↑(TensorProduct.lmul' R) y₁ • ↑(tensorProductTo D) y + ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) y₁\n⊢ ↑(tensorProductTo D) ((x₁ + y₁) * y) =\n    ↑(TensorProduct.lmul' R) (x₁ + y₁) • ↑(tensorProductTo D) y +\n      ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) (x₁ + y₁)\n[PROOFSTEP]\nrw [add_mul, map_add, map_add, map_add, add_smul, smul_add, h₁, h₂, add_add_add_comm]\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\n⊢ ∀ (x y_1 : S),\n    ↑(tensorProductTo D) (x ⊗ₜ[R] y_1 * y) =\n      ↑(TensorProduct.lmul' R) (x ⊗ₜ[R] y_1) • ↑(tensorProductTo D) y +\n        ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) (x ⊗ₜ[R] y_1)\n[PROOFSTEP]\nintro x₁ x₂\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\nx₁ x₂ : S\n⊢ ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂ * y) =\n    ↑(TensorProduct.lmul' R) (x₁ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) y +\n      ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂)\n[PROOFSTEP]\nrefine TensorProduct.induction_on y ?_ ?_ ?_\n[GOAL]\ncase refine_2.refine_1\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\nx₁ x₂ : S\n⊢ ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂ * 0) =\n    ↑(TensorProduct.lmul' R) (x₁ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) 0 +\n      ↑(TensorProduct.lmul' R) 0 • ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂)\n[PROOFSTEP]\nrw [mul_zero, map_zero, map_zero, zero_smul, smul_zero, add_zero]\n[GOAL]\ncase refine_2.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\nx₁ x₂ : S\n⊢ ∀ (x y : S),\n    ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂ * x ⊗ₜ[R] y) =\n      ↑(TensorProduct.lmul' R) (x₁ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) (x ⊗ₜ[R] y) +\n        ↑(TensorProduct.lmul' R) (x ⊗ₜ[R] y) • ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂)\ncase refine_2.refine_3\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\nx₁ x₂ : S\n⊢ ∀ (x y : S ⊗[R] S),\n    ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂ * x) =\n        ↑(TensorProduct.lmul' R) (x₁ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) x +\n          ↑(TensorProduct.lmul' R) x • ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂) →\n      ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂ * y) =\n          ↑(TensorProduct.lmul' R) (x₁ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) y +\n            ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂) →\n        ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂ * (x + y)) =\n          ↑(TensorProduct.lmul' R) (x₁ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) (x + y) +\n            ↑(TensorProduct.lmul' R) (x + y) • ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂)\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine_2.refine_3\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\nx₁ x₂ : S\n⊢ ∀ (x y : S ⊗[R] S),\n    ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂ * x) =\n        ↑(TensorProduct.lmul' R) (x₁ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) x +\n          ↑(TensorProduct.lmul' R) x • ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂) →\n      ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂ * y) =\n          ↑(TensorProduct.lmul' R) (x₁ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) y +\n            ↑(TensorProduct.lmul' R) y • ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂) →\n        ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂ * (x + y)) =\n          ↑(TensorProduct.lmul' R) (x₁ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) (x + y) +\n            ↑(TensorProduct.lmul' R) (x + y) • ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂)\n[PROOFSTEP]\nintro x₁ y₁ h₁ h₂\n[GOAL]\ncase refine_2.refine_3\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\nx₁✝ x₂ : S\nx₁ y₁ : S ⊗[R] S\nh₁ :\n  ↑(tensorProductTo D) (x₁✝ ⊗ₜ[R] x₂ * x₁) =\n    ↑(TensorProduct.lmul' R) (x₁✝ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) x₁ +\n      ↑(TensorProduct.lmul' R) x₁ • ↑(tensorProductTo D) (x₁✝ ⊗ₜ[R] x₂)\nh₂ :\n  ↑(tensorProductTo D) (x₁✝ ⊗ₜ[R] x₂ * y₁) =\n    ↑(TensorProduct.lmul' R) (x₁✝ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) y₁ +\n      ↑(TensorProduct.lmul' R) y₁ • ↑(tensorProductTo D) (x₁✝ ⊗ₜ[R] x₂)\n⊢ ↑(tensorProductTo D) (x₁✝ ⊗ₜ[R] x₂ * (x₁ + y₁)) =\n    ↑(TensorProduct.lmul' R) (x₁✝ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) (x₁ + y₁) +\n      ↑(TensorProduct.lmul' R) (x₁ + y₁) • ↑(tensorProductTo D) (x₁✝ ⊗ₜ[R] x₂)\n[PROOFSTEP]\nrw [mul_add, map_add, map_add, map_add, add_smul, smul_add, h₁, h₂, add_add_add_comm]\n[GOAL]\ncase refine_2.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx y : S ⊗[R] S\nx₁ x₂ : S\n⊢ ∀ (x y : S),\n    ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂ * x ⊗ₜ[R] y) =\n      ↑(TensorProduct.lmul' R) (x₁ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) (x ⊗ₜ[R] y) +\n        ↑(TensorProduct.lmul' R) (x ⊗ₜ[R] y) • ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂)\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase refine_2.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx✝ y✝ : S ⊗[R] S\nx₁ x₂ x y : S\n⊢ ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂ * x ⊗ₜ[R] y) =\n    ↑(TensorProduct.lmul' R) (x₁ ⊗ₜ[R] x₂) • ↑(tensorProductTo D) (x ⊗ₜ[R] y) +\n      ↑(TensorProduct.lmul' R) (x ⊗ₜ[R] y) • ↑(tensorProductTo D) (x₁ ⊗ₜ[R] x₂)\n[PROOFSTEP]\nsimp only [TensorProduct.tmul_mul_tmul, Derivation.tensorProductTo, TensorProduct.AlgebraTensorModule.lift_apply,\n  TensorProduct.lift.tmul', TensorProduct.lmul'_apply_tmul]\n[GOAL]\ncase refine_2.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx✝ y✝ : S ⊗[R] S\nx₁ x₂ x y : S\n⊢ ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (LinearMap.lsmul S (S →ₗ[R] M))) ↑D))) ((x₁ * x) ⊗ₜ[R] (x₂ * y)) =\n    (x₁ * x₂) • ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (LinearMap.lsmul S (S →ₗ[R] M))) ↑D))) (x ⊗ₜ[R] y) +\n      (x * y) • ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (LinearMap.lsmul S (S →ₗ[R] M))) ↑D))) (x₁ ⊗ₜ[R] x₂)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine_2.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx✝ y✝ : S ⊗[R] S\nx₁ x₂ x y : S\n⊢ (x₁ * x) • ↑D (x₂ * y) = (x₁ * x₂) • x • ↑D y + (x * y) • x₁ • ↑D x₂\n[PROOFSTEP]\nrw [D.leibniz]\n[GOAL]\ncase refine_2.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx✝ y✝ : S ⊗[R] S\nx₁ x₂ x y : S\n⊢ (x₁ * x) • (x₂ • ↑D y + y • ↑D x₂) = (x₁ * x₂) • x • ↑D y + (x * y) • x₁ • ↑D x₂\n[PROOFSTEP]\nsimp only [smul_smul, smul_add, mul_comm (x * y) x₁, mul_right_comm x₁ x₂, ← mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) = Submodule.restrictScalars S (ideal R S)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) ≤ Submodule.restrictScalars S (ideal R S)\n[PROOFSTEP]\nrw [Submodule.span_le]\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) ⊆ ↑(Submodule.restrictScalars S (ideal R S))\n[PROOFSTEP]\nrintro _ ⟨s, rfl⟩\n[GOAL]\ncase a.intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\ns : S\n⊢ (fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) s ∈ ↑(Submodule.restrictScalars S (ideal R S))\n[PROOFSTEP]\nexact KaehlerDifferential.one_smul_sub_smul_one_mem_ideal _ _\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Submodule.restrictScalars S (ideal R S) ≤ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nrintro x (hx : _ = _)\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : ↑(TensorProduct.lmul' R) x = 0\n⊢ x ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nhave : x - TensorProduct.lmul' (S := S) R x ⊗ₜ[R] (1 : S) = x := by rw [hx, TensorProduct.zero_tmul, sub_zero]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : ↑(TensorProduct.lmul' R) x = 0\n⊢ x - ↑(TensorProduct.lmul' R) x ⊗ₜ[R] 1 = x\n[PROOFSTEP]\nrw [hx, TensorProduct.zero_tmul, sub_zero]\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : ↑(TensorProduct.lmul' R) x = 0\nthis : x - ↑(TensorProduct.lmul' R) x ⊗ₜ[R] 1 = x\n⊢ x ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : ↑(TensorProduct.lmul' R) x = 0\nthis : x - ↑(TensorProduct.lmul' R) x ⊗ₜ[R] 1 = x\n⊢ x - ↑(TensorProduct.lmul' R) x ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nclear this hx\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\n⊢ x - ↑(TensorProduct.lmul' R) x ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nrefine TensorProduct.induction_on x ?_ ?_ ?_\n[GOAL]\ncase a.refine_1\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\n⊢ 0 - ↑(TensorProduct.lmul' R) 0 ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nrw [map_zero, TensorProduct.zero_tmul, sub_zero]\n[GOAL]\ncase a.refine_1\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\n⊢ 0 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nexact zero_mem _\n[GOAL]\ncase a.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\n⊢ ∀ (x y : S),\n    x ⊗ₜ[R] y - ↑(TensorProduct.lmul' R) (x ⊗ₜ[R] y) ⊗ₜ[R] 1 ∈\n      Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase a.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ : S ⊗[R] S\nx y : S\n⊢ x ⊗ₜ[R] y - ↑(TensorProduct.lmul' R) (x ⊗ₜ[R] y) ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nhave : x ⊗ₜ[R] y - (x * y) ⊗ₜ[R] (1 : S) = x • ((1 : S) ⊗ₜ y - y ⊗ₜ (1 : S)) := by\n  simp_rw [smul_sub, TensorProduct.smul_tmul', smul_eq_mul, mul_one]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ : S ⊗[R] S\nx y : S\n⊢ x ⊗ₜ[R] y - (x * y) ⊗ₜ[R] 1 = x • (1 ⊗ₜ[R] y - y ⊗ₜ[R] 1)\n[PROOFSTEP]\nsimp_rw [smul_sub, TensorProduct.smul_tmul', smul_eq_mul, mul_one]\n[GOAL]\ncase a.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ : S ⊗[R] S\nx y : S\nthis : x ⊗ₜ[R] y - (x * y) ⊗ₜ[R] 1 = x • (1 ⊗ₜ[R] y - y ⊗ₜ[R] 1)\n⊢ x ⊗ₜ[R] y - ↑(TensorProduct.lmul' R) (x ⊗ₜ[R] y) ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nrw [TensorProduct.lmul'_apply_tmul, this]\n[GOAL]\ncase a.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ : S ⊗[R] S\nx y : S\nthis : x ⊗ₜ[R] y - (x * y) ⊗ₜ[R] 1 = x • (1 ⊗ₜ[R] y - y ⊗ₜ[R] 1)\n⊢ x • (1 ⊗ₜ[R] y - y ⊗ₜ[R] 1) ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nrefine Submodule.smul_mem _ x ?_\n[GOAL]\ncase a.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ : S ⊗[R] S\nx y : S\nthis : x ⊗ₜ[R] y - (x * y) ⊗ₜ[R] 1 = x • (1 ⊗ₜ[R] y - y ⊗ₜ[R] 1)\n⊢ 1 ⊗ₜ[R] y - y ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\napply Submodule.subset_span\n[GOAL]\ncase a.refine_2.a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ : S ⊗[R] S\nx y : S\nthis : x ⊗ₜ[R] y - (x * y) ⊗ₜ[R] 1 = x • (1 ⊗ₜ[R] y - y ⊗ₜ[R] 1)\n⊢ 1 ⊗ₜ[R] y - y ⊗ₜ[R] 1 ∈ Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1\n[PROOFSTEP]\nexact Set.mem_range_self y\n[GOAL]\ncase a.refine_3\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\n⊢ ∀ (x y : S ⊗[R] S),\n    x - ↑(TensorProduct.lmul' R) x ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) →\n      y - ↑(TensorProduct.lmul' R) y ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) →\n        x + y - ↑(TensorProduct.lmul' R) (x + y) ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase a.refine_3\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ x y : S ⊗[R] S\nhx : x - ↑(TensorProduct.lmul' R) x ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\nhy : y - ↑(TensorProduct.lmul' R) y ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n⊢ x + y - ↑(TensorProduct.lmul' R) (x + y) ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nrw [map_add, TensorProduct.add_tmul, ← sub_add_sub_comm]\n[GOAL]\ncase a.refine_3\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ x y : S ⊗[R] S\nhx : x - ↑(TensorProduct.lmul' R) x ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\nhy : y - ↑(TensorProduct.lmul' R) y ⊗ₜ[R] 1 ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n⊢ x - ↑(TensorProduct.lmul' R) x ⊗ₜ[R] 1 + (y - ↑(TensorProduct.lmul' R) y ⊗ₜ[R] 1) ∈\n    Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nexact add_mem hx hy\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Ideal.span (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) = ideal R S\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Ideal.span (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) ≤ ideal R S\n[PROOFSTEP]\nrw [Ideal.span_le]\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) ⊆ ↑(ideal R S)\n[PROOFSTEP]\nrintro _ ⟨s, rfl⟩\n[GOAL]\ncase a.intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\ns : S\n⊢ (fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) s ∈ ↑(ideal R S)\n[PROOFSTEP]\nexact KaehlerDifferential.one_smul_sub_smul_one_mem_ideal _ _\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ ideal R S ≤ Ideal.span (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n[PROOFSTEP]\nchange (KaehlerDifferential.ideal R S).restrictScalars S ≤ (Ideal.span _).restrictScalars S\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Submodule.restrictScalars S (ideal R S) ≤\n    Submodule.restrictScalars S (Ideal.span (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1))\n[PROOFSTEP]\nrw [← KaehlerDifferential.submodule_span_range_eq_ideal, Ideal.span]\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) ≤\n    Submodule.restrictScalars S (Submodule.span (S ⊗[R] S) (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1))\n[PROOFSTEP]\nconv_rhs => rw [← Submodule.span_span_of_tower S]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n| Submodule.restrictScalars S (Submodule.span (S ⊗[R] S) (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1))\n[PROOFSTEP]\nrw [← Submodule.span_span_of_tower S]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n| Submodule.restrictScalars S (Submodule.span (S ⊗[R] S) (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1))\n[PROOFSTEP]\nrw [← Submodule.span_span_of_tower S]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n| Submodule.restrictScalars S (Submodule.span (S ⊗[R] S) (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1))\n[PROOFSTEP]\nrw [← Submodule.span_span_of_tower S]\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) ≤\n    Submodule.restrictScalars S\n      (Submodule.span (S ⊗[R] S) ↑(Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)))\n[PROOFSTEP]\nexact Submodule.subset_span\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ AddCommGroup (KaehlerDifferential R S)\n[PROOFSTEP]\nunfold KaehlerDifferential\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ AddCommGroup (Ideal.Cotangent (KaehlerDifferential.ideal R S))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ ↑(DLinearMap R S) 1 = 0\n[PROOFSTEP]\ndsimp [KaehlerDifferential.DLinearMap_apply]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Submodule.Quotient.mk { val := 1 ⊗ₜ[R] 1 - 1 ⊗ₜ[R] 1, property := (_ : 1 ⊗ₜ[R] 1 - 1 ⊗ₜ[R] 1 ∈ ideal R S) } = 0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_val\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ 1 ⊗ₜ[R] 1 - 1 ⊗ₜ[R] 1 = 0\n[PROOFSTEP]\nrw [sub_self]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\n⊢ ↑(DLinearMap R S) (a * b) = a • ↑(DLinearMap R S) b + b • ↑(DLinearMap R S) a\n[PROOFSTEP]\nhave : LinearMap.CompatibleSMul { x // x ∈ ideal R S } (Ω[S⁄R]) S (S ⊗[R] S) := inferInstance\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\nthis : LinearMap.CompatibleSMul { x // x ∈ ideal R S } (Ω[S⁄R]) S (S ⊗[R] S)\n⊢ ↑(DLinearMap R S) (a * b) = a • ↑(DLinearMap R S) b + b • ↑(DLinearMap R S) a\n[PROOFSTEP]\ndsimp [KaehlerDifferential.DLinearMap_apply, -Ideal.toCotangent_apply]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\nthis : LinearMap.CompatibleSMul { x // x ∈ ideal R S } (Ω[S⁄R]) S (S ⊗[R] S)\n⊢ ↑(Ideal.toCotangent (ideal R S))\n      { val := 1 ⊗ₜ[R] (a * b) - (a * b) ⊗ₜ[R] 1, property := (_ : 1 ⊗ₜ[R] (a * b) - (a * b) ⊗ₜ[R] 1 ∈ ideal R S) } =\n    a •\n        ↑(Ideal.toCotangent (ideal R S))\n          { val := 1 ⊗ₜ[R] b - b ⊗ₜ[R] 1, property := (_ : 1 ⊗ₜ[R] b - b ⊗ₜ[R] 1 ∈ ideal R S) } +\n      b •\n        ↑(Ideal.toCotangent (ideal R S))\n          { val := 1 ⊗ₜ[R] a - a ⊗ₜ[R] 1, property := (_ : 1 ⊗ₜ[R] a - a ⊗ₜ[R] 1 ∈ ideal R S) }\n[PROOFSTEP]\nrw [← LinearMap.map_smul_of_tower (M₂ := Ω[S⁄R]), ← LinearMap.map_smul_of_tower (M₂ := Ω[S⁄R]), ← map_add,\n  Ideal.toCotangent_eq, pow_two]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\nthis : LinearMap.CompatibleSMul { x // x ∈ ideal R S } (Ω[S⁄R]) S (S ⊗[R] S)\n⊢ ↑{ val := 1 ⊗ₜ[R] (a * b) - (a * b) ⊗ₜ[R] 1, property := (_ : 1 ⊗ₜ[R] (a * b) - (a * b) ⊗ₜ[R] 1 ∈ ideal R S) } -\n      ↑(a • { val := 1 ⊗ₜ[R] b - b ⊗ₜ[R] 1, property := (_ : 1 ⊗ₜ[R] b - b ⊗ₜ[R] 1 ∈ ideal R S) } +\n          b • { val := 1 ⊗ₜ[R] a - a ⊗ₜ[R] 1, property := (_ : 1 ⊗ₜ[R] a - a ⊗ₜ[R] 1 ∈ ideal R S) }) ∈\n    ideal R S * ideal R S\n[PROOFSTEP]\nconvert\n  Submodule.mul_mem_mul (KaehlerDifferential.one_smul_sub_smul_one_mem_ideal R a : _)\n    (KaehlerDifferential.one_smul_sub_smul_one_mem_ideal R b : _) using\n  1\n[GOAL]\ncase h.e'_4\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\nthis : LinearMap.CompatibleSMul { x // x ∈ ideal R S } (Ω[S⁄R]) S (S ⊗[R] S)\n⊢ ↑{ val := 1 ⊗ₜ[R] (a * b) - (a * b) ⊗ₜ[R] 1, property := (_ : 1 ⊗ₜ[R] (a * b) - (a * b) ⊗ₜ[R] 1 ∈ ideal R S) } -\n      ↑(a • { val := 1 ⊗ₜ[R] b - b ⊗ₜ[R] 1, property := (_ : 1 ⊗ₜ[R] b - b ⊗ₜ[R] 1 ∈ ideal R S) } +\n          b • { val := 1 ⊗ₜ[R] a - a ⊗ₜ[R] 1, property := (_ : 1 ⊗ₜ[R] a - a ⊗ₜ[R] 1 ∈ ideal R S) }) =\n    (1 ⊗ₜ[R] a - a ⊗ₜ[R] 1) * (1 ⊗ₜ[R] b - b ⊗ₜ[R] 1)\n[PROOFSTEP]\nsimp only [AddSubgroupClass.coe_sub, Submodule.coe_add, Submodule.coe_mk, TensorProduct.tmul_mul_tmul, mul_sub, sub_mul,\n  mul_comm b, Submodule.coe_smul_of_tower, smul_sub, TensorProduct.smul_tmul', smul_eq_mul, mul_one]\n[GOAL]\ncase h.e'_4\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\nthis : LinearMap.CompatibleSMul { x // x ∈ ideal R S } (Ω[S⁄R]) S (S ⊗[R] S)\n⊢ 1 ⊗ₜ[R] (a * b) - (a * b) ⊗ₜ[R] 1 - (a ⊗ₜ[R] b - (a * b) ⊗ₜ[R] 1 + (b ⊗ₜ[R] a - (a * b) ⊗ₜ[R] 1)) =\n    1 ⊗ₜ[R] (a * b) - a ⊗ₜ[R] (1 * b) - ((1 * b) ⊗ₜ[R] a - (a * b) ⊗ₜ[R] 1)\n[PROOFSTEP]\nring_nf\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Submodule.span S (Set.range ↑(D R S)) = ⊤\n[PROOFSTEP]\nrw [_root_.eq_top_iff]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ ⊤ ≤ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nrintro x -\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : Ω[S⁄R]\n⊢ x ∈ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nobtain ⟨⟨x, hx⟩, rfl⟩ := Ideal.toCotangent_surjective _ x\n[GOAL]\ncase intro.mk\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : x ∈ ideal R S\n⊢ ↑(Ideal.toCotangent (ideal R S)) { val := x, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nhave : x ∈ (KaehlerDifferential.ideal R S).restrictScalars S := hx\n[GOAL]\ncase intro.mk\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : x ∈ ideal R S\nthis : x ∈ Submodule.restrictScalars S (ideal R S)\n⊢ ↑(Ideal.toCotangent (ideal R S)) { val := x, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nrw [← KaehlerDifferential.submodule_span_range_eq_ideal] at this \n[GOAL]\ncase intro.mk\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : x ∈ ideal R S\nthis : x ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n⊢ ↑(Ideal.toCotangent (ideal R S)) { val := x, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nsuffices\n  ∃ hx, (KaehlerDifferential.ideal R S).toCotangent ⟨x, hx⟩ ∈ Submodule.span S (Set.range <| KaehlerDifferential.D R S)\n  by exact this.choose_spec\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : x ∈ ideal R S\nthis✝ : x ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\nthis : ∃ hx, ↑(Ideal.toCotangent (ideal R S)) { val := x, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))\n⊢ ↑(Ideal.toCotangent (ideal R S)) { val := x, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nexact this.choose_spec\n[GOAL]\ncase intro.mk\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : x ∈ ideal R S\nthis : x ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n⊢ ∃ hx, ↑(Ideal.toCotangent (ideal R S)) { val := x, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nrefine Submodule.span_induction this ?_ ?_ ?_ ?_\n[GOAL]\ncase intro.mk.refine_1\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : x ∈ ideal R S\nthis : x ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n⊢ ∀ (x : S ⊗[R] S),\n    (x ∈ Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) →\n      ∃ hx, ↑(Ideal.toCotangent (ideal R S)) { val := x, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩\n[GOAL]\ncase intro.mk.refine_1.intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ : S ⊗[R] S\nhx : x✝ ∈ ideal R S\nthis : x✝ ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\nx : S\n⊢ ∃ hx,\n    ↑(Ideal.toCotangent (ideal R S)) { val := (fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) x, property := hx } ∈\n      Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nrefine ⟨KaehlerDifferential.one_smul_sub_smul_one_mem_ideal R x, ?_⟩\n[GOAL]\ncase intro.mk.refine_1.intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ : S ⊗[R] S\nhx : x✝ ∈ ideal R S\nthis : x✝ ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\nx : S\n⊢ ↑(Ideal.toCotangent (ideal R S))\n      { val := (fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) x, property := (_ : 1 ⊗ₜ[R] x - x ⊗ₜ[R] 1 ∈ ideal R S) } ∈\n    Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\napply Submodule.subset_span\n[GOAL]\ncase intro.mk.refine_1.intro.a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ : S ⊗[R] S\nhx : x✝ ∈ ideal R S\nthis : x✝ ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\nx : S\n⊢ ↑(Ideal.toCotangent (ideal R S))\n      { val := (fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1) x, property := (_ : 1 ⊗ₜ[R] x - x ⊗ₜ[R] 1 ∈ ideal R S) } ∈\n    Set.range ↑(D R S)\n[PROOFSTEP]\nexact ⟨x, KaehlerDifferential.DLinearMap_apply R S x⟩\n[GOAL]\ncase intro.mk.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : x ∈ ideal R S\nthis : x ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n⊢ ∃ hx, ↑(Ideal.toCotangent (ideal R S)) { val := 0, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nexact ⟨zero_mem _, Submodule.zero_mem _⟩\n[GOAL]\ncase intro.mk.refine_3\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : x ∈ ideal R S\nthis : x ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n⊢ ∀ (x y : S ⊗[R] S),\n    (∃ hx, ↑(Ideal.toCotangent (ideal R S)) { val := x, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))) →\n      (∃ hx, ↑(Ideal.toCotangent (ideal R S)) { val := y, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))) →\n        ∃ hx, ↑(Ideal.toCotangent (ideal R S)) { val := x + y, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nrintro x y ⟨hx₁, hx₂⟩ ⟨hy₁, hy₂⟩\n[GOAL]\ncase intro.mk.refine_3.intro.intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ : S ⊗[R] S\nhx : x✝ ∈ ideal R S\nthis : x✝ ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\nx y : S ⊗[R] S\nhx₁ : x ∈ ideal R S\nhx₂ : ↑(Ideal.toCotangent (ideal R S)) { val := x, property := hx₁ } ∈ Submodule.span S (Set.range ↑(D R S))\nhy₁ : y ∈ ideal R S\nhy₂ : ↑(Ideal.toCotangent (ideal R S)) { val := y, property := hy₁ } ∈ Submodule.span S (Set.range ↑(D R S))\n⊢ ∃ hx, ↑(Ideal.toCotangent (ideal R S)) { val := x + y, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nexact ⟨add_mem hx₁ hy₁, Submodule.add_mem _ hx₂ hy₂⟩\n[GOAL]\ncase intro.mk.refine_4\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S ⊗[R] S\nhx : x ∈ ideal R S\nthis : x ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\n⊢ ∀ (a : S) (x : S ⊗[R] S),\n    (∃ hx, ↑(Ideal.toCotangent (ideal R S)) { val := x, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))) →\n      ∃ hx, ↑(Ideal.toCotangent (ideal R S)) { val := a • x, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nrintro r x ⟨hx₁, hx₂⟩\n[GOAL]\ncase intro.mk.refine_4.intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx✝ : S ⊗[R] S\nhx : x✝ ∈ ideal R S\nthis : x✝ ∈ Submodule.span S (Set.range fun s => 1 ⊗ₜ[R] s - s ⊗ₜ[R] 1)\nr : S\nx : S ⊗[R] S\nhx₁ : x ∈ ideal R S\nhx₂ : ↑(Ideal.toCotangent (ideal R S)) { val := x, property := hx₁ } ∈ Submodule.span S (Set.range ↑(D R S))\n⊢ ∃ hx, ↑(Ideal.toCotangent (ideal R S)) { val := r • x, property := hx } ∈ Submodule.span S (Set.range ↑(D R S))\n[PROOFSTEP]\nexact ⟨((KaehlerDifferential.ideal R S).restrictScalars S).smul_mem r hx₁, Submodule.smul_mem _ r hx₂⟩\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\n⊢ Ω[S⁄R] →ₗ[S] M\n[PROOFSTEP]\nrefine\n  LinearMap.comp\n    ((((KaehlerDifferential.ideal R S) • (⊤ : Submodule (S ⊗[R] S) (KaehlerDifferential.ideal R S))).restrictScalars\n          S).liftQ\n      ?_ ?_)\n    (Submodule.Quotient.restrictScalarsEquiv S _).symm.toLinearMap\n[GOAL]\ncase refine_1\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\n⊢ { x // x ∈ KaehlerDifferential.ideal R S } →ₗ[S] M\n[PROOFSTEP]\nexact D.tensorProductTo.comp ((KaehlerDifferential.ideal R S).subtype.restrictScalars S)\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\n⊢ Submodule.restrictScalars S (KaehlerDifferential.ideal R S • ⊤) ≤\n    LinearMap.ker (LinearMap.comp (tensorProductTo D) (↑S (Submodule.subtype (KaehlerDifferential.ideal R S))))\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx : { x // x ∈ KaehlerDifferential.ideal R S }\nhx : x ∈ Submodule.restrictScalars S (KaehlerDifferential.ideal R S • ⊤)\n⊢ x ∈ LinearMap.ker (LinearMap.comp (tensorProductTo D) (↑S (Submodule.subtype (KaehlerDifferential.ideal R S))))\n[PROOFSTEP]\nchange _ = _\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx : { x // x ∈ KaehlerDifferential.ideal R S }\nhx : x ∈ Submodule.restrictScalars S (KaehlerDifferential.ideal R S • ⊤)\n⊢ ↑(LinearMap.comp (tensorProductTo D) (↑S (Submodule.subtype (KaehlerDifferential.ideal R S)))) x = 0\n[PROOFSTEP]\nrefine Submodule.smul_induction_on hx ?_ ?_\n[GOAL]\ncase refine_2.refine_1\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx : { x // x ∈ KaehlerDifferential.ideal R S }\nhx : x ∈ Submodule.restrictScalars S (KaehlerDifferential.ideal R S • ⊤)\n⊢ ∀ (r : S ⊗[R] S),\n    r ∈ KaehlerDifferential.ideal R S →\n      ∀ (n : { x // x ∈ KaehlerDifferential.ideal R S }),\n        n ∈ ⊤ →\n          ↑(LinearMap.comp (tensorProductTo D) (↑S (Submodule.subtype (KaehlerDifferential.ideal R S)))) (r • n) = 0\n[PROOFSTEP]\nrintro x (hx : _ = _) y -\n[GOAL]\ncase refine_2.refine_1\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx✝ : { x // x ∈ KaehlerDifferential.ideal R S }\nhx✝ : x✝ ∈ Submodule.restrictScalars S (KaehlerDifferential.ideal R S • ⊤)\nx : S ⊗[R] S\nhx : ↑(TensorProduct.lmul' R) x = 0\ny : { x // x ∈ KaehlerDifferential.ideal R S }\n⊢ ↑(LinearMap.comp (tensorProductTo D) (↑S (Submodule.subtype (KaehlerDifferential.ideal R S)))) (x • y) = 0\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine_2.refine_1\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx✝ : { x // x ∈ KaehlerDifferential.ideal R S }\nhx✝ : x✝ ∈ Submodule.restrictScalars S (KaehlerDifferential.ideal R S • ⊤)\nx : S ⊗[R] S\nhx : ↑(TensorProduct.lmul' R) x = 0\ny : { x // x ∈ KaehlerDifferential.ideal R S }\n⊢ ↑(tensorProductTo D) ↑(x • y) = 0\n[PROOFSTEP]\nrw [show ↑(x • y) = x * ↑y by rfl, Derivation.tensorProductTo_mul, hx, y.prop, zero_smul, zero_smul, zero_add]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx✝ : { x // x ∈ KaehlerDifferential.ideal R S }\nhx✝ : x✝ ∈ Submodule.restrictScalars S (KaehlerDifferential.ideal R S • ⊤)\nx : S ⊗[R] S\nhx : ↑(TensorProduct.lmul' R) x = 0\ny : { x // x ∈ KaehlerDifferential.ideal R S }\n⊢ ↑(x • y) = x * ↑y\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine_2.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx : { x // x ∈ KaehlerDifferential.ideal R S }\nhx : x ∈ Submodule.restrictScalars S (KaehlerDifferential.ideal R S • ⊤)\n⊢ ∀ (x y : { x // x ∈ KaehlerDifferential.ideal R S }),\n    ↑(LinearMap.comp (tensorProductTo D) (↑S (Submodule.subtype (KaehlerDifferential.ideal R S)))) x = 0 →\n      ↑(LinearMap.comp (tensorProductTo D) (↑S (Submodule.subtype (KaehlerDifferential.ideal R S)))) y = 0 →\n        ↑(LinearMap.comp (tensorProductTo D) (↑S (Submodule.subtype (KaehlerDifferential.ideal R S)))) (x + y) = 0\n[PROOFSTEP]\nintro x y ex ey\n[GOAL]\ncase refine_2.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\nx✝ : { x // x ∈ KaehlerDifferential.ideal R S }\nhx : x✝ ∈ Submodule.restrictScalars S (KaehlerDifferential.ideal R S • ⊤)\nx y : { x // x ∈ KaehlerDifferential.ideal R S }\nex : ↑(LinearMap.comp (tensorProductTo D) (↑S (Submodule.subtype (KaehlerDifferential.ideal R S)))) x = 0\ney : ↑(LinearMap.comp (tensorProductTo D) (↑S (Submodule.subtype (KaehlerDifferential.ideal R S)))) y = 0\n⊢ ↑(LinearMap.comp (tensorProductTo D) (↑S (Submodule.subtype (KaehlerDifferential.ideal R S)))) (x + y) = 0\n[PROOFSTEP]\nrw [map_add, ex, ey, zero_add]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\n⊢ ↑(LinearMap.compDer (liftKaehlerDifferential D)) (KaehlerDifferential.D R S) = D\n[PROOFSTEP]\next a\n[GOAL]\ncase H\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\na : S\n⊢ ↑(↑(LinearMap.compDer (liftKaehlerDifferential D)) (KaehlerDifferential.D R S)) a = ↑D a\n[PROOFSTEP]\ndsimp [KaehlerDifferential.D_apply]\n[GOAL]\ncase H\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\na : S\n⊢ ↑(liftKaehlerDifferential D)\n      (Submodule.Quotient.mk\n        { val := 1 ⊗ₜ[R] a - a ⊗ₜ[R] 1, property := (_ : 1 ⊗ₜ[R] a - a ⊗ₜ[R] 1 ∈ KaehlerDifferential.ideal R S) }) =\n    ↑D a\n[PROOFSTEP]\nrefine (D.liftKaehlerDifferential_apply _).trans ?_\n[GOAL]\ncase H\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD : Derivation R S M\na : S\n⊢ ↑(tensorProductTo D)\n      ↑{ val := 1 ⊗ₜ[R] a - a ⊗ₜ[R] 1, property := (_ : 1 ⊗ₜ[R] a - a ⊗ₜ[R] 1 ∈ KaehlerDifferential.ideal R S) } =\n    ↑D a\n[PROOFSTEP]\nrw [Subtype.coe_mk, map_sub, Derivation.tensorProductTo_tmul, Derivation.tensorProductTo_tmul, one_smul,\n  D.map_one_eq_zero, smul_zero, sub_zero]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD' : Derivation R S M\nx : S\n⊢ ↑(liftKaehlerDifferential D') (↑(KaehlerDifferential.D R S) x) = ↑D' x\n[PROOFSTEP]\nrw [← Derivation.congr_fun D'.liftKaehlerDifferential_comp x]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nD' : Derivation R S M\nx : S\n⊢ ↑(liftKaehlerDifferential D') (↑(KaehlerDifferential.D R S) x) =\n    ↑(↑(LinearMap.compDer (liftKaehlerDifferential D')) (KaehlerDifferential.D R S)) x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\n⊢ f = f'\n[PROOFSTEP]\napply LinearMap.ext\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\n⊢ ∀ (x : Ω[S⁄R]), ↑f x = ↑f' x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\nx : Ω[S⁄R]\n⊢ ↑f x = ↑f' x\n[PROOFSTEP]\nhave : x ∈ Submodule.span S (Set.range <| KaehlerDifferential.D R S) := by\n  rw [KaehlerDifferential.span_range_derivation]; trivial\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\nx : Ω[S⁄R]\n⊢ x ∈ Submodule.span S (Set.range ↑(KaehlerDifferential.D R S))\n[PROOFSTEP]\nrw [KaehlerDifferential.span_range_derivation]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\nx : Ω[S⁄R]\n⊢ x ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\nx : Ω[S⁄R]\nthis : x ∈ Submodule.span S (Set.range ↑(KaehlerDifferential.D R S))\n⊢ ↑f x = ↑f' x\n[PROOFSTEP]\nrefine Submodule.span_induction this ?_ ?_ ?_ ?_\n[GOAL]\ncase h.refine_1\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\nx : Ω[S⁄R]\nthis : x ∈ Submodule.span S (Set.range ↑(KaehlerDifferential.D R S))\n⊢ ∀ (x : Ω[S⁄R]), x ∈ Set.range ↑(KaehlerDifferential.D R S) → ↑f x = ↑f' x\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩\n[GOAL]\ncase h.refine_1.intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\nx✝ : Ω[S⁄R]\nthis : x✝ ∈ Submodule.span S (Set.range ↑(KaehlerDifferential.D R S))\nx : S\n⊢ ↑f (↑(KaehlerDifferential.D R S) x) = ↑f' (↑(KaehlerDifferential.D R S) x)\n[PROOFSTEP]\nexact congr_arg (fun D : Derivation R S M => D x) hf\n[GOAL]\ncase h.refine_2\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\nx : Ω[S⁄R]\nthis : x ∈ Submodule.span S (Set.range ↑(KaehlerDifferential.D R S))\n⊢ ↑f 0 = ↑f' 0\n[PROOFSTEP]\nrw [map_zero, map_zero]\n[GOAL]\ncase h.refine_3\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\nx : Ω[S⁄R]\nthis : x ∈ Submodule.span S (Set.range ↑(KaehlerDifferential.D R S))\n⊢ ∀ (x y : Ω[S⁄R]), ↑f x = ↑f' x → ↑f y = ↑f' y → ↑f (x + y) = ↑f' (x + y)\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase h.refine_3\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\nx✝ : Ω[S⁄R]\nthis : x✝ ∈ Submodule.span S (Set.range ↑(KaehlerDifferential.D R S))\nx y : Ω[S⁄R]\nhx : ↑f x = ↑f' x\nhy : ↑f y = ↑f' y\n⊢ ↑f (x + y) = ↑f' (x + y)\n[PROOFSTEP]\nrw [map_add, map_add, hx, hy]\n[GOAL]\ncase h.refine_4\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\nx : Ω[S⁄R]\nthis : x ∈ Submodule.span S (Set.range ↑(KaehlerDifferential.D R S))\n⊢ ∀ (a : S) (x : Ω[S⁄R]), ↑f x = ↑f' x → ↑f (a • x) = ↑f' (a • x)\n[PROOFSTEP]\nintro a x e\n[GOAL]\ncase h.refine_4\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf f' : Ω[S⁄R] →ₗ[S] M\nhf : ↑(LinearMap.compDer f) (KaehlerDifferential.D R S) = ↑(LinearMap.compDer f') (KaehlerDifferential.D R S)\nx✝ : Ω[S⁄R]\nthis : x✝ ∈ Submodule.span S (Set.range ↑(KaehlerDifferential.D R S))\na : S\nx : Ω[S⁄R]\ne : ↑f x = ↑f' x\n⊢ ↑f (a • x) = ↑f' (a • x)\n[PROOFSTEP]\nsimp [e]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : { x // x ∈ ideal R S }\n⊢ ↑(Derivation.tensorProductTo (D R S)) ↑x = ↑(Ideal.toCotangent (ideal R S)) x\n[PROOFSTEP]\nrw [← Derivation.liftKaehlerDifferential_apply, Derivation.liftKaehlerDifferential_D]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : { x // x ∈ ideal R S }\n⊢ ↑LinearMap.id (↑(Ideal.toCotangent (ideal R S)) x) = ↑(Ideal.toCotangent (ideal R S)) x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Function.Surjective ↑(Derivation.tensorProductTo (D R S))\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : Ω[S⁄R]\n⊢ ∃ a, ↑(Derivation.tensorProductTo (D R S)) a = x\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ := (KaehlerDifferential.ideal R S).toCotangent_surjective x\n[GOAL]\ncase intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : { x // x ∈ ideal R S }\n⊢ ∃ a, ↑(Derivation.tensorProductTo (D R S)) a = ↑(Ideal.toCotangent (ideal R S)) x\n[PROOFSTEP]\nexact ⟨x, KaehlerDifferential.D_tensorProductTo x⟩\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ (S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S) ≃+* S\n[PROOFSTEP]\nhave :\n  Function.RightInverse (TensorProduct.includeLeft (R := R) (A := S) (B := S))\n    (↑(TensorProduct.lmul' R : S ⊗[R] S →ₐ[R] S) : S ⊗[R] S →+* S) :=\n  by\n  intro x; rw [AlgHom.coe_toRingHom, ← AlgHom.comp_apply, TensorProduct.lmul'_comp_includeLeft]\n  rfl\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Function.RightInverse ↑TensorProduct.includeLeft ↑↑(TensorProduct.lmul' R)\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S\n⊢ ↑↑(TensorProduct.lmul' R) (↑TensorProduct.includeLeft x) = x\n[PROOFSTEP]\nrw [AlgHom.coe_toRingHom, ← AlgHom.comp_apply, TensorProduct.lmul'_comp_includeLeft]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S\n⊢ ↑(AlgHom.id R S) x = x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nthis : Function.RightInverse ↑TensorProduct.includeLeft ↑↑(TensorProduct.lmul' R)\n⊢ (S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S) ≃+* S\n[PROOFSTEP]\nrefine (Ideal.quotCotangent _).trans ?_\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nthis : Function.RightInverse ↑TensorProduct.includeLeft ↑↑(TensorProduct.lmul' R)\n⊢ S ⊗[R] S ⧸ ideal R S ≃+* S\n[PROOFSTEP]\nrefine (Ideal.quotEquivOfEq ?_).trans (RingHom.quotientKerEquivOfRightInverse this)\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nthis : Function.RightInverse ↑TensorProduct.includeLeft ↑↑(TensorProduct.lmul' R)\n⊢ ideal R S = RingHom.ker ↑(TensorProduct.lmul' R)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nthis : Function.RightInverse ↑TensorProduct.includeLeft ↑↑(TensorProduct.lmul' R)\nx✝ : S ⊗[R] S\n⊢ x✝ ∈ ideal R S ↔ x✝ ∈ RingHom.ker ↑(TensorProduct.lmul' R)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\n⊢ AlgHom.comp (Ideal.Quotient.mkₐ R (Ideal.cotangentIdeal (ideal R S))) f =\n      IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S)) ↔\n    AlgHom.comp (AlgHom.kerSquareLift (TensorProduct.lmul' R)) f = AlgHom.id R S\n[PROOFSTEP]\nrw [AlgHom.ext_iff, AlgHom.ext_iff]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\n⊢ (∀ (x : S),\n      ↑(AlgHom.comp (Ideal.Quotient.mkₐ R (Ideal.cotangentIdeal (ideal R S))) f) x =\n        ↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x) ↔\n    ∀ (x : S), ↑(AlgHom.comp (AlgHom.kerSquareLift (TensorProduct.lmul' R)) f) x = ↑(AlgHom.id R S) x\n[PROOFSTEP]\napply forall_congr'\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\n⊢ ∀ (a : S),\n    ↑(AlgHom.comp (Ideal.Quotient.mkₐ R (Ideal.cotangentIdeal (ideal R S))) f) a =\n        ↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) a ↔\n      ↑(AlgHom.comp (AlgHom.kerSquareLift (TensorProduct.lmul' R)) f) a = ↑(AlgHom.id R S) a\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\nx : S\n⊢ ↑(AlgHom.comp (Ideal.Quotient.mkₐ R (Ideal.cotangentIdeal (ideal R S))) f) x =\n      ↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x ↔\n    ↑(AlgHom.comp (AlgHom.kerSquareLift (TensorProduct.lmul' R)) f) x = ↑(AlgHom.id R S) x\n[PROOFSTEP]\nhave e₁ :\n  (TensorProduct.lmul' R : S ⊗[R] S →ₐ[R] S).kerSquareLift (f x) =\n    KaehlerDifferential.quotientCotangentIdealRingEquiv R S\n      (Ideal.Quotient.mk (KaehlerDifferential.ideal R S).cotangentIdeal <| f x) :=\n  by generalize f x = y; obtain ⟨y, rfl⟩ := Ideal.Quotient.mk_surjective y; rfl\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\nx : S\n⊢ ↑(AlgHom.kerSquareLift (TensorProduct.lmul' R)) (↑f x) =\n    ↑(quotientCotangentIdealRingEquiv R S) (↑(Ideal.Quotient.mk (Ideal.cotangentIdeal (ideal R S))) (↑f x))\n[PROOFSTEP]\ngeneralize f x = y\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\nx : S\ny : S ⊗[R] S ⧸ ideal R S ^ 2\n⊢ ↑(AlgHom.kerSquareLift (TensorProduct.lmul' R)) y =\n    ↑(quotientCotangentIdealRingEquiv R S) (↑(Ideal.Quotient.mk (Ideal.cotangentIdeal (ideal R S))) y)\n[PROOFSTEP]\nobtain ⟨y, rfl⟩ := Ideal.Quotient.mk_surjective y\n[GOAL]\ncase intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\nx : S\ny : S ⊗[R] S\n⊢ ↑(AlgHom.kerSquareLift (TensorProduct.lmul' R)) (↑(Ideal.Quotient.mk (ideal R S ^ 2)) y) =\n    ↑(quotientCotangentIdealRingEquiv R S)\n      (↑(Ideal.Quotient.mk (Ideal.cotangentIdeal (ideal R S))) (↑(Ideal.Quotient.mk (ideal R S ^ 2)) y))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\nx : S\ne₁ :\n  ↑(AlgHom.kerSquareLift (TensorProduct.lmul' R)) (↑f x) =\n    ↑(quotientCotangentIdealRingEquiv R S) (↑(Ideal.Quotient.mk (Ideal.cotangentIdeal (ideal R S))) (↑f x))\n⊢ ↑(AlgHom.comp (Ideal.Quotient.mkₐ R (Ideal.cotangentIdeal (ideal R S))) f) x =\n      ↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x ↔\n    ↑(AlgHom.comp (AlgHom.kerSquareLift (TensorProduct.lmul' R)) f) x = ↑(AlgHom.id R S) x\n[PROOFSTEP]\nhave e₂ : x = KaehlerDifferential.quotientCotangentIdealRingEquiv R S (IsScalarTower.toAlgHom R S _ x) :=\n  (mul_one x).symm\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\nx : S\ne₁ :\n  ↑(AlgHom.kerSquareLift (TensorProduct.lmul' R)) (↑f x) =\n    ↑(quotientCotangentIdealRingEquiv R S) (↑(Ideal.Quotient.mk (Ideal.cotangentIdeal (ideal R S))) (↑f x))\ne₂ :\n  x =\n    ↑(quotientCotangentIdealRingEquiv R S)\n      (↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x)\n⊢ ↑(AlgHom.comp (Ideal.Quotient.mkₐ R (Ideal.cotangentIdeal (ideal R S))) f) x =\n      ↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x ↔\n    ↑(AlgHom.comp (AlgHom.kerSquareLift (TensorProduct.lmul' R)) f) x = ↑(AlgHom.id R S) x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\nx : S\ne₁ :\n  ↑(AlgHom.kerSquareLift (TensorProduct.lmul' R)) (↑f x) =\n    ↑(quotientCotangentIdealRingEquiv R S) (↑(Ideal.Quotient.mk (Ideal.cotangentIdeal (ideal R S))) (↑f x))\ne₂ :\n  x =\n    ↑(quotientCotangentIdealRingEquiv R S)\n      (↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x)\n⊢ ↑(AlgHom.comp (Ideal.Quotient.mkₐ R (Ideal.cotangentIdeal (ideal R S))) f) x =\n      ↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x →\n    ↑(AlgHom.comp (AlgHom.kerSquareLift (TensorProduct.lmul' R)) f) x = ↑(AlgHom.id R S) x\n[PROOFSTEP]\nintro e\n[GOAL]\ncase h.mp\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\nx : S\ne₁ :\n  ↑(AlgHom.kerSquareLift (TensorProduct.lmul' R)) (↑f x) =\n    ↑(quotientCotangentIdealRingEquiv R S) (↑(Ideal.Quotient.mk (Ideal.cotangentIdeal (ideal R S))) (↑f x))\ne₂ :\n  x =\n    ↑(quotientCotangentIdealRingEquiv R S)\n      (↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x)\ne :\n  ↑(AlgHom.comp (Ideal.Quotient.mkₐ R (Ideal.cotangentIdeal (ideal R S))) f) x =\n    ↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x\n⊢ ↑(AlgHom.comp (AlgHom.kerSquareLift (TensorProduct.lmul' R)) f) x = ↑(AlgHom.id R S) x\n[PROOFSTEP]\nexact\n  (e₁.trans (@RingEquiv.congr_arg _ _ _ _ _ _ (KaehlerDifferential.quotientCotangentIdealRingEquiv R S) _ _ e)).trans\n    e₂.symm\n[GOAL]\ncase h.mpr\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\nx : S\ne₁ :\n  ↑(AlgHom.kerSquareLift (TensorProduct.lmul' R)) (↑f x) =\n    ↑(quotientCotangentIdealRingEquiv R S) (↑(Ideal.Quotient.mk (Ideal.cotangentIdeal (ideal R S))) (↑f x))\ne₂ :\n  x =\n    ↑(quotientCotangentIdealRingEquiv R S)\n      (↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x)\n⊢ ↑(AlgHom.comp (AlgHom.kerSquareLift (TensorProduct.lmul' R)) f) x = ↑(AlgHom.id R S) x →\n    ↑(AlgHom.comp (Ideal.Quotient.mkₐ R (Ideal.cotangentIdeal (ideal R S))) f) x =\n      ↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x\n[PROOFSTEP]\nintro e\n[GOAL]\ncase h.mpr\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\nx : S\ne₁ :\n  ↑(AlgHom.kerSquareLift (TensorProduct.lmul' R)) (↑f x) =\n    ↑(quotientCotangentIdealRingEquiv R S) (↑(Ideal.Quotient.mk (Ideal.cotangentIdeal (ideal R S))) (↑f x))\ne₂ :\n  x =\n    ↑(quotientCotangentIdealRingEquiv R S)\n      (↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x)\ne : ↑(AlgHom.comp (AlgHom.kerSquareLift (TensorProduct.lmul' R)) f) x = ↑(AlgHom.id R S) x\n⊢ ↑(AlgHom.comp (Ideal.Quotient.mkₐ R (Ideal.cotangentIdeal (ideal R S))) f) x =\n    ↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x\n[PROOFSTEP]\napply (KaehlerDifferential.quotientCotangentIdealRingEquiv R S).injective\n[GOAL]\ncase h.mpr.a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : S →ₐ[R] S ⊗[R] S ⧸ ideal R S ^ 2\nx : S\ne₁ :\n  ↑(AlgHom.kerSquareLift (TensorProduct.lmul' R)) (↑f x) =\n    ↑(quotientCotangentIdealRingEquiv R S) (↑(Ideal.Quotient.mk (Ideal.cotangentIdeal (ideal R S))) (↑f x))\ne₂ :\n  x =\n    ↑(quotientCotangentIdealRingEquiv R S)\n      (↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x)\ne : ↑(AlgHom.comp (AlgHom.kerSquareLift (TensorProduct.lmul' R)) f) x = ↑(AlgHom.id R S) x\n⊢ ↑(quotientCotangentIdealRingEquiv R S)\n      (↑(AlgHom.comp (Ideal.Quotient.mkₐ R (Ideal.cotangentIdeal (ideal R S))) f) x) =\n    ↑(quotientCotangentIdealRingEquiv R S)\n      (↑(IsScalarTower.toAlgHom R S ((S ⊗[R] S ⧸ ideal R S ^ 2) ⧸ Ideal.cotangentIdeal (ideal R S))) x)\n[PROOFSTEP]\nexact e₁.symm.trans (e.trans e₂)\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx y z : S\n⊢ (z𝖣x + y) = (z𝖣x) + z𝖣y\n[PROOFSTEP]\nrw [← map_add, eq_comm, ← sub_eq_zero, ← map_sub (Submodule.mkQ (kerTotal R S)), Submodule.mkQ_apply,\n  Submodule.Quotient.mk_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx y z : S\n⊢ single x z + single y z - single (x + y) z ∈ kerTotal R S\n[PROOFSTEP]\nsimp_rw [← Finsupp.smul_single_one _ z, ← smul_add, ← smul_sub]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx y z : S\n⊢ z • (single x 1 + single y 1 - single (x + y) 1) ∈ kerTotal R S\n[PROOFSTEP]\nexact Submodule.smul_mem _ _ (Submodule.subset_span (Or.inl <| Or.inl <| ⟨⟨_, _⟩, rfl⟩))\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx y z : S\n⊢ (z𝖣x * y) = ((z * x)𝖣y) + (z * y)𝖣x\n[PROOFSTEP]\nrw [← map_add, eq_comm, ← sub_eq_zero, ← map_sub (Submodule.mkQ (kerTotal R S)), Submodule.mkQ_apply,\n  Submodule.Quotient.mk_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx y z : S\n⊢ single y (z * x) + single x (z * y) - single (x * y) z ∈ kerTotal R S\n[PROOFSTEP]\nsimp_rw [← Finsupp.smul_single_one _ z, ← @smul_eq_mul _ _ z, ← Finsupp.smul_single, ← smul_add, ← smul_sub]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx y z : S\n⊢ z • (single y x + single x y - single (x * y) 1) ∈ kerTotal R S\n[PROOFSTEP]\nexact Submodule.smul_mem _ _ (Submodule.subset_span (Or.inl <| Or.inr <| ⟨⟨_, _⟩, rfl⟩))\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : R\ny : S\n⊢ (y𝖣↑(algebraMap R S) x) = 0\n[PROOFSTEP]\nrw [Submodule.mkQ_apply, Submodule.Quotient.mk_eq_zero, ← Finsupp.smul_single_one _ y]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : R\ny : S\n⊢ y • single (↑(algebraMap R S) x) 1 ∈ kerTotal R S\n[PROOFSTEP]\nexact Submodule.smul_mem _ _ (Submodule.subset_span (Or.inr <| ⟨_, rfl⟩))\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : S\n⊢ (x𝖣1) = 0\n[PROOFSTEP]\nrw [← (algebraMap R S).map_one, KaehlerDifferential.kerTotal_mkQ_single_algebraMap]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nr : R\nx y : S\n⊢ (y𝖣r • x) = r • y𝖣x\n[PROOFSTEP]\nrw [Algebra.smul_def, KaehlerDifferential.kerTotal_mkQ_single_mul, KaehlerDifferential.kerTotal_mkQ_single_algebraMap,\n  add_zero, ← LinearMap.map_smul_of_tower, Finsupp.smul_single, mul_comm, Algebra.smul_def]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\n⊢ (((1 * a)𝖣b) + (1 * b)𝖣a) =\n    a •\n        ↑{ toAddHom := { toFun := fun x => 1𝖣x, map_add' := (_ : ∀ (x y : S), (1𝖣x + y) = (1𝖣x) + 1𝖣y) },\n              map_smul' := (_ : ∀ (r : R) (s : S), (1𝖣r • s) = r • 1𝖣s) }\n          b +\n      b •\n        ↑{ toAddHom := { toFun := fun x => 1𝖣x, map_add' := (_ : ∀ (x y : S), (1𝖣x + y) = (1𝖣x) + 1𝖣y) },\n              map_smul' := (_ : ∀ (r : R) (s : S), (1𝖣r • s) = r • 1𝖣s) }\n          a\n[PROOFSTEP]\nsimp_rw [← Finsupp.smul_single_one _ (1 * _ : S)]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\n⊢ ↑(Submodule.mkQ (kerTotal R S)) ((1 * a) • single b 1) + ↑(Submodule.mkQ (kerTotal R S)) ((1 * b) • single a 1) =\n    a •\n        ↑{ toAddHom := { toFun := fun x => 1𝖣x, map_add' := (_ : ∀ (x y : S), (1𝖣x + y) = (1𝖣x) + 1𝖣y) },\n              map_smul' := (_ : ∀ (r : R) (s : S), (1𝖣r • s) = r • 1𝖣s) }\n          b +\n      b •\n        ↑{ toAddHom := { toFun := fun x => 1𝖣x, map_add' := (_ : ∀ (x y : S), (1𝖣x + y) = (1𝖣x) + 1𝖣y) },\n              map_smul' := (_ : ∀ (r : R) (s : S), (1𝖣r • s) = r • 1𝖣s) }\n          a\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\n⊢ (1 * a) • Submodule.Quotient.mk (single b 1) + (1 * b) • Submodule.Quotient.mk (single a 1) =\n    a • Submodule.Quotient.mk (single b 1) + b • Submodule.Quotient.mk (single a 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ LinearMap.comp (Derivation.liftKaehlerDifferential (derivationQuotKerTotal R S))\n      (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)) =\n    Submodule.mkQ (kerTotal R S)\n[PROOFSTEP]\napply Finsupp.lhom_ext\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ ∀ (a b : S),\n    ↑(LinearMap.comp (Derivation.liftKaehlerDifferential (derivationQuotKerTotal R S))\n            (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n        (single a b) =\n      b𝖣a\n[PROOFSTEP]\nintro a b\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\n⊢ ↑(LinearMap.comp (Derivation.liftKaehlerDifferential (derivationQuotKerTotal R S))\n          (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n      (single a b) =\n    b𝖣a\n[PROOFSTEP]\nconv_rhs => rw [← Finsupp.smul_single_one a b, LinearMap.map_smul]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\n| b𝖣a\n[PROOFSTEP]\nrw [← Finsupp.smul_single_one a b, LinearMap.map_smul]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\n| b𝖣a\n[PROOFSTEP]\nrw [← Finsupp.smul_single_one a b, LinearMap.map_smul]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\n| b𝖣a\n[PROOFSTEP]\nrw [← Finsupp.smul_single_one a b, LinearMap.map_smul]\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\na b : S\n⊢ ↑(LinearMap.comp (Derivation.liftKaehlerDifferential (derivationQuotKerTotal R S))\n          (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n      (single a b) =\n    b • 1𝖣a\n[PROOFSTEP]\nsimp [KaehlerDifferential.derivationQuotKerTotal_apply]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)) = kerTotal R S\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)) ≤ kerTotal R S\n[PROOFSTEP]\nconv_rhs => rw [← (KaehlerDifferential.kerTotal R S).ker_mkQ]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n| kerTotal R S\n[PROOFSTEP]\nrw [← (KaehlerDifferential.kerTotal R S).ker_mkQ]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n| kerTotal R S\n[PROOFSTEP]\nrw [← (KaehlerDifferential.kerTotal R S).ker_mkQ]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n| kerTotal R S\n[PROOFSTEP]\nrw [← (KaehlerDifferential.kerTotal R S).ker_mkQ]\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)) ≤ LinearMap.ker (Submodule.mkQ (kerTotal R S))\n[PROOFSTEP]\nrw [← KaehlerDifferential.derivationQuotKerTotal_lift_comp_total]\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)) ≤\n    LinearMap.ker\n      (LinearMap.comp (Derivation.liftKaehlerDifferential (derivationQuotKerTotal R S))\n        (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n[PROOFSTEP]\nexact LinearMap.ker_le_ker_comp _ _\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ kerTotal R S ≤ LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S))\n[PROOFSTEP]\nrw [KaehlerDifferential.kerTotal, Submodule.span_le]\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ (((Set.range fun x => single x.fst 1 + single x.snd 1 - single (x.fst + x.snd) 1) ∪\n        Set.range fun x => single x.snd x.fst + single x.fst x.snd - single (x.fst * x.snd) 1) ∪\n      Set.range fun x => single (↑(algebraMap R S) x) 1) ⊆\n    ↑(LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n[PROOFSTEP]\nrintro _ ((⟨⟨x, y⟩, rfl⟩ | ⟨⟨x, y⟩, rfl⟩) | ⟨x, rfl⟩)\n[GOAL]\ncase a.inl.inl.intro.mk\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx y : S\n⊢ (fun x => single x.fst 1 + single x.snd 1 - single (x.fst + x.snd) 1) (x, y) ∈\n    ↑(LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.inl.inr.intro.mk\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx y : S\n⊢ (fun x => single x.snd x.fst + single x.fst x.snd - single (x.fst * x.snd) 1) (x, y) ∈\n    ↑(LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.inr.intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : R\n⊢ (fun x => single (↑(algebraMap R S) x) 1) x ∈ ↑(LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.inl.inl.intro.mk\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx y : S\n⊢ single x 1 + single y 1 - single (x + y) 1 ∈ ↑(LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n[PROOFSTEP]\nsimp [LinearMap.mem_ker]\n[GOAL]\ncase a.inl.inr.intro.mk\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx y : S\n⊢ single y x + single x y - single (x * y) 1 ∈ ↑(LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n[PROOFSTEP]\nsimp [LinearMap.mem_ker]\n[GOAL]\ncase a.inr.intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nx : R\n⊢ single (↑(algebraMap R S) x) 1 ∈ ↑(LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n[PROOFSTEP]\nsimp [LinearMap.mem_ker]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ Function.Surjective ↑(Finsupp.total S (Ω[S⁄R]) S ↑(D R S))\n[PROOFSTEP]\nrw [← LinearMap.range_eq_top, Finsupp.range_total, KaehlerDifferential.span_range_derivation]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nsrc✝ : (S →₀ S) ⧸ kerTotal R S →ₗ[S] Ω[S⁄R] :=\n  Submodule.liftQ (kerTotal R S) (Finsupp.total S (Ω[S⁄R]) S ↑(D R S))\n    (_ : kerTotal R S ≤ LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n⊢ Function.LeftInverse ↑(Derivation.liftKaehlerDifferential (derivationQuotKerTotal R S))\n    { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : S) (x : (S →₀ S) ⧸ kerTotal R S),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id S) r • AddHom.toFun src✝.toAddHom x) }.toAddHom.toFun\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nsrc✝ : (S →₀ S) ⧸ kerTotal R S →ₗ[S] Ω[S⁄R] :=\n  Submodule.liftQ (kerTotal R S) (Finsupp.total S (Ω[S⁄R]) S ↑(D R S))\n    (_ : kerTotal R S ≤ LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\nx : (S →₀ S) ⧸ kerTotal R S\n⊢ ↑(Derivation.liftKaehlerDifferential (derivationQuotKerTotal R S))\n      (AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : S) (x : (S →₀ S) ⧸ kerTotal R S),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id S) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        x) =\n    x\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ := Submodule.mkQ_surjective _ x\n[GOAL]\ncase intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nsrc✝ : (S →₀ S) ⧸ kerTotal R S →ₗ[S] Ω[S⁄R] :=\n  Submodule.liftQ (kerTotal R S) (Finsupp.total S (Ω[S⁄R]) S ↑(D R S))\n    (_ : kerTotal R S ≤ LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\nx : S →₀ S\n⊢ ↑(Derivation.liftKaehlerDifferential (derivationQuotKerTotal R S))\n      (AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : S) (x : (S →₀ S) ⧸ kerTotal R S),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id S) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        (↑(Submodule.mkQ (kerTotal R S)) x)) =\n    ↑(Submodule.mkQ (kerTotal R S)) x\n[PROOFSTEP]\nexact LinearMap.congr_fun (KaehlerDifferential.derivationQuotKerTotal_lift_comp_total R S : _) x\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nsrc✝ : (S →₀ S) ⧸ kerTotal R S →ₗ[S] Ω[S⁄R] :=\n  Submodule.liftQ (kerTotal R S) (Finsupp.total S (Ω[S⁄R]) S ↑(D R S))\n    (_ : kerTotal R S ≤ LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\n⊢ Function.RightInverse ↑(Derivation.liftKaehlerDifferential (derivationQuotKerTotal R S))\n    { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : S) (x : (S →₀ S) ⧸ kerTotal R S),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id S) r • AddHom.toFun src✝.toAddHom x) }.toAddHom.toFun\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nsrc✝ : (S →₀ S) ⧸ kerTotal R S →ₗ[S] Ω[S⁄R] :=\n  Submodule.liftQ (kerTotal R S) (Finsupp.total S (Ω[S⁄R]) S ↑(D R S))\n    (_ : kerTotal R S ≤ LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\nx : Ω[S⁄R]\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : S) (x : (S →₀ S) ⧸ kerTotal R S),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id S) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      (↑(Derivation.liftKaehlerDifferential (derivationQuotKerTotal R S)) x) =\n    x\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ := KaehlerDifferential.total_surjective R S x\n[GOAL]\ncase intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nsrc✝ : (S →₀ S) ⧸ kerTotal R S →ₗ[S] Ω[S⁄R] :=\n  Submodule.liftQ (kerTotal R S) (Finsupp.total S (Ω[S⁄R]) S ↑(D R S))\n    (_ : kerTotal R S ≤ LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\nx : S →₀ S\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : S) (x : (S →₀ S) ⧸ kerTotal R S),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id S) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      (↑(Derivation.liftKaehlerDifferential (derivationQuotKerTotal R S)) (↑(Finsupp.total S (Ω[S⁄R]) S ↑(D R S)) x)) =\n    ↑(Finsupp.total S (Ω[S⁄R]) S ↑(D R S)) x\n[PROOFSTEP]\nerw [LinearMap.congr_fun (KaehlerDifferential.derivationQuotKerTotal_lift_comp_total R S : _) x]\n[GOAL]\ncase intro\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nsrc✝ : (S →₀ S) ⧸ kerTotal R S →ₗ[S] Ω[S⁄R] :=\n  Submodule.liftQ (kerTotal R S) (Finsupp.total S (Ω[S⁄R]) S ↑(D R S))\n    (_ : kerTotal R S ≤ LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S ↑(D R S)))\nx : S →₀ S\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : S) (x : (S →₀ S) ⧸ kerTotal R S),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id S) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      (↑(Submodule.mkQ (kerTotal R S)) x) =\n    ↑(Finsupp.total S (Ω[S⁄R]) S ↑(D R S)) x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nM : Type u_1\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\n⊢ ↑(LinearMap.compDer ↑(LinearEquiv.symm (quotKerTotalEquiv R S))) (D R S) = derivationQuotKerTotal R S\n[PROOFSTEP]\nconvert (KaehlerDifferential.derivationQuotKerTotal R S).liftKaehlerDifferential_comp\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : Algebra R S\nM : Type u_1\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module S M\ninst✝⁸ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : IsScalarTower R A B\nh : Function.Surjective ↑(algebraMap A B)\n⊢ Submodule.map\n        (LinearMap.comp (Finsupp.mapRange.linearMap (Algebra.linearMap A B)) (Finsupp.lmapDomain A A ↑(algebraMap A B)))\n        (kerTotal R A) ⊔\n      Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1) =\n    Submodule.restrictScalars A (kerTotal S B)\n[PROOFSTEP]\nrw [KaehlerDifferential.kerTotal, Submodule.map_span, KaehlerDifferential.kerTotal,\n  Submodule.restrictScalars_span _ _ h]\n  -- Porting note: the proof is diverging from the mathlib3 proof here.\n    -- `map_sub` and `map_add` are not firing so we need to use `LinearMap.map_*` instead\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : Algebra R S\nM : Type u_1\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module S M\ninst✝⁸ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : IsScalarTower R A B\nh : Function.Surjective ↑(algebraMap A B)\n⊢ Submodule.span A\n        (↑(LinearMap.comp (Finsupp.mapRange.linearMap (Algebra.linearMap A B))\n              (Finsupp.lmapDomain A A ↑(algebraMap A B))) ''\n          (((Set.range fun x => single x.fst 1 + single x.snd 1 - single (x.fst + x.snd) 1) ∪\n              Set.range fun x => single x.snd x.fst + single x.fst x.snd - single (x.fst * x.snd) 1) ∪\n            Set.range fun x => single (↑(algebraMap R A) x) 1)) ⊔\n      Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1) =\n    Submodule.span A\n      (((Set.range fun x => single x.fst 1 + single x.snd 1 - single (x.fst + x.snd) 1) ∪\n          Set.range fun x => single x.snd x.fst + single x.fst x.snd - single (x.fst * x.snd) 1) ∪\n        Set.range fun x => single (↑(algebraMap S B) x) 1)\n[PROOFSTEP]\nsimp_rw [Set.image_union, Submodule.span_union, ← Set.image_univ, Set.image_image, Set.image_univ, LinearMap.map_sub,\n  LinearMap.map_add]\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : Algebra R S\nM : Type u_1\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module S M\ninst✝⁸ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : IsScalarTower R A B\nh : Function.Surjective ↑(algebraMap A B)\n⊢ Submodule.span A\n            (Set.range fun x =>\n              ↑(LinearMap.comp (Finsupp.mapRange.linearMap (Algebra.linearMap A B))\n                        (Finsupp.lmapDomain A A ↑(algebraMap A B)))\n                    (single x.fst 1) +\n                  ↑(LinearMap.comp (Finsupp.mapRange.linearMap (Algebra.linearMap A B))\n                        (Finsupp.lmapDomain A A ↑(algebraMap A B)))\n                    (single x.snd 1) -\n                ↑(LinearMap.comp (Finsupp.mapRange.linearMap (Algebra.linearMap A B))\n                      (Finsupp.lmapDomain A A ↑(algebraMap A B)))\n                  (single (x.fst + x.snd) 1)) ⊔\n          Submodule.span A\n            (Set.range fun x =>\n              ↑(LinearMap.comp (Finsupp.mapRange.linearMap (Algebra.linearMap A B))\n                        (Finsupp.lmapDomain A A ↑(algebraMap A B)))\n                    (single x.snd x.fst) +\n                  ↑(LinearMap.comp (Finsupp.mapRange.linearMap (Algebra.linearMap A B))\n                        (Finsupp.lmapDomain A A ↑(algebraMap A B)))\n                    (single x.fst x.snd) -\n                ↑(LinearMap.comp (Finsupp.mapRange.linearMap (Algebra.linearMap A B))\n                      (Finsupp.lmapDomain A A ↑(algebraMap A B)))\n                  (single (x.fst * x.snd) 1)) ⊔\n        Submodule.span A\n          (Set.range fun x =>\n            ↑(LinearMap.comp (Finsupp.mapRange.linearMap (Algebra.linearMap A B))\n                  (Finsupp.lmapDomain A A ↑(algebraMap A B)))\n              (single (↑(algebraMap R A) x) 1)) ⊔\n      Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1) =\n    Submodule.span A (Set.range fun x => single x.fst 1 + single x.snd 1 - single (x.fst + x.snd) 1) ⊔\n        Submodule.span A (Set.range fun x => single x.snd x.fst + single x.fst x.snd - single (x.fst * x.snd) 1) ⊔\n      Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1)\n[PROOFSTEP]\nsimp only [LinearMap.comp_apply, Finsupp.lmapDomain_apply, Finsupp.mapDomain_single, Finsupp.mapRange.linearMap_apply,\n  Finsupp.mapRange_single, Algebra.linearMap_apply, map_one, map_add, map_mul]\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : Algebra R S\nM : Type u_1\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module S M\ninst✝⁸ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : IsScalarTower R A B\nh : Function.Surjective ↑(algebraMap A B)\n⊢ Submodule.span A\n            (Set.range fun x =>\n              single (↑(algebraMap A B) x.fst) 1 + single (↑(algebraMap A B) x.snd) 1 -\n                single (↑(algebraMap A B) x.fst + ↑(algebraMap A B) x.snd) 1) ⊔\n          Submodule.span A\n            (Set.range fun x =>\n              single (↑(algebraMap A B) x.snd) (↑(algebraMap A B) x.fst) +\n                  single (↑(algebraMap A B) x.fst) (↑(algebraMap A B) x.snd) -\n                single (↑(algebraMap A B) x.fst * ↑(algebraMap A B) x.snd) 1) ⊔\n        Submodule.span A (Set.range fun x => single (↑(algebraMap A B) (↑(algebraMap R A) x)) 1) ⊔\n      Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1) =\n    Submodule.span A (Set.range fun x => single x.fst 1 + single x.snd 1 - single (x.fst + x.snd) 1) ⊔\n        Submodule.span A (Set.range fun x => single x.snd x.fst + single x.fst x.snd - single (x.fst * x.snd) 1) ⊔\n      Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1)\n[PROOFSTEP]\nsimp_rw [sup_assoc, ← (h.Prod_map h).range_comp]\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : Algebra R S\nM : Type u_1\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module S M\ninst✝⁸ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : IsScalarTower R A B\nh : Function.Surjective ↑(algebraMap A B)\n⊢ Submodule.span A\n        (Set.range fun x =>\n          single (↑(algebraMap A B) x.fst) 1 + single (↑(algebraMap A B) x.snd) 1 -\n            single (↑(algebraMap A B) x.fst + ↑(algebraMap A B) x.snd) 1) ⊔\n      (Submodule.span A\n          (Set.range fun x =>\n            single (↑(algebraMap A B) x.snd) (↑(algebraMap A B) x.fst) +\n                single (↑(algebraMap A B) x.fst) (↑(algebraMap A B) x.snd) -\n              single (↑(algebraMap A B) x.fst * ↑(algebraMap A B) x.snd) 1) ⊔\n        (Submodule.span A (Set.range fun x => single (↑(algebraMap A B) (↑(algebraMap R A) x)) 1) ⊔\n          Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1))) =\n    Submodule.span A\n        (Set.range\n          ((fun x => single x.fst 1 + single x.snd 1 - single (x.fst + x.snd) 1) ∘\n            Prod.map ↑(algebraMap A B) ↑(algebraMap A B))) ⊔\n      (Submodule.span A\n          (Set.range\n            ((fun x => single x.snd x.fst + single x.fst x.snd - single (x.fst * x.snd) 1) ∘\n              Prod.map ↑(algebraMap A B) ↑(algebraMap A B))) ⊔\n        Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1))\n[PROOFSTEP]\ncongr 3\n  -- Porting note: new\n[GOAL]\ncase e_a.e_a\nR : Type u\nS : Type v\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : Algebra R S\nM : Type u_1\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module S M\ninst✝⁸ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : IsScalarTower R A B\nh : Function.Surjective ↑(algebraMap A B)\n⊢ Submodule.span A (Set.range fun x => single (↑(algebraMap A B) (↑(algebraMap R A) x)) 1) ⊔\n      Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1) =\n    Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1)\n[PROOFSTEP]\nsimp_rw [← IsScalarTower.algebraMap_apply R A B]\n[GOAL]\ncase e_a.e_a\nR : Type u\nS : Type v\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : Algebra R S\nM : Type u_1\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module S M\ninst✝⁸ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : IsScalarTower R A B\nh : Function.Surjective ↑(algebraMap A B)\n⊢ Submodule.span A (Set.range fun x => single (↑(algebraMap R B) x) 1) ⊔\n      Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1) =\n    Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1)\n[PROOFSTEP]\nrw [sup_eq_right]\n[GOAL]\ncase e_a.e_a\nR : Type u\nS : Type v\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : Algebra R S\nM : Type u_1\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module S M\ninst✝⁸ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : IsScalarTower R A B\nh : Function.Surjective ↑(algebraMap A B)\n⊢ Submodule.span A (Set.range fun x => single (↑(algebraMap R B) x) 1) ≤\n    Submodule.span A (Set.range fun x => single (↑(algebraMap S B) x) 1)\n[PROOFSTEP]\napply Submodule.span_mono\n[GOAL]\ncase e_a.e_a.h\nR : Type u\nS : Type v\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : Algebra R S\nM : Type u_1\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module S M\ninst✝⁸ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : IsScalarTower R A B\nh : Function.Surjective ↑(algebraMap A B)\n⊢ (Set.range fun x => single (↑(algebraMap R B) x) 1) ⊆ Set.range fun x => single (↑(algebraMap S B) x) 1\n[PROOFSTEP]\nsimp_rw [IsScalarTower.algebraMap_apply R S B]\n[GOAL]\ncase e_a.e_a.h\nR : Type u\nS : Type v\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : Algebra R S\nM : Type u_1\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module S M\ninst✝⁸ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra R A\ninst✝⁴ : Algebra S B\ninst✝³ : Algebra R B\ninst✝² : Algebra A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : IsScalarTower R A B\nh : Function.Surjective ↑(algebraMap A B)\n⊢ (Set.range fun x => single (↑(algebraMap S B) (↑(algebraMap R S) x)) 1) ⊆\n    Set.range fun x => single (↑(algebraMap S B) x) 1\n[PROOFSTEP]\nexact Set.range_comp_subset_range (algebraMap R S) fun x => single (algebraMap S B x) (1 : B)\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁷ : CommRing R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : Algebra R S\nM : Type u_1\ninst✝¹⁴ : AddCommGroup M\ninst✝¹³ : Module R M\ninst✝¹² : Module S M\ninst✝¹¹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝¹⁰ : CommRing A\ninst✝⁹ : CommRing B\ninst✝⁸ : Algebra R A\ninst✝⁷ : Algebra R B\ninst✝⁶ : Algebra A B\ninst✝⁵ : Algebra S B\ninst✝⁴ : IsScalarTower R A B\ninst✝³ : IsScalarTower R S B\ninst✝² : Module A M\ninst✝¹ : Module B M\ninst✝ : IsScalarTower A B M\nd : Derivation R B M\n⊢ ↑(LinearMap.comp (↑d) (AlgHom.toLinearMap (IsScalarTower.toAlgHom R A B))) 1 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁷ : CommRing R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : Algebra R S\nM : Type u_1\ninst✝¹⁴ : AddCommGroup M\ninst✝¹³ : Module R M\ninst✝¹² : Module S M\ninst✝¹¹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝¹⁰ : CommRing A\ninst✝⁹ : CommRing B\ninst✝⁸ : Algebra R A\ninst✝⁷ : Algebra R B\ninst✝⁶ : Algebra A B\ninst✝⁵ : Algebra S B\ninst✝⁴ : IsScalarTower R A B\ninst✝³ : IsScalarTower R S B\ninst✝² : Module A M\ninst✝¹ : Module B M\ninst✝ : IsScalarTower A B M\nd : Derivation R B M\na b : A\n⊢ ↑(LinearMap.comp (↑d) (AlgHom.toLinearMap (IsScalarTower.toAlgHom R A B))) (a * b) =\n    a • ↑(LinearMap.comp (↑d) (AlgHom.toLinearMap (IsScalarTower.toAlgHom R A B))) b +\n      b • ↑(LinearMap.comp (↑d) (AlgHom.toLinearMap (IsScalarTower.toAlgHom R A B))) a\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : Algebra R S\nM : Type u_1\ninst✝¹² : AddCommGroup M\ninst✝¹¹ : Module R M\ninst✝¹⁰ : Module S M\ninst✝⁹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : SMulCommClass S A B\nh : Function.Surjective ↑(algebraMap A B)\n⊢ Function.Surjective ↑(map R S A B)\n[PROOFSTEP]\nrw [← LinearMap.range_eq_top, _root_.eq_top_iff, ← @Submodule.restrictScalars_top B A, ←\n  KaehlerDifferential.span_range_derivation, Submodule.restrictScalars_span _ _ h, Submodule.span_le]\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : Algebra R S\nM : Type u_1\ninst✝¹² : AddCommGroup M\ninst✝¹¹ : Module R M\ninst✝¹⁰ : Module S M\ninst✝⁹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : SMulCommClass S A B\nh : Function.Surjective ↑(algebraMap A B)\n⊢ Set.range ↑(D S B) ⊆ ↑(LinearMap.range (map R S A B))\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩\n[GOAL]\ncase intro\nR : Type u\nS : Type v\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : Algebra R S\nM : Type u_1\ninst✝¹² : AddCommGroup M\ninst✝¹¹ : Module R M\ninst✝¹⁰ : Module S M\ninst✝⁹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : SMulCommClass S A B\nh : Function.Surjective ↑(algebraMap A B)\nx : B\n⊢ ↑(D S B) x ∈ ↑(LinearMap.range (map R S A B))\n[PROOFSTEP]\nobtain ⟨y, rfl⟩ := h x\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : Algebra R S\nM : Type u_1\ninst✝¹² : AddCommGroup M\ninst✝¹¹ : Module R M\ninst✝¹⁰ : Module S M\ninst✝⁹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : SMulCommClass S A B\nh : Function.Surjective ↑(algebraMap A B)\ny : A\n⊢ ↑(D S B) (↑(algebraMap A B) y) ∈ ↑(LinearMap.range (map R S A B))\n[PROOFSTEP]\nrw [← KaehlerDifferential.map_D R S A B]\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : Algebra R S\nM : Type u_1\ninst✝¹² : AddCommGroup M\ninst✝¹¹ : Module R M\ninst✝¹⁰ : Module S M\ninst✝⁹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : SMulCommClass S A B\nh : Function.Surjective ↑(algebraMap A B)\ny : A\n⊢ ↑(map R S A B) (↑(D R A) y) ∈ ↑(LinearMap.range (map R S A B))\n[PROOFSTEP]\nexact ⟨_, rfl⟩\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : Algebra R S\nM : Type u_1\ninst✝¹² : AddCommGroup M\ninst✝¹¹ : Module R M\ninst✝¹⁰ : Module S M\ninst✝⁹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : SMulCommClass S A B\nx : B\ny : Ω[A⁄R]\n⊢ ↑(mapBaseChange R A B) (x ⊗ₜ[A] y) = x • ↑(map R R A B) y\n[PROOFSTEP]\nconv_lhs => rw [← mul_one x, ← smul_eq_mul, ← TensorProduct.smul_tmul', LinearMap.map_smul]\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : Algebra R S\nM : Type u_1\ninst✝¹² : AddCommGroup M\ninst✝¹¹ : Module R M\ninst✝¹⁰ : Module S M\ninst✝⁹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : SMulCommClass S A B\nx : B\ny : Ω[A⁄R]\n| ↑(mapBaseChange R A B) (x ⊗ₜ[A] y)\n[PROOFSTEP]\nrw [← mul_one x, ← smul_eq_mul, ← TensorProduct.smul_tmul', LinearMap.map_smul]\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : Algebra R S\nM : Type u_1\ninst✝¹² : AddCommGroup M\ninst✝¹¹ : Module R M\ninst✝¹⁰ : Module S M\ninst✝⁹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : SMulCommClass S A B\nx : B\ny : Ω[A⁄R]\n| ↑(mapBaseChange R A B) (x ⊗ₜ[A] y)\n[PROOFSTEP]\nrw [← mul_one x, ← smul_eq_mul, ← TensorProduct.smul_tmul', LinearMap.map_smul]\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : Algebra R S\nM : Type u_1\ninst✝¹² : AddCommGroup M\ninst✝¹¹ : Module R M\ninst✝¹⁰ : Module S M\ninst✝⁹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : SMulCommClass S A B\nx : B\ny : Ω[A⁄R]\n| ↑(mapBaseChange R A B) (x ⊗ₜ[A] y)\n[PROOFSTEP]\nrw [← mul_one x, ← smul_eq_mul, ← TensorProduct.smul_tmul', LinearMap.map_smul]\n[GOAL]\nR : Type u\nS : Type v\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : Algebra R S\nM : Type u_1\ninst✝¹² : AddCommGroup M\ninst✝¹¹ : Module R M\ninst✝¹⁰ : Module S M\ninst✝⁹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : SMulCommClass S A B\nx : B\ny : Ω[A⁄R]\n⊢ x • ↑(mapBaseChange R A B) (1 ⊗ₜ[A] y) = x • ↑(map R R A B) y\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nR : Type u\nS : Type v\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : Algebra R S\nM : Type u_1\ninst✝¹² : AddCommGroup M\ninst✝¹¹ : Module R M\ninst✝¹⁰ : Module S M\ninst✝⁹ : IsScalarTower R S M\nA : Type u_2\nB : Type u_3\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra R A\ninst✝⁵ : Algebra R B\ninst✝⁴ : Algebra A B\ninst✝³ : Algebra S B\ninst✝² : IsScalarTower R A B\ninst✝¹ : IsScalarTower R S B\ninst✝ : SMulCommClass S A B\nx : B\ny : Ω[A⁄R]\n⊢ ↑(mapBaseChange R A B) (1 ⊗ₜ[A] y) = ↑(map R R A B) y\n[PROOFSTEP]\nexact IsBaseChange.lift_eq _ _ _\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Kaehler", "llama_tokens": 55271, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6992544210587585, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.37416994191875264}}
{"text": "[GOAL]\nC : Type u_1\ninst✝⁸ : Category.{u_4, u_1} C\ninst✝⁷ : Preadditive C\ninst✝⁶ : MonoidalCategory C\ninst✝⁵ : MonoidalPreadditive C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : Preadditive D\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor D C\ninst✝¹ : Faithful F.toFunctor\ninst✝ : Functor.Additive F.toFunctor\n⊢ ∀ {W X Y Z : D} (f : W ⟶ X), f ⊗ 0 = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\ninst✝⁸ : Category.{u_4, u_1} C\ninst✝⁷ : Preadditive C\ninst✝⁶ : MonoidalCategory C\ninst✝⁵ : MonoidalPreadditive C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : Preadditive D\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor D C\ninst✝¹ : Faithful F.toFunctor\ninst✝ : Functor.Additive F.toFunctor\nW✝ X✝ Y✝ Z✝ : D\nf✝ : W✝ ⟶ X✝\n⊢ f✝ ⊗ 0 = 0\n[PROOFSTEP]\napply F.toFunctor.map_injective\n[GOAL]\ncase a\nC : Type u_1\ninst✝⁸ : Category.{u_4, u_1} C\ninst✝⁷ : Preadditive C\ninst✝⁶ : MonoidalCategory C\ninst✝⁵ : MonoidalPreadditive C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : Preadditive D\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor D C\ninst✝¹ : Faithful F.toFunctor\ninst✝ : Functor.Additive F.toFunctor\nW✝ X✝ Y✝ Z✝ : D\nf✝ : W✝ ⟶ X✝\n⊢ F.map (f✝ ⊗ 0) = F.map 0\n[PROOFSTEP]\nsimp [F.map_tensor]\n[GOAL]\nC : Type u_1\ninst✝⁸ : Category.{u_4, u_1} C\ninst✝⁷ : Preadditive C\ninst✝⁶ : MonoidalCategory C\ninst✝⁵ : MonoidalPreadditive C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : Preadditive D\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor D C\ninst✝¹ : Faithful F.toFunctor\ninst✝ : Functor.Additive F.toFunctor\n⊢ ∀ {W X Y Z : D} (f : Y ⟶ Z), 0 ⊗ f = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\ninst✝⁸ : Category.{u_4, u_1} C\ninst✝⁷ : Preadditive C\ninst✝⁶ : MonoidalCategory C\ninst✝⁵ : MonoidalPreadditive C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : Preadditive D\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor D C\ninst✝¹ : Faithful F.toFunctor\ninst✝ : Functor.Additive F.toFunctor\nW✝ X✝ Y✝ Z✝ : D\nf✝ : Y✝ ⟶ Z✝\n⊢ 0 ⊗ f✝ = 0\n[PROOFSTEP]\napply F.toFunctor.map_injective\n[GOAL]\ncase a\nC : Type u_1\ninst✝⁸ : Category.{u_4, u_1} C\ninst✝⁷ : Preadditive C\ninst✝⁶ : MonoidalCategory C\ninst✝⁵ : MonoidalPreadditive C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : Preadditive D\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor D C\ninst✝¹ : Faithful F.toFunctor\ninst✝ : Functor.Additive F.toFunctor\nW✝ X✝ Y✝ Z✝ : D\nf✝ : Y✝ ⟶ Z✝\n⊢ F.map (0 ⊗ f✝) = F.map 0\n[PROOFSTEP]\nsimp [F.map_tensor]\n[GOAL]\nC : Type u_1\ninst✝⁸ : Category.{u_4, u_1} C\ninst✝⁷ : Preadditive C\ninst✝⁶ : MonoidalCategory C\ninst✝⁵ : MonoidalPreadditive C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : Preadditive D\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor D C\ninst✝¹ : Faithful F.toFunctor\ninst✝ : Functor.Additive F.toFunctor\n⊢ ∀ {W X Y Z : D} (f : W ⟶ X) (g h : Y ⟶ Z), f ⊗ (g + h) = f ⊗ g + f ⊗ h\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\ninst✝⁸ : Category.{u_4, u_1} C\ninst✝⁷ : Preadditive C\ninst✝⁶ : MonoidalCategory C\ninst✝⁵ : MonoidalPreadditive C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : Preadditive D\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor D C\ninst✝¹ : Faithful F.toFunctor\ninst✝ : Functor.Additive F.toFunctor\nW✝ X✝ Y✝ Z✝ : D\nf✝ : W✝ ⟶ X✝\ng✝ h✝ : Y✝ ⟶ Z✝\n⊢ f✝ ⊗ (g✝ + h✝) = f✝ ⊗ g✝ + f✝ ⊗ h✝\n[PROOFSTEP]\napply F.toFunctor.map_injective\n[GOAL]\ncase a\nC : Type u_1\ninst✝⁸ : Category.{u_4, u_1} C\ninst✝⁷ : Preadditive C\ninst✝⁶ : MonoidalCategory C\ninst✝⁵ : MonoidalPreadditive C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : Preadditive D\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor D C\ninst✝¹ : Faithful F.toFunctor\ninst✝ : Functor.Additive F.toFunctor\nW✝ X✝ Y✝ Z✝ : D\nf✝ : W✝ ⟶ X✝\ng✝ h✝ : Y✝ ⟶ Z✝\n⊢ F.map (f✝ ⊗ (g✝ + h✝)) = F.map (f✝ ⊗ g✝ + f✝ ⊗ h✝)\n[PROOFSTEP]\nsimp only [F.map_tensor, Functor.map_add, Preadditive.comp_add, Preadditive.add_comp, MonoidalPreadditive.tensor_add]\n[GOAL]\nC : Type u_1\ninst✝⁸ : Category.{u_4, u_1} C\ninst✝⁷ : Preadditive C\ninst✝⁶ : MonoidalCategory C\ninst✝⁵ : MonoidalPreadditive C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : Preadditive D\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor D C\ninst✝¹ : Faithful F.toFunctor\ninst✝ : Functor.Additive F.toFunctor\n⊢ ∀ {W X Y Z : D} (f g : W ⟶ X) (h : Y ⟶ Z), (f + g) ⊗ h = f ⊗ h + g ⊗ h\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\ninst✝⁸ : Category.{u_4, u_1} C\ninst✝⁷ : Preadditive C\ninst✝⁶ : MonoidalCategory C\ninst✝⁵ : MonoidalPreadditive C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : Preadditive D\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor D C\ninst✝¹ : Faithful F.toFunctor\ninst✝ : Functor.Additive F.toFunctor\nW✝ X✝ Y✝ Z✝ : D\nf✝ g✝ : W✝ ⟶ X✝\nh✝ : Y✝ ⟶ Z✝\n⊢ (f✝ + g✝) ⊗ h✝ = f✝ ⊗ h✝ + g✝ ⊗ h✝\n[PROOFSTEP]\napply F.toFunctor.map_injective\n[GOAL]\ncase a\nC : Type u_1\ninst✝⁸ : Category.{u_4, u_1} C\ninst✝⁷ : Preadditive C\ninst✝⁶ : MonoidalCategory C\ninst✝⁵ : MonoidalPreadditive C\nD : Type u_2\ninst✝⁴ : Category.{u_3, u_2} D\ninst✝³ : Preadditive D\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor D C\ninst✝¹ : Faithful F.toFunctor\ninst✝ : Functor.Additive F.toFunctor\nW✝ X✝ Y✝ Z✝ : D\nf✝ g✝ : W✝ ⟶ X✝\nh✝ : Y✝ ⟶ Z✝\n⊢ F.map ((f✝ + g✝) ⊗ h✝) = F.map (f✝ ⊗ h✝ + g✝ ⊗ h✝)\n[PROOFSTEP]\nsimp only [F.map_tensor, Functor.map_add, Preadditive.comp_add, Preadditive.add_comp, MonoidalPreadditive.add_tensor]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_3, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : MonoidalCategory C\ninst✝ : MonoidalPreadditive C\nP Q R S : C\nJ : Type u_2\ns : Finset J\nf : P ⟶ Q\ng : J → (R ⟶ S)\n⊢ f ⊗ ∑ j in s, g j = ∑ j in s, f ⊗ g j\n[PROOFSTEP]\nrw [← tensor_id_comp_id_tensor]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_3, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : MonoidalCategory C\ninst✝ : MonoidalPreadditive C\nP Q R S : C\nJ : Type u_2\ns : Finset J\nf : P ⟶ Q\ng : J → (R ⟶ S)\n⊢ (f ⊗ 𝟙 R) ≫ (𝟙 Q ⊗ ∑ j in s, g j) = ∑ j in s, f ⊗ g j\n[PROOFSTEP]\nlet tQ := (((tensoringLeft C).obj Q).mapAddHom : (R ⟶ S) →+ _)\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_3, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : MonoidalCategory C\ninst✝ : MonoidalPreadditive C\nP Q R S : C\nJ : Type u_2\ns : Finset J\nf : P ⟶ Q\ng : J → (R ⟶ S)\ntQ : (R ⟶ S) →+ (((tensoringLeft C).obj Q).obj R ⟶ ((tensoringLeft C).obj Q).obj S) :=\n  Functor.mapAddHom ((tensoringLeft C).obj Q)\n⊢ (f ⊗ 𝟙 R) ≫ (𝟙 Q ⊗ ∑ j in s, g j) = ∑ j in s, f ⊗ g j\n[PROOFSTEP]\nchange _ ≫ tQ _ = _\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_3, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : MonoidalCategory C\ninst✝ : MonoidalPreadditive C\nP Q R S : C\nJ : Type u_2\ns : Finset J\nf : P ⟶ Q\ng : J → (R ⟶ S)\ntQ : (R ⟶ S) →+ (((tensoringLeft C).obj Q).obj R ⟶ ((tensoringLeft C).obj Q).obj S) :=\n  Functor.mapAddHom ((tensoringLeft C).obj Q)\n⊢ (f ⊗ 𝟙 R) ≫ ↑tQ (∑ j in s, g j) = ∑ j in s, f ⊗ g j\n[PROOFSTEP]\nrw [tQ.map_sum, Preadditive.comp_sum]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_3, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : MonoidalCategory C\ninst✝ : MonoidalPreadditive C\nP Q R S : C\nJ : Type u_2\ns : Finset J\nf : P ⟶ Q\ng : J → (R ⟶ S)\ntQ : (R ⟶ S) →+ (((tensoringLeft C).obj Q).obj R ⟶ ((tensoringLeft C).obj Q).obj S) :=\n  Functor.mapAddHom ((tensoringLeft C).obj Q)\n⊢ ∑ j in s, (f ⊗ 𝟙 R) ≫ ↑tQ (g j) = ∑ j in s, f ⊗ g j\n[PROOFSTEP]\ndsimp [Functor.mapAddHom]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_3, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : MonoidalCategory C\ninst✝ : MonoidalPreadditive C\nP Q R S : C\nJ : Type u_2\ns : Finset J\nf : P ⟶ Q\ng : J → (R ⟶ S)\ntQ : (R ⟶ S) →+ (((tensoringLeft C).obj Q).obj R ⟶ ((tensoringLeft C).obj Q).obj S) :=\n  Functor.mapAddHom ((tensoringLeft C).obj Q)\n⊢ ∑ j in s, (f ⊗ 𝟙 R) ≫ (𝟙 Q ⊗ g j) = ∑ j in s, f ⊗ g j\n[PROOFSTEP]\nsimp only [tensor_id_comp_id_tensor]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_3, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : MonoidalCategory C\ninst✝ : MonoidalPreadditive C\nP Q R S : C\nJ : Type u_2\ns : Finset J\nf : P ⟶ Q\ng : J → (R ⟶ S)\n⊢ (∑ j in s, g j) ⊗ f = ∑ j in s, g j ⊗ f\n[PROOFSTEP]\nrw [← tensor_id_comp_id_tensor]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_3, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : MonoidalCategory C\ninst✝ : MonoidalPreadditive C\nP Q R S : C\nJ : Type u_2\ns : Finset J\nf : P ⟶ Q\ng : J → (R ⟶ S)\n⊢ ((∑ j in s, g j) ⊗ 𝟙 P) ≫ (𝟙 S ⊗ f) = ∑ j in s, g j ⊗ f\n[PROOFSTEP]\nlet tQ := (((tensoringRight C).obj P).mapAddHom : (R ⟶ S) →+ _)\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_3, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : MonoidalCategory C\ninst✝ : MonoidalPreadditive C\nP Q R S : C\nJ : Type u_2\ns : Finset J\nf : P ⟶ Q\ng : J → (R ⟶ S)\ntQ : (R ⟶ S) →+ (((tensoringRight C).obj P).obj R ⟶ ((tensoringRight C).obj P).obj S) :=\n  Functor.mapAddHom ((tensoringRight C).obj P)\n⊢ ((∑ j in s, g j) ⊗ 𝟙 P) ≫ (𝟙 S ⊗ f) = ∑ j in s, g j ⊗ f\n[PROOFSTEP]\nchange tQ _ ≫ _ = _\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_3, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : MonoidalCategory C\ninst✝ : MonoidalPreadditive C\nP Q R S : C\nJ : Type u_2\ns : Finset J\nf : P ⟶ Q\ng : J → (R ⟶ S)\ntQ : (R ⟶ S) →+ (((tensoringRight C).obj P).obj R ⟶ ((tensoringRight C).obj P).obj S) :=\n  Functor.mapAddHom ((tensoringRight C).obj P)\n⊢ ↑tQ (∑ j in s, g j) ≫ (𝟙 S ⊗ f) = ∑ j in s, g j ⊗ f\n[PROOFSTEP]\nrw [tQ.map_sum, Preadditive.sum_comp]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_3, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : MonoidalCategory C\ninst✝ : MonoidalPreadditive C\nP Q R S : C\nJ : Type u_2\ns : Finset J\nf : P ⟶ Q\ng : J → (R ⟶ S)\ntQ : (R ⟶ S) →+ (((tensoringRight C).obj P).obj R ⟶ ((tensoringRight C).obj P).obj S) :=\n  Functor.mapAddHom ((tensoringRight C).obj P)\n⊢ ∑ j in s, ↑tQ (g j) ≫ (𝟙 S ⊗ f) = ∑ j in s, g j ⊗ f\n[PROOFSTEP]\ndsimp [Functor.mapAddHom]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_3, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : MonoidalCategory C\ninst✝ : MonoidalPreadditive C\nP Q R S : C\nJ : Type u_2\ns : Finset J\nf : P ⟶ Q\ng : J → (R ⟶ S)\ntQ : (R ⟶ S) →+ (((tensoringRight C).obj P).obj R ⟶ ((tensoringRight C).obj P).obj S) :=\n  Functor.mapAddHom ((tensoringRight C).obj P)\n⊢ ∑ j in s, (g j ⊗ 𝟙 P) ≫ (𝟙 S ⊗ f) = ∑ j in s, g j ⊗ f\n[PROOFSTEP]\nsimp only [tensor_id_comp_id_tensor]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.453496, u_1} C\ninst✝³ : Preadditive C\ninst✝² : MonoidalCategory C\ninst✝¹ : MonoidalPreadditive C\nX : C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nb : Bicone f\ni : Bicone.IsBilimit b\n⊢ ∑ j : J, Bicone.π (Functor.mapBicone (tensorLeft X) b) j ≫ Bicone.ι (Functor.mapBicone (tensorLeft X) b) j =\n    𝟙 (Functor.mapBicone (tensorLeft X) b).pt\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.453496, u_1} C\ninst✝³ : Preadditive C\ninst✝² : MonoidalCategory C\ninst✝¹ : MonoidalPreadditive C\nX : C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nb : Bicone f\ni : Bicone.IsBilimit b\n⊢ ∑ j : J, (𝟙 X ⊗ Bicone.π b j) ≫ (𝟙 X ⊗ Bicone.ι b j) = 𝟙 (X ⊗ b.pt)\n[PROOFSTEP]\nsimp only [← tensor_comp, Category.comp_id, ← tensor_sum, ← tensor_id, IsBilimit.total i]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.457304, u_1} C\ninst✝³ : Preadditive C\ninst✝² : MonoidalCategory C\ninst✝¹ : MonoidalPreadditive C\nX : C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nb : Bicone f\ni : Bicone.IsBilimit b\n⊢ ∑ j : J, Bicone.π (Functor.mapBicone (tensorRight X) b) j ≫ Bicone.ι (Functor.mapBicone (tensorRight X) b) j =\n    𝟙 (Functor.mapBicone (tensorRight X) b).pt\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.457304, u_1} C\ninst✝³ : Preadditive C\ninst✝² : MonoidalCategory C\ninst✝¹ : MonoidalPreadditive C\nX : C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nb : Bicone f\ni : Bicone.IsBilimit b\n⊢ ∑ j : J, (Bicone.π b j ⊗ 𝟙 X) ≫ (Bicone.ι b j ⊗ 𝟙 X) = 𝟙 (b.pt ⊗ X)\n[PROOFSTEP]\nsimp only [← tensor_comp, Category.comp_id, ← sum_tensor, ← tensor_id, IsBilimit.total i]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\n⊢ (leftDistributor X f).hom = ∑ j : J, (𝟙 X ⊗ biproduct.π f j) ≫ biproduct.ι (fun j => X ⊗ f j) j\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nj✝ : J\n⊢ (leftDistributor X f).hom ≫ biproduct.π (fun j => X ⊗ f j) j✝ =\n    (∑ j : J, (𝟙 X ⊗ biproduct.π f j) ≫ biproduct.ι (fun j => X ⊗ f j) j) ≫ biproduct.π (fun j => X ⊗ f j) j✝\n[PROOFSTEP]\ndsimp [leftDistributor, Functor.mapBiproduct, Functor.mapBicone]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nj✝ : J\n⊢ (biproduct.lift fun j => 𝟙 X ⊗ biproduct.π f j) ≫ biproduct.π (fun j => X ⊗ f j) j✝ =\n    (∑ j : J, (𝟙 X ⊗ biproduct.π f j) ≫ biproduct.ι (fun j => X ⊗ f j) j) ≫ biproduct.π (fun j => X ⊗ f j) j✝\n[PROOFSTEP]\nerw [biproduct.lift_π]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nj✝ : J\n⊢ 𝟙 X ⊗ biproduct.π f j✝ =\n    (∑ j : J, (𝟙 X ⊗ biproduct.π f j) ≫ biproduct.ι (fun j => X ⊗ f j) j) ≫ biproduct.π (fun j => X ⊗ f j) j✝\n[PROOFSTEP]\nsimp only [Preadditive.sum_comp, Category.assoc, biproduct.ι_π, comp_dite, comp_zero, Finset.sum_dite_eq',\n  Finset.mem_univ, ite_true, eqToHom_refl, Category.comp_id]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\n⊢ (leftDistributor X f).inv = ∑ j : J, biproduct.π (fun j => X ⊗ f j) j ≫ (𝟙 X ⊗ biproduct.ι f j)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nj✝ : J\n⊢ biproduct.ι (fun j => X ⊗ f j) j✝ ≫ (leftDistributor X f).inv =\n    biproduct.ι (fun j => X ⊗ f j) j✝ ≫ ∑ j : J, biproduct.π (fun j => X ⊗ f j) j ≫ (𝟙 X ⊗ biproduct.ι f j)\n[PROOFSTEP]\ndsimp [leftDistributor, Functor.mapBiproduct, Functor.mapBicone]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nj✝ : J\n⊢ (biproduct.ι (fun j => X ⊗ f j) j✝ ≫ biproduct.desc fun j => 𝟙 X ⊗ biproduct.ι f j) =\n    biproduct.ι (fun j => X ⊗ f j) j✝ ≫ ∑ j : J, biproduct.π (fun j => X ⊗ f j) j ≫ (𝟙 X ⊗ biproduct.ι f j)\n[PROOFSTEP]\nsimp only [Preadditive.comp_sum, biproduct.ι_π_assoc, dite_comp, zero_comp, Finset.sum_dite_eq, Finset.mem_univ,\n  ite_true, eqToHom_refl, Category.id_comp, biproduct.ι_desc]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nj : J\n⊢ (leftDistributor X f).hom ≫ biproduct.π (fun j => X ⊗ f j) j = 𝟙 X ⊗ biproduct.π f j\n[PROOFSTEP]\nsimp [leftDistributor_hom, Preadditive.sum_comp, biproduct.ι_π, comp_dite]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nj : J\n⊢ (𝟙 X ⊗ biproduct.ι f j) ≫ (leftDistributor X f).hom = biproduct.ι (fun j => X ⊗ f j) j\n[PROOFSTEP]\nsimp [leftDistributor_hom, Preadditive.comp_sum, ← id_tensor_comp_assoc, biproduct.ι_π, tensor_dite, dite_comp]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nj : J\n⊢ (leftDistributor X f).inv ≫ (𝟙 X ⊗ biproduct.π f j) = biproduct.π (fun j => X ⊗ f j) j\n[PROOFSTEP]\nsimp [leftDistributor_inv, Preadditive.sum_comp, ← id_tensor_comp, biproduct.ι_π, tensor_dite, comp_dite]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nj : J\n⊢ biproduct.ι (fun j => X ⊗ f j) j ≫ (leftDistributor X f).inv = 𝟙 X ⊗ biproduct.ι f j\n[PROOFSTEP]\nsimp [leftDistributor_inv, Preadditive.comp_sum, ← id_tensor_comp, biproduct.ι_π_assoc, dite_comp]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\n⊢ ((asIso (𝟙 X) ⊗ leftDistributor Y f) ≪≫ leftDistributor X fun j => Y ⊗ f j) =\n    (α_ X Y (⨁ f)).symm ≪≫ leftDistributor (X ⊗ Y) f ≪≫ biproduct.mapIso fun j => α_ X Y (f j)\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\nj✝ : J\n⊢ ((asIso (𝟙 X) ⊗ leftDistributor Y f) ≪≫ leftDistributor X fun j => Y ⊗ f j).hom ≫\n      biproduct.π (fun j => X ⊗ Y ⊗ f j) j✝ =\n    ((α_ X Y (⨁ f)).symm ≪≫ leftDistributor (X ⊗ Y) f ≪≫ biproduct.mapIso fun j => α_ X Y (f j)).hom ≫\n      biproduct.π (fun j => X ⊗ Y ⊗ f j) j✝\n[PROOFSTEP]\nsimp only [Category.comp_id, Category.assoc, eqToHom_refl, Iso.trans_hom, Iso.symm_hom, asIso_hom, comp_zero, comp_dite,\n  Preadditive.sum_comp, Preadditive.comp_sum, tensor_sum, id_tensor_comp, tensorIso_hom, leftDistributor_hom,\n  biproduct.mapIso_hom, biproduct.ι_map, biproduct.ι_π, Finset.sum_dite_irrel, Finset.sum_dite_eq',\n  Finset.sum_const_zero]\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\nj✝ : J\n⊢ (if j✝ ∈ Finset.univ then\n      ∑ x : J,\n        (𝟙 X ⊗ 𝟙 Y ⊗ biproduct.π f x) ≫\n          (𝟙 X ⊗ biproduct.ι (fun j => Y ⊗ f j) x) ≫ (𝟙 X ⊗ biproduct.π (fun j => Y ⊗ f j) j✝)\n    else 0) =\n    if j✝ ∈ Finset.univ then (α_ X Y (⨁ f)).inv ≫ (𝟙 (X ⊗ Y) ⊗ biproduct.π f j✝) ≫ (α_ X Y (f j✝)).hom else 0\n[PROOFSTEP]\nsimp only [← id_tensor_comp, biproduct.ι_π]\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\nj✝ : J\n⊢ (if j✝ ∈ Finset.univ then\n      ∑ x : J, 𝟙 X ⊗ (𝟙 Y ⊗ biproduct.π f x) ≫ if h : x = j✝ then eqToHom (_ : Y ⊗ f x = Y ⊗ f j✝) else 0\n    else 0) =\n    if j✝ ∈ Finset.univ then (α_ X Y (⨁ f)).inv ≫ (𝟙 (X ⊗ Y) ⊗ biproduct.π f j✝) ≫ (α_ X Y (f j✝)).hom else 0\n[PROOFSTEP]\nsimp only [id_tensor_comp, tensor_dite, comp_dite]\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\nj✝ : J\n⊢ (if j✝ ∈ Finset.univ then\n      ∑ x : J,\n        if h : x = j✝ then (𝟙 X ⊗ 𝟙 Y ⊗ biproduct.π f x) ≫ (𝟙 X ⊗ eqToHom (_ : Y ⊗ f x = Y ⊗ f j✝))\n        else (𝟙 X ⊗ 𝟙 Y ⊗ biproduct.π f x) ≫ (𝟙 X ⊗ 0)\n    else 0) =\n    if j✝ ∈ Finset.univ then (α_ X Y (⨁ f)).inv ≫ (𝟙 (X ⊗ Y) ⊗ biproduct.π f j✝) ≫ (α_ X Y (f j✝)).hom else 0\n[PROOFSTEP]\nsimp only [Category.comp_id, comp_zero, MonoidalPreadditive.tensor_zero, eqToHom_refl, tensor_id, if_true,\n  dif_ctx_congr, Finset.sum_congr, Finset.mem_univ, Finset.sum_dite_eq']\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\nj✝ : J\n⊢ 𝟙 X ⊗ 𝟙 Y ⊗ biproduct.π f j✝ = (α_ X Y (⨁ f)).inv ≫ (𝟙 (X ⊗ Y) ⊗ biproduct.π f j✝) ≫ (α_ X Y (f j✝)).hom\n[PROOFSTEP]\nsimp only [← tensor_id, associator_naturality, Iso.inv_hom_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX : C\n⊢ (rightDistributor f X).hom = ∑ j : J, (biproduct.π f j ⊗ 𝟙 X) ≫ biproduct.ι (fun j => f j ⊗ X) j\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX : C\nj✝ : J\n⊢ (rightDistributor f X).hom ≫ biproduct.π (fun j => f j ⊗ X) j✝ =\n    (∑ j : J, (biproduct.π f j ⊗ 𝟙 X) ≫ biproduct.ι (fun j => f j ⊗ X) j) ≫ biproduct.π (fun j => f j ⊗ X) j✝\n[PROOFSTEP]\ndsimp [rightDistributor, Functor.mapBiproduct, Functor.mapBicone]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX : C\nj✝ : J\n⊢ (biproduct.lift fun j => biproduct.π f j ⊗ 𝟙 X) ≫ biproduct.π (fun j => f j ⊗ X) j✝ =\n    (∑ j : J, (biproduct.π f j ⊗ 𝟙 X) ≫ biproduct.ι (fun j => f j ⊗ X) j) ≫ biproduct.π (fun j => f j ⊗ X) j✝\n[PROOFSTEP]\nerw [biproduct.lift_π]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX : C\nj✝ : J\n⊢ biproduct.π f j✝ ⊗ 𝟙 X =\n    (∑ j : J, (biproduct.π f j ⊗ 𝟙 X) ≫ biproduct.ι (fun j => f j ⊗ X) j) ≫ biproduct.π (fun j => f j ⊗ X) j✝\n[PROOFSTEP]\nsimp only [Preadditive.sum_comp, Category.assoc, biproduct.ι_π, comp_dite, comp_zero, Finset.sum_dite_eq',\n  Finset.mem_univ, eqToHom_refl, Category.comp_id, ite_true]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX : C\n⊢ (rightDistributor f X).inv = ∑ j : J, biproduct.π (fun j => f j ⊗ X) j ≫ (biproduct.ι f j ⊗ 𝟙 X)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX : C\nj✝ : J\n⊢ biproduct.ι (fun j => f j ⊗ X) j✝ ≫ (rightDistributor f X).inv =\n    biproduct.ι (fun j => f j ⊗ X) j✝ ≫ ∑ j : J, biproduct.π (fun j => f j ⊗ X) j ≫ (biproduct.ι f j ⊗ 𝟙 X)\n[PROOFSTEP]\ndsimp [rightDistributor, Functor.mapBiproduct, Functor.mapBicone]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX : C\nj✝ : J\n⊢ (biproduct.ι (fun j => f j ⊗ X) j✝ ≫ biproduct.desc fun j => biproduct.ι f j ⊗ 𝟙 X) =\n    biproduct.ι (fun j => f j ⊗ X) j✝ ≫ ∑ j : J, biproduct.π (fun j => f j ⊗ X) j ≫ (biproduct.ι f j ⊗ 𝟙 X)\n[PROOFSTEP]\nsimp only [biproduct.ι_desc, Preadditive.comp_sum, ne_eq, biproduct.ι_π_assoc, dite_comp, zero_comp, Finset.sum_dite_eq,\n  Finset.mem_univ, eqToHom_refl, Category.id_comp, ite_true]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX : C\nj : J\n⊢ (rightDistributor f X).hom ≫ biproduct.π (fun j => f j ⊗ X) j = biproduct.π f j ⊗ 𝟙 X\n[PROOFSTEP]\nsimp [rightDistributor_hom, Preadditive.sum_comp, biproduct.ι_π, comp_dite]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX : C\nj : J\n⊢ (biproduct.ι f j ⊗ 𝟙 X) ≫ (rightDistributor f X).hom = biproduct.ι (fun j => f j ⊗ X) j\n[PROOFSTEP]\nsimp [rightDistributor_hom, Preadditive.comp_sum, ← comp_tensor_id_assoc, biproduct.ι_π, dite_tensor, dite_comp]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX : C\nj : J\n⊢ (rightDistributor f X).inv ≫ (biproduct.π f j ⊗ 𝟙 X) = biproduct.π (fun j => f j ⊗ X) j\n[PROOFSTEP]\nsimp [rightDistributor_inv, Preadditive.sum_comp, ← comp_tensor_id, biproduct.ι_π, dite_tensor, comp_dite]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX : C\nj : J\n⊢ biproduct.ι (fun j => f j ⊗ X) j ≫ (rightDistributor f X).inv = biproduct.ι f j ⊗ 𝟙 X\n[PROOFSTEP]\nsimp [rightDistributor_inv, Preadditive.comp_sum, ← id_tensor_comp, biproduct.ι_π_assoc, dite_comp]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\n⊢ (rightDistributor f X ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor (fun j => f j ⊗ X) Y =\n    α_ (⨁ f) X Y ≪≫ rightDistributor f (X ⊗ Y) ≪≫ biproduct.mapIso fun j => (α_ (f j) X Y).symm\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\nj✝ : J\n⊢ ((rightDistributor f X ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor (fun j => f j ⊗ X) Y).hom ≫\n      biproduct.π (fun j => (f j ⊗ X) ⊗ Y) j✝ =\n    (α_ (⨁ f) X Y ≪≫ rightDistributor f (X ⊗ Y) ≪≫ biproduct.mapIso fun j => (α_ (f j) X Y).symm).hom ≫\n      biproduct.π (fun j => (f j ⊗ X) ⊗ Y) j✝\n[PROOFSTEP]\nsimp only [Category.comp_id, Category.assoc, eqToHom_refl, Iso.symm_hom, Iso.trans_hom, asIso_hom, comp_zero, comp_dite,\n  Preadditive.sum_comp, Preadditive.comp_sum, sum_tensor, comp_tensor_id, tensorIso_hom, rightDistributor_hom,\n  biproduct.mapIso_hom, biproduct.ι_map, biproduct.ι_π, Finset.sum_dite_irrel, Finset.sum_dite_eq',\n  Finset.sum_const_zero, Finset.mem_univ, if_true]\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\nj✝ : J\n⊢ ∑ x : J,\n      ((biproduct.π f x ⊗ 𝟙 X) ⊗ 𝟙 Y) ≫\n        (biproduct.ι (fun j => f j ⊗ X) x ⊗ 𝟙 Y) ≫ (biproduct.π (fun j => f j ⊗ X) j✝ ⊗ 𝟙 Y) =\n    (α_ (⨁ f) X Y).hom ≫ (biproduct.π f j✝ ⊗ 𝟙 (X ⊗ Y)) ≫ (α_ (f j✝) X Y).inv\n[PROOFSTEP]\nsimp only [← comp_tensor_id, biproduct.ι_π, dite_tensor, comp_dite]\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\nj✝ : J\n⊢ (∑ x : J,\n      if h : x = j✝ then (biproduct.π f x ⊗ 𝟙 X) ≫ eqToHom (_ : f x ⊗ X = f j✝ ⊗ X) ⊗ 𝟙 Y\n      else (biproduct.π f x ⊗ 𝟙 X) ≫ 0 ⊗ 𝟙 Y) =\n    (α_ (⨁ f) X Y).hom ≫ (biproduct.π f j✝ ⊗ 𝟙 (X ⊗ Y)) ≫ (α_ (f j✝) X Y).inv\n[PROOFSTEP]\nsimp only [Category.comp_id, comp_tensor_id, eqToHom_refl, tensor_id, comp_zero, MonoidalPreadditive.zero_tensor,\n  if_true, dif_ctx_congr, Finset.mem_univ, Finset.sum_congr, Finset.sum_dite_eq']\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\nj✝ : J\n⊢ (biproduct.π f j✝ ⊗ 𝟙 X) ⊗ 𝟙 Y = (α_ (⨁ f) X Y).hom ≫ (biproduct.π f j✝ ⊗ 𝟙 (X ⊗ Y)) ≫ (α_ (f j✝) X Y).inv\n[PROOFSTEP]\nsimp only [← tensor_id, associator_inv_naturality, Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nY : C\n⊢ (leftDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor (fun j => X ⊗ f j) Y =\n    α_ X (⨁ f) Y ≪≫\n      (asIso (𝟙 X) ⊗ rightDistributor f Y) ≪≫\n        (leftDistributor X fun j => f j ⊗ Y) ≪≫ biproduct.mapIso fun j => (α_ X (f j) Y).symm\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nY : C\nj✝ : J\n⊢ ((leftDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor (fun j => X ⊗ f j) Y).hom ≫\n      biproduct.π (fun j => (X ⊗ f j) ⊗ Y) j✝ =\n    (α_ X (⨁ f) Y ≪≫\n          (asIso (𝟙 X) ⊗ rightDistributor f Y) ≪≫\n            (leftDistributor X fun j => f j ⊗ Y) ≪≫ biproduct.mapIso fun j => (α_ X (f j) Y).symm).hom ≫\n      biproduct.π (fun j => (X ⊗ f j) ⊗ Y) j✝\n[PROOFSTEP]\nsimp only [Category.comp_id, Category.assoc, eqToHom_refl, Iso.symm_hom, Iso.trans_hom, asIso_hom, comp_zero, comp_dite,\n  Preadditive.sum_comp, Preadditive.comp_sum, sum_tensor, tensor_sum, comp_tensor_id, tensorIso_hom,\n  leftDistributor_hom, rightDistributor_hom, biproduct.mapIso_hom, biproduct.ι_map, biproduct.ι_π,\n  Finset.sum_dite_irrel, Finset.sum_dite_eq', Finset.sum_const_zero, Finset.mem_univ, if_true]\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nY : C\nj✝ : J\n⊢ ∑ x : J,\n      ((𝟙 X ⊗ biproduct.π f x) ⊗ 𝟙 Y) ≫\n        (biproduct.ι (fun j => X ⊗ f j) x ⊗ 𝟙 Y) ≫ (biproduct.π (fun j => X ⊗ f j) j✝ ⊗ 𝟙 Y) =\n    ∑ x : J,\n      (α_ X (⨁ f) Y).hom ≫\n        (𝟙 X ⊗ (biproduct.π f x ⊗ 𝟙 Y) ≫ biproduct.ι (fun j => f j ⊗ Y) x) ≫\n          (𝟙 X ⊗ biproduct.π (fun j => f j ⊗ Y) j✝) ≫ (α_ X (f j✝) Y).inv\n[PROOFSTEP]\nsimp only [← comp_tensor_id, ← id_tensor_comp_assoc, Category.assoc, biproduct.ι_π, comp_dite, dite_comp, tensor_dite,\n  dite_tensor]\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nY : C\nj✝ : J\n⊢ (∑ x : J,\n      if h : x = j✝ then (𝟙 X ⊗ biproduct.π f x) ≫ eqToHom (_ : X ⊗ f x = X ⊗ f j✝) ⊗ 𝟙 Y\n      else (𝟙 X ⊗ biproduct.π f x) ≫ 0 ⊗ 𝟙 Y) =\n    ∑ x : J,\n      if h : x = j✝ then\n        (α_ X (⨁ f) Y).hom ≫ (𝟙 X ⊗ (biproduct.π f x ⊗ 𝟙 Y) ≫ eqToHom (_ : f x ⊗ Y = f j✝ ⊗ Y)) ≫ (α_ X (f j✝) Y).inv\n      else (α_ X (⨁ f) Y).hom ≫ (𝟙 X ⊗ (biproduct.π f x ⊗ 𝟙 Y) ≫ 0) ≫ (α_ X (f j✝) Y).inv\n[PROOFSTEP]\nsimp only [Category.comp_id, Category.id_comp, Category.assoc, id_tensor_comp, comp_zero, zero_comp,\n  MonoidalPreadditive.tensor_zero, MonoidalPreadditive.zero_tensor, comp_tensor_id, eqToHom_refl, tensor_id, if_true,\n  dif_ctx_congr, Finset.sum_congr, Finset.mem_univ, Finset.sum_dite_eq']\n[GOAL]\ncase w.w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX : C\nf : J → C\nY : C\nj✝ : J\n⊢ (𝟙 X ⊗ biproduct.π f j✝) ⊗ 𝟙 Y = (α_ X (⨁ f) Y).hom ≫ (𝟙 X ⊗ biproduct.π f j✝ ⊗ 𝟙 Y) ≫ (α_ X (f j✝) Y).inv\n[PROOFSTEP]\nsimp only [associator_inv_naturality, Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\ng h : X ⊗ ⨁ f ⟶ Y\nw : ∀ (j : J), (𝟙 X ⊗ biproduct.ι f j) ≫ g = (𝟙 X ⊗ biproduct.ι f j) ≫ h\n⊢ g = h\n[PROOFSTEP]\napply (cancel_epi (leftDistributor X f).inv).mp\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\ng h : X ⊗ ⨁ f ⟶ Y\nw : ∀ (j : J), (𝟙 X ⊗ biproduct.ι f j) ≫ g = (𝟙 X ⊗ biproduct.ι f j) ≫ h\n⊢ (leftDistributor X f).inv ≫ g = (leftDistributor X f).inv ≫ h\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\ng h : X ⊗ ⨁ f ⟶ Y\nw : ∀ (j : J), (𝟙 X ⊗ biproduct.ι f j) ≫ g = (𝟙 X ⊗ biproduct.ι f j) ≫ h\nj✝ : J\n⊢ biproduct.ι (fun j => X ⊗ f j) j✝ ≫ (leftDistributor X f).inv ≫ g =\n    biproduct.ι (fun j => X ⊗ f j) j✝ ≫ (leftDistributor X f).inv ≫ h\n[PROOFSTEP]\nsimp? [leftDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc,\n    dite_comp] says simp only [leftDistributor_inv, Preadditive.comp_sum_assoc, ne_eq, biproduct.ι_π_assoc, dite_comp,\n    zero_comp, Finset.sum_dite_eq, Finset.mem_univ, eqToHom_refl, Category.id_comp, ite_true]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\ng h : X ⊗ ⨁ f ⟶ Y\nw : ∀ (j : J), (𝟙 X ⊗ biproduct.ι f j) ≫ g = (𝟙 X ⊗ biproduct.ι f j) ≫ h\nj✝ : J\n⊢ biproduct.ι (fun j => X ⊗ f j) j✝ ≫ (leftDistributor X f).inv ≫ g =\n    biproduct.ι (fun j => X ⊗ f j) j✝ ≫ (leftDistributor X f).inv ≫ h\n[PROOFSTEP]\nsimp only [leftDistributor_inv, Preadditive.comp_sum_assoc, ne_eq, biproduct.ι_π_assoc, dite_comp, zero_comp,\n  Finset.sum_dite_eq, Finset.mem_univ, eqToHom_refl, Category.id_comp, ite_true]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\ng h : X ⊗ ⨁ f ⟶ Y\nw : ∀ (j : J), (𝟙 X ⊗ biproduct.ι f j) ≫ g = (𝟙 X ⊗ biproduct.ι f j) ≫ h\nj✝ : J\n⊢ (𝟙 X ⊗ biproduct.ι f j✝) ≫ g = (𝟙 X ⊗ biproduct.ι f j✝) ≫ h\n[PROOFSTEP]\napply w\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\ng h : X ⟶ Y ⊗ ⨁ f\nw : ∀ (j : J), g ≫ (𝟙 Y ⊗ biproduct.π f j) = h ≫ (𝟙 Y ⊗ biproduct.π f j)\n⊢ g = h\n[PROOFSTEP]\napply (cancel_mono (leftDistributor Y f).hom).mp\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\ng h : X ⟶ Y ⊗ ⨁ f\nw : ∀ (j : J), g ≫ (𝟙 Y ⊗ biproduct.π f j) = h ≫ (𝟙 Y ⊗ biproduct.π f j)\n⊢ g ≫ (leftDistributor Y f).hom = h ≫ (leftDistributor Y f).hom\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\ng h : X ⟶ Y ⊗ ⨁ f\nw : ∀ (j : J), g ≫ (𝟙 Y ⊗ biproduct.π f j) = h ≫ (𝟙 Y ⊗ biproduct.π f j)\nj✝ : J\n⊢ (g ≫ (leftDistributor Y f).hom) ≫ biproduct.π (fun j => Y ⊗ f j) j✝ =\n    (h ≫ (leftDistributor Y f).hom) ≫ biproduct.π (fun j => Y ⊗ f j) j✝\n[PROOFSTEP]\nsimp? [leftDistributor_hom, Preadditive.sum_comp, Preadditive.comp_sum_assoc, biproduct.ι_π,\n    comp_dite] says simp only [leftDistributor_hom, Category.assoc, Preadditive.sum_comp, ne_eq, biproduct.ι_π,\n    comp_dite, comp_zero, Finset.sum_dite_eq', Finset.mem_univ, eqToHom_refl, Category.comp_id, ite_true]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\ng h : X ⟶ Y ⊗ ⨁ f\nw : ∀ (j : J), g ≫ (𝟙 Y ⊗ biproduct.π f j) = h ≫ (𝟙 Y ⊗ biproduct.π f j)\nj✝ : J\n⊢ (g ≫ (leftDistributor Y f).hom) ≫ biproduct.π (fun j => Y ⊗ f j) j✝ =\n    (h ≫ (leftDistributor Y f).hom) ≫ biproduct.π (fun j => Y ⊗ f j) j✝\n[PROOFSTEP]\nsimp only [leftDistributor_hom, Category.assoc, Preadditive.sum_comp, ne_eq, biproduct.ι_π, comp_dite, comp_zero,\n  Finset.sum_dite_eq', Finset.mem_univ, eqToHom_refl, Category.comp_id, ite_true]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y : C\nf : J → C\ng h : X ⟶ Y ⊗ ⨁ f\nw : ∀ (j : J), g ≫ (𝟙 Y ⊗ biproduct.π f j) = h ≫ (𝟙 Y ⊗ biproduct.π f j)\nj✝ : J\n⊢ g ≫ (𝟙 Y ⊗ biproduct.π f j✝) = h ≫ (𝟙 Y ⊗ biproduct.π f j✝)\n[PROOFSTEP]\napply w\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y Z : C\nf : J → C\ng h : X ⊗ Y ⊗ ⨁ f ⟶ Z\nw : ∀ (j : J), (𝟙 X ⊗ 𝟙 Y ⊗ biproduct.ι f j) ≫ g = (𝟙 X ⊗ 𝟙 Y ⊗ biproduct.ι f j) ≫ h\n⊢ g = h\n[PROOFSTEP]\napply (cancel_epi (α_ _ _ _).hom).mp\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y Z : C\nf : J → C\ng h : X ⊗ Y ⊗ ⨁ f ⟶ Z\nw : ∀ (j : J), (𝟙 X ⊗ 𝟙 Y ⊗ biproduct.ι f j) ≫ g = (𝟙 X ⊗ 𝟙 Y ⊗ biproduct.ι f j) ≫ h\n⊢ (α_ X Y (⨁ f)).hom ≫ g = (α_ X Y (⨁ f)).hom ≫ h\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y Z : C\nf : J → C\ng h : X ⊗ Y ⊗ ⨁ f ⟶ Z\nw : ∀ (j : J), (𝟙 X ⊗ 𝟙 Y ⊗ biproduct.ι f j) ≫ g = (𝟙 X ⊗ 𝟙 Y ⊗ biproduct.ι f j) ≫ h\nj✝ : J\n⊢ (𝟙 (X ⊗ Y) ⊗ biproduct.ι f j✝) ≫ (α_ X Y (⨁ f)).hom ≫ g = (𝟙 (X ⊗ Y) ⊗ biproduct.ι f j✝) ≫ (α_ X Y (⨁ f)).hom ≫ h\n[PROOFSTEP]\nsimp_rw [← tensor_id, associator_naturality_assoc, w]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y Z : C\nf : J → C\ng h : X ⟶ Y ⊗ Z ⊗ ⨁ f\nw : ∀ (j : J), g ≫ (𝟙 Y ⊗ 𝟙 Z ⊗ biproduct.π f j) = h ≫ (𝟙 Y ⊗ 𝟙 Z ⊗ biproduct.π f j)\n⊢ g = h\n[PROOFSTEP]\napply (cancel_mono (α_ _ _ _).inv).mp\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y Z : C\nf : J → C\ng h : X ⟶ Y ⊗ Z ⊗ ⨁ f\nw : ∀ (j : J), g ≫ (𝟙 Y ⊗ 𝟙 Z ⊗ biproduct.π f j) = h ≫ (𝟙 Y ⊗ 𝟙 Z ⊗ biproduct.π f j)\n⊢ g ≫ (α_ Y Z (⨁ f)).inv = h ≫ (α_ Y Z (⨁ f)).inv\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nX Y Z : C\nf : J → C\ng h : X ⟶ Y ⊗ Z ⊗ ⨁ f\nw : ∀ (j : J), g ≫ (𝟙 Y ⊗ 𝟙 Z ⊗ biproduct.π f j) = h ≫ (𝟙 Y ⊗ 𝟙 Z ⊗ biproduct.π f j)\nj✝ : J\n⊢ (g ≫ (α_ Y Z (⨁ f)).inv) ≫ (𝟙 (Y ⊗ Z) ⊗ biproduct.π f j✝) = (h ≫ (α_ Y Z (⨁ f)).inv) ≫ (𝟙 (Y ⊗ Z) ⊗ biproduct.π f j✝)\n[PROOFSTEP]\nsimp_rw [← tensor_id, Category.assoc, ← associator_inv_naturality, ← Category.assoc, w]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\ng h : (⨁ f) ⊗ X ⟶ Y\nw : ∀ (j : J), (biproduct.ι f j ⊗ 𝟙 X) ≫ g = (biproduct.ι f j ⊗ 𝟙 X) ≫ h\n⊢ g = h\n[PROOFSTEP]\napply (cancel_epi (rightDistributor f X).inv).mp\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\ng h : (⨁ f) ⊗ X ⟶ Y\nw : ∀ (j : J), (biproduct.ι f j ⊗ 𝟙 X) ≫ g = (biproduct.ι f j ⊗ 𝟙 X) ≫ h\n⊢ (rightDistributor f X).inv ≫ g = (rightDistributor f X).inv ≫ h\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\ng h : (⨁ f) ⊗ X ⟶ Y\nw : ∀ (j : J), (biproduct.ι f j ⊗ 𝟙 X) ≫ g = (biproduct.ι f j ⊗ 𝟙 X) ≫ h\nj✝ : J\n⊢ biproduct.ι (fun j => f j ⊗ X) j✝ ≫ (rightDistributor f X).inv ≫ g =\n    biproduct.ι (fun j => f j ⊗ X) j✝ ≫ (rightDistributor f X).inv ≫ h\n[PROOFSTEP]\nsimp? [rightDistributor_inv, Preadditive.comp_sum_assoc, biproduct.ι_π_assoc,\n    dite_comp] says simp only [rightDistributor_inv, Preadditive.comp_sum_assoc, ne_eq, biproduct.ι_π_assoc, dite_comp,\n    zero_comp, Finset.sum_dite_eq, Finset.mem_univ, eqToHom_refl, Category.id_comp, ite_true]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\ng h : (⨁ f) ⊗ X ⟶ Y\nw : ∀ (j : J), (biproduct.ι f j ⊗ 𝟙 X) ≫ g = (biproduct.ι f j ⊗ 𝟙 X) ≫ h\nj✝ : J\n⊢ biproduct.ι (fun j => f j ⊗ X) j✝ ≫ (rightDistributor f X).inv ≫ g =\n    biproduct.ι (fun j => f j ⊗ X) j✝ ≫ (rightDistributor f X).inv ≫ h\n[PROOFSTEP]\nsimp only [rightDistributor_inv, Preadditive.comp_sum_assoc, ne_eq, biproduct.ι_π_assoc, dite_comp, zero_comp,\n  Finset.sum_dite_eq, Finset.mem_univ, eqToHom_refl, Category.id_comp, ite_true]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\ng h : (⨁ f) ⊗ X ⟶ Y\nw : ∀ (j : J), (biproduct.ι f j ⊗ 𝟙 X) ≫ g = (biproduct.ι f j ⊗ 𝟙 X) ≫ h\nj✝ : J\n⊢ (biproduct.ι f j✝ ⊗ 𝟙 X) ≫ g = (biproduct.ι f j✝ ⊗ 𝟙 X) ≫ h\n[PROOFSTEP]\napply w\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\ng h : X ⟶ (⨁ f) ⊗ Y\nw : ∀ (j : J), g ≫ (biproduct.π f j ⊗ 𝟙 Y) = h ≫ (biproduct.π f j ⊗ 𝟙 Y)\n⊢ g = h\n[PROOFSTEP]\napply (cancel_mono (rightDistributor f Y).hom).mp\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\ng h : X ⟶ (⨁ f) ⊗ Y\nw : ∀ (j : J), g ≫ (biproduct.π f j ⊗ 𝟙 Y) = h ≫ (biproduct.π f j ⊗ 𝟙 Y)\n⊢ g ≫ (rightDistributor f Y).hom = h ≫ (rightDistributor f Y).hom\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\ng h : X ⟶ (⨁ f) ⊗ Y\nw : ∀ (j : J), g ≫ (biproduct.π f j ⊗ 𝟙 Y) = h ≫ (biproduct.π f j ⊗ 𝟙 Y)\nj✝ : J\n⊢ (g ≫ (rightDistributor f Y).hom) ≫ biproduct.π (fun j => f j ⊗ Y) j✝ =\n    (h ≫ (rightDistributor f Y).hom) ≫ biproduct.π (fun j => f j ⊗ Y) j✝\n[PROOFSTEP]\nsimp? [rightDistributor_hom, Preadditive.sum_comp, Preadditive.comp_sum_assoc, biproduct.ι_π,\n    comp_dite] says simp only [rightDistributor_hom, Category.assoc, Preadditive.sum_comp, ne_eq, biproduct.ι_π,\n    comp_dite, comp_zero, Finset.sum_dite_eq', Finset.mem_univ, eqToHom_refl, Category.comp_id, ite_true]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\ng h : X ⟶ (⨁ f) ⊗ Y\nw : ∀ (j : J), g ≫ (biproduct.π f j ⊗ 𝟙 Y) = h ≫ (biproduct.π f j ⊗ 𝟙 Y)\nj✝ : J\n⊢ (g ≫ (rightDistributor f Y).hom) ≫ biproduct.π (fun j => f j ⊗ Y) j✝ =\n    (h ≫ (rightDistributor f Y).hom) ≫ biproduct.π (fun j => f j ⊗ Y) j✝\n[PROOFSTEP]\nsimp only [rightDistributor_hom, Category.assoc, Preadditive.sum_comp, ne_eq, biproduct.ι_π, comp_dite, comp_zero,\n  Finset.sum_dite_eq', Finset.mem_univ, eqToHom_refl, Category.comp_id, ite_true]\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y : C\ng h : X ⟶ (⨁ f) ⊗ Y\nw : ∀ (j : J), g ≫ (biproduct.π f j ⊗ 𝟙 Y) = h ≫ (biproduct.π f j ⊗ 𝟙 Y)\nj✝ : J\n⊢ g ≫ (biproduct.π f j✝ ⊗ 𝟙 Y) = h ≫ (biproduct.π f j✝ ⊗ 𝟙 Y)\n[PROOFSTEP]\napply w\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y Z : C\ng h : ((⨁ f) ⊗ X) ⊗ Y ⟶ Z\nw : ∀ (j : J), ((biproduct.ι f j ⊗ 𝟙 X) ⊗ 𝟙 Y) ≫ g = ((biproduct.ι f j ⊗ 𝟙 X) ⊗ 𝟙 Y) ≫ h\n⊢ g = h\n[PROOFSTEP]\napply (cancel_epi (α_ _ _ _).inv).mp\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y Z : C\ng h : ((⨁ f) ⊗ X) ⊗ Y ⟶ Z\nw : ∀ (j : J), ((biproduct.ι f j ⊗ 𝟙 X) ⊗ 𝟙 Y) ≫ g = ((biproduct.ι f j ⊗ 𝟙 X) ⊗ 𝟙 Y) ≫ h\n⊢ (α_ (⨁ f) X Y).inv ≫ g = (α_ (⨁ f) X Y).inv ≫ h\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y Z : C\ng h : ((⨁ f) ⊗ X) ⊗ Y ⟶ Z\nw : ∀ (j : J), ((biproduct.ι f j ⊗ 𝟙 X) ⊗ 𝟙 Y) ≫ g = ((biproduct.ι f j ⊗ 𝟙 X) ⊗ 𝟙 Y) ≫ h\nj✝ : J\n⊢ (biproduct.ι f j✝ ⊗ 𝟙 (X ⊗ Y)) ≫ (α_ (⨁ f) X Y).inv ≫ g = (biproduct.ι f j✝ ⊗ 𝟙 (X ⊗ Y)) ≫ (α_ (⨁ f) X Y).inv ≫ h\n[PROOFSTEP]\nsimp_rw [← tensor_id, associator_inv_naturality_assoc, w]\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y Z : C\ng h : X ⟶ ((⨁ f) ⊗ Y) ⊗ Z\nw : ∀ (j : J), g ≫ ((biproduct.π f j ⊗ 𝟙 Y) ⊗ 𝟙 Z) = h ≫ ((biproduct.π f j ⊗ 𝟙 Y) ⊗ 𝟙 Z)\n⊢ g = h\n[PROOFSTEP]\napply (cancel_mono (α_ _ _ _).hom).mp\n[GOAL]\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y Z : C\ng h : X ⟶ ((⨁ f) ⊗ Y) ⊗ Z\nw : ∀ (j : J), g ≫ ((biproduct.π f j ⊗ 𝟙 Y) ⊗ 𝟙 Z) = h ≫ ((biproduct.π f j ⊗ 𝟙 Y) ⊗ 𝟙 Z)\n⊢ g ≫ (α_ (⨁ f) Y Z).hom = h ≫ (α_ (⨁ f) Y Z).hom\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u_1\ninst✝⁵ : Category.{u_2, u_1} C\ninst✝⁴ : Preadditive C\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalPreadditive C\ninst✝¹ : HasFiniteBiproducts C\nJ : Type\ninst✝ : Fintype J\nf : J → C\nX Y Z : C\ng h : X ⟶ ((⨁ f) ⊗ Y) ⊗ Z\nw : ∀ (j : J), g ≫ ((biproduct.π f j ⊗ 𝟙 Y) ⊗ 𝟙 Z) = h ≫ ((biproduct.π f j ⊗ 𝟙 Y) ⊗ 𝟙 Z)\nj✝ : J\n⊢ (g ≫ (α_ (⨁ f) Y Z).hom) ≫ (biproduct.π f j✝ ⊗ 𝟙 (Y ⊗ Z)) = (h ≫ (α_ (⨁ f) Y Z).hom) ≫ (biproduct.π f j✝ ⊗ 𝟙 (Y ⊗ Z))\n[PROOFSTEP]\nsimp_rw [← tensor_id, Category.assoc, ← associator_naturality, ← Category.assoc, w]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monoidal.Preadditive", "llama_tokens": 25879, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7662936324115011, "lm_q2_score": 0.4882833952958347, "lm_q1q2_score": 0.374168456627466}}
{"text": "[GOAL]\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁶ : CommSemiring C\ninst✝⁵ : CommSemiring D\ninst✝⁴ : CommSemiring E\ninst✝³ : Algebra C D\ninst✝² : Algebra C E\ninst✝¹ : Algebra D E\ninst✝ : IsScalarTower C D E\nS : Set E\n⊢ Subalgebra.restrictScalars C (adjoin D S) =\n    Subalgebra.restrictScalars C (adjoin { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } S)\n[PROOFSTEP]\nsuffices Set.range (algebraMap D E) = Set.range (algebraMap ((⊤ : Subalgebra C D).map (IsScalarTower.toAlgHom C D E)) E)\n  by\n  ext x\n  change x ∈ Subsemiring.closure (_ ∪ S) ↔ x ∈ Subsemiring.closure (_ ∪ S)\n  rw [this]\n[GOAL]\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁶ : CommSemiring C\ninst✝⁵ : CommSemiring D\ninst✝⁴ : CommSemiring E\ninst✝³ : Algebra C D\ninst✝² : Algebra C E\ninst✝¹ : Algebra D E\ninst✝ : IsScalarTower C D E\nS : Set E\nthis :\n  Set.range ↑(algebraMap D E) = Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)\n⊢ Subalgebra.restrictScalars C (adjoin D S) =\n    Subalgebra.restrictScalars C (adjoin { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } S)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁶ : CommSemiring C\ninst✝⁵ : CommSemiring D\ninst✝⁴ : CommSemiring E\ninst✝³ : Algebra C D\ninst✝² : Algebra C E\ninst✝¹ : Algebra D E\ninst✝ : IsScalarTower C D E\nS : Set E\nthis :\n  Set.range ↑(algebraMap D E) = Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)\nx : E\n⊢ x ∈ Subalgebra.restrictScalars C (adjoin D S) ↔\n    x ∈ Subalgebra.restrictScalars C (adjoin { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } S)\n[PROOFSTEP]\nchange x ∈ Subsemiring.closure (_ ∪ S) ↔ x ∈ Subsemiring.closure (_ ∪ S)\n[GOAL]\ncase h\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁶ : CommSemiring C\ninst✝⁵ : CommSemiring D\ninst✝⁴ : CommSemiring E\ninst✝³ : Algebra C D\ninst✝² : Algebra C E\ninst✝¹ : Algebra D E\ninst✝ : IsScalarTower C D E\nS : Set E\nthis :\n  Set.range ↑(algebraMap D E) = Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)\nx : E\n⊢ x ∈ Subsemiring.closure (Set.range ↑(algebraMap D E) ∪ S) ↔\n    x ∈ Subsemiring.closure (Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E) ∪ S)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁶ : CommSemiring C\ninst✝⁵ : CommSemiring D\ninst✝⁴ : CommSemiring E\ninst✝³ : Algebra C D\ninst✝² : Algebra C E\ninst✝¹ : Algebra D E\ninst✝ : IsScalarTower C D E\nS : Set E\n⊢ Set.range ↑(algebraMap D E) = Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁶ : CommSemiring C\ninst✝⁵ : CommSemiring D\ninst✝⁴ : CommSemiring E\ninst✝³ : Algebra C D\ninst✝² : Algebra C E\ninst✝¹ : Algebra D E\ninst✝ : IsScalarTower C D E\nS : Set E\nx : E\n⊢ x ∈ Set.range ↑(algebraMap D E) ↔\n    x ∈ Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁶ : CommSemiring C\ninst✝⁵ : CommSemiring D\ninst✝⁴ : CommSemiring E\ninst✝³ : Algebra C D\ninst✝² : Algebra C E\ninst✝¹ : Algebra D E\ninst✝ : IsScalarTower C D E\nS : Set E\nx : E\n⊢ x ∈ Set.range ↑(algebraMap D E) →\n    x ∈ Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)\n[PROOFSTEP]\nrintro ⟨y, hy⟩\n[GOAL]\ncase h.mp.intro\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁶ : CommSemiring C\ninst✝⁵ : CommSemiring D\ninst✝⁴ : CommSemiring E\ninst✝³ : Algebra C D\ninst✝² : Algebra C E\ninst✝¹ : Algebra D E\ninst✝ : IsScalarTower C D E\nS : Set E\nx : E\ny : D\nhy : ↑(algebraMap D E) y = x\n⊢ x ∈ Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)\n[PROOFSTEP]\nexact ⟨⟨algebraMap D E y, ⟨y, ⟨Algebra.mem_top, rfl⟩⟩⟩, hy⟩\n[GOAL]\ncase h.mpr\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁶ : CommSemiring C\ninst✝⁵ : CommSemiring D\ninst✝⁴ : CommSemiring E\ninst✝³ : Algebra C D\ninst✝² : Algebra C E\ninst✝¹ : Algebra D E\ninst✝ : IsScalarTower C D E\nS : Set E\nx : E\n⊢ x ∈ Set.range ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E) →\n    x ∈ Set.range ↑(algebraMap D E)\n[PROOFSTEP]\nrintro ⟨⟨y, ⟨z, ⟨h0, h1⟩⟩⟩, h2⟩\n[GOAL]\ncase h.mpr.intro.mk.intro.intro\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝⁶ : CommSemiring C\ninst✝⁵ : CommSemiring D\ninst✝⁴ : CommSemiring E\ninst✝³ : Algebra C D\ninst✝² : Algebra C E\ninst✝¹ : Algebra D E\ninst✝ : IsScalarTower C D E\nS : Set E\nx y : E\nz : D\nh0 : z ∈ ↑⊤.toSubsemiring\nh1 : ↑↑(IsScalarTower.toAlgHom C D E) z = y\nh2 :\n  ↑(algebraMap { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤ } E)\n      { val := y, property := (_ : ∃ a, a ∈ ↑⊤.toSubsemiring ∧ ↑↑(IsScalarTower.toAlgHom C D E) a = y) } =\n    x\n⊢ x ∈ Set.range ↑(algebraMap D E)\n[PROOFSTEP]\nexact ⟨z, Eq.trans h1 h2⟩\n[GOAL]\nR : Type u\nS✝ : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\nD : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹⁰ : CommSemiring C\ninst✝⁹ : CommSemiring D\ninst✝⁸ : CommSemiring E\ninst✝⁷ : CommSemiring F\ninst✝⁶ : Algebra C D\ninst✝⁵ : Algebra C E\ninst✝⁴ : Algebra C F\ninst✝³ : Algebra D F\ninst✝² : Algebra E F\ninst✝¹ : IsScalarTower C D F\ninst✝ : IsScalarTower C E F\nS : Set D\nT : Set E\nhS : adjoin C S = ⊤\nhT : adjoin C T = ⊤\n⊢ Subalgebra.restrictScalars C (adjoin E (↑(algebraMap D F) '' S)) =\n    Subalgebra.restrictScalars C (adjoin D (↑(algebraMap E F) '' T))\n[PROOFSTEP]\nrw [adjoin_restrictScalars C E, adjoin_restrictScalars C D, ← hS, ← hT, ← Algebra.adjoin_image, ← Algebra.adjoin_image,\n  ← AlgHom.coe_toRingHom, ← AlgHom.coe_toRingHom, IsScalarTower.coe_toAlgHom, IsScalarTower.coe_toAlgHom, ←\n  adjoin_union_eq_adjoin_adjoin, ← adjoin_union_eq_adjoin_adjoin, Set.union_comm]\n[GOAL]\nR✝ : Type u\nS✝ : Type v\nA✝ : Type w\nB : Type u₁\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring S\ninst✝⁴ : CommSemiring A\ninst✝³ : Algebra R S\ninst✝² : Algebra S A\ninst✝¹ : Algebra R A\ninst✝ : IsScalarTower R S A\nhRS : Subalgebra.FG ⊤\nhSA : Subalgebra.FG ⊤\ns : Finset S\nhs : adjoin R ↑s = ⊤\nt : Finset A\nht : adjoin S ↑t = ⊤\n⊢ adjoin R ↑(Finset.image (↑(algebraMap S A)) s ∪ t) = ⊤\n[PROOFSTEP]\nrw [Finset.coe_union, Finset.coe_image, Algebra.adjoin_union_eq_adjoin_adjoin, Algebra.adjoin_algebraMap, hs,\n  Algebra.map_top, IsScalarTower.adjoin_range_toAlgHom, ht, Subalgebra.restrictScalars_top]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nhAC : Subalgebra.FG ⊤\nhBC : FG ⊤\n⊢ ∃ B₀, Subalgebra.FG B₀ ∧ FG ⊤\n[PROOFSTEP]\ncases' hAC with x hx\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nhBC : FG ⊤\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\n⊢ ∃ B₀, Subalgebra.FG B₀ ∧ FG ⊤\n[PROOFSTEP]\ncases' hBC with y hy\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\n⊢ ∃ B₀, Subalgebra.FG B₀ ∧ FG ⊤\n[PROOFSTEP]\nhave := hy\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy this : span B ↑y = ⊤\n⊢ ∃ B₀, Subalgebra.FG B₀ ∧ FG ⊤\n[PROOFSTEP]\nsimp_rw [eq_top_iff', mem_span_finset] at this \n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nthis : ∀ (x : C), ∃ f, (Finset.sum y fun i => f i • i) = x\n⊢ ∃ B₀, Subalgebra.FG B₀ ∧ FG ⊤\n[PROOFSTEP]\nchoose f hf using this\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\n⊢ ∃ B₀, Subalgebra.FG B₀ ∧ FG ⊤\n[PROOFSTEP]\nlet s : Finset B := Finset.image₂ f (x ∪ y * y) y\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\n⊢ ∃ B₀, Subalgebra.FG B₀ ∧ FG ⊤\n[PROOFSTEP]\nhave hxy : ∀ xi ∈ x, xi ∈ span (Algebra.adjoin A (↑s : Set B)) (↑(insert 1 y : Finset C) : Set C) := fun xi hxi =>\n  hf xi ▸\n    sum_mem fun yj hyj =>\n      smul_mem (span (Algebra.adjoin A (↑s : Set B)) (↑(insert 1 y : Finset C) : Set C))\n        ⟨f xi yj, Algebra.subset_adjoin <| mem_image₂_of_mem (mem_union_left _ hxi) hyj⟩\n        (subset_span <| mem_insert_of_mem hyj)\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\n⊢ ∃ B₀, Subalgebra.FG B₀ ∧ FG ⊤\n[PROOFSTEP]\nhave hyy :\n  span (Algebra.adjoin A (↑s : Set B)) (↑(insert 1 y : Finset C) : Set C) *\n      span (Algebra.adjoin A (↑s : Set B)) (↑(insert 1 y : Finset C) : Set C) ≤\n    span (Algebra.adjoin A (↑s : Set B)) (↑(insert 1 y : Finset C) : Set C) :=\n  by\n  rw [span_mul_span, span_le, coe_insert]\n  rintro _ ⟨yi, yj, rfl | hyi, rfl | hyj, rfl⟩ <;> dsimp\n  · rw [mul_one]\n    exact subset_span (Set.mem_insert _ _)\n  · rw [one_mul]\n    exact subset_span (Set.mem_insert_of_mem _ hyj)\n  · rw [mul_one]\n    exact subset_span (Set.mem_insert_of_mem _ hyi)\n  · rw [← hf (yi * yj)]\n    exact\n      SetLike.mem_coe.2\n        (sum_mem fun yk hyk =>\n          smul_mem (span (Algebra.adjoin A (↑s : Set B)) (insert 1 ↑y : Set C))\n            ⟨f (yi * yj) yk, Algebra.subset_adjoin <| mem_image₂_of_mem (mem_union_right _ <| mul_mem_mul hyi hyj) hyk⟩\n            (subset_span <| Set.mem_insert_of_mem _ hyk : yk ∈ _))\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\n⊢ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y) * span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y) ≤\n    span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\n[PROOFSTEP]\nrw [span_mul_span, span_le, coe_insert]\n[GOAL]\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\n⊢ insert 1 ↑y * insert 1 ↑y ⊆ ↑(span { x // x ∈ Algebra.adjoin A ↑s } (insert 1 ↑y))\n[PROOFSTEP]\nrintro _ ⟨yi, yj, rfl | hyi, rfl | hyj, rfl⟩\n[GOAL]\ncase intro.intro.intro.inl.intro.inl\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\n⊢ (fun x x_1 => x * x_1) 1 1 ∈ ↑(span { x // x ∈ Algebra.adjoin A ↑s } (insert 1 ↑y))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro.intro.inl.intro.inr\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nyj : C\nhyj : yj ∈ ↑y\n⊢ (fun x x_1 => x * x_1) 1 yj ∈ ↑(span { x // x ∈ Algebra.adjoin A ↑s } (insert 1 ↑y))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro.intro.inr.intro.inl\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nyi : C\nhyi : yi ∈ ↑y\n⊢ (fun x x_1 => x * x_1) yi 1 ∈ ↑(span { x // x ∈ Algebra.adjoin A ↑s } (insert 1 ↑y))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro.intro.inr.intro.inr\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nyi yj : C\nhyi : yi ∈ ↑y\nhyj : yj ∈ ↑y\n⊢ (fun x x_1 => x * x_1) yi yj ∈ ↑(span { x // x ∈ Algebra.adjoin A ↑s } (insert 1 ↑y))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro.intro.inl.intro.inl\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\n⊢ 1 * 1 ∈ ↑(span { x_1 // x_1 ∈ Algebra.adjoin A ↑(image₂ f (x ∪ y * y) y) } (insert 1 ↑y))\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase intro.intro.intro.inl.intro.inl\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\n⊢ 1 ∈ ↑(span { x_1 // x_1 ∈ Algebra.adjoin A ↑(image₂ f (x ∪ y * y) y) } (insert 1 ↑y))\n[PROOFSTEP]\nexact subset_span (Set.mem_insert _ _)\n[GOAL]\ncase intro.intro.intro.inl.intro.inr\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nyj : C\nhyj : yj ∈ ↑y\n⊢ 1 * yj ∈ ↑(span { x_1 // x_1 ∈ Algebra.adjoin A ↑(image₂ f (x ∪ y * y) y) } (insert 1 ↑y))\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\ncase intro.intro.intro.inl.intro.inr\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nyj : C\nhyj : yj ∈ ↑y\n⊢ yj ∈ ↑(span { x_1 // x_1 ∈ Algebra.adjoin A ↑(image₂ f (x ∪ y * y) y) } (insert 1 ↑y))\n[PROOFSTEP]\nexact subset_span (Set.mem_insert_of_mem _ hyj)\n[GOAL]\ncase intro.intro.intro.inr.intro.inl\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nyi : C\nhyi : yi ∈ ↑y\n⊢ yi * 1 ∈ ↑(span { x_1 // x_1 ∈ Algebra.adjoin A ↑(image₂ f (x ∪ y * y) y) } (insert 1 ↑y))\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase intro.intro.intro.inr.intro.inl\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nyi : C\nhyi : yi ∈ ↑y\n⊢ yi ∈ ↑(span { x_1 // x_1 ∈ Algebra.adjoin A ↑(image₂ f (x ∪ y * y) y) } (insert 1 ↑y))\n[PROOFSTEP]\nexact subset_span (Set.mem_insert_of_mem _ hyi)\n[GOAL]\ncase intro.intro.intro.inr.intro.inr\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nyi yj : C\nhyi : yi ∈ ↑y\nhyj : yj ∈ ↑y\n⊢ yi * yj ∈ ↑(span { x_1 // x_1 ∈ Algebra.adjoin A ↑(image₂ f (x ∪ y * y) y) } (insert 1 ↑y))\n[PROOFSTEP]\nrw [← hf (yi * yj)]\n[GOAL]\ncase intro.intro.intro.inr.intro.inr\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nyi yj : C\nhyi : yi ∈ ↑y\nhyj : yj ∈ ↑y\n⊢ (Finset.sum y fun i => f (yi * yj) i • i) ∈\n    ↑(span { x_1 // x_1 ∈ Algebra.adjoin A ↑(image₂ f (x ∪ y * y) y) } (insert 1 ↑y))\n[PROOFSTEP]\nexact\n  SetLike.mem_coe.2\n    (sum_mem fun yk hyk =>\n      smul_mem (span (Algebra.adjoin A (↑s : Set B)) (insert 1 ↑y : Set C))\n        ⟨f (yi * yj) yk, Algebra.subset_adjoin <| mem_image₂_of_mem (mem_union_right _ <| mul_mem_mul hyi hyj) hyk⟩\n        (subset_span <| Set.mem_insert_of_mem _ hyk : yk ∈ _))\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nhyy :\n  span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y) * span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y) ≤\n    span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\n⊢ ∃ B₀, Subalgebra.FG B₀ ∧ FG ⊤\n[PROOFSTEP]\nrefine' ⟨Algebra.adjoin A (↑s : Set B), Subalgebra.fg_adjoin_finset _, insert 1 y, _⟩\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nhyy :\n  span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y) * span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y) ≤\n    span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\n⊢ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y) = ⊤\n[PROOFSTEP]\nrefine' restrictScalars_injective A (Algebra.adjoin A s) C _\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nhyy :\n  span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y) * span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y) ≤\n    span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\n⊢ restrictScalars A (span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)) = restrictScalars A ⊤\n[PROOFSTEP]\nrw [restrictScalars_top, eq_top_iff, ← Algebra.top_toSubmodule, ← hx, Algebra.adjoin_eq_span, span_le]\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nA : Type w\nB : Type u₁\nC : Type u_1\ninst✝⁶ : CommSemiring A\ninst✝⁵ : CommSemiring B\ninst✝⁴ : Semiring C\ninst✝³ : Algebra A B\ninst✝² : Algebra B C\ninst✝¹ : Algebra A C\ninst✝ : IsScalarTower A B C\nx : Finset C\nhx : Algebra.adjoin A ↑x = ⊤\ny : Finset C\nhy : span B ↑y = ⊤\nf : C → C → B\nhf : ∀ (x : C), (Finset.sum y fun i => f x i • i) = x\ns : Finset B := image₂ f (x ∪ y * y) y\nhxy : ∀ (xi : C), xi ∈ x → xi ∈ span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\nhyy :\n  span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y) * span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y) ≤\n    span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)\n⊢ ↑(Submonoid.closure ↑x) ⊆ ↑(restrictScalars A (span { x // x ∈ Algebra.adjoin A ↑s } ↑(insert 1 y)))\n[PROOFSTEP]\nrefine' fun r hr =>\n  Submonoid.closure_induction hr (fun c hc => hxy c hc) (subset_span <| mem_insert_self _ _) fun p q hp hq =>\n    hyy <| Submodule.mul_mem_mul hp hq\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Adjoin.Tower", "llama_tokens": 12337, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7310585786300049, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.3740948136963992}}
{"text": "[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁴ : UniformSpace α\ninst✝³ : MonoidWithZero M\ninst✝² : Zero α\ninst✝¹ : MulActionWithZero M α\ninst✝ : UniformContinuousConstSMul M α\nsrc✝ : MulAction M (Completion α) := inferInstance\nr : M\n⊢ r • 0 = 0\n[PROOFSTEP]\nrw [← coe_zero, ← coe_smul, MulActionWithZero.smul_zero r]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁴ : UniformSpace α\ninst✝³ : MonoidWithZero M\ninst✝² : Zero α\ninst✝¹ : MulActionWithZero M α\ninst✝ : UniformContinuousConstSMul M α\nsrc✝ : MulAction M (Completion α) := inferInstance\na : α\n⊢ 0 • ↑α a = 0\n[PROOFSTEP]\nrw [← coe_smul, zero_smul, coe_zero]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddGroup α\ninst✝ : UniformAddGroup α\nsrc✝¹ : Zero (Completion α) := inferInstance\nsrc✝ : Add (Completion α) := inferInstance\na✝ b✝ c✝ : Completion α\na b c : α\n⊢ ↑α a + ↑α b + ↑α c = ↑α a + (↑α b + ↑α c)\n[PROOFSTEP]\nrepeat' rw_mod_cast [add_assoc]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddGroup α\ninst✝ : UniformAddGroup α\nsrc✝¹ : Zero (Completion α) := inferInstance\nsrc✝ : Add (Completion α) := inferInstance\na✝ b✝ c✝ : Completion α\na b c : α\n⊢ ↑α a + ↑α b + ↑α c = ↑α a + (↑α b + ↑α c)\n[PROOFSTEP]\nrw_mod_cast [add_assoc]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddGroup α\ninst✝ : UniformAddGroup α\nsrc✝¹ : Zero (Completion α) := inferInstance\nsrc✝ : Add (Completion α) := inferInstance\na✝ : Completion α\na : α\n⊢ 0 + ↑α a = ↑α a\n[PROOFSTEP]\nrw [← coe_zero, ← coe_add, zero_add]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddGroup α\ninst✝ : UniformAddGroup α\nsrc✝¹ : Zero (Completion α) := inferInstance\nsrc✝ : Add (Completion α) := inferInstance\na✝ : Completion α\na : α\n⊢ ↑α a + 0 = ↑α a\n[PROOFSTEP]\nrw [← coe_zero, ← coe_add, add_zero]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddGroup α\ninst✝ : UniformAddGroup α\nsrc✝¹ : Zero (Completion α) := inferInstance\nsrc✝ : Add (Completion α) := inferInstance\na✝ : Completion α\na : α\n⊢ 0 • ↑α a = 0\n[PROOFSTEP]\nrw [← coe_smul, ← coe_zero, zero_smul]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddGroup α\ninst✝ : UniformAddGroup α\nsrc✝¹ : Zero (Completion α) := inferInstance\nsrc✝ : Add (Completion α) := inferInstance\nn : ℕ\na✝ : Completion α\na : α\n⊢ (n + 1) • ↑α a = ↑α a + n • ↑α a\n[PROOFSTEP]\nrw [← coe_smul, succ_nsmul, coe_add, coe_smul]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddGroup α\ninst✝ : UniformAddGroup α\nsrc✝² : AddMonoid (Completion α) := inferInstance\nsrc✝¹ : Neg (Completion α) := inferInstance\nsrc✝ : Sub (Completion α) := inferInstance\na✝ b✝ : Completion α\na b : α\n⊢ ↑α a - ↑α b = ↑α a + -↑α b\n[PROOFSTEP]\nexact_mod_cast congr_arg ((↑) : α → Completion α) (sub_eq_add_neg a b)\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddGroup α\ninst✝ : UniformAddGroup α\nsrc✝² : AddMonoid (Completion α) := inferInstance\nsrc✝¹ : Neg (Completion α) := inferInstance\nsrc✝ : Sub (Completion α) := inferInstance\na✝ : Completion α\na : α\n⊢ 0 • ↑α a = 0\n[PROOFSTEP]\nrw [← coe_smul, ← coe_zero, zero_smul]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddGroup α\ninst✝ : UniformAddGroup α\nsrc✝² : AddMonoid (Completion α) := inferInstance\nsrc✝¹ : Neg (Completion α) := inferInstance\nsrc✝ : Sub (Completion α) := inferInstance\nn : ℕ\na✝ : Completion α\na : α\n⊢ Int.ofNat (Nat.succ n) • ↑α a = ↑α a + (fun x x_1 => x • x_1) (Int.ofNat n) (↑α a)\n[PROOFSTEP]\nrw [← coe_smul, show Int.ofNat n.succ • a = a + Int.ofNat n • a from SubNegMonoid.zsmul_succ' n a, coe_add, coe_smul]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddGroup α\ninst✝ : UniformAddGroup α\nsrc✝² : AddMonoid (Completion α) := inferInstance\nsrc✝¹ : Neg (Completion α) := inferInstance\nsrc✝ : Sub (Completion α) := inferInstance\nn : ℕ\na✝ : Completion α\na : α\n⊢ Int.negSucc n • ↑α a = -(fun x x_1 => x • x_1) (↑(Nat.succ n)) (↑α a)\n[PROOFSTEP]\nrw [← coe_smul, show (Int.negSucc n) • a = -((n.succ : ℤ) • a) from SubNegMonoid.zsmul_neg' n a, coe_neg, coe_smul]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddGroup α\ninst✝ : UniformAddGroup α\nsrc✝ : SubNegMonoid (Completion α) := inferInstance\na✝ : Completion α\na : α\n⊢ -↑α a + ↑α a = 0\n[PROOFSTEP]\nrw_mod_cast [add_left_neg]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddGroup α\ninst✝ : UniformAddGroup α\nsrc✝ : SubNegMonoid (Completion α) := inferInstance\na✝ : Completion α\na : α\n⊢ ↑α 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nM✝ : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁵ : UniformSpace α\ninst✝⁴ : AddGroup α\ninst✝³ : UniformAddGroup α\nM : Type ?u.31551\ninst✝² : Monoid M\ninst✝¹ : DistribMulAction M α\ninst✝ : UniformContinuousConstSMul M α\nsrc✝ : MulAction M (Completion α) := inferInstance\nr : M\n⊢ r • 0 = 0\n[PROOFSTEP]\nrw [← coe_zero, ← coe_smul, smul_zero r]\n[GOAL]\nM✝ : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁵ : UniformSpace α\ninst✝⁴ : AddGroup α\ninst✝³ : UniformAddGroup α\nM : Type ?u.31551\ninst✝² : Monoid M\ninst✝¹ : DistribMulAction M α\ninst✝ : UniformContinuousConstSMul M α\nsrc✝ : MulAction M (Completion α) := inferInstance\nr : M\nx y : Completion α\na b : α\n⊢ r • (↑α a + ↑α b) = r • ↑α a + r • ↑α b\n[PROOFSTEP]\nsimp only [← coe_add, ← coe_smul, smul_add]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddCommGroup α\ninst✝ : UniformAddGroup α\nsrc✝ : AddGroup (Completion α) := inferInstance\na b : Completion α\nx y : α\n⊢ ↑α x + ↑α y = ↑α y + ↑α x\n[PROOFSTEP]\nchange (x : Completion α) + ↑y = ↑y + ↑x\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝² : UniformSpace α\ninst✝¹ : AddCommGroup α\ninst✝ : UniformAddGroup α\nsrc✝ : AddGroup (Completion α) := inferInstance\na b : Completion α\nx y : α\n⊢ ↑α x + ↑α y = ↑α y + ↑α x\n[PROOFSTEP]\nrw [← coe_add, ← coe_add, add_comm]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁵ : UniformSpace α\ninst✝⁴ : AddCommGroup α\ninst✝³ : UniformAddGroup α\ninst✝² : Semiring R\ninst✝¹ : Module R α\ninst✝ : UniformContinuousConstSMul R α\nsrc✝¹ : DistribMulAction R (Completion α) := inferInstance\nsrc✝ : MulActionWithZero R (Completion α) := inferInstance\na b : R\nx : α\n⊢ (a + b) • ↑α x = a • ↑α x + b • ↑α x\n[PROOFSTEP]\nrw [← coe_smul, add_smul, coe_add, coe_smul, coe_smul]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁷ : UniformSpace α\ninst✝⁶ : AddGroup α\ninst✝⁵ : UniformAddGroup α\ninst✝⁴ : UniformSpace β\ninst✝³ : AddGroup β\ninst✝² : UniformAddGroup β\ninst✝¹ : CompleteSpace β\ninst✝ : SeparatedSpace β\nf : α →+ β\nhf✝ : Continuous ↑f\nhf : UniformContinuous ↑f\n⊢ Completion.extension (↑f) 0 = 0\n[PROOFSTEP]\nrw [← coe_zero, extension_coe hf, f.map_zero]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁷ : UniformSpace α\ninst✝⁶ : AddGroup α\ninst✝⁵ : UniformAddGroup α\ninst✝⁴ : UniformSpace β\ninst✝³ : AddGroup β\ninst✝² : UniformAddGroup β\ninst✝¹ : CompleteSpace β\ninst✝ : SeparatedSpace β\nf : α →+ β\nhf✝ : Continuous ↑f\nhf : UniformContinuous ↑f\na✝ b✝ : Completion α\na b : α\n⊢ Completion.extension (↑f) (↑α a + ↑α b) = Completion.extension (↑f) (↑α a) + Completion.extension (↑f) (↑α b)\n[PROOFSTEP]\nrw_mod_cast [extension_coe hf, extension_coe hf, extension_coe hf, f.map_add]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁵ : UniformSpace α\ninst✝⁴ : AddGroup α\ninst✝³ : UniformAddGroup α\ninst✝² : UniformSpace β\ninst✝¹ : AddGroup β\ninst✝ : UniformAddGroup β\n⊢ completion 0 (_ : Continuous fun x => AddZeroClass.toZero.1) = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁵ : UniformSpace α\ninst✝⁴ : AddGroup α\ninst✝³ : UniformAddGroup α\ninst✝² : UniformSpace β\ninst✝¹ : AddGroup β\ninst✝ : UniformAddGroup β\nx : Completion α\n⊢ ↑(completion 0 (_ : Continuous fun x => AddZeroClass.toZero.1)) x = ↑0 x\n[PROOFSTEP]\nrefine Completion.induction_on x ?_ ?_\n[GOAL]\ncase h.refine_1\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁵ : UniformSpace α\ninst✝⁴ : AddGroup α\ninst✝³ : UniformAddGroup α\ninst✝² : UniformSpace β\ninst✝¹ : AddGroup β\ninst✝ : UniformAddGroup β\nx : Completion α\n⊢ IsClosed {a | ↑(completion 0 (_ : Continuous fun x => AddZeroClass.toZero.1)) a = ↑0 a}\n[PROOFSTEP]\napply isClosed_eq (AddMonoidHom.continuous_completion (0 : α →+ β) continuous_const)\n[GOAL]\ncase h.refine_1\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁵ : UniformSpace α\ninst✝⁴ : AddGroup α\ninst✝³ : UniformAddGroup α\ninst✝² : UniformSpace β\ninst✝¹ : AddGroup β\ninst✝ : UniformAddGroup β\nx : Completion α\n⊢ Continuous fun x => ↑0 x\n[PROOFSTEP]\nsimp [continuous_const]\n[GOAL]\ncase h.refine_2\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁵ : UniformSpace α\ninst✝⁴ : AddGroup α\ninst✝³ : UniformAddGroup α\ninst✝² : UniformSpace β\ninst✝¹ : AddGroup β\ninst✝ : UniformAddGroup β\nx : Completion α\n⊢ ∀ (a : α), ↑(completion 0 (_ : Continuous fun x => AddZeroClass.toZero.1)) (↑α a) = ↑0 (↑α a)\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h.refine_2\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁵ : UniformSpace α\ninst✝⁴ : AddGroup α\ninst✝³ : UniformAddGroup α\ninst✝² : UniformSpace β\ninst✝¹ : AddGroup β\ninst✝ : UniformAddGroup β\nx : Completion α\na : α\n⊢ ↑(completion 0 (_ : Continuous fun x => AddZeroClass.toZero.1)) (↑α a) = ↑0 (↑α a)\n[PROOFSTEP]\nsimp [(0 : α →+ β).completion_coe continuous_const, coe_zero]\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁸ : UniformSpace α\ninst✝⁷ : AddGroup α\ninst✝⁶ : UniformAddGroup α\ninst✝⁵ : UniformSpace β\ninst✝⁴ : AddGroup β\ninst✝³ : UniformAddGroup β\nγ : Type u_5\ninst✝² : AddCommGroup γ\ninst✝¹ : UniformSpace γ\ninst✝ : UniformAddGroup γ\nf g : α →+ γ\nhf : Continuous ↑f\nhg : Continuous ↑g\n⊢ completion (f + g) (_ : Continuous fun x => ↑f x + ↑g x) = completion f hf + completion g hg\n[PROOFSTEP]\nhave hfg := hf.add hg\n[GOAL]\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁸ : UniformSpace α\ninst✝⁷ : AddGroup α\ninst✝⁶ : UniformAddGroup α\ninst✝⁵ : UniformSpace β\ninst✝⁴ : AddGroup β\ninst✝³ : UniformAddGroup β\nγ : Type u_5\ninst✝² : AddCommGroup γ\ninst✝¹ : UniformSpace γ\ninst✝ : UniformAddGroup γ\nf g : α →+ γ\nhf : Continuous ↑f\nhg : Continuous ↑g\nhfg : Continuous fun x => ↑f x + ↑g x\n⊢ completion (f + g) (_ : Continuous fun x => ↑f x + ↑g x) = completion f hf + completion g hg\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁸ : UniformSpace α\ninst✝⁷ : AddGroup α\ninst✝⁶ : UniformAddGroup α\ninst✝⁵ : UniformSpace β\ninst✝⁴ : AddGroup β\ninst✝³ : UniformAddGroup β\nγ : Type u_5\ninst✝² : AddCommGroup γ\ninst✝¹ : UniformSpace γ\ninst✝ : UniformAddGroup γ\nf g : α →+ γ\nhf : Continuous ↑f\nhg : Continuous ↑g\nhfg : Continuous fun x => ↑f x + ↑g x\nx : Completion α\n⊢ ↑(completion (f + g) (_ : Continuous fun x => ↑f x + ↑g x)) x = ↑(completion f hf + completion g hg) x\n[PROOFSTEP]\nrefine Completion.induction_on x ?_ ?_\n[GOAL]\ncase h.refine_1\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁸ : UniformSpace α\ninst✝⁷ : AddGroup α\ninst✝⁶ : UniformAddGroup α\ninst✝⁵ : UniformSpace β\ninst✝⁴ : AddGroup β\ninst✝³ : UniformAddGroup β\nγ : Type u_5\ninst✝² : AddCommGroup γ\ninst✝¹ : UniformSpace γ\ninst✝ : UniformAddGroup γ\nf g : α →+ γ\nhf : Continuous ↑f\nhg : Continuous ↑g\nhfg : Continuous fun x => ↑f x + ↑g x\nx : Completion α\n⊢ IsClosed {a | ↑(completion (f + g) (_ : Continuous fun x => ↑f x + ↑g x)) a = ↑(completion f hf + completion g hg) a}\n[PROOFSTEP]\nexact isClosed_eq ((f + g).continuous_completion hfg) ((f.continuous_completion hf).add (g.continuous_completion hg))\n[GOAL]\ncase h.refine_2\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁸ : UniformSpace α\ninst✝⁷ : AddGroup α\ninst✝⁶ : UniformAddGroup α\ninst✝⁵ : UniformSpace β\ninst✝⁴ : AddGroup β\ninst✝³ : UniformAddGroup β\nγ : Type u_5\ninst✝² : AddCommGroup γ\ninst✝¹ : UniformSpace γ\ninst✝ : UniformAddGroup γ\nf g : α →+ γ\nhf : Continuous ↑f\nhg : Continuous ↑g\nhfg : Continuous fun x => ↑f x + ↑g x\nx : Completion α\n⊢ ∀ (a : α),\n    ↑(completion (f + g) (_ : Continuous fun x => ↑f x + ↑g x)) (↑α a) = ↑(completion f hf + completion g hg) (↑α a)\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h.refine_2\nM : Type u_1\nR : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁸ : UniformSpace α\ninst✝⁷ : AddGroup α\ninst✝⁶ : UniformAddGroup α\ninst✝⁵ : UniformSpace β\ninst✝⁴ : AddGroup β\ninst✝³ : UniformAddGroup β\nγ : Type u_5\ninst✝² : AddCommGroup γ\ninst✝¹ : UniformSpace γ\ninst✝ : UniformAddGroup γ\nf g : α →+ γ\nhf : Continuous ↑f\nhg : Continuous ↑g\nhfg : Continuous fun x => ↑f x + ↑g x\nx : Completion α\na : α\n⊢ ↑(completion (f + g) (_ : Continuous fun x => ↑f x + ↑g x)) (↑α a) = ↑(completion f hf + completion g hg) (↑α a)\n[PROOFSTEP]\nsimp [(f + g).completion_coe hfg, coe_add, f.completion_coe hf, g.completion_coe hg]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.GroupCompletion", "llama_tokens": 6356, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191337850932, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.37387750463714753}}
{"text": "[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK✝ K : J ⥤ C\nF : C ⥤ D\n⊢ Subsingleton (PreservesLimit K F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK✝ K : J ⥤ C\nF : C ⥤ D\n⊢ ∀ (a b : PreservesLimit K F), a = b\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase allEq.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK✝ K : J ⥤ C\nF : C ⥤ D\na b : {c : Cone K} → IsLimit c → IsLimit (F.mapCone c)\n⊢ { preserves := a } = { preserves := b }\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK✝ K : J ⥤ C\nF : C ⥤ D\n⊢ Subsingleton (PreservesColimit K F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK✝ K : J ⥤ C\nF : C ⥤ D\n⊢ ∀ (a b : PreservesColimit K F), a = b\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase allEq.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK✝ K : J ⥤ C\nF : C ⥤ D\na b : {c : Cocone K} → IsColimit c → IsColimit (F.mapCocone c)\n⊢ { preserves := a } = { preserves := b }\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝¹ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\ninst✝ : Category.{w', w} J\nF : C ⥤ D\n⊢ Subsingleton (PreservesLimitsOfShape J F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝¹ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\ninst✝ : Category.{w', w} J\nF : C ⥤ D\n⊢ ∀ (a b : PreservesLimitsOfShape J F), a = b\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase allEq.mk.mk\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝¹ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\ninst✝ : Category.{w', w} J\nF : C ⥤ D\na b : {K : J ⥤ C} → PreservesLimit K F\n⊢ PreservesLimitsOfShape.mk = PreservesLimitsOfShape.mk\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝¹ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\ninst✝ : Category.{w', w} J\nF : C ⥤ D\n⊢ Subsingleton (PreservesColimitsOfShape J F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝¹ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\ninst✝ : Category.{w', w} J\nF : C ⥤ D\n⊢ ∀ (a b : PreservesColimitsOfShape J F), a = b\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase allEq.mk.mk\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝¹ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\ninst✝ : Category.{w', w} J\nF : C ⥤ D\na b : {K : J ⥤ C} → PreservesColimit K F\n⊢ PreservesColimitsOfShape.mk = PreservesColimitsOfShape.mk\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\n⊢ Subsingleton (PreservesLimitsOfSize.{w', w, v₁, v₂, u₁, u₂} F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\n⊢ ∀ (a b : PreservesLimitsOfSize.{w', w, v₁, v₂, u₁, u₂} F), a = b\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase allEq.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\na b : {J : Type w} → [inst : Category.{w', w} J] → PreservesLimitsOfShape J F\n⊢ PreservesLimitsOfSize.mk = PreservesLimitsOfSize.mk\n[PROOFSTEP]\ncongr\n[GOAL]\ncase allEq.mk.mk.e_preservesLimitsOfShape\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\na b : {J : Type w} → [inst : Category.{w', w} J] → PreservesLimitsOfShape J F\n⊢ a = b\n[PROOFSTEP]\nfunext\n[GOAL]\ncase allEq.mk.mk.e_preservesLimitsOfShape.h.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\na b : {J : Type w} → [inst : Category.{w', w} J] → PreservesLimitsOfShape J F\nx✝¹ : Type w\nx✝ : Category.{w', w} x✝¹\n⊢ a = b\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\n⊢ Subsingleton (PreservesColimitsOfSize.{w', w, v₁, v₂, u₁, u₂} F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\n⊢ ∀ (a b : PreservesColimitsOfSize.{w', w, v₁, v₂, u₁, u₂} F), a = b\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase allEq.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\na b : {J : Type w} → [inst : Category.{w', w} J] → PreservesColimitsOfShape J F\n⊢ PreservesColimitsOfSize.mk = PreservesColimitsOfSize.mk\n[PROOFSTEP]\ncongr\n[GOAL]\ncase allEq.mk.mk.e_preservesColimitsOfShape\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\na b : {J : Type w} → [inst : Category.{w', w} J] → PreservesColimitsOfShape J F\n⊢ a = b\n[PROOFSTEP]\nfunext\n[GOAL]\ncase allEq.mk.mk.e_preservesColimitsOfShape.h.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\na b : {J : Type w} → [inst : Category.{w', w} J] → PreservesColimitsOfShape J F\nx✝¹ : Type w\nx✝ : Category.{w', w} x✝¹\n⊢ a = b\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\nK : J ⥤ C\nc : Cone K\nh : IsLimit c\n⊢ ∀ (s : Cone (K ⋙ 𝟭 C)) (j : J),\n    (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s ≫\n        NatTrans.app ((𝟭 C).mapCone c).π j =\n      NatTrans.app s.π j\n[PROOFSTEP]\ncases K\n[GOAL]\ncase mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\nc : Cone (Functor.mk toPrefunctor✝)\nh : IsLimit c\n⊢ ∀ (s : Cone (Functor.mk toPrefunctor✝ ⋙ 𝟭 C)) (j : J),\n    (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s ≫\n        NatTrans.app ((𝟭 C).mapCone c).π j =\n      NatTrans.app s.π j\n[PROOFSTEP]\nrcases c with ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → ((Functor.const J).obj pt✝).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝).map f\nh : IsLimit { pt := pt✝, π := NatTrans.mk app✝ }\n⊢ ∀ (s : Cone (Functor.mk toPrefunctor✝ ⋙ 𝟭 C)) (j : J),\n    (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s ≫\n        NatTrans.app ((𝟭 C).mapCone { pt := pt✝, π := NatTrans.mk app✝ }).π j =\n      NatTrans.app s.π j\n[PROOFSTEP]\nintro s j\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → ((Functor.const J).obj pt✝).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝).map f\nh : IsLimit { pt := pt✝, π := NatTrans.mk app✝ }\ns : Cone (Functor.mk toPrefunctor✝ ⋙ 𝟭 C)\nj : J\n⊢ (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s ≫\n      NatTrans.app ((𝟭 C).mapCone { pt := pt✝, π := NatTrans.mk app✝ }).π j =\n    NatTrans.app s.π j\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk.mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝¹ : C\napp✝ : (X : J) → ((Functor.const J).obj pt✝¹).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝¹).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝).map f\nh : IsLimit { pt := pt✝¹, π := NatTrans.mk app✝ }\nj : J\npt✝ : C\nπ✝ : (Functor.const J).obj pt✝ ⟶ Functor.mk toPrefunctor✝ ⋙ 𝟭 C\n⊢ (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) { pt := pt✝, π := π✝ } ≫\n      NatTrans.app ((𝟭 C).mapCone { pt := pt✝¹, π := NatTrans.mk app✝ }).π j =\n    NatTrans.app { pt := pt✝, π := π✝ }.π j\n[PROOFSTEP]\nexact h.fac _ j\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\nK : J ⥤ C\nc : Cone K\nh : IsLimit c\n⊢ ∀ (s : Cone (K ⋙ 𝟭 C)) (m : s.pt ⟶ ((𝟭 C).mapCone c).pt),\n    (∀ (j : J), m ≫ NatTrans.app ((𝟭 C).mapCone c).π j = NatTrans.app s.π j) →\n      m = (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s\n[PROOFSTEP]\ncases K\n[GOAL]\ncase mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\nc : Cone (Functor.mk toPrefunctor✝)\nh : IsLimit c\n⊢ ∀ (s : Cone (Functor.mk toPrefunctor✝ ⋙ 𝟭 C)) (m : s.pt ⟶ ((𝟭 C).mapCone c).pt),\n    (∀ (j : J), m ≫ NatTrans.app ((𝟭 C).mapCone c).π j = NatTrans.app s.π j) →\n      m = (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s\n[PROOFSTEP]\nrcases c with ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → ((Functor.const J).obj pt✝).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝).map f\nh : IsLimit { pt := pt✝, π := NatTrans.mk app✝ }\n⊢ ∀ (s : Cone (Functor.mk toPrefunctor✝ ⋙ 𝟭 C)) (m : s.pt ⟶ ((𝟭 C).mapCone { pt := pt✝, π := NatTrans.mk app✝ }).pt),\n    (∀ (j : J), m ≫ NatTrans.app ((𝟭 C).mapCone { pt := pt✝, π := NatTrans.mk app✝ }).π j = NatTrans.app s.π j) →\n      m = (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s\n[PROOFSTEP]\nintro s m w\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → ((Functor.const J).obj pt✝).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝).map f\nh : IsLimit { pt := pt✝, π := NatTrans.mk app✝ }\ns : Cone (Functor.mk toPrefunctor✝ ⋙ 𝟭 C)\nm : s.pt ⟶ ((𝟭 C).mapCone { pt := pt✝, π := NatTrans.mk app✝ }).pt\nw : ∀ (j : J), m ≫ NatTrans.app ((𝟭 C).mapCone { pt := pt✝, π := NatTrans.mk app✝ }).π j = NatTrans.app s.π j\n⊢ m = (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s\n[PROOFSTEP]\nrcases s with ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝¹ : C\napp✝¹ : (X : J) → ((Functor.const J).obj pt✝¹).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝¹ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝¹).map f ≫ app✝¹ Y = app✝¹ X ≫ (Functor.mk toPrefunctor✝).map f\nh : IsLimit { pt := pt✝¹, π := NatTrans.mk app✝¹ }\npt✝ : C\napp✝ : (X : J) → ((Functor.const J).obj pt✝).obj X ⟶ (Functor.mk toPrefunctor✝ ⋙ 𝟭 C).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝ ⋙ 𝟭 C).map f\nm : { pt := pt✝, π := NatTrans.mk app✝ }.pt ⟶ ((𝟭 C).mapCone { pt := pt✝¹, π := NatTrans.mk app✝¹ }).pt\nw :\n  ∀ (j : J),\n    m ≫ NatTrans.app ((𝟭 C).mapCone { pt := pt✝¹, π := NatTrans.mk app✝¹ }).π j =\n      NatTrans.app { pt := pt✝, π := NatTrans.mk app✝ }.π j\n⊢ m =\n    (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j })\n      { pt := pt✝, π := NatTrans.mk app✝ }\n[PROOFSTEP]\nexact h.uniq _ m w\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\nK : J ⥤ C\nc : Cocone K\nh : IsColimit c\n⊢ ∀ (s : Cocone (K ⋙ 𝟭 C)) (j : J),\n    NatTrans.app ((𝟭 C).mapCocone c).ι j ≫\n        (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s =\n      NatTrans.app s.ι j\n[PROOFSTEP]\ncases K\n[GOAL]\ncase mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\nc : Cocone (Functor.mk toPrefunctor✝)\nh : IsColimit c\n⊢ ∀ (s : Cocone (Functor.mk toPrefunctor✝ ⋙ 𝟭 C)) (j : J),\n    NatTrans.app ((𝟭 C).mapCocone c).ι j ≫\n        (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s =\n      NatTrans.app s.ι j\n[PROOFSTEP]\nrcases c with ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f\nh : IsColimit { pt := pt✝, ι := NatTrans.mk app✝ }\n⊢ ∀ (s : Cocone (Functor.mk toPrefunctor✝ ⋙ 𝟭 C)) (j : J),\n    NatTrans.app ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ }).ι j ≫\n        (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s =\n      NatTrans.app s.ι j\n[PROOFSTEP]\nintro s j\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f\nh : IsColimit { pt := pt✝, ι := NatTrans.mk app✝ }\ns : Cocone (Functor.mk toPrefunctor✝ ⋙ 𝟭 C)\nj : J\n⊢ NatTrans.app ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ }).ι j ≫\n      (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s =\n    NatTrans.app s.ι j\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk.mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝¹ : C\napp✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝¹).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝¹).map f\nh : IsColimit { pt := pt✝¹, ι := NatTrans.mk app✝ }\nj : J\npt✝ : C\nι✝ : Functor.mk toPrefunctor✝ ⋙ 𝟭 C ⟶ (Functor.const J).obj pt✝\n⊢ NatTrans.app ((𝟭 C).mapCocone { pt := pt✝¹, ι := NatTrans.mk app✝ }).ι j ≫\n      (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) { pt := pt✝, ι := ι✝ } =\n    NatTrans.app { pt := pt✝, ι := ι✝ }.ι j\n[PROOFSTEP]\nexact h.fac _ j\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\nK : J ⥤ C\nc : Cocone K\nh : IsColimit c\n⊢ ∀ (s : Cocone (K ⋙ 𝟭 C)) (m : ((𝟭 C).mapCocone c).pt ⟶ s.pt),\n    (∀ (j : J), NatTrans.app ((𝟭 C).mapCocone c).ι j ≫ m = NatTrans.app s.ι j) →\n      m = (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s\n[PROOFSTEP]\ncases K\n[GOAL]\ncase mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\nc : Cocone (Functor.mk toPrefunctor✝)\nh : IsColimit c\n⊢ ∀ (s : Cocone (Functor.mk toPrefunctor✝ ⋙ 𝟭 C)) (m : ((𝟭 C).mapCocone c).pt ⟶ s.pt),\n    (∀ (j : J), NatTrans.app ((𝟭 C).mapCocone c).ι j ≫ m = NatTrans.app s.ι j) →\n      m = (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s\n[PROOFSTEP]\nrcases c with ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f\nh : IsColimit { pt := pt✝, ι := NatTrans.mk app✝ }\n⊢ ∀ (s : Cocone (Functor.mk toPrefunctor✝ ⋙ 𝟭 C))\n    (m : ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ }).pt ⟶ s.pt),\n    (∀ (j : J), NatTrans.app ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ }).ι j ≫ m = NatTrans.app s.ι j) →\n      m = (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s\n[PROOFSTEP]\nintro s m w\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f\nh : IsColimit { pt := pt✝, ι := NatTrans.mk app✝ }\ns : Cocone (Functor.mk toPrefunctor✝ ⋙ 𝟭 C)\nm : ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ }).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ }).ι j ≫ m = NatTrans.app s.ι j\n⊢ m = (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s\n[PROOFSTEP]\nrcases s with ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\n𝒥 : Category.{w', w} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝¹ : C\napp✝¹ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝¹).obj X\nnaturality✝¹ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝¹ Y = app✝¹ X ≫ ((Functor.const J).obj pt✝¹).map f\nh : IsColimit { pt := pt✝¹, ι := NatTrans.mk app✝¹ }\npt✝ : C\napp✝ : (X : J) → (Functor.mk toPrefunctor✝ ⋙ 𝟭 C).obj X ⟶ ((Functor.const J).obj pt✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝ ⋙ 𝟭 C).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f\nm : ((𝟭 C).mapCocone { pt := pt✝¹, ι := NatTrans.mk app✝¹ }).pt ⟶ { pt := pt✝, ι := NatTrans.mk app✝ }.pt\nw :\n  ∀ (j : J),\n    NatTrans.app ((𝟭 C).mapCocone { pt := pt✝¹, ι := NatTrans.mk app✝¹ }).ι j ≫ m =\n      NatTrans.app { pt := pt✝, ι := NatTrans.mk app✝ }.ι j\n⊢ m =\n    (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j })\n      { pt := pt✝, ι := NatTrans.mk app✝ }\n[PROOFSTEP]\nexact h.uniq _ m w\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK K₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : PreservesLimit K₁ F\nc : Cone K₂\nt : IsLimit c\n⊢ IsLimit (F.mapCone c)\n[PROOFSTEP]\napply IsLimit.postcomposeInvEquiv (isoWhiskerRight h F : _) _ _\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK K₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : PreservesLimit K₁ F\nc : Cone K₂\nt : IsLimit c\n⊢ IsLimit ((Cones.postcompose (isoWhiskerRight h F).inv).obj (F.mapCone c))\n[PROOFSTEP]\nhave := (IsLimit.postcomposeInvEquiv h c).symm t\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK K₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : PreservesLimit K₁ F\nc : Cone K₂\nt : IsLimit c\nthis : (fun x => IsLimit ((Cones.postcompose h.inv).obj c)) t\n⊢ IsLimit ((Cones.postcompose (isoWhiskerRight h F).inv).obj (F.mapCone c))\n[PROOFSTEP]\napply IsLimit.ofIsoLimit (isLimitOfPreserves F this)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK K₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : PreservesLimit K₁ F\nc : Cone K₂\nt : IsLimit c\nthis : (fun x => IsLimit ((Cones.postcompose h.inv).obj c)) t\n⊢ F.mapCone ((Cones.postcompose h.inv).obj c) ≅ (Cones.postcompose (isoWhiskerRight h F).inv).obj (F.mapCone c)\n[PROOFSTEP]\nrefine' Cones.ext (Iso.refl _)\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : PreservesLimitsOfShape J F\nK : J' ⥤ C\nc : Cone K\nt : IsLimit c\n⊢ IsLimit (F.mapCone c)\n[PROOFSTEP]\nlet equ := e.invFunIdAssoc (K ⋙ F)\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : PreservesLimitsOfShape J F\nK : J' ⥤ C\nc : Cone K\nt : IsLimit c\nequ : e.inverse ⋙ e.functor ⋙ K ⋙ F ≅ K ⋙ F := Equivalence.invFunIdAssoc e (K ⋙ F)\n⊢ IsLimit (F.mapCone c)\n[PROOFSTEP]\nhave := (isLimitOfPreserves F (t.whiskerEquivalence e)).whiskerEquivalence e.symm\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : PreservesLimitsOfShape J F\nK : J' ⥤ C\nc : Cone K\nt : IsLimit c\nequ : e.inverse ⋙ e.functor ⋙ K ⋙ F ≅ K ⋙ F := Equivalence.invFunIdAssoc e (K ⋙ F)\nthis : IsLimit (Cone.whisker (Equivalence.symm e).functor (F.mapCone (Cone.whisker e.functor c)))\n⊢ IsLimit (F.mapCone c)\n[PROOFSTEP]\napply ((IsLimit.postcomposeHomEquiv equ _).symm this).ofIsoLimit\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : PreservesLimitsOfShape J F\nK : J' ⥤ C\nc : Cone K\nt : IsLimit c\nequ : e.inverse ⋙ e.functor ⋙ K ⋙ F ≅ K ⋙ F := Equivalence.invFunIdAssoc e (K ⋙ F)\nthis : IsLimit (Cone.whisker (Equivalence.symm e).functor (F.mapCone (Cone.whisker e.functor c)))\n⊢ (Cones.postcompose equ.hom).obj (Cone.whisker (Equivalence.symm e).functor (F.mapCone (Cone.whisker e.functor c))) ≅\n    F.mapCone c\n[PROOFSTEP]\nrefine' Cones.ext (Iso.refl _) fun j => _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : PreservesLimitsOfShape J F\nK : J' ⥤ C\nc : Cone K\nt : IsLimit c\nequ : e.inverse ⋙ e.functor ⋙ K ⋙ F ≅ K ⋙ F := Equivalence.invFunIdAssoc e (K ⋙ F)\nthis : IsLimit (Cone.whisker (Equivalence.symm e).functor (F.mapCone (Cone.whisker e.functor c)))\nj : J'\n⊢ NatTrans.app\n      ((Cones.postcompose equ.hom).obj\n          (Cone.whisker (Equivalence.symm e).functor (F.mapCone (Cone.whisker e.functor c)))).π\n      j =\n    (Iso.refl\n          ((Cones.postcompose equ.hom).obj\n              (Cone.whisker (Equivalence.symm e).functor (F.mapCone (Cone.whisker e.functor c)))).pt).hom ≫\n      NatTrans.app (F.mapCone c).π j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : PreservesLimitsOfShape J F\nK : J' ⥤ C\nc : Cone K\nt : IsLimit c\nequ : e.inverse ⋙ e.functor ⋙ K ⋙ F ≅ K ⋙ F := Equivalence.invFunIdAssoc e (K ⋙ F)\nthis : IsLimit (Cone.whisker (Equivalence.symm e).functor (F.mapCone (Cone.whisker e.functor c)))\nj : J'\n⊢ F.map (NatTrans.app c.π (e.functor.obj (e.inverse.obj j))) ≫\n      NatTrans.app (Equivalence.invFunIdAssoc e (K ⋙ F)).hom j =\n    𝟙 (F.obj c.pt) ≫ F.map (NatTrans.app c.π j)\n[PROOFSTEP]\nsimp [← Functor.map_comp]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK K₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : PreservesColimit K₁ F\nc : Cocone K₂\nt : IsColimit c\n⊢ IsColimit (F.mapCocone c)\n[PROOFSTEP]\napply IsColimit.precomposeHomEquiv (isoWhiskerRight h F : _) _ _\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK K₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : PreservesColimit K₁ F\nc : Cocone K₂\nt : IsColimit c\n⊢ IsColimit ((Cocones.precompose (isoWhiskerRight h F).hom).obj (F.mapCocone c))\n[PROOFSTEP]\nhave := (IsColimit.precomposeHomEquiv h c).symm t\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK K₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : PreservesColimit K₁ F\nc : Cocone K₂\nt : IsColimit c\nthis : (fun x => IsColimit ((Cocones.precompose h.hom).obj c)) t\n⊢ IsColimit ((Cocones.precompose (isoWhiskerRight h F).hom).obj (F.mapCocone c))\n[PROOFSTEP]\napply IsColimit.ofIsoColimit (isColimitOfPreserves F this)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK K₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : PreservesColimit K₁ F\nc : Cocone K₂\nt : IsColimit c\nthis : (fun x => IsColimit ((Cocones.precompose h.hom).obj c)) t\n⊢ F.mapCocone ((Cocones.precompose h.hom).obj c) ≅ (Cocones.precompose (isoWhiskerRight h F).hom).obj (F.mapCocone c)\n[PROOFSTEP]\nrefine' Cocones.ext (Iso.refl _)\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : PreservesColimitsOfShape J F\nK : J' ⥤ C\nc : Cocone K\nt : IsColimit c\n⊢ IsColimit (F.mapCocone c)\n[PROOFSTEP]\nlet equ := e.invFunIdAssoc (K ⋙ F)\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : PreservesColimitsOfShape J F\nK : J' ⥤ C\nc : Cocone K\nt : IsColimit c\nequ : e.inverse ⋙ e.functor ⋙ K ⋙ F ≅ K ⋙ F := Equivalence.invFunIdAssoc e (K ⋙ F)\n⊢ IsColimit (F.mapCocone c)\n[PROOFSTEP]\nhave := (isColimitOfPreserves F (t.whiskerEquivalence e)).whiskerEquivalence e.symm\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : PreservesColimitsOfShape J F\nK : J' ⥤ C\nc : Cocone K\nt : IsColimit c\nequ : e.inverse ⋙ e.functor ⋙ K ⋙ F ≅ K ⋙ F := Equivalence.invFunIdAssoc e (K ⋙ F)\nthis : IsColimit (Cocone.whisker (Equivalence.symm e).functor (F.mapCocone (Cocone.whisker e.functor c)))\n⊢ IsColimit (F.mapCocone c)\n[PROOFSTEP]\napply ((IsColimit.precomposeInvEquiv equ _).symm this).ofIsoColimit\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : PreservesColimitsOfShape J F\nK : J' ⥤ C\nc : Cocone K\nt : IsColimit c\nequ : e.inverse ⋙ e.functor ⋙ K ⋙ F ≅ K ⋙ F := Equivalence.invFunIdAssoc e (K ⋙ F)\nthis : IsColimit (Cocone.whisker (Equivalence.symm e).functor (F.mapCocone (Cocone.whisker e.functor c)))\n⊢ (Cocones.precompose equ.inv).obj\n      (Cocone.whisker (Equivalence.symm e).functor (F.mapCocone (Cocone.whisker e.functor c))) ≅\n    F.mapCocone c\n[PROOFSTEP]\nrefine' Cocones.ext (Iso.refl _) fun j => _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : PreservesColimitsOfShape J F\nK : J' ⥤ C\nc : Cocone K\nt : IsColimit c\nequ : e.inverse ⋙ e.functor ⋙ K ⋙ F ≅ K ⋙ F := Equivalence.invFunIdAssoc e (K ⋙ F)\nthis : IsColimit (Cocone.whisker (Equivalence.symm e).functor (F.mapCocone (Cocone.whisker e.functor c)))\nj : J'\n⊢ NatTrans.app\n        ((Cocones.precompose equ.inv).obj\n            (Cocone.whisker (Equivalence.symm e).functor (F.mapCocone (Cocone.whisker e.functor c)))).ι\n        j ≫\n      (Iso.refl\n          ((Cocones.precompose equ.inv).obj\n              (Cocone.whisker (Equivalence.symm e).functor (F.mapCocone (Cocone.whisker e.functor c)))).pt).hom =\n    NatTrans.app (F.mapCocone c).ι j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : PreservesColimitsOfShape J F\nK : J' ⥤ C\nc : Cocone K\nt : IsColimit c\nequ : e.inverse ⋙ e.functor ⋙ K ⋙ F ≅ K ⋙ F := Equivalence.invFunIdAssoc e (K ⋙ F)\nthis : IsColimit (Cocone.whisker (Equivalence.symm e).functor (F.mapCocone (Cocone.whisker e.functor c)))\nj : J'\n⊢ (NatTrans.app (Equivalence.invFunIdAssoc e (K ⋙ F)).inv j ≫\n        F.map (NatTrans.app c.ι (e.functor.obj (e.inverse.obj j)))) ≫\n      𝟙 (F.obj c.pt) =\n    F.map (NatTrans.app c.ι j)\n[PROOFSTEP]\nsimp [← Functor.map_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK✝ K : J ⥤ C\nF : C ⥤ D\n⊢ Subsingleton (ReflectsLimit K F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK✝ K : J ⥤ C\nF : C ⥤ D\n⊢ ∀ (a b : ReflectsLimit K F), a = b\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase allEq.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK✝ K : J ⥤ C\nF : C ⥤ D\na b : {c : Cone K} → IsLimit (F.mapCone c) → IsLimit c\n⊢ { reflects := a } = { reflects := b }\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK✝ K : J ⥤ C\nF : C ⥤ D\n⊢ Subsingleton (ReflectsColimit K F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK✝ K : J ⥤ C\nF : C ⥤ D\n⊢ ∀ (a b : ReflectsColimit K F), a = b\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase allEq.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK✝ K : J ⥤ C\nF : C ⥤ D\na b : {c : Cocone K} → IsColimit (F.mapCocone c) → IsColimit c\n⊢ { reflects := a } = { reflects := b }\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝¹ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\ninst✝ : Category.{w', w} J\nF : C ⥤ D\n⊢ Subsingleton (ReflectsLimitsOfShape J F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝¹ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\ninst✝ : Category.{w', w} J\nF : C ⥤ D\n⊢ ∀ (a b : ReflectsLimitsOfShape J F), a = b\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase allEq.mk.mk\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝¹ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\ninst✝ : Category.{w', w} J\nF : C ⥤ D\na b : {K : J ⥤ C} → ReflectsLimit K F\n⊢ ReflectsLimitsOfShape.mk = ReflectsLimitsOfShape.mk\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝¹ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\ninst✝ : Category.{w', w} J\nF : C ⥤ D\n⊢ Subsingleton (ReflectsColimitsOfShape J F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝¹ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\ninst✝ : Category.{w', w} J\nF : C ⥤ D\n⊢ ∀ (a b : ReflectsColimitsOfShape J F), a = b\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase allEq.mk.mk\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝¹ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w\ninst✝ : Category.{w', w} J\nF : C ⥤ D\na b : {K : J ⥤ C} → ReflectsColimit K F\n⊢ ReflectsColimitsOfShape.mk = ReflectsColimitsOfShape.mk\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\n⊢ Subsingleton (ReflectsLimitsOfSize.{w', w, v₁, v₂, u₁, u₂} F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\n⊢ ∀ (a b : ReflectsLimitsOfSize.{w', w, v₁, v₂, u₁, u₂} F), a = b\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase allEq.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\na b : {J : Type w} → [inst : Category.{w', w} J] → ReflectsLimitsOfShape J F\n⊢ ReflectsLimitsOfSize.mk = ReflectsLimitsOfSize.mk\n[PROOFSTEP]\ncongr\n[GOAL]\ncase allEq.mk.mk.e_reflectsLimitsOfShape\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\na b : {J : Type w} → [inst : Category.{w', w} J] → ReflectsLimitsOfShape J F\n⊢ a = b\n[PROOFSTEP]\nfunext\n[GOAL]\ncase allEq.mk.mk.e_reflectsLimitsOfShape.h.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\na b : {J : Type w} → [inst : Category.{w', w} J] → ReflectsLimitsOfShape J F\nx✝¹ : Type w\nx✝ : Category.{w', w} x✝¹\n⊢ a = b\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\n⊢ Subsingleton (ReflectsColimitsOfSize.{w', w, v₁, v₂, u₁, u₂} F)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\n⊢ ∀ (a b : ReflectsColimitsOfSize.{w', w, v₁, v₂, u₁, u₂} F), a = b\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase allEq.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\na b : {J : Type w} → [inst : Category.{w', w} J] → ReflectsColimitsOfShape J F\n⊢ ReflectsColimitsOfSize.mk = ReflectsColimitsOfSize.mk\n[PROOFSTEP]\ncongr\n[GOAL]\ncase allEq.mk.mk.e_reflectsColimitsOfShape\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\na b : {J : Type w} → [inst : Category.{w', w} J] → ReflectsColimitsOfShape J F\n⊢ a = b\n[PROOFSTEP]\nfunext\n[GOAL]\ncase allEq.mk.mk.e_reflectsColimitsOfShape.h.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ : Type w\ninst✝ : Category.{w', w} J\nK : J ⥤ C\nF : C ⥤ D\na b : {J : Type w} → [inst : Category.{w', w} J] → ReflectsColimitsOfShape J F\nx✝¹ : Type w\nx✝ : Category.{w', w} x✝¹\n⊢ a = b\n[PROOFSTEP]\ncongr!\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\nK : J ⥤ C\nc : Cone K\nh : IsLimit ((𝟭 C).mapCone c)\n⊢ ∀ (s : Cone K) (j : J),\n    (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s ≫ NatTrans.app c.π j =\n      NatTrans.app s.π j\n[PROOFSTEP]\ncases K\n[GOAL]\ncase mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\nc : Cone (Functor.mk toPrefunctor✝)\nh : IsLimit ((𝟭 C).mapCone c)\n⊢ ∀ (s : Cone (Functor.mk toPrefunctor✝)) (j : J),\n    (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s ≫ NatTrans.app c.π j =\n      NatTrans.app s.π j\n[PROOFSTEP]\nrcases c with ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → ((Functor.const J).obj pt✝).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝).map f\nh : IsLimit ((𝟭 C).mapCone { pt := pt✝, π := NatTrans.mk app✝ })\n⊢ ∀ (s : Cone (Functor.mk toPrefunctor✝)) (j : J),\n    (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s ≫\n        NatTrans.app { pt := pt✝, π := NatTrans.mk app✝ }.π j =\n      NatTrans.app s.π j\n[PROOFSTEP]\nintro s j\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → ((Functor.const J).obj pt✝).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝).map f\nh : IsLimit ((𝟭 C).mapCone { pt := pt✝, π := NatTrans.mk app✝ })\ns : Cone (Functor.mk toPrefunctor✝)\nj : J\n⊢ (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s ≫\n      NatTrans.app { pt := pt✝, π := NatTrans.mk app✝ }.π j =\n    NatTrans.app s.π j\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk.mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝¹ : C\napp✝ : (X : J) → ((Functor.const J).obj pt✝¹).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝¹).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝).map f\nh : IsLimit ((𝟭 C).mapCone { pt := pt✝¹, π := NatTrans.mk app✝ })\nj : J\npt✝ : C\nπ✝ : (Functor.const J).obj pt✝ ⟶ Functor.mk toPrefunctor✝\n⊢ (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) { pt := pt✝, π := π✝ } ≫\n      NatTrans.app { pt := pt✝¹, π := NatTrans.mk app✝ }.π j =\n    NatTrans.app { pt := pt✝, π := π✝ }.π j\n[PROOFSTEP]\nexact h.fac _ j\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\nK : J ⥤ C\nc : Cone K\nh : IsLimit ((𝟭 C).mapCone c)\n⊢ ∀ (s : Cone K) (m : s.pt ⟶ c.pt),\n    (∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j) →\n      m = (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s\n[PROOFSTEP]\ncases K\n[GOAL]\ncase mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\nc : Cone (Functor.mk toPrefunctor✝)\nh : IsLimit ((𝟭 C).mapCone c)\n⊢ ∀ (s : Cone (Functor.mk toPrefunctor✝)) (m : s.pt ⟶ c.pt),\n    (∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j) →\n      m = (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s\n[PROOFSTEP]\nrcases c with ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → ((Functor.const J).obj pt✝).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝).map f\nh : IsLimit ((𝟭 C).mapCone { pt := pt✝, π := NatTrans.mk app✝ })\n⊢ ∀ (s : Cone (Functor.mk toPrefunctor✝)) (m : s.pt ⟶ { pt := pt✝, π := NatTrans.mk app✝ }.pt),\n    (∀ (j : J), m ≫ NatTrans.app { pt := pt✝, π := NatTrans.mk app✝ }.π j = NatTrans.app s.π j) →\n      m = (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s\n[PROOFSTEP]\nintro s m w\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → ((Functor.const J).obj pt✝).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝).map f\nh : IsLimit ((𝟭 C).mapCone { pt := pt✝, π := NatTrans.mk app✝ })\ns : Cone (Functor.mk toPrefunctor✝)\nm : s.pt ⟶ { pt := pt✝, π := NatTrans.mk app✝ }.pt\nw : ∀ (j : J), m ≫ NatTrans.app { pt := pt✝, π := NatTrans.mk app✝ }.π j = NatTrans.app s.π j\n⊢ m = (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j }) s\n[PROOFSTEP]\nrcases s with ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝¹ : C\napp✝¹ : (X : J) → ((Functor.const J).obj pt✝¹).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝¹ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝¹).map f ≫ app✝¹ Y = app✝¹ X ≫ (Functor.mk toPrefunctor✝).map f\nh : IsLimit ((𝟭 C).mapCone { pt := pt✝¹, π := NatTrans.mk app✝¹ })\npt✝ : C\napp✝ : (X : J) → ((Functor.const J).obj pt✝).obj X ⟶ (Functor.mk toPrefunctor✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), ((Functor.const J).obj pt✝).map f ≫ app✝ Y = app✝ X ≫ (Functor.mk toPrefunctor✝).map f\nm : { pt := pt✝, π := NatTrans.mk app✝ }.pt ⟶ { pt := pt✝¹, π := NatTrans.mk app✝¹ }.pt\nw :\n  ∀ (j : J),\n    m ≫ NatTrans.app { pt := pt✝¹, π := NatTrans.mk app✝¹ }.π j = NatTrans.app { pt := pt✝, π := NatTrans.mk app✝ }.π j\n⊢ m =\n    (fun s => IsLimit.lift h { pt := s.pt, π := NatTrans.mk fun j => NatTrans.app s.π j })\n      { pt := pt✝, π := NatTrans.mk app✝ }\n[PROOFSTEP]\nexact h.uniq _ m w\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\nK : J ⥤ C\nc : Cocone K\nh : IsColimit ((𝟭 C).mapCocone c)\n⊢ ∀ (s : Cocone K) (j : J),\n    NatTrans.app c.ι j ≫ (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s =\n      NatTrans.app s.ι j\n[PROOFSTEP]\ncases K\n[GOAL]\ncase mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\nc : Cocone (Functor.mk toPrefunctor✝)\nh : IsColimit ((𝟭 C).mapCocone c)\n⊢ ∀ (s : Cocone (Functor.mk toPrefunctor✝)) (j : J),\n    NatTrans.app c.ι j ≫ (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s =\n      NatTrans.app s.ι j\n[PROOFSTEP]\nrcases c with ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f\nh : IsColimit ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ })\n⊢ ∀ (s : Cocone (Functor.mk toPrefunctor✝)) (j : J),\n    NatTrans.app { pt := pt✝, ι := NatTrans.mk app✝ }.ι j ≫\n        (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s =\n      NatTrans.app s.ι j\n[PROOFSTEP]\nintro s j\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f\nh : IsColimit ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ })\ns : Cocone (Functor.mk toPrefunctor✝)\nj : J\n⊢ NatTrans.app { pt := pt✝, ι := NatTrans.mk app✝ }.ι j ≫\n      (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s =\n    NatTrans.app s.ι j\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk.mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝¹ : C\napp✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝¹).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝¹).map f\nh : IsColimit ((𝟭 C).mapCocone { pt := pt✝¹, ι := NatTrans.mk app✝ })\nj : J\npt✝ : C\nι✝ : Functor.mk toPrefunctor✝ ⟶ (Functor.const J).obj pt✝\n⊢ NatTrans.app { pt := pt✝¹, ι := NatTrans.mk app✝ }.ι j ≫\n      (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) { pt := pt✝, ι := ι✝ } =\n    NatTrans.app { pt := pt✝, ι := ι✝ }.ι j\n[PROOFSTEP]\nexact h.fac _ j\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\nK : J ⥤ C\nc : Cocone K\nh : IsColimit ((𝟭 C).mapCocone c)\n⊢ ∀ (s : Cocone K) (m : c.pt ⟶ s.pt),\n    (∀ (j : J), NatTrans.app c.ι j ≫ m = NatTrans.app s.ι j) →\n      m = (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s\n[PROOFSTEP]\ncases K\n[GOAL]\ncase mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\nc : Cocone (Functor.mk toPrefunctor✝)\nh : IsColimit ((𝟭 C).mapCocone c)\n⊢ ∀ (s : Cocone (Functor.mk toPrefunctor✝)) (m : c.pt ⟶ s.pt),\n    (∀ (j : J), NatTrans.app c.ι j ≫ m = NatTrans.app s.ι j) →\n      m = (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s\n[PROOFSTEP]\nrcases c with ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f\nh : IsColimit ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ })\n⊢ ∀ (s : Cocone (Functor.mk toPrefunctor✝)) (m : { pt := pt✝, ι := NatTrans.mk app✝ }.pt ⟶ s.pt),\n    (∀ (j : J), NatTrans.app { pt := pt✝, ι := NatTrans.mk app✝ }.ι j ≫ m = NatTrans.app s.ι j) →\n      m = (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s\n[PROOFSTEP]\nintro s m w\n[GOAL]\ncase mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝ : C\napp✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f\nh : IsColimit ((𝟭 C).mapCocone { pt := pt✝, ι := NatTrans.mk app✝ })\ns : Cocone (Functor.mk toPrefunctor✝)\nm : { pt := pt✝, ι := NatTrans.mk app✝ }.pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app { pt := pt✝, ι := NatTrans.mk app✝ }.ι j ≫ m = NatTrans.app s.ι j\n⊢ m = (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j }) s\n[PROOFSTEP]\nrcases s with ⟨_, _, _⟩\n[GOAL]\ncase mk.mk.mk.mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝ : Category.{w', w} J✝\nK : J✝ ⥤ C\nJ : Type w'\n𝒥 : Category.{w, w'} J\ntoPrefunctor✝ : J ⥤q C\nmap_id✝ : ∀ (X : J), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ : ∀ {X Y Z : J} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\npt✝¹ : C\napp✝¹ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝¹).obj X\nnaturality✝¹ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝¹ Y = app✝¹ X ≫ ((Functor.const J).obj pt✝¹).map f\nh : IsColimit ((𝟭 C).mapCocone { pt := pt✝¹, ι := NatTrans.mk app✝¹ })\npt✝ : C\napp✝ : (X : J) → (Functor.mk toPrefunctor✝).obj X ⟶ ((Functor.const J).obj pt✝).obj X\nnaturality✝ :\n  ∀ ⦃X Y : J⦄ (f : X ⟶ Y), (Functor.mk toPrefunctor✝).map f ≫ app✝ Y = app✝ X ≫ ((Functor.const J).obj pt✝).map f\nm : { pt := pt✝¹, ι := NatTrans.mk app✝¹ }.pt ⟶ { pt := pt✝, ι := NatTrans.mk app✝ }.pt\nw :\n  ∀ (j : J),\n    NatTrans.app { pt := pt✝¹, ι := NatTrans.mk app✝¹ }.ι j ≫ m = NatTrans.app { pt := pt✝, ι := NatTrans.mk app✝ }.ι j\n⊢ m =\n    (fun s => IsColimit.desc h { pt := s.pt, ι := NatTrans.mk fun j => NatTrans.app s.ι j })\n      { pt := pt✝, ι := NatTrans.mk app✝ }\n[PROOFSTEP]\nexact h.uniq _ m w\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : PreservesLimit K (F ⋙ G)\ninst✝ : ReflectsLimit (K ⋙ F) G\nc✝ : Cone K\nh : IsLimit c✝\n⊢ IsLimit (F.mapCone c✝)\n[PROOFSTEP]\napply isLimitOfReflects G\n[GOAL]\ncase t\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : PreservesLimit K (F ⋙ G)\ninst✝ : ReflectsLimit (K ⋙ F) G\nc✝ : Cone K\nh : IsLimit c✝\n⊢ IsLimit (G.mapCone (F.mapCone c✝))\n[PROOFSTEP]\napply isLimitOfPreserves (F ⋙ G) h\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nK₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : ReflectsLimit K₁ F\nc : Cone K₂\nt : IsLimit (F.mapCone c)\n⊢ IsLimit c\n[PROOFSTEP]\napply IsLimit.postcomposeInvEquiv h c (isLimitOfReflects F _)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nK₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : ReflectsLimit K₁ F\nc : Cone K₂\nt : IsLimit (F.mapCone c)\n⊢ IsLimit (F.mapCone ((Cones.postcompose h.inv).obj c))\n[PROOFSTEP]\napply ((IsLimit.postcomposeInvEquiv (isoWhiskerRight h F : _) _).symm t).ofIsoLimit _\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nK₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : ReflectsLimit K₁ F\nc : Cone K₂\nt : IsLimit (F.mapCone c)\n⊢ (Cones.postcompose (isoWhiskerRight h F).inv).obj (F.mapCone c) ≅ F.mapCone ((Cones.postcompose h.inv).obj c)\n[PROOFSTEP]\nexact Cones.ext (Iso.refl _)\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : ReflectsLimitsOfShape J F\nK : J' ⥤ C\nc : Cone K\nt : IsLimit (F.mapCone c)\n⊢ IsLimit c\n[PROOFSTEP]\napply IsLimit.ofWhiskerEquivalence e\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : ReflectsLimitsOfShape J F\nK : J' ⥤ C\nc : Cone K\nt : IsLimit (F.mapCone c)\n⊢ IsLimit (Cone.whisker e.functor c)\n[PROOFSTEP]\napply isLimitOfReflects F\n[GOAL]\ncase t\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : ReflectsLimitsOfShape J F\nK : J' ⥤ C\nc : Cone K\nt : IsLimit (F.mapCone c)\n⊢ IsLimit (F.mapCone (Cone.whisker e.functor c))\n[PROOFSTEP]\napply IsLimit.ofIsoLimit _ (Functor.mapConeWhisker _).symm\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK✝ : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : ReflectsLimitsOfShape J F\nK : J' ⥤ C\nc : Cone K\nt : IsLimit (F.mapCone c)\n⊢ IsLimit (Cone.whisker e.functor (F.mapCone c))\n[PROOFSTEP]\nexact IsLimit.whiskerEquivalence t _\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasLimit F\ninst✝ : PreservesLimit F G\nc : Cone F\nt : IsLimit (G.mapCone c)\n⊢ IsLimit c\n[PROOFSTEP]\nsuffices IsIso (IsLimit.lift (limit.isLimit F) c) from by apply IsLimit.ofPointIso (limit.isLimit F)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasLimit F\ninst✝ : PreservesLimit F G\nc : Cone F\nt : IsLimit (G.mapCone c)\nthis : IsIso (IsLimit.lift (limit.isLimit F) c)\n⊢ IsLimit c\n[PROOFSTEP]\napply IsLimit.ofPointIso (limit.isLimit F)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasLimit F\ninst✝ : PreservesLimit F G\nc : Cone F\nt : IsLimit (G.mapCone c)\n⊢ IsIso (IsLimit.lift (limit.isLimit F) c)\n[PROOFSTEP]\nchange IsIso ((Cones.forget _).map ((limit.isLimit F).liftConeMorphism c))\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasLimit F\ninst✝ : PreservesLimit F G\nc : Cone F\nt : IsLimit (G.mapCone c)\n⊢ IsIso ((Cones.forget F).map (IsLimit.liftConeMorphism (limit.isLimit F) c))\n[PROOFSTEP]\nsuffices IsIso (IsLimit.liftConeMorphism (limit.isLimit F) c) from by apply (Cones.forget F).map_isIso _\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasLimit F\ninst✝ : PreservesLimit F G\nc : Cone F\nt : IsLimit (G.mapCone c)\nthis : IsIso (IsLimit.liftConeMorphism (limit.isLimit F) c)\n⊢ IsIso ((Cones.forget F).map (IsLimit.liftConeMorphism (limit.isLimit F) c))\n[PROOFSTEP]\napply (Cones.forget F).map_isIso _\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasLimit F\ninst✝ : PreservesLimit F G\nc : Cone F\nt : IsLimit (G.mapCone c)\n⊢ IsIso (IsLimit.liftConeMorphism (limit.isLimit F) c)\n[PROOFSTEP]\nsuffices IsIso (Prefunctor.map (Cones.functoriality F G).toPrefunctor (IsLimit.liftConeMorphism (limit.isLimit F) c))\n  from by apply isIso_of_reflects_iso _ (Cones.functoriality F G)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasLimit F\ninst✝ : PreservesLimit F G\nc : Cone F\nt : IsLimit (G.mapCone c)\nthis : IsIso ((Cones.functoriality F G).map (IsLimit.liftConeMorphism (limit.isLimit F) c))\n⊢ IsIso (IsLimit.liftConeMorphism (limit.isLimit F) c)\n[PROOFSTEP]\napply isIso_of_reflects_iso _ (Cones.functoriality F G)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasLimit F\ninst✝ : PreservesLimit F G\nc : Cone F\nt : IsLimit (G.mapCone c)\n⊢ IsIso ((Cones.functoriality F G).map (IsLimit.liftConeMorphism (limit.isLimit F) c))\n[PROOFSTEP]\nrefine' t.hom_isIso (isLimitOfPreserves G (limit.isLimit F)) _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : PreservesColimit K (F ⋙ G)\ninst✝ : ReflectsColimit (K ⋙ F) G\nc : Cocone K\nh : IsColimit c\n⊢ IsColimit (F.mapCocone c)\n[PROOFSTEP]\napply isColimitOfReflects G\n[GOAL]\ncase t\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : PreservesColimit K (F ⋙ G)\ninst✝ : ReflectsColimit (K ⋙ F) G\nc : Cocone K\nh : IsColimit c\n⊢ IsColimit (G.mapCocone (F.mapCocone c))\n[PROOFSTEP]\napply isColimitOfPreserves (F ⋙ G) h\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nK₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : ReflectsColimit K₁ F\nc : Cocone K₂\nt : IsColimit (F.mapCocone c)\n⊢ IsColimit c\n[PROOFSTEP]\napply IsColimit.precomposeHomEquiv h c (isColimitOfReflects F _)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nK₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : ReflectsColimit K₁ F\nc : Cocone K₂\nt : IsColimit (F.mapCocone c)\n⊢ IsColimit (F.mapCocone ((Cocones.precompose h.hom).obj c))\n[PROOFSTEP]\napply ((IsColimit.precomposeHomEquiv (isoWhiskerRight h F : _) _).symm t).ofIsoColimit _\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nJ : Type w\ninst✝¹ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nK₁ K₂ : J ⥤ C\nF : C ⥤ D\nh : K₁ ≅ K₂\ninst✝ : ReflectsColimit K₁ F\nc : Cocone K₂\nt : IsColimit (F.mapCocone c)\n⊢ (Cocones.precompose (isoWhiskerRight h F).hom).obj (F.mapCocone c) ≅ F.mapCocone ((Cocones.precompose h.hom).obj c)\n[PROOFSTEP]\nexact Cocones.ext (Iso.refl _)\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : ReflectsColimitsOfShape J F\nK✝ : J' ⥤ C\nc : Cocone K✝\nt : IsColimit (F.mapCocone c)\n⊢ IsColimit c\n[PROOFSTEP]\napply IsColimit.ofWhiskerEquivalence e\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : ReflectsColimitsOfShape J F\nK✝ : J' ⥤ C\nc : Cocone K✝\nt : IsColimit (F.mapCocone c)\n⊢ IsColimit (Cocone.whisker e.functor c)\n[PROOFSTEP]\napply isColimitOfReflects F\n[GOAL]\ncase t\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : ReflectsColimitsOfShape J F\nK✝ : J' ⥤ C\nc : Cocone K✝\nt : IsColimit (F.mapCocone c)\n⊢ IsColimit (F.mapCocone (Cocone.whisker e.functor c))\n[PROOFSTEP]\napply IsColimit.ofIsoColimit _ (Functor.mapCoconeWhisker _).symm\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ : Type w\ninst✝² : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG : D ⥤ E\nJ' : Type w₂\ninst✝¹ : Category.{w₂', w₂} J'\ne : J ≌ J'\nF : C ⥤ D\ninst✝ : ReflectsColimitsOfShape J F\nK✝ : J' ⥤ C\nc : Cocone K✝\nt : IsColimit (F.mapCocone c)\n⊢ IsColimit (Cocone.whisker e.functor (F.mapCocone c))\n[PROOFSTEP]\nexact IsColimit.whiskerEquivalence t _\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasColimit F\ninst✝ : PreservesColimit F G\nc : Cocone F\nt : IsColimit (G.mapCocone c)\n⊢ IsColimit c\n[PROOFSTEP]\nsuffices IsIso (IsColimit.desc (colimit.isColimit F) c) from by apply IsColimit.ofPointIso (colimit.isColimit F)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasColimit F\ninst✝ : PreservesColimit F G\nc : Cocone F\nt : IsColimit (G.mapCocone c)\nthis : IsIso (IsColimit.desc (colimit.isColimit F) c)\n⊢ IsColimit c\n[PROOFSTEP]\napply IsColimit.ofPointIso (colimit.isColimit F)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasColimit F\ninst✝ : PreservesColimit F G\nc : Cocone F\nt : IsColimit (G.mapCocone c)\n⊢ IsIso (IsColimit.desc (colimit.isColimit F) c)\n[PROOFSTEP]\nchange IsIso ((Cocones.forget _).map ((colimit.isColimit F).descCoconeMorphism c))\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasColimit F\ninst✝ : PreservesColimit F G\nc : Cocone F\nt : IsColimit (G.mapCocone c)\n⊢ IsIso ((Cocones.forget F).map (IsColimit.descCoconeMorphism (colimit.isColimit F) c))\n[PROOFSTEP]\nsuffices IsIso (IsColimit.descCoconeMorphism (colimit.isColimit F) c) from by apply (Cocones.forget F).map_isIso _\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasColimit F\ninst✝ : PreservesColimit F G\nc : Cocone F\nt : IsColimit (G.mapCocone c)\nthis : IsIso (IsColimit.descCoconeMorphism (colimit.isColimit F) c)\n⊢ IsIso ((Cocones.forget F).map (IsColimit.descCoconeMorphism (colimit.isColimit F) c))\n[PROOFSTEP]\napply (Cocones.forget F).map_isIso _\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasColimit F\ninst✝ : PreservesColimit F G\nc : Cocone F\nt : IsColimit (G.mapCocone c)\n⊢ IsIso (IsColimit.descCoconeMorphism (colimit.isColimit F) c)\n[PROOFSTEP]\nsuffices\n  IsIso (Prefunctor.map (Cocones.functoriality F G).toPrefunctor (IsColimit.descCoconeMorphism (colimit.isColimit F) c))\n  from by apply isIso_of_reflects_iso _ (Cocones.functoriality F G)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasColimit F\ninst✝ : PreservesColimit F G\nc : Cocone F\nt : IsColimit (G.mapCocone c)\nthis : IsIso ((Cocones.functoriality F G).map (IsColimit.descCoconeMorphism (colimit.isColimit F) c))\n⊢ IsIso (IsColimit.descCoconeMorphism (colimit.isColimit F) c)\n[PROOFSTEP]\napply isIso_of_reflects_iso _ (Cocones.functoriality F G)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nJ : Type w\ninst✝³ : Category.{w', w} J\nK : J ⥤ C\nE : Type u₃\nℰ : Category.{v₃, u₃} E\nF✝ : C ⥤ D\nG✝ : D ⥤ E\nF : J ⥤ C\nG : C ⥤ D\ninst✝² : ReflectsIsomorphisms G\ninst✝¹ : HasColimit F\ninst✝ : PreservesColimit F G\nc : Cocone F\nt : IsColimit (G.mapCocone c)\n⊢ IsIso ((Cocones.functoriality F G).map (IsColimit.descCoconeMorphism (colimit.isColimit F) c))\n[PROOFSTEP]\nrefine' (isColimitOfPreserves G (colimit.isColimit F)).hom_isIso t _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝² : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\nJ : Type w'\n𝒥₁ : Category.{w, w'} J\nK : J ⥤ C\nc : Cone K\nt : IsLimit (F.mapCone c)\n⊢ ∀ (s : Cone K) (m : s ⟶ c),\n    m = (Cones.functoriality K F).preimage (IsLimit.liftConeMorphism t ((Cones.functoriality K F).obj s))\n[PROOFSTEP]\napply fun s m => (Cones.functoriality K F).map_injective _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝² : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\nJ : Type w'\n𝒥₁ : Category.{w, w'} J\nK : J ⥤ C\nc : Cone K\nt : IsLimit (F.mapCone c)\n⊢ ∀ (s : Cone K) (m : s ⟶ c),\n    (Cones.functoriality K F).map m =\n      (Cones.functoriality K F).map\n        ((Cones.functoriality K F).preimage (IsLimit.liftConeMorphism t ((Cones.functoriality K F).obj s)))\n[PROOFSTEP]\nintro s m\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝² : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\nJ : Type w'\n𝒥₁ : Category.{w, w'} J\nK : J ⥤ C\nc : Cone K\nt : IsLimit (F.mapCone c)\ns : Cone K\nm : s ⟶ c\n⊢ (Cones.functoriality K F).map m =\n    (Cones.functoriality K F).map\n      ((Cones.functoriality K F).preimage (IsLimit.liftConeMorphism t ((Cones.functoriality K F).obj s)))\n[PROOFSTEP]\nrw [Functor.image_preimage]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝² : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\nJ : Type w'\n𝒥₁ : Category.{w, w'} J\nK : J ⥤ C\nc : Cone K\nt : IsLimit (F.mapCone c)\ns : Cone K\nm : s ⟶ c\n⊢ (Cones.functoriality K F).map m = IsLimit.liftConeMorphism t ((Cones.functoriality K F).obj s)\n[PROOFSTEP]\napply t.uniq_cone_morphism\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝² : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\nJ : Type w'\n𝒥₁ : Category.{w, w'} J\nK : J ⥤ C\nc : Cocone K\nt : IsColimit (F.mapCocone c)\n⊢ ∀ (s : Cocone K) (m : c ⟶ s),\n    m = (Cocones.functoriality K F).preimage (IsColimit.descCoconeMorphism t ((Cocones.functoriality K F).obj s))\n[PROOFSTEP]\napply fun s m => (Cocones.functoriality K F).map_injective _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝² : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\nJ : Type w'\n𝒥₁ : Category.{w, w'} J\nK : J ⥤ C\nc : Cocone K\nt : IsColimit (F.mapCocone c)\n⊢ ∀ (s : Cocone K) (m : c ⟶ s),\n    (Cocones.functoriality K F).map m =\n      (Cocones.functoriality K F).map\n        ((Cocones.functoriality K F).preimage (IsColimit.descCoconeMorphism t ((Cocones.functoriality K F).obj s)))\n[PROOFSTEP]\nintro s m\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝² : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\nJ : Type w'\n𝒥₁ : Category.{w, w'} J\nK : J ⥤ C\nc : Cocone K\nt : IsColimit (F.mapCocone c)\ns : Cocone K\nm : c ⟶ s\n⊢ (Cocones.functoriality K F).map m =\n    (Cocones.functoriality K F).map\n      ((Cocones.functoriality K F).preimage (IsColimit.descCoconeMorphism t ((Cocones.functoriality K F).obj s)))\n[PROOFSTEP]\nrw [Functor.image_preimage]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nJ✝ : Type w\ninst✝² : Category.{w', w} J✝\nK✝ : J✝ ⥤ C\nF : C ⥤ D\ninst✝¹ : Full F\ninst✝ : Faithful F\nJ : Type w'\n𝒥₁ : Category.{w, w'} J\nK : J ⥤ C\nc : Cocone K\nt : IsColimit (F.mapCocone c)\ns : Cocone K\nm : c ⟶ s\n⊢ (Cocones.functoriality K F).map m = IsColimit.descCoconeMorphism t ((Cocones.functoriality K F).obj s)\n[PROOFSTEP]\napply t.uniq_cocone_morphism\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Preserves.Basic", "llama_tokens": 42133, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191214879992, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.37387749815268667}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\n⊢ Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)\n[PROOFSTEP]\nrefine'\n  MeasurableSpace.induction_on_inter (C := fun t => Measurable fun a => κ a (Prod.mk a ⁻¹' t)) generateFrom_prod.symm\n    isPiSystem_prod _ _ _ _ ht\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\n⊢ (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) ∅\n[PROOFSTEP]\nsimp only [preimage_empty, measure_empty, measurable_const]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\n⊢ ∀ (t : Set (α × β)),\n    t ∈ image2 (fun x x_1 => x ×ˢ x_1) {s | MeasurableSet s} {t | MeasurableSet t} →\n      (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) t\n[PROOFSTEP]\nintro t' ht'\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : t' ∈ image2 (fun x x_1 => x ×ˢ x_1) {s | MeasurableSet s} {t | MeasurableSet t}\n⊢ Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\n[PROOFSTEP]\nsimp only [Set.mem_image2, Set.mem_setOf_eq, exists_and_left] at ht' \n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : ∃ a, MeasurableSet a ∧ ∃ x, MeasurableSet x ∧ a ×ˢ x = t'\n⊢ Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\n[PROOFSTEP]\nobtain ⟨t₁, ht₁, t₂, ht₂, rfl⟩ := ht'\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt₁ : Set α\nht₁ : MeasurableSet t₁\nt₂ : Set β\nht₂ : MeasurableSet t₂\n⊢ Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t₁ ×ˢ t₂)\n[PROOFSTEP]\nclassical\nsimp_rw [mk_preimage_prod_right_eq_if]\nhave h_eq_ite : (fun a => κ a (ite (a ∈ t₁) t₂ ∅)) = fun a => ite (a ∈ t₁) (κ a t₂) 0 :=\n  by\n  ext1 a\n  split_ifs\n  exacts [rfl, measure_empty]\nrw [h_eq_ite]\nexact Measurable.ite ht₁ (kernel.measurable_coe κ ht₂) measurable_const\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt₁ : Set α\nht₁ : MeasurableSet t₁\nt₂ : Set β\nht₂ : MeasurableSet t₂\n⊢ Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t₁ ×ˢ t₂)\n[PROOFSTEP]\nsimp_rw [mk_preimage_prod_right_eq_if]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt₁ : Set α\nht₁ : MeasurableSet t₁\nt₂ : Set β\nht₂ : MeasurableSet t₂\n⊢ Measurable fun a => ↑↑(↑κ a) (if a ∈ t₁ then t₂ else ∅)\n[PROOFSTEP]\nhave h_eq_ite : (fun a => κ a (ite (a ∈ t₁) t₂ ∅)) = fun a => ite (a ∈ t₁) (κ a t₂) 0 :=\n  by\n  ext1 a\n  split_ifs\n  exacts [rfl, measure_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt₁ : Set α\nht₁ : MeasurableSet t₁\nt₂ : Set β\nht₂ : MeasurableSet t₂\n⊢ (fun a => ↑↑(↑κ a) (if a ∈ t₁ then t₂ else ∅)) = fun a => if a ∈ t₁ then ↑↑(↑κ a) t₂ else 0\n[PROOFSTEP]\next1 a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt₁ : Set α\nht₁ : MeasurableSet t₁\nt₂ : Set β\nht₂ : MeasurableSet t₂\na : α\n⊢ ↑↑(↑κ a) (if a ∈ t₁ then t₂ else ∅) = if a ∈ t₁ then ↑↑(↑κ a) t₂ else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt₁ : Set α\nht₁ : MeasurableSet t₁\nt₂ : Set β\nht₂ : MeasurableSet t₂\na : α\nh✝ : a ∈ t₁\n⊢ ↑↑(↑κ a) t₂ = ↑↑(↑κ a) t₂\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt₁ : Set α\nht₁ : MeasurableSet t₁\nt₂ : Set β\nht₂ : MeasurableSet t₂\na : α\nh✝ : ¬a ∈ t₁\n⊢ ↑↑(↑κ a) ∅ = 0\n[PROOFSTEP]\nexacts [rfl, measure_empty]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt₁ : Set α\nht₁ : MeasurableSet t₁\nt₂ : Set β\nht₂ : MeasurableSet t₂\nh_eq_ite : (fun a => ↑↑(↑κ a) (if a ∈ t₁ then t₂ else ∅)) = fun a => if a ∈ t₁ then ↑↑(↑κ a) t₂ else 0\n⊢ Measurable fun a => ↑↑(↑κ a) (if a ∈ t₁ then t₂ else ∅)\n[PROOFSTEP]\nrw [h_eq_ite]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt₁ : Set α\nht₁ : MeasurableSet t₁\nt₂ : Set β\nht₂ : MeasurableSet t₂\nh_eq_ite : (fun a => ↑↑(↑κ a) (if a ∈ t₁ then t₂ else ∅)) = fun a => if a ∈ t₁ then ↑↑(↑κ a) t₂ else 0\n⊢ Measurable fun a => if a ∈ t₁ then ↑↑(↑κ a) t₂ else 0\n[PROOFSTEP]\nexact Measurable.ite ht₁ (kernel.measurable_coe κ ht₂) measurable_const\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\n⊢ ∀ (t : Set (α × β)),\n    MeasurableSet t →\n      (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) t →\n        (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) tᶜ\n[PROOFSTEP]\nintro t' ht' h_meas\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : MeasurableSet t'\nh_meas : Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\n⊢ Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t'ᶜ)\n[PROOFSTEP]\nhave h_eq_sdiff : ∀ a, Prod.mk a ⁻¹' t'ᶜ = Set.univ \\ Prod.mk a ⁻¹' t' :=\n  by\n  intro a\n  ext1 b\n  simp only [mem_compl_iff, mem_preimage, mem_diff, mem_univ, true_and_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : MeasurableSet t'\nh_meas : Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\n⊢ ∀ (a : α), Prod.mk a ⁻¹' t'ᶜ = univ \\ Prod.mk a ⁻¹' t'\n[PROOFSTEP]\nintro a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : MeasurableSet t'\nh_meas : Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\na : α\n⊢ Prod.mk a ⁻¹' t'ᶜ = univ \\ Prod.mk a ⁻¹' t'\n[PROOFSTEP]\next1 b\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : MeasurableSet t'\nh_meas : Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\na : α\nb : β\n⊢ b ∈ Prod.mk a ⁻¹' t'ᶜ ↔ b ∈ univ \\ Prod.mk a ⁻¹' t'\n[PROOFSTEP]\nsimp only [mem_compl_iff, mem_preimage, mem_diff, mem_univ, true_and_iff]\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : MeasurableSet t'\nh_meas : Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\nh_eq_sdiff : ∀ (a : α), Prod.mk a ⁻¹' t'ᶜ = univ \\ Prod.mk a ⁻¹' t'\n⊢ Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t'ᶜ)\n[PROOFSTEP]\nsimp_rw [h_eq_sdiff]\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : MeasurableSet t'\nh_meas : Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\nh_eq_sdiff : ∀ (a : α), Prod.mk a ⁻¹' t'ᶜ = univ \\ Prod.mk a ⁻¹' t'\n⊢ Measurable fun a => ↑↑(↑κ a) (univ \\ Prod.mk a ⁻¹' t')\n[PROOFSTEP]\nhave : (fun a => κ a (Set.univ \\ Prod.mk a ⁻¹' t')) = fun a => κ a Set.univ - κ a (Prod.mk a ⁻¹' t') :=\n  by\n  ext1 a\n  rw [← Set.diff_inter_self_eq_diff, Set.inter_univ, measure_diff (Set.subset_univ _)]\n  · exact (@measurable_prod_mk_left α β _ _ a) ht'\n  · exact measure_ne_top _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : MeasurableSet t'\nh_meas : Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\nh_eq_sdiff : ∀ (a : α), Prod.mk a ⁻¹' t'ᶜ = univ \\ Prod.mk a ⁻¹' t'\n⊢ (fun a => ↑↑(↑κ a) (univ \\ Prod.mk a ⁻¹' t')) = fun a => ↑↑(↑κ a) univ - ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\n[PROOFSTEP]\next1 a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : MeasurableSet t'\nh_meas : Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\nh_eq_sdiff : ∀ (a : α), Prod.mk a ⁻¹' t'ᶜ = univ \\ Prod.mk a ⁻¹' t'\na : α\n⊢ ↑↑(↑κ a) (univ \\ Prod.mk a ⁻¹' t') = ↑↑(↑κ a) univ - ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\n[PROOFSTEP]\nrw [← Set.diff_inter_self_eq_diff, Set.inter_univ, measure_diff (Set.subset_univ _)]\n[GOAL]\ncase h.h₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : MeasurableSet t'\nh_meas : Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\nh_eq_sdiff : ∀ (a : α), Prod.mk a ⁻¹' t'ᶜ = univ \\ Prod.mk a ⁻¹' t'\na : α\n⊢ MeasurableSet (Prod.mk a ⁻¹' t')\n[PROOFSTEP]\nexact (@measurable_prod_mk_left α β _ _ a) ht'\n[GOAL]\ncase h.h_fin\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : MeasurableSet t'\nh_meas : Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\nh_eq_sdiff : ∀ (a : α), Prod.mk a ⁻¹' t'ᶜ = univ \\ Prod.mk a ⁻¹' t'\na : α\n⊢ ↑↑(↑κ a) (Prod.mk a ⁻¹' t') ≠ ⊤\n[PROOFSTEP]\nexact measure_ne_top _ _\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : MeasurableSet t'\nh_meas : Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\nh_eq_sdiff : ∀ (a : α), Prod.mk a ⁻¹' t'ᶜ = univ \\ Prod.mk a ⁻¹' t'\nthis : (fun a => ↑↑(↑κ a) (univ \\ Prod.mk a ⁻¹' t')) = fun a => ↑↑(↑κ a) univ - ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\n⊢ Measurable fun a => ↑↑(↑κ a) (univ \\ Prod.mk a ⁻¹' t')\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nt' : Set (α × β)\nht' : MeasurableSet t'\nh_meas : Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\nh_eq_sdiff : ∀ (a : α), Prod.mk a ⁻¹' t'ᶜ = univ \\ Prod.mk a ⁻¹' t'\nthis : (fun a => ↑↑(↑κ a) (univ \\ Prod.mk a ⁻¹' t')) = fun a => ↑↑(↑κ a) univ - ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\n⊢ Measurable fun a => ↑↑(↑κ a) univ - ↑↑(↑κ a) (Prod.mk a ⁻¹' t')\n[PROOFSTEP]\nexact Measurable.sub (kernel.measurable_coe κ MeasurableSet.univ) h_meas\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\n⊢ ∀ (f : ℕ → Set (α × β)),\n    Pairwise (Disjoint on f) →\n      (∀ (i : ℕ), MeasurableSet (f i)) →\n        (∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)) →\n          (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (⋃ (i : ℕ), f i)\n[PROOFSTEP]\nintro f h_disj hf_meas hf\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\n⊢ Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)\n[PROOFSTEP]\nhave h_Union : (fun a => κ a (Prod.mk a ⁻¹' ⋃ i, f i)) = fun a => κ a (⋃ i, Prod.mk a ⁻¹' f i) :=\n  by\n  ext1 a\n  congr with b\n  simp only [mem_iUnion, mem_preimage]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\n⊢ (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\n[PROOFSTEP]\next1 a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\na : α\n⊢ ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i) = ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\n[PROOFSTEP]\ncongr with b\n[GOAL]\ncase h.e_a.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\na : α\nb : β\n⊢ b ∈ Prod.mk a ⁻¹' ⋃ (i : ℕ), f i ↔ b ∈ ⋃ (i : ℕ), Prod.mk a ⁻¹' f i\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_preimage]\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\n⊢ Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)\n[PROOFSTEP]\nrw [h_Union]\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\n⊢ Measurable fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\n[PROOFSTEP]\nhave h_tsum : (fun a => κ a (⋃ i, Prod.mk a ⁻¹' f i)) = fun a => ∑' i, κ a (Prod.mk a ⁻¹' f i) :=\n  by\n  ext1 a\n  rw [measure_iUnion]\n  · intro i j hij s hsi hsj b hbs\n    have habi : {(a, b)} ⊆ f i := by rw [Set.singleton_subset_iff]; exact hsi hbs\n    have habj : {(a, b)} ⊆ f j := by rw [Set.singleton_subset_iff]; exact hsj hbs\n    simpa only [Set.bot_eq_empty, Set.le_eq_subset, Set.singleton_subset_iff, Set.mem_empty_iff_false] using\n      h_disj hij habi habj\n  · exact fun i => (@measurable_prod_mk_left α β _ _ a) (hf_meas i)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\n⊢ (fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)) = fun a => ∑' (i : ℕ), ↑↑(↑κ a) (Prod.mk a ⁻¹' f i)\n[PROOFSTEP]\next1 a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\na : α\n⊢ ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i) = ∑' (i : ℕ), ↑↑(↑κ a) (Prod.mk a ⁻¹' f i)\n[PROOFSTEP]\nrw [measure_iUnion]\n[GOAL]\ncase h.hn\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\na : α\n⊢ Pairwise (Disjoint on fun i => Prod.mk a ⁻¹' f i)\n[PROOFSTEP]\nintro i j hij s hsi hsj b hbs\n[GOAL]\ncase h.hn\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\na : α\ni j : ℕ\nhij : i ≠ j\ns : Set β\nhsi : s ≤ (fun i => Prod.mk a ⁻¹' f i) i\nhsj : s ≤ (fun i => Prod.mk a ⁻¹' f i) j\nb : β\nhbs : b ∈ s\n⊢ b ∈ ⊥\n[PROOFSTEP]\nhave habi : {(a, b)} ⊆ f i := by rw [Set.singleton_subset_iff]; exact hsi hbs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\na : α\ni j : ℕ\nhij : i ≠ j\ns : Set β\nhsi : s ≤ (fun i => Prod.mk a ⁻¹' f i) i\nhsj : s ≤ (fun i => Prod.mk a ⁻¹' f i) j\nb : β\nhbs : b ∈ s\n⊢ {(a, b)} ⊆ f i\n[PROOFSTEP]\nrw [Set.singleton_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\na : α\ni j : ℕ\nhij : i ≠ j\ns : Set β\nhsi : s ≤ (fun i => Prod.mk a ⁻¹' f i) i\nhsj : s ≤ (fun i => Prod.mk a ⁻¹' f i) j\nb : β\nhbs : b ∈ s\n⊢ (a, b) ∈ f i\n[PROOFSTEP]\nexact hsi hbs\n[GOAL]\ncase h.hn\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\na : α\ni j : ℕ\nhij : i ≠ j\ns : Set β\nhsi : s ≤ (fun i => Prod.mk a ⁻¹' f i) i\nhsj : s ≤ (fun i => Prod.mk a ⁻¹' f i) j\nb : β\nhbs : b ∈ s\nhabi : {(a, b)} ⊆ f i\n⊢ b ∈ ⊥\n[PROOFSTEP]\nhave habj : {(a, b)} ⊆ f j := by rw [Set.singleton_subset_iff]; exact hsj hbs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\na : α\ni j : ℕ\nhij : i ≠ j\ns : Set β\nhsi : s ≤ (fun i => Prod.mk a ⁻¹' f i) i\nhsj : s ≤ (fun i => Prod.mk a ⁻¹' f i) j\nb : β\nhbs : b ∈ s\nhabi : {(a, b)} ⊆ f i\n⊢ {(a, b)} ⊆ f j\n[PROOFSTEP]\nrw [Set.singleton_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\na : α\ni j : ℕ\nhij : i ≠ j\ns : Set β\nhsi : s ≤ (fun i => Prod.mk a ⁻¹' f i) i\nhsj : s ≤ (fun i => Prod.mk a ⁻¹' f i) j\nb : β\nhbs : b ∈ s\nhabi : {(a, b)} ⊆ f i\n⊢ (a, b) ∈ f j\n[PROOFSTEP]\nexact hsj hbs\n[GOAL]\ncase h.hn\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\na : α\ni j : ℕ\nhij : i ≠ j\ns : Set β\nhsi : s ≤ (fun i => Prod.mk a ⁻¹' f i) i\nhsj : s ≤ (fun i => Prod.mk a ⁻¹' f i) j\nb : β\nhbs : b ∈ s\nhabi : {(a, b)} ⊆ f i\nhabj : {(a, b)} ⊆ f j\n⊢ b ∈ ⊥\n[PROOFSTEP]\nsimpa only [Set.bot_eq_empty, Set.le_eq_subset, Set.singleton_subset_iff, Set.mem_empty_iff_false] using\n  h_disj hij habi habj\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\na : α\n⊢ ∀ (i : ℕ), MeasurableSet (Prod.mk a ⁻¹' f i)\n[PROOFSTEP]\nexact fun i => (@measurable_prod_mk_left α β _ _ a) (hf_meas i)\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\nh_tsum : (fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)) = fun a => ∑' (i : ℕ), ↑↑(↑κ a) (Prod.mk a ⁻¹' f i)\n⊢ Measurable fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\n[PROOFSTEP]\nrw [h_tsum]\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nt : Set (α × β)\nht : MeasurableSet t\nhκs : ∀ (a : α), IsFiniteMeasure (↑κ a)\nf : ℕ → Set (α × β)\nh_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nhf : ∀ (i : ℕ), (fun t => Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)) (f i)\nh_Union : (fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' ⋃ (i : ℕ), f i)) = fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)\nh_tsum : (fun a => ↑↑(↑κ a) (⋃ (i : ℕ), Prod.mk a ⁻¹' f i)) = fun a => ∑' (i : ℕ), ↑↑(↑κ a) (Prod.mk a ⁻¹' f i)\n⊢ Measurable fun a => ∑' (i : ℕ), ↑↑(↑κ a) (Prod.mk a ⁻¹' f i)\n[PROOFSTEP]\nexact Measurable.ennreal_tsum hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝ : IsSFiniteKernel κ\nt : Set (α × β)\nht : MeasurableSet t\n⊢ Measurable fun a => ↑↑(↑κ a) (Prod.mk a ⁻¹' t)\n[PROOFSTEP]\nrw [← kernel.kernel_sum_seq κ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝ : IsSFiniteKernel κ\nt : Set (α × β)\nht : MeasurableSet t\n⊢ Measurable fun a => ↑↑(↑(kernel.sum (seq κ)) a) (Prod.mk a ⁻¹' t)\n[PROOFSTEP]\nhave : ∀ a, kernel.sum (kernel.seq κ) a (Prod.mk a ⁻¹' t) = ∑' n, kernel.seq κ n a (Prod.mk a ⁻¹' t) := fun a =>\n  kernel.sum_apply' _ _ (measurable_prod_mk_left ht)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝ : IsSFiniteKernel κ\nt : Set (α × β)\nht : MeasurableSet t\nthis : ∀ (a : α), ↑↑(↑(kernel.sum (seq κ)) a) (Prod.mk a ⁻¹' t) = ∑' (n : ℕ), ↑↑(↑(seq κ n) a) (Prod.mk a ⁻¹' t)\n⊢ Measurable fun a => ↑↑(↑(kernel.sum (seq κ)) a) (Prod.mk a ⁻¹' t)\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝ : IsSFiniteKernel κ\nt : Set (α × β)\nht : MeasurableSet t\nthis : ∀ (a : α), ↑↑(↑(kernel.sum (seq κ)) a) (Prod.mk a ⁻¹' t) = ∑' (n : ℕ), ↑↑(↑(seq κ n) a) (Prod.mk a ⁻¹' t)\n⊢ Measurable fun a => ∑' (n : ℕ), ↑↑(↑(seq κ n) a) (Prod.mk a ⁻¹' t)\n[PROOFSTEP]\nrefine' Measurable.ennreal_tsum fun n => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝ : IsSFiniteKernel κ\nt : Set (α × β)\nht : MeasurableSet t\nthis : ∀ (a : α), ↑↑(↑(kernel.sum (seq κ)) a) (Prod.mk a ⁻¹' t) = ∑' (n : ℕ), ↑↑(↑(seq κ n) a) (Prod.mk a ⁻¹' t)\nn : ℕ\n⊢ Measurable fun a => ↑↑(↑(seq κ n) a) (Prod.mk a ⁻¹' t)\n[PROOFSTEP]\nexact measurable_kernel_prod_mk_left_of_finite ht inferInstance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\ninst✝ : IsSFiniteKernel η\ns : Set (β × γ)\nhs : MeasurableSet s\na : α\n⊢ Measurable fun b => ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s)\n[PROOFSTEP]\nhave : ∀ b, Prod.mk b ⁻¹' s = {c | ((a, b), c) ∈ {p : (α × β) × γ | (p.1.2, p.2) ∈ s}} := by intro b; rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\ninst✝ : IsSFiniteKernel η\ns : Set (β × γ)\nhs : MeasurableSet s\na : α\n⊢ ∀ (b : β), Prod.mk b ⁻¹' s = {c | ((a, b), c) ∈ {p | (p.fst.snd, p.snd) ∈ s}}\n[PROOFSTEP]\nintro b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\ninst✝ : IsSFiniteKernel η\ns : Set (β × γ)\nhs : MeasurableSet s\na : α\nb : β\n⊢ Prod.mk b ⁻¹' s = {c | ((a, b), c) ∈ {p | (p.fst.snd, p.snd) ∈ s}}\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\ninst✝ : IsSFiniteKernel η\ns : Set (β × γ)\nhs : MeasurableSet s\na : α\nthis : ∀ (b : β), Prod.mk b ⁻¹' s = {c | ((a, b), c) ∈ {p | (p.fst.snd, p.snd) ∈ s}}\n⊢ Measurable fun b => ↑↑(↑η (a, b)) (Prod.mk b ⁻¹' s)\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\ninst✝ : IsSFiniteKernel η\ns : Set (β × γ)\nhs : MeasurableSet s\na : α\nthis : ∀ (b : β), Prod.mk b ⁻¹' s = {c | ((a, b), c) ∈ {p | (p.fst.snd, p.snd) ∈ s}}\n⊢ Measurable fun b => ↑↑(↑η (a, b)) {c | ((a, b), c) ∈ {p | (p.fst.snd, p.snd) ∈ s}}\n[PROOFSTEP]\nrefine' (measurable_kernel_prod_mk_left _).comp measurable_prod_mk_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\ninst✝ : IsSFiniteKernel η\ns : Set (β × γ)\nhs : MeasurableSet s\na : α\nthis : ∀ (b : β), Prod.mk b ⁻¹' s = {c | ((a, b), c) ∈ {p | (p.fst.snd, p.snd) ∈ s}}\n⊢ MeasurableSet {p | (p.fst.snd, p.snd) ∈ s}\n[PROOFSTEP]\nexact (measurable_fst.snd.prod_mk measurable_snd) hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nt : Set (α × β)\nht : MeasurableSet t\nc : ℝ≥0∞\n⊢ Measurable fun a => ∫⁻ (b : β), indicator t (Function.const (α × β) c) (a, b) ∂↑κ a\n[PROOFSTEP]\nconv =>\n  congr\n  ext\n  erw [lintegral_indicator_const_comp measurable_prod_mk_left ht _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nt : Set (α × β)\nht : MeasurableSet t\nc : ℝ≥0∞\n| Measurable fun a => ∫⁻ (b : β), indicator t (Function.const (α × β) c) (a, b) ∂↑κ a\n[PROOFSTEP]\n  congr\n  ext\n  erw [lintegral_indicator_const_comp measurable_prod_mk_left ht _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nt : Set (α × β)\nht : MeasurableSet t\nc : ℝ≥0∞\n| Measurable fun a => ∫⁻ (b : β), indicator t (Function.const (α × β) c) (a, b) ∂↑κ a\n[PROOFSTEP]\n  congr\n  ext\n  erw [lintegral_indicator_const_comp measurable_prod_mk_left ht _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nt : Set (α × β)\nht : MeasurableSet t\nc : ℝ≥0∞\n| Measurable fun a => ∫⁻ (b : β), indicator t (Function.const (α × β) c) (a, b) ∂↑κ a\n[PROOFSTEP]\ncongr\n[GOAL]\ncase f\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nt : Set (α × β)\nht : MeasurableSet t\nc : ℝ≥0∞\n| fun a => ∫⁻ (b : β), indicator t (Function.const (α × β) c) (a, b) ∂↑κ a\n[PROOFSTEP]\next\n[GOAL]\ncase f.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nt : Set (α × β)\nht : MeasurableSet t\nc : ℝ≥0∞\nx✝ : α\n| ∫⁻ (b : β), indicator t (Function.const (α × β) c) (x✝, b) ∂↑κ x✝\n[PROOFSTEP]\nerw [lintegral_indicator_const_comp measurable_prod_mk_left ht _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nt : Set (α × β)\nht : MeasurableSet t\nc : ℝ≥0∞\n⊢ Measurable fun x => c * ↑↑(↑κ x) (Prod.mk x ⁻¹' t)\n[PROOFSTEP]\nexact Measurable.const_mul (measurable_kernel_prod_mk_left ht) c\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\n⊢ Measurable fun a => ∫⁻ (b : β), f a b ∂↑κ a\n[PROOFSTEP]\nlet F : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\n⊢ Measurable fun a => ∫⁻ (b : β), f a b ∂↑κ a\n[PROOFSTEP]\nhave h : ∀ a, ⨆ n, F n a = uncurry f a := SimpleFunc.iSup_eapprox_apply (uncurry f) hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α × β), ⨆ (n : ℕ), ↑(F n) a = uncurry f a\n⊢ Measurable fun a => ∫⁻ (b : β), f a b ∂↑κ a\n[PROOFSTEP]\nsimp only [Prod.forall, uncurry_apply_pair] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\n⊢ Measurable fun a => ∫⁻ (b : β), f a b ∂↑κ a\n[PROOFSTEP]\nsimp_rw [← h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\n⊢ Measurable fun a => ∫⁻ (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) ∂↑κ a\n[PROOFSTEP]\nhave : ∀ a, (∫⁻ b, ⨆ n, F n (a, b) ∂κ a) = ⨆ n, ∫⁻ b, F n (a, b) ∂κ a :=\n  by\n  intro a\n  rw [lintegral_iSup]\n  · exact fun n => (F n).measurable.comp measurable_prod_mk_left\n  · exact fun i j hij b => SimpleFunc.monotone_eapprox (uncurry f) hij _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\n⊢ ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\n[PROOFSTEP]\nintro a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\na : α\n⊢ ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\n[PROOFSTEP]\nrw [lintegral_iSup]\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\na : α\n⊢ ∀ (n : ℕ), Measurable fun b => ↑(F n) (a, b)\n[PROOFSTEP]\nexact fun n => (F n).measurable.comp measurable_prod_mk_left\n[GOAL]\ncase h_mono\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝ : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\na : α\n⊢ Monotone fun n b => ↑(F n) (a, b)\n[PROOFSTEP]\nexact fun i j hij b => SimpleFunc.monotone_eapprox (uncurry f) hij _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\n⊢ Measurable fun a => ∫⁻ (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [this]\n  -- Porting note: trouble finding the induction motive\n    -- refine' measurable_iSup fun n => SimpleFunc.induction _ _ (F n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\n⊢ Measurable fun a => ⨆ (n : ℕ), ∫⁻ (b : β), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) ∂↑κ a\n[PROOFSTEP]\nrefine' measurable_iSup fun n => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\n⊢ Measurable fun a => ∫⁻ (b : β), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) ∂↑κ a\n[PROOFSTEP]\nrefine' SimpleFunc.induction (P := fun f => Measurable (fun (a : α) => ∫⁻ (b : β), f (a, b) ∂κ a)) _ _ (F n)\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\n⊢ ∀ (c : ℝ≥0∞) {s : Set (α × β)} (hs : MeasurableSet s),\n    (fun f => Measurable fun a => ∫⁻ (b : β), ↑f (a, b) ∂↑κ a)\n      (SimpleFunc.piecewise s hs (SimpleFunc.const (α × β) c) (SimpleFunc.const (α × β) 0))\n[PROOFSTEP]\nintro c t ht\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\nc : ℝ≥0∞\nt : Set (α × β)\nht : MeasurableSet t\n⊢ Measurable fun a =>\n    ∫⁻ (b : β), ↑(SimpleFunc.piecewise t ht (SimpleFunc.const (α × β) c) (SimpleFunc.const (α × β) 0)) (a, b) ∂↑κ a\n[PROOFSTEP]\nsimp only [SimpleFunc.const_zero, SimpleFunc.coe_piecewise, SimpleFunc.coe_const, SimpleFunc.coe_zero,\n  Set.piecewise_eq_indicator]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\nc : ℝ≥0∞\nt : Set (α × β)\nht : MeasurableSet t\n⊢ Measurable fun a => ∫⁻ (b : β), Set.piecewise t (Function.const (α × β) c) 0 (a, b) ∂↑κ a\n[PROOFSTEP]\nexact kernel.measurable_lintegral_indicator_const (κ := κ) ht c\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\n⊢ ∀ ⦃f g : SimpleFunc (α × β) ℝ≥0∞⦄,\n    Disjoint (support ↑f) (support ↑g) →\n      (fun f => Measurable fun a => ∫⁻ (b : β), ↑f (a, b) ∂↑κ a) f →\n        (fun f => Measurable fun a => ∫⁻ (b : β), ↑f (a, b) ∂↑κ a) g →\n          (fun f => Measurable fun a => ∫⁻ (b : β), ↑f (a, b) ∂↑κ a) (f + g)\n[PROOFSTEP]\nintro g₁ g₂ _ hm₁ hm₂\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\ng₁ g₂ : SimpleFunc (α × β) ℝ≥0∞\na✝ : Disjoint (support ↑g₁) (support ↑g₂)\nhm₁ : Measurable fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a\nhm₂ : Measurable fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\n⊢ Measurable fun a => ∫⁻ (b : β), ↑(g₁ + g₂) (a, b) ∂↑κ a\n[PROOFSTEP]\nsimp only [SimpleFunc.coe_add, Pi.add_apply]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\ng₁ g₂ : SimpleFunc (α × β) ℝ≥0∞\na✝ : Disjoint (support ↑g₁) (support ↑g₂)\nhm₁ : Measurable fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a\nhm₂ : Measurable fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\n⊢ Measurable fun a => ∫⁻ (b : β), ↑g₁ (a, b) + ↑g₂ (a, b) ∂↑κ a\n[PROOFSTEP]\nhave h_add :\n  (fun a => ∫⁻ b, g₁ (a, b) + g₂ (a, b) ∂κ a) = (fun a => ∫⁻ b, g₁ (a, b) ∂κ a) + fun a => ∫⁻ b, g₂ (a, b) ∂κ a :=\n  by\n  ext1 a\n  rw [Pi.add_apply]\n    -- Porting note: was `rw` (`Function.comp` reducibility)\n  erw [lintegral_add_left (g₁.measurable.comp measurable_prod_mk_left)]\n  simp_rw [Function.comp_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\ng₁ g₂ : SimpleFunc (α × β) ℝ≥0∞\na✝ : Disjoint (support ↑g₁) (support ↑g₂)\nhm₁ : Measurable fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a\nhm₂ : Measurable fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\n⊢ (fun a => ∫⁻ (b : β), ↑g₁ (a, b) + ↑g₂ (a, b) ∂↑κ a) =\n    (fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a) + fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\n[PROOFSTEP]\next1 a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝¹ : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\ng₁ g₂ : SimpleFunc (α × β) ℝ≥0∞\na✝ : Disjoint (support ↑g₁) (support ↑g₂)\nhm₁ : Measurable fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a\nhm₂ : Measurable fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\na : α\n⊢ ∫⁻ (b : β), ↑g₁ (a, b) + ↑g₂ (a, b) ∂↑κ a =\n    ((fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a) + fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a) a\n[PROOFSTEP]\nrw [Pi.add_apply]\n  -- Porting note: was `rw` (`Function.comp` reducibility)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝¹ : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\ng₁ g₂ : SimpleFunc (α × β) ℝ≥0∞\na✝ : Disjoint (support ↑g₁) (support ↑g₂)\nhm₁ : Measurable fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a\nhm₂ : Measurable fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\na : α\n⊢ ∫⁻ (b : β), ↑g₁ (a, b) + ↑g₂ (a, b) ∂↑κ a = ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a + ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\n[PROOFSTEP]\nerw [lintegral_add_left (g₁.measurable.comp measurable_prod_mk_left)]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na✝¹ : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\ng₁ g₂ : SimpleFunc (α × β) ℝ≥0∞\na✝ : Disjoint (support ↑g₁) (support ↑g₂)\nhm₁ : Measurable fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a\nhm₂ : Measurable fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\na : α\n⊢ ∫⁻ (a_1 : β), (↑g₁ ∘ Prod.mk a) a_1 ∂↑κ a + ∫⁻ (a_1 : β), ↑g₂ (a, a_1) ∂↑κ a =\n    ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a + ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\n[PROOFSTEP]\nsimp_rw [Function.comp_apply]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\ng₁ g₂ : SimpleFunc (α × β) ℝ≥0∞\na✝ : Disjoint (support ↑g₁) (support ↑g₂)\nhm₁ : Measurable fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a\nhm₂ : Measurable fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\nh_add :\n  (fun a => ∫⁻ (b : β), ↑g₁ (a, b) + ↑g₂ (a, b) ∂↑κ a) =\n    (fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a) + fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\n⊢ Measurable fun a => ∫⁻ (b : β), ↑g₁ (a, b) + ↑g₂ (a, b) ∂↑κ a\n[PROOFSTEP]\nrw [h_add]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\nF : ℕ → SimpleFunc (α × β) ℝ≥0∞ := SimpleFunc.eapprox (uncurry f)\nh : ∀ (a : α) (b : β), ⨆ (n : ℕ), ↑(SimpleFunc.eapprox (uncurry f) n) (a, b) = f a b\nthis : ∀ (a : α), ∫⁻ (b : β), ⨆ (n : ℕ), ↑(F n) (a, b) ∂↑κ a = ⨆ (n : ℕ), ∫⁻ (b : β), ↑(F n) (a, b) ∂↑κ a\nn : ℕ\ng₁ g₂ : SimpleFunc (α × β) ℝ≥0∞\na✝ : Disjoint (support ↑g₁) (support ↑g₂)\nhm₁ : Measurable fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a\nhm₂ : Measurable fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\nh_add :\n  (fun a => ∫⁻ (b : β), ↑g₁ (a, b) + ↑g₂ (a, b) ∂↑κ a) =\n    (fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a) + fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a\n⊢ Measurable ((fun a => ∫⁻ (b : β), ↑g₁ (a, b) ∂↑κ a) + fun a => ∫⁻ (b : β), ↑g₂ (a, b) ∂↑κ a)\n[PROOFSTEP]\nexact Measurable.add hm₁ hm₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α × β → ℝ≥0∞\nhf : Measurable f\n⊢ Measurable fun a => ∫⁻ (b : β), f (a, b) ∂↑κ a\n[PROOFSTEP]\nrefine' Measurable.lintegral_kernel_prod_right _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α × β → ℝ≥0∞\nhf : Measurable f\n⊢ Measurable (uncurry fun a b => f (a, b))\n[PROOFSTEP]\nhave : (uncurry fun (a : α) (b : β) => f (a, b)) = f := by ext x; rw [← @Prod.mk.eta _ _ x, uncurry_apply_pair]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α × β → ℝ≥0∞\nhf : Measurable f\n⊢ (uncurry fun a b => f (a, b)) = f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α × β → ℝ≥0∞\nhf : Measurable f\nx : α × β\n⊢ uncurry (fun a b => f (a, b)) x = f x\n[PROOFSTEP]\nrw [← @Prod.mk.eta _ _ x, uncurry_apply_pair]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α × β → ℝ≥0∞\nhf : Measurable f\nthis : (uncurry fun a b => f (a, b)) = f\n⊢ Measurable (uncurry fun a b => f (a, b))\n[PROOFSTEP]\nrwa [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β × γ → ℝ≥0∞\nhf : Measurable f\n⊢ Measurable fun x => ∫⁻ (y : γ), f (x, y) ∂↑η (a, x)\n[PROOFSTEP]\nchange\n  Measurable\n    ((fun x => ∫⁻ y, (fun u : (α × β) × γ => f (u.1.2, u.2)) (x, y) ∂η x) ∘ Prod.mk a)\n      -- Porting note: specified `κ`, `f`.\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β × γ → ℝ≥0∞\nhf : Measurable f\n⊢ Measurable ((fun x => ∫⁻ (y : γ), (fun u => f (u.fst.snd, u.snd)) (x, y) ∂↑η x) ∘ Prod.mk a)\n[PROOFSTEP]\nrefine'\n  (Measurable.lintegral_kernel_prod_right' (κ := η) (f := (fun u ↦ f (u.fst.snd, u.snd))) _).comp\n    measurable_prod_mk_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β × γ → ℝ≥0∞\nhf : Measurable f\n⊢ Measurable fun u => f (u.fst.snd, u.snd)\n[PROOFSTEP]\nexact hf.comp (measurable_fst.snd.prod_mk measurable_snd)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\ns : Set β\nhs : MeasurableSet s\n⊢ Measurable fun a => ∫⁻ (b : β) in s, f a b ∂↑κ a\n[PROOFSTEP]\nsimp_rw [← lintegral_restrict κ hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → ℝ≥0∞\nhf : Measurable (uncurry f)\ns : Set β\nhs : MeasurableSet s\n⊢ Measurable fun a => ∫⁻ (b : β), f a b ∂↑(kernel.restrict κ hs) a\n[PROOFSTEP]\nexact hf.lintegral_kernel_prod_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β → α → ℝ≥0∞\nhf : Measurable (uncurry f)\ns : Set β\nhs : MeasurableSet s\n⊢ Measurable fun b => ∫⁻ (a : β) in s, f a b ∂↑κ b\n[PROOFSTEP]\nsimp_rw [← lintegral_restrict κ hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β → α → ℝ≥0∞\nhf : Measurable (uncurry f)\ns : Set β\nhs : MeasurableSet s\n⊢ Measurable fun b => ∫⁻ (a : β), f a b ∂↑(kernel.restrict κ hs) b\n[PROOFSTEP]\nexact hf.lintegral_kernel_prod_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β → ℝ≥0∞\nhf : Measurable f\ns : Set β\nhs : MeasurableSet s\n⊢ Measurable fun a => ∫⁻ (b : β) in s, f b ∂↑κ a\n[PROOFSTEP]\nrefine Measurable.set_lintegral_kernel_prod_right ?_ hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β → ℝ≥0∞\nhf : Measurable f\ns : Set β\nhs : MeasurableSet s\n⊢ Measurable (uncurry fun a b => f b)\n[PROOFSTEP]\nconvert (hf.comp measurable_snd)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝² : NormedAddCommGroup E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\n⊢ MeasurableSet {x | Integrable (f x)}\n[PROOFSTEP]\nsimp_rw [Integrable, hf.of_uncurry_left.aestronglyMeasurable, true_and_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝² : NormedAddCommGroup E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\n⊢ MeasurableSet {x | HasFiniteIntegral (f x)}\n[PROOFSTEP]\nexact measurableSet_lt (Measurable.lintegral_kernel_prod_right hf.ennnorm) measurable_const\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\n⊢ StronglyMeasurable fun x => ∫ (y : β), f x y ∂↑κ x\n[PROOFSTEP]\nclassical\nborelize E\nhaveI : TopologicalSpace.SeparableSpace (range (uncurry f) ∪ {0} : Set E) := hf.separableSpace_range_union_singleton\nlet s : ℕ → SimpleFunc (α × β) E := SimpleFunc.approxOn _ hf.measurable (range (uncurry f) ∪ {0}) 0 (by simp)\nlet s' : ℕ → α → SimpleFunc β E := fun n x => (s n).comp (Prod.mk x) measurable_prod_mk_left\nlet f' : ℕ → α → E := fun n => {x | Integrable (f x) (κ x)}.indicator fun x => (s' n x).integral (κ x)\nhave hf' : ∀ n, StronglyMeasurable (f' n) := by\n  intro n; refine' StronglyMeasurable.indicator _ (measurableSet_kernel_integrable hf)\n  have : ∀ x, ((s' n x).range.filter fun x => x ≠ 0) ⊆ (s n).range :=\n    by\n    intro x; refine' Finset.Subset.trans (Finset.filter_subset _ _) _; intro y\n    simp_rw [SimpleFunc.mem_range]; rintro ⟨z, rfl⟩; exact ⟨(x, z), rfl⟩\n  simp only [SimpleFunc.integral_eq_sum_of_subset (this _)]\n  refine' Finset.stronglyMeasurable_sum _ fun x _ => _\n  refine' (Measurable.ennreal_toReal _).stronglyMeasurable.smul_const _\n  simp (config := { singlePass := true }) only [SimpleFunc.coe_comp, preimage_comp]\n  apply kernel.measurable_kernel_prod_mk_left\n  exact (s n).measurableSet_fiber x\nhave h2f' : Tendsto f' atTop (𝓝 fun x : α => ∫ y : β, f x y ∂κ x) :=\n  by\n  rw [tendsto_pi_nhds]; intro x\n  by_cases hfx : Integrable (f x) (κ x)\n  · have : ∀ n, Integrable (s' n x) (κ x) := by\n      intro n; apply (hfx.norm.add hfx.norm).mono' (s' n x).aestronglyMeasurable\n      apply eventually_of_forall; intro y\n      simp_rw [SimpleFunc.coe_comp]; exact SimpleFunc.norm_approxOn_zero_le _ _ (x, y) n\n    simp only [hfx, SimpleFunc.integral_eq_integral _ (this _), indicator_of_mem, mem_setOf_eq]\n    refine'\n      tendsto_integral_of_dominated_convergence (fun y => ‖f x y‖ + ‖f x y‖) (fun n => (s' n x).aestronglyMeasurable)\n        (hfx.norm.add hfx.norm) _ _\n    ·\n      -- Porting note: was\n              -- exact fun n => eventually_of_forall fun y =>\n              --   SimpleFunc.norm_approxOn_zero_le _ _ (x, y) nexact fun n =>\n        eventually_of_forall fun y => SimpleFunc.norm_approxOn_zero_le hf.measurable (by simp) (x, y) n\n    ·\n      -- Porting note:\n              -- refine' eventually_of_forall fun y => SimpleFunc.tendsto_approxOn _ _ _\n      refine' eventually_of_forall fun y => SimpleFunc.tendsto_approxOn hf.measurable (by simp) _\n      apply subset_closure\n      simp [-uncurry_apply_pair]\n  · simp [hfx, integral_undef]\nexact stronglyMeasurable_of_tendsto _ hf' h2f'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\n⊢ StronglyMeasurable fun x => ∫ (y : β), f x y ∂↑κ x\n[PROOFSTEP]\nborelize E\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ StronglyMeasurable fun x => ∫ (y : β), f x y ∂↑κ x\n[PROOFSTEP]\nhaveI : TopologicalSpace.SeparableSpace (range (uncurry f) ∪ {0} : Set E) := hf.separableSpace_range_union_singleton\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\n⊢ StronglyMeasurable fun x => ∫ (y : β), f x y ∂↑κ x\n[PROOFSTEP]\nlet s : ℕ → SimpleFunc (α × β) E := SimpleFunc.approxOn _ hf.measurable (range (uncurry f) ∪ {0}) 0 (by simp)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\n⊢ 0 ∈ range (uncurry f) ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\n⊢ StronglyMeasurable fun x => ∫ (y : β), f x y ∂↑κ x\n[PROOFSTEP]\nlet s' : ℕ → α → SimpleFunc β E := fun n x => (s n).comp (Prod.mk x) measurable_prod_mk_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\n⊢ StronglyMeasurable fun x => ∫ (y : β), f x y ∂↑κ x\n[PROOFSTEP]\nlet f' : ℕ → α → E := fun n => {x | Integrable (f x) (κ x)}.indicator fun x => (s' n x).integral (κ x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\n⊢ StronglyMeasurable fun x => ∫ (y : β), f x y ∂↑κ x\n[PROOFSTEP]\nhave hf' : ∀ n, StronglyMeasurable (f' n) := by\n  intro n; refine' StronglyMeasurable.indicator _ (measurableSet_kernel_integrable hf)\n  have : ∀ x, ((s' n x).range.filter fun x => x ≠ 0) ⊆ (s n).range :=\n    by\n    intro x; refine' Finset.Subset.trans (Finset.filter_subset _ _) _; intro y\n    simp_rw [SimpleFunc.mem_range]; rintro ⟨z, rfl⟩; exact ⟨(x, z), rfl⟩\n  simp only [SimpleFunc.integral_eq_sum_of_subset (this _)]\n  refine' Finset.stronglyMeasurable_sum _ fun x _ => _\n  refine' (Measurable.ennreal_toReal _).stronglyMeasurable.smul_const _\n  simp (config := { singlePass := true }) only [SimpleFunc.coe_comp, preimage_comp]\n  apply kernel.measurable_kernel_prod_mk_left\n  exact (s n).measurableSet_fiber x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\n⊢ ∀ (n : ℕ), StronglyMeasurable (f' n)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\n⊢ StronglyMeasurable (f' n)\n[PROOFSTEP]\nrefine' StronglyMeasurable.indicator _ (measurableSet_kernel_integrable hf)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\n⊢ StronglyMeasurable fun x => SimpleFunc.integral (↑κ x) (s' n x)\n[PROOFSTEP]\nhave : ∀ x, ((s' n x).range.filter fun x => x ≠ 0) ⊆ (s n).range :=\n  by\n  intro x; refine' Finset.Subset.trans (Finset.filter_subset _ _) _; intro y\n  simp_rw [SimpleFunc.mem_range]; rintro ⟨z, rfl⟩; exact ⟨(x, z), rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\n⊢ ∀ (x : α), Finset.filter (fun x => x ≠ 0) (SimpleFunc.range (s' n x)) ⊆ SimpleFunc.range (s n)\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\nx : α\n⊢ Finset.filter (fun x => x ≠ 0) (SimpleFunc.range (s' n x)) ⊆ SimpleFunc.range (s n)\n[PROOFSTEP]\nrefine' Finset.Subset.trans (Finset.filter_subset _ _) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\nx : α\n⊢ SimpleFunc.range (s' n x) ⊆ SimpleFunc.range (s n)\n[PROOFSTEP]\nintro y\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\nx : α\ny : E\n⊢ y ∈ SimpleFunc.range (s' n x) → y ∈ SimpleFunc.range (s n)\n[PROOFSTEP]\nsimp_rw [SimpleFunc.mem_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\nx : α\ny : E\n⊢ y ∈\n      range\n        ↑(SimpleFunc.comp\n            (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n              (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n            (Prod.mk x) (_ : Measurable (Prod.mk x))) →\n    y ∈\n      range\n        ↑(SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n            (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n[PROOFSTEP]\nrintro ⟨z, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\nx : α\nz : β\n⊢ ↑(SimpleFunc.comp\n          (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n            (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n          (Prod.mk x) (_ : Measurable (Prod.mk x)))\n      z ∈\n    range\n      ↑(SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n          (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n[PROOFSTEP]\nexact ⟨(x, z), rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\nthis : ∀ (x : α), Finset.filter (fun x => x ≠ 0) (SimpleFunc.range (s' n x)) ⊆ SimpleFunc.range (s n)\n⊢ StronglyMeasurable fun x => SimpleFunc.integral (↑κ x) (s' n x)\n[PROOFSTEP]\nsimp only [SimpleFunc.integral_eq_sum_of_subset (this _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\nthis : ∀ (x : α), Finset.filter (fun x => x ≠ 0) (SimpleFunc.range (s' n x)) ⊆ SimpleFunc.range (s n)\n⊢ StronglyMeasurable fun x =>\n    Finset.sum\n      (SimpleFunc.range\n        (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n          (_ : 0 ∈ range (uncurry f) ∪ {0}) n))\n      fun x_1 =>\n      ENNReal.toReal\n          (↑↑(↑κ x)\n            (↑(SimpleFunc.comp\n                  (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n                    (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n                  (Prod.mk x) (_ : Measurable (Prod.mk x))) ⁻¹'\n              {x_1})) •\n        x_1\n[PROOFSTEP]\nrefine' Finset.stronglyMeasurable_sum _ fun x _ => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\nthis : ∀ (x : α), Finset.filter (fun x => x ≠ 0) (SimpleFunc.range (s' n x)) ⊆ SimpleFunc.range (s n)\nx : E\nx✝ :\n  x ∈\n    SimpleFunc.range\n      (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n        (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n⊢ StronglyMeasurable fun x_1 =>\n    ENNReal.toReal\n        (↑↑(↑κ x_1)\n          (↑(SimpleFunc.comp\n                (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n                  (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n                (Prod.mk x_1) (_ : Measurable (Prod.mk x_1))) ⁻¹'\n            {x})) •\n      x\n[PROOFSTEP]\nrefine' (Measurable.ennreal_toReal _).stronglyMeasurable.smul_const _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\nthis : ∀ (x : α), Finset.filter (fun x => x ≠ 0) (SimpleFunc.range (s' n x)) ⊆ SimpleFunc.range (s n)\nx : E\nx✝ :\n  x ∈\n    SimpleFunc.range\n      (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n        (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n⊢ Measurable fun x_1 =>\n    ↑↑(↑κ x_1)\n      (↑(SimpleFunc.comp\n            (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n              (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n            (Prod.mk x_1) (_ : Measurable (Prod.mk x_1))) ⁻¹'\n        {x})\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [SimpleFunc.coe_comp, preimage_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\nthis : ∀ (x : α), Finset.filter (fun x => x ≠ 0) (SimpleFunc.range (s' n x)) ⊆ SimpleFunc.range (s n)\nx : E\nx✝ :\n  x ∈\n    SimpleFunc.range\n      (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n        (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n⊢ Measurable fun x_1 =>\n    ↑↑(↑κ x_1)\n      (Prod.mk x_1 ⁻¹'\n        (↑(SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n              (_ : 0 ∈ range (uncurry f) ∪ {0}) n) ⁻¹'\n          {x}))\n[PROOFSTEP]\napply kernel.measurable_kernel_prod_mk_left\n[GOAL]\ncase ht\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nn : ℕ\nthis : ∀ (x : α), Finset.filter (fun x => x ≠ 0) (SimpleFunc.range (s' n x)) ⊆ SimpleFunc.range (s n)\nx : E\nx✝ :\n  x ∈\n    SimpleFunc.range\n      (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n        (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n⊢ MeasurableSet\n    (↑(SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n          (_ : 0 ∈ range (uncurry f) ∪ {0}) n) ⁻¹'\n      {x})\n[PROOFSTEP]\nexact (s n).measurableSet_fiber x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\n⊢ StronglyMeasurable fun x => ∫ (y : β), f x y ∂↑κ x\n[PROOFSTEP]\nhave h2f' : Tendsto f' atTop (𝓝 fun x : α => ∫ y : β, f x y ∂κ x) :=\n  by\n  rw [tendsto_pi_nhds]; intro x\n  by_cases hfx : Integrable (f x) (κ x)\n  · have : ∀ n, Integrable (s' n x) (κ x) := by\n      intro n; apply (hfx.norm.add hfx.norm).mono' (s' n x).aestronglyMeasurable\n      apply eventually_of_forall; intro y\n      simp_rw [SimpleFunc.coe_comp]; exact SimpleFunc.norm_approxOn_zero_le _ _ (x, y) n\n    simp only [hfx, SimpleFunc.integral_eq_integral _ (this _), indicator_of_mem, mem_setOf_eq]\n    refine'\n      tendsto_integral_of_dominated_convergence (fun y => ‖f x y‖ + ‖f x y‖) (fun n => (s' n x).aestronglyMeasurable)\n        (hfx.norm.add hfx.norm) _ _\n    ·\n      -- Porting note: was\n              -- exact fun n => eventually_of_forall fun y =>\n              --   SimpleFunc.norm_approxOn_zero_le _ _ (x, y) nexact fun n =>\n        eventually_of_forall fun y => SimpleFunc.norm_approxOn_zero_le hf.measurable (by simp) (x, y) n\n    ·\n      -- Porting note:\n              -- refine' eventually_of_forall fun y => SimpleFunc.tendsto_approxOn _ _ _\n      refine' eventually_of_forall fun y => SimpleFunc.tendsto_approxOn hf.measurable (by simp) _\n      apply subset_closure\n      simp [-uncurry_apply_pair]\n  · simp [hfx, integral_undef]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\n⊢ Tendsto f' atTop (𝓝 fun x => ∫ (y : β), f x y ∂↑κ x)\n[PROOFSTEP]\nrw [tendsto_pi_nhds]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\n⊢ ∀ (x : α), Tendsto (fun i => f' i x) atTop (𝓝 (∫ (y : β), f x y ∂↑κ x))\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\n⊢ Tendsto (fun i => f' i x) atTop (𝓝 (∫ (y : β), f x y ∂↑κ x))\n[PROOFSTEP]\nby_cases hfx : Integrable (f x) (κ x)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\n⊢ Tendsto (fun i => f' i x) atTop (𝓝 (∫ (y : β), f x y ∂↑κ x))\n[PROOFSTEP]\nhave : ∀ n, Integrable (s' n x) (κ x) := by\n  intro n; apply (hfx.norm.add hfx.norm).mono' (s' n x).aestronglyMeasurable\n  apply eventually_of_forall; intro y\n  simp_rw [SimpleFunc.coe_comp]; exact SimpleFunc.norm_approxOn_zero_le _ _ (x, y) n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\n⊢ ∀ (n : ℕ), Integrable ↑(s' n x)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nn : ℕ\n⊢ Integrable ↑(s' n x)\n[PROOFSTEP]\napply (hfx.norm.add hfx.norm).mono' (s' n x).aestronglyMeasurable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nn : ℕ\n⊢ ∀ᵐ (a : β) ∂↑κ x, ‖↑(s' n x) a‖ ≤ ((fun a => ‖f x a‖) + fun a => ‖f x a‖) a\n[PROOFSTEP]\napply eventually_of_forall\n[GOAL]\ncase hp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nn : ℕ\n⊢ ∀ (x_1 : β), ‖↑(s' n x) x_1‖ ≤ ((fun a => ‖f x a‖) + fun a => ‖f x a‖) x_1\n[PROOFSTEP]\nintro y\n[GOAL]\ncase hp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nn : ℕ\ny : β\n⊢ ‖↑(s' n x) y‖ ≤ ((fun a => ‖f x a‖) + fun a => ‖f x a‖) y\n[PROOFSTEP]\nsimp_rw [SimpleFunc.coe_comp]\n[GOAL]\ncase hp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nn : ℕ\ny : β\n⊢ ‖(↑(SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n              (_ : 0 ∈ range (uncurry f) ∪ {0}) n) ∘\n          Prod.mk x)\n        y‖ ≤\n    ((fun a => ‖f x a‖) + fun a => ‖f x a‖) y\n[PROOFSTEP]\nexact SimpleFunc.norm_approxOn_zero_le _ _ (x, y) n\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nthis : ∀ (n : ℕ), Integrable ↑(s' n x)\n⊢ Tendsto (fun i => f' i x) atTop (𝓝 (∫ (y : β), f x y ∂↑κ x))\n[PROOFSTEP]\nsimp only [hfx, SimpleFunc.integral_eq_integral _ (this _), indicator_of_mem, mem_setOf_eq]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nthis : ∀ (n : ℕ), Integrable ↑(s' n x)\n⊢ Tendsto\n    (fun i =>\n      ∫ (x_1 : β),\n        ↑(SimpleFunc.comp\n              (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n                (_ : 0 ∈ range (uncurry f) ∪ {0}) i)\n              (Prod.mk x) (_ : Measurable (Prod.mk x)))\n          x_1 ∂↑κ x)\n    atTop (𝓝 (∫ (y : β), f x y ∂↑κ x))\n[PROOFSTEP]\nrefine'\n  tendsto_integral_of_dominated_convergence (fun y => ‖f x y‖ + ‖f x y‖) (fun n => (s' n x).aestronglyMeasurable)\n    (hfx.norm.add hfx.norm) _ _\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nthis : ∀ (n : ℕ), Integrable ↑(s' n x)\n⊢ ∀ (n : ℕ),\n    ∀ᵐ (a : β) ∂↑κ x,\n      ‖↑(SimpleFunc.comp\n                (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n                  (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n                (Prod.mk x) (_ : Measurable (Prod.mk x)))\n            a‖ ≤\n        (fun y => ‖f x y‖ + ‖f x y‖) a\n[PROOFSTEP]\nexact fun n => eventually_of_forall fun y => SimpleFunc.norm_approxOn_zero_le hf.measurable (by simp) (x, y) n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nthis : ∀ (n : ℕ), Integrable ↑(s' n x)\nn : ℕ\ny : β\n⊢ 0 ∈ range (uncurry f) ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nthis : ∀ (n : ℕ), Integrable ↑(s' n x)\n⊢ ∀ᵐ (a : β) ∂↑κ x,\n    Tendsto\n      (fun n =>\n        ↑(SimpleFunc.comp\n              (SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n                (_ : 0 ∈ range (uncurry f) ∪ {0}) n)\n              (Prod.mk x) (_ : Measurable (Prod.mk x)))\n          a)\n      atTop (𝓝 (f x a))\n[PROOFSTEP]\nrefine' eventually_of_forall fun y => SimpleFunc.tendsto_approxOn hf.measurable (by simp) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nthis : ∀ (n : ℕ), Integrable ↑(s' n x)\ny : β\n⊢ 0 ∈ range (uncurry f) ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nthis : ∀ (n : ℕ), Integrable ↑(s' n x)\ny : β\n⊢ uncurry f (x, y) ∈ closure (range (uncurry f) ∪ {0})\n[PROOFSTEP]\napply subset_closure\n[GOAL]\ncase pos.refine'_2.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\nthis✝ : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : Integrable (f x)\nthis : ∀ (n : ℕ), Integrable ↑(s' n x)\ny : β\n⊢ uncurry f (x, y) ∈ range (uncurry f) ∪ {0}\n[PROOFSTEP]\nsimp [-uncurry_apply_pair]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nx : α\nhfx : ¬Integrable (f x)\n⊢ Tendsto (fun i => f' i x) atTop (𝓝 (∫ (y : β), f x y ∂↑κ x))\n[PROOFSTEP]\nsimp [hfx, integral_undef]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α → β → E\nhf : StronglyMeasurable (uncurry f)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : TopologicalSpace.SeparableSpace ↑(range (uncurry f) ∪ {0})\ns : ℕ → SimpleFunc (α × β) E :=\n  SimpleFunc.approxOn (uncurry f) (_ : Measurable (uncurry f)) (range (uncurry f) ∪ {0}) 0\n    (_ : 0 ∈ range (uncurry f) ∪ {0})\ns' : ℕ → α → SimpleFunc β E := fun n x => SimpleFunc.comp (s n) (Prod.mk x) (_ : Measurable (Prod.mk x))\nf' : ℕ → α → E := fun n => indicator {x | Integrable (f x)} fun x => SimpleFunc.integral (↑κ x) (s' n x)\nhf' : ∀ (n : ℕ), StronglyMeasurable (f' n)\nh2f' : Tendsto f' atTop (𝓝 fun x => ∫ (y : β), f x y ∂↑κ x)\n⊢ StronglyMeasurable fun x => ∫ (y : β), f x y ∂↑κ x\n[PROOFSTEP]\nexact stronglyMeasurable_of_tendsto _ hf' h2f'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α × β → E\nhf : StronglyMeasurable f\n⊢ StronglyMeasurable fun x => ∫ (y : β), f (x, y) ∂↑κ x\n[PROOFSTEP]\nrw [← uncurry_curry f] at hf \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : α × β → E\nhf : StronglyMeasurable (uncurry (curry f))\n⊢ StronglyMeasurable fun x => ∫ (y : β), f (x, y) ∂↑κ x\n[PROOFSTEP]\nexact hf.integral_kernel_prod_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β × γ → E\nhf : StronglyMeasurable f\n⊢ StronglyMeasurable fun x => ∫ (y : γ), f (x, y) ∂↑η (a, x)\n[PROOFSTEP]\nchange StronglyMeasurable ((fun x => ∫ y, (fun u : (α × β) × γ => f (u.1.2, u.2)) (x, y) ∂η x) ∘ fun x => (a, x))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β × γ → E\nhf : StronglyMeasurable f\n⊢ StronglyMeasurable ((fun x => ∫ (y : γ), (fun u => f (u.fst.snd, u.snd)) (x, y) ∂↑η x) ∘ fun x => (a, x))\n[PROOFSTEP]\nrefine' StronglyMeasurable.comp_measurable _ measurable_prod_mk_left\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β × γ → E\nhf : StronglyMeasurable f\n⊢ StronglyMeasurable fun x => ∫ (y : γ), (fun u => f (u.fst.snd, u.snd)) (x, y) ∂↑η x\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β × γ → E\nhf : StronglyMeasurable f\n⊢ MeasurableSpace α\n[PROOFSTEP]\nhave :=\n  MeasureTheory.StronglyMeasurable.integral_kernel_prod_right' (κ := η)\n    (hf.comp_measurable (measurable_fst.snd.prod_mk measurable_snd))\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β × γ → E\nhf : StronglyMeasurable f\nthis : StronglyMeasurable fun x => ∫ (y : γ), (f ∘ fun a => (a.fst.snd, a.snd)) (x, y) ∂↑η x\n⊢ StronglyMeasurable fun x => ∫ (y : γ), (fun u => f (u.fst.snd, u.snd)) (x, y) ∂↑η x\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : β × γ → E\nhf : StronglyMeasurable f\n⊢ MeasurableSpace α\n[PROOFSTEP]\nsimpa using this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : γ × β → E\nhf : StronglyMeasurable f\n⊢ StronglyMeasurable fun y => ∫ (x : γ), f (x, y) ∂↑η (a, y)\n[PROOFSTEP]\nchange StronglyMeasurable ((fun y => ∫ x, (fun u : γ × α × β => f (u.1, u.2.2)) (x, y) ∂η y) ∘ fun x => (a, x))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : γ × β → E\nhf : StronglyMeasurable f\n⊢ StronglyMeasurable ((fun y => ∫ (x : γ), (fun u => f (u.fst, u.snd.snd)) (x, y) ∂↑η y) ∘ fun x => (a, x))\n[PROOFSTEP]\nrefine' StronglyMeasurable.comp_measurable _ measurable_prod_mk_left\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : γ × β → E\nhf : StronglyMeasurable f\n⊢ StronglyMeasurable fun y => ∫ (x : γ), (fun u => f (u.fst, u.snd.snd)) (x, y) ∂↑η y\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : γ × β → E\nhf : StronglyMeasurable f\n⊢ MeasurableSpace α\n[PROOFSTEP]\nhave :=\n  MeasureTheory.StronglyMeasurable.integral_kernel_prod_left' (κ := η)\n    (hf.comp_measurable (measurable_fst.prod_mk measurable_snd.snd))\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : γ × β → E\nhf : StronglyMeasurable f\nthis : StronglyMeasurable fun y => ∫ (x : γ), (f ∘ fun a => (a.fst, a.snd.snd)) (x, y) ∂↑η y\n⊢ StronglyMeasurable fun y => ∫ (x : γ), (fun u => f (u.fst, u.snd.snd)) (x, y) ∂↑η y\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nmα : MeasurableSpace α\nmβ : MeasurableSpace β\nmγ : MeasurableSpace γ\nκ : { x // x ∈ kernel α β }\nη : { x // x ∈ kernel (α × β) γ }\na : α\nE : Type u_4\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : CompleteSpace E\ninst✝¹ : IsSFiniteKernel κ\ninst✝ : IsSFiniteKernel η\nf : γ × β → E\nhf : StronglyMeasurable f\n⊢ MeasurableSpace α\n[PROOFSTEP]\nsimpa using this\n", "meta": {"mathlib_filename": "Mathlib.Probability.Kernel.MeasurableIntegral", "llama_tokens": 61072, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6150878555160665, "lm_q2_score": 0.6076631698328917, "lm_q1q2_score": 0.37376623600860864}}
{"text": "[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝³ : CommRing R\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : R\nhx : IsIntegral O x\np : O[X]\nhpm : Monic p\nhpx : eval₂ (algebraMap O R) x p = 0\nhvx : 1 < ↑v x\n⊢ False\n[PROOFSTEP]\nrw [hpm.as_sum, eval₂_add, eval₂_pow, eval₂_X, eval₂_finset_sum, add_eq_zero_iff_eq_neg] at hpx \n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝³ : CommRing R\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : R\nhx : IsIntegral O x\np : O[X]\nhpm : Monic p\nhpx : x ^ natDegree p = -∑ i in Finset.range (natDegree p), eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i)\nhvx : 1 < ↑v x\n⊢ False\n[PROOFSTEP]\nreplace hpx := congr_arg v hpx\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝³ : CommRing R\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : R\nhx : IsIntegral O x\np : O[X]\nhpm : Monic p\nhvx : 1 < ↑v x\nhpx : ↑v (x ^ natDegree p) = ↑v (-∑ i in Finset.range (natDegree p), eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i))\n⊢ False\n[PROOFSTEP]\nrefine' ne_of_gt _ hpx\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝³ : CommRing R\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : R\nhx : IsIntegral O x\np : O[X]\nhpm : Monic p\nhvx : 1 < ↑v x\nhpx : ↑v (x ^ natDegree p) = ↑v (-∑ i in Finset.range (natDegree p), eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i))\n⊢ ↑v (-∑ i in Finset.range (natDegree p), eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i)) < ↑v (x ^ natDegree p)\n[PROOFSTEP]\nrw [v.map_neg, v.map_pow]\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝³ : CommRing R\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : R\nhx : IsIntegral O x\np : O[X]\nhpm : Monic p\nhvx : 1 < ↑v x\nhpx : ↑v (x ^ natDegree p) = ↑v (-∑ i in Finset.range (natDegree p), eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i))\n⊢ ↑v (∑ i in Finset.range (natDegree p), eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i)) < ↑v x ^ natDegree p\n[PROOFSTEP]\nrefine' v.map_sum_lt' (zero_lt_one.trans_le (one_le_pow_of_one_le' hvx.le _)) fun i hi => _\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝³ : CommRing R\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : R\nhx : IsIntegral O x\np : O[X]\nhpm : Monic p\nhvx : 1 < ↑v x\nhpx : ↑v (x ^ natDegree p) = ↑v (-∑ i in Finset.range (natDegree p), eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i))\ni : ℕ\nhi : i ∈ Finset.range (natDegree p)\n⊢ ↑v (eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i)) < ↑v x ^ natDegree p\n[PROOFSTEP]\nrw [eval₂_mul, eval₂_pow, eval₂_C, eval₂_X, v.map_mul, v.map_pow, ← one_mul (v x ^ p.natDegree)]\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝³ : CommRing R\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : R\nhx : IsIntegral O x\np : O[X]\nhpm : Monic p\nhvx : 1 < ↑v x\nhpx : ↑v (x ^ natDegree p) = ↑v (-∑ i in Finset.range (natDegree p), eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i))\ni : ℕ\nhi : i ∈ Finset.range (natDegree p)\n⊢ ↑v (↑(algebraMap O R) (coeff p i)) * ↑v x ^ i < 1 * ↑v x ^ natDegree p\n[PROOFSTEP]\ncases' (hv.2 <| p.coeff i).lt_or_eq with hvpi hvpi\n[GOAL]\ncase inl\nR : Type u\nΓ₀ : Type v\ninst✝³ : CommRing R\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : R\nhx : IsIntegral O x\np : O[X]\nhpm : Monic p\nhvx : 1 < ↑v x\nhpx : ↑v (x ^ natDegree p) = ↑v (-∑ i in Finset.range (natDegree p), eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i))\ni : ℕ\nhi : i ∈ Finset.range (natDegree p)\nhvpi : ↑v (↑(algebraMap O R) (coeff p i)) < 1\n⊢ ↑v (↑(algebraMap O R) (coeff p i)) * ↑v x ^ i < 1 * ↑v x ^ natDegree p\n[PROOFSTEP]\nexact mul_lt_mul₀ hvpi (pow_lt_pow₀ hvx <| Finset.mem_range.1 hi)\n[GOAL]\ncase inr\nR : Type u\nΓ₀ : Type v\ninst✝³ : CommRing R\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : R\nhx : IsIntegral O x\np : O[X]\nhpm : Monic p\nhvx : 1 < ↑v x\nhpx : ↑v (x ^ natDegree p) = ↑v (-∑ i in Finset.range (natDegree p), eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i))\ni : ℕ\nhi : i ∈ Finset.range (natDegree p)\nhvpi : ↑v (↑(algebraMap O R) (coeff p i)) = 1\n⊢ ↑v (↑(algebraMap O R) (coeff p i)) * ↑v x ^ i < 1 * ↑v x ^ natDegree p\n[PROOFSTEP]\nerw [hvpi]\n[GOAL]\ncase inr\nR : Type u\nΓ₀ : Type v\ninst✝³ : CommRing R\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : R\nhx : IsIntegral O x\np : O[X]\nhpm : Monic p\nhvx : 1 < ↑v x\nhpx : ↑v (x ^ natDegree p) = ↑v (-∑ i in Finset.range (natDegree p), eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i))\ni : ℕ\nhi : i ∈ Finset.range (natDegree p)\nhvpi : ↑v (↑(algebraMap O R) (coeff p i)) = 1\n⊢ 1 * ↑v x ^ i < 1 * ↑v x ^ natDegree p\n[PROOFSTEP]\nrw [one_mul, one_mul]\n[GOAL]\ncase inr\nR : Type u\nΓ₀ : Type v\ninst✝³ : CommRing R\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : R\nhx : IsIntegral O x\np : O[X]\nhpm : Monic p\nhvx : 1 < ↑v x\nhpx : ↑v (x ^ natDegree p) = ↑v (-∑ i in Finset.range (natDegree p), eval₂ (algebraMap O R) x (↑C (coeff p i) * X ^ i))\ni : ℕ\nhi : i ∈ Finset.range (natDegree p)\nhvpi : ↑v (↑(algebraMap O R) (coeff p i)) = 1\n⊢ ↑v x ^ i < ↑v x ^ natDegree p\n[PROOFSTEP]\nexact pow_lt_pow₀ hvx (Finset.mem_range.1 hi)\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Valuation.Integral", "llama_tokens": 2935, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7248702761768248, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.3737575507124134}}
{"text": "[GOAL]\nα : Type u\nβ : α → Type v\nm : Multiset ((a : α) × β a)\n⊢ Nodup (keys m) ↔ NodupKeys m\n[PROOFSTEP]\nrcases m with ⟨l⟩\n[GOAL]\ncase mk\nα : Type u\nβ : α → Type v\nm : Multiset ((a : α) × β a)\nl : List ((a : α) × β a)\n⊢ Nodup (keys (Quot.mk Setoid.r l)) ↔ NodupKeys (Quot.mk Setoid.r l)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : α → Type v\ns₁ s₂ : AList β\n⊢ ⟦s₁⟧ = ⟦s₂⟧ ↔ s₁.entries ~ s₂.entries\n[PROOFSTEP]\ncases s₁\n[GOAL]\ncase mk\nα : Type u\nβ : α → Type v\ns₂ : AList β\nentries✝ : List (Sigma β)\nnodupKeys✝ : NodupKeys entries✝\n⊢ ⟦{ entries := entries✝, nodupKeys := nodupKeys✝ }⟧ = ⟦s₂⟧ ↔\n    { entries := entries✝, nodupKeys := nodupKeys✝ }.entries ~ s₂.entries\n[PROOFSTEP]\ncases s₂\n[GOAL]\ncase mk.mk\nα : Type u\nβ : α → Type v\nentries✝¹ : List (Sigma β)\nnodupKeys✝¹ : NodupKeys entries✝¹\nentries✝ : List (Sigma β)\nnodupKeys✝ : NodupKeys entries✝\n⊢ ⟦{ entries := entries✝¹, nodupKeys := nodupKeys✝¹ }⟧ = ⟦{ entries := entries✝, nodupKeys := nodupKeys✝ }⟧ ↔\n    { entries := entries✝¹, nodupKeys := nodupKeys✝¹ }.entries ~\n      { entries := entries✝, nodupKeys := nodupKeys✝ }.entries\n[PROOFSTEP]\nsimp [AList.toFinmap]\n[GOAL]\nα : Type u\nβ : α → Type v\nγ : Sort ?u.11051\ns : Finmap β\nf : AList β → γ\nH : ∀ (a b : AList β), a.entries ~ b.entries → f a = f b\n⊢ γ\n[PROOFSTEP]\nrefine'\n  (Quotient.liftOn s.entries (fun (l : List (Sigma β)) => (⟨_, fun nd => f ⟨l, nd⟩⟩ : Part γ))\n          (fun l₁ l₂ p => Part.ext' (perm_nodupKeys p) _) :\n        Part γ).get\n    _\n[GOAL]\ncase refine'_1\nα : Type u\nβ : α → Type v\nγ : Type ?u.11103\ns : Finmap β\nf : AList β → γ\nH : ∀ (a b : AList β), a.entries ~ b.entries → f a = f b\nl₁ l₂ : List (Sigma β)\np : l₁ ≈ l₂\n⊢ ∀ (h₁ : ((fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } }) l₁).Dom)\n    (h₂ : ((fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } }) l₂).Dom),\n    Part.get ((fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } }) l₁) h₁ =\n      Part.get ((fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } }) l₂) h₂\n[PROOFSTEP]\nexact fun h1 h2 => H _ _ p\n[GOAL]\ncase refine'_2\nα : Type u\nβ : α → Type v\nγ : Type ?u.11103\ns : Finmap β\nf : AList β → γ\nH : ∀ (a b : AList β), a.entries ~ b.entries → f a = f b\n⊢ (Quotient.liftOn s.entries (fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } })\n      (_ :\n        ∀ (l₁ l₂ : List (Sigma β)),\n          l₁ ≈ l₂ →\n            (fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } }) l₁ =\n              (fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } }) l₂)).Dom\n[PROOFSTEP]\nhave := s.nodupKeys\n[GOAL]\ncase refine'_2\nα : Type u\nβ : α → Type v\nγ : Type ?u.11103\ns : Finmap β\nf : AList β → γ\nH : ∀ (a b : AList β), a.entries ~ b.entries → f a = f b\nthis : Multiset.NodupKeys s.entries\n⊢ (Quotient.liftOn s.entries (fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } })\n      (_ :\n        ∀ (l₁ l₂ : List (Sigma β)),\n          l₁ ≈ l₂ →\n            (fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } }) l₁ =\n              (fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } }) l₂)).Dom\n[PROOFSTEP]\nrevert this\n[GOAL]\ncase refine'_2\nα : Type u\nβ : α → Type v\nγ : Type ?u.11103\ns : Finmap β\nf : AList β → γ\nH : ∀ (a b : AList β), a.entries ~ b.entries → f a = f b\n⊢ Multiset.NodupKeys s.entries →\n    (Quotient.liftOn s.entries (fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } })\n        (_ :\n          ∀ (l₁ l₂ : List (Sigma β)),\n            l₁ ≈ l₂ →\n              (fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } }) l₁ =\n                (fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } }) l₂)).Dom\n[PROOFSTEP]\nrcases s.entries with ⟨l⟩\n[GOAL]\ncase refine'_2.mk\nα : Type u\nβ : α → Type v\nγ : Type ?u.11103\ns : Finmap β\nf : AList β → γ\nH : ∀ (a b : AList β), a.entries ~ b.entries → f a = f b\nx✝ : Multiset (Sigma β)\nl : List (Sigma β)\n⊢ Multiset.NodupKeys (Quot.mk Setoid.r l) →\n    (Quotient.liftOn (Quot.mk Setoid.r l)\n        (fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } })\n        (_ :\n          ∀ (l₁ l₂ : List (Sigma β)),\n            l₁ ≈ l₂ →\n              (fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } }) l₁ =\n                (fun l => { Dom := NodupKeys l, get := fun nd => f { entries := l, nodupKeys := nd } }) l₂)).Dom\n[PROOFSTEP]\nexact id\n[GOAL]\nα : Type u\nβ : α → Type v\nγ : Type u_1\ns : AList β\nf : AList β → γ\nH : ∀ (a b : AList β), a.entries ~ b.entries → f a = f b\n⊢ liftOn ⟦s⟧ f H = f s\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk\nα : Type u\nβ : α → Type v\nγ : Type u_1\nf : AList β → γ\nH : ∀ (a b : AList β), a.entries ~ b.entries → f a = f b\nentries✝ : List (Sigma β)\nnodupKeys✝ : NodupKeys entries✝\n⊢ liftOn ⟦{ entries := entries✝, nodupKeys := nodupKeys✝ }⟧ f H = f { entries := entries✝, nodupKeys := nodupKeys✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : α → Type v\nγ : Type ?u.20104\ns₁ s₂ : Finmap β\nf : AList β → AList β → γ\nH : ∀ (a₁ b₁ a₂ b₂ : AList β), a₁.entries ~ a₂.entries → b₁.entries ~ b₂.entries → f a₁ b₁ = f a₂ b₂\na₁ a₂ : AList β\np : a₁.entries ~ a₂.entries\n⊢ (fun l₁ => liftOn s₂ (f l₁) (_ : ∀ (b₁ b₂ : AList β), b₁.entries ~ b₂.entries → f l₁ b₁ = f l₁ b₂)) a₁ =\n    (fun l₁ => liftOn s₂ (f l₁) (_ : ∀ (b₁ b₂ : AList β), b₁.entries ~ b₂.entries → f l₁ b₁ = f l₁ b₂)) a₂\n[PROOFSTEP]\nhave H' : f a₁ = f a₂ := funext fun _ => H _ _ _ _ p (Perm.refl _)\n[GOAL]\nα : Type u\nβ : α → Type v\nγ : Type ?u.20104\ns₁ s₂ : Finmap β\nf : AList β → AList β → γ\nH : ∀ (a₁ b₁ a₂ b₂ : AList β), a₁.entries ~ a₂.entries → b₁.entries ~ b₂.entries → f a₁ b₁ = f a₂ b₂\na₁ a₂ : AList β\np : a₁.entries ~ a₂.entries\nH' : f a₁ = f a₂\n⊢ (fun l₁ => liftOn s₂ (f l₁) (_ : ∀ (b₁ b₂ : AList β), b₁.entries ~ b₂.entries → f l₁ b₁ = f l₁ b₂)) a₁ =\n    (fun l₁ => liftOn s₂ (f l₁) (_ : ∀ (b₁ b₂ : AList β), b₁.entries ~ b₂.entries → f l₁ b₁ = f l₁ b₂)) a₂\n[PROOFSTEP]\nsimp only [H']\n[GOAL]\nα : Type u\nβ : α → Type v\nγ : Type u_1\ns₁ s₂ : AList β\nf : AList β → AList β → γ\nH : ∀ (a₁ b₁ a₂ b₂ : AList β), a₁.entries ~ a₂.entries → b₁.entries ~ b₂.entries → f a₁ b₁ = f a₂ b₂\n⊢ liftOn₂ ⟦s₁⟧ ⟦s₂⟧ f H = f s₁ s₂\n[PROOFSTEP]\ncases s₁\n[GOAL]\ncase mk\nα : Type u\nβ : α → Type v\nγ : Type u_1\ns₂ : AList β\nf : AList β → AList β → γ\nH : ∀ (a₁ b₁ a₂ b₂ : AList β), a₁.entries ~ a₂.entries → b₁.entries ~ b₂.entries → f a₁ b₁ = f a₂ b₂\nentries✝ : List (Sigma β)\nnodupKeys✝ : NodupKeys entries✝\n⊢ liftOn₂ ⟦{ entries := entries✝, nodupKeys := nodupKeys✝ }⟧ ⟦s₂⟧ f H =\n    f { entries := entries✝, nodupKeys := nodupKeys✝ } s₂\n[PROOFSTEP]\ncases s₂\n[GOAL]\ncase mk.mk\nα : Type u\nβ : α → Type v\nγ : Type u_1\nf : AList β → AList β → γ\nH : ∀ (a₁ b₁ a₂ b₂ : AList β), a₁.entries ~ a₂.entries → b₁.entries ~ b₂.entries → f a₁ b₁ = f a₂ b₂\nentries✝¹ : List (Sigma β)\nnodupKeys✝¹ : NodupKeys entries✝¹\nentries✝ : List (Sigma β)\nnodupKeys✝ : NodupKeys entries✝\n⊢ liftOn₂ ⟦{ entries := entries✝¹, nodupKeys := nodupKeys✝¹ }⟧ ⟦{ entries := entries✝, nodupKeys := nodupKeys✝ }⟧ f H =\n    f { entries := entries✝¹, nodupKeys := nodupKeys✝¹ } { entries := entries✝, nodupKeys := nodupKeys✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : α → Type v\nC : Finmap β → Prop\ns : Finmap β\nH : ∀ (a : AList β), C ⟦a⟧\n⊢ C s\n[PROOFSTEP]\nrcases s with ⟨⟨a⟩, h⟩\n[GOAL]\ncase mk.mk\nα : Type u\nβ : α → Type v\nC : Finmap β → Prop\nH : ∀ (a : AList β), C ⟦a⟧\nentries✝ : Multiset (Sigma β)\na : List (Sigma β)\nh : Multiset.NodupKeys (Quot.mk Setoid.r a)\n⊢ C { entries := Quot.mk Setoid.r a, nodupKeys := h }\n[PROOFSTEP]\nexact H ⟨a, h⟩\n[GOAL]\nα : Type u\nβ : α → Type v\nl₁ : Multiset (Sigma β)\nh₁ : Multiset.NodupKeys l₁\nl₂ : Multiset (Sigma β)\nnodupKeys✝ : Multiset.NodupKeys l₂\nH : { entries := l₁, nodupKeys := h₁ }.entries = { entries := l₂, nodupKeys := nodupKeys✝ }.entries\n⊢ { entries := l₁, nodupKeys := h₁ } = { entries := l₂, nodupKeys := nodupKeys✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u\nβ : α → Type v\ns₁ s₂ : AList β\n⊢ keys ⟦s₁⟧ = keys ⟦s₂⟧ ↔ AList.keys s₁ ~ AList.keys s₂\n[PROOFSTEP]\nsimp [keys, AList.keys]\n[GOAL]\nα : Type u\nβ : α → Type v\nx y : α\nb : β y\n⊢ x ∈ singleton y b ↔ x = y\n[PROOFSTEP]\nsimp only [singleton]\n[GOAL]\nα : Type u\nβ : α → Type v\nx y : α\nb : β y\n⊢ x ∈ ⟦AList.singleton y b⟧ ↔ x = y\n[PROOFSTEP]\nerw [mem_cons, mem_nil_iff, or_false_iff]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\ns : List (Sigma β)\n⊢ lookup a (List.toFinmap s) = dlookup a s\n[PROOFSTEP]\nrw [List.toFinmap, lookup_toFinmap, lookup_to_alist]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns : Finmap β\na : α\nb : β a\n⊢ b ∈ lookup a s ↔ { fst := a, snd := b } ∈ s.entries\n[PROOFSTEP]\nrcases s with ⟨⟨l⟩, hl⟩\n[GOAL]\ncase mk.mk\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\nentries✝ : Multiset (Sigma β)\nl : List (Sigma β)\nhl : Multiset.NodupKeys (Quot.mk Setoid.r l)\n⊢ b ∈ lookup a { entries := Quot.mk Setoid.r l, nodupKeys := hl } ↔\n    { fst := a, snd := b } ∈ { entries := Quot.mk Setoid.r l, nodupKeys := hl }.entries\n[PROOFSTEP]\nexact List.mem_dlookup_iff hl\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns : Finmap β\n⊢ (Finset.sigma (keys s) fun i => Option.toFinset (lookup i s)) =\n    { val := s.entries, nodup := (_ : Multiset.Nodup s.entries) }\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns : Finmap β\nx : (i : α) × β i\n⊢ (x ∈ Finset.sigma (keys s) fun i => Option.toFinset (lookup i s)) ↔\n    x ∈ { val := s.entries, nodup := (_ : Multiset.Nodup s.entries) }\n[PROOFSTEP]\nhave : x ∈ s.entries → x.1 ∈ s.keys := Multiset.mem_map_of_mem _\n[GOAL]\ncase a\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns : Finmap β\nx : (i : α) × β i\nthis : x ∈ s.entries → x.fst ∈ keys s\n⊢ (x ∈ Finset.sigma (keys s) fun i => Option.toFinset (lookup i s)) ↔\n    x ∈ { val := s.entries, nodup := (_ : Multiset.Nodup s.entries) }\n[PROOFSTEP]\nsimpa [lookup_eq_some_iff]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\n⊢ lookup a (singleton a b) = some b\n[PROOFSTEP]\nrw [singleton, lookup_toFinmap, AList.singleton, AList.lookup, dlookup_cons_eq]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ s₂✝ : Finmap β\ns₁ s₂ : AList β\nh : ∀ (x : α), lookup x ⟦s₁⟧ = lookup x ⟦s₂⟧\n⊢ ⟦s₁⟧ = ⟦s₂⟧\n[PROOFSTEP]\nsimp only [AList.lookup, lookup_toFinmap] at h \n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ s₂✝ : Finmap β\ns₁ s₂ : AList β\nh : ∀ (x : α), dlookup x s₁.entries = dlookup x s₂.entries\n⊢ ⟦s₁⟧ = ⟦s₂⟧\n[PROOFSTEP]\nrw [AList.toFinmap_eq]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ s₂✝ : Finmap β\ns₁ s₂ : AList β\nh : ∀ (x : α), dlookup x s₁.entries = dlookup x s₂.entries\n⊢ s₁.entries ~ s₂.entries\n[PROOFSTEP]\napply lookup_ext s₁.nodupKeys s₂.nodupKeys\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ s₂✝ : Finmap β\ns₁ s₂ : AList β\nh : ∀ (x : α), dlookup x s₁.entries = dlookup x s₂.entries\n⊢ ∀ (x : α) (y : β x), y ∈ dlookup x s₁.entries ↔ y ∈ dlookup x s₂.entries\n[PROOFSTEP]\nintro x y\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ s₂✝ : Finmap β\ns₁ s₂ : AList β\nh : ∀ (x : α), dlookup x s₁.entries = dlookup x s₂.entries\nx : α\ny : β x\n⊢ y ∈ dlookup x s₁.entries ↔ y ∈ dlookup x s₂.entries\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nf : { f // ∀ (i : α), Option.isSome (Prod.snd f i) = true ↔ i ∈ f.fst }\n⊢ Multiset.NodupKeys (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val\n[PROOFSTEP]\nrefine Multiset.nodup_keys.1 ((Finset.nodup _).map_on ?_)\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nf : { f // ∀ (i : α), Option.isSome (Prod.snd f i) = true ↔ i ∈ f.fst }\n⊢ ∀ (x : (a : α) × β a),\n    x ∈ (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val →\n      ∀ (y : (a : α) × β a),\n        y ∈ (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val → x.fst = y.fst → x = y\n[PROOFSTEP]\nsimp only [Finset.mem_val, Finset.mem_sigma, Option.mem_toFinset, Option.mem_def]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nf : { f // ∀ (i : α), Option.isSome (Prod.snd f i) = true ↔ i ∈ f.fst }\n⊢ ∀ (x : (a : α) × β a),\n    x.fst ∈ (↑f).fst ∧ Prod.snd (↑f) x.fst = some x.snd →\n      ∀ (y : (a : α) × β a), y.fst ∈ (↑f).fst ∧ Prod.snd (↑f) y.fst = some y.snd → x.fst = y.fst → x = y\n[PROOFSTEP]\nrintro ⟨i, x⟩ ⟨_, hx⟩ ⟨j, y⟩ ⟨_, hy⟩ (rfl : i = j)\n[GOAL]\ncase mk.intro.mk.intro\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nf : { f // ∀ (i : α), Option.isSome (Prod.snd f i) = true ↔ i ∈ f.fst }\ni : α\nx : β i\nleft✝¹ : { fst := i, snd := x }.fst ∈ (↑f).fst\nhx : Prod.snd ↑f { fst := i, snd := x }.fst = some { fst := i, snd := x }.snd\ny : β i\nleft✝ : { fst := i, snd := y }.fst ∈ (↑f).fst\nhy : Prod.snd ↑f { fst := i, snd := y }.fst = some { fst := i, snd := y }.snd\n⊢ { fst := i, snd := x } = { fst := i, snd := y }\n[PROOFSTEP]\nsimpa using hx.symm.trans hy\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nf : Finmap β\n⊢ ((fun f =>\n          { entries := (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val,\n            nodupKeys :=\n              (_ : Multiset.NodupKeys (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val) })\n        ((fun s =>\n            { val := (keys s, fun i => lookup i s),\n              property := (_ : ∀ (x : α), Option.isSome (lookup x s) = true ↔ x ∈ s) })\n          f)).entries =\n    f.entries\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nx✝ : { f // ∀ (i : α), Option.isSome (Prod.snd f i) = true ↔ i ∈ f.fst }\ns : Finset α\nf : (a : α) → Option (β a)\nhf : ∀ (i : α), Option.isSome (Prod.snd (s, f) i) = true ↔ i ∈ (s, f).fst\n⊢ (fun s =>\n        { val := (keys s, fun i => lookup i s),\n          property := (_ : ∀ (x : α), Option.isSome (lookup x s) = true ↔ x ∈ s) })\n      ((fun f =>\n          { entries := (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val,\n            nodupKeys :=\n              (_ : Multiset.NodupKeys (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val) })\n        { val := (s, f), property := hf }) =\n    { val := (s, f), property := hf }\n[PROOFSTEP]\ndsimp only at hf \n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nx✝ : { f // ∀ (i : α), Option.isSome (Prod.snd f i) = true ↔ i ∈ f.fst }\ns : Finset α\nf : (a : α) → Option (β a)\nhf : ∀ (i : α), Option.isSome (f i) = true ↔ i ∈ s\n⊢ (fun s =>\n        { val := (keys s, fun i => lookup i s),\n          property := (_ : ∀ (x : α), Option.isSome (lookup x s) = true ↔ x ∈ s) })\n      ((fun f =>\n          { entries := (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val,\n            nodupKeys :=\n              (_ : Multiset.NodupKeys (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val) })\n        { val := (s, f), property := hf }) =\n    { val := (s, f), property := hf }\n[PROOFSTEP]\next\n[GOAL]\ncase a.h₁.a\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nx✝ : { f // ∀ (i : α), Option.isSome (Prod.snd f i) = true ↔ i ∈ f.fst }\ns : Finset α\nf : (a : α) → Option (β a)\nhf : ∀ (i : α), Option.isSome (f i) = true ↔ i ∈ s\na✝ : α\n⊢ a✝ ∈\n      (↑((fun s =>\n              { val := (keys s, fun i => lookup i s),\n                property := (_ : ∀ (x : α), Option.isSome (lookup x s) = true ↔ x ∈ s) })\n            ((fun f =>\n                { entries := (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val,\n                  nodupKeys :=\n                    (_ : Multiset.NodupKeys (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val) })\n              { val := (s, f), property := hf }))).fst ↔\n    a✝ ∈ (↑{ val := (s, f), property := hf }).fst\n[PROOFSTEP]\nsimp [keys, Multiset.keys, ← hf, Option.isSome_iff_exists]\n[GOAL]\ncase a.h₂.h.a\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nx✝¹ : { f // ∀ (i : α), Option.isSome (Prod.snd f i) = true ↔ i ∈ f.fst }\ns : Finset α\nf : (a : α) → Option (β a)\nhf : ∀ (i : α), Option.isSome (f i) = true ↔ i ∈ s\nx✝ : α\na✝ : β x✝\n⊢ a✝ ∈\n      Prod.snd\n        (↑((fun s =>\n              { val := (keys s, fun i => lookup i s),\n                property := (_ : ∀ (x : α), Option.isSome (lookup x s) = true ↔ x ∈ s) })\n            ((fun f =>\n                { entries := (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val,\n                  nodupKeys :=\n                    (_ : Multiset.NodupKeys (Finset.sigma (↑f).fst fun i => Option.toFinset (Prod.snd (↑f) i)).val) })\n              { val := (s, f), property := hf })))\n        x✝ ↔\n    a✝ ∈ Prod.snd (↑{ val := (s, f), property := hf }) x✝\n[PROOFSTEP]\nsimp (config := { contextual := true }) [lookup_eq_some_iff, ← hf]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nx✝ : Finmap fun a => β a\n⊢ keys (↑keysLookupEquiv.symm (↑keysLookupEquiv x✝)) = (↑(↑keysLookupEquiv x✝)).fst\n[PROOFSTEP]\nsimp only [Equiv.symm_apply_apply, keysLookupEquiv_apply_coe_fst]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nx✝¹ : Finmap fun a => β a\nx✝ : α\n⊢ lookup x✝ (↑keysLookupEquiv.symm (↑keysLookupEquiv x✝¹)) = Prod.snd (↑(↑keysLookupEquiv x✝¹)) x✝\n[PROOFSTEP]\nsimp only [Equiv.symm_apply_apply, keysLookupEquiv_apply_coe_snd]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\ns : AList β\n⊢ replace a b ⟦s⟧ = ⟦AList.replace a b s⟧\n[PROOFSTEP]\nsimp [replace]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\ns✝ : Finmap β\ns : AList β\n⊢ keys (replace a b ⟦s⟧) = keys ⟦s⟧\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na a' : α\nb : β a\ns✝ : Finmap β\ns : AList β\n⊢ a' ∈ replace a b ⟦s⟧ ↔ a' ∈ ⟦s⟧\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\nf : (x : α) → β x → Bool\ns : Finmap β\nx✝³ : Bool\nx✝² : α\nx✝¹ : β x✝²\nx✝ : α\n⊢ ∀ (b₂ : β x✝),\n    (fun x y z => x || f y z) ((fun x y z => x || f y z) x✝³ x✝² x✝¹) x✝ b₂ =\n      (fun x y z => x || f y z) ((fun x y z => x || f y z) x✝³ x✝ b₂) x✝² x✝¹\n[PROOFSTEP]\nsimp_rw [Bool.or_assoc, Bool.or_comm, imp_true_iff]\n[GOAL]\nα : Type u\nβ : α → Type v\nf : (x : α) → β x → Bool\ns : Finmap β\nx✝³ : Bool\nx✝² : α\nx✝¹ : β x✝²\nx✝ : α\n⊢ ∀ (b₂ : β x✝),\n    (fun x y z => x && f y z) ((fun x y z => x && f y z) x✝³ x✝² x✝¹) x✝ b₂ =\n      (fun x y z => x && f y z) ((fun x y z => x && f y z) x✝³ x✝ b₂) x✝² x✝¹\n[PROOFSTEP]\nsimp_rw [Bool.and_assoc, Bool.and_comm, imp_true_iff]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\ns : AList β\n⊢ erase a ⟦s⟧ = ⟦AList.erase a s⟧\n[PROOFSTEP]\nsimp [erase]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\ns : AList β\n⊢ keys ⟦AList.erase a s⟧ = Finset.erase (keys ⟦s⟧) a\n[PROOFSTEP]\nsimp [Finset.erase, keys, AList.erase, keys_kerase]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\ns✝ : Finmap β\ns : AList β\n⊢ keys (erase a ⟦s⟧) = Finset.erase (keys ⟦s⟧) a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na a' : α\ns✝ : Finmap β\ns : AList β\n⊢ a' ∈ erase a ⟦s⟧ ↔ a' ≠ a ∧ a' ∈ ⟦s⟧\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\ns : Finmap β\n⊢ ¬a ∈ erase a s\n[PROOFSTEP]\nrw [mem_erase, not_and_or, not_not]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\ns : Finmap β\n⊢ a = a ∨ ¬a ∈ s\n[PROOFSTEP]\nleft\n[GOAL]\ncase h\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\ns : Finmap β\n⊢ a = a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na a' : α\ns✝ : Finmap β\ns : AList β\n⊢ (erase a (erase a' ⟦s⟧)).entries = (erase a' (erase a ⟦s⟧)).entries\n[PROOFSTEP]\nsimp only [AList.erase_erase, erase_toFinmap]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\ns : AList β\n⊢ insert a b ⟦s⟧ = ⟦AList.insert a b s⟧\n[PROOFSTEP]\nsimp [insert]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\ns✝ : Finmap β\ns : AList β\nh : ¬a ∈ ⟦s⟧\n⊢ (insert a b ⟦s⟧).entries = { fst := a, snd := b } ::ₘ ⟦s⟧.entries\n[PROOFSTEP]\nsimp [AList.insert_entries_of_neg (mt mem_toFinmap.1 h), -insert_entries]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\ns✝ : Finmap β\ns : AList β\n⊢ lookup a (insert a b ⟦s⟧) = some b\n[PROOFSTEP]\nsimp only [insert_toFinmap, lookup_toFinmap, AList.lookup_insert]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na a' : α\nb : β a\ns✝ : Finmap β\nh : a' ≠ a\ns : AList β\n⊢ lookup a' (insert a b ⟦s⟧) = lookup a' ⟦s⟧\n[PROOFSTEP]\nsimp only [insert_toFinmap, lookup_toFinmap, lookup_insert_ne h]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb b' : β a\ns✝ : Finmap β\ns : AList β\n⊢ insert a b' (insert a b ⟦s⟧) = insert a b' ⟦s⟧\n[PROOFSTEP]\nsimp only [insert_toFinmap, AList.insert_insert]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na a' : α\nb : β a\nb' : β a'\ns✝ : Finmap β\nh : a ≠ a'\ns : AList β\n⊢ insert a' b' (insert a b ⟦s⟧) = insert a b (insert a' b' ⟦s⟧)\n[PROOFSTEP]\nsimp only [insert_toFinmap, AList.toFinmap_eq, AList.insert_insert_of_ne _ h]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nxs : List (Sigma β)\n⊢ a ∈ List.toFinmap xs ↔ ∃ b, { fst := a, snd := b } ∈ xs\n[PROOFSTEP]\ninduction' xs with x xs\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\n⊢ a ∈ List.toFinmap [] ↔ ∃ b, { fst := a, snd := b } ∈ []\n[PROOFSTEP]\nsimp only [toFinmap_nil, not_mem_empty, find?, not_mem_nil, exists_false]\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nx : Sigma β\nxs : List (Sigma β)\ntail_ih✝ : a ∈ List.toFinmap xs ↔ ∃ b, { fst := a, snd := b } ∈ xs\n⊢ a ∈ List.toFinmap (x :: xs) ↔ ∃ b, { fst := a, snd := b } ∈ x :: xs\n[PROOFSTEP]\ncases' x with fst_i snd_i\n[GOAL]\ncase cons.mk\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nxs : List (Sigma β)\ntail_ih✝ : a ∈ List.toFinmap xs ↔ ∃ b, { fst := a, snd := b } ∈ xs\nfst_i : α\nsnd_i : β fst_i\n⊢ a ∈ List.toFinmap ({ fst := fst_i, snd := snd_i } :: xs) ↔\n    ∃ b, { fst := a, snd := b } ∈ { fst := fst_i, snd := snd_i } :: xs\n[PROOFSTEP]\nsimp only [toFinmap_cons, *, exists_or, mem_cons, mem_insert, exists_and_left, Sigma.mk.inj_iff]\n[GOAL]\ncase cons.mk\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nxs : List (Sigma β)\ntail_ih✝ : a ∈ List.toFinmap xs ↔ ∃ b, { fst := a, snd := b } ∈ xs\nfst_i : α\nsnd_i : β fst_i\n⊢ (a = fst_i ∨ ∃ b, { fst := a, snd := b } ∈ xs) ↔ (a = fst_i ∧ ∃ x, HEq x snd_i) ∨ ∃ x, { fst := a, snd := x } ∈ xs\n[PROOFSTEP]\nrefine (or_congr_left <| and_iff_left_of_imp ?_).symm\n[GOAL]\ncase cons.mk\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nxs : List (Sigma β)\ntail_ih✝ : a ∈ List.toFinmap xs ↔ ∃ b, { fst := a, snd := b } ∈ xs\nfst_i : α\nsnd_i : β fst_i\n⊢ a = fst_i → ∃ x, HEq x snd_i\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase cons.mk\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nxs : List (Sigma β)\ntail_ih✝ : a ∈ List.toFinmap xs ↔ ∃ b, { fst := a, snd := b } ∈ xs\nsnd_i : β a\n⊢ ∃ x, HEq x snd_i\n[PROOFSTEP]\nsimp only [exists_eq, heq_iff_eq]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb b' : β a\n⊢ insert a b (singleton a b') = singleton a b\n[PROOFSTEP]\nsimp only [singleton, Finmap.insert_toFinmap, AList.insert_singleton_eq]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\ns : Finmap β\ns₁ s₂ : AList β\np : s₁.entries ~ s₂.entries\n⊢ Prod.map id AList.toFinmap (AList.extract a s₁) = Prod.map id AList.toFinmap (AList.extract a s₂)\n[PROOFSTEP]\nsimp [perm_lookup p, toFinmap_eq, perm_erase p]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\ns✝ : Finmap β\ns : AList β\n⊢ extract a ⟦s⟧ = (lookup a ⟦s⟧, erase a ⟦s⟧)\n[PROOFSTEP]\nsimp [extract]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁ s₂ : AList β\n⊢ ⟦s₁⟧ ∪ ⟦s₂⟧ = ⟦s₁ ∪ s₂⟧\n[PROOFSTEP]\nsimp [(· ∪ ·), union]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ s₂✝ : Finmap β\ns₁ s₂ : AList β\n⊢ ∀ (a : α), a ∈ keys (⟦s₁⟧ ∪ ⟦s₂⟧) ↔ a ∈ keys ⟦s₁⟧ ∪ keys ⟦s₂⟧\n[PROOFSTEP]\nsimp [keys]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\ns₁ s₂ : Finmap β\nh : ¬a ∈ s₂\n⊢ lookup a (s₁ ∪ s₂) = lookup a s₁\n[PROOFSTEP]\nby_cases h' : a ∈ s₁\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\ns₁ s₂ : Finmap β\nh : ¬a ∈ s₂\nh' : a ∈ s₁\n⊢ lookup a (s₁ ∪ s₂) = lookup a s₁\n[PROOFSTEP]\nrw [lookup_union_left h']\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\ns₁ s₂ : Finmap β\nh : ¬a ∈ s₂\nh' : ¬a ∈ s₁\n⊢ lookup a (s₁ ∪ s₂) = lookup a s₁\n[PROOFSTEP]\nrw [lookup_union_right h', lookup_eq_none.mpr h, lookup_eq_none.mpr h']\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\ns₁ s₂ : Finmap β\na₁ a₂ : AList β\n⊢ insert a b (⟦a₁⟧ ∪ ⟦a₂⟧) = insert a b ⟦a₁⟧ ∪ ⟦a₂⟧\n[PROOFSTEP]\nsimp [AList.insert_union]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ s₂✝ s₃✝ : Finmap β\ns₁ s₂ s₃ : AList β\n⊢ ⟦s₁⟧ ∪ ⟦s₂⟧ ∪ ⟦s₃⟧ = ⟦s₁⟧ ∪ (⟦s₂⟧ ∪ ⟦s₃⟧)\n[PROOFSTEP]\nsimp only [AList.toFinmap_eq, union_toFinmap, AList.union_assoc]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ : Finmap β\ns₁ : AList β\n⊢ ∅ ∪ ⟦s₁⟧ = ⟦s₁⟧\n[PROOFSTEP]\nrw [← empty_toFinmap]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ : Finmap β\ns₁ : AList β\n⊢ ⟦∅⟧ ∪ ⟦s₁⟧ = ⟦s₁⟧\n[PROOFSTEP]\nsimp [-empty_toFinmap, AList.toFinmap_eq, union_toFinmap, AList.union_assoc]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ : Finmap β\ns₁ : AList β\n⊢ ⟦s₁⟧ ∪ ∅ = ⟦s₁⟧\n[PROOFSTEP]\nrw [← empty_toFinmap]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ : Finmap β\ns₁ : AList β\n⊢ ⟦s₁⟧ ∪ ⟦∅⟧ = ⟦s₁⟧\n[PROOFSTEP]\nsimp [-empty_toFinmap, AList.toFinmap_eq, union_toFinmap, AList.union_assoc]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\ns : Finmap β\nh : lookup a s = some b\nx : α\n⊢ lookup x (erase a s ∪ singleton a b) = lookup x s\n[PROOFSTEP]\nby_cases h' : x = a\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\ns : Finmap β\nh : lookup a s = some b\nx : α\nh' : x = a\n⊢ lookup x (erase a s ∪ singleton a b) = lookup x s\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns : Finmap β\nx : α\nb : β x\nh : lookup x s = some b\n⊢ lookup x (erase x s ∪ singleton x b) = lookup x s\n[PROOFSTEP]\nrw [lookup_union_right not_mem_erase_self, lookup_singleton_eq, h]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\ns : Finmap β\nh : lookup a s = some b\nx : α\nh' : ¬x = a\n⊢ lookup x (erase a s ∪ singleton a b) = lookup x s\n[PROOFSTEP]\nhave : x ∉ singleton a b := by rwa [mem_singleton]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\ns : Finmap β\nh : lookup a s = some b\nx : α\nh' : ¬x = a\n⊢ ¬x ∈ singleton a b\n[PROOFSTEP]\nrwa [mem_singleton]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\na : α\nb : β a\ns : Finmap β\nh : lookup a s = some b\nx : α\nh' : ¬x = a\nthis : ¬x ∈ singleton a b\n⊢ lookup x (erase a s ∪ singleton a b) = lookup x s\n[PROOFSTEP]\nrw [lookup_union_left_of_not_in this, lookup_erase_ne h']\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nx y : Finmap β\n⊢ Decidable (Disjoint x y)\n[PROOFSTEP]\ndsimp only [Disjoint]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nx y : Finmap β\n⊢ Decidable (∀ (x_1 : α), x_1 ∈ x → ¬x_1 ∈ y)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nx y z : Finmap β\n⊢ Disjoint (x ∪ y) z ↔ Disjoint x z ∧ Disjoint y z\n[PROOFSTEP]\nsimp [Disjoint, Finmap.mem_union, or_imp, forall_and]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nx y z : Finmap β\n⊢ Disjoint x (y ∪ z) ↔ Disjoint x y ∧ Disjoint x z\n[PROOFSTEP]\nrw [Disjoint.symm_iff, disjoint_union_left, Disjoint.symm_iff _ x, Disjoint.symm_iff _ x]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ s₂✝ : Finmap β\ns₁ s₂ : AList β\n⊢ Disjoint ⟦s₁⟧ ⟦s₂⟧ → ⟦s₁⟧ ∪ ⟦s₂⟧ = ⟦s₂⟧ ∪ ⟦s₁⟧\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁✝ s₂✝ : Finmap β\ns₁ s₂ : AList β\nh : Disjoint ⟦s₁⟧ ⟦s₂⟧\n⊢ ⟦s₁⟧ ∪ ⟦s₂⟧ = ⟦s₂⟧ ∪ ⟦s₁⟧\n[PROOFSTEP]\nsimp only [AList.toFinmap_eq, union_toFinmap, AList.union_comm_of_disjoint h]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁ s₂ s₃ : Finmap β\nh : Disjoint s₁ s₃\nh' : Disjoint s₂ s₃\nh'' : s₁ ∪ s₃ = s₂ ∪ s₃\n⊢ s₁ = s₂\n[PROOFSTEP]\napply ext_lookup\n[GOAL]\ncase a\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁ s₂ s₃ : Finmap β\nh : Disjoint s₁ s₃\nh' : Disjoint s₂ s₃\nh'' : s₁ ∪ s₃ = s₂ ∪ s₃\n⊢ ∀ (x : α), lookup x s₁ = lookup x s₂\n[PROOFSTEP]\nintro x\n[GOAL]\ncase a\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁ s₂ s₃ : Finmap β\nh : Disjoint s₁ s₃\nh' : Disjoint s₂ s₃\nh'' : s₁ ∪ s₃ = s₂ ∪ s₃\nx : α\n⊢ lookup x s₁ = lookup x s₂\n[PROOFSTEP]\nhave : (s₁ ∪ s₃).lookup x = (s₂ ∪ s₃).lookup x := h'' ▸ rfl\n[GOAL]\ncase a\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁ s₂ s₃ : Finmap β\nh : Disjoint s₁ s₃\nh' : Disjoint s₂ s₃\nh'' : s₁ ∪ s₃ = s₂ ∪ s₃\nx : α\nthis : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)\n⊢ lookup x s₁ = lookup x s₂\n[PROOFSTEP]\nby_cases hs₁ : x ∈ s₁\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁ s₂ s₃ : Finmap β\nh : Disjoint s₁ s₃\nh' : Disjoint s₂ s₃\nh'' : s₁ ∪ s₃ = s₂ ∪ s₃\nx : α\nthis : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)\nhs₁ : x ∈ s₁\n⊢ lookup x s₁ = lookup x s₂\n[PROOFSTEP]\nrwa [lookup_union_left hs₁, lookup_union_left_of_not_in (h _ hs₁)] at this \n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁ s₂ s₃ : Finmap β\nh : Disjoint s₁ s₃\nh' : Disjoint s₂ s₃\nh'' : s₁ ∪ s₃ = s₂ ∪ s₃\nx : α\nthis : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)\nhs₁ : ¬x ∈ s₁\n⊢ lookup x s₁ = lookup x s₂\n[PROOFSTEP]\nby_cases hs₂ : x ∈ s₂\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁ s₂ s₃ : Finmap β\nh : Disjoint s₁ s₃\nh' : Disjoint s₂ s₃\nh'' : s₁ ∪ s₃ = s₂ ∪ s₃\nx : α\nthis : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)\nhs₁ : ¬x ∈ s₁\nhs₂ : x ∈ s₂\n⊢ lookup x s₁ = lookup x s₂\n[PROOFSTEP]\nrwa [lookup_union_left_of_not_in (h' _ hs₂), lookup_union_left hs₂] at this \n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns₁ s₂ s₃ : Finmap β\nh : Disjoint s₁ s₃\nh' : Disjoint s₂ s₃\nh'' : s₁ ∪ s₃ = s₂ ∪ s₃\nx : α\nthis : lookup x (s₁ ∪ s₃) = lookup x (s₂ ∪ s₃)\nhs₁ : ¬x ∈ s₁\nhs₂ : ¬x ∈ s₂\n⊢ lookup x s₁ = lookup x s₂\n[PROOFSTEP]\nrw [lookup_eq_none.mpr hs₁, lookup_eq_none.mpr hs₂]\n", "meta": {"mathlib_filename": "Mathlib.Data.Finmap", "llama_tokens": 15362, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.603931819468636, "lm_q2_score": 0.6187804337438501, "lm_q1q2_score": 0.37370119320251516}}
{"text": "[GOAL]\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na✝ b✝ c✝ : α\na : p → α\nb : ¬p → q → α\nc : ¬p → ¬q → α\n⊢ (dite p a fun hp => dite q (b hp) (c hp)) = if hq : q then dite p a fun hp => b hp hq else dite p a fun hp => c hp hq\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na✝ b✝ c✝ : α\na : p → α\nb : ¬p → q → α\nc : ¬p → ¬q → α\nh✝¹ : p\nh✝ : q\n⊢ a h✝¹ = a h✝¹\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na✝ b✝ c✝ : α\na : p → α\nb : ¬p → q → α\nc : ¬p → ¬q → α\nh✝¹ : p\nh✝ : ¬q\n⊢ a h✝¹ = a h✝¹\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na✝ b✝ c✝ : α\na : p → α\nb : ¬p → q → α\nc : ¬p → ¬q → α\nh✝¹ : ¬p\nh✝ : q\n⊢ b h✝¹ h✝ = b h✝¹ (_ : q)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na✝ b✝ c✝ : α\na : p → α\nb : ¬p → q → α\nc : ¬p → ¬q → α\nh✝¹ : ¬p\nh✝ : ¬q\n⊢ c h✝¹ h✝ = c h✝¹ (_ : ¬q)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na✝ b✝ c✝ : α\na : p → q → α\nb : p → ¬q → α\nc : ¬p → α\n⊢ dite p (fun hp => dite q (a hp) (b hp)) c =\n    if hq : q then dite p (fun hp => a hp hq) c else dite p (fun hp => b hp hq) c\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na✝ b✝ c✝ : α\na : p → q → α\nb : p → ¬q → α\nc : ¬p → α\nh✝¹ : p\nh✝ : q\n⊢ a h✝¹ h✝ = a h✝¹ (_ : q)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na✝ b✝ c✝ : α\na : p → q → α\nb : p → ¬q → α\nc : ¬p → α\nh✝¹ : p\nh✝ : ¬q\n⊢ b h✝¹ h✝ = b h✝¹ (_ : ¬q)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na✝ b✝ c✝ : α\na : p → q → α\nb : p → ¬q → α\nc : ¬p → α\nh✝¹ : ¬p\nh✝ : q\n⊢ c h✝¹ = c h✝¹\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na✝ b✝ c✝ : α\na : p → q → α\nb : p → ¬q → α\nc : ¬p → α\nh✝¹ : ¬p\nh✝ : ¬q\n⊢ c h✝¹ = c h✝¹\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\n⊢ f True ∧ f False → ∀ (p : Prop), f p\n[PROOFSTEP]\nrintro ⟨h₁, h₀⟩ p\n[GOAL]\ncase intro\nα : Sort u_1\np✝ q r : Prop\ninst✝¹ : Decidable p✝\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nh₁ : f True\nh₀ : f False\np : Prop\n⊢ f p\n[PROOFSTEP]\nby_cases hp : p\n[GOAL]\ncase pos\nα : Sort u_1\np✝ q r : Prop\ninst✝¹ : Decidable p✝\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nh₁ : f True\nh₀ : f False\np : Prop\nhp : p\n⊢ f p\n[PROOFSTEP]\nsimp only [hp]\n[GOAL]\ncase neg\nα : Sort u_1\np✝ q r : Prop\ninst✝¹ : Decidable p✝\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nh₁ : f True\nh₀ : f False\np : Prop\nhp : ¬p\n⊢ f p\n[PROOFSTEP]\nsimp only [hp]\n[GOAL]\ncase pos\nα : Sort u_1\np✝ q r : Prop\ninst✝¹ : Decidable p✝\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nh₁ : f True\nh₀ : f False\np : Prop\nhp : p\n⊢ f True\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg\nα : Sort u_1\np✝ q r : Prop\ninst✝¹ : Decidable p✝\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nh₁ : f True\nh₀ : f False\np : Prop\nhp : ¬p\n⊢ f False\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Sort u_1\np✝ q r : Prop\ninst✝¹ : Decidable p✝\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nx✝ : ∃ p, f p\np : Prop\nh : f p\n⊢ f True ∨ f False\n[PROOFSTEP]\nrefine' (em p).imp _ _\n[GOAL]\ncase refine'_1\nα : Sort u_1\np✝ q r : Prop\ninst✝¹ : Decidable p✝\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nx✝ : ∃ p, f p\np : Prop\nh : f p\n⊢ p → f True\n[PROOFSTEP]\nintro H\n[GOAL]\ncase refine'_2\nα : Sort u_1\np✝ q r : Prop\ninst✝¹ : Decidable p✝\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nx✝ : ∃ p, f p\np : Prop\nh : f p\n⊢ ¬p → f False\n[PROOFSTEP]\nintro H\n[GOAL]\ncase refine'_1\nα : Sort u_1\np✝ q r : Prop\ninst✝¹ : Decidable p✝\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nx✝ : ∃ p, f p\np : Prop\nh : f p\nH : p\n⊢ f True\n[PROOFSTEP]\nconvert h\n[GOAL]\ncase refine'_2\nα : Sort u_1\np✝ q r : Prop\ninst✝¹ : Decidable p✝\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nx✝ : ∃ p, f p\np : Prop\nh : f p\nH : ¬p\n⊢ f False\n[PROOFSTEP]\nconvert h\n[GOAL]\ncase h.e'_1.a\nα : Sort u_1\np✝ q r : Prop\ninst✝¹ : Decidable p✝\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nx✝ : ∃ p, f p\np : Prop\nh : f p\nH : p\n⊢ True ↔ p\n[PROOFSTEP]\nsimp [H]\n[GOAL]\ncase h.e'_1.a\nα : Sort u_1\np✝ q r : Prop\ninst✝¹ : Decidable p✝\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nx✝ : ∃ p, f p\np : Prop\nh : f p\nH : ¬p\n⊢ False ↔ p\n[PROOFSTEP]\nsimp [H]\n[GOAL]\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\n⊢ f True ∨ f False → ∃ p, f p\n[PROOFSTEP]\nrintro (h | h)\n[GOAL]\ncase inl\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nh : f True\n⊢ ∃ p, f p\n[PROOFSTEP]\nexact ⟨_, h⟩\n[GOAL]\ncase inr\nα : Sort u_1\np q r : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\na b c : α\nf : Prop → Prop\nh : f False\n⊢ ∃ p, f p\n[PROOFSTEP]\nexact ⟨_, h⟩\n", "meta": {"mathlib_filename": "Mathlib.Logic.Lemmas", "llama_tokens": 2898, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.626124191181315, "lm_q2_score": 0.5964331462646254, "lm_q1q2_score": 0.3734412212986655}}
{"text": "[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\n⊢ ∀ (i j : Γ₀ˣ), ∃ k, ltAddSubgroup v k ≤ ltAddSubgroup v i ⊓ ltAddSubgroup v j\n[PROOFSTEP]\nrintro γ₀ γ₁\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nγ₀ γ₁ : Γ₀ˣ\n⊢ ∃ k, ltAddSubgroup v k ≤ ltAddSubgroup v γ₀ ⊓ ltAddSubgroup v γ₁\n[PROOFSTEP]\nuse min γ₀ γ₁\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nγ₀ γ₁ : Γ₀ˣ\n⊢ ltAddSubgroup v (min γ₀ γ₁) ≤ ltAddSubgroup v γ₀ ⊓ ltAddSubgroup v γ₁\n[PROOFSTEP]\nsimp [Valuation.ltAddSubgroup]\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nγ₀ γ₁ : Γ₀ˣ\n⊢ ∀ (a : R), ↑v a < ↑γ₀ → ↑v a < ↑γ₁ → ↑v a < ↑γ₀\n[PROOFSTEP]\ntauto\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\n⊢ ∀ (i : Γ₀ˣ), ∃ j, ↑(ltAddSubgroup v j) * ↑(ltAddSubgroup v j) ⊆ ↑(ltAddSubgroup v i)\n[PROOFSTEP]\nrintro γ\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nγ : Γ₀ˣ\n⊢ ∃ j, ↑(ltAddSubgroup v j) * ↑(ltAddSubgroup v j) ⊆ ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\ncases' exists_square_le γ with γ₀ h\n[GOAL]\ncase intro\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nγ γ₀ : Γ₀ˣ\nh : γ₀ * γ₀ ≤ γ\n⊢ ∃ j, ↑(ltAddSubgroup v j) * ↑(ltAddSubgroup v j) ⊆ ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nuse γ₀\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nγ γ₀ : Γ₀ˣ\nh : γ₀ * γ₀ ≤ γ\n⊢ ↑(ltAddSubgroup v γ₀) * ↑(ltAddSubgroup v γ₀) ⊆ ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nrintro - ⟨r, s, r_in, s_in, rfl⟩\n[GOAL]\ncase h.intro.intro.intro.intro\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nγ γ₀ : Γ₀ˣ\nh : γ₀ * γ₀ ≤ γ\nr s : R\nr_in : r ∈ ↑(ltAddSubgroup v γ₀)\ns_in : s ∈ ↑(ltAddSubgroup v γ₀)\n⊢ (fun x x_1 => x * x_1) r s ∈ ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\ncalc\n  (v (r * s) : Γ₀) = v r * v s := Valuation.map_mul _ _ _\n  _ < γ₀ * γ₀ := (mul_lt_mul₀ r_in s_in)\n  _ ≤ γ := by exact_mod_cast h\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nγ γ₀ : Γ₀ˣ\nh : γ₀ * γ₀ ≤ γ\nr s : R\nr_in : r ∈ ↑(ltAddSubgroup v γ₀)\ns_in : s ∈ ↑(ltAddSubgroup v γ₀)\n⊢ ↑γ₀ * ↑γ₀ ≤ ↑γ\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\n⊢ ∀ (x : R) (i : Γ₀ˣ), ∃ j, ↑(ltAddSubgroup v j) ⊆ (fun x_1 => x * x_1) ⁻¹' ↑(ltAddSubgroup v i)\n[PROOFSTEP]\nrintro x γ\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\n⊢ ∃ j, ↑(ltAddSubgroup v j) ⊆ (fun x_1 => x * x_1) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nrcases GroupWithZero.eq_zero_or_unit (v x) with (Hx | ⟨γx, Hx⟩)\n[GOAL]\ncase inl\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nHx : ↑v x = 0\n⊢ ∃ j, ↑(ltAddSubgroup v j) ⊆ (fun x_1 => x * x_1) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nuse(1 : Γ₀ˣ)\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nHx : ↑v x = 0\n⊢ ↑(ltAddSubgroup v 1) ⊆ (fun x_1 => x * x_1) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nrintro y _\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nHx : ↑v x = 0\ny : R\na✝ : y ∈ ↑(ltAddSubgroup v 1)\n⊢ y ∈ (fun x_1 => x * x_1) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nchange v (x * y) < _\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nHx : ↑v x = 0\ny : R\na✝ : y ∈ ↑(ltAddSubgroup v 1)\n⊢ ↑v (x * y) < ↑γ\n[PROOFSTEP]\nrw [Valuation.map_mul, Hx, zero_mul]\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nHx : ↑v x = 0\ny : R\na✝ : y ∈ ↑(ltAddSubgroup v 1)\n⊢ 0 < ↑γ\n[PROOFSTEP]\nexact Units.zero_lt γ\n[GOAL]\ncase inr.intro\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nγx : ((fun x => Γ₀) x)ˣ\nHx : ↑v x = ↑γx\n⊢ ∃ j, ↑(ltAddSubgroup v j) ⊆ (fun x_1 => x * x_1) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nuse γx⁻¹ * γ\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nγx : ((fun x => Γ₀) x)ˣ\nHx : ↑v x = ↑γx\n⊢ ↑(ltAddSubgroup v (γx⁻¹ * γ)) ⊆ (fun x_1 => x * x_1) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nrintro y (vy_lt : v y < ↑(γx⁻¹ * γ))\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nγx : ((fun x => Γ₀) x)ˣ\nHx : ↑v x = ↑γx\ny : R\nvy_lt : ↑v y < ↑(γx⁻¹ * γ)\n⊢ y ∈ (fun x_1 => x * x_1) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nchange (v (x * y) : Γ₀) < γ\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nγx : ((fun x => Γ₀) x)ˣ\nHx : ↑v x = ↑γx\ny : R\nvy_lt : ↑v y < ↑(γx⁻¹ * γ)\n⊢ ↑v (x * y) < ↑γ\n[PROOFSTEP]\nrw [Valuation.map_mul, Hx, mul_comm]\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nγx : ((fun x => Γ₀) x)ˣ\nHx : ↑v x = ↑γx\ny : R\nvy_lt : ↑v y < ↑(γx⁻¹ * γ)\n⊢ ↑v y * ↑γx < ↑γ\n[PROOFSTEP]\nrw [Units.val_mul, mul_comm] at vy_lt \n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nγx : ((fun x => Γ₀) x)ˣ\nHx : ↑v x = ↑γx\ny : R\nvy_lt : ↑v y < ↑γ * ↑γx⁻¹\n⊢ ↑v y * ↑γx < ↑γ\n[PROOFSTEP]\nsimpa using mul_inv_lt_of_lt_mul₀ vy_lt\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\n⊢ ∀ (x : R) (i : Γ₀ˣ), ∃ j, ↑(ltAddSubgroup v j) ⊆ (fun x_1 => x_1 * x) ⁻¹' ↑(ltAddSubgroup v i)\n[PROOFSTEP]\nrintro x γ\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\n⊢ ∃ j, ↑(ltAddSubgroup v j) ⊆ (fun x_1 => x_1 * x) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nrcases GroupWithZero.eq_zero_or_unit (v x) with (Hx | ⟨γx, Hx⟩)\n[GOAL]\ncase inl\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nHx : ↑v x = 0\n⊢ ∃ j, ↑(ltAddSubgroup v j) ⊆ (fun x_1 => x_1 * x) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nHx : ↑v x = 0\n⊢ ↑(ltAddSubgroup v 1) ⊆ (fun x_1 => x_1 * x) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nrintro y _\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nHx : ↑v x = 0\ny : R\na✝ : y ∈ ↑(ltAddSubgroup v 1)\n⊢ y ∈ (fun x_1 => x_1 * x) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nchange v (y * x) < _\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nHx : ↑v x = 0\ny : R\na✝ : y ∈ ↑(ltAddSubgroup v 1)\n⊢ ↑v (y * x) < ↑γ\n[PROOFSTEP]\nrw [Valuation.map_mul, Hx, mul_zero]\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nHx : ↑v x = 0\ny : R\na✝ : y ∈ ↑(ltAddSubgroup v 1)\n⊢ 0 < ↑γ\n[PROOFSTEP]\nexact Units.zero_lt γ\n[GOAL]\ncase inr.intro\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nγx : ((fun x => Γ₀) x)ˣ\nHx : ↑v x = ↑γx\n⊢ ∃ j, ↑(ltAddSubgroup v j) ⊆ (fun x_1 => x_1 * x) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nuse γx⁻¹ * γ\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nγx : ((fun x => Γ₀) x)ˣ\nHx : ↑v x = ↑γx\n⊢ ↑(ltAddSubgroup v (γx⁻¹ * γ)) ⊆ (fun x_1 => x_1 * x) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nrintro y (vy_lt : v y < ↑(γx⁻¹ * γ))\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nγx : ((fun x => Γ₀) x)ˣ\nHx : ↑v x = ↑γx\ny : R\nvy_lt : ↑v y < ↑(γx⁻¹ * γ)\n⊢ y ∈ (fun x_1 => x_1 * x) ⁻¹' ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nchange (v (y * x) : Γ₀) < γ\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nγx : ((fun x => Γ₀) x)ˣ\nHx : ↑v x = ↑γx\ny : R\nvy_lt : ↑v y < ↑(γx⁻¹ * γ)\n⊢ ↑v (y * x) < ↑γ\n[PROOFSTEP]\nrw [Valuation.map_mul, Hx]\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nγx : ((fun x => Γ₀) x)ˣ\nHx : ↑v x = ↑γx\ny : R\nvy_lt : ↑v y < ↑(γx⁻¹ * γ)\n⊢ ↑v y * ↑γx < ↑γ\n[PROOFSTEP]\nrw [Units.val_mul, mul_comm] at vy_lt \n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nγ : Γ₀ˣ\nγx : ((fun x => Γ₀) x)ˣ\nHx : ↑v x = ↑γx\ny : R\nvy_lt : ↑v y < ↑γ * ↑γx⁻¹\n⊢ ↑v y * ↑γx < ↑γ\n[PROOFSTEP]\nsimpa using mul_inv_lt_of_lt_mul₀ vy_lt\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\n⊢ ∀ (s : Set R), s ∈ 𝓝 0 ↔ ∃ γ, {x | ↑v x < ↑γ} ⊆ s\n[PROOFSTEP]\nletI := @TopologicalAddGroup.toUniformSpace R _ v.subgroups_basis.topology _\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nthis : UniformSpace R := TopologicalAddGroup.toUniformSpace R\n⊢ ∀ (s : Set R), s ∈ 𝓝 0 ↔ ∃ γ, {x | ↑v x < ↑γ} ⊆ s\n[PROOFSTEP]\nintro s\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nthis : UniformSpace R := TopologicalAddGroup.toUniformSpace R\ns : Set R\n⊢ s ∈ 𝓝 0 ↔ ∃ γ, {x | ↑v x < ↑γ} ⊆ s\n[PROOFSTEP]\nrw [Filter.hasBasis_iff.mp v.subgroups_basis.hasBasis_nhds_zero s]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nthis : UniformSpace R := TopologicalAddGroup.toUniformSpace R\ns : Set R\n⊢ (∃ i, True ∧ ↑(ltAddSubgroup v i) ⊆ s) ↔ ∃ γ, {x | ↑v x < ↑γ} ⊆ s\n[PROOFSTEP]\nexact exists_congr fun γ => by rw [true_and]; rfl\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nthis : UniformSpace R := TopologicalAddGroup.toUniformSpace R\ns : Set R\nγ : Γ₀ˣ\n⊢ True ∧ ↑(ltAddSubgroup v γ) ⊆ s ↔ {x | ↑v x < ↑γ} ⊆ s\n[PROOFSTEP]\nrw [true_and]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nthis : UniformSpace R := TopologicalAddGroup.toUniformSpace R\ns : Set R\nγ : Γ₀ˣ\n⊢ ↑(ltAddSubgroup v γ) ⊆ s ↔ {x | ↑v x < ↑γ} ⊆ s\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\n⊢ Filter.HasBasis (𝓝 0) (fun x => True) fun γ => {x | ↑v x < ↑γ}\n[PROOFSTEP]\nsimp [Filter.hasBasis_iff, is_topological_valuation]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\n⊢ Filter.HasBasis (uniformity R) (fun x => True) fun γ => {p | ↑v (p.snd - p.fst) < ↑γ}\n[PROOFSTEP]\nrw [uniformity_eq_comap_nhds_zero]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\n⊢ Filter.HasBasis (Filter.comap (fun x => x.snd - x.fst) (𝓝 0)) (fun x => True) fun γ => {p | ↑v (p.snd - p.fst) < ↑γ}\n[PROOFSTEP]\nexact (hasBasis_nhds_zero R Γ₀).comap _\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\ns : Set R\nx : R\n⊢ s ∈ 𝓝 x ↔ ∃ γ, {y | ↑v (y - x) < ↑γ} ⊆ s\n[PROOFSTEP]\nsimp only [← nhds_translation_add_neg x, ← sub_eq_add_neg, preimage_setOf_eq, true_and,\n  ((hasBasis_nhds_zero R Γ₀).comap fun y => y - x).mem_iff]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\ns : Set R\n⊢ s ∈ 𝓝 0 ↔ ∃ γ, {x | ↑v x < ↑γ} ⊆ s\n[PROOFSTEP]\nsimp only [mem_nhds, sub_zero]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nx : R\nh : ↑v x ≠ 0\n⊢ {y | ↑v y = ↑v x} ∈ 𝓝 x\n[PROOFSTEP]\nrw [mem_nhds]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nx : R\nh : ↑v x ≠ 0\n⊢ ∃ γ, {y | ↑v (y - x) < ↑γ} ⊆ {y | ↑v y = ↑v x}\n[PROOFSTEP]\nrcases Units.exists_iff_ne_zero.mpr h with ⟨γ, hx⟩\n[GOAL]\ncase intro\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nx : R\nh : ↑v x ≠ 0\nγ : ((fun x => Γ₀) x)ˣ\nhx : ↑γ = ↑v x\n⊢ ∃ γ, {y | ↑v (y - x) < ↑γ} ⊆ {y | ↑v y = ↑v x}\n[PROOFSTEP]\nuse γ\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nx : R\nh : ↑v x ≠ 0\nγ : ((fun x => Γ₀) x)ˣ\nhx : ↑γ = ↑v x\n⊢ {y | ↑v (y - x) < ↑γ} ⊆ {y | ↑v y = ↑v x}\n[PROOFSTEP]\nrw [hx]\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nx : R\nh : ↑v x ≠ 0\nγ : ((fun x => Γ₀) x)ˣ\nhx : ↑γ = ↑v x\n⊢ {y | ↑v (y - x) < ↑v x} ⊆ {y | ↑v y = ↑v x}\n[PROOFSTEP]\nintro y y_in\n[GOAL]\ncase h\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nx : R\nh : ↑v x ≠ 0\nγ : ((fun x => Γ₀) x)ˣ\nhx : ↑γ = ↑v x\ny : R\ny_in : y ∈ {y | ↑v (y - x) < ↑v x}\n⊢ y ∈ {y | ↑v y = ↑v x}\n[PROOFSTEP]\nexact Valuation.map_eq_of_sub_lt _ y_in\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nF : Filter R\n⊢ Cauchy F ↔ Filter.NeBot F ∧ ∀ (γ : Γ₀ˣ), ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nrw [toUniformSpace_eq, AddGroupFilterBasis.cauchy_iff]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nF : Filter R\n⊢ (Filter.NeBot F ∧\n      ∀ (U : Set R),\n        U ∈ RingFilterBasis.toAddGroupFilterBasis → ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → y - x ∈ U) ↔\n    Filter.NeBot F ∧ ∀ (γ : Γ₀ˣ), ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → ↑v (y - x) < ↑γ\n[PROOFSTEP]\napply and_congr Iff.rfl\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nF : Filter R\n⊢ (∀ (U : Set R),\n      U ∈ RingFilterBasis.toAddGroupFilterBasis → ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → y - x ∈ U) ↔\n    ∀ (γ : Γ₀ˣ), ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nsimp_rw [Valued.v.subgroups_basis.mem_addGroupFilterBasis_iff]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nF : Filter R\n⊢ (∀ (U : Set R), (∃ i, U = ↑(ltAddSubgroup v i)) → ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → y - x ∈ U) ↔\n    ∀ (γ : Γ₀ˣ), ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nF : Filter R\n⊢ (∀ (U : Set R), (∃ i, U = ↑(ltAddSubgroup v i)) → ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → y - x ∈ U) →\n    ∀ (γ : Γ₀ˣ), ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nintro h γ\n[GOAL]\ncase mp\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nF : Filter R\nh : ∀ (U : Set R), (∃ i, U = ↑(ltAddSubgroup v i)) → ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → y - x ∈ U\nγ : Γ₀ˣ\n⊢ ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nexact h _ (Valued.v.subgroups_basis.mem_addGroupFilterBasis _)\n[GOAL]\ncase mpr\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nF : Filter R\n⊢ (∀ (γ : Γ₀ˣ), ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → ↑v (y - x) < ↑γ) →\n    ∀ (U : Set R), (∃ i, U = ↑(ltAddSubgroup v i)) → ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → y - x ∈ U\n[PROOFSTEP]\nrintro h - ⟨γ, rfl⟩\n[GOAL]\ncase mpr.intro\nR : Type u\ninst✝¹ : Ring R\nΓ₀ : Type v\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\n_i : Valued R Γ₀\nF : Filter R\nh : ∀ (γ : Γ₀ˣ), ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → ↑v (y - x) < ↑γ\nγ : Γ₀ˣ\n⊢ ∃ M, M ∈ F ∧ ∀ (x : R), x ∈ M → ∀ (y : R), y ∈ M → y - x ∈ ↑(ltAddSubgroup v γ)\n[PROOFSTEP]\nexact h γ\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Valuation", "llama_tokens": 9139, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7185943925708561, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.37332510877577246}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\nhp✝ hp : Prime p\na : α\nn : ℕ\nh : p ∣ a ^ n\n⊢ p ∣ a\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\nhp✝ hp : Prime p\na : α\nn : ℕ\nh✝ : p ∣ a ^ n\nh : p ∣ a ^ Nat.zero\n⊢ p ∣ a\n[PROOFSTEP]\nrw [pow_zero] at h \n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\nhp✝ hp : Prime p\na : α\nn : ℕ\nh✝ : p ∣ a ^ n\nh : p ∣ 1\n⊢ p ∣ a\n[PROOFSTEP]\nhave := isUnit_of_dvd_one h\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\nhp✝ hp : Prime p\na : α\nn : ℕ\nh✝ : p ∣ a ^ n\nh : p ∣ 1\nthis : IsUnit p\n⊢ p ∣ a\n[PROOFSTEP]\nhave := not_unit hp\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\nhp✝ hp : Prime p\na : α\nn : ℕ\nh✝ : p ∣ a ^ n\nh : p ∣ 1\nthis✝ : IsUnit p\nthis : ¬IsUnit p\n⊢ p ∣ a\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\nhp✝ hp : Prime p\na : α\nn✝ : ℕ\nh✝ : p ∣ a ^ n✝\nn : ℕ\nih : p ∣ a ^ n → p ∣ a\nh : p ∣ a ^ Nat.succ n\n⊢ p ∣ a\n[PROOFSTEP]\nrw [pow_succ] at h \n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\nhp✝ hp : Prime p\na : α\nn✝ : ℕ\nh✝ : p ∣ a ^ n✝\nn : ℕ\nih : p ∣ a ^ n → p ∣ a\nh : p ∣ a * a ^ n\n⊢ p ∣ a\n[PROOFSTEP]\ncases' dvd_or_dvd hp h with dvd_a dvd_pow\n[GOAL]\ncase succ.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\nhp✝ hp : Prime p\na : α\nn✝ : ℕ\nh✝ : p ∣ a ^ n✝\nn : ℕ\nih : p ∣ a ^ n → p ∣ a\nh : p ∣ a * a ^ n\ndvd_a : p ∣ a\n⊢ p ∣ a\n[PROOFSTEP]\nassumption\n[GOAL]\ncase succ.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\nhp✝ hp : Prime p\na : α\nn✝ : ℕ\nh✝ : p ∣ a ^ n✝\nn : ℕ\nih : p ∣ a ^ n → p ∣ a\nh : p ∣ a * a ^ n\ndvd_pow : p ∣ a ^ n\n⊢ p ∣ a\n[PROOFSTEP]\nexact ih dvd_pow\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\nhinv : ∀ (a : α), ↑g (↑f a) = a\nhp : Prime (↑f p)\nh : p = 0\n⊢ ↑f p = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\nhinv : ∀ (a : α), ↑g (↑f a) = a\nhp : Prime (↑f p)\na b : α\nh : p ∣ a * b\n⊢ p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nrefine'\n  (hp.2.2 (f a) (f b) <| by\n        convert map_dvd f h\n        simp).imp\n    _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\nhinv : ∀ (a : α), ↑g (↑f a) = a\nhp : Prime (↑f p)\na b : α\nh : p ∣ a * b\n⊢ ↑f p ∣ ↑f a * ↑f b\n[PROOFSTEP]\nconvert map_dvd f h\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\nhinv : ∀ (a : α), ↑g (↑f a) = a\nhp : Prime (↑f p)\na b : α\nh : p ∣ a * b\n⊢ ↑f a * ↑f b = ↑f (a * b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\nhinv : ∀ (a : α), ↑g (↑f a) = a\nhp : Prime (↑f p)\na b : α\nh : p ∣ a * b\n⊢ ↑f p ∣ ↑f a → p ∣ a\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\nhinv : ∀ (a : α), ↑g (↑f a) = a\nhp : Prime (↑f p)\na b : α\nh✝ : p ∣ a * b\nh : ↑f p ∣ ↑f a\n⊢ p ∣ a\n[PROOFSTEP]\nconvert ← map_dvd g h\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\nhinv : ∀ (a : α), ↑g (↑f a) = a\nhp : Prime (↑f p)\na b : α\nh✝ : p ∣ a * b\nh : ↑f p ∣ ↑f a\n⊢ ↑g (↑f p) = p\n[PROOFSTEP]\napply hinv\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\nhinv : ∀ (a : α), ↑g (↑f a) = a\nhp : Prime (↑f p)\na b : α\nh✝ : p ∣ a * b\nh : ↑f p ∣ ↑f a\n⊢ ↑g (↑f a) = a\n[PROOFSTEP]\napply hinv\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\nhinv : ∀ (a : α), ↑g (↑f a) = a\nhp : Prime (↑f p)\na b : α\nh : p ∣ a * b\n⊢ ↑f p ∣ ↑f b → p ∣ b\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\nhinv : ∀ (a : α), ↑g (↑f a) = a\nhp : Prime (↑f p)\na b : α\nh✝ : p ∣ a * b\nh : ↑f p ∣ ↑f b\n⊢ p ∣ b\n[PROOFSTEP]\nconvert ← map_dvd g h\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\nhinv : ∀ (a : α), ↑g (↑f a) = a\nhp : Prime (↑f p)\na b : α\nh✝ : p ∣ a * b\nh : ↑f p ∣ ↑f b\n⊢ ↑g (↑f p) = p\n[PROOFSTEP]\napply hinv\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\nhinv : ∀ (a : α), ↑g (↑f a) = a\nhp : Prime (↑f p)\na b : α\nh✝ : p ∣ a * b\nh : ↑f p ∣ ↑f b\n⊢ ↑g (↑f b) = b\n[PROOFSTEP]\napply hinv\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\ne : α ≃* β\nh : Prime p\na : β\n⊢ ↑e (↑(symm e) a) = a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : CommMonoidWithZero α\ninst✝² : CommMonoidWithZero β\nF : Type u_5\nG : Type u_6\ninst✝¹ : MonoidWithZeroHomClass F α β\ninst✝ : MulHomClass G β α\nf : F\ng : G\np : α\ne : α ≃* β\na : α\n⊢ ↑(symm e) (↑e a) = a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\nhp : Prime p\na b : α\n⊢ a ∣ p * b → p ∣ a ∨ a ∣ b\n[PROOFSTEP]\nrintro ⟨c, hc⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\nhp : Prime p\na b c : α\nhc : p * b = a * c\n⊢ p ∣ a ∨ a ∣ b\n[PROOFSTEP]\nrcases hp.2.2 a c (hc ▸ dvd_mul_right _ _) with (h | ⟨x, rfl⟩)\n[GOAL]\ncase intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\nhp : Prime p\na b c : α\nhc : p * b = a * c\nh : p ∣ a\n⊢ p ∣ a ∨ a ∣ b\n[PROOFSTEP]\nexact Or.inl h\n[GOAL]\ncase intro.inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\nhp : Prime p\na b x : α\nhc : p * b = a * (p * x)\n⊢ p ∣ a ∨ a ∣ b\n[PROOFSTEP]\nrw [mul_left_comm, mul_right_inj' hp.ne_zero] at hc \n[GOAL]\ncase intro.inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\nhp : Prime p\na b x : α\nhc : b = a * x\n⊢ p ∣ a ∨ a ∣ b\n[PROOFSTEP]\nexact Or.inr (hc.symm ▸ dvd_mul_right _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a b : α\nhp : Prime p\nn : ℕ\nh : ¬p ∣ a\nh' : p ^ n ∣ a * b\n⊢ p ^ n ∣ b\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a b : α\nhp : Prime p\nn : ℕ\nh : ¬p ∣ a\nh'✝ : p ^ n ∣ a * b\nh' : p ^ Nat.zero ∣ a * b\n⊢ p ^ Nat.zero ∣ b\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a b : α\nhp : Prime p\nn : ℕ\nh : ¬p ∣ a\nh'✝ : p ^ n ∣ a * b\nh' : p ^ Nat.zero ∣ a * b\n⊢ 1 ∣ b\n[PROOFSTEP]\nexact one_dvd b\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a b : α\nhp : Prime p\nn✝ : ℕ\nh : ¬p ∣ a\nh'✝ : p ^ n✝ ∣ a * b\nn : ℕ\nih : p ^ n ∣ a * b → p ^ n ∣ b\nh' : p ^ Nat.succ n ∣ a * b\n⊢ p ^ Nat.succ n ∣ b\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := ih (dvd_trans (pow_dvd_pow p n.le_succ) h')\n[GOAL]\ncase succ.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a : α\nhp : Prime p\nn✝ : ℕ\nh : ¬p ∣ a\nn : ℕ\nc : α\nh'✝ : p ^ n✝ ∣ a * (p ^ n * c)\nih : p ^ n ∣ a * (p ^ n * c) → p ^ n ∣ p ^ n * c\nh' : p ^ Nat.succ n ∣ a * (p ^ n * c)\n⊢ p ^ Nat.succ n ∣ p ^ n * c\n[PROOFSTEP]\nrw [pow_succ']\n[GOAL]\ncase succ.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a : α\nhp : Prime p\nn✝ : ℕ\nh : ¬p ∣ a\nn : ℕ\nc : α\nh'✝ : p ^ n✝ ∣ a * (p ^ n * c)\nih : p ^ n ∣ a * (p ^ n * c) → p ^ n ∣ p ^ n * c\nh' : p ^ Nat.succ n ∣ a * (p ^ n * c)\n⊢ p ^ n * p ∣ p ^ n * c\n[PROOFSTEP]\napply mul_dvd_mul_left _ ((hp.dvd_or_dvd _).resolve_left h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a : α\nhp : Prime p\nn✝ : ℕ\nh : ¬p ∣ a\nn : ℕ\nc : α\nh'✝ : p ^ n✝ ∣ a * (p ^ n * c)\nih : p ^ n ∣ a * (p ^ n * c) → p ^ n ∣ p ^ n * c\nh' : p ^ Nat.succ n ∣ a * (p ^ n * c)\n⊢ p ∣ a * c\n[PROOFSTEP]\nrwa [← mul_dvd_mul_iff_left (pow_ne_zero n hp.ne_zero), ← pow_succ', mul_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a b : α\nhp : Prime p\nn : ℕ\nh : ¬p ∣ b\nh' : p ^ n ∣ a * b\n⊢ p ^ n ∣ a\n[PROOFSTEP]\nrw [mul_comm] at h' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a b : α\nhp : Prime p\nn : ℕ\nh : ¬p ∣ b\nh' : p ^ n ∣ b * a\n⊢ p ^ n ∣ a\n[PROOFSTEP]\nexact hp.pow_dvd_of_dvd_mul_left n h h'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a b : α\nn : ℕ\nhp : Prime p\nhpow : p ^ Nat.succ n ∣ a ^ Nat.succ n * b ^ n\nhb : ¬p ^ 2 ∣ b\n⊢ p ∣ a\n[PROOFSTEP]\ncases' hp.dvd_or_dvd ((dvd_pow_self p (Nat.succ_ne_zero n)).trans hpow) with H hbdiv\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a b : α\nn : ℕ\nhp : Prime p\nhpow : p ^ Nat.succ n ∣ a ^ Nat.succ n * b ^ n\nhb : ¬p ^ 2 ∣ b\nH : p ∣ a ^ Nat.succ n\n⊢ p ∣ a\n[PROOFSTEP]\nexact hp.dvd_of_dvd_pow H\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a b : α\nn : ℕ\nhp : Prime p\nhpow : p ^ Nat.succ n ∣ a ^ Nat.succ n * b ^ n\nhb : ¬p ^ 2 ∣ b\nhbdiv : p ∣ b ^ n\n⊢ p ∣ a\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ := hp.dvd_of_dvd_pow hbdiv\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a : α\nn : ℕ\nhp : Prime p\nx : α\nhpow : p ^ Nat.succ n ∣ a ^ Nat.succ n * (p * x) ^ n\nhb : ¬p ^ 2 ∣ p * x\nhbdiv : p ∣ (p * x) ^ n\n⊢ p ∣ a\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := hpow\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a : α\nn : ℕ\nhp : Prime p\nx : α\nhb : ¬p ^ 2 ∣ p * x\nhbdiv : p ∣ (p * x) ^ n\ny : α\nhy : a ^ Nat.succ n * (p * x) ^ n = p ^ Nat.succ n * y\n⊢ p ∣ a\n[PROOFSTEP]\nhave : a ^ n.succ * x ^ n = p * y :=\n  by\n  refine' mul_left_cancel₀ (pow_ne_zero n hp.ne_zero) _\n  rw [← mul_assoc _ p, ← pow_succ', ← hy, mul_pow, ← mul_assoc (a ^ n.succ), mul_comm _ (p ^ n), mul_assoc]\n    -- So `p ∣ a` (and we're done) or `p ∣ x`, which can't be the case since it implies `p^2 ∣ b`.\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a : α\nn : ℕ\nhp : Prime p\nx : α\nhb : ¬p ^ 2 ∣ p * x\nhbdiv : p ∣ (p * x) ^ n\ny : α\nhy : a ^ Nat.succ n * (p * x) ^ n = p ^ Nat.succ n * y\n⊢ a ^ Nat.succ n * x ^ n = p * y\n[PROOFSTEP]\nrefine' mul_left_cancel₀ (pow_ne_zero n hp.ne_zero) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a : α\nn : ℕ\nhp : Prime p\nx : α\nhb : ¬p ^ 2 ∣ p * x\nhbdiv : p ∣ (p * x) ^ n\ny : α\nhy : a ^ Nat.succ n * (p * x) ^ n = p ^ Nat.succ n * y\n⊢ p ^ n * (a ^ Nat.succ n * x ^ n) = p ^ n * (p * y)\n[PROOFSTEP]\nrw [← mul_assoc _ p, ← pow_succ', ← hy, mul_pow, ← mul_assoc (a ^ n.succ), mul_comm _ (p ^ n), mul_assoc]\n  -- So `p ∣ a` (and we're done) or `p ∣ x`, which can't be the case since it implies `p^2 ∣ b`.\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a : α\nn : ℕ\nhp : Prime p\nx : α\nhb : ¬p ^ 2 ∣ p * x\nhbdiv : p ∣ (p * x) ^ n\ny : α\nhy : a ^ Nat.succ n * (p * x) ^ n = p ^ Nat.succ n * y\nthis : a ^ Nat.succ n * x ^ n = p * y\n⊢ p ∣ a\n[PROOFSTEP]\nrefine' hp.dvd_of_dvd_pow ((hp.dvd_or_dvd ⟨_, this⟩).resolve_right fun hdvdx => hb _)\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a : α\nn : ℕ\nhp : Prime p\nx : α\nhb : ¬p ^ 2 ∣ p * x\nhbdiv : p ∣ (p * x) ^ n\ny : α\nhy : a ^ Nat.succ n * (p * x) ^ n = p ^ Nat.succ n * y\nthis : a ^ Nat.succ n * x ^ n = p * y\nhdvdx : p ∣ x ^ n\n⊢ p ^ 2 ∣ p * x\n[PROOFSTEP]\nobtain ⟨z, rfl⟩ := hp.dvd_of_dvd_pow hdvdx\n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a : α\nn : ℕ\nhp : Prime p\ny z : α\nhb : ¬p ^ 2 ∣ p * (p * z)\nhbdiv : p ∣ (p * (p * z)) ^ n\nhy : a ^ Nat.succ n * (p * (p * z)) ^ n = p ^ Nat.succ n * y\nthis : a ^ Nat.succ n * (p * z) ^ n = p * y\nhdvdx : p ∣ (p * z) ^ n\n⊢ p ^ 2 ∣ p * (p * z)\n[PROOFSTEP]\nrw [pow_two, ← mul_assoc]\n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np a : α\nn : ℕ\nhp : Prime p\ny z : α\nhb : ¬p ^ 2 ∣ p * (p * z)\nhbdiv : p ∣ (p * (p * z)) ^ n\nhy : a ^ Nat.succ n * (p * (p * z)) ^ n = p ^ Nat.succ n * y\nthis : a ^ Nat.succ n * (p * z) ^ n = p * y\nhdvdx : p ∣ (p * z) ^ n\n⊢ p * p ∣ p * p * z\n[PROOFSTEP]\nexact dvd_mul_right _ _\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : CancelCommMonoidWithZero α\np x y : α\nh : Prime p\ni : ℕ\nhxy : p ^ (i + 1) ∣ x * y\n⊢ p ^ (i + 1) ∣ x ∨ p ∣ y\n[PROOFSTEP]\nrw [or_iff_not_imp_right]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : CancelCommMonoidWithZero α\np x y : α\nh : Prime p\ni : ℕ\nhxy : p ^ (i + 1) ∣ x * y\n⊢ ¬p ∣ y → p ^ (i + 1) ∣ x\n[PROOFSTEP]\nintro hy\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : CancelCommMonoidWithZero α\np x y : α\nh : Prime p\ni : ℕ\nhxy : p ^ (i + 1) ∣ x * y\nhy : ¬p ∣ y\n⊢ p ^ (i + 1) ∣ x\n[PROOFSTEP]\ninduction' i with i ih generalizing x\n[GOAL]\ncase zero\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : CancelCommMonoidWithZero α\np x✝ y : α\nh : Prime p\ni : ℕ\nhxy✝ : p ^ (i + 1) ∣ x✝ * y\nhy : ¬p ∣ y\nx : α\nhxy : p ^ (Nat.zero + 1) ∣ x * y\n⊢ p ^ (Nat.zero + 1) ∣ x\n[PROOFSTEP]\nrw [pow_one] at hxy ⊢\n[GOAL]\ncase zero\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : CancelCommMonoidWithZero α\np x✝ y : α\nh : Prime p\ni : ℕ\nhxy✝ : p ^ (i + 1) ∣ x✝ * y\nhy : ¬p ∣ y\nx : α\nhxy : p ∣ x * y\n⊢ p ∣ x\n[PROOFSTEP]\nexact (h.dvd_or_dvd hxy).resolve_right hy\n[GOAL]\ncase succ\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : CancelCommMonoidWithZero α\np x✝ y : α\nh : Prime p\ni✝ : ℕ\nhxy✝ : p ^ (i✝ + 1) ∣ x✝ * y\nhy : ¬p ∣ y\ni : ℕ\nih : ∀ {x : α}, p ^ (i + 1) ∣ x * y → p ^ (i + 1) ∣ x\nx : α\nhxy : p ^ (Nat.succ i + 1) ∣ x * y\n⊢ p ^ (Nat.succ i + 1) ∣ x\n[PROOFSTEP]\nrw [pow_succ] at hxy ⊢\n[GOAL]\ncase succ\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : CancelCommMonoidWithZero α\np x✝ y : α\nh : Prime p\ni✝ : ℕ\nhxy✝ : p ^ (i✝ + 1) ∣ x✝ * y\nhy : ¬p ∣ y\ni : ℕ\nih : ∀ {x : α}, p ^ (i + 1) ∣ x * y → p ^ (i + 1) ∣ x\nx : α\nhxy : p * p ^ (i + 1) ∣ x * y\n⊢ p * p ^ (i + 1) ∣ x\n[PROOFSTEP]\nobtain ⟨x', rfl⟩ := (h.dvd_or_dvd (dvd_of_mul_right_dvd hxy)).resolve_right hy\n[GOAL]\ncase succ.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : CancelCommMonoidWithZero α\np x y : α\nh : Prime p\ni✝ : ℕ\nhxy✝ : p ^ (i✝ + 1) ∣ x * y\nhy : ¬p ∣ y\ni : ℕ\nih : ∀ {x : α}, p ^ (i + 1) ∣ x * y → p ^ (i + 1) ∣ x\nx' : α\nhxy : p * p ^ (i + 1) ∣ p * x' * y\n⊢ p * p ^ (i + 1) ∣ p * x'\n[PROOFSTEP]\nrw [mul_assoc] at hxy \n[GOAL]\ncase succ.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : CancelCommMonoidWithZero α\np x y : α\nh : Prime p\ni✝ : ℕ\nhxy✝ : p ^ (i✝ + 1) ∣ x * y\nhy : ¬p ∣ y\ni : ℕ\nih : ∀ {x : α}, p ^ (i + 1) ∣ x * y → p ^ (i + 1) ∣ x\nx' : α\nhxy : p * p ^ (i + 1) ∣ p * (x' * y)\n⊢ p * p ^ (i + 1) ∣ p * x'\n[PROOFSTEP]\nexact mul_dvd_mul_left p (ih ((mul_dvd_mul_iff_left h.ne_zero).mp hxy))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\n⊢ ¬Irreducible 1\n[PROOFSTEP]\nsimp [irreducible_iff]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : Monoid α\nx : α\nn : ℕ\nhn : n ≠ 1\n⊢ Irreducible (x ^ n) → IsUnit x\n[PROOFSTEP]\nobtain hn | hn := hn.lt_or_lt\n[GOAL]\ncase inl\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : Monoid α\nx : α\nn : ℕ\nhn✝ : n ≠ 1\nhn : n < 1\n⊢ Irreducible (x ^ n) → IsUnit x\n[PROOFSTEP]\nsimp only [Nat.lt_one_iff.mp hn, IsEmpty.forall_iff, not_irreducible_one, pow_zero]\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : Monoid α\nx : α\nn : ℕ\nhn✝ : n ≠ 1\nhn : 1 < n\n⊢ Irreducible (x ^ n) → IsUnit x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : Monoid α\nx : α\nn : ℕ\nhn✝ : n ≠ 1\nhn : 1 < n\nh : Irreducible (x ^ n)\n⊢ IsUnit x\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_lt hn\n[GOAL]\ncase inr.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : Monoid α\nx : α\nk : ℕ\nhn✝ : 1 + k + 1 ≠ 1\nhn : 1 < 1 + k + 1\nh : Irreducible (x ^ (1 + k + 1))\n⊢ IsUnit x\n[PROOFSTEP]\nrw [pow_succ, add_comm] at h \n[GOAL]\ncase inr.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : Monoid α\nx : α\nk : ℕ\nhn✝ : 1 + k + 1 ≠ 1\nhn : 1 < 1 + k + 1\nh : Irreducible (x * x ^ (k + 1))\n⊢ IsUnit x\n[PROOFSTEP]\nexact (or_iff_left_of_imp isUnit_pow_succ_iff.mp).mp (of_irreducible_mul h)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : Monoid α\nx : α\nh : ¬IsUnit x\n⊢ Irreducible x ∨ ∃ a b, ¬IsUnit a ∧ ¬IsUnit b ∧ a * b = x\n[PROOFSTEP]\nhaveI := Classical.dec\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : Monoid α\nx : α\nh : ¬IsUnit x\nthis : (p : Prop) → Decidable p\n⊢ Irreducible x ∨ ∃ a b, ¬IsUnit a ∧ ¬IsUnit b ∧ a * b = x\n[PROOFSTEP]\nrefine' or_iff_not_imp_right.2 fun H => _\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : Monoid α\nx : α\nh : ¬IsUnit x\nthis : (p : Prop) → Decidable p\nH : ¬∃ a b, ¬IsUnit a ∧ ¬IsUnit b ∧ a * b = x\n⊢ Irreducible x\n[PROOFSTEP]\nsimp [h, irreducible_iff] at H ⊢\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : Monoid α\nx : α\nh : ¬IsUnit x\nthis : (p : Prop) → Decidable p\nH : ∀ (x_1 : α), ¬IsUnit x_1 → ∀ (x_2 : α), ¬IsUnit x_2 → ¬x_1 * x_2 = x\n⊢ ∀ (a b : α), x = a * b → IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nrefine' fun a b h => by_contradiction fun o => _\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : Monoid α\nx : α\nh✝ : ¬IsUnit x\nthis : (p : Prop) → Decidable p\nH : ∀ (x_1 : α), ¬IsUnit x_1 → ∀ (x_2 : α), ¬IsUnit x_2 → ¬x_1 * x_2 = x\na b : α\nh : x = a * b\no : ¬(IsUnit a ∨ IsUnit b)\n⊢ False\n[PROOFSTEP]\nsimp [not_or] at o \n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nα : Type u_5\ninst✝ : Monoid α\nx : α\nh✝ : ¬IsUnit x\nthis : (p : Prop) → Decidable p\nH : ∀ (x_1 : α), ¬IsUnit x_1 → ∀ (x_2 : α), ¬IsUnit x_2 → ¬x_1 * x_2 = x\na b : α\nh : x = a * b\no : ¬IsUnit a ∧ ¬IsUnit b\n⊢ False\n[PROOFSTEP]\nexact H _ o.1 _ o.2 h.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\np q : α\nhp : Irreducible p\nhq : Irreducible q\n⊢ p ∣ q → q ∣ p\n[PROOFSTEP]\nrintro ⟨q', rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\np : α\nhp : Irreducible p\nq' : α\nhq : Irreducible (p * q')\n⊢ p * q' ∣ p\n[PROOFSTEP]\nrw [IsUnit.mul_right_dvd (Or.resolve_left (of_irreducible_mul hq) hp.not_unit)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\n⊢ Irreducible (↑a * b) ↔ Irreducible b\n[PROOFSTEP]\nsimp only [irreducible_iff, Units.isUnit_units_mul, and_congr_right_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\n⊢ ¬IsUnit b →\n    ((∀ (a_2 b_1 : α), ↑a * b = a_2 * b_1 → IsUnit a_2 ∨ IsUnit b_1) ↔\n      ∀ (a b_1 : α), b = a * b_1 → IsUnit a ∨ IsUnit b_1)\n[PROOFSTEP]\nrefine' fun _ => ⟨fun h A B HAB => _, fun h A B HAB => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\nx✝ : ¬IsUnit b\nh : ∀ (a_1 b_1 : α), ↑a * b = a_1 * b_1 → IsUnit a_1 ∨ IsUnit b_1\nA B : α\nHAB : b = A * B\n⊢ IsUnit A ∨ IsUnit B\n[PROOFSTEP]\nrw [← a.isUnit_units_mul]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\nx✝ : ¬IsUnit b\nh : ∀ (a_1 b_1 : α), ↑a * b = a_1 * b_1 → IsUnit a_1 ∨ IsUnit b_1\nA B : α\nHAB : b = A * B\n⊢ IsUnit (↑a * A) ∨ IsUnit B\n[PROOFSTEP]\napply h\n[GOAL]\ncase refine'_1.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\nx✝ : ¬IsUnit b\nh : ∀ (a_1 b_1 : α), ↑a * b = a_1 * b_1 → IsUnit a_1 ∨ IsUnit b_1\nA B : α\nHAB : b = A * B\n⊢ ↑a * b = ↑a * A * B\n[PROOFSTEP]\nrw [mul_assoc, ← HAB]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\nx✝ : ¬IsUnit b\nh : ∀ (a b_1 : α), b = a * b_1 → IsUnit a ∨ IsUnit b_1\nA B : α\nHAB : ↑a * b = A * B\n⊢ IsUnit A ∨ IsUnit B\n[PROOFSTEP]\nrw [← a⁻¹.isUnit_units_mul]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\nx✝ : ¬IsUnit b\nh : ∀ (a b_1 : α), b = a * b_1 → IsUnit a ∨ IsUnit b_1\nA B : α\nHAB : ↑a * b = A * B\n⊢ IsUnit (↑a⁻¹ * A) ∨ IsUnit B\n[PROOFSTEP]\napply h\n[GOAL]\ncase refine'_2.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\nx✝ : ¬IsUnit b\nh : ∀ (a b_1 : α), b = a * b_1 → IsUnit a ∨ IsUnit b_1\nA B : α\nHAB : ↑a * b = A * B\n⊢ b = ↑a⁻¹ * A * B\n[PROOFSTEP]\nrw [mul_assoc, ← HAB, Units.inv_mul_cancel_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\n⊢ Irreducible (b * ↑a) ↔ Irreducible b\n[PROOFSTEP]\nsimp only [irreducible_iff, Units.isUnit_mul_units, and_congr_right_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\n⊢ ¬IsUnit b →\n    ((∀ (a_2 b_1 : α), b * ↑a = a_2 * b_1 → IsUnit a_2 ∨ IsUnit b_1) ↔\n      ∀ (a b_1 : α), b = a * b_1 → IsUnit a ∨ IsUnit b_1)\n[PROOFSTEP]\nrefine' fun _ => ⟨fun h A B HAB => _, fun h A B HAB => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\nx✝ : ¬IsUnit b\nh : ∀ (a_1 b_1 : α), b * ↑a = a_1 * b_1 → IsUnit a_1 ∨ IsUnit b_1\nA B : α\nHAB : b = A * B\n⊢ IsUnit A ∨ IsUnit B\n[PROOFSTEP]\nrw [← Units.isUnit_mul_units B a]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\nx✝ : ¬IsUnit b\nh : ∀ (a_1 b_1 : α), b * ↑a = a_1 * b_1 → IsUnit a_1 ∨ IsUnit b_1\nA B : α\nHAB : b = A * B\n⊢ IsUnit A ∨ IsUnit (B * ↑a)\n[PROOFSTEP]\napply h\n[GOAL]\ncase refine'_1.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\nx✝ : ¬IsUnit b\nh : ∀ (a_1 b_1 : α), b * ↑a = a_1 * b_1 → IsUnit a_1 ∨ IsUnit b_1\nA B : α\nHAB : b = A * B\n⊢ b * ↑a = A * (B * ↑a)\n[PROOFSTEP]\nrw [← mul_assoc, ← HAB]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\nx✝ : ¬IsUnit b\nh : ∀ (a b_1 : α), b = a * b_1 → IsUnit a ∨ IsUnit b_1\nA B : α\nHAB : b * ↑a = A * B\n⊢ IsUnit A ∨ IsUnit B\n[PROOFSTEP]\nrw [← Units.isUnit_mul_units B a⁻¹]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\nx✝ : ¬IsUnit b\nh : ∀ (a b_1 : α), b = a * b_1 → IsUnit a ∨ IsUnit b_1\nA B : α\nHAB : b * ↑a = A * B\n⊢ IsUnit A ∨ IsUnit (B * ↑a⁻¹)\n[PROOFSTEP]\napply h\n[GOAL]\ncase refine'_2.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : αˣ\nb : α\nx✝ : ¬IsUnit b\nh : ∀ (a b_1 : α), b = a * b_1 → IsUnit a ∨ IsUnit b_1\nA B : α\nHAB : b * ↑a = A * B\n⊢ b = A * (B * ↑a⁻¹)\n[PROOFSTEP]\nrw [← mul_assoc, ← HAB, Units.mul_inv_cancel_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na b : α\n⊢ Irreducible (a * b) ↔ Irreducible a ∧ IsUnit b ∨ Irreducible b ∧ IsUnit a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na b : α\n⊢ Irreducible (a * b) → Irreducible a ∧ IsUnit b ∨ Irreducible b ∧ IsUnit a\n[PROOFSTEP]\nrefine' fun h => Or.imp (fun h' => ⟨_, h'⟩) (fun h' => ⟨_, h'⟩) (h.isUnit_or_isUnit rfl).symm\n[GOAL]\ncase mp.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na b : α\nh : Irreducible (a * b)\nh' : IsUnit b\n⊢ Irreducible a\n[PROOFSTEP]\nrwa [irreducible_mul_isUnit h'] at h \n[GOAL]\ncase mp.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na b : α\nh : Irreducible (a * b)\nh' : IsUnit a\n⊢ Irreducible b\n[PROOFSTEP]\nrwa [irreducible_isUnit_mul h'] at h \n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na b : α\n⊢ Irreducible a ∧ IsUnit b ∨ Irreducible b ∧ IsUnit a → Irreducible (a * b)\n[PROOFSTEP]\nrintro (⟨ha, hb⟩ | ⟨hb, ha⟩)\n[GOAL]\ncase mpr.inl.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na b : α\nha : Irreducible a\nhb : IsUnit b\n⊢ Irreducible (a * b)\n[PROOFSTEP]\nrwa [irreducible_mul_isUnit hb]\n[GOAL]\ncase mpr.inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na b : α\nhb : Irreducible b\nha : IsUnit a\n⊢ Irreducible (a * b)\n[PROOFSTEP]\nrwa [irreducible_isUnit_mul ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na : α\nha : Irreducible a\n⊢ ¬IsSquare a\n[PROOFSTEP]\nrintro ⟨b, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\nb : α\nha : Irreducible (b * b)\n⊢ False\n[PROOFSTEP]\nsimp only [irreducible_mul_iff, or_self_iff] at ha \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\nb : α\nha : Irreducible b ∧ IsUnit b\n⊢ False\n[PROOFSTEP]\nexact ha.1.not_unit ha.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ a\nx : α\nhx : a = a * b * x\nh : a = 0\n⊢ False\n[PROOFSTEP]\nsimp [Prime] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : ¬p = 0 ∧ ¬IsUnit p ∧ ∀ (a b : α), p ∣ a * b → p ∣ a ∨ p ∣ b\na b : α\nhab : p = a * b\nx✝ : a * b ∣ a\nx : α\nhx : a = a * b * x\nh : a = 0\n⊢ False\n[PROOFSTEP]\nrw [h, zero_mul] at hab \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : ¬p = 0 ∧ ¬IsUnit p ∧ ∀ (a b : α), p ∣ a * b → p ∣ a ∨ p ∣ b\na b : α\nhab : p = 0\nx✝ : a * b ∣ a\nx : α\nhx : a = a * b * x\nh : a = 0\n⊢ False\n[PROOFSTEP]\nhave := hp.left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : ¬p = 0 ∧ ¬IsUnit p ∧ ∀ (a b : α), p ∣ a * b → p ∣ a ∨ p ∣ b\na b : α\nhab : p = 0\nx✝ : a * b ∣ a\nx : α\nhx : a = a * b * x\nh : a = 0\nthis : ¬p = 0\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ a\nx : α\nhx : a = a * b * x\n⊢ 1 * a = b * x * a\n[PROOFSTEP]\nconv =>\n  lhs\n  rw [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ a\nx : α\nhx : a = a * b * x\n| 1 * a = b * x * a\n[PROOFSTEP]\n  lhs\n  rw [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ a\nx : α\nhx : a = a * b * x\n| 1 * a = b * x * a\n[PROOFSTEP]\n  lhs\n  rw [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ a\nx : α\nhx : a = a * b * x\n| 1 * a = b * x * a\n[PROOFSTEP]\nlhs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ a\nx : α\nhx : a = a * b * x\n| 1 * a\n[PROOFSTEP]\nrw [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ a\nx : α\nhx : a = a * b * x\n⊢ 1 * (a * b * x) = b * x * a\n[PROOFSTEP]\nsimp [mul_comm, mul_assoc, mul_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ b\nx : α\nhx : b = a * b * x\nh : b = 0\n⊢ False\n[PROOFSTEP]\nsimp [Prime] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : ¬p = 0 ∧ ¬IsUnit p ∧ ∀ (a b : α), p ∣ a * b → p ∣ a ∨ p ∣ b\na b : α\nhab : p = a * b\nx✝ : a * b ∣ b\nx : α\nhx : b = a * b * x\nh : b = 0\n⊢ False\n[PROOFSTEP]\nrw [h, mul_zero] at hab \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : ¬p = 0 ∧ ¬IsUnit p ∧ ∀ (a b : α), p ∣ a * b → p ∣ a ∨ p ∣ b\na b : α\nhab : p = 0\nx✝ : a * b ∣ b\nx : α\nhx : b = a * b * x\nh : b = 0\n⊢ False\n[PROOFSTEP]\nhave := hp.left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : ¬p = 0 ∧ ¬IsUnit p ∧ ∀ (a b : α), p ∣ a * b → p ∣ a ∨ p ∣ b\na b : α\nhab : p = 0\nx✝ : a * b ∣ b\nx : α\nhx : b = a * b * x\nh : b = 0\nthis : ¬p = 0\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ b\nx : α\nhx : b = a * b * x\n⊢ 1 * b = a * x * b\n[PROOFSTEP]\nconv =>\n  lhs\n  rw [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ b\nx : α\nhx : b = a * b * x\n| 1 * b = a * x * b\n[PROOFSTEP]\n  lhs\n  rw [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ b\nx : α\nhx : b = a * b * x\n| 1 * b = a * x * b\n[PROOFSTEP]\n  lhs\n  rw [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ b\nx : α\nhx : b = a * b * x\n| 1 * b = a * x * b\n[PROOFSTEP]\nlhs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ b\nx : α\nhx : b = a * b * x\n| 1 * b\n[PROOFSTEP]\nrw [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nhab : p = a * b\nx✝ : a * b ∣ b\nx : α\nhx : b = a * b * x\n⊢ 1 * (a * b * x) = a * x * b\n[PROOFSTEP]\nsimp [mul_comm, mul_assoc, mul_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nk l : ℕ\nx✝² : p ^ k ∣ a\nx✝¹ : p ^ l ∣ b\nx✝ : p ^ (k + l + 1) ∣ a * b\nx : α\nhx : a = p ^ k * x\ny : α\nhy : b = p ^ l * y\nz : α\nhz : a * b = p ^ (k + l + 1) * z\n⊢ p ^ (k + l) * (x * y) = p ^ (k + l) * (p * z)\n[PROOFSTEP]\nsimpa [mul_comm, pow_add, hx, hy, mul_assoc, mul_left_comm] using hz\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nk l : ℕ\nx✝² : p ^ k ∣ a\nx✝¹ : p ^ l ∣ b\nx✝ : p ^ (k + l + 1) ∣ a * b\nx : α\nhx : a = p ^ k * x\ny : α\nhy : b = p ^ l * y\nz : α\nhz : a * b = p ^ (k + l + 1) * z\nh : p ^ (k + l) * (x * y) = p ^ (k + l) * (p * z)\nhp0 : p ^ (k + l) ≠ 0\n⊢ x * y = p * z\n[PROOFSTEP]\nrwa [mul_right_inj' hp0] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nk l : ℕ\nx✝³ : p ^ k ∣ a\nx✝² : p ^ l ∣ b\nx✝¹ : p ^ (k + l + 1) ∣ a * b\nx : α\nhx : a = p ^ k * x\ny : α\nhy : b = p ^ l * y\nz : α\nhz : a * b = p ^ (k + l + 1) * z\nh : p ^ (k + l) * (x * y) = p ^ (k + l) * (p * z)\nhp0 : p ^ (k + l) ≠ 0\nhpd : p ∣ x * y\nx✝ : p ∣ x\nd : α\nhd : x = p * d\n⊢ a = p ^ (k + 1) * d\n[PROOFSTEP]\nsimp [*, pow_succ, mul_comm, mul_left_comm, mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na✝ p : α\nhp : Prime p\na b : α\nk l : ℕ\nx✝³ : p ^ k ∣ a\nx✝² : p ^ l ∣ b\nx✝¹ : p ^ (k + l + 1) ∣ a * b\nx : α\nhx : a = p ^ k * x\ny : α\nhy : b = p ^ l * y\nz : α\nhz : a * b = p ^ (k + l + 1) * z\nh : p ^ (k + l) * (x * y) = p ^ (k + l) * (p * z)\nhp0 : p ^ (k + l) ≠ 0\nhpd : p ∣ x * y\nx✝ : p ∣ y\nd : α\nhd : y = p * d\n⊢ b = p ^ (l + 1) * d\n[PROOFSTEP]\nsimp [*, pow_succ, mul_comm, mul_left_comm, mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\nx : α\n⊢ x * ↑1 = x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\nx : α\nu : αˣ\n⊢ x * ↑u * ↑u⁻¹ = x\n[PROOFSTEP]\nrw [mul_assoc, Units.mul_inv, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\nx : α\nu v : αˣ\n⊢ x * ↑(u * v) = x * ↑u * ↑v\n[PROOFSTEP]\nrw [Units.val_mul, mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na : α\nx✝ : IsUnit a\nc : αˣ\nh : ↑c = a\n⊢ 1 * ↑c = a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MonoidWithZero α\na : α\nh : a ~ᵤ 0\n⊢ a = 0\n[PROOFSTEP]\nlet ⟨u, h⟩ := h.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MonoidWithZero α\na : α\nh✝ : a ~ᵤ 0\nu : αˣ\nh : 0 * ↑u = a\n⊢ a = 0\n[PROOFSTEP]\nsimpa using h.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nu : αˣ\nh : a * b * ↑u = 1\n⊢ a * (b * ↑u) = 1\n[PROOFSTEP]\nsimpa [mul_assoc] using h\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nβ : Type u_5\ninst✝ : CommMonoid β\na u : β\nhu : IsUnit u\n⊢ u * a ~ᵤ a\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nβ : Type u_5\ninst✝ : CommMonoid β\na u : β\nhu : IsUnit u\n⊢ a * u ~ᵤ a\n[PROOFSTEP]\nexact associated_mul_unit_left _ _ hu\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nβ : Type u_5\ninst✝ : CommMonoid β\nu a b : β\nhu : IsUnit u\n⊢ u * a ~ᵤ b ↔ a ~ᵤ b\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nβ : Type u_5\ninst✝ : CommMonoid β\nu a b : β\nhu : IsUnit u\n⊢ a * u ~ᵤ b ↔ a ~ᵤ b\n[PROOFSTEP]\nexact associated_mul_isUnit_left_iff hu\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na₁ a₂ b₁ b₂ : α\nc₁ : αˣ\nh₁ : a₁ * ↑c₁ = b₁\nc₂ : αˣ\nh₂ : a₂ * ↑c₂ = b₂\n⊢ a₁ * a₂ * ↑(c₁ * c₂) = b₁ * b₂\n[PROOFSTEP]\nsimp [h₁.symm, h₂.symm, mul_assoc, mul_comm, mul_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nn : ℕ\nh : a ~ᵤ b\n⊢ a ^ n ~ᵤ b ^ n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nh : a ~ᵤ b\n⊢ a ^ Nat.zero ~ᵤ b ^ Nat.zero\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nh : a ~ᵤ b\n⊢ 1 ~ᵤ 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nh : a ~ᵤ b\nn : ℕ\nih : a ^ n ~ᵤ b ^ n\n⊢ a ^ Nat.succ n ~ᵤ b ^ Nat.succ n\n[PROOFSTEP]\nconvert h.mul_mul ih\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nh : a ~ᵤ b\nn : ℕ\nih : a ^ n ~ᵤ b ^ n\n⊢ a ^ Nat.succ n = a * a ^ n\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nh : a ~ᵤ b\nn : ℕ\nih : a ^ n ~ᵤ b ^ n\n⊢ b ^ Nat.succ n = b * b ^ n\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na b : α\nhab : a ∣ b\nhba : b ∣ a\n⊢ a ~ᵤ b\n[PROOFSTEP]\nrcases hab with ⟨c, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c : α\nhba : a * c ∣ a\n⊢ a ~ᵤ a * c\n[PROOFSTEP]\nrcases hba with ⟨d, a_eq⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = a * c * d\n⊢ a ~ᵤ a * c\n[PROOFSTEP]\nby_cases ha0 : a = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = a * c * d\nha0 : a = 0\n⊢ a ~ᵤ a * c\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\nha0 : a = 0\n⊢ 0 ~ᵤ 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = a * c * d\nha0 : ¬a = 0\n⊢ a ~ᵤ a * c\n[PROOFSTEP]\nhave hac0 : a * c ≠ 0 := by\n  intro con\n  rw [con, zero_mul] at a_eq \n  apply ha0 a_eq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = a * c * d\nha0 : ¬a = 0\n⊢ a * c ≠ 0\n[PROOFSTEP]\nintro con\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = a * c * d\nha0 : ¬a = 0\ncon : a * c = 0\n⊢ False\n[PROOFSTEP]\nrw [con, zero_mul] at a_eq \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = 0\nha0 : ¬a = 0\ncon : a * c = 0\n⊢ False\n[PROOFSTEP]\napply ha0 a_eq\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = a * c * d\nha0 : ¬a = 0\nhac0 : a * c ≠ 0\n⊢ a ~ᵤ a * c\n[PROOFSTEP]\nhave : a * (c * d) = a * 1 := by rw [← mul_assoc, ← a_eq, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = a * c * d\nha0 : ¬a = 0\nhac0 : a * c ≠ 0\n⊢ a * (c * d) = a * 1\n[PROOFSTEP]\nrw [← mul_assoc, ← a_eq, mul_one]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = a * c * d\nha0 : ¬a = 0\nhac0 : a * c ≠ 0\nthis : a * (c * d) = a * 1\n⊢ a ~ᵤ a * c\n[PROOFSTEP]\nhave hcd : c * d = 1 := mul_left_cancel₀ ha0 this\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = a * c * d\nha0 : ¬a = 0\nhac0 : a * c ≠ 0\nthis : a * (c * d) = a * 1\nhcd : c * d = 1\n⊢ a ~ᵤ a * c\n[PROOFSTEP]\nhave : a * c * (d * c) = a * c * 1 := by rw [← mul_assoc, ← a_eq, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = a * c * d\nha0 : ¬a = 0\nhac0 : a * c ≠ 0\nthis : a * (c * d) = a * 1\nhcd : c * d = 1\n⊢ a * c * (d * c) = a * c * 1\n[PROOFSTEP]\nrw [← mul_assoc, ← a_eq, mul_one]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = a * c * d\nha0 : ¬a = 0\nhac0 : a * c ≠ 0\nthis✝ : a * (c * d) = a * 1\nhcd : c * d = 1\nthis : a * c * (d * c) = a * c * 1\n⊢ a ~ᵤ a * c\n[PROOFSTEP]\nhave hdc : d * c = 1 := mul_left_cancel₀ hac0 this\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelMonoidWithZero α\na c d : α\na_eq : a = a * c * d\nha0 : ¬a = 0\nhac0 : a * c ≠ 0\nthis✝ : a * (c * d) = a * 1\nhcd : c * d = 1\nthis : a * c * (d * c) = a * c * 1\nhdc : d * c = 1\n⊢ a ~ᵤ a * c\n[PROOFSTEP]\nexact ⟨⟨c, d, hcd, hdc⟩, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MonoidWithZero α\na b : α\nh : a ~ᵤ b\nha : a = 0\n⊢ b = 0\n[PROOFSTEP]\nlet ⟨u, hu⟩ := h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MonoidWithZero α\na b : α\nh : a ~ᵤ b\nha : a = 0\nu : αˣ\nhu : a * ↑u = b\n⊢ b = 0\n[PROOFSTEP]\nsimp [hu.symm, ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MonoidWithZero α\na b : α\nh : a ~ᵤ b\nhb : b = 0\n⊢ a = 0\n[PROOFSTEP]\nlet ⟨u, hu⟩ := h.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : MonoidWithZero α\na b : α\nh : a ~ᵤ b\nhb : b = 0\nu : αˣ\nhu : b * ↑u = a\n⊢ a = 0\n[PROOFSTEP]\nsimp [hu.symm, hb]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np q : α\nh : p ~ᵤ q\nhp : Prime p\nu : αˣ\nhu : p * ↑u = q\nx✝ : IsUnit q\nv : αˣ\nhv : ↑v = q\n⊢ ↑(v * u⁻¹) = p\n[PROOFSTEP]\nsimp [hv, hu.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np q : α\nh : p ~ᵤ q\nhp : Prime p\nu : αˣ\nhu : p * ↑u = q\n⊢ ∀ (a b : α), p * ↑u ∣ a * b → p * ↑u ∣ a ∨ p * ↑u ∣ b\n[PROOFSTEP]\nsimp [Units.mul_right_dvd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np q : α\nh : p ~ᵤ q\nhp : Prime p\nu : αˣ\nhu : p * ↑u = q\n⊢ ∀ (a b : α), p ∣ a * b → p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nintro a b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np q : α\nh : p ~ᵤ q\nhp : Prime p\nu : αˣ\nhu : p * ↑u = q\na b : α\n⊢ p ∣ a * b → p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nexact hp.dvd_or_dvd\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\na b : α\nh : a ~ᵤ b\nu : αˣ\nhu : a * ↑u = b\nx✝ : IsUnit a\nv : αˣ\nhv : ↑v = a\n⊢ ↑(v * u) = b\n[PROOFSTEP]\nsimp [hv, hu.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\np q : α\nh : p ~ᵤ q\nhp : Irreducible p\nu : αˣ\nhu : p * ↑u = q\na b : α\nhab : q = a * b\n⊢ p = p * ↑u * ↑u⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\np q : α\nh : p ~ᵤ q\nhp : Irreducible p\nu : αˣ\nhu : p * ↑u = q\na b : α\nhab : q = a * b\n⊢ p * ↑u * ↑u⁻¹ = a * (b * ↑u⁻¹)\n[PROOFSTEP]\nrw [hu]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\np q : α\nh : p ~ᵤ q\nhp : Irreducible p\nu : αˣ\nhu : p * ↑u = q\na b : α\nhab : q = a * b\n⊢ q * ↑u⁻¹ = a * (b * ↑u⁻¹)\n[PROOFSTEP]\nsimp [hab, mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Monoid α\np q : α\nh : p ~ᵤ q\nhp : Irreducible p\nu : αˣ\nhu : p * ↑u = q\na b : α\nhab : q = a * b\nhpab : p = a * (b * ↑u⁻¹)\nx✝ : IsUnit (b * ↑u⁻¹)\nv : αˣ\nhv : ↑v = b * ↑u⁻¹\n⊢ ↑(v * u) = b\n[PROOFSTEP]\nsimp [hv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na b c d : α\nh : a * b ~ᵤ c * d\nh₁ : a ~ᵤ c\nha : a ≠ 0\nu : αˣ\nhu : a * b * ↑u = c * d\nv : αˣ\nhv : c * ↑v = a\n⊢ a * (b * ↑(u * v)) = a * d\n[PROOFSTEP]\nrw [← hv, mul_assoc c (v : α) d, mul_left_comm c, ← hu]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na b c d : α\nh : a * b ~ᵤ c * d\nh₁ : a ~ᵤ c\nha : a ≠ 0\nu : αˣ\nhu : a * b * ↑u = c * d\nv : αˣ\nhv : c * ↑v = a\n⊢ c * ↑v * (b * ↑(u * v)) = ↑v * (a * b * ↑u)\n[PROOFSTEP]\nsimp [hv.symm, mul_assoc, mul_comm, mul_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na b c d : α\n⊢ a * b ~ᵤ c * d → b ~ᵤ d → b ≠ 0 → a ~ᵤ c\n[PROOFSTEP]\nrw [mul_comm a, mul_comm c]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na b c d : α\n⊢ b * a ~ᵤ d * c → b ~ᵤ d → b ≠ 0 → a ~ᵤ c\n[PROOFSTEP]\nexact Associated.of_mul_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np₁ p₂ : α\nk₁ k₂ : ℕ\nhp₁ : Prime p₁\nhp₂ : Prime p₂\nhk₁ : 0 < k₁\nh : p₁ ^ k₁ ~ᵤ p₂ ^ k₂\n⊢ p₁ ~ᵤ p₂\n[PROOFSTEP]\nhave : p₁ ∣ p₂ ^ k₂ := by\n  rw [← h.dvd_iff_dvd_right]\n  apply dvd_pow_self _ hk₁.ne'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np₁ p₂ : α\nk₁ k₂ : ℕ\nhp₁ : Prime p₁\nhp₂ : Prime p₂\nhk₁ : 0 < k₁\nh : p₁ ^ k₁ ~ᵤ p₂ ^ k₂\n⊢ p₁ ∣ p₂ ^ k₂\n[PROOFSTEP]\nrw [← h.dvd_iff_dvd_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np₁ p₂ : α\nk₁ k₂ : ℕ\nhp₁ : Prime p₁\nhp₂ : Prime p₂\nhk₁ : 0 < k₁\nh : p₁ ^ k₁ ~ᵤ p₂ ^ k₂\n⊢ p₁ ∣ p₁ ^ k₁\n[PROOFSTEP]\napply dvd_pow_self _ hk₁.ne'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np₁ p₂ : α\nk₁ k₂ : ℕ\nhp₁ : Prime p₁\nhp₂ : Prime p₂\nhk₁ : 0 < k₁\nh : p₁ ^ k₁ ~ᵤ p₂ ^ k₂\nthis : p₁ ∣ p₂ ^ k₂\n⊢ p₁ ~ᵤ p₂\n[PROOFSTEP]\nrw [← hp₁.dvd_prime_iff_associated hp₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np₁ p₂ : α\nk₁ k₂ : ℕ\nhp₁ : Prime p₁\nhp₂ : Prime p₂\nhk₁ : 0 < k₁\nh : p₁ ^ k₁ ~ᵤ p₂ ^ k₂\nthis : p₁ ∣ p₂ ^ k₂\n⊢ p₁ ∣ p₂\n[PROOFSTEP]\nexact hp₁.dvd_of_dvd_pow this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : Monoid α\ninst✝ : Unique αˣ\nx y : α\n⊢ x ~ᵤ y ↔ x = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : Monoid α\ninst✝ : Unique αˣ\nx y : α\n⊢ x ~ᵤ y → x = y\n[PROOFSTEP]\nrintro ⟨c, rfl⟩\n[GOAL]\ncase mp.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : Monoid α\ninst✝ : Unique αˣ\nx : α\nc : αˣ\n⊢ x = x * ↑c\n[PROOFSTEP]\nrw [units_eq_one c, Units.val_one, mul_one]\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : Monoid α\ninst✝ : Unique αˣ\nx y : α\n⊢ x = y → x ~ᵤ y\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : Monoid α\ninst✝ : Unique αˣ\nx : α\n⊢ x ~ᵤ x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : Monoid α\ninst✝ : Unique αˣ\n⊢ Associated = Eq\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : Monoid α\ninst✝ : Unique αˣ\nx✝¹ x✝ : α\n⊢ x✝¹ ~ᵤ x✝ ↔ x✝¹ = x✝\n[PROOFSTEP]\nrw [associated_iff_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : Monoid α\ninst✝² : Unique αˣ\nM : Type u_5\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : Unique Mˣ\np q : M\npp : Prime p\nqp : Prime q\n⊢ p ∣ q ↔ p = q\n[PROOFSTEP]\nrw [pp.dvd_prime_iff_associated qp, ← associated_eq_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nR : Type u_5\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : Unique Rˣ\np₁ p₂ : R\nk₁ k₂ : ℕ\nhp₁ : Prime p₁\nhp₂ : Prime p₂\nhk₁ : 0 < k₁\nh : p₁ ^ k₁ = p₂ ^ k₂\n⊢ p₁ = p₂\n[PROOFSTEP]\nrw [← associated_iff_eq] at h ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nR : Type u_5\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : Unique Rˣ\np₁ p₂ : R\nk₁ k₂ : ℕ\nhp₁ : Prime p₁\nhp₂ : Prime p₂\nhk₁ : 0 < k₁\nh✝ : p₁ ^ k₁ = p₂ ^ k₂\nh : p₁ ^ k₁ ~ᵤ p₂ ^ k₂\n⊢ p₁ ~ᵤ p₂\n[PROOFSTEP]\napply h.of_pow_associated_of_prime hp₁ hp₂ hk₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nR : Type u_5\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : Unique Rˣ\np₁ p₂ : R\nk₁ k₂ : ℕ\nhp₁ : Prime p₁\nhp₂ : Prime p₂\nhk₁ : 0 < k₂\nh : p₁ ^ k₁ = p₂ ^ k₂\n⊢ p₁ = p₂\n[PROOFSTEP]\nrw [← associated_iff_eq] at h ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nR : Type u_5\ninst✝¹ : CancelCommMonoidWithZero R\ninst✝ : Unique Rˣ\np₁ p₂ : R\nk₁ k₂ : ℕ\nhp₁ : Prime p₁\nhp₂ : Prime p₂\nhk₁ : 0 < k₂\nh✝ : p₁ ^ k₁ = p₂ ^ k₂\nh : p₁ ^ k₁ ~ᵤ p₂ ^ k₂\n⊢ p₁ ~ᵤ p₂\n[PROOFSTEP]\napply h.of_pow_associated_of_prime' hp₁ hp₂ hk₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : Monoid α\ninst✝ : Subsingleton α\na : Associates α\n⊢ a = default\n[PROOFSTEP]\napply Quotient.recOnSubsingleton₂\n[GOAL]\ncase g\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : Monoid α\ninst✝ : Subsingleton α\na : Associates α\n⊢ ∀ (a b : α), Quotient.mk (Associated.setoid α) a = Quotient.mk (Associated.setoid α) b\n[PROOFSTEP]\nintro a b\n[GOAL]\ncase g\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : Monoid α\ninst✝ : Subsingleton α\na✝ : Associates α\na b : α\n⊢ Quotient.mk (Associated.setoid α) a = Quotient.mk (Associated.setoid α) b\n[PROOFSTEP]\ncongr\n[GOAL]\ncase g.e_a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : Monoid α\ninst✝ : Subsingleton α\na✝ : Associates α\na b : α\n⊢ a = b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na' b' : Associates α\na₁ a₂ b₁ b₂ : α\nx✝¹ : a₁ ≈ b₁\nx✝ : a₂ ≈ b₂\nc₁ : αˣ\nh₁ : a₁ * ↑c₁ = b₁\nc₂ : αˣ\nh₂ : a₂ * ↑c₂ = b₂\n⊢ a₁ * a₂ * ↑(c₁ * c₂) = b₁ * b₂\n[PROOFSTEP]\nrw [← h₁, ← h₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na' b' : Associates α\na₁ a₂ b₁ b₂ : α\nx✝¹ : a₁ ≈ b₁\nx✝ : a₂ ≈ b₂\nc₁ : αˣ\nh₁ : a₁ * ↑c₁ = b₁\nc₂ : αˣ\nh₂ : a₂ * ↑c₂ = b₂\n⊢ a₁ * a₂ * ↑(c₁ * c₂) = a₁ * ↑c₁ * (a₂ * ↑c₂)\n[PROOFSTEP]\nsimp [h₁.symm, h₂.symm, mul_assoc, mul_comm, mul_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na' b' c' : Associates α\na b c : α\n⊢ Quotient.mk (Associated.setoid α) (a * b * c) = Quotient.mk (Associated.setoid α) (a * (b * c))\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na' : Associates α\na : α\n⊢ Quotient.mk (Associated.setoid α) (1 * a) = Quotient.mk (Associated.setoid α) a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na' : Associates α\na : α\n⊢ Quotient.mk (Associated.setoid α) (a * 1) = Quotient.mk (Associated.setoid α) a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na' b' : Associates α\na b : α\n⊢ Quotient.mk (Associated.setoid α) (a * b) = Quotient.mk (Associated.setoid α) (b * a)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na : α\nn : ℕ\n⊢ Associates.mk (a ^ n) = Associates.mk a ^ n\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na : α\n⊢ Associates.mk (a ^ Nat.zero) = Associates.mk a ^ Nat.zero\n[PROOFSTEP]\nsimp [*, pow_succ, Associates.mk_mul_mk.symm]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na : α\nn✝ : ℕ\nn_ih✝ : Associates.mk (a ^ n✝) = Associates.mk a ^ n✝\n⊢ Associates.mk (a ^ Nat.succ n✝) = Associates.mk a ^ Nat.succ n✝\n[PROOFSTEP]\nsimp [*, pow_succ, Associates.mk_mul_mk.symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\nx y : Associates α\na b : α\nh : Quotient.mk (Associated.setoid α) a * Quotient.mk (Associated.setoid α) b = 1\nthis : a * b ~ᵤ 1\n⊢ b * ?m.284131 a b h this ~ᵤ 1\n[PROOFSTEP]\nrwa [mul_comm] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\nx y : Associates α\n⊢ x = 1 ∧ y = 1 → x * y = 1\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\nu : (Associates α)ˣ\n⊢ ↑u = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na : Associates α\n⊢ IsUnit a ↔ a = ⊥\n[PROOFSTEP]\nrw [Associates.isUnit_iff_eq_one, bot_eq_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na : α\n⊢ IsUnit (Associates.mk a) ↔ a ~ᵤ 1\n[PROOFSTEP]\nrw [isUnit_iff_eq_one, one_eq_mk_one, mk_eq_mk_iff_associated]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b c d : Associates α\nh₁ : a ≤ b\nh₂ : c ≤ d\nx : Associates α\nhx : b = a * x\ny : Associates α\nhy : d = c * y\n⊢ b * d = a * c * (x * y)\n[PROOFSTEP]\nsimp [hx, hy, mul_comm, mul_assoc, mul_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : Associates α\n⊢ a ≤ b * a\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : Associates α\n⊢ a ≤ a * b\n[PROOFSTEP]\nexact le_mul_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nc' : Associates α\nhc' : Associates.mk b = Associates.mk a * c'\n⊢ ∀ (c : α), Associates.mk b = Associates.mk a * Quotient.mk (Associated.setoid α) c → a ∣ b\n[PROOFSTEP]\nintro c hc\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nc' : Associates α\nhc' : Associates.mk b = Associates.mk a * c'\nc : α\nhc : Associates.mk b = Associates.mk a * Quotient.mk (Associated.setoid α) c\n⊢ a ∣ b\n[PROOFSTEP]\nlet ⟨d, hd⟩ := (Quotient.exact hc).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nc' : Associates α\nhc' : Associates.mk b = Associates.mk a * c'\nc : α\nhc : Associates.mk b = Associates.mk a * Quotient.mk (Associated.setoid α) c\nd : αˣ\nhd : a * c * ↑d = b\n⊢ a ∣ b\n[PROOFSTEP]\nexact\n  ⟨↑d * c,\n    calc\n      b = a * c * ↑d := hd.symm\n      _ = a * (↑d * c) := by ac_rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nc' : Associates α\nhc' : Associates.mk b = Associates.mk a * c'\nc : α\nhc : Associates.mk b = Associates.mk a * Quotient.mk (Associated.setoid α) c\nd : αˣ\nhd : a * c * ↑d = b\n⊢ a * c * ↑d = a * (↑d * c)\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nx✝ : a ∣ b\nc : α\nhc : b = a * c\n⊢ Associates.mk b = Associates.mk a * Associates.mk c\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoid α\na b : α\nx✝ : a ∣ b\nc : α\nhc : b = a * c\n⊢ Associates.mk (a * c) = Associates.mk a * Associates.mk c\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\n⊢ ∀ (a : Associates α), 0 * a = 0\n[PROOFSTEP]\nrintro ⟨a⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na✝ : Associates α\na : α\n⊢ 0 * Quot.mk Setoid.r a = 0\n[PROOFSTEP]\nshow Associates.mk (0 * a) = Associates.mk 0\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na✝ : Associates α\na : α\n⊢ Associates.mk (0 * a) = Associates.mk 0\n[PROOFSTEP]\nrw [zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\n⊢ ∀ (a : Associates α), a * 0 = 0\n[PROOFSTEP]\nrintro ⟨a⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na✝ : Associates α\na : α\n⊢ Quot.mk Setoid.r a * 0 = 0\n[PROOFSTEP]\nshow Associates.mk (a * 0) = Associates.mk 0\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na✝ : Associates α\na : α\n⊢ Associates.mk (a * 0) = Associates.mk 0\n[PROOFSTEP]\nrw [mul_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ Prime (Associates.mk p) ↔ Prime p\n[PROOFSTEP]\nrw [Prime, _root_.Prime, forall_associated]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ (Associates.mk p ≠ 0 ∧\n      ¬IsUnit (Associates.mk p) ∧\n        ∀ (a : α) (b : Associates α),\n          Associates.mk p ∣ Associates.mk a * b → Associates.mk p ∣ Associates.mk a ∨ Associates.mk p ∣ b) ↔\n    p ≠ 0 ∧ ¬IsUnit p ∧ ∀ (a b : α), p ∣ a * b → p ∣ a ∨ p ∣ b\n[PROOFSTEP]\ntrans\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ (Associates.mk p ≠ 0 ∧\n      ¬IsUnit (Associates.mk p) ∧\n        ∀ (a : α) (b : Associates α),\n          Associates.mk p ∣ Associates.mk a * b → Associates.mk p ∣ Associates.mk a ∨ Associates.mk p ∣ b) ↔\n    ?m.311388\n[PROOFSTEP]\napply and_congr\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ Associates.mk p ≠ 0 ↔ ?c\ncase h₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ (¬IsUnit (Associates.mk p) ∧\n      ∀ (a : α) (b : Associates α),\n        Associates.mk p ∣ Associates.mk a * b → Associates.mk p ∣ Associates.mk a ∨ Associates.mk p ∣ b) ↔\n    ?d\ncase c\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ Prop\ncase d α : Type u_1 β : Type u_2 γ : Type u_3 δ : Type u_4 inst✝ : CommMonoidWithZero α p : α ⊢ Prop\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ (¬IsUnit (Associates.mk p) ∧\n      ∀ (a : α) (b : Associates α),\n        Associates.mk p ∣ Associates.mk a * b → Associates.mk p ∣ Associates.mk a ∨ Associates.mk p ∣ b) ↔\n    ?d\ncase d α : Type u_1 β : Type u_2 γ : Type u_3 δ : Type u_4 inst✝ : CommMonoidWithZero α p : α ⊢ Prop\n[PROOFSTEP]\napply and_congr\n[GOAL]\ncase h₂.h₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ ¬IsUnit (Associates.mk p) ↔ ?h₂.c\ncase h₂.h₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ (∀ (a : α) (b : Associates α),\n      Associates.mk p ∣ Associates.mk a * b → Associates.mk p ∣ Associates.mk a ∨ Associates.mk p ∣ b) ↔\n    ?h₂.d\ncase h₂.c\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ Prop\ncase h₂.d α : Type u_1 β : Type u_2 γ : Type u_3 δ : Type u_4 inst✝ : CommMonoidWithZero α p : α ⊢ Prop\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂.h₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ (∀ (a : α) (b : Associates α),\n      Associates.mk p ∣ Associates.mk a * b → Associates.mk p ∣ Associates.mk a ∨ Associates.mk p ∣ b) ↔\n    ?h₂.d\ncase h₂.d α : Type u_1 β : Type u_2 γ : Type u_3 δ : Type u_4 inst✝ : CommMonoidWithZero α p : α ⊢ Prop\n[PROOFSTEP]\napply forall_congr'\n[GOAL]\ncase h₂.h₂.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ ∀ (a : α),\n    (∀ (b : Associates α),\n        Associates.mk p ∣ Associates.mk a * b → Associates.mk p ∣ Associates.mk a ∨ Associates.mk p ∣ b) ↔\n      ?h₂.h₂.q a\ncase h₂.h₂.q α : Type u_1 β : Type u_2 γ : Type u_3 δ : Type u_4 inst✝ : CommMonoidWithZero α p : α ⊢ α → Prop\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h₂.h₂.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np a : α\n⊢ (∀ (b : Associates α),\n      Associates.mk p ∣ Associates.mk a * b → Associates.mk p ∣ Associates.mk a ∨ Associates.mk p ∣ b) ↔\n    ?h₂.h₂.q a\ncase h₂.h₂.q α : Type u_1 β : Type u_2 γ : Type u_3 δ : Type u_4 inst✝ : CommMonoidWithZero α p : α ⊢ α → Prop\n[PROOFSTEP]\nexact forall_associated\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ (Associates.mk p ≠ 0 ∧\n      ¬IsUnit (Associates.mk p) ∧\n        ∀ (a a_1 : α),\n          Associates.mk p ∣ Associates.mk a * Associates.mk a_1 →\n            Associates.mk p ∣ Associates.mk a ∨ Associates.mk p ∣ Associates.mk a_1) ↔\n    p ≠ 0 ∧ ¬IsUnit p ∧ ∀ (a b : α), p ∣ a * b → p ∣ a ∨ p ∣ b\n[PROOFSTEP]\napply and_congr mk_ne_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ (¬IsUnit (Associates.mk p) ∧\n      ∀ (a a_1 : α),\n        Associates.mk p ∣ Associates.mk a * Associates.mk a_1 →\n          Associates.mk p ∣ Associates.mk a ∨ Associates.mk p ∣ Associates.mk a_1) ↔\n    ¬IsUnit p ∧ ∀ (a b : α), p ∣ a * b → p ∣ a ∨ p ∣ b\n[PROOFSTEP]\napply and_congr\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ ¬IsUnit (Associates.mk p) ↔ ¬IsUnit p\n[PROOFSTEP]\nrw [isUnit_mk]\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np : α\n⊢ (∀ (a a_1 : α),\n      Associates.mk p ∣ Associates.mk a * Associates.mk a_1 →\n        Associates.mk p ∣ Associates.mk a ∨ Associates.mk p ∣ Associates.mk a_1) ↔\n    ∀ (a b : α), p ∣ a * b → p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nrefine' forall₂_congr fun a b => _\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np a b : α\n⊢ Associates.mk p ∣ Associates.mk a * Associates.mk b →\n      Associates.mk p ∣ Associates.mk a ∨ Associates.mk p ∣ Associates.mk b ↔\n    p ∣ a * b → p ∣ a ∨ p ∣ b\n[PROOFSTEP]\nrw [mk_mul_mk, mk_dvd_mk, mk_dvd_mk, mk_dvd_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : α\n⊢ Irreducible (Associates.mk a) ↔ Irreducible a\n[PROOFSTEP]\nsimp only [irreducible_iff, isUnit_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : α\n⊢ (¬IsUnit a ∧ ∀ (a_1 b : Associates α), Associates.mk a = a_1 * b → IsUnit a_1 ∨ IsUnit b) ↔\n    ¬IsUnit a ∧ ∀ (a_1 b : α), a = a_1 * b → IsUnit a_1 ∨ IsUnit b\n[PROOFSTEP]\napply and_congr Iff.rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : α\n⊢ (∀ (a_1 b : Associates α), Associates.mk a = a_1 * b → IsUnit a_1 ∨ IsUnit b) ↔\n    ∀ (a_1 b : α), a = a_1 * b → IsUnit a_1 ∨ IsUnit b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : α\n⊢ (∀ (a_1 b : Associates α), Associates.mk a = a_1 * b → IsUnit a_1 ∨ IsUnit b) →\n    ∀ (a_2 b : α), a = a_2 * b → IsUnit a_2 ∨ IsUnit b\n[PROOFSTEP]\nrintro h x y rfl\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\nx y : α\nh : ∀ (a b : Associates α), Associates.mk (x * y) = a * b → IsUnit a ∨ IsUnit b\n⊢ IsUnit x ∨ IsUnit y\n[PROOFSTEP]\nsimpa [isUnit_mk] using h (Associates.mk x) (Associates.mk y) rfl\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : α\n⊢ (∀ (a_1 b : α), a = a_1 * b → IsUnit a_1 ∨ IsUnit b) →\n    ∀ (a_2 b : Associates α), Associates.mk a = a_2 * b → IsUnit a_2 ∨ IsUnit b\n[PROOFSTEP]\nintro h x y\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : α\nh : ∀ (a_1 b : α), a = a_1 * b → IsUnit a_1 ∨ IsUnit b\nx y : Associates α\n⊢ Associates.mk a = x * y → IsUnit x ∨ IsUnit y\n[PROOFSTEP]\nrefine' Quotient.inductionOn₂ x y fun x y a_eq => _\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : α\nh : ∀ (a_1 b : α), a = a_1 * b → IsUnit a_1 ∨ IsUnit b\nx✝ y✝ : Associates α\nx y : α\na_eq : Associates.mk a = Quotient.mk (Associated.setoid α) x * Quotient.mk (Associated.setoid α) y\n⊢ IsUnit (Quotient.mk (Associated.setoid α) x) ∨ IsUnit (Quotient.mk (Associated.setoid α) y)\n[PROOFSTEP]\nrcases Quotient.exact a_eq.symm with ⟨u, a_eq⟩\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : α\nh : ∀ (a_1 b : α), a = a_1 * b → IsUnit a_1 ∨ IsUnit b\nx✝ y✝ : Associates α\nx y : α\na_eq✝ : Associates.mk a = Quotient.mk (Associated.setoid α) x * Quotient.mk (Associated.setoid α) y\nu : αˣ\na_eq : x * y * ↑u = a\n⊢ IsUnit (Quotient.mk (Associated.setoid α) x) ∨ IsUnit (Quotient.mk (Associated.setoid α) y)\n[PROOFSTEP]\nrw [mul_assoc] at a_eq \n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : α\nh : ∀ (a_1 b : α), a = a_1 * b → IsUnit a_1 ∨ IsUnit b\nx✝ y✝ : Associates α\nx y : α\na_eq✝ : Associates.mk a = Quotient.mk (Associated.setoid α) x * Quotient.mk (Associated.setoid α) y\nu : αˣ\na_eq : x * (y * ↑u) = a\n⊢ IsUnit (Quotient.mk (Associated.setoid α) x) ∨ IsUnit (Quotient.mk (Associated.setoid α) y)\n[PROOFSTEP]\nshow IsUnit (Associates.mk x) ∨ IsUnit (Associates.mk y)\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : α\nh : ∀ (a_1 b : α), a = a_1 * b → IsUnit a_1 ∨ IsUnit b\nx✝ y✝ : Associates α\nx y : α\na_eq✝ : Associates.mk a = Quotient.mk (Associated.setoid α) x * Quotient.mk (Associated.setoid α) y\nu : αˣ\na_eq : x * (y * ↑u) = a\n⊢ IsUnit (Associates.mk x) ∨ IsUnit (Associates.mk y)\n[PROOFSTEP]\nsimpa [isUnit_mk] using h _ _ a_eq.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\n⊢ DvdNotUnit (Associates.mk a) (Associates.mk b) ↔ DvdNotUnit a b\n[PROOFSTEP]\nrw [DvdNotUnit, DvdNotUnit, mk_ne_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\n⊢ (a ≠ 0 ∧ ∃ x, ¬IsUnit x ∧ Associates.mk b = Associates.mk a * x) ↔ a ≠ 0 ∧ ∃ x, ¬IsUnit x ∧ b = a * x\n[PROOFSTEP]\napply and_congr_right\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\n⊢ a ≠ 0 → ((∃ x, ¬IsUnit x ∧ Associates.mk b = Associates.mk a * x) ↔ ∃ x, ¬IsUnit x ∧ b = a * x)\n[PROOFSTEP]\nintro\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\n⊢ (∃ x, ¬IsUnit x ∧ Associates.mk b = Associates.mk a * x) ↔ ∃ x, ¬IsUnit x ∧ b = a * x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\n⊢ (∃ x, ¬IsUnit x ∧ Associates.mk b = Associates.mk a * x) → ∃ x, ¬IsUnit x ∧ b = a * x\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\n⊢ (∀ (x : α), ¬IsUnit x → b ≠ a * x) → ∀ (x : Associates α), ¬IsUnit x → Associates.mk b ≠ Associates.mk a * x\n[PROOFSTEP]\nrw [forall_associated]\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\n⊢ (∀ (x : α), ¬IsUnit x → b ≠ a * x) →\n    ∀ (a_2 : α), ¬IsUnit (Associates.mk a_2) → Associates.mk b ≠ Associates.mk a * Associates.mk a_2\n[PROOFSTEP]\nintro h x hx hbax\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\nh : ∀ (x : α), ¬IsUnit x → b ≠ a * x\nx : α\nhx : ¬IsUnit (Associates.mk x)\nhbax : Associates.mk b = Associates.mk a * Associates.mk x\n⊢ False\n[PROOFSTEP]\nrw [mk_mul_mk, mk_eq_mk_iff_associated] at hbax \n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\nh : ∀ (x : α), ¬IsUnit x → b ≠ a * x\nx : α\nhx : ¬IsUnit (Associates.mk x)\nhbax : b ~ᵤ a * x\n⊢ False\n[PROOFSTEP]\ncases' hbax with u hu\n[GOAL]\ncase h.mp.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\nh : ∀ (x : α), ¬IsUnit x → b ≠ a * x\nx : α\nhx : ¬IsUnit (Associates.mk x)\nu : αˣ\nhu : b * ↑u = a * x\n⊢ False\n[PROOFSTEP]\napply h (x * ↑u⁻¹)\n[GOAL]\ncase h.mp.intro._\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\nh : ∀ (x : α), ¬IsUnit x → b ≠ a * x\nx : α\nhx : ¬IsUnit (Associates.mk x)\nu : αˣ\nhu : b * ↑u = a * x\n⊢ ¬IsUnit (x * ↑u⁻¹)\n[PROOFSTEP]\nrw [isUnit_mk] at hx \n[GOAL]\ncase h.mp.intro._\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\nh : ∀ (x : α), ¬IsUnit x → b ≠ a * x\nx : α\nhx : ¬IsUnit x\nu : αˣ\nhu : b * ↑u = a * x\n⊢ ¬IsUnit (x * ↑u⁻¹)\n[PROOFSTEP]\nrw [Associated.isUnit_iff]\n[GOAL]\ncase h.mp.intro._\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\nh : ∀ (x : α), ¬IsUnit x → b ≠ a * x\nx : α\nhx : ¬IsUnit x\nu : αˣ\nhu : b * ↑u = a * x\n⊢ ¬IsUnit ?m.316875\ncase h.mp.intro._\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\nh : ∀ (x : α), ¬IsUnit x → b ≠ a * x\nx : α\nhx : ¬IsUnit x\nu : αˣ\nhu : b * ↑u = a * x\n⊢ x * ↑u⁻¹ ~ᵤ ?m.316875\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\nh : ∀ (x : α), ¬IsUnit x → b ≠ a * x\nx : α\nhx : ¬IsUnit x\nu : αˣ\nhu : b * ↑u = a * x\n⊢ α\n[PROOFSTEP]\napply hx\n[GOAL]\ncase h.mp.intro._\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\nh : ∀ (x : α), ¬IsUnit x → b ≠ a * x\nx : α\nhx : ¬IsUnit x\nu : αˣ\nhu : b * ↑u = a * x\n⊢ x * ↑u⁻¹ ~ᵤ x\n[PROOFSTEP]\nuse u\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\nh : ∀ (x : α), ¬IsUnit x → b ≠ a * x\nx : α\nhx : ¬IsUnit x\nu : αˣ\nhu : b * ↑u = a * x\n⊢ x * ↑u⁻¹ * ↑u = x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mp.intro.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\nh : ∀ (x : α), ¬IsUnit x → b ≠ a * x\nx : α\nhx : ¬IsUnit (Associates.mk x)\nu : αˣ\nhu : b * ↑u = a * x\n⊢ b = a * (x * ↑u⁻¹)\n[PROOFSTEP]\nsimp [← mul_assoc, ← hu]\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : α\na✝ : a ≠ 0\n⊢ (∃ x, ¬IsUnit x ∧ b = a * x) → ∃ x, ¬IsUnit x ∧ Associates.mk b = Associates.mk a * x\n[PROOFSTEP]\nrintro ⟨x, ⟨hx, rfl⟩⟩\n[GOAL]\ncase h.mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : α\na✝ : a ≠ 0\nx : α\nhx : ¬IsUnit x\n⊢ ∃ x_1, ¬IsUnit x_1 ∧ Associates.mk (a * x) = Associates.mk a * x_1\n[PROOFSTEP]\nuse Associates.mk x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : α\na✝ : a ≠ 0\nx : α\nhx : ¬IsUnit x\n⊢ ¬IsUnit (Associates.mk x) ∧ Associates.mk (a * x) = Associates.mk a * Associates.mk x\n[PROOFSTEP]\nsimp [isUnit_mk, mk_mul_mk, hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : Associates α\nhlt : a < b\n⊢ DvdNotUnit a b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : Associates α\nhlt : a < b\n⊢ a ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\nb : Associates α\nhlt : 0 < b\n⊢ False\n[PROOFSTEP]\napply not_lt_of_le _ hlt\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\nb : Associates α\nhlt : 0 < b\n⊢ b ≤ 0\n[PROOFSTEP]\napply dvd_zero\n[GOAL]\ncase right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na b : Associates α\nhlt : a < b\n⊢ ∃ x, ¬IsUnit x ∧ b = a * x\n[PROOFSTEP]\nrcases hlt with ⟨⟨x, rfl⟩, ndvd⟩\n[GOAL]\ncase right.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : Associates α\nx : Associates α\nndvd : ¬a * x ∣ a\n⊢ ∃ x_1, ¬IsUnit x_1 ∧ a * x = a * x_1\n[PROOFSTEP]\nrefine' ⟨x, _, rfl⟩\n[GOAL]\ncase right.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : Associates α\nx : Associates α\nndvd : ¬a * x ∣ a\n⊢ ¬IsUnit x\n[PROOFSTEP]\ncontrapose! ndvd\n[GOAL]\ncase right.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : Associates α\nx : Associates α\nndvd : IsUnit x\n⊢ a * x ∣ a\n[PROOFSTEP]\nrcases ndvd with ⟨u, rfl⟩\n[GOAL]\ncase right.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\na : Associates α\nu : (Associates α)ˣ\n⊢ a * ↑u ∣ a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\n⊢ (∀ (a : α), Irreducible a ↔ Prime a) ↔ ∀ (a : Associates α), Irreducible a ↔ Prime a\n[PROOFSTEP]\nsimp_rw [forall_associated, irreducible_mk, prime_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\n⊢ CommMonoidWithZero (Associates α)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\nsrc✝ : CommMonoidWithZero (Associates α) := inferInstance\n⊢ ∀ {a b c : Associates α}, a ≠ 0 → a * b = a * c → b = c\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩ ⟨c⟩ ha h\n[GOAL]\ncase mk.mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\nsrc✝ : CommMonoidWithZero (Associates α) := inferInstance\na✝ : Associates α\na : α\nb✝ : Associates α\nb : α\nc✝ : Associates α\nc : α\nha : Quot.mk Setoid.r a ≠ 0\nh : Quot.mk Setoid.r a * Quot.mk Setoid.r b = Quot.mk Setoid.r a * Quot.mk Setoid.r c\n⊢ Quot.mk Setoid.r b = Quot.mk Setoid.r c\n[PROOFSTEP]\nrcases Quotient.exact' h with ⟨u, hu⟩\n[GOAL]\ncase mk.mk.mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\nsrc✝ : CommMonoidWithZero (Associates α) := inferInstance\na✝ : Associates α\na : α\nb✝ : Associates α\nb : α\nc✝ : Associates α\nc : α\nha : Quot.mk Setoid.r a ≠ 0\nh : Quot.mk Setoid.r a * Quot.mk Setoid.r b = Quot.mk Setoid.r a * Quot.mk Setoid.r c\nu : αˣ\nhu : a * b * ↑u = a * c\n⊢ Quot.mk Setoid.r b = Quot.mk Setoid.r c\n[PROOFSTEP]\nhave hu : a * (b * ↑u) = a * c := by rwa [← mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\nsrc✝ : CommMonoidWithZero (Associates α) := inferInstance\na✝ : Associates α\na : α\nb✝ : Associates α\nb : α\nc✝ : Associates α\nc : α\nha : Quot.mk Setoid.r a ≠ 0\nh : Quot.mk Setoid.r a * Quot.mk Setoid.r b = Quot.mk Setoid.r a * Quot.mk Setoid.r c\nu : αˣ\nhu : a * b * ↑u = a * c\n⊢ a * (b * ↑u) = a * c\n[PROOFSTEP]\nrwa [← mul_assoc]\n[GOAL]\ncase mk.mk.mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\nsrc✝ : CommMonoidWithZero (Associates α) := inferInstance\na✝ : Associates α\na : α\nb✝ : Associates α\nb : α\nc✝ : Associates α\nc : α\nha : Quot.mk Setoid.r a ≠ 0\nh : Quot.mk Setoid.r a * Quot.mk Setoid.r b = Quot.mk Setoid.r a * Quot.mk Setoid.r c\nu : αˣ\nhu✝ : a * b * ↑u = a * c\nhu : a * (b * ↑u) = a * c\n⊢ Quot.mk Setoid.r b = Quot.mk Setoid.r c\n[PROOFSTEP]\nexact Quotient.sound' ⟨u, mul_left_cancel₀ (mk_ne_zero.1 ha) hu⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\n⊢ NoZeroDivisors (Associates α)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\na b c : Associates α\nha : a ≠ 0\nd : Associates α\nhd : a * c = a * b * d\n⊢ a * c = a * (b * d)\n[PROOFSTEP]\nrwa [← mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\n⊢ m = 1 ∨ m = p\n[PROOFSTEP]\nhave dvd_rfl' : p ∣ m * d := by rw [r]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\n⊢ p ∣ m * d\n[PROOFSTEP]\nrw [r]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\n⊢ m = 1 ∨ m = p\n[PROOFSTEP]\nrw [r]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nmatch h m d dvd_rfl' with\n| Or.inl h' =>\n  by_cases h : m = 0\n  case pos => simp [h, zero_mul]\n  case neg =>\n    rw [r] at h' \n    have : m * d ≤ m * 1 := by simpa using h'\n    have : d ≤ 1 := Associates.le_of_mul_le_mul_left m d 1 ‹m ≠ 0› this\n    have : d = 1 := bot_unique this\n    simp [this]\n| Or.inr h' =>\n  by_cases h : d = 0\n  case pos =>\n    rw [r] at hp0 \n    have : m * d = 0 := by rw [h]; simp\n    contradiction\n  case neg =>\n    rw [r] at h' \n    have : d * m ≤ d * 1 := by simpa [mul_comm] using h'\n    exact Or.inl <| bot_unique <| Associates.le_of_mul_le_mul_left d m 1 ‹d ≠ 0› this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ m\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nby_cases h : m = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ m\nh : m = 0\n⊢ m = 1 ∨ m = m * d\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ m\nh : ¬m = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\ncase pos => simp [h, zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ m\nh : m = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\ncase pos => simp [h, zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ m\nh : m = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nsimp [h, zero_mul]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ m\nh : ¬m = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\ncase neg =>\n  rw [r] at h' \n  have : m * d ≤ m * 1 := by simpa using h'\n  have : d ≤ 1 := Associates.le_of_mul_le_mul_left m d 1 ‹m ≠ 0› this\n  have : d = 1 := bot_unique this\n  simp [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ m\nh : ¬m = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\ncase neg =>\n  rw [r] at h' \n  have : m * d ≤ m * 1 := by simpa using h'\n  have : d ≤ 1 := Associates.le_of_mul_le_mul_left m d 1 ‹m ≠ 0› this\n  have : d = 1 := bot_unique this\n  simp [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ m\nh : ¬m = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nrw [r] at h' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : m * d ∣ m\nh : ¬m = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nhave : m * d ≤ m * 1 := by simpa using h'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : m * d ∣ m\nh : ¬m = 0\n⊢ m * d ≤ m * 1\n[PROOFSTEP]\nsimpa using h'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : m * d ∣ m\nh : ¬m = 0\nthis : m * d ≤ m * 1\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nhave : d ≤ 1 := Associates.le_of_mul_le_mul_left m d 1 ‹m ≠ 0› this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : m * d ∣ m\nh : ¬m = 0\nthis✝ : m * d ≤ m * 1\nthis : d ≤ 1\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nhave : d = 1 := bot_unique this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : m * d ∣ m\nh : ¬m = 0\nthis✝¹ : m * d ≤ m * 1\nthis✝ : d ≤ 1\nthis : d = 1\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ d\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nby_cases h : d = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ d\nh : d = 0\n⊢ m = 1 ∨ m = m * d\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ d\nh : ¬d = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\ncase pos =>\n  rw [r] at hp0 \n  have : m * d = 0 := by rw [h]; simp\n  contradiction\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ d\nh : d = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\ncase pos =>\n  rw [r] at hp0 \n  have : m * d = 0 := by rw [h]; simp\n  contradiction\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ d\nh : d = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nrw [r] at hp0 \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nhp0 : m * d ≠ 0\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ d\nh : d = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nhave : m * d = 0 := by rw [h]; simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nhp0 : m * d ≠ 0\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ d\nh : d = 0\n⊢ m * d = 0\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nhp0 : m * d ≠ 0\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ d\nh : d = 0\n⊢ m * 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nhp0 : m * d ≠ 0\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ d\nh : d = 0\nthis : m * d = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ d\nh : ¬d = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\ncase neg =>\n  rw [r] at h' \n  have : d * m ≤ d * 1 := by simpa [mul_comm] using h'\n  exact Or.inl <| bot_unique <| Associates.le_of_mul_le_mul_left d m 1 ‹d ≠ 0› this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ d\nh : ¬d = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\ncase neg =>\n  rw [r] at h' \n  have : d * m ≤ d * 1 := by simpa [mul_comm] using h'\n  exact Or.inl <| bot_unique <| Associates.le_of_mul_le_mul_left d m 1 ‹d ≠ 0› this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : p ∣ d\nh : ¬d = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nrw [r] at h' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : m * d ∣ d\nh : ¬d = 0\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nhave : d * m ≤ d * 1 := by simpa [mul_comm] using h'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : m * d ∣ d\nh : ¬d = 0\n⊢ d * m ≤ d * 1\n[PROOFSTEP]\nsimpa [mul_comm] using h'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np m : Associates α\nhp0 : p ≠ 0\nleft✝ : ¬IsUnit p\nh✝ : ∀ (a b : Associates α), p ∣ a * b → p ∣ a ∨ p ∣ b\nd : Associates α\nr : p = m * d\ndvd_rfl' : p ∣ m * d\nh' : m * d ∣ d\nh : ¬d = 0\nthis : d * m ≤ d * 1\n⊢ m = 1 ∨ m = m * d\n[PROOFSTEP]\nexact Or.inl <| bot_unique <| Associates.le_of_mul_le_mul_left d m 1 ‹d ≠ 0› this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : Associates α\n⊢ p ≤ 1 ↔ p = 1\n[PROOFSTEP]\nrw [← Associates.bot_eq_one, le_bot_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np q : α\nh : DvdNotUnit p q\nhq : Irreducible q\n⊢ IsUnit p\n[PROOFSTEP]\nobtain ⟨_, x, hx, hx'⟩ := h\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np q : α\nhq : Irreducible q\nleft✝ : p ≠ 0\nx : α\nhx : ¬IsUnit x\nhx' : q = p * x\n⊢ IsUnit p\n[PROOFSTEP]\nexact Or.resolve_right ((irreducible_iff.1 hq).right p x hx') hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np q : α\nhp : DvdNotUnit p q\n⊢ ¬IsUnit q\n[PROOFSTEP]\nobtain ⟨-, x, hx, rfl⟩ := hp\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CommMonoidWithZero α\np x : α\nhx : ¬IsUnit x\n⊢ ¬IsUnit (p * x)\n[PROOFSTEP]\nexact fun hc => hx (isUnit_iff_dvd_one.mpr (dvd_of_mul_left_dvd (isUnit_iff_dvd_one.mp hc)))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CommMonoidWithZero α\ninst✝ : Nontrivial α\np q r : α\nh : DvdNotUnit p q\nh' : q ~ᵤ r\n⊢ DvdNotUnit p r\n[PROOFSTEP]\nobtain ⟨u, rfl⟩ := Associated.symm h'\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CommMonoidWithZero α\ninst✝ : Nontrivial α\np r : α\nu : αˣ\nh : DvdNotUnit p (r * ↑u)\nh' : r * ↑u ~ᵤ r\n⊢ DvdNotUnit p r\n[PROOFSTEP]\nobtain ⟨hp, x, hx⟩ := h\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CommMonoidWithZero α\ninst✝ : Nontrivial α\np r : α\nu : αˣ\nh' : r * ↑u ~ᵤ r\nhp : p ≠ 0\nx : α\nhx : ¬IsUnit x ∧ r * ↑u = p * x\n⊢ DvdNotUnit p r\n[PROOFSTEP]\nrefine' ⟨hp, x * ↑u⁻¹, DvdNotUnit.not_unit ⟨u⁻¹.ne_zero, x, hx.left, mul_comm _ _⟩, _⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : CommMonoidWithZero α\ninst✝ : Nontrivial α\np r : α\nu : αˣ\nh' : r * ↑u ~ᵤ r\nhp : p ≠ 0\nx : α\nhx : ¬IsUnit x ∧ r * ↑u = p * x\n⊢ r = p * (x * ↑u⁻¹)\n[PROOFSTEP]\nrw [← mul_assoc, ← hx.right, mul_assoc, Units.mul_inv, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np b : α\nh : p * b ~ᵤ p\nhp : p ≠ 0\n⊢ IsUnit b\n[PROOFSTEP]\ncases' h with a ha\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np b : α\nhp : p ≠ 0\na : αˣ\nha : p * b * ↑a = p\n⊢ IsUnit b\n[PROOFSTEP]\nrefine' isUnit_of_mul_eq_one b a ((mul_right_inj' hp).mp _)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np b : α\nhp : p ≠ 0\na : αˣ\nha : p * b * ↑a = p\n⊢ p * (b * ↑a) = p * 1\n[PROOFSTEP]\nrwa [← mul_assoc, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q : α\nh : DvdNotUnit p q\n⊢ ¬p ~ᵤ q\n[PROOFSTEP]\nrintro ⟨a, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\na : αˣ\nh : DvdNotUnit p (p * ↑a)\n⊢ False\n[PROOFSTEP]\nobtain ⟨hp, x, hx, hx'⟩ := h\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\na : αˣ\nhp : p ≠ 0\nx : α\nhx : ¬IsUnit x\nhx' : p * ↑a = p * x\n⊢ False\n[PROOFSTEP]\nrcases(mul_right_inj' hp).mp hx' with rfl\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np : α\na : αˣ\nhp : p ≠ 0\nhx : ¬IsUnit ↑a\nhx' : p * ↑a = p * ↑a\n⊢ False\n[PROOFSTEP]\nexact hx a.isUnit\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q : α\nh : DvdNotUnit p q\n⊢ p ≠ q\n[PROOFSTEP]\nby_contra hcontra\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q : α\nh : DvdNotUnit p q\nhcontra : p = q\n⊢ False\n[PROOFSTEP]\nobtain ⟨hp, x, hx', hx''⟩ := h\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q : α\nhcontra : p = q\nhp : p ≠ 0\nx : α\nhx' : ¬IsUnit x\nhx'' : q = p * x\n⊢ False\n[PROOFSTEP]\nconv_lhs at hx'' => rw [← hcontra, ← mul_one p]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q : α\nhcontra : p = q\nhp : p ≠ 0\nx : α\nhx' : ¬IsUnit x\nhx'' : q = p * x\n| q\n[PROOFSTEP]\nrw [← hcontra, ← mul_one p]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q : α\nhcontra : p = q\nhp : p ≠ 0\nx : α\nhx' : ¬IsUnit x\nhx'' : q = p * x\n| q\n[PROOFSTEP]\nrw [← hcontra, ← mul_one p]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q : α\nhcontra : p = q\nhp : p ≠ 0\nx : α\nhx' : ¬IsUnit x\nhx'' : q = p * x\n| q\n[PROOFSTEP]\nrw [← hcontra, ← mul_one p]\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q : α\nhcontra : p = q\nhp : p ≠ 0\nx : α\nhx' : ¬IsUnit x\nhx'' : p * 1 = p * x\n⊢ False\n[PROOFSTEP]\nrw [(mul_left_cancel₀ hp hx'').symm] at hx' \n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q : α\nhcontra : p = q\nhp : p ≠ 0\nx : α\nhx' : ¬IsUnit 1\nhx'' : p * 1 = p * x\n⊢ False\n[PROOFSTEP]\nexact hx' isUnit_one\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\nq : α\nhq : ¬IsUnit q\nhq' : q ≠ 0\n⊢ Function.Injective fun n => q ^ n\n[PROOFSTEP]\nrefine' injective_of_lt_imp_ne fun n m h => DvdNotUnit.ne ⟨pow_ne_zero n hq', q ^ (m - n), _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\nq : α\nhq : ¬IsUnit q\nhq' : q ≠ 0\nn m : ℕ\nh : n < m\n⊢ ¬IsUnit (q ^ (m - n))\n[PROOFSTEP]\nexact not_isUnit_of_not_isUnit_dvd hq (dvd_pow (dvd_refl _) (Nat.sub_pos_of_lt h).ne')\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\nq : α\nhq : ¬IsUnit q\nhq' : q ≠ 0\nn m : ℕ\nh : n < m\n⊢ q ^ m = q ^ n * q ^ (m - n)\n[PROOFSTEP]\nexact (pow_mul_pow_sub q h.le).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q : α\nhp : Prime p\nn : ℕ\n⊢ q ∣ p ^ n ↔ ∃ i, i ≤ n ∧ q ~ᵤ p ^ i\n[PROOFSTEP]\ninduction' n with n ih generalizing q\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q✝ : α\nhp : Prime p\nq : α\n⊢ q ∣ p ^ Nat.zero ↔ ∃ i, i ≤ Nat.zero ∧ q ~ᵤ p ^ i\n[PROOFSTEP]\nsimp [← isUnit_iff_dvd_one, associated_one_iff_isUnit]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q✝ : α\nhp : Prime p\nn : ℕ\nih : ∀ {q : α}, q ∣ p ^ n ↔ ∃ i, i ≤ n ∧ q ~ᵤ p ^ i\nq : α\n⊢ q ∣ p ^ Nat.succ n ↔ ∃ i, i ≤ Nat.succ n ∧ q ~ᵤ p ^ i\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun ⟨i, hi, hq⟩ => hq.dvd.trans (pow_dvd_pow p hi)⟩\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q✝ : α\nhp : Prime p\nn : ℕ\nih : ∀ {q : α}, q ∣ p ^ n ↔ ∃ i, i ≤ n ∧ q ~ᵤ p ^ i\nq : α\nh : q ∣ p ^ Nat.succ n\n⊢ ∃ i, i ≤ Nat.succ n ∧ q ~ᵤ p ^ i\n[PROOFSTEP]\nrw [pow_succ] at h \n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q✝ : α\nhp : Prime p\nn : ℕ\nih : ∀ {q : α}, q ∣ p ^ n ↔ ∃ i, i ≤ n ∧ q ~ᵤ p ^ i\nq : α\nh : q ∣ p * p ^ n\n⊢ ∃ i, i ≤ Nat.succ n ∧ q ~ᵤ p ^ i\n[PROOFSTEP]\nrcases hp.left_dvd_or_dvd_right_of_dvd_mul h with (⟨q, rfl⟩ | hno)\n[GOAL]\ncase succ.inl.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q✝ : α\nhp : Prime p\nn : ℕ\nih : ∀ {q : α}, q ∣ p ^ n ↔ ∃ i, i ≤ n ∧ q ~ᵤ p ^ i\nq : α\nh : p * q ∣ p * p ^ n\n⊢ ∃ i, i ≤ Nat.succ n ∧ p * q ~ᵤ p ^ i\n[PROOFSTEP]\nrw [mul_dvd_mul_iff_left hp.ne_zero, ih] at h \n[GOAL]\ncase succ.inl.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q✝ : α\nhp : Prime p\nn : ℕ\nih : ∀ {q : α}, q ∣ p ^ n ↔ ∃ i, i ≤ n ∧ q ~ᵤ p ^ i\nq : α\nh : ∃ i, i ≤ n ∧ q ~ᵤ p ^ i\n⊢ ∃ i, i ≤ Nat.succ n ∧ p * q ~ᵤ p ^ i\n[PROOFSTEP]\nrcases h with ⟨i, hi, hq⟩\n[GOAL]\ncase succ.inl.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q✝ : α\nhp : Prime p\nn : ℕ\nih : ∀ {q : α}, q ∣ p ^ n ↔ ∃ i, i ≤ n ∧ q ~ᵤ p ^ i\nq : α\ni : ℕ\nhi : i ≤ n\nhq : q ~ᵤ p ^ i\n⊢ ∃ i, i ≤ Nat.succ n ∧ p * q ~ᵤ p ^ i\n[PROOFSTEP]\nrefine' ⟨i + 1, Nat.succ_le_succ hi, (hq.mul_left p).trans _⟩\n[GOAL]\ncase succ.inl.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q✝ : α\nhp : Prime p\nn : ℕ\nih : ∀ {q : α}, q ∣ p ^ n ↔ ∃ i, i ≤ n ∧ q ~ᵤ p ^ i\nq : α\ni : ℕ\nhi : i ≤ n\nhq : q ~ᵤ p ^ i\n⊢ p * p ^ i ~ᵤ p ^ (i + 1)\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\ncase succ.inl.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q✝ : α\nhp : Prime p\nn : ℕ\nih : ∀ {q : α}, q ∣ p ^ n ↔ ∃ i, i ≤ n ∧ q ~ᵤ p ^ i\nq : α\ni : ℕ\nhi : i ≤ n\nhq : q ~ᵤ p ^ i\n⊢ p * p ^ i ~ᵤ p * p ^ i\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q✝ : α\nhp : Prime p\nn : ℕ\nih : ∀ {q : α}, q ∣ p ^ n ↔ ∃ i, i ≤ n ∧ q ~ᵤ p ^ i\nq : α\nh : q ∣ p * p ^ n\nhno : q ∣ p ^ n\n⊢ ∃ i, i ≤ Nat.succ n ∧ q ~ᵤ p ^ i\n[PROOFSTEP]\nobtain ⟨i, hi, hq⟩ := ih.mp hno\n[GOAL]\ncase succ.inr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : CancelCommMonoidWithZero α\np q✝ : α\nhp : Prime p\nn : ℕ\nih : ∀ {q : α}, q ∣ p ^ n ↔ ∃ i, i ≤ n ∧ q ~ᵤ p ^ i\nq : α\nh : q ∣ p * p ^ n\nhno : q ∣ p ^ n\ni : ℕ\nhi : i ≤ n\nhq : q ~ᵤ p ^ i\n⊢ ∃ i, i ≤ Nat.succ n ∧ q ~ᵤ p ^ i\n[PROOFSTEP]\nexact ⟨i, hi.trans n.le_succ, hq⟩\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Associated", "llama_tokens": 52246, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419958239132, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.3733224136927182}}
{"text": "[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\n⊢ ordConnectedComponent s a ∈ 𝓝 a ↔ s ∈ 𝓝 a\n[PROOFSTEP]\nrefine' ⟨fun h => mem_of_superset h ordConnectedComponent_subset, fun h => _⟩\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nh : s ∈ 𝓝 a\n⊢ ordConnectedComponent s a ∈ 𝓝 a\n[PROOFSTEP]\nrcases exists_Icc_mem_subset_of_mem_nhds h with ⟨b, c, ha, ha', hs⟩\n[GOAL]\ncase intro.intro.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nh : s ∈ 𝓝 a\nb c : X\nha : a ∈ Icc b c\nha' : Icc b c ∈ 𝓝 a\nhs : Icc b c ⊆ s\n⊢ ordConnectedComponent s a ∈ 𝓝 a\n[PROOFSTEP]\nexact mem_of_superset ha' (subset_ordConnectedComponent ha hs)\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Ici a] a\n[PROOFSTEP]\nhave hmem : tᶜ ∈ 𝓝[≥] a := by\n  refine' mem_nhdsWithin_of_mem_nhds _\n  rw [← mem_interior_iff_mem_nhds, interior_compl]\n  exact disjoint_left.1 hd ha\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\n⊢ tᶜ ∈ 𝓝[Ici a] a\n[PROOFSTEP]\nrefine' mem_nhdsWithin_of_mem_nhds _\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\n⊢ tᶜ ∈ 𝓝 a\n[PROOFSTEP]\nrw [← mem_interior_iff_mem_nhds, interior_compl]\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\n⊢ a ∈ (closure t)ᶜ\n[PROOFSTEP]\nexact disjoint_left.1 hd ha\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Ici a] a\n[PROOFSTEP]\nrcases exists_Icc_mem_subset_of_mem_nhdsWithin_Ici hmem with ⟨b, hab, hmem', hsub⟩\n[GOAL]\ncase intro.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Ici a] a\n[PROOFSTEP]\nby_cases H : Disjoint (Icc a b) (ordConnectedSection <| ordSeparatingSet s t)\n[GOAL]\ncase pos\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nH : Disjoint (Icc a b) (ordConnectedSection (ordSeparatingSet s t))\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Ici a] a\n[PROOFSTEP]\nexact mem_of_superset hmem' (disjoint_left.1 H)\n[GOAL]\ncase neg\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nH : ¬Disjoint (Icc a b) (ordConnectedSection (ordSeparatingSet s t))\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Ici a] a\n[PROOFSTEP]\nsimp only [Set.disjoint_left, not_forall, Classical.not_not] at H \n[GOAL]\ncase neg\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nH : ∃ x h, x ∈ ordConnectedSection (ordSeparatingSet s t)\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Ici a] a\n[PROOFSTEP]\nrcases H with ⟨c, ⟨hac, hcb⟩, hc⟩\n[GOAL]\ncase neg.intro.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhac : a ≤ c\nhcb : c ≤ b\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Ici a] a\n[PROOFSTEP]\nhave hsub' : Icc a b ⊆ ordConnectedComponent tᶜ a := subset_ordConnectedComponent (left_mem_Icc.2 hab) hsub\n[GOAL]\ncase neg.intro.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhac : a ≤ c\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Ici a] a\n[PROOFSTEP]\nhave hd : Disjoint s (ordConnectedSection (ordSeparatingSet s t)) :=\n  disjoint_left_ordSeparatingSet.mono_right ordConnectedSection_subset\n[GOAL]\ncase neg.intro.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhac : a ≤ c\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Ici a] a\n[PROOFSTEP]\nreplace hac : a < c := hac.lt_of_ne <| Ne.symm <| ne_of_mem_of_not_mem hc <| disjoint_left.1 hd ha\n[GOAL]\ncase neg.intro.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Ici a] a\n[PROOFSTEP]\nrefine' mem_of_superset (Ico_mem_nhdsWithin_Ici (left_mem_Ico.2 hac)) fun x hx hx' => _\n[GOAL]\ncase neg.intro.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\nx : X\nhx : x ∈ Ico a c\nhx' : x ∈ ordConnectedSection (ordSeparatingSet s t)\n⊢ False\n[PROOFSTEP]\nrefine' hx.2.ne (eq_of_mem_ordConnectedSection_of_uIcc_subset hx' hc _)\n[GOAL]\ncase neg.intro.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\nx : X\nhx : x ∈ Ico a c\nhx' : x ∈ ordConnectedSection (ordSeparatingSet s t)\n⊢ [[x, c]] ⊆ ordSeparatingSet s t\n[PROOFSTEP]\nrefine' subset_inter (subset_iUnion₂_of_subset a ha _) _\n[GOAL]\ncase neg.intro.intro.intro.refine'_1\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\nx : X\nhx : x ∈ Ico a c\nhx' : x ∈ ordConnectedSection (ordSeparatingSet s t)\n⊢ [[x, c]] ⊆ ordConnectedComponent tᶜ a\n[PROOFSTEP]\nexact OrdConnected.uIcc_subset inferInstance (hsub' ⟨hx.1, hx.2.le.trans hcb⟩) (hsub' ⟨hac.le, hcb⟩)\n[GOAL]\ncase neg.intro.intro.intro.refine'_2\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\nx : X\nhx : x ∈ Ico a c\nhx' : x ∈ ordConnectedSection (ordSeparatingSet s t)\n⊢ [[x, c]] ⊆ ⋃ (x : X) (_ : x ∈ t), ordConnectedComponent sᶜ x\n[PROOFSTEP]\nrcases mem_iUnion₂.1 (ordConnectedSection_subset hx').2 with ⟨y, hyt, hxy⟩\n[GOAL]\ncase neg.intro.intro.intro.refine'_2.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\nx : X\nhx : x ∈ Ico a c\nhx' : x ∈ ordConnectedSection (ordSeparatingSet s t)\ny : X\nhyt : y ∈ t\nhxy : x ∈ ordConnectedComponent sᶜ y\n⊢ [[x, c]] ⊆ ⋃ (x : X) (_ : x ∈ t), ordConnectedComponent sᶜ x\n[PROOFSTEP]\nrefine' subset_iUnion₂_of_subset y hyt (OrdConnected.uIcc_subset inferInstance hxy _)\n[GOAL]\ncase neg.intro.intro.intro.refine'_2.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\nx : X\nhx : x ∈ Ico a c\nhx' : x ∈ ordConnectedSection (ordSeparatingSet s t)\ny : X\nhyt : y ∈ t\nhxy : x ∈ ordConnectedComponent sᶜ y\n⊢ c ∈ ordConnectedComponent sᶜ y\n[PROOFSTEP]\nrefine' subset_ordConnectedComponent left_mem_uIcc hxy _\n[GOAL]\ncase neg.intro.intro.intro.refine'_2.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\nx : X\nhx : x ∈ Ico a c\nhx' : x ∈ ordConnectedSection (ordSeparatingSet s t)\ny : X\nhyt : y ∈ t\nhxy : x ∈ ordConnectedComponent sᶜ y\n⊢ c ∈ [[y, x]]\n[PROOFSTEP]\nsuffices c < y by\n  rw [uIcc_of_ge (hx.2.trans this).le]\n  exact ⟨hx.2.le, this.le⟩\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\nx : X\nhx : x ∈ Ico a c\nhx' : x ∈ ordConnectedSection (ordSeparatingSet s t)\ny : X\nhyt : y ∈ t\nhxy : x ∈ ordConnectedComponent sᶜ y\nthis : c < y\n⊢ c ∈ [[y, x]]\n[PROOFSTEP]\nrw [uIcc_of_ge (hx.2.trans this).le]\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\nx : X\nhx : x ∈ Ico a c\nhx' : x ∈ ordConnectedSection (ordSeparatingSet s t)\ny : X\nhyt : y ∈ t\nhxy : x ∈ ordConnectedComponent sᶜ y\nthis : c < y\n⊢ c ∈ Icc x y\n[PROOFSTEP]\nexact ⟨hx.2.le, this.le⟩\n[GOAL]\ncase neg.intro.intro.intro.refine'_2.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\nx : X\nhx : x ∈ Ico a c\nhx' : x ∈ ordConnectedSection (ordSeparatingSet s t)\ny : X\nhyt : y ∈ t\nhxy : x ∈ ordConnectedComponent sᶜ y\n⊢ c < y\n[PROOFSTEP]\nrefine' lt_of_not_le fun hyc => _\n[GOAL]\ncase neg.intro.intro.intro.refine'_2.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\nx : X\nhx : x ∈ Ico a c\nhx' : x ∈ ordConnectedSection (ordSeparatingSet s t)\ny : X\nhyt : y ∈ t\nhxy : x ∈ ordConnectedComponent sᶜ y\nhyc : y ≤ c\n⊢ False\n[PROOFSTEP]\nhave hya : y < a := not_le.1 fun hay => hsub ⟨hay, hyc.trans hcb⟩ hyt\n[GOAL]\ncase neg.intro.intro.intro.refine'_2.intro.intro\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b✝ c✝ : X\ns t : Set X\nhd✝ : Disjoint s (closure t)\nha : a ∈ s\nhmem : tᶜ ∈ 𝓝[Ici a] a\nb : X\nhab : a ≤ b\nhmem' : Icc a b ∈ 𝓝[Ici a] a\nhsub : Icc a b ⊆ tᶜ\nc : X\nhc : c ∈ ordConnectedSection (ordSeparatingSet s t)\nhcb : c ≤ b\nhsub' : Icc a b ⊆ ordConnectedComponent tᶜ a\nhd : Disjoint s (ordConnectedSection (ordSeparatingSet s t))\nhac : a < c\nx : X\nhx : x ∈ Ico a c\nhx' : x ∈ ordConnectedSection (ordSeparatingSet s t)\ny : X\nhyt : y ∈ t\nhxy : x ∈ ordConnectedComponent sᶜ y\nhyc : y ≤ c\nhya : y < a\n⊢ False\n[PROOFSTEP]\nexact hxy (Icc_subset_uIcc ⟨hya.le, hx.1⟩) ha\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Iic a] a\n[PROOFSTEP]\nhave hd' : Disjoint (ofDual ⁻¹' s) (closure <| ofDual ⁻¹' t) := hd\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\nhd' : Disjoint (↑ofDual ⁻¹' s) (closure (↑ofDual ⁻¹' t))\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Iic a] a\n[PROOFSTEP]\nhave ha' : toDual a ∈ ofDual ⁻¹' s := ha\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\nhd' : Disjoint (↑ofDual ⁻¹' s) (closure (↑ofDual ⁻¹' t))\nha' : ↑toDual a ∈ ↑ofDual ⁻¹' s\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Iic a] a\n[PROOFSTEP]\nsimpa only [dual_ordSeparatingSet, dual_ordConnectedSection] using\n  compl_section_ordSeparatingSet_mem_nhdsWithin_Ici hd' ha'\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝 a\n[PROOFSTEP]\nrw [← nhds_left_sup_nhds_right, mem_sup]\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nhd : Disjoint s (closure t)\nha : a ∈ s\n⊢ (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Iic a] a ∧\n    (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[Ici a] a\n[PROOFSTEP]\nexact ⟨compl_section_ordSeparatingSet_mem_nhdsWithin_Iic hd ha, compl_section_ordSeparatingSet_mem_nhdsWithin_Ici hd ha⟩\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nhd : Disjoint s (closure t)\nx : X\nhx : x ∈ s\n⊢ tᶜ ∈ 𝓝 x\n[PROOFSTEP]\nrw [← mem_interior_iff_mem_nhds, interior_compl]\n[GOAL]\nX : Type u_1\ninst✝² : LinearOrder X\ninst✝¹ : TopologicalSpace X\ninst✝ : OrderTopology X\na b c : X\ns t : Set X\nhd : Disjoint s (closure t)\nx : X\nhx : x ∈ s\n⊢ x ∈ (closure t)ᶜ\n[PROOFSTEP]\nexact disjoint_left.1 hd hx\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Order.T5", "llama_tokens": 8292, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419704455589, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.373322400014211}}
{"text": "[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\ni : ι\nne : Set.Nonempty c\n⊢ find c ne i ∈ c\n[PROOFSTEP]\nrw [find]\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\ni : ι\nne : Set.Nonempty c\n⊢ (if hi : ∃ v, v ∈ c ∧ i ∈ v.carrier then Exists.choose hi else Set.Nonempty.some ne) ∈ c\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\ni : ι\nne : Set.Nonempty c\nh : ∃ v, v ∈ c ∧ i ∈ v.carrier\n⊢ Exists.choose h ∈ c\ncase neg\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\ni : ι\nne : Set.Nonempty c\nh : ¬∃ v, v ∈ c ∧ i ∈ v.carrier\n⊢ Set.Nonempty.some ne ∈ c\n[PROOFSTEP]\nexacts [h.choose_spec.1, ne.some_mem]\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\ni : ι\nne : Set.Nonempty c\n⊢ i ∈ (find c ne i).carrier ↔ i ∈ chainSupCarrier c\n[PROOFSTEP]\nrw [find]\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\ni : ι\nne : Set.Nonempty c\n⊢ i ∈ (if hi : ∃ v, v ∈ c ∧ i ∈ v.carrier then Exists.choose hi else Set.Nonempty.some ne).carrier ↔\n    i ∈ chainSupCarrier c\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\ni : ι\nne : Set.Nonempty c\nh : ∃ v, v ∈ c ∧ i ∈ v.carrier\n⊢ i ∈ (Exists.choose h).carrier ↔ i ∈ chainSupCarrier c\n[PROOFSTEP]\nhave := h.choose_spec\n[GOAL]\ncase pos\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\ni : ι\nne : Set.Nonempty c\nh : ∃ v, v ∈ c ∧ i ∈ v.carrier\nthis : Exists.choose h ∈ c ∧ i ∈ (Exists.choose h).carrier\n⊢ i ∈ (Exists.choose h).carrier ↔ i ∈ chainSupCarrier c\n[PROOFSTEP]\nexact iff_of_true this.2 (mem_iUnion₂.2 ⟨_, this.1, this.2⟩)\n[GOAL]\ncase neg\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\ni : ι\nne : Set.Nonempty c\nh : ¬∃ v, v ∈ c ∧ i ∈ v.carrier\n⊢ i ∈ (Set.Nonempty.some ne).carrier ↔ i ∈ chainSupCarrier c\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\ni : ι\nne : Set.Nonempty c\nh : ∀ (v : PartialRefinement u s), v ∈ c → ¬i ∈ v.carrier\n⊢ i ∈ (Set.Nonempty.some ne).carrier ↔ i ∈ chainSupCarrier c\n[PROOFSTEP]\nrefine iff_of_false (h _ ne.some_mem) ?_\n[GOAL]\ncase neg\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\ni : ι\nne : Set.Nonempty c\nh : ∀ (v : PartialRefinement u s), v ∈ c → ¬i ∈ v.carrier\n⊢ ¬i ∈ chainSupCarrier c\n[PROOFSTEP]\nsimpa only [chainSupCarrier, mem_iUnion₂, not_exists]\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\nhc : IsChain (fun x x_1 => x ≤ x_1) c\nne : Set.Nonempty c\nhfin : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nhU : s ⊆ ⋃ (i : ι), u i\nx : X\nhxs : x ∈ s\n⊢ ∃ i, x ∈ (fun i => toFun (find c ne i) i) i\n[PROOFSTEP]\nrcases em (∃ i, i ∉ chainSupCarrier c ∧ x ∈ u i) with (⟨i, hi, hxi⟩ | hx)\n[GOAL]\ncase inl.intro.intro\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\nhc : IsChain (fun x x_1 => x ≤ x_1) c\nne : Set.Nonempty c\nhfin : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nhU : s ⊆ ⋃ (i : ι), u i\nx : X\nhxs : x ∈ s\ni : ι\nhi : ¬i ∈ chainSupCarrier c\nhxi : x ∈ u i\n⊢ ∃ i, x ∈ (fun i => toFun (find c ne i) i) i\n[PROOFSTEP]\nuse i\n[GOAL]\ncase h\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\nhc : IsChain (fun x x_1 => x ≤ x_1) c\nne : Set.Nonempty c\nhfin : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nhU : s ⊆ ⋃ (i : ι), u i\nx : X\nhxs : x ∈ s\ni : ι\nhi : ¬i ∈ chainSupCarrier c\nhxi : x ∈ u i\n⊢ x ∈ (fun i => toFun (find c ne i) i) i\n[PROOFSTEP]\nsimpa only [(find c ne i).apply_eq (mt (mem_find_carrier_iff _).1 hi)]\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\nhc : IsChain (fun x x_1 => x ≤ x_1) c\nne : Set.Nonempty c\nhfin : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nhU : s ⊆ ⋃ (i : ι), u i\nx : X\nhxs : x ∈ s\nhx : ¬∃ i, ¬i ∈ chainSupCarrier c ∧ x ∈ u i\n⊢ ∃ i, x ∈ (fun i => toFun (find c ne i) i) i\n[PROOFSTEP]\nsimp_rw [not_exists, not_and, not_imp_not, chainSupCarrier, mem_iUnion₂] at hx \n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\nhc : IsChain (fun x x_1 => x ≤ x_1) c\nne : Set.Nonempty c\nhfin : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nhU : s ⊆ ⋃ (i : ι), u i\nx : X\nhxs : x ∈ s\nhx : ∀ (x_1 : ι), x ∈ u x_1 → ∃ i j, x_1 ∈ i.carrier\n⊢ ∃ i, x ∈ (fun i => toFun (find c ne i) i) i\n[PROOFSTEP]\nhaveI : Nonempty (PartialRefinement u s) := ⟨ne.some⟩\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\nhc : IsChain (fun x x_1 => x ≤ x_1) c\nne : Set.Nonempty c\nhfin : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nhU : s ⊆ ⋃ (i : ι), u i\nx : X\nhxs : x ∈ s\nhx : ∀ (x_1 : ι), x ∈ u x_1 → ∃ i j, x_1 ∈ i.carrier\nthis : Nonempty (PartialRefinement u s)\n⊢ ∃ i, x ∈ (fun i => toFun (find c ne i) i) i\n[PROOFSTEP]\nchoose! v hvc hiv using hx\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\nhc : IsChain (fun x x_1 => x ≤ x_1) c\nne : Set.Nonempty c\nhfin : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nhU : s ⊆ ⋃ (i : ι), u i\nx : X\nhxs : x ∈ s\nthis : Nonempty (PartialRefinement u s)\nv : ι → PartialRefinement u s\nhvc : ∀ (x_1 : ι), x ∈ u x_1 → v x_1 ∈ c\nhiv : ∀ (x_1 : ι), x ∈ u x_1 → x_1 ∈ (v x_1).carrier\n⊢ ∃ i, x ∈ (fun i => toFun (find c ne i) i) i\n[PROOFSTEP]\nrcases(hfin x hxs).exists_maximal_wrt v _ (mem_iUnion.1 (hU hxs)) with\n  ⟨i, hxi : x ∈ u i, hmax : ∀ j, x ∈ u j → v i ≤ v j → v i = v j⟩\n[GOAL]\ncase inr.intro.intro\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\nhc : IsChain (fun x x_1 => x ≤ x_1) c\nne : Set.Nonempty c\nhfin : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nhU : s ⊆ ⋃ (i : ι), u i\nx : X\nhxs : x ∈ s\nthis : Nonempty (PartialRefinement u s)\nv : ι → PartialRefinement u s\nhvc : ∀ (x_1 : ι), x ∈ u x_1 → v x_1 ∈ c\nhiv : ∀ (x_1 : ι), x ∈ u x_1 → x_1 ∈ (v x_1).carrier\ni : ι\nhxi : x ∈ u i\nhmax : ∀ (j : ι), x ∈ u j → v i ≤ v j → v i = v j\n⊢ ∃ i, x ∈ (fun i => toFun (find c ne i) i) i\n[PROOFSTEP]\nrcases mem_iUnion.1 ((v i).subset_iUnion hxs) with ⟨j, hj⟩\n[GOAL]\ncase inr.intro.intro.intro\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\nhc : IsChain (fun x x_1 => x ≤ x_1) c\nne : Set.Nonempty c\nhfin : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nhU : s ⊆ ⋃ (i : ι), u i\nx : X\nhxs : x ∈ s\nthis : Nonempty (PartialRefinement u s)\nv : ι → PartialRefinement u s\nhvc : ∀ (x_1 : ι), x ∈ u x_1 → v x_1 ∈ c\nhiv : ∀ (x_1 : ι), x ∈ u x_1 → x_1 ∈ (v x_1).carrier\ni : ι\nhxi : x ∈ u i\nhmax : ∀ (j : ι), x ∈ u j → v i ≤ v j → v i = v j\nj : ι\nhj : x ∈ toFun (v i) j\n⊢ ∃ i, x ∈ (fun i => toFun (find c ne i) i) i\n[PROOFSTEP]\nuse j\n[GOAL]\ncase h\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\nhc : IsChain (fun x x_1 => x ≤ x_1) c\nne : Set.Nonempty c\nhfin : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nhU : s ⊆ ⋃ (i : ι), u i\nx : X\nhxs : x ∈ s\nthis : Nonempty (PartialRefinement u s)\nv : ι → PartialRefinement u s\nhvc : ∀ (x_1 : ι), x ∈ u x_1 → v x_1 ∈ c\nhiv : ∀ (x_1 : ι), x ∈ u x_1 → x_1 ∈ (v x_1).carrier\ni : ι\nhxi : x ∈ u i\nhmax : ∀ (j : ι), x ∈ u j → v i ≤ v j → v i = v j\nj : ι\nhj : x ∈ toFun (v i) j\n⊢ x ∈ (fun i => toFun (find c ne i) i) j\n[PROOFSTEP]\nhave hj' : x ∈ u j := (v i).subset _ hj\n[GOAL]\ncase h\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\nhc : IsChain (fun x x_1 => x ≤ x_1) c\nne : Set.Nonempty c\nhfin : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nhU : s ⊆ ⋃ (i : ι), u i\nx : X\nhxs : x ∈ s\nthis : Nonempty (PartialRefinement u s)\nv : ι → PartialRefinement u s\nhvc : ∀ (x_1 : ι), x ∈ u x_1 → v x_1 ∈ c\nhiv : ∀ (x_1 : ι), x ∈ u x_1 → x_1 ∈ (v x_1).carrier\ni : ι\nhxi : x ∈ u i\nhmax : ∀ (j : ι), x ∈ u j → v i ≤ v j → v i = v j\nj : ι\nhj : x ∈ toFun (v i) j\nhj' : x ∈ u j\n⊢ x ∈ (fun i => toFun (find c ne i) i) j\n[PROOFSTEP]\nhave : v j ≤ v i := (hc.total (hvc _ hxi) (hvc _ hj')).elim (fun h => (hmax j hj' h).ge) id\n[GOAL]\ncase h\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nc : Set (PartialRefinement u s)\nhc : IsChain (fun x x_1 => x ≤ x_1) c\nne : Set.Nonempty c\nhfin : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nhU : s ⊆ ⋃ (i : ι), u i\nx : X\nhxs : x ∈ s\nthis✝ : Nonempty (PartialRefinement u s)\nv : ι → PartialRefinement u s\nhvc : ∀ (x_1 : ι), x ∈ u x_1 → v x_1 ∈ c\nhiv : ∀ (x_1 : ι), x ∈ u x_1 → x_1 ∈ (v x_1).carrier\ni : ι\nhxi : x ∈ u i\nhmax : ∀ (j : ι), x ∈ u j → v i ≤ v j → v i = v j\nj : ι\nhj : x ∈ toFun (v i) j\nhj' : x ∈ u j\nthis : v j ≤ v i\n⊢ x ∈ (fun i => toFun (find c ne i) i) j\n[PROOFSTEP]\nsimpa only [find_apply_of_mem hc ne (hvc _ hxi) (this.1 <| hiv _ hj')]\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\n⊢ ∃ v', v < v'\n[PROOFSTEP]\nhave I : (s ∩ ⋂ (j) (_ : j ≠ i), (v j)ᶜ) ⊆ v i :=\n  by\n  simp only [subset_def, mem_inter_iff, mem_iInter, and_imp]\n  intro x hxs H\n  rcases mem_iUnion.1 (v.subset_iUnion hxs) with ⟨j, hj⟩\n  exact (em (j = i)).elim (fun h => h ▸ hj) fun h => (H j h hj).elim\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\n⊢ s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\n[PROOFSTEP]\nsimp only [subset_def, mem_inter_iff, mem_iInter, and_imp]\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\n⊢ ∀ (x : X), x ∈ s → (∀ (i_1 : ι), i_1 ≠ i → x ∈ (toFun v i_1)ᶜ) → x ∈ toFun v i\n[PROOFSTEP]\nintro x hxs H\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nx : X\nhxs : x ∈ s\nH : ∀ (i_1 : ι), i_1 ≠ i → x ∈ (toFun v i_1)ᶜ\n⊢ x ∈ toFun v i\n[PROOFSTEP]\nrcases mem_iUnion.1 (v.subset_iUnion hxs) with ⟨j, hj⟩\n[GOAL]\ncase intro\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nx : X\nhxs : x ∈ s\nH : ∀ (i_1 : ι), i_1 ≠ i → x ∈ (toFun v i_1)ᶜ\nj : ι\nhj : x ∈ toFun v j\n⊢ x ∈ toFun v i\n[PROOFSTEP]\nexact (em (j = i)).elim (fun h => h ▸ hj) fun h => (H j h hj).elim\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\n⊢ ∃ v', v < v'\n[PROOFSTEP]\nhave C : IsClosed (s ∩ ⋂ (j) (_ : j ≠ i), (v j)ᶜ) :=\n  IsClosed.inter hs (isClosed_biInter fun _ _ => isClosed_compl_iff.2 <| v.isOpen _)\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\n⊢ ∃ v', v < v'\n[PROOFSTEP]\nrcases normal_exists_closure_subset C (v.isOpen i) I with ⟨vi, ovi, hvi, cvi⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\n⊢ ∃ v', v < v'\n[PROOFSTEP]\nrefine' ⟨⟨update v i vi, insert i v.carrier, _, _, _, _⟩, _, _⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\n⊢ ∀ (i_1 : ι), IsOpen (update v.toFun i vi i_1)\n[PROOFSTEP]\nintro j\n[GOAL]\ncase intro.intro.intro.refine'_1\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nj : ι\n⊢ IsOpen (update v.toFun i vi j)\n[PROOFSTEP]\nrcases eq_or_ne j i with (rfl | hne)\n[GOAL]\ncase intro.intro.intro.refine'_1.inl\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\nvi : Set X\novi : IsOpen vi\nj : ι\nhi : ¬j ∈ v.carrier\nI : s ∩ ⋂ (j_1 : ι) (_ : j_1 ≠ j), (toFun v j_1)ᶜ ⊆ toFun v j\nC : IsClosed (s ∩ ⋂ (j_1 : ι) (_ : j_1 ≠ j), (toFun v j_1)ᶜ)\nhvi : s ∩ ⋂ (j_1 : ι) (_ : j_1 ≠ j), (toFun v j_1)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v j\n⊢ IsOpen (update v.toFun j vi j)\n[PROOFSTEP]\nsimp [*, v.isOpen]\n[GOAL]\ncase intro.intro.intro.refine'_1.inr\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nj : ι\nhne : j ≠ i\n⊢ IsOpen (update v.toFun i vi j)\n[PROOFSTEP]\nsimp [*, v.isOpen]\n[GOAL]\ncase intro.intro.intro.refine'_2\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\n⊢ s ⊆ ⋃ (i_1 : ι), update v.toFun i vi i_1\n[PROOFSTEP]\nrefine' fun x hx => mem_iUnion.2 _\n[GOAL]\ncase intro.intro.intro.refine'_2\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nx : X\nhx : x ∈ s\n⊢ ∃ i_1, x ∈ update v.toFun i vi i_1\n[PROOFSTEP]\nrcases em (∃ (j : _) (_ : j ≠ i), x ∈ v j) with (⟨j, hji, hj⟩ | h)\n[GOAL]\ncase intro.intro.intro.refine'_2.inl.intro.intro\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nx : X\nhx : x ∈ s\nj : ι\nhji : j ≠ i\nhj : x ∈ toFun v j\n⊢ ∃ i_1, x ∈ update v.toFun i vi i_1\n[PROOFSTEP]\nuse j\n[GOAL]\ncase h\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nx : X\nhx : x ∈ s\nj : ι\nhji : j ≠ i\nhj : x ∈ toFun v j\n⊢ x ∈ update v.toFun i vi j\n[PROOFSTEP]\nrwa [update_noteq hji]\n[GOAL]\ncase intro.intro.intro.refine'_2.inr\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nx : X\nhx : x ∈ s\nh : ¬∃ j x_1, x ∈ toFun v j\n⊢ ∃ i_1, x ∈ update v.toFun i vi i_1\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase intro.intro.intro.refine'_2.inr\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nx : X\nhx : x ∈ s\nh : ∀ (j : ι), j ≠ i → ¬x ∈ toFun v j\n⊢ ∃ i_1, x ∈ update v.toFun i vi i_1\n[PROOFSTEP]\nuse i\n[GOAL]\ncase h\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nx : X\nhx : x ∈ s\nh : ∀ (j : ι), j ≠ i → ¬x ∈ toFun v j\n⊢ x ∈ update v.toFun i vi i\n[PROOFSTEP]\nrw [update_same]\n[GOAL]\ncase h\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nx : X\nhx : x ∈ s\nh : ∀ (j : ι), j ≠ i → ¬x ∈ toFun v j\n⊢ x ∈ vi\n[PROOFSTEP]\nexact hvi ⟨hx, mem_biInter h⟩\n[GOAL]\ncase intro.intro.intro.refine'_3\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\n⊢ ∀ {i_1 : ι}, i_1 ∈ insert i v.carrier → closure (update v.toFun i vi i_1) ⊆ u i_1\n[PROOFSTEP]\nrintro j (rfl | hj)\n[GOAL]\ncase intro.intro.intro.refine'_3.inl\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\nvi : Set X\novi : IsOpen vi\nj : ι\nhi : ¬j ∈ v.carrier\nI : s ∩ ⋂ (j_1 : ι) (_ : j_1 ≠ j), (toFun v j_1)ᶜ ⊆ toFun v j\nC : IsClosed (s ∩ ⋂ (j_1 : ι) (_ : j_1 ≠ j), (toFun v j_1)ᶜ)\nhvi : s ∩ ⋂ (j_1 : ι) (_ : j_1 ≠ j), (toFun v j_1)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v j\n⊢ closure (update v.toFun j vi j) ⊆ u j\n[PROOFSTEP]\nrwa [update_same, ← v.apply_eq hi]\n[GOAL]\ncase intro.intro.intro.refine'_3.inr\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nj : ι\nhj : j ∈ v.carrier\n⊢ closure (update v.toFun i vi j) ⊆ u j\n[PROOFSTEP]\nrw [update_noteq (ne_of_mem_of_not_mem hj hi)]\n[GOAL]\ncase intro.intro.intro.refine'_3.inr\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nj : ι\nhj : j ∈ v.carrier\n⊢ closure (toFun v j) ⊆ u j\n[PROOFSTEP]\nexact v.closure_subset hj\n[GOAL]\ncase intro.intro.intro.refine'_4\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\n⊢ ∀ {i_1 : ι}, ¬i_1 ∈ insert i v.carrier → update v.toFun i vi i_1 = u i_1\n[PROOFSTEP]\nintro j hj\n[GOAL]\ncase intro.intro.intro.refine'_4\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nj : ι\nhj : ¬j ∈ insert i v.carrier\n⊢ update v.toFun i vi j = u j\n[PROOFSTEP]\nrw [mem_insert_iff, not_or] at hj \n[GOAL]\ncase intro.intro.intro.refine'_4\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nj : ι\nhj : ¬j = i ∧ ¬j ∈ v.carrier\n⊢ update v.toFun i vi j = u j\n[PROOFSTEP]\nrw [update_noteq hj.1, v.apply_eq hj.2]\n[GOAL]\ncase intro.intro.intro.refine'_5\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\n⊢ v.carrier ⊆\n      { toFun := update v.toFun i vi, carrier := insert i v.carrier,\n          isOpen := (_ : ∀ (j : ι), IsOpen (update v.toFun i vi j)),\n          subset_iUnion := (_ : ∀ (x : X), x ∈ s → x ∈ ⋃ (i_1 : ι), update v.toFun i vi i_1),\n          closure_subset := (_ : ∀ {j : ι}, j ∈ insert i v.carrier → closure (update v.toFun i vi j) ⊆ u j),\n          apply_eq := (_ : ∀ {j : ι}, ¬j ∈ insert i v.carrier → update v.toFun i vi j = u j) }.carrier ∧\n    ∀ (i_1 : ι),\n      i_1 ∈ v.carrier →\n        toFun v i_1 =\n          toFun\n            { toFun := update v.toFun i vi, carrier := insert i v.carrier,\n              isOpen := (_ : ∀ (j : ι), IsOpen (update v.toFun i vi j)),\n              subset_iUnion := (_ : ∀ (x : X), x ∈ s → x ∈ ⋃ (i_2 : ι), update v.toFun i vi i_2),\n              closure_subset := (_ : ∀ {j : ι}, j ∈ insert i v.carrier → closure (update v.toFun i vi j) ⊆ u j),\n              apply_eq := (_ : ∀ {j : ι}, ¬j ∈ insert i v.carrier → update v.toFun i vi j = u j) }\n            i_1\n[PROOFSTEP]\nrefine' ⟨subset_insert _ _, fun j hj => _⟩\n[GOAL]\ncase intro.intro.intro.refine'_5\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\nj : ι\nhj : j ∈ v.carrier\n⊢ toFun v j =\n    toFun\n      { toFun := update v.toFun i vi, carrier := insert i v.carrier,\n        isOpen := (_ : ∀ (j : ι), IsOpen (update v.toFun i vi j)),\n        subset_iUnion := (_ : ∀ (x : X), x ∈ s → x ∈ ⋃ (i_1 : ι), update v.toFun i vi i_1),\n        closure_subset := (_ : ∀ {j : ι}, j ∈ insert i v.carrier → closure (update v.toFun i vi j) ⊆ u j),\n        apply_eq := (_ : ∀ {j : ι}, ¬j ∈ insert i v.carrier → update v.toFun i vi j = u j) }\n      j\n[PROOFSTEP]\nexact (update_noteq (ne_of_mem_of_not_mem hj hi) _ _).symm\n[GOAL]\ncase intro.intro.intro.refine'_6\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nv : PartialRefinement u s\nhs : IsClosed s\ni : ι\nhi : ¬i ∈ v.carrier\nI : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ toFun v i\nC : IsClosed (s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ)\nvi : Set X\novi : IsOpen vi\nhvi : s ∩ ⋂ (j : ι) (_ : j ≠ i), (toFun v j)ᶜ ⊆ vi\ncvi : closure vi ⊆ toFun v i\n⊢ ¬({ toFun := update v.toFun i vi, carrier := insert i v.carrier,\n            isOpen := (_ : ∀ (j : ι), IsOpen (update v.toFun i vi j)),\n            subset_iUnion := (_ : ∀ (x : X), x ∈ s → x ∈ ⋃ (i_1 : ι), update v.toFun i vi i_1),\n            closure_subset := (_ : ∀ {j : ι}, j ∈ insert i v.carrier → closure (update v.toFun i vi j) ⊆ u j),\n            apply_eq := (_ : ∀ {j : ι}, ¬j ∈ insert i v.carrier → update v.toFun i vi j = u j) }.carrier ⊆\n        v.carrier ∧\n      ∀ (i_1 : ι),\n        i_1 ∈\n            { toFun := update v.toFun i vi, carrier := insert i v.carrier,\n                isOpen := (_ : ∀ (j : ι), IsOpen (update v.toFun i vi j)),\n                subset_iUnion := (_ : ∀ (x : X), x ∈ s → x ∈ ⋃ (i_2 : ι), update v.toFun i vi i_2),\n                closure_subset := (_ : ∀ {j : ι}, j ∈ insert i v.carrier → closure (update v.toFun i vi j) ⊆ u j),\n                apply_eq := (_ : ∀ {j : ι}, ¬j ∈ insert i v.carrier → update v.toFun i vi j = u j) }.carrier →\n          toFun\n              { toFun := update v.toFun i vi, carrier := insert i v.carrier,\n                isOpen := (_ : ∀ (j : ι), IsOpen (update v.toFun i vi j)),\n                subset_iUnion := (_ : ∀ (x : X), x ∈ s → x ∈ ⋃ (i_2 : ι), update v.toFun i vi i_2),\n                closure_subset := (_ : ∀ {j : ι}, j ∈ insert i v.carrier → closure (update v.toFun i vi j) ⊆ u j),\n                apply_eq := (_ : ∀ {j : ι}, ¬j ∈ insert i v.carrier → update v.toFun i vi j = u j) }\n              i_1 =\n            toFun v i_1)\n[PROOFSTEP]\nexact fun hle => hi (hle.1 <| mem_insert _ _)\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nhs : IsClosed s\nuo : ∀ (i : ι), IsOpen (u i)\nuf : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nus : s ⊆ ⋃ (i : ι), u i\n⊢ ∃ v, s ⊆ iUnion v ∧ (∀ (i : ι), IsOpen (v i)) ∧ ∀ (i : ι), closure (v i) ⊆ u i\n[PROOFSTEP]\nhaveI : Nonempty (PartialRefinement u s) := ⟨⟨u, ∅, uo, us, False.elim, fun _ => rfl⟩⟩\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nhs : IsClosed s\nuo : ∀ (i : ι), IsOpen (u i)\nuf : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nus : s ⊆ ⋃ (i : ι), u i\nthis : Nonempty (PartialRefinement u s)\n⊢ ∃ v, s ⊆ iUnion v ∧ (∀ (i : ι), IsOpen (v i)) ∧ ∀ (i : ι), closure (v i) ⊆ u i\n[PROOFSTEP]\nhave : ∀ c : Set (PartialRefinement u s), IsChain (· ≤ ·) c → c.Nonempty → ∃ ub, ∀ v ∈ c, v ≤ ub := fun c hc ne =>\n  ⟨.chainSup c hc ne uf us, fun v hv => PartialRefinement.le_chainSup _ _ _ _ hv⟩\n[GOAL]\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nhs : IsClosed s\nuo : ∀ (i : ι), IsOpen (u i)\nuf : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nus : s ⊆ ⋃ (i : ι), u i\nthis✝ : Nonempty (PartialRefinement u s)\nthis :\n  ∀ (c : Set (PartialRefinement u s)),\n    IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ∃ ub, ∀ (v : PartialRefinement u s), v ∈ c → v ≤ ub\n⊢ ∃ v, s ⊆ iUnion v ∧ (∀ (i : ι), IsOpen (v i)) ∧ ∀ (i : ι), closure (v i) ⊆ u i\n[PROOFSTEP]\nrcases zorn_nonempty_partialOrder this with ⟨v, hv⟩\n[GOAL]\ncase intro\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nhs : IsClosed s\nuo : ∀ (i : ι), IsOpen (u i)\nuf : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nus : s ⊆ ⋃ (i : ι), u i\nthis✝ : Nonempty (PartialRefinement u s)\nthis :\n  ∀ (c : Set (PartialRefinement u s)),\n    IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ∃ ub, ∀ (v : PartialRefinement u s), v ∈ c → v ≤ ub\nv : PartialRefinement u s\nhv : ∀ (a : PartialRefinement u s), v ≤ a → a = v\n⊢ ∃ v, s ⊆ iUnion v ∧ (∀ (i : ι), IsOpen (v i)) ∧ ∀ (i : ι), closure (v i) ⊆ u i\n[PROOFSTEP]\nsuffices : ∀ i, i ∈ v.carrier\n[GOAL]\ncase intro\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nhs : IsClosed s\nuo : ∀ (i : ι), IsOpen (u i)\nuf : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nus : s ⊆ ⋃ (i : ι), u i\nthis✝¹ : Nonempty (PartialRefinement u s)\nthis✝ :\n  ∀ (c : Set (PartialRefinement u s)),\n    IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ∃ ub, ∀ (v : PartialRefinement u s), v ∈ c → v ≤ ub\nv : PartialRefinement u s\nhv : ∀ (a : PartialRefinement u s), v ≤ a → a = v\nthis : ∀ (i : ι), i ∈ v.carrier\n⊢ ∃ v, s ⊆ iUnion v ∧ (∀ (i : ι), IsOpen (v i)) ∧ ∀ (i : ι), closure (v i) ⊆ u i\ncase this\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nhs : IsClosed s\nuo : ∀ (i : ι), IsOpen (u i)\nuf : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nus : s ⊆ ⋃ (i : ι), u i\nthis✝ : Nonempty (PartialRefinement u s)\nthis :\n  ∀ (c : Set (PartialRefinement u s)),\n    IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ∃ ub, ∀ (v : PartialRefinement u s), v ∈ c → v ≤ ub\nv : PartialRefinement u s\nhv : ∀ (a : PartialRefinement u s), v ≤ a → a = v\n⊢ ∀ (i : ι), i ∈ v.carrier\n[PROOFSTEP]\nexact ⟨v, v.subset_iUnion, fun i => v.isOpen _, fun i => v.closure_subset (this i)⟩\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nhs : IsClosed s\nuo : ∀ (i : ι), IsOpen (u i)\nuf : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nus : s ⊆ ⋃ (i : ι), u i\nthis✝ : Nonempty (PartialRefinement u s)\nthis :\n  ∀ (c : Set (PartialRefinement u s)),\n    IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ∃ ub, ∀ (v : PartialRefinement u s), v ∈ c → v ≤ ub\nv : PartialRefinement u s\nhv : ∀ (a : PartialRefinement u s), v ≤ a → a = v\n⊢ ∀ (i : ι), i ∈ v.carrier\n[PROOFSTEP]\ncontrapose! hv\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nhs : IsClosed s\nuo : ∀ (i : ι), IsOpen (u i)\nuf : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nus : s ⊆ ⋃ (i : ι), u i\nthis✝ : Nonempty (PartialRefinement u s)\nthis :\n  ∀ (c : Set (PartialRefinement u s)),\n    IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ∃ ub, ∀ (v : PartialRefinement u s), v ∈ c → v ≤ ub\nv : PartialRefinement u s\nhv : ∃ i, ¬i ∈ v.carrier\n⊢ ∃ a, v ≤ a ∧ a ≠ v\n[PROOFSTEP]\nrcases hv with ⟨i, hi⟩\n[GOAL]\ncase this.intro\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nhs : IsClosed s\nuo : ∀ (i : ι), IsOpen (u i)\nuf : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nus : s ⊆ ⋃ (i : ι), u i\nthis✝ : Nonempty (PartialRefinement u s)\nthis :\n  ∀ (c : Set (PartialRefinement u s)),\n    IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ∃ ub, ∀ (v : PartialRefinement u s), v ∈ c → v ≤ ub\nv : PartialRefinement u s\ni : ι\nhi : ¬i ∈ v.carrier\n⊢ ∃ a, v ≤ a ∧ a ≠ v\n[PROOFSTEP]\nrcases v.exists_gt hs i hi with ⟨v', hlt⟩\n[GOAL]\ncase this.intro.intro\nι : Type u_1\nX : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : NormalSpace X\nu : ι → Set X\ns : Set X\nhs : IsClosed s\nuo : ∀ (i : ι), IsOpen (u i)\nuf : ∀ (x : X), x ∈ s → Set.Finite {i | x ∈ u i}\nus : s ⊆ ⋃ (i : ι), u i\nthis✝ : Nonempty (PartialRefinement u s)\nthis :\n  ∀ (c : Set (PartialRefinement u s)),\n    IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ∃ ub, ∀ (v : PartialRefinement u s), v ∈ c → v ≤ ub\nv : PartialRefinement u s\ni : ι\nhi : ¬i ∈ v.carrier\nv' : PartialRefinement u s\nhlt : v < v'\n⊢ ∃ a, v ≤ a ∧ a ≠ v\n[PROOFSTEP]\nexact ⟨v', hlt.le, hlt.ne'⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.ShrinkingLemma", "llama_tokens": 17167, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947425132315, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.3731935054183567}}
{"text": "[GOAL]\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone F\nX Y : WidePullbackShape J\nf : X ⟶ Y\n⊢ ((Functor.const (WidePullbackShape J)).obj c.pt.left).map f ≫\n      (fun X => Option.casesOn X c.pt.hom fun j => (NatTrans.app c.π { as := j }).left) Y =\n    (fun X => Option.casesOn X c.pt.hom fun j => (NatTrans.app c.π { as := j }).left) X ≫\n      (widePullbackDiagramOfDiagramOver B F).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone F\nX Y : WidePullbackShape J\nf : X ⟶ Y\n⊢ 𝟙 c.pt.left ≫ Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) Y =\n    Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) X ≫\n      WidePullbackShape.Hom.rec (motive := fun a a_1 t =>\n        X = a →\n          Y = a_1 →\n            HEq f t →\n              (Option.rec B (fun val => (F.obj { as := val }).left) X ⟶\n                Option.rec B (fun val => (F.obj { as := val }).left) Y))\n        (fun X_1 h =>\n          Eq.rec (motive := fun x x_1 =>\n            Y = x →\n              HEq f (𝟙 x) →\n                (Option.rec B (fun val => (F.obj { as := val }).left) X ⟶\n                  Option.rec B (fun val => (F.obj { as := val }).left) Y))\n            (fun h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : X ⟶ x) →\n                  HEq f (𝟙 X) →\n                    (Option.rec B (fun val => (F.obj { as := val }).left) X ⟶\n                      Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h =>\n                  (_ : WidePullbackShape.Hom.id X = f) ▸ 𝟙 (Option.rec B (fun val => (F.obj { as := val }).left) X))\n                (_ : X = Y) f)\n            h)\n        (fun j h =>\n          Eq.rec (motive := fun x x_1 =>\n            (f : x ⟶ Y) →\n              Y = none →\n                HEq f (WidePullbackShape.Hom.term j) →\n                  (Option.rec B (fun val => (F.obj { as := val }).left) x ⟶\n                    Option.rec B (fun val => (F.obj { as := val }).left) Y))\n            (fun f h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some j ⟶ x) →\n                  HEq f (WidePullbackShape.Hom.term j) →\n                    ((F.obj { as := j }).left ⟶ Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h => (_ : WidePullbackShape.Hom.term j = f) ▸ (F.obj { as := j }).hom) (_ : none = Y) f)\n            (_ : some j = X) f)\n        f (_ : X = X) (_ : Y = Y) (_ : HEq f f)\n[PROOFSTEP]\ncases X\n[GOAL]\ncase none\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone F\nY : WidePullbackShape J\nf : none ⟶ Y\n⊢ 𝟙 c.pt.left ≫ Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) Y =\n    Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) none ≫\n      WidePullbackShape.Hom.rec (motive := fun a a_1 t =>\n        none = a →\n          Y = a_1 →\n            HEq f t →\n              (Option.rec B (fun val => (F.obj { as := val }).left) none ⟶\n                Option.rec B (fun val => (F.obj { as := val }).left) Y))\n        (fun X h =>\n          Eq.rec (motive := fun x x_1 =>\n            Y = x →\n              HEq f (𝟙 x) →\n                (Option.rec B (fun val => (F.obj { as := val }).left) none ⟶\n                  Option.rec B (fun val => (F.obj { as := val }).left) Y))\n            (fun h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : none ⟶ x) →\n                  HEq f (𝟙 none) →\n                    (Option.rec B (fun val => (F.obj { as := val }).left) none ⟶\n                      Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h =>\n                  (_ : WidePullbackShape.Hom.id none = f) ▸\n                    𝟙 (Option.rec B (fun val => (F.obj { as := val }).left) none))\n                (_ : none = Y) f)\n            h)\n        (fun j h =>\n          Eq.rec (motive := fun x x_1 =>\n            (f : x ⟶ Y) →\n              Y = none →\n                HEq f (WidePullbackShape.Hom.term j) →\n                  (Option.rec B (fun val => (F.obj { as := val }).left) x ⟶\n                    Option.rec B (fun val => (F.obj { as := val }).left) Y))\n            (fun f h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some j ⟶ x) →\n                  HEq f (WidePullbackShape.Hom.term j) →\n                    ((F.obj { as := j }).left ⟶ Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h => (_ : WidePullbackShape.Hom.term j = f) ▸ (F.obj { as := j }).hom) (_ : none = Y) f)\n            (_ : some j = none) f)\n        f (_ : none = none) (_ : Y = Y) (_ : HEq f f)\n[PROOFSTEP]\ncases Y\n[GOAL]\ncase some\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone F\nY : WidePullbackShape J\nval✝ : J\nf : some val✝ ⟶ Y\n⊢ 𝟙 c.pt.left ≫ Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) Y =\n    Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) (some val✝) ≫\n      WidePullbackShape.Hom.rec (motive := fun a a_1 t =>\n        some val✝ = a →\n          Y = a_1 →\n            HEq f t →\n              (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝) ⟶\n                Option.rec B (fun val => (F.obj { as := val }).left) Y))\n        (fun X h =>\n          Eq.rec (motive := fun x x_1 =>\n            Y = x →\n              HEq f (𝟙 x) →\n                (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝) ⟶\n                  Option.rec B (fun val => (F.obj { as := val }).left) Y))\n            (fun h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some val✝ ⟶ x) →\n                  HEq f (𝟙 (some val✝)) →\n                    (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝) ⟶\n                      Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h =>\n                  (_ : WidePullbackShape.Hom.id (some val✝) = f) ▸\n                    𝟙 (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n                (_ : some val✝ = Y) f)\n            h)\n        (fun j h =>\n          Eq.rec (motive := fun x x_1 =>\n            (f : x ⟶ Y) →\n              Y = none →\n                HEq f (WidePullbackShape.Hom.term j) →\n                  (Option.rec B (fun val => (F.obj { as := val }).left) x ⟶\n                    Option.rec B (fun val => (F.obj { as := val }).left) Y))\n            (fun f h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some j ⟶ x) →\n                  HEq f (WidePullbackShape.Hom.term j) →\n                    ((F.obj { as := j }).left ⟶ Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h => (_ : WidePullbackShape.Hom.term j = f) ▸ (F.obj { as := j }).hom) (_ : none = Y) f)\n            (_ : some j = some val✝) f)\n        f (_ : some val✝ = some val✝) (_ : Y = Y) (_ : HEq f f)\n[PROOFSTEP]\ncases Y\n[GOAL]\ncase none.none\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone F\nf : none ⟶ none\n⊢ 𝟙 c.pt.left ≫ Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) none =\n    Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) none ≫\n      WidePullbackShape.Hom.rec (motive := fun a a_1 t =>\n        none = a →\n          none = a_1 →\n            HEq f t →\n              (Option.rec B (fun val => (F.obj { as := val }).left) none ⟶\n                Option.rec B (fun val => (F.obj { as := val }).left) none))\n        (fun X h =>\n          Eq.rec (motive := fun x x_1 =>\n            none = x →\n              HEq f (𝟙 x) →\n                (Option.rec B (fun val => (F.obj { as := val }).left) none ⟶\n                  Option.rec B (fun val => (F.obj { as := val }).left) none))\n            (fun h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : none ⟶ x) →\n                  HEq f (𝟙 none) →\n                    (Option.rec B (fun val => (F.obj { as := val }).left) none ⟶\n                      Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h =>\n                  (_ : WidePullbackShape.Hom.id none = f) ▸\n                    𝟙 (Option.rec B (fun val => (F.obj { as := val }).left) none))\n                (_ : none = none) f)\n            h)\n        (fun j h =>\n          Eq.rec (motive := fun x x_1 =>\n            (f : x ⟶ none) →\n              none = none →\n                HEq f (WidePullbackShape.Hom.term j) →\n                  (Option.rec B (fun val => (F.obj { as := val }).left) x ⟶\n                    Option.rec B (fun val => (F.obj { as := val }).left) none))\n            (fun f h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some j ⟶ x) →\n                  HEq f (WidePullbackShape.Hom.term j) →\n                    ((F.obj { as := j }).left ⟶ Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h => (_ : WidePullbackShape.Hom.term j = f) ▸ (F.obj { as := j }).hom) (_ : none = none) f)\n            (_ : some j = none) f)\n        f (_ : none = none) (_ : none = none) (_ : HEq f f)\n[PROOFSTEP]\ncases f\n[GOAL]\ncase none.some\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone F\nval✝ : J\nf : none ⟶ some val✝\n⊢ 𝟙 c.pt.left ≫ Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) (some val✝) =\n    Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) none ≫\n      WidePullbackShape.Hom.rec (motive := fun a a_1 t =>\n        none = a →\n          some val✝ = a_1 →\n            HEq f t →\n              (Option.rec B (fun val => (F.obj { as := val }).left) none ⟶\n                Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n        (fun X h =>\n          Eq.rec (motive := fun x x_1 =>\n            some val✝ = x →\n              HEq f (𝟙 x) →\n                (Option.rec B (fun val => (F.obj { as := val }).left) none ⟶\n                  Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n            (fun h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : none ⟶ x) →\n                  HEq f (𝟙 none) →\n                    (Option.rec B (fun val => (F.obj { as := val }).left) none ⟶\n                      Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h =>\n                  (_ : WidePullbackShape.Hom.id none = f) ▸\n                    𝟙 (Option.rec B (fun val => (F.obj { as := val }).left) none))\n                (_ : none = some val✝) f)\n            h)\n        (fun j h =>\n          Eq.rec (motive := fun x x_1 =>\n            (f : x ⟶ some val✝) →\n              some val✝ = none →\n                HEq f (WidePullbackShape.Hom.term j) →\n                  (Option.rec B (fun val => (F.obj { as := val }).left) x ⟶\n                    Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n            (fun f h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some j ⟶ x) →\n                  HEq f (WidePullbackShape.Hom.term j) →\n                    ((F.obj { as := j }).left ⟶ Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h => (_ : WidePullbackShape.Hom.term j = f) ▸ (F.obj { as := j }).hom) (_ : none = some val✝) f)\n            (_ : some j = none) f)\n        f (_ : none = none) (_ : some val✝ = some val✝) (_ : HEq f f)\n[PROOFSTEP]\ncases f\n[GOAL]\ncase some.none\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone F\nval✝ : J\nf : some val✝ ⟶ none\n⊢ 𝟙 c.pt.left ≫ Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) none =\n    Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) (some val✝) ≫\n      WidePullbackShape.Hom.rec (motive := fun a a_1 t =>\n        some val✝ = a →\n          none = a_1 →\n            HEq f t →\n              (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝) ⟶\n                Option.rec B (fun val => (F.obj { as := val }).left) none))\n        (fun X h =>\n          Eq.rec (motive := fun x x_1 =>\n            none = x →\n              HEq f (𝟙 x) →\n                (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝) ⟶\n                  Option.rec B (fun val => (F.obj { as := val }).left) none))\n            (fun h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some val✝ ⟶ x) →\n                  HEq f (𝟙 (some val✝)) →\n                    (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝) ⟶\n                      Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h =>\n                  (_ : WidePullbackShape.Hom.id (some val✝) = f) ▸\n                    𝟙 (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n                (_ : some val✝ = none) f)\n            h)\n        (fun j h =>\n          Eq.rec (motive := fun x x_1 =>\n            (f : x ⟶ none) →\n              none = none →\n                HEq f (WidePullbackShape.Hom.term j) →\n                  (Option.rec B (fun val => (F.obj { as := val }).left) x ⟶\n                    Option.rec B (fun val => (F.obj { as := val }).left) none))\n            (fun f h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some j ⟶ x) →\n                  HEq f (WidePullbackShape.Hom.term j) →\n                    ((F.obj { as := j }).left ⟶ Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h => (_ : WidePullbackShape.Hom.term j = f) ▸ (F.obj { as := j }).hom) (_ : none = none) f)\n            (_ : some j = some val✝) f)\n        f (_ : some val✝ = some val✝) (_ : none = none) (_ : HEq f f)\n[PROOFSTEP]\ncases f\n[GOAL]\ncase some.some\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone F\nval✝¹ val✝ : J\nf : some val✝¹ ⟶ some val✝\n⊢ 𝟙 c.pt.left ≫ Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) (some val✝) =\n    Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) (some val✝¹) ≫\n      WidePullbackShape.Hom.rec (motive := fun a a_1 t =>\n        some val✝¹ = a →\n          some val✝ = a_1 →\n            HEq f t →\n              (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝¹) ⟶\n                Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n        (fun X h =>\n          Eq.rec (motive := fun x x_1 =>\n            some val✝ = x →\n              HEq f (𝟙 x) →\n                (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝¹) ⟶\n                  Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n            (fun h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some val✝¹ ⟶ x) →\n                  HEq f (𝟙 (some val✝¹)) →\n                    (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝¹) ⟶\n                      Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h =>\n                  (_ : WidePullbackShape.Hom.id (some val✝¹) = f) ▸\n                    𝟙 (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝¹)))\n                (_ : some val✝¹ = some val✝) f)\n            h)\n        (fun j h =>\n          Eq.rec (motive := fun x x_1 =>\n            (f : x ⟶ some val✝) →\n              some val✝ = none →\n                HEq f (WidePullbackShape.Hom.term j) →\n                  (Option.rec B (fun val => (F.obj { as := val }).left) x ⟶\n                    Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n            (fun f h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some j ⟶ x) →\n                  HEq f (WidePullbackShape.Hom.term j) →\n                    ((F.obj { as := j }).left ⟶ Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h => (_ : WidePullbackShape.Hom.term j = f) ▸ (F.obj { as := j }).hom) (_ : none = some val✝) f)\n            (_ : some j = some val✝¹) f)\n        f (_ : some val✝¹ = some val✝¹) (_ : some val✝ = some val✝) (_ : HEq f f)\n[PROOFSTEP]\ncases f\n[GOAL]\ncase none.none.id\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone F\n⊢ 𝟙 c.pt.left ≫ Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) none =\n    Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) none ≫\n      WidePullbackShape.Hom.rec (motive := fun a a_1 t =>\n        none = a →\n          none = a_1 →\n            HEq (WidePullbackShape.Hom.id none) t →\n              (Option.rec B (fun val => (F.obj { as := val }).left) none ⟶\n                Option.rec B (fun val => (F.obj { as := val }).left) none))\n        (fun X h =>\n          Eq.rec (motive := fun x x_1 =>\n            none = x →\n              HEq (WidePullbackShape.Hom.id none) (𝟙 x) →\n                (Option.rec B (fun val => (F.obj { as := val }).left) none ⟶\n                  Option.rec B (fun val => (F.obj { as := val }).left) none))\n            (fun h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : none ⟶ x) →\n                  HEq f (𝟙 none) →\n                    (Option.rec B (fun val => (F.obj { as := val }).left) none ⟶\n                      Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h =>\n                  (_ : WidePullbackShape.Hom.id none = f) ▸\n                    𝟙 (Option.rec B (fun val => (F.obj { as := val }).left) none))\n                (_ : none = none) (WidePullbackShape.Hom.id none))\n            h)\n        (fun j h =>\n          Eq.rec (motive := fun x x_1 =>\n            (f : x ⟶ none) →\n              none = none →\n                HEq f (WidePullbackShape.Hom.term j) →\n                  (Option.rec B (fun val => (F.obj { as := val }).left) x ⟶\n                    Option.rec B (fun val => (F.obj { as := val }).left) none))\n            (fun f h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some j ⟶ x) →\n                  HEq f (WidePullbackShape.Hom.term j) →\n                    ((F.obj { as := j }).left ⟶ Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h => (_ : WidePullbackShape.Hom.term j = f) ▸ (F.obj { as := j }).hom) (_ : none = none) f)\n            (_ : some j = none) (WidePullbackShape.Hom.id none))\n        (WidePullbackShape.Hom.id none) (_ : none = none) (_ : none = none)\n        (_ : HEq (WidePullbackShape.Hom.id none) (WidePullbackShape.Hom.id none))\n[PROOFSTEP]\nrw [Category.id_comp, Category.comp_id]\n[GOAL]\ncase some.none.term\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone F\nval✝ : J\n⊢ 𝟙 c.pt.left ≫ Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) none =\n    Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) (some val✝) ≫\n      WidePullbackShape.Hom.rec (motive := fun a a_1 t =>\n        some val✝ = a →\n          none = a_1 →\n            HEq (WidePullbackShape.Hom.term val✝) t →\n              (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝) ⟶\n                Option.rec B (fun val => (F.obj { as := val }).left) none))\n        (fun X h =>\n          Eq.rec (motive := fun x x_1 =>\n            none = x →\n              HEq (WidePullbackShape.Hom.term val✝) (𝟙 x) →\n                (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝) ⟶\n                  Option.rec B (fun val => (F.obj { as := val }).left) none))\n            (fun h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some val✝ ⟶ x) →\n                  HEq f (𝟙 (some val✝)) →\n                    (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝) ⟶\n                      Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h =>\n                  (_ : WidePullbackShape.Hom.id (some val✝) = f) ▸\n                    𝟙 (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n                (_ : some val✝ = none) (WidePullbackShape.Hom.term val✝))\n            h)\n        (fun j h =>\n          Eq.rec (motive := fun x x_1 =>\n            (f : x ⟶ none) →\n              none = none →\n                HEq f (WidePullbackShape.Hom.term j) →\n                  (Option.rec B (fun val => (F.obj { as := val }).left) x ⟶\n                    Option.rec B (fun val => (F.obj { as := val }).left) none))\n            (fun f h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some j ⟶ x) →\n                  HEq f (WidePullbackShape.Hom.term j) →\n                    ((F.obj { as := j }).left ⟶ Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h => (_ : WidePullbackShape.Hom.term j = f) ▸ (F.obj { as := j }).hom) (_ : none = none) f)\n            (_ : some j = some val✝) (WidePullbackShape.Hom.term val✝))\n        (WidePullbackShape.Hom.term val✝) (_ : some val✝ = some val✝) (_ : none = none)\n        (_ : HEq (WidePullbackShape.Hom.term val✝) (WidePullbackShape.Hom.term val✝))\n[PROOFSTEP]\nrw [Over.w, Category.id_comp]\n[GOAL]\ncase some.some.id\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone F\nval✝ : J\n⊢ 𝟙 c.pt.left ≫ Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) (some val✝) =\n    Option.rec c.pt.hom (fun val => (NatTrans.app c.π { as := val }).left) (some val✝) ≫\n      WidePullbackShape.Hom.rec (motive := fun a a_1 t =>\n        some val✝ = a →\n          some val✝ = a_1 →\n            HEq (WidePullbackShape.Hom.id (some val✝)) t →\n              (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝) ⟶\n                Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n        (fun X h =>\n          Eq.rec (motive := fun x x_1 =>\n            some val✝ = x →\n              HEq (WidePullbackShape.Hom.id (some val✝)) (𝟙 x) →\n                (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝) ⟶\n                  Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n            (fun h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some val✝ ⟶ x) →\n                  HEq f (𝟙 (some val✝)) →\n                    (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝) ⟶\n                      Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h =>\n                  (_ : WidePullbackShape.Hom.id (some val✝) = f) ▸\n                    𝟙 (Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n                (_ : some val✝ = some val✝) (WidePullbackShape.Hom.id (some val✝)))\n            h)\n        (fun j h =>\n          Eq.rec (motive := fun x x_1 =>\n            (f : x ⟶ some val✝) →\n              some val✝ = none →\n                HEq f (WidePullbackShape.Hom.term j) →\n                  (Option.rec B (fun val => (F.obj { as := val }).left) x ⟶\n                    Option.rec B (fun val => (F.obj { as := val }).left) (some val✝)))\n            (fun f h =>\n              Eq.rec (motive := fun x x_1 =>\n                (f : some j ⟶ x) →\n                  HEq f (WidePullbackShape.Hom.term j) →\n                    ((F.obj { as := j }).left ⟶ Option.rec B (fun val => (F.obj { as := val }).left) x))\n                (fun f h => (_ : WidePullbackShape.Hom.term j = f) ▸ (F.obj { as := j }).hom) (_ : none = some val✝) f)\n            (_ : some j = some val✝) (WidePullbackShape.Hom.id (some val✝)))\n        (WidePullbackShape.Hom.id (some val✝)) (_ : some val✝ = some val✝) (_ : some val✝ = some val✝)\n        (_ : HEq (WidePullbackShape.Hom.id (some val✝)) (WidePullbackShape.Hom.id (some val✝)))\n[PROOFSTEP]\nrw [Category.id_comp, Category.comp_id]\n[GOAL]\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nX✝ Y✝ : Cone F\nf : X✝ ⟶ Y✝\nj : WidePullbackShape J\n⊢ f.Hom.left ≫ NatTrans.app (conesEquivInverseObj B F Y✝).π j = NatTrans.app (conesEquivInverseObj B F X✝).π j\n[PROOFSTEP]\ncases' j with j\n[GOAL]\ncase none\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nX✝ Y✝ : Cone F\nf : X✝ ⟶ Y✝\n⊢ f.Hom.left ≫ NatTrans.app (conesEquivInverseObj B F Y✝).π none = NatTrans.app (conesEquivInverseObj B F X✝).π none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nX✝ Y✝ : Cone F\nf : X✝ ⟶ Y✝\nj : J\n⊢ f.Hom.left ≫ NatTrans.app (conesEquivInverseObj B F Y✝).π (some j) =\n    NatTrans.app (conesEquivInverseObj B F X✝).π (some j)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nX✝ Y✝ : Cone F\nf : X✝ ⟶ Y✝\nj : J\n⊢ f.Hom.left ≫ (NatTrans.app Y✝.π { as := j }).left = (NatTrans.app X✝.π { as := j }).left\n[PROOFSTEP]\nrw [← f.w ⟨j⟩]\n[GOAL]\ncase some\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nX✝ Y✝ : Cone F\nf : X✝ ⟶ Y✝\nj : J\n⊢ f.Hom.left ≫ (NatTrans.app Y✝.π { as := j }).left = (f.Hom ≫ NatTrans.app Y✝.π { as := j }).left\n[PROOFSTEP]\nrfl\n[GOAL]\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone (widePullbackDiagramOfDiagramOver B F)\nx✝² x✝¹ : Discrete J\nX Y : J\nx✝ : { as := X } ⟶ { as := Y }\nf : { as := X }.as = { as := Y }.as\n⊢ ((Functor.const (Discrete J)).obj (mk (NatTrans.app c.π none))).map { down := { down := f } } ≫\n      (fun x =>\n          match x with\n          | { as := j } => homMk (NatTrans.app c.π (some j)))\n        { as := Y } =\n    (fun x =>\n          match x with\n          | { as := j } => homMk (NatTrans.app c.π (some j)))\n        { as := X } ≫\n      F.map { down := { down := f } }\n[PROOFSTEP]\ndsimp at f ⊢\n[GOAL]\nJ✝ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ B : C\nJ : Type w\nF : Discrete J ⥤ Over B\nc : Cone (widePullbackDiagramOfDiagramOver B F)\nx✝² x✝¹ : Discrete J\nX Y : J\nx✝ : { as := X } ⟶ { as := Y }\nf : X = Y\n⊢ 𝟙 (mk (NatTrans.app c.π none)) ≫ homMk (NatTrans.app c.π (some Y)) =\n    homMk (NatTrans.app c.π (some X)) ≫ F.map { down := { down := f } }\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nF : Discrete J ⥤ Over B\nx✝ : Cone (widePullbackDiagramOfDiagramOver B F)\n⊢ ∀ (j : WidePullbackShape J),\n    NatTrans.app ((𝟭 (Cone (widePullbackDiagramOfDiagramOver B F))).obj x✝).π j =\n      (Iso.mk (𝟙 ((𝟭 (Cone (widePullbackDiagramOfDiagramOver B F))).obj x✝).pt)\n            (𝟙 ((conesEquivFunctor B F ⋙ conesEquivInverse B F).obj x✝).pt)).hom ≫\n        NatTrans.app ((conesEquivFunctor B F ⋙ conesEquivInverse B F).obj x✝).π j\n[PROOFSTEP]\nrintro (j | j)\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nF : Discrete J ⥤ Over B\nx✝ : Cone (widePullbackDiagramOfDiagramOver B F)\n⊢ NatTrans.app ((𝟭 (Cone (widePullbackDiagramOfDiagramOver B F))).obj x✝).π none =\n    (Iso.mk (𝟙 ((𝟭 (Cone (widePullbackDiagramOfDiagramOver B F))).obj x✝).pt)\n          (𝟙 ((conesEquivFunctor B F ⋙ conesEquivInverse B F).obj x✝).pt)).hom ≫\n      NatTrans.app ((conesEquivFunctor B F ⋙ conesEquivInverse B F).obj x✝).π none\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase some\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nF : Discrete J ⥤ Over B\nx✝ : Cone (widePullbackDiagramOfDiagramOver B F)\nj : J\n⊢ NatTrans.app ((𝟭 (Cone (widePullbackDiagramOfDiagramOver B F))).obj x✝).π (some j) =\n    (Iso.mk (𝟙 ((𝟭 (Cone (widePullbackDiagramOfDiagramOver B F))).obj x✝).pt)\n          (𝟙 ((conesEquivFunctor B F ⋙ conesEquivInverse B F).obj x✝).pt)).hom ≫\n      NatTrans.app ((conesEquivFunctor B F ⋙ conesEquivInverse B F).obj x✝).π (some j)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nF : Discrete PEmpty ⥤ Over B\ns : Cone F\nm : s.pt ⟶ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt\nx✝ :\n  ∀ (j : Discrete PEmpty),\n    m ≫ NatTrans.app { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.π j = NatTrans.app s.π j\n⊢ m = (fun s => homMk s.pt.hom) s\n[PROOFSTEP]\nsimp only\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nF : Discrete PEmpty ⥤ Over B\ns : Cone F\nm : s.pt ⟶ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt\nx✝ :\n  ∀ (j : Discrete PEmpty),\n    m ≫ NatTrans.app { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.π j = NatTrans.app s.π j\n⊢ m = homMk s.pt.hom\n[PROOFSTEP]\next\n[GOAL]\ncase h\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nF : Discrete PEmpty ⥤ Over B\ns : Cone F\nm : s.pt ⟶ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt\nx✝ :\n  ∀ (j : Discrete PEmpty),\n    m ≫ NatTrans.app { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.π j = NatTrans.app s.π j\n⊢ m.left = (homMk s.pt.hom).left\n[PROOFSTEP]\nrw [Over.homMk_left _]\n[GOAL]\ncase h\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nF : Discrete PEmpty ⥤ Over B\ns : Cone F\nm : s.pt ⟶ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt\nx✝ :\n  ∀ (j : Discrete PEmpty),\n    m ≫ NatTrans.app { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.π j = NatTrans.app s.π j\n⊢ m.left = s.pt.hom\n[PROOFSTEP]\nhave := m.w\n[GOAL]\ncase h\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nF : Discrete PEmpty ⥤ Over B\ns : Cone F\nm : s.pt ⟶ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt\nx✝ :\n  ∀ (j : Discrete PEmpty),\n    m ≫ NatTrans.app { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.π j = NatTrans.app s.π j\nthis :\n  (𝟭 C).map m.left ≫ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt.hom =\n    s.pt.hom ≫ (Functor.fromPUnit B).map m.right\n⊢ m.left = s.pt.hom\n[PROOFSTEP]\ndsimp at this \n[GOAL]\ncase h\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nX B : C\nF : Discrete PEmpty ⥤ Over B\ns : Cone F\nm : s.pt ⟶ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt\nx✝ :\n  ∀ (j : Discrete PEmpty),\n    m ≫ NatTrans.app { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.π j = NatTrans.app s.π j\nthis : m.left ≫ 𝟙 B = s.pt.hom ≫ 𝟙 B\n⊢ m.left = s.pt.hom\n[PROOFSTEP]\nrwa [Category.comp_id, Category.comp_id] at this \n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Constructions.Over.Products", "llama_tokens": 12138, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947425132315, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.3731935054183567}}
{"text": "[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf'✝ f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf' : 𝕜 →L[𝕜] F\n⊢ HasFDerivAtFilter f f' x L ↔ HasDerivAtFilter f (↑f' 1) x L\n[PROOFSTEP]\nsimp [HasDerivAtFilter]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf'✝ f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf' : 𝕜 →L[𝕜] F\n⊢ HasStrictFDerivAt f f' x ↔ HasStrictDerivAt f (↑f' 1) x\n[PROOFSTEP]\nsimp [HasStrictDerivAt, HasStrictFDerivAt]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nh : ¬DifferentiableWithinAt 𝕜 f s x\n⊢ derivWithin f s x = 0\n[PROOFSTEP]\nunfold derivWithin\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nh : ¬DifferentiableWithinAt 𝕜 f s x\n⊢ ↑(fderivWithin 𝕜 f s x) 1 = 0\n[PROOFSTEP]\nrw [fderivWithin_zero_of_not_differentiableWithinAt h]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nh : ¬DifferentiableWithinAt 𝕜 f s x\n⊢ ↑0 1 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nh : ¬DifferentiableAt 𝕜 f x\n⊢ deriv f x = 0\n[PROOFSTEP]\nunfold deriv\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nh : ¬DifferentiableAt 𝕜 f x\n⊢ ↑(fderiv 𝕜 f x) 1 = 0\n[PROOFSTEP]\nrw [fderiv_zero_of_not_differentiableAt h]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nh : ¬DifferentiableAt 𝕜 f x\n⊢ ↑0 1 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nhf : HasDerivAtFilter f f' x✝ L\nhf' : f' ≠ 0\nx : 𝕜\n⊢ ‖x‖ ≤ ↑‖f'‖₊⁻¹ * ‖↑(smulRight 1 f') x‖\n[PROOFSTEP]\nsimp [norm_smul, ← div_eq_inv_mul, mul_div_cancel _ (mt norm_eq_zero.1 hf')]\n[GOAL]\n𝕜 : Type u\ninst✝⁵ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\nE : Type w\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\ninst✝ : PartialOrder 𝕜\n⊢ HasDerivWithinAt f f' (Ioi x) x ↔ HasDerivWithinAt f f' (Ici x) x\n[PROOFSTEP]\nrw [← Ici_diff_left, hasDerivWithinAt_diff_singleton]\n[GOAL]\n𝕜 : Type u\ninst✝⁵ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\nE : Type w\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\ninst✝ : PartialOrder 𝕜\n⊢ HasDerivWithinAt f f' (Iio x) x ↔ HasDerivWithinAt f f' (Iic x) x\n[PROOFSTEP]\nrw [← Iic_diff_right, hasDerivWithinAt_diff_singleton]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\n⊢ smulRight 1 (derivWithin f s x) = fderivWithin 𝕜 f s x\n[PROOFSTEP]\nsimp [derivWithin]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\n⊢ smulRight 1 (deriv f x) = fderiv 𝕜 f x\n[PROOFSTEP]\nsimp [deriv]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nh : DifferentiableAt 𝕜 f x\nhxs : UniqueDiffWithinAt 𝕜 s x\n⊢ _root_.derivWithin f s x = deriv f x\n[PROOFSTEP]\nunfold derivWithin deriv\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nh : DifferentiableAt 𝕜 f x\nhxs : UniqueDiffWithinAt 𝕜 s x\n⊢ ↑(fderivWithin 𝕜 f s x) 1 = ↑(fderiv 𝕜 f x) 1\n[PROOFSTEP]\nrw [h.fderivWithin hxs]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\ny : 𝕜\nh : s =ᶠ[𝓝[{y}ᶜ] x] t\n⊢ derivWithin f s x = derivWithin f t x\n[PROOFSTEP]\nsimp only [derivWithin, fderivWithin_congr_set' y h]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nh : s =ᶠ[𝓝 x] t\n⊢ derivWithin f s x = derivWithin f t x\n[PROOFSTEP]\nsimp only [derivWithin, fderivWithin_congr_set h]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\n⊢ derivWithin f univ = deriv f\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nx✝ : 𝕜\n⊢ derivWithin f univ x✝ = deriv f x✝\n[PROOFSTEP]\nunfold derivWithin deriv\n[GOAL]\ncase h\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nx✝ : 𝕜\n⊢ ↑(fderivWithin 𝕜 f univ x✝) 1 = ↑(fderiv 𝕜 f x✝) 1\n[PROOFSTEP]\nrw [fderivWithin_univ]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nht : t ∈ 𝓝 x\n⊢ derivWithin f (s ∩ t) x = derivWithin f s x\n[PROOFSTEP]\nunfold derivWithin\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nht : t ∈ 𝓝 x\n⊢ ↑(fderivWithin 𝕜 f (s ∩ t) x) 1 = ↑(fderivWithin 𝕜 f s x) 1\n[PROOFSTEP]\nrw [fderivWithin_inter ht]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nhs : IsOpen s\nhx : x ∈ s\n⊢ derivWithin f s x = deriv f x\n[PROOFSTEP]\nunfold derivWithin\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nhs : IsOpen s\nhx : x ∈ s\n⊢ ↑(fderivWithin 𝕜 f s x) 1 = deriv f x\n[PROOFSTEP]\nrw [fderivWithin_of_open hs hx]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nhs : IsOpen s\nhx : x ∈ s\n⊢ ↑(fderiv 𝕜 f x) 1 = deriv f x\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf✝ f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns✝ t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf : 𝕜 → F\ns : Set F\nx : 𝕜\n⊢ deriv f x ∈ s ↔ DifferentiableAt 𝕜 f x ∧ deriv f x ∈ s ∨ ¬DifferentiableAt 𝕜 f x ∧ 0 ∈ s\n[PROOFSTEP]\nby_cases hx : DifferentiableAt 𝕜 f x\n[GOAL]\ncase pos\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf✝ f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns✝ t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf : 𝕜 → F\ns : Set F\nx : 𝕜\nhx : DifferentiableAt 𝕜 f x\n⊢ deriv f x ∈ s ↔ DifferentiableAt 𝕜 f x ∧ deriv f x ∈ s ∨ ¬DifferentiableAt 𝕜 f x ∧ 0 ∈ s\n[PROOFSTEP]\nsimp [deriv_zero_of_not_differentiableAt, *]\n[GOAL]\ncase neg\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf✝ f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns✝ t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf : 𝕜 → F\ns : Set F\nx : 𝕜\nhx : ¬DifferentiableAt 𝕜 f x\n⊢ deriv f x ∈ s ↔ DifferentiableAt 𝕜 f x ∧ deriv f x ∈ s ∨ ¬DifferentiableAt 𝕜 f x ∧ 0 ∈ s\n[PROOFSTEP]\nsimp [deriv_zero_of_not_differentiableAt, *]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf✝ f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns✝ t✝ : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf : 𝕜 → F\nt : Set 𝕜\ns : Set F\nx : 𝕜\n⊢ derivWithin f t x ∈ s ↔\n    DifferentiableWithinAt 𝕜 f t x ∧ derivWithin f t x ∈ s ∨ ¬DifferentiableWithinAt 𝕜 f t x ∧ 0 ∈ s\n[PROOFSTEP]\nby_cases hx : DifferentiableWithinAt 𝕜 f t x\n[GOAL]\ncase pos\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf✝ f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns✝ t✝ : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf : 𝕜 → F\nt : Set 𝕜\ns : Set F\nx : 𝕜\nhx : DifferentiableWithinAt 𝕜 f t x\n⊢ derivWithin f t x ∈ s ↔\n    DifferentiableWithinAt 𝕜 f t x ∧ derivWithin f t x ∈ s ∨ ¬DifferentiableWithinAt 𝕜 f t x ∧ 0 ∈ s\n[PROOFSTEP]\nsimp [derivWithin_zero_of_not_differentiableWithinAt, *]\n[GOAL]\ncase neg\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf✝ f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns✝ t✝ : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf : 𝕜 → F\nt : Set 𝕜\ns : Set F\nx : 𝕜\nhx : ¬DifferentiableWithinAt 𝕜 f t x\n⊢ derivWithin f t x ∈ s ↔\n    DifferentiableWithinAt 𝕜 f t x ∧ derivWithin f t x ∈ s ∨ ¬DifferentiableWithinAt 𝕜 f t x ∧ 0 ∈ s\n[PROOFSTEP]\nsimp [derivWithin_zero_of_not_differentiableWithinAt, *]\n[GOAL]\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE✝ : Type w\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedSpace 𝕜 E✝\nf✝ f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\nx : ℝ\n⊢ derivWithin f (Ioi x) x = derivWithin f (Ici x) x\n[PROOFSTEP]\nby_cases H : DifferentiableWithinAt ℝ f (Ioi x) x\n[GOAL]\ncase pos\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE✝ : Type w\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedSpace 𝕜 E✝\nf✝ f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\nx : ℝ\nH : DifferentiableWithinAt ℝ f (Ioi x) x\n⊢ derivWithin f (Ioi x) x = derivWithin f (Ici x) x\n[PROOFSTEP]\nhave A := H.hasDerivWithinAt.Ici_of_Ioi\n[GOAL]\ncase pos\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE✝ : Type w\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedSpace 𝕜 E✝\nf✝ f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\nx : ℝ\nH : DifferentiableWithinAt ℝ f (Ioi x) x\nA : HasDerivWithinAt f (derivWithin f (Ioi x) x) (Ici x) x\n⊢ derivWithin f (Ioi x) x = derivWithin f (Ici x) x\n[PROOFSTEP]\nhave B := (differentiableWithinAt_Ioi_iff_Ici.1 H).hasDerivWithinAt\n[GOAL]\ncase pos\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE✝ : Type w\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedSpace 𝕜 E✝\nf✝ f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\nx : ℝ\nH : DifferentiableWithinAt ℝ f (Ioi x) x\nA : HasDerivWithinAt f (derivWithin f (Ioi x) x) (Ici x) x\nB : HasDerivWithinAt f (derivWithin f (Ici x) x) (Ici x) x\n⊢ derivWithin f (Ioi x) x = derivWithin f (Ici x) x\n[PROOFSTEP]\nsimpa using (uniqueDiffOn_Ici x).eq left_mem_Ici A B\n[GOAL]\ncase neg\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE✝ : Type w\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedSpace 𝕜 E✝\nf✝ f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\nx : ℝ\nH : ¬DifferentiableWithinAt ℝ f (Ioi x) x\n⊢ derivWithin f (Ioi x) x = derivWithin f (Ici x) x\n[PROOFSTEP]\nrw [derivWithin_zero_of_not_differentiableWithinAt H, derivWithin_zero_of_not_differentiableWithinAt]\n[GOAL]\ncase neg\n𝕜 : Type u\ninst✝⁶ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nE✝ : Type w\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedSpace 𝕜 E✝\nf✝ f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx✝ : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : ℝ → E\nx : ℝ\nH : ¬DifferentiableWithinAt ℝ f (Ioi x) x\n⊢ ¬DifferentiableWithinAt ℝ f (Ici x) x\n[PROOFSTEP]\nrwa [differentiableWithinAt_Ioi_iff_Ici] at H \n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nh₀ : f₀ =ᶠ[L] f₁\nhx : f₀ x = f₁ x\nh₁ : f₀' = f₁'\n⊢ ∀ (x : 𝕜), ↑(smulRight 1 f₀') x = ↑(smulRight 1 f₁') x\n[PROOFSTEP]\nsimp [h₁]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nh : HasDerivAtFilter f f' x L\nhL : f₁ =ᶠ[L] f\nhx : f₁ x = f x\n⊢ HasDerivAtFilter f₁ f' x L\n[PROOFSTEP]\nrwa [hL.hasDerivAtFilter_iff hx rfl]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nhs : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\n⊢ derivWithin f₁ s x = derivWithin f s x\n[PROOFSTEP]\nunfold derivWithin\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nhs : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\n⊢ ↑(fderivWithin 𝕜 f₁ s x) 1 = ↑(fderivWithin 𝕜 f s x) 1\n[PROOFSTEP]\nrw [hs.fderivWithin_eq hx]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nhs : EqOn f₁ f s\nhx : f₁ x = f x\n⊢ derivWithin f₁ s x = derivWithin f s x\n[PROOFSTEP]\nunfold derivWithin\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nhs : EqOn f₁ f s\nhx : f₁ x = f x\n⊢ ↑(fderivWithin 𝕜 f₁ s x) 1 = ↑(fderivWithin 𝕜 f s x) 1\n[PROOFSTEP]\nrw [fderivWithin_congr hs hx]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nhL : f₁ =ᶠ[𝓝 x] f\n⊢ deriv f₁ x = deriv f x\n[PROOFSTEP]\nunfold deriv\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nhL : f₁ =ᶠ[𝓝 x] f\n⊢ ↑(fderiv 𝕜 f₁ x) 1 = ↑(fderiv 𝕜 f x) 1\n[PROOFSTEP]\nrwa [Filter.EventuallyEq.fderiv_eq]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.Deriv.Basic", "llama_tokens": 9638, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947290421276, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.37319349774181243}}
{"text": "[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : Kˣ\n⊢ spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1\n[PROOFSTEP]\nsimp only [spanSingleton_one, Units.mul_inv', spanSingleton_mul_spanSingleton]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : Kˣ\n⊢ spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1\n[PROOFSTEP]\nsimp only [spanSingleton_one, Units.inv_mul', spanSingleton_mul_spanSingleton]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\n⊢ ↑((fun x =>\n          { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n            val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n            inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })\n        1) =\n    ↑1\n[PROOFSTEP]\nsimp only [spanSingleton_one, Units.val_mk, Units.val_one]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx y : Kˣ\n⊢ ↑(OneHom.toFun\n        {\n          toFun := fun x =>\n            { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n              val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n              inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },\n          map_one' :=\n            (_ :\n              (fun x =>\n                    { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                      val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                      inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })\n                  1 =\n                1) }\n        (x * y)) =\n    ↑(OneHom.toFun\n          {\n            toFun := fun x =>\n              { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },\n            map_one' :=\n              (_ :\n                (fun x =>\n                      { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                        val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                        inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })\n                    1 =\n                  1) }\n          x *\n        OneHom.toFun\n          {\n            toFun := fun x =>\n              { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },\n            map_one' :=\n              (_ :\n                (fun x =>\n                      { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                        val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                        inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })\n                    1 =\n                  1) }\n          y)\n[PROOFSTEP]\nsimp only [Units.val_mk, Units.val_mul, spanSingleton_mul_spanSingleton]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : Kˣ\n⊢ ↑(↑(toPrincipalIdeal R K) x) = spanSingleton R⁰ ↑x\n[PROOFSTEP]\nsimp only [toPrincipalIdeal]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : Kˣ\n⊢ ↑(↑{\n            toOneHom :=\n              {\n                toFun := fun x =>\n                  { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                    val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                    inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },\n                map_one' :=\n                  (_ :\n                    (fun x =>\n                          { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                            val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                            inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })\n                        1 =\n                      1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Kˣ),\n                  OneHom.toFun\n                      {\n                        toFun := fun x =>\n                          { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                            val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                            inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },\n                        map_one' :=\n                          (_ :\n                            (fun x =>\n                                  { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                                    val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                                    inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })\n                                1 =\n                              1) }\n                      (x * y) =\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                              val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                              inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },\n                          map_one' :=\n                            (_ :\n                              (fun x =>\n                                    { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                                      val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                                      inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })\n                                  1 =\n                                1) }\n                        x *\n                      OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                              val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                              inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },\n                          map_one' :=\n                            (_ :\n                              (fun x =>\n                                    { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                                      val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                                      inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })\n                                  1 =\n                                1) }\n                        y) }\n        x) =\n    spanSingleton R⁰ ↑x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nI : (FractionalIdeal R⁰ K)ˣ\nx : Kˣ\n⊢ ↑(toPrincipalIdeal R K) x = I ↔ spanSingleton R⁰ ↑x = ↑I\n[PROOFSTEP]\nsimp only [toPrincipalIdeal]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nI : (FractionalIdeal R⁰ K)ˣ\nx : Kˣ\n⊢ ↑{\n            toOneHom :=\n              {\n                toFun := fun x =>\n                  { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                    val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                    inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },\n                map_one' :=\n                  (_ :\n                    (fun x =>\n                          { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                            val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                            inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })\n                        1 =\n                      1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : Kˣ),\n                  OneHom.toFun\n                      {\n                        toFun := fun x =>\n                          { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                            val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                            inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },\n                        map_one' :=\n                          (_ :\n                            (fun x =>\n                                  { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                                    val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                                    inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })\n                                1 =\n                              1) }\n                      (x * y) =\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                              val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                              inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },\n                          map_one' :=\n                            (_ :\n                              (fun x =>\n                                    { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                                      val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                                      inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })\n                                  1 =\n                                1) }\n                        x *\n                      OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                              val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                              inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) },\n                          map_one' :=\n                            (_ :\n                              (fun x =>\n                                    { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹,\n                                      val_inv := (_ : spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1),\n                                      inv_val := (_ : spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1) })\n                                  1 =\n                                1) }\n                        y) }\n        x =\n      I ↔\n    spanSingleton R⁰ ↑x = ↑I\n[PROOFSTEP]\nexact Units.ext_iff\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ I ∈ MonoidHom.range (toPrincipalIdeal R K) ↔ ∃ x, spanSingleton R⁰ x = ↑I\n[PROOFSTEP]\nsimp only [MonoidHom.mem_range, toPrincipalIdeal_eq_iff]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ (∃ x, spanSingleton R⁰ ↑x = ↑I) ↔ ∃ x, spanSingleton R⁰ x = ↑I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ (∃ x, spanSingleton R⁰ ↑x = ↑I) → ∃ x, spanSingleton R⁰ x = ↑I\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase mpr\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ (∃ x, spanSingleton R⁰ x = ↑I) → ∃ x, spanSingleton R⁰ ↑x = ↑I\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase mp.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nI : (FractionalIdeal R⁰ K)ˣ\nx : Kˣ\nhx : spanSingleton R⁰ ↑x = ↑I\n⊢ ∃ x, spanSingleton R⁰ x = ↑I\n[PROOFSTEP]\nexact ⟨x, hx⟩\n[GOAL]\ncase mpr.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nI : (FractionalIdeal R⁰ K)ˣ\nx : K\nhx : spanSingleton R⁰ x = ↑I\n⊢ ∃ x, spanSingleton R⁰ ↑x = ↑I\n[PROOFSTEP]\nrefine ⟨Units.mk0 x ?_, hx⟩\n[GOAL]\ncase mpr.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nI : (FractionalIdeal R⁰ K)ˣ\nx : K\nhx : spanSingleton R⁰ x = ↑I\n⊢ x ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : DecidableEq L\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsFractionRing R K\ninst✝³ : Algebra K L\ninst✝² : FiniteDimensional K L\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nI : (FractionalIdeal R⁰ K)ˣ\nhx : spanSingleton R⁰ 0 = ↑I\n⊢ False\n[PROOFSTEP]\nsimp [I.ne_zero.symm] at hx \n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\n⊢ Quot.mk Setoid.r I = ↑mk I\n[PROOFSTEP]\nrw [ClassGroup.mk, canonicalEquiv_self, RingEquiv.coe_monoidHom_refl, Units.map_id, MonoidHom.comp_apply,\n  MonoidHom.id_apply, QuotientGroup.mk'_apply]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\n⊢ Quot.mk Setoid.r I = ↑I\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\n⊢ ↑mk I = ↑mk J ↔ ∃ x, I * ↑(toPrincipalIdeal R (FractionRing R)) x = J\n[PROOFSTEP]\nerw [QuotientGroup.mk'_eq_mk', canonicalEquiv_self, Units.map_id, Set.exists_range_iff]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\n⊢ (∃ i,\n      ↑(MonoidHom.id (FractionalIdeal R⁰ (FractionRing R))ˣ) I * ↑(toPrincipalIdeal R (FractionRing R)) i =\n        ↑(MonoidHom.id (FractionalIdeal R⁰ (FractionRing R))ˣ) J) ↔\n    ∃ x, I * ↑(toPrincipalIdeal R (FractionRing R)) x = J\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nhJ : ↑J = ↑J'\n⊢ ↑mk I = ↑mk J ↔ ∃ x y, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * J'\n[PROOFSTEP]\nrw [ClassGroup.mk_eq_mk]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nhJ : ↑J = ↑J'\n⊢ (∃ x, I * ↑(toPrincipalIdeal R (FractionRing R)) x = J) ↔\n    ∃ x y, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * J'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nhJ : ↑J = ↑J'\n⊢ (∃ x, I * ↑(toPrincipalIdeal R (FractionRing R)) x = J) →\n    ∃ x y, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * J'\n[PROOFSTEP]\nrintro ⟨x, rfl⟩\n[GOAL]\ncase mp.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nx : (FractionRing R)ˣ\nhJ : ↑(I * ↑(toPrincipalIdeal R (FractionRing R)) x) = ↑J'\n⊢ ∃ x y, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * J'\n[PROOFSTEP]\nrw [Units.val_mul, hI, coe_toPrincipalIdeal, mul_comm, spanSingleton_mul_coeIdeal_eq_coeIdeal] at hJ \n[GOAL]\ncase mp.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nx : (FractionRing R)ˣ\nhJ : Ideal.span {(sec R⁰ ↑x).fst} * I' = Ideal.span {↑(sec R⁰ ↑x).snd} * J'\n⊢ ∃ x y, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * J'\n[PROOFSTEP]\nexact ⟨_, _, sec_fst_ne_zero (R := R) le_rfl x.ne_zero, sec_snd_ne_zero (R := R) le_rfl (x : FractionRing R), hJ⟩\n[GOAL]\ncase mpr\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nhJ : ↑J = ↑J'\n⊢ (∃ x y, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * J') →\n    ∃ x, I * ↑(toPrincipalIdeal R (FractionRing R)) x = J\n[PROOFSTEP]\nrintro ⟨x, y, hx, hy, h⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nhJ : ↑J = ↑J'\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * I' = Ideal.span {y} * J'\n⊢ ∃ x, I * ↑(toPrincipalIdeal R (FractionRing R)) x = J\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro.intro.intro.intro.h\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nhJ : ↑J = ↑J'\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * I' = Ideal.span {y} * J'\n⊢ I * ↑(toPrincipalIdeal R (FractionRing R)) ?mpr.intro.intro.intro.intro.w = J\ncase mpr.intro.intro.intro.intro.w\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nhJ : ↑J = ↑J'\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * I' = Ideal.span {y} * J'\n⊢ (FractionRing R)ˣ\n[PROOFSTEP]\nrw [mul_comm, ← Units.eq_iff, Units.val_mul, coe_toPrincipalIdeal]\n[GOAL]\ncase mpr.intro.intro.intro.intro.h\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nhJ : ↑J = ↑J'\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * I' = Ideal.span {y} * J'\n⊢ spanSingleton R⁰ ↑?mpr.intro.intro.intro.intro.h * ↑I = ↑J\ncase mpr.intro.intro.intro.intro.h\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nhJ : ↑J = ↑J'\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * I' = Ideal.span {y} * J'\n⊢ (FractionRing R)ˣ\n[PROOFSTEP]\nconvert (mk'_mul_coeIdeal_eq_coeIdeal (FractionRing R) <| mem_nonZeroDivisors_of_ne_zero hy).2 h\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_8\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nhJ : ↑J = ↑J'\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * I' = Ideal.span {y} * J'\n⊢ ↑?mpr.intro.intro.intro.intro.h = mk' (FractionRing R) x { val := y, property := (_ : y ∈ R⁰) }\ncase mpr.intro.intro.intro.intro.h\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nhJ : ↑J = ↑J'\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * I' = Ideal.span {y} * J'\n⊢ (FractionRing R)ˣ\n[PROOFSTEP]\napply (Ne.isUnit _).unit_spec\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI J : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' J' : Ideal R\nhI : ↑I = ↑I'\nhJ : ↑J = ↑J'\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * I' = Ideal.span {y} * J'\n⊢ mk' (FractionRing R) x { val := y, property := (_ : y ∈ R⁰) } ≠ 0\n[PROOFSTEP]\nrwa [Ne, mk'_eq_zero_iff_eq_zero]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' : Ideal R\nhI : ↑I = ↑I'\n⊢ ↑mk I = 1 ↔ ∃ x, x ≠ 0 ∧ I' = Ideal.span {x}\n[PROOFSTEP]\nrw [← map_one (ClassGroup.mk (R := R) (K := FractionRing R)),\n  ClassGroup.mk_eq_mk_of_coe_ideal hI (?_ : _ = ↑(⊤ : Ideal R))]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' : Ideal R\nhI : ↑I = ↑I'\n⊢ (∃ x y, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * ⊤) ↔ ∃ x, x ≠ 0 ∧ I' = Ideal.span {x}\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' : Ideal R\nhI : ↑I = ↑I'\n⊢ ↑1 = ↑⊤\n[PROOFSTEP]\nany_goals rfl\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' : Ideal R\nhI : ↑I = ↑I'\n⊢ (∃ x y, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * ⊤) ↔ ∃ x, x ≠ 0 ∧ I' = Ideal.span {x}\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' : Ideal R\nhI : ↑I = ↑I'\n⊢ ↑1 = ↑⊤\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' : Ideal R\nhI : ↑I = ↑I'\n⊢ (∃ x y, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * ⊤) ↔ ∃ x, x ≠ 0 ∧ I' = Ideal.span {x}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' : Ideal R\nhI : ↑I = ↑I'\n⊢ (∃ x y, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * ⊤) → ∃ x, x ≠ 0 ∧ I' = Ideal.span {x}\n[PROOFSTEP]\nrintro ⟨x, y, hx, hy, h⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' : Ideal R\nhI : ↑I = ↑I'\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * I' = Ideal.span {y} * ⊤\n⊢ ∃ x, x ≠ 0 ∧ I' = Ideal.span {x}\n[PROOFSTEP]\nrw [Ideal.mul_top] at h \n[GOAL]\ncase mp.intro.intro.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' : Ideal R\nhI : ↑I = ↑I'\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * I' = Ideal.span {y}\n⊢ ∃ x, x ≠ 0 ∧ I' = Ideal.span {x}\n[PROOFSTEP]\nrcases Ideal.mem_span_singleton_mul.mp ((Ideal.span_singleton_le_iff_mem _).mp h.ge) with ⟨i, _hi, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' : Ideal R\nhI : ↑I = ↑I'\nx : R\nhx : x ≠ 0\ni : R\n_hi : i ∈ I'\nhy : x * i ≠ 0\nh : Ideal.span {x} * I' = Ideal.span {x * i}\n⊢ ∃ x, x ≠ 0 ∧ I' = Ideal.span {x}\n[PROOFSTEP]\nrw [← Ideal.span_singleton_mul_span_singleton, Ideal.span_singleton_mul_right_inj hx] at h \n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' : Ideal R\nhI : ↑I = ↑I'\nx : R\nhx : x ≠ 0\ni : R\n_hi : i ∈ I'\nhy : x * i ≠ 0\nh : I' = Ideal.span {i}\n⊢ ∃ x, x ≠ 0 ∧ I' = Ideal.span {x}\n[PROOFSTEP]\nexact ⟨i, right_ne_zero_of_mul hy, h⟩\n[GOAL]\ncase mpr\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nI' : Ideal R\nhI : ↑I = ↑I'\n⊢ (∃ x, x ≠ 0 ∧ I' = Ideal.span {x}) → ∃ x y, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' = Ideal.span {y} * ⊤\n[PROOFSTEP]\nrintro ⟨x, hx, rfl⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nx : R\nhx : x ≠ 0\nhI : ↑I = ↑(Ideal.span {x})\n⊢ ∃ x_1 y, x_1 ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x_1} * Ideal.span {x} = Ideal.span {y} * ⊤\n[PROOFSTEP]\nexact ⟨1, x, one_ne_zero, hx, by rw [Ideal.span_singleton_one, Ideal.top_mul, Ideal.mul_top]⟩\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nx : R\nhx : x ≠ 0\nhI : ↑I = ↑(Ideal.span {x})\n⊢ Ideal.span {1} * Ideal.span {x} = Ideal.span {x} * ⊤\n[PROOFSTEP]\nrw [Ideal.span_singleton_one, Ideal.top_mul, Ideal.mul_top]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nP : ClassGroup R → Prop\nh : ∀ (I : (FractionalIdeal R⁰ K)ˣ), P (↑mk I)\nx : ClassGroup R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\n⊢ P ↑I\n[PROOFSTEP]\nhave :\n  I =\n    (Units.mapEquiv (canonicalEquiv R⁰ K (FractionRing R)).toMulEquiv)\n      (Units.mapEquiv (canonicalEquiv R⁰ (FractionRing R) K).toMulEquiv I) :=\n  by simp [← Units.eq_iff]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nP : ClassGroup R → Prop\nh : ∀ (I : (FractionalIdeal R⁰ K)ˣ), P (↑mk I)\nx : ClassGroup R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\n⊢ I =\n    ↑(Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ K (FractionRing R))))\n      (↑(Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K))) I)\n[PROOFSTEP]\nsimp [← Units.eq_iff]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nP : ClassGroup R → Prop\nh : ∀ (I : (FractionalIdeal R⁰ K)ˣ), P (↑mk I)\nx : ClassGroup R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nthis :\n  I =\n    ↑(Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ K (FractionRing R))))\n      (↑(Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K))) I)\n⊢ P ↑I\n[PROOFSTEP]\nrw [congr_arg (QuotientGroup.mk (s := (toPrincipalIdeal R (FractionRing R)).range)) this]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nP : ClassGroup R → Prop\nh : ∀ (I : (FractionalIdeal R⁰ K)ˣ), P (↑mk I)\nx : ClassGroup R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nthis :\n  I =\n    ↑(Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ K (FractionRing R))))\n      (↑(Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K))) I)\n⊢ P\n    ↑(↑(Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ K (FractionRing R))))\n        (↑(Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K))) I))\n[PROOFSTEP]\nexact h _\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\n⊢ ClassGroup R ≃* (FractionalIdeal R⁰ K)ˣ ⧸ MonoidHom.range (toPrincipalIdeal R K)\n[PROOFSTEP]\nhaveI :\n  Subgroup.map (Units.mapEquiv (canonicalEquiv R⁰ (FractionRing R) K).toMulEquiv).toMonoidHom\n      (toPrincipalIdeal R (FractionRing R)).range =\n    (toPrincipalIdeal R K).range :=\n  by\n  ext I\n  simp only [Subgroup.mem_map, mem_principal_ideals_iff]\n  constructor\n  · rintro ⟨I, ⟨x, hx⟩, rfl⟩\n    refine ⟨FractionRing.algEquiv R K x, ?_⟩\n    simp only [RingEquiv.toMulEquiv_eq_coe, MulEquiv.coe_toMonoidHom, coe_mapEquiv, ← hx, RingEquiv.coe_toMulEquiv,\n      canonicalEquiv_spanSingleton]\n    rfl\n  · rintro ⟨x, hx⟩\n    refine\n      ⟨Units.mapEquiv (canonicalEquiv R⁰ K (FractionRing R)).toMulEquiv I, ⟨(FractionRing.algEquiv R K).symm x, ?_⟩,\n        Units.ext ?_⟩\n    · simp only [RingEquiv.toMulEquiv_eq_coe, coe_mapEquiv, ← hx, RingEquiv.coe_toMulEquiv,\n        canonicalEquiv_spanSingleton]\n      rfl\n    ·\n      simp only [RingEquiv.toMulEquiv_eq_coe, MulEquiv.coe_toMonoidHom, coe_mapEquiv, RingEquiv.coe_toMulEquiv,\n        canonicalEquiv_canonicalEquiv, canonicalEquiv_self, RingEquiv.refl_apply]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\n⊢ Subgroup.map (MulEquiv.toMonoidHom (Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K))))\n      (MonoidHom.range (toPrincipalIdeal R (FractionRing R))) =\n    MonoidHom.range (toPrincipalIdeal R K)\n[PROOFSTEP]\next I\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ I ∈\n      Subgroup.map (MulEquiv.toMonoidHom (Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K))))\n        (MonoidHom.range (toPrincipalIdeal R (FractionRing R))) ↔\n    I ∈ MonoidHom.range (toPrincipalIdeal R K)\n[PROOFSTEP]\nsimp only [Subgroup.mem_map, mem_principal_ideals_iff]\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ (∃ x,\n      (∃ x_1, spanSingleton R⁰ x_1 = ↑x) ∧\n        ↑(MulEquiv.toMonoidHom (Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K)))) x = I) ↔\n    ∃ x, spanSingleton R⁰ x = ↑I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ (∃ x,\n      (∃ x_1, spanSingleton R⁰ x_1 = ↑x) ∧\n        ↑(MulEquiv.toMonoidHom (Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K)))) x = I) →\n    ∃ x, spanSingleton R⁰ x = ↑I\n[PROOFSTEP]\nrintro ⟨I, ⟨x, hx⟩, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nx : FractionRing R\nhx : spanSingleton R⁰ x = ↑I\n⊢ ∃ x,\n    spanSingleton R⁰ x =\n      ↑(↑(MulEquiv.toMonoidHom (Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K)))) I)\n[PROOFSTEP]\nrefine ⟨FractionRing.algEquiv R K x, ?_⟩\n[GOAL]\ncase h.mp.intro.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nx : FractionRing R\nhx : spanSingleton R⁰ x = ↑I\n⊢ spanSingleton R⁰ (↑(FractionRing.algEquiv R K) x) =\n    ↑(↑(MulEquiv.toMonoidHom (Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K)))) I)\n[PROOFSTEP]\nsimp only [RingEquiv.toMulEquiv_eq_coe, MulEquiv.coe_toMonoidHom, coe_mapEquiv, ← hx, RingEquiv.coe_toMulEquiv,\n  canonicalEquiv_spanSingleton]\n[GOAL]\ncase h.mp.intro.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\nx : FractionRing R\nhx : spanSingleton R⁰ x = ↑I\n⊢ spanSingleton R⁰ (↑(FractionRing.algEquiv R K) x) =\n    spanSingleton R⁰ (↑(IsLocalization.map K (RingHom.id R) (_ : ∀ (y : R), y ∈ R⁰ → ↑(RingHom.id R) y ∈ R⁰)) x)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.mpr\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ (∃ x, spanSingleton R⁰ x = ↑I) →\n    ∃ x,\n      (∃ x_1, spanSingleton R⁰ x_1 = ↑x) ∧\n        ↑(MulEquiv.toMonoidHom (Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K)))) x = I\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase h.mpr.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nx : K\nhx : spanSingleton R⁰ x = ↑I\n⊢ ∃ x,\n    (∃ x_1, spanSingleton R⁰ x_1 = ↑x) ∧\n      ↑(MulEquiv.toMonoidHom (Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K)))) x = I\n[PROOFSTEP]\nrefine\n  ⟨Units.mapEquiv (canonicalEquiv R⁰ K (FractionRing R)).toMulEquiv I, ⟨(FractionRing.algEquiv R K).symm x, ?_⟩,\n    Units.ext ?_⟩\n[GOAL]\ncase h.mpr.intro.refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nx : K\nhx : spanSingleton R⁰ x = ↑I\n⊢ spanSingleton R⁰ (↑(AlgEquiv.symm (FractionRing.algEquiv R K)) x) =\n    ↑(↑(Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ K (FractionRing R)))) I)\n[PROOFSTEP]\nsimp only [RingEquiv.toMulEquiv_eq_coe, coe_mapEquiv, ← hx, RingEquiv.coe_toMulEquiv, canonicalEquiv_spanSingleton]\n[GOAL]\ncase h.mpr.intro.refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nx : K\nhx : spanSingleton R⁰ x = ↑I\n⊢ spanSingleton R⁰ (↑(AlgEquiv.symm (FractionRing.algEquiv R K)) x) =\n    spanSingleton R⁰\n      (↑(IsLocalization.map (FractionRing R) (RingHom.id R) (_ : ∀ (y : R), y ∈ R⁰ → ↑(RingHom.id R) y ∈ R⁰)) x)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.mpr.intro.refine_2\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nx : K\nhx : spanSingleton R⁰ x = ↑I\n⊢ ↑(↑(MulEquiv.toMonoidHom (Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K))))\n        (↑(Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ K (FractionRing R)))) I)) =\n    ↑I\n[PROOFSTEP]\nsimp only [RingEquiv.toMulEquiv_eq_coe, MulEquiv.coe_toMonoidHom, coe_mapEquiv, RingEquiv.coe_toMulEquiv,\n  canonicalEquiv_canonicalEquiv, canonicalEquiv_self, RingEquiv.refl_apply]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nthis :\n  Subgroup.map (MulEquiv.toMonoidHom (Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K))))\n      (MonoidHom.range (toPrincipalIdeal R (FractionRing R))) =\n    MonoidHom.range (toPrincipalIdeal R K)\n⊢ ClassGroup R ≃* (FractionalIdeal R⁰ K)ˣ ⧸ MonoidHom.range (toPrincipalIdeal R K)\n[PROOFSTEP]\nexact\n  @QuotientGroup.congr (FractionalIdeal R⁰ (FractionRing R))ˣ _ (FractionalIdeal R⁰ K)ˣ _\n    (toPrincipalIdeal R (FractionRing R)).range (toPrincipalIdeal R K).range _ _\n    (Units.mapEquiv (FractionalIdeal.canonicalEquiv R⁰ (FractionRing R) K).toMulEquiv) this\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹³ : CommRing R\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : DecidableEq L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\nK' : Type u_4\ninst✝² : Field K'\ninst✝¹ : Algebra R K'\ninst✝ : IsFractionRing R K'\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ ↑(equiv K') (↑mk I) =\n    ↑(QuotientGroup.mk' (MonoidHom.range (toPrincipalIdeal R K'))) (↑(Units.mapEquiv ↑(canonicalEquiv R⁰ K K')) I)\n[PROOFSTEP]\nrw [ClassGroup.equiv, ClassGroup.mk, MonoidHom.comp_apply, QuotientGroup.congr_mk']\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹³ : CommRing R\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : DecidableEq L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\nK' : Type u_4\ninst✝² : Field K'\ninst✝¹ : Algebra R K'\ninst✝ : IsFractionRing R K'\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ ↑(QuotientGroup.mk' (MonoidHom.range (toPrincipalIdeal R K')))\n      (↑(Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K')))\n        (↑(Units.map ↑(canonicalEquiv R⁰ K (FractionRing R))) I)) =\n    ↑(QuotientGroup.mk' (MonoidHom.range (toPrincipalIdeal R K'))) (↑(Units.mapEquiv ↑(canonicalEquiv R⁰ K K')) I)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_6.h\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹³ : CommRing R\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : DecidableEq L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\nK' : Type u_4\ninst✝² : Field K'\ninst✝¹ : Algebra R K'\ninst✝ : IsFractionRing R K'\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ ↑(Units.mapEquiv (RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K')))\n      (↑(Units.map ↑(canonicalEquiv R⁰ K (FractionRing R))) I) =\n    ↑(Units.mapEquiv ↑(canonicalEquiv R⁰ K K')) I\n[PROOFSTEP]\nrw [← Units.eq_iff, Units.coe_mapEquiv, Units.coe_mapEquiv, Units.coe_map]\n[GOAL]\ncase h.e_6.h\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹³ : CommRing R\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : DecidableEq L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\nK' : Type u_4\ninst✝² : Field K'\ninst✝¹ : Algebra R K'\ninst✝ : IsFractionRing R K'\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ ↑(RingEquiv.toMulEquiv (canonicalEquiv R⁰ (FractionRing R) K')) (↑↑(canonicalEquiv R⁰ K (FractionRing R)) ↑I) =\n    ↑↑(canonicalEquiv R⁰ K K') ↑I\n[PROOFSTEP]\nexact FractionalIdeal.canonicalEquiv_canonicalEquiv _ _ _ _ _\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹³ : CommRing R\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : DecidableEq L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\nK' : Type u_4\ninst✝² : Field K'\ninst✝¹ : Algebra R K'\ninst✝ : IsFractionRing R K'\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ ↑mk (↑(Units.map ↑(canonicalEquiv R⁰ K K')) I) = ↑mk I\n[PROOFSTEP]\nrw [ClassGroup.mk, MonoidHom.comp_apply, ← MonoidHom.comp_apply (Units.map _), ← Units.map_comp, ←\n  RingEquiv.coe_monoidHom_trans, FractionalIdeal.canonicalEquiv_trans_canonicalEquiv]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹³ : CommRing R\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : DecidableEq L\ninst✝⁹ : Algebra R K\ninst✝⁸ : IsFractionRing R K\ninst✝⁷ : Algebra K L\ninst✝⁶ : FiniteDimensional K L\ninst✝⁵ : Algebra R L\ninst✝⁴ : IsScalarTower R K L\ninst✝³ : IsDomain R\nK' : Type u_4\ninst✝² : Field K'\ninst✝¹ : Algebra R K'\ninst✝ : IsFractionRing R K'\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ ↑(QuotientGroup.mk' (MonoidHom.range (toPrincipalIdeal R (FractionRing R))))\n      (↑(Units.map ↑(canonicalEquiv R⁰ K (FractionRing R))) I) =\n    ↑mk I\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\n⊢ (fun I => Units.mk0 ↑↑I (_ : ↑↑I ≠ 0)) 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nx y : { x // x ∈ (Ideal R)⁰ }\n⊢ OneHom.toFun { toFun := fun I => Units.mk0 ↑↑I (_ : ↑↑I ≠ 0), map_one' := (_ : Units.mk0 ↑↑1 (_ : ↑↑1 ≠ 0) = 1) }\n      (x * y) =\n    OneHom.toFun { toFun := fun I => Units.mk0 ↑↑I (_ : ↑↑I ≠ 0), map_one' := (_ : Units.mk0 ↑↑1 (_ : ↑↑1 ≠ 0) = 1) }\n        x *\n      OneHom.toFun { toFun := fun I => Units.mk0 ↑↑I (_ : ↑↑I ≠ 0), map_one' := (_ : Units.mk0 ↑↑1 (_ : ↑↑1 ≠ 0) = 1) }\n        y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : DecidableEq L\ninst✝¹⁰ : Algebra R K\ninst✝⁹ : IsFractionRing R K\ninst✝⁸ : Algebra K L\ninst✝⁷ : FiniteDimensional K L\ninst✝⁶ : Algebra R L\ninst✝⁵ : IsScalarTower R K L\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\nK' : Type u_4\ninst✝² : Field K'\ninst✝¹ : Algebra R K'\ninst✝ : IsFractionRing R K'\nI : { x // x ∈ (Ideal R)⁰ }\n⊢ ↑(canonicalEquiv R⁰ K K') ↑(↑(mk0 K) I) = ↑(↑(mk0 K') I)\n[PROOFSTEP]\nsimp only [FractionalIdeal.coe_mk0, FractionalIdeal.canonicalEquiv_coeIdeal]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : { x // x ∈ (Ideal R)⁰ }\n⊢ ↑mk (↑(FractionalIdeal.mk0 K) I) = ↑mk0 I\n[PROOFSTEP]\nrw [ClassGroup.mk0, MonoidHom.comp_apply, ← ClassGroup.mk_canonicalEquiv K (FractionRing R),\n  FractionalIdeal.map_canonicalEquiv_mk0]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : { x // x ∈ (Ideal R)⁰ }\n⊢ ↑(equiv K) (↑mk0 I) = ↑(QuotientGroup.mk' (MonoidHom.range (toPrincipalIdeal R K))) (↑(FractionalIdeal.mk0 K) I)\n[PROOFSTEP]\nrw [ClassGroup.mk0, MonoidHom.comp_apply, ClassGroup.equiv_mk]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : { x // x ∈ (Ideal R)⁰ }\n⊢ ↑(QuotientGroup.mk' (MonoidHom.range (toPrincipalIdeal R K)))\n      (↑(Units.mapEquiv ↑(canonicalEquiv R⁰ (FractionRing R) K)) (↑(FractionalIdeal.mk0 (FractionRing R)) I)) =\n    ↑(QuotientGroup.mk' (MonoidHom.range (toPrincipalIdeal R K))) (↑(FractionalIdeal.mk0 K) I)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e_6.h\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : { x // x ∈ (Ideal R)⁰ }\n⊢ ↑(Units.mapEquiv ↑(canonicalEquiv R⁰ (FractionRing R) K)) (↑(FractionalIdeal.mk0 (FractionRing R)) I) =\n    ↑(FractionalIdeal.mk0 K) I\n[PROOFSTEP]\nsimp [← Units.eq_iff]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\n⊢ ↑mk0 I = ↑mk0 J ↔ ∃ x x_1, spanSingleton R⁰ x * ↑↑I = ↑↑J\n[PROOFSTEP]\nrefine (ClassGroup.equiv K).injective.eq_iff.symm.trans ?_\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\n⊢ ↑(equiv K) (↑mk0 I) = ↑(equiv K) (↑mk0 J) ↔ ∃ x x_1, spanSingleton R⁰ x * ↑↑I = ↑↑J\n[PROOFSTEP]\nsimp only [ClassGroup.equiv_mk0, QuotientGroup.mk'_eq_mk', mem_principal_ideals_iff, Units.ext_iff, Units.val_mul,\n  FractionalIdeal.coe_mk0, exists_prop]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\n⊢ (∃ z, (∃ x, spanSingleton R⁰ x = ↑z) ∧ ↑↑I * ↑z = ↑↑J) ↔ ∃ x, x ≠ 0 ∧ spanSingleton R⁰ x * ↑↑I = ↑↑J\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\n⊢ (∃ z, (∃ x, spanSingleton R⁰ x = ↑z) ∧ ↑↑I * ↑z = ↑↑J) → ∃ x, x ≠ 0 ∧ spanSingleton R⁰ x * ↑↑I = ↑↑J\n[PROOFSTEP]\nrintro ⟨X, ⟨x, hX⟩, hx⟩\n[GOAL]\ncase mp.intro.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nX : (FractionalIdeal R⁰ K)ˣ\nhx : ↑↑I * ↑X = ↑↑J\nx : K\nhX : spanSingleton R⁰ x = ↑X\n⊢ ∃ x, x ≠ 0 ∧ spanSingleton R⁰ x * ↑↑I = ↑↑J\n[PROOFSTEP]\nrefine ⟨x, ?_, ?_⟩\n[GOAL]\ncase mp.intro.intro.intro.refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nX : (FractionalIdeal R⁰ K)ˣ\nhx : ↑↑I * ↑X = ↑↑J\nx : K\nhX : spanSingleton R⁰ x = ↑X\n⊢ x ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp.intro.intro.intro.refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nX : (FractionalIdeal R⁰ K)ˣ\nhx : ↑↑I * ↑X = ↑↑J\nhX : spanSingleton R⁰ 0 = ↑X\n⊢ False\n[PROOFSTEP]\nsimp [X.ne_zero.symm] at hX \n[GOAL]\ncase mp.intro.intro.intro.refine_2\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nX : (FractionalIdeal R⁰ K)ˣ\nhx : ↑↑I * ↑X = ↑↑J\nx : K\nhX : spanSingleton R⁰ x = ↑X\n⊢ spanSingleton R⁰ x * ↑↑I = ↑↑J\n[PROOFSTEP]\nsimpa only [hX, mul_comm] using hx\n[GOAL]\ncase mpr\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\n⊢ (∃ x, x ≠ 0 ∧ spanSingleton R⁰ x * ↑↑I = ↑↑J) → ∃ z, (∃ x, spanSingleton R⁰ x = ↑z) ∧ ↑↑I * ↑z = ↑↑J\n[PROOFSTEP]\nrintro ⟨x, hx, eq_J⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nx : K\nhx : x ≠ 0\neq_J : spanSingleton R⁰ x * ↑↑I = ↑↑J\n⊢ ∃ z, (∃ x, spanSingleton R⁰ x = ↑z) ∧ ↑↑I * ↑z = ↑↑J\n[PROOFSTEP]\nrefine ⟨Units.mk0 _ (spanSingleton_ne_zero_iff.mpr hx), ⟨x, rfl⟩, ?_⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nx : K\nhx : x ≠ 0\neq_J : spanSingleton R⁰ x * ↑↑I = ↑↑J\n⊢ ↑↑I * ↑(Units.mk0 (spanSingleton R⁰ x) (_ : spanSingleton R⁰ x ≠ 0)) = ↑↑J\n[PROOFSTEP]\nsimpa only [mul_comm] using eq_J\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\n⊢ ↑mk0 I = ↑mk0 J ↔ ∃ x y _hx _hy, Ideal.span {x} * ↑I = Ideal.span {y} * ↑J\n[PROOFSTEP]\nrefine (ClassGroup.mk0_eq_mk0_iff_exists_fraction_ring (FractionRing R)).trans ⟨?_, ?_⟩\n[GOAL]\ncase refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\n⊢ (∃ x x_1, spanSingleton R⁰ x * ↑↑I = ↑↑J) → ∃ x y _hx _hy, Ideal.span {x} * ↑I = Ideal.span {y} * ↑J\n[PROOFSTEP]\nrintro ⟨z, hz, h⟩\n[GOAL]\ncase refine_1.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nz : FractionRing R\nhz : z ≠ 0\nh : spanSingleton R⁰ z * ↑↑I = ↑↑J\n⊢ ∃ x y _hx _hy, Ideal.span {x} * ↑I = Ideal.span {y} * ↑J\n[PROOFSTEP]\nobtain ⟨x, ⟨y, hy⟩, rfl⟩ := IsLocalization.mk'_surjective R⁰ z\n[GOAL]\ncase refine_1.intro.intro.intro.intro.mk\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nx y : R\nhy : y ∈ R⁰\nhz : mk' (FractionRing R) x { val := y, property := hy } ≠ 0\nh : spanSingleton R⁰ (mk' (FractionRing R) x { val := y, property := hy }) * ↑↑I = ↑↑J\n⊢ ∃ x y _hx _hy, Ideal.span {x} * ↑I = Ideal.span {y} * ↑J\n[PROOFSTEP]\nrefine ⟨x, y, ?_, mem_nonZeroDivisors_iff_ne_zero.mp hy, ?_⟩\n[GOAL]\ncase refine_1.intro.intro.intro.intro.mk.refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nx y : R\nhy : y ∈ R⁰\nhz : mk' (FractionRing R) x { val := y, property := hy } ≠ 0\nh : spanSingleton R⁰ (mk' (FractionRing R) x { val := y, property := hy }) * ↑↑I = ↑↑J\n⊢ x ≠ 0\n[PROOFSTEP]\nrintro hx\n[GOAL]\ncase refine_1.intro.intro.intro.intro.mk.refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nx y : R\nhy : y ∈ R⁰\nhz : mk' (FractionRing R) x { val := y, property := hy } ≠ 0\nh : spanSingleton R⁰ (mk' (FractionRing R) x { val := y, property := hy }) * ↑↑I = ↑↑J\nhx : x = 0\n⊢ False\n[PROOFSTEP]\napply hz\n[GOAL]\ncase refine_1.intro.intro.intro.intro.mk.refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nx y : R\nhy : y ∈ R⁰\nhz : mk' (FractionRing R) x { val := y, property := hy } ≠ 0\nh : spanSingleton R⁰ (mk' (FractionRing R) x { val := y, property := hy }) * ↑↑I = ↑↑J\nhx : x = 0\n⊢ mk' (FractionRing R) x { val := y, property := hy } = 0\n[PROOFSTEP]\nrw [hx, IsFractionRing.mk'_eq_div, _root_.map_zero, zero_div]\n[GOAL]\ncase refine_1.intro.intro.intro.intro.mk.refine_2\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nx y : R\nhy : y ∈ R⁰\nhz : mk' (FractionRing R) x { val := y, property := hy } ≠ 0\nh : spanSingleton R⁰ (mk' (FractionRing R) x { val := y, property := hy }) * ↑↑I = ↑↑J\n⊢ Ideal.span {x} * ↑I = Ideal.span {y} * ↑J\n[PROOFSTEP]\nexact (FractionalIdeal.mk'_mul_coeIdeal_eq_coeIdeal _ hy).mp h\n[GOAL]\ncase refine_2\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\n⊢ (∃ x y _hx _hy, Ideal.span {x} * ↑I = Ideal.span {y} * ↑J) → ∃ x x_1, spanSingleton R⁰ x * ↑↑I = ↑↑J\n[PROOFSTEP]\nrintro ⟨x, y, hx, hy, h⟩\n[GOAL]\ncase refine_2.intro.intro.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * ↑I = Ideal.span {y} * ↑J\n⊢ ∃ x x_1, spanSingleton R⁰ x * ↑↑I = ↑↑J\n[PROOFSTEP]\nhave hy' : y ∈ R⁰ := mem_nonZeroDivisors_iff_ne_zero.mpr hy\n[GOAL]\ncase refine_2.intro.intro.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * ↑I = Ideal.span {y} * ↑J\nhy' : y ∈ R⁰\n⊢ ∃ x x_1, spanSingleton R⁰ x * ↑↑I = ↑↑J\n[PROOFSTEP]\nrefine ⟨IsLocalization.mk' _ x ⟨y, hy'⟩, ?_, ?_⟩\n[GOAL]\ncase refine_2.intro.intro.intro.intro.refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * ↑I = Ideal.span {y} * ↑J\nhy' : y ∈ R⁰\n⊢ mk' (FractionRing R) x { val := y, property := hy' } ≠ 0\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase refine_2.intro.intro.intro.intro.refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nx y : R\nhy : y ≠ 0\nh : Ideal.span {x} * ↑I = Ideal.span {y} * ↑J\nhy' : y ∈ R⁰\nhx : mk' (FractionRing R) x { val := y, property := hy' } = 0\n⊢ x = 0\n[PROOFSTEP]\nrwa [mk'_eq_iff_eq_mul, zero_mul, ← (algebraMap R (FractionRing R)).map_zero,\n  (IsFractionRing.injective R (FractionRing R)).eq_iff] at hx \n[GOAL]\ncase refine_2.intro.intro.intro.intro.refine_2\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J : { x // x ∈ (Ideal R)⁰ }\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\nh : Ideal.span {x} * ↑I = Ideal.span {y} * ↑J\nhy' : y ∈ R⁰\n⊢ spanSingleton R⁰ (mk' (FractionRing R) x { val := y, property := hy' }) * ↑↑I = ↑↑J\n[PROOFSTEP]\nexact (FractionalIdeal.mk'_mul_coeIdeal_eq_coeIdeal _ hy').mpr h\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\n⊢ ∀ {a_1 b : R},\n    a_1 ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n      b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n        a_1 + b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I}\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, RingHom.map_add, mul_add]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\n⊢ ∀ {a b : R},\n    (↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑I)))⁻¹ * ↑(algebraMap R (FractionRing R)) a ∈\n        ↑I →\n      (↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑I)))⁻¹ *\n            ↑(algebraMap R (FractionRing R)) b ∈\n          ↑I →\n        (↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑I)))⁻¹ *\n              ↑(algebraMap R (FractionRing R)) a +\n            (↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑I)))⁻¹ *\n              ↑(algebraMap R (FractionRing R)) b ∈\n          ↑I\n[PROOFSTEP]\nexact fun ha hb => Submodule.add_mem _ ha hb\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\n⊢ 0 ∈\n    { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n        add_mem' :=\n          (_ :\n            ∀ {a_1 b : R},\n              a_1 ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                  a_1 + b ∈\n                    {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I}) }.carrier\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, RingHom.map_zero, mul_zero]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\n⊢ 0 ∈ ↑I\n[PROOFSTEP]\nexact Submodule.zero_mem _\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\n⊢ ∀ (c : R) {x : R},\n    x ∈\n        {\n              toAddSubsemigroup :=\n                { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n                  add_mem' :=\n                    (_ :\n                      ∀ {a_1 b : R},\n                        a_1 ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                          b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                            a_1 + b ∈\n                              {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I}) },\n              zero_mem' :=\n                (_ :\n                  0 ∈\n                    { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n                        add_mem' :=\n                          (_ :\n                            ∀ {a_1 b : R},\n                              a_1 ∈\n                                  {x |\n                                    (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                                b ∈\n                                    {x |\n                                      (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈\n                                        ↑I} →\n                                  a_1 + b ∈\n                                    {x |\n                                      (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈\n                                        ↑I}) }.carrier) }.toAddSubsemigroup.carrier →\n      c • x ∈\n        {\n              toAddSubsemigroup :=\n                { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n                  add_mem' :=\n                    (_ :\n                      ∀ {a_2 b : R},\n                        a_2 ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                          b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                            a_2 + b ∈\n                              {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I}) },\n              zero_mem' :=\n                (_ :\n                  0 ∈\n                    { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n                        add_mem' :=\n                          (_ :\n                            ∀ {a_2 b : R},\n                              a_2 ∈\n                                  {x |\n                                    (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                                b ∈\n                                    {x |\n                                      (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈\n                                        ↑I} →\n                                  a_2 + b ∈\n                                    {x |\n                                      (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈\n                                        ↑I}) }.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nintro c _ hb\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\nc x✝ : R\nhb :\n  x✝ ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n              add_mem' :=\n                (_ :\n                  ∀ {a_1 b : R},\n                    a_1 ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                      b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                        a_1 + b ∈\n                          {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I}) },\n          zero_mem' :=\n            (_ :\n              0 ∈\n                { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n                    add_mem' :=\n                      (_ :\n                        ∀ {a_1 b : R},\n                          a_1 ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                            b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                              a_1 + b ∈\n                                {x |\n                                  (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈\n                                    ↑I}) }.carrier) }.toAddSubsemigroup.carrier\n⊢ c • x✝ ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n              add_mem' :=\n                (_ :\n                  ∀ {a_1 b : R},\n                    a_1 ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                      b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                        a_1 + b ∈\n                          {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I}) },\n          zero_mem' :=\n            (_ :\n              0 ∈\n                { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n                    add_mem' :=\n                      (_ :\n                        ∀ {a_1 b : R},\n                          a_1 ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                            b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                              a_1 + b ∈\n                                {x |\n                                  (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈\n                                    ↑I}) }.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nsimp only [smul_eq_mul, Set.mem_setOf_eq, RingHom.map_mul, mul_left_comm ((algebraMap R (FractionRing R)) a)⁻¹]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\nc x✝ : R\nhb :\n  x✝ ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n              add_mem' :=\n                (_ :\n                  ∀ {a_1 b : R},\n                    a_1 ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                      b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                        a_1 + b ∈\n                          {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I}) },\n          zero_mem' :=\n            (_ :\n              0 ∈\n                { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n                    add_mem' :=\n                      (_ :\n                        ∀ {a_1 b : R},\n                          a_1 ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                            b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                              a_1 + b ∈\n                                {x |\n                                  (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈\n                                    ↑I}) }.carrier) }.toAddSubsemigroup.carrier\n⊢ ↑(algebraMap R (FractionRing R)) c *\n      ((↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑I)))⁻¹ *\n        ↑(algebraMap R (FractionRing R)) x✝) ∈\n    ↑I\n[PROOFSTEP]\nrw [← Algebra.smul_def c]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\nc x✝ : R\nhb :\n  x✝ ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n              add_mem' :=\n                (_ :\n                  ∀ {a_1 b : R},\n                    a_1 ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                      b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                        a_1 + b ∈\n                          {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I}) },\n          zero_mem' :=\n            (_ :\n              0 ∈\n                { carrier := {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I},\n                    add_mem' :=\n                      (_ :\n                        ∀ {a_1 b : R},\n                          a_1 ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                            b ∈ {x | (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈ ↑I} →\n                              a_1 + b ∈\n                                {x |\n                                  (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) x ∈\n                                    ↑I}) }.carrier) }.toAddSubsemigroup.carrier\n⊢ c •\n      ((↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑I)))⁻¹ *\n        ↑(algebraMap R (FractionRing R)) x✝) ∈\n    ↑I\n[PROOFSTEP]\nexact Submodule.smul_mem _ c hb\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\nhI : I ≠ 0\n⊢ integralRep I ∈ (Ideal R)⁰\n[PROOFSTEP]\nlet a := I.2.choose\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\nhI : I ≠ 0\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\n⊢ integralRep I ∈ (Ideal R)⁰\n[PROOFSTEP]\nhave a_ne_zero' := I.2.choose_spec.1\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\nhI : I ≠ 0\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑I) ∈ R⁰\n⊢ integralRep I ∈ (Ideal R)⁰\n[PROOFSTEP]\nhave a_ne_zero := mem_nonZeroDivisors_iff_ne_zero.mp a_ne_zero'\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\nhI : I ≠ 0\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑I) ∈ R⁰\na_ne_zero : Exists.choose (_ : IsFractional R⁰ ↑I) ≠ 0\n⊢ integralRep I ∈ (Ideal R)⁰\n[PROOFSTEP]\nhave fa_ne_zero : (algebraMap R (FractionRing R)) a ≠ 0 :=\n  IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors a_ne_zero'\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\nhI : I ≠ 0\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑I) ∈ R⁰\na_ne_zero : Exists.choose (_ : IsFractional R⁰ ↑I) ≠ 0\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ integralRep I ∈ (Ideal R)⁰\n[PROOFSTEP]\nrw [mem_nonZeroDivisors_iff_ne_zero, Submodule.zero_eq_bot, Submodule.ne_bot_iff]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\nhI : I ≠ 0\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑I) ∈ R⁰\na_ne_zero : Exists.choose (_ : IsFractional R⁰ ↑I) ≠ 0\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ ∃ x, x ∈ integralRep I ∧ x ≠ 0\n[PROOFSTEP]\nobtain ⟨x, x_ne, x_mem⟩ := exists_ne_zero_mem_isInteger hI\n[GOAL]\ncase intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\nhI : I ≠ 0\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑I) ∈ R⁰\na_ne_zero : Exists.choose (_ : IsFractional R⁰ ↑I) ≠ 0\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\nx : R\nx_ne : x ≠ 0\nx_mem : ↑(algebraMap R (FractionRing R)) x ∈ I\n⊢ ∃ x, x ∈ integralRep I ∧ x ≠ 0\n[PROOFSTEP]\nrefine ⟨a * x, ?_, mul_ne_zero a_ne_zero x_ne⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\nhI : I ≠ 0\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑I) ∈ R⁰\na_ne_zero : Exists.choose (_ : IsFractional R⁰ ↑I) ≠ 0\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\nx : R\nx_ne : x ≠ 0\nx_mem : ↑(algebraMap R (FractionRing R)) x ∈ I\n⊢ a * x ∈ integralRep I\n[PROOFSTEP]\nchange ((algebraMap R _) a)⁻¹ * (algebraMap R _) (a * x) ∈ I\n[GOAL]\ncase intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : FractionalIdeal R⁰ (FractionRing R)\nhI : I ≠ 0\na : R := Exists.choose (_ : IsFractional R⁰ ↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑I) ∈ R⁰\na_ne_zero : Exists.choose (_ : IsFractional R⁰ ↑I) ≠ 0\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\nx : R\nx_ne : x ≠ 0\nx_mem : ↑(algebraMap R (FractionRing R)) x ∈ I\n⊢ (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) (a * x) ∈ I\n[PROOFSTEP]\nrwa [RingHom.map_mul, ← mul_assoc, inv_mul_cancel fa_ne_zero, one_mul]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\n⊢ ↑mk0 { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) } = ↑mk I\n[PROOFSTEP]\nlet a := I.1.2.choose\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\n⊢ ↑mk0 { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) } = ↑mk I\n[PROOFSTEP]\nhave a_ne_zero' := I.1.2.choose_spec.1\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\n⊢ ↑mk0 { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) } = ↑mk I\n[PROOFSTEP]\nhave ha := I.1.2.choose_spec.2\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\n⊢ ↑mk0 { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) } = ↑mk I\n[PROOFSTEP]\nhave fa_ne_zero : (algebraMap R (FractionRing R)) a ≠ 0 :=\n  IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors a_ne_zero'\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ ↑mk0 { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) } = ↑mk I\n[PROOFSTEP]\nsymm\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ ↑mk I = ↑mk0 { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) }\n[PROOFSTEP]\napply Quotient.sound\n[GOAL]\ncase a\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ ↑(Units.map ↑(canonicalEquiv R⁰ (FractionRing R) (FractionRing R))) I ≈\n    ↑(Units.map ↑(canonicalEquiv R⁰ (FractionRing R) (FractionRing R)))\n      (↑(FractionalIdeal.mk0 (FractionRing R)) { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) })\n[PROOFSTEP]\nchange @Setoid.r _ (QuotientGroup.leftRel (toPrincipalIdeal R (FractionRing R)).range) _ _\n[GOAL]\ncase a\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ Setoid.r (↑(Units.map ↑(canonicalEquiv R⁰ (FractionRing R) (FractionRing R))) I)\n    (↑(Units.map ↑(canonicalEquiv R⁰ (FractionRing R) (FractionRing R)))\n      (↑(FractionalIdeal.mk0 (FractionRing R))\n        { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) }))\n[PROOFSTEP]\nrw [canonicalEquiv_self, RingEquiv.coe_monoidHom_refl, Units.map_id, MonoidHom.id_apply, MonoidHom.id_apply,\n  QuotientGroup.leftRel_apply]\n[GOAL]\ncase a\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ I⁻¹ *\n      ↑(FractionalIdeal.mk0 (FractionRing R)) { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) } ∈\n    MonoidHom.range (toPrincipalIdeal R (FractionRing R))\n[PROOFSTEP]\nrefine ⟨Units.mk0 (algebraMap R _ a) fa_ne_zero, ?_⟩\n[GOAL]\ncase a\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ ↑(toPrincipalIdeal R (FractionRing R)) (Units.mk0 (↑(algebraMap R (FractionRing R)) a) fa_ne_zero) =\n    I⁻¹ *\n      ↑(FractionalIdeal.mk0 (FractionRing R)) { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) }\n[PROOFSTEP]\nrw [_root_.eq_inv_mul_iff_mul_eq, eq_comm, mul_comm I]\n[GOAL]\ncase a\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ ↑(FractionalIdeal.mk0 (FractionRing R)) { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) } =\n    ↑(toPrincipalIdeal R (FractionRing R)) (Units.mk0 (↑(algebraMap R (FractionRing R)) a) fa_ne_zero) * I\n[PROOFSTEP]\napply Units.ext\n[GOAL]\ncase a.a\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ ↑(↑(FractionalIdeal.mk0 (FractionRing R)) { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) }) =\n    ↑(↑(toPrincipalIdeal R (FractionRing R)) (Units.mk0 (↑(algebraMap R (FractionRing R)) a) fa_ne_zero) * I)\n[PROOFSTEP]\nsimp only [FractionalIdeal.coe_mk0, FractionalIdeal.map_canonicalEquiv_mk0, Units.val_mk0, coe_toPrincipalIdeal,\n  Units.val_mul, FractionalIdeal.eq_spanSingleton_mul]\n[GOAL]\ncase a.a\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ (∀ (zI : FractionRing R),\n      zI ∈ ↑(integralRep ↑I) →\n        ∃ zJ, zJ ∈ ↑I ∧ ↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑↑I)) * zJ = zI) ∧\n    ∀ (z : FractionRing R),\n      z ∈ ↑I → ↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑↑I)) * z ∈ ↑(integralRep ↑I)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.a.left\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ ∀ (zI : FractionRing R),\n    zI ∈ ↑(integralRep ↑I) →\n      ∃ zJ, zJ ∈ ↑I ∧ ↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑↑I)) * zJ = zI\n[PROOFSTEP]\nintro zJ' hzJ'\n[GOAL]\ncase a.a.left\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\nzJ' : FractionRing R\nhzJ' : zJ' ∈ ↑(integralRep ↑I)\n⊢ ∃ zJ, zJ ∈ ↑I ∧ ↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑↑I)) * zJ = zJ'\n[PROOFSTEP]\nobtain ⟨zJ, hzJ, rfl⟩ := (mem_coeIdeal R⁰).mp hzJ'\n[GOAL]\ncase a.a.left.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\nzJ : R\nhzJ : zJ ∈ integralRep ↑I\nhzJ' : ↑(algebraMap R (FractionRing R)) zJ ∈ ↑(integralRep ↑I)\n⊢ ∃ zJ_1,\n    zJ_1 ∈ ↑I ∧\n      ↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑↑I)) * zJ_1 =\n        ↑(algebraMap R (FractionRing R)) zJ\n[PROOFSTEP]\nrefine ⟨_, hzJ, ?_⟩\n[GOAL]\ncase a.a.left.intro.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\nzJ : R\nhzJ : zJ ∈ integralRep ↑I\nhzJ' : ↑(algebraMap R (FractionRing R)) zJ ∈ ↑(integralRep ↑I)\n⊢ ↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑↑I)) *\n      ((↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑↑I)))⁻¹ *\n        ↑(algebraMap R (FractionRing R)) zJ) =\n    ↑(algebraMap R (FractionRing R)) zJ\n[PROOFSTEP]\nrw [← mul_assoc, mul_inv_cancel fa_ne_zero, one_mul]\n[GOAL]\ncase a.a.right\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\n⊢ ∀ (z : FractionRing R),\n    z ∈ ↑I → ↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑↑I)) * z ∈ ↑(integralRep ↑I)\n[PROOFSTEP]\nintro zI' hzI'\n[GOAL]\ncase a.a.right\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\nzI' : FractionRing R\nhzI' : zI' ∈ ↑I\n⊢ ↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑↑I)) * zI' ∈ ↑(integralRep ↑I)\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := ha zI' hzI'\n[GOAL]\ncase a.a.right.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\nzI' : FractionRing R\nhzI' : zI' ∈ ↑I\ny : R\nhy : ↑(algebraMap R (FractionRing R)) y = Exists.choose (_ : IsFractional R⁰ ↑↑I) • zI'\n⊢ ↑(algebraMap R (FractionRing R)) (Exists.choose (_ : IsFractional R⁰ ↑↑I)) * zI' ∈ ↑(integralRep ↑I)\n[PROOFSTEP]\nrw [← Algebra.smul_def, mem_coeIdeal]\n[GOAL]\ncase a.a.right.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\nzI' : FractionRing R\nhzI' : zI' ∈ ↑I\ny : R\nhy : ↑(algebraMap R (FractionRing R)) y = Exists.choose (_ : IsFractional R⁰ ↑↑I) • zI'\n⊢ ∃ x', x' ∈ integralRep ↑I ∧ ↑(algebraMap R (FractionRing R)) x' = Exists.choose (_ : IsFractional R⁰ ↑↑I) • zI'\n[PROOFSTEP]\nrefine' ⟨y, _, hy⟩\n[GOAL]\ncase a.a.right.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\nzI' : FractionRing R\nhzI' : zI' ∈ ↑I\ny : R\nhy : ↑(algebraMap R (FractionRing R)) y = Exists.choose (_ : IsFractional R⁰ ↑↑I) • zI'\n⊢ y ∈ integralRep ↑I\n[PROOFSTEP]\nshow (algebraMap R _ a)⁻¹ * algebraMap R _ y ∈ (I : FractionalIdeal R⁰ (FractionRing R))\n[GOAL]\ncase a.a.right.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\na : R := Exists.choose (_ : IsFractional R⁰ ↑↑I)\na_ne_zero' : Exists.choose (_ : IsFractional R⁰ ↑↑I) ∈ R⁰\nha : ∀ (b : FractionRing R), b ∈ ↑↑I → IsInteger R (Exists.choose (_ : IsFractional R⁰ ↑↑I) • b)\nfa_ne_zero : ↑(algebraMap R (FractionRing R)) a ≠ 0\nzI' : FractionRing R\nhzI' : zI' ∈ ↑I\ny : R\nhy : ↑(algebraMap R (FractionRing R)) y = Exists.choose (_ : IsFractional R⁰ ↑↑I) • zI'\n⊢ (↑(algebraMap R (FractionRing R)) a)⁻¹ * ↑(algebraMap R (FractionRing R)) y ∈ ↑I\n[PROOFSTEP]\nrwa [hy, Algebra.smul_def, ← mul_assoc, inv_mul_cancel fa_ne_zero, one_mul]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\n⊢ Function.Surjective ↑mk0\n[PROOFSTEP]\nrintro ⟨I⟩\n[GOAL]\ncase mk\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nb✝ : ClassGroup R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\n⊢ ∃ a, ↑mk0 a = Quot.mk Setoid.r I\n[PROOFSTEP]\nrefine ⟨⟨ClassGroup.integralRep I.1, ClassGroup.integralRep_mem_nonZeroDivisors I.ne_zero⟩, ?_⟩\n[GOAL]\ncase mk\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nb✝ : ClassGroup R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\n⊢ ↑mk0 { val := integralRep ↑I, property := (_ : integralRep ↑I ∈ (Ideal R)⁰) } = Quot.mk Setoid.r I\n[PROOFSTEP]\nrw [ClassGroup.mk0_integralRep, ClassGroup.Quot_mk_eq_mk]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ ↑mk I = 1 ↔ Submodule.IsPrincipal ↑↑I\n[PROOFSTEP]\nrw [← (ClassGroup.equiv K).injective.eq_iff]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ ↑(equiv K) (↑mk I) = ↑(equiv K) 1 ↔ Submodule.IsPrincipal ↑↑I\n[PROOFSTEP]\nsimp only [equiv_mk, canonicalEquiv_self, RingEquiv.coe_mulEquiv_refl, QuotientGroup.mk'_apply, _root_.map_one,\n  QuotientGroup.eq_one_iff, MonoidHom.mem_range, ext_iff, coe_toPrincipalIdeal, coe_mapEquiv, MulEquiv.refl_apply]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ (∃ x, spanSingleton R⁰ ↑x = ↑I) ↔ Submodule.IsPrincipal ↑↑I\n[PROOFSTEP]\nrefine ⟨fun ⟨x, hx⟩ => ⟨⟨x, by rw [← hx, coe_spanSingleton]⟩⟩, ?_⟩\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nx✝ : ∃ x, spanSingleton R⁰ ↑x = ↑I\nx : Kˣ\nhx : spanSingleton R⁰ ↑x = ↑I\n⊢ ↑↑I = Submodule.span R {↑x}\n[PROOFSTEP]\nrw [← hx, coe_spanSingleton]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\n⊢ Submodule.IsPrincipal ↑↑I → ∃ x, spanSingleton R⁰ ↑x = ↑I\n[PROOFSTEP]\nintro hI\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nhI : Submodule.IsPrincipal ↑↑I\n⊢ ∃ x, spanSingleton R⁰ ↑x = ↑I\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := @Submodule.IsPrincipal.principal _ _ _ _ _ _ hI\n[GOAL]\ncase intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nhI : Submodule.IsPrincipal ↑↑I\nx : K\nhx : ↑↑I = Submodule.span R {x}\n⊢ ∃ x, spanSingleton R⁰ ↑x = ↑I\n[PROOFSTEP]\nhave hx' : (I : FractionalIdeal R⁰ K) = spanSingleton R⁰ x :=\n  by\n  apply Subtype.coe_injective\n  simp only [val_eq_coe, hx, coe_spanSingleton]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nhI : Submodule.IsPrincipal ↑↑I\nx : K\nhx : ↑↑I = Submodule.span R {x}\n⊢ ↑I = spanSingleton R⁰ x\n[PROOFSTEP]\napply Subtype.coe_injective\n[GOAL]\ncase a\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nhI : Submodule.IsPrincipal ↑↑I\nx : K\nhx : ↑↑I = Submodule.span R {x}\n⊢ (fun a => ↑a) ↑I = (fun a => ↑a) (spanSingleton R⁰ x)\n[PROOFSTEP]\nsimp only [val_eq_coe, hx, coe_spanSingleton]\n[GOAL]\ncase intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nhI : Submodule.IsPrincipal ↑↑I\nx : K\nhx : ↑↑I = Submodule.span R {x}\nhx' : ↑I = spanSingleton R⁰ x\n⊢ ∃ x, spanSingleton R⁰ ↑x = ↑I\n[PROOFSTEP]\nrefine ⟨Units.mk0 x ?_, ?_⟩\n[GOAL]\ncase intro.refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nhI : Submodule.IsPrincipal ↑↑I\nx : K\nhx : ↑↑I = Submodule.span R {x}\nhx' : ↑I = spanSingleton R⁰ x\n⊢ x ≠ 0\n[PROOFSTEP]\nintro x_eq\n[GOAL]\ncase intro.refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nhI : Submodule.IsPrincipal ↑↑I\nx : K\nhx : ↑↑I = Submodule.span R {x}\nhx' : ↑I = spanSingleton R⁰ x\nx_eq : x = 0\n⊢ False\n[PROOFSTEP]\napply Units.ne_zero I\n[GOAL]\ncase intro.refine_1\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nhI : Submodule.IsPrincipal ↑↑I\nx : K\nhx : ↑↑I = Submodule.span R {x}\nhx' : ↑I = spanSingleton R⁰ x\nx_eq : x = 0\n⊢ ↑I = 0\n[PROOFSTEP]\nsimp [hx', x_eq]\n[GOAL]\ncase intro.refine_2\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : DecidableEq L\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsFractionRing R K\ninst✝⁴ : Algebra K L\ninst✝³ : FiniteDimensional K L\ninst✝² : Algebra R L\ninst✝¹ : IsScalarTower R K L\ninst✝ : IsDomain R\nI : (FractionalIdeal R⁰ K)ˣ\nhI : Submodule.IsPrincipal ↑↑I\nx : K\nhx : ↑↑I = Submodule.span R {x}\nhx' : ↑I = spanSingleton R⁰ x\n⊢ spanSingleton R⁰ ↑(Units.mk0 x (_ : x = 0 → False)) = ↑I\n[PROOFSTEP]\nsimp [hx']\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\n⊢ ∀ (x : ClassGroup R), x ∈ {1}\n[PROOFSTEP]\nrefine ClassGroup.induction (R := R) (FractionRing R) (fun I => ?_)\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\n⊢ ↑ClassGroup.mk I ∈ {1}\n[PROOFSTEP]\nrw [Finset.mem_singleton]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\n⊢ ↑ClassGroup.mk I = 1\n[PROOFSTEP]\nexact ClassGroup.mk_eq_one_iff.mpr (I : FractionalIdeal R⁰ (FractionRing R)).isPrincipal\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\n⊢ Fintype.card (ClassGroup R) = 1\n[PROOFSTEP]\nrw [Fintype.card_eq_one_iff]\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\n⊢ ∃ x, ∀ (y : ClassGroup R), y = x\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\n⊢ ∀ (y : ClassGroup R), y = 1\n[PROOFSTEP]\nrefine ClassGroup.induction (R := R) (FractionRing R) (fun I => ?_)\n[GOAL]\ncase h\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : DecidableEq L\ninst✝⁷ : Algebra R K\ninst✝⁶ : IsFractionRing R K\ninst✝⁵ : Algebra K L\ninst✝⁴ : FiniteDimensional K L\ninst✝³ : Algebra R L\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsDomain R\ninst✝ : IsPrincipalIdealRing R\nI : (FractionalIdeal R⁰ (FractionRing R))ˣ\n⊢ ↑ClassGroup.mk I = 1\n[PROOFSTEP]\nexact ClassGroup.mk_eq_one_iff.mpr (I : FractionalIdeal R⁰ (FractionRing R)).isPrincipal\n[GOAL]\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\n⊢ Fintype.card (ClassGroup R) = 1 ↔ IsPrincipalIdealRing R\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\n⊢ Fintype.card (ClassGroup R) = 1 → IsPrincipalIdealRing R\ncase mpr\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\n⊢ IsPrincipalIdealRing R → Fintype.card (ClassGroup R) = 1\n[PROOFSTEP]\nswap\n[GOAL]\ncase mpr\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\n⊢ IsPrincipalIdealRing R → Fintype.card (ClassGroup R) = 1\n[PROOFSTEP]\nintros\n[GOAL]\ncase mpr\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\na✝ : IsPrincipalIdealRing R\n⊢ Fintype.card (ClassGroup R) = 1\n[PROOFSTEP]\nconvert card_classGroup_eq_one (R := R)\n[GOAL]\ncase mp\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\n⊢ Fintype.card (ClassGroup R) = 1 → IsPrincipalIdealRing R\n[PROOFSTEP]\nrw [Fintype.card_eq_one_iff]\n[GOAL]\ncase mp\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\n⊢ (∃ x, ∀ (y : ClassGroup R), y = x) → IsPrincipalIdealRing R\n[PROOFSTEP]\nrintro ⟨I, hI⟩\n[GOAL]\ncase mp.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\nI : ClassGroup R\nhI : ∀ (y : ClassGroup R), y = I\n⊢ IsPrincipalIdealRing R\n[PROOFSTEP]\nhave eq_one : ∀ J : ClassGroup R, J = 1 := fun J => (hI J).trans (hI 1).symm\n[GOAL]\ncase mp.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\nI : ClassGroup R\nhI : ∀ (y : ClassGroup R), y = I\neq_one : ∀ (J : ClassGroup R), J = 1\n⊢ IsPrincipalIdealRing R\n[PROOFSTEP]\nrefine ⟨fun I => ?_⟩\n[GOAL]\ncase mp.intro\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\nI✝ : ClassGroup R\nhI : ∀ (y : ClassGroup R), y = I✝\neq_one : ∀ (J : ClassGroup R), J = 1\nI : Ideal R\n⊢ Submodule.IsPrincipal I\n[PROOFSTEP]\nby_cases hI : I = ⊥\n[GOAL]\ncase pos\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\nI✝ : ClassGroup R\nhI✝ : ∀ (y : ClassGroup R), y = I✝\neq_one : ∀ (J : ClassGroup R), J = 1\nI : Ideal R\nhI : I = ⊥\n⊢ Submodule.IsPrincipal I\n[PROOFSTEP]\nrw [hI]\n[GOAL]\ncase pos\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\nI✝ : ClassGroup R\nhI✝ : ∀ (y : ClassGroup R), y = I✝\neq_one : ∀ (J : ClassGroup R), J = 1\nI : Ideal R\nhI : I = ⊥\n⊢ Submodule.IsPrincipal ⊥\n[PROOFSTEP]\nexact bot_isPrincipal\n[GOAL]\ncase neg\nR : Type u_1\nK : Type u_2\nL : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : DecidableEq L\ninst✝⁸ : Algebra R K\ninst✝⁷ : IsFractionRing R K\ninst✝⁶ : Algebra K L\ninst✝⁵ : FiniteDimensional K L\ninst✝⁴ : Algebra R L\ninst✝³ : IsScalarTower R K L\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\ninst✝ : Fintype (ClassGroup R)\nI✝ : ClassGroup R\nhI✝ : ∀ (y : ClassGroup R), y = I✝\neq_one : ∀ (J : ClassGroup R), J = 1\nI : Ideal R\nhI : ¬I = ⊥\n⊢ Submodule.IsPrincipal I\n[PROOFSTEP]\nexact (ClassGroup.mk0_eq_one_iff (mem_nonZeroDivisors_iff_ne_zero.mpr hI)).mp (eq_one _)\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.ClassGroup", "llama_tokens": 60320, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7025300573952052, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.37319055156513603}}
{"text": "[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nsrc✝ : Mon_ C := Mon_.trivial C\n⊢ (β_ (Mon_.mk src✝.X src✝.one src✝.mul).X (Mon_.mk src✝.X src✝.one src✝.mul).X).hom ≫\n      (Mon_.mk src✝.X src✝.one src✝.mul).mul =\n    (Mon_.mk src✝.X src✝.one src✝.mul).mul\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nsrc✝ : Mon_ C := Mon_.trivial C\n⊢ (β_ (𝟙_ C) (𝟙_ C)).hom ≫ (λ_ (𝟙_ C)).hom = (λ_ (𝟙_ C)).hom\n[PROOFSTEP]\nrw [braiding_leftUnitor, unitors_equal]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\n⊢ (β_ (Mon_.mk src✝.X src✝.one src✝.mul).X (Mon_.mk src✝.X src✝.one src✝.mul).X).hom ≫\n      (Mon_.mk src✝.X src✝.one src✝.mul).mul =\n    (Mon_.mk src✝.X src✝.one src✝.mul).mul\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\n⊢ (β_ (F.obj A.X) (F.obj A.X)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor A.X A.X ≫ F.map A.mul =\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor A.X A.X ≫ F.map A.mul\n[PROOFSTEP]\nhave := F.braided\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n⊢ (β_ (F.obj A.X) (F.obj A.X)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor A.X A.X ≫ F.map A.mul =\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor A.X A.X ≫ F.map A.mul\n[PROOFSTEP]\nslice_lhs 1 2 => rw [← this]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n| (β_ (F.obj A.X) (F.obj A.X)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor A.X A.X\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n| F.map A.mul\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n| (β_ (F.obj A.X) (F.obj A.X)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor A.X A.X\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n| F.map A.mul\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n| (β_ (F.obj A.X) (F.obj A.X)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor A.X A.X\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n| F.map A.mul\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n⊢ (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor A.X A.X ≫ F.map (β_ A.X A.X).hom) ≫ F.map A.mul =\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor A.X A.X ≫ F.map A.mul\n[PROOFSTEP]\nslice_lhs 2 3 => rw [← CategoryTheory.Functor.map_comp, A.mul_comm]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n| F.map (β_ A.X A.X).hom ≫ F.map A.mul\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n| LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor A.X A.X\n[PROOFSTEP]\nrw [← CategoryTheory.Functor.map_comp, A.mul_comm]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n| F.map (β_ A.X A.X).hom ≫ F.map A.mul\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n| LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor A.X A.X\n[PROOFSTEP]\nrw [← CategoryTheory.Functor.map_comp, A.mul_comm]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n| F.map (β_ A.X A.X).hom ≫ F.map A.mul\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nF : LaxBraidedFunctor C D\nA : CommMon_ C\nsrc✝ : Mon_ D := (LaxMonoidalFunctor.mapMon F.toLaxMonoidalFunctor).obj A.toMon_\nthis :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n| LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor A.X A.X\n[PROOFSTEP]\nrw [← CategoryTheory.Functor.map_comp, A.mul_comm]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nX✝ Y✝ : LaxBraidedFunctor C D\nα : X✝ ⟶ Y✝\n⊢ ∀ ⦃X Y : CommMon_ C⦄ (f : X ⟶ Y),\n    (mapCommMon X✝).map f ≫ (fun A => Mon_.Hom.mk (NatTrans.app α.toNatTrans A.X)) Y =\n      (fun A => Mon_.Hom.mk (NatTrans.app α.toNatTrans A.X)) X ≫ (mapCommMon Y✝).map f\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nX✝¹ Y✝¹ : LaxBraidedFunctor C D\nα : X✝¹ ⟶ Y✝¹\nX✝ Y✝ : CommMon_ C\nf✝ : X✝ ⟶ Y✝\n⊢ (mapCommMon X✝¹).map f✝ ≫ (fun A => Mon_.Hom.mk (NatTrans.app α.toNatTrans A.X)) Y✝ =\n    (fun A => Mon_.Hom.mk (NatTrans.app α.toNatTrans A.X)) X✝ ≫ (mapCommMon Y✝¹).map f✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\ninst✝³ : BraidedCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\ninst✝ : BraidedCategory D\nX✝¹ Y✝¹ : LaxBraidedFunctor C D\nα : X✝¹ ⟶ Y✝¹\nX✝ Y✝ : CommMon_ C\nf✝ : X✝ ⟶ Y✝\n⊢ ((mapCommMon X✝¹).map f✝ ≫ (fun A => Mon_.Hom.mk (NatTrans.app α.toNatTrans A.X)) Y✝).hom =\n    ((fun A => Mon_.Hom.mk (NatTrans.app α.toNatTrans A.X)) X✝ ≫ (mapCommMon Y✝¹).map f✝).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX✝ Y✝ : CommMon_ C\nf : X✝ ⟶ Y✝\nx✝² x✝¹ : Discrete PUnit\nx✝ : x✝² ⟶ x✝¹\n⊢ ((fun A =>\n              LaxBraidedFunctor.mk\n                (LaxMonoidalFunctor.mk\n                  (CategoryTheory.Functor.mk { obj := fun x => A.X, map := fun {X Y} x => 𝟙 ((fun x => A.X) X) }) A.one\n                  fun x x => A.mul))\n            X✝).map\n        x✝ ≫\n      (fun x => f.hom) x✝¹ =\n    (fun x => f.hom) x✝² ≫\n      ((fun A =>\n              LaxBraidedFunctor.mk\n                (LaxMonoidalFunctor.mk\n                  (CategoryTheory.Functor.mk { obj := fun x => A.X, map := fun {X Y} x => 𝟙 ((fun x => A.X) X) }) A.one\n                  fun x x => A.mul))\n            Y✝).map\n        x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX✝ Y✝ : CommMon_ C\nf : X✝ ⟶ Y✝\nx✝² x✝¹ : Discrete PUnit\nx✝ : x✝² ⟶ x✝¹\n⊢ 𝟙 X✝.X ≫ f.hom = f.hom ≫ 𝟙 Y✝.X\n[PROOFSTEP]\nrw [Category.id_comp, Category.comp_id]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nF : LaxBraidedFunctor (Discrete PUnit) C\nx✝ : Discrete PUnit\n⊢ x✝ = (trivial (Discrete PUnit)).toMon_.X\n[PROOFSTEP]\next\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nF : LaxBraidedFunctor (Discrete PUnit) C\n⊢ ∀ {X Y : Discrete PUnit} (f : X ⟶ Y),\n    ((𝟭 (LaxBraidedFunctor (Discrete PUnit) C)).obj F).map f ≫\n        ((fun x => F.mapIso (eqToIso (_ : x = (trivial (Discrete PUnit)).toMon_.X))) Y).hom =\n      ((fun x => F.mapIso (eqToIso (_ : x = (trivial (Discrete PUnit)).toMon_.X))) X).hom ≫\n        ((laxBraidedToCommMon C ⋙ commMonToLaxBraided C).obj F).map f\n[PROOFSTEP]\nrintro ⟨⟩ ⟨⟩ f\n[GOAL]\ncase mk.mk\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nF : LaxBraidedFunctor (Discrete PUnit) C\nas✝¹ as✝ : PUnit\nf : { as := as✝¹ } ⟶ { as := as✝ }\n⊢ ((𝟭 (LaxBraidedFunctor (Discrete PUnit) C)).obj F).map f ≫\n      ((fun x => F.mapIso (eqToIso (_ : x = (trivial (Discrete PUnit)).toMon_.X))) { as := as✝ }).hom =\n    ((fun x => F.mapIso (eqToIso (_ : x = (trivial (Discrete PUnit)).toMon_.X))) { as := as✝¹ }).hom ≫\n      ((laxBraidedToCommMon C ⋙ commMonToLaxBraided C).obj F).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nF : LaxBraidedFunctor (Discrete PUnit) C\n⊢ ((𝟭 (LaxBraidedFunctor (Discrete PUnit) C)).obj F).ε ≫\n      ((fun x => F.mapIso (eqToIso (_ : x = (trivial (Discrete PUnit)).toMon_.X))) (𝟙_ (Discrete PUnit))).hom =\n    ((laxBraidedToCommMon C ⋙ commMonToLaxBraided C).obj F).ε\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nF : LaxBraidedFunctor (Discrete PUnit) C\n⊢ ∀ (X Y : Discrete PUnit),\n    LaxMonoidalFunctor.μ ((𝟭 (LaxBraidedFunctor (Discrete PUnit) C)).obj F).toLaxMonoidalFunctor X Y ≫\n        ((fun x => F.mapIso (eqToIso (_ : x = (trivial (Discrete PUnit)).toMon_.X))) (X ⊗ Y)).hom =\n      (((fun x => F.mapIso (eqToIso (_ : x = (trivial (Discrete PUnit)).toMon_.X))) X).hom ⊗\n          ((fun x => F.mapIso (eqToIso (_ : x = (trivial (Discrete PUnit)).toMon_.X))) Y).hom) ≫\n        LaxMonoidalFunctor.μ ((laxBraidedToCommMon C ⋙ commMonToLaxBraided C).obj F).toLaxMonoidalFunctor X Y\n[PROOFSTEP]\naesop_cat\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monoidal.CommMon_", "llama_tokens": 7333, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6825737473266735, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.37318910920659826}}
{"text": "[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\n⊢ ball (f z₀) (ε / 2) ⊆ f '' closedBall z₀ r\n[PROOFSTEP]\nrintro v hv\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\n⊢ v ∈ f '' closedBall z₀ r\n[PROOFSTEP]\nhave h1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r) := h.sub_const v\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\n⊢ v ∈ f '' closedBall z₀ r\n[PROOFSTEP]\nhave h2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r) :=\n  continuous_norm.comp_continuousOn (closure_ball z₀ hr.ne.symm ▸ h1.continuousOn)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\n⊢ v ∈ f '' closedBall z₀ r\n[PROOFSTEP]\nhave h3 : AnalyticOn ℂ f (ball z₀ r) := h.differentiableOn.analyticOn isOpen_ball\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\n⊢ v ∈ f '' closedBall z₀ r\n[PROOFSTEP]\nhave h4 : ∀ z ∈ sphere z₀ r, ε / 2 ≤ ‖f z - v‖ := fun z hz => by\n  linarith [hf z hz, show ‖v - f z₀‖ < ε / 2 from mem_ball.mp hv, norm_sub_sub_norm_sub_le_norm_sub (f z) v (f z₀)]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nz : ℂ\nhz : z ∈ sphere z₀ r\n⊢ ε / 2 ≤ ‖f z - v‖\n[PROOFSTEP]\nlinarith [hf z hz, show ‖v - f z₀‖ < ε / 2 from mem_ball.mp hv, norm_sub_sub_norm_sub_le_norm_sub (f z) v (f z₀)]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\n⊢ v ∈ f '' closedBall z₀ r\n[PROOFSTEP]\nhave h5 : ‖f z₀ - v‖ < ε / 2 := by simpa [← dist_eq_norm, dist_comm] using mem_ball.mp hv\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\n⊢ ‖f z₀ - v‖ < ε / 2\n[PROOFSTEP]\nsimpa [← dist_eq_norm, dist_comm] using mem_ball.mp hv\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\n⊢ v ∈ f '' closedBall z₀ r\n[PROOFSTEP]\nobtain ⟨z, hz1, hz2⟩ : ∃ z ∈ ball z₀ r, IsLocalMin (fun z => ‖f z - v‖) z\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\n⊢ ∃ z, z ∈ ball z₀ r ∧ IsLocalMin (fun z => ‖f z - v‖) z\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\nz : ℂ\nhz1 : z ∈ ball z₀ r\nhz2 : IsLocalMin (fun z => ‖f z - v‖) z\n⊢ v ∈ f '' closedBall z₀ r\n[PROOFSTEP]\nexact exists_isLocalMin_mem_ball h2 (mem_closedBall_self hr.le) fun z hz => h5.trans_le (h4 z hz)\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\nz : ℂ\nhz1 : z ∈ ball z₀ r\nhz2 : IsLocalMin (fun z => ‖f z - v‖) z\n⊢ v ∈ f '' closedBall z₀ r\n[PROOFSTEP]\nrefine ⟨z, ball_subset_closedBall hz1, sub_eq_zero.mp ?_⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\nz : ℂ\nhz1 : z ∈ ball z₀ r\nhz2 : IsLocalMin (fun z => ‖f z - v‖) z\n⊢ f z - v = 0\n[PROOFSTEP]\nhave h6 := h1.differentiableOn.eventually_differentiableAt (isOpen_ball.mem_nhds hz1)\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\nz : ℂ\nhz1 : z ∈ ball z₀ r\nhz2 : IsLocalMin (fun z => ‖f z - v‖) z\nh6 : ∀ᶠ (y : ℂ) in 𝓝 z, DifferentiableAt ℂ (fun z => f z - v) y\n⊢ f z - v = 0\n[PROOFSTEP]\nrefine (eventually_eq_or_eq_zero_of_isLocalMin_norm h6 hz2).resolve_left fun key => ?_\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\nz : ℂ\nhz1 : z ∈ ball z₀ r\nhz2 : IsLocalMin (fun z => ‖f z - v‖) z\nh6 : ∀ᶠ (y : ℂ) in 𝓝 z, DifferentiableAt ℂ (fun z => f z - v) y\nkey : ∀ᶠ (z_1 : ℂ) in 𝓝 z, f z_1 - v = f z - v\n⊢ False\n[PROOFSTEP]\nhave h7 : ∀ᶠ w in 𝓝 z, f w = f z := by filter_upwards [key] with h; field_simp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\nz : ℂ\nhz1 : z ∈ ball z₀ r\nhz2 : IsLocalMin (fun z => ‖f z - v‖) z\nh6 : ∀ᶠ (y : ℂ) in 𝓝 z, DifferentiableAt ℂ (fun z => f z - v) y\nkey : ∀ᶠ (z_1 : ℂ) in 𝓝 z, f z_1 - v = f z - v\n⊢ ∀ᶠ (w : ℂ) in 𝓝 z, f w = f z\n[PROOFSTEP]\nfilter_upwards [key] with h\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh✝ : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\nz : ℂ\nhz1 : z ∈ ball z₀ r\nhz2 : IsLocalMin (fun z => ‖f z - v‖) z\nh6 : ∀ᶠ (y : ℂ) in 𝓝 z, DifferentiableAt ℂ (fun z => f z - v) y\nkey : ∀ᶠ (z_1 : ℂ) in 𝓝 z, f z_1 - v = f z - v\nh : ℂ\n⊢ f h - v = f z - v → f h = f z\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\nz : ℂ\nhz1 : z ∈ ball z₀ r\nhz2 : IsLocalMin (fun z => ‖f z - v‖) z\nh6 : ∀ᶠ (y : ℂ) in 𝓝 z, DifferentiableAt ℂ (fun z => f z - v) y\nkey : ∀ᶠ (z_1 : ℂ) in 𝓝 z, f z_1 - v = f z - v\nh7 : ∀ᶠ (w : ℂ) in 𝓝 z, f w = f z\n⊢ False\n[PROOFSTEP]\nreplace h7 : ∃ᶠ w in 𝓝[≠] z, f w = f z := (h7.filter_mono nhdsWithin_le_nhds).frequently\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\nz : ℂ\nhz1 : z ∈ ball z₀ r\nhz2 : IsLocalMin (fun z => ‖f z - v‖) z\nh6 : ∀ᶠ (y : ℂ) in 𝓝 z, DifferentiableAt ℂ (fun z => f z - v) y\nkey : ∀ᶠ (z_1 : ℂ) in 𝓝 z, f z_1 - v = f z - v\nh7 : ∃ᶠ (w : ℂ) in 𝓝[{z}ᶜ] z, f w = f z\n⊢ False\n[PROOFSTEP]\nhave h8 : IsPreconnected (ball z₀ r) := (convex_ball z₀ r).isPreconnected\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\nz : ℂ\nhz1 : z ∈ ball z₀ r\nhz2 : IsLocalMin (fun z => ‖f z - v‖) z\nh6 : ∀ᶠ (y : ℂ) in 𝓝 z, DifferentiableAt ℂ (fun z => f z - v) y\nkey : ∀ᶠ (z_1 : ℂ) in 𝓝 z, f z_1 - v = f z - v\nh7 : ∃ᶠ (w : ℂ) in 𝓝[{z}ᶜ] z, f w = f z\nh8 : IsPreconnected (ball z₀ r)\n⊢ False\n[PROOFSTEP]\nhave h9 := h3.eqOn_of_preconnected_of_frequently_eq analyticOn_const h8 hz1 h7\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\nz : ℂ\nhz1 : z ∈ ball z₀ r\nhz2 : IsLocalMin (fun z => ‖f z - v‖) z\nh6 : ∀ᶠ (y : ℂ) in 𝓝 z, DifferentiableAt ℂ (fun z => f z - v) y\nkey : ∀ᶠ (z_1 : ℂ) in 𝓝 z, f z_1 - v = f z - v\nh7 : ∃ᶠ (w : ℂ) in 𝓝[{z}ᶜ] z, f w = f z\nh8 : IsPreconnected (ball z₀ r)\nh9 : EqOn f (fun x => f z) (ball z₀ r)\n⊢ False\n[PROOFSTEP]\nhave h10 : f z = f z₀ := (h9 (mem_ball_self hr)).symm\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nh : DiffContOnCl ℂ f (ball z₀ r)\nhr : 0 < r\nhf : ∀ (z : ℂ), z ∈ sphere z₀ r → ε ≤ ‖f z - f z₀‖\nhz₀ : ∃ᶠ (z : ℂ) in 𝓝 z₀, f z ≠ f z₀\nv : ℂ\nhv : v ∈ ball (f z₀) (ε / 2)\nh1 : DiffContOnCl ℂ (fun z => f z - v) (ball z₀ r)\nh2 : ContinuousOn (fun z => ‖f z - v‖) (closedBall z₀ r)\nh3 : AnalyticOn ℂ f (ball z₀ r)\nh4 : ∀ (z : ℂ), z ∈ sphere z₀ r → ε / 2 ≤ ‖f z - v‖\nh5 : ‖f z₀ - v‖ < ε / 2\nz : ℂ\nhz1 : z ∈ ball z₀ r\nhz2 : IsLocalMin (fun z => ‖f z - v‖) z\nh6 : ∀ᶠ (y : ℂ) in 𝓝 z, DifferentiableAt ℂ (fun z => f z - v) y\nkey : ∀ᶠ (z_1 : ℂ) in 𝓝 z, f z_1 - v = f z - v\nh7 : ∃ᶠ (w : ℂ) in 𝓝[{z}ᶜ] z, f w = f z\nh8 : IsPreconnected (ball z₀ r)\nh9 : EqOn f (fun x => f z) (ball z₀ r)\nh10 : f z = f z₀\n⊢ False\n[PROOFSTEP]\nexact not_eventually.mpr hz₀ (mem_of_superset (ball_mem_nhds z₀ hr) (h10 ▸ h9))\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhf : AnalyticAt ℂ f z₀\n⊢ (∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀) ∨ 𝓝 (f z₀) ≤ map f (𝓝 z₀)\n[PROOFSTEP]\nrefine or_iff_not_imp_left.mpr fun h => ?_\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\n⊢ 𝓝 (f z₀) ≤ map f (𝓝 z₀)\n[PROOFSTEP]\nrefine (nhds_basis_ball.le_basis_iff (nhds_basis_closedBall.map f)).mpr fun R hR => ?_\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nhave h1 := (hf.eventually_eq_or_eventually_ne analyticAt_const).resolve_left h\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nhave h2 : ∀ᶠ z in 𝓝 z₀, AnalyticAt ℂ f z := (isOpen_analyticAt ℂ f).eventually_mem hf\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nobtain ⟨ρ, hρ, h3, h4⟩ : ∃ ρ > 0, AnalyticOn ℂ f (closedBall z₀ ρ) ∧ ∀ z ∈ closedBall z₀ ρ, z ≠ z₀ → f z ≠ f z₀ := by\n  simpa only [setOf_and, subset_inter_iff] using\n    nhds_basis_closedBall.mem_iff.mp (h2.and (eventually_nhdsWithin_iff.mp h1))\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\n⊢ ∃ ρ, ρ > 0 ∧ AnalyticOn ℂ f (closedBall z₀ ρ) ∧ ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\n[PROOFSTEP]\nsimpa only [setOf_and, subset_inter_iff] using\n  nhds_basis_closedBall.mem_iff.mp (h2.and (eventually_nhdsWithin_iff.mp h1))\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh3 : AnalyticOn ℂ f (closedBall z₀ ρ)\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nreplace h3 : DiffContOnCl ℂ f (ball z₀ ρ)\n[GOAL]\ncase h3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh3 : AnalyticOn ℂ f (closedBall z₀ ρ)\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\n⊢ DiffContOnCl ℂ f (ball z₀ ρ)\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\nh3 : DiffContOnCl ℂ f (ball z₀ ρ)\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nexact ⟨h3.differentiableOn.mono ball_subset_closedBall, (closure_ball z₀ hρ.lt.ne.symm).symm ▸ h3.continuousOn⟩\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\nh3 : DiffContOnCl ℂ f (ball z₀ ρ)\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nlet r := ρ ⊓ R\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r✝ m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\nh3 : DiffContOnCl ℂ f (ball z₀ ρ)\nr : ℝ := ρ ⊓ R\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nhave hr : 0 < r := lt_inf_iff.mpr ⟨hρ, hR⟩\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r✝ m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\nh3 : DiffContOnCl ℂ f (ball z₀ ρ)\nr : ℝ := ρ ⊓ R\nhr : 0 < r\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nhave h5 : closedBall z₀ r ⊆ closedBall z₀ ρ := closedBall_subset_closedBall inf_le_left\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r✝ m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\nh3 : DiffContOnCl ℂ f (ball z₀ ρ)\nr : ℝ := ρ ⊓ R\nhr : 0 < r\nh5 : closedBall z₀ r ⊆ closedBall z₀ ρ\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nhave h6 : DiffContOnCl ℂ f (ball z₀ r) := h3.mono (ball_subset_ball inf_le_left)\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r✝ m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\nh3 : DiffContOnCl ℂ f (ball z₀ ρ)\nr : ℝ := ρ ⊓ R\nhr : 0 < r\nh5 : closedBall z₀ r ⊆ closedBall z₀ ρ\nh6 : DiffContOnCl ℂ f (ball z₀ r)\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nhave h7 : ∀ z ∈ sphere z₀ r, f z ≠ f z₀ := fun z hz =>\n  h4 z (h5 (sphere_subset_closedBall hz)) (ne_of_mem_sphere hz hr.ne.symm)\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r✝ m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\nh3 : DiffContOnCl ℂ f (ball z₀ ρ)\nr : ℝ := ρ ⊓ R\nhr : 0 < r\nh5 : closedBall z₀ r ⊆ closedBall z₀ ρ\nh6 : DiffContOnCl ℂ f (ball z₀ r)\nh7 : ∀ (z : ℂ), z ∈ sphere z₀ r → f z ≠ f z₀\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nhave h8 : (sphere z₀ r).Nonempty := NormedSpace.sphere_nonempty.mpr hr.le\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r✝ m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\nh3 : DiffContOnCl ℂ f (ball z₀ ρ)\nr : ℝ := ρ ⊓ R\nhr : 0 < r\nh5 : closedBall z₀ r ⊆ closedBall z₀ ρ\nh6 : DiffContOnCl ℂ f (ball z₀ r)\nh7 : ∀ (z : ℂ), z ∈ sphere z₀ r → f z ≠ f z₀\nh8 : Set.Nonempty (sphere z₀ r)\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nhave h9 : ContinuousOn (fun x => ‖f x - f z₀‖) (sphere z₀ r) :=\n  continuous_norm.comp_continuousOn ((h6.sub_const (f z₀)).continuousOn_ball.mono sphere_subset_closedBall)\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r✝ m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\nh3 : DiffContOnCl ℂ f (ball z₀ ρ)\nr : ℝ := ρ ⊓ R\nhr : 0 < r\nh5 : closedBall z₀ r ⊆ closedBall z₀ ρ\nh6 : DiffContOnCl ℂ f (ball z₀ r)\nh7 : ∀ (z : ℂ), z ∈ sphere z₀ r → f z ≠ f z₀\nh8 : Set.Nonempty (sphere z₀ r)\nh9 : ContinuousOn (fun x => ‖f x - f z₀‖) (sphere z₀ r)\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nobtain ⟨x, hx, hfx⟩ := (isCompact_sphere z₀ r).exists_forall_le h8 h9\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r✝ m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\nh3 : DiffContOnCl ℂ f (ball z₀ ρ)\nr : ℝ := ρ ⊓ R\nhr : 0 < r\nh5 : closedBall z₀ r ⊆ closedBall z₀ ρ\nh6 : DiffContOnCl ℂ f (ball z₀ r)\nh7 : ∀ (z : ℂ), z ∈ sphere z₀ r → f z ≠ f z₀\nh8 : Set.Nonempty (sphere z₀ r)\nh9 : ContinuousOn (fun x => ‖f x - f z₀‖) (sphere z₀ r)\nx : ℂ\nhx : x ∈ sphere z₀ r\nhfx : ∀ (y : ℂ), y ∈ sphere z₀ r → ‖f x - f z₀‖ ≤ ‖f y - f z₀‖\n⊢ ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nrefine ⟨‖f x - f z₀‖ / 2, half_pos (norm_sub_pos_iff.mpr (h7 x hx)), ?_⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r✝ m : ℝ\nhf : AnalyticAt ℂ f z₀\nh : ¬∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀\nR : ℝ\nhR : 0 < R\nh1 : ∀ᶠ (z : ℂ) in 𝓝[{z₀}ᶜ] z₀, f z ≠ f z₀\nh2 : ∀ᶠ (z : ℂ) in 𝓝 z₀, AnalyticAt ℂ f z\nρ : ℝ\nhρ : ρ > 0\nh4 : ∀ (z : ℂ), z ∈ closedBall z₀ ρ → z ≠ z₀ → f z ≠ f z₀\nh3 : DiffContOnCl ℂ f (ball z₀ ρ)\nr : ℝ := ρ ⊓ R\nhr : 0 < r\nh5 : closedBall z₀ r ⊆ closedBall z₀ ρ\nh6 : DiffContOnCl ℂ f (ball z₀ r)\nh7 : ∀ (z : ℂ), z ∈ sphere z₀ r → f z ≠ f z₀\nh8 : Set.Nonempty (sphere z₀ r)\nh9 : ContinuousOn (fun x => ‖f x - f z₀‖) (sphere z₀ r)\nx : ℂ\nhx : x ∈ sphere z₀ r\nhfx : ∀ (y : ℂ), y ∈ sphere z₀ r → ‖f x - f z₀‖ ≤ ‖f y - f z₀‖\n⊢ ball (f z₀) (‖f x - f z₀‖ / 2) ⊆ f '' closedBall z₀ R\n[PROOFSTEP]\nexact\n  (h6.ball_subset_image_closedBall hr (fun z hz => hfx z hz) (not_eventually.mp h)).trans\n    (image_subset f (closedBall_subset_closedBall inf_le_right))\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\n⊢ (∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀) ∨ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nlet ray : E → ℂ → E := fun z t => z₀ + t • z\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\n⊢ (∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀) ∨ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nlet gray : E → ℂ → ℂ := fun z => g ∘ ray z\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\n⊢ (∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀) ∨ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nobtain ⟨r, hr, hgr⟩ := isOpen_iff.mp (isOpen_analyticAt ℂ g) z₀ hg\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\n⊢ (∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀) ∨ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nhave h1 : ∀ z ∈ sphere (0 : E) 1, AnalyticOn ℂ (gray z) (ball 0 r) :=\n  by\n  refine fun z hz t ht => AnalyticAt.comp ?_ ?_\n  · exact hgr (by simpa [norm_smul, mem_sphere_zero_iff_norm.mp hz] using ht)\n  · exact analyticAt_const.add ((ContinuousLinearMap.smulRight (ContinuousLinearMap.id ℂ ℂ) z).analyticAt t)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\n⊢ ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\n[PROOFSTEP]\nrefine fun z hz t ht => AnalyticAt.comp ?_ ?_\n[GOAL]\ncase refine_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nz : E\nhz : z ∈ sphere 0 1\nt : ℂ\nht : t ∈ ball 0 r\n⊢ AnalyticAt ℂ g (ray z t)\n[PROOFSTEP]\nexact hgr (by simpa [norm_smul, mem_sphere_zero_iff_norm.mp hz] using ht)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nz : E\nhz : z ∈ sphere 0 1\nt : ℂ\nht : t ∈ ball 0 r\n⊢ ray z t ∈ ball z₀ r\n[PROOFSTEP]\nsimpa [norm_smul, mem_sphere_zero_iff_norm.mp hz] using ht\n[GOAL]\ncase refine_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nz : E\nhz : z ∈ sphere 0 1\nt : ℂ\nht : t ∈ ball 0 r\n⊢ AnalyticAt ℂ (ray z) t\n[PROOFSTEP]\nexact analyticAt_const.add ((ContinuousLinearMap.smulRight (ContinuousLinearMap.id ℂ ℂ) z).analyticAt t)\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\n⊢ (∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀) ∨ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nby_cases ∀ z ∈ sphere (0 : E) 1, ∀ᶠ t in 𝓝 0, gray z t = gray z 0\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\n⊢ (∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀) ∨ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nby_cases ∀ z ∈ sphere (0 : E) 1, ∀ᶠ t in 𝓝 0, gray z t = gray z 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\n⊢ (∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀) ∨ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nleft\n  -- If g is eventually constant along every direction, then it is eventually constant\n[GOAL]\ncase pos.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\n⊢ ∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀\n[PROOFSTEP]\nrefine eventually_of_mem (ball_mem_nhds z₀ hr) fun z hz => ?_\n[GOAL]\ncase pos.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\n⊢ g z = g z₀\n[PROOFSTEP]\nrefine (eq_or_ne z z₀).casesOn (congr_arg g) fun h' => ?_\n[GOAL]\ncase pos.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : z ≠ z₀\n⊢ g z = g z₀\n[PROOFSTEP]\nreplace h' : ‖z - z₀‖ ≠ 0 := by simpa only [Ne.def, norm_eq_zero, sub_eq_zero]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : z ≠ z₀\n⊢ ‖z - z₀‖ ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, norm_eq_zero, sub_eq_zero]\n[GOAL]\ncase pos.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\n⊢ g z = g z₀\n[PROOFSTEP]\nlet w : E := ‖z - z₀‖⁻¹ • (z - z₀)\n[GOAL]\ncase pos.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w✝ : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\nw : E := ‖z - z₀‖⁻¹ • (z - z₀)\n⊢ g z = g z₀\n[PROOFSTEP]\nhave h3 : ∀ t ∈ ball (0 : ℂ) r, gray w t = g z₀ :=\n  by\n  have e1 : IsPreconnected (ball (0 : ℂ) r) := (convex_ball 0 r).isPreconnected\n  have e2 : w ∈ sphere (0 : E) 1 := by simp [norm_smul, inv_mul_cancel h']\n  specialize h1 w e2\n  apply h1.eqOn_of_preconnected_of_eventuallyEq analyticOn_const e1 (mem_ball_self hr)\n  simpa using h w e2\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w✝ : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\nw : E := ‖z - z₀‖⁻¹ • (z - z₀)\n⊢ ∀ (t : ℂ), t ∈ ball 0 r → gray w t = g z₀\n[PROOFSTEP]\nhave e1 : IsPreconnected (ball (0 : ℂ) r) := (convex_ball 0 r).isPreconnected\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w✝ : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\nw : E := ‖z - z₀‖⁻¹ • (z - z₀)\ne1 : IsPreconnected (ball 0 r)\n⊢ ∀ (t : ℂ), t ∈ ball 0 r → gray w t = g z₀\n[PROOFSTEP]\nhave e2 : w ∈ sphere (0 : E) 1 := by simp [norm_smul, inv_mul_cancel h']\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w✝ : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\nw : E := ‖z - z₀‖⁻¹ • (z - z₀)\ne1 : IsPreconnected (ball 0 r)\n⊢ w ∈ sphere 0 1\n[PROOFSTEP]\nsimp [norm_smul, inv_mul_cancel h']\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w✝ : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\nw : E := ‖z - z₀‖⁻¹ • (z - z₀)\ne1 : IsPreconnected (ball 0 r)\ne2 : w ∈ sphere 0 1\n⊢ ∀ (t : ℂ), t ∈ ball 0 r → gray w t = g z₀\n[PROOFSTEP]\nspecialize h1 w e2\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w✝ : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\nw : E := ‖z - z₀‖⁻¹ • (z - z₀)\ne1 : IsPreconnected (ball 0 r)\ne2 : w ∈ sphere 0 1\nh1 : AnalyticOn ℂ (gray w) (ball 0 r)\n⊢ ∀ (t : ℂ), t ∈ ball 0 r → gray w t = g z₀\n[PROOFSTEP]\napply h1.eqOn_of_preconnected_of_eventuallyEq analyticOn_const e1 (mem_ball_self hr)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w✝ : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\nw : E := ‖z - z₀‖⁻¹ • (z - z₀)\ne1 : IsPreconnected (ball 0 r)\ne2 : w ∈ sphere 0 1\nh1 : AnalyticOn ℂ (gray w) (ball 0 r)\n⊢ gray w =ᶠ[𝓝 0] fun x => g z₀\n[PROOFSTEP]\nsimpa using h w e2\n[GOAL]\ncase pos.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w✝ : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\nw : E := ‖z - z₀‖⁻¹ • (z - z₀)\nh3 : ∀ (t : ℂ), t ∈ ball 0 r → gray w t = g z₀\n⊢ g z = g z₀\n[PROOFSTEP]\nhave h4 : ‖z - z₀‖ < r := by simpa [dist_eq_norm] using mem_ball.mp hz\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w✝ : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\nw : E := ‖z - z₀‖⁻¹ • (z - z₀)\nh3 : ∀ (t : ℂ), t ∈ ball 0 r → gray w t = g z₀\n⊢ ‖z - z₀‖ < r\n[PROOFSTEP]\nsimpa [dist_eq_norm] using mem_ball.mp hz\n[GOAL]\ncase pos.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w✝ : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\nw : E := ‖z - z₀‖⁻¹ • (z - z₀)\nh3 : ∀ (t : ℂ), t ∈ ball 0 r → gray w t = g z₀\nh4 : ‖z - z₀‖ < r\n⊢ g z = g z₀\n[PROOFSTEP]\nreplace h4 : ↑‖z - z₀‖ ∈ ball (0 : ℂ) r := by simpa only [mem_ball_zero_iff, norm_eq_abs, abs_ofReal, abs_norm]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w✝ : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\nw : E := ‖z - z₀‖⁻¹ • (z - z₀)\nh3 : ∀ (t : ℂ), t ∈ ball 0 r → gray w t = g z₀\nh4 : ‖z - z₀‖ < r\n⊢ ↑‖z - z₀‖ ∈ ball 0 r\n[PROOFSTEP]\nsimpa only [mem_ball_zero_iff, norm_eq_abs, abs_ofReal, abs_norm]\n[GOAL]\ncase pos.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w✝ : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\nz : E\nhz : z ∈ ball z₀ r\nh' : ‖z - z₀‖ ≠ 0\nw : E := ‖z - z₀‖⁻¹ • (z - z₀)\nh3 : ∀ (t : ℂ), t ∈ ball 0 r → gray w t = g z₀\nh4 : ↑‖z - z₀‖ ∈ ball 0 r\n⊢ g z = g z₀\n[PROOFSTEP]\nsimpa only [smul_smul, mul_inv_cancel h', one_smul, add_sub_cancel'_right, Function.comp_apply, coe_smul] using\n  h3 (↑‖z - z₀‖) h4\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ¬∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\n⊢ (∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀) ∨ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nright\n  -- Otherwise, it is open along at least one direction and that implies the result\n[GOAL]\ncase neg.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ¬∀ (z : E), z ∈ sphere 0 1 → ∀ᶠ (t : ℂ) in 𝓝 0, gray z t = gray z 0\n⊢ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nh : ∃ z, z ∈ sphere 0 1 ∧ ¬∀ᶠ (t : ℂ) in 𝓝 0, (fun z => g ∘ ray z) z t = (fun z => g ∘ ray z) z 0\n⊢ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nobtain ⟨z, hz, hrz⟩ := h\n[GOAL]\ncase neg.h.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nh1 : ∀ (z : E), z ∈ sphere 0 1 → AnalyticOn ℂ (gray z) (ball 0 r)\nz : E\nhz : z ∈ sphere 0 1\nhrz : ¬∀ᶠ (t : ℂ) in 𝓝 0, (fun z => g ∘ ray z) z t = (fun z => g ∘ ray z) z 0\n⊢ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nspecialize h1 z hz 0 (mem_ball_self hr)\n[GOAL]\ncase neg.h.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nz : E\nhz : z ∈ sphere 0 1\nhrz : ¬∀ᶠ (t : ℂ) in 𝓝 0, (fun z => g ∘ ray z) z t = (fun z => g ∘ ray z) z 0\nh1 : AnalyticAt ℂ (gray z) 0\n⊢ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nhave h7 := h1.eventually_constant_or_nhds_le_map_nhds_aux.resolve_left hrz\n[GOAL]\ncase neg.h.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nz : E\nhz : z ∈ sphere 0 1\nhrz : ¬∀ᶠ (t : ℂ) in 𝓝 0, (fun z => g ∘ ray z) z t = (fun z => g ∘ ray z) z 0\nh1 : AnalyticAt ℂ (gray z) 0\nh7 : 𝓝 (gray z 0) ≤ map (gray z) (𝓝 0)\n⊢ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nrw [show gray z 0 = g z₀ by simp, ← map_compose] at h7 \n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nz : E\nhz : z ∈ sphere 0 1\nhrz : ¬∀ᶠ (t : ℂ) in 𝓝 0, (fun z => g ∘ ray z) z t = (fun z => g ∘ ray z) z 0\nh1 : AnalyticAt ℂ (gray z) 0\nh7 : 𝓝 (gray z 0) ≤ map (gray z) (𝓝 0)\n⊢ gray z 0 = g z₀\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.h.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nz : E\nhz : z ∈ sphere 0 1\nhrz : ¬∀ᶠ (t : ℂ) in 𝓝 0, (fun z => g ∘ ray z) z t = (fun z => g ∘ ray z) z 0\nh1 : AnalyticAt ℂ (gray z) 0\nh7 : 𝓝 (g z₀) ≤ (map g ∘ map (ray z)) (𝓝 0)\n⊢ 𝓝 (g z₀) ≤ map g (𝓝 z₀)\n[PROOFSTEP]\nrefine h7.trans (map_mono ?_)\n[GOAL]\ncase neg.h.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nz : E\nhz : z ∈ sphere 0 1\nhrz : ¬∀ᶠ (t : ℂ) in 𝓝 0, (fun z => g ∘ ray z) z t = (fun z => g ∘ ray z) z 0\nh1 : AnalyticAt ℂ (gray z) 0\nh7 : 𝓝 (g z₀) ≤ (map g ∘ map (ray z)) (𝓝 0)\n⊢ map (ray z) (𝓝 0) ≤ 𝓝 z₀\n[PROOFSTEP]\nhave h10 : Continuous fun t : ℂ => z₀ + t • z := continuous_const.add (continuous_id'.smul continuous_const)\n[GOAL]\ncase neg.h.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r✝ m : ℝ\nz₀ : E\nhg : AnalyticAt ℂ g z₀\nray : E → ℂ → E := fun z t => z₀ + t • z\ngray : E → ℂ → ℂ := fun z => g ∘ ray z\nr : ℝ\nhr : r > 0\nhgr : ball z₀ r ⊆ {x | AnalyticAt ℂ g x}\nz : E\nhz : z ∈ sphere 0 1\nhrz : ¬∀ᶠ (t : ℂ) in 𝓝 0, (fun z => g ∘ ray z) z t = (fun z => g ∘ ray z) z 0\nh1 : AnalyticAt ℂ (gray z) 0\nh7 : 𝓝 (g z₀) ≤ (map g ∘ map (ray z)) (𝓝 0)\nh10 : Continuous fun t => z₀ + t • z\n⊢ map (ray z) (𝓝 0) ≤ 𝓝 z₀\n[PROOFSTEP]\nsimpa using h10.tendsto 0\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhg : AnalyticOn ℂ g U\nhU : IsPreconnected U\n⊢ (∃ w, ∀ (z : E), z ∈ U → g z = w) ∨ ∀ (s : Set E), s ⊆ U → IsOpen s → IsOpen (g '' s)\n[PROOFSTEP]\nby_cases ∃ z₀ ∈ U, ∀ᶠ z in 𝓝 z₀, g z = g z₀\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhg : AnalyticOn ℂ g U\nhU : IsPreconnected U\n⊢ (∃ w, ∀ (z : E), z ∈ U → g z = w) ∨ ∀ (s : Set E), s ⊆ U → IsOpen s → IsOpen (g '' s)\n[PROOFSTEP]\nby_cases ∃ z₀ ∈ U, ∀ᶠ z in 𝓝 z₀, g z = g z₀\n[GOAL]\ncase pos\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhg : AnalyticOn ℂ g U\nhU : IsPreconnected U\nh : ∃ z₀, z₀ ∈ U ∧ ∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀\n⊢ (∃ w, ∀ (z : E), z ∈ U → g z = w) ∨ ∀ (s : Set E), s ⊆ U → IsOpen s → IsOpen (g '' s)\n[PROOFSTEP]\nobtain ⟨z₀, hz₀, h⟩ := h\n[GOAL]\ncase pos.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀✝ w : ℂ\nε r m : ℝ\nhg : AnalyticOn ℂ g U\nhU : IsPreconnected U\nz₀ : E\nhz₀ : z₀ ∈ U\nh : ∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀\n⊢ (∃ w, ∀ (z : E), z ∈ U → g z = w) ∨ ∀ (s : Set E), s ⊆ U → IsOpen s → IsOpen (g '' s)\n[PROOFSTEP]\nexact Or.inl ⟨g z₀, hg.eqOn_of_preconnected_of_eventuallyEq analyticOn_const hU hz₀ h⟩\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhg : AnalyticOn ℂ g U\nhU : IsPreconnected U\nh : ¬∃ z₀, z₀ ∈ U ∧ ∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀\n⊢ (∃ w, ∀ (z : E), z ∈ U → g z = w) ∨ ∀ (s : Set E), s ⊆ U → IsOpen s → IsOpen (g '' s)\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhg : AnalyticOn ℂ g U\nhU : IsPreconnected U\nh : ∀ (z₀ : E), z₀ ∈ U → ¬∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀\n⊢ (∃ w, ∀ (z : E), z ∈ U → g z = w) ∨ ∀ (s : Set E), s ⊆ U → IsOpen s → IsOpen (g '' s)\n[PROOFSTEP]\nrefine Or.inr fun s hs1 hs2 => isOpen_iff_mem_nhds.mpr ?_\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w : ℂ\nε r m : ℝ\nhg : AnalyticOn ℂ g U\nhU : IsPreconnected U\nh : ∀ (z₀ : E), z₀ ∈ U → ¬∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀\ns : Set E\nhs1 : s ⊆ U\nhs2 : IsOpen s\n⊢ ∀ (a : ℂ), a ∈ g '' s → g '' s ∈ 𝓝 a\n[PROOFSTEP]\nrintro z ⟨w, hw1, rfl⟩\n[GOAL]\ncase neg.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nU : Set E\nf : ℂ → ℂ\ng : E → ℂ\nz₀ w✝ : ℂ\nε r m : ℝ\nhg : AnalyticOn ℂ g U\nhU : IsPreconnected U\nh : ∀ (z₀ : E), z₀ ∈ U → ¬∀ᶠ (z : E) in 𝓝 z₀, g z = g z₀\ns : Set E\nhs1 : s ⊆ U\nhs2 : IsOpen s\nw : E\nhw1 : w ∈ s\n⊢ g '' s ∈ 𝓝 (g w)\n[PROOFSTEP]\nexact\n  (hg w (hs1 hw1)).eventually_constant_or_nhds_le_map_nhds.resolve_left (h w (hs1 hw1))\n    (image_mem_map (hs2.mem_nhds hw1))\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.OpenMapping", "llama_tokens": 29221, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7461390043208003, "lm_q2_score": 0.5, "lm_q1q2_score": 0.37306950216040013}}
{"text": "[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : Monoid M\ninst✝ : Mul N\nb₁ b₂ : N\n⊢ (1, b₁) * (1, b₂) = (1, b₁ * b₂)\n[PROOFSTEP]\nrw [mk_mul_mk, mul_one]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : Mul M\ninst✝ : Monoid N\na₁ a₂ : M\n⊢ (a₁, 1) * (a₂, 1) = (a₁ * a₂, 1)\n[PROOFSTEP]\nrw [mk_mul_mk, mul_one]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : SemigroupWithZero M\ninst✝ : SemigroupWithZero N\n⊢ ∀ (a : M × N), 0 * a = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : SemigroupWithZero M\ninst✝ : SemigroupWithZero N\n⊢ ∀ (a : M × N), a * 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : Monoid M\ninst✝ : Monoid N\n⊢ ∀ (a : M × N), 1 * a = a\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : Monoid M\ninst✝ : Monoid N\n⊢ ∀ (a : M × N), a * 1 = a\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : DivisionMonoid G\ninst✝ : DivisionMonoid H\n⊢ ∀ (x : G × H), x⁻¹⁻¹ = x\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : DivisionCommMonoid G\ninst✝ : DivisionCommMonoid H\nx✝¹ x✝ : G × H\ng₁ : G\nh₁ : H\nfst✝ : G\nsnd✝ : H\n⊢ (g₁, h₁) * (fst✝, snd✝) = (fst✝, snd✝) * (g₁, h₁)\n[PROOFSTEP]\nrw [mk_mul_mk, mul_comm g₁, mul_comm h₁]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : DivisionCommMonoid G\ninst✝ : DivisionCommMonoid H\nx✝¹ x✝ : G × H\ng₁ : G\nh₁ : H\nfst✝ : G\nsnd✝ : H\n⊢ (fst✝ * g₁, snd✝ * h₁) = (fst✝, snd✝) * (g₁, h₁)\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : LeftCancelMonoid M\ninst✝ : LeftCancelMonoid N\n⊢ ∀ (a : M × N), 1 * a = a\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : LeftCancelMonoid M\ninst✝ : LeftCancelMonoid N\n⊢ ∀ (a : M × N), a * 1 = a\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : RightCancelMonoid M\ninst✝ : RightCancelMonoid N\n⊢ ∀ (a : M × N), 1 * a = a\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : RightCancelMonoid M\ninst✝ : RightCancelMonoid N\n⊢ ∀ (a : M × N), a * 1 = a\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : CancelMonoid M\ninst✝ : CancelMonoid N\n⊢ ∀ (a b c : M × N), a * b = c * b → a = c\n[PROOFSTEP]\nsimp only [mul_left_inj, imp_self, forall_const]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : CommMonoid M\ninst✝ : CommMonoid N\nx✝¹ x✝ : M × N\nm₁ : M\nn₁ : N\nfst✝ : M\nsnd✝ : N\n⊢ (m₁, n₁) * (fst✝, snd✝) = (fst✝, snd✝) * (m₁, n₁)\n[PROOFSTEP]\nrw [mk_mul_mk, mk_mul_mk, mul_comm m₁, mul_comm n₁]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : CancelCommMonoid M\ninst✝ : CancelCommMonoid N\nx✝¹ x✝ : M × N\nm₁ : M\nn₁ : N\nfst✝ : M\nsnd✝ : N\n⊢ (m₁, n₁) * (fst✝, snd✝) = (fst✝, snd✝) * (m₁, n₁)\n[PROOFSTEP]\nrw [mk_mul_mk, mk_mul_mk, mul_comm m₁, mul_comm n₁]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : MulZeroOneClass M\ninst✝ : MulZeroOneClass N\n⊢ ∀ (a : M × N), 0 * a = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : MulZeroOneClass M\ninst✝ : MulZeroOneClass N\n⊢ ∀ (a : M × N), a * 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : MonoidWithZero M\ninst✝ : MonoidWithZero N\n⊢ ∀ (a : M × N), 0 * a = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : MonoidWithZero M\ninst✝ : MonoidWithZero N\n⊢ ∀ (a : M × N), a * 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : CommMonoidWithZero M\ninst✝ : CommMonoidWithZero N\n⊢ ∀ (a : M × N), 0 * a = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : CommMonoidWithZero M\ninst✝ : CommMonoidWithZero N\n⊢ ∀ (a : M × N), a * 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : CommGroup G\ninst✝ : CommGroup H\nx✝¹ x✝ : G × H\ng₁ : G\nh₁ : H\nfst✝ : G\nsnd✝ : H\n⊢ (g₁, h₁) * (fst✝, snd✝) = (fst✝, snd✝) * (g₁, h₁)\n[PROOFSTEP]\nrw [mk_mul_mk, mk_mul_mk, mul_comm g₁, mul_comm h₁]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝² : Mul M\ninst✝¹ : Mul N\ninst✝ : Mul P\nf : M →ₙ* N × P\nx : M\n⊢ ↑(MulHom.prod (comp (fst N P) f) (comp (snd N P) f)) x = ↑f x\n[PROOFSTEP]\nsimp only [prod_apply, coe_fst, coe_snd, comp_apply, Prod.mk.eta]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝³ : Mul M\ninst✝² : Mul N\ninst✝¹ : CommSemigroup P\nf✝ : M →ₙ* P\ng✝ : N →ₙ* P\nQ : Type u_8\ninst✝ : CommSemigroup Q\nh : P →ₙ* Q\nf : M →ₙ* P\ng : N →ₙ* P\nx : M × N\n⊢ ↑(comp h (coprod f g)) x = ↑(coprod (comp h f) (comp h g)) x\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : MulOneClass P\nf : M →* N × P\nx : M\n⊢ ↑(MonoidHom.prod (comp (fst N P) f) (comp (snd N P) f)) x = ↑f x\n[PROOFSTEP]\nsimp only [prod_apply, coe_fst, coe_snd, comp_apply, Prod.mk.eta]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : CommMonoid P\nf : M →* P\ng : N →* P\nx : M\n⊢ ↑(comp (coprod f g) (inl M N)) x = ↑f x\n[PROOFSTEP]\nsimp [coprod_apply]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : CommMonoid P\nf : M →* P\ng : N →* P\nx : N\n⊢ ↑(comp (coprod f g) (inr M N)) x = ↑g x\n[PROOFSTEP]\nsimp [coprod_apply]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝² : MulOneClass M\ninst✝¹ : MulOneClass N\ninst✝ : CommMonoid P\nf✝ : M →* P\ng : N →* P\nf : M × N →* P\nx : M × N\n⊢ ↑(coprod (comp f (inl M N)) (comp f (inr M N))) x = ↑f x\n[PROOFSTEP]\nsimp [coprod_apply, inl_apply, inr_apply, ← map_mul]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝³ : MulOneClass M\ninst✝² : MulOneClass N\ninst✝¹ : CommMonoid P\nf✝ : M →* P\ng✝ : N →* P\nQ : Type u_8\ninst✝ : CommMonoid Q\nh : P →* Q\nf : M →* P\ng : N →* P\nx : M × N\n⊢ ↑(comp h (coprod f g)) x = ↑(coprod (comp h f) (comp h g)) x\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : Monoid M\ninst✝ : Monoid N\nu : Mˣ × Nˣ\n⊢ (↑u.fst, ↑u.snd) * (↑u.fst⁻¹, ↑u.snd⁻¹) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : Monoid M\ninst✝ : Monoid N\nu : Mˣ × Nˣ\n⊢ (↑u.fst⁻¹, ↑u.snd⁻¹) * (↑u.fst, ↑u.snd) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : Monoid M\ninst✝ : Monoid N\nu : (M × N)ˣ\n⊢ (fun u =>\n        { val := (↑u.fst, ↑u.snd), inv := (↑u.fst⁻¹, ↑u.snd⁻¹),\n          val_inv := (_ : (↑u.fst * ↑u.fst⁻¹, ↑u.snd * ↑u.snd⁻¹) = 1),\n          inv_val := (_ : (↑u.fst⁻¹ * ↑u.fst, ↑u.snd⁻¹ * ↑u.snd) = 1) })\n      (↑(MonoidHom.prod (Units.map (MonoidHom.fst M N)) (Units.map (MonoidHom.snd M N))) u) =\n    u\n[PROOFSTEP]\nsimp only [MonoidHom.prod_apply, Units.coe_map, MonoidHom.coe_fst, MonoidHom.coe_snd, Prod.mk.eta, Units.coe_map_inv,\n  Units.mk_val]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : Monoid M\ninst✝ : Monoid N\nx✝ : Mˣ × Nˣ\nu₁ : Mˣ\nu₂ : Nˣ\n⊢ ↑(MonoidHom.prod (Units.map (MonoidHom.fst M N)) (Units.map (MonoidHom.snd M N)))\n      ((fun u =>\n          { val := (↑u.fst, ↑u.snd), inv := (↑u.fst⁻¹, ↑u.snd⁻¹),\n            val_inv := (_ : (↑u.fst * ↑u.fst⁻¹, ↑u.snd * ↑u.snd⁻¹) = 1),\n            inv_val := (_ : (↑u.fst⁻¹ * ↑u.fst, ↑u.snd⁻¹ * ↑u.snd) = 1) })\n        (u₁, u₂)) =\n    (u₁, u₂)\n[PROOFSTEP]\nsimp only [Units.map, MonoidHom.coe_fst, Units.inv_eq_val_inv, MonoidHom.coe_snd, MonoidHom.prod_apply, Prod.mk.injEq]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\ninst✝¹ : Monoid M\ninst✝ : Monoid N\nx✝ : Mˣ × Nˣ\nu₁ : Mˣ\nu₂ : Nˣ\n⊢ ↑(MonoidHom.mk'\n            (fun u =>\n              { val := (↑u).fst, inv := (↑u⁻¹).fst, val_inv := (_ : (↑u).fst * (↑u⁻¹).fst = 1),\n                inv_val := (_ : (↑u⁻¹).fst * (↑u).fst = 1) })\n            (_ :\n              ∀ (a b : (M × N)ˣ),\n                (fun u =>\n                      { val := (↑u).fst, inv := (↑u⁻¹).fst, val_inv := (_ : (↑u).fst * (↑u⁻¹).fst = 1),\n                        inv_val := (_ : (↑u⁻¹).fst * (↑u).fst = 1) })\n                    (a * b) =\n                  (fun u =>\n                        { val := (↑u).fst, inv := (↑u⁻¹).fst, val_inv := (_ : (↑u).fst * (↑u⁻¹).fst = 1),\n                          inv_val := (_ : (↑u⁻¹).fst * (↑u).fst = 1) })\n                      a *\n                    (fun u =>\n                        { val := (↑u).fst, inv := (↑u⁻¹).fst, val_inv := (_ : (↑u).fst * (↑u⁻¹).fst = 1),\n                          inv_val := (_ : (↑u⁻¹).fst * (↑u).fst = 1) })\n                      b))\n        { val := (↑u₁, ↑u₂), inv := (↑u₁⁻¹, ↑u₂⁻¹),\n          val_inv := (_ : (↑(u₁, u₂).fst * ↑(u₁, u₂).fst⁻¹, ↑(u₁, u₂).snd * ↑(u₁, u₂).snd⁻¹) = 1),\n          inv_val := (_ : (↑(u₁, u₂).fst⁻¹ * ↑(u₁, u₂).fst, ↑(u₁, u₂).snd⁻¹ * ↑(u₁, u₂).snd) = 1) } =\n      u₁ ∧\n    ↑(MonoidHom.mk'\n            (fun u =>\n              { val := (↑u).snd, inv := (↑u⁻¹).snd, val_inv := (_ : (↑u).snd * (↑u⁻¹).snd = 1),\n                inv_val := (_ : (↑u⁻¹).snd * (↑u).snd = 1) })\n            (_ :\n              ∀ (a b : (M × N)ˣ),\n                (fun u =>\n                      { val := (↑u).snd, inv := (↑u⁻¹).snd, val_inv := (_ : (↑u).snd * (↑u⁻¹).snd = 1),\n                        inv_val := (_ : (↑u⁻¹).snd * (↑u).snd = 1) })\n                    (a * b) =\n                  (fun u =>\n                        { val := (↑u).snd, inv := (↑u⁻¹).snd, val_inv := (_ : (↑u).snd * (↑u⁻¹).snd = 1),\n                          inv_val := (_ : (↑u⁻¹).snd * (↑u).snd = 1) })\n                      a *\n                    (fun u =>\n                        { val := (↑u).snd, inv := (↑u⁻¹).snd, val_inv := (_ : (↑u).snd * (↑u⁻¹).snd = 1),\n                          inv_val := (_ : (↑u⁻¹).snd * (↑u).snd = 1) })\n                      b))\n        { val := (↑u₁, ↑u₂), inv := (↑u₁⁻¹, ↑u₂⁻¹),\n          val_inv := (_ : (↑(u₁, u₂).fst * ↑(u₁, u₂).fst⁻¹, ↑(u₁, u₂).snd * ↑(u₁, u₂).snd⁻¹) = 1),\n          inv_val := (_ : (↑(u₁, u₂).fst⁻¹ * ↑(u₁, u₂).fst, ↑(u₁, u₂).snd⁻¹ * ↑(u₁, u₂).snd) = 1) } =\n      u₂\n[PROOFSTEP]\nexact ⟨rfl, rfl⟩\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nα : Type u_8\ninst✝ : Monoid α\n⊢ (fun x => (↑x, op ↑x⁻¹)) 1 = 1\n[PROOFSTEP]\nsimp only [inv_one, eq_self_iff_true, Units.val_one, op_one, Prod.mk_eq_one, and_self_iff]\n[GOAL]\nA : Type u_1\nB : Type u_2\nG : Type u_3\nH : Type u_4\nM : Type u_5\nN : Type u_6\nP : Type u_7\nα : Type u_8\ninst✝ : Monoid α\nx y : αˣ\n⊢ OneHom.toFun { toFun := fun x => (↑x, op ↑x⁻¹), map_one' := (_ : (1, op ↑1⁻¹) = 1) } (x * y) =\n    OneHom.toFun { toFun := fun x => (↑x, op ↑x⁻¹), map_one' := (_ : (1, op ↑1⁻¹) = 1) } x *\n      OneHom.toFun { toFun := fun x => (↑x, op ↑x⁻¹), map_one' := (_ : (1, op ↑1⁻¹) = 1) } y\n[PROOFSTEP]\nsimp only [mul_inv_rev, op_mul, Units.val_mul, Prod.mk_mul_mk]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Group.Prod", "llama_tokens": 6688, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6334102498375401, "lm_q2_score": 0.588889130767832, "lm_q1q2_score": 0.3730084114462643}}
{"text": "[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : SeminormedAddCommGroup E\nl : Filter ι\nf : ι → α → E\ng : α → E\n⊢ TendstoInMeasure μ f l g ↔ ∀ (ε : ℝ), 0 < ε → Tendsto (fun i => ↑↑μ {x | ε ≤ ‖f i x - g x‖}) l (𝓝 0)\n[PROOFSTEP]\nsimp_rw [TendstoInMeasure, dist_eq_norm]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : Dist E\nl : Filter ι\nf f' : ι → α → E\ng g' : α → E\nh_left : ∀ᶠ (i : ι) in l, f i =ᵐ[μ] f' i\nh_right : g =ᵐ[μ] g'\nh_tendsto : TendstoInMeasure μ f l g\n⊢ TendstoInMeasure μ f' l g'\n[PROOFSTEP]\nintro ε hε\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : Dist E\nl : Filter ι\nf f' : ι → α → E\ng g' : α → E\nh_left : ∀ᶠ (i : ι) in l, f i =ᵐ[μ] f' i\nh_right : g =ᵐ[μ] g'\nh_tendsto : TendstoInMeasure μ f l g\nε : ℝ\nhε : 0 < ε\n⊢ Tendsto (fun i => ↑↑μ {x | ε ≤ dist (f' i x) (g' x)}) l (𝓝 0)\n[PROOFSTEP]\nsuffices (fun i => μ {x | ε ≤ dist (f' i x) (g' x)}) =ᶠ[l] fun i => μ {x | ε ≤ dist (f i x) (g x)}\n  by\n  rw [tendsto_congr' this]\n  exact h_tendsto ε hε\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : Dist E\nl : Filter ι\nf f' : ι → α → E\ng g' : α → E\nh_left : ∀ᶠ (i : ι) in l, f i =ᵐ[μ] f' i\nh_right : g =ᵐ[μ] g'\nh_tendsto : TendstoInMeasure μ f l g\nε : ℝ\nhε : 0 < ε\nthis : (fun i => ↑↑μ {x | ε ≤ dist (f' i x) (g' x)}) =ᶠ[l] fun i => ↑↑μ {x | ε ≤ dist (f i x) (g x)}\n⊢ Tendsto (fun i => ↑↑μ {x | ε ≤ dist (f' i x) (g' x)}) l (𝓝 0)\n[PROOFSTEP]\nrw [tendsto_congr' this]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : Dist E\nl : Filter ι\nf f' : ι → α → E\ng g' : α → E\nh_left : ∀ᶠ (i : ι) in l, f i =ᵐ[μ] f' i\nh_right : g =ᵐ[μ] g'\nh_tendsto : TendstoInMeasure μ f l g\nε : ℝ\nhε : 0 < ε\nthis : (fun i => ↑↑μ {x | ε ≤ dist (f' i x) (g' x)}) =ᶠ[l] fun i => ↑↑μ {x | ε ≤ dist (f i x) (g x)}\n⊢ Tendsto (fun i => ↑↑μ {x | ε ≤ dist (f i x) (g x)}) l (𝓝 0)\n[PROOFSTEP]\nexact h_tendsto ε hε\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : Dist E\nl : Filter ι\nf f' : ι → α → E\ng g' : α → E\nh_left : ∀ᶠ (i : ι) in l, f i =ᵐ[μ] f' i\nh_right : g =ᵐ[μ] g'\nh_tendsto : TendstoInMeasure μ f l g\nε : ℝ\nhε : 0 < ε\n⊢ (fun i => ↑↑μ {x | ε ≤ dist (f' i x) (g' x)}) =ᶠ[l] fun i => ↑↑μ {x | ε ≤ dist (f i x) (g x)}\n[PROOFSTEP]\nfilter_upwards [h_left] with i h_ae_eq\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : Dist E\nl : Filter ι\nf f' : ι → α → E\ng g' : α → E\nh_left : ∀ᶠ (i : ι) in l, f i =ᵐ[μ] f' i\nh_right : g =ᵐ[μ] g'\nh_tendsto : TendstoInMeasure μ f l g\nε : ℝ\nhε : 0 < ε\ni : ι\nh_ae_eq : f i =ᵐ[μ] f' i\n⊢ ↑↑μ {x | ε ≤ dist (f' i x) (g' x)} = ↑↑μ {x | ε ≤ dist (f i x) (g x)}\n[PROOFSTEP]\nrefine' measure_congr _\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : Dist E\nl : Filter ι\nf f' : ι → α → E\ng g' : α → E\nh_left : ∀ᶠ (i : ι) in l, f i =ᵐ[μ] f' i\nh_right : g =ᵐ[μ] g'\nh_tendsto : TendstoInMeasure μ f l g\nε : ℝ\nhε : 0 < ε\ni : ι\nh_ae_eq : f i =ᵐ[μ] f' i\n⊢ {x | ε ≤ dist (f' i x) (g' x)} =ᵐ[μ] {x | ε ≤ dist (f i x) (g x)}\n[PROOFSTEP]\nfilter_upwards [h_ae_eq, h_right] with x hxf hxg\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : Dist E\nl : Filter ι\nf f' : ι → α → E\ng g' : α → E\nh_left : ∀ᶠ (i : ι) in l, f i =ᵐ[μ] f' i\nh_right : g =ᵐ[μ] g'\nh_tendsto : TendstoInMeasure μ f l g\nε : ℝ\nhε : 0 < ε\ni : ι\nh_ae_eq : f i =ᵐ[μ] f' i\nx : α\nhxf : f i x = f' i x\nhxg : g x = g' x\n⊢ setOf (fun x => ε ≤ dist (f' i x) (g' x)) x = setOf (fun x => ε ≤ dist (f i x) (g x)) x\n[PROOFSTEP]\nrw [eq_iff_iff]\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : Dist E\nl : Filter ι\nf f' : ι → α → E\ng g' : α → E\nh_left : ∀ᶠ (i : ι) in l, f i =ᵐ[μ] f' i\nh_right : g =ᵐ[μ] g'\nh_tendsto : TendstoInMeasure μ f l g\nε : ℝ\nhε : 0 < ε\ni : ι\nh_ae_eq : f i =ᵐ[μ] f' i\nx : α\nhxf : f i x = f' i x\nhxg : g x = g' x\n⊢ setOf (fun x => ε ≤ dist (f' i x) (g' x)) x ↔ setOf (fun x => ε ≤ dist (f i x) (g x)) x\n[PROOFSTEP]\nchange ε ≤ dist (f' i x) (g' x) ↔ ε ≤ dist (f i x) (g x)\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : Dist E\nl : Filter ι\nf f' : ι → α → E\ng g' : α → E\nh_left : ∀ᶠ (i : ι) in l, f i =ᵐ[μ] f' i\nh_right : g =ᵐ[μ] g'\nh_tendsto : TendstoInMeasure μ f l g\nε : ℝ\nhε : 0 < ε\ni : ι\nh_ae_eq : f i =ᵐ[μ] f' i\nx : α\nhxf : f i x = f' i x\nhxg : g x = g' x\n⊢ ε ≤ dist (f' i x) (g' x) ↔ ε ≤ dist (f i x) (g x)\n[PROOFSTEP]\nrw [hxg, hxf]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\n⊢ TendstoInMeasure μ f atTop g\n[PROOFSTEP]\nrefine' fun ε hε => ENNReal.tendsto_atTop_zero.mpr fun δ hδ => _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0∞\nhδ : δ > 0\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ δ\n[PROOFSTEP]\nby_cases hδi : δ = ∞\n[GOAL]\ncase pos\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0∞\nhδ : δ > 0\nhδi : δ = ⊤\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ δ\n[PROOFSTEP]\nsimp only [hδi, imp_true_iff, le_top, exists_const]\n[GOAL]\ncase neg\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0∞\nhδ : δ > 0\nhδi : ¬δ = ⊤\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ δ\n[PROOFSTEP]\nlift δ to ℝ≥0 using hδi\n[GOAL]\ncase neg.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : ↑δ > 0\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ ↑δ\n[PROOFSTEP]\nrw [gt_iff_lt, ENNReal.coe_pos, ← NNReal.coe_pos] at hδ \n[GOAL]\ncase neg.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : 0 < ↑δ\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ ↑δ\n[PROOFSTEP]\nobtain ⟨t, _, ht, hunif⟩ := tendstoUniformlyOn_of_ae_tendsto' hf hg hfg hδ\n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : 0 < ↑δ\nt : Set α\nleft✝ : MeasurableSet t\nht : ↑↑μ t ≤ ENNReal.ofReal ↑δ\nhunif : TendstoUniformlyOn (fun n => f n) g atTop tᶜ\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ ↑δ\n[PROOFSTEP]\nrw [ENNReal.ofReal_coe_nnreal] at ht \n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : 0 < ↑δ\nt : Set α\nleft✝ : MeasurableSet t\nht : ↑↑μ t ≤ ↑δ\nhunif : TendstoUniformlyOn (fun n => f n) g atTop tᶜ\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ ↑δ\n[PROOFSTEP]\nrw [Metric.tendstoUniformlyOn_iff] at hunif \n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : 0 < ↑δ\nt : Set α\nleft✝ : MeasurableSet t\nht : ↑↑μ t ≤ ↑δ\nhunif : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (n : ℕ) in atTop, ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ε\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ ↑δ\n[PROOFSTEP]\nobtain ⟨N, hN⟩ := eventually_atTop.1 (hunif ε hε)\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : 0 < ↑δ\nt : Set α\nleft✝ : MeasurableSet t\nht : ↑↑μ t ≤ ↑δ\nhunif : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (n : ℕ) in atTop, ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ε\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ε\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ ↑δ\n[PROOFSTEP]\nrefine' ⟨N, fun n hn => _⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : 0 < ↑δ\nt : Set α\nleft✝ : MeasurableSet t\nht : ↑↑μ t ≤ ↑δ\nhunif : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (n : ℕ) in atTop, ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ε\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ε\nn : ℕ\nhn : n ≥ N\n⊢ ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ ↑δ\n[PROOFSTEP]\nsuffices : {x : α | ε ≤ dist (f n x) (g x)} ⊆ t\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : 0 < ↑δ\nt : Set α\nleft✝ : MeasurableSet t\nht : ↑↑μ t ≤ ↑δ\nhunif : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (n : ℕ) in atTop, ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ε\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ε\nn : ℕ\nhn : n ≥ N\nthis : {x | ε ≤ dist (f n x) (g x)} ⊆ t\n⊢ ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ ↑δ\ncase this\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : 0 < ↑δ\nt : Set α\nleft✝ : MeasurableSet t\nht : ↑↑μ t ≤ ↑δ\nhunif : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (n : ℕ) in atTop, ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ε\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ε\nn : ℕ\nhn : n ≥ N\n⊢ {x | ε ≤ dist (f n x) (g x)} ⊆ t\n[PROOFSTEP]\nexact (measure_mono this).trans ht\n[GOAL]\ncase this\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : 0 < ↑δ\nt : Set α\nleft✝ : MeasurableSet t\nht : ↑↑μ t ≤ ↑δ\nhunif : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (n : ℕ) in atTop, ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ε\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ε\nn : ℕ\nhn : n ≥ N\n⊢ {x | ε ≤ dist (f n x) (g x)} ⊆ t\n[PROOFSTEP]\nrw [← Set.compl_subset_compl]\n[GOAL]\ncase this\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : 0 < ↑δ\nt : Set α\nleft✝ : MeasurableSet t\nht : ↑↑μ t ≤ ↑δ\nhunif : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (n : ℕ) in atTop, ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ε\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ε\nn : ℕ\nhn : n ≥ N\n⊢ tᶜ ⊆ {x | ε ≤ dist (f n x) (g x)}ᶜ\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase this\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : 0 < ↑δ\nt : Set α\nleft✝ : MeasurableSet t\nht : ↑↑μ t ≤ ↑δ\nhunif : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (n : ℕ) in atTop, ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ε\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ε\nn : ℕ\nhn : n ≥ N\nx : α\nhx : x ∈ tᶜ\n⊢ x ∈ {x | ε ≤ dist (f n x) (g x)}ᶜ\n[PROOFSTEP]\nrw [Set.mem_compl_iff, Set.nmem_setOf_iff, dist_comm, not_le]\n[GOAL]\ncase this\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nε : ℝ\nhε : 0 < ε\nδ : ℝ≥0\nhδ : 0 < ↑δ\nt : Set α\nleft✝ : MeasurableSet t\nht : ↑↑μ t ≤ ↑δ\nhunif : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (n : ℕ) in atTop, ∀ (x : α), x ∈ tᶜ → dist (g x) (f n x) < ε\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ∀ (x : α), x ∈ tᶜ → dist (g x) (f b x) < ε\nn : ℕ\nhn : n ≥ N\nx : α\nhx : x ∈ tᶜ\n⊢ dist (g x) (f n x) < ε\n[PROOFSTEP]\nexact hN n hn x hx\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\n⊢ TendstoInMeasure μ f atTop g\n[PROOFSTEP]\nhave hg : AEStronglyMeasurable g μ := aestronglyMeasurable_of_tendsto_ae _ hf hfg\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nhg : AEStronglyMeasurable g μ\n⊢ TendstoInMeasure μ f atTop g\n[PROOFSTEP]\nrefine' TendstoInMeasure.congr (fun i => (hf i).ae_eq_mk.symm) hg.ae_eq_mk.symm _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nhg : AEStronglyMeasurable g μ\n⊢ TendstoInMeasure μ (fun i => AEStronglyMeasurable.mk (f i) (_ : AEStronglyMeasurable (f i) μ)) atTop\n    (AEStronglyMeasurable.mk g hg)\n[PROOFSTEP]\nrefine'\n  tendstoInMeasure_of_tendsto_ae_of_stronglyMeasurable (fun i => (hf i).stronglyMeasurable_mk) hg.stronglyMeasurable_mk\n    _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nhg : AEStronglyMeasurable g μ\n⊢ ∀ᵐ (x : α) ∂μ,\n    Tendsto (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) atTop\n      (𝓝 (AEStronglyMeasurable.mk g hg x))\n[PROOFSTEP]\nhave hf_eq_ae : ∀ᵐ x ∂μ, ∀ n, (hf n).mk (f n) x = f n x := ae_all_iff.mpr fun n => (hf n).ae_eq_mk.symm\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nhg : AEStronglyMeasurable g μ\nhf_eq_ae : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x = f n x\n⊢ ∀ᵐ (x : α) ∂μ,\n    Tendsto (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) atTop\n      (𝓝 (AEStronglyMeasurable.mk g hg x))\n[PROOFSTEP]\nfilter_upwards [hf_eq_ae, hg.ae_eq_mk, hfg] with x hxf hxg hxfg\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nhg : AEStronglyMeasurable g μ\nhf_eq_ae : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x = f n x\nx : α\nhxf : ∀ (n : ℕ), AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x = f n x\nhxg : g x = AEStronglyMeasurable.mk g hg x\nhxfg : Tendsto (fun n => f n x) atTop (𝓝 (g x))\n⊢ Tendsto (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) atTop\n    (𝓝 (AEStronglyMeasurable.mk g hg x))\n[PROOFSTEP]\nrw [← hxg, funext fun n => hxf n]\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : MetricSpace E\nf : ℕ → α → E\ng : α → E\ninst✝ : IsFiniteMeasure μ\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nhfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nhg : AEStronglyMeasurable g μ\nhf_eq_ae : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x = f n x\nx : α\nhxf : ∀ (n : ℕ), AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x = f n x\nhxg : g x = AEStronglyMeasurable.mk g hg x\nhxfg : Tendsto (fun n => f n x) atTop (𝓝 (g x))\n⊢ Tendsto (fun n => f n x) atTop (𝓝 (g x))\n[PROOFSTEP]\nexact hxfg\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nn : ℕ\n⊢ ∃ N, ∀ (m_1 : ℕ), m_1 ≥ N → ↑↑μ {x | 2⁻¹ ^ n ≤ dist (f m_1 x) (g x)} ≤ 2⁻¹ ^ n\n[PROOFSTEP]\nspecialize hfg ((2⁻¹ : ℝ) ^ n) (by simp only [Real.rpow_nat_cast, inv_pos, zero_lt_two, pow_pos])\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nn : ℕ\n⊢ 0 < 2⁻¹ ^ n\n[PROOFSTEP]\nsimp only [Real.rpow_nat_cast, inv_pos, zero_lt_two, pow_pos]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nn : ℕ\nhfg : Tendsto (fun i => ↑↑μ {x | 2⁻¹ ^ n ≤ dist (f i x) (g x)}) atTop (𝓝 0)\n⊢ ∃ N, ∀ (m_1 : ℕ), m_1 ≥ N → ↑↑μ {x | 2⁻¹ ^ n ≤ dist (f m_1 x) (g x)} ≤ 2⁻¹ ^ n\n[PROOFSTEP]\nrw [ENNReal.tendsto_atTop_zero] at hfg \n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nn : ℕ\nhfg : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n_1 : ℕ), n_1 ≥ N → ↑↑μ {x | 2⁻¹ ^ n ≤ dist (f n_1 x) (g x)} ≤ ε\n⊢ ∃ N, ∀ (m_1 : ℕ), m_1 ≥ N → ↑↑μ {x | 2⁻¹ ^ n ≤ dist (f m_1 x) (g x)} ≤ 2⁻¹ ^ n\n[PROOFSTEP]\nexact hfg ((2 : ℝ≥0∞)⁻¹ ^ n) (pos_iff_ne_zero.mpr fun h_zero => by simpa using pow_eq_zero h_zero)\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nn : ℕ\nhfg : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n_1 : ℕ), n_1 ≥ N → ↑↑μ {x | 2⁻¹ ^ n ≤ dist (f n_1 x) (g x)} ≤ ε\nh_zero : 2⁻¹ ^ n = 0\n⊢ False\n[PROOFSTEP]\nsimpa using pow_eq_zero h_zero\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nn : ℕ\n⊢ seqTendstoAeSeq hfg (n + 1) = max (seqTendstoAeSeqAux hfg (n + 1)) (seqTendstoAeSeq hfg n + 1)\n[PROOFSTEP]\nrw [seqTendstoAeSeq]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nn k : ℕ\nhn : seqTendstoAeSeq hfg n ≤ k\n⊢ ↑↑μ {x | 2⁻¹ ^ n ≤ dist (f k x) (g x)} ≤ 2⁻¹ ^ n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nk : ℕ\nhn : seqTendstoAeSeq hfg Nat.zero ≤ k\n⊢ ↑↑μ {x | 2⁻¹ ^ Nat.zero ≤ dist (f k x) (g x)} ≤ 2⁻¹ ^ Nat.zero\n[PROOFSTEP]\nexact Classical.choose_spec (exists_nat_measure_lt_two_inv hfg 0) k hn\n[GOAL]\ncase succ\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nk n✝ : ℕ\nhn : seqTendstoAeSeq hfg (Nat.succ n✝) ≤ k\n⊢ ↑↑μ {x | 2⁻¹ ^ Nat.succ n✝ ≤ dist (f k x) (g x)} ≤ 2⁻¹ ^ Nat.succ n✝\n[PROOFSTEP]\nexact Classical.choose_spec (exists_nat_measure_lt_two_inv hfg _) _ (le_trans (le_max_left _ _) hn)\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\n⊢ StrictMono (seqTendstoAeSeq hfg)\n[PROOFSTEP]\nrefine' strictMono_nat_of_lt_succ fun n => _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nn : ℕ\n⊢ seqTendstoAeSeq hfg n < seqTendstoAeSeq hfg (n + 1)\n[PROOFSTEP]\nrw [seqTendstoAeSeq_succ]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nn : ℕ\n⊢ seqTendstoAeSeq hfg n < max (seqTendstoAeSeqAux hfg (n + 1)) (seqTendstoAeSeq hfg n + 1)\n[PROOFSTEP]\nexact lt_of_lt_of_le (lt_add_one <| seqTendstoAeSeq hfg n) (le_max_right _ _)\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\n⊢ ∃ ns, StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nhave h_lt_ε_real : ∀ (ε : ℝ) (_ : 0 < ε), ∃ k : ℕ, 2 * (2 : ℝ)⁻¹ ^ k < ε :=\n  by\n  intro ε hε\n  obtain ⟨k, h_k⟩ : ∃ k : ℕ, (2 : ℝ)⁻¹ ^ k < ε := exists_pow_lt_of_lt_one hε (by norm_num)\n  refine' ⟨k + 1, (le_of_eq _).trans_lt h_k⟩\n  rw [pow_add]; ring\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\n⊢ ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\n[PROOFSTEP]\nintro ε hε\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nε : ℝ\nhε : 0 < ε\n⊢ ∃ k, 2 * 2⁻¹ ^ k < ε\n[PROOFSTEP]\nobtain ⟨k, h_k⟩ : ∃ k : ℕ, (2 : ℝ)⁻¹ ^ k < ε := exists_pow_lt_of_lt_one hε (by norm_num)\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nε : ℝ\nhε : 0 < ε\n⊢ 2⁻¹ < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nε : ℝ\nhε : 0 < ε\nk : ℕ\nh_k : 2⁻¹ ^ k < ε\n⊢ ∃ k, 2 * 2⁻¹ ^ k < ε\n[PROOFSTEP]\nrefine' ⟨k + 1, (le_of_eq _).trans_lt h_k⟩\n[GOAL]\ncase intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nε : ℝ\nhε : 0 < ε\nk : ℕ\nh_k : 2⁻¹ ^ k < ε\n⊢ 2 * 2⁻¹ ^ (k + 1) = 2⁻¹ ^ k\n[PROOFSTEP]\nrw [pow_add]\n[GOAL]\ncase intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nε : ℝ\nhε : 0 < ε\nk : ℕ\nh_k : 2⁻¹ ^ k < ε\n⊢ 2 * (2⁻¹ ^ k * 2⁻¹ ^ 1) = 2⁻¹ ^ k\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\n⊢ ∃ ns, StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nset ns := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\n⊢ ∃ ns, StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nuse ns\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\n⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nlet S := fun k => {x | (2 : ℝ)⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\n⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nhave hμS_le : ∀ k, μ (S k) ≤ (2 : ℝ≥0∞)⁻¹ ^ k := by\n  intro k\n  have := ExistsSeqTendstoAe.seqTendstoAeSeq_spec hfg k (ns k) le_rfl\n  convert this\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\n⊢ ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\n[PROOFSTEP]\nintro k\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nk : ℕ\n⊢ ↑↑μ (S k) ≤ 2⁻¹ ^ k\n[PROOFSTEP]\nhave := ExistsSeqTendstoAe.seqTendstoAeSeq_spec hfg k (ns k) le_rfl\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nk : ℕ\nthis : ↑↑μ {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)} ≤ 2⁻¹ ^ k\n⊢ ↑↑μ (S k) ≤ 2⁻¹ ^ k\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\n⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nset s := Filter.atTop.limsup S with hs\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\n⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nhave hμs : μ s = 0 :=\n  by\n  refine' measure_limsup_eq_zero (ne_of_lt <| lt_of_le_of_lt (ENNReal.tsum_le_tsum hμS_le) _)\n  simp only [ENNReal.tsum_geometric, ENNReal.one_sub_inv_two, inv_inv]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\n⊢ ↑↑μ s = 0\n[PROOFSTEP]\nrefine' measure_limsup_eq_zero (ne_of_lt <| lt_of_le_of_lt (ENNReal.tsum_le_tsum hμS_le) _)\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\n⊢ ∑' (a : ℕ), 2⁻¹ ^ a < ⊤\n[PROOFSTEP]\nsimp only [ENNReal.tsum_geometric, ENNReal.one_sub_inv_two, inv_inv]\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\n⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nhave h_tendsto : ∀ x ∈ sᶜ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x)) :=\n  by\n  refine' fun x hx => Metric.tendsto_atTop.mpr fun ε hε => _\n  rw [hs, limsup_eq_iInf_iSup_of_nat] at hx \n  simp only [Set.iSup_eq_iUnion, Set.iInf_eq_iInter, Set.compl_iInter, Set.compl_iUnion, Set.mem_iUnion, Set.mem_iInter,\n    Set.mem_compl_iff, Set.mem_setOf_eq, not_le] at hx \n  obtain ⟨N, hNx⟩ := hx\n  obtain ⟨k, hk_lt_ε⟩ := h_lt_ε_real ε hε\n  refine' ⟨max N (k - 1), fun n hn_ge => lt_of_le_of_lt _ hk_lt_ε⟩\n  specialize hNx n ((le_max_left _ _).trans hn_ge)\n  have h_inv_n_le_k : (2 : ℝ)⁻¹ ^ n ≤ 2 * (2 : ℝ)⁻¹ ^ k :=\n    by\n    rw [mul_comm, ← inv_mul_le_iff' (zero_lt_two' ℝ)]\n    conv_lhs =>\n      congr\n      rw [← pow_one (2 : ℝ)⁻¹]\n    rw [← pow_add, add_comm]\n    exact\n      pow_le_pow_of_le_one (one_div (2 : ℝ) ▸ one_half_pos.le) (inv_le_one one_le_two)\n        ((le_tsub_add.trans (add_le_add_right (le_max_right _ _) 1)).trans (add_le_add_right hn_ge 1))\n  exact le_trans hNx.le h_inv_n_le_k\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\n⊢ ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nrefine' fun x hx => Metric.tendsto_atTop.mpr fun ε hε => _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nhx : x ∈ sᶜ\nε : ℝ\nhε : ε > 0\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε\n[PROOFSTEP]\nrw [hs, limsup_eq_iInf_iSup_of_nat] at hx \n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nhx : x ∈ (⨅ (n : ℕ), ⨆ (i : ℕ) (_ : i ≥ n), S i)ᶜ\nε : ℝ\nhε : ε > 0\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε\n[PROOFSTEP]\nsimp only [Set.iSup_eq_iUnion, Set.iInf_eq_iInter, Set.compl_iInter, Set.compl_iUnion, Set.mem_iUnion, Set.mem_iInter,\n  Set.mem_compl_iff, Set.mem_setOf_eq, not_le] at hx \n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nhx : ∃ i, ∀ (i_1 : ℕ), i_1 ≥ i → dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg i_1) x) (g x) < 2⁻¹ ^ i_1\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε\n[PROOFSTEP]\nobtain ⟨N, hNx⟩ := hx\n[GOAL]\ncase intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN : ℕ\nhNx : ∀ (i : ℕ), i ≥ N → dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg i) x) (g x) < 2⁻¹ ^ i\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε\n[PROOFSTEP]\nobtain ⟨k, hk_lt_ε⟩ := h_lt_ε_real ε hε\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN : ℕ\nhNx : ∀ (i : ℕ), i ≥ N → dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg i) x) (g x) < 2⁻¹ ^ i\nk : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε\n[PROOFSTEP]\nrefine' ⟨max N (k - 1), fun n hn_ge => lt_of_le_of_lt _ hk_lt_ε⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN : ℕ\nhNx : ∀ (i : ℕ), i ≥ N → dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg i) x) (g x) < 2⁻¹ ^ i\nk : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\nn : ℕ\nhn_ge : n ≥ max N (k - 1)\n⊢ dist (f (ns n) x) (g x) ≤ 2 * 2⁻¹ ^ k\n[PROOFSTEP]\nspecialize hNx n ((le_max_left _ _).trans hn_ge)\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN k : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\nn : ℕ\nhn_ge : n ≥ max N (k - 1)\nhNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n\n⊢ dist (f (ns n) x) (g x) ≤ 2 * 2⁻¹ ^ k\n[PROOFSTEP]\nhave h_inv_n_le_k : (2 : ℝ)⁻¹ ^ n ≤ 2 * (2 : ℝ)⁻¹ ^ k :=\n  by\n  rw [mul_comm, ← inv_mul_le_iff' (zero_lt_two' ℝ)]\n  conv_lhs =>\n    congr\n    rw [← pow_one (2 : ℝ)⁻¹]\n  rw [← pow_add, add_comm]\n  exact\n    pow_le_pow_of_le_one (one_div (2 : ℝ) ▸ one_half_pos.le) (inv_le_one one_le_two)\n      ((le_tsub_add.trans (add_le_add_right (le_max_right _ _) 1)).trans (add_le_add_right hn_ge 1))\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN k : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\nn : ℕ\nhn_ge : n ≥ max N (k - 1)\nhNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n\n⊢ 2⁻¹ ^ n ≤ 2 * 2⁻¹ ^ k\n[PROOFSTEP]\nrw [mul_comm, ← inv_mul_le_iff' (zero_lt_two' ℝ)]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN k : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\nn : ℕ\nhn_ge : n ≥ max N (k - 1)\nhNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n\n⊢ 2⁻¹ * 2⁻¹ ^ n ≤ 2⁻¹ ^ k\n[PROOFSTEP]\nconv_lhs =>\n  congr\n  rw [← pow_one (2 : ℝ)⁻¹]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN k : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\nn : ℕ\nhn_ge : n ≥ max N (k - 1)\nhNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n\n| 2⁻¹ * 2⁻¹ ^ n\n[PROOFSTEP]\n  congr\n  rw [← pow_one (2 : ℝ)⁻¹]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN k : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\nn : ℕ\nhn_ge : n ≥ max N (k - 1)\nhNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n\n| 2⁻¹ * 2⁻¹ ^ n\n[PROOFSTEP]\n  congr\n  rw [← pow_one (2 : ℝ)⁻¹]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN k : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\nn : ℕ\nhn_ge : n ≥ max N (k - 1)\nhNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n\n| 2⁻¹ * 2⁻¹ ^ n\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN k : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\nn : ℕ\nhn_ge : n ≥ max N (k - 1)\nhNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n\n| 2⁻¹\ncase a\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN k : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\nn : ℕ\nhn_ge : n ≥ max N (k - 1)\nhNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n\n| 2⁻¹ ^ n\n[PROOFSTEP]\nrw [← pow_one (2 : ℝ)⁻¹]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN k : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\nn : ℕ\nhn_ge : n ≥ max N (k - 1)\nhNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n\n⊢ 2⁻¹ ^ 1 * 2⁻¹ ^ n ≤ 2⁻¹ ^ k\n[PROOFSTEP]\nrw [← pow_add, add_comm]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN k : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\nn : ℕ\nhn_ge : n ≥ max N (k - 1)\nhNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n\n⊢ 2⁻¹ ^ (n + 1) ≤ 2⁻¹ ^ k\n[PROOFSTEP]\nexact\n  pow_le_pow_of_le_one (one_div (2 : ℝ) ▸ one_half_pos.le) (inv_le_one one_le_two)\n    ((le_tsub_add.trans (add_le_add_right (le_max_right _ _) 1)).trans (add_le_add_right hn_ge 1))\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nx : α\nε : ℝ\nhε : ε > 0\nN k : ℕ\nhk_lt_ε : 2 * 2⁻¹ ^ k < ε\nn : ℕ\nhn_ge : n ≥ max N (k - 1)\nhNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n\nh_inv_n_le_k : 2⁻¹ ^ n ≤ 2 * 2⁻¹ ^ k\n⊢ dist (f (ns n) x) (g x) ≤ 2 * 2⁻¹ ^ k\n[PROOFSTEP]\nexact le_trans hNx.le h_inv_n_le_k\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nh_tendsto : ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nrw [ae_iff]\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nh_tendsto : ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n⊢ StrictMono ns ∧ ↑↑μ {a | ¬Tendsto (fun i => f (ns i) a) atTop (𝓝 (g a))} = 0\n[PROOFSTEP]\nrefine' ⟨ExistsSeqTendstoAe.seqTendstoAeSeq_strictMono hfg, measure_mono_null (fun x => _) hμs⟩\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nh_tendsto : ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\nx : α\n⊢ x ∈ {a | ¬Tendsto (fun i => f (ns i) a) atTop (𝓝 (g a))} → x ∈ s\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, ← @Classical.not_not (x ∈ s), not_imp_not]\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : MetricSpace E\nf : ℕ → α → E\ng : α → E\nhfg : TendstoInMeasure μ f atTop g\nh_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε\nns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg\nS : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}\nhμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k\ns : Set α := limsup S atTop\nhs : s = limsup S atTop\nhμs : ↑↑μ s = 0\nh_tendsto : ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\nx : α\n⊢ ¬x ∈ s → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nexact h_tendsto x\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : MetricSpace E\nf✝ : ℕ → α → E\ng✝ : α → E\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → E\ng : α → E\nhfg : TendstoInMeasure μ f u g\n⊢ ∃ ns, TendstoInMeasure μ (fun n => f (ns n)) atTop g\n[PROOFSTEP]\nobtain ⟨ns, h_tendsto_ns⟩ : ∃ ns : ℕ → ι, Tendsto ns atTop u := exists_seq_tendsto u\n[GOAL]\ncase intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : MetricSpace E\nf✝ : ℕ → α → E\ng✝ : α → E\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → E\ng : α → E\nhfg : TendstoInMeasure μ f u g\nns : ℕ → ι\nh_tendsto_ns : Tendsto ns atTop u\n⊢ ∃ ns, TendstoInMeasure μ (fun n => f (ns n)) atTop g\n[PROOFSTEP]\nexact ⟨ns, fun ε hε => (hfg ε hε).comp h_tendsto_ns⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : MetricSpace E\nf✝ : ℕ → α → E\ng✝ : α → E\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → E\ng : α → E\nhfg : TendstoInMeasure μ f u g\n⊢ ∃ ns, ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nobtain ⟨ms, hms⟩ := hfg.exists_seq_tendstoInMeasure_atTop\n[GOAL]\ncase intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : MetricSpace E\nf✝ : ℕ → α → E\ng✝ : α → E\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → E\ng : α → E\nhfg : TendstoInMeasure μ f u g\nms : ℕ → ι\nhms : TendstoInMeasure μ (fun n => f (ms n)) atTop g\n⊢ ∃ ns, ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nobtain ⟨ns, -, hns⟩ := hms.exists_seq_tendsto_ae\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : MetricSpace E\nf✝ : ℕ → α → E\ng✝ : α → E\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → E\ng : α → E\nhfg : TendstoInMeasure μ f u g\nms : ℕ → ι\nhms : TendstoInMeasure μ (fun n => f (ms n)) atTop g\nns : ℕ → ℕ\nhns : ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ms (ns i)) x) atTop (𝓝 (g x))\n⊢ ∃ ns, ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n[PROOFSTEP]\nexact ⟨ms ∘ ns, hns⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : BorelSpace E\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → E\ng : α → E\nhf : ∀ (n : ι), AEMeasurable (f n)\nh_tendsto : TendstoInMeasure μ f u g\n⊢ AEMeasurable g\n[PROOFSTEP]\nobtain ⟨ns, hns⟩ := h_tendsto.exists_seq_tendsto_ae'\n[GOAL]\ncase intro\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : BorelSpace E\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → E\ng : α → E\nhf : ∀ (n : ι), AEMeasurable (f n)\nh_tendsto : TendstoInMeasure μ f u g\nns : ℕ → ι\nhns : ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))\n⊢ AEMeasurable g\n[PROOFSTEP]\nexact aemeasurable_of_tendsto_metrizable_ae atTop (fun n => hf (ns n)) hns\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nhfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\n⊢ TendstoInMeasure μ f l g\n[PROOFSTEP]\nintro ε hε\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nhfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\nε : ℝ\nhε : 0 < ε\n⊢ Tendsto (fun i => ↑↑μ {x | ε ≤ dist (f i x) (g x)}) l (𝓝 0)\n[PROOFSTEP]\nreplace hfg :=\n  ENNReal.Tendsto.const_mul (Tendsto.ennrpow_const p.toReal hfg) (Or.inr <| @ENNReal.ofReal_ne_top (1 / ε ^ p.toReal))\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nε : ℝ\nhε : 0 < ε\nhfg :\n  Tendsto (fun b => ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f b - g) p μ ^ ENNReal.toReal p) l\n    (𝓝 (ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * 0 ^ ENNReal.toReal p))\n⊢ Tendsto (fun i => ↑↑μ {x | ε ≤ dist (f i x) (g x)}) l (𝓝 0)\n[PROOFSTEP]\nsimp only [mul_zero, ENNReal.zero_rpow_of_pos (ENNReal.toReal_pos hp_ne_zero hp_ne_top)] at hfg \n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nε : ℝ\nhε : 0 < ε\nhfg : Tendsto (fun b => ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f b - g) p μ ^ ENNReal.toReal p) l (𝓝 0)\n⊢ Tendsto (fun i => ↑↑μ {x | ε ≤ dist (f i x) (g x)}) l (𝓝 0)\n[PROOFSTEP]\nrw [ENNReal.tendsto_nhds_zero] at hfg ⊢\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nε : ℝ\nhε : 0 < ε\nhfg :\n  ∀ (ε_1 : ℝ≥0∞),\n    ε_1 > 0 → ∀ᶠ (x : ι) in l, ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f x - g) p μ ^ ENNReal.toReal p ≤ ε_1\n⊢ ∀ (ε_1 : ℝ≥0∞), ε_1 > 0 → ∀ᶠ (x : ι) in l, ↑↑μ {x_1 | ε ≤ dist (f x x_1) (g x_1)} ≤ ε_1\n[PROOFSTEP]\nintro δ hδ\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nε : ℝ\nhε : 0 < ε\nhfg :\n  ∀ (ε_1 : ℝ≥0∞),\n    ε_1 > 0 → ∀ᶠ (x : ι) in l, ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f x - g) p μ ^ ENNReal.toReal p ≤ ε_1\nδ : ℝ≥0∞\nhδ : δ > 0\n⊢ ∀ᶠ (x : ι) in l, ↑↑μ {x_1 | ε ≤ dist (f x x_1) (g x_1)} ≤ δ\n[PROOFSTEP]\nrefine' (hfg δ hδ).mono fun n hn => _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nε : ℝ\nhε : 0 < ε\nhfg :\n  ∀ (ε_1 : ℝ≥0∞),\n    ε_1 > 0 → ∀ᶠ (x : ι) in l, ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f x - g) p μ ^ ENNReal.toReal p ≤ ε_1\nδ : ℝ≥0∞\nhδ : δ > 0\nn : ι\nhn : ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f n - g) p μ ^ ENNReal.toReal p ≤ δ\n⊢ ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ δ\n[PROOFSTEP]\nrefine' le_trans _ hn\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nε : ℝ\nhε : 0 < ε\nhfg :\n  ∀ (ε_1 : ℝ≥0∞),\n    ε_1 > 0 → ∀ᶠ (x : ι) in l, ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f x - g) p μ ^ ENNReal.toReal p ≤ ε_1\nδ : ℝ≥0∞\nhδ : δ > 0\nn : ι\nhn : ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f n - g) p μ ^ ENNReal.toReal p ≤ δ\n⊢ ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f n - g) p μ ^ ENNReal.toReal p\n[PROOFSTEP]\nrw [ENNReal.ofReal_div_of_pos (Real.rpow_pos_of_pos hε _), ENNReal.ofReal_one, mul_comm, mul_one_div,\n  ENNReal.le_div_iff_mul_le _ (Or.inl ENNReal.ofReal_ne_top), mul_comm]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nε : ℝ\nhε : 0 < ε\nhfg :\n  ∀ (ε_1 : ℝ≥0∞),\n    ε_1 > 0 → ∀ᶠ (x : ι) in l, ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f x - g) p μ ^ ENNReal.toReal p ≤ ε_1\nδ : ℝ≥0∞\nhδ : δ > 0\nn : ι\nhn : ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f n - g) p μ ^ ENNReal.toReal p ≤ δ\n⊢ ENNReal.ofReal (ε ^ ENNReal.toReal p) * ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ snorm (f n - g) p μ ^ ENNReal.toReal p\n[PROOFSTEP]\nrw [← ENNReal.ofReal_rpow_of_pos hε]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nε : ℝ\nhε : 0 < ε\nhfg :\n  ∀ (ε_1 : ℝ≥0∞),\n    ε_1 > 0 → ∀ᶠ (x : ι) in l, ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f x - g) p μ ^ ENNReal.toReal p ≤ ε_1\nδ : ℝ≥0∞\nhδ : δ > 0\nn : ι\nhn : ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f n - g) p μ ^ ENNReal.toReal p ≤ δ\n⊢ ENNReal.ofReal ε ^ ENNReal.toReal p * ↑↑μ {x | ε ≤ dist (f n x) (g x)} ≤ snorm (f n - g) p μ ^ ENNReal.toReal p\n[PROOFSTEP]\nconvert mul_meas_ge_le_pow_snorm' μ hp_ne_zero hp_ne_top ((hf n).sub hg).aestronglyMeasurable (ENNReal.ofReal ε)\n[GOAL]\ncase h.e'_3.h.e'_6.h.e'_3.h.e'_2.h.a\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nε : ℝ\nhε : 0 < ε\nhfg :\n  ∀ (ε_1 : ℝ≥0∞),\n    ε_1 > 0 → ∀ᶠ (x : ι) in l, ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f x - g) p μ ^ ENNReal.toReal p ≤ ε_1\nδ : ℝ≥0∞\nhδ : δ > 0\nn : ι\nhn : ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f n - g) p μ ^ ENNReal.toReal p ≤ δ\nx✝ : α\n⊢ ε ≤ dist (f n x✝) (g x✝) ↔ ENNReal.ofReal ε ≤ ↑‖(f n - g) x✝‖₊\n[PROOFSTEP]\nrw [dist_eq_norm, ← ENNReal.ofReal_le_ofReal_iff (norm_nonneg _), ofReal_norm_eq_coe_nnnorm]\n[GOAL]\ncase h.e'_3.h.e'_6.h.e'_3.h.e'_2.h.a\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nε : ℝ\nhε : 0 < ε\nhfg :\n  ∀ (ε_1 : ℝ≥0∞),\n    ε_1 > 0 → ∀ᶠ (x : ι) in l, ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f x - g) p μ ^ ENNReal.toReal p ≤ ε_1\nδ : ℝ≥0∞\nhδ : δ > 0\nn : ι\nhn : ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f n - g) p μ ^ ENNReal.toReal p ≤ δ\nx✝ : α\n⊢ ENNReal.ofReal ε ≤ ↑‖f n x✝ - g x✝‖₊ ↔ ENNReal.ofReal ε ≤ ↑‖(f n - g) x✝‖₊\n[PROOFSTEP]\nexact Iff.rfl\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nε : ℝ\nhε : 0 < ε\nhfg :\n  ∀ (ε_1 : ℝ≥0∞),\n    ε_1 > 0 → ∀ᶠ (x : ι) in l, ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f x - g) p μ ^ ENNReal.toReal p ≤ ε_1\nδ : ℝ≥0∞\nhδ : δ > 0\nn : ι\nhn : ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f n - g) p μ ^ ENNReal.toReal p ≤ δ\n⊢ ENNReal.ofReal (ε ^ ENNReal.toReal p) ≠ 0 ∨ snorm (f n - g) p μ ^ ENNReal.toReal p ≠ 0\n[PROOFSTEP]\nrw [Ne, ENNReal.ofReal_eq_zero, not_le]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), StronglyMeasurable (f n)\nhg : StronglyMeasurable g\nl : Filter ι\nε : ℝ\nhε : 0 < ε\nhfg :\n  ∀ (ε_1 : ℝ≥0∞),\n    ε_1 > 0 → ∀ᶠ (x : ι) in l, ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f x - g) p μ ^ ENNReal.toReal p ≤ ε_1\nδ : ℝ≥0∞\nhδ : δ > 0\nn : ι\nhn : ENNReal.ofReal (1 / ε ^ ENNReal.toReal p) * snorm (f n - g) p μ ^ ENNReal.toReal p ≤ δ\n⊢ 0 < ε ^ ENNReal.toReal p ∨ snorm (f n - g) p μ ^ ENNReal.toReal p ≠ 0\n[PROOFSTEP]\nexact Or.inl (Real.rpow_pos_of_pos hε _)\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), AEStronglyMeasurable (f n) μ\nhg : AEStronglyMeasurable g μ\nl : Filter ι\nhfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\n⊢ TendstoInMeasure μ f l g\n[PROOFSTEP]\nrefine' TendstoInMeasure.congr (fun i => (hf i).ae_eq_mk.symm) hg.ae_eq_mk.symm _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), AEStronglyMeasurable (f n) μ\nhg : AEStronglyMeasurable g μ\nl : Filter ι\nhfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\n⊢ TendstoInMeasure μ (fun i => AEStronglyMeasurable.mk (f i) (_ : AEStronglyMeasurable (f i) μ)) l\n    (AEStronglyMeasurable.mk g hg)\n[PROOFSTEP]\nrefine'\n  tendstoInMeasure_of_tendsto_snorm_of_stronglyMeasurable hp_ne_zero hp_ne_top (fun i => (hf i).stronglyMeasurable_mk)\n    hg.stronglyMeasurable_mk _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), AEStronglyMeasurable (f n) μ\nhg : AEStronglyMeasurable g μ\nl : Filter ι\nhfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\n⊢ Tendsto\n    (fun n =>\n      snorm (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) - AEStronglyMeasurable.mk g hg) p μ)\n    l (𝓝 0)\n[PROOFSTEP]\nhave : (fun n => snorm ((hf n).mk (f n) - hg.mk g) p μ) = fun n => snorm (f n - g) p μ := by ext1 n;\n  refine' snorm_congr_ae (EventuallyEq.sub (hf n).ae_eq_mk.symm hg.ae_eq_mk.symm)\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), AEStronglyMeasurable (f n) μ\nhg : AEStronglyMeasurable g μ\nl : Filter ι\nhfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\n⊢ (fun n =>\n      snorm (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) - AEStronglyMeasurable.mk g hg) p μ) =\n    fun n => snorm (f n - g) p μ\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), AEStronglyMeasurable (f n) μ\nhg : AEStronglyMeasurable g μ\nl : Filter ι\nhfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\nn : ι\n⊢ snorm (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) - AEStronglyMeasurable.mk g hg) p μ =\n    snorm (f n - g) p μ\n[PROOFSTEP]\nrefine' snorm_congr_ae (EventuallyEq.sub (hf n).ae_eq_mk.symm hg.ae_eq_mk.symm)\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), AEStronglyMeasurable (f n) μ\nhg : AEStronglyMeasurable g μ\nl : Filter ι\nhfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\nthis :\n  (fun n =>\n      snorm (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) - AEStronglyMeasurable.mk g hg) p μ) =\n    fun n => snorm (f n - g) p μ\n⊢ Tendsto\n    (fun n =>\n      snorm (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) - AEStronglyMeasurable.mk g hg) p μ)\n    l (𝓝 0)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf : ∀ (n : ι), AEStronglyMeasurable (f n) μ\nhg : AEStronglyMeasurable g μ\nl : Filter ι\nhfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\nthis :\n  (fun n =>\n      snorm (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) - AEStronglyMeasurable.mk g hg) p μ) =\n    fun n => snorm (f n - g) p μ\n⊢ Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\n[PROOFSTEP]\nexact hfg\n[GOAL]\nα : Type u_1\nι : Type u_2\nE✝ : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E✝\np : ℝ≥0∞\nf✝ : ι → α → E✝\ng✝ : α → E✝\nE : Type u_4\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nhfg : Tendsto (fun n => snorm (f n - g) ⊤ μ) l (𝓝 0)\n⊢ TendstoInMeasure μ f l g\n[PROOFSTEP]\nintro δ hδ\n[GOAL]\nα : Type u_1\nι : Type u_2\nE✝ : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E✝\np : ℝ≥0∞\nf✝ : ι → α → E✝\ng✝ : α → E✝\nE : Type u_4\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nhfg : Tendsto (fun n => snorm (f n - g) ⊤ μ) l (𝓝 0)\nδ : ℝ\nhδ : 0 < δ\n⊢ Tendsto (fun i => ↑↑μ {x | δ ≤ dist (f i x) (g x)}) l (𝓝 0)\n[PROOFSTEP]\nsimp only [snorm_exponent_top, snormEssSup] at hfg \n[GOAL]\nα : Type u_1\nι : Type u_2\nE✝ : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E✝\np : ℝ≥0∞\nf✝ : ι → α → E✝\ng✝ : α → E✝\nE : Type u_4\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nδ : ℝ\nhδ : 0 < δ\nhfg : Tendsto (fun n => essSup (fun x => ↑‖(f n - g) x‖₊) μ) l (𝓝 0)\n⊢ Tendsto (fun i => ↑↑μ {x | δ ≤ dist (f i x) (g x)}) l (𝓝 0)\n[PROOFSTEP]\nrw [ENNReal.tendsto_nhds_zero] at hfg ⊢\n[GOAL]\nα : Type u_1\nι : Type u_2\nE✝ : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E✝\np : ℝ≥0∞\nf✝ : ι → α → E✝\ng✝ : α → E✝\nE : Type u_4\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nδ : ℝ\nhδ : 0 < δ\nhfg : ∀ (ε : ℝ≥0∞), ε > 0 → ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖(f x - g) x_1‖₊) μ ≤ ε\n⊢ ∀ (ε : ℝ≥0∞), ε > 0 → ∀ᶠ (x : ι) in l, ↑↑μ {x_1 | δ ≤ dist (f x x_1) (g x_1)} ≤ ε\n[PROOFSTEP]\nintro ε hε\n[GOAL]\nα : Type u_1\nι : Type u_2\nE✝ : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E✝\np : ℝ≥0∞\nf✝ : ι → α → E✝\ng✝ : α → E✝\nE : Type u_4\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nδ : ℝ\nhδ : 0 < δ\nhfg : ∀ (ε : ℝ≥0∞), ε > 0 → ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖(f x - g) x_1‖₊) μ ≤ ε\nε : ℝ≥0∞\nhε : ε > 0\n⊢ ∀ᶠ (x : ι) in l, ↑↑μ {x_1 | δ ≤ dist (f x x_1) (g x_1)} ≤ ε\n[PROOFSTEP]\nspecialize hfg (ENNReal.ofReal δ / 2) (ENNReal.div_pos_iff.2 ⟨(ENNReal.ofReal_pos.2 hδ).ne.symm, ENNReal.two_ne_top⟩)\n[GOAL]\nα : Type u_1\nι : Type u_2\nE✝ : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E✝\np : ℝ≥0∞\nf✝ : ι → α → E✝\ng✝ : α → E✝\nE : Type u_4\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nδ : ℝ\nhδ : 0 < δ\nε : ℝ≥0∞\nhε : ε > 0\nhfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖(f x - g) x_1‖₊) μ ≤ ENNReal.ofReal δ / 2\n⊢ ∀ᶠ (x : ι) in l, ↑↑μ {x_1 | δ ≤ dist (f x x_1) (g x_1)} ≤ ε\n[PROOFSTEP]\nrefine' hfg.mono fun n hn => _\n[GOAL]\nα : Type u_1\nι : Type u_2\nE✝ : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E✝\np : ℝ≥0∞\nf✝ : ι → α → E✝\ng✝ : α → E✝\nE : Type u_4\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nδ : ℝ\nhδ : 0 < δ\nε : ℝ≥0∞\nhε : ε > 0\nhfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖(f x - g) x_1‖₊) μ ≤ ENNReal.ofReal δ / 2\nn : ι\nhn : essSup (fun x => ↑‖(f n - g) x‖₊) μ ≤ ENNReal.ofReal δ / 2\n⊢ ↑↑μ {x | δ ≤ dist (f n x) (g x)} ≤ ε\n[PROOFSTEP]\nsimp only [true_and_iff, gt_iff_lt, ge_iff_le, zero_tsub, zero_le, zero_add, Set.mem_Icc, Pi.sub_apply] at *\n[GOAL]\nα : Type u_1\nι : Type u_2\nE✝ : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E✝\np : ℝ≥0∞\nf✝ : ι → α → E✝\ng✝ : α → E✝\nE : Type u_4\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nδ : ℝ\nhδ : 0 < δ\nε : ℝ≥0∞\nhfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖f x x_1 - g x_1‖₊) μ ≤ ENNReal.ofReal δ / 2\nn : ι\nhn : essSup (fun x => ↑‖f n x - g x‖₊) μ ≤ ENNReal.ofReal δ / 2\nhε : 0 < ε\n⊢ ↑↑μ {x | δ ≤ dist (f n x) (g x)} ≤ ε\n[PROOFSTEP]\nhave : essSup (fun x : α => (‖f n x - g x‖₊ : ℝ≥0∞)) μ < ENNReal.ofReal δ :=\n  lt_of_le_of_lt hn (ENNReal.half_lt_self (ENNReal.ofReal_pos.2 hδ).ne.symm ENNReal.ofReal_lt_top.ne)\n[GOAL]\nα : Type u_1\nι : Type u_2\nE✝ : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E✝\np : ℝ≥0∞\nf✝ : ι → α → E✝\ng✝ : α → E✝\nE : Type u_4\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nδ : ℝ\nhδ : 0 < δ\nε : ℝ≥0∞\nhfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖f x x_1 - g x_1‖₊) μ ≤ ENNReal.ofReal δ / 2\nn : ι\nhn : essSup (fun x => ↑‖f n x - g x‖₊) μ ≤ ENNReal.ofReal δ / 2\nhε : 0 < ε\nthis : essSup (fun x => ↑‖f n x - g x‖₊) μ < ENNReal.ofReal δ\n⊢ ↑↑μ {x | δ ≤ dist (f n x) (g x)} ≤ ε\n[PROOFSTEP]\nrefine' ((le_of_eq _).trans (ae_lt_of_essSup_lt this).le).trans hε.le\n[GOAL]\nα : Type u_1\nι : Type u_2\nE✝ : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E✝\np : ℝ≥0∞\nf✝ : ι → α → E✝\ng✝ : α → E✝\nE : Type u_4\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nδ : ℝ\nhδ : 0 < δ\nε : ℝ≥0∞\nhfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖f x x_1 - g x_1‖₊) μ ≤ ENNReal.ofReal δ / 2\nn : ι\nhn : essSup (fun x => ↑‖f n x - g x‖₊) μ ≤ ENNReal.ofReal δ / 2\nhε : 0 < ε\nthis : essSup (fun x => ↑‖f n x - g x‖₊) μ < ENNReal.ofReal δ\n⊢ ↑↑μ {x | δ ≤ dist (f n x) (g x)} = ↑↑μ {x | (fun y => ↑‖f n y - g y‖₊ < ENNReal.ofReal δ) x}ᶜ\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase e_a.h\nα : Type u_1\nι : Type u_2\nE✝ : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E✝\np : ℝ≥0∞\nf✝ : ι → α → E✝\ng✝ : α → E✝\nE : Type u_4\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nδ : ℝ\nhδ : 0 < δ\nε : ℝ≥0∞\nhfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖f x x_1 - g x_1‖₊) μ ≤ ENNReal.ofReal δ / 2\nn : ι\nhn : essSup (fun x => ↑‖f n x - g x‖₊) μ ≤ ENNReal.ofReal δ / 2\nhε : 0 < ε\nthis : essSup (fun x => ↑‖f n x - g x‖₊) μ < ENNReal.ofReal δ\nx : α\n⊢ x ∈ {x | δ ≤ dist (f n x) (g x)} ↔ x ∈ {x | (fun y => ↑‖f n y - g y‖₊ < ENNReal.ofReal δ) x}ᶜ\n[PROOFSTEP]\nsimp only [ENNReal.ofReal_le_iff_le_toReal ENNReal.coe_lt_top.ne, ENNReal.coe_toReal, not_lt, coe_nnnorm,\n  Set.mem_setOf_eq, Set.mem_compl_iff]\n[GOAL]\ncase e_a.h\nα : Type u_1\nι : Type u_2\nE✝ : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E✝\np : ℝ≥0∞\nf✝ : ι → α → E✝\ng✝ : α → E✝\nE : Type u_4\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nδ : ℝ\nhδ : 0 < δ\nε : ℝ≥0∞\nhfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖f x x_1 - g x_1‖₊) μ ≤ ENNReal.ofReal δ / 2\nn : ι\nhn : essSup (fun x => ↑‖f n x - g x‖₊) μ ≤ ENNReal.ofReal δ / 2\nhε : 0 < ε\nthis : essSup (fun x => ↑‖f n x - g x‖₊) μ < ENNReal.ofReal δ\nx : α\n⊢ δ ≤ dist (f n x) (g x) ↔ δ ≤ ‖f n x - g x‖\n[PROOFSTEP]\nrw [← dist_eq_norm (f n x) (g x)]\n[GOAL]\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nl : Filter ι\nhp_ne_zero : p ≠ 0\nhf : ∀ (n : ι), AEStronglyMeasurable (f n) μ\nhg : AEStronglyMeasurable g μ\nhfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\n⊢ TendstoInMeasure μ f l g\n[PROOFSTEP]\nby_cases hp_ne_top : p = ∞\n[GOAL]\ncase pos\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nl : Filter ι\nhp_ne_zero : p ≠ 0\nhf : ∀ (n : ι), AEStronglyMeasurable (f n) μ\nhg : AEStronglyMeasurable g μ\nhfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\nhp_ne_top : p = ⊤\n⊢ TendstoInMeasure μ f l g\n[PROOFSTEP]\nsubst hp_ne_top\n[GOAL]\ncase pos\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\nf : ι → α → E\ng : α → E\nl : Filter ι\nhf : ∀ (n : ι), AEStronglyMeasurable (f n) μ\nhg : AEStronglyMeasurable g μ\nhp_ne_zero : ⊤ ≠ 0\nhfg : Tendsto (fun n => snorm (f n - g) ⊤ μ) l (𝓝 0)\n⊢ TendstoInMeasure μ f l g\n[PROOFSTEP]\nexact tendstoInMeasure_of_tendsto_snorm_top hfg\n[GOAL]\ncase neg\nα : Type u_1\nι : Type u_2\nE : Type u_3\nm : MeasurableSpace α\nμ : Measure α\ninst✝ : NormedAddCommGroup E\np : ℝ≥0∞\nf : ι → α → E\ng : α → E\nl : Filter ι\nhp_ne_zero : p ≠ 0\nhf : ∀ (n : ι), AEStronglyMeasurable (f n) μ\nhg : AEStronglyMeasurable g μ\nhfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)\nhp_ne_top : ¬p = ⊤\n⊢ TendstoInMeasure μ f l g\n[PROOFSTEP]\nexact tendstoInMeasure_of_tendsto_snorm_of_ne_top hp_ne_zero hp_ne_top hf hg hfg\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.ConvergenceInMeasure", "llama_tokens": 39883, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7122321964553657, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.37279682479235204}}
{"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nX : C\n⊢ NatTrans.app (counitInv e) (e.functor.obj X) ≫ e.functor.map (NatTrans.app (unitInv e) X) = 𝟙 (e.functor.obj X)\n[PROOFSTEP]\nerw [Iso.inv_eq_inv (e.functor.mapIso (e.unitIso.app X) ≪≫ e.counitIso.app (e.functor.obj X)) (Iso.refl _)]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nX : C\n⊢ (e.functor.mapIso (e.unitIso.app X) ≪≫ e.counitIso.app (e.functor.obj X)).hom =\n    (Iso.refl (e.functor.obj ((𝟭 C).obj X))).hom\n[PROOFSTEP]\nexact e.functor_unit_comp X\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nX : C\n⊢ NatTrans.app (counitInv e) (e.functor.obj X) = e.functor.map (NatTrans.app (unit e) X)\n[PROOFSTEP]\nsymm\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nX : C\n⊢ e.functor.map (NatTrans.app (unit e) X) = NatTrans.app (counitInv e) (e.functor.obj X)\n[PROOFSTEP]\nerw [← Iso.comp_hom_eq_id (e.counitIso.app _), functor_unit_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nX : C\n⊢ 𝟙 (e.functor.obj X) = 𝟙 ((𝟭 D).obj (e.functor.toPrefunctor.1 ((𝟭 C).obj X)))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nX : C\n⊢ NatTrans.app (counit e) (e.functor.obj X) = e.functor.map (NatTrans.app (unitInv e) X)\n[PROOFSTEP]\nerw [← Iso.hom_comp_eq_id (e.functor.mapIso (e.unitIso.app X)), functor_unit_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nX : C\n⊢ 𝟙 (e.functor.obj X) = 𝟙 (e.functor.obj ((𝟭 C).obj X))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) (e.inverse.obj Y) ≫ e.inverse.map (NatTrans.app (counit e) Y) = 𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nrw [← id_comp (e.inverse.map _), ← map_id e.inverse, ← counitInv_functor_comp, map_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) (e.inverse.obj Y) ≫\n      (e.inverse.map (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))) ≫\n          e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))) ≫\n        e.inverse.map (NatTrans.app (counit e) Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) (e.inverse.obj Y) ≫\n      (e.inverse.map (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))) ≫\n          e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))) ≫\n        e.inverse.map (NatTrans.app (counit e) Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nrw [← Iso.hom_inv_id_assoc (e.unitIso.app _) (e.inverse.map (e.functor.map _)), app_hom, app_inv]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) (e.inverse.obj Y) ≫\n      (e.inverse.map (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))) ≫\n          NatTrans.app e.unitIso.hom\n              (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y))))) ≫\n            NatTrans.app e.unitIso.inv\n                (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y))))) ≫\n              e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))) ≫\n        e.inverse.map (NatTrans.app (counit e) Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nslice_lhs 2 3 => erw [e.unit.naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))) ≫\n    NatTrans.app e.unitIso.hom\n      (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app e.unitIso.inv\n    (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) (e.inverse.obj Y)\n[PROOFSTEP]\nerw [e.unit.naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))) ≫\n    NatTrans.app e.unitIso.hom\n      (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app e.unitIso.inv\n    (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) (e.inverse.obj Y)\n[PROOFSTEP]\nerw [e.unit.naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))) ≫\n    NatTrans.app e.unitIso.hom\n      (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app e.unitIso.inv\n    (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) (e.inverse.obj Y)\n[PROOFSTEP]\nerw [e.unit.naturality]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) (e.inverse.obj Y) ≫\n      (((NatTrans.app (unit e) (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj Y))) ≫\n              (e.functor ⋙ e.inverse).map\n                (e.inverse.toPrefunctor.2 (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))))) ≫\n            NatTrans.app e.unitIso.inv\n              (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))) ≫\n          e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))) ≫\n        e.inverse.map (NatTrans.app (counit e) Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nslice_lhs 1 2 => erw [e.unit.naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) (e.inverse.obj Y) ≫\n    NatTrans.app (unit e) (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj Y)))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map (e.inverse.toPrefunctor.2 (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app e.unitIso.inv\n    (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\n[PROOFSTEP]\nerw [e.unit.naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) (e.inverse.obj Y) ≫\n    NatTrans.app (unit e) (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj Y)))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map (e.inverse.toPrefunctor.2 (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app e.unitIso.inv\n    (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\n[PROOFSTEP]\nerw [e.unit.naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) (e.inverse.obj Y) ≫\n    NatTrans.app (unit e) (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj Y)))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map (e.inverse.toPrefunctor.2 (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app e.unitIso.inv\n    (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\n[PROOFSTEP]\nerw [e.unit.naturality]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ ((((NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y)) ≫\n              (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y))) ≫\n            (e.functor ⋙ e.inverse).map\n              (e.inverse.toPrefunctor.2 (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))))) ≫\n          NatTrans.app e.unitIso.inv\n            (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))) ≫\n        e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))) ≫\n      e.inverse.map (NatTrans.app (counit e) Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nslice_lhs 4 4 => rw [← Iso.hom_inv_id_assoc (e.inverse.mapIso (e.counitIso.app _)) (e.unitInv.app _)]\n[GOAL]\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app e.unitIso.inv\n    (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map (e.inverse.toPrefunctor.2 (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))))\n[PROOFSTEP]\nrw [← Iso.hom_inv_id_assoc (e.inverse.mapIso (e.counitIso.app _)) (e.unitInv.app _)]\n[GOAL]\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app e.unitIso.inv\n    (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map (e.inverse.toPrefunctor.2 (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))))\n[PROOFSTEP]\nrw [← Iso.hom_inv_id_assoc (e.inverse.mapIso (e.counitIso.app _)) (e.unitInv.app _)]\n[GOAL]\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app e.unitIso.inv\n    (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map (e.inverse.toPrefunctor.2 (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))))\n[PROOFSTEP]\nrw [← Iso.hom_inv_id_assoc (e.inverse.mapIso (e.counitIso.app _)) (e.unitInv.app _)]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y)) ≫\n      (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y)) ≫\n        (e.functor ⋙ e.inverse).map\n            (e.inverse.toPrefunctor.2 (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y)))) ≫\n          (((e.inverse.mapIso (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).hom ≫\n                (e.inverse.mapIso\n                      (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).inv ≫\n                  NatTrans.app (unitInv e)\n                    (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))) ≫\n              e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))) ≫\n            e.inverse.map (NatTrans.app (counit e) Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nslice_lhs 3 4 =>\n  erw [← map_comp e.inverse, e.counit.naturality]\n  erw [(e.counitIso.app _).hom_inv_id, map_id]\n[GOAL]\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map\n      (e.inverse.toPrefunctor.2 (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y)))) ≫\n    (e.inverse.mapIso (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.inverse.mapIso (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y))\n[PROOFSTEP]\n  erw [← map_comp e.inverse, e.counit.naturality]\n  erw [(e.counitIso.app _).hom_inv_id, map_id]\n[GOAL]\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map\n      (e.inverse.toPrefunctor.2 (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y)))) ≫\n    (e.inverse.mapIso (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.inverse.mapIso (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y))\n[PROOFSTEP]\n  erw [← map_comp e.inverse, e.counit.naturality]\n  erw [(e.counitIso.app _).hom_inv_id, map_id]\n[GOAL]\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map\n      (e.inverse.toPrefunctor.2 (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y)))) ≫\n    (e.inverse.mapIso (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.inverse.mapIso (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y))\n[PROOFSTEP]\nerw [← map_comp e.inverse, e.counit.naturality]\n[GOAL]\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map\n    (NatTrans.app (counit e) (e.functor.obj (e.inverse.obj Y)) ≫\n      (𝟭 D).map (NatTrans.app (counitInv e) (e.functor.obj (e.inverse.obj Y))))\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.inverse.mapIso (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y))\n[PROOFSTEP]\nerw [(e.counitIso.app _).hom_inv_id, map_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y)) ≫\n      (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y)) ≫\n        (((𝟙 (e.inverse.obj (e.functor.obj (e.inverse.toPrefunctor.1 (e.functor.obj (e.inverse.obj Y))))) ≫\n                (e.inverse.mapIso\n                    (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).inv) ≫\n              NatTrans.app (unitInv e)\n                (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))) ≫\n            e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))) ≫\n          e.inverse.map (NatTrans.app (counit e) Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nerw [id_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y)) ≫\n      (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y)) ≫\n        (((e.inverse.mapIso (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).inv ≫\n              NatTrans.app (unitInv e)\n                (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))) ≫\n            e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))) ≫\n          e.inverse.map (NatTrans.app (counit e) Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nslice_lhs 2 3 => erw [← map_comp e.inverse, e.counitIso.inv.naturality, map_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y)) ≫\n    (e.inverse.mapIso (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).inv\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\n[PROOFSTEP]\nerw [← map_comp e.inverse, e.counitIso.inv.naturality, map_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y)) ≫\n    (e.inverse.mapIso (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).inv\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\n[PROOFSTEP]\nerw [← map_comp e.inverse, e.counitIso.inv.naturality, map_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (e.functor ⋙ e.inverse).map ((unit e).1 (e.inverse.obj Y)) ≫\n    (e.inverse.mapIso (e.counitIso.app (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))).inv\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\n[PROOFSTEP]\nerw [← map_comp e.inverse, e.counitIso.inv.naturality, map_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y)) ≫\n      (((e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n              e.inverse.map ((e.inverse ⋙ e.functor).map (e.functor.toPrefunctor.2 ((unit e).1 (e.inverse.obj Y))))) ≫\n            NatTrans.app (unitInv e)\n              (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))) ≫\n          e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))) ≫\n        e.inverse.map (NatTrans.app (counit e) Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nslice_lhs 3 4 => erw [e.unitInv.naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map ((e.inverse ⋙ e.functor).map (e.functor.toPrefunctor.2 ((unit e).1 (e.inverse.obj Y)))) ≫\n    NatTrans.app (unitInv e) (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y))))\n[PROOFSTEP]\nerw [e.unitInv.naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map ((e.inverse ⋙ e.functor).map (e.functor.toPrefunctor.2 ((unit e).1 (e.inverse.obj Y)))) ≫\n    NatTrans.app (unitInv e) (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y))))\n[PROOFSTEP]\nerw [e.unitInv.naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map ((e.inverse ⋙ e.functor).map (e.functor.toPrefunctor.2 ((unit e).1 (e.inverse.obj Y)))) ≫\n    NatTrans.app (unitInv e) (e.inverse.obj (e.functor.obj (e.inverse.obj (e.functor.obj (e.inverse.obj Y)))))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y))))\n[PROOFSTEP]\nerw [e.unitInv.naturality]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y)) ≫\n      e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n        ((NatTrans.app (unitInv e) (e.inverse.obj (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n              (𝟭 C).map (e.inverse.map (e.functor.toPrefunctor.2 ((unit e).1 (e.inverse.obj Y))))) ≫\n            e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))) ≫\n          e.inverse.map (NatTrans.app (counit e) Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nslice_lhs 4 5 => erw [← map_comp (e.functor ⋙ e.inverse), (e.unitIso.app _).hom_inv_id, map_id]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (𝟭 C).map (e.inverse.map (e.functor.toPrefunctor.2 ((unit e).1 (e.inverse.obj Y)))) ≫\n    e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y))))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y))))\n[PROOFSTEP]\nerw [← map_comp (e.functor ⋙ e.inverse), (e.unitIso.app _).hom_inv_id, map_id]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (𝟭 C).map (e.inverse.map (e.functor.toPrefunctor.2 ((unit e).1 (e.inverse.obj Y)))) ≫\n    e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y))))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y))))\n[PROOFSTEP]\nerw [← map_comp (e.functor ⋙ e.inverse), (e.unitIso.app _).hom_inv_id, map_id]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| (𝟭 C).map (e.inverse.map (e.functor.toPrefunctor.2 ((unit e).1 (e.inverse.obj Y)))) ≫\n    e.inverse.map (e.functor.map (NatTrans.app (unitInv e) (e.inverse.obj Y)))\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y))))\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y))))\n[PROOFSTEP]\nerw [← map_comp (e.functor ⋙ e.inverse), (e.unitIso.app _).hom_inv_id, map_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y)) ≫\n      e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n        NatTrans.app (unitInv e) (e.inverse.obj (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n          𝟙 ((e.functor ⋙ e.inverse).obj ((𝟭 C).obj (e.inverse.obj Y))) ≫ e.inverse.map (NatTrans.app (counit e) Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nerw [id_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y)) ≫\n      e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n        NatTrans.app (unitInv e) (e.inverse.obj (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n          e.inverse.map (NatTrans.app (counit e) Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nslice_lhs 3 4 => erw [← e.unitInv.naturality]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n    e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y))))\n[PROOFSTEP]\nerw [← e.unitInv.naturality]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n    e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y))))\n[PROOFSTEP]\nerw [← e.unitInv.naturality]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.obj (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n    e.inverse.map (NatTrans.app (counit e) Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y))))\n[PROOFSTEP]\nerw [← e.unitInv.naturality]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y)) ≫\n      e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n        (e.functor ⋙ e.inverse).map (e.inverse.toPrefunctor.2 (NatTrans.app (counit e) Y)) ≫\n          NatTrans.app (unitInv e) (e.inverse.toPrefunctor.1 Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nslice_lhs 2 3 => erw [← map_comp e.inverse, ← e.counitIso.inv.naturality, (e.counitIso.app _).hom_inv_id, map_id]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n    (e.functor ⋙ e.inverse).map (e.inverse.toPrefunctor.2 (NatTrans.app (counit e) Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.toPrefunctor.1 Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\n[PROOFSTEP]\nerw [← map_comp e.inverse, ← e.counitIso.inv.naturality, (e.counitIso.app _).hom_inv_id, map_id]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n    (e.functor ⋙ e.inverse).map (e.inverse.toPrefunctor.2 (NatTrans.app (counit e) Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.toPrefunctor.1 Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\n[PROOFSTEP]\nerw [← map_comp e.inverse, ← e.counitIso.inv.naturality, (e.counitIso.app _).hom_inv_id, map_id]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| e.inverse.map (NatTrans.app e.counitIso.inv (e.functor.toPrefunctor.1 ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n    (e.functor ⋙ e.inverse).map (e.inverse.toPrefunctor.2 (NatTrans.app (counit e) Y))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unitInv e) (e.inverse.toPrefunctor.1 Y)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n| NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y))\n[PROOFSTEP]\nerw [← map_comp e.inverse, ← e.counitIso.inv.naturality, (e.counitIso.app _).hom_inv_id, map_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) ((𝟭 C).obj (e.inverse.obj Y)) ≫\n      𝟙 (e.inverse.obj (e.functor.obj ((𝟭 C).obj (e.inverse.obj Y)))) ≫\n        NatTrans.app (unitInv e) (e.inverse.toPrefunctor.1 Y) =\n    𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nerw [id_comp, (e.unitIso.app _).hom_inv_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ 𝟙 ((𝟭 C).obj ((𝟭 C).obj (e.inverse.obj Y))) = 𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ e.inverse.map (NatTrans.app (counitInv e) Y) ≫ NatTrans.app (unitInv e) (e.inverse.obj Y) = 𝟙 (e.inverse.obj Y)\n[PROOFSTEP]\nerw [Iso.inv_eq_inv (e.unitIso.app (e.inverse.obj Y) ≪≫ e.inverse.mapIso (e.counitIso.app Y)) (Iso.refl _)]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ (e.unitIso.app (e.inverse.obj Y) ≪≫ e.inverse.mapIso (e.counitIso.app Y)).hom =\n    (Iso.refl ((𝟭 C).obj (e.inverse.obj Y))).hom\n[PROOFSTEP]\nexact e.unit_inverse_comp Y\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unit e) (e.inverse.obj Y) = e.inverse.map (NatTrans.app (counitInv e) Y)\n[PROOFSTEP]\nerw [← Iso.comp_hom_eq_id (e.inverse.mapIso (e.counitIso.app Y)), unit_inverse_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ 𝟙 (e.inverse.obj Y) = 𝟙 (e.inverse.obj ((𝟭 D).obj Y))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ NatTrans.app (unitInv e) (e.inverse.obj Y) = e.inverse.map (NatTrans.app (counit e) Y)\n[PROOFSTEP]\nsymm\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ e.inverse.map (NatTrans.app (counit e) Y) = NatTrans.app (unitInv e) (e.inverse.obj Y)\n[PROOFSTEP]\nerw [← Iso.hom_comp_eq_id (e.unitIso.app _), unit_inverse_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nY : D\n⊢ 𝟙 (e.inverse.obj Y) = 𝟙 ((𝟭 C).obj (e.inverse.obj Y))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\n⊢ 𝟭 C ≅ F ⋙ G\n[PROOFSTEP]\ncalc\n  𝟭 C ≅ F ⋙ G := η\n  _ ≅ F ⋙ 𝟭 D ⋙ G := (isoWhiskerLeft F (leftUnitor G).symm)\n  _ ≅ F ⋙ (G ⋙ F) ⋙ G := (isoWhiskerLeft F (isoWhiskerRight ε.symm G))\n  _ ≅ F ⋙ G ⋙ F ⋙ G := (isoWhiskerLeft F (associator G F G))\n  _ ≅ (F ⋙ G) ⋙ F ⋙ G := (associator F G (F ⋙ G)).symm\n  _ ≅ 𝟭 C ⋙ F ⋙ G := (isoWhiskerRight η.symm (F ⋙ G))\n  _ ≅ F ⋙ G := leftUnitor (F ⋙ G)\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\n⊢ F.map (NatTrans.app (adjointifyη η ε).hom X) ≫ NatTrans.app ε.hom (F.obj X) = 𝟙 (F.obj X)\n[PROOFSTEP]\ndsimp [adjointifyη, Trans.trans]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\n⊢ F.map\n        ((((((NatTrans.app η.hom X ≫ 𝟙 (G.obj (F.obj X))) ≫ G.map (NatTrans.app ε.inv (F.obj X))) ≫\n                𝟙 (G.obj (F.obj (G.obj (F.obj X))))) ≫\n              𝟙 (G.obj (F.obj (G.obj (F.obj X))))) ≫\n            G.map (F.map (NatTrans.app η.inv X))) ≫\n          𝟙 (G.obj (F.obj X))) ≫\n      NatTrans.app ε.hom (F.obj X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\n⊢ F.map (NatTrans.app η.hom X) ≫\n      F.map (G.map (NatTrans.app ε.inv (F.obj X))) ≫\n        F.map (G.map (F.map (NatTrans.app η.inv X))) ≫ NatTrans.app ε.hom (F.obj X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nhave := ε.hom.naturality (F.map (η.inv.app X))\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\nthis :\n  (G ⋙ F).map (F.map (NatTrans.app η.inv X)) ≫ NatTrans.app ε.hom (F.obj ((𝟭 C).obj X)) =\n    NatTrans.app ε.hom (F.obj ((F ⋙ G).obj X)) ≫ (𝟭 D).map (F.map (NatTrans.app η.inv X))\n⊢ F.map (NatTrans.app η.hom X) ≫\n      F.map (G.map (NatTrans.app ε.inv (F.obj X))) ≫\n        F.map (G.map (F.map (NatTrans.app η.inv X))) ≫ NatTrans.app ε.hom (F.obj X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\ndsimp at this \n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\nthis :\n  F.map (G.map (F.map (NatTrans.app η.inv X))) ≫ NatTrans.app ε.hom (F.obj X) =\n    NatTrans.app ε.hom (F.obj (G.obj (F.obj X))) ≫ F.map (NatTrans.app η.inv X)\n⊢ F.map (NatTrans.app η.hom X) ≫\n      F.map (G.map (NatTrans.app ε.inv (F.obj X))) ≫\n        F.map (G.map (F.map (NatTrans.app η.inv X))) ≫ NatTrans.app ε.hom (F.obj X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\nthis :\n  F.map (G.map (F.map (NatTrans.app η.inv X))) ≫ NatTrans.app ε.hom (F.obj X) =\n    NatTrans.app ε.hom (F.obj (G.obj (F.obj X))) ≫ F.map (NatTrans.app η.inv X)\n⊢ F.map (NatTrans.app η.hom X) ≫\n      F.map (G.map (NatTrans.app ε.inv (F.obj X))) ≫\n        NatTrans.app ε.hom (F.obj (G.obj (F.obj X))) ≫ F.map (NatTrans.app η.inv X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\n⊢ F.map (NatTrans.app η.hom X) ≫\n      F.map (G.map (NatTrans.app ε.inv (F.obj X))) ≫\n        NatTrans.app ε.hom (F.obj (G.obj (F.obj X))) ≫ F.map (NatTrans.app η.inv X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nrw [← assoc _ _ (F.map _)]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\n⊢ F.map (NatTrans.app η.hom X) ≫\n      (F.map (G.map (NatTrans.app ε.inv (F.obj X))) ≫ NatTrans.app ε.hom (F.obj (G.obj (F.obj X)))) ≫\n        F.map (NatTrans.app η.inv X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nhave := ε.hom.naturality (ε.inv.app <| F.obj X)\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\nthis :\n  (G ⋙ F).map (NatTrans.app ε.inv (F.obj X)) ≫ NatTrans.app ε.hom ((G ⋙ F).obj (F.obj X)) =\n    NatTrans.app ε.hom ((𝟭 D).obj (F.obj X)) ≫ (𝟭 D).map (NatTrans.app ε.inv (F.obj X))\n⊢ F.map (NatTrans.app η.hom X) ≫\n      (F.map (G.map (NatTrans.app ε.inv (F.obj X))) ≫ NatTrans.app ε.hom (F.obj (G.obj (F.obj X)))) ≫\n        F.map (NatTrans.app η.inv X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\ndsimp at this \n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\nthis :\n  F.map (G.map (NatTrans.app ε.inv (F.obj X))) ≫ NatTrans.app ε.hom (F.obj (G.obj (F.obj X))) =\n    NatTrans.app ε.hom (F.obj X) ≫ NatTrans.app ε.inv (F.obj X)\n⊢ F.map (NatTrans.app η.hom X) ≫\n      (F.map (G.map (NatTrans.app ε.inv (F.obj X))) ≫ NatTrans.app ε.hom (F.obj (G.obj (F.obj X)))) ≫\n        F.map (NatTrans.app η.inv X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\nthis :\n  F.map (G.map (NatTrans.app ε.inv (F.obj X))) ≫ NatTrans.app ε.hom (F.obj (G.obj (F.obj X))) =\n    NatTrans.app ε.hom (F.obj X) ≫ NatTrans.app ε.inv (F.obj X)\n⊢ F.map (NatTrans.app η.hom X) ≫\n      (NatTrans.app ε.hom (F.obj X) ≫ NatTrans.app ε.inv (F.obj X)) ≫ F.map (NatTrans.app η.inv X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\n⊢ F.map (NatTrans.app η.hom X) ≫\n      (NatTrans.app ε.hom (F.obj X) ≫ NatTrans.app ε.inv (F.obj X)) ≫ F.map (NatTrans.app η.inv X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nhave := (ε.app <| F.obj X).hom_inv_id\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\nthis : (ε.app (F.obj X)).hom ≫ (ε.app (F.obj X)).inv = 𝟙 ((G ⋙ F).obj (F.obj X))\n⊢ F.map (NatTrans.app η.hom X) ≫\n      (NatTrans.app ε.hom (F.obj X) ≫ NatTrans.app ε.inv (F.obj X)) ≫ F.map (NatTrans.app η.inv X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\ndsimp at this \n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\nthis : NatTrans.app ε.hom (F.obj X) ≫ NatTrans.app ε.inv (F.obj X) = 𝟙 (F.obj (G.obj (F.obj X)))\n⊢ F.map (NatTrans.app η.hom X) ≫\n      (NatTrans.app ε.hom (F.obj X) ≫ NatTrans.app ε.inv (F.obj X)) ≫ F.map (NatTrans.app η.inv X) =\n    𝟙 (F.obj X)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\nthis : NatTrans.app ε.hom (F.obj X) ≫ NatTrans.app ε.inv (F.obj X) = 𝟙 (F.obj (G.obj (F.obj X)))\n⊢ F.map (NatTrans.app η.hom X) ≫ 𝟙 (F.obj (G.obj (F.obj X))) ≫ F.map (NatTrans.app η.inv X) = 𝟙 (F.obj X)\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\n⊢ F.map (NatTrans.app η.hom X) ≫ 𝟙 (F.obj (G.obj (F.obj X))) ≫ F.map (NatTrans.app η.inv X) = 𝟙 (F.obj X)\n[PROOFSTEP]\nrw [id_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\n⊢ F.map (NatTrans.app η.hom X) ≫ F.map (NatTrans.app η.inv X) = 𝟙 (F.obj X)\n[PROOFSTEP]\nhave := (F.mapIso <| η.app X).hom_inv_id\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\nthis : (F.mapIso (η.app X)).hom ≫ (F.mapIso (η.app X)).inv = 𝟙 (F.obj ((𝟭 C).obj X))\n⊢ F.map (NatTrans.app η.hom X) ≫ F.map (NatTrans.app η.inv X) = 𝟙 (F.obj X)\n[PROOFSTEP]\ndsimp at this \n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nG : D ⥤ C\nη : 𝟭 C ≅ F ⋙ G\nε : G ⋙ F ≅ 𝟭 D\nX : C\nthis : F.map (NatTrans.app η.hom X) ≫ F.map (NatTrans.app η.inv X) = 𝟙 (F.obj X)\n⊢ F.map (NatTrans.app η.hom X) ≫ F.map (NatTrans.app η.inv X) = 𝟙 (F.obj X)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nf : D ≌ E\n⊢ 𝟭 C ≅ (e.functor ⋙ f.functor) ⋙ f.inverse ⋙ e.inverse\n[PROOFSTEP]\nrefine' Iso.trans e.unitIso _\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nf : D ≌ E\n⊢ e.functor ⋙ e.inverse ≅ (e.functor ⋙ f.functor) ⋙ f.inverse ⋙ e.inverse\n[PROOFSTEP]\nexact isoWhiskerLeft e.functor (isoWhiskerRight f.unitIso e.inverse)\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nf : D ≌ E\n⊢ (f.inverse ⋙ e.inverse) ⋙ e.functor ⋙ f.functor ≅ 𝟭 E\n[PROOFSTEP]\nrefine' Iso.trans _ f.counitIso\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nf : D ≌ E\n⊢ (f.inverse ⋙ e.inverse) ⋙ e.functor ⋙ f.functor ≅ f.inverse ⋙ f.functor\n[PROOFSTEP]\nexact\n  isoWhiskerLeft f.inverse\n    (isoWhiskerRight e.counitIso f.functor)\n      -- We wouldn't have needed to give this proof if we'd used `Equivalence.mk`,\n        -- but we choose to avoid using that here, for the sake of good structure projection `simp`\n        -- lemmas.\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nf : D ≌ E\nX : C\n⊢ (e.functor ⋙ f.functor).map\n        (NatTrans.app (e.unitIso ≪≫ isoWhiskerLeft e.functor (isoWhiskerRight f.unitIso e.inverse)).hom X) ≫\n      NatTrans.app (isoWhiskerLeft f.inverse (isoWhiskerRight e.counitIso f.functor) ≪≫ f.counitIso).hom\n        ((e.functor ⋙ f.functor).obj X) =\n    𝟙 ((e.functor ⋙ f.functor).obj X)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nf : D ≌ E\nX : C\n⊢ f.functor.map\n        (e.functor.map (NatTrans.app e.unitIso.hom X ≫ e.inverse.map (NatTrans.app f.unitIso.hom (e.functor.obj X)))) ≫\n      f.functor.map (NatTrans.app e.counitIso.hom (f.inverse.obj (f.functor.obj (e.functor.obj X)))) ≫\n        NatTrans.app f.counitIso.hom (f.functor.obj (e.functor.obj X)) =\n    𝟙 (f.functor.obj (e.functor.obj X))\n[PROOFSTEP]\nrw [← f.functor.map_comp_assoc, e.functor.map_comp, ← counitInv_app_functor, fun_inv_map, Iso.inv_hom_id_app_assoc,\n  assoc, Iso.inv_hom_id_app, counit_app_functor, ← Functor.map_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nf : D ≌ E\nX : C\n⊢ f.functor.map\n      ((NatTrans.app f.unitIso.hom (e.functor.obj X) ≫\n          𝟙 ((𝟭 D).obj (f.inverse.obj (f.functor.obj (e.functor.obj X))))) ≫\n        NatTrans.app (unitInv f) (e.functor.obj X)) =\n    𝟙 (f.functor.obj (e.functor.obj X))\n[PROOFSTEP]\nerw [comp_id, Iso.hom_inv_id_app, Functor.map_id]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nF : C ⥤ E\nX : C\n⊢ NatTrans.app (funInvIdAssoc e F).hom X = F.map (NatTrans.app (unitInv e) X)\n[PROOFSTEP]\ndsimp [funInvIdAssoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nF : C ⥤ E\nX : C\n⊢ 𝟙 (F.obj (e.inverse.obj (e.functor.obj X))) ≫ F.map (NatTrans.app e.unitIso.inv X) ≫ 𝟙 (F.obj X) =\n    F.map (NatTrans.app (unitInv e) X)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nF : C ⥤ E\nX : C\n⊢ NatTrans.app (funInvIdAssoc e F).inv X = F.map (NatTrans.app (unit e) X)\n[PROOFSTEP]\ndsimp [funInvIdAssoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nF : C ⥤ E\nX : C\n⊢ (𝟙 (F.obj X) ≫ F.map (NatTrans.app e.unitIso.hom X)) ≫ 𝟙 (F.obj (e.inverse.obj (e.functor.obj X))) =\n    F.map (NatTrans.app (unit e) X)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nF : D ⥤ E\nX : D\n⊢ NatTrans.app (invFunIdAssoc e F).hom X = F.map (NatTrans.app (counit e) X)\n[PROOFSTEP]\ndsimp [invFunIdAssoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nF : D ⥤ E\nX : D\n⊢ 𝟙 (F.obj (e.functor.obj (e.inverse.obj X))) ≫ F.map (NatTrans.app e.counitIso.hom X) ≫ 𝟙 (F.obj X) =\n    F.map (NatTrans.app (counit e) X)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nF : D ⥤ E\nX : D\n⊢ NatTrans.app (invFunIdAssoc e F).inv X = F.map (NatTrans.app (counitInv e) X)\n[PROOFSTEP]\ndsimp [invFunIdAssoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nF : D ⥤ E\nX : D\n⊢ (𝟙 (F.obj X) ≫ F.map (NatTrans.app e.counitIso.inv X)) ≫ 𝟙 (F.obj (e.functor.obj (e.inverse.obj X))) =\n    F.map (NatTrans.app (counitInv e) X)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nX Y : C\nf f' : X ⟶ Y\n⊢ f ≫ NatTrans.app (unit e) Y = f' ≫ NatTrans.app (unit e) Y ↔ f = f'\n[PROOFSTEP]\nsimp only [cancel_mono]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nX Y : C\nf f' : X ⟶ e.inverse.obj (e.functor.obj Y)\n⊢ f ≫ NatTrans.app (unitInv e) Y = f' ≫ NatTrans.app (unitInv e) Y ↔ f = f'\n[PROOFSTEP]\nsimp only [cancel_mono]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nX Y : D\nf f' : X ⟶ e.functor.obj (e.inverse.obj Y)\n⊢ f ≫ NatTrans.app (counit e) Y = f' ≫ NatTrans.app (counit e) Y ↔ f = f'\n[PROOFSTEP]\nsimp only [cancel_mono]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nX Y : D\nf f' : X ⟶ Y\n⊢ f ≫ NatTrans.app (counitInv e) Y = f' ≫ NatTrans.app (counitInv e) Y ↔ f = f'\n[PROOFSTEP]\nsimp only [cancel_mono]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nW X X' Y : C\nf : W ⟶ X\ng : X ⟶ Y\nf' : W ⟶ X'\ng' : X' ⟶ Y\n⊢ f ≫ g ≫ NatTrans.app (unit e) Y = f' ≫ g' ≫ NatTrans.app (unit e) Y ↔ f ≫ g = f' ≫ g'\n[PROOFSTEP]\nsimp only [← Category.assoc, cancel_mono]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nW X X' Y : D\nf : W ⟶ X\ng : X ⟶ Y\nf' : W ⟶ X'\ng' : X' ⟶ Y\n⊢ f ≫ g ≫ NatTrans.app (counitInv e) Y = f' ≫ g' ≫ NatTrans.app (counitInv e) Y ↔ f ≫ g = f' ≫ g'\n[PROOFSTEP]\nsimp only [← Category.assoc, cancel_mono]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nW X X' Y Y' Z : C\nf : W ⟶ X\ng : X ⟶ Y\nh : Y ⟶ Z\nf' : W ⟶ X'\ng' : X' ⟶ Y'\nh' : Y' ⟶ Z\n⊢ f ≫ g ≫ h ≫ NatTrans.app (unit e) Z = f' ≫ g' ≫ h' ≫ NatTrans.app (unit e) Z ↔ f ≫ g ≫ h = f' ≫ g' ≫ h'\n[PROOFSTEP]\nsimp only [← Category.assoc, cancel_mono]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\ne : C ≌ D\nW X X' Y Y' Z : D\nf : W ⟶ X\ng : X ⟶ Y\nh : Y ⟶ Z\nf' : W ⟶ X'\ng' : X' ⟶ Y'\nh' : Y' ⟶ Z\n⊢ f ≫ g ≫ h ≫ NatTrans.app (counitInv e) Z = f' ≫ g' ≫ h' ≫ NatTrans.app (counitInv e) Z ↔ f ≫ g ≫ h = f' ≫ g' ≫ h'\n[PROOFSTEP]\nsimp only [← Category.assoc, cancel_mono]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nE : C ≌ D\n⊢ asEquivalence E.functor = E\n[PROOFSTEP]\ncases E\n[GOAL]\ncase mk'\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nfunctor✝ : C ⥤ D\ninverse✝ : D ⥤ C\nunitIso✝ : 𝟭 C ≅ functor✝ ⋙ inverse✝\ncounitIso✝ : inverse✝ ⋙ functor✝ ≅ 𝟭 D\nfunctor_unitIso_comp✝ :\n  ∀ (X : C),\n    functor✝.map (NatTrans.app unitIso✝.hom X) ≫ NatTrans.app counitIso✝.hom (functor✝.obj X) = 𝟙 (functor✝.obj X)\n⊢ asEquivalence (mk' functor✝ inverse✝ unitIso✝ counitIso✝).functor = mk' functor✝ inverse✝ unitIso✝ counitIso✝\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nE : C ≌ D\n⊢ asEquivalence E.inverse = symm E\n[PROOFSTEP]\ncases E\n[GOAL]\ncase mk'\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nfunctor✝ : C ⥤ D\ninverse✝ : D ⥤ C\nunitIso✝ : 𝟭 C ≅ functor✝ ⋙ inverse✝\ncounitIso✝ : inverse✝ ⋙ functor✝ ≅ 𝟭 D\nfunctor_unitIso_comp✝ :\n  ∀ (X : C),\n    functor✝.map (NatTrans.app unitIso✝.hom X) ≫ NatTrans.app counitIso✝.hom (functor✝.obj X) = 𝟙 (functor✝.obj X)\n⊢ asEquivalence (mk' functor✝ inverse✝ unitIso✝ counitIso✝).inverse = symm (mk' functor✝ inverse✝ unitIso✝ counitIso✝)\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : D\nf : X ⟶ Y\n⊢ F.map ((Functor.inv F).map f) =\n    NatTrans.app (Equivalence.counit (asEquivalence F)) X ≫ f ≫ NatTrans.app (Equivalence.counitInv (asEquivalence F)) Y\n[PROOFSTEP]\nerw [NatIso.naturality_2]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : D\nf : X ⟶ Y\n⊢ F.map ((Functor.inv F).map f) = ((asEquivalence F).inverse ⋙ (asEquivalence F).functor).map f\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : X ⟶ Y\n⊢ (Functor.inv F).map (F.map f) =\n    NatTrans.app (Equivalence.unitInv (asEquivalence F)) X ≫ f ≫ NatTrans.app (Equivalence.unit (asEquivalence F)) Y\n[PROOFSTEP]\nerw [NatIso.naturality_1]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : X ⟶ Y\n⊢ (Functor.inv F).map (F.map f) = ((asEquivalence F).functor ⋙ (asEquivalence F).inverse).map f\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n⊢ G.map (NatTrans.app (unitIso ≪≫ hcomp e (Iso.refl (inverse F))).hom X) ≫\n      NatTrans.app (hcomp (Iso.refl (inverse F)) e.symm ≪≫ counitIso).hom (G.obj X) =\n    𝟙 (G.obj X)\n[PROOFSTEP]\ndsimp [NatIso.hcomp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n⊢ G.map (NatTrans.app unitIso.hom X ≫ 𝟙 ((inverse F).obj (F.obj X)) ≫ (inverse F).map (NatTrans.app e.hom X)) ≫\n      (NatTrans.app e.inv ((inverse F).obj (G.obj X)) ≫ F.map (𝟙 ((inverse F).obj (G.obj X)))) ≫\n        NatTrans.app counitIso.hom (G.obj X) =\n    𝟙 (G.obj X)\n[PROOFSTEP]\nerw [id_comp, F.map_id, comp_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n⊢ G.map (NatTrans.app unitIso.hom X ≫ (inverse F).map (NatTrans.app e.hom X)) ≫\n      NatTrans.app e.inv ((inverse F).obj (G.obj X)) ≫ NatTrans.app counitIso.hom (G.obj X) =\n    𝟙 (G.obj X)\n[PROOFSTEP]\napply (cancel_epi (e.hom.app X)).mp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n⊢ NatTrans.app e.hom X ≫\n      G.map (NatTrans.app unitIso.hom X ≫ (inverse F).map (NatTrans.app e.hom X)) ≫\n        NatTrans.app e.inv ((inverse F).obj (G.obj X)) ≫ NatTrans.app counitIso.hom (G.obj X) =\n    NatTrans.app e.hom X ≫ 𝟙 (G.obj X)\n[PROOFSTEP]\nslice_lhs 1 2 => rw [← e.hom.naturality]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app e.hom X ≫ G.map (NatTrans.app unitIso.hom X ≫ (inverse F).map (NatTrans.app e.hom X))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app e.inv ((inverse F).obj (G.obj X))\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app counitIso.hom (G.obj X)\n[PROOFSTEP]\nrw [← e.hom.naturality]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app e.hom X ≫ G.map (NatTrans.app unitIso.hom X ≫ (inverse F).map (NatTrans.app e.hom X))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app e.inv ((inverse F).obj (G.obj X))\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app counitIso.hom (G.obj X)\n[PROOFSTEP]\nrw [← e.hom.naturality]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app e.hom X ≫ G.map (NatTrans.app unitIso.hom X ≫ (inverse F).map (NatTrans.app e.hom X))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app e.inv ((inverse F).obj (G.obj X))\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app counitIso.hom (G.obj X)\n[PROOFSTEP]\nrw [← e.hom.naturality]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n⊢ ((F.map (NatTrans.app unitIso.hom X ≫ (inverse F).map (NatTrans.app e.hom X)) ≫\n          NatTrans.app e.hom ((inverse F).obj (G.obj X))) ≫\n        NatTrans.app e.inv ((inverse F).obj (G.obj X))) ≫\n      NatTrans.app counitIso.hom (G.obj X) =\n    NatTrans.app e.hom X ≫ 𝟙 (G.obj X)\n[PROOFSTEP]\nslice_lhs 2 3 => rw [← NatTrans.vcomp_app', e.hom_inv_id]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app e.hom ((inverse F).obj (G.obj X)) ≫ NatTrans.app e.inv ((inverse F).obj (G.obj X))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app counitIso.hom (G.obj X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| F.map (NatTrans.app unitIso.hom X ≫ (inverse F).map (NatTrans.app e.hom X))\n[PROOFSTEP]\nrw [← NatTrans.vcomp_app', e.hom_inv_id]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app e.hom ((inverse F).obj (G.obj X)) ≫ NatTrans.app e.inv ((inverse F).obj (G.obj X))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app counitIso.hom (G.obj X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| F.map (NatTrans.app unitIso.hom X ≫ (inverse F).map (NatTrans.app e.hom X))\n[PROOFSTEP]\nrw [← NatTrans.vcomp_app', e.hom_inv_id]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app e.hom ((inverse F).obj (G.obj X)) ≫ NatTrans.app e.inv ((inverse F).obj (G.obj X))\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| NatTrans.app counitIso.hom (G.obj X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| F.map (NatTrans.app unitIso.hom X ≫ (inverse F).map (NatTrans.app e.hom X))\n[PROOFSTEP]\nrw [← NatTrans.vcomp_app', e.hom_inv_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n⊢ F.map (NatTrans.app unitIso.hom X ≫ (inverse F).map (NatTrans.app e.hom X)) ≫\n      NatTrans.app (𝟙 F) ((inverse F).obj (G.obj X)) ≫ NatTrans.app counitIso.hom (G.obj X) =\n    NatTrans.app e.hom X ≫ 𝟙 (G.obj X)\n[PROOFSTEP]\nsimp only [NatTrans.id_app, id_comp, comp_id, F.map_comp, assoc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n⊢ F.map (NatTrans.app unitIso.hom X) ≫\n      F.map ((inverse F).map (NatTrans.app e.hom X)) ≫ NatTrans.app counitIso.hom (G.obj X) =\n    NatTrans.app e.hom X\n[PROOFSTEP]\nerw [hF.counitIso.hom.naturality]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n⊢ F.map (NatTrans.app unitIso.hom X) ≫ NatTrans.app counitIso.hom (F.obj X) ≫ (𝟭 D).map (NatTrans.app e.hom X) =\n    NatTrans.app e.hom X\n[PROOFSTEP]\nslice_lhs 1 2 => rw [functor_unitIso_comp]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| F.map (NatTrans.app unitIso.hom X) ≫ NatTrans.app counitIso.hom (F.obj X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| (𝟭 D).map (NatTrans.app e.hom X)\n[PROOFSTEP]\nrw [functor_unitIso_comp]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| F.map (NatTrans.app unitIso.hom X) ≫ NatTrans.app counitIso.hom (F.obj X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| (𝟭 D).map (NatTrans.app e.hom X)\n[PROOFSTEP]\nrw [functor_unitIso_comp]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| F.map (NatTrans.app unitIso.hom X) ≫ NatTrans.app counitIso.hom (F.obj X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n| (𝟭 D).map (NatTrans.app e.hom X)\n[PROOFSTEP]\nrw [functor_unitIso_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\nX : C\n⊢ 𝟙 (F.obj X) ≫ (𝟭 D).map (NatTrans.app e.hom X) = NatTrans.app e.hom X\n[PROOFSTEP]\nsimp only [Functor.id_map, id_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G H : C ⥤ D\ne : F ≅ G\ne' : G ≅ H\nhF : IsEquivalence F\n⊢ ofIso e' (ofIso e hF) = ofIso (e ≪≫ e') hF\n[PROOFSTEP]\ndsimp [ofIso]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G H : C ⥤ D\ne : F ≅ G\ne' : G ≅ H\nhF : IsEquivalence F\n⊢ mk' (inverse F) ((unitIso ≪≫ hcomp e (Iso.refl (inverse F))) ≪≫ hcomp e' (Iso.refl (inverse F)))\n      (hcomp (Iso.refl (inverse F)) e'.symm ≪≫ hcomp (Iso.refl (inverse F)) e.symm ≪≫ counitIso) =\n    mk' (inverse F) (unitIso ≪≫ hcomp (e ≪≫ e') (Iso.refl (inverse F)))\n      (hcomp (Iso.refl (inverse F)) (e'.symm ≪≫ e.symm) ≪≫ counitIso)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_unitIso\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G H : C ⥤ D\ne : F ≅ G\ne' : G ≅ H\nhF : IsEquivalence F\n⊢ (unitIso ≪≫ hcomp e (Iso.refl (inverse F))) ≪≫ hcomp e' (Iso.refl (inverse F)) =\n    unitIso ≪≫ hcomp (e ≪≫ e') (Iso.refl (inverse F))\n[PROOFSTEP]\next X\n[GOAL]\ncase e_counitIso\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G H : C ⥤ D\ne : F ≅ G\ne' : G ≅ H\nhF : IsEquivalence F\n⊢ hcomp (Iso.refl (inverse F)) e'.symm ≪≫ hcomp (Iso.refl (inverse F)) e.symm ≪≫ counitIso =\n    hcomp (Iso.refl (inverse F)) (e'.symm ≪≫ e.symm) ≪≫ counitIso\n[PROOFSTEP]\next X\n[GOAL]\ncase e_unitIso.w.w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G H : C ⥤ D\ne : F ≅ G\ne' : G ≅ H\nhF : IsEquivalence F\nX : C\n⊢ NatTrans.app ((unitIso ≪≫ hcomp e (Iso.refl (inverse F))) ≪≫ hcomp e' (Iso.refl (inverse F))).hom X =\n    NatTrans.app (unitIso ≪≫ hcomp (e ≪≫ e') (Iso.refl (inverse F))).hom X\n[PROOFSTEP]\ndsimp [NatIso.hcomp]\n[GOAL]\ncase e_counitIso.w.w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G H : C ⥤ D\ne : F ≅ G\ne' : G ≅ H\nhF : IsEquivalence F\nX : D\n⊢ NatTrans.app (hcomp (Iso.refl (inverse F)) e'.symm ≪≫ hcomp (Iso.refl (inverse F)) e.symm ≪≫ counitIso).hom X =\n    NatTrans.app (hcomp (Iso.refl (inverse F)) (e'.symm ≪≫ e.symm) ≪≫ counitIso).hom X\n[PROOFSTEP]\ndsimp [NatIso.hcomp]\n[GOAL]\ncase e_unitIso.w.w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G H : C ⥤ D\ne : F ≅ G\ne' : G ≅ H\nhF : IsEquivalence F\nX : C\n⊢ (NatTrans.app unitIso.hom X ≫ 𝟙 ((inverse F).obj (F.obj X)) ≫ (inverse F).map (NatTrans.app e.hom X)) ≫\n      𝟙 ((inverse F).obj (G.obj X)) ≫ (inverse F).map (NatTrans.app e'.hom X) =\n    NatTrans.app unitIso.hom X ≫\n      𝟙 ((inverse F).obj (F.obj X)) ≫ (inverse F).map (NatTrans.app e.hom X ≫ NatTrans.app e'.hom X)\n[PROOFSTEP]\nsimp only [id_comp, assoc, Functor.map_comp]\n[GOAL]\ncase e_counitIso.w.w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G H : C ⥤ D\ne : F ≅ G\ne' : G ≅ H\nhF : IsEquivalence F\nX : D\n⊢ (NatTrans.app e'.inv ((inverse F).obj X) ≫ G.map (𝟙 ((inverse F).obj X))) ≫\n      (NatTrans.app e.inv ((inverse F).obj X) ≫ F.map (𝟙 ((inverse F).obj X))) ≫ NatTrans.app counitIso.hom X =\n    ((NatTrans.app e'.inv ((inverse F).obj X) ≫ NatTrans.app e.inv ((inverse F).obj X)) ≫\n        F.map (𝟙 ((inverse F).obj X))) ≫\n      NatTrans.app counitIso.hom X\n[PROOFSTEP]\nsimp only [Functor.map_id, comp_id, id_comp, assoc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nhF : IsEquivalence F\n⊢ ofIso (Iso.refl F) hF = hF\n[PROOFSTEP]\nrcases hF with ⟨Finv, Funit, Fcounit, Fcomp⟩\n[GOAL]\ncase mk'\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nFinv : D ⥤ C\nFunit : 𝟭 C ≅ F ⋙ Finv\nFcounit : Finv ⋙ F ≅ 𝟭 D\nFcomp : ∀ (X : C), F.map (NatTrans.app Funit.hom X) ≫ NatTrans.app Fcounit.hom (F.obj X) = 𝟙 (F.obj X)\n⊢ ofIso (Iso.refl F) (mk' Finv Funit Fcounit) = mk' Finv Funit Fcounit\n[PROOFSTEP]\ndsimp [ofIso]\n[GOAL]\ncase mk'\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nFinv : D ⥤ C\nFunit : 𝟭 C ≅ F ⋙ Finv\nFcounit : Finv ⋙ F ≅ 𝟭 D\nFcomp : ∀ (X : C), F.map (NatTrans.app Funit.hom X) ≫ NatTrans.app Fcounit.hom (F.obj X) = 𝟙 (F.obj X)\n⊢ mk' Finv (Funit ≪≫ hcomp (Iso.refl F) (Iso.refl Finv)) (hcomp (Iso.refl Finv) (Iso.refl F) ≪≫ Fcounit) =\n    mk' Finv Funit Fcounit\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase mk'.e_unitIso\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nFinv : D ⥤ C\nFunit : 𝟭 C ≅ F ⋙ Finv\nFcounit : Finv ⋙ F ≅ 𝟭 D\nFcomp : ∀ (X : C), F.map (NatTrans.app Funit.hom X) ≫ NatTrans.app Fcounit.hom (F.obj X) = 𝟙 (F.obj X)\n⊢ Funit ≪≫ hcomp (Iso.refl F) (Iso.refl Finv) = Funit\n[PROOFSTEP]\next X\n[GOAL]\ncase mk'.e_counitIso\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nFinv : D ⥤ C\nFunit : 𝟭 C ≅ F ⋙ Finv\nFcounit : Finv ⋙ F ≅ 𝟭 D\nFcomp : ∀ (X : C), F.map (NatTrans.app Funit.hom X) ≫ NatTrans.app Fcounit.hom (F.obj X) = 𝟙 (F.obj X)\n⊢ hcomp (Iso.refl Finv) (Iso.refl F) ≪≫ Fcounit = Fcounit\n[PROOFSTEP]\next X\n[GOAL]\ncase mk'.e_unitIso.w.w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nFinv : D ⥤ C\nFunit : 𝟭 C ≅ F ⋙ Finv\nFcounit : Finv ⋙ F ≅ 𝟭 D\nFcomp : ∀ (X : C), F.map (NatTrans.app Funit.hom X) ≫ NatTrans.app Fcounit.hom (F.obj X) = 𝟙 (F.obj X)\nX : C\n⊢ NatTrans.app (Funit ≪≫ hcomp (Iso.refl F) (Iso.refl Finv)).hom X = NatTrans.app Funit.hom X\n[PROOFSTEP]\ndsimp [NatIso.hcomp]\n[GOAL]\ncase mk'.e_counitIso.w.w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nFinv : D ⥤ C\nFunit : 𝟭 C ≅ F ⋙ Finv\nFcounit : Finv ⋙ F ≅ 𝟭 D\nFcomp : ∀ (X : C), F.map (NatTrans.app Funit.hom X) ≫ NatTrans.app Fcounit.hom (F.obj X) = 𝟙 (F.obj X)\nX : D\n⊢ NatTrans.app (hcomp (Iso.refl Finv) (Iso.refl F) ≪≫ Fcounit).hom X = NatTrans.app Fcounit.hom X\n[PROOFSTEP]\ndsimp [NatIso.hcomp]\n[GOAL]\ncase mk'.e_unitIso.w.w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nFinv : D ⥤ C\nFunit : 𝟭 C ≅ F ⋙ Finv\nFcounit : Finv ⋙ F ≅ 𝟭 D\nFcomp : ∀ (X : C), F.map (NatTrans.app Funit.hom X) ≫ NatTrans.app Fcounit.hom (F.obj X) = 𝟙 (F.obj X)\nX : C\n⊢ NatTrans.app Funit.hom X ≫ 𝟙 (Finv.obj (F.obj X)) ≫ Finv.map (𝟙 (F.obj X)) = NatTrans.app Funit.hom X\n[PROOFSTEP]\nsimp only [comp_id, map_id]\n[GOAL]\ncase mk'.e_counitIso.w.w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nFinv : D ⥤ C\nFunit : 𝟭 C ≅ F ⋙ Finv\nFcounit : Finv ⋙ F ≅ 𝟭 D\nFcomp : ∀ (X : C), F.map (NatTrans.app Funit.hom X) ≫ NatTrans.app Fcounit.hom (F.obj X) = 𝟙 (F.obj X)\nX : D\n⊢ (𝟙 (F.obj (Finv.obj X)) ≫ F.map (𝟙 (Finv.obj X))) ≫ NatTrans.app Fcounit.hom X = NatTrans.app Fcounit.hom X\n[PROOFSTEP]\nsimp only [id_comp, map_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence F\n⊢ ofIso e.symm (ofIso e hF) = hF\n[PROOFSTEP]\nrw [ofIso_trans, Iso.self_symm_id, ofIso_refl]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\ne : F ≅ G\nhF : IsEquivalence G\n⊢ ofIso e (ofIso e.symm hF) = hF\n[PROOFSTEP]\nrw [ofIso_trans, Iso.symm_self_id, ofIso_refl]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf g : X ⟶ Y\nh : F.map f = F.map g\n⊢ f = g\n[PROOFSTEP]\nhave p : F.inv.map (F.map f) = F.inv.map (F.map g) := congrArg F.inv.map h\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf g : X ⟶ Y\nh : F.map f = F.map g\np : (Functor.inv F).map (F.map f) = (Functor.inv F).map (F.map g)\n⊢ f = g\n[PROOFSTEP]\nsimpa only [cancel_epi, cancel_mono, IsEquivalence.inv_fun_map] using p\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : F.obj X ⟶ F.obj Y\n⊢ (Functor.inv F).map\n      (F.map\n        ((fun {X Y} f =>\n            NatTrans.app (unit (asEquivalence F)) X ≫\n              (Functor.inv F).map f ≫ NatTrans.app (unitInv (asEquivalence F)) Y)\n          f)) =\n    (Functor.inv F).map f\n[PROOFSTEP]\nsimpa only [IsEquivalence.inv_fun_map, assoc, Iso.inv_hom_id_app_assoc, Iso.inv_hom_id_app] using comp_id _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Full F\ninst✝¹ : Faithful F\ninst✝ : EssSurj F\nX : D\n⊢ { obj := fun X => objPreimage F X,\n          map := fun {X Y} f => F.preimage ((objObjPreimageIso F X).hom ≫ f ≫ (objObjPreimageIso F Y).inv) }.map\n      (𝟙 X) =\n    𝟙\n      ({ obj := fun X => objPreimage F X,\n            map := fun {X Y} f => F.preimage ((objObjPreimageIso F X).hom ≫ f ≫ (objObjPreimageIso F Y).inv) }.obj\n        X)\n[PROOFSTEP]\napply F.map_injective\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Full F\ninst✝¹ : Faithful F\ninst✝ : EssSurj F\nX : D\n⊢ F.map\n      ({ obj := fun X => objPreimage F X,\n            map := fun {X Y} f => F.preimage ((objObjPreimageIso F X).hom ≫ f ≫ (objObjPreimageIso F Y).inv) }.map\n        (𝟙 X)) =\n    F.map\n      (𝟙\n        ({ obj := fun X => objPreimage F X,\n              map := fun {X Y} f => F.preimage ((objObjPreimageIso F X).hom ≫ f ≫ (objObjPreimageIso F Y).inv) }.obj\n          X))\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Full F\ninst✝¹ : Faithful F\ninst✝ : EssSurj F\nX Y Z : D\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ { obj := fun X => objPreimage F X,\n          map := fun {X Y} f => F.preimage ((objObjPreimageIso F X).hom ≫ f ≫ (objObjPreimageIso F Y).inv) }.map\n      (f ≫ g) =\n    { obj := fun X => objPreimage F X,\n            map := fun {X Y} f => F.preimage ((objObjPreimageIso F X).hom ≫ f ≫ (objObjPreimageIso F Y).inv) }.map\n        f ≫\n      { obj := fun X => objPreimage F X,\n            map := fun {X Y} f => F.preimage ((objObjPreimageIso F X).hom ≫ f ≫ (objObjPreimageIso F Y).inv) }.map\n        g\n[PROOFSTEP]\napply F.map_injective\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Full F\ninst✝¹ : Faithful F\ninst✝ : EssSurj F\nX Y Z : D\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ F.map\n      ({ obj := fun X => objPreimage F X,\n            map := fun {X Y} f => F.preimage ((objObjPreimageIso F X).hom ≫ f ≫ (objObjPreimageIso F Y).inv) }.map\n        (f ≫ g)) =\n    F.map\n      ({ obj := fun X => objPreimage F X,\n              map := fun {X Y} f => F.preimage ((objObjPreimageIso F X).hom ≫ f ≫ (objObjPreimageIso F Y).inv) }.map\n          f ≫\n        { obj := fun X => objPreimage F X,\n              map := fun {X Y} f => F.preimage ((objObjPreimageIso F X).hom ≫ f ≫ (objObjPreimageIso F Y).inv) }.map\n          g)\n[PROOFSTEP]\nsimp\n  -- #align category_theory.equivalence.equivalence_inverse CategoryTheory.Equivalence.equivalenceInverse\n  /- Porting note: this is a private def in mathlib -/\n  \n  --\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Full F\ninst✝¹ : Faithful F\ninst✝ : EssSurj F\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\n⊢ (𝟭 C).map f ≫ ((fun X => (preimageIso F (objObjPreimageIso F (F.obj X))).symm) Y✝).hom =\n    ((fun X => (preimageIso F (objObjPreimageIso F (F.obj X))).symm) X✝).hom ≫\n      (F ⋙ CategoryTheory.Equivalence.equivalenceInverse F).map f\n[PROOFSTEP]\napply F.map_injective\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝² : Full F\ninst✝¹ : Faithful F\ninst✝ : EssSurj F\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\n⊢ F.map ((𝟭 C).map f ≫ ((fun X => (preimageIso F (objObjPreimageIso F (F.obj X))).symm) Y✝).hom) =\n    F.map\n      (((fun X => (preimageIso F (objObjPreimageIso F (F.obj X))).symm) X✝).hom ≫\n        (F ⋙ CategoryTheory.Equivalence.equivalenceInverse F).map f)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nC' : Type u_1\ne : C' ≃ D\nY : D\n⊢ Nonempty ((inducedFunctor ↑e).obj (↑e.symm Y) ≅ Y)\n[PROOFSTEP]\nsimpa using ⟨default⟩\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Equivalence", "llama_tokens": 45407, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7341195385342971, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.3727946114668907}}
{"text": "[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NonUnitalNormedRing A\ninst✝² : NormedSpace 𝕜 A\ninst✝¹ : IsScalarTower 𝕜 A A\ninst✝ : SMulCommClass 𝕜 A A\nx : Unitization 𝕜 A\n⊢ (fst x + 0, ↑↑(↑lift (NonUnitalAlgHom.Lmul 𝕜 A)) x) =\n    (fst x, ↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x))\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NonUnitalNormedRing A\ninst✝² : NormedSpace 𝕜 A\ninst✝¹ : IsScalarTower 𝕜 A A\ninst✝ : SMulCommClass 𝕜 A A\nx : Unitization 𝕜 A\n⊢ (fst x, ↑↑(↑lift (NonUnitalAlgHom.Lmul 𝕜 A)) x) = (fst x, ↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x))\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NonUnitalNormedRing A\ninst✝² : NormedSpace 𝕜 A\ninst✝¹ : IsScalarTower 𝕜 A A\ninst✝ : SMulCommClass 𝕜 A A\nh : Function.Injective ↑(mul 𝕜 A)\n⊢ Function.Injective ↑(splitMul 𝕜 A)\n[PROOFSTEP]\nrw [injective_iff_map_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NonUnitalNormedRing A\ninst✝² : NormedSpace 𝕜 A\ninst✝¹ : IsScalarTower 𝕜 A A\ninst✝ : SMulCommClass 𝕜 A A\nh : Function.Injective ↑(mul 𝕜 A)\n⊢ ∀ (a : Unitization 𝕜 A), ↑(splitMul 𝕜 A) a = 0 → a = 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NonUnitalNormedRing A\ninst✝² : NormedSpace 𝕜 A\ninst✝¹ : IsScalarTower 𝕜 A A\ninst✝ : SMulCommClass 𝕜 A A\nh : Function.Injective ↑(mul 𝕜 A)\nx : Unitization 𝕜 A\nhx : ↑(splitMul 𝕜 A) x = 0\n⊢ x = 0\n[PROOFSTEP]\ninduction x using Unitization.ind\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NonUnitalNormedRing A\ninst✝² : NormedSpace 𝕜 A\ninst✝¹ : IsScalarTower 𝕜 A A\ninst✝ : SMulCommClass 𝕜 A A\nh : Function.Injective ↑(mul 𝕜 A)\nr✝ : 𝕜\na✝ : A\nhx : ↑(splitMul 𝕜 A) (inl r✝ + ↑a✝) = 0\n⊢ inl r✝ + ↑a✝ = 0\n[PROOFSTEP]\nrw [map_add] at hx \n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NonUnitalNormedRing A\ninst✝² : NormedSpace 𝕜 A\ninst✝¹ : IsScalarTower 𝕜 A A\ninst✝ : SMulCommClass 𝕜 A A\nh : Function.Injective ↑(mul 𝕜 A)\nr✝ : 𝕜\na✝ : A\nhx : ↑(splitMul 𝕜 A) (inl r✝) + ↑(splitMul 𝕜 A) ↑a✝ = 0\n⊢ inl r✝ + ↑a✝ = 0\n[PROOFSTEP]\nsimp only [splitMul_apply, fst_inl, snd_inl, map_zero, add_zero, fst_inr, snd_inr, zero_add, Prod.mk_add_mk,\n  Prod.mk_eq_zero] at hx \n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NonUnitalNormedRing A\ninst✝² : NormedSpace 𝕜 A\ninst✝¹ : IsScalarTower 𝕜 A A\ninst✝ : SMulCommClass 𝕜 A A\nh : Function.Injective ↑(mul 𝕜 A)\nr✝ : 𝕜\na✝ : A\nhx : r✝ = 0 ∧ ↑(algebraMap 𝕜 (A →L[𝕜] A)) r✝ + ↑(mul 𝕜 A) a✝ = 0\n⊢ inl r✝ + ↑a✝ = 0\n[PROOFSTEP]\nobtain ⟨rfl, hx⟩ := hx\n[GOAL]\ncase h.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NonUnitalNormedRing A\ninst✝² : NormedSpace 𝕜 A\ninst✝¹ : IsScalarTower 𝕜 A A\ninst✝ : SMulCommClass 𝕜 A A\nh : Function.Injective ↑(mul 𝕜 A)\na✝ : A\nhx : ↑(algebraMap 𝕜 (A →L[𝕜] A)) 0 + ↑(mul 𝕜 A) a✝ = 0\n⊢ inl 0 + ↑a✝ = 0\n[PROOFSTEP]\nsimp only [map_zero, zero_add, inl_zero] at hx ⊢\n[GOAL]\ncase h.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NonUnitalNormedRing A\ninst✝² : NormedSpace 𝕜 A\ninst✝¹ : IsScalarTower 𝕜 A A\ninst✝ : SMulCommClass 𝕜 A A\nh : Function.Injective ↑(mul 𝕜 A)\na✝ : A\nhx : ↑(mul 𝕜 A) a✝ = 0\n⊢ ↑a✝ = 0\n[PROOFSTEP]\nrw [← map_zero (mul 𝕜 A)] at hx \n[GOAL]\ncase h.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NonUnitalNormedRing A\ninst✝² : NormedSpace 𝕜 A\ninst✝¹ : IsScalarTower 𝕜 A A\ninst✝ : SMulCommClass 𝕜 A A\nh : Function.Injective ↑(mul 𝕜 A)\na✝ : A\nhx : ↑(mul 𝕜 A) a✝ = ↑(mul 𝕜 A) 0\n⊢ ↑a✝ = 0\n[PROOFSTEP]\nrw [h hx, inr_zero]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n⊢ ‖x‖ = ‖fst x‖ ⊔ ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x)‖\n[PROOFSTEP]\nrw [norm_def, splitMul_apply, Prod.norm_def, sup_eq_max]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\n⊢ LipschitzWith 2 ↑(addEquiv 𝕜 A)\n[PROOFSTEP]\nrw [← Real.toNNReal_ofNat]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\n⊢ LipschitzWith (Real.toNNReal 2) ↑(addEquiv 𝕜 A)\n[PROOFSTEP]\nrefine AddMonoidHomClass.lipschitz_of_bound (Unitization.addEquiv 𝕜 A) 2 fun x => ?_\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n⊢ ‖↑(addEquiv 𝕜 A) x‖ ≤ 2 * ‖x‖\n[PROOFSTEP]\nrw [norm_eq_sup, Prod.norm_def]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n⊢ max ‖(↑(addEquiv 𝕜 A) x).fst‖ ‖(↑(addEquiv 𝕜 A) x).snd‖ ≤\n    2 * (‖fst x‖ ⊔ ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x)‖)\n[PROOFSTEP]\nrefine' max_le ?_ ?_\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n⊢ ‖(↑(addEquiv 𝕜 A) x).fst‖ ≤ 2 * (‖fst x‖ ⊔ ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x)‖)\n[PROOFSTEP]\nrw [sup_eq_max, mul_max_of_nonneg _ _ (zero_le_two : (0 : ℝ) ≤ 2)]\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n⊢ ‖(↑(addEquiv 𝕜 A) x).fst‖ ≤ max (2 * ‖fst x‖) (2 * ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x)‖)\n[PROOFSTEP]\nexact le_max_of_le_left ((le_add_of_nonneg_left (norm_nonneg _)).trans_eq (two_mul _).symm)\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n⊢ ‖(↑(addEquiv 𝕜 A) x).snd‖ ≤ 2 * (‖fst x‖ ⊔ ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x)‖)\n[PROOFSTEP]\nnontriviality A\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n✝ : Nontrivial A\n⊢ ‖(↑(addEquiv 𝕜 A) x).snd‖ ≤ 2 * (‖fst x‖ ⊔ ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x)‖)\n[PROOFSTEP]\nrw [two_mul]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n✝ : Nontrivial A\n⊢ ‖(↑(addEquiv 𝕜 A) x).snd‖ ≤\n    ‖fst x‖ ⊔ ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x)‖ +\n      ‖fst x‖ ⊔ ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x)‖\n[PROOFSTEP]\ncalc\n  ‖x.snd‖ = ‖mul 𝕜 A x.snd‖ := .symm <| (isometry_mul 𝕜 A).norm_map_of_map_zero (map_zero _) _\n  _ ≤ ‖algebraMap 𝕜 _ x.fst + mul 𝕜 A x.snd‖ + ‖x.fst‖ := by\n    simpa only [add_comm _ (mul 𝕜 A x.snd), norm_algebraMap'] using\n      norm_le_add_norm_add (mul 𝕜 A x.snd) (algebraMap 𝕜 _ x.fst)\n  _ ≤ _ := add_le_add le_sup_right le_sup_left\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n✝ : Nontrivial A\n⊢ ‖↑(mul 𝕜 A) (snd x)‖ ≤ ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x)‖ + ‖fst x‖\n[PROOFSTEP]\nsimpa only [add_comm _ (mul 𝕜 A x.snd), norm_algebraMap'] using\n  norm_le_add_norm_add (mul 𝕜 A x.snd) (algebraMap 𝕜 _ x.fst)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\n⊢ AntilipschitzWith 2 ↑(addEquiv 𝕜 A)\n[PROOFSTEP]\nrefine AddMonoidHomClass.antilipschitz_of_bound (addEquiv 𝕜 A) fun x => ?_\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n⊢ ‖x‖ ≤ ↑2 * ‖↑(addEquiv 𝕜 A) x‖\n[PROOFSTEP]\nrw [norm_eq_sup, Prod.norm_def, NNReal.coe_two]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n⊢ ‖fst x‖ ⊔ ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x)‖ ≤\n    2 * max ‖(↑(addEquiv 𝕜 A) x).fst‖ ‖(↑(addEquiv 𝕜 A) x).snd‖\n[PROOFSTEP]\nrefine max_le ?_ ?_\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n⊢ ‖fst x‖ ≤ 2 * max ‖(↑(addEquiv 𝕜 A) x).fst‖ ‖(↑(addEquiv 𝕜 A) x).snd‖\n[PROOFSTEP]\nrw [mul_max_of_nonneg _ _ (zero_le_two : (0 : ℝ) ≤ 2)]\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n⊢ ‖fst x‖ ≤ max (2 * ‖(↑(addEquiv 𝕜 A) x).fst‖) (2 * ‖(↑(addEquiv 𝕜 A) x).snd‖)\n[PROOFSTEP]\nexact le_max_of_le_left ((le_add_of_nonneg_left (norm_nonneg _)).trans_eq (two_mul _).symm)\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n⊢ ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x)‖ ≤\n    2 * max ‖(↑(addEquiv 𝕜 A) x).fst‖ ‖(↑(addEquiv 𝕜 A) x).snd‖\n[PROOFSTEP]\nnontriviality A\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n✝ : Nontrivial A\n⊢ ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x) + ↑(mul 𝕜 A) (snd x)‖ ≤\n    2 * max ‖(↑(addEquiv 𝕜 A) x).fst‖ ‖(↑(addEquiv 𝕜 A) x).snd‖\n[PROOFSTEP]\ncalc\n  ‖algebraMap 𝕜 _ x.fst + mul 𝕜 A x.snd‖ ≤ ‖algebraMap 𝕜 _ x.fst‖ + ‖mul 𝕜 A x.snd‖ := norm_add_le _ _\n  _ = ‖x.fst‖ + ‖x.snd‖ := by\n    rw [norm_algebraMap', (AddMonoidHomClass.isometry_iff_norm (mul 𝕜 A)).mp (isometry_mul 𝕜 A)]\n  _ ≤ _ := (add_le_add (le_max_left _ _) (le_max_right _ _)).trans_eq (two_mul _).symm\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : Unitization 𝕜 A\n✝ : Nontrivial A\n⊢ ‖↑(algebraMap 𝕜 (A →L[𝕜] A)) (fst x)‖ + ‖↑(mul 𝕜 A) (snd x)‖ = ‖fst x‖ + ‖snd x‖\n[PROOFSTEP]\nrw [norm_algebraMap', (AddMonoidHomClass.isometry_iff_norm (mul 𝕜 A)).mp (isometry_mul 𝕜 A)]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\n⊢ 𝓤 (Unitization 𝕜 A) = 𝓤 (Unitization 𝕜 A)\n[PROOFSTEP]\nhave key : UniformInducing (addEquiv 𝕜 A) :=\n  antilipschitzWith_addEquiv.uniformInducing lipschitzWith_addEquiv.uniformContinuous\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nkey : UniformInducing ↑(addEquiv 𝕜 A)\n⊢ 𝓤 (Unitization 𝕜 A) = 𝓤 (Unitization 𝕜 A)\n[PROOFSTEP]\nrw [← key.comap_uniformity]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nkey : UniformInducing ↑(addEquiv 𝕜 A)\n⊢ 𝓤 (Unitization 𝕜 A) = comap (fun x => (↑(addEquiv 𝕜 A) x.fst, ↑(addEquiv 𝕜 A) x.snd)) (𝓤 (𝕜 × A))\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nk : 𝕜\nx : Unitization 𝕜 A\n⊢ ‖k • x‖ ≤ ‖k‖ * ‖x‖\n[PROOFSTEP]\nrw [norm_def, map_smul, norm_smul, ← norm_def]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\n⊢ ‖1‖ = 1\n[PROOFSTEP]\nsimpa only [norm_eq_sup, fst_one, norm_one, snd_one, map_one, map_zero, add_zero, ge_iff_le, sup_eq_left] using\n  op_norm_le_bound _ zero_le_one fun x => by simp\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\nx : A\n⊢ ‖↑1 x‖ ≤ 1 * ‖x‖\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁵ : NontriviallyNormedField 𝕜\ninst✝⁴ : NonUnitalNormedRing A\ninst✝³ : NormedSpace 𝕜 A\ninst✝² : IsScalarTower 𝕜 A A\ninst✝¹ : SMulCommClass 𝕜 A A\ninst✝ : RegularNormedAlgebra 𝕜 A\na : A\n⊢ ‖↑a‖ = ‖a‖\n[PROOFSTEP]\nsimp [norm_eq_sup]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.Unitization", "llama_tokens": 7675, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7341195269001831, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.37279460555894955}}
{"text": "[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nh : HasStrictDerivAt e e' ↑z\n⊢ HasStrictDerivAt (fun x => (e ↑x).re) e'.re z\n[PROOFSTEP]\nhave A : HasStrictFDerivAt ((↑) : ℝ → ℂ) ofRealClm z := ofRealClm.hasStrictFDerivAt\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nh : HasStrictDerivAt e e' ↑z\nA : HasStrictFDerivAt ofReal' ofRealClm z\n⊢ HasStrictDerivAt (fun x => (e ↑x).re) e'.re z\n[PROOFSTEP]\nhave B : HasStrictFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : ℂ →L[ℂ] ℂ).restrictScalars ℝ) (ofRealClm z) :=\n  h.hasStrictFDerivAt.restrictScalars ℝ\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nh : HasStrictDerivAt e e' ↑z\nA : HasStrictFDerivAt ofReal' ofRealClm z\nB : HasStrictFDerivAt e (ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (↑ofRealClm z)\n⊢ HasStrictDerivAt (fun x => (e ↑x).re) e'.re z\n[PROOFSTEP]\nhave C : HasStrictFDerivAt re reClm (e (ofRealClm z)) := reClm.hasStrictFDerivAt\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nh : HasStrictDerivAt e e' ↑z\nA : HasStrictFDerivAt ofReal' ofRealClm z\nB : HasStrictFDerivAt e (ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (↑ofRealClm z)\nC : HasStrictFDerivAt re reClm (e (↑ofRealClm z))\n⊢ HasStrictDerivAt (fun x => (e ↑x).re) e'.re z\n[PROOFSTEP]\nconvert (C.comp z (B.comp z A)).hasStrictDerivAt\n[GOAL]\ncase h.e'_7\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nh : HasStrictDerivAt e e' ↑z\nA : HasStrictFDerivAt ofReal' ofRealClm z\nB : HasStrictFDerivAt e (ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (↑ofRealClm z)\nC : HasStrictFDerivAt re reClm (e (↑ofRealClm z))\n⊢ e'.re =\n    ↑(ContinuousLinearMap.comp reClm\n          (ContinuousLinearMap.comp (ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e'))\n            ofRealClm))\n      1\n[PROOFSTEP]\nrw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]\n[GOAL]\ncase h.e'_7\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nh : HasStrictDerivAt e e' ↑z\nA : HasStrictFDerivAt ofReal' ofRealClm z\nB : HasStrictFDerivAt e (ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (↑ofRealClm z)\nC : HasStrictFDerivAt re reClm (e (↑ofRealClm z))\n⊢ e'.re = ↑reClm (↑(ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (↑ofRealClm 1))\n[PROOFSTEP]\nsimp\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nh : HasDerivAt e e' ↑z\n⊢ HasDerivAt (fun x => (e ↑x).re) e'.re z\n[PROOFSTEP]\nhave A : HasFDerivAt ((↑) : ℝ → ℂ) ofRealClm z := ofRealClm.hasFDerivAt\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nh : HasDerivAt e e' ↑z\nA : HasFDerivAt ofReal' ofRealClm z\n⊢ HasDerivAt (fun x => (e ↑x).re) e'.re z\n[PROOFSTEP]\nhave B : HasFDerivAt e ((ContinuousLinearMap.smulRight 1 e' : ℂ →L[ℂ] ℂ).restrictScalars ℝ) (ofRealClm z) :=\n  h.hasFDerivAt.restrictScalars ℝ\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nh : HasDerivAt e e' ↑z\nA : HasFDerivAt ofReal' ofRealClm z\nB : HasFDerivAt e (ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (↑ofRealClm z)\n⊢ HasDerivAt (fun x => (e ↑x).re) e'.re z\n[PROOFSTEP]\nhave C : HasFDerivAt re reClm (e (ofRealClm z)) := reClm.hasFDerivAt\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nh : HasDerivAt e e' ↑z\nA : HasFDerivAt ofReal' ofRealClm z\nB : HasFDerivAt e (ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (↑ofRealClm z)\nC : HasFDerivAt re reClm (e (↑ofRealClm z))\n⊢ HasDerivAt (fun x => (e ↑x).re) e'.re z\n[PROOFSTEP]\nconvert (C.comp z (B.comp z A)).hasDerivAt\n[GOAL]\ncase h.e'_7\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nh : HasDerivAt e e' ↑z\nA : HasFDerivAt ofReal' ofRealClm z\nB : HasFDerivAt e (ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (↑ofRealClm z)\nC : HasFDerivAt re reClm (e (↑ofRealClm z))\n⊢ e'.re =\n    ↑(ContinuousLinearMap.comp reClm\n          (ContinuousLinearMap.comp (ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e'))\n            ofRealClm))\n      1\n[PROOFSTEP]\nrw [ContinuousLinearMap.comp_apply, ContinuousLinearMap.comp_apply]\n[GOAL]\ncase h.e'_7\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nh : HasDerivAt e e' ↑z\nA : HasFDerivAt ofReal' ofRealClm z\nB : HasFDerivAt e (ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (↑ofRealClm z)\nC : HasFDerivAt re reClm (e (↑ofRealClm z))\n⊢ e'.re = ↑reClm (↑(ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (↑ofRealClm 1))\n[PROOFSTEP]\nsimp\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nn : ℕ∞\nh : ContDiffAt ℂ n e ↑z\n⊢ ContDiffAt ℝ n (fun x => (e ↑x).re) z\n[PROOFSTEP]\nhave A : ContDiffAt ℝ n ((↑) : ℝ → ℂ) z := ofRealClm.contDiff.contDiffAt\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nn : ℕ∞\nh : ContDiffAt ℂ n e ↑z\nA : ContDiffAt ℝ n ofReal' z\n⊢ ContDiffAt ℝ n (fun x => (e ↑x).re) z\n[PROOFSTEP]\nhave B : ContDiffAt ℝ n e z := h.restrict_scalars ℝ\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nn : ℕ∞\nh : ContDiffAt ℂ n e ↑z\nA : ContDiffAt ℝ n ofReal' z\nB : ContDiffAt ℝ n e ↑z\n⊢ ContDiffAt ℝ n (fun x => (e ↑x).re) z\n[PROOFSTEP]\nhave C : ContDiffAt ℝ n re (e z) := reClm.contDiff.contDiffAt\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nn : ℕ∞\nh : ContDiffAt ℂ n e ↑z\nA : ContDiffAt ℝ n ofReal' z\nB : ContDiffAt ℝ n e ↑z\nC : ContDiffAt ℝ n re (e ↑z)\n⊢ ContDiffAt ℝ n (fun x => (e ↑x).re) z\n[PROOFSTEP]\nexact C.comp z (B.comp z A)\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → E\nx : ℂ\nf' : E\nh : HasStrictDerivAt f f' x\n⊢ HasStrictFDerivAt f (ContinuousLinearMap.smulRight reClm f' + I • ContinuousLinearMap.smulRight imClm f') x\n[PROOFSTEP]\nsimpa only [Complex.restrictScalars_one_smulRight'] using h.hasStrictFDerivAt.restrictScalars ℝ\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → E\nx : ℂ\nf' : E\nh : HasDerivAt f f' x\n⊢ HasFDerivAt f (ContinuousLinearMap.smulRight reClm f' + I • ContinuousLinearMap.smulRight imClm f') x\n[PROOFSTEP]\nsimpa only [Complex.restrictScalars_one_smulRight'] using h.hasFDerivAt.restrictScalars ℝ\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → E\ns : Set ℂ\nx : ℂ\nf' : E\nh : HasDerivWithinAt f f' s x\n⊢ HasFDerivWithinAt f (ContinuousLinearMap.smulRight reClm f' + I • ContinuousLinearMap.smulRight imClm f') s x\n[PROOFSTEP]\nsimpa only [Complex.restrictScalars_one_smulRight'] using h.hasFDerivWithinAt.restrictScalars ℝ\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → ℂ\nf' x : ℂ\nh : HasStrictDerivAt f f' x\n⊢ HasStrictFDerivAt f (f' • 1) x\n[PROOFSTEP]\nsimpa only [Complex.restrictScalars_one_smulRight] using h.hasStrictFDerivAt.restrictScalars ℝ\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → ℂ\nf' x : ℂ\nh : HasDerivAt f f' x\n⊢ HasFDerivAt f (f' • 1) x\n[PROOFSTEP]\nsimpa only [Complex.restrictScalars_one_smulRight] using h.hasFDerivAt.restrictScalars ℝ\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → ℂ\ns : Set ℂ\nf' x : ℂ\nh : HasDerivWithinAt f f' s x\n⊢ HasFDerivWithinAt f (f' • 1) s x\n[PROOFSTEP]\nsimpa only [Complex.restrictScalars_one_smulRight] using h.hasFDerivWithinAt.restrictScalars ℝ\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nhf : HasDerivAt e e' ↑z\n⊢ HasDerivAt (fun y => e ↑y) e' z\n[PROOFSTEP]\nsimpa only [ofRealClm_apply, ofReal_one, mul_one] using hf.comp z ofRealClm.hasDerivAt\n[GOAL]\ne : ℂ → ℂ\ne' : ℂ\nz : ℝ\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → ℝ\nu : ℝ\nhf : HasDerivAt f u z\n⊢ HasDerivAt (fun y => ↑(f y)) (↑u) z\n[PROOFSTEP]\nsimpa only [ofRealClm_apply, ofReal_one, real_smul, mul_one] using ofRealClm.hasDerivAt.scomp z hf\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz : ℂ\nf : ℂ → E\nh : DifferentiableAt ℂ f z\nhf' : deriv f z ≠ 0\n⊢ ConformalAt f z\n[PROOFSTEP]\nrw [conformalAt_iff_isConformalMap_fderiv, (h.hasFDerivAt.restrictScalars ℝ).fderiv]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz : ℂ\nf : ℂ → E\nh : DifferentiableAt ℂ f z\nhf' : deriv f z ≠ 0\n⊢ IsConformalMap (ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z))\n[PROOFSTEP]\napply isConformalMap_complex_linear\n[GOAL]\ncase nonzero\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz : ℂ\nf : ℂ → E\nh : DifferentiableAt ℂ f z\nhf' : deriv f z ≠ 0\n⊢ fderiv ℂ f z ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, ext_ring_iff]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz✝ : ℂ\nf✝ : ℂ → E\nf : ℂ → ℂ\nz : ℂ\n⊢ ConformalAt f z ↔\n    (DifferentiableAt ℂ f z ∨ DifferentiableAt ℂ (f ∘ ↑(starRingEnd ℂ)) (↑(starRingEnd ℂ) z)) ∧ fderiv ℝ f z ≠ 0\n[PROOFSTEP]\nrw [conformalAt_iff_isConformalMap_fderiv]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz✝ : ℂ\nf✝ : ℂ → E\nf : ℂ → ℂ\nz : ℂ\n⊢ IsConformalMap (fderiv ℝ f z) ↔\n    (DifferentiableAt ℂ f z ∨ DifferentiableAt ℂ (f ∘ ↑(starRingEnd ℂ)) (↑(starRingEnd ℂ) z)) ∧ fderiv ℝ f z ≠ 0\n[PROOFSTEP]\nrw [isConformalMap_iff_is_complex_or_conj_linear]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz✝ : ℂ\nf✝ : ℂ → E\nf : ℂ → ℂ\nz : ℂ\n⊢ ((∃ map, restrictScalars ℝ map = fderiv ℝ f z) ∨ ∃ map, restrictScalars ℝ map = comp (fderiv ℝ f z) ↑conjCle) ∧\n      fderiv ℝ f z ≠ 0 ↔\n    (DifferentiableAt ℂ f z ∨ DifferentiableAt ℂ (f ∘ ↑(starRingEnd ℂ)) (↑(starRingEnd ℂ) z)) ∧ fderiv ℝ f z ≠ 0\n[PROOFSTEP]\napply and_congr_left\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz✝ : ℂ\nf✝ : ℂ → E\nf : ℂ → ℂ\nz : ℂ\n⊢ fderiv ℝ f z ≠ 0 →\n    (((∃ map, restrictScalars ℝ map = fderiv ℝ f z) ∨ ∃ map, restrictScalars ℝ map = comp (fderiv ℝ f z) ↑conjCle) ↔\n      DifferentiableAt ℂ f z ∨ DifferentiableAt ℂ (f ∘ ↑(starRingEnd ℂ)) (↑(starRingEnd ℂ) z))\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz✝ : ℂ\nf✝ : ℂ → E\nf : ℂ → ℂ\nz : ℂ\nh : fderiv ℝ f z ≠ 0\n⊢ ((∃ map, restrictScalars ℝ map = fderiv ℝ f z) ∨ ∃ map, restrictScalars ℝ map = comp (fderiv ℝ f z) ↑conjCle) ↔\n    DifferentiableAt ℂ f z ∨ DifferentiableAt ℂ (f ∘ ↑(starRingEnd ℂ)) (↑(starRingEnd ℂ) z)\n[PROOFSTEP]\nhave h_diff := h.imp_symm fderiv_zero_of_not_differentiableAt\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz✝ : ℂ\nf✝ : ℂ → E\nf : ℂ → ℂ\nz : ℂ\nh : fderiv ℝ f z ≠ 0\nh_diff : DifferentiableAt ℝ f z\n⊢ ((∃ map, restrictScalars ℝ map = fderiv ℝ f z) ∨ ∃ map, restrictScalars ℝ map = comp (fderiv ℝ f z) ↑conjCle) ↔\n    DifferentiableAt ℂ f z ∨ DifferentiableAt ℂ (f ∘ ↑(starRingEnd ℂ)) (↑(starRingEnd ℂ) z)\n[PROOFSTEP]\napply or_congr\n[GOAL]\ncase h.h₁\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz✝ : ℂ\nf✝ : ℂ → E\nf : ℂ → ℂ\nz : ℂ\nh : fderiv ℝ f z ≠ 0\nh_diff : DifferentiableAt ℝ f z\n⊢ (∃ map, restrictScalars ℝ map = fderiv ℝ f z) ↔ DifferentiableAt ℂ f z\n[PROOFSTEP]\nrw [differentiableAt_iff_restrictScalars ℝ h_diff]\n[GOAL]\ncase h.h₂\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz✝ : ℂ\nf✝ : ℂ → E\nf : ℂ → ℂ\nz : ℂ\nh : fderiv ℝ f z ≠ 0\nh_diff : DifferentiableAt ℝ f z\n⊢ (∃ map, restrictScalars ℝ map = comp (fderiv ℝ f z) ↑conjCle) ↔\n    DifferentiableAt ℂ (f ∘ ↑(starRingEnd ℂ)) (↑(starRingEnd ℂ) z)\n[PROOFSTEP]\nrw [← conj_conj z] at h_diff \n[GOAL]\ncase h.h₂\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz✝ : ℂ\nf✝ : ℂ → E\nf : ℂ → ℂ\nz : ℂ\nh : fderiv ℝ f z ≠ 0\nh_diff : DifferentiableAt ℝ f (↑(starRingEnd ℂ) (↑(starRingEnd ℂ) z))\n⊢ (∃ map, restrictScalars ℝ map = comp (fderiv ℝ f z) ↑conjCle) ↔\n    DifferentiableAt ℂ (f ∘ ↑(starRingEnd ℂ)) (↑(starRingEnd ℂ) z)\n[PROOFSTEP]\nrw [differentiableAt_iff_restrictScalars ℝ (h_diff.comp _ conjCle.differentiableAt)]\n[GOAL]\ncase h.h₂\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz✝ : ℂ\nf✝ : ℂ → E\nf : ℂ → ℂ\nz : ℂ\nh : fderiv ℝ f z ≠ 0\nh_diff : DifferentiableAt ℝ f (↑(starRingEnd ℂ) (↑(starRingEnd ℂ) z))\n⊢ (∃ map, restrictScalars ℝ map = comp (fderiv ℝ f z) ↑conjCle) ↔\n    ∃ g', restrictScalars ℝ g' = fderiv ℝ (f ∘ ↑(starRingEnd ℂ)) (↑(starRingEnd ℂ) z)\n[PROOFSTEP]\nrefine' exists_congr fun g => rfl.congr _\n[GOAL]\ncase h.h₂\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz✝ : ℂ\nf✝ : ℂ → E\nf : ℂ → ℂ\nz : ℂ\nh : fderiv ℝ f z ≠ 0\nh_diff : DifferentiableAt ℝ f (↑(starRingEnd ℂ) (↑(starRingEnd ℂ) z))\ng : ℂ →L[ℂ] ℂ\n⊢ comp (fderiv ℝ f z) ↑conjCle = fderiv ℝ (f ∘ ↑(starRingEnd ℂ)) (↑(starRingEnd ℂ) z)\n[PROOFSTEP]\nhave : fderiv ℝ conj (conj z) = _ := conjCle.fderiv\n[GOAL]\ncase h.h₂\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nz✝ : ℂ\nf✝ : ℂ → E\nf : ℂ → ℂ\nz : ℂ\nh : fderiv ℝ f z ≠ 0\nh_diff : DifferentiableAt ℝ f (↑(starRingEnd ℂ) (↑(starRingEnd ℂ) z))\ng : ℂ →L[ℂ] ℂ\nthis : fderiv ℝ (↑(starRingEnd ((fun x => ℂ) z))) (↑(starRingEnd ℂ) z) = ↑conjCle\n⊢ comp (fderiv ℝ f z) ↑conjCle = fderiv ℝ (f ∘ ↑(starRingEnd ℂ)) (↑(starRingEnd ℂ) z)\n[PROOFSTEP]\nsimp [fderiv.comp _ h_diff conjCle.differentiableAt, this, conj_conj]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.RealDeriv", "llama_tokens": 6536, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6859494550081925, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.372376773236138}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na b : α\n⊢ (fun n => dist a (x n) - dist (x 0) (x n)) ∈ lp (fun i => ℝ) ⊤\n[PROOFSTEP]\napply memℓp_infty\n[GOAL]\ncase hf\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na b : α\n⊢ BddAbove (range fun i => ‖(fun n => dist a (x n) - dist (x 0) (x n)) i‖)\n[PROOFSTEP]\nuse dist a (x 0)\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na b : α\n⊢ dist a (x 0) ∈ upperBounds (range fun i => ‖(fun n => dist a (x n) - dist (x 0) (x n)) i‖)\n[PROOFSTEP]\nrintro - ⟨n, rfl⟩\n[GOAL]\ncase h.intro\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na b : α\nn : ℕ\n⊢ (fun i => ‖(fun n => dist a (x n) - dist (x 0) (x n)) i‖) n ≤ dist a (x 0)\n[PROOFSTEP]\nexact abs_dist_sub_le _ _ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ a b : α\n⊢ dist (embeddingOfSubset x a) (embeddingOfSubset x b) ≤ dist a b\n[PROOFSTEP]\nrefine' lp.norm_le_of_forall_le dist_nonneg fun n => _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ a b : α\nn : ℕ\n⊢ ‖↑(embeddingOfSubset x a - embeddingOfSubset x b) n‖ ≤ dist a b\n[PROOFSTEP]\nsimp only [lp.coeFn_sub, Pi.sub_apply, embeddingOfSubset_coe, Real.dist_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ a b : α\nn : ℕ\n⊢ ‖dist a (x n) - dist (x 0) (x n) - (dist b (x n) - dist (x 0) (x n))‖ ≤ dist a b\n[PROOFSTEP]\nconvert abs_dist_sub_le a b (x n) using 2\n[GOAL]\ncase h.e'_3.h.e'_1\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ a b : α\nn : ℕ\n⊢ dist a (x n) - dist (x 0) (x n) - (dist b (x n) - dist (x 0) (x n)) = dist a (x n) - dist b (x n)\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na b : α\nH : DenseRange x\n⊢ Isometry (embeddingOfSubset x)\n[PROOFSTEP]\nrefine' Isometry.of_dist_eq fun a b => _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\n⊢ dist (embeddingOfSubset x a) (embeddingOfSubset x b) = dist a b\n[PROOFSTEP]\nrefine'\n  (embeddingOfSubset_dist_le x a b).antisymm\n    (le_of_forall_pos_le_add fun e epos => _)\n      -- First step: find n with dist a (x n) < e\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\n⊢ dist a b ≤ dist (embeddingOfSubset x a) (embeddingOfSubset x b) + e\n[PROOFSTEP]\nrcases Metric.mem_closure_range_iff.1 (H a) (e / 2) (half_pos epos) with\n  ⟨n, hn⟩\n    -- Second step: use the norm control at index n to conclude\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\n⊢ dist a b ≤ dist (embeddingOfSubset x a) (embeddingOfSubset x b) + e\n[PROOFSTEP]\nhave C : dist b (x n) - dist a (x n) = embeddingOfSubset x b n - embeddingOfSubset x a n := by\n  simp only [embeddingOfSubset_coe, sub_sub_sub_cancel_right]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\n⊢ dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\n[PROOFSTEP]\nsimp only [embeddingOfSubset_coe, sub_sub_sub_cancel_right]\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\n⊢ dist a b ≤ dist (embeddingOfSubset x a) (embeddingOfSubset x b) + e\n[PROOFSTEP]\nhave :=\n  calc\n    dist a b ≤ dist a (x n) + dist (x n) b := dist_triangle _ _ _\n    _ = 2 * dist a (x n) + (dist b (x n) - dist a (x n)) := by simp [dist_comm]; ring\n    _ ≤ 2 * dist a (x n) + |dist b (x n) - dist a (x n)| := by apply_rules [add_le_add_left, le_abs_self]\n    _ ≤ 2 * (e / 2) + |embeddingOfSubset x b n - embeddingOfSubset x a n| :=\n      by\n      rw [C]\n      apply_rules [add_le_add, mul_le_mul_of_nonneg_left, hn.le, le_refl]\n      norm_num\n    _ ≤ 2 * (e / 2) + dist (embeddingOfSubset x b) (embeddingOfSubset x a) :=\n      by\n      have :\n        |embeddingOfSubset x b n - embeddingOfSubset x a n| ≤ dist (embeddingOfSubset x b) (embeddingOfSubset x a) :=\n        by\n        simp only [dist_eq_norm]\n        exact lp.norm_apply_le_norm ENNReal.top_ne_zero (embeddingOfSubset x b - embeddingOfSubset x a) n\n      nlinarith\n    _ = dist (embeddingOfSubset x b) (embeddingOfSubset x a) + e := by ring\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\n⊢ dist a (x n) + dist (x n) b = 2 * dist a (x n) + (dist b (x n) - dist a (x n))\n[PROOFSTEP]\nsimp [dist_comm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\n⊢ dist a (x n) + dist b (x n) = 2 * dist a (x n) + (dist b (x n) - dist a (x n))\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\n⊢ 2 * dist a (x n) + (dist b (x n) - dist a (x n)) ≤ 2 * dist a (x n) + |dist b (x n) - dist a (x n)|\n[PROOFSTEP]\napply_rules [add_le_add_left, le_abs_self]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\n⊢ 2 * dist a (x n) + |dist b (x n) - dist a (x n)| ≤\n    2 * (e / 2) + |↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n|\n[PROOFSTEP]\nrw [C]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\n⊢ 2 * dist a (x n) + |↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n| ≤\n    2 * (e / 2) + |↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n|\n[PROOFSTEP]\napply_rules [add_le_add, mul_le_mul_of_nonneg_left, hn.le, le_refl]\n[GOAL]\ncase h₁.a0\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\nC_symm : ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n = dist b (x n) - dist a (x n)\n⊢ 0 ≤ 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\n⊢ 2 * (e / 2) + |↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n| ≤\n    2 * (e / 2) + dist (embeddingOfSubset x b) (embeddingOfSubset x a)\n[PROOFSTEP]\nhave : |embeddingOfSubset x b n - embeddingOfSubset x a n| ≤ dist (embeddingOfSubset x b) (embeddingOfSubset x a) :=\n  by\n  simp only [dist_eq_norm]\n  exact lp.norm_apply_le_norm ENNReal.top_ne_zero (embeddingOfSubset x b - embeddingOfSubset x a) n\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\n⊢ |↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n| ≤ dist (embeddingOfSubset x b) (embeddingOfSubset x a)\n[PROOFSTEP]\nsimp only [dist_eq_norm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\n⊢ |↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n| ≤ ‖embeddingOfSubset x b - embeddingOfSubset x a‖\n[PROOFSTEP]\nexact lp.norm_apply_le_norm ENNReal.top_ne_zero (embeddingOfSubset x b - embeddingOfSubset x a) n\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\nthis : |↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n| ≤ dist (embeddingOfSubset x b) (embeddingOfSubset x a)\n⊢ 2 * (e / 2) + |↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n| ≤\n    2 * (e / 2) + dist (embeddingOfSubset x b) (embeddingOfSubset x a)\n[PROOFSTEP]\nnlinarith\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\n⊢ 2 * (e / 2) + dist (embeddingOfSubset x b) (embeddingOfSubset x a) =\n    dist (embeddingOfSubset x b) (embeddingOfSubset x a) + e\n[PROOFSTEP]\nring\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn✝ : ℕ\nC✝ : ℝ\ninst✝ : MetricSpace α\nx : ℕ → α\na✝ b✝ : α\nH : DenseRange x\na b : α\ne : ℝ\nepos : 0 < e\nn : ℕ\nhn : dist a (x n) < e / 2\nC : dist b (x n) - dist a (x n) = ↑(embeddingOfSubset x b) n - ↑(embeddingOfSubset x a) n\nthis : dist a b ≤ dist (embeddingOfSubset x b) (embeddingOfSubset x a) + e\n⊢ dist a b ≤ dist (embeddingOfSubset x a) (embeddingOfSubset x b) + e\n[PROOFSTEP]\nsimpa [dist_comm] using this\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝² : MetricSpace α✝\nx : ℕ → α✝\na b : α✝\nα : Type u\ninst✝¹ : MetricSpace α\ninst✝ : SeparableSpace α\n⊢ ∃ f, Isometry f\n[PROOFSTEP]\ncases' (univ : Set α).eq_empty_or_nonempty with h h\n[GOAL]\ncase inl\nα✝ : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝² : MetricSpace α✝\nx : ℕ → α✝\na b : α✝\nα : Type u\ninst✝¹ : MetricSpace α\ninst✝ : SeparableSpace α\nh : univ = ∅\n⊢ ∃ f, Isometry f\n[PROOFSTEP]\nuse fun _ => 0\n[GOAL]\ncase h\nα✝ : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝² : MetricSpace α✝\nx : ℕ → α✝\na b : α✝\nα : Type u\ninst✝¹ : MetricSpace α\ninst✝ : SeparableSpace α\nh : univ = ∅\n⊢ Isometry fun x => 0\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nα✝ : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝² : MetricSpace α✝\nx✝ : ℕ → α✝\na b : α✝\nα : Type u\ninst✝¹ : MetricSpace α\ninst✝ : SeparableSpace α\nh : univ = ∅\nx : α\n⊢ ∀ (x2 : α), edist ((fun x => 0) x) ((fun x => 0) x2) = edist x x2\n[PROOFSTEP]\nexact absurd h (Nonempty.ne_empty ⟨x, mem_univ x⟩)\n[GOAL]\ncase inr\nα✝ : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝² : MetricSpace α✝\nx : ℕ → α✝\na b : α✝\nα : Type u\ninst✝¹ : MetricSpace α\ninst✝ : SeparableSpace α\nh : Set.Nonempty univ\n⊢ ∃ f, Isometry f\n[PROOFSTEP]\nrcases h with ⟨basepoint⟩\n[GOAL]\ncase inr.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝² : MetricSpace α✝\nx : ℕ → α✝\na b : α✝\nα : Type u\ninst✝¹ : MetricSpace α\ninst✝ : SeparableSpace α\nbasepoint : α\nh✝ : basepoint ∈ univ\n⊢ ∃ f, Isometry f\n[PROOFSTEP]\nhaveI : Inhabited α := ⟨basepoint⟩\n[GOAL]\ncase inr.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝² : MetricSpace α✝\nx : ℕ → α✝\na b : α✝\nα : Type u\ninst✝¹ : MetricSpace α\ninst✝ : SeparableSpace α\nbasepoint : α\nh✝ : basepoint ∈ univ\nthis : Inhabited α\n⊢ ∃ f, Isometry f\n[PROOFSTEP]\nhave : ∃ s : Set α, s.Countable ∧ Dense s := exists_countable_dense α\n[GOAL]\ncase inr.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝² : MetricSpace α✝\nx : ℕ → α✝\na b : α✝\nα : Type u\ninst✝¹ : MetricSpace α\ninst✝ : SeparableSpace α\nbasepoint : α\nh✝ : basepoint ∈ univ\nthis✝ : Inhabited α\nthis : ∃ s, Set.Countable s ∧ Dense s\n⊢ ∃ f, Isometry f\n[PROOFSTEP]\nrcases this with ⟨S, ⟨S_countable, S_dense⟩⟩\n[GOAL]\ncase inr.intro.intro.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝² : MetricSpace α✝\nx : ℕ → α✝\na b : α✝\nα : Type u\ninst✝¹ : MetricSpace α\ninst✝ : SeparableSpace α\nbasepoint : α\nh✝ : basepoint ∈ univ\nthis : Inhabited α\nS : Set α\nS_countable : Set.Countable S\nS_dense : Dense S\n⊢ ∃ f, Isometry f\n[PROOFSTEP]\nrcases Set.countable_iff_exists_subset_range.1 S_countable with\n  ⟨x, x_range⟩\n    -- Use embeddingOfSubset to construct the desired isometry\n[GOAL]\ncase inr.intro.intro.intro.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\nf g : { x // x ∈ lp (fun i => ℝ) ⊤ }\nn : ℕ\nC : ℝ\ninst✝² : MetricSpace α✝\nx✝ : ℕ → α✝\na b : α✝\nα : Type u\ninst✝¹ : MetricSpace α\ninst✝ : SeparableSpace α\nbasepoint : α\nh✝ : basepoint ∈ univ\nthis : Inhabited α\nS : Set α\nS_countable : Set.Countable S\nS_dense : Dense S\nx : ℕ → α\nx_range : S ⊆ range x\n⊢ ∃ f, Isometry f\n[PROOFSTEP]\nexact ⟨embeddingOfSubset x, embeddingOfSubset_isometry x (S_dense.mono x_range)⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : LipschitzOnWith K f s\n⊢ ∃ g, LipschitzWith K g ∧ EqOn f g s\n[PROOFSTEP]\nrw [LipschitzOnWith.coordinate] at hfl \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\n⊢ ∃ g, LipschitzWith K g ∧ EqOn f g s\n[PROOFSTEP]\nhave : ∀ i : ι, ∃ g : α → ℝ, LipschitzWith K g ∧ EqOn (fun x => f x i) g s\n[GOAL]\ncase this\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\n⊢ ∀ (i : ι), ∃ g, LipschitzWith K g ∧ EqOn (fun x => ↑(f x) i) g s\n[PROOFSTEP]\nintro i\n[GOAL]\ncase this\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ni : ι\n⊢ ∃ g, LipschitzWith K g ∧ EqOn (fun x => ↑(f x) i) g s\n[PROOFSTEP]\nexact\n  LipschitzOnWith.extend_real\n    (hfl i)\n      -- use the nonlinear Hahn-Banach theorem here!\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\nthis : ∀ (i : ι), ∃ g, LipschitzWith K g ∧ EqOn (fun x => ↑(f x) i) g s\n⊢ ∃ g, LipschitzWith K g ∧ EqOn f g s\n[PROOFSTEP]\nchoose g hgl hgeq using this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\n⊢ ∃ g, LipschitzWith K g ∧ EqOn f g s\n[PROOFSTEP]\nrcases s.eq_empty_or_nonempty with rfl | ⟨a₀, ha₀_in_s⟩\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) ∅\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) ∅\n⊢ ∃ g, LipschitzWith K g ∧ EqOn f g ∅\n[PROOFSTEP]\nexact ⟨0, LipschitzWith.const' 0, by simp⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) ∅\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) ∅\n⊢ EqOn f 0 ∅\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.intro\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\n⊢ ∃ g, LipschitzWith K g ∧ EqOn f g s\n[PROOFSTEP]\nhave hf_extb : ∀ a : α, Memℓp (swap g a) ∞\n[GOAL]\ncase hf_extb\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\n⊢ ∀ (a : α), Memℓp (swap g a) ⊤\n[PROOFSTEP]\napply LipschitzWith.uniformly_bounded (swap g) hgl a₀\n[GOAL]\ncase hf_extb\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\n⊢ Memℓp (swap g a₀) ⊤\n[PROOFSTEP]\nuse‖f a₀‖\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\n⊢ ‖f a₀‖ ∈ upperBounds (range fun i => ‖swap g a₀ i‖)\n[PROOFSTEP]\nrintro - ⟨i, rfl⟩\n[GOAL]\ncase h.intro\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\ni : ι\n⊢ (fun i => ‖swap g a₀ i‖) i ≤ ‖f a₀‖\n[PROOFSTEP]\nsimp_rw [← hgeq i ha₀_in_s]\n[GOAL]\ncase h.intro\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\ni : ι\n⊢ ‖↑(f a₀) i‖ ≤ ‖f a₀‖\n[PROOFSTEP]\nexact lp.norm_apply_le_norm top_ne_zero (f a₀) i\n[GOAL]\ncase inr.intro\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\nhf_extb : ∀ (a : α), Memℓp (swap g a) ⊤\n⊢ ∃ g, LipschitzWith K g ∧ EqOn f g s\n[PROOFSTEP]\nlet f_ext' : α → ℓ^∞(ι) := fun i ↦ ⟨swap g i, hf_extb i⟩\n[GOAL]\ncase inr.intro\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\nhf_extb : ∀ (a : α), Memℓp (swap g a) ⊤\nf_ext' : α → { x // x ∈ lp (fun i => ℝ) ⊤ } := fun i => { val := swap g i, property := (_ : Memℓp (swap g i) ⊤) }\n⊢ ∃ g, LipschitzWith K g ∧ EqOn f g s\n[PROOFSTEP]\nrefine ⟨f_ext', ?_, ?_⟩\n[GOAL]\ncase inr.intro.refine_1\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\nhf_extb : ∀ (a : α), Memℓp (swap g a) ⊤\nf_ext' : α → { x // x ∈ lp (fun i => ℝ) ⊤ } := fun i => { val := swap g i, property := (_ : Memℓp (swap g i) ⊤) }\n⊢ LipschitzWith K f_ext'\n[PROOFSTEP]\nrw [LipschitzWith.coordinate]\n[GOAL]\ncase inr.intro.refine_1\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\nhf_extb : ∀ (a : α), Memℓp (swap g a) ⊤\nf_ext' : α → { x // x ∈ lp (fun i => ℝ) ⊤ } := fun i => { val := swap g i, property := (_ : Memℓp (swap g i) ⊤) }\n⊢ ∀ (i : ι), LipschitzWith K fun a => ↑(f_ext' a) i\n[PROOFSTEP]\nexact hgl\n[GOAL]\ncase inr.intro.refine_2\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\nhf_extb : ∀ (a : α), Memℓp (swap g a) ⊤\nf_ext' : α → { x // x ∈ lp (fun i => ℝ) ⊤ } := fun i => { val := swap g i, property := (_ : Memℓp (swap g i) ⊤) }\n⊢ EqOn f f_ext' s\n[PROOFSTEP]\nintro a hyp\n[GOAL]\ncase inr.intro.refine_2\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\nhf_extb : ∀ (a : α), Memℓp (swap g a) ⊤\nf_ext' : α → { x // x ∈ lp (fun i => ℝ) ⊤ } := fun i => { val := swap g i, property := (_ : Memℓp (swap g i) ⊤) }\na : α\nhyp : a ∈ s\n⊢ f a = f_ext' a\n[PROOFSTEP]\next i\n[GOAL]\ncase inr.intro.refine_2.h.h\nα : Type u\nβ : Type v\nγ : Type w\nι : Type u_1\ninst✝ : PseudoMetricSpace α\ns : Set α\nf : α → { x // x ∈ lp (fun i => ℝ) ⊤ }\nK : ℝ≥0\nhfl : ∀ (i : ι), LipschitzOnWith K (fun a => ↑(f a) i) s\ng : ι → α → ℝ\nhgl : ∀ (i : ι), LipschitzWith K (g i)\nhgeq : ∀ (i : ι), EqOn (fun x => ↑(f x) i) (g i) s\na₀ : α\nha₀_in_s : a₀ ∈ s\nhf_extb : ∀ (a : α), Memℓp (swap g a) ⊤\nf_ext' : α → { x // x ∈ lp (fun i => ℝ) ⊤ } := fun i => { val := swap g i, property := (_ : Memℓp (swap g i) ⊤) }\na : α\nhyp : a ∈ s\ni : ι\n⊢ ↑(f a) i = ↑(f_ext' a) i\n[PROOFSTEP]\nexact (hgeq i) hyp\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.Kuratowski", "llama_tokens": 12656, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850278370112, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.37217210713236376}}
{"text": "[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t u v A B : Set E\nhu : Absorbs 𝕜 s u\nhv : Absorbs 𝕜 s v\n⊢ Absorbs 𝕜 s (u ∪ v)\n[PROOFSTEP]\nobtain ⟨a, ha, hu⟩ := hu\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t u v A B : Set E\nhv : Absorbs 𝕜 s v\na : ℝ\nha : 0 < a\nhu : ∀ (a_1 : 𝕜), a ≤ ‖a_1‖ → u ⊆ a_1 • s\n⊢ Absorbs 𝕜 s (u ∪ v)\n[PROOFSTEP]\nobtain ⟨b, _hb, hv⟩ := hv\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t u v A B : Set E\na : ℝ\nha : 0 < a\nhu : ∀ (a_1 : 𝕜), a ≤ ‖a_1‖ → u ⊆ a_1 • s\nb : ℝ\n_hb : 0 < b\nhv : ∀ (a : 𝕜), b ≤ ‖a‖ → v ⊆ a • s\n⊢ Absorbs 𝕜 s (u ∪ v)\n[PROOFSTEP]\nexact\n  ⟨max a b, lt_max_of_lt_left ha, fun c hc =>\n    union_subset (hu _ <| le_of_max_le_left hc) (hv _ <| le_of_max_le_right hc)⟩\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t✝ u v A B : Set E\nι : Type u_6\nt : Finset ι\nf : ι → Set E\n⊢ Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\n[PROOFSTEP]\nclassical\ninduction' t using Finset.induction_on with i t _ht hi\n· simp only [Finset.not_mem_empty, Set.iUnion_false, Set.iUnion_empty, absorbs_empty, IsEmpty.forall_iff, imp_true_iff]\nrw [Finset.set_biUnion_insert, absorbs_union, hi]\nconstructor <;> intro h\n· refine' fun _ hi' => (Finset.mem_insert.mp hi').elim _ (h.2 _)\n  exact fun hi'' => by\n    rw [hi'']\n    exact h.1\nexact ⟨h i (Finset.mem_insert_self i t), fun i' hi' => h i' (Finset.mem_insert_of_mem hi')⟩\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t✝ u v A B : Set E\nι : Type u_6\nt : Finset ι\nf : ι → Set E\n⊢ Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\n[PROOFSTEP]\ninduction' t using Finset.induction_on with i t _ht hi\n[GOAL]\ncase empty\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t u v A B : Set E\nι : Type u_6\nf : ι → Set E\n⊢ Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ ∅), f i) ↔ ∀ (i : ι), i ∈ ∅ → Absorbs 𝕜 s (f i)\n[PROOFSTEP]\nsimp only [Finset.not_mem_empty, Set.iUnion_false, Set.iUnion_empty, absorbs_empty, IsEmpty.forall_iff, imp_true_iff]\n[GOAL]\ncase insert\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t✝ u v A B : Set E\nι : Type u_6\nf : ι → Set E\ni : ι\nt : Finset ι\n_ht : ¬i ∈ t\nhi : Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\n⊢ Absorbs 𝕜 s (⋃ (i_1 : ι) (_ : i_1 ∈ insert i t), f i_1) ↔ ∀ (i_1 : ι), i_1 ∈ insert i t → Absorbs 𝕜 s (f i_1)\n[PROOFSTEP]\nrw [Finset.set_biUnion_insert, absorbs_union, hi]\n[GOAL]\ncase insert\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t✝ u v A B : Set E\nι : Type u_6\nf : ι → Set E\ni : ι\nt : Finset ι\n_ht : ¬i ∈ t\nhi : Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\n⊢ (Absorbs 𝕜 s (f i) ∧ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)) ↔ ∀ (i_1 : ι), i_1 ∈ insert i t → Absorbs 𝕜 s (f i_1)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase insert.mp\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t✝ u v A B : Set E\nι : Type u_6\nf : ι → Set E\ni : ι\nt : Finset ι\n_ht : ¬i ∈ t\nhi : Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\n⊢ (Absorbs 𝕜 s (f i) ∧ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)) → ∀ (i_1 : ι), i_1 ∈ insert i t → Absorbs 𝕜 s (f i_1)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase insert.mpr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t✝ u v A B : Set E\nι : Type u_6\nf : ι → Set E\ni : ι\nt : Finset ι\n_ht : ¬i ∈ t\nhi : Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\n⊢ (∀ (i_1 : ι), i_1 ∈ insert i t → Absorbs 𝕜 s (f i_1)) → Absorbs 𝕜 s (f i) ∧ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase insert.mp\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t✝ u v A B : Set E\nι : Type u_6\nf : ι → Set E\ni : ι\nt : Finset ι\n_ht : ¬i ∈ t\nhi : Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\nh : Absorbs 𝕜 s (f i) ∧ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\n⊢ ∀ (i_1 : ι), i_1 ∈ insert i t → Absorbs 𝕜 s (f i_1)\n[PROOFSTEP]\nrefine' fun _ hi' => (Finset.mem_insert.mp hi').elim _ (h.2 _)\n[GOAL]\ncase insert.mp\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t✝ u v A B : Set E\nι : Type u_6\nf : ι → Set E\ni : ι\nt : Finset ι\n_ht : ¬i ∈ t\nhi : Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\nh : Absorbs 𝕜 s (f i) ∧ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\nx✝ : ι\nhi' : x✝ ∈ insert i t\n⊢ x✝ = i → Absorbs 𝕜 s (f x✝)\n[PROOFSTEP]\nexact fun hi'' => by\n  rw [hi'']\n  exact h.1\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t✝ u v A B : Set E\nι : Type u_6\nf : ι → Set E\ni : ι\nt : Finset ι\n_ht : ¬i ∈ t\nhi : Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\nh : Absorbs 𝕜 s (f i) ∧ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\nx✝ : ι\nhi' : x✝ ∈ insert i t\nhi'' : x✝ = i\n⊢ Absorbs 𝕜 s (f x✝)\n[PROOFSTEP]\nrw [hi'']\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t✝ u v A B : Set E\nι : Type u_6\nf : ι → Set E\ni : ι\nt : Finset ι\n_ht : ¬i ∈ t\nhi : Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\nh : Absorbs 𝕜 s (f i) ∧ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\nx✝ : ι\nhi' : x✝ ∈ insert i t\nhi'' : x✝ = i\n⊢ Absorbs 𝕜 s (f i)\n[PROOFSTEP]\nexact h.1\n[GOAL]\ncase insert.mpr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t✝ u v A B : Set E\nι : Type u_6\nf : ι → Set E\ni : ι\nt : Finset ι\n_ht : ¬i ∈ t\nhi : Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\nh : ∀ (i_1 : ι), i_1 ∈ insert i t → Absorbs 𝕜 s (f i_1)\n⊢ Absorbs 𝕜 s (f i) ∧ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\n[PROOFSTEP]\nexact ⟨h i (Finset.mem_insert_self i t), fun i' hi' => h i' (Finset.mem_insert_of_mem hi')⟩\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns✝ t✝ u v A B : Set E\nι : Type u_6\ns : Set E\nt : Set ι\nf : ι → Set E\nhi : Set.Finite t\n⊢ Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\n[PROOFSTEP]\nlift t to Finset ι using hi\n[GOAL]\ncase intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns✝ t✝ u v A B : Set E\nι : Type u_6\ns : Set E\nf : ι → Set E\nt : Finset ι\n⊢ Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ ↑t), f i) ↔ ∀ (i : ι), i ∈ ↑t → Absorbs 𝕜 s (f i)\n[PROOFSTEP]\nsimp only [Finset.mem_coe]\n[GOAL]\ncase intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι✝ : Sort u_4\nκ : ι✝ → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns✝ t✝ u v A B : Set E\nι : Type u_6\ns : Set E\nf : ι → Set E\nt : Finset ι\n⊢ Absorbs 𝕜 s (⋃ (i : ι) (_ : i ∈ t), f i) ↔ ∀ (i : ι), i ∈ t → Absorbs 𝕜 s (f i)\n[PROOFSTEP]\nexact absorbs_iUnion_finset\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t u v A B : Set E\nhA : Absorbent 𝕜 A\nhAB : A ⊆ B\n⊢ Absorbent 𝕜 B\n[PROOFSTEP]\nrefine' forall_imp (fun x => _) hA\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t u v A B : Set E\nhA : Absorbent 𝕜 A\nhAB : A ⊆ B\nx : E\n⊢ (∃ r, 0 < r ∧ ∀ (a : 𝕜), r ≤ ‖a‖ → x ∈ a • A) → ∃ r, 0 < r ∧ ∀ (a : 𝕜), r ≤ ‖a‖ → x ∈ a • B\n[PROOFSTEP]\nexact Exists.imp fun r => And.imp_right <| forall₂_imp fun a _ha hx => Set.smul_set_mono hAB hx\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t u v A B : Set E\n⊢ Absorbent 𝕜 A ↔ ∀ (x : E), Absorbs 𝕜 A {x}\n[PROOFSTEP]\nsimp_rw [Absorbs, Absorbent, singleton_subset_iff]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns✝ t u v✝ A B s : Set E\nhs : Absorbent 𝕜 s\nv : Set E\nhv : Set.Finite v\n⊢ Absorbs 𝕜 s v\n[PROOFSTEP]\nrw [← Set.biUnion_of_singleton v]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns✝ t u v✝ A B s : Set E\nhs : Absorbent 𝕜 s\nv : Set E\nhv : Set.Finite v\n⊢ Absorbs 𝕜 s (⋃ (x : E) (_ : x ∈ v), {x})\n[PROOFSTEP]\nexact hv.absorbs_iUnion.mpr fun _ _ => hs.absorbs\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : SeminormedRing 𝕜\ninst✝ : SMul 𝕜 E\ns t u v A B : Set E\nx✝¹ : 𝕜\nx✝ : ‖x✝¹‖ ≤ 1\n⊢ x✝¹ • ∅ ⊆ ∅\n[PROOFSTEP]\nrw [smul_set_empty]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝² : SeminormedRing 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns s₁ s₂ t t₁ t₂ : Set E\nh₁ : Absorbs 𝕜 s₁ t₁\nh₂ : Absorbs 𝕜 s₂ t₂\n⊢ Absorbs 𝕜 (s₁ - s₂) (t₁ - t₂)\n[PROOFSTEP]\nsimp_rw [sub_eq_add_neg]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝² : SeminormedRing 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns s₁ s₂ t t₁ t₂ : Set E\nh₁ : Absorbs 𝕜 s₁ t₁\nh₂ : Absorbs 𝕜 s₂ t₂\n⊢ Absorbs 𝕜 (s₁ + -s₂) (t₁ + -t₂)\n[PROOFSTEP]\nexact h₁.add h₂.neg\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝² : SeminormedRing 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns s₁ s₂ t t₁ t₂ : Set E\nhs : Balanced 𝕜 s\nht : Balanced 𝕜 t\n⊢ Balanced 𝕜 (s - t)\n[PROOFSTEP]\nsimp_rw [sub_eq_add_neg]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝² : SeminormedRing 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns s₁ s₂ t t₁ t₂ : Set E\nhs : Balanced 𝕜 s\nht : Balanced 𝕜 t\n⊢ Balanced 𝕜 (s + -t)\n[PROOFSTEP]\nexact hs.add ht.neg\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b✝ : 𝕜\nhs : Balanced 𝕝 s\na : 𝕝\nb : 𝕜\nh : ‖a‖ ≤ ‖b‖\n⊢ a • s ⊆ b • s\n[PROOFSTEP]\nobtain rfl | hb := eq_or_ne b 0\n[GOAL]\ncase inl\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b : 𝕜\nhs : Balanced 𝕝 s\na : 𝕝\nh : ‖a‖ ≤ ‖0‖\n⊢ a • s ⊆ 0 • s\n[PROOFSTEP]\nrw [norm_zero] at h \n[GOAL]\ncase inl\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b : 𝕜\nhs : Balanced 𝕝 s\na : 𝕝\nh : ‖a‖ ≤ 0\n⊢ a • s ⊆ 0 • s\n[PROOFSTEP]\nrw [norm_eq_zero.1 (h.antisymm <| norm_nonneg _)]\n[GOAL]\ncase inl\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b : 𝕜\nhs : Balanced 𝕝 s\na : 𝕝\nh : ‖a‖ ≤ 0\n⊢ 0 • s ⊆ 0 • s\n[PROOFSTEP]\nobtain rfl | h := s.eq_empty_or_nonempty\n[GOAL]\ncase inl.inl\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\nt u v A B : Set E\nx : E\na✝ b : 𝕜\na : 𝕝\nh : ‖a‖ ≤ 0\nhs : Balanced 𝕝 ∅\n⊢ 0 • ∅ ⊆ 0 • ∅\n[PROOFSTEP]\nsimp_rw [smul_set_empty]\n[GOAL]\ncase inl.inl\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\nt u v A B : Set E\nx : E\na✝ b : 𝕜\na : 𝕝\nh : ‖a‖ ≤ 0\nhs : Balanced 𝕝 ∅\n⊢ ∅ ⊆ ∅\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inl.inr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b : 𝕜\nhs : Balanced 𝕝 s\na : 𝕝\nh✝ : ‖a‖ ≤ 0\nh : Set.Nonempty s\n⊢ 0 • s ⊆ 0 • s\n[PROOFSTEP]\nsimp_rw [zero_smul_set h]\n[GOAL]\ncase inl.inr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b : 𝕜\nhs : Balanced 𝕝 s\na : 𝕝\nh✝ : ‖a‖ ≤ 0\nh : Set.Nonempty s\n⊢ 0 ⊆ 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b✝ : 𝕜\nhs : Balanced 𝕝 s\na : 𝕝\nb : 𝕜\nh : ‖a‖ ≤ ‖b‖\nhb : b ≠ 0\n⊢ a • s ⊆ b • s\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase inr.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b✝ : 𝕜\nhs : Balanced 𝕝 s\na : 𝕝\nb : 𝕜\nh : ‖a‖ ≤ ‖b‖\nhb : b ≠ 0\nx : E\nhx : x ∈ s\n⊢ (fun x => a • x) x ∈ b • s\n[PROOFSTEP]\nrefine' ⟨b⁻¹ • a • x, _, smul_inv_smul₀ hb _⟩\n[GOAL]\ncase inr.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b✝ : 𝕜\nhs : Balanced 𝕝 s\na : 𝕝\nb : 𝕜\nh : ‖a‖ ≤ ‖b‖\nhb : b ≠ 0\nx : E\nhx : x ∈ s\n⊢ b⁻¹ • a • x ∈ s\n[PROOFSTEP]\nrw [← smul_assoc]\n[GOAL]\ncase inr.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b✝ : 𝕜\nhs : Balanced 𝕝 s\na : 𝕝\nb : 𝕜\nh : ‖a‖ ≤ ‖b‖\nhb : b ≠ 0\nx : E\nhx : x ∈ s\n⊢ (b⁻¹ • a) • x ∈ s\n[PROOFSTEP]\nrefine' hs _ _ (smul_mem_smul_set hx)\n[GOAL]\ncase inr.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b✝ : 𝕜\nhs : Balanced 𝕝 s\na : 𝕝\nb : 𝕜\nh : ‖a‖ ≤ ‖b‖\nhb : b ≠ 0\nx : E\nhx : x ∈ s\n⊢ ‖b⁻¹ • a‖ ≤ 1\n[PROOFSTEP]\nrw [norm_smul, norm_inv, ← div_eq_inv_mul]\n[GOAL]\ncase inr.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b✝ : 𝕜\nhs : Balanced 𝕝 s\na : 𝕝\nb : 𝕜\nh : ‖a‖ ≤ ‖b‖\nhb : b ≠ 0\nx : E\nhx : x ∈ s\n⊢ ‖a‖ / ‖b‖ ≤ 1\n[PROOFSTEP]\nexact div_le_one_of_le h (norm_nonneg _)\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhA : Balanced 𝕜 A\n⊢ Absorbs 𝕜 A A\n[PROOFSTEP]\nrefine' ⟨1, zero_lt_one, fun a ha x hx => _⟩\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b : 𝕜\nhA : Balanced 𝕜 A\na : 𝕜\nha : 1 ≤ ‖a‖\nx : E\nhx : x ∈ A\n⊢ x ∈ a • A\n[PROOFSTEP]\nrw [mem_smul_set_iff_inv_smul_mem₀ (norm_pos_iff.1 <| zero_lt_one.trans_le ha)]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b : 𝕜\nhA : Balanced 𝕜 A\na : 𝕜\nha : 1 ≤ ‖a‖\nx : E\nhx : x ∈ A\n⊢ a⁻¹ • x ∈ A\n[PROOFSTEP]\nrefine' hA a⁻¹ _ (smul_mem_smul_set hx)\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b : 𝕜\nhA : Balanced 𝕜 A\na : 𝕜\nha : 1 ≤ ‖a‖\nx : E\nhx : x ∈ A\n⊢ ‖a⁻¹‖ ≤ 1\n[PROOFSTEP]\nrw [norm_inv]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b : 𝕜\nhA : Balanced 𝕜 A\na : 𝕜\nha : 1 ≤ ‖a‖\nx : E\nhx : x ∈ A\n⊢ ‖a‖⁻¹ ≤ 1\n[PROOFSTEP]\nexact inv_le_one ha\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhA : Balanced 𝕜 A\nha : 1 ≤ ‖a‖\n⊢ A ⊆ a • A\n[PROOFSTEP]\nrefine' (subset_set_smul_iff₀ _).2 (hA a⁻¹ _)\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhA : Balanced 𝕜 A\nha : 1 ≤ ‖a‖\n⊢ a ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\nb : 𝕜\nhA : Balanced 𝕜 A\nha : 1 ≤ ‖0‖\n⊢ False\n[PROOFSTEP]\nrw [norm_zero] at ha \n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\nb : 𝕜\nhA : Balanced 𝕜 A\nha : 1 ≤ 0\n⊢ False\n[PROOFSTEP]\nexact zero_lt_one.not_le ha\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhA : Balanced 𝕜 A\nha : 1 ≤ ‖a‖\n⊢ ‖a⁻¹‖ ≤ 1\n[PROOFSTEP]\nrw [norm_inv]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhA : Balanced 𝕜 A\nha : 1 ≤ ‖a‖\n⊢ ‖a‖⁻¹ ≤ 1\n[PROOFSTEP]\nexact inv_le_one ha\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\n⊢ a • x ∈ s ↔ b • x ∈ s\n[PROOFSTEP]\nobtain rfl | hb := eq_or_ne b 0\n[GOAL]\ncase inl\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖0‖\n⊢ a • x ∈ s ↔ 0 • x ∈ s\n[PROOFSTEP]\nrw [norm_zero, norm_eq_zero] at h \n[GOAL]\ncase inl\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na : 𝕜\nhs : Balanced 𝕜 s\nh : a = 0\n⊢ a • x ∈ s ↔ 0 • x ∈ s\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase inr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\n⊢ a • x ∈ s ↔ b • x ∈ s\n[PROOFSTEP]\nhave ha : a ≠ 0 := norm_ne_zero_iff.1 (ne_of_eq_of_ne h <| norm_ne_zero_iff.2 hb)\n[GOAL]\ncase inr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\nha : a ≠ 0\n⊢ a • x ∈ s ↔ b • x ∈ s\n[PROOFSTEP]\nconstructor <;> intro h' <;> [rw [← inv_mul_cancel_right₀ ha b]; rw [← inv_mul_cancel_right₀ hb a]]\n[GOAL]\ncase inr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\nha : a ≠ 0\n⊢ a • x ∈ s ↔ b • x ∈ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase inr.mp\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\nha : a ≠ 0\n⊢ a • x ∈ s → b • x ∈ s\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase inr.mpr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\nha : a ≠ 0\n⊢ b • x ∈ s → a • x ∈ s\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase inr.mp\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\nha : a ≠ 0\nh' : a • x ∈ s\n⊢ b • x ∈ s\n[PROOFSTEP]\nrw [← inv_mul_cancel_right₀ ha b]\n[GOAL]\ncase inr.mpr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\nha : a ≠ 0\nh' : b • x ∈ s\n⊢ a • x ∈ s\n[PROOFSTEP]\nrw [← inv_mul_cancel_right₀ hb a]\n[GOAL]\ncase inr.mp\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\nha : a ≠ 0\nh' : a • x ∈ s\n⊢ (b * a⁻¹ * a) • x ∈ s\n[PROOFSTEP]\nrw [← smul_eq_mul, smul_assoc]\n[GOAL]\ncase inr.mp\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\nha : a ≠ 0\nh' : a • x ∈ s\n⊢ (b * a⁻¹) • a • x ∈ s\n[PROOFSTEP]\nrefine' hs.smul_mem _ h'\n[GOAL]\ncase inr.mp\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\nha : a ≠ 0\nh' : a • x ∈ s\n⊢ ‖b * a⁻¹‖ ≤ 1\n[PROOFSTEP]\nsimp [← h, ha]\n[GOAL]\ncase inr.mpr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\nha : a ≠ 0\nh' : b • x ∈ s\n⊢ (a * b⁻¹ * b) • x ∈ s\n[PROOFSTEP]\nrw [← smul_eq_mul, smul_assoc]\n[GOAL]\ncase inr.mpr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\nha : a ≠ 0\nh' : b • x ∈ s\n⊢ (a * b⁻¹) • b • x ∈ s\n[PROOFSTEP]\nrefine' hs.smul_mem _ h'\n[GOAL]\ncase inr.mpr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\nh : ‖a‖ = ‖b‖\nhb : b ≠ 0\nha : a ≠ 0\nh' : b • x ∈ s\n⊢ ‖a * b⁻¹‖ ≤ 1\n[PROOFSTEP]\nsimp [← h, ha]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\n⊢ -x ∈ s ↔ x ∈ s\n[PROOFSTEP]\nconvert hs.mem_smul_iff (x := x) (norm_neg 1) using 0\n[GOAL]\ncase a\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Balanced 𝕜 s\n⊢ (-x ∈ s ↔ x ∈ s) ↔ (-1 • x ∈ s ↔ 1 • x ∈ s)\n[PROOFSTEP]\nsimp only [neg_smul, one_smul 𝕜 x]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\nhs : Absorbs 𝕜 s u\nht : Absorbs 𝕜 t u\n⊢ Absorbs 𝕜 (s ∩ t) u\n[PROOFSTEP]\nobtain ⟨a, ha, hs⟩ := hs\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b : 𝕜\nht : Absorbs 𝕜 t u\na : ℝ\nha : 0 < a\nhs : ∀ (a_1 : 𝕜), a ≤ ‖a_1‖ → u ⊆ a_1 • s\n⊢ Absorbs 𝕜 (s ∩ t) u\n[PROOFSTEP]\nobtain ⟨b, _hb, ht⟩ := ht\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b✝ : 𝕜\na : ℝ\nha : 0 < a\nhs : ∀ (a_1 : 𝕜), a ≤ ‖a_1‖ → u ⊆ a_1 • s\nb : ℝ\n_hb : 0 < b\nht : ∀ (a : 𝕜), b ≤ ‖a‖ → u ⊆ a • t\n⊢ Absorbs 𝕜 (s ∩ t) u\n[PROOFSTEP]\nhave h : 0 < max a b := lt_max_of_lt_left ha\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b✝ : 𝕜\na : ℝ\nha : 0 < a\nhs : ∀ (a_1 : 𝕜), a ≤ ‖a_1‖ → u ⊆ a_1 • s\nb : ℝ\n_hb : 0 < b\nht : ∀ (a : 𝕜), b ≤ ‖a‖ → u ⊆ a • t\nh : 0 < max a b\n⊢ Absorbs 𝕜 (s ∩ t) u\n[PROOFSTEP]\nrefine' ⟨max a b, lt_max_of_lt_left ha, fun c hc => _⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b✝ : 𝕜\na : ℝ\nha : 0 < a\nhs : ∀ (a_1 : 𝕜), a ≤ ‖a_1‖ → u ⊆ a_1 • s\nb : ℝ\n_hb : 0 < b\nht : ∀ (a : 𝕜), b ≤ ‖a‖ → u ⊆ a • t\nh : 0 < max a b\nc : 𝕜\nhc : max a b ≤ ‖c‖\n⊢ u ⊆ c • (s ∩ t)\n[PROOFSTEP]\nrw [smul_set_inter₀ (norm_pos_iff.1 <| h.trans_le hc)]\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b✝ : 𝕜\na : ℝ\nha : 0 < a\nhs : ∀ (a_1 : 𝕜), a ≤ ‖a_1‖ → u ⊆ a_1 • s\nb : ℝ\n_hb : 0 < b\nht : ∀ (a : 𝕜), b ≤ ‖a‖ → u ⊆ a • t\nh : 0 < max a b\nc : 𝕜\nhc : max a b ≤ ‖c‖\n⊢ u ⊆ c • s ∩ c • t\n[PROOFSTEP]\nexact subset_inter (hs _ <| le_of_max_le_left hc) (ht _ <| le_of_max_le_right hc)\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\n⊢ Absorbent 𝕜 univ\n[PROOFSTEP]\nrefine' fun x => ⟨1, zero_lt_one, fun a ha => _⟩\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b : 𝕜\nx : E\na : 𝕜\nha : 1 ≤ ‖a‖\n⊢ x ∈ a • univ\n[PROOFSTEP]\nrw [smul_set_univ₀ (norm_pos_iff.1 <| zero_lt_one.trans_le ha)]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedRing 𝕝\ninst✝⁴ : NormedSpace 𝕜 𝕝\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ninst✝¹ : SMulWithZero 𝕝 E\ninst✝ : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b : 𝕜\nx : E\na : 𝕜\nha : 1 ≤ ‖a‖\n⊢ x ∈ univ\n[PROOFSTEP]\nexact trivial\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : A ∈ 𝓝 0\n⊢ Absorbent 𝕜 A\n[PROOFSTEP]\nintro x\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : A ∈ 𝓝 0\nx : E\n⊢ ∃ r, 0 < r ∧ ∀ (a : 𝕜), r ≤ ‖a‖ → x ∈ a • A\n[PROOFSTEP]\nobtain ⟨w, hw₁, hw₂, hw₃⟩ := mem_nhds_iff.mp hA\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : A ∈ 𝓝 0\nx : E\nw : Set E\nhw₁ : w ⊆ A\nhw₂ : IsOpen w\nhw₃ : 0 ∈ w\n⊢ ∃ r, 0 < r ∧ ∀ (a : 𝕜), r ≤ ‖a‖ → x ∈ a • A\n[PROOFSTEP]\nhave hc : Continuous fun t : 𝕜 => t • x := continuous_id.smul continuous_const\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : A ∈ 𝓝 0\nx : E\nw : Set E\nhw₁ : w ⊆ A\nhw₂ : IsOpen w\nhw₃ : 0 ∈ w\nhc : Continuous fun t => t • x\n⊢ ∃ r, 0 < r ∧ ∀ (a : 𝕜), r ≤ ‖a‖ → x ∈ a • A\n[PROOFSTEP]\nobtain ⟨r, hr₁, hr₂⟩ := Metric.isOpen_iff.mp (hw₂.preimage hc) 0 (by rwa [mem_preimage, zero_smul])\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : A ∈ 𝓝 0\nx : E\nw : Set E\nhw₁ : w ⊆ A\nhw₂ : IsOpen w\nhw₃ : 0 ∈ w\nhc : Continuous fun t => t • x\n⊢ 0 ∈ (fun t => t • x) ⁻¹' w\n[PROOFSTEP]\nrwa [mem_preimage, zero_smul]\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : A ∈ 𝓝 0\nx : E\nw : Set E\nhw₁ : w ⊆ A\nhw₂ : IsOpen w\nhw₃ : 0 ∈ w\nhc : Continuous fun t => t • x\nr : ℝ\nhr₁ : r > 0\nhr₂ : Metric.ball 0 r ⊆ (fun t => t • x) ⁻¹' w\n⊢ ∃ r, 0 < r ∧ ∀ (a : 𝕜), r ≤ ‖a‖ → x ∈ a • A\n[PROOFSTEP]\nhave hr₃ := inv_pos.mpr (half_pos hr₁)\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : A ∈ 𝓝 0\nx : E\nw : Set E\nhw₁ : w ⊆ A\nhw₂ : IsOpen w\nhw₃ : 0 ∈ w\nhc : Continuous fun t => t • x\nr : ℝ\nhr₁ : r > 0\nhr₂ : Metric.ball 0 r ⊆ (fun t => t • x) ⁻¹' w\nhr₃ : 0 < (r / 2)⁻¹\n⊢ ∃ r, 0 < r ∧ ∀ (a : 𝕜), r ≤ ‖a‖ → x ∈ a • A\n[PROOFSTEP]\nrefine' ⟨(r / 2)⁻¹, hr₃, fun a ha₁ => _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : A ∈ 𝓝 0\nx : E\nw : Set E\nhw₁ : w ⊆ A\nhw₂ : IsOpen w\nhw₃ : 0 ∈ w\nhc : Continuous fun t => t • x\nr : ℝ\nhr₁ : r > 0\nhr₂ : Metric.ball 0 r ⊆ (fun t => t • x) ⁻¹' w\nhr₃ : 0 < (r / 2)⁻¹\na : 𝕜\nha₁ : (r / 2)⁻¹ ≤ ‖a‖\n⊢ x ∈ a • A\n[PROOFSTEP]\nhave ha₂ : 0 < ‖a‖ := hr₃.trans_le ha₁\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : A ∈ 𝓝 0\nx : E\nw : Set E\nhw₁ : w ⊆ A\nhw₂ : IsOpen w\nhw₃ : 0 ∈ w\nhc : Continuous fun t => t • x\nr : ℝ\nhr₁ : r > 0\nhr₂ : Metric.ball 0 r ⊆ (fun t => t • x) ⁻¹' w\nhr₃ : 0 < (r / 2)⁻¹\na : 𝕜\nha₁ : (r / 2)⁻¹ ≤ ‖a‖\nha₂ : 0 < ‖a‖\n⊢ x ∈ a • A\n[PROOFSTEP]\nrefine' (mem_smul_set_iff_inv_smul_mem₀ (norm_pos_iff.mp ha₂) _ _).2 (hw₁ <| hr₂ _)\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : A ∈ 𝓝 0\nx : E\nw : Set E\nhw₁ : w ⊆ A\nhw₂ : IsOpen w\nhw₃ : 0 ∈ w\nhc : Continuous fun t => t • x\nr : ℝ\nhr₁ : r > 0\nhr₂ : Metric.ball 0 r ⊆ (fun t => t • x) ⁻¹' w\nhr₃ : 0 < (r / 2)⁻¹\na : 𝕜\nha₁ : (r / 2)⁻¹ ≤ ‖a‖\nha₂ : 0 < ‖a‖\n⊢ a⁻¹ ∈ Metric.ball 0 r\n[PROOFSTEP]\nrw [Metric.mem_ball, dist_zero_right, norm_inv]\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx✝ : E\na✝ b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : A ∈ 𝓝 0\nx : E\nw : Set E\nhw₁ : w ⊆ A\nhw₂ : IsOpen w\nhw₃ : 0 ∈ w\nhc : Continuous fun t => t • x\nr : ℝ\nhr₁ : r > 0\nhr₂ : Metric.ball 0 r ⊆ (fun t => t • x) ⁻¹' w\nhr₃ : 0 < (r / 2)⁻¹\na : 𝕜\nha₁ : (r / 2)⁻¹ ≤ ‖a‖\nha₂ : 0 < ‖a‖\n⊢ ‖a‖⁻¹ < r\n[PROOFSTEP]\ncalc\n  ‖a‖⁻¹ ≤ r / 2 := (inv_le (half_pos hr₁) ha₂).mp ha₁\n  _ < r := half_lt_self hr₁\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : Balanced 𝕜 A\n⊢ Balanced 𝕜 (0 ∪ interior A)\n[PROOFSTEP]\nintro a ha\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : Balanced 𝕜 A\na : 𝕜\nha : ‖a‖ ≤ 1\n⊢ a • (0 ∪ interior A) ⊆ 0 ∪ interior A\n[PROOFSTEP]\nobtain rfl | h := eq_or_ne a 0\n[GOAL]\ncase inl\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : Balanced 𝕜 A\nha : ‖0‖ ≤ 1\n⊢ 0 • (0 ∪ interior A) ⊆ 0 ∪ interior A\n[PROOFSTEP]\nrw [zero_smul_set]\n[GOAL]\ncase inl\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : Balanced 𝕜 A\nha : ‖0‖ ≤ 1\n⊢ 0 ⊆ 0 ∪ interior A\ncase inl\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : Balanced 𝕜 A\nha : ‖0‖ ≤ 1\n⊢ Set.Nonempty (0 ∪ interior A)\n[PROOFSTEP]\nexacts [subset_union_left _ _, ⟨0, Or.inl rfl⟩]\n[GOAL]\ncase inr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : Balanced 𝕜 A\na : 𝕜\nha : ‖a‖ ≤ 1\nh : a ≠ 0\n⊢ a • (0 ∪ interior A) ⊆ 0 ∪ interior A\n[PROOFSTEP]\nrw [← image_smul, image_union]\n[GOAL]\ncase inr\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : Balanced 𝕜 A\na : 𝕜\nha : ‖a‖ ≤ 1\nh : a ≠ 0\n⊢ (fun x => a • x) '' 0 ∪ (fun x => a • x) '' interior A ⊆ 0 ∪ interior A\n[PROOFSTEP]\napply union_subset_union\n[GOAL]\ncase inr.h₁\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : Balanced 𝕜 A\na : 𝕜\nha : ‖a‖ ≤ 1\nh : a ≠ 0\n⊢ (fun x => a • x) '' 0 ⊆ 0\n[PROOFSTEP]\nrw [image_zero, smul_zero]\n[GOAL]\ncase inr.h₁\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : Balanced 𝕜 A\na : 𝕜\nha : ‖a‖ ≤ 1\nh : a ≠ 0\n⊢ {0} ⊆ 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.h₂\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na✝ b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : Balanced 𝕜 A\na : 𝕜\nha : ‖a‖ ≤ 1\nh : a ≠ 0\n⊢ (fun x => a • x) '' interior A ⊆ interior A\n[PROOFSTEP]\ncalc\n  a • interior A ⊆ interior (a • A) := (isOpenMap_smul₀ h).image_interior_subset A\n  _ ⊆ interior A := interior_mono (hA _ ha)\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : Balanced 𝕜 A\nh : 0 ∈ _root_.interior A\n⊢ Balanced 𝕜 (_root_.interior A)\n[PROOFSTEP]\nrw [← union_eq_self_of_subset_left (singleton_subset_iff.2 h)]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁸ : NormedField 𝕜\ninst✝⁷ : NormedRing 𝕝\ninst✝⁶ : NormedSpace 𝕜 𝕝\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module 𝕜 E\ninst✝³ : SMulWithZero 𝕝 E\ninst✝² : IsScalarTower 𝕜 𝕝 E\ns t u v A B : Set E\nx : E\na b : 𝕜\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul 𝕜 E\nhA : Balanced 𝕜 A\nh : 0 ∈ _root_.interior A\n⊢ Balanced 𝕜 ({0} ∪ _root_.interior A)\n[PROOFSTEP]\nexact balanced_zero_union_interior hA\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\n⊢ Absorbs 𝕜 s 0 ↔ 0 ∈ s\n[PROOFSTEP]\nrefine' ⟨_, fun h => ⟨1, zero_lt_one, fun a _ => zero_subset.2 <| zero_mem_smul_set h⟩⟩\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\n⊢ Absorbs 𝕜 s 0 → 0 ∈ s\n[PROOFSTEP]\nrintro ⟨r, hr, h⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nr : ℝ\nhr : 0 < r\nh : ∀ (a : 𝕜), r ≤ ‖a‖ → 0 ⊆ a • s\n⊢ 0 ∈ s\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := NormedSpace.exists_lt_norm 𝕜 𝕜 r\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nr : ℝ\nhr : 0 < r\nh : ∀ (a : 𝕜), r ≤ ‖a‖ → 0 ⊆ a • s\na : 𝕜\nha : r < ‖a‖\n⊢ 0 ∈ s\n[PROOFSTEP]\nhave := h _ ha.le\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nr : ℝ\nhr : 0 < r\nh : ∀ (a : 𝕜), r ≤ ‖a‖ → 0 ⊆ a • s\na : 𝕜\nha : r < ‖a‖\nthis : 0 ⊆ a • s\n⊢ 0 ∈ s\n[PROOFSTEP]\nrwa [zero_subset, zero_mem_smul_set_iff] at this \n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nr : ℝ\nhr : 0 < r\nh : ∀ (a : 𝕜), r ≤ ‖a‖ → 0 ⊆ a • s\na : 𝕜\nha : r < ‖a‖\nthis : 0 ∈ a • s\n⊢ a ≠ 0\n[PROOFSTEP]\nexact norm_ne_zero_iff.1 (hr.trans ha).ne'\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ns : Set E\ninst✝¹ : Module ℝ E\ninst✝ : SMulCommClass ℝ 𝕜 E\nhs : Balanced 𝕜 s\n⊢ Balanced 𝕜 (↑(convexHull ℝ) s)\n[PROOFSTEP]\nsuffices Convex ℝ {x | ∀ a : 𝕜, ‖a‖ ≤ 1 → a • x ∈ convexHull ℝ s}\n  by\n  rw [balanced_iff_smul_mem] at hs ⊢\n  refine' fun a ha x hx => convexHull_min _ this hx a ha\n  exact fun y hy a ha => subset_convexHull ℝ s (hs ha hy)\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ns : Set E\ninst✝¹ : Module ℝ E\ninst✝ : SMulCommClass ℝ 𝕜 E\nhs : Balanced 𝕜 s\nthis : Convex ℝ {x | ∀ (a : 𝕜), ‖a‖ ≤ 1 → a • x ∈ ↑(convexHull ℝ) s}\n⊢ Balanced 𝕜 (↑(convexHull ℝ) s)\n[PROOFSTEP]\nrw [balanced_iff_smul_mem] at hs ⊢\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ns : Set E\ninst✝¹ : Module ℝ E\ninst✝ : SMulCommClass ℝ 𝕜 E\nhs : ∀ ⦃a : 𝕜⦄, ‖a‖ ≤ 1 → ∀ ⦃x : E⦄, x ∈ s → a • x ∈ s\nthis : Convex ℝ {x | ∀ (a : 𝕜), ‖a‖ ≤ 1 → a • x ∈ ↑(convexHull ℝ) s}\n⊢ ∀ ⦃a : 𝕜⦄, ‖a‖ ≤ 1 → ∀ ⦃x : E⦄, x ∈ ↑(convexHull ℝ) s → a • x ∈ ↑(convexHull ℝ) s\n[PROOFSTEP]\nrefine' fun a ha x hx => convexHull_min _ this hx a ha\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ns : Set E\ninst✝¹ : Module ℝ E\ninst✝ : SMulCommClass ℝ 𝕜 E\nhs : ∀ ⦃a : 𝕜⦄, ‖a‖ ≤ 1 → ∀ ⦃x : E⦄, x ∈ s → a • x ∈ s\nthis : Convex ℝ {x | ∀ (a : 𝕜), ‖a‖ ≤ 1 → a • x ∈ ↑(convexHull ℝ) s}\na : 𝕜\nha : ‖a‖ ≤ 1\nx : E\nhx : x ∈ ↑(convexHull ℝ) s\n⊢ s ⊆ {x | ∀ (a : 𝕜), ‖a‖ ≤ 1 → a • x ∈ ↑(convexHull ℝ) s}\n[PROOFSTEP]\nexact fun y hy a ha => subset_convexHull ℝ s (hs ha hy)\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ns : Set E\ninst✝¹ : Module ℝ E\ninst✝ : SMulCommClass ℝ 𝕜 E\nhs : Balanced 𝕜 s\n⊢ Convex ℝ {x | ∀ (a : 𝕜), ‖a‖ ≤ 1 → a • x ∈ ↑(convexHull ℝ) s}\n[PROOFSTEP]\nintro x hx y hy u v hu hv huv a ha\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ns : Set E\ninst✝¹ : Module ℝ E\ninst✝ : SMulCommClass ℝ 𝕜 E\nhs : Balanced 𝕜 s\nx : E\nhx : x ∈ {x | ∀ (a : 𝕜), ‖a‖ ≤ 1 → a • x ∈ ↑(convexHull ℝ) s}\ny : E\nhy : y ∈ {x | ∀ (a : 𝕜), ‖a‖ ≤ 1 → a • x ∈ ↑(convexHull ℝ) s}\nu v : ℝ\nhu : 0 ≤ u\nhv : 0 ≤ v\nhuv : u + v = 1\na : 𝕜\nha : ‖a‖ ≤ 1\n⊢ a • (u • x + v • y) ∈ ↑(convexHull ℝ) s\n[PROOFSTEP]\nsimp only [smul_add, ← smul_comm]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\ns : Set E\ninst✝¹ : Module ℝ E\ninst✝ : SMulCommClass ℝ 𝕜 E\nhs : Balanced 𝕜 s\nx : E\nhx : x ∈ {x | ∀ (a : 𝕜), ‖a‖ ≤ 1 → a • x ∈ ↑(convexHull ℝ) s}\ny : E\nhy : y ∈ {x | ∀ (a : 𝕜), ‖a‖ ≤ 1 → a • x ∈ ↑(convexHull ℝ) s}\nu v : ℝ\nhu : 0 ≤ u\nhv : 0 ≤ v\nhuv : u + v = 1\na : 𝕜\nha : ‖a‖ ≤ 1\n⊢ u • a • x + v • a • y ∈ ↑(convexHull ℝ) s\n[PROOFSTEP]\nexact convex_convexHull ℝ s (hx a ha) (hy a ha) hu hv huv\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : Set E\nhs : Convex ℝ s\n⊢ Balanced ℝ s ↔ ∀ ⦃x : E⦄, x ∈ s → -x ∈ s\n[PROOFSTEP]\nrefine' ⟨fun h x => h.neg_mem_iff.2, fun h a ha => smul_set_subset_iff.2 fun x hx => _⟩\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : Set E\nhs : Convex ℝ s\nh : ∀ ⦃x : E⦄, x ∈ s → -x ∈ s\na : ℝ\nha : ‖a‖ ≤ 1\nx : E\nhx : x ∈ s\n⊢ a • x ∈ s\n[PROOFSTEP]\nrw [Real.norm_eq_abs, abs_le] at ha \n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : Set E\nhs : Convex ℝ s\nh : ∀ ⦃x : E⦄, x ∈ s → -x ∈ s\na : ℝ\nha : -1 ≤ a ∧ a ≤ 1\nx : E\nhx : x ∈ s\n⊢ a • x ∈ s\n[PROOFSTEP]\nrw [show a = -((1 - a) / 2) + (a - -1) / 2 by ring, add_smul, neg_smul, ← smul_neg]\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : Set E\nhs : Convex ℝ s\nh : ∀ ⦃x : E⦄, x ∈ s → -x ∈ s\na : ℝ\nha : -1 ≤ a ∧ a ≤ 1\nx : E\nhx : x ∈ s\n⊢ a = -((1 - a) / 2) + (a - -1) / 2\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : Set E\nhs : Convex ℝ s\nh : ∀ ⦃x : E⦄, x ∈ s → -x ∈ s\na : ℝ\nha : -1 ≤ a ∧ a ≤ 1\nx : E\nhx : x ∈ s\n⊢ ((1 - a) / 2) • -x + ((a - -1) / 2) • x ∈ s\n[PROOFSTEP]\nexact\n  hs (h hx) hx (div_nonneg (sub_nonneg_of_le ha.2) zero_le_two) (div_nonneg (sub_nonneg_of_le ha.1) zero_le_two)\n    (by ring)\n[GOAL]\n𝕜 : Type u_1\n𝕝 : Type u_2\nE : Type u_3\nι : Sort u_4\nκ : ι → Sort u_5\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : Set E\nhs : Convex ℝ s\nh : ∀ ⦃x : E⦄, x ∈ s → -x ∈ s\na : ℝ\nha : -1 ≤ a ∧ a ≤ 1\nx : E\nhx : x ∈ s\n⊢ (1 - a) / 2 + (a - -1) / 2 = 1\n[PROOFSTEP]\nring\n", "meta": {"mathlib_filename": "Mathlib.Analysis.LocallyConvex.Basic", "llama_tokens": 30145, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499941, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.3721174862016142}}
{"text": "[GOAL]\nL R : Type w\nfst snd : R → L\n⊢ ∀ {X Y : WalkingMulticospan fst snd} (f : X ⟶ Y), 𝟙 X ≫ f = f\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _ | _)\n[GOAL]\ncase left.left.id\nL R : Type w\nfst snd : R → L\na✝ : L\n⊢ 𝟙 (left a✝) ≫ Hom.id (left a✝) = Hom.id (left a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.right.fst\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ 𝟙 (left (fst a✝)) ≫ Hom.fst a✝ = Hom.fst a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.right.snd\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ 𝟙 (left (snd a✝)) ≫ Hom.snd a✝ = Hom.snd a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right.right.id\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ 𝟙 (right a✝) ≫ Hom.id (right a✝) = Hom.id (right a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nL R : Type w\nfst snd : R → L\n⊢ ∀ {X Y : WalkingMulticospan fst snd} (f : X ⟶ Y), f ≫ 𝟙 Y = f\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _ | _)\n[GOAL]\ncase left.left.id\nL R : Type w\nfst snd : R → L\na✝ : L\n⊢ Hom.id (left a✝) ≫ 𝟙 (left a✝) = Hom.id (left a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.right.fst\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ Hom.fst a✝ ≫ 𝟙 (right a✝) = Hom.fst a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.right.snd\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ Hom.snd a✝ ≫ 𝟙 (right a✝) = Hom.snd a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right.right.id\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ Hom.id (right a✝) ≫ 𝟙 (right a✝) = Hom.id (right a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nL R : Type w\nfst snd : R → L\n⊢ ∀ {W X Y Z : WalkingMulticospan fst snd} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z), (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _)\n[GOAL]\ncase left.left.left.left.id.id.id\nL R : Type w\nfst snd : R → L\na✝ : L\n⊢ (Hom.id (left a✝) ≫ Hom.id (left a✝)) ≫ Hom.id (left a✝) = Hom.id (left a✝) ≫ Hom.id (left a✝) ≫ Hom.id (left a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.left.left.right.id.id.fst\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ (Hom.id (left (fst a✝)) ≫ Hom.id (left (fst a✝))) ≫ Hom.fst a✝ =\n    Hom.id (left (fst a✝)) ≫ Hom.id (left (fst a✝)) ≫ Hom.fst a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.left.left.right.id.id.snd\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ (Hom.id (left (snd a✝)) ≫ Hom.id (left (snd a✝))) ≫ Hom.snd a✝ =\n    Hom.id (left (snd a✝)) ≫ Hom.id (left (snd a✝)) ≫ Hom.snd a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.left.right.right.id.fst.id\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ (Hom.id (left (fst a✝)) ≫ Hom.fst a✝) ≫ Hom.id (right a✝) = Hom.id (left (fst a✝)) ≫ Hom.fst a✝ ≫ Hom.id (right a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.left.right.right.id.snd.id\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ (Hom.id (left (snd a✝)) ≫ Hom.snd a✝) ≫ Hom.id (right a✝) = Hom.id (left (snd a✝)) ≫ Hom.snd a✝ ≫ Hom.id (right a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.right.right.right.fst.id.id\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ (Hom.fst a✝ ≫ Hom.id (right a✝)) ≫ Hom.id (right a✝) = Hom.fst a✝ ≫ Hom.id (right a✝) ≫ Hom.id (right a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.right.right.right.snd.id.id\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ (Hom.snd a✝ ≫ Hom.id (right a✝)) ≫ Hom.id (right a✝) = Hom.snd a✝ ≫ Hom.id (right a✝) ≫ Hom.id (right a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right.right.right.right.id.id.id\nL R : Type w\nfst snd : R → L\na✝ : R\n⊢ (Hom.id (right a✝) ≫ Hom.id (right a✝)) ≫ Hom.id (right a✝) =\n    Hom.id (right a✝) ≫ Hom.id (right a✝) ≫ Hom.id (right a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nL R : Type v\nfst snd : L → R\n⊢ ∀ {X Y : WalkingMultispan fst snd} (f : X ⟶ Y), 𝟙 X ≫ f = f\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _ | _)\n[GOAL]\ncase left.left.id\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ 𝟙 (left a✝) ≫ Hom.id (left a✝) = Hom.id (left a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.right.fst\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ 𝟙 (left a✝) ≫ Hom.fst a✝ = Hom.fst a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.right.snd\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ 𝟙 (left a✝) ≫ Hom.snd a✝ = Hom.snd a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right.right.id\nL R : Type v\nfst snd : L → R\na✝ : R\n⊢ 𝟙 (right a✝) ≫ Hom.id (right a✝) = Hom.id (right a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nL R : Type v\nfst snd : L → R\n⊢ ∀ {X Y : WalkingMultispan fst snd} (f : X ⟶ Y), f ≫ 𝟙 Y = f\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _ | _)\n[GOAL]\ncase left.left.id\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ Hom.id (left a✝) ≫ 𝟙 (left a✝) = Hom.id (left a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.right.fst\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ Hom.fst a✝ ≫ 𝟙 (right (fst a✝)) = Hom.fst a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.right.snd\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ Hom.snd a✝ ≫ 𝟙 (right (snd a✝)) = Hom.snd a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right.right.id\nL R : Type v\nfst snd : L → R\na✝ : R\n⊢ Hom.id (right a✝) ≫ 𝟙 (right a✝) = Hom.id (right a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nL R : Type v\nfst snd : L → R\n⊢ ∀ {W X Y Z : WalkingMultispan fst snd} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z), (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _)\n[GOAL]\ncase left.left.left.left.id.id.id\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ (Hom.id (left a✝) ≫ Hom.id (left a✝)) ≫ Hom.id (left a✝) = Hom.id (left a✝) ≫ Hom.id (left a✝) ≫ Hom.id (left a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.left.left.right.id.id.fst\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ (Hom.id (left a✝) ≫ Hom.id (left a✝)) ≫ Hom.fst a✝ = Hom.id (left a✝) ≫ Hom.id (left a✝) ≫ Hom.fst a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.left.left.right.id.id.snd\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ (Hom.id (left a✝) ≫ Hom.id (left a✝)) ≫ Hom.snd a✝ = Hom.id (left a✝) ≫ Hom.id (left a✝) ≫ Hom.snd a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.left.right.right.id.fst.id\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ (Hom.id (left a✝) ≫ Hom.fst a✝) ≫ Hom.id (right (fst a✝)) = Hom.id (left a✝) ≫ Hom.fst a✝ ≫ Hom.id (right (fst a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.left.right.right.id.snd.id\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ (Hom.id (left a✝) ≫ Hom.snd a✝) ≫ Hom.id (right (snd a✝)) = Hom.id (left a✝) ≫ Hom.snd a✝ ≫ Hom.id (right (snd a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.right.right.right.fst.id.id\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ (Hom.fst a✝ ≫ Hom.id (right (fst a✝))) ≫ Hom.id (right (fst a✝)) =\n    Hom.fst a✝ ≫ Hom.id (right (fst a✝)) ≫ Hom.id (right (fst a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.right.right.right.snd.id.id\nL R : Type v\nfst snd : L → R\na✝ : L\n⊢ (Hom.snd a✝ ≫ Hom.id (right (snd a✝))) ≫ Hom.id (right (snd a✝)) =\n    Hom.snd a✝ ≫ Hom.id (right (snd a✝)) ≫ Hom.id (right (snd a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right.right.right.right.id.id.id\nL R : Type v\nfst snd : L → R\na✝ : R\n⊢ (Hom.id (right a✝) ≫ Hom.id (right a✝)) ≫ Hom.id (right a✝) =\n    Hom.id (right a✝) ≫ Hom.id (right a✝) ≫ Hom.id (right a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\n⊢ ∀ (X : WalkingMulticospan I.fstTo I.sndTo),\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (𝟙 X) =\n      𝟙\n        ({\n              obj := fun x =>\n                match x with\n                | WalkingMulticospan.left a => left I a\n                | WalkingMulticospan.right b => right I b,\n              map := fun {x y} f =>\n                match x, y, f with\n                | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                  𝟙\n                    ((fun x =>\n                        match x with\n                        | WalkingMulticospan.left a => left I a\n                        | WalkingMulticospan.right b => right I b)\n                      x)\n                | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                  fst I b\n                | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                  snd I b }.obj\n          X)\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase left\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\na✝ : I.L\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMulticospan.left a => left I a\n            | WalkingMulticospan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMulticospan.left a => left I a\n                    | WalkingMulticospan.right b => right I b)\n                  x)\n            | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n              fst I b\n            | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n              snd I b }.map\n      (𝟙 (WalkingMulticospan.left a✝)) =\n    𝟙\n      ({\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.obj\n        (WalkingMulticospan.left a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\na✝ : I.R\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMulticospan.left a => left I a\n            | WalkingMulticospan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMulticospan.left a => left I a\n                    | WalkingMulticospan.right b => right I b)\n                  x)\n            | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n              fst I b\n            | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n              snd I b }.map\n      (𝟙 (WalkingMulticospan.right a✝)) =\n    𝟙\n      ({\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.obj\n        (WalkingMulticospan.right a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\n⊢ ∀ {X Y Z : WalkingMulticospan I.fstTo I.sndTo} (f : X ⟶ Y) (g : Y ⟶ Z),\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (f ≫ g) =\n      {\n              obj := fun x =>\n                match x with\n                | WalkingMulticospan.left a => left I a\n                | WalkingMulticospan.right b => right I b,\n              map := fun {x y} f =>\n                match x, y, f with\n                | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                  𝟙\n                    ((fun x =>\n                        match x with\n                        | WalkingMulticospan.left a => left I a\n                        | WalkingMulticospan.right b => right I b)\n                      x)\n                | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                  fst I b\n                | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                  snd I b }.map\n          f ≫\n        {\n              obj := fun x =>\n                match x with\n                | WalkingMulticospan.left a => left I a\n                | WalkingMulticospan.right b => right I b,\n              map := fun {x y} f =>\n                match x, y, f with\n                | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                  𝟙\n                    ((fun x =>\n                        match x with\n                        | WalkingMulticospan.left a => left I a\n                        | WalkingMulticospan.right b => right I b)\n                      x)\n                | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                  fst I b\n                | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                  snd I b }.map\n          g\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _)\n[GOAL]\ncase left.left.left.id.id\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\na✝ : I.L\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMulticospan.left a => left I a\n            | WalkingMulticospan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMulticospan.left a => left I a\n                    | WalkingMulticospan.right b => right I b)\n                  x)\n            | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n              fst I b\n            | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n              snd I b }.map\n      (WalkingMulticospan.Hom.id (WalkingMulticospan.left a✝) ≫\n        WalkingMulticospan.Hom.id (WalkingMulticospan.left a✝)) =\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMulticospan.Hom.id (WalkingMulticospan.left a✝)) ≫\n      {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMulticospan.Hom.id (WalkingMulticospan.left a✝))\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase left.left.right.id.fst\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\na✝ : I.R\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMulticospan.left a => left I a\n            | WalkingMulticospan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMulticospan.left a => left I a\n                    | WalkingMulticospan.right b => right I b)\n                  x)\n            | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n              fst I b\n            | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n              snd I b }.map\n      (WalkingMulticospan.Hom.id (WalkingMulticospan.left (fstTo I a✝)) ≫ WalkingMulticospan.Hom.fst a✝) =\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMulticospan.Hom.id (WalkingMulticospan.left (fstTo I a✝))) ≫\n      {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMulticospan.Hom.fst a✝)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase left.left.right.id.snd\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\na✝ : I.R\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMulticospan.left a => left I a\n            | WalkingMulticospan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMulticospan.left a => left I a\n                    | WalkingMulticospan.right b => right I b)\n                  x)\n            | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n              fst I b\n            | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n              snd I b }.map\n      (WalkingMulticospan.Hom.id (WalkingMulticospan.left (sndTo I a✝)) ≫ WalkingMulticospan.Hom.snd a✝) =\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMulticospan.Hom.id (WalkingMulticospan.left (sndTo I a✝))) ≫\n      {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMulticospan.Hom.snd a✝)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase left.right.right.fst.id\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\na✝ : I.R\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMulticospan.left a => left I a\n            | WalkingMulticospan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMulticospan.left a => left I a\n                    | WalkingMulticospan.right b => right I b)\n                  x)\n            | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n              fst I b\n            | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n              snd I b }.map\n      (WalkingMulticospan.Hom.fst a✝ ≫ WalkingMulticospan.Hom.id (WalkingMulticospan.right a✝)) =\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMulticospan.Hom.fst a✝) ≫\n      {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMulticospan.Hom.id (WalkingMulticospan.right a✝))\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase left.right.right.snd.id\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\na✝ : I.R\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMulticospan.left a => left I a\n            | WalkingMulticospan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMulticospan.left a => left I a\n                    | WalkingMulticospan.right b => right I b)\n                  x)\n            | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n              fst I b\n            | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n              snd I b }.map\n      (WalkingMulticospan.Hom.snd a✝ ≫ WalkingMulticospan.Hom.id (WalkingMulticospan.right a✝)) =\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMulticospan.Hom.snd a✝) ≫\n      {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMulticospan.Hom.id (WalkingMulticospan.right a✝))\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase right.right.right.id.id\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\na✝ : I.R\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMulticospan.left a => left I a\n            | WalkingMulticospan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMulticospan.left a => left I a\n                    | WalkingMulticospan.right b => right I b)\n                  x)\n            | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n              fst I b\n            | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n              snd I b }.map\n      (WalkingMulticospan.Hom.id (WalkingMulticospan.right a✝) ≫\n        WalkingMulticospan.Hom.id (WalkingMulticospan.right a✝)) =\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMulticospan.Hom.id (WalkingMulticospan.right a✝)) ≫\n      {\n            obj := fun x =>\n              match x with\n              | WalkingMulticospan.left a => left I a\n              | WalkingMulticospan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMulticospan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMulticospan.left a => left I a\n                      | WalkingMulticospan.right b => right I b)\n                    x)\n              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>\n                fst I b\n              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMulticospan.Hom.id (WalkingMulticospan.right a✝))\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nb : I.R\n⊢ fstPiMap I ≫ Pi.π I.right b = Pi.π I.left (fstTo I b) ≫ fst I b\n[PROOFSTEP]\nsimp [fstPiMap]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nb : I.R\n⊢ sndPiMap I ≫ Pi.π I.right b = Pi.π I.left (sndTo I b) ≫ snd I b\n[PROOFSTEP]\nsimp [sndPiMap]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\n⊢ ∀ (X : WalkingMultispan I.fstFrom I.sndFrom),\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (𝟙 X) =\n      𝟙\n        ({\n              obj := fun x =>\n                match x with\n                | WalkingMultispan.left a => left I a\n                | WalkingMultispan.right b => right I b,\n              map := fun {x y} f =>\n                match x, y, f with\n                | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                  𝟙\n                    ((fun x =>\n                        match x with\n                        | WalkingMultispan.left a => left I a\n                        | WalkingMultispan.right b => right I b)\n                      x)\n                | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                  fst I b\n                | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                  snd I b }.obj\n          X)\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase left\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\na✝ : I.L\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMultispan.left a => left I a\n            | WalkingMultispan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMultispan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMultispan.left a => left I a\n                    | WalkingMultispan.right b => right I b)\n                  x)\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b => fst I b\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n              snd I b }.map\n      (𝟙 (WalkingMultispan.left a✝)) =\n    𝟙\n      ({\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.obj\n        (WalkingMultispan.left a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\na✝ : I.R\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMultispan.left a => left I a\n            | WalkingMultispan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMultispan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMultispan.left a => left I a\n                    | WalkingMultispan.right b => right I b)\n                  x)\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b => fst I b\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n              snd I b }.map\n      (𝟙 (WalkingMultispan.right a✝)) =\n    𝟙\n      ({\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.obj\n        (WalkingMultispan.right a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\n⊢ ∀ {X Y Z : WalkingMultispan I.fstFrom I.sndFrom} (f : X ⟶ Y) (g : Y ⟶ Z),\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (f ≫ g) =\n      {\n              obj := fun x =>\n                match x with\n                | WalkingMultispan.left a => left I a\n                | WalkingMultispan.right b => right I b,\n              map := fun {x y} f =>\n                match x, y, f with\n                | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                  𝟙\n                    ((fun x =>\n                        match x with\n                        | WalkingMultispan.left a => left I a\n                        | WalkingMultispan.right b => right I b)\n                      x)\n                | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                  fst I b\n                | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                  snd I b }.map\n          f ≫\n        {\n              obj := fun x =>\n                match x with\n                | WalkingMultispan.left a => left I a\n                | WalkingMultispan.right b => right I b,\n              map := fun {x y} f =>\n                match x, y, f with\n                | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                  𝟙\n                    ((fun x =>\n                        match x with\n                        | WalkingMultispan.left a => left I a\n                        | WalkingMultispan.right b => right I b)\n                      x)\n                | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                  fst I b\n                | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                  snd I b }.map\n          g\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _)\n[GOAL]\ncase left.left.left.id.id\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\na✝ : I.L\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMultispan.left a => left I a\n            | WalkingMultispan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMultispan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMultispan.left a => left I a\n                    | WalkingMultispan.right b => right I b)\n                  x)\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b => fst I b\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n              snd I b }.map\n      (WalkingMultispan.Hom.id (WalkingMultispan.left a✝) ≫ WalkingMultispan.Hom.id (WalkingMultispan.left a✝)) =\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMultispan.Hom.id (WalkingMultispan.left a✝)) ≫\n      {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMultispan.Hom.id (WalkingMultispan.left a✝))\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase left.left.right.id.fst\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\na✝ : I.L\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMultispan.left a => left I a\n            | WalkingMultispan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMultispan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMultispan.left a => left I a\n                    | WalkingMultispan.right b => right I b)\n                  x)\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b => fst I b\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n              snd I b }.map\n      (WalkingMultispan.Hom.id (WalkingMultispan.left a✝) ≫ WalkingMultispan.Hom.fst a✝) =\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMultispan.Hom.id (WalkingMultispan.left a✝)) ≫\n      {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMultispan.Hom.fst a✝)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase left.left.right.id.snd\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\na✝ : I.L\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMultispan.left a => left I a\n            | WalkingMultispan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMultispan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMultispan.left a => left I a\n                    | WalkingMultispan.right b => right I b)\n                  x)\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b => fst I b\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n              snd I b }.map\n      (WalkingMultispan.Hom.id (WalkingMultispan.left a✝) ≫ WalkingMultispan.Hom.snd a✝) =\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMultispan.Hom.id (WalkingMultispan.left a✝)) ≫\n      {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMultispan.Hom.snd a✝)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase left.right.right.fst.id\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\na✝ : I.L\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMultispan.left a => left I a\n            | WalkingMultispan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMultispan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMultispan.left a => left I a\n                    | WalkingMultispan.right b => right I b)\n                  x)\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b => fst I b\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n              snd I b }.map\n      (WalkingMultispan.Hom.fst a✝ ≫ WalkingMultispan.Hom.id (WalkingMultispan.right (fstFrom I a✝))) =\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMultispan.Hom.fst a✝) ≫\n      {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMultispan.Hom.id (WalkingMultispan.right (fstFrom I a✝)))\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase left.right.right.snd.id\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\na✝ : I.L\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMultispan.left a => left I a\n            | WalkingMultispan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMultispan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMultispan.left a => left I a\n                    | WalkingMultispan.right b => right I b)\n                  x)\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b => fst I b\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n              snd I b }.map\n      (WalkingMultispan.Hom.snd a✝ ≫ WalkingMultispan.Hom.id (WalkingMultispan.right (sndFrom I a✝))) =\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMultispan.Hom.snd a✝) ≫\n      {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMultispan.Hom.id (WalkingMultispan.right (sndFrom I a✝)))\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase right.right.right.id.id\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\na✝ : I.R\n⊢ {\n          obj := fun x =>\n            match x with\n            | WalkingMultispan.left a => left I a\n            | WalkingMultispan.right b => right I b,\n          map := fun {x y} f =>\n            match x, y, f with\n            | x, .(x), WalkingMultispan.Hom.id .(x) =>\n              𝟙\n                ((fun x =>\n                    match x with\n                    | WalkingMultispan.left a => left I a\n                    | WalkingMultispan.right b => right I b)\n                  x)\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b => fst I b\n            | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n              snd I b }.map\n      (WalkingMultispan.Hom.id (WalkingMultispan.right a✝) ≫ WalkingMultispan.Hom.id (WalkingMultispan.right a✝)) =\n    {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMultispan.Hom.id (WalkingMultispan.right a✝)) ≫\n      {\n            obj := fun x =>\n              match x with\n              | WalkingMultispan.left a => left I a\n              | WalkingMultispan.right b => right I b,\n            map := fun {x y} f =>\n              match x, y, f with\n              | x, .(x), WalkingMultispan.Hom.id .(x) =>\n                𝟙\n                  ((fun x =>\n                      match x with\n                      | WalkingMultispan.left a => left I a\n                      | WalkingMultispan.right b => right I b)\n                    x)\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (fstFrom I b)), WalkingMultispan.Hom.fst b =>\n                fst I b\n              | .(WalkingMultispan.left b), .(WalkingMultispan.right (sndFrom I b)), WalkingMultispan.Hom.snd b =>\n                snd I b }.map\n        (WalkingMultispan.Hom.id (WalkingMultispan.right a✝))\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nb : I.L\n⊢ Sigma.ι I.left b ≫ fstSigmaMap I = fst I b ≫ Sigma.ι I.right (fstFrom I b)\n[PROOFSTEP]\nsimp [fstSigmaMap]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nb : I.L\n⊢ Sigma.ι I.left b ≫ sndSigmaMap I = snd I b ≫ Sigma.ι I.right (sndFrom I b)\n[PROOFSTEP]\nsimp [sndSigmaMap]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nb : I.R\n⊢ NatTrans.app K.π (WalkingMulticospan.right b) = ι K (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b\n[PROOFSTEP]\nrw [← K.w (WalkingMulticospan.Hom.fst b)]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nb : I.R\n⊢ NatTrans.app K.π (WalkingMulticospan.left (MulticospanIndex.fstTo I b)) ≫\n      (MulticospanIndex.multicospan I).map (WalkingMulticospan.Hom.fst b) =\n    ι K (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nb : I.R\n⊢ NatTrans.app K.π (WalkingMulticospan.right b) = ι K (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\n[PROOFSTEP]\nrw [← K.w (WalkingMulticospan.Hom.snd b)]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nb : I.R\n⊢ NatTrans.app K.π (WalkingMulticospan.left (MulticospanIndex.sndTo I b)) ≫\n      (MulticospanIndex.multicospan I).map (WalkingMulticospan.Hom.snd b) =\n    ι K (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MulticospanIndex C\nK : Multifork I✝\nI : MulticospanIndex C\nP : C\nι : (a : I.L) → P ⟶ MulticospanIndex.left I a\nw :\n  ∀ (b : I.R),\n    ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b =\n      ι (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\n⊢ ∀ ⦃X Y : WalkingMulticospan I.fstTo I.sndTo⦄ (f : X ⟶ Y),\n    ((Functor.const (WalkingMulticospan I.fstTo I.sndTo)).obj P).map f ≫\n        (fun x =>\n            match x with\n            | WalkingMulticospan.left a => ι a\n            | WalkingMulticospan.right b => ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b)\n          Y =\n      (fun x =>\n            match x with\n            | WalkingMulticospan.left a => ι a\n            | WalkingMulticospan.right b => ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b)\n          X ≫\n        (MulticospanIndex.multicospan I).map f\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _ | _)\n[GOAL]\ncase left.left.id\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MulticospanIndex C\nK : Multifork I✝\nI : MulticospanIndex C\nP : C\nι : (a : I.L) → P ⟶ MulticospanIndex.left I a\nw :\n  ∀ (b : I.R),\n    ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b =\n      ι (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\na✝ : I.L\n⊢ ((Functor.const (WalkingMulticospan I.fstTo I.sndTo)).obj P).map\n        (WalkingMulticospan.Hom.id (WalkingMulticospan.left a✝)) ≫\n      (fun x =>\n          match x with\n          | WalkingMulticospan.left a => ι a\n          | WalkingMulticospan.right b => ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b)\n        (WalkingMulticospan.left a✝) =\n    (fun x =>\n          match x with\n          | WalkingMulticospan.left a => ι a\n          | WalkingMulticospan.right b => ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b)\n        (WalkingMulticospan.left a✝) ≫\n      (MulticospanIndex.multicospan I).map (WalkingMulticospan.Hom.id (WalkingMulticospan.left a✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase left.right.fst\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MulticospanIndex C\nK : Multifork I✝\nI : MulticospanIndex C\nP : C\nι : (a : I.L) → P ⟶ MulticospanIndex.left I a\nw :\n  ∀ (b : I.R),\n    ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b =\n      ι (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\na✝ : I.R\n⊢ ((Functor.const (WalkingMulticospan I.fstTo I.sndTo)).obj P).map (WalkingMulticospan.Hom.fst a✝) ≫\n      (fun x =>\n          match x with\n          | WalkingMulticospan.left a => ι a\n          | WalkingMulticospan.right b => ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b)\n        (WalkingMulticospan.right a✝) =\n    (fun x =>\n          match x with\n          | WalkingMulticospan.left a => ι a\n          | WalkingMulticospan.right b => ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b)\n        (WalkingMulticospan.left (MulticospanIndex.fstTo I a✝)) ≫\n      (MulticospanIndex.multicospan I).map (WalkingMulticospan.Hom.fst a✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase left.right.snd\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MulticospanIndex C\nK : Multifork I✝\nI : MulticospanIndex C\nP : C\nι : (a : I.L) → P ⟶ MulticospanIndex.left I a\nw :\n  ∀ (b : I.R),\n    ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b =\n      ι (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\na✝ : I.R\n⊢ ((Functor.const (WalkingMulticospan I.fstTo I.sndTo)).obj P).map (WalkingMulticospan.Hom.snd a✝) ≫\n      (fun x =>\n          match x with\n          | WalkingMulticospan.left a => ι a\n          | WalkingMulticospan.right b => ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b)\n        (WalkingMulticospan.right a✝) =\n    (fun x =>\n          match x with\n          | WalkingMulticospan.left a => ι a\n          | WalkingMulticospan.right b => ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b)\n        (WalkingMulticospan.left (MulticospanIndex.sndTo I a✝)) ≫\n      (MulticospanIndex.multicospan I).map (WalkingMulticospan.Hom.snd a✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase right.right.id\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MulticospanIndex C\nK : Multifork I✝\nI : MulticospanIndex C\nP : C\nι : (a : I.L) → P ⟶ MulticospanIndex.left I a\nw :\n  ∀ (b : I.R),\n    ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b =\n      ι (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\na✝ : I.R\n⊢ ((Functor.const (WalkingMulticospan I.fstTo I.sndTo)).obj P).map\n        (WalkingMulticospan.Hom.id (WalkingMulticospan.right a✝)) ≫\n      (fun x =>\n          match x with\n          | WalkingMulticospan.left a => ι a\n          | WalkingMulticospan.right b => ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b)\n        (WalkingMulticospan.right a✝) =\n    (fun x =>\n          match x with\n          | WalkingMulticospan.left a => ι a\n          | WalkingMulticospan.right b => ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b)\n        (WalkingMulticospan.right a✝) ≫\n      (MulticospanIndex.multicospan I).map (WalkingMulticospan.Hom.id (WalkingMulticospan.right a✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase left.left.id\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MulticospanIndex C\nK : Multifork I✝\nI : MulticospanIndex C\nP : C\nι : (a : I.L) → P ⟶ MulticospanIndex.left I a\nw :\n  ∀ (b : I.R),\n    ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b =\n      ι (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\na✝ : I.L\n⊢ 𝟙 P ≫ ι a✝ = ι a✝ ≫ (MulticospanIndex.multicospan I).map (𝟙 (WalkingMulticospan.left a✝))\n[PROOFSTEP]\nsimp only [Category.id_comp, Category.comp_id, Functor.map_id, MulticospanIndex.multicospan_obj_left,\n  MulticospanIndex.multicospan_obj_right]\n[GOAL]\ncase left.right.fst\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MulticospanIndex C\nK : Multifork I✝\nI : MulticospanIndex C\nP : C\nι : (a : I.L) → P ⟶ MulticospanIndex.left I a\nw :\n  ∀ (b : I.R),\n    ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b =\n      ι (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\na✝ : I.R\n⊢ 𝟙 P ≫ ι (MulticospanIndex.fstTo I a✝) ≫ MulticospanIndex.fst I a✝ =\n    ι (MulticospanIndex.fstTo I a✝) ≫ MulticospanIndex.fst I a✝\n[PROOFSTEP]\nsimp only [Category.id_comp, Category.comp_id, Functor.map_id, MulticospanIndex.multicospan_obj_left,\n  MulticospanIndex.multicospan_obj_right]\n[GOAL]\ncase left.right.snd\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MulticospanIndex C\nK : Multifork I✝\nI : MulticospanIndex C\nP : C\nι : (a : I.L) → P ⟶ MulticospanIndex.left I a\nw :\n  ∀ (b : I.R),\n    ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b =\n      ι (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\na✝ : I.R\n⊢ 𝟙 P ≫ ι (MulticospanIndex.fstTo I a✝) ≫ MulticospanIndex.fst I a✝ =\n    ι (MulticospanIndex.sndTo I a✝) ≫ MulticospanIndex.snd I a✝\n[PROOFSTEP]\nsimp only [Category.id_comp, Category.comp_id, Functor.map_id, MulticospanIndex.multicospan_obj_left,\n  MulticospanIndex.multicospan_obj_right]\n[GOAL]\ncase right.right.id\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MulticospanIndex C\nK : Multifork I✝\nI : MulticospanIndex C\nP : C\nι : (a : I.L) → P ⟶ MulticospanIndex.left I a\nw :\n  ∀ (b : I.R),\n    ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b =\n      ι (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\na✝ : I.R\n⊢ 𝟙 P ≫ ι (MulticospanIndex.fstTo I a✝) ≫ MulticospanIndex.fst I a✝ =\n    (ι (MulticospanIndex.fstTo I a✝) ≫ MulticospanIndex.fst I a✝) ≫\n      (MulticospanIndex.multicospan I).map (𝟙 (WalkingMulticospan.right a✝))\n[PROOFSTEP]\nsimp only [Category.id_comp, Category.comp_id, Functor.map_id, MulticospanIndex.multicospan_obj_left,\n  MulticospanIndex.multicospan_obj_right]\n[GOAL]\ncase left.right.snd\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MulticospanIndex C\nK : Multifork I✝\nI : MulticospanIndex C\nP : C\nι : (a : I.L) → P ⟶ MulticospanIndex.left I a\nw :\n  ∀ (b : I.R),\n    ι (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b =\n      ι (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\na✝ : I.R\n⊢ ι (MulticospanIndex.fstTo I a✝) ≫ MulticospanIndex.fst I a✝ =\n    ι (MulticospanIndex.sndTo I a✝) ≫ MulticospanIndex.snd I a✝\n[PROOFSTEP]\napply w\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nb : I.R\n⊢ ι K (MulticospanIndex.fstTo I b) ≫ MulticospanIndex.fst I b =\n    ι K (MulticospanIndex.sndTo I b) ≫ MulticospanIndex.snd I b\n[PROOFSTEP]\nrw [← app_right_eq_ι_comp_fst, ← app_right_eq_ι_comp_snd]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nlift : (E : Multifork I) → E.pt ⟶ K.pt\nfac : ∀ (E : Multifork I) (i : I.L), lift E ≫ ι K i = ι E i\nuniq : ∀ (E : Multifork I) (m : E.pt ⟶ K.pt), (∀ (i : I.L), m ≫ ι K i = ι E i) → m = lift E\n⊢ ∀ (s : Cone (MulticospanIndex.multicospan I)) (j : WalkingMulticospan I.fstTo I.sndTo),\n    lift s ≫ NatTrans.app K.π j = NatTrans.app s.π j\n[PROOFSTEP]\nrintro E (a | b)\n[GOAL]\ncase left\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nlift : (E : Multifork I) → E.pt ⟶ K.pt\nfac : ∀ (E : Multifork I) (i : I.L), lift E ≫ ι K i = ι E i\nuniq : ∀ (E : Multifork I) (m : E.pt ⟶ K.pt), (∀ (i : I.L), m ≫ ι K i = ι E i) → m = lift E\nE : Cone (MulticospanIndex.multicospan I)\na : I.L\n⊢ lift E ≫ NatTrans.app K.π (WalkingMulticospan.left a) = NatTrans.app E.π (WalkingMulticospan.left a)\n[PROOFSTEP]\napply fac\n[GOAL]\ncase right\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nlift : (E : Multifork I) → E.pt ⟶ K.pt\nfac : ∀ (E : Multifork I) (i : I.L), lift E ≫ ι K i = ι E i\nuniq : ∀ (E : Multifork I) (m : E.pt ⟶ K.pt), (∀ (i : I.L), m ≫ ι K i = ι E i) → m = lift E\nE : Cone (MulticospanIndex.multicospan I)\nb : I.R\n⊢ lift E ≫ NatTrans.app K.π (WalkingMulticospan.right b) = NatTrans.app E.π (WalkingMulticospan.right b)\n[PROOFSTEP]\nrw [← E.w (WalkingMulticospan.Hom.fst b), ← K.w (WalkingMulticospan.Hom.fst b), ← Category.assoc]\n[GOAL]\ncase right\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nlift : (E : Multifork I) → E.pt ⟶ K.pt\nfac : ∀ (E : Multifork I) (i : I.L), lift E ≫ ι K i = ι E i\nuniq : ∀ (E : Multifork I) (m : E.pt ⟶ K.pt), (∀ (i : I.L), m ≫ ι K i = ι E i) → m = lift E\nE : Cone (MulticospanIndex.multicospan I)\nb : I.R\n⊢ (lift E ≫ NatTrans.app K.π (WalkingMulticospan.left (MulticospanIndex.fstTo I b))) ≫\n      (MulticospanIndex.multicospan I).map (WalkingMulticospan.Hom.fst b) =\n    NatTrans.app E.π (WalkingMulticospan.left (MulticospanIndex.fstTo I b)) ≫\n      (MulticospanIndex.multicospan I).map (WalkingMulticospan.Hom.fst b)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase right.e_a\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nlift : (E : Multifork I) → E.pt ⟶ K.pt\nfac : ∀ (E : Multifork I) (i : I.L), lift E ≫ ι K i = ι E i\nuniq : ∀ (E : Multifork I) (m : E.pt ⟶ K.pt), (∀ (i : I.L), m ≫ ι K i = ι E i) → m = lift E\nE : Cone (MulticospanIndex.multicospan I)\nb : I.R\n⊢ lift E ≫ NatTrans.app K.π (WalkingMulticospan.left (MulticospanIndex.fstTo I b)) =\n    NatTrans.app E.π (WalkingMulticospan.left (MulticospanIndex.fstTo I b))\n[PROOFSTEP]\napply fac\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nlift : (E : Multifork I) → E.pt ⟶ K.pt\nfac : ∀ (E : Multifork I) (i : I.L), lift E ≫ ι K i = ι E i\nuniq : ∀ (E : Multifork I) (m : E.pt ⟶ K.pt), (∀ (i : I.L), m ≫ ι K i = ι E i) → m = lift E\n⊢ ∀ (s : Cone (MulticospanIndex.multicospan I)) (m : s.pt ⟶ K.pt),\n    (∀ (j : WalkingMulticospan I.fstTo I.sndTo), m ≫ NatTrans.app K.π j = NatTrans.app s.π j) → m = lift s\n[PROOFSTEP]\nrintro E m hm\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nlift : (E : Multifork I) → E.pt ⟶ K.pt\nfac : ∀ (E : Multifork I) (i : I.L), lift E ≫ ι K i = ι E i\nuniq : ∀ (E : Multifork I) (m : E.pt ⟶ K.pt), (∀ (i : I.L), m ≫ ι K i = ι E i) → m = lift E\nE : Cone (MulticospanIndex.multicospan I)\nm : E.pt ⟶ K.pt\nhm : ∀ (j : WalkingMulticospan I.fstTo I.sndTo), m ≫ NatTrans.app K.π j = NatTrans.app E.π j\n⊢ m = lift E\n[PROOFSTEP]\napply uniq\n[GOAL]\ncase a\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nlift : (E : Multifork I) → E.pt ⟶ K.pt\nfac : ∀ (E : Multifork I) (i : I.L), lift E ≫ ι K i = ι E i\nuniq : ∀ (E : Multifork I) (m : E.pt ⟶ K.pt), (∀ (i : I.L), m ≫ ι K i = ι E i) → m = lift E\nE : Cone (MulticospanIndex.multicospan I)\nm : E.pt ⟶ K.pt\nhm : ∀ (j : WalkingMulticospan I.fstTo I.sndTo), m ≫ NatTrans.app K.π j = NatTrans.app E.π j\n⊢ ∀ (i : I.L), m ≫ ι K i = ι E i\n[PROOFSTEP]\nintro i\n[GOAL]\ncase a\nC : Type u\ninst✝ : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\nlift : (E : Multifork I) → E.pt ⟶ K.pt\nfac : ∀ (E : Multifork I) (i : I.L), lift E ≫ ι K i = ι E i\nuniq : ∀ (E : Multifork I) (m : E.pt ⟶ K.pt), (∀ (i : I.L), m ≫ ι K i = ι E i) → m = lift E\nE : Cone (MulticospanIndex.multicospan I)\nm : E.pt ⟶ K.pt\nhm : ∀ (j : WalkingMulticospan I.fstTo I.sndTo), m ≫ NatTrans.app K.π j = NatTrans.app E.π j\ni : I.L\n⊢ m ≫ ι K i = ι E i\n[PROOFSTEP]\napply hm\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\n⊢ Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I = Pi.lift (ι K) ≫ MulticospanIndex.sndPiMap I\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nb✝ : I.R\n⊢ (Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I) ≫ Pi.π I.right b✝ =\n    (Pi.lift (ι K) ≫ MulticospanIndex.sndPiMap I) ≫ Pi.π I.right b✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK✝ : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\n⊢ ∀ ⦃X Y : WalkingParallelPair⦄ (f : X ⟶ Y),\n    ((Functor.const WalkingParallelPair).obj K.pt).map f ≫\n        (fun x =>\n            match x with\n            | WalkingParallelPair.zero => Pi.lift (ι K)\n            | WalkingParallelPair.one => Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I)\n          Y =\n      (fun x =>\n            match x with\n            | WalkingParallelPair.zero => Pi.lift (ι K)\n            | WalkingParallelPair.one => Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I)\n          X ≫\n        (parallelPair (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)).map f\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _ | _)\n[GOAL]\ncase zero.zero.id\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK✝ : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\n⊢ ((Functor.const WalkingParallelPair).obj K.pt).map (WalkingParallelPairHom.id WalkingParallelPair.zero) ≫\n      (fun x =>\n          match x with\n          | WalkingParallelPair.zero => Pi.lift (ι K)\n          | WalkingParallelPair.one => Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I)\n        WalkingParallelPair.zero =\n    (fun x =>\n          match x with\n          | WalkingParallelPair.zero => Pi.lift (ι K)\n          | WalkingParallelPair.one => Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I)\n        WalkingParallelPair.zero ≫\n      (parallelPair (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)).map\n        (WalkingParallelPairHom.id WalkingParallelPair.zero)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase zero.one.left\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK✝ : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\n⊢ ((Functor.const WalkingParallelPair).obj K.pt).map WalkingParallelPairHom.left ≫\n      (fun x =>\n          match x with\n          | WalkingParallelPair.zero => Pi.lift (ι K)\n          | WalkingParallelPair.one => Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I)\n        WalkingParallelPair.one =\n    (fun x =>\n          match x with\n          | WalkingParallelPair.zero => Pi.lift (ι K)\n          | WalkingParallelPair.one => Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I)\n        WalkingParallelPair.zero ≫\n      (parallelPair (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)).map WalkingParallelPairHom.left\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase zero.one.right\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK✝ : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\n⊢ ((Functor.const WalkingParallelPair).obj K.pt).map WalkingParallelPairHom.right ≫\n      (fun x =>\n          match x with\n          | WalkingParallelPair.zero => Pi.lift (ι K)\n          | WalkingParallelPair.one => Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I)\n        WalkingParallelPair.one =\n    (fun x =>\n          match x with\n          | WalkingParallelPair.zero => Pi.lift (ι K)\n          | WalkingParallelPair.one => Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I)\n        WalkingParallelPair.zero ≫\n      (parallelPair (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)).map WalkingParallelPairHom.right\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase one.one.id\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK✝ : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\n⊢ ((Functor.const WalkingParallelPair).obj K.pt).map (WalkingParallelPairHom.id WalkingParallelPair.one) ≫\n      (fun x =>\n          match x with\n          | WalkingParallelPair.zero => Pi.lift (ι K)\n          | WalkingParallelPair.one => Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I)\n        WalkingParallelPair.one =\n    (fun x =>\n          match x with\n          | WalkingParallelPair.zero => Pi.lift (ι K)\n          | WalkingParallelPair.one => Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I)\n        WalkingParallelPair.one ≫\n      (parallelPair (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)).map\n        (WalkingParallelPairHom.id WalkingParallelPair.one)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase zero.zero.id\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK✝ : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\n⊢ 𝟙 K.pt ≫ Pi.lift (ι K) =\n    Pi.lift (ι K) ≫\n      (parallelPair (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)).map (𝟙 WalkingParallelPair.zero)\n[PROOFSTEP]\nsimp only [Category.id_comp, Functor.map_id, parallelPair_obj_zero, Category.comp_id, pi_condition,\n  parallelPair_obj_one]\n[GOAL]\ncase zero.one.left\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK✝ : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\n⊢ 𝟙 K.pt ≫ Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I = Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I\n[PROOFSTEP]\nsimp only [Category.id_comp, Functor.map_id, parallelPair_obj_zero, Category.comp_id, pi_condition,\n  parallelPair_obj_one]\n[GOAL]\ncase zero.one.right\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK✝ : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\n⊢ 𝟙 K.pt ≫ Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I = Pi.lift (ι K) ≫ MulticospanIndex.sndPiMap I\n[PROOFSTEP]\nsimp only [Category.id_comp, Functor.map_id, parallelPair_obj_zero, Category.comp_id, pi_condition,\n  parallelPair_obj_one]\n[GOAL]\ncase one.one.id\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK✝ : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\n⊢ 𝟙 K.pt ≫ Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I =\n    (Pi.lift (ι K) ≫ MulticospanIndex.fstPiMap I) ≫\n      (parallelPair (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)).map (𝟙 WalkingParallelPair.one)\n[PROOFSTEP]\nsimp only [Category.id_comp, Functor.map_id, parallelPair_obj_zero, Category.comp_id, pi_condition,\n  parallelPair_obj_one]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nc : Fork (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)\n⊢ ∀ ⦃X Y : WalkingMulticospan I.fstTo I.sndTo⦄ (f : X ⟶ Y),\n    ((Functor.const (WalkingMulticospan I.fstTo I.sndTo)).obj c.pt).map f ≫\n        (fun x =>\n            match x with\n            | WalkingMulticospan.left a => Fork.ι c ≫ Pi.π I.left a\n            | WalkingMulticospan.right b => Fork.ι c ≫ MulticospanIndex.fstPiMap I ≫ Pi.π I.right b)\n          Y =\n      (fun x =>\n            match x with\n            | WalkingMulticospan.left a => Fork.ι c ≫ Pi.π I.left a\n            | WalkingMulticospan.right b => Fork.ι c ≫ MulticospanIndex.fstPiMap I ≫ Pi.π I.right b)\n          X ≫\n        (MulticospanIndex.multicospan I).map f\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _ | _)\n[GOAL]\ncase left.left.id\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nc : Fork (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)\na✝ : I.L\n⊢ ((Functor.const (WalkingMulticospan I.fstTo I.sndTo)).obj c.pt).map\n        (WalkingMulticospan.Hom.id (WalkingMulticospan.left a✝)) ≫\n      (fun x =>\n          match x with\n          | WalkingMulticospan.left a => Fork.ι c ≫ Pi.π I.left a\n          | WalkingMulticospan.right b => Fork.ι c ≫ MulticospanIndex.fstPiMap I ≫ Pi.π I.right b)\n        (WalkingMulticospan.left a✝) =\n    (fun x =>\n          match x with\n          | WalkingMulticospan.left a => Fork.ι c ≫ Pi.π I.left a\n          | WalkingMulticospan.right b => Fork.ι c ≫ MulticospanIndex.fstPiMap I ≫ Pi.π I.right b)\n        (WalkingMulticospan.left a✝) ≫\n      (MulticospanIndex.multicospan I).map (WalkingMulticospan.Hom.id (WalkingMulticospan.left a✝))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left.right.fst\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nc : Fork (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)\na✝ : I.R\n⊢ ((Functor.const (WalkingMulticospan I.fstTo I.sndTo)).obj c.pt).map (WalkingMulticospan.Hom.fst a✝) ≫\n      (fun x =>\n          match x with\n          | WalkingMulticospan.left a => Fork.ι c ≫ Pi.π I.left a\n          | WalkingMulticospan.right b => Fork.ι c ≫ MulticospanIndex.fstPiMap I ≫ Pi.π I.right b)\n        (WalkingMulticospan.right a✝) =\n    (fun x =>\n          match x with\n          | WalkingMulticospan.left a => Fork.ι c ≫ Pi.π I.left a\n          | WalkingMulticospan.right b => Fork.ι c ≫ MulticospanIndex.fstPiMap I ≫ Pi.π I.right b)\n        (WalkingMulticospan.left (MulticospanIndex.fstTo I a✝)) ≫\n      (MulticospanIndex.multicospan I).map (WalkingMulticospan.Hom.fst a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left.right.snd\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nc : Fork (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)\na✝ : I.R\n⊢ ((Functor.const (WalkingMulticospan I.fstTo I.sndTo)).obj c.pt).map (WalkingMulticospan.Hom.snd a✝) ≫\n      (fun x =>\n          match x with\n          | WalkingMulticospan.left a => Fork.ι c ≫ Pi.π I.left a\n          | WalkingMulticospan.right b => Fork.ι c ≫ MulticospanIndex.fstPiMap I ≫ Pi.π I.right b)\n        (WalkingMulticospan.right a✝) =\n    (fun x =>\n          match x with\n          | WalkingMulticospan.left a => Fork.ι c ≫ Pi.π I.left a\n          | WalkingMulticospan.right b => Fork.ι c ≫ MulticospanIndex.fstPiMap I ≫ Pi.π I.right b)\n        (WalkingMulticospan.left (MulticospanIndex.sndTo I a✝)) ≫\n      (MulticospanIndex.multicospan I).map (WalkingMulticospan.Hom.snd a✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase left.right.snd\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nc : Fork (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)\na✝ : I.R\n⊢ 𝟙 c.pt ≫ Fork.ι c ≫ MulticospanIndex.fstPiMap I ≫ Pi.π I.right a✝ =\n    (Fork.ι c ≫ Pi.π I.left (MulticospanIndex.sndTo I a✝)) ≫ MulticospanIndex.snd I a✝\n[PROOFSTEP]\nrw [c.condition_assoc]\n[GOAL]\ncase left.right.snd\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nc : Fork (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)\na✝ : I.R\n⊢ 𝟙 c.pt ≫ Fork.ι c ≫ MulticospanIndex.sndPiMap I ≫ Pi.π I.right a✝ =\n    (Fork.ι c ≫ Pi.π I.left (MulticospanIndex.sndTo I a✝)) ≫ MulticospanIndex.snd I a✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right.right.id\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\nK : Multifork I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nc : Fork (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I)\na✝ : I.R\n⊢ ((Functor.const (WalkingMulticospan I.fstTo I.sndTo)).obj c.pt).map\n        (WalkingMulticospan.Hom.id (WalkingMulticospan.right a✝)) ≫\n      (fun x =>\n          match x with\n          | WalkingMulticospan.left a => Fork.ι c ≫ Pi.π I.left a\n          | WalkingMulticospan.right b => Fork.ι c ≫ MulticospanIndex.fstPiMap I ≫ Pi.π I.right b)\n        (WalkingMulticospan.right a✝) =\n    (fun x =>\n          match x with\n          | WalkingMulticospan.left a => Fork.ι c ≫ Pi.π I.left a\n          | WalkingMulticospan.right b => Fork.ι c ≫ MulticospanIndex.fstPiMap I ≫ Pi.π I.right b)\n        (WalkingMulticospan.right a✝) ≫\n      (MulticospanIndex.multicospan I).map (WalkingMulticospan.Hom.id (WalkingMulticospan.right a✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK₁ K₂ : Multifork I\nf : K₁ ⟶ K₂\n⊢ ∀ (j : WalkingParallelPair),\n    f.Hom ≫ NatTrans.app (Multifork.toPiFork K₂).π j = NatTrans.app (Multifork.toPiFork K₁).π j\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase zero\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK₁ K₂ : Multifork I\nf : K₁ ⟶ K₂\n⊢ f.Hom ≫ NatTrans.app (Multifork.toPiFork K₂).π WalkingParallelPair.zero =\n    NatTrans.app (Multifork.toPiFork K₁).π WalkingParallelPair.zero\n[PROOFSTEP]\napply limit.hom_ext\n[GOAL]\ncase zero.w\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK₁ K₂ : Multifork I\nf : K₁ ⟶ K₂\n⊢ ∀ (j : Discrete I.L),\n    (f.Hom ≫ NatTrans.app (Multifork.toPiFork K₂).π WalkingParallelPair.zero) ≫ limit.π (Discrete.functor I.left) j =\n      NatTrans.app (Multifork.toPiFork K₁).π WalkingParallelPair.zero ≫ limit.π (Discrete.functor I.left) j\n[PROOFSTEP]\nsimp\n[GOAL]\ncase one\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK₁ K₂ : Multifork I\nf : K₁ ⟶ K₂\n⊢ f.Hom ≫ NatTrans.app (Multifork.toPiFork K₂).π WalkingParallelPair.one =\n    NatTrans.app (Multifork.toPiFork K₁).π WalkingParallelPair.one\n[PROOFSTEP]\napply limit.hom_ext\n[GOAL]\ncase one.w\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK₁ K₂ : Multifork I\nf : K₁ ⟶ K₂\n⊢ ∀ (j : Discrete I.R),\n    (f.Hom ≫ NatTrans.app (Multifork.toPiFork K₂).π WalkingParallelPair.one) ≫ limit.π (Discrete.functor I.right) j =\n      NatTrans.app (Multifork.toPiFork K₁).π WalkingParallelPair.one ≫ limit.π (Discrete.functor I.right) j\n[PROOFSTEP]\nintros j\n[GOAL]\ncase one.w\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK₁ K₂ : Multifork I\nf : K₁ ⟶ K₂\nj : Discrete I.R\n⊢ (f.Hom ≫ NatTrans.app (Multifork.toPiFork K₂).π WalkingParallelPair.one) ≫ limit.π (Discrete.functor I.right) j =\n    NatTrans.app (Multifork.toPiFork K₁).π WalkingParallelPair.one ≫ limit.π (Discrete.functor I.right) j\n[PROOFSTEP]\nsimp only [Multifork.toPiFork_π_app_one, Multifork.pi_condition, Category.assoc]\n[GOAL]\ncase one.w\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK₁ K₂ : Multifork I\nf : K₁ ⟶ K₂\nj : Discrete I.R\n⊢ f.Hom ≫ Pi.lift (Multifork.ι K₂) ≫ sndPiMap I ≫ limit.π (Discrete.functor I.right) j =\n    Pi.lift (Multifork.ι K₁) ≫ sndPiMap I ≫ limit.π (Discrete.functor I.right) j\n[PROOFSTEP]\ndsimp [sndPiMap]\n[GOAL]\ncase one.w\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK₁ K₂ : Multifork I\nf : K₁ ⟶ K₂\nj : Discrete I.R\n⊢ f.Hom ≫\n      Pi.lift (Multifork.ι K₂) ≫\n        (Pi.lift fun b => Pi.π I.left (sndTo I b) ≫ snd I b) ≫ limit.π (Discrete.functor I.right) j =\n    Pi.lift (Multifork.ι K₁) ≫\n      (Pi.lift fun b => Pi.π I.left (sndTo I b) ≫ snd I b) ≫ limit.π (Discrete.functor I.right) j\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK₁ K₂ : Fork (fstPiMap I) (sndPiMap I)\nf : K₁ ⟶ K₂\n⊢ ∀ (j : WalkingMulticospan I.fstTo I.sndTo),\n    f.Hom ≫ NatTrans.app (Multifork.ofPiFork I K₂).π j = NatTrans.app (Multifork.ofPiFork I K₁).π j\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase left\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK₁ K₂ : Fork (fstPiMap I) (sndPiMap I)\nf : K₁ ⟶ K₂\na✝ : I.L\n⊢ f.Hom ≫ NatTrans.app (Multifork.ofPiFork I K₂).π (WalkingMulticospan.left a✝) =\n    NatTrans.app (Multifork.ofPiFork I K₁).π (WalkingMulticospan.left a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK₁ K₂ : Fork (fstPiMap I) (sndPiMap I)\nf : K₁ ⟶ K₂\na✝ : I.R\n⊢ f.Hom ≫ NatTrans.app (Multifork.ofPiFork I K₂).π (WalkingMulticospan.right a✝) =\n    NatTrans.app (Multifork.ofPiFork I K₁).π (WalkingMulticospan.right a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\n⊢ ∀ (j : WalkingMulticospan I.fstTo I.sndTo),\n    NatTrans.app ((𝟭 (Multifork I)).obj K).π j =\n      (Iso.refl ((𝟭 (Multifork I)).obj K).pt).hom ≫ NatTrans.app ((toPiForkFunctor I ⋙ ofPiForkFunctor I).obj K).π j\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase left\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\na✝ : I.L\n⊢ NatTrans.app ((𝟭 (Multifork I)).obj K).π (WalkingMulticospan.left a✝) =\n    (Iso.refl ((𝟭 (Multifork I)).obj K).pt).hom ≫\n      NatTrans.app ((toPiForkFunctor I ⋙ ofPiForkFunctor I).obj K).π (WalkingMulticospan.left a✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase right\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\na✝ : I.R\n⊢ NatTrans.app ((𝟭 (Multifork I)).obj K).π (WalkingMulticospan.right a✝) =\n    (Iso.refl ((𝟭 (Multifork I)).obj K).pt).hom ≫\n      NatTrans.app ((toPiForkFunctor I ⋙ ofPiForkFunctor I).obj K).π (WalkingMulticospan.right a✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase left\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\na✝ : I.L\n⊢ Multifork.ι K a✝ = 𝟙 K.pt ≫ Pi.lift (Multifork.ι K) ≫ Pi.π I.left a✝\n[PROOFSTEP]\nsimp [← Fork.app_one_eq_ι_comp_left, -Fork.app_one_eq_ι_comp_left]\n[GOAL]\ncase right\nC : Type u\ninst✝² : Category.{v, u} C\nI : MulticospanIndex C\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\nK : Multifork I\na✝ : I.R\n⊢ NatTrans.app K.π (WalkingMulticospan.right a✝) = 𝟙 K.pt ≫ Pi.lift (Multifork.ι K) ≫ fstPiMap I ≫ Pi.π I.right a✝\n[PROOFSTEP]\nsimp [← Fork.app_one_eq_ι_comp_left, -Fork.app_one_eq_ι_comp_left]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\na : I.L\n⊢ NatTrans.app K.ι (WalkingMultispan.left a) = MultispanIndex.fst I a ≫ π K (MultispanIndex.fstFrom I a)\n[PROOFSTEP]\nrw [← K.w (WalkingMultispan.Hom.fst a)]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\na : I.L\n⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.fst a) ≫\n      NatTrans.app K.ι (WalkingMultispan.right (MultispanIndex.fstFrom I a)) =\n    MultispanIndex.fst I a ≫ π K (MultispanIndex.fstFrom I a)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\na : I.L\n⊢ NatTrans.app K.ι (WalkingMultispan.left a) = MultispanIndex.snd I a ≫ π K (MultispanIndex.sndFrom I a)\n[PROOFSTEP]\nrw [← K.w (WalkingMultispan.Hom.snd a)]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\na : I.L\n⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.snd a) ≫\n      NatTrans.app K.ι (WalkingMultispan.right (MultispanIndex.sndFrom I a)) =\n    MultispanIndex.snd I a ≫ π K (MultispanIndex.sndFrom I a)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MultispanIndex C\nK : Multicofork I✝\nI : MultispanIndex C\nP : C\nπ : (b : I.R) → MultispanIndex.right I b ⟶ P\nw :\n  ∀ (a : I.L),\n    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)\n⊢ ∀ ⦃X Y : WalkingMultispan I.fstFrom I.sndFrom⦄ (f : X ⟶ Y),\n    (MultispanIndex.multispan I).map f ≫\n        (fun x =>\n            match x with\n            | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)\n            | WalkingMultispan.right b => π b)\n          Y =\n      (fun x =>\n            match x with\n            | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)\n            | WalkingMultispan.right b => π b)\n          X ≫\n        ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj P).map f\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _ | _)\n[GOAL]\ncase left.left.id\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MultispanIndex C\nK : Multicofork I✝\nI : MultispanIndex C\nP : C\nπ : (b : I.R) → MultispanIndex.right I b ⟶ P\nw :\n  ∀ (a : I.L),\n    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)\na✝ : I.L\n⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.id (WalkingMultispan.left a✝)) ≫\n      (fun x =>\n          match x with\n          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)\n          | WalkingMultispan.right b => π b)\n        (WalkingMultispan.left a✝) =\n    (fun x =>\n          match x with\n          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)\n          | WalkingMultispan.right b => π b)\n        (WalkingMultispan.left a✝) ≫\n      ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj P).map\n        (WalkingMultispan.Hom.id (WalkingMultispan.left a✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase left.right.fst\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MultispanIndex C\nK : Multicofork I✝\nI : MultispanIndex C\nP : C\nπ : (b : I.R) → MultispanIndex.right I b ⟶ P\nw :\n  ∀ (a : I.L),\n    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)\na✝ : I.L\n⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.fst a✝) ≫\n      (fun x =>\n          match x with\n          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)\n          | WalkingMultispan.right b => π b)\n        (WalkingMultispan.right (MultispanIndex.fstFrom I a✝)) =\n    (fun x =>\n          match x with\n          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)\n          | WalkingMultispan.right b => π b)\n        (WalkingMultispan.left a✝) ≫\n      ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj P).map (WalkingMultispan.Hom.fst a✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase left.right.snd\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MultispanIndex C\nK : Multicofork I✝\nI : MultispanIndex C\nP : C\nπ : (b : I.R) → MultispanIndex.right I b ⟶ P\nw :\n  ∀ (a : I.L),\n    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)\na✝ : I.L\n⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.snd a✝) ≫\n      (fun x =>\n          match x with\n          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)\n          | WalkingMultispan.right b => π b)\n        (WalkingMultispan.right (MultispanIndex.sndFrom I a✝)) =\n    (fun x =>\n          match x with\n          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)\n          | WalkingMultispan.right b => π b)\n        (WalkingMultispan.left a✝) ≫\n      ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj P).map (WalkingMultispan.Hom.snd a✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase right.right.id\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MultispanIndex C\nK : Multicofork I✝\nI : MultispanIndex C\nP : C\nπ : (b : I.R) → MultispanIndex.right I b ⟶ P\nw :\n  ∀ (a : I.L),\n    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)\na✝ : I.R\n⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.id (WalkingMultispan.right a✝)) ≫\n      (fun x =>\n          match x with\n          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)\n          | WalkingMultispan.right b => π b)\n        (WalkingMultispan.right a✝) =\n    (fun x =>\n          match x with\n          | WalkingMultispan.left a => MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a)\n          | WalkingMultispan.right b => π b)\n        (WalkingMultispan.right a✝) ≫\n      ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj P).map\n        (WalkingMultispan.Hom.id (WalkingMultispan.right a✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase left.left.id\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MultispanIndex C\nK : Multicofork I✝\nI : MultispanIndex C\nP : C\nπ : (b : I.R) → MultispanIndex.right I b ⟶ P\nw :\n  ∀ (a : I.L),\n    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)\na✝ : I.L\n⊢ (MultispanIndex.multispan I).map (𝟙 (WalkingMultispan.left a✝)) ≫\n      MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝) =\n    (MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝)) ≫ 𝟙 P\n[PROOFSTEP]\nsimp only [Functor.map_id, MultispanIndex.multispan_obj_left, Category.id_comp, Category.comp_id,\n  MultispanIndex.multispan_obj_right]\n[GOAL]\ncase left.right.fst\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MultispanIndex C\nK : Multicofork I✝\nI : MultispanIndex C\nP : C\nπ : (b : I.R) → MultispanIndex.right I b ⟶ P\nw :\n  ∀ (a : I.L),\n    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)\na✝ : I.L\n⊢ MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝) =\n    (MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝)) ≫ 𝟙 P\n[PROOFSTEP]\nsimp only [Functor.map_id, MultispanIndex.multispan_obj_left, Category.id_comp, Category.comp_id,\n  MultispanIndex.multispan_obj_right]\n[GOAL]\ncase left.right.snd\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MultispanIndex C\nK : Multicofork I✝\nI : MultispanIndex C\nP : C\nπ : (b : I.R) → MultispanIndex.right I b ⟶ P\nw :\n  ∀ (a : I.L),\n    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)\na✝ : I.L\n⊢ MultispanIndex.snd I a✝ ≫ π (MultispanIndex.sndFrom I a✝) =\n    (MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝)) ≫ 𝟙 P\n[PROOFSTEP]\nsimp only [Functor.map_id, MultispanIndex.multispan_obj_left, Category.id_comp, Category.comp_id,\n  MultispanIndex.multispan_obj_right]\n[GOAL]\ncase right.right.id\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MultispanIndex C\nK : Multicofork I✝\nI : MultispanIndex C\nP : C\nπ : (b : I.R) → MultispanIndex.right I b ⟶ P\nw :\n  ∀ (a : I.L),\n    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)\na✝ : I.R\n⊢ (MultispanIndex.multispan I).map (𝟙 (WalkingMultispan.right a✝)) ≫ π a✝ = π a✝ ≫ 𝟙 P\n[PROOFSTEP]\nsimp only [Functor.map_id, MultispanIndex.multispan_obj_left, Category.id_comp, Category.comp_id,\n  MultispanIndex.multispan_obj_right]\n[GOAL]\ncase left.right.snd\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MultispanIndex C\nK : Multicofork I✝\nI : MultispanIndex C\nP : C\nπ : (b : I.R) → MultispanIndex.right I b ⟶ P\nw :\n  ∀ (a : I.L),\n    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)\na✝ : I.L\n⊢ MultispanIndex.snd I a✝ ≫ π (MultispanIndex.sndFrom I a✝) = MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase left.right.snd\nC : Type u\ninst✝ : Category.{v, u} C\nI✝ : MultispanIndex C\nK : Multicofork I✝\nI : MultispanIndex C\nP : C\nπ : (b : I.R) → MultispanIndex.right I b ⟶ P\nw :\n  ∀ (a : I.L),\n    MultispanIndex.fst I a ≫ π (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π (MultispanIndex.sndFrom I a)\na✝ : I.L\n⊢ MultispanIndex.fst I a✝ ≫ π (MultispanIndex.fstFrom I a✝) = MultispanIndex.snd I a✝ ≫ π (MultispanIndex.sndFrom I a✝)\n[PROOFSTEP]\napply w\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\na : I.L\n⊢ MultispanIndex.fst I a ≫ π K (MultispanIndex.fstFrom I a) = MultispanIndex.snd I a ≫ π K (MultispanIndex.sndFrom I a)\n[PROOFSTEP]\nrw [← K.snd_app_right, ← K.fst_app_right]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ndesc : (E : Multicofork I) → K.pt ⟶ E.pt\nfac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i\nuniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E\n⊢ ∀ (s : Cocone (MultispanIndex.multispan I)) (j : WalkingMultispan I.fstFrom I.sndFrom),\n    NatTrans.app K.ι j ≫ desc s = NatTrans.app s.ι j\n[PROOFSTEP]\nrintro S (a | b)\n[GOAL]\ncase left\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ndesc : (E : Multicofork I) → K.pt ⟶ E.pt\nfac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i\nuniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E\nS : Cocone (MultispanIndex.multispan I)\na : I.L\n⊢ NatTrans.app K.ι (WalkingMultispan.left a) ≫ desc S = NatTrans.app S.ι (WalkingMultispan.left a)\n[PROOFSTEP]\nrw [← K.w (WalkingMultispan.Hom.fst a), ← S.w (WalkingMultispan.Hom.fst a), Category.assoc]\n[GOAL]\ncase left\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ndesc : (E : Multicofork I) → K.pt ⟶ E.pt\nfac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i\nuniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E\nS : Cocone (MultispanIndex.multispan I)\na : I.L\n⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.fst a) ≫\n      NatTrans.app K.ι (WalkingMultispan.right (MultispanIndex.fstFrom I a)) ≫ desc S =\n    (MultispanIndex.multispan I).map (WalkingMultispan.Hom.fst a) ≫\n      NatTrans.app S.ι (WalkingMultispan.right (MultispanIndex.fstFrom I a))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase left.e_a\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ndesc : (E : Multicofork I) → K.pt ⟶ E.pt\nfac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i\nuniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E\nS : Cocone (MultispanIndex.multispan I)\na : I.L\n⊢ NatTrans.app K.ι (WalkingMultispan.right (MultispanIndex.fstFrom I a)) ≫ desc S =\n    NatTrans.app S.ι (WalkingMultispan.right (MultispanIndex.fstFrom I a))\n[PROOFSTEP]\napply fac\n[GOAL]\ncase right\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ndesc : (E : Multicofork I) → K.pt ⟶ E.pt\nfac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i\nuniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E\nS : Cocone (MultispanIndex.multispan I)\nb : I.R\n⊢ NatTrans.app K.ι (WalkingMultispan.right b) ≫ desc S = NatTrans.app S.ι (WalkingMultispan.right b)\n[PROOFSTEP]\napply fac\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ndesc : (E : Multicofork I) → K.pt ⟶ E.pt\nfac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i\nuniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E\n⊢ ∀ (s : Cocone (MultispanIndex.multispan I)) (m : K.pt ⟶ s.pt),\n    (∀ (j : WalkingMultispan I.fstFrom I.sndFrom), NatTrans.app K.ι j ≫ m = NatTrans.app s.ι j) → m = desc s\n[PROOFSTEP]\nintro S m hm\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ndesc : (E : Multicofork I) → K.pt ⟶ E.pt\nfac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i\nuniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E\nS : Cocone (MultispanIndex.multispan I)\nm : K.pt ⟶ S.pt\nhm : ∀ (j : WalkingMultispan I.fstFrom I.sndFrom), NatTrans.app K.ι j ≫ m = NatTrans.app S.ι j\n⊢ m = desc S\n[PROOFSTEP]\napply uniq\n[GOAL]\ncase a\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ndesc : (E : Multicofork I) → K.pt ⟶ E.pt\nfac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i\nuniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E\nS : Cocone (MultispanIndex.multispan I)\nm : K.pt ⟶ S.pt\nhm : ∀ (j : WalkingMultispan I.fstFrom I.sndFrom), NatTrans.app K.ι j ≫ m = NatTrans.app S.ι j\n⊢ ∀ (i : I.R), π K i ≫ m = π S i\n[PROOFSTEP]\nintro i\n[GOAL]\ncase a\nC : Type u\ninst✝ : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ndesc : (E : Multicofork I) → K.pt ⟶ E.pt\nfac : ∀ (E : Multicofork I) (i : I.R), π K i ≫ desc E = π E i\nuniq : ∀ (E : Multicofork I) (m : K.pt ⟶ E.pt), (∀ (i : I.R), π K i ≫ m = π E i) → m = desc E\nS : Cocone (MultispanIndex.multispan I)\nm : K.pt ⟶ S.pt\nhm : ∀ (j : WalkingMultispan I.fstFrom I.sndFrom), NatTrans.app K.ι j ≫ m = NatTrans.app S.ι j\ni : I.R\n⊢ π K i ≫ m = π S i\n[PROOFSTEP]\napply hm\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\n⊢ MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K) = MultispanIndex.sndSigmaMap I ≫ Sigma.desc (π K)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nb✝ : I.L\n⊢ Sigma.ι I.left b✝ ≫ MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K) =\n    Sigma.ι I.left b✝ ≫ MultispanIndex.sndSigmaMap I ≫ Sigma.desc (π K)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK✝ : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Multicofork I\n⊢ ∀ ⦃X Y : WalkingParallelPair⦄ (f : X ⟶ Y),\n    (parallelPair (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)).map f ≫\n        (fun x =>\n            match x with\n            | WalkingParallelPair.zero => MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)\n            | WalkingParallelPair.one => Sigma.desc (π K))\n          Y =\n      (fun x =>\n            match x with\n            | WalkingParallelPair.zero => MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)\n            | WalkingParallelPair.one => Sigma.desc (π K))\n          X ≫\n        ((Functor.const WalkingParallelPair).obj K.pt).map f\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _ | _)\n[GOAL]\ncase zero.zero.id\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK✝ : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Multicofork I\n⊢ (parallelPair (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)).map\n        (WalkingParallelPairHom.id WalkingParallelPair.zero) ≫\n      (fun x =>\n          match x with\n          | WalkingParallelPair.zero => MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)\n          | WalkingParallelPair.one => Sigma.desc (π K))\n        WalkingParallelPair.zero =\n    (fun x =>\n          match x with\n          | WalkingParallelPair.zero => MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)\n          | WalkingParallelPair.one => Sigma.desc (π K))\n        WalkingParallelPair.zero ≫\n      ((Functor.const WalkingParallelPair).obj K.pt).map (WalkingParallelPairHom.id WalkingParallelPair.zero)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase zero.one.left\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK✝ : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Multicofork I\n⊢ (parallelPair (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)).map WalkingParallelPairHom.left ≫\n      (fun x =>\n          match x with\n          | WalkingParallelPair.zero => MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)\n          | WalkingParallelPair.one => Sigma.desc (π K))\n        WalkingParallelPair.one =\n    (fun x =>\n          match x with\n          | WalkingParallelPair.zero => MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)\n          | WalkingParallelPair.one => Sigma.desc (π K))\n        WalkingParallelPair.zero ≫\n      ((Functor.const WalkingParallelPair).obj K.pt).map WalkingParallelPairHom.left\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase zero.one.right\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK✝ : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Multicofork I\n⊢ (parallelPair (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)).map WalkingParallelPairHom.right ≫\n      (fun x =>\n          match x with\n          | WalkingParallelPair.zero => MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)\n          | WalkingParallelPair.one => Sigma.desc (π K))\n        WalkingParallelPair.one =\n    (fun x =>\n          match x with\n          | WalkingParallelPair.zero => MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)\n          | WalkingParallelPair.one => Sigma.desc (π K))\n        WalkingParallelPair.zero ≫\n      ((Functor.const WalkingParallelPair).obj K.pt).map WalkingParallelPairHom.right\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase one.one.id\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK✝ : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Multicofork I\n⊢ (parallelPair (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)).map\n        (WalkingParallelPairHom.id WalkingParallelPair.one) ≫\n      (fun x =>\n          match x with\n          | WalkingParallelPair.zero => MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)\n          | WalkingParallelPair.one => Sigma.desc (π K))\n        WalkingParallelPair.one =\n    (fun x =>\n          match x with\n          | WalkingParallelPair.zero => MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)\n          | WalkingParallelPair.one => Sigma.desc (π K))\n        WalkingParallelPair.one ≫\n      ((Functor.const WalkingParallelPair).obj K.pt).map (WalkingParallelPairHom.id WalkingParallelPair.one)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase zero.zero.id\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK✝ : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Multicofork I\n⊢ (parallelPair (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)).map (𝟙 WalkingParallelPair.zero) ≫\n      MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K) =\n    (MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)) ≫ 𝟙 K.pt\n[PROOFSTEP]\nsimp only [Functor.map_id, parallelPair_obj_zero, parallelPair_obj_one, sigma_condition, Category.id_comp,\n  Category.comp_id]\n[GOAL]\ncase zero.one.left\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK✝ : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Multicofork I\n⊢ MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K) = (MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)) ≫ 𝟙 K.pt\n[PROOFSTEP]\nsimp only [Functor.map_id, parallelPair_obj_zero, parallelPair_obj_one, sigma_condition, Category.id_comp,\n  Category.comp_id]\n[GOAL]\ncase zero.one.right\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK✝ : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Multicofork I\n⊢ MultispanIndex.sndSigmaMap I ≫ Sigma.desc (π K) = (MultispanIndex.fstSigmaMap I ≫ Sigma.desc (π K)) ≫ 𝟙 K.pt\n[PROOFSTEP]\nsimp only [Functor.map_id, parallelPair_obj_zero, parallelPair_obj_one, sigma_condition, Category.id_comp,\n  Category.comp_id]\n[GOAL]\ncase one.one.id\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK✝ : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Multicofork I\n⊢ (parallelPair (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)).map (𝟙 WalkingParallelPair.one) ≫\n      Sigma.desc (π K) =\n    Sigma.desc (π K) ≫ 𝟙 K.pt\n[PROOFSTEP]\nsimp only [Functor.map_id, parallelPair_obj_zero, parallelPair_obj_one, sigma_condition, Category.id_comp,\n  Category.comp_id]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nc : Cofork (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)\n⊢ ∀ ⦃X Y : WalkingMultispan I.fstFrom I.sndFrom⦄ (f : X ⟶ Y),\n    (MultispanIndex.multispan I).map f ≫\n        (fun x =>\n            match x with\n            | WalkingMultispan.left a => Sigma.ι I.left a ≫ MultispanIndex.fstSigmaMap I ≫ Cofork.π c\n            | WalkingMultispan.right b => Sigma.ι I.right b ≫ Cofork.π c)\n          Y =\n      (fun x =>\n            match x with\n            | WalkingMultispan.left a => Sigma.ι I.left a ≫ MultispanIndex.fstSigmaMap I ≫ Cofork.π c\n            | WalkingMultispan.right b => Sigma.ι I.right b ≫ Cofork.π c)\n          X ≫\n        ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj c.pt).map f\n[PROOFSTEP]\nrintro (_ | _) (_ | _) (_ | _ | _)\n[GOAL]\ncase left.left.id\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nc : Cofork (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)\na✝ : I.L\n⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.id (WalkingMultispan.left a✝)) ≫\n      (fun x =>\n          match x with\n          | WalkingMultispan.left a => Sigma.ι I.left a ≫ MultispanIndex.fstSigmaMap I ≫ Cofork.π c\n          | WalkingMultispan.right b => Sigma.ι I.right b ≫ Cofork.π c)\n        (WalkingMultispan.left a✝) =\n    (fun x =>\n          match x with\n          | WalkingMultispan.left a => Sigma.ι I.left a ≫ MultispanIndex.fstSigmaMap I ≫ Cofork.π c\n          | WalkingMultispan.right b => Sigma.ι I.right b ≫ Cofork.π c)\n        (WalkingMultispan.left a✝) ≫\n      ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj c.pt).map\n        (WalkingMultispan.Hom.id (WalkingMultispan.left a✝))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left.right.fst\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nc : Cofork (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)\na✝ : I.L\n⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.fst a✝) ≫\n      (fun x =>\n          match x with\n          | WalkingMultispan.left a => Sigma.ι I.left a ≫ MultispanIndex.fstSigmaMap I ≫ Cofork.π c\n          | WalkingMultispan.right b => Sigma.ι I.right b ≫ Cofork.π c)\n        (WalkingMultispan.right (MultispanIndex.fstFrom I a✝)) =\n    (fun x =>\n          match x with\n          | WalkingMultispan.left a => Sigma.ι I.left a ≫ MultispanIndex.fstSigmaMap I ≫ Cofork.π c\n          | WalkingMultispan.right b => Sigma.ι I.right b ≫ Cofork.π c)\n        (WalkingMultispan.left a✝) ≫\n      ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj c.pt).map (WalkingMultispan.Hom.fst a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left.right.snd\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nc : Cofork (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)\na✝ : I.L\n⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.snd a✝) ≫\n      (fun x =>\n          match x with\n          | WalkingMultispan.left a => Sigma.ι I.left a ≫ MultispanIndex.fstSigmaMap I ≫ Cofork.π c\n          | WalkingMultispan.right b => Sigma.ι I.right b ≫ Cofork.π c)\n        (WalkingMultispan.right (MultispanIndex.sndFrom I a✝)) =\n    (fun x =>\n          match x with\n          | WalkingMultispan.left a => Sigma.ι I.left a ≫ MultispanIndex.fstSigmaMap I ≫ Cofork.π c\n          | WalkingMultispan.right b => Sigma.ι I.right b ≫ Cofork.π c)\n        (WalkingMultispan.left a✝) ≫\n      ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj c.pt).map (WalkingMultispan.Hom.snd a✝)\n[PROOFSTEP]\nsimp [c.condition]\n[GOAL]\ncase right.right.id\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\nK : Multicofork I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nc : Cofork (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I)\na✝ : I.R\n⊢ (MultispanIndex.multispan I).map (WalkingMultispan.Hom.id (WalkingMultispan.right a✝)) ≫\n      (fun x =>\n          match x with\n          | WalkingMultispan.left a => Sigma.ι I.left a ≫ MultispanIndex.fstSigmaMap I ≫ Cofork.π c\n          | WalkingMultispan.right b => Sigma.ι I.right b ≫ Cofork.π c)\n        (WalkingMultispan.right a✝) =\n    (fun x =>\n          match x with\n          | WalkingMultispan.left a => Sigma.ι I.left a ≫ MultispanIndex.fstSigmaMap I ≫ Cofork.π c\n          | WalkingMultispan.right b => Sigma.ι I.right b ≫ Cofork.π c)\n        (WalkingMultispan.right a✝) ≫\n      ((Functor.const (WalkingMultispan I.fstFrom I.sndFrom)).obj c.pt).map\n        (WalkingMultispan.Hom.id (WalkingMultispan.right a✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Multicofork I\nf : K₁ ⟶ K₂\n⊢ ∀ (j : WalkingParallelPair),\n    NatTrans.app (Multicofork.toSigmaCofork K₁).ι j ≫ f.Hom = NatTrans.app (Multicofork.toSigmaCofork K₂).ι j\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase zero\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Multicofork I\nf : K₁ ⟶ K₂\n⊢ NatTrans.app (Multicofork.toSigmaCofork K₁).ι WalkingParallelPair.zero ≫ f.Hom =\n    NatTrans.app (Multicofork.toSigmaCofork K₂).ι WalkingParallelPair.zero\ncase one\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Multicofork I\nf : K₁ ⟶ K₂\n⊢ NatTrans.app (Multicofork.toSigmaCofork K₁).ι WalkingParallelPair.one ≫ f.Hom =\n    NatTrans.app (Multicofork.toSigmaCofork K₂).ι WalkingParallelPair.one\n[PROOFSTEP]\nall_goals {\n  apply colimit.hom_ext\n  rintro ⟨j⟩\n  simp\n}\n[GOAL]\ncase zero\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Multicofork I\nf : K₁ ⟶ K₂\n⊢ NatTrans.app (Multicofork.toSigmaCofork K₁).ι WalkingParallelPair.zero ≫ f.Hom =\n    NatTrans.app (Multicofork.toSigmaCofork K₂).ι WalkingParallelPair.zero\n[PROOFSTEP]\n{ apply colimit.hom_ext\n  rintro ⟨j⟩\n  simp\n}\n[GOAL]\ncase zero\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Multicofork I\nf : K₁ ⟶ K₂\n⊢ NatTrans.app (Multicofork.toSigmaCofork K₁).ι WalkingParallelPair.zero ≫ f.Hom =\n    NatTrans.app (Multicofork.toSigmaCofork K₂).ι WalkingParallelPair.zero\n[PROOFSTEP]\napply colimit.hom_ext\n[GOAL]\ncase zero.w\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Multicofork I\nf : K₁ ⟶ K₂\n⊢ ∀ (j : Discrete I.L),\n    colimit.ι (Discrete.functor I.left) j ≫\n        NatTrans.app (Multicofork.toSigmaCofork K₁).ι WalkingParallelPair.zero ≫ f.Hom =\n      colimit.ι (Discrete.functor I.left) j ≫ NatTrans.app (Multicofork.toSigmaCofork K₂).ι WalkingParallelPair.zero\n[PROOFSTEP]\nrintro ⟨j⟩\n[GOAL]\ncase zero.w.mk\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Multicofork I\nf : K₁ ⟶ K₂\nj : I.L\n⊢ colimit.ι (Discrete.functor I.left) { as := j } ≫\n      NatTrans.app (Multicofork.toSigmaCofork K₁).ι WalkingParallelPair.zero ≫ f.Hom =\n    colimit.ι (Discrete.functor I.left) { as := j } ≫\n      NatTrans.app (Multicofork.toSigmaCofork K₂).ι WalkingParallelPair.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase one\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Multicofork I\nf : K₁ ⟶ K₂\n⊢ NatTrans.app (Multicofork.toSigmaCofork K₁).ι WalkingParallelPair.one ≫ f.Hom =\n    NatTrans.app (Multicofork.toSigmaCofork K₂).ι WalkingParallelPair.one\n[PROOFSTEP]\n{ apply colimit.hom_ext\n  rintro ⟨j⟩\n  simp\n}\n[GOAL]\ncase one\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Multicofork I\nf : K₁ ⟶ K₂\n⊢ NatTrans.app (Multicofork.toSigmaCofork K₁).ι WalkingParallelPair.one ≫ f.Hom =\n    NatTrans.app (Multicofork.toSigmaCofork K₂).ι WalkingParallelPair.one\n[PROOFSTEP]\napply colimit.hom_ext\n[GOAL]\ncase one.w\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Multicofork I\nf : K₁ ⟶ K₂\n⊢ ∀ (j : Discrete I.R),\n    colimit.ι (Discrete.functor I.right) j ≫\n        NatTrans.app (Multicofork.toSigmaCofork K₁).ι WalkingParallelPair.one ≫ f.Hom =\n      colimit.ι (Discrete.functor I.right) j ≫ NatTrans.app (Multicofork.toSigmaCofork K₂).ι WalkingParallelPair.one\n[PROOFSTEP]\nrintro ⟨j⟩\n[GOAL]\ncase one.w.mk\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Multicofork I\nf : K₁ ⟶ K₂\nj : I.R\n⊢ colimit.ι (Discrete.functor I.right) { as := j } ≫\n      NatTrans.app (Multicofork.toSigmaCofork K₁).ι WalkingParallelPair.one ≫ f.Hom =\n    colimit.ι (Discrete.functor I.right) { as := j } ≫\n      NatTrans.app (Multicofork.toSigmaCofork K₂).ι WalkingParallelPair.one\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Cofork (fstSigmaMap I) (sndSigmaMap I)\nf : K₁ ⟶ K₂\n⊢ ∀ (j : WalkingMultispan I.fstFrom I.sndFrom),\n    NatTrans.app (Multicofork.ofSigmaCofork I K₁).ι j ≫ f.Hom = NatTrans.app (Multicofork.ofSigmaCofork I K₂).ι j\n[PROOFSTEP]\nrintro\n  (_ | _)\n      -- porting note; in mathlib3, `simp` worked. What seems to be happening is that\n              -- the `simp` set is not confluent, and mathlib3 found\n              -- `Multicofork.ofSigmaCofork_ι_app_left` before `Multicofork.fst_app_right`,\n              -- but mathlib4 finds `Multicofork.fst_app_right` first.\n[GOAL]\ncase left\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Cofork (fstSigmaMap I) (sndSigmaMap I)\nf : K₁ ⟶ K₂\na✝ : I.L\n⊢ NatTrans.app (Multicofork.ofSigmaCofork I K₁).ι (WalkingMultispan.left a✝) ≫ f.Hom =\n    NatTrans.app (Multicofork.ofSigmaCofork I K₂).ι (WalkingMultispan.left a✝)\ncase right\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Cofork (fstSigmaMap I) (sndSigmaMap I)\nf : K₁ ⟶ K₂\na✝ : I.R\n⊢ NatTrans.app (Multicofork.ofSigmaCofork I K₁).ι (WalkingMultispan.right a✝) ≫ f.Hom =\n    NatTrans.app (Multicofork.ofSigmaCofork I K₂).ι (WalkingMultispan.right a✝)\n[PROOFSTEP]\n{simp [-Multicofork.fst_app_right]\n}\n-- porting note: similarly here, the `simp` set seems to be non-confluent\n[GOAL]\ncase left\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Cofork (fstSigmaMap I) (sndSigmaMap I)\nf : K₁ ⟶ K₂\na✝ : I.L\n⊢ NatTrans.app (Multicofork.ofSigmaCofork I K₁).ι (WalkingMultispan.left a✝) ≫ f.Hom =\n    NatTrans.app (Multicofork.ofSigmaCofork I K₂).ι (WalkingMultispan.left a✝)\n[PROOFSTEP]\nsimp [-Multicofork.fst_app_right]\n[GOAL]\ncase right\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Cofork (fstSigmaMap I) (sndSigmaMap I)\nf : K₁ ⟶ K₂\na✝ : I.R\n⊢ NatTrans.app (Multicofork.ofSigmaCofork I K₁).ι (WalkingMultispan.right a✝) ≫ f.Hom =\n    NatTrans.app (Multicofork.ofSigmaCofork I K₂).ι (WalkingMultispan.right a✝)\n[PROOFSTEP]\n{simp [-Multicofork.ofSigmaCofork_pt]\n}\n[GOAL]\ncase right\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK₁ K₂ : Cofork (fstSigmaMap I) (sndSigmaMap I)\nf : K₁ ⟶ K₂\na✝ : I.R\n⊢ NatTrans.app (Multicofork.ofSigmaCofork I K₁).ι (WalkingMultispan.right a✝) ≫ f.Hom =\n    NatTrans.app (Multicofork.ofSigmaCofork I K₂).ι (WalkingMultispan.right a✝)\n[PROOFSTEP]\nsimp [-Multicofork.ofSigmaCofork_pt]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Multicofork I\n⊢ ∀ (j : WalkingMultispan I.fstFrom I.sndFrom),\n    NatTrans.app ((𝟭 (Multicofork I)).obj K).ι j ≫ (Iso.refl ((𝟭 (Multicofork I)).obj K).pt).hom =\n      NatTrans.app ((toSigmaCoforkFunctor I ⋙ ofSigmaCoforkFunctor I).obj K).ι j\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase left\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Multicofork I\na✝ : I.L\n⊢ NatTrans.app ((𝟭 (Multicofork I)).obj K).ι (WalkingMultispan.left a✝) ≫\n      (Iso.refl ((𝟭 (Multicofork I)).obj K).pt).hom =\n    NatTrans.app ((toSigmaCoforkFunctor I ⋙ ofSigmaCoforkFunctor I).obj K).ι (WalkingMultispan.left a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Multicofork I\na✝ : I.R\n⊢ NatTrans.app ((𝟭 (Multicofork I)).obj K).ι (WalkingMultispan.right a✝) ≫\n      (Iso.refl ((𝟭 (Multicofork I)).obj K).pt).hom =\n    NatTrans.app ((toSigmaCoforkFunctor I ⋙ ofSigmaCoforkFunctor I).obj K).ι (WalkingMultispan.right a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Cofork (fstSigmaMap I) (sndSigmaMap I)\n⊢ Cofork.π ((ofSigmaCoforkFunctor I ⋙ toSigmaCoforkFunctor I).obj K) ≫\n      (Iso.refl ((ofSigmaCoforkFunctor I ⋙ toSigmaCoforkFunctor I).obj K).pt).hom =\n    Cofork.π ((𝟭 (Cofork (fstSigmaMap I) (sndSigmaMap I))).obj K)\n[PROOFSTEP]\napply Limits.colimit.hom_ext\n[GOAL]\ncase w\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Cofork (fstSigmaMap I) (sndSigmaMap I)\n⊢ ∀ (j : Discrete I.R),\n    colimit.ι (Discrete.functor I.right) j ≫\n        Cofork.π ((ofSigmaCoforkFunctor I ⋙ toSigmaCoforkFunctor I).obj K) ≫\n          (Iso.refl ((ofSigmaCoforkFunctor I ⋙ toSigmaCoforkFunctor I).obj K).pt).hom =\n      colimit.ι (Discrete.functor I.right) j ≫ Cofork.π ((𝟭 (Cofork (fstSigmaMap I) (sndSigmaMap I))).obj K)\n[PROOFSTEP]\nrintro ⟨j⟩\n[GOAL]\ncase w.mk\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Cofork (fstSigmaMap I) (sndSigmaMap I)\nj : I.R\n⊢ colimit.ι (Discrete.functor I.right) { as := j } ≫\n      Cofork.π ((ofSigmaCoforkFunctor I ⋙ toSigmaCoforkFunctor I).obj K) ≫\n        (Iso.refl ((ofSigmaCoforkFunctor I ⋙ toSigmaCoforkFunctor I).obj K).pt).hom =\n    colimit.ι (Discrete.functor I.right) { as := j } ≫ Cofork.π ((𝟭 (Cofork (fstSigmaMap I) (sndSigmaMap I))).obj K)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.mk\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Cofork (fstSigmaMap I) (sndSigmaMap I)\nj : I.R\n⊢ colimit.ι (Discrete.functor I.right) { as := j } ≫\n      Sigma.desc (Multicofork.π (Multicofork.ofSigmaCofork I K)) ≫ 𝟙 K.pt =\n    colimit.ι (Discrete.functor I.right) { as := j } ≫ Cofork.π K\n[PROOFSTEP]\nsimp only [Category.comp_id, colimit.ι_desc, Cofan.mk_ι_app]\n[GOAL]\ncase w.mk\nC : Type u\ninst✝² : Category.{v, u} C\nI : MultispanIndex C\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nK : Cofork (fstSigmaMap I) (sndSigmaMap I)\nj : I.R\n⊢ Multicofork.π (Multicofork.ofSigmaCofork I K) j = colimit.ι (Discrete.functor I.right) { as := j } ≫ Cofork.π K\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nI : MulticospanIndex C\ninst✝ : HasMultiequalizer I\nW : C\ni j : W ⟶ multiequalizer I\nh : ∀ (a : I.L), i ≫ ι I a = j ≫ ι I a\n⊢ ∀ (j_1 : WalkingMulticospan I.fstTo I.sndTo),\n    i ≫ limit.π (MulticospanIndex.multicospan I) j_1 = j ≫ limit.π (MulticospanIndex.multicospan I) j_1\n[PROOFSTEP]\nrintro (a | b)\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nI : MulticospanIndex C\ninst✝ : HasMultiequalizer I\nW : C\ni j : W ⟶ multiequalizer I\nh : ∀ (a : I.L), i ≫ ι I a = j ≫ ι I a\na : I.L\n⊢ i ≫ limit.π (MulticospanIndex.multicospan I) (WalkingMulticospan.left a) =\n    j ≫ limit.π (MulticospanIndex.multicospan I) (WalkingMulticospan.left a)\n[PROOFSTEP]\napply h\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nI : MulticospanIndex C\ninst✝ : HasMultiequalizer I\nW : C\ni j : W ⟶ multiequalizer I\nh : ∀ (a : I.L), i ≫ ι I a = j ≫ ι I a\nb : I.R\n⊢ i ≫ limit.π (MulticospanIndex.multicospan I) (WalkingMulticospan.right b) =\n    j ≫ limit.π (MulticospanIndex.multicospan I) (WalkingMulticospan.right b)\n[PROOFSTEP]\nsimp_rw [← limit.w I.multicospan (WalkingMulticospan.Hom.fst b), ← Category.assoc, h]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nI : MulticospanIndex C\ninst✝² : HasMultiequalizer I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\na : I.L\n⊢ ιPi I ≫ Pi.π I.left a = ι I a\n[PROOFSTEP]\nrw [ιPi, Category.assoc, ← Iso.eq_inv_comp, isoEqualizer]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nI : MulticospanIndex C\ninst✝² : HasMultiequalizer I\ninst✝¹ : HasProduct I.left\ninst✝ : HasProduct I.right\na : I.L\n⊢ equalizer.ι (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I) ≫ Pi.π I.left a =\n    (limit.isoLimitCone\n          {\n            cone :=\n              (MulticospanIndex.multiforkEquivPiFork I).inverse.obj\n                (limit.cone (parallelPair (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I))),\n            isLimit :=\n              IsLimit.ofPreservesConeTerminal (MulticospanIndex.multiforkEquivPiFork I).inverse\n                (limit.isLimit (parallelPair (MulticospanIndex.fstPiMap I) (MulticospanIndex.sndPiMap I))) }).inv ≫\n      ι I a\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nI : MultispanIndex C\ninst✝ : HasMulticoequalizer I\nW : C\ni j : multicoequalizer I ⟶ W\nh : ∀ (b : I.R), π I b ≫ i = π I b ≫ j\n⊢ ∀ (j_1 : WalkingMultispan I.fstFrom I.sndFrom),\n    colimit.ι (MultispanIndex.multispan I) j_1 ≫ i = colimit.ι (MultispanIndex.multispan I) j_1 ≫ j\n[PROOFSTEP]\nrintro (a | b)\n[GOAL]\ncase left\nC : Type u\ninst✝¹ : Category.{v, u} C\nI : MultispanIndex C\ninst✝ : HasMulticoequalizer I\nW : C\ni j : multicoequalizer I ⟶ W\nh : ∀ (b : I.R), π I b ≫ i = π I b ≫ j\na : I.L\n⊢ colimit.ι (MultispanIndex.multispan I) (WalkingMultispan.left a) ≫ i =\n    colimit.ι (MultispanIndex.multispan I) (WalkingMultispan.left a) ≫ j\n[PROOFSTEP]\nsimp_rw [← colimit.w I.multispan (WalkingMultispan.Hom.fst a), Category.assoc, h]\n[GOAL]\ncase right\nC : Type u\ninst✝¹ : Category.{v, u} C\nI : MultispanIndex C\ninst✝ : HasMulticoequalizer I\nW : C\ni j : multicoequalizer I ⟶ W\nh : ∀ (b : I.R), π I b ≫ i = π I b ≫ j\nb : I.R\n⊢ colimit.ι (MultispanIndex.multispan I) (WalkingMultispan.right b) ≫ i =\n    colimit.ι (MultispanIndex.multispan I) (WalkingMultispan.right b) ≫ j\n[PROOFSTEP]\napply h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nI : MultispanIndex C\ninst✝² : HasMulticoequalizer I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nb : I.R\n⊢ Sigma.ι I.right b ≫ sigmaπ I = π I b\n[PROOFSTEP]\nrw [sigmaπ, ← Category.assoc, Iso.comp_inv_eq, isoCoequalizer]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nI : MultispanIndex C\ninst✝² : HasMulticoequalizer I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nb : I.R\n⊢ Sigma.ι I.right b ≫ coequalizer.π (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I) =\n    π I b ≫\n      (colimit.isoColimitCocone\n          {\n            cocone :=\n              (MultispanIndex.multicoforkEquivSigmaCofork I).inverse.obj\n                (colimit.cocone (parallelPair (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I))),\n            isColimit :=\n              IsColimit.ofPreservesCoconeInitial (MultispanIndex.multicoforkEquivSigmaCofork I).inverse\n                (colimit.isColimit (parallelPair (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I))) }).hom\n[PROOFSTEP]\nsimp only [MultispanIndex.multicoforkEquivSigmaCofork_inverse, MultispanIndex.ofSigmaCoforkFunctor_obj,\n  colimit.isoColimitCocone_ι_hom, Multicofork.ofSigmaCofork_pt, colimit.cocone_x, Multicofork.π_eq_app_right]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nI : MultispanIndex C\ninst✝² : HasMulticoequalizer I\ninst✝¹ : HasCoproduct I.left\ninst✝ : HasCoproduct I.right\nb : I.R\n⊢ Sigma.ι I.right b ≫ coequalizer.π (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I) =\n    Multicofork.π\n      (Multicofork.ofSigmaCofork I\n        (colimit.cocone (parallelPair (MultispanIndex.fstSigmaMap I) (MultispanIndex.sndSigmaMap I))))\n      b\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "llama_tokens": 54357, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646010190476, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3720809666890706}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns✝ : Finset α\na : α\nh : IsLowerSet ↑𝒜\ns t : Finset α\nhts : t ≤ s\n⊢ s ∈ ↑(Finset.nonMemberSubfamily a 𝒜) → t ∈ ↑(Finset.nonMemberSubfamily a 𝒜)\n[PROOFSTEP]\nsimp_rw [mem_coe, mem_nonMemberSubfamily]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns✝ : Finset α\na : α\nh : IsLowerSet ↑𝒜\ns t : Finset α\nhts : t ≤ s\n⊢ s ∈ 𝒜 ∧ ¬a ∈ s → t ∈ 𝒜 ∧ ¬a ∈ t\n[PROOFSTEP]\nexact And.imp (h hts) (mt <| @hts _)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nh : IsLowerSet ↑𝒜\n⊢ IsLowerSet ↑(Finset.memberSubfamily a 𝒜)\n[PROOFSTEP]\nrintro s t hts\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns✝ : Finset α\na : α\nh : IsLowerSet ↑𝒜\ns t : Finset α\nhts : t ≤ s\n⊢ s ∈ ↑(Finset.memberSubfamily a 𝒜) → t ∈ ↑(Finset.memberSubfamily a 𝒜)\n[PROOFSTEP]\nsimp_rw [mem_coe, mem_memberSubfamily]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns✝ : Finset α\na : α\nh : IsLowerSet ↑𝒜\ns t : Finset α\nhts : t ≤ s\n⊢ insert a s ∈ 𝒜 ∧ ¬a ∈ s → insert a t ∈ 𝒜 ∧ ¬a ∈ t\n[PROOFSTEP]\nexact And.imp (h <| insert_subset_insert _ hts) (mt <| @hts _)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns✝ : Finset α\na : α\nh : IsLowerSet ↑𝒜\ns : Finset α\n⊢ s ∈ Finset.memberSubfamily a 𝒜 → s ∈ Finset.nonMemberSubfamily a 𝒜\n[PROOFSTEP]\nrw [mem_memberSubfamily, mem_nonMemberSubfamily]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns✝ : Finset α\na : α\nh : IsLowerSet ↑𝒜\ns : Finset α\n⊢ insert a s ∈ 𝒜 ∧ ¬a ∈ s → s ∈ 𝒜 ∧ ¬a ∈ s\n[PROOFSTEP]\nexact And.imp_left (h <| subset_insert _ _)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ s\n⊢ card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n[PROOFSTEP]\ninduction' s using Finset.induction with a s hs ih generalizing 𝒜 ℬ\n[GOAL]\ncase empty\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns : Finset α\na : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ ∅\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ ∅\n⊢ card 𝒜 * card ℬ ≤ 2 ^ card ∅ * card (𝒜 ∩ ℬ)\n[PROOFSTEP]\nsimp_rw [subset_empty, ← subset_singleton_iff', subset_singleton_iff] at h𝒜s hℬs \n[GOAL]\ncase empty\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns : Finset α\na : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : 𝒜 = ∅ ∨ 𝒜 = {∅}\nhℬs : ℬ = ∅ ∨ ℬ = {∅}\n⊢ card 𝒜 * card ℬ ≤ 2 ^ card ∅ * card (𝒜 ∩ ℬ)\n[PROOFSTEP]\nobtain rfl | rfl := h𝒜s\n[GOAL]\ncase empty.inl\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ✝ : Finset (Finset α)\ns : Finset α\na : α\nh𝒜✝ : IsLowerSet ↑𝒜\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s\nℬ : Finset (Finset α)\nhℬ : IsLowerSet ↑ℬ\nhℬs : ℬ = ∅ ∨ ℬ = {∅}\nh𝒜 : IsLowerSet ↑∅\n⊢ card ∅ * card ℬ ≤ 2 ^ card ∅ * card (∅ ∩ ℬ)\n[PROOFSTEP]\nsimp only [card_empty, empty_inter, mul_zero, zero_mul]\n[GOAL]\ncase empty.inr\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ✝ : Finset (Finset α)\ns : Finset α\na : α\nh𝒜✝ : IsLowerSet ↑𝒜\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s\nℬ : Finset (Finset α)\nhℬ : IsLowerSet ↑ℬ\nhℬs : ℬ = ∅ ∨ ℬ = {∅}\nh𝒜 : IsLowerSet ↑{∅}\n⊢ card {∅} * card ℬ ≤ 2 ^ card ∅ * card ({∅} ∩ ℬ)\n[PROOFSTEP]\nobtain rfl | rfl := hℬs\n[GOAL]\ncase empty.inr.inl\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nh𝒜✝ : IsLowerSet ↑𝒜\nhℬ✝ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ s\nh𝒜 : IsLowerSet ↑{∅}\nhℬ : IsLowerSet ↑∅\n⊢ card {∅} * card ∅ ≤ 2 ^ card ∅ * card ({∅} ∩ ∅)\n[PROOFSTEP]\nsimp only [card_empty, inter_empty, mul_zero, zero_mul]\n[GOAL]\ncase empty.inr.inr\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\nh𝒜✝ : IsLowerSet ↑𝒜\nhℬ✝ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ s\nh𝒜 hℬ : IsLowerSet ↑{∅}\n⊢ card {∅} * card {∅} ≤ 2 ^ card ∅ * card ({∅} ∩ {∅})\n[PROOFSTEP]\nsimp only [card_empty, pow_zero, inter_singleton_of_mem, mem_singleton, card_singleton]\n[GOAL]\ncase insert\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\n⊢ card 𝒜 * card ℬ ≤ 2 ^ card (insert a s) * card (𝒜 ∩ ℬ)\n[PROOFSTEP]\nrw [card_insert_of_not_mem hs, ← card_memberSubfamily_add_card_nonMemberSubfamily a 𝒜, ←\n  card_memberSubfamily_add_card_nonMemberSubfamily a ℬ, add_mul, mul_add, mul_add, add_comm (_ * _), add_add_add_comm]\n[GOAL]\ncase insert\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\n⊢ card (Finset.memberSubfamily a 𝒜) * card (Finset.nonMemberSubfamily a ℬ) +\n        card (Finset.nonMemberSubfamily a 𝒜) * card (Finset.memberSubfamily a ℬ) +\n      (card (Finset.memberSubfamily a 𝒜) * card (Finset.memberSubfamily a ℬ) +\n        card (Finset.nonMemberSubfamily a 𝒜) * card (Finset.nonMemberSubfamily a ℬ)) ≤\n    2 ^ (card s + 1) * card (𝒜 ∩ ℬ)\n[PROOFSTEP]\nrefine'\n  (add_le_add_right\n        (mul_add_mul_le_mul_add_mul (card_le_of_subset h𝒜.memberSubfamily_subset_nonMemberSubfamily) <|\n          card_le_of_subset hℬ.memberSubfamily_subset_nonMemberSubfamily)\n        _).trans\n    _\n[GOAL]\ncase insert\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\n⊢ card (Finset.memberSubfamily a 𝒜) * card (Finset.memberSubfamily a ℬ) +\n        card (Finset.nonMemberSubfamily a 𝒜) * card (Finset.nonMemberSubfamily a ℬ) +\n      (card (Finset.memberSubfamily a 𝒜) * card (Finset.memberSubfamily a ℬ) +\n        card (Finset.nonMemberSubfamily a 𝒜) * card (Finset.nonMemberSubfamily a ℬ)) ≤\n    2 ^ (card s + 1) * card (𝒜 ∩ ℬ)\n[PROOFSTEP]\nrw [← two_mul, pow_succ, mul_assoc]\n[GOAL]\ncase insert\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\n⊢ 2 *\n      (card (Finset.memberSubfamily a 𝒜) * card (Finset.memberSubfamily a ℬ) +\n        card (Finset.nonMemberSubfamily a 𝒜) * card (Finset.nonMemberSubfamily a ℬ)) ≤\n    2 * (2 ^ card s * card (𝒜 ∩ ℬ))\n[PROOFSTEP]\nhave h₀ : ∀ 𝒞 : Finset (Finset α), (∀ t ∈ 𝒞, t ⊆ insert a s) → ∀ t ∈ 𝒞.nonMemberSubfamily a, t ⊆ s :=\n  by\n  rintro 𝒞 h𝒞 t ht\n  rw [mem_nonMemberSubfamily] at ht \n  exact (subset_insert_iff_of_not_mem ht.2).1 (h𝒞 _ ht.1)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\n⊢ ∀ (𝒞 : Finset (Finset α)),\n    (∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s) → ∀ (t : Finset α), t ∈ Finset.nonMemberSubfamily a 𝒞 → t ⊆ s\n[PROOFSTEP]\nrintro 𝒞 h𝒞 t ht\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\n𝒞 : Finset (Finset α)\nh𝒞 : ∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s\nt : Finset α\nht : t ∈ Finset.nonMemberSubfamily a 𝒞\n⊢ t ⊆ s\n[PROOFSTEP]\nrw [mem_nonMemberSubfamily] at ht \n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\n𝒞 : Finset (Finset α)\nh𝒞 : ∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s\nt : Finset α\nht : t ∈ 𝒞 ∧ ¬a ∈ t\n⊢ t ⊆ s\n[PROOFSTEP]\nexact (subset_insert_iff_of_not_mem ht.2).1 (h𝒞 _ ht.1)\n[GOAL]\ncase insert\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\nh₀ :\n  ∀ (𝒞 : Finset (Finset α)),\n    (∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s) → ∀ (t : Finset α), t ∈ Finset.nonMemberSubfamily a 𝒞 → t ⊆ s\n⊢ 2 *\n      (card (Finset.memberSubfamily a 𝒜) * card (Finset.memberSubfamily a ℬ) +\n        card (Finset.nonMemberSubfamily a 𝒜) * card (Finset.nonMemberSubfamily a ℬ)) ≤\n    2 * (2 ^ card s * card (𝒜 ∩ ℬ))\n[PROOFSTEP]\nhave h₁ : ∀ 𝒞 : Finset (Finset α), (∀ t ∈ 𝒞, t ⊆ insert a s) → ∀ t ∈ 𝒞.memberSubfamily a, t ⊆ s :=\n  by\n  rintro 𝒞 h𝒞 t ht\n  rw [mem_memberSubfamily] at ht \n  exact (subset_insert_iff_of_not_mem ht.2).1 ((subset_insert _ _).trans <| h𝒞 _ ht.1)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\nh₀ :\n  ∀ (𝒞 : Finset (Finset α)),\n    (∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s) → ∀ (t : Finset α), t ∈ Finset.nonMemberSubfamily a 𝒞 → t ⊆ s\n⊢ ∀ (𝒞 : Finset (Finset α)),\n    (∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s) → ∀ (t : Finset α), t ∈ Finset.memberSubfamily a 𝒞 → t ⊆ s\n[PROOFSTEP]\nrintro 𝒞 h𝒞 t ht\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\nh₀ :\n  ∀ (𝒞 : Finset (Finset α)),\n    (∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s) → ∀ (t : Finset α), t ∈ Finset.nonMemberSubfamily a 𝒞 → t ⊆ s\n𝒞 : Finset (Finset α)\nh𝒞 : ∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s\nt : Finset α\nht : t ∈ Finset.memberSubfamily a 𝒞\n⊢ t ⊆ s\n[PROOFSTEP]\nrw [mem_memberSubfamily] at ht \n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\nh₀ :\n  ∀ (𝒞 : Finset (Finset α)),\n    (∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s) → ∀ (t : Finset α), t ∈ Finset.nonMemberSubfamily a 𝒞 → t ⊆ s\n𝒞 : Finset (Finset α)\nh𝒞 : ∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s\nt : Finset α\nht : insert a t ∈ 𝒞 ∧ ¬a ∈ t\n⊢ t ⊆ s\n[PROOFSTEP]\nexact (subset_insert_iff_of_not_mem ht.2).1 ((subset_insert _ _).trans <| h𝒞 _ ht.1)\n[GOAL]\ncase insert\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\nh₀ :\n  ∀ (𝒞 : Finset (Finset α)),\n    (∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s) → ∀ (t : Finset α), t ∈ Finset.nonMemberSubfamily a 𝒞 → t ⊆ s\nh₁ :\n  ∀ (𝒞 : Finset (Finset α)),\n    (∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s) → ∀ (t : Finset α), t ∈ Finset.memberSubfamily a 𝒞 → t ⊆ s\n⊢ 2 *\n      (card (Finset.memberSubfamily a 𝒜) * card (Finset.memberSubfamily a ℬ) +\n        card (Finset.nonMemberSubfamily a 𝒜) * card (Finset.nonMemberSubfamily a ℬ)) ≤\n    2 * (2 ^ card s * card (𝒜 ∩ ℬ))\n[PROOFSTEP]\nrefine' mul_le_mul_left' _ _\n[GOAL]\ncase insert\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\nh₀ :\n  ∀ (𝒞 : Finset (Finset α)),\n    (∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s) → ∀ (t : Finset α), t ∈ Finset.nonMemberSubfamily a 𝒞 → t ⊆ s\nh₁ :\n  ∀ (𝒞 : Finset (Finset α)),\n    (∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s) → ∀ (t : Finset α), t ∈ Finset.memberSubfamily a 𝒞 → t ⊆ s\n⊢ card (Finset.memberSubfamily a 𝒜) * card (Finset.memberSubfamily a ℬ) +\n      card (Finset.nonMemberSubfamily a 𝒜) * card (Finset.nonMemberSubfamily a ℬ) ≤\n    2 ^ card s * card (𝒜 ∩ ℬ)\n[PROOFSTEP]\nrefine'\n  (add_le_add (ih h𝒜.memberSubfamily hℬ.memberSubfamily (h₁ _ h𝒜s) <| h₁ _ hℬs) <|\n        ih h𝒜.nonMemberSubfamily hℬ.nonMemberSubfamily (h₀ _ h𝒜s) <| h₀ _ hℬs).trans_eq\n    _\n[GOAL]\ncase insert\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜✝ ℬ✝ : Finset (Finset α)\ns✝ : Finset α\na✝ : α\nh𝒜✝ : IsLowerSet ↑𝒜✝\nhℬ✝ : IsLowerSet ↑ℬ✝\nh𝒜s✝ : ∀ (t : Finset α), t ∈ 𝒜✝ → t ⊆ s✝\nhℬs✝ : ∀ (t : Finset α), t ∈ ℬ✝ → t ⊆ s✝\na : α\ns : Finset α\nhs : ¬a ∈ s\nih :\n  ∀ {𝒜 ℬ : Finset (Finset α)},\n    IsLowerSet ↑𝒜 →\n      IsLowerSet ↑ℬ →\n        (∀ (t : Finset α), t ∈ 𝒜 → t ⊆ s) →\n          (∀ (t : Finset α), t ∈ ℬ → t ⊆ s) → card 𝒜 * card ℬ ≤ 2 ^ card s * card (𝒜 ∩ ℬ)\n𝒜 ℬ : Finset (Finset α)\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\nh𝒜s : ∀ (t : Finset α), t ∈ 𝒜 → t ⊆ insert a s\nhℬs : ∀ (t : Finset α), t ∈ ℬ → t ⊆ insert a s\nh₀ :\n  ∀ (𝒞 : Finset (Finset α)),\n    (∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s) → ∀ (t : Finset α), t ∈ Finset.nonMemberSubfamily a 𝒞 → t ⊆ s\nh₁ :\n  ∀ (𝒞 : Finset (Finset α)),\n    (∀ (t : Finset α), t ∈ 𝒞 → t ⊆ insert a s) → ∀ (t : Finset α), t ∈ Finset.memberSubfamily a 𝒞 → t ⊆ s\n⊢ 2 ^ card s * card (Finset.memberSubfamily a 𝒜 ∩ Finset.memberSubfamily a ℬ) +\n      2 ^ card s * card (Finset.nonMemberSubfamily a 𝒜 ∩ Finset.nonMemberSubfamily a ℬ) =\n    2 ^ card s * card (𝒜 ∩ ℬ)\n[PROOFSTEP]\nrw [← mul_add, ← memberSubfamily_inter, ← nonMemberSubfamily_inter, card_memberSubfamily_add_card_nonMemberSubfamily]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\ninst✝ : Fintype α\nh𝒜 : IsUpperSet ↑𝒜\nhℬ : IsLowerSet ↑ℬ\n⊢ 2 ^ Fintype.card α * card (𝒜 ∩ ℬ) ≤ card 𝒜 * card ℬ\n[PROOFSTEP]\nrw [← isLowerSet_compl, ← coe_compl] at h𝒜 \n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\ninst✝ : Fintype α\nh𝒜✝ : IsLowerSet (↑𝒜)ᶜ\nh𝒜 : IsLowerSet ↑𝒜ᶜ\nhℬ : IsLowerSet ↑ℬ\n⊢ 2 ^ Fintype.card α * card (𝒜 ∩ ℬ) ≤ card 𝒜 * card ℬ\n[PROOFSTEP]\nhave := h𝒜.le_card_inter_finset hℬ\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\ninst✝ : Fintype α\nh𝒜✝ : IsLowerSet (↑𝒜)ᶜ\nh𝒜 : IsLowerSet ↑𝒜ᶜ\nhℬ : IsLowerSet ↑ℬ\nthis : card 𝒜ᶜ * card ℬ ≤ 2 ^ Fintype.card α * card (𝒜ᶜ ∩ ℬ)\n⊢ 2 ^ Fintype.card α * card (𝒜 ∩ ℬ) ≤ card 𝒜 * card ℬ\n[PROOFSTEP]\nrwa [card_compl, Fintype.card_finset, tsub_mul, tsub_le_iff_tsub_le, ← mul_tsub, ← card_sdiff (inter_subset_right _ _),\n  sdiff_inter_self_right, sdiff_compl, _root_.inf_comm] at this \n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\ninst✝ : Fintype α\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsUpperSet ↑ℬ\n⊢ 2 ^ Fintype.card α * card (𝒜 ∩ ℬ) ≤ card 𝒜 * card ℬ\n[PROOFSTEP]\nrw [inter_comm, mul_comm 𝒜.card]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\ninst✝ : Fintype α\nh𝒜 : IsLowerSet ↑𝒜\nhℬ : IsUpperSet ↑ℬ\n⊢ 2 ^ Fintype.card α * card (ℬ ∩ 𝒜) ≤ card ℬ * card 𝒜\n[PROOFSTEP]\nexact hℬ.card_inter_le_finset h𝒜\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\ninst✝ : Fintype α\nh𝒜 : IsUpperSet ↑𝒜\nhℬ : IsUpperSet ↑ℬ\n⊢ card 𝒜 * card ℬ ≤ 2 ^ Fintype.card α * card (𝒜 ∩ ℬ)\n[PROOFSTEP]\nrw [← isLowerSet_compl, ← coe_compl] at h𝒜 \n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\ninst✝ : Fintype α\nh𝒜✝ : IsLowerSet (↑𝒜)ᶜ\nh𝒜 : IsLowerSet ↑𝒜ᶜ\nhℬ : IsUpperSet ↑ℬ\n⊢ card 𝒜 * card ℬ ≤ 2 ^ Fintype.card α * card (𝒜 ∩ ℬ)\n[PROOFSTEP]\nhave := h𝒜.card_inter_le_finset hℬ\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\ninst✝ : Fintype α\nh𝒜✝ : IsLowerSet (↑𝒜)ᶜ\nh𝒜 : IsLowerSet ↑𝒜ᶜ\nhℬ : IsUpperSet ↑ℬ\nthis : 2 ^ Fintype.card α * card (𝒜ᶜ ∩ ℬ) ≤ card 𝒜ᶜ * card ℬ\n⊢ card 𝒜 * card ℬ ≤ 2 ^ Fintype.card α * card (𝒜 ∩ ℬ)\n[PROOFSTEP]\nrwa [card_compl, Fintype.card_finset, tsub_mul, le_tsub_iff_le_tsub, ← mul_tsub, ← card_sdiff (inter_subset_right _ _),\n  sdiff_inter_self_right, sdiff_compl, _root_.inf_comm] at this \n[GOAL]\ncase h₁\nα : Type u_1\ninst✝¹ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\ninst✝ : Fintype α\nh𝒜✝ : IsLowerSet (↑𝒜)ᶜ\nh𝒜 : IsLowerSet ↑𝒜ᶜ\nhℬ : IsUpperSet ↑ℬ\nthis : 2 ^ Fintype.card α * card (𝒜ᶜ ∩ ℬ) ≤ 2 ^ Fintype.card α * card ℬ - card 𝒜 * card ℬ\n⊢ 2 ^ Fintype.card α * card (𝒜ᶜ ∩ ℬ) ≤ 2 ^ Fintype.card α * card ℬ\n[PROOFSTEP]\nexact mul_le_mul_left' (card_le_of_subset <| inter_subset_right _ _) _\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝¹ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\ninst✝ : Fintype α\nh𝒜✝ : IsLowerSet (↑𝒜)ᶜ\nh𝒜 : IsLowerSet ↑𝒜ᶜ\nhℬ : IsUpperSet ↑ℬ\nthis : 2 ^ Fintype.card α * card (𝒜ᶜ ∩ ℬ) ≤ 2 ^ Fintype.card α * card ℬ - card 𝒜 * card ℬ\n⊢ card 𝒜 * card ℬ ≤ 2 ^ Fintype.card α * card ℬ\n[PROOFSTEP]\nrw [← Fintype.card_finset]\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝¹ : DecidableEq α\n𝒜 ℬ : Finset (Finset α)\ns : Finset α\na : α\ninst✝ : Fintype α\nh𝒜✝ : IsLowerSet (↑𝒜)ᶜ\nh𝒜 : IsLowerSet ↑𝒜ᶜ\nhℬ : IsUpperSet ↑ℬ\nthis : 2 ^ Fintype.card α * card (𝒜ᶜ ∩ ℬ) ≤ 2 ^ Fintype.card α * card ℬ - card 𝒜 * card ℬ\n⊢ card 𝒜 * card ℬ ≤ Fintype.card (Finset α) * card ℬ\n[PROOFSTEP]\nexact mul_le_mul_right' (card_le_univ _) _\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SetFamily.HarrisKleitman", "llama_tokens": 14276, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442251201477016, "lm_q2_score": 0.5774953651858118, "lm_q1q2_score": 0.37203702102157044}}
{"text": "[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nmotive : M ⊗[R] N → Prop\nz : M ⊗[R] N\nzero : motive 0\ntmul : ∀ (x : M) (y : N), motive (x ⊗ₜ[R] y)\nadd : ∀ (x y : M ⊗[R] N), motive x → motive y → motive (x + y)\nx : FreeAddMonoid (M × N)\nx✝ : M × N\ny : FreeAddMonoid (M × N)\nih : motive ↑y\nm : M\nn : N\n⊢ motive ↑(FreeAddMonoid.of (m, n) + y)\n[PROOFSTEP]\nrw [AddCon.coe_add]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nmotive : M ⊗[R] N → Prop\nz : M ⊗[R] N\nzero : motive 0\ntmul : ∀ (x : M) (y : N), motive (x ⊗ₜ[R] y)\nadd : ∀ (x y : M ⊗[R] N), motive x → motive y → motive (x + y)\nx : FreeAddMonoid (M × N)\nx✝ : M × N\ny : FreeAddMonoid (M × N)\nih : motive ↑y\nm : M\nn : N\n⊢ motive (↑(FreeAddMonoid.of (m, n)) + ↑y)\n[PROOFSTEP]\nexact add _ _ (tmul ..) ih\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMul R' R\ninst✝² : IsScalarTower R' R M\ninst✝¹ : DistribMulAction R' N\ninst✝ : IsScalarTower R' R N\nr : R'\nm : M\nn : N\n⊢ (r • m) ⊗ₜ[R] n = m ⊗ₜ[R] (r • n)\n[PROOFSTEP]\nconv_lhs => rw [← one_smul R m]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMul R' R\ninst✝² : IsScalarTower R' R M\ninst✝¹ : DistribMulAction R' N\ninst✝ : IsScalarTower R' R N\nr : R'\nm : M\nn : N\n| (r • m) ⊗ₜ[R] n\n[PROOFSTEP]\nrw [← one_smul R m]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMul R' R\ninst✝² : IsScalarTower R' R M\ninst✝¹ : DistribMulAction R' N\ninst✝ : IsScalarTower R' R N\nr : R'\nm : M\nn : N\n| (r • m) ⊗ₜ[R] n\n[PROOFSTEP]\nrw [← one_smul R m]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMul R' R\ninst✝² : IsScalarTower R' R M\ninst✝¹ : DistribMulAction R' N\ninst✝ : IsScalarTower R' R N\nr : R'\nm : M\nn : N\n| (r • m) ⊗ₜ[R] n\n[PROOFSTEP]\nrw [← one_smul R m]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMul R' R\ninst✝² : IsScalarTower R' R M\ninst✝¹ : DistribMulAction R' N\ninst✝ : IsScalarTower R' R N\nr : R'\nm : M\nn : N\n⊢ (r • 1 • m) ⊗ₜ[R] n = m ⊗ₜ[R] (r • n)\n[PROOFSTEP]\nconv_rhs => rw [← one_smul R n]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMul R' R\ninst✝² : IsScalarTower R' R M\ninst✝¹ : DistribMulAction R' N\ninst✝ : IsScalarTower R' R N\nr : R'\nm : M\nn : N\n| m ⊗ₜ[R] (r • n)\n[PROOFSTEP]\nrw [← one_smul R n]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMul R' R\ninst✝² : IsScalarTower R' R M\ninst✝¹ : DistribMulAction R' N\ninst✝ : IsScalarTower R' R N\nr : R'\nm : M\nn : N\n| m ⊗ₜ[R] (r • n)\n[PROOFSTEP]\nrw [← one_smul R n]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMul R' R\ninst✝² : IsScalarTower R' R M\ninst✝¹ : DistribMulAction R' N\ninst✝ : IsScalarTower R' R N\nr : R'\nm : M\nn : N\n| m ⊗ₜ[R] (r • n)\n[PROOFSTEP]\nrw [← one_smul R n]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMul R' R\ninst✝² : IsScalarTower R' R M\ninst✝¹ : DistribMulAction R' N\ninst✝ : IsScalarTower R' R N\nr : R'\nm : M\nn : N\n⊢ (r • 1 • m) ⊗ₜ[R] n = m ⊗ₜ[R] (r • 1 • n)\n[PROOFSTEP]\nrw [← smul_assoc, ← smul_assoc]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMul R' R\ninst✝² : IsScalarTower R' R M\ninst✝¹ : DistribMulAction R' N\ninst✝ : IsScalarTower R' R N\nr : R'\nm : M\nn : N\n⊢ ((r • 1) • m) ⊗ₜ[R] n = m ⊗ₜ[R] ((r • 1) • n)\n[PROOFSTEP]\nexact Quotient.sound' <| AddConGen.Rel.of _ _ <| Eqv.of_smul _ _ _\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nr : R'\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nn : N\n⊢ ↑(SMul.aux r) (FreeAddMonoid.of (0, n)) = ↑(SMul.aux r) 0\n[PROOFSTEP]\nsimp_rw [map_zero, SMul.aux_of, smul_zero, zero_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nr : R'\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nm : M\n⊢ ↑(SMul.aux r) (FreeAddMonoid.of (m, 0)) = ↑(SMul.aux r) 0\n[PROOFSTEP]\nsimp_rw [map_zero, SMul.aux_of, tmul_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nr : R'\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nm₁ m₂ : M\nn : N\n⊢ ↑(SMul.aux r) (FreeAddMonoid.of (m₁, n) + FreeAddMonoid.of (m₂, n)) = ↑(SMul.aux r) (FreeAddMonoid.of (m₁ + m₂, n))\n[PROOFSTEP]\nsimp_rw [map_add, SMul.aux_of, smul_add, add_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nr : R'\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nm : M\nn₁ n₂ : N\n⊢ ↑(SMul.aux r) (FreeAddMonoid.of (m, n₁) + FreeAddMonoid.of (m, n₂)) = ↑(SMul.aux r) (FreeAddMonoid.of (m, n₁ + n₂))\n[PROOFSTEP]\nsimp_rw [map_add, SMul.aux_of, tmul_add]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nr : R'\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\ns : R\nm : M\nn : N\n⊢ ↑(SMul.aux r) (FreeAddMonoid.of (s • m, n)) = ↑(SMul.aux r) (FreeAddMonoid.of (m, s • n))\n[PROOFSTEP]\nrw [SMul.aux_of, SMul.aux_of, ← smul_comm, smul_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nr : R'\nx✝ y✝ : FreeAddMonoid (M × N)\nhxy : Eqv R M N x✝ y✝\nx y : FreeAddMonoid (M × N)\n⊢ ↑(SMul.aux r) (x + y) = ↑(SMul.aux r) (y + x)\n[PROOFSTEP]\nsimp_rw [map_add, add_comm]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nx : M ⊗[R] N\nthis : ∀ (r : R'') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\n⊢ 0 • 0 = 0\n[PROOFSTEP]\nrw [TensorProduct.smul_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nx : M ⊗[R] N\nthis : ∀ (r : R'') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\nm : M\nn : N\n⊢ 0 • m ⊗ₜ[R] n = 0\n[PROOFSTEP]\nrw [this, zero_smul, zero_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nx✝ : M ⊗[R] N\nthis : ∀ (r : R'') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\nx y : M ⊗[R] N\nihx : 0 • x = 0\nihy : 0 • y = 0\n⊢ 0 • (x + y) = 0\n[PROOFSTEP]\nrw [TensorProduct.smul_add, ihx, ihy, add_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nx : M ⊗[R] N\nthis : ∀ (r : R') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\n⊢ 1 • 0 = 0\n[PROOFSTEP]\nrw [TensorProduct.smul_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nx : M ⊗[R] N\nthis : ∀ (r : R') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\nm : M\nn : N\n⊢ 1 • m ⊗ₜ[R] n = m ⊗ₜ[R] n\n[PROOFSTEP]\nrw [this, one_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nx✝ : M ⊗[R] N\nthis : ∀ (r : R') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\nx y : M ⊗[R] N\nihx : 1 • x = x\nihy : 1 • y = y\n⊢ 1 • (x + y) = x + y\n[PROOFSTEP]\nrw [TensorProduct.smul_add, ihx, ihy]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nr s : R''\nx : M ⊗[R] N\nthis : ∀ (r : R'') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\n⊢ (r + s) • 0 = r • 0 + s • 0\n[PROOFSTEP]\nsimp_rw [TensorProduct.smul_zero, add_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nr s : R''\nx : M ⊗[R] N\nthis : ∀ (r : R'') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\nm : M\nn : N\n⊢ (r + s) • m ⊗ₜ[R] n = r • m ⊗ₜ[R] n + s • m ⊗ₜ[R] n\n[PROOFSTEP]\nsimp_rw [this, add_smul, add_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nr s : R''\nx✝ : M ⊗[R] N\nthis : ∀ (r : R'') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\nx y : M ⊗[R] N\nihx : (r + s) • x = r • x + s • x\nihy : (r + s) • y = r • y + s • y\n⊢ (r + s) • (x + y) = r • (x + y) + s • (x + y)\n[PROOFSTEP]\nsimp_rw [TensorProduct.smul_add]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nr s : R''\nx✝ : M ⊗[R] N\nthis : ∀ (r : R'') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\nx y : M ⊗[R] N\nihx : (r + s) • x = r • x + s • x\nihy : (r + s) • y = r • y + s • y\n⊢ (r + s) • x + (r + s) • y = r • x + r • y + (s • x + s • y)\n[PROOFSTEP]\nrw [ihx, ihy, add_add_add_comm]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nsrc✝¹ : AddCommSemigroup (M ⊗[R] N) := addCommSemigroup M N\nsrc✝ : AddZeroClass (M ⊗[R] N) := addZeroClass M N\n⊢ ∀ (x : M ⊗[R] N), (fun n v => n • v) 0 x = 0\n[PROOFSTEP]\nsimp [TensorProduct.zero_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nsrc✝¹ : AddCommSemigroup (M ⊗[R] N) := addCommSemigroup M N\nsrc✝ : AddZeroClass (M ⊗[R] N) := addZeroClass M N\n⊢ ∀ (n : ℕ) (x : M ⊗[R] N), (fun n v => n • v) (n + 1) x = x + (fun n v => n • v) n x\n[PROOFSTEP]\nsimp only [TensorProduct.one_smul, TensorProduct.add_smul, add_comm, forall_const]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nthis : ∀ (r : R') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\nr s : R'\nx : M ⊗[R] N\n⊢ (r * s) • 0 = r • s • 0\n[PROOFSTEP]\nsimp_rw [TensorProduct.smul_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nthis : ∀ (r : R') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\nr s : R'\nx : M ⊗[R] N\nm : M\nn : N\n⊢ (r * s) • m ⊗ₜ[R] n = r • s • m ⊗ₜ[R] n\n[PROOFSTEP]\nsimp_rw [this, mul_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nthis : ∀ (r : R') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\nr s : R'\nx✝ x y : M ⊗[R] N\nihx : (r * s) • x = r • s • x\nihy : (r * s) • y = r • s • y\n⊢ (r * s) • (x + y) = r • s • (x + y)\n[PROOFSTEP]\nsimp_rw [TensorProduct.smul_add]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nthis : ∀ (r : R') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ[R] n\nr s : R'\nx✝ x y : M ⊗[R] N\nihx : (r * s) • x = r • s • x\nihy : (r * s) • y = r • s • y\n⊢ (r * s) • x + (r * s) • y = r • s • x + r • s • y\n[PROOFSTEP]\nrw [ihx, ihy]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nr s : R\nm : M\nn : N\n⊢ (r • m) ⊗ₜ[R] (s • n) = (r * s) • m ⊗ₜ[R] n\n[PROOFSTEP]\nsimp_rw [smul_tmul, tmul_smul, mul_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMulCommClass R R' M\ninst✝² : SMulCommClass R R'' M\ninst✝¹ : Module R''ᵐᵒᵖ M\ninst✝ : IsCentralScalar R'' M\nr : R''\nx : M ⊗[R] N\n⊢ MulOpposite.op r • 0 = r • 0\n[PROOFSTEP]\nrw [smul_zero, smul_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMulCommClass R R' M\ninst✝² : SMulCommClass R R'' M\ninst✝¹ : Module R''ᵐᵒᵖ M\ninst✝ : IsCentralScalar R'' M\nr : R''\nx✝ : M ⊗[R] N\nx : M\ny : N\n⊢ MulOpposite.op r • x ⊗ₜ[R] y = r • x ⊗ₜ[R] y\n[PROOFSTEP]\nrw [smul_tmul', smul_tmul', op_smul_eq_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\ninst✝³ : SMulCommClass R R' M\ninst✝² : SMulCommClass R R'' M\ninst✝¹ : Module R''ᵐᵒᵖ M\ninst✝ : IsCentralScalar R'' M\nr : R''\nx✝ x y : M ⊗[R] N\nhx : MulOpposite.op r • x = r • x\nhy : MulOpposite.op r • y = r • y\n⊢ MulOpposite.op r • (x + y) = r • (x + y)\n[PROOFSTEP]\nrw [smul_add, smul_add, hx, hy]\n[GOAL]\nR : Type u_1\ninst✝²⁰ : CommSemiring R\nR' : Type u_2\ninst✝¹⁹ : Monoid R'\nR'' : Type u_3\ninst✝¹⁸ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : AddCommMonoid N\ninst✝¹⁵ : AddCommMonoid P\ninst✝¹⁴ : AddCommMonoid Q\ninst✝¹³ : AddCommMonoid S\ninst✝¹² : Module R M\ninst✝¹¹ : Module R N\ninst✝¹⁰ : Module R P\ninst✝⁹ : Module R Q\ninst✝⁸ : Module R S\ninst✝⁷ : DistribMulAction R' M\ninst✝⁶ : Module R'' M\ninst✝⁵ : SMulCommClass R R' M\ninst✝⁴ : SMulCommClass R R'' M\nR'₂ : Type u_9\ninst✝³ : Monoid R'₂\ninst✝² : DistribMulAction R'₂ M\ninst✝¹ : SMulCommClass R R'₂ M\ninst✝ : SMulCommClass R' R'₂ M\nr' : R'\nr'₂ : R'₂\nx : M ⊗[R] N\n⊢ r' • r'₂ • 0 = r'₂ • r' • 0\n[PROOFSTEP]\nsimp_rw [TensorProduct.smul_zero]\n[GOAL]\nR : Type u_1\ninst✝²⁰ : CommSemiring R\nR' : Type u_2\ninst✝¹⁹ : Monoid R'\nR'' : Type u_3\ninst✝¹⁸ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : AddCommMonoid N\ninst✝¹⁵ : AddCommMonoid P\ninst✝¹⁴ : AddCommMonoid Q\ninst✝¹³ : AddCommMonoid S\ninst✝¹² : Module R M\ninst✝¹¹ : Module R N\ninst✝¹⁰ : Module R P\ninst✝⁹ : Module R Q\ninst✝⁸ : Module R S\ninst✝⁷ : DistribMulAction R' M\ninst✝⁶ : Module R'' M\ninst✝⁵ : SMulCommClass R R' M\ninst✝⁴ : SMulCommClass R R'' M\nR'₂ : Type u_9\ninst✝³ : Monoid R'₂\ninst✝² : DistribMulAction R'₂ M\ninst✝¹ : SMulCommClass R R'₂ M\ninst✝ : SMulCommClass R' R'₂ M\nr' : R'\nr'₂ : R'₂\nx : M ⊗[R] N\nm : M\nn : N\n⊢ r' • r'₂ • m ⊗ₜ[R] n = r'₂ • r' • m ⊗ₜ[R] n\n[PROOFSTEP]\nsimp_rw [smul_tmul', smul_comm]\n[GOAL]\nR : Type u_1\ninst✝²⁰ : CommSemiring R\nR' : Type u_2\ninst✝¹⁹ : Monoid R'\nR'' : Type u_3\ninst✝¹⁸ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : AddCommMonoid N\ninst✝¹⁵ : AddCommMonoid P\ninst✝¹⁴ : AddCommMonoid Q\ninst✝¹³ : AddCommMonoid S\ninst✝¹² : Module R M\ninst✝¹¹ : Module R N\ninst✝¹⁰ : Module R P\ninst✝⁹ : Module R Q\ninst✝⁸ : Module R S\ninst✝⁷ : DistribMulAction R' M\ninst✝⁶ : Module R'' M\ninst✝⁵ : SMulCommClass R R' M\ninst✝⁴ : SMulCommClass R R'' M\nR'₂ : Type u_9\ninst✝³ : Monoid R'₂\ninst✝² : DistribMulAction R'₂ M\ninst✝¹ : SMulCommClass R R'₂ M\ninst✝ : SMulCommClass R' R'₂ M\nr' : R'\nr'₂ : R'₂\nx✝ x y : M ⊗[R] N\nihx : r' • r'₂ • x = r'₂ • r' • x\nihy : r' • r'₂ • y = r'₂ • r' • y\n⊢ r' • r'₂ • (x + y) = r'₂ • r' • (x + y)\n[PROOFSTEP]\nsimp_rw [TensorProduct.smul_add]\n[GOAL]\nR : Type u_1\ninst✝²⁰ : CommSemiring R\nR' : Type u_2\ninst✝¹⁹ : Monoid R'\nR'' : Type u_3\ninst✝¹⁸ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : AddCommMonoid N\ninst✝¹⁵ : AddCommMonoid P\ninst✝¹⁴ : AddCommMonoid Q\ninst✝¹³ : AddCommMonoid S\ninst✝¹² : Module R M\ninst✝¹¹ : Module R N\ninst✝¹⁰ : Module R P\ninst✝⁹ : Module R Q\ninst✝⁸ : Module R S\ninst✝⁷ : DistribMulAction R' M\ninst✝⁶ : Module R'' M\ninst✝⁵ : SMulCommClass R R' M\ninst✝⁴ : SMulCommClass R R'' M\nR'₂ : Type u_9\ninst✝³ : Monoid R'₂\ninst✝² : DistribMulAction R'₂ M\ninst✝¹ : SMulCommClass R R'₂ M\ninst✝ : SMulCommClass R' R'₂ M\nr' : R'\nr'₂ : R'₂\nx✝ x y : M ⊗[R] N\nihx : r' • r'₂ • x = r'₂ • r' • x\nihy : r' • r'₂ • y = r'₂ • r' • y\n⊢ r' • r'₂ • x + r' • r'₂ • y = r'₂ • r' • x + r'₂ • r' • y\n[PROOFSTEP]\nrw [ihx, ihy]\n[GOAL]\nR : Type u_1\ninst✝²¹ : CommSemiring R\nR' : Type u_2\ninst✝²⁰ : Monoid R'\nR'' : Type u_3\ninst✝¹⁹ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁸ : AddCommMonoid M\ninst✝¹⁷ : AddCommMonoid N\ninst✝¹⁶ : AddCommMonoid P\ninst✝¹⁵ : AddCommMonoid Q\ninst✝¹⁴ : AddCommMonoid S\ninst✝¹³ : Module R M\ninst✝¹² : Module R N\ninst✝¹¹ : Module R P\ninst✝¹⁰ : Module R Q\ninst✝⁹ : Module R S\ninst✝⁸ : DistribMulAction R' M\ninst✝⁷ : Module R'' M\ninst✝⁶ : SMulCommClass R R' M\ninst✝⁵ : SMulCommClass R R'' M\nR'₂ : Type u_9\ninst✝⁴ : Monoid R'₂\ninst✝³ : DistribMulAction R'₂ M\ninst✝² : SMulCommClass R R'₂ M\ninst✝¹ : SMul R'₂ R'\ninst✝ : IsScalarTower R'₂ R' M\ns : R'₂\nr : R'\nx : M ⊗[R] N\n⊢ (s • r) • 0 = s • r • 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝²¹ : CommSemiring R\nR' : Type u_2\ninst✝²⁰ : Monoid R'\nR'' : Type u_3\ninst✝¹⁹ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁸ : AddCommMonoid M\ninst✝¹⁷ : AddCommMonoid N\ninst✝¹⁶ : AddCommMonoid P\ninst✝¹⁵ : AddCommMonoid Q\ninst✝¹⁴ : AddCommMonoid S\ninst✝¹³ : Module R M\ninst✝¹² : Module R N\ninst✝¹¹ : Module R P\ninst✝¹⁰ : Module R Q\ninst✝⁹ : Module R S\ninst✝⁸ : DistribMulAction R' M\ninst✝⁷ : Module R'' M\ninst✝⁶ : SMulCommClass R R' M\ninst✝⁵ : SMulCommClass R R'' M\nR'₂ : Type u_9\ninst✝⁴ : Monoid R'₂\ninst✝³ : DistribMulAction R'₂ M\ninst✝² : SMulCommClass R R'₂ M\ninst✝¹ : SMul R'₂ R'\ninst✝ : IsScalarTower R'₂ R' M\ns : R'₂\nr : R'\nx : M ⊗[R] N\nm : M\nn : N\n⊢ (s • r) • m ⊗ₜ[R] n = s • r • m ⊗ₜ[R] n\n[PROOFSTEP]\nrw [smul_tmul', smul_tmul', smul_tmul', smul_assoc]\n[GOAL]\nR : Type u_1\ninst✝²¹ : CommSemiring R\nR' : Type u_2\ninst✝²⁰ : Monoid R'\nR'' : Type u_3\ninst✝¹⁹ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁸ : AddCommMonoid M\ninst✝¹⁷ : AddCommMonoid N\ninst✝¹⁶ : AddCommMonoid P\ninst✝¹⁵ : AddCommMonoid Q\ninst✝¹⁴ : AddCommMonoid S\ninst✝¹³ : Module R M\ninst✝¹² : Module R N\ninst✝¹¹ : Module R P\ninst✝¹⁰ : Module R Q\ninst✝⁹ : Module R S\ninst✝⁸ : DistribMulAction R' M\ninst✝⁷ : Module R'' M\ninst✝⁶ : SMulCommClass R R' M\ninst✝⁵ : SMulCommClass R R'' M\nR'₂ : Type u_9\ninst✝⁴ : Monoid R'₂\ninst✝³ : DistribMulAction R'₂ M\ninst✝² : SMulCommClass R R'₂ M\ninst✝¹ : SMul R'₂ R'\ninst✝ : IsScalarTower R'₂ R' M\ns : R'₂\nr : R'\nx✝ x y : M ⊗[R] N\nihx : (s • r) • x = s • r • x\nihy : (s • r) • y = s • r • y\n⊢ (s • r) • (x + y) = s • r • (x + y)\n[PROOFSTEP]\nrw [smul_add, smul_add, smul_add, ihx, ihy]\n[GOAL]\nR : Type u_1\ninst✝²⁵ : CommSemiring R\nR' : Type u_2\ninst✝²⁴ : Monoid R'\nR'' : Type u_3\ninst✝²³ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝²² : AddCommMonoid M\ninst✝²¹ : AddCommMonoid N\ninst✝²⁰ : AddCommMonoid P\ninst✝¹⁹ : AddCommMonoid Q\ninst✝¹⁸ : AddCommMonoid S\ninst✝¹⁷ : Module R M\ninst✝¹⁶ : Module R N\ninst✝¹⁵ : Module R P\ninst✝¹⁴ : Module R Q\ninst✝¹³ : Module R S\ninst✝¹² : DistribMulAction R' M\ninst✝¹¹ : Module R'' M\ninst✝¹⁰ : SMulCommClass R R' M\ninst✝⁹ : SMulCommClass R R'' M\nR'₂ : Type u_9\ninst✝⁸ : Monoid R'₂\ninst✝⁷ : DistribMulAction R'₂ M\ninst✝⁶ : SMulCommClass R R'₂ M\ninst✝⁵ : SMul R'₂ R'\ninst✝⁴ : DistribMulAction R'₂ N\ninst✝³ : DistribMulAction R' N\ninst✝² : CompatibleSMul R R'₂ M N\ninst✝¹ : CompatibleSMul R R' M N\ninst✝ : IsScalarTower R'₂ R' N\ns : R'₂\nr : R'\nx : M ⊗[R] N\n⊢ (s • r) • 0 = s • r • 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝²⁵ : CommSemiring R\nR' : Type u_2\ninst✝²⁴ : Monoid R'\nR'' : Type u_3\ninst✝²³ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝²² : AddCommMonoid M\ninst✝²¹ : AddCommMonoid N\ninst✝²⁰ : AddCommMonoid P\ninst✝¹⁹ : AddCommMonoid Q\ninst✝¹⁸ : AddCommMonoid S\ninst✝¹⁷ : Module R M\ninst✝¹⁶ : Module R N\ninst✝¹⁵ : Module R P\ninst✝¹⁴ : Module R Q\ninst✝¹³ : Module R S\ninst✝¹² : DistribMulAction R' M\ninst✝¹¹ : Module R'' M\ninst✝¹⁰ : SMulCommClass R R' M\ninst✝⁹ : SMulCommClass R R'' M\nR'₂ : Type u_9\ninst✝⁸ : Monoid R'₂\ninst✝⁷ : DistribMulAction R'₂ M\ninst✝⁶ : SMulCommClass R R'₂ M\ninst✝⁵ : SMul R'₂ R'\ninst✝⁴ : DistribMulAction R'₂ N\ninst✝³ : DistribMulAction R' N\ninst✝² : CompatibleSMul R R'₂ M N\ninst✝¹ : CompatibleSMul R R' M N\ninst✝ : IsScalarTower R'₂ R' N\ns : R'₂\nr : R'\nx : M ⊗[R] N\nm : M\nn : N\n⊢ (s • r) • m ⊗ₜ[R] n = s • r • m ⊗ₜ[R] n\n[PROOFSTEP]\nrw [← tmul_smul, ← tmul_smul, ← tmul_smul, smul_assoc]\n[GOAL]\nR : Type u_1\ninst✝²⁵ : CommSemiring R\nR' : Type u_2\ninst✝²⁴ : Monoid R'\nR'' : Type u_3\ninst✝²³ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝²² : AddCommMonoid M\ninst✝²¹ : AddCommMonoid N\ninst✝²⁰ : AddCommMonoid P\ninst✝¹⁹ : AddCommMonoid Q\ninst✝¹⁸ : AddCommMonoid S\ninst✝¹⁷ : Module R M\ninst✝¹⁶ : Module R N\ninst✝¹⁵ : Module R P\ninst✝¹⁴ : Module R Q\ninst✝¹³ : Module R S\ninst✝¹² : DistribMulAction R' M\ninst✝¹¹ : Module R'' M\ninst✝¹⁰ : SMulCommClass R R' M\ninst✝⁹ : SMulCommClass R R'' M\nR'₂ : Type u_9\ninst✝⁸ : Monoid R'₂\ninst✝⁷ : DistribMulAction R'₂ M\ninst✝⁶ : SMulCommClass R R'₂ M\ninst✝⁵ : SMul R'₂ R'\ninst✝⁴ : DistribMulAction R'₂ N\ninst✝³ : DistribMulAction R' N\ninst✝² : CompatibleSMul R R'₂ M N\ninst✝¹ : CompatibleSMul R R' M N\ninst✝ : IsScalarTower R'₂ R' N\ns : R'₂\nr : R'\nx✝ x y : M ⊗[R] N\nihx : (s • r) • x = s • r • x\nihy : (s • r) • y = s • r • y\n⊢ (s • r) • (x + y) = s • r • (x + y)\n[PROOFSTEP]\nrw [smul_add, smul_add, smul_add, ihx, ihy]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nc : R\nm : M\nn : N\n⊢ (fun x x_1 => x ⊗ₜ[R] x_1) (c • m) n = c • (fun x x_1 => x ⊗ₜ[R] x_1) m n\n[PROOFSTEP]\nsimp_rw [smul_tmul, tmul_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁷ : CommSemiring R\nR' : Type u_2\ninst✝¹⁶ : Monoid R'\nR'' : Type u_3\ninst✝¹⁵ : Semiring R''\nM : Type u_4\nN : Type u_5\nP✝ : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : AddCommMonoid P✝\ninst✝¹¹ : AddCommMonoid Q\ninst✝¹⁰ : AddCommMonoid S\ninst✝⁹ : Module R M\ninst✝⁸ : Module R N\ninst✝⁷ : Module R P✝\ninst✝⁶ : Module R Q\ninst✝⁵ : Module R S\ninst✝⁴ : DistribMulAction R' M\ninst✝³ : Module R'' M\ninst✝² : SMulCommClass R R' M\ninst✝¹ : SMulCommClass R R'' M\nx₁ : M\nx₂ : N\nP : Prop\ninst✝ : Decidable P\n⊢ (if P then x₁ else 0) ⊗ₜ[R] x₂ = if P then x₁ ⊗ₜ[R] x₂ else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u_1\ninst✝¹⁷ : CommSemiring R\nR' : Type u_2\ninst✝¹⁶ : Monoid R'\nR'' : Type u_3\ninst✝¹⁵ : Semiring R''\nM : Type u_4\nN : Type u_5\nP✝ : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : AddCommMonoid P✝\ninst✝¹¹ : AddCommMonoid Q\ninst✝¹⁰ : AddCommMonoid S\ninst✝⁹ : Module R M\ninst✝⁸ : Module R N\ninst✝⁷ : Module R P✝\ninst✝⁶ : Module R Q\ninst✝⁵ : Module R S\ninst✝⁴ : DistribMulAction R' M\ninst✝³ : Module R'' M\ninst✝² : SMulCommClass R R' M\ninst✝¹ : SMulCommClass R R'' M\nx₁ : M\nx₂ : N\nP : Prop\ninst✝ : Decidable P\nh✝ : P\n⊢ x₁ ⊗ₜ[R] x₂ = x₁ ⊗ₜ[R] x₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\ninst✝¹⁷ : CommSemiring R\nR' : Type u_2\ninst✝¹⁶ : Monoid R'\nR'' : Type u_3\ninst✝¹⁵ : Semiring R''\nM : Type u_4\nN : Type u_5\nP✝ : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : AddCommMonoid P✝\ninst✝¹¹ : AddCommMonoid Q\ninst✝¹⁰ : AddCommMonoid S\ninst✝⁹ : Module R M\ninst✝⁸ : Module R N\ninst✝⁷ : Module R P✝\ninst✝⁶ : Module R Q\ninst✝⁵ : Module R S\ninst✝⁴ : DistribMulAction R' M\ninst✝³ : Module R'' M\ninst✝² : SMulCommClass R R' M\ninst✝¹ : SMulCommClass R R'' M\nx₁ : M\nx₂ : N\nP : Prop\ninst✝ : Decidable P\nh✝ : ¬P\n⊢ 0 ⊗ₜ[R] x₂ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹⁷ : CommSemiring R\nR' : Type u_2\ninst✝¹⁶ : Monoid R'\nR'' : Type u_3\ninst✝¹⁵ : Semiring R''\nM : Type u_4\nN : Type u_5\nP✝ : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : AddCommMonoid P✝\ninst✝¹¹ : AddCommMonoid Q\ninst✝¹⁰ : AddCommMonoid S\ninst✝⁹ : Module R M\ninst✝⁸ : Module R N\ninst✝⁷ : Module R P✝\ninst✝⁶ : Module R Q\ninst✝⁵ : Module R S\ninst✝⁴ : DistribMulAction R' M\ninst✝³ : Module R'' M\ninst✝² : SMulCommClass R R' M\ninst✝¹ : SMulCommClass R R'' M\nx₁ : M\nx₂ : N\nP : Prop\ninst✝ : Decidable P\n⊢ (x₁ ⊗ₜ[R] if P then x₂ else 0) = if P then x₁ ⊗ₜ[R] x₂ else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u_1\ninst✝¹⁷ : CommSemiring R\nR' : Type u_2\ninst✝¹⁶ : Monoid R'\nR'' : Type u_3\ninst✝¹⁵ : Semiring R''\nM : Type u_4\nN : Type u_5\nP✝ : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : AddCommMonoid P✝\ninst✝¹¹ : AddCommMonoid Q\ninst✝¹⁰ : AddCommMonoid S\ninst✝⁹ : Module R M\ninst✝⁸ : Module R N\ninst✝⁷ : Module R P✝\ninst✝⁶ : Module R Q\ninst✝⁵ : Module R S\ninst✝⁴ : DistribMulAction R' M\ninst✝³ : Module R'' M\ninst✝² : SMulCommClass R R' M\ninst✝¹ : SMulCommClass R R'' M\nx₁ : M\nx₂ : N\nP : Prop\ninst✝ : Decidable P\nh✝ : P\n⊢ x₁ ⊗ₜ[R] x₂ = x₁ ⊗ₜ[R] x₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\ninst✝¹⁷ : CommSemiring R\nR' : Type u_2\ninst✝¹⁶ : Monoid R'\nR'' : Type u_3\ninst✝¹⁵ : Semiring R''\nM : Type u_4\nN : Type u_5\nP✝ : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid N\ninst✝¹² : AddCommMonoid P✝\ninst✝¹¹ : AddCommMonoid Q\ninst✝¹⁰ : AddCommMonoid S\ninst✝⁹ : Module R M\ninst✝⁸ : Module R N\ninst✝⁷ : Module R P✝\ninst✝⁶ : Module R Q\ninst✝⁵ : Module R S\ninst✝⁴ : DistribMulAction R' M\ninst✝³ : Module R'' M\ninst✝² : SMulCommClass R R' M\ninst✝¹ : SMulCommClass R R'' M\nx₁ : M\nx₂ : N\nP : Prop\ninst✝ : Decidable P\nh✝ : ¬P\n⊢ x₁ ⊗ₜ[R] 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nα : Type u_9\ns : Finset α\nm : α → M\nn : N\n⊢ (∑ a in s, m a) ⊗ₜ[R] n = ∑ a in s, m a ⊗ₜ[R] n\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction with a s has ih h\n· simp\n· simp [Finset.sum_insert has, add_tmul, ih]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nα : Type u_9\ns : Finset α\nm : α → M\nn : N\n⊢ (∑ a in s, m a) ⊗ₜ[R] n = ∑ a in s, m a ⊗ₜ[R] n\n[PROOFSTEP]\ninduction' s using Finset.induction with a s has ih h\n[GOAL]\ncase empty\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nα : Type u_9\nm : α → M\nn : N\n⊢ (∑ a in ∅, m a) ⊗ₜ[R] n = ∑ a in ∅, m a ⊗ₜ[R] n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nα : Type u_9\nm : α → M\nn : N\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : (∑ a in s, m a) ⊗ₜ[R] n = ∑ a in s, m a ⊗ₜ[R] n\n⊢ (∑ a in insert a s, m a) ⊗ₜ[R] n = ∑ a in insert a s, m a ⊗ₜ[R] n\n[PROOFSTEP]\nsimp [Finset.sum_insert has, add_tmul, ih]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nm : M\nα : Type u_9\ns : Finset α\nn : α → N\n⊢ m ⊗ₜ[R] ∑ a in s, n a = ∑ a in s, m ⊗ₜ[R] n a\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction with a s has ih h\n· simp\n· simp [Finset.sum_insert has, tmul_add, ih]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nm : M\nα : Type u_9\ns : Finset α\nn : α → N\n⊢ m ⊗ₜ[R] ∑ a in s, n a = ∑ a in s, m ⊗ₜ[R] n a\n[PROOFSTEP]\ninduction' s using Finset.induction with a s has ih h\n[GOAL]\ncase empty\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nm : M\nα : Type u_9\nn : α → N\n⊢ m ⊗ₜ[R] ∑ a in ∅, n a = ∑ a in ∅, m ⊗ₜ[R] n a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nm : M\nα : Type u_9\nn : α → N\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : m ⊗ₜ[R] ∑ a in s, n a = ∑ a in s, m ⊗ₜ[R] n a\n⊢ m ⊗ₜ[R] ∑ a in insert a s, n a = ∑ a in insert a s, m ⊗ₜ[R] n a\n[PROOFSTEP]\nsimp [Finset.sum_insert has, tmul_add, ih]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\n⊢ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t} = ⊤\n[PROOFSTEP]\next t\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nt : M ⊗[R] N\n⊢ t ∈ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t} ↔ t ∈ ⊤\n[PROOFSTEP]\nsimp only [Submodule.mem_top, iff_true_iff]\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nt : M ⊗[R] N\n⊢ t ∈ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t}\n[PROOFSTEP]\nrefine t.induction_on ?_ ?_ ?_\n[GOAL]\ncase h.refine_1\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nt : M ⊗[R] N\n⊢ 0 ∈ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t}\n[PROOFSTEP]\nexact Submodule.zero_mem _\n[GOAL]\ncase h.refine_2\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nt : M ⊗[R] N\n⊢ ∀ (x : M) (y : N), x ⊗ₜ[R] y ∈ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t}\n[PROOFSTEP]\nintro m n\n[GOAL]\ncase h.refine_2\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nt : M ⊗[R] N\nm : M\nn : N\n⊢ m ⊗ₜ[R] n ∈ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t}\n[PROOFSTEP]\napply Submodule.subset_span\n[GOAL]\ncase h.refine_2.a\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nt : M ⊗[R] N\nm : M\nn : N\n⊢ m ⊗ₜ[R] n ∈ {t | ∃ m n, m ⊗ₜ[R] n = t}\n[PROOFSTEP]\nuse m, n\n[GOAL]\ncase h.refine_3\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nt : M ⊗[R] N\n⊢ ∀ (x y : M ⊗[R] N),\n    x ∈ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t} →\n      y ∈ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t} → x + y ∈ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t}\n[PROOFSTEP]\nintro t₁ t₂ ht₁ ht₂\n[GOAL]\ncase h.refine_3\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nt t₁ t₂ : M ⊗[R] N\nht₁ : t₁ ∈ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t}\nht₂ : t₂ ∈ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t}\n⊢ t₁ + t₂ ∈ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t}\n[PROOFSTEP]\nexact Submodule.add_mem _ ht₁ ht₂\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\n⊢ Submodule.map₂ (mk R M N) ⊤ ⊤ = ⊤\n[PROOFSTEP]\nrw [← top_le_iff, ← span_tmul_eq_top, Submodule.map₂_eq_span_image2]\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\n⊢ Submodule.span R {t | ∃ m n, m ⊗ₜ[R] n = t} ≤ Submodule.span R (Set.image2 (fun m n => ↑(↑(mk R M N) m) n) ↑⊤ ↑⊤)\n[PROOFSTEP]\nexact Submodule.span_mono fun _ ⟨m, n, h⟩ => ⟨m, n, trivial, trivial, h⟩\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nx : M ⊗[R] N\nh : ∀ (m₁ m₂ : M) (n₁ n₂ : N), ∃ m n, m₁ ⊗ₜ[R] n₁ + m₂ ⊗ₜ[R] n₂ = m ⊗ₜ[R] n\n⊢ ∃ m n, x = m ⊗ₜ[R] n\n[PROOFSTEP]\ninduction x using TensorProduct.induction_on with\n| zero =>\n  use 0, 0\n  rw [TensorProduct.zero_tmul]\n| tmul m n => use m, n\n| add x y h₁ h₂ =>\n  obtain ⟨m₁, n₁, rfl⟩ := h₁\n  obtain ⟨m₂, n₂, rfl⟩ := h₂\n  apply h\n[GOAL]\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nx : M ⊗[R] N\nh : ∀ (m₁ m₂ : M) (n₁ n₂ : N), ∃ m n, m₁ ⊗ₜ[R] n₁ + m₂ ⊗ₜ[R] n₂ = m ⊗ₜ[R] n\n⊢ ∃ m n, x = m ⊗ₜ[R] n\n[PROOFSTEP]\ninduction x using TensorProduct.induction_on with\n| zero =>\n  use 0, 0\n  rw [TensorProduct.zero_tmul]\n| tmul m n => use m, n\n| add x y h₁ h₂ =>\n  obtain ⟨m₁, n₁, rfl⟩ := h₁\n  obtain ⟨m₂, n₂, rfl⟩ := h₂\n  apply h\n[GOAL]\ncase zero\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nh : ∀ (m₁ m₂ : M) (n₁ n₂ : N), ∃ m n, m₁ ⊗ₜ[R] n₁ + m₂ ⊗ₜ[R] n₂ = m ⊗ₜ[R] n\n⊢ ∃ m n, 0 = m ⊗ₜ[R] n\n[PROOFSTEP]\n\n| zero =>\n  use 0, 0\n  rw [TensorProduct.zero_tmul]\n[GOAL]\ncase zero\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nh : ∀ (m₁ m₂ : M) (n₁ n₂ : N), ∃ m n, m₁ ⊗ₜ[R] n₁ + m₂ ⊗ₜ[R] n₂ = m ⊗ₜ[R] n\n⊢ ∃ m n, 0 = m ⊗ₜ[R] n\n[PROOFSTEP]\nuse 0, 0\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nh : ∀ (m₁ m₂ : M) (n₁ n₂ : N), ∃ m n, m₁ ⊗ₜ[R] n₁ + m₂ ⊗ₜ[R] n₂ = m ⊗ₜ[R] n\n⊢ 0 = 0 ⊗ₜ[R] 0\n[PROOFSTEP]\nrw [TensorProduct.zero_tmul]\n[GOAL]\ncase tmul\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nh : ∀ (m₁ m₂ : M) (n₁ n₂ : N), ∃ m n, m₁ ⊗ₜ[R] n₁ + m₂ ⊗ₜ[R] n₂ = m ⊗ₜ[R] n\nm : M\nn : N\n⊢ ∃ m_1 n_1, m ⊗ₜ[R] n = m_1 ⊗ₜ[R] n_1\n[PROOFSTEP]\n\n| tmul m n => use m, n\n[GOAL]\ncase tmul\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nh : ∀ (m₁ m₂ : M) (n₁ n₂ : N), ∃ m n, m₁ ⊗ₜ[R] n₁ + m₂ ⊗ₜ[R] n₂ = m ⊗ₜ[R] n\nm : M\nn : N\n⊢ ∃ m_1 n_1, m ⊗ₜ[R] n = m_1 ⊗ₜ[R] n_1\n[PROOFSTEP]\nuse m, n\n[GOAL]\ncase add\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nh : ∀ (m₁ m₂ : M) (n₁ n₂ : N), ∃ m n, m₁ ⊗ₜ[R] n₁ + m₂ ⊗ₜ[R] n₂ = m ⊗ₜ[R] n\nx y : M ⊗[R] N\nh₁ : ∃ m n, x = m ⊗ₜ[R] n\nh₂ : ∃ m n, y = m ⊗ₜ[R] n\n⊢ ∃ m n, x + y = m ⊗ₜ[R] n\n[PROOFSTEP]\n\n| add x y h₁ h₂ =>\n  obtain ⟨m₁, n₁, rfl⟩ := h₁\n  obtain ⟨m₂, n₂, rfl⟩ := h₂\n  apply h\n[GOAL]\ncase add\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nh : ∀ (m₁ m₂ : M) (n₁ n₂ : N), ∃ m n, m₁ ⊗ₜ[R] n₁ + m₂ ⊗ₜ[R] n₂ = m ⊗ₜ[R] n\nx y : M ⊗[R] N\nh₁ : ∃ m n, x = m ⊗ₜ[R] n\nh₂ : ∃ m n, y = m ⊗ₜ[R] n\n⊢ ∃ m n, x + y = m ⊗ₜ[R] n\n[PROOFSTEP]\nobtain ⟨m₁, n₁, rfl⟩ := h₁\n[GOAL]\ncase add.intro.intro\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nh : ∀ (m₁ m₂ : M) (n₁ n₂ : N), ∃ m n, m₁ ⊗ₜ[R] n₁ + m₂ ⊗ₜ[R] n₂ = m ⊗ₜ[R] n\ny : M ⊗[R] N\nh₂ : ∃ m n, y = m ⊗ₜ[R] n\nm₁ : M\nn₁ : N\n⊢ ∃ m n, m₁ ⊗ₜ[R] n₁ + y = m ⊗ₜ[R] n\n[PROOFSTEP]\nobtain ⟨m₂, n₂, rfl⟩ := h₂\n[GOAL]\ncase add.intro.intro.intro.intro\nR : Type u_1\ninst✝¹⁶ : CommSemiring R\nR' : Type u_2\ninst✝¹⁵ : Monoid R'\nR'' : Type u_3\ninst✝¹⁴ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid N\ninst✝¹¹ : AddCommMonoid P\ninst✝¹⁰ : AddCommMonoid Q\ninst✝⁹ : AddCommMonoid S\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : Module R Q\ninst✝⁴ : Module R S\ninst✝³ : DistribMulAction R' M\ninst✝² : Module R'' M\ninst✝¹ : SMulCommClass R R' M\ninst✝ : SMulCommClass R R'' M\nh : ∀ (m₁ m₂ : M) (n₁ n₂ : N), ∃ m n, m₁ ⊗ₜ[R] n₁ + m₂ ⊗ₜ[R] n₂ = m ⊗ₜ[R] n\nm₁ : M\nn₁ : N\nm₂ : M\nn₂ : N\n⊢ ∃ m n, m₁ ⊗ₜ[R] n₁ + m₂ ⊗ₜ[R] n₂ = m ⊗ₜ[R] n\n[PROOFSTEP]\napply h\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nn : N\n⊢ ↑(↑FreeAddMonoid.lift fun p => ↑(↑f p.fst) p.snd) (FreeAddMonoid.of (0, n)) =\n    ↑(↑FreeAddMonoid.lift fun p => ↑(↑f p.fst) p.snd) 0\n[PROOFSTEP]\nsimp_rw [map_zero, FreeAddMonoid.lift_eval_of, f.map_zero₂]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nm : M\n⊢ ↑(↑FreeAddMonoid.lift fun p => ↑(↑f p.fst) p.snd) (FreeAddMonoid.of (m, 0)) =\n    ↑(↑FreeAddMonoid.lift fun p => ↑(↑f p.fst) p.snd) 0\n[PROOFSTEP]\nsimp_rw [map_zero, FreeAddMonoid.lift_eval_of, (f m).map_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nm₁ m₂ : M\nn : N\n⊢ ↑(↑FreeAddMonoid.lift fun p => ↑(↑f p.fst) p.snd) (FreeAddMonoid.of (m₁, n) + FreeAddMonoid.of (m₂, n)) =\n    ↑(↑FreeAddMonoid.lift fun p => ↑(↑f p.fst) p.snd) (FreeAddMonoid.of (m₁ + m₂, n))\n[PROOFSTEP]\nsimp_rw [map_add, FreeAddMonoid.lift_eval_of, f.map_add₂]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nm : M\nn₁ n₂ : N\n⊢ ↑(↑FreeAddMonoid.lift fun p => ↑(↑f p.fst) p.snd) (FreeAddMonoid.of (m, n₁) + FreeAddMonoid.of (m, n₂)) =\n    ↑(↑FreeAddMonoid.lift fun p => ↑(↑f p.fst) p.snd) (FreeAddMonoid.of (m, n₁ + n₂))\n[PROOFSTEP]\nsimp_rw [map_add, FreeAddMonoid.lift_eval_of, (f m).map_add]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nr : R\nm : M\nn : N\n⊢ ↑(↑FreeAddMonoid.lift fun p => ↑(↑f p.fst) p.snd) (FreeAddMonoid.of (r • m, n)) =\n    ↑(↑FreeAddMonoid.lift fun p => ↑(↑f p.fst) p.snd) (FreeAddMonoid.of (m, r • n))\n[PROOFSTEP]\nsimp_rw [FreeAddMonoid.lift_eval_of, f.map_smul₂, (f m).map_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\nx✝ y✝ : FreeAddMonoid (M × N)\nhxy : Eqv R M N x✝ y✝\nx y : FreeAddMonoid (M × N)\n⊢ ↑(↑FreeAddMonoid.lift fun p => ↑(↑f p.fst) p.snd) (x + y) = ↑(↑FreeAddMonoid.lift fun p => ↑(↑f p.fst) p.snd) (y + x)\n[PROOFSTEP]\nsimp_rw [map_add, add_comm]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\nr : R\nx : M ⊗[R] N\np : M\nq : N\n⊢ ↑(liftAux f) (r • p ⊗ₜ[R] q) = r • ↑(liftAux f) (p ⊗ₜ[R] q)\n[PROOFSTEP]\nsimp_rw [← tmul_smul, liftAux_tmul, (f p).map_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\nr : R\nx p q : M ⊗[R] N\nih1 : ↑(liftAux f) (r • p) = r • ↑(liftAux f) p\nih2 : ↑(liftAux f) (r • q) = r • ↑(liftAux f) q\n⊢ ↑(liftAux f) (r • (p + q)) = r • ↑(liftAux f) (p + q)\n[PROOFSTEP]\nsimp_rw [smul_add, (liftAux f).map_add, ih1, ih2, smul_add]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\ng h : M ⊗[R] N →ₗ[R] P\nH : ∀ (x : M) (y : N), ↑g (x ⊗ₜ[R] y) = ↑h (x ⊗ₜ[R] y)\nz : M ⊗[R] N\n⊢ ↑g 0 = ↑h 0\n[PROOFSTEP]\nsimp_rw [LinearMap.map_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\ng h : M ⊗[R] N →ₗ[R] P\nH : ∀ (x : M) (y : N), ↑g (x ⊗ₜ[R] y) = ↑h (x ⊗ₜ[R] y)\nz x y : M ⊗[R] N\nihx : ↑g x = ↑h x\nihy : ↑g y = ↑h y\n⊢ ↑g (x + y) = ↑h (x + y)\n[PROOFSTEP]\nrw [g.map_add, h.map_add, ihx, ihy]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\ng : M ⊗[R] N →ₗ[R] P\nH : ∀ (x : M) (y : N), ↑g (x ⊗ₜ[R] y) = ↑(↑f x) y\nm : M\nn : N\n⊢ ↑g (m ⊗ₜ[R] n) = ↑(lift f) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [H, lift.tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\ng : P →ₗ[R] Q\nx✝¹ : M\nx✝ : N\n⊢ ↑(LinearMap.comp g (lift f)) (x✝¹ ⊗ₜ[R] x✝) = ↑(↑(LinearMap.compr₂ f g) x✝¹) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf✝ : M →ₗ[R] N →ₗ[R] P\nf : M ⊗[R] N →ₗ[R] P\n⊢ lift (LinearMap.compr₂ (mk R M N) f) = f\n[PROOFSTEP]\nrw [lift_compr₂ f, lift_mk, LinearMap.comp_id]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\ng h : M ⊗[R] N →ₗ[R] P\nH : LinearMap.compr₂ (mk R M N) g = LinearMap.compr₂ (mk R M N) h\n⊢ g = h\n[PROOFSTEP]\nrw [← lift_mk_compr₂ g, H, lift_mk_compr₂]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf✝ f : M →ₗ[R] N →ₗ[R] P\nm : M\nn : N\n⊢ ↑(↑(uncurry R M N P) f) (m ⊗ₜ[R] n) = ↑(↑f m) n\n[PROOFSTEP]\nrw [uncurry, LinearMap.flip_apply, lift.tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf✝ f : M →ₗ[R] N →ₗ[R] P\nm : M\nn : N\n⊢ ↑(↑(↑(LinearMap.comp LinearMap.lflip (LinearMap.flip LinearMap.id)) m) n) f = ↑(↑f m) n\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\ng h : (M ⊗[R] N) ⊗[R] P →ₗ[R] Q\nH : ∀ (x : M) (y : N) (z : P), ↑g ((x ⊗ₜ[R] y) ⊗ₜ[R] z) = ↑h ((x ⊗ₜ[R] y) ⊗ₜ[R] z)\n⊢ g = h\n[PROOFSTEP]\next x y z\n[GOAL]\ncase H.H.h.h.h\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\ng h : (M ⊗[R] N) ⊗[R] P →ₗ[R] Q\nH : ∀ (x : M) (y : N) (z : P), ↑g ((x ⊗ₜ[R] y) ⊗ₜ[R] z) = ↑h ((x ⊗ₜ[R] y) ⊗ₜ[R] z)\nx : M\ny : N\nz : P\n⊢ ↑(↑(↑(LinearMap.compr₂ (mk R M N) (LinearMap.compr₂ (mk R (M ⊗[R] N) P) g)) x) y) z =\n    ↑(↑(↑(LinearMap.compr₂ (mk R M N) (LinearMap.compr₂ (mk R (M ⊗[R] N) P) h)) x) y) z\n[PROOFSTEP]\nexact H x y z\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\ng h : ((M ⊗[R] N) ⊗[R] P) ⊗[R] Q →ₗ[R] S\nH : ∀ (w : M) (x : N) (y : P) (z : Q), ↑g (((w ⊗ₜ[R] x) ⊗ₜ[R] y) ⊗ₜ[R] z) = ↑h (((w ⊗ₜ[R] x) ⊗ₜ[R] y) ⊗ₜ[R] z)\n⊢ g = h\n[PROOFSTEP]\next w x y z\n[GOAL]\ncase H.H.H.h.h.h.h\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\ng h : ((M ⊗[R] N) ⊗[R] P) ⊗[R] Q →ₗ[R] S\nH : ∀ (w : M) (x : N) (y : P) (z : Q), ↑g (((w ⊗ₜ[R] x) ⊗ₜ[R] y) ⊗ₜ[R] z) = ↑h (((w ⊗ₜ[R] x) ⊗ₜ[R] y) ⊗ₜ[R] z)\nw : M\nx : N\ny : P\nz : Q\n⊢ ↑(↑(↑(↑(LinearMap.compr₂ (mk R M N)\n                      (LinearMap.compr₂ (mk R (M ⊗[R] N) P) (LinearMap.compr₂ (mk R ((M ⊗[R] N) ⊗[R] P) Q) g)))\n                  w)\n              x)\n          y)\n      z =\n    ↑(↑(↑(↑(LinearMap.compr₂ (mk R M N)\n                      (LinearMap.compr₂ (mk R (M ⊗[R] N) P) (LinearMap.compr₂ (mk R ((M ⊗[R] N) ⊗[R] P) Q) h)))\n                  w)\n              x)\n          y)\n      z\n[PROOFSTEP]\nexact H w x y z\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\nφ ψ : (M ⊗[R] N) ⊗[R] P ⊗[R] Q →ₗ[R] S\nH : ∀ (w : M) (x : N) (y : P) (z : Q), ↑φ ((w ⊗ₜ[R] x) ⊗ₜ[R] y ⊗ₜ[R] z) = ↑ψ ((w ⊗ₜ[R] x) ⊗ₜ[R] y ⊗ₜ[R] z)\n⊢ φ = ψ\n[PROOFSTEP]\next m n p q\n[GOAL]\ncase H.H.h.h.H.h.h\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] N →ₗ[R] P\nφ ψ : (M ⊗[R] N) ⊗[R] P ⊗[R] Q →ₗ[R] S\nH : ∀ (w : M) (x : N) (y : P) (z : Q), ↑φ ((w ⊗ₜ[R] x) ⊗ₜ[R] y ⊗ₜ[R] z) = ↑ψ ((w ⊗ₜ[R] x) ⊗ₜ[R] y ⊗ₜ[R] z)\nm : M\nn : N\np : P\nq : Q\n⊢ ↑(↑(LinearMap.compr₂ (mk R P Q)\n              (↑(↑(LinearMap.compr₂ (mk R M N) (LinearMap.compr₂ (mk R (M ⊗[R] N) (P ⊗[R] Q)) φ)) m) n))\n          p)\n      q =\n    ↑(↑(LinearMap.compr₂ (mk R P Q)\n              (↑(↑(LinearMap.compr₂ (mk R M N) (LinearMap.compr₂ (mk R (M ⊗[R] N) (P ⊗[R] Q)) ψ)) m) n))\n          p)\n      q\n[PROOFSTEP]\nexact H m n p q\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nx✝ : M\n⊢ ↑(LinearMap.comp (lift (LinearMap.lsmul R M)) (↑(mk R R M) 1)) x✝ = ↑LinearMap.id x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nr : R\nm : M\n⊢ ↑(LinearMap.comp (↑(mk R R M) 1) (lift (LinearMap.lsmul R M))) (r ⊗ₜ[R] m) = ↑LinearMap.id (r ⊗ₜ[R] m)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nr : R\nm : M\n⊢ r • 1 ⊗ₜ[R] m = r ⊗ₜ[R] m\n[PROOFSTEP]\nrw [← tmul_smul, ← smul_tmul, smul_eq_mul, mul_one]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\n⊢ (M ⊗[R] N) ⊗[R] P ≃ₗ[R] M ⊗[R] N ⊗[R] P\n[PROOFSTEP]\nrefine\n  LinearEquiv.ofLinear (lift <| lift <| comp (lcurry R _ _ _) <| mk _ _ _)\n    (lift <| comp (uncurry R _ _ _) <| curry <| mk _ _ _) (ext <| LinearMap.ext fun m => ext' fun n p => ?_)\n    (ext <| flip_inj <| LinearMap.ext fun p => ext' fun m n => ?_)\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(compr₂ (mk R M (N ⊗[R] P))\n              (comp (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n                (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))))\n          m)\n      (n ⊗ₜ[R] p) =\n    ↑(↑(compr₂ (mk R M (N ⊗[R] P)) LinearMap.id) m) (n ⊗ₜ[R] p)\n[PROOFSTEP]\nrepeat'\n  first\n  | rw [lift.tmul]\n  | rw [compr₂_apply]\n  | rw [comp_apply]\n  | rw [mk_apply]\n  | rw [flip_apply]\n  | rw [lcurry_apply]\n  | rw [uncurry_apply]\n  | rw [curry_apply]\n  | rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(compr₂ (mk R M (N ⊗[R] P))\n              (comp (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n                (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))))\n          m)\n      (n ⊗ₜ[R] p) =\n    ↑(↑(compr₂ (mk R M (N ⊗[R] P)) LinearMap.id) m) (n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(compr₂ (mk R M (N ⊗[R] P))\n              (comp (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n                (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))))\n          m)\n      (n ⊗ₜ[R] p) =\n    ↑(↑(compr₂ (mk R M (N ⊗[R] P)) LinearMap.id) m) (n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(compr₂ (mk R M (N ⊗[R] P))\n              (comp (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n                (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))))\n          m)\n      (n ⊗ₜ[R] p) =\n    ↑(↑(compr₂ (mk R M (N ⊗[R] P)) LinearMap.id) m) (n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(comp (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n          (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P)))))\n      (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p)) =\n    ↑(↑(compr₂ (mk R M (N ⊗[R] P)) LinearMap.id) m) (n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(comp (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n          (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P)))))\n      (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p)) =\n    ↑(↑(compr₂ (mk R M (N ⊗[R] P)) LinearMap.id) m) (n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(comp (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n          (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P)))))\n      (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p)) =\n    ↑(↑(compr₂ (mk R M (N ⊗[R] P)) LinearMap.id) m) (n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(comp (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n          (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P)))))\n      (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(comp (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n          (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P)))))\n      (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(comp (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n          (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P)))))\n      (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(comp (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n          (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P)))))\n      (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n        (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))) =\n    ↑LinearMap.id (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n        (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))) =\n    ↑LinearMap.id (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n        (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))) =\n    ↑LinearMap.id (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n        (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))) =\n    ↑LinearMap.id (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n        (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))) =\n    ↑LinearMap.id (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p))\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P)))) (m ⊗ₜ[R] n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P)))) (m ⊗ₜ[R] n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [flip_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lcurry_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [uncurry_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [flip_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lcurry_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [uncurry_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n      (↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [curry_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))) (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))) (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))) (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))) (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))) (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))) ((m ⊗ₜ[R] n) ⊗ₜ[R] p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))) ((m ⊗ₜ[R] n) ⊗ₜ[R] p) =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))) (m ⊗ₜ[R] n)) p =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))) (m ⊗ₜ[R] n)) p =\n    ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(↑(comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))) m) n) p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(↑(comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))) m) n) p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(↑(comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))) m) n) p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(↑(comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))) m) n) p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [flip_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lcurry_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p) = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p) = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p) = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p) = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ ↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p) = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ m ⊗ₜ[R] n ⊗ₜ[R] p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ m ⊗ₜ[R] n ⊗ₜ[R] p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ m ⊗ₜ[R] n ⊗ₜ[R] p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ m ⊗ₜ[R] n ⊗ₜ[R] p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ m ⊗ₜ[R] n ⊗ₜ[R] p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ m ⊗ₜ[R] n ⊗ₜ[R] p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [flip_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ m ⊗ₜ[R] n ⊗ₜ[R] p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lcurry_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ m ⊗ₜ[R] n ⊗ₜ[R] p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [uncurry_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ m ⊗ₜ[R] n ⊗ₜ[R] p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [curry_apply]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nm : M\nn : N\np : P\n⊢ m ⊗ₜ[R] n ⊗ₜ[R] p = ↑LinearMap.id (m ⊗ₜ[R] n ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(LinearMap.flip\n              (compr₂ (mk R (M ⊗[R] N) P)\n                (comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n                  (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))))))\n          p)\n      (m ⊗ₜ[R] n) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrepeat'\n  first\n  | rw [lift.tmul]\n  | rw [compr₂_apply]\n  | rw [comp_apply]\n  | rw [mk_apply]\n  | rw [flip_apply]\n  | rw [lcurry_apply]\n  | rw [uncurry_apply]\n  | rw [curry_apply]\n  | rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(LinearMap.flip\n              (compr₂ (mk R (M ⊗[R] N) P)\n                (comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n                  (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))))))\n          p)\n      (m ⊗ₜ[R] n) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(LinearMap.flip\n              (compr₂ (mk R (M ⊗[R] N) P)\n                (comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n                  (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))))))\n          p)\n      (m ⊗ₜ[R] n) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(LinearMap.flip\n              (compr₂ (mk R (M ⊗[R] N) P)\n                (comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n                  (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))))))\n          p)\n      (m ⊗ₜ[R] n) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(LinearMap.flip\n              (compr₂ (mk R (M ⊗[R] N) P)\n                (comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n                  (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))))))\n          p)\n      (m ⊗ₜ[R] n) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(LinearMap.flip\n              (compr₂ (mk R (M ⊗[R] N) P)\n                (comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n                  (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))))))\n          p)\n      (m ⊗ₜ[R] n) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(LinearMap.flip\n              (compr₂ (mk R (M ⊗[R] N) P)\n                (comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n                  (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))))))\n          p)\n      (m ⊗ₜ[R] n) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [flip_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(compr₂ (mk R (M ⊗[R] N) P)\n              (comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n                (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))))\n          (m ⊗ₜ[R] n))\n      p =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(compr₂ (mk R (M ⊗[R] N) P)\n              (comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n                (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))))\n          (m ⊗ₜ[R] n))\n      p =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(compr₂ (mk R (M ⊗[R] N) P)\n              (comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n                (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))))\n          (m ⊗ₜ[R] n))\n      p =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n          (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))))\n      (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n          (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))))\n      (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n          (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))))\n      (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(comp (lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n          (lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))))\n      (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n        (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p)) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n        (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p)) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n        (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p)) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n        (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p)) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))))\n        (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p)) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))) ((m ⊗ₜ[R] n) ⊗ₜ[R] p)) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(lift (lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))))) ((m ⊗ₜ[R] n) ⊗ₜ[R] p)) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))) (m ⊗ₜ[R] n)) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(lift (comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P)))) (m ⊗ₜ[R] n)) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))) m) n) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))) m) n) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))) m) n) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(comp (lcurry R N P (M ⊗[R] N ⊗[R] P)) (mk R M (N ⊗[R] P))) m) n) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑(↑(LinearMap.flip (compr₂ (mk R (M ⊗[R] N) P) LinearMap.id)) p) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nrw [flip_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑(↑(compr₂ (mk R (M ⊗[R] N) P) LinearMap.id) (m ⊗ₜ[R] n)) p\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑(↑(compr₂ (mk R (M ⊗[R] N) P) LinearMap.id) (m ⊗ₜ[R] n)) p\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑(↑(compr₂ (mk R (M ⊗[R] N) P) LinearMap.id) (m ⊗ₜ[R] n)) p\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑LinearMap.id (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑LinearMap.id (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑LinearMap.id (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑LinearMap.id (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑LinearMap.id (↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [flip_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(↑(lcurry R N P (M ⊗[R] N ⊗[R] P)) (↑(mk R M (N ⊗[R] P)) m)) n) p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lcurry_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))))\n      (↑(↑(mk R M (N ⊗[R] P)) m) (n ⊗ₜ[R] p)) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P)))) (m ⊗ₜ[R] n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(lift (comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P)))) (m ⊗ₜ[R] n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))) m) (n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))) m) (n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))) m) (n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(comp (uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (curry (mk R (M ⊗[R] N) P))) m) (n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [flip_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lcurry_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(uncurry R N P ((M ⊗[R] N) ⊗[R] P)) (↑(curry (mk R (M ⊗[R] N) P)) m)) (n ⊗ₜ[R] p) =\n    ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [uncurry_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [flip_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lcurry_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [uncurry_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(↑(curry (mk R (M ⊗[R] N) P)) m) n) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [curry_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ ↑(↑(mk R (M ⊗[R] N) P) (m ⊗ₜ[R] n)) p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ (m ⊗ₜ[R] n) ⊗ₜ[R] p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nfirst\n| rw [lift.tmul]\n| rw [compr₂_apply]\n| rw [comp_apply]\n| rw [mk_apply]\n| rw [flip_apply]\n| rw [lcurry_apply]\n| rw [uncurry_apply]\n| rw [curry_apply]\n| rw [id_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ (m ⊗ₜ[R] n) ⊗ₜ[R] p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lift.tmul]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ (m ⊗ₜ[R] n) ⊗ₜ[R] p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [compr₂_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ (m ⊗ₜ[R] n) ⊗ₜ[R] p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [comp_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ (m ⊗ₜ[R] n) ⊗ₜ[R] p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [mk_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ (m ⊗ₜ[R] n) ⊗ₜ[R] p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [flip_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ (m ⊗ₜ[R] n) ⊗ₜ[R] p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [lcurry_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ (m ⊗ₜ[R] n) ⊗ₜ[R] p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [uncurry_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ (m ⊗ₜ[R] n) ⊗ₜ[R] p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [curry_apply]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\np : P\nm : M\nn : N\n⊢ (m ⊗ₜ[R] n) ⊗ₜ[R] p = ↑LinearMap.id ((m ⊗ₜ[R] n) ⊗ₜ[R] p)\n[PROOFSTEP]\nrw [id_apply]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\n⊢ range (map f g) = Submodule.span R {t | ∃ m n, ↑f m ⊗ₜ[R] ↑g n = t}\n[PROOFSTEP]\nsimp only [← Submodule.map_top, ← span_tmul_eq_top, Submodule.map_span, Set.mem_image, Set.mem_setOf_eq]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\n⊢ Submodule.span R ((fun a => ↑(map f g) a) '' {t | ∃ m n, m ⊗ₜ[R] n = t}) =\n    Submodule.span R {t | ∃ m n, ↑f m ⊗ₜ[R] ↑g n = t}\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_s\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\n⊢ (fun a => ↑(map f g) a) '' {t | ∃ m n, m ⊗ₜ[R] n = t} = {t | ∃ m n, ↑f m ⊗ₜ[R] ↑g n = t}\n[PROOFSTEP]\next t\n[GOAL]\ncase e_s.h\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\nt : P ⊗[R] Q\n⊢ t ∈ (fun a => ↑(map f g) a) '' {t | ∃ m n, m ⊗ₜ[R] n = t} ↔ t ∈ {t | ∃ m n, ↑f m ⊗ₜ[R] ↑g n = t}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase e_s.h.mp\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\nt : P ⊗[R] Q\n⊢ t ∈ (fun a => ↑(map f g) a) '' {t | ∃ m n, m ⊗ₜ[R] n = t} → t ∈ {t | ∃ m n, ↑f m ⊗ₜ[R] ↑g n = t}\n[PROOFSTEP]\nrintro ⟨_, ⟨⟨m, n, rfl⟩, rfl⟩⟩\n[GOAL]\ncase e_s.h.mp.intro.intro.intro.intro\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\nm : M\nn : N\n⊢ (fun a => ↑(map f g) a) (m ⊗ₜ[R] n) ∈ {t | ∃ m n, ↑f m ⊗ₜ[R] ↑g n = t}\n[PROOFSTEP]\nuse m, n\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\nm : M\nn : N\n⊢ ↑f m ⊗ₜ[R] ↑g n = (fun a => ↑(map f g) a) (m ⊗ₜ[R] n)\n[PROOFSTEP]\nsimp only [map_tmul]\n[GOAL]\ncase e_s.h.mpr\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\nt : P ⊗[R] Q\n⊢ t ∈ {t | ∃ m n, ↑f m ⊗ₜ[R] ↑g n = t} → t ∈ (fun a => ↑(map f g) a) '' {t | ∃ m n, m ⊗ₜ[R] n = t}\n[PROOFSTEP]\nrintro ⟨m, n, rfl⟩\n[GOAL]\ncase e_s.h.mpr.intro.intro\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\nm : M\nn : N\n⊢ ↑f m ⊗ₜ[R] ↑g n ∈ (fun a => ↑(map f g) a) '' {t | ∃ m n, m ⊗ₜ[R] n = t}\n[PROOFSTEP]\nrefine ⟨_, ⟨⟨m, n, rfl⟩, ?_⟩⟩\n[GOAL]\ncase e_s.h.mpr.intro.intro\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\nm : M\nn : N\n⊢ (fun a => ↑(map f g) a) (m ⊗ₜ[R] n) = ↑f m ⊗ₜ[R] ↑g n\n[PROOFSTEP]\nsimp only [map_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\n⊢ map LinearMap.id LinearMap.id = LinearMap.id\n[PROOFSTEP]\next\n[GOAL]\ncase H.h.h\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\nx✝¹ : M\nx✝ : N\n⊢ ↑(↑(compr₂ (mk R M N) (map LinearMap.id LinearMap.id)) x✝¹) x✝ = ↑(↑(compr₂ (mk R M N) LinearMap.id) x✝¹) x✝\n[PROOFSTEP]\nsimp only [mk_apply, id_coe, compr₂_apply, id.def, map_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\nf : M →ₗ[R] M\ng : N →ₗ[R] N\nn : ℕ\n⊢ map f g ^ n = map (f ^ n) (g ^ n)\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\nf : M →ₗ[R] M\ng : N →ₗ[R] N\n⊢ map f g ^ Nat.zero = map (f ^ Nat.zero) (g ^ Nat.zero)\n[PROOFSTEP]\nsimp only [Nat.zero_eq, pow_zero, map_one]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\nf : M →ₗ[R] M\ng : N →ₗ[R] N\nn : ℕ\nih : map f g ^ n = map (f ^ n) (g ^ n)\n⊢ map f g ^ Nat.succ n = map (f ^ Nat.succ n) (g ^ Nat.succ n)\n[PROOFSTEP]\nsimp only [pow_succ', ih, map_mul]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\nf₁ f₂ : M →ₗ[R] P\ng : N →ₗ[R] Q\n⊢ map (f₁ + f₂) g = map f₁ g + map f₂ g\n[PROOFSTEP]\next\n[GOAL]\ncase H.h.h\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\nf₁ f₂ : M →ₗ[R] P\ng : N →ₗ[R] Q\nx✝¹ : M\nx✝ : N\n⊢ ↑(↑(compr₂ (mk R M N) (map (f₁ + f₂) g)) x✝¹) x✝ = ↑(↑(compr₂ (mk R M N) (map f₁ g + map f₂ g)) x✝¹) x✝\n[PROOFSTEP]\nsimp only [add_tmul, compr₂_apply, mk_apply, map_tmul, add_apply]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\nf : M →ₗ[R] P\ng₁ g₂ : N →ₗ[R] Q\n⊢ map f (g₁ + g₂) = map f g₁ + map f g₂\n[PROOFSTEP]\next\n[GOAL]\ncase H.h.h\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\nf : M →ₗ[R] P\ng₁ g₂ : N →ₗ[R] Q\nx✝¹ : M\nx✝ : N\n⊢ ↑(↑(compr₂ (mk R M N) (map f (g₁ + g₂))) x✝¹) x✝ = ↑(↑(compr₂ (mk R M N) (map f g₁ + map f g₂)) x✝¹) x✝\n[PROOFSTEP]\nsimp only [tmul_add, compr₂_apply, mk_apply, map_tmul, add_apply]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\nr : R\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\n⊢ map (r • f) g = r • map f g\n[PROOFSTEP]\next\n[GOAL]\ncase H.h.h\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\nr : R\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\nx✝¹ : M\nx✝ : N\n⊢ ↑(↑(compr₂ (mk R M N) (map (r • f) g)) x✝¹) x✝ = ↑(↑(compr₂ (mk R M N) (r • map f g)) x✝¹) x✝\n[PROOFSTEP]\nsimp only [smul_tmul, compr₂_apply, mk_apply, map_tmul, smul_apply, tmul_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\nr : R\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\n⊢ map f (r • g) = r • map f g\n[PROOFSTEP]\next\n[GOAL]\ncase H.h.h\nR : Type u_1\ninst✝¹⁸ : CommSemiring R\nR' : Type u_2\ninst✝¹⁷ : Monoid R'\nR'' : Type u_3\ninst✝¹⁶ : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid N\ninst✝¹³ : AddCommMonoid P\ninst✝¹² : AddCommMonoid Q\ninst✝¹¹ : AddCommMonoid S\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R N\ninst✝⁸ : Module R P\ninst✝⁷ : Module R Q\ninst✝⁶ : Module R S\ninst✝⁵ : DistribMulAction R' M\ninst✝⁴ : Module R'' M\nP' : Type u_9\nQ' : Type u_10\ninst✝³ : AddCommMonoid P'\ninst✝² : Module R P'\ninst✝¹ : AddCommMonoid Q'\ninst✝ : Module R Q'\nr : R\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\nx✝¹ : M\nx✝ : N\n⊢ ↑(↑(compr₂ (mk R M N) (map f (r • g))) x✝¹) x✝ = ↑(↑(compr₂ (mk R M N) (r • map f g)) x✝¹) x✝\n[PROOFSTEP]\nsimp only [smul_tmul, compr₂_apply, mk_apply, map_tmul, smul_apply, tmul_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M ≃ₗ[R] P\ng : N ≃ₗ[R] Q\nm : P\nn : Q\n⊢ ↑(comp (map ↑f ↑g) (map ↑(LinearEquiv.symm f) ↑(LinearEquiv.symm g))) (m ⊗ₜ[R] n) = ↑LinearMap.id (m ⊗ₜ[R] n)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nf : M ≃ₗ[R] P\ng : N ≃ₗ[R] Q\nm : M\nn : N\n⊢ ↑(comp (map ↑(LinearEquiv.symm f) ↑(LinearEquiv.symm g)) (map ↑f ↑g)) (m ⊗ₜ[R] n) = ↑LinearMap.id (m ⊗ₜ[R] n)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\n⊢ LinearEquiv.symm (tensorTensorTensorComm R M N P Q) = tensorTensorTensorComm R M P N Q\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\nx✝ : (M ⊗[R] P) ⊗[R] N ⊗[R] Q\n⊢ ↑(LinearEquiv.symm (tensorTensorTensorComm R M N P Q)) x✝ = ↑(tensorTensorTensorComm R M P N Q) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng✝ : P →ₗ[R] Q\nf✝ f g : N →ₗ[R] P\n⊢ lTensor M (f + g) = lTensor M f + lTensor M g\n[PROOFSTEP]\next x y\n[GOAL]\ncase H.h.h\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng✝ : P →ₗ[R] Q\nf✝ f g : N →ₗ[R] P\nx : M\ny : N\n⊢ ↑(↑(compr₂ (TensorProduct.mk R M N) (lTensor M (f + g))) x) y =\n    ↑(↑(compr₂ (TensorProduct.mk R M N) (lTensor M f + lTensor M g)) x) y\n[PROOFSTEP]\nsimp only [compr₂_apply, mk_apply, add_apply, lTensor_tmul, tmul_add]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nr : R\nf : N →ₗ[R] P\n⊢ AddHom.toFun\n      { toFun := lTensor M, map_add' := (_ : ∀ (f g : N →ₗ[R] P), lTensor M (f + g) = lTensor M f + lTensor M g) }\n      (r • f) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := lTensor M, map_add' := (_ : ∀ (f g : N →ₗ[R] P), lTensor M (f + g) = lTensor M f + lTensor M g) } f\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nr : R\nf : N →ₗ[R] P\n⊢ lTensor M (r • f) = r • lTensor M f\n[PROOFSTEP]\next x y\n[GOAL]\ncase H.h.h\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nr : R\nf : N →ₗ[R] P\nx : M\ny : N\n⊢ ↑(↑(compr₂ (TensorProduct.mk R M N) (lTensor M (r • f))) x) y =\n    ↑(↑(compr₂ (TensorProduct.mk R M N) (r • lTensor M f)) x) y\n[PROOFSTEP]\nsimp only [compr₂_apply, mk_apply, tmul_smul, smul_apply, lTensor_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng✝ : P →ₗ[R] Q\nf✝ f g : N →ₗ[R] P\n⊢ (fun f => rTensor M f) (f + g) = (fun f => rTensor M f) f + (fun f => rTensor M f) g\n[PROOFSTEP]\next x y\n[GOAL]\ncase H.h.h\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng✝ : P →ₗ[R] Q\nf✝ f g : N →ₗ[R] P\nx : N\ny : M\n⊢ ↑(↑(compr₂ (TensorProduct.mk R N M) ((fun f => rTensor M f) (f + g))) x) y =\n    ↑(↑(compr₂ (TensorProduct.mk R N M) ((fun f => rTensor M f) f + (fun f => rTensor M f) g)) x) y\n[PROOFSTEP]\nsimp only [compr₂_apply, mk_apply, add_apply, rTensor_tmul, add_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nr : R\nf : N →ₗ[R] P\n⊢ AddHom.toFun\n      { toFun := fun f => rTensor M f,\n        map_add' :=\n          (_ :\n            ∀ (f g : N →ₗ[R] P), (fun f => rTensor M f) (f + g) = (fun f => rTensor M f) f + (fun f => rTensor M f) g) }\n      (r • f) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun f => rTensor M f,\n          map_add' :=\n            (_ :\n              ∀ (f g : N →ₗ[R] P),\n                (fun f => rTensor M f) (f + g) = (fun f => rTensor M f) f + (fun f => rTensor M f) g) }\n        f\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nr : R\nf : N →ₗ[R] P\n⊢ rTensor M (r • f) = r • rTensor M f\n[PROOFSTEP]\next x y\n[GOAL]\ncase H.h.h\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nr : R\nf : N →ₗ[R] P\nx : N\ny : M\n⊢ ↑(↑(compr₂ (TensorProduct.mk R N M) (rTensor M (r • f))) x) y =\n    ↑(↑(compr₂ (TensorProduct.mk R N M) (r • rTensor M f)) x) y\n[PROOFSTEP]\nsimp only [compr₂_apply, mk_apply, smul_tmul, tmul_smul, smul_apply, rTensor_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf : N →ₗ[R] P\n⊢ lTensor M (comp g f) = comp (lTensor M g) (lTensor M f)\n[PROOFSTEP]\next m n\n[GOAL]\ncase H.h.h\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf : N →ₗ[R] P\nm : M\nn : N\n⊢ ↑(↑(compr₂ (TensorProduct.mk R M N) (lTensor M (comp g f))) m) n =\n    ↑(↑(compr₂ (TensorProduct.mk R M N) (comp (lTensor M g) (lTensor M f))) m) n\n[PROOFSTEP]\nsimp only [compr₂_apply, mk_apply, comp_apply, lTensor_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf : N →ₗ[R] P\nx : M ⊗[R] N\n⊢ ↑(lTensor M (comp g f)) x = ↑(lTensor M g) (↑(lTensor M f) x)\n[PROOFSTEP]\nrw [lTensor_comp, coe_comp]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf : N →ₗ[R] P\nx : M ⊗[R] N\n⊢ (↑(lTensor M g) ∘ ↑(lTensor M f)) x = ↑(lTensor M g) (↑(lTensor M f) x)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf : N →ₗ[R] P\n⊢ rTensor M (comp g f) = comp (rTensor M g) (rTensor M f)\n[PROOFSTEP]\next m n\n[GOAL]\ncase H.h.h\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf : N →ₗ[R] P\nm : N\nn : M\n⊢ ↑(↑(compr₂ (TensorProduct.mk R N M) (rTensor M (comp g f))) m) n =\n    ↑(↑(compr₂ (TensorProduct.mk R N M) (comp (rTensor M g) (rTensor M f))) m) n\n[PROOFSTEP]\nsimp only [compr₂_apply, mk_apply, comp_apply, rTensor_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf : N →ₗ[R] P\nx : N ⊗[R] M\n⊢ ↑(rTensor M (comp g f)) x = ↑(rTensor M g) (↑(rTensor M f) x)\n[PROOFSTEP]\nrw [rTensor_comp, coe_comp]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf : N →ₗ[R] P\nx : N ⊗[R] M\n⊢ (↑(rTensor M g) ∘ ↑(rTensor M f)) x = ↑(rTensor M g) (↑(rTensor M f) x)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf : N →ₗ[R] P\nx : M ⊗[R] N\n⊢ ↑(lTensor M id) x = x\n[PROOFSTEP]\nrw [lTensor_id, id_coe, id.def]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf : N →ₗ[R] P\nx : N ⊗[R] M\n⊢ ↑(rTensor M id) x = x\n[PROOFSTEP]\nrw [rTensor_id, id_coe, id.def]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng✝ : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\n⊢ comp (lTensor P g) (rTensor N f) = map f g\n[PROOFSTEP]\nsimp only [lTensor, rTensor, ← map_comp, id_comp, comp_id]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng✝ : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\n⊢ comp (rTensor Q f) (lTensor M g) = map f g\n[PROOFSTEP]\nsimp only [lTensor, rTensor, ← map_comp, id_comp, comp_id]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng✝ : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\nf' : S →ₗ[R] M\n⊢ comp (map f g) (rTensor N f') = map (comp f f') g\n[PROOFSTEP]\nsimp only [lTensor, rTensor, ← map_comp, id_comp, comp_id]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng✝ : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\ng' : S →ₗ[R] N\n⊢ comp (map f g) (lTensor M g') = map f (comp g g')\n[PROOFSTEP]\nsimp only [lTensor, rTensor, ← map_comp, id_comp, comp_id]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng✝ : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nf' : P →ₗ[R] S\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\n⊢ comp (rTensor Q f') (map f g) = map (comp f' f) g\n[PROOFSTEP]\nsimp only [lTensor, rTensor, ← map_comp, id_comp, comp_id]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng✝ : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\ng' : Q →ₗ[R] S\nf : M →ₗ[R] P\ng : N →ₗ[R] Q\n⊢ comp (lTensor P g') (map f g) = map f (comp g' g)\n[PROOFSTEP]\nsimp only [lTensor, rTensor, ← map_comp, id_comp, comp_id]\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nf : M →ₗ[R] M\nn : ℕ\n⊢ rTensor N f ^ n = rTensor N (f ^ n)\n[PROOFSTEP]\nhave h := TensorProduct.map_pow f (id : N →ₗ[R] N) n\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nf : M →ₗ[R] M\nn : ℕ\nh : map f id ^ n = map (f ^ n) (id ^ n)\n⊢ rTensor N f ^ n = rTensor N (f ^ n)\n[PROOFSTEP]\nrwa [id_pow] at h \n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nf : N →ₗ[R] N\nn : ℕ\n⊢ lTensor M f ^ n = lTensor M (f ^ n)\n[PROOFSTEP]\nhave h := TensorProduct.map_pow (id : M →ₗ[R] M) f n\n[GOAL]\nR : Type u_1\ninst✝¹⁴ : CommSemiring R\nR' : Type u_2\ninst✝¹³ : Monoid R'\nR'' : Type u_3\ninst✝¹² : Semiring R''\nM : Type u_4\nN : Type u_5\nP : Type u_6\nQ : Type u_7\nS : Type u_8\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid N\ninst✝⁹ : AddCommMonoid P\ninst✝⁸ : AddCommMonoid Q\ninst✝⁷ : AddCommMonoid S\ninst✝⁶ : Module R M\ninst✝⁵ : Module R N\ninst✝⁴ : Module R P\ninst✝³ : Module R Q\ninst✝² : Module R S\ninst✝¹ : DistribMulAction R' M\ninst✝ : Module R'' M\ng : P →ₗ[R] Q\nf✝ : N →ₗ[R] P\nf : N →ₗ[R] N\nn : ℕ\nh : map id f ^ n = map (id ^ n) (f ^ n)\n⊢ lTensor M f ^ n = lTensor M (f ^ n)\n[PROOFSTEP]\nrwa [id_pow] at h \n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nn : N\n⊢ ↑(Neg.aux R) (FreeAddMonoid.of (0, n)) = ↑(Neg.aux R) 0\n[PROOFSTEP]\nsimp_rw [map_zero, Neg.aux_of, neg_zero, zero_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nm : M\n⊢ ↑(Neg.aux R) (FreeAddMonoid.of (m, 0)) = ↑(Neg.aux R) 0\n[PROOFSTEP]\nsimp_rw [map_zero, Neg.aux_of, tmul_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nm₁ m₂ : M\nn : N\n⊢ ↑(Neg.aux R) (FreeAddMonoid.of (m₁, n) + FreeAddMonoid.of (m₂, n)) = ↑(Neg.aux R) (FreeAddMonoid.of (m₁ + m₂, n))\n[PROOFSTEP]\nsimp_rw [map_add, Neg.aux_of, neg_add, add_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\nm : M\nn₁ n₂ : N\n⊢ ↑(Neg.aux R) (FreeAddMonoid.of (m, n₁) + FreeAddMonoid.of (m, n₂)) = ↑(Neg.aux R) (FreeAddMonoid.of (m, n₁ + n₂))\n[PROOFSTEP]\nsimp_rw [map_add, Neg.aux_of, tmul_add]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx y : FreeAddMonoid (M × N)\nhxy : Eqv R M N x y\ns : R\nm : M\nn : N\n⊢ ↑(Neg.aux R) (FreeAddMonoid.of (s • m, n)) = ↑(Neg.aux R) (FreeAddMonoid.of (m, s • n))\n[PROOFSTEP]\nsimp_rw [Neg.aux_of, ← smul_neg, ← smul_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx✝ y✝ : FreeAddMonoid (M × N)\nhxy : Eqv R M N x✝ y✝\nx y : FreeAddMonoid (M × N)\n⊢ ↑(Neg.aux R) (x + y) = ↑(Neg.aux R) (y + x)\n[PROOFSTEP]\nsimp_rw [map_add, add_comm]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx : M ⊗[R] N\n⊢ -0 + 0 = 0\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx : M ⊗[R] N\n⊢ -0 = 0\n[PROOFSTEP]\napply (Neg.aux R).map_zero\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx✝ : M ⊗[R] N\nx : M\ny : N\n⊢ -x ⊗ₜ[R] y + x ⊗ₜ[R] y = 0\n[PROOFSTEP]\nconvert (add_tmul (R := R) (-x) x y).symm\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx✝ : M ⊗[R] N\nx : M\ny : N\n⊢ 0 = (-x + x) ⊗ₜ[R] y\n[PROOFSTEP]\nrw [add_left_neg, zero_tmul]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx✝ x y : M ⊗[R] N\nhx : -x + x = 0\nhy : -y + y = 0\n⊢ -(x + y) + (x + y) = 0\n[PROOFSTEP]\nsuffices : -x + x + (-y + y) = 0\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx✝ x y : M ⊗[R] N\nhx : -x + x = 0\nhy : -y + y = 0\nthis : -x + x + (-y + y) = 0\n⊢ -(x + y) + (x + y) = 0\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx✝ x y : M ⊗[R] N\nhx : -x + x = 0\nhy : -y + y = 0\nthis : -x + x + (-y + y) = 0\n⊢ -(x + y) + (x + y) = -x + x + (-y + y)\n[PROOFSTEP]\nunfold Neg.neg neg\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx✝ x y : M ⊗[R] N\nhx : -x + x = 0\nhy : -y + y = 0\nthis : -x + x + (-y + y) = 0\n⊢ { neg := ↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) }.1\n        (x + y) +\n      (x + y) =\n    { neg := ↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) }.1\n          x +\n        x +\n      ({\n              neg :=\n                ↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R)\n                    (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) }.1\n          y +\n        y)\n[PROOFSTEP]\nsimp only\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx✝ x y : M ⊗[R] N\nhx : -x + x = 0\nhy : -y + y = 0\nthis : -x + x + (-y + y) = 0\n⊢ ↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) (x + y) +\n      (x + y) =\n    ↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) x + x +\n      (↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) y + y)\n[PROOFSTEP]\nrw [AddMonoidHom.map_add]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx✝ x y : M ⊗[R] N\nhx : -x + x = 0\nhy : -y + y = 0\nthis : -x + x + (-y + y) = 0\n⊢ ↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) x +\n        ↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) y +\n      (x + y) =\n    ↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) x + x +\n      (↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) y + y)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx✝ x y : M ⊗[R] N\nhx : -x + x = 0\nhy : -y + y = 0\nthis : -x + x + (-y + y) = 0\n⊢ ↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) x +\n        ↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) y +\n      (x + y) =\n    ↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) x + x +\n      (↑(AddCon.lift (addConGen (Eqv R M N)) (Neg.aux R) (_ : addConGen (Eqv R M N) ≤ AddCon.ker (Neg.aux R))) y + y)\n[PROOFSTEP]\nabel\n[GOAL]\ncase this\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nx✝ x y : M ⊗[R] N\nhx : -x + x = 0\nhy : -y + y = 0\n⊢ -x + x + (-y + y) = 0\n[PROOFSTEP]\nrw [hx, hy, add_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nsrc✝ : AddCommMonoid (M ⊗[R] N) := addCommMonoid\n⊢ ∀ (a : M ⊗[R] N), (fun n v => n • v) 0 a = 0\n[PROOFSTEP]\nsimp [TensorProduct.zero_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nsrc✝ : AddCommMonoid (M ⊗[R] N) := addCommMonoid\n⊢ ∀ (n : ℕ) (a : M ⊗[R] N), (fun n v => n • v) (Int.ofNat (Nat.succ n)) a = a + (fun n v => n • v) (Int.ofNat n) a\n[PROOFSTEP]\nsimp [Nat.succ_eq_one_add, TensorProduct.one_smul, TensorProduct.add_smul]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nsrc✝ : AddCommMonoid (M ⊗[R] N) := addCommMonoid\nn : ℕ\nx : M ⊗[R] N\n⊢ (fun n v => n • v) (Int.negSucc n) x = -(fun n v => n • v) (↑(Nat.succ n)) x\n[PROOFSTEP]\nchange (-n.succ : ℤ) • x = -(((n : ℤ) + 1) • x)\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nsrc✝ : AddCommMonoid (M ⊗[R] N) := addCommMonoid\nn : ℕ\nx : M ⊗[R] N\n⊢ -↑(Nat.succ n) • x = -((↑n + 1) • x)\n[PROOFSTEP]\nrw [← zero_add (_ • x), ← TensorProduct.add_left_neg ((n.succ : ℤ) • x), add_assoc, ← add_smul, ← sub_eq_add_neg,\n  sub_self, zero_smul, add_zero]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nsrc✝ : AddCommMonoid (M ⊗[R] N) := addCommMonoid\nn : ℕ\nx : M ⊗[R] N\n⊢ -(↑(Nat.succ n) • x) = -((↑n + 1) • x)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nr : ℤ\nm : M\nn : N\n⊢ (0 • m) ⊗ₜ[R] n = m ⊗ₜ[R] (0 • n)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nr✝ : ℤ\nm : M\nn : N\nr : ℕ\nih : (↑r • m) ⊗ₜ[R] n = m ⊗ₜ[R] (↑r • n)\n⊢ ((↑r + 1) • m) ⊗ₜ[R] n = m ⊗ₜ[R] ((↑r + 1) • n)\n[PROOFSTEP]\nsimpa [add_smul, tmul_add, add_tmul] using ih\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nr✝ : ℤ\nm : M\nn : N\nr : ℕ\nih : (-↑r • m) ⊗ₜ[R] n = m ⊗ₜ[R] (-↑r • n)\n⊢ ((-↑r - 1) • m) ⊗ₜ[R] n = m ⊗ₜ[R] ((-↑r - 1) • n)\n[PROOFSTEP]\nsimpa [sub_smul, tmul_sub, sub_tmul] using ih\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nf g : N →ₗ[R] P\n⊢ lTensor M (f - g) = lTensor M f - lTensor M g\n[PROOFSTEP]\nsimp_rw [← coe_lTensorHom]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nf g : N →ₗ[R] P\n⊢ ↑(lTensorHom M) (f - g) = ↑(lTensorHom M) f - ↑(lTensorHom M) g\n[PROOFSTEP]\nexact (lTensorHom (R := R) (N := N) (P := P) M).map_sub f g\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nf g : N →ₗ[R] P\n⊢ rTensor M (f - g) = rTensor M f - rTensor M g\n[PROOFSTEP]\nsimp only [← coe_rTensorHom]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nf g : N →ₗ[R] P\n⊢ ↑(rTensorHom M) (f - g) = ↑(rTensorHom M) f - ↑(rTensorHom M) g\n[PROOFSTEP]\nexact (rTensorHom (R := R) (N := N) (P := P) M).map_sub f g\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nf : N →ₗ[R] P\n⊢ lTensor M (-f) = -lTensor M f\n[PROOFSTEP]\nsimp only [← coe_lTensorHom]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nf : N →ₗ[R] P\n⊢ ↑(lTensorHom M) (-f) = -↑(lTensorHom M) f\n[PROOFSTEP]\nexact (lTensorHom (R := R) (N := N) (P := P) M).map_neg f\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nf : N →ₗ[R] P\n⊢ rTensor M (-f) = -rTensor M f\n[PROOFSTEP]\nsimp only [← coe_rTensorHom]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nM : Type u_2\nN : Type u_3\nP : Type u_4\nQ : Type u_5\nS : Type u_6\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup Q\ninst✝⁵ : AddCommGroup S\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R Q\ninst✝ : Module R S\nf : N →ₗ[R] P\n⊢ ↑(rTensorHom M) (-f) = -↑(rTensorHom M) f\n[PROOFSTEP]\nexact (rTensorHom (R := R) (N := N) (P := P) M).map_neg f\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.TensorProduct", "llama_tokens": 141057, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7799929104825007, "lm_q2_score": 0.476579651063676, "lm_q1q2_score": 0.3717287491098913}}
{"text": "[GOAL]\nz : ZMod 4\n⊢ z * z ≠ 2\n[PROOFSTEP]\nchange Fin 4 at z \n[GOAL]\nz : Fin 4\n⊢ z * z ≠ 2\n[PROOFSTEP]\nfin_cases z\n[GOAL]\ncase head\n⊢ { val := 0, isLt := (_ : 0 < 4) } * { val := 0, isLt := (_ : 0 < 4) } ≠ 2\n[PROOFSTEP]\nnorm_num [Fin.ext_iff, Fin.val_bit0, Fin.val_bit1]\n[GOAL]\ncase tail.head\n⊢ { val := 1, isLt := (_ : (fun a => a < 4) 1) } * { val := 1, isLt := (_ : (fun a => a < 4) 1) } ≠ 2\n[PROOFSTEP]\nnorm_num [Fin.ext_iff, Fin.val_bit0, Fin.val_bit1]\n[GOAL]\ncase tail.tail.head\n⊢ { val := 2, isLt := (_ : (fun a => (fun a => a < 4) a) 2) } *\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 4) a) 2) } ≠\n    2\n[PROOFSTEP]\nnorm_num [Fin.ext_iff, Fin.val_bit0, Fin.val_bit1]\n[GOAL]\ncase tail.tail.tail.head\n⊢ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 4) a) a) 3) } *\n      { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 4) a) a) 3) } ≠\n    2\n[PROOFSTEP]\nnorm_num [Fin.ext_iff, Fin.val_bit0, Fin.val_bit1]\n[GOAL]\nz : ℤ\n⊢ z * z % 4 ≠ 2\n[PROOFSTEP]\nsuffices ¬z * z % (4 : ℕ) = 2 % (4 : ℕ) by exact this\n[GOAL]\nz : ℤ\nthis : ¬z * z % ↑4 = 2 % ↑4\n⊢ z * z % 4 ≠ 2\n[PROOFSTEP]\nexact this\n[GOAL]\nz : ℤ\n⊢ ¬z * z % ↑4 = 2 % ↑4\n[PROOFSTEP]\nrw [← ZMod.int_cast_eq_int_cast_iff']\n[GOAL]\nz : ℤ\n⊢ ¬↑(z * z) = ↑2\n[PROOFSTEP]\nsimpa using sq_ne_two_fin_zmod_four _\n[GOAL]\nx y z : ℤ\n⊢ PythagoreanTriple x y z ↔ PythagoreanTriple y x z\n[PROOFSTEP]\ndelta PythagoreanTriple\n[GOAL]\nx y z : ℤ\n⊢ x * x + y * y = z * z ↔ y * y + x * x = z * z\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\n⊢ PythagoreanTriple 0 0 0\n[PROOFSTEP]\nsimp only [PythagoreanTriple, zero_mul, zero_add]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\n⊢ PythagoreanTriple y x z\n[PROOFSTEP]\nrwa [pythagoreanTriple_comm]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nk : ℤ\n⊢ k * x * (k * x) + k * y * (k * y) = k ^ 2 * (x * x + y * y)\n[PROOFSTEP]\nring\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nk : ℤ\n⊢ k ^ 2 * (x * x + y * y) = k ^ 2 * (z * z)\n[PROOFSTEP]\nrw [h.eq]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nk : ℤ\n⊢ k ^ 2 * (z * z) = k * z * (k * z)\n[PROOFSTEP]\nring\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nk : ℤ\nhk : k ≠ 0\n⊢ PythagoreanTriple (k * x) (k * y) (k * z) ↔ PythagoreanTriple x y z\n[PROOFSTEP]\nrefine' ⟨_, fun h => h.mul k⟩\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nk : ℤ\nhk : k ≠ 0\n⊢ PythagoreanTriple (k * x) (k * y) (k * z) → PythagoreanTriple x y z\n[PROOFSTEP]\nsimp only [PythagoreanTriple]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nk : ℤ\nhk : k ≠ 0\n⊢ k * x * (k * x) + k * y * (k * y) = k * z * (k * z) → x * x + y * y = z * z\n[PROOFSTEP]\nintro h\n[GOAL]\nx y z : ℤ\nh✝ : PythagoreanTriple x y z\nk : ℤ\nhk : k ≠ 0\nh : k * x * (k * x) + k * y * (k * y) = k * z * (k * z)\n⊢ x * x + y * y = z * z\n[PROOFSTEP]\nrw [← mul_left_inj' (mul_ne_zero hk hk)]\n[GOAL]\nx y z : ℤ\nh✝ : PythagoreanTriple x y z\nk : ℤ\nhk : k ≠ 0\nh : k * x * (k * x) + k * y * (k * y) = k * z * (k * z)\n⊢ (x * x + y * y) * (k * k) = z * z * (k * k)\n[PROOFSTEP]\nconvert h using 1\n[GOAL]\ncase h.e'_2\nx y z : ℤ\nh✝ : PythagoreanTriple x y z\nk : ℤ\nhk : k ≠ 0\nh : k * x * (k * x) + k * y * (k * y) = k * z * (k * z)\n⊢ (x * x + y * y) * (k * k) = k * x * (k * x) + k * y * (k * y)\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_3\nx y z : ℤ\nh✝ : PythagoreanTriple x y z\nk : ℤ\nhk : k ≠ 0\nh : k * x * (k * x) + k * y * (k * y) = k * z * (k * z)\n⊢ z * z * (k * k) = k * z * (k * z)\n[PROOFSTEP]\nring\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nk : ℤ\nhc : IsClassified h\n⊢ IsClassified (_ : PythagoreanTriple (k * x) (k * y) (k * z))\n[PROOFSTEP]\nobtain ⟨l, m, n, ⟨⟨rfl, rfl⟩ | ⟨rfl, rfl⟩, co⟩⟩ := hc\n[GOAL]\ncase intro.intro.intro.intro.inl.intro\nz k l m n : ℤ\nco : Int.gcd m n = 1\nh : PythagoreanTriple (l * (m ^ 2 - n ^ 2)) (l * (2 * m * n)) z\n⊢ IsClassified (_ : PythagoreanTriple (k * (l * (m ^ 2 - n ^ 2))) (k * (l * (2 * m * n))) (k * z))\n[PROOFSTEP]\nuse k * l, m, n\n[GOAL]\ncase h\nz k l m n : ℤ\nco : Int.gcd m n = 1\nh : PythagoreanTriple (l * (m ^ 2 - n ^ 2)) (l * (2 * m * n)) z\n⊢ (k * (l * (m ^ 2 - n ^ 2)) = k * l * (m ^ 2 - n ^ 2) ∧ k * (l * (2 * m * n)) = k * l * (2 * m * n) ∨\n      k * (l * (m ^ 2 - n ^ 2)) = k * l * (2 * m * n) ∧ k * (l * (2 * m * n)) = k * l * (m ^ 2 - n ^ 2)) ∧\n    Int.gcd m n = 1\n[PROOFSTEP]\napply And.intro _ co\n[GOAL]\nz k l m n : ℤ\nco : Int.gcd m n = 1\nh : PythagoreanTriple (l * (m ^ 2 - n ^ 2)) (l * (2 * m * n)) z\n⊢ k * (l * (m ^ 2 - n ^ 2)) = k * l * (m ^ 2 - n ^ 2) ∧ k * (l * (2 * m * n)) = k * l * (2 * m * n) ∨\n    k * (l * (m ^ 2 - n ^ 2)) = k * l * (2 * m * n) ∧ k * (l * (2 * m * n)) = k * l * (m ^ 2 - n ^ 2)\n[PROOFSTEP]\nleft\n[GOAL]\ncase h\nz k l m n : ℤ\nco : Int.gcd m n = 1\nh : PythagoreanTriple (l * (m ^ 2 - n ^ 2)) (l * (2 * m * n)) z\n⊢ k * (l * (m ^ 2 - n ^ 2)) = k * l * (m ^ 2 - n ^ 2) ∧ k * (l * (2 * m * n)) = k * l * (2 * m * n)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nz k l m n : ℤ\nco : Int.gcd m n = 1\nh : PythagoreanTriple (l * (m ^ 2 - n ^ 2)) (l * (2 * m * n)) z\n⊢ k * (l * (m ^ 2 - n ^ 2)) = k * l * (m ^ 2 - n ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\ncase h.right\nz k l m n : ℤ\nco : Int.gcd m n = 1\nh : PythagoreanTriple (l * (m ^ 2 - n ^ 2)) (l * (2 * m * n)) z\n⊢ k * (l * (2 * m * n)) = k * l * (2 * m * n)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro.intro.inr.intro\nz k l m n : ℤ\nco : Int.gcd m n = 1\nh : PythagoreanTriple (l * (2 * m * n)) (l * (m ^ 2 - n ^ 2)) z\n⊢ IsClassified (_ : PythagoreanTriple (k * (l * (2 * m * n))) (k * (l * (m ^ 2 - n ^ 2))) (k * z))\n[PROOFSTEP]\nuse k * l, m, n\n[GOAL]\ncase h\nz k l m n : ℤ\nco : Int.gcd m n = 1\nh : PythagoreanTriple (l * (2 * m * n)) (l * (m ^ 2 - n ^ 2)) z\n⊢ (k * (l * (2 * m * n)) = k * l * (m ^ 2 - n ^ 2) ∧ k * (l * (m ^ 2 - n ^ 2)) = k * l * (2 * m * n) ∨\n      k * (l * (2 * m * n)) = k * l * (2 * m * n) ∧ k * (l * (m ^ 2 - n ^ 2)) = k * l * (m ^ 2 - n ^ 2)) ∧\n    Int.gcd m n = 1\n[PROOFSTEP]\napply And.intro _ co\n[GOAL]\nz k l m n : ℤ\nco : Int.gcd m n = 1\nh : PythagoreanTriple (l * (2 * m * n)) (l * (m ^ 2 - n ^ 2)) z\n⊢ k * (l * (2 * m * n)) = k * l * (m ^ 2 - n ^ 2) ∧ k * (l * (m ^ 2 - n ^ 2)) = k * l * (2 * m * n) ∨\n    k * (l * (2 * m * n)) = k * l * (2 * m * n) ∧ k * (l * (m ^ 2 - n ^ 2)) = k * l * (m ^ 2 - n ^ 2)\n[PROOFSTEP]\nright\n[GOAL]\ncase h\nz k l m n : ℤ\nco : Int.gcd m n = 1\nh : PythagoreanTriple (l * (2 * m * n)) (l * (m ^ 2 - n ^ 2)) z\n⊢ k * (l * (2 * m * n)) = k * l * (2 * m * n) ∧ k * (l * (m ^ 2 - n ^ 2)) = k * l * (m ^ 2 - n ^ 2)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nz k l m n : ℤ\nco : Int.gcd m n = 1\nh : PythagoreanTriple (l * (2 * m * n)) (l * (m ^ 2 - n ^ 2)) z\n⊢ k * (l * (2 * m * n)) = k * l * (2 * m * n)\n[PROOFSTEP]\nring\n[GOAL]\ncase h.right\nz k l m n : ℤ\nco : Int.gcd m n = 1\nh : PythagoreanTriple (l * (2 * m * n)) (l * (m ^ 2 - n ^ 2)) z\n⊢ k * (l * (m ^ 2 - n ^ 2)) = k * l * (m ^ 2 - n ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\n⊢ x % 2 = 0 ∧ y % 2 = 1 ∨ x % 2 = 1 ∧ y % 2 = 0\n[PROOFSTEP]\ncases' Int.emod_two_eq_zero_or_one x with hx hx\n[GOAL]\ncase inl\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 0\n⊢ x % 2 = 0 ∧ y % 2 = 1 ∨ x % 2 = 1 ∧ y % 2 = 0\n[PROOFSTEP]\ncases' Int.emod_two_eq_zero_or_one y with hy hy\n[GOAL]\ncase inr\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 1\n⊢ x % 2 = 0 ∧ y % 2 = 1 ∨ x % 2 = 1 ∧ y % 2 = 0\n[PROOFSTEP]\ncases' Int.emod_two_eq_zero_or_one y with hy hy\n[GOAL]\ncase inl.inl\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 0\nhy : y % 2 = 0\n⊢ x % 2 = 0 ∧ y % 2 = 1 ∨ x % 2 = 1 ∧ y % 2 = 0\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase inl.inl.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 0\nhy : y % 2 = 0\n⊢ False\n[PROOFSTEP]\napply Nat.not_coprime_of_dvd_of_dvd (by decide : 1 < 2) _ _ hc\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 0\nhy : y % 2 = 0\n⊢ 1 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 0\nhy : y % 2 = 0\n⊢ 2 ∣ Int.natAbs x\n[PROOFSTEP]\napply Int.coe_nat_dvd_left.1\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 0\nhy : y % 2 = 0\n⊢ ↑2 ∣ x\n[PROOFSTEP]\napply Int.dvd_of_emod_eq_zero hx\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 0\nhy : y % 2 = 0\n⊢ 2 ∣ Int.natAbs y\n[PROOFSTEP]\napply Int.coe_nat_dvd_left.1\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 0\nhy : y % 2 = 0\n⊢ ↑2 ∣ y\n[PROOFSTEP]\napply Int.dvd_of_emod_eq_zero hy\n[GOAL]\ncase inl.inr\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 0\nhy : y % 2 = 1\n⊢ x % 2 = 0 ∧ y % 2 = 1 ∨ x % 2 = 1 ∧ y % 2 = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase inl.inr.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 0\nhy : y % 2 = 1\n⊢ x % 2 = 0 ∧ y % 2 = 1\n[PROOFSTEP]\nexact\n  ⟨hx, hy⟩\n    -- x odd, y even\n[GOAL]\ncase inr.inl\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 1\nhy : y % 2 = 0\n⊢ x % 2 = 0 ∧ y % 2 = 1 ∨ x % 2 = 1 ∧ y % 2 = 0\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inl.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 1\nhy : y % 2 = 0\n⊢ x % 2 = 1 ∧ y % 2 = 0\n[PROOFSTEP]\nexact\n  ⟨hx, hy⟩\n    -- x odd, y odd\n[GOAL]\ncase inr.inr\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 1\nhy : y % 2 = 1\n⊢ x % 2 = 0 ∧ y % 2 = 1 ∨ x % 2 = 1 ∧ y % 2 = 0\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase inr.inr.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 1\nhy : y % 2 = 1\n⊢ False\n[PROOFSTEP]\nobtain ⟨x0, y0, rfl, rfl⟩ : ∃ x0 y0, x = x0 * 2 + 1 ∧ y = y0 * 2 + 1 :=\n  by\n  cases' exists_eq_mul_left_of_dvd (Int.dvd_sub_of_emod_eq hx) with x0 hx2\n  cases' exists_eq_mul_left_of_dvd (Int.dvd_sub_of_emod_eq hy) with y0 hy2\n  rw [sub_eq_iff_eq_add] at hx2 hy2 \n  exact ⟨x0, y0, hx2, hy2⟩\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 1\nhy : y % 2 = 1\n⊢ ∃ x0 y0, x = x0 * 2 + 1 ∧ y = y0 * 2 + 1\n[PROOFSTEP]\ncases' exists_eq_mul_left_of_dvd (Int.dvd_sub_of_emod_eq hx) with x0 hx2\n[GOAL]\ncase intro\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 1\nhy : y % 2 = 1\nx0 : ℤ\nhx2 : x - 1 = x0 * 2\n⊢ ∃ x0 y0, x = x0 * 2 + 1 ∧ y = y0 * 2 + 1\n[PROOFSTEP]\ncases' exists_eq_mul_left_of_dvd (Int.dvd_sub_of_emod_eq hy) with y0 hy2\n[GOAL]\ncase intro.intro\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 1\nhy : y % 2 = 1\nx0 : ℤ\nhx2 : x - 1 = x0 * 2\ny0 : ℤ\nhy2 : y - 1 = y0 * 2\n⊢ ∃ x0 y0, x = x0 * 2 + 1 ∧ y = y0 * 2 + 1\n[PROOFSTEP]\nrw [sub_eq_iff_eq_add] at hx2 hy2 \n[GOAL]\ncase intro.intro\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x % 2 = 1\nhy : y % 2 = 1\nx0 : ℤ\nhx2 : x = x0 * 2 + 1\ny0 : ℤ\nhy2 : y = y0 * 2 + 1\n⊢ ∃ x0 y0, x = x0 * 2 + 1 ∧ y = y0 * 2 + 1\n[PROOFSTEP]\nexact ⟨x0, y0, hx2, hy2⟩\n[GOAL]\ncase inr.inr.h.intro.intro.intro\nz x0 y0 : ℤ\nhx : (x0 * 2 + 1) % 2 = 1\nhy : (y0 * 2 + 1) % 2 = 1\nh : PythagoreanTriple (x0 * 2 + 1) (y0 * 2 + 1) z\nhc : Int.gcd (x0 * 2 + 1) (y0 * 2 + 1) = 1\n⊢ False\n[PROOFSTEP]\napply Int.sq_ne_two_mod_four z\n[GOAL]\ncase inr.inr.h.intro.intro.intro\nz x0 y0 : ℤ\nhx : (x0 * 2 + 1) % 2 = 1\nhy : (y0 * 2 + 1) % 2 = 1\nh : PythagoreanTriple (x0 * 2 + 1) (y0 * 2 + 1) z\nhc : Int.gcd (x0 * 2 + 1) (y0 * 2 + 1) = 1\n⊢ z * z % 4 = 2\n[PROOFSTEP]\nrw [show z * z = 4 * (x0 * x0 + x0 + y0 * y0 + y0) + 2 by\n    rw [← h.eq]\n    ring]\n[GOAL]\nz x0 y0 : ℤ\nhx : (x0 * 2 + 1) % 2 = 1\nhy : (y0 * 2 + 1) % 2 = 1\nh : PythagoreanTriple (x0 * 2 + 1) (y0 * 2 + 1) z\nhc : Int.gcd (x0 * 2 + 1) (y0 * 2 + 1) = 1\n⊢ z * z = 4 * (x0 * x0 + x0 + y0 * y0 + y0) + 2\n[PROOFSTEP]\nrw [← h.eq]\n[GOAL]\nz x0 y0 : ℤ\nhx : (x0 * 2 + 1) % 2 = 1\nhy : (y0 * 2 + 1) % 2 = 1\nh : PythagoreanTriple (x0 * 2 + 1) (y0 * 2 + 1) z\nhc : Int.gcd (x0 * 2 + 1) (y0 * 2 + 1) = 1\n⊢ (x0 * 2 + 1) * (x0 * 2 + 1) + (y0 * 2 + 1) * (y0 * 2 + 1) = 4 * (x0 * x0 + x0 + y0 * y0 + y0) + 2\n[PROOFSTEP]\nring\n[GOAL]\ncase inr.inr.h.intro.intro.intro\nz x0 y0 : ℤ\nhx : (x0 * 2 + 1) % 2 = 1\nhy : (y0 * 2 + 1) % 2 = 1\nh : PythagoreanTriple (x0 * 2 + 1) (y0 * 2 + 1) z\nhc : Int.gcd (x0 * 2 + 1) (y0 * 2 + 1) = 1\n⊢ (4 * (x0 * x0 + x0 + y0 * y0 + y0) + 2) % 4 = 2\n[PROOFSTEP]\nfield_simp [Int.add_emod]\n  -- Porting note: norm_num is not enough to close this\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\n⊢ ↑(Int.gcd x y) ∣ z\n[PROOFSTEP]\nby_cases h0 : Int.gcd x y = 0\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\n⊢ ↑(Int.gcd x y) ∣ z\n[PROOFSTEP]\nhave hx : x = 0 := by\n  apply Int.natAbs_eq_zero.mp\n  apply Nat.eq_zero_of_gcd_eq_zero_left h0\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\n⊢ x = 0\n[PROOFSTEP]\napply Int.natAbs_eq_zero.mp\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\n⊢ Int.natAbs x = 0\n[PROOFSTEP]\napply Nat.eq_zero_of_gcd_eq_zero_left h0\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\n⊢ ↑(Int.gcd x y) ∣ z\n[PROOFSTEP]\nhave hy : y = 0 := by\n  apply Int.natAbs_eq_zero.mp\n  apply Nat.eq_zero_of_gcd_eq_zero_right h0\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\n⊢ y = 0\n[PROOFSTEP]\napply Int.natAbs_eq_zero.mp\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\n⊢ Int.natAbs y = 0\n[PROOFSTEP]\napply Nat.eq_zero_of_gcd_eq_zero_right h0\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\nhy : y = 0\n⊢ ↑(Int.gcd x y) ∣ z\n[PROOFSTEP]\nhave hz : z = 0 := by simpa only [PythagoreanTriple, hx, hy, add_zero, zero_eq_mul, mul_zero, or_self_iff] using h\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\nhy : y = 0\n⊢ z = 0\n[PROOFSTEP]\nsimpa only [PythagoreanTriple, hx, hy, add_zero, zero_eq_mul, mul_zero, or_self_iff] using h\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\nhy : y = 0\nhz : z = 0\n⊢ ↑(Int.gcd x y) ∣ z\n[PROOFSTEP]\nsimp only [hz, dvd_zero]\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : ¬Int.gcd x y = 0\n⊢ ↑(Int.gcd x y) ∣ z\n[PROOFSTEP]\nobtain ⟨k, x0, y0, _, h2, rfl, rfl⟩ : ∃ (k : ℕ) (x0 y0 : _), 0 < k ∧ Int.gcd x0 y0 = 1 ∧ x = x0 * k ∧ y = y0 * k :=\n  Int.exists_gcd_one' (Nat.pos_of_ne_zero h0)\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro\nz : ℤ\nk : ℕ\nx0 y0 : ℤ\nleft✝ : 0 < k\nh2 : Int.gcd x0 y0 = 1\nh : PythagoreanTriple (x0 * ↑k) (y0 * ↑k) z\nh0 : ¬Int.gcd (x0 * ↑k) (y0 * ↑k) = 0\n⊢ ↑(Int.gcd (x0 * ↑k) (y0 * ↑k)) ∣ z\n[PROOFSTEP]\nrw [Int.gcd_mul_right, h2, Int.natAbs_ofNat, one_mul]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro\nz : ℤ\nk : ℕ\nx0 y0 : ℤ\nleft✝ : 0 < k\nh2 : Int.gcd x0 y0 = 1\nh : PythagoreanTriple (x0 * ↑k) (y0 * ↑k) z\nh0 : ¬Int.gcd (x0 * ↑k) (y0 * ↑k) = 0\n⊢ ↑k ∣ z\n[PROOFSTEP]\nrw [← Int.pow_dvd_pow_iff zero_lt_two, sq z, ← h.eq]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro\nz : ℤ\nk : ℕ\nx0 y0 : ℤ\nleft✝ : 0 < k\nh2 : Int.gcd x0 y0 = 1\nh : PythagoreanTriple (x0 * ↑k) (y0 * ↑k) z\nh0 : ¬Int.gcd (x0 * ↑k) (y0 * ↑k) = 0\n⊢ ↑k ^ 2 ∣ x0 * ↑k * (x0 * ↑k) + y0 * ↑k * (y0 * ↑k)\n[PROOFSTEP]\nrw [(by ring : x0 * k * (x0 * k) + y0 * k * (y0 * k) = (k : ℤ) ^ 2 * (x0 * x0 + y0 * y0))]\n[GOAL]\nz : ℤ\nk : ℕ\nx0 y0 : ℤ\nleft✝ : 0 < k\nh2 : Int.gcd x0 y0 = 1\nh : PythagoreanTriple (x0 * ↑k) (y0 * ↑k) z\nh0 : ¬Int.gcd (x0 * ↑k) (y0 * ↑k) = 0\n⊢ x0 * ↑k * (x0 * ↑k) + y0 * ↑k * (y0 * ↑k) = ↑k ^ 2 * (x0 * x0 + y0 * y0)\n[PROOFSTEP]\nring\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro\nz : ℤ\nk : ℕ\nx0 y0 : ℤ\nleft✝ : 0 < k\nh2 : Int.gcd x0 y0 = 1\nh : PythagoreanTriple (x0 * ↑k) (y0 * ↑k) z\nh0 : ¬Int.gcd (x0 * ↑k) (y0 * ↑k) = 0\n⊢ ↑k ^ 2 ∣ ↑k ^ 2 * (x0 * x0 + y0 * y0)\n[PROOFSTEP]\nexact dvd_mul_right _ _\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\n⊢ PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y))\n[PROOFSTEP]\nby_cases h0 : Int.gcd x y = 0\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\n⊢ PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y))\n[PROOFSTEP]\nhave hx : x = 0 := by\n  apply Int.natAbs_eq_zero.mp\n  apply Nat.eq_zero_of_gcd_eq_zero_left h0\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\n⊢ x = 0\n[PROOFSTEP]\napply Int.natAbs_eq_zero.mp\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\n⊢ Int.natAbs x = 0\n[PROOFSTEP]\napply Nat.eq_zero_of_gcd_eq_zero_left h0\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\n⊢ PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y))\n[PROOFSTEP]\nhave hy : y = 0 := by\n  apply Int.natAbs_eq_zero.mp\n  apply Nat.eq_zero_of_gcd_eq_zero_right h0\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\n⊢ y = 0\n[PROOFSTEP]\napply Int.natAbs_eq_zero.mp\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\n⊢ Int.natAbs y = 0\n[PROOFSTEP]\napply Nat.eq_zero_of_gcd_eq_zero_right h0\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\nhy : y = 0\n⊢ PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y))\n[PROOFSTEP]\nhave hz : z = 0 := by simpa only [PythagoreanTriple, hx, hy, add_zero, zero_eq_mul, mul_zero, or_self_iff] using h\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\nhy : y = 0\n⊢ z = 0\n[PROOFSTEP]\nsimpa only [PythagoreanTriple, hx, hy, add_zero, zero_eq_mul, mul_zero, or_self_iff] using h\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\nhy : y = 0\nhz : z = 0\n⊢ PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y))\n[PROOFSTEP]\nsimp only [hx, hy, hz, Int.zero_div]\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\nhy : y = 0\nhz : z = 0\n⊢ PythagoreanTriple (0 / ↑(Int.gcd 0 0)) (0 / ↑(Int.gcd 0 0)) (0 / ↑(Int.gcd 0 0))\n[PROOFSTEP]\nexact zero\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : ¬Int.gcd x y = 0\n⊢ PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y))\n[PROOFSTEP]\nrcases h.gcd_dvd with ⟨z0, rfl⟩\n[GOAL]\ncase neg.intro\nx y : ℤ\nh0 : ¬Int.gcd x y = 0\nz0 : ℤ\nh : PythagoreanTriple x y (↑(Int.gcd x y) * z0)\n⊢ PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (↑(Int.gcd x y) * z0 / ↑(Int.gcd x y))\n[PROOFSTEP]\nobtain ⟨k, x0, y0, k0, h2, rfl, rfl⟩ : ∃ (k : ℕ) (x0 y0 : _), 0 < k ∧ Int.gcd x0 y0 = 1 ∧ x = x0 * k ∧ y = y0 * k :=\n  Int.exists_gcd_one' (Nat.pos_of_ne_zero h0)\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro\nz0 : ℤ\nk : ℕ\nx0 y0 : ℤ\nk0 : 0 < k\nh2 : Int.gcd x0 y0 = 1\nh0 : ¬Int.gcd (x0 * ↑k) (y0 * ↑k) = 0\nh : PythagoreanTriple (x0 * ↑k) (y0 * ↑k) (↑(Int.gcd (x0 * ↑k) (y0 * ↑k)) * z0)\n⊢ PythagoreanTriple (x0 * ↑k / ↑(Int.gcd (x0 * ↑k) (y0 * ↑k))) (y0 * ↑k / ↑(Int.gcd (x0 * ↑k) (y0 * ↑k)))\n    (↑(Int.gcd (x0 * ↑k) (y0 * ↑k)) * z0 / ↑(Int.gcd (x0 * ↑k) (y0 * ↑k)))\n[PROOFSTEP]\nhave hk : (k : ℤ) ≠ 0 := by\n  norm_cast\n  rwa [pos_iff_ne_zero] at k0 \n[GOAL]\nz0 : ℤ\nk : ℕ\nx0 y0 : ℤ\nk0 : 0 < k\nh2 : Int.gcd x0 y0 = 1\nh0 : ¬Int.gcd (x0 * ↑k) (y0 * ↑k) = 0\nh : PythagoreanTriple (x0 * ↑k) (y0 * ↑k) (↑(Int.gcd (x0 * ↑k) (y0 * ↑k)) * z0)\n⊢ ↑k ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nz0 : ℤ\nk : ℕ\nx0 y0 : ℤ\nk0 : 0 < k\nh2 : Int.gcd x0 y0 = 1\nh0 : ¬Int.gcd (x0 * ↑k) (y0 * ↑k) = 0\nh : PythagoreanTriple (x0 * ↑k) (y0 * ↑k) (↑(Int.gcd (x0 * ↑k) (y0 * ↑k)) * z0)\n⊢ ¬k = 0\n[PROOFSTEP]\nrwa [pos_iff_ne_zero] at k0 \n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro\nz0 : ℤ\nk : ℕ\nx0 y0 : ℤ\nk0 : 0 < k\nh2 : Int.gcd x0 y0 = 1\nh0 : ¬Int.gcd (x0 * ↑k) (y0 * ↑k) = 0\nh : PythagoreanTriple (x0 * ↑k) (y0 * ↑k) (↑(Int.gcd (x0 * ↑k) (y0 * ↑k)) * z0)\nhk : ↑k ≠ 0\n⊢ PythagoreanTriple (x0 * ↑k / ↑(Int.gcd (x0 * ↑k) (y0 * ↑k))) (y0 * ↑k / ↑(Int.gcd (x0 * ↑k) (y0 * ↑k)))\n    (↑(Int.gcd (x0 * ↑k) (y0 * ↑k)) * z0 / ↑(Int.gcd (x0 * ↑k) (y0 * ↑k)))\n[PROOFSTEP]\nrw [Int.gcd_mul_right, h2, Int.natAbs_ofNat, one_mul] at h ⊢\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro\nz0 : ℤ\nk : ℕ\nx0 y0 : ℤ\nk0 : 0 < k\nh2 : Int.gcd x0 y0 = 1\nh0 : ¬Int.gcd (x0 * ↑k) (y0 * ↑k) = 0\nh : PythagoreanTriple (x0 * ↑k) (y0 * ↑k) (↑k * z0)\nhk : ↑k ≠ 0\n⊢ PythagoreanTriple (x0 * ↑k / ↑k) (y0 * ↑k / ↑k) (↑k * z0 / ↑k)\n[PROOFSTEP]\nrw [mul_comm x0, mul_comm y0, mul_iff k hk] at h \n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro\nz0 : ℤ\nk : ℕ\nx0 y0 : ℤ\nk0 : 0 < k\nh2 : Int.gcd x0 y0 = 1\nh0 : ¬Int.gcd (x0 * ↑k) (y0 * ↑k) = 0\nh : PythagoreanTriple x0 y0 z0\nhk : ↑k ≠ 0\n⊢ PythagoreanTriple (x0 * ↑k / ↑k) (y0 * ↑k / ↑k) (↑k * z0 / ↑k)\n[PROOFSTEP]\nrwa [Int.mul_ediv_cancel _ hk, Int.mul_ediv_cancel _ hk, Int.mul_ediv_cancel_left _ hk]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhp : IsPrimitiveClassified h\n⊢ IsClassified h\n[PROOFSTEP]\nobtain ⟨m, n, H⟩ := hp\n[GOAL]\ncase intro.intro\nx y z : ℤ\nh : PythagoreanTriple x y z\nm n : ℤ\nH :\n  (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n    Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n⊢ IsClassified h\n[PROOFSTEP]\nuse 1, m, n\n[GOAL]\ncase h\nx y z : ℤ\nh : PythagoreanTriple x y z\nm n : ℤ\nH :\n  (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n    Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n⊢ (x = 1 * (m ^ 2 - n ^ 2) ∧ y = 1 * (2 * m * n) ∨ x = 1 * (2 * m * n) ∧ y = 1 * (m ^ 2 - n ^ 2)) ∧ Int.gcd m n = 1\n[PROOFSTEP]\nrcases H with ⟨t, co, _⟩\n[GOAL]\ncase h.intro.intro\nx y z : ℤ\nh : PythagoreanTriple x y z\nm n : ℤ\nt : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\nco : Int.gcd m n = 1\nright✝ : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ (x = 1 * (m ^ 2 - n ^ 2) ∧ y = 1 * (2 * m * n) ∨ x = 1 * (2 * m * n) ∧ y = 1 * (m ^ 2 - n ^ 2)) ∧ Int.gcd m n = 1\n[PROOFSTEP]\nrw [one_mul, one_mul]\n[GOAL]\ncase h.intro.intro\nx y z : ℤ\nh : PythagoreanTriple x y z\nm n : ℤ\nt : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\nco : Int.gcd m n = 1\nright✝ : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧ Int.gcd m n = 1\n[PROOFSTEP]\nexact ⟨t, co⟩\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : IsPrimitiveClassified (_ : PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y)))\n⊢ IsClassified h\n[PROOFSTEP]\nconvert h.normalize.mul_isClassified (Int.gcd x y) (isClassified_of_isPrimitiveClassified h.normalize hc)\n[GOAL]\ncase h.e'_1\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : IsPrimitiveClassified (_ : PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y)))\n⊢ x = ↑(Int.gcd x y) * (x / ↑(Int.gcd x y))\n[PROOFSTEP]\nrw [Int.mul_ediv_cancel']\n[GOAL]\ncase h.e'_2\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : IsPrimitiveClassified (_ : PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y)))\n⊢ y = ↑(Int.gcd x y) * (y / ↑(Int.gcd x y))\n[PROOFSTEP]\nrw [Int.mul_ediv_cancel']\n[GOAL]\ncase h.e'_3\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : IsPrimitiveClassified (_ : PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y)))\n⊢ z = ↑(Int.gcd x y) * (z / ↑(Int.gcd x y))\n[PROOFSTEP]\nrw [Int.mul_ediv_cancel']\n[GOAL]\ncase h.e'_1\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : IsPrimitiveClassified (_ : PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y)))\n⊢ ↑(Int.gcd x y) ∣ x\n[PROOFSTEP]\nexact Int.gcd_dvd_left x y\n[GOAL]\ncase h.e'_2\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : IsPrimitiveClassified (_ : PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y)))\n⊢ ↑(Int.gcd x y) ∣ y\n[PROOFSTEP]\nexact Int.gcd_dvd_right x y\n[GOAL]\ncase h.e'_3\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : IsPrimitiveClassified (_ : PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y)))\n⊢ ↑(Int.gcd x y) ∣ z\n[PROOFSTEP]\nexact h.gcd_dvd\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\n⊢ z ≠ 0\n[PROOFSTEP]\nsuffices 0 < z * z by\n  rintro rfl\n  norm_num at this \n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nthis : 0 < z * z\n⊢ z ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nx y : ℤ\nhc : Int.gcd x y = 1\nh : PythagoreanTriple x y 0\nthis : 0 < 0 * 0\n⊢ False\n[PROOFSTEP]\nnorm_num at this \n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\n⊢ 0 < z * z\n[PROOFSTEP]\nrw [← h.eq, ← sq, ← sq]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\n⊢ 0 < x ^ 2 + y ^ 2\n[PROOFSTEP]\nhave hc' : Int.gcd x y ≠ 0 := by\n  rw [hc]\n  exact one_ne_zero\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\n⊢ Int.gcd x y ≠ 0\n[PROOFSTEP]\nrw [hc]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhc' : Int.gcd x y ≠ 0\n⊢ 0 < x ^ 2 + y ^ 2\n[PROOFSTEP]\ncases' Int.ne_zero_of_gcd hc' with hxz hyz\n[GOAL]\ncase inl\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhc' : Int.gcd x y ≠ 0\nhxz : x ≠ 0\n⊢ 0 < x ^ 2 + y ^ 2\n[PROOFSTEP]\napply lt_add_of_pos_of_le (sq_pos_of_ne_zero x hxz) (sq_nonneg y)\n[GOAL]\ncase inr\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhc' : Int.gcd x y ≠ 0\nhyz : y ≠ 0\n⊢ 0 < x ^ 2 + y ^ 2\n[PROOFSTEP]\napply lt_add_of_le_of_pos (sq_nonneg x) (sq_pos_of_ne_zero y hyz)\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhx : x = 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nsubst x\n[GOAL]\ny z : ℤ\nh : PythagoreanTriple 0 y z\nhc : Int.gcd 0 y = 1\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nchange Nat.gcd 0 (Int.natAbs y) = 1 at hc \n[GOAL]\ny z : ℤ\nh : PythagoreanTriple 0 y z\nhc : Nat.gcd 0 (Int.natAbs y) = 1\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nrw [Nat.gcd_zero_left (Int.natAbs y)] at hc \n[GOAL]\ny z : ℤ\nh : PythagoreanTriple 0 y z\nhc : Int.natAbs y = 1\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\ncases' Int.natAbs_eq y with hy hy\n[GOAL]\ncase inl\ny z : ℤ\nh : PythagoreanTriple 0 y z\nhc : Int.natAbs y = 1\nhy : y = ↑(Int.natAbs y)\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nuse 1, 0\n[GOAL]\ncase h\ny z : ℤ\nh : PythagoreanTriple 0 y z\nhc : Int.natAbs y = 1\nhy : y = ↑(Int.natAbs y)\n⊢ (0 = 1 ^ 2 - 0 ^ 2 ∧ y = 2 * 1 * 0 ∨ 0 = 2 * 1 * 0 ∧ y = 1 ^ 2 - 0 ^ 2) ∧\n    Int.gcd 1 0 = 1 ∧ (1 % 2 = 0 ∧ 0 % 2 = 1 ∨ 1 % 2 = 1 ∧ 0 % 2 = 0)\n[PROOFSTEP]\nrw [hy, hc, Int.gcd_zero_right]\n[GOAL]\ncase h\ny z : ℤ\nh : PythagoreanTriple 0 y z\nhc : Int.natAbs y = 1\nhy : y = ↑(Int.natAbs y)\n⊢ (0 = 1 ^ 2 - 0 ^ 2 ∧ ↑1 = 2 * 1 * 0 ∨ 0 = 2 * 1 * 0 ∧ ↑1 = 1 ^ 2 - 0 ^ 2) ∧\n    Int.natAbs 1 = 1 ∧ (1 % 2 = 0 ∧ 0 % 2 = 1 ∨ 1 % 2 = 1 ∧ 0 % 2 = 0)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase inr\ny z : ℤ\nh : PythagoreanTriple 0 y z\nhc : Int.natAbs y = 1\nhy : y = -↑(Int.natAbs y)\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nuse 0, 1\n[GOAL]\ncase h\ny z : ℤ\nh : PythagoreanTriple 0 y z\nhc : Int.natAbs y = 1\nhy : y = -↑(Int.natAbs y)\n⊢ (0 = 0 ^ 2 - 1 ^ 2 ∧ y = 2 * 0 * 1 ∨ 0 = 2 * 0 * 1 ∧ y = 0 ^ 2 - 1 ^ 2) ∧\n    Int.gcd 0 1 = 1 ∧ (0 % 2 = 0 ∧ 1 % 2 = 1 ∨ 0 % 2 = 1 ∧ 1 % 2 = 0)\n[PROOFSTEP]\nrw [hy, hc, Int.gcd_zero_left]\n[GOAL]\ncase h\ny z : ℤ\nh : PythagoreanTriple 0 y z\nhc : Int.natAbs y = 1\nhy : y = -↑(Int.natAbs y)\n⊢ (0 = 0 ^ 2 - 1 ^ 2 ∧ -↑1 = 2 * 0 * 1 ∨ 0 = 2 * 0 * 1 ∧ -↑1 = 0 ^ 2 - 1 ^ 2) ∧\n    Int.natAbs 1 = 1 ∧ (0 % 2 = 0 ∧ 1 % 2 = 1 ∨ 0 % 2 = 1 ∧ 1 % 2 = 0)\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\n⊢ Int.gcd y z = 1\n[PROOFSTEP]\nby_contra H\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nH : ¬Int.gcd y z = 1\n⊢ False\n[PROOFSTEP]\nobtain ⟨p, hp, hpy, hpz⟩ := Nat.Prime.not_coprime_iff_dvd.mp H\n[GOAL]\ncase intro.intro.intro\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nH : ¬Int.gcd y z = 1\np : ℕ\nhp : Nat.Prime p\nhpy : p ∣ Int.natAbs y\nhpz : p ∣ Int.natAbs z\n⊢ False\n[PROOFSTEP]\napply hp.not_dvd_one\n[GOAL]\ncase intro.intro.intro\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nH : ¬Int.gcd y z = 1\np : ℕ\nhp : Nat.Prime p\nhpy : p ∣ Int.natAbs y\nhpz : p ∣ Int.natAbs z\n⊢ p ∣ 1\n[PROOFSTEP]\nrw [← hc]\n[GOAL]\ncase intro.intro.intro\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nH : ¬Int.gcd y z = 1\np : ℕ\nhp : Nat.Prime p\nhpy : p ∣ Int.natAbs y\nhpz : p ∣ Int.natAbs z\n⊢ p ∣ Int.gcd x y\n[PROOFSTEP]\napply Nat.dvd_gcd (Int.Prime.dvd_natAbs_of_coe_dvd_sq hp _ _) hpy\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nH : ¬Int.gcd y z = 1\np : ℕ\nhp : Nat.Prime p\nhpy : p ∣ Int.natAbs y\nhpz : p ∣ Int.natAbs z\n⊢ ↑p ∣ x ^ 2\n[PROOFSTEP]\nrw [sq, eq_sub_of_add_eq h]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nH : ¬Int.gcd y z = 1\np : ℕ\nhp : Nat.Prime p\nhpy : p ∣ Int.natAbs y\nhpz : p ∣ Int.natAbs z\n⊢ ↑p ∣ z * z - y * y\n[PROOFSTEP]\nrw [← Int.coe_nat_dvd_left] at hpy hpz \n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nH : ¬Int.gcd y z = 1\np : ℕ\nhp : Nat.Prime p\nhpy : ↑p ∣ y\nhpz : ↑p ∣ z\n⊢ ↑p ∣ z * z - y * y\n[PROOFSTEP]\nexact dvd_sub (hpz.mul_right _) (hpy.mul_right _)\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx : K\n⊢ (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).fst ^ 2 + (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ^ 2 =\n    1\n[PROOFSTEP]\nfield_simp [hk x, div_pow]\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx : K\n⊢ (2 * x) ^ 2 + (1 - x ^ 2) ^ 2 = (1 + x ^ 2) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx : K\n⊢ (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ≠ -1\n[PROOFSTEP]\nsimp only [Ne.def, div_eq_iff (hk x), neg_mul, one_mul, neg_add, sub_eq_add_neg, add_left_inj]\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx : K\n⊢ ¬1 = -1\n[PROOFSTEP]\nsimpa only [eq_neg_iff_add_eq_zero, one_pow] using hk 1\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx : K\n⊢ (fun p => (↑p).fst / ((↑p).snd + 1))\n      ((fun x =>\n          { val := (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)),\n            property :=\n              (_ :\n                (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).fst ^ 2 +\n                      (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ^ 2 =\n                    1 ∧\n                  (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ≠ -1) })\n        x) =\n    x\n[PROOFSTEP]\nhave h2 : (1 + 1 : K) = 2 := by\n  norm_num\n    -- Porting note: rfl is not enough to close this\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx : K\n⊢ 1 + 1 = 2\n[PROOFSTEP]\nnorm_num\n  -- Porting note: rfl is not enough to close this\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx : K\nh2 : 1 + 1 = 2\n⊢ (fun p => (↑p).fst / ((↑p).snd + 1))\n      ((fun x =>\n          { val := (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)),\n            property :=\n              (_ :\n                (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).fst ^ 2 +\n                      (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ^ 2 =\n                    1 ∧\n                  (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ≠ -1) })\n        x) =\n    x\n[PROOFSTEP]\nhave h3 : (2 : K) ≠ 0 := by\n  convert hk 1\n  rw [one_pow 2, h2]\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx : K\nh2 : 1 + 1 = 2\n⊢ 2 ≠ 0\n[PROOFSTEP]\nconvert hk 1\n[GOAL]\ncase h.e'_2\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx : K\nh2 : 1 + 1 = 2\n⊢ 2 = 1 + 1 ^ 2\n[PROOFSTEP]\nrw [one_pow 2, h2]\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx : K\nh2 : 1 + 1 = 2\nh3 : 2 ≠ 0\n⊢ (fun p => (↑p).fst / ((↑p).snd + 1))\n      ((fun x =>\n          { val := (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)),\n            property :=\n              (_ :\n                (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).fst ^ 2 +\n                      (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ^ 2 =\n                    1 ∧\n                  (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ≠ -1) })\n        x) =\n    x\n[PROOFSTEP]\nfield_simp [hk x, h2, add_assoc, add_comm, add_sub_cancel'_right, mul_comm]\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhxy : (x, y).fst ^ 2 + (x, y).snd ^ 2 = 1\nhy : (x, y).snd ≠ -1\n⊢ (fun x =>\n        { val := (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)),\n          property :=\n            (_ :\n              (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).fst ^ 2 +\n                    (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ^ 2 =\n                  1 ∧\n                (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ≠ -1) })\n      ((fun p => (↑p).fst / ((↑p).snd + 1))\n        { val := (x, y), property := (_ : (x, y).fst ^ 2 + (x, y).snd ^ 2 = 1 ∧ (x, y).snd ≠ -1) }) =\n    { val := (x, y), property := (_ : (x, y).fst ^ 2 + (x, y).snd ^ 2 = 1 ∧ (x, y).snd ≠ -1) }\n[PROOFSTEP]\nchange x ^ 2 + y ^ 2 = 1 at hxy \n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\n⊢ (fun x =>\n        { val := (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)),\n          property :=\n            (_ :\n              (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).fst ^ 2 +\n                    (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ^ 2 =\n                  1 ∧\n                (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ≠ -1) })\n      ((fun p => (↑p).fst / ((↑p).snd + 1))\n        { val := (x, y), property := (_ : (x, y).fst ^ 2 + (x, y).snd ^ 2 = 1 ∧ (x, y).snd ≠ -1) }) =\n    { val := (x, y), property := (_ : (x, y).fst ^ 2 + (x, y).snd ^ 2 = 1 ∧ (x, y).snd ≠ -1) }\n[PROOFSTEP]\nhave h2 : y + 1 ≠ 0 := mt eq_neg_of_add_eq_zero_left hy\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\n⊢ (fun x =>\n        { val := (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)),\n          property :=\n            (_ :\n              (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).fst ^ 2 +\n                    (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ^ 2 =\n                  1 ∧\n                (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ≠ -1) })\n      ((fun p => (↑p).fst / ((↑p).snd + 1))\n        { val := (x, y), property := (_ : (x, y).fst ^ 2 + (x, y).snd ^ 2 = 1 ∧ (x, y).snd ≠ -1) }) =\n    { val := (x, y), property := (_ : (x, y).fst ^ 2 + (x, y).snd ^ 2 = 1 ∧ (x, y).snd ≠ -1) }\n[PROOFSTEP]\nhave h3 : (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1) :=\n  by\n  rw [(add_neg_eq_iff_eq_add.mpr hxy.symm).symm]\n  ring\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\n⊢ (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1)\n[PROOFSTEP]\nrw [(add_neg_eq_iff_eq_add.mpr hxy.symm).symm]\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\n⊢ (y + 1) ^ 2 + (1 + -y ^ 2) = 2 * (y + 1)\n[PROOFSTEP]\nring\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\nh3 : (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1)\n⊢ (fun x =>\n        { val := (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)),\n          property :=\n            (_ :\n              (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).fst ^ 2 +\n                    (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ^ 2 =\n                  1 ∧\n                (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ≠ -1) })\n      ((fun p => (↑p).fst / ((↑p).snd + 1))\n        { val := (x, y), property := (_ : (x, y).fst ^ 2 + (x, y).snd ^ 2 = 1 ∧ (x, y).snd ≠ -1) }) =\n    { val := (x, y), property := (_ : (x, y).fst ^ 2 + (x, y).snd ^ 2 = 1 ∧ (x, y).snd ≠ -1) }\n[PROOFSTEP]\nhave h4 : (2 : K) ≠ 0 := by\n  convert hk 1\n  rw [one_pow 2]\n  ring\n    -- Porting note: rfl is not enough to close this\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\nh3 : (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1)\n⊢ 2 ≠ 0\n[PROOFSTEP]\nconvert hk 1\n[GOAL]\ncase h.e'_2\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\nh3 : (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1)\n⊢ 2 = 1 + 1 ^ 2\n[PROOFSTEP]\nrw [one_pow 2]\n[GOAL]\ncase h.e'_2\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\nh3 : (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1)\n⊢ 2 = 1 + 1\n[PROOFSTEP]\nring\n  -- Porting note: rfl is not enough to close this\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\nh3 : (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1)\nh4 : 2 ≠ 0\n⊢ (fun x =>\n        { val := (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)),\n          property :=\n            (_ :\n              (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).fst ^ 2 +\n                    (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ^ 2 =\n                  1 ∧\n                (2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)).snd ≠ -1) })\n      ((fun p => (↑p).fst / ((↑p).snd + 1))\n        { val := (x, y), property := (_ : (x, y).fst ^ 2 + (x, y).snd ^ 2 = 1 ∧ (x, y).snd ≠ -1) }) =\n    { val := (x, y), property := (_ : (x, y).fst ^ 2 + (x, y).snd ^ 2 = 1 ∧ (x, y).snd ≠ -1) }\n[PROOFSTEP]\nsimp only [Prod.mk.inj_iff, Subtype.mk_eq_mk]\n[GOAL]\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\nh3 : (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1)\nh4 : 2 ≠ 0\n⊢ 2 * (x / (y + 1)) / (1 + (x / (y + 1)) ^ 2) = x ∧ (1 - (x / (y + 1)) ^ 2) / (1 + (x / (y + 1)) ^ 2) = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\nh3 : (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1)\nh4 : 2 ≠ 0\n⊢ 2 * (x / (y + 1)) / (1 + (x / (y + 1)) ^ 2) = x\n[PROOFSTEP]\nfield_simp [h3]\n[GOAL]\ncase left\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\nh3 : (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1)\nh4 : 2 ≠ 0\n⊢ 2 * x * (y + 1) ^ 2 = x * ((y + 1) * (2 * (y + 1)))\n[PROOFSTEP]\nring\n[GOAL]\ncase right\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\nh3 : (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1)\nh4 : 2 ≠ 0\n⊢ (1 - (x / (y + 1)) ^ 2) / (1 + (x / (y + 1)) ^ 2) = y\n[PROOFSTEP]\nfield_simp [h3]\n[GOAL]\ncase right\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\nh3 : (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1)\nh4 : 2 ≠ 0\n⊢ (y + 1) ^ 2 - x ^ 2 = y * (2 * (y + 1))\n[PROOFSTEP]\nrw [← add_neg_eq_iff_eq_add.mpr hxy.symm]\n[GOAL]\ncase right\nK : Type u_1\ninst✝ : Field K\nhk : ∀ (x : K), 1 + x ^ 2 ≠ 0\nx✝ : { p // p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1 }\nx y : K\nhy : (x, y).snd ≠ -1\nhxy : x ^ 2 + y ^ 2 = 1\nh2 : y + 1 ≠ 0\nh3 : (y + 1) ^ 2 + x ^ 2 = 2 * (y + 1)\nh4 : 2 ≠ 0\n⊢ (y + 1) ^ 2 - (1 + -y ^ 2) = y * (2 * (y + 1))\n[PROOFSTEP]\nring\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\n⊢ Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\n[PROOFSTEP]\nby_contra H\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\n⊢ False\n[PROOFSTEP]\nobtain ⟨p, hp, hp1, hp2⟩ := Nat.Prime.not_coprime_iff_dvd.mp H\n[GOAL]\ncase intro.intro.intro\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : p ∣ Int.natAbs (m ^ 2 - n ^ 2)\nhp2 : p ∣ Int.natAbs (m ^ 2 + n ^ 2)\n⊢ False\n[PROOFSTEP]\nrw [← Int.coe_nat_dvd_left] at hp1 hp2 \n[GOAL]\ncase intro.intro.intro\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\n⊢ False\n[PROOFSTEP]\nhave h2m : (p : ℤ) ∣ 2 * m ^ 2 := by\n  convert dvd_add hp2 hp1 using 1\n  ring\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\n⊢ ↑p ∣ 2 * m ^ 2\n[PROOFSTEP]\nconvert dvd_add hp2 hp1 using 1\n[GOAL]\ncase h.e'_4\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\n⊢ 2 * m ^ 2 = m ^ 2 + n ^ 2 + (m ^ 2 - n ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\n⊢ False\n[PROOFSTEP]\nhave h2n : (p : ℤ) ∣ 2 * n ^ 2 := by\n  convert dvd_sub hp2 hp1 using 1\n  ring\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\n⊢ ↑p ∣ 2 * n ^ 2\n[PROOFSTEP]\nconvert dvd_sub hp2 hp1 using 1\n[GOAL]\ncase h.e'_4\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\n⊢ 2 * n ^ 2 = m ^ 2 + n ^ 2 - (m ^ 2 - n ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\n⊢ False\n[PROOFSTEP]\nhave hmc : p = 2 ∨ p ∣ Int.natAbs m := prime_two_or_dvd_of_dvd_two_mul_pow_self_two hp h2m\n[GOAL]\ncase intro.intro.intro\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\nhmc : p = 2 ∨ p ∣ Int.natAbs m\n⊢ False\n[PROOFSTEP]\nhave hnc : p = 2 ∨ p ∣ Int.natAbs n := prime_two_or_dvd_of_dvd_two_mul_pow_self_two hp h2n\n[GOAL]\ncase intro.intro.intro\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\nhmc : p = 2 ∨ p ∣ Int.natAbs m\nhnc : p = 2 ∨ p ∣ Int.natAbs n\n⊢ False\n[PROOFSTEP]\nby_cases h2 :\n  p =\n    2\n      -- Porting note: norm_num is not enough to close h3\n[GOAL]\ncase pos\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\nhmc : p = 2 ∨ p ∣ Int.natAbs m\nhnc : p = 2 ∨ p ∣ Int.natAbs n\nh2 : p = 2\n⊢ False\n[PROOFSTEP]\nhave h3 : (m ^ 2 + n ^ 2) % 2 = 1 := by field_simp [sq, Int.add_emod, Int.mul_emod, hm, hn]\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\nhmc : p = 2 ∨ p ∣ Int.natAbs m\nhnc : p = 2 ∨ p ∣ Int.natAbs n\nh2 : p = 2\n⊢ (m ^ 2 + n ^ 2) % 2 = 1\n[PROOFSTEP]\nfield_simp [sq, Int.add_emod, Int.mul_emod, hm, hn]\n[GOAL]\ncase pos\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\nhmc : p = 2 ∨ p ∣ Int.natAbs m\nhnc : p = 2 ∨ p ∣ Int.natAbs n\nh2 : p = 2\nh3 : (m ^ 2 + n ^ 2) % 2 = 1\n⊢ False\n[PROOFSTEP]\nhave h4 : (m ^ 2 + n ^ 2) % 2 = 0 := by\n  apply Int.emod_eq_zero_of_dvd\n  rwa [h2] at hp2 \n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\nhmc : p = 2 ∨ p ∣ Int.natAbs m\nhnc : p = 2 ∨ p ∣ Int.natAbs n\nh2 : p = 2\nh3 : (m ^ 2 + n ^ 2) % 2 = 1\n⊢ (m ^ 2 + n ^ 2) % 2 = 0\n[PROOFSTEP]\napply Int.emod_eq_zero_of_dvd\n[GOAL]\ncase a\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\nhmc : p = 2 ∨ p ∣ Int.natAbs m\nhnc : p = 2 ∨ p ∣ Int.natAbs n\nh2 : p = 2\nh3 : (m ^ 2 + n ^ 2) % 2 = 1\n⊢ 2 ∣ m ^ 2 + n ^ 2\n[PROOFSTEP]\nrwa [h2] at hp2 \n[GOAL]\ncase pos\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\nhmc : p = 2 ∨ p ∣ Int.natAbs m\nhnc : p = 2 ∨ p ∣ Int.natAbs n\nh2 : p = 2\nh3 : (m ^ 2 + n ^ 2) % 2 = 1\nh4 : (m ^ 2 + n ^ 2) % 2 = 0\n⊢ False\n[PROOFSTEP]\nrw [h4] at h3 \n[GOAL]\ncase pos\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\nhmc : p = 2 ∨ p ∣ Int.natAbs m\nhnc : p = 2 ∨ p ∣ Int.natAbs n\nh2 : p = 2\nh3 : 0 = 1\nh4 : (m ^ 2 + n ^ 2) % 2 = 0\n⊢ False\n[PROOFSTEP]\nexact zero_ne_one h3\n[GOAL]\ncase neg\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\nhmc : p = 2 ∨ p ∣ Int.natAbs m\nhnc : p = 2 ∨ p ∣ Int.natAbs n\nh2 : ¬p = 2\n⊢ False\n[PROOFSTEP]\napply hp.not_dvd_one\n[GOAL]\ncase neg\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\nhmc : p = 2 ∨ p ∣ Int.natAbs m\nhnc : p = 2 ∨ p ∣ Int.natAbs n\nh2 : ¬p = 2\n⊢ p ∣ 1\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase neg\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ m ^ 2 + n ^ 2\nh2m : ↑p ∣ 2 * m ^ 2\nh2n : ↑p ∣ 2 * n ^ 2\nhmc : p = 2 ∨ p ∣ Int.natAbs m\nhnc : p = 2 ∨ p ∣ Int.natAbs n\nh2 : ¬p = 2\n⊢ p ∣ Int.gcd m n\n[PROOFSTEP]\nexact Nat.dvd_gcd (Or.resolve_left hmc h2) (Or.resolve_left hnc h2)\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 0\n⊢ Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\n[PROOFSTEP]\nrw [Int.gcd, ← Int.natAbs_neg (m ^ 2 - n ^ 2)]\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 0\n⊢ Nat.gcd (Int.natAbs (-(m ^ 2 - n ^ 2))) (Int.natAbs (m ^ 2 + n ^ 2)) = 1\n[PROOFSTEP]\nrw [(by ring : -(m ^ 2 - n ^ 2) = n ^ 2 - m ^ 2), add_comm]\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 0\n⊢ -(m ^ 2 - n ^ 2) = n ^ 2 - m ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 0\n⊢ Nat.gcd (Int.natAbs (n ^ 2 - m ^ 2)) (Int.natAbs (n ^ 2 + m ^ 2)) = 1\n[PROOFSTEP]\napply coprime_sq_sub_sq_add_of_even_odd _ hn hm\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 0\n⊢ Int.gcd n m = 1\n[PROOFSTEP]\nrwa [Int.gcd_comm]\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\n⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nby_contra H\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n⊢ False\n[PROOFSTEP]\nobtain ⟨p, hp, hp1, hp2⟩ := Nat.Prime.not_coprime_iff_dvd.mp H\n[GOAL]\ncase intro.intro.intro\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : p ∣ Int.natAbs (m ^ 2 - n ^ 2)\nhp2 : p ∣ Int.natAbs (2 * m * n)\n⊢ False\n[PROOFSTEP]\nrw [← Int.coe_nat_dvd_left] at hp1 hp2 \n[GOAL]\ncase intro.intro.intro\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\n⊢ False\n[PROOFSTEP]\nhave hnp : ¬(p : ℤ) ∣ Int.gcd m n := by\n  rw [h]\n  norm_cast\n  exact mt Nat.dvd_one.mp (Nat.Prime.ne_one hp)\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\n⊢ ¬↑p ∣ ↑(Int.gcd m n)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\n⊢ ¬↑p ∣ ↑1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\n⊢ ¬p ∣ 1\n[PROOFSTEP]\nexact mt Nat.dvd_one.mp (Nat.Prime.ne_one hp)\n[GOAL]\ncase intro.intro.intro\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\n⊢ False\n[PROOFSTEP]\ncases' Int.Prime.dvd_mul hp hp2 with hp2m hpn\n[GOAL]\ncase intro.intro.intro.inl\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs (2 * m)\n⊢ False\n[PROOFSTEP]\nrw [Int.natAbs_mul] at hp2m \n[GOAL]\ncase intro.intro.intro.inl\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs 2 * Int.natAbs m\n⊢ False\n[PROOFSTEP]\ncases' (Nat.Prime.dvd_mul hp).mp hp2m with hp2 hpm\n[GOAL]\ncase intro.intro.intro.inl.inl\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2✝ : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs 2 * Int.natAbs m\nhp2 : p ∣ Int.natAbs 2\n⊢ False\n[PROOFSTEP]\nhave hp2' : p = 2 := (Nat.le_of_dvd zero_lt_two hp2).antisymm hp.two_le\n[GOAL]\ncase intro.intro.intro.inl.inl\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2✝ : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs 2 * Int.natAbs m\nhp2 : p ∣ Int.natAbs 2\nhp2' : p = 2\n⊢ False\n[PROOFSTEP]\nrevert hp1\n[GOAL]\ncase intro.intro.intro.inl.inl\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp2✝ : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs 2 * Int.natAbs m\nhp2 : p ∣ Int.natAbs 2\nhp2' : p = 2\n⊢ ↑p ∣ m ^ 2 - n ^ 2 → False\n[PROOFSTEP]\nrw [hp2']\n[GOAL]\ncase intro.intro.intro.inl.inl\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp2✝ : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs 2 * Int.natAbs m\nhp2 : p ∣ Int.natAbs 2\nhp2' : p = 2\n⊢ ↑2 ∣ m ^ 2 - n ^ 2 → False\n[PROOFSTEP]\napply mt Int.emod_eq_zero_of_dvd\n[GOAL]\ncase intro.intro.intro.inl.inl\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp2✝ : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs 2 * Int.natAbs m\nhp2 : p ∣ Int.natAbs 2\nhp2' : p = 2\n⊢ ¬(m ^ 2 - n ^ 2) % ↑2 = 0\n[PROOFSTEP]\nfield_simp [sq, Int.sub_emod, Int.mul_emod, hm, hn]\n[GOAL]\ncase intro.intro.intro.inl.inr\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs 2 * Int.natAbs m\nhpm : p ∣ Int.natAbs m\n⊢ False\n[PROOFSTEP]\napply mt (Int.dvd_gcd (Int.coe_nat_dvd_left.mpr hpm)) hnp\n[GOAL]\ncase intro.intro.intro.inl.inr\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs 2 * Int.natAbs m\nhpm : p ∣ Int.natAbs m\n⊢ ↑p ∣ n\n[PROOFSTEP]\napply (or_self_iff _).mp\n[GOAL]\ncase intro.intro.intro.inl.inr\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs 2 * Int.natAbs m\nhpm : p ∣ Int.natAbs m\n⊢ ↑p ∣ n ∨ ↑p ∣ n\n[PROOFSTEP]\napply Int.Prime.dvd_mul' hp\n[GOAL]\ncase intro.intro.intro.inl.inr\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs 2 * Int.natAbs m\nhpm : p ∣ Int.natAbs m\n⊢ ↑p ∣ n * n\n[PROOFSTEP]\nrw [(by ring : n * n = -(m ^ 2 - n ^ 2) + m * m)]\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs 2 * Int.natAbs m\nhpm : p ∣ Int.natAbs m\n⊢ n * n = -(m ^ 2 - n ^ 2) + m * m\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro.inl.inr\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhp2m : p ∣ Int.natAbs 2 * Int.natAbs m\nhpm : p ∣ Int.natAbs m\n⊢ ↑p ∣ -(m ^ 2 - n ^ 2) + m * m\n[PROOFSTEP]\nexact hp1.neg_right.add ((Int.coe_nat_dvd_left.2 hpm).mul_right _)\n[GOAL]\ncase intro.intro.intro.inr\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd m n)\nhpn : p ∣ Int.natAbs n\n⊢ False\n[PROOFSTEP]\nrw [Int.gcd_comm] at hnp \n[GOAL]\ncase intro.intro.intro.inr\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd n m)\nhpn : p ∣ Int.natAbs n\n⊢ False\n[PROOFSTEP]\napply mt (Int.dvd_gcd (Int.coe_nat_dvd_left.mpr hpn)) hnp\n[GOAL]\ncase intro.intro.intro.inr\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd n m)\nhpn : p ∣ Int.natAbs n\n⊢ ↑p ∣ m\n[PROOFSTEP]\napply (or_self_iff _).mp\n[GOAL]\ncase intro.intro.intro.inr\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd n m)\nhpn : p ∣ Int.natAbs n\n⊢ ↑p ∣ m ∨ ↑p ∣ m\n[PROOFSTEP]\napply Int.Prime.dvd_mul' hp\n[GOAL]\ncase intro.intro.intro.inr\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd n m)\nhpn : p ∣ Int.natAbs n\n⊢ ↑p ∣ m * m\n[PROOFSTEP]\nrw [(by ring : m * m = m ^ 2 - n ^ 2 + n * n)]\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd n m)\nhpn : p ∣ Int.natAbs n\n⊢ m * m = m ^ 2 - n ^ 2 + n * n\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro.inr\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd n m)\nhpn : p ∣ Int.natAbs n\n⊢ ↑p ∣ m ^ 2 - n ^ 2 + n * n\n[PROOFSTEP]\napply dvd_add hp1\n[GOAL]\ncase intro.intro.intro.inr\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 0\nhn : n % 2 = 1\nH : ¬Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ m ^ 2 - n ^ 2\nhp2 : ↑p ∣ 2 * m * n\nhnp : ¬↑p ∣ ↑(Int.gcd n m)\nhpn : p ∣ Int.natAbs n\n⊢ ↑p ∣ n * n\n[PROOFSTEP]\nexact (Int.coe_nat_dvd_left.mpr hpn).mul_right n\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 0\n⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nrw [Int.gcd, ← Int.natAbs_neg (m ^ 2 - n ^ 2)]\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 0\n⊢ Nat.gcd (Int.natAbs (-(m ^ 2 - n ^ 2))) (Int.natAbs (2 * m * n)) = 1\n[PROOFSTEP]\nrw [(by ring : 2 * m * n = 2 * n * m), (by ring : -(m ^ 2 - n ^ 2) = n ^ 2 - m ^ 2)]\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 0\n⊢ 2 * m * n = 2 * n * m\n[PROOFSTEP]\nring\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 0\n⊢ -(m ^ 2 - n ^ 2) = n ^ 2 - m ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 0\n⊢ Nat.gcd (Int.natAbs (n ^ 2 - m ^ 2)) (Int.natAbs (2 * n * m)) = 1\n[PROOFSTEP]\napply coprime_sq_sub_mul_of_even_odd _ hn hm\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 0\n⊢ Int.gcd n m = 1\n[PROOFSTEP]\nrwa [Int.gcd_comm]\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhmn : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\ncases' hmn with h1 h2\n[GOAL]\ncase inl\nm n : ℤ\nh : Int.gcd m n = 1\nh1 : m % 2 = 0 ∧ n % 2 = 1\n⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nexact coprime_sq_sub_mul_of_even_odd h h1.left h1.right\n[GOAL]\ncase inr\nm n : ℤ\nh : Int.gcd m n = 1\nh2 : m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nexact coprime_sq_sub_mul_of_odd_even h h2.left h2.right\n[GOAL]\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 1\n⊢ 2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n[PROOFSTEP]\ncases' exists_eq_mul_left_of_dvd (Int.dvd_sub_of_emod_eq hm) with m0 hm2\n[GOAL]\ncase intro\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 1\nm0 : ℤ\nhm2 : m - 1 = m0 * 2\n⊢ 2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n[PROOFSTEP]\ncases' exists_eq_mul_left_of_dvd (Int.dvd_sub_of_emod_eq hn) with n0 hn2\n[GOAL]\ncase intro.intro\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 1\nm0 : ℤ\nhm2 : m - 1 = m0 * 2\nn0 : ℤ\nhn2 : n - 1 = n0 * 2\n⊢ 2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n[PROOFSTEP]\nrw [sub_eq_iff_eq_add] at hm2 hn2 \n[GOAL]\ncase intro.intro\nm n : ℤ\nh : Int.gcd m n = 1\nhm : m % 2 = 1\nhn : n % 2 = 1\nm0 : ℤ\nhm2 : m = m0 * 2 + 1\nn0 : ℤ\nhn2 : n = n0 * 2 + 1\n⊢ 2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n[PROOFSTEP]\nsubst m\n[GOAL]\ncase intro.intro\nn : ℤ\nhn : n % 2 = 1\nm0 n0 : ℤ\nhn2 : n = n0 * 2 + 1\nh : Int.gcd (m0 * 2 + 1) n = 1\nhm : (m0 * 2 + 1) % 2 = 1\n⊢ 2 ∣ (m0 * 2 + 1) ^ 2 + n ^ 2 ∧\n    2 ∣ (m0 * 2 + 1) ^ 2 - n ^ 2 ∧\n      ((m0 * 2 + 1) ^ 2 - n ^ 2) / 2 % 2 = 0 ∧\n        Int.gcd (((m0 * 2 + 1) ^ 2 - n ^ 2) / 2) (((m0 * 2 + 1) ^ 2 + n ^ 2) / 2) = 1\n[PROOFSTEP]\nsubst n\n[GOAL]\ncase intro.intro\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\n⊢ 2 ∣ (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 ∧\n    2 ∣ (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 ∧\n      ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0 ∧\n        Int.gcd (((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2) (((m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2) / 2) = 1\n[PROOFSTEP]\nhave h1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) := by ring\n[GOAL]\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\n⊢ (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\n⊢ 2 ∣ (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 ∧\n    2 ∣ (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 ∧\n      ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0 ∧\n        Int.gcd (((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2) (((m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2) / 2) = 1\n[PROOFSTEP]\nhave h2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) := by ring\n[GOAL]\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\n⊢ (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\n⊢ 2 ∣ (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 ∧\n    2 ∣ (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 ∧\n      ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0 ∧\n        Int.gcd (((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2) (((m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2) / 2) = 1\n[PROOFSTEP]\nhave h3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0 :=\n  by\n  rw [h2, Int.mul_ediv_cancel_left, Int.mul_emod_right]\n  exact by decide\n[GOAL]\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\n⊢ ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\n[PROOFSTEP]\nrw [h2, Int.mul_ediv_cancel_left, Int.mul_emod_right]\n[GOAL]\ncase H\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\n⊢ 2 ≠ 0\n[PROOFSTEP]\nexact by decide\n[GOAL]\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\n⊢ 2 ≠ 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase intro.intro\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\n⊢ 2 ∣ (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 ∧\n    2 ∣ (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 ∧\n      ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0 ∧\n        Int.gcd (((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2) (((m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2) / 2) = 1\n[PROOFSTEP]\nrefine' ⟨⟨_, h1⟩, ⟨_, h2⟩, h3, _⟩\n[GOAL]\ncase intro.intro\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\n⊢ Int.gcd (((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2) (((m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2) / 2) = 1\n[PROOFSTEP]\nhave h20 : (2 : ℤ) ≠ 0 := by decide\n[GOAL]\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\n⊢ 2 ≠ 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase intro.intro\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\n⊢ Int.gcd (((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2) (((m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2) / 2) = 1\n[PROOFSTEP]\nrw [h1, h2, Int.mul_ediv_cancel_left _ h20, Int.mul_ediv_cancel_left _ h20]\n[GOAL]\ncase intro.intro\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\n⊢ Int.gcd (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) = 1\n[PROOFSTEP]\nby_contra h4\n[GOAL]\ncase intro.intro\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\nh4 : ¬Int.gcd (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) = 1\n⊢ False\n[PROOFSTEP]\nobtain ⟨p, hp, hp1, hp2⟩ := Nat.Prime.not_coprime_iff_dvd.mp h4\n[GOAL]\ncase intro.intro.intro.intro.intro\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\nh4 : ¬Int.gcd (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : p ∣ Int.natAbs (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nhp2 : p ∣ Int.natAbs (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\n⊢ False\n[PROOFSTEP]\napply hp.not_dvd_one\n[GOAL]\ncase intro.intro.intro.intro.intro\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\nh4 : ¬Int.gcd (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : p ∣ Int.natAbs (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nhp2 : p ∣ Int.natAbs (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\n⊢ p ∣ 1\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase intro.intro.intro.intro.intro\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\nh4 : ¬Int.gcd (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : p ∣ Int.natAbs (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nhp2 : p ∣ Int.natAbs (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\n⊢ p ∣ Int.gcd (m0 * 2 + 1) (n0 * 2 + 1)\n[PROOFSTEP]\nrw [← Int.coe_nat_dvd_left] at hp1 hp2 \n[GOAL]\ncase intro.intro.intro.intro.intro\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\nh4 : ¬Int.gcd (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ 2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)\nhp2 : ↑p ∣ 2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1\n⊢ p ∣ Int.gcd (m0 * 2 + 1) (n0 * 2 + 1)\n[PROOFSTEP]\napply Nat.dvd_gcd\n[GOAL]\ncase intro.intro.intro.intro.intro.a\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\nh4 : ¬Int.gcd (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ 2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)\nhp2 : ↑p ∣ 2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1\n⊢ p ∣ Int.natAbs (m0 * 2 + 1)\n[PROOFSTEP]\napply Int.Prime.dvd_natAbs_of_coe_dvd_sq hp\n[GOAL]\ncase intro.intro.intro.intro.intro.a.h\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\nh4 : ¬Int.gcd (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ 2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)\nhp2 : ↑p ∣ 2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1\n⊢ ↑p ∣ (m0 * 2 + 1) ^ 2\n[PROOFSTEP]\nconvert dvd_add hp1 hp2\n[GOAL]\ncase h.e'_4\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\nh4 : ¬Int.gcd (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ 2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)\nhp2 : ↑p ∣ 2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1\n⊢ (m0 * 2 + 1) ^ 2 = 2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0) + (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro.intro.intro.a\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\nh4 : ¬Int.gcd (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ 2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)\nhp2 : ↑p ∣ 2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1\n⊢ p ∣ Int.natAbs (n0 * 2 + 1)\n[PROOFSTEP]\napply Int.Prime.dvd_natAbs_of_coe_dvd_sq hp\n[GOAL]\ncase intro.intro.intro.intro.intro.a.h\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\nh4 : ¬Int.gcd (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ 2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)\nhp2 : ↑p ∣ 2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1\n⊢ ↑p ∣ (n0 * 2 + 1) ^ 2\n[PROOFSTEP]\nconvert dvd_sub hp2 hp1\n[GOAL]\ncase h.e'_4\nm0 n0 : ℤ\nhm : (m0 * 2 + 1) % 2 = 1\nhn : (n0 * 2 + 1) % 2 = 1\nh : Int.gcd (m0 * 2 + 1) (n0 * 2 + 1) = 1\nh1 : (m0 * 2 + 1) ^ 2 + (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1)\nh2 : (m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2 = 2 * (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0))\nh3 : ((m0 * 2 + 1) ^ 2 - (n0 * 2 + 1) ^ 2) / 2 % 2 = 0\nh20 : 2 ≠ 0\nh4 : ¬Int.gcd (2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)) (2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1) = 1\np : ℕ\nhp : Nat.Prime p\nhp1 : ↑p ∣ 2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)\nhp2 : ↑p ∣ 2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1\n⊢ (n0 * 2 + 1) ^ 2 = 2 * (m0 ^ 2 + n0 ^ 2 + m0 + n0) + 1 - 2 * (m0 ^ 2 - n0 ^ 2 + m0 - n0)\n[PROOFSTEP]\nring\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hz : z ≠ 0\n[GOAL]\ncase hz\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ z ≠ 0\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhz : z ≠ 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\napply ne_of_gt hzpos\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhz : z ≠ 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave h2 : y = m ^ 2 - n ^ 2 ∧ z = m ^ 2 + n ^ 2 :=\n  by\n  apply Rat.div_int_inj hzpos hm2n2 (h.coprime_of_coprime hc) H\n  rw [hw2]\n  norm_cast\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhz : z ≠ 0\n⊢ y = m ^ 2 - n ^ 2 ∧ z = m ^ 2 + n ^ 2\n[PROOFSTEP]\napply Rat.div_int_inj hzpos hm2n2 (h.coprime_of_coprime hc) H\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhz : z ≠ 0\n⊢ ↑y / ↑z = ↑(m ^ 2 - n ^ 2) / ↑(m ^ 2 + n ^ 2)\n[PROOFSTEP]\nrw [hw2]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhz : z ≠ 0\n⊢ (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2) = ↑(m ^ 2 - n ^ 2) / ↑(m ^ 2 + n ^ 2)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhz : z ≠ 0\nh2 : y = m ^ 2 - n ^ 2 ∧ z = m ^ 2 + n ^ 2\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nuse m, n\n[GOAL]\ncase h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhz : z ≠ 0\nh2 : y = m ^ 2 - n ^ 2 ∧ z = m ^ 2 + n ^ 2\n⊢ (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n    Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n[PROOFSTEP]\napply And.intro _ (And.intro co pp)\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhz : z ≠ 0\nh2 : y = m ^ 2 - n ^ 2 ∧ z = m ^ 2 + n ^ 2\n⊢ x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\n[PROOFSTEP]\nright\n[GOAL]\ncase h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhz : z ≠ 0\nh2 : y = m ^ 2 - n ^ 2 ∧ z = m ^ 2 + n ^ 2\n⊢ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\n[PROOFSTEP]\nrefine' ⟨_, h2.left⟩\n[GOAL]\ncase h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhz : z ≠ 0\nh2 : y = m ^ 2 - n ^ 2 ∧ z = m ^ 2 + n ^ 2\n⊢ x = 2 * m * n\n[PROOFSTEP]\nrw [← Rat.coe_int_inj _ _, ← div_left_inj' ((mt (Rat.coe_int_inj z 0).mp) hz), hv2, h2.right]\n[GOAL]\ncase h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nm n : ℤ\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhv2 : ↑x / ↑z = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhw2 : ↑y / ↑z = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nH : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhz : z ≠ 0\nh2 : y = m ^ 2 - n ^ 2 ∧ z = m ^ 2 + n ^ 2\n⊢ 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2) = ↑(2 * m * n) / ↑(m ^ 2 + n ^ 2)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nby_cases h0 : x = 0\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : x = 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nexact h.isPrimitiveClassified_of_coprime_of_zero_left hc h0\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nlet v := (x : ℚ) / z\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nlet w := (y : ℚ) / z\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hz : z ≠ 0\n[GOAL]\ncase hz\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\n⊢ z ≠ 0\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\napply ne_of_gt hzpos\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hq : v ^ 2 + w ^ 2 = 1 := by\n  field_simp [hz, sq]\n  norm_cast\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\n⊢ v ^ 2 + w ^ 2 = 1\n[PROOFSTEP]\nfield_simp [hz, sq]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\n⊢ ↑x * ↑x + ↑y * ↑y = ↑z * ↑z\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hvz : v ≠ 0 := by\n  field_simp [hz]\n  exact h0\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\n⊢ v ≠ 0\n[PROOFSTEP]\nfield_simp [hz]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\n⊢ ¬x = 0\n[PROOFSTEP]\nexact h0\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hw1 : w ≠ -1 := by\n  contrapose! hvz with hw1\n  replace hw1 : w = -1 := hw1; show v = 0\n  rw [hw1, neg_sq, one_pow, add_left_eq_self] at hq \n  exact pow_eq_zero hq\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\n⊢ w ≠ -1\n[PROOFSTEP]\ncontrapose! hvz with hw1\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhw1 : ↑y / ↑z = -1\n⊢ ↑x / ↑z = 0\n[PROOFSTEP]\nreplace hw1 : w = -1 := hw1\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhw1 : w = -1\n⊢ ↑x / ↑z = 0\n[PROOFSTEP]\nshow v = 0\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhw1 : w = -1\n⊢ v = 0\n[PROOFSTEP]\nrw [hw1, neg_sq, one_pow, add_left_eq_self] at hq \n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 = 0\nhw1 : w = -1\n⊢ v = 0\n[PROOFSTEP]\nexact pow_eq_zero hq\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hQ : ∀ x : ℚ, 1 + x ^ 2 ≠ 0 := by\n  intro q\n  apply ne_of_gt\n  exact lt_add_of_pos_of_le zero_lt_one (sq_nonneg q)\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\n⊢ ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\n[PROOFSTEP]\nintro q\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nq : ℚ\n⊢ 1 + q ^ 2 ≠ 0\n[PROOFSTEP]\napply ne_of_gt\n[GOAL]\ncase h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nq : ℚ\n⊢ 0 < 1 + q ^ 2\n[PROOFSTEP]\nexact lt_add_of_pos_of_le zero_lt_one (sq_nonneg q)\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hp : (⟨v, w⟩ : ℚ × ℚ) ∈ {p : ℚ × ℚ | p.1 ^ 2 + p.2 ^ 2 = 1 ∧ p.2 ≠ -1} := ⟨hq, hw1⟩\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nlet q := (circleEquivGen hQ).symm ⟨⟨v, w⟩, hp⟩\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave ht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2) :=\n  by\n  apply Prod.mk.inj\n  have := ((circleEquivGen hQ).apply_symm_apply ⟨⟨v, w⟩, hp⟩).symm\n  exact congr_arg Subtype.val this\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\n⊢ v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\n[PROOFSTEP]\napply Prod.mk.inj\n[GOAL]\ncase x\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\n⊢ (v, w) = (2 * q / (1 + q ^ 2), (1 - q ^ 2) / (1 + q ^ 2))\n[PROOFSTEP]\nhave := ((circleEquivGen hQ).apply_symm_apply ⟨⟨v, w⟩, hp⟩).symm\n[GOAL]\ncase x\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nthis :\n  { val := (v, w), property := hp } = ↑(circleEquivGen hQ) (↑(circleEquivGen hQ).symm { val := (v, w), property := hp })\n⊢ (v, w) = (2 * q / (1 + q ^ 2), (1 - q ^ 2) / (1 + q ^ 2))\n[PROOFSTEP]\nexact congr_arg Subtype.val this\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nlet m := (q.den : ℤ)\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nlet n := q.num\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hm0 : m ≠ 0 := by\n  norm_cast\n  apply Rat.den_nz q\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\n⊢ m ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\n⊢ ¬q.den = 0\n[PROOFSTEP]\napply Rat.den_nz q\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hq2 : q = n / m := (Rat.num_div_den q).symm\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hm2n2 : 0 < m ^ 2 + n ^ 2 := by\n  apply lt_add_of_pos_of_le _ (sq_nonneg n)\n  exact lt_of_le_of_ne (sq_nonneg m) (Ne.symm (pow_ne_zero 2 hm0))\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\n⊢ 0 < m ^ 2 + n ^ 2\n[PROOFSTEP]\napply lt_add_of_pos_of_le _ (sq_nonneg n)\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\n⊢ 0 < m ^ 2\n[PROOFSTEP]\nexact lt_of_le_of_ne (sq_nonneg m) (Ne.symm (pow_ne_zero 2 hm0))\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hm2n20 : (m : ℚ) ^ 2 + (n : ℚ) ^ 2 ≠ 0 := by\n  norm_cast\n  simpa only [Int.coe_nat_pow] using ne_of_gt hm2n2\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\n⊢ ↑m ^ 2 + ↑n ^ 2 ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\n⊢ ¬↑(q.den ^ 2) + n ^ 2 = 0\n[PROOFSTEP]\nsimpa only [Int.coe_nat_pow] using ne_of_gt hm2n2\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hx1 {j k : ℚ} (h₁ : k ≠ 0) (h₂ : k ^ 2 + j ^ 2 ≠ 0) :\n  (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2) := by field_simp\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nj k : ℚ\nh₁ : k ≠ 0\nh₂ : k ^ 2 + j ^ 2 ≠ 0\n⊢ (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hw2 : w = ((m : ℚ) ^ 2 - (n : ℚ) ^ 2) / ((m : ℚ) ^ 2 + (n : ℚ) ^ 2) := by\n  calc\n    w = (1 - q ^ 2) / (1 + q ^ 2) := by apply ht4.2\n    _ = (1 - (↑n / ↑m) ^ 2) / (1 + (↑n / ↑m) ^ 2) := by rw [hq2]\n    _ = _ := by exact hx1 (Int.cast_ne_zero.mpr hm0) hm2n20\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\n⊢ w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\n[PROOFSTEP]\ncalc\n  w = (1 - q ^ 2) / (1 + q ^ 2) := by apply ht4.2\n  _ = (1 - (↑n / ↑m) ^ 2) / (1 + (↑n / ↑m) ^ 2) := by rw [hq2]\n  _ = _ := by exact hx1 (Int.cast_ne_zero.mpr hm0) hm2n20\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\n⊢ w = (1 - q ^ 2) / (1 + q ^ 2)\n[PROOFSTEP]\napply ht4.2\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\n⊢ (1 - q ^ 2) / (1 + q ^ 2) = (1 - (↑n / ↑m) ^ 2) / (1 + (↑n / ↑m) ^ 2)\n[PROOFSTEP]\nrw [hq2]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\n⊢ (1 - (↑n / ↑m) ^ 2) / (1 + (↑n / ↑m) ^ 2) = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\n[PROOFSTEP]\nexact hx1 (Int.cast_ne_zero.mpr hm0) hm2n20\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hx2 {j k : ℚ} (h₁ : k ≠ 0) (h₂ : k ^ 2 + j ^ 2 ≠ 0) :\n  2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2) :=\n  have h₃ : k * (k ^ 2 + j ^ 2) ≠ 0 := mul_ne_zero h₁ h₂\n  by field_simp; ring\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nj k : ℚ\nh₁ : k ≠ 0\nh₂ : k ^ 2 + j ^ 2 ≠ 0\nh₃ : k * (k ^ 2 + j ^ 2) ≠ 0\n⊢ 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\n[PROOFSTEP]\nfield_simp\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nj k : ℚ\nh₁ : k ≠ 0\nh₂ : k ^ 2 + j ^ 2 ≠ 0\nh₃ : k * (k ^ 2 + j ^ 2) ≠ 0\n⊢ 2 * j * k ^ 2 * (k ^ 2 + j ^ 2) = 2 * k * j * (k * (k ^ 2 + j ^ 2))\n[PROOFSTEP]\nring\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hv2 : v = 2 * m * n / ((m : ℚ) ^ 2 + (n : ℚ) ^ 2) := by\n  calc\n    v = 2 * q / (1 + q ^ 2) := by apply ht4.1\n    _ = 2 * (n / m) / (1 + (↑n / ↑m) ^ 2) := by rw [hq2]\n    _ = _ := by exact hx2 (Int.cast_ne_zero.mpr hm0) hm2n20\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\n⊢ v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\n[PROOFSTEP]\ncalc\n  v = 2 * q / (1 + q ^ 2) := by apply ht4.1\n  _ = 2 * (n / m) / (1 + (↑n / ↑m) ^ 2) := by rw [hq2]\n  _ = _ := by exact hx2 (Int.cast_ne_zero.mpr hm0) hm2n20\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\n⊢ v = 2 * q / (1 + q ^ 2)\n[PROOFSTEP]\napply ht4.1\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\n⊢ 2 * q / (1 + q ^ 2) = 2 * (↑n / ↑m) / (1 + (↑n / ↑m) ^ 2)\n[PROOFSTEP]\nrw [hq2]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\n⊢ 2 * (↑n / ↑m) / (1 + (↑n / ↑m) ^ 2) = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\n[PROOFSTEP]\nexact hx2 (Int.cast_ne_zero.mpr hm0) hm2n20\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hnmcp : Int.gcd n m = 1 := q.reduced\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave hmncp : Int.gcd m n = 1 := by\n  rw [Int.gcd_comm]\n  exact hnmcp\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\n⊢ Int.gcd m n = 1\n[PROOFSTEP]\nrw [Int.gcd_comm]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\n⊢ Int.gcd n m = 1\n[PROOFSTEP]\nexact hnmcp\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\ncases' Int.emod_two_eq_zero_or_one m with hm2 hm2\n[GOAL]\ncase neg.inl\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\ncases' Int.emod_two_eq_zero_or_one n with hn2 hn2\n[GOAL]\ncase neg.inr\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\ncases' Int.emod_two_eq_zero_or_one n with hn2 hn2\n[GOAL]\ncase neg.inl.inl\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 0\nhn2 : n % 2 = 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase neg.inl.inl.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 0\nhn2 : n % 2 = 0\n⊢ False\n[PROOFSTEP]\nhave h1 : 2 ∣ (Int.gcd n m : ℤ) := Int.dvd_gcd (Int.dvd_of_emod_eq_zero hn2) (Int.dvd_of_emod_eq_zero hm2)\n[GOAL]\ncase neg.inl.inl.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 0\nhn2 : n % 2 = 0\nh1 : 2 ∣ ↑(Int.gcd n m)\n⊢ False\n[PROOFSTEP]\nrw [hnmcp] at h1 \n[GOAL]\ncase neg.inl.inl.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 0\nhn2 : n % 2 = 0\nh1 : 2 ∣ ↑1\n⊢ False\n[PROOFSTEP]\nrevert h1\n[GOAL]\ncase neg.inl.inl.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 0\nhn2 : n % 2 = 0\n⊢ 2 ∣ ↑1 → False\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg.inl.inr\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 0\nhn2 : n % 2 = 1\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\napply h.isPrimitiveClassified_aux hc hzpos hm2n2 hv2 hw2 _ hmncp\n[GOAL]\ncase neg.inl.inr\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 0\nhn2 : n % 2 = 1\n⊢ m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n[PROOFSTEP]\napply Or.intro_left\n[GOAL]\ncase neg.inl.inr.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 0\nhn2 : n % 2 = 1\n⊢ m % 2 = 0 ∧ n % 2 = 1\n[PROOFSTEP]\nexact And.intro hm2 hn2\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 0\nhn2 : n % 2 = 1\n⊢ Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\n[PROOFSTEP]\napply coprime_sq_sub_sq_add_of_even_odd hmncp hm2 hn2\n[GOAL]\ncase neg.inr.inl\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\napply h.isPrimitiveClassified_aux hc hzpos hm2n2 hv2 hw2 _ hmncp\n[GOAL]\ncase neg.inr.inl\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 0\n⊢ m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n[PROOFSTEP]\napply Or.intro_right\n[GOAL]\ncase neg.inr.inl.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 0\n⊢ m % 2 = 1 ∧ n % 2 = 0\n[PROOFSTEP]\nexact And.intro hm2 hn2\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 0\n⊢ Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1\n[PROOFSTEP]\napply coprime_sq_sub_sq_add_of_odd_even hmncp hm2 hn2\n[GOAL]\ncase neg.inr.inr\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase neg.inr.inr.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\n⊢ False\n[PROOFSTEP]\nhave h1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1 :=\n  coprime_sq_sub_sq_sum_of_odd_odd hmncp hm2 hn2\n[GOAL]\ncase neg.inr.inr.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n⊢ False\n[PROOFSTEP]\nhave h2 : y = (m ^ 2 - n ^ 2) / 2 ∧ z = (m ^ 2 + n ^ 2) / 2 :=\n  by\n  apply Rat.div_int_inj hzpos _ (h.coprime_of_coprime hc) h1.2.2.2\n  · show w = _\n    rw [← Rat.divInt_eq_div, ← Rat.divInt_mul_right (by norm_num : (2 : ℤ) ≠ 0)]\n    rw [Int.ediv_mul_cancel h1.1, Int.ediv_mul_cancel h1.2.1, hw2]\n    norm_cast\n  · apply (mul_lt_mul_right (by norm_num : 0 < (2 : ℤ))).mp\n    rw [Int.ediv_mul_cancel h1.1, zero_mul]\n    exact hm2n2\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n⊢ y = (m ^ 2 - n ^ 2) / 2 ∧ z = (m ^ 2 + n ^ 2) / 2\n[PROOFSTEP]\napply Rat.div_int_inj hzpos _ (h.coprime_of_coprime hc) h1.2.2.2\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n⊢ ↑y / ↑z = ↑((m ^ 2 - n ^ 2) / 2) / ↑((m ^ 2 + n ^ 2) / 2)\n[PROOFSTEP]\nshow w = _\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n⊢ w = ↑((m ^ 2 - n ^ 2) / 2) / ↑((m ^ 2 + n ^ 2) / 2)\n[PROOFSTEP]\nrw [← Rat.divInt_eq_div, ← Rat.divInt_mul_right (by norm_num : (2 : ℤ) ≠ 0)]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n⊢ 2 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n⊢ w = Rat.divInt ((m ^ 2 - n ^ 2) / 2 * 2) ((m ^ 2 + n ^ 2) / 2 * 2)\n[PROOFSTEP]\nrw [Int.ediv_mul_cancel h1.1, Int.ediv_mul_cancel h1.2.1, hw2]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n⊢ (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2) = Rat.divInt (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n⊢ 0 < (m ^ 2 + n ^ 2) / 2\n[PROOFSTEP]\napply (mul_lt_mul_right (by norm_num : 0 < (2 : ℤ))).mp\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n⊢ 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n⊢ 0 * 2 < (m ^ 2 + n ^ 2) / 2 * 2\n[PROOFSTEP]\nrw [Int.ediv_mul_cancel h1.1, zero_mul]\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\n⊢ 0 < m ^ 2 + n ^ 2\n[PROOFSTEP]\nexact hm2n2\n[GOAL]\ncase neg.inr.inr.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhyo : y % 2 = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\nh2 : y = (m ^ 2 - n ^ 2) / 2 ∧ z = (m ^ 2 + n ^ 2) / 2\n⊢ False\n[PROOFSTEP]\nrw [h2.1, h1.2.2.1] at hyo \n[GOAL]\ncase neg.inr.inr.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhyo : 0 = 1\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\nh2 : y = (m ^ 2 - n ^ 2) / 2 ∧ z = (m ^ 2 + n ^ 2) / 2\n⊢ False\n[PROOFSTEP]\nrevert hyo\n[GOAL]\ncase neg.inr.inr.h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nh0 : ¬x = 0\nv : ℚ := ↑x / ↑z\nw : ℚ := ↑y / ↑z\nhz : z ≠ 0\nhq : v ^ 2 + w ^ 2 = 1\nhvz : v ≠ 0\nhw1 : w ≠ -1\nhQ : ∀ (x : ℚ), 1 + x ^ 2 ≠ 0\nhp : (v, w) ∈ {p | p.fst ^ 2 + p.snd ^ 2 = 1 ∧ p.snd ≠ -1}\nq : (fun x => ℚ) { val := (v, w), property := hp } := ↑(circleEquivGen hQ).symm { val := (v, w), property := hp }\nht4 : v = 2 * q / (1 + q ^ 2) ∧ w = (1 - q ^ 2) / (1 + q ^ 2)\nm : ℤ := ↑q.den\nn : ℤ := q.num\nhm0 : m ≠ 0\nhq2 : q = ↑n / ↑m\nhm2n2 : 0 < m ^ 2 + n ^ 2\nhm2n20 : ↑m ^ 2 + ↑n ^ 2 ≠ 0\nhx1 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → (1 - (j / k) ^ 2) / (1 + (j / k) ^ 2) = (k ^ 2 - j ^ 2) / (k ^ 2 + j ^ 2)\nhw2 : w = (↑m ^ 2 - ↑n ^ 2) / (↑m ^ 2 + ↑n ^ 2)\nhx2 : ∀ {j k : ℚ}, k ≠ 0 → k ^ 2 + j ^ 2 ≠ 0 → 2 * (j / k) / (1 + (j / k) ^ 2) = 2 * k * j / (k ^ 2 + j ^ 2)\nhv2 : v = 2 * ↑m * ↑n / (↑m ^ 2 + ↑n ^ 2)\nhnmcp : Int.gcd n m = 1\nhmncp : Int.gcd m n = 1\nhm2 : m % 2 = 1\nhn2 : n % 2 = 1\nh1 :\n  2 ∣ m ^ 2 + n ^ 2 ∧\n    2 ∣ m ^ 2 - n ^ 2 ∧ (m ^ 2 - n ^ 2) / 2 % 2 = 0 ∧ Int.gcd ((m ^ 2 - n ^ 2) / 2) ((m ^ 2 + n ^ 2) / 2) = 1\nh2 : y = (m ^ 2 - n ^ 2) / 2 ∧ z = (m ^ 2 + n ^ 2) / 2\n⊢ 0 = 1 → False\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\ncases' h.even_odd_of_coprime hc with h1 h2\n[GOAL]\ncase inl\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nh1 : x % 2 = 0 ∧ y % 2 = 1\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nexact h.isPrimitiveClassified_of_coprime_of_odd_of_pos hc h1.right hzpos\n[GOAL]\ncase inr\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhzpos : 0 < z\nh2 : x % 2 = 1 ∧ y % 2 = 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nrw [Int.gcd_comm] at hc \n[GOAL]\ncase inr\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd y x = 1\nhzpos : 0 < z\nh2 : x % 2 = 1 ∧ y % 2 = 0\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nobtain ⟨m, n, H⟩ := h.symm.isPrimitiveClassified_of_coprime_of_odd_of_pos hc h2.left hzpos\n[GOAL]\ncase inr.intro.intro\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd y x = 1\nhzpos : 0 < z\nh2 : x % 2 = 1 ∧ y % 2 = 0\nm n : ℤ\nH :\n  (y = m ^ 2 - n ^ 2 ∧ x = 2 * m * n ∨ y = 2 * m * n ∧ x = m ^ 2 - n ^ 2) ∧\n    Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nuse m, n\n[GOAL]\ncase h\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd y x = 1\nhzpos : 0 < z\nh2 : x % 2 = 1 ∧ y % 2 = 0\nm n : ℤ\nH :\n  (y = m ^ 2 - n ^ 2 ∧ x = 2 * m * n ∨ y = 2 * m * n ∧ x = m ^ 2 - n ^ 2) ∧\n    Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n⊢ (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n    Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n[PROOFSTEP]\ntauto\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nby_cases hz : 0 < z\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhz : 0 < z\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nexact h.isPrimitiveClassified_of_coprime_of_pos hc hz\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhz : ¬0 < z\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\nhave h' : PythagoreanTriple x y (-z) := by simpa [PythagoreanTriple, neg_mul_neg] using h.eq\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhz : ¬0 < z\n⊢ PythagoreanTriple x y (-z)\n[PROOFSTEP]\nsimpa [PythagoreanTriple, neg_mul_neg] using h.eq\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhz : ¬0 < z\nh' : PythagoreanTriple x y (-z)\n⊢ IsPrimitiveClassified h\n[PROOFSTEP]\napply h'.isPrimitiveClassified_of_coprime_of_pos hc\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhz : ¬0 < z\nh' : PythagoreanTriple x y (-z)\n⊢ 0 < -z\n[PROOFSTEP]\napply lt_of_le_of_ne _ (h'.ne_zero_of_coprime hc).symm\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nhc : Int.gcd x y = 1\nhz : ¬0 < z\nh' : PythagoreanTriple x y (-z)\n⊢ 0 ≤ -z\n[PROOFSTEP]\nexact le_neg.mp (not_lt.mp hz)\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\n⊢ IsClassified h\n[PROOFSTEP]\nby_cases h0 : Int.gcd x y = 0\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\n⊢ IsClassified h\n[PROOFSTEP]\nhave hx : x = 0 := by\n  apply Int.natAbs_eq_zero.mp\n  apply Nat.eq_zero_of_gcd_eq_zero_left h0\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\n⊢ x = 0\n[PROOFSTEP]\napply Int.natAbs_eq_zero.mp\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\n⊢ Int.natAbs x = 0\n[PROOFSTEP]\napply Nat.eq_zero_of_gcd_eq_zero_left h0\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\n⊢ IsClassified h\n[PROOFSTEP]\nhave hy : y = 0 := by\n  apply Int.natAbs_eq_zero.mp\n  apply Nat.eq_zero_of_gcd_eq_zero_right h0\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\n⊢ y = 0\n[PROOFSTEP]\napply Int.natAbs_eq_zero.mp\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\n⊢ Int.natAbs y = 0\n[PROOFSTEP]\napply Nat.eq_zero_of_gcd_eq_zero_right h0\n[GOAL]\ncase pos\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\nhy : y = 0\n⊢ IsClassified h\n[PROOFSTEP]\nuse 0, 1, 0\n[GOAL]\ncase h\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : Int.gcd x y = 0\nhx : x = 0\nhy : y = 0\n⊢ (x = 0 * (1 ^ 2 - 0 ^ 2) ∧ y = 0 * (2 * 1 * 0) ∨ x = 0 * (2 * 1 * 0) ∧ y = 0 * (1 ^ 2 - 0 ^ 2)) ∧ Int.gcd 1 0 = 1\n[PROOFSTEP]\nfield_simp [hx, hy]\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : ¬Int.gcd x y = 0\n⊢ IsClassified h\n[PROOFSTEP]\napply h.isClassified_of_normalize_isPrimitiveClassified\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : ¬Int.gcd x y = 0\n⊢ IsPrimitiveClassified (_ : PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y)))\n[PROOFSTEP]\napply h.normalize.isPrimitiveClassified_of_coprime\n[GOAL]\ncase neg\nx y z : ℤ\nh : PythagoreanTriple x y z\nh0 : ¬Int.gcd x y = 0\n⊢ Int.gcd (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) = 1\n[PROOFSTEP]\napply Int.gcd_div_gcd_div_gcd (Nat.pos_of_ne_zero h0)\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\n⊢ PythagoreanTriple x y z ∧ Int.gcd x y = 1 ↔\n    ∃ m n,\n      (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n        (z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)) ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n[PROOFSTEP]\nclear h\n[GOAL]\nx y z : ℤ\n⊢ PythagoreanTriple x y z ∧ Int.gcd x y = 1 ↔\n    ∃ m n,\n      (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n        (z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)) ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nx y z : ℤ\n⊢ PythagoreanTriple x y z ∧ Int.gcd x y = 1 →\n    ∃ m n,\n      (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n        (z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)) ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nx y z : ℤ\nh : PythagoreanTriple x y z ∧ Int.gcd x y = 1\n⊢ ∃ m n,\n    (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n      (z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)) ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n[PROOFSTEP]\nobtain ⟨m, n, H⟩ := h.left.isPrimitiveClassified_of_coprime h.right\n[GOAL]\ncase mp.intro.intro\nx y z : ℤ\nh : PythagoreanTriple x y z ∧ Int.gcd x y = 1\nm n : ℤ\nH :\n  (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n    Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n⊢ ∃ m n,\n    (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n      (z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)) ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n[PROOFSTEP]\nuse m, n\n[GOAL]\ncase h\nx y z : ℤ\nh : PythagoreanTriple x y z ∧ Int.gcd x y = 1\nm n : ℤ\nH :\n  (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n    Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n⊢ (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n    (z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)) ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n[PROOFSTEP]\nrcases H with ⟨⟨rfl, rfl⟩ | ⟨rfl, rfl⟩, co, pp⟩\n[GOAL]\ncase h.intro.inl.intro.intro\nz m n : ℤ\nh : PythagoreanTriple (m ^ 2 - n ^ 2) (2 * m * n) z ∧ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ (m ^ 2 - n ^ 2 = m ^ 2 - n ^ 2 ∧ 2 * m * n = 2 * m * n ∨ m ^ 2 - n ^ 2 = 2 * m * n ∧ 2 * m * n = m ^ 2 - n ^ 2) ∧\n    (z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)) ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n[PROOFSTEP]\nrefine' ⟨Or.inl ⟨rfl, rfl⟩, _, co, pp⟩\n[GOAL]\ncase h.intro.inl.intro.intro\nz m n : ℤ\nh : PythagoreanTriple (m ^ 2 - n ^ 2) (2 * m * n) z ∧ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\n[PROOFSTEP]\nhave : z ^ 2 = (m ^ 2 + n ^ 2) ^ 2 := by\n  rw [sq, ← h.left.eq]\n  ring\n[GOAL]\nz m n : ℤ\nh : PythagoreanTriple (m ^ 2 - n ^ 2) (2 * m * n) z ∧ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ z ^ 2 = (m ^ 2 + n ^ 2) ^ 2\n[PROOFSTEP]\nrw [sq, ← h.left.eq]\n[GOAL]\nz m n : ℤ\nh : PythagoreanTriple (m ^ 2 - n ^ 2) (2 * m * n) z ∧ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) + 2 * m * n * (2 * m * n) = (m ^ 2 + n ^ 2) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase h.intro.inl.intro.intro\nz m n : ℤ\nh : PythagoreanTriple (m ^ 2 - n ^ 2) (2 * m * n) z ∧ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nthis : z ^ 2 = (m ^ 2 + n ^ 2) ^ 2\n⊢ z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\n[PROOFSTEP]\nsimpa using eq_or_eq_neg_of_sq_eq_sq _ _ this\n[GOAL]\ncase h.intro.inr.intro.intro\nz m n : ℤ\nh : PythagoreanTriple (2 * m * n) (m ^ 2 - n ^ 2) z ∧ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ (2 * m * n = m ^ 2 - n ^ 2 ∧ m ^ 2 - n ^ 2 = 2 * m * n ∨ 2 * m * n = 2 * m * n ∧ m ^ 2 - n ^ 2 = m ^ 2 - n ^ 2) ∧\n    (z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)) ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)\n[PROOFSTEP]\nrefine' ⟨Or.inr ⟨rfl, rfl⟩, _, co, pp⟩\n[GOAL]\ncase h.intro.inr.intro.intro\nz m n : ℤ\nh : PythagoreanTriple (2 * m * n) (m ^ 2 - n ^ 2) z ∧ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\n[PROOFSTEP]\nhave : z ^ 2 = (m ^ 2 + n ^ 2) ^ 2 := by\n  rw [sq, ← h.left.eq]\n  ring\n[GOAL]\nz m n : ℤ\nh : PythagoreanTriple (2 * m * n) (m ^ 2 - n ^ 2) z ∧ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ z ^ 2 = (m ^ 2 + n ^ 2) ^ 2\n[PROOFSTEP]\nrw [sq, ← h.left.eq]\n[GOAL]\nz m n : ℤ\nh : PythagoreanTriple (2 * m * n) (m ^ 2 - n ^ 2) z ∧ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ 2 * m * n * (2 * m * n) + (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) = (m ^ 2 + n ^ 2) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase h.intro.inr.intro.intro\nz m n : ℤ\nh : PythagoreanTriple (2 * m * n) (m ^ 2 - n ^ 2) z ∧ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nthis : z ^ 2 = (m ^ 2 + n ^ 2) ^ 2\n⊢ z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\n[PROOFSTEP]\nsimpa using eq_or_eq_neg_of_sq_eq_sq _ _ this\n[GOAL]\ncase mpr\nx y z : ℤ\n⊢ (∃ m n,\n      (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n        (z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)) ∧\n          Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)) →\n    PythagoreanTriple x y z ∧ Int.gcd x y = 1\n[PROOFSTEP]\ndelta PythagoreanTriple\n[GOAL]\ncase mpr\nx y z : ℤ\n⊢ (∃ m n,\n      (x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2) ∧\n        (z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)) ∧\n          Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0)) →\n    x * x + y * y = z * z ∧ Int.gcd x y = 1\n[PROOFSTEP]\nrintro ⟨m, n, ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩, rfl | rfl, co, pp⟩\n[GOAL]\ncase mpr.intro.intro.intro.inl.intro.intro.inl.intro\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) + 2 * m * n * (2 * m * n) = (m ^ 2 + n ^ 2) * (m ^ 2 + n ^ 2) ∧\n    Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nfirst\n| constructor; ring; exact coprime_sq_sub_mul co pp\n| constructor; ring; rw [Int.gcd_comm]; exact coprime_sq_sub_mul co pp\n[GOAL]\ncase mpr.intro.intro.intro.inl.intro.intro.inl.intro\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) + 2 * m * n * (2 * m * n) = (m ^ 2 + n ^ 2) * (m ^ 2 + n ^ 2) ∧\n    Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro.intro.intro.inl.intro.intro.inl.intro.left\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) + 2 * m * n * (2 * m * n) = (m ^ 2 + n ^ 2) * (m ^ 2 + n ^ 2)\ncase mpr.intro.intro.intro.inl.intro.intro.inl.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nring\n[GOAL]\ncase mpr.intro.intro.intro.inl.intro.intro.inl.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nexact coprime_sq_sub_mul co pp\n[GOAL]\ncase mpr.intro.intro.intro.inl.intro.intro.inr.intro\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) + 2 * m * n * (2 * m * n) = -(m ^ 2 + n ^ 2) * -(m ^ 2 + n ^ 2) ∧\n    Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nfirst\n| constructor; ring; exact coprime_sq_sub_mul co pp\n| constructor; ring; rw [Int.gcd_comm]; exact coprime_sq_sub_mul co pp\n[GOAL]\ncase mpr.intro.intro.intro.inl.intro.intro.inr.intro\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) + 2 * m * n * (2 * m * n) = -(m ^ 2 + n ^ 2) * -(m ^ 2 + n ^ 2) ∧\n    Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro.intro.intro.inl.intro.intro.inr.intro.left\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) + 2 * m * n * (2 * m * n) = -(m ^ 2 + n ^ 2) * -(m ^ 2 + n ^ 2)\ncase mpr.intro.intro.intro.inl.intro.intro.inr.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nring\n[GOAL]\ncase mpr.intro.intro.intro.inl.intro.intro.inr.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nexact coprime_sq_sub_mul co pp\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inl.intro\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ 2 * m * n * (2 * m * n) + (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) = (m ^ 2 + n ^ 2) * (m ^ 2 + n ^ 2) ∧\n    Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nfirst\n| constructor; ring; exact coprime_sq_sub_mul co pp\n| constructor; ring; rw [Int.gcd_comm]; exact coprime_sq_sub_mul co pp\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inl.intro\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ 2 * m * n * (2 * m * n) + (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) = (m ^ 2 + n ^ 2) * (m ^ 2 + n ^ 2) ∧\n    Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inl.intro.left\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ 2 * m * n * (2 * m * n) + (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) = (m ^ 2 + n ^ 2) * (m ^ 2 + n ^ 2)\ncase mpr.intro.intro.intro.inr.intro.intro.inl.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nring\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inl.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nexact coprime_sq_sub_mul co pp\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inl.intro\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ 2 * m * n * (2 * m * n) + (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) = (m ^ 2 + n ^ 2) * (m ^ 2 + n ^ 2) ∧\n    Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inl.intro.left\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ 2 * m * n * (2 * m * n) + (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) = (m ^ 2 + n ^ 2) * (m ^ 2 + n ^ 2)\ncase mpr.intro.intro.intro.inr.intro.intro.inl.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nring\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inl.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nrw [Int.gcd_comm]\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inl.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nexact coprime_sq_sub_mul co pp\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inr.intro\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ 2 * m * n * (2 * m * n) + (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) = -(m ^ 2 + n ^ 2) * -(m ^ 2 + n ^ 2) ∧\n    Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nfirst\n| constructor; ring; exact coprime_sq_sub_mul co pp\n| constructor; ring; rw [Int.gcd_comm]; exact coprime_sq_sub_mul co pp\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inr.intro\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ 2 * m * n * (2 * m * n) + (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) = -(m ^ 2 + n ^ 2) * -(m ^ 2 + n ^ 2) ∧\n    Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inr.intro.left\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ 2 * m * n * (2 * m * n) + (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) = -(m ^ 2 + n ^ 2) * -(m ^ 2 + n ^ 2)\ncase mpr.intro.intro.intro.inr.intro.intro.inr.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nring\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inr.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nexact coprime_sq_sub_mul co pp\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inr.intro\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ 2 * m * n * (2 * m * n) + (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) = -(m ^ 2 + n ^ 2) * -(m ^ 2 + n ^ 2) ∧\n    Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inr.intro.left\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ 2 * m * n * (2 * m * n) + (m ^ 2 - n ^ 2) * (m ^ 2 - n ^ 2) = -(m ^ 2 + n ^ 2) * -(m ^ 2 + n ^ 2)\ncase mpr.intro.intro.intro.inr.intro.intro.inr.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nring\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inr.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (2 * m * n) (m ^ 2 - n ^ 2) = 1\n[PROOFSTEP]\nrw [Int.gcd_comm]\n[GOAL]\ncase mpr.intro.intro.intro.inr.intro.intro.inr.intro.right\nm n : ℤ\nco : Int.gcd m n = 1\npp : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1\n[PROOFSTEP]\nexact coprime_sq_sub_mul co pp\n[GOAL]\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\n⊢ ∃ m n,\n    x = m ^ 2 - n ^ 2 ∧\n      y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m\n[PROOFSTEP]\nobtain ⟨m, n, ht1, ht2, ht3, ht4⟩ := PythagoreanTriple.coprime_classification.mp (And.intro h h_coprime)\n[GOAL]\ncase intro.intro.intro.intro.intro\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht1 : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\n⊢ ∃ m n,\n    x = m ^ 2 - n ^ 2 ∧\n      y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m\n[PROOFSTEP]\ncases' le_or_lt 0 m with hm hm\n[GOAL]\ncase intro.intro.intro.intro.intro.inl\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht1 : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\n⊢ ∃ m n,\n    x = m ^ 2 - n ^ 2 ∧\n      y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m\n[PROOFSTEP]\nuse m, n\n[GOAL]\ncase h\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht1 : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\n⊢ x = m ^ 2 - n ^ 2 ∧\n    y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m\n[PROOFSTEP]\ncases' ht1 with h_odd h_even\n[GOAL]\ncase h.inl\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\n⊢ x = m ^ 2 - n ^ 2 ∧\n    y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m\n[PROOFSTEP]\napply And.intro h_odd.1\n[GOAL]\ncase h.inl\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\n⊢ y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m\n[PROOFSTEP]\napply And.intro h_odd.2\n[GOAL]\ncase h.inl\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\n⊢ z = m ^ 2 + n ^ 2 ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m\n[PROOFSTEP]\ncases' ht2 with h_pos h_neg\n[GOAL]\ncase h.inl.inl\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos✝ : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_pos : z = m ^ 2 + n ^ 2\n⊢ z = m ^ 2 + n ^ 2 ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m\n[PROOFSTEP]\napply And.intro h_pos (And.intro ht3 (And.intro ht4 hm))\n[GOAL]\ncase h.inl.inr\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_neg : z = -(m ^ 2 + n ^ 2)\n⊢ z = m ^ 2 + n ^ 2 ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h.inl.inr.h\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_neg : z = -(m ^ 2 + n ^ 2)\n⊢ False\n[PROOFSTEP]\nrevert h_pos\n[GOAL]\ncase h.inl.inr.h\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_neg : z = -(m ^ 2 + n ^ 2)\n⊢ 0 < z → False\n[PROOFSTEP]\nrw [h_neg]\n[GOAL]\ncase h.inl.inr.h\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_neg : z = -(m ^ 2 + n ^ 2)\n⊢ 0 < -(m ^ 2 + n ^ 2) → False\n[PROOFSTEP]\nexact imp_false.mpr (not_lt.mpr (neg_nonpos.mpr (add_nonneg (sq_nonneg m) (sq_nonneg n))))\n[GOAL]\ncase h.inr\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\nh_even : x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\n⊢ x = m ^ 2 - n ^ 2 ∧\n    y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h.inr.h\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\nh_even : x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\n⊢ False\n[PROOFSTEP]\nrcases h_even with ⟨rfl, -⟩\n[GOAL]\ncase h.inr.h.intro\nx y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x y✝ z✝\ny z : ℤ\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\nh : PythagoreanTriple (2 * m * n) y z\nh_coprime : Int.gcd (2 * m * n) y = 1\nh_parity : 2 * m * n % 2 = 1\n⊢ False\n[PROOFSTEP]\nrw [mul_assoc, Int.mul_emod_right] at h_parity \n[GOAL]\ncase h.inr.h.intro\nx y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x y✝ z✝\ny z : ℤ\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : 0 ≤ m\nh : PythagoreanTriple (2 * m * n) y z\nh_coprime : Int.gcd (2 * m * n) y = 1\nh_parity : 0 = 1\n⊢ False\n[PROOFSTEP]\nexact zero_ne_one h_parity\n[GOAL]\ncase intro.intro.intro.intro.intro.inr\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht1 : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\n⊢ ∃ m n,\n    x = m ^ 2 - n ^ 2 ∧\n      y = 2 * m * n ∧ z = m ^ 2 + n ^ 2 ∧ Int.gcd m n = 1 ∧ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ m\n[PROOFSTEP]\nuse-m, -n\n[GOAL]\ncase h\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht1 : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n ∨ x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\n⊢ x = (-m) ^ 2 - (-n) ^ 2 ∧\n    y = 2 * -m * -n ∧\n      z = (-m) ^ 2 + (-n) ^ 2 ∧ Int.gcd (-m) (-n) = 1 ∧ (-m % 2 = 0 ∧ -n % 2 = 1 ∨ -m % 2 = 1 ∧ -n % 2 = 0) ∧ 0 ≤ -m\n[PROOFSTEP]\ncases' ht1 with h_odd h_even\n[GOAL]\ncase h.inl\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\n⊢ x = (-m) ^ 2 - (-n) ^ 2 ∧\n    y = 2 * -m * -n ∧\n      z = (-m) ^ 2 + (-n) ^ 2 ∧ Int.gcd (-m) (-n) = 1 ∧ (-m % 2 = 0 ∧ -n % 2 = 1 ∨ -m % 2 = 1 ∧ -n % 2 = 0) ∧ 0 ≤ -m\n[PROOFSTEP]\nrw [neg_sq m]\n[GOAL]\ncase h.inl\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\n⊢ x = m ^ 2 - (-n) ^ 2 ∧\n    y = 2 * -m * -n ∧\n      z = m ^ 2 + (-n) ^ 2 ∧ Int.gcd (-m) (-n) = 1 ∧ (-m % 2 = 0 ∧ -n % 2 = 1 ∨ -m % 2 = 1 ∧ -n % 2 = 0) ∧ 0 ≤ -m\n[PROOFSTEP]\nrw [neg_sq n]\n[GOAL]\ncase h.inl\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\n⊢ x = m ^ 2 - n ^ 2 ∧\n    y = 2 * -m * -n ∧\n      z = m ^ 2 + n ^ 2 ∧ Int.gcd (-m) (-n) = 1 ∧ (-m % 2 = 0 ∧ -n % 2 = 1 ∨ -m % 2 = 1 ∧ -n % 2 = 0) ∧ 0 ≤ -m\n[PROOFSTEP]\napply And.intro h_odd.1\n[GOAL]\ncase h.inl\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\n⊢ y = 2 * -m * -n ∧\n    z = m ^ 2 + n ^ 2 ∧ Int.gcd (-m) (-n) = 1 ∧ (-m % 2 = 0 ∧ -n % 2 = 1 ∨ -m % 2 = 1 ∧ -n % 2 = 0) ∧ 0 ≤ -m\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.inl.left\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\n⊢ y = 2 * -m * -n\n[PROOFSTEP]\nrw [h_odd.2]\n[GOAL]\ncase h.inl.left\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\n⊢ 2 * m * n = 2 * -m * -n\n[PROOFSTEP]\nring\n[GOAL]\ncase h.inl.right\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\n⊢ z = m ^ 2 + n ^ 2 ∧ Int.gcd (-m) (-n) = 1 ∧ (-m % 2 = 0 ∧ -n % 2 = 1 ∨ -m % 2 = 1 ∧ -n % 2 = 0) ∧ 0 ≤ -m\n[PROOFSTEP]\ncases' ht2 with h_pos h_neg\n[GOAL]\ncase h.inl.right.inl\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos✝ : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_pos : z = m ^ 2 + n ^ 2\n⊢ z = m ^ 2 + n ^ 2 ∧ Int.gcd (-m) (-n) = 1 ∧ (-m % 2 = 0 ∧ -n % 2 = 1 ∨ -m % 2 = 1 ∧ -n % 2 = 0) ∧ 0 ≤ -m\n[PROOFSTEP]\napply And.intro h_pos\n[GOAL]\ncase h.inl.right.inl\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos✝ : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_pos : z = m ^ 2 + n ^ 2\n⊢ Int.gcd (-m) (-n) = 1 ∧ (-m % 2 = 0 ∧ -n % 2 = 1 ∨ -m % 2 = 1 ∧ -n % 2 = 0) ∧ 0 ≤ -m\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.inl.right.inl.left\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos✝ : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_pos : z = m ^ 2 + n ^ 2\n⊢ Int.gcd (-m) (-n) = 1\n[PROOFSTEP]\ndelta Int.gcd\n[GOAL]\ncase h.inl.right.inl.left\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos✝ : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_pos : z = m ^ 2 + n ^ 2\n⊢ Nat.gcd (Int.natAbs (-m)) (Int.natAbs (-n)) = 1\n[PROOFSTEP]\nrw [Int.natAbs_neg, Int.natAbs_neg]\n[GOAL]\ncase h.inl.right.inl.left\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos✝ : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_pos : z = m ^ 2 + n ^ 2\n⊢ Nat.gcd (Int.natAbs m) (Int.natAbs n) = 1\n[PROOFSTEP]\nexact ht3\n[GOAL]\ncase h.inl.right.inl.right\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos✝ : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_pos : z = m ^ 2 + n ^ 2\n⊢ (-m % 2 = 0 ∧ -n % 2 = 1 ∨ -m % 2 = 1 ∧ -n % 2 = 0) ∧ 0 ≤ -m\n[PROOFSTEP]\nrw [Int.neg_emod_two, Int.neg_emod_two]\n[GOAL]\ncase h.inl.right.inl.right\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos✝ : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_pos : z = m ^ 2 + n ^ 2\n⊢ (m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0) ∧ 0 ≤ -m\n[PROOFSTEP]\napply And.intro ht4\n[GOAL]\ncase h.inl.right.inl.right\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos✝ : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_pos : z = m ^ 2 + n ^ 2\n⊢ 0 ≤ -m\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h.inl.right.inr\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_neg : z = -(m ^ 2 + n ^ 2)\n⊢ z = m ^ 2 + n ^ 2 ∧ Int.gcd (-m) (-n) = 1 ∧ (-m % 2 = 0 ∧ -n % 2 = 1 ∨ -m % 2 = 1 ∧ -n % 2 = 0) ∧ 0 ≤ -m\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h.inl.right.inr.h\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_neg : z = -(m ^ 2 + n ^ 2)\n⊢ False\n[PROOFSTEP]\nrevert h_pos\n[GOAL]\ncase h.inl.right.inr.h\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_neg : z = -(m ^ 2 + n ^ 2)\n⊢ 0 < z → False\n[PROOFSTEP]\nrw [h_neg]\n[GOAL]\ncase h.inl.right.inr.h\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nm n : ℤ\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_odd : x = m ^ 2 - n ^ 2 ∧ y = 2 * m * n\nh_neg : z = -(m ^ 2 + n ^ 2)\n⊢ 0 < -(m ^ 2 + n ^ 2) → False\n[PROOFSTEP]\nexact imp_false.mpr (not_lt.mpr (neg_nonpos.mpr (add_nonneg (sq_nonneg m) (sq_nonneg n))))\n[GOAL]\ncase h.inr\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_even : x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\n⊢ x = (-m) ^ 2 - (-n) ^ 2 ∧\n    y = 2 * -m * -n ∧\n      z = (-m) ^ 2 + (-n) ^ 2 ∧ Int.gcd (-m) (-n) = 1 ∧ (-m % 2 = 0 ∧ -n % 2 = 1 ∨ -m % 2 = 1 ∧ -n % 2 = 0) ∧ 0 ≤ -m\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h.inr.h\nx✝ y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x✝ y✝ z✝\nx y z : ℤ\nh : PythagoreanTriple x y z\nh_coprime : Int.gcd x y = 1\nh_parity : x % 2 = 1\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh_even : x = 2 * m * n ∧ y = m ^ 2 - n ^ 2\n⊢ False\n[PROOFSTEP]\nrcases h_even with ⟨rfl, -⟩\n[GOAL]\ncase h.inr.h.intro\nx y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x y✝ z✝\ny z : ℤ\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh : PythagoreanTriple (2 * m * n) y z\nh_coprime : Int.gcd (2 * m * n) y = 1\nh_parity : 2 * m * n % 2 = 1\n⊢ False\n[PROOFSTEP]\nrw [mul_assoc, Int.mul_emod_right] at h_parity \n[GOAL]\ncase h.inr.h.intro\nx y✝ z✝ : ℤ\nh✝ : PythagoreanTriple x y✝ z✝\ny z : ℤ\nh_pos : 0 < z\nm n : ℤ\nht2 : z = m ^ 2 + n ^ 2 ∨ z = -(m ^ 2 + n ^ 2)\nht3 : Int.gcd m n = 1\nht4 : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0\nhm : m < 0\nh : PythagoreanTriple (2 * m * n) y z\nh_coprime : Int.gcd (2 * m * n) y = 1\nh_parity : 0 = 1\n⊢ False\n[PROOFSTEP]\nexact zero_ne_one h_parity\n[GOAL]\nx y z : ℤ\nh : PythagoreanTriple x y z\n⊢ PythagoreanTriple x y z ↔\n    ∃ k m n,\n      (x = k * (m ^ 2 - n ^ 2) ∧ y = k * (2 * m * n) ∨ x = k * (2 * m * n) ∧ y = k * (m ^ 2 - n ^ 2)) ∧\n        (z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\nclear h\n[GOAL]\nx y z : ℤ\n⊢ PythagoreanTriple x y z ↔\n    ∃ k m n,\n      (x = k * (m ^ 2 - n ^ 2) ∧ y = k * (2 * m * n) ∨ x = k * (2 * m * n) ∧ y = k * (m ^ 2 - n ^ 2)) ∧\n        (z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nx y z : ℤ\n⊢ PythagoreanTriple x y z →\n    ∃ k m n,\n      (x = k * (m ^ 2 - n ^ 2) ∧ y = k * (2 * m * n) ∨ x = k * (2 * m * n) ∧ y = k * (m ^ 2 - n ^ 2)) ∧\n        (z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nx y z : ℤ\nh : PythagoreanTriple x y z\n⊢ ∃ k m n,\n    (x = k * (m ^ 2 - n ^ 2) ∧ y = k * (2 * m * n) ∨ x = k * (2 * m * n) ∧ y = k * (m ^ 2 - n ^ 2)) ∧\n      (z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\nobtain ⟨k, m, n, H⟩ := h.classified\n[GOAL]\ncase mp.intro.intro.intro\nx y z : ℤ\nh : PythagoreanTriple x y z\nk m n : ℤ\nH : (x = k * (m ^ 2 - n ^ 2) ∧ y = k * (2 * m * n) ∨ x = k * (2 * m * n) ∧ y = k * (m ^ 2 - n ^ 2)) ∧ Int.gcd m n = 1\n⊢ ∃ k m n,\n    (x = k * (m ^ 2 - n ^ 2) ∧ y = k * (2 * m * n) ∨ x = k * (2 * m * n) ∧ y = k * (m ^ 2 - n ^ 2)) ∧\n      (z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\nuse k, m, n\n[GOAL]\ncase h\nx y z : ℤ\nh : PythagoreanTriple x y z\nk m n : ℤ\nH : (x = k * (m ^ 2 - n ^ 2) ∧ y = k * (2 * m * n) ∨ x = k * (2 * m * n) ∧ y = k * (m ^ 2 - n ^ 2)) ∧ Int.gcd m n = 1\n⊢ (x = k * (m ^ 2 - n ^ 2) ∧ y = k * (2 * m * n) ∨ x = k * (2 * m * n) ∧ y = k * (m ^ 2 - n ^ 2)) ∧\n    (z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\nrcases H with (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)\n[GOAL]\ncase h.intro.inl.intro\nz k m n : ℤ\nright✝ : Int.gcd m n = 1\nh : PythagoreanTriple (k * (m ^ 2 - n ^ 2)) (k * (2 * m * n)) z\n⊢ (k * (m ^ 2 - n ^ 2) = k * (m ^ 2 - n ^ 2) ∧ k * (2 * m * n) = k * (2 * m * n) ∨\n      k * (m ^ 2 - n ^ 2) = k * (2 * m * n) ∧ k * (2 * m * n) = k * (m ^ 2 - n ^ 2)) ∧\n    (z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\nrefine' ⟨Or.inl ⟨rfl, rfl⟩, _⟩\n[GOAL]\ncase h.intro.inl.intro\nz k m n : ℤ\nright✝ : Int.gcd m n = 1\nh : PythagoreanTriple (k * (m ^ 2 - n ^ 2)) (k * (2 * m * n)) z\n⊢ z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2)\n[PROOFSTEP]\nhave : z ^ 2 = (k * (m ^ 2 + n ^ 2)) ^ 2 := by\n  rw [sq, ← h.eq]\n  ring\n[GOAL]\nz k m n : ℤ\nright✝ : Int.gcd m n = 1\nh : PythagoreanTriple (k * (m ^ 2 - n ^ 2)) (k * (2 * m * n)) z\n⊢ z ^ 2 = (k * (m ^ 2 + n ^ 2)) ^ 2\n[PROOFSTEP]\nrw [sq, ← h.eq]\n[GOAL]\nz k m n : ℤ\nright✝ : Int.gcd m n = 1\nh : PythagoreanTriple (k * (m ^ 2 - n ^ 2)) (k * (2 * m * n)) z\n⊢ k * (m ^ 2 - n ^ 2) * (k * (m ^ 2 - n ^ 2)) + k * (2 * m * n) * (k * (2 * m * n)) = (k * (m ^ 2 + n ^ 2)) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase h.intro.inl.intro\nz k m n : ℤ\nright✝ : Int.gcd m n = 1\nh : PythagoreanTriple (k * (m ^ 2 - n ^ 2)) (k * (2 * m * n)) z\nthis : z ^ 2 = (k * (m ^ 2 + n ^ 2)) ^ 2\n⊢ z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2)\n[PROOFSTEP]\nsimpa using eq_or_eq_neg_of_sq_eq_sq _ _ this\n[GOAL]\ncase h.intro.inr.intro\nz k m n : ℤ\nright✝ : Int.gcd m n = 1\nh : PythagoreanTriple (k * (2 * m * n)) (k * (m ^ 2 - n ^ 2)) z\n⊢ (k * (2 * m * n) = k * (m ^ 2 - n ^ 2) ∧ k * (m ^ 2 - n ^ 2) = k * (2 * m * n) ∨\n      k * (2 * m * n) = k * (2 * m * n) ∧ k * (m ^ 2 - n ^ 2) = k * (m ^ 2 - n ^ 2)) ∧\n    (z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\nrefine' ⟨Or.inr ⟨rfl, rfl⟩, _⟩\n[GOAL]\ncase h.intro.inr.intro\nz k m n : ℤ\nright✝ : Int.gcd m n = 1\nh : PythagoreanTriple (k * (2 * m * n)) (k * (m ^ 2 - n ^ 2)) z\n⊢ z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2)\n[PROOFSTEP]\nhave : z ^ 2 = (k * (m ^ 2 + n ^ 2)) ^ 2 := by\n  rw [sq, ← h.eq]\n  ring\n[GOAL]\nz k m n : ℤ\nright✝ : Int.gcd m n = 1\nh : PythagoreanTriple (k * (2 * m * n)) (k * (m ^ 2 - n ^ 2)) z\n⊢ z ^ 2 = (k * (m ^ 2 + n ^ 2)) ^ 2\n[PROOFSTEP]\nrw [sq, ← h.eq]\n[GOAL]\nz k m n : ℤ\nright✝ : Int.gcd m n = 1\nh : PythagoreanTriple (k * (2 * m * n)) (k * (m ^ 2 - n ^ 2)) z\n⊢ k * (2 * m * n) * (k * (2 * m * n)) + k * (m ^ 2 - n ^ 2) * (k * (m ^ 2 - n ^ 2)) = (k * (m ^ 2 + n ^ 2)) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase h.intro.inr.intro\nz k m n : ℤ\nright✝ : Int.gcd m n = 1\nh : PythagoreanTriple (k * (2 * m * n)) (k * (m ^ 2 - n ^ 2)) z\nthis : z ^ 2 = (k * (m ^ 2 + n ^ 2)) ^ 2\n⊢ z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2)\n[PROOFSTEP]\nsimpa using eq_or_eq_neg_of_sq_eq_sq _ _ this\n[GOAL]\ncase mpr\nx y z : ℤ\n⊢ (∃ k m n,\n      (x = k * (m ^ 2 - n ^ 2) ∧ y = k * (2 * m * n) ∨ x = k * (2 * m * n) ∧ y = k * (m ^ 2 - n ^ 2)) ∧\n        (z = k * (m ^ 2 + n ^ 2) ∨ z = -k * (m ^ 2 + n ^ 2))) →\n    PythagoreanTriple x y z\n[PROOFSTEP]\nrintro ⟨k, m, n, ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩, rfl | rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.inl.intro.inl\nk m n : ℤ\n⊢ PythagoreanTriple (k * (m ^ 2 - n ^ 2)) (k * (2 * m * n)) (k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\ndelta PythagoreanTriple\n[GOAL]\ncase mpr.intro.intro.intro.intro.inl.intro.inr\nk m n : ℤ\n⊢ PythagoreanTriple (k * (m ^ 2 - n ^ 2)) (k * (2 * m * n)) (-k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\ndelta PythagoreanTriple\n[GOAL]\ncase mpr.intro.intro.intro.intro.inr.intro.inl\nk m n : ℤ\n⊢ PythagoreanTriple (k * (2 * m * n)) (k * (m ^ 2 - n ^ 2)) (k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\ndelta PythagoreanTriple\n[GOAL]\ncase mpr.intro.intro.intro.intro.inr.intro.inr\nk m n : ℤ\n⊢ PythagoreanTriple (k * (2 * m * n)) (k * (m ^ 2 - n ^ 2)) (-k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\ndelta PythagoreanTriple\n[GOAL]\ncase mpr.intro.intro.intro.intro.inl.intro.inl\nk m n : ℤ\n⊢ k * (m ^ 2 - n ^ 2) * (k * (m ^ 2 - n ^ 2)) + k * (2 * m * n) * (k * (2 * m * n)) =\n    k * (m ^ 2 + n ^ 2) * (k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\nring\n[GOAL]\ncase mpr.intro.intro.intro.intro.inl.intro.inr\nk m n : ℤ\n⊢ k * (m ^ 2 - n ^ 2) * (k * (m ^ 2 - n ^ 2)) + k * (2 * m * n) * (k * (2 * m * n)) =\n    -k * (m ^ 2 + n ^ 2) * (-k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\nring\n[GOAL]\ncase mpr.intro.intro.intro.intro.inr.intro.inl\nk m n : ℤ\n⊢ k * (2 * m * n) * (k * (2 * m * n)) + k * (m ^ 2 - n ^ 2) * (k * (m ^ 2 - n ^ 2)) =\n    k * (m ^ 2 + n ^ 2) * (k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\nring\n[GOAL]\ncase mpr.intro.intro.intro.intro.inr.intro.inr\nk m n : ℤ\n⊢ k * (2 * m * n) * (k * (2 * m * n)) + k * (m ^ 2 - n ^ 2) * (k * (m ^ 2 - n ^ 2)) =\n    -k * (m ^ 2 + n ^ 2) * (-k * (m ^ 2 + n ^ 2))\n[PROOFSTEP]\nring\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.PythagoreanTriples", "llama_tokens": 121469, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7154239836484143, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.37167801374125675}}
{"text": "[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y P Q : C\nt : BinaryFan P Q\nI : IsLimit t\ns : Cone (pair Q P)\n⊢ ∀ (j : Discrete WalkingPair),\n    (fun s => lift I (BinaryFan.swap s)) s ≫ NatTrans.app (BinaryFan.swap t).π j = NatTrans.app s.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX Y P Q : C\nt : BinaryFan P Q\nI : IsLimit t\ns : Cone (pair Q P)\n⊢ (fun s => lift I (BinaryFan.swap s)) s ≫ NatTrans.app (BinaryFan.swap t).π { as := WalkingPair.left } =\n    NatTrans.app s.π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX Y P Q : C\nt : BinaryFan P Q\nI : IsLimit t\ns : Cone (pair Q P)\n⊢ (fun s => lift I (BinaryFan.swap s)) s ≫ NatTrans.app (BinaryFan.swap t).π { as := WalkingPair.right } =\n    NatTrans.app s.π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y P Q : C\nt : BinaryFan P Q\nI : IsLimit t\ns : Cone (pair Q P)\nm : s.pt ⟶ (BinaryFan.swap t).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.swap t).π j = NatTrans.app s.π j\n⊢ m = (fun s => lift I (BinaryFan.swap s)) s\n[PROOFSTEP]\nhave h := I.uniq (BinaryFan.swap s) m\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y P Q : C\nt : BinaryFan P Q\nI : IsLimit t\ns : Cone (pair Q P)\nm : s.pt ⟶ (BinaryFan.swap t).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.swap t).π j = NatTrans.app s.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app t.π j = NatTrans.app (BinaryFan.swap s).π j) →\n    m = lift I (BinaryFan.swap s)\n⊢ m = (fun s => lift I (BinaryFan.swap s)) s\n[PROOFSTEP]\nrw [h]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y P Q : C\nt : BinaryFan P Q\nI : IsLimit t\ns : Cone (pair Q P)\nm : s.pt ⟶ (BinaryFan.swap t).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.swap t).π j = NatTrans.app s.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app t.π j = NatTrans.app (BinaryFan.swap s).π j) →\n    m = lift I (BinaryFan.swap s)\n⊢ ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app t.π j = NatTrans.app (BinaryFan.swap s).π j\n[PROOFSTEP]\nrintro ⟨j⟩\n[GOAL]\ncase mk\nC : Type u\ninst✝ : Category.{v, u} C\nX Y P Q : C\nt : BinaryFan P Q\nI : IsLimit t\ns : Cone (pair Q P)\nm : s.pt ⟶ (BinaryFan.swap t).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.swap t).π j = NatTrans.app s.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app t.π j = NatTrans.app (BinaryFan.swap s).π j) →\n    m = lift I (BinaryFan.swap s)\nj : WalkingPair\n⊢ m ≫ NatTrans.app t.π { as := j } = NatTrans.app (BinaryFan.swap s).π { as := j }\n[PROOFSTEP]\nspecialize w ⟨WalkingPair.swap j⟩\n[GOAL]\ncase mk\nC : Type u\ninst✝ : Category.{v, u} C\nX Y P Q : C\nt : BinaryFan P Q\nI : IsLimit t\ns : Cone (pair Q P)\nm : s.pt ⟶ (BinaryFan.swap t).pt\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app t.π j = NatTrans.app (BinaryFan.swap s).π j) →\n    m = lift I (BinaryFan.swap s)\nj : WalkingPair\nw : m ≫ NatTrans.app (BinaryFan.swap t).π { as := ↑WalkingPair.swap j } = NatTrans.app s.π { as := ↑WalkingPair.swap j }\n⊢ m ≫ NatTrans.app t.π { as := j } = NatTrans.app (BinaryFan.swap s).π { as := j }\n[PROOFSTEP]\ncases j\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX Y P Q : C\nt : BinaryFan P Q\nI : IsLimit t\ns : Cone (pair Q P)\nm : s.pt ⟶ (BinaryFan.swap t).pt\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app t.π j = NatTrans.app (BinaryFan.swap s).π j) →\n    m = lift I (BinaryFan.swap s)\nw :\n  m ≫ NatTrans.app (BinaryFan.swap t).π { as := ↑WalkingPair.swap WalkingPair.left } =\n    NatTrans.app s.π { as := ↑WalkingPair.swap WalkingPair.left }\n⊢ m ≫ NatTrans.app t.π { as := WalkingPair.left } = NatTrans.app (BinaryFan.swap s).π { as := WalkingPair.left }\n[PROOFSTEP]\nexact w\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX Y P Q : C\nt : BinaryFan P Q\nI : IsLimit t\ns : Cone (pair Q P)\nm : s.pt ⟶ (BinaryFan.swap t).pt\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app t.π j = NatTrans.app (BinaryFan.swap s).π j) →\n    m = lift I (BinaryFan.swap s)\nw :\n  m ≫ NatTrans.app (BinaryFan.swap t).π { as := ↑WalkingPair.swap WalkingPair.right } =\n    NatTrans.app s.π { as := ↑WalkingPair.swap WalkingPair.right }\n⊢ m ≫ NatTrans.app t.π { as := WalkingPair.right } = NatTrans.app (BinaryFan.swap s).π { as := WalkingPair.right }\n[PROOFSTEP]\nexact w\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\n⊢ ∀ (j : Discrete WalkingPair),\n    (fun t => lift R (BinaryFan.assocInv P t)) t ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\n⊢ (fun t => lift R (BinaryFan.assocInv P t)) t ≫ NatTrans.app (BinaryFan.assoc Q s).π { as := WalkingPair.left } =\n    NatTrans.app t.π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\n⊢ (fun t => lift R (BinaryFan.assocInv P t)) t ≫ NatTrans.app (BinaryFan.assoc Q s).π { as := WalkingPair.right } =\n    NatTrans.app t.π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\n⊢ lift R (BinaryFan.assocInv P t) ≫ lift Q (BinaryFan.mk (BinaryFan.fst s ≫ BinaryFan.snd sXY) (BinaryFan.snd s)) =\n    BinaryFan.snd t\n[PROOFSTEP]\napply Q.hom_ext\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\n⊢ ∀ (j : Discrete WalkingPair),\n    (lift R (BinaryFan.assocInv P t) ≫ lift Q (BinaryFan.mk (BinaryFan.fst s ≫ BinaryFan.snd sXY) (BinaryFan.snd s))) ≫\n        NatTrans.app sYZ.π j =\n      BinaryFan.snd t ≫ NatTrans.app sYZ.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.right.mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\n⊢ (lift R (BinaryFan.assocInv P t) ≫ lift Q (BinaryFan.mk (BinaryFan.fst s ≫ BinaryFan.snd sXY) (BinaryFan.snd s))) ≫\n      NatTrans.app sYZ.π { as := WalkingPair.left } =\n    BinaryFan.snd t ≫ NatTrans.app sYZ.π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right.mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\n⊢ (lift R (BinaryFan.assocInv P t) ≫ lift Q (BinaryFan.mk (BinaryFan.fst s ≫ BinaryFan.snd sXY) (BinaryFan.snd s))) ≫\n      NatTrans.app sYZ.π { as := WalkingPair.right } =\n    BinaryFan.snd t ≫ NatTrans.app sYZ.π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\n⊢ m = (fun t => lift R (BinaryFan.assocInv P t)) t\n[PROOFSTEP]\nhave h := R.uniq (BinaryFan.assocInv P t) m\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\n⊢ m = (fun t => lift R (BinaryFan.assocInv P t)) t\n[PROOFSTEP]\nrw [h]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\n⊢ ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\n⊢ m ≫ NatTrans.app s.π { as := WalkingPair.left } = NatTrans.app (BinaryFan.assocInv P t).π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\n⊢ m ≫ NatTrans.app s.π { as := WalkingPair.right } = NatTrans.app (BinaryFan.assocInv P t).π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\n⊢ m ≫ BinaryFan.fst s = lift P (BinaryFan.mk (BinaryFan.fst t) (BinaryFan.snd t ≫ BinaryFan.fst sYZ))\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\n⊢ m ≫ BinaryFan.snd s = BinaryFan.snd t ≫ BinaryFan.snd sYZ\n[PROOFSTEP]\napply P.hom_ext\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\n⊢ ∀ (j : Discrete WalkingPair),\n    (m ≫ BinaryFan.fst s) ≫ NatTrans.app sXY.π j =\n      lift P (BinaryFan.mk (BinaryFan.fst t) (BinaryFan.snd t ≫ BinaryFan.fst sYZ)) ≫ NatTrans.app sXY.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.left.mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\n⊢ (m ≫ BinaryFan.fst s) ≫ NatTrans.app sXY.π { as := WalkingPair.left } =\n    lift P (BinaryFan.mk (BinaryFan.fst t) (BinaryFan.snd t ≫ BinaryFan.fst sYZ)) ≫\n      NatTrans.app sXY.π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.left.mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\n⊢ (m ≫ BinaryFan.fst s) ≫ NatTrans.app sXY.π { as := WalkingPair.right } =\n    lift P (BinaryFan.mk (BinaryFan.fst t) (BinaryFan.snd t ≫ BinaryFan.fst sYZ)) ≫\n      NatTrans.app sXY.π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.left.mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\n⊢ m ≫ BinaryFan.fst s ≫ BinaryFan.fst sXY = BinaryFan.fst t\n[PROOFSTEP]\nexact w ⟨WalkingPair.left⟩\n[GOAL]\ncase mk.left.mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\n⊢ m ≫ BinaryFan.fst s ≫ BinaryFan.snd sXY = BinaryFan.snd t ≫ BinaryFan.fst sYZ\n[PROOFSTEP]\nspecialize w ⟨WalkingPair.right⟩\n[GOAL]\ncase mk.left.mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\nw : m ≫ NatTrans.app (BinaryFan.assoc Q s).π { as := WalkingPair.right } = NatTrans.app t.π { as := WalkingPair.right }\n⊢ m ≫ BinaryFan.fst s ≫ BinaryFan.snd sXY = BinaryFan.snd t ≫ BinaryFan.fst sYZ\n[PROOFSTEP]\nsimp at w \n[GOAL]\ncase mk.left.mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\nw : m ≫ lift Q (BinaryFan.mk (BinaryFan.fst s ≫ BinaryFan.snd sXY) (BinaryFan.snd s)) = BinaryFan.snd t\n⊢ m ≫ BinaryFan.fst s ≫ BinaryFan.snd sXY = BinaryFan.snd t ≫ BinaryFan.fst sYZ\n[PROOFSTEP]\nrw [← w]\n[GOAL]\ncase mk.left.mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\nw : m ≫ lift Q (BinaryFan.mk (BinaryFan.fst s ≫ BinaryFan.snd sXY) (BinaryFan.snd s)) = BinaryFan.snd t\n⊢ m ≫ BinaryFan.fst s ≫ BinaryFan.snd sXY =\n    (m ≫ lift Q (BinaryFan.mk (BinaryFan.fst s ≫ BinaryFan.snd sXY) (BinaryFan.snd s))) ≫ BinaryFan.fst sYZ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nw : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (BinaryFan.assoc Q s).π j = NatTrans.app t.π j\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\n⊢ m ≫ BinaryFan.snd s = BinaryFan.snd t ≫ BinaryFan.snd sYZ\n[PROOFSTEP]\nspecialize w ⟨WalkingPair.right⟩\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\nw : m ≫ NatTrans.app (BinaryFan.assoc Q s).π { as := WalkingPair.right } = NatTrans.app t.π { as := WalkingPair.right }\n⊢ m ≫ BinaryFan.snd s = BinaryFan.snd t ≫ BinaryFan.snd sYZ\n[PROOFSTEP]\nsimp at w \n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\nw : m ≫ lift Q (BinaryFan.mk (BinaryFan.fst s ≫ BinaryFan.snd sXY) (BinaryFan.snd s)) = BinaryFan.snd t\n⊢ m ≫ BinaryFan.snd s = BinaryFan.snd t ≫ BinaryFan.snd sYZ\n[PROOFSTEP]\nrw [← w]\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y Z : C\nsXY : BinaryFan X Y\nP : IsLimit sXY\nsYZ : BinaryFan Y Z\nQ : IsLimit sYZ\ns : BinaryFan sXY.pt Z\nR : IsLimit s\nt : Cone (pair X sYZ.pt)\nm : t.pt ⟶ (BinaryFan.assoc Q s).pt\nh :\n  (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app s.π j = NatTrans.app (BinaryFan.assocInv P t).π j) →\n    m = lift R (BinaryFan.assocInv P t)\nw : m ≫ lift Q (BinaryFan.mk (BinaryFan.fst s ≫ BinaryFan.snd sXY) (BinaryFan.snd s)) = BinaryFan.snd t\n⊢ m ≫ BinaryFan.snd s =\n    (m ≫ lift Q (BinaryFan.mk (BinaryFan.fst s ≫ BinaryFan.snd sXY) (BinaryFan.snd s))) ≫ BinaryFan.snd sYZ\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y X : C\ns : Cone (Functor.empty C)\nP : IsLimit s\nt : BinaryFan s.pt X\nQ : IsLimit t\n⊢ snd t ≫\n      IsLimit.lift Q\n        (mk\n          (IsLimit.lift P\n            { pt := X,\n              π :=\n                NatTrans.mk fun x =>\n                  Discrete.rec\n                    (fun x =>\n                      PEmpty.rec\n                        (fun x =>\n                          (x : PEmpty) →\n                            ((Functor.const (Discrete PEmpty)).obj X).obj { as := x } ⟶\n                              (Functor.empty C).obj { as := x })\n                        x x)\n                    x })\n          (𝟙 X)) =\n    𝟙 t.pt\n[PROOFSTEP]\napply Q.hom_ext\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y X : C\ns : Cone (Functor.empty C)\nP : IsLimit s\nt : BinaryFan s.pt X\nQ : IsLimit t\n⊢ ∀ (j : Discrete WalkingPair),\n    (snd t ≫\n          IsLimit.lift Q\n            (mk\n              (IsLimit.lift P\n                { pt := X,\n                  π :=\n                    NatTrans.mk fun x =>\n                      Discrete.rec\n                        (fun x =>\n                          PEmpty.rec\n                            (fun x =>\n                              (x : PEmpty) →\n                                ((Functor.const (Discrete PEmpty)).obj X).obj { as := x } ⟶\n                                  (Functor.empty C).obj { as := x })\n                            x x)\n                        x })\n              (𝟙 X))) ≫\n        NatTrans.app t.π j =\n      𝟙 t.pt ≫ NatTrans.app t.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y X : C\ns : Cone (Functor.empty C)\nP : IsLimit s\nt : BinaryFan s.pt X\nQ : IsLimit t\n⊢ (snd t ≫\n        IsLimit.lift Q\n          (mk\n            (IsLimit.lift P\n              { pt := X,\n                π :=\n                  NatTrans.mk fun x =>\n                    Discrete.rec\n                      (fun x =>\n                        PEmpty.rec\n                          (fun x =>\n                            (x : PEmpty) →\n                              ((Functor.const (Discrete PEmpty)).obj X).obj { as := x } ⟶\n                                (Functor.empty C).obj { as := x })\n                          x x)\n                      x })\n            (𝟙 X))) ≫\n      NatTrans.app t.π { as := WalkingPair.left } =\n    𝟙 t.pt ≫ NatTrans.app t.π { as := WalkingPair.left }\n[PROOFSTEP]\napply P.hom_ext\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y X : C\ns : Cone (Functor.empty C)\nP : IsLimit s\nt : BinaryFan s.pt X\nQ : IsLimit t\n⊢ ∀ (j : Discrete PEmpty),\n    ((snd t ≫\n            IsLimit.lift Q\n              (mk\n                (IsLimit.lift P\n                  { pt := X,\n                    π :=\n                      NatTrans.mk fun x =>\n                        Discrete.rec\n                          (fun x =>\n                            PEmpty.rec\n                              (fun x =>\n                                (x : PEmpty) →\n                                  ((Functor.const (Discrete PEmpty)).obj X).obj { as := x } ⟶\n                                    (Functor.empty C).obj { as := x })\n                              x x)\n                          x })\n                (𝟙 X))) ≫\n          NatTrans.app t.π { as := WalkingPair.left }) ≫\n        NatTrans.app s.π j =\n      (𝟙 t.pt ≫ NatTrans.app t.π { as := WalkingPair.left }) ≫ NatTrans.app s.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y X : C\ns : Cone (Functor.empty C)\nP : IsLimit s\nt : BinaryFan s.pt X\nQ : IsLimit t\n⊢ (snd t ≫\n        IsLimit.lift Q\n          (mk\n            (IsLimit.lift P\n              { pt := X,\n                π :=\n                  NatTrans.mk fun x =>\n                    Discrete.rec\n                      (fun x =>\n                        PEmpty.rec\n                          (fun x =>\n                            (x : PEmpty) →\n                              ((Functor.const (Discrete PEmpty)).obj X).obj { as := x } ⟶\n                                (Functor.empty C).obj { as := x })\n                          x x)\n                      x })\n            (𝟙 X))) ≫\n      NatTrans.app t.π { as := WalkingPair.right } =\n    𝟙 t.pt ≫ NatTrans.app t.π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y X : C\ns : Cone (Functor.empty C)\nP : IsLimit s\nt : BinaryFan X s.pt\nQ : IsLimit t\n⊢ fst t ≫\n      IsLimit.lift Q\n        (mk (𝟙 X)\n          (IsLimit.lift P\n            { pt := X,\n              π :=\n                NatTrans.mk fun x =>\n                  Discrete.rec\n                    (fun x =>\n                      PEmpty.rec\n                        (fun x =>\n                          (x : PEmpty) →\n                            ((Functor.const (Discrete PEmpty)).obj X).obj { as := x } ⟶\n                              (Functor.empty C).obj { as := x })\n                        x x)\n                    x })) =\n    𝟙 t.pt\n[PROOFSTEP]\napply Q.hom_ext\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y X : C\ns : Cone (Functor.empty C)\nP : IsLimit s\nt : BinaryFan X s.pt\nQ : IsLimit t\n⊢ ∀ (j : Discrete WalkingPair),\n    (fst t ≫\n          IsLimit.lift Q\n            (mk (𝟙 X)\n              (IsLimit.lift P\n                { pt := X,\n                  π :=\n                    NatTrans.mk fun x =>\n                      Discrete.rec\n                        (fun x =>\n                          PEmpty.rec\n                            (fun x =>\n                              (x : PEmpty) →\n                                ((Functor.const (Discrete PEmpty)).obj X).obj { as := x } ⟶\n                                  (Functor.empty C).obj { as := x })\n                            x x)\n                        x }))) ≫\n        NatTrans.app t.π j =\n      𝟙 t.pt ≫ NatTrans.app t.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y X : C\ns : Cone (Functor.empty C)\nP : IsLimit s\nt : BinaryFan X s.pt\nQ : IsLimit t\n⊢ (fst t ≫\n        IsLimit.lift Q\n          (mk (𝟙 X)\n            (IsLimit.lift P\n              { pt := X,\n                π :=\n                  NatTrans.mk fun x =>\n                    Discrete.rec\n                      (fun x =>\n                        PEmpty.rec\n                          (fun x =>\n                            (x : PEmpty) →\n                              ((Functor.const (Discrete PEmpty)).obj X).obj { as := x } ⟶\n                                (Functor.empty C).obj { as := x })\n                          x x)\n                      x }))) ≫\n      NatTrans.app t.π { as := WalkingPair.left } =\n    𝟙 t.pt ≫ NatTrans.app t.π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y X : C\ns : Cone (Functor.empty C)\nP : IsLimit s\nt : BinaryFan X s.pt\nQ : IsLimit t\n⊢ (fst t ≫\n        IsLimit.lift Q\n          (mk (𝟙 X)\n            (IsLimit.lift P\n              { pt := X,\n                π :=\n                  NatTrans.mk fun x =>\n                    Discrete.rec\n                      (fun x =>\n                        PEmpty.rec\n                          (fun x =>\n                            (x : PEmpty) →\n                              ((Functor.const (Discrete PEmpty)).obj X).obj { as := x } ⟶\n                                (Functor.empty C).obj { as := x })\n                          x x)\n                      x }))) ≫\n      NatTrans.app t.π { as := WalkingPair.right } =\n    𝟙 t.pt ≫ NatTrans.app t.π { as := WalkingPair.right }\n[PROOFSTEP]\napply P.hom_ext\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y X : C\ns : Cone (Functor.empty C)\nP : IsLimit s\nt : BinaryFan X s.pt\nQ : IsLimit t\n⊢ ∀ (j : Discrete PEmpty),\n    ((fst t ≫\n            IsLimit.lift Q\n              (mk (𝟙 X)\n                (IsLimit.lift P\n                  { pt := X,\n                    π :=\n                      NatTrans.mk fun x =>\n                        Discrete.rec\n                          (fun x =>\n                            PEmpty.rec\n                              (fun x =>\n                                (x : PEmpty) →\n                                  ((Functor.const (Discrete PEmpty)).obj X).obj { as := x } ⟶\n                                    (Functor.empty C).obj { as := x })\n                              x x)\n                          x }))) ≫\n          NatTrans.app t.π { as := WalkingPair.right }) ≫\n        NatTrans.app s.π j =\n      (𝟙 t.pt ≫ NatTrans.app t.π { as := WalkingPair.right }) ≫ NatTrans.app s.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ : C\n⊢ tensorHom ℬ (𝟙 X₁) (𝟙 X₂) = 𝟙 (tensorObj ℬ X₁ X₂)\n[PROOFSTEP]\napply IsLimit.hom_ext (ℬ _ _).isLimit\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ : C\n⊢ ∀ (j : Discrete WalkingPair),\n    tensorHom ℬ (𝟙 X₁) (𝟙 X₂) ≫ NatTrans.app (ℬ X₁ X₂).cone.π j =\n      𝟙 (tensorObj ℬ X₁ X₂) ≫ NatTrans.app (ℬ X₁ X₂).cone.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ : C\n⊢ tensorHom ℬ (𝟙 X₁) (𝟙 X₂) ≫ NatTrans.app (ℬ X₁ X₂).cone.π { as := WalkingPair.left } =\n    𝟙 (tensorObj ℬ X₁ X₂) ≫ NatTrans.app (ℬ X₁ X₂).cone.π { as := WalkingPair.left }\n[PROOFSTEP]\ndsimp [tensorHom]\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ : C\n⊢ IsLimit.lift (ℬ X₁ X₂).isLimit\n        (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ 𝟙 X₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ 𝟙 X₂)) ≫\n      BinaryFan.fst (ℬ X₁ X₂).cone =\n    𝟙 (tensorObj ℬ X₁ X₂) ≫ BinaryFan.fst (ℬ X₁ X₂).cone\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ : C\n⊢ tensorHom ℬ (𝟙 X₁) (𝟙 X₂) ≫ NatTrans.app (ℬ X₁ X₂).cone.π { as := WalkingPair.right } =\n    𝟙 (tensorObj ℬ X₁ X₂) ≫ NatTrans.app (ℬ X₁ X₂).cone.π { as := WalkingPair.right }\n[PROOFSTEP]\ndsimp [tensorHom]\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ : C\n⊢ IsLimit.lift (ℬ X₁ X₂).isLimit\n        (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ 𝟙 X₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ 𝟙 X₂)) ≫\n      BinaryFan.snd (ℬ X₁ X₂).cone =\n    𝟙 (tensorObj ℬ X₁ X₂) ≫ BinaryFan.snd (ℬ X₁ X₂).cone\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ Y₁ Z₁ X₂ Y₂ Z₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : Y₁ ⟶ Z₁\ng₂ : Y₂ ⟶ Z₂\n⊢ tensorHom ℬ (f₁ ≫ g₁) (f₂ ≫ g₂) = tensorHom ℬ f₁ f₂ ≫ tensorHom ℬ g₁ g₂\n[PROOFSTEP]\napply IsLimit.hom_ext (ℬ _ _).isLimit\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ Y₁ Z₁ X₂ Y₂ Z₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : Y₁ ⟶ Z₁\ng₂ : Y₂ ⟶ Z₂\n⊢ ∀ (j : Discrete WalkingPair),\n    tensorHom ℬ (f₁ ≫ g₁) (f₂ ≫ g₂) ≫ NatTrans.app (ℬ Z₁ Z₂).cone.π j =\n      (tensorHom ℬ f₁ f₂ ≫ tensorHom ℬ g₁ g₂) ≫ NatTrans.app (ℬ Z₁ Z₂).cone.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ Y₁ Z₁ X₂ Y₂ Z₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : Y₁ ⟶ Z₁\ng₂ : Y₂ ⟶ Z₂\n⊢ tensorHom ℬ (f₁ ≫ g₁) (f₂ ≫ g₂) ≫ NatTrans.app (ℬ Z₁ Z₂).cone.π { as := WalkingPair.left } =\n    (tensorHom ℬ f₁ f₂ ≫ tensorHom ℬ g₁ g₂) ≫ NatTrans.app (ℬ Z₁ Z₂).cone.π { as := WalkingPair.left }\n[PROOFSTEP]\ndsimp [tensorHom]\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ Y₁ Z₁ X₂ Y₂ Z₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : Y₁ ⟶ Z₁\ng₂ : Y₂ ⟶ Z₂\n⊢ IsLimit.lift (ℬ Z₁ Z₂).isLimit\n        (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ f₁ ≫ g₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ f₂ ≫ g₂)) ≫\n      BinaryFan.fst (ℬ Z₁ Z₂).cone =\n    (IsLimit.lift (ℬ Y₁ Y₂).isLimit\n          (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ f₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ f₂)) ≫\n        IsLimit.lift (ℬ Z₁ Z₂).isLimit\n          (BinaryFan.mk (BinaryFan.fst (ℬ Y₁ Y₂).cone ≫ g₁) (BinaryFan.snd (ℬ Y₁ Y₂).cone ≫ g₂))) ≫\n      BinaryFan.fst (ℬ Z₁ Z₂).cone\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ Y₁ Z₁ X₂ Y₂ Z₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : Y₁ ⟶ Z₁\ng₂ : Y₂ ⟶ Z₂\n⊢ tensorHom ℬ (f₁ ≫ g₁) (f₂ ≫ g₂) ≫ NatTrans.app (ℬ Z₁ Z₂).cone.π { as := WalkingPair.right } =\n    (tensorHom ℬ f₁ f₂ ≫ tensorHom ℬ g₁ g₂) ≫ NatTrans.app (ℬ Z₁ Z₂).cone.π { as := WalkingPair.right }\n[PROOFSTEP]\ndsimp [tensorHom]\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ Y₁ Z₁ X₂ Y₂ Z₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : Y₁ ⟶ Z₁\ng₂ : Y₂ ⟶ Z₂\n⊢ IsLimit.lift (ℬ Z₁ Z₂).isLimit\n        (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ f₁ ≫ g₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ f₂ ≫ g₂)) ≫\n      BinaryFan.snd (ℬ Z₁ Z₂).cone =\n    (IsLimit.lift (ℬ Y₁ Y₂).isLimit\n          (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ f₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ f₂)) ≫\n        IsLimit.lift (ℬ Z₁ Z₂).isLimit\n          (BinaryFan.mk (BinaryFan.fst (ℬ Y₁ Y₂).cone ≫ g₁) (BinaryFan.snd (ℬ Y₁ Y₂).cone ≫ g₂))) ≫\n      BinaryFan.snd (ℬ Z₁ Z₂).cone\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nW X Y Z : C\n⊢ tensorHom ℬ (BinaryFan.associatorOfLimitCone ℬ W X Y).hom (𝟙 Z) ≫\n      (BinaryFan.associatorOfLimitCone ℬ W (tensorObj ℬ X Y) Z).hom ≫\n        tensorHom ℬ (𝟙 W) (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom =\n    (BinaryFan.associatorOfLimitCone ℬ (tensorObj ℬ W X) Y Z).hom ≫\n      (BinaryFan.associatorOfLimitCone ℬ W X (tensorObj ℬ Y Z)).hom\n[PROOFSTEP]\ndsimp [tensorHom]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nW X Y Z : C\n⊢ IsLimit.lift (ℬ (ℬ W (ℬ X Y).cone.pt).cone.pt Z).isLimit\n        (BinaryFan.mk\n          (BinaryFan.fst (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ (BinaryFan.associatorOfLimitCone ℬ W X Y).hom)\n          (BinaryFan.snd (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ 𝟙 Z)) ≫\n      (BinaryFan.associatorOfLimitCone ℬ W (tensorObj ℬ X Y) Z).hom ≫\n        IsLimit.lift (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).isLimit\n          (BinaryFan.mk (BinaryFan.fst (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫ 𝟙 W)\n            (BinaryFan.snd (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫\n              (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom)) =\n    (BinaryFan.associatorOfLimitCone ℬ (tensorObj ℬ W X) Y Z).hom ≫\n      (BinaryFan.associatorOfLimitCone ℬ W X (tensorObj ℬ Y Z)).hom\n[PROOFSTEP]\napply IsLimit.hom_ext (ℬ _ _).isLimit\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nW X Y Z : C\n⊢ ∀ (j : Discrete WalkingPair),\n    (IsLimit.lift (ℬ (ℬ W (ℬ X Y).cone.pt).cone.pt Z).isLimit\n            (BinaryFan.mk\n              (BinaryFan.fst (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ (BinaryFan.associatorOfLimitCone ℬ W X Y).hom)\n              (BinaryFan.snd (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ 𝟙 Z)) ≫\n          (BinaryFan.associatorOfLimitCone ℬ W (tensorObj ℬ X Y) Z).hom ≫\n            IsLimit.lift (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).isLimit\n              (BinaryFan.mk (BinaryFan.fst (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫ 𝟙 W)\n                (BinaryFan.snd (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫\n                  (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom))) ≫\n        NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π j =\n      ((BinaryFan.associatorOfLimitCone ℬ (tensorObj ℬ W X) Y Z).hom ≫\n          (BinaryFan.associatorOfLimitCone ℬ W X (tensorObj ℬ Y Z)).hom) ≫\n        NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nW X Y Z : C\n⊢ (IsLimit.lift (ℬ (ℬ W (ℬ X Y).cone.pt).cone.pt Z).isLimit\n          (BinaryFan.mk\n            (BinaryFan.fst (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ (BinaryFan.associatorOfLimitCone ℬ W X Y).hom)\n            (BinaryFan.snd (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ 𝟙 Z)) ≫\n        (BinaryFan.associatorOfLimitCone ℬ W (tensorObj ℬ X Y) Z).hom ≫\n          IsLimit.lift (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).isLimit\n            (BinaryFan.mk (BinaryFan.fst (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫ 𝟙 W)\n              (BinaryFan.snd (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫\n                (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom))) ≫\n      NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.left } =\n    ((BinaryFan.associatorOfLimitCone ℬ (tensorObj ℬ W X) Y Z).hom ≫\n        (BinaryFan.associatorOfLimitCone ℬ W X (tensorObj ℬ Y Z)).hom) ≫\n      NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nW X Y Z : C\n⊢ (IsLimit.lift (ℬ (ℬ W (ℬ X Y).cone.pt).cone.pt Z).isLimit\n          (BinaryFan.mk\n            (BinaryFan.fst (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ (BinaryFan.associatorOfLimitCone ℬ W X Y).hom)\n            (BinaryFan.snd (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ 𝟙 Z)) ≫\n        (BinaryFan.associatorOfLimitCone ℬ W (tensorObj ℬ X Y) Z).hom ≫\n          IsLimit.lift (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).isLimit\n            (BinaryFan.mk (BinaryFan.fst (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫ 𝟙 W)\n              (BinaryFan.snd (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫\n                (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom))) ≫\n      NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right } =\n    ((BinaryFan.associatorOfLimitCone ℬ (tensorObj ℬ W X) Y Z).hom ≫\n        (BinaryFan.associatorOfLimitCone ℬ W X (tensorObj ℬ Y Z)).hom) ≫\n      NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }\n[PROOFSTEP]\napply IsLimit.hom_ext (ℬ _ _).isLimit\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nW X Y Z : C\n⊢ ∀ (j : Discrete WalkingPair),\n    ((IsLimit.lift (ℬ (ℬ W (ℬ X Y).cone.pt).cone.pt Z).isLimit\n              (BinaryFan.mk\n                (BinaryFan.fst (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ (BinaryFan.associatorOfLimitCone ℬ W X Y).hom)\n                (BinaryFan.snd (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ 𝟙 Z)) ≫\n            (BinaryFan.associatorOfLimitCone ℬ W (tensorObj ℬ X Y) Z).hom ≫\n              IsLimit.lift (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).isLimit\n                (BinaryFan.mk (BinaryFan.fst (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫ 𝟙 W)\n                  (BinaryFan.snd (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫\n                    (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom))) ≫\n          NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }) ≫\n        NatTrans.app (ℬ X (ℬ Y Z).cone.pt).cone.π j =\n      (((BinaryFan.associatorOfLimitCone ℬ (tensorObj ℬ W X) Y Z).hom ≫\n            (BinaryFan.associatorOfLimitCone ℬ W X (tensorObj ℬ Y Z)).hom) ≫\n          NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }) ≫\n        NatTrans.app (ℬ X (ℬ Y Z).cone.pt).cone.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.right.mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nW X Y Z : C\n⊢ ((IsLimit.lift (ℬ (ℬ W (ℬ X Y).cone.pt).cone.pt Z).isLimit\n            (BinaryFan.mk\n              (BinaryFan.fst (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ (BinaryFan.associatorOfLimitCone ℬ W X Y).hom)\n              (BinaryFan.snd (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ 𝟙 Z)) ≫\n          (BinaryFan.associatorOfLimitCone ℬ W (tensorObj ℬ X Y) Z).hom ≫\n            IsLimit.lift (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).isLimit\n              (BinaryFan.mk (BinaryFan.fst (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫ 𝟙 W)\n                (BinaryFan.snd (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫\n                  (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom))) ≫\n        NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }) ≫\n      NatTrans.app (ℬ X (ℬ Y Z).cone.pt).cone.π { as := WalkingPair.left } =\n    (((BinaryFan.associatorOfLimitCone ℬ (tensorObj ℬ W X) Y Z).hom ≫\n          (BinaryFan.associatorOfLimitCone ℬ W X (tensorObj ℬ Y Z)).hom) ≫\n        NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }) ≫\n      NatTrans.app (ℬ X (ℬ Y Z).cone.pt).cone.π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right.mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nW X Y Z : C\n⊢ ((IsLimit.lift (ℬ (ℬ W (ℬ X Y).cone.pt).cone.pt Z).isLimit\n            (BinaryFan.mk\n              (BinaryFan.fst (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ (BinaryFan.associatorOfLimitCone ℬ W X Y).hom)\n              (BinaryFan.snd (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ 𝟙 Z)) ≫\n          (BinaryFan.associatorOfLimitCone ℬ W (tensorObj ℬ X Y) Z).hom ≫\n            IsLimit.lift (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).isLimit\n              (BinaryFan.mk (BinaryFan.fst (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫ 𝟙 W)\n                (BinaryFan.snd (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫\n                  (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom))) ≫\n        NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }) ≫\n      NatTrans.app (ℬ X (ℬ Y Z).cone.pt).cone.π { as := WalkingPair.right } =\n    (((BinaryFan.associatorOfLimitCone ℬ (tensorObj ℬ W X) Y Z).hom ≫\n          (BinaryFan.associatorOfLimitCone ℬ W X (tensorObj ℬ Y Z)).hom) ≫\n        NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }) ≫\n      NatTrans.app (ℬ X (ℬ Y Z).cone.pt).cone.π { as := WalkingPair.right }\n[PROOFSTEP]\napply IsLimit.hom_ext (ℬ _ _).isLimit\n[GOAL]\ncase mk.right.mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nW X Y Z : C\n⊢ ∀ (j : Discrete WalkingPair),\n    (((IsLimit.lift (ℬ (ℬ W (ℬ X Y).cone.pt).cone.pt Z).isLimit\n                (BinaryFan.mk\n                  (BinaryFan.fst (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫\n                    (BinaryFan.associatorOfLimitCone ℬ W X Y).hom)\n                  (BinaryFan.snd (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ 𝟙 Z)) ≫\n              (BinaryFan.associatorOfLimitCone ℬ W (tensorObj ℬ X Y) Z).hom ≫\n                IsLimit.lift (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).isLimit\n                  (BinaryFan.mk (BinaryFan.fst (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫ 𝟙 W)\n                    (BinaryFan.snd (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫\n                      (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom))) ≫\n            NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }) ≫\n          NatTrans.app (ℬ X (ℬ Y Z).cone.pt).cone.π { as := WalkingPair.right }) ≫\n        NatTrans.app (ℬ Y Z).cone.π j =\n      ((((BinaryFan.associatorOfLimitCone ℬ (tensorObj ℬ W X) Y Z).hom ≫\n              (BinaryFan.associatorOfLimitCone ℬ W X (tensorObj ℬ Y Z)).hom) ≫\n            NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }) ≫\n          NatTrans.app (ℬ X (ℬ Y Z).cone.pt).cone.π { as := WalkingPair.right }) ≫\n        NatTrans.app (ℬ Y Z).cone.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.right.mk.right.mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nW X Y Z : C\n⊢ (((IsLimit.lift (ℬ (ℬ W (ℬ X Y).cone.pt).cone.pt Z).isLimit\n              (BinaryFan.mk\n                (BinaryFan.fst (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ (BinaryFan.associatorOfLimitCone ℬ W X Y).hom)\n                (BinaryFan.snd (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ 𝟙 Z)) ≫\n            (BinaryFan.associatorOfLimitCone ℬ W (tensorObj ℬ X Y) Z).hom ≫\n              IsLimit.lift (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).isLimit\n                (BinaryFan.mk (BinaryFan.fst (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫ 𝟙 W)\n                  (BinaryFan.snd (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫\n                    (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom))) ≫\n          NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }) ≫\n        NatTrans.app (ℬ X (ℬ Y Z).cone.pt).cone.π { as := WalkingPair.right }) ≫\n      NatTrans.app (ℬ Y Z).cone.π { as := WalkingPair.left } =\n    ((((BinaryFan.associatorOfLimitCone ℬ (tensorObj ℬ W X) Y Z).hom ≫\n            (BinaryFan.associatorOfLimitCone ℬ W X (tensorObj ℬ Y Z)).hom) ≫\n          NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }) ≫\n        NatTrans.app (ℬ X (ℬ Y Z).cone.pt).cone.π { as := WalkingPair.right }) ≫\n      NatTrans.app (ℬ Y Z).cone.π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right.mk.right.mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nW X Y Z : C\n⊢ (((IsLimit.lift (ℬ (ℬ W (ℬ X Y).cone.pt).cone.pt Z).isLimit\n              (BinaryFan.mk\n                (BinaryFan.fst (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ (BinaryFan.associatorOfLimitCone ℬ W X Y).hom)\n                (BinaryFan.snd (ℬ (ℬ (ℬ W X).cone.pt Y).cone.pt Z).cone ≫ 𝟙 Z)) ≫\n            (BinaryFan.associatorOfLimitCone ℬ W (tensorObj ℬ X Y) Z).hom ≫\n              IsLimit.lift (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).isLimit\n                (BinaryFan.mk (BinaryFan.fst (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫ 𝟙 W)\n                  (BinaryFan.snd (ℬ W (ℬ (tensorObj ℬ X Y) Z).cone.pt).cone ≫\n                    (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom))) ≫\n          NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }) ≫\n        NatTrans.app (ℬ X (ℬ Y Z).cone.pt).cone.π { as := WalkingPair.right }) ≫\n      NatTrans.app (ℬ Y Z).cone.π { as := WalkingPair.right } =\n    ((((BinaryFan.associatorOfLimitCone ℬ (tensorObj ℬ W X) Y Z).hom ≫\n            (BinaryFan.associatorOfLimitCone ℬ W X (tensorObj ℬ Y Z)).hom) ≫\n          NatTrans.app (ℬ W (ℬ X (ℬ Y Z).cone.pt).cone.pt).cone.π { as := WalkingPair.right }) ≫\n        NatTrans.app (ℬ X (ℬ Y Z).cone.pt).cone.π { as := WalkingPair.right }) ≫\n      NatTrans.app (ℬ Y Z).cone.π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX Y : C\n⊢ (BinaryFan.associatorOfLimitCone ℬ X 𝒯.cone.pt Y).hom ≫\n      tensorHom ℬ (𝟙 X) (BinaryFan.leftUnitor 𝒯.isLimit (ℬ 𝒯.cone.pt Y).isLimit).hom =\n    tensorHom ℬ (BinaryFan.rightUnitor 𝒯.isLimit (ℬ X 𝒯.cone.pt).isLimit).hom (𝟙 Y)\n[PROOFSTEP]\ndsimp [tensorHom]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX Y : C\n⊢ (BinaryFan.associatorOfLimitCone ℬ X 𝒯.cone.pt Y).hom ≫\n      IsLimit.lift (ℬ X Y).isLimit\n        (BinaryFan.mk (BinaryFan.fst (ℬ X (ℬ 𝒯.cone.pt Y).cone.pt).cone ≫ 𝟙 X)\n          (BinaryFan.snd (ℬ X (ℬ 𝒯.cone.pt Y).cone.pt).cone ≫ BinaryFan.snd (ℬ 𝒯.cone.pt Y).cone)) =\n    IsLimit.lift (ℬ X Y).isLimit\n      (BinaryFan.mk (BinaryFan.fst (ℬ (ℬ X 𝒯.cone.pt).cone.pt Y).cone ≫ BinaryFan.fst (ℬ X 𝒯.cone.pt).cone)\n        (BinaryFan.snd (ℬ (ℬ X 𝒯.cone.pt).cone.pt Y).cone ≫ 𝟙 Y))\n[PROOFSTEP]\napply IsLimit.hom_ext (ℬ _ _).isLimit\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX Y : C\n⊢ ∀ (j : Discrete WalkingPair),\n    ((BinaryFan.associatorOfLimitCone ℬ X 𝒯.cone.pt Y).hom ≫\n          IsLimit.lift (ℬ X Y).isLimit\n            (BinaryFan.mk (BinaryFan.fst (ℬ X (ℬ 𝒯.cone.pt Y).cone.pt).cone ≫ 𝟙 X)\n              (BinaryFan.snd (ℬ X (ℬ 𝒯.cone.pt Y).cone.pt).cone ≫ BinaryFan.snd (ℬ 𝒯.cone.pt Y).cone))) ≫\n        NatTrans.app (ℬ X Y).cone.π j =\n      IsLimit.lift (ℬ X Y).isLimit\n          (BinaryFan.mk (BinaryFan.fst (ℬ (ℬ X 𝒯.cone.pt).cone.pt Y).cone ≫ BinaryFan.fst (ℬ X 𝒯.cone.pt).cone)\n            (BinaryFan.snd (ℬ (ℬ X 𝒯.cone.pt).cone.pt Y).cone ≫ 𝟙 Y)) ≫\n        NatTrans.app (ℬ X Y).cone.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX Y : C\n⊢ ((BinaryFan.associatorOfLimitCone ℬ X 𝒯.cone.pt Y).hom ≫\n        IsLimit.lift (ℬ X Y).isLimit\n          (BinaryFan.mk (BinaryFan.fst (ℬ X (ℬ 𝒯.cone.pt Y).cone.pt).cone ≫ 𝟙 X)\n            (BinaryFan.snd (ℬ X (ℬ 𝒯.cone.pt Y).cone.pt).cone ≫ BinaryFan.snd (ℬ 𝒯.cone.pt Y).cone))) ≫\n      NatTrans.app (ℬ X Y).cone.π { as := WalkingPair.left } =\n    IsLimit.lift (ℬ X Y).isLimit\n        (BinaryFan.mk (BinaryFan.fst (ℬ (ℬ X 𝒯.cone.pt).cone.pt Y).cone ≫ BinaryFan.fst (ℬ X 𝒯.cone.pt).cone)\n          (BinaryFan.snd (ℬ (ℬ X 𝒯.cone.pt).cone.pt Y).cone ≫ 𝟙 Y)) ≫\n      NatTrans.app (ℬ X Y).cone.π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX Y : C\n⊢ ((BinaryFan.associatorOfLimitCone ℬ X 𝒯.cone.pt Y).hom ≫\n        IsLimit.lift (ℬ X Y).isLimit\n          (BinaryFan.mk (BinaryFan.fst (ℬ X (ℬ 𝒯.cone.pt Y).cone.pt).cone ≫ 𝟙 X)\n            (BinaryFan.snd (ℬ X (ℬ 𝒯.cone.pt Y).cone.pt).cone ≫ BinaryFan.snd (ℬ 𝒯.cone.pt Y).cone))) ≫\n      NatTrans.app (ℬ X Y).cone.π { as := WalkingPair.right } =\n    IsLimit.lift (ℬ X Y).isLimit\n        (BinaryFan.mk (BinaryFan.fst (ℬ (ℬ X 𝒯.cone.pt).cone.pt Y).cone ≫ BinaryFan.fst (ℬ X 𝒯.cone.pt).cone)\n          (BinaryFan.snd (ℬ (ℬ X 𝒯.cone.pt).cone.pt Y).cone ≫ 𝟙 Y)) ≫\n      NatTrans.app (ℬ X Y).cone.π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ : C\nf : X₁ ⟶ X₂\n⊢ tensorHom ℬ (𝟙 𝒯.cone.pt) f ≫ (BinaryFan.leftUnitor 𝒯.isLimit (ℬ 𝒯.cone.pt X₂).isLimit).hom =\n    (BinaryFan.leftUnitor 𝒯.isLimit (ℬ 𝒯.cone.pt X₁).isLimit).hom ≫ f\n[PROOFSTEP]\ndsimp [tensorHom]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ : C\nf : X₁ ⟶ X₂\n⊢ IsLimit.lift (ℬ 𝒯.cone.pt X₂).isLimit\n        (BinaryFan.mk (BinaryFan.fst (ℬ 𝒯.cone.pt X₁).cone ≫ 𝟙 𝒯.cone.pt) (BinaryFan.snd (ℬ 𝒯.cone.pt X₁).cone ≫ f)) ≫\n      BinaryFan.snd (ℬ 𝒯.cone.pt X₂).cone =\n    BinaryFan.snd (ℬ 𝒯.cone.pt X₁).cone ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ : C\nf : X₁ ⟶ X₂\n⊢ tensorHom ℬ f (𝟙 𝒯.cone.pt) ≫ (BinaryFan.rightUnitor 𝒯.isLimit (ℬ X₂ 𝒯.cone.pt).isLimit).hom =\n    (BinaryFan.rightUnitor 𝒯.isLimit (ℬ X₁ 𝒯.cone.pt).isLimit).hom ≫ f\n[PROOFSTEP]\ndsimp [tensorHom]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ : C\nf : X₁ ⟶ X₂\n⊢ IsLimit.lift (ℬ X₂ 𝒯.cone.pt).isLimit\n        (BinaryFan.mk (BinaryFan.fst (ℬ X₁ 𝒯.cone.pt).cone ≫ f) (BinaryFan.snd (ℬ X₁ 𝒯.cone.pt).cone ≫ 𝟙 𝒯.cone.pt)) ≫\n      BinaryFan.fst (ℬ X₂ 𝒯.cone.pt).cone =\n    BinaryFan.fst (ℬ X₁ 𝒯.cone.pt).cone ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\nf₃ : X₃ ⟶ Y₃\n⊢ tensorHom ℬ (tensorHom ℬ f₁ f₂) f₃ ≫ (BinaryFan.associatorOfLimitCone ℬ Y₁ Y₂ Y₃).hom =\n    (BinaryFan.associatorOfLimitCone ℬ X₁ X₂ X₃).hom ≫ tensorHom ℬ f₁ (tensorHom ℬ f₂ f₃)\n[PROOFSTEP]\ndsimp [tensorHom]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\nf₃ : X₃ ⟶ Y₃\n⊢ IsLimit.lift (ℬ (tensorObj ℬ Y₁ Y₂) Y₃).isLimit\n        (BinaryFan.mk\n          (BinaryFan.fst (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫\n            IsLimit.lift (ℬ Y₁ Y₂).isLimit\n              (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ f₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ f₂)))\n          (BinaryFan.snd (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫ f₃)) ≫\n      (BinaryFan.associatorOfLimitCone ℬ Y₁ Y₂ Y₃).hom =\n    (BinaryFan.associatorOfLimitCone ℬ X₁ X₂ X₃).hom ≫\n      IsLimit.lift (ℬ Y₁ (tensorObj ℬ Y₂ Y₃)).isLimit\n        (BinaryFan.mk (BinaryFan.fst (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫ f₁)\n          (BinaryFan.snd (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫\n            IsLimit.lift (ℬ Y₂ Y₃).isLimit\n              (BinaryFan.mk (BinaryFan.fst (ℬ X₂ X₃).cone ≫ f₂) (BinaryFan.snd (ℬ X₂ X₃).cone ≫ f₃))))\n[PROOFSTEP]\napply IsLimit.hom_ext (ℬ _ _).isLimit\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\nf₃ : X₃ ⟶ Y₃\n⊢ ∀ (j : Discrete WalkingPair),\n    (IsLimit.lift (ℬ (tensorObj ℬ Y₁ Y₂) Y₃).isLimit\n            (BinaryFan.mk\n              (BinaryFan.fst (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫\n                IsLimit.lift (ℬ Y₁ Y₂).isLimit\n                  (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ f₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ f₂)))\n              (BinaryFan.snd (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫ f₃)) ≫\n          (BinaryFan.associatorOfLimitCone ℬ Y₁ Y₂ Y₃).hom) ≫\n        NatTrans.app (ℬ Y₁ (ℬ Y₂ Y₃).cone.pt).cone.π j =\n      ((BinaryFan.associatorOfLimitCone ℬ X₁ X₂ X₃).hom ≫\n          IsLimit.lift (ℬ Y₁ (tensorObj ℬ Y₂ Y₃)).isLimit\n            (BinaryFan.mk (BinaryFan.fst (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫ f₁)\n              (BinaryFan.snd (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫\n                IsLimit.lift (ℬ Y₂ Y₃).isLimit\n                  (BinaryFan.mk (BinaryFan.fst (ℬ X₂ X₃).cone ≫ f₂) (BinaryFan.snd (ℬ X₂ X₃).cone ≫ f₃))))) ≫\n        NatTrans.app (ℬ Y₁ (ℬ Y₂ Y₃).cone.pt).cone.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\nf₃ : X₃ ⟶ Y₃\n⊢ (IsLimit.lift (ℬ (tensorObj ℬ Y₁ Y₂) Y₃).isLimit\n          (BinaryFan.mk\n            (BinaryFan.fst (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫\n              IsLimit.lift (ℬ Y₁ Y₂).isLimit\n                (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ f₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ f₂)))\n            (BinaryFan.snd (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫ f₃)) ≫\n        (BinaryFan.associatorOfLimitCone ℬ Y₁ Y₂ Y₃).hom) ≫\n      NatTrans.app (ℬ Y₁ (ℬ Y₂ Y₃).cone.pt).cone.π { as := WalkingPair.left } =\n    ((BinaryFan.associatorOfLimitCone ℬ X₁ X₂ X₃).hom ≫\n        IsLimit.lift (ℬ Y₁ (tensorObj ℬ Y₂ Y₃)).isLimit\n          (BinaryFan.mk (BinaryFan.fst (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫ f₁)\n            (BinaryFan.snd (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫\n              IsLimit.lift (ℬ Y₂ Y₃).isLimit\n                (BinaryFan.mk (BinaryFan.fst (ℬ X₂ X₃).cone ≫ f₂) (BinaryFan.snd (ℬ X₂ X₃).cone ≫ f₃))))) ≫\n      NatTrans.app (ℬ Y₁ (ℬ Y₂ Y₃).cone.pt).cone.π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\nf₃ : X₃ ⟶ Y₃\n⊢ (IsLimit.lift (ℬ (tensorObj ℬ Y₁ Y₂) Y₃).isLimit\n          (BinaryFan.mk\n            (BinaryFan.fst (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫\n              IsLimit.lift (ℬ Y₁ Y₂).isLimit\n                (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ f₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ f₂)))\n            (BinaryFan.snd (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫ f₃)) ≫\n        (BinaryFan.associatorOfLimitCone ℬ Y₁ Y₂ Y₃).hom) ≫\n      NatTrans.app (ℬ Y₁ (ℬ Y₂ Y₃).cone.pt).cone.π { as := WalkingPair.right } =\n    ((BinaryFan.associatorOfLimitCone ℬ X₁ X₂ X₃).hom ≫\n        IsLimit.lift (ℬ Y₁ (tensorObj ℬ Y₂ Y₃)).isLimit\n          (BinaryFan.mk (BinaryFan.fst (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫ f₁)\n            (BinaryFan.snd (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫\n              IsLimit.lift (ℬ Y₂ Y₃).isLimit\n                (BinaryFan.mk (BinaryFan.fst (ℬ X₂ X₃).cone ≫ f₂) (BinaryFan.snd (ℬ X₂ X₃).cone ≫ f₃))))) ≫\n      NatTrans.app (ℬ Y₁ (ℬ Y₂ Y₃).cone.pt).cone.π { as := WalkingPair.right }\n[PROOFSTEP]\napply IsLimit.hom_ext (ℬ _ _).isLimit\n[GOAL]\ncase mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\nf₃ : X₃ ⟶ Y₃\n⊢ ∀ (j : Discrete WalkingPair),\n    ((IsLimit.lift (ℬ (tensorObj ℬ Y₁ Y₂) Y₃).isLimit\n              (BinaryFan.mk\n                (BinaryFan.fst (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫\n                  IsLimit.lift (ℬ Y₁ Y₂).isLimit\n                    (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ f₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ f₂)))\n                (BinaryFan.snd (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫ f₃)) ≫\n            (BinaryFan.associatorOfLimitCone ℬ Y₁ Y₂ Y₃).hom) ≫\n          NatTrans.app (ℬ Y₁ (ℬ Y₂ Y₃).cone.pt).cone.π { as := WalkingPair.right }) ≫\n        NatTrans.app (ℬ Y₂ Y₃).cone.π j =\n      (((BinaryFan.associatorOfLimitCone ℬ X₁ X₂ X₃).hom ≫\n            IsLimit.lift (ℬ Y₁ (tensorObj ℬ Y₂ Y₃)).isLimit\n              (BinaryFan.mk (BinaryFan.fst (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫ f₁)\n                (BinaryFan.snd (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫\n                  IsLimit.lift (ℬ Y₂ Y₃).isLimit\n                    (BinaryFan.mk (BinaryFan.fst (ℬ X₂ X₃).cone ≫ f₂) (BinaryFan.snd (ℬ X₂ X₃).cone ≫ f₃))))) ≫\n          NatTrans.app (ℬ Y₁ (ℬ Y₂ Y₃).cone.pt).cone.π { as := WalkingPair.right }) ≫\n        NatTrans.app (ℬ Y₂ Y₃).cone.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.right.mk.left\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\nf₃ : X₃ ⟶ Y₃\n⊢ ((IsLimit.lift (ℬ (tensorObj ℬ Y₁ Y₂) Y₃).isLimit\n            (BinaryFan.mk\n              (BinaryFan.fst (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫\n                IsLimit.lift (ℬ Y₁ Y₂).isLimit\n                  (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ f₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ f₂)))\n              (BinaryFan.snd (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫ f₃)) ≫\n          (BinaryFan.associatorOfLimitCone ℬ Y₁ Y₂ Y₃).hom) ≫\n        NatTrans.app (ℬ Y₁ (ℬ Y₂ Y₃).cone.pt).cone.π { as := WalkingPair.right }) ≫\n      NatTrans.app (ℬ Y₂ Y₃).cone.π { as := WalkingPair.left } =\n    (((BinaryFan.associatorOfLimitCone ℬ X₁ X₂ X₃).hom ≫\n          IsLimit.lift (ℬ Y₁ (tensorObj ℬ Y₂ Y₃)).isLimit\n            (BinaryFan.mk (BinaryFan.fst (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫ f₁)\n              (BinaryFan.snd (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫\n                IsLimit.lift (ℬ Y₂ Y₃).isLimit\n                  (BinaryFan.mk (BinaryFan.fst (ℬ X₂ X₃).cone ≫ f₂) (BinaryFan.snd (ℬ X₂ X₃).cone ≫ f₃))))) ≫\n        NatTrans.app (ℬ Y₁ (ℬ Y₂ Y₃).cone.pt).cone.π { as := WalkingPair.right }) ≫\n      NatTrans.app (ℬ Y₂ Y₃).cone.π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right.mk.right\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\nf₃ : X₃ ⟶ Y₃\n⊢ ((IsLimit.lift (ℬ (tensorObj ℬ Y₁ Y₂) Y₃).isLimit\n            (BinaryFan.mk\n              (BinaryFan.fst (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫\n                IsLimit.lift (ℬ Y₁ Y₂).isLimit\n                  (BinaryFan.mk (BinaryFan.fst (ℬ X₁ X₂).cone ≫ f₁) (BinaryFan.snd (ℬ X₁ X₂).cone ≫ f₂)))\n              (BinaryFan.snd (ℬ (tensorObj ℬ X₁ X₂) X₃).cone ≫ f₃)) ≫\n          (BinaryFan.associatorOfLimitCone ℬ Y₁ Y₂ Y₃).hom) ≫\n        NatTrans.app (ℬ Y₁ (ℬ Y₂ Y₃).cone.pt).cone.π { as := WalkingPair.right }) ≫\n      NatTrans.app (ℬ Y₂ Y₃).cone.π { as := WalkingPair.right } =\n    (((BinaryFan.associatorOfLimitCone ℬ X₁ X₂ X₃).hom ≫\n          IsLimit.lift (ℬ Y₁ (tensorObj ℬ Y₂ Y₃)).isLimit\n            (BinaryFan.mk (BinaryFan.fst (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫ f₁)\n              (BinaryFan.snd (ℬ X₁ (ℬ X₂ X₃).cone.pt).cone ≫\n                IsLimit.lift (ℬ Y₂ Y₃).isLimit\n                  (BinaryFan.mk (BinaryFan.fst (ℬ X₂ X₃).cone ≫ f₂) (BinaryFan.snd (ℬ X₂ X₃).cone ≫ f₃))))) ≫\n        NatTrans.app (ℬ Y₁ (ℬ Y₂ Y₃).cone.pt).cone.π { as := WalkingPair.right }) ≫\n      NatTrans.app (ℬ Y₂ Y₃).cone.π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\n⊢ Category.{?u.82278, u} (MonoidalOfChosenFiniteProductsSynonym 𝒯 ℬ)\n[PROOFSTEP]\ndsimp [MonoidalOfChosenFiniteProductsSynonym]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n𝒯 : LimitCone (Functor.empty C)\nℬ : (X Y : C) → LimitCone (pair X Y)\n⊢ Category.{?u.82278, u} C\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monoidal.OfChosenFiniteProducts.Basic", "llama_tokens": 29164, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6477982043529716, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.3716278422238082}}
{"text": "[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ IsVanKampen (_ : IsPushout g f i h)\n[PROOFSTEP]\nintrov W' hf hg hh hi w\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH : IsPushout f g h i\nH' : IsVanKampen H\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ Y\nαY : Y' ⟶ X\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX g\nhg : IsPullback g' αW αY f\nhh : CommSq h' αX αZ i\nhi : CommSq i' αY αZ h\nw : CommSq f' g' h' i'\n⊢ IsPushout f' g' h' i' ↔ IsPullback h' αX αZ i ∧ IsPullback i' αY αZ h\n[PROOFSTEP]\nsimpa only [IsPushout.flip_iff, IsPullback.flip_iff, and_comm] using H' g' f' i' h' αW αY αX αZ hg hf hi hh w.flip\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH : IsPushout f g h i\n⊢ IsVanKampen H ↔ IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH : IsPushout f g h i\n⊢ IsVanKampen H → IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\n[PROOFSTEP]\nintro H F' c' α fα eα hα\n[GOAL]\ncase mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\n⊢ Nonempty (IsColimit c') ↔\n    ∀ (j : WalkingSpan),\n      IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) fα\n        (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι j)\n[PROOFSTEP]\nrefine'\n  Iff.trans _\n    ((H (F'.map WalkingSpan.Hom.fst) (F'.map WalkingSpan.Hom.snd) (c'.ι.app _) (c'.ι.app _) (α.app _) (α.app _)\n          (α.app _) fα (by convert hα WalkingSpan.Hom.fst) (by convert hα WalkingSpan.Hom.snd) _ _ _).trans\n      _)\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\n⊢ IsPullback (F'.map WalkingSpan.Hom.fst) (NatTrans.app α WalkingSpan.zero) (NatTrans.app α WalkingSpan.left) f\n[PROOFSTEP]\nconvert hα WalkingSpan.Hom.fst\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\n⊢ IsPullback (F'.map WalkingSpan.Hom.snd) (NatTrans.app α WalkingSpan.zero) (NatTrans.app α WalkingSpan.right) g\n[PROOFSTEP]\nconvert hα WalkingSpan.Hom.snd\n[GOAL]\ncase mp.refine'_1\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\n⊢ Nonempty (IsColimit c') ↔\n    IsPushout (F'.map WalkingSpan.Hom.fst) (F'.map WalkingSpan.Hom.snd) (NatTrans.app c'.ι WalkingSpan.left)\n      (NatTrans.app c'.ι WalkingSpan.right)\n[PROOFSTEP]\nhave :\n  F'.map WalkingSpan.Hom.fst ≫ c'.ι.app WalkingSpan.left = F'.map WalkingSpan.Hom.snd ≫ c'.ι.app WalkingSpan.right := by\n  simp only [Cocone.w]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\n⊢ F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left =\n    F'.map WalkingSpan.Hom.snd ≫ NatTrans.app c'.ι WalkingSpan.right\n[PROOFSTEP]\nsimp only [Cocone.w]\n[GOAL]\ncase mp.refine'_1\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nthis :\n  F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left =\n    F'.map WalkingSpan.Hom.snd ≫ NatTrans.app c'.ι WalkingSpan.right\n⊢ Nonempty (IsColimit c') ↔\n    IsPushout (F'.map WalkingSpan.Hom.fst) (F'.map WalkingSpan.Hom.snd) (NatTrans.app c'.ι WalkingSpan.left)\n      (NatTrans.app c'.ι WalkingSpan.right)\n[PROOFSTEP]\nrw [(IsColimit.equivOfNatIsoOfIso (diagramIsoSpan F') c' (PushoutCocone.mk _ _ this) _).nonempty_congr]\n[GOAL]\ncase mp.refine'_1\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nthis :\n  F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left =\n    F'.map WalkingSpan.Hom.snd ≫ NatTrans.app c'.ι WalkingSpan.right\n⊢ Nonempty\n      (IsColimit (PushoutCocone.mk (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app c'.ι WalkingSpan.right) this)) ↔\n    IsPushout (F'.map WalkingSpan.Hom.fst) (F'.map WalkingSpan.Hom.snd) (NatTrans.app c'.ι WalkingSpan.left)\n      (NatTrans.app c'.ι WalkingSpan.right)\n[PROOFSTEP]\nexact ⟨fun h => ⟨⟨this⟩, h⟩, fun h => h.2⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nthis :\n  F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left =\n    F'.map WalkingSpan.Hom.snd ≫ NatTrans.app c'.ι WalkingSpan.right\n⊢ (Cocones.precompose (diagramIsoSpan F').inv).obj c' ≅\n    PushoutCocone.mk (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app c'.ι WalkingSpan.right) this\n[PROOFSTEP]\nrefine' Cocones.ext (Iso.refl c'.pt) _\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nthis :\n  F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left =\n    F'.map WalkingSpan.Hom.snd ≫ NatTrans.app c'.ι WalkingSpan.right\n⊢ ∀ (j : WalkingSpan),\n    NatTrans.app ((Cocones.precompose (diagramIsoSpan F').inv).obj c').ι j ≫ (Iso.refl c'.pt).hom =\n      NatTrans.app (PushoutCocone.mk (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app c'.ι WalkingSpan.right) this).ι\n        j\n[PROOFSTEP]\nrintro (_ | _ | _)\n[GOAL]\ncase none\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nthis :\n  F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left =\n    F'.map WalkingSpan.Hom.snd ≫ NatTrans.app c'.ι WalkingSpan.right\n⊢ NatTrans.app ((Cocones.precompose (diagramIsoSpan F').inv).obj c').ι none ≫ (Iso.refl c'.pt).hom =\n    NatTrans.app (PushoutCocone.mk (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app c'.ι WalkingSpan.right) this).ι\n      none\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nthis :\n  F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left =\n    F'.map WalkingSpan.Hom.snd ≫ NatTrans.app c'.ι WalkingSpan.right\n⊢ NatTrans.app ((Cocones.precompose (diagramIsoSpan F').inv).obj c').ι (some WalkingPair.left) ≫ (Iso.refl c'.pt).hom =\n    NatTrans.app (PushoutCocone.mk (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app c'.ι WalkingSpan.right) this).ι\n      (some WalkingPair.left)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nthis :\n  F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left =\n    F'.map WalkingSpan.Hom.snd ≫ NatTrans.app c'.ι WalkingSpan.right\n⊢ NatTrans.app ((Cocones.precompose (diagramIsoSpan F').inv).obj c').ι (some WalkingPair.right) ≫ (Iso.refl c'.pt).hom =\n    NatTrans.app (PushoutCocone.mk (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app c'.ι WalkingSpan.right) this).ι\n      (some WalkingPair.right)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase none\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nthis :\n  F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left =\n    F'.map WalkingSpan.Hom.snd ≫ NatTrans.app c'.ι WalkingSpan.right\n⊢ (𝟙 (F'.obj WalkingSpan.zero) ≫ NatTrans.app c'.ι none) ≫ 𝟙 c'.pt =\n    F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left\n[PROOFSTEP]\nsimp only [c'.w, Category.assoc, Category.id_comp, Category.comp_id]\n[GOAL]\ncase some.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nthis :\n  F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left =\n    F'.map WalkingSpan.Hom.snd ≫ NatTrans.app c'.ι WalkingSpan.right\n⊢ (𝟙 (F'.obj WalkingSpan.left) ≫ NatTrans.app c'.ι (some WalkingPair.left)) ≫ 𝟙 c'.pt =\n    NatTrans.app c'.ι WalkingSpan.left\n[PROOFSTEP]\nsimp only [c'.w, Category.assoc, Category.id_comp, Category.comp_id]\n[GOAL]\ncase some.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nthis :\n  F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left =\n    F'.map WalkingSpan.Hom.snd ≫ NatTrans.app c'.ι WalkingSpan.right\n⊢ (𝟙 (F'.obj WalkingSpan.right) ≫ NatTrans.app c'.ι (some WalkingPair.right)) ≫ 𝟙 c'.pt =\n    NatTrans.app c'.ι WalkingSpan.right\n[PROOFSTEP]\nsimp only [c'.w, Category.assoc, Category.id_comp, Category.comp_id]\n[GOAL]\ncase mp.refine'_2\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\n⊢ CommSq (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app α WalkingSpan.left) fα h\n[PROOFSTEP]\nexact ⟨NatTrans.congr_app eα.symm _⟩\n[GOAL]\ncase mp.refine'_3\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\n⊢ CommSq (NatTrans.app c'.ι WalkingSpan.right) (NatTrans.app α WalkingSpan.right) fα i\n[PROOFSTEP]\nexact ⟨NatTrans.congr_app eα.symm _⟩\n[GOAL]\ncase mp.refine'_4\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\n⊢ CommSq (F'.map WalkingSpan.Hom.fst) (F'.map WalkingSpan.Hom.snd) (NatTrans.app c'.ι WalkingSpan.left)\n    (NatTrans.app c'.ι WalkingSpan.right)\n[PROOFSTEP]\nexact ⟨by simp⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\n⊢ F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left =\n    F'.map WalkingSpan.Hom.snd ≫ NatTrans.app c'.ι WalkingSpan.right\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.refine'_5\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\n⊢ IsPullback (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app α WalkingSpan.left) fα h ∧\n      IsPullback (NatTrans.app c'.ι WalkingSpan.right) (NatTrans.app α WalkingSpan.right) fα i ↔\n    ∀ (j : WalkingSpan),\n      IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) fα\n        (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι j)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.refine'_5.mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\n⊢ IsPullback (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app α WalkingSpan.left) fα h ∧\n      IsPullback (NatTrans.app c'.ι WalkingSpan.right) (NatTrans.app α WalkingSpan.right) fα i →\n    ∀ (j : WalkingSpan),\n      IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) fα\n        (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι j)\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩ (_ | _ | _)\n[GOAL]\ncase mp.refine'_5.mp.intro.none\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nh₁ : IsPullback (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app α WalkingSpan.left) fα h\nh₂ : IsPullback (NatTrans.app c'.ι WalkingSpan.right) (NatTrans.app α WalkingSpan.right) fα i\n⊢ IsPullback (NatTrans.app c'.ι none) (NatTrans.app α none) fα\n    (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι none)\n[PROOFSTEP]\nrw [← c'.w WalkingSpan.Hom.fst]\n[GOAL]\ncase mp.refine'_5.mp.intro.none\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nh₁ : IsPullback (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app α WalkingSpan.left) fα h\nh₂ : IsPullback (NatTrans.app c'.ι WalkingSpan.right) (NatTrans.app α WalkingSpan.right) fα i\n⊢ IsPullback (F'.map WalkingSpan.Hom.fst ≫ NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app α none) fα\n    (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι none)\n[PROOFSTEP]\nexact (hα WalkingSpan.Hom.fst).paste_horiz h₁\n[GOAL]\ncase mp.refine'_5.mp.intro.some.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nh₁ : IsPullback (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app α WalkingSpan.left) fα h\nh₂ : IsPullback (NatTrans.app c'.ι WalkingSpan.right) (NatTrans.app α WalkingSpan.right) fα i\n⊢ IsPullback (NatTrans.app c'.ι (some WalkingPair.left)) (NatTrans.app α (some WalkingPair.left)) fα\n    (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι (some WalkingPair.left))\ncase mp.refine'_5.mp.intro.some.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nh₁ : IsPullback (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app α WalkingSpan.left) fα h\nh₂ : IsPullback (NatTrans.app c'.ι WalkingSpan.right) (NatTrans.app α WalkingSpan.right) fα i\n⊢ IsPullback (NatTrans.app c'.ι (some WalkingPair.right)) (NatTrans.app α (some WalkingPair.right)) fα\n    (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι (some WalkingPair.right))\n[PROOFSTEP]\nexacts [h₁, h₂]\n[GOAL]\ncase mp.refine'_5.mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\n⊢ (∀ (j : WalkingSpan),\n      IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) fα\n        (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι j)) →\n    IsPullback (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app α WalkingSpan.left) fα h ∧\n      IsPullback (NatTrans.app c'.ι WalkingSpan.right) (NatTrans.app α WalkingSpan.right) fα i\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp.refine'_5.mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh✝ : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h✝ i\nH : IsVanKampen H✝\nF' : WalkingSpan ⥤ C\nc' : Cocone F'\nα : F' ⟶ span f g\nfα : c'.pt ⟶ (PushoutCocone.mk h✝ i (_ : f ≫ h✝ = g ≫ i)).pt\neα : α ≫ (PushoutCocone.mk h✝ i (_ : f ≫ h✝ = g ≫ i)).ι = c'.ι ≫ (Functor.const WalkingSpan).map fα\nhα : NatTrans.Equifibered α\nh :\n  ∀ (j : WalkingSpan),\n    IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) fα\n      (NatTrans.app (PushoutCocone.mk h✝ i (_ : f ≫ h✝ = g ≫ i)).ι j)\n⊢ IsPullback (NatTrans.app c'.ι WalkingSpan.left) (NatTrans.app α WalkingSpan.left) fα h✝ ∧\n    IsPullback (NatTrans.app c'.ι WalkingSpan.right) (NatTrans.app α WalkingSpan.right) fα i\n[PROOFSTEP]\nexact ⟨h _, h _⟩\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH : IsPushout f g h i\n⊢ IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)) → IsVanKampen H\n[PROOFSTEP]\nintrov H W' hf hg hh hi w\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ IsPushout f' g' h' i' ↔ IsPullback h' αX αZ h ∧ IsPullback i' αY αZ i\n[PROOFSTEP]\nrefine' Iff.trans _ ((H w.cocone ⟨by rintro (_ | _ | _); exacts [αW, αX, αY], _⟩ αZ _ _).trans _)\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ (X_1 : WalkingSpan) → (span f' g').obj X_1 ⟶ (span f g).obj X_1\n[PROOFSTEP]\nrintro (_ | _ | _)\n[GOAL]\ncase none\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ (span f' g').obj none ⟶ (span f g).obj none\ncase some.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ (span f' g').obj (some WalkingPair.left) ⟶ (span f g).obj (some WalkingPair.left)\ncase some.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ (span f' g').obj (some WalkingPair.right) ⟶ (span f g).obj (some WalkingPair.right)\n[PROOFSTEP]\nexacts [αW, αX, αY]\n[GOAL]\ncase mpr.refine'_1\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ IsPushout f' g' h' i' ↔ Nonempty (IsColimit (CommSq.cocone w))\ncase mpr.refine'_2\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ ∀ ⦃X_1 Y_1 : WalkingSpan⦄ (f_1 : X_1 ⟶ Y_1),\n    ((span f' g').map f_1 ≫ Option.casesOn Y_1 αW fun val => WalkingPair.casesOn val αX αY) =\n      (Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) ≫ (span f g).map f_1\ncase mpr.refine'_3\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) ≫\n      (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι =\n    (CommSq.cocone w).ι ≫ (Functor.const WalkingSpan).map αZ\ncase mpr.refine'_4\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ NatTrans.Equifibered (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY)\ncase mpr.refine'_5\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ (∀ (j : WalkingSpan),\n      IsPullback (NatTrans.app (CommSq.cocone w).ι j)\n        (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) j) αZ\n        (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι j)) ↔\n    IsPullback h' αX αZ h ∧ IsPullback i' αY αZ i\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase mpr.refine'_2\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ ∀ ⦃X_1 Y_1 : WalkingSpan⦄ (f_1 : X_1 ⟶ Y_1),\n    ((span f' g').map f_1 ≫ Option.casesOn Y_1 αW fun val => WalkingPair.casesOn val αX αY) =\n      (Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) ≫ (span f g).map f_1\n[PROOFSTEP]\nrintro i _ (_ | _ | _)\n[GOAL]\ncase mpr.refine'_2.id\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni✝ : Y ⟶ Z\nH✝ : IsPushout f g h i✝\nH : IsVanKampenColimit (PushoutCocone.mk h i✝ (_ : f ≫ h = g ≫ i✝))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i✝\nw : CommSq f' g' h' i'\ni : WalkingSpan\n⊢ ((span f' g').map (WidePushoutShape.Hom.id i) ≫ Option.casesOn i αW fun val => WalkingPair.casesOn val αX αY) =\n    (Option.casesOn i αW fun val => WalkingPair.casesOn val αX αY) ≫ (span f g).map (WidePushoutShape.Hom.id i)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mpr.refine'_2.id\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni✝ : Y ⟶ Z\nH✝ : IsPushout f g h i✝\nH : IsVanKampenColimit (PushoutCocone.mk h i✝ (_ : f ≫ h = g ≫ i✝))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i✝\nw : CommSq f' g' h' i'\ni : WalkingSpan\n⊢ (span f' g').map (𝟙 i) ≫ Option.rec αW (fun val => WalkingPair.rec αX αY val) i =\n    Option.rec αW (fun val => WalkingPair.rec αX αY val) i ≫ (span f g).map (𝟙 i)\n[PROOFSTEP]\nsimp only [Functor.map_id, Category.comp_id, Category.id_comp]\n[GOAL]\ncase mpr.refine'_2.init.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ ((span f' g').map (WidePushoutShape.Hom.init WalkingPair.left) ≫\n      Option.casesOn (some WalkingPair.left) αW fun val => WalkingPair.casesOn val αX αY) =\n    (Option.casesOn none αW fun val => WalkingPair.casesOn val αX αY) ≫\n      (span f g).map (WidePushoutShape.Hom.init WalkingPair.left)\ncase mpr.refine'_2.init.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ ((span f' g').map (WidePushoutShape.Hom.init WalkingPair.right) ≫\n      Option.casesOn (some WalkingPair.right) αW fun val => WalkingPair.casesOn val αX αY) =\n    (Option.casesOn none αW fun val => WalkingPair.casesOn val αX αY) ≫\n      (span f g).map (WidePushoutShape.Hom.init WalkingPair.right)\n[PROOFSTEP]\nexacts [hf.w, hg.w]\n[GOAL]\ncase mpr.refine'_3\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) ≫\n      (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι =\n    (CommSq.cocone w).ι ≫ (Functor.const WalkingSpan).map αZ\n[PROOFSTEP]\next (_ | _ | _)\n[GOAL]\ncase mpr.refine'_3.w.h.none\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ NatTrans.app\n      ((NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) ≫\n        (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι)\n      none =\n    NatTrans.app ((CommSq.cocone w).ι ≫ (Functor.const WalkingSpan).map αZ) none\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mpr.refine'_3.w.h.none\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ αW ≫ f ≫ h = NatTrans.app (CommSq.cocone w).ι none ≫ αZ\n[PROOFSTEP]\nrw [PushoutCocone.condition_zero]\n[GOAL]\ncase mpr.refine'_3.w.h.none\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ αW ≫ f ≫ h = (f' ≫ PushoutCocone.inl (CommSq.cocone w)) ≫ αZ\n[PROOFSTEP]\nerw [Category.assoc, hh.w, hf.w_assoc]\n[GOAL]\ncase mpr.refine'_3.w.h.some.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ NatTrans.app\n      ((NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) ≫\n        (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι)\n      (some WalkingPair.left) =\n    NatTrans.app ((CommSq.cocone w).ι ≫ (Functor.const WalkingSpan).map αZ) (some WalkingPair.left)\ncase mpr.refine'_3.w.h.some.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ NatTrans.app\n      ((NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) ≫\n        (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι)\n      (some WalkingPair.right) =\n    NatTrans.app ((CommSq.cocone w).ι ≫ (Functor.const WalkingSpan).map αZ) (some WalkingPair.right)\n[PROOFSTEP]\nexacts [hh.w.symm, hi.w.symm]\n[GOAL]\ncase mpr.refine'_4\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ NatTrans.Equifibered (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY)\n[PROOFSTEP]\nrintro i _ (_ | _ | _)\n[GOAL]\ncase mpr.refine'_4.id\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni✝ : Y ⟶ Z\nH✝ : IsPushout f g h i✝\nH : IsVanKampenColimit (PushoutCocone.mk h i✝ (_ : f ≫ h = g ≫ i✝))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i✝\nw : CommSq f' g' h' i'\ni : WalkingSpan\n⊢ IsPullback ((span f' g').map (WidePushoutShape.Hom.id i))\n    (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) i)\n    (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) i)\n    ((span f g).map (WidePushoutShape.Hom.id i))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mpr.refine'_4.id\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni✝ : Y ⟶ Z\nH✝ : IsPushout f g h i✝\nH : IsVanKampenColimit (PushoutCocone.mk h i✝ (_ : f ≫ h = g ≫ i✝))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i✝\nw : CommSq f' g' h' i'\ni : WalkingSpan\n⊢ IsPullback ((span f' g').map (𝟙 i)) (Option.rec αW (fun val => WalkingPair.rec αX αY val) i)\n    (Option.rec αW (fun val => WalkingPair.rec αX αY val) i) ((span f g).map (𝟙 i))\n[PROOFSTEP]\nsimp_rw [Functor.map_id]\n[GOAL]\ncase mpr.refine'_4.id\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni✝ : Y ⟶ Z\nH✝ : IsPushout f g h i✝\nH : IsVanKampenColimit (PushoutCocone.mk h i✝ (_ : f ≫ h = g ≫ i✝))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i✝\nw : CommSq f' g' h' i'\ni : WalkingSpan\n⊢ IsPullback (𝟙 ((span f' g').obj i)) (Option.rec αW (fun val => WalkingPair.rec αX αY val) i)\n    (Option.rec αW (fun val => WalkingPair.rec αX αY val) i) (𝟙 ((span f g).obj i))\n[PROOFSTEP]\nexact IsPullback.of_horiz_isIso ⟨by rw [Category.comp_id, Category.id_comp]⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni✝ : Y ⟶ Z\nH✝ : IsPushout f g h i✝\nH : IsVanKampenColimit (PushoutCocone.mk h i✝ (_ : f ≫ h = g ≫ i✝))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i✝\nw : CommSq f' g' h' i'\ni : WalkingSpan\n⊢ 𝟙 ((span f' g').obj i) ≫ Option.rec αW (fun val => WalkingPair.rec αX αY val) i =\n    Option.rec αW (fun val => WalkingPair.rec αX αY val) i ≫ 𝟙 ((span f g).obj i)\n[PROOFSTEP]\nrw [Category.comp_id, Category.id_comp]\n[GOAL]\ncase mpr.refine'_4.init.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ IsPullback ((span f' g').map (WidePushoutShape.Hom.init WalkingPair.left))\n    (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) none)\n    (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY)\n      (some WalkingPair.left))\n    ((span f g).map (WidePushoutShape.Hom.init WalkingPair.left))\ncase mpr.refine'_4.init.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ IsPullback ((span f' g').map (WidePushoutShape.Hom.init WalkingPair.right))\n    (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) none)\n    (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY)\n      (some WalkingPair.right))\n    ((span f g).map (WidePushoutShape.Hom.init WalkingPair.right))\n[PROOFSTEP]\nexacts [hf, hg]\n[GOAL]\ncase mpr.refine'_5\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ (∀ (j : WalkingSpan),\n      IsPullback (NatTrans.app (CommSq.cocone w).ι j)\n        (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) j) αZ\n        (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι j)) ↔\n    IsPullback h' αX αZ h ∧ IsPullback i' αY αZ i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.refine'_5.mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ (∀ (j : WalkingSpan),\n      IsPullback (NatTrans.app (CommSq.cocone w).ι j)\n        (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) j) αZ\n        (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι j)) →\n    IsPullback h' αX αZ h ∧ IsPullback i' αY αZ i\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr.refine'_5.mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh✝ : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h✝ i\nH : IsVanKampenColimit (PushoutCocone.mk h✝ i (_ : f ≫ h✝ = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h✝\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nh :\n  ∀ (j : WalkingSpan),\n    IsPullback (NatTrans.app (CommSq.cocone w).ι j)\n      (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) j) αZ\n      (NatTrans.app (PushoutCocone.mk h✝ i (_ : f ≫ h✝ = g ≫ i)).ι j)\n⊢ IsPullback h' αX αZ h✝ ∧ IsPullback i' αY αZ i\n[PROOFSTEP]\nexact ⟨h WalkingCospan.left, h WalkingCospan.right⟩\n[GOAL]\ncase mpr.refine'_5.mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ IsPullback h' αX αZ h ∧ IsPullback i' αY αZ i →\n    ∀ (j : WalkingSpan),\n      IsPullback (NatTrans.app (CommSq.cocone w).ι j)\n        (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) j) αZ\n        (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι j)\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩ (_ | _ | _)\n[GOAL]\ncase mpr.refine'_5.mpr.intro.none\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nh₁ : IsPullback h' αX αZ h\nh₂ : IsPullback i' αY αZ i\n⊢ IsPullback (NatTrans.app (CommSq.cocone w).ι none)\n    (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY) none) αZ\n    (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι none)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mpr.refine'_5.mpr.intro.none\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nh₁ : IsPullback h' αX αZ h\nh₂ : IsPullback i' αY αZ i\n⊢ IsPullback (NatTrans.app (CommSq.cocone w).ι none) αW αZ (f ≫ h)\n[PROOFSTEP]\nrw [PushoutCocone.condition_zero]\n[GOAL]\ncase mpr.refine'_5.mpr.intro.none\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nh₁ : IsPullback h' αX αZ h\nh₂ : IsPullback i' αY αZ i\n⊢ IsPullback (f' ≫ PushoutCocone.inl (CommSq.cocone w)) αW αZ (f ≫ h)\n[PROOFSTEP]\nexact hf.paste_horiz h₁\n[GOAL]\ncase mpr.refine'_5.mpr.intro.some.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nh₁ : IsPullback h' αX αZ h\nh₂ : IsPullback i' αY αZ i\n⊢ IsPullback (NatTrans.app (CommSq.cocone w).ι (some WalkingPair.left))\n    (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY)\n      (some WalkingPair.left))\n    αZ (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι (some WalkingPair.left))\ncase mpr.refine'_5.mpr.intro.some.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nh₁ : IsPullback h' αX αZ h\nh₂ : IsPullback i' αY αZ i\n⊢ IsPullback (NatTrans.app (CommSq.cocone w).ι (some WalkingPair.right))\n    (NatTrans.app (NatTrans.mk fun X_1 => Option.casesOn X_1 αW fun val => WalkingPair.casesOn val αX αY)\n      (some WalkingPair.right))\n    αZ (NatTrans.app (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i)).ι (some WalkingPair.right))\n[PROOFSTEP]\nexacts [h₁, h₂]\n[GOAL]\ncase mpr.refine'_1\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\nH✝ : IsPushout f g h i\nH : IsVanKampenColimit (PushoutCocone.mk h i (_ : f ≫ h = g ≫ i))\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY g\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ IsPushout f' g' h' i' ↔ Nonempty (IsColimit (CommSq.cocone w))\n[PROOFSTEP]\nexact ⟨fun h => h.2, fun h => ⟨w, h⟩⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\n⊢ Nonempty (IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)) ↔ IsPushout f (BinaryCofan.inl c) iY fE\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\n⊢ Nonempty (IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)) → IsPushout f (BinaryCofan.inl c) iY fE\n[PROOFSTEP]\nrintro ⟨h⟩\n[GOAL]\ncase mp.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\n⊢ IsPushout f (BinaryCofan.inl c) iY fE\n[PROOFSTEP]\nrefine' ⟨H, ⟨Limits.PushoutCocone.isColimitAux' _ _⟩⟩\n[GOAL]\ncase mp.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\n⊢ (s : PushoutCocone f (BinaryCofan.inl c)) →\n    { l //\n      PushoutCocone.inl (PushoutCocone.mk iY fE (_ : f ≫ iY = BinaryCofan.inl c ≫ fE)) ≫ l = PushoutCocone.inl s ∧\n        PushoutCocone.inr (PushoutCocone.mk iY fE (_ : f ≫ iY = BinaryCofan.inl c ≫ fE)) ≫ l = PushoutCocone.inr s ∧\n          ∀ {m : (PushoutCocone.mk iY fE (_ : f ≫ iY = BinaryCofan.inl c ≫ fE)).pt ⟶ s.pt},\n            PushoutCocone.inl (PushoutCocone.mk iY fE (_ : f ≫ iY = BinaryCofan.inl c ≫ fE)) ≫ m = PushoutCocone.inl s →\n              PushoutCocone.inr (PushoutCocone.mk iY fE (_ : f ≫ iY = BinaryCofan.inl c ≫ fE)) ≫ m =\n                  PushoutCocone.inr s →\n                m = l }\n[PROOFSTEP]\nintro s\n[GOAL]\ncase mp.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\n⊢ { l //\n    PushoutCocone.inl (PushoutCocone.mk iY fE (_ : f ≫ iY = BinaryCofan.inl c ≫ fE)) ≫ l = PushoutCocone.inl s ∧\n      PushoutCocone.inr (PushoutCocone.mk iY fE (_ : f ≫ iY = BinaryCofan.inl c ≫ fE)) ≫ l = PushoutCocone.inr s ∧\n        ∀ {m : (PushoutCocone.mk iY fE (_ : f ≫ iY = BinaryCofan.inl c ≫ fE)).pt ⟶ s.pt},\n          PushoutCocone.inl (PushoutCocone.mk iY fE (_ : f ≫ iY = BinaryCofan.inl c ≫ fE)) ≫ m = PushoutCocone.inl s →\n            PushoutCocone.inr (PushoutCocone.mk iY fE (_ : f ≫ iY = BinaryCofan.inl c ≫ fE)) ≫ m = PushoutCocone.inr s →\n              m = l }\n[PROOFSTEP]\ndsimp only [PushoutCocone.inr, PushoutCocone.mk]\n  -- Porting note: Originally `dsimp`\n[GOAL]\ncase mp.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\n⊢ { l //\n    PushoutCocone.inl\n            { pt := YE, ι := NatTrans.mk fun j => Option.rec (f ≫ iY) (fun val => WalkingPair.rec iY fE val) j } ≫\n          l =\n        PushoutCocone.inl s ∧\n      fE ≫ l = NatTrans.app s.ι WalkingSpan.right ∧\n        ∀ {m : YE ⟶ s.pt},\n          PushoutCocone.inl\n                  { pt := YE, ι := NatTrans.mk fun j => Option.rec (f ≫ iY) (fun val => WalkingPair.rec iY fE val) j } ≫\n                m =\n              PushoutCocone.inl s →\n            fE ≫ m = NatTrans.app s.ι WalkingSpan.right → m = l }\n[PROOFSTEP]\nrefine' ⟨h.desc (BinaryCofan.mk (c.inr ≫ s.inr) s.inl), h.fac _ ⟨WalkingPair.right⟩, _, _⟩\n[GOAL]\ncase mp.intro.refine'_1\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\n⊢ fE ≫ IsColimit.desc h (BinaryCofan.mk (BinaryCofan.inr c ≫ PushoutCocone.inr s) (PushoutCocone.inl s)) =\n    NatTrans.app s.ι WalkingSpan.right\n[PROOFSTEP]\napply BinaryCofan.IsColimit.hom_ext hc\n[GOAL]\ncase mp.intro.refine'_1.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\n⊢ BinaryCofan.inl c ≫\n      fE ≫ IsColimit.desc h (BinaryCofan.mk (BinaryCofan.inr c ≫ PushoutCocone.inr s) (PushoutCocone.inl s)) =\n    BinaryCofan.inl c ≫ NatTrans.app s.ι WalkingSpan.right\n[PROOFSTEP]\nrw [← H.w_assoc]\n[GOAL]\ncase mp.intro.refine'_1.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\n⊢ f ≫ iY ≫ IsColimit.desc h (BinaryCofan.mk (BinaryCofan.inr c ≫ PushoutCocone.inr s) (PushoutCocone.inl s)) =\n    BinaryCofan.inl c ≫ NatTrans.app s.ι WalkingSpan.right\n[PROOFSTEP]\nerw [h.fac _ ⟨WalkingPair.right⟩]\n[GOAL]\ncase mp.intro.refine'_1.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\n⊢ f ≫\n      NatTrans.app (BinaryCofan.mk (BinaryCofan.inr c ≫ PushoutCocone.inr s) (PushoutCocone.inl s)).ι\n        { as := WalkingPair.right } =\n    BinaryCofan.inl c ≫ NatTrans.app s.ι WalkingSpan.right\n[PROOFSTEP]\nexact s.condition\n[GOAL]\ncase mp.intro.refine'_1.h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\n⊢ BinaryCofan.inr c ≫\n      fE ≫ IsColimit.desc h (BinaryCofan.mk (BinaryCofan.inr c ≫ PushoutCocone.inr s) (PushoutCocone.inl s)) =\n    BinaryCofan.inr c ≫ NatTrans.app s.ι WalkingSpan.right\n[PROOFSTEP]\nrw [← Category.assoc]\n[GOAL]\ncase mp.intro.refine'_1.h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\n⊢ (BinaryCofan.inr c ≫ fE) ≫\n      IsColimit.desc h (BinaryCofan.mk (BinaryCofan.inr c ≫ PushoutCocone.inr s) (PushoutCocone.inl s)) =\n    BinaryCofan.inr c ≫ NatTrans.app s.ι WalkingSpan.right\n[PROOFSTEP]\nexact h.fac _ ⟨WalkingPair.left⟩\n[GOAL]\ncase mp.intro.refine'_2\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\n⊢ ∀ {m : YE ⟶ s.pt},\n    PushoutCocone.inl\n            { pt := YE, ι := NatTrans.mk fun j => Option.rec (f ≫ iY) (fun val => WalkingPair.rec iY fE val) j } ≫\n          m =\n        PushoutCocone.inl s →\n      fE ≫ m = NatTrans.app s.ι WalkingSpan.right →\n        m = IsColimit.desc h (BinaryCofan.mk (BinaryCofan.inr c ≫ PushoutCocone.inr s) (PushoutCocone.inl s))\n[PROOFSTEP]\nintro m e₁ e₂\n[GOAL]\ncase mp.intro.refine'_2\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\nm : YE ⟶ s.pt\ne₁ :\n  PushoutCocone.inl\n        { pt := YE, ι := NatTrans.mk fun j => Option.rec (f ≫ iY) (fun val => WalkingPair.rec iY fE val) j } ≫\n      m =\n    PushoutCocone.inl s\ne₂ : fE ≫ m = NatTrans.app s.ι WalkingSpan.right\n⊢ m = IsColimit.desc h (BinaryCofan.mk (BinaryCofan.inr c ≫ PushoutCocone.inr s) (PushoutCocone.inl s))\n[PROOFSTEP]\napply BinaryCofan.IsColimit.hom_ext h\n[GOAL]\ncase mp.intro.refine'_2.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\nm : YE ⟶ s.pt\ne₁ :\n  PushoutCocone.inl\n        { pt := YE, ι := NatTrans.mk fun j => Option.rec (f ≫ iY) (fun val => WalkingPair.rec iY fE val) j } ≫\n      m =\n    PushoutCocone.inl s\ne₂ : fE ≫ m = NatTrans.app s.ι WalkingSpan.right\n⊢ BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY) ≫ m =\n    BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY) ≫\n      IsColimit.desc h (BinaryCofan.mk (BinaryCofan.inr c ≫ PushoutCocone.inr s) (PushoutCocone.inl s))\n[PROOFSTEP]\ndsimp only [BinaryCofan.mk, id]\n  -- Porting note: Originally `dsimp`\n[GOAL]\ncase mp.intro.refine'_2.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\nm : YE ⟶ s.pt\ne₁ :\n  PushoutCocone.inl\n        { pt := YE, ι := NatTrans.mk fun j => Option.rec (f ≫ iY) (fun val => WalkingPair.rec iY fE val) j } ≫\n      m =\n    PushoutCocone.inl s\ne₂ : fE ≫ m = NatTrans.app s.ι WalkingSpan.right\n⊢ BinaryCofan.inl\n        { pt := YE,\n          ι :=\n            NatTrans.mk fun x =>\n              WalkingPair.rec (motive := fun t =>\n                x.as = t →\n                  ((pair ((pair X E).obj { as := WalkingPair.right }) Y).obj { as := x.as } ⟶\n                    ((Functor.const (Discrete WalkingPair)).obj YE).obj { as := x.as }))\n                (fun h => (_ : WalkingPair.left = x.as) ▸ BinaryCofan.inr c ≫ fE)\n                (fun h => (_ : WalkingPair.right = x.as) ▸ iY) x.as (_ : x.as = x.as) } ≫\n      m =\n    BinaryCofan.inl\n        { pt := YE,\n          ι :=\n            NatTrans.mk fun x =>\n              WalkingPair.rec (motive := fun t =>\n                x.as = t →\n                  ((pair ((pair X E).obj { as := WalkingPair.right }) Y).obj { as := x.as } ⟶\n                    ((Functor.const (Discrete WalkingPair)).obj YE).obj { as := x.as }))\n                (fun h => (_ : WalkingPair.left = x.as) ▸ BinaryCofan.inr c ≫ fE)\n                (fun h => (_ : WalkingPair.right = x.as) ▸ iY) x.as (_ : x.as = x.as) } ≫\n      IsColimit.desc h\n        { pt := s.pt,\n          ι :=\n            NatTrans.mk fun x =>\n              WalkingPair.rec (motive := fun t =>\n                x.as = t →\n                  ((pair ((pair X E).obj { as := WalkingPair.right }) Y).obj { as := x.as } ⟶\n                    ((Functor.const (Discrete WalkingPair)).obj s.pt).obj { as := x.as }))\n                (fun h => (_ : WalkingPair.left = x.as) ▸ BinaryCofan.inr c ≫ PushoutCocone.inr s)\n                (fun h => (_ : WalkingPair.right = x.as) ▸ PushoutCocone.inl s) x.as (_ : x.as = x.as) }\n[PROOFSTEP]\nrw [Category.assoc, e₂, eq_comm]\n[GOAL]\ncase mp.intro.refine'_2.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\nm : YE ⟶ s.pt\ne₁ :\n  PushoutCocone.inl\n        { pt := YE, ι := NatTrans.mk fun j => Option.rec (f ≫ iY) (fun val => WalkingPair.rec iY fE val) j } ≫\n      m =\n    PushoutCocone.inl s\ne₂ : fE ≫ m = NatTrans.app s.ι WalkingSpan.right\n⊢ BinaryCofan.inl\n        { pt := YE,\n          ι :=\n            NatTrans.mk fun x =>\n              WalkingPair.rec (motive := fun t =>\n                x.as = t →\n                  ((pair ((pair X E).obj { as := WalkingPair.right }) Y).obj { as := x.as } ⟶\n                    ((Functor.const (Discrete WalkingPair)).obj YE).obj { as := x.as }))\n                (fun h => (_ : WalkingPair.left = x.as) ▸ BinaryCofan.inr c ≫ fE)\n                (fun h => (_ : WalkingPair.right = x.as) ▸ iY) x.as (_ : x.as = x.as) } ≫\n      IsColimit.desc h\n        { pt := s.pt,\n          ι :=\n            NatTrans.mk fun x =>\n              WalkingPair.rec (motive := fun t =>\n                x.as = t →\n                  ((pair ((pair X E).obj { as := WalkingPair.right }) Y).obj { as := x.as } ⟶\n                    ((Functor.const (Discrete WalkingPair)).obj s.pt).obj { as := x.as }))\n                (fun h => (_ : WalkingPair.left = x.as) ▸ BinaryCofan.inr c ≫ PushoutCocone.inr s)\n                (fun h => (_ : WalkingPair.right = x.as) ▸ PushoutCocone.inl s) x.as (_ : x.as = x.as) } =\n    BinaryCofan.inr c ≫ NatTrans.app s.ι WalkingSpan.right\n[PROOFSTEP]\nexact h.fac _ ⟨WalkingPair.left⟩\n[GOAL]\ncase mp.intro.refine'_2.h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\nm : YE ⟶ s.pt\ne₁ :\n  PushoutCocone.inl\n        { pt := YE, ι := NatTrans.mk fun j => Option.rec (f ≫ iY) (fun val => WalkingPair.rec iY fE val) j } ≫\n      m =\n    PushoutCocone.inl s\ne₂ : fE ≫ m = NatTrans.app s.ι WalkingSpan.right\n⊢ BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY) ≫ m =\n    BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY) ≫\n      IsColimit.desc h (BinaryCofan.mk (BinaryCofan.inr c ≫ PushoutCocone.inr s) (PushoutCocone.inl s))\n[PROOFSTEP]\nrefine' e₁.trans (Eq.symm _)\n[GOAL]\ncase mp.intro.refine'_2.h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh✝ : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\nh : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\ns : PushoutCocone f (BinaryCofan.inl c)\nm : YE ⟶ s.pt\ne₁ :\n  PushoutCocone.inl\n        { pt := YE, ι := NatTrans.mk fun j => Option.rec (f ≫ iY) (fun val => WalkingPair.rec iY fE val) j } ≫\n      m =\n    PushoutCocone.inl s\ne₂ : fE ≫ m = NatTrans.app s.ι WalkingSpan.right\n⊢ BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY) ≫\n      IsColimit.desc h (BinaryCofan.mk (BinaryCofan.inr c ≫ PushoutCocone.inr s) (PushoutCocone.inl s)) =\n    PushoutCocone.inl s\n[PROOFSTEP]\nexact h.fac _ _\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH : CommSq f (BinaryCofan.inl c) iY fE\n⊢ IsPushout f (BinaryCofan.inl c) iY fE → Nonempty (IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY))\n[PROOFSTEP]\nrefine' fun H => ⟨_⟩\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\n⊢ IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ fE) iY)\n[PROOFSTEP]\nfapply Limits.BinaryCofan.isColimitMk\n[GOAL]\ncase mpr.desc\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\n⊢ (s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y) → YE ⟶ s.pt\n[PROOFSTEP]\nexact fun s =>\n  H.isColimit.desc (PushoutCocone.mk s.inr _ <| (hc.fac (BinaryCofan.mk (f ≫ s.inr) s.inl) ⟨WalkingPair.left⟩).symm)\n[GOAL]\ncase mpr.fac_left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\n⊢ ∀ (s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y),\n    (BinaryCofan.inr c ≫ fE) ≫\n        IsColimit.desc (IsPushout.isColimit H)\n          (PushoutCocone.mk (BinaryCofan.inr s)\n            (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n            (_ :\n              NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n                NatTrans.app c.ι { as := WalkingPair.left } ≫\n                  IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))) =\n      BinaryCofan.inl s\n[PROOFSTEP]\nintro s\n[GOAL]\ncase mpr.fac_left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\n⊢ (BinaryCofan.inr c ≫ fE) ≫\n      IsColimit.desc (IsPushout.isColimit H)\n        (PushoutCocone.mk (BinaryCofan.inr s)\n          (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n          (_ :\n            NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n              NatTrans.app c.ι { as := WalkingPair.left } ≫\n                IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))) =\n    BinaryCofan.inl s\n[PROOFSTEP]\nerw [Category.assoc, H.isColimit.fac _ WalkingSpan.right, hc.fac]\n[GOAL]\ncase mpr.fac_left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\n⊢ NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.right } =\n    BinaryCofan.inl s\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr.fac_right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\n⊢ ∀ (s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y),\n    iY ≫\n        IsColimit.desc (IsPushout.isColimit H)\n          (PushoutCocone.mk (BinaryCofan.inr s)\n            (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n            (_ :\n              NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n                NatTrans.app c.ι { as := WalkingPair.left } ≫\n                  IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))) =\n      BinaryCofan.inr s\n[PROOFSTEP]\nintro s\n[GOAL]\ncase mpr.fac_right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\n⊢ iY ≫\n      IsColimit.desc (IsPushout.isColimit H)\n        (PushoutCocone.mk (BinaryCofan.inr s)\n          (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n          (_ :\n            NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n              NatTrans.app c.ι { as := WalkingPair.left } ≫\n                IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))) =\n    BinaryCofan.inr s\n[PROOFSTEP]\nexact H.isColimit.fac _ WalkingSpan.left\n[GOAL]\ncase mpr.uniq\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\n⊢ ∀ (s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y) (m : YE ⟶ s.pt),\n    (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s →\n      iY ≫ m = BinaryCofan.inr s →\n        m =\n          IsColimit.desc (IsPushout.isColimit H)\n            (PushoutCocone.mk (BinaryCofan.inr s)\n              (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n              (_ :\n                NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n                  NatTrans.app c.ι { as := WalkingPair.left } ≫\n                    IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s))))\n[PROOFSTEP]\nintro s m e₁ e₂\n[GOAL]\ncase mpr.uniq\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\nm : YE ⟶ s.pt\ne₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s\ne₂ : iY ≫ m = BinaryCofan.inr s\n⊢ m =\n    IsColimit.desc (IsPushout.isColimit H)\n      (PushoutCocone.mk (BinaryCofan.inr s)\n        (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n        (_ :\n          NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n            NatTrans.app c.ι { as := WalkingPair.left } ≫\n              IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s))))\n[PROOFSTEP]\napply PushoutCocone.IsColimit.hom_ext H.isColimit\n[GOAL]\ncase mpr.uniq.h₀\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\nm : YE ⟶ s.pt\ne₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s\ne₂ : iY ≫ m = BinaryCofan.inr s\n⊢ PushoutCocone.inl (IsPushout.cocone H) ≫ m =\n    PushoutCocone.inl (IsPushout.cocone H) ≫\n      IsColimit.desc (IsPushout.isColimit H)\n        (PushoutCocone.mk (BinaryCofan.inr s)\n          (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n          (_ :\n            NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n              NatTrans.app c.ι { as := WalkingPair.left } ≫\n                IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s))))\n[PROOFSTEP]\nsymm\n[GOAL]\ncase mpr.uniq.h₀\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\nm : YE ⟶ s.pt\ne₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s\ne₂ : iY ≫ m = BinaryCofan.inr s\n⊢ PushoutCocone.inl (IsPushout.cocone H) ≫\n      IsColimit.desc (IsPushout.isColimit H)\n        (PushoutCocone.mk (BinaryCofan.inr s)\n          (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n          (_ :\n            NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n              NatTrans.app c.ι { as := WalkingPair.left } ≫\n                IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))) =\n    PushoutCocone.inl (IsPushout.cocone H) ≫ m\n[PROOFSTEP]\nexact (H.isColimit.fac _ WalkingSpan.left).trans e₂.symm\n[GOAL]\ncase mpr.uniq.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\nm : YE ⟶ s.pt\ne₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s\ne₂ : iY ≫ m = BinaryCofan.inr s\n⊢ PushoutCocone.inr (IsPushout.cocone H) ≫ m =\n    PushoutCocone.inr (IsPushout.cocone H) ≫\n      IsColimit.desc (IsPushout.isColimit H)\n        (PushoutCocone.mk (BinaryCofan.inr s)\n          (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n          (_ :\n            NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n              NatTrans.app c.ι { as := WalkingPair.left } ≫\n                IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s))))\n[PROOFSTEP]\nerw [H.isColimit.fac _ WalkingSpan.right]\n[GOAL]\ncase mpr.uniq.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\nm : YE ⟶ s.pt\ne₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s\ne₂ : iY ≫ m = BinaryCofan.inr s\n⊢ PushoutCocone.inr (IsPushout.cocone H) ≫ m =\n    NatTrans.app\n      (PushoutCocone.mk (BinaryCofan.inr s)\n          (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n          (_ :\n            NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n              NatTrans.app c.ι { as := WalkingPair.left } ≫\n                IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))).ι\n      WalkingSpan.right\n[PROOFSTEP]\napply BinaryCofan.IsColimit.hom_ext hc\n[GOAL]\ncase mpr.uniq.h₁.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\nm : YE ⟶ s.pt\ne₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s\ne₂ : iY ≫ m = BinaryCofan.inr s\n⊢ BinaryCofan.inl c ≫ PushoutCocone.inr (IsPushout.cocone H) ≫ m =\n    BinaryCofan.inl c ≫\n      NatTrans.app\n        (PushoutCocone.mk (BinaryCofan.inr s)\n            (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n            (_ :\n              NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n                NatTrans.app c.ι { as := WalkingPair.left } ≫\n                  IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))).ι\n        WalkingSpan.right\n[PROOFSTEP]\nerw [hc.fac, ← H.w_assoc, e₂]\n[GOAL]\ncase mpr.uniq.h₁.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\nm : YE ⟶ s.pt\ne₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s\ne₂ : iY ≫ m = BinaryCofan.inr s\n⊢ f ≫ BinaryCofan.inr s =\n    NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr.uniq.h₁.h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\nm : YE ⟶ s.pt\ne₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s\ne₂ : iY ≫ m = BinaryCofan.inr s\n⊢ BinaryCofan.inr c ≫ PushoutCocone.inr (IsPushout.cocone H) ≫ m =\n    BinaryCofan.inr c ≫\n      NatTrans.app\n        (PushoutCocone.mk (BinaryCofan.inr s)\n            (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n            (_ :\n              NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n                NatTrans.app c.ι { as := WalkingPair.left } ≫\n                  IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))).ι\n        WalkingSpan.right\n[PROOFSTEP]\nrefine' ((Category.assoc _ _ _).symm.trans e₁).trans _\n[GOAL]\ncase mpr.uniq.h₁.h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\nm : YE ⟶ s.pt\ne₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s\ne₂ : iY ≫ m = BinaryCofan.inr s\n⊢ BinaryCofan.inl s =\n    BinaryCofan.inr c ≫\n      NatTrans.app\n        (PushoutCocone.mk (BinaryCofan.inr s)\n            (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n            (_ :\n              NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n                NatTrans.app c.ι { as := WalkingPair.left } ≫\n                  IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))).ι\n        WalkingSpan.right\n[PROOFSTEP]\nsymm\n[GOAL]\ncase mpr.uniq.h₁.h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nW X✝ Y✝ Z : C\nf✝ : W ⟶ X✝\ng : W ⟶ Y✝\nh : X✝ ⟶ Z\ni : Y✝ ⟶ Z\nX E Y YE : C\nc : BinaryCofan X E\nhc : IsColimit c\nf : X ⟶ Y\niY : Y ⟶ YE\nfE : c.pt ⟶ YE\nH✝ : CommSq f (BinaryCofan.inl c) iY fE\nH : IsPushout f (BinaryCofan.inl c) iY fE\ns : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y\nm : YE ⟶ s.pt\ne₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s\ne₂ : iY ≫ m = BinaryCofan.inr s\n⊢ BinaryCofan.inr c ≫\n      NatTrans.app\n        (PushoutCocone.mk (BinaryCofan.inr s)\n            (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))\n            (_ :\n              NatTrans.app (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι { as := WalkingPair.left } =\n                NatTrans.app c.ι { as := WalkingPair.left } ≫\n                  IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))).ι\n        WalkingSpan.right =\n    BinaryCofan.inl s\n[PROOFSTEP]\nexact hc.fac _ _\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\n⊢ IsVanKampen H\n[PROOFSTEP]\nobtain ⟨hc₁⟩ := (is_coprod_iff_isPushout c hc H.1).mpr H\n[GOAL]\ncase intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\n⊢ IsVanKampen H\n[PROOFSTEP]\nintrov W' hf hg hh hi w\n[GOAL]\ncase intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\n⊢ IsPushout f' g' h' i' ↔ IsPullback h' αX αZ h ∧ IsPullback i' αY αZ i\n[PROOFSTEP]\nobtain ⟨hc₂⟩ :=\n  ((BinaryCofan.isVanKampen_iff _).mp (FinitaryExtensive.vanKampen c hc) (BinaryCofan.mk _ pullback.fst) _ _ _ hg.w.symm\n        pullback.condition.symm).mpr\n    ⟨hg, IsPullback.of_hasPullback αY c.inr⟩\n[GOAL]\ncase intro.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\n⊢ IsPushout f' g' h' i' ↔ IsPullback h' αX αZ h ∧ IsPullback i' αY αZ i\n[PROOFSTEP]\nrefine' (is_coprod_iff_isPushout _ hc₂ w).symm.trans _\n[GOAL]\ncase intro.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\n⊢ Nonempty (IsColimit (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) ↔\n    IsPullback h' αX αZ h ∧ IsPullback i' αY αZ i\n[PROOFSTEP]\nrefine'\n  ((BinaryCofan.isVanKampen_iff _).mp (FinitaryExtensive.vanKampen _ hc₁) (BinaryCofan.mk _ _) pullback.snd _ _ _\n        hh.w.symm).trans\n    _\n[GOAL]\ncase intro.intro.refine'_1\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\n⊢ pullback.snd ≫ BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h) =\n    BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h') ≫ αZ\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro.refine'_1\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\n⊢ pullback.snd ≫ BinaryCofan.inr c ≫ i = (pullback.fst ≫ i') ≫ αZ\n[PROOFSTEP]\nrw [← pullback.condition_assoc, Category.assoc, hi.w]\n[GOAL]\ncase intro.intro.refine'_2\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\n⊢ IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n        αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)) ∧\n      IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n        (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)) ↔\n    IsPullback h' αX αZ h ∧ IsPullback i' αY αZ i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.intro.refine'_2.mp\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\n⊢ IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n        αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)) ∧\n      IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n        (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)) →\n    IsPullback h' αX αZ h ∧ IsPullback i' αY αZ i\n[PROOFSTEP]\nrintro ⟨hc₃, hc₄⟩\n[GOAL]\ncase intro.intro.refine'_2.mp.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\n⊢ IsPullback h' αX αZ h ∧ IsPullback i' αY αZ i\n[PROOFSTEP]\nrefine' ⟨hc₄, _⟩\n[GOAL]\ncase intro.intro.refine'_2.mp.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\n⊢ IsPullback i' αY αZ i\n[PROOFSTEP]\nlet Y'' := pullback αZ i\n[GOAL]\ncase intro.intro.refine'_2.mp.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\n⊢ IsPullback i' αY αZ i\n[PROOFSTEP]\nlet cmp : Y' ⟶ Y'' := pullback.lift i' αY hi.w\n[GOAL]\ncase intro.intro.refine'_2.mp.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\n⊢ IsPullback i' αY αZ i\n[PROOFSTEP]\nhave e₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ c.inl := by rw [Category.assoc, pullback.lift_snd, hg.w]\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\n⊢ (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\n[PROOFSTEP]\nrw [Category.assoc, pullback.lift_snd, hg.w]\n[GOAL]\ncase intro.intro.refine'_2.mp.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\n⊢ IsPullback i' αY αZ i\n[PROOFSTEP]\nhave e₂ : (pullback.fst ≫ cmp : pullback αY c.inr ⟶ _) ≫ pullback.snd = pullback.snd ≫ c.inr := by\n  rw [Category.assoc, pullback.lift_snd, pullback.condition]\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\n⊢ (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\n[PROOFSTEP]\nrw [Category.assoc, pullback.lift_snd, pullback.condition]\n[GOAL]\ncase intro.intro.refine'_2.mp.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\n⊢ IsPullback i' αY αZ i\n[PROOFSTEP]\nobtain ⟨hc₄⟩ :=\n  ((BinaryCofan.isVanKampen_iff _).mp (FinitaryExtensive.vanKampen c hc) (BinaryCofan.mk _ _) αW _ _ e₁.symm\n        e₂.symm).mpr <|\n    by\n    constructor\n    · apply IsPullback.of_right _ e₁ (IsPullback.of_hasPullback _ _)\n      rw [Category.assoc, pullback.lift_fst, ← H.w, ← w.w]; exact hf.paste_horiz hc₄\n    · apply IsPullback.of_right _ e₂ (IsPullback.of_hasPullback _ _)\n      rw [Category.assoc, pullback.lift_fst]; exact hc₃\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\n⊢ IsPullback (BinaryCofan.inl (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))) αW pullback.snd (BinaryCofan.inl c) ∧\n    IsPullback (BinaryCofan.inr (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))) pullback.snd pullback.snd\n      (BinaryCofan.inr c)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\n⊢ IsPullback (BinaryCofan.inl (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))) αW pullback.snd (BinaryCofan.inl c)\n[PROOFSTEP]\napply IsPullback.of_right _ e₁ (IsPullback.of_hasPullback _ _)\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\n⊢ IsPullback ((g' ≫ cmp) ≫ pullback.fst) αW αZ (BinaryCofan.inl c ≫ i)\n[PROOFSTEP]\nrw [Category.assoc, pullback.lift_fst, ← H.w, ← w.w]\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\n⊢ IsPullback (f' ≫ h') αW αZ (f ≫ h)\n[PROOFSTEP]\nexact hf.paste_horiz hc₄\n[GOAL]\ncase right\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\n⊢ IsPullback (BinaryCofan.inr (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))) pullback.snd pullback.snd\n    (BinaryCofan.inr c)\n[PROOFSTEP]\napply IsPullback.of_right _ e₂ (IsPullback.of_hasPullback _ _)\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\n⊢ IsPullback ((pullback.fst ≫ cmp) ≫ pullback.fst) pullback.snd αZ (BinaryCofan.inr c ≫ i)\n[PROOFSTEP]\nrw [Category.assoc, pullback.lift_fst]\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\n⊢ IsPullback (pullback.fst ≫ i') pullback.snd αZ (BinaryCofan.inr c ≫ i)\n[PROOFSTEP]\nexact hc₃\n[GOAL]\ncase intro.intro.refine'_2.mp.intro.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄✝ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\nhc₄ : IsColimit (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))\n⊢ IsPullback i' αY αZ i\n[PROOFSTEP]\nrw [← Category.id_comp αZ, ← show cmp ≫ pullback.snd = αY from pullback.lift_snd _ _ _]\n[GOAL]\ncase intro.intro.refine'_2.mp.intro.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄✝ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\nhc₄ : IsColimit (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))\n⊢ IsPullback i' (cmp ≫ pullback.snd) (𝟙 Z' ≫ αZ) i\n[PROOFSTEP]\napply IsPullback.paste_vert _ (IsPullback.of_hasPullback αZ i)\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄✝ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\nhc₄ : IsColimit (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))\n⊢ IsPullback i' cmp (𝟙 Z') pullback.fst\n[PROOFSTEP]\nhave : cmp = (hc₂.coconePointUniqueUpToIso hc₄).hom :=\n  by\n  apply BinaryCofan.IsColimit.hom_ext hc₂\n  exacts [(hc₂.comp_coconePointUniqueUpToIso_hom hc₄ ⟨WalkingPair.left⟩).symm,\n    (hc₂.comp_coconePointUniqueUpToIso_hom hc₄ ⟨WalkingPair.right⟩).symm]\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄✝ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\nhc₄ : IsColimit (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))\n⊢ cmp = (IsColimit.coconePointUniqueUpToIso hc₂ hc₄).hom\n[PROOFSTEP]\napply BinaryCofan.IsColimit.hom_ext hc₂\n[GOAL]\ncase h₁\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄✝ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\nhc₄ : IsColimit (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))\n⊢ BinaryCofan.inl (BinaryCofan.mk g' pullback.fst) ≫ cmp =\n    BinaryCofan.inl (BinaryCofan.mk g' pullback.fst) ≫ (IsColimit.coconePointUniqueUpToIso hc₂ hc₄).hom\ncase h₂\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄✝ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\nhc₄ : IsColimit (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))\n⊢ BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ cmp =\n    BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ (IsColimit.coconePointUniqueUpToIso hc₂ hc₄).hom\n[PROOFSTEP]\nexacts [(hc₂.comp_coconePointUniqueUpToIso_hom hc₄ ⟨WalkingPair.left⟩).symm,\n  (hc₂.comp_coconePointUniqueUpToIso_hom hc₄ ⟨WalkingPair.right⟩).symm]\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄✝ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\nhc₄ : IsColimit (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))\nthis : cmp = (IsColimit.coconePointUniqueUpToIso hc₂ hc₄).hom\n⊢ IsPullback i' cmp (𝟙 Z') pullback.fst\n[PROOFSTEP]\nrw [this]\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄✝ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\nhc₄ : IsColimit (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))\nthis : cmp = (IsColimit.coconePointUniqueUpToIso hc₂ hc₄).hom\n⊢ IsPullback i' (IsColimit.coconePointUniqueUpToIso hc₂ hc₄).hom (𝟙 Z') pullback.fst\n[PROOFSTEP]\nexact IsPullback.of_vert_isIso ⟨by rw [← this, Category.comp_id, pullback.lift_fst]⟩\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ :\n  IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n    αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nhc₄✝ :\n  IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n    (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\nY'' : C := pullback αZ i\ncmp : Y' ⟶ Y'' := pullback.lift i' αY (_ : i' ≫ αZ = αY ≫ i)\ne₁ : (g' ≫ cmp) ≫ pullback.snd = αW ≫ BinaryCofan.inl c\ne₂ : (pullback.fst ≫ cmp) ≫ pullback.snd = pullback.snd ≫ BinaryCofan.inr c\nhc₄ : IsColimit (BinaryCofan.mk (g' ≫ cmp) (pullback.fst ≫ cmp))\nthis : cmp = (IsColimit.coconePointUniqueUpToIso hc₂ hc₄).hom\n⊢ i' ≫ 𝟙 Z' = (IsColimit.coconePointUniqueUpToIso hc₂ hc₄).hom ≫ pullback.fst\n[PROOFSTEP]\nrw [← this, Category.comp_id, pullback.lift_fst]\n[GOAL]\ncase intro.intro.refine'_2.mpr\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\n⊢ IsPullback h' αX αZ h ∧ IsPullback i' αY αZ i →\n    IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h'))\n        pullback.snd αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)) ∧\n      IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n        (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\n[PROOFSTEP]\nrintro ⟨hc₃, hc₄⟩\n[GOAL]\ncase intro.intro.refine'_2.mpr.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC : Type u\ninst✝² : Category.{v, u} C\nW✝ X✝ Y Z✝ : C\nf✝ : W✝ ⟶ X✝\ng : W✝ ⟶ Y\nh✝ : X✝ ⟶ Z✝\ni✝ : Y ⟶ Z✝\nW E X Z : C\nc : BinaryCofan W E\ninst✝¹ : FinitaryExtensive C\ninst✝ : HasPullbacks C\nhc : IsColimit c\nf : W ⟶ X\nh : X ⟶ Z\ni : c.pt ⟶ Z\nH : IsPushout f (BinaryCofan.inl c) h i\nhc₁ : IsColimit (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)\nW' X' Y' Z' : C\nf' : W' ⟶ X'\ng' : W' ⟶ Y'\nh' : X' ⟶ Z'\ni' : Y' ⟶ Z'\nαW : W' ⟶ W\nαX : X' ⟶ X\nαY : Y' ⟶ ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left }\nαZ : Z' ⟶ Z\nhf : IsPullback f' αW αX f\nhg : IsPullback g' αW αY (BinaryCofan.inl c)\nhh : CommSq h' αX αZ h\nhi : CommSq i' αY αZ i\nw : CommSq f' g' h' i'\nhc₂ : IsColimit (BinaryCofan.mk g' pullback.fst)\nhc₃ : IsPullback h' αX αZ h\nhc₄ : IsPullback i' αY αZ i\n⊢ IsPullback (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) pullback.snd\n      αZ (BinaryCofan.inl (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h)) ∧\n    IsPullback (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr (BinaryCofan.mk g' pullback.fst) ≫ i') h')) αX αZ\n      (BinaryCofan.inr (BinaryCofan.mk (BinaryCofan.inr c ≫ i) h))\n[PROOFSTEP]\nexact ⟨(IsPullback.of_hasPullback αY c.inr).paste_horiz hc₄, hc₃⟩\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\ninst✝ : Mono f\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ g ≫ 𝟙 Y = 𝟙 W ≫ g\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\ninst✝ : Mono f\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ 𝟙 W ≫ g = g ≫ 𝟙 Y\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\ninst✝ : Mono f\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ 𝟙 W ≫ g = g ≫ 𝟙 Y\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\ninst✝ : Mono g\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ f ≫ 𝟙 X = 𝟙 W ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\ninst✝ : Mono g\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ f ≫ 𝟙 X = 𝟙 W ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\ninst✝ : Mono g\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ f ≫ 𝟙 X = 𝟙 W ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\ninst✝ : Mono f\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ g ≫ 𝟙 Y = 𝟙 W ≫ g\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\ninst✝ : Mono f\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ 𝟙 W ≫ g = g ≫ 𝟙 Y\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\ninst✝ : Mono f\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ 𝟙 W ≫ g = g ≫ 𝟙 Y\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\ninst✝ : Mono g\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ f ≫ 𝟙 X = 𝟙 W ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\ninst✝ : Mono g\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ f ≫ 𝟙 X = 𝟙 W ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nW X Y Z : C\nf : W ⟶ X\ng : W ⟶ Y\nh : X ⟶ Z\ni : Y ⟶ Z\ninst✝ : Mono g\nH : IsPushout f g h i\nH' : IsVanKampen H\n⊢ f ≫ 𝟙 X = 𝟙 W ≫ f\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Adhesive", "llama_tokens": 71296, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.749087201911703, "lm_q2_score": 0.49609382947091946, "lm_q1q2_score": 0.37161753860403257}}
{"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nf g : X ⟶ Y\nw : f.f = g.f\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\ng : X ⟶ Y\nf✝ : X.fst ⟶ Y.fst\ncomm✝ : ∀ (U : C), (f✝ ⊗ 𝟙 U) ≫ (HalfBraiding.β Y.snd U).hom = (HalfBraiding.β X.snd U).hom ≫ (𝟙 U ⊗ f✝)\nw : (Hom.mk f✝).f = g.f\n⊢ Hom.mk f✝ = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nf✝¹ : X.fst ⟶ Y.fst\ncomm✝¹ : ∀ (U : C), (f✝¹ ⊗ 𝟙 U) ≫ (HalfBraiding.β Y.snd U).hom = (HalfBraiding.β X.snd U).hom ≫ (𝟙 U ⊗ f✝¹)\nf✝ : X.fst ⟶ Y.fst\ncomm✝ : ∀ (U : C), (f✝ ⊗ 𝟙 U) ≫ (HalfBraiding.β Y.snd U).hom = (HalfBraiding.β X.snd U).hom ≫ (𝟙 U ⊗ f✝)\nw : (Hom.mk f✝¹).f = (Hom.mk f✝).f\n⊢ Hom.mk f✝¹ = Hom.mk f✝\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\nX Y : Center C\nf : X ⟶ Y\ninst✝ : IsIso f.f\nU : C\n⊢ (inv f.f ⊗ 𝟙 U) ≫ (HalfBraiding.β X.snd U).hom = (HalfBraiding.β Y.snd U).hom ≫ (𝟙 U ⊗ inv f.f)\n[PROOFSTEP]\nsimp [← cancel_epi (f.f ⊗ 𝟙 U), ← comp_tensor_id_assoc, ← id_tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\nX Y : Center C\nf : X ⟶ Y\ninst✝ : IsIso f.f\n⊢ IsIso f\n[PROOFSTEP]\nchange IsIso (isoMk f).hom\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\nX Y : Center C\nf : X ⟶ Y\ninst✝ : IsIso f.f\n⊢ IsIso (isoMk f).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n⊢ ((fun U =>\n          α_ X.fst Y.fst U ≪≫\n            (Iso.refl X.fst ⊗ HalfBraiding.β Y.snd U) ≪≫\n              (α_ X.fst U Y.fst).symm ≪≫ (HalfBraiding.β X.snd U ⊗ Iso.refl Y.fst) ≪≫ α_ U X.fst Y.fst)\n        (U ⊗ U')).hom =\n    (α_ (X.fst ⊗ Y.fst) U U').inv ≫\n      (((fun U =>\n                α_ X.fst Y.fst U ≪≫\n                  (Iso.refl X.fst ⊗ HalfBraiding.β Y.snd U) ≪≫\n                    (α_ X.fst U Y.fst).symm ≪≫ (HalfBraiding.β X.snd U ⊗ Iso.refl Y.fst) ≪≫ α_ U X.fst Y.fst)\n              U).hom ⊗\n          𝟙 U') ≫\n        (α_ U (X.fst ⊗ Y.fst) U').hom ≫\n          (𝟙 U ⊗\n              ((fun U =>\n                    α_ X.fst Y.fst U ≪≫\n                      (Iso.refl X.fst ⊗ HalfBraiding.β Y.snd U) ≪≫\n                        (α_ X.fst U Y.fst).symm ≪≫ (HalfBraiding.β X.snd U ⊗ Iso.refl Y.fst) ≪≫ α_ U X.fst Y.fst)\n                  U').hom) ≫\n            (α_ U U' (X.fst ⊗ Y.fst)).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n⊢ (α_ X.fst Y.fst (U ⊗ U')).hom ≫\n      (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd (U ⊗ U')).hom) ≫\n        (α_ X.fst (U ⊗ U') Y.fst).inv ≫\n          ((HalfBraiding.β X.snd (U ⊗ U')).hom ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ U') X.fst Y.fst).hom =\n    (α_ (X.fst ⊗ Y.fst) U U').inv ≫\n      ((α_ X.fst Y.fst U).hom ≫\n            (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ≫\n              (α_ X.fst U Y.fst).inv ≫ ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ≫ (α_ U X.fst Y.fst).hom ⊗\n          𝟙 U') ≫\n        (α_ U (X.fst ⊗ Y.fst) U').hom ≫\n          (𝟙 U ⊗\n              (α_ X.fst Y.fst U').hom ≫\n                (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n                  (α_ X.fst U' Y.fst).inv ≫ ((HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst) ≫ (α_ U' X.fst Y.fst).hom) ≫\n            (α_ U U' (X.fst ⊗ Y.fst)).inv\n[PROOFSTEP]\nsimp only [comp_tensor_id, id_tensor_comp, Category.assoc, HalfBraiding.monoidal]\n  -- On the RHS, we'd like to commute `((X.snd.β U).hom ⊗ 𝟙 Y.fst) ⊗ 𝟙 U'`\n          -- and `𝟙 U ⊗ 𝟙 X.fst ⊗ (Y.snd.β U').hom` past each other,\n          -- but there are some associators we need to get out of the way first.\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n⊢ (α_ X.fst Y.fst (U ⊗ U')).hom ≫\n      (𝟙 X.fst ⊗ (α_ Y.fst U U').inv) ≫\n        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 U') ≫\n          (𝟙 X.fst ⊗ (α_ U Y.fst U').hom) ≫\n            (𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n              (𝟙 X.fst ⊗ (α_ U U' Y.fst).inv) ≫\n                (α_ X.fst (U ⊗ U') Y.fst).inv ≫\n                  ((α_ X.fst U U').inv ⊗ 𝟙 Y.fst) ≫\n                    (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst) ≫\n                      ((α_ U X.fst U').hom ⊗ 𝟙 Y.fst) ≫\n                        ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst) ≫\n                          ((α_ U U' X.fst).inv ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ U') X.fst Y.fst).hom =\n    (α_ (X.fst ⊗ Y.fst) U U').inv ≫\n      ((α_ X.fst Y.fst U).hom ⊗ 𝟙 U') ≫\n        ((𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U') ≫\n          ((α_ X.fst U Y.fst).inv ⊗ 𝟙 U') ≫\n            (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ⊗ 𝟙 U') ≫\n              ((α_ U X.fst Y.fst).hom ⊗ 𝟙 U') ≫\n                (α_ U (X.fst ⊗ Y.fst) U').hom ≫\n                  (𝟙 U ⊗ (α_ X.fst Y.fst U').hom) ≫\n                    (𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n                      (𝟙 U ⊗ (α_ X.fst U' Y.fst).inv) ≫\n                        (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst) ≫\n                          (𝟙 U ⊗ (α_ U' X.fst Y.fst).hom) ≫ (α_ U U' (X.fst ⊗ Y.fst)).inv\n[PROOFSTEP]\nslice_rhs 6 8 => rw [pentagon]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((α_ U X.fst Y.fst).hom ⊗ 𝟙 U') ≫ (α_ U (X.fst ⊗ Y.fst) U').hom ≫ (𝟙 U ⊗ (α_ X.fst Y.fst U').hom)\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ⊗ 𝟙 U'\n[PROOFSTEP]\nrw [pentagon]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((α_ U X.fst Y.fst).hom ⊗ 𝟙 U') ≫ (α_ U (X.fst ⊗ Y.fst) U').hom ≫ (𝟙 U ⊗ (α_ X.fst Y.fst U').hom)\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ⊗ 𝟙 U'\n[PROOFSTEP]\nrw [pentagon]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((α_ U X.fst Y.fst).hom ⊗ 𝟙 U') ≫ (α_ U (X.fst ⊗ Y.fst) U').hom ≫ (𝟙 U ⊗ (α_ X.fst Y.fst U').hom)\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ⊗ 𝟙 U'\n[PROOFSTEP]\nrw [pentagon]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n⊢ (α_ X.fst Y.fst (U ⊗ U')).hom ≫\n      (𝟙 X.fst ⊗ (α_ Y.fst U U').inv) ≫\n        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 U') ≫\n          (𝟙 X.fst ⊗ (α_ U Y.fst U').hom) ≫\n            (𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n              (𝟙 X.fst ⊗ (α_ U U' Y.fst).inv) ≫\n                (α_ X.fst (U ⊗ U') Y.fst).inv ≫\n                  ((α_ X.fst U U').inv ⊗ 𝟙 Y.fst) ≫\n                    (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst) ≫\n                      ((α_ U X.fst U').hom ⊗ 𝟙 Y.fst) ≫\n                        ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst) ≫\n                          ((α_ U U' X.fst).inv ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ U') X.fst Y.fst).hom =\n    (α_ (X.fst ⊗ Y.fst) U U').inv ≫\n      ((α_ X.fst Y.fst U).hom ⊗ 𝟙 U') ≫\n        ((𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U') ≫\n          ((α_ X.fst U Y.fst).inv ⊗ 𝟙 U') ≫\n            (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ⊗ 𝟙 U') ≫\n              ((((((α_ (U ⊗ X.fst) Y.fst U').hom ≫ (α_ U X.fst (Y.fst ⊗ U')).hom) ≫\n                        (𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom)) ≫\n                      (𝟙 U ⊗ (α_ X.fst U' Y.fst).inv)) ≫\n                    (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst)) ≫\n                  (𝟙 U ⊗ (α_ U' X.fst Y.fst).hom)) ≫\n                (α_ U U' (X.fst ⊗ Y.fst)).inv\n[PROOFSTEP]\nslice_rhs 5 6 => rw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ⊗ 𝟙 U') ≫ (α_ (U ⊗ X.fst) Y.fst U').hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (Y.fst ⊗ U')).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ⊗ 𝟙 U') ≫ (α_ (U ⊗ X.fst) Y.fst U').hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (Y.fst ⊗ U')).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ⊗ 𝟙 U') ≫ (α_ (U ⊗ X.fst) Y.fst U').hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (Y.fst ⊗ U')).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n⊢ (α_ X.fst Y.fst (U ⊗ U')).hom ≫\n      (𝟙 X.fst ⊗ (α_ Y.fst U U').inv) ≫\n        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 U') ≫\n          (𝟙 X.fst ⊗ (α_ U Y.fst U').hom) ≫\n            (𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n              (𝟙 X.fst ⊗ (α_ U U' Y.fst).inv) ≫\n                (α_ X.fst (U ⊗ U') Y.fst).inv ≫\n                  ((α_ X.fst U U').inv ⊗ 𝟙 Y.fst) ≫\n                    (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst) ≫\n                      ((α_ U X.fst U').hom ⊗ 𝟙 Y.fst) ≫\n                        ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst) ≫\n                          ((α_ U U' X.fst).inv ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ U') X.fst Y.fst).hom =\n    (α_ (X.fst ⊗ Y.fst) U U').inv ≫\n      ((α_ X.fst Y.fst U).hom ⊗ 𝟙 U') ≫\n        ((𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U') ≫\n          ((α_ X.fst U Y.fst).inv ⊗ 𝟙 U') ≫\n            (((((((α_ (X.fst ⊗ U) Y.fst U').hom ≫ ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst ⊗ 𝟙 U')) ≫\n                        (α_ U X.fst (Y.fst ⊗ U')).hom) ≫\n                      (𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom)) ≫\n                    (𝟙 U ⊗ (α_ X.fst U' Y.fst).inv)) ≫\n                  (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst)) ≫\n                (𝟙 U ⊗ (α_ U' X.fst Y.fst).hom)) ≫\n              (α_ U U' (X.fst ⊗ Y.fst)).inv\n[PROOFSTEP]\nslice_rhs 7 8 => rw [← associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (Y.fst ⊗ U')).hom ≫ (𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom)\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst ⊗ 𝟙 U'\n[PROOFSTEP]\nrw [← associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (Y.fst ⊗ U')).hom ≫ (𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom)\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst ⊗ 𝟙 U'\n[PROOFSTEP]\nrw [← associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (Y.fst ⊗ U')).hom ≫ (𝟙 U ⊗ 𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U').hom)\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst ⊗ 𝟙 U'\n[PROOFSTEP]\nrw [← associator_naturality]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n⊢ (α_ X.fst Y.fst (U ⊗ U')).hom ≫\n      (𝟙 X.fst ⊗ (α_ Y.fst U U').inv) ≫\n        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 U') ≫\n          (𝟙 X.fst ⊗ (α_ U Y.fst U').hom) ≫\n            (𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n              (𝟙 X.fst ⊗ (α_ U U' Y.fst).inv) ≫\n                (α_ X.fst (U ⊗ U') Y.fst).inv ≫\n                  ((α_ X.fst U U').inv ⊗ 𝟙 Y.fst) ≫\n                    (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst) ≫\n                      ((α_ U X.fst U').hom ⊗ 𝟙 Y.fst) ≫\n                        ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst) ≫\n                          ((α_ U U' X.fst).inv ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ U') X.fst Y.fst).hom =\n    (α_ (X.fst ⊗ Y.fst) U U').inv ≫\n      ((α_ X.fst Y.fst U).hom ⊗ 𝟙 U') ≫\n        ((𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U') ≫\n          ((α_ X.fst U Y.fst).inv ⊗ 𝟙 U') ≫\n            (α_ (X.fst ⊗ U) Y.fst U').hom ≫\n              ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst ⊗ 𝟙 U') ≫\n                ((((((𝟙 U ⊗ 𝟙 X.fst) ⊗ (HalfBraiding.β Y.snd U').hom) ≫ (α_ U X.fst (U' ⊗ Y.fst)).hom) ≫\n                        (𝟙 U ⊗ (α_ X.fst U' Y.fst).inv)) ≫\n                      (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst)) ≫\n                    (𝟙 U ⊗ (α_ U' X.fst Y.fst).hom)) ≫\n                  (α_ U U' (X.fst ⊗ Y.fst)).inv\n[PROOFSTEP]\nslice_rhs 6 7 =>\n  rw [tensor_id, tensor_id, tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id, ← tensor_id, ← tensor_id]\n    -- Now insert associators as needed to make the four half-braidings look identical\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst ⊗ 𝟙 U') ≫ ((𝟙 U ⊗ 𝟙 X.fst) ⊗ (HalfBraiding.β Y.snd U').hom)\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\n[PROOFSTEP]\nrw [tensor_id, tensor_id, tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id, ← tensor_id, ← tensor_id]\n    -- Now insert associators as needed to make the four half-braidings look identical\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst ⊗ 𝟙 U') ≫ ((𝟙 U ⊗ 𝟙 X.fst) ⊗ (HalfBraiding.β Y.snd U').hom)\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\n[PROOFSTEP]\nrw [tensor_id, tensor_id, tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id, ← tensor_id, ← tensor_id]\n    -- Now insert associators as needed to make the four half-braidings look identical\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst ⊗ 𝟙 U') ≫ ((𝟙 U ⊗ 𝟙 X.fst) ⊗ (HalfBraiding.β Y.snd U').hom)\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\n[PROOFSTEP]\nrw [tensor_id, tensor_id, tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id, ← tensor_id, ← tensor_id]\n  -- Now insert associators as needed to make the four half-braidings look identical\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n⊢ (α_ X.fst Y.fst (U ⊗ U')).hom ≫\n      (𝟙 X.fst ⊗ (α_ Y.fst U U').inv) ≫\n        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 U') ≫\n          (𝟙 X.fst ⊗ (α_ U Y.fst U').hom) ≫\n            (𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n              (𝟙 X.fst ⊗ (α_ U U' Y.fst).inv) ≫\n                (α_ X.fst (U ⊗ U') Y.fst).inv ≫\n                  ((α_ X.fst U U').inv ⊗ 𝟙 Y.fst) ≫\n                    (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst) ≫\n                      ((α_ U X.fst U').hom ⊗ 𝟙 Y.fst) ≫\n                        ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst) ≫\n                          ((α_ U U' X.fst).inv ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ U') X.fst Y.fst).hom =\n    (α_ (X.fst ⊗ Y.fst) U U').inv ≫\n      ((α_ X.fst Y.fst U).hom ⊗ 𝟙 U') ≫\n        ((𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U') ≫\n          ((α_ X.fst U Y.fst).inv ⊗ 𝟙 U') ≫\n            (α_ (X.fst ⊗ U) Y.fst U').hom ≫\n              (((((((𝟙 X.fst ⊗ 𝟙 U) ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n                          ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U' ⊗ 𝟙 Y.fst)) ≫\n                        (α_ U X.fst (U' ⊗ Y.fst)).hom) ≫\n                      (𝟙 U ⊗ (α_ X.fst U' Y.fst).inv)) ≫\n                    (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst)) ≫\n                  (𝟙 U ⊗ (α_ U' X.fst Y.fst).hom)) ≫\n                (α_ U U' (X.fst ⊗ Y.fst)).inv\n[PROOFSTEP]\nslice_rhs 10 10 => rw [associator_inv_conjugation]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ 𝟙 U) ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (HalfBraiding.β X.snd U).hom ⊗ 𝟙 U' ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\n[PROOFSTEP]\nrw [associator_inv_conjugation]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ 𝟙 U) ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (HalfBraiding.β X.snd U).hom ⊗ 𝟙 U' ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\n[PROOFSTEP]\nrw [associator_inv_conjugation]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (HalfBraiding.β X.snd U').hom ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ 𝟙 U) ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (HalfBraiding.β X.snd U).hom ⊗ 𝟙 U' ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\n[PROOFSTEP]\nrw [associator_inv_conjugation]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n⊢ (α_ X.fst Y.fst (U ⊗ U')).hom ≫\n      (𝟙 X.fst ⊗ (α_ Y.fst U U').inv) ≫\n        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 U') ≫\n          (𝟙 X.fst ⊗ (α_ U Y.fst U').hom) ≫\n            (𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n              (𝟙 X.fst ⊗ (α_ U U' Y.fst).inv) ≫\n                (α_ X.fst (U ⊗ U') Y.fst).inv ≫\n                  ((α_ X.fst U U').inv ⊗ 𝟙 Y.fst) ≫\n                    (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst) ≫\n                      ((α_ U X.fst U').hom ⊗ 𝟙 Y.fst) ≫\n                        ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst) ≫\n                          ((α_ U U' X.fst).inv ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ U') X.fst Y.fst).hom =\n    (α_ (X.fst ⊗ Y.fst) U U').inv ≫\n      ((α_ X.fst Y.fst U).hom ⊗ 𝟙 U') ≫\n        ((𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U') ≫\n          ((α_ X.fst U Y.fst).inv ⊗ 𝟙 U') ≫\n            (α_ (X.fst ⊗ U) Y.fst U').hom ≫\n              ((𝟙 X.fst ⊗ 𝟙 U) ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n                ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U' ⊗ 𝟙 Y.fst) ≫\n                  (α_ U X.fst (U' ⊗ Y.fst)).hom ≫\n                    (𝟙 U ⊗ (α_ X.fst U' Y.fst).inv) ≫\n                      (((α_ U (X.fst ⊗ U') Y.fst).inv ≫\n                            ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst) ≫ (α_ U (U' ⊗ X.fst) Y.fst).hom) ≫\n                          (𝟙 U ⊗ (α_ U' X.fst Y.fst).hom)) ≫\n                        (α_ U U' (X.fst ⊗ Y.fst)).inv\n[PROOFSTEP]\nslice_rhs 7 7 => rw [associator_inv_conjugation]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (HalfBraiding.β X.snd U).hom ⊗ 𝟙 U' ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (X.fst ⊗ U') Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (U' ⊗ X.fst) Y.fst).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ 𝟙 U) ⊗ (HalfBraiding.β Y.snd U').hom\n[PROOFSTEP]\nrw [associator_inv_conjugation]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (HalfBraiding.β X.snd U).hom ⊗ 𝟙 U' ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (X.fst ⊗ U') Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (U' ⊗ X.fst) Y.fst).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ 𝟙 U) ⊗ (HalfBraiding.β Y.snd U').hom\n[PROOFSTEP]\nrw [associator_inv_conjugation]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (HalfBraiding.β X.snd U).hom ⊗ 𝟙 U' ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (X.fst ⊗ U') Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (U' ⊗ X.fst) Y.fst).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ 𝟙 U) ⊗ (HalfBraiding.β Y.snd U').hom\n[PROOFSTEP]\nrw [associator_inv_conjugation]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n⊢ (α_ X.fst Y.fst (U ⊗ U')).hom ≫\n      (𝟙 X.fst ⊗ (α_ Y.fst U U').inv) ≫\n        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 U') ≫\n          (𝟙 X.fst ⊗ (α_ U Y.fst U').hom) ≫\n            (𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n              (𝟙 X.fst ⊗ (α_ U U' Y.fst).inv) ≫\n                (α_ X.fst (U ⊗ U') Y.fst).inv ≫\n                  ((α_ X.fst U U').inv ⊗ 𝟙 Y.fst) ≫\n                    (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst) ≫\n                      ((α_ U X.fst U').hom ⊗ 𝟙 Y.fst) ≫\n                        ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst) ≫\n                          ((α_ U U' X.fst).inv ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ U') X.fst Y.fst).hom =\n    (α_ (X.fst ⊗ Y.fst) U U').inv ≫\n      ((α_ X.fst Y.fst U).hom ⊗ 𝟙 U') ≫\n        ((𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U') ≫\n          ((α_ X.fst U Y.fst).inv ⊗ 𝟙 U') ≫\n            (α_ (X.fst ⊗ U) Y.fst U').hom ≫\n              ((𝟙 X.fst ⊗ 𝟙 U) ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n                ((((((((α_ (X.fst ⊗ U) U' Y.fst).inv ≫\n                                (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ X.fst) U' Y.fst).hom) ≫\n                              (α_ U X.fst (U' ⊗ Y.fst)).hom) ≫\n                            (𝟙 U ⊗ (α_ X.fst U' Y.fst).inv)) ≫\n                          (α_ U (X.fst ⊗ U') Y.fst).inv) ≫\n                        ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst)) ≫\n                      (α_ U (U' ⊗ X.fst) Y.fst).hom) ≫\n                    (𝟙 U ⊗ (α_ U' X.fst Y.fst).hom)) ≫\n                  (α_ U U' (X.fst ⊗ Y.fst)).inv\n[PROOFSTEP]\nslice_rhs 6 6 => rw [associator_conjugation]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ 𝟙 U) ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (U ⊗ X.fst) U' Y.fst).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (X.fst ⊗ U') Y.fst).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (U' ⊗ X.fst) Y.fst).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\n[PROOFSTEP]\nrw [associator_conjugation]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ 𝟙 U) ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (U ⊗ X.fst) U' Y.fst).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (X.fst ⊗ U') Y.fst).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (U' ⊗ X.fst) Y.fst).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\n[PROOFSTEP]\nrw [associator_conjugation]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ 𝟙 U) ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (U ⊗ X.fst) U' Y.fst).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (X.fst ⊗ U') Y.fst).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (U' ⊗ X.fst) Y.fst).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\n[PROOFSTEP]\nrw [associator_conjugation]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n⊢ (α_ X.fst Y.fst (U ⊗ U')).hom ≫\n      (𝟙 X.fst ⊗ (α_ Y.fst U U').inv) ≫\n        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 U') ≫\n          (𝟙 X.fst ⊗ (α_ U Y.fst U').hom) ≫\n            (𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n              (𝟙 X.fst ⊗ (α_ U U' Y.fst).inv) ≫\n                (α_ X.fst (U ⊗ U') Y.fst).inv ≫\n                  ((α_ X.fst U U').inv ⊗ 𝟙 Y.fst) ≫\n                    (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst) ≫\n                      ((α_ U X.fst U').hom ⊗ 𝟙 Y.fst) ≫\n                        ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst) ≫\n                          ((α_ U U' X.fst).inv ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ U') X.fst Y.fst).hom =\n    (α_ (X.fst ⊗ Y.fst) U U').inv ≫\n      ((α_ X.fst Y.fst U).hom ⊗ 𝟙 U') ≫\n        ((𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U') ≫\n          ((α_ X.fst U Y.fst).inv ⊗ 𝟙 U') ≫\n            (α_ (X.fst ⊗ U) Y.fst U').hom ≫\n              (((((((((((α_ X.fst U (Y.fst ⊗ U')).hom ≫\n                                    (𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom) ≫ (α_ X.fst U (U' ⊗ Y.fst)).inv) ≫\n                                  (α_ (X.fst ⊗ U) U' Y.fst).inv) ≫\n                                (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst)) ≫\n                              (α_ (U ⊗ X.fst) U' Y.fst).hom) ≫\n                            (α_ U X.fst (U' ⊗ Y.fst)).hom) ≫\n                          (𝟙 U ⊗ (α_ X.fst U' Y.fst).inv)) ≫\n                        (α_ U (X.fst ⊗ U') Y.fst).inv) ≫\n                      ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst)) ≫\n                    (α_ U (U' ⊗ X.fst) Y.fst).hom) ≫\n                  (𝟙 U ⊗ (α_ U' X.fst Y.fst).hom)) ≫\n                (α_ U U' (X.fst ⊗ Y.fst)).inv\n[PROOFSTEP]\nslice_rhs 3 3 =>\n  rw [associator_conjugation]\n    -- Finish with an application of the coherence theorem.\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U (Y.fst ⊗ U')).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U (U' ⊗ Y.fst)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (U ⊗ X.fst) U' Y.fst).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (X.fst ⊗ U') Y.fst).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (U' ⊗ X.fst) Y.fst).hom\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\n[PROOFSTEP]\nrw [associator_conjugation]\n    -- Finish with an application of the coherence theorem.\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U (Y.fst ⊗ U')).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U (U' ⊗ Y.fst)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (U ⊗ X.fst) U' Y.fst).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (X.fst ⊗ U') Y.fst).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (U' ⊗ X.fst) Y.fst).hom\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\n[PROOFSTEP]\nrw [associator_conjugation]\n    -- Finish with an application of the coherence theorem.\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ⊗ 𝟙 U'\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U Y.fst).inv ⊗ 𝟙 U'\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) Y.fst U').hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U (Y.fst ⊗ U')).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst U (U' ⊗ Y.fst)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ U) U' Y.fst).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (U ⊗ X.fst) U' Y.fst).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U X.fst (U' ⊗ Y.fst)).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ X.fst U' Y.fst).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (X.fst ⊗ U') Y.fst).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst\ncase a.a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U (U' ⊗ X.fst) Y.fst).hom\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| 𝟙 U ⊗ (α_ U' X.fst Y.fst).hom\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ U U' (X.fst ⊗ Y.fst)).inv\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ (X.fst ⊗ Y.fst) U U').inv\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n| (α_ X.fst Y.fst U).hom ⊗ 𝟙 U'\n[PROOFSTEP]\nrw [associator_conjugation]\n  -- Finish with an application of the coherence theorem.\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU U' : C\n⊢ (α_ X.fst Y.fst (U ⊗ U')).hom ≫\n      (𝟙 X.fst ⊗ (α_ Y.fst U U').inv) ≫\n        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 U') ≫\n          (𝟙 X.fst ⊗ (α_ U Y.fst U').hom) ≫\n            (𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom) ≫\n              (𝟙 X.fst ⊗ (α_ U U' Y.fst).inv) ≫\n                (α_ X.fst (U ⊗ U') Y.fst).inv ≫\n                  ((α_ X.fst U U').inv ⊗ 𝟙 Y.fst) ≫\n                    (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst) ≫\n                      ((α_ U X.fst U').hom ⊗ 𝟙 Y.fst) ≫\n                        ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst) ≫\n                          ((α_ U U' X.fst).inv ⊗ 𝟙 Y.fst) ≫ (α_ (U ⊗ U') X.fst Y.fst).hom =\n    (α_ (X.fst ⊗ Y.fst) U U').inv ≫\n      ((α_ X.fst Y.fst U).hom ⊗ 𝟙 U') ≫\n        ((((((((((((((((α_ X.fst (Y.fst ⊗ U) U').hom ≫\n                                        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 U') ≫\n                                          (α_ X.fst (U ⊗ Y.fst) U').inv) ≫\n                                      ((α_ X.fst U Y.fst).inv ⊗ 𝟙 U')) ≫\n                                    (α_ (X.fst ⊗ U) Y.fst U').hom) ≫\n                                  (α_ X.fst U (Y.fst ⊗ U')).hom) ≫\n                                (𝟙 X.fst ⊗ 𝟙 U ⊗ (HalfBraiding.β Y.snd U').hom)) ≫\n                              (α_ X.fst U (U' ⊗ Y.fst)).inv) ≫\n                            (α_ (X.fst ⊗ U) U' Y.fst).inv) ≫\n                          (((HalfBraiding.β X.snd U).hom ⊗ 𝟙 U') ⊗ 𝟙 Y.fst)) ≫\n                        (α_ (U ⊗ X.fst) U' Y.fst).hom) ≫\n                      (α_ U X.fst (U' ⊗ Y.fst)).hom) ≫\n                    (𝟙 U ⊗ (α_ X.fst U' Y.fst).inv)) ≫\n                  (α_ U (X.fst ⊗ U') Y.fst).inv) ≫\n                ((𝟙 U ⊗ (HalfBraiding.β X.snd U').hom) ⊗ 𝟙 Y.fst)) ≫\n              (α_ U (U' ⊗ X.fst) Y.fst).hom) ≫\n            (𝟙 U ⊗ (α_ U' X.fst Y.fst).hom)) ≫\n          (α_ U U' (X.fst ⊗ Y.fst)).inv\n[PROOFSTEP]\ncoherence\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU✝ U'✝ : C\nf : U✝ ⟶ U'✝\n⊢ (𝟙 (X.fst ⊗ Y.fst) ⊗ f) ≫\n      ((fun U =>\n            α_ X.fst Y.fst U ≪≫\n              (Iso.refl X.fst ⊗ HalfBraiding.β Y.snd U) ≪≫\n                (α_ X.fst U Y.fst).symm ≪≫ (HalfBraiding.β X.snd U ⊗ Iso.refl Y.fst) ≪≫ α_ U X.fst Y.fst)\n          U'✝).hom =\n    ((fun U =>\n            α_ X.fst Y.fst U ≪≫\n              (Iso.refl X.fst ⊗ HalfBraiding.β Y.snd U) ≪≫\n                (α_ X.fst U Y.fst).symm ≪≫ (HalfBraiding.β X.snd U ⊗ Iso.refl Y.fst) ≪≫ α_ U X.fst Y.fst)\n          U✝).hom ≫\n      (f ⊗ 𝟙 (X.fst ⊗ Y.fst))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU✝ U'✝ : C\nf : U✝ ⟶ U'✝\n⊢ (𝟙 (X.fst ⊗ Y.fst) ⊗ f) ≫\n      (α_ X.fst Y.fst U'✝).hom ≫\n        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U'✝).hom) ≫\n          (α_ X.fst U'✝ Y.fst).inv ≫ ((HalfBraiding.β X.snd U'✝).hom ⊗ 𝟙 Y.fst) ≫ (α_ U'✝ X.fst Y.fst).hom =\n    ((α_ X.fst Y.fst U✝).hom ≫\n        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U✝).hom) ≫\n          (α_ X.fst U✝ Y.fst).inv ≫ ((HalfBraiding.β X.snd U✝).hom ⊗ 𝟙 Y.fst) ≫ (α_ U✝ X.fst Y.fst).hom) ≫\n      (f ⊗ 𝟙 (X.fst ⊗ Y.fst))\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc, Category.assoc, Category.assoc, id_tensor_associator_naturality_assoc, ←\n  id_tensor_comp_assoc, HalfBraiding.naturality, id_tensor_comp_assoc, associator_inv_naturality_assoc, ←\n  comp_tensor_id_assoc, HalfBraiding.naturality, comp_tensor_id_assoc, associator_naturality, ← tensor_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX₁ Y₁ X₂ Y₂ : Center C\nf : X₁ ⟶ Y₁\ng : X₂ ⟶ Y₂\nU : C\n⊢ ((f.f ⊗ g.f) ⊗ 𝟙 U) ≫ (HalfBraiding.β (tensorObj Y₁ Y₂).snd U).hom =\n    (HalfBraiding.β (tensorObj X₁ X₂).snd U).hom ≫ (𝟙 U ⊗ f.f ⊗ g.f)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX₁ Y₁ X₂ Y₂ : Center C\nf : X₁ ⟶ Y₁\ng : X₂ ⟶ Y₂\nU : C\n⊢ ((f.f ⊗ g.f) ⊗ 𝟙 U) ≫\n      (α_ Y₁.fst Y₂.fst U).hom ≫\n        (𝟙 Y₁.fst ⊗ (HalfBraiding.β Y₂.snd U).hom) ≫\n          (α_ Y₁.fst U Y₂.fst).inv ≫ ((HalfBraiding.β Y₁.snd U).hom ⊗ 𝟙 Y₂.fst) ≫ (α_ U Y₁.fst Y₂.fst).hom =\n    ((α_ X₁.fst X₂.fst U).hom ≫\n        (𝟙 X₁.fst ⊗ (HalfBraiding.β X₂.snd U).hom) ≫\n          (α_ X₁.fst U X₂.fst).inv ≫ ((HalfBraiding.β X₁.snd U).hom ⊗ 𝟙 X₂.fst) ≫ (α_ U X₁.fst X₂.fst).hom) ≫\n      (𝟙 U ⊗ f.f ⊗ g.f)\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc, Category.assoc, Category.assoc, associator_naturality_assoc, ←\n  tensor_id_comp_id_tensor, Category.assoc, ← id_tensor_comp_assoc, g.comm, id_tensor_comp_assoc,\n  tensor_id_comp_id_tensor_assoc, ← id_tensor_comp_tensor_id, Category.assoc, associator_inv_naturality_assoc,\n  id_tensor_associator_inv_naturality_assoc, tensor_id, id_tensor_comp_tensor_id_assoc, ← tensor_id_comp_id_tensor g.f,\n  Category.assoc, ← comp_tensor_id_assoc, f.comm, comp_tensor_id_assoc, id_tensor_associator_naturality,\n  associator_naturality_assoc, ← id_tensor_comp, tensor_id_comp_id_tensor]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nU U' : C\n⊢ ((fun U => λ_ U ≪≫ (ρ_ U).symm) (U ⊗ U')).hom =\n    (α_ (𝟙_ C) U U').inv ≫\n      (((fun U => λ_ U ≪≫ (ρ_ U).symm) U).hom ⊗ 𝟙 U') ≫\n        (α_ U (𝟙_ C) U').hom ≫ (𝟙 U ⊗ ((fun U => λ_ U ≪≫ (ρ_ U).symm) U').hom) ≫ (α_ U U' (𝟙_ C)).inv\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nU✝ U'✝ : C\nf : U✝ ⟶ U'✝\n⊢ (𝟙 (𝟙_ C) ⊗ f) ≫ ((fun U => λ_ U ≪≫ (ρ_ U).symm) U'✝).hom = ((fun U => λ_ U ≪≫ (ρ_ U).symm) U✝).hom ≫ (f ⊗ 𝟙 (𝟙_ C))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nU✝ U'✝ : C\nf : U✝ ⟶ U'✝\n⊢ (𝟙 (𝟙_ C) ⊗ f) ≫ (λ_ U'✝).hom ≫ (ρ_ U'✝).inv = ((λ_ U✝).hom ≫ (ρ_ U✝).inv) ≫ (f ⊗ 𝟙 (𝟙_ C))\n[PROOFSTEP]\nrw [leftUnitor_naturality_assoc, rightUnitor_inv_naturality, Category.assoc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y Z : Center C\nU : C\n⊢ ((α_ X.fst Y.fst Z.fst).hom ⊗ 𝟙 U) ≫ (HalfBraiding.β (tensorObj X (tensorObj Y Z)).snd U).hom =\n    (HalfBraiding.β (tensorObj (tensorObj X Y) Z).snd U).hom ≫ (𝟙 U ⊗ (α_ X.fst Y.fst Z.fst).hom)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y Z : Center C\nU : C\n⊢ ((α_ X.fst Y.fst Z.fst).hom ⊗ 𝟙 U) ≫\n      (α_ X.fst (Y.fst ⊗ Z.fst) U).hom ≫\n        (𝟙 X.fst ⊗\n            (α_ Y.fst Z.fst U).hom ≫\n              (𝟙 Y.fst ⊗ (HalfBraiding.β Z.snd U).hom) ≫\n                (α_ Y.fst U Z.fst).inv ≫ ((HalfBraiding.β Y.snd U).hom ⊗ 𝟙 Z.fst) ≫ (α_ U Y.fst Z.fst).hom) ≫\n          (α_ X.fst U (Y.fst ⊗ Z.fst)).inv ≫\n            ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 (Y.fst ⊗ Z.fst)) ≫ (α_ U X.fst (Y.fst ⊗ Z.fst)).hom =\n    ((α_ (X.fst ⊗ Y.fst) Z.fst U).hom ≫\n        (𝟙 (X.fst ⊗ Y.fst) ⊗ (HalfBraiding.β Z.snd U).hom) ≫\n          (α_ (X.fst ⊗ Y.fst) U Z.fst).inv ≫\n            ((α_ X.fst Y.fst U).hom ≫\n                  (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ≫\n                    (α_ X.fst U Y.fst).inv ≫ ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ≫ (α_ U X.fst Y.fst).hom ⊗\n                𝟙 Z.fst) ≫\n              (α_ U (X.fst ⊗ Y.fst) Z.fst).hom) ≫\n      (𝟙 U ⊗ (α_ X.fst Y.fst Z.fst).hom)\n[PROOFSTEP]\nsimp only [comp_tensor_id, id_tensor_comp, ← tensor_id, associator_conjugation]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y Z : Center C\nU : C\n⊢ ((α_ X.fst Y.fst Z.fst).hom ⊗ 𝟙 U) ≫\n      (α_ X.fst (Y.fst ⊗ Z.fst) U).hom ≫\n        ((𝟙 X.fst ⊗ (α_ Y.fst Z.fst U).hom) ≫\n            (𝟙 X.fst ⊗ 𝟙 Y.fst ⊗ (HalfBraiding.β Z.snd U).hom) ≫\n              (𝟙 X.fst ⊗ (α_ Y.fst U Z.fst).inv) ≫\n                (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 Z.fst) ≫ (𝟙 X.fst ⊗ (α_ U Y.fst Z.fst).hom)) ≫\n          (α_ X.fst U (Y.fst ⊗ Z.fst)).inv ≫\n            ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst ⊗ 𝟙 Z.fst) ≫ (α_ U X.fst (Y.fst ⊗ Z.fst)).hom =\n    ((α_ (X.fst ⊗ Y.fst) Z.fst U).hom ≫\n        ((α_ X.fst Y.fst (Z.fst ⊗ U)).hom ≫\n            (𝟙 X.fst ⊗ 𝟙 Y.fst ⊗ (HalfBraiding.β Z.snd U).hom) ≫ (α_ X.fst Y.fst (U ⊗ Z.fst)).inv) ≫\n          (α_ (X.fst ⊗ Y.fst) U Z.fst).inv ≫\n            (((α_ X.fst Y.fst U).hom ⊗ 𝟙 Z.fst) ≫\n                ((α_ X.fst (Y.fst ⊗ U) Z.fst).hom ≫\n                    (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom ⊗ 𝟙 Z.fst) ≫ (α_ X.fst (U ⊗ Y.fst) Z.fst).inv) ≫\n                  ((α_ X.fst U Y.fst).inv ⊗ 𝟙 Z.fst) ≫\n                    ((α_ (X.fst ⊗ U) Y.fst Z.fst).hom ≫\n                        ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst ⊗ 𝟙 Z.fst) ≫ (α_ (U ⊗ X.fst) Y.fst Z.fst).inv) ≫\n                      ((α_ U X.fst Y.fst).hom ⊗ 𝟙 Z.fst)) ≫\n              (α_ U (X.fst ⊗ Y.fst) Z.fst).hom) ≫\n      (𝟙 U ⊗ (α_ X.fst Y.fst Z.fst).hom)\n[PROOFSTEP]\ncoherence\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\nU : C\n⊢ ((λ_ X.fst).hom ⊗ 𝟙 U) ≫ (HalfBraiding.β X.snd U).hom =\n    (HalfBraiding.β (tensorObj tensorUnit X).snd U).hom ≫ (𝟙 U ⊗ (λ_ X.fst).hom)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\nU : C\n⊢ ((λ_ X.fst).hom ⊗ 𝟙 U) ≫ (HalfBraiding.β X.snd U).hom =\n    ((α_ (𝟙_ C) X.fst U).hom ≫\n        (𝟙 (𝟙_ C) ⊗ (HalfBraiding.β X.snd U).hom) ≫\n          (α_ (𝟙_ C) U X.fst).inv ≫ ((λ_ U).hom ≫ (ρ_ U).inv ⊗ 𝟙 X.fst) ≫ (α_ U (𝟙_ C) X.fst).hom) ≫\n      (𝟙 U ⊗ (λ_ X.fst).hom)\n[PROOFSTEP]\nsimp only [Category.comp_id, Category.assoc, tensor_inv_hom_id, comp_tensor_id, tensor_id_comp_id_tensor,\n  triangle_assoc_comp_right_inv]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\nU : C\n⊢ ((λ_ X.fst).hom ⊗ 𝟙 U) ≫ (HalfBraiding.β X.snd U).hom =\n    (α_ (𝟙_ C) X.fst U).hom ≫\n      (𝟙 (𝟙_ C) ⊗ (HalfBraiding.β X.snd U).hom) ≫ (α_ (𝟙_ C) U X.fst).inv ≫ ((λ_ U).hom ⊗ 𝟙 X.fst)\n[PROOFSTEP]\nrw [← leftUnitor_tensor, leftUnitor_naturality, leftUnitor_tensor'_assoc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\nU : C\n⊢ ((ρ_ X.fst).hom ⊗ 𝟙 U) ≫ (HalfBraiding.β X.snd U).hom =\n    (HalfBraiding.β (tensorObj X tensorUnit).snd U).hom ≫ (𝟙 U ⊗ (ρ_ X.fst).hom)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\nU : C\n⊢ ((ρ_ X.fst).hom ⊗ 𝟙 U) ≫ (HalfBraiding.β X.snd U).hom =\n    ((α_ X.fst (𝟙_ C) U).hom ≫\n        (𝟙 X.fst ⊗ (λ_ U).hom ≫ (ρ_ U).inv) ≫\n          (α_ X.fst U (𝟙_ C)).inv ≫ ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 (𝟙_ C)) ≫ (α_ U X.fst (𝟙_ C)).hom) ≫\n      (𝟙 U ⊗ (ρ_ X.fst).hom)\n[PROOFSTEP]\nsimp only [tensor_id_comp_id_tensor_assoc, triangle_assoc, id_tensor_comp, Category.assoc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\nU : C\n⊢ ((ρ_ X.fst).hom ⊗ 𝟙 U) ≫ (HalfBraiding.β X.snd U).hom =\n    ((ρ_ X.fst).hom ⊗ (ρ_ U).inv) ≫\n      (α_ X.fst U (𝟙_ C)).inv ≫\n        ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 (𝟙_ C)) ≫ (α_ U X.fst (𝟙_ C)).hom ≫ (𝟙 U ⊗ (ρ_ X.fst).hom)\n[PROOFSTEP]\nrw [← tensor_id_comp_id_tensor_assoc (ρ_ U).inv, cancel_epi, ← rightUnitor_tensor_inv_assoc, ←\n  rightUnitor_inv_naturality_assoc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\nU : C\n⊢ (HalfBraiding.β X.snd U).hom =\n    (HalfBraiding.β X.snd U).hom ≫ (ρ_ (U ⊗ X.fst)).inv ≫ (α_ U X.fst (𝟙_ C)).hom ≫ (𝟙 U ⊗ (ρ_ X.fst).hom)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y Z : Center C\n⊢ (α_ X Y Z).inv.f = (α_ X.fst Y.fst Z.fst).inv\n[PROOFSTEP]\napply Iso.inv_ext'\n[GOAL]\ncase hom_inv_id\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y Z : Center C\n⊢ (α_ X.fst Y.fst Z.fst).hom ≫ (α_ X Y Z).inv.f = 𝟙 ((X ⊗ Y) ⊗ Z).fst\n[PROOFSTEP]\nrw [← associator_hom_f, ← comp_f, Iso.hom_inv_id]\n[GOAL]\ncase hom_inv_id\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y Z : Center C\n⊢ (𝟙 ((X ⊗ Y) ⊗ Z)).f = 𝟙 ((X ⊗ Y) ⊗ Z).fst\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\n⊢ (λ_ X).inv.f = (λ_ X.fst).inv\n[PROOFSTEP]\napply Iso.inv_ext'\n[GOAL]\ncase hom_inv_id\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\n⊢ (λ_ X.fst).hom ≫ (λ_ X).inv.f = 𝟙 (tensorUnit' ⊗ X).fst\n[PROOFSTEP]\nrw [← leftUnitor_hom_f, ← comp_f, Iso.hom_inv_id]\n[GOAL]\ncase hom_inv_id\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\n⊢ (𝟙 (tensorUnit' ⊗ X)).f = 𝟙 (tensorUnit' ⊗ X).fst\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\n⊢ (ρ_ X).inv.f = (ρ_ X.fst).inv\n[PROOFSTEP]\napply Iso.inv_ext'\n[GOAL]\ncase hom_inv_id\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\n⊢ (ρ_ X.fst).hom ≫ (ρ_ X).inv.f = 𝟙 (X ⊗ tensorUnit').fst\n[PROOFSTEP]\nrw [← rightUnitor_hom_f, ← comp_f, Iso.hom_inv_id]\n[GOAL]\ncase hom_inv_id\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX : Center C\n⊢ (𝟙 (X ⊗ tensorUnit')).f = 𝟙 (X ⊗ tensorUnit').fst\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ B✝ : Center C\nf : A✝ ⟶ B✝\ni : IsIso ((forget C).toLaxMonoidalFunctor.toFunctor.map f)\n⊢ IsIso f\n[PROOFSTEP]\ndsimp at i \n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ B✝ : Center C\nf : A✝ ⟶ B✝\ni : IsIso f.f\n⊢ IsIso f\n[PROOFSTEP]\nchange IsIso (isoMk f).hom\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ B✝ : Center C\nf : A✝ ⟶ B✝\ni : IsIso f.f\n⊢ IsIso (isoMk f).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU : C\n⊢ ((HalfBraiding.β X.snd Y.fst).hom ⊗ 𝟙 U) ≫ (HalfBraiding.β (Y ⊗ X).snd U).hom =\n    (HalfBraiding.β (X ⊗ Y).snd U).hom ≫ (𝟙 U ⊗ (HalfBraiding.β X.snd Y.fst).hom)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU : C\n⊢ ((HalfBraiding.β X.snd Y.fst).hom ⊗ 𝟙 U) ≫\n      (α_ Y.fst X.fst U).hom ≫\n        (𝟙 Y.fst ⊗ (HalfBraiding.β X.snd U).hom) ≫\n          (α_ Y.fst U X.fst).inv ≫ ((HalfBraiding.β Y.snd U).hom ⊗ 𝟙 X.fst) ≫ (α_ U Y.fst X.fst).hom =\n    ((α_ X.fst Y.fst U).hom ≫\n        (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ≫\n          (α_ X.fst U Y.fst).inv ≫ ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ≫ (α_ U X.fst Y.fst).hom) ≫\n      (𝟙 U ⊗ (HalfBraiding.β X.snd Y.fst).hom)\n[PROOFSTEP]\nsimp only [Category.assoc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU : C\n⊢ ((HalfBraiding.β X.snd Y.fst).hom ⊗ 𝟙 U) ≫\n      (α_ Y.fst X.fst U).hom ≫\n        (𝟙 Y.fst ⊗ (HalfBraiding.β X.snd U).hom) ≫\n          (α_ Y.fst U X.fst).inv ≫ ((HalfBraiding.β Y.snd U).hom ⊗ 𝟙 X.fst) ≫ (α_ U Y.fst X.fst).hom =\n    (α_ X.fst Y.fst U).hom ≫\n      (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ≫\n        (α_ X.fst U Y.fst).inv ≫\n          ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ≫ (α_ U X.fst Y.fst).hom ≫ (𝟙 U ⊗ (HalfBraiding.β X.snd Y.fst).hom)\n[PROOFSTEP]\nrw [← IsIso.inv_comp_eq, IsIso.Iso.inv_hom, ← HalfBraiding.monoidal_assoc, ← HalfBraiding.naturality_assoc,\n  HalfBraiding.monoidal]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX Y : Center C\nU : C\n⊢ (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ≫\n      ((α_ X.fst U Y.fst).inv ≫\n          ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ≫\n            (α_ U X.fst Y.fst).hom ≫ (𝟙 U ⊗ (HalfBraiding.β X.snd Y.fst).hom) ≫ (α_ U Y.fst X.fst).inv) ≫\n        (α_ U Y.fst X.fst).hom =\n    (𝟙 X.fst ⊗ (HalfBraiding.β Y.snd U).hom) ≫\n      (α_ X.fst U Y.fst).inv ≫\n        ((HalfBraiding.β X.snd U).hom ⊗ 𝟙 Y.fst) ≫ (α_ U X.fst Y.fst).hom ≫ (𝟙 U ⊗ (HalfBraiding.β X.snd Y.fst).hom)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX✝ X'✝ Y✝ Y'✝ : Center C\nf : X✝ ⟶ Y✝\ng : X'✝ ⟶ Y'✝\n⊢ (f ⊗ g) ≫ (braiding Y✝ Y'✝).hom = (braiding X✝ X'✝).hom ≫ (g ⊗ f)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX✝ X'✝ Y✝ Y'✝ : Center C\nf : X✝ ⟶ Y✝\ng : X'✝ ⟶ Y'✝\n⊢ ((f ⊗ g) ≫ (braiding Y✝ Y'✝).hom).f = ((braiding X✝ X'✝).hom ≫ (g ⊗ f)).f\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nX✝ X'✝ Y✝ Y'✝ : Center C\nf : X✝ ⟶ Y✝\ng : X'✝ ⟶ Y'✝\n⊢ (f.f ⊗ g.f) ≫ (HalfBraiding.β Y✝.snd Y'✝.fst).hom = (HalfBraiding.β X✝.snd X'✝.fst).hom ≫ (g.f ⊗ f.f)\n[PROOFSTEP]\nrw [← tensor_id_comp_id_tensor, Category.assoc, HalfBraiding.naturality, f.comm_assoc, id_tensor_comp_tensor_id]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX U U' : C\n⊢ ((fun Y => β_ X Y) (U ⊗ U')).hom =\n    (α_ X U U').inv ≫\n      (((fun Y => β_ X Y) U).hom ⊗ 𝟙 U') ≫ (α_ U X U').hom ≫ (𝟙 U ⊗ ((fun Y => β_ X Y) U').hom) ≫ (α_ U U' X).inv\n[PROOFSTEP]\nrw [Iso.eq_inv_comp, ← Category.assoc, ← Category.assoc, Iso.eq_comp_inv, Category.assoc, Category.assoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX U U' : C\n⊢ (α_ X U U').hom ≫ ((fun Y => β_ X Y) (U ⊗ U')).hom ≫ (α_ U U' X).hom =\n    (((fun Y => β_ X Y) U).hom ⊗ 𝟙 U') ≫ (α_ U X U').hom ≫ (𝟙 U ⊗ ((fun Y => β_ X Y) U').hom)\n[PROOFSTEP]\nexact hexagon_forward X U U'\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nU : C\n⊢ (𝟙 (𝟙_ (Center C)).fst ⊗ 𝟙 U) ≫\n      (HalfBraiding.β ((Functor.mk { obj := ofBraidedObj, map := fun {X Y} f => Hom.mk f }).obj (𝟙_ C)).snd U).hom =\n    (HalfBraiding.β (𝟙_ (Center C)).snd U).hom ≫ (𝟙 U ⊗ 𝟙 (𝟙_ (Center C)).fst)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nU : C\n⊢ (𝟙 (𝟙_ (Center C)).fst ⊗ 𝟙 U) ≫ (β_ (𝟙_ C) U).hom = ((λ_ U).hom ≫ (ρ_ U).inv) ≫ (𝟙 U ⊗ 𝟙 (𝟙_ (Center C)).fst)\n[PROOFSTEP]\nrw [tensor_id, Category.id_comp, tensor_id, Category.comp_id, ← braiding_rightUnitor, Category.assoc, Iso.hom_inv_id,\n  Category.comp_id]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX Y U : C\n⊢ (𝟙\n          ((Functor.mk { obj := ofBraidedObj, map := fun {X Y} f => Hom.mk f }).obj X ⊗\n              (Functor.mk { obj := ofBraidedObj, map := fun {X Y} f => Hom.mk f }).obj Y).fst ⊗\n        𝟙 U) ≫\n      (HalfBraiding.β ((Functor.mk { obj := ofBraidedObj, map := fun {X Y} f => Hom.mk f }).obj (X ⊗ Y)).snd U).hom =\n    (HalfBraiding.β\n          ((Functor.mk { obj := ofBraidedObj, map := fun {X Y} f => Hom.mk f }).obj X ⊗\n              (Functor.mk { obj := ofBraidedObj, map := fun {X Y} f => Hom.mk f }).obj Y).snd\n          U).hom ≫\n      (𝟙 U ⊗\n        𝟙\n          ((Functor.mk { obj := ofBraidedObj, map := fun {X Y} f => Hom.mk f }).obj X ⊗\n              (Functor.mk { obj := ofBraidedObj, map := fun {X Y} f => Hom.mk f }).obj Y).fst)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX Y U : C\n⊢ (𝟙 (X ⊗ Y) ⊗ 𝟙 U) ≫ (β_ (X ⊗ Y) U).hom =\n    ((α_ X Y U).hom ≫ (𝟙 X ⊗ (β_ Y U).hom) ≫ (α_ X U Y).inv ≫ ((β_ X U).hom ⊗ 𝟙 Y) ≫ (α_ U X Y).hom) ≫ (𝟙 U ⊗ 𝟙 (X ⊗ Y))\n[PROOFSTEP]\nrw [tensor_id, tensor_id, Category.id_comp, Category.comp_id, ← Iso.inv_comp_eq, ← Category.assoc, ← Category.assoc, ←\n  Iso.comp_inv_eq, Category.assoc, hexagon_reverse, Category.assoc]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monoidal.Center", "llama_tokens": 48439, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6654105587468141, "lm_q2_score": 0.5583269943353745, "lm_q1q2_score": 0.37151667726413085}}
{"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ng h : X ⟶ Y\ninst✝ : HasLimit (parallelPair g h)\n⊢ ∀ (s : Fork g h),\n    (fun s => limit.lift (parallelPair g h) s) s ≫\n        Fork.ι (Fork.ofι (equalizer.ι g h) (_ : equalizer.ι g h ≫ g = equalizer.ι g h ≫ h)) =\n      Fork.ι s\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ng h : X ⟶ Y\ninst✝ : HasLimit (parallelPair g h)\ns : Fork g h\nm : s.pt ⟶ (Fork.ofι (equalizer.ι g h) (_ : equalizer.ι g h ≫ g = equalizer.ι g h ≫ h)).pt\nw : m ≫ Fork.ι (Fork.ofι (equalizer.ι g h) (_ : equalizer.ι g h ≫ g = equalizer.ι g h ≫ h)) = Fork.ι s\n⊢ m = (fun s => limit.lift (parallelPair g h) s) s\n[PROOFSTEP]\napply equalizer.hom_ext\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ng h : X ⟶ Y\ninst✝ : HasLimit (parallelPair g h)\ns : Fork g h\nm : s.pt ⟶ (Fork.ofι (equalizer.ι g h) (_ : equalizer.ι g h ≫ g = equalizer.ι g h ≫ h)).pt\nw : m ≫ Fork.ι (Fork.ofι (equalizer.ι g h) (_ : equalizer.ι g h ≫ g = equalizer.ι g h ≫ h)) = Fork.ι s\n⊢ m ≫ equalizer.ι g h = (fun s => limit.lift (parallelPair g h) s) s ≫ equalizer.ι g h\n[PROOFSTEP]\nsimp [← w]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\n⊢ g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right\n[PROOFSTEP]\nrepeat (rw [← Category.assoc, ← eq_whisker comm])\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\n⊢ g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right\n[PROOFSTEP]\nrw [← Category.assoc, ← eq_whisker comm]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\n⊢ (f ≫ h) ≫ RegularMono.left = g ≫ k ≫ RegularMono.right\n[PROOFSTEP]\nrw [← Category.assoc, ← eq_whisker comm]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\n⊢ (f ≫ h) ≫ RegularMono.left = (f ≫ h) ≫ RegularMono.right\n[PROOFSTEP]\nrw [← Category.assoc, ← eq_whisker comm]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\n⊢ (f ≫ h) ≫ RegularMono.left = (f ≫ h) ≫ RegularMono.right\n[PROOFSTEP]\nsimp only [Category.assoc, hr.w]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\n⊢ IsLimit (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right))\n[PROOFSTEP]\napply Fork.IsLimit.mk' _ _\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\n⊢ (s : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)) →\n    { l //\n      l ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s ∧\n        ∀\n          {m :\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n              ((Functor.const WalkingParallelPair).obj\n                    (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n                WalkingParallelPair.zero},\n          m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s → m = l }\n[PROOFSTEP]\nintro s\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\n⊢ { l //\n    l ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n            ((Functor.const WalkingParallelPair).obj\n                  (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n              WalkingParallelPair.zero},\n        m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s → m = l }\n[PROOFSTEP]\nhave l₁ : (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ hr.right\n[GOAL]\ncase l₁\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\n⊢ (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ RegularMono.right\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\nl₁ : (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ RegularMono.right\n⊢ { l //\n    l ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n            ((Functor.const WalkingParallelPair).obj\n                  (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n              WalkingParallelPair.zero},\n        m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s → m = l }\n[PROOFSTEP]\nrw [Category.assoc, s.condition, Category.assoc]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\nl₁ : (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ RegularMono.right\n⊢ { l //\n    l ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n            ((Functor.const WalkingParallelPair).obj\n                  (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n              WalkingParallelPair.zero},\n        m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s → m = l }\n[PROOFSTEP]\nobtain ⟨l, hl⟩ := Fork.IsLimit.lift' hr.isLimit _ l₁\n[GOAL]\ncase mk\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\nl₁ : (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ RegularMono.right\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)).pt\nhl : l ≫ Fork.ι (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)) = Fork.ι s ≫ k\n⊢ { l //\n    l ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n            ((Functor.const WalkingParallelPair).obj\n                  (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n              WalkingParallelPair.zero},\n        m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s → m = l }\n[PROOFSTEP]\nobtain ⟨p, _, hp₂⟩ := PullbackCone.IsLimit.lift' t _ _ hl\n[GOAL]\ncase mk.mk.intro\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\nl₁ : (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ RegularMono.right\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)).pt\nhl : l ≫ Fork.ι (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)) = Fork.ι s ≫ k\np : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶ (PullbackCone.mk f g comm).pt\nleft✝ : p ≫ PullbackCone.fst (PullbackCone.mk f g comm) = l\nhp₂ : p ≫ PullbackCone.snd (PullbackCone.mk f g comm) = Fork.ι s\n⊢ { l //\n    l ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n            ((Functor.const WalkingParallelPair).obj\n                  (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n              WalkingParallelPair.zero},\n        m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s → m = l }\n[PROOFSTEP]\nrefine' ⟨p, hp₂, _⟩\n[GOAL]\ncase mk.mk.intro\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\nl₁ : (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ RegularMono.right\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)).pt\nhl : l ≫ Fork.ι (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)) = Fork.ι s ≫ k\np : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶ (PullbackCone.mk f g comm).pt\nleft✝ : p ≫ PullbackCone.fst (PullbackCone.mk f g comm) = l\nhp₂ : p ≫ PullbackCone.snd (PullbackCone.mk f g comm) = Fork.ι s\n⊢ ∀\n    {m :\n      ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n        ((Functor.const WalkingParallelPair).obj\n              (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n          WalkingParallelPair.zero},\n    m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s → m = p\n[PROOFSTEP]\nintro m w\n[GOAL]\ncase mk.mk.intro\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\nl₁ : (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ RegularMono.right\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)).pt\nhl : l ≫ Fork.ι (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)) = Fork.ι s ≫ k\np : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶ (PullbackCone.mk f g comm).pt\nleft✝ : p ≫ PullbackCone.fst (PullbackCone.mk f g comm) = l\nhp₂ : p ≫ PullbackCone.snd (PullbackCone.mk f g comm) = Fork.ι s\nm :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj\n          (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n      WalkingParallelPair.zero\nw : m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s\n⊢ m = p\n[PROOFSTEP]\nhave z : m ≫ g = p ≫ g := w.trans hp₂.symm\n[GOAL]\ncase mk.mk.intro\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\nl₁ : (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ RegularMono.right\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)).pt\nhl : l ≫ Fork.ι (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)) = Fork.ι s ≫ k\np : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶ (PullbackCone.mk f g comm).pt\nleft✝ : p ≫ PullbackCone.fst (PullbackCone.mk f g comm) = l\nhp₂ : p ≫ PullbackCone.snd (PullbackCone.mk f g comm) = Fork.ι s\nm :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj\n          (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n      WalkingParallelPair.zero\nw : m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s\nz : m ≫ g = p ≫ g\n⊢ m = p\n[PROOFSTEP]\napply t.hom_ext\n[GOAL]\ncase mk.mk.intro\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\nl₁ : (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ RegularMono.right\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)).pt\nhl : l ≫ Fork.ι (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)) = Fork.ι s ≫ k\np : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶ (PullbackCone.mk f g comm).pt\nleft✝ : p ≫ PullbackCone.fst (PullbackCone.mk f g comm) = l\nhp₂ : p ≫ PullbackCone.snd (PullbackCone.mk f g comm) = Fork.ι s\nm :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj\n          (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n      WalkingParallelPair.zero\nw : m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s\nz : m ≫ g = p ≫ g\n⊢ ∀ (j : WalkingCospan),\n    m ≫ NatTrans.app (PullbackCone.mk f g comm).π j = p ≫ NatTrans.app (PullbackCone.mk f g comm).π j\n[PROOFSTEP]\napply (PullbackCone.mk f g comm).equalizer_ext\n[GOAL]\ncase mk.mk.intro.h₀\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\nl₁ : (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ RegularMono.right\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)).pt\nhl : l ≫ Fork.ι (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)) = Fork.ι s ≫ k\np : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶ (PullbackCone.mk f g comm).pt\nleft✝ : p ≫ PullbackCone.fst (PullbackCone.mk f g comm) = l\nhp₂ : p ≫ PullbackCone.snd (PullbackCone.mk f g comm) = Fork.ι s\nm :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj\n          (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n      WalkingParallelPair.zero\nw : m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s\nz : m ≫ g = p ≫ g\n⊢ m ≫ PullbackCone.fst (PullbackCone.mk f g comm) = p ≫ PullbackCone.fst (PullbackCone.mk f g comm)\n[PROOFSTEP]\nerw [← cancel_mono h, Category.assoc, Category.assoc, comm]\n[GOAL]\ncase mk.mk.intro.h₀\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\nl₁ : (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ RegularMono.right\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)).pt\nhl : l ≫ Fork.ι (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)) = Fork.ι s ≫ k\np : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶ (PullbackCone.mk f g comm).pt\nleft✝ : p ≫ PullbackCone.fst (PullbackCone.mk f g comm) = l\nhp₂ : p ≫ PullbackCone.snd (PullbackCone.mk f g comm) = Fork.ι s\nm :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj\n          (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n      WalkingParallelPair.zero\nw : m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s\nz : m ≫ g = p ≫ g\n⊢ m ≫ g ≫ k = p ≫ g ≫ k\n[PROOFSTEP]\nsimp only [← Category.assoc, eq_whisker z]\n[GOAL]\ncase mk.mk.intro.h₁\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhr : RegularMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ns : Fork (k ≫ RegularMono.left) (k ≫ RegularMono.right)\nl₁ : (Fork.ι s ≫ k) ≫ RegularMono.left = (Fork.ι s ≫ k) ≫ RegularMono.right\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)).pt\nhl : l ≫ Fork.ι (Fork.ofι h (_ : h ≫ RegularMono.left = h ≫ RegularMono.right)) = Fork.ι s ≫ k\np : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶ (PullbackCone.mk f g comm).pt\nleft✝ : p ≫ PullbackCone.fst (PullbackCone.mk f g comm) = l\nhp₂ : p ≫ PullbackCone.snd (PullbackCone.mk f g comm) = Fork.ι s\nm :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj\n          (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)).pt).obj\n      WalkingParallelPair.zero\nw : m ≫ Fork.ι (Fork.ofι g (_ : g ≫ k ≫ RegularMono.left = g ≫ k ≫ RegularMono.right)) = Fork.ι s\nz : m ≫ g = p ≫ g\n⊢ m ≫ PullbackCone.snd (PullbackCone.mk f g comm) = p ≫ PullbackCone.snd (PullbackCone.mk f g comm)\n[PROOFSTEP]\nexact z\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularMono f\n⊢ ∀ (X_1 Y_1 : C) (z : X_1 ⟶ Y_1), Epi z → ∀ (u : X_1 ⟶ X) (v : Y_1 ⟶ Y) (sq : CommSq u z f v), CommSq.HasLift sq\n[PROOFSTEP]\nintro A B z hz u v sq\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularMono f\nA B : C\nz : A ⟶ B\nhz : Epi z\nu : A ⟶ X\nv : B ⟶ Y\nsq : CommSq u z f v\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nhave : v ≫ (RegularMono.left : Y ⟶ RegularMono.Z f) = v ≫ RegularMono.right :=\n  by\n  apply (cancel_epi z).1\n  repeat (rw [← Category.assoc, ← eq_whisker sq.w])\n  simp only [Category.assoc, RegularMono.w]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularMono f\nA B : C\nz : A ⟶ B\nhz : Epi z\nu : A ⟶ X\nv : B ⟶ Y\nsq : CommSq u z f v\n⊢ v ≫ RegularMono.left = v ≫ RegularMono.right\n[PROOFSTEP]\napply (cancel_epi z).1\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularMono f\nA B : C\nz : A ⟶ B\nhz : Epi z\nu : A ⟶ X\nv : B ⟶ Y\nsq : CommSq u z f v\n⊢ z ≫ v ≫ RegularMono.left = z ≫ v ≫ RegularMono.right\n[PROOFSTEP]\nrepeat (rw [← Category.assoc, ← eq_whisker sq.w])\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularMono f\nA B : C\nz : A ⟶ B\nhz : Epi z\nu : A ⟶ X\nv : B ⟶ Y\nsq : CommSq u z f v\n⊢ z ≫ v ≫ RegularMono.left = z ≫ v ≫ RegularMono.right\n[PROOFSTEP]\nrw [← Category.assoc, ← eq_whisker sq.w]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularMono f\nA B : C\nz : A ⟶ B\nhz : Epi z\nu : A ⟶ X\nv : B ⟶ Y\nsq : CommSq u z f v\n⊢ (u ≫ f) ≫ RegularMono.left = z ≫ v ≫ RegularMono.right\n[PROOFSTEP]\nrw [← Category.assoc, ← eq_whisker sq.w]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularMono f\nA B : C\nz : A ⟶ B\nhz : Epi z\nu : A ⟶ X\nv : B ⟶ Y\nsq : CommSq u z f v\n⊢ (u ≫ f) ≫ RegularMono.left = (u ≫ f) ≫ RegularMono.right\n[PROOFSTEP]\nrw [← Category.assoc, ← eq_whisker sq.w]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularMono f\nA B : C\nz : A ⟶ B\nhz : Epi z\nu : A ⟶ X\nv : B ⟶ Y\nsq : CommSq u z f v\n⊢ (u ≫ f) ≫ RegularMono.left = (u ≫ f) ≫ RegularMono.right\n[PROOFSTEP]\nsimp only [Category.assoc, RegularMono.w]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularMono f\nA B : C\nz : A ⟶ B\nhz : Epi z\nu : A ⟶ X\nv : B ⟶ Y\nsq : CommSq u z f v\nthis : v ≫ RegularMono.left = v ≫ RegularMono.right\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := RegularMono.lift' _ _ this\n[GOAL]\ncase mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularMono f\nA B : C\nz : A ⟶ B\nhz : Epi z\nu : A ⟶ X\nv : B ⟶ Y\nsq : CommSq u z f v\nthis : v ≫ RegularMono.left = v ≫ RegularMono.right\nt : B ⟶ X\nht : t ≫ f = v\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nrefine' CommSq.HasLift.mk' ⟨t, (cancel_mono f).1 _, ht⟩\n[GOAL]\ncase mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularMono f\nA B : C\nz : A ⟶ B\nhz : Epi z\nu : A ⟶ X\nv : B ⟶ Y\nsq : CommSq u z f v\nthis : v ≫ RegularMono.left = v ≫ RegularMono.right\nt : B ⟶ X\nht : t ≫ f = v\n⊢ (z ≫ t) ≫ f = u ≫ f\n[PROOFSTEP]\nsimp only [Arrow.mk_hom, Arrow.homMk'_left, Category.assoc, ht, sq.w]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : SplitMonoCategory C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nx✝ : Mono f\n⊢ RegularMono f\n[PROOFSTEP]\nhaveI := isSplitMono_of_mono f\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : SplitMonoCategory C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nx✝ : Mono f\nthis : IsSplitMono f\n⊢ RegularMono f\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : RegularMonoCategory C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nx✝ : Mono f\n⊢ StrongMono f\n[PROOFSTEP]\nhaveI := regularMonoOfMono f\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : RegularMonoCategory C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nx✝ : Mono f\nthis : RegularMono f\n⊢ StrongMono f\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ng h : X ⟶ Y\ninst✝ : HasColimit (parallelPair g h)\n⊢ ∀ (s : Cofork g h),\n    Cofork.π (Cofork.ofπ (coequalizer.π g h) (_ : g ≫ coequalizer.π g h = h ≫ coequalizer.π g h)) ≫\n        (fun s => colimit.desc (parallelPair g h) s) s =\n      Cofork.π s\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ng h : X ⟶ Y\ninst✝ : HasColimit (parallelPair g h)\ns : Cofork g h\nm : (Cofork.ofπ (coequalizer.π g h) (_ : g ≫ coequalizer.π g h = h ≫ coequalizer.π g h)).pt ⟶ s.pt\nw : Cofork.π (Cofork.ofπ (coequalizer.π g h) (_ : g ≫ coequalizer.π g h = h ≫ coequalizer.π g h)) ≫ m = Cofork.π s\n⊢ m = (fun s => colimit.desc (parallelPair g h) s) s\n[PROOFSTEP]\napply coequalizer.hom_ext\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ng h : X ⟶ Y\ninst✝ : HasColimit (parallelPair g h)\ns : Cofork g h\nm : (Cofork.ofπ (coequalizer.π g h) (_ : g ≫ coequalizer.π g h = h ≫ coequalizer.π g h)).pt ⟶ s.pt\nw : Cofork.π (Cofork.ofπ (coequalizer.π g h) (_ : g ≫ coequalizer.π g h = h ≫ coequalizer.π g h)) ≫ m = Cofork.π s\n⊢ coequalizer.π g h ≫ m = coequalizer.π g h ≫ (fun s => colimit.desc (parallelPair g h) s) s\n[PROOFSTEP]\nsimp [← w]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\n⊢ (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc, comm]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\n⊢ RegularEpi.left ≫ g ≫ k = RegularEpi.right ≫ g ≫ k\n[PROOFSTEP]\nsimp only [← Category.assoc, eq_whisker gr.w]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\n⊢ IsColimit (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h))\n[PROOFSTEP]\napply Cofork.IsColimit.mk' _ _\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\n⊢ (s : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)) →\n    { l //\n      Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ l = Cofork.π s ∧\n        ∀\n          {m :\n            ((Functor.const WalkingParallelPair).obj\n                    (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n                WalkingParallelPair.one ⟶\n              ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n          Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s →\n            m = l }\n[PROOFSTEP]\nintro s\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\n⊢ { l //\n    Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ l = Cofork.π s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj\n                  (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n              WalkingParallelPair.one ⟶\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n        Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s → m = l }\n[PROOFSTEP]\nhave l₁ : gr.left ≫ f ≫ s.π = gr.right ≫ f ≫ s.π\n[GOAL]\ncase l₁\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\n⊢ RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\n⊢ { l //\n    Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ l = Cofork.π s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj\n                  (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n              WalkingParallelPair.one ⟶\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n        Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s → m = l }\n[PROOFSTEP]\nrw [← Category.assoc, ← Category.assoc, s.condition]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\n⊢ { l //\n    Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ l = Cofork.π s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj\n                  (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n              WalkingParallelPair.one ⟶\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n        Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s → m = l }\n[PROOFSTEP]\nobtain ⟨l, hl⟩ := Cofork.IsColimit.desc' gr.isColimit (f ≫ Cofork.π s) l₁\n[GOAL]\ncase mk\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\nl :\n  (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)).pt ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhl : Cofork.π (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)) ≫ l = f ≫ Cofork.π s\n⊢ { l //\n    Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ l = Cofork.π s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj\n                  (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n              WalkingParallelPair.one ⟶\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n        Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s → m = l }\n[PROOFSTEP]\nobtain ⟨p, hp₁, _⟩ := PushoutCocone.IsColimit.desc' t _ _ hl.symm\n[GOAL]\ncase mk.mk.intro\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\nl :\n  (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)).pt ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhl : Cofork.π (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)) ≫ l = f ≫ Cofork.π s\np : (PushoutCocone.mk h k comm).pt ⟶ ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhp₁ : PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p = Cofork.π s\nright✝ : PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ p = l\n⊢ { l //\n    Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ l = Cofork.π s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj\n                  (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n              WalkingParallelPair.one ⟶\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n        Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s → m = l }\n[PROOFSTEP]\nrefine' ⟨p, hp₁, _⟩\n[GOAL]\ncase mk.mk.intro\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\nl :\n  (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)).pt ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhl : Cofork.π (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)) ≫ l = f ≫ Cofork.π s\np : (PushoutCocone.mk h k comm).pt ⟶ ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhp₁ : PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p = Cofork.π s\nright✝ : PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ p = l\n⊢ ∀\n    {m :\n      ((Functor.const WalkingParallelPair).obj\n              (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n          WalkingParallelPair.one ⟶\n        ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n    Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s → m = p\n[PROOFSTEP]\nintro m w\n[GOAL]\ncase mk.mk.intro\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\nl :\n  (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)).pt ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhl : Cofork.π (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)) ≫ l = f ≫ Cofork.π s\np : (PushoutCocone.mk h k comm).pt ⟶ ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhp₁ : PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p = Cofork.π s\nright✝ : PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ p = l\nm :\n  ((Functor.const WalkingParallelPair).obj\n          (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n      WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nw : Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s\n⊢ m = p\n[PROOFSTEP]\nhave z := w.trans hp₁.symm\n[GOAL]\ncase mk.mk.intro\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\nl :\n  (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)).pt ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhl : Cofork.π (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)) ≫ l = f ≫ Cofork.π s\np : (PushoutCocone.mk h k comm).pt ⟶ ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhp₁ : PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p = Cofork.π s\nright✝ : PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ p = l\nm :\n  ((Functor.const WalkingParallelPair).obj\n          (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n      WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nw : Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s\nz :\n  Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m =\n    PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p\n⊢ m = p\n[PROOFSTEP]\napply t.hom_ext\n[GOAL]\ncase mk.mk.intro\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\nl :\n  (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)).pt ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhl : Cofork.π (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)) ≫ l = f ≫ Cofork.π s\np : (PushoutCocone.mk h k comm).pt ⟶ ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhp₁ : PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p = Cofork.π s\nright✝ : PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ p = l\nm :\n  ((Functor.const WalkingParallelPair).obj\n          (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n      WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nw : Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s\nz :\n  Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m =\n    PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p\n⊢ ∀ (j : WalkingSpan),\n    NatTrans.app (PushoutCocone.mk h k comm).ι j ≫ m = NatTrans.app (PushoutCocone.mk h k comm).ι j ≫ p\n[PROOFSTEP]\napply (PushoutCocone.mk _ _ comm).coequalizer_ext\n[GOAL]\ncase mk.mk.intro.h₀\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\nl :\n  (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)).pt ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhl : Cofork.π (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)) ≫ l = f ≫ Cofork.π s\np : (PushoutCocone.mk h k comm).pt ⟶ ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhp₁ : PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p = Cofork.π s\nright✝ : PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ p = l\nm :\n  ((Functor.const WalkingParallelPair).obj\n          (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n      WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nw : Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s\nz :\n  Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m =\n    PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p\n⊢ PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ m = PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p\n[PROOFSTEP]\nexact z\n[GOAL]\ncase mk.mk.intro.h₁\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\nl :\n  (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)).pt ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhl : Cofork.π (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)) ≫ l = f ≫ Cofork.π s\np : (PushoutCocone.mk h k comm).pt ⟶ ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhp₁ : PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p = Cofork.π s\nright✝ : PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ p = l\nm :\n  ((Functor.const WalkingParallelPair).obj\n          (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n      WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nw : Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s\nz :\n  Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m =\n    PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p\n⊢ PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ m = PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ p\n[PROOFSTEP]\nerw [← cancel_epi g, ← Category.assoc, ← eq_whisker comm]\n[GOAL]\ncase mk.mk.intro.h₁\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\nl :\n  (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)).pt ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhl : Cofork.π (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)) ≫ l = f ≫ Cofork.π s\np : (PushoutCocone.mk h k comm).pt ⟶ ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhp₁ : PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p = Cofork.π s\nright✝ : PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ p = l\nm :\n  ((Functor.const WalkingParallelPair).obj\n          (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n      WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nw : Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s\nz :\n  Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m =\n    PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p\n⊢ (f ≫ h) ≫ m = g ≫ PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ p\n[PROOFSTEP]\nerw [← Category.assoc, ← eq_whisker comm]\n[GOAL]\ncase mk.mk.intro.h₁\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\nl :\n  (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)).pt ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhl : Cofork.π (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)) ≫ l = f ≫ Cofork.π s\np : (PushoutCocone.mk h k comm).pt ⟶ ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhp₁ : PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p = Cofork.π s\nright✝ : PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ p = l\nm :\n  ((Functor.const WalkingParallelPair).obj\n          (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n      WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nw : Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s\nz :\n  Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m =\n    PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p\n⊢ (f ≫ h) ≫ m = (f ≫ h) ≫ p\n[PROOFSTEP]\ndsimp at z \n[GOAL]\ncase mk.mk.intro.h₁\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y P Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngr : RegularEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\ns : Cofork (RegularEpi.left ≫ f) (RegularEpi.right ≫ f)\nl₁ : RegularEpi.left ≫ f ≫ Cofork.π s = RegularEpi.right ≫ f ≫ Cofork.π s\nl :\n  (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)).pt ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhl : Cofork.π (Cofork.ofπ g (_ : RegularEpi.left ≫ g = RegularEpi.right ≫ g)) ≫ l = f ≫ Cofork.π s\np : (PushoutCocone.mk h k comm).pt ⟶ ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhp₁ : PushoutCocone.inl (PushoutCocone.mk h k comm) ≫ p = Cofork.π s\nright✝ : PushoutCocone.inr (PushoutCocone.mk h k comm) ≫ p = l\nm :\n  ((Functor.const WalkingParallelPair).obj\n          (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)).pt).obj\n      WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nw : Cofork.π (Cofork.ofπ h (_ : (RegularEpi.left ≫ f) ≫ h = (RegularEpi.right ≫ f) ≫ h)) ≫ m = Cofork.π s\nz : h ≫ m = h ≫ p\n⊢ (f ≫ h) ≫ m = (f ≫ h) ≫ p\n[PROOFSTEP]\nsimp only [Category.assoc, z]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularEpi f\n⊢ ∀ (X_1 Y_1 : C) (z : X_1 ⟶ Y_1), Mono z → ∀ (u : X ⟶ X_1) (v : Y ⟶ Y_1) (sq : CommSq u f z v), CommSq.HasLift sq\n[PROOFSTEP]\nintro A B z hz u v sq\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularEpi f\nA B : C\nz : A ⟶ B\nhz : Mono z\nu : X ⟶ A\nv : Y ⟶ B\nsq : CommSq u f z v\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nhave : (RegularEpi.left : RegularEpi.W f ⟶ X) ≫ u = RegularEpi.right ≫ u :=\n  by\n  apply (cancel_mono z).1\n  simp only [Category.assoc, sq.w, RegularEpi.w_assoc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularEpi f\nA B : C\nz : A ⟶ B\nhz : Mono z\nu : X ⟶ A\nv : Y ⟶ B\nsq : CommSq u f z v\n⊢ RegularEpi.left ≫ u = RegularEpi.right ≫ u\n[PROOFSTEP]\napply (cancel_mono z).1\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularEpi f\nA B : C\nz : A ⟶ B\nhz : Mono z\nu : X ⟶ A\nv : Y ⟶ B\nsq : CommSq u f z v\n⊢ (RegularEpi.left ≫ u) ≫ z = (RegularEpi.right ≫ u) ≫ z\n[PROOFSTEP]\nsimp only [Category.assoc, sq.w, RegularEpi.w_assoc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularEpi f\nA B : C\nz : A ⟶ B\nhz : Mono z\nu : X ⟶ A\nv : Y ⟶ B\nsq : CommSq u f z v\nthis : RegularEpi.left ≫ u = RegularEpi.right ≫ u\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := RegularEpi.desc' f u this\n[GOAL]\ncase mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularEpi f\nA B : C\nz : A ⟶ B\nhz : Mono z\nu : X ⟶ A\nv : Y ⟶ B\nsq : CommSq u f z v\nthis : RegularEpi.left ≫ u = RegularEpi.right ≫ u\nt : Y ⟶ A\nht : f ≫ t = u\n⊢ CommSq.HasLift sq\n[PROOFSTEP]\nexact\n  CommSq.HasLift.mk'\n    ⟨t, ht, (cancel_epi f).1 (by simp only [← Category.assoc, ht, ← sq.w, Arrow.mk_hom, Arrow.homMk'_right])⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : RegularEpi f\nA B : C\nz : A ⟶ B\nhz : Mono z\nu : X ⟶ A\nv : Y ⟶ B\nsq : CommSq u f z v\nthis : RegularEpi.left ≫ u = RegularEpi.right ≫ u\nt : Y ⟶ A\nht : f ≫ t = u\n⊢ f ≫ t ≫ z = f ≫ v\n[PROOFSTEP]\nsimp only [← Category.assoc, ht, ← sq.w, Arrow.mk_hom, Arrow.homMk'_right]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : SplitEpiCategory C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nx✝ : Epi f\n⊢ RegularEpi f\n[PROOFSTEP]\nhaveI := isSplitEpi_of_epi f\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : SplitEpiCategory C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nx✝ : Epi f\nthis : IsSplitEpi f\n⊢ RegularEpi f\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : RegularEpiCategory C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nx✝ : Epi f\n⊢ StrongEpi f\n[PROOFSTEP]\nhaveI := regularEpiOfEpi f\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : RegularEpiCategory C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nx✝ : Epi f\nthis : RegularEpi f\n⊢ StrongEpi f\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.RegularMono", "llama_tokens": 22317, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6992544085240401, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.37145049618089193}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nemb : Fintype (α ↪ β)\n⊢ ‖α ↪ β‖ = descFactorial ‖β‖ ‖α‖\n[PROOFSTEP]\nrw [Subsingleton.elim emb Embedding.fintype]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nemb : Fintype (α ↪ β)\n⊢ ‖α ↪ β‖ = descFactorial ‖β‖ ‖α‖\n[PROOFSTEP]\nrefine'\n  Fintype.induction_empty_option (P := fun t ↦ ‖t ↪ β‖ = ‖β‖.descFactorial ‖t‖) (fun α₁ α₂ h₂ e ih ↦ ?_) (?_)\n    (fun γ h ih ↦ ?_) α\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nemb : Fintype (α ↪ β)\nα₁ α₂ : Type u_1\nh₂ : Fintype α₂\ne : α₁ ≃ α₂\nih : (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) α₁\n⊢ (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) α₂\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nemb : Fintype (α ↪ β)\n⊢ (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) PEmpty\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nemb : Fintype (α ↪ β)\nγ : Type u_1\nh : Fintype γ\nih : (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) γ\n⊢ (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) (Option γ)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nemb : Fintype (α ↪ β)\nα₁ α₂ : Type u_1\nh₂ : Fintype α₂\ne : α₁ ≃ α₂\nih : (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) α₁\n⊢ ‖α₂ ↪ β‖ = descFactorial ‖β‖ ‖α₂‖\n[PROOFSTEP]\nclear! α\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nemb : Fintype (α ↪ β)\n⊢ ‖PEmpty ↪ β‖ = descFactorial ‖β‖ ‖PEmpty‖\n[PROOFSTEP]\nclear! α\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nemb : Fintype (α ↪ β)\nγ : Type u_1\nh : Fintype γ\nih : (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) γ\n⊢ ‖Option γ ↪ β‖ = descFactorial ‖β‖ ‖Option γ‖\n[PROOFSTEP]\nclear! α\n[GOAL]\ncase refine'_1\nβ : Type u_2\ninst✝ : Fintype β\nα₁ α₂ : Type u_1\nh₂ : Fintype α₂\ne : α₁ ≃ α₂\nih : (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) α₁\n⊢ ‖α₂ ↪ β‖ = descFactorial ‖β‖ ‖α₂‖\n[PROOFSTEP]\nletI := Fintype.ofEquiv _ e.symm\n[GOAL]\ncase refine'_1\nβ : Type u_2\ninst✝ : Fintype β\nα₁ α₂ : Type u_1\nh₂ : Fintype α₂\ne : α₁ ≃ α₂\nih : (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) α₁\nthis : Fintype α₁ := ofEquiv α₂ e.symm\n⊢ ‖α₂ ↪ β‖ = descFactorial ‖β‖ ‖α₂‖\n[PROOFSTEP]\nrw [← card_congr (Equiv.embeddingCongr e (Equiv.refl β)), ih, card_congr e]\n[GOAL]\ncase refine'_2\nβ : Type u_2\ninst✝ : Fintype β\n⊢ ‖PEmpty ↪ β‖ = descFactorial ‖β‖ ‖PEmpty‖\n[PROOFSTEP]\nrw [card_pempty, Nat.descFactorial_zero, card_eq_one_iff]\n[GOAL]\ncase refine'_2\nβ : Type u_2\ninst✝ : Fintype β\n⊢ ∃ x, ∀ (y : PEmpty ↪ β), y = x\n[PROOFSTEP]\nexact ⟨Embedding.ofIsEmpty, fun x ↦ FunLike.ext _ _ isEmptyElim⟩\n[GOAL]\ncase refine'_3\nβ : Type u_2\ninst✝ : Fintype β\nγ : Type u_1\nh : Fintype γ\nih : (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) γ\n⊢ ‖Option γ ↪ β‖ = descFactorial ‖β‖ ‖Option γ‖\n[PROOFSTEP]\nclassical\ndsimp only at ih \nrw [card_option, Nat.descFactorial_succ, card_congr (Embedding.optionEmbeddingEquiv γ β), card_sigma, ← ih]\nsimp only [Fintype.card_compl_set, Fintype.card_range, Finset.sum_const, Finset.card_univ, smul_eq_mul, mul_comm]\n[GOAL]\ncase refine'_3\nβ : Type u_2\ninst✝ : Fintype β\nγ : Type u_1\nh : Fintype γ\nih : (fun t [Fintype t] => ‖t ↪ β‖ = descFactorial ‖β‖ ‖t‖) γ\n⊢ ‖Option γ ↪ β‖ = descFactorial ‖β‖ ‖Option γ‖\n[PROOFSTEP]\ndsimp only at ih \n[GOAL]\ncase refine'_3\nβ : Type u_2\ninst✝ : Fintype β\nγ : Type u_1\nh : Fintype γ\nih : ‖γ ↪ β‖ = descFactorial ‖β‖ ‖γ‖\n⊢ ‖Option γ ↪ β‖ = descFactorial ‖β‖ ‖Option γ‖\n[PROOFSTEP]\nrw [card_option, Nat.descFactorial_succ, card_congr (Embedding.optionEmbeddingEquiv γ β), card_sigma, ← ih]\n[GOAL]\ncase refine'_3\nβ : Type u_2\ninst✝ : Fintype β\nγ : Type u_1\nh : Fintype γ\nih : ‖γ ↪ β‖ = descFactorial ‖β‖ ‖γ‖\n⊢ ∑ a : γ ↪ β, ‖↑(Set.range ↑a)ᶜ‖ = (‖β‖ - ‖γ‖) * ‖γ ↪ β‖\n[PROOFSTEP]\nsimp only [Fintype.card_compl_set, Fintype.card_range, Finset.sum_const, Finset.card_univ, smul_eq_mul, mul_comm]\n", "meta": {"mathlib_filename": "Mathlib.Data.Fintype.CardEmbedding", "llama_tokens": 2345, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.679178699175393, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.37133290685446835}}
{"text": "[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nP : Ideal R\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nn : ℕ\n⊢ coeff (map (mk P) f) n = coeff (↑C (↑(mk P) (leadingCoeff f)) * X ^ natDegree f) n\n[PROOFSTEP]\nby_cases hf0 : f = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nP : Ideal R\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nn : ℕ\nhf0 : f = 0\n⊢ coeff (map (mk P) f) n = coeff (↑C (↑(mk P) (leadingCoeff f)) * X ^ natDegree f) n\n[PROOFSTEP]\nsimp [hf0]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nP : Ideal R\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nn : ℕ\nhf0 : ¬f = 0\n⊢ coeff (map (mk P) f) n = coeff (↑C (↑(mk P) (leadingCoeff f)) * X ^ natDegree f) n\n[PROOFSTEP]\nrcases lt_trichotomy (n : WithBot ℕ) (degree f) with (h | h | h)\n[GOAL]\ncase neg.inl\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nP : Ideal R\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nn : ℕ\nhf0 : ¬f = 0\nh : ↑n < degree f\n⊢ coeff (map (mk P) f) n = coeff (↑C (↑(mk P) (leadingCoeff f)) * X ^ natDegree f) n\n[PROOFSTEP]\nerw [coeff_map, eq_zero_iff_mem.2 (hfP n h), coeff_C_mul, coeff_X_pow, if_neg, mul_zero]\n[GOAL]\ncase neg.inl.hnc\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nP : Ideal R\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nn : ℕ\nhf0 : ¬f = 0\nh : ↑n < degree f\n⊢ ¬n = natDegree f\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase neg.inl.hnc\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nP : Ideal R\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nhf0 : ¬f = 0\nh : ↑(natDegree f) < degree f\n⊢ False\n[PROOFSTEP]\nexact not_lt_of_ge degree_le_natDegree h\n[GOAL]\ncase neg.inr.inl\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nP : Ideal R\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nn : ℕ\nhf0 : ¬f = 0\nh : ↑n = degree f\n⊢ coeff (map (mk P) f) n = coeff (↑C (↑(mk P) (leadingCoeff f)) * X ^ natDegree f) n\n[PROOFSTEP]\nhave : natDegree f = n := natDegree_eq_of_degree_eq_some h.symm\n[GOAL]\ncase neg.inr.inl\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nP : Ideal R\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nn : ℕ\nhf0 : ¬f = 0\nh : ↑n = degree f\nthis : natDegree f = n\n⊢ coeff (map (mk P) f) n = coeff (↑C (↑(mk P) (leadingCoeff f)) * X ^ natDegree f) n\n[PROOFSTEP]\nrw [coeff_C_mul, coeff_X_pow, if_pos this.symm, mul_one, leadingCoeff, this, coeff_map]\n[GOAL]\ncase neg.inr.inr\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nP : Ideal R\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nn : ℕ\nhf0 : ¬f = 0\nh : degree f < ↑n\n⊢ coeff (map (mk P) f) n = coeff (↑C (↑(mk P) (leadingCoeff f)) * X ^ natDegree f) n\n[PROOFSTEP]\nrw [coeff_eq_zero_of_degree_lt, coeff_eq_zero_of_degree_lt]\n[GOAL]\ncase neg.inr.inr\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nP : Ideal R\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nn : ℕ\nhf0 : ¬f = 0\nh : degree f < ↑n\n⊢ degree (↑C (↑(mk P) (leadingCoeff f)) * X ^ natDegree f) < ↑n\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (degree_C_mul_X_pow_le _ _) _\n[GOAL]\ncase neg.inr.inr\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nP : Ideal R\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nn : ℕ\nhf0 : ¬f = 0\nh : degree f < ↑n\n⊢ ↑(natDegree f) < ↑n\n[PROOFSTEP]\nrwa [← degree_eq_natDegree hf0]\n[GOAL]\ncase neg.inr.inr\nR : Type u_1\ninst✝ : CommRing R\nf : R[X]\nP : Ideal R\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nn : ℕ\nhf0 : ¬f = 0\nh : degree f < ↑n\n⊢ degree (map (mk P) f) < ↑n\n[PROOFSTEP]\nexact lt_of_le_of_lt (degree_map_le _ _) h\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nP : Ideal R\nhP : Ideal.IsPrime P\nq : R[X]\nc : (R ⧸ P)[X]\nhq : map (mk P) q = c * X ^ n\nhc0 : degree c = 0\n⊢ ↑n = degree (map (mk P) q)\n[PROOFSTEP]\nrw [hq, degree_mul, hc0, zero_add, degree_pow, degree_X, nsmul_one, Nat.cast_withBot]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nP : Ideal R\nq : R[X]\nc : (R ⧸ P)[X]\nhq : map (mk P) q = c * X ^ n\nhn0 : 0 < n\n⊢ eval 0 q ∈ P\n[PROOFSTEP]\nrw [← coeff_zero_eq_eval_zero, ← eq_zero_iff_mem, ← coeff_map, hq,\n  --Porting note: why is this lemma required twice?coeff_zero_eq_eval_zero, coeff_zero_eq_eval_zero, eval_mul, eval_pow,\n  eval_X, zero_pow hn0, mul_zero]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhu : IsPrimitive (p * q)\nhpm : natDegree p = 0\n⊢ IsUnit p\n[PROOFSTEP]\nrw [eq_C_of_degree_le_zero (natDegree_eq_zero_iff_degree_le_zero.1 hpm), isUnit_C]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhu : IsPrimitive (p * q)\nhpm : natDegree p = 0\n⊢ IsUnit (coeff p 0)\n[PROOFSTEP]\nrefine' hu _ _\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhu : IsPrimitive (p * q)\nhpm : natDegree p = 0\n⊢ ↑C (coeff p 0) ∣ p * q\n[PROOFSTEP]\nrw [← eq_C_of_degree_le_zero (natDegree_eq_zero_iff_degree_le_zero.1 hpm)]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhu : IsPrimitive (p * q)\nhpm : natDegree p = 0\n⊢ p ∣ p * q\n[PROOFSTEP]\nexact dvd_mul_right _ _\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nf : R[X]\nP : Ideal R\nhP : Ideal.IsPrime P\nhfl : ¬leadingCoeff f ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nhfd0 : 0 < degree f\nh0 : ¬coeff f 0 ∈ P ^ 2\nhu : IsPrimitive f\nx✝ : f = 0\n⊢ False\n[PROOFSTEP]\nsimp_all only [not_true, Submodule.zero_mem, coeff_zero]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nf : R[X]\nP : Ideal R\nhP : Ideal.IsPrime P\nhfl : ¬leadingCoeff f ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nhfd0✝ : 0 < degree f\nh0 : ¬coeff f 0 ∈ P ^ 2\nhu : IsPrimitive f\nhf0 : f ≠ 0\nhf : map (mk P) f = ↑C (↑(mk P) (leadingCoeff f)) * X ^ natDegree f\nhfd0 : 0 < natDegree f\nh : degree f = 0\n⊢ False\n[PROOFSTEP]\nsimp_all only [lt_irrefl]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nf : R[X]\nP : Ideal R\nhP : Ideal.IsPrime P\nhfl : ¬leadingCoeff f ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree f → coeff f n ∈ P\nhfd0✝ : 0 < degree f\nh0 : ¬coeff f 0 ∈ P ^ 2\nhu : IsPrimitive f\nhf0 : f ≠ 0\nhf : map (mk P) f = ↑C (↑(mk P) (leadingCoeff f)) * X ^ natDegree f\nhfd0 : 0 < natDegree f\n⊢ ∀ (a b : R[X]), f = a * b → IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nrintro p q rfl\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) (p * q) = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nrw [Polynomial.map_mul] at hf \n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nrcases mul_eq_mul_prime_pow (show Prime (X : Polynomial (R ⧸ P)) from monic_X.prime_of_degree_eq_one degree_X) hf with\n  ⟨m, n, b, c, hmnd, hbc, hp, hq⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nhave hmn : 0 < m → 0 < n → False := by\n  intro hm0 hn0\n  refine' h0 _\n  rw [coeff_zero_eq_eval_zero, eval_mul, sq]\n  exact Ideal.mul_mem_mul (eval_zero_mem_ideal_of_eq_mul_X_pow hp hm0) (eval_zero_mem_ideal_of_eq_mul_X_pow hq hn0)\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\n⊢ 0 < m → 0 < n → False\n[PROOFSTEP]\nintro hm0 hn0\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhm0 : 0 < m\nhn0 : 0 < n\n⊢ False\n[PROOFSTEP]\nrefine' h0 _\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhm0 : 0 < m\nhn0 : 0 < n\n⊢ coeff (p * q) 0 ∈ P ^ 2\n[PROOFSTEP]\nrw [coeff_zero_eq_eval_zero, eval_mul, sq]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhm0 : 0 < m\nhn0 : 0 < n\n⊢ eval 0 p * eval 0 q ∈ P * P\n[PROOFSTEP]\nexact Ideal.mul_mem_mul (eval_zero_mem_ideal_of_eq_mul_X_pow hp hm0) (eval_zero_mem_ideal_of_eq_mul_X_pow hq hn0)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nhave hpql0 : (mk P) (p * q).leadingCoeff ≠ 0 := by rwa [Ne.def, eq_zero_iff_mem]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\n⊢ ↑(mk P) (leadingCoeff (p * q)) ≠ 0\n[PROOFSTEP]\nrwa [Ne.def, eq_zero_iff_mem]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nhave hp0 : p ≠ 0 := fun h => by simp_all only [zero_mul, eq_self_iff_true, not_true, Ne.def]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nh : p = 0\n⊢ False\n[PROOFSTEP]\nsimp_all only [zero_mul, eq_self_iff_true, not_true, Ne.def]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nhave hq0 : q ≠ 0 := fun h => by simp_all only [eq_self_iff_true, not_true, Ne.def, mul_zero]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nh : q = 0\n⊢ False\n[PROOFSTEP]\nsimp_all only [eq_self_iff_true, not_true, Ne.def, mul_zero]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nhave hbc0 : degree b = 0 ∧ degree c = 0 := by\n  apply_fun degree at hbc \n  rwa [degree_C hpql0, degree_mul, eq_comm, Nat.WithBot.add_eq_zero_iff] at hbc \n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\n⊢ degree b = 0 ∧ degree c = 0\n[PROOFSTEP]\napply_fun degree at hbc \n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc : degree (↑C (↑(mk P) (leadingCoeff (p * q)))) = degree (b * c)\n⊢ degree b = 0 ∧ degree c = 0\n[PROOFSTEP]\nrwa [degree_C hpql0, degree_mul, eq_comm, Nat.WithBot.add_eq_zero_iff] at hbc \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nhave hmp : m ≤ natDegree p := le_natDegree_of_map_eq_mul_X_pow hP hp hbc0.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nhave hnq : n ≤ natDegree q := le_natDegree_of_map_eq_mul_X_pow hP hq hbc0.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\nhnq : n ≤ natDegree q\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nhave hpmqn : p.natDegree = m ∧ q.natDegree = n :=\n  by\n  rw [natDegree_mul hp0 hq0] at hmnd \n  contrapose hmnd\n  apply ne_of_lt\n  rw [not_and_or] at hmnd \n  cases' hmnd with hmnd hmnd\n  · exact add_lt_add_of_lt_of_le (lt_of_le_of_ne hmp (Ne.symm hmnd)) hnq\n  · exact add_lt_add_of_le_of_lt hmp (lt_of_le_of_ne hnq (Ne.symm hmnd))\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\nhnq : n ≤ natDegree q\n⊢ natDegree p = m ∧ natDegree q = n\n[PROOFSTEP]\nrw [natDegree_mul hp0 hq0] at hmnd \n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree p + natDegree q\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\nhnq : n ≤ natDegree q\n⊢ natDegree p = m ∧ natDegree q = n\n[PROOFSTEP]\ncontrapose hmnd\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\nhnq : n ≤ natDegree q\nhmnd : ¬(natDegree p = m ∧ natDegree q = n)\n⊢ ¬m + n = natDegree p + natDegree q\n[PROOFSTEP]\napply ne_of_lt\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\nhnq : n ≤ natDegree q\nhmnd : ¬(natDegree p = m ∧ natDegree q = n)\n⊢ m + n < natDegree p + natDegree q\n[PROOFSTEP]\nrw [not_and_or] at hmnd \n[GOAL]\ncase h\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\nhnq : n ≤ natDegree q\nhmnd : ¬natDegree p = m ∨ ¬natDegree q = n\n⊢ m + n < natDegree p + natDegree q\n[PROOFSTEP]\ncases' hmnd with hmnd hmnd\n[GOAL]\ncase h.inl\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\nhnq : n ≤ natDegree q\nhmnd : ¬natDegree p = m\n⊢ m + n < natDegree p + natDegree q\n[PROOFSTEP]\nexact add_lt_add_of_lt_of_le (lt_of_le_of_ne hmp (Ne.symm hmnd)) hnq\n[GOAL]\ncase h.inr\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\nhnq : n ≤ natDegree q\nhmnd : ¬natDegree q = n\n⊢ m + n < natDegree p + natDegree q\n[PROOFSTEP]\nexact add_lt_add_of_le_of_lt hmp (lt_of_le_of_ne hnq (Ne.symm hmnd))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\nhnq : n ≤ natDegree q\nhpmqn : natDegree p = m ∧ natDegree q = n\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nobtain rfl | rfl : m = 0 ∨ n = 0 := by\n  rwa [pos_iff_ne_zero, pos_iff_ne_zero, imp_false, Classical.not_not, ← or_iff_not_imp_left] at hmn \n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm n : ℕ\nb c : (R ⧸ P)[X]\nhmnd : m + n = natDegree (p * q)\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhq : map (mk P) q = c * X ^ n\nhmn : 0 < m → 0 < n → False\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\nhnq : n ≤ natDegree q\nhpmqn : natDegree p = m ∧ natDegree q = n\n⊢ m = 0 ∨ n = 0\n[PROOFSTEP]\nrwa [pos_iff_ne_zero, pos_iff_ne_zero, imp_false, Classical.not_not, ← or_iff_not_imp_left] at hmn \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.inl\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nn : ℕ\nb c : (R ⧸ P)[X]\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhq : map (mk P) q = c * X ^ n\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhnq : n ≤ natDegree q\nhmnd : 0 + n = natDegree (p * q)\nhp : map (mk P) p = b * X ^ 0\nhmn : 0 < 0 → 0 < n → False\nhmp : 0 ≤ natDegree p\nhpmqn : natDegree p = 0 ∧ natDegree q = n\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nexact Or.inl (isUnit_of_natDegree_eq_zero_of_isPrimitive hu hpmqn.1)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.inr\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm : ℕ\nb c : (R ⧸ P)[X]\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\nhmnd : m + 0 = natDegree (p * q)\nhq : map (mk P) q = c * X ^ 0\nhmn : 0 < m → 0 < 0 → False\nhnq : 0 ≤ natDegree q\nhpmqn : natDegree p = m ∧ natDegree q = 0\n⊢ IsUnit p ∨ IsUnit q\n[PROOFSTEP]\nexact\n  Or.inr (isUnit_of_natDegree_eq_zero_of_isPrimitive (show IsPrimitive (q * p) by simpa [mul_comm] using hu) hpmqn.2)\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nP : Ideal R\nhP : Ideal.IsPrime P\np q : R[X]\nhfl : ¬leadingCoeff (p * q) ∈ P\nhfP : ∀ (n : ℕ), ↑n < degree (p * q) → coeff (p * q) n ∈ P\nhfd0✝ : 0 < degree (p * q)\nh0 : ¬coeff (p * q) 0 ∈ P ^ 2\nhu : IsPrimitive (p * q)\nhf0 : p * q ≠ 0\nhf : map (mk P) p * map (mk P) q = ↑C (↑(mk P) (leadingCoeff (p * q))) * X ^ natDegree (p * q)\nhfd0 : 0 < natDegree (p * q)\nm : ℕ\nb c : (R ⧸ P)[X]\nhbc : ↑C (↑(mk P) (leadingCoeff (p * q))) = b * c\nhp : map (mk P) p = b * X ^ m\nhpql0 : ↑(mk P) (leadingCoeff (p * q)) ≠ 0\nhp0 : p ≠ 0\nhq0 : q ≠ 0\nhbc0 : degree b = 0 ∧ degree c = 0\nhmp : m ≤ natDegree p\nhmnd : m + 0 = natDegree (p * q)\nhq : map (mk P) q = c * X ^ 0\nhmn : 0 < m → 0 < 0 → False\nhnq : 0 ≤ natDegree q\nhpmqn : natDegree p = m ∧ natDegree q = 0\n⊢ IsPrimitive (q * p)\n[PROOFSTEP]\nsimpa [mul_comm] using hu\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.EisensteinCriterion", "llama_tokens": 17368, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6513548782017745, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.37117630435482657}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\nF : Ctop α σ\nE : σ ≃ τ\nf : σ → Set α\nT : α → σ\nh₁ : ∀ (x : α), x ∈ f (T x)\nI : (a b : σ) → (x : α) → x ∈ f a ∩ f b → σ\nh₂ : ∀ (a b : σ) (x : α) (h : x ∈ f a ∩ f b), x ∈ f (I a b x h)\nh₃ : ∀ (a b : σ) (x : α) (h : x ∈ f a ∩ f b), f (I a b x h) ⊆ f a ∩ f b\nx : α\n⊢ x ∈ (fun a => f (↑E.symm a)) ((fun x => ↑E (T x)) x)\n[PROOFSTEP]\nsimpa using h₁ x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\nF : Ctop α σ\nE : σ ≃ τ\nf : σ → Set α\nT : α → σ\nh₁ : ∀ (x : α), x ∈ f (T x)\nI : (a b : σ) → (x : α) → x ∈ f a ∩ f b → σ\nh₂ : ∀ (a b : σ) (x : α) (h : x ∈ f a ∩ f b), x ∈ f (I a b x h)\nh₃ : ∀ (a b : σ) (x : α) (h : x ∈ f a ∩ f b), f (I a b x h) ⊆ f a ∩ f b\na b : τ\nx : α\nh : x ∈ (fun a => f (↑E.symm a)) a ∩ (fun a => f (↑E.symm a)) b\n⊢ x ∈ (fun a => f (↑E.symm a)) ((fun a b x h => ↑E (I (↑E.symm a) (↑E.symm b) x h)) a b x h)\n[PROOFSTEP]\nsimpa using h₂ (E.symm a) (E.symm b) x h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\nF : Ctop α σ\nE : σ ≃ τ\nf : σ → Set α\nT : α → σ\nh₁ : ∀ (x : α), x ∈ f (T x)\nI : (a b : σ) → (x : α) → x ∈ f a ∩ f b → σ\nh₂ : ∀ (a b : σ) (x : α) (h : x ∈ f a ∩ f b), x ∈ f (I a b x h)\nh₃ : ∀ (a b : σ) (x : α) (h : x ∈ f a ∩ f b), f (I a b x h) ⊆ f a ∩ f b\na b : τ\nx : α\nh : x ∈ (fun a => f (↑E.symm a)) a ∩ (fun a => f (↑E.symm a)) b\n⊢ (fun a => f (↑E.symm a)) ((fun a b x h => ↑E (I (↑E.symm a) (↑E.symm b) x h)) a b x h) ⊆\n    (fun a => f (↑E.symm a)) a ∩ (fun a => f (↑E.symm a)) b\n[PROOFSTEP]\nsimpa using h₃ (E.symm a) (E.symm b) x h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\nF✝ : Ctop α σ\nE : σ ≃ τ\nF : Ctop α σ\na : τ\n⊢ f (ofEquiv E F) a = f F (↑E.symm a)\n[PROOFSTEP]\ncases F\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\nF : Ctop α σ\nE : σ ≃ τ\na : τ\nf✝ : σ → Set α\ntop✝ : α → σ\ntop_mem✝ : ∀ (x : α), x ∈ f✝ (top✝ x)\ninter✝ : (a b : σ) → (x : α) → x ∈ f✝ a ∩ f✝ b → σ\ninter_mem✝ : ∀ (a b : σ) (x : α) (h : x ∈ f✝ a ∩ f✝ b), x ∈ f✝ (inter✝ a b x h)\ninter_sub✝ : ∀ (a b : σ) (x : α) (h : x ∈ f✝ a ∩ f✝ b), f✝ (inter✝ a b x h) ⊆ f✝ a ∩ f✝ b\n⊢ f\n      (ofEquiv E\n        { f := f✝, top := top✝, top_mem := top_mem✝, inter := inter✝, inter_mem := inter_mem✝,\n          inter_sub := inter_sub✝ })\n      a =\n    f { f := f✝, top := top✝, top_mem := top_mem✝, inter := inter✝, inter_mem := inter_mem✝, inter_sub := inter_sub✝ }\n      (↑E.symm a)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\nT : TopologicalSpace α\nF : Realizer α\n⊢ TopologicalSpace.IsTopologicalBasis (range F.F.f)\n[PROOFSTEP]\nhave := toTopsp_isTopologicalBasis F.F\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\nT : TopologicalSpace α\nF : Realizer α\nthis : TopologicalSpace.IsTopologicalBasis (range F.F.f)\n⊢ TopologicalSpace.IsTopologicalBasis (range F.F.f)\n[PROOFSTEP]\nrwa [F.eq] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\nT : TopologicalSpace α\nF : Realizer α\ns : Set α\na : α\n⊢ s ∈ 𝓝 a ↔ ∃ b, a ∈ f F.F b ∧ f F.F b ⊆ s\n[PROOFSTEP]\nhave := @mem_nhds_toTopsp _ _ F.F s a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\nT : TopologicalSpace α\nF : Realizer α\ns : Set α\na : α\nthis : s ∈ 𝓝 a ↔ ∃ b, a ∈ f F.F b ∧ f F.F b ⊆ s\n⊢ s ∈ 𝓝 a ↔ ∃ b, a ∈ f F.F b ∧ f F.F b ⊆ s\n[PROOFSTEP]\nrwa [F.eq] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nF : Realizer α\ns : Set α\na : α\n⊢ (¬a ∈ s → ∃ b, a ∈ f F.F b ∧ ∀ (z : α), z ∈ f F.F b → ¬z ∈ s) ↔\n    (∀ (b : F.σ), a ∈ f F.F b → ∃ z, z ∈ f F.F b ∩ s) → a ∈ s\n[PROOFSTEP]\nhaveI := Classical.propDecidable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nF : Realizer α\ns : Set α\na : α\nthis : (a : Prop) → Decidable a\n⊢ (¬a ∈ s → ∃ b, a ∈ f F.F b ∧ ∀ (z : α), z ∈ f F.F b → ¬z ∈ s) ↔\n    (∀ (b : F.σ), a ∈ f F.F b → ∃ z, z ∈ f F.F b ∩ s) → a ∈ s\n[PROOFSTEP]\nrw [not_imp_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nF : Realizer α\ns : Set α\na : α\nthis : (a : Prop) → Decidable a\n⊢ (¬∃ b, a ∈ f F.F b ∧ ∀ (z : α), z ∈ f F.F b → ¬z ∈ s) → a ∈ s ↔\n    (∀ (b : F.σ), a ∈ f F.F b → ∃ z, z ∈ f F.F b ∩ s) → a ∈ s\n[PROOFSTEP]\nsimp [not_exists, not_and, not_forall, and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nF : Realizer α\ns : F.σ\na : α\nm : a ∈ f F.F s\n⊢ 𝓝 a ≤ 𝓟 (f F.F s)\n[PROOFSTEP]\nsimpa using F.mem_nhds.2 ⟨s, m, Subset.refl _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ✝ : Type u_3\nτ : Type u_4\nT : TopologicalSpace α\nσ : Type u_5\nF : Ctop α σ\nH : ∀ (a : α) (s : Set α), s ∈ 𝓝 a ↔ ∃ b, a ∈ f F b ∧ f F b ⊆ s\n⊢ toTopsp F = T\n[PROOFSTEP]\nrefine' eq_of_nhds_eq_nhds fun x ↦ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ✝ : Type u_3\nτ : Type u_4\nT : TopologicalSpace α\nσ : Type u_5\nF : Ctop α σ\nH : ∀ (a : α) (s : Set α), s ∈ 𝓝 a ↔ ∃ b, a ∈ f F b ∧ f F b ⊆ s\nx : α\n⊢ 𝓝 x = 𝓝 x\n[PROOFSTEP]\next s\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nσ✝ : Type u_3\nτ : Type u_4\nT : TopologicalSpace α\nσ : Type u_5\nF : Ctop α σ\nH : ∀ (a : α) (s : Set α), s ∈ 𝓝 a ↔ ∃ b, a ∈ f F b ∧ f F b ⊆ s\nx : α\ns : Set α\n⊢ s ∈ 𝓝 x ↔ s ∈ 𝓝 x\n[PROOFSTEP]\nrw [mem_nhds_toTopsp, H]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nF : Realizer α\nE : F.σ ≃ τ\na : α\ns✝ : Set α\nx✝ : ∃ b, a ∈ f F.F b ∧ f F.F b ⊆ s✝\ns : F.σ\nh : a ∈ f F.F s ∧ f F.F s ⊆ s✝\n⊢ a ∈ f (Ctop.ofEquiv E F.F) (↑E s) ∧ f (Ctop.ofEquiv E F.F) (↑E s) ⊆ s✝\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nF : Realizer α\nE : F.σ ≃ τ\na : α\ns : Set α\nx✝ : ∃ b, a ∈ f (Ctop.ofEquiv E F.F) b ∧ f (Ctop.ofEquiv E F.F) b ⊆ s\nt : τ\nh : a ∈ f (Ctop.ofEquiv E F.F) t ∧ f (Ctop.ofEquiv E F.F) t ⊆ s\n⊢ a ∈ f F.F (↑E.symm t) ∧ f F.F (↑E.symm t) ⊆ s\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nF : Realizer α\nE : F.σ ≃ τ\ns : τ\n⊢ f (ofEquiv F E).F s = f F.F (↑E.symm s)\n[PROOFSTEP]\ndelta ofEquiv\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nF : Realizer α\nE : F.σ ≃ τ\ns : τ\n⊢ f { σ := τ, F := Ctop.ofEquiv E F.F, eq := (_ : toTopsp (Ctop.ofEquiv E F.F) = inst✝) }.F s = f F.F (↑E.symm s)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nf : Filter α\nF : Filter.Realizer f\nx : F.σ\nh : f ≠ ⊥\nhF : CFilter.f F.F x ⊆ ∅\n⊢ { a // a ∈ ∅ ∧ 𝓝 a ⊓ f ≠ ⊥ }\n[PROOFSTEP]\nsuffices : f = ⊥\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nf : Filter α\nF : Filter.Realizer f\nx : F.σ\nh : f ≠ ⊥\nhF : CFilter.f F.F x ⊆ ∅\nthis : f = ⊥\n⊢ { a // a ∈ ∅ ∧ 𝓝 a ⊓ f ≠ ⊥ }\ncase this\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nf : Filter α\nF : Filter.Realizer f\nx : F.σ\nh : f ≠ ⊥\nhF : CFilter.f F.F x ⊆ ∅\n⊢ f = ⊥\n[PROOFSTEP]\nexact absurd this h\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nf : Filter α\nF : Filter.Realizer f\nx : F.σ\nh : f ≠ ⊥\nhF : CFilter.f F.F x ⊆ ∅\n⊢ f = ⊥\n[PROOFSTEP]\nrw [← F.eq, eq_bot_iff]\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\nτ : Type u_4\ninst✝ : TopologicalSpace α\nf : Filter α\nF : Filter.Realizer f\nx : F.σ\nh : f ≠ ⊥\nhF : CFilter.f F.F x ⊆ ∅\n⊢ CFilter.toFilter F.F ≤ ⊥\n[PROOFSTEP]\nexact λ s _ ↦ ⟨x, hF.trans s.empty_subset⟩\n", "meta": {"mathlib_filename": "Mathlib.Data.Analysis.Topology", "llama_tokens": 4204, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7248702761768249, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.37092815657617545}}
{"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA T : C\nhT : IsTerminal T\ninst✝ : Mono (IsTerminal.from hT A)\nZ : C\nf g : Z ⟶ A\n⊢ f = g\n[PROOFSTEP]\nrw [← cancel_mono (hT.from A)]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA T : C\nhT : IsTerminal T\ninst✝ : Mono (IsTerminal.from hT A)\nZ : C\nf g : Z ⟶ A\n⊢ f ≫ IsTerminal.from hT A = g ≫ IsTerminal.from hT A\n[PROOFSTEP]\napply hT.hom_ext\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : Mono (terminal.from A)\nZ : C\nf g : Z ⟶ A\n⊢ f = g\n[PROOFSTEP]\nrw [← cancel_mono (terminal.from A)]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : Mono (terminal.from A)\nZ : C\nf g : Z ⟶ A\n⊢ f ≫ terminal.from A = g ≫ terminal.from A\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : C\nhA : IsSubterminal A\ninst✝ : HasBinaryProduct A A\n⊢ diag A ≫ prod.fst = 𝟙 A\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : C\nhA : IsSubterminal A\ninst✝ : HasBinaryProduct A A\n⊢ prod.fst ≫ diag A = 𝟙 (A ⨯ A)\n[PROOFSTEP]\nrw [IsSubterminal.def] at hA \n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : C\nhA : ∀ ⦃Z : C⦄ (f g : Z ⟶ A), f = g\ninst✝ : HasBinaryProduct A A\n⊢ prod.fst ≫ diag A = 𝟙 (A ⨯ A)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : C\ninst✝¹ : HasBinaryProduct A A\ninst✝ : IsIso (diag A)\nZ : C\nf g : Z ⟶ A\n⊢ f = g\n[PROOFSTEP]\nhave : (Limits.prod.fst : A ⨯ A ⟶ _) = Limits.prod.snd := by simp [← cancel_epi (diag A)]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : C\ninst✝¹ : HasBinaryProduct A A\ninst✝ : IsIso (diag A)\nZ : C\nf g : Z ⟶ A\n⊢ prod.fst = prod.snd\n[PROOFSTEP]\nsimp [← cancel_epi (diag A)]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nA : C\ninst✝¹ : HasBinaryProduct A A\ninst✝ : IsIso (diag A)\nZ : C\nf g : Z ⟶ A\nthis : prod.fst = prod.snd\n⊢ f = g\n[PROOFSTEP]\nrw [← prod.lift_fst f g, this, prod.lift_snd]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : C\nhA : IsSubterminal A\ninst✝ : HasBinaryProduct A A\n⊢ A ⨯ A ≅ A\n[PROOFSTEP]\nletI := IsSubterminal.isIso_diag hA\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : C\nhA : IsSubterminal A\ninst✝ : HasBinaryProduct A A\nthis : IsIso (diag A) := isIso_diag hA\n⊢ A ⨯ A ≅ A\n[PROOFSTEP]\napply (asIso (diag A)).symm\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : C\ninst✝ : HasTerminal C\nX✝ Y✝ : Subterminals C\nf : X✝ ⟶ Y✝\n⊢ f ≫\n      MonoOver.arrow\n        ((fun X => { obj := Over.mk (terminal.from X.obj), property := (_ : Mono (terminal.from X.obj)) }) Y✝) =\n    MonoOver.arrow\n      ((fun X => { obj := Over.mk (terminal.from X.obj), property := (_ : Mono (terminal.from X.obj)) }) X✝)\n[PROOFSTEP]\next1 ⟨⟨⟩⟩\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : C\ninst✝ : HasTerminal C\nX : MonoOver (⊤_ C)\nZ : C\nf g : Z ⟶ X.obj.left\n⊢ f = g\n[PROOFSTEP]\nrw [← cancel_mono X.arrow]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nA : C\ninst✝ : HasTerminal C\nX : MonoOver (⊤_ C)\nZ : C\nf g : Z ⟶ X.obj.left\n⊢ f ≫ MonoOver.arrow X = g ≫ MonoOver.arrow X\n[PROOFSTEP]\napply Subsingleton.elim\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Subterminal", "llama_tokens": 1615, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947290421275, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.37068255524007276}}
{"text": "[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype n\ninst✝ : Nontrivial R\nh : 1 < Fintype.card n\n⊢ ¬IsLieAbelian { x // x ∈ sl n R }\n[PROOFSTEP]\nrcases Fintype.exists_pair_of_one_lt_card h with ⟨j, i, hij⟩\n[GOAL]\ncase intro.intro\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype n\ninst✝ : Nontrivial R\nh : 1 < Fintype.card n\nj i : n\nhij : j ≠ i\n⊢ ¬IsLieAbelian { x // x ∈ sl n R }\n[PROOFSTEP]\nlet A := Eb R i j hij\n[GOAL]\ncase intro.intro\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype n\ninst✝ : Nontrivial R\nh : 1 < Fintype.card n\nj i : n\nhij : j ≠ i\nA : { x // x ∈ sl n R } := Eb R i j hij\n⊢ ¬IsLieAbelian { x // x ∈ sl n R }\n[PROOFSTEP]\nlet B := Eb R j i hij.symm\n[GOAL]\ncase intro.intro\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype n\ninst✝ : Nontrivial R\nh : 1 < Fintype.card n\nj i : n\nhij : j ≠ i\nA : { x // x ∈ sl n R } := Eb R i j hij\nB : { x // x ∈ sl n R } := Eb R j i (_ : i ≠ j)\n⊢ ¬IsLieAbelian { x // x ∈ sl n R }\n[PROOFSTEP]\nintro c\n[GOAL]\ncase intro.intro\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype n\ninst✝ : Nontrivial R\nh : 1 < Fintype.card n\nj i : n\nhij : j ≠ i\nA : { x // x ∈ sl n R } := Eb R i j hij\nB : { x // x ∈ sl n R } := Eb R j i (_ : i ≠ j)\nc : IsLieAbelian { x // x ∈ sl n R }\n⊢ False\n[PROOFSTEP]\nhave c' : A.val * B.val = B.val * A.val := by rw [← sub_eq_zero, ← sl_bracket, c.trivial, ZeroMemClass.coe_zero]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype n\ninst✝ : Nontrivial R\nh : 1 < Fintype.card n\nj i : n\nhij : j ≠ i\nA : { x // x ∈ sl n R } := Eb R i j hij\nB : { x // x ∈ sl n R } := Eb R j i (_ : i ≠ j)\nc : IsLieAbelian { x // x ∈ sl n R }\n⊢ ↑A * ↑B = ↑B * ↑A\n[PROOFSTEP]\nrw [← sub_eq_zero, ← sl_bracket, c.trivial, ZeroMemClass.coe_zero]\n[GOAL]\ncase intro.intro\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype n\ninst✝ : Nontrivial R\nh : 1 < Fintype.card n\nj i : n\nhij : j ≠ i\nA : { x // x ∈ sl n R } := Eb R i j hij\nB : { x // x ∈ sl n R } := Eb R j i (_ : i ≠ j)\nc : IsLieAbelian { x // x ∈ sl n R }\nc' : ↑A * ↑B = ↑B * ↑A\n⊢ False\n[PROOFSTEP]\nsimpa [stdBasisMatrix, Matrix.mul_apply, hij] using congr_fun (congr_fun c' i) i\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq p\ninst✝³ : DecidableEq q\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nA : Matrix n n R\n⊢ A ∈ so n R ↔ Aᵀ = -A\n[PROOFSTEP]\nrw [so, mem_skewAdjointMatricesLieSubalgebra, mem_skewAdjointMatricesSubmodule]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq p\ninst✝³ : DecidableEq q\ninst✝² : DecidableEq l\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nA : Matrix n n R\n⊢ IsSkewAdjoint 1 A ↔ Aᵀ = -A\n[PROOFSTEP]\nsimp only [Matrix.IsSkewAdjoint, Matrix.IsAdjointPair, Matrix.mul_one, Matrix.one_mul]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\n⊢ Pso p q R i * Pso p q R (-i) = 1\n[PROOFSTEP]\next (x y)\n[GOAL]\ncase a.h\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : p ⊕ q\n⊢ (Pso p q R i * Pso p q R (-i)) x y = OfNat.ofNat 1 x y\n[PROOFSTEP]\nrcases x with ⟨x⟩ | ⟨x⟩\n[GOAL]\ncase a.h.inl\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\ny : p ⊕ q\nx : p\n⊢ (Pso p q R i * Pso p q R (-i)) (Sum.inl x) y = OfNat.ofNat 1 (Sum.inl x) y\n[PROOFSTEP]\nrcases y with ⟨y⟩ | ⟨y⟩\n[GOAL]\ncase a.h.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\ny : p ⊕ q\nx : q\n⊢ (Pso p q R i * Pso p q R (-i)) (Sum.inr x) y = OfNat.ofNat 1 (Sum.inr x) y\n[PROOFSTEP]\nrcases y with ⟨y⟩ | ⟨y⟩\n[GOAL]\ncase a.h.inl.inl\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : p\n⊢ (Pso p q R i * Pso p q R (-i)) (Sum.inl x) (Sum.inl y) = OfNat.ofNat 1 (Sum.inl x) (Sum.inl y)\n[PROOFSTEP]\nby_cases h : x = y\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : p\nh : x = y\n⊢ (Pso p q R i * Pso p q R (-i)) (Sum.inl x) (Sum.inl y) = OfNat.ofNat 1 (Sum.inl x) (Sum.inl y)\n[PROOFSTEP]\nsimp [Pso, indefiniteDiagonal, h]\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : p\nh : ¬x = y\n⊢ (Pso p q R i * Pso p q R (-i)) (Sum.inl x) (Sum.inl y) = OfNat.ofNat 1 (Sum.inl x) (Sum.inl y)\n[PROOFSTEP]\nsimp [Pso, indefiniteDiagonal, h]\n[GOAL]\ncase a.h.inl.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx : p\ny : q\n⊢ (Pso p q R i * Pso p q R (-i)) (Sum.inl x) (Sum.inr y) = OfNat.ofNat 1 (Sum.inl x) (Sum.inr y)\n[PROOFSTEP]\nsimp [Pso, indefiniteDiagonal]\n[GOAL]\ncase a.h.inr.inl\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx : q\ny : p\n⊢ (Pso p q R i * Pso p q R (-i)) (Sum.inr x) (Sum.inl y) = OfNat.ofNat 1 (Sum.inr x) (Sum.inl y)\n[PROOFSTEP]\nsimp [Pso, indefiniteDiagonal]\n[GOAL]\ncase a.h.inr.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : q\n⊢ (Pso p q R i * Pso p q R (-i)) (Sum.inr x) (Sum.inr y) = OfNat.ofNat 1 (Sum.inr x) (Sum.inr y)\n[PROOFSTEP]\nby_cases h : x = y\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : q\nh : x = y\n⊢ (Pso p q R i * Pso p q R (-i)) (Sum.inr x) (Sum.inr y) = OfNat.ofNat 1 (Sum.inr x) (Sum.inr y)\n[PROOFSTEP]\nsimp [Pso, indefiniteDiagonal, h, hi]\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : q\nh : ¬x = y\n⊢ (Pso p q R i * Pso p q R (-i)) (Sum.inr x) (Sum.inr y) = OfNat.ofNat 1 (Sum.inr x) (Sum.inr y)\n[PROOFSTEP]\nsimp [Pso, indefiniteDiagonal, h, hi]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\n⊢ (Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i = 1\n[PROOFSTEP]\next (x y)\n[GOAL]\ncase a.h\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : p ⊕ q\n⊢ ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i) x y = OfNat.ofNat 1 x y\n[PROOFSTEP]\nrcases x with ⟨x⟩ | ⟨x⟩\n[GOAL]\ncase a.h.inl\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\ny : p ⊕ q\nx : p\n⊢ ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i) (Sum.inl x) y = OfNat.ofNat 1 (Sum.inl x) y\n[PROOFSTEP]\nrcases y with ⟨y⟩ | ⟨y⟩\n[GOAL]\ncase a.h.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\ny : p ⊕ q\nx : q\n⊢ ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i) (Sum.inr x) y = OfNat.ofNat 1 (Sum.inr x) y\n[PROOFSTEP]\nrcases y with ⟨y⟩ | ⟨y⟩\n[GOAL]\ncase a.h.inl.inl\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : p\n⊢ ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i) (Sum.inl x) (Sum.inl y) =\n    OfNat.ofNat 1 (Sum.inl x) (Sum.inl y)\n[PROOFSTEP]\nby_cases h : x = y\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : p\nh : x = y\n⊢ ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i) (Sum.inl x) (Sum.inl y) =\n    OfNat.ofNat 1 (Sum.inl x) (Sum.inl y)\n[PROOFSTEP]\nsimp [Pso, indefiniteDiagonal, h]\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : p\nh : ¬x = y\n⊢ ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i) (Sum.inl x) (Sum.inl y) =\n    OfNat.ofNat 1 (Sum.inl x) (Sum.inl y)\n[PROOFSTEP]\nsimp [Pso, indefiniteDiagonal, h]\n[GOAL]\ncase a.h.inl.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx : p\ny : q\n⊢ ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i) (Sum.inl x) (Sum.inr y) =\n    OfNat.ofNat 1 (Sum.inl x) (Sum.inr y)\n[PROOFSTEP]\nsimp [Pso, indefiniteDiagonal]\n[GOAL]\ncase a.h.inr.inl\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx : q\ny : p\n⊢ ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i) (Sum.inr x) (Sum.inl y) =\n    OfNat.ofNat 1 (Sum.inr x) (Sum.inl y)\n[PROOFSTEP]\nsimp [Pso, indefiniteDiagonal]\n[GOAL]\ncase a.h.inr.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : q\n⊢ ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i) (Sum.inr x) (Sum.inr y) =\n    OfNat.ofNat 1 (Sum.inr x) (Sum.inr y)\n[PROOFSTEP]\nby_cases h : x = y\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : q\nh : x = y\n⊢ ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i) (Sum.inr x) (Sum.inr y) =\n    OfNat.ofNat 1 (Sum.inr x) (Sum.inr y)\n[PROOFSTEP]\nsimp [Pso, indefiniteDiagonal, h, hi]\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nx y : q\nh : ¬x = y\n⊢ ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i) (Sum.inr x) (Sum.inr y) =\n    OfNat.ofNat 1 (Sum.inr x) (Sum.inr y)\n[PROOFSTEP]\nsimp [Pso, indefiniteDiagonal, h, hi]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\n⊢ { x // x ∈ so' p q R } ≃ₗ⁅R⁆ { x // x ∈ so (p ⊕ q) R }\n[PROOFSTEP]\napply (skewAdjointMatricesLieSubalgebraEquiv (indefiniteDiagonal p q R) (Pso p q R i) (invertiblePso p q R hi)).trans\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\n⊢ { x // x ∈ skewAdjointMatricesLieSubalgebra ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i) } ≃ₗ⁅R⁆\n    { x // x ∈ so (p ⊕ q) R }\n[PROOFSTEP]\napply LieEquiv.ofEq\n[GOAL]\ncase h\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\n⊢ ↑(skewAdjointMatricesLieSubalgebra ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i)) = ↑(so (p ⊕ q) R)\n[PROOFSTEP]\next A\n[GOAL]\ncase h.h\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nA : Matrix (p ⊕ q) (p ⊕ q) R\n⊢ A ∈ ↑(skewAdjointMatricesLieSubalgebra ((Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i)) ↔\n    A ∈ ↑(so (p ⊕ q) R)\n[PROOFSTEP]\nrw [indefiniteDiagonal_transform p q R hi]\n[GOAL]\ncase h.h\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nA : Matrix (p ⊕ q) (p ⊕ q) R\n⊢ A ∈ ↑(skewAdjointMatricesLieSubalgebra 1) ↔ A ∈ ↑(so (p ⊕ q) R)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\ni : R\nhi : i * i = -1\nA : { x // x ∈ so' p q R }\n⊢ ↑(↑(soIndefiniteEquiv p q R hi) A) = (Pso p q R i)⁻¹ * ↑A * Pso p q R i\n[PROOFSTEP]\nrw [soIndefiniteEquiv, LieEquiv.trans_apply, LieEquiv.ofEq_apply, skewAdjointMatricesLieSubalgebraEquiv_apply]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\n⊢ S l R = fromBlocks 1 0 0 (-1)\n[PROOFSTEP]\nrw [← Matrix.diagonal_one, Matrix.diagonal_neg, Matrix.fromBlocks_diagonal]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁶ : DecidableEq n\ninst✝⁵ : DecidableEq p\ninst✝⁴ : DecidableEq q\ninst✝³ : DecidableEq l\ninst✝² : CommRing R\ninst✝¹ : Fintype p\ninst✝ : Fintype q\n⊢ S l R = diagonal (Sum.elim (fun x => 1) fun i => -1)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\n⊢ (PD l R)ᵀ * JD l R * PD l R = 2 • S l R\n[PROOFSTEP]\nhave h : (PD l R)ᵀ * JD l R = Matrix.fromBlocks 1 1 1 (-1) := by\n  simp [PD, JD, Matrix.fromBlocks_transpose, Matrix.fromBlocks_multiply]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\n⊢ (PD l R)ᵀ * JD l R = fromBlocks 1 1 1 (-1)\n[PROOFSTEP]\nsimp [PD, JD, Matrix.fromBlocks_transpose, Matrix.fromBlocks_multiply]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\nh : (PD l R)ᵀ * JD l R = fromBlocks 1 1 1 (-1)\n⊢ (PD l R)ᵀ * JD l R * PD l R = 2 • S l R\n[PROOFSTEP]\nrw [h, PD, s_as_blocks, Matrix.fromBlocks_multiply, Matrix.fromBlocks_smul]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\nh : (PD l R)ᵀ * JD l R = fromBlocks 1 1 1 (-1)\n⊢ fromBlocks (1 * 1 + 1 * 1) (1 * -1 + 1 * 1) (1 * 1 + -1 * 1) (1 * -1 + -1 * 1) =\n    fromBlocks (2 • 1) (2 • 0) (2 • 0) (2 • -1)\n[PROOFSTEP]\ncongr\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\nh : (PD l R)ᵀ * JD l R = fromBlocks 1 1 1 (-1)\n⊢ fromBlocks (1 * 1 + 1 * 1) (1 * -1 + 1 * 1) (1 * 1 + -1 * 1) (1 * -1 + -1 * 1) =\n    fromBlocks (2 • 1) (2 • 0) (2 • 0) (2 • -1)\n[PROOFSTEP]\nsimp [two_smul]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ PD l R * ⅟2 • (PD l R)ᵀ = 1\n[PROOFSTEP]\nrw [PD, Matrix.fromBlocks_transpose, Matrix.fromBlocks_smul, Matrix.fromBlocks_multiply]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ fromBlocks (1 * ⅟2 • 1ᵀ + -1 * ⅟2 • (-1)ᵀ) (1 * ⅟2 • 1ᵀ + -1 * ⅟2 • 1ᵀ) (1 * ⅟2 • 1ᵀ + 1 * ⅟2 • (-1)ᵀ)\n      (1 * ⅟2 • 1ᵀ + 1 * ⅟2 • 1ᵀ) =\n    1\n[PROOFSTEP]\nsimp\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ { x // x ∈ typeD l R } ≃ₗ⁅R⁆ { x // x ∈ so' l l R }\n[PROOFSTEP]\napply (skewAdjointMatricesLieSubalgebraEquiv (JD l R) (PD l R) (by infer_instance)).trans\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ Invertible (PD l R)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ { x // x ∈ skewAdjointMatricesLieSubalgebra ((PD l R)ᵀ * JD l R * PD l R) } ≃ₗ⁅R⁆ { x // x ∈ so' l l R }\n[PROOFSTEP]\napply LieEquiv.ofEq\n[GOAL]\ncase h\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ ↑(skewAdjointMatricesLieSubalgebra ((PD l R)ᵀ * JD l R * PD l R)) = ↑(so' l l R)\n[PROOFSTEP]\next A\n[GOAL]\ncase h.h\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\nA : Matrix (l ⊕ l) (l ⊕ l) R\n⊢ A ∈ ↑(skewAdjointMatricesLieSubalgebra ((PD l R)ᵀ * JD l R * PD l R)) ↔ A ∈ ↑(so' l l R)\n[PROOFSTEP]\nrw [jd_transform, ← unitOfInvertible_val (2 : R), ← Units.smul_def, LieSubalgebra.mem_coe,\n  mem_skewAdjointMatricesLieSubalgebra_unit_smul]\n[GOAL]\ncase h.h\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\nA : Matrix (l ⊕ l) (l ⊕ l) R\n⊢ A ∈ skewAdjointMatricesLieSubalgebra (S l R) ↔ A ∈ ↑(so' l l R)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ PB l R * fromBlocks 1 0 0 ⅟(PD l R) = 1\n[PROOFSTEP]\nrw [PB, Matrix.fromBlocks_multiply, mul_invOf_self]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ fromBlocks (1 * 1 + 0 * 0) (1 * 0 + 0 * ⅟(PD l R)) (0 * 1 + PD l R * 0) (0 * 0 + 1) = 1\n[PROOFSTEP]\nsimp only [Matrix.mul_zero, Matrix.mul_one, Matrix.zero_mul, zero_add, add_zero, Matrix.fromBlocks_one]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\n⊢ (PB l R)ᵀ * JB l R * PB l R = 2 • fromBlocks 1 0 0 (S l R)\n[PROOFSTEP]\nsimp [PB, JB, jd_transform, Matrix.fromBlocks_transpose, Matrix.fromBlocks_multiply, Matrix.fromBlocks_smul]\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\n⊢ indefiniteDiagonal (Unit ⊕ l) l R =\n    ↑(reindexLieEquiv (Equiv.sumAssoc Unit l l).symm) (fromBlocks 1 0 0 (indefiniteDiagonal l l R))\n[PROOFSTEP]\next ⟨⟨i₁ | i₂⟩ | i₃⟩ ⟨⟨j₁ | j₂⟩ | j₃⟩\n[GOAL]\ncase a.inl.inl.unit.h.inl.inl.unit\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\n⊢ indefiniteDiagonal (Unit ⊕ l) l R (Sum.inl (Sum.inl PUnit.unit)) (Sum.inl (Sum.inl PUnit.unit)) =\n    ↑(reindexLieEquiv (Equiv.sumAssoc Unit l l).symm) (fromBlocks 1 0 0 (indefiniteDiagonal l l R))\n      (Sum.inl (Sum.inl PUnit.unit)) (Sum.inl (Sum.inl PUnit.unit))\n[PROOFSTEP]\nsimp only [indefiniteDiagonal, Matrix.diagonal_apply, Equiv.sumAssoc_apply_inl_inl, Matrix.reindexLieEquiv_apply,\n  Matrix.submatrix_apply, Equiv.symm_symm, Matrix.reindex_apply, Sum.elim_inl, if_true, eq_self_iff_true,\n  Matrix.one_apply_eq, Matrix.fromBlocks_apply₁₁, DMatrix.zero_apply, Equiv.sumAssoc_apply_inl_inr, if_false,\n  Matrix.fromBlocks_apply₁₂, Matrix.fromBlocks_apply₂₁, Matrix.fromBlocks_apply₂₂, Equiv.sumAssoc_apply_inr,\n  Sum.elim_inr, Sum.inl_injective.eq_iff, Sum.inr_injective.eq_iff]\n[GOAL]\ncase a.inl.inl.unit.h.inl.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\nj₃ : l\n⊢ indefiniteDiagonal (Unit ⊕ l) l R (Sum.inl (Sum.inl PUnit.unit)) (Sum.inl (Sum.inr j₃)) =\n    ↑(reindexLieEquiv (Equiv.sumAssoc Unit l l).symm) (fromBlocks 1 0 0 (indefiniteDiagonal l l R))\n      (Sum.inl (Sum.inl PUnit.unit)) (Sum.inl (Sum.inr j₃))\n[PROOFSTEP]\nsimp only [indefiniteDiagonal, Matrix.diagonal_apply, Equiv.sumAssoc_apply_inl_inl, Matrix.reindexLieEquiv_apply,\n  Matrix.submatrix_apply, Equiv.symm_symm, Matrix.reindex_apply, Sum.elim_inl, if_true, eq_self_iff_true,\n  Matrix.one_apply_eq, Matrix.fromBlocks_apply₁₁, DMatrix.zero_apply, Equiv.sumAssoc_apply_inl_inr, if_false,\n  Matrix.fromBlocks_apply₁₂, Matrix.fromBlocks_apply₂₁, Matrix.fromBlocks_apply₂₂, Equiv.sumAssoc_apply_inr,\n  Sum.elim_inr, Sum.inl_injective.eq_iff, Sum.inr_injective.eq_iff]\n[GOAL]\ncase a.inl.inl.unit.h.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\nval✝ : l\n⊢ indefiniteDiagonal (Unit ⊕ l) l R (Sum.inl (Sum.inl PUnit.unit)) (Sum.inr val✝) =\n    ↑(reindexLieEquiv (Equiv.sumAssoc Unit l l).symm) (fromBlocks 1 0 0 (indefiniteDiagonal l l R))\n      (Sum.inl (Sum.inl PUnit.unit)) (Sum.inr val✝)\n[PROOFSTEP]\nsimp only [indefiniteDiagonal, Matrix.diagonal_apply, Equiv.sumAssoc_apply_inl_inl, Matrix.reindexLieEquiv_apply,\n  Matrix.submatrix_apply, Equiv.symm_symm, Matrix.reindex_apply, Sum.elim_inl, if_true, eq_self_iff_true,\n  Matrix.one_apply_eq, Matrix.fromBlocks_apply₁₁, DMatrix.zero_apply, Equiv.sumAssoc_apply_inl_inr, if_false,\n  Matrix.fromBlocks_apply₁₂, Matrix.fromBlocks_apply₂₁, Matrix.fromBlocks_apply₂₂, Equiv.sumAssoc_apply_inr,\n  Sum.elim_inr, Sum.inl_injective.eq_iff, Sum.inr_injective.eq_iff]\n[GOAL]\ncase a.inl.inr.h.inl.inl.unit\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\ni₃ : l\n⊢ indefiniteDiagonal (Unit ⊕ l) l R (Sum.inl (Sum.inr i₃)) (Sum.inl (Sum.inl PUnit.unit)) =\n    ↑(reindexLieEquiv (Equiv.sumAssoc Unit l l).symm) (fromBlocks 1 0 0 (indefiniteDiagonal l l R))\n      (Sum.inl (Sum.inr i₃)) (Sum.inl (Sum.inl PUnit.unit))\n[PROOFSTEP]\nsimp only [indefiniteDiagonal, Matrix.diagonal_apply, Equiv.sumAssoc_apply_inl_inl, Matrix.reindexLieEquiv_apply,\n  Matrix.submatrix_apply, Equiv.symm_symm, Matrix.reindex_apply, Sum.elim_inl, if_true, eq_self_iff_true,\n  Matrix.one_apply_eq, Matrix.fromBlocks_apply₁₁, DMatrix.zero_apply, Equiv.sumAssoc_apply_inl_inr, if_false,\n  Matrix.fromBlocks_apply₁₂, Matrix.fromBlocks_apply₂₁, Matrix.fromBlocks_apply₂₂, Equiv.sumAssoc_apply_inr,\n  Sum.elim_inr, Sum.inl_injective.eq_iff, Sum.inr_injective.eq_iff]\n[GOAL]\ncase a.inl.inr.h.inl.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\ni₃ j₃ : l\n⊢ indefiniteDiagonal (Unit ⊕ l) l R (Sum.inl (Sum.inr i₃)) (Sum.inl (Sum.inr j₃)) =\n    ↑(reindexLieEquiv (Equiv.sumAssoc Unit l l).symm) (fromBlocks 1 0 0 (indefiniteDiagonal l l R))\n      (Sum.inl (Sum.inr i₃)) (Sum.inl (Sum.inr j₃))\n[PROOFSTEP]\nsimp only [indefiniteDiagonal, Matrix.diagonal_apply, Equiv.sumAssoc_apply_inl_inl, Matrix.reindexLieEquiv_apply,\n  Matrix.submatrix_apply, Equiv.symm_symm, Matrix.reindex_apply, Sum.elim_inl, if_true, eq_self_iff_true,\n  Matrix.one_apply_eq, Matrix.fromBlocks_apply₁₁, DMatrix.zero_apply, Equiv.sumAssoc_apply_inl_inr, if_false,\n  Matrix.fromBlocks_apply₁₂, Matrix.fromBlocks_apply₂₁, Matrix.fromBlocks_apply₂₂, Equiv.sumAssoc_apply_inr,\n  Sum.elim_inr, Sum.inl_injective.eq_iff, Sum.inr_injective.eq_iff]\n[GOAL]\ncase a.inl.inr.h.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\ni₃ val✝ : l\n⊢ indefiniteDiagonal (Unit ⊕ l) l R (Sum.inl (Sum.inr i₃)) (Sum.inr val✝) =\n    ↑(reindexLieEquiv (Equiv.sumAssoc Unit l l).symm) (fromBlocks 1 0 0 (indefiniteDiagonal l l R))\n      (Sum.inl (Sum.inr i₃)) (Sum.inr val✝)\n[PROOFSTEP]\nsimp only [indefiniteDiagonal, Matrix.diagonal_apply, Equiv.sumAssoc_apply_inl_inl, Matrix.reindexLieEquiv_apply,\n  Matrix.submatrix_apply, Equiv.symm_symm, Matrix.reindex_apply, Sum.elim_inl, if_true, eq_self_iff_true,\n  Matrix.one_apply_eq, Matrix.fromBlocks_apply₁₁, DMatrix.zero_apply, Equiv.sumAssoc_apply_inl_inr, if_false,\n  Matrix.fromBlocks_apply₁₂, Matrix.fromBlocks_apply₂₁, Matrix.fromBlocks_apply₂₂, Equiv.sumAssoc_apply_inr,\n  Sum.elim_inr, Sum.inl_injective.eq_iff, Sum.inr_injective.eq_iff]\n[GOAL]\ncase a.inr.h.inl.inl.unit\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\nval✝ : l\n⊢ indefiniteDiagonal (Unit ⊕ l) l R (Sum.inr val✝) (Sum.inl (Sum.inl PUnit.unit)) =\n    ↑(reindexLieEquiv (Equiv.sumAssoc Unit l l).symm) (fromBlocks 1 0 0 (indefiniteDiagonal l l R)) (Sum.inr val✝)\n      (Sum.inl (Sum.inl PUnit.unit))\n[PROOFSTEP]\nsimp only [indefiniteDiagonal, Matrix.diagonal_apply, Equiv.sumAssoc_apply_inl_inl, Matrix.reindexLieEquiv_apply,\n  Matrix.submatrix_apply, Equiv.symm_symm, Matrix.reindex_apply, Sum.elim_inl, if_true, eq_self_iff_true,\n  Matrix.one_apply_eq, Matrix.fromBlocks_apply₁₁, DMatrix.zero_apply, Equiv.sumAssoc_apply_inl_inr, if_false,\n  Matrix.fromBlocks_apply₁₂, Matrix.fromBlocks_apply₂₁, Matrix.fromBlocks_apply₂₂, Equiv.sumAssoc_apply_inr,\n  Sum.elim_inr, Sum.inl_injective.eq_iff, Sum.inr_injective.eq_iff]\n[GOAL]\ncase a.inr.h.inl.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\nval✝ j₃ : l\n⊢ indefiniteDiagonal (Unit ⊕ l) l R (Sum.inr val✝) (Sum.inl (Sum.inr j₃)) =\n    ↑(reindexLieEquiv (Equiv.sumAssoc Unit l l).symm) (fromBlocks 1 0 0 (indefiniteDiagonal l l R)) (Sum.inr val✝)\n      (Sum.inl (Sum.inr j₃))\n[PROOFSTEP]\nsimp only [indefiniteDiagonal, Matrix.diagonal_apply, Equiv.sumAssoc_apply_inl_inl, Matrix.reindexLieEquiv_apply,\n  Matrix.submatrix_apply, Equiv.symm_symm, Matrix.reindex_apply, Sum.elim_inl, if_true, eq_self_iff_true,\n  Matrix.one_apply_eq, Matrix.fromBlocks_apply₁₁, DMatrix.zero_apply, Equiv.sumAssoc_apply_inl_inr, if_false,\n  Matrix.fromBlocks_apply₁₂, Matrix.fromBlocks_apply₂₁, Matrix.fromBlocks_apply₂₂, Equiv.sumAssoc_apply_inr,\n  Sum.elim_inr, Sum.inl_injective.eq_iff, Sum.inr_injective.eq_iff]\n[GOAL]\ncase a.inr.h.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\nval✝¹ val✝ : l\n⊢ indefiniteDiagonal (Unit ⊕ l) l R (Sum.inr val✝¹) (Sum.inr val✝) =\n    ↑(reindexLieEquiv (Equiv.sumAssoc Unit l l).symm) (fromBlocks 1 0 0 (indefiniteDiagonal l l R)) (Sum.inr val✝¹)\n      (Sum.inr val✝)\n[PROOFSTEP]\nsimp only [indefiniteDiagonal, Matrix.diagonal_apply, Equiv.sumAssoc_apply_inl_inl, Matrix.reindexLieEquiv_apply,\n  Matrix.submatrix_apply, Equiv.symm_symm, Matrix.reindex_apply, Sum.elim_inl, if_true, eq_self_iff_true,\n  Matrix.one_apply_eq, Matrix.fromBlocks_apply₁₁, DMatrix.zero_apply, Equiv.sumAssoc_apply_inl_inr, if_false,\n  Matrix.fromBlocks_apply₁₂, Matrix.fromBlocks_apply₂₁, Matrix.fromBlocks_apply₂₂, Equiv.sumAssoc_apply_inr,\n  Sum.elim_inr, Sum.inl_injective.eq_iff, Sum.inr_injective.eq_iff]\n[GOAL]\ncase a.inl.inl.unit.h.inl.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\nj₃ : l\n⊢ 0 = OfNat.ofNat 0 PUnit.unit (Sum.inl j₃)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase a.inl.inl.unit.h.inr\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\nval✝ : l\n⊢ 0 = OfNat.ofNat 0 PUnit.unit (Sum.inr val✝)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase a.inl.inr.h.inl.inl.unit\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\ni₃ : l\n⊢ 0 = OfNat.ofNat 0 (Sum.inl i₃) PUnit.unit\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase a.inr.h.inl.inl.unit\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁷ : DecidableEq n\ninst✝⁶ : DecidableEq p\ninst✝⁵ : DecidableEq q\ninst✝⁴ : DecidableEq l\ninst✝³ : CommRing R\ninst✝² : Fintype p\ninst✝¹ : Fintype q\ninst✝ : Fintype l\nval✝ : l\n⊢ 0 = OfNat.ofNat 0 (Sum.inr val✝) PUnit.unit\n[PROOFSTEP]\ncongr 1\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ { x // x ∈ typeB l R } ≃ₗ⁅R⁆ { x // x ∈ so' (Unit ⊕ l) l R }\n[PROOFSTEP]\napply (skewAdjointMatricesLieSubalgebraEquiv (JB l R) (PB l R) (by infer_instance)).trans\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ Invertible (PB l R)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ { x // x ∈ skewAdjointMatricesLieSubalgebra ((PB l R)ᵀ * JB l R * PB l R) } ≃ₗ⁅R⁆ { x // x ∈ so' (Unit ⊕ l) l R }\n[PROOFSTEP]\nsymm\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ { x // x ∈ so' (Unit ⊕ l) l R } ≃ₗ⁅R⁆ { x // x ∈ skewAdjointMatricesLieSubalgebra ((PB l R)ᵀ * JB l R * PB l R) }\n[PROOFSTEP]\napply\n  (skewAdjointMatricesLieSubalgebraEquivTranspose (indefiniteDiagonal (Sum Unit l) l R)\n      (Matrix.reindexAlgEquiv _ (Equiv.sumAssoc PUnit l l)) (Matrix.transpose_reindex _ _)).trans\n[GOAL]\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ { x //\n      x ∈\n        skewAdjointMatricesLieSubalgebra\n          (↑(reindexAlgEquiv R (Equiv.sumAssoc PUnit l l)) (indefiniteDiagonal (Unit ⊕ l) l R)) } ≃ₗ⁅R⁆\n    { x // x ∈ skewAdjointMatricesLieSubalgebra ((PB l R)ᵀ * JB l R * PB l R) }\n[PROOFSTEP]\napply LieEquiv.ofEq\n[GOAL]\ncase h\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\n⊢ ↑(skewAdjointMatricesLieSubalgebra\n        (↑(reindexAlgEquiv R (Equiv.sumAssoc PUnit l l)) (indefiniteDiagonal (Unit ⊕ l) l R))) =\n    ↑(skewAdjointMatricesLieSubalgebra ((PB l R)ᵀ * JB l R * PB l R))\n[PROOFSTEP]\next A\n[GOAL]\ncase h.h\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\nA : Matrix (PUnit ⊕ l ⊕ l) (PUnit ⊕ l ⊕ l) R\n⊢ A ∈\n      ↑(skewAdjointMatricesLieSubalgebra\n          (↑(reindexAlgEquiv R (Equiv.sumAssoc PUnit l l)) (indefiniteDiagonal (Unit ⊕ l) l R))) ↔\n    A ∈ ↑(skewAdjointMatricesLieSubalgebra ((PB l R)ᵀ * JB l R * PB l R))\n[PROOFSTEP]\nrw [jb_transform, ← unitOfInvertible_val (2 : R), ← Units.smul_def, LieSubalgebra.mem_coe, LieSubalgebra.mem_coe,\n  mem_skewAdjointMatricesLieSubalgebra_unit_smul]\n[GOAL]\ncase h.h\nn : Type u_1\np : Type u_2\nq : Type u_3\nl : Type u_4\nR : Type u₂\ninst✝⁸ : DecidableEq n\ninst✝⁷ : DecidableEq p\ninst✝⁶ : DecidableEq q\ninst✝⁵ : DecidableEq l\ninst✝⁴ : CommRing R\ninst✝³ : Fintype p\ninst✝² : Fintype q\ninst✝¹ : Fintype l\ninst✝ : Invertible 2\nA : Matrix (PUnit ⊕ l ⊕ l) (PUnit ⊕ l ⊕ l) R\n⊢ A ∈\n      skewAdjointMatricesLieSubalgebra\n        (↑(reindexAlgEquiv R (Equiv.sumAssoc PUnit l l)) (indefiniteDiagonal (Unit ⊕ l) l R)) ↔\n    A ∈ skewAdjointMatricesLieSubalgebra (fromBlocks 1 0 0 (S l R))\n[PROOFSTEP]\nsimp [indefiniteDiagonal_assoc, S]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.Classical", "llama_tokens": 20007, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419831347361, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.37063163677621724}}
{"text": "[GOAL]\na✝ : (Quotient.out (ord (aleph 1))).α\ni : (Quotient.out (ord (aleph 1))).α := a✝\nj : ↑(Iio i)\n⊢ (invImage (fun a => a) (hasWellFoundedOut (ord (aleph 1)))).1 (↑j) a✝\n[PROOFSTEP]\nexact j.2\n[GOAL]\nα : Type u\ns : Set (Set α)\ni : (Quotient.out (ord (aleph 1))).α\n⊢ s ⊆ generateMeasurableRec s i\n[PROOFSTEP]\nunfold generateMeasurableRec\n[GOAL]\nα : Type u\ns : Set (Set α)\ni : (Quotient.out (ord (aleph 1))).α\n⊢ s ⊆\n    let i := i;\n    let S := ⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j;\n    s ∪ {∅} ∪ compl '' S ∪ range fun f => ⋃ (n : ℕ), ↑(f n)\n[PROOFSTEP]\napply_rules [subset_union_of_subset_left]\n[GOAL]\ncase h.h.h\nα : Type u\ns : Set (Set α)\ni : (Quotient.out (ord (aleph 1))).α\n⊢ s ⊆ s\n[PROOFSTEP]\nexact subset_rfl\n[GOAL]\nα : Type u\ns : Set (Set α)\ni : (Quotient.out (ord (aleph 1))).α\n⊢ ∅ ∈ generateMeasurableRec s i\n[PROOFSTEP]\nunfold generateMeasurableRec\n[GOAL]\nα : Type u\ns : Set (Set α)\ni : (Quotient.out (ord (aleph 1))).α\n⊢ ∅ ∈\n    let i := i;\n    let S := ⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j;\n    s ∪ {∅} ∪ compl '' S ∪ range fun f => ⋃ (n : ℕ), ↑(f n)\n[PROOFSTEP]\nexact mem_union_left _ (mem_union_left _ (mem_union_right _ (mem_singleton ∅)))\n[GOAL]\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nh : j < i\nt : Set α\nht : t ∈ generateMeasurableRec s j\n⊢ tᶜ ∈ generateMeasurableRec s i\n[PROOFSTEP]\nunfold generateMeasurableRec\n[GOAL]\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nh : j < i\nt : Set α\nht : t ∈ generateMeasurableRec s j\n⊢ tᶜ ∈\n    let i := i;\n    let S := ⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j;\n    s ∪ {∅} ∪ compl '' S ∪ range fun f => ⋃ (n : ℕ), ↑(f n)\n[PROOFSTEP]\nexact mem_union_left _ (mem_union_right _ ⟨t, mem_iUnion.2 ⟨⟨j, h⟩, ht⟩, rfl⟩)\n[GOAL]\nα : Type u\ns : Set (Set α)\ni : (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\nhf : ∀ (n : ℕ), ∃ j, j < i ∧ f n ∈ generateMeasurableRec s j\n⊢ ⋃ (n : ℕ), f n ∈ generateMeasurableRec s i\n[PROOFSTEP]\nunfold generateMeasurableRec\n[GOAL]\nα : Type u\ns : Set (Set α)\ni : (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\nhf : ∀ (n : ℕ), ∃ j, j < i ∧ f n ∈ generateMeasurableRec s j\n⊢ ⋃ (n : ℕ), f n ∈\n    let i := i;\n    let S := ⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j;\n    s ∪ {∅} ∪ compl '' S ∪ range fun f => ⋃ (n : ℕ), ↑(f n)\n[PROOFSTEP]\nexact\n  mem_union_right _\n    ⟨fun n =>\n      ⟨f n,\n        let ⟨j, hj, hf⟩ := hf n;\n        mem_iUnion.2 ⟨⟨j, hj⟩, hf⟩⟩,\n      rfl⟩\n[GOAL]\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nh : i ≤ j\nx : Set α\nhx : x ∈ generateMeasurableRec s i\n⊢ x ∈ generateMeasurableRec s j\n[PROOFSTEP]\nrcases eq_or_lt_of_le h with (rfl | h)\n[GOAL]\ncase inl\nα : Type u\ns : Set (Set α)\ni : (Quotient.out (ord (aleph 1))).α\nx : Set α\nhx : x ∈ generateMeasurableRec s i\nh : i ≤ i\n⊢ x ∈ generateMeasurableRec s i\n[PROOFSTEP]\nexact hx\n[GOAL]\ncase inr\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nh✝ : i ≤ j\nx : Set α\nhx : x ∈ generateMeasurableRec s i\nh : i < j\n⊢ x ∈ generateMeasurableRec s j\n[PROOFSTEP]\nconvert iUnion_mem_generateMeasurableRec fun _ => ⟨i, h, hx⟩\n[GOAL]\ncase h.e'_4\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nh✝ : i ≤ j\nx : Set α\nhx : x ∈ generateMeasurableRec s i\nh : i < j\n⊢ x = ⋃ (n : ℕ), x\n[PROOFSTEP]\nexact (iUnion_const x).symm\n[GOAL]\nα : Type u\ns : Set (Set α)\ni : (Quotient.out (ord (aleph 1))).α\n⊢ #↑(generateMeasurableRec s i) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\napply (aleph 1).ord.out.wo.wf.induction i\n[GOAL]\nα : Type u\ns : Set (Set α)\ni : (Quotient.out (ord (aleph 1))).α\n⊢ ∀ (x : (Quotient.out (ord (aleph 1))).α),\n    (∀ (y : (Quotient.out (ord (aleph 1))).α),\n        WellOrder.r (Quotient.out (ord (aleph 1))) y x → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀) →\n      #↑(generateMeasurableRec s x) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nintro i IH\n[GOAL]\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #↑(generateMeasurableRec s i) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nhave A := aleph0_le_aleph 1\n[GOAL]\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\n⊢ #↑(generateMeasurableRec s i) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nhave B : aleph 1 ≤ max (#s) 2 ^ aleph0.{u} := aleph_one_le_continuum.trans (power_le_power_right (le_max_right _ _))\n[GOAL]\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #↑(generateMeasurableRec s i) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nhave C : ℵ₀ ≤ max (#s) 2 ^ aleph0.{u} := A.trans B\n[GOAL]\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #↑(generateMeasurableRec s i) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nhave J : #(⋃ j : Iio i, generateMeasurableRec s j.1) ≤ max (#s) 2 ^ aleph0.{u} :=\n  by\n  refine (mk_iUnion_le _).trans ?_\n  have D : ⨆ j : Iio i, #(generateMeasurableRec s j) ≤ _ := ciSup_le' fun ⟨j, hj⟩ => IH j hj\n  apply (mul_le_mul' ((mk_subtype_le _).trans (aleph 1).mk_ord_out.le) D).trans\n  rw [mul_eq_max A C]\n  exact max_le B le_rfl\n[GOAL]\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nrefine (mk_iUnion_le _).trans ?_\n[GOAL]\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #↑(Iio i) * ⨆ (i_1 : ↑(Iio i)), #↑(generateMeasurableRec s ↑i_1) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nhave D : ⨆ j : Iio i, #(generateMeasurableRec s j) ≤ _ := ciSup_le' fun ⟨j, hj⟩ => IH j hj\n[GOAL]\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\nD : ⨆ (j : ↑(Iio i)), #↑(generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #↑(Iio i) * ⨆ (i_1 : ↑(Iio i)), #↑(generateMeasurableRec s ↑i_1) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\napply (mul_le_mul' ((mk_subtype_le _).trans (aleph 1).mk_ord_out.le) D).trans\n[GOAL]\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\nD : ⨆ (j : ↑(Iio i)), #↑(generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\n⊢ aleph 1 * max (#↑s) 2 ^ ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nrw [mul_eq_max A C]\n[GOAL]\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\nD : ⨆ (j : ↑(Iio i)), #↑(generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\n⊢ max (aleph 1) (max (#↑s) 2 ^ ℵ₀) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nexact max_le B le_rfl\n[GOAL]\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\nJ : #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #↑(generateMeasurableRec s i) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nrw [generateMeasurableRec]\n[GOAL]\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\nJ : #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #↑((s ∪ {∅} ∪ compl '' ⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ∪ range fun f => ⋃ (n : ℕ), ↑(f n)) ≤\n    max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\napply_rules [(mk_union_le _ _).trans, add_le_of_le C, mk_image_le.trans]\n[GOAL]\ncase h1.h1.h1\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\nJ : #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #↑s ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nexact (le_max_left _ _).trans (self_le_power _ one_lt_aleph0.le)\n[GOAL]\ncase h1.h1.h2\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\nJ : #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #↑{∅} ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nrw [mk_singleton]\n[GOAL]\ncase h1.h1.h2\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\nJ : #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\n⊢ 1 ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nexact one_lt_aleph0.le.trans C\n[GOAL]\ncase h2\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\nJ : #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #↑(range fun f => ⋃ (n : ℕ), ↑(f n)) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\napply mk_range_le.trans\n[GOAL]\ncase h2\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\nJ : #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #(ℕ → ↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j)) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nsimp only [mk_pi, prod_const, lift_uzero, mk_denumerable, lift_aleph0]\n[GOAL]\ncase h2\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\nJ : #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\n⊢ #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ^ ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nhave := @power_le_power_right _ _ ℵ₀ J\n[GOAL]\ncase h2\nα : Type u\ns : Set (Set α)\ni✝ i : (Quotient.out (ord (aleph 1))).α\nIH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y i → #↑(generateMeasurableRec s y) ≤ max (#↑s) 2 ^ ℵ₀\nA : ℵ₀ ≤ aleph 1\nB : aleph 1 ≤ max (#↑s) 2 ^ ℵ₀\nC : ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\nJ : #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ≤ max (#↑s) 2 ^ ℵ₀\nthis : #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ^ ℵ₀ ≤ (max (#↑s) 2 ^ ℵ₀) ^ ℵ₀\n⊢ #↑(⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j) ^ ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nrwa [← power_mul, aleph0_mul_aleph0] at this \n[GOAL]\nα : Type u\ns : Set (Set α)\n⊢ {t | GenerateMeasurable s t} = ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\next t\n[GOAL]\ncase h\nα : Type u\ns : Set (Set α)\nt : Set α\n⊢ t ∈ {t | GenerateMeasurable s t} ↔ t ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\nrefine' ⟨fun ht => _, fun ht => _⟩\n[GOAL]\ncase h.refine'_1\nα : Type u\ns : Set (Set α)\nt : Set α\nht : t ∈ {t | GenerateMeasurable s t}\n⊢ t ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\ninhabit ω₁\n[GOAL]\ncase h.refine'_1\nα : Type u\ns : Set (Set α)\nt : Set α\nht : t ∈ {t | GenerateMeasurable s t}\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\n⊢ t ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\ninduction' ht with u hu u _ IH f _ IH\n[GOAL]\ncase h.refine'_1.basic\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nu : Set α\nhu : u ∈ s\n⊢ u ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\nexact mem_iUnion.2 ⟨default, self_subset_generateMeasurableRec s _ hu⟩\n[GOAL]\ncase h.refine'_1.empty\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\n⊢ ∅ ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\nexact mem_iUnion.2 ⟨default, empty_mem_generateMeasurableRec s _⟩\n[GOAL]\ncase h.refine'_1.compl\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nu : Set α\na✝ : GenerateMeasurable s u\nIH : u ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n⊢ uᶜ ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\nrcases mem_iUnion.1 IH with ⟨i, hi⟩\n[GOAL]\ncase h.refine'_1.compl.intro\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nu : Set α\na✝ : GenerateMeasurable s u\nIH : u ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\ni : (Quotient.out (ord (aleph 1))).α\nhi : u ∈ generateMeasurableRec s i\n⊢ uᶜ ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\nobtain ⟨j, hj⟩ := exists_gt i\n[GOAL]\ncase h.refine'_1.compl.intro.intro\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nu : Set α\na✝ : GenerateMeasurable s u\nIH : u ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\ni : (Quotient.out (ord (aleph 1))).α\nhi : u ∈ generateMeasurableRec s i\nj : (Quotient.out (ord (aleph 1))).α\nhj : i < j\n⊢ uᶜ ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\nexact mem_iUnion.2 ⟨j, compl_mem_generateMeasurableRec hj hi⟩\n[GOAL]\ncase h.refine'_1.iUnion\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\na✝ : ∀ (n : ℕ), GenerateMeasurable s (f n)\nIH : ∀ (n : ℕ), f n ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n⊢ ⋃ (i : ℕ), f i ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\nhave : ∀ n, ∃ i, f n ∈ generateMeasurableRec s i := fun n => by simpa using IH n\n[GOAL]\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\na✝ : ∀ (n : ℕ), GenerateMeasurable s (f n)\nIH : ∀ (n : ℕ), f n ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\nn : ℕ\n⊢ ∃ i, f n ∈ generateMeasurableRec s i\n[PROOFSTEP]\nsimpa using IH n\n[GOAL]\ncase h.refine'_1.iUnion\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\na✝ : ∀ (n : ℕ), GenerateMeasurable s (f n)\nIH : ∀ (n : ℕ), f n ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\nthis : ∀ (n : ℕ), ∃ i, f n ∈ generateMeasurableRec s i\n⊢ ⋃ (i : ℕ), f i ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\nchoose I hI using this\n[GOAL]\ncase h.refine'_1.iUnion\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\na✝ : ∀ (n : ℕ), GenerateMeasurable s (f n)\nIH : ∀ (n : ℕ), f n ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\nI : ℕ → (Quotient.out (ord (aleph 1))).α\nhI : ∀ (n : ℕ), f n ∈ generateMeasurableRec s (I n)\n⊢ ⋃ (i : ℕ), f i ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\nhave : IsWellOrder (ω₁ : Type u) (· < ·) := isWellOrder_out_lt _\n[GOAL]\ncase h.refine'_1.iUnion\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\na✝ : ∀ (n : ℕ), GenerateMeasurable s (f n)\nIH : ∀ (n : ℕ), f n ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\nI : ℕ → (Quotient.out (ord (aleph 1))).α\nhI : ∀ (n : ℕ), f n ∈ generateMeasurableRec s (I n)\nthis : IsWellOrder (Quotient.out (ord (aleph 1))).α fun x x_1 => x < x_1\n⊢ ⋃ (i : ℕ), f i ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n[PROOFSTEP]\nrefine'\n  mem_iUnion.2\n    ⟨Ordinal.enum (· < ·) (Ordinal.lsub fun n => Ordinal.typein.{u} (· < ·) (I n)) _,\n      iUnion_mem_generateMeasurableRec fun n => ⟨I n, _, hI n⟩⟩\n[GOAL]\ncase h.refine'_1.iUnion.refine'_1\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\na✝ : ∀ (n : ℕ), GenerateMeasurable s (f n)\nIH : ∀ (n : ℕ), f n ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\nI : ℕ → (Quotient.out (ord (aleph 1))).α\nhI : ∀ (n : ℕ), f n ∈ generateMeasurableRec s (I n)\nthis : IsWellOrder (Quotient.out (ord (aleph 1))).α fun x x_1 => x < x_1\n⊢ (Ordinal.lsub fun n => Ordinal.typein (fun x x_1 => x < x_1) (I n)) < Ordinal.type fun x x_1 => x < x_1\n[PROOFSTEP]\nrw [Ordinal.type_lt]\n[GOAL]\ncase h.refine'_1.iUnion.refine'_1\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\na✝ : ∀ (n : ℕ), GenerateMeasurable s (f n)\nIH : ∀ (n : ℕ), f n ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\nI : ℕ → (Quotient.out (ord (aleph 1))).α\nhI : ∀ (n : ℕ), f n ∈ generateMeasurableRec s (I n)\nthis : IsWellOrder (Quotient.out (ord (aleph 1))).α fun x x_1 => x < x_1\n⊢ (Ordinal.lsub fun n => Ordinal.typein (fun x x_1 => x < x_1) (I n)) < ord (aleph 1)\n[PROOFSTEP]\nrefine' Ordinal.lsub_lt_ord_lift _ fun i => Ordinal.typein_lt_self _\n[GOAL]\ncase h.refine'_1.iUnion.refine'_1\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\na✝ : ∀ (n : ℕ), GenerateMeasurable s (f n)\nIH : ∀ (n : ℕ), f n ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\nI : ℕ → (Quotient.out (ord (aleph 1))).α\nhI : ∀ (n : ℕ), f n ∈ generateMeasurableRec s (I n)\nthis : IsWellOrder (Quotient.out (ord (aleph 1))).α fun x x_1 => x < x_1\n⊢ lift #ℕ < Ordinal.cof (ord (aleph 1))\n[PROOFSTEP]\nrw [mk_denumerable, lift_aleph0, isRegular_aleph_one.cof_eq]\n[GOAL]\ncase h.refine'_1.iUnion.refine'_1\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\na✝ : ∀ (n : ℕ), GenerateMeasurable s (f n)\nIH : ∀ (n : ℕ), f n ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\nI : ℕ → (Quotient.out (ord (aleph 1))).α\nhI : ∀ (n : ℕ), f n ∈ generateMeasurableRec s (I n)\nthis : IsWellOrder (Quotient.out (ord (aleph 1))).α fun x x_1 => x < x_1\n⊢ ℵ₀ < aleph 1\n[PROOFSTEP]\nexact aleph0_lt_aleph_one\n[GOAL]\ncase h.refine'_1.iUnion.refine'_2\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\na✝ : ∀ (n : ℕ), GenerateMeasurable s (f n)\nIH : ∀ (n : ℕ), f n ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\nI : ℕ → (Quotient.out (ord (aleph 1))).α\nhI : ∀ (n : ℕ), f n ∈ generateMeasurableRec s (I n)\nthis : IsWellOrder (Quotient.out (ord (aleph 1))).α fun x x_1 => x < x_1\nn : ℕ\n⊢ I n <\n    Ordinal.enum (fun x x_1 => x < x_1) (Ordinal.lsub fun n => Ordinal.typein (fun x x_1 => x < x_1) (I n))\n      (_ : (Ordinal.lsub fun n => Ordinal.typein (fun x x_1 => x < x_1) (I n)) < Ordinal.type fun x x_1 => x < x_1)\n[PROOFSTEP]\nrw [← Ordinal.typein_lt_typein (· < ·), Ordinal.typein_enum]\n[GOAL]\ncase h.refine'_1.iUnion.refine'_2\nα : Type u\ns : Set (Set α)\nt : Set α\ninhabited_h : Inhabited (Quotient.out (ord (aleph 1))).α\nf : ℕ → Set α\na✝ : ∀ (n : ℕ), GenerateMeasurable s (f n)\nIH : ∀ (n : ℕ), f n ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\nI : ℕ → (Quotient.out (ord (aleph 1))).α\nhI : ∀ (n : ℕ), f n ∈ generateMeasurableRec s (I n)\nthis : IsWellOrder (Quotient.out (ord (aleph 1))).α fun x x_1 => x < x_1\nn : ℕ\n⊢ Ordinal.typein (fun x x_1 => x < x_1) (I n) < Ordinal.lsub fun n => Ordinal.typein (fun x x_1 => x < x_1) (I n)\n[PROOFSTEP]\napply Ordinal.lt_lsub fun n : ℕ => _\n[GOAL]\ncase h.refine'_2\nα : Type u\ns : Set (Set α)\nt : Set α\nht : t ∈ ⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i\n⊢ t ∈ {t | GenerateMeasurable s t}\n[PROOFSTEP]\nrcases ht with ⟨t, ⟨i, rfl⟩, hx⟩\n[GOAL]\ncase h.refine'_2.intro.intro.intro\nα : Type u\ns : Set (Set α)\nt : Set α\ni : (Quotient.out (ord (aleph 1))).α\nhx : t ∈ (fun i => generateMeasurableRec s i) i\n⊢ t ∈ {t | GenerateMeasurable s t}\n[PROOFSTEP]\nrevert t\n[GOAL]\ncase h.refine'_2.intro.intro.intro\nα : Type u\ns : Set (Set α)\ni : (Quotient.out (ord (aleph 1))).α\n⊢ ∀ (t : Set α), t ∈ (fun i => generateMeasurableRec s i) i → t ∈ {t | GenerateMeasurable s t}\n[PROOFSTEP]\napply (aleph 1).ord.out.wo.wf.induction i\n[GOAL]\ncase h.refine'_2.intro.intro.intro\nα : Type u\ns : Set (Set α)\ni : (Quotient.out (ord (aleph 1))).α\n⊢ ∀ (x : (Quotient.out (ord (aleph 1))).α),\n    (∀ (y : (Quotient.out (ord (aleph 1))).α),\n        WellOrder.r (Quotient.out (ord (aleph 1))) y x →\n          ∀ (t : Set α), t ∈ (fun i => generateMeasurableRec s i) y → t ∈ {t | GenerateMeasurable s t}) →\n      ∀ (t : Set α), t ∈ (fun i => generateMeasurableRec s i) x → t ∈ {t | GenerateMeasurable s t}\n[PROOFSTEP]\nintro j H t ht\n[GOAL]\ncase h.refine'_2.intro.intro.intro\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y j →\n      ∀ (t : Set α), t ∈ (fun i => generateMeasurableRec s i) y → t ∈ {t | GenerateMeasurable s t}\nt : Set α\nht : t ∈ (fun i => generateMeasurableRec s i) j\n⊢ t ∈ {t | GenerateMeasurable s t}\n[PROOFSTEP]\nunfold generateMeasurableRec at ht \n[GOAL]\ncase h.refine'_2.intro.intro.intro\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y j →\n      ∀ (t : Set α), t ∈ (fun i => generateMeasurableRec s i) y → t ∈ {t | GenerateMeasurable s t}\nt : Set α\nht :\n  t ∈\n    let i := j;\n    let S := ⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j;\n    s ∪ {∅} ∪ compl '' S ∪ range fun f => ⋃ (n : ℕ), ↑(f n)\n⊢ t ∈ {t | GenerateMeasurable s t}\n[PROOFSTEP]\nrcases ht with (((h | (rfl : t = ∅)) | ⟨u, ⟨-, ⟨⟨k, hk⟩, rfl⟩, hu⟩, rfl⟩) | ⟨f, rfl⟩)\n[GOAL]\ncase h.refine'_2.intro.intro.intro.inl.inl.inl\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y j →\n      ∀ (t : Set α), t ∈ (fun i => generateMeasurableRec s i) y → t ∈ {t | GenerateMeasurable s t}\nt : Set α\nh : t ∈ s\n⊢ t ∈ {t | GenerateMeasurable s t}\n[PROOFSTEP]\nexact .basic t h\n[GOAL]\ncase h.refine'_2.intro.intro.intro.inl.inl.inr\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y j →\n      ∀ (t : Set α), t ∈ (fun i => generateMeasurableRec s i) y → t ∈ {t | GenerateMeasurable s t}\n⊢ ∅ ∈ {t | GenerateMeasurable s t}\n[PROOFSTEP]\nexact .empty\n[GOAL]\ncase h.refine'_2.intro.intro.intro.inl.inr.intro.intro.intro.intro.intro.mk\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y j →\n      ∀ (t : Set α), t ∈ (fun i => generateMeasurableRec s i) y → t ∈ {t | GenerateMeasurable s t}\nu : Set α\nk : (Quotient.out (ord (aleph 1))).α\nhk : k ∈ Iio j\nhu : u ∈ (fun j_1 => generateMeasurableRec s ↑j_1) { val := k, property := hk }\n⊢ uᶜ ∈ {t | GenerateMeasurable s t}\n[PROOFSTEP]\nexact .compl u (H k hk u hu)\n[GOAL]\ncase h.refine'_2.intro.intro.intro.inr.intro\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y j →\n      ∀ (t : Set α), t ∈ (fun i => generateMeasurableRec s i) y → t ∈ {t | GenerateMeasurable s t}\nf : ℕ → ↑(⋃ (j_1 : ↑(Iio j)), generateMeasurableRec s ↑j_1)\n⊢ (fun f => ⋃ (n : ℕ), ↑(f n)) f ∈ {t | GenerateMeasurable s t}\n[PROOFSTEP]\nrefine .iUnion _ @fun n => ?_\n[GOAL]\ncase h.refine'_2.intro.intro.intro.inr.intro\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y j →\n      ∀ (t : Set α), t ∈ (fun i => generateMeasurableRec s i) y → t ∈ {t | GenerateMeasurable s t}\nf : ℕ → ↑(⋃ (j_1 : ↑(Iio j)), generateMeasurableRec s ↑j_1)\nn : ℕ\n⊢ GenerateMeasurable s ↑(f n)\n[PROOFSTEP]\nobtain ⟨-, ⟨⟨k, hk⟩, rfl⟩, hf⟩ := (f n).prop\n[GOAL]\ncase h.refine'_2.intro.intro.intro.inr.intro.intro.intro.intro.mk\nα : Type u\ns : Set (Set α)\ni j : (Quotient.out (ord (aleph 1))).α\nH :\n  ∀ (y : (Quotient.out (ord (aleph 1))).α),\n    WellOrder.r (Quotient.out (ord (aleph 1))) y j →\n      ∀ (t : Set α), t ∈ (fun i => generateMeasurableRec s i) y → t ∈ {t | GenerateMeasurable s t}\nf : ℕ → ↑(⋃ (j_1 : ↑(Iio j)), generateMeasurableRec s ↑j_1)\nn : ℕ\nk : (Quotient.out (ord (aleph 1))).α\nhk : k ∈ Iio j\nhf : ↑(f n) ∈ (fun j_1 => generateMeasurableRec s ↑j_1) { val := k, property := hk }\n⊢ GenerateMeasurable s ↑(f n)\n[PROOFSTEP]\nexact H k hk _ hf\n[GOAL]\nα : Type u\ns : Set (Set α)\n⊢ #↑{t | GenerateMeasurable s t} ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nrw [generateMeasurable_eq_rec]\n[GOAL]\nα : Type u\ns : Set (Set α)\n⊢ #↑(⋃ (i : (Quotient.out (ord (aleph 1))).α), generateMeasurableRec s i) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\napply (mk_iUnion_le _).trans\n[GOAL]\nα : Type u\ns : Set (Set α)\n⊢ #(Quotient.out (ord (aleph 1))).α * ⨆ (i : (Quotient.out (ord (aleph 1))).α), #↑(generateMeasurableRec s i) ≤\n    max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nrw [(aleph 1).mk_ord_out]\n[GOAL]\nα : Type u\ns : Set (Set α)\n⊢ aleph 1 * ⨆ (i : (Quotient.out (ord (aleph 1))).α), #↑(generateMeasurableRec s i) ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nrefine le_trans (mul_le_mul' aleph_one_le_continuum (ciSup_le' fun i => cardinal_generateMeasurableRec_le s i)) ?_\n[GOAL]\nα : Type u\ns : Set (Set α)\n⊢ 𝔠 * max (#↑s) 2 ^ ℵ₀ ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nrefine (mul_le_max_of_aleph0_le_left aleph0_le_continuum).trans (max_le ?_ le_rfl)\n[GOAL]\nα : Type u\ns : Set (Set α)\n⊢ 𝔠 ≤ max (#↑s) 2 ^ ℵ₀\n[PROOFSTEP]\nexact power_le_power_right (le_max_right _ _)\n[GOAL]\nα : Type u\ns : Set (Set α)\nhs : #↑s ≤ 𝔠\n⊢ max (#↑s) 2 ^ ℵ₀ ≤ 𝔠\n[PROOFSTEP]\nrw [← continuum_power_aleph0]\n[GOAL]\nα : Type u\ns : Set (Set α)\nhs : #↑s ≤ 𝔠\n⊢ max (#↑s) 2 ^ ℵ₀ ≤ 𝔠 ^ ℵ₀\n[PROOFSTEP]\nexact_mod_cast power_le_power_right (max_le hs (nat_lt_continuum 2).le)\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.CardMeasurableSpace", "llama_tokens": 14626, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6825737214979746, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.37054421145966565}}
{"text": "[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj : J\nk k' : K\nf : k ⟶ k'\n⊢ ((Functor.const K).obj c.pt).map f ≫ (fun k => NatTrans.app c.π (j, k)) k' =\n    (fun k => NatTrans.app c.π (j, k)) k ≫ (F.obj j).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj : J\nk k' : K\nf : k ⟶ k'\n⊢ 𝟙 c.pt ≫ NatTrans.app c.π (j, k') = NatTrans.app c.π (j, k) ≫ (F.obj j).map f\n[PROOFSTEP]\nsimp only [Category.id_comp]\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj : J\nk k' : K\nf : k ⟶ k'\n⊢ NatTrans.app c.π (j, k') = NatTrans.app c.π (j, k) ≫ (F.obj j).map f\n[PROOFSTEP]\nhave := @NatTrans.naturality _ _ _ _ _ _ c.π (j, k) (j, k') (𝟙 j, f)\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj : J\nk k' : K\nf : k ⟶ k'\nthis :\n  ((Functor.const (J × K)).obj c.pt).map (𝟙 j, f) ≫ NatTrans.app c.π (j, k') =\n    NatTrans.app c.π (j, k) ≫ (uncurry.obj F).map (𝟙 j, f)\n⊢ NatTrans.app c.π (j, k') = NatTrans.app c.π (j, k) ≫ (F.obj j).map f\n[PROOFSTEP]\ndsimp at this \n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj : J\nk k' : K\nf : k ⟶ k'\nthis : 𝟙 c.pt ≫ NatTrans.app c.π (j, k') = NatTrans.app c.π (j, k) ≫ NatTrans.app (F.map (𝟙 j)) k ≫ (F.obj j).map f\n⊢ NatTrans.app c.π (j, k') = NatTrans.app c.π (j, k) ≫ (F.obj j).map f\n[PROOFSTEP]\nsimp?  at this  says simp only [Category.id_comp, Functor.map_id, NatTrans.id_app] at this \n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj : J\nk k' : K\nf : k ⟶ k'\nthis : 𝟙 c.pt ≫ NatTrans.app c.π (j, k') = NatTrans.app c.π (j, k) ≫ NatTrans.app (F.map (𝟙 j)) k ≫ (F.obj j).map f\n⊢ NatTrans.app c.π (j, k') = NatTrans.app c.π (j, k) ≫ (F.obj j).map f\n[PROOFSTEP]\nsimp only [Category.id_comp, Functor.map_id, NatTrans.id_app] at this \n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj : J\nk k' : K\nf : k ⟶ k'\nthis : NatTrans.app c.π (j, k') = NatTrans.app c.π (j, k) ≫ (F.obj j).map f\n⊢ NatTrans.app c.π (j, k') = NatTrans.app c.π (j, k) ≫ (F.obj j).map f\n[PROOFSTEP]\nexact this\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj j' : J\nf : j ⟶ j'\n⊢ ∀ (j_1 : K),\n    (((Functor.const J).obj c.pt).map f ≫\n          (fun j => IsLimit.lift (Q j) { pt := c.pt, π := NatTrans.mk fun k => NatTrans.app c.π (j, k) }) j') ≫\n        NatTrans.app (DiagramOfCones.obj D j').π j_1 =\n      ((fun j => IsLimit.lift (Q j) { pt := c.pt, π := NatTrans.mk fun k => NatTrans.app c.π (j, k) }) j ≫\n          (DiagramOfCones.conePoints D).map f) ≫\n        NatTrans.app (DiagramOfCones.obj D j').π j_1\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj j' : J\nf : j ⟶ j'\n⊢ ∀ (j_1 : K),\n    (𝟙 c.pt ≫ IsLimit.lift (Q j') { pt := c.pt, π := NatTrans.mk fun k => NatTrans.app c.π (j', k) }) ≫\n        NatTrans.app (DiagramOfCones.obj D j').π j_1 =\n      (IsLimit.lift (Q j) { pt := c.pt, π := NatTrans.mk fun k => NatTrans.app c.π (j, k) } ≫\n          (DiagramOfCones.map D f).Hom) ≫\n        NatTrans.app (DiagramOfCones.obj D j').π j_1\n[PROOFSTEP]\nintro k\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj j' : J\nf : j ⟶ j'\nk : K\n⊢ (𝟙 c.pt ≫ IsLimit.lift (Q j') { pt := c.pt, π := NatTrans.mk fun k => NatTrans.app c.π (j', k) }) ≫\n      NatTrans.app (DiagramOfCones.obj D j').π k =\n    (IsLimit.lift (Q j) { pt := c.pt, π := NatTrans.mk fun k => NatTrans.app c.π (j, k) } ≫\n        (DiagramOfCones.map D f).Hom) ≫\n      NatTrans.app (DiagramOfCones.obj D j').π k\n[PROOFSTEP]\nsimp only [Limits.ConeMorphism.w, Limits.Cones.postcompose_obj_π, Limits.IsLimit.fac_assoc, Limits.IsLimit.fac,\n  NatTrans.comp_app, Category.id_comp, Category.assoc]\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj j' : J\nf : j ⟶ j'\nk : K\n⊢ NatTrans.app c.π (j', k) = NatTrans.app c.π (j, k) ≫ NatTrans.app (F.map f) k\n[PROOFSTEP]\nhave := @NatTrans.naturality _ _ _ _ _ _ c.π (j, k) (j', k) (f, 𝟙 k)\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj j' : J\nf : j ⟶ j'\nk : K\nthis :\n  ((Functor.const (J × K)).obj c.pt).map (f, 𝟙 k) ≫ NatTrans.app c.π (j', k) =\n    NatTrans.app c.π (j, k) ≫ (uncurry.obj F).map (f, 𝟙 k)\n⊢ NatTrans.app c.π (j', k) = NatTrans.app c.π (j, k) ≫ NatTrans.app (F.map f) k\n[PROOFSTEP]\ndsimp at this \n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj j' : J\nf : j ⟶ j'\nk : K\nthis : 𝟙 c.pt ≫ NatTrans.app c.π (j', k) = NatTrans.app c.π (j, k) ≫ NatTrans.app (F.map f) k ≫ (F.obj j').map (𝟙 k)\n⊢ NatTrans.app c.π (j', k) = NatTrans.app c.π (j, k) ≫ NatTrans.app (F.map f) k\n[PROOFSTEP]\nsimp only [Category.id_comp, Category.comp_id, CategoryTheory.Functor.map_id, NatTrans.id_app] at this \n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nj j' : J\nf : j ⟶ j'\nk : K\nthis : NatTrans.app c.π (j', k) = NatTrans.app c.π (j, k) ≫ NatTrans.app (F.map f) k\n⊢ NatTrans.app c.π (j', k) = NatTrans.app c.π (j, k) ≫ NatTrans.app (F.map f) k\n[PROOFSTEP]\nexact this\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\np p' : J × K\nf : p ⟶ p'\n⊢ ((Functor.const (J × K)).obj s.pt).map f ≫\n      (fun p => NatTrans.app s.π p.fst ≫ NatTrans.app (DiagramOfCones.obj D p.fst).π p.snd) p' =\n    (fun p => NatTrans.app s.π p.fst ≫ NatTrans.app (DiagramOfCones.obj D p.fst).π p.snd) p ≫ (uncurry.obj F).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\np p' : J × K\nf : p ⟶ p'\n⊢ 𝟙 s.pt ≫ NatTrans.app s.π p'.fst ≫ NatTrans.app (DiagramOfCones.obj D p'.fst).π p'.snd =\n    (NatTrans.app s.π p.fst ≫ NatTrans.app (DiagramOfCones.obj D p.fst).π p.snd) ≫\n      NatTrans.app (F.map f.fst) p.snd ≫ (F.obj p'.fst).map f.snd\n[PROOFSTEP]\nsimp only [Category.id_comp, Category.assoc]\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\np p' : J × K\nf : p ⟶ p'\n⊢ NatTrans.app s.π p'.fst ≫ NatTrans.app (DiagramOfCones.obj D p'.fst).π p'.snd =\n    NatTrans.app s.π p.fst ≫\n      NatTrans.app (DiagramOfCones.obj D p.fst).π p.snd ≫ NatTrans.app (F.map f.fst) p.snd ≫ (F.obj p'.fst).map f.snd\n[PROOFSTEP]\nrcases p with ⟨j, k⟩\n[GOAL]\ncase mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\np' : J × K\nj : J\nk : K\nf : (j, k) ⟶ p'\n⊢ NatTrans.app s.π p'.fst ≫ NatTrans.app (DiagramOfCones.obj D p'.fst).π p'.snd =\n    NatTrans.app s.π (j, k).fst ≫\n      NatTrans.app (DiagramOfCones.obj D (j, k).fst).π (j, k).snd ≫\n        NatTrans.app (F.map f.fst) (j, k).snd ≫ (F.obj p'.fst).map f.snd\n[PROOFSTEP]\nrcases p' with ⟨j', k'⟩\n[GOAL]\ncase mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nf : (j, k) ⟶ (j', k')\n⊢ NatTrans.app s.π (j', k').fst ≫ NatTrans.app (DiagramOfCones.obj D (j', k').fst).π (j', k').snd =\n    NatTrans.app s.π (j, k).fst ≫\n      NatTrans.app (DiagramOfCones.obj D (j, k).fst).π (j, k).snd ≫\n        NatTrans.app (F.map f.fst) (j, k).snd ≫ (F.obj (j', k').fst).map f.snd\n[PROOFSTEP]\nrcases f with ⟨fj, fk⟩\n[GOAL]\ncase mk.mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n⊢ NatTrans.app s.π (j', k').fst ≫ NatTrans.app (DiagramOfCones.obj D (j', k').fst).π (j', k').snd =\n    NatTrans.app s.π (j, k).fst ≫\n      NatTrans.app (DiagramOfCones.obj D (j, k).fst).π (j, k).snd ≫\n        NatTrans.app (F.map (fj, fk).fst) (j, k).snd ≫ (F.obj (j', k').fst).map (fj, fk).snd\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n⊢ NatTrans.app s.π j' ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app s.π j ≫ NatTrans.app (DiagramOfCones.obj D j).π k ≫ NatTrans.app (F.map fj) k ≫ (F.obj j').map fk\n[PROOFSTEP]\nslice_rhs 3 4 => rw [← NatTrans.naturality]\n[GOAL]\ncase a.a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app (F.map fj) k ≫ (F.obj j').map fk\ncase a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app s.π j\ncase a.a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app (DiagramOfCones.obj D j).π k\n[PROOFSTEP]\nrw [← NatTrans.naturality]\n[GOAL]\ncase a.a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app (F.map fj) k ≫ (F.obj j').map fk\ncase a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app s.π j\ncase a.a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app (DiagramOfCones.obj D j).π k\n[PROOFSTEP]\nrw [← NatTrans.naturality]\n[GOAL]\ncase a.a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app (F.map fj) k ≫ (F.obj j').map fk\ncase a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app s.π j\ncase a.a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app (DiagramOfCones.obj D j).π k\n[PROOFSTEP]\nrw [← NatTrans.naturality]\n[GOAL]\ncase mk.mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n⊢ NatTrans.app s.π j' ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app s.π j ≫ NatTrans.app (DiagramOfCones.obj D j).π k ≫ (F.obj j).map fk ≫ NatTrans.app (F.map fj) k'\n[PROOFSTEP]\nslice_rhs 2 3 => rw [← (D.obj j).π.naturality]\n[GOAL]\ncase a.a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app (DiagramOfCones.obj D j).π k ≫ (F.obj j).map fk\ncase a.a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app (F.map fj) k'\ncase a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app s.π j\n[PROOFSTEP]\nrw [← (D.obj j).π.naturality]\n[GOAL]\ncase a.a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app (DiagramOfCones.obj D j).π k ≫ (F.obj j).map fk\ncase a.a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app (F.map fj) k'\ncase a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app s.π j\n[PROOFSTEP]\nrw [← (D.obj j).π.naturality]\n[GOAL]\ncase a.a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app (DiagramOfCones.obj D j).π k ≫ (F.obj j).map fk\ncase a.a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app (F.map fj) k'\ncase a\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n| NatTrans.app s.π j\n[PROOFSTEP]\nrw [← (D.obj j).π.naturality]\n[GOAL]\ncase mk.mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n⊢ NatTrans.app s.π j' ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app s.π j ≫\n      (((Functor.const K).obj (DiagramOfCones.obj D j).pt).map fk ≫ NatTrans.app (DiagramOfCones.obj D j).π k') ≫\n        NatTrans.app (F.map fj) k'\n[PROOFSTEP]\nsimp only [Functor.const_obj_map, Category.id_comp, Category.assoc]\n[GOAL]\ncase mk.mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\n⊢ NatTrans.app s.π j' ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app s.π j ≫ NatTrans.app (DiagramOfCones.obj D j).π k' ≫ NatTrans.app (F.map fj) k'\n[PROOFSTEP]\nhave w := (D.map fj).w k'\n[GOAL]\ncase mk.mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\nw :\n  (DiagramOfCones.map D fj).Hom ≫ NatTrans.app (DiagramOfCones.obj D (j', k').fst).π k' =\n    NatTrans.app ((Cones.postcompose (F.map fj)).obj (DiagramOfCones.obj D (j, k).fst)).π k'\n⊢ NatTrans.app s.π j' ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app s.π j ≫ NatTrans.app (DiagramOfCones.obj D j).π k' ≫ NatTrans.app (F.map fj) k'\n[PROOFSTEP]\ndsimp at w \n[GOAL]\ncase mk.mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\nw :\n  (DiagramOfCones.map D fj).Hom ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app (DiagramOfCones.obj D j).π k' ≫ NatTrans.app (F.map fj) k'\n⊢ NatTrans.app s.π j' ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app s.π j ≫ NatTrans.app (DiagramOfCones.obj D j).π k' ≫ NatTrans.app (F.map fj) k'\n[PROOFSTEP]\nrw [← w]\n[GOAL]\ncase mk.mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\nw :\n  (DiagramOfCones.map D fj).Hom ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app (DiagramOfCones.obj D j).π k' ≫ NatTrans.app (F.map fj) k'\n⊢ NatTrans.app s.π j' ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app s.π j ≫ (DiagramOfCones.map D fj).Hom ≫ NatTrans.app (DiagramOfCones.obj D j').π k'\n[PROOFSTEP]\nhave n := s.π.naturality fj\n[GOAL]\ncase mk.mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\nw :\n  (DiagramOfCones.map D fj).Hom ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app (DiagramOfCones.obj D j).π k' ≫ NatTrans.app (F.map fj) k'\nn :\n  ((Functor.const J).obj s.pt).map fj ≫ NatTrans.app s.π (j', k').fst =\n    NatTrans.app s.π (j, k).fst ≫ (DiagramOfCones.conePoints D).map fj\n⊢ NatTrans.app s.π j' ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app s.π j ≫ (DiagramOfCones.map D fj).Hom ≫ NatTrans.app (DiagramOfCones.obj D j').π k'\n[PROOFSTEP]\ndsimp at n \n[GOAL]\ncase mk.mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\nw :\n  (DiagramOfCones.map D fj).Hom ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app (DiagramOfCones.obj D j).π k' ≫ NatTrans.app (F.map fj) k'\nn : 𝟙 s.pt ≫ NatTrans.app s.π j' = NatTrans.app s.π j ≫ (DiagramOfCones.map D fj).Hom\n⊢ NatTrans.app s.π j' ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app s.π j ≫ (DiagramOfCones.map D fj).Hom ≫ NatTrans.app (DiagramOfCones.obj D j').π k'\n[PROOFSTEP]\nsimp only [Category.id_comp] at n \n[GOAL]\ncase mk.mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\nw :\n  (DiagramOfCones.map D fj).Hom ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app (DiagramOfCones.obj D j).π k' ≫ NatTrans.app (F.map fj) k'\nn : NatTrans.app s.π j' = NatTrans.app s.π j ≫ (DiagramOfCones.map D fj).Hom\n⊢ NatTrans.app s.π j' ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app s.π j ≫ (DiagramOfCones.map D fj).Hom ≫ NatTrans.app (DiagramOfCones.obj D j').π k'\n[PROOFSTEP]\nrw [n]\n[GOAL]\ncase mk.mk.mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\nj' : J\nk' : K\nfj : (j, k).fst ⟶ (j', k').fst\nfk : (j, k).snd ⟶ (j', k').snd\nw :\n  (DiagramOfCones.map D fj).Hom ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app (DiagramOfCones.obj D j).π k' ≫ NatTrans.app (F.map fj) k'\nn : NatTrans.app s.π j' = NatTrans.app s.π j ≫ (DiagramOfCones.map D fj).Hom\n⊢ (NatTrans.app s.π j ≫ (DiagramOfCones.map D fj).Hom) ≫ NatTrans.app (DiagramOfCones.obj D j').π k' =\n    NatTrans.app s.π j ≫ (DiagramOfCones.map D fj).Hom ≫ NatTrans.app (DiagramOfCones.obj D j').π k'\n[PROOFSTEP]\nsimp\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\n⊢ (fun s =>\n          IsLimit.lift P\n            { pt := s.pt,\n              π := NatTrans.mk fun p => NatTrans.app s.π p.fst ≫ NatTrans.app (DiagramOfCones.obj D p.fst).π p.snd })\n        s ≫\n      NatTrans.app (coneOfConeUncurry Q c).π j =\n    NatTrans.app s.π j\n[PROOFSTEP]\napply (Q j).hom_ext\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\n⊢ ∀ (j_1 : K),\n    ((fun s =>\n              IsLimit.lift P\n                { pt := s.pt,\n                  π :=\n                    NatTrans.mk fun p => NatTrans.app s.π p.fst ≫ NatTrans.app (DiagramOfCones.obj D p.fst).π p.snd })\n            s ≫\n          NatTrans.app (coneOfConeUncurry Q c).π j) ≫\n        NatTrans.app (DiagramOfCones.obj D j).π j_1 =\n      NatTrans.app s.π j ≫ NatTrans.app (DiagramOfCones.obj D j).π j_1\n[PROOFSTEP]\nintro k\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nj : J\nk : K\n⊢ ((fun s =>\n            IsLimit.lift P\n              { pt := s.pt,\n                π := NatTrans.mk fun p => NatTrans.app s.π p.fst ≫ NatTrans.app (DiagramOfCones.obj D p.fst).π p.snd })\n          s ≫\n        NatTrans.app (coneOfConeUncurry Q c).π j) ≫\n      NatTrans.app (DiagramOfCones.obj D j).π k =\n    NatTrans.app s.π j ≫ NatTrans.app (DiagramOfCones.obj D j).π k\n[PROOFSTEP]\nsimp\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nm : s.pt ⟶ (coneOfConeUncurry Q c).pt\nw : ∀ (j : J), m ≫ NatTrans.app (coneOfConeUncurry Q c).π j = NatTrans.app s.π j\n⊢ m =\n    (fun s =>\n        IsLimit.lift P\n          { pt := s.pt,\n            π := NatTrans.mk fun p => NatTrans.app s.π p.fst ≫ NatTrans.app (DiagramOfCones.obj D p.fst).π p.snd })\n      s\n[PROOFSTEP]\nrefine'\n  P.uniq\n    { pt := s.pt\n      π := _ } m _\n[GOAL]\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nm : s.pt ⟶ (coneOfConeUncurry Q c).pt\nw : ∀ (j : J), m ≫ NatTrans.app (coneOfConeUncurry Q c).π j = NatTrans.app s.π j\n⊢ ∀ (j : J × K),\n    m ≫ NatTrans.app c.π j =\n      NatTrans.app\n        { pt := s.pt,\n            π := NatTrans.mk fun p => NatTrans.app s.π p.fst ≫ NatTrans.app (DiagramOfCones.obj D p.fst).π p.snd }.π\n        j\n[PROOFSTEP]\nrintro ⟨j, k⟩\n[GOAL]\ncase mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nm : s.pt ⟶ (coneOfConeUncurry Q c).pt\nw : ∀ (j : J), m ≫ NatTrans.app (coneOfConeUncurry Q c).π j = NatTrans.app s.π j\nj : J\nk : K\n⊢ m ≫ NatTrans.app c.π (j, k) =\n    NatTrans.app\n      { pt := s.pt,\n          π := NatTrans.mk fun p => NatTrans.app s.π p.fst ≫ NatTrans.app (DiagramOfCones.obj D p.fst).π p.snd }.π\n      (j, k)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nm : s.pt ⟶ (coneOfConeUncurry Q c).pt\nw : ∀ (j : J), m ≫ NatTrans.app (coneOfConeUncurry Q c).π j = NatTrans.app s.π j\nj : J\nk : K\n⊢ m ≫ NatTrans.app c.π (j, k) = NatTrans.app s.π j ≫ NatTrans.app (DiagramOfCones.obj D j).π k\n[PROOFSTEP]\nrw [← w j]\n[GOAL]\ncase mk\nJ K : Type v\ninst✝² : SmallCategory J\ninst✝¹ : SmallCategory K\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nD : DiagramOfCones F\nQ : (j : J) → IsLimit (DiagramOfCones.obj D j)\nc : Cone (uncurry.obj F)\nP : IsLimit c\ns : Cone (DiagramOfCones.conePoints D)\nm : s.pt ⟶ (coneOfConeUncurry Q c).pt\nw : ∀ (j : J), m ≫ NatTrans.app (coneOfConeUncurry Q c).π j = NatTrans.app s.π j\nj : J\nk : K\n⊢ m ≫ NatTrans.app c.π (j, k) =\n    (m ≫ NatTrans.app (coneOfConeUncurry Q c).π j) ≫ NatTrans.app (DiagramOfCones.obj D j).π k\n[PROOFSTEP]\nsimp\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit (uncurry.obj F)\ninst✝ : HasLimit (F ⋙ lim)\n⊢ limit (uncurry.obj F) ≅ limit (F ⋙ lim)\n[PROOFSTEP]\nlet c := limit.cone (uncurry.obj F)\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit (uncurry.obj F)\ninst✝ : HasLimit (F ⋙ lim)\nc : Cone (uncurry.obj F) := limit.cone (uncurry.obj F)\n⊢ limit (uncurry.obj F) ≅ limit (F ⋙ lim)\n[PROOFSTEP]\nlet P : IsLimit c := limit.isLimit _\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit (uncurry.obj F)\ninst✝ : HasLimit (F ⋙ lim)\nc : Cone (uncurry.obj F) := limit.cone (uncurry.obj F)\nP : IsLimit c := limit.isLimit (uncurry.obj F)\n⊢ limit (uncurry.obj F) ≅ limit (F ⋙ lim)\n[PROOFSTEP]\nlet G := DiagramOfCones.mkOfHasLimits F\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit (uncurry.obj F)\ninst✝ : HasLimit (F ⋙ lim)\nc : Cone (uncurry.obj F) := limit.cone (uncurry.obj F)\nP : IsLimit c := limit.isLimit (uncurry.obj F)\nG : DiagramOfCones F := DiagramOfCones.mkOfHasLimits F\n⊢ limit (uncurry.obj F) ≅ limit (F ⋙ lim)\n[PROOFSTEP]\nlet Q : ∀ j, IsLimit (G.obj j) := fun j => limit.isLimit _\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit (uncurry.obj F)\ninst✝ : HasLimit (F ⋙ lim)\nc : Cone (uncurry.obj F) := limit.cone (uncurry.obj F)\nP : IsLimit c := limit.isLimit (uncurry.obj F)\nG : DiagramOfCones F := DiagramOfCones.mkOfHasLimits F\nQ : (j : J) → IsLimit (DiagramOfCones.obj G j) := fun j => limit.isLimit (F.obj j)\n⊢ limit (uncurry.obj F) ≅ limit (F ⋙ lim)\n[PROOFSTEP]\nhave Q' := coneOfConeUncurryIsLimit Q P\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit (uncurry.obj F)\ninst✝ : HasLimit (F ⋙ lim)\nc : Cone (uncurry.obj F) := limit.cone (uncurry.obj F)\nP : IsLimit c := limit.isLimit (uncurry.obj F)\nG : DiagramOfCones F := DiagramOfCones.mkOfHasLimits F\nQ : (j : J) → IsLimit (DiagramOfCones.obj G j) := fun j => limit.isLimit (F.obj j)\nQ' : IsLimit (coneOfConeUncurry Q c)\n⊢ limit (uncurry.obj F) ≅ limit (F ⋙ lim)\n[PROOFSTEP]\nhave Q'' := limit.isLimit (F ⋙ lim)\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit (uncurry.obj F)\ninst✝ : HasLimit (F ⋙ lim)\nc : Cone (uncurry.obj F) := limit.cone (uncurry.obj F)\nP : IsLimit c := limit.isLimit (uncurry.obj F)\nG : DiagramOfCones F := DiagramOfCones.mkOfHasLimits F\nQ : (j : J) → IsLimit (DiagramOfCones.obj G j) := fun j => limit.isLimit (F.obj j)\nQ' : IsLimit (coneOfConeUncurry Q c)\nQ'' : IsLimit (limit.cone (F ⋙ lim))\n⊢ limit (uncurry.obj F) ≅ limit (F ⋙ lim)\n[PROOFSTEP]\nexact IsLimit.conePointUniqueUpToIso Q' Q''\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit (uncurry.obj F)\ninst✝ : HasLimit (F ⋙ lim)\nj : J\nk : K\n⊢ (limitUncurryIsoLimitCompLim F).hom ≫ limit.π (F ⋙ lim) j ≫ limit.π (F.obj j) k = limit.π (uncurry.obj F) (j, k)\n[PROOFSTEP]\ndsimp [limitUncurryIsoLimitCompLim, IsLimit.conePointUniqueUpToIso, IsLimit.uniqueUpToIso]\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit (uncurry.obj F)\ninst✝ : HasLimit (F ⋙ lim)\nj : J\nk : K\n⊢ limit.lift (F ⋙ lim) (coneOfConeUncurry (fun j => limit.isLimit (F.obj j)) (limit.cone (uncurry.obj F))) ≫\n      limit.π (F ⋙ lim) j ≫ limit.π (F.obj j) k =\n    limit.π (uncurry.obj F) (j, k)\n[PROOFSTEP]\nsimp\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit (uncurry.obj F)\ninst✝ : HasLimit (F ⋙ lim)\nj : J\nk : K\n⊢ (limitUncurryIsoLimitCompLim F).inv ≫ limit.π (uncurry.obj F) (j, k) = limit.π (F ⋙ lim) j ≫ limit.π (F.obj j) k\n[PROOFSTEP]\nrw [← cancel_epi (limitUncurryIsoLimitCompLim F).hom]\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit (uncurry.obj F)\ninst✝ : HasLimit (F ⋙ lim)\nj : J\nk : K\n⊢ (limitUncurryIsoLimitCompLim F).hom ≫ (limitUncurryIsoLimitCompLim F).inv ≫ limit.π (uncurry.obj F) (j, k) =\n    (limitUncurryIsoLimitCompLim F).hom ≫ limit.π (F ⋙ lim) j ≫ limit.π (F.obj j) k\n[PROOFSTEP]\nsimp\n[GOAL]\nJ K : Type v\ninst✝⁶ : SmallCategory J\ninst✝⁵ : SmallCategory K\nC : Type u\ninst✝⁴ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝³ : HasLimitsOfShape J C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimitsOfShape (J × K) C\ninst✝ : HasLimitsOfShape (K × J) C\nx✝ : K × J\n⊢ ((Prod.braiding K J).functor ⋙ uncurry.obj F).obj x✝ ≅ (Prod.swap K J ⋙ uncurry.obj F).obj x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nJ K : Type v\ninst✝⁶ : SmallCategory J\ninst✝⁵ : SmallCategory K\nC : Type u\ninst✝⁴ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝³ : HasLimitsOfShape J C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimitsOfShape (J × K) C\ninst✝ : HasLimitsOfShape (K × J) C\nj : J\nk : K\n⊢ (limitFlipCompLimIsoLimitCompLim F).hom ≫ limit.π (F ⋙ lim) j ≫ limit.π (F.obj j) k =\n    limit.π (Functor.flip F ⋙ lim) k ≫ limit.π ((Functor.flip F).obj k) j\n[PROOFSTEP]\ndsimp [limitFlipCompLimIsoLimitCompLim]\n[GOAL]\nJ K : Type v\ninst✝⁶ : SmallCategory J\ninst✝⁵ : SmallCategory K\nC : Type u\ninst✝⁴ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝³ : HasLimitsOfShape J C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimitsOfShape (J × K) C\ninst✝ : HasLimitsOfShape (K × J) C\nj : J\nk : K\n⊢ ((limitUncurryIsoLimitCompLim (Functor.flip F)).inv ≫\n        (HasLimit.isoOfNatIso (uncurryObjFlip F)).hom ≫\n          (HasLimit.isoOfEquivalence (Prod.braiding K J)\n                (NatIso.ofComponents fun x => Iso.refl ((F.obj x.snd).obj x.fst))).hom ≫\n            (limitUncurryIsoLimitCompLim F).hom) ≫\n      limit.π (F ⋙ lim) j ≫ limit.π (F.obj j) k =\n    limit.π (Functor.flip F ⋙ lim) k ≫ limit.π ((Functor.flip F).obj k) j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ K : Type v\ninst✝⁶ : SmallCategory J\ninst✝⁵ : SmallCategory K\nC : Type u\ninst✝⁴ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝³ : HasLimitsOfShape J C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimitsOfShape (J × K) C\ninst✝ : HasLimitsOfShape (K × J) C\nk : K\nj : J\n⊢ (limitFlipCompLimIsoLimitCompLim F).inv ≫ limit.π (Functor.flip F ⋙ lim) k ≫ limit.π ((Functor.flip F).obj k) j =\n    limit.π (F ⋙ lim) j ≫ limit.π (F.obj j) k\n[PROOFSTEP]\ndsimp [limitFlipCompLimIsoLimitCompLim]\n[GOAL]\nJ K : Type v\ninst✝⁶ : SmallCategory J\ninst✝⁵ : SmallCategory K\nC : Type u\ninst✝⁴ : Category.{v, u} C\nF : J ⥤ K ⥤ C\ninst✝³ : HasLimitsOfShape J C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimitsOfShape (J × K) C\ninst✝ : HasLimitsOfShape (K × J) C\nk : K\nj : J\n⊢ ((((limitUncurryIsoLimitCompLim F).inv ≫\n            (HasLimit.isoOfEquivalence (Prod.braiding K J)\n                (NatIso.ofComponents fun x => Iso.refl ((F.obj x.snd).obj x.fst))).inv) ≫\n          (HasLimit.isoOfNatIso (uncurryObjFlip F)).inv) ≫\n        (limitUncurryIsoLimitCompLim (Functor.flip F)).hom) ≫\n      limit.π (Functor.flip F ⋙ lim) k ≫ limit.π ((Functor.flip F).obj k) j =\n    limit.π (F ⋙ lim) j ≫ limit.π (F.obj j) k\n[PROOFSTEP]\nsimp\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit G\ninst✝ : HasLimit (curry.obj G ⋙ lim)\n⊢ limit G ≅ limit (curry.obj G ⋙ lim)\n[PROOFSTEP]\nhave i : G ≅ uncurry.obj ((@curry J _ K _ C _).obj G) := currying.symm.unitIso.app G\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit G\ninst✝ : HasLimit (curry.obj G ⋙ lim)\ni : G ≅ uncurry.obj (curry.obj G)\n⊢ limit G ≅ limit (curry.obj G ⋙ lim)\n[PROOFSTEP]\nhaveI : Limits.HasLimit (uncurry.obj ((@curry J _ K _ C _).obj G)) := hasLimitOfIso i\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit G\ninst✝ : HasLimit (curry.obj G ⋙ lim)\ni : G ≅ uncurry.obj (curry.obj G)\nthis : HasLimit (uncurry.obj (curry.obj G))\n⊢ limit G ≅ limit (curry.obj G ⋙ lim)\n[PROOFSTEP]\ntrans limit (uncurry.obj ((@curry J _ K _ C _).obj G))\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit G\ninst✝ : HasLimit (curry.obj G ⋙ lim)\ni : G ≅ uncurry.obj (curry.obj G)\nthis : HasLimit (uncurry.obj (curry.obj G))\n⊢ limit G ≅ limit (uncurry.obj (curry.obj G))\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit G\ninst✝ : HasLimit (curry.obj G ⋙ lim)\ni : G ≅ uncurry.obj (curry.obj G)\nthis : HasLimit (uncurry.obj (curry.obj G))\n⊢ limit (uncurry.obj (curry.obj G)) ≅ limit (curry.obj G ⋙ lim)\n[PROOFSTEP]\napply HasLimit.isoOfNatIso i\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit G\ninst✝ : HasLimit (curry.obj G ⋙ lim)\ni : G ≅ uncurry.obj (curry.obj G)\nthis : HasLimit (uncurry.obj (curry.obj G))\n⊢ limit (uncurry.obj (curry.obj G)) ≅ limit (curry.obj G ⋙ lim)\n[PROOFSTEP]\nexact limitUncurryIsoLimitCompLim ((@curry J _ K _ C _).obj G)\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit G\ninst✝ : HasLimit (curry.obj G ⋙ lim)\nj : J\nk : K\n⊢ (limitIsoLimitCurryCompLim G).hom ≫ limit.π (curry.obj G ⋙ lim) j ≫ limit.π ((curry.obj G).obj j) k = limit.π G (j, k)\n[PROOFSTEP]\nsimp [limitIsoLimitCurryCompLim, Trans.simple, HasLimit.isoOfNatIso, limitUncurryIsoLimitCompLim]\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit G\ninst✝ : HasLimit (curry.obj G ⋙ lim)\nj : J\nk : K\n⊢ (limitIsoLimitCurryCompLim G).inv ≫ limit.π G (j, k) = limit.π (curry.obj G ⋙ lim) j ≫ limit.π ((curry.obj G).obj j) k\n[PROOFSTEP]\nrw [← cancel_epi (limitIsoLimitCurryCompLim G).hom]\n[GOAL]\nJ K : Type v\ninst✝⁵ : SmallCategory J\ninst✝⁴ : SmallCategory K\nC : Type u\ninst✝³ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝² : HasLimitsOfShape K C\ninst✝¹ : HasLimit G\ninst✝ : HasLimit (curry.obj G ⋙ lim)\nj : J\nk : K\n⊢ (limitIsoLimitCurryCompLim G).hom ≫ (limitIsoLimitCurryCompLim G).inv ≫ limit.π G (j, k) =\n    (limitIsoLimitCurryCompLim G).hom ≫ limit.π (curry.obj G ⋙ lim) j ≫ limit.π ((curry.obj G).obj j) k\n[PROOFSTEP]\nsimp\n[GOAL]\nJ K : Type v\ninst✝³ : SmallCategory J\ninst✝² : SmallCategory K\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝ : HasLimits C\nj : J\nk : K\n⊢ (limitCurrySwapCompLimIsoLimitCurryCompLim G).hom ≫ limit.π (curry.obj G ⋙ lim) j ≫ limit.π ((curry.obj G).obj j) k =\n    limit.π (curry.obj (Prod.swap K J ⋙ G) ⋙ lim) k ≫ limit.π ((curry.obj (Prod.swap K J ⋙ G)).obj k) j\n[PROOFSTEP]\ndsimp [limitCurrySwapCompLimIsoLimitCurryCompLim]\n[GOAL]\nJ K : Type v\ninst✝³ : SmallCategory J\ninst✝² : SmallCategory K\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝ : HasLimits C\nj : J\nk : K\n⊢ (((limitIsoLimitCurryCompLim (Prod.swap K J ⋙ G)).inv ≫\n          (HasLimit.isoOfEquivalence (Prod.braiding K J) (Iso.refl ((Prod.braiding K J).functor ⋙ G))).hom) ≫\n        (limitIsoLimitCurryCompLim G).hom) ≫\n      limit.π (curry.obj G ⋙ lim) j ≫ limit.π ((curry.obj G).obj j) k =\n    limit.π (curry.obj (Prod.swap K J ⋙ G) ⋙ lim) k ≫ limit.π ((curry.obj (Prod.swap K J ⋙ G)).obj k) j\n[PROOFSTEP]\nsimp only [Iso.refl_hom, Prod.braiding_counitIso_hom_app, Limits.HasLimit.isoOfEquivalence_hom_π, Iso.refl_inv,\n  limitIsoLimitCurryCompLim_hom_π_π, eqToIso_refl, Category.assoc]\n[GOAL]\nJ K : Type v\ninst✝³ : SmallCategory J\ninst✝² : SmallCategory K\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝ : HasLimits C\nj : J\nk : K\n⊢ (limitIsoLimitCurryCompLim (Prod.swap K J ⋙ G)).inv ≫\n      limit.π (Prod.swap K J ⋙ G) ((Prod.braiding K J).inverse.obj (j, k)) ≫\n        NatTrans.app (𝟙 ((Prod.braiding K J).functor ⋙ G)) ((Prod.braiding K J).inverse.obj (j, k)) ≫ G.map (𝟙 j, 𝟙 k) =\n    limit.π (curry.obj (Prod.swap K J ⋙ G) ⋙ lim) k ≫ limit.π ((curry.obj (Prod.swap K J ⋙ G)).obj k) j\n[PROOFSTEP]\nerw [NatTrans.id_app]\n  -- Why can't `simp` do this?\n[GOAL]\nJ K : Type v\ninst✝³ : SmallCategory J\ninst✝² : SmallCategory K\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝ : HasLimits C\nj : J\nk : K\n⊢ (limitIsoLimitCurryCompLim (Prod.swap K J ⋙ G)).inv ≫\n      limit.π (Prod.swap K J ⋙ G) ((Prod.braiding K J).inverse.obj (j, k)) ≫\n        𝟙 ((Prod.swap K J ⋙ G).obj ((Prod.braiding K J).inverse.obj (j, k))) ≫ G.map (𝟙 j, 𝟙 k) =\n    limit.π (curry.obj (Prod.swap K J ⋙ G) ⋙ lim) k ≫ limit.π ((curry.obj (Prod.swap K J ⋙ G)).obj k) j\n[PROOFSTEP]\ndsimp\n  -- porting note: the original proof only had `simp`.\n    -- However, now `CategoryTheory.Bifunctor.map_id` does not get used by `simp`\n[GOAL]\nJ K : Type v\ninst✝³ : SmallCategory J\ninst✝² : SmallCategory K\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝ : HasLimits C\nj : J\nk : K\n⊢ (limitIsoLimitCurryCompLim (Prod.swap K J ⋙ G)).inv ≫\n      limit.π (Prod.swap K J ⋙ G) (k, j) ≫ 𝟙 (G.obj (j, k)) ≫ G.map (𝟙 j, 𝟙 k) =\n    limit.π (curry.obj (Prod.swap K J ⋙ G) ⋙ lim) k ≫ limit.π ((curry.obj (Prod.swap K J ⋙ G)).obj k) j\n[PROOFSTEP]\nrw [CategoryTheory.Bifunctor.map_id]\n[GOAL]\nJ K : Type v\ninst✝³ : SmallCategory J\ninst✝² : SmallCategory K\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝ : HasLimits C\nj : J\nk : K\n⊢ (limitIsoLimitCurryCompLim (Prod.swap K J ⋙ G)).inv ≫\n      limit.π (Prod.swap K J ⋙ G) (k, j) ≫ 𝟙 (G.obj (j, k)) ≫ 𝟙 (G.obj (j, k)) =\n    limit.π (curry.obj (Prod.swap K J ⋙ G) ⋙ lim) k ≫ limit.π ((curry.obj (Prod.swap K J ⋙ G)).obj k) j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ K : Type v\ninst✝³ : SmallCategory J\ninst✝² : SmallCategory K\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝ : HasLimits C\nj : J\nk : K\n⊢ (limitCurrySwapCompLimIsoLimitCurryCompLim G).inv ≫\n      limit.π (curry.obj (Prod.swap K J ⋙ G) ⋙ lim) k ≫ limit.π ((curry.obj (Prod.swap K J ⋙ G)).obj k) j =\n    limit.π (curry.obj G ⋙ lim) j ≫ limit.π ((curry.obj G).obj j) k\n[PROOFSTEP]\ndsimp [limitCurrySwapCompLimIsoLimitCurryCompLim]\n[GOAL]\nJ K : Type v\ninst✝³ : SmallCategory J\ninst✝² : SmallCategory K\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝ : HasLimits C\nj : J\nk : K\n⊢ ((limitIsoLimitCurryCompLim G).inv ≫\n        (HasLimit.isoOfEquivalence (Prod.braiding K J) (Iso.refl ((Prod.braiding K J).functor ⋙ G))).inv ≫\n          (limitIsoLimitCurryCompLim (Prod.swap K J ⋙ G)).hom) ≫\n      limit.π (curry.obj (Prod.swap K J ⋙ G) ⋙ lim) k ≫ limit.π ((curry.obj (Prod.swap K J ⋙ G)).obj k) j =\n    limit.π (curry.obj G ⋙ lim) j ≫ limit.π ((curry.obj G).obj j) k\n[PROOFSTEP]\nsimp only [Iso.refl_hom, Prod.braiding_counitIso_hom_app, Limits.HasLimit.isoOfEquivalence_inv_π, Iso.refl_inv,\n  limitIsoLimitCurryCompLim_hom_π_π, eqToIso_refl, Category.assoc]\n[GOAL]\nJ K : Type v\ninst✝³ : SmallCategory J\ninst✝² : SmallCategory K\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝ : HasLimits C\nj : J\nk : K\n⊢ (limitIsoLimitCurryCompLim G).inv ≫\n      limit.π G ((Prod.braiding K J).functor.obj (k, j)) ≫ NatTrans.app (𝟙 ((Prod.braiding K J).functor ⋙ G)) (k, j) =\n    limit.π (curry.obj G ⋙ lim) j ≫ limit.π ((curry.obj G).obj j) k\n[PROOFSTEP]\nerw [NatTrans.id_app]\n  -- Porting note: `simp` can do this in lean 4.\n[GOAL]\nJ K : Type v\ninst✝³ : SmallCategory J\ninst✝² : SmallCategory K\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ K ⥤ C\nG : J × K ⥤ C\ninst✝ : HasLimits C\nj : J\nk : K\n⊢ (limitIsoLimitCurryCompLim G).inv ≫\n      limit.π G ((Prod.braiding K J).functor.obj (k, j)) ≫ 𝟙 (((Prod.braiding K J).functor ⋙ G).obj (k, j)) =\n    limit.π (curry.obj G ⋙ lim) j ≫ limit.π ((curry.obj G).obj j) k\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Fubini", "llama_tokens": 23773, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7025300573952052, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.3704557074352874}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na✝ : α\ns : Multiset α\nh : ∀ (a : α) (t : Multiset α), s ≠ a ::ₘ a ::ₘ t\na : α\nle : a ::ₘ a ::ₘ 0 ≤ s\nt : Multiset α\ns_eq : s = a ::ₘ a ::ₘ 0 + t\n⊢ s = a ::ₘ a ::ₘ t\n[PROOFSTEP]\nrwa [cons_add, cons_add, zero_add] at s_eq \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t : Multiset α\na : α\ninst✝ : DecidableEq α\ns : Multiset α\n_l : List α\n⊢ Nodup (Quot.mk Setoid.r _l) ↔ ∀ (a : α), count a (Quot.mk Setoid.r _l) ≤ 1\n[PROOFSTEP]\nsimp only [quot_mk_to_coe'', coe_nodup, mem_coe, coe_count]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t : Multiset α\na : α\ninst✝ : DecidableEq α\ns : Multiset α\n_l : List α\n⊢ List.Nodup _l ↔ ∀ (a : α), List.count a _l ≤ 1\n[PROOFSTEP]\napply List.nodup_iff_count_le_one\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t : Multiset α\na✝ : α\ninst✝ : DecidableEq α\na : α\ns : Multiset α\nd : Nodup s\n⊢ count a s = if a ∈ s then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t : Multiset α\na✝ : α\ninst✝ : DecidableEq α\na : α\ns : Multiset α\nd : Nodup s\nh : a ∈ s\n⊢ count a s = 1\n[PROOFSTEP]\nexact count_eq_one_of_mem d h\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t : Multiset α\na✝ : α\ninst✝ : DecidableEq α\na : α\ns : Multiset α\nd : Nodup s\nh : ¬a ∈ s\n⊢ count a s = 0\n[PROOFSTEP]\nexact count_eq_zero_of_not_mem h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns t : Multiset α\na : α\nd₁ : Nodup s\nd₂ : Nodup t\n⊢ Nodup (s + t) ↔ Disjoint s t\n[PROOFSTEP]\nsimp [nodup_add, d₁, d₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns t : Multiset α\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl : Multiset α\nd : Nodup l\n⊢ a ∈ Multiset.erase l b ↔ a ≠ b ∧ a ∈ l\n[PROOFSTEP]\nrw [d.erase_eq_filter b, mem_filter, and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns t✝ : Multiset α\na : α\nt : Multiset β\nl₁ : List α\nl₂ : List β\nd₁ : Nodup (Quotient.mk (isSetoid α) l₁)\nd₂ : Nodup (Quotient.mk (isSetoid β) l₂)\n⊢ Nodup (Quotient.mk (isSetoid α) l₁ ×ˢ Quotient.mk (isSetoid β) l₂)\n[PROOFSTEP]\nsimp [List.Nodup.product d₁ d₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns t✝ : Multiset α\na : α\nσ : α → Type u_4\nt : (a : α) → Multiset (σ a)\nl₁ : List α\n⊢ Nodup (Quot.mk Setoid.r l₁) → (∀ (a : α), Nodup (t a)) → Nodup (Multiset.sigma (Quot.mk Setoid.r l₁) t)\n[PROOFSTEP]\nchoose f hf using fun a => Quotient.exists_rep (t a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns t✝ : Multiset α\na : α\nσ : α → Type u_4\nt : (a : α) → Multiset (σ a)\nl₁ : List α\nf : (a : α) → List (σ a)\nhf : ∀ (a : α), Quotient.mk (isSetoid (σ a)) (f a) = t a\n⊢ Nodup (Quot.mk Setoid.r l₁) → (∀ (a : α), Nodup (t a)) → Nodup (Multiset.sigma (Quot.mk Setoid.r l₁) t)\n[PROOFSTEP]\nsimpa [← funext hf] using List.Nodup.sigma\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na✝ : α\ninst✝ : DecidableEq α\ns t : Multiset α\nx✝ : Nodup s ∧ Nodup t\nh₁ : Nodup s\nh₂ : Nodup t\na : α\n⊢ count a (s ∪ t) ≤ 1\n[PROOFSTEP]\nrw [count_union]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na✝ : α\ninst✝ : DecidableEq α\ns t : Multiset α\nx✝ : Nodup s ∧ Nodup t\nh₁ : Nodup s\nh₂ : Nodup t\na : α\n⊢ max (count a s) (count a t) ≤ 1\n[PROOFSTEP]\nexact max_le (nodup_iff_count_le_one.1 h₁ a) (nodup_iff_count_le_one.1 h₂ a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na : α\ns : Multiset α\nt : α → Multiset β\nh₁ : ∀ (a : α), ∃ l, t a = ↑l\nt' : α → List β\nh' : ∀ (x : α), t x = ↑(t' x)\nthis : t = fun a => ↑(t' a)\nhd : Symmetric fun a b => List.Disjoint (t' a) (t' b)\n⊢ ∀ (a : List α),\n    Nodup (bind (Quot.mk Setoid.r a) t) ↔\n      (∀ (a_1 : α), a_1 ∈ Quot.mk Setoid.r a → Nodup (t a_1)) ∧\n        Pairwise (fun a b => Disjoint (t a) (t b)) (Quot.mk Setoid.r a)\n[PROOFSTEP]\nsimp [this, List.nodup_bind, pairwise_coe_iff_pairwise hd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na✝ : α\ninst✝ : DecidableEq α\na : α\ns t : Multiset α\nd : Nodup s\nh : a ∈ s - t\nh' : a ∈ t\n⊢ False\n[PROOFSTEP]\nrefine' count_eq_zero.1 _ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na✝ : α\ninst✝ : DecidableEq α\na : α\ns t : Multiset α\nd : Nodup s\nh : a ∈ s - t\nh' : a ∈ t\n⊢ count a (s - t) = 0\n[PROOFSTEP]\nrw [count_sub a s t, tsub_eq_zero_iff_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na✝ : α\ninst✝ : DecidableEq α\na : α\ns t : Multiset α\nd : Nodup s\nh : a ∈ s - t\nh' : a ∈ t\n⊢ count a s ≤ count a t\n[PROOFSTEP]\nexact le_trans (nodup_iff_count_le_one.1 d _) (count_pos.2 h')\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na : α\nf : α → γ\ng : β → γ\ns : Multiset α\nt : Multiset β\nhs : Nodup s\nht : Nodup t\ni : (a : α) → a ∈ s → β\nhi : ∀ (a : α) (ha : a ∈ s), i a ha ∈ t\nh : ∀ (a : α) (ha : a ∈ s), f a = g (i a ha)\ni_inj : ∀ (a₁ a₂ : α) (ha₁ : a₁ ∈ s) (ha₂ : a₂ ∈ s), i a₁ ha₁ = i a₂ ha₂ → a₁ = a₂\ni_surj : ∀ (b : β), b ∈ t → ∃ a ha, b = i a ha\nx : β\n⊢ x ∈ t ↔ x ∈ map (fun x => i ↑x (_ : ↑x ∈ s)) (attach s)\n[PROOFSTEP]\nsimp only [mem_map, true_and_iff, Subtype.exists, eq_comm, mem_attach]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na : α\nf : α → γ\ng : β → γ\ns : Multiset α\nt : Multiset β\nhs : Nodup s\nht : Nodup t\ni : (a : α) → a ∈ s → β\nhi : ∀ (a : α) (ha : a ∈ s), i a ha ∈ t\nh : ∀ (a : α) (ha : a ∈ s), f a = g (i a ha)\ni_inj : ∀ (a₁ a₂ : α) (ha₁ : a₁ ∈ s) (ha₂ : a₂ ∈ s), i a₁ ha₁ = i a₂ ha₂ → a₁ = a₂\ni_surj : ∀ (b : β), b ∈ t → ∃ a ha, b = i a ha\nx : β\n⊢ x ∈ t ↔ ∃ a h, x = i a (_ : ↑{ val := a, property := (_ : a ∈ s) } ∈ s)\n[PROOFSTEP]\nexact ⟨i_surj _, fun ⟨y, hy⟩ => hy.snd.symm ▸ hi _ _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na : α\nf : α → γ\ng : β → γ\ns : Multiset α\nt : Multiset β\nhs : Nodup s\nht : Nodup t\ni : (a : α) → a ∈ s → β\nhi : ∀ (a : α) (ha : a ∈ s), i a ha ∈ t\nh : ∀ (a : α) (ha : a ∈ s), f a = g (i a ha)\ni_inj : ∀ (a₁ a₂ : α) (ha₁ : a₁ ∈ s) (ha₂ : a₂ ∈ s), i a₁ ha₁ = i a₂ ha₂ → a₁ = a₂\ni_surj : ∀ (b : β), b ∈ t → ∃ a ha, b = i a ha\nthis : t = map (fun x => i ↑x (_ : ↑x ∈ s)) (attach s)\n⊢ map f s = pmap (fun x x_1 => f x) s (_ : ∀ (x : α), x ∈ s → x ∈ s)\n[PROOFSTEP]\nrw [pmap_eq_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na : α\nf : α → γ\ng : β → γ\ns : Multiset α\nt : Multiset β\nhs : Nodup s\nht : Nodup t\ni : (a : α) → a ∈ s → β\nhi : ∀ (a : α) (ha : a ∈ s), i a ha ∈ t\nh : ∀ (a : α) (ha : a ∈ s), f a = g (i a ha)\ni_inj : ∀ (a₁ a₂ : α) (ha₁ : a₁ ∈ s) (ha₂ : a₂ ∈ s), i a₁ ha₁ = i a₂ ha₂ → a₁ = a₂\ni_surj : ∀ (b : β), b ∈ t → ∃ a ha, b = i a ha\nthis : t = map (fun x => i ↑x (_ : ↑x ∈ s)) (attach s)\n⊢ pmap (fun x x_1 => f x) s (_ : ∀ (x : α), x ∈ s → x ∈ s) = map (fun x => f ↑x) (attach s)\n[PROOFSTEP]\nrw [pmap_eq_map_attach]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na : α\nf : α → γ\ng : β → γ\ns : Multiset α\nt : Multiset β\nhs : Nodup s\nht : Nodup t\ni : (a : α) → a ∈ s → β\nhi : ∀ (a : α) (ha : a ∈ s), i a ha ∈ t\nh : ∀ (a : α) (ha : a ∈ s), f a = g (i a ha)\ni_inj : ∀ (a₁ a₂ : α) (ha₁ : a₁ ∈ s) (ha₂ : a₂ ∈ s), i a₁ ha₁ = i a₂ ha₂ → a₁ = a₂\ni_surj : ∀ (b : β), b ∈ t → ∃ a ha, b = i a ha\nthis : t = map (fun x => i ↑x (_ : ↑x ∈ s)) (attach s)\n⊢ map (fun x => f ↑x) (attach s) = map g t\n[PROOFSTEP]\nrw [this, Multiset.map_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ t✝ : Multiset α\na : α\nf : α → γ\ng : β → γ\ns : Multiset α\nt : Multiset β\nhs : Nodup s\nht : Nodup t\ni : (a : α) → a ∈ s → β\nhi : ∀ (a : α) (ha : a ∈ s), i a ha ∈ t\nh : ∀ (a : α) (ha : a ∈ s), f a = g (i a ha)\ni_inj : ∀ (a₁ a₂ : α) (ha₁ : a₁ ∈ s) (ha₂ : a₂ ∈ s), i a₁ ha₁ = i a₂ ha₂ → a₁ = a₂\ni_surj : ∀ (b : β), b ∈ t → ∃ a ha, b = i a ha\nthis : t = map (fun x => i ↑x (_ : ↑x ∈ s)) (attach s)\n⊢ map (fun x => f ↑x) (attach s) = map (g ∘ fun x => i ↑x (_ : ↑x ∈ s)) (attach s)\n[PROOFSTEP]\nexact map_congr rfl fun x _ => h _ _\n", "meta": {"mathlib_filename": "Mathlib.Data.Multiset.Nodup", "llama_tokens": 4576, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6723316991792861, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3701907856509385}}
{"text": "[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\n⊢ K = RingHom.fieldRange ofReal ∨ K = ⊤\n[PROOFSTEP]\nsuffices range (ofReal' : ℝ → ℂ) ⊆ K\n  by\n  rw [range_subset_iff, ← coe_algebraMap] at this \n  have :=\n    (Subalgebra.isSimpleOrder_of_finrank finrank_real_complex).eq_bot_or_eq_top\n      (Subfield.toIntermediateField K this).toSubalgebra\n  simp_rw [← SetLike.coe_set_eq] at this ⊢\n  convert this using 2\n  simp only [RingHom.coe_fieldRange, Algebra.coe_bot, coe_algebraMap]\n  rfl\n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\nthis : range ofReal' ⊆ ↑K\n⊢ K = RingHom.fieldRange ofReal ∨ K = ⊤\n[PROOFSTEP]\nrw [range_subset_iff, ← coe_algebraMap] at this \n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\nthis : ∀ (y : ℝ), ↑(algebraMap ℝ ℂ) y ∈ ↑K\n⊢ K = RingHom.fieldRange ofReal ∨ K = ⊤\n[PROOFSTEP]\nhave :=\n  (Subalgebra.isSimpleOrder_of_finrank finrank_real_complex).eq_bot_or_eq_top\n    (Subfield.toIntermediateField K this).toSubalgebra\n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\nthis✝ : ∀ (y : ℝ), ↑(algebraMap ℝ ℂ) y ∈ ↑K\nthis : (Subfield.toIntermediateField K this✝).toSubalgebra = ⊥ ∨ (Subfield.toIntermediateField K this✝).toSubalgebra = ⊤\n⊢ K = RingHom.fieldRange ofReal ∨ K = ⊤\n[PROOFSTEP]\nsimp_rw [← SetLike.coe_set_eq] at this ⊢\n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\nthis✝ : ∀ (y : ℝ), ↑(algebraMap ℝ ℂ) y ∈ ↑K\nthis :\n  ↑(Subfield.toIntermediateField K this✝).toSubalgebra = ↑⊥ ∨ ↑(Subfield.toIntermediateField K this✝).toSubalgebra = ↑⊤\n⊢ ↑K = ↑(RingHom.fieldRange ofReal) ∨ ↑K = ↑⊤\n[PROOFSTEP]\nconvert this using 2\n[GOAL]\ncase h.e'_1.h.e'_3\nK : Subfield ℂ\nhc : IsClosed ↑K\nthis✝ : ∀ (y : ℝ), ↑(algebraMap ℝ ℂ) y ∈ ↑K\nthis :\n  ↑(Subfield.toIntermediateField K this✝).toSubalgebra = ↑⊥ ∨ ↑(Subfield.toIntermediateField K this✝).toSubalgebra = ↑⊤\n⊢ ↑(RingHom.fieldRange ofReal) = ↑⊥\n[PROOFSTEP]\nsimp only [RingHom.coe_fieldRange, Algebra.coe_bot, coe_algebraMap]\n[GOAL]\ncase h.e'_1.h.e'_3\nK : Subfield ℂ\nhc : IsClosed ↑K\nthis✝ : ∀ (y : ℝ), ↑(algebraMap ℝ ℂ) y ∈ ↑K\nthis :\n  ↑(Subfield.toIntermediateField K this✝).toSubalgebra = ↑⊥ ∨ ↑(Subfield.toIntermediateField K this✝).toSubalgebra = ↑⊤\n⊢ range ↑ofReal = range ofReal'\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\n⊢ range ofReal' ⊆ ↑K\n[PROOFSTEP]\nsuffices range (ofReal' : ℝ → ℂ) ⊆ closure (Set.range ((ofReal' : ℝ → ℂ) ∘ ((↑) : ℚ → ℝ)))\n  by\n  refine' subset_trans this _\n  rw [← IsClosed.closure_eq hc]\n  apply closure_mono\n  rintro _ ⟨_, rfl⟩\n  simp only [Function.comp_apply, ofReal_rat_cast, SetLike.mem_coe, SubfieldClass.coe_rat_mem]\n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\nthis : range ofReal' ⊆ closure (range (ofReal' ∘ Rat.cast))\n⊢ range ofReal' ⊆ ↑K\n[PROOFSTEP]\nrefine' subset_trans this _\n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\nthis : range ofReal' ⊆ closure (range (ofReal' ∘ Rat.cast))\n⊢ closure (range (ofReal' ∘ Rat.cast)) ⊆ ↑K\n[PROOFSTEP]\nrw [← IsClosed.closure_eq hc]\n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\nthis : range ofReal' ⊆ closure (range (ofReal' ∘ Rat.cast))\n⊢ closure (range (ofReal' ∘ Rat.cast)) ⊆ closure ↑K\n[PROOFSTEP]\napply closure_mono\n[GOAL]\ncase h\nK : Subfield ℂ\nhc : IsClosed ↑K\nthis : range ofReal' ⊆ closure (range (ofReal' ∘ Rat.cast))\n⊢ range (ofReal' ∘ Rat.cast) ⊆ ↑K\n[PROOFSTEP]\nrintro _ ⟨_, rfl⟩\n[GOAL]\ncase h.intro\nK : Subfield ℂ\nhc : IsClosed ↑K\nthis : range ofReal' ⊆ closure (range (ofReal' ∘ Rat.cast))\nw✝ : ℚ\n⊢ (ofReal' ∘ Rat.cast) w✝ ∈ ↑K\n[PROOFSTEP]\nsimp only [Function.comp_apply, ofReal_rat_cast, SetLike.mem_coe, SubfieldClass.coe_rat_mem]\n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\n⊢ range ofReal' ⊆ closure (range (ofReal' ∘ Rat.cast))\n[PROOFSTEP]\nnth_rw 1 [range_comp]\n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\n⊢ range ofReal' ⊆ closure (ofReal' '' range Rat.cast)\n[PROOFSTEP]\nrefine' subset_trans _ (image_closure_subset_closure_image continuous_ofReal)\n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\n⊢ range ofReal' ⊆ ofReal' '' closure (range Rat.cast)\n[PROOFSTEP]\nrw [DenseRange.closure_range Rat.denseEmbedding_coe_real.dense]\n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\n⊢ range ofReal' ⊆ ofReal' '' univ\n[PROOFSTEP]\nsimp only [image_univ]\n[GOAL]\nK : Subfield ℂ\nhc : IsClosed ↑K\n⊢ range ofReal' ⊆ range ofReal'\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\nletI : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\nletI : TopologicalRing K.topologicalClosure := Subring.instTopologicalRing K.topologicalClosure.toSubring\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\nset ι : K → K.topologicalClosure := ⇑(Subfield.inclusion K.le_topologicalClosure)\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\nhave ui : UniformInducing ι :=\n  ⟨by\n    erw [uniformity_subtype, uniformity_subtype, Filter.comap_comap]\n    congr⟩\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\n⊢ Filter.comap (fun x => (ι x.fst, ι x.snd)) (uniformity { x // x ∈ Subfield.topologicalClosure K }) =\n    uniformity { x // x ∈ K }\n[PROOFSTEP]\nerw [uniformity_subtype, uniformity_subtype, Filter.comap_comap]\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\n⊢ Filter.comap ((fun q => (↑q.fst, ↑q.snd)) ∘ fun x => (ι x.fst, ι x.snd)) (uniformity ℂ) =\n    Filter.comap (fun q => (↑q.fst, ↑q.snd)) (uniformity ℂ)\n[PROOFSTEP]\ncongr\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\nlet di := ui.denseInducing (?_ : DenseRange ι)\n[GOAL]\ncase refine_2\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\nlet extψ := DenseInducing.extendRingHom ui di.dense hc\n[GOAL]\ncase refine_2\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\nhaveI hψ := (uniformContinuous_uniformly_extend ui di.dense hc).continuous\n[GOAL]\ncase refine_2\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\ncases' Complex.subfield_eq_of_closed (Subfield.isClosed_topologicalClosure K) with h h\n[GOAL]\ncase refine_2.inl\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\nleft\n[GOAL]\ncase refine_2.inl.h\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\n⊢ ψ.toFun = ↑(Subfield.subtype K)\n[PROOFSTEP]\nlet j := RingEquiv.subfieldCongr h\n[GOAL]\ncase refine_2.inl.h\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\n⊢ ψ.toFun = ↑(Subfield.subtype K)\n[PROOFSTEP]\nlet ψ₁ :=\n  RingHom.comp extψ\n    (RingHom.comp j.symm.toRingHom ofReal.rangeRestrict)\n      -- porting note: was `by continuity!` and was used inline\n[GOAL]\ncase refine_2.inl.h\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\nψ₁ : ℝ →+* ℂ := RingHom.comp extψ (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm j)) (RingHom.rangeRestrict ofReal))\n⊢ ψ.toFun = ↑(Subfield.subtype K)\n[PROOFSTEP]\nhave hψ₁ : Continuous ψ₁ := by simpa only [RingHom.coe_comp] using hψ.comp ((continuous_algebraMap ℝ ℂ).subtype_mk _)\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\nψ₁ : ℝ →+* ℂ := RingHom.comp extψ (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm j)) (RingHom.rangeRestrict ofReal))\n⊢ Continuous ↑ψ₁\n[PROOFSTEP]\nsimpa only [RingHom.coe_comp] using hψ.comp ((continuous_algebraMap ℝ ℂ).subtype_mk _)\n[GOAL]\ncase refine_2.inl.h\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\nψ₁ : ℝ →+* ℂ := RingHom.comp extψ (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm j)) (RingHom.rangeRestrict ofReal))\nhψ₁ : Continuous ↑ψ₁\n⊢ ψ.toFun = ↑(Subfield.subtype K)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase refine_2.inl.h.h\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\nψ₁ : ℝ →+* ℂ := RingHom.comp extψ (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm j)) (RingHom.rangeRestrict ofReal))\nhψ₁ : Continuous ↑ψ₁\nx : { x // x ∈ K }\n⊢ OneHom.toFun (↑↑ψ) x = ↑(Subfield.subtype K) x\n[PROOFSTEP]\nrsuffices ⟨r, hr⟩ : ∃ r : ℝ, ofReal.rangeRestrict r = j (ι x)\n[GOAL]\ncase refine_2.inl.h.h.intro\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\nψ₁ : ℝ →+* ℂ := RingHom.comp extψ (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm j)) (RingHom.rangeRestrict ofReal))\nhψ₁ : Continuous ↑ψ₁\nx : { x // x ∈ K }\nr : ℝ\nhr : ↑(RingHom.rangeRestrict ofReal) r = ↑j (ι x)\n⊢ OneHom.toFun (↑↑ψ) x = ↑(Subfield.subtype K) x\n[PROOFSTEP]\nhave := RingHom.congr_fun (ringHom_eq_ofReal_of_continuous hψ₁) r\n[GOAL]\ncase refine_2.inl.h.h.intro\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝¹ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis✝ : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\nψ₁ : ℝ →+* ℂ := RingHom.comp extψ (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm j)) (RingHom.rangeRestrict ofReal))\nhψ₁ : Continuous ↑ψ₁\nx : { x // x ∈ K }\nr : ℝ\nhr : ↑(RingHom.rangeRestrict ofReal) r = ↑j (ι x)\nthis : ↑ψ₁ r = ↑ofReal r\n⊢ OneHom.toFun (↑↑ψ) x = ↑(Subfield.subtype K) x\n[PROOFSTEP]\nrw [RingHom.comp_apply, RingHom.comp_apply, hr, RingEquiv.toRingHom_eq_coe] at this \n[GOAL]\ncase refine_2.inl.h.h.intro\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝¹ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis✝ : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\nψ₁ : ℝ →+* ℂ := RingHom.comp extψ (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm j)) (RingHom.rangeRestrict ofReal))\nhψ₁ : Continuous ↑ψ₁\nx : { x // x ∈ K }\nr : ℝ\nhr : ↑(RingHom.rangeRestrict ofReal) r = ↑j (ι x)\nthis : ↑extψ (↑↑(RingEquiv.symm j) (↑j (ι x))) = ↑ofReal r\n⊢ OneHom.toFun (↑↑ψ) x = ↑(Subfield.subtype K) x\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_2\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝¹ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis✝ : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\nψ₁ : ℝ →+* ℂ := RingHom.comp extψ (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm j)) (RingHom.rangeRestrict ofReal))\nhψ₁ : Continuous ↑ψ₁\nx : { x // x ∈ K }\nr : ℝ\nhr : ↑(RingHom.rangeRestrict ofReal) r = ↑j (ι x)\nthis : ↑extψ (↑↑(RingEquiv.symm j) (↑j (ι x))) = ↑ofReal r\n⊢ OneHom.toFun (↑↑ψ) x = ↑extψ (↑↑(RingEquiv.symm j) (↑j (ι x)))\n[PROOFSTEP]\nexact (DenseInducing.extend_eq di hc.continuous _).symm\n[GOAL]\ncase h.e'_3\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝¹ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis✝ : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\nψ₁ : ℝ →+* ℂ := RingHom.comp extψ (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm j)) (RingHom.rangeRestrict ofReal))\nhψ₁ : Continuous ↑ψ₁\nx : { x // x ∈ K }\nr : ℝ\nhr : ↑(RingHom.rangeRestrict ofReal) r = ↑j (ι x)\nthis : ↑extψ (↑↑(RingEquiv.symm j) (↑j (ι x))) = ↑ofReal r\n⊢ ↑(Subfield.subtype K) x = ↑ofReal r\n[PROOFSTEP]\nrw [← ofReal.coe_rangeRestrict, hr]\n[GOAL]\ncase h.e'_3\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝¹ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis✝ : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\nψ₁ : ℝ →+* ℂ := RingHom.comp extψ (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm j)) (RingHom.rangeRestrict ofReal))\nhψ₁ : Continuous ↑ψ₁\nx : { x // x ∈ K }\nr : ℝ\nhr : ↑(RingHom.rangeRestrict ofReal) r = ↑j (ι x)\nthis : ↑extψ (↑↑(RingEquiv.symm j) (↑j (ι x))) = ↑ofReal r\n⊢ ↑(Subfield.subtype K) x = ↑(↑j (ι x))\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\nψ₁ : ℝ →+* ℂ := RingHom.comp extψ (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm j)) (RingHom.rangeRestrict ofReal))\nhψ₁ : Continuous ↑ψ₁\nx : { x // x ∈ K }\n⊢ ∃ r, ↑(RingHom.rangeRestrict ofReal) r = ↑j (ι x)\n[PROOFSTEP]\nobtain ⟨r, hr⟩ := SetLike.coe_mem (j (ι x))\n[GOAL]\ncase intro\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = RingHom.fieldRange ofReal\nj : { x // x ∈ Subfield.topologicalClosure K } ≃+* { x // x ∈ RingHom.fieldRange ofReal } := RingEquiv.subfieldCongr h\nψ₁ : ℝ →+* ℂ := RingHom.comp extψ (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm j)) (RingHom.rangeRestrict ofReal))\nhψ₁ : Continuous ↑ψ₁\nx : { x // x ∈ K }\nr : ℝ\nhr : ↑ofReal r = ↑(↑j (ι x))\n⊢ ∃ r, ↑(RingHom.rangeRestrict ofReal) r = ↑j (ι x)\n[PROOFSTEP]\nexact ⟨r, Subtype.ext hr⟩\n[GOAL]\ncase refine_2.inr\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = ⊤\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\nlet ψ₁ :=\n  RingHom.comp extψ\n    (RingHom.comp (RingEquiv.subfieldCongr h).symm.toRingHom (@Subfield.topEquiv ℂ _).symm.toRingHom)\n      -- porting note: was `by continuity!` and was used inline\n[GOAL]\ncase refine_2.inr\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = ⊤\nψ₁ : ℂ →+* ℂ :=\n  RingHom.comp extψ\n    (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (RingEquiv.subfieldCongr h)))\n      (RingEquiv.toRingHom (RingEquiv.symm Subfield.topEquiv)))\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\nhave hψ₁ : Continuous ψ₁ := by simpa only [RingHom.coe_comp] using hψ.comp (continuous_id.subtype_mk _)\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = ⊤\nψ₁ : ℂ →+* ℂ :=\n  RingHom.comp extψ\n    (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (RingEquiv.subfieldCongr h)))\n      (RingEquiv.toRingHom (RingEquiv.symm Subfield.topEquiv)))\n⊢ Continuous ↑ψ₁\n[PROOFSTEP]\nsimpa only [RingHom.coe_comp] using hψ.comp (continuous_id.subtype_mk _)\n[GOAL]\ncase refine_2.inr\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh : Subfield.topologicalClosure K = ⊤\nψ₁ : ℂ →+* ℂ :=\n  RingHom.comp extψ\n    (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (RingEquiv.subfieldCongr h)))\n      (RingEquiv.toRingHom (RingEquiv.symm Subfield.topEquiv)))\nhψ₁ : Continuous ↑ψ₁\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\ncases' ringHom_eq_id_or_conj_of_continuous hψ₁ with h h\n[GOAL]\ncase refine_2.inr.inl\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh✝ : Subfield.topologicalClosure K = ⊤\nψ₁ : ℂ →+* ℂ :=\n  RingHom.comp extψ\n    (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (RingEquiv.subfieldCongr h✝)))\n      (RingEquiv.toRingHom (RingEquiv.symm Subfield.topEquiv)))\nhψ₁ : Continuous ↑ψ₁\nh : ψ₁ = RingHom.id ℂ\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\nleft\n[GOAL]\ncase refine_2.inr.inl.h\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh✝ : Subfield.topologicalClosure K = ⊤\nψ₁ : ℂ →+* ℂ :=\n  RingHom.comp extψ\n    (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (RingEquiv.subfieldCongr h✝)))\n      (RingEquiv.toRingHom (RingEquiv.symm Subfield.topEquiv)))\nhψ₁ : Continuous ↑ψ₁\nh : ψ₁ = RingHom.id ℂ\n⊢ ψ.toFun = ↑(Subfield.subtype K)\n[PROOFSTEP]\next1 z\n[GOAL]\ncase refine_2.inr.inl.h.h\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh✝ : Subfield.topologicalClosure K = ⊤\nψ₁ : ℂ →+* ℂ :=\n  RingHom.comp extψ\n    (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (RingEquiv.subfieldCongr h✝)))\n      (RingEquiv.toRingHom (RingEquiv.symm Subfield.topEquiv)))\nhψ₁ : Continuous ↑ψ₁\nh : ψ₁ = RingHom.id ℂ\nz : { x // x ∈ K }\n⊢ OneHom.toFun (↑↑ψ) z = ↑(Subfield.subtype K) z\n[PROOFSTEP]\nconvert RingHom.congr_fun h z using 1\n[GOAL]\ncase h.e'_2\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh✝ : Subfield.topologicalClosure K = ⊤\nψ₁ : ℂ →+* ℂ :=\n  RingHom.comp extψ\n    (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (RingEquiv.subfieldCongr h✝)))\n      (RingEquiv.toRingHom (RingEquiv.symm Subfield.topEquiv)))\nhψ₁ : Continuous ↑ψ₁\nh : ψ₁ = RingHom.id ℂ\nz : { x // x ∈ K }\n⊢ OneHom.toFun (↑↑ψ) z = ↑ψ₁ ↑z\n[PROOFSTEP]\nexact (DenseInducing.extend_eq di hc.continuous z).symm\n[GOAL]\ncase refine_2.inr.inr\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh✝ : Subfield.topologicalClosure K = ⊤\nψ₁ : ℂ →+* ℂ :=\n  RingHom.comp extψ\n    (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (RingEquiv.subfieldCongr h✝)))\n      (RingEquiv.toRingHom (RingEquiv.symm Subfield.topEquiv)))\nhψ₁ : Continuous ↑ψ₁\nh : ψ₁ = starRingEnd ℂ\n⊢ ψ.toFun = ↑(Subfield.subtype K) ∨ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\nright\n[GOAL]\ncase refine_2.inr.inr.h\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh✝ : Subfield.topologicalClosure K = ⊤\nψ₁ : ℂ →+* ℂ :=\n  RingHom.comp extψ\n    (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (RingEquiv.subfieldCongr h✝)))\n      (RingEquiv.toRingHom (RingEquiv.symm Subfield.topEquiv)))\nhψ₁ : Continuous ↑ψ₁\nh : ψ₁ = starRingEnd ℂ\n⊢ ψ.toFun = ↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)\n[PROOFSTEP]\next1 z\n[GOAL]\ncase refine_2.inr.inr.h.h\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh✝ : Subfield.topologicalClosure K = ⊤\nψ₁ : ℂ →+* ℂ :=\n  RingHom.comp extψ\n    (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (RingEquiv.subfieldCongr h✝)))\n      (RingEquiv.toRingHom (RingEquiv.symm Subfield.topEquiv)))\nhψ₁ : Continuous ↑ψ₁\nh : ψ₁ = starRingEnd ℂ\nz : { x // x ∈ K }\n⊢ OneHom.toFun (↑↑ψ) z = (↑(starRingEnd ℂ) ∘ ↑(Subfield.subtype K)) z\n[PROOFSTEP]\nconvert RingHom.congr_fun h z using 1\n[GOAL]\ncase h.e'_2\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\ndi : DenseInducing ι := UniformInducing.denseInducing ui ?refine_1\nextψ : { x // x ∈ Subfield.topologicalClosure K } →+* ℂ := DenseInducing.extendRingHom ui (_ : DenseRange ι) hc\nhψ : Continuous (DenseInducing.extend (_ : DenseInducing ι) ↑ψ)\nh✝ : Subfield.topologicalClosure K = ⊤\nψ₁ : ℂ →+* ℂ :=\n  RingHom.comp extψ\n    (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (RingEquiv.subfieldCongr h✝)))\n      (RingEquiv.toRingHom (RingEquiv.symm Subfield.topEquiv)))\nhψ₁ : Continuous ↑ψ₁\nh : ψ₁ = starRingEnd ℂ\nz : { x // x ∈ K }\n⊢ OneHom.toFun (↑↑ψ) z = ↑ψ₁ ↑z\n[PROOFSTEP]\nexact (DenseInducing.extend_eq di hc.continuous z).symm\n[GOAL]\ncase refine_1\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\n⊢ DenseRange ι\n[PROOFSTEP]\nlet j : { x // x ∈ closure (id '' {x | (K : Set ℂ) x}) } → (K.topologicalClosure : Set ℂ) := fun x =>\n  ⟨x, by\n    convert x.prop\n    simp only [id.def, Set.image_id']\n    rfl⟩\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\nx : { x // x ∈ closure (id '' {x | ↑K x}) }\n⊢ ↑x ∈ ↑(Subfield.topologicalClosure K)\n[PROOFSTEP]\nconvert x.prop\n[GOAL]\ncase h.e'_5\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\nx : { x // x ∈ closure (id '' {x | ↑K x}) }\n⊢ ↑(Subfield.topologicalClosure K) = closure (id '' {x | ↑K x})\n[PROOFSTEP]\nsimp only [id.def, Set.image_id']\n[GOAL]\ncase h.e'_5\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\nx : { x // x ∈ closure (id '' {x | ↑K x}) }\n⊢ ↑(Subfield.topologicalClosure K) = closure {x | ↑K x}\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine_1\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\nj : { x // x ∈ closure (id '' {x | ↑K x}) } → ↑↑(Subfield.topologicalClosure K) :=\n  fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(Subfield.topologicalClosure K)) }\n⊢ DenseRange ι\n[PROOFSTEP]\nconvert\n  DenseRange.comp (Function.Surjective.denseRange _) (DenseEmbedding.subtype denseEmbedding_id (K : Set ℂ)).dense\n    (by continuity : Continuous j)\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\nj : { x // x ∈ closure (id '' {x | ↑K x}) } → ↑↑(Subfield.topologicalClosure K) :=\n  fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(Subfield.topologicalClosure K)) }\n⊢ Continuous j\n[PROOFSTEP]\ncontinuity\n[GOAL]\ncase refine_1\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\nj : { x // x ∈ closure (id '' {x | ↑K x}) } → ↑↑(Subfield.topologicalClosure K) :=\n  fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(Subfield.topologicalClosure K)) }\n⊢ Function.Surjective j\n[PROOFSTEP]\nrintro ⟨y, hy⟩\n[GOAL]\ncase refine_1.mk\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\nj : { x // x ∈ closure (id '' {x | ↑K x}) } → ↑↑(Subfield.topologicalClosure K) :=\n  fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(Subfield.topologicalClosure K)) }\ny : ℂ\nhy : y ∈ ↑(Subfield.topologicalClosure K)\n⊢ ∃ a, j a = { val := y, property := hy }\n[PROOFSTEP]\nuse⟨y, by\n    convert hy\n    simp only [id.def, Set.image_id']\n    rfl⟩\n[GOAL]\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\nj : { x // x ∈ closure (id '' {x | ↑K x}) } → ↑↑(Subfield.topologicalClosure K) :=\n  fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(Subfield.topologicalClosure K)) }\ny : ℂ\nhy : y ∈ ↑(Subfield.topologicalClosure K)\n⊢ y ∈ closure (id '' {x | ↑K x})\n[PROOFSTEP]\nconvert hy\n[GOAL]\ncase h.e'_5\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\nj : { x // x ∈ closure (id '' {x | ↑K x}) } → ↑↑(Subfield.topologicalClosure K) :=\n  fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(Subfield.topologicalClosure K)) }\ny : ℂ\nhy : y ∈ ↑(Subfield.topologicalClosure K)\n⊢ closure (id '' {x | ↑K x}) = ↑(Subfield.topologicalClosure K)\n[PROOFSTEP]\nsimp only [id.def, Set.image_id']\n[GOAL]\ncase h.e'_5\nK : Subfield ℂ\nψ : { x // x ∈ K } →+* ℂ\nhc : UniformContinuous ↑ψ\nthis✝ : TopologicalDivisionRing ℂ := TopologicalDivisionRing.mk\nthis : TopologicalRing { x // x ∈ Subfield.topologicalClosure K } :=\n  Subring.instTopologicalRing (Subfield.topologicalClosure K).toSubring\nι : { x // x ∈ K } → { x // x ∈ Subfield.topologicalClosure K } :=\n  ↑(Subfield.inclusion (_ : K ≤ Subfield.topologicalClosure K))\nui : UniformInducing ι\nj : { x // x ∈ closure (id '' {x | ↑K x}) } → ↑↑(Subfield.topologicalClosure K) :=\n  fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(Subfield.topologicalClosure K)) }\ny : ℂ\nhy : y ∈ ↑(Subfield.topologicalClosure K)\n⊢ closure {x | ↑K x} = ↑(Subfield.topologicalClosure K)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Topology.Instances.Complex", "llama_tokens": 20428, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6723316860482762, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3701907784209077}}
{"text": "[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nε' : 𝕜\nh : ε ≤ ε'\nhε : IsUniform G ε s t\ns' : Finset α\nhs' : s' ⊆ s\nt' : Finset α\nht' : t' ⊆ t\nhs : ↑(card s) * ε' ≤ ↑(card s')\nht : ↑(card t) * ε' ≤ ↑(card t')\n⊢ |↑(edgeDensity G s' t') - ↑(edgeDensity G s t)| < ε'\n[PROOFSTEP]\nrefine' (hε hs' ht' (le_trans _ hs) (le_trans _ ht)).trans_le h\n[GOAL]\ncase refine'_1\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nε' : 𝕜\nh : ε ≤ ε'\nhε : IsUniform G ε s t\ns' : Finset α\nhs' : s' ⊆ s\nt' : Finset α\nht' : t' ⊆ t\nhs : ↑(card s) * ε' ≤ ↑(card s')\nht : ↑(card t) * ε' ≤ ↑(card t')\n⊢ ↑(card s) * ε ≤ ↑(card s) * ε'\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase refine'_2\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nε' : 𝕜\nh : ε ≤ ε'\nhε : IsUniform G ε s t\ns' : Finset α\nhs' : s' ⊆ s\nt' : Finset α\nht' : t' ⊆ t\nhs : ↑(card s) * ε' ≤ ↑(card s')\nht : ↑(card t) * ε' ≤ ↑(card t')\n⊢ ↑(card t) * ε ≤ ↑(card t) * ε'\n[PROOFSTEP]\ngcongr\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns✝ t✝ : Finset α\na b : α\ns t : Finset α\nh : IsUniform G ε s t\nt' : Finset α\nht' : t' ⊆ t\ns' : Finset α\nhs' : s' ⊆ s\nht : ↑(card t) * ε ≤ ↑(card t')\nhs : ↑(card s) * ε ≤ ↑(card s')\n⊢ |↑(edgeDensity G t' s') - ↑(edgeDensity G t s)| < ε\n[PROOFSTEP]\nrw [edgeDensity_comm _ t', edgeDensity_comm _ t]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns✝ t✝ : Finset α\na b : α\ns t : Finset α\nh : IsUniform G ε s t\nt' : Finset α\nht' : t' ⊆ t\ns' : Finset α\nhs' : s' ⊆ s\nht : ↑(card t) * ε ≤ ↑(card t')\nhs : ↑(card s) * ε ≤ ↑(card s')\n⊢ |↑(edgeDensity G s' t') - ↑(edgeDensity G s t)| < ε\n[PROOFSTEP]\nexact h hs' ht' hs ht\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nhε : 0 < ε\n⊢ IsUniform G ε {a} {b}\n[PROOFSTEP]\nintro s' hs' t' ht' hs ht\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nhε : 0 < ε\ns' : Finset α\nhs' : s' ⊆ {a}\nt' : Finset α\nht' : t' ⊆ {b}\nhs : ↑(card {a}) * ε ≤ ↑(card s')\nht : ↑(card {b}) * ε ≤ ↑(card t')\n⊢ |↑(edgeDensity G s' t') - ↑(edgeDensity G {a} {b})| < ε\n[PROOFSTEP]\nrw [card_singleton, Nat.cast_one, one_mul] at hs ht \n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nhε : 0 < ε\ns' : Finset α\nhs' : s' ⊆ {a}\nt' : Finset α\nht' : t' ⊆ {b}\nhs : ε ≤ ↑(card s')\nht : ε ≤ ↑(card t')\n⊢ |↑(edgeDensity G s' t') - ↑(edgeDensity G {a} {b})| < ε\n[PROOFSTEP]\nobtain rfl | rfl := Finset.subset_singleton_iff.1 hs'\n[GOAL]\ncase inl\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nhε : 0 < ε\nt' : Finset α\nht' : t' ⊆ {b}\nht : ε ≤ ↑(card t')\nhs' : ∅ ⊆ {a}\nhs : ε ≤ ↑(card ∅)\n⊢ |↑(edgeDensity G ∅ t') - ↑(edgeDensity G {a} {b})| < ε\n[PROOFSTEP]\nreplace hs : ε ≤ 0 := by simpa using hs\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nhε : 0 < ε\nt' : Finset α\nht' : t' ⊆ {b}\nht : ε ≤ ↑(card t')\nhs' : ∅ ⊆ {a}\nhs : ε ≤ ↑(card ∅)\n⊢ ε ≤ 0\n[PROOFSTEP]\nsimpa using hs\n[GOAL]\ncase inl\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nhε : 0 < ε\nt' : Finset α\nht' : t' ⊆ {b}\nht : ε ≤ ↑(card t')\nhs' : ∅ ⊆ {a}\nhs : ε ≤ 0\n⊢ |↑(edgeDensity G ∅ t') - ↑(edgeDensity G {a} {b})| < ε\n[PROOFSTEP]\nexact (hε.not_le hs).elim\n[GOAL]\ncase inr\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nhε : 0 < ε\nt' : Finset α\nht' : t' ⊆ {b}\nht : ε ≤ ↑(card t')\nhs' : {a} ⊆ {a}\nhs : ε ≤ ↑(card {a})\n⊢ |↑(edgeDensity G {a} t') - ↑(edgeDensity G {a} {b})| < ε\n[PROOFSTEP]\nobtain rfl | rfl := Finset.subset_singleton_iff.1 ht'\n[GOAL]\ncase inr.inl\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nhε : 0 < ε\nhs' : {a} ⊆ {a}\nhs : ε ≤ ↑(card {a})\nht' : ∅ ⊆ {b}\nht : ε ≤ ↑(card ∅)\n⊢ |↑(edgeDensity G {a} ∅) - ↑(edgeDensity G {a} {b})| < ε\n[PROOFSTEP]\nreplace ht : ε ≤ 0 := by simpa using ht\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nhε : 0 < ε\nhs' : {a} ⊆ {a}\nhs : ε ≤ ↑(card {a})\nht' : ∅ ⊆ {b}\nht : ε ≤ ↑(card ∅)\n⊢ ε ≤ 0\n[PROOFSTEP]\nsimpa using ht\n[GOAL]\ncase inr.inl\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nhε : 0 < ε\nhs' : {a} ⊆ {a}\nhs : ε ≤ ↑(card {a})\nht' : ∅ ⊆ {b}\nht : ε ≤ 0\n⊢ |↑(edgeDensity G {a} ∅) - ↑(edgeDensity G {a} {b})| < ε\n[PROOFSTEP]\nexact (hε.not_le ht).elim\n[GOAL]\ncase inr.inr\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nhε : 0 < ε\nhs' : {a} ⊆ {a}\nhs : ε ≤ ↑(card {a})\nht' : {b} ⊆ {b}\nht : ε ≤ ↑(card {b})\n⊢ |↑(edgeDensity G {a} {b}) - ↑(edgeDensity G {a} {b})| < ε\n[PROOFSTEP]\nrwa [sub_self, abs_zero]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : IsUniform G 0 s t\n⊢ ↑(card s) * 0 ≤ ↑(card ∅)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : IsUniform G 0 s t\n⊢ ↑(card t) * 0 ≤ ↑(card ∅)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\n⊢ IsUniform G 1 s t\n[PROOFSTEP]\nintro s' hs' t' ht' hs ht\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\ns' : Finset α\nhs' : s' ⊆ s\nt' : Finset α\nht' : t' ⊆ t\nhs : ↑(card s) * 1 ≤ ↑(card s')\nht : ↑(card t) * 1 ≤ ↑(card t')\n⊢ |↑(edgeDensity G s' t') - ↑(edgeDensity G s t)| < 1\n[PROOFSTEP]\nrw [mul_one] at hs ht \n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\ns' : Finset α\nhs' : s' ⊆ s\nt' : Finset α\nht' : t' ⊆ t\nhs : ↑(card s) ≤ ↑(card s')\nht : ↑(card t) ≤ ↑(card t')\n⊢ |↑(edgeDensity G s' t') - ↑(edgeDensity G s t)| < 1\n[PROOFSTEP]\nrw [eq_of_subset_of_card_le hs' (Nat.cast_le.1 hs), eq_of_subset_of_card_le ht' (Nat.cast_le.1 ht), sub_self, abs_zero]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\ns' : Finset α\nhs' : s' ⊆ s\nt' : Finset α\nht' : t' ⊆ t\nhs : ↑(card s) ≤ ↑(card s')\nht : ↑(card t) ≤ ↑(card t')\n⊢ 0 < 1\n[PROOFSTEP]\nexact zero_lt_one\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\n⊢ ¬IsUniform G ε s t ↔\n    ∃ s',\n      s' ⊆ s ∧\n        ∃ t',\n          t' ⊆ t ∧\n            ↑(card s) * ε ≤ ↑(card s') ∧ ↑(card t) * ε ≤ ↑(card t') ∧ ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|\n[PROOFSTEP]\nunfold IsUniform\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\n⊢ (¬∀ ⦃s' : Finset α⦄,\n        s' ⊆ s →\n          ∀ ⦃t' : Finset α⦄,\n            t' ⊆ t →\n              ↑(card s) * ε ≤ ↑(card s') →\n                ↑(card t) * ε ≤ ↑(card t') → |↑(edgeDensity G s' t') - ↑(edgeDensity G s t)| < ε) ↔\n    ∃ s',\n      s' ⊆ s ∧\n        ∃ t',\n          t' ⊆ t ∧\n            ↑(card s) * ε ≤ ↑(card s') ∧ ↑(card t) * ε ≤ ↑(card t') ∧ ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|\n[PROOFSTEP]\nsimp only [not_forall, not_lt, exists_prop, exists_and_left, Rat.cast_abs, Rat.cast_sub]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ (nonuniformWitnesses G ε s t).fst ⊆ s\n[PROOFSTEP]\nrw [nonuniformWitnesses, dif_pos h]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ (Exists.choose\n          (_ :\n            ∃ s',\n              s' ⊆ s ∧\n                ∃ t',\n                  t' ⊆ t ∧\n                    ↑(card s) * ε ≤ ↑(card s') ∧\n                      ↑(card t) * ε ≤ ↑(card t') ∧ ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|),\n        Exists.choose\n          (_ :\n            ∃ t',\n              t' ⊆ t ∧\n                ↑(card s) * ε ≤\n                    ↑(card\n                        (Exists.choose\n                          (_ :\n                            ∃ s',\n                              s' ⊆ s ∧\n                                ∃ t',\n                                  t' ⊆ t ∧\n                                    ↑(card s) * ε ≤ ↑(card s') ∧\n                                      ↑(card t) * ε ≤ ↑(card t') ∧ ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|))) ∧\n                  ↑(card t) * ε ≤ ↑(card t') ∧\n                    ε ≤\n                      ↑|edgeDensity G\n                              (Exists.choose\n                                (_ :\n                                  ∃ s',\n                                    s' ⊆ s ∧\n                                      ∃ t',\n                                        t' ⊆ t ∧\n                                          ↑(card s) * ε ≤ ↑(card s') ∧\n                                            ↑(card t) * ε ≤ ↑(card t') ∧\n                                              ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|))\n                              t' -\n                            edgeDensity G s t|)).fst ⊆\n    s\n[PROOFSTEP]\nexact (not_isUniform_iff.1 h).choose_spec.1\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ ↑(card s) * ε ≤ ↑(card (nonuniformWitnesses G ε s t).fst)\n[PROOFSTEP]\nrw [nonuniformWitnesses, dif_pos h]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ ↑(card s) * ε ≤\n    ↑(card\n        (Exists.choose\n              (_ :\n                ∃ s',\n                  s' ⊆ s ∧\n                    ∃ t',\n                      t' ⊆ t ∧\n                        ↑(card s) * ε ≤ ↑(card s') ∧\n                          ↑(card t) * ε ≤ ↑(card t') ∧ ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|),\n            Exists.choose\n              (_ :\n                ∃ t',\n                  t' ⊆ t ∧\n                    ↑(card s) * ε ≤\n                        ↑(card\n                            (Exists.choose\n                              (_ :\n                                ∃ s',\n                                  s' ⊆ s ∧\n                                    ∃ t',\n                                      t' ⊆ t ∧\n                                        ↑(card s) * ε ≤ ↑(card s') ∧\n                                          ↑(card t) * ε ≤ ↑(card t') ∧\n                                            ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|))) ∧\n                      ↑(card t) * ε ≤ ↑(card t') ∧\n                        ε ≤\n                          ↑|edgeDensity G\n                                  (Exists.choose\n                                    (_ :\n                                      ∃ s',\n                                        s' ⊆ s ∧\n                                          ∃ t',\n                                            t' ⊆ t ∧\n                                              ↑(card s) * ε ≤ ↑(card s') ∧\n                                                ↑(card t) * ε ≤ ↑(card t') ∧\n                                                  ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|))\n                                  t' -\n                                edgeDensity G s t|)).fst)\n[PROOFSTEP]\nexact (not_isUniform_iff.1 h).choose_spec.2.choose_spec.2.1\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ (nonuniformWitnesses G ε s t).snd ⊆ t\n[PROOFSTEP]\nrw [nonuniformWitnesses, dif_pos h]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ (Exists.choose\n          (_ :\n            ∃ s',\n              s' ⊆ s ∧\n                ∃ t',\n                  t' ⊆ t ∧\n                    ↑(card s) * ε ≤ ↑(card s') ∧\n                      ↑(card t) * ε ≤ ↑(card t') ∧ ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|),\n        Exists.choose\n          (_ :\n            ∃ t',\n              t' ⊆ t ∧\n                ↑(card s) * ε ≤\n                    ↑(card\n                        (Exists.choose\n                          (_ :\n                            ∃ s',\n                              s' ⊆ s ∧\n                                ∃ t',\n                                  t' ⊆ t ∧\n                                    ↑(card s) * ε ≤ ↑(card s') ∧\n                                      ↑(card t) * ε ≤ ↑(card t') ∧ ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|))) ∧\n                  ↑(card t) * ε ≤ ↑(card t') ∧\n                    ε ≤\n                      ↑|edgeDensity G\n                              (Exists.choose\n                                (_ :\n                                  ∃ s',\n                                    s' ⊆ s ∧\n                                      ∃ t',\n                                        t' ⊆ t ∧\n                                          ↑(card s) * ε ≤ ↑(card s') ∧\n                                            ↑(card t) * ε ≤ ↑(card t') ∧\n                                              ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|))\n                              t' -\n                            edgeDensity G s t|)).snd ⊆\n    t\n[PROOFSTEP]\nexact (not_isUniform_iff.1 h).choose_spec.2.choose_spec.1\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ ↑(card t) * ε ≤ ↑(card (nonuniformWitnesses G ε s t).snd)\n[PROOFSTEP]\nrw [nonuniformWitnesses, dif_pos h]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ ↑(card t) * ε ≤\n    ↑(card\n        (Exists.choose\n              (_ :\n                ∃ s',\n                  s' ⊆ s ∧\n                    ∃ t',\n                      t' ⊆ t ∧\n                        ↑(card s) * ε ≤ ↑(card s') ∧\n                          ↑(card t) * ε ≤ ↑(card t') ∧ ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|),\n            Exists.choose\n              (_ :\n                ∃ t',\n                  t' ⊆ t ∧\n                    ↑(card s) * ε ≤\n                        ↑(card\n                            (Exists.choose\n                              (_ :\n                                ∃ s',\n                                  s' ⊆ s ∧\n                                    ∃ t',\n                                      t' ⊆ t ∧\n                                        ↑(card s) * ε ≤ ↑(card s') ∧\n                                          ↑(card t) * ε ≤ ↑(card t') ∧\n                                            ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|))) ∧\n                      ↑(card t) * ε ≤ ↑(card t') ∧\n                        ε ≤\n                          ↑|edgeDensity G\n                                  (Exists.choose\n                                    (_ :\n                                      ∃ s',\n                                        s' ⊆ s ∧\n                                          ∃ t',\n                                            t' ⊆ t ∧\n                                              ↑(card s) * ε ≤ ↑(card s') ∧\n                                                ↑(card t) * ε ≤ ↑(card t') ∧\n                                                  ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|))\n                                  t' -\n                                edgeDensity G s t|)).snd)\n[PROOFSTEP]\nexact (not_isUniform_iff.1 h).choose_spec.2.choose_spec.2.2.1\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ ε ≤ ↑|edgeDensity G (nonuniformWitnesses G ε s t).fst (nonuniformWitnesses G ε s t).snd - edgeDensity G s t|\n[PROOFSTEP]\nrw [nonuniformWitnesses, dif_pos h]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ ε ≤\n    ↑|edgeDensity G\n            (Exists.choose\n                  (_ :\n                    ∃ s',\n                      s' ⊆ s ∧\n                        ∃ t',\n                          t' ⊆ t ∧\n                            ↑(card s) * ε ≤ ↑(card s') ∧\n                              ↑(card t) * ε ≤ ↑(card t') ∧ ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|),\n                Exists.choose\n                  (_ :\n                    ∃ t',\n                      t' ⊆ t ∧\n                        ↑(card s) * ε ≤\n                            ↑(card\n                                (Exists.choose\n                                  (_ :\n                                    ∃ s',\n                                      s' ⊆ s ∧\n                                        ∃ t',\n                                          t' ⊆ t ∧\n                                            ↑(card s) * ε ≤ ↑(card s') ∧\n                                              ↑(card t) * ε ≤ ↑(card t') ∧\n                                                ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|))) ∧\n                          ↑(card t) * ε ≤ ↑(card t') ∧\n                            ε ≤\n                              ↑|edgeDensity G\n                                      (Exists.choose\n                                        (_ :\n                                          ∃ s',\n                                            s' ⊆ s ∧\n                                              ∃ t',\n                                                t' ⊆ t ∧\n                                                  ↑(card s) * ε ≤ ↑(card s') ∧\n                                                    ↑(card t) * ε ≤ ↑(card t') ∧\n                                                      ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|))\n                                      t' -\n                                    edgeDensity G s t|)).fst\n            (Exists.choose\n                  (_ :\n                    ∃ s',\n                      s' ⊆ s ∧\n                        ∃ t',\n                          t' ⊆ t ∧\n                            ↑(card s) * ε ≤ ↑(card s') ∧\n                              ↑(card t) * ε ≤ ↑(card t') ∧ ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|),\n                Exists.choose\n                  (_ :\n                    ∃ t',\n                      t' ⊆ t ∧\n                        ↑(card s) * ε ≤\n                            ↑(card\n                                (Exists.choose\n                                  (_ :\n                                    ∃ s',\n                                      s' ⊆ s ∧\n                                        ∃ t',\n                                          t' ⊆ t ∧\n                                            ↑(card s) * ε ≤ ↑(card s') ∧\n                                              ↑(card t) * ε ≤ ↑(card t') ∧\n                                                ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|))) ∧\n                          ↑(card t) * ε ≤ ↑(card t') ∧\n                            ε ≤\n                              ↑|edgeDensity G\n                                      (Exists.choose\n                                        (_ :\n                                          ∃ s',\n                                            s' ⊆ s ∧\n                                              ∃ t',\n                                                t' ⊆ t ∧\n                                                  ↑(card s) * ε ≤ ↑(card s') ∧\n                                                    ↑(card t) * ε ≤ ↑(card t') ∧\n                                                      ε ≤ ↑|edgeDensity G s' t' - edgeDensity G s t|))\n                                      t' -\n                                    edgeDensity G s t|)).snd -\n          edgeDensity G s t|\n[PROOFSTEP]\nexact (not_isUniform_iff.1 h).choose_spec.2.choose_spec.2.2.2\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ nonuniformWitness G ε s t ⊆ s\n[PROOFSTEP]\nunfold nonuniformWitness\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ (if WellOrderingRel s t then (nonuniformWitnesses G ε s t).fst else (nonuniformWitnesses G ε t s).snd) ⊆ s\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\nh✝ : WellOrderingRel s t\n⊢ (nonuniformWitnesses G ε s t).fst ⊆ s\n[PROOFSTEP]\nexact G.left_nonuniformWitnesses_subset h\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\nh✝ : ¬WellOrderingRel s t\n⊢ (nonuniformWitnesses G ε t s).snd ⊆ s\n[PROOFSTEP]\nexact G.right_nonuniformWitnesses_subset fun i => h i.symm\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ ↑(card s) * ε ≤ ↑(card (nonuniformWitness G ε s t))\n[PROOFSTEP]\nunfold nonuniformWitness\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\n⊢ ↑(card s) * ε ≤\n    ↑(card (if WellOrderingRel s t then (nonuniformWitnesses G ε s t).fst else (nonuniformWitnesses G ε t s).snd))\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\nh✝ : WellOrderingRel s t\n⊢ ↑(card s) * ε ≤ ↑(card (nonuniformWitnesses G ε s t).fst)\n[PROOFSTEP]\nexact G.left_nonuniformWitnesses_card h\n[GOAL]\ncase neg\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh : ¬IsUniform G ε s t\nh✝ : ¬WellOrderingRel s t\n⊢ ↑(card s) * ε ≤ ↑(card (nonuniformWitnesses G ε t s).snd)\n[PROOFSTEP]\nexact G.right_nonuniformWitnesses_card fun i => h i.symm\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh₁ : s ≠ t\nh₂ : ¬IsUniform G ε s t\n⊢ ε ≤ ↑|edgeDensity G (nonuniformWitness G ε s t) (nonuniformWitness G ε t s) - edgeDensity G s t|\n[PROOFSTEP]\nunfold nonuniformWitness\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh₁ : s ≠ t\nh₂ : ¬IsUniform G ε s t\n⊢ ε ≤\n    ↑|edgeDensity G\n            (if WellOrderingRel s t then (nonuniformWitnesses G ε s t).fst else (nonuniformWitnesses G ε t s).snd)\n            (if WellOrderingRel t s then (nonuniformWitnesses G ε t s).fst else (nonuniformWitnesses G ε s t).snd) -\n          edgeDensity G s t|\n[PROOFSTEP]\nrcases trichotomous_of WellOrderingRel s t with (lt | rfl | gt)\n[GOAL]\ncase inl\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh₁ : s ≠ t\nh₂ : ¬IsUniform G ε s t\nlt : WellOrderingRel s t\n⊢ ε ≤\n    ↑|edgeDensity G\n            (if WellOrderingRel s t then (nonuniformWitnesses G ε s t).fst else (nonuniformWitnesses G ε t s).snd)\n            (if WellOrderingRel t s then (nonuniformWitnesses G ε t s).fst else (nonuniformWitnesses G ε s t).snd) -\n          edgeDensity G s t|\n[PROOFSTEP]\nrw [if_pos lt, if_neg (asymm lt)]\n[GOAL]\ncase inl\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh₁ : s ≠ t\nh₂ : ¬IsUniform G ε s t\nlt : WellOrderingRel s t\n⊢ ε ≤ ↑|edgeDensity G (nonuniformWitnesses G ε s t).fst (nonuniformWitnesses G ε s t).snd - edgeDensity G s t|\n[PROOFSTEP]\nexact G.nonuniformWitnesses_spec h₂\n[GOAL]\ncase inr.inl\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns : Finset α\na b : α\nh₁ : s ≠ s\nh₂ : ¬IsUniform G ε s s\n⊢ ε ≤\n    ↑|edgeDensity G\n            (if WellOrderingRel s s then (nonuniformWitnesses G ε s s).fst else (nonuniformWitnesses G ε s s).snd)\n            (if WellOrderingRel s s then (nonuniformWitnesses G ε s s).fst else (nonuniformWitnesses G ε s s).snd) -\n          edgeDensity G s s|\n[PROOFSTEP]\ncases h₁ rfl\n[GOAL]\ncase inr.inr\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh₁ : s ≠ t\nh₂ : ¬IsUniform G ε s t\ngt : WellOrderingRel t s\n⊢ ε ≤\n    ↑|edgeDensity G\n            (if WellOrderingRel s t then (nonuniformWitnesses G ε s t).fst else (nonuniformWitnesses G ε t s).snd)\n            (if WellOrderingRel t s then (nonuniformWitnesses G ε t s).fst else (nonuniformWitnesses G ε s t).snd) -\n          edgeDensity G s t|\n[PROOFSTEP]\nrw [if_neg (asymm gt), if_pos gt, edgeDensity_comm, edgeDensity_comm _ s]\n[GOAL]\ncase inr.inr\nα : Type u_1\n𝕜 : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\ns t : Finset α\na b : α\nh₁ : s ≠ t\nh₂ : ¬IsUniform G ε s t\ngt : WellOrderingRel t s\n⊢ ε ≤ ↑|edgeDensity G (nonuniformWitnesses G ε t s).fst (nonuniformWitnesses G ε t s).snd - edgeDensity G t s|\n[PROOFSTEP]\napply G.nonuniformWitnesses_spec fun i => h₂ i.symm\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε✝ : 𝕜\nu v : Finset α\nε : 𝕜\n⊢ (u, v) ∈ nonUniforms P G ε ↔ u ∈ P.parts ∧ v ∈ P.parts ∧ u ≠ v ∧ ¬SimpleGraph.IsUniform G ε u v\n[PROOFSTEP]\nrw [nonUniforms, mem_filter, mem_offDiag, and_assoc, and_assoc]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\nhε : 0 < ε\n⊢ nonUniforms ⊥ G ε = ∅\n[PROOFSTEP]\nrw [eq_empty_iff_forall_not_mem]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\nhε : 0 < ε\n⊢ ∀ (x : Finset α × Finset α), ¬x ∈ nonUniforms ⊥ G ε\n[PROOFSTEP]\nrintro ⟨u, v⟩\n[GOAL]\ncase mk\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\nhε : 0 < ε\nu v : Finset α\n⊢ ¬(u, v) ∈ nonUniforms ⊥ G ε\n[PROOFSTEP]\nsimp only [Finpartition.mk_mem_nonUniforms_iff, Finpartition.parts_bot, mem_map, not_and, Classical.not_not, exists_imp]\n[GOAL]\ncase mk\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\nhε : 0 < ε\nu v : Finset α\n⊢ ∀ (x : α),\n    x ∈ A ∧ ↑{ toFun := singleton, inj' := (_ : Function.Injective singleton) } x = u →\n      ∀ (x : α),\n        x ∈ A ∧ ↑{ toFun := singleton, inj' := (_ : Function.Injective singleton) } x = v →\n          u ≠ v → SimpleGraph.IsUniform G ε u v\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\nhε : 0 < ε\nu v : Finset α\n⊢ ∀ (x : α), x ∈ A ∧ {x} = u → ∀ (x : α), x ∈ A ∧ {x} = v → ¬u = v → SimpleGraph.IsUniform G ε u v\n[PROOFSTEP]\nrintro x ⟨_, xu⟩ y ⟨_, yv⟩ _\n[GOAL]\ncase mk.intro.intro\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\nhε : 0 < ε\nu v : Finset α\nx : α\nleft✝¹ : x ∈ A\nxu : {x} = u\ny : α\nleft✝ : y ∈ A\nyv : {y} = v\na✝ : ¬u = v\n⊢ SimpleGraph.IsUniform G ε u v\n[PROOFSTEP]\nrw [← xu, ← yv]\n[GOAL]\ncase mk.intro.intro\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\nhε : 0 < ε\nu v : Finset α\nx : α\nleft✝¹ : x ∈ A\nxu : {x} = u\ny : α\nleft✝ : y ∈ A\nyv : {y} = v\na✝ : ¬u = v\n⊢ SimpleGraph.IsUniform G ε {x} {y}\n[PROOFSTEP]\nexact G.isUniform_singleton hε\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\nhε : 0 < ε\n⊢ IsUniform ⊥ G ε\n[PROOFSTEP]\nrw [Finpartition.IsUniform, Finpartition.card_bot, nonUniforms_bot _ hε, Finset.card_empty, Nat.cast_zero]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\nhε : 0 < ε\n⊢ 0 ≤ ↑(card A * (card A - 1)) * ε\n[PROOFSTEP]\nexact mul_nonneg (Nat.cast_nonneg _) hε.le\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\n⊢ IsUniform P G 1\n[PROOFSTEP]\nrw [IsUniform, mul_one, Nat.cast_le]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\n⊢ card (nonUniforms P G 1) ≤ card P.parts * (card P.parts - 1)\n[PROOFSTEP]\nrefine' (card_filter_le _ (fun uv => ¬SimpleGraph.IsUniform G 1 (Prod.fst uv) (Prod.snd uv))).trans _\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\n⊢ card (offDiag P.parts) ≤ card P.parts * (card P.parts - 1)\n[PROOFSTEP]\nrw [offDiag_card, Nat.mul_sub_left_distrib, mul_one]\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε✝ ε ε' : 𝕜\nhP : IsUniform P G ε\nh : ε ≤ ε'\n⊢ ↑(card P.parts * (card P.parts - 1)) * ε ≤ ↑(card P.parts * (card P.parts - 1)) * ε'\n[PROOFSTEP]\ngcongr\n[GOAL]\nα : Type u_1\n𝕜 : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nA : Finset α\nP : Finpartition A\nG : SimpleGraph α\ninst✝ : DecidableRel G.Adj\nε : 𝕜\nhP : P.parts = ∅\n⊢ IsUniform P G ε\n[PROOFSTEP]\nsimp [IsUniform, hP, nonUniforms]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SimpleGraph.Regularity.Uniform", "llama_tokens": 13589, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.640635854839898, "lm_q2_score": 0.5774953651858118, "lm_q1q2_score": 0.3699642369418916}}
{"text": "[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : FiniteDimensional k V\np : ι → P\nhi : AffineIndependent k p\n⊢ _root_.Finite ι\n[PROOFSTEP]\nnontriviality ι\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : FiniteDimensional k V\np : ι → P\nhi : AffineIndependent k p\n✝ : Nontrivial ι\n⊢ _root_.Finite ι\n[PROOFSTEP]\ninhabit ι\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : FiniteDimensional k V\np : ι → P\nhi : AffineIndependent k p\n✝ : Nontrivial ι\ninhabited_h : Inhabited ι\n⊢ _root_.Finite ι\n[PROOFSTEP]\nrw [affineIndependent_iff_linearIndependent_vsub k p default] at hi \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : FiniteDimensional k V\np : ι → P\n✝ : Nontrivial ι\ninhabited_h : Inhabited ι\nhi : LinearIndependent k fun i => p ↑i -ᵥ p default\n⊢ _root_.Finite ι\n[PROOFSTEP]\nletI : IsNoetherian k V := IsNoetherian.iff_fg.2 inferInstance\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : FiniteDimensional k V\np : ι → P\n✝ : Nontrivial ι\ninhabited_h : Inhabited ι\nhi : LinearIndependent k fun i => p ↑i -ᵥ p default\nthis : IsNoetherian k V := Iff.mpr IsNoetherian.iff_fg inferInstance\n⊢ _root_.Finite ι\n[PROOFSTEP]\nexact (Set.finite_singleton default).finite_of_compl (Set.finite_coe_iff.1 hi.finite_of_isNoetherian)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } = n\n[PROOFSTEP]\nclassical\nhave hi' := hi.range.mono (Set.image_subset_range p ↑s)\nhave hc' : (s.image p).card = n + 1 := by rwa [s.card_image_of_injective hi.injective]\nhave hn : (s.image p).Nonempty := by simp [hc', ← Finset.card_pos]\nrcases hn with ⟨p₁, hp₁⟩\nhave hp₁' : p₁ ∈ p '' s := by simpa using hp₁\nrw [affineIndependent_set_iff_linearIndependent_vsub k hp₁', ← Finset.coe_singleton, ← Finset.coe_image, ←\n  Finset.coe_sdiff, Finset.sdiff_singleton_eq_erase, ← Finset.coe_image] at hi' \nhave hc : (Finset.image (fun p : P => p -ᵥ p₁) ((Finset.image p s).erase p₁)).card = n :=\n  by\n  rw [Finset.card_image_of_injective _ (vsub_left_injective _), Finset.card_erase_of_mem hp₁]\n  exact Nat.pred_eq_of_eq_succ hc'\nrwa [vectorSpan_eq_span_vsub_finset_right_ne k hp₁, finrank_span_finset_eq_card, hc]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } = n\n[PROOFSTEP]\nhave hi' := hi.range.mono (Set.image_subset_range p ↑s)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\nhi' : AffineIndependent k fun x => ↑x\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } = n\n[PROOFSTEP]\nhave hc' : (s.image p).card = n + 1 := by rwa [s.card_image_of_injective hi.injective]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\nhi' : AffineIndependent k fun x => ↑x\n⊢ Finset.card (Finset.image p s) = n + 1\n[PROOFSTEP]\nrwa [s.card_image_of_injective hi.injective]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\nhi' : AffineIndependent k fun x => ↑x\nhc' : Finset.card (Finset.image p s) = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } = n\n[PROOFSTEP]\nhave hn : (s.image p).Nonempty := by simp [hc', ← Finset.card_pos]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\nhi' : AffineIndependent k fun x => ↑x\nhc' : Finset.card (Finset.image p s) = n + 1\n⊢ Finset.Nonempty (Finset.image p s)\n[PROOFSTEP]\nsimp [hc', ← Finset.card_pos]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\nhi' : AffineIndependent k fun x => ↑x\nhc' : Finset.card (Finset.image p s) = n + 1\nhn : Finset.Nonempty (Finset.image p s)\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } = n\n[PROOFSTEP]\nrcases hn with ⟨p₁, hp₁⟩\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\nhi' : AffineIndependent k fun x => ↑x\nhc' : Finset.card (Finset.image p s) = n + 1\np₁ : P\nhp₁ : p₁ ∈ Finset.image p s\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } = n\n[PROOFSTEP]\nhave hp₁' : p₁ ∈ p '' s := by simpa using hp₁\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\nhi' : AffineIndependent k fun x => ↑x\nhc' : Finset.card (Finset.image p s) = n + 1\np₁ : P\nhp₁ : p₁ ∈ Finset.image p s\n⊢ p₁ ∈ p '' ↑s\n[PROOFSTEP]\nsimpa using hp₁\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\nhi' : AffineIndependent k fun x => ↑x\nhc' : Finset.card (Finset.image p s) = n + 1\np₁ : P\nhp₁ : p₁ ∈ Finset.image p s\nhp₁' : p₁ ∈ p '' ↑s\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } = n\n[PROOFSTEP]\nrw [affineIndependent_set_iff_linearIndependent_vsub k hp₁', ← Finset.coe_singleton, ← Finset.coe_image, ←\n  Finset.coe_sdiff, Finset.sdiff_singleton_eq_erase, ← Finset.coe_image] at hi' \n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\nhc' : Finset.card (Finset.image p s) = n + 1\np₁ : P\nhi'✝² : LinearIndependent k fun v => ↑v\nhi'✝¹ : LinearIndependent k fun v => ↑v\nhi'✝ : LinearIndependent k fun v => ↑v\nhi' : LinearIndependent k fun v => ↑v\nhp₁ : p₁ ∈ Finset.image p s\nhp₁' : p₁ ∈ p '' ↑s\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } = n\n[PROOFSTEP]\nhave hc : (Finset.image (fun p : P => p -ᵥ p₁) ((Finset.image p s).erase p₁)).card = n :=\n  by\n  rw [Finset.card_image_of_injective _ (vsub_left_injective _), Finset.card_erase_of_mem hp₁]\n  exact Nat.pred_eq_of_eq_succ hc'\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\nhc' : Finset.card (Finset.image p s) = n + 1\np₁ : P\nhi'✝² : LinearIndependent k fun v => ↑v\nhi'✝¹ : LinearIndependent k fun v => ↑v\nhi'✝ : LinearIndependent k fun v => ↑v\nhi' : LinearIndependent k fun v => ↑v\nhp₁ : p₁ ∈ Finset.image p s\nhp₁' : p₁ ∈ p '' ↑s\n⊢ Finset.card (Finset.image (fun p => p -ᵥ p₁) (Finset.erase (Finset.image p s) p₁)) = n\n[PROOFSTEP]\nrw [Finset.card_image_of_injective _ (vsub_left_injective _), Finset.card_erase_of_mem hp₁]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\nhc' : Finset.card (Finset.image p s) = n + 1\np₁ : P\nhi'✝² : LinearIndependent k fun v => ↑v\nhi'✝¹ : LinearIndependent k fun v => ↑v\nhi'✝ : LinearIndependent k fun v => ↑v\nhi' : LinearIndependent k fun v => ↑v\nhp₁ : p₁ ∈ Finset.image p s\nhp₁' : p₁ ∈ p '' ↑s\n⊢ Finset.card (Finset.image p s) - 1 = n\n[PROOFSTEP]\nexact Nat.pred_eq_of_eq_succ hc'\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nn : ℕ\nhc✝ : Finset.card s = n + 1\nhc' : Finset.card (Finset.image p s) = n + 1\np₁ : P\nhi'✝² : LinearIndependent k fun v => ↑v\nhi'✝¹ : LinearIndependent k fun v => ↑v\nhi'✝ : LinearIndependent k fun v => ↑v\nhi' : LinearIndependent k fun v => ↑v\nhp₁ : p₁ ∈ Finset.image p s\nhp₁' : p₁ ∈ p '' ↑s\nhc : Finset.card (Finset.image (fun p => p -ᵥ p₁) (Finset.erase (Finset.image p s) p₁)) = n\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } = n\n[PROOFSTEP]\nrwa [vectorSpan_eq_span_vsub_finset_right_ne k hp₁, finrank_span_finset_eq_card, hc]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nn : ℕ\nhc : Fintype.card ι = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k (Set.range p) } = n\n[PROOFSTEP]\nclassical\nrw [← Finset.card_univ] at hc \nrw [← Set.image_univ, ← Finset.coe_univ, ← Finset.coe_image]\nexact hi.finrank_vectorSpan_image_finset hc\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nn : ℕ\nhc : Fintype.card ι = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k (Set.range p) } = n\n[PROOFSTEP]\nrw [← Finset.card_univ] at hc \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nn : ℕ\nhc : Finset.card Finset.univ = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k (Set.range p) } = n\n[PROOFSTEP]\nrw [← Set.image_univ, ← Finset.coe_univ, ← Finset.coe_image]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nn : ℕ\nhc : Finset.card Finset.univ = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p Finset.univ) } = n\n[PROOFSTEP]\nexact hi.finrank_vectorSpan_image_finset hc\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } ≤ n\n[PROOFSTEP]\nclassical\nhave hn : (s.image p).Nonempty :=\n  by\n  rw [Finset.Nonempty.image_iff, ← Finset.card_pos, hc]\n  apply Nat.succ_pos\nrcases hn with ⟨p₁, hp₁⟩\nrw [vectorSpan_eq_span_vsub_finset_right_ne k hp₁]\nrefine' le_trans (finrank_span_finset_le_card (((s.image p).erase p₁).image fun p => p -ᵥ p₁)) _\nrw [Finset.card_image_of_injective _ (vsub_left_injective p₁), Finset.card_erase_of_mem hp₁, tsub_le_iff_right, ← hc]\napply Finset.card_image_le\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } ≤ n\n[PROOFSTEP]\nhave hn : (s.image p).Nonempty :=\n  by\n  rw [Finset.Nonempty.image_iff, ← Finset.card_pos, hc]\n  apply Nat.succ_pos\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\n⊢ Finset.Nonempty (Finset.image p s)\n[PROOFSTEP]\nrw [Finset.Nonempty.image_iff, ← Finset.card_pos, hc]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\n⊢ 0 < n + 1\n[PROOFSTEP]\napply Nat.succ_pos\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\nhn : Finset.Nonempty (Finset.image p s)\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } ≤ n\n[PROOFSTEP]\nrcases hn with ⟨p₁, hp₁⟩\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\np₁ : P\nhp₁ : p₁ ∈ Finset.image p s\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p s) } ≤ n\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_finset_right_ne k hp₁]\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\np₁ : P\nhp₁ : p₁ ∈ Finset.image p s\n⊢ finrank k { x // x ∈ Submodule.span k ↑(Finset.image (fun x => x -ᵥ p₁) (Finset.erase (Finset.image p s) p₁)) } ≤ n\n[PROOFSTEP]\nrefine' le_trans (finrank_span_finset_le_card (((s.image p).erase p₁).image fun p => p -ᵥ p₁)) _\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\np₁ : P\nhp₁ : p₁ ∈ Finset.image p s\n⊢ Finset.card (Finset.image (fun p => p -ᵥ p₁) (Finset.erase (Finset.image p s) p₁)) ≤ n\n[PROOFSTEP]\nrw [Finset.card_image_of_injective _ (vsub_left_injective p₁), Finset.card_erase_of_mem hp₁, tsub_le_iff_right, ← hc]\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : DecidableEq P\np : ι → P\ns : Finset ι\nn : ℕ\nhc : Finset.card s = n + 1\np₁ : P\nhp₁ : p₁ ∈ Finset.image p s\n⊢ Finset.card (Finset.image p s) ≤ Finset.card s\n[PROOFSTEP]\napply Finset.card_image_le\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k (Set.range p) } ≤ n\n[PROOFSTEP]\nclassical\nrw [← Set.image_univ, ← Finset.coe_univ, ← Finset.coe_image]\nrw [← Finset.card_univ] at hc \nexact finrank_vectorSpan_image_finset_le _ _ _ hc\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k (Set.range p) } ≤ n\n[PROOFSTEP]\nrw [← Set.image_univ, ← Finset.coe_univ, ← Finset.coe_image]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p Finset.univ) } ≤ n\n[PROOFSTEP]\nrw [← Finset.card_univ] at hc \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Finset.card Finset.univ = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k ↑(Finset.image p Finset.univ) } ≤ n\n[PROOFSTEP]\nexact finrank_vectorSpan_image_finset_le _ _ _ hc\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\n⊢ AffineIndependent k p ↔ finrank k { x // x ∈ vectorSpan k (Set.range p) } = n\n[PROOFSTEP]\nclassical\nhave hn : Nonempty ι := by simp [← Fintype.card_pos_iff, hc]\ncases' hn with i₁\nrw [affineIndependent_iff_linearIndependent_vsub _ _ i₁, linearIndependent_iff_card_eq_finrank_span, eq_comm,\n  vectorSpan_range_eq_span_range_vsub_right_ne k p i₁, Set.finrank]\ncongr\nrw [← Finset.card_univ] at hc \nrw [Fintype.subtype_card]\nsimp [Finset.filter_ne', Finset.card_erase_of_mem, hc]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\n⊢ AffineIndependent k p ↔ finrank k { x // x ∈ vectorSpan k (Set.range p) } = n\n[PROOFSTEP]\nhave hn : Nonempty ι := by simp [← Fintype.card_pos_iff, hc]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\n⊢ Nonempty ι\n[PROOFSTEP]\nsimp [← Fintype.card_pos_iff, hc]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\nhn : Nonempty ι\n⊢ AffineIndependent k p ↔ finrank k { x // x ∈ vectorSpan k (Set.range p) } = n\n[PROOFSTEP]\ncases' hn with i₁\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\ni₁ : ι\n⊢ AffineIndependent k p ↔ finrank k { x // x ∈ vectorSpan k (Set.range p) } = n\n[PROOFSTEP]\nrw [affineIndependent_iff_linearIndependent_vsub _ _ i₁, linearIndependent_iff_card_eq_finrank_span, eq_comm,\n  vectorSpan_range_eq_span_range_vsub_right_ne k p i₁, Set.finrank]\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\ni₁ : ι\n⊢ finrank k { x // x ∈ Submodule.span k (Set.range fun i => p ↑i -ᵥ p i₁) } = Fintype.card { x // x ≠ i₁ } ↔\n    finrank k { x // x ∈ Submodule.span k (Set.range fun i => p ↑i -ᵥ p i₁) } = n\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\ni₁ : ι\n⊢ finrank k { x // x ∈ Submodule.span k (Set.range fun i => p ↑i -ᵥ p i₁) } = Fintype.card { x // x ≠ i₁ } ↔\n    finrank k { x // x ∈ Submodule.span k (Set.range fun i => p ↑i -ᵥ p i₁) } = n\n[PROOFSTEP]\nrw [← Finset.card_univ] at hc \n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Finset.card Finset.univ = n + 1\ni₁ : ι\n⊢ finrank k { x // x ∈ Submodule.span k (Set.range fun i => p ↑i -ᵥ p i₁) } = Fintype.card { x // x ≠ i₁ } ↔\n    finrank k { x // x ∈ Submodule.span k (Set.range fun i => p ↑i -ᵥ p i₁) } = n\n[PROOFSTEP]\nrw [Fintype.subtype_card]\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Finset.card Finset.univ = n + 1\ni₁ : ι\n⊢ finrank k { x // x ∈ Submodule.span k (Set.range fun i => p ↑i -ᵥ p i₁) } =\n      Finset.card (Finset.filter (fun x => x ≠ i₁) Finset.univ) ↔\n    finrank k { x // x ∈ Submodule.span k (Set.range fun i => p ↑i -ᵥ p i₁) } = n\n[PROOFSTEP]\nsimp [Finset.filter_ne', Finset.card_erase_of_mem, hc]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\n⊢ AffineIndependent k p ↔ n ≤ finrank k { x // x ∈ vectorSpan k (Set.range p) }\n[PROOFSTEP]\nrw [affineIndependent_iff_finrank_vectorSpan_eq k p hc]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k (Set.range p) } = n ↔ n ≤ finrank k { x // x ∈ vectorSpan k (Set.range p) }\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\n⊢ finrank k { x // x ∈ vectorSpan k (Set.range p) } = n → n ≤ finrank k { x // x ∈ vectorSpan k (Set.range p) }\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nhc : Fintype.card ι = finrank k { x // x ∈ vectorSpan k (Set.range p) } + 1\n⊢ finrank k { x // x ∈ vectorSpan k (Set.range p) } ≤ finrank k { x // x ∈ vectorSpan k (Set.range p) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 1\n⊢ n ≤ finrank k { x // x ∈ vectorSpan k (Set.range p) } → finrank k { x // x ∈ vectorSpan k (Set.range p) } = n\n[PROOFSTEP]\nexact fun hle => le_antisymm (finrank_vectorSpan_range_le k p hc) hle\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : Fintype ι\np : ι → P\nn : ℕ\nhc : Fintype.card ι = n + 2\n⊢ AffineIndependent k p ↔ ¬finrank k { x // x ∈ vectorSpan k (Set.range p) } ≤ n\n[PROOFSTEP]\nrw [affineIndependent_iff_le_finrank_vectorSpan k p hc, ← Nat.lt_iff_add_one_le, lt_iff_not_ge]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nsp : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction sp }\nhle : affineSpan k ↑(Finset.image p s) ≤ sp\nhc : Finset.card s = finrank k { x // x ∈ direction sp } + 1\n⊢ affineSpan k ↑(Finset.image p s) = sp\n[PROOFSTEP]\nhave hn : s.Nonempty := by\n  rw [← Finset.card_pos, hc]\n  apply Nat.succ_pos\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nsp : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction sp }\nhle : affineSpan k ↑(Finset.image p s) ≤ sp\nhc : Finset.card s = finrank k { x // x ∈ direction sp } + 1\n⊢ Finset.Nonempty s\n[PROOFSTEP]\nrw [← Finset.card_pos, hc]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nsp : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction sp }\nhle : affineSpan k ↑(Finset.image p s) ≤ sp\nhc : Finset.card s = finrank k { x // x ∈ direction sp } + 1\n⊢ 0 < finrank k { x // x ∈ direction sp } + 1\n[PROOFSTEP]\napply Nat.succ_pos\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nsp : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction sp }\nhle : affineSpan k ↑(Finset.image p s) ≤ sp\nhc : Finset.card s = finrank k { x // x ∈ direction sp } + 1\nhn : Finset.Nonempty s\n⊢ affineSpan k ↑(Finset.image p s) = sp\n[PROOFSTEP]\nrefine' eq_of_direction_eq_of_nonempty_of_le _ ((hn.image p).to_set.affineSpan k) hle\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nsp : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction sp }\nhle : affineSpan k ↑(Finset.image p s) ≤ sp\nhc : Finset.card s = finrank k { x // x ∈ direction sp } + 1\nhn : Finset.Nonempty s\n⊢ direction (affineSpan k ↑(Finset.image p s)) = direction sp\n[PROOFSTEP]\nhave hd := direction_le hle\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nsp : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction sp }\nhle : affineSpan k ↑(Finset.image p s) ≤ sp\nhc : Finset.card s = finrank k { x // x ∈ direction sp } + 1\nhn : Finset.Nonempty s\nhd : direction (affineSpan k ↑(Finset.image p s)) ≤ direction sp\n⊢ direction (affineSpan k ↑(Finset.image p s)) = direction sp\n[PROOFSTEP]\nrw [direction_affineSpan] at hd ⊢\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : DecidableEq P\np : ι → P\nhi : AffineIndependent k p\ns : Finset ι\nsp : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction sp }\nhle : affineSpan k ↑(Finset.image p s) ≤ sp\nhc : Finset.card s = finrank k { x // x ∈ direction sp } + 1\nhn : Finset.Nonempty s\nhd : vectorSpan k ↑(Finset.image p s) ≤ direction sp\n⊢ vectorSpan k ↑(Finset.image p s) = direction sp\n[PROOFSTEP]\nexact hi.vectorSpan_image_finset_eq_of_le_of_card_eq_finrank_add_one hd hc\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nsp : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction sp }\nhle : affineSpan k (Set.range p) ≤ sp\nhc : Fintype.card ι = finrank k { x // x ∈ direction sp } + 1\n⊢ affineSpan k (Set.range p) = sp\n[PROOFSTEP]\nclassical\nrw [← Finset.card_univ] at hc \nrw [← Set.image_univ, ← Finset.coe_univ, ← Finset.coe_image] at hle ⊢\nexact hi.affineSpan_image_finset_eq_of_le_of_card_eq_finrank_add_one hle hc\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nsp : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction sp }\nhle : affineSpan k (Set.range p) ≤ sp\nhc : Fintype.card ι = finrank k { x // x ∈ direction sp } + 1\n⊢ affineSpan k (Set.range p) = sp\n[PROOFSTEP]\nrw [← Finset.card_univ] at hc \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nsp : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction sp }\nhle : affineSpan k (Set.range p) ≤ sp\nhc : Finset.card Finset.univ = finrank k { x // x ∈ direction sp } + 1\n⊢ affineSpan k (Set.range p) = sp\n[PROOFSTEP]\nrw [← Set.image_univ, ← Finset.coe_univ, ← Finset.coe_image] at hle ⊢\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nsp : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction sp }\nhle✝¹ : affineSpan k (p '' Set.univ) ≤ sp\nhle✝ : affineSpan k (p '' ↑Finset.univ) ≤ sp\nhle : affineSpan k ↑(Finset.image p Finset.univ) ≤ sp\nhc : Finset.card Finset.univ = finrank k { x // x ∈ direction sp } + 1\n⊢ affineSpan k ↑(Finset.image p Finset.univ) = sp\n[PROOFSTEP]\nexact hi.affineSpan_image_finset_eq_of_le_of_card_eq_finrank_add_one hle hc\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : FiniteDimensional k V\ninst✝ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\n⊢ affineSpan k (Set.range p) = ⊤ ↔ Fintype.card ι = finrank k V + 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : FiniteDimensional k V\ninst✝ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\n⊢ affineSpan k (Set.range p) = ⊤ → Fintype.card ι = finrank k V + 1\n[PROOFSTEP]\nintro h_tot\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : FiniteDimensional k V\ninst✝ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nh_tot : affineSpan k (Set.range p) = ⊤\n⊢ Fintype.card ι = finrank k V + 1\n[PROOFSTEP]\nlet n := Fintype.card ι - 1\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : FiniteDimensional k V\ninst✝ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nh_tot : affineSpan k (Set.range p) = ⊤\nn : ℕ := Fintype.card ι - 1\n⊢ Fintype.card ι = finrank k V + 1\n[PROOFSTEP]\nhave hn : Fintype.card ι = n + 1 := (Nat.succ_pred_eq_of_pos (card_pos_of_affineSpan_eq_top k V P h_tot)).symm\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : FiniteDimensional k V\ninst✝ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nh_tot : affineSpan k (Set.range p) = ⊤\nn : ℕ := Fintype.card ι - 1\nhn : Fintype.card ι = n + 1\n⊢ Fintype.card ι = finrank k V + 1\n[PROOFSTEP]\nrw [hn, ← finrank_top, ← (vectorSpan_eq_top_of_affineSpan_eq_top k V P) h_tot, ← hi.finrank_vectorSpan hn]\n[GOAL]\ncase mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : FiniteDimensional k V\ninst✝ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\n⊢ Fintype.card ι = finrank k V + 1 → affineSpan k (Set.range p) = ⊤\n[PROOFSTEP]\nintro hc\n[GOAL]\ncase mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : FiniteDimensional k V\ninst✝ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nhc : Fintype.card ι = finrank k V + 1\n⊢ affineSpan k (Set.range p) = ⊤\n[PROOFSTEP]\nrw [← finrank_top, ← direction_top k V P] at hc \n[GOAL]\ncase mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁵ : DivisionRing k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\ninst✝¹ : FiniteDimensional k V\ninst✝ : Fintype ι\np : ι → P\nhi : AffineIndependent k p\nhc : Fintype.card ι = finrank k { x // x ∈ direction ⊤ } + 1\n⊢ affineSpan k (Set.range p) = ⊤\n[PROOFSTEP]\nexact hi.affineSpan_eq_of_le_of_card_eq_finrank_add_one le_top hc\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ninst✝ : FiniteDimensional k V\nn : ℕ\nT : Simplex k V n\nhrank : finrank k V = n\n⊢ affineSpan k (Set.range T.points) = ⊤\n[PROOFSTEP]\nrw [AffineIndependent.affineSpan_eq_top_iff_card_eq_finrank_add_one T.Independent, Fintype.card_fin, hrank]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction s }\np : P\n⊢ FiniteDimensional k { x // x ∈ vectorSpan k (insert p ↑s) }\n[PROOFSTEP]\nrw [← direction_affineSpan, ← affineSpan_insert_affineSpan]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction s }\np : P\n⊢ FiniteDimensional k { x // x ∈ direction (affineSpan k (insert p ↑(affineSpan k ↑s))) }\n[PROOFSTEP]\nrcases(s : Set P).eq_empty_or_nonempty with (hs | ⟨p₀, hp₀⟩)\n[GOAL]\ncase inl\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction s }\np : P\nhs : ↑s = ∅\n⊢ FiniteDimensional k { x // x ∈ direction (affineSpan k (insert p ↑(affineSpan k ↑s))) }\n[PROOFSTEP]\nrw [coe_eq_bot_iff] at hs \n[GOAL]\ncase inl\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction s }\np : P\nhs : s = ⊥\n⊢ FiniteDimensional k { x // x ∈ direction (affineSpan k (insert p ↑(affineSpan k ↑s))) }\n[PROOFSTEP]\nrw [hs, bot_coe, span_empty, bot_coe, direction_affineSpan]\n[GOAL]\ncase inl\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction s }\np : P\nhs : s = ⊥\n⊢ FiniteDimensional k { x // x ∈ vectorSpan k (insert p ∅) }\n[PROOFSTEP]\nconvert finiteDimensional_bot _ _\n[GOAL]\ncase h.e'_2.h.e'_2.h.h.e'_5\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction s }\np : P\nhs : s = ⊥\nx✝ : V\n⊢ vectorSpan k (insert p ∅) = ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_4.e'_6\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction s }\np : P\nhs : s = ⊥\ne_2✝ : { x // x ∈ vectorSpan k (insert p ∅) } = { x // x ∈ ⊥ }\n⊢ vectorSpan k (insert p ∅) = ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_5.e'_6.h.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction s }\np : P\nhs : s = ⊥\ne_2✝ : { x // x ∈ vectorSpan k (insert p ∅) } = { x // x ∈ ⊥ }\ne_4✝ : HEq (Submodule.addCommGroup (vectorSpan k (insert p ∅))) (Submodule.addCommGroup ⊥)\ne_3✝ : Ring.toSemiring = DivisionSemiring.toSemiring\n⊢ vectorSpan k (insert p ∅) = ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction s }\np p₀ : P\nhp₀ : p₀ ∈ ↑s\n⊢ FiniteDimensional k { x // x ∈ direction (affineSpan k (insert p ↑(affineSpan k ↑s))) }\n[PROOFSTEP]\nrw [affineSpan_coe, direction_affineSpan_insert hp₀]\n[GOAL]\ncase inr.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : FiniteDimensional k { x // x ∈ direction s }\np p₀ : P\nhp₀ : p₀ ∈ ↑s\n⊢ FiniteDimensional k { x // x ∈ Submodule.span k {p -ᵥ p₀} ⊔ direction s }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : Set P\ninst✝ : FiniteDimensional k { x // x ∈ vectorSpan k s }\np : P\n⊢ FiniteDimensional k { x // x ∈ vectorSpan k (insert p s) }\n[PROOFSTEP]\nhaveI : FiniteDimensional k (affineSpan k s).direction := (direction_affineSpan k s).symm ▸ inferInstance\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : Set P\ninst✝ : FiniteDimensional k { x // x ∈ vectorSpan k s }\np : P\nthis : FiniteDimensional k { x // x ∈ direction (affineSpan k s) }\n⊢ FiniteDimensional k { x // x ∈ vectorSpan k (insert p s) }\n[PROOFSTEP]\nrw [← direction_affineSpan, ← affineSpan_insert_affineSpan, direction_affineSpan]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : Set P\ninst✝ : FiniteDimensional k { x // x ∈ vectorSpan k s }\np : P\nthis : FiniteDimensional k { x // x ∈ direction (affineSpan k s) }\n⊢ FiniteDimensional k { x // x ∈ vectorSpan k (insert p ↑(affineSpan k s)) }\n[PROOFSTEP]\nexact finiteDimensional_vectorSpan_insert (affineSpan k s) p\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : Set P\ninst✝ : FiniteDimensional k { x // x ∈ vectorSpan k s }\n⊢ Collinear k s ↔ finrank k { x // x ∈ vectorSpan k s } ≤ 1\n[PROOFSTEP]\nhave h := collinear_iff_rank_le_one k s\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : Set P\ninst✝ : FiniteDimensional k { x // x ∈ vectorSpan k s }\nh : Collinear k s ↔ Module.rank k { x // x ∈ vectorSpan k s } ≤ 1\n⊢ Collinear k s ↔ finrank k { x // x ∈ vectorSpan k s } ≤ 1\n[PROOFSTEP]\nrw [← finrank_eq_rank] at h \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : Set P\ninst✝ : FiniteDimensional k { x // x ∈ vectorSpan k s }\nh : Collinear k s ↔ ↑(finrank k { x // x ∈ vectorSpan k s }) ≤ 1\n⊢ Collinear k s ↔ finrank k { x // x ∈ vectorSpan k s } ≤ 1\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\n⊢ Collinear k ∅\n[PROOFSTEP]\nrw [collinear_iff_rank_le_one, vectorSpan_empty]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\n⊢ Module.rank k { x // x ∈ ⊥ } ≤ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\n⊢ Collinear k {p}\n[PROOFSTEP]\nrw [collinear_iff_rank_le_one, vectorSpan_singleton]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\n⊢ Module.rank k { x // x ∈ ⊥ } ≤ 1\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\n⊢ Collinear k s ↔ ∃ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\n[PROOFSTEP]\nsimp_rw [collinear_iff_rank_le_one, rank_submodule_le_one_iff', Submodule.le_span_singleton_iff]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\n⊢ (∃ v₀, ∀ (v : V), v ∈ vectorSpan k s → ∃ r, r • v₀ = v) ↔ ∃ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\n⊢ (∃ v₀, ∀ (v : V), v ∈ vectorSpan k s → ∃ r, r • v₀ = v) → ∃ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\n[PROOFSTEP]\nrintro ⟨v₀, hv⟩\n[GOAL]\ncase mp.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv₀ : V\nhv : ∀ (v : V), v ∈ vectorSpan k s → ∃ r, r • v₀ = v\n⊢ ∃ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\n[PROOFSTEP]\nuse v₀\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv₀ : V\nhv : ∀ (v : V), v ∈ vectorSpan k s → ∃ r, r • v₀ = v\n⊢ ∀ (p : P), p ∈ s → ∃ r, p = r • v₀ +ᵥ p₀\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv₀ : V\nhv : ∀ (v : V), v ∈ vectorSpan k s → ∃ r, r • v₀ = v\np : P\nhp : p ∈ s\n⊢ ∃ r, p = r • v₀ +ᵥ p₀\n[PROOFSTEP]\nobtain ⟨r, hr⟩ := hv (p -ᵥ p₀) (vsub_mem_vectorSpan k hp h)\n[GOAL]\ncase h.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv₀ : V\nhv : ∀ (v : V), v ∈ vectorSpan k s → ∃ r, r • v₀ = v\np : P\nhp : p ∈ s\nr : k\nhr : r • v₀ = p -ᵥ p₀\n⊢ ∃ r, p = r • v₀ +ᵥ p₀\n[PROOFSTEP]\nuse r\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv₀ : V\nhv : ∀ (v : V), v ∈ vectorSpan k s → ∃ r, r • v₀ = v\np : P\nhp : p ∈ s\nr : k\nhr : r • v₀ = p -ᵥ p₀\n⊢ p = r • v₀ +ᵥ p₀\n[PROOFSTEP]\nrw [eq_vadd_iff_vsub_eq]\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv₀ : V\nhv : ∀ (v : V), v ∈ vectorSpan k s → ∃ r, r • v₀ = v\np : P\nhp : p ∈ s\nr : k\nhr : r • v₀ = p -ᵥ p₀\n⊢ p -ᵥ p₀ = r • v₀\n[PROOFSTEP]\nexact hr.symm\n[GOAL]\ncase mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\n⊢ (∃ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀) → ∃ v₀, ∀ (v : V), v ∈ vectorSpan k s → ∃ r, r • v₀ = v\n[PROOFSTEP]\nrintro ⟨v, hp₀v⟩\n[GOAL]\ncase mpr.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\n⊢ ∃ v₀, ∀ (v : V), v ∈ vectorSpan k s → ∃ r, r • v₀ = v\n[PROOFSTEP]\nuse v\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\n⊢ ∀ (v_1 : V), v_1 ∈ vectorSpan k s → ∃ r, r • v = v_1\n[PROOFSTEP]\nintro w hw\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\nw : V\nhw : w ∈ vectorSpan k s\n⊢ ∃ r, r • v = w\n[PROOFSTEP]\nhave hs : vectorSpan k s ≤ k ∙ v :=\n  by\n  rw [vectorSpan_eq_span_vsub_set_right k h, Submodule.span_le, Set.subset_def]\n  intro x hx\n  rw [SetLike.mem_coe, Submodule.mem_span_singleton]\n  rw [Set.mem_image] at hx \n  rcases hx with ⟨p, hp, rfl⟩\n  rcases hp₀v p hp with ⟨r, rfl⟩\n  use r\n  simp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\nw : V\nhw : w ∈ vectorSpan k s\n⊢ vectorSpan k s ≤ Submodule.span k {v}\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_right k h, Submodule.span_le, Set.subset_def]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\nw : V\nhw : w ∈ vectorSpan k s\n⊢ ∀ (x : V), x ∈ (fun x => x -ᵥ p₀) '' s → x ∈ ↑(Submodule.span k {v})\n[PROOFSTEP]\nintro x hx\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\nw : V\nhw : w ∈ vectorSpan k s\nx : V\nhx : x ∈ (fun x => x -ᵥ p₀) '' s\n⊢ x ∈ ↑(Submodule.span k {v})\n[PROOFSTEP]\nrw [SetLike.mem_coe, Submodule.mem_span_singleton]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\nw : V\nhw : w ∈ vectorSpan k s\nx : V\nhx : x ∈ (fun x => x -ᵥ p₀) '' s\n⊢ ∃ a, a • v = x\n[PROOFSTEP]\nrw [Set.mem_image] at hx \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\nw : V\nhw : w ∈ vectorSpan k s\nx : V\nhx : ∃ x_1, x_1 ∈ s ∧ x_1 -ᵥ p₀ = x\n⊢ ∃ a, a • v = x\n[PROOFSTEP]\nrcases hx with ⟨p, hp, rfl⟩\n[GOAL]\ncase intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\nw : V\nhw : w ∈ vectorSpan k s\np : P\nhp : p ∈ s\n⊢ ∃ a, a • v = p -ᵥ p₀\n[PROOFSTEP]\nrcases hp₀v p hp with ⟨r, rfl⟩\n[GOAL]\ncase intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\nw : V\nhw : w ∈ vectorSpan k s\nr : k\nhp : r • v +ᵥ p₀ ∈ s\n⊢ ∃ a, a • v = r • v +ᵥ p₀ -ᵥ p₀\n[PROOFSTEP]\nuse r\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\nw : V\nhw : w ∈ vectorSpan k s\nr : k\nhp : r • v +ᵥ p₀ ∈ s\n⊢ r • v = r • v +ᵥ p₀ -ᵥ p₀\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\nw : V\nhw : w ∈ vectorSpan k s\nhs : vectorSpan k s ≤ Submodule.span k {v}\n⊢ ∃ r, r • v = w\n[PROOFSTEP]\nhave hw' := SetLike.le_def.1 hs hw\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₀ : P\nh : p₀ ∈ s\nv : V\nhp₀v : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\nw : V\nhw : w ∈ vectorSpan k s\nhs : vectorSpan k s ≤ Submodule.span k {v}\nhw' : w ∈ Submodule.span k {v}\n⊢ ∃ r, r • v = w\n[PROOFSTEP]\nrwa [Submodule.mem_span_singleton] at hw' \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\n⊢ Collinear k s ↔ ∃ p₀ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\n[PROOFSTEP]\nrcases Set.eq_empty_or_nonempty s with (rfl | ⟨⟨p₁, hp₁⟩⟩)\n[GOAL]\ncase inl\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\n⊢ Collinear k ∅ ↔ ∃ p₀ v, ∀ (p : P), p ∈ ∅ → ∃ r, p = r • v +ᵥ p₀\n[PROOFSTEP]\nsimp [collinear_empty]\n[GOAL]\ncase inr.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\n⊢ Collinear k s ↔ ∃ p₀ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\n[PROOFSTEP]\nrw [collinear_iff_of_mem hp₁]\n[GOAL]\ncase inr.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\n⊢ (∃ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁) ↔ ∃ p₀ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase inr.intro.mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\n⊢ (∃ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁) → ∃ p₀ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀\n[PROOFSTEP]\nexact fun h => ⟨p₁, h⟩\n[GOAL]\ncase inr.intro.mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\n⊢ (∃ p₀ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₀) → ∃ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁\n[PROOFSTEP]\nrintro ⟨p, v, hv⟩\n[GOAL]\ncase inr.intro.mpr.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\np : P\nv : V\nhv : ∀ (p_1 : P), p_1 ∈ s → ∃ r, p_1 = r • v +ᵥ p\n⊢ ∃ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁\n[PROOFSTEP]\nuse v\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\np : P\nv : V\nhv : ∀ (p_1 : P), p_1 ∈ s → ∃ r, p_1 = r • v +ᵥ p\n⊢ ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁\n[PROOFSTEP]\nintro p₂ hp₂\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\np : P\nv : V\nhv : ∀ (p_1 : P), p_1 ∈ s → ∃ r, p_1 = r • v +ᵥ p\np₂ : P\nhp₂ : p₂ ∈ s\n⊢ ∃ r, p₂ = r • v +ᵥ p₁\n[PROOFSTEP]\nrcases hv p₂ hp₂ with ⟨r, rfl⟩\n[GOAL]\ncase h.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\np : P\nv : V\nhv : ∀ (p_1 : P), p_1 ∈ s → ∃ r, p_1 = r • v +ᵥ p\nr : k\nhp₂ : r • v +ᵥ p ∈ s\n⊢ ∃ r_1, r • v +ᵥ p = r_1 • v +ᵥ p₁\n[PROOFSTEP]\nrcases hv p₁ hp₁ with ⟨r₁, rfl⟩\n[GOAL]\ncase h.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np : P\nv : V\nhv : ∀ (p_1 : P), p_1 ∈ s → ∃ r, p_1 = r • v +ᵥ p\nr : k\nhp₂ : r • v +ᵥ p ∈ s\nr₁ : k\nhp₁ : r₁ • v +ᵥ p ∈ s\n⊢ ∃ r_1, r • v +ᵥ p = r_1 • v +ᵥ (r₁ • v +ᵥ p)\n[PROOFSTEP]\nuse r - r₁\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np : P\nv : V\nhv : ∀ (p_1 : P), p_1 ∈ s → ∃ r, p_1 = r • v +ᵥ p\nr : k\nhp₂ : r • v +ᵥ p ∈ s\nr₁ : k\nhp₁ : r₁ • v +ᵥ p ∈ s\n⊢ r • v +ᵥ p = (r - r₁) • v +ᵥ (r₁ • v +ᵥ p)\n[PROOFSTEP]\nsimp [vadd_vadd, ← add_smul]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ : P\n⊢ Collinear k {p₁, p₂}\n[PROOFSTEP]\nrw [collinear_iff_exists_forall_eq_smul_vadd]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ : P\n⊢ ∃ p₀ v, ∀ (p : P), p ∈ {p₁, p₂} → ∃ r, p = r • v +ᵥ p₀\n[PROOFSTEP]\nuse p₁, p₂ -ᵥ p₁\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ : P\n⊢ ∀ (p : P), p ∈ {p₁, p₂} → ∃ r, p = r • (p₂ -ᵥ p₁) +ᵥ p₁\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p : P\nhp : p ∈ {p₁, p₂}\n⊢ ∃ r, p = r • (p₂ -ᵥ p₁) +ᵥ p₁\n[PROOFSTEP]\nrw [Set.mem_insert_iff, Set.mem_singleton_iff] at hp \n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p : P\nhp : p = p₁ ∨ p = p₂\n⊢ ∃ r, p = r • (p₂ -ᵥ p₁) +ᵥ p₁\n[PROOFSTEP]\ncases' hp with hp hp\n[GOAL]\ncase h.inl\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p : P\nhp : p = p₁\n⊢ ∃ r, p = r • (p₂ -ᵥ p₁) +ᵥ p₁\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p : P\nhp : p = p₁\n⊢ p = 0 • (p₂ -ᵥ p₁) +ᵥ p₁\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase h.inr\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p : P\nhp : p = p₂\n⊢ ∃ r, p = r • (p₂ -ᵥ p₁) +ᵥ p₁\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p : P\nhp : p = p₂\n⊢ p = 1 • (p₂ -ᵥ p₁) +ᵥ p₁\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\n⊢ AffineIndependent k p ↔ ¬Collinear k (Set.range p)\n[PROOFSTEP]\nrw [collinear_iff_finrank_le_one, affineIndependent_iff_not_finrank_vectorSpan_le k p (Fintype.card_fin 3)]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\n⊢ Collinear k (Set.range p) ↔ ¬AffineIndependent k p\n[PROOFSTEP]\nrw [collinear_iff_finrank_le_one, finrank_vectorSpan_le_iff_not_affineIndependent k p (Fintype.card_fin 3)]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ : P\n⊢ AffineIndependent k ![p₁, p₂, p₃] ↔ ¬Collinear k {p₁, p₂, p₃}\n[PROOFSTEP]\nrw [affineIndependent_iff_not_collinear]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ : P\n⊢ ¬Collinear k (Set.range ![p₁, p₂, p₃]) ↔ ¬Collinear k {p₁, p₂, p₃}\n[PROOFSTEP]\nsimp_rw [Matrix.range_cons, Matrix.range_empty, Set.singleton_union, insert_emptyc_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\n⊢ AffineIndependent k p ↔ ¬Collinear k {p i₁, p i₂, p i₃}\n[PROOFSTEP]\nhave hu : (Finset.univ : Finset (Fin 3)) = { i₁, i₂, i₃ } := by\n  -- Porting note: Originally `by decide!`fin_cases i₁ <;> fin_cases i₂ <;> fin_cases i₃ <;> simp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\n⊢ Finset.univ = {i₁, i₂, i₃}\n[PROOFSTEP]\nfin_cases i₁\n[GOAL]\ncase head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₂ i₃ : Fin 3\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₂\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\n⊢ Finset.univ = {{ val := 0, isLt := (_ : 0 < 3) }, i₂, i₃}\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₂ i₃ : Fin 3\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₂\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\n⊢ Finset.univ = {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, i₂, i₃}\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₂ i₃ : Fin 3\nh₂₃ : i₂ ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₂\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\n⊢ Finset.univ = {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, i₂, i₃}\n[PROOFSTEP]\nfin_cases i₂\n[GOAL]\ncase head.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₃ : Fin 3\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ = {{ val := 0, isLt := (_ : 0 < 3) }, { val := 0, isLt := (_ : 0 < 3) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₃ : Fin 3\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ = {{ val := 0, isLt := (_ : 0 < 3) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₃ : Fin 3\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ = {{ val := 0, isLt := (_ : 0 < 3) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₃ : Fin 3\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ = {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 0, isLt := (_ : 0 < 3) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₃ : Fin 3\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ = {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.head.tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₃ : Fin 3\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n    {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₃ : Fin 3\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ = {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 0, isLt := (_ : 0 < 3) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₃ : Fin 3\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ i₃\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase tail.tail.head.tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₃ : Fin 3\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ i₃\nh₁₂ :\n  { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n    { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, i₃}\n[PROOFSTEP]\nfin_cases i₃\n[GOAL]\ncase head.head.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ h₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n    {{ val := 0, isLt := (_ : 0 < 3) }, { val := 0, isLt := (_ : 0 < 3) }, { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.head.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n    {{ val := 0, isLt := (_ : 0 < 3) }, { val := 0, isLt := (_ : 0 < 3) },\n      { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.head.tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ h₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n    {{ val := 0, isLt := (_ : 0 < 3) }, { val := 0, isLt := (_ : 0 < 3) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n    {{ val := 0, isLt := (_ : 0 < 3) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n      { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ h₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n    {{ val := 0, isLt := (_ : 0 < 3) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n      { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.head.tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n    {{ val := 0, isLt := (_ : 0 < 3) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n    {{ val := 0, isLt := (_ : 0 < 3) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n      { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n    {{ val := 0, isLt := (_ : 0 < 3) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n      { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase head.tail.tail.head.tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ h₁₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ :\n  { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n    { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n    {{ val := 0, isLt := (_ : 0 < 3) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ h₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n    {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 0, isLt := (_ : 0 < 3) },\n      { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n    {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 0, isLt := (_ : 0 < 3) },\n      { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.head.tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n    {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 0, isLt := (_ : 0 < 3) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n    {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n      { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ h₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n    {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n      { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.head.tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ h₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n    {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n    {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n      { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n    {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n      { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.head.tail.tail.head.tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ h₁₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ :\n  { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n    { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n    {{ val := 1, isLt := (_ : (fun a => a < 3) 1) }, { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ h₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 0, isLt := (_ : 0 < 3) },\n      { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 0, isLt := (_ : 0 < 3) },\n      { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.head.tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₁₃ :\n  { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n    { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 0, isLt := (_ : 0 < 3) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 0, isLt := (_ : 0 < 3) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n      { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ h₁₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n      { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.head.tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\nh₁₃ :\n  { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n    { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₂₃ : { val := 1, isLt := (_ : (fun a => a < 3) 1) } ≠ { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ :\n  { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n    { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 0, isLt := (_ : 0 < 3) }\n⊢ Finset.univ =\n    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 0, isLt := (_ : 0 < 3) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ :\n  { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n    { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\nh₁₃ h₂₃ : { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 3) 1) }\n⊢ Finset.univ =\n    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }, { val := 1, isLt := (_ : (fun a => a < 3) 1) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\ncase tail.tail.head.tail.tail.head.tail.tail.head\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\nh₁₂ h₁₃ h₂₃ :\n  { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) } ≠\n    { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }\n⊢ Finset.univ =\n    {{ val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) },\n      { val := 2, isLt := (_ : (fun a => (fun a => a < 3) a) 2) }}\n[PROOFSTEP]\nsimp only at h₁₂ h₁₃ h₂₃ ⊢\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : Fin 3 → P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nhu : Finset.univ = {i₁, i₂, i₃}\n⊢ AffineIndependent k p ↔ ¬Collinear k {p i₁, p i₂, p i₃}\n[PROOFSTEP]\nrw [affineIndependent_iff_not_collinear, ← Set.image_univ, ← Finset.coe_univ, hu, Finset.coe_insert, Finset.coe_insert,\n  Finset.coe_singleton, Set.image_insert_eq, Set.image_pair]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ : P\nh : ¬Collinear k {p₁, p₂, p₃}\n⊢ p₁ ≠ p₂\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₃ : P\nh : ¬Collinear k {p₁, p₁, p₃}\n⊢ False\n[PROOFSTEP]\nsimp [collinear_pair] at h \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ : P\nh : ¬Collinear k {p₁, p₂, p₃}\n⊢ p₁ ≠ p₃\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ : P\nh : ¬Collinear k {p₁, p₂, p₁}\n⊢ False\n[PROOFSTEP]\nsimp [collinear_pair] at h \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ : P\nh : ¬Collinear k {p₁, p₂, p₃}\n⊢ p₂ ≠ p₃\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ : P\nh : ¬Collinear k {p₁, p₂, p₂}\n⊢ False\n[PROOFSTEP]\nsimp [collinear_pair] at h \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : Collinear k s\np₁ p₂ p₃ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₁p₂ : p₁ ≠ p₂\n⊢ p₃ ∈ affineSpan k {p₁, p₂}\n[PROOFSTEP]\nrw [collinear_iff_of_mem hp₁] at h \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nh : ∃ v, ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁\np₂ p₃ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₁p₂ : p₁ ≠ p₂\n⊢ p₃ ∈ affineSpan k {p₁, p₂}\n[PROOFSTEP]\nrcases h with ⟨v, h⟩\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ p₂ p₃ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₁p₂ : p₁ ≠ p₂\nv : V\nh : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁\n⊢ p₃ ∈ affineSpan k {p₁, p₂}\n[PROOFSTEP]\nrcases h p₂ hp₂ with ⟨r₂, rfl⟩\n[GOAL]\ncase intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ p₃ : P\nhp₁ : p₁ ∈ s\nhp₃ : p₃ ∈ s\nv : V\nh : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁\nr₂ : k\nhp₂ : r₂ • v +ᵥ p₁ ∈ s\nhp₁p₂ : p₁ ≠ r₂ • v +ᵥ p₁\n⊢ p₃ ∈ affineSpan k {p₁, r₂ • v +ᵥ p₁}\n[PROOFSTEP]\nrcases h p₃ hp₃ with ⟨r₃, rfl⟩\n[GOAL]\ncase intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\nv : V\nh : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁\nr₂ : k\nhp₂ : r₂ • v +ᵥ p₁ ∈ s\nhp₁p₂ : p₁ ≠ r₂ • v +ᵥ p₁\nr₃ : k\nhp₃ : r₃ • v +ᵥ p₁ ∈ s\n⊢ r₃ • v +ᵥ p₁ ∈ affineSpan k {p₁, r₂ • v +ᵥ p₁}\n[PROOFSTEP]\nrw [vadd_left_mem_affineSpan_pair]\n[GOAL]\ncase intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\nv : V\nh : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁\nr₂ : k\nhp₂ : r₂ • v +ᵥ p₁ ∈ s\nhp₁p₂ : p₁ ≠ r₂ • v +ᵥ p₁\nr₃ : k\nhp₃ : r₃ • v +ᵥ p₁ ∈ s\n⊢ ∃ r, r • (r₂ • v +ᵥ p₁ -ᵥ p₁) = r₃ • v\n[PROOFSTEP]\nrefine' ⟨r₃ / r₂, _⟩\n[GOAL]\ncase intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\nv : V\nh : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁\nr₂ : k\nhp₂ : r₂ • v +ᵥ p₁ ∈ s\nhp₁p₂ : p₁ ≠ r₂ • v +ᵥ p₁\nr₃ : k\nhp₃ : r₃ • v +ᵥ p₁ ∈ s\n⊢ (r₃ / r₂) • (r₂ • v +ᵥ p₁ -ᵥ p₁) = r₃ • v\n[PROOFSTEP]\nhave h₂ : r₂ ≠ 0 := by\n  rintro rfl\n  simp at hp₁p₂ \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\nv : V\nh : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁\nr₂ : k\nhp₂ : r₂ • v +ᵥ p₁ ∈ s\nhp₁p₂ : p₁ ≠ r₂ • v +ᵥ p₁\nr₃ : k\nhp₃ : r₃ • v +ᵥ p₁ ∈ s\n⊢ r₂ ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\nv : V\nh : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁\nr₃ : k\nhp₃ : r₃ • v +ᵥ p₁ ∈ s\nhp₂ : 0 • v +ᵥ p₁ ∈ s\nhp₁p₂ : p₁ ≠ 0 • v +ᵥ p₁\n⊢ False\n[PROOFSTEP]\nsimp at hp₁p₂ \n[GOAL]\ncase intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np₁ : P\nhp₁ : p₁ ∈ s\nv : V\nh : ∀ (p : P), p ∈ s → ∃ r, p = r • v +ᵥ p₁\nr₂ : k\nhp₂ : r₂ • v +ᵥ p₁ ∈ s\nhp₁p₂ : p₁ ≠ r₂ • v +ᵥ p₁\nr₃ : k\nhp₃ : r₃ • v +ᵥ p₁ ∈ s\nh₂ : r₂ ≠ 0\n⊢ (r₃ / r₂) • (r₂ • v +ᵥ p₁ -ᵥ p₁) = r₃ • v\n[PROOFSTEP]\nsimp [smul_smul, h₂]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : Collinear k s\np₁ p₂ p₃ : P\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₂p₃ : p₂ ≠ p₃\n⊢ Collinear k (insert p₁ s) ↔ Collinear k {p₁, p₂, p₃}\n[PROOFSTEP]\nhave hv : vectorSpan k (insert p₁ s) = vectorSpan k ({ p₁, p₂, p₃ } : Set P) := by\n  -- Porting note: Original proof used `conv_lhs` and `conv_rhs`, but these tactics timed out.\n  rw [← direction_affineSpan, ← affineSpan_insert_affineSpan]\n  symm\n  rw [← direction_affineSpan, ← affineSpan_insert_affineSpan, h.affineSpan_eq_of_ne hp₂ hp₃ hp₂p₃]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : Collinear k s\np₁ p₂ p₃ : P\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₂p₃ : p₂ ≠ p₃\n⊢ vectorSpan k (insert p₁ s) = vectorSpan k {p₁, p₂, p₃}\n[PROOFSTEP]\nrw [← direction_affineSpan, ← affineSpan_insert_affineSpan]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : Collinear k s\np₁ p₂ p₃ : P\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₂p₃ : p₂ ≠ p₃\n⊢ direction (affineSpan k (insert p₁ ↑(affineSpan k s))) = vectorSpan k {p₁, p₂, p₃}\n[PROOFSTEP]\nsymm\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : Collinear k s\np₁ p₂ p₃ : P\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₂p₃ : p₂ ≠ p₃\n⊢ vectorSpan k {p₁, p₂, p₃} = direction (affineSpan k (insert p₁ ↑(affineSpan k s)))\n[PROOFSTEP]\nrw [← direction_affineSpan, ← affineSpan_insert_affineSpan, h.affineSpan_eq_of_ne hp₂ hp₃ hp₂p₃]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : Collinear k s\np₁ p₂ p₃ : P\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₂p₃ : p₂ ≠ p₃\nhv : vectorSpan k (insert p₁ s) = vectorSpan k {p₁, p₂, p₃}\n⊢ Collinear k (insert p₁ s) ↔ Collinear k {p₁, p₂, p₃}\n[PROOFSTEP]\nrw [Collinear, Collinear, hv]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np : P\nh : p ∈ affineSpan k s\n⊢ Collinear k (insert p s) ↔ Collinear k s\n[PROOFSTEP]\nrw [Collinear, Collinear, vectorSpan_insert_eq_vectorSpan h]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ : P\nh : p₁ ∈ affineSpan k {p₂, p₃}\n⊢ Collinear k {p₁, p₂, p₃}\n[PROOFSTEP]\nrw [collinear_insert_iff_of_mem_affineSpan h]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ : P\nh : p₁ ∈ affineSpan k {p₂, p₃}\n⊢ Collinear k {p₂, p₃}\n[PROOFSTEP]\nexact collinear_pair _ _ _\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ : P\nh₁ : p₁ ∈ affineSpan k {p₃, p₄}\nh₂ : p₂ ∈ affineSpan k {p₃, p₄}\n⊢ Collinear k {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nrw [collinear_insert_iff_of_mem_affineSpan\n    ((AffineSubspace.le_def' _ _).1 (affineSpan_mono k (Set.subset_insert _ _)) _ h₁),\n  collinear_insert_iff_of_mem_affineSpan h₂]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ : P\nh₁ : p₁ ∈ affineSpan k {p₃, p₄}\nh₂ : p₂ ∈ affineSpan k {p₃, p₄}\n⊢ Collinear k {p₃, p₄}\n[PROOFSTEP]\nexact collinear_pair _ _ _\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ p₅ : P\nh₁ : p₁ ∈ affineSpan k {p₄, p₅}\nh₂ : p₂ ∈ affineSpan k {p₄, p₅}\nh₃ : p₃ ∈ affineSpan k {p₄, p₅}\n⊢ Collinear k {p₁, p₂, p₃, p₄, p₅}\n[PROOFSTEP]\nrw [collinear_insert_iff_of_mem_affineSpan\n    ((AffineSubspace.le_def' _ _).1 (affineSpan_mono k ((Set.subset_insert _ _).trans (Set.subset_insert _ _))) _ h₁),\n  collinear_insert_iff_of_mem_affineSpan\n    ((AffineSubspace.le_def' _ _).1 (affineSpan_mono k (Set.subset_insert _ _)) _ h₂),\n  collinear_insert_iff_of_mem_affineSpan h₃]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ p₅ : P\nh₁ : p₁ ∈ affineSpan k {p₄, p₅}\nh₂ : p₂ ∈ affineSpan k {p₄, p₅}\nh₃ : p₃ ∈ affineSpan k {p₄, p₅}\n⊢ Collinear k {p₄, p₅}\n[PROOFSTEP]\nexact collinear_pair _ _ _\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ p₅ : P\nh₁ : p₁ ∈ affineSpan k {p₄, p₅}\nh₂ : p₂ ∈ affineSpan k {p₄, p₅}\nh₃ : p₃ ∈ affineSpan k {p₄, p₅}\n⊢ Collinear k {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nrefine' (collinear_insert_insert_insert_of_mem_affineSpan_pair h₁ h₂ h₃).subset _\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ p₅ : P\nh₁ : p₁ ∈ affineSpan k {p₄, p₅}\nh₂ : p₂ ∈ affineSpan k {p₄, p₅}\nh₃ : p₃ ∈ affineSpan k {p₄, p₅}\n⊢ {p₁, p₂, p₃, p₄} ⊆ {p₁, p₂, p₃, p₄, p₅}\n[PROOFSTEP]\nrepeat apply Set.insert_subset_insert\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ p₅ : P\nh₁ : p₁ ∈ affineSpan k {p₄, p₅}\nh₂ : p₂ ∈ affineSpan k {p₄, p₅}\nh₃ : p₃ ∈ affineSpan k {p₄, p₅}\n⊢ {p₁, p₂, p₃, p₄} ⊆ {p₁, p₂, p₃, p₄, p₅}\n[PROOFSTEP]\napply Set.insert_subset_insert\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ p₅ : P\nh₁ : p₁ ∈ affineSpan k {p₄, p₅}\nh₂ : p₂ ∈ affineSpan k {p₄, p₅}\nh₃ : p₃ ∈ affineSpan k {p₄, p₅}\n⊢ {p₂, p₃, p₄} ⊆ {p₂, p₃, p₄, p₅}\n[PROOFSTEP]\napply Set.insert_subset_insert\n[GOAL]\ncase h.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ p₅ : P\nh₁ : p₁ ∈ affineSpan k {p₄, p₅}\nh₂ : p₂ ∈ affineSpan k {p₄, p₅}\nh₃ : p₃ ∈ affineSpan k {p₄, p₅}\n⊢ {p₃, p₄} ⊆ {p₃, p₄, p₅}\n[PROOFSTEP]\napply Set.insert_subset_insert\n[GOAL]\ncase h.h.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ p₅ : P\nh₁ : p₁ ∈ affineSpan k {p₄, p₅}\nh₂ : p₂ ∈ affineSpan k {p₄, p₅}\nh₃ : p₃ ∈ affineSpan k {p₄, p₅}\n⊢ {p₄} ⊆ {p₄, p₅}\n[PROOFSTEP]\napply Set.insert_subset_insert\n[GOAL]\ncase h.h.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ p₅ : P\nh₁ : p₁ ∈ affineSpan k {p₄, p₅}\nh₂ : p₂ ∈ affineSpan k {p₄, p₅}\nh₃ : p₃ ∈ affineSpan k {p₄, p₅}\n⊢ {p₄} ⊆ {p₄, p₅}\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ p₅ : P\nh₁ : p₁ ∈ affineSpan k {p₄, p₅}\nh₂ : p₂ ∈ affineSpan k {p₄, p₅}\nh₃ : p₃ ∈ affineSpan k {p₄, p₅}\n⊢ Collinear k {p₁, p₂, p₃}\n[PROOFSTEP]\nrefine' (collinear_insert_insert_insert_left_of_mem_affineSpan_pair h₁ h₂ h₃).subset _\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ p₅ : P\nh₁ : p₁ ∈ affineSpan k {p₄, p₅}\nh₂ : p₂ ∈ affineSpan k {p₄, p₅}\nh₃ : p₃ ∈ affineSpan k {p₄, p₅}\n⊢ {p₁, p₂, p₃} ⊆ {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nsimp [Set.insert_subset_insert]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : Coplanar k s\n⊢ FiniteDimensional k { x // x ∈ vectorSpan k s }\n[PROOFSTEP]\nrefine' IsNoetherian.iff_fg.1 (IsNoetherian.iff_rank_lt_aleph0.2 (lt_of_le_of_lt h _))\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : Coplanar k s\n⊢ 2 < Cardinal.aleph0\n[PROOFSTEP]\nexact Cardinal.lt_aleph0.2 ⟨2, rfl⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : Set P\ninst✝ : FiniteDimensional k { x // x ∈ vectorSpan k s }\n⊢ Coplanar k s ↔ finrank k { x // x ∈ vectorSpan k s } ≤ 2\n[PROOFSTEP]\nhave h : Coplanar k s ↔ Module.rank k (vectorSpan k s) ≤ 2 := Iff.rfl\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : Set P\ninst✝ : FiniteDimensional k { x // x ∈ vectorSpan k s }\nh : Coplanar k s ↔ Module.rank k { x // x ∈ vectorSpan k s } ≤ 2\n⊢ Coplanar k s ↔ finrank k { x // x ∈ vectorSpan k s } ≤ 2\n[PROOFSTEP]\nrw [← finrank_eq_rank] at h \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝⁴ : DivisionRing k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : Set P\ninst✝ : FiniteDimensional k { x // x ∈ vectorSpan k s }\nh : Coplanar k s ↔ ↑(finrank k { x // x ∈ vectorSpan k s }) ≤ 2\n⊢ Coplanar k s ↔ finrank k { x // x ∈ vectorSpan k s } ≤ 2\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\nι : Type u_4\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np : P\nh : p ∈ affineSpan k s\n⊢ Coplanar k (insert p s) ↔ Coplanar k s\n[PROOFSTEP]\nrw [Coplanar, Coplanar, vectorSpan_insert_eq_vectorSpan h]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\n⊢ finrank k { x // x ∈ vectorSpan k (insert p ↑s) } ≤ finrank k { x // x ∈ direction s } + 1\n[PROOFSTEP]\nby_cases hf : FiniteDimensional k s.direction\n[GOAL]\ncase pos\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : FiniteDimensional k { x // x ∈ direction s }\n⊢ finrank k { x // x ∈ vectorSpan k (insert p ↑s) } ≤ finrank k { x // x ∈ direction s } + 1\ncase neg\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : ¬FiniteDimensional k { x // x ∈ direction s }\n⊢ finrank k { x // x ∈ vectorSpan k (insert p ↑s) } ≤ finrank k { x // x ∈ direction s } + 1\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : ¬FiniteDimensional k { x // x ∈ direction s }\n⊢ finrank k { x // x ∈ vectorSpan k (insert p ↑s) } ≤ finrank k { x // x ∈ direction s } + 1\n[PROOFSTEP]\nhave hf' : ¬FiniteDimensional k (vectorSpan k (insert p (s : Set P))) :=\n  by\n  intro h\n  have h' : s.direction ≤ vectorSpan k (insert p (s : Set P)) :=\n    by\n    conv_lhs => rw [← affineSpan_coe s, direction_affineSpan]\n    exact vectorSpan_mono k (Set.subset_insert _ _)\n  exact hf (Submodule.finiteDimensional_of_le h')\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : ¬FiniteDimensional k { x // x ∈ direction s }\n⊢ ¬FiniteDimensional k { x // x ∈ vectorSpan k (insert p ↑s) }\n[PROOFSTEP]\nintro h\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : ¬FiniteDimensional k { x // x ∈ direction s }\nh : FiniteDimensional k { x // x ∈ vectorSpan k (insert p ↑s) }\n⊢ False\n[PROOFSTEP]\nhave h' : s.direction ≤ vectorSpan k (insert p (s : Set P)) :=\n  by\n  conv_lhs => rw [← affineSpan_coe s, direction_affineSpan]\n  exact vectorSpan_mono k (Set.subset_insert _ _)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : ¬FiniteDimensional k { x // x ∈ direction s }\nh : FiniteDimensional k { x // x ∈ vectorSpan k (insert p ↑s) }\n⊢ direction s ≤ vectorSpan k (insert p ↑s)\n[PROOFSTEP]\nconv_lhs => rw [← affineSpan_coe s, direction_affineSpan]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : ¬FiniteDimensional k { x // x ∈ direction s }\nh : FiniteDimensional k { x // x ∈ vectorSpan k (insert p ↑s) }\n| direction s\n[PROOFSTEP]\nrw [← affineSpan_coe s, direction_affineSpan]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : ¬FiniteDimensional k { x // x ∈ direction s }\nh : FiniteDimensional k { x // x ∈ vectorSpan k (insert p ↑s) }\n| direction s\n[PROOFSTEP]\nrw [← affineSpan_coe s, direction_affineSpan]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : ¬FiniteDimensional k { x // x ∈ direction s }\nh : FiniteDimensional k { x // x ∈ vectorSpan k (insert p ↑s) }\n| direction s\n[PROOFSTEP]\nrw [← affineSpan_coe s, direction_affineSpan]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : ¬FiniteDimensional k { x // x ∈ direction s }\nh : FiniteDimensional k { x // x ∈ vectorSpan k (insert p ↑s) }\n⊢ vectorSpan k ↑s ≤ vectorSpan k (insert p ↑s)\n[PROOFSTEP]\nexact vectorSpan_mono k (Set.subset_insert _ _)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : ¬FiniteDimensional k { x // x ∈ direction s }\nh : FiniteDimensional k { x // x ∈ vectorSpan k (insert p ↑s) }\nh' : direction s ≤ vectorSpan k (insert p ↑s)\n⊢ False\n[PROOFSTEP]\nexact hf (Submodule.finiteDimensional_of_le h')\n[GOAL]\ncase neg\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : ¬FiniteDimensional k { x // x ∈ direction s }\nhf' : ¬FiniteDimensional k { x // x ∈ vectorSpan k (insert p ↑s) }\n⊢ finrank k { x // x ∈ vectorSpan k (insert p ↑s) } ≤ finrank k { x // x ∈ direction s } + 1\n[PROOFSTEP]\nrw [finrank_of_infinite_dimensional hf, finrank_of_infinite_dimensional hf', zero_add]\n[GOAL]\ncase neg\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : ¬FiniteDimensional k { x // x ∈ direction s }\nhf' : ¬FiniteDimensional k { x // x ∈ vectorSpan k (insert p ↑s) }\n⊢ 0 ≤ 1\n[PROOFSTEP]\nexact zero_le_one\n[GOAL]\ncase pos\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf : FiniteDimensional k { x // x ∈ direction s }\n⊢ finrank k { x // x ∈ vectorSpan k (insert p ↑s) } ≤ finrank k { x // x ∈ direction s } + 1\n[PROOFSTEP]\nhave : FiniteDimensional k s.direction := hf\n[GOAL]\ncase pos\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\n⊢ finrank k { x // x ∈ vectorSpan k (insert p ↑s) } ≤ finrank k { x // x ∈ direction s } + 1\n[PROOFSTEP]\nrw [← direction_affineSpan, ← affineSpan_insert_affineSpan]\n[GOAL]\ncase pos\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\n⊢ finrank k { x // x ∈ direction (affineSpan k (insert p ↑(affineSpan k ↑s))) } ≤ finrank k { x // x ∈ direction s } + 1\n[PROOFSTEP]\nrcases(s : Set P).eq_empty_or_nonempty with (hs | ⟨p₀, hp₀⟩)\n[GOAL]\ncase pos.inl\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\nhs : ↑s = ∅\n⊢ finrank k { x // x ∈ direction (affineSpan k (insert p ↑(affineSpan k ↑s))) } ≤ finrank k { x // x ∈ direction s } + 1\n[PROOFSTEP]\nrw [coe_eq_bot_iff] at hs \n[GOAL]\ncase pos.inl\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\nhs : s = ⊥\n⊢ finrank k { x // x ∈ direction (affineSpan k (insert p ↑(affineSpan k ↑s))) } ≤ finrank k { x // x ∈ direction s } + 1\n[PROOFSTEP]\nrw [hs, bot_coe, span_empty, bot_coe, direction_affineSpan, direction_bot, finrank_bot, zero_add]\n[GOAL]\ncase pos.inl\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\nhs : s = ⊥\n⊢ finrank k { x // x ∈ vectorSpan k (insert p ∅) } ≤ 1\n[PROOFSTEP]\nconvert zero_le_one' ℕ\n[GOAL]\ncase h.e'_3\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\nhs : s = ⊥\n⊢ finrank k { x // x ∈ vectorSpan k (insert p ∅) } = 0\n[PROOFSTEP]\nrw [← finrank_bot k V]\n[GOAL]\ncase h.e'_3\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\nhs : s = ⊥\n⊢ finrank k { x // x ∈ vectorSpan k (insert p ∅) } = finrank k { x // x ∈ ⊥ }\n[PROOFSTEP]\nconvert rfl\n[GOAL]\ncase h.e'_3.h.e'_2.h.e'_2.h.h.e'_5\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\nhs : s = ⊥\nx✝ : V\n⊢ ⊥ = vectorSpan k (insert p ∅)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3.h.e'_4.e'_6\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\nhs : s = ⊥\ne_2✝ : { x // x ∈ ⊥ } = { x // x ∈ vectorSpan k (insert p ∅) }\n⊢ ⊥ = vectorSpan k (insert p ∅)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3.h.e'_5.e'_6\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\nhs : s = ⊥\ne_2✝ : { x // x ∈ ⊥ } = { x // x ∈ vectorSpan k (insert p ∅) }\ne_3✝ : Ring.toSemiring = DivisionSemiring.toSemiring\ne_4✝ : HEq (Submodule.addCommGroup ⊥) (Submodule.addCommGroup (vectorSpan k (insert p ∅)))\n⊢ ⊥ = vectorSpan k (insert p ∅)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos.inr.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\np₀ : P\nhp₀ : p₀ ∈ ↑s\n⊢ finrank k { x // x ∈ direction (affineSpan k (insert p ↑(affineSpan k ↑s))) } ≤ finrank k { x // x ∈ direction s } + 1\n[PROOFSTEP]\nrw [affineSpan_coe, direction_affineSpan_insert hp₀, add_comm]\n[GOAL]\ncase pos.inr.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\np₀ : P\nhp₀ : p₀ ∈ ↑s\n⊢ finrank k { x // x ∈ Submodule.span k {p -ᵥ p₀} ⊔ direction s } ≤ 1 + finrank k { x // x ∈ direction s }\n[PROOFSTEP]\nrefine' (Submodule.finrank_add_le_finrank_add_finrank _ _).trans (add_le_add_right _ _)\n[GOAL]\ncase pos.inr.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\np₀ : P\nhp₀ : p₀ ∈ ↑s\n⊢ finrank k { x // x ∈ Submodule.span k {p -ᵥ p₀} } ≤ 1\n[PROOFSTEP]\nrefine' finrank_le_one ⟨p -ᵥ p₀, Submodule.mem_span_singleton_self _⟩ fun v => _\n[GOAL]\ncase pos.inr.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\np₀ : P\nhp₀ : p₀ ∈ ↑s\nv : { x // x ∈ Submodule.span k {p -ᵥ p₀} }\n⊢ ∃ c, c • { val := p -ᵥ p₀, property := (_ : p -ᵥ p₀ ∈ Submodule.span k {p -ᵥ p₀}) } = v\n[PROOFSTEP]\nhave h := v.property\n[GOAL]\ncase pos.inr.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\np₀ : P\nhp₀ : p₀ ∈ ↑s\nv : { x // x ∈ Submodule.span k {p -ᵥ p₀} }\nh : ↑v ∈ Submodule.span k {p -ᵥ p₀}\n⊢ ∃ c, c • { val := p -ᵥ p₀, property := (_ : p -ᵥ p₀ ∈ Submodule.span k {p -ᵥ p₀}) } = v\n[PROOFSTEP]\nrw [Submodule.mem_span_singleton] at h \n[GOAL]\ncase pos.inr.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\np₀ : P\nhp₀ : p₀ ∈ ↑s\nv : { x // x ∈ Submodule.span k {p -ᵥ p₀} }\nh : ∃ a, a • (p -ᵥ p₀) = ↑v\n⊢ ∃ c, c • { val := p -ᵥ p₀, property := (_ : p -ᵥ p₀ ∈ Submodule.span k {p -ᵥ p₀}) } = v\n[PROOFSTEP]\nrcases h with ⟨c, hc⟩\n[GOAL]\ncase pos.inr.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\np₀ : P\nhp₀ : p₀ ∈ ↑s\nv : { x // x ∈ Submodule.span k {p -ᵥ p₀} }\nc : k\nhc : c • (p -ᵥ p₀) = ↑v\n⊢ ∃ c, c • { val := p -ᵥ p₀, property := (_ : p -ᵥ p₀ ∈ Submodule.span k {p -ᵥ p₀}) } = v\n[PROOFSTEP]\nrefine' ⟨c, _⟩\n[GOAL]\ncase pos.inr.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\np₀ : P\nhp₀ : p₀ ∈ ↑s\nv : { x // x ∈ Submodule.span k {p -ᵥ p₀} }\nc : k\nhc : c • (p -ᵥ p₀) = ↑v\n⊢ c • { val := p -ᵥ p₀, property := (_ : p -ᵥ p₀ ∈ Submodule.span k {p -ᵥ p₀}) } = v\n[PROOFSTEP]\next\n[GOAL]\ncase pos.inr.intro.intro.a\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhf this : FiniteDimensional k { x // x ∈ direction s }\np₀ : P\nhp₀ : p₀ ∈ ↑s\nv : { x // x ∈ Submodule.span k {p -ᵥ p₀} }\nc : k\nhc : c • (p -ᵥ p₀) = ↑v\n⊢ ↑(c • { val := p -ᵥ p₀, property := (_ : p -ᵥ p₀ ∈ Submodule.span k {p -ᵥ p₀}) }) = ↑v\n[PROOFSTEP]\nexact hc\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np : P\n⊢ finrank k { x // x ∈ vectorSpan k (insert p s) } ≤ finrank k { x // x ∈ vectorSpan k s } + 1\n[PROOFSTEP]\nrw [← direction_affineSpan, ← affineSpan_insert_affineSpan, direction_affineSpan]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np : P\n⊢ finrank k { x // x ∈ vectorSpan k (insert p ↑(affineSpan k s)) } ≤ finrank k { x // x ∈ vectorSpan k s } + 1\n[PROOFSTEP]\nrefine' (finrank_vectorSpan_insert_le _ _).trans (add_le_add_right _ _)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np : P\n⊢ finrank k { x // x ∈ direction (affineSpan k s) } ≤ finrank k { x // x ∈ vectorSpan k s }\n[PROOFSTEP]\nrw [direction_affineSpan]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : Collinear k s\np : P\n⊢ Coplanar k (insert p s)\n[PROOFSTEP]\nhave : FiniteDimensional k { x // x ∈ vectorSpan k s } := h.finiteDimensional_vectorSpan\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : Collinear k s\np : P\nthis : FiniteDimensional k { x // x ∈ vectorSpan k s }\n⊢ Coplanar k (insert p s)\n[PROOFSTEP]\nrw [coplanar_iff_finrank_le_two]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : Collinear k s\np : P\nthis : FiniteDimensional k { x // x ∈ vectorSpan k s }\n⊢ finrank k { x // x ∈ vectorSpan k (insert p s) } ≤ 2\n[PROOFSTEP]\nexact (finrank_vectorSpan_insert_le_set k s p).trans (add_le_add_right h.finrank_le_one _)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : finrank k V = 2\n⊢ Coplanar k s\n[PROOFSTEP]\nhave : FiniteDimensional k V := finiteDimensional_of_finrank_eq_succ h\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : finrank k V = 2\nthis : FiniteDimensional k V\n⊢ Coplanar k s\n[PROOFSTEP]\nrw [coplanar_iff_finrank_le_two, ← h]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : finrank k V = 2\nthis : FiniteDimensional k V\n⊢ finrank k { x // x ∈ vectorSpan k s } ≤ finrank k V\n[PROOFSTEP]\nexact Submodule.finrank_le _\n[GOAL]\nι : Type u₁\nk : Type u₂\nV : Type u₃\nP : Type u₄\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : AffineSpace V P\ninst✝³ : DivisionRing k\ninst✝² : Module k V\ninst✝¹ : Fintype ι\ninst✝ : FiniteDimensional k V\nh : Fintype.card ι = FiniteDimensional.finrank k V + 1\n⊢ Nonempty (AffineBasis ι k P)\n[PROOFSTEP]\nobtain ⟨s, b, hb⟩ := AffineBasis.exists_affineBasis k V P\n[GOAL]\ncase intro.intro\nι : Type u₁\nk : Type u₂\nV : Type u₃\nP : Type u₄\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : AffineSpace V P\ninst✝³ : DivisionRing k\ninst✝² : Module k V\ninst✝¹ : Fintype ι\ninst✝ : FiniteDimensional k V\nh : Fintype.card ι = FiniteDimensional.finrank k V + 1\ns : Set P\nb : AffineBasis (↑s) k P\nhb : ↑b = Subtype.val\n⊢ Nonempty (AffineBasis ι k P)\n[PROOFSTEP]\nlift s to Finset P using b.finite_set\n[GOAL]\ncase intro.intro.intro\nι : Type u₁\nk : Type u₂\nV : Type u₃\nP : Type u₄\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : AffineSpace V P\ninst✝³ : DivisionRing k\ninst✝² : Module k V\ninst✝¹ : Fintype ι\ninst✝ : FiniteDimensional k V\nh : Fintype.card ι = FiniteDimensional.finrank k V + 1\ns : Finset P\nb : AffineBasis (↑↑s) k P\nhb : ↑b = Subtype.val\n⊢ Nonempty (AffineBasis ι k P)\n[PROOFSTEP]\nrefine' ⟨b.reindex <| Fintype.equivOfCardEq _⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u₁\nk : Type u₂\nV : Type u₃\nP : Type u₄\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : AffineSpace V P\ninst✝³ : DivisionRing k\ninst✝² : Module k V\ninst✝¹ : Fintype ι\ninst✝ : FiniteDimensional k V\nh : Fintype.card ι = FiniteDimensional.finrank k V + 1\ns : Finset P\nb : AffineBasis (↑↑s) k P\nhb : ↑b = Subtype.val\n⊢ Fintype.card ↑↑s = Fintype.card ι\n[PROOFSTEP]\nrw [h, ← b.card_eq_finrank_add_one]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional", "llama_tokens": 57598, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6859494550081925, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.3697152464892773}}
{"text": "[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\ninst✝¹ : PreservesLimit (cospan f f) F\ninst✝ : Mono f\n⊢ Mono (F.map f)\n[PROOFSTEP]\nhave := isLimitPullbackConeMapOfIsLimit F _ (PullbackCone.isLimitMkIdId f)\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\ninst✝¹ : PreservesLimit (cospan f f) F\ninst✝ : Mono f\nthis :\n  let_fun this := (_ : F.map (𝟙 X) ≫ F.map f = F.map (𝟙 X) ≫ F.map f);\n  IsLimit (PullbackCone.mk (F.map (𝟙 X)) (F.map (𝟙 X)) this)\n⊢ Mono (F.map f)\n[PROOFSTEP]\nsimp_rw [F.map_id] at this \n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\ninst✝¹ : PreservesLimit (cospan f f) F\ninst✝ : Mono f\nthis : IsLimit (PullbackCone.mk (𝟙 (F.obj X)) (𝟙 (F.obj X)) (_ : 𝟙 (F.obj X) ≫ F.map f = 𝟙 (F.obj X) ≫ F.map f))\n⊢ Mono (F.map f)\n[PROOFSTEP]\napply PullbackCone.mono_of_isLimitMkIdId _ this\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\ninst✝¹ : ReflectsLimit (cospan f f) F\ninst✝ : Mono (F.map f)\n⊢ Mono f\n[PROOFSTEP]\nhave := PullbackCone.isLimitMkIdId (F.map f)\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\ninst✝¹ : ReflectsLimit (cospan f f) F\ninst✝ : Mono (F.map f)\nthis : IsLimit (PullbackCone.mk (𝟙 (F.obj X)) (𝟙 (F.obj X)) (_ : 𝟙 (F.obj X) ≫ F.map f = 𝟙 (F.obj X) ≫ F.map f))\n⊢ Mono f\n[PROOFSTEP]\nsimp_rw [← F.map_id] at this \n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\ninst✝¹ : ReflectsLimit (cospan f f) F\ninst✝ : Mono (F.map f)\nthis : IsLimit (PullbackCone.mk (F.map (𝟙 X)) (F.map (𝟙 X)) (_ : F.map (𝟙 X) ≫ F.map f = F.map (𝟙 X) ≫ F.map f))\n⊢ Mono f\n[PROOFSTEP]\napply PullbackCone.mono_of_isLimitMkIdId _ (isLimitOfIsLimitPullbackConeMap F _ this)\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\ninst✝¹ : PreservesColimit (span f f) F\ninst✝ : Epi f\n⊢ Epi (F.map f)\n[PROOFSTEP]\nhave := isColimitPushoutCoconeMapOfIsColimit F _ (PushoutCocone.isColimitMkIdId f)\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\ninst✝¹ : PreservesColimit (span f f) F\ninst✝ : Epi f\nthis : IsColimit (PushoutCocone.mk (F.map (𝟙 Y)) (F.map (𝟙 Y)) (_ : F.map f ≫ F.map (𝟙 Y) = F.map f ≫ F.map (𝟙 Y)))\n⊢ Epi (F.map f)\n[PROOFSTEP]\nsimp_rw [F.map_id] at this \n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\ninst✝¹ : PreservesColimit (span f f) F\ninst✝ : Epi f\nthis : IsColimit (PushoutCocone.mk (𝟙 (F.obj Y)) (𝟙 (F.obj Y)) (_ : F.map f ≫ 𝟙 (F.obj Y) = F.map f ≫ 𝟙 (F.obj Y)))\n⊢ Epi (F.map f)\n[PROOFSTEP]\napply PushoutCocone.epi_of_isColimitMkIdId _ this\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\ninst✝¹ : ReflectsColimit (span f f) F\ninst✝ : Epi (F.map f)\n⊢ Epi f\n[PROOFSTEP]\nhave := PushoutCocone.isColimitMkIdId (F.map f)\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\ninst✝¹ : ReflectsColimit (span f f) F\ninst✝ : Epi (F.map f)\nthis : IsColimit (PushoutCocone.mk (𝟙 (F.obj Y)) (𝟙 (F.obj Y)) (_ : F.map f ≫ 𝟙 (F.obj Y) = F.map f ≫ 𝟙 (F.obj Y)))\n⊢ Epi f\n[PROOFSTEP]\nsimp_rw [← F.map_id] at this \n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₂, u₂} D\nF : C ⥤ D\nX Y : C\nf : X ⟶ Y\ninst✝¹ : ReflectsColimit (span f f) F\ninst✝ : Epi (F.map f)\nthis : IsColimit (PushoutCocone.mk (F.map (𝟙 Y)) (F.map (𝟙 Y)) (_ : F.map f ≫ F.map (𝟙 Y) = F.map f ≫ F.map (𝟙 Y)))\n⊢ Epi f\n[PROOFSTEP]\napply PushoutCocone.epi_of_isColimitMkIdId _ (isColimitOfIsColimitPushoutCoconeMap F _ this)\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "llama_tokens": 2236, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7279754489059775, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.36967456985843516}}
{"text": "[GOAL]\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\n⊢ QuasiSeparatedSpace ↑↑X.toPresheafedSpace ↔ ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nrw [QuasiSeparatedSpace_iff]\n[GOAL]\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\n⊢ (∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)) ↔\n    ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\n⊢ (∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)) →\n    ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nintro H U V\n[GOAL]\ncase mp\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)\nU V : ↑(Scheme.affineOpens X)\n⊢ IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nexact H U V U.1.2 U.2.isCompact V.1.2 V.2.isCompact\n[GOAL]\ncase mpr\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\n⊢ (∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)) →\n    ∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\n⊢ ∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)\n[PROOFSTEP]\nsuffices ∀ (U : Opens X.carrier) (_ : IsCompact U.1) (V : Opens X.carrier) (_ : IsCompact V.1), IsCompact (U ⊓ V).1 by\n  intro U V hU hU' hV hV'; exact this ⟨U, hU⟩ hU' ⟨V, hV⟩ hV'\n[GOAL]\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nthis :\n  ∀ (U : Opens ↑↑X.toPresheafedSpace),\n    IsCompact U.carrier → ∀ (V : Opens ↑↑X.toPresheafedSpace), IsCompact V.carrier → IsCompact (U ⊓ V).carrier\n⊢ ∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)\n[PROOFSTEP]\nintro U V hU hU' hV hV'\n[GOAL]\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nthis :\n  ∀ (U : Opens ↑↑X.toPresheafedSpace),\n    IsCompact U.carrier → ∀ (V : Opens ↑↑X.toPresheafedSpace), IsCompact V.carrier → IsCompact (U ⊓ V).carrier\nU V : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\nhV : IsOpen V\nhV' : IsCompact V\n⊢ IsCompact (U ∩ V)\n[PROOFSTEP]\nexact this ⟨U, hU⟩ hU' ⟨V, hV⟩ hV'\n[GOAL]\ncase mpr\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\n⊢ ∀ (U : Opens ↑↑X.toPresheafedSpace),\n    IsCompact U.carrier → ∀ (V : Opens ↑↑X.toPresheafedSpace), IsCompact V.carrier → IsCompact (U ⊓ V).carrier\n[PROOFSTEP]\nintro U hU V hV\n[GOAL]\ncase mpr\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV : Opens ↑↑X.toPresheafedSpace\nhV : IsCompact V.carrier\n⊢ IsCompact (U ⊓ V).carrier\n[PROOFSTEP]\napply compact_open_induction_on (P := _) V hV\n[GOAL]\ncase mpr.h₁\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV : Opens ↑↑X.toPresheafedSpace\nhV : IsCompact V.carrier\n⊢ IsCompact (U ⊓ ⊥).carrier\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.h₂\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV : Opens ↑↑X.toPresheafedSpace\nhV : IsCompact V.carrier\n⊢ ∀ (S : Opens ↑↑X.toPresheafedSpace),\n    IsCompact S.carrier →\n      ∀ (U_1 : ↑(Scheme.affineOpens X)), IsCompact (U ⊓ S).carrier → IsCompact (U ⊓ (S ⊔ ↑U_1)).carrier\n[PROOFSTEP]\nintro S _ V hV\n[GOAL]\ncase mpr.h₂\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV✝ : Opens ↑↑X.toPresheafedSpace\nhV✝ : IsCompact V✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nx✝ : IsCompact S.carrier\nV : ↑(Scheme.affineOpens X)\nhV : IsCompact (U ⊓ S).carrier\n⊢ IsCompact (U ⊓ (S ⊔ ↑V)).carrier\n[PROOFSTEP]\nchange IsCompact (U.1 ∩ (S.1 ∪ V.1))\n[GOAL]\ncase mpr.h₂\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV✝ : Opens ↑↑X.toPresheafedSpace\nhV✝ : IsCompact V✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nx✝ : IsCompact S.carrier\nV : ↑(Scheme.affineOpens X)\nhV : IsCompact (U ⊓ S).carrier\n⊢ IsCompact (U.carrier ∩ (S.carrier ∪ ↑↑V))\n[PROOFSTEP]\nrw [Set.inter_union_distrib_left]\n[GOAL]\ncase mpr.h₂\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV✝ : Opens ↑↑X.toPresheafedSpace\nhV✝ : IsCompact V✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nx✝ : IsCompact S.carrier\nV : ↑(Scheme.affineOpens X)\nhV : IsCompact (U ⊓ S).carrier\n⊢ IsCompact (U.carrier ∩ S.carrier ∪ U.carrier ∩ ↑↑V)\n[PROOFSTEP]\napply hV.union\n[GOAL]\ncase mpr.h₂\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV✝ : Opens ↑↑X.toPresheafedSpace\nhV✝ : IsCompact V✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nx✝ : IsCompact S.carrier\nV : ↑(Scheme.affineOpens X)\nhV : IsCompact (U ⊓ S).carrier\n⊢ IsCompact (U.carrier ∩ ↑↑V)\n[PROOFSTEP]\nclear hV\n[GOAL]\ncase mpr.h₂\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV✝ : Opens ↑↑X.toPresheafedSpace\nhV : IsCompact V✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nx✝ : IsCompact S.carrier\nV : ↑(Scheme.affineOpens X)\n⊢ IsCompact (U.carrier ∩ ↑↑V)\n[PROOFSTEP]\napply compact_open_induction_on (P := _) U hU\n[GOAL]\ncase mpr.h₂.h₁\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV✝ : Opens ↑↑X.toPresheafedSpace\nhV : IsCompact V✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nx✝ : IsCompact S.carrier\nV : ↑(Scheme.affineOpens X)\n⊢ IsCompact (⊥.carrier ∩ ↑↑V)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.h₂.h₂\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV✝ : Opens ↑↑X.toPresheafedSpace\nhV : IsCompact V✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nx✝ : IsCompact S.carrier\nV : ↑(Scheme.affineOpens X)\n⊢ ∀ (S : Opens ↑↑X.toPresheafedSpace),\n    IsCompact S.carrier →\n      ∀ (U : ↑(Scheme.affineOpens X)), IsCompact (S.carrier ∩ ↑↑V) → IsCompact ((S ⊔ ↑U).carrier ∩ ↑↑V)\n[PROOFSTEP]\nintro S _ W hW\n[GOAL]\ncase mpr.h₂.h₂\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV✝ : Opens ↑↑X.toPresheafedSpace\nhV : IsCompact V✝.carrier\nS✝ : Opens ↑↑X.toPresheafedSpace\nx✝¹ : IsCompact S✝.carrier\nV : ↑(Scheme.affineOpens X)\nS : Opens ↑↑X.toPresheafedSpace\nx✝ : IsCompact S.carrier\nW : ↑(Scheme.affineOpens X)\nhW : IsCompact (S.carrier ∩ ↑↑V)\n⊢ IsCompact ((S ⊔ ↑W).carrier ∩ ↑↑V)\n[PROOFSTEP]\nchange IsCompact ((S.1 ∪ W.1) ∩ V.1)\n[GOAL]\ncase mpr.h₂.h₂\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV✝ : Opens ↑↑X.toPresheafedSpace\nhV : IsCompact V✝.carrier\nS✝ : Opens ↑↑X.toPresheafedSpace\nx✝¹ : IsCompact S✝.carrier\nV : ↑(Scheme.affineOpens X)\nS : Opens ↑↑X.toPresheafedSpace\nx✝ : IsCompact S.carrier\nW : ↑(Scheme.affineOpens X)\nhW : IsCompact (S.carrier ∩ ↑↑V)\n⊢ IsCompact ((S.carrier ∪ ↑↑W) ∩ ↑↑V)\n[PROOFSTEP]\nrw [Set.union_inter_distrib_right]\n[GOAL]\ncase mpr.h₂.h₂\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV✝ : Opens ↑↑X.toPresheafedSpace\nhV : IsCompact V✝.carrier\nS✝ : Opens ↑↑X.toPresheafedSpace\nx✝¹ : IsCompact S✝.carrier\nV : ↑(Scheme.affineOpens X)\nS : Opens ↑↑X.toPresheafedSpace\nx✝ : IsCompact S.carrier\nW : ↑(Scheme.affineOpens X)\nhW : IsCompact (S.carrier ∩ ↑↑V)\n⊢ IsCompact (S.carrier ∩ ↑↑V ∪ ↑↑W ∩ ↑↑V)\n[PROOFSTEP]\napply hW.union\n[GOAL]\ncase mpr.h₂.h₂\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nV✝ : Opens ↑↑X.toPresheafedSpace\nhV : IsCompact V✝.carrier\nS✝ : Opens ↑↑X.toPresheafedSpace\nx✝¹ : IsCompact S✝.carrier\nV : ↑(Scheme.affineOpens X)\nS : Opens ↑↑X.toPresheafedSpace\nx✝ : IsCompact S.carrier\nW : ↑(Scheme.affineOpens X)\nhW : IsCompact (S.carrier ∩ ↑↑V)\n⊢ IsCompact (↑↑W ∩ ↑↑V)\n[PROOFSTEP]\napply H\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\n⊢ AffineTargetMorphismProperty.diagonal QuasiCompact.affineProperty f ↔ QuasiSeparatedSpace ↑↑X.toPresheafedSpace\n[PROOFSTEP]\ndelta AffineTargetMorphismProperty.diagonal\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\n⊢ (∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n      [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂],\n      QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)) ↔\n    QuasiSeparatedSpace ↑↑X.toPresheafedSpace\n[PROOFSTEP]\nrw [quasiSeparatedSpace_iff_affine]\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\n⊢ (∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n      [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂],\n      QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)) ↔\n    ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\n⊢ (∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n      [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂],\n      QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)) →\n    ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nintro H U V\n[GOAL]\ncase mp\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH :\n  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\nU V : ↑(Scheme.affineOpens X)\n⊢ IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nhaveI : IsAffine _ := U.2\n[GOAL]\ncase mp\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH :\n  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\nU V : ↑(Scheme.affineOpens X)\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n⊢ IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nhaveI : IsAffine _ := V.2\n[GOAL]\ncase mp\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH :\n  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\nU V : ↑(Scheme.affineOpens X)\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))\n⊢ IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nlet g : pullback (X.ofRestrict U.1.openEmbedding) (X.ofRestrict V.1.openEmbedding) ⟶ X :=\n  pullback.fst ≫\n    X.ofRestrict\n      _\n        -- Porting note: `inferInstance` does not work here\n[GOAL]\ncase mp\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH :\n  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\nU V : ↑(Scheme.affineOpens X)\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))\ng : pullback (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n    (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V))) ⟶\n  X :=\n  pullback.fst ≫ Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))\n⊢ IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nhave : IsOpenImmersion g := PresheafedSpace.IsOpenImmersion.comp _ _\n[GOAL]\ncase mp\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH :\n  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\nU V : ↑(Scheme.affineOpens X)\nthis✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))\ng : pullback (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n    (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V))) ⟶\n  X :=\n  pullback.fst ≫ Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))\nthis : IsOpenImmersion g\n⊢ IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nhave e := Homeomorph.ofEmbedding _ this.base_open.toEmbedding\n[GOAL]\ncase mp\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH :\n  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\nU V : ↑(Scheme.affineOpens X)\nthis✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))\ng : pullback (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n    (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V))) ⟶\n  X :=\n  pullback.fst ≫ Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))\nthis : IsOpenImmersion g\ne :\n  (forget TopCat).obj\n      ↑(pullback (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                (Scheme.ofRestrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace ≃ₜ\n    ↑(Set.range ↑g.val.base)\n⊢ IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nrw [IsOpenImmersion.range_pullback_to_base_of_left] at e \n[GOAL]\ncase mp\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH :\n  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\nU V : ↑(Scheme.affineOpens X)\nthis✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))\ng : pullback (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n    (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V))) ⟶\n  X :=\n  pullback.fst ≫ Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))\nthis : IsOpenImmersion g\ne :\n  (forget TopCat).obj\n      ↑(pullback (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                (Scheme.ofRestrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace ≃ₜ\n    ↑(Set.range ↑(Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))).val.base ∩\n        Set.range ↑(Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V))).val.base)\n⊢ IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nerw [Subtype.range_coe, Subtype.range_coe] at e \n[GOAL]\ncase mp\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH :\n  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\nU V : ↑(Scheme.affineOpens X)\nthis✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))\ng : pullback (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n    (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V))) ⟶\n  X :=\n  pullback.fst ≫ Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))\nthis : IsOpenImmersion g\ne :\n  (forget TopCat).obj\n      ↑(pullback (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                (Scheme.ofRestrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace ≃ₜ\n    ↑(↑↑U ∩ ↑↑V)\n⊢ IsCompact (↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nrw [isCompact_iff_compactSpace]\n[GOAL]\ncase mp\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nH :\n  ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n    [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂], QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\nU V : ↑(Scheme.affineOpens X)\nthis✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))\ng : pullback (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n    (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑V))) ⟶\n  X :=\n  pullback.fst ≫ Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U))\nthis : IsOpenImmersion g\ne :\n  (forget TopCat).obj\n      ↑(pullback (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ↑U)))\n                (Scheme.ofRestrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion ↑V)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace ≃ₜ\n    ↑(↑↑U ∩ ↑↑V)\n⊢ CompactSpace ↑(↑↑U ∩ ↑↑V)\n[PROOFSTEP]\nexact @Homeomorph.compactSpace _ _ _ _ (H _ _) e\n[GOAL]\ncase mpr\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\n⊢ (∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)) →\n    ∀ {U₁ U₂ : Scheme} (f₁ : U₁ ⟶ X) (f₂ : U₂ ⟶ X) [inst : IsAffine U₁] [inst_1 : IsAffine U₂]\n      [inst_2 : IsOpenImmersion f₁] [inst_3 : IsOpenImmersion f₂],\n      QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\n[PROOFSTEP]\nintrov H h₁ h₂\n[GOAL]\ncase mpr\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝² : IsAffine Y\nf : X ⟶ Y\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU₁ U₂ : Scheme\nf₁ : U₁ ⟶ X\nf₂ : U₂ ⟶ X\ninst✝¹ : IsAffine U₁\ninst✝ : IsAffine U₂\nh₁ : IsOpenImmersion f₁\nh₂ : IsOpenImmersion f₂\n⊢ QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\n[PROOFSTEP]\nlet g : pullback f₁ f₂ ⟶ X := pullback.fst ≫ f₁\n[GOAL]\ncase mpr\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝² : IsAffine Y\nf : X ⟶ Y\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU₁ U₂ : Scheme\nf₁ : U₁ ⟶ X\nf₂ : U₂ ⟶ X\ninst✝¹ : IsAffine U₁\ninst✝ : IsAffine U₂\nh₁ : IsOpenImmersion f₁\nh₂ : IsOpenImmersion f₂\ng : pullback f₁ f₂ ⟶ X := pullback.fst ≫ f₁\n⊢ QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\n[PROOFSTEP]\nhave : IsOpenImmersion g := PresheafedSpace.IsOpenImmersion.comp _ _\n[GOAL]\ncase mpr\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝² : IsAffine Y\nf : X ⟶ Y\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU₁ U₂ : Scheme\nf₁ : U₁ ⟶ X\nf₂ : U₂ ⟶ X\ninst✝¹ : IsAffine U₁\ninst✝ : IsAffine U₂\nh₁ : IsOpenImmersion f₁\nh₂ : IsOpenImmersion f₂\ng : pullback f₁ f₂ ⟶ X := pullback.fst ≫ f₁\nthis : IsOpenImmersion g\n⊢ QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\n[PROOFSTEP]\nhave e := Homeomorph.ofEmbedding _ this.base_open.toEmbedding\n[GOAL]\ncase mpr\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝² : IsAffine Y\nf : X ⟶ Y\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU₁ U₂ : Scheme\nf₁ : U₁ ⟶ X\nf₂ : U₂ ⟶ X\ninst✝¹ : IsAffine U₁\ninst✝ : IsAffine U₂\nh₁ : IsOpenImmersion f₁\nh₂ : IsOpenImmersion f₂\ng : pullback f₁ f₂ ⟶ X := pullback.fst ≫ f₁\nthis : IsOpenImmersion g\ne :\n  (forget TopCat).obj ↑(pullback f₁ f₂).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace ≃ₜ\n    ↑(Set.range ↑g.val.base)\n⊢ QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\n[PROOFSTEP]\nrw [IsOpenImmersion.range_pullback_to_base_of_left] at e \n[GOAL]\ncase mpr\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝² : IsAffine Y\nf : X ⟶ Y\nH : ∀ (U V : ↑(Scheme.affineOpens X)), IsCompact (↑↑U ∩ ↑↑V)\nU₁ U₂ : Scheme\nf₁ : U₁ ⟶ X\nf₂ : U₂ ⟶ X\ninst✝¹ : IsAffine U₁\ninst✝ : IsAffine U₂\nh₁ : IsOpenImmersion f₁\nh₂ : IsOpenImmersion f₂\ng : pullback f₁ f₂ ⟶ X := pullback.fst ≫ f₁\nthis : IsOpenImmersion g\ne :\n  (forget TopCat).obj ↑(pullback f₁ f₂).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace ≃ₜ\n    ↑(Set.range ↑f₁.val.base ∩ Set.range ↑f₂.val.base)\n⊢ QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\n[PROOFSTEP]\nsimp_rw [isCompact_iff_compactSpace] at H \n[GOAL]\ncase mpr\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝² : IsAffine Y\nf : X ⟶ Y\nU₁ U₂ : Scheme\nf₁ : U₁ ⟶ X\nf₂ : U₂ ⟶ X\ninst✝¹ : IsAffine U₁\ninst✝ : IsAffine U₂\nh₁ : IsOpenImmersion f₁\nh₂ : IsOpenImmersion f₂\ng : pullback f₁ f₂ ⟶ X := pullback.fst ≫ f₁\nthis : IsOpenImmersion g\ne :\n  (forget TopCat).obj ↑(pullback f₁ f₂).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace ≃ₜ\n    ↑(Set.range ↑f₁.val.base ∩ Set.range ↑f₂.val.base)\nH : ∀ (U V : ↑(Scheme.affineOpens X)), CompactSpace ↑(↑↑U ∩ ↑↑V)\n⊢ QuasiCompact.affineProperty (pullback.mapDesc f₁ f₂ f)\n[PROOFSTEP]\nexact\n  @Homeomorph.compactSpace _ _ _ _\n    (H ⟨⟨_, h₁.base_open.open_range⟩, rangeIsAffineOpenOfOpenImmersion _⟩\n      ⟨⟨_, h₂.base_open.open_range⟩, rangeIsAffineOpenOfOpenImmersion _⟩)\n    e.symm\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ @QuasiSeparated = MorphismProperty.diagonal @QuasiCompact\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.h.a\nX Y : Scheme\nf : X ⟶ Y\nx✝² x✝¹ : Scheme\nx✝ : x✝² ⟶ x✝¹\n⊢ QuasiSeparated x✝ ↔ MorphismProperty.diagonal (@QuasiCompact) x✝\n[PROOFSTEP]\nexact QuasiSeparated_iff _\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ AffineTargetMorphismProperty.diagonal QuasiCompact.affineProperty = QuasiSeparated.affineProperty\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h.h.h.h\nX Y : Scheme\nf : X ⟶ Y\nx✝³ x✝² : Scheme\nx✝¹ : x✝³ ⟶ x✝²\nx✝ : IsAffine x✝²\n⊢ AffineTargetMorphismProperty.diagonal QuasiCompact.affineProperty x✝¹ = QuasiSeparated.affineProperty x✝¹\n[PROOFSTEP]\nrw [quasi_compact_affineProperty_iff_quasiSeparatedSpace]\n[GOAL]\ncase h.h.h.h\nX Y : Scheme\nf : X ⟶ Y\nx✝³ x✝² : Scheme\nx✝¹ : x✝³ ⟶ x✝²\nx✝ : IsAffine x✝²\n⊢ QuasiSeparatedSpace ↑↑x✝³.toPresheafedSpace = QuasiSeparated.affineProperty x✝¹\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ @QuasiSeparated = targetAffineLocally (AffineTargetMorphismProperty.diagonal QuasiCompact.affineProperty)\n[PROOFSTEP]\nrw [quasiSeparated_eq_diagonal_is_quasiCompact, quasiCompact_eq_affineProperty]\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ MorphismProperty.diagonal (targetAffineLocally QuasiCompact.affineProperty) =\n    targetAffineLocally (AffineTargetMorphismProperty.diagonal QuasiCompact.affineProperty)\n[PROOFSTEP]\nexact diagonal_targetAffineLocally_eq_targetAffineLocally _ QuasiCompact.affineProperty_isLocal\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ @QuasiSeparated = targetAffineLocally QuasiSeparated.affineProperty\n[PROOFSTEP]\nrw [quasiSeparated_eq_affineProperty_diagonal, quasi_compact_affineProperty_diagonal_eq]\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\n⊢ TFAE\n    [QuasiSeparated f,\n      ∃ 𝒰 x,\n        ∀ (i : 𝒰.J),\n          QuasiSeparatedSpace\n            ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace,\n      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n        QuasiSeparatedSpace\n          ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace,\n      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst : IsOpenImmersion g],\n        QuasiSeparatedSpace ↑↑(pullback f g).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace,\n      ∃ 𝒰 x 𝒰' x,\n        ∀ (i : 𝒰.J) (j k : (𝒰' i).J),\n          CompactSpace\n            ↑↑(pullback (Scheme.OpenCover.map (𝒰' i) j)\n                        (Scheme.OpenCover.map (𝒰' i) k)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace]\n[PROOFSTEP]\nhave := QuasiCompact.affineProperty_isLocal.diagonal_affine_openCover_TFAE f\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\nthis :\n  TFAE\n    [MorphismProperty.diagonal (targetAffineLocally QuasiCompact.affineProperty) f,\n      ∃ 𝒰 x, ∀ (i : 𝒰.J), AffineTargetMorphismProperty.diagonal QuasiCompact.affineProperty pullback.snd,\n      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n        AffineTargetMorphismProperty.diagonal QuasiCompact.affineProperty pullback.snd,\n      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g],\n        AffineTargetMorphismProperty.diagonal QuasiCompact.affineProperty pullback.snd,\n      ∃ 𝒰 x 𝒰' x_1,\n        ∀ (i : 𝒰.J) (j k : (𝒰' i).J),\n          QuasiCompact.affineProperty\n            (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)]\n⊢ TFAE\n    [QuasiSeparated f,\n      ∃ 𝒰 x,\n        ∀ (i : 𝒰.J),\n          QuasiSeparatedSpace\n            ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace,\n      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n        QuasiSeparatedSpace\n          ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace,\n      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst : IsOpenImmersion g],\n        QuasiSeparatedSpace ↑↑(pullback f g).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace,\n      ∃ 𝒰 x 𝒰' x,\n        ∀ (i : 𝒰.J) (j k : (𝒰' i).J),\n          CompactSpace\n            ↑↑(pullback (Scheme.OpenCover.map (𝒰' i) j)\n                        (Scheme.OpenCover.map (𝒰' i) k)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace]\n[PROOFSTEP]\nsimp_rw [← quasiCompact_eq_affineProperty, ← quasiSeparated_eq_diagonal_is_quasiCompact,\n  quasi_compact_affineProperty_diagonal_eq] at this \n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\nthis :\n  TFAE\n    [QuasiSeparated f, ∃ 𝒰 h, ∀ (i : 𝒰.J), affineProperty pullback.snd,\n      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n        affineProperty pullback.snd,\n      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst_1 : IsOpenImmersion g], affineProperty pullback.snd,\n      ∃ 𝒰 x 𝒰' x_1,\n        ∀ (i : 𝒰.J) (j k : (𝒰' i).J),\n          QuasiCompact.affineProperty\n            (pullback.mapDesc (Scheme.OpenCover.map (𝒰' i) j) (Scheme.OpenCover.map (𝒰' i) k) pullback.snd)]\n⊢ TFAE\n    [QuasiSeparated f,\n      ∃ 𝒰 x,\n        ∀ (i : 𝒰.J),\n          QuasiSeparatedSpace\n            ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace,\n      ∀ (𝒰 : Scheme.OpenCover Y) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n        QuasiSeparatedSpace\n          ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace,\n      ∀ {U : Scheme} (g : U ⟶ Y) [inst : IsAffine U] [inst : IsOpenImmersion g],\n        QuasiSeparatedSpace ↑↑(pullback f g).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace,\n      ∃ 𝒰 x 𝒰' x,\n        ∀ (i : 𝒰.J) (j k : (𝒰' i).J),\n          CompactSpace\n            ↑↑(pullback (Scheme.OpenCover.map (𝒰' i) j)\n                        (Scheme.OpenCover.map (𝒰' i) k)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace]\n[PROOFSTEP]\nexact this\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsAffine Y\n⊢ QuasiSeparated f ↔ QuasiSeparatedSpace ↑↑X.toPresheafedSpace\n[PROOFSTEP]\nrw [quasiSeparated_eq_affineProperty, QuasiSeparated.affineProperty_isLocal.affine_target_iff f,\n  QuasiSeparated.affineProperty]\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\n𝒰 : Scheme.OpenCover Y\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nf : X ⟶ Y\n⊢ QuasiSeparated f ↔\n    ∀ (i : 𝒰.J),\n      QuasiSeparatedSpace\n        ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nrw [quasiSeparated_eq_affineProperty, QuasiSeparated.affineProperty_isLocal.affine_openCover_iff f 𝒰]\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\n𝒰 : Scheme.OpenCover Y\ninst✝ : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)\nf : X ⟶ Y\n⊢ (∀ (i : 𝒰.J), affineProperty pullback.snd) ↔\n    ∀ (i : 𝒰.J),\n      QuasiSeparatedSpace\n        ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nrfl\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\nhY : QuasiSeparatedSpace ↑↑Y.toPresheafedSpace\ninst✝ : QuasiSeparated f\n⊢ QuasiSeparatedSpace ↑↑X.toPresheafedSpace\n[PROOFSTEP]\nrw [quasiSeparatedSpace_iff_quasiSeparated] at hY ⊢\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\nhY : QuasiSeparated (terminal.from Y)\ninst✝ : QuasiSeparated f\n⊢ QuasiSeparated (terminal.from X)\n[PROOFSTEP]\nhave : f ≫ terminal.from Y = terminal.from X := terminalIsTerminal.hom_ext _ _\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\nhY : QuasiSeparated (terminal.from Y)\ninst✝ : QuasiSeparated f\nthis : f ≫ terminal.from Y = terminal.from X\n⊢ QuasiSeparated (terminal.from X)\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\nhY : QuasiSeparated (terminal.from Y)\ninst✝ : QuasiSeparated f\nthis : f ≫ terminal.from Y = terminal.from X\n⊢ QuasiSeparated (f ≫ terminal.from Y)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\n⊢ QuasiSeparatedSpace ↑↑X.toPresheafedSpace\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase inter_isCompact\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\n⊢ ∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)\n[PROOFSTEP]\nintro U V hU hU' hV hV'\n[GOAL]\ncase inter_isCompact\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\nU V : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\nhV : IsOpen V\nhV' : IsCompact V\n⊢ IsCompact (U ∩ V)\n[PROOFSTEP]\nobtain ⟨s, hs, e⟩ := (isCompact_open_iff_eq_basicOpen_union _).mp ⟨hU', hU⟩\n[GOAL]\ncase inter_isCompact.intro.intro\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\nU V : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\nhV : IsOpen V\nhV' : IsCompact V\ns : Set ↑(X.presheaf.obj (op ⊤))\nhs : Set.Finite s\ne : U = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s), ↑(Scheme.basicOpen X i)\n⊢ IsCompact (U ∩ V)\n[PROOFSTEP]\nobtain ⟨s', hs', e'⟩ := (isCompact_open_iff_eq_basicOpen_union _).mp ⟨hV', hV⟩\n[GOAL]\ncase inter_isCompact.intro.intro.intro.intro\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\nU V : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\nhV : IsOpen V\nhV' : IsCompact V\ns : Set ↑(X.presheaf.obj (op ⊤))\nhs : Set.Finite s\ne : U = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s), ↑(Scheme.basicOpen X i)\ns' : Set ↑(X.presheaf.obj (op ⊤))\nhs' : Set.Finite s'\ne' : V = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s'), ↑(Scheme.basicOpen X i)\n⊢ IsCompact (U ∩ V)\n[PROOFSTEP]\nrw [e, e', Set.iUnion₂_inter]\n[GOAL]\ncase inter_isCompact.intro.intro.intro.intro\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\nU V : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\nhV : IsOpen V\nhV' : IsCompact V\ns : Set ↑(X.presheaf.obj (op ⊤))\nhs : Set.Finite s\ne : U = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s), ↑(Scheme.basicOpen X i)\ns' : Set ↑(X.presheaf.obj (op ⊤))\nhs' : Set.Finite s'\ne' : V = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s'), ↑(Scheme.basicOpen X i)\n⊢ IsCompact\n    (⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s),\n      ↑(Scheme.basicOpen X i) ∩ ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s'), ↑(Scheme.basicOpen X i))\n[PROOFSTEP]\nsimp_rw [Set.inter_iUnion₂]\n[GOAL]\ncase inter_isCompact.intro.intro.intro.intro\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\nU V : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\nhV : IsOpen V\nhV' : IsCompact V\ns : Set ↑(X.presheaf.obj (op ⊤))\nhs : Set.Finite s\ne : U = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s), ↑(Scheme.basicOpen X i)\ns' : Set ↑(X.presheaf.obj (op ⊤))\nhs' : Set.Finite s'\ne' : V = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s'), ↑(Scheme.basicOpen X i)\n⊢ IsCompact\n    (⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s) (i_1 : ↑(X.presheaf.obj (op ⊤))) (_ : i_1 ∈ s'),\n      ↑(Scheme.basicOpen X i) ∩ ↑(Scheme.basicOpen X i_1))\n[PROOFSTEP]\napply hs.isCompact_biUnion\n[GOAL]\ncase inter_isCompact.intro.intro.intro.intro\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\nU V : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\nhV : IsOpen V\nhV' : IsCompact V\ns : Set ↑(X.presheaf.obj (op ⊤))\nhs : Set.Finite s\ne : U = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s), ↑(Scheme.basicOpen X i)\ns' : Set ↑(X.presheaf.obj (op ⊤))\nhs' : Set.Finite s'\ne' : V = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s'), ↑(Scheme.basicOpen X i)\n⊢ ∀ (i : ↑(X.presheaf.obj (op ⊤))),\n    i ∈ s →\n      IsCompact (⋃ (i_1 : ↑(X.presheaf.obj (op ⊤))) (_ : i_1 ∈ s'), ↑(Scheme.basicOpen X i) ∩ ↑(Scheme.basicOpen X i_1))\n[PROOFSTEP]\nintro i _\n[GOAL]\ncase inter_isCompact.intro.intro.intro.intro\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\nU V : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\nhV : IsOpen V\nhV' : IsCompact V\ns : Set ↑(X.presheaf.obj (op ⊤))\nhs : Set.Finite s\ne : U = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s), ↑(Scheme.basicOpen X i)\ns' : Set ↑(X.presheaf.obj (op ⊤))\nhs' : Set.Finite s'\ne' : V = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s'), ↑(Scheme.basicOpen X i)\ni : ↑(X.presheaf.obj (op ⊤))\na✝ : i ∈ s\n⊢ IsCompact (⋃ (i_1 : ↑(X.presheaf.obj (op ⊤))) (_ : i_1 ∈ s'), ↑(Scheme.basicOpen X i) ∩ ↑(Scheme.basicOpen X i_1))\n[PROOFSTEP]\napply hs'.isCompact_biUnion\n[GOAL]\ncase inter_isCompact.intro.intro.intro.intro\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\nU V : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\nhV : IsOpen V\nhV' : IsCompact V\ns : Set ↑(X.presheaf.obj (op ⊤))\nhs : Set.Finite s\ne : U = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s), ↑(Scheme.basicOpen X i)\ns' : Set ↑(X.presheaf.obj (op ⊤))\nhs' : Set.Finite s'\ne' : V = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s'), ↑(Scheme.basicOpen X i)\ni : ↑(X.presheaf.obj (op ⊤))\na✝ : i ∈ s\n⊢ ∀ (i_1 : ↑(X.presheaf.obj (op ⊤))), i_1 ∈ s' → IsCompact (↑(Scheme.basicOpen X i) ∩ ↑(Scheme.basicOpen X i_1))\n[PROOFSTEP]\nintro i' _\n[GOAL]\ncase inter_isCompact.intro.intro.intro.intro\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\nU V : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\nhV : IsOpen V\nhV' : IsCompact V\ns : Set ↑(X.presheaf.obj (op ⊤))\nhs : Set.Finite s\ne : U = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s), ↑(Scheme.basicOpen X i)\ns' : Set ↑(X.presheaf.obj (op ⊤))\nhs' : Set.Finite s'\ne' : V = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s'), ↑(Scheme.basicOpen X i)\ni : ↑(X.presheaf.obj (op ⊤))\na✝¹ : i ∈ s\ni' : ↑(X.presheaf.obj (op ⊤))\na✝ : i' ∈ s'\n⊢ IsCompact (↑(Scheme.basicOpen X i) ∩ ↑(Scheme.basicOpen X i'))\n[PROOFSTEP]\nchange IsCompact (X.basicOpen i ⊓ X.basicOpen i').1\n[GOAL]\ncase inter_isCompact.intro.intro.intro.intro\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\nU V : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\nhV : IsOpen V\nhV' : IsCompact V\ns : Set ↑(X.presheaf.obj (op ⊤))\nhs : Set.Finite s\ne : U = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s), ↑(Scheme.basicOpen X i)\ns' : Set ↑(X.presheaf.obj (op ⊤))\nhs' : Set.Finite s'\ne' : V = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s'), ↑(Scheme.basicOpen X i)\ni : ↑(X.presheaf.obj (op ⊤))\na✝¹ : i ∈ s\ni' : ↑(X.presheaf.obj (op ⊤))\na✝ : i' ∈ s'\n⊢ IsCompact (Scheme.basicOpen X i ⊓ Scheme.basicOpen X i').carrier\n[PROOFSTEP]\nrw [← Scheme.basicOpen_mul]\n[GOAL]\ncase inter_isCompact.intro.intro.intro.intro\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\ninst✝ : IsAffine X\nU V : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\nhV : IsOpen V\nhV' : IsCompact V\ns : Set ↑(X.presheaf.obj (op ⊤))\nhs : Set.Finite s\ne : U = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s), ↑(Scheme.basicOpen X i)\ns' : Set ↑(X.presheaf.obj (op ⊤))\nhs' : Set.Finite s'\ne' : V = ⋃ (i : ↑(X.presheaf.obj (op ⊤))) (_ : i ∈ s'), ↑(Scheme.basicOpen X i)\ni : ↑(X.presheaf.obj (op ⊤))\na✝¹ : i ∈ s\ni' : ↑(X.presheaf.obj (op ⊤))\na✝ : i' ∈ s'\n⊢ IsCompact (Scheme.basicOpen X (i * i')).carrier\n[PROOFSTEP]\nexact ((topIsAffineOpen _).basicOpenIsAffine _).isCompact\n[GOAL]\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ IsQuasiSeparated ↑U\n[PROOFSTEP]\nrw [isQuasiSeparated_iff_quasiSeparatedSpace]\n[GOAL]\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\n⊢ QuasiSeparatedSpace ↑↑U\ncase hs X✝ Y : Scheme f : X✝ ⟶ Y X : Scheme U : Opens ↑↑X.toPresheafedSpace hU : IsAffineOpen U ⊢ IsOpen ↑U\n[PROOFSTEP]\nexacts [@AlgebraicGeometry.quasiSeparatedSpace_of_isAffine _ hU, U.isOpen]\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH : QuasiSeparated (f ≫ g)\n⊢ QuasiSeparated f\n[PROOFSTEP]\nhave h01 := (QuasiSeparated.affine_openCover_TFAE f).out 0 1\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH : QuasiSeparated (f ≫ g)\nh01 :\n  QuasiSeparated f ↔\n    ∃ 𝒰 x,\n      ∀ (i : 𝒰.J),\n        QuasiSeparatedSpace\n          ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ QuasiSeparated f\n[PROOFSTEP]\nrw [h01]\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH : QuasiSeparated (f ≫ g)\nh01 :\n  QuasiSeparated f ↔\n    ∃ 𝒰 x,\n      ∀ (i : 𝒰.J),\n        QuasiSeparatedSpace\n          ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ ∃ 𝒰 x,\n    ∀ (i : 𝒰.J),\n      QuasiSeparatedSpace\n        ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nclear h01\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH : QuasiSeparated (f ≫ g)\n⊢ ∃ 𝒰 x,\n    ∀ (i : 𝒰.J),\n      QuasiSeparatedSpace\n        ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nhave h02 := (QuasiSeparated.affine_openCover_TFAE (f ≫ g)).out 0 2\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH : QuasiSeparated (f ≫ g)\nh02 :\n  QuasiSeparated (f ≫ g) ↔\n    ∀ (𝒰 : Scheme.OpenCover Z) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      QuasiSeparatedSpace\n        ↑↑(pullback (f ≫ g) (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ ∃ 𝒰 x,\n    ∀ (i : 𝒰.J),\n      QuasiSeparatedSpace\n        ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nrw [h02] at H \n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH :\n  ∀ (𝒰 : Scheme.OpenCover Z) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n    QuasiSeparatedSpace\n      ↑↑(pullback (f ≫ g) (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nh02 :\n  QuasiSeparated (f ≫ g) ↔\n    ∀ (𝒰 : Scheme.OpenCover Z) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n      QuasiSeparatedSpace\n        ↑↑(pullback (f ≫ g) (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ ∃ 𝒰 x,\n    ∀ (i : 𝒰.J),\n      QuasiSeparatedSpace\n        ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nclear h02\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH :\n  ∀ (𝒰 : Scheme.OpenCover Z) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n    QuasiSeparatedSpace\n      ↑↑(pullback (f ≫ g) (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ ∃ 𝒰 x,\n    ∀ (i : 𝒰.J),\n      QuasiSeparatedSpace\n        ↑↑(pullback f (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nrefine\n  ⟨(Z.affineCover.pullbackCover g).bind fun x => Scheme.affineCover _, ?_, ?_⟩\n    -- constructor\n[GOAL]\ncase refine_1\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH :\n  ∀ (𝒰 : Scheme.OpenCover Z) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n    QuasiSeparatedSpace\n      ↑↑(pullback (f ≫ g) (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ ∀\n    (i :\n      (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n          Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x)).J),\n    IsAffine\n      (Scheme.OpenCover.obj\n        (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n          Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n        i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine_1\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH :\n  ∀ (𝒰 : Scheme.OpenCover Z) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n    QuasiSeparatedSpace\n      ↑↑(pullback (f ≫ g) (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\ni :\n  (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n      Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x)).J\n⊢ IsAffine\n    (Scheme.OpenCover.obj\n      (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n        Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n      i)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine_1\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH :\n  ∀ (𝒰 : Scheme.OpenCover Z) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n    QuasiSeparatedSpace\n      ↑↑(pullback (f ≫ g) (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\ni :\n  (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n      Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x)).J\n⊢ IsAffine\n    (Scheme.OpenCover.obj (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i.fst))) i.snd)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase refine_2\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH :\n  ∀ (𝒰 : Scheme.OpenCover Z) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n    QuasiSeparatedSpace\n      ↑↑(pullback (f ≫ g) (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ ∀\n    (i :\n      (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n          Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x)).J),\n    QuasiSeparatedSpace\n      ↑↑(pullback f\n                  (Scheme.OpenCover.map\n                    (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n                      Scheme.affineCover\n                        (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n                    i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nrintro ⟨i, j⟩\n[GOAL]\ncase refine_2.mk\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH :\n  ∀ (𝒰 : Scheme.OpenCover Z) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n    QuasiSeparatedSpace\n      ↑↑(pullback (f ≫ g) (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\ni : (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g).J\nj :\n  ((fun x => Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x)) i).J\n⊢ QuasiSeparatedSpace\n    ↑↑(pullback f\n                (Scheme.OpenCover.map\n                  (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n                    Scheme.affineCover\n                      (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n                  { fst := i, snd := j })).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\ndsimp at i j \n[GOAL]\ncase refine_2.mk\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nH :\n  ∀ (𝒰 : Scheme.OpenCover Z) [inst : ∀ (i : 𝒰.J), IsAffine (Scheme.OpenCover.obj 𝒰 i)] (i : 𝒰.J),\n    QuasiSeparatedSpace\n      ↑↑(pullback (f ≫ g) (Scheme.OpenCover.map 𝒰 i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\n⊢ QuasiSeparatedSpace\n    ↑↑(pullback f\n                (Scheme.OpenCover.map\n                  (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n                    Scheme.affineCover\n                      (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n                  { fst := i, snd := j })).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nspecialize H _ i\n[GOAL]\ncase refine_2.mk\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\nH :\n  QuasiSeparatedSpace\n    ↑↑(pullback (f ≫ g)\n                (Scheme.OpenCover.map (Scheme.affineCover Z) i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ QuasiSeparatedSpace\n    ↑↑(pullback f\n                (Scheme.OpenCover.map\n                  (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n                    Scheme.affineCover\n                      (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n                  { fst := i, snd := j })).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nrefine @quasiSeparatedSpace_of_quasiSeparated _ _ ?_ H ?_\n[GOAL]\ncase refine_2.mk.refine_1\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\nH :\n  QuasiSeparatedSpace\n    ↑↑(pullback (f ≫ g)\n                (Scheme.OpenCover.map (Scheme.affineCover Z) i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ pullback f\n      (Scheme.OpenCover.map\n        (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n          Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n        { fst := i, snd := j }) ⟶\n    pullback (f ≫ g) (Scheme.OpenCover.map (Scheme.affineCover Z) i)\n[PROOFSTEP]\nexact\n  pullback.map _ _ _ _ (𝟙 _) _ _ (by simp) (Category.comp_id _) ≫\n    (pullbackRightPullbackFstIso g (Z.affineCover.map i) f).hom\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\nH :\n  QuasiSeparatedSpace\n    ↑↑(pullback (f ≫ g)\n                (Scheme.OpenCover.map (Scheme.affineCover Z) i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ f ≫ 𝟙 Y = 𝟙 X ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_2.mk.refine_2\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\nH :\n  QuasiSeparatedSpace\n    ↑↑(pullback (f ≫ g)\n                (Scheme.OpenCover.map (Scheme.affineCover Z) i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ QuasiSeparated\n    (pullback.map f\n        (Scheme.OpenCover.map\n          (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n            Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n          { fst := i, snd := j })\n        f (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) { fst := i, snd := j }.fst)\n        (𝟙 X)\n        (Scheme.OpenCover.map\n          ((fun x =>\n              Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n            { fst := i, snd := j }.fst)\n          { fst := i, snd := j }.snd)\n        (𝟙 Y) (_ : f ≫ 𝟙 Y = 𝟙 X ≫ f)\n        (_ :\n          Scheme.OpenCover.map\n                (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n                  Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n                { fst := i, snd := j } ≫\n              𝟙 Y =\n            Scheme.OpenCover.map\n              (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n                Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n              { fst := i, snd := j }) ≫\n      (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n[PROOFSTEP]\napply (config := { allowSynthFailures := true }) AlgebraicGeometry.quasiSeparatedOfMono\n[GOAL]\ncase inst\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ni : (Scheme.affineCover Z).J\nj : (Scheme.affineCover (pullback g (Scheme.OpenCover.map (Scheme.affineCover Z) i))).J\nH :\n  QuasiSeparatedSpace\n    ↑↑(pullback (f ≫ g)\n                (Scheme.OpenCover.map (Scheme.affineCover Z) i)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ Mono\n    (pullback.map f\n        (Scheme.OpenCover.map\n          (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n            Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n          { fst := i, snd := j })\n        f (Scheme.OpenCover.map (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) { fst := i, snd := j }.fst)\n        (𝟙 X)\n        (Scheme.OpenCover.map\n          ((fun x =>\n              Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n            { fst := i, snd := j }.fst)\n          { fst := i, snd := j }.snd)\n        (𝟙 Y) (_ : f ≫ 𝟙 Y = 𝟙 X ≫ f)\n        (_ :\n          Scheme.OpenCover.map\n                (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n                  Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n                { fst := i, snd := j } ≫\n              𝟙 Y =\n            Scheme.OpenCover.map\n              (Scheme.OpenCover.bind (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) fun x =>\n                Scheme.affineCover (Scheme.OpenCover.obj (Scheme.OpenCover.pullbackCover (Scheme.affineCover Z) g) x))\n              { fst := i, snd := j }) ≫\n      (pullbackRightPullbackFstIso g (Scheme.OpenCover.map (Scheme.affineCover Z) i) f).hom)\n[PROOFSTEP]\napply mono_comp\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n⊢ ∃ n y, y |_ Scheme.basicOpen X f = (f |_ Scheme.basicOpen X f) ^ n * x\n[PROOFSTEP]\nhave := (isLocalization_basicOpen hU f).2\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nthis :\n  ∀ (z : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n    ∃ x,\n      z * ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) ↑x.snd =\n        ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) x.fst\n⊢ ∃ n y, y |_ Scheme.basicOpen X f = (f |_ Scheme.basicOpen X f) ^ n * x\n[PROOFSTEP]\nobtain ⟨⟨y, _, n, rfl⟩, d⟩ := this x\n[GOAL]\ncase intro.mk.mk.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nthis :\n  ∀ (z : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n    ∃ x,\n      z * ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) ↑x.snd =\n        ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) x.fst\ny : ↑(X.presheaf.obj (op U))\nn : ℕ\nd :\n  x *\n      ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n        ↑(y,\n              { val := (fun x x_1 => x ^ x_1) f n,\n                property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) }).snd =\n    ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n      (y,\n          { val := (fun x x_1 => x ^ x_1) f n,\n            property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) }).fst\n⊢ ∃ n y, y |_ Scheme.basicOpen X f = (f |_ Scheme.basicOpen X f) ^ n * x\n[PROOFSTEP]\nuse n, y\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nthis :\n  ∀ (z : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n    ∃ x,\n      z * ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) ↑x.snd =\n        ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) x.fst\ny : ↑(X.presheaf.obj (op U))\nn : ℕ\nd :\n  x *\n      ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n        ↑(y,\n              { val := (fun x x_1 => x ^ x_1) f n,\n                property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) }).snd =\n    ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n      (y,\n          { val := (fun x x_1 => x ^ x_1) f n,\n            property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) }).fst\n⊢ y |_ Scheme.basicOpen X f = (f |_ Scheme.basicOpen X f) ^ n * x\n[PROOFSTEP]\ndelta TopCat.Presheaf.restrictOpen TopCat.Presheaf.restrict\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nf : ↑(X.presheaf.obj (op U))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nthis :\n  ∀ (z : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n    ∃ x,\n      z * ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) ↑x.snd =\n        ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) x.fst\ny : ↑(X.presheaf.obj (op U))\nn : ℕ\nd :\n  x *\n      ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n        ↑(y,\n              { val := (fun x x_1 => x ^ x_1) f n,\n                property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) }).snd =\n    ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n      (y,\n          { val := (fun x x_1 => x ^ x_1) f n,\n            property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) }).fst\n⊢ ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op) y =\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op) f ^ n * x\n[PROOFSTEP]\nsimpa [mul_comm x] using d.symm\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁\n[PROOFSTEP]\nerw [X.basicOpen_res]\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\n⊢ U₁ ⊓ Scheme.basicOpen X f ≤ U₁\n[PROOFSTEP]\nexact inf_le_left\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f\n[PROOFSTEP]\nerw [X.basicOpen_res]\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\n⊢ U₁ ⊓ Scheme.basicOpen X f ≤ Scheme.basicOpen X f\n[PROOFSTEP]\nexact inf_le_right\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂\n[PROOFSTEP]\nrw [X.basicOpen_res]\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n⊢ U₂ ⊓ Scheme.basicOpen X f ≤ U₂\n[PROOFSTEP]\nexact inf_le_left\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f\n[PROOFSTEP]\nrw [X.basicOpen_res]\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n⊢ U₂ ⊓ Scheme.basicOpen X f ≤ Scheme.basicOpen X f\n[PROOFSTEP]\nexact inf_le_right\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n⊢ ∃ n,\n    ↑(X.presheaf.map (homOfLE h₁).op) (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f ^ (n + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE h₂).op) (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f ^ (n + n₁) * y₂)\n[PROOFSTEP]\nobtain ⟨⟨_, n, rfl⟩, e⟩ :=\n  (@IsLocalization.eq_iff_exists _ _ _ _ _ _\n        (isLocalization_basicOpen S.2 (X.presheaf.map (homOfLE <| le_trans h₁ le_sup_left).op f))\n        (X.presheaf.map (homOfLE <| h₁).op (X.presheaf.map (homOfLE le_sup_left).op f ^ n₂ * y₁))\n        (X.presheaf.map (homOfLE <| h₂).op (X.presheaf.map (homOfLE le_sup_right).op f ^ n₁ * y₂))).mp <|\n    by\n    -- Porting note: was just a `simp`, but know as some lemmas need `erw`, just a `simp` does not\n        -- leave the goal in a desired form\n    rw [RingHom.algebraMap_toAlgebra, map_mul, map_mul, map_pow, map_pow, map_mul, map_pow, map_mul]\n    erw [map_pow]\n    rw [← comp_apply, ← comp_apply]\n    erw [← comp_apply, ← comp_apply, ← comp_apply, ← comp_apply]\n    simp only [← Functor.map_comp, ← op_comp, homOfLE_comp]\n    have h₃ : X.basicOpen ((X.presheaf.map (homOfLE (h₁.trans le_sup_left)).op) f) ≤ S.val := by\n      simpa only [X.basicOpen_res] using inf_le_left\n    trans\n      X.presheaf.map (homOfLE <| h₃.trans <| h₁.trans le_sup_left).op f ^ (n₂ + n₁) *\n        X.presheaf.map (homOfLE <| (X.basicOpen_res f _).trans_le inf_le_right).op x\n    · rw [pow_add, mul_assoc]; congr 1\n      convert congr_arg (X.presheaf.map (homOfLE _).op) e₁ using 1\n      pick_goal 3\n      · rw [X.basicOpen_res, X.basicOpen_res]; rintro x ⟨H₁, H₂⟩; exact ⟨h₁ H₁, H₂⟩\n      · simp only [map_pow, map_mul, ← comp_apply, ← Functor.map_comp, ← op_comp]; congr 1\n      · simp only [map_pow, map_mul, ← comp_apply, ← Functor.map_comp, ← op_comp]; congr\n    · rw [add_comm, pow_add, mul_assoc]; congr 1\n      convert congr_arg (X.presheaf.map (homOfLE _).op) e₂.symm\n      · simp only [map_pow, map_mul, ← comp_apply, ← Functor.map_comp, ← op_comp]; congr\n      · simp only [map_pow, map_mul, ← comp_apply, ← Functor.map_comp, ← op_comp]; congr\n      · simp only [X.basicOpen_res]\n        rintro x ⟨H₁, H₂⟩; exact ⟨h₂ H₁, H₂⟩\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n⊢ ↑(algebraMap ↑(X.presheaf.obj (op ↑S))\n          ↑(X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f)))))\n      (↑(X.presheaf.map (homOfLE h₁).op) (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f ^ n₂ * y₁)) =\n    ↑(algebraMap ↑(X.presheaf.obj (op ↑S))\n          ↑(X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f)))))\n      (↑(X.presheaf.map (homOfLE h₂).op) (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f ^ n₁ * y₂))\n[PROOFSTEP]\nrw [RingHom.algebraMap_toAlgebra, map_mul, map_mul, map_pow, map_pow, map_mul, map_pow, map_mul]\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      ↑S)).op)\n          (↑(X.presheaf.map (homOfLE h₁).op) (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f)) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    ↑S)).op)\n        (↑(X.presheaf.map (homOfLE h₁).op) y₁) =\n    ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    ↑S)).op)\n        (↑(X.presheaf.map (homOfLE h₂).op) (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^ n₁) *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    ↑S)).op)\n        (↑(X.presheaf.map (homOfLE h₂).op) y₂)\n[PROOFSTEP]\nerw [map_pow]\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      ↑S)).op)\n          (↑(X.presheaf.map (homOfLE h₁).op) (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f)) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    ↑S)).op)\n        (↑(X.presheaf.map (homOfLE h₁).op) y₁) =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      ↑S)).op)\n          (↑(X.presheaf.map (homOfLE h₂).op) (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f)) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    ↑S)).op)\n        (↑(X.presheaf.map (homOfLE h₂).op) y₂)\n[PROOFSTEP]\nrw [← comp_apply, ← comp_apply]\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op ≫ X.presheaf.map (homOfLE h₁).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    ↑S)).op)\n        (↑(X.presheaf.map (homOfLE h₁).op) y₁) =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op ≫ X.presheaf.map (homOfLE h₂).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    ↑S)).op)\n        (↑(X.presheaf.map (homOfLE h₂).op) y₂)\n[PROOFSTEP]\nerw [← comp_apply, ← comp_apply, ← comp_apply, ← comp_apply]\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n⊢ ↑((X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op ≫ X.presheaf.map (homOfLE h₁).op) ≫\n              X.presheaf.map\n                (homOfLE\n                    (_ :\n                      RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                        ↑S)).op)\n          f ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE h₁).op ≫\n            X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      ↑S)).op)\n        y₁ =\n    ↑((X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op ≫ X.presheaf.map (homOfLE h₂).op) ≫\n              X.presheaf.map\n                (homOfLE\n                    (_ :\n                      RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                        ↑S)).op)\n          f ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE h₂).op ≫\n            X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      ↑S)).op)\n        y₂\n[PROOFSTEP]\nsimp only [← Functor.map_comp, ← op_comp, homOfLE_comp]\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      U₁ ⊔ U₂)).op)\n          f ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    U₁)).op)\n        y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      U₁ ⊔ U₂)).op)\n          f ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    U₂)).op)\n        y₂\n[PROOFSTEP]\nhave h₃ : X.basicOpen ((X.presheaf.map (homOfLE (h₁.trans le_sup_left)).op) f) ≤ S.val := by\n  simpa only [X.basicOpen_res] using inf_le_left\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n[PROOFSTEP]\nsimpa only [X.basicOpen_res] using inf_le_left\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      U₁ ⊔ U₂)).op)\n          f ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    U₁)).op)\n        y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      U₁ ⊔ U₂)).op)\n          f ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    U₂)).op)\n        y₂\n[PROOFSTEP]\ntrans\n  X.presheaf.map (homOfLE <| h₃.trans <| h₁.trans le_sup_left).op f ^ (n₂ + n₁) *\n    X.presheaf.map (homOfLE <| (X.basicOpen_res f _).trans_le inf_le_right).op x\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      U₁ ⊔ U₂)).op)\n          f ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    U₁)).op)\n        y₁ =\n    ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n          f ^\n        (n₂ + n₁) *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n[PROOFSTEP]\nrw [pow_add, mul_assoc]\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      U₁ ⊔ U₂)).op)\n          f ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    U₁)).op)\n        y₁ =\n    ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n          f ^\n        n₂ *\n      (↑(X.presheaf.map\n                (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n            f ^\n          n₁ *\n        ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      Scheme.basicOpen X f)).op)\n          x)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n          f ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n[PROOFSTEP]\nconvert congr_arg (X.presheaf.map (homOfLE _).op) e₁ using 1\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE ?e_a.convert_1✝).op)\n      (↑(X.presheaf.map\n            (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n        y₁)\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n          f ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x =\n    ↑(X.presheaf.map (homOfLE ?e_a.convert_1✝).op)\n      (↑(X.presheaf.map\n                (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n            (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n          n₁ *\n        ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤\n                      Scheme.basicOpen X f)).op)\n          x)\ncase e_a.convert_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f)\n[PROOFSTEP]\npick_goal 3\n[GOAL]\ncase e_a.convert_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f)\n[PROOFSTEP]\nrw [X.basicOpen_res, X.basicOpen_res]\n[GOAL]\ncase e_a.convert_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑S ⊓ Scheme.basicOpen X f ≤ U₁ ⊓ Scheme.basicOpen X f\n[PROOFSTEP]\nrintro x ⟨H₁, H₂⟩\n[GOAL]\ncase e_a.convert_1.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx✝ : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x✝\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x✝\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\nx : ↑↑X.toPresheafedSpace\nH₁ : x ∈ ↑↑S\nH₂ : x ∈ ↑(Scheme.basicOpen X f)\n⊢ x ∈ ↑(U₁ ⊓ Scheme.basicOpen X f)\n[PROOFSTEP]\nexact ⟨h₁ H₁, H₂⟩\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f))).op)\n      (↑(X.presheaf.map\n            (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n        y₁)\n[PROOFSTEP]\nsimp only [map_pow, map_mul, ← comp_apply, ← Functor.map_comp, ← op_comp]\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map\n          (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f)) ≫\n              homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n          f ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x =\n    ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f))).op)\n      (↑(X.presheaf.map\n                (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n            (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n          n₁ *\n        ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤\n                      Scheme.basicOpen X f)).op)\n          x)\n[PROOFSTEP]\nsimp only [map_pow, map_mul, ← comp_apply, ← Functor.map_comp, ← op_comp]\n[GOAL]\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n          f ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x =\n    ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                        Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f)) ≫\n                  homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁) ≫\n                    homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op)\n          f ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f)) ≫\n                homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤\n                      Scheme.basicOpen X f)).op)\n        x\n[PROOFSTEP]\ncongr\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n          f ^\n        (n₂ + n₁) *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      U₁ ⊔ U₂)).op)\n          f ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    U₂)).op)\n        y₂\n[PROOFSTEP]\nrw [add_comm, pow_add, mul_assoc]\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n          f ^\n        n₁ *\n      (↑(X.presheaf.map\n                (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n            f ^\n          n₂ *\n        ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      Scheme.basicOpen X f)).op)\n          x) =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                      U₁ ⊔ U₂)).op)\n          f ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n                    U₂)).op)\n        y₂\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n          f ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x =\n    ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂\n[PROOFSTEP]\nconvert congr_arg (X.presheaf.map (homOfLE _).op) e₂.symm\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n          f ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x =\n    ↑(X.presheaf.map (homOfLE ?e_a.convert_1✝).op)\n      (↑(X.presheaf.map\n                (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n            (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n          n₂ *\n        ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤\n                      Scheme.basicOpen X f)).op)\n          x)\n[PROOFSTEP]\nsimp only [map_pow, map_mul, ← comp_apply, ← Functor.map_comp, ← op_comp]\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₁ ⊔ U₂)).op)\n          f ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x =\n    ↑(X.presheaf.map\n              (homOfLE ?e_a.convert_1✝ ≫\n                  homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂) ≫\n                    homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op)\n          f ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE ?e_a.convert_1✝ ≫\n                homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤\n                      Scheme.basicOpen X f)).op)\n        x\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE ?e_a.convert_1✝).op)\n      (↑(X.presheaf.map\n            (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n        y₂)\n[PROOFSTEP]\nsimp only [map_pow, map_mul, ← comp_apply, ← Functor.map_comp, ← op_comp]\n[GOAL]\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                RingedSpace.basicOpen X.toSheafedSpace (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map\n          (homOfLE ?e_a.convert_1✝ ≫\n              homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.convert_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤\n    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f)\n[PROOFSTEP]\nsimp only [X.basicOpen_res]\n[GOAL]\ncase e_a.convert_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\n⊢ ↑S ⊓ Scheme.basicOpen X f ≤ U₂ ⊓ Scheme.basicOpen X f\n[PROOFSTEP]\nrintro x ⟨H₁, H₂⟩\n[GOAL]\ncase e_a.convert_1.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx✝ : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x✝\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x✝\nh₃ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) ≤ ↑S\nx : ↑↑X.toPresheafedSpace\nH₁ : x ∈ ↑↑S\nH₂ : x ∈ ↑(Scheme.basicOpen X f)\n⊢ x ∈ ↑(U₂ ⊓ Scheme.basicOpen X f)\n[PROOFSTEP]\nexact ⟨h₂ H₁, H₂⟩\n[GOAL]\ncase intro.mk.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn : ℕ\ne :\n  ↑{ val := (fun x x_1 => x ^ x_1) (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) n,\n          property :=\n            (_ :\n              ∃ y,\n                (fun x x_1 => x ^ x_1) (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) y =\n                  (fun x x_1 => x ^ x_1) (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) n) } *\n      ↑(X.presheaf.map (homOfLE h₁).op) (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f ^ n₂ * y₁) =\n    ↑{ val := (fun x x_1 => x ^ x_1) (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) n,\n          property :=\n            (_ :\n              ∃ y,\n                (fun x x_1 => x ^ x_1) (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) y =\n                  (fun x x_1 => x ^ x_1) (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) n) } *\n      ↑(X.presheaf.map (homOfLE h₂).op) (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f ^ n₁ * y₂)\n⊢ ∃ n,\n    ↑(X.presheaf.map (homOfLE h₁).op) (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f ^ (n + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE h₂).op) (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f ^ (n + n₁) * y₂)\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn : ℕ\ne :\n  ↑{ val := (fun x x_1 => x ^ x_1) (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) n,\n          property :=\n            (_ :\n              ∃ y,\n                (fun x x_1 => x ^ x_1) (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) y =\n                  (fun x x_1 => x ^ x_1) (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) n) } *\n      ↑(X.presheaf.map (homOfLE h₁).op) (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f ^ n₂ * y₁) =\n    ↑{ val := (fun x x_1 => x ^ x_1) (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) n,\n          property :=\n            (_ :\n              ∃ y,\n                (fun x x_1 => x ^ x_1) (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) y =\n                  (fun x x_1 => x ^ x_1) (↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f) n) } *\n      ↑(X.presheaf.map (homOfLE h₂).op) (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f ^ n₁ * y₂)\n⊢ ↑(X.presheaf.map (homOfLE h₁).op) (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f ^ (n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE h₂).op) (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f ^ (n + n₁) * y₂)\n[PROOFSTEP]\nsimp only [pow_add, map_pow, map_mul, ← comp_apply, ← mul_assoc, ← Functor.map_comp, Subtype.coe_mk] at e ⊢\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nS : ↑(Scheme.affineOpens X)\nU₁ U₂ : Opens ↑↑X.toPresheafedSpace\nn₁ n₂ : ℕ\ny₁ : ↑(X.presheaf.obj (op U₁))\ny₂ : ↑(X.presheaf.obj (op U₂))\nf : ↑(X.presheaf.obj (op (U₁ ⊔ U₂)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nh₁ : ↑S ≤ U₁\nh₂ : ↑S ≤ U₂\ne₁ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n      y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ U₁)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ne₂ :\n  ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n      y₂ =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ U₂)).op)\n          (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn : ℕ\ne :\n  ↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f ^ n *\n        ↑(X.presheaf.map ((homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op ≫ (homOfLE h₁).op)) f ^ n₂ *\n      ↑(X.presheaf.map (homOfLE h₁).op) y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : ↑S ≤ U₁ ⊔ U₂)).op) f ^ n *\n        ↑(X.presheaf.map ((homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op ≫ (homOfLE h₂).op)) f ^ n₁ *\n      ↑(X.presheaf.map (homOfLE h₂).op) y₂\n⊢ ↑(X.presheaf.map ((homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op ≫ (homOfLE h₁).op)) f ^ n *\n        ↑(X.presheaf.map ((homOfLE (_ : U₁ ≤ U₁ ⊔ U₂)).op ≫ (homOfLE h₁).op)) f ^ n₂ *\n      ↑(X.presheaf.map (homOfLE h₁).op) y₁ =\n    ↑(X.presheaf.map ((homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op ≫ (homOfLE h₂).op)) f ^ n *\n        ↑(X.presheaf.map ((homOfLE (_ : U₂ ≤ U₁ ⊔ U₂)).op ≫ (homOfLE h₂).op)) f ^ n₁ *\n      ↑(X.presheaf.map (homOfLE h₂).op) y₂\n[PROOFSTEP]\nexact e\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf : ↑(X.presheaf.obj (op U))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n⊢ ∃ n y, y |_ Scheme.basicOpen X f = (f |_ Scheme.basicOpen X f) ^ n * x\n[PROOFSTEP]\ndelta TopCat.Presheaf.restrictOpen TopCat.Presheaf.restrict\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf : ↑(X.presheaf.obj (op U))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op) f ^ n * x\n[PROOFSTEP]\nrevert hU' f x\n[GOAL]\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\n⊢ IsQuasiSeparated U.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op U))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op) f ^\n              n *\n            x\n[PROOFSTEP]\napply compact_open_induction_on (P := _) U hU\n[GOAL]\ncase h₁\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\n⊢ IsQuasiSeparated ⊥.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op ⊥))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑⊥)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑⊥)).op) f ^\n              n *\n            x\n[PROOFSTEP]\nintro _ f x\n[GOAL]\ncase h₁\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU'✝ : IsQuasiSeparated ⊥.carrier\nf : ↑(X.presheaf.obj (op ⊥))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑⊥)).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑⊥)).op) f ^ n * x\n[PROOFSTEP]\nuse 0, f\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU'✝ : IsQuasiSeparated ⊥.carrier\nf : ↑(X.presheaf.obj (op ⊥))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n⊢ ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑⊥)).op) f =\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑⊥)).op) f ^ 0 * x\n[PROOFSTEP]\nrefine' @Subsingleton.elim _ (CommRingCat.subsingleton_of_isTerminal (X.sheaf.isTerminalOfEqEmpty _)) _ _\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU'✝ : IsQuasiSeparated ⊥.carrier\nf : ↑(X.presheaf.obj (op ⊥))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n⊢ Scheme.basicOpen X f = ⊥\n[PROOFSTEP]\nerw [eq_bot_iff]\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU'✝ : IsQuasiSeparated ⊥.carrier\nf : ↑(X.presheaf.obj (op ⊥))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n⊢ Scheme.basicOpen X f ≤ ⊥\n[PROOFSTEP]\nexact X.basicOpen_le f\n[GOAL]\ncase h₂\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\n⊢ ∀ (S : Opens ↑↑X.toPresheafedSpace),\n    IsCompact S.carrier →\n      ∀ (U : ↑(Scheme.affineOpens X)),\n        (IsQuasiSeparated S.carrier →\n            ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n              ∃ n y,\n                ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op)\n                    y =\n                  ↑(X.presheaf.map\n                            (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op)\n                        f ^\n                      n *\n                    x) →\n          IsQuasiSeparated (S ⊔ ↑U).carrier →\n            ∀ (f : ↑(X.presheaf.obj (op (S ⊔ ↑U)))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n              ∃ n y,\n                ↑(X.presheaf.map\n                        (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n                    y =\n                  ↑(X.presheaf.map\n                            (homOfLE\n                                (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n                        f ^\n                      n *\n                    x\n[PROOFSTEP]\nintro S hS U hU hSU f x\n[GOAL]\ncase h₂\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\nobtain ⟨n₁, y₁, hy₁⟩ :=\n  hU (hSU.of_subset <| Set.subset_union_left _ _) (X.presheaf.map (homOfLE le_sup_left).op f)\n    (X.presheaf.map (homOfLE _).op x)\n      -- · rw [X.basicOpen_res]; exact inf_le_right\n          -- We know that such `y₂, n₂` exists on `U` since `U` is affine.\n[GOAL]\ncase h₂.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\nobtain ⟨n₂, y₂, hy₂⟩ :=\n  exists_eq_pow_mul_of_isAffineOpen X _ U.2 (X.presheaf.map (homOfLE le_sup_right).op f)\n    (X.presheaf.map (homOfLE _).op x)\n[GOAL]\ncase h₂.intro.intro.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  y₂ |_ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) =\n    (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f |_\n          Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\ndelta TopCat.Presheaf.restrictOpen TopCat.Presheaf.restrict at hy₂ \n[GOAL]\ncase h₂.intro.intro.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\nobtain ⟨s, hs', hs⟩ :=\n  (isCompact_open_iff_eq_finset_affine_union _).mp\n    ⟨hSU _ _ (Set.subset_union_left _ _) S.2 hS (Set.subset_union_right _ _) U.1.2 U.2.isCompact, (S ⊓ U.1).2⟩\n[GOAL]\ncase h₂.intro.intro.intro.intro.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nhs : ↑S ∩ ↑↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\nhaveI := hs'.to_subtype\n[GOAL]\ncase h₂.intro.intro.intro.intro.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nhs : ↑S ∩ ↑↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\nthis : Finite ↑s\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\ncases nonempty_fintype s\n[GOAL]\ncase h₂.intro.intro.intro.intro.intro.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nhs : ↑S ∩ ↑↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\nthis : Finite ↑s\nval✝ : Fintype ↑s\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\nreplace hs : S ⊓ U.1 = iSup fun i : s => (i : Opens X.carrier) := by ext1; simpa using hs\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nhs : ↑S ∩ ↑↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\nthis : Finite ↑s\nval✝ : Fintype ↑s\n⊢ S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nhs : ↑S ∩ ↑↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\nthis : Finite ↑s\nval✝ : Fintype ↑s\n⊢ ↑(S ⊓ ↑U) = ↑(⨆ (i : ↑s), ↑↑i)\n[PROOFSTEP]\nsimpa using hs\n[GOAL]\ncase h₂.intro.intro.intro.intro.intro.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\nhave hs₁ : ∀ i : s, i.1.1 ≤ S := by\n  intro i; change (i : Opens X.carrier) ≤ S\n  refine' le_trans _ inf_le_left; swap; exact U.1;\n  erw [hs]\n    -- Porting note: have to add argument explicitly\n  exact @le_iSup (Opens X) s _ (fun (i : s) => (i : Opens X)) i\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\n⊢ ∀ (i : ↑s), ↑↑i ≤ S\n[PROOFSTEP]\nintro i\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\ni : ↑s\n⊢ ↑↑i ≤ S\n[PROOFSTEP]\nchange (i : Opens X.carrier) ≤ S\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\ni : ↑s\n⊢ ↑↑i ≤ S\n[PROOFSTEP]\nrefine' le_trans _ inf_le_left\n[GOAL]\ncase refine'_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\ni : ↑s\n⊢ ↑↑i ≤ S ⊓ ?refine'_2\ncase refine'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\ni : ↑s\n⊢ Opens ↑↑X.toPresheafedSpace\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\ni : ↑s\n⊢ Opens ↑↑X.toPresheafedSpace\ncase refine'_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\ni : ↑s\n⊢ ↑↑i ≤ S ⊓ ?refine'_2\n[PROOFSTEP]\nexact U.1\n[GOAL]\ncase refine'_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\ni : ↑s\n⊢ ↑↑i ≤ S ⊓ ↑U\n[PROOFSTEP]\nerw [hs]\n  -- Porting note: have to add argument explicitly\n[GOAL]\ncase refine'_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\ni : ↑s\n⊢ ↑↑i ≤ ⨆ (i : ↑s), ↑↑i\n[PROOFSTEP]\nexact @le_iSup (Opens X) s _ (fun (i : s) => (i : Opens X)) i\n[GOAL]\ncase h₂.intro.intro.intro.intro.intro.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\nhave hs₂ : ∀ i : s, i.1.1 ≤ U.1 := by\n  intro i; change (i : Opens X.carrier) ≤ U\n  refine' le_trans _ inf_le_right; swap; exact S;\n  erw [hs]\n    -- Porting note: have to add argument explicitly\n  exact @le_iSup (Opens X) s _ (fun (i : s) => (i : Opens X)) i\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\n⊢ ∀ (i : ↑s), ↑↑i ≤ ↑U\n[PROOFSTEP]\nintro i\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\ni : ↑s\n⊢ ↑↑i ≤ ↑U\n[PROOFSTEP]\nchange (i : Opens X.carrier) ≤ U\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\ni : ↑s\n⊢ ↑↑i ≤ ↑U\n[PROOFSTEP]\nrefine' le_trans _ inf_le_right\n[GOAL]\ncase refine'_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\ni : ↑s\n⊢ ↑↑i ≤ ?refine'_2 ⊓ ↑U\ncase refine'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\ni : ↑s\n⊢ Opens ↑↑X.toPresheafedSpace\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\ni : ↑s\n⊢ Opens ↑↑X.toPresheafedSpace\ncase refine'_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\ni : ↑s\n⊢ ↑↑i ≤ ?refine'_2 ⊓ ↑U\n[PROOFSTEP]\nexact S\n[GOAL]\ncase refine'_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\ni : ↑s\n⊢ ↑↑i ≤ S ⊓ ↑U\n[PROOFSTEP]\nerw [hs]\n  -- Porting note: have to add argument explicitly\n[GOAL]\ncase refine'_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\ni : ↑s\n⊢ ↑↑i ≤ ⨆ (i : ↑s), ↑↑i\n[PROOFSTEP]\nexact @le_iSup (Opens X) s _ (fun (i : s) => (i : Opens X)) i\n[GOAL]\ncase h₂.intro.intro.intro.intro.intro.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\nhave :\n  ∀ i : s,\n    ∃ n : ℕ,\n      X.presheaf.map (homOfLE <| hs₁ i).op (X.presheaf.map (homOfLE le_sup_left).op f ^ (n + n₂) * y₁) =\n        X.presheaf.map (homOfLE <| hs₂ i).op (X.presheaf.map (homOfLE le_sup_right).op f ^ (n + n₁) * y₂) :=\n  by\n  intro i\n  exact exists_eq_pow_mul_of_is_compact_of_quasi_separated_space_aux X i.1 S U (hs₁ i) (hs₂ i) hy₁ hy₂\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\n⊢ ∀ (i : ↑s),\n    ∃ n,\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n + n₂) * y₁) =\n        ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n + n₁) * y₂)\n[PROOFSTEP]\nintro i\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map (homOfLE ?m.483627).op) x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map (homOfLE ?m.484649).op) x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\ni : ↑s\n⊢ ∃ n,\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op) (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n + n₁) * y₂)\n[PROOFSTEP]\nexact exists_eq_pow_mul_of_is_compact_of_quasi_separated_space_aux X i.1 S U (hs₁ i) (hs₂ i) hy₁ hy₂\n[GOAL]\ncase h₂.intro.intro.intro.intro.intro.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nthis :\n  ∀ (i : ↑s),\n    ∃ n,\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n + n₂) * y₁) =\n        ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n + n₁) * y₂)\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\nchoose n hn using this\n[GOAL]\ncase h₂.intro.intro.intro.intro.intro.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\nhave :\n  X.presheaf.map (homOfLE <| inf_le_left).op\n      (X.presheaf.map (homOfLE le_sup_left).op f ^ (Finset.univ.sup n + n₂) * y₁) =\n    X.presheaf.map (homOfLE <| inf_le_right).op\n      (X.presheaf.map (homOfLE le_sup_right).op f ^ (Finset.univ.sup n + n₁) * y₂) :=\n  by\n  fapply X.sheaf.eq_of_locally_eq' fun i : s => i.1.1\n  · refine' fun i => homOfLE _; erw [hs];\n    -- Porting note: have to add argument explicitlyexact @le_iSup (Opens X) s _ (fun (i : s) => (i : Opens X)) i\n  · exact le_of_eq hs\n  · intro i\n    replace hn :=\n      congr_arg (fun x => X.presheaf.map (homOfLE (le_trans (hs₁ i) le_sup_left)).op f ^ (Finset.univ.sup n - n i) * x)\n        (hn i)\n    dsimp only at hn \n    delta Scheme.sheaf SheafedSpace.sheaf\n    simp only [← map_pow, map_mul, ← comp_apply, ← Functor.map_comp, ← op_comp, ← mul_assoc] at hn ⊢\n    erw [← map_mul, ← map_mul] at hn \n    rw [← pow_add, ← pow_add, ← add_assoc, ← add_assoc, tsub_add_cancel_of_le] at hn \n    convert hn\n    exact Finset.le_sup (Finset.mem_univ _)\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\n⊢ ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n[PROOFSTEP]\nfapply X.sheaf.eq_of_locally_eq' fun i : s => i.1.1\n[GOAL]\ncase iUV\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\n⊢ (i : ↑s) → ↑↑i ⟶ S ⊓ ↑U\n[PROOFSTEP]\nrefine' fun i => homOfLE _\n[GOAL]\ncase iUV\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\ni : ↑s\n⊢ ↑↑i ≤ S ⊓ ↑U\n[PROOFSTEP]\nerw [hs]\n[GOAL]\ncase iUV\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\ni : ↑s\n⊢ ↑↑i ≤ ⨆ (i : ↑s), ↑↑i\n[PROOFSTEP]\nexact @le_iSup (Opens X) s _ (fun (i : s) => (i : Opens X)) i\n[GOAL]\ncase hcover\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\n⊢ S ⊓ ↑U ≤ ⨆ (i : ↑s), ↑↑i\n[PROOFSTEP]\nexact le_of_eq hs\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\n⊢ ∀ (i : ↑s),\n    ↑((Scheme.sheaf X).val.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁)) =\n      ↑((Scheme.sheaf X).val.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\ni : ↑s\n⊢ ↑((Scheme.sheaf X).val.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n        (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁)) =\n    ↑((Scheme.sheaf X).val.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂))\n[PROOFSTEP]\nreplace hn :=\n  congr_arg (fun x => X.presheaf.map (homOfLE (le_trans (hs₁ i) le_sup_left)).op f ^ (Finset.univ.sup n - n i) * x)\n    (hn i)\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\ni : ↑s\nhn :\n  (fun x => ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n - n i) * x)\n      (↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op)\n        (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁)) =\n    (fun x => ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n - n i) * x)\n      (↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂))\n⊢ ↑((Scheme.sheaf X).val.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n        (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁)) =\n    ↑((Scheme.sheaf X).val.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂))\n[PROOFSTEP]\ndsimp only at hn \n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\ni : ↑s\nhn :\n  ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n - n i) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op)\n        (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n - n i) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\n⊢ ↑((Scheme.sheaf X).val.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n        (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁)) =\n    ↑((Scheme.sheaf X).val.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂))\n[PROOFSTEP]\ndelta Scheme.sheaf SheafedSpace.sheaf\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\ni : ↑s\nhn :\n  ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n - n i) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op)\n        (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n - n i) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\n⊢ ↑({ val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) }.val.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n        (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁)) =\n    ↑({ val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) }.val.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂))\n[PROOFSTEP]\nsimp only [← map_pow, map_mul, ← comp_apply, ← Functor.map_comp, ← op_comp, ← mul_assoc] at hn ⊢\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\ni : ↑s\nhn :\n  ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) (f ^ (Finset.sup Finset.univ n - n i)) *\n        ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S) ≫ homOfLE (_ : S ≤ S ⊔ ↑U)).op) (f ^ (n i + n₂)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) (f ^ (Finset.sup Finset.univ n - n i)) *\n        ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U) ≫ homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) (f ^ (n i + n₁)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op) y₂\n⊢ ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U) ≫ homOfLE (_ : S ⊓ ↑U ≤ S) ≫ homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n        (f ^ (Finset.sup Finset.univ n + n₂)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U) ≫ homOfLE (_ : S ⊓ ↑U ≤ S)).op) y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U) ≫ homOfLE (_ : S ⊓ ↑U ≤ ↑U) ≫ homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n        (f ^ (Finset.sup Finset.univ n + n₁)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U) ≫ homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op) y₂\n[PROOFSTEP]\nerw [← map_mul, ← map_mul] at hn \n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\ni : ↑s\nhn :\n  ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) (f ^ (Finset.sup Finset.univ n - n i) * f ^ (n i + n₂)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) (f ^ (Finset.sup Finset.univ n - n i) * f ^ (n i + n₁)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op) y₂\n⊢ ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U) ≫ homOfLE (_ : S ⊓ ↑U ≤ S) ≫ homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n        (f ^ (Finset.sup Finset.univ n + n₂)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U) ≫ homOfLE (_ : S ⊓ ↑U ≤ S)).op) y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U) ≫ homOfLE (_ : S ⊓ ↑U ≤ ↑U) ≫ homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n        (f ^ (Finset.sup Finset.univ n + n₁)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U) ≫ homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op) y₂\n[PROOFSTEP]\nrw [← pow_add, ← pow_add, ← add_assoc, ← add_assoc, tsub_add_cancel_of_le] at hn \n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\ni : ↑s\nhn :\n  ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) (f ^ (Finset.sup Finset.univ n + n₂)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) (f ^ (Finset.sup Finset.univ n + n₁)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op) y₂\n⊢ ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U) ≫ homOfLE (_ : S ⊓ ↑U ≤ S) ≫ homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n        (f ^ (Finset.sup Finset.univ n + n₂)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U) ≫ homOfLE (_ : S ⊓ ↑U ≤ S)).op) y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U) ≫ homOfLE (_ : S ⊓ ↑U ≤ ↑U) ≫ homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n        (f ^ (Finset.sup Finset.univ n + n₁)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊓ ↑U) ≫ homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op) y₂\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\ni : ↑s\nhn :\n  ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) (f ^ (Finset.sup Finset.univ n - n i + n i + n₂)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) (f ^ (Finset.sup Finset.univ n - n i + n i + n₁)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op) y₂\n⊢ n i ≤ Finset.sup Finset.univ n\n[PROOFSTEP]\nconvert hn\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\ni : ↑s\nhn :\n  ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) (f ^ (Finset.sup Finset.univ n - n i + n i + n₂)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) y₁ =\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S ⊔ ↑U)).op) (f ^ (Finset.sup Finset.univ n - n i + n i + n₁)) *\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op) y₂\n⊢ n i ≤ Finset.sup Finset.univ n\n[PROOFSTEP]\nexact Finset.le_sup (Finset.mem_univ _)\n[GOAL]\ncase h₂.intro.intro.intro.intro.intro.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ∃ n y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n *\n        x\n[PROOFSTEP]\nuse Finset.univ.sup n + n₁ + n₂\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ∃ y,\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) y =\n      ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          (Finset.sup Finset.univ n + n₁ + n₂) *\n        x\n[PROOFSTEP]\nuse(X.sheaf.objSupIsoProdEqLocus S U.1).inv ⟨⟨_ * _, _ * _⟩, this⟩\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n      (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n        {\n          val :=\n            (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n              ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n          property := this }) =\n    ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op) f ^\n        (Finset.sup Finset.univ n + n₁ + n₂) *\n      x\n[PROOFSTEP]\nrefine'\n  X.sheaf.eq_of_locally_eq₂ (homOfLE (_ : X.basicOpen (X.presheaf.map (homOfLE le_sup_left).op f) ≤ _))\n    (homOfLE (_ : X.basicOpen (X.presheaf.map (homOfLE le_sup_right).op f) ≤ _)) _ _ _ _ _\n[GOAL]\ncase h.refine'_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f\n[PROOFSTEP]\nrw [X.basicOpen_res]\n[GOAL]\ncase h.refine'_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ S ⊓ Scheme.basicOpen X f ≤ Scheme.basicOpen X f\n[PROOFSTEP]\nexact inf_le_right\n[GOAL]\ncase h.refine'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f\n[PROOFSTEP]\nrw [X.basicOpen_res]\n[GOAL]\ncase h.refine'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑U ⊓ Scheme.basicOpen X f ≤ Scheme.basicOpen X f\n[PROOFSTEP]\nexact inf_le_right\n[GOAL]\ncase h.refine'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ Scheme.basicOpen X f ≤\n    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ⊔\n      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)\n[PROOFSTEP]\nrw [X.basicOpen_res, X.basicOpen_res]\n[GOAL]\ncase h.refine'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ Scheme.basicOpen X f ≤ S ⊓ Scheme.basicOpen X f ⊔ ↑U ⊓ Scheme.basicOpen X f\n[PROOFSTEP]\nerw [← inf_sup_right]\n[GOAL]\ncase h.refine'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ Scheme.basicOpen X f ≤ (S ⊔ ↑U) ⊓ Scheme.basicOpen X f\n[PROOFSTEP]\nrefine' le_inf_iff.mpr ⟨X.basicOpen_le f, le_of_eq rfl⟩\n[GOAL]\ncase h.refine'_4\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑((Scheme.sheaf X).val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    ↑((Scheme.sheaf X).val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          (Finset.sup Finset.univ n + n₁ + n₂) *\n        x)\n[PROOFSTEP]\nconvert\n  congr_arg\n    (X.presheaf.map\n      (homOfLE (by restrict_tac : X.basicOpen (X.presheaf.map (homOfLE (le_sup_left : S ≤ S ⊔ U.1)).op f) ≤ S)).op)\n    (X.sheaf.objSupIsoProdEqLocus_inv_fst S U.1 ⟨⟨_ * _, _ * _⟩, this⟩) using\n  1\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ S\n[PROOFSTEP]\nrestrict_tac\n[GOAL]\ncase h.e'_2.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑((Scheme.sheaf X).val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      (↑((Scheme.sheaf X).val.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this }))\n[PROOFSTEP]\ndelta Scheme.sheaf SheafedSpace.sheaf\n[GOAL]\ncase h.e'_2.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑({ val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) }.val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n                ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      (↑({ val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) }.val.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n                ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this }))\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase h.e'_2.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑(X.presheaf.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n                ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n                ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this }))\n[PROOFSTEP]\nerw [← comp_apply, ← comp_apply, ← comp_apply, ← comp_apply]\n[GOAL]\ncase h.e'_2.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑((TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n              ↑U).inv ≫\n          X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op ≫\n            X.presheaf.map\n              (homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      {\n        val :=\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n            ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n        property := this } =\n    ↑((TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n              ↑U).inv ≫\n          X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op ≫\n            X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      {\n        val :=\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n            ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n        property := this }\n[PROOFSTEP]\nsimp only [← Functor.map_comp, ← op_comp]\n[GOAL]\ncase h.e'_2.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑((TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n              ↑U).inv ≫\n          X.presheaf.map\n            (homOfLE\n                  (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n      {\n        val :=\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n            ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n        property := this } =\n    ↑((TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n              ↑U).inv ≫\n          X.presheaf.map\n            (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S) ≫\n                homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n      {\n        val :=\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n            ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n        property := this }\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_3.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑((Scheme.sheaf X).val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          (Finset.sup Finset.univ n + n₁ + n₂) *\n        x) =\n    ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      (↑{\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this }).fst\n[PROOFSTEP]\ndelta Scheme.sheaf SheafedSpace.sheaf\n[GOAL]\ncase h.e'_3.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑({ val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) }.val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          (Finset.sup Finset.univ n + n₁ + n₂) *\n        x) =\n    ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      (↑{\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this }).fst\n[PROOFSTEP]\nsimp only [map_pow, map_mul]\n[GOAL]\ncase h.e'_3.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n          (↑(X.presheaf.map\n                (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f) ^\n        (Finset.sup Finset.univ n + n₁ + n₂) *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        (Finset.sup Finset.univ n + n₂) *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                    a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n        y₁\n[PROOFSTEP]\nerw [← comp_apply, ← comp_apply]\n[GOAL]\ncase h.e'_3.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op ≫\n              X.presheaf.map\n                (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤\n                        Scheme.basicOpen X f)).op)\n          f ^\n        (Finset.sup Finset.univ n + n₁ + n₂) *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x =\n    ↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op ≫\n              X.presheaf.map\n                (homOfLE\n                    (_ :\n                      ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                        a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          f ^\n        (Finset.sup Finset.univ n + n₂) *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                    a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n        y₁\n[PROOFSTEP]\nsimp only [← Functor.map_comp, ← op_comp, mul_assoc, pow_add]\n[GOAL]\ncase h.e'_3.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                  homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n          f ^\n        Finset.sup Finset.univ n *\n      (↑(X.presheaf.map\n                (homOfLE\n                      (_ :\n                        Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                    homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n₁ *\n        (↑(X.presheaf.map\n                  (homOfLE\n                        (_ :\n                          Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤\n                            Scheme.basicOpen X f) ≫\n                      homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n              f ^\n            n₂ *\n          ↑(X.presheaf.map\n                (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤\n                        Scheme.basicOpen X f)).op)\n            x)) =\n    ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                        a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S) ≫\n                  homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n          f ^\n        Finset.sup Finset.univ n *\n      (↑(X.presheaf.map\n                (homOfLE\n                      (_ :\n                        ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                          a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S) ≫\n                    homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n            f ^\n          n₂ *\n        ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          y₁)\n[PROOFSTEP]\nerw [hy₁]\n[GOAL]\ncase h.e'_3.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                  homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n          f ^\n        Finset.sup Finset.univ n *\n      (↑(X.presheaf.map\n                (homOfLE\n                      (_ :\n                        Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                    homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n₁ *\n        (↑(X.presheaf.map\n                  (homOfLE\n                        (_ :\n                          Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤\n                            Scheme.basicOpen X f) ≫\n                      homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n              f ^\n            n₂ *\n          ↑(X.presheaf.map\n                (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤\n                        Scheme.basicOpen X f)).op)\n            x)) =\n    ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                        a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S) ≫\n                  homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n          f ^\n        Finset.sup Finset.univ n *\n      (↑(X.presheaf.map\n                (homOfLE\n                      (_ :\n                        ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                          a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S) ≫\n                    homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n            f ^\n          n₂ *\n        (↑(X.presheaf.map\n                  (homOfLE\n                      (_ :\n                        ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                          a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n            n₁ *\n          ↑(X.presheaf.map\n                (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤\n                        Scheme.basicOpen X f)).op)\n            x))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_3.h.e_a\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                  homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n          f ^\n        n₁ *\n      (↑(X.presheaf.map\n                (homOfLE\n                      (_ :\n                        Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                    homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n₂ *\n        ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n          x) =\n    ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                        a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S) ≫\n                  homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n          f ^\n        n₂ *\n      (↑(X.presheaf.map\n                (homOfLE\n                    (_ :\n                      ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                        a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n            (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n          n₁ *\n        ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n          x)\n[PROOFSTEP]\nrw [← mul_assoc, ← mul_assoc]\n[GOAL]\ncase h.e'_3.h.e_a\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑(X.presheaf.map\n                (homOfLE\n                      (_ :\n                        Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                    homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n₁ *\n        ↑(X.presheaf.map\n                (homOfLE\n                      (_ :\n                        Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                    homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x =\n    ↑(X.presheaf.map\n                (homOfLE\n                      (_ :\n                        ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                          a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S) ≫\n                    homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n            f ^\n          n₂ *\n        ↑(X.presheaf.map\n                (homOfLE\n                    (_ :\n                      ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                        a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n            (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n          n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_3.h.e_a.e_a\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                  homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n          f ^\n        n₁ *\n      ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                  homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n          f ^\n        n₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                        a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S) ≫\n                  homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n          f ^\n        n₂ *\n      ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁\n[PROOFSTEP]\nrw [mul_comm, ← comp_apply, ← Functor.map_comp]\n[GOAL]\ncase h.e'_3.h.e_a.e_a\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\ne_1✝ :\n  (fun x =>\n        (forget CommRingCat).obj\n          ((Scheme.sheaf X).val.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)))))\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    (forget CommRingCat).obj\n      (X.presheaf.obj (op (Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f))))\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                  homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n          f ^\n        n₂ *\n      ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                  homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n          f ^\n        n₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                        a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S) ≫\n                  homOfLE (_ : S ≤ S ⊔ ↑U)).op)\n          f ^\n        n₂ *\n      ↑(X.presheaf.map\n              ((homOfLE (_ : S ≤ S ⊔ ↑U)).op ≫\n                (homOfLE\n                    (_ :\n                      ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                        a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op))\n          f ^\n        n₁\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.refine'_5\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑((Scheme.sheaf X).val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    ↑((Scheme.sheaf X).val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          (Finset.sup Finset.univ n + n₁ + n₂) *\n        x)\n[PROOFSTEP]\nconvert\n  congr_arg (X.presheaf.map (homOfLE _).op) (X.sheaf.objSupIsoProdEqLocus_inv_snd S U.1 ⟨⟨_ * _, _ * _⟩, this⟩) using 1\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑((Scheme.sheaf X).val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    ↑(X.presheaf.map (homOfLE ?h.refine'_5.convert_1).op)\n      (↑((Scheme.sheaf X).val.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this }))\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑((Scheme.sheaf X).val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          (Finset.sup Finset.univ n + n₁ + n₂) *\n        x) =\n    ↑(X.presheaf.map (homOfLE ?h.refine'_5.convert_1).op)\n      (↑{\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this }).snd\ncase h.refine'_5.convert_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U\n[PROOFSTEP]\npick_goal 3\n[GOAL]\ncase h.refine'_5.convert_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U\n[PROOFSTEP]\nrw [X.basicOpen_res]\n[GOAL]\ncase h.refine'_5.convert_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑U ⊓ Scheme.basicOpen X f ≤ ↑U\n[PROOFSTEP]\nrestrict_tac\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑((Scheme.sheaf X).val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U)).op)\n      (↑((Scheme.sheaf X).val.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus (Scheme.sheaf X) S ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this }))\n[PROOFSTEP]\ndelta Scheme.sheaf SheafedSpace.sheaf\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑({ val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) }.val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n                ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U)).op)\n      (↑({ val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) }.val.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n                ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this }))\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑(X.presheaf.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n                ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this })) =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n        (↑(TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n                ↑U).inv\n          {\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this }))\n[PROOFSTEP]\nerw [← comp_apply, ← comp_apply, ← comp_apply, ← comp_apply]\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑((TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n              ↑U).inv ≫\n          X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op ≫\n            X.presheaf.map\n              (homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      {\n        val :=\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n            ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n        property := this } =\n    ↑((TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n              ↑U).inv ≫\n          X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op ≫\n            X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U)).op)\n      {\n        val :=\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n            ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n        property := this }\n[PROOFSTEP]\nsimp only [← Functor.map_comp, ← op_comp]\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑((TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n              ↑U).inv ≫\n          X.presheaf.map\n            (homOfLE\n                  (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n      {\n        val :=\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n            ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n        property := this } =\n    ↑((TopCat.Sheaf.objSupIsoProdEqLocus { val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) } S\n              ↑U).inv ≫\n          X.presheaf.map\n            (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U) ≫\n                homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n      {\n        val :=\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n            ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n        property := this }\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑((Scheme.sheaf X).val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          (Finset.sup Finset.univ n + n₁ + n₂) *\n        x) =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U)).op)\n      (↑{\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this }).snd\n[PROOFSTEP]\ndelta Scheme.sheaf SheafedSpace.sheaf\n[GOAL]\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑({ val := X.presheaf, cond := (_ : TopCat.Presheaf.IsSheaf X.presheaf) }.val.map\n          (homOfLE\n              (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          (Finset.sup Finset.univ n + n₁ + n₂) *\n        x) =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U)).op)\n      (↑{\n            val :=\n              (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁,\n                ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂),\n            property := this }).snd\n[PROOFSTEP]\nsimp only [map_pow, map_mul]\n[GOAL]\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n          (↑(X.presheaf.map\n                (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f) ^\n        (Finset.sup Finset.univ n + n₁ + n₂) *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x =\n    ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        (Finset.sup Finset.univ n + n₁) *\n      ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U)).op)\n        y₂\n[PROOFSTEP]\nerw [← comp_apply, ← comp_apply]\n[GOAL]\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op ≫\n              X.presheaf.map\n                (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤\n                        Scheme.basicOpen X f)).op)\n          f ^\n        (Finset.sup Finset.univ n + n₁ + n₂) *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x =\n    ↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op ≫\n              X.presheaf.map\n                (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U)).op)\n          f ^\n        (Finset.sup Finset.univ n + n₁) *\n      ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U)).op)\n        y₂\n[PROOFSTEP]\nsimp only [← Functor.map_comp, ← op_comp, mul_assoc, pow_add]\n[GOAL]\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                  homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n          f ^\n        Finset.sup Finset.univ n *\n      (↑(X.presheaf.map\n                (homOfLE\n                      (_ :\n                        Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤\n                          Scheme.basicOpen X f) ≫\n                    homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n₁ *\n        (↑(X.presheaf.map\n                  (homOfLE\n                        (_ :\n                          Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤\n                            Scheme.basicOpen X f) ≫\n                      homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n              f ^\n            n₂ *\n          ↑(X.presheaf.map\n                (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤\n                        Scheme.basicOpen X f)).op)\n            x)) =\n    ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U) ≫\n                  homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n          f ^\n        Finset.sup Finset.univ n *\n      (↑(X.presheaf.map\n                (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U) ≫\n                    homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n            f ^\n          n₁ *\n        ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U)).op)\n          y₂)\n[PROOFSTEP]\nerw [hy₂]\n[GOAL]\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                  homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n          f ^\n        Finset.sup Finset.univ n *\n      (↑(X.presheaf.map\n                (homOfLE\n                      (_ :\n                        Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤\n                          Scheme.basicOpen X f) ≫\n                    homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n₁ *\n        (↑(X.presheaf.map\n                  (homOfLE\n                        (_ :\n                          Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤\n                            Scheme.basicOpen X f) ≫\n                      homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n              f ^\n            n₂ *\n          ↑(X.presheaf.map\n                (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤\n                        Scheme.basicOpen X f)).op)\n            x)) =\n    ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U) ≫\n                  homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n          f ^\n        Finset.sup Finset.univ n *\n      (↑(X.presheaf.map\n                (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U) ≫\n                    homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n            f ^\n          n₁ *\n        (↑(X.presheaf.map\n                  (homOfLE\n                      (_ :\n                        ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                          a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n              (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n            n₂ *\n          ↑(X.presheaf.map\n                (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤\n                        Scheme.basicOpen X f)).op)\n            x))\n[PROOFSTEP]\nrw [← comp_apply, ← Functor.map_comp]\n[GOAL]\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU✝ : Opens ↑↑X.toPresheafedSpace\nhU✝ : IsCompact U✝.carrier\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nU : ↑(Scheme.affineOpens X)\nhU :\n  IsQuasiSeparated S.carrier →\n    ∀ (f : ↑(X.presheaf.obj (op S))) (x : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n      ∃ n y,\n        ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) y =\n          ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑S)).op) f ^\n              n *\n            x\nhSU : IsQuasiSeparated (S ⊔ ↑U).carrier\nf : ↑(X.presheaf.obj (op (S ⊔ ↑U)))\nx : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn₁ : ℕ\ny₁ : ↑(X.presheaf.obj (op S))\nhy₁ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n      y₁ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑S)).op)\n          (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ^\n        n₁ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\nn₂ : ℕ\ny₂ : ↑(X.presheaf.obj (op ↑U))\nhy₂ :\n  ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n      y₂ =\n    ↑(X.presheaf.map\n              (homOfLE\n                  (_ :\n                    ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                      a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) → a ∈ ↑↑U)).op)\n          (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ^\n        n₂ *\n      ↑(X.presheaf.map\n            (homOfLE\n                (_ :\n                  Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f)).op)\n        x\ns : Set ↑(Scheme.affineOpens X)\nhs' : Set.Finite s\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : S ⊓ ↑U = ⨆ (i : ↑s), ↑↑i\nhs₁ : ∀ (i : ↑s), ↑↑i ≤ S\nhs₂ : ∀ (i : ↑s), ↑↑i ≤ ↑U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ S)).op) (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (n i + n₂) * y₁) =\n      ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ↑U)).op)\n        (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (n i + n₁) * y₂)\nthis :\n  ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ S)).op)\n      (↑(X.presheaf.map (homOfLE (_ : S ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₂) * y₁) =\n    ↑(X.presheaf.map (homOfLE (_ : S ⊓ ↑U ≤ ↑U)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f ^ (Finset.sup Finset.univ n + n₁) * y₂)\n⊢ ↑(X.presheaf.map\n              (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ Scheme.basicOpen X f) ≫\n                  homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n          f ^\n        Finset.sup Finset.univ n *\n      (↑(X.presheaf.map\n                (homOfLE\n                      (_ :\n                        Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤\n                          Scheme.basicOpen X f) ≫\n                    homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n            f ^\n          n₁ *\n        (↑(X.presheaf.map\n                  (homOfLE\n                        (_ :\n                          Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤\n                            Scheme.basicOpen X f) ≫\n                      homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑(S ⊔ ↑U))).op)\n              f ^\n            n₂ *\n          ↑(X.presheaf.map\n                (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤\n                        Scheme.basicOpen X f)).op)\n            x)) =\n    ↑(X.presheaf.map\n              (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U) ≫\n                  homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n          f ^\n        Finset.sup Finset.univ n *\n      (↑(X.presheaf.map\n                (homOfLE (_ : Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤ ↑U) ≫\n                    homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op)\n            f ^\n          n₁ *\n        (↑(X.presheaf.map\n                  ((homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op ≫\n                    (homOfLE\n                        (_ :\n                          ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                            a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f)) →\n                              a ∈ ↑↑U)).op))\n              f ^\n            n₂ *\n          ↑(X.presheaf.map\n                (homOfLE\n                    (_ :\n                      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑U ≤ S ⊔ ↑U)).op) f) ≤\n                        Scheme.basicOpen X f)).op)\n            x))\n[PROOFSTEP]\ncongr 1\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf : ↑(X.presheaf.obj (op U))\n⊢ IsLocalization.Away f ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase map_units'\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf : ↑(X.presheaf.obj (op U))\n⊢ ∀ (y : { x // x ∈ Submonoid.powers f }),\n    IsUnit (↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) ↑y)\n[PROOFSTEP]\nrintro ⟨_, n, rfl⟩\n[GOAL]\ncase map_units'.mk.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf : ↑(X.presheaf.obj (op U))\nn : ℕ\n⊢ IsUnit\n    (↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n      ↑{ val := (fun x x_1 => x ^ x_1) f n,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) })\n[PROOFSTEP]\nsimp only [map_pow, Subtype.coe_mk, RingHom.algebraMap_toAlgebra]\n[GOAL]\ncase map_units'.mk.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf : ↑(X.presheaf.obj (op U))\nn : ℕ\n⊢ IsUnit (↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) f ^ n)\n[PROOFSTEP]\nexact IsUnit.pow _ (RingedSpace.isUnit_res_basicOpen _ f)\n[GOAL]\ncase surj'\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf : ↑(X.presheaf.obj (op U))\n⊢ ∀ (z : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))),\n    ∃ x,\n      z * ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) ↑x.snd =\n        ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) x.fst\n[PROOFSTEP]\nintro z\n[GOAL]\ncase surj'\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf : ↑(X.presheaf.obj (op U))\nz : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\n⊢ ∃ x,\n    z * ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) ↑x.snd =\n      ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) x.fst\n[PROOFSTEP]\nobtain ⟨n, y, e⟩ := exists_eq_pow_mul_of_isCompact_of_isQuasiSeparated X U hU hU' f z\n[GOAL]\ncase surj'.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf : ↑(X.presheaf.obj (op U))\nz : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn : ℕ\ny : ↑(X.presheaf.obj (op U))\ne : y |_ Scheme.basicOpen X f = (f |_ Scheme.basicOpen X f) ^ n * z\n⊢ ∃ x,\n    z * ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) ↑x.snd =\n      ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) x.fst\n[PROOFSTEP]\nrefine' ⟨⟨y, _, n, rfl⟩, _⟩\n[GOAL]\ncase surj'.intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf : ↑(X.presheaf.obj (op U))\nz : ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))\nn : ℕ\ny : ↑(X.presheaf.obj (op U))\ne : y |_ Scheme.basicOpen X f = (f |_ Scheme.basicOpen X f) ^ n * z\n⊢ z *\n      ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n        ↑(y,\n              { val := (fun x x_1 => x ^ x_1) f n,\n                property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) }).snd =\n    ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f))))\n      (y,\n          { val := (fun x x_1 => x ^ x_1) f n,\n            property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) }).fst\n[PROOFSTEP]\nsimpa only [map_pow, Subtype.coe_mk, RingHom.algebraMap_toAlgebra, mul_comm z] using e.symm\n[GOAL]\ncase eq_iff_exists'\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf : ↑(X.presheaf.obj (op U))\n⊢ ∀ {x y : ↑(X.presheaf.obj (op U))},\n    ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) x =\n        ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) y ↔\n      ∃ c, ↑c * x = ↑c * y\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase eq_iff_exists'\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf x y : ↑(X.presheaf.obj (op U))\n⊢ ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) x =\n      ↑(algebraMap ↑(X.presheaf.obj (op U)) ↑(X.presheaf.obj (op (Scheme.basicOpen X f)))) y ↔\n    ∃ c, ↑c * x = ↑c * y\n[PROOFSTEP]\nrw [← sub_eq_zero, ← map_sub, RingHom.algebraMap_toAlgebra]\n[GOAL]\ncase eq_iff_exists'\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf x y : ↑(X.presheaf.obj (op U))\n⊢ ↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) (x - y) = 0 ↔ ∃ c, ↑c * x = ↑c * y\n[PROOFSTEP]\nsimp_rw [← @sub_eq_zero _ _ (_ * x) (_ * y), ← mul_sub]\n[GOAL]\ncase eq_iff_exists'\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf x y : ↑(X.presheaf.obj (op U))\n⊢ ↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) (x - y) = 0 ↔ ∃ c, ↑c * (x - y) = 0\n[PROOFSTEP]\ngeneralize x - y = z\n[GOAL]\ncase eq_iff_exists'\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf x y z : ↑(X.presheaf.obj (op U))\n⊢ ↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) z = 0 ↔ ∃ c, ↑c * z = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase eq_iff_exists'.mp\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf x y z : ↑(X.presheaf.obj (op U))\n⊢ ↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) z = 0 → ∃ c, ↑c * z = 0\n[PROOFSTEP]\nintro H\n[GOAL]\ncase eq_iff_exists'.mp\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf x y z : ↑(X.presheaf.obj (op U))\nH : ↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) z = 0\n⊢ ∃ c, ↑c * z = 0\n[PROOFSTEP]\nobtain ⟨n, e⟩ := exists_pow_mul_eq_zero_of_res_basicOpen_eq_zero_of_isCompact X hU _ _ H\n[GOAL]\ncase eq_iff_exists'.mp.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf x y z : ↑(X.presheaf.obj (op U))\nH : ↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) z = 0\nn : ℕ\ne : f ^ n * z = 0\n⊢ ∃ c, ↑c * z = 0\n[PROOFSTEP]\nrefine' ⟨⟨_, n, rfl⟩, _⟩\n[GOAL]\ncase eq_iff_exists'.mp.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf x y z : ↑(X.presheaf.obj (op U))\nH : ↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) z = 0\nn : ℕ\ne : f ^ n * z = 0\n⊢ ↑{ val := (fun x x_1 => x ^ x_1) f n,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) } *\n      z =\n    0\n[PROOFSTEP]\nsimpa [mul_comm z] using e\n[GOAL]\ncase eq_iff_exists'.mpr\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf x y z : ↑(X.presheaf.obj (op U))\n⊢ (∃ c, ↑c * z = 0) → ↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) z = 0\n[PROOFSTEP]\nrintro ⟨⟨_, n, rfl⟩, e : f ^ n * z = 0⟩\n[GOAL]\ncase eq_iff_exists'.mpr.intro.mk.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf x y z : ↑(X.presheaf.obj (op U))\nn : ℕ\ne : f ^ n * z = 0\n⊢ ↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) z = 0\n[PROOFSTEP]\nrw [← ((RingedSpace.isUnit_res_basicOpen _ f).pow n).mul_right_inj, mul_zero, ← map_pow]\n  -- Porting note: this one lemma needs `erw`\n[GOAL]\ncase eq_iff_exists'.mpr.intro.mk.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf x y z : ↑(X.presheaf.obj (op U))\nn : ℕ\ne : f ^ n * z = 0\n⊢ ↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) (f ^ n) *\n      ↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) z =\n    0\n[PROOFSTEP]\nerw [← map_mul]\n[GOAL]\ncase eq_iff_exists'.mpr.intro.mk.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nhU' : IsQuasiSeparated U.carrier\nf x y z : ↑(X.presheaf.obj (op U))\nn : ℕ\ne : f ^ n * z = 0\n⊢ ↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace f ≤ U)).op) (f ^ n * z) = 0\n[PROOFSTEP]\nrw [e, map_zero]\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.Morphisms.QuasiSeparated", "llama_tokens": 239101, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442250928250375, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.3695780252928127}}
{"text": "[GOAL]\nx : ℂ\n⊢ (log x).re = Real.log (↑abs x)\n[PROOFSTEP]\nsimp [log]\n[GOAL]\nx : ℂ\n⊢ (log x).im = arg x\n[PROOFSTEP]\nsimp [log]\n[GOAL]\nx : ℂ\n⊢ -π < (log x).im\n[PROOFSTEP]\nsimp only [log_im, neg_pi_lt_arg]\n[GOAL]\nx : ℂ\n⊢ (log x).im ≤ π\n[PROOFSTEP]\nsimp only [log_im, arg_le_pi]\n[GOAL]\nx : ℂ\nhx : x ≠ 0\n⊢ exp (log x) = x\n[PROOFSTEP]\nrw [log, exp_add_mul_I, ← ofReal_sin, sin_arg, ← ofReal_cos, cos_arg hx, ← ofReal_exp, Real.exp_log (abs.pos hx),\n  mul_add, ofReal_div, ofReal_div, mul_div_cancel' _ (ofReal_ne_zero.2 <| abs.ne_zero hx), ← mul_assoc,\n  mul_div_cancel' _ (ofReal_ne_zero.2 <| abs.ne_zero hx), re_add_im]\n[GOAL]\nx : ℂ\n⊢ x ∈ Set.range exp → x ∈ {0}ᶜ\n[PROOFSTEP]\nrintro ⟨x, rfl⟩\n[GOAL]\ncase intro\nx : ℂ\n⊢ exp x ∈ {0}ᶜ\n[PROOFSTEP]\nexact exp_ne_zero x\n[GOAL]\nx : ℂ\nhx₁ : -π < x.im\nhx₂ : x.im ≤ π\n⊢ log (exp x) = x\n[PROOFSTEP]\nrw [log, abs_exp, Real.log_exp, exp_eq_exp_re_mul_sin_add_cos, ← ofReal_exp,\n  arg_mul_cos_add_sin_mul_I (Real.exp_pos _) ⟨hx₁, hx₂⟩, re_add_im]\n[GOAL]\nx y : ℂ\nhx₁ : -π < x.im\nhx₂ : x.im ≤ π\nhy₁ : -π < y.im\nhy₂ : y.im ≤ π\nhxy : exp x = exp y\n⊢ x = y\n[PROOFSTEP]\nrw [← log_exp hx₁ hx₂, ← log_exp hy₁ hy₂, hxy]\n[GOAL]\nx : ℝ\nhx : 0 ≤ x\n⊢ (↑(Real.log x)).re = (log ↑x).re\n[PROOFSTEP]\nrw [log_re, ofReal_re, abs_of_nonneg hx]\n[GOAL]\nx : ℝ\nhx : 0 ≤ x\n⊢ (↑(Real.log x)).im = (log ↑x).im\n[PROOFSTEP]\nrw [ofReal_im, log_im, arg_ofReal_of_nonneg hx]\n[GOAL]\nx : ℝ\n⊢ (log ↑x).re = Real.log x\n[PROOFSTEP]\nsimp [log_re]\n[GOAL]\nr : ℝ\nhr : 0 < r\nx : ℂ\nhx : x ≠ 0\n⊢ log (↑r * x) = ↑(Real.log r) + log x\n[PROOFSTEP]\nreplace hx := Complex.abs.ne_zero_iff.mpr hx\n[GOAL]\nr : ℝ\nhr : 0 < r\nx : ℂ\nhx : ↑abs x ≠ 0\n⊢ log (↑r * x) = ↑(Real.log r) + log x\n[PROOFSTEP]\nsimp_rw [log, map_mul, abs_ofReal, arg_real_mul _ hr, abs_of_pos hr, Real.log_mul hr.ne' hx, ofReal_add, add_assoc]\n[GOAL]\nr : ℝ\nhr : 0 < r\nx : ℂ\nhx : x ≠ 0\n⊢ log (x * ↑r) = ↑(Real.log r) + log x\n[PROOFSTEP]\nrw [mul_comm, log_ofReal_mul hr hx, add_comm]\n[GOAL]\n⊢ log 0 = 0\n[PROOFSTEP]\nsimp [log]\n[GOAL]\n⊢ log 1 = 0\n[PROOFSTEP]\nsimp [log]\n[GOAL]\n⊢ log (-1) = ↑π * I\n[PROOFSTEP]\nsimp [log]\n[GOAL]\n⊢ log I = ↑π / 2 * I\n[PROOFSTEP]\nsimp [log]\n[GOAL]\n⊢ log (-I) = -(↑π / 2) * I\n[PROOFSTEP]\nsimp [log]\n[GOAL]\nx : ℂ\n⊢ log (↑(starRingEnd ℂ) x) = if arg x = π then log x else ↑(starRingEnd ℂ) (log x)\n[PROOFSTEP]\nsimp_rw [log, abs_conj, arg_conj, map_add, map_mul, conj_ofReal]\n[GOAL]\nx : ℂ\n⊢ ↑(Real.log (↑abs x)) + ↑(if arg x = π then π else -arg x) * I =\n    if arg x = π then ↑(Real.log (↑abs x)) + ↑(arg x) * I else ↑(Real.log (↑abs x)) + ↑(arg x) * ↑(starRingEnd ℂ) I\n[PROOFSTEP]\nsplit_ifs with hx\n[GOAL]\ncase pos\nx : ℂ\nhx : arg x = π\n⊢ ↑(Real.log (↑abs x)) + ↑π * I = ↑(Real.log (↑abs x)) + ↑(arg x) * I\n[PROOFSTEP]\nrw [hx]\n[GOAL]\ncase neg\nx : ℂ\nhx : ¬arg x = π\n⊢ ↑(Real.log (↑abs x)) + ↑(-arg x) * I = ↑(Real.log (↑abs x)) + ↑(arg x) * ↑(starRingEnd ℂ) I\n[PROOFSTEP]\nsimp_rw [ofReal_neg, conj_I, mul_neg, neg_mul]\n[GOAL]\nx : ℂ\nh : arg x ≠ π\n⊢ log (↑(starRingEnd ℂ) x) = ↑(starRingEnd ℂ) (log x)\n[PROOFSTEP]\nrw [log_conj_eq_ite, if_neg h]\n[GOAL]\nx : ℂ\n⊢ log x⁻¹ = if arg x = π then -↑(starRingEnd ℂ) (log x) else -log x\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nx : ℂ\nhx : x = 0\n⊢ log x⁻¹ = if arg x = π then -↑(starRingEnd ℂ) (log x) else -log x\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nx : ℂ\nhx : ¬x = 0\n⊢ log x⁻¹ = if arg x = π then -↑(starRingEnd ℂ) (log x) else -log x\n[PROOFSTEP]\nrw [inv_def, log_mul_ofReal, Real.log_inv, ofReal_neg, ← sub_eq_neg_add, log_conj_eq_ite]\n[GOAL]\ncase neg\nx : ℂ\nhx : ¬x = 0\n⊢ (if arg x = π then log x else ↑(starRingEnd ℂ) (log x)) - ↑(Real.log (↑normSq x)) =\n    if arg x = π then -↑(starRingEnd ℂ) (log x) else -log x\n[PROOFSTEP]\nsimp_rw [log, map_add, map_mul, conj_ofReal, conj_I, normSq_eq_abs, Real.log_pow, Nat.cast_two, ofReal_mul, neg_add,\n  mul_neg, neg_neg]\n[GOAL]\ncase neg\nx : ℂ\nhx : ¬x = 0\n⊢ (if arg x = π then ↑(Real.log (↑abs x)) + ↑(arg x) * I else ↑(Real.log (↑abs x)) + -(↑(arg x) * I)) -\n      ↑2 * ↑(Real.log (↑abs x)) =\n    if arg x = π then -↑(Real.log (↑abs x)) + ↑(arg x) * I else -↑(Real.log (↑abs x)) + -(↑(arg x) * I)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg\nx : ℂ\nhx : ¬x = 0\n⊢ (if arg x = π then ↑(Real.log (↑abs x)) + ↑(arg x) * I else ↑(Real.log (↑abs x)) + -(↑(arg x) * I)) -\n      2 * ↑(Real.log (↑abs x)) =\n    if arg x = π then -↑(Real.log (↑abs x)) + ↑(arg x) * I else -↑(Real.log (↑abs x)) + -(↑(arg x) * I)\n[PROOFSTEP]\nrw [two_mul]\n  -- Porting note: added to simplify `↑2`\n[GOAL]\ncase neg\nx : ℂ\nhx : ¬x = 0\n⊢ (if arg x = π then ↑(Real.log (↑abs x)) + ↑(arg x) * I else ↑(Real.log (↑abs x)) + -(↑(arg x) * I)) -\n      (↑(Real.log (↑abs x)) + ↑(Real.log (↑abs x))) =\n    if arg x = π then -↑(Real.log (↑abs x)) + ↑(arg x) * I else -↑(Real.log (↑abs x)) + -(↑(arg x) * I)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nx : ℂ\nhx : ¬x = 0\nh✝ : arg x = π\n⊢ ↑(Real.log (↑abs x)) + ↑(arg x) * I - (↑(Real.log (↑abs x)) + ↑(Real.log (↑abs x))) =\n    -↑(Real.log (↑abs x)) + ↑(arg x) * I\n[PROOFSTEP]\nrw [add_sub_right_comm, sub_add_cancel']\n[GOAL]\ncase neg\nx : ℂ\nhx : ¬x = 0\nh✝ : ¬arg x = π\n⊢ ↑(Real.log (↑abs x)) + -(↑(arg x) * I) - (↑(Real.log (↑abs x)) + ↑(Real.log (↑abs x))) =\n    -↑(Real.log (↑abs x)) + -(↑(arg x) * I)\n[PROOFSTEP]\nrw [add_sub_right_comm, sub_add_cancel']\n[GOAL]\ncase neg.hr\nx : ℂ\nhx : ¬x = 0\n⊢ 0 < (↑normSq x)⁻¹\n[PROOFSTEP]\nrwa [inv_pos, Complex.normSq_pos]\n[GOAL]\ncase neg.hx\nx : ℂ\nhx : ¬x = 0\n⊢ ↑(starRingEnd ℂ) x ≠ 0\n[PROOFSTEP]\nrwa [map_ne_zero]\n[GOAL]\nx : ℂ\nhx : arg x ≠ π\n⊢ log x⁻¹ = -log x\n[PROOFSTEP]\nrw [log_inv_eq_ite, if_neg hx]\n[GOAL]\n⊢ 2 * ↑π * I ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ ¬(π = 0 ∨ I = 0)\n[PROOFSTEP]\nsimp [Real.pi_ne_zero, I_ne_zero]\n[GOAL]\nx : ℂ\n⊢ exp x = 1 ↔ ∃ n, x = ↑n * (2 * ↑π * I)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nx : ℂ\n⊢ exp x = 1 → ∃ n, x = ↑n * (2 * ↑π * I)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nx : ℂ\nh : exp x = 1\n⊢ ∃ n, x = ↑n * (2 * ↑π * I)\n[PROOFSTEP]\nrcases existsUnique_add_zsmul_mem_Ioc Real.two_pi_pos x.im (-π) with ⟨n, hn, -⟩\n[GOAL]\ncase mp.intro.intro\nx : ℂ\nh : exp x = 1\nn : ℤ\nhn : x.im + n • (2 * π) ∈ Set.Ioc (-π) (-π + 2 * π)\n⊢ ∃ n, x = ↑n * (2 * ↑π * I)\n[PROOFSTEP]\nuse-n\n[GOAL]\ncase h\nx : ℂ\nh : exp x = 1\nn : ℤ\nhn : x.im + n • (2 * π) ∈ Set.Ioc (-π) (-π + 2 * π)\n⊢ x = ↑(-n) * (2 * ↑π * I)\n[PROOFSTEP]\nrw [Int.cast_neg, neg_mul, eq_neg_iff_add_eq_zero]\n[GOAL]\ncase h\nx : ℂ\nh : exp x = 1\nn : ℤ\nhn : x.im + n • (2 * π) ∈ Set.Ioc (-π) (-π + 2 * π)\n⊢ x + ↑n * (2 * ↑π * I) = 0\n[PROOFSTEP]\nhave : (x + n * (2 * π * I)).im ∈ Set.Ioc (-π) π := by simpa [two_mul, mul_add] using hn\n[GOAL]\nx : ℂ\nh : exp x = 1\nn : ℤ\nhn : x.im + n • (2 * π) ∈ Set.Ioc (-π) (-π + 2 * π)\n⊢ (x + ↑n * (2 * ↑π * I)).im ∈ Set.Ioc (-π) π\n[PROOFSTEP]\nsimpa [two_mul, mul_add] using hn\n[GOAL]\ncase h\nx : ℂ\nh : exp x = 1\nn : ℤ\nhn : x.im + n • (2 * π) ∈ Set.Ioc (-π) (-π + 2 * π)\nthis : (x + ↑n * (2 * ↑π * I)).im ∈ Set.Ioc (-π) π\n⊢ x + ↑n * (2 * ↑π * I) = 0\n[PROOFSTEP]\nrw [← log_exp this.1 this.2, exp_periodic.int_mul n, h, log_one]\n[GOAL]\ncase mpr\nx : ℂ\n⊢ (∃ n, x = ↑n * (2 * ↑π * I)) → exp x = 1\n[PROOFSTEP]\nrintro ⟨n, rfl⟩\n[GOAL]\ncase mpr.intro\nn : ℤ\n⊢ exp (↑n * (2 * ↑π * I)) = 1\n[PROOFSTEP]\nexact (exp_periodic.int_mul n).eq.trans exp_zero\n[GOAL]\nx y : ℂ\n⊢ exp x = exp y ↔ exp (x - y) = 1\n[PROOFSTEP]\nrw [exp_sub, div_eq_one_iff_eq (exp_ne_zero _)]\n[GOAL]\nx y : ℂ\n⊢ exp x = exp y ↔ ∃ n, x = y + ↑n * (2 * ↑π * I)\n[PROOFSTEP]\nsimp only [exp_eq_exp_iff_exp_sub_eq_one, exp_eq_one_iff, sub_eq_iff_eq_add']\n[GOAL]\ns : Set ℂ\n⊢ Set.Countable (exp ⁻¹' s) ↔ Set.Countable s\n[PROOFSTEP]\nrefine' ⟨fun hs => _, fun hs => _⟩\n[GOAL]\ncase refine'_1\ns : Set ℂ\nhs : Set.Countable (exp ⁻¹' s)\n⊢ Set.Countable s\n[PROOFSTEP]\nrefine' ((hs.image exp).insert 0).mono _\n[GOAL]\ncase refine'_1\ns : Set ℂ\nhs : Set.Countable (exp ⁻¹' s)\n⊢ s ⊆ insert 0 (exp '' (exp ⁻¹' s))\n[PROOFSTEP]\nrw [Set.image_preimage_eq_inter_range, range_exp, ← Set.diff_eq, ← Set.union_singleton, Set.diff_union_self]\n[GOAL]\ncase refine'_1\ns : Set ℂ\nhs : Set.Countable (exp ⁻¹' s)\n⊢ s ⊆ s ∪ {0}\n[PROOFSTEP]\nexact Set.subset_union_left _ _\n[GOAL]\ncase refine'_2\ns : Set ℂ\nhs : Set.Countable s\n⊢ Set.Countable (exp ⁻¹' s)\n[PROOFSTEP]\nrw [← Set.biUnion_preimage_singleton]\n[GOAL]\ncase refine'_2\ns : Set ℂ\nhs : Set.Countable s\n⊢ Set.Countable (⋃ (y : ℂ) (_ : y ∈ s), exp ⁻¹' {y})\n[PROOFSTEP]\nrefine' hs.biUnion fun z hz => _\n[GOAL]\ncase refine'_2\ns : Set ℂ\nhs : Set.Countable s\nz : ℂ\nhz : z ∈ s\n⊢ Set.Countable (exp ⁻¹' {z})\n[PROOFSTEP]\nrcases em (∃ w, exp w = z) with (⟨w, rfl⟩ | hne)\n[GOAL]\ncase refine'_2.inl.intro\ns : Set ℂ\nhs : Set.Countable s\nw : ℂ\nhz : exp w ∈ s\n⊢ Set.Countable (exp ⁻¹' {exp w})\n[PROOFSTEP]\nsimp only [Set.preimage, Set.mem_singleton_iff, exp_eq_exp_iff_exists_int, Set.setOf_exists]\n[GOAL]\ncase refine'_2.inl.intro\ns : Set ℂ\nhs : Set.Countable s\nw : ℂ\nhz : exp w ∈ s\n⊢ Set.Countable (⋃ (i : ℤ), {x | x = w + ↑i * (2 * ↑π * I)})\n[PROOFSTEP]\nexact Set.countable_iUnion fun m => Set.countable_singleton _\n[GOAL]\ncase refine'_2.inr\ns : Set ℂ\nhs : Set.Countable s\nz : ℂ\nhz : z ∈ s\nhne : ¬∃ w, exp w = z\n⊢ Set.Countable (exp ⁻¹' {z})\n[PROOFSTEP]\npush_neg at hne \n[GOAL]\ncase refine'_2.inr\ns : Set ℂ\nhs : Set.Countable s\nz : ℂ\nhz : z ∈ s\nhne : ∀ (w : ℂ), exp w ≠ z\n⊢ Set.Countable (exp ⁻¹' {z})\n[PROOFSTEP]\nsimp [Set.preimage, hne]\n[GOAL]\nz : ℂ\nhre : z.re < 0\nhim : z.im = 0\n⊢ Tendsto log (𝓝[{z | z.im < 0}] z) (𝓝 (↑(Real.log (↑abs z)) - ↑π * I))\n[PROOFSTEP]\nconvert\n  (continuous_ofReal.continuousAt.comp_continuousWithinAt (continuous_abs.continuousWithinAt.log _)).tendsto.add\n    (((continuous_ofReal.tendsto _).comp <| tendsto_arg_nhdsWithin_im_neg_of_re_neg_of_im_zero hre him).mul\n      tendsto_const_nhds) using\n  1\n[GOAL]\ncase h.e'_5\nz : ℂ\nhre : z.re < 0\nhim : z.im = 0\n⊢ 𝓝 (↑(Real.log (↑abs z)) - ↑π * I) = 𝓝 ((ofReal' ∘ fun x => Real.log (↑abs x)) z + ↑(-π) * I)\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\ncase convert_1\nz : ℂ\nhre : z.re < 0\nhim : z.im = 0\n⊢ ↑abs z ≠ 0\n[PROOFSTEP]\nlift z to ℝ using him\n[GOAL]\ncase convert_1.intro\nz : ℝ\nhre : (↑z).re < 0\n⊢ ↑abs ↑z ≠ 0\n[PROOFSTEP]\nsimpa using hre.ne\n[GOAL]\nz : ℂ\nhre : z.re < 0\nhim : z.im = 0\n⊢ ContinuousWithinAt log {z | 0 ≤ z.im} z\n[PROOFSTEP]\nconvert\n  (continuous_ofReal.continuousAt.comp_continuousWithinAt (continuous_abs.continuousWithinAt.log _)).tendsto.add\n    ((continuous_ofReal.continuousAt.comp_continuousWithinAt <| continuousWithinAt_arg_of_re_neg_of_im_zero hre him).mul\n      tendsto_const_nhds) using\n  1\n[GOAL]\ncase convert_1\nz : ℂ\nhre : z.re < 0\nhim : z.im = 0\n⊢ ↑abs z ≠ 0\n[PROOFSTEP]\nlift z to ℝ using him\n[GOAL]\ncase convert_1.intro\nz : ℝ\nhre : (↑z).re < 0\n⊢ ↑abs ↑z ≠ 0\n[PROOFSTEP]\nsimpa using hre.ne\n[GOAL]\nz : ℂ\nhre : z.re < 0\nhim : z.im = 0\n⊢ Tendsto log (𝓝[{z | 0 ≤ z.im}] z) (𝓝 (↑(Real.log (↑abs z)) + ↑π * I))\n[PROOFSTEP]\nsimpa only [log, arg_eq_pi_iff.2 ⟨hre, him⟩] using (continuousWithinAt_log_of_re_neg_of_im_zero hre him).tendsto\n[GOAL]\n⊢ map exp (comap re atBot) = 𝓝[{0}ᶜ] 0\n[PROOFSTEP]\nrw [← comap_exp_nhds_zero, map_comap, range_exp, nhdsWithin]\n[GOAL]\n⊢ map exp (comap re atTop) = comap (↑abs) atTop\n[PROOFSTEP]\nrw [← comap_exp_comap_abs_atTop, map_comap, range_exp, inf_eq_left, le_principal_iff]\n[GOAL]\n⊢ {0}ᶜ ∈ comap (↑abs) atTop\n[PROOFSTEP]\nexact eventually_ne_of_tendsto_norm_atTop tendsto_comap 0\n[GOAL]\nα : Type u_1\nx : ℂ\nh : 0 < x.re ∨ x.im ≠ 0\n⊢ ContinuousAt log x\n[PROOFSTEP]\nrefine' ContinuousAt.add _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nx : ℂ\nh : 0 < x.re ∨ x.im ≠ 0\n⊢ ContinuousAt (fun x => ↑(Real.log (↑Complex.abs x))) x\n[PROOFSTEP]\nrefine' continuous_ofReal.continuousAt.comp _\n[GOAL]\ncase refine'_1\nα : Type u_1\nx : ℂ\nh : 0 < x.re ∨ x.im ≠ 0\n⊢ ContinuousAt (fun x => Real.log (↑Complex.abs x)) x\n[PROOFSTEP]\nrefine' (Real.continuousAt_log _).comp Complex.continuous_abs.continuousAt\n[GOAL]\ncase refine'_1\nα : Type u_1\nx : ℂ\nh : 0 < x.re ∨ x.im ≠ 0\n⊢ ↑Complex.abs x ≠ 0\n[PROOFSTEP]\nrw [Complex.abs.ne_zero_iff]\n[GOAL]\ncase refine'_1\nα : Type u_1\nx : ℂ\nh : 0 < x.re ∨ x.im ≠ 0\n⊢ x ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\nα : Type u_1\nh : 0 < 0.re ∨ 0.im ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase refine'_2\nα : Type u_1\nx : ℂ\nh : 0 < x.re ∨ x.im ≠ 0\n⊢ ContinuousAt (fun x => ↑(arg x) * I) x\n[PROOFSTEP]\nhave h_cont_mul : Continuous fun x : ℂ => x * I := continuous_id'.mul continuous_const\n[GOAL]\ncase refine'_2\nα : Type u_1\nx : ℂ\nh : 0 < x.re ∨ x.im ≠ 0\nh_cont_mul : Continuous fun x => x * I\n⊢ ContinuousAt (fun x => ↑(arg x) * I) x\n[PROOFSTEP]\nrefine' h_cont_mul.continuousAt.comp (continuous_ofReal.continuousAt.comp _)\n[GOAL]\ncase refine'_2\nα : Type u_1\nx : ℂ\nh : 0 < x.re ∨ x.im ≠ 0\nh_cont_mul : Continuous fun x => x * I\n⊢ ContinuousAt (fun x => arg x) x\n[PROOFSTEP]\nexact continuousAt_arg h\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Complex.Log", "llama_tokens": 6741, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.66192288918838, "lm_q2_score": 0.5583269943353744, "lm_q1q2_score": 0.36956941720233527}}
{"text": "[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nv : n → R\nc : R\ni : n\n⊢ v ⬝ᵥ ↑(LinearMap.stdBasis R (fun x => R) i) c = v i * c\n[PROOFSTEP]\nrw [dotProduct, Finset.sum_eq_single i, LinearMap.stdBasis_same]\n[GOAL]\ncase h₀\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nv : n → R\nc : R\ni : n\n⊢ ∀ (b : n), b ∈ Finset.univ → b ≠ i → v b * ↑(LinearMap.stdBasis R (fun x => R) i) c b = 0\ncase h₁\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nv : n → R\nc : R\ni : n\n⊢ ¬i ∈ Finset.univ → v i * ↑(LinearMap.stdBasis R (fun x => R) i) c i = 0\n[PROOFSTEP]\nexact fun _ _ hb => by rw [LinearMap.stdBasis_ne _ _ _ _ hb, mul_zero]\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nv : n → R\nc : R\ni x✝¹ : n\nx✝ : x✝¹ ∈ Finset.univ\nhb : x✝¹ ≠ i\n⊢ v x✝¹ * ↑(LinearMap.stdBasis R (fun x => R) i) c x✝¹ = 0\n[PROOFSTEP]\nrw [LinearMap.stdBasis_ne _ _ _ _ hb, mul_zero]\n[GOAL]\ncase h₁\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nv : n → R\nc : R\ni : n\n⊢ ¬i ∈ Finset.univ → v i * ↑(LinearMap.stdBasis R (fun x => R) i) c i = 0\n[PROOFSTEP]\nexact fun hi => False.elim (hi <| Finset.mem_univ _)\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nv : n → R\ni : n\n⊢ v ⬝ᵥ ↑(LinearMap.stdBasis R (fun x => R) i) 1 = v i\n[PROOFSTEP]\nrw [dotProduct_stdBasis_eq_mul, mul_one]\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝¹ : Semiring R\ninst✝ : Fintype n\nv w : n → R\nh : ∀ (u : n → R), v ⬝ᵥ u = w ⬝ᵥ u\n⊢ v = w\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝¹ : Semiring R\ninst✝ : Fintype n\nv w : n → R\nh : ∀ (u : n → R), v ⬝ᵥ u = w ⬝ᵥ u\nx : n\n⊢ v x = w x\n[PROOFSTEP]\nclassical rw [← dotProduct_stdBasis_one v x, ← dotProduct_stdBasis_one w x, h]\n[GOAL]\ncase h\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝¹ : Semiring R\ninst✝ : Fintype n\nv w : n → R\nh : ∀ (u : n → R), v ⬝ᵥ u = w ⬝ᵥ u\nx : n\n⊢ v x = w x\n[PROOFSTEP]\nrw [← dotProduct_stdBasis_one v x, ← dotProduct_stdBasis_one w x, h]\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : Fintype p\ninst✝ : LinearOrderedRing R\nv : n → R\n⊢ (∀ (i : n), i ∈ Finset.univ → v i * v i = 0) ↔ v = 0\n[PROOFSTEP]\nsimp [Function.funext_iff]\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nv : n → R\n⊢ (∀ (i : n), i ∈ Finset.univ → star (v i) * v i = 0) ↔ v = 0\n[PROOFSTEP]\nsimp [Function.funext_iff, mul_eq_zero]\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nv : n → R\n⊢ (∀ (i : n), i ∈ Finset.univ → v i * star (v i) = 0) ↔ v = 0\n[PROOFSTEP]\nsimp [Function.funext_iff, mul_eq_zero]\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nA : Matrix m n R\nB : Matrix n p R\n⊢ Aᴴ * A * B = 0 ↔ A * B = 0\n[PROOFSTEP]\nrefine ⟨fun h => ?_, fun h => by simp only [Matrix.mul_assoc, h, Matrix.mul_zero]⟩\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nA : Matrix m n R\nB : Matrix n p R\nh : A * B = 0\n⊢ Aᴴ * A * B = 0\n[PROOFSTEP]\nsimp only [Matrix.mul_assoc, h, Matrix.mul_zero]\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nA : Matrix m n R\nB : Matrix n p R\nh : Aᴴ * A * B = 0\n⊢ A * B = 0\n[PROOFSTEP]\napply_fun (Bᴴ * ·) at h \n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nA : Matrix m n R\nB : Matrix n p R\nh : Bᴴ * (Aᴴ * A * B) = Bᴴ * 0\n⊢ A * B = 0\n[PROOFSTEP]\nrwa [Matrix.mul_zero, Matrix.mul_assoc, ← Matrix.mul_assoc, ← conjTranspose_mul, conjTranspose_mul_self_eq_zero] at h \n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nA : Matrix m n R\nB : Matrix m p R\n⊢ A * Aᴴ * B = 0 ↔ Aᴴ * B = 0\n[PROOFSTEP]\nsimpa only [conjTranspose_conjTranspose] using conjTranspose_mul_self_mul_eq_zero Aᴴ _\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nA : Matrix m n R\nB : Matrix p m R\n⊢ B * (A * Aᴴ) = 0 ↔ B * A = 0\n[PROOFSTEP]\nrw [← conjTranspose_eq_zero, conjTranspose_mul, conjTranspose_mul, conjTranspose_conjTranspose,\n  self_mul_conjTranspose_mul_eq_zero, ← conjTranspose_mul, conjTranspose_eq_zero]\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nA : Matrix m n R\nB : Matrix p n R\n⊢ B * (Aᴴ * A) = 0 ↔ B * Aᴴ = 0\n[PROOFSTEP]\nsimpa only [conjTranspose_conjTranspose] using mul_self_mul_conjTranspose_eq_zero Aᴴ _\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nA : Matrix m n R\nv : n → R\n⊢ mulVec (Aᴴ * A) v = 0 ↔ mulVec A v = 0\n[PROOFSTEP]\nsimpa only [← Matrix.col_mulVec, col_eq_zero] using conjTranspose_mul_self_mul_eq_zero A (col v)\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nA : Matrix m n R\nv : m → R\n⊢ mulVec (A * Aᴴ) v = 0 ↔ mulVec Aᴴ v = 0\n[PROOFSTEP]\nsimpa only [conjTranspose_conjTranspose] using conjTranspose_mul_self_mulVec_eq_zero Aᴴ _\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nA : Matrix m n R\nv : n → R\n⊢ vecMul v (Aᴴ * A) = 0 ↔ vecMul v Aᴴ = 0\n[PROOFSTEP]\nsimpa only [← Matrix.row_vecMul, row_eq_zero] using mul_conjTranspose_mul_self_eq_zero A (row v)\n[GOAL]\nm : Type u_1\nn : Type u_2\np : Type u_3\nR : Type u_4\ninst✝⁶ : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype p\ninst✝³ : PartialOrder R\ninst✝² : NonUnitalRing R\ninst✝¹ : StarOrderedRing R\ninst✝ : NoZeroDivisors R\nA : Matrix m n R\nv : m → R\n⊢ vecMul v (A * Aᴴ) = 0 ↔ vecMul v A = 0\n[PROOFSTEP]\nsimpa only [conjTranspose_conjTranspose] using vecMul_conjTranspose_mul_self_eq_zero Aᴴ _\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.DotProduct", "llama_tokens": 3955, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646010190476, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.36946628913777396}}
{"text": "[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J✝ J : FractionalIdeal R₁⁰ K\nh : J ≠ 0\n⊢ ↑J⁻¹ = IsLocalization.coeSubmodule K ⊤ / ↑J\n[PROOFSTEP]\nrw [inv_nonzero]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J✝ J : FractionalIdeal R₁⁰ K\nh : J ≠ 0\n⊢ ↑{ val := ↑1 / ↑J, property := (_ : IsFractional R₁⁰ (↑1 / ↑J)) } = IsLocalization.coeSubmodule K ⊤ / ↑J\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J✝ J : FractionalIdeal R₁⁰ K\nh : J ≠ 0\n⊢ J ≠ 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J✝ J : FractionalIdeal R₁⁰ K\nh : J ≠ 0\n⊢ J ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J : FractionalIdeal R₁⁰ K\nhI : I ≠ 0\nhJ : J ≠ 0\nhIJ : I ≤ J\n⊢ J⁻¹ ≤ I⁻¹\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J : FractionalIdeal R₁⁰ K\nhI : I ≠ 0\nhJ : J ≠ 0\nhIJ : I ≤ J\nx : K\n⊢ x ∈ (fun a => ↑a) J⁻¹ → x ∈ (fun a => ↑a) I⁻¹\n[PROOFSTEP]\nsimp only [val_eq_coe, mem_coe, mem_inv_iff hJ, mem_inv_iff hI]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J : FractionalIdeal R₁⁰ K\nhI : I ≠ 0\nhJ : J ≠ 0\nhIJ : I ≤ J\nx : K\n⊢ (∀ (y : K), y ∈ J → x * y ∈ 1) → ∀ (y : K), y ∈ I → x * y ∈ 1\n[PROOFSTEP]\nexact fun h y hy => h y (hIJ hy)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\n⊢ J = I⁻¹\n[PROOFSTEP]\nhave hI : I ≠ 0 := ne_zero_of_mul_eq_one I J h\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ J = I⁻¹\n[PROOFSTEP]\nsuffices h' : I * (1 / I) = 1\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\nh' : I * (1 / I) = 1\n⊢ J = I⁻¹\n[PROOFSTEP]\nexact congr_arg Units.inv <| @Units.ext _ _ (Units.mkOfMulEqOne _ _ h) (Units.mkOfMulEqOne _ _ h') rfl\n[GOAL]\ncase h'\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ I * (1 / I) = 1\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase h'.a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ I * (1 / I) ≤ 1\n[PROOFSTEP]\napply mul_le.mpr _\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ ∀ (i : K), i ∈ I → ∀ (j : K), j ∈ 1 / I → i * j ∈ 1\n[PROOFSTEP]\nintro x hx y hy\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\nx : K\nhx : x ∈ I\ny : K\nhy : y ∈ 1 / I\n⊢ x * y ∈ 1\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\nx : K\nhx : x ∈ I\ny : K\nhy : y ∈ 1 / I\n⊢ y * x ∈ 1\n[PROOFSTEP]\nexact (mem_div_iff_of_nonzero hI).mp hy x hx\n[GOAL]\ncase h'.a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ 1 ≤ I * (1 / I)\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase h'.a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ I * J ≤ I * (I * J / I)\n[PROOFSTEP]\napply mul_left_mono I\n[GOAL]\ncase h'.a.a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ J ≤ I * J / I\n[PROOFSTEP]\napply (le_div_iff_of_nonzero hI).mpr _\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ ∀ (x : K), x ∈ J → ∀ (y : K), y ∈ I → x * y ∈ I * J\n[PROOFSTEP]\nintro y hy x hx\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\ny : K\nhy : y ∈ J\nx : K\nhx : x ∈ I\n⊢ y * x ∈ I * J\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\ny : K\nhy : y ∈ J\nx : K\nhx : x ∈ I\n⊢ x * y ∈ I * J\n[PROOFSTEP]\nexact mul_mem_mul hx hy\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\nR₁ : Type u_4\ninst✝³ : CommRing R₁\ninst✝² : IsDomain R₁\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI✝ J✝ I : FractionalIdeal R₁⁰ K\nx✝ : ∃ J, I * J = 1\nJ : FractionalIdeal R₁⁰ K\nhJ : I * J = 1\n⊢ I * I⁻¹ = 1\n[PROOFSTEP]\nrwa [← right_inverse_eq K I J hJ]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : IsDomain A\nR₁ : Type u_4\ninst✝⁶ : CommRing R₁\ninst✝⁵ : IsDomain R₁\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\nh : K ≃ₐ[R₁] K'\n⊢ map (↑h) I⁻¹ = (map (↑h) I)⁻¹\n[PROOFSTEP]\nrw [inv_eq, map_div, map_one, inv_eq]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : IsDomain A\nR₁ : Type u_4\ninst✝⁶ : CommRing R₁\ninst✝⁵ : IsDomain R₁\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nI J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nx y : K\n⊢ spanSingleton R₁⁰ x / spanSingleton R₁⁰ y = spanSingleton R₁⁰ (x / y)\n[PROOFSTEP]\nrw [div_spanSingleton, mul_comm, spanSingleton_mul_spanSingleton, div_eq_mul_inv]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : IsDomain A\nR₁ : Type u_4\ninst✝⁶ : CommRing R₁\ninst✝⁵ : IsDomain R₁\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nI J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nx : K\nhx : x ≠ 0\n⊢ spanSingleton R₁⁰ x / spanSingleton R₁⁰ x = 1\n[PROOFSTEP]\nrw [spanSingleton_div_spanSingleton, div_self hx, spanSingleton_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : IsDomain A\nR₁ : Type u_4\ninst✝⁶ : CommRing R₁\ninst✝⁵ : IsDomain R₁\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nI J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nx : R₁\nhx : x ≠ 0\n⊢ ↑(Ideal.span {x}) / ↑(Ideal.span {x}) = 1\n[PROOFSTEP]\nrw [coeIdeal_span_singleton,\n  spanSingleton_div_self K <| (map_ne_zero_iff _ <| NoZeroSMulDivisors.algebraMap_injective R₁ K).mpr hx]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : IsDomain A\nR₁ : Type u_4\ninst✝⁶ : CommRing R₁\ninst✝⁵ : IsDomain R₁\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nI J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nx : K\nhx : x ≠ 0\n⊢ spanSingleton R₁⁰ x * (spanSingleton R₁⁰ x)⁻¹ = 1\n[PROOFSTEP]\nrw [spanSingleton_inv, spanSingleton_mul_spanSingleton, mul_inv_cancel hx, spanSingleton_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : IsDomain A\nR₁ : Type u_4\ninst✝⁶ : CommRing R₁\ninst✝⁵ : IsDomain R₁\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nI J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nx : R₁\nhx : x ≠ 0\n⊢ ↑(Ideal.span {x}) * (↑(Ideal.span {x}))⁻¹ = 1\n[PROOFSTEP]\nrw [coeIdeal_span_singleton,\n  spanSingleton_mul_inv K <| (map_ne_zero_iff _ <| NoZeroSMulDivisors.algebraMap_injective R₁ K).mpr hx]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : IsDomain A\nR₁ : Type u_4\ninst✝⁶ : CommRing R₁\ninst✝⁵ : IsDomain R₁\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nI J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nx : K\nhx : x ≠ 0\n⊢ (spanSingleton R₁⁰ x)⁻¹ * spanSingleton R₁⁰ x = 1\n[PROOFSTEP]\nrw [mul_comm, spanSingleton_mul_inv K hx]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : IsDomain A\nR₁ : Type u_4\ninst✝⁶ : CommRing R₁\ninst✝⁵ : IsDomain R₁\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nI J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nx : R₁\nhx : x ≠ 0\n⊢ (↑(Ideal.span {x}))⁻¹ * ↑(Ideal.span {x}) = 1\n[PROOFSTEP]\nrw [mul_comm, coe_ideal_span_singleton_mul_inv K hx]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : Field K\ninst✝¹¹ : IsDomain A\nR₁✝ : Type u_4\ninst✝¹⁰ : CommRing R₁✝\ninst✝⁹ : IsDomain R₁✝\ninst✝⁸ : Algebra R₁✝ K\ninst✝⁷ : IsFractionRing R₁✝ K\nI✝ J : FractionalIdeal R₁✝⁰ K\nK' : Type u_5\ninst✝⁶ : Field K'\ninst✝⁵ : Algebra R₁✝ K'\ninst✝⁴ : IsFractionRing R₁✝ K'\nR₁ : Type u_6\ninst✝³ : CommRing R₁\ninst✝² : Algebra R₁ K\ninst✝¹ : IsLocalization R₁⁰ K\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\n⊢ I * spanSingleton R₁⁰ (generator ↑I)⁻¹ = 1\n[PROOFSTEP]\nconv_lhs => congr; rw [eq_spanSingleton_of_principal I]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : Field K\ninst✝¹¹ : IsDomain A\nR₁✝ : Type u_4\ninst✝¹⁰ : CommRing R₁✝\ninst✝⁹ : IsDomain R₁✝\ninst✝⁸ : Algebra R₁✝ K\ninst✝⁷ : IsFractionRing R₁✝ K\nI✝ J : FractionalIdeal R₁✝⁰ K\nK' : Type u_5\ninst✝⁶ : Field K'\ninst✝⁵ : Algebra R₁✝ K'\ninst✝⁴ : IsFractionRing R₁✝ K'\nR₁ : Type u_6\ninst✝³ : CommRing R₁\ninst✝² : Algebra R₁ K\ninst✝¹ : IsLocalization R₁⁰ K\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\n| I * spanSingleton R₁⁰ (generator ↑I)⁻¹\n[PROOFSTEP]\ncongr; rw [eq_spanSingleton_of_principal I]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : Field K\ninst✝¹¹ : IsDomain A\nR₁✝ : Type u_4\ninst✝¹⁰ : CommRing R₁✝\ninst✝⁹ : IsDomain R₁✝\ninst✝⁸ : Algebra R₁✝ K\ninst✝⁷ : IsFractionRing R₁✝ K\nI✝ J : FractionalIdeal R₁✝⁰ K\nK' : Type u_5\ninst✝⁶ : Field K'\ninst✝⁵ : Algebra R₁✝ K'\ninst✝⁴ : IsFractionRing R₁✝ K'\nR₁ : Type u_6\ninst✝³ : CommRing R₁\ninst✝² : Algebra R₁ K\ninst✝¹ : IsLocalization R₁⁰ K\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\n| I * spanSingleton R₁⁰ (generator ↑I)⁻¹\n[PROOFSTEP]\ncongr; rw [eq_spanSingleton_of_principal I]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : Field K\ninst✝¹¹ : IsDomain A\nR₁✝ : Type u_4\ninst✝¹⁰ : CommRing R₁✝\ninst✝⁹ : IsDomain R₁✝\ninst✝⁸ : Algebra R₁✝ K\ninst✝⁷ : IsFractionRing R₁✝ K\nI✝ J : FractionalIdeal R₁✝⁰ K\nK' : Type u_5\ninst✝⁶ : Field K'\ninst✝⁵ : Algebra R₁✝ K'\ninst✝⁴ : IsFractionRing R₁✝ K'\nR₁ : Type u_6\ninst✝³ : CommRing R₁\ninst✝² : Algebra R₁ K\ninst✝¹ : IsLocalization R₁⁰ K\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\n| I * spanSingleton R₁⁰ (generator ↑I)⁻¹\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : Field K\ninst✝¹¹ : IsDomain A\nR₁✝ : Type u_4\ninst✝¹⁰ : CommRing R₁✝\ninst✝⁹ : IsDomain R₁✝\ninst✝⁸ : Algebra R₁✝ K\ninst✝⁷ : IsFractionRing R₁✝ K\nI✝ J : FractionalIdeal R₁✝⁰ K\nK' : Type u_5\ninst✝⁶ : Field K'\ninst✝⁵ : Algebra R₁✝ K'\ninst✝⁴ : IsFractionRing R₁✝ K'\nR₁ : Type u_6\ninst✝³ : CommRing R₁\ninst✝² : Algebra R₁ K\ninst✝¹ : IsLocalization R₁⁰ K\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\n| I\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : Field K\ninst✝¹¹ : IsDomain A\nR₁✝ : Type u_4\ninst✝¹⁰ : CommRing R₁✝\ninst✝⁹ : IsDomain R₁✝\ninst✝⁸ : Algebra R₁✝ K\ninst✝⁷ : IsFractionRing R₁✝ K\nI✝ J : FractionalIdeal R₁✝⁰ K\nK' : Type u_5\ninst✝⁶ : Field K'\ninst✝⁵ : Algebra R₁✝ K'\ninst✝⁴ : IsFractionRing R₁✝ K'\nR₁ : Type u_6\ninst✝³ : CommRing R₁\ninst✝² : Algebra R₁ K\ninst✝¹ : IsLocalization R₁⁰ K\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\n| spanSingleton R₁⁰ (generator ↑I)⁻¹\n[PROOFSTEP]\nrw [eq_spanSingleton_of_principal I]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : Field K\ninst✝¹¹ : IsDomain A\nR₁✝ : Type u_4\ninst✝¹⁰ : CommRing R₁✝\ninst✝⁹ : IsDomain R₁✝\ninst✝⁸ : Algebra R₁✝ K\ninst✝⁷ : IsFractionRing R₁✝ K\nI✝ J : FractionalIdeal R₁✝⁰ K\nK' : Type u_5\ninst✝⁶ : Field K'\ninst✝⁵ : Algebra R₁✝ K'\ninst✝⁴ : IsFractionRing R₁✝ K'\nR₁ : Type u_6\ninst✝³ : CommRing R₁\ninst✝² : Algebra R₁ K\ninst✝¹ : IsLocalization R₁⁰ K\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\n⊢ spanSingleton R₁⁰ (generator ↑I) * spanSingleton R₁⁰ (generator ↑I)⁻¹ = 1\n[PROOFSTEP]\nrw [spanSingleton_mul_spanSingleton, mul_inv_cancel, spanSingleton_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : Field K\ninst✝¹¹ : IsDomain A\nR₁✝ : Type u_4\ninst✝¹⁰ : CommRing R₁✝\ninst✝⁹ : IsDomain R₁✝\ninst✝⁸ : Algebra R₁✝ K\ninst✝⁷ : IsFractionRing R₁✝ K\nI✝ J : FractionalIdeal R₁✝⁰ K\nK' : Type u_5\ninst✝⁶ : Field K'\ninst✝⁵ : Algebra R₁✝ K'\ninst✝⁴ : IsFractionRing R₁✝ K'\nR₁ : Type u_6\ninst✝³ : CommRing R₁\ninst✝² : Algebra R₁ K\ninst✝¹ : IsLocalization R₁⁰ K\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\n⊢ generator ↑I ≠ 0\n[PROOFSTEP]\nintro generator_I_eq_zero\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : Field K\ninst✝¹¹ : IsDomain A\nR₁✝ : Type u_4\ninst✝¹⁰ : CommRing R₁✝\ninst✝⁹ : IsDomain R₁✝\ninst✝⁸ : Algebra R₁✝ K\ninst✝⁷ : IsFractionRing R₁✝ K\nI✝ J : FractionalIdeal R₁✝⁰ K\nK' : Type u_5\ninst✝⁶ : Field K'\ninst✝⁵ : Algebra R₁✝ K'\ninst✝⁴ : IsFractionRing R₁✝ K'\nR₁ : Type u_6\ninst✝³ : CommRing R₁\ninst✝² : Algebra R₁ K\ninst✝¹ : IsLocalization R₁⁰ K\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\ngenerator_I_eq_zero : generator ↑I = 0\n⊢ False\n[PROOFSTEP]\napply h\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing A\ninst✝¹² : Field K\ninst✝¹¹ : IsDomain A\nR₁✝ : Type u_4\ninst✝¹⁰ : CommRing R₁✝\ninst✝⁹ : IsDomain R₁✝\ninst✝⁸ : Algebra R₁✝ K\ninst✝⁷ : IsFractionRing R₁✝ K\nI✝ J : FractionalIdeal R₁✝⁰ K\nK' : Type u_5\ninst✝⁶ : Field K'\ninst✝⁵ : Algebra R₁✝ K'\ninst✝⁴ : IsFractionRing R₁✝ K'\nR₁ : Type u_6\ninst✝³ : CommRing R₁\ninst✝² : Algebra R₁ K\ninst✝¹ : IsLocalization R₁⁰ K\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\ngenerator_I_eq_zero : generator ↑I = 0\n⊢ I = 0\n[PROOFSTEP]\nrw [eq_spanSingleton_of_principal I, generator_I_eq_zero, spanSingleton_zero]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\n⊢ I * I⁻¹ = 1 ↔ generator ↑I ≠ 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\n⊢ I * I⁻¹ = 1 → generator ↑I ≠ 0\n[PROOFSTEP]\nintro hI hg\n[GOAL]\ncase mp\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nhI : I * I⁻¹ = 1\nhg : generator ↑I = 0\n⊢ False\n[PROOFSTEP]\napply ne_zero_of_mul_eq_one _ _ hI\n[GOAL]\ncase mp\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nhI : I * I⁻¹ = 1\nhg : generator ↑I = 0\n⊢ I = 0\n[PROOFSTEP]\nrw [eq_spanSingleton_of_principal I, hg, spanSingleton_zero]\n[GOAL]\ncase mpr\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\n⊢ generator ↑I ≠ 0 → I * I⁻¹ = 1\n[PROOFSTEP]\nintro hg\n[GOAL]\ncase mpr\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nhg : generator ↑I ≠ 0\n⊢ I * I⁻¹ = 1\n[PROOFSTEP]\napply invertible_of_principal\n[GOAL]\ncase mpr.h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nhg : generator ↑I ≠ 0\n⊢ I ≠ 0\n[PROOFSTEP]\nrw [eq_spanSingleton_of_principal I]\n[GOAL]\ncase mpr.h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nhg : generator ↑I ≠ 0\n⊢ spanSingleton R₁⁰ (generator ↑I) ≠ 0\n[PROOFSTEP]\nintro hI\n[GOAL]\ncase mpr.h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nhg : generator ↑I ≠ 0\nhI : spanSingleton R₁⁰ (generator ↑I) = 0\n⊢ False\n[PROOFSTEP]\nhave := mem_spanSingleton_self R₁⁰ (generator (I : Submodule R₁ K))\n[GOAL]\ncase mpr.h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nhg : generator ↑I ≠ 0\nhI : spanSingleton R₁⁰ (generator ↑I) = 0\nthis : generator ↑I ∈ spanSingleton R₁⁰ (generator ↑I)\n⊢ False\n[PROOFSTEP]\nrw [hI, mem_zero_iff] at this \n[GOAL]\ncase mpr.h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nhg : generator ↑I ≠ 0\nhI : spanSingleton R₁⁰ (generator ↑I) = 0\nthis : generator ↑I = 0\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\n⊢ IsPrincipal ↑I⁻¹\n[PROOFSTEP]\nrw [val_eq_coe, isPrincipal_iff]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\n⊢ ∃ x, I⁻¹ = spanSingleton R₁⁰ x\n[PROOFSTEP]\nuse(generator (I : Submodule R₁ K))⁻¹\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\n⊢ I⁻¹ = spanSingleton R₁⁰ (generator ↑I)⁻¹\n[PROOFSTEP]\nhave hI : I * spanSingleton _ (generator (I : Submodule R₁ K))⁻¹ = 1\n[GOAL]\ncase hI\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\n⊢ I * spanSingleton R₁⁰ (generator ↑I)⁻¹ = 1\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\nhI : I * spanSingleton R₁⁰ (generator ↑I)⁻¹ = 1\n⊢ I⁻¹ = spanSingleton R₁⁰ (generator ↑I)⁻¹\n[PROOFSTEP]\napply mul_generator_self_inv _ I h\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\nR₁ : Type u_4\ninst✝⁷ : CommRing R₁\ninst✝⁶ : IsDomain R₁\ninst✝⁵ : Algebra R₁ K\ninst✝⁴ : IsFractionRing R₁ K\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝³ : Field K'\ninst✝² : Algebra R₁ K'\ninst✝¹ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\ninst✝ : IsPrincipal ↑I\nh : I ≠ 0\nhI : I * spanSingleton R₁⁰ (generator ↑I)⁻¹ = 1\n⊢ I⁻¹ = spanSingleton R₁⁰ (generator ↑I)⁻¹\n[PROOFSTEP]\nexact (right_inverse_eq _ I (spanSingleton _ (generator (I : Submodule R₁ K))⁻¹) hI).symm\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\n⊢ IsDedekindDomainInv A ↔ ∀ (I : FractionalIdeal A⁰ K), I ≠ ⊥ → I * I⁻¹ = 1\n[PROOFSTEP]\nlet h : FractionalIdeal A⁰ (FractionRing A) ≃+* FractionalIdeal A⁰ K :=\n  FractionalIdeal.mapEquiv (FractionRing.algEquiv A K)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : FractionalIdeal A⁰ (FractionRing A) ≃+* FractionalIdeal A⁰ K := mapEquiv (FractionRing.algEquiv A K)\n⊢ IsDedekindDomainInv A ↔ ∀ (I : FractionalIdeal A⁰ K), I ≠ ⊥ → I * I⁻¹ = 1\n[PROOFSTEP]\nrefine h.toEquiv.forall_congr (fun {x} => ?_)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : FractionalIdeal A⁰ (FractionRing A) ≃+* FractionalIdeal A⁰ K := mapEquiv (FractionRing.algEquiv A K)\nx : FractionalIdeal A⁰ (FractionRing A)\n⊢ x ≠ ⊥ → x * x⁻¹ = 1 ↔ ↑h.toEquiv x ≠ ⊥ → ↑h.toEquiv x * (↑h.toEquiv x)⁻¹ = 1\n[PROOFSTEP]\nrw [← h.toEquiv.apply_eq_iff_eq]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : FractionalIdeal A⁰ (FractionRing A) ≃+* FractionalIdeal A⁰ K := mapEquiv (FractionRing.algEquiv A K)\nx : FractionalIdeal A⁰ (FractionRing A)\n⊢ x ≠ ⊥ → ↑h.toEquiv (x * x⁻¹) = ↑h.toEquiv 1 ↔ ↑h.toEquiv x ≠ ⊥ → ↑h.toEquiv x * (↑h.toEquiv x)⁻¹ = 1\n[PROOFSTEP]\nsimp [IsDedekindDomainInv]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nhx : IsIntegral A x\nhI : IsUnit (adjoinIntegral A⁰ x hx)\n⊢ adjoinIntegral A⁰ x hx = 1\n[PROOFSTEP]\nset I := adjoinIntegral A⁰ x hx\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nhx : IsIntegral A x\nI : FractionalIdeal A⁰ K := adjoinIntegral A⁰ x hx\nhI : IsUnit I\n⊢ I = 1\n[PROOFSTEP]\nhave mul_self : I * I = I := by apply coeToSubmodule_injective; simp\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nhx : IsIntegral A x\nI : FractionalIdeal A⁰ K := adjoinIntegral A⁰ x hx\nhI : IsUnit I\n⊢ I * I = I\n[PROOFSTEP]\napply coeToSubmodule_injective\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nhx : IsIntegral A x\nI : FractionalIdeal A⁰ K := adjoinIntegral A⁰ x hx\nhI : IsUnit I\n⊢ (fun I => ↑I) (I * I) = (fun I => ↑I) I\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nhx : IsIntegral A x\nI : FractionalIdeal A⁰ K := adjoinIntegral A⁰ x hx\nhI : IsUnit I\nmul_self : I * I = I\n⊢ I = 1\n[PROOFSTEP]\nconvert congr_arg (· * I⁻¹) mul_self\n[GOAL]\ncase h.e'_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nhx : IsIntegral A x\nI : FractionalIdeal A⁰ K := adjoinIntegral A⁰ x hx\nhI : IsUnit I\nmul_self : I * I = I\n⊢ I = I * I * I⁻¹\n[PROOFSTEP]\nsimp only [(mul_inv_cancel_iff_isUnit K).mpr hI, mul_assoc, mul_one]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nhx : IsIntegral A x\nI : FractionalIdeal A⁰ K := adjoinIntegral A⁰ x hx\nhI : IsUnit I\nmul_self : I * I = I\n⊢ 1 = I * I⁻¹\n[PROOFSTEP]\nsimp only [(mul_inv_cancel_iff_isUnit K).mpr hI, mul_assoc, mul_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\n⊢ IsNoetherianRing A\n[PROOFSTEP]\nrefine' isNoetherianRing_iff.mpr ⟨fun I : Ideal A => _⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nI : Ideal A\n⊢ Submodule.FG I\n[PROOFSTEP]\nby_cases hI : I = ⊥\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nI : Ideal A\nhI : I = ⊥\n⊢ Submodule.FG I\n[PROOFSTEP]\nrw [hI]\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nI : Ideal A\nhI : I = ⊥\n⊢ Submodule.FG ⊥\n[PROOFSTEP]\napply Submodule.fg_bot\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nI : Ideal A\nhI : ¬I = ⊥\n⊢ Submodule.FG I\n[PROOFSTEP]\nhave hI : (I : FractionalIdeal A⁰ (FractionRing A)) ≠ 0 := coeIdeal_ne_zero.mpr hI\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nI : Ideal A\nhI✝ : ¬I = ⊥\nhI : ↑I ≠ 0\n⊢ Submodule.FG I\n[PROOFSTEP]\nexact I.fg_of_isUnit (IsFractionRing.injective A (FractionRing A)) (h.isUnit hI)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\n⊢ IsIntegrallyClosed A\n[PROOFSTEP]\nrefine ⟨fun {x hx} => ?_⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nx : FractionRing A\nhx : IsIntegral A x\n⊢ ∃ y, ↑(algebraMap A (FractionRing A)) y = x\n[PROOFSTEP]\nrw [← Set.mem_range, ← Algebra.mem_bot, ← Subalgebra.mem_toSubmodule, Algebra.toSubmodule_bot, ←\n  coe_spanSingleton A⁰ (1 : FractionRing A), spanSingleton_one, ←\n  FractionalIdeal.adjoinIntegral_eq_one_of_isUnit x hx (h.isUnit _)]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nx : FractionRing A\nhx : IsIntegral A x\n⊢ x ∈ ↑(adjoinIntegral A⁰ x hx)\n[PROOFSTEP]\nexact mem_adjoinIntegral_self A⁰ x hx\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nx : FractionRing A\nhx : IsIntegral A x\n⊢ adjoinIntegral A⁰ x hx ≠ 0\n[PROOFSTEP]\nexact fun h => one_ne_zero (eq_zero_iff.mp h 1 (Algebra.adjoin A { x }).one_mem)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\n⊢ ∀ {p : Ideal A}, p ≠ ⊥ → Ideal.IsPrime p → Ideal.IsMaximal p\n[PROOFSTEP]\nrintro P P_ne hP\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\n⊢ Ideal.IsMaximal P\n[PROOFSTEP]\nrefine\n  Ideal.isMaximal_def.mpr\n    ⟨hP.ne_top, fun M hM => ?_⟩\n      -- We may assume `P` and `M` (as fractional ideals) are nonzero.\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\n⊢ M = ⊤\n[PROOFSTEP]\nhave P'_ne : (P : FractionalIdeal A⁰ (FractionRing A)) ≠ 0 := coeIdeal_ne_zero.mpr P_ne\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\n⊢ M = ⊤\n[PROOFSTEP]\nhave M'_ne : (M : FractionalIdeal A⁰ (FractionRing A)) ≠ 0 := coeIdeal_ne_zero.mpr (lt_of_le_of_lt bot_le hM).ne'\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\n⊢ M = ⊤\n[PROOFSTEP]\nsuffices (M⁻¹ : FractionalIdeal A⁰ (FractionRing A)) * P ≤ P\n  by\n  rw [eq_top_iff, ← coeIdeal_le_coeIdeal (FractionRing A), coeIdeal_top]\n  calc\n    (1 : FractionalIdeal A⁰ (FractionRing A)) = _ * _ * _ := ?_\n    _ ≤ _ * _ :=\n      (mul_right_mono ((P : FractionalIdeal A⁰ (FractionRing A))⁻¹ * M : FractionalIdeal A⁰ (FractionRing A)) this)\n    _ = M := ?_\n  ·\n    rw [mul_assoc, ← mul_assoc (P : FractionalIdeal A⁰ (FractionRing A)), h.mul_inv_eq_one P'_ne, one_mul,\n      h.inv_mul_eq_one M'_ne]\n  ·\n    rw [← mul_assoc (P : FractionalIdeal A⁰ (FractionRing A)), h.mul_inv_eq_one P'_ne, one_mul]\n      -- Suppose we have `x ∈ M⁻¹ * P`, then in fact `x = algebraMap _ _ y` for some `y`.\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nthis : (↑M)⁻¹ * ↑P ≤ ↑P\n⊢ M = ⊤\n[PROOFSTEP]\nrw [eq_top_iff, ← coeIdeal_le_coeIdeal (FractionRing A), coeIdeal_top]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nthis : (↑M)⁻¹ * ↑P ≤ ↑P\n⊢ 1 ≤ ↑M\n[PROOFSTEP]\ncalc\n  (1 : FractionalIdeal A⁰ (FractionRing A)) = _ * _ * _ := ?_\n  _ ≤ _ * _ :=\n    (mul_right_mono ((P : FractionalIdeal A⁰ (FractionRing A))⁻¹ * M : FractionalIdeal A⁰ (FractionRing A)) this)\n  _ = M := ?_\n[GOAL]\ncase calc_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nthis : (↑M)⁻¹ * ↑P ≤ ↑P\n⊢ 1 = (↑M)⁻¹ * ↑P * ((↑P)⁻¹ * ↑M)\n[PROOFSTEP]\nrw [mul_assoc, ← mul_assoc (P : FractionalIdeal A⁰ (FractionRing A)), h.mul_inv_eq_one P'_ne, one_mul,\n  h.inv_mul_eq_one M'_ne]\n[GOAL]\ncase calc_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nthis : (↑M)⁻¹ * ↑P ≤ ↑P\n⊢ ↑P * ((↑P)⁻¹ * ↑M) = ↑M\n[PROOFSTEP]\nrw [← mul_assoc (P : FractionalIdeal A⁰ (FractionRing A)), h.mul_inv_eq_one P'_ne, one_mul]\n  -- Suppose we have `x ∈ M⁻¹ * P`, then in fact `x = algebraMap _ _ y` for some `y`.\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\n⊢ (↑M)⁻¹ * ↑P ≤ ↑P\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nx : FractionRing A\nhx : x ∈ (fun a => ↑a) ((↑M)⁻¹ * ↑P)\n⊢ x ∈ (fun a => ↑a) ↑P\n[PROOFSTEP]\nhave le_one : (M⁻¹ : FractionalIdeal A⁰ (FractionRing A)) * P ≤ 1 :=\n  by\n  rw [← h.inv_mul_eq_one M'_ne]\n  exact mul_left_mono _ ((coeIdeal_le_coeIdeal (FractionRing A)).mpr hM.le)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nx : FractionRing A\nhx : x ∈ (fun a => ↑a) ((↑M)⁻¹ * ↑P)\n⊢ (↑M)⁻¹ * ↑P ≤ 1\n[PROOFSTEP]\nrw [← h.inv_mul_eq_one M'_ne]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nx : FractionRing A\nhx : x ∈ (fun a => ↑a) ((↑M)⁻¹ * ↑P)\n⊢ (↑M)⁻¹ * ↑P ≤ (↑M)⁻¹ * ↑M\n[PROOFSTEP]\nexact mul_left_mono _ ((coeIdeal_le_coeIdeal (FractionRing A)).mpr hM.le)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nx : FractionRing A\nhx : x ∈ (fun a => ↑a) ((↑M)⁻¹ * ↑P)\nle_one : (↑M)⁻¹ * ↑P ≤ 1\n⊢ x ∈ (fun a => ↑a) ↑P\n[PROOFSTEP]\nobtain ⟨y, _hy, rfl⟩ :=\n  (mem_coeIdeal _).mp\n    (le_one hx)\n      -- Since `M` is strictly greater than `P`, let `z ∈ M \\ P`.\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nle_one : (↑M)⁻¹ * ↑P ≤ 1\ny : A\n_hy : y ∈ ⊤\nhx : ↑(algebraMap A (FractionRing A)) y ∈ (fun a => ↑a) ((↑M)⁻¹ * ↑P)\n⊢ ↑(algebraMap A (FractionRing A)) y ∈ (fun a => ↑a) ↑P\n[PROOFSTEP]\nobtain ⟨z, hzM, hzp⟩ := SetLike.exists_of_lt hM\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nle_one : (↑M)⁻¹ * ↑P ≤ 1\ny : A\n_hy : y ∈ ⊤\nhx : ↑(algebraMap A (FractionRing A)) y ∈ (fun a => ↑a) ((↑M)⁻¹ * ↑P)\nz : A\nhzM : z ∈ M\nhzp : ¬z ∈ P\n⊢ ↑(algebraMap A (FractionRing A)) y ∈ (fun a => ↑a) ↑P\n[PROOFSTEP]\nhave zy_mem := mul_mem_mul (mem_coeIdeal_of_mem A⁰ hzM) hx\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nle_one : (↑M)⁻¹ * ↑P ≤ 1\ny : A\n_hy : y ∈ ⊤\nhx : ↑(algebraMap A (FractionRing A)) y ∈ (fun a => ↑a) ((↑M)⁻¹ * ↑P)\nz : A\nhzM : z ∈ M\nhzp : ¬z ∈ P\nzy_mem : ↑(algebraMap A (FractionRing A)) z * ↑(algebraMap A (FractionRing A)) y ∈ ↑M * ((↑M)⁻¹ * ↑P)\n⊢ ↑(algebraMap A (FractionRing A)) y ∈ (fun a => ↑a) ↑P\n[PROOFSTEP]\nrw [← RingHom.map_mul, ← mul_assoc, h.mul_inv_eq_one M'_ne, one_mul] at zy_mem \n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nle_one : (↑M)⁻¹ * ↑P ≤ 1\ny : A\n_hy : y ∈ ⊤\nhx : ↑(algebraMap A (FractionRing A)) y ∈ (fun a => ↑a) ((↑M)⁻¹ * ↑P)\nz : A\nhzM : z ∈ M\nhzp : ¬z ∈ P\nzy_mem : ↑(algebraMap A (FractionRing A)) (z * y) ∈ ↑P\n⊢ ↑(algebraMap A (FractionRing A)) y ∈ (fun a => ↑a) ↑P\n[PROOFSTEP]\nobtain ⟨zy, hzy, zy_eq⟩ := (mem_coeIdeal A⁰).mp zy_mem\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nle_one : (↑M)⁻¹ * ↑P ≤ 1\ny : A\n_hy : y ∈ ⊤\nhx : ↑(algebraMap A (FractionRing A)) y ∈ (fun a => ↑a) ((↑M)⁻¹ * ↑P)\nz : A\nhzM : z ∈ M\nhzp : ¬z ∈ P\nzy_mem : ↑(algebraMap A (FractionRing A)) (z * y) ∈ ↑P\nzy : A\nhzy : zy ∈ P\nzy_eq : ↑(algebraMap A ((fun x => FractionRing A) z)) zy = ↑(algebraMap A (FractionRing A)) (z * y)\n⊢ ↑(algebraMap A (FractionRing A)) y ∈ (fun a => ↑a) ↑P\n[PROOFSTEP]\nrw [IsFractionRing.injective A (FractionRing A) zy_eq] at hzy \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomainInv A\nP : Ideal A\nP_ne : P ≠ ⊥\nhP : Ideal.IsPrime P\nM : Ideal A\nhM : P < M\nP'_ne : ↑P ≠ 0\nM'_ne : ↑M ≠ 0\nle_one : (↑M)⁻¹ * ↑P ≤ 1\ny : A\n_hy : y ∈ ⊤\nhx : ↑(algebraMap A (FractionRing A)) y ∈ (fun a => ↑a) ((↑M)⁻¹ * ↑P)\nz : A\nhzM : z ∈ M\nhzp : ¬z ∈ P\nzy_mem : ↑(algebraMap A (FractionRing A)) (z * y) ∈ ↑P\nzy : A\nhzy : z * y ∈ P\nzy_eq : ↑(algebraMap A ((fun x => FractionRing A) z)) zy = ↑(algebraMap A (FractionRing A)) (z * y)\n⊢ ↑(algebraMap A (FractionRing A)) y ∈ (fun a => ↑a) ↑P\n[PROOFSTEP]\nexact mem_coeIdeal_of_mem A⁰ (Or.resolve_left (hP.mem_or_mem hzy) hzp)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\n⊢ ∃ Z,\n    Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n      ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\n[PROOFSTEP]\nobtain ⟨Z₀, hZ₀⟩ := PrimeSpectrum.exists_primeSpectrum_prod_le_and_ne_bot_of_domain hNF hI0\n[GOAL]\ncase intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\n⊢ ∃ Z,\n    Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n      ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\n[PROOFSTEP]\nobtain ⟨Z, ⟨hZI, hprodZ⟩, h_eraseZ⟩ :=\n  Multiset.wellFounded_lt.has_min\n    (fun Z => (Z.map PrimeSpectrum.asIdeal).prod ≤ I ∧ (Z.map PrimeSpectrum.asIdeal).prod ≠ ⊥) ⟨Z₀, hZ₀⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\n⊢ ∃ Z,\n    Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n      ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\n[PROOFSTEP]\nhave hZM : Multiset.prod (Z.map PrimeSpectrum.asIdeal) ≤ M := le_trans hZI hIM\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ M\n⊢ ∃ Z,\n    Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n      ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\n[PROOFSTEP]\nhave hZ0 : Z ≠ 0 := by rintro rfl; simp [hM.ne_top] at hZM \n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ M\n⊢ Z ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < 0\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal 0) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal 0) ≠ ⊥\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal 0) ≤ M\n⊢ False\n[PROOFSTEP]\nsimp [hM.ne_top] at hZM \n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ M\nhZ0 : Z ≠ 0\n⊢ ∃ Z,\n    Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n      ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\n[PROOFSTEP]\nobtain ⟨_, hPZ', hPM⟩ := (hM.isPrime.multiset_prod_le (mt Multiset.map_eq_zero.mp hZ0)).mp hZM\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ M\nhZ0 : Z ≠ 0\nw✝ : Ideal A\nhPZ' : w✝ ∈ Multiset.map PrimeSpectrum.asIdeal Z\nhPM : w✝ ≤ M\n⊢ ∃ Z,\n    Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n      ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\n[PROOFSTEP]\nobtain ⟨P, hPZ, rfl⟩ := Multiset.mem_map.mp hPZ'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ M\nhZ0 : Z ≠ 0\nP : PrimeSpectrum A\nhPZ : P ∈ Z\nhPZ' : P.asIdeal ∈ Multiset.map PrimeSpectrum.asIdeal Z\nhPM : P.asIdeal ≤ M\n⊢ ∃ Z,\n    Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n      ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\n[PROOFSTEP]\nclassical\nhave := Multiset.map_erase PrimeSpectrum.asIdeal PrimeSpectrum.ext P Z\nobtain ⟨hP0, hZP0⟩ : P.asIdeal ≠ ⊥ ∧ ((Z.erase P).map PrimeSpectrum.asIdeal).prod ≠ ⊥ := by\n  rwa [Ne.def, ← Multiset.cons_erase hPZ', Multiset.prod_cons, Ideal.mul_eq_bot, not_or, ← this] at hprodZ \nhave hPM' := (P.IsPrime.isMaximal hP0).eq_of_le hM.ne_top hPM\nsubst hPM'\nrefine ⟨Z.erase P, ?_, ?_⟩\n· convert hZI\n  rw [this, Multiset.cons_erase hPZ']\n· refine fun h => h_eraseZ (Z.erase P) ⟨h, ?_⟩ (Multiset.erase_lt.mpr hPZ)\n  exact hZP0\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ M\nhZ0 : Z ≠ 0\nP : PrimeSpectrum A\nhPZ : P ∈ Z\nhPZ' : P.asIdeal ∈ Multiset.map PrimeSpectrum.asIdeal Z\nhPM : P.asIdeal ≤ M\n⊢ ∃ Z,\n    Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n      ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\n[PROOFSTEP]\nhave := Multiset.map_erase PrimeSpectrum.asIdeal PrimeSpectrum.ext P Z\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ M\nhZ0 : Z ≠ 0\nP : PrimeSpectrum A\nhPZ : P ∈ Z\nhPZ' : P.asIdeal ∈ Multiset.map PrimeSpectrum.asIdeal Z\nhPM : P.asIdeal ≤ M\nthis :\n  Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P) =\n    Multiset.erase (Multiset.map PrimeSpectrum.asIdeal Z) P.asIdeal\n⊢ ∃ Z,\n    Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n      ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\n[PROOFSTEP]\nobtain ⟨hP0, hZP0⟩ : P.asIdeal ≠ ⊥ ∧ ((Z.erase P).map PrimeSpectrum.asIdeal).prod ≠ ⊥ := by\n  rwa [Ne.def, ← Multiset.cons_erase hPZ', Multiset.prod_cons, Ideal.mul_eq_bot, not_or, ← this] at hprodZ \n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ M\nhZ0 : Z ≠ 0\nP : PrimeSpectrum A\nhPZ : P ∈ Z\nhPZ' : P.asIdeal ∈ Multiset.map PrimeSpectrum.asIdeal Z\nhPM : P.asIdeal ≤ M\nthis :\n  Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P) =\n    Multiset.erase (Multiset.map PrimeSpectrum.asIdeal Z) P.asIdeal\n⊢ P.asIdeal ≠ ⊥ ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P)) ≠ ⊥\n[PROOFSTEP]\nrwa [Ne.def, ← Multiset.cons_erase hPZ', Multiset.prod_cons, Ideal.mul_eq_bot, not_or, ← this] at hprodZ \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ M\nhZ0 : Z ≠ 0\nP : PrimeSpectrum A\nhPZ : P ∈ Z\nhPZ' : P.asIdeal ∈ Multiset.map PrimeSpectrum.asIdeal Z\nhPM : P.asIdeal ≤ M\nthis :\n  Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P) =\n    Multiset.erase (Multiset.map PrimeSpectrum.asIdeal Z) P.asIdeal\nhP0 : P.asIdeal ≠ ⊥\nhZP0 : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P)) ≠ ⊥\n⊢ ∃ Z,\n    Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n      ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\n[PROOFSTEP]\nhave hPM' := (P.IsPrime.isMaximal hP0).eq_of_le hM.ne_top hPM\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI M : Ideal A\nhI0 : I ≠ ⊥\nhIM : I ≤ M\nhM : Ideal.IsMaximal M\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ M\nhZ0 : Z ≠ 0\nP : PrimeSpectrum A\nhPZ : P ∈ Z\nhPZ' : P.asIdeal ∈ Multiset.map PrimeSpectrum.asIdeal Z\nhPM : P.asIdeal ≤ M\nthis :\n  Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P) =\n    Multiset.erase (Multiset.map PrimeSpectrum.asIdeal Z) P.asIdeal\nhP0 : P.asIdeal ≠ ⊥\nhZP0 : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P)) ≠ ⊥\nhPM' : P.asIdeal = M\n⊢ ∃ Z,\n    Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n      ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\n[PROOFSTEP]\nsubst hPM'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZ0 : Z ≠ 0\nP : PrimeSpectrum A\nhPZ : P ∈ Z\nhPZ' : P.asIdeal ∈ Multiset.map PrimeSpectrum.asIdeal Z\nthis :\n  Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P) =\n    Multiset.erase (Multiset.map PrimeSpectrum.asIdeal Z) P.asIdeal\nhP0 : P.asIdeal ≠ ⊥\nhZP0 : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P)) ≠ ⊥\nhIM : I ≤ P.asIdeal\nhM : Ideal.IsMaximal P.asIdeal\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ P.asIdeal\nhPM : P.asIdeal ≤ P.asIdeal\n⊢ ∃ Z,\n    Multiset.prod (P.asIdeal ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n      ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\n[PROOFSTEP]\nrefine ⟨Z.erase P, ?_, ?_⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZ0 : Z ≠ 0\nP : PrimeSpectrum A\nhPZ : P ∈ Z\nhPZ' : P.asIdeal ∈ Multiset.map PrimeSpectrum.asIdeal Z\nthis :\n  Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P) =\n    Multiset.erase (Multiset.map PrimeSpectrum.asIdeal Z) P.asIdeal\nhP0 : P.asIdeal ≠ ⊥\nhZP0 : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P)) ≠ ⊥\nhIM : I ≤ P.asIdeal\nhM : Ideal.IsMaximal P.asIdeal\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ P.asIdeal\nhPM : P.asIdeal ≤ P.asIdeal\n⊢ Multiset.prod (P.asIdeal ::ₘ Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P)) ≤ I\n[PROOFSTEP]\nconvert hZI\n[GOAL]\ncase h.e'_3.h.e'_3\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZ0 : Z ≠ 0\nP : PrimeSpectrum A\nhPZ : P ∈ Z\nhPZ' : P.asIdeal ∈ Multiset.map PrimeSpectrum.asIdeal Z\nthis :\n  Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P) =\n    Multiset.erase (Multiset.map PrimeSpectrum.asIdeal Z) P.asIdeal\nhP0 : P.asIdeal ≠ ⊥\nhZP0 : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P)) ≠ ⊥\nhIM : I ≤ P.asIdeal\nhM : Ideal.IsMaximal P.asIdeal\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ P.asIdeal\nhPM : P.asIdeal ≤ P.asIdeal\n⊢ P.asIdeal ::ₘ Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P) = Multiset.map PrimeSpectrum.asIdeal Z\n[PROOFSTEP]\nrw [this, Multiset.cons_erase hPZ']\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZ0 : Z ≠ 0\nP : PrimeSpectrum A\nhPZ : P ∈ Z\nhPZ' : P.asIdeal ∈ Multiset.map PrimeSpectrum.asIdeal Z\nthis :\n  Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P) =\n    Multiset.erase (Multiset.map PrimeSpectrum.asIdeal Z) P.asIdeal\nhP0 : P.asIdeal ≠ ⊥\nhZP0 : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P)) ≠ ⊥\nhIM : I ≤ P.asIdeal\nhM : Ideal.IsMaximal P.asIdeal\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ P.asIdeal\nhPM : P.asIdeal ≤ P.asIdeal\n⊢ ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P)) ≤ I\n[PROOFSTEP]\nrefine fun h => h_eraseZ (Z.erase P) ⟨h, ?_⟩ (Multiset.erase_lt.mpr hPZ)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nZ₀ : Multiset (PrimeSpectrum A)\nhZ₀ :\n  Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≤ I ∧ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z₀) ≠ ⊥\nZ : Multiset (PrimeSpectrum A)\nh_eraseZ :\n  ∀ (x : Multiset (PrimeSpectrum A)),\n    (x ∈ fun Z =>\n        Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I ∧\n          Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥) →\n      ¬x < Z\nhZI : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ I\nhprodZ : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≠ ⊥\nhZ0 : Z ≠ 0\nP : PrimeSpectrum A\nhPZ : P ∈ Z\nhPZ' : P.asIdeal ∈ Multiset.map PrimeSpectrum.asIdeal Z\nthis :\n  Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P) =\n    Multiset.erase (Multiset.map PrimeSpectrum.asIdeal Z) P.asIdeal\nhP0 : P.asIdeal ≠ ⊥\nhZP0 : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P)) ≠ ⊥\nhIM : I ≤ P.asIdeal\nhM : Ideal.IsMaximal P.asIdeal\nhZM : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ P.asIdeal\nhPM : P.asIdeal ≤ P.asIdeal\nh : Multiset.prod (Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P)) ≤ I\n⊢ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal (Multiset.erase Z P)) ≠ ⊥\n[PROOFSTEP]\nexact hZP0\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\n⊢ ∃ x, x ∈ (↑I)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nsuffices ∀ {M : Ideal A} (_hM : M.IsMaximal), ∃ x : K, x ∈ (M⁻¹ : FractionalIdeal A⁰ K) ∧ x ∉ (1 : FractionalIdeal A⁰ K)\n  by\n  obtain ⟨M, hM, hIM⟩ : ∃ M : Ideal A, IsMaximal M ∧ I ≤ M := Ideal.exists_le_maximal I hI1\n  skip\n  have hM0 := (M.bot_lt_of_maximal hNF).ne'\n  obtain ⟨x, hxM, hx1⟩ := this hM\n  refine ⟨x, inv_anti_mono ?_ ?_ ((coeIdeal_le_coeIdeal _).mpr hIM) hxM, hx1⟩ <;> rw [coeIdeal_ne_zero] <;>\n    assumption\n      -- Let `a` be a nonzero element of `M` and `J` the ideal generated by `a`.\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nthis : ∀ {M : Ideal A}, IsMaximal M → ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n⊢ ∃ x, x ∈ (↑I)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nobtain ⟨M, hM, hIM⟩ : ∃ M : Ideal A, IsMaximal M ∧ I ≤ M := Ideal.exists_le_maximal I hI1\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nthis : ∀ {M : Ideal A}, IsMaximal M → ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\nM : Ideal A\nhM : IsMaximal M\nhIM : I ≤ M\n⊢ ∃ x, x ∈ (↑I)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nskip\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nthis : ∀ {M : Ideal A}, IsMaximal M → ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\nM : Ideal A\nhM : IsMaximal M\nhIM : I ≤ M\n⊢ ∃ x, x ∈ (↑I)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nhave hM0 := (M.bot_lt_of_maximal hNF).ne'\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nthis : ∀ {M : Ideal A}, IsMaximal M → ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\nM : Ideal A\nhM : IsMaximal M\nhIM : I ≤ M\nhM0 : M ≠ ⊥\n⊢ ∃ x, x ∈ (↑I)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nobtain ⟨x, hxM, hx1⟩ := this hM\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nthis : ∀ {M : Ideal A}, IsMaximal M → ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\nM : Ideal A\nhM : IsMaximal M\nhIM : I ≤ M\nhM0 : M ≠ ⊥\nx : K\nhxM : x ∈ (↑M)⁻¹\nhx1 : ¬x ∈ 1\n⊢ ∃ x, x ∈ (↑I)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nrefine ⟨x, inv_anti_mono ?_ ?_ ((coeIdeal_le_coeIdeal _).mpr hIM) hxM, hx1⟩\n[GOAL]\ncase intro.intro.intro.intro.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nthis : ∀ {M : Ideal A}, IsMaximal M → ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\nM : Ideal A\nhM : IsMaximal M\nhIM : I ≤ M\nhM0 : M ≠ ⊥\nx : K\nhxM : x ∈ (↑M)⁻¹\nhx1 : ¬x ∈ 1\n⊢ ↑I ≠ 0\n[PROOFSTEP]\nrw [coeIdeal_ne_zero]\n[GOAL]\ncase intro.intro.intro.intro.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nthis : ∀ {M : Ideal A}, IsMaximal M → ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\nM : Ideal A\nhM : IsMaximal M\nhIM : I ≤ M\nhM0 : M ≠ ⊥\nx : K\nhxM : x ∈ (↑M)⁻¹\nhx1 : ¬x ∈ 1\n⊢ ↑M ≠ 0\n[PROOFSTEP]\nrw [coeIdeal_ne_zero]\n[GOAL]\ncase intro.intro.intro.intro.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nthis : ∀ {M : Ideal A}, IsMaximal M → ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\nM : Ideal A\nhM : IsMaximal M\nhIM : I ≤ M\nhM0 : M ≠ ⊥\nx : K\nhxM : x ∈ (↑M)⁻¹\nhx1 : ¬x ∈ 1\n⊢ I ≠ ⊥\n[PROOFSTEP]\nassumption\n  -- Let `a` be a nonzero element of `M` and `J` the ideal generated by `a`.\n[GOAL]\ncase intro.intro.intro.intro.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nthis : ∀ {M : Ideal A}, IsMaximal M → ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\nM : Ideal A\nhM : IsMaximal M\nhIM : I ≤ M\nhM0 : M ≠ ⊥\nx : K\nhxM : x ∈ (↑M)⁻¹\nhx1 : ¬x ∈ 1\n⊢ M ≠ ⊥\n[PROOFSTEP]\nassumption\n  -- Let `a` be a nonzero element of `M` and `J` the ideal generated by `a`.\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\n⊢ ∀ {M : Ideal A}, IsMaximal M → ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nintro M hM\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\n⊢ ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nskip\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\n⊢ ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nobtain ⟨⟨a, haM⟩, ha0⟩ := Submodule.nonzero_mem_of_bot_lt (M.bot_lt_of_maximal hNF)\n[GOAL]\ncase intro.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : { val := a, property := haM } ≠ 0\n⊢ ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nreplace ha0 : a ≠ 0 := Subtype.coe_injective.ne ha0\n[GOAL]\ncase intro.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\n⊢ ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nlet J : Ideal A := Ideal.span { a }\n[GOAL]\ncase intro.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\n⊢ ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nhave hJ0 : J ≠ ⊥ := mt Ideal.span_singleton_eq_bot.mp ha0\n[GOAL]\ncase intro.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\n⊢ ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nhave hJM : J ≤ M := Ideal.span_le.mpr (Set.singleton_subset_iff.mpr haM)\n[GOAL]\ncase intro.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\n⊢ ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nhave hM0 : ⊥ < M := M.bot_lt_of_maximal hNF\n[GOAL]\ncase intro.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\n⊢ ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nobtain ⟨Z, hle, hnle⟩ := exists_multiset_prod_cons_le_and_prod_not_le hNF hJ0 hJM\n[GOAL]\ncase intro.mk.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\n⊢ ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nobtain ⟨b, hbZ, hbJ⟩ := SetLike.not_le_iff_exists.mp hnle\n[GOAL]\ncase intro.mk.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\n⊢ ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nhave hnz_fa : algebraMap A K a ≠ 0 := mt ((injective_iff_map_eq_zero _).mp (IsFractionRing.injective A K) a) ha0\n[GOAL]\ncase intro.mk.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n⊢ ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nhave _hb0 : algebraMap A K b ≠ 0 :=\n  mt ((injective_iff_map_eq_zero _).mp (IsFractionRing.injective A K) b) fun h => hbJ <| h.symm ▸ J.zero_mem\n[GOAL]\ncase intro.mk.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\n⊢ ∃ x, x ∈ (↑M)⁻¹ ∧ ¬x ∈ 1\n[PROOFSTEP]\nrefine' ⟨algebraMap A K b * (algebraMap A K a)⁻¹, (mem_inv_iff _).mpr _, _⟩\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\n⊢ ↑M ≠ 0\n[PROOFSTEP]\nexact coeIdeal_ne_zero.mpr hM0.ne'\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\n⊢ ∀ (y : K), y ∈ ↑M → ↑(algebraMap A K) b * (↑(algebraMap A K) a)⁻¹ * y ∈ 1\n[PROOFSTEP]\nrintro y₀ hy₀\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\ny₀ : K\nhy₀ : y₀ ∈ ↑M\n⊢ ↑(algebraMap A K) b * (↑(algebraMap A K) a)⁻¹ * y₀ ∈ 1\n[PROOFSTEP]\nobtain ⟨y, h_Iy, rfl⟩ := (mem_coeIdeal _).mp hy₀\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_2.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\ny : A\nh_Iy : y ∈ M\nhy₀ : ↑(algebraMap A K) y ∈ ↑M\n⊢ ↑(algebraMap A K) b * (↑(algebraMap A K) a)⁻¹ * ↑(algebraMap A K) y ∈ 1\n[PROOFSTEP]\nrw [mul_comm, ← mul_assoc, ← RingHom.map_mul]\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_2.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\ny : A\nh_Iy : y ∈ M\nhy₀ : ↑(algebraMap A K) y ∈ ↑M\n⊢ ↑(algebraMap A K) (y * b) * (↑(algebraMap A K) a)⁻¹ ∈ 1\n[PROOFSTEP]\nhave h_yb : y * b ∈ J := by\n  apply hle\n  rw [Multiset.prod_cons]\n  exact Submodule.smul_mem_smul h_Iy hbZ\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\ny : A\nh_Iy : y ∈ M\nhy₀ : ↑(algebraMap A K) y ∈ ↑M\n⊢ y * b ∈ J\n[PROOFSTEP]\napply hle\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\ny : A\nh_Iy : y ∈ M\nhy₀ : ↑(algebraMap A K) y ∈ ↑M\n⊢ y * b ∈ Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z)\n[PROOFSTEP]\nrw [Multiset.prod_cons]\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\ny : A\nh_Iy : y ∈ M\nhy₀ : ↑(algebraMap A K) y ∈ ↑M\n⊢ y * b ∈ M * Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\n[PROOFSTEP]\nexact Submodule.smul_mem_smul h_Iy hbZ\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_2.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\ny : A\nh_Iy : y ∈ M\nhy₀ : ↑(algebraMap A K) y ∈ ↑M\nh_yb : y * b ∈ J\n⊢ ↑(algebraMap A K) (y * b) * (↑(algebraMap A K) a)⁻¹ ∈ 1\n[PROOFSTEP]\nrw [Ideal.mem_span_singleton'] at h_yb \n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_2.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\ny : A\nh_Iy : y ∈ M\nhy₀ : ↑(algebraMap A K) y ∈ ↑M\nh_yb : ∃ a_1, a_1 * a = y * b\n⊢ ↑(algebraMap A K) (y * b) * (↑(algebraMap A K) a)⁻¹ ∈ 1\n[PROOFSTEP]\nrcases h_yb with ⟨c, hc⟩\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_2.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\ny : A\nh_Iy : y ∈ M\nhy₀ : ↑(algebraMap A K) y ∈ ↑M\nc : A\nhc : c * a = y * b\n⊢ ↑(algebraMap A K) (y * b) * (↑(algebraMap A K) a)⁻¹ ∈ 1\n[PROOFSTEP]\nrw [← hc, RingHom.map_mul, mul_assoc, mul_inv_cancel hnz_fa, mul_one]\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_2.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\ny : A\nh_Iy : y ∈ M\nhy₀ : ↑(algebraMap A K) y ∈ ↑M\nc : A\nhc : c * a = y * b\n⊢ ↑(algebraMap A K) c ∈ 1\n[PROOFSTEP]\napply coe_mem_one\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_3\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\n⊢ ¬↑(algebraMap A K) b * (↑(algebraMap A K) a)⁻¹ ∈ 1\n[PROOFSTEP]\nrefine' mt (mem_one_iff _).mp _\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_3\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\n⊢ ¬∃ x', ↑(algebraMap A K) x' = ↑(algebraMap A K) b * (↑(algebraMap A K) a)⁻¹\n[PROOFSTEP]\nrintro ⟨x', h₂_abs⟩\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_3.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\nx' : A\nh₂_abs : ↑(algebraMap A K) x' = ↑(algebraMap A K) b * (↑(algebraMap A K) a)⁻¹\n⊢ False\n[PROOFSTEP]\nrw [← div_eq_mul_inv, eq_div_iff_mul_eq hnz_fa, ← RingHom.map_mul] at h₂_abs \n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_3.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\nx' : A\nh₂_abs : ↑(algebraMap A K) (x' * a) = ↑(algebraMap A K) b\n⊢ False\n[PROOFSTEP]\nhave := Ideal.mem_span_singleton'.mpr ⟨x', IsFractionRing.injective A K h₂_abs⟩\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.refine'_3.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nhNF : ¬IsField A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\nM : Ideal A\nhM : IsMaximal M\na : A\nhaM : a ∈ M\nha0 : a ≠ 0\nJ : Ideal A := span {a}\nhJ0 : J ≠ ⊥\nhJM : J ≤ M\nhM0 : ⊥ < M\nZ : Multiset (PrimeSpectrum A)\nhle : Multiset.prod (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nhnle : ¬Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z) ≤ J\nb : A\nhbZ : b ∈ Multiset.prod (Multiset.map PrimeSpectrum.asIdeal Z)\nhbJ : ¬b ∈ J\nhnz_fa : ↑(algebraMap A K) a ≠ 0\n_hb0 : ↑(algebraMap A K) b ≠ 0\nx' : A\nh₂_abs : ↑(algebraMap A K) (x' * a) = ↑(algebraMap A K) b\nthis : b ∈ span {a}\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI : Ideal A\nhI : I ≠ ⊥\n⊢ 1 ∈ (↑I)⁻¹\n[PROOFSTEP]\nrw [mem_inv_iff (coeIdeal_ne_zero.mpr hI)]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI : Ideal A\nhI : I ≠ ⊥\n⊢ ∀ (y : K), y ∈ ↑I → 1 * y ∈ 1\n[PROOFSTEP]\nintro y hy\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI : Ideal A\nhI : I ≠ ⊥\ny : K\nhy : y ∈ ↑I\n⊢ 1 * y ∈ 1\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI : Ideal A\nhI : I ≠ ⊥\ny : K\nhy : y ∈ ↑I\n⊢ y ∈ 1\n[PROOFSTEP]\nexact coeIdeal_le_one hy\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\nby_cases hI1 : I = ⊤\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : I = ⊤\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\nrw [hI1, coeIdeal_top, one_mul, inv_one]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\nby_cases hNF : IsField A\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : IsField A\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\nletI := hNF.toField\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : IsField A\nthis : Field A := IsField.toField hNF\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\nrcases hI1 (I.eq_bot_or_top.resolve_left hI0) with\n  ⟨⟩\n    -- We'll show a contradiction with `exists_not_mem_one_of_ne_bot`:\n      -- `J⁻¹ = (I * I⁻¹)⁻¹` cannot have an element `x ∉ 1`, so it must equal `1`.\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : ¬IsField A\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\nobtain ⟨J, hJ⟩ : ∃ J : Ideal A, (J : FractionalIdeal A⁰ K) = I * (I : FractionalIdeal A⁰ K)⁻¹ :=\n  le_one_iff_exists_coeIdeal.mp mul_one_div_le_one\n[GOAL]\ncase neg.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : ¬IsField A\nJ : Ideal A\nhJ : ↑J = ↑I * (↑I)⁻¹\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\nby_cases hJ0 : J = ⊥\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : ¬IsField A\nJ : Ideal A\nhJ : ↑J = ↑I * (↑I)⁻¹\nhJ0 : J = ⊥\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\nsubst hJ0\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : ¬IsField A\nhJ : ↑⊥ = ↑I * (↑I)⁻¹\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\nrefine' absurd _ hI0\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : ¬IsField A\nhJ : ↑⊥ = ↑I * (↑I)⁻¹\n⊢ I = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff, ← coeIdeal_le_coeIdeal K, hJ]\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : ¬IsField A\nhJ : ↑⊥ = ↑I * (↑I)⁻¹\n⊢ ↑I ≤ ↑I * (↑I)⁻¹\n[PROOFSTEP]\nexact coe_ideal_le_self_mul_inv K I\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : ¬IsField A\nJ : Ideal A\nhJ : ↑J = ↑I * (↑I)⁻¹\nhJ0 : ¬J = ⊥\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\nby_cases hJ1 : J = ⊤\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : ¬IsField A\nJ : Ideal A\nhJ : ↑J = ↑I * (↑I)⁻¹\nhJ0 : ¬J = ⊥\nhJ1 : J = ⊤\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\nrw [← hJ, hJ1, coeIdeal_top]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : ¬IsField A\nJ : Ideal A\nhJ : ↑J = ↑I * (↑I)⁻¹\nhJ0 : ¬J = ⊥\nhJ1 : ¬J = ⊤\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\nobtain ⟨x, hx, hx1⟩ : ∃ x : K, x ∈ (J : FractionalIdeal A⁰ K)⁻¹ ∧ x ∉ (1 : FractionalIdeal A⁰ K) :=\n  exists_not_mem_one_of_ne_bot hNF hJ0 hJ1\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : ¬IsField A\nJ : Ideal A\nhJ : ↑J = ↑I * (↑I)⁻¹\nhJ0 : ¬J = ⊥\nhJ1 : ¬J = ⊤\nx : K\nhx : x ∈ (↑J)⁻¹\nhx1 : ¬x ∈ 1\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\ncontrapose! hx1 with h_abs\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : ¬IsField A\nJ : Ideal A\nhJ : ↑J = ↑I * (↑I)⁻¹\nhJ0 : ¬J = ⊥\nhJ1 : ¬J = ⊤\nx : K\nhx : x ∈ (↑J)⁻¹\nh_abs : ↑I * (↑I)⁻¹ ≠ 1\n⊢ x ∈ 1\n[PROOFSTEP]\nrw [hJ] at hx \n[GOAL]\ncase neg.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhI : (↑I * (↑I)⁻¹)⁻¹ ≤ 1\nhI1 : ¬I = ⊤\nhNF : ¬IsField A\nJ : Ideal A\nhJ : ↑J = ↑I * (↑I)⁻¹\nhJ0 : ¬J = ⊥\nhJ1 : ¬J = ⊤\nx : K\nhx : x ∈ (↑I * (↑I)⁻¹)⁻¹\nh_abs : ↑I * (↑I)⁻¹ ≠ 1\n⊢ x ∈ 1\n[PROOFSTEP]\nexact hI hx\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\n⊢ ↑I * (↑I)⁻¹ = 1\n[PROOFSTEP]\napply mul_inv_cancel_of_le_one hI0\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\n⊢ (↑I * (↑I)⁻¹)⁻¹ ≤ 1\n[PROOFSTEP]\nby_cases hJ0 : I * (I : FractionalIdeal A⁰ K)⁻¹ = 0\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ↑I * (↑I)⁻¹ = 0\n⊢ (↑I * (↑I)⁻¹)⁻¹ ≤ 1\n[PROOFSTEP]\nrw [hJ0, inv_zero']\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ↑I * (↑I)⁻¹ = 0\n⊢ 0 ≤ 1\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\n⊢ (↑I * (↑I)⁻¹)⁻¹ ≤ 1\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\n⊢ x ∈ (fun a => ↑a) 1\n[PROOFSTEP]\nsuffices x ∈ integralClosure A K by\n  rwa [IsIntegrallyClosed.integralClosure_eq_bot, Algebra.mem_bot, Set.mem_range, ← mem_one_iff] at this \n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nthis : x ∈ integralClosure A K\n⊢ x ∈ (fun a => ↑a) 1\n[PROOFSTEP]\nrwa [IsIntegrallyClosed.integralClosure_eq_bot, Algebra.mem_bot, Set.mem_range, ← mem_one_iff] at this \n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\n⊢ x ∈ integralClosure A K\n[PROOFSTEP]\nrw [mem_integralClosure_iff_mem_FG]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\n⊢ ∃ M, Submodule.FG (↑Subalgebra.toSubmodule M) ∧ x ∈ M\n[PROOFSTEP]\nhave x_mul_mem : ∀ b ∈ (I⁻¹ : FractionalIdeal A⁰ K), x * b ∈ (I⁻¹ : FractionalIdeal A⁰ K) :=\n  by\n  intro b hb\n  rw [mem_inv_iff]\n  dsimp only at hx \n  rw [val_eq_coe, mem_coe, mem_inv_iff] at hx \n  swap; · exact hJ0\n  swap; · exact coeIdeal_ne_zero.mpr hI0\n  simp only [mul_assoc, mul_comm b] at hx ⊢\n  intro y hy\n  exact\n    hx _\n      (mul_mem_mul hy hb)\n        -- It turns out the subalgebra consisting of all `p(x)` for `p : A[X]` works.\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\n⊢ ∀ (b : K), b ∈ (↑I)⁻¹ → x * b ∈ (↑I)⁻¹\n[PROOFSTEP]\nintro b hb\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ x * b ∈ (↑I)⁻¹\n[PROOFSTEP]\nrw [mem_inv_iff]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ∀ (y : K), y ∈ ↑I → x * b * y ∈ 1\ncase hI\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ↑I ≠ 0\n[PROOFSTEP]\ndsimp only at hx \n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ ↑(↑I * (↑I)⁻¹)⁻¹\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ∀ (y : K), y ∈ ↑I → x * b * y ∈ 1\ncase hI\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ↑I ≠ 0\n[PROOFSTEP]\nrw [val_eq_coe, mem_coe, mem_inv_iff] at hx \n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : ∀ (y : K), y ∈ ↑I * (↑I)⁻¹ → x * y ∈ 1\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ∀ (y : K), y ∈ ↑I → x * b * y ∈ 1\ncase hI\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (↑I * (↑I)⁻¹)⁻¹\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ↑I * (↑I)⁻¹ ≠ 0\ncase hI\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ↑I ≠ 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase hI\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (↑I * (↑I)⁻¹)⁻¹\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ↑I * (↑I)⁻¹ ≠ 0\n[PROOFSTEP]\nexact hJ0\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : ∀ (y : K), y ∈ ↑I * (↑I)⁻¹ → x * y ∈ 1\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ∀ (y : K), y ∈ ↑I → x * b * y ∈ 1\ncase hI\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ↑I ≠ 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase hI\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ↑I ≠ 0\n[PROOFSTEP]\nexact coeIdeal_ne_zero.mpr hI0\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : ∀ (y : K), y ∈ ↑I * (↑I)⁻¹ → x * y ∈ 1\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ∀ (y : K), y ∈ ↑I → x * b * y ∈ 1\n[PROOFSTEP]\nsimp only [mul_assoc, mul_comm b] at hx ⊢\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : ∀ (y : K), y ∈ ↑I * (↑I)⁻¹ → x * y ∈ 1\nb : K\nhb : b ∈ (↑I)⁻¹\n⊢ ∀ (y : K), y ∈ ↑I → x * (y * b) ∈ 1\n[PROOFSTEP]\nintro y hy\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : ∀ (y : K), y ∈ ↑I * (↑I)⁻¹ → x * y ∈ 1\nb : K\nhb : b ∈ (↑I)⁻¹\ny : K\nhy : y ∈ ↑I\n⊢ x * (y * b) ∈ 1\n[PROOFSTEP]\nexact\n  hx _\n    (mul_mem_mul hy hb)\n      -- It turns out the subalgebra consisting of all `p(x)` for `p : A[X]` works.\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nx_mul_mem : ∀ (b : K), b ∈ (↑I)⁻¹ → x * b ∈ (↑I)⁻¹\n⊢ ∃ M, Submodule.FG (↑Subalgebra.toSubmodule M) ∧ x ∈ M\n[PROOFSTEP]\nrefine\n  ⟨AlgHom.range (Polynomial.aeval x : A[X] →ₐ[A] K),\n    isNoetherian_submodule.mp (isNoetherian (I : FractionalIdeal A⁰ K)⁻¹) _ fun y hy => ?_,\n    ⟨Polynomial.X, Polynomial.aeval_X x⟩⟩\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nx_mul_mem : ∀ (b : K), b ∈ (↑I)⁻¹ → x * b ∈ (↑I)⁻¹\ny : K\nhy : y ∈ ↑Subalgebra.toSubmodule (AlgHom.range (Polynomial.aeval x))\n⊢ y ∈ ↑(↑I)⁻¹\n[PROOFSTEP]\nobtain ⟨p, rfl⟩ := (AlgHom.mem_range _).mp hy\n[GOAL]\ncase neg.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nx_mul_mem : ∀ (b : K), b ∈ (↑I)⁻¹ → x * b ∈ (↑I)⁻¹\np : A[X]\nhy : ↑(Polynomial.aeval x) p ∈ ↑Subalgebra.toSubmodule (AlgHom.range (Polynomial.aeval x))\n⊢ ↑(Polynomial.aeval x) p ∈ ↑(↑I)⁻¹\n[PROOFSTEP]\nrw [Polynomial.aeval_eq_sum_range]\n[GOAL]\ncase neg.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nx_mul_mem : ∀ (b : K), b ∈ (↑I)⁻¹ → x * b ∈ (↑I)⁻¹\np : A[X]\nhy : ↑(Polynomial.aeval x) p ∈ ↑Subalgebra.toSubmodule (AlgHom.range (Polynomial.aeval x))\n⊢ (Finset.sum (Finset.range (Polynomial.natDegree p + 1)) fun i => Polynomial.coeff p i • x ^ i) ∈ ↑(↑I)⁻¹\n[PROOFSTEP]\nrefine Submodule.sum_mem _ fun i hi => Submodule.smul_mem _ _ ?_\n[GOAL]\ncase neg.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nx_mul_mem : ∀ (b : K), b ∈ (↑I)⁻¹ → x * b ∈ (↑I)⁻¹\np : A[X]\nhy : ↑(Polynomial.aeval x) p ∈ ↑Subalgebra.toSubmodule (AlgHom.range (Polynomial.aeval x))\ni : ℕ\nhi : i ∈ Finset.range (Polynomial.natDegree p + 1)\n⊢ x ^ i ∈ ↑(↑I)⁻¹\n[PROOFSTEP]\nclear hi\n[GOAL]\ncase neg.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nx_mul_mem : ∀ (b : K), b ∈ (↑I)⁻¹ → x * b ∈ (↑I)⁻¹\np : A[X]\nhy : ↑(Polynomial.aeval x) p ∈ ↑Subalgebra.toSubmodule (AlgHom.range (Polynomial.aeval x))\ni : ℕ\n⊢ x ^ i ∈ ↑(↑I)⁻¹\n[PROOFSTEP]\ninduction' i with i ih\n[GOAL]\ncase neg.intro.zero\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nx_mul_mem : ∀ (b : K), b ∈ (↑I)⁻¹ → x * b ∈ (↑I)⁻¹\np : A[X]\nhy : ↑(Polynomial.aeval x) p ∈ ↑Subalgebra.toSubmodule (AlgHom.range (Polynomial.aeval x))\n⊢ x ^ Nat.zero ∈ ↑(↑I)⁻¹\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\ncase neg.intro.zero\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nx_mul_mem : ∀ (b : K), b ∈ (↑I)⁻¹ → x * b ∈ (↑I)⁻¹\np : A[X]\nhy : ↑(Polynomial.aeval x) p ∈ ↑Subalgebra.toSubmodule (AlgHom.range (Polynomial.aeval x))\n⊢ 1 ∈ ↑(↑I)⁻¹\n[PROOFSTEP]\nexact one_mem_inv_coe_ideal hI0\n[GOAL]\ncase neg.intro.succ\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nx_mul_mem : ∀ (b : K), b ∈ (↑I)⁻¹ → x * b ∈ (↑I)⁻¹\np : A[X]\nhy : ↑(Polynomial.aeval x) p ∈ ↑Subalgebra.toSubmodule (AlgHom.range (Polynomial.aeval x))\ni : ℕ\nih : x ^ i ∈ ↑(↑I)⁻¹\n⊢ x ^ Nat.succ i ∈ ↑(↑I)⁻¹\n[PROOFSTEP]\nshow x ^ i.succ ∈ (I⁻¹ : FractionalIdeal A⁰ K)\n[GOAL]\ncase neg.intro.succ\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nx_mul_mem : ∀ (b : K), b ∈ (↑I)⁻¹ → x * b ∈ (↑I)⁻¹\np : A[X]\nhy : ↑(Polynomial.aeval x) p ∈ ↑Subalgebra.toSubmodule (AlgHom.range (Polynomial.aeval x))\ni : ℕ\nih : x ^ i ∈ ↑(↑I)⁻¹\n⊢ x ^ Nat.succ i ∈ (↑I)⁻¹\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\ncase neg.intro.succ\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : IsDedekindDomain A\nI : Ideal A\nhI0 : I ≠ ⊥\nhJ0 : ¬↑I * (↑I)⁻¹ = 0\nx : K\nhx : x ∈ (fun a => ↑a) (↑I * (↑I)⁻¹)⁻¹\nx_mul_mem : ∀ (b : K), b ∈ (↑I)⁻¹ → x * b ∈ (↑I)⁻¹\np : A[X]\nhy : ↑(Polynomial.aeval x) p ∈ ↑Subalgebra.toSubmodule (AlgHom.range (Polynomial.aeval x))\ni : ℕ\nih : x ^ i ∈ ↑(↑I)⁻¹\n⊢ x * x ^ i ∈ (↑I)⁻¹\n[PROOFSTEP]\nexact x_mul_mem _ ih\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI : FractionalIdeal A⁰ K\nhne : I ≠ 0\n⊢ I * I⁻¹ = 1\n[PROOFSTEP]\nobtain ⟨a, J, ha, hJ⟩ : ∃ (a : A) (aI : Ideal A), a ≠ 0 ∧ I = spanSingleton A⁰ (algebraMap A K a)⁻¹ * aI :=\n  exists_eq_spanSingleton_mul I\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI : FractionalIdeal A⁰ K\nhne : I ≠ 0\na : A\nJ : Ideal A\nha : a ≠ 0\nhJ : I = spanSingleton A⁰ (↑(algebraMap A K) a)⁻¹ * ↑J\n⊢ I * I⁻¹ = 1\n[PROOFSTEP]\nsuffices h₂ : I * (spanSingleton A⁰ (algebraMap _ _ a) * (J : FractionalIdeal A⁰ K)⁻¹) = 1\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI : FractionalIdeal A⁰ K\nhne : I ≠ 0\na : A\nJ : Ideal A\nha : a ≠ 0\nhJ : I = spanSingleton A⁰ (↑(algebraMap A K) a)⁻¹ * ↑J\nh₂ : I * (spanSingleton A⁰ (↑(algebraMap A K) a) * (↑J)⁻¹) = 1\n⊢ I * I⁻¹ = 1\n[PROOFSTEP]\nrw [mul_inv_cancel_iff]\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI : FractionalIdeal A⁰ K\nhne : I ≠ 0\na : A\nJ : Ideal A\nha : a ≠ 0\nhJ : I = spanSingleton A⁰ (↑(algebraMap A K) a)⁻¹ * ↑J\nh₂ : I * (spanSingleton A⁰ (↑(algebraMap A K) a) * (↑J)⁻¹) = 1\n⊢ ∃ J, I * J = 1\n[PROOFSTEP]\nexact ⟨spanSingleton A⁰ (algebraMap _ _ a) * (J : FractionalIdeal A⁰ K)⁻¹, h₂⟩\n[GOAL]\ncase h₂\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI : FractionalIdeal A⁰ K\nhne : I ≠ 0\na : A\nJ : Ideal A\nha : a ≠ 0\nhJ : I = spanSingleton A⁰ (↑(algebraMap A K) a)⁻¹ * ↑J\n⊢ I * (spanSingleton A⁰ (↑(algebraMap A K) a) * (↑J)⁻¹) = 1\n[PROOFSTEP]\nsubst hJ\n[GOAL]\ncase h₂\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\na : A\nJ : Ideal A\nha : a ≠ 0\nhne : spanSingleton A⁰ (↑(algebraMap A K) a)⁻¹ * ↑J ≠ 0\n⊢ spanSingleton A⁰ (↑(algebraMap A K) a)⁻¹ * ↑J * (spanSingleton A⁰ (↑(algebraMap A K) a) * (↑J)⁻¹) = 1\n[PROOFSTEP]\nrw [mul_assoc, mul_left_comm (J : FractionalIdeal A⁰ K), coe_ideal_mul_inv, mul_one, spanSingleton_mul_spanSingleton,\n  inv_mul_cancel, spanSingleton_one]\n[GOAL]\ncase h₂\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\na : A\nJ : Ideal A\nha : a ≠ 0\nhne : spanSingleton A⁰ (↑(algebraMap A K) a)⁻¹ * ↑J ≠ 0\n⊢ ↑(algebraMap A K) a ≠ 0\n[PROOFSTEP]\nexact mt ((injective_iff_map_eq_zero (algebraMap A K)).mp (IsFractionRing.injective A K) _) ha\n[GOAL]\ncase h₂.hI0\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\na : A\nJ : Ideal A\nha : a ≠ 0\nhne : spanSingleton A⁰ (↑(algebraMap A K) a)⁻¹ * ↑J ≠ 0\n⊢ J ≠ ⊥\n[PROOFSTEP]\nexact coeIdeal_ne_zero.mp (right_ne_zero_of_mul hne)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nJ : FractionalIdeal A⁰ K\nhJ : J ≠ 0\n⊢ ∀ {I I' : FractionalIdeal A⁰ K}, I * J ≤ I' * J ↔ I ≤ I'\n[PROOFSTEP]\nintro I I'\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nJ : FractionalIdeal A⁰ K\nhJ : J ≠ 0\nI I' : FractionalIdeal A⁰ K\n⊢ I * J ≤ I' * J ↔ I ≤ I'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nJ : FractionalIdeal A⁰ K\nhJ : J ≠ 0\nI I' : FractionalIdeal A⁰ K\n⊢ I * J ≤ I' * J → I ≤ I'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nJ : FractionalIdeal A⁰ K\nhJ : J ≠ 0\nI I' : FractionalIdeal A⁰ K\nh : I * J ≤ I' * J\n⊢ I ≤ I'\n[PROOFSTEP]\nconvert mul_right_mono J⁻¹ h\n[GOAL]\ncase h.e'_3\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nJ : FractionalIdeal A⁰ K\nhJ : J ≠ 0\nI I' : FractionalIdeal A⁰ K\nh : I * J ≤ I' * J\n⊢ I = (fun J_1 => J_1 * J⁻¹) (I * J)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h.e'_4\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nJ : FractionalIdeal A⁰ K\nhJ : J ≠ 0\nI I' : FractionalIdeal A⁰ K\nh : I * J ≤ I' * J\n⊢ I' = (fun J_1 => J_1 * J⁻¹) (I' * J)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h.e'_3\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nJ : FractionalIdeal A⁰ K\nhJ : J ≠ 0\nI I' : FractionalIdeal A⁰ K\nh : I * J ≤ I' * J\n⊢ I = I * J * J⁻¹\n[PROOFSTEP]\nrw [mul_assoc, FractionalIdeal.mul_inv_cancel hJ, mul_one]\n[GOAL]\ncase h.e'_4\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nJ : FractionalIdeal A⁰ K\nhJ : J ≠ 0\nI I' : FractionalIdeal A⁰ K\nh : I * J ≤ I' * J\n⊢ I' = I' * J * J⁻¹\n[PROOFSTEP]\nrw [mul_assoc, FractionalIdeal.mul_inv_cancel hJ, mul_one]\n[GOAL]\ncase mpr\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nJ : FractionalIdeal A⁰ K\nhJ : J ≠ 0\nI I' : FractionalIdeal A⁰ K\n⊢ I ≤ I' → I * J ≤ I' * J\n[PROOFSTEP]\nexact fun h => mul_right_mono J h\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nJ : FractionalIdeal A⁰ K\nhJ : J ≠ 0\nI I' : FractionalIdeal A⁰ K\n⊢ J * I ≤ J * I' ↔ I ≤ I'\n[PROOFSTEP]\nconvert mul_right_le_iff hJ using 1\n[GOAL]\ncase h.e'_1.a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nJ : FractionalIdeal A⁰ K\nhJ : J ≠ 0\nI I' : FractionalIdeal A⁰ K\n⊢ J * I ≤ J * I' ↔ I * J ≤ I' * J\n[PROOFSTEP]\nsimp only [mul_comm]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI J : FractionalIdeal A⁰ K\n⊢ I / J = I * J⁻¹\n[PROOFSTEP]\nby_cases hJ : J = 0\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI J : FractionalIdeal A⁰ K\nhJ : J = 0\n⊢ I / J = I * J⁻¹\n[PROOFSTEP]\nrw [hJ, div_zero, inv_zero', mul_zero]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI J : FractionalIdeal A⁰ K\nhJ : ¬J = 0\n⊢ I / J = I * J⁻¹\n[PROOFSTEP]\nrefine' le_antisymm ((mul_right_le_iff hJ).mp _) ((le_div_iff_mul_le hJ).mpr _)\n[GOAL]\ncase neg.refine'_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI J : FractionalIdeal A⁰ K\nhJ : ¬J = 0\n⊢ I / J * J ≤ I * J⁻¹ * J\n[PROOFSTEP]\nrw [mul_assoc, mul_comm J⁻¹, FractionalIdeal.mul_inv_cancel hJ, mul_one, mul_le]\n[GOAL]\ncase neg.refine'_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI J : FractionalIdeal A⁰ K\nhJ : ¬J = 0\n⊢ ∀ (i : K), i ∈ I / J → ∀ (j : K), j ∈ J → i * j ∈ I\n[PROOFSTEP]\nintro x hx y hy\n[GOAL]\ncase neg.refine'_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI J : FractionalIdeal A⁰ K\nhJ : ¬J = 0\nx : K\nhx : x ∈ I / J\ny : K\nhy : y ∈ J\n⊢ x * y ∈ I\n[PROOFSTEP]\nrw [mem_div_iff_of_nonzero hJ] at hx \n[GOAL]\ncase neg.refine'_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI J : FractionalIdeal A⁰ K\nhJ : ¬J = 0\nx : K\nhx : ∀ (y : K), y ∈ J → x * y ∈ I\ny : K\nhy : y ∈ J\n⊢ x * y ∈ I\n[PROOFSTEP]\nexact hx y hy\n[GOAL]\ncase neg.refine'_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : Algebra A K\ninst✝¹ : IsFractionRing A K\ninst✝ : IsDedekindDomain A\nI J : FractionalIdeal A⁰ K\nhJ : ¬J = 0\n⊢ I * J⁻¹ * J ≤ I\n[PROOFSTEP]\nrw [mul_assoc, mul_comm J⁻¹, FractionalIdeal.mul_inv_cancel hJ, mul_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nsrc✝ : CommSemiring (FractionalIdeal A⁰ K) := commSemiring\n⊢ CancelCommMonoidWithZero (FractionalIdeal A⁰ K)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nh : J ≤ I\n⊢ I ∣ J\n[PROOFSTEP]\nby_cases hI : I = ⊥\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nh : J ≤ I\nhI : I = ⊥\n⊢ I ∣ J\n[PROOFSTEP]\nhave hJ : J = ⊥ := by rwa [hI, ← eq_bot_iff] at h \n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nh : J ≤ I\nhI : I = ⊥\n⊢ J = ⊥\n[PROOFSTEP]\nrwa [hI, ← eq_bot_iff] at h \n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nh : J ≤ I\nhI : I = ⊥\nhJ : J = ⊥\n⊢ I ∣ J\n[PROOFSTEP]\nrw [hI, hJ]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nh : J ≤ I\nhI : ¬I = ⊥\n⊢ I ∣ J\n[PROOFSTEP]\nhave hI' : (I : FractionalIdeal A⁰ (FractionRing A)) ≠ 0 := coeIdeal_ne_zero.mpr hI\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nh : J ≤ I\nhI : ¬I = ⊥\nhI' : ↑I ≠ 0\n⊢ I ∣ J\n[PROOFSTEP]\nhave : (I : FractionalIdeal A⁰ (FractionRing A))⁻¹ * J ≤ 1 :=\n  le_trans (mul_left_mono (↑I)⁻¹ ((coeIdeal_le_coeIdeal _).mpr h)) (le_of_eq (inv_mul_cancel hI'))\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nh : J ≤ I\nhI : ¬I = ⊥\nhI' : ↑I ≠ 0\nthis : (↑I)⁻¹ * ↑J ≤ 1\n⊢ I ∣ J\n[PROOFSTEP]\nobtain ⟨H, hH⟩ := le_one_iff_exists_coeIdeal.mp this\n[GOAL]\ncase neg.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nh : J ≤ I\nhI : ¬I = ⊥\nhI' : ↑I ≠ 0\nthis : (↑I)⁻¹ * ↑J ≤ 1\nH : Ideal A\nhH : ↑H = (↑I)⁻¹ * ↑J\n⊢ I ∣ J\n[PROOFSTEP]\nuse H\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nh : J ≤ I\nhI : ¬I = ⊥\nhI' : ↑I ≠ 0\nthis : (↑I)⁻¹ * ↑J ≤ 1\nH : Ideal A\nhH : ↑H = (↑I)⁻¹ * ↑J\n⊢ J = I * H\n[PROOFSTEP]\nrefine coeIdeal_injective (show (J : FractionalIdeal A⁰ (FractionRing A)) = ↑(I * H) from ?_)\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nh : J ≤ I\nhI : ¬I = ⊥\nhI' : ↑I ≠ 0\nthis : (↑I)⁻¹ * ↑J ≤ 1\nH : Ideal A\nhH : ↑H = (↑I)⁻¹ * ↑J\n⊢ ↑J = ↑(I * H)\n[PROOFSTEP]\nrw [coeIdeal_mul, hH, ← mul_assoc, mul_inv_cancel hI', one_mul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nx✝ : DvdNotUnit I J\nhI : I ≠ 0\nH : Ideal A\nhunit : ¬IsUnit H\nhmul : J = I * H\nh : J = I\n⊢ I * H = I * 1\n[PROOFSTEP]\nrw [← hmul, h, mul_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\n⊢ WellFounded DvdNotUnit\n[PROOFSTEP]\nhave : WellFounded ((· > ·) : Ideal A → Ideal A → Prop) :=\n  isNoetherian_iff_wellFounded.mp (isNoetherianRing_iff.mp IsDedekindDomain.toIsNoetherian)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nthis : WellFounded fun x x_1 => x > x_1\n⊢ WellFounded DvdNotUnit\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_2.h.h.h.e\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nthis : WellFounded fun x x_1 => x > x_1\nx✝¹ x✝ : Ideal A\n⊢ DvdNotUnit = GT.gt\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_2.h.h.h.e.h.h.a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nthis : WellFounded fun x x_1 => x > x_1\nx✝³ x✝² x✝¹ x✝ : Ideal A\n⊢ DvdNotUnit x✝¹ x✝ ↔ x✝¹ > x✝\n[PROOFSTEP]\nrw [Ideal.dvdNotUnit_iff_lt]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\n⊢ ∀ {a : Ideal A}, Irreducible a ↔ Prime a\n[PROOFSTEP]\nintro P\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\n⊢ Irreducible P ↔ Prime P\n[PROOFSTEP]\nexact\n  ⟨fun hirr =>\n    ⟨hirr.ne_zero, hirr.not_unit, fun I J =>\n      by\n      have : P.IsMaximal := by\n        refine ⟨⟨mt Ideal.isUnit_iff.mpr hirr.not_unit, ?_⟩⟩\n        intro J hJ\n        obtain ⟨_J_ne, H, hunit, P_eq⟩ := Ideal.dvdNotUnit_iff_lt.mpr hJ\n        exact Ideal.isUnit_iff.mp ((hirr.isUnit_or_isUnit P_eq).resolve_right hunit)\n      rw [Ideal.dvd_iff_le, Ideal.dvd_iff_le, Ideal.dvd_iff_le, SetLike.le_def, SetLike.le_def, SetLike.le_def]\n      contrapose!\n      rintro ⟨⟨x, x_mem, x_not_mem⟩, ⟨y, y_mem, y_not_mem⟩⟩\n      exact ⟨x * y, Ideal.mul_mem_mul x_mem y_mem, mt this.isPrime.mem_or_mem (not_or_of_not x_not_mem y_not_mem)⟩⟩,\n    Prime.irreducible⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nhirr : Irreducible P\nI J : Ideal A\n⊢ P ∣ I * J → P ∣ I ∨ P ∣ J\n[PROOFSTEP]\nhave : P.IsMaximal := by\n  refine ⟨⟨mt Ideal.isUnit_iff.mpr hirr.not_unit, ?_⟩⟩\n  intro J hJ\n  obtain ⟨_J_ne, H, hunit, P_eq⟩ := Ideal.dvdNotUnit_iff_lt.mpr hJ\n  exact Ideal.isUnit_iff.mp ((hirr.isUnit_or_isUnit P_eq).resolve_right hunit)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nhirr : Irreducible P\nI J : Ideal A\n⊢ IsMaximal P\n[PROOFSTEP]\nrefine ⟨⟨mt Ideal.isUnit_iff.mpr hirr.not_unit, ?_⟩⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nhirr : Irreducible P\nI J : Ideal A\n⊢ ∀ (b : Ideal A), P < b → b = ⊤\n[PROOFSTEP]\nintro J hJ\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nhirr : Irreducible P\nI J✝ J : Ideal A\nhJ : P < J\n⊢ J = ⊤\n[PROOFSTEP]\nobtain ⟨_J_ne, H, hunit, P_eq⟩ := Ideal.dvdNotUnit_iff_lt.mpr hJ\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nhirr : Irreducible P\nI J✝ J : Ideal A\nhJ : P < J\n_J_ne : J ≠ 0\nH : Ideal A\nhunit : ¬IsUnit H\nP_eq : P = J * H\n⊢ J = ⊤\n[PROOFSTEP]\nexact Ideal.isUnit_iff.mp ((hirr.isUnit_or_isUnit P_eq).resolve_right hunit)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nhirr : Irreducible P\nI J : Ideal A\nthis : IsMaximal P\n⊢ P ∣ I * J → P ∣ I ∨ P ∣ J\n[PROOFSTEP]\nrw [Ideal.dvd_iff_le, Ideal.dvd_iff_le, Ideal.dvd_iff_le, SetLike.le_def, SetLike.le_def, SetLike.le_def]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nhirr : Irreducible P\nI J : Ideal A\nthis : IsMaximal P\n⊢ (∀ ⦃x : A⦄, x ∈ I * J → x ∈ P) → (∀ ⦃x : A⦄, x ∈ I → x ∈ P) ∨ ∀ ⦃x : A⦄, x ∈ J → x ∈ P\n[PROOFSTEP]\ncontrapose!\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nhirr : Irreducible P\nI J : Ideal A\nthis : IsMaximal P\n⊢ ((Exists fun ⦃x⦄ => x ∈ I ∧ ¬x ∈ P) ∧ Exists fun ⦃x⦄ => x ∈ J ∧ ¬x ∈ P) → Exists fun ⦃x⦄ => x ∈ I * J ∧ ¬x ∈ P\n[PROOFSTEP]\nrintro ⟨⟨x, x_mem, x_not_mem⟩, ⟨y, y_mem, y_not_mem⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nhirr : Irreducible P\nI J : Ideal A\nthis : IsMaximal P\nx : A\nx_mem : x ∈ I\nx_not_mem : ¬x ∈ P\ny : A\ny_mem : y ∈ J\ny_not_mem : ¬y ∈ P\n⊢ Exists fun ⦃x⦄ => x ∈ I * J ∧ ¬x ∈ P\n[PROOFSTEP]\nexact ⟨x * y, Ideal.mul_mem_mul x_mem y_mem, mt this.isPrime.mem_or_mem (not_or_of_not x_not_mem y_not_mem)⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nh : Prime P\n⊢ IsPrime P\n[PROOFSTEP]\nrefine ⟨?_, fun hxy => ?_⟩\n[GOAL]\ncase refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nh : Prime P\n⊢ P ≠ ⊤\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : Prime ⊤\n⊢ False\n[PROOFSTEP]\nrw [← Ideal.one_eq_top] at h \n[GOAL]\ncase refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nh : Prime 1\n⊢ False\n[PROOFSTEP]\nexact h.not_unit isUnit_one\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nh : Prime P\nx✝ y✝ : A\nhxy : x✝ * y✝ ∈ P\n⊢ x✝ ∈ P ∨ y✝ ∈ P\n[PROOFSTEP]\nsimp only [← Ideal.dvd_span_singleton, ← Ideal.span_singleton_mul_span_singleton] at hxy ⊢\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nh : Prime P\nx✝ y✝ : A\nhxy : P ∣ span {x✝} * span {y✝}\n⊢ P ∣ span {x✝} ∨ P ∣ span {y✝}\n[PROOFSTEP]\nexact h.dvd_or_dvd hxy\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nhP : P ≠ ⊥\nh : IsPrime P\n⊢ Prime P\n[PROOFSTEP]\nrefine ⟨hP, mt Ideal.isUnit_iff.mp h.ne_top, fun I J hIJ => ?_⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP : Ideal A\nhP : P ≠ ⊥\nh : IsPrime P\nI J : Ideal A\nhIJ : P ∣ I * J\n⊢ P ∣ I ∨ P ∣ J\n[PROOFSTEP]\nsimpa only [Ideal.dvd_iff_le] using h.mul_le.mp (Ideal.le_of_dvd hIJ)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\ne : ℕ\nhe : 2 ≤ e\n⊢ I ^ e < I\n[PROOFSTEP]\nconvert I.strictAnti_pow hI0 hI1 he\n[GOAL]\ncase h.e'_4\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\ne : ℕ\nhe : 2 ≤ e\n⊢ I = (fun x x_1 => x ^ x_1) I 1\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h.e'_4\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI : Ideal A\nhI0 : I ≠ ⊥\nhI1 : I ≠ ⊤\ne : ℕ\nhe : 2 ≤ e\n⊢ I = I ^ 1\n[PROOFSTEP]\nrw [pow_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhlt : P ^ (i + 1) < I\nhle : I ≤ P ^ i\n⊢ I = P ^ i\n[PROOFSTEP]\nhave := Classical.decEq (Ideal A)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhlt : P ^ (i + 1) < I\nhle : I ≤ P ^ i\nthis : DecidableEq (Ideal A)\n⊢ I = P ^ i\n[PROOFSTEP]\nrefine le_antisymm hle ?_\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhlt : P ^ (i + 1) < I\nhle : I ≤ P ^ i\nthis : DecidableEq (Ideal A)\n⊢ P ^ i ≤ I\n[PROOFSTEP]\nhave P_prime' := Ideal.prime_of_isPrime hP P_prime\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhlt : P ^ (i + 1) < I\nhle : I ≤ P ^ i\nthis : DecidableEq (Ideal A)\nP_prime' : Prime P\n⊢ P ^ i ≤ I\n[PROOFSTEP]\nhave h1 : I ≠ ⊥ := (lt_of_le_of_lt bot_le hlt).ne'\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhlt : P ^ (i + 1) < I\nhle : I ≤ P ^ i\nthis : DecidableEq (Ideal A)\nP_prime' : Prime P\nh1 : I ≠ ⊥\n⊢ P ^ i ≤ I\n[PROOFSTEP]\nhave := pow_ne_zero i hP\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhlt : P ^ (i + 1) < I\nhle : I ≤ P ^ i\nthis✝ : DecidableEq (Ideal A)\nP_prime' : Prime P\nh1 : I ≠ ⊥\nthis : P ^ i ≠ 0\n⊢ P ^ i ≤ I\n[PROOFSTEP]\nhave h3 := pow_ne_zero (i + 1) hP\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhlt : P ^ (i + 1) < I\nhle : I ≤ P ^ i\nthis✝ : DecidableEq (Ideal A)\nP_prime' : Prime P\nh1 : I ≠ ⊥\nthis : P ^ i ≠ 0\nh3 : P ^ (i + 1) ≠ 0\n⊢ P ^ i ≤ I\n[PROOFSTEP]\nrw [← Ideal.dvdNotUnit_iff_lt, dvdNotUnit_iff_normalizedFactors_lt_normalizedFactors h1 h3, normalizedFactors_pow,\n  normalizedFactors_irreducible P_prime'.irreducible, Multiset.nsmul_singleton, Multiset.lt_replicate_succ] at hlt \n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhle : I ≤ P ^ i\nthis✝ : DecidableEq (Ideal A)\nhlt : normalizedFactors I ≤ Multiset.replicate i (↑normalize P)\nP_prime' : Prime P\nh1 : I ≠ ⊥\nthis : P ^ i ≠ 0\nh3 : P ^ (i + 1) ≠ 0\n⊢ P ^ i ≤ I\n[PROOFSTEP]\nrw [← Ideal.dvd_iff_le, dvd_iff_normalizedFactors_le_normalizedFactors, normalizedFactors_pow,\n  normalizedFactors_irreducible P_prime'.irreducible, Multiset.nsmul_singleton]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhle : I ≤ P ^ i\nthis✝ : DecidableEq (Ideal A)\nhlt : normalizedFactors I ≤ Multiset.replicate i (↑normalize P)\nP_prime' : Prime P\nh1 : I ≠ ⊥\nthis : P ^ i ≠ 0\nh3 : P ^ (i + 1) ≠ 0\n⊢ normalizedFactors I ≤ Multiset.replicate i (↑normalize P)\ncase hx\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhle : I ≤ P ^ i\nthis✝ : DecidableEq (Ideal A)\nhlt : normalizedFactors I ≤ Multiset.replicate i (↑normalize P)\nP_prime' : Prime P\nh1 : I ≠ ⊥\nthis : P ^ i ≠ 0\nh3 : P ^ (i + 1) ≠ 0\n⊢ I ≠ 0\ncase hy\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhle : I ≤ P ^ i\nthis✝ : DecidableEq (Ideal A)\nhlt : normalizedFactors I ≤ Multiset.replicate i (↑normalize P)\nP_prime' : Prime P\nh1 : I ≠ ⊥\nthis : P ^ i ≠ 0\nh3 : P ^ (i + 1) ≠ 0\n⊢ P ^ i ≠ 0\n[PROOFSTEP]\nall_goals assumption\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhle : I ≤ P ^ i\nthis✝ : DecidableEq (Ideal A)\nhlt : normalizedFactors I ≤ Multiset.replicate i (↑normalize P)\nP_prime' : Prime P\nh1 : I ≠ ⊥\nthis : P ^ i ≠ 0\nh3 : P ^ (i + 1) ≠ 0\n⊢ normalizedFactors I ≤ Multiset.replicate i (↑normalize P)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hx\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhle : I ≤ P ^ i\nthis✝ : DecidableEq (Ideal A)\nhlt : normalizedFactors I ≤ Multiset.replicate i (↑normalize P)\nP_prime' : Prime P\nh1 : I ≠ ⊥\nthis : P ^ i ≠ 0\nh3 : P ^ (i + 1) ≠ 0\n⊢ I ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hy\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nP I : Ideal A\nP_prime : IsPrime P\nhP : P ≠ ⊥\ni : ℕ\nhle : I ≤ P ^ i\nthis✝ : DecidableEq (Ideal A)\nhlt : normalizedFactors I ≤ Multiset.replicate i (↑normalize P)\nP_prime' : Prime P\nh1 : I ≠ ⊥\nthis : P ^ i ≠ 0\nh3 : P ^ (i + 1) ≠ 0\n⊢ P ^ i ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : A\nn : ℕ\nI : Ideal A\n⊢ Associates.mk I ^ n ≤ Associates.mk (span {x}) ↔ x ∈ I ^ n\n[PROOFSTEP]\nsimp_rw [← Associates.dvd_eq_le, ← Associates.mk_pow, Associates.mk_dvd_mk, Ideal.dvd_span_singleton]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\n⊢ ∃ a, (∀ (i : ι), i ∈ s → IsLocalization.IsInteger A (a * f i)) ∧ ∃ i, i ∈ s ∧ ¬a * f i ∈ ↑J\n[PROOFSTEP]\nlet I : FractionalIdeal A⁰ K := spanFinset A s f\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\n⊢ ∃ a, (∀ (i : ι), i ∈ s → IsLocalization.IsInteger A (a * f i)) ∧ ∃ i, i ∈ s ∧ ¬a * f i ∈ ↑J\n[PROOFSTEP]\nhave hI0 : I ≠ 0 :=\n  spanFinset_ne_zero.mpr\n    ⟨j, hjs, hjf⟩\n      -- We claim the multiplier `a` we're looking for is in `I⁻¹ \\ (J / I)`.\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\n⊢ ∃ a, (∀ (i : ι), i ∈ s → IsLocalization.IsInteger A (a * f i)) ∧ ∃ i, i ∈ s ∧ ¬a * f i ∈ ↑J\n[PROOFSTEP]\nsuffices ↑J / I < I⁻¹ by\n  obtain ⟨_, a, hI, hpI⟩ := SetLike.lt_iff_le_and_exists.mp this\n  rw [mem_inv_iff hI0] at hI \n  refine'\n    ⟨a, fun i hi => _, _⟩\n      -- By definition, `a ∈ I⁻¹` multiplies elements of `I` into elements of `1`,\n          -- in other words, `a * f i` is an integer.\n  · exact (mem_one_iff _).mp (hI (f i) (Submodule.subset_span (Set.mem_image_of_mem f hi)))\n  · contrapose! hpI\n    refine' (mem_div_iff_of_nonzero hI0).mpr fun y hy => Submodule.span_induction hy _ _ _ _\n    · rintro _ ⟨i, hi, rfl⟩; exact hpI i hi\n    · rw [mul_zero]; exact Submodule.zero_mem _\n    · intro x y hx hy; rw [mul_add]; exact Submodule.add_mem _ hx hy\n    · intro b x hx; rw [mul_smul_comm]; exact Submodule.smul_mem _ b hx\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\n⊢ ∃ a, (∀ (i : ι), i ∈ s → IsLocalization.IsInteger A (a * f i)) ∧ ∃ i, i ∈ s ∧ ¬a * f i ∈ ↑J\n[PROOFSTEP]\nobtain ⟨_, a, hI, hpI⟩ := SetLike.lt_iff_le_and_exists.mp this\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : a ∈ I⁻¹\nhpI : ¬a ∈ ↑J / I\n⊢ ∃ a, (∀ (i : ι), i ∈ s → IsLocalization.IsInteger A (a * f i)) ∧ ∃ i, i ∈ s ∧ ¬a * f i ∈ ↑J\n[PROOFSTEP]\nrw [mem_inv_iff hI0] at hI \n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ¬a ∈ ↑J / I\n⊢ ∃ a, (∀ (i : ι), i ∈ s → IsLocalization.IsInteger A (a * f i)) ∧ ∃ i, i ∈ s ∧ ¬a * f i ∈ ↑J\n[PROOFSTEP]\nrefine'\n  ⟨a, fun i hi => _, _⟩\n    -- By definition, `a ∈ I⁻¹` multiplies elements of `I` into elements of `1`,\n        -- in other words, `a * f i` is an integer.\n[GOAL]\ncase intro.intro.intro.refine'_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ¬a ∈ ↑J / I\ni : ι\nhi : i ∈ s\n⊢ IsLocalization.IsInteger A (a * f i)\n[PROOFSTEP]\nexact (mem_one_iff _).mp (hI (f i) (Submodule.subset_span (Set.mem_image_of_mem f hi)))\n[GOAL]\ncase intro.intro.intro.refine'_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ¬a ∈ ↑J / I\n⊢ ∃ i, i ∈ s ∧ ¬a * f i ∈ ↑J\n[PROOFSTEP]\ncontrapose! hpI\n[GOAL]\ncase intro.intro.intro.refine'_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ∀ (i : ι), i ∈ s → a * f i ∈ ↑J\n⊢ a ∈ ↑J / spanFinset A s f\n[PROOFSTEP]\nrefine' (mem_div_iff_of_nonzero hI0).mpr fun y hy => Submodule.span_induction hy _ _ _ _\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ∀ (i : ι), i ∈ s → a * f i ∈ ↑J\ny : K\nhy : y ∈ I\n⊢ ∀ (x : K), x ∈ f '' ↑s → a * x ∈ ↑J\n[PROOFSTEP]\nrintro _ ⟨i, hi, rfl⟩\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_1.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ∀ (i : ι), i ∈ s → a * f i ∈ ↑J\ny : K\nhy : y ∈ I\ni : ι\nhi : i ∈ ↑s\n⊢ a * f i ∈ ↑J\n[PROOFSTEP]\nexact hpI i hi\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ∀ (i : ι), i ∈ s → a * f i ∈ ↑J\ny : K\nhy : y ∈ I\n⊢ a * 0 ∈ ↑J\n[PROOFSTEP]\nrw [mul_zero]\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ∀ (i : ι), i ∈ s → a * f i ∈ ↑J\ny : K\nhy : y ∈ I\n⊢ 0 ∈ ↑J\n[PROOFSTEP]\nexact Submodule.zero_mem _\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_3\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ∀ (i : ι), i ∈ s → a * f i ∈ ↑J\ny : K\nhy : y ∈ I\n⊢ ∀ (x y : K), a * x ∈ ↑J → a * y ∈ ↑J → a * (x + y) ∈ ↑J\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_3\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ∀ (i : ι), i ∈ s → a * f i ∈ ↑J\ny✝ : K\nhy✝ : y✝ ∈ I\nx y : K\nhx : a * x ∈ ↑J\nhy : a * y ∈ ↑J\n⊢ a * (x + y) ∈ ↑J\n[PROOFSTEP]\nrw [mul_add]\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_3\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ∀ (i : ι), i ∈ s → a * f i ∈ ↑J\ny✝ : K\nhy✝ : y✝ ∈ I\nx y : K\nhx : a * x ∈ ↑J\nhy : a * y ∈ ↑J\n⊢ a * x + a * y ∈ ↑J\n[PROOFSTEP]\nexact Submodule.add_mem _ hx hy\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_4\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ∀ (i : ι), i ∈ s → a * f i ∈ ↑J\ny : K\nhy : y ∈ I\n⊢ ∀ (a_1 : A) (x : K), a * x ∈ ↑J → a * a_1 • x ∈ ↑J\n[PROOFSTEP]\nintro b x hx\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_4\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ∀ (i : ι), i ∈ s → a * f i ∈ ↑J\ny : K\nhy : y ∈ I\nb : A\nx : K\nhx : a * x ∈ ↑J\n⊢ a * b • x ∈ ↑J\n[PROOFSTEP]\nrw [mul_smul_comm]\n[GOAL]\ncase intro.intro.intro.refine'_2.refine'_4\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\nthis : ↑J / I < I⁻¹\nleft✝ : ↑J / I ≤ I⁻¹\na : K\nhI : ∀ (y : K), y ∈ I → a * y ∈ 1\nhpI : ∀ (i : ι), i ∈ s → a * f i ∈ ↑J\ny : K\nhy : y ∈ I\nb : A\nx : K\nhx : a * x ∈ ↑J\n⊢ b • (a * x) ∈ ↑J\n[PROOFSTEP]\nexact Submodule.smul_mem _ b hx\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\n⊢ ↑J / I < I⁻¹\n[PROOFSTEP]\ncalc\n  ↑J / I = ↑J * I⁻¹ := div_eq_mul_inv (↑J) I\n  _ < 1 * I⁻¹ := (mul_right_strictMono (inv_ne_zero hI0) ?_)\n  _ = I⁻¹ := one_mul _\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\n⊢ ↑J < 1\n[PROOFSTEP]\nrw [← coeIdeal_top]\n  -- And multiplying by `I⁻¹` is indeed strictly monotone.\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nJ : Ideal A\nhJ : J ≠ ⊤\nι : Type u_4\ns : Finset ι\nf : ι → K\nj : ι\nhjs : j ∈ s\nhjf : f j ≠ 0\nI : FractionalIdeal A⁰ K := spanFinset A s f\nhI0 : I ≠ 0\n⊢ ↑J < ↑⊤\n[PROOFSTEP]\nexact strictMono_of_le_iff_le (fun _ _ => (coeIdeal_le_coeIdeal K).symm) (lt_top_iff_ne_top.mpr hJ)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\n⊢ (I ⊔ J) * (I ⊓ J) = I * J\n[PROOFSTEP]\nletI := Classical.decEq (Ideal A)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\n⊢ (I ⊔ J) * (I ⊓ J) = I * J\n[PROOFSTEP]\nletI := Classical.decEq (Associates (Ideal A))\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\n⊢ (I ⊔ J) * (I ⊓ J) = I * J\n[PROOFSTEP]\nletI := UniqueFactorizationMonoid.toNormalizedGCDMonoid (Ideal A)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\n⊢ (I ⊔ J) * (I ⊓ J) = I * J\n[PROOFSTEP]\nhave hgcd : gcd I J = I ⊔ J := by\n  rw [gcd_eq_normalize _ _, normalize_eq]\n  · rw [dvd_iff_le, sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]\n    exact ⟨gcd_dvd_left _ _, gcd_dvd_right _ _⟩\n  · rw [dvd_gcd_iff, dvd_iff_le, dvd_iff_le]\n    simp\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\n⊢ gcd I J = I ⊔ J\n[PROOFSTEP]\nrw [gcd_eq_normalize _ _, normalize_eq]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\n⊢ gcd I J ∣ I ⊔ J\n[PROOFSTEP]\nrw [dvd_iff_le, sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\n⊢ gcd I J ∣ I ∧ gcd I J ∣ J\n[PROOFSTEP]\nexact ⟨gcd_dvd_left _ _, gcd_dvd_right _ _⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\n⊢ I ⊔ J ∣ gcd I J\n[PROOFSTEP]\nrw [dvd_gcd_iff, dvd_iff_le, dvd_iff_le]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\n⊢ I ≤ I ⊔ J ∧ J ≤ I ⊔ J\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\nhgcd : gcd I J = I ⊔ J\n⊢ (I ⊔ J) * (I ⊓ J) = I * J\n[PROOFSTEP]\nhave hlcm : lcm I J = I ⊓ J := by\n  rw [lcm_eq_normalize _ _, normalize_eq]\n  · rw [lcm_dvd_iff, dvd_iff_le, dvd_iff_le]\n    simp\n  · rw [dvd_iff_le, le_inf_iff, ← dvd_iff_le, ← dvd_iff_le]\n    exact ⟨dvd_lcm_left _ _, dvd_lcm_right _ _⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\nhgcd : gcd I J = I ⊔ J\n⊢ lcm I J = I ⊓ J\n[PROOFSTEP]\nrw [lcm_eq_normalize _ _, normalize_eq]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\nhgcd : gcd I J = I ⊔ J\n⊢ lcm I J ∣ I ⊓ J\n[PROOFSTEP]\nrw [lcm_dvd_iff, dvd_iff_le, dvd_iff_le]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\nhgcd : gcd I J = I ⊔ J\n⊢ I ⊓ J ≤ I ∧ I ⊓ J ≤ J\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\nhgcd : gcd I J = I ⊔ J\n⊢ I ⊓ J ∣ lcm I J\n[PROOFSTEP]\nrw [dvd_iff_le, le_inf_iff, ← dvd_iff_le, ← dvd_iff_le]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\nhgcd : gcd I J = I ⊔ J\n⊢ I ∣ lcm I J ∧ J ∣ lcm I J\n[PROOFSTEP]\nexact ⟨dvd_lcm_left _ _, dvd_lcm_right _ _⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\nthis✝¹ : DecidableEq (Ideal A) := Classical.decEq (Ideal A)\nthis✝ : DecidableEq (Associates (Ideal A)) := Classical.decEq (Associates (Ideal A))\nthis : NormalizedGCDMonoid (Ideal A) := toNormalizedGCDMonoid (Ideal A)\nhgcd : gcd I J = I ⊔ J\nhlcm : lcm I J = I ⊓ J\n⊢ (I ⊔ J) * (I ⊓ J) = I * J\n[PROOFSTEP]\nrw [← hgcd, ← hlcm, associated_iff_eq.mp (gcd_mul_lcm _ _)]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nsrc✝ : NormalizationMonoid (Ideal A) := normalizationMonoid\nx✝¹ x✝ : Ideal A\n⊢ (fun x x_1 => x ⊔ x_1) x✝¹ x✝ ∣ x✝¹\n[PROOFSTEP]\nsimpa only [dvd_iff_le] using le_sup_left\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nsrc✝ : NormalizationMonoid (Ideal A) := normalizationMonoid\nx✝¹ x✝ : Ideal A\n⊢ (fun x x_1 => x ⊔ x_1) x✝¹ x✝ ∣ x✝\n[PROOFSTEP]\nsimpa only [dvd_iff_le] using le_sup_right\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nsrc✝ : NormalizationMonoid (Ideal A) := normalizationMonoid\n⊢ ∀ {a b c : Ideal A}, a ∣ c → a ∣ b → a ∣ (fun x x_1 => x ⊔ x_1) c b\n[PROOFSTEP]\nsimp only [dvd_iff_le]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nsrc✝ : NormalizationMonoid (Ideal A) := normalizationMonoid\n⊢ ∀ {a b c : Ideal A}, c ≤ a → b ≤ a → c ⊔ b ≤ a\n[PROOFSTEP]\nexact fun h1 h2 => @sup_le (Ideal A) _ _ _ _ h1 h2\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nsrc✝ : NormalizationMonoid (Ideal A) := normalizationMonoid\nx✝¹ x✝ : Ideal A\n⊢ Associated ((fun x x_1 => x ⊔ x_1) x✝¹ x✝ * (fun x x_1 => x ⊓ x_1) x✝¹ x✝) (x✝¹ * x✝)\n[PROOFSTEP]\nrw [associated_iff_eq, sup_mul_inf]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nsrc✝ : NormalizationMonoid (Ideal A) := normalizationMonoid\nx✝ : Ideal A\n⊢ (fun x x_1 => x ⊓ x_1) 0 x✝ = 0\n[PROOFSTEP]\nsimp only [zero_eq_bot, bot_inf_eq]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nsrc✝ : NormalizationMonoid (Ideal A) := normalizationMonoid\nx✝ : Ideal A\n⊢ (fun x x_1 => x ⊓ x_1) x✝ 0 = 0\n[PROOFSTEP]\nsimp only [zero_eq_bot, inf_bot_eq]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDedekindDomain A\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nI J : Ideal A\ncoprime : I ⊔ J = ⊤\n⊢ I ⊓ J = I * J\n[PROOFSTEP]\nrw [← associated_iff_eq.mp (gcd_mul_lcm I J), lcm_eq_inf I J, gcd_eq_sup, coprime, top_mul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\n⊢ I ⊔ J = Multiset.prod (normalizedFactors I ∩ normalizedFactors J)\n[PROOFSTEP]\nhave H :\n  normalizedFactors (normalizedFactors I ∩ normalizedFactors J).prod = normalizedFactors I ∩ normalizedFactors J :=\n  by\n  apply normalizedFactors_prod_of_prime\n  intro p hp\n  rw [mem_inter] at hp \n  exact prime_of_normalized_factor p hp.left\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\n⊢ normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\n[PROOFSTEP]\napply normalizedFactors_prod_of_prime\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\n⊢ ∀ (p : Ideal T), p ∈ normalizedFactors I ∩ normalizedFactors J → Prime p\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\np : Ideal T\nhp : p ∈ normalizedFactors I ∩ normalizedFactors J\n⊢ Prime p\n[PROOFSTEP]\nrw [mem_inter] at hp \n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\np : Ideal T\nhp : p ∈ normalizedFactors I ∧ p ∈ normalizedFactors J\n⊢ Prime p\n[PROOFSTEP]\nexact prime_of_normalized_factor p hp.left\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\n⊢ I ⊔ J = Multiset.prod (normalizedFactors I ∩ normalizedFactors J)\n[PROOFSTEP]\nhave :=\n  Multiset.prod_ne_zero_of_prime (normalizedFactors I ∩ normalizedFactors J) fun _ h =>\n    prime_of_normalized_factor _ (Multiset.mem_inter.1 h).1\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n⊢ I ⊔ J = Multiset.prod (normalizedFactors I ∩ normalizedFactors J)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n⊢ I ⊔ J ≤ Multiset.prod (normalizedFactors I ∩ normalizedFactors J)\n[PROOFSTEP]\nrw [sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n⊢ Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ∣ I ∧\n    Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ∣ J\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.left\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n⊢ Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ∣ I\n[PROOFSTEP]\nrw [dvd_iff_normalizedFactors_le_normalizedFactors this hI, H]\n[GOAL]\ncase a.left\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n⊢ normalizedFactors I ∩ normalizedFactors J ≤ normalizedFactors I\n[PROOFSTEP]\nexact inf_le_left\n[GOAL]\ncase a.right\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n⊢ Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ∣ J\n[PROOFSTEP]\nrw [dvd_iff_normalizedFactors_le_normalizedFactors this hJ, H]\n[GOAL]\ncase a.right\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n⊢ normalizedFactors I ∩ normalizedFactors J ≤ normalizedFactors J\n[PROOFSTEP]\nexact inf_le_right\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n⊢ Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≤ I ⊔ J\n[PROOFSTEP]\nrw [← dvd_iff_le, dvd_iff_normalizedFactors_le_normalizedFactors, normalizedFactors_prod_of_prime, le_iff_count]\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n⊢ ∀ (a : Ideal T), count a (normalizedFactors (I ⊔ J)) ≤ count a (normalizedFactors I ∩ normalizedFactors J)\n[PROOFSTEP]\nintro a\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\na : Ideal T\n⊢ count a (normalizedFactors (I ⊔ J)) ≤ count a (normalizedFactors I ∩ normalizedFactors J)\n[PROOFSTEP]\nrw [Multiset.count_inter]\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\na : Ideal T\n⊢ count a (normalizedFactors (I ⊔ J)) ≤ min (count a (normalizedFactors I)) (count a (normalizedFactors J))\n[PROOFSTEP]\nexact le_min (count_le_of_ideal_ge le_sup_left hI a) (count_le_of_ideal_ge le_sup_right hJ a)\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n⊢ ∀ (p : Ideal T), p ∈ normalizedFactors I ∩ normalizedFactors J → Prime p\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\np : Ideal T\nhp : p ∈ normalizedFactors I ∩ normalizedFactors J\n⊢ Prime p\n[PROOFSTEP]\nrw [mem_inter] at hp \n[GOAL]\ncase a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\np : Ideal T\nhp : p ∈ normalizedFactors I ∧ p ∈ normalizedFactors J\n⊢ Prime p\n[PROOFSTEP]\nexact prime_of_normalized_factor p hp.left\n[GOAL]\ncase a.hx\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n⊢ I ⊔ J ≠ 0\n[PROOFSTEP]\nexact ne_bot_of_le_ne_bot hI le_sup_left\n[GOAL]\ncase a.hy\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nH :\n  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =\n    normalizedFactors I ∩ normalizedFactors J\nthis : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n⊢ Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0\n[PROOFSTEP]\nexact this\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : Irreducible J\nn : ℕ\n⊢ J ^ n ⊔ I = J ^ min (count J (normalizedFactors I)) n\n[PROOFSTEP]\nrw [sup_eq_prod_inf_factors (pow_ne_zero n hJ.ne_zero) hI, min_comm, normalizedFactors_of_irreducible_pow hJ,\n  normalize_eq J, replicate_inter, prod_replicate]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhJ : Irreducible J\nn : ℕ\nhn : ↑n ≤ multiplicity J I\n⊢ J ^ n ⊔ I = J ^ n\n[PROOFSTEP]\nby_cases hI : I = ⊥\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhJ : Irreducible J\nn : ℕ\nhn : ↑n ≤ multiplicity J I\nhI : I = ⊥\n⊢ J ^ n ⊔ I = J ^ n\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhJ : Irreducible J\nn : ℕ\nhn : ↑n ≤ multiplicity J I\nhI : ¬I = ⊥\n⊢ J ^ n ⊔ I = J ^ n\n[PROOFSTEP]\nrw [irreducible_pow_sup hI hJ, min_eq_right]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhJ : Irreducible J\nn : ℕ\nhn : ↑n ≤ multiplicity J I\nhI : ¬I = ⊥\n⊢ n ≤ count J (normalizedFactors I)\n[PROOFSTEP]\nrwa [multiplicity_eq_count_normalizedFactors hJ hI, PartENat.coe_le_coe, normalize_eq J] at hn \n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : Irreducible J\nn : ℕ\nhn : multiplicity J I ≤ ↑n\n⊢ J ^ n ⊔ I = J ^ Part.get (multiplicity J I) (_ : (multiplicity J I).Dom)\n[PROOFSTEP]\nrw [irreducible_pow_sup hI hJ, min_eq_left]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : Irreducible J\nn : ℕ\nhn : multiplicity J I ≤ ↑n\n⊢ J ^ count J (normalizedFactors I) = J ^ Part.get (multiplicity J I) (_ : (multiplicity J I).Dom)\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : Irreducible J\nn : ℕ\nhn : multiplicity J I ≤ ↑n\n⊢ count J (normalizedFactors I) ≤ n\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : Irreducible J\nn : ℕ\nhn : multiplicity J I ≤ ↑n\n⊢ count J (normalizedFactors I) = Part.get (multiplicity J I) (_ : (multiplicity J I).Dom)\n[PROOFSTEP]\nrw [← PartENat.natCast_inj, PartENat.natCast_get, multiplicity_eq_count_normalizedFactors hJ hI, normalize_eq J]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\nT : Type u_4\ninst✝² : CommRing T\ninst✝¹ : IsDomain T\ninst✝ : IsDedekindDomain T\nI J : Ideal T\nhI : I ≠ ⊥\nhJ : Irreducible J\nn : ℕ\nhn : multiplicity J I ≤ ↑n\n⊢ count J (normalizedFactors I) ≤ n\n[PROOFSTEP]\nrwa [multiplicity_eq_count_normalizedFactors hJ hI, PartENat.coe_le_coe, normalize_eq J] at hn \n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\n⊢ ⨅ (v : HeightOneSpectrum R),\n      Localization.subalgebra.ofField K (Ideal.primeCompl v.asIdeal) (_ : Ideal.primeCompl v.asIdeal ≤ R⁰) =\n    ⊥\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\nx : K\n⊢ x ∈\n      ⨅ (v : HeightOneSpectrum R),\n        Localization.subalgebra.ofField K (Ideal.primeCompl v.asIdeal) (_ : Ideal.primeCompl v.asIdeal ≤ R⁰) ↔\n    x ∈ ⊥\n[PROOFSTEP]\nrw [Algebra.mem_iInf]\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\nx : K\n⊢ (∀ (i : HeightOneSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)) ↔\n    x ∈ ⊥\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\nx : K\n⊢ (∀ (i : HeightOneSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)) →\n    x ∈ ⊥\ncase h.mpr\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\nx : K\n⊢ x ∈ ⊥ →\n    ∀ (i : HeightOneSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)\n[PROOFSTEP]\nby_cases hR : IsField R\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\nx : K\nhR : IsField R\n⊢ (∀ (i : HeightOneSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)) →\n    x ∈ ⊥\n[PROOFSTEP]\nrcases Function.bijective_iff_has_inverse.mp\n    (IsField.localization_map_bijective (Rₘ := K) (flip nonZeroDivisors.ne_zero rfl : 0 ∉ R⁰) hR) with\n  ⟨algebra_map_inv, _, algebra_map_right_inv⟩\n[GOAL]\ncase pos.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\nx : K\nhR : IsField R\nalgebra_map_inv : K → R\nleft✝ : Function.LeftInverse algebra_map_inv ↑(algebraMap R K)\nalgebra_map_right_inv : Function.RightInverse algebra_map_inv ↑(algebraMap R K)\n⊢ (∀ (i : HeightOneSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)) →\n    x ∈ ⊥\n[PROOFSTEP]\nexact fun _ => Algebra.mem_bot.mpr ⟨algebra_map_inv x, algebra_map_right_inv x⟩\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\nx : K\nhR : ¬IsField R\n⊢ (∀ (i : HeightOneSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)) →\n    x ∈ ⊥\ncase h.mpr\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\nx : K\n⊢ x ∈ ⊥ →\n    ∀ (i : HeightOneSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)\n[PROOFSTEP]\nall_goals rw [← MaximalSpectrum.iInf_localization_eq_bot, Algebra.mem_iInf]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\nx : K\nhR : ¬IsField R\n⊢ (∀ (i : HeightOneSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)) →\n    x ∈ ⊥\n[PROOFSTEP]\nrw [← MaximalSpectrum.iInf_localization_eq_bot, Algebra.mem_iInf]\n[GOAL]\ncase h.mpr\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\nx : K\n⊢ x ∈ ⊥ →\n    ∀ (i : HeightOneSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)\n[PROOFSTEP]\nrw [← MaximalSpectrum.iInf_localization_eq_bot, Algebra.mem_iInf]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\nx : K\nhR : ¬IsField R\n⊢ (∀ (i : HeightOneSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)) →\n    ∀ (i : MaximalSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)\n[PROOFSTEP]\nexact fun hx ⟨v, hv⟩ => hx ((equivMaximalSpectrum hR).symm ⟨v, hv⟩)\n[GOAL]\ncase h.mpr\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nv : HeightOneSpectrum R\ninst✝ : Algebra R K\nhK : IsFractionRing R K\nx : K\n⊢ (∀ (i : MaximalSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)) →\n    ∀ (i : HeightOneSpectrum R),\n      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)\n[PROOFSTEP]\nexact fun hx ⟨v, hv, hbot⟩ => hx ⟨v, hv.isMaximal hbot⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Field K\ninst✝¹ : IsDomain A\ninst✝ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nf : R ⧸ I →+* A ⧸ J\nhf : Function.Surjective ↑f\nX : { p // p ∣ I }\n⊢ comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X)) ∣ J\n[PROOFSTEP]\nhave : RingHom.ker (Ideal.Quotient.mk J) ≤ comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) X)) :=\n  ker_le_comap (Ideal.Quotient.mk J)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Field K\ninst✝¹ : IsDomain A\ninst✝ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nf : R ⧸ I →+* A ⧸ J\nhf : Function.Surjective ↑f\nX : { p // p ∣ I }\nthis : RingHom.ker (Ideal.Quotient.mk J) ≤ comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X))\n⊢ comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X)) ∣ J\n[PROOFSTEP]\nrw [mk_ker] at this \n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Field K\ninst✝¹ : IsDomain A\ninst✝ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nf : R ⧸ I →+* A ⧸ J\nhf : Function.Surjective ↑f\nX : { p // p ∣ I }\nthis : J ≤ comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X))\n⊢ comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X)) ∣ J\n[PROOFSTEP]\nexact dvd_iff_le.mpr this\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Field K\ninst✝¹ : IsDomain A\ninst✝ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nf : R ⧸ I →+* A ⧸ J\nhf : Function.Surjective ↑f\n⊢ Monotone fun X =>\n    { val := comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X)),\n      property := (_ : comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X)) ∣ J) }\n[PROOFSTEP]\nrintro ⟨X, hX⟩ ⟨Y, hY⟩ h\n[GOAL]\ncase mk.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Field K\ninst✝¹ : IsDomain A\ninst✝ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nf : R ⧸ I →+* A ⧸ J\nhf : Function.Surjective ↑f\nX : Ideal R\nhX : X ∣ I\nY : Ideal R\nhY : Y ∣ I\nh : { val := X, property := hX } ≤ { val := Y, property := hY }\n⊢ (fun X =>\n        { val := comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X)),\n          property := (_ : comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X)) ∣ J) })\n      { val := X, property := hX } ≤\n    (fun X =>\n        { val := comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X)),\n          property := (_ : comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X)) ∣ J) })\n      { val := Y, property := hY }\n[PROOFSTEP]\nrw [← Subtype.coe_le_coe, Subtype.coe_mk, Subtype.coe_mk] at h ⊢\n[GOAL]\ncase mk.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Field K\ninst✝¹ : IsDomain A\ninst✝ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nf : R ⧸ I →+* A ⧸ J\nhf : Function.Surjective ↑f\nX : Ideal R\nhX : X ∣ I\nY : Ideal R\nhY : Y ∣ I\nh : X ≤ Y\n⊢ comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) X)) ≤\n    ↑((fun X =>\n          { val := comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X)),\n            property := (_ : comap (Ideal.Quotient.mk J) (map f (map (Ideal.Quotient.mk I) ↑X)) ∣ J) })\n        { val := Y, property := hY })\n[PROOFSTEP]\nrw [Subtype.coe_mk, comap_le_comap_iff_of_surjective (Ideal.Quotient.mk J) Quotient.mk_surjective, map_le_iff_le_comap,\n  Subtype.coe_mk, comap_map_of_surjective _ hf (map (Ideal.Quotient.mk I) Y)]\n[GOAL]\ncase mk.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Field K\ninst✝¹ : IsDomain A\ninst✝ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nf : R ⧸ I →+* A ⧸ J\nhf : Function.Surjective ↑f\nX : Ideal R\nhX : X ∣ I\nY : Ideal R\nhY : Y ∣ I\nh : X ≤ Y\n⊢ map (Ideal.Quotient.mk I) X ≤ map (Ideal.Quotient.mk I) Y ⊔ comap f ⊥\n[PROOFSTEP]\nsuffices map (Ideal.Quotient.mk I) X ≤ map (Ideal.Quotient.mk I) Y by exact le_sup_of_le_left this\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Field K\ninst✝¹ : IsDomain A\ninst✝ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nf : R ⧸ I →+* A ⧸ J\nhf : Function.Surjective ↑f\nX : Ideal R\nhX : X ∣ I\nY : Ideal R\nhY : Y ∣ I\nh : X ≤ Y\nthis : map (Ideal.Quotient.mk I) X ≤ map (Ideal.Quotient.mk I) Y\n⊢ map (Ideal.Quotient.mk I) X ≤ map (Ideal.Quotient.mk I) Y ⊔ comap f ⊥\n[PROOFSTEP]\nexact le_sup_of_le_left this\n[GOAL]\ncase mk.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Field K\ninst✝¹ : IsDomain A\ninst✝ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nf : R ⧸ I →+* A ⧸ J\nhf : Function.Surjective ↑f\nX : Ideal R\nhX : X ∣ I\nY : Ideal R\nhY : Y ∣ I\nh : X ≤ Y\n⊢ map (Ideal.Quotient.mk I) X ≤ map (Ideal.Quotient.mk I) Y\n[PROOFSTEP]\nrwa [map_le_iff_le_comap, comap_map_of_surjective (Ideal.Quotient.mk I) Quotient.mk_surjective, ←\n  RingHom.ker_eq_comap_bot, mk_ker, sup_eq_left.mpr <| le_of_dvd hY]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Field K\ninst✝¹ : IsDomain A\ninst✝ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nX : { p // p ∣ J }\n⊢ ↑(idealFactorsFunOfQuotHom (_ : Function.Surjective ↑(RingHom.id (A ⧸ J)))) X = ↑OrderHom.id X\n[PROOFSTEP]\nsimp only [idealFactorsFunOfQuotHom, map_id, OrderHom.coe_mk, OrderHom.id_coe, id.def,\n  comap_map_of_surjective (Ideal.Quotient.mk J) Quotient.mk_surjective, ←\n  RingHom.ker_eq_comap_bot (Ideal.Quotient.mk J), mk_ker, sup_eq_left.mpr (dvd_iff_le.mp X.prop), Subtype.coe_eta]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝² : CommRing B\ninst✝¹ : IsDomain B\ninst✝ : IsDedekindDomain B\nL : Ideal B\nf : R ⧸ I →+* A ⧸ J\ng : A ⧸ J →+* B ⧸ L\nhf : Function.Surjective ↑f\nhg : Function.Surjective ↑g\n⊢ OrderHom.comp (idealFactorsFunOfQuotHom hg) (idealFactorsFunOfQuotHom hf) =\n    idealFactorsFunOfQuotHom (_ : Function.Surjective ↑(RingHom.comp g f))\n[PROOFSTEP]\nrefine OrderHom.ext _ _ (funext fun x => ?_)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝² : CommRing B\ninst✝¹ : IsDomain B\ninst✝ : IsDedekindDomain B\nL : Ideal B\nf : R ⧸ I →+* A ⧸ J\ng : A ⧸ J →+* B ⧸ L\nhf : Function.Surjective ↑f\nhg : Function.Surjective ↑g\nx : { p // p ∣ I }\n⊢ ↑(OrderHom.comp (idealFactorsFunOfQuotHom hg) (idealFactorsFunOfQuotHom hf)) x =\n    ↑(idealFactorsFunOfQuotHom (_ : Function.Surjective ↑(RingHom.comp g f))) x\n[PROOFSTEP]\nrw [idealFactorsFunOfQuotHom, idealFactorsFunOfQuotHom, OrderHom.comp_coe, OrderHom.coe_mk, OrderHom.coe_mk,\n  Function.comp_apply, idealFactorsFunOfQuotHom, OrderHom.coe_mk, Subtype.mk_eq_mk, Subtype.coe_mk,\n  map_comap_of_surjective (Ideal.Quotient.mk J) Quotient.mk_surjective, map_map]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\n⊢ ↑{p | p ∣ I} ≃o ↑{p | p ∣ J}\n[PROOFSTEP]\nhave f_surj : Function.Surjective (f : R ⧸ I →+* A ⧸ J) := f.surjective\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nf_surj : Function.Surjective ↑↑f\n⊢ ↑{p | p ∣ I} ≃o ↑{p | p ∣ J}\n[PROOFSTEP]\nhave fsym_surj : Function.Surjective (f.symm : A ⧸ J →+* R ⧸ I) := f.symm.surjective\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nf_surj : Function.Surjective ↑↑f\nfsym_surj : Function.Surjective ↑↑(RingEquiv.symm f)\n⊢ ↑{p | p ∣ I} ≃o ↑{p | p ∣ J}\n[PROOFSTEP]\nrefine OrderIso.ofHomInv (idealFactorsFunOfQuotHom f_surj) (idealFactorsFunOfQuotHom fsym_surj) ?_ ?_\n[GOAL]\ncase refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nf_surj : Function.Surjective ↑↑f\nfsym_surj : Function.Surjective ↑↑(RingEquiv.symm f)\n⊢ OrderHom.comp ↑(idealFactorsFunOfQuotHom f_surj) ↑(idealFactorsFunOfQuotHom fsym_surj) = OrderHom.id\n[PROOFSTEP]\nhave := idealFactorsFunOfQuotHom_comp fsym_surj f_surj\n[GOAL]\ncase refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nf_surj : Function.Surjective ↑↑f\nfsym_surj : Function.Surjective ↑↑(RingEquiv.symm f)\nthis :\n  OrderHom.comp (idealFactorsFunOfQuotHom f_surj) (idealFactorsFunOfQuotHom fsym_surj) =\n    idealFactorsFunOfQuotHom (_ : Function.Surjective ↑(RingHom.comp ↑f ↑(RingEquiv.symm f)))\n⊢ OrderHom.comp ↑(idealFactorsFunOfQuotHom f_surj) ↑(idealFactorsFunOfQuotHom fsym_surj) = OrderHom.id\n[PROOFSTEP]\nsimp only [RingEquiv.comp_symm, idealFactorsFunOfQuotHom_id] at this \n[GOAL]\ncase refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nf_surj : Function.Surjective ↑↑f\nfsym_surj : Function.Surjective ↑↑(RingEquiv.symm f)\nthis : OrderHom.comp (idealFactorsFunOfQuotHom f_surj) (idealFactorsFunOfQuotHom fsym_surj) = OrderHom.id\n⊢ OrderHom.comp ↑(idealFactorsFunOfQuotHom f_surj) ↑(idealFactorsFunOfQuotHom fsym_surj) = OrderHom.id\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nf_surj : Function.Surjective ↑↑f\nfsym_surj : Function.Surjective ↑↑(RingEquiv.symm f)\nthis : OrderHom.comp (idealFactorsFunOfQuotHom f_surj) (idealFactorsFunOfQuotHom fsym_surj) = OrderHom.id\n⊢ OrderHom.comp ↑(idealFactorsFunOfQuotHom f_surj) ↑(idealFactorsFunOfQuotHom fsym_surj) =\n    OrderHom.comp (idealFactorsFunOfQuotHom f_surj) (idealFactorsFunOfQuotHom fsym_surj)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nf_surj : Function.Surjective ↑↑f\nfsym_surj : Function.Surjective ↑↑(RingEquiv.symm f)\n⊢ OrderHom.comp ↑(idealFactorsFunOfQuotHom fsym_surj) ↑(idealFactorsFunOfQuotHom f_surj) = OrderHom.id\n[PROOFSTEP]\nhave := idealFactorsFunOfQuotHom_comp f_surj fsym_surj\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nf_surj : Function.Surjective ↑↑f\nfsym_surj : Function.Surjective ↑↑(RingEquiv.symm f)\nthis :\n  OrderHom.comp (idealFactorsFunOfQuotHom fsym_surj) (idealFactorsFunOfQuotHom f_surj) =\n    idealFactorsFunOfQuotHom (_ : Function.Surjective ↑(RingHom.comp ↑(RingEquiv.symm f) ↑f))\n⊢ OrderHom.comp ↑(idealFactorsFunOfQuotHom fsym_surj) ↑(idealFactorsFunOfQuotHom f_surj) = OrderHom.id\n[PROOFSTEP]\nsimp only [RingEquiv.symm_comp, idealFactorsFunOfQuotHom_id] at this \n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nf_surj : Function.Surjective ↑↑f\nfsym_surj : Function.Surjective ↑↑(RingEquiv.symm f)\nthis : OrderHom.comp (idealFactorsFunOfQuotHom fsym_surj) (idealFactorsFunOfQuotHom f_surj) = OrderHom.id\n⊢ OrderHom.comp ↑(idealFactorsFunOfQuotHom fsym_surj) ↑(idealFactorsFunOfQuotHom f_surj) = OrderHom.id\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nf_surj : Function.Surjective ↑↑f\nfsym_surj : Function.Surjective ↑↑(RingEquiv.symm f)\nthis : OrderHom.comp (idealFactorsFunOfQuotHom fsym_surj) (idealFactorsFunOfQuotHom f_surj) = OrderHom.id\n⊢ OrderHom.comp ↑(idealFactorsFunOfQuotHom fsym_surj) ↑(idealFactorsFunOfQuotHom f_surj) =\n    OrderHom.comp (idealFactorsFunOfQuotHom fsym_surj) (idealFactorsFunOfQuotHom f_surj)\n[PROOFSTEP]\ncongr\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL✝ : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nL M : Ideal R\nhL : L ∣ I\nhM : M ∣ I\n⊢ ↑(↑(idealFactorsEquivOfQuotEquiv f) { val := L, property := hL }) ∣\n      ↑(↑(idealFactorsEquivOfQuotEquiv f) { val := M, property := hM }) ↔\n    L ∣ M\n[PROOFSTEP]\nsuffices\n  idealFactorsEquivOfQuotEquiv f ⟨M, hM⟩ ≤ idealFactorsEquivOfQuotEquiv f ⟨L, hL⟩ ↔\n    (⟨M, hM⟩ : {p : Ideal R | p ∣ I}) ≤ ⟨L, hL⟩\n  by rw [dvd_iff_le, dvd_iff_le, Subtype.coe_le_coe, this, Subtype.mk_le_mk]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL✝ : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nL M : Ideal R\nhL : L ∣ I\nhM : M ∣ I\nthis :\n  ↑(idealFactorsEquivOfQuotEquiv f) { val := M, property := hM } ≤\n      ↑(idealFactorsEquivOfQuotEquiv f) { val := L, property := hL } ↔\n    { val := M, property := hM } ≤ { val := L, property := hL }\n⊢ ↑(↑(idealFactorsEquivOfQuotEquiv f) { val := L, property := hL }) ∣\n      ↑(↑(idealFactorsEquivOfQuotEquiv f) { val := M, property := hM }) ↔\n    L ∣ M\n[PROOFSTEP]\nrw [dvd_iff_le, dvd_iff_le, Subtype.coe_le_coe, this, Subtype.mk_le_mk]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing A\ninst✝⁷ : Field K\ninst✝⁶ : IsDomain A\ninst✝⁵ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁴ : CommRing B\ninst✝³ : IsDomain B\ninst✝² : IsDedekindDomain B\nL✝ : Ideal B\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\nL M : Ideal R\nhL : L ∣ I\nhM : M ∣ I\n⊢ ↑(idealFactorsEquivOfQuotEquiv f) { val := M, property := hM } ≤\n      ↑(idealFactorsEquivOfQuotEquiv f) { val := L, property := hL } ↔\n    { val := M, property := hM } ≤ { val := L, property := hL }\n[PROOFSTEP]\nexact (idealFactorsEquivOfQuotEquiv f).le_iff_le\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\ninst✝⁷ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : IsDedekindDomain B\nL✝ : Ideal B\ninst✝³ : IsDomain R\ninst✝² : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : DecidableEq (Ideal A)\nhJ : J ≠ ⊥\nL : Ideal R\nhL : L ∈ normalizedFactors I\n⊢ ↑(↑(idealFactorsEquivOfQuotEquiv f) { val := L, property := (_ : L ∣ I) }) ∈ normalizedFactors J\n[PROOFSTEP]\nby_cases hI : I = ⊥\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\ninst✝⁷ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : IsDedekindDomain B\nL✝ : Ideal B\ninst✝³ : IsDomain R\ninst✝² : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : DecidableEq (Ideal A)\nhJ : J ≠ ⊥\nL : Ideal R\nhL : L ∈ normalizedFactors I\nhI : I = ⊥\n⊢ ↑(↑(idealFactorsEquivOfQuotEquiv f) { val := L, property := (_ : L ∣ I) }) ∈ normalizedFactors J\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase pos.h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\ninst✝⁷ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : IsDedekindDomain B\nL✝ : Ideal B\ninst✝³ : IsDomain R\ninst✝² : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : DecidableEq (Ideal A)\nhJ : J ≠ ⊥\nL : Ideal R\nhL : L ∈ normalizedFactors I\nhI : I = ⊥\n⊢ False\n[PROOFSTEP]\nrw [hI, bot_eq_zero, normalizedFactors_zero, ← Multiset.empty_eq_zero] at hL \n[GOAL]\ncase pos.h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\ninst✝⁷ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : IsDedekindDomain B\nL✝ : Ideal B\ninst✝³ : IsDomain R\ninst✝² : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : DecidableEq (Ideal A)\nhJ : J ≠ ⊥\nL : Ideal R\nhL : L ∈ ∅\nhI : I = ⊥\n⊢ False\n[PROOFSTEP]\nexact Finset.not_mem_empty _ hL\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\ninst✝⁷ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : IsDedekindDomain B\nL✝ : Ideal B\ninst✝³ : IsDomain R\ninst✝² : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : DecidableEq (Ideal A)\nhJ : J ≠ ⊥\nL : Ideal R\nhL : L ∈ normalizedFactors I\nhI : ¬I = ⊥\n⊢ ↑(↑(idealFactorsEquivOfQuotEquiv f) { val := L, property := (_ : L ∣ I) }) ∈ normalizedFactors J\n[PROOFSTEP]\nrefine\n  mem_normalizedFactors_factor_dvd_iso_of_mem_normalizedFactors hI hJ hL (d := (idealFactorsEquivOfQuotEquiv f).toEquiv)\n    ?_\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\ninst✝⁷ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : IsDedekindDomain B\nL✝ : Ideal B\ninst✝³ : IsDomain R\ninst✝² : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : DecidableEq (Ideal A)\nhJ : J ≠ ⊥\nL : Ideal R\nhL : L ∈ normalizedFactors I\nhI : ¬I = ⊥\n⊢ ∀ (l l' : { l // l ∣ I }),\n    ↑(↑(idealFactorsEquivOfQuotEquiv f).toEquiv l) ∣ ↑(↑(idealFactorsEquivOfQuotEquiv f).toEquiv l') ↔ ↑l ∣ ↑l'\n[PROOFSTEP]\nrintro ⟨l, hl⟩ ⟨l', hl'⟩\n[GOAL]\ncase neg.mk.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\ninst✝⁷ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : IsDedekindDomain B\nL✝ : Ideal B\ninst✝³ : IsDomain R\ninst✝² : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : DecidableEq (Ideal A)\nhJ : J ≠ ⊥\nL : Ideal R\nhL : L ∈ normalizedFactors I\nhI : ¬I = ⊥\nl : Ideal R\nhl : l ∣ I\nl' : Ideal R\nhl' : l' ∣ I\n⊢ ↑(↑(idealFactorsEquivOfQuotEquiv f).toEquiv { val := l, property := hl }) ∣\n      ↑(↑(idealFactorsEquivOfQuotEquiv f).toEquiv { val := l', property := hl' }) ↔\n    ↑{ val := l, property := hl } ∣ ↑{ val := l', property := hl' }\n[PROOFSTEP]\nrw [Subtype.coe_mk, Subtype.coe_mk]\n[GOAL]\ncase neg.mk.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\ninst✝⁷ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : IsDedekindDomain B\nL✝ : Ideal B\ninst✝³ : IsDomain R\ninst✝² : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : DecidableEq (Ideal A)\nhJ : J ≠ ⊥\nL : Ideal R\nhL : L ∈ normalizedFactors I\nhI : ¬I = ⊥\nl : Ideal R\nhl : l ∣ I\nl' : Ideal R\nhl' : l' ∣ I\n⊢ ↑(↑(idealFactorsEquivOfQuotEquiv f).toEquiv { val := l, property := hl }) ∣\n      ↑(↑(idealFactorsEquivOfQuotEquiv f).toEquiv { val := l', property := hl' }) ↔\n    ↑{ val := l, property := hl } ∣ ↑{ val := l', property := hl' }\n[PROOFSTEP]\napply idealFactorsEquivOfQuotEquiv_is_dvd_iso f\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\ninst✝⁷ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : IsDedekindDomain B\nL : Ideal B\ninst✝³ : IsDomain R\ninst✝² : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : DecidableEq (Ideal A)\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nj : ↑{M | M ∈ normalizedFactors J}\n⊢ ↑(↑(OrderIso.symm (idealFactorsEquivOfQuotEquiv f)) { val := ↑j, property := (_ : ↑j ∣ J) }) ∈\n    {L | L ∈ normalizedFactors I}\n[PROOFSTEP]\nrw [idealFactorsEquivOfQuotEquiv_symm]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\ninst✝⁷ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : IsDedekindDomain B\nL : Ideal B\ninst✝³ : IsDomain R\ninst✝² : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : DecidableEq (Ideal A)\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nj : ↑{M | M ∈ normalizedFactors J}\n⊢ ↑(↑(idealFactorsEquivOfQuotEquiv (RingEquiv.symm f)) { val := ↑j, property := (_ : ↑j ∣ J) }) ∈\n    {L | L ∈ normalizedFactors I}\n[PROOFSTEP]\nexact idealFactorsEquivOfQuotEquiv_mem_normalizedFactors_of_mem_normalizedFactors f.symm hI j.prop\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\ninst✝⁷ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : IsDedekindDomain B\nL : Ideal B\ninst✝³ : IsDomain R\ninst✝² : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : DecidableEq (Ideal A)\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nx✝ : ↑{L | L ∈ normalizedFactors I}\nj : Ideal R\nhj : j ∈ {L | L ∈ normalizedFactors I}\n⊢ (fun j =>\n        { val := ↑(↑(OrderIso.symm (idealFactorsEquivOfQuotEquiv f)) { val := ↑j, property := (_ : ↑j ∣ J) }),\n          property :=\n            (_ :\n              ↑(↑(OrderIso.symm (idealFactorsEquivOfQuotEquiv f)) { val := ↑j, property := (_ : ↑j ∣ J) }) ∈\n                {L | L ∈ normalizedFactors I}) })\n      ((fun j =>\n          { val := ↑(↑(idealFactorsEquivOfQuotEquiv f) { val := ↑j, property := (_ : ↑j ∣ I) }),\n            property :=\n              (_ :\n                ↑(↑(idealFactorsEquivOfQuotEquiv f) { val := ↑j, property := (_ : ↑j ∣ I) }) ∈ normalizedFactors J) })\n        { val := j, property := hj }) =\n    { val := j, property := hj }\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Field K\ninst✝⁸ : IsDomain A\ninst✝⁷ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁶ : CommRing B\ninst✝⁵ : IsDomain B\ninst✝⁴ : IsDedekindDomain B\nL : Ideal B\ninst✝³ : IsDomain R\ninst✝² : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : DecidableEq (Ideal A)\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nx✝ : ↑{M | M ∈ normalizedFactors J}\nj : Ideal A\nhj : j ∈ {M | M ∈ normalizedFactors J}\n⊢ (fun j =>\n        { val := ↑(↑(idealFactorsEquivOfQuotEquiv f) { val := ↑j, property := (_ : ↑j ∣ I) }),\n          property :=\n            (_ : ↑(↑(idealFactorsEquivOfQuotEquiv f) { val := ↑j, property := (_ : ↑j ∣ I) }) ∈ normalizedFactors J) })\n      ((fun j =>\n          { val := ↑(↑(OrderIso.symm (idealFactorsEquivOfQuotEquiv f)) { val := ↑j, property := (_ : ↑j ∣ J) }),\n            property :=\n              (_ :\n                ↑(↑(OrderIso.symm (idealFactorsEquivOfQuotEquiv f)) { val := ↑j, property := (_ : ↑j ∣ J) }) ∈\n                  {L | L ∈ normalizedFactors I}) })\n        { val := j, property := hj }) =\n    { val := j, property := hj }\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹³ : CommRing R\ninst✝¹² : CommRing A\ninst✝¹¹ : Field K\ninst✝¹⁰ : IsDomain A\ninst✝⁹ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁸ : CommRing B\ninst✝⁷ : IsDomain B\ninst✝⁶ : IsDedekindDomain B\nL✝ : Ideal B\ninst✝⁵ : IsDomain R\ninst✝⁴ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝³ : DecidableEq (Ideal R)\ninst✝² : DecidableEq (Ideal A)\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nL : Ideal R\nhL : L ∈ normalizedFactors I\n⊢ multiplicity (↑(↑(normalizedFactorsEquivOfQuotEquiv f hI hJ) { val := L, property := hL })) J = multiplicity L I\n[PROOFSTEP]\nrw [normalizedFactorsEquivOfQuotEquiv, Equiv.coe_fn_mk, Subtype.coe_mk]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹³ : CommRing R\ninst✝¹² : CommRing A\ninst✝¹¹ : Field K\ninst✝¹⁰ : IsDomain A\ninst✝⁹ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁸ : CommRing B\ninst✝⁷ : IsDomain B\ninst✝⁶ : IsDedekindDomain B\nL✝ : Ideal B\ninst✝⁵ : IsDomain R\ninst✝⁴ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝³ : DecidableEq (Ideal R)\ninst✝² : DecidableEq (Ideal A)\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nL : Ideal R\nhL : L ∈ normalizedFactors I\n⊢ multiplicity\n      (↑(↑(idealFactorsEquivOfQuotEquiv f)\n          { val := ↑{ val := L, property := hL }, property := (_ : ↑{ val := L, property := hL } ∣ I) }))\n      J =\n    multiplicity L I\n[PROOFSTEP]\nrefine\n  multiplicity_factor_dvd_iso_eq_multiplicity_of_mem_normalizedFactors hI hJ hL (d :=\n    (idealFactorsEquivOfQuotEquiv f).toEquiv) ?_\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹³ : CommRing R\ninst✝¹² : CommRing A\ninst✝¹¹ : Field K\ninst✝¹⁰ : IsDomain A\ninst✝⁹ : IsDedekindDomain A\nI : Ideal R\nJ : Ideal A\nB : Type u_4\ninst✝⁸ : CommRing B\ninst✝⁷ : IsDomain B\ninst✝⁶ : IsDedekindDomain B\nL✝ : Ideal B\ninst✝⁵ : IsDomain R\ninst✝⁴ : IsDedekindDomain R\nf : R ⧸ I ≃+* A ⧸ J\ninst✝³ : DecidableEq (Ideal R)\ninst✝² : DecidableEq (Ideal A)\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhI : I ≠ ⊥\nhJ : J ≠ ⊥\nL : Ideal R\nhL : L ∈ normalizedFactors I\n⊢ ∀ (l l' : { l // l ∣ I }),\n    ↑(↑(idealFactorsEquivOfQuotEquiv f).toEquiv l) ∣ ↑(↑(idealFactorsEquivOfQuotEquiv f).toEquiv l') ↔ ↑l ∣ ↑l'\n[PROOFSTEP]\nexact fun ⟨l, hl⟩ ⟨l', hl'⟩ => idealFactorsEquivOfQuotEquiv_is_dvd_iso f hl hl'\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝³ : CommRing R\ninst✝² : CommRing A\ninst✝¹ : Field K\ninst✝ : IsDomain A\nI J : Ideal R\nh : ∀ (P : Ideal R), I ≤ P → J ≤ P → ¬IsPrime P\n⊢ I ⊔ J = ⊤\n[PROOFSTEP]\nby_contra hIJ\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝³ : CommRing R\ninst✝² : CommRing A\ninst✝¹ : Field K\ninst✝ : IsDomain A\nI J : Ideal R\nh : ∀ (P : Ideal R), I ≤ P → J ≤ P → ¬IsPrime P\nhIJ : ¬I ⊔ J = ⊤\n⊢ False\n[PROOFSTEP]\nobtain ⟨P, hP, hIJ⟩ := Ideal.exists_le_maximal _ hIJ\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝³ : CommRing R\ninst✝² : CommRing A\ninst✝¹ : Field K\ninst✝ : IsDomain A\nI J : Ideal R\nh : ∀ (P : Ideal R), I ≤ P → J ≤ P → ¬IsPrime P\nhIJ✝ : ¬I ⊔ J = ⊤\nP : Ideal R\nhP : IsMaximal P\nhIJ : I ⊔ J ≤ P\n⊢ False\n[PROOFSTEP]\nexact h P (le_trans le_sup_left hIJ) (le_trans le_sup_right hIJ) hP.isPrime\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : Ideal R\nhI : IsPrime I\na b : R\nn : ℕ\nh : a * b ∈ I ^ n\n⊢ a ∈ I ∨ b ∈ I ^ n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : Ideal R\nhI : IsPrime I\na b : R\nh : a * b ∈ I ^ Nat.zero\n⊢ a ∈ I ∨ b ∈ I ^ Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : Ideal R\nhI : IsPrime I\na b : R\nn✝ : ℕ\nh : a * b ∈ I ^ Nat.succ n✝\n⊢ a ∈ I ∨ b ∈ I ^ Nat.succ n✝\n[PROOFSTEP]\nby_cases hI0 : I = ⊥\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : Ideal R\nhI : IsPrime I\na b : R\nn✝ : ℕ\nh : a * b ∈ I ^ Nat.succ n✝\nhI0 : I = ⊥\n⊢ a ∈ I ∨ b ∈ I ^ Nat.succ n✝\n[PROOFSTEP]\nsimpa [pow_succ, hI0] using h\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : Ideal R\nhI : IsPrime I\na b : R\nn✝ : ℕ\nh : a * b ∈ I ^ Nat.succ n✝\nhI0 : ¬I = ⊥\n⊢ a ∈ I ∨ b ∈ I ^ Nat.succ n✝\n[PROOFSTEP]\nsimp only [← Submodule.span_singleton_le_iff_mem, Ideal.submodule_span_eq, ← Ideal.dvd_iff_le, ←\n  Ideal.span_singleton_mul_span_singleton] at h ⊢\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : Ideal R\nhI : IsPrime I\na b : R\nn✝ : ℕ\nhI0 : ¬I = ⊥\nh : I ^ Nat.succ n✝ ∣ span {a} * span {b}\n⊢ I ∣ span {a} ∨ I ^ Nat.succ n✝ ∣ span {b}\n[PROOFSTEP]\nby_cases ha : I ∣ span { a }\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : Ideal R\nhI : IsPrime I\na b : R\nn✝ : ℕ\nhI0 : ¬I = ⊥\nh : I ^ Nat.succ n✝ ∣ span {a} * span {b}\nha : I ∣ span {a}\n⊢ I ∣ span {a} ∨ I ^ Nat.succ n✝ ∣ span {b}\n[PROOFSTEP]\nexact Or.inl ha\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : Ideal R\nhI : IsPrime I\na b : R\nn✝ : ℕ\nhI0 : ¬I = ⊥\nh : I ^ Nat.succ n✝ ∣ span {a} * span {b}\nha : ¬I ∣ span {a}\n⊢ I ∣ span {a} ∨ I ^ Nat.succ n✝ ∣ span {b}\n[PROOFSTEP]\nrw [mul_comm] at h \n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : Ideal R\nhI : IsPrime I\na b : R\nn✝ : ℕ\nhI0 : ¬I = ⊥\nh : I ^ Nat.succ n✝ ∣ span {b} * span {a}\nha : ¬I ∣ span {a}\n⊢ I ∣ span {a} ∨ I ^ Nat.succ n✝ ∣ span {b}\n[PROOFSTEP]\nexact Or.inr (Prime.pow_dvd_of_dvd_mul_right ((Ideal.prime_iff_isPrime hI0).mpr hI) _ ha h)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K✝\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J K : Ideal R\ncoprime : ∀ (P : Ideal R), J ≤ P → K ≤ P → ¬IsPrime P\nhJ : I ≤ J\nhK : I ≤ K\n⊢ I ≤ J * K\n[PROOFSTEP]\nsimp only [← Ideal.dvd_iff_le] at coprime hJ hK ⊢\n[GOAL]\nR : Type u_1\nA : Type u_2\nK✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K✝\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J K : Ideal R\ncoprime : ∀ (P : Ideal R), P ∣ J → P ∣ K → ¬IsPrime P\nhJ : J ∣ I\nhK : K ∣ I\n⊢ J * K ∣ I\n[PROOFSTEP]\nby_cases hJ0 : J = 0\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K✝\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J K : Ideal R\ncoprime : ∀ (P : Ideal R), P ∣ J → P ∣ K → ¬IsPrime P\nhJ : J ∣ I\nhK : K ∣ I\nhJ0 : J = 0\n⊢ J * K ∣ I\n[PROOFSTEP]\nsimpa only [hJ0, zero_mul] using hJ\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K✝\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI J K : Ideal R\ncoprime : ∀ (P : Ideal R), P ∣ J → P ∣ K → ¬IsPrime P\nhJ : J ∣ I\nhK : K ∣ I\nhJ0 : ¬J = 0\n⊢ J * K ∣ I\n[PROOFSTEP]\nobtain ⟨I', rfl⟩ := hK\n[GOAL]\ncase neg.intro\nR : Type u_1\nA : Type u_2\nK✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K✝\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nJ K : Ideal R\ncoprime : ∀ (P : Ideal R), P ∣ J → P ∣ K → ¬IsPrime P\nhJ0 : ¬J = 0\nI' : Ideal R\nhJ : J ∣ K * I'\n⊢ J * K ∣ K * I'\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase neg.intro\nR : Type u_1\nA : Type u_2\nK✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K✝\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nJ K : Ideal R\ncoprime : ∀ (P : Ideal R), P ∣ J → P ∣ K → ¬IsPrime P\nhJ0 : ¬J = 0\nI' : Ideal R\nhJ : J ∣ K * I'\n⊢ K * J ∣ K * I'\n[PROOFSTEP]\nrefine mul_dvd_mul_left K (UniqueFactorizationMonoid.dvd_of_dvd_mul_right_of_no_prime_factors (b := K) hJ0 ?_ hJ)\n[GOAL]\ncase neg.intro\nR : Type u_1\nA : Type u_2\nK✝ : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K✝\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nJ K : Ideal R\ncoprime : ∀ (P : Ideal R), P ∣ J → P ∣ K → ¬IsPrime P\nhJ0 : ¬J = 0\nI' : Ideal R\nhJ : J ∣ K * I'\n⊢ ∀ {d : Ideal R}, d ∣ J → d ∣ K → ¬Prime d\n[PROOFSTEP]\nexact fun hPJ hPK => mt Ideal.isPrime_of_prime (coprime _ hPJ hPK)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI P : Ideal R\nhP : IsPrime P\nn : ℕ\nh : I ^ n ≤ P\n⊢ I ≤ P\n[PROOFSTEP]\nby_cases hP0 : P = ⊥\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI P : Ideal R\nhP : IsPrime P\nn : ℕ\nh : I ^ n ≤ P\nhP0 : P = ⊥\n⊢ I ≤ P\n[PROOFSTEP]\nsimp only [hP0, le_bot_iff] at h ⊢\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI P : Ideal R\nhP : IsPrime P\nn : ℕ\nhP0 : P = ⊥\nh : I ^ n = ⊥\n⊢ I = ⊥\n[PROOFSTEP]\nexact pow_eq_zero h\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI P : Ideal R\nhP : IsPrime P\nn : ℕ\nh : I ^ n ≤ P\nhP0 : ¬P = ⊥\n⊢ I ≤ P\n[PROOFSTEP]\nrw [← Ideal.dvd_iff_le] at h ⊢\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI P : Ideal R\nhP : IsPrime P\nn : ℕ\nh : P ∣ I ^ n\nhP0 : ¬P = ⊥\n⊢ P ∣ I\n[PROOFSTEP]\nexact ((Ideal.prime_iff_isPrime hP0).mpr hP).dvd_of_dvd_pow h\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nf : ι → Ideal R\nP : Ideal R\nhP : IsPrime P\n⊢ ∏ i in s, f i ≤ P ↔ ∃ i, i ∈ s ∧ f i ≤ P\n[PROOFSTEP]\nby_cases hP0 : P = ⊥\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nf : ι → Ideal R\nP : Ideal R\nhP : IsPrime P\nhP0 : P = ⊥\n⊢ ∏ i in s, f i ≤ P ↔ ∃ i, i ∈ s ∧ f i ≤ P\n[PROOFSTEP]\nsimp only [hP0, le_bot_iff]\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nf : ι → Ideal R\nP : Ideal R\nhP : IsPrime P\nhP0 : P = ⊥\n⊢ ∏ i in s, f i = ⊥ ↔ ∃ i, i ∈ s ∧ f i = ⊥\n[PROOFSTEP]\nrw [← Ideal.zero_eq_bot, Finset.prod_eq_zero_iff]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nf : ι → Ideal R\nP : Ideal R\nhP : IsPrime P\nhP0 : ¬P = ⊥\n⊢ ∏ i in s, f i ≤ P ↔ ∃ i, i ∈ s ∧ f i ≤ P\n[PROOFSTEP]\nsimp only [← Ideal.dvd_iff_le]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nf : ι → Ideal R\nP : Ideal R\nhP : IsPrime P\nhP0 : ¬P = ⊥\n⊢ P ∣ ∏ i in s, f i ↔ ∃ i, i ∈ s ∧ P ∣ f i\n[PROOFSTEP]\nexact ((Ideal.prime_iff_isPrime hP0).mpr hP).dvd_finset_prod_iff _\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), i ∈ s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → f i ≠ f j\n⊢ (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\n[PROOFSTEP]\nletI := Classical.decEq ι\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), i ∈ s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → f i ≠ f j\nthis : DecidableEq ι := Classical.decEq ι\n⊢ (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\n[PROOFSTEP]\nrevert prime coprime\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis : DecidableEq ι := Classical.decEq ι\n⊢ (∀ (i : ι), i ∈ s → Prime (f i)) →\n    (∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → f i ≠ f j) → (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\n[PROOFSTEP]\nrefine s.induction ?_ ?_\n[GOAL]\ncase refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis : DecidableEq ι := Classical.decEq ι\n⊢ (∀ (i : ι), i ∈ ∅ → Prime (f i)) →\n    (∀ (i : ι), i ∈ ∅ → ∀ (j : ι), j ∈ ∅ → i ≠ j → f i ≠ f j) → (Finset.inf ∅ fun i => f i ^ e i) = ∏ i in ∅, f i ^ e i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis : DecidableEq ι := Classical.decEq ι\n⊢ ∀ ⦃a : ι⦄ {s : Finset ι},\n    ¬a ∈ s →\n      ((∀ (i : ι), i ∈ s → Prime (f i)) →\n          (∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → f i ≠ f j) →\n            (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i) →\n        (∀ (i : ι), i ∈ insert a s → Prime (f i)) →\n          (∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j) →\n            (Finset.inf (insert a s) fun i => f i ^ e i) = ∏ i in insert a s, f i ^ e i\n[PROOFSTEP]\nintro a s ha ih prime coprime\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nih :\n  (∀ (i : ι), i ∈ s → Prime (f i)) →\n    (∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → f i ≠ f j) → (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\n⊢ (Finset.inf (insert a s) fun i => f i ^ e i) = ∏ i in insert a s, f i ^ e i\n[PROOFSTEP]\nspecialize\n  ih (fun i hi => prime i (Finset.mem_insert_of_mem hi)) fun i hi j hj =>\n    coprime i (Finset.mem_insert_of_mem hi) j (Finset.mem_insert_of_mem hj)\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\n⊢ (Finset.inf (insert a s) fun i => f i ^ e i) = ∏ i in insert a s, f i ^ e i\n[PROOFSTEP]\nrw [Finset.inf_insert, Finset.prod_insert ha, ih]\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\n⊢ f a ^ e a ⊓ ∏ i in s, f i ^ e i = f a ^ e a * ∏ x in s, f x ^ e x\n[PROOFSTEP]\nrefine' le_antisymm (Ideal.le_mul_of_no_prime_factors _ inf_le_left inf_le_right) Ideal.mul_le_inf\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\n⊢ ∀ (P : Ideal R), f a ^ e a ≤ P → ∏ x in s, f x ^ e x ≤ P → ¬IsPrime P\n[PROOFSTEP]\nintro P hPa hPs hPp\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\nP : Ideal R\nhPa : f a ^ e a ≤ P\nhPs : ∏ x in s, f x ^ e x ≤ P\nhPp : IsPrime P\n⊢ False\n[PROOFSTEP]\nhaveI := hPp\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis✝ : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\nP : Ideal R\nhPa : f a ^ e a ≤ P\nhPs : ∏ x in s, f x ^ e x ≤ P\nhPp this : IsPrime P\n⊢ False\n[PROOFSTEP]\nobtain ⟨b, hb, hPb⟩ := Ideal.prod_le_prime.mp hPs\n[GOAL]\ncase refine_2.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis✝ : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\nP : Ideal R\nhPa : f a ^ e a ≤ P\nhPs : ∏ x in s, f x ^ e x ≤ P\nhPp this : IsPrime P\nb : ι\nhb : b ∈ s\nhPb : f b ^ e b ≤ P\n⊢ False\n[PROOFSTEP]\nhaveI := Ideal.isPrime_of_prime (prime a (Finset.mem_insert_self a s))\n[GOAL]\ncase refine_2.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis✝¹ : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\nP : Ideal R\nhPa : f a ^ e a ≤ P\nhPs : ∏ x in s, f x ^ e x ≤ P\nhPp this✝ : IsPrime P\nb : ι\nhb : b ∈ s\nhPb : f b ^ e b ≤ P\nthis : IsPrime (f a)\n⊢ False\n[PROOFSTEP]\nhaveI := Ideal.isPrime_of_prime (prime b (Finset.mem_insert_of_mem hb))\n[GOAL]\ncase refine_2.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis✝² : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\nP : Ideal R\nhPa : f a ^ e a ≤ P\nhPs : ∏ x in s, f x ^ e x ≤ P\nhPp this✝¹ : IsPrime P\nb : ι\nhb : b ∈ s\nhPb : f b ^ e b ≤ P\nthis✝ : IsPrime (f a)\nthis : IsPrime (f b)\n⊢ False\n[PROOFSTEP]\nrefine coprime a (Finset.mem_insert_self a s) b (Finset.mem_insert_of_mem hb) ?_ ?_\n[GOAL]\ncase refine_2.intro.intro.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis✝² : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\nP : Ideal R\nhPa : f a ^ e a ≤ P\nhPs : ∏ x in s, f x ^ e x ≤ P\nhPp this✝¹ : IsPrime P\nb : ι\nhb : b ∈ s\nhPb : f b ^ e b ≤ P\nthis✝ : IsPrime (f a)\nthis : IsPrime (f b)\n⊢ a ≠ b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine_2.intro.intro.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis✝² : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\nP : Ideal R\nhPa : f a ^ e a ≤ P\nhPs : ∏ x in s, f x ^ e x ≤ P\nhPp this✝¹ : IsPrime P\nthis✝ : IsPrime (f a)\nhb : a ∈ s\nhPb : f a ^ e a ≤ P\nthis : IsPrime (f a)\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase refine_2.intro.intro.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis✝² : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\nP : Ideal R\nhPa : f a ^ e a ≤ P\nhPs : ∏ x in s, f x ^ e x ≤ P\nhPp this✝¹ : IsPrime P\nb : ι\nhb : b ∈ s\nhPb : f b ^ e b ≤ P\nthis✝ : IsPrime (f a)\nthis : IsPrime (f b)\n⊢ f a = f b\n[PROOFSTEP]\nrefine\n  ((Ring.DimensionLeOne.prime_le_prime_iff_eq ?_).mp (Ideal.le_of_pow_le_prime hPa)).trans\n    ((Ring.DimensionLeOne.prime_le_prime_iff_eq ?_).mp (Ideal.le_of_pow_le_prime hPb)).symm\n[GOAL]\ncase refine_2.intro.intro.refine_2.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis✝² : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\nP : Ideal R\nhPa : f a ^ e a ≤ P\nhPs : ∏ x in s, f x ^ e x ≤ P\nhPp this✝¹ : IsPrime P\nb : ι\nhb : b ∈ s\nhPb : f b ^ e b ≤ P\nthis✝ : IsPrime (f a)\nthis : IsPrime (f b)\n⊢ f a ≠ ⊥\ncase refine_2.intro.intro.refine_2.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis✝² : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\nP : Ideal R\nhPa : f a ^ e a ≤ P\nhPs : ∏ x in s, f x ^ e x ≤ P\nhPp this✝¹ : IsPrime P\nb : ι\nhb : b ∈ s\nhPb : f b ^ e b ≤ P\nthis✝ : IsPrime (f a)\nthis : IsPrime (f b)\n⊢ f b ≠ ⊥\n[PROOFSTEP]\nexact (prime a (Finset.mem_insert_self a s)).ne_zero\n[GOAL]\ncase refine_2.intro.intro.refine_2.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns✝ : Finset ι\nf : ι → Ideal R\ne : ι → ℕ\nthis✝² : DecidableEq ι := Classical.decEq ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nprime : ∀ (i : ι), i ∈ insert a s → Prime (f i)\ncoprime : ∀ (i : ι), i ∈ insert a s → ∀ (j : ι), j ∈ insert a s → i ≠ j → f i ≠ f j\nih : (Finset.inf s fun i => f i ^ e i) = ∏ i in s, f i ^ e i\nP : Ideal R\nhPa : f a ^ e a ≤ P\nhPs : ∏ x in s, f x ^ e x ≤ P\nhPp this✝¹ : IsPrime P\nb : ι\nhb : b ∈ s\nhPb : f b ^ e b ≤ P\nthis✝ : IsPrime (f a)\nthis : IsPrime (f b)\n⊢ f b ≠ ⊥\n[PROOFSTEP]\nexact (prime b (Finset.mem_insert_of_mem hb)).ne_zero\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nι : Type u_4\ninst✝ : Fintype ι\nI : Ideal R\nP : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), Prime (P i)\ncoprime : ∀ (i j : ι), i ≠ j → P i ≠ P j\nprod_eq : ∏ i : ι, P i ^ e i = I\n⊢ I = ⨅ (i : ι), P i ^ e i\n[PROOFSTEP]\nsimp only [← prod_eq, Finset.inf_eq_iInf, Finset.mem_univ, ciInf_pos, ←\n  IsDedekindDomain.inf_prime_pow_eq_prod _ _ _ (fun i _ => prime i) fun i _ j _ => coprime i j]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nι : Type u_4\ninst✝ : Fintype ι\nI : Ideal R\nP : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), Prime (P i)\ncoprime : ∀ (i j : ι), i ≠ j → P i ≠ P j\nprod_eq : ∏ i : ι, P i ^ e i = I\ni j : ι\nhij : i ≠ j\n⊢ ∀ (P_1 : Ideal R), P i ^ e i ≤ P_1 → P j ^ e j ≤ P_1 → ¬IsPrime P_1\n[PROOFSTEP]\nintro P hPi hPj hPp\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nι : Type u_4\ninst✝ : Fintype ι\nI : Ideal R\nP✝ : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), Prime (P✝ i)\ncoprime : ∀ (i j : ι), i ≠ j → P✝ i ≠ P✝ j\nprod_eq : ∏ i : ι, P✝ i ^ e i = I\ni j : ι\nhij : i ≠ j\nP : Ideal R\nhPi : P✝ i ^ e i ≤ P\nhPj : P✝ j ^ e j ≤ P\nhPp : IsPrime P\n⊢ False\n[PROOFSTEP]\nhaveI := hPp\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nι : Type u_4\ninst✝ : Fintype ι\nI : Ideal R\nP✝ : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), Prime (P✝ i)\ncoprime : ∀ (i j : ι), i ≠ j → P✝ i ≠ P✝ j\nprod_eq : ∏ i : ι, P✝ i ^ e i = I\ni j : ι\nhij : i ≠ j\nP : Ideal R\nhPi : P✝ i ^ e i ≤ P\nhPj : P✝ j ^ e j ≤ P\nhPp this : IsPrime P\n⊢ False\n[PROOFSTEP]\nhaveI := Ideal.isPrime_of_prime (prime i)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nι : Type u_4\ninst✝ : Fintype ι\nI : Ideal R\nP✝ : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), Prime (P✝ i)\ncoprime : ∀ (i j : ι), i ≠ j → P✝ i ≠ P✝ j\nprod_eq : ∏ i : ι, P✝ i ^ e i = I\ni j : ι\nhij : i ≠ j\nP : Ideal R\nhPi : P✝ i ^ e i ≤ P\nhPj : P✝ j ^ e j ≤ P\nhPp this✝ : IsPrime P\nthis : IsPrime (P✝ i)\n⊢ False\n[PROOFSTEP]\nhaveI := Ideal.isPrime_of_prime (prime j)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nι : Type u_4\ninst✝ : Fintype ι\nI : Ideal R\nP✝ : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), Prime (P✝ i)\ncoprime : ∀ (i j : ι), i ≠ j → P✝ i ≠ P✝ j\nprod_eq : ∏ i : ι, P✝ i ^ e i = I\ni j : ι\nhij : i ≠ j\nP : Ideal R\nhPi : P✝ i ^ e i ≤ P\nhPj : P✝ j ^ e j ≤ P\nhPp this✝¹ : IsPrime P\nthis✝ : IsPrime (P✝ i)\nthis : IsPrime (P✝ j)\n⊢ False\n[PROOFSTEP]\nrefine coprime i j hij ?_\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nι : Type u_4\ninst✝ : Fintype ι\nI : Ideal R\nP✝ : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), Prime (P✝ i)\ncoprime : ∀ (i j : ι), i ≠ j → P✝ i ≠ P✝ j\nprod_eq : ∏ i : ι, P✝ i ^ e i = I\ni j : ι\nhij : i ≠ j\nP : Ideal R\nhPi : P✝ i ^ e i ≤ P\nhPj : P✝ j ^ e j ≤ P\nhPp this✝¹ : IsPrime P\nthis✝ : IsPrime (P✝ i)\nthis : IsPrime (P✝ j)\n⊢ P✝ i = P✝ j\n[PROOFSTEP]\nrefine\n  ((Ring.DimensionLeOne.prime_le_prime_iff_eq ?_).mp (Ideal.le_of_pow_le_prime hPi)).trans\n    ((Ring.DimensionLeOne.prime_le_prime_iff_eq ?_).mp (Ideal.le_of_pow_le_prime hPj)).symm\n[GOAL]\ncase refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nι : Type u_4\ninst✝ : Fintype ι\nI : Ideal R\nP✝ : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), Prime (P✝ i)\ncoprime : ∀ (i j : ι), i ≠ j → P✝ i ≠ P✝ j\nprod_eq : ∏ i : ι, P✝ i ^ e i = I\ni j : ι\nhij : i ≠ j\nP : Ideal R\nhPi : P✝ i ^ e i ≤ P\nhPj : P✝ j ^ e j ≤ P\nhPp this✝¹ : IsPrime P\nthis✝ : IsPrime (P✝ i)\nthis : IsPrime (P✝ j)\n⊢ P✝ i ≠ ⊥\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nι : Type u_4\ninst✝ : Fintype ι\nI : Ideal R\nP✝ : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), Prime (P✝ i)\ncoprime : ∀ (i j : ι), i ≠ j → P✝ i ≠ P✝ j\nprod_eq : ∏ i : ι, P✝ i ^ e i = I\ni j : ι\nhij : i ≠ j\nP : Ideal R\nhPi : P✝ i ^ e i ≤ P\nhPj : P✝ j ^ e j ≤ P\nhPp this✝¹ : IsPrime P\nthis✝ : IsPrime (P✝ i)\nthis : IsPrime (P✝ j)\n⊢ P✝ j ≠ ⊥\n[PROOFSTEP]\nexact (prime i).ne_zero\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Field K\ninst✝³ : IsDomain A\ninst✝² : IsDomain R\ninst✝¹ : IsDedekindDomain R\nι : Type u_4\ninst✝ : Fintype ι\nI : Ideal R\nP✝ : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), Prime (P✝ i)\ncoprime : ∀ (i j : ι), i ≠ j → P✝ i ≠ P✝ j\nprod_eq : ∏ i : ι, P✝ i ^ e i = I\ni j : ι\nhij : i ≠ j\nP : Ideal R\nhPi : P✝ i ^ e i ≤ P\nhPj : P✝ j ^ e j ≤ P\nhPp this✝¹ : IsPrime P\nthis✝ : IsPrime (P✝ i)\nthis : IsPrime (P✝ j)\n⊢ P✝ j ≠ ⊥\n[PROOFSTEP]\nexact (prime j).ne_zero\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nI : Ideal R\nhI : I ≠ ⊥\n⊢ Multiset.prod (Multiset.map (fun P => P) (factors I)) = Multiset.prod (factors I)\n[PROOFSTEP]\nrw [Multiset.map_id']\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nP : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), i ∈ s → Prime (P i)\ncoprime : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → P i ≠ P j\nx : (i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i\n⊢ ∃ y, ∀ (i : ι) (hi : i ∈ s), ↑(Ideal.Quotient.mk (P i ^ e i)) y = x { val := i, property := hi }\n[PROOFSTEP]\nlet f := IsDedekindDomain.quotientEquivPiOfFinsetProdEq _ P e prime coprime rfl\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nP : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), i ∈ s → Prime (P i)\ncoprime : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → P i ≠ P j\nx : (i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i\nf : R ⧸ ∏ i in s, P i ^ e i ≃+* ((i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i) :=\n  quotientEquivPiOfFinsetProdEq (∏ i in s, P i ^ e i) P e prime coprime (_ : ∏ i in s, P i ^ e i = ∏ i in s, P i ^ e i)\n⊢ ∃ y, ∀ (i : ι) (hi : i ∈ s), ↑(Ideal.Quotient.mk (P i ^ e i)) y = x { val := i, property := hi }\n[PROOFSTEP]\nobtain ⟨y, rfl⟩ := f.surjective x\n[GOAL]\ncase intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nP : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), i ∈ s → Prime (P i)\ncoprime : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → P i ≠ P j\nf : R ⧸ ∏ i in s, P i ^ e i ≃+* ((i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i) :=\n  quotientEquivPiOfFinsetProdEq (∏ i in s, P i ^ e i) P e prime coprime (_ : ∏ i in s, P i ^ e i = ∏ i in s, P i ^ e i)\ny : R ⧸ ∏ i in s, P i ^ e i\n⊢ ∃ y_1, ∀ (i : ι) (hi : i ∈ s), ↑(Ideal.Quotient.mk (P i ^ e i)) y_1 = ↑f y { val := i, property := hi }\n[PROOFSTEP]\nobtain ⟨z, rfl⟩ := Ideal.Quotient.mk_surjective y\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nP : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), i ∈ s → Prime (P i)\ncoprime : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → P i ≠ P j\nf : R ⧸ ∏ i in s, P i ^ e i ≃+* ((i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i) :=\n  quotientEquivPiOfFinsetProdEq (∏ i in s, P i ^ e i) P e prime coprime (_ : ∏ i in s, P i ^ e i = ∏ i in s, P i ^ e i)\nz : R\n⊢ ∃ y,\n    ∀ (i : ι) (hi : i ∈ s),\n      ↑(Ideal.Quotient.mk (P i ^ e i)) y =\n        ↑f (↑(Ideal.Quotient.mk (∏ i in s, P i ^ e i)) z) { val := i, property := hi }\n[PROOFSTEP]\nexact ⟨z, fun i _hi => rfl⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nP : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), i ∈ s → Prime (P i)\ncoprime : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → P i ≠ P j\nx : { x // x ∈ s } → R\n⊢ ∃ y, ∀ (i : ι) (hi : i ∈ s), y - x { val := i, property := hi } ∈ P i ^ e i\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := IsDedekindDomain.exists_representative_mod_finset P e prime coprime fun i => Ideal.Quotient.mk _ (x i)\n[GOAL]\ncase intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Field K\ninst✝² : IsDomain A\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nι : Type u_4\ns : Finset ι\nP : ι → Ideal R\ne : ι → ℕ\nprime : ∀ (i : ι), i ∈ s → Prime (P i)\ncoprime : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → P i ≠ P j\nx : { x // x ∈ s } → R\ny : R\nhy :\n  ∀ (i : ι) (hi : i ∈ s),\n    ↑(Ideal.Quotient.mk (P i ^ e i)) y =\n      ↑(Ideal.Quotient.mk (P ↑{ val := i, property := hi } ^ e ↑{ val := i, property := hi }))\n        (x { val := i, property := hi })\n⊢ ∃ y, ∀ (i : ι) (hi : i ∈ s), y - x { val := i, property := hi } ∈ P i ^ e i\n[PROOFSTEP]\nexact ⟨y, fun i hi => Ideal.Quotient.eq.mp (hy i hi)⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ normalizedFactors b\n⊢ span {a} ∈ normalizedFactors (span {b})\n[PROOFSTEP]\nby_cases hb : b = 0\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ normalizedFactors b\nhb : b = 0\n⊢ span {a} ∈ normalizedFactors (span {b})\n[PROOFSTEP]\nrw [Ideal.span_singleton_eq_bot.mpr hb, bot_eq_zero, normalizedFactors_zero]\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ normalizedFactors b\nhb : b = 0\n⊢ span {a} ∈ 0\n[PROOFSTEP]\nrw [hb, normalizedFactors_zero] at ha \n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ 0\nhb : b = 0\n⊢ span {a} ∈ 0\n[PROOFSTEP]\nexact absurd ha (Multiset.not_mem_zero a)\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ normalizedFactors b\nhb : ¬b = 0\n⊢ span {a} ∈ normalizedFactors (span {b})\n[PROOFSTEP]\nsuffices Prime (Ideal.span ({ a } : Set R))\n  by\n  obtain ⟨c, hc, hc'⟩ :=\n    exists_mem_normalizedFactors_of_dvd ?_ this.irreducible\n      (dvd_iff_le.mpr (span_singleton_le_span_singleton.mpr (dvd_of_mem_normalizedFactors ha)))\n  rwa [associated_iff_eq.mp hc']\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ normalizedFactors b\nhb : ¬b = 0\nthis : Prime (span {a})\n⊢ span {a} ∈ normalizedFactors (span {b})\n[PROOFSTEP]\nobtain ⟨c, hc, hc'⟩ :=\n  exists_mem_normalizedFactors_of_dvd ?_ this.irreducible\n    (dvd_iff_le.mpr (span_singleton_le_span_singleton.mpr (dvd_of_mem_normalizedFactors ha)))\n[GOAL]\ncase intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ normalizedFactors b\nhb : ¬b = 0\nthis : Prime (span {a})\nc : Ideal R\nhc : c ∈ normalizedFactors (span {b})\nhc' : Associated (span {a}) c\n⊢ span {a} ∈ normalizedFactors (span {b})\n[PROOFSTEP]\nrwa [associated_iff_eq.mp hc']\n[GOAL]\ncase neg.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ normalizedFactors b\nhb : ¬b = 0\nthis : Prime (span {a})\n⊢ span {b} ≠ 0\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase neg.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ normalizedFactors b\nhb : ¬b = 0\nthis : Prime (span {a})\nh : span {b} = 0\n⊢ False\n[PROOFSTEP]\nexact hb (span_singleton_eq_bot.mp h)\n[GOAL]\ncase neg.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ normalizedFactors b\nhb : ¬b = 0\n⊢ Prime (span {a})\n[PROOFSTEP]\nrw [prime_iff_isPrime]\n[GOAL]\ncase neg.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ normalizedFactors b\nhb : ¬b = 0\n⊢ IsPrime (span {a})\n[PROOFSTEP]\nexact (span_singleton_prime (prime_of_normalized_factor a ha).ne_zero).mpr (prime_of_normalized_factor a ha)\n[GOAL]\ncase neg.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ normalizedFactors b\nhb : ¬b = 0\n⊢ span {a} ≠ ⊥\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase neg.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq (Ideal R)\na b : R\nha : a ∈ normalizedFactors b\nhb : ¬b = 0\nh : span {a} = ⊥\n⊢ False\n[PROOFSTEP]\nexact (prime_of_normalized_factor a ha).ne_zero (span_singleton_eq_bot.mp h)\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\n⊢ multiplicity (span {a}) (span {b}) = multiplicity a b\n[PROOFSTEP]\nby_cases h : Finite a b\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh : multiplicity.Finite a b\n⊢ multiplicity (span {a}) (span {b}) = multiplicity a b\n[PROOFSTEP]\nrw [← PartENat.natCast_get (finite_iff_dom.mp h)]\n[GOAL]\ncase pos\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh : multiplicity.Finite a b\n⊢ multiplicity (span {a}) (span {b}) = ↑(Part.get (multiplicity a b) (_ : (multiplicity a b).Dom))\n[PROOFSTEP]\nrefine (multiplicity.unique (show Ideal.span { a } ^ (multiplicity a b).get h ∣ Ideal.span { b } from ?_) ?_).symm\n[GOAL]\ncase pos.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh : multiplicity.Finite a b\n⊢ span {a} ^ Part.get (multiplicity a b) h ∣ span {b}\n[PROOFSTEP]\nrw [Ideal.span_singleton_pow, span_singleton_dvd_span_singleton_iff_dvd]\n[GOAL]\ncase pos.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh : multiplicity.Finite a b\n⊢ ¬span {a} ^ (Part.get (multiplicity a b) h + 1) ∣ span {b}\n[PROOFSTEP]\nrw [Ideal.span_singleton_pow, span_singleton_dvd_span_singleton_iff_dvd]\n[GOAL]\ncase pos.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh : multiplicity.Finite a b\n⊢ a ^ Part.get (multiplicity a b) h ∣ b\ncase pos.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh : multiplicity.Finite a b\n⊢ ¬a ^ (Part.get (multiplicity a b) h + 1) ∣ b\n[PROOFSTEP]\nexact pow_multiplicity_dvd h\n[GOAL]\ncase pos.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh : multiplicity.Finite a b\n⊢ ¬a ^ (Part.get (multiplicity a b) h + 1) ∣ b\n[PROOFSTEP]\nexact multiplicity.is_greatest ((PartENat.lt_coe_iff _ _).mpr (Exists.intro (finite_iff_dom.mp h) (Nat.lt_succ_self _)))\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh : ¬multiplicity.Finite a b\n⊢ multiplicity (span {a}) (span {b}) = multiplicity a b\n[PROOFSTEP]\nsuffices ¬Finite (Ideal.span ({ a } : Set R)) (Ideal.span ({ b } : Set R))\n  by\n  rw [finite_iff_dom, PartENat.not_dom_iff_eq_top] at h this \n  rw [h, this]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh : ¬multiplicity.Finite a b\nthis : ¬multiplicity.Finite (span {a}) (span {b})\n⊢ multiplicity (span {a}) (span {b}) = multiplicity a b\n[PROOFSTEP]\nrw [finite_iff_dom, PartENat.not_dom_iff_eq_top] at h this \n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh✝ : ¬multiplicity.Finite a b\nh : multiplicity a b = ⊤\nthis✝ : ¬multiplicity.Finite (span {a}) (span {b})\nthis : multiplicity (span {a}) (span {b}) = ⊤\n⊢ multiplicity (span {a}) (span {b}) = multiplicity a b\n[PROOFSTEP]\nrw [h, this]\n[GOAL]\ncase neg\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh : ¬multiplicity.Finite a b\n⊢ ¬multiplicity.Finite (span {a}) (span {b})\n[PROOFSTEP]\nexact\n  not_finite_iff_forall.mpr fun n =>\n    by\n    rw [Ideal.span_singleton_pow, span_singleton_dvd_span_singleton_iff_dvd]\n    exact not_finite_iff_forall.mp h n\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh : ¬multiplicity.Finite a b\nn : ℕ\n⊢ span {a} ^ n ∣ span {b}\n[PROOFSTEP]\nrw [Ideal.span_singleton_pow, span_singleton_dvd_span_singleton_iff_dvd]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing A\ninst✝⁵ : Field K\ninst✝⁴ : IsDomain A\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\na b : R\nh : ¬multiplicity.Finite a b\nn : ℕ\n⊢ a ^ n ∣ b\n[PROOFSTEP]\nexact not_finite_iff_forall.mp h n\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\n⊢ ↑{d | d ∈ normalizedFactors r} ≃ ↑{I | I ∈ normalizedFactors (span {r})}\n[PROOFSTEP]\nrefine Equiv.ofBijective ?_ ?_\n[GOAL]\ncase refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\n⊢ ↑{d | d ∈ normalizedFactors r} → ↑{I | I ∈ normalizedFactors (span {r})}\n[PROOFSTEP]\nexact fun d => ⟨Ideal.span {↑d}, singleton_span_mem_normalizedFactors_of_mem_normalizedFactors d.prop⟩\n[GOAL]\ncase refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\n⊢ Function.Bijective fun d => { val := span {↑d}, property := (_ : span {↑d} ∈ normalizedFactors (span {r})) }\n[PROOFSTEP]\nrefine ⟨?_, ?_⟩\n[GOAL]\ncase refine_2.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\n⊢ Function.Injective fun d => { val := span {↑d}, property := (_ : span {↑d} ∈ normalizedFactors (span {r})) }\n[PROOFSTEP]\nrintro ⟨a, ha⟩ ⟨b, hb⟩ h\n[GOAL]\ncase refine_2.refine_1.mk.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\na : R\nha : a ∈ {d | d ∈ normalizedFactors r}\nb : R\nhb : b ∈ {d | d ∈ normalizedFactors r}\nh :\n  (fun d => { val := span {↑d}, property := (_ : span {↑d} ∈ normalizedFactors (span {r})) })\n      { val := a, property := ha } =\n    (fun d => { val := span {↑d}, property := (_ : span {↑d} ∈ normalizedFactors (span {r})) })\n      { val := b, property := hb }\n⊢ { val := a, property := ha } = { val := b, property := hb }\n[PROOFSTEP]\nrw [Subtype.mk_eq_mk, Ideal.span_singleton_eq_span_singleton, Subtype.coe_mk, Subtype.coe_mk] at h \n[GOAL]\ncase refine_2.refine_1.mk.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\na : R\nha : a ∈ {d | d ∈ normalizedFactors r}\nb : R\nhb : b ∈ {d | d ∈ normalizedFactors r}\nh : Associated a b\n⊢ { val := a, property := ha } = { val := b, property := hb }\n[PROOFSTEP]\nexact Subtype.mk_eq_mk.mpr (mem_normalizedFactors_eq_of_associated ha hb h)\n[GOAL]\ncase refine_2.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\n⊢ Function.Surjective fun d => { val := span {↑d}, property := (_ : span {↑d} ∈ normalizedFactors (span {r})) }\n[PROOFSTEP]\nrintro ⟨i, hi⟩\n[GOAL]\ncase refine_2.refine_2.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\ni : Ideal R\nhi : i ∈ {I | I ∈ normalizedFactors (span {r})}\n⊢ ∃ a,\n    (fun d => { val := span {↑d}, property := (_ : span {↑d} ∈ normalizedFactors (span {r})) }) a =\n      { val := i, property := hi }\n[PROOFSTEP]\nhave : i.IsPrime := isPrime_of_prime (prime_of_normalized_factor i hi)\n[GOAL]\ncase refine_2.refine_2.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\ni : Ideal R\nhi : i ∈ {I | I ∈ normalizedFactors (span {r})}\nthis : IsPrime i\n⊢ ∃ a,\n    (fun d => { val := span {↑d}, property := (_ : span {↑d} ∈ normalizedFactors (span {r})) }) a =\n      { val := i, property := hi }\n[PROOFSTEP]\nhave :=\n  exists_mem_normalizedFactors_of_dvd hr\n    (Submodule.IsPrincipal.prime_generator_of_isPrime i (prime_of_normalized_factor i hi).ne_zero).irreducible ?_\n[GOAL]\ncase refine_2.refine_2.mk.refine_2\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\ni : Ideal R\nhi : i ∈ {I | I ∈ normalizedFactors (span {r})}\nthis✝ : IsPrime i\nthis : ∃ q, q ∈ normalizedFactors r ∧ Associated (Submodule.IsPrincipal.generator i) q\n⊢ ∃ a,\n    (fun d => { val := span {↑d}, property := (_ : span {↑d} ∈ normalizedFactors (span {r})) }) a =\n      { val := i, property := hi }\n[PROOFSTEP]\nobtain ⟨a, ha, ha'⟩ := this\n[GOAL]\ncase refine_2.refine_2.mk.refine_2.intro.intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\ni : Ideal R\nhi : i ∈ {I | I ∈ normalizedFactors (span {r})}\nthis : IsPrime i\na : R\nha : a ∈ normalizedFactors r\nha' : Associated (Submodule.IsPrincipal.generator i) a\n⊢ ∃ a,\n    (fun d => { val := span {↑d}, property := (_ : span {↑d} ∈ normalizedFactors (span {r})) }) a =\n      { val := i, property := hi }\n[PROOFSTEP]\nuse⟨a, ha⟩\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\ni : Ideal R\nhi : i ∈ {I | I ∈ normalizedFactors (span {r})}\nthis : IsPrime i\na : R\nha : a ∈ normalizedFactors r\nha' : Associated (Submodule.IsPrincipal.generator i) a\n⊢ (fun d => { val := span {↑d}, property := (_ : span {↑d} ∈ normalizedFactors (span {r})) })\n      { val := a, property := ha } =\n    { val := i, property := hi }\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, Subtype.mk_eq_mk, ← span_singleton_eq_span_singleton.mpr ha', Ideal.span_singleton_generator]\n[GOAL]\ncase refine_2.refine_2.mk.refine_1\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : IsDomain A\ninst✝⁴ : IsDomain R\ninst✝³ : IsPrincipalIdealRing R\ninst✝² : DecidableEq R\ninst✝¹ : DecidableEq (Ideal R)\ninst✝ : NormalizationMonoid R\nr : R\nhr : r ≠ 0\ni : Ideal R\nhi : i ∈ {I | I ∈ normalizedFactors (span {r})}\nthis : IsPrime i\n⊢ Submodule.IsPrincipal.generator i ∣ r\n[PROOFSTEP]\nexact\n  (Submodule.IsPrincipal.mem_iff_generator_dvd i).mp\n    ((show Ideal.span { r } ≤ i from dvd_iff_le.mp (dvd_of_mem_normalizedFactors hi))\n      (mem_span_singleton.mpr (dvd_refl r)))\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : IsDomain A\ninst✝⁶ : IsDomain R\ninst✝⁵ : IsPrincipalIdealRing R\ninst✝⁴ : DecidableEq R\ninst✝³ : DecidableEq (Ideal R)\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nr d : R\nhr : r ≠ 0\nhd : d ∈ normalizedFactors r\n⊢ multiplicity d r =\n    multiplicity (↑(↑(normalizedFactorsEquivSpanNormalizedFactors hr) { val := d, property := hd })) (span {r})\n[PROOFSTEP]\nsimp only [normalizedFactorsEquivSpanNormalizedFactors, multiplicity_eq_multiplicity_span, Subtype.coe_mk,\n  Equiv.ofBijective_apply]\n[GOAL]\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : IsDomain A\ninst✝⁶ : IsDomain R\ninst✝⁵ : IsPrincipalIdealRing R\ninst✝⁴ : DecidableEq R\ninst✝³ : DecidableEq (Ideal R)\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nr : R\nhr : r ≠ 0\nI : ↑{I | I ∈ normalizedFactors (span {r})}\n⊢ multiplicity (↑(↑(normalizedFactorsEquivSpanNormalizedFactors hr).symm I)) r = multiplicity (↑I) (span {r})\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := (normalizedFactorsEquivSpanNormalizedFactors hr).surjective I\n[GOAL]\ncase intro\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : IsDomain A\ninst✝⁶ : IsDomain R\ninst✝⁵ : IsPrincipalIdealRing R\ninst✝⁴ : DecidableEq R\ninst✝³ : DecidableEq (Ideal R)\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nr : R\nhr : r ≠ 0\nI : ↑{I | I ∈ normalizedFactors (span {r})}\nx : ↑{d | d ∈ normalizedFactors r}\nhx : ↑(normalizedFactorsEquivSpanNormalizedFactors hr) x = I\n⊢ multiplicity (↑(↑(normalizedFactorsEquivSpanNormalizedFactors hr).symm I)) r = multiplicity (↑I) (span {r})\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := x\n[GOAL]\ncase intro.mk\nR : Type u_1\nA : Type u_2\nK : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : IsDomain A\ninst✝⁶ : IsDomain R\ninst✝⁵ : IsPrincipalIdealRing R\ninst✝⁴ : DecidableEq R\ninst✝³ : DecidableEq (Ideal R)\ninst✝² : NormalizationMonoid R\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nr : R\nhr : r ≠ 0\nI : ↑{I | I ∈ normalizedFactors (span {r})}\na : R\nha : a ∈ {d | d ∈ normalizedFactors r}\nhx : ↑(normalizedFactorsEquivSpanNormalizedFactors hr) { val := a, property := ha } = I\n⊢ multiplicity (↑(↑(normalizedFactorsEquivSpanNormalizedFactors hr).symm I)) r = multiplicity (↑I) (span {r})\n[PROOFSTEP]\nrw [hx.symm, Equiv.symm_apply_apply, Subtype.coe_mk,\n  multiplicity_normalizedFactorsEquivSpanNormalizedFactors_eq_multiplicity hr ha, hx]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.DedekindDomain.Ideal", "llama_tokens": 147765, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850278370112, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.3694222455444816}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ range some = Iio ⊤\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\nx : WithTop α\n⊢ x ∈ range some ↔ x ∈ Iio ⊤\n[PROOFSTEP]\nrw [mem_Iio, lt_top_iff_ne_top, mem_range, ← none_eq_top, Option.ne_none_iff_exists]\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\nx : WithTop α\n⊢ (∃ y, ↑y = x) ↔ ∃ x_1, Option.some x_1 = x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Icc ↑a ↑b = Icc a b\n[PROOFSTEP]\nsimp [← Ici_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Ico ↑a ↑b = Ico a b\n[PROOFSTEP]\nsimp [← Ici_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Ioc ↑a ↑b = Ioc a b\n[PROOFSTEP]\nsimp [← Ioi_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Ioo ↑a ↑b = Ioo a b\n[PROOFSTEP]\nsimp [← Ioi_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Iio ⊤ = univ\n[PROOFSTEP]\nrw [← range_coe, preimage_range]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Ico ↑a ⊤ = Ici a\n[PROOFSTEP]\nsimp [← Ici_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Ioo ↑a ⊤ = Ioi a\n[PROOFSTEP]\nsimp [← Ioi_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Ioi a = Ioo ↑a ⊤\n[PROOFSTEP]\nrw [← preimage_coe_Ioi, image_preimage_eq_inter_range, range_coe, Ioi_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Ici a = Ico ↑a ⊤\n[PROOFSTEP]\nrw [← preimage_coe_Ici, image_preimage_eq_inter_range, range_coe, Ici_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Iio a = Iio ↑a\n[PROOFSTEP]\nrw [← preimage_coe_Iio, image_preimage_eq_inter_range, range_coe, inter_eq_self_of_subset_left (Iio_subset_Iio le_top)]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Iic a = Iic ↑a\n[PROOFSTEP]\nrw [← preimage_coe_Iic, image_preimage_eq_inter_range, range_coe,\n  inter_eq_self_of_subset_left (Iic_subset_Iio.2 <| coe_lt_top a)]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Icc a b = Icc ↑a ↑b\n[PROOFSTEP]\nrw [← preimage_coe_Icc, image_preimage_eq_inter_range, range_coe,\n  inter_eq_self_of_subset_left (Subset.trans Icc_subset_Iic_self <| Iic_subset_Iio.2 <| coe_lt_top b)]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Ico a b = Ico ↑a ↑b\n[PROOFSTEP]\nrw [← preimage_coe_Ico, image_preimage_eq_inter_range, range_coe,\n  inter_eq_self_of_subset_left (Subset.trans Ico_subset_Iio_self <| Iio_subset_Iio le_top)]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Ioc a b = Ioc ↑a ↑b\n[PROOFSTEP]\nrw [← preimage_coe_Ioc, image_preimage_eq_inter_range, range_coe,\n  inter_eq_self_of_subset_left (Subset.trans Ioc_subset_Iic_self <| Iic_subset_Iio.2 <| coe_lt_top b)]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Ioo a b = Ioo ↑a ↑b\n[PROOFSTEP]\nrw [← preimage_coe_Ioo, image_preimage_eq_inter_range, range_coe,\n  inter_eq_self_of_subset_left (Subset.trans Ioo_subset_Iio_self <| Iio_subset_Iio le_top)]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Icc ↑a ↑b = Icc a b\n[PROOFSTEP]\nsimp [← Ici_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Ico ↑a ↑b = Ico a b\n[PROOFSTEP]\nsimp [← Ici_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Ioc ↑a ↑b = Ioc a b\n[PROOFSTEP]\nsimp [← Ioi_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Ioo ↑a ↑b = Ioo a b\n[PROOFSTEP]\nsimp [← Ioi_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Ioi ⊥ = univ\n[PROOFSTEP]\nrw [← range_coe, preimage_range]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Ioc ⊥ ↑a = Iic a\n[PROOFSTEP]\nsimp [← Ioi_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some ⁻¹' Ioo ⊥ ↑a = Iio a\n[PROOFSTEP]\nsimp [← Ioi_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Iio a = Ioo ⊥ ↑a\n[PROOFSTEP]\nrw [← preimage_coe_Iio, image_preimage_eq_inter_range, range_coe, inter_comm, Ioi_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Iic a = Ioc ⊥ ↑a\n[PROOFSTEP]\nrw [← preimage_coe_Iic, image_preimage_eq_inter_range, range_coe, inter_comm, Ioi_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Ioi a = Ioi ↑a\n[PROOFSTEP]\nrw [← preimage_coe_Ioi, image_preimage_eq_inter_range, range_coe, inter_eq_self_of_subset_left (Ioi_subset_Ioi bot_le)]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Ici a = Ici ↑a\n[PROOFSTEP]\nrw [← preimage_coe_Ici, image_preimage_eq_inter_range, range_coe,\n  inter_eq_self_of_subset_left (Ici_subset_Ioi.2 <| bot_lt_coe a)]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Icc a b = Icc ↑a ↑b\n[PROOFSTEP]\nrw [← preimage_coe_Icc, image_preimage_eq_inter_range, range_coe,\n  inter_eq_self_of_subset_left (Subset.trans Icc_subset_Ici_self <| Ici_subset_Ioi.2 <| bot_lt_coe a)]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Ioc a b = Ioc ↑a ↑b\n[PROOFSTEP]\nrw [← preimage_coe_Ioc, image_preimage_eq_inter_range, range_coe,\n  inter_eq_self_of_subset_left (Subset.trans Ioc_subset_Ioi_self <| Ioi_subset_Ioi bot_le)]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Ico a b = Ico ↑a ↑b\n[PROOFSTEP]\nrw [← preimage_coe_Ico, image_preimage_eq_inter_range, range_coe,\n  inter_eq_self_of_subset_left (Subset.trans Ico_subset_Ici_self <| Ici_subset_Ioi.2 <| bot_lt_coe a)]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\na b : α\n⊢ some '' Ioo a b = Ioo ↑a ↑b\n[PROOFSTEP]\nrw [← preimage_coe_Ioo, image_preimage_eq_inter_range, range_coe,\n  inter_eq_self_of_subset_left (Subset.trans Ioo_subset_Ioi_self <| Ioi_subset_Ioi bot_le)]\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Intervals.WithBotTop", "llama_tokens": 2888, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6477982043529715, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.36914952433187076}}
{"text": "[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\n⊢ IsIdempotentComplete C ↔ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\n⊢ IsIdempotentComplete C → ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\n[PROOFSTEP]\nintro\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\n⊢ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\n[PROOFSTEP]\nintro X p hp\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\n⊢ HasEqualizer (𝟙 X) p\n[PROOFSTEP]\nrcases IsIdempotentComplete.idempotents_split X p hp with ⟨Y, i, e, ⟨h₁, h₂⟩⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n⊢ HasEqualizer (𝟙 X) p\n[PROOFSTEP]\nexact\n  ⟨Nonempty.intro\n      { cone := Fork.ofι i (show i ≫ 𝟙 X = i ≫ p by rw [comp_id, ← h₂, ← assoc, h₁, id_comp])\n        isLimit := by\n          apply Fork.IsLimit.mk'\n          intro s\n          refine' ⟨s.ι ≫ e, _⟩\n          constructor\n          · erw [assoc, h₂, ← Limits.Fork.condition s, comp_id]\n          · intro m hm\n            rw [Fork.ι_ofι] at hm \n            rw [← hm]\n            simp only [← hm, assoc, h₁]\n            exact (comp_id m).symm }⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n⊢ i ≫ 𝟙 X = i ≫ p\n[PROOFSTEP]\nrw [comp_id, ← h₂, ← assoc, h₁, id_comp]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n⊢ IsLimit (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p))\n[PROOFSTEP]\napply Fork.IsLimit.mk'\n[GOAL]\ncase create\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n⊢ (s : Fork (𝟙 X) p) →\n    { l //\n      l ≫ Fork.ι (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)) = Fork.ι s ∧\n        ∀\n          {m :\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n              ((Functor.const WalkingParallelPair).obj (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)).pt).obj\n                WalkingParallelPair.zero},\n          m ≫ Fork.ι (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)) = Fork.ι s → m = l }\n[PROOFSTEP]\nintro s\n[GOAL]\ncase create\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\ns : Fork (𝟙 X) p\n⊢ { l //\n    l ≫ Fork.ι (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)) = Fork.ι s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n            ((Functor.const WalkingParallelPair).obj (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)).pt).obj\n              WalkingParallelPair.zero},\n        m ≫ Fork.ι (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)) = Fork.ι s → m = l }\n[PROOFSTEP]\nrefine' ⟨s.ι ≫ e, _⟩\n[GOAL]\ncase create\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\ns : Fork (𝟙 X) p\n⊢ (Fork.ι s ≫ e) ≫ Fork.ι (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)) = Fork.ι s ∧\n    ∀\n      {m :\n        ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n          ((Functor.const WalkingParallelPair).obj (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)).pt).obj WalkingParallelPair.zero},\n      m ≫ Fork.ι (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)) = Fork.ι s → m = Fork.ι s ≫ e\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase create.left\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\ns : Fork (𝟙 X) p\n⊢ (Fork.ι s ≫ e) ≫ Fork.ι (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)) = Fork.ι s\n[PROOFSTEP]\nerw [assoc, h₂, ← Limits.Fork.condition s, comp_id]\n[GOAL]\ncase create.right\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\ns : Fork (𝟙 X) p\n⊢ ∀\n    {m :\n      ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n        ((Functor.const WalkingParallelPair).obj (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)).pt).obj WalkingParallelPair.zero},\n    m ≫ Fork.ι (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)) = Fork.ι s → m = Fork.ι s ≫ e\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase create.right\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\ns : Fork (𝟙 X) p\nm :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)).pt).obj WalkingParallelPair.zero\nhm : m ≫ Fork.ι (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)) = Fork.ι s\n⊢ m = Fork.ι s ≫ e\n[PROOFSTEP]\nrw [Fork.ι_ofι] at hm \n[GOAL]\ncase create.right\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\ns : Fork (𝟙 X) p\nm :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)).pt).obj WalkingParallelPair.zero\nhm : m ≫ i = Fork.ι s\n⊢ m = Fork.ι s ≫ e\n[PROOFSTEP]\nrw [← hm]\n[GOAL]\ncase create.right\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\ns : Fork (𝟙 X) p\nm :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)).pt).obj WalkingParallelPair.zero\nhm : m ≫ i = Fork.ι s\n⊢ m = (m ≫ i) ≫ e\n[PROOFSTEP]\nsimp only [← hm, assoc, h₁]\n[GOAL]\ncase create.right\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\na✝ : IsIdempotentComplete C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\ns : Fork (𝟙 X) p\nm :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (Fork.ofι i (_ : i ≫ 𝟙 X = i ≫ p)).pt).obj WalkingParallelPair.zero\nhm : m ≫ i = Fork.ι s\n⊢ m = m ≫ 𝟙 Y\n[PROOFSTEP]\nexact (comp_id m).symm\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\n⊢ (∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p) → IsIdempotentComplete C\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\n⊢ IsIdempotentComplete C\n[PROOFSTEP]\nrefine' ⟨_⟩\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\n⊢ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → ∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p\n[PROOFSTEP]\nintro X p hp\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\nX : C\np : X ⟶ X\nhp : p ≫ p = p\n⊢ ∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p\n[PROOFSTEP]\nhaveI : HasEqualizer (𝟙 X) p := h X p hp\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nthis : HasEqualizer (𝟙 X) p\n⊢ ∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p\n[PROOFSTEP]\nrefine'\n  ⟨equalizer (𝟙 X) p, equalizer.ι (𝟙 X) p, equalizer.lift p (show p ≫ 𝟙 X = p ≫ p by rw [hp, comp_id]), _,\n    equalizer.lift_ι _ _⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nthis : HasEqualizer (𝟙 X) p\n⊢ p ≫ 𝟙 X = p ≫ p\n[PROOFSTEP]\nrw [hp, comp_id]\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nthis : HasEqualizer (𝟙 X) p\n⊢ equalizer.ι (𝟙 X) p ≫ equalizer.lift p (_ : p ≫ 𝟙 X = p ≫ p) = 𝟙 (equalizer (𝟙 X) p)\n[PROOFSTEP]\next\n[GOAL]\ncase mpr.h\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nthis : HasEqualizer (𝟙 X) p\n⊢ (equalizer.ι (𝟙 X) p ≫ equalizer.lift p (_ : p ≫ 𝟙 X = p ≫ p)) ≫ equalizer.ι (𝟙 X) p =\n    𝟙 (equalizer (𝟙 X) p) ≫ equalizer.ι (𝟙 X) p\n[PROOFSTEP]\nsimp only [assoc, limit.lift_π, Eq.ndrec, id_eq, eq_mpr_eq_cast, Fork.ofι_pt, Fork.ofι_π_app, id_comp]\n[GOAL]\ncase mpr.h\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nthis : HasEqualizer (𝟙 X) p\n⊢ equalizer.ι (𝟙 X) p ≫ p = equalizer.ι (𝟙 X) p\n[PROOFSTEP]\nrw [← equalizer.condition, comp_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : C\np : X ⟶ X\nhp : p ≫ p = p\n⊢ (𝟙 X - p) ≫ (𝟙 X - p) = 𝟙 X - p\n[PROOFSTEP]\nsimp only [comp_sub, sub_comp, id_comp, comp_id, hp, sub_self, sub_zero]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\n⊢ IsIdempotentComplete C ↔ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasKernel p\n[PROOFSTEP]\nrw [isIdempotentComplete_iff_hasEqualizer_of_id_and_idempotent]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\n⊢ (∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p) ↔ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasKernel p\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\n⊢ (∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p) → ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasKernel p\n[PROOFSTEP]\nintro h X p hp\n[GOAL]\ncase mp\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\nX : C\np : X ⟶ X\nhp : p ≫ p = p\n⊢ HasKernel p\n[PROOFSTEP]\nhaveI : HasEqualizer (𝟙 X) (𝟙 X - p) := h X (𝟙 _ - p) (idem_of_id_sub_idem p hp)\n[GOAL]\ncase mp\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nthis : HasEqualizer (𝟙 X) (𝟙 X - p)\n⊢ HasKernel p\n[PROOFSTEP]\nconvert hasKernel_of_hasEqualizer (𝟙 X) (𝟙 X - p)\n[GOAL]\ncase h.e'_6\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nthis : HasEqualizer (𝟙 X) (𝟙 X - p)\n⊢ p = 𝟙 X - (𝟙 X - p)\n[PROOFSTEP]\nrw [sub_sub_cancel]\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\n⊢ (∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasKernel p) → ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p\n[PROOFSTEP]\nintro h X p hp\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasKernel p\nX : C\np : X ⟶ X\nhp : p ≫ p = p\n⊢ HasEqualizer (𝟙 X) p\n[PROOFSTEP]\nhaveI : HasKernel (𝟙 _ - p) := h X (𝟙 _ - p) (idem_of_id_sub_idem p hp)\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nh : ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasKernel p\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nthis : HasKernel (𝟙 X - p)\n⊢ HasEqualizer (𝟙 X) p\n[PROOFSTEP]\napply Preadditive.hasEqualizer_of_hasKernel\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.11569, u_1} C\nD : Type u_2\ninst✝¹ : Category.{?u.11576, u_2} D\ninst✝ : Abelian D\n⊢ IsIdempotentComplete D\n[PROOFSTEP]\nrw [isIdempotentComplete_iff_idempotents_have_kernels]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.11569, u_1} C\nD : Type u_2\ninst✝¹ : Category.{?u.11576, u_2} D\ninst✝ : Abelian D\n⊢ ∀ (X : D) (p : X ⟶ X), p ≫ p = p → HasKernel p\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.11569, u_1} C\nD : Type u_2\ninst✝¹ : Category.{?u.11576, u_2} D\ninst✝ : Abelian D\nX✝ : D\np✝ : X✝ ⟶ X✝\na✝ : p✝ ≫ p✝ = p✝\n⊢ HasKernel p✝\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nh : ∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p\n⊢ ∃ Y' i' e', i' ≫ e' = 𝟙 Y' ∧ e' ≫ i' = p'\n[PROOFSTEP]\nrcases h with ⟨Y, i, e, ⟨h₁, h₂⟩⟩\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n⊢ ∃ Y' i' e', i' ≫ e' = 𝟙 Y' ∧ e' ≫ i' = p'\n[PROOFSTEP]\nuse Y, i ≫ φ.hom, φ.inv ≫ e\n[GOAL]\ncase h\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n⊢ (i ≫ φ.hom) ≫ φ.inv ≫ e = 𝟙 Y ∧ (φ.inv ≫ e) ≫ i ≫ φ.hom = p'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n⊢ (i ≫ φ.hom) ≫ φ.inv ≫ e = 𝟙 Y\n[PROOFSTEP]\nslice_lhs 2 3 => rw [φ.hom_inv_id]\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| φ.hom ≫ φ.inv\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| e\ncase a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| i\n[PROOFSTEP]\nrw [φ.hom_inv_id]\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| φ.hom ≫ φ.inv\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| e\ncase a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| i\n[PROOFSTEP]\nrw [φ.hom_inv_id]\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| φ.hom ≫ φ.inv\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| e\ncase a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| i\n[PROOFSTEP]\nrw [φ.hom_inv_id]\n[GOAL]\ncase h.left\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n⊢ i ≫ 𝟙 X ≫ e = 𝟙 Y\n[PROOFSTEP]\nrw [id_comp, h₁]\n[GOAL]\ncase h.right\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n⊢ (φ.inv ≫ e) ≫ i ≫ φ.hom = p'\n[PROOFSTEP]\nslice_lhs 2 3 => rw [h₂]\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| e ≫ i\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| φ.hom\ncase a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| φ.inv\n[PROOFSTEP]\nrw [h₂]\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| e ≫ i\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| φ.hom\ncase a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| φ.inv\n[PROOFSTEP]\nrw [h₂]\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| e ≫ i\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| φ.hom\ncase a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n| φ.inv\n[PROOFSTEP]\nrw [h₂]\n[GOAL]\ncase h.right\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\nY : C\ni : Y ⟶ X\ne : X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p\n⊢ φ.inv ≫ p ≫ φ.hom = p'\n[PROOFSTEP]\nrw [hpp', ← assoc, φ.inv_hom_id, id_comp]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n⊢ (∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p) ↔ ∃ Y' i' e', i' ≫ e' = 𝟙 Y' ∧ e' ≫ i' = p'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n⊢ (∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p) → ∃ Y' i' e', i' ≫ e' = 𝟙 Y' ∧ e' ≫ i' = p'\n[PROOFSTEP]\nexact split_imp_of_iso φ p p' hpp'\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n⊢ (∃ Y' i' e', i' ≫ e' = 𝟙 Y' ∧ e' ≫ i' = p') → ∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p\n[PROOFSTEP]\napply split_imp_of_iso φ.symm p' p\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n⊢ p' ≫ φ.symm.hom = φ.symm.hom ≫ p\n[PROOFSTEP]\nrw [← comp_id p, ← φ.hom_inv_id]\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n⊢ p' ≫ φ.symm.hom = φ.symm.hom ≫ p ≫ φ.hom ≫ φ.inv\n[PROOFSTEP]\nslice_rhs 2 3 => rw [hpp']\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| p ≫ φ.hom\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| φ.inv\ncase a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| φ.symm.hom\n[PROOFSTEP]\nrw [hpp']\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| p ≫ φ.hom\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| φ.inv\ncase a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| φ.symm.hom\n[PROOFSTEP]\nrw [hpp']\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| p ≫ φ.hom\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| φ.inv\ncase a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| φ.symm.hom\n[PROOFSTEP]\nrw [hpp']\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n⊢ p' ≫ φ.symm.hom = φ.symm.hom ≫ (φ.hom ≫ p') ≫ φ.inv\n[PROOFSTEP]\nslice_rhs 1 2 => erw [φ.inv_hom_id]\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| φ.symm.hom ≫ φ.hom\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| p'\ncase a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| φ.inv\n[PROOFSTEP]\nerw [φ.inv_hom_id]\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| φ.symm.hom ≫ φ.hom\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| p'\ncase a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| φ.inv\n[PROOFSTEP]\nerw [φ.inv_hom_id]\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| φ.symm.hom ≫ φ.hom\ncase a.a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| p'\ncase a\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n| φ.inv\n[PROOFSTEP]\nerw [φ.inv_hom_id]\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n⊢ p' ≫ φ.symm.hom = (𝟙 X' ≫ p') ≫ φ.inv\n[PROOFSTEP]\nsimp only [id_comp]\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX X' : C\nφ : X ≅ X'\np : X ⟶ X\np' : X' ⟶ X'\nhpp' : p ≫ φ.hom = φ.hom ≫ p'\n⊢ p' ≫ φ.symm.hom = p' ≫ φ.inv\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\n⊢ IsIdempotentComplete D\n[PROOFSTEP]\nrefine' ⟨_⟩\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\n⊢ ∀ (X : D) (p : X ⟶ X), p ≫ p = p → ∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p\n[PROOFSTEP]\nintro X' p hp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\n⊢ ∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p\n[PROOFSTEP]\nlet φ := ε.counitIso.symm.app X'\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n⊢ ∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p\n[PROOFSTEP]\nerw [split_iff_of_iso φ p (φ.inv ≫ p ≫ φ.hom)\n    (by\n      slice_rhs 1 2 => rw [φ.hom_inv_id]\n      rw [id_comp])]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n⊢ p ≫ φ.hom = φ.hom ≫ φ.inv ≫ p ≫ φ.hom\n[PROOFSTEP]\nslice_rhs 1 2 => rw [φ.hom_inv_id]\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n| φ.hom ≫ φ.inv\ncase a.a\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n| p\ncase a\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n| φ.hom\n[PROOFSTEP]\nrw [φ.hom_inv_id]\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n| φ.hom ≫ φ.inv\ncase a.a\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n| p\ncase a\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n| φ.hom\n[PROOFSTEP]\nrw [φ.hom_inv_id]\n[GOAL]\ncase a.a\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n| φ.hom ≫ φ.inv\ncase a.a\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n| p\ncase a\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n| φ.hom\n[PROOFSTEP]\nrw [φ.hom_inv_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n⊢ p ≫ φ.hom = (𝟙 ((𝟭 D).obj X') ≫ p) ≫ φ.hom\n[PROOFSTEP]\nrw [id_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n⊢ ∃ Y' i' e', i' ≫ e' = 𝟙 Y' ∧ e' ≫ i' = φ.inv ≫ p ≫ φ.hom\n[PROOFSTEP]\nrcases IsIdempotentComplete.idempotents_split (ε.inverse.obj X') (ε.inverse.map p)\n    (by rw [← ε.inverse.map_comp, hp]) with\n  ⟨Y, i, e, ⟨h₁, h₂⟩⟩\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\n⊢ ε.inverse.map p ≫ ε.inverse.map p = ε.inverse.map p\n[PROOFSTEP]\nrw [← ε.inverse.map_comp, hp]\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\nY : C\ni : Y ⟶ ε.inverse.obj X'\ne : ε.inverse.obj X' ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = ε.inverse.map p\n⊢ ∃ Y' i' e', i' ≫ e' = 𝟙 Y' ∧ e' ≫ i' = φ.inv ≫ p ≫ φ.hom\n[PROOFSTEP]\nuse ε.functor.obj Y, ε.functor.map i, ε.functor.map e\n[GOAL]\ncase h\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\nY : C\ni : Y ⟶ ε.inverse.obj X'\ne : ε.inverse.obj X' ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = ε.inverse.map p\n⊢ ε.functor.map i ≫ ε.functor.map e = 𝟙 (ε.functor.obj Y) ∧ ε.functor.map e ≫ ε.functor.map i = φ.inv ≫ p ≫ φ.hom\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\nY : C\ni : Y ⟶ ε.inverse.obj X'\ne : ε.inverse.obj X' ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = ε.inverse.map p\n⊢ ε.functor.map i ≫ ε.functor.map e = 𝟙 (ε.functor.obj Y)\n[PROOFSTEP]\nrw [← ε.functor.map_comp, h₁, ε.functor.map_id]\n[GOAL]\ncase h.right\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\nY : C\ni : Y ⟶ ε.inverse.obj X'\ne : ε.inverse.obj X' ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = ε.inverse.map p\n⊢ ε.functor.map e ≫ ε.functor.map i = φ.inv ≫ p ≫ φ.hom\n[PROOFSTEP]\nsimp only [← ε.functor.map_comp, h₂, Equivalence.fun_inv_map]\n[GOAL]\ncase h.right\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\nh : IsIdempotentComplete C\nX' : D\np : X' ⟶ X'\nhp : p ≫ p = p\nφ : (𝟭 D).obj X' ≅ (ε.inverse ⋙ ε.functor).obj X' := ε.counitIso.symm.app X'\nY : C\ni : Y ⟶ ε.inverse.obj X'\ne : ε.inverse.obj X' ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = ε.inverse.map p\n⊢ NatTrans.app (Equivalence.counit ε) X' ≫ p ≫ NatTrans.app (Equivalence.counitInv ε) X' =\n    (ε.counitIso.symm.app X').inv ≫ p ≫ (ε.counitIso.symm.app X').hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\n⊢ IsIdempotentComplete C ↔ IsIdempotentComplete D\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\n⊢ IsIdempotentComplete C → IsIdempotentComplete D\n[PROOFSTEP]\nexact Equivalence.isIdempotentComplete ε\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝¹ : Category.{u_4, u_1} C\nD : Type u_2\ninst✝ : Category.{u_3, u_2} D\nε : C ≌ D\n⊢ IsIdempotentComplete D → IsIdempotentComplete C\n[PROOFSTEP]\nexact Equivalence.isIdempotentComplete ε.symm\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete Cᵒᵖ\n⊢ IsIdempotentComplete C\n[PROOFSTEP]\nrefine' ⟨_⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete Cᵒᵖ\n⊢ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → ∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p\n[PROOFSTEP]\nintro X p hp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete Cᵒᵖ\nX : C\np : X ⟶ X\nhp : p ≫ p = p\n⊢ ∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p\n[PROOFSTEP]\nrcases IsIdempotentComplete.idempotents_split (op X) p.op (by rw [← op_comp, hp]) with ⟨Y, i, e, ⟨h₁, h₂⟩⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete Cᵒᵖ\nX : C\np : X ⟶ X\nhp : p ≫ p = p\n⊢ p.op ≫ p.op = p.op\n[PROOFSTEP]\nrw [← op_comp, hp]\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete Cᵒᵖ\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : Cᵒᵖ\ni : Y ⟶ op X\ne : op X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p.op\n⊢ ∃ Y i e, i ≫ e = 𝟙 Y ∧ e ≫ i = p\n[PROOFSTEP]\nuse Y.unop, e.unop, i.unop\n[GOAL]\ncase h\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete Cᵒᵖ\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : Cᵒᵖ\ni : Y ⟶ op X\ne : op X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p.op\n⊢ e.unop ≫ i.unop = 𝟙 Y.unop ∧ i.unop ≫ e.unop = p\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete Cᵒᵖ\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : Cᵒᵖ\ni : Y ⟶ op X\ne : op X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p.op\n⊢ e.unop ≫ i.unop = 𝟙 Y.unop\n[PROOFSTEP]\nsimp only [← unop_comp, h₁]\n[GOAL]\ncase h.left\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete Cᵒᵖ\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : Cᵒᵖ\ni : Y ⟶ op X\ne : op X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p.op\n⊢ (𝟙 Y).unop = 𝟙 Y.unop\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.right\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete Cᵒᵖ\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : Cᵒᵖ\ni : Y ⟶ op X\ne : op X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p.op\n⊢ i.unop ≫ e.unop = p\n[PROOFSTEP]\nsimp only [← unop_comp, h₂]\n[GOAL]\ncase h.right\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete Cᵒᵖ\nX : C\np : X ⟶ X\nhp : p ≫ p = p\nY : Cᵒᵖ\ni : Y ⟶ op X\ne : op X ⟶ Y\nh₁ : i ≫ e = 𝟙 Y\nh₂ : e ≫ i = p.op\n⊢ p.op.unop = p\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\n⊢ IsIdempotentComplete Cᵒᵖ ↔ IsIdempotentComplete C\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\n⊢ IsIdempotentComplete Cᵒᵖ → IsIdempotentComplete C\n[PROOFSTEP]\nexact isIdempotentComplete_of_isIdempotentComplete_opposite\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\n⊢ IsIdempotentComplete C → IsIdempotentComplete Cᵒᵖ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete C\n⊢ IsIdempotentComplete Cᵒᵖ\n[PROOFSTEP]\napply isIdempotentComplete_of_isIdempotentComplete_opposite\n[GOAL]\ncase mpr.h\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete C\n⊢ IsIdempotentComplete Cᵒᵖᵒᵖ\n[PROOFSTEP]\nrw [isIdempotentComplete_iff_of_equivalence (opOpEquivalence C)]\n[GOAL]\ncase mpr.h\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nh : IsIdempotentComplete C\n⊢ IsIdempotentComplete C\n[PROOFSTEP]\nexact h\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.32276, u_1} C\ninst✝ : IsIdempotentComplete C\n⊢ IsIdempotentComplete Cᵒᵖ\n[PROOFSTEP]\nrwa [isIdempotentComplete_iff_opposite]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Idempotents.Basic", "llama_tokens": 20128, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6654105587468141, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.3689505018979237}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ ∂ ⊤ = ⊥\n[PROOFSTEP]\nrw [boundary, hnot_top, inf_bot_eq]\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b a : α\n⊢ ∂ (￢￢a) = ∂ (￢a)\n[PROOFSTEP]\nsimp_rw [boundary, hnot_hnot_hnot, inf_comm]\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b a : α\n⊢ ￢∂ a = ⊤\n[PROOFSTEP]\nrw [boundary, hnot_inf_distrib, sup_hnot_self]\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ a b : α\n⊢ ∂ (a ⊓ b) = ∂ a ⊓ b ⊔ a ⊓ ∂ b\n[PROOFSTEP]\nunfold boundary\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ a b : α\n⊢ a ⊓ b ⊓ ￢(a ⊓ b) = a ⊓ ￢a ⊓ b ⊔ a ⊓ (b ⊓ ￢b)\n[PROOFSTEP]\nrw [hnot_inf_distrib, inf_sup_left, inf_right_comm, ← inf_assoc]\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ ∂ (a ⊔ b) ≤ ∂ a ⊔ ∂ b\n[PROOFSTEP]\nrw [boundary, inf_sup_right]\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢(a ⊔ b) ⊔ b ⊓ ￢(a ⊔ b) ≤ ∂ a ⊔ ∂ b\n[PROOFSTEP]\nexact sup_le_sup (inf_le_inf_left _ <| hnot_anti le_sup_left) (inf_le_inf_left _ <| hnot_anti le_sup_right)\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\n⊢ (a ∧ b ∨ ¬(a ∧ b)) ∧ ((a ∨ b) ∨ ¬(a ∨ b)) → a ∨ ¬a\n[PROOFSTEP]\nrintro ⟨⟨ha, _⟩ | hnab, (ha | hb) | hnab⟩\n[GOAL]\ncase intro.inl.intro.inl.inl\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nha✝ : a\nright✝ : b\nha : a\n⊢ a ∨ ¬a\n[PROOFSTEP]\ntry exact Or.inl ha\n[GOAL]\ncase intro.inl.intro.inl.inl\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nha✝ : a\nright✝ : b\nha : a\n⊢ a ∨ ¬a\n[PROOFSTEP]\nexact Or.inl ha\n[GOAL]\ncase intro.inl.intro.inl.inr\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nha : a\nright✝ hb : b\n⊢ a ∨ ¬a\n[PROOFSTEP]\ntry exact Or.inl ha\n[GOAL]\ncase intro.inl.intro.inl.inr\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nha : a\nright✝ hb : b\n⊢ a ∨ ¬a\n[PROOFSTEP]\nexact Or.inl ha\n[GOAL]\ncase intro.inl.intro.inr\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nha : a\nright✝ : b\nhnab : ¬(a ∨ b)\n⊢ a ∨ ¬a\n[PROOFSTEP]\ntry exact Or.inl ha\n[GOAL]\ncase intro.inl.intro.inr\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nha : a\nright✝ : b\nhnab : ¬(a ∨ b)\n⊢ a ∨ ¬a\n[PROOFSTEP]\nexact Or.inl ha\n[GOAL]\ncase intro.inr.inl.inl\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nhnab : ¬(a ∧ b)\nha : a\n⊢ a ∨ ¬a\n[PROOFSTEP]\ntry exact Or.inl ha\n[GOAL]\ncase intro.inr.inl.inl\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nhnab : ¬(a ∧ b)\nha : a\n⊢ a ∨ ¬a\n[PROOFSTEP]\nexact Or.inl ha\n[GOAL]\ncase intro.inr.inl.inr\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nhnab : ¬(a ∧ b)\nhb : b\n⊢ a ∨ ¬a\n[PROOFSTEP]\ntry exact Or.inl ha\n[GOAL]\ncase intro.inr.inl.inr\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nhnab : ¬(a ∧ b)\nhb : b\n⊢ a ∨ ¬a\n[PROOFSTEP]\nexact Or.inl ha\n[GOAL]\ncase intro.inr.inr\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nhnab✝ : ¬(a ∧ b)\nhnab : ¬(a ∨ b)\n⊢ a ∨ ¬a\n[PROOFSTEP]\ntry exact Or.inl ha\n[GOAL]\ncase intro.inr.inr\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nhnab✝ : ¬(a ∧ b)\nhnab : ¬(a ∨ b)\n⊢ a ∨ ¬a\n[PROOFSTEP]\nexact Or.inl ha\n[GOAL]\ncase intro.inr.inl.inr\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nhnab : ¬(a ∧ b)\nhb : b\n⊢ a ∨ ¬a\n[PROOFSTEP]\nexact Or.inr fun ha => hnab ⟨ha, hb⟩\n[GOAL]\ncase intro.inr.inr\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b✝ : α\na b : Prop\nhnab✝ : ¬(a ∧ b)\nhnab : ¬(a ∨ b)\n⊢ a ∨ ¬a\n[PROOFSTEP]\nexact Or.inr fun ha => hnab <| Or.inl ha\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ ∂ a ≤ ∂ (a ⊔ b) ⊔ ∂ (a ⊓ b)\n[PROOFSTEP]\nsimp only [boundary, sup_inf_left, sup_inf_right, sup_right_idem, le_inf_iff, sup_assoc, @sup_comm _ _ _ a]\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ ((a ⊓ ￢a ≤ a ⊔ (a ⊔ b) ∧ a ⊓ ￢a ≤ a ⊔ ￢(a ⊔ b)) ∧ a ⊓ ￢a ≤ a ⊔ b ∧ a ⊓ ￢a ≤ ￢(a ⊔ b) ⊔ b) ∧\n    a ⊓ ￢a ≤ a ⊔ (b ⊔ ￢(a ⊓ b)) ∧ a ⊓ ￢a ≤ ￢(a ⊔ b) ⊔ ￢(a ⊓ b)\n[PROOFSTEP]\nrefine ⟨⟨⟨?_, ?_⟩, ⟨?_, ?_⟩⟩, ?_, ?_⟩\n[GOAL]\ncase refine_1\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ a ⊔ (a ⊔ b)\n[PROOFSTEP]\ntry {exact le_sup_of_le_left inf_le_left\n}\n[GOAL]\ncase refine_1\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ a ⊔ (a ⊔ b)\n[PROOFSTEP]\n{exact le_sup_of_le_left inf_le_left\n}\n[GOAL]\ncase refine_1\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ a ⊔ (a ⊔ b)\n[PROOFSTEP]\nexact le_sup_of_le_left inf_le_left\n[GOAL]\ncase refine_2\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ a ⊔ ￢(a ⊔ b)\n[PROOFSTEP]\ntry {exact le_sup_of_le_left inf_le_left\n}\n[GOAL]\ncase refine_2\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ a ⊔ ￢(a ⊔ b)\n[PROOFSTEP]\n{exact le_sup_of_le_left inf_le_left\n}\n[GOAL]\ncase refine_2\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ a ⊔ ￢(a ⊔ b)\n[PROOFSTEP]\nexact le_sup_of_le_left inf_le_left\n[GOAL]\ncase refine_3\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ a ⊔ b\n[PROOFSTEP]\ntry {exact le_sup_of_le_left inf_le_left\n}\n[GOAL]\ncase refine_3\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ a ⊔ b\n[PROOFSTEP]\n{exact le_sup_of_le_left inf_le_left\n}\n[GOAL]\ncase refine_3\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ a ⊔ b\n[PROOFSTEP]\nexact le_sup_of_le_left inf_le_left\n[GOAL]\ncase refine_4\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ ￢(a ⊔ b) ⊔ b\n[PROOFSTEP]\ntry {exact le_sup_of_le_left inf_le_left\n}\n[GOAL]\ncase refine_4\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ ￢(a ⊔ b) ⊔ b\n[PROOFSTEP]\n{exact le_sup_of_le_left inf_le_left\n}\n[GOAL]\ncase refine_4\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ ￢(a ⊔ b) ⊔ b\n[PROOFSTEP]\nexact le_sup_of_le_left inf_le_left\n[GOAL]\ncase refine_5\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ a ⊔ (b ⊔ ￢(a ⊓ b))\n[PROOFSTEP]\ntry {exact le_sup_of_le_left inf_le_left\n}\n[GOAL]\ncase refine_5\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ a ⊔ (b ⊔ ￢(a ⊓ b))\n[PROOFSTEP]\n{exact le_sup_of_le_left inf_le_left\n}\n[GOAL]\ncase refine_5\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ a ⊔ (b ⊔ ￢(a ⊓ b))\n[PROOFSTEP]\nexact le_sup_of_le_left inf_le_left\n[GOAL]\ncase refine_6\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ ￢(a ⊔ b) ⊔ ￢(a ⊓ b)\n[PROOFSTEP]\ntry {exact le_sup_of_le_left inf_le_left\n}\n[GOAL]\ncase refine_6\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ ￢(a ⊔ b) ⊔ ￢(a ⊓ b)\n[PROOFSTEP]\n{exact le_sup_of_le_left inf_le_left\n}\n[GOAL]\ncase refine_6\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ ￢(a ⊔ b) ⊔ ￢(a ⊓ b)\n[PROOFSTEP]\nexact le_sup_of_le_left inf_le_left\n[GOAL]\ncase refine_4\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ ￢(a ⊔ b) ⊔ b\n[PROOFSTEP]\nrefine inf_le_of_right_le ?_\n[GOAL]\ncase refine_6\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ a ⊓ ￢a ≤ ￢(a ⊔ b) ⊔ ￢(a ⊓ b)\n[PROOFSTEP]\nrefine inf_le_of_right_le ?_\n[GOAL]\ncase refine_4\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ ￢a ≤ ￢(a ⊔ b) ⊔ b\n[PROOFSTEP]\nrw [hnot_le_iff_codisjoint_right, codisjoint_left_comm]\n[GOAL]\ncase refine_4\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ Codisjoint (￢(a ⊔ b)) (a ⊔ b)\n[PROOFSTEP]\nexact codisjoint_hnot_left\n[GOAL]\ncase refine_6\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ ￢a ≤ ￢(a ⊔ b) ⊔ ￢(a ⊓ b)\n[PROOFSTEP]\nrefine le_sup_of_le_right ?_\n[GOAL]\ncase refine_6\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ ￢a ≤ ￢(a ⊓ b)\n[PROOFSTEP]\nrw [hnot_le_iff_codisjoint_right]\n[GOAL]\ncase refine_6\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ Codisjoint a (￢(a ⊓ b))\n[PROOFSTEP]\nexact codisjoint_hnot_right.mono_right (hnot_anti inf_le_left)\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ ∂ b ≤ ∂ (a ⊔ b) ⊔ ∂ (a ⊓ b)\n[PROOFSTEP]\nrw [@sup_comm _ _ a, inf_comm]\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ ∂ b ≤ ∂ (b ⊔ a) ⊔ ∂ (b ⊓ a)\n[PROOFSTEP]\nexact boundary_le_boundary_sup_sup_boundary_inf_left\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b a : α\n⊢ ∂ ∂ a = ∂ a\n[PROOFSTEP]\nrw [boundary, hnot_boundary, inf_top_eq]\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b a : α\n⊢ ￢￢a ⊔ ∂ a = a\n[PROOFSTEP]\nrw [boundary, sup_inf_left, hnot_sup_self, inf_top_eq, sup_eq_right]\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na✝ b a : α\n⊢ ￢￢a ≤ a\n[PROOFSTEP]\nexact hnot_hnot_le\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\nh : ￢a = ⊤\n⊢ ∂ a = a\n[PROOFSTEP]\nrw [boundary, h, inf_top_eq]\n[GOAL]\nα : Type u_1\ninst✝ : CoheytingAlgebra α\na b : α\n⊢ (∃ b, ∂ b = a) → ￢a = ⊤\n[PROOFSTEP]\nrintro ⟨b, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : CoheytingAlgebra α\nb✝ b : α\n⊢ ￢∂ b = ⊤\n[PROOFSTEP]\nexact hnot_boundary _\n", "meta": {"mathlib_filename": "Mathlib.Order.Heyting.Boundary", "llama_tokens": 5392, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6654105587468141, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.3689505018979237}}
{"text": "[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝¹ : One α\ninst✝ : TopologicalSpace X\nf : X → α\n⊢ mulTSupport f = ∅ ↔ f = 1\n[PROOFSTEP]\nrw [mulTSupport, closure_empty_iff, mulSupport_eq_empty_iff]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace α'\ninst✝² : One β\ninst✝¹ : One γ\ninst✝ : One δ\ng : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\n⊢ ¬x ∈ mulTSupport f ↔ f =ᶠ[𝓝 x] 1\n[PROOFSTEP]\nsimp_rw [mulTSupport, mem_closure_iff_nhds, not_forall, not_nonempty_iff_eq_empty, exists_prop, ←\n  disjoint_iff_inter_eq_empty, disjoint_mulSupport_iff, eventuallyEq_iff_exists_mem]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace α'\ninst✝² : One β\ninst✝¹ : One γ\ninst✝ : One δ\ng : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\n⊢ HasCompactMulSupport f ↔ IsCompact (closure (mulSupport f))\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace α'\ninst✝³ : One β\ninst✝² : One γ\ninst✝¹ : One δ\ng : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\ninst✝ : T2Space α\n⊢ (∃ K, IsCompact K ∧ ∀ (x : α), ¬x ∈ K → f x = 1) ↔ HasCompactMulSupport f\n[PROOFSTEP]\nsimp_rw [← nmem_mulSupport, ← mem_compl_iff, ← subset_def, compl_subset_compl, hasCompactMulSupport_def,\n  exists_compact_superset_iff]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace α'\ninst✝³ : One β\ninst✝² : One γ\ninst✝¹ : One δ\ng : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\ninst✝ : TopologicalSpace β\nh : HasCompactMulSupport f\nhf : Continuous f\n⊢ IsCompact (range f)\n[PROOFSTEP]\ncases' range_eq_image_mulTSupport_or f with h2 h2\n[GOAL]\ncase inl\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace α'\ninst✝³ : One β\ninst✝² : One γ\ninst✝¹ : One δ\ng : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\ninst✝ : TopologicalSpace β\nh : HasCompactMulSupport f\nhf : Continuous f\nh2 : range f = f '' mulTSupport f\n⊢ IsCompact (range f)\n[PROOFSTEP]\nrw [h2]\n[GOAL]\ncase inr\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace α'\ninst✝³ : One β\ninst✝² : One γ\ninst✝¹ : One δ\ng : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\ninst✝ : TopologicalSpace β\nh : HasCompactMulSupport f\nhf : Continuous f\nh2 : range f = insert 1 (f '' mulTSupport f)\n⊢ IsCompact (range f)\n[PROOFSTEP]\nrw [h2]\n[GOAL]\ncase inl\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace α'\ninst✝³ : One β\ninst✝² : One γ\ninst✝¹ : One δ\ng : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\ninst✝ : TopologicalSpace β\nh : HasCompactMulSupport f\nhf : Continuous f\nh2 : range f = f '' mulTSupport f\n⊢ IsCompact (f '' mulTSupport f)\ncase inr\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace α'\ninst✝³ : One β\ninst✝² : One γ\ninst✝¹ : One δ\ng : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\ninst✝ : TopologicalSpace β\nh : HasCompactMulSupport f\nhf : Continuous f\nh2 : range f = insert 1 (f '' mulTSupport f)\n⊢ IsCompact (insert 1 (f '' mulTSupport f))\n[PROOFSTEP]\nexacts [h.image hf, (h.image hf).insert 1]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace α'\ninst✝² : One β\ninst✝¹ : One γ\ninst✝ : One δ\ng : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\nhg : ∀ {x : β}, g x = 1 ↔ x = 1\n⊢ HasCompactMulSupport (g ∘ f) ↔ HasCompactMulSupport f\n[PROOFSTEP]\nsimp_rw [hasCompactMulSupport_def, mulSupport_comp_eq g (@hg) f]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace α'\ninst✝² : One β\ninst✝¹ : One γ\ninst✝ : One δ\ng✝ : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\nhf : HasCompactMulSupport f\ng : α' → α\nhg : ClosedEmbedding g\n⊢ HasCompactMulSupport (f ∘ g)\n[PROOFSTEP]\nrw [hasCompactMulSupport_def, Function.mulSupport_comp_eq_preimage]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace α'\ninst✝² : One β\ninst✝¹ : One γ\ninst✝ : One δ\ng✝ : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\nhf : HasCompactMulSupport f\ng : α' → α\nhg : ClosedEmbedding g\n⊢ IsCompact (closure (g ⁻¹' mulSupport f))\n[PROOFSTEP]\nrefine' isCompact_of_isClosed_subset (hg.isCompact_preimage hf) isClosed_closure _\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace α'\ninst✝² : One β\ninst✝¹ : One γ\ninst✝ : One δ\ng✝ : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\nhf : HasCompactMulSupport f\ng : α' → α\nhg : ClosedEmbedding g\n⊢ closure (g ⁻¹' mulSupport f) ⊆ g ⁻¹' mulTSupport f\n[PROOFSTEP]\nrw [hg.toEmbedding.closure_eq_preimage_closure_image]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace α'\ninst✝² : One β\ninst✝¹ : One γ\ninst✝ : One δ\ng✝ : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\nhf : HasCompactMulSupport f\ng : α' → α\nhg : ClosedEmbedding g\n⊢ g ⁻¹' closure (g '' (g ⁻¹' mulSupport f)) ⊆ g ⁻¹' mulTSupport f\n[PROOFSTEP]\nexact preimage_mono (closure_mono <| image_preimage_subset _ _)\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace α'\ninst✝² : One β\ninst✝¹ : One γ\ninst✝ : One δ\ng : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\nhf : HasCompactMulSupport f\nhf₂ : HasCompactMulSupport f₂\nhm : m 1 1 = 1\n⊢ HasCompactMulSupport fun x => m (f x) (f₂ x)\n[PROOFSTEP]\nrw [hasCompactMulSupport_iff_eventuallyEq] at hf hf₂ ⊢\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace α'\ninst✝² : One β\ninst✝¹ : One γ\ninst✝ : One δ\ng : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx : α\nhf : f =ᶠ[coclosedCompact α] 1\nhf₂ : f₂ =ᶠ[coclosedCompact α] 1\nhm : m 1 1 = 1\n⊢ (fun x => m (f x) (f₂ x)) =ᶠ[coclosedCompact α] 1\n[PROOFSTEP]\nfilter_upwards [hf, hf₂] using fun x hx hx₂ => by simp_rw [hx, hx₂, Pi.one_apply, hm]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace α'\ninst✝² : One β\ninst✝¹ : One γ\ninst✝ : One δ\ng : β → γ\nf : α → β\nf₂ : α → γ\nm : β → γ → δ\nx✝ : α\nhf : f =ᶠ[coclosedCompact α] 1\nhf₂ : f₂ =ᶠ[coclosedCompact α] 1\nhm : m 1 1 = 1\nx : α\nhx : f x = OfNat.ofNat 1 x\nhx₂ : f₂ x = OfNat.ofNat 1 x\n⊢ m (f x) (f₂ x) = OfNat.ofNat 1 x\n[PROOFSTEP]\nsimp_rw [hx, hx₂, Pi.one_apply, hm]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝³ : TopologicalSpace α\ninst✝² : MonoidWithZero R\ninst✝¹ : AddMonoid M\ninst✝ : DistribMulAction R M\nf : α → R\nf' : α → M\nx : α\nhf : HasCompactSupport f'\n⊢ HasCompactSupport (f • f')\n[PROOFSTEP]\nrw [hasCompactSupport_iff_eventuallyEq] at hf ⊢\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝³ : TopologicalSpace α\ninst✝² : MonoidWithZero R\ninst✝¹ : AddMonoid M\ninst✝ : DistribMulAction R M\nf : α → R\nf' : α → M\nx : α\nhf : f' =ᶠ[coclosedCompact α] 0\n⊢ f • f' =ᶠ[coclosedCompact α] 0\n[PROOFSTEP]\nexact hf.mono fun x hx => by simp_rw [Pi.smul_apply', hx, Pi.zero_apply, smul_zero]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝³ : TopologicalSpace α\ninst✝² : MonoidWithZero R\ninst✝¹ : AddMonoid M\ninst✝ : DistribMulAction R M\nf : α → R\nf' : α → M\nx✝ : α\nhf : f' =ᶠ[coclosedCompact α] 0\nx : α\nhx : f' x = OfNat.ofNat 0 x\n⊢ (f • f') x = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp_rw [Pi.smul_apply', hx, Pi.zero_apply, smul_zero]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝³ : TopologicalSpace α\ninst✝² : Zero R\ninst✝¹ : Zero M\ninst✝ : SMulWithZero R M\nf : α → R\nf' : α → M\nx : α\nhf : HasCompactSupport f\n⊢ HasCompactSupport (f • f')\n[PROOFSTEP]\nrw [hasCompactSupport_iff_eventuallyEq] at hf ⊢\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝³ : TopologicalSpace α\ninst✝² : Zero R\ninst✝¹ : Zero M\ninst✝ : SMulWithZero R M\nf : α → R\nf' : α → M\nx : α\nhf : f =ᶠ[coclosedCompact α] 0\n⊢ f • f' =ᶠ[coclosedCompact α] 0\n[PROOFSTEP]\nexact hf.mono fun x hx => by simp_rw [Pi.smul_apply', hx, Pi.zero_apply, zero_smul]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝³ : TopologicalSpace α\ninst✝² : Zero R\ninst✝¹ : Zero M\ninst✝ : SMulWithZero R M\nf : α → R\nf' : α → M\nx✝ : α\nhf : f =ᶠ[coclosedCompact α] 0\nx : α\nhx : f x = OfNat.ofNat 0 x\n⊢ (f • f') x = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp_rw [Pi.smul_apply', hx, Pi.zero_apply, zero_smul]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝³ : TopologicalSpace α\ninst✝² : Zero R\ninst✝¹ : Zero M\ninst✝ : SMulWithZero R M\nf : α → R\nf' : α → M\nx : α\nhf : HasCompactSupport f'\n⊢ HasCompactSupport (f • f')\n[PROOFSTEP]\nrw [hasCompactSupport_iff_eventuallyEq] at hf ⊢\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝³ : TopologicalSpace α\ninst✝² : Zero R\ninst✝¹ : Zero M\ninst✝ : SMulWithZero R M\nf : α → R\nf' : α → M\nx : α\nhf : f' =ᶠ[coclosedCompact α] 0\n⊢ f • f' =ᶠ[coclosedCompact α] 0\n[PROOFSTEP]\nrefine' hf.mono fun x hx => by simp_rw [Pi.smul_apply', hx, Pi.zero_apply, smul_zero]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝³ : TopologicalSpace α\ninst✝² : Zero R\ninst✝¹ : Zero M\ninst✝ : SMulWithZero R M\nf : α → R\nf' : α → M\nx✝ : α\nhf : f' =ᶠ[coclosedCompact α] 0\nx : α\nhx : f' x = OfNat.ofNat 0 x\n⊢ (f • f') x = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp_rw [Pi.smul_apply', hx, Pi.zero_apply, smul_zero]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝¹ : TopologicalSpace α\ninst✝ : MulZeroClass β\nf f' : α → β\nx : α\nhf : HasCompactSupport f\n⊢ HasCompactSupport (f * f')\n[PROOFSTEP]\nrw [hasCompactSupport_iff_eventuallyEq] at hf ⊢\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝¹ : TopologicalSpace α\ninst✝ : MulZeroClass β\nf f' : α → β\nx : α\nhf : f =ᶠ[coclosedCompact α] 0\n⊢ f * f' =ᶠ[coclosedCompact α] 0\n[PROOFSTEP]\nrefine' hf.mono fun x hx => by simp_rw [Pi.mul_apply, hx, Pi.zero_apply, zero_mul]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝¹ : TopologicalSpace α\ninst✝ : MulZeroClass β\nf f' : α → β\nx✝ : α\nhf : f =ᶠ[coclosedCompact α] 0\nx : α\nhx : f x = OfNat.ofNat 0 x\n⊢ (f * f') x = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp_rw [Pi.mul_apply, hx, Pi.zero_apply, zero_mul]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝¹ : TopologicalSpace α\ninst✝ : MulZeroClass β\nf f' : α → β\nx : α\nhf : HasCompactSupport f'\n⊢ HasCompactSupport (f * f')\n[PROOFSTEP]\nrw [hasCompactSupport_iff_eventuallyEq] at hf ⊢\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝¹ : TopologicalSpace α\ninst✝ : MulZeroClass β\nf f' : α → β\nx : α\nhf : f' =ᶠ[coclosedCompact α] 0\n⊢ f * f' =ᶠ[coclosedCompact α] 0\n[PROOFSTEP]\nrefine' hf.mono fun x hx => by simp_rw [Pi.mul_apply, hx, Pi.zero_apply, mul_zero]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\ninst✝¹ : TopologicalSpace α\ninst✝ : MulZeroClass β\nf f' : α → β\nx✝ : α\nhf : f' =ᶠ[coclosedCompact α] 0\nx : α\nhx : f' x = OfNat.ofNat 0 x\n⊢ (f * f') x = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp_rw [Pi.mul_apply, hx, Pi.zero_apply, mul_zero]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\n⊢ ∃ is n, n ∈ 𝓝 x ∧ n ⊆ ⋂ (i : ι) (_ : i ∈ is), U i ∧ ∀ (z : X), z ∈ n → (mulSupport fun i => f i z) ⊆ ↑is\n[PROOFSTEP]\nobtain ⟨n, hn, hnf⟩ := hlf x\n[GOAL]\ncase intro.intro\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\n⊢ ∃ is n, n ∈ 𝓝 x ∧ n ⊆ ⋂ (i : ι) (_ : i ∈ is), U i ∧ ∀ (z : X), z ∈ n → (mulSupport fun i => f i z) ⊆ ↑is\n[PROOFSTEP]\nclassical\nlet is := hnf.toFinset.filter fun i => x ∈ U i\nlet js := hnf.toFinset.filter fun j => x ∉ U j\nrefine'\n  ⟨is, (n ∩ ⋂ j ∈ js, (mulTSupport (f j))ᶜ) ∩ ⋂ i ∈ is, U i, inter_mem (inter_mem hn _) _, inter_subset_right _ _,\n    fun z hz => _⟩\n·\n  exact\n    (biInter_finset_mem js).mpr fun j hj =>\n      IsClosed.compl_mem_nhds (isClosed_mulTSupport _) (Set.not_mem_subset (hso j) (Finset.mem_filter.mp hj).2)\n· exact (biInter_finset_mem is).mpr fun i hi => (ho i).mem_nhds (Finset.mem_filter.mp hi).2\n· have hzn : z ∈ n := by\n    rw [inter_assoc] at hz \n    exact mem_of_mem_inter_left hz\n  replace hz := mem_of_mem_inter_right (mem_of_mem_inter_left hz)\n  simp only [Finset.mem_filter, Finite.mem_toFinset, mem_setOf_eq, mem_iInter, and_imp] at hz \n  suffices (mulSupport fun i => f i z) ⊆ hnf.toFinset\n    by\n    refine' hnf.toFinset.subset_coe_filter_of_subset_forall _ this fun i hi => _\n    specialize hz i ⟨z, ⟨hi, hzn⟩⟩\n    contrapose hz\n    simp [hz, subset_mulTSupport (f i) hi]\n  intro i hi\n  simp only [Finite.coe_toFinset, mem_setOf_eq]\n  exact ⟨z, ⟨hi, hzn⟩⟩\n[GOAL]\ncase intro.intro\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\n⊢ ∃ is n, n ∈ 𝓝 x ∧ n ⊆ ⋂ (i : ι) (_ : i ∈ is), U i ∧ ∀ (z : X), z ∈ n → (mulSupport fun i => f i z) ⊆ ↑is\n[PROOFSTEP]\nlet is := hnf.toFinset.filter fun i => x ∈ U i\n[GOAL]\ncase intro.intro\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\n⊢ ∃ is n, n ∈ 𝓝 x ∧ n ⊆ ⋂ (i : ι) (_ : i ∈ is), U i ∧ ∀ (z : X), z ∈ n → (mulSupport fun i => f i z) ⊆ ↑is\n[PROOFSTEP]\nlet js := hnf.toFinset.filter fun j => x ∉ U j\n[GOAL]\ncase intro.intro\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\n⊢ ∃ is n, n ∈ 𝓝 x ∧ n ⊆ ⋂ (i : ι) (_ : i ∈ is), U i ∧ ∀ (z : X), z ∈ n → (mulSupport fun i => f i z) ⊆ ↑is\n[PROOFSTEP]\nrefine'\n  ⟨is, (n ∩ ⋂ j ∈ js, (mulTSupport (f j))ᶜ) ∩ ⋂ i ∈ is, U i, inter_mem (inter_mem hn _) _, inter_subset_right _ _,\n    fun z hz => _⟩\n[GOAL]\ncase intro.intro.refine'_1\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\n⊢ ⋂ (j : ι) (_ : j ∈ js), (mulTSupport (f j))ᶜ ∈ 𝓝 x\n[PROOFSTEP]\nexact\n  (biInter_finset_mem js).mpr fun j hj =>\n    IsClosed.compl_mem_nhds (isClosed_mulTSupport _) (Set.not_mem_subset (hso j) (Finset.mem_filter.mp hj).2)\n[GOAL]\ncase intro.intro.refine'_2\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\n⊢ ⋂ (i : ι) (_ : i ∈ is), U i ∈ 𝓝 x\n[PROOFSTEP]\nexact (biInter_finset_mem is).mpr fun i hi => (ho i).mem_nhds (Finset.mem_filter.mp hi).2\n[GOAL]\ncase intro.intro.refine'_3\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhz : z ∈ (n ∩ ⋂ (j : ι) (_ : j ∈ js), (mulTSupport (f j))ᶜ) ∩ ⋂ (i : ι) (_ : i ∈ is), U i\n⊢ (mulSupport fun i => f i z) ⊆ ↑is\n[PROOFSTEP]\nhave hzn : z ∈ n := by\n  rw [inter_assoc] at hz \n  exact mem_of_mem_inter_left hz\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhz : z ∈ (n ∩ ⋂ (j : ι) (_ : j ∈ js), (mulTSupport (f j))ᶜ) ∩ ⋂ (i : ι) (_ : i ∈ is), U i\n⊢ z ∈ n\n[PROOFSTEP]\nrw [inter_assoc] at hz \n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhz : z ∈ n ∩ ((⋂ (j : ι) (_ : j ∈ js), (mulTSupport (f j))ᶜ) ∩ ⋂ (i : ι) (_ : i ∈ is), U i)\n⊢ z ∈ n\n[PROOFSTEP]\nexact mem_of_mem_inter_left hz\n[GOAL]\ncase intro.intro.refine'_3\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhz : z ∈ (n ∩ ⋂ (j : ι) (_ : j ∈ js), (mulTSupport (f j))ᶜ) ∩ ⋂ (i : ι) (_ : i ∈ is), U i\nhzn : z ∈ n\n⊢ (mulSupport fun i => f i z) ⊆ ↑is\n[PROOFSTEP]\nreplace hz := mem_of_mem_inter_right (mem_of_mem_inter_left hz)\n[GOAL]\ncase intro.intro.refine'_3\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhzn : z ∈ n\nhz : z ∈ ⋂ (j : ι) (_ : j ∈ js), (mulTSupport (f j))ᶜ\n⊢ (mulSupport fun i => f i z) ⊆ ↑is\n[PROOFSTEP]\nsimp only [Finset.mem_filter, Finite.mem_toFinset, mem_setOf_eq, mem_iInter, and_imp] at hz \n[GOAL]\ncase intro.intro.refine'_3\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhzn : z ∈ n\nhz : ∀ (i : ι), Set.Nonempty (mulSupport (f i) ∩ n) → ¬x ∈ U i → z ∈ (mulTSupport (f i))ᶜ\n⊢ (mulSupport fun i => f i z) ⊆ ↑is\n[PROOFSTEP]\nsuffices (mulSupport fun i => f i z) ⊆ hnf.toFinset\n  by\n  refine' hnf.toFinset.subset_coe_filter_of_subset_forall _ this fun i hi => _\n  specialize hz i ⟨z, ⟨hi, hzn⟩⟩\n  contrapose hz\n  simp [hz, subset_mulTSupport (f i) hi]\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhzn : z ∈ n\nhz : ∀ (i : ι), Set.Nonempty (mulSupport (f i) ∩ n) → ¬x ∈ U i → z ∈ (mulTSupport (f i))ᶜ\nthis : (mulSupport fun i => f i z) ⊆ ↑(Finite.toFinset hnf)\n⊢ (mulSupport fun i => f i z) ⊆ ↑is\n[PROOFSTEP]\nrefine' hnf.toFinset.subset_coe_filter_of_subset_forall _ this fun i hi => _\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhzn : z ∈ n\nhz : ∀ (i : ι), Set.Nonempty (mulSupport (f i) ∩ n) → ¬x ∈ U i → z ∈ (mulTSupport (f i))ᶜ\nthis : (mulSupport fun i => f i z) ⊆ ↑(Finite.toFinset hnf)\ni : ι\nhi : i ∈ mulSupport fun i => f i z\n⊢ x ∈ U i\n[PROOFSTEP]\nspecialize hz i ⟨z, ⟨hi, hzn⟩⟩\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhzn : z ∈ n\nthis : (mulSupport fun i => f i z) ⊆ ↑(Finite.toFinset hnf)\ni : ι\nhi : i ∈ mulSupport fun i => f i z\nhz : ¬x ∈ U i → z ∈ (mulTSupport (f i))ᶜ\n⊢ x ∈ U i\n[PROOFSTEP]\ncontrapose hz\n[GOAL]\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhzn : z ∈ n\nthis : (mulSupport fun i => f i z) ⊆ ↑(Finite.toFinset hnf)\ni : ι\nhi : i ∈ mulSupport fun i => f i z\nhz : ¬x ∈ U i\n⊢ ¬(¬x ∈ U i → z ∈ (mulTSupport (f i))ᶜ)\n[PROOFSTEP]\nsimp [hz, subset_mulTSupport (f i) hi]\n[GOAL]\ncase intro.intro.refine'_3\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhzn : z ∈ n\nhz : ∀ (i : ι), Set.Nonempty (mulSupport (f i) ∩ n) → ¬x ∈ U i → z ∈ (mulTSupport (f i))ᶜ\n⊢ (mulSupport fun i => f i z) ⊆ ↑(Finite.toFinset hnf)\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase intro.intro.refine'_3\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhzn : z ∈ n\nhz : ∀ (i : ι), Set.Nonempty (mulSupport (f i) ∩ n) → ¬x ∈ U i → z ∈ (mulTSupport (f i))ᶜ\ni : ι\nhi : i ∈ mulSupport fun i => f i z\n⊢ i ∈ ↑(Finite.toFinset hnf)\n[PROOFSTEP]\nsimp only [Finite.coe_toFinset, mem_setOf_eq]\n[GOAL]\ncase intro.intro.refine'_3\nX : Type u_1\nα : Type u_2\nα' : Type u_3\nβ : Type u_4\nγ : Type u_5\nδ : Type u_6\nM : Type u_7\nE : Type u_8\nR : Type u_9\nι : Type u_10\nU : ι → Set X\ninst✝¹ : TopologicalSpace X\ninst✝ : One R\nf : ι → X → R\nhlf : LocallyFinite fun i => mulSupport (f i)\nhso : ∀ (i : ι), mulTSupport (f i) ⊆ U i\nho : ∀ (i : ι), IsOpen (U i)\nx : X\nn : Set X\nhn : n ∈ 𝓝 x\nhnf : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}\nis : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)\njs : Finset ι := Finset.filter (fun j => ¬x ∈ U j) (Finite.toFinset hnf)\nz : X\nhzn : z ∈ n\nhz : ∀ (i : ι), Set.Nonempty (mulSupport (f i) ∩ n) → ¬x ∈ U i → z ∈ (mulTSupport (f i))ᶜ\ni : ι\nhi : i ∈ mulSupport fun i => f i z\n⊢ Set.Nonempty (mulSupport (f i) ∩ n)\n[PROOFSTEP]\nexact ⟨z, ⟨hi, hzn⟩⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.Support", "llama_tokens": 15331, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6654105454764746, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.3689504945399124}}
{"text": "[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nx : α\nu : Fin m → α\ni : Fin m\n⊢ vecCons x u (Fin.succ i) = u i\n[PROOFSTEP]\nsimp [vecCons]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ni : ℕ\nh : Nat.succ i < Nat.succ m\nx : α\nu : Fin m → α\n⊢ vecCons x u { val := Nat.succ i, isLt := h } = u { val := i, isLt := (_ : i < m) }\n[PROOFSTEP]\nsimp only [vecCons, Fin.cons, Fin.cases_succ']\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nx : α\nu : Fin m → α\n⊢ vecTail (vecCons x u) = u\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nx : α\nu : Fin m → α\nx✝ : Fin m\n⊢ vecTail (vecCons x u) x✝ = u x✝\n[PROOFSTEP]\nsimp [vecTail]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nx : α\nu : Fin n → α\ny : α\n⊢ y ∈ Set.range (vecCons x u) ↔ y ∈ {x} ∪ Set.range u\n[PROOFSTEP]\nsimp [Fin.exists_fin_succ, eq_comm]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nx : α\nu : Fin 0 → α\n⊢ Set.range (vecCons x u) = {x}\n[PROOFSTEP]\nrw [range_cons, range_empty, Set.union_empty]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nx y : α\nu : Fin 0 → α\n⊢ Set.range (vecCons x (vecCons y u)) = {x, y}\n[PROOFSTEP]\nrw [range_cons, range_cons_empty, Set.singleton_union]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nx : α\nu : Fin 0 → α\n⊢ ∀ (i : Fin 1), vecCons x u i = x\n[PROOFSTEP]\nrw [Fin.forall_fin_one]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nx : α\nu : Fin 0 → α\n⊢ vecCons x u 0 = x\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u\nm n o✝ : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nα : Type u_4\no : ℕ\nho : o = m + n\nu : Fin m → α\nv : Fin n → α\n⊢ vecAppend ho u v = fun i =>\n    if h : ↑i < m then u { val := ↑i, isLt := h } else v { val := ↑i - m, isLt := (_ : ↑i - m < n) }\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα✝ : Type u\nm n o✝ : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nα : Type u_4\no : ℕ\nho : o = m + n\nu : Fin m → α\nv : Fin n → α\ni : Fin o\n⊢ vecAppend ho u v i = if h : ↑i < m then u { val := ↑i, isLt := h } else v { val := ↑i - m, isLt := (_ : ↑i - m < n) }\n[PROOFSTEP]\nrw [vecAppend, Fin.append, Function.comp_apply, Fin.addCases]\n[GOAL]\ncase h\nα✝ : Type u\nm n o✝ : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nα : Type u_4\no : ℕ\nho : o = m + n\nu : Fin m → α\nv : Fin n → α\ni : Fin o\n⊢ (if hi : ↑(↑(Fin.castIso ho) i) < m then\n      (_ : Fin.castAdd n (Fin.castLT (↑(Fin.castIso ho) i) hi) = ↑(Fin.castIso ho) i) ▸\n        u (Fin.castLT (↑(Fin.castIso ho) i) hi)\n    else\n      (_ :\n          Fin.natAdd m\n              (Fin.subNat m (Fin.cast (_ : m + n = n + m) (↑(Fin.castIso ho) i)) (_ : m ≤ ↑(↑(Fin.castIso ho) i))) =\n            ↑(Fin.castIso ho) i) ▸\n        v (Fin.subNat m (Fin.cast (_ : m + n = n + m) (↑(Fin.castIso ho) i)) (_ : m ≤ ↑(↑(Fin.castIso ho) i)))) =\n    if h : ↑i < m then u { val := ↑i, isLt := h } else v { val := ↑i - m, isLt := (_ : ↑i - m < n) }\n[PROOFSTEP]\ncongr with hi\n[GOAL]\ncase h.e_e.h\nα✝ : Type u\nm n o✝ : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nα : Type u_4\no : ℕ\nho : o = m + n\nu : Fin m → α\nv : Fin n → α\ni : Fin o\nhi : ¬↑(↑(Fin.castIso ho) i) < m\n⊢ (_ :\n        Fin.natAdd m\n            (Fin.subNat m (Fin.cast (_ : m + n = n + m) (↑(Fin.castIso ho) i)) (_ : m ≤ ↑(↑(Fin.castIso ho) i))) =\n          ↑(Fin.castIso ho) i) ▸\n      v (Fin.subNat m (Fin.cast (_ : m + n = n + m) (↑(Fin.castIso ho) i)) (_ : m ≤ ↑(↑(Fin.castIso ho) i))) =\n    v { val := ↑i - m, isLt := (_ : ↑i - m < n) }\n[PROOFSTEP]\nsimp only [eq_rec_constant]\n[GOAL]\ncase h.e_e.h\nα✝ : Type u\nm n o✝ : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nα : Type u_4\no : ℕ\nho : o = m + n\nu : Fin m → α\nv : Fin n → α\ni : Fin o\nhi : ¬↑(↑(Fin.castIso ho) i) < m\n⊢ v (Fin.subNat m (Fin.cast (_ : m + n = n + m) (↑(Fin.castIso ho) i)) (_ : m ≤ ↑(↑(Fin.castIso ho) i))) =\n    v { val := ↑i - m, isLt := (_ : ↑i - m < n) }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\n⊢ vecAppend (_ : n = 0 + n) ![] v = v\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\nx✝ : Fin n\n⊢ vecAppend (_ : n = 0 + n) ![] v x✝ = v x✝\n[PROOFSTEP]\nsimp [vecAppend_eq_ite]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nho : o + 1 = m + 1 + n\nx : α\nu : Fin m → α\nv : Fin n → α\n⊢ o = m + n\n[PROOFSTEP]\nrwa [add_assoc, add_comm 1, ← add_assoc, add_right_cancel_iff] at ho \n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nho : o + 1 = m + 1 + n\nx : α\nu : Fin m → α\nv : Fin n → α\n⊢ vecAppend ho (vecCons x u) v = vecCons x (vecAppend (_ : o = m + n) u v)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nho : o + 1 = m + 1 + n\nx : α\nu : Fin m → α\nv : Fin n → α\ni : Fin (o + 1)\n⊢ vecAppend ho (vecCons x u) v i = vecCons x (vecAppend (_ : o = m + n) u v) i\n[PROOFSTEP]\nsimp_rw [vecAppend_eq_ite]\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nho : o + 1 = m + 1 + n\nx : α\nu : Fin m → α\nv : Fin n → α\ni : Fin (o + 1)\n⊢ (if h : ↑i < m + 1 then vecCons x u { val := ↑i, isLt := h }\n    else v { val := ↑i - (m + 1), isLt := (_ : ↑i - (m + 1) < n) }) =\n    vecCons x\n      (fun i => if h : ↑i < m then u { val := ↑i, isLt := h } else v { val := ↑i - m, isLt := (_ : ↑i - m < n) }) i\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nho : o + 1 = m + 1 + n\nx : α\nu : Fin m → α\nv : Fin n → α\ni : Fin (o + 1)\nh : ↑i < m + 1\n⊢ vecCons x u { val := ↑i, isLt := h } =\n    vecCons x\n      (fun i => if h : ↑i < m then u { val := ↑i, isLt := h } else v { val := ↑i - m, isLt := (_ : ↑i - m < n) }) i\n[PROOFSTEP]\nrcases i with ⟨⟨⟩ | i, hi⟩\n[GOAL]\ncase pos.mk.zero\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nho : o + 1 = m + 1 + n\nx : α\nu : Fin m → α\nv : Fin n → α\nhi : Nat.zero < o + 1\nh : ↑{ val := Nat.zero, isLt := hi } < m + 1\n⊢ vecCons x u { val := ↑{ val := Nat.zero, isLt := hi }, isLt := h } =\n    vecCons x\n      (fun i => if h : ↑i < m then u { val := ↑i, isLt := h } else v { val := ↑i - m, isLt := (_ : ↑i - m < n) })\n      { val := Nat.zero, isLt := hi }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos.mk.succ\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nho : o + 1 = m + 1 + n\nx : α\nu : Fin m → α\nv : Fin n → α\ni : ℕ\nhi : Nat.succ i < o + 1\nh : ↑{ val := Nat.succ i, isLt := hi } < m + 1\n⊢ vecCons x u { val := ↑{ val := Nat.succ i, isLt := hi }, isLt := h } =\n    vecCons x\n      (fun i => if h : ↑i < m then u { val := ↑i, isLt := h } else v { val := ↑i - m, isLt := (_ : ↑i - m < n) })\n      { val := Nat.succ i, isLt := hi }\n[PROOFSTEP]\nsimp only [Nat.succ_eq_add_one, add_lt_add_iff_right, Fin.val_mk] at h \n[GOAL]\ncase pos.mk.succ\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nho : o + 1 = m + 1 + n\nx : α\nu : Fin m → α\nv : Fin n → α\ni : ℕ\nhi : Nat.succ i < o + 1\nh✝ : ↑{ val := Nat.succ i, isLt := hi } < m + 1\nh : i < m\n⊢ vecCons x u { val := ↑{ val := Nat.succ i, isLt := hi }, isLt := h✝ } =\n    vecCons x\n      (fun i => if h : ↑i < m then u { val := ↑i, isLt := h } else v { val := ↑i - m, isLt := (_ : ↑i - m < n) })\n      { val := Nat.succ i, isLt := hi }\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nho : o + 1 = m + 1 + n\nx : α\nu : Fin m → α\nv : Fin n → α\ni : Fin (o + 1)\nh : ¬↑i < m + 1\n⊢ v { val := ↑i - (m + 1), isLt := (_ : ↑i - (m + 1) < n) } =\n    vecCons x\n      (fun i => if h : ↑i < m then u { val := ↑i, isLt := h } else v { val := ↑i - m, isLt := (_ : ↑i - m < n) }) i\n[PROOFSTEP]\nrcases i with ⟨⟨⟩ | i, hi⟩\n[GOAL]\ncase neg.mk.zero\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nho : o + 1 = m + 1 + n\nx : α\nu : Fin m → α\nv : Fin n → α\nhi : Nat.zero < o + 1\nh : ¬↑{ val := Nat.zero, isLt := hi } < m + 1\n⊢ v\n      { val := ↑{ val := Nat.zero, isLt := hi } - (m + 1),\n        isLt := (_ : ↑{ val := Nat.zero, isLt := hi } - (m + 1) < n) } =\n    vecCons x\n      (fun i => if h : ↑i < m then u { val := ↑i, isLt := h } else v { val := ↑i - m, isLt := (_ : ↑i - m < n) })\n      { val := Nat.zero, isLt := hi }\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase neg.mk.succ\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nho : o + 1 = m + 1 + n\nx : α\nu : Fin m → α\nv : Fin n → α\ni : ℕ\nhi : Nat.succ i < o + 1\nh : ¬↑{ val := Nat.succ i, isLt := hi } < m + 1\n⊢ v\n      { val := ↑{ val := Nat.succ i, isLt := hi } - (m + 1),\n        isLt := (_ : ↑{ val := Nat.succ i, isLt := hi } - (m + 1) < n) } =\n    vecCons x\n      (fun i => if h : ↑i < m then u { val := ↑i, isLt := h } else v { val := ↑i - m, isLt := (_ : ↑i - m < n) })\n      { val := Nat.succ i, isLt := hi }\n[PROOFSTEP]\nrw [not_lt, Fin.val_mk, Nat.succ_eq_add_one, add_le_add_iff_right] at h \n[GOAL]\ncase neg.mk.succ\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nho : o + 1 = m + 1 + n\nx : α\nu : Fin m → α\nv : Fin n → α\ni : ℕ\nhi : Nat.succ i < o + 1\nh✝ : ¬↑{ val := Nat.succ i, isLt := hi } < m + 1\nh : m ≤ i\n⊢ v\n      { val := ↑{ val := Nat.succ i, isLt := hi } - (m + 1),\n        isLt := (_ : ↑{ val := Nat.succ i, isLt := hi } - (m + 1) < n) } =\n    vecCons x\n      (fun i => if h : ↑i < m then u { val := ↑i, isLt := h } else v { val := ↑i - m, isLt := (_ : ↑i - m < n) })\n      { val := Nat.succ i, isLt := hi }\n[PROOFSTEP]\nsimp [h, not_lt.2 h]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\n⊢ vecAlt0 (_ : n + n = n + n) (vecAppend (_ : n + n = n + n) v v) = v ∘ bit0\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\ni : Fin n\n⊢ vecAlt0 (_ : n + n = n + n) (vecAppend (_ : n + n = n + n) v v) i = (v ∘ bit0) i\n[PROOFSTEP]\nsimp_rw [Function.comp, bit0, vecAlt0, vecAppend_eq_ite]\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\ni : Fin n\n⊢ (if h : ↑i + ↑i < n then v { val := ↑i + ↑i, isLt := (_ : ↑{ val := ↑i + ↑i, isLt := (_ : ↑i + ↑i < n + n) } < n) }\n    else v { val := ↑i + ↑i - n, isLt := (_ : ↑{ val := ↑i + ↑i, isLt := (_ : ↑i + ↑i < n + n) } - n < n) }) =\n    v (i + i)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\ni : Fin n\nh : ↑i + ↑i < n\n⊢ v { val := ↑i + ↑i, isLt := (_ : ↑{ val := ↑i + ↑i, isLt := (_ : ↑i + ↑i < n + n) } < n) } = v (i + i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase neg\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\ni : Fin n\nh : ¬↑i + ↑i < n\n⊢ v { val := ↑i + ↑i - n, isLt := (_ : ↑{ val := ↑i + ↑i, isLt := (_ : ↑i + ↑i < n + n) } - n < n) } = v (i + i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase pos.e_a.e_val\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\ni : Fin n\nh : ↑i + ↑i < n\n⊢ ↑i + ↑i = (↑i + ↑i) % n\n[PROOFSTEP]\nrw [Fin.val_mk] at h \n[GOAL]\ncase pos.e_a.e_val\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\ni : Fin n\nh : ↑i + ↑i < n\n⊢ ↑i + ↑i = (↑i + ↑i) % n\n[PROOFSTEP]\nexact (Nat.mod_eq_of_lt h).symm\n[GOAL]\ncase neg.e_a.e_val\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\ni : Fin n\nh : ¬↑i + ↑i < n\n⊢ ↑i + ↑i - n = (↑i + ↑i) % n\n[PROOFSTEP]\nrw [Fin.val_mk, not_lt] at h \n[GOAL]\ncase neg.e_a.e_val\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\ni : Fin n\nh : n ≤ ↑i + ↑i\n⊢ ↑i + ↑i - n = (↑i + ↑i) % n\n[PROOFSTEP]\nsimp only [Fin.ext_iff, Fin.val_add, Fin.val_mk, Nat.mod_eq_sub_mod h]\n[GOAL]\ncase neg.e_a.e_val\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\ni : Fin n\nh : n ≤ ↑i + ↑i\n⊢ ↑i + ↑i - n = (↑i + ↑i - n) % n\n[PROOFSTEP]\nrefine' (Nat.mod_eq_of_lt _).symm\n[GOAL]\ncase neg.e_a.e_val\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\ni : Fin n\nh : n ≤ ↑i + ↑i\n⊢ ↑i + ↑i - n < n\n[PROOFSTEP]\nrw [tsub_lt_iff_left h]\n[GOAL]\ncase neg.e_a.e_val\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin n → α\ni : Fin n\nh : n ≤ ↑i + ↑i\n⊢ ↑i + ↑i < n + n\n[PROOFSTEP]\nexact add_lt_add i.2 i.2\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin (n + 1) → α\n⊢ vecAlt1 (_ : n + 1 + (n + 1) = n + 1 + (n + 1)) (vecAppend (_ : n + 1 + (n + 1) = n + 1 + (n + 1)) v v) = v ∘ bit1\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin (n + 1) → α\ni : Fin (n + 1)\n⊢ vecAlt1 (_ : n + 1 + (n + 1) = n + 1 + (n + 1)) (vecAppend (_ : n + 1 + (n + 1) = n + 1 + (n + 1)) v v) i =\n    (v ∘ bit1) i\n[PROOFSTEP]\nsimp_rw [Function.comp, vecAlt1, vecAppend_eq_ite]\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin (n + 1) → α\ni : Fin (n + 1)\n⊢ (if h : ↑i + ↑i + 1 < n + 1 then\n      v\n        { val := ↑i + ↑i + 1,\n          isLt := (_ : ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < n + 1 + (n + 1)) } < n + 1) }\n    else\n      v\n        { val := ↑i + ↑i + 1 - (n + 1),\n          isLt := (_ : ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < n + 1 + (n + 1)) } - (n + 1) < n + 1) }) =\n    v (bit1 i)\n[PROOFSTEP]\ncases n with\n| zero =>\n  cases' i with i hi\n  simp only [Nat.zero_eq, zero_add, Nat.lt_one_iff] at hi ; subst i; rfl\n| succ n =>\n  split_ifs with h <;> simp_rw [bit1, bit0] <;> congr\n  · rw [Fin.val_mk] at h \n    rw [Nat.mod_eq_of_lt (Nat.lt_of_succ_lt h)]\n    erw [Nat.mod_eq_of_lt h]\n  · rw [Fin.val_mk, not_lt] at h \n    simp only [Fin.ext_iff, Fin.val_add, Fin.val_mk, Nat.mod_add_mod, Fin.val_one, Nat.mod_eq_sub_mod h,\n      show 1 % (n + 2) = 1 from Nat.mod_eq_of_lt (by simp)]\n    refine (Nat.mod_eq_of_lt ?_).symm\n    rw [tsub_lt_iff_left h]\n    exact Nat.add_succ_lt_add i.2 i.2\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin (n + 1) → α\ni : Fin (n + 1)\n⊢ (if h : ↑i + ↑i + 1 < n + 1 then\n      v\n        { val := ↑i + ↑i + 1,\n          isLt := (_ : ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < n + 1 + (n + 1)) } < n + 1) }\n    else\n      v\n        { val := ↑i + ↑i + 1 - (n + 1),\n          isLt := (_ : ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < n + 1 + (n + 1)) } - (n + 1) < n + 1) }) =\n    v (bit1 i)\n[PROOFSTEP]\ncases n with\n| zero =>\n  cases' i with i hi\n  simp only [Nat.zero_eq, zero_add, Nat.lt_one_iff] at hi ; subst i; rfl\n| succ n =>\n  split_ifs with h <;> simp_rw [bit1, bit0] <;> congr\n  · rw [Fin.val_mk] at h \n    rw [Nat.mod_eq_of_lt (Nat.lt_of_succ_lt h)]\n    erw [Nat.mod_eq_of_lt h]\n  · rw [Fin.val_mk, not_lt] at h \n    simp only [Fin.ext_iff, Fin.val_add, Fin.val_mk, Nat.mod_add_mod, Fin.val_one, Nat.mod_eq_sub_mod h,\n      show 1 % (n + 2) = 1 from Nat.mod_eq_of_lt (by simp)]\n    refine (Nat.mod_eq_of_lt ?_).symm\n    rw [tsub_lt_iff_left h]\n    exact Nat.add_succ_lt_add i.2 i.2\n[GOAL]\ncase h.zero\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin (Nat.zero + 1) → α\ni : Fin (Nat.zero + 1)\n⊢ (if h : ↑i + ↑i + 1 < Nat.zero + 1 then\n      v\n        { val := ↑i + ↑i + 1,\n          isLt :=\n            (_ : ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < Nat.zero + 1 + (Nat.zero + 1)) } < Nat.zero + 1) }\n    else\n      v\n        { val := ↑i + ↑i + 1 - (Nat.zero + 1),\n          isLt :=\n            (_ :\n              ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < Nat.zero + 1 + (Nat.zero + 1)) } - (Nat.zero + 1) <\n                Nat.zero + 1) }) =\n    v (bit1 i)\n[PROOFSTEP]\n\n| zero =>\n  cases' i with i hi\n  simp only [Nat.zero_eq, zero_add, Nat.lt_one_iff] at hi ; subst i; rfl\n[GOAL]\ncase h.zero\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin (Nat.zero + 1) → α\ni : Fin (Nat.zero + 1)\n⊢ (if h : ↑i + ↑i + 1 < Nat.zero + 1 then\n      v\n        { val := ↑i + ↑i + 1,\n          isLt :=\n            (_ : ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < Nat.zero + 1 + (Nat.zero + 1)) } < Nat.zero + 1) }\n    else\n      v\n        { val := ↑i + ↑i + 1 - (Nat.zero + 1),\n          isLt :=\n            (_ :\n              ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < Nat.zero + 1 + (Nat.zero + 1)) } - (Nat.zero + 1) <\n                Nat.zero + 1) }) =\n    v (bit1 i)\n[PROOFSTEP]\ncases' i with i hi\n[GOAL]\ncase h.zero.mk\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin (Nat.zero + 1) → α\ni : ℕ\nhi : i < Nat.zero + 1\n⊢ (if h : ↑{ val := i, isLt := hi } + ↑{ val := i, isLt := hi } + 1 < Nat.zero + 1 then\n      v\n        { val := ↑{ val := i, isLt := hi } + ↑{ val := i, isLt := hi } + 1,\n          isLt :=\n            (_ :\n              ↑{ val := ↑{ val := i, isLt := hi } + ↑{ val := i, isLt := hi } + 1,\n                    isLt :=\n                      (_ :\n                        ↑{ val := i, isLt := hi } + ↑{ val := i, isLt := hi } + 1 < Nat.zero + 1 + (Nat.zero + 1)) } <\n                Nat.zero + 1) }\n    else\n      v\n        { val := ↑{ val := i, isLt := hi } + ↑{ val := i, isLt := hi } + 1 - (Nat.zero + 1),\n          isLt :=\n            (_ :\n              ↑{ val := ↑{ val := i, isLt := hi } + ↑{ val := i, isLt := hi } + 1,\n                      isLt :=\n                        (_ :\n                          ↑{ val := i, isLt := hi } + ↑{ val := i, isLt := hi } + 1 < Nat.zero + 1 + (Nat.zero + 1)) } -\n                  (Nat.zero + 1) <\n                Nat.zero + 1) }) =\n    v (bit1 { val := i, isLt := hi })\n[PROOFSTEP]\nsimp only [Nat.zero_eq, zero_add, Nat.lt_one_iff] at hi \n[GOAL]\ncase h.zero.mk\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin (Nat.zero + 1) → α\ni : ℕ\nhi✝ : i < Nat.zero + 1\nhi : i = 0\n⊢ (if h : ↑{ val := i, isLt := hi✝ } + ↑{ val := i, isLt := hi✝ } + 1 < Nat.zero + 1 then\n      v\n        { val := ↑{ val := i, isLt := hi✝ } + ↑{ val := i, isLt := hi✝ } + 1,\n          isLt :=\n            (_ :\n              ↑{ val := ↑{ val := i, isLt := hi✝ } + ↑{ val := i, isLt := hi✝ } + 1,\n                    isLt :=\n                      (_ :\n                        ↑{ val := i, isLt := hi✝ } + ↑{ val := i, isLt := hi✝ } + 1 < Nat.zero + 1 + (Nat.zero + 1)) } <\n                Nat.zero + 1) }\n    else\n      v\n        { val := ↑{ val := i, isLt := hi✝ } + ↑{ val := i, isLt := hi✝ } + 1 - (Nat.zero + 1),\n          isLt :=\n            (_ :\n              ↑{ val := ↑{ val := i, isLt := hi✝ } + ↑{ val := i, isLt := hi✝ } + 1,\n                      isLt :=\n                        (_ :\n                          ↑{ val := i, isLt := hi✝ } + ↑{ val := i, isLt := hi✝ } + 1 <\n                            Nat.zero + 1 + (Nat.zero + 1)) } -\n                  (Nat.zero + 1) <\n                Nat.zero + 1) }) =\n    v (bit1 { val := i, isLt := hi✝ })\n[PROOFSTEP]\nsubst i\n[GOAL]\ncase h.zero.mk\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nv : Fin (Nat.zero + 1) → α\nhi : 0 < Nat.zero + 1\n⊢ (if h : ↑{ val := 0, isLt := hi } + ↑{ val := 0, isLt := hi } + 1 < Nat.zero + 1 then\n      v\n        { val := ↑{ val := 0, isLt := hi } + ↑{ val := 0, isLt := hi } + 1,\n          isLt :=\n            (_ :\n              ↑{ val := ↑{ val := 0, isLt := hi } + ↑{ val := 0, isLt := hi } + 1,\n                    isLt :=\n                      (_ :\n                        ↑{ val := 0, isLt := hi } + ↑{ val := 0, isLt := hi } + 1 < Nat.zero + 1 + (Nat.zero + 1)) } <\n                Nat.zero + 1) }\n    else\n      v\n        { val := ↑{ val := 0, isLt := hi } + ↑{ val := 0, isLt := hi } + 1 - (Nat.zero + 1),\n          isLt :=\n            (_ :\n              ↑{ val := ↑{ val := 0, isLt := hi } + ↑{ val := 0, isLt := hi } + 1,\n                      isLt :=\n                        (_ :\n                          ↑{ val := 0, isLt := hi } + ↑{ val := 0, isLt := hi } + 1 < Nat.zero + 1 + (Nat.zero + 1)) } -\n                  (Nat.zero + 1) <\n                Nat.zero + 1) }) =\n    v (bit1 { val := 0, isLt := hi })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.succ\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\n⊢ (if h : ↑i + ↑i + 1 < Nat.succ n + 1 then\n      v\n        { val := ↑i + ↑i + 1,\n          isLt :=\n            (_ :\n              ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < Nat.succ n + 1 + (Nat.succ n + 1)) } < Nat.succ n + 1) }\n    else\n      v\n        { val := ↑i + ↑i + 1 - (Nat.succ n + 1),\n          isLt :=\n            (_ :\n              ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < Nat.succ n + 1 + (Nat.succ n + 1)) } -\n                  (Nat.succ n + 1) <\n                Nat.succ n + 1) }) =\n    v (bit1 i)\n[PROOFSTEP]\n\n| succ n =>\n  split_ifs with h <;> simp_rw [bit1, bit0] <;> congr\n  · rw [Fin.val_mk] at h \n    rw [Nat.mod_eq_of_lt (Nat.lt_of_succ_lt h)]\n    erw [Nat.mod_eq_of_lt h]\n  · rw [Fin.val_mk, not_lt] at h \n    simp only [Fin.ext_iff, Fin.val_add, Fin.val_mk, Nat.mod_add_mod, Fin.val_one, Nat.mod_eq_sub_mod h,\n      show 1 % (n + 2) = 1 from Nat.mod_eq_of_lt (by simp)]\n    refine (Nat.mod_eq_of_lt ?_).symm\n    rw [tsub_lt_iff_left h]\n    exact Nat.add_succ_lt_add i.2 i.2\n[GOAL]\ncase h.succ\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\n⊢ (if h : ↑i + ↑i + 1 < Nat.succ n + 1 then\n      v\n        { val := ↑i + ↑i + 1,\n          isLt :=\n            (_ :\n              ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < Nat.succ n + 1 + (Nat.succ n + 1)) } < Nat.succ n + 1) }\n    else\n      v\n        { val := ↑i + ↑i + 1 - (Nat.succ n + 1),\n          isLt :=\n            (_ :\n              ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < Nat.succ n + 1 + (Nat.succ n + 1)) } -\n                  (Nat.succ n + 1) <\n                Nat.succ n + 1) }) =\n    v (bit1 i)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : ↑i + ↑i + 1 < Nat.succ n + 1\n⊢ v\n      { val := ↑i + ↑i + 1,\n        isLt :=\n          (_ :\n            ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < Nat.succ n + 1 + (Nat.succ n + 1)) } < Nat.succ n + 1) } =\n    v (bit1 i)\n[PROOFSTEP]\nsimp_rw [bit1, bit0]\n[GOAL]\ncase neg\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : ¬↑i + ↑i + 1 < Nat.succ n + 1\n⊢ v\n      { val := ↑i + ↑i + 1 - (Nat.succ n + 1),\n        isLt :=\n          (_ :\n            ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < Nat.succ n + 1 + (Nat.succ n + 1)) } - (Nat.succ n + 1) <\n              Nat.succ n + 1) } =\n    v (bit1 i)\n[PROOFSTEP]\nsimp_rw [bit1, bit0]\n[GOAL]\ncase pos\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : ↑i + ↑i + 1 < Nat.succ n + 1\n⊢ v\n      { val := ↑i + ↑i + 1,\n        isLt :=\n          (_ :\n            ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < Nat.succ n + 1 + (Nat.succ n + 1)) } < Nat.succ n + 1) } =\n    v (i + i + 1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase neg\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : ¬↑i + ↑i + 1 < Nat.succ n + 1\n⊢ v\n      { val := ↑i + ↑i + 1 - (Nat.succ n + 1),\n        isLt :=\n          (_ :\n            ↑{ val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < Nat.succ n + 1 + (Nat.succ n + 1)) } - (Nat.succ n + 1) <\n              Nat.succ n + 1) } =\n    v (i + i + 1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase pos.e_a.e_val\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : ↑i + ↑i + 1 < Nat.succ n + 1\n⊢ ↑i + ↑i + 1 = ((↑i + ↑i) % (Nat.succ n + 1) + 1 % (Nat.succ n + 1)) % (Nat.succ n + 1)\n[PROOFSTEP]\nrw [Fin.val_mk] at h \n[GOAL]\ncase pos.e_a.e_val\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : ↑i + ↑i + 1 < Nat.succ n + 1\n⊢ ↑i + ↑i + 1 = ((↑i + ↑i) % (Nat.succ n + 1) + 1 % (Nat.succ n + 1)) % (Nat.succ n + 1)\n[PROOFSTEP]\nrw [Nat.mod_eq_of_lt (Nat.lt_of_succ_lt h)]\n[GOAL]\ncase pos.e_a.e_val\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : ↑i + ↑i + 1 < Nat.succ n + 1\n⊢ ↑i + ↑i + 1 = (↑i + ↑i + 1 % (Nat.succ n + 1)) % (Nat.succ n + 1)\n[PROOFSTEP]\nerw [Nat.mod_eq_of_lt h]\n[GOAL]\ncase neg.e_a.e_val\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : ¬↑i + ↑i + 1 < Nat.succ n + 1\n⊢ ↑i + ↑i + 1 - (Nat.succ n + 1) = ((↑i + ↑i) % (Nat.succ n + 1) + 1 % (Nat.succ n + 1)) % (Nat.succ n + 1)\n[PROOFSTEP]\nrw [Fin.val_mk, not_lt] at h \n[GOAL]\ncase neg.e_a.e_val\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : Nat.succ n + 1 ≤ ↑i + ↑i + 1\n⊢ ↑i + ↑i + 1 - (Nat.succ n + 1) = ((↑i + ↑i) % (Nat.succ n + 1) + 1 % (Nat.succ n + 1)) % (Nat.succ n + 1)\n[PROOFSTEP]\nsimp only [Fin.ext_iff, Fin.val_add, Fin.val_mk, Nat.mod_add_mod, Fin.val_one, Nat.mod_eq_sub_mod h,\n  show 1 % (n + 2) = 1 from Nat.mod_eq_of_lt (by simp)]\n[GOAL]\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : Nat.succ n + 1 ≤ ↑i + ↑i + 1\n⊢ 1 < n + 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.e_a.e_val\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : Nat.succ n + 1 ≤ ↑i + ↑i + 1\n⊢ ↑i + ↑i + 1 - (Nat.succ n + 1) = (↑i + ↑i + 1 - (Nat.succ n + 1)) % (Nat.succ n + 1)\n[PROOFSTEP]\nrefine (Nat.mod_eq_of_lt ?_).symm\n[GOAL]\ncase neg.e_a.e_val\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : Nat.succ n + 1 ≤ ↑i + ↑i + 1\n⊢ ↑i + ↑i + 1 - (Nat.succ n + 1) < Nat.succ n + 1\n[PROOFSTEP]\nrw [tsub_lt_iff_left h]\n[GOAL]\ncase neg.e_a.e_val\nα : Type u\nm o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nn : ℕ\nv : Fin (Nat.succ n + 1) → α\ni : Fin (Nat.succ n + 1)\nh : Nat.succ n + 1 ≤ ↑i + ↑i + 1\n⊢ ↑i + ↑i + 1 < Nat.succ n + 1 + (Nat.succ n + 1)\n[PROOFSTEP]\nexact Nat.add_succ_lt_add i.2 i.2\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nhm : m + 2 = n + 1 + (n + 1)\nv : Fin (m + 2) → α\n⊢ vecHead (vecAlt1 hm v) = v 1\n[PROOFSTEP]\nsimp [vecHead, vecAlt1]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nx : α\nu : Fin n → α\ni : Fin (n + 1)\n⊢ vecCons x u (bit0 i) =\n    vecAlt0 (_ : Nat.succ n + Nat.succ n = Nat.succ n + Nat.succ n)\n      (vecAppend (_ : Nat.succ n + Nat.succ n = Nat.succ n + Nat.succ n) (vecCons x u) (vecCons x u)) i\n[PROOFSTEP]\nrw [vecAlt0_vecAppend]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nx : α\nu : Fin n → α\ni : Fin (n + 1)\n⊢ vecCons x u (bit0 i) = (vecCons x u ∘ bit0) i\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nx : α\nu : Fin n → α\ni : Fin (n + 1)\n⊢ vecCons x u (bit1 i) =\n    vecAlt1 (_ : Nat.succ n + Nat.succ n = Nat.succ n + Nat.succ n)\n      (vecAppend (_ : Nat.succ n + Nat.succ n = Nat.succ n + Nat.succ n) (vecCons x u) (vecCons x u)) i\n[PROOFSTEP]\nrw [vecAlt1_vecAppend]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nx : α\nu : Fin n → α\ni : Fin (n + 1)\n⊢ vecCons x u (bit1 i) = (vecCons x u ∘ bit1) i\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nh : m + 1 + 1 = n + 1 + (n + 1)\nx y : α\nu : Fin m → α\n⊢ m = n + n\n[PROOFSTEP]\nrwa [add_assoc n, add_comm 1, ← add_assoc, ← add_assoc, add_right_cancel_iff, add_right_cancel_iff] at h \n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nh : m + 1 + 1 = n + 1 + (n + 1)\nx y : α\nu : Fin m → α\n⊢ vecAlt0 h (vecCons x (vecCons y u)) = vecCons x (vecAlt0 (_ : m = n + n) u)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nh : m + 1 + 1 = n + 1 + (n + 1)\nx y : α\nu : Fin m → α\ni : Fin (n + 1)\n⊢ vecAlt0 h (vecCons x (vecCons y u)) i = vecCons x (vecAlt0 (_ : m = n + n) u) i\n[PROOFSTEP]\nsimp_rw [vecAlt0]\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nh : m + 1 + 1 = n + 1 + (n + 1)\nx y : α\nu : Fin m → α\ni : Fin (n + 1)\n⊢ vecCons x (vecCons y u) { val := ↑i + ↑i, isLt := (_ : ↑i + ↑i < m + 1 + 1) } =\n    vecCons x (fun k => u { val := ↑k + ↑k, isLt := (_ : ↑k + ↑k < m) }) i\n[PROOFSTEP]\nrcases i with ⟨⟨⟩ | i, hi⟩\n[GOAL]\ncase h.mk.zero\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nh : m + 1 + 1 = n + 1 + (n + 1)\nx y : α\nu : Fin m → α\nhi : Nat.zero < n + 1\n⊢ vecCons x (vecCons y u)\n      { val := ↑{ val := Nat.zero, isLt := hi } + ↑{ val := Nat.zero, isLt := hi },\n        isLt := (_ : ↑{ val := Nat.zero, isLt := hi } + ↑{ val := Nat.zero, isLt := hi } < m + 1 + 1) } =\n    vecCons x (fun k => u { val := ↑k + ↑k, isLt := (_ : ↑k + ↑k < m) }) { val := Nat.zero, isLt := hi }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.mk.succ\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nh : m + 1 + 1 = n + 1 + (n + 1)\nx y : α\nu : Fin m → α\ni : ℕ\nhi : Nat.succ i < n + 1\n⊢ vecCons x (vecCons y u)\n      { val := ↑{ val := Nat.succ i, isLt := hi } + ↑{ val := Nat.succ i, isLt := hi },\n        isLt := (_ : ↑{ val := Nat.succ i, isLt := hi } + ↑{ val := Nat.succ i, isLt := hi } < m + 1 + 1) } =\n    vecCons x (fun k => u { val := ↑k + ↑k, isLt := (_ : ↑k + ↑k < m) }) { val := Nat.succ i, isLt := hi }\n[PROOFSTEP]\nsimp [vecAlt0, Nat.add_succ, Nat.succ_add]\n[GOAL]\nα✝ : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nα : Type u_4\nh : 0 = 0 + 0\n⊢ vecAlt0 h ![] = ![]\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nh : m + 1 + 1 = n + 1 + (n + 1)\nx y : α\nu : Fin m → α\n⊢ m = n + n\n[PROOFSTEP]\nrwa [add_assoc n, add_comm 1, ← add_assoc, ← add_assoc, add_right_cancel_iff, add_right_cancel_iff] at h \n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nh : m + 1 + 1 = n + 1 + (n + 1)\nx y : α\nu : Fin m → α\n⊢ vecAlt1 h (vecCons x (vecCons y u)) = vecCons y (vecAlt1 (_ : m = n + n) u)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nh : m + 1 + 1 = n + 1 + (n + 1)\nx y : α\nu : Fin m → α\ni : Fin (n + 1)\n⊢ vecAlt1 h (vecCons x (vecCons y u)) i = vecCons y (vecAlt1 (_ : m = n + n) u) i\n[PROOFSTEP]\nsimp_rw [vecAlt1]\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nh : m + 1 + 1 = n + 1 + (n + 1)\nx y : α\nu : Fin m → α\ni : Fin (n + 1)\n⊢ vecCons x (vecCons y u) { val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < m + 1 + 1) } =\n    vecCons y (fun k => u { val := ↑k + ↑k + 1, isLt := (_ : ↑k + ↑k + 1 < m) }) i\n[PROOFSTEP]\nrcases i with ⟨⟨⟩ | i, hi⟩\n[GOAL]\ncase h.mk.zero\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nh : m + 1 + 1 = n + 1 + (n + 1)\nx y : α\nu : Fin m → α\nhi : Nat.zero < n + 1\n⊢ vecCons x (vecCons y u)\n      { val := ↑{ val := Nat.zero, isLt := hi } + ↑{ val := Nat.zero, isLt := hi } + 1,\n        isLt := (_ : ↑{ val := Nat.zero, isLt := hi } + ↑{ val := Nat.zero, isLt := hi } + 1 < m + 1 + 1) } =\n    vecCons y (fun k => u { val := ↑k + ↑k + 1, isLt := (_ : ↑k + ↑k + 1 < m) }) { val := Nat.zero, isLt := hi }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.mk.succ\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nh : m + 1 + 1 = n + 1 + (n + 1)\nx y : α\nu : Fin m → α\ni : ℕ\nhi : Nat.succ i < n + 1\n⊢ vecCons x (vecCons y u)\n      { val := ↑{ val := Nat.succ i, isLt := hi } + ↑{ val := Nat.succ i, isLt := hi } + 1,\n        isLt := (_ : ↑{ val := Nat.succ i, isLt := hi } + ↑{ val := Nat.succ i, isLt := hi } + 1 < m + 1 + 1) } =\n    vecCons y (fun k => u { val := ↑k + ↑k + 1, isLt := (_ : ↑k + ↑k + 1 < m) }) { val := Nat.succ i, isLt := hi }\n[PROOFSTEP]\nsimp [vecAlt1, Nat.add_succ, Nat.succ_add]\n[GOAL]\nα✝ : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nα : Type u_4\nh : 0 = 0 + 0\n⊢ vecAlt1 h ![] = ![]\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nM : Type u_4\ninst✝ : SMul M α\nx : M\ny : α\nv : Fin n → α\n⊢ x • vecCons y v = vecCons (x • y) (x • v)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nM : Type u_4\ninst✝ : SMul M α\nx : M\ny : α\nv : Fin n → α\ni : Fin (Nat.succ n)\n⊢ (x • vecCons y v) i = vecCons (x • y) (x • v) i\n[PROOFSTEP]\nrefine' Fin.cases _ _ i\n[GOAL]\ncase h.refine'_1\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nM : Type u_4\ninst✝ : SMul M α\nx : M\ny : α\nv : Fin n → α\ni : Fin (Nat.succ n)\n⊢ (x • vecCons y v) 0 = vecCons (x • y) (x • v) 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.refine'_2\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\nM : Type u_4\ninst✝ : SMul M α\nx : M\ny : α\nv : Fin n → α\ni : Fin (Nat.succ n)\n⊢ ∀ (i : Fin n), (x • vecCons y v) (Fin.succ i) = vecCons (x • y) (x • v) (Fin.succ i)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Add α\nx : α\nv : Fin n → α\nw : Fin (Nat.succ n) → α\n⊢ vecCons x v + w = vecCons (x + vecHead w) (v + vecTail w)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Add α\nx : α\nv : Fin n → α\nw : Fin (Nat.succ n) → α\ni : Fin (Nat.succ n)\n⊢ (vecCons x v + w) i = vecCons (x + vecHead w) (v + vecTail w) i\n[PROOFSTEP]\nrefine' Fin.cases _ _ i\n[GOAL]\ncase h.refine'_1\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Add α\nx : α\nv : Fin n → α\nw : Fin (Nat.succ n) → α\ni : Fin (Nat.succ n)\n⊢ (vecCons x v + w) 0 = vecCons (x + vecHead w) (v + vecTail w) 0\n[PROOFSTEP]\nsimp [vecHead, vecTail]\n[GOAL]\ncase h.refine'_2\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Add α\nx : α\nv : Fin n → α\nw : Fin (Nat.succ n) → α\ni : Fin (Nat.succ n)\n⊢ ∀ (i : Fin n), (vecCons x v + w) (Fin.succ i) = vecCons (x + vecHead w) (v + vecTail w) (Fin.succ i)\n[PROOFSTEP]\nsimp [vecHead, vecTail]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Add α\nv : Fin (Nat.succ n) → α\ny : α\nw : Fin n → α\n⊢ v + vecCons y w = vecCons (vecHead v + y) (vecTail v + w)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Add α\nv : Fin (Nat.succ n) → α\ny : α\nw : Fin n → α\ni : Fin (Nat.succ n)\n⊢ (v + vecCons y w) i = vecCons (vecHead v + y) (vecTail v + w) i\n[PROOFSTEP]\nrefine' Fin.cases _ _ i\n[GOAL]\ncase h.refine'_1\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Add α\nv : Fin (Nat.succ n) → α\ny : α\nw : Fin n → α\ni : Fin (Nat.succ n)\n⊢ (v + vecCons y w) 0 = vecCons (vecHead v + y) (vecTail v + w) 0\n[PROOFSTEP]\nsimp [vecHead, vecTail]\n[GOAL]\ncase h.refine'_2\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Add α\nv : Fin (Nat.succ n) → α\ny : α\nw : Fin n → α\ni : Fin (Nat.succ n)\n⊢ ∀ (i : Fin n), (v + vecCons y w) (Fin.succ i) = vecCons (vecHead v + y) (vecTail v + w) (Fin.succ i)\n[PROOFSTEP]\nsimp [vecHead, vecTail]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Add α\nx : α\nv : Fin n → α\ny : α\nw : Fin n → α\n⊢ vecCons x v + vecCons y w = vecCons (x + y) (v + w)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Sub α\nx : α\nv : Fin n → α\nw : Fin (Nat.succ n) → α\n⊢ vecCons x v - w = vecCons (x - vecHead w) (v - vecTail w)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Sub α\nx : α\nv : Fin n → α\nw : Fin (Nat.succ n) → α\ni : Fin (Nat.succ n)\n⊢ (vecCons x v - w) i = vecCons (x - vecHead w) (v - vecTail w) i\n[PROOFSTEP]\nrefine' Fin.cases _ _ i\n[GOAL]\ncase h.refine'_1\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Sub α\nx : α\nv : Fin n → α\nw : Fin (Nat.succ n) → α\ni : Fin (Nat.succ n)\n⊢ (vecCons x v - w) 0 = vecCons (x - vecHead w) (v - vecTail w) 0\n[PROOFSTEP]\nsimp [vecHead, vecTail]\n[GOAL]\ncase h.refine'_2\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Sub α\nx : α\nv : Fin n → α\nw : Fin (Nat.succ n) → α\ni : Fin (Nat.succ n)\n⊢ ∀ (i : Fin n), (vecCons x v - w) (Fin.succ i) = vecCons (x - vecHead w) (v - vecTail w) (Fin.succ i)\n[PROOFSTEP]\nsimp [vecHead, vecTail]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Sub α\nv : Fin (Nat.succ n) → α\ny : α\nw : Fin n → α\n⊢ v - vecCons y w = vecCons (vecHead v - y) (vecTail v - w)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Sub α\nv : Fin (Nat.succ n) → α\ny : α\nw : Fin n → α\ni : Fin (Nat.succ n)\n⊢ (v - vecCons y w) i = vecCons (vecHead v - y) (vecTail v - w) i\n[PROOFSTEP]\nrefine' Fin.cases _ _ i\n[GOAL]\ncase h.refine'_1\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Sub α\nv : Fin (Nat.succ n) → α\ny : α\nw : Fin n → α\ni : Fin (Nat.succ n)\n⊢ (v - vecCons y w) 0 = vecCons (vecHead v - y) (vecTail v - w) 0\n[PROOFSTEP]\nsimp [vecHead, vecTail]\n[GOAL]\ncase h.refine'_2\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Sub α\nv : Fin (Nat.succ n) → α\ny : α\nw : Fin n → α\ni : Fin (Nat.succ n)\n⊢ ∀ (i : Fin n), (v - vecCons y w) (Fin.succ i) = vecCons (vecHead v - y) (vecTail v - w) (Fin.succ i)\n[PROOFSTEP]\nsimp [vecHead, vecTail]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Sub α\nx : α\nv : Fin n → α\ny : α\nw : Fin n → α\n⊢ vecCons x v - vecCons y w = vecCons (x - y) (v - w)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Zero α\n⊢ vecCons 0 0 = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Zero α\ni : Fin (Nat.succ n)\n⊢ vecCons 0 0 i = OfNat.ofNat 0 i\n[PROOFSTEP]\nrefine' Fin.cases _ _ i\n[GOAL]\ncase h.refine'_1\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Zero α\ni : Fin (Nat.succ n)\n⊢ vecCons 0 0 0 = OfNat.ofNat 0 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.refine'_2\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Zero α\ni : Fin (Nat.succ n)\n⊢ ∀ (i : Fin n), vecCons 0 0 (Fin.succ i) = OfNat.ofNat 0 (Fin.succ i)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Zero α\nv : Fin n → α\nx : α\nh : vecCons x v = 0\n⊢ v = 0\n[PROOFSTEP]\nconvert congr_arg vecTail h\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Zero α\nv : Fin n → α\nx : α\nx✝ : x = 0 ∧ v = 0\nhx : x = 0\nhv : v = 0\n⊢ vecCons x v = 0\n[PROOFSTEP]\nsimp [hx, hv]\n[GOAL]\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Neg α\nx : α\nv : Fin n → α\n⊢ -vecCons x v = vecCons (-x) (-v)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Neg α\nx : α\nv : Fin n → α\ni : Fin (Nat.succ n)\n⊢ (-vecCons x v) i = vecCons (-x) (-v) i\n[PROOFSTEP]\nrefine' Fin.cases _ _ i\n[GOAL]\ncase h.refine'_1\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Neg α\nx : α\nv : Fin n → α\ni : Fin (Nat.succ n)\n⊢ (-vecCons x v) 0 = vecCons (-x) (-v) 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.refine'_2\nα : Type u\nm n o : ℕ\nm' : Type u_1\nn' : Type u_2\no' : Type u_3\ninst✝ : Neg α\nx : α\nv : Fin n → α\ni : Fin (Nat.succ n)\n⊢ ∀ (i : Fin n), (-vecCons x v) (Fin.succ i) = vecCons (-x) (-v) (Fin.succ i)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Fin.VecNotation", "llama_tokens": 20751, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6224593312018546, "lm_q2_score": 0.5926665999540698, "lm_q1q2_score": 0.3689108554330874}}
{"text": "[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝² : Monoid α✝\ninst✝¹ : Monoid β\nα : Type u_1\ninst✝ : CommMonoid α\na b : α\nx✝ : IsConj a b\nc : αˣ\nhc : SemiconjBy (↑c) a b\n⊢ a = b\n[PROOFSTEP]\nrw [SemiconjBy, mul_comm, ← Units.mul_inv_eq_iff_eq_mul, mul_assoc, c.mul_inv, mul_one] at hc \n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝² : Monoid α✝\ninst✝¹ : Monoid β\nα : Type u_1\ninst✝ : CommMonoid α\na b : α\nx✝ : IsConj a b\nc : αˣ\nhc : a = b\n⊢ a = b\n[PROOFSTEP]\nexact hc\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝² : Monoid α✝\ninst✝¹ : Monoid β\nα : Type u_1\ninst✝ : CommMonoid α\na b : α\nh : a = b\n⊢ IsConj a b\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Monoid α\ninst✝ : Monoid β\nf : α →* β\na b : α\nc : αˣ\nhc : SemiconjBy (↑c) a b\n⊢ SemiconjBy (↑(↑(Units.map f) c)) (↑f a) (↑f b)\n[PROOFSTEP]\nrw [Units.coe_map, SemiconjBy, ← f.map_mul, hc.eq, f.map_mul]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : CancelMonoid α\na : α\nh : a = 1\n⊢ IsConj 1 a\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Group α\ni : ℕ\na b : α\n⊢ (a * b * a⁻¹) ^ i = a * b ^ i * a⁻¹\n[PROOFSTEP]\ninduction' i with i hi\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\ninst✝ : Group α\na b : α\n⊢ (a * b * a⁻¹) ^ Nat.zero = a * b ^ Nat.zero * a⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\ninst✝ : Group α\na b : α\ni : ℕ\nhi : (a * b * a⁻¹) ^ i = a * b ^ i * a⁻¹\n⊢ (a * b * a⁻¹) ^ Nat.succ i = a * b ^ Nat.succ i * a⁻¹\n[PROOFSTEP]\nsimp [pow_succ, hi]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Group α\ni : ℤ\na b : α\n⊢ (a * b * a⁻¹) ^ i = a * b ^ i * a⁻¹\n[PROOFSTEP]\ninduction' i\n[GOAL]\ncase ofNat\nα : Type u\nβ : Type v\ninst✝ : Group α\na b : α\na✝ : ℕ\n⊢ (a * b * a⁻¹) ^ Int.ofNat a✝ = a * b ^ Int.ofNat a✝ * a⁻¹\n[PROOFSTEP]\nchange (a * b * a⁻¹) ^ (_ : ℤ) = a * b ^ (_ : ℤ) * a⁻¹\n[GOAL]\ncase ofNat\nα : Type u\nβ : Type v\ninst✝ : Group α\na b : α\na✝ : ℕ\n⊢ (a * b * a⁻¹) ^ Int.ofNat a✝ = a * b ^ Int.ofNat a✝ * a⁻¹\n[PROOFSTEP]\nsimp [zpow_ofNat]\n[GOAL]\ncase negSucc\nα : Type u\nβ : Type v\ninst✝ : Group α\na b : α\na✝ : ℕ\n⊢ (a * b * a⁻¹) ^ Int.negSucc a✝ = a * b ^ Int.negSucc a✝ * a⁻¹\n[PROOFSTEP]\nsimp [zpow_negSucc, conj_pow]\n[GOAL]\ncase negSucc\nα : Type u\nβ : Type v\ninst✝ : Group α\na b : α\na✝ : ℕ\n⊢ a * ((b ^ (a✝ + 1))⁻¹ * a⁻¹) = a * (b ^ (a✝ + 1))⁻¹ * a⁻¹\n[PROOFSTEP]\nrw [mul_assoc]\n  -- Porting note: Added `change`, `zpow_ofNat`, and `rw`.\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : GroupWithZero α\na b : α\nx✝ : IsConj a b\nc : αˣ\nhc : SemiconjBy (↑c) a b\n⊢ ↑c ≠ 0 ∧ ↑c * a * (↑c)⁻¹ = b\n[PROOFSTEP]\nrw [← Units.val_inv_eq_inv_val, Units.mul_inv_eq_iff_eq_mul]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : GroupWithZero α\na b : α\nx✝ : IsConj a b\nc : αˣ\nhc : SemiconjBy (↑c) a b\n⊢ ↑c ≠ 0 ∧ ↑c * a = b * ↑c\n[PROOFSTEP]\nexact ⟨c.ne_zero, hc⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : GroupWithZero α\na b : α\nx✝ : ∃ c, c ≠ 0 ∧ c * a * c⁻¹ = b\nc : α\nc0 : c ≠ 0\nhc : c * a * c⁻¹ = b\n⊢ SemiconjBy (↑(Units.mk0 c c0)) a b\n[PROOFSTEP]\nrw [SemiconjBy, ← Units.mul_inv_eq_iff_eq_mul, Units.val_inv_eq_inv_val, Units.val_mk0]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : GroupWithZero α\na b : α\nx✝ : ∃ c, c ≠ 0 ∧ c * a * c⁻¹ = b\nc : α\nc0 : c ≠ 0\nhc : c * a * c⁻¹ = b\n⊢ c * a * c⁻¹ = b\n[PROOFSTEP]\nexact hc\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Monoid α\ninst✝ : Monoid β\nf : α →* β\nhf : Function.Surjective ↑f\n⊢ Function.Surjective (map f)\n[PROOFSTEP]\nintro b\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Monoid α\ninst✝ : Monoid β\nf : α →* β\nhf : Function.Surjective ↑f\nb : ConjClasses β\n⊢ ∃ a, map f a = b\n[PROOFSTEP]\nobtain ⟨b, rfl⟩ := ConjClasses.mk_surjective b\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝¹ : Monoid α\ninst✝ : Monoid β\nf : α →* β\nhf : Function.Surjective ↑f\nb : β\n⊢ ∃ a, map f a = ConjClasses.mk b\n[PROOFSTEP]\nobtain ⟨a, rfl⟩ := hf b\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\ninst✝¹ : Monoid α\ninst✝ : Monoid β\nf : α →* β\nhf : Function.Surjective ↑f\na : α\n⊢ ∃ a_1, map f a_1 = ConjClasses.mk (↑f a)\n[PROOFSTEP]\nexact ⟨ConjClasses.mk a, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : CommMonoid α\n⊢ Function.RightInverse (Quotient.lift id (_ : ∀ (a b : α), IsConj a b → a = b)) ConjClasses.mk\n[PROOFSTEP]\nrw [Function.RightInverse, Function.LeftInverse, forall_isConj]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : CommMonoid α\n⊢ ∀ (a : α),\n    ConjClasses.mk (Quotient.lift id (_ : ∀ (a b : α), IsConj a b → a = b) (ConjClasses.mk a)) = ConjClasses.mk a\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : CommMonoid α\nx : α\n⊢ ConjClasses.mk (Quotient.lift id (_ : ∀ (a b : α), IsConj a b → a = b) (ConjClasses.mk x)) = ConjClasses.mk x\n[PROOFSTEP]\nrw [← quotient_mk_eq_mk, ← quotient_mk_eq_mk, Quotient.lift_mk, id.def]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Monoid α\na b : α\nh : conjugatesOf a = conjugatesOf b\n⊢ IsConj a b\n[PROOFSTEP]\nhave ha := @mem_conjugatesOf_self _ _ b\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Monoid α\na b : α\nh : conjugatesOf a = conjugatesOf b\nha : b ∈ conjugatesOf b\n⊢ IsConj a b\n[PROOFSTEP]\nrwa [← h] at ha \n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Monoid α\na : α\nb : ConjClasses α\n⊢ a ∈ carrier b ↔ ConjClasses.mk a = b\n[PROOFSTEP]\nrevert b\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Monoid α\na : α\n⊢ ∀ {b : ConjClasses α}, a ∈ carrier b ↔ ConjClasses.mk a = b\n[PROOFSTEP]\nrw [forall_isConj]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Monoid α\na : α\n⊢ ∀ (a_1 : α), a ∈ carrier (ConjClasses.mk a_1) ↔ ConjClasses.mk a = ConjClasses.mk a_1\n[PROOFSTEP]\nintro b\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Monoid α\na b : α\n⊢ a ∈ carrier (ConjClasses.mk b) ↔ ConjClasses.mk a = ConjClasses.mk b\n[PROOFSTEP]\nrw [carrier, eq_comm, mk_eq_mk_iff_isConj, ← quotient_mk_eq_mk, Quotient.lift_mk]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Monoid α\na b : α\n⊢ a ∈ conjugatesOf b ↔ IsConj b a\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Group.Conj", "llama_tokens": 3005, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6893056040203135, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.36884634555478707}}
{"text": "[GOAL]\n⊢ {x | ∃ p, p > 2 ∧ LiouvilleWith p x} ⊆\n    ⋃ (m : ℤ),\n      (fun x => x + ↑m) ⁻¹'\n        ⋃ (n : ℕ) (_ : n > 0),\n          {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)}\n[PROOFSTEP]\nrintro x ⟨p, hp, hxp⟩\n[GOAL]\ncase intro.intro\nx p : ℝ\nhp : p > 2\nhxp : LiouvilleWith p x\n⊢ x ∈\n    ⋃ (m : ℤ),\n      (fun x => x + ↑m) ⁻¹'\n        ⋃ (n : ℕ) (_ : n > 0),\n          {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)}\n[PROOFSTEP]\nrcases exists_nat_one_div_lt (sub_pos.2 hp) with ⟨n, hn⟩\n[GOAL]\ncase intro.intro.intro\nx p : ℝ\nhp : p > 2\nhxp : LiouvilleWith p x\nn : ℕ\nhn : 1 / (↑n + 1) < p - 2\n⊢ x ∈\n    ⋃ (m : ℤ),\n      (fun x => x + ↑m) ⁻¹'\n        ⋃ (n : ℕ) (_ : n > 0),\n          {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)}\n[PROOFSTEP]\nrw [lt_sub_iff_add_lt'] at hn \n[GOAL]\ncase intro.intro.intro\nx p : ℝ\nhp : p > 2\nhxp : LiouvilleWith p x\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\n⊢ x ∈\n    ⋃ (m : ℤ),\n      (fun x => x + ↑m) ⁻¹'\n        ⋃ (n : ℕ) (_ : n > 0),\n          {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)}\n[PROOFSTEP]\nsuffices\n  ∀ y : ℝ,\n    LiouvilleWith p y →\n      y ∈ Ico (0 : ℝ) 1 →\n        ∃ᶠ b : ℕ in atTop, ∃ a ∈ Finset.Icc (0 : ℤ) b, |y - a / b| < 1 / (b : ℝ) ^ (2 + 1 / (n + 1 : ℕ) : ℝ)\n  by\n  simp only [mem_iUnion, mem_preimage]\n  have hx : x + ↑(-⌊x⌋) ∈ Ico (0 : ℝ) 1 := by\n    simp only [Int.floor_le, Int.lt_floor_add_one, add_neg_lt_iff_le_add', zero_add, and_self_iff, mem_Ico,\n      Int.cast_neg, le_add_neg_iff_add_le]\n  refine' ⟨-⌊x⌋, n + 1, n.succ_pos, this _ (hxp.add_int _) hx⟩\n[GOAL]\nx p : ℝ\nhp : p > 2\nhxp : LiouvilleWith p x\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nthis :\n  ∀ (y : ℝ),\n    LiouvilleWith p y →\n      y ∈ Ico 0 1 → ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |y - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(n + 1))\n⊢ x ∈\n    ⋃ (m : ℤ),\n      (fun x => x + ↑m) ⁻¹'\n        ⋃ (n : ℕ) (_ : n > 0),\n          {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)}\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_preimage]\n[GOAL]\nx p : ℝ\nhp : p > 2\nhxp : LiouvilleWith p x\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nthis :\n  ∀ (y : ℝ),\n    LiouvilleWith p y →\n      y ∈ Ico 0 1 → ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |y - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(n + 1))\n⊢ ∃ i i_1 i_2, x + ↑i ∈ {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑i_1)}\n[PROOFSTEP]\nhave hx : x + ↑(-⌊x⌋) ∈ Ico (0 : ℝ) 1 := by\n  simp only [Int.floor_le, Int.lt_floor_add_one, add_neg_lt_iff_le_add', zero_add, and_self_iff, mem_Ico, Int.cast_neg,\n    le_add_neg_iff_add_le]\n[GOAL]\nx p : ℝ\nhp : p > 2\nhxp : LiouvilleWith p x\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nthis :\n  ∀ (y : ℝ),\n    LiouvilleWith p y →\n      y ∈ Ico 0 1 → ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |y - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(n + 1))\n⊢ x + ↑(-⌊x⌋) ∈ Ico 0 1\n[PROOFSTEP]\nsimp only [Int.floor_le, Int.lt_floor_add_one, add_neg_lt_iff_le_add', zero_add, and_self_iff, mem_Ico, Int.cast_neg,\n  le_add_neg_iff_add_le]\n[GOAL]\nx p : ℝ\nhp : p > 2\nhxp : LiouvilleWith p x\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nthis :\n  ∀ (y : ℝ),\n    LiouvilleWith p y →\n      y ∈ Ico 0 1 → ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |y - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(n + 1))\nhx : x + ↑(-⌊x⌋) ∈ Ico 0 1\n⊢ ∃ i i_1 i_2, x + ↑i ∈ {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑i_1)}\n[PROOFSTEP]\nrefine' ⟨-⌊x⌋, n + 1, n.succ_pos, this _ (hxp.add_int _) hx⟩\n[GOAL]\ncase intro.intro.intro\nx p : ℝ\nhp : p > 2\nhxp : LiouvilleWith p x\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\n⊢ ∀ (y : ℝ),\n    LiouvilleWith p y →\n      y ∈ Ico 0 1 → ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |y - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(n + 1))\n[PROOFSTEP]\nclear hxp x\n[GOAL]\ncase intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\n⊢ ∀ (y : ℝ),\n    LiouvilleWith p y →\n      y ∈ Ico 0 1 → ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |y - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(n + 1))\n[PROOFSTEP]\nintro x hxp hx01\n[GOAL]\ncase intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\n⊢ ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(n + 1))\n[PROOFSTEP]\nrefine' ((hxp.frequently_lt_rpow_neg hn).and_eventually (eventually_ge_atTop 1)).mono _\n[GOAL]\ncase intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\n⊢ ∀ (x_1 : ℕ),\n    (∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < ↑x_1 ^ (-(2 + 1 / (↑n + 1)))) ∧ 1 ≤ x_1 →\n      ∃ a, a ∈ Finset.Icc 0 ↑x_1 ∧ |x - ↑a / ↑x_1| < 1 / ↑x_1 ^ (2 + 1 / ↑(n + 1))\n[PROOFSTEP]\nrintro b ⟨⟨a, -, hlt⟩, hb⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\nhb : 1 ≤ b\na : ℤ\nhlt : |x - ↑a / ↑b| < ↑b ^ (-(2 + 1 / (↑n + 1)))\n⊢ ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(n + 1))\n[PROOFSTEP]\nrw [rpow_neg b.cast_nonneg, ← one_div, ← Nat.cast_succ] at hlt \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\nhb : 1 ≤ b\na : ℤ\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(Nat.succ n))\n⊢ ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(n + 1))\n[PROOFSTEP]\nrefine' ⟨a, _, hlt⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\nhb : 1 ≤ b\na : ℤ\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(Nat.succ n))\n⊢ a ∈ Finset.Icc 0 ↑b\n[PROOFSTEP]\nreplace hb : (1 : ℝ) ≤ b\n[GOAL]\ncase hb\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\nhb : 1 ≤ b\na : ℤ\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(Nat.succ n))\n⊢ 1 ≤ ↑b\ncase intro.intro.intro.intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(Nat.succ n))\nhb : 1 ≤ ↑b\n⊢ a ∈ Finset.Icc 0 ↑b\n[PROOFSTEP]\nexact Nat.one_le_cast.2 hb\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(Nat.succ n))\nhb : 1 ≤ ↑b\n⊢ a ∈ Finset.Icc 0 ↑b\n[PROOFSTEP]\nhave hb0 : (0 : ℝ) < b := zero_lt_one.trans_le hb\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(Nat.succ n))\nhb : 1 ≤ ↑b\nhb0 : 0 < ↑b\n⊢ a ∈ Finset.Icc 0 ↑b\n[PROOFSTEP]\nreplace hlt : |x - a / b| < 1 / b\n[GOAL]\ncase hlt\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(Nat.succ n))\nhb : 1 ≤ ↑b\nhb0 : 0 < ↑b\n⊢ |x - ↑a / ↑b| < 1 / ↑b\n[PROOFSTEP]\nrefine' hlt.trans_le (one_div_le_one_div_of_le hb0 _)\n[GOAL]\ncase hlt\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(Nat.succ n))\nhb : 1 ≤ ↑b\nhb0 : 0 < ↑b\n⊢ ↑b ≤ ↑b ^ (2 + 1 / ↑(Nat.succ n))\n[PROOFSTEP]\ncalc\n  (b : ℝ) = (b : ℝ) ^ (1 : ℝ) := (rpow_one _).symm\n  _ ≤ (b : ℝ) ^ (2 + 1 / (n + 1 : ℕ) : ℝ) := rpow_le_rpow_of_exponent_le hb (one_le_two.trans ?_)\n[GOAL]\ncase hlt\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhlt : |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑(Nat.succ n))\nhb : 1 ≤ ↑b\nhb0 : 0 < ↑b\n⊢ 2 ≤ 2 + 1 / ↑(n + 1)\n[PROOFSTEP]\nsimpa using n.cast_add_one_pos.le\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhb : 1 ≤ ↑b\nhb0 : 0 < ↑b\nhlt : |x - ↑a / ↑b| < 1 / ↑b\n⊢ a ∈ Finset.Icc 0 ↑b\n[PROOFSTEP]\nrw [sub_div' _ _ _ hb0.ne', abs_div, abs_of_pos hb0, div_lt_div_right hb0, abs_sub_lt_iff, sub_lt_iff_lt_add,\n  sub_lt_iff_lt_add, ← sub_lt_iff_lt_add'] at hlt \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhb : 1 ≤ ↑b\nhb0 : 0 < ↑b\nhlt : x * ↑b - 1 < ↑a ∧ ↑a < 1 + x * ↑b\n⊢ a ∈ Finset.Icc 0 ↑b\n[PROOFSTEP]\nrw [Finset.mem_Icc, ← Int.lt_add_one_iff, ← Int.lt_add_one_iff, ← neg_lt_iff_pos_add, add_comm, ← @Int.cast_lt ℝ, ←\n  @Int.cast_lt ℝ]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhb : 1 ≤ ↑b\nhb0 : 0 < ↑b\nhlt : x * ↑b - 1 < ↑a ∧ ↑a < 1 + x * ↑b\n⊢ ↑(-1) < ↑a ∧ ↑a < ↑(1 + ↑b)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhb : 1 ≤ ↑b\nhb0 : 0 < ↑b\nhlt : x * ↑b - 1 < ↑a ∧ ↑a < 1 + x * ↑b\n⊢ -1 < ↑a ∧ ↑a < 1 + ↑b\n[PROOFSTEP]\nrefine' ⟨lt_of_le_of_lt _ hlt.1, hlt.2.trans_le _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhb : 1 ≤ ↑b\nhb0 : 0 < ↑b\nhlt : x * ↑b - 1 < ↑a ∧ ↑a < 1 + x * ↑b\n⊢ -1 ≤ x * ↑b - 1\n[PROOFSTEP]\nsimp only [mul_nonneg hx01.left b.cast_nonneg, neg_le_sub_iff_le_add, le_add_iff_nonneg_left]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhb : 1 ≤ ↑b\nhb0 : 0 < ↑b\nhlt : x * ↑b - 1 < ↑a ∧ ↑a < 1 + x * ↑b\n⊢ 1 + x * ↑b ≤ 1 + ↑b\n[PROOFSTEP]\nrw [add_le_add_iff_left]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2\np : ℝ\nhp : p > 2\nn : ℕ\nhn : 2 + 1 / (↑n + 1) < p\nx : ℝ\nhxp : LiouvilleWith p x\nhx01 : x ∈ Ico 0 1\nb : ℕ\na : ℤ\nhb : 1 ≤ ↑b\nhb0 : 0 < ↑b\nhlt : x * ↑b - 1 < ↑a ∧ ↑a < 1 + x * ↑b\n⊢ x * ↑b ≤ ↑b\n[PROOFSTEP]\nexact mul_le_of_le_one_left hb0.le hx01.2.le\n[GOAL]\n⊢ ↑↑volume (⋃ (p : ℝ) (_ : 2 < p), {x | LiouvilleWith p x}) = 0\n[PROOFSTEP]\nsimp only [← setOf_exists, exists_prop]\n[GOAL]\n⊢ ↑↑volume {x | ∃ i, 2 < i ∧ LiouvilleWith i x} = 0\n[PROOFSTEP]\nrefine' measure_mono_null setOf_liouvilleWith_subset_aux _\n[GOAL]\n⊢ ↑↑volume\n      (⋃ (m : ℤ),\n        (fun x => x + ↑m) ⁻¹'\n          ⋃ (n : ℕ) (_ : n > 0),\n            {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)}) =\n    0\n[PROOFSTEP]\nrw [measure_iUnion_null_iff]\n[GOAL]\n⊢ ∀ (i : ℤ),\n    ↑↑volume\n        ((fun x => x + ↑i) ⁻¹'\n          ⋃ (n : ℕ) (_ : n > 0),\n            {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)}) =\n      0\n[PROOFSTEP]\nintro m\n[GOAL]\nm : ℤ\n⊢ ↑↑volume\n      ((fun x => x + ↑m) ⁻¹'\n        ⋃ (n : ℕ) (_ : n > 0),\n          {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)}) =\n    0\n[PROOFSTEP]\nrw [measure_preimage_add_right]\n[GOAL]\nm : ℤ\n⊢ ↑↑volume\n      (⋃ (n : ℕ) (_ : n > 0),\n        {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)}) =\n    0\n[PROOFSTEP]\nclear m\n[GOAL]\n⊢ ↑↑volume\n      (⋃ (n : ℕ) (_ : n > 0),\n        {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)}) =\n    0\n[PROOFSTEP]\nrefine' (measure_biUnion_null_iff <| to_countable _).2 fun n (hn : 1 ≤ n) => _\n[GOAL]\nn : ℕ\nhn : 1 ≤ n\n⊢ ↑↑volume {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)} = 0\n[PROOFSTEP]\ngeneralize hr : (2 + 1 / n : ℝ) = r\n[GOAL]\nn : ℕ\nhn : 1 ≤ n\nr : ℝ\nhr : 2 + 1 / ↑n = r\n⊢ ↑↑volume {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ r} = 0\n[PROOFSTEP]\nreplace hr : 2 < r\n[GOAL]\ncase hr\nn : ℕ\nhn : 1 ≤ n\nr : ℝ\nhr : 2 + 1 / ↑n = r\n⊢ 2 < r\n[PROOFSTEP]\nsimp [← hr, zero_lt_one.trans_le hn]\n[GOAL]\nn : ℕ\nhn : 1 ≤ n\nr : ℝ\nhr : 2 < r\n⊢ ↑↑volume {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ r} = 0\n[PROOFSTEP]\nclear hn n\n[GOAL]\nr : ℝ\nhr : 2 < r\n⊢ ↑↑volume {x | ∃ᶠ (b : ℕ) in atTop, ∃ a, a ∈ Finset.Icc 0 ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ r} = 0\n[PROOFSTEP]\nrefine' measure_setOf_frequently_eq_zero _\n[GOAL]\nr : ℝ\nhr : 2 < r\n⊢ ∑' (i : ℕ), ↑↑volume {x | ∃ a, a ∈ Finset.Icc 0 ↑i ∧ |x - ↑a / ↑i| < 1 / ↑i ^ r} ≠ ⊤\n[PROOFSTEP]\nsimp only [setOf_exists, ← exists_prop, ← Real.dist_eq, ← mem_ball, setOf_mem_eq]\n[GOAL]\nr : ℝ\nhr : 2 < r\n⊢ ∑' (i : ℕ), ↑↑volume (⋃ (i_1 : ℤ) (_ : i_1 ∈ Finset.Icc 0 ↑i), ball (↑i_1 / ↑i) (1 / ↑i ^ r)) ≠ ⊤\n[PROOFSTEP]\nset B : ℤ → ℕ → Set ℝ := fun a b => ball (a / b) (1 / (b : ℝ) ^ r)\n[GOAL]\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\n⊢ ∑' (i : ℕ), ↑↑volume (⋃ (i_1 : ℤ) (_ : i_1 ∈ Finset.Icc 0 ↑i), ball (↑i_1 / ↑i) (1 / ↑i ^ r)) ≠ ⊤\n[PROOFSTEP]\nhave hB : ∀ a b, volume (B a b) = ↑((2 : ℝ≥0) / (b : ℝ≥0) ^ r) := fun a b ↦ by\n  rw [Real.volume_ball, mul_one_div, ← NNReal.coe_two, ← NNReal.coe_nat_cast, ← NNReal.coe_rpow, ← NNReal.coe_div,\n    ENNReal.ofReal_coe_nnreal]\n[GOAL]\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\na : ℤ\nb : ℕ\n⊢ ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\n[PROOFSTEP]\nrw [Real.volume_ball, mul_one_div, ← NNReal.coe_two, ← NNReal.coe_nat_cast, ← NNReal.coe_rpow, ← NNReal.coe_div,\n  ENNReal.ofReal_coe_nnreal]\n[GOAL]\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\nhB : ∀ (a : ℤ) (b : ℕ), ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\n⊢ ∑' (i : ℕ), ↑↑volume (⋃ (i_1 : ℤ) (_ : i_1 ∈ Finset.Icc 0 ↑i), ball (↑i_1 / ↑i) (1 / ↑i ^ r)) ≠ ⊤\n[PROOFSTEP]\nhave : ∀ b : ℕ, volume (⋃ a ∈ Finset.Icc (0 : ℤ) b, B a b) ≤ ↑(2 * ((b : ℝ≥0) ^ (1 - r) + (b : ℝ≥0) ^ (-r))) := fun b ↦\n  calc\n    volume (⋃ a ∈ Finset.Icc (0 : ℤ) b, B a b) ≤ ∑ a in Finset.Icc (0 : ℤ) b, volume (B a b) :=\n      measure_biUnion_finset_le _ _\n    _ = ↑((b + 1) * (2 / (b : ℝ≥0) ^ r)) := by\n      simp only [hB, Int.card_Icc, Finset.sum_const, nsmul_eq_mul, sub_zero, ← Int.ofNat_succ, Int.toNat_coe_nat, ←\n        Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_nat]\n    _ = _ := by\n      have : 1 - r ≠ 0 := by linarith\n      rw [ENNReal.coe_eq_coe]\n      simp [add_mul, div_eq_mul_inv, NNReal.rpow_neg, NNReal.rpow_sub' _ this, mul_add, mul_left_comm]\n[GOAL]\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\nhB : ∀ (a : ℤ) (b : ℕ), ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\nb : ℕ\n⊢ ∑ a in Finset.Icc 0 ↑b, ↑↑volume (B a b) = ↑((↑b + 1) * (2 / ↑b ^ r))\n[PROOFSTEP]\nsimp only [hB, Int.card_Icc, Finset.sum_const, nsmul_eq_mul, sub_zero, ← Int.ofNat_succ, Int.toNat_coe_nat, ←\n  Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_nat]\n[GOAL]\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\nhB : ∀ (a : ℤ) (b : ℕ), ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\nb : ℕ\n⊢ ↑((↑b + 1) * (2 / ↑b ^ r)) = ↑(2 * (↑b ^ (1 - r) + ↑b ^ (-r)))\n[PROOFSTEP]\nhave : 1 - r ≠ 0 := by linarith\n[GOAL]\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\nhB : ∀ (a : ℤ) (b : ℕ), ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\nb : ℕ\n⊢ 1 - r ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\nhB : ∀ (a : ℤ) (b : ℕ), ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\nb : ℕ\nthis : 1 - r ≠ 0\n⊢ ↑((↑b + 1) * (2 / ↑b ^ r)) = ↑(2 * (↑b ^ (1 - r) + ↑b ^ (-r)))\n[PROOFSTEP]\nrw [ENNReal.coe_eq_coe]\n[GOAL]\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\nhB : ∀ (a : ℤ) (b : ℕ), ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\nb : ℕ\nthis : 1 - r ≠ 0\n⊢ (↑b + 1) * (2 / ↑b ^ r) = 2 * (↑b ^ (1 - r) + ↑b ^ (-r))\n[PROOFSTEP]\nsimp [add_mul, div_eq_mul_inv, NNReal.rpow_neg, NNReal.rpow_sub' _ this, mul_add, mul_left_comm]\n[GOAL]\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\nhB : ∀ (a : ℤ) (b : ℕ), ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\nthis : ∀ (b : ℕ), ↑↑volume (⋃ (a : ℤ) (_ : a ∈ Finset.Icc 0 ↑b), B a b) ≤ ↑(2 * (↑b ^ (1 - r) + ↑b ^ (-r)))\n⊢ ∑' (i : ℕ), ↑↑volume (⋃ (i_1 : ℤ) (_ : i_1 ∈ Finset.Icc 0 ↑i), ball (↑i_1 / ↑i) (1 / ↑i ^ r)) ≠ ⊤\n[PROOFSTEP]\nrefine' ne_top_of_le_ne_top (ENNReal.tsum_coe_ne_top_iff_summable.2 _) (ENNReal.tsum_le_tsum this)\n[GOAL]\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\nhB : ∀ (a : ℤ) (b : ℕ), ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\nthis : ∀ (b : ℕ), ↑↑volume (⋃ (a : ℤ) (_ : a ∈ Finset.Icc 0 ↑b), B a b) ≤ ↑(2 * (↑b ^ (1 - r) + ↑b ^ (-r)))\n⊢ Summable fun a => 2 * (↑a ^ (1 - r) + ↑a ^ (-r))\n[PROOFSTEP]\nrefine' (Summable.add _ _).mul_left _\n[GOAL]\ncase refine'_1\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\nhB : ∀ (a : ℤ) (b : ℕ), ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\nthis : ∀ (b : ℕ), ↑↑volume (⋃ (a : ℤ) (_ : a ∈ Finset.Icc 0 ↑b), B a b) ≤ ↑(2 * (↑b ^ (1 - r) + ↑b ^ (-r)))\n⊢ Summable fun a => ↑a ^ (1 - r)\n[PROOFSTEP]\nsimp only [NNReal.summable_rpow]\n[GOAL]\ncase refine'_2\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\nhB : ∀ (a : ℤ) (b : ℕ), ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\nthis : ∀ (b : ℕ), ↑↑volume (⋃ (a : ℤ) (_ : a ∈ Finset.Icc 0 ↑b), B a b) ≤ ↑(2 * (↑b ^ (1 - r) + ↑b ^ (-r)))\n⊢ Summable fun a => ↑a ^ (-r)\n[PROOFSTEP]\nsimp only [NNReal.summable_rpow]\n[GOAL]\ncase refine'_1\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\nhB : ∀ (a : ℤ) (b : ℕ), ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\nthis : ∀ (b : ℕ), ↑↑volume (⋃ (a : ℤ) (_ : a ∈ Finset.Icc 0 ↑b), B a b) ≤ ↑(2 * (↑b ^ (1 - r) + ↑b ^ (-r)))\n⊢ 1 - r < -1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_2\nr : ℝ\nhr : 2 < r\nB : ℤ → ℕ → Set ℝ := fun a b => ball (↑a / ↑b) (1 / ↑b ^ r)\nhB : ∀ (a : ℤ) (b : ℕ), ↑↑volume (B a b) = ↑(2 / ↑b ^ r)\nthis : ∀ (b : ℕ), ↑↑volume (⋃ (a : ℤ) (_ : a ∈ Finset.Icc 0 ↑b), B a b) ≤ ↑(2 * (↑b ^ (1 - r) + ↑b ^ (-r)))\n⊢ -r < -1\n[PROOFSTEP]\nlinarith\n[GOAL]\n⊢ ∀ᵐ (x : ℝ), ∀ (p : ℝ), p > 2 → ¬LiouvilleWith p x\n[PROOFSTEP]\nsimpa only [ae_iff, not_forall, Classical.not_not, setOf_exists] using volume_iUnion_setOf_liouvilleWith\n[GOAL]\nx : ℝ\nh₁ : ∀ (p : ℝ), p > 2 → ¬LiouvilleWith p x\nh₂ : Liouville x\n⊢ 3 > 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ ↑↑volume {x | Liouville x} = 0\n[PROOFSTEP]\nsimpa only [ae_iff, Classical.not_not] using ae_not_liouville\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Liouville.Measure", "llama_tokens": 11284, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6992544210587585, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.36872841027049647}}
{"text": "[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp2 : p = 2\nx✝ : Irreducible ↑p\nnot_unit✝ : ¬IsUnit ↑p\nh : ∀ (a b : ℤ[i]), ↑p = a * b → IsUnit a ∨ IsUnit b\n⊢ False\n[PROOFSTEP]\nhave := h ⟨1, 1⟩ ⟨1, -1⟩ (hp2.symm ▸ rfl)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp2 : p = 2\nx✝ : Irreducible ↑p\nnot_unit✝ : ¬IsUnit ↑p\nh : ∀ (a b : ℤ[i]), ↑p = a * b → IsUnit a ∨ IsUnit b\nthis : IsUnit { re := 1, im := 1 } ∨ IsUnit { re := 1, im := -1 }\n⊢ False\n[PROOFSTEP]\nrw [← norm_eq_one_iff, ← norm_eq_one_iff] at this \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp2 : p = 2\nx✝ : Irreducible ↑p\nnot_unit✝ : ¬IsUnit ↑p\nh : ∀ (a b : ℤ[i]), ↑p = a * b → IsUnit a ∨ IsUnit b\nthis : Int.natAbs (Zsqrtd.norm { re := 1, im := 1 }) = 1 ∨ Int.natAbs (Zsqrtd.norm { re := 1, im := -1 }) = 1\n⊢ False\n[PROOFSTEP]\nexact absurd this (by decide)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp2 : p = 2\nx✝ : Irreducible ↑p\nnot_unit✝ : ¬IsUnit ↑p\nh : ∀ (a b : ℤ[i]), ↑p = a * b → IsUnit a ∨ IsUnit b\nthis : Int.natAbs (Zsqrtd.norm { re := 1, im := 1 }) = 1 ∨ Int.natAbs (Zsqrtd.norm { re := 1, im := -1 }) = 1\n⊢ ¬(Int.natAbs (Zsqrtd.norm { re := 1, im := 1 }) = 1 ∨ Int.natAbs (Zsqrtd.norm { re := 1, im := -1 }) = 1)\n[PROOFSTEP]\ndecide\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\n⊢ False\n[PROOFSTEP]\nhave hp41 : p % 4 = 1 := by\n  rw [← Nat.mod_mul_left_mod p 2 2, show 2 * 2 = 4 from rfl] at hp1 \n  have := Nat.mod_lt p (show 0 < 4 by decide)\n  revert this hp3 hp1\n  generalize p % 4 = m\n  intros;\n  interval_cases m <;>\n    simp_all\n      -- Porting note: was `decide!`\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\n⊢ p % 4 = 1\n[PROOFSTEP]\nrw [← Nat.mod_mul_left_mod p 2 2, show 2 * 2 = 4 from rfl] at hp1 \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 4 % 2 = 1\nhp3 : p % 4 ≠ 3\n⊢ p % 4 = 1\n[PROOFSTEP]\nhave := Nat.mod_lt p (show 0 < 4 by decide)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 4 % 2 = 1\nhp3 : p % 4 ≠ 3\n⊢ 0 < 4\n[PROOFSTEP]\ndecide\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 4 % 2 = 1\nhp3 : p % 4 ≠ 3\nthis : p % 4 < 4\n⊢ p % 4 = 1\n[PROOFSTEP]\nrevert this hp3 hp1\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\n⊢ p % 4 % 2 = 1 → p % 4 ≠ 3 → p % 4 < 4 → p % 4 = 1\n[PROOFSTEP]\ngeneralize p % 4 = m\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nm : ℕ\n⊢ m % 2 = 1 → m ≠ 3 → m < 4 → m = 1\n[PROOFSTEP]\nintros\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nm : ℕ\nhp1✝ : m % 2 = 1\nhp3✝ : m ≠ 3\nthis✝ : m < 4\n⊢ m = 1\n[PROOFSTEP]\ninterval_cases m\n[GOAL]\ncase «0»\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nm : ℕ\nhp1✝ : 0 % 2 = 1\nhp3✝ : 0 ≠ 3\nthis✝ : 0 < 4\n⊢ 0 = 1\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «1»\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nm : ℕ\nhp1✝ : 1 % 2 = 1\nhp3✝ : 1 ≠ 3\nthis✝ : 1 < 4\n⊢ 1 = 1\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «2»\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nm : ℕ\nhp1✝ : 2 % 2 = 1\nhp3✝ : 2 ≠ 3\nthis✝ : 2 < 4\n⊢ 2 = 1\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «3»\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nm : ℕ\nhp1✝ : 3 % 2 = 1\nhp3✝ : 3 ≠ 3\nthis✝ : 3 < 4\n⊢ 3 = 1\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\n⊢ False\n[PROOFSTEP]\nlet ⟨k, hk⟩ := (ZMod.exists_sq_eq_neg_one_iff (p := p)).2 <| by rw [hp41]; exact by decide\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\n⊢ p % 4 ≠ 3\n[PROOFSTEP]\nrw [hp41]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\n⊢ 1 ≠ 3\n[PROOFSTEP]\nexact by decide\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\n⊢ 1 ≠ 3\n[PROOFSTEP]\ndecide\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ZMod p\nhk : -1 = k * k\n⊢ False\n[PROOFSTEP]\nobtain ⟨k, k_lt_p, rfl⟩ : ∃ (k' : ℕ) (_ : k' < p), (k' : ZMod p) = k := by\n  refine' ⟨k.val, k.val_lt, ZMod.nat_cast_zmod_val k⟩\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ZMod p\nhk : -1 = k * k\n⊢ ∃ k' x, ↑k' = k\n[PROOFSTEP]\nrefine' ⟨k.val, k.val_lt, ZMod.nat_cast_zmod_val k⟩\n[GOAL]\ncase intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\n⊢ False\n[PROOFSTEP]\nhave hpk : p ∣ k ^ 2 + 1 := by\n  rw [pow_two, ← CharP.cast_eq_zero_iff (ZMod p) p, Nat.cast_add, Nat.cast_mul, Nat.cast_one, ← hk, add_left_neg]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\n⊢ p ∣ k ^ 2 + 1\n[PROOFSTEP]\nrw [pow_two, ← CharP.cast_eq_zero_iff (ZMod p) p, Nat.cast_add, Nat.cast_mul, Nat.cast_one, ← hk, add_left_neg]\n[GOAL]\ncase intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\n⊢ False\n[PROOFSTEP]\nhave hkmul : (k ^ 2 + 1 : ℤ[i]) = ⟨k, 1⟩ * ⟨k, -1⟩ := by simp [sq, Zsqrtd.ext]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\n⊢ ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\n[PROOFSTEP]\nsimp [sq, Zsqrtd.ext]\n[GOAL]\ncase intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\n⊢ False\n[PROOFSTEP]\nhave hkltp : 1 + k * k < p * p :=\n  calc\n    1 + k * k ≤ k + k * k := by\n      apply add_le_add_right\n      exact (Nat.pos_of_ne_zero fun (hk0 : k = 0) => by clear_aux_decl; simp_all [pow_succ'])\n    _ = k * (k + 1) := by simp [add_comm, mul_add]\n    _ < p * p := mul_lt_mul k_lt_p k_lt_p (Nat.succ_pos _) (Nat.zero_le _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\n⊢ 1 + k * k ≤ k + k * k\n[PROOFSTEP]\napply add_le_add_right\n[GOAL]\ncase bc\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\n⊢ 1 ≤ k\n[PROOFSTEP]\nexact (Nat.pos_of_ne_zero fun (hk0 : k = 0) => by clear_aux_decl; simp_all [pow_succ'])\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhk0 : k = 0\n⊢ False\n[PROOFSTEP]\nclear_aux_decl\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhk0 : k = 0\n⊢ False\n[PROOFSTEP]\nsimp_all [pow_succ']\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\n⊢ k + k * k = k * (k + 1)\n[PROOFSTEP]\nsimp [add_comm, mul_add]\n[GOAL]\ncase intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\n⊢ False\n[PROOFSTEP]\nhave hpk₁ : ¬(p : ℤ[i]) ∣ ⟨k, -1⟩ := fun ⟨x, hx⟩ =>\n  lt_irrefl (p * x : ℤ[i]).norm.natAbs <|\n    calc\n      (norm (p * x : ℤ[i])).natAbs = (Zsqrtd.norm ⟨k, -1⟩).natAbs := by rw [hx]\n      _ < (norm (p : ℤ[i])).natAbs := by simpa [add_comm, Zsqrtd.norm] using hkltp\n      _ ≤ (norm (p * x : ℤ[i])).natAbs :=\n        norm_le_norm_mul_left _ fun hx0 => show (-1 : ℤ) ≠ 0 by decide <| by simpa [hx0] using congr_arg Zsqrtd.im hx\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nx✝ : ↑p ∣ { re := ↑k, im := -1 }\nx : ℤ[i]\nhx : { re := ↑k, im := -1 } = ↑p * x\n⊢ Int.natAbs (Zsqrtd.norm (↑p * x)) = Int.natAbs (Zsqrtd.norm { re := ↑k, im := -1 })\n[PROOFSTEP]\nrw [hx]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nx✝ : ↑p ∣ { re := ↑k, im := -1 }\nx : ℤ[i]\nhx : { re := ↑k, im := -1 } = ↑p * x\n⊢ Int.natAbs (Zsqrtd.norm { re := ↑k, im := -1 }) < Int.natAbs (Zsqrtd.norm ↑p)\n[PROOFSTEP]\nsimpa [add_comm, Zsqrtd.norm] using hkltp\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nx✝ : ↑p ∣ { re := ↑k, im := -1 }\nx : ℤ[i]\nhx : { re := ↑k, im := -1 } = ↑p * x\nhx0 : x = 0\n⊢ -1 ≠ 0\n[PROOFSTEP]\ndecide\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nx✝ : ↑p ∣ { re := ↑k, im := -1 }\nx : ℤ[i]\nhx : { re := ↑k, im := -1 } = ↑p * x\nhx0 : x = 0\n⊢ -1 = 0\n[PROOFSTEP]\nsimpa [hx0] using congr_arg Zsqrtd.im hx\n[GOAL]\ncase intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nhpk₁ : ¬↑p ∣ { re := ↑k, im := -1 }\n⊢ False\n[PROOFSTEP]\nhave hpk₂ : ¬(p : ℤ[i]) ∣ ⟨k, 1⟩ := fun ⟨x, hx⟩ =>\n  lt_irrefl (p * x : ℤ[i]).norm.natAbs <|\n    calc\n      (norm (p * x : ℤ[i])).natAbs = (Zsqrtd.norm ⟨k, 1⟩).natAbs := by rw [hx]\n      _ < (norm (p : ℤ[i])).natAbs := by simpa [add_comm, Zsqrtd.norm] using hkltp\n      _ ≤ (norm (p * x : ℤ[i])).natAbs :=\n        norm_le_norm_mul_left _ fun hx0 => show (1 : ℤ) ≠ 0 by decide <| by simpa [hx0] using congr_arg Zsqrtd.im hx\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nhpk₁ : ¬↑p ∣ { re := ↑k, im := -1 }\nx✝ : ↑p ∣ { re := ↑k, im := 1 }\nx : ℤ[i]\nhx : { re := ↑k, im := 1 } = ↑p * x\n⊢ Int.natAbs (Zsqrtd.norm (↑p * x)) = Int.natAbs (Zsqrtd.norm { re := ↑k, im := 1 })\n[PROOFSTEP]\nrw [hx]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nhpk₁ : ¬↑p ∣ { re := ↑k, im := -1 }\nx✝ : ↑p ∣ { re := ↑k, im := 1 }\nx : ℤ[i]\nhx : { re := ↑k, im := 1 } = ↑p * x\n⊢ Int.natAbs (Zsqrtd.norm { re := ↑k, im := 1 }) < Int.natAbs (Zsqrtd.norm ↑p)\n[PROOFSTEP]\nsimpa [add_comm, Zsqrtd.norm] using hkltp\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nhpk₁ : ¬↑p ∣ { re := ↑k, im := -1 }\nx✝ : ↑p ∣ { re := ↑k, im := 1 }\nx : ℤ[i]\nhx : { re := ↑k, im := 1 } = ↑p * x\nhx0 : x = 0\n⊢ 1 ≠ 0\n[PROOFSTEP]\ndecide\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nhpk₁ : ¬↑p ∣ { re := ↑k, im := -1 }\nx✝ : ↑p ∣ { re := ↑k, im := 1 }\nx : ℤ[i]\nhx : { re := ↑k, im := 1 } = ↑p * x\nhx0 : x = 0\n⊢ 1 = 0\n[PROOFSTEP]\nsimpa [hx0] using congr_arg Zsqrtd.im hx\n[GOAL]\ncase intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhpk : p ∣ k ^ 2 + 1\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nhpk₁ : ¬↑p ∣ { re := ↑k, im := -1 }\nhpk₂ : ¬↑p ∣ { re := ↑k, im := 1 }\n⊢ False\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := hpk\n[GOAL]\ncase intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nhpk₁ : ¬↑p ∣ { re := ↑k, im := -1 }\nhpk₂ : ¬↑p ∣ { re := ↑k, im := 1 }\ny : ℕ\nhy : k ^ 2 + 1 = p * y\n⊢ False\n[PROOFSTEP]\nhave := hpi.2.2 ⟨k, 1⟩ ⟨k, -1⟩ ⟨y, by rw [← hkmul, ← Nat.cast_mul p, ← hy]; simp⟩\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nhpk₁ : ¬↑p ∣ { re := ↑k, im := -1 }\nhpk₂ : ¬↑p ∣ { re := ↑k, im := 1 }\ny : ℕ\nhy : k ^ 2 + 1 = p * y\n⊢ { re := ↑k, im := 1 } * { re := ↑k, im := -1 } = ↑p * ↑y\n[PROOFSTEP]\nrw [← hkmul, ← Nat.cast_mul p, ← hy]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nhpk₁ : ¬↑p ∣ { re := ↑k, im := -1 }\nhpk₂ : ¬↑p ∣ { re := ↑k, im := 1 }\ny : ℕ\nhy : k ^ 2 + 1 = p * y\n⊢ ↑(k ^ 2) + 1 = ↑(k ^ 2 + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nhpk₁ : ¬↑p ∣ { re := ↑k, im := -1 }\nhpk₂ : ¬↑p ∣ { re := ↑k, im := 1 }\ny : ℕ\nhy : k ^ 2 + 1 = p * y\nthis : ↑p ∣ { re := ↑k, im := 1 } ∨ ↑p ∣ { re := ↑k, im := -1 }\n⊢ False\n[PROOFSTEP]\nclear_aux_decl\n[GOAL]\ncase intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nhpi : Prime ↑p\nhp1 : p % 2 = 1\nhp3 : p % 4 ≠ 3\nhp41 : p % 4 = 1\nk : ℕ\nk_lt_p : k < p\nhk : -1 = ↑k * ↑k\nhkmul : ↑(k ^ 2) + 1 = { re := ↑k, im := 1 } * { re := ↑k, im := -1 }\nhkltp : 1 + k * k < p * p\nhpk₁ : ¬↑p ∣ { re := ↑k, im := -1 }\nhpk₂ : ¬↑p ∣ { re := ↑k, im := 1 }\ny : ℕ\nhy : k ^ 2 + 1 = p * y\nthis : ↑p ∣ { re := ↑k, im := 1 } ∨ ↑p ∣ { re := ↑k, im := -1 }\n⊢ False\n[PROOFSTEP]\ntauto\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhp3 : p % 4 = 3\nhpi : ¬Irreducible ↑p\na b : ℕ\nhab : a ^ 2 + b ^ 2 = p\n⊢ ∀ (a b : ZMod 4), a ^ 2 + b ^ 2 ≠ ↑p\n[PROOFSTEP]\nerw [← ZMod.nat_cast_mod p 4, hp3]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhp3 : p % 4 = 3\nhpi : ¬Irreducible ↑p\na b : ℕ\nhab : a ^ 2 + b ^ 2 = p\n⊢ ∀ (a b : ZMod 4), a ^ 2 + b ^ 2 ≠ ↑3\n[PROOFSTEP]\nexact by decide\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhp3 : p % 4 = 3\nhpi : ¬Irreducible ↑p\na b : ℕ\nhab : a ^ 2 + b ^ 2 = p\n⊢ ∀ (a b : ZMod 4), a ^ 2 + b ^ 2 ≠ ↑3\n[PROOFSTEP]\ndecide\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nhp3 : p % 4 = 3\nhpi : ¬Irreducible ↑p\na b : ℕ\nhab : a ^ 2 + b ^ 2 = p\nthis : ∀ (a b : ZMod 4), a ^ 2 + b ^ 2 ≠ ↑p\n⊢ ↑a ^ 2 + ↑b ^ 2 = ↑(a ^ 2 + b ^ 2)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Zsqrtd.QuadraticReciprocity", "llama_tokens": 9665, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6791787121629466, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.36870118554565107}}
{"text": "[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : CompleteSpace E\nι : Type u_3\ninst✝⁶ : LinearOrder ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝² : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\ninst✝¹ : Filter.IsCountablyGenerated Filter.atTop\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nhin : i ≤ n\n⊢ μ[f n|IsStoppingTime.measurableSpace hτ] =ᵐ[Measure.restrict μ {x | τ x = i}] f i\n[PROOFSTEP]\nrefine' Filter.EventuallyEq.trans _ (ae_restrict_of_ae (h.condexp_ae_eq hin))\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : CompleteSpace E\nι : Type u_3\ninst✝⁶ : LinearOrder ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝² : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\ninst✝¹ : Filter.IsCountablyGenerated Filter.atTop\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nhin : i ≤ n\n⊢ μ[f n|IsStoppingTime.measurableSpace hτ] =ᵐ[Measure.restrict μ {x | τ x = i}] fun x => (μ[f n|↑ℱ i]) x\n[PROOFSTEP]\nrefine'\n  condexp_ae_eq_restrict_of_measurableSpace_eq_on hτ.measurableSpace_le (ℱ.le i) (hτ.measurableSet_eq' i) fun t => _\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : CompleteSpace E\nι : Type u_3\ninst✝⁶ : LinearOrder ι\ninst✝⁵ : TopologicalSpace ι\ninst✝⁴ : OrderTopology ι\ninst✝³ : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝² : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\ninst✝¹ : Filter.IsCountablyGenerated Filter.atTop\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nhin : i ≤ n\nt : Set Ω\n⊢ MeasurableSet ({x | τ x = i} ∩ t) ↔ MeasurableSet ({x | τ x = i} ∩ t)\n[PROOFSTEP]\nrw [Set.inter_comm _ t, IsStoppingTime.measurableSet_inter_eq_iff]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\n⊢ μ[f n|IsStoppingTime.measurableSpace hτ] =ᵐ[Measure.restrict μ {x | τ x = i}] f i\n[PROOFSTEP]\nby_cases hin : i ≤ n\n[GOAL]\ncase pos\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nhin : i ≤ n\n⊢ μ[f n|IsStoppingTime.measurableSpace hτ] =ᵐ[Measure.restrict μ {x | τ x = i}] f i\n[PROOFSTEP]\nrefine' Filter.EventuallyEq.trans _ (ae_restrict_of_ae (h.condexp_ae_eq hin))\n[GOAL]\ncase pos\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nhin : i ≤ n\n⊢ μ[f n|IsStoppingTime.measurableSpace hτ] =ᵐ[Measure.restrict μ {x | τ x = i}] fun x => (μ[f n|↑ℱ i]) x\n[PROOFSTEP]\nrefine'\n  condexp_ae_eq_restrict_of_measurableSpace_eq_on (hτ.measurableSpace_le_of_le hτ_le) (ℱ.le i) (hτ.measurableSet_eq' i)\n    fun t => _\n[GOAL]\ncase pos\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nhin : i ≤ n\nt : Set Ω\n⊢ MeasurableSet ({x | τ x = i} ∩ t) ↔ MeasurableSet ({x | τ x = i} ∩ t)\n[PROOFSTEP]\nrw [Set.inter_comm _ t, IsStoppingTime.measurableSet_inter_eq_iff]\n[GOAL]\ncase neg\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nhin : ¬i ≤ n\n⊢ μ[f n|IsStoppingTime.measurableSpace hτ] =ᵐ[Measure.restrict μ {x | τ x = i}] f i\n[PROOFSTEP]\nsuffices {x : Ω | τ x = i} = ∅ by simp [this]; norm_cast\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nhin : ¬i ≤ n\nthis : {x | τ x = i} = ∅\n⊢ μ[f n|IsStoppingTime.measurableSpace hτ] =ᵐ[Measure.restrict μ {x | τ x = i}] f i\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nhin : ¬i ≤ n\nthis : {x | τ x = i} = ∅\n⊢ μ[f n|IsStoppingTime.measurableSpace hτ] =ᶠ[⊥] f i\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase neg\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nhin : ¬i ≤ n\n⊢ {x | τ x = i} = ∅\n[PROOFSTEP]\next1 x\n[GOAL]\ncase neg.h\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nhin : ¬i ≤ n\nx : Ω\n⊢ x ∈ {x | τ x = i} ↔ x ∈ ∅\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]\n[GOAL]\ncase neg.h\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nhin : ¬i ≤ n\nx : Ω\n⊢ ¬τ x = i\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase neg.h\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nx : Ω\nhin : ¬τ x ≤ n\n⊢ False\n[PROOFSTEP]\nexact hin (hτ_le x)\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\n⊢ stoppedValue f τ =ᵐ[Measure.restrict μ {x | τ x = i}] μ[f n|IsStoppingTime.measurableSpace hτ]\n[PROOFSTEP]\nrefine' Filter.EventuallyEq.trans _ (condexp_stopping_time_ae_eq_restrict_eq_const_of_le_const h hτ hτ_le i).symm\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\n⊢ stoppedValue f τ =ᵐ[Measure.restrict μ {x | τ x = i}] f i\n[PROOFSTEP]\nrw [Filter.EventuallyEq, ae_restrict_iff' (ℱ.le _ _ (hτ.measurableSet_eq i))]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\n⊢ ∀ᵐ (x : Ω) ∂μ, x ∈ {ω | τ ω = i} → stoppedValue f τ x = f i x\n[PROOFSTEP]\nrefine' Filter.eventually_of_forall fun x hx => _\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nx : Ω\nhx : x ∈ {ω | τ ω = i}\n⊢ stoppedValue f τ x = f i x\n[PROOFSTEP]\nrw [Set.mem_setOf_eq] at hx \n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni✝ n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\ni : ι\nx : Ω\nhx : τ x = i\n⊢ stoppedValue f τ x = f i x\n[PROOFSTEP]\nsimp_rw [stoppedValue, hx]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_countable_range : Set.Countable (Set.range τ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\n⊢ stoppedValue f τ =ᵐ[μ] μ[f n|IsStoppingTime.measurableSpace hτ]\n[PROOFSTEP]\nhave : Set.univ = ⋃ i ∈ Set.range τ, {x | τ x = i} := by\n  ext1 x\n  simp only [Set.mem_univ, Set.mem_range, true_and_iff, Set.iUnion_exists, Set.iUnion_iUnion_eq', Set.mem_iUnion,\n    Set.mem_setOf_eq, exists_apply_eq_apply']\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_countable_range : Set.Countable (Set.range τ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\n⊢ Set.univ = ⋃ (i : ι) (_ : i ∈ Set.range τ), {x | τ x = i}\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_countable_range : Set.Countable (Set.range τ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nx : Ω\n⊢ x ∈ Set.univ ↔ x ∈ ⋃ (i : ι) (_ : i ∈ Set.range τ), {x | τ x = i}\n[PROOFSTEP]\nsimp only [Set.mem_univ, Set.mem_range, true_and_iff, Set.iUnion_exists, Set.iUnion_iUnion_eq', Set.mem_iUnion,\n  Set.mem_setOf_eq, exists_apply_eq_apply']\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_countable_range : Set.Countable (Set.range τ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nthis : Set.univ = ⋃ (i : ι) (_ : i ∈ Set.range τ), {x | τ x = i}\n⊢ stoppedValue f τ =ᵐ[μ] μ[f n|IsStoppingTime.measurableSpace hτ]\n[PROOFSTEP]\nnth_rw 1 [← @Measure.restrict_univ Ω _ μ]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_countable_range : Set.Countable (Set.range τ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nthis : Set.univ = ⋃ (i : ι) (_ : i ∈ Set.range τ), {x | τ x = i}\n⊢ stoppedValue f τ =ᵐ[Measure.restrict μ Set.univ] μ[f n|IsStoppingTime.measurableSpace hτ]\n[PROOFSTEP]\nrw [this, ae_eq_restrict_biUnion_iff _ h_countable_range]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_countable_range : Set.Countable (Set.range τ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nthis : Set.univ = ⋃ (i : ι) (_ : i ∈ Set.range τ), {x | τ x = i}\n⊢ ∀ (i : ι),\n    i ∈ Set.range τ → stoppedValue f τ =ᵐ[Measure.restrict μ {x | τ x = i}] μ[f n|IsStoppingTime.measurableSpace hτ]\n[PROOFSTEP]\nexact fun i _ => stoppedValue_ae_eq_restrict_eq h _ hτ_le i\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nhσ_le_τ : σ ≤ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\nhτ_countable_range : Set.Countable (Set.range τ)\nhσ_countable_range : Set.Countable (Set.range σ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\n⊢ stoppedValue f σ =ᵐ[μ] μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]\n[PROOFSTEP]\nhave : SigmaFinite (μ.trim (hτ.measurableSpace_le_of_le hτ_le)) :=\n  sigmaFiniteTrim_mono _ (IsStoppingTime.measurableSpace_mono hσ hτ hσ_le_τ)\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nhσ_le_τ : σ ≤ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\nhτ_countable_range : Set.Countable (Set.range τ)\nhσ_countable_range : Set.Countable (Set.range σ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nthis : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\n⊢ stoppedValue f σ =ᵐ[μ] μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]\n[PROOFSTEP]\nhave : μ[stoppedValue f τ|hσ.measurableSpace] =ᵐ[μ] μ[μ[f n|hτ.measurableSpace]|hσ.measurableSpace] :=\n  condexp_congr_ae (h.stoppedValue_ae_eq_condexp_of_le_const_of_countable_range hτ hτ_le hτ_countable_range)\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nhσ_le_τ : σ ≤ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\nhτ_countable_range : Set.Countable (Set.range τ)\nhσ_countable_range : Set.Countable (Set.range σ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nthis✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nthis :\n  μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ] =ᵐ[μ]\n    μ[μ[f n|IsStoppingTime.measurableSpace hτ]|IsStoppingTime.measurableSpace hσ]\n⊢ stoppedValue f σ =ᵐ[μ] μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]\n[PROOFSTEP]\nrefine' (Filter.EventuallyEq.trans _ (condexp_condexp_of_le _ (hτ.measurableSpace_le_of_le hτ_le)).symm).trans this.symm\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nhσ_le_τ : σ ≤ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\nhτ_countable_range : Set.Countable (Set.range τ)\nhσ_countable_range : Set.Countable (Set.range σ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nthis✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nthis :\n  μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ] =ᵐ[μ]\n    μ[μ[f n|IsStoppingTime.measurableSpace hτ]|IsStoppingTime.measurableSpace hσ]\n⊢ stoppedValue f σ =ᵐ[μ] μ[f n|IsStoppingTime.measurableSpace hσ]\n[PROOFSTEP]\nexact\n  h.stoppedValue_ae_eq_condexp_of_le_const_of_countable_range hσ (fun x => (hσ_le_τ x).trans (hτ_le x))\n    hσ_countable_range\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : CompleteSpace E\nι : Type u_3\ninst✝⁵ : LinearOrder ι\ninst✝⁴ : TopologicalSpace ι\ninst✝³ : OrderTopology ι\ninst✝² : FirstCountableTopology ι\nℱ : Filtration ι m\ninst✝¹ : SigmaFiniteFiltration μ ℱ\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nhσ_le_τ : σ ≤ τ\nhτ_le : ∀ (x : Ω), τ x ≤ n\nhτ_countable_range : Set.Countable (Set.range τ)\nhσ_countable_range : Set.Countable (Set.range σ)\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nthis✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hτ ≤ m))\nthis :\n  μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ] =ᵐ[μ]\n    μ[μ[f n|IsStoppingTime.measurableSpace hτ]|IsStoppingTime.measurableSpace hσ]\n⊢ IsStoppingTime.measurableSpace hσ ≤ IsStoppingTime.measurableSpace hτ\n[PROOFSTEP]\nexact hσ.measurableSpace_mono hτ hσ_le_τ\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\n⊢ μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ] =ᵐ[Measure.restrict μ {x | τ x ≤ σ x}] stoppedValue f τ\n[PROOFSTEP]\nrw [ae_eq_restrict_iff_indicator_ae_eq (hτ.measurableSpace_le _ (hτ.measurableSet_le_stopping_time hσ))]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\n⊢ Set.indicator {ω | τ ω ≤ σ ω} (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) =ᵐ[μ]\n    Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue f τ)\n[PROOFSTEP]\nrefine'\n  (condexp_indicator (integrable_stoppedValue ι hτ h.integrable hτ_le)\n        (hτ.measurableSet_stopping_time_le hσ)).symm.trans\n    _\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\n⊢ μ[Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ)|IsStoppingTime.measurableSpace hσ] =ᵐ[μ]\n    Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue f τ)\n[PROOFSTEP]\nhave h_int : Integrable ({ω : Ω | τ ω ≤ σ ω}.indicator (stoppedValue (fun n : ι => f n) τ)) μ :=\n  by\n  refine' (integrable_stoppedValue ι hτ h.integrable hτ_le).indicator _\n  exact hτ.measurableSpace_le _ (hτ.measurableSet_le_stopping_time hσ)\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\n⊢ Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\n[PROOFSTEP]\nrefine' (integrable_stoppedValue ι hτ h.integrable hτ_le).indicator _\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\n⊢ MeasurableSet {ω | τ ω ≤ σ ω}\n[PROOFSTEP]\nexact hτ.measurableSpace_le _ (hτ.measurableSet_le_stopping_time hσ)\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\n⊢ μ[Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ)|IsStoppingTime.measurableSpace hσ] =ᵐ[μ]\n    Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue f τ)\n[PROOFSTEP]\nhave h_meas :\n  AEStronglyMeasurable' hσ.measurableSpace ({ω : Ω | τ ω ≤ σ ω}.indicator (stoppedValue (fun n : ι => f n) τ)) μ :=\n  by\n  refine' StronglyMeasurable.aeStronglyMeasurable' _\n  refine' StronglyMeasurable.stronglyMeasurable_of_measurableSpace_le_on (hτ.measurableSet_le_stopping_time hσ) _ _ _\n  · intro t ht\n    rw [Set.inter_comm _ t] at ht ⊢\n    rw [hτ.measurableSet_inter_le_iff hσ, IsStoppingTime.measurableSet_min_iff hτ hσ] at ht \n    exact ht.2\n  · refine' StronglyMeasurable.indicator _ (hτ.measurableSet_le_stopping_time hσ)\n    refine' Measurable.stronglyMeasurable _\n    exact measurable_stoppedValue h.adapted.progMeasurable_of_discrete hτ\n  · intro x hx\n    simp only [hx, Set.indicator_of_not_mem, not_false_iff]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\n⊢ AEStronglyMeasurable' (IsStoppingTime.measurableSpace hσ)\n    (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ)) μ\n[PROOFSTEP]\nrefine' StronglyMeasurable.aeStronglyMeasurable' _\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\n⊢ StronglyMeasurable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\n[PROOFSTEP]\nrefine' StronglyMeasurable.stronglyMeasurable_of_measurableSpace_le_on (hτ.measurableSet_le_stopping_time hσ) _ _ _\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\n⊢ ∀ (t : Set Ω), MeasurableSet ({ω | τ ω ≤ σ ω} ∩ t) → MeasurableSet ({ω | τ ω ≤ σ ω} ∩ t)\n[PROOFSTEP]\nintro t ht\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\nt : Set Ω\nht : MeasurableSet ({ω | τ ω ≤ σ ω} ∩ t)\n⊢ MeasurableSet ({ω | τ ω ≤ σ ω} ∩ t)\n[PROOFSTEP]\nrw [Set.inter_comm _ t] at ht ⊢\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\nt : Set Ω\nht : MeasurableSet (t ∩ {ω | τ ω ≤ σ ω})\n⊢ MeasurableSet (t ∩ {ω | τ ω ≤ σ ω})\n[PROOFSTEP]\nrw [hτ.measurableSet_inter_le_iff hσ, IsStoppingTime.measurableSet_min_iff hτ hσ] at ht \n[GOAL]\ncase refine'_1\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\nt : Set Ω\nht : MeasurableSet (t ∩ {ω | τ ω ≤ σ ω}) ∧ MeasurableSet (t ∩ {ω | τ ω ≤ σ ω})\n⊢ MeasurableSet (t ∩ {ω | τ ω ≤ σ ω})\n[PROOFSTEP]\nexact ht.2\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\n⊢ StronglyMeasurable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\n[PROOFSTEP]\nrefine' StronglyMeasurable.indicator _ (hτ.measurableSet_le_stopping_time hσ)\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\n⊢ StronglyMeasurable (stoppedValue (fun n => f n) τ)\n[PROOFSTEP]\nrefine' Measurable.stronglyMeasurable _\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\n⊢ Measurable (stoppedValue (fun n => f n) τ)\n[PROOFSTEP]\nexact measurable_stoppedValue h.adapted.progMeasurable_of_discrete hτ\n[GOAL]\ncase refine'_3\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\n⊢ ∀ (x : Ω), ¬x ∈ {ω | τ ω ≤ σ ω} → Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ) x = 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_3\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\nx : Ω\nhx : ¬x ∈ {ω | τ ω ≤ σ ω}\n⊢ Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ) x = 0\n[PROOFSTEP]\nsimp only [hx, Set.indicator_of_not_mem, not_false_iff]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n : ι\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\ninst✝ : SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace hσ ≤ m))\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_int : Integrable (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ))\nh_meas :\n  AEStronglyMeasurable' (IsStoppingTime.measurableSpace hσ)\n    (Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ)) μ\n⊢ μ[Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue (fun n => f n) τ)|IsStoppingTime.measurableSpace hσ] =ᵐ[μ]\n    Set.indicator {ω | τ ω ≤ σ ω} (stoppedValue f τ)\n[PROOFSTEP]\nexact condexp_of_aestronglyMeasurable' hσ.measurableSpace_le h_meas h_int\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ (stoppedValue f fun x => min (σ x) (τ x)) =ᵐ[μ] μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]\n[PROOFSTEP]\nrefine' (h.stoppedValue_ae_eq_condexp_of_le hτ (hσ.min hτ) (fun x => min_le_right _ _) hτ_le).trans _\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))] =ᵐ[μ]\n    μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]\n[PROOFSTEP]\nrefine' ae_of_ae_restrict_of_ae_restrict_compl {x | σ x ≤ τ x} _ _\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ ∀ᵐ (x : Ω) ∂Measure.restrict μ {x | σ x ≤ τ x},\n    (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\n[PROOFSTEP]\nexact condexp_min_stopping_time_ae_eq_restrict_le hσ hτ\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ ∀ᵐ (x : Ω) ∂Measure.restrict μ {x | σ x ≤ τ x}ᶜ,\n    (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\n[PROOFSTEP]\nsuffices\n  μ[stoppedValue f τ|(hσ.min hτ).measurableSpace] =ᵐ[μ.restrict {x | τ x ≤ σ x}] μ[stoppedValue f τ|hσ.measurableSpace]\n  by\n  rw [ae_restrict_iff' (hσ.measurableSpace_le _ (hσ.measurableSet_le_stopping_time hτ).compl)]\n  rw [Filter.EventuallyEq, ae_restrict_iff'] at this \n  swap; · exact hτ.measurableSpace_le _ (hτ.measurableSet_le_stopping_time hσ)\n  filter_upwards [this] with x hx hx_mem\n  simp only [Set.mem_compl_iff, Set.mem_setOf_eq, not_le] at hx_mem \n  exact hx hx_mem.le\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nthis :\n  μ[stoppedValue f\n        τ|IsStoppingTime.measurableSpace\n        (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))] =ᵐ[Measure.restrict μ {x | τ x ≤ σ x}]\n    μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]\n⊢ ∀ᵐ (x : Ω) ∂Measure.restrict μ {x | σ x ≤ τ x}ᶜ,\n    (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\n[PROOFSTEP]\nrw [ae_restrict_iff' (hσ.measurableSpace_le _ (hσ.measurableSet_le_stopping_time hτ).compl)]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nthis :\n  μ[stoppedValue f\n        τ|IsStoppingTime.measurableSpace\n        (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))] =ᵐ[Measure.restrict μ {x | τ x ≤ σ x}]\n    μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]\n⊢ ∀ᵐ (x : Ω) ∂μ,\n    x ∈ {ω | σ ω ≤ τ ω}ᶜ →\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n        (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\n[PROOFSTEP]\nrw [Filter.EventuallyEq, ae_restrict_iff'] at this \n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nthis :\n  ∀ᵐ (x : Ω) ∂μ,\n    x ∈ {x | τ x ≤ σ x} →\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n        (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\n⊢ ∀ᵐ (x : Ω) ∂μ,\n    x ∈ {ω | σ ω ≤ τ ω}ᶜ →\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n        (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nthis :\n  ∀ᵐ (x : Ω) ∂Measure.restrict μ {x | τ x ≤ σ x},\n    (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\n⊢ MeasurableSet {x | τ x ≤ σ x}\n[PROOFSTEP]\nswap\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nthis :\n  ∀ᵐ (x : Ω) ∂Measure.restrict μ {x | τ x ≤ σ x},\n    (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\n⊢ MeasurableSet {x | τ x ≤ σ x}\n[PROOFSTEP]\nexact hτ.measurableSpace_le _ (hτ.measurableSet_le_stopping_time hσ)\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nthis :\n  ∀ᵐ (x : Ω) ∂μ,\n    x ∈ {x | τ x ≤ σ x} →\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n        (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\n⊢ ∀ᵐ (x : Ω) ∂μ,\n    x ∈ {ω | σ ω ≤ τ ω}ᶜ →\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n        (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\n[PROOFSTEP]\nfilter_upwards [this] with x hx hx_mem\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nthis :\n  ∀ᵐ (x : Ω) ∂μ,\n    x ∈ {x | τ x ≤ σ x} →\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n        (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\nx : Ω\nhx :\n  τ x ≤ σ x →\n    (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\nhx_mem : x ∈ {ω | σ ω ≤ τ ω}ᶜ\n⊢ (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n    (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\n[PROOFSTEP]\nsimp only [Set.mem_compl_iff, Set.mem_setOf_eq, not_le] at hx_mem \n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nthis :\n  ∀ᵐ (x : Ω) ∂μ,\n    x ∈ {x | τ x ≤ σ x} →\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n        (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\nx : Ω\nhx :\n  τ x ≤ σ x →\n    (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n      (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\nhx_mem : τ x < σ x\n⊢ (μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))]) x =\n    (μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]) x\n[PROOFSTEP]\nexact hx hx_mem.le\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ μ[stoppedValue f\n        τ|IsStoppingTime.measurableSpace\n        (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))] =ᵐ[Measure.restrict μ {x | τ x ≤ σ x}]\n    μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]\n[PROOFSTEP]\napply Filter.EventuallyEq.trans _ ((condexp_min_stopping_time_ae_eq_restrict_le hτ hσ).trans _)\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ Ω → E\n[PROOFSTEP]\nexact stoppedValue f τ\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ μ[stoppedValue f\n        τ|IsStoppingTime.measurableSpace\n        (_ : IsStoppingTime ℱ fun ω => min (σ ω) (τ ω))] =ᵐ[Measure.restrict μ {x | τ x ≤ σ x}]\n    μ[stoppedValue f τ|IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω))]\n[PROOFSTEP]\nrw [IsStoppingTime.measurableSpace_min hσ, IsStoppingTime.measurableSpace_min hτ, inf_comm]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ μ[stoppedValue f τ|IsStoppingTime.measurableSpace hτ] =ᵐ[Measure.restrict μ {x | τ x ≤ σ x}]\n    μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]\n[PROOFSTEP]\nhave h1 : μ[stoppedValue f τ|hτ.measurableSpace] = stoppedValue f τ :=\n  by\n  refine' condexp_of_stronglyMeasurable hτ.measurableSpace_le _ _\n  · refine' Measurable.stronglyMeasurable _\n    exact measurable_stoppedValue h.adapted.progMeasurable_of_discrete hτ\n  · exact integrable_stoppedValue ι hτ h.integrable hτ_le\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ μ[stoppedValue f τ|IsStoppingTime.measurableSpace hτ] = stoppedValue f τ\n[PROOFSTEP]\nrefine' condexp_of_stronglyMeasurable hτ.measurableSpace_le _ _\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ StronglyMeasurable (stoppedValue f τ)\n[PROOFSTEP]\nrefine' Measurable.stronglyMeasurable _\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ Measurable (stoppedValue f τ)\n[PROOFSTEP]\nexact measurable_stoppedValue h.adapted.progMeasurable_of_discrete hτ\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\n⊢ Integrable (stoppedValue f τ)\n[PROOFSTEP]\nexact integrable_stoppedValue ι hτ h.integrable hτ_le\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nh1 : μ[stoppedValue f τ|IsStoppingTime.measurableSpace hτ] = stoppedValue f τ\n⊢ μ[stoppedValue f τ|IsStoppingTime.measurableSpace hτ] =ᵐ[Measure.restrict μ {x | τ x ≤ σ x}]\n    μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]\n[PROOFSTEP]\nrw [h1]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm : MeasurableSpace Ω\nμ : Measure Ω\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : CompleteSpace E\nι : Type u_3\ninst✝¹⁰ : LinearOrder ι\ninst✝⁹ : LocallyFiniteOrder ι\ninst✝⁸ : OrderBot ι\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : DiscreteTopology ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : BorelSpace ι\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : SecondCountableTopology E\nℱ : Filtration ι m\nτ σ : Ω → ι\nf : ι → Ω → E\ni n✝ : ι\ninst✝ : SigmaFiniteFiltration μ ℱ\nh : Martingale f ℱ μ\nhτ : IsStoppingTime ℱ τ\nhσ : IsStoppingTime ℱ σ\nn : ι\nhτ_le : ∀ (x : Ω), τ x ≤ n\nh_sf_min :\n  SigmaFinite (Measure.trim μ (_ : IsStoppingTime.measurableSpace (_ : IsStoppingTime ℱ fun ω => min (τ ω) (σ ω)) ≤ m))\nh1 : μ[stoppedValue f τ|IsStoppingTime.measurableSpace hτ] = stoppedValue f τ\n⊢ stoppedValue f τ =ᵐ[Measure.restrict μ {x | τ x ≤ σ x}] μ[stoppedValue f τ|IsStoppingTime.measurableSpace hσ]\n[PROOFSTEP]\nexact (condexp_stoppedValue_stopping_time_ae_eq_restrict_le h hτ hσ hτ_le).symm\n", "meta": {"mathlib_filename": "Mathlib.Probability.Martingale.OptionalSampling", "llama_tokens": 32449, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7431680086124812, "lm_q2_score": 0.49609382947091946, "lm_q1q2_score": 0.36868106333284306}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nt t' : Bornology α\nh_cobounded : cobounded α = cobounded α\n⊢ t = t'\n[PROOFSTEP]\ncases t\n[GOAL]\ncase mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nt' : Bornology α\ncobounded'✝ : Filter α\nle_cofinite'✝ : cobounded'✝ ≤ cofinite\nh_cobounded : cobounded α = cobounded α\n⊢ { cobounded' := cobounded'✝, le_cofinite' := le_cofinite'✝ } = t'\n[PROOFSTEP]\ncases t'\n[GOAL]\ncase mk.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ncobounded'✝¹ : Filter α\nle_cofinite'✝¹ : cobounded'✝¹ ≤ cofinite\ncobounded'✝ : Filter α\nle_cofinite'✝ : cobounded'✝ ≤ cofinite\nh_cobounded : cobounded α = cobounded α\n⊢ { cobounded' := cobounded'✝¹, le_cofinite' := le_cofinite'✝¹ } =\n    { cobounded' := cobounded'✝, le_cofinite' := le_cofinite'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\nB : Set (Set α)\nempty_mem : ∅ ∈ B\nsubset_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ⊆ s₁ → s₂ ∈ B\nunion_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ∈ B → s₁ ∪ s₂ ∈ B\nsingleton_mem : ∀ (x : α), {x} ∈ B\n⊢ univ ∈ {s | sᶜ ∈ B}\n[PROOFSTEP]\nrwa [← compl_univ] at empty_mem \n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\nB : Set (Set α)\nempty_mem : ∅ ∈ B\nsubset_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ⊆ s₁ → s₂ ∈ B\nunion_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ∈ B → s₁ ∪ s₂ ∈ B\nsingleton_mem : ∀ (x : α), {x} ∈ B\nx✝ y✝ : Set α\nhx : x✝ ∈ {s | sᶜ ∈ B}\nhy : y✝ ∈ {s | sᶜ ∈ B}\n⊢ x✝ ∩ y✝ ∈ {s | sᶜ ∈ B}\n[PROOFSTEP]\nsimpa [compl_inter] using union_mem _ hx _ hy\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\nB : Set (Set α)\nempty_mem : ∅ ∈ B\nsubset_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ⊆ s₁ → s₂ ∈ B\nunion_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ∈ B → s₁ ∪ s₂ ∈ B\nsingleton_mem : ∀ (x : α), {x} ∈ B\n⊢ { sets := {s | sᶜ ∈ B}, univ_sets := (_ : univᶜ ∈ B),\n      sets_of_superset := (_ : ∀ {x y : Set α}, x ∈ {s | sᶜ ∈ B} → x ⊆ y → yᶜ ∈ B),\n      inter_sets := (_ : ∀ {x y : Set α}, x ∈ {s | sᶜ ∈ B} → y ∈ {s | sᶜ ∈ B} → x ∩ y ∈ {s | sᶜ ∈ B}) } ≤\n    cofinite\n[PROOFSTEP]\nrw [le_cofinite_iff_compl_singleton_mem]\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\nB : Set (Set α)\nempty_mem : ∅ ∈ B\nsubset_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ⊆ s₁ → s₂ ∈ B\nunion_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ∈ B → s₁ ∪ s₂ ∈ B\nsingleton_mem : ∀ (x : α), {x} ∈ B\n⊢ ∀ (x : α),\n    {x}ᶜ ∈\n      { sets := {s | sᶜ ∈ B}, univ_sets := (_ : univᶜ ∈ B),\n        sets_of_superset := (_ : ∀ {x y : Set α}, x ∈ {s | sᶜ ∈ B} → x ⊆ y → yᶜ ∈ B),\n        inter_sets := (_ : ∀ {x y : Set α}, x ∈ {s | sᶜ ∈ B} → y ∈ {s | sᶜ ∈ B} → x ∩ y ∈ {s | sᶜ ∈ B}) }\n[PROOFSTEP]\nintro x\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\nB : Set (Set α)\nempty_mem : ∅ ∈ B\nsubset_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ⊆ s₁ → s₂ ∈ B\nunion_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ∈ B → s₁ ∪ s₂ ∈ B\nsingleton_mem : ∀ (x : α), {x} ∈ B\nx : α\n⊢ {x}ᶜ ∈\n    { sets := {s | sᶜ ∈ B}, univ_sets := (_ : univᶜ ∈ B),\n      sets_of_superset := (_ : ∀ {x y : Set α}, x ∈ {s | sᶜ ∈ B} → x ⊆ y → yᶜ ∈ B),\n      inter_sets := (_ : ∀ {x y : Set α}, x ∈ {s | sᶜ ∈ B} → y ∈ {s | sᶜ ∈ B} → x ∩ y ∈ {s | sᶜ ∈ B}) }\n[PROOFSTEP]\nchange { x }ᶜᶜ ∈ B\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\nB : Set (Set α)\nempty_mem : ∅ ∈ B\nsubset_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ⊆ s₁ → s₂ ∈ B\nunion_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ∈ B → s₁ ∪ s₂ ∈ B\nsingleton_mem : ∀ (x : α), {x} ∈ B\nx : α\n⊢ {x}ᶜᶜ ∈ B\n[PROOFSTEP]\nrw [compl_compl]\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\nB : Set (Set α)\nempty_mem : ∅ ∈ B\nsubset_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ⊆ s₁ → s₂ ∈ B\nunion_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ∈ B → s₁ ∪ s₂ ∈ B\nsingleton_mem : ∀ (x : α), {x} ∈ B\nx : α\n⊢ {x} ∈ B\n[PROOFSTEP]\nexact singleton_mem x\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\nB : Set (Set α)\nempty_mem : ∅ ∈ B\nsubset_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ⊆ s₁ → s₂ ∈ B\nunion_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ∈ B → s₁ ∪ s₂ ∈ B\nsUnion_univ : ⋃₀ B = univ\nx : α\n⊢ {x} ∈ B\n[PROOFSTEP]\nrw [sUnion_eq_univ_iff] at sUnion_univ \n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\nB : Set (Set α)\nempty_mem : ∅ ∈ B\nsubset_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ⊆ s₁ → s₂ ∈ B\nunion_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ∈ B → s₁ ∪ s₂ ∈ B\nsUnion_univ : ∀ (a : α), ∃ b, b ∈ B ∧ a ∈ b\nx : α\n⊢ {x} ∈ B\n[PROOFSTEP]\nrcases sUnion_univ x with ⟨s, hs, hxs⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nα : Type u_4\nB : Set (Set α)\nempty_mem : ∅ ∈ B\nsubset_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ⊆ s₁ → s₂ ∈ B\nunion_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ∈ B → s₁ ∪ s₂ ∈ B\nsUnion_univ : ∀ (a : α), ∃ b, b ∈ B ∧ a ∈ b\nx : α\ns : Set α\nhs : s ∈ B\nhxs : x ∈ s\n⊢ {x} ∈ B\n[PROOFSTEP]\nexact subset_mem s hs { x } (singleton_subset_iff.mpr hxs)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Bornology α\ns t : Set α\nx : α\n⊢ IsBounded sᶜ ↔ IsCobounded s\n[PROOFSTEP]\nrw [isBounded_def, isCobounded_def, compl_compl]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Bornology α\ns t : Set α\nx : α\n⊢ IsBounded ∅\n[PROOFSTEP]\nrw [isBounded_def, compl_empty]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Bornology α\ns t : Set α\nx : α\n⊢ univ ∈ cobounded α\n[PROOFSTEP]\nexact univ_mem\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Bornology α\ns t : Set α\nx : α\n⊢ IsBounded {x}\n[PROOFSTEP]\nrw [isBounded_def]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Bornology α\ns t : Set α\nx : α\n⊢ {x}ᶜ ∈ cobounded α\n[PROOFSTEP]\nexact le_cofinite _ (finite_singleton x).compl_mem_cofinite\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Bornology α\ns t : Set α\nx : α\n⊢ IsBounded (s ∪ t) ↔ IsBounded s ∧ IsBounded t\n[PROOFSTEP]\nsimp only [← isCobounded_compl_iff, compl_union, isCobounded_inter]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : Bornology α\ns t : Set α\nx : α\ninst✝ : Bornology β\nf : α → β\n⊢ comap f (cobounded β) ≤ cobounded α ↔ ∀ ⦃s : Set α⦄, IsBounded s → IsBounded (f '' s)\n[PROOFSTEP]\nrefine'\n  ⟨fun h s hs => _, fun h t ht =>\n    ⟨(f '' tᶜ)ᶜ, h <| IsCobounded.compl ht, compl_subset_comm.1 <| subset_preimage_image _ _⟩⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : Bornology α\ns✝ t : Set α\nx : α\ninst✝ : Bornology β\nf : α → β\nh : comap f (cobounded β) ≤ cobounded α\ns : Set α\nhs : IsBounded s\n⊢ IsBounded (f '' s)\n[PROOFSTEP]\nobtain ⟨t, ht, hts⟩ := h hs.compl\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : Bornology α\ns✝ t✝ : Set α\nx : α\ninst✝ : Bornology β\nf : α → β\nh : comap f (cobounded β) ≤ cobounded α\ns : Set α\nhs : IsBounded s\nt : Set β\nht : t ∈ cobounded β\nhts : f ⁻¹' t ⊆ sᶜ\n⊢ IsBounded (f '' s)\n[PROOFSTEP]\nrw [subset_compl_comm, ← preimage_compl] at hts \n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : Bornology α\ns✝ t✝ : Set α\nx : α\ninst✝ : Bornology β\nf : α → β\nh : comap f (cobounded β) ≤ cobounded α\ns : Set α\nhs : IsBounded s\nt : Set β\nht : t ∈ cobounded β\nhts : s ⊆ f ⁻¹' tᶜ\n⊢ IsBounded (f '' s)\n[PROOFSTEP]\nexact (IsCobounded.compl ht).subset ((image_subset f hts).trans <| image_preimage_subset _ _)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nt t' : Bornology α\nh : ∀ (s : Set α), IsBounded s ↔ IsBounded s\n⊢ t = t'\n[PROOFSTEP]\next s\n[GOAL]\ncase h_cobounded.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nt t' : Bornology α\nh : ∀ (s : Set α), IsBounded s ↔ IsBounded s\ns : Set α\n⊢ s ∈ cobounded α ↔ s ∈ cobounded α\n[PROOFSTEP]\nsimpa [@isBounded_def _ t, isBounded_def, compl_compl] using h sᶜ\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ns : Set α\nB : Set (Set α)\nempty_mem : ∅ ∈ B\nsubset_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ⊆ s₁ → s₂ ∈ B\nunion_mem : ∀ (s₁ : Set α), s₁ ∈ B → ∀ (s₂ : Set α), s₂ ∈ B → s₁ ∪ s₂ ∈ B\nsUnion_univ : ∀ (x : α), {x} ∈ B\n⊢ IsBounded s ↔ s ∈ B\n[PROOFSTEP]\nrw [@isBounded_def _ (ofBounded B empty_mem subset_mem union_mem sUnion_univ), ← Filter.mem_sets,\n  ofBounded_cobounded_sets, Set.mem_setOf_eq, compl_compl]\n  -- porting note: again had to use `@isBounded_def _` and feed Lean the instance\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ns✝ : Set α\ninst✝ : Bornology α\ns : Set ι\nf : ι → Set α\nhs : Set.Finite s\n⊢ IsBounded (⋃ (i : ι) (_ : i ∈ s), f i) ↔ ∀ (i : ι), i ∈ s → IsBounded (f i)\n[PROOFSTEP]\nsimp only [← isCobounded_compl_iff, compl_iUnion, isCobounded_biInter hs]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ns : Set α\ninst✝ : Bornology α\nS : Set (Set α)\nhs : Set.Finite S\n⊢ IsBounded (⋃₀ S) ↔ ∀ (s : Set α), s ∈ S → IsBounded s\n[PROOFSTEP]\nrw [sUnion_eq_biUnion, isBounded_biUnion hs]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ns✝ : Set α\ninst✝¹ : Bornology α\ninst✝ : Finite ι\ns : ι → Set α\n⊢ IsBounded (⋃ (i : ι), s i) ↔ ∀ (i : ι), IsBounded (s i)\n[PROOFSTEP]\nrw [← sUnion_range, isBounded_sUnion (finite_range s), forall_range_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Bornology α\n⊢ cobounded α = ⊥ ↔ BoundedSpace α\n[PROOFSTEP]\nrw [← isBounded_univ, isBounded_def, compl_univ, empty_mem_iff_bot]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Bornology.Basic", "llama_tokens": 5000, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7310585786300049, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.36838492878987844}}
{"text": "[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\ni : ι\nh : i = j\n⊢ X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X✝) i = X✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\ni : ι\nh : i = j\n⊢ (if i = j then X✝ else 0) = X✝\n[PROOFSTEP]\nrw [if_pos h]\n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\ni : ι\nh : i = j\n⊢ Y✝ = X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y✝) i\n[PROOFSTEP]\ndsimp\n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\ni : ι\nh : i = j\n⊢ Y✝ = if i = j then Y✝ else 0\n[PROOFSTEP]\nrw [if_pos h]\n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nA : V\n⊢ { obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,\n          map := fun {X Y} f =>\n            Hom.mk fun i =>\n              if h : i = j then\n                eqToHom\n                    (_ :\n                      HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫\n                  f ≫\n                    eqToHom\n                      (_ :\n                        Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)\n              else 0 }.map\n      (𝟙 A) =\n    𝟙\n      ({ obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun i =>\n                if h : i = j then\n                  eqToHom\n                      (_ :\n                        HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫\n                    f ≫\n                      eqToHom\n                        (_ :\n                          Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)\n                else 0 }.obj\n        A)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nA : V\ni✝ : ι\n⊢ Hom.f\n      ({ obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun i =>\n                if h : i = j then\n                  eqToHom\n                      (_ :\n                        HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫\n                    f ≫\n                      eqToHom\n                        (_ :\n                          Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)\n                else 0 }.map\n        (𝟙 A))\n      i✝ =\n    Hom.f\n      (𝟙\n        ({ obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun i =>\n                  if h : i = j then\n                    eqToHom\n                        (_ :\n                          HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i =\n                            X) ≫\n                      f ≫\n                        eqToHom\n                          (_ :\n                            Y =\n                              HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)\n                  else 0 }.obj\n          A))\n      i✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nA : V\ni✝ : ι\n⊢ (if h : i✝ = j then eqToHom (_ : (if i✝ = j then A else 0) = A) ≫ 𝟙 A ≫ eqToHom (_ : A = if i✝ = j then A else 0)\n    else 0) =\n    𝟙 (if i✝ = j then A else 0)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nA : V\ni✝ : ι\nh : i✝ = j\n⊢ eqToHom (_ : (if i✝ = j then A else 0) = A) ≫ 𝟙 A ≫ eqToHom (_ : A = if i✝ = j then A else 0) =\n    𝟙 (if i✝ = j then A else 0)\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nA : V\ni✝ : ι\n⊢ eqToHom (_ : (if i✝ = i✝ then A else 0) = A) ≫ 𝟙 A ≫ eqToHom (_ : A = if i✝ = i✝ then A else 0) =\n    𝟙 (if i✝ = i✝ then A else 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nA : V\ni✝ : ι\nh : ¬i✝ = j\n⊢ 0 = 𝟙 (if i✝ = j then A else 0)\n[PROOFSTEP]\nrw [if_neg h]\n[GOAL]\ncase neg\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nA : V\ni✝ : ι\nh : ¬i✝ = j\n⊢ 0 = 𝟙 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ Z✝ : V\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,\n          map := fun {X Y} f =>\n            Hom.mk fun i =>\n              if h : i = j then\n                eqToHom\n                    (_ :\n                      HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫\n                  f ≫\n                    eqToHom\n                      (_ :\n                        Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)\n              else 0 }.map\n      (f ≫ g) =\n    { obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun i =>\n                if h : i = j then\n                  eqToHom\n                      (_ :\n                        HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫\n                    f ≫\n                      eqToHom\n                        (_ :\n                          Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)\n                else 0 }.map\n        f ≫\n      { obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun i =>\n                if h : i = j then\n                  eqToHom\n                      (_ :\n                        HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫\n                    f ≫\n                      eqToHom\n                        (_ :\n                          Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)\n                else 0 }.map\n        g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ Z✝ : V\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\ni✝ : ι\n⊢ Hom.f\n      ({ obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun i =>\n                if h : i = j then\n                  eqToHom\n                      (_ :\n                        HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i = X) ≫\n                    f ≫\n                      eqToHom\n                        (_ :\n                          Y = HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)\n                else 0 }.map\n        (f ≫ g))\n      i✝ =\n    Hom.f\n      ({ obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun i =>\n                  if h : i = j then\n                    eqToHom\n                        (_ :\n                          HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i =\n                            X) ≫\n                      f ≫\n                        eqToHom\n                          (_ :\n                            Y =\n                              HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)\n                  else 0 }.map\n          f ≫\n        { obj := fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun i =>\n                  if h : i = j then\n                    eqToHom\n                        (_ :\n                          HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X) i =\n                            X) ≫\n                      f ≫\n                        eqToHom\n                          (_ :\n                            Y =\n                              HomologicalComplex.X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y) i)\n                  else 0 }.map\n          g)\n      i✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ Z✝ : V\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\ni✝ : ι\n⊢ (if h : i✝ = j then\n      eqToHom (_ : (if i✝ = j then X✝ else 0) = X✝) ≫ (f ≫ g) ≫ eqToHom (_ : Z✝ = if i✝ = j then Z✝ else 0)\n    else 0) =\n    (if h : i✝ = j then eqToHom (_ : (if i✝ = j then X✝ else 0) = X✝) ≫ f ≫ eqToHom (_ : Y✝ = if i✝ = j then Y✝ else 0)\n      else 0) ≫\n      if h : i✝ = j then eqToHom (_ : (if i✝ = j then Y✝ else 0) = Y✝) ≫ g ≫ eqToHom (_ : Z✝ = if i✝ = j then Z✝ else 0)\n      else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ Z✝ : V\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\ni✝ : ι\nh : i✝ = j\n⊢ eqToHom (_ : (if i✝ = j then X✝ else 0) = X✝) ≫ (f ≫ g) ≫ eqToHom (_ : Z✝ = if i✝ = j then Z✝ else 0) =\n    (eqToHom (_ : (if i✝ = j then X✝ else 0) = X✝) ≫ f ≫ eqToHom (_ : Y✝ = if i✝ = j then Y✝ else 0)) ≫\n      eqToHom (_ : (if i✝ = j then Y✝ else 0) = Y✝) ≫ g ≫ eqToHom (_ : Z✝ = if i✝ = j then Z✝ else 0)\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nX✝ Y✝ Z✝ : V\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\ni✝ : ι\n⊢ eqToHom (_ : (if i✝ = i✝ then X✝ else 0) = X✝) ≫ (f ≫ g) ≫ eqToHom (_ : Z✝ = if i✝ = i✝ then Z✝ else 0) =\n    (eqToHom (_ : (if i✝ = i✝ then X✝ else 0) = X✝) ≫ f ≫ eqToHom (_ : Y✝ = if i✝ = i✝ then Y✝ else 0)) ≫\n      eqToHom (_ : (if i✝ = i✝ then Y✝ else 0) = Y✝) ≫ g ≫ eqToHom (_ : Z✝ = if i✝ = i✝ then Z✝ else 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ Z✝ : V\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\ni✝ : ι\nh : ¬i✝ = j\n⊢ 0 = 0 ≫ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nA : V\n⊢ X ((single V c j).obj A) j = A\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nA B : V\nf : A ⟶ B\n⊢ Hom.f ((single V c j).map f) j = (singleObjXSelf V c j A).hom ≫ f ≫ (singleObjXSelf V c j B).inv\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\na₁✝ a₂✝ : X✝ ⟶ Y✝\nw : (single V c j).map a₁✝ = (single V c j).map a₂✝\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\nhave := congr_hom w j\n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\na₁✝ a₂✝ : X✝ ⟶ Y✝\nw : (single V c j).map a₁✝ = (single V c j).map a₂✝\nthis : Hom.f ((single V c j).map a₁✝) j = Hom.f ((single V c j).map a₂✝) j\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\ndsimp at this \n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\na₁✝ a₂✝ : X✝ ⟶ Y✝\nw : (single V c j).map a₁✝ = (single V c j).map a₂✝\nthis :\n  (if h : j = j then\n      eqToHom (_ : X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X✝) j = X✝) ≫\n        a₁✝ ≫ eqToHom (_ : Y✝ = X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y✝) j)\n    else 0) =\n    if h : j = j then\n      eqToHom (_ : X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X✝) j = X✝) ≫\n        a₂✝ ≫ eqToHom (_ : Y✝ = X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y✝) j)\n    else 0\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\nsimp only [dif_pos] at this \n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\na₁✝ a₂✝ : X✝ ⟶ Y✝\nw : (single V c j).map a₁✝ = (single V c j).map a₂✝\nthis :\n  eqToHom (_ : X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X✝) j = X✝) ≫\n      a₁✝ ≫ eqToHom (_ : Y✝ = X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y✝) j) =\n    eqToHom (_ : X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X✝) j = X✝) ≫\n      a₂✝ ≫ eqToHom (_ : Y✝ = X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y✝) j)\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\nrw [← IsIso.inv_comp_eq, inv_eqToHom, eqToHom_trans_assoc, eqToHom_refl, Category.id_comp, ← IsIso.comp_inv_eq,\n  Category.assoc, inv_eqToHom, eqToHom_trans, eqToHom_refl, Category.comp_id] at this \n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\na₁✝ a₂✝ : X✝ ⟶ Y✝\nw : (single V c j).map a₁✝ = (single V c j).map a₂✝\nthis : a₁✝ = a₂✝\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\nexact this\n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : (single V c j).obj X✝ ⟶ (single V c j).obj Y✝\n⊢ X✝ = X ((single V c j).obj X✝) j\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : (single V c j).obj X✝ ⟶ (single V c j).obj Y✝\n⊢ X ((single V c j).obj Y✝) j = Y✝\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : (single V c j).obj X✝ ⟶ (single V c j).obj Y✝\n⊢ (single V c j).map\n      ((fun {X Y} f =>\n          eqToHom (_ : X = if j = j then X else 0) ≫ Hom.f f j ≫ eqToHom (_ : (if j = j then Y else 0) = Y))\n        f) =\n    f\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : (single V c j).obj X✝ ⟶ (single V c j).obj Y✝\ni : ι\n⊢ Hom.f\n      ((single V c j).map\n        ((fun {X Y} f =>\n            eqToHom (_ : X = if j = j then X else 0) ≫ Hom.f f j ≫ eqToHom (_ : (if j = j then Y else 0) = Y))\n          f))\n      i =\n    Hom.f f i\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : (single V c j).obj X✝ ⟶ (single V c j).obj Y✝\ni : ι\n⊢ (if h : i = j then\n      eqToHom (_ : X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X✝) i = X✝) ≫\n        (eqToHom (_ : X✝ = if j = j then X✝ else 0) ≫ Hom.f f j ≫ eqToHom (_ : (if j = j then Y✝ else 0) = Y✝)) ≫\n          eqToHom (_ : Y✝ = X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y✝) i)\n    else 0) =\n    Hom.f f i\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : (single V c j).obj X✝ ⟶ (single V c j).obj Y✝\ni : ι\nh : i = j\n⊢ eqToHom (_ : X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) X✝) i = X✝) ≫\n      (eqToHom (_ : X✝ = if j = j then X✝ else 0) ≫ Hom.f f j ≫ eqToHom (_ : (if j = j then Y✝ else 0) = Y✝)) ≫\n        eqToHom (_ : Y✝ = X ((fun A => mk (fun i => if i = j then A else 0) fun i j_1 => 0) Y✝) i) =\n    Hom.f f i\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nX✝ Y✝ : V\ni : ι\nf : (single V c i).obj X✝ ⟶ (single V c i).obj Y✝\n⊢ eqToHom (_ : X ((fun A => mk (fun i_1 => if i_1 = i then A else 0) fun i_1 j => 0) X✝) i = X✝) ≫\n      (eqToHom (_ : X✝ = if i = i then X✝ else 0) ≫ Hom.f f i ≫ eqToHom (_ : (if i = i then Y✝ else 0) = Y✝)) ≫\n        eqToHom (_ : Y✝ = X ((fun A => mk (fun i_1 => if i_1 = i then A else 0) fun i_1 j => 0) Y✝) i) =\n    Hom.f f i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : (single V c j).obj X✝ ⟶ (single V c j).obj Y✝\ni : ι\nh : ¬i = j\n⊢ 0 = Hom.f f i\n[PROOFSTEP]\nsymm\n[GOAL]\ncase neg\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : (single V c j).obj X✝ ⟶ (single V c j).obj Y✝\ni : ι\nh : ¬i = j\n⊢ Hom.f f i = 0\n[PROOFSTEP]\napply zero_of_target_iso_zero\n[GOAL]\ncase neg.i\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : (single V c j).obj X✝ ⟶ (single V c j).obj Y✝\ni : ι\nh : ¬i = j\n⊢ X ((single V c j).obj Y✝) i ≅ 0\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase neg.i\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\ninst✝¹ : HasZeroObject V\nι : Type u_1\ninst✝ : DecidableEq ι\nc : ComplexShape ι\nj : ι\nX✝ Y✝ : V\nf : (single V c j).obj X✝ ⟶ (single V c j).obj Y✝\ni : ι\nh : ¬i = j\n⊢ (if i = j then Y✝ else 0) ≅ 0\n[PROOFSTEP]\nrw [if_neg h]\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ {\n          obj := fun X =>\n            HomologicalComplex.mk\n              (fun n =>\n                match n with\n                | 0 => X\n                | Nat.succ n => 0)\n              fun i j => 0,\n          map := fun {X Y} f =>\n            Hom.mk fun n =>\n              match n with\n              | 0 => f\n              | Nat.succ n => 0 }.map\n      (𝟙 X) =\n    𝟙\n      ({\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.obj\n        X)\n[PROOFSTEP]\next (_ | _)\n[GOAL]\ncase h.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ Hom.f\n      ({\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.map\n        (𝟙 X))\n      Nat.zero =\n    Hom.f\n      (𝟙\n        ({\n              obj := fun X =>\n                HomologicalComplex.mk\n                  (fun n =>\n                    match n with\n                    | 0 => X\n                    | Nat.succ n => 0)\n                  fun i j => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun n =>\n                  match n with\n                  | 0 => f\n                  | Nat.succ n => 0 }.obj\n          X))\n      Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ Hom.f\n      ({\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.map\n        (𝟙 X))\n      (Nat.succ n✝) =\n    Hom.f\n      (𝟙\n        ({\n              obj := fun X =>\n                HomologicalComplex.mk\n                  (fun n =>\n                    match n with\n                    | 0 => X\n                    | Nat.succ n => 0)\n                  fun i j => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun n =>\n                  match n with\n                  | 0 => f\n                  | Nat.succ n => 0 }.obj\n          X))\n      (Nat.succ n✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX✝ Y✝ Z✝ : V\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ {\n          obj := fun X =>\n            HomologicalComplex.mk\n              (fun n =>\n                match n with\n                | 0 => X\n                | Nat.succ n => 0)\n              fun i j => 0,\n          map := fun {X Y} f =>\n            Hom.mk fun n =>\n              match n with\n              | 0 => f\n              | Nat.succ n => 0 }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.map\n        f ≫\n      {\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.map\n        g\n[PROOFSTEP]\next (_ | _)\n[GOAL]\ncase h.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX✝ Y✝ Z✝ : V\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ Hom.f\n      ({\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.map\n        (f ≫ g))\n      Nat.zero =\n    Hom.f\n      ({\n              obj := fun X =>\n                HomologicalComplex.mk\n                  (fun n =>\n                    match n with\n                    | 0 => X\n                    | Nat.succ n => 0)\n                  fun i j => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun n =>\n                  match n with\n                  | 0 => f\n                  | Nat.succ n => 0 }.map\n          f ≫\n        {\n              obj := fun X =>\n                HomologicalComplex.mk\n                  (fun n =>\n                    match n with\n                    | 0 => X\n                    | Nat.succ n => 0)\n                  fun i j => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun n =>\n                  match n with\n                  | 0 => f\n                  | Nat.succ n => 0 }.map\n          g)\n      Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX✝ Y✝ Z✝ : V\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nn✝ : ℕ\n⊢ Hom.f\n      ({\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.map\n        (f ≫ g))\n      (Nat.succ n✝) =\n    Hom.f\n      ({\n              obj := fun X =>\n                HomologicalComplex.mk\n                  (fun n =>\n                    match n with\n                    | 0 => X\n                    | Nat.succ n => 0)\n                  fun i j => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun n =>\n                  match n with\n                  | 0 => f\n                  | Nat.succ n => 0 }.map\n          f ≫\n        {\n              obj := fun X =>\n                HomologicalComplex.mk\n                  (fun n =>\n                    match n with\n                    | 0 => X\n                    | Nat.succ n => 0)\n                  fun i j => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun n =>\n                  match n with\n                  | 0 => f\n                  | Nat.succ n => 0 }.map\n          g)\n      (Nat.succ n✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nj : ℕ\n⊢ dTo ((single₀ V).obj X) j = 0\n[PROOFSTEP]\nrw [dTo_eq ((single₀ V).obj X) rfl]\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nj : ℕ\n⊢ (xPrevIso ((single₀ V).obj X) (_ : j + 1 = j + 1)).hom ≫ d ((single₀ V).obj X) (j + 1) j = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\ni : ℕ\n⊢ dFrom ((single₀ V).obj X) i = 0\n[PROOFSTEP]\ncases i\n[GOAL]\ncase zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ dFrom ((single₀ V).obj X) Nat.zero = 0\n[PROOFSTEP]\nrw [dFrom_eq_zero]\n[GOAL]\ncase zero.h\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ ¬ComplexShape.Rel (ComplexShape.down ℕ) Nat.zero (ComplexShape.next (ComplexShape.down ℕ) Nat.zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ dFrom ((single₀ V).obj X) (Nat.succ n✝) = 0\n[PROOFSTEP]\nerw [dFrom_eq ((single₀ V).obj X) rfl]\n[GOAL]\ncase succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ d ((single₀ V).obj X) (n✝ + 1) n✝ ≫ (xNextIso ((single₀ V).obj X) (_ : n✝ + 1 = n✝ + 1)).inv = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nX : V\n⊢ dTo ((single₀ V).obj X) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nX : V\n⊢ dFrom ((single₀ V).obj X) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\n⊢ (single₀ V ⋙ homologyFunctor V (ComplexShape.down ℕ) 0).map f ≫\n      ((fun X =>\n            homology.congr (_ : dTo ((single₀ V).obj X) 0 ≫ dFrom ((single₀ V).obj X) 0 = 0) (_ : 0 ≫ 0 = 0) (_ : 0 = 0)\n                (_ : d ((single₀ V).obj X) 0 (ComplexShape.next (ComplexShape.down ℕ) 0) = 0) ≪≫\n              homologyZeroZero)\n          Y✝).hom =\n    ((fun X =>\n            homology.congr (_ : dTo ((single₀ V).obj X) 0 ≫ dFrom ((single₀ V).obj X) 0 = 0) (_ : 0 ≫ 0 = 0) (_ : 0 = 0)\n                (_ : d ((single₀ V).obj X) 0 (ComplexShape.next (ComplexShape.down ℕ) 0) = 0) ≪≫\n              homologyZeroZero)\n          X✝).hom ≫\n      (𝟭 V).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\n⊢ homology.map (_ : dTo ((single₀ V).obj X✝) 0 ≫ dFrom ((single₀ V).obj X✝) 0 = 0)\n        (_ : dTo ((single₀ V).obj Y✝) 0 ≫ dFrom ((single₀ V).obj Y✝) 0 = 0) (Hom.sqTo ((single₀ V).map f) 0)\n        (Hom.sqFrom ((single₀ V).map f) 0)\n        (_ : (Hom.sqTo ((single₀ V).map f) 0).right = (Hom.sqTo ((single₀ V).map f) 0).right) ≫\n      homology.map (_ : dTo ((single₀ V).obj Y✝) 0 ≫ dFrom ((single₀ V).obj Y✝) 0 = 0) (_ : 0 ≫ 0 = 0)\n          (CommaMorphism.mk (𝟙 (xPrev ((single₀ V).obj Y✝) 0)) (𝟙 Y✝))\n          (CommaMorphism.mk (𝟙 Y✝) (𝟙 (xNext ((single₀ V).obj Y✝) 0)))\n          (_ :\n            (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right =\n              (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right) ≫\n        homology.desc 0 0 (_ : 0 ≫ 0 = 0) (Subobject.arrow (kernelSubobject 0))\n          (_ : imageToKernel 0 0 (_ : 0 ≫ 0 = 0) ≫ Subobject.arrow (kernelSubobject 0) = 0) =\n    (homology.map (_ : dTo ((single₀ V).obj X✝) 0 ≫ dFrom ((single₀ V).obj X✝) 0 = 0) (_ : 0 ≫ 0 = 0)\n          (CommaMorphism.mk (𝟙 (xPrev ((single₀ V).obj X✝) 0)) (𝟙 X✝))\n          (CommaMorphism.mk (𝟙 X✝) (𝟙 (xNext ((single₀ V).obj X✝) 0)))\n          (_ :\n            (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right =\n              (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right) ≫\n        homology.desc 0 0 (_ : 0 ≫ 0 = 0) (Subobject.arrow (kernelSubobject 0))\n          (_ : imageToKernel 0 0 (_ : 0 ≫ 0 = 0) ≫ Subobject.arrow (kernelSubobject 0) = 0)) ≫\n      f\n[PROOFSTEP]\next\n[GOAL]\ncase p\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\n⊢ homology.π (dTo ((single₀ V).obj X✝) 0) (dFrom ((single₀ V).obj X✝) 0)\n        (_ : dTo ((single₀ V).obj X✝) 0 ≫ dFrom ((single₀ V).obj X✝) 0 = 0) ≫\n      homology.map (_ : dTo ((single₀ V).obj X✝) 0 ≫ dFrom ((single₀ V).obj X✝) 0 = 0)\n          (_ : dTo ((single₀ V).obj Y✝) 0 ≫ dFrom ((single₀ V).obj Y✝) 0 = 0) (Hom.sqTo ((single₀ V).map f) 0)\n          (Hom.sqFrom ((single₀ V).map f) 0)\n          (_ : (Hom.sqTo ((single₀ V).map f) 0).right = (Hom.sqTo ((single₀ V).map f) 0).right) ≫\n        homology.map (_ : dTo ((single₀ V).obj Y✝) 0 ≫ dFrom ((single₀ V).obj Y✝) 0 = 0) (_ : 0 ≫ 0 = 0)\n            (CommaMorphism.mk (𝟙 (xPrev ((single₀ V).obj Y✝) 0)) (𝟙 Y✝))\n            (CommaMorphism.mk (𝟙 Y✝) (𝟙 (xNext ((single₀ V).obj Y✝) 0)))\n            (_ :\n              (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right =\n                (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right) ≫\n          homology.desc 0 0 (_ : 0 ≫ 0 = 0) (Subobject.arrow (kernelSubobject 0))\n            (_ : imageToKernel 0 0 (_ : 0 ≫ 0 = 0) ≫ Subobject.arrow (kernelSubobject 0) = 0) =\n    homology.π (dTo ((single₀ V).obj X✝) 0) (dFrom ((single₀ V).obj X✝) 0)\n        (_ : dTo ((single₀ V).obj X✝) 0 ≫ dFrom ((single₀ V).obj X✝) 0 = 0) ≫\n      (homology.map (_ : dTo ((single₀ V).obj X✝) 0 ≫ dFrom ((single₀ V).obj X✝) 0 = 0) (_ : 0 ≫ 0 = 0)\n            (CommaMorphism.mk (𝟙 (xPrev ((single₀ V).obj X✝) 0)) (𝟙 X✝))\n            (CommaMorphism.mk (𝟙 X✝) (𝟙 (xNext ((single₀ V).obj X✝) 0)))\n            (_ :\n              (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right =\n                (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right) ≫\n          homology.desc 0 0 (_ : 0 ≫ 0 = 0) (Subobject.arrow (kernelSubobject 0))\n            (_ : imageToKernel 0 0 (_ : 0 ≫ 0 = 0) ≫ Subobject.arrow (kernelSubobject 0) = 0)) ≫\n        f\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nn : ℕ\nX : V\n⊢ dTo ((single₀ V).obj X) (n + 1) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nn : ℕ\nX : V\n⊢ dFrom ((single₀ V).obj X) (n + 1) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : C ⟶ (single₀ V).obj X\n⊢ d C 1 0 ≫ Hom.f f 0 = 0\n[PROOFSTEP]\nrw [← f.comm 1 0]\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : C ⟶ (single₀ V).obj X\n⊢ Hom.f f 1 ≫ d ((single₀ V).obj X) 1 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\ni j : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        i ≫\n      d ((single₀ V).obj X) i j =\n    d C i j ≫\n      (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        j\n[PROOFSTEP]\nrcases i with (_ | _ | i)\n[GOAL]\ncase zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\nj : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) Nat.zero j\n⊢ (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        Nat.zero ≫\n      d ((single₀ V).obj X) Nat.zero j =\n    d C Nat.zero j ≫\n      (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase succ.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\nj : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ Nat.zero) j\n⊢ (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        (Nat.succ Nat.zero) ≫\n      d ((single₀ V).obj X) (Nat.succ Nat.zero) j =\n    d C (Nat.succ Nat.zero) j ≫\n      (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase succ.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\nj i : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ (Nat.succ i)) j\n⊢ (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        (Nat.succ (Nat.succ i)) ≫\n      d ((single₀ V).obj X) (Nat.succ (Nat.succ i)) j =\n    d C (Nat.succ (Nat.succ i)) j ≫\n      (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase zero.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\nh : ComplexShape.Rel (ComplexShape.down ℕ) Nat.zero Nat.zero\n⊢ (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        Nat.zero ≫\n      d ((single₀ V).obj X) Nat.zero Nat.zero =\n    d C Nat.zero Nat.zero ≫\n      (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        Nat.zero\n[PROOFSTEP]\nsimp only [single₀_obj_X_d, comp_zero]\n[GOAL]\ncase zero.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\nn✝ : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) Nat.zero (Nat.succ n✝)\n⊢ (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        Nat.zero ≫\n      d ((single₀ V).obj X) Nat.zero (Nat.succ n✝) =\n    d C Nat.zero (Nat.succ n✝) ≫\n      (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        (Nat.succ n✝)\n[PROOFSTEP]\nsimp only [single₀_obj_X_d, comp_zero]\n[GOAL]\ncase succ.zero.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\nh : ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ Nat.zero) Nat.zero\n⊢ (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        (Nat.succ Nat.zero) ≫\n      d ((single₀ V).obj X) (Nat.succ Nat.zero) Nat.zero =\n    d C (Nat.succ Nat.zero) Nat.zero ≫\n      (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        Nat.zero\n[PROOFSTEP]\nsimp only [single₀_obj_X_d, comp_zero]\n[GOAL]\ncase succ.zero.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\nn✝ : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ Nat.zero) (Nat.succ n✝)\n⊢ (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        (Nat.succ Nat.zero) ≫\n      d ((single₀ V).obj X) (Nat.succ Nat.zero) (Nat.succ n✝) =\n    d C (Nat.succ Nat.zero) (Nat.succ n✝) ≫\n      (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        (Nat.succ n✝)\n[PROOFSTEP]\nsimp only [single₀_obj_X_d, comp_zero]\n[GOAL]\ncase succ.succ.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\ni : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ (Nat.succ i)) Nat.zero\n⊢ (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        (Nat.succ (Nat.succ i)) ≫\n      d ((single₀ V).obj X) (Nat.succ (Nat.succ i)) Nat.zero =\n    d C (Nat.succ (Nat.succ i)) Nat.zero ≫\n      (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        Nat.zero\n[PROOFSTEP]\nsimp only [single₀_obj_X_d, comp_zero]\n[GOAL]\ncase succ.succ.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\ni n✝ : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ (Nat.succ i)) (Nat.succ n✝)\n⊢ (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        (Nat.succ (Nat.succ i)) ≫\n      d ((single₀ V).obj X) (Nat.succ (Nat.succ i)) (Nat.succ n✝) =\n    d C (Nat.succ (Nat.succ i)) (Nat.succ n✝) ≫\n      (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        (Nat.succ n✝)\n[PROOFSTEP]\nsimp only [single₀_obj_X_d, comp_zero]\n[GOAL]\ncase zero.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\nh : ComplexShape.Rel (ComplexShape.down ℕ) Nat.zero Nat.zero\n⊢ 0 = d C Nat.zero Nat.zero ≫ ↑f\n[PROOFSTEP]\nrw [C.shape, zero_comp]\n[GOAL]\ncase zero.zero.a\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\nh : ComplexShape.Rel (ComplexShape.down ℕ) Nat.zero Nat.zero\n⊢ ¬ComplexShape.Rel (ComplexShape.down ℕ) Nat.zero Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.zero.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\nh : ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ Nat.zero) Nat.zero\n⊢ 0 = d C (Nat.succ Nat.zero) Nat.zero ≫ ↑f\n[PROOFSTEP]\nexact f.2.symm\n[GOAL]\ncase succ.succ.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\ni : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ (Nat.succ i)) Nat.zero\n⊢ 0 = d C (Nat.succ (Nat.succ i)) Nat.zero ≫ ↑f\n[PROOFSTEP]\nrw [C.shape, zero_comp]\n[GOAL]\ncase succ.succ.zero.a\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : { f // d C 1 0 ≫ f = 0 }\ni : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ (Nat.succ i)) Nat.zero\n⊢ ¬ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ (Nat.succ i)) Nat.zero\n[PROOFSTEP]\nexact i.succ_succ_ne_one.symm\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : C ⟶ (single₀ V).obj X\n⊢ (fun f =>\n        Hom.mk fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n      ((fun f => { val := Hom.f f 0, property := (_ : d C 1 0 ≫ Hom.f f 0 = 0) }) f) =\n    f\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : C ⟶ (single₀ V).obj X\ni : ℕ\n⊢ Hom.f\n      ((fun f =>\n          Hom.mk fun i =>\n            match i with\n            | 0 => ↑f\n            | Nat.succ n => 0)\n        ((fun f => { val := Hom.f f 0, property := (_ : d C 1 0 ≫ Hom.f f 0 = 0) }) f))\n      i =\n    Hom.f f i\n[PROOFSTEP]\nrcases i with ⟨⟩\n[GOAL]\ncase h.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : C ⟶ (single₀ V).obj X\n⊢ Hom.f\n      ((fun f =>\n          Hom.mk fun i =>\n            match i with\n            | 0 => ↑f\n            | Nat.succ n => 0)\n        ((fun f => { val := Hom.f f 0, property := (_ : d C 1 0 ≫ Hom.f f 0 = 0) }) f))\n      Nat.zero =\n    Hom.f f Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : C ⟶ (single₀ V).obj X\nn✝ : ℕ\n⊢ Hom.f\n      ((fun f =>\n          Hom.mk fun i =>\n            match i with\n            | 0 => ↑f\n            | Nat.succ n => 0)\n        ((fun f => { val := Hom.f f 0, property := (_ : d C 1 0 ≫ Hom.f f 0 = 0) }) f))\n      (Nat.succ n✝) =\n    Hom.f f (Nat.succ n✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : C ⟶ (single₀ V).obj X\nn✝ : ℕ\n⊢ 0 = Hom.f f (Nat.succ n✝)\n[PROOFSTEP]\next\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\n⊢ Function.RightInverse\n    (fun f =>\n      Hom.mk fun i =>\n        match i with\n        | 0 => ↑f\n        | Nat.succ n => 0)\n    fun f => { val := Hom.f f 0, property := (_ : d C 1 0 ≫ Hom.f f 0 = 0) }\n[PROOFSTEP]\naesop_cat\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf g : C ⟶ (single₀ V).obj X\nh : Hom.f f 0 = Hom.f g 0\n⊢ ↑(toSingle₀Equiv C X) f = ↑(toSingle₀Equiv C X) g\n[PROOFSTEP]\next\n[GOAL]\ncase a\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf g : C ⟶ (single₀ V).obj X\nh : Hom.f f 0 = Hom.f g 0\n⊢ ↑(↑(toSingle₀Equiv C X) f) = ↑(↑(toSingle₀Equiv C X) g)\n[PROOFSTEP]\nexact h\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\ni j : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) i j\n⊢ (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        i ≫\n      d C i j =\n    d ((single₀ V).obj X) i j ≫\n      (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        j\n[PROOFSTEP]\ncases i\n[GOAL]\ncase zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nj : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) Nat.zero j\n⊢ (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        Nat.zero ≫\n      d C Nat.zero j =\n    d ((single₀ V).obj X) Nat.zero j ≫\n      (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nj n✝ : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ n✝) j\n⊢ (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        (Nat.succ n✝) ≫\n      d C (Nat.succ n✝) j =\n    d ((single₀ V).obj X) (Nat.succ n✝) j ≫\n      (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase zero.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nh : ComplexShape.Rel (ComplexShape.down ℕ) Nat.zero Nat.zero\n⊢ (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        Nat.zero ≫\n      d C Nat.zero Nat.zero =\n    d ((single₀ V).obj X) Nat.zero Nat.zero ≫\n      (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        Nat.zero\n[PROOFSTEP]\nsimp only [shape, ComplexShape.down_Rel, Nat.one_ne_zero, not_false_iff, zero_comp, single₀_obj_X_d, Nat.zero_eq,\n  add_eq_zero, comp_zero]\n[GOAL]\ncase zero.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nn✝ : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) Nat.zero (Nat.succ n✝)\n⊢ (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        Nat.zero ≫\n      d C Nat.zero (Nat.succ n✝) =\n    d ((single₀ V).obj X) Nat.zero (Nat.succ n✝) ≫\n      (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        (Nat.succ n✝)\n[PROOFSTEP]\nsimp only [shape, ComplexShape.down_Rel, Nat.one_ne_zero, not_false_iff, zero_comp, single₀_obj_X_d, Nat.zero_eq,\n  add_eq_zero, comp_zero]\n[GOAL]\ncase succ.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nn✝ : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ n✝) Nat.zero\n⊢ (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        (Nat.succ n✝) ≫\n      d C (Nat.succ n✝) Nat.zero =\n    d ((single₀ V).obj X) (Nat.succ n✝) Nat.zero ≫\n      (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        Nat.zero\n[PROOFSTEP]\nsimp only [shape, ComplexShape.down_Rel, Nat.one_ne_zero, not_false_iff, zero_comp, single₀_obj_X_d, Nat.zero_eq,\n  add_eq_zero, comp_zero]\n[GOAL]\ncase succ.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nn✝¹ n✝ : ℕ\nh : ComplexShape.Rel (ComplexShape.down ℕ) (Nat.succ n✝¹) (Nat.succ n✝)\n⊢ (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        (Nat.succ n✝¹) ≫\n      d C (Nat.succ n✝¹) (Nat.succ n✝) =\n    d ((single₀ V).obj X) (Nat.succ n✝¹) (Nat.succ n✝) ≫\n      (fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n        (Nat.succ n✝)\n[PROOFSTEP]\nsimp only [shape, ComplexShape.down_Rel, Nat.one_ne_zero, not_false_iff, zero_comp, single₀_obj_X_d, Nat.zero_eq,\n  add_eq_zero, comp_zero]\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : (single₀ V).obj X ⟶ C\n⊢ (fun f =>\n        Hom.mk fun i =>\n          match i with\n          | 0 => f\n          | Nat.succ n => 0)\n      ((fun f => Hom.f f 0) f) =\n    f\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : (single₀ V).obj X ⟶ C\ni : ℕ\n⊢ Hom.f\n      ((fun f =>\n          Hom.mk fun i =>\n            match i with\n            | 0 => f\n            | Nat.succ n => 0)\n        ((fun f => Hom.f f 0) f))\n      i =\n    Hom.f f i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : (single₀ V).obj X ⟶ C\n⊢ Hom.f\n      ((fun f =>\n          Hom.mk fun i =>\n            match i with\n            | 0 => f\n            | Nat.succ n => 0)\n        ((fun f => Hom.f f 0) f))\n      Nat.zero =\n    Hom.f f Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : (single₀ V).obj X ⟶ C\nn✝ : ℕ\n⊢ Hom.f\n      ((fun f =>\n          Hom.mk fun i =>\n            match i with\n            | 0 => f\n            | Nat.succ n => 0)\n        ((fun f => Hom.f f 0) f))\n      (Nat.succ n✝) =\n    Hom.f f (Nat.succ n✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : ChainComplex V ℕ\nX : V\nf : (single₀ V).obj X ⟶ C\nn✝ : ℕ\n⊢ 0 = Hom.f f (Nat.succ n✝)\n[PROOFSTEP]\next\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\ni : ℕ\n⊢ HomologicalComplex.X ((single₀ V).obj X) i ⟶ HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ HomologicalComplex.X ((single₀ V).obj X) Nat.zero ⟶\n    HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) Nat.zero\n[PROOFSTEP]\nexact 𝟙 _\n[GOAL]\ncase succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n✝) ⟶\n    HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) (Nat.succ n✝)\n[PROOFSTEP]\nexact 𝟙 _\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\ni : ℕ\n⊢ HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i ⟶ HomologicalComplex.X ((single₀ V).obj X) i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) Nat.zero ⟶\n    HomologicalComplex.X ((single₀ V).obj X) Nat.zero\n[PROOFSTEP]\nexact 𝟙 _\n[GOAL]\ncase succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) (Nat.succ n✝) ⟶\n    HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n✝)\n[PROOFSTEP]\nexact 𝟙 _\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ Hom.f\n      ((Hom.mk fun i =>\n          Nat.casesOn (motive := fun t =>\n            i = t →\n              (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n                HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i))\n            i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n            (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n))) (_ : i = i)) ≫\n        Hom.mk fun i =>\n          Nat.casesOn (motive := fun t =>\n            i = t →\n              (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i ⟶\n                HomologicalComplex.X ((single₀ V).obj X) i))\n            i\n            (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) Nat.zero))\n            (fun n h =>\n              (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) (Nat.succ n)))\n            (_ : i = i))\n      0 =\n    Hom.f (𝟙 ((single₀ V).obj X)) 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ ((Hom.mk fun i =>\n        Nat.casesOn (motive := fun t =>\n          i = t →\n            (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i ⟶\n              HomologicalComplex.X ((single₀ V).obj X) i))\n          i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) Nat.zero))\n          (fun n h =>\n            (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) (Nat.succ n)))\n          (_ : i = i)) ≫\n      Hom.mk fun i =>\n        Nat.casesOn (motive := fun t =>\n          i = t →\n            (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n              HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i))\n          i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n          (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n))) (_ : i = i)) =\n    𝟙 ((single V (ComplexShape.down ℕ) 0).obj X)\n[PROOFSTEP]\next (_ | _)\n[GOAL]\ncase h.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ Hom.f\n      ((Hom.mk fun i =>\n          Nat.casesOn (motive := fun t =>\n            i = t →\n              (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i ⟶\n                HomologicalComplex.X ((single₀ V).obj X) i))\n            i\n            (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) Nat.zero))\n            (fun n h =>\n              (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) (Nat.succ n)))\n            (_ : i = i)) ≫\n        Hom.mk fun i =>\n          Nat.casesOn (motive := fun t =>\n            i = t →\n              (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n                HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i))\n            i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n            (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n))) (_ : i = i))\n      Nat.zero =\n    Hom.f (𝟙 ((single V (ComplexShape.down ℕ) 0).obj X)) Nat.zero\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ 𝟙 (if 0 = 0 then X else 0) ≫ 𝟙 X = 𝟙 (if 0 = 0 then X else 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ Hom.f\n      ((Hom.mk fun i =>\n          Nat.casesOn (motive := fun t =>\n            i = t →\n              (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i ⟶\n                HomologicalComplex.X ((single₀ V).obj X) i))\n            i\n            (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) Nat.zero))\n            (fun n h =>\n              (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) (Nat.succ n)))\n            (_ : i = i)) ≫\n        Hom.mk fun i =>\n          Nat.casesOn (motive := fun t =>\n            i = t →\n              (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n                HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i))\n            i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n            (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n))) (_ : i = i))\n      (Nat.succ n✝) =\n    Hom.f (𝟙 ((single V (ComplexShape.down ℕ) 0).obj X)) (Nat.succ n✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ 𝟙 (if Nat.succ n✝ = 0 then X else 0) ≫ 𝟙 0 = 𝟙 (if Nat.succ n✝ = 0 then X else 0)\n[PROOFSTEP]\nrw [Category.comp_id]\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\n⊢ (single₀ V).map f ≫\n      ((fun X =>\n            Iso.mk\n              (Hom.mk fun i =>\n                Nat.casesOn (motive := fun t =>\n                  i = t →\n                    (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n                      HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i))\n                  i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n                  (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n)))\n                  (_ : i = i))\n              (Hom.mk fun i =>\n                Nat.casesOn (motive := fun t =>\n                  i = t →\n                    (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i ⟶\n                      HomologicalComplex.X ((single₀ V).obj X) i))\n                  i\n                  (fun h =>\n                    (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) Nat.zero))\n                  (fun n h =>\n                    (_ : Nat.succ n = i) ▸\n                      𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) (Nat.succ n)))\n                  (_ : i = i)))\n          Y✝).hom =\n    ((fun X =>\n            Iso.mk\n              (Hom.mk fun i =>\n                Nat.casesOn (motive := fun t =>\n                  i = t →\n                    (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n                      HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i))\n                  i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n                  (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n)))\n                  (_ : i = i))\n              (Hom.mk fun i =>\n                Nat.casesOn (motive := fun t =>\n                  i = t →\n                    (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i ⟶\n                      HomologicalComplex.X ((single₀ V).obj X) i))\n                  i\n                  (fun h =>\n                    (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) Nat.zero))\n                  (fun n h =>\n                    (_ : Nat.succ n = i) ▸\n                      𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) (Nat.succ n)))\n                  (_ : i = i)))\n          X✝).hom ≫\n      (single V (ComplexShape.down ℕ) 0).map f\n[PROOFSTEP]\next (_ | _)\n[GOAL]\ncase h.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\n⊢ Hom.f\n      ((single₀ V).map f ≫\n        ((fun X =>\n              Iso.mk\n                (Hom.mk fun i =>\n                  Nat.casesOn (motive := fun t =>\n                    i = t →\n                      (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n                        HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i))\n                    i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n                    (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n)))\n                    (_ : i = i))\n                (Hom.mk fun i =>\n                  Nat.casesOn (motive := fun t =>\n                    i = t →\n                      (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i ⟶\n                        HomologicalComplex.X ((single₀ V).obj X) i))\n                    i\n                    (fun h =>\n                      (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) Nat.zero))\n                    (fun n h =>\n                      (_ : Nat.succ n = i) ▸\n                        𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) (Nat.succ n)))\n                    (_ : i = i)))\n            Y✝).hom)\n      Nat.zero =\n    Hom.f\n      (((fun X =>\n              Iso.mk\n                (Hom.mk fun i =>\n                  Nat.casesOn (motive := fun t =>\n                    i = t →\n                      (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n                        HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i))\n                    i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n                    (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n)))\n                    (_ : i = i))\n                (Hom.mk fun i =>\n                  Nat.casesOn (motive := fun t =>\n                    i = t →\n                      (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i ⟶\n                        HomologicalComplex.X ((single₀ V).obj X) i))\n                    i\n                    (fun h =>\n                      (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) Nat.zero))\n                    (fun n h =>\n                      (_ : Nat.succ n = i) ▸\n                        𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) (Nat.succ n)))\n                    (_ : i = i)))\n            X✝).hom ≫\n        (single V (ComplexShape.down ℕ) 0).map f)\n      Nat.zero\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\nn✝ : ℕ\n⊢ Hom.f\n      ((single₀ V).map f ≫\n        ((fun X =>\n              Iso.mk\n                (Hom.mk fun i =>\n                  Nat.casesOn (motive := fun t =>\n                    i = t →\n                      (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n                        HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i))\n                    i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n                    (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n)))\n                    (_ : i = i))\n                (Hom.mk fun i =>\n                  Nat.casesOn (motive := fun t =>\n                    i = t →\n                      (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i ⟶\n                        HomologicalComplex.X ((single₀ V).obj X) i))\n                    i\n                    (fun h =>\n                      (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) Nat.zero))\n                    (fun n h =>\n                      (_ : Nat.succ n = i) ▸\n                        𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) (Nat.succ n)))\n                    (_ : i = i)))\n            Y✝).hom)\n      (Nat.succ n✝) =\n    Hom.f\n      (((fun X =>\n              Iso.mk\n                (Hom.mk fun i =>\n                  Nat.casesOn (motive := fun t =>\n                    i = t →\n                      (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n                        HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i))\n                    i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n                    (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n)))\n                    (_ : i = i))\n                (Hom.mk fun i =>\n                  Nat.casesOn (motive := fun t =>\n                    i = t →\n                      (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) i ⟶\n                        HomologicalComplex.X ((single₀ V).obj X) i))\n                    i\n                    (fun h =>\n                      (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) Nat.zero))\n                    (fun n h =>\n                      (_ : Nat.succ n = i) ▸\n                        𝟙 (HomologicalComplex.X ((single V (ComplexShape.down ℕ) 0).obj X) (Nat.succ n)))\n                    (_ : i = i)))\n            X✝).hom ≫\n        (single V (ComplexShape.down ℕ) 0).map f)\n      (Nat.succ n✝)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ {\n          obj := fun X =>\n            HomologicalComplex.mk\n              (fun n =>\n                match n with\n                | 0 => X\n                | Nat.succ n => 0)\n              fun i j => 0,\n          map := fun {X Y} f =>\n            Hom.mk fun n =>\n              match n with\n              | 0 => f\n              | Nat.succ n => 0 }.map\n      (𝟙 X) =\n    𝟙\n      ({\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.obj\n        X)\n[PROOFSTEP]\next (_ | _)\n[GOAL]\ncase h.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ Hom.f\n      ({\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.map\n        (𝟙 X))\n      Nat.zero =\n    Hom.f\n      (𝟙\n        ({\n              obj := fun X =>\n                HomologicalComplex.mk\n                  (fun n =>\n                    match n with\n                    | 0 => X\n                    | Nat.succ n => 0)\n                  fun i j => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun n =>\n                  match n with\n                  | 0 => f\n                  | Nat.succ n => 0 }.obj\n          X))\n      Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ Hom.f\n      ({\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.map\n        (𝟙 X))\n      (Nat.succ n✝) =\n    Hom.f\n      (𝟙\n        ({\n              obj := fun X =>\n                HomologicalComplex.mk\n                  (fun n =>\n                    match n with\n                    | 0 => X\n                    | Nat.succ n => 0)\n                  fun i j => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun n =>\n                  match n with\n                  | 0 => f\n                  | Nat.succ n => 0 }.obj\n          X))\n      (Nat.succ n✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX✝ Y✝ Z✝ : V\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ {\n          obj := fun X =>\n            HomologicalComplex.mk\n              (fun n =>\n                match n with\n                | 0 => X\n                | Nat.succ n => 0)\n              fun i j => 0,\n          map := fun {X Y} f =>\n            Hom.mk fun n =>\n              match n with\n              | 0 => f\n              | Nat.succ n => 0 }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.map\n        f ≫\n      {\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.map\n        g\n[PROOFSTEP]\next (_ | _)\n[GOAL]\ncase h.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX✝ Y✝ Z✝ : V\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ Hom.f\n      ({\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.map\n        (f ≫ g))\n      Nat.zero =\n    Hom.f\n      ({\n              obj := fun X =>\n                HomologicalComplex.mk\n                  (fun n =>\n                    match n with\n                    | 0 => X\n                    | Nat.succ n => 0)\n                  fun i j => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun n =>\n                  match n with\n                  | 0 => f\n                  | Nat.succ n => 0 }.map\n          f ≫\n        {\n              obj := fun X =>\n                HomologicalComplex.mk\n                  (fun n =>\n                    match n with\n                    | 0 => X\n                    | Nat.succ n => 0)\n                  fun i j => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun n =>\n                  match n with\n                  | 0 => f\n                  | Nat.succ n => 0 }.map\n          g)\n      Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX✝ Y✝ Z✝ : V\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nn✝ : ℕ\n⊢ Hom.f\n      ({\n            obj := fun X =>\n              HomologicalComplex.mk\n                (fun n =>\n                  match n with\n                  | 0 => X\n                  | Nat.succ n => 0)\n                fun i j => 0,\n            map := fun {X Y} f =>\n              Hom.mk fun n =>\n                match n with\n                | 0 => f\n                | Nat.succ n => 0 }.map\n        (f ≫ g))\n      (Nat.succ n✝) =\n    Hom.f\n      ({\n              obj := fun X =>\n                HomologicalComplex.mk\n                  (fun n =>\n                    match n with\n                    | 0 => X\n                    | Nat.succ n => 0)\n                  fun i j => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun n =>\n                  match n with\n                  | 0 => f\n                  | Nat.succ n => 0 }.map\n          f ≫\n        {\n              obj := fun X =>\n                HomologicalComplex.mk\n                  (fun n =>\n                    match n with\n                    | 0 => X\n                    | Nat.succ n => 0)\n                  fun i j => 0,\n              map := fun {X Y} f =>\n                Hom.mk fun n =>\n                  match n with\n                  | 0 => f\n                  | Nat.succ n => 0 }.map\n          g)\n      (Nat.succ n✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nj : ℕ\n⊢ dFrom ((single₀ V).obj X) j = 0\n[PROOFSTEP]\nrw [dFrom_eq ((single₀ V).obj X) rfl]\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nj : ℕ\n⊢ d ((single₀ V).obj X) j (j + 1) ≫ (xNextIso ((single₀ V).obj X) (_ : j + 1 = j + 1)).inv = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\ni : ℕ\n⊢ dTo ((single₀ V).obj X) i = 0\n[PROOFSTEP]\ncases i\n[GOAL]\ncase zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ dTo ((single₀ V).obj X) Nat.zero = 0\n[PROOFSTEP]\nrw [dTo_eq_zero]\n[GOAL]\ncase zero.h\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ ¬ComplexShape.Rel (ComplexShape.up ℕ) (ComplexShape.prev (ComplexShape.up ℕ) Nat.zero) Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ dTo ((single₀ V).obj X) (Nat.succ n✝) = 0\n[PROOFSTEP]\nerw [dTo_eq ((single₀ V).obj X) rfl]\n[GOAL]\ncase succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ (xPrevIso ((single₀ V).obj X) (_ : n✝ + 1 = n✝ + 1)).hom ≫ d ((single₀ V).obj X) n✝ (n✝ + 1) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nX : V\n⊢ dTo ((single₀ V).obj X) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nX : V\n⊢ dFrom ((single₀ V).obj X) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\n⊢ (single₀ V ⋙ homologyFunctor V (ComplexShape.up ℕ) 0).map f ≫\n      ((fun X =>\n            homology.congr (_ : dTo ((single₀ V).obj X) 0 ≫ dFrom ((single₀ V).obj X) 0 = 0) (_ : 0 ≫ 0 = 0)\n                (_ : d ((single₀ V).obj X) (ComplexShape.prev (ComplexShape.up ℕ) 0) 0 = 0) (_ : 0 = 0) ≪≫\n              homologyZeroZero)\n          Y✝).hom =\n    ((fun X =>\n            homology.congr (_ : dTo ((single₀ V).obj X) 0 ≫ dFrom ((single₀ V).obj X) 0 = 0) (_ : 0 ≫ 0 = 0)\n                (_ : d ((single₀ V).obj X) (ComplexShape.prev (ComplexShape.up ℕ) 0) 0 = 0) (_ : 0 = 0) ≪≫\n              homologyZeroZero)\n          X✝).hom ≫\n      (𝟭 V).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\n⊢ homology.map (_ : dTo ((single₀ V).obj X✝) 0 ≫ dFrom ((single₀ V).obj X✝) 0 = 0)\n        (_ : dTo ((single₀ V).obj Y✝) 0 ≫ dFrom ((single₀ V).obj Y✝) 0 = 0) (Hom.sqTo ((single₀ V).map f) 0)\n        (Hom.sqFrom ((single₀ V).map f) 0)\n        (_ : (Hom.sqTo ((single₀ V).map f) 0).right = (Hom.sqTo ((single₀ V).map f) 0).right) ≫\n      homology.map (_ : dTo ((single₀ V).obj Y✝) 0 ≫ dFrom ((single₀ V).obj Y✝) 0 = 0) (_ : 0 ≫ 0 = 0)\n          (CommaMorphism.mk (𝟙 (xPrev ((single₀ V).obj Y✝) 0)) (𝟙 Y✝))\n          (CommaMorphism.mk (𝟙 Y✝) (𝟙 (xNext ((single₀ V).obj Y✝) 0)))\n          (_ :\n            (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right =\n              (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right) ≫\n        homology.desc 0 0 (_ : 0 ≫ 0 = 0) (Subobject.arrow (kernelSubobject 0))\n          (_ : imageToKernel 0 0 (_ : 0 ≫ 0 = 0) ≫ Subobject.arrow (kernelSubobject 0) = 0) =\n    (homology.map (_ : dTo ((single₀ V).obj X✝) 0 ≫ dFrom ((single₀ V).obj X✝) 0 = 0) (_ : 0 ≫ 0 = 0)\n          (CommaMorphism.mk (𝟙 (xPrev ((single₀ V).obj X✝) 0)) (𝟙 X✝))\n          (CommaMorphism.mk (𝟙 X✝) (𝟙 (xNext ((single₀ V).obj X✝) 0)))\n          (_ :\n            (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right =\n              (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right) ≫\n        homology.desc 0 0 (_ : 0 ≫ 0 = 0) (Subobject.arrow (kernelSubobject 0))\n          (_ : imageToKernel 0 0 (_ : 0 ≫ 0 = 0) ≫ Subobject.arrow (kernelSubobject 0) = 0)) ≫\n      f\n[PROOFSTEP]\next\n[GOAL]\ncase p\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nX✝ Y✝ : V\nf : X✝ ⟶ Y✝\n⊢ homology.π (dTo ((single₀ V).obj X✝) 0) (dFrom ((single₀ V).obj X✝) 0)\n        (_ : dTo ((single₀ V).obj X✝) 0 ≫ dFrom ((single₀ V).obj X✝) 0 = 0) ≫\n      homology.map (_ : dTo ((single₀ V).obj X✝) 0 ≫ dFrom ((single₀ V).obj X✝) 0 = 0)\n          (_ : dTo ((single₀ V).obj Y✝) 0 ≫ dFrom ((single₀ V).obj Y✝) 0 = 0) (Hom.sqTo ((single₀ V).map f) 0)\n          (Hom.sqFrom ((single₀ V).map f) 0)\n          (_ : (Hom.sqTo ((single₀ V).map f) 0).right = (Hom.sqTo ((single₀ V).map f) 0).right) ≫\n        homology.map (_ : dTo ((single₀ V).obj Y✝) 0 ≫ dFrom ((single₀ V).obj Y✝) 0 = 0) (_ : 0 ≫ 0 = 0)\n            (CommaMorphism.mk (𝟙 (xPrev ((single₀ V).obj Y✝) 0)) (𝟙 Y✝))\n            (CommaMorphism.mk (𝟙 Y✝) (𝟙 (xNext ((single₀ V).obj Y✝) 0)))\n            (_ :\n              (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right =\n                (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right) ≫\n          homology.desc 0 0 (_ : 0 ≫ 0 = 0) (Subobject.arrow (kernelSubobject 0))\n            (_ : imageToKernel 0 0 (_ : 0 ≫ 0 = 0) ≫ Subobject.arrow (kernelSubobject 0) = 0) =\n    homology.π (dTo ((single₀ V).obj X✝) 0) (dFrom ((single₀ V).obj X✝) 0)\n        (_ : dTo ((single₀ V).obj X✝) 0 ≫ dFrom ((single₀ V).obj X✝) 0 = 0) ≫\n      (homology.map (_ : dTo ((single₀ V).obj X✝) 0 ≫ dFrom ((single₀ V).obj X✝) 0 = 0) (_ : 0 ≫ 0 = 0)\n            (CommaMorphism.mk (𝟙 (xPrev ((single₀ V).obj X✝) 0)) (𝟙 X✝))\n            (CommaMorphism.mk (𝟙 X✝) (𝟙 (xNext ((single₀ V).obj X✝) 0)))\n            (_ :\n              (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right =\n                (CommaMorphism.mk (𝟙 (Arrow.mk 0).left) (𝟙 (Arrow.mk 0).right)).right) ≫\n          homology.desc 0 0 (_ : 0 ≫ 0 = 0) (Subobject.arrow (kernelSubobject 0))\n            (_ : imageToKernel 0 0 (_ : 0 ≫ 0 = 0) ≫ Subobject.arrow (kernelSubobject 0) = 0)) ≫\n        f\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nn : ℕ\nX : V\n⊢ dTo ((single₀ V).obj X) (n + 1) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝⁶ : Category.{v, u} V\ninst✝⁵ : HasZeroMorphisms V\ninst✝⁴ : HasZeroObject V\ninst✝³ : HasEqualizers V\ninst✝² : HasCokernels V\ninst✝¹ : HasImages V\ninst✝ : HasImageMaps V\nn : ℕ\nX : V\n⊢ dFrom ((single₀ V).obj X) (n + 1) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : (single₀ V).obj X ⟶ C\n⊢ Hom.f f 0 ≫ d C 0 1 = 0\n[PROOFSTEP]\nrw [f.comm 0 1]\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : (single₀ V).obj X ⟶ C\n⊢ d ((single₀ V).obj X) 0 1 ≫ Hom.f f 1 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : { f // f ≫ d C 0 1 = 0 }\ni j : ℕ\nh : ComplexShape.Rel (ComplexShape.up ℕ) i j\n⊢ (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        i ≫\n      d C i j =\n    d ((single₀ V).obj X) i j ≫\n      (fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n        j\n[PROOFSTEP]\nrcases f with ⟨f, hf⟩\n[GOAL]\ncase mk\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\ni j : ℕ\nh : ComplexShape.Rel (ComplexShape.up ℕ) i j\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\n⊢ (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        i ≫\n      d C i j =\n    d ((single₀ V).obj X) i j ≫\n      (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        j\n[PROOFSTEP]\nrcases j with (_ | _ | j)\n[GOAL]\ncase mk.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\ni : ℕ\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nh : ComplexShape.Rel (ComplexShape.up ℕ) i Nat.zero\n⊢ (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        i ≫\n      d C i Nat.zero =\n    d ((single₀ V).obj X) i Nat.zero ≫\n      (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        Nat.zero\n[PROOFSTEP]\ncases i\n[GOAL]\ncase mk.succ.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\ni : ℕ\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nh : ComplexShape.Rel (ComplexShape.up ℕ) i (Nat.succ Nat.zero)\n⊢ (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        i ≫\n      d C i (Nat.succ Nat.zero) =\n    d ((single₀ V).obj X) i (Nat.succ Nat.zero) ≫\n      (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        (Nat.succ Nat.zero)\n[PROOFSTEP]\ncases i\n[GOAL]\ncase mk.succ.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\ni : ℕ\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nj : ℕ\nh : ComplexShape.Rel (ComplexShape.up ℕ) i (Nat.succ (Nat.succ j))\n⊢ (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        i ≫\n      d C i (Nat.succ (Nat.succ j)) =\n    d ((single₀ V).obj X) i (Nat.succ (Nat.succ j)) ≫\n      (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        (Nat.succ (Nat.succ j))\n[PROOFSTEP]\ncases i\n[GOAL]\ncase mk.zero.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nh : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero Nat.zero\n⊢ (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        Nat.zero ≫\n      d C Nat.zero Nat.zero =\n    d ((single₀ V).obj X) Nat.zero Nat.zero ≫\n      (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        Nat.zero\n[PROOFSTEP]\nsimp only [single₀_obj_X_d, zero_comp]\n[GOAL]\ncase mk.zero.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nn✝ : ℕ\nh : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ n✝) Nat.zero\n⊢ (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        (Nat.succ n✝) ≫\n      d C (Nat.succ n✝) Nat.zero =\n    d ((single₀ V).obj X) (Nat.succ n✝) Nat.zero ≫\n      (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        Nat.zero\n[PROOFSTEP]\nsimp only [single₀_obj_X_d, zero_comp]\n[GOAL]\ncase mk.succ.zero.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nh : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ Nat.zero)\n⊢ (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        Nat.zero ≫\n      d C Nat.zero (Nat.succ Nat.zero) =\n    d ((single₀ V).obj X) Nat.zero (Nat.succ Nat.zero) ≫\n      (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        (Nat.succ Nat.zero)\n[PROOFSTEP]\nsimp only [single₀_obj_X_d, zero_comp]\n[GOAL]\ncase mk.succ.zero.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nn✝ : ℕ\nh : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ n✝) (Nat.succ Nat.zero)\n⊢ (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        (Nat.succ n✝) ≫\n      d C (Nat.succ n✝) (Nat.succ Nat.zero) =\n    d ((single₀ V).obj X) (Nat.succ n✝) (Nat.succ Nat.zero) ≫\n      (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        (Nat.succ Nat.zero)\n[PROOFSTEP]\nsimp only [single₀_obj_X_d, zero_comp]\n[GOAL]\ncase mk.succ.succ.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nj : ℕ\nh : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ (Nat.succ j))\n⊢ (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        Nat.zero ≫\n      d C Nat.zero (Nat.succ (Nat.succ j)) =\n    d ((single₀ V).obj X) Nat.zero (Nat.succ (Nat.succ j)) ≫\n      (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        (Nat.succ (Nat.succ j))\n[PROOFSTEP]\nsimp only [single₀_obj_X_d, zero_comp]\n[GOAL]\ncase mk.succ.succ.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nj n✝ : ℕ\nh : ComplexShape.Rel (ComplexShape.up ℕ) (Nat.succ n✝) (Nat.succ (Nat.succ j))\n⊢ (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        (Nat.succ n✝) ≫\n      d C (Nat.succ n✝) (Nat.succ (Nat.succ j)) =\n    d ((single₀ V).obj X) (Nat.succ n✝) (Nat.succ (Nat.succ j)) ≫\n      (fun i =>\n          match i with\n          | 0 => ↑{ val := f, property := hf }\n          | Nat.succ n => 0)\n        (Nat.succ (Nat.succ j))\n[PROOFSTEP]\nsimp only [single₀_obj_X_d, zero_comp]\n[GOAL]\ncase mk.zero.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nh : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero Nat.zero\n⊢ f ≫ d C Nat.zero Nat.zero = 0\n[PROOFSTEP]\nrw [C.shape, comp_zero]\n[GOAL]\ncase mk.zero.zero.a\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nh : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero Nat.zero\n⊢ ¬ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.succ.zero.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nh : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ Nat.zero)\n⊢ f ≫ d C Nat.zero (Nat.succ Nat.zero) = 0\n[PROOFSTEP]\nexact hf\n[GOAL]\ncase mk.succ.succ.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nj : ℕ\nh : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ (Nat.succ j))\n⊢ f ≫ d C Nat.zero (Nat.succ (Nat.succ j)) = 0\n[PROOFSTEP]\nrw [C.shape, comp_zero]\n[GOAL]\ncase mk.succ.succ.zero.a\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nj : ℕ\nh : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ (Nat.succ j))\n⊢ ¬ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ (Nat.succ j))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.succ.succ.zero.a\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : X ⟶ HomologicalComplex.X C 0\nhf : f ≫ d C 0 1 = 0\nj : ℕ\nh : ComplexShape.Rel (ComplexShape.up ℕ) Nat.zero (Nat.succ (Nat.succ j))\n⊢ ¬1 = Nat.succ (Nat.succ j)\n[PROOFSTEP]\nexact j.succ_succ_ne_one.symm\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : (single₀ V).obj X ⟶ C\n⊢ (fun f =>\n        Hom.mk fun i =>\n          match i with\n          | 0 => ↑f\n          | Nat.succ n => 0)\n      ((fun f => { val := Hom.f f 0, property := (_ : Hom.f f 0 ≫ d C 0 1 = 0) }) f) =\n    f\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : (single₀ V).obj X ⟶ C\ni : ℕ\n⊢ Hom.f\n      ((fun f =>\n          Hom.mk fun i =>\n            match i with\n            | 0 => ↑f\n            | Nat.succ n => 0)\n        ((fun f => { val := Hom.f f 0, property := (_ : Hom.f f 0 ≫ d C 0 1 = 0) }) f))\n      i =\n    Hom.f f i\n[PROOFSTEP]\nrcases i with ⟨⟩\n[GOAL]\ncase h.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : (single₀ V).obj X ⟶ C\n⊢ Hom.f\n      ((fun f =>\n          Hom.mk fun i =>\n            match i with\n            | 0 => ↑f\n            | Nat.succ n => 0)\n        ((fun f => { val := Hom.f f 0, property := (_ : Hom.f f 0 ≫ d C 0 1 = 0) }) f))\n      Nat.zero =\n    Hom.f f Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : (single₀ V).obj X ⟶ C\nn✝ : ℕ\n⊢ Hom.f\n      ((fun f =>\n          Hom.mk fun i =>\n            match i with\n            | 0 => ↑f\n            | Nat.succ n => 0)\n        ((fun f => { val := Hom.f f 0, property := (_ : Hom.f f 0 ≫ d C 0 1 = 0) }) f))\n      (Nat.succ n✝) =\n    Hom.f f (Nat.succ n✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf : (single₀ V).obj X ⟶ C\nn✝ : ℕ\n⊢ 0 = Hom.f f (Nat.succ n✝)\n[PROOFSTEP]\next\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\n⊢ Function.RightInverse\n    (fun f =>\n      Hom.mk fun i =>\n        match i with\n        | 0 => ↑f\n        | Nat.succ n => 0)\n    fun f => { val := Hom.f f 0, property := (_ : Hom.f f 0 ≫ d C 0 1 = 0) }\n[PROOFSTEP]\naesop_cat\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf g : (single₀ V).obj X ⟶ C\nh : Hom.f f 0 = Hom.f g 0\n⊢ ↑(fromSingle₀Equiv C X) f = ↑(fromSingle₀Equiv C X) g\n[PROOFSTEP]\next\n[GOAL]\ncase a\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nC : CochainComplex V ℕ\nX : V\nf g : (single₀ V).obj X ⟶ C\nh : Hom.f f 0 = Hom.f g 0\n⊢ ↑(↑(fromSingle₀Equiv C X) f) = ↑(↑(fromSingle₀Equiv C X) g)\n[PROOFSTEP]\nexact h\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\ni : ℕ\n⊢ HomologicalComplex.X ((single₀ V).obj X) i ⟶ HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ HomologicalComplex.X ((single₀ V).obj X) Nat.zero ⟶\n    HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) Nat.zero\n[PROOFSTEP]\nexact 𝟙 _\n[GOAL]\ncase succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n✝) ⟶\n    HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) (Nat.succ n✝)\n[PROOFSTEP]\nexact 𝟙 _\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\ni : ℕ\n⊢ HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) i ⟶ HomologicalComplex.X ((single₀ V).obj X) i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) Nat.zero ⟶\n    HomologicalComplex.X ((single₀ V).obj X) Nat.zero\n[PROOFSTEP]\nexact 𝟙 _\n[GOAL]\ncase succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) (Nat.succ n✝) ⟶\n    HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n✝)\n[PROOFSTEP]\nexact 𝟙 _\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ Hom.f\n      ((Hom.mk fun i =>\n          Nat.casesOn (motive := fun t =>\n            i = t →\n              (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n                HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) i))\n            i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n            (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n))) (_ : i = i)) ≫\n        Hom.mk fun i =>\n          Nat.casesOn (motive := fun t =>\n            i = t →\n              (HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) i ⟶\n                HomologicalComplex.X ((single₀ V).obj X) i))\n            i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) Nat.zero))\n            (fun n h =>\n              (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) (Nat.succ n)))\n            (_ : i = i))\n      0 =\n    Hom.f (𝟙 ((single₀ V).obj X)) 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ ((Hom.mk fun i =>\n        Nat.casesOn (motive := fun t =>\n          i = t →\n            (HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) i ⟶\n              HomologicalComplex.X ((single₀ V).obj X) i))\n          i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) Nat.zero))\n          (fun n h =>\n            (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) (Nat.succ n)))\n          (_ : i = i)) ≫\n      Hom.mk fun i =>\n        Nat.casesOn (motive := fun t =>\n          i = t →\n            (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n              HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) i))\n          i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n          (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n))) (_ : i = i)) =\n    𝟙 ((single V (ComplexShape.up ℕ) 0).obj X)\n[PROOFSTEP]\next (_ | _)\n[GOAL]\ncase h.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ Hom.f\n      ((Hom.mk fun i =>\n          Nat.casesOn (motive := fun t =>\n            i = t →\n              (HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) i ⟶\n                HomologicalComplex.X ((single₀ V).obj X) i))\n            i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) Nat.zero))\n            (fun n h =>\n              (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) (Nat.succ n)))\n            (_ : i = i)) ≫\n        Hom.mk fun i =>\n          Nat.casesOn (motive := fun t =>\n            i = t →\n              (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n                HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) i))\n            i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n            (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n))) (_ : i = i))\n      Nat.zero =\n    Hom.f (𝟙 ((single V (ComplexShape.up ℕ) 0).obj X)) Nat.zero\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.zero\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\n⊢ 𝟙 (if 0 = 0 then X else 0) ≫ 𝟙 X = 𝟙 (if 0 = 0 then X else 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ Hom.f\n      ((Hom.mk fun i =>\n          Nat.casesOn (motive := fun t =>\n            i = t →\n              (HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) i ⟶\n                HomologicalComplex.X ((single₀ V).obj X) i))\n            i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) Nat.zero))\n            (fun n h =>\n              (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) (Nat.succ n)))\n            (_ : i = i)) ≫\n        Hom.mk fun i =>\n          Nat.casesOn (motive := fun t =>\n            i = t →\n              (HomologicalComplex.X ((single₀ V).obj X) i ⟶\n                HomologicalComplex.X ((single V (ComplexShape.up ℕ) 0).obj X) i))\n            i (fun h => (_ : Nat.zero = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) Nat.zero))\n            (fun n h => (_ : Nat.succ n = i) ▸ 𝟙 (HomologicalComplex.X ((single₀ V).obj X) (Nat.succ n))) (_ : i = i))\n      (Nat.succ n✝) =\n    Hom.f (𝟙 ((single V (ComplexShape.up ℕ) 0).obj X)) (Nat.succ n✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ 𝟙 (if Nat.succ n✝ = 0 then X else 0) ≫ 𝟙 0 = 𝟙 (if Nat.succ n✝ = 0 then X else 0)\n[PROOFSTEP]\nrw [Category.id_comp]\n[GOAL]\ncase h.succ\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\ninst✝ : HasZeroObject V\nX : V\nn✝ : ℕ\n⊢ 𝟙 0 = 𝟙 (if Nat.succ n✝ = 0 then X else 0)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Homology.Single", "llama_tokens": 43424, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191460821871, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.368350564061962}}
{"text": "[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.93209, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.93216, u_2} D\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\nF : C ⥤ D\n⊢ F.map ed.s' ≫ NatTrans.app (((whiskering C D).obj F).obj X).hom (op [0]) =\n    𝟙 (point.obj (((whiskering C D).obj F).obj X))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.93209, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.93216, u_2} D\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\nF : C ⥤ D\n⊢ F.map ed.s' ≫ F.map (NatTrans.app X.hom (op [0])) ≫ 𝟙 (F.obj X.right) = 𝟙 (F.obj X.right)\n[PROOFSTEP]\nerw [comp_id, ← F.map_comp, ed.s'_comp_ε, F.map_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.93209, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.93216, u_2} D\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\nF : C ⥤ D\n⊢ (fun n => F.map (s ed n)) 0 ≫ SimplicialObject.δ (((whiskering C D).obj F).obj X).left 1 =\n    NatTrans.app (((whiskering C D).obj F).obj X).hom (op [0]) ≫ F.map ed.s'\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.93209, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.93216, u_2} D\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\nF : C ⥤ D\n⊢ F.map (s ed 0) ≫ SimplicialObject.δ (((SimplicialObject.whiskering C D).obj F).obj X.left) 1 =\n    (F.map (NatTrans.app X.hom (op [0])) ≫ 𝟙 (F.obj X.right)) ≫ F.map ed.s'\n[PROOFSTEP]\nerw [comp_id, ← F.map_comp, ← F.map_comp, ed.s₀_comp_δ₁]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.93209, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.93216, u_2} D\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\nF : C ⥤ D\nn : ℕ\n⊢ (fun n => F.map (s ed n)) n ≫ SimplicialObject.δ (((whiskering C D).obj F).obj X).left 0 =\n    𝟙 ((drop.obj (((whiskering C D).obj F).obj X)).obj (op [n]))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.93209, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.93216, u_2} D\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\nF : C ⥤ D\nn : ℕ\n⊢ F.map (s ed n) ≫ SimplicialObject.δ (((SimplicialObject.whiskering C D).obj F).obj X.left) 0 =\n    𝟙 (F.obj (X.left.obj (op [n])))\n[PROOFSTEP]\nerw [← F.map_comp, ed.s_comp_δ₀, F.map_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.93209, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.93216, u_2} D\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\nF : C ⥤ D\nn : ℕ\ni : Fin (n + 2)\n⊢ (fun n => F.map (s ed n)) (n + 1) ≫ SimplicialObject.δ (((whiskering C D).obj F).obj X).left (Fin.succ i) =\n    SimplicialObject.δ (((whiskering C D).obj F).obj X).left i ≫ (fun n => F.map (s ed n)) n\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.93209, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.93216, u_2} D\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\nF : C ⥤ D\nn : ℕ\ni : Fin (n + 2)\n⊢ F.map (s ed (n + 1)) ≫ SimplicialObject.δ (((SimplicialObject.whiskering C D).obj F).obj X.left) (Fin.succ i) =\n    SimplicialObject.δ (((SimplicialObject.whiskering C D).obj F).obj X.left) i ≫ F.map (s ed n)\n[PROOFSTEP]\nerw [← F.map_comp, ← F.map_comp, ed.s_comp_δ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.93209, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.93216, u_2} D\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\nF : C ⥤ D\nn : ℕ\ni : Fin (n + 2)\n⊢ F.map (SimplicialObject.δ X.left i ≫ s ed n) = F.map (X.left.map (SimplexCategory.δ i).op ≫ s ed n)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.93209, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.93216, u_2} D\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\nF : C ⥤ D\nn : ℕ\ni : Fin (n + 1)\n⊢ (fun n => F.map (s ed n)) n ≫ SimplicialObject.σ (((whiskering C D).obj F).obj X).left (Fin.succ i) =\n    SimplicialObject.σ (((whiskering C D).obj F).obj X).left i ≫ (fun n => F.map (s ed n)) (n + 1)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.93209, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.93216, u_2} D\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\nF : C ⥤ D\nn : ℕ\ni : Fin (n + 1)\n⊢ F.map (s ed n) ≫ SimplicialObject.σ (((SimplicialObject.whiskering C D).obj F).obj X.left) (Fin.succ i) =\n    SimplicialObject.σ (((SimplicialObject.whiskering C D).obj F).obj X.left) i ≫ F.map (s ed (n + 1))\n[PROOFSTEP]\nerw [← F.map_comp, ← F.map_comp, ed.s_comp_σ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.93209, u_1} C\nD : Type u_2\ninst✝ : Category.{?u.93216, u_2} D\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\nF : C ⥤ D\nn : ℕ\ni : Fin (n + 1)\n⊢ F.map (SimplicialObject.σ X.left i ≫ s ed (n + 1)) = F.map (X.left.map (SimplexCategory.σ i).op ≫ s ed (n + 1))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\n⊢ ((point.mapIso e).inv ≫ ed.s' ≫ NatTrans.app (drop.mapIso e).hom (op [0])) ≫ NatTrans.app Y.hom (op [0]) =\n    𝟙 (point.obj Y)\n[PROOFSTEP]\nsimpa only [Functor.mapIso, assoc, w₀, ed.s'_comp_ε_assoc] using (point.mapIso e).inv_hom_id\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\n⊢ (fun n => NatTrans.app (drop.mapIso e).inv (op [n]) ≫ s ed n ≫ NatTrans.app (drop.mapIso e).hom (op [n + 1])) 0 ≫\n      SimplicialObject.δ Y.left 1 =\n    NatTrans.app Y.hom (op [0]) ≫ (point.mapIso e).inv ≫ ed.s' ≫ NatTrans.app (drop.mapIso e).hom (op [0])\n[PROOFSTEP]\nhave h := w₀ e.inv\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\nh : NatTrans.app (drop.map e.inv) (op [0]) ≫ NatTrans.app X.hom (op [0]) = NatTrans.app Y.hom (op [0]) ≫ point.map e.inv\n⊢ (fun n => NatTrans.app (drop.mapIso e).inv (op [n]) ≫ s ed n ≫ NatTrans.app (drop.mapIso e).hom (op [n + 1])) 0 ≫\n      SimplicialObject.δ Y.left 1 =\n    NatTrans.app Y.hom (op [0]) ≫ (point.mapIso e).inv ≫ ed.s' ≫ NatTrans.app (drop.mapIso e).hom (op [0])\n[PROOFSTEP]\ndsimp at h ⊢\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\nh : NatTrans.app e.inv.left (op [0]) ≫ NatTrans.app X.hom (op [0]) = NatTrans.app Y.hom (op [0]) ≫ e.inv.right\n⊢ (NatTrans.app e.inv.left (op [0]) ≫ s ed 0 ≫ NatTrans.app e.hom.left (op [0 + 1])) ≫ SimplicialObject.δ Y.left 1 =\n    NatTrans.app Y.hom (op [0]) ≫ e.inv.right ≫ ed.s' ≫ NatTrans.app e.hom.left (op [0])\n[PROOFSTEP]\nsimp only [assoc, ← SimplicialObject.δ_naturality, ed.s₀_comp_δ₁_assoc, reassoc_of% h]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\nn : ℕ\n⊢ (fun n => NatTrans.app (drop.mapIso e).inv (op [n]) ≫ s ed n ≫ NatTrans.app (drop.mapIso e).hom (op [n + 1])) n ≫\n      SimplicialObject.δ Y.left 0 =\n    𝟙 ((drop.obj Y).obj (op [n]))\n[PROOFSTEP]\nhave h := ed.s_comp_δ₀\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\nn : ℕ\nh : ∀ (n : ℕ), s ed n ≫ SimplicialObject.δ X.left 0 = 𝟙 ((drop.obj X).obj (op [n]))\n⊢ (fun n => NatTrans.app (drop.mapIso e).inv (op [n]) ≫ s ed n ≫ NatTrans.app (drop.mapIso e).hom (op [n + 1])) n ≫\n      SimplicialObject.δ Y.left 0 =\n    𝟙 ((drop.obj Y).obj (op [n]))\n[PROOFSTEP]\ndsimp at h ⊢\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\nn : ℕ\nh : ∀ (n : ℕ), s ed n ≫ SimplicialObject.δ X.left 0 = 𝟙 (X.left.obj (op [n]))\n⊢ (NatTrans.app e.inv.left (op [n]) ≫ s ed n ≫ NatTrans.app e.hom.left (op [n + 1])) ≫ SimplicialObject.δ Y.left 0 =\n    𝟙 (Y.left.obj (op [n]))\n[PROOFSTEP]\nsimpa only [assoc, ← SimplicialObject.δ_naturality, reassoc_of% h] using congr_app (drop.mapIso e).inv_hom_id (op [n])\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\nn : ℕ\ni : Fin (n + 2)\n⊢ (fun n => NatTrans.app (drop.mapIso e).inv (op [n]) ≫ s ed n ≫ NatTrans.app (drop.mapIso e).hom (op [n + 1]))\n        (n + 1) ≫\n      SimplicialObject.δ Y.left (Fin.succ i) =\n    SimplicialObject.δ Y.left i ≫\n      (fun n => NatTrans.app (drop.mapIso e).inv (op [n]) ≫ s ed n ≫ NatTrans.app (drop.mapIso e).hom (op [n + 1])) n\n[PROOFSTEP]\nhave h := ed.s_comp_δ n i\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\nn : ℕ\ni : Fin (n + 2)\nh : s ed (n + 1) ≫ SimplicialObject.δ X.left (Fin.succ i) = SimplicialObject.δ X.left i ≫ s ed n\n⊢ (fun n => NatTrans.app (drop.mapIso e).inv (op [n]) ≫ s ed n ≫ NatTrans.app (drop.mapIso e).hom (op [n + 1]))\n        (n + 1) ≫\n      SimplicialObject.δ Y.left (Fin.succ i) =\n    SimplicialObject.δ Y.left i ≫\n      (fun n => NatTrans.app (drop.mapIso e).inv (op [n]) ≫ s ed n ≫ NatTrans.app (drop.mapIso e).hom (op [n + 1])) n\n[PROOFSTEP]\ndsimp at h ⊢\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\nn : ℕ\ni : Fin (n + 2)\nh : s ed (n + 1) ≫ SimplicialObject.δ X.left (Fin.succ i) = SimplicialObject.δ X.left i ≫ s ed n\n⊢ (NatTrans.app e.inv.left (op [n + 1]) ≫ s ed (n + 1) ≫ NatTrans.app e.hom.left (op [n + 1 + 1])) ≫\n      SimplicialObject.δ Y.left (Fin.succ i) =\n    SimplicialObject.δ Y.left i ≫ NatTrans.app e.inv.left (op [n]) ≫ s ed n ≫ NatTrans.app e.hom.left (op [n + 1])\n[PROOFSTEP]\nsimp only [assoc, ← SimplicialObject.δ_naturality, reassoc_of% h, ← SimplicialObject.δ_naturality_assoc]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\nn : ℕ\ni : Fin (n + 1)\n⊢ (fun n => NatTrans.app (drop.mapIso e).inv (op [n]) ≫ s ed n ≫ NatTrans.app (drop.mapIso e).hom (op [n + 1])) n ≫\n      SimplicialObject.σ Y.left (Fin.succ i) =\n    SimplicialObject.σ Y.left i ≫\n      (fun n => NatTrans.app (drop.mapIso e).inv (op [n]) ≫ s ed n ≫ NatTrans.app (drop.mapIso e).hom (op [n + 1]))\n        (n + 1)\n[PROOFSTEP]\nhave h := ed.s_comp_σ n i\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\nn : ℕ\ni : Fin (n + 1)\nh : s ed n ≫ SimplicialObject.σ X.left (Fin.succ i) = SimplicialObject.σ X.left i ≫ s ed (n + 1)\n⊢ (fun n => NatTrans.app (drop.mapIso e).inv (op [n]) ≫ s ed n ≫ NatTrans.app (drop.mapIso e).hom (op [n + 1])) n ≫\n      SimplicialObject.σ Y.left (Fin.succ i) =\n    SimplicialObject.σ Y.left i ≫\n      (fun n => NatTrans.app (drop.mapIso e).inv (op [n]) ≫ s ed n ≫ NatTrans.app (drop.mapIso e).hom (op [n + 1]))\n        (n + 1)\n[PROOFSTEP]\ndsimp at h ⊢\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.102374, u_1} C\nX Y : SimplicialObject.Augmented C\ne : X ≅ Y\ned : ExtraDegeneracy X\nn : ℕ\ni : Fin (n + 1)\nh : s ed n ≫ SimplicialObject.σ X.left (Fin.succ i) = SimplicialObject.σ X.left i ≫ s ed (n + 1)\n⊢ (NatTrans.app e.inv.left (op [n]) ≫ s ed n ≫ NatTrans.app e.hom.left (op [n + 1])) ≫\n      SimplicialObject.σ Y.left (Fin.succ i) =\n    SimplicialObject.σ Y.left i ≫\n      NatTrans.app e.inv.left (op [n + 1]) ≫ s ed (n + 1) ≫ NatTrans.app e.hom.left (op [n + 1 + 1])\n[PROOFSTEP]\nsimp only [assoc, ← SimplicialObject.σ_naturality, reassoc_of% h, ← SimplicialObject.σ_naturality_assoc]\n[GOAL]\nn : ℕ\nX : Type u_1\ninst✝ : Zero X\nf : Fin n → X\ni : Fin n\n⊢ shiftFun f (Fin.succ i) = f i\n[PROOFSTEP]\ndsimp [shiftFun]\n[GOAL]\nn : ℕ\nX : Type u_1\ninst✝ : Zero X\nf : Fin n → X\ni : Fin n\n⊢ (if x : Fin.succ i = 0 then 0 else f (Fin.pred (Fin.succ i) x)) = f i\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nn : ℕ\nX : Type u_1\ninst✝ : Zero X\nf : Fin n → X\ni : Fin n\nh : Fin.succ i = 0\n⊢ 0 = f i\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase pos.h\nn : ℕ\nX : Type u_1\ninst✝ : Zero X\nf : Fin n → X\ni : Fin n\nh : Fin.succ i = 0\n⊢ False\n[PROOFSTEP]\nsimp only [Fin.ext_iff, Fin.val_succ, Fin.val_zero, add_eq_zero, and_false] at h \n[GOAL]\ncase neg\nn : ℕ\nX : Type u_1\ninst✝ : Zero X\nf : Fin n → X\ni : Fin n\nh : ¬Fin.succ i = 0\n⊢ f (Fin.pred (Fin.succ i) h) = f i\n[PROOFSTEP]\nsimp only [Fin.pred_succ]\n[GOAL]\nn : ℕ\nΔ : SimplexCategory\nf : [n] ⟶ Δ\ni₁ i₂ : Fin (SimplexCategory.len [n + 1] + 1)\nhi : i₁ ≤ i₂\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₁ ≤ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₂\n[PROOFSTEP]\nby_cases h₁ : i₁ = 0\n[GOAL]\ncase pos\nn : ℕ\nΔ : SimplexCategory\nf : [n] ⟶ Δ\ni₁ i₂ : Fin (SimplexCategory.len [n + 1] + 1)\nhi : i₁ ≤ i₂\nh₁ : i₁ = 0\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₁ ≤ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₂\n[PROOFSTEP]\nsubst h₁\n[GOAL]\ncase pos\nn : ℕ\nΔ : SimplexCategory\nf : [n] ⟶ Δ\ni₂ : Fin (SimplexCategory.len [n + 1] + 1)\nhi : 0 ≤ i₂\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) 0 ≤ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₂\n[PROOFSTEP]\nsimp only [shiftFun_0, Fin.zero_le]\n[GOAL]\ncase neg\nn : ℕ\nΔ : SimplexCategory\nf : [n] ⟶ Δ\ni₁ i₂ : Fin (SimplexCategory.len [n + 1] + 1)\nhi : i₁ ≤ i₂\nh₁ : ¬i₁ = 0\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₁ ≤ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₂\n[PROOFSTEP]\nhave h₂ : i₂ ≠ 0 := by\n  intro h₂\n  subst h₂\n  exact h₁ (le_antisymm hi (Fin.zero_le _))\n[GOAL]\nn : ℕ\nΔ : SimplexCategory\nf : [n] ⟶ Δ\ni₁ i₂ : Fin (SimplexCategory.len [n + 1] + 1)\nhi : i₁ ≤ i₂\nh₁ : ¬i₁ = 0\n⊢ i₂ ≠ 0\n[PROOFSTEP]\nintro h₂\n[GOAL]\nn : ℕ\nΔ : SimplexCategory\nf : [n] ⟶ Δ\ni₁ i₂ : Fin (SimplexCategory.len [n + 1] + 1)\nhi : i₁ ≤ i₂\nh₁ : ¬i₁ = 0\nh₂ : i₂ = 0\n⊢ False\n[PROOFSTEP]\nsubst h₂\n[GOAL]\nn : ℕ\nΔ : SimplexCategory\nf : [n] ⟶ Δ\ni₁ : Fin (SimplexCategory.len [n + 1] + 1)\nh₁ : ¬i₁ = 0\nhi : i₁ ≤ 0\n⊢ False\n[PROOFSTEP]\nexact h₁ (le_antisymm hi (Fin.zero_le _))\n[GOAL]\ncase neg\nn : ℕ\nΔ : SimplexCategory\nf : [n] ⟶ Δ\ni₁ i₂ : Fin (SimplexCategory.len [n + 1] + 1)\nhi : i₁ ≤ i₂\nh₁ : ¬i₁ = 0\nh₂ : i₂ ≠ 0\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₁ ≤ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₂\n[PROOFSTEP]\ncases' Fin.eq_succ_of_ne_zero h₁ with j₁ hj₁\n[GOAL]\ncase neg.intro\nn : ℕ\nΔ : SimplexCategory\nf : [n] ⟶ Δ\ni₁ i₂ : Fin (SimplexCategory.len [n + 1] + 1)\nhi : i₁ ≤ i₂\nh₁ : ¬i₁ = 0\nh₂ : i₂ ≠ 0\nj₁ : Fin (SimplexCategory.len [n + 1])\nhj₁ : i₁ = Fin.succ j₁\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₁ ≤ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₂\n[PROOFSTEP]\ncases' Fin.eq_succ_of_ne_zero h₂ with j₂ hj₂\n[GOAL]\ncase neg.intro.intro\nn : ℕ\nΔ : SimplexCategory\nf : [n] ⟶ Δ\ni₁ i₂ : Fin (SimplexCategory.len [n + 1] + 1)\nhi : i₁ ≤ i₂\nh₁ : ¬i₁ = 0\nh₂ : i₂ ≠ 0\nj₁ : Fin (SimplexCategory.len [n + 1])\nhj₁ : i₁ = Fin.succ j₁\nj₂ : Fin (SimplexCategory.len [n + 1])\nhj₂ : i₂ = Fin.succ j₂\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₁ ≤ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) i₂\n[PROOFSTEP]\nsubsts hj₁ hj₂\n[GOAL]\ncase neg.intro.intro\nn : ℕ\nΔ : SimplexCategory\nf : [n] ⟶ Δ\nj₁ j₂ : Fin (SimplexCategory.len [n + 1])\nh₁ : ¬Fin.succ j₁ = 0\nh₂ : Fin.succ j₂ ≠ 0\nhi : Fin.succ j₁ ≤ Fin.succ j₂\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) (Fin.succ j₁) ≤\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom f)) (Fin.succ j₂)\n[PROOFSTEP]\nsimpa only [shiftFun_succ] using f.toOrderHom.monotone (Fin.succ_le_succ_iff.mp hi)\n[GOAL]\nΔ : SimplexCategory\n⊢ (fun x => SimplexCategory.Hom.mk (↑(OrderHom.const (Fin (SimplexCategory.len (op [0]).unop + 1))) 0)) ≫\n      NatTrans.app (standardSimplex.obj Δ).hom (op [0]) =\n    𝟙 (point.obj (standardSimplex.obj Δ))\n[PROOFSTEP]\ndsimp\n[GOAL]\nΔ : SimplexCategory\n⊢ (fun x => SimplexCategory.Hom.mk (↑(OrderHom.const (Fin (0 + 1))) 0)) ≫\n      NatTrans.app (standardSimplex.obj Δ).hom (op [0]) =\n    𝟙 (⊤_ Type)\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nΔ : SimplexCategory\n⊢ (fun n f => shift f) 0 ≫ SimplicialObject.δ (standardSimplex.obj Δ).left 1 =\n    NatTrans.app (standardSimplex.obj Δ).hom (op [0]) ≫ fun x =>\n      SimplexCategory.Hom.mk (↑(OrderHom.const (Fin (SimplexCategory.len (op [0]).unop + 1))) 0)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nΔ : SimplexCategory\nx : (drop.obj (standardSimplex.obj Δ)).obj (op [0])\n⊢ ((fun n f => shift f) 0 ≫ SimplicialObject.δ (standardSimplex.obj Δ).left 1) x =\n    (NatTrans.app (standardSimplex.obj Δ).hom (op [0]) ≫ fun x =>\n        SimplexCategory.Hom.mk (↑(OrderHom.const (Fin (SimplexCategory.len (op [0]).unop + 1))) 0))\n      x\n[PROOFSTEP]\napply SimplexCategory.Hom.ext\n[GOAL]\ncase h.a\nΔ : SimplexCategory\nx : (drop.obj (standardSimplex.obj Δ)).obj (op [0])\n⊢ SimplexCategory.Hom.toOrderHom (((fun n f => shift f) 0 ≫ SimplicialObject.δ (standardSimplex.obj Δ).left 1) x) =\n    SimplexCategory.Hom.toOrderHom\n      ((NatTrans.app (standardSimplex.obj Δ).hom (op [0]) ≫ fun x =>\n          SimplexCategory.Hom.mk (↑(OrderHom.const (Fin (SimplexCategory.len (op [0]).unop + 1))) 0))\n        x)\n[PROOFSTEP]\next j\n[GOAL]\ncase h.a.h.h.h\nΔ : SimplexCategory\nx : (drop.obj (standardSimplex.obj Δ)).obj (op [0])\nj : Fin (SimplexCategory.len (op [0]).unop + 1)\n⊢ ↑(↑(SimplexCategory.Hom.toOrderHom (((fun n f => shift f) 0 ≫ SimplicialObject.δ (standardSimplex.obj Δ).left 1) x))\n        j) =\n    ↑(↑(SimplexCategory.Hom.toOrderHom\n            ((NatTrans.app (standardSimplex.obj Δ).hom (op [0]) ≫ fun x =>\n                SimplexCategory.Hom.mk (↑(OrderHom.const (Fin (SimplexCategory.len (op [0]).unop + 1))) 0))\n              x))\n        j)\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase h.a.h.h.h.head\nΔ : SimplexCategory\nx : (drop.obj (standardSimplex.obj Δ)).obj (op [0])\n⊢ ↑(↑(SimplexCategory.Hom.toOrderHom (((fun n f => shift f) 0 ≫ SimplicialObject.δ (standardSimplex.obj Δ).left 1) x))\n        { val := 0, isLt := (_ : 0 < SimplexCategory.len (op [0]).unop + 1) }) =\n    ↑(↑(SimplexCategory.Hom.toOrderHom\n            ((NatTrans.app (standardSimplex.obj Δ).hom (op [0]) ≫ fun x =>\n                SimplexCategory.Hom.mk (↑(OrderHom.const (Fin (SimplexCategory.len (op [0]).unop + 1))) 0))\n              x))\n        { val := 0, isLt := (_ : 0 < SimplexCategory.len (op [0]).unop + 1) })\n[PROOFSTEP]\nrfl\n[GOAL]\nΔ : SimplexCategory\nn : ℕ\n⊢ (fun n f => shift f) n ≫ SimplicialObject.δ (standardSimplex.obj Δ).left 0 =\n    𝟙 ((drop.obj (standardSimplex.obj Δ)).obj (op [n]))\n[PROOFSTEP]\next1 φ\n[GOAL]\ncase h\nΔ : SimplexCategory\nn : ℕ\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\n⊢ ((fun n f => shift f) n ≫ SimplicialObject.δ (standardSimplex.obj Δ).left 0) φ =\n    𝟙 ((drop.obj (standardSimplex.obj Δ)).obj (op [n])) φ\n[PROOFSTEP]\napply SimplexCategory.Hom.ext\n[GOAL]\ncase h.a\nΔ : SimplexCategory\nn : ℕ\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\n⊢ SimplexCategory.Hom.toOrderHom (((fun n f => shift f) n ≫ SimplicialObject.δ (standardSimplex.obj Δ).left 0) φ) =\n    SimplexCategory.Hom.toOrderHom (𝟙 ((drop.obj (standardSimplex.obj Δ)).obj (op [n])) φ)\n[PROOFSTEP]\next i : 2\n[GOAL]\ncase h.a.h.h\nΔ : SimplexCategory\nn : ℕ\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\ni : Fin (SimplexCategory.len (op [n]).unop + 1)\n⊢ ↑(SimplexCategory.Hom.toOrderHom (((fun n f => shift f) n ≫ SimplicialObject.δ (standardSimplex.obj Δ).left 0) φ)) i =\n    ↑(SimplexCategory.Hom.toOrderHom (𝟙 ((drop.obj (standardSimplex.obj Δ)).obj (op [n])) φ)) i\n[PROOFSTEP]\ndsimp [SimplicialObject.δ, SimplexCategory.δ, SSet.standardSimplex]\n[GOAL]\ncase h.a.h.h\nΔ : SimplexCategory\nn : ℕ\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\ni : Fin (SimplexCategory.len (op [n]).unop + 1)\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.succ i) = ↑(SimplexCategory.Hom.toOrderHom φ) i\n[PROOFSTEP]\nsimp only [shiftFun_succ]\n[GOAL]\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 2)\n⊢ (fun n f => shift f) (n + 1) ≫ SimplicialObject.δ (standardSimplex.obj Δ).left (Fin.succ i) =\n    SimplicialObject.δ (standardSimplex.obj Δ).left i ≫ (fun n f => shift f) n\n[PROOFSTEP]\next1 φ\n[GOAL]\ncase h\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 2)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n + 1])\n⊢ ((fun n f => shift f) (n + 1) ≫ SimplicialObject.δ (standardSimplex.obj Δ).left (Fin.succ i)) φ =\n    (SimplicialObject.δ (standardSimplex.obj Δ).left i ≫ (fun n f => shift f) n) φ\n[PROOFSTEP]\napply SimplexCategory.Hom.ext\n[GOAL]\ncase h.a\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 2)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n + 1])\n⊢ SimplexCategory.Hom.toOrderHom\n      (((fun n f => shift f) (n + 1) ≫ SimplicialObject.δ (standardSimplex.obj Δ).left (Fin.succ i)) φ) =\n    SimplexCategory.Hom.toOrderHom ((SimplicialObject.δ (standardSimplex.obj Δ).left i ≫ (fun n f => shift f) n) φ)\n[PROOFSTEP]\next j : 2\n[GOAL]\ncase h.a.h.h\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 2)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n + 1])\nj : Fin (SimplexCategory.len (op [n + 1]).unop + 1)\n⊢ ↑(SimplexCategory.Hom.toOrderHom\n          (((fun n f => shift f) (n + 1) ≫ SimplicialObject.δ (standardSimplex.obj Δ).left (Fin.succ i)) φ))\n      j =\n    ↑(SimplexCategory.Hom.toOrderHom ((SimplicialObject.δ (standardSimplex.obj Δ).left i ≫ (fun n f => shift f) n) φ)) j\n[PROOFSTEP]\ndsimp [SimplicialObject.δ, SimplexCategory.δ, SSet.standardSimplex]\n[GOAL]\ncase h.a.h.h\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 2)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n + 1])\nj : Fin (SimplexCategory.len (op [n + 1]).unop + 1)\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.succAbove (Fin.succ i) j) =\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom φ) ∘ ↑(Fin.succAboveEmb i)) j\n[PROOFSTEP]\nby_cases j = 0\n[GOAL]\ncase h.a.h.h\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 2)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n + 1])\nj : Fin (SimplexCategory.len (op [n + 1]).unop + 1)\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.succAbove (Fin.succ i) j) =\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom φ) ∘ ↑(Fin.succAboveEmb i)) j\n[PROOFSTEP]\nby_cases j = 0\n[GOAL]\ncase pos\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 2)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n + 1])\nj : Fin (SimplexCategory.len (op [n + 1]).unop + 1)\nh : j = 0\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.succAbove (Fin.succ i) j) =\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom φ) ∘ ↑(Fin.succAboveEmb i)) j\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 2)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n + 1])\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.succAbove (Fin.succ i) 0) =\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom φ) ∘ ↑(Fin.succAboveEmb i)) 0\n[PROOFSTEP]\nsimp only [Fin.succ_succAbove_zero, shiftFun_0]\n[GOAL]\ncase neg\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 2)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n + 1])\nj : Fin (SimplexCategory.len (op [n + 1]).unop + 1)\nh : ¬j = 0\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.succAbove (Fin.succ i) j) =\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom φ) ∘ ↑(Fin.succAboveEmb i)) j\n[PROOFSTEP]\nobtain ⟨_, rfl⟩ := Fin.eq_succ_of_ne_zero <| h\n[GOAL]\ncase neg.intro\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 2)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n + 1])\nw✝ : Fin (SimplexCategory.len (op [n + 1]).unop)\nh : ¬Fin.succ w✝ = 0\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.succAbove (Fin.succ i) (Fin.succ w✝)) =\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom φ) ∘ ↑(Fin.succAboveEmb i)) (Fin.succ w✝)\n[PROOFSTEP]\nsimp only [Fin.succ_succAbove_succ, shiftFun_succ, Function.comp_apply, Fin.succAboveEmb_apply]\n[GOAL]\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 1)\n⊢ (fun n f => shift f) n ≫ SimplicialObject.σ (standardSimplex.obj Δ).left (Fin.succ i) =\n    SimplicialObject.σ (standardSimplex.obj Δ).left i ≫ (fun n f => shift f) (n + 1)\n[PROOFSTEP]\next1 φ\n[GOAL]\ncase h\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 1)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\n⊢ ((fun n f => shift f) n ≫ SimplicialObject.σ (standardSimplex.obj Δ).left (Fin.succ i)) φ =\n    (SimplicialObject.σ (standardSimplex.obj Δ).left i ≫ (fun n f => shift f) (n + 1)) φ\n[PROOFSTEP]\napply SimplexCategory.Hom.ext\n[GOAL]\ncase h.a\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 1)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\n⊢ SimplexCategory.Hom.toOrderHom\n      (((fun n f => shift f) n ≫ SimplicialObject.σ (standardSimplex.obj Δ).left (Fin.succ i)) φ) =\n    SimplexCategory.Hom.toOrderHom\n      ((SimplicialObject.σ (standardSimplex.obj Δ).left i ≫ (fun n f => shift f) (n + 1)) φ)\n[PROOFSTEP]\next j : 2\n[GOAL]\ncase h.a.h.h\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 1)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\nj : Fin (SimplexCategory.len (op [n + 1 + 1]).unop + 1)\n⊢ ↑(SimplexCategory.Hom.toOrderHom\n          (((fun n f => shift f) n ≫ SimplicialObject.σ (standardSimplex.obj Δ).left (Fin.succ i)) φ))\n      j =\n    ↑(SimplexCategory.Hom.toOrderHom\n          ((SimplicialObject.σ (standardSimplex.obj Δ).left i ≫ (fun n f => shift f) (n + 1)) φ))\n      j\n[PROOFSTEP]\ndsimp [SimplicialObject.σ, SimplexCategory.σ, SSet.standardSimplex]\n[GOAL]\ncase h.a.h.h\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 1)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\nj : Fin (SimplexCategory.len (op [n + 1 + 1]).unop + 1)\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.predAbove (Fin.succ i) j) =\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom φ) ∘ Fin.predAbove i) j\n[PROOFSTEP]\nby_cases j = 0\n[GOAL]\ncase h.a.h.h\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 1)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\nj : Fin (SimplexCategory.len (op [n + 1 + 1]).unop + 1)\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.predAbove (Fin.succ i) j) =\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom φ) ∘ Fin.predAbove i) j\n[PROOFSTEP]\nby_cases j = 0\n[GOAL]\ncase pos\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 1)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\nj : Fin (SimplexCategory.len (op [n + 1 + 1]).unop + 1)\nh : j = 0\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.predAbove (Fin.succ i) j) =\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom φ) ∘ Fin.predAbove i) j\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 1)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.predAbove (Fin.succ i) 0) =\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom φ) ∘ Fin.predAbove i) 0\n[PROOFSTEP]\nsimp only [shiftFun_0]\n[GOAL]\ncase pos\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 1)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.predAbove (Fin.succ i) 0) = 0\n[PROOFSTEP]\nexact shiftFun_0 φ.toOrderHom\n[GOAL]\ncase neg\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 1)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\nj : Fin (SimplexCategory.len (op [n + 1 + 1]).unop + 1)\nh : ¬j = 0\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.predAbove (Fin.succ i) j) =\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom φ) ∘ Fin.predAbove i) j\n[PROOFSTEP]\nobtain ⟨_, rfl⟩ := Fin.eq_succ_of_ne_zero h\n[GOAL]\ncase neg.intro\nΔ : SimplexCategory\nn : ℕ\ni : Fin (n + 1)\nφ : (drop.obj (standardSimplex.obj Δ)).obj (op [n])\nw✝ : Fin (SimplexCategory.len (op [n + 1 + 1]).unop)\nh : ¬Fin.succ w✝ = 0\n⊢ shiftFun (↑(SimplexCategory.Hom.toOrderHom φ)) (Fin.predAbove (Fin.succ i) (Fin.succ w✝)) =\n    shiftFun (↑(SimplexCategory.Hom.toOrderHom φ) ∘ Fin.predAbove i) (Fin.succ w✝)\n[PROOFSTEP]\nsimp only [Fin.succ_predAbove_succ, shiftFun_succ, Function.comp_apply]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.220931, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (SimplexCategory.len (op [n + 1]).unop + 1)\n⊢ (fun i =>\n          if x : i = 0 then (WidePullback.base fun x => f.hom) ≫ S.section_\n          else WidePullback.π (fun x => f.hom) (Fin.pred i x))\n        i ≫\n      f.hom =\n    WidePullback.base fun x => f.hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.220931, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (SimplexCategory.len (op [n + 1]).unop + 1)\n⊢ (if x : i = 0 then (WidePullback.base fun x => f.hom) ≫ S.section_\n      else WidePullback.π (fun x => f.hom) (Fin.pred i x)) ≫\n      f.hom =\n    WidePullback.base fun x => f.hom\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{?u.220931, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (SimplexCategory.len (op [n + 1]).unop + 1)\nh : i = 0\n⊢ ((WidePullback.base fun x => f.hom) ≫ S.section_) ≫ f.hom = WidePullback.base fun x => f.hom\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{?u.220931, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\n⊢ ((WidePullback.base fun x => f.hom) ≫ S.section_) ≫ f.hom = WidePullback.base fun x => f.hom\n[PROOFSTEP]\nsimp only [assoc, SplitEpi.id, comp_id]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{?u.220931, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (SimplexCategory.len (op [n + 1]).unop + 1)\nh : ¬i = 0\n⊢ WidePullback.π (fun x => f.hom) (Fin.pred i h) ≫ f.hom = WidePullback.base fun x => f.hom\n[PROOFSTEP]\nsimp only [WidePullback.π_arrow]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\n⊢ s f S n ≫ WidePullback.π (fun x => f.hom) 0 = (WidePullback.base fun x => f.hom) ≫ S.section_\n[PROOFSTEP]\ndsimp [ExtraDegeneracy.s]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\n⊢ WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i =>\n          if x : i = 0 then (WidePullback.base fun x => f.hom) ≫ S.section_\n          else WidePullback.π (fun x => f.hom) (Fin.pred i x))\n        (_ :\n          ∀ (i : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            (fun i =>\n                    if x : i = 0 then (WidePullback.base fun x => f.hom) ≫ S.section_\n                    else WidePullback.π (fun x => f.hom) (Fin.pred i x))\n                  i ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      WidePullback.π (fun x => f.hom) 0 =\n    (WidePullback.base fun x => f.hom) ≫ S.section_\n[PROOFSTEP]\nsimp only [WidePullback.lift_π]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\n⊢ (if h : True then (WidePullback.base fun x => f.hom) ≫ S.section_\n    else WidePullback.π (fun x => f.hom) (Fin.pred 0 (_ : ¬0 = 0))) =\n    (WidePullback.base fun x => f.hom) ≫ S.section_\n[PROOFSTEP]\nrfl\n  -- porting note: @[simp] removed as the linter complains the LHS is not in normal form\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\n⊢ s f S n ≫ WidePullback.π (fun x => f.hom) (Fin.succ i) = WidePullback.π (fun x => f.hom) i\n[PROOFSTEP]\ndsimp [ExtraDegeneracy.s]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\n⊢ WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i =>\n          if x : i = 0 then (WidePullback.base fun x => f.hom) ≫ S.section_\n          else WidePullback.π (fun x => f.hom) (Fin.pred i x))\n        (_ :\n          ∀ (i : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            (fun i =>\n                    if x : i = 0 then (WidePullback.base fun x => f.hom) ≫ S.section_\n                    else WidePullback.π (fun x => f.hom) (Fin.pred i x))\n                  i ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      WidePullback.π (fun x => f.hom) (Fin.succ i) =\n    WidePullback.π (fun x => f.hom) i\n[PROOFSTEP]\nsimp only [WidePullback.lift_π]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\n⊢ (if x : Fin.succ i = 0 then (WidePullback.base fun x => f.hom) ≫ S.section_\n    else WidePullback.π (fun x => f.hom) (Fin.pred (Fin.succ i) x)) =\n    WidePullback.π (fun x => f.hom) i\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\nh : Fin.succ i = 0\n⊢ (WidePullback.base fun x => f.hom) ≫ S.section_ = WidePullback.π (fun x => f.hom) i\n[PROOFSTEP]\nsimp only [Fin.ext_iff, Fin.val_succ, Fin.val_zero, add_eq_zero, and_false] at h \n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\nh : ¬Fin.succ i = 0\n⊢ WidePullback.π (fun x => f.hom) (Fin.pred (Fin.succ i) h) = WidePullback.π (fun x => f.hom) i\n[PROOFSTEP]\nsimp only [Fin.pred_succ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\n⊢ (s f S n ≫ WidePullback.base fun x => f.hom) = WidePullback.base fun x => f.hom\n[PROOFSTEP]\napply WidePullback.lift_base\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\ni : Fin (SimplexCategory.len (op [0]).unop + 1)\n⊢ (fun x => 𝟙 ((𝟭 C).obj f.left)) i ≫ f.hom = f.hom\n[PROOFSTEP]\nrw [id_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\n⊢ (S.section_ ≫\n        WidePullback.lift f.hom (fun x => 𝟙 ((𝟭 C).obj f.left))\n          (_ :\n            ∀ (i : Fin (SimplexCategory.len (op [0]).unop + 1)), (fun x => 𝟙 ((𝟭 C).obj f.left)) i ≫ f.hom = f.hom)) ≫\n      NatTrans.app (augmentedCechNerve f).hom (op [0]) =\n    𝟙 (point.obj (augmentedCechNerve f))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\n⊢ ((S.section_ ≫ WidePullback.lift f.hom (fun x => 𝟙 f.left) (_ : Fin (0 + 1) → 𝟙 f.left ≫ f.hom = f.hom)) ≫\n      WidePullback.base fun x => f.hom) =\n    𝟙 f.right\n[PROOFSTEP]\nsimp only [augmentedCechNerve_hom_app, assoc, WidePullback.lift_base, SplitEpi.id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\n⊢ (fun n => ExtraDegeneracy.s f S n) 0 ≫ SimplicialObject.δ (augmentedCechNerve f).left 1 =\n    NatTrans.app (augmentedCechNerve f).hom (op [0]) ≫\n      S.section_ ≫\n        WidePullback.lift f.hom (fun x => 𝟙 ((𝟭 C).obj f.left))\n          (_ : ∀ (i : Fin (SimplexCategory.len (op [0]).unop + 1)), (fun x => 𝟙 ((𝟭 C).obj f.left)) i ≫ f.hom = f.hom)\n[PROOFSTEP]\ndsimp [cechNerve, SimplicialObject.δ, SimplexCategory.δ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\n⊢ ExtraDegeneracy.s f S 0 ≫\n      WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i => WidePullback.π (fun x => f.hom) (Fin.succAbove 1 i))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [0]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb 1))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) =\n    (WidePullback.base fun x => f.hom) ≫\n      S.section_ ≫ WidePullback.lift f.hom (fun x => 𝟙 f.left) (_ : Fin (0 + 1) → 𝟙 f.left ≫ f.hom = f.hom)\n[PROOFSTEP]\next j\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nj : Fin (0 + 1)\n⊢ (ExtraDegeneracy.s f S 0 ≫\n        WidePullback.lift (WidePullback.base fun x => f.hom)\n          (fun i => WidePullback.π (fun x => f.hom) (Fin.succAbove 1 i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [0]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb 1))).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom)) ≫\n      WidePullback.π (fun x => f.hom) j =\n    ((WidePullback.base fun x => f.hom) ≫\n        S.section_ ≫ WidePullback.lift f.hom (fun x => 𝟙 f.left) (_ : Fin (0 + 1) → 𝟙 f.left ≫ f.hom = f.hom)) ≫\n      WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase a.head\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\n⊢ (ExtraDegeneracy.s f S 0 ≫\n        WidePullback.lift (WidePullback.base fun x => f.hom)\n          (fun i => WidePullback.π (fun x => f.hom) (Fin.succAbove 1 i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [0]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb 1))).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom)) ≫\n      WidePullback.π (fun x => f.hom) { val := 0, isLt := (_ : 0 < 0 + 1) } =\n    ((WidePullback.base fun x => f.hom) ≫\n        S.section_ ≫ WidePullback.lift f.hom (fun x => 𝟙 f.left) (_ : Fin (0 + 1) → 𝟙 f.left ≫ f.hom = f.hom)) ≫\n      WidePullback.π (fun x => f.hom) { val := 0, isLt := (_ : 0 < 0 + 1) }\n[PROOFSTEP]\nsimpa only [assoc, WidePullback.lift_π, comp_id] using ExtraDegeneracy.s_comp_π_0 f S 0\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\n⊢ ((ExtraDegeneracy.s f S 0 ≫\n        WidePullback.lift (WidePullback.base fun x => f.hom)\n          (fun i => WidePullback.π (fun x => f.hom) (Fin.succAbove 1 i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [0]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb 1))).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom)) ≫\n      WidePullback.base fun x => f.hom) =\n    ((WidePullback.base fun x => f.hom) ≫\n        S.section_ ≫ WidePullback.lift f.hom (fun x => 𝟙 f.left) (_ : Fin (0 + 1) → 𝟙 f.left ≫ f.hom = f.hom)) ≫\n      WidePullback.base fun x => f.hom\n[PROOFSTEP]\nsimpa only [assoc, WidePullback.lift_base, SplitEpi.id, comp_id] using ExtraDegeneracy.s_comp_base f S 0\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\n⊢ (fun n => ExtraDegeneracy.s f S n) n ≫ SimplicialObject.δ (augmentedCechNerve f).left 0 =\n    𝟙 ((drop.obj (augmentedCechNerve f)).obj (op [n]))\n[PROOFSTEP]\ndsimp [cechNerve, SimplicialObject.δ, SimplexCategory.δ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\n⊢ ExtraDegeneracy.s f S n ≫\n      WidePullback.lift (WidePullback.base fun x => f.hom) (fun i => WidePullback.π (fun x => f.hom) (Fin.succ i))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb 0))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) =\n    𝟙 (widePullback f.right (fun x => f.left) fun x => f.hom)\n[PROOFSTEP]\next j\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\nj : Fin (n + 1)\n⊢ (ExtraDegeneracy.s f S n ≫\n        WidePullback.lift (WidePullback.base fun x => f.hom) (fun i => WidePullback.π (fun x => f.hom) (Fin.succ i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb 0))).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom)) ≫\n      WidePullback.π (fun x => f.hom) j =\n    𝟙 (widePullback f.right (fun x => f.left) fun x => f.hom) ≫ WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\nsimpa only [assoc, WidePullback.lift_π, id_comp] using ExtraDegeneracy.s_comp_π_succ f S n j\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\n⊢ ((ExtraDegeneracy.s f S n ≫\n        WidePullback.lift (WidePullback.base fun x => f.hom) (fun i => WidePullback.π (fun x => f.hom) (Fin.succ i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb 0))).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom)) ≫\n      WidePullback.base fun x => f.hom) =\n    𝟙 (widePullback f.right (fun x => f.left) fun x => f.hom) ≫ WidePullback.base fun x => f.hom\n[PROOFSTEP]\nsimpa only [assoc, WidePullback.lift_base, id_comp] using ExtraDegeneracy.s_comp_base f S n\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\n⊢ (fun n => ExtraDegeneracy.s f S n) (n + 1) ≫ SimplicialObject.δ (augmentedCechNerve f).left (Fin.succ i) =\n    SimplicialObject.δ (augmentedCechNerve f).left i ≫ (fun n => ExtraDegeneracy.s f S n) n\n[PROOFSTEP]\ndsimp [cechNerve, SimplicialObject.δ, SimplexCategory.δ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\n⊢ ExtraDegeneracy.s f S (n + 1) ≫\n      WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove (Fin.succ i) i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb (Fin.succ i)))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S n\n[PROOFSTEP]\next j\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1 + 1)\n⊢ (ExtraDegeneracy.s f S (n + 1) ≫\n        WidePullback.lift (WidePullback.base fun x => f.hom)\n          (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove (Fin.succ i) i_1))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb (Fin.succ i)))).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom)) ≫\n      WidePullback.π (fun x => f.hom) j =\n    (WidePullback.lift (WidePullback.base fun x => f.hom)\n          (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom) ≫\n        ExtraDegeneracy.s f S n) ≫\n      WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\nsimp only [assoc, WidePullback.lift_π]\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1 + 1)\n⊢ ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) (Fin.succAbove (Fin.succ i) j) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\nby_cases j = 0\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1 + 1)\n⊢ ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) (Fin.succAbove (Fin.succ i) j) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\nby_cases j = 0\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1 + 1)\nh : j = 0\n⊢ ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) (Fin.succAbove (Fin.succ i) j) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\n⊢ ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) (Fin.succAbove (Fin.succ i) 0) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) 0\n[PROOFSTEP]\nerw [Fin.succ_succAbove_zero, ExtraDegeneracy.s_comp_π_0, ExtraDegeneracy.s_comp_π_0]\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\n⊢ (WidePullback.base fun x => f.hom) ≫ S.section_ =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      (WidePullback.base fun x => f.hom) ≫ S.section_\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\n⊢ (WidePullback.base fun x => f.hom) ≫ S.section_ =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      (WidePullback.base fun x => f.hom) ≫ S.section_\n[PROOFSTEP]\nsimp only [WidePullback.lift_base_assoc]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1 + 1)\nh : ¬j = 0\n⊢ ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) (Fin.succAbove (Fin.succ i) j) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\ncases' Fin.eq_succ_of_ne_zero h with k hk\n[GOAL]\ncase neg.intro\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\nj : Fin (n + 1 + 1)\nh : ¬j = 0\nk : Fin (n + 1)\nhk : j = Fin.succ k\n⊢ ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) (Fin.succAbove (Fin.succ i) j) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\nsubst hk\n[GOAL]\ncase neg.intro\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\nk : Fin (n + 1)\nh : ¬Fin.succ k = 0\n⊢ ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) (Fin.succAbove (Fin.succ i) (Fin.succ k)) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) (Fin.succ k)\n[PROOFSTEP]\nerw [Fin.succ_succAbove_succ, ExtraDegeneracy.s_comp_π_succ, ExtraDegeneracy.s_comp_π_succ]\n[GOAL]\ncase neg.intro\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\nk : Fin (n + 1)\nh : ¬Fin.succ k = 0\n⊢ WidePullback.π (fun x => f.hom) (Fin.succAbove i k) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      WidePullback.π (fun x => f.hom) k\n[PROOFSTEP]\nsimp only [WidePullback.lift_π]\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\n⊢ ((ExtraDegeneracy.s f S (n + 1) ≫\n        WidePullback.lift (WidePullback.base fun x => f.hom)\n          (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove (Fin.succ i) i_1))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb (Fin.succ i)))).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom)) ≫\n      WidePullback.base fun x => f.hom) =\n    (WidePullback.lift (WidePullback.base fun x => f.hom)\n          (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom) ≫\n        ExtraDegeneracy.s f S n) ≫\n      WidePullback.base fun x => f.hom\n[PROOFSTEP]\nsimp only [assoc, WidePullback.lift_base]\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\n⊢ (ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.base fun x => f.hom) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S n ≫ WidePullback.base fun x => f.hom\n[PROOFSTEP]\nerw [ExtraDegeneracy.s_comp_base, ExtraDegeneracy.s_comp_base]\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\n⊢ (WidePullback.base fun x => f.hom) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      WidePullback.base fun x => f.hom\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 2)\n⊢ (WidePullback.base fun x => f.hom) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.succAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk (OrderEmbedding.toOrderHom (Fin.succAboveEmb i))).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      WidePullback.base fun x => f.hom\n[PROOFSTEP]\nsimp only [WidePullback.lift_base]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\n⊢ (fun n => ExtraDegeneracy.s f S n) n ≫ SimplicialObject.σ (augmentedCechNerve f).left (Fin.succ i) =\n    SimplicialObject.σ (augmentedCechNerve f).left i ≫ (fun n => ExtraDegeneracy.s f S n) (n + 1)\n[PROOFSTEP]\ndsimp [cechNerve, SimplicialObject.σ, SimplexCategory.σ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\n⊢ ExtraDegeneracy.s f S n ≫\n      WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove (Fin.succ i) i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1 + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove (Fin.succ i),\n                                monotone' := (_ : Monotone (Fin.predAbove (Fin.succ i))) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S (n + 1)\n[PROOFSTEP]\next j\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\nj : Fin (n + 1 + 1 + 1)\n⊢ (ExtraDegeneracy.s f S n ≫\n        WidePullback.lift (WidePullback.base fun x => f.hom)\n          (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove (Fin.succ i) i_1))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [n + 1 + 1]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk\n                                { toFun := Fin.predAbove (Fin.succ i),\n                                  monotone' := (_ : Monotone (Fin.predAbove (Fin.succ i))) }).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom)) ≫\n      WidePullback.π (fun x => f.hom) j =\n    (WidePullback.lift (WidePullback.base fun x => f.hom)\n          (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk\n                                { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom) ≫\n        ExtraDegeneracy.s f S (n + 1)) ≫\n      WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\nsimp only [assoc, WidePullback.lift_π]\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\nj : Fin (n + 1 + 1 + 1)\n⊢ ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) (Fin.predAbove (Fin.succ i) j) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\nby_cases j = 0\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\nj : Fin (n + 1 + 1 + 1)\n⊢ ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) (Fin.predAbove (Fin.succ i) j) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\nby_cases j = 0\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\nj : Fin (n + 1 + 1 + 1)\nh : j = 0\n⊢ ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) (Fin.predAbove (Fin.succ i) j) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\n⊢ ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) (Fin.predAbove (Fin.succ i) 0) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) 0\n[PROOFSTEP]\nerw [ExtraDegeneracy.s_comp_π_0, ExtraDegeneracy.s_comp_π_0]\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\n⊢ (WidePullback.base fun x => f.hom) ≫ S.section_ =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      (WidePullback.base fun x => f.hom) ≫ S.section_\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\n⊢ (WidePullback.base fun x => f.hom) ≫ S.section_ =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      (WidePullback.base fun x => f.hom) ≫ S.section_\n[PROOFSTEP]\nsimp only [WidePullback.lift_base_assoc]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\nj : Fin (n + 1 + 1 + 1)\nh : ¬j = 0\n⊢ ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) (Fin.predAbove (Fin.succ i) j) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\ncases' Fin.eq_succ_of_ne_zero h with k hk\n[GOAL]\ncase neg.intro\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\nj : Fin (n + 1 + 1 + 1)\nh : ¬j = 0\nk : Fin (n + 2)\nhk : j = Fin.succ k\n⊢ ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) (Fin.predAbove (Fin.succ i) j) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) j\n[PROOFSTEP]\nsubst hk\n[GOAL]\ncase neg.intro\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\nk : Fin (n + 2)\nh : ¬Fin.succ k = 0\n⊢ ExtraDegeneracy.s f S n ≫ WidePullback.π (fun x => f.hom) (Fin.predAbove (Fin.succ i) (Fin.succ k)) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.π (fun x => f.hom) (Fin.succ k)\n[PROOFSTEP]\nerw [Fin.succ_predAbove_succ, ExtraDegeneracy.s_comp_π_succ, ExtraDegeneracy.s_comp_π_succ]\n[GOAL]\ncase neg.intro\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\nk : Fin (n + 2)\nh : ¬Fin.succ k = 0\n⊢ WidePullback.π (fun x => f.hom) (Fin.predAbove i k) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      WidePullback.π (fun x => f.hom) k\n[PROOFSTEP]\nsimp only [WidePullback.lift_π]\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\n⊢ ((ExtraDegeneracy.s f S n ≫\n        WidePullback.lift (WidePullback.base fun x => f.hom)\n          (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove (Fin.succ i) i_1))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [n + 1 + 1]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk\n                                { toFun := Fin.predAbove (Fin.succ i),\n                                  monotone' := (_ : Monotone (Fin.predAbove (Fin.succ i))) }).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom)) ≫\n      WidePullback.base fun x => f.hom) =\n    (WidePullback.lift (WidePullback.base fun x => f.hom)\n          (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n              WidePullback.π (fun x => f.hom)\n                    (↑(SimplexCategory.Hom.toOrderHom\n                          (SimplexCategory.Hom.mk\n                                { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                      j) ≫\n                  f.hom =\n                WidePullback.base fun x => f.hom) ≫\n        ExtraDegeneracy.s f S (n + 1)) ≫\n      WidePullback.base fun x => f.hom\n[PROOFSTEP]\nsimp only [assoc, WidePullback.lift_base]\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\n⊢ (ExtraDegeneracy.s f S n ≫ WidePullback.base fun x => f.hom) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      ExtraDegeneracy.s f S (n + 1) ≫ WidePullback.base fun x => f.hom\n[PROOFSTEP]\nerw [ExtraDegeneracy.s_comp_base, ExtraDegeneracy.s_comp_base]\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\n⊢ (WidePullback.base fun x => f.hom) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      WidePullback.base fun x => f.hom\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nC : Type u_1\ninst✝¹ : Category.{?u.319164, u_1} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nS : SplitEpi f.hom\nn : ℕ\ni : Fin (n + 1)\n⊢ (WidePullback.base fun x => f.hom) =\n    WidePullback.lift (WidePullback.base fun x => f.hom)\n        (fun i_1 => WidePullback.π (fun x => f.hom) (Fin.predAbove i i_1))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (op [n + 1]).unop + 1)),\n            WidePullback.π (fun x => f.hom)\n                  (↑(SimplexCategory.Hom.toOrderHom\n                        (SimplexCategory.Hom.mk\n                              { toFun := Fin.predAbove i, monotone' := (_ : Monotone (Fin.predAbove i)) }).op.unop)\n                    j) ≫\n                f.hom =\n              WidePullback.base fun x => f.hom) ≫\n      WidePullback.base fun x => f.hom\n[PROOFSTEP]\nsimp only [WidePullback.lift_base]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni j : ℕ\n⊢ HomologicalComplex.X (AlternatingFaceMapComplex.obj (drop.obj X)) i ⟶\n    HomologicalComplex.X (AlternatingFaceMapComplex.obj (drop.obj X)) j\n[PROOFSTEP]\nby_cases i + 1 = j\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni j : ℕ\n⊢ HomologicalComplex.X (AlternatingFaceMapComplex.obj (drop.obj X)) i ⟶\n    HomologicalComplex.X (AlternatingFaceMapComplex.obj (drop.obj X)) j\n[PROOFSTEP]\nby_cases i + 1 = j\n[GOAL]\ncase pos\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni j : ℕ\nh : i + 1 = j\n⊢ HomologicalComplex.X (AlternatingFaceMapComplex.obj (drop.obj X)) i ⟶\n    HomologicalComplex.X (AlternatingFaceMapComplex.obj (drop.obj X)) j\n[PROOFSTEP]\nexact (-ed.s i) ≫ eqToHom (by congr)\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni j : ℕ\nh : i + 1 = j\n⊢ (drop.obj X).obj (op [i + 1]) = HomologicalComplex.X (AlternatingFaceMapComplex.obj (drop.obj X)) j\n[PROOFSTEP]\ncongr\n[GOAL]\ncase neg\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni j : ℕ\nh : ¬i + 1 = j\n⊢ HomologicalComplex.X (AlternatingFaceMapComplex.obj (drop.obj X)) i ⟶\n    HomologicalComplex.X (AlternatingFaceMapComplex.obj (drop.obj X)) j\n[PROOFSTEP]\nexact 0\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni j : ℕ\nhij : ¬ComplexShape.Rel (ComplexShape.down ℕ) j i\n⊢ (fun i j =>\n        if h : i + 1 = j then (-s ed i) ≫ eqToHom (_ : (drop.obj X).obj (op [i + 1]) = (drop.obj X).obj (op [j]))\n        else 0)\n      i j =\n    0\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni j : ℕ\nhij : ¬ComplexShape.Rel (ComplexShape.down ℕ) j i\n⊢ (if h : i + 1 = j then (-s ed i) ≫ eqToHom (_ : X.left.obj (op [i + 1]) = X.left.obj (op [j])) else 0) = 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni j : ℕ\nhij : ¬ComplexShape.Rel (ComplexShape.down ℕ) j i\nh : i + 1 = j\n⊢ (-s ed i) ≫ eqToHom (_ : X.left.obj (op [i + 1]) = X.left.obj (op [j])) = 0\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase pos.h\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni j : ℕ\nhij : ¬ComplexShape.Rel (ComplexShape.down ℕ) j i\nh : i + 1 = j\n⊢ False\n[PROOFSTEP]\nexact hij h\n[GOAL]\ncase neg\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni j : ℕ\nhij : ¬ComplexShape.Rel (ComplexShape.down ℕ) j i\nh : ¬i + 1 = j\n⊢ 0 = 0\n[PROOFSTEP]\nsimp only [eq_self_iff_true]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni : ℕ\n⊢ HomologicalComplex.Hom.f\n      (NatTrans.app AlternatingFaceMapComplex.ε X ≫\n        Equiv.invFun (ChainComplex.fromSingle₀Equiv (AlternatingFaceMapComplex.obj (drop.obj X)) (point.obj X)) ed.s')\n      i =\n    ((↑(dNext i) fun i j =>\n          if h : i + 1 = j then (-s ed i) ≫ eqToHom (_ : (drop.obj X).obj (op [i + 1]) = (drop.obj X).obj (op [j]))\n          else 0) +\n        ↑(prevD i) fun i j =>\n          if h : i + 1 = j then (-s ed i) ≫ eqToHom (_ : (drop.obj X).obj (op [i + 1]) = (drop.obj X).obj (op [j]))\n          else 0) +\n      HomologicalComplex.Hom.f (𝟙 (AlternatingFaceMapComplex.obj (drop.obj X))) i\n[PROOFSTEP]\nrcases i with _ | i\n[GOAL]\ncase zero\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\n⊢ HomologicalComplex.Hom.f\n      (NatTrans.app AlternatingFaceMapComplex.ε X ≫\n        Equiv.invFun (ChainComplex.fromSingle₀Equiv (AlternatingFaceMapComplex.obj (drop.obj X)) (point.obj X)) ed.s')\n      Nat.zero =\n    ((↑(dNext Nat.zero) fun i j =>\n          if h : i + 1 = j then (-s ed i) ≫ eqToHom (_ : (drop.obj X).obj (op [i + 1]) = (drop.obj X).obj (op [j]))\n          else 0) +\n        ↑(prevD Nat.zero) fun i j =>\n          if h : i + 1 = j then (-s ed i) ≫ eqToHom (_ : (drop.obj X).obj (op [i + 1]) = (drop.obj X).obj (op [j]))\n          else 0) +\n      HomologicalComplex.Hom.f (𝟙 (AlternatingFaceMapComplex.obj (drop.obj X))) Nat.zero\n[PROOFSTEP]\nrw [Homotopy.prevD_chainComplex, Homotopy.dNext_zero_chainComplex, zero_add]\n[GOAL]\ncase zero\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\n⊢ HomologicalComplex.Hom.f\n      (NatTrans.app AlternatingFaceMapComplex.ε X ≫\n        Equiv.invFun (ChainComplex.fromSingle₀Equiv (AlternatingFaceMapComplex.obj (drop.obj X)) (point.obj X)) ed.s')\n      Nat.zero =\n    (if h : Nat.zero + 1 = Nat.zero + 1 then\n          (-s ed Nat.zero) ≫ eqToHom (_ : (drop.obj X).obj (op [Nat.zero + 1]) = (drop.obj X).obj (op [Nat.zero + 1]))\n        else 0) ≫\n        HomologicalComplex.d (AlternatingFaceMapComplex.obj (drop.obj X)) (Nat.zero + 1) Nat.zero +\n      HomologicalComplex.Hom.f (𝟙 (AlternatingFaceMapComplex.obj (drop.obj X))) Nat.zero\n[PROOFSTEP]\ndsimp [ChainComplex.fromSingle₀Equiv, ChainComplex.toSingle₀Equiv]\n[GOAL]\ncase zero\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\n⊢ HomologicalComplex.Hom.f (NatTrans.app AlternatingFaceMapComplex.ε X) 0 ≫ ed.s' =\n    (if 0 + 1 = 0 + 1 then (-s ed 0) ≫ 𝟙 (X.left.obj (op [0 + 1])) else 0) ≫\n        HomologicalComplex.d (AlternatingFaceMapComplex.obj X.left) (0 + 1) 0 +\n      𝟙 (X.left.obj (op [0]))\n[PROOFSTEP]\nsimp only [comp_id, ite_true, zero_add, ComplexShape.down_Rel, not_true, AlternatingFaceMapComplex.obj_d_eq,\n  Preadditive.neg_comp]\n[GOAL]\ncase zero\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\n⊢ HomologicalComplex.Hom.f (NatTrans.app AlternatingFaceMapComplex.ε X) 0 ≫ ed.s' =\n    (-s ed 0 ≫ Finset.sum Finset.univ fun i => (-1) ^ ↑i • SimplicialObject.δ X.left i) + 𝟙 (X.left.obj (op [0]))\n[PROOFSTEP]\nerw [Fin.sum_univ_two]\n[GOAL]\ncase zero\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\n⊢ HomologicalComplex.Hom.f (NatTrans.app AlternatingFaceMapComplex.ε X) 0 ≫ ed.s' =\n    -s ed 0 ≫ ((-1) ^ ↑0 • SimplicialObject.δ X.left 0 + (-1) ^ ↑1 • SimplicialObject.δ X.left 1) +\n      𝟙 (X.left.obj (op [0]))\n[PROOFSTEP]\nsimp only [Fin.val_zero, pow_zero, one_smul, Fin.val_one, pow_one, neg_smul, Preadditive.comp_add, s_comp_δ₀, drop_obj,\n  Preadditive.comp_neg, neg_add_rev, neg_neg, neg_add_cancel_right, s₀_comp_δ₁]\n[GOAL]\ncase zero\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\n⊢ HomologicalComplex.Hom.f (NatTrans.app AlternatingFaceMapComplex.ε X) 0 ≫ ed.s' = NatTrans.app X.hom (op [0]) ≫ ed.s'\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni : ℕ\n⊢ HomologicalComplex.Hom.f\n      (NatTrans.app AlternatingFaceMapComplex.ε X ≫\n        Equiv.invFun (ChainComplex.fromSingle₀Equiv (AlternatingFaceMapComplex.obj (drop.obj X)) (point.obj X)) ed.s')\n      (Nat.succ i) =\n    ((↑(dNext (Nat.succ i)) fun i j =>\n          if h : i + 1 = j then (-s ed i) ≫ eqToHom (_ : (drop.obj X).obj (op [i + 1]) = (drop.obj X).obj (op [j]))\n          else 0) +\n        ↑(prevD (Nat.succ i)) fun i j =>\n          if h : i + 1 = j then (-s ed i) ≫ eqToHom (_ : (drop.obj X).obj (op [i + 1]) = (drop.obj X).obj (op [j]))\n          else 0) +\n      HomologicalComplex.Hom.f (𝟙 (AlternatingFaceMapComplex.obj (drop.obj X))) (Nat.succ i)\n[PROOFSTEP]\nrw [Homotopy.prevD_chainComplex, Homotopy.dNext_succ_chainComplex]\n[GOAL]\ncase succ\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni : ℕ\n⊢ HomologicalComplex.Hom.f\n      (NatTrans.app AlternatingFaceMapComplex.ε X ≫\n        Equiv.invFun (ChainComplex.fromSingle₀Equiv (AlternatingFaceMapComplex.obj (drop.obj X)) (point.obj X)) ed.s')\n      (Nat.succ i) =\n    (HomologicalComplex.d (AlternatingFaceMapComplex.obj (drop.obj X)) (i + 1) i ≫\n          if h : i + 1 = i + 1 then\n            (-s ed i) ≫ eqToHom (_ : (drop.obj X).obj (op [i + 1]) = (drop.obj X).obj (op [i + 1]))\n          else 0) +\n        (if h : Nat.succ i + 1 = Nat.succ i + 1 then\n            (-s ed (Nat.succ i)) ≫\n              eqToHom (_ : (drop.obj X).obj (op [Nat.succ i + 1]) = (drop.obj X).obj (op [Nat.succ i + 1]))\n          else 0) ≫\n          HomologicalComplex.d (AlternatingFaceMapComplex.obj (drop.obj X)) (Nat.succ i + 1) (Nat.succ i) +\n      HomologicalComplex.Hom.f (𝟙 (AlternatingFaceMapComplex.obj (drop.obj X))) (Nat.succ i)\n[PROOFSTEP]\ndsimp [ChainComplex.toSingle₀Equiv, ChainComplex.fromSingle₀Equiv]\n[GOAL]\ncase succ\nC : Type u_1\ninst✝² : Category.{?u.349752, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasZeroObject C\nX : SimplicialObject.Augmented C\ned : ExtraDegeneracy X\ni : ℕ\n⊢ HomologicalComplex.Hom.f (NatTrans.app AlternatingFaceMapComplex.ε X) (Nat.succ i) ≫ 0 =\n    (HomologicalComplex.d (AlternatingFaceMapComplex.obj X.left) (i + 1) i ≫\n          if i + 1 = i + 1 then (-s ed i) ≫ 𝟙 (X.left.obj (op [i + 1])) else 0) +\n        (if Nat.succ i + 1 = Nat.succ i + 1 then (-s ed (Nat.succ i)) ≫ 𝟙 (X.left.obj (op [Nat.succ i + 1])) else 0) ≫\n          HomologicalComplex.d (AlternatingFaceMapComplex.obj X.left) (Nat.succ i + 1) (Nat.succ i) +\n      𝟙 (X.left.obj (op [Nat.succ i]))\n[PROOFSTEP]\nsimp only [comp_zero, ComplexShape.down_Rel, not_true, Preadditive.neg_comp, AlternatingFaceMapComplex.obj_d_eq,\n  comp_id, ite_true, Preadditive.comp_neg, @Fin.sum_univ_succ _ _ (i + 2), Fin.val_zero, pow_zero, one_smul,\n  Fin.val_succ, Preadditive.comp_add, drop_obj, s_comp_δ₀, Preadditive.sum_comp, Preadditive.zsmul_comp,\n  Preadditive.comp_sum, Preadditive.comp_zsmul, zsmul_neg, ed.s_comp_δ, pow_add, pow_one, mul_neg, mul_one, neg_zsmul,\n  neg_neg, neg_add_cancel_comm_assoc, add_left_neg]\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.ExtraDegeneracy", "llama_tokens": 39599, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191460821871, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.368350564061962}}
{"text": "[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\na b : ℝ\nμ : Measure ℝ\n⊢ IntervalIntegrable f μ a b ↔ IntegrableOn f (Ι a b)\n[PROOFSTEP]\nrw [uIoc_eq_union, integrableOn_union, IntervalIntegrable]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\n⊢ IntervalIntegrable f μ a b ↔ IntegrableOn f (Ioc a b)\n[PROOFSTEP]\nrw [intervalIntegrable_iff, uIoc_of_le hab]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\nf : ℝ → E\na b : ℝ\nμ : Measure ℝ\ninst✝ : NoAtoms μ\n⊢ IntervalIntegrable f μ a b ↔ IntegrableOn f [[a, b]]\n[PROOFSTEP]\nrw [intervalIntegrable_iff, ← Icc_min_max, uIoc, integrableOn_Icc_iff_integrableOn_Ioc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\nf✝ : ℝ → E\na✝ b✝ : ℝ\nμ✝ : Measure ℝ\nf : ℝ → E\na b : ℝ\nhab : a ≤ b\nμ : Measure ℝ\ninst✝ : NoAtoms μ\n⊢ IntervalIntegrable f μ a b ↔ IntegrableOn f (Icc a b)\n[PROOFSTEP]\nrw [intervalIntegrable_iff_integrable_Ioc_of_le hab, integrableOn_Icc_iff_integrableOn_Ioc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\na b : ℝ\nμ : Measure ℝ\nc : E\n⊢ IntervalIntegrable (fun x => c) μ a b ↔ c = 0 ∨ ↑↑μ (Ι a b) < ⊤\n[PROOFSTEP]\nsimp only [intervalIntegrable_iff, integrableOn_const]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\na b c d : ℝ\nμ ν : Measure ℝ\n⊢ IntervalIntegrable f μ a a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\na b c d : ℝ\nμ ν : Measure ℝ\n⊢ IntegrableOn f (Ioc a a)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\na b c d : ℝ\nμ ν : Measure ℝ\n⊢ IntegrableOn f (Ioc a a)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\na✝ b c d : ℝ\nμ ν : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\nhint : ∀ (k : ℕ), k ∈ Ico m n → IntervalIntegrable f μ (a k) (a (k + 1))\n⊢ IntervalIntegrable f μ (a m) (a n)\n[PROOFSTEP]\nrevert hint\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\na✝ b c d : ℝ\nμ ν : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\n⊢ (∀ (k : ℕ), k ∈ Ico m n → IntervalIntegrable f μ (a k) (a (k + 1))) → IntervalIntegrable f μ (a m) (a n)\n[PROOFSTEP]\nrefine' Nat.le_induction _ _ n hmn\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\na✝ b c d : ℝ\nμ ν : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\n⊢ (∀ (k : ℕ), k ∈ Ico m m → IntervalIntegrable f μ (a k) (a (k + 1))) → IntervalIntegrable f μ (a m) (a m)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\na✝ b c d : ℝ\nμ ν : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\n⊢ ∀ (n : ℕ),\n    m ≤ n →\n      ((∀ (k : ℕ), k ∈ Ico m n → IntervalIntegrable f μ (a k) (a (k + 1))) → IntervalIntegrable f μ (a m) (a n)) →\n        (∀ (k : ℕ), k ∈ Ico m (n + 1) → IntervalIntegrable f μ (a k) (a (k + 1))) →\n          IntervalIntegrable f μ (a m) (a (n + 1))\n[PROOFSTEP]\nintro p hp IH h\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\na✝ b c d : ℝ\nμ ν : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\np : ℕ\nhp : m ≤ p\nIH : (∀ (k : ℕ), k ∈ Ico m p → IntervalIntegrable f μ (a k) (a (k + 1))) → IntervalIntegrable f μ (a m) (a p)\nh : ∀ (k : ℕ), k ∈ Ico m (p + 1) → IntervalIntegrable f μ (a k) (a (k + 1))\n⊢ IntervalIntegrable f μ (a m) (a (p + 1))\n[PROOFSTEP]\nexact (IH fun k hk => h k (Ico_subset_Ico_right p.le_succ hk)).trans (h p (by simp [hp]))\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf : ℝ → E\na✝ b c d : ℝ\nμ ν : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\np : ℕ\nhp : m ≤ p\nIH : (∀ (k : ℕ), k ∈ Ico m p → IntervalIntegrable f μ (a k) (a (k + 1))) → IntervalIntegrable f μ (a m) (a p)\nh : ∀ (k : ℕ), k ∈ Ico m (p + 1) → IntervalIntegrable f μ (a k) (a (k + 1))\n⊢ p ∈ Ico m (p + 1)\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf✝ : ℝ → E\na✝ b✝ c d : ℝ\nμ✝ ν : Measure ℝ\nf : ℝ → E\nμ : Measure ℝ\na b : ℝ\nhf : AEStronglyMeasurable f (Measure.restrict μ (Ι a b))\n⊢ IntervalIntegrable (fun t => ‖f t‖) μ a b ↔ IntervalIntegrable f μ a b\n[PROOFSTEP]\nsimp_rw [intervalIntegrable_iff, IntegrableOn]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝ : NormedAddCommGroup E\nf✝ : ℝ → E\na✝ b✝ c d : ℝ\nμ✝ ν : Measure ℝ\nf : ℝ → E\nμ : Measure ℝ\na b : ℝ\nhf : AEStronglyMeasurable f (Measure.restrict μ (Ι a b))\n⊢ (Integrable fun t => ‖f t‖) ↔ Integrable f\n[PROOFSTEP]\nexact integrable_norm_iff hf\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf✝ g✝ : ℝ → E\na b : ℝ\nμ : Measure ℝ\nf g : ℝ → A\nhf : IntervalIntegrable f μ a b\nhg : ContinuousOn g [[a, b]]\n⊢ IntervalIntegrable (fun x => f x * g x) μ a b\n[PROOFSTEP]\nrw [intervalIntegrable_iff] at hf ⊢\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf✝ g✝ : ℝ → E\na b : ℝ\nμ : Measure ℝ\nf g : ℝ → A\nhf : IntegrableOn f (Ι a b)\nhg : ContinuousOn g [[a, b]]\n⊢ IntegrableOn (fun x => f x * g x) (Ι a b)\n[PROOFSTEP]\nexact hf.mul_continuousOn_of_subset hg measurableSet_Ioc isCompact_uIcc Ioc_subset_Icc_self\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf✝ g✝ : ℝ → E\na b : ℝ\nμ : Measure ℝ\nf g : ℝ → A\nhf : IntervalIntegrable f μ a b\nhg : ContinuousOn g [[a, b]]\n⊢ IntervalIntegrable (fun x => g x * f x) μ a b\n[PROOFSTEP]\nrw [intervalIntegrable_iff] at hf ⊢\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf✝ g✝ : ℝ → E\na b : ℝ\nμ : Measure ℝ\nf g : ℝ → A\nhf : IntegrableOn f (Ι a b)\nhg : ContinuousOn g [[a, b]]\n⊢ IntegrableOn (fun x => g x * f x) (Ι a b)\n[PROOFSTEP]\nexact hf.continuousOn_mul_of_subset hg isCompact_uIcc measurableSet_Ioc Ioc_subset_Icc_self\n[GOAL]\nι : Type u_1\n𝕜✝ : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedRing A\nf✝ g : ℝ → E\na b : ℝ\nμ : Measure ℝ\n𝕜 : Type u_6\nf : ℝ → 𝕜\ninst✝ : NormedField 𝕜\nh : IntervalIntegrable f μ a b\nc : 𝕜\n⊢ IntervalIntegrable (fun x => f x / c) μ a b\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using mul_const h c⁻¹\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntervalIntegrable f volume a b\nc : ℝ\n⊢ IntervalIntegrable (fun x => f (c * x)) volume (a / c) (b / c)\n[PROOFSTEP]\nrcases eq_or_ne c 0 with (hc | hc)\n[GOAL]\ncase inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntervalIntegrable f volume a b\nc : ℝ\nhc : c = 0\n⊢ IntervalIntegrable (fun x => f (c * x)) volume (a / c) (b / c)\n[PROOFSTEP]\nrw [hc]\n[GOAL]\ncase inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntervalIntegrable f volume a b\nc : ℝ\nhc : c = 0\n⊢ IntervalIntegrable (fun x => f (0 * x)) volume (a / 0) (b / 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntervalIntegrable f volume a b\nc : ℝ\nhc : c ≠ 0\n⊢ IntervalIntegrable (fun x => f (c * x)) volume (a / c) (b / c)\n[PROOFSTEP]\nrw [intervalIntegrable_iff'] at hf ⊢\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntegrableOn f [[a, b]]\nc : ℝ\nhc : c ≠ 0\n⊢ IntegrableOn (fun x => f (c * x)) [[a / c, b / c]]\n[PROOFSTEP]\nhave A : MeasurableEmbedding fun x => x * c⁻¹ :=\n  (Homeomorph.mulRight₀ _ (inv_ne_zero hc)).closedEmbedding.measurableEmbedding\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntegrableOn f [[a, b]]\nc : ℝ\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c⁻¹\n⊢ IntegrableOn (fun x => f (c * x)) [[a / c, b / c]]\n[PROOFSTEP]\nrw [← Real.smul_map_volume_mul_right (inv_ne_zero hc), IntegrableOn, Measure.restrict_smul,\n  integrable_smul_measure (by simpa : ENNReal.ofReal |c⁻¹| ≠ 0) ENNReal.ofReal_ne_top, ← IntegrableOn,\n  MeasurableEmbedding.integrableOn_map_iff A]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntegrableOn f [[a, b]]\nc : ℝ\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c⁻¹\n⊢ ENNReal.ofReal |c⁻¹| ≠ 0\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntegrableOn f [[a, b]]\nc : ℝ\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c⁻¹\n⊢ IntegrableOn ((fun x => f (c * x)) ∘ fun x => x * c⁻¹) ((fun x => x * c⁻¹) ⁻¹' [[a / c, b / c]])\n[PROOFSTEP]\nconvert hf using 1\n[GOAL]\ncase h.e'_5\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntegrableOn f [[a, b]]\nc : ℝ\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c⁻¹\n⊢ ((fun x => f (c * x)) ∘ fun x => x * c⁻¹) = f\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_5.h\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntegrableOn f [[a, b]]\nc : ℝ\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c⁻¹\nx✝ : ℝ\n⊢ ((fun x => f (c * x)) ∘ fun x => x * c⁻¹) x✝ = f x✝\n[PROOFSTEP]\nsimp only [comp_apply]\n[GOAL]\ncase h.e'_5.h\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntegrableOn f [[a, b]]\nc : ℝ\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c⁻¹\nx✝ : ℝ\n⊢ f (c * (x✝ * c⁻¹)) = f x✝\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_5.h.e_a\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntegrableOn f [[a, b]]\nc : ℝ\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c⁻¹\nx✝ : ℝ\n⊢ c * (x✝ * c⁻¹) = x✝\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.e'_5.h.e_a\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntegrableOn f [[a, b]]\nc : ℝ\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c⁻¹\nx✝ : ℝ\n⊢ c * x✝ = x✝ * c\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_6\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntegrableOn f [[a, b]]\nc : ℝ\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c⁻¹\n⊢ (fun x => x * c⁻¹) ⁻¹' [[a / c, b / c]] = [[a, b]]\n[PROOFSTEP]\nrw [preimage_mul_const_uIcc (inv_ne_zero hc)]\n[GOAL]\ncase h.e'_6\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntegrableOn f [[a, b]]\nc : ℝ\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c⁻¹\n⊢ [[a / c / c⁻¹, b / c / c⁻¹]] = [[a, b]]\n[PROOFSTEP]\nfield_simp [hc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nc : ℝ\nhc : c ≠ 0\nh : IntervalIntegrable (fun x => f (c * x)) volume (a / c) (b / c)\n⊢ IntervalIntegrable f volume a b\n[PROOFSTEP]\nsimpa [hc] using h.comp_mul_left c⁻¹\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntervalIntegrable f volume a b\nc : ℝ\n⊢ IntervalIntegrable (fun x => f (x * c)) volume (a / c) (b / c)\n[PROOFSTEP]\nsimpa only [mul_comm] using comp_mul_left hf c\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntervalIntegrable f volume a b\nc : ℝ\n⊢ IntervalIntegrable (fun x => f (x + c)) volume (a - c) (b - c)\n[PROOFSTEP]\nwlog h : a ≤ b generalizing a b\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntervalIntegrable f volume a b\nc : ℝ\nthis :\n  ∀ {a b : ℝ}, IntervalIntegrable f volume a b → a ≤ b → IntervalIntegrable (fun x => f (x + c)) volume (a - c) (b - c)\nh : ¬a ≤ b\n⊢ IntervalIntegrable (fun x => f (x + c)) volume (a - c) (b - c)\n[PROOFSTEP]\nexact IntervalIntegrable.symm (this hf.symm (le_of_not_le h))\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na✝ b✝ : ℝ\nμ : Measure ℝ\nc a b : ℝ\nhf : IntervalIntegrable f volume a b\nh : a ≤ b\n⊢ IntervalIntegrable (fun x => f (x + c)) volume (a - c) (b - c)\n[PROOFSTEP]\nrw [intervalIntegrable_iff'] at hf ⊢\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na✝ b✝ : ℝ\nμ : Measure ℝ\nc a b : ℝ\nhf : IntegrableOn f [[a, b]]\nh : a ≤ b\n⊢ IntegrableOn (fun x => f (x + c)) [[a - c, b - c]]\n[PROOFSTEP]\nhave A : MeasurableEmbedding fun x => x + c := (Homeomorph.addRight c).closedEmbedding.measurableEmbedding\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na✝ b✝ : ℝ\nμ : Measure ℝ\nc a b : ℝ\nhf : IntegrableOn f [[a, b]]\nh : a ≤ b\nA : MeasurableEmbedding fun x => x + c\n⊢ IntegrableOn (fun x => f (x + c)) [[a - c, b - c]]\n[PROOFSTEP]\nrw [← map_add_right_eq_self volume c] at hf \n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na✝ b✝ : ℝ\nμ : Measure ℝ\nc a b : ℝ\nhf : IntegrableOn f [[a, b]]\nh : a ≤ b\nA : MeasurableEmbedding fun x => x + c\n⊢ IntegrableOn (fun x => f (x + c)) [[a - c, b - c]]\n[PROOFSTEP]\nconvert (MeasurableEmbedding.integrableOn_map_iff A).mp hf using 1\n[GOAL]\ncase h.e'_6\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A✝\nf g : ℝ → E\na✝ b✝ : ℝ\nμ : Measure ℝ\nc a b : ℝ\nhf : IntegrableOn f [[a, b]]\nh : a ≤ b\nA : MeasurableEmbedding fun x => x + c\n⊢ [[a - c, b - c]] = (fun x => x + c) ⁻¹' [[a, b]]\n[PROOFSTEP]\nrw [preimage_add_const_uIcc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntervalIntegrable f volume a b\nc : ℝ\n⊢ IntervalIntegrable (fun x => f (c + x)) volume (a - c) (b - c)\n[PROOFSTEP]\nsimpa only [add_comm] using IntervalIntegrable.comp_add_right hf c\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntervalIntegrable f volume a b\nc : ℝ\n⊢ IntervalIntegrable (fun x => f (x - c)) volume (a + c) (b + c)\n[PROOFSTEP]\nsimpa only [sub_neg_eq_add] using IntervalIntegrable.comp_add_right hf (-c)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\n⊢ IntervalIntegrable f volume a b ↔ IntervalIntegrable (fun x => f (-x)) volume (-a) (-b)\n[PROOFSTEP]\nrw [← comp_mul_left_iff (neg_ne_zero.2 one_ne_zero)]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\n⊢ IntervalIntegrable (fun x => f (-1 * x)) volume (a / -1) (b / -1) ↔\n    IntervalIntegrable (fun x => f (-x)) volume (-a) (-b)\n[PROOFSTEP]\nsimp [div_neg]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedRing A\nf g : ℝ → E\na b : ℝ\nμ : Measure ℝ\nhf : IntervalIntegrable f volume a b\nc : ℝ\n⊢ IntervalIntegrable (fun x => f (c - x)) volume (c - a) (c - b)\n[PROOFSTEP]\nsimpa only [neg_sub, ← sub_eq_add_neg] using iff_comp_neg.mp (hf.comp_add_left c)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝⁴ : NormedAddCommGroup E\nμ : Measure ℝ\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : ConditionallyCompleteLinearOrder E\ninst✝¹ : OrderTopology E\ninst✝ : SecondCountableTopology E\nu : ℝ → E\na b : ℝ\nhu : MonotoneOn u [[a, b]]\n⊢ IntervalIntegrable u μ a b\n[PROOFSTEP]\nrw [intervalIntegrable_iff]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝⁴ : NormedAddCommGroup E\nμ : Measure ℝ\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : ConditionallyCompleteLinearOrder E\ninst✝¹ : OrderTopology E\ninst✝ : SecondCountableTopology E\nu : ℝ → E\na b : ℝ\nhu : MonotoneOn u [[a, b]]\n⊢ IntegrableOn u (Ι a b)\n[PROOFSTEP]\nexact (hu.integrableOn_isCompact isCompact_uIcc).mono_set Ioc_subset_Icc_self\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\n⊢ ∫ (x : ℝ) in a..b, 0 ∂μ = 0\n[PROOFSTEP]\nsimp [intervalIntegral]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nh : a ≤ b\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ) in Ioc a b, f x ∂μ\n[PROOFSTEP]\nsimp [intervalIntegral, h]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na b : ℝ\n⊢ ∫ (x : ℝ) in b..a, f x ∂μ = -∫ (x : ℝ) in a..b, f x ∂μ\n[PROOFSTEP]\nsimp only [intervalIntegral, neg_sub]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nh : b ≤ a\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = -∫ (x : ℝ) in Ioc b a, f x ∂μ\n[PROOFSTEP]\nsimp only [integral_symm b, integral_of_le h]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ✝ : Measure ℝ\nf : ℝ → E\na b : ℝ\nμ : Measure ℝ\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = (if a ≤ b then 1 else -1) • ∫ (x : ℝ) in Ι a b, f x ∂μ\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ✝ : Measure ℝ\nf : ℝ → E\na b : ℝ\nμ : Measure ℝ\nh : a ≤ b\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = 1 • ∫ (x : ℝ) in Ι a b, f x ∂μ\n[PROOFSTEP]\nsimp only [integral_of_le h, uIoc_of_le h, one_smul]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ✝ : Measure ℝ\nf : ℝ → E\na b : ℝ\nμ : Measure ℝ\nh : ¬a ≤ b\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = -1 • ∫ (x : ℝ) in Ι a b, f x ∂μ\n[PROOFSTEP]\nsimp only [integral_of_ge (not_le.1 h).le, uIoc_of_lt (not_le.1 h), neg_one_smul]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ✝ : Measure ℝ\nf : ℝ → E\na b : ℝ\nμ : Measure ℝ\n⊢ ‖∫ (x : ℝ) in a..b, f x ∂μ‖ = ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖\n[PROOFSTEP]\nsimp_rw [intervalIntegral_eq_integral_uIoc, norm_smul]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ✝ : Measure ℝ\nf : ℝ → E\na b : ℝ\nμ : Measure ℝ\n⊢ ‖if a ≤ b then 1 else -1‖ * ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖ = ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ✝ : Measure ℝ\nf : ℝ → E\na b : ℝ\nμ : Measure ℝ\nh✝ : a ≤ b\n⊢ ‖1‖ * ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖ = ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖\n[PROOFSTEP]\nsimp only [norm_neg, norm_one, one_mul]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ✝ : Measure ℝ\nf : ℝ → E\na b : ℝ\nμ : Measure ℝ\nh✝ : ¬a ≤ b\n⊢ ‖-1‖ * ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖ = ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖\n[PROOFSTEP]\nsimp only [norm_neg, norm_one, one_mul]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\nf : ℝ → E\na b : ℝ\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ ∈ {∫ (x : ℝ) in Ι a b, f x ∂μ, -∫ (x : ℝ) in Ι a b, f x ∂μ}\n[PROOFSTEP]\nrw [intervalIntegral_eq_integral_uIoc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\nf : ℝ → E\na b : ℝ\n⊢ (if a ≤ b then 1 else -1) • ∫ (x : ℝ) in Ι a b, f x ∂μ ∈ {∫ (x : ℝ) in Ι a b, f x ∂μ, -∫ (x : ℝ) in Ι a b, f x ∂μ}\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\nf : ℝ → E\na b : ℝ\nh✝ : a ≤ b\n⊢ 1 • ∫ (x : ℝ) in Ι a b, f x ∂μ ∈ {∫ (x : ℝ) in Ι a b, f x ∂μ, -∫ (x : ℝ) in Ι a b, f x ∂μ}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\nf : ℝ → E\na b : ℝ\nh✝ : ¬a ≤ b\n⊢ -1 • ∫ (x : ℝ) in Ι a b, f x ∂μ ∈ {∫ (x : ℝ) in Ι a b, f x ∂μ, -∫ (x : ℝ) in Ι a b, f x ∂μ}\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nh : ¬IntervalIntegrable f μ a b\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = 0\n[PROOFSTEP]\nrw [intervalIntegrable_iff] at h \n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nh : ¬IntegrableOn f (Ι a b)\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = 0\n[PROOFSTEP]\nrw [intervalIntegral_eq_integral_uIoc, integral_undef h, smul_zero]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhf : ¬AEStronglyMeasurable f (Measure.restrict μ (Ι a b))\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = 0\n[PROOFSTEP]\nrw [intervalIntegral_eq_integral_uIoc, integral_non_aestronglyMeasurable hf, smul_zero]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nh : a ≤ b\nhf : ¬AEStronglyMeasurable f (Measure.restrict μ (Ioc a b))\n⊢ ¬AEStronglyMeasurable (fun x => f x) (Measure.restrict μ (Ι a b))\n[PROOFSTEP]\nrwa [uIoc_of_le h]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\nf : ℝ → E\n⊢ ‖∫ (x : ℝ) in min a b..max a b, f x ∂μ‖ = ‖∫ (x : ℝ) in a..b, f x ∂μ‖\n[PROOFSTEP]\ncases le_total a b\n[GOAL]\ncase inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\nf : ℝ → E\nh✝ : a ≤ b\n⊢ ‖∫ (x : ℝ) in min a b..max a b, f x ∂μ‖ = ‖∫ (x : ℝ) in a..b, f x ∂μ‖\n[PROOFSTEP]\nsimp [*, integral_symm a b]\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\nf : ℝ → E\nh✝ : b ≤ a\n⊢ ‖∫ (x : ℝ) in min a b..max a b, f x ∂μ‖ = ‖∫ (x : ℝ) in a..b, f x ∂μ‖\n[PROOFSTEP]\nsimp [*, integral_symm a b]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\nf : ℝ → E\n⊢ ‖∫ (x : ℝ) in a..b, f x ∂μ‖ = ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖\n[PROOFSTEP]\nrw [← norm_integral_min_max, integral_of_le min_le_max, uIoc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\n⊢ ‖∫ (x : ℝ) in a..b, f x ∂μ‖ ≤ |∫ (x : ℝ) in a..b, ‖f x‖ ∂μ|\n[PROOFSTEP]\nsimp only [← Real.norm_eq_abs, norm_integral_eq_norm_integral_Ioc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\n⊢ ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖ ≤ ‖∫ (x : ℝ) in Ι a b, ‖f x‖ ∂μ‖\n[PROOFSTEP]\nexact le_trans (norm_integral_le_integral_norm _) (le_abs_self _)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nh : a ≤ b\n⊢ ∫ (x : ℝ) in Ι a b, ‖f x‖ ∂μ = ∫ (x : ℝ) in a..b, ‖f x‖ ∂μ\n[PROOFSTEP]\nrw [uIoc_of_le h, integral_of_le h]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g✝ : ℝ → E\nμ : Measure ℝ\ng : ℝ → ℝ\nh : ∀ᵐ (t : ℝ) ∂Measure.restrict μ (Ι a b), ‖f t‖ ≤ g t\nhbound : IntervalIntegrable g μ a b\n⊢ ‖∫ (t : ℝ) in a..b, f t ∂μ‖ ≤ |∫ (t : ℝ) in a..b, g t ∂μ|\n[PROOFSTEP]\nsimp_rw [norm_intervalIntegral_eq, abs_intervalIntegral_eq,\n  abs_eq_self.mpr (integral_nonneg_of_ae <| h.mono fun _t ht => (norm_nonneg _).trans ht),\n  norm_integral_le_of_norm_le hbound.def h]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\na b C : ℝ\nf : ℝ → E\nh : ∀ᵐ (x : ℝ), x ∈ Ι a b → ‖f x‖ ≤ C\n⊢ ‖∫ (x : ℝ) in a..b, f x‖ ≤ C * |b - a|\n[PROOFSTEP]\nrw [norm_integral_eq_norm_integral_Ioc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\na b C : ℝ\nf : ℝ → E\nh : ∀ᵐ (x : ℝ), x ∈ Ι a b → ‖f x‖ ≤ C\n⊢ ‖∫ (x : ℝ) in Ι a b, f x‖ ≤ C * |b - a|\n[PROOFSTEP]\nconvert norm_set_integral_le_of_norm_le_const_ae'' _ measurableSet_Ioc h using 1\n[GOAL]\ncase h.e'_4\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\na b C : ℝ\nf : ℝ → E\nh : ∀ᵐ (x : ℝ), x ∈ Ι a b → ‖f x‖ ≤ C\n⊢ C * |b - a| = C * ENNReal.toReal (↑↑volume (Ioc (min a b) (max a b)))\n[PROOFSTEP]\nrw [Real.volume_Ioc, max_sub_min_eq_abs, ENNReal.toReal_ofReal (abs_nonneg _)]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\na b C : ℝ\nf : ℝ → E\nh : ∀ᵐ (x : ℝ), x ∈ Ι a b → ‖f x‖ ≤ C\n⊢ ↑↑volume (Ioc (min a b) (max a b)) < ⊤\n[PROOFSTEP]\nsimp only [Real.volume_Ioc, ENNReal.ofReal_lt_top]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhf : IntervalIntegrable f μ a b\nhg : IntervalIntegrable g μ a b\n⊢ ∫ (x : ℝ) in a..b, f x + g x ∂μ = ∫ (x : ℝ) in a..b, f x ∂μ + ∫ (x : ℝ) in a..b, g x ∂μ\n[PROOFSTEP]\nsimp only [intervalIntegral_eq_integral_uIoc, integral_add hf.def hg.def, smul_add]\n[GOAL]\nι✝ : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\nι : Type u_6\ns : Finset ι\nf : ι → ℝ → E\nh : ∀ (i : ι), i ∈ s → IntervalIntegrable (f i) μ a b\n⊢ ∫ (x : ℝ) in a..b, ∑ i in s, f i x ∂μ = ∑ i in s, ∫ (x : ℝ) in a..b, f i x ∂μ\n[PROOFSTEP]\nsimp only [intervalIntegral_eq_integral_uIoc, integral_finset_sum s fun i hi => (h i hi).def, Finset.smul_sum]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\n⊢ ∫ (x : ℝ) in a..b, -f x ∂μ = -∫ (x : ℝ) in a..b, f x ∂μ\n[PROOFSTEP]\nsimp only [intervalIntegral, integral_neg]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\n⊢ -∫ (a : ℝ) in Ioc a b, f a ∂μ - -∫ (a : ℝ) in Ioc b a, f a ∂μ =\n    -(∫ (a : ℝ) in Ioc a b, f a ∂μ - ∫ (a : ℝ) in Ioc b a, f a ∂μ)\n[PROOFSTEP]\nabel\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\n⊢ -∫ (a : ℝ) in Ioc a b, f a ∂μ - -∫ (a : ℝ) in Ioc b a, f a ∂μ =\n    -(∫ (a : ℝ) in Ioc a b, f a ∂μ - ∫ (a : ℝ) in Ioc b a, f a ∂μ)\n[PROOFSTEP]\nabel\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhf : IntervalIntegrable f μ a b\nhg : IntervalIntegrable g μ a b\n⊢ ∫ (x : ℝ) in a..b, f x - g x ∂μ = ∫ (x : ℝ) in a..b, f x ∂μ - ∫ (x : ℝ) in a..b, g x ∂μ\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using (integral_add hf hg.neg).trans (congr_arg _ integral_neg)\n[GOAL]\nι : Type u_1\n𝕜✝ : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : CompleteSpace E\ninst✝³ : NormedSpace ℝ E\na b : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\n𝕜 : Type u_6\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : SMulCommClass ℝ 𝕜 E\nr : 𝕜\nf : ℝ → E\n⊢ ∫ (x : ℝ) in a..b, r • f x ∂μ = r • ∫ (x : ℝ) in a..b, f x ∂μ\n[PROOFSTEP]\nsimp only [intervalIntegral, integral_smul, smul_sub]\n[GOAL]\nι : Type u_1\n𝕜✝ : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\na b : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\n𝕜 : Type u_6\ninst✝¹ : IsROrC 𝕜\ninst✝ : NormedSpace 𝕜 E\nf : ℝ → 𝕜\nc : E\n⊢ ∫ (x : ℝ) in a..b, f x • c ∂μ = (∫ (x : ℝ) in a..b, f x ∂μ) • c\n[PROOFSTEP]\nsimp only [intervalIntegral_eq_integral_uIoc, integral_smul_const, smul_assoc]\n[GOAL]\nι : Type u_1\n𝕜✝ : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\n𝕜 : Type u_6\ninst✝ : IsROrC 𝕜\nr : 𝕜\nf : ℝ → 𝕜\n⊢ ∫ (x : ℝ) in a..b, f x * r ∂μ = (∫ (x : ℝ) in a..b, f x ∂μ) * r\n[PROOFSTEP]\nsimpa only [mul_comm r] using integral_const_mul r f\n[GOAL]\nι : Type u_1\n𝕜✝ : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\n𝕜 : Type u_6\ninst✝ : IsROrC 𝕜\nr : 𝕜\nf : ℝ → 𝕜\n⊢ ∫ (x : ℝ) in a..b, f x / r ∂μ = (∫ (x : ℝ) in a..b, f x ∂μ) / r\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using integral_mul_const r⁻¹ f\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nc : E\n⊢ ∫ (x : ℝ) in a..b, c ∂μ = (ENNReal.toReal (↑↑μ (Ioc a b)) - ENNReal.toReal (↑↑μ (Ioc b a))) • c\n[PROOFSTEP]\nsimp only [intervalIntegral, set_integral_const, sub_smul]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nc : E\n⊢ ∫ (x : ℝ) in a..b, c = (b - a) • c\n[PROOFSTEP]\nsimp only [integral_const', Real.volume_Ioc, ENNReal.toReal_ofReal', ← neg_sub b, max_zero_sub_eq_self]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nc : ℝ≥0∞\n⊢ ∫ (x : ℝ) in a..b, f x ∂c • μ = ENNReal.toReal c • ∫ (x : ℝ) in a..b, f x ∂μ\n[PROOFSTEP]\nsimp only [intervalIntegral, Measure.restrict_smul, integral_smul_measure, smul_sub]\n[GOAL]\nι : Type u_1\n𝕜✝ : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\n𝕜 : Type u_6\ninst✝ : IsROrC 𝕜\na b : ℝ\nμ : Measure ℝ\nf : ℝ → ℝ\n⊢ ∫ (x : ℝ) in a..b, ↑(f x) ∂μ = ↑(∫ (x : ℝ) in a..b, f x ∂μ)\n[PROOFSTEP]\nsimp only [intervalIntegral, integral_ofReal, IsROrC.ofReal_sub]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedSpace ℝ E\na✝ b✝ : ℝ\nμ : Measure ℝ\nf : ℝ → E\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\na b : ℝ\nφ : ℝ → F →L[𝕜] E\nhφ : IntervalIntegrable φ μ a b\nv : F\n⊢ ↑(∫ (x : ℝ) in a..b, φ x ∂μ) v = ∫ (x : ℝ) in a..b, ↑(φ x) v ∂μ\n[PROOFSTEP]\nsimp_rw [intervalIntegral_eq_integral_uIoc, ← integral_apply hφ.def v, coe_smul', Pi.smul_apply]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : CompleteSpace E\ninst✝⁶ : NormedSpace ℝ E\na b : ℝ\nμ : Measure ℝ\nf : ℝ → E\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] F\nhf : IntervalIntegrable f μ a b\n⊢ ∫ (x : ℝ) in a..b, ↑L (f x) ∂μ = ↑L (∫ (x : ℝ) in a..b, f x ∂μ)\n[PROOFSTEP]\nsimp_rw [intervalIntegral, L.integral_comp_comm hf.1, L.integral_comp_comm hf.2, L.map_sub]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf : ℝ → E\nhc : c ≠ 0\n⊢ ∫ (x : ℝ) in a..b, f (x * c) = c⁻¹ • ∫ (x : ℝ) in a * c..b * c, f x\n[PROOFSTEP]\nhave A : MeasurableEmbedding fun x => x * c := (Homeomorph.mulRight₀ c hc).closedEmbedding.measurableEmbedding\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf : ℝ → E\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c\n⊢ ∫ (x : ℝ) in a..b, f (x * c) = c⁻¹ • ∫ (x : ℝ) in a * c..b * c, f x\n[PROOFSTEP]\nconv_rhs => rw [← Real.smul_map_volume_mul_right hc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf : ℝ → E\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c\n| c⁻¹ • ∫ (x : ℝ) in a * c..b * c, f x\n[PROOFSTEP]\nrw [← Real.smul_map_volume_mul_right hc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf : ℝ → E\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c\n| c⁻¹ • ∫ (x : ℝ) in a * c..b * c, f x\n[PROOFSTEP]\nrw [← Real.smul_map_volume_mul_right hc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf : ℝ → E\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c\n| c⁻¹ • ∫ (x : ℝ) in a * c..b * c, f x\n[PROOFSTEP]\nrw [← Real.smul_map_volume_mul_right hc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf : ℝ → E\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c\n⊢ ∫ (x : ℝ) in a..b, f (x * c) =\n    c⁻¹ • ∫ (x : ℝ) in a * c..b * c, f x ∂ENNReal.ofReal |c| • Measure.map (fun x => x * c) volume\n[PROOFSTEP]\nsimp_rw [integral_smul_measure, intervalIntegral, A.set_integral_map, ENNReal.toReal_ofReal (abs_nonneg c)]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf : ℝ → E\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c\n⊢ (∫ (x : ℝ) in Ioc a b, f (x * c)) - ∫ (x : ℝ) in Ioc b a, f (x * c) =\n    c⁻¹ •\n      |c| •\n        ((∫ (x : ℝ) in (fun x => x * c) ⁻¹' Ioc (a * c) (b * c), f (x * c)) -\n          ∫ (x : ℝ) in (fun x => x * c) ⁻¹' Ioc (b * c) (a * c), f (x * c))\n[PROOFSTEP]\ncases' hc.lt_or_lt with h h\n[GOAL]\ncase inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf : ℝ → E\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c\nh : c < 0\n⊢ (∫ (x : ℝ) in Ioc a b, f (x * c)) - ∫ (x : ℝ) in Ioc b a, f (x * c) =\n    c⁻¹ •\n      |c| •\n        ((∫ (x : ℝ) in (fun x => x * c) ⁻¹' Ioc (a * c) (b * c), f (x * c)) -\n          ∫ (x : ℝ) in (fun x => x * c) ⁻¹' Ioc (b * c) (a * c), f (x * c))\n[PROOFSTEP]\nsimp [h, mul_div_cancel, hc, abs_of_neg, Measure.restrict_congr_set (α := ℝ) (μ := volume) Ico_ae_eq_Ioc]\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf : ℝ → E\nhc : c ≠ 0\nA : MeasurableEmbedding fun x => x * c\nh : 0 < c\n⊢ (∫ (x : ℝ) in Ioc a b, f (x * c)) - ∫ (x : ℝ) in Ioc b a, f (x * c) =\n    c⁻¹ •\n      |c| •\n        ((∫ (x : ℝ) in (fun x => x * c) ⁻¹' Ioc (a * c) (b * c), f (x * c)) -\n          ∫ (x : ℝ) in (fun x => x * c) ⁻¹' Ioc (b * c) (a * c), f (x * c))\n[PROOFSTEP]\nsimp [h, mul_div_cancel, hc, abs_of_pos]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d : ℝ\nf : ℝ → E\nc : ℝ\n⊢ c • ∫ (x : ℝ) in a..b, f (x * c) = ∫ (x : ℝ) in a * c..b * c, f x\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d : ℝ\nf : ℝ → E\nc : ℝ\nhc : c = 0\n⊢ c • ∫ (x : ℝ) in a..b, f (x * c) = ∫ (x : ℝ) in a * c..b * c, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_mul_right]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d : ℝ\nf : ℝ → E\nc : ℝ\nhc : ¬c = 0\n⊢ c • ∫ (x : ℝ) in a..b, f (x * c) = ∫ (x : ℝ) in a * c..b * c, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_mul_right]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf : ℝ → E\nhc : c ≠ 0\n⊢ ∫ (x : ℝ) in a..b, f (c * x) = c⁻¹ • ∫ (x : ℝ) in c * a..c * b, f x\n[PROOFSTEP]\nsimpa only [mul_comm c] using integral_comp_mul_right f hc\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d : ℝ\nf : ℝ → E\nc : ℝ\n⊢ c • ∫ (x : ℝ) in a..b, f (c * x) = ∫ (x : ℝ) in c * a..c * b, f x\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d : ℝ\nf : ℝ → E\nc : ℝ\nhc : c = 0\n⊢ c • ∫ (x : ℝ) in a..b, f (c * x) = ∫ (x : ℝ) in c * a..c * b, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_mul_left]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d : ℝ\nf : ℝ → E\nc : ℝ\nhc : ¬c = 0\n⊢ c • ∫ (x : ℝ) in a..b, f (c * x) = ∫ (x : ℝ) in c * a..c * b, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_mul_left]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf : ℝ → E\nhc : c ≠ 0\n⊢ ∫ (x : ℝ) in a..b, f (x / c) = c • ∫ (x : ℝ) in a / c..b / c, f x\n[PROOFSTEP]\nsimpa only [inv_inv] using integral_comp_mul_right f (inv_ne_zero hc)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d : ℝ\nf : ℝ → E\nc : ℝ\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (x / c) = ∫ (x : ℝ) in a / c..b / c, f x\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d : ℝ\nf : ℝ → E\nc : ℝ\nhc : c = 0\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (x / c) = ∫ (x : ℝ) in a / c..b / c, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_div]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d : ℝ\nf : ℝ → E\nc : ℝ\nhc : ¬c = 0\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (x / c) = ∫ (x : ℝ) in a / c..b / c, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_div]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nd : ℝ\nA : MeasurableEmbedding fun x => x + d\n⊢ ∫ (x : ℝ) in a..b, f (x + d) = ∫ (x : ℝ) in a + d..b + d, f x ∂Measure.map (fun x => x + d) volume\n[PROOFSTEP]\nsimp [intervalIntegral, A.set_integral_map]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA✝ : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nd : ℝ\nA : MeasurableEmbedding fun x => x + d\n⊢ ∫ (x : ℝ) in a + d..b + d, f x ∂Measure.map (fun x => x + d) volume = ∫ (x : ℝ) in a + d..b + d, f x\n[PROOFSTEP]\nrw [map_add_right_eq_self]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nd : ℝ\n⊢ ∫ (x : ℝ) in a..b, f (d + x) = ∫ (x : ℝ) in d + a..d + b, f x\n[PROOFSTEP]\nsimpa only [add_comm d] using integral_comp_add_right f d\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nhc : c ≠ 0\nd : ℝ\n⊢ ∫ (x : ℝ) in a..b, f (c * x + d) = c⁻¹ • ∫ (x : ℝ) in c * a + d..c * b + d, f x\n[PROOFSTEP]\nrw [← integral_comp_add_right, ← integral_comp_mul_left _ hc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\n⊢ c • ∫ (x : ℝ) in a..b, f (c * x + d) = ∫ (x : ℝ) in c * a + d..c * b + d, f x\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : c = 0\n⊢ c • ∫ (x : ℝ) in a..b, f (c * x + d) = ∫ (x : ℝ) in c * a + d..c * b + d, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_mul_add]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : ¬c = 0\n⊢ c • ∫ (x : ℝ) in a..b, f (c * x + d) = ∫ (x : ℝ) in c * a + d..c * b + d, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_mul_add]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nhc : c ≠ 0\nd : ℝ\n⊢ ∫ (x : ℝ) in a..b, f (d + c * x) = c⁻¹ • ∫ (x : ℝ) in d + c * a..d + c * b, f x\n[PROOFSTEP]\nrw [← integral_comp_add_left, ← integral_comp_mul_left _ hc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\n⊢ c • ∫ (x : ℝ) in a..b, f (d + c * x) = ∫ (x : ℝ) in d + c * a..d + c * b, f x\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : c = 0\n⊢ c • ∫ (x : ℝ) in a..b, f (d + c * x) = ∫ (x : ℝ) in d + c * a..d + c * b, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_add_mul]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : ¬c = 0\n⊢ c • ∫ (x : ℝ) in a..b, f (d + c * x) = ∫ (x : ℝ) in d + c * a..d + c * b, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_add_mul]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nhc : c ≠ 0\nd : ℝ\n⊢ ∫ (x : ℝ) in a..b, f (x / c + d) = c • ∫ (x : ℝ) in a / c + d..b / c + d, f x\n[PROOFSTEP]\nsimpa only [div_eq_inv_mul, inv_inv] using integral_comp_mul_add f (inv_ne_zero hc) d\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (x / c + d) = ∫ (x : ℝ) in a / c + d..b / c + d, f x\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : c = 0\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (x / c + d) = ∫ (x : ℝ) in a / c + d..b / c + d, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_div_add]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : ¬c = 0\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (x / c + d) = ∫ (x : ℝ) in a / c + d..b / c + d, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_div_add]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nhc : c ≠ 0\nd : ℝ\n⊢ ∫ (x : ℝ) in a..b, f (d + x / c) = c • ∫ (x : ℝ) in d + a / c..d + b / c, f x\n[PROOFSTEP]\nsimpa only [div_eq_inv_mul, inv_inv] using integral_comp_add_mul f (inv_ne_zero hc) d\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (d + x / c) = ∫ (x : ℝ) in d + a / c..d + b / c, f x\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : c = 0\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (d + x / c) = ∫ (x : ℝ) in d + a / c..d + b / c, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_add_div]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : ¬c = 0\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (d + x / c) = ∫ (x : ℝ) in d + a / c..d + b / c, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_add_div]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nhc : c ≠ 0\nd : ℝ\n⊢ ∫ (x : ℝ) in a..b, f (c * x - d) = c⁻¹ • ∫ (x : ℝ) in c * a - d..c * b - d, f x\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using integral_comp_mul_add f hc (-d)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\n⊢ c • ∫ (x : ℝ) in a..b, f (c * x - d) = ∫ (x : ℝ) in c * a - d..c * b - d, f x\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : c = 0\n⊢ c • ∫ (x : ℝ) in a..b, f (c * x - d) = ∫ (x : ℝ) in c * a - d..c * b - d, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_mul_sub]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : ¬c = 0\n⊢ c • ∫ (x : ℝ) in a..b, f (c * x - d) = ∫ (x : ℝ) in c * a - d..c * b - d, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_mul_sub]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nhc : c ≠ 0\nd : ℝ\n⊢ ∫ (x : ℝ) in a..b, f (d - c * x) = c⁻¹ • ∫ (x : ℝ) in d - c * b..d - c * a, f x\n[PROOFSTEP]\nsimp only [sub_eq_add_neg, neg_mul_eq_neg_mul]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nhc : c ≠ 0\nd : ℝ\n⊢ ∫ (x : ℝ) in a..b, f (d + -c * x) = c⁻¹ • ∫ (x : ℝ) in d + -c * b..d + -c * a, f x\n[PROOFSTEP]\nrw [integral_comp_add_mul f (neg_ne_zero.mpr hc) d, integral_symm]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nhc : c ≠ 0\nd : ℝ\n⊢ (-c)⁻¹ • -∫ (x : ℝ) in d + -c * b..d + -c * a, f x = c⁻¹ • ∫ (x : ℝ) in d + -c * b..d + -c * a, f x\n[PROOFSTEP]\nsimp only [inv_neg, smul_neg, neg_neg, neg_smul]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\n⊢ c • ∫ (x : ℝ) in a..b, f (d - c * x) = ∫ (x : ℝ) in d - c * b..d - c * a, f x\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : c = 0\n⊢ c • ∫ (x : ℝ) in a..b, f (d - c * x) = ∫ (x : ℝ) in d - c * b..d - c * a, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_sub_mul]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : ¬c = 0\n⊢ c • ∫ (x : ℝ) in a..b, f (d - c * x) = ∫ (x : ℝ) in d - c * b..d - c * a, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_sub_mul]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nhc : c ≠ 0\nd : ℝ\n⊢ ∫ (x : ℝ) in a..b, f (x / c - d) = c • ∫ (x : ℝ) in a / c - d..b / c - d, f x\n[PROOFSTEP]\nsimpa only [div_eq_inv_mul, inv_inv] using integral_comp_mul_sub f (inv_ne_zero hc) d\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (x / c - d) = ∫ (x : ℝ) in a / c - d..b / c - d, f x\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : c = 0\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (x / c - d) = ∫ (x : ℝ) in a / c - d..b / c - d, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_div_sub]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : ¬c = 0\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (x / c - d) = ∫ (x : ℝ) in a / c - d..b / c - d, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_div_sub]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nhc : c ≠ 0\nd : ℝ\n⊢ ∫ (x : ℝ) in a..b, f (d - x / c) = c • ∫ (x : ℝ) in d - b / c..d - a / c, f x\n[PROOFSTEP]\nsimpa only [div_eq_inv_mul, inv_inv] using integral_comp_sub_mul f (inv_ne_zero hc) d\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (d - x / c) = ∫ (x : ℝ) in d - b / c..d - a / c, f x\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : c = 0\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (d - x / c) = ∫ (x : ℝ) in d - b / c..d - a / c, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_sub_div]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c✝ d✝ : ℝ\nf : ℝ → E\nc d : ℝ\nhc : ¬c = 0\n⊢ c⁻¹ • ∫ (x : ℝ) in a..b, f (d - x / c) = ∫ (x : ℝ) in d - b / c..d - a / c, f x\n[PROOFSTEP]\nsimp [hc, integral_comp_sub_div]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nd : ℝ\n⊢ ∫ (x : ℝ) in a..b, f (x - d) = ∫ (x : ℝ) in a - d..b - d, f x\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using integral_comp_add_right f (-d)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d✝ : ℝ\nf : ℝ → E\nd : ℝ\n⊢ ∫ (x : ℝ) in a..b, f (d - x) = ∫ (x : ℝ) in d - b..d - a, f x\n[PROOFSTEP]\nsimpa only [one_mul, one_smul, inv_one] using integral_comp_sub_mul f one_ne_zero d\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf : ℝ → E\n⊢ ∫ (x : ℝ) in a..b, f (-x) = ∫ (x : ℝ) in -b..-a, f x\n[PROOFSTEP]\nsimpa only [zero_sub] using integral_comp_sub_left f 0\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na b : ℝ\nh : EqOn f g [[a, b]]\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ) in a..b, g x ∂μ\n[PROOFSTEP]\ncases' le_total a b with hab hab\n[GOAL]\ncase inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na b : ℝ\nh : EqOn f g [[a, b]]\nhab : a ≤ b\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ) in a..b, g x ∂μ\n[PROOFSTEP]\nsimpa [hab, integral_of_le, integral_of_ge] using set_integral_congr measurableSet_Ioc (h.mono Ioc_subset_Icc_self)\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na b : ℝ\nh : EqOn f g [[a, b]]\nhab : b ≤ a\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ) in a..b, g x ∂μ\n[PROOFSTEP]\nsimpa [hab, integral_of_le, integral_of_ge] using set_integral_congr measurableSet_Ioc (h.mono Ioc_subset_Icc_self)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ + ∫ (x : ℝ) in b..c, f x ∂μ + ∫ (x : ℝ) in c..a, f x ∂μ = 0\n[PROOFSTEP]\nhave hac := hab.trans hbc\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ + ∫ (x : ℝ) in b..c, f x ∂μ + ∫ (x : ℝ) in c..a, f x ∂μ = 0\n[PROOFSTEP]\nsimp only [intervalIntegral, sub_add_sub_comm, sub_eq_zero]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ ∫ (x : ℝ) in Ioc a b, f x ∂μ + ∫ (x : ℝ) in Ioc b c, f x ∂μ + ∫ (x : ℝ) in Ioc c a, f x ∂μ =\n    ∫ (x : ℝ) in Ioc b a, f x ∂μ + ∫ (x : ℝ) in Ioc c b, f x ∂μ + ∫ (x : ℝ) in Ioc a c, f x ∂μ\n[PROOFSTEP]\niterate 4 rw [← integral_union]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ ∫ (x : ℝ) in Ioc a b, f x ∂μ + ∫ (x : ℝ) in Ioc b c, f x ∂μ + ∫ (x : ℝ) in Ioc c a, f x ∂μ =\n    ∫ (x : ℝ) in Ioc b a, f x ∂μ + ∫ (x : ℝ) in Ioc c b, f x ∂μ + ∫ (x : ℝ) in Ioc a c, f x ∂μ\n[PROOFSTEP]\nrw [← integral_union]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ ∫ (x : ℝ) in Ioc a b ∪ Ioc b c, f x ∂μ + ∫ (x : ℝ) in Ioc c a, f x ∂μ =\n    ∫ (x : ℝ) in Ioc b a, f x ∂μ + ∫ (x : ℝ) in Ioc c b, f x ∂μ + ∫ (x : ℝ) in Ioc a c, f x ∂μ\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc a b) (Ioc b c)\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc b c)\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc a b)\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc b c)\n[PROOFSTEP]\nrw [← integral_union]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ ∫ (x : ℝ) in Ioc a b ∪ Ioc b c ∪ Ioc c a, f x ∂μ =\n    ∫ (x : ℝ) in Ioc b a, f x ∂μ + ∫ (x : ℝ) in Ioc c b, f x ∂μ + ∫ (x : ℝ) in Ioc a c, f x ∂μ\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc a b ∪ Ioc b c) (Ioc c a)\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc c a)\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc a b ∪ Ioc b c)\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc c a)\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc a b) (Ioc b c)\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc b c)\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc a b)\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc b c)\n[PROOFSTEP]\nrw [← integral_union]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ ∫ (x : ℝ) in Ioc a b ∪ Ioc b c ∪ Ioc c a, f x ∂μ =\n    ∫ (x : ℝ) in Ioc b a ∪ Ioc c b, f x ∂μ + ∫ (x : ℝ) in Ioc a c, f x ∂μ\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc b a) (Ioc c b)\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc c b)\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc b a)\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc c b)\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc a b ∪ Ioc b c) (Ioc c a)\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc c a)\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc a b ∪ Ioc b c)\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc c a)\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc a b) (Ioc b c)\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc b c)\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc a b)\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc b c)\n[PROOFSTEP]\nrw [← integral_union]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ ∫ (x : ℝ) in Ioc a b ∪ Ioc b c ∪ Ioc c a, f x ∂μ = ∫ (x : ℝ) in Ioc b a ∪ Ioc c b ∪ Ioc a c, f x ∂μ\n[PROOFSTEP]\nsuffices Ioc a b ∪ Ioc b c ∪ Ioc c a = Ioc b a ∪ Ioc c b ∪ Ioc a c by rw [this]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\nthis : Ioc a b ∪ Ioc b c ∪ Ioc c a = Ioc b a ∪ Ioc c b ∪ Ioc a c\n⊢ ∫ (x : ℝ) in Ioc a b ∪ Ioc b c ∪ Ioc c a, f x ∂μ = ∫ (x : ℝ) in Ioc b a ∪ Ioc c b ∪ Ioc a c, f x ∂μ\n[PROOFSTEP]\nrw [this]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Ioc a b ∪ Ioc b c ∪ Ioc c a = Ioc b a ∪ Ioc c b ∪ Ioc a c\n[PROOFSTEP]\nrw [Ioc_union_Ioc_union_Ioc_cycle, union_right_comm, Ioc_union_Ioc_union_Ioc_cycle, min_left_comm, max_left_comm]\n[GOAL]\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc b a ∪ Ioc c b) (Ioc a c)\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc a c)\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc b a ∪ Ioc c b)\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc a c)\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc b a) (Ioc c b)\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc c b)\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc b a)\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc c b)\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc a b ∪ Ioc b c) (Ioc c a)\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc c a)\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc a b ∪ Ioc b c)\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc c a)\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc a b) (Ioc b c)\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc b c)\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc a b)\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc b c)\n[PROOFSTEP]\nall_goals\n  simp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2,\n    hbc.1, hbc.2, hac.1, hac.2]\n[GOAL]\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc b a ∪ Ioc c b) (Ioc a c)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc a c)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc b a ∪ Ioc c b)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc a c)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc b a) (Ioc c b)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc c b)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc b a)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc c b)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc a b ∪ Ioc b c) (Ioc c a)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc c a)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc a b ∪ Ioc b c)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc c a)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase hst\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ Disjoint (Ioc a b) (Ioc b c)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ MeasurableSet (Ioc b c)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc a b)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\nhac : IntervalIntegrable f μ a c\n⊢ IntegrableOn (fun x => f x) (Ioc b c)\n[PROOFSTEP]\nsimp [*, MeasurableSet.union, measurableSet_Ioc, Ioc_disjoint_Ioc_same, Ioc_disjoint_Ioc_same.symm, hab.1, hab.2, hbc.1,\n  hbc.2, hac.1, hac.2]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhbc : IntervalIntegrable f μ b c\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ + ∫ (x : ℝ) in b..c, f x ∂μ = ∫ (x : ℝ) in a..c, f x ∂μ\n[PROOFSTEP]\nrw [← add_neg_eq_zero, ← integral_symm, integral_add_adjacent_intervals_cancel hab hbc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\nhint : ∀ (k : ℕ), k ∈ Ico m n → IntervalIntegrable f μ (a k) (a (k + 1))\n⊢ ∑ k in Finset.Ico m n, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a n, f x ∂μ\n[PROOFSTEP]\nrevert hint\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\n⊢ (∀ (k : ℕ), k ∈ Ico m n → IntervalIntegrable f μ (a k) (a (k + 1))) →\n    ∑ k in Finset.Ico m n, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a n, f x ∂μ\n[PROOFSTEP]\nrefine' Nat.le_induction _ _ n hmn\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\n⊢ (∀ (k : ℕ), k ∈ Ico m m → IntervalIntegrable f μ (a k) (a (k + 1))) →\n    ∑ k in Finset.Ico m m, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a m, f x ∂μ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\n⊢ ∀ (n : ℕ),\n    m ≤ n →\n      ((∀ (k : ℕ), k ∈ Ico m n → IntervalIntegrable f μ (a k) (a (k + 1))) →\n          ∑ k in Finset.Ico m n, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a n, f x ∂μ) →\n        (∀ (k : ℕ), k ∈ Ico m (n + 1) → IntervalIntegrable f μ (a k) (a (k + 1))) →\n          ∑ k in Finset.Ico m (n + 1), ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a (n + 1), f x ∂μ\n[PROOFSTEP]\nintro p hmp IH h\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\np : ℕ\nhmp : m ≤ p\nIH :\n  (∀ (k : ℕ), k ∈ Ico m p → IntervalIntegrable f μ (a k) (a (k + 1))) →\n    ∑ k in Finset.Ico m p, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a p, f x ∂μ\nh : ∀ (k : ℕ), k ∈ Ico m (p + 1) → IntervalIntegrable f μ (a k) (a (k + 1))\n⊢ ∑ k in Finset.Ico m (p + 1), ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a (p + 1), f x ∂μ\n[PROOFSTEP]\nrw [Finset.sum_Ico_succ_top hmp, IH, integral_add_adjacent_intervals]\n[GOAL]\ncase refine'_2.hab\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\np : ℕ\nhmp : m ≤ p\nIH :\n  (∀ (k : ℕ), k ∈ Ico m p → IntervalIntegrable f μ (a k) (a (k + 1))) →\n    ∑ k in Finset.Ico m p, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a p, f x ∂μ\nh : ∀ (k : ℕ), k ∈ Ico m (p + 1) → IntervalIntegrable f μ (a k) (a (k + 1))\n⊢ IntervalIntegrable (fun x => f x) μ (a m) (a p)\n[PROOFSTEP]\nrefine IntervalIntegrable.trans_iterate_Ico hmp fun k hk => h k ?_\n[GOAL]\ncase refine'_2.hab\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\np : ℕ\nhmp : m ≤ p\nIH :\n  (∀ (k : ℕ), k ∈ Ico m p → IntervalIntegrable f μ (a k) (a (k + 1))) →\n    ∑ k in Finset.Ico m p, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a p, f x ∂μ\nh : ∀ (k : ℕ), k ∈ Ico m (p + 1) → IntervalIntegrable f μ (a k) (a (k + 1))\nk : ℕ\nhk : k ∈ Ico m p\n⊢ k ∈ Ico m (p + 1)\n[PROOFSTEP]\nexact (Ico_subset_Ico le_rfl (Nat.le_succ _)) hk\n[GOAL]\ncase refine'_2.hbc\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\np : ℕ\nhmp : m ≤ p\nIH :\n  (∀ (k : ℕ), k ∈ Ico m p → IntervalIntegrable f μ (a k) (a (k + 1))) →\n    ∑ k in Finset.Ico m p, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a p, f x ∂μ\nh : ∀ (k : ℕ), k ∈ Ico m (p + 1) → IntervalIntegrable f μ (a k) (a (k + 1))\n⊢ IntervalIntegrable (fun x => f x) μ (a p) (a (p + 1))\n[PROOFSTEP]\napply h\n[GOAL]\ncase refine'_2.hbc.a\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\np : ℕ\nhmp : m ≤ p\nIH :\n  (∀ (k : ℕ), k ∈ Ico m p → IntervalIntegrable f μ (a k) (a (k + 1))) →\n    ∑ k in Finset.Ico m p, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a p, f x ∂μ\nh : ∀ (k : ℕ), k ∈ Ico m (p + 1) → IntervalIntegrable f μ (a k) (a (k + 1))\n⊢ p ∈ Ico m (p + 1)\n[PROOFSTEP]\nsimp [hmp]\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\np : ℕ\nhmp : m ≤ p\nIH :\n  (∀ (k : ℕ), k ∈ Ico m p → IntervalIntegrable f μ (a k) (a (k + 1))) →\n    ∑ k in Finset.Ico m p, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a p, f x ∂μ\nh : ∀ (k : ℕ), k ∈ Ico m (p + 1) → IntervalIntegrable f μ (a k) (a (k + 1))\n⊢ ∀ (k : ℕ), k ∈ Ico m p → IntervalIntegrable f μ (a k) (a (k + 1))\n[PROOFSTEP]\nintro k hk\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nm n : ℕ\nhmn : m ≤ n\np : ℕ\nhmp : m ≤ p\nIH :\n  (∀ (k : ℕ), k ∈ Ico m p → IntervalIntegrable f μ (a k) (a (k + 1))) →\n    ∑ k in Finset.Ico m p, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a p, f x ∂μ\nh : ∀ (k : ℕ), k ∈ Ico m (p + 1) → IntervalIntegrable f μ (a k) (a (k + 1))\nk : ℕ\nhk : k ∈ Ico m p\n⊢ IntervalIntegrable f μ (a k) (a (k + 1))\n[PROOFSTEP]\nexact h _ (Ico_subset_Ico_right p.le_succ hk)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nn : ℕ\nhint : ∀ (k : ℕ), k < n → IntervalIntegrable f μ (a k) (a (k + 1))\n⊢ ∑ k in Finset.range n, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a 0 ..a n, f x ∂μ\n[PROOFSTEP]\nrw [← Nat.Ico_zero_eq_range]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na : ℕ → ℝ\nn : ℕ\nhint : ∀ (k : ℕ), k < n → IntervalIntegrable f μ (a k) (a (k + 1))\n⊢ ∑ k in Finset.Ico 0 n, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a 0 ..a n, f x ∂μ\n[PROOFSTEP]\nexact sum_integral_adjacent_intervals_Ico (zero_le n) fun k hk => hint k hk.2\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhcd : IntervalIntegrable f μ c d\nhac : IntervalIntegrable f μ a c\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ + ∫ (x : ℝ) in c..d, f x ∂μ = ∫ (x : ℝ) in a..d, f x ∂μ + ∫ (x : ℝ) in c..b, f x ∂μ\n[PROOFSTEP]\nrw [← integral_add_adjacent_intervals hac hcd, add_assoc, add_left_comm,\n  integral_add_adjacent_intervals hac (hac.symm.trans hab), add_comm]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhcd : IntervalIntegrable f μ c d\nhac : IntervalIntegrable f μ a c\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ - ∫ (x : ℝ) in c..d, f x ∂μ = ∫ (x : ℝ) in a..c, f x ∂μ - ∫ (x : ℝ) in b..d, f x ∂μ\n[PROOFSTEP]\nsimp only [sub_eq_add_neg, ← integral_symm, integral_interval_add_interval_comm hab hcd.symm (hac.trans hcd)]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nhab : IntervalIntegrable f μ a b\nhcd : IntervalIntegrable f μ c d\nhac : IntervalIntegrable f μ a c\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ - ∫ (x : ℝ) in c..d, f x ∂μ = ∫ (x : ℝ) in d..b, f x ∂μ - ∫ (x : ℝ) in c..a, f x ∂μ\n[PROOFSTEP]\nrw [integral_interval_sub_interval_comm hab hcd hac, integral_symm b d, integral_symm a c, sub_neg_eq_add,\n  sub_eq_neg_add]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nha : IntegrableOn f (Iic a)\nhb : IntegrableOn f (Iic b)\n⊢ ∫ (x : ℝ) in Iic b, f x ∂μ - ∫ (x : ℝ) in Iic a, f x ∂μ = ∫ (x : ℝ) in a..b, f x ∂μ\n[PROOFSTEP]\nwlog hab : a ≤ b generalizing a b\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nha : IntegrableOn f (Iic a)\nhb : IntegrableOn f (Iic b)\nthis :\n  ∀ {a b : ℝ},\n    IntegrableOn f (Iic a) →\n      IntegrableOn f (Iic b) →\n        a ≤ b → ∫ (x : ℝ) in Iic b, f x ∂μ - ∫ (x : ℝ) in Iic a, f x ∂μ = ∫ (x : ℝ) in a..b, f x ∂μ\nhab : ¬a ≤ b\n⊢ ∫ (x : ℝ) in Iic b, f x ∂μ - ∫ (x : ℝ) in Iic a, f x ∂μ = ∫ (x : ℝ) in a..b, f x ∂μ\n[PROOFSTEP]\nrw [integral_symm, ← this hb ha (le_of_not_le hab), neg_sub]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na b : ℝ\nha : IntegrableOn f (Iic a)\nhb : IntegrableOn f (Iic b)\nhab : a ≤ b\n⊢ ∫ (x : ℝ) in Iic b, f x ∂μ - ∫ (x : ℝ) in Iic a, f x ∂μ = ∫ (x : ℝ) in a..b, f x ∂μ\n[PROOFSTEP]\nrw [sub_eq_iff_eq_add', integral_of_le hab, ← integral_union (Iic_disjoint_Ioc le_rfl), Iic_union_Ioc_eq_Iic hab]\n[GOAL]\ncase ht\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na b : ℝ\nha : IntegrableOn f (Iic a)\nhb : IntegrableOn f (Iic b)\nhab : a ≤ b\n⊢ MeasurableSet (Ioc a b)\ncase hfs\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na b : ℝ\nha : IntegrableOn f (Iic a)\nhb : IntegrableOn f (Iic b)\nhab : a ≤ b\n⊢ IntegrableOn (fun x => f x) (Iic a)\ncase hft\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na b : ℝ\nha : IntegrableOn f (Iic a)\nhb : IntegrableOn f (Iic b)\nhab : a ≤ b\n⊢ IntegrableOn (fun x => f x) (Ioc a b)\n[PROOFSTEP]\nexacts [measurableSet_Ioc, ha, hb.mono_set fun _ => And.right]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c✝ d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\ninst✝ : IsFiniteMeasure μ\nc : E\n⊢ ∫ (x : ℝ) in a..b, c ∂μ = (ENNReal.toReal (↑↑μ (Iic b)) - ENNReal.toReal (↑↑μ (Iic a))) • c\n[PROOFSTEP]\nsimp only [sub_smul, ← set_integral_const]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c✝ d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\ninst✝ : IsFiniteMeasure μ\nc : E\n⊢ ∫ (x : ℝ) in a..b, c ∂μ = ∫ (x : ℝ) in Iic b, c ∂μ - ∫ (x : ℝ) in Iic a, c ∂μ\n[PROOFSTEP]\nrefine' (integral_Iic_sub_Iic _ _).symm\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c✝ d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\ninst✝ : IsFiniteMeasure μ\nc : E\n⊢ IntegrableOn (fun x => c) (Iic a)\n[PROOFSTEP]\nsimp only [integrableOn_const, measure_lt_top, or_true_iff]\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c✝ d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\ninst✝ : IsFiniteMeasure μ\nc : E\n⊢ IntegrableOn (fun x => c) (Iic b)\n[PROOFSTEP]\nsimp only [integrableOn_const, measure_lt_top, or_true_iff]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na b : ℝ\nh : support f ⊆ Ioc a b\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ), f x ∂μ\n[PROOFSTEP]\ncases' le_total a b with hab hab\n[GOAL]\ncase inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na b : ℝ\nh : support f ⊆ Ioc a b\nhab : a ≤ b\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ), f x ∂μ\n[PROOFSTEP]\nrw [integral_of_le hab, ← integral_indicator measurableSet_Ioc, indicator_eq_self.2 h]\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na b : ℝ\nh : support f ⊆ Ioc a b\nhab : b ≤ a\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ), f x ∂μ\n[PROOFSTEP]\nrw [Ioc_eq_empty hab.not_lt, subset_empty_iff, support_eq_empty_iff] at h \n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na✝ b✝ c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na b : ℝ\nh : f = 0\nhab : b ≤ a\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ), f x ∂μ\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nh : ∀ᵐ (x : ℝ) ∂μ, x ∈ Ioc a b → f x = g x\nh' : ∀ᵐ (x : ℝ) ∂μ, x ∈ Ioc b a → f x = g x\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ) in a..b, g x ∂μ\n[PROOFSTEP]\nsimp only [intervalIntegral, set_integral_congr_ae measurableSet_Ioc h, set_integral_congr_ae measurableSet_Ioc h']\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na₁ a₂ a₃ : ℝ\nh : a₂ ∈ Icc a₁ a₃\n⊢ ∫ (x : ℝ) in a₁..a₃, indicator {x | x ≤ a₂} f x ∂μ = ∫ (x : ℝ) in a₁..a₂, f x ∂μ\n[PROOFSTEP]\nhave : {x | x ≤ a₂} ∩ Ioc a₁ a₃ = Ioc a₁ a₂ := Iic_inter_Ioc_of_le h.2\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na₁ a₂ a₃ : ℝ\nh : a₂ ∈ Icc a₁ a₃\nthis : {x | x ≤ a₂} ∩ Ioc a₁ a₃ = Ioc a₁ a₂\n⊢ ∫ (x : ℝ) in a₁..a₃, indicator {x | x ≤ a₂} f x ∂μ = ∫ (x : ℝ) in a₁..a₂, f x ∂μ\n[PROOFSTEP]\nrw [integral_of_le h.1, integral_of_le (h.1.trans h.2), integral_indicator, Measure.restrict_restrict, this]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na₁ a₂ a₃ : ℝ\nh : a₂ ∈ Icc a₁ a₃\nthis : {x | x ≤ a₂} ∩ Ioc a₁ a₃ = Ioc a₁ a₂\n⊢ MeasurableSet {x | x ≤ a₂}\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na₁ a₂ a₃ : ℝ\nh : a₂ ∈ Icc a₁ a₃\nthis : {x | x ≤ a₂} ∩ Ioc a₁ a₃ = Ioc a₁ a₂\n⊢ MeasurableSet {x | x ≤ a₂}\n[PROOFSTEP]\nexact measurableSet_Iic\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na₁ a₂ a₃ : ℝ\nh : a₂ ∈ Icc a₁ a₃\nthis : {x | x ≤ a₂} ∩ Ioc a₁ a₃ = Ioc a₁ a₂\n⊢ MeasurableSet {x | x ≤ a₂}\n[PROOFSTEP]\nall_goals apply measurableSet_Iic\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\na₁ a₂ a₃ : ℝ\nh : a₂ ∈ Icc a₁ a₃\nthis : {x | x ≤ a₂} ∩ Ioc a₁ a₃ = Ioc a₁ a₂\n⊢ MeasurableSet {x | x ≤ a₂}\n[PROOFSTEP]\napply measurableSet_Iic\n[GOAL]\nι✝ : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF✝ : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nι : Type u_6\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nF : ι → ℝ → E\nbound : ℝ → ℝ\nhF_meas : ∀ᶠ (n : ι) in l, AEStronglyMeasurable (F n) (Measure.restrict μ (Ι a b))\nh_bound : ∀ᶠ (n : ι) in l, ∀ᵐ (x : ℝ) ∂μ, x ∈ Ι a b → ‖F n x‖ ≤ bound x\nbound_integrable : IntervalIntegrable bound μ a b\nh_lim : ∀ᵐ (x : ℝ) ∂μ, x ∈ Ι a b → Tendsto (fun n => F n x) l (𝓝 (f x))\n⊢ Tendsto (fun n => ∫ (x : ℝ) in a..b, F n x ∂μ) l (𝓝 (∫ (x : ℝ) in a..b, f x ∂μ))\n[PROOFSTEP]\nsimp only [intervalIntegrable_iff, intervalIntegral_eq_integral_uIoc, ←\n  ae_restrict_iff' (α := ℝ) (μ := μ) measurableSet_uIoc] at *\n[GOAL]\nι✝ : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF✝ : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nι : Type u_6\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nF : ι → ℝ → E\nbound : ℝ → ℝ\nhF_meas : ∀ᶠ (n : ι) in l, AEStronglyMeasurable (F n) (Measure.restrict μ (Ι a b))\nh_bound : ∀ᶠ (n : ι) in l, ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ‖F n x‖ ≤ bound x\nbound_integrable : IntegrableOn bound (Ι a b)\nh_lim : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), Tendsto (fun n => F n x) l (𝓝 (f x))\n⊢ Tendsto (fun n => (if a ≤ b then 1 else -1) • ∫ (x : ℝ) in Ι a b, F n x ∂μ) l\n    (𝓝 ((if a ≤ b then 1 else -1) • ∫ (x : ℝ) in Ι a b, f x ∂μ))\n[PROOFSTEP]\nexact\n  tendsto_const_nhds.smul <|\n    tendsto_integral_filter_of_dominated_convergence bound hF_meas h_bound bound_integrable h_lim\n[GOAL]\nι✝ : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF✝ : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nι : Type u_6\ninst✝ : Countable ι\nF : ι → ℝ → E\nbound : ι → ℝ → ℝ\nhF_meas : ∀ (n : ι), AEStronglyMeasurable (F n) (Measure.restrict μ (Ι a b))\nh_bound : ∀ (n : ι), ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → ‖F n t‖ ≤ bound n t\nbound_summable : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → Summable fun n => bound n t\nbound_integrable : IntervalIntegrable (fun t => ∑' (n : ι), bound n t) μ a b\nh_lim : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → HasSum (fun n => F n t) (f t)\n⊢ HasSum (fun n => ∫ (t : ℝ) in a..b, F n t ∂μ) (∫ (t : ℝ) in a..b, f t ∂μ)\n[PROOFSTEP]\nsimp only [intervalIntegrable_iff, intervalIntegral_eq_integral_uIoc, ←\n  ae_restrict_iff' (α := ℝ) (μ := μ) measurableSet_uIoc] at *\n[GOAL]\nι✝ : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF✝ : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf g : ℝ → E\nμ : Measure ℝ\nι : Type u_6\ninst✝ : Countable ι\nF : ι → ℝ → E\nbound : ι → ℝ → ℝ\nhF_meas : ∀ (n : ι), AEStronglyMeasurable (F n) (Measure.restrict μ (Ι a b))\nh_bound : ∀ (n : ι), ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ‖F n x‖ ≤ bound n x\nbound_summable : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), Summable fun n => bound n x\nbound_integrable : IntegrableOn (fun t => ∑' (n : ι), bound n t) (Ι a b)\nh_lim : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), HasSum (fun n => F n x) (f x)\n⊢ HasSum (fun n => (if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F n t ∂μ)\n    ((if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, f t ∂μ)\n[PROOFSTEP]\nexact\n  (hasSum_integral_of_dominated_convergence bound hF_meas h_bound bound_summable bound_integrable h_lim).const_smul _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\n⊢ HasSum (fun i => ∫ (x : ℝ) in a..b, ↑(f i) x) (∫ (x : ℝ) in a..b, ∑' (i : ι), ↑(f i) x)\n[PROOFSTEP]\napply\n  hasSum_integral_of_dominated_convergence\n    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)\n    (fun i => (map_continuous <| f i).aestronglyMeasurable)\n[GOAL]\ncase h_bound\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\n⊢ ∀ (n : ι),\n    ∀ᵐ (t : ℝ),\n      t ∈ Ι a b →\n        ‖↑(f n) t‖ ≤ ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f n)‖\n[PROOFSTEP]\nrefine fun i => ae_of_all _ fun x hx => ?_\n[GOAL]\ncase h_bound\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\ni : ι\nx : ℝ\nhx : x ∈ Ι a b\n⊢ ‖↑(f i) x‖ ≤ ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\n[PROOFSTEP]\napply ContinuousMap.norm_coe_le_norm ((f i).restrict _) ⟨x, _⟩\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\ni : ι\nx : ℝ\nhx : x ∈ Ι a b\n⊢ x ∈ ↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }\n[PROOFSTEP]\nexact ⟨hx.1.le, hx.2⟩\n[GOAL]\ncase bound_summable\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\n⊢ ∀ᵐ (t : ℝ),\n    t ∈ Ι a b →\n      Summable fun n =>\n        ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f n)‖\n[PROOFSTEP]\nexact ae_of_all _ fun x _ => hf_sum\n[GOAL]\ncase bound_integrable\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\n⊢ IntervalIntegrable\n    (fun t =>\n      ∑' (n : ι), ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f n)‖)\n    volume a b\n[PROOFSTEP]\nexact intervalIntegrable_const\n[GOAL]\ncase h_lim\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\n⊢ ∀ᵐ (t : ℝ), t ∈ Ι a b → HasSum (fun n => ↑(f n) t) (∑' (i : ι), ↑(f i) t)\n[PROOFSTEP]\nrefine ae_of_all _ fun x hx => Summable.hasSum ?_\n[GOAL]\ncase h_lim\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\nx : ℝ\nhx : x ∈ Ι a b\n⊢ Summable fun n => ↑(f n) x\n[PROOFSTEP]\nlet x : (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ) := ⟨x, ?_⟩\n[GOAL]\ncase h_lim.refine_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\nx✝ : ℝ\nhx : x✝ ∈ Ι a b\nx : { x // x ∈ { carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) } } :=\n  { val := x✝, property := ?h_lim.refine_1 }\n⊢ Summable fun n => ↑(f n) x✝\ncase h_lim.refine_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\nx : ℝ\nhx : x ∈ Ι a b\n⊢ x ∈ { carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }\n[PROOFSTEP]\nswap\n[GOAL]\ncase h_lim.refine_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\nx : ℝ\nhx : x ∈ Ι a b\n⊢ x ∈ { carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }\ncase h_lim.refine_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\nx✝ : ℝ\nhx : x✝ ∈ Ι a b\nx : { x // x ∈ { carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) } } :=\n  { val := x✝, property := ?h_lim.refine_1 }\n⊢ Summable fun n => ↑(f n) x✝\n[PROOFSTEP]\nexact ⟨hx.1.le, hx.2⟩\n[GOAL]\ncase h_lim.refine_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\nx✝ : ℝ\nhx : x✝ ∈ Ι a b\nx : { x // x ∈ { carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) } } :=\n  { val := x✝, property := (_ : a ⊓ b ≤ x✝ ∧ x✝ ≤ a ⊔ b) }\n⊢ Summable fun n => ↑(f n) x✝\n[PROOFSTEP]\nhave := summable_of_summable_norm hf_sum\n[GOAL]\ncase h_lim.refine_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b c d : ℝ\nf✝ g : ℝ → E\nμ : Measure ℝ\ninst✝ : Countable ι\nf : ι → C(ℝ, E)\nhf_sum :\n  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖\nx✝ : ℝ\nhx : x✝ ∈ Ι a b\nx : { x // x ∈ { carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) } } :=\n  { val := x✝, property := (_ : a ⊓ b ≤ x✝ ∧ x✝ ≤ a ⊔ b) }\nthis :\n  Summable fun a_1 => ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f a_1)\n⊢ Summable fun n => ↑(f n) x✝\n[PROOFSTEP]\nsimpa only [Compacts.coe_mk, ContinuousMap.restrict_apply] using ContinuousMap.summable_apply this x\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\n⊢ ContinuousWithinAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nby_cases h₀ : b₀ ∈ Icc b₁ b₂\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\n⊢ ContinuousWithinAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nhave h₁₂ : b₁ ≤ b₂ := h₀.1.trans h₀.2\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\n⊢ ContinuousWithinAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nhave min₁₂ : min b₁ b₂ = b₁ := min_eq_left h₁₂\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\n⊢ ContinuousWithinAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nhave h_int' : ∀ {x}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x :=\n  by\n  rintro x ⟨h₁, h₂⟩\n  apply h_int.mono_set\n  apply uIcc_subset_uIcc\n  · exact ⟨min_le_of_left_le (min_le_right a b₁), h₁.trans (h₂.trans <| le_max_of_le_right <| le_max_right _ _)⟩\n  · exact ⟨min_le_of_left_le <| (min_le_right _ _).trans h₁, le_max_of_le_right <| h₂.trans <| le_max_right _ _⟩\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\n⊢ ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\n[PROOFSTEP]\nrintro x ⟨h₁, h₂⟩\n[GOAL]\ncase intro\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nx : ℝ\nh₁ : b₁ ≤ x\nh₂ : x ≤ b₂\n⊢ IntervalIntegrable f μ b₁ x\n[PROOFSTEP]\napply h_int.mono_set\n[GOAL]\ncase intro\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nx : ℝ\nh₁ : b₁ ≤ x\nh₂ : x ≤ b₂\n⊢ [[b₁, x]] ⊆ [[min a b₁, max a b₂]]\n[PROOFSTEP]\napply uIcc_subset_uIcc\n[GOAL]\ncase intro.h₁\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nx : ℝ\nh₁ : b₁ ≤ x\nh₂ : x ≤ b₂\n⊢ b₁ ∈ [[min a b₁, max a b₂]]\n[PROOFSTEP]\nexact ⟨min_le_of_left_le (min_le_right a b₁), h₁.trans (h₂.trans <| le_max_of_le_right <| le_max_right _ _)⟩\n[GOAL]\ncase intro.h₂\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nx : ℝ\nh₁ : b₁ ≤ x\nh₂ : x ≤ b₂\n⊢ x ∈ [[min a b₁, max a b₂]]\n[PROOFSTEP]\nexact ⟨min_le_of_left_le <| (min_le_right _ _).trans h₁, le_max_of_le_right <| h₂.trans <| le_max_right _ _⟩\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\n⊢ ContinuousWithinAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nhave : ∀ b ∈ Icc b₁ b₂, ∫ x in a..b, f x ∂μ = (∫ x in a..b₁, f x ∂μ) + ∫ x in b₁..b, f x ∂μ :=\n  by\n  rintro b ⟨h₁, h₂⟩\n  rw [← integral_add_adjacent_intervals _ (h_int' ⟨h₁, h₂⟩)]\n  apply h_int.mono_set\n  apply uIcc_subset_uIcc\n  · exact ⟨min_le_of_left_le (min_le_left a b₁), le_max_of_le_right (le_max_left _ _)⟩\n  · exact ⟨min_le_of_left_le (min_le_right _ _), le_max_of_le_right (h₁.trans <| h₂.trans (le_max_right a b₂))⟩\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\n⊢ ∀ (b : ℝ), b ∈ Icc b₁ b₂ → ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ) in a..b₁, f x ∂μ + ∫ (x : ℝ) in b₁..b, f x ∂μ\n[PROOFSTEP]\nrintro b ⟨h₁, h₂⟩\n[GOAL]\ncase intro\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b✝ b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nb : ℝ\nh₁ : b₁ ≤ b\nh₂ : b ≤ b₂\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ) in a..b₁, f x ∂μ + ∫ (x : ℝ) in b₁..b, f x ∂μ\n[PROOFSTEP]\nrw [← integral_add_adjacent_intervals _ (h_int' ⟨h₁, h₂⟩)]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b✝ b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nb : ℝ\nh₁ : b₁ ≤ b\nh₂ : b ≤ b₂\n⊢ IntervalIntegrable f μ a b₁\n[PROOFSTEP]\napply h_int.mono_set\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b✝ b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nb : ℝ\nh₁ : b₁ ≤ b\nh₂ : b ≤ b₂\n⊢ [[a, b₁]] ⊆ [[min a b₁, max a b₂]]\n[PROOFSTEP]\napply uIcc_subset_uIcc\n[GOAL]\ncase h₁\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b✝ b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nb : ℝ\nh₁ : b₁ ≤ b\nh₂ : b ≤ b₂\n⊢ a ∈ [[min a b₁, max a b₂]]\n[PROOFSTEP]\nexact ⟨min_le_of_left_le (min_le_left a b₁), le_max_of_le_right (le_max_left _ _)⟩\n[GOAL]\ncase h₂\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b✝ b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nb : ℝ\nh₁ : b₁ ≤ b\nh₂ : b ≤ b₂\n⊢ b₁ ∈ [[min a b₁, max a b₂]]\n[PROOFSTEP]\nexact ⟨min_le_of_left_le (min_le_right _ _), le_max_of_le_right (h₁.trans <| h₂.trans (le_max_right a b₂))⟩\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis : ∀ (b : ℝ), b ∈ Icc b₁ b₂ → ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ) in a..b₁, f x ∂μ + ∫ (x : ℝ) in b₁..b, f x ∂μ\n⊢ ContinuousWithinAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\napply ContinuousWithinAt.congr _ this (this _ h₀)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis : ∀ (b : ℝ), b ∈ Icc b₁ b₂ → ∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ) in a..b₁, f x ∂μ + ∫ (x : ℝ) in b₁..b, f x ∂μ\n⊢ ContinuousWithinAt (fun y => ∫ (x : ℝ) in a..b₁, f x ∂μ + ∫ (x : ℝ) in b₁..y, f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nclear this\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\n⊢ ContinuousWithinAt (fun y => ∫ (x : ℝ) in a..b₁, f x ∂μ + ∫ (x : ℝ) in b₁..y, f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nrefine' continuousWithinAt_const.add _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\n⊢ ContinuousWithinAt (fun y => ∫ (x : ℝ) in b₁..y, f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nhave : (fun b => ∫ x in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ x in b₁..b₂, indicator {x | x ≤ b} f x ∂μ :=\n  by\n  apply eventuallyEq_of_mem self_mem_nhdsWithin\n  exact fun b b_in => (integral_indicator b_in).symm\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\n⊢ (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\n[PROOFSTEP]\napply eventuallyEq_of_mem self_mem_nhdsWithin\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\n⊢ EqOn (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) (fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ) (Icc b₁ b₂)\n[PROOFSTEP]\nexact fun b b_in => (integral_indicator b_in).symm\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\n⊢ ContinuousWithinAt (fun y => ∫ (x : ℝ) in b₁..y, f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\napply ContinuousWithinAt.congr_of_eventuallyEq _ this (integral_indicator h₀).symm\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\n⊢ ContinuousWithinAt (fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nhave : IntervalIntegrable (fun x => ‖f x‖) μ b₁ b₂ := IntervalIntegrable.norm (h_int' <| right_mem_Icc.mpr h₁₂)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : IntervalIntegrable (fun x => ‖f x‖) μ b₁ b₂\n⊢ ContinuousWithinAt (fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nrefine' continuousWithinAt_of_dominated_interval _ _ this _\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : IntervalIntegrable (fun x => ‖f x‖) μ b₁ b₂\n⊢ ∀ᶠ (x : ℝ) in 𝓝[Icc b₁ b₂] b₀,\n    AEStronglyMeasurable (fun x_1 => indicator {x_2 | x_2 ≤ x} f x_1) (Measure.restrict μ (Ι b₁ b₂))\n[PROOFSTEP]\nclear this\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : IntervalIntegrable (fun x => ‖f x‖) μ b₁ b₂\n⊢ ∀ᶠ (x : ℝ) in 𝓝[Icc b₁ b₂] b₀, ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι b₁ b₂ → ‖indicator {x_1 | x_1 ≤ x} f t‖ ≤ ‖f t‖\n[PROOFSTEP]\nclear this\n[GOAL]\ncase refine'_3\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : IntervalIntegrable (fun x => ‖f x‖) μ b₁ b₂\n⊢ ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι b₁ b₂ → ContinuousWithinAt (fun x => indicator {x_1 | x_1 ≤ x} f t) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nclear this\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\n⊢ ∀ᶠ (x : ℝ) in 𝓝[Icc b₁ b₂] b₀,\n    AEStronglyMeasurable (fun x_1 => indicator {x_2 | x_2 ≤ x} f x_1) (Measure.restrict μ (Ι b₁ b₂))\n[PROOFSTEP]\napply Eventually.mono self_mem_nhdsWithin\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\n⊢ ∀ (x : ℝ),\n    b₁ ≤ x ∧ x ≤ b₂ → AEStronglyMeasurable (fun x_1 => indicator {x_2 | x_2 ≤ x} f x_1) (Measure.restrict μ (Ι b₁ b₂))\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nx : ℝ\nhx : b₁ ≤ x ∧ x ≤ b₂\n⊢ AEStronglyMeasurable (fun x_1 => indicator {x_2 | x_2 ≤ x} f x_1) (Measure.restrict μ (Ι b₁ b₂))\n[PROOFSTEP]\nerw [aestronglyMeasurable_indicator_iff, Measure.restrict_restrict, Iic_inter_Ioc_of_le]\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nx : ℝ\nhx : b₁ ≤ x ∧ x ≤ b₂\n⊢ AEStronglyMeasurable f (Measure.restrict μ (Ioc (min b₁ b₂) x))\n[PROOFSTEP]\nrw [min₁₂]\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nx : ℝ\nhx : b₁ ≤ x ∧ x ≤ b₂\n⊢ AEStronglyMeasurable f (Measure.restrict μ (Ioc b₁ x))\n[PROOFSTEP]\nexact (h_int' hx).1.aestronglyMeasurable\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nx : ℝ\nhx : b₁ ≤ x ∧ x ≤ b₂\n⊢ x ≤ max b₁ b₂\n[PROOFSTEP]\nexact le_max_of_le_right hx.2\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nx : ℝ\nhx : b₁ ≤ x ∧ x ≤ b₂\n⊢ MeasurableSet {x_1 | x_1 ≤ x}\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nx : ℝ\nhx : b₁ ≤ x ∧ x ≤ b₂\n⊢ MeasurableSet {x_1 | x_1 ≤ x}\n[PROOFSTEP]\nexacts [measurableSet_Iic, measurableSet_Iic]\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\n⊢ ∀ᶠ (x : ℝ) in 𝓝[Icc b₁ b₂] b₀, ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι b₁ b₂ → ‖indicator {x_1 | x_1 ≤ x} f t‖ ≤ ‖f t‖\n[PROOFSTEP]\nrefine' eventually_of_forall fun x => eventually_of_forall fun t => _\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nx t : ℝ\n⊢ t ∈ Ι b₁ b₂ → ‖indicator {x_1 | x_1 ≤ x} f t‖ ≤ ‖f t‖\n[PROOFSTEP]\ndsimp [indicator]\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nx t : ℝ\n⊢ t ∈ Ι b₁ b₂ → ‖if t ≤ x then f t else 0‖ ≤ ‖f t‖\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nx t : ℝ\nh✝ : t ≤ x\n⊢ t ∈ Ι b₁ b₂ → ‖f t‖ ≤ ‖f t‖\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nx t : ℝ\nh✝ : ¬t ≤ x\n⊢ t ∈ Ι b₁ b₂ → ‖0‖ ≤ ‖f t‖\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\n⊢ ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι b₁ b₂ → ContinuousWithinAt (fun x => indicator {x_1 | x_1 ≤ x} f t) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nhave : ∀ᵐ t ∂μ, t < b₀ ∨ b₀ < t := by\n  apply Eventually.mono (compl_mem_ae_iff.mpr hb₀)\n  intro x hx\n  exact Ne.lt_or_lt hx\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\n⊢ ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\n[PROOFSTEP]\napply Eventually.mono (compl_mem_ae_iff.mpr hb₀)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\n⊢ ∀ (x : ℝ), ¬x ∈ {b₀} → x < b₀ ∨ b₀ < x\n[PROOFSTEP]\nintro x hx\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nx : ℝ\nhx : ¬x ∈ {b₀}\n⊢ x < b₀ ∨ b₀ < x\n[PROOFSTEP]\nexact Ne.lt_or_lt hx\n[GOAL]\ncase refine'_3\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\n⊢ ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι b₁ b₂ → ContinuousWithinAt (fun x => indicator {x_1 | x_1 ≤ x} f t) (Icc b₁ b₂) b₀\n[PROOFSTEP]\napply this.mono\n[GOAL]\ncase refine'_3\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\n⊢ ∀ (x : ℝ), x < b₀ ∨ b₀ < x → x ∈ Ι b₁ b₂ → ContinuousWithinAt (fun x_1 => indicator {x | x ≤ x_1} f x) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nrintro x₀ (hx₀ | hx₀) -\n[GOAL]\ncase refine'_3.inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : x₀ < b₀\n⊢ ContinuousWithinAt (fun x => indicator {x_1 | x_1 ≤ x} f x₀) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nhave : ∀ᶠ x in 𝓝[Icc b₁ b₂] b₀, {t : ℝ | t ≤ x}.indicator f x₀ = f x₀ :=\n  by\n  apply mem_nhdsWithin_of_mem_nhds\n  apply Eventually.mono (Ioi_mem_nhds hx₀)\n  intro x hx\n  simp [hx.le]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : x₀ < b₀\n⊢ ∀ᶠ (x : ℝ) in 𝓝[Icc b₁ b₂] b₀, indicator {t | t ≤ x} f x₀ = f x₀\n[PROOFSTEP]\napply mem_nhdsWithin_of_mem_nhds\n[GOAL]\ncase h\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : x₀ < b₀\n⊢ {x | (fun x => indicator {t | t ≤ x} f x₀ = f x₀) x} ∈ 𝓝 b₀\n[PROOFSTEP]\napply Eventually.mono (Ioi_mem_nhds hx₀)\n[GOAL]\ncase h\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : x₀ < b₀\n⊢ ∀ (x : ℝ), x₀ < x → indicator {t | t ≤ x} f x₀ = f x₀\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : x₀ < b₀\nx : ℝ\nhx : x₀ < x\n⊢ indicator {t | t ≤ x} f x₀ = f x₀\n[PROOFSTEP]\nsimp [hx.le]\n[GOAL]\ncase refine'_3.inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝¹ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis✝ : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : x₀ < b₀\nthis : ∀ᶠ (x : ℝ) in 𝓝[Icc b₁ b₂] b₀, indicator {t | t ≤ x} f x₀ = f x₀\n⊢ ContinuousWithinAt (fun x => indicator {x_1 | x_1 ≤ x} f x₀) (Icc b₁ b₂) b₀\n[PROOFSTEP]\napply continuousWithinAt_const.congr_of_eventuallyEq this\n[GOAL]\ncase refine'_3.inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝¹ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis✝ : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : x₀ < b₀\nthis : ∀ᶠ (x : ℝ) in 𝓝[Icc b₁ b₂] b₀, indicator {t | t ≤ x} f x₀ = f x₀\n⊢ indicator {t | t ≤ b₀} f x₀ = f x₀\n[PROOFSTEP]\nsimp [hx₀.le]\n[GOAL]\ncase refine'_3.inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : b₀ < x₀\n⊢ ContinuousWithinAt (fun x => indicator {x_1 | x_1 ≤ x} f x₀) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nhave : ∀ᶠ x in 𝓝[Icc b₁ b₂] b₀, {t : ℝ | t ≤ x}.indicator f x₀ = 0 :=\n  by\n  apply mem_nhdsWithin_of_mem_nhds\n  apply Eventually.mono (Iio_mem_nhds hx₀)\n  intro x hx\n  simp [hx]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : b₀ < x₀\n⊢ ∀ᶠ (x : ℝ) in 𝓝[Icc b₁ b₂] b₀, indicator {t | t ≤ x} f x₀ = 0\n[PROOFSTEP]\napply mem_nhdsWithin_of_mem_nhds\n[GOAL]\ncase h\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : b₀ < x₀\n⊢ {x | (fun x => indicator {t | t ≤ x} f x₀ = 0) x} ∈ 𝓝 b₀\n[PROOFSTEP]\napply Eventually.mono (Iio_mem_nhds hx₀)\n[GOAL]\ncase h\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : b₀ < x₀\n⊢ ∀ (x : ℝ), x < x₀ → indicator {t | t ≤ x} f x₀ = 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : b₀ < x₀\nx : ℝ\nhx : x < x₀\n⊢ indicator {t | t ≤ x} f x₀ = 0\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase refine'_3.inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝¹ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis✝ : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : b₀ < x₀\nthis : ∀ᶠ (x : ℝ) in 𝓝[Icc b₁ b₂] b₀, indicator {t | t ≤ x} f x₀ = 0\n⊢ ContinuousWithinAt (fun x => indicator {x_1 | x_1 ≤ x} f x₀) (Icc b₁ b₂) b₀\n[PROOFSTEP]\napply continuousWithinAt_const.congr_of_eventuallyEq this\n[GOAL]\ncase refine'_3.inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : b₀ ∈ Icc b₁ b₂\nh₁₂ : b₁ ≤ b₂\nmin₁₂ : min b₁ b₂ = b₁\nh_int' : ∀ {x : ℝ}, x ∈ Icc b₁ b₂ → IntervalIntegrable f μ b₁ x\nthis✝¹ :\n  (fun b => ∫ (x : ℝ) in b₁..b, f x ∂μ) =ᶠ[𝓝[Icc b₁ b₂] b₀] fun b => ∫ (x : ℝ) in b₁..b₂, indicator {x | x ≤ b} f x ∂μ\nthis✝ : ∀ᵐ (t : ℝ) ∂μ, t < b₀ ∨ b₀ < t\nx₀ : ℝ\nhx₀ : b₀ < x₀\nthis : ∀ᶠ (x : ℝ) in 𝓝[Icc b₁ b₂] b₀, indicator {t | t ≤ x} f x₀ = 0\n⊢ indicator {t | t ≤ b₀} f x₀ = 0\n[PROOFSTEP]\nsimp [hx₀]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : ¬b₀ ∈ Icc b₁ b₂\n⊢ ContinuousWithinAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\napply continuousWithinAt_of_not_mem_closure\n[GOAL]\ncase neg.a\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\nhb₀ : ↑↑μ {b₀} = 0\nh_int : IntervalIntegrable f μ (min a b₁) (max a b₂)\nh₀ : ¬b₀ ∈ Icc b₁ b₂\n⊢ ¬b₀ ∈ closure (Icc b₁ b₂)\n[PROOFSTEP]\nrwa [closure_Icc]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\n⊢ ContinuousOn (fun x => ∫ (t : ℝ) in Ioc a x, f t ∂μ) (Icc a b)\n[PROOFSTEP]\nby_cases h : a ≤ b\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\nh : a ≤ b\n⊢ ContinuousOn (fun x => ∫ (t : ℝ) in Ioc a x, f t ∂μ) (Icc a b)\n[PROOFSTEP]\nhave : ∀ x ∈ Icc a b, ∫ t in Ioc a x, f t ∂μ = ∫ t in a..x, f t ∂μ :=\n  by\n  intro x x_in\n  simp_rw [integral_of_le x_in.1]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\nh : a ≤ b\n⊢ ∀ (x : ℝ), x ∈ Icc a b → ∫ (t : ℝ) in Ioc a x, f t ∂μ = ∫ (t : ℝ) in a..x, f t ∂μ\n[PROOFSTEP]\nintro x x_in\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\nh : a ≤ b\nx : ℝ\nx_in : x ∈ Icc a b\n⊢ ∫ (t : ℝ) in Ioc a x, f t ∂μ = ∫ (t : ℝ) in a..x, f t ∂μ\n[PROOFSTEP]\nsimp_rw [integral_of_le x_in.1]\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\nh : a ≤ b\nthis : ∀ (x : ℝ), x ∈ Icc a b → ∫ (t : ℝ) in Ioc a x, f t ∂μ = ∫ (t : ℝ) in a..x, f t ∂μ\n⊢ ContinuousOn (fun x => ∫ (t : ℝ) in Ioc a x, f t ∂μ) (Icc a b)\n[PROOFSTEP]\nrw [continuousOn_congr this]\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\nh : a ≤ b\nthis : ∀ (x : ℝ), x ∈ Icc a b → ∫ (t : ℝ) in Ioc a x, f t ∂μ = ∫ (t : ℝ) in a..x, f t ∂μ\n⊢ ContinuousOn (fun x => ∫ (t : ℝ) in a..x, f t ∂μ) (Icc a b)\n[PROOFSTEP]\nintro x₀ _\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\nh : a ≤ b\nthis : ∀ (x : ℝ), x ∈ Icc a b → ∫ (t : ℝ) in Ioc a x, f t ∂μ = ∫ (t : ℝ) in a..x, f t ∂μ\nx₀ : ℝ\na✝ : x₀ ∈ Icc a b\n⊢ ContinuousWithinAt (fun x => ∫ (t : ℝ) in a..x, f t ∂μ) (Icc a b) x₀\n[PROOFSTEP]\nrefine' continuousWithinAt_primitive (measure_singleton x₀) _\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\nh : a ≤ b\nthis : ∀ (x : ℝ), x ∈ Icc a b → ∫ (t : ℝ) in Ioc a x, f t ∂μ = ∫ (t : ℝ) in a..x, f t ∂μ\nx₀ : ℝ\na✝ : x₀ ∈ Icc a b\n⊢ IntervalIntegrable (fun t => f t) μ (min a a) (max a b)\n[PROOFSTEP]\nsimp only [intervalIntegrable_iff_integrable_Ioc_of_le, min_eq_left, max_eq_right, h, min_self]\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\nh : a ≤ b\nthis : ∀ (x : ℝ), x ∈ Icc a b → ∫ (t : ℝ) in Ioc a x, f t ∂μ = ∫ (t : ℝ) in a..x, f t ∂μ\nx₀ : ℝ\na✝ : x₀ ∈ Icc a b\n⊢ IntegrableOn (fun t => f t) (Ioc a b)\n[PROOFSTEP]\nexact h_int.mono Ioc_subset_Icc_self le_rfl\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\nh : ¬a ≤ b\n⊢ ContinuousOn (fun x => ∫ (t : ℝ) in Ioc a x, f t ∂μ) (Icc a b)\n[PROOFSTEP]\nrw [Icc_eq_empty h]\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\nh : ¬a ≤ b\n⊢ ContinuousOn (fun x => ∫ (t : ℝ) in Ioc a x, f t ∂μ) ∅\n[PROOFSTEP]\nexact continuousOn_empty _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\n⊢ ContinuousOn (fun x => ∫ (t : ℝ) in Icc a x, f t ∂μ) (Icc a b)\n[PROOFSTEP]\nhave aux : (fun x => ∫ t in Icc a x, f t ∂μ) = fun x => ∫ t in Ioc a x, f t ∂μ :=\n  by\n  ext x\n  exact integral_Icc_eq_integral_Ioc\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\n⊢ (fun x => ∫ (t : ℝ) in Icc a x, f t ∂μ) = fun x => ∫ (t : ℝ) in Ioc a x, f t ∂μ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\nx : ℝ\n⊢ ∫ (t : ℝ) in Icc a x, f t ∂μ = ∫ (t : ℝ) in Ioc a x, f t ∂μ\n[PROOFSTEP]\nexact integral_Icc_eq_integral_Ioc\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\naux : (fun x => ∫ (t : ℝ) in Icc a x, f t ∂μ) = fun x => ∫ (t : ℝ) in Ioc a x, f t ∂μ\n⊢ ContinuousOn (fun x => ∫ (t : ℝ) in Icc a x, f t ∂μ) (Icc a b)\n[PROOFSTEP]\nrw [aux]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f (Icc a b)\naux : (fun x => ∫ (t : ℝ) in Icc a x, f t ∂μ) = fun x => ∫ (t : ℝ) in Ioc a x, f t ∂μ\n⊢ ContinuousOn (fun x => ∫ (t : ℝ) in Ioc a x, f t ∂μ) (Icc a b)\n[PROOFSTEP]\nexact continuousOn_primitive h_int\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntervalIntegrable f μ b₁ b₂\nha : a ∈ [[b₁, b₂]]\nx✝¹ : ℝ\nx✝ : x✝¹ ∈ [[b₁, b₂]]\n⊢ ContinuousWithinAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) [[b₁, b₂]] x✝¹\n[PROOFSTEP]\nrefine continuousWithinAt_primitive (measure_singleton _) ?_\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntervalIntegrable f μ b₁ b₂\nha : a ∈ [[b₁, b₂]]\nx✝¹ : ℝ\nx✝ : x✝¹ ∈ [[b₁, b₂]]\n⊢ IntervalIntegrable (fun x => f x) μ (min a (b₁ ⊓ b₂)) (max a (b₁ ⊔ b₂))\n[PROOFSTEP]\nrw [min_eq_right ha.1, max_eq_right ha.2]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntervalIntegrable f μ b₁ b₂\nha : a ∈ [[b₁, b₂]]\nx✝¹ : ℝ\nx✝ : x✝¹ ∈ [[b₁, b₂]]\n⊢ IntervalIntegrable (fun x => f x) μ (b₁ ⊓ b₂) (b₁ ⊔ b₂)\n[PROOFSTEP]\nsimpa [intervalIntegrable_iff, uIoc] using h_int\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f [[a, b]]\n⊢ ContinuousOn (fun x => ∫ (t : ℝ) in x..b, f t ∂μ) [[a, b]]\n[PROOFSTEP]\nrw [uIcc_comm a b] at h_int ⊢\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f [[b, a]]\n⊢ ContinuousOn (fun x => ∫ (t : ℝ) in x..b, f t ∂μ) [[b, a]]\n[PROOFSTEP]\nsimp only [integral_symm b]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : IntegrableOn f [[b, a]]\n⊢ ContinuousOn (fun x => -∫ (t : ℝ) in b..x, f t ∂μ) [[b, a]]\n[PROOFSTEP]\nexact (continuousOn_primitive_interval h_int).neg\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na✝ b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : ∀ (a b : ℝ), IntervalIntegrable f μ a b\na : ℝ\n⊢ Continuous fun b => ∫ (x : ℝ) in a..b, f x ∂μ\n[PROOFSTEP]\nrw [continuous_iff_continuousAt]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na✝ b b₀ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : ∀ (a b : ℝ), IntervalIntegrable f μ a b\na : ℝ\n⊢ ∀ (x : ℝ), ContinuousAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) x\n[PROOFSTEP]\nintro b₀\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na✝ b b₀✝ b₁ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : ∀ (a b : ℝ), IntervalIntegrable f μ a b\na b₀ : ℝ\n⊢ ContinuousAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) b₀\n[PROOFSTEP]\ncases' exists_lt b₀ with b₁ hb₁\n[GOAL]\ncase intro\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na✝ b b₀✝ b₁✝ b₂ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : ∀ (a b : ℝ), IntervalIntegrable f μ a b\na b₀ b₁ : ℝ\nhb₁ : b₁ < b₀\n⊢ ContinuousAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) b₀\n[PROOFSTEP]\ncases' exists_gt b₀ with b₂ hb₂\n[GOAL]\ncase intro.intro\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na✝ b b₀✝ b₁✝ b₂✝ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : ∀ (a b : ℝ), IntervalIntegrable f μ a b\na b₀ b₁ : ℝ\nhb₁ : b₁ < b₀\nb₂ : ℝ\nhb₂ : b₀ < b₂\n⊢ ContinuousAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) b₀\n[PROOFSTEP]\napply ContinuousWithinAt.continuousAt _ (Icc_mem_nhds hb₁ hb₂)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\na✝ b b₀✝ b₁✝ b₂✝ : ℝ\nμ : Measure ℝ\nf g : ℝ → E\ninst✝ : NoAtoms μ\nh_int : ∀ (a b : ℝ), IntervalIntegrable f μ a b\na b₀ b₁ : ℝ\nhb₁ : b₁ < b₀\nb₂ : ℝ\nhb₂ : b₀ < b₂\n⊢ ContinuousWithinAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) (Icc b₁ b₂) b₀\n[PROOFSTEP]\nexact continuousWithinAt_primitive (measure_singleton b₀) (h_int _ _)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhf : 0 ≤ᵐ[Measure.restrict μ (Ioc a b)] f\nhfi : IntervalIntegrable f μ a b\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = 0 ↔ f =ᵐ[Measure.restrict μ (Ioc a b)] 0\n[PROOFSTEP]\nrw [integral_of_le hab, integral_eq_zero_iff_of_nonneg_ae hf hfi.1]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ (Ioc a b ∪ Ioc b a)] f\nhfi : IntervalIntegrable f μ a b\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = 0 ↔ f =ᵐ[Measure.restrict μ (Ioc a b ∪ Ioc b a)] 0\n[PROOFSTEP]\ncases' le_total a b with hab hab\n[GOAL]\ncase inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ (Ioc a b ∪ Ioc b a)] f\nhfi : IntervalIntegrable f μ a b\nhab : a ≤ b\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = 0 ↔ f =ᵐ[Measure.restrict μ (Ioc a b ∪ Ioc b a)] 0\n[PROOFSTEP]\nsimp only [Ioc_eq_empty hab.not_lt, empty_union, union_empty] at hf ⊢\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ (Ioc a b ∪ Ioc b a)] f\nhfi : IntervalIntegrable f μ a b\nhab : b ≤ a\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = 0 ↔ f =ᵐ[Measure.restrict μ (Ioc a b ∪ Ioc b a)] 0\n[PROOFSTEP]\nsimp only [Ioc_eq_empty hab.not_lt, empty_union, union_empty] at hf ⊢\n[GOAL]\ncase inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhfi : IntervalIntegrable f μ a b\nhab : a ≤ b\nhf : 0 ≤ᵐ[Measure.restrict μ (Ioc a b)] f\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = 0 ↔ f =ᵐ[Measure.restrict μ (Ioc a b)] 0\n[PROOFSTEP]\nexact integral_eq_zero_iff_of_le_of_nonneg_ae hab hf hfi\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhfi : IntervalIntegrable f μ a b\nhab : b ≤ a\nhf : 0 ≤ᵐ[Measure.restrict μ (Ioc b a)] f\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ = 0 ↔ f =ᵐ[Measure.restrict μ (Ioc b a)] 0\n[PROOFSTEP]\nrw [integral_symm, neg_eq_zero, integral_eq_zero_iff_of_le_of_nonneg_ae hab hf hfi.symm]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ (Ι a b)] f\nhfi : IntervalIntegrable f μ a b\n⊢ 0 < ∫ (x : ℝ) in a..b, f x ∂μ ↔ a < b ∧ 0 < ↑↑μ (support f ∩ Ioc a b)\n[PROOFSTEP]\ncases' lt_or_le a b with hab hba\n[GOAL]\ncase inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ (Ι a b)] f\nhfi : IntervalIntegrable f μ a b\nhab : a < b\n⊢ 0 < ∫ (x : ℝ) in a..b, f x ∂μ ↔ a < b ∧ 0 < ↑↑μ (support f ∩ Ioc a b)\n[PROOFSTEP]\nrw [uIoc_of_le hab.le] at hf \n[GOAL]\ncase inl\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ (Ioc a b)] f\nhfi : IntervalIntegrable f μ a b\nhab : a < b\n⊢ 0 < ∫ (x : ℝ) in a..b, f x ∂μ ↔ a < b ∧ 0 < ↑↑μ (support f ∩ Ioc a b)\n[PROOFSTEP]\nsimp only [hab, true_and_iff, integral_of_le hab.le, set_integral_pos_iff_support_of_nonneg_ae hf hfi.1]\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ (Ι a b)] f\nhfi : IntervalIntegrable f μ a b\nhba : b ≤ a\n⊢ 0 < ∫ (x : ℝ) in a..b, f x ∂μ ↔ a < b ∧ 0 < ↑↑μ (support f ∩ Ioc a b)\n[PROOFSTEP]\nsuffices (∫ x in a..b, f x ∂μ) ≤ 0 by simp only [this.not_lt, hba.not_lt, false_and_iff]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ (Ι a b)] f\nhfi : IntervalIntegrable f μ a b\nhba : b ≤ a\nthis : ∫ (x : ℝ) in a..b, f x ∂μ ≤ 0\n⊢ 0 < ∫ (x : ℝ) in a..b, f x ∂μ ↔ a < b ∧ 0 < ↑↑μ (support f ∩ Ioc a b)\n[PROOFSTEP]\nsimp only [this.not_lt, hba.not_lt, false_and_iff]\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ (Ι a b)] f\nhfi : IntervalIntegrable f μ a b\nhba : b ≤ a\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ ≤ 0\n[PROOFSTEP]\nrw [integral_of_ge hba, neg_nonpos]\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ (Ι a b)] f\nhfi : IntervalIntegrable f μ a b\nhba : b ≤ a\n⊢ 0 ≤ ∫ (x : ℝ) in Ioc b a, f x ∂μ\n[PROOFSTEP]\nrw [uIoc_comm, uIoc_of_le hba] at hf \n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ (Ioc b a)] f\nhfi : IntervalIntegrable f μ a b\nhba : b ≤ a\n⊢ 0 ≤ ∫ (x : ℝ) in Ioc b a, f x ∂μ\n[PROOFSTEP]\nexact integral_nonneg_of_ae hf\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf : ℝ → ℝ\na b : ℝ\nhfi : IntervalIntegrable f volume a b\nhpos : ∀ (x : ℝ), x ∈ Ioo a b → 0 < f x\nhab : a < b\n⊢ 0 < ∫ (x : ℝ) in a..b, f x\n[PROOFSTEP]\nhave hsupp : Ioo a b ⊆ support f ∩ Ioc a b := fun x hx => ⟨mem_support.mpr (hpos x hx).ne', Ioo_subset_Ioc_self hx⟩\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf : ℝ → ℝ\na b : ℝ\nhfi : IntervalIntegrable f volume a b\nhpos : ∀ (x : ℝ), x ∈ Ioo a b → 0 < f x\nhab : a < b\nhsupp : Ioo a b ⊆ support f ∩ Ioc a b\n⊢ 0 < ∫ (x : ℝ) in a..b, f x\n[PROOFSTEP]\nhave h₀ : 0 ≤ᵐ[volume.restrict (uIoc a b)] f :=\n  by\n  rw [EventuallyLE, uIoc_of_le hab.le]\n  refine' ae_restrict_of_ae_eq_of_ae_restrict Ioo_ae_eq_Ioc _\n  exact (ae_restrict_iff' measurableSet_Ioo).mpr (ae_of_all _ fun x hx => (hpos x hx).le)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf : ℝ → ℝ\na b : ℝ\nhfi : IntervalIntegrable f volume a b\nhpos : ∀ (x : ℝ), x ∈ Ioo a b → 0 < f x\nhab : a < b\nhsupp : Ioo a b ⊆ support f ∩ Ioc a b\n⊢ 0 ≤ᵐ[Measure.restrict volume (Ι a b)] f\n[PROOFSTEP]\nrw [EventuallyLE, uIoc_of_le hab.le]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf : ℝ → ℝ\na b : ℝ\nhfi : IntervalIntegrable f volume a b\nhpos : ∀ (x : ℝ), x ∈ Ioo a b → 0 < f x\nhab : a < b\nhsupp : Ioo a b ⊆ support f ∩ Ioc a b\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict volume (Ioc a b), OfNat.ofNat 0 x ≤ f x\n[PROOFSTEP]\nrefine' ae_restrict_of_ae_eq_of_ae_restrict Ioo_ae_eq_Ioc _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf : ℝ → ℝ\na b : ℝ\nhfi : IntervalIntegrable f volume a b\nhpos : ∀ (x : ℝ), x ∈ Ioo a b → 0 < f x\nhab : a < b\nhsupp : Ioo a b ⊆ support f ∩ Ioc a b\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict volume (Ioo a b), OfNat.ofNat 0 x ≤ f x\n[PROOFSTEP]\nexact (ae_restrict_iff' measurableSet_Ioo).mpr (ae_of_all _ fun x hx => (hpos x hx).le)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf : ℝ → ℝ\na b : ℝ\nhfi : IntervalIntegrable f volume a b\nhpos : ∀ (x : ℝ), x ∈ Ioo a b → 0 < f x\nhab : a < b\nhsupp : Ioo a b ⊆ support f ∩ Ioc a b\nh₀ : 0 ≤ᵐ[Measure.restrict volume (Ι a b)] f\n⊢ 0 < ∫ (x : ℝ) in a..b, f x\n[PROOFSTEP]\nrw [integral_pos_iff_support_of_nonneg_ae' h₀ hfi]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf : ℝ → ℝ\na b : ℝ\nhfi : IntervalIntegrable f volume a b\nhpos : ∀ (x : ℝ), x ∈ Ioo a b → 0 < f x\nhab : a < b\nhsupp : Ioo a b ⊆ support f ∩ Ioc a b\nh₀ : 0 ≤ᵐ[Measure.restrict volume (Ι a b)] f\n⊢ a < b ∧ 0 < ↑↑volume (support f ∩ Ioc a b)\n[PROOFSTEP]\nexact ⟨hab, ((Measure.measure_Ioo_pos _).mpr hab).trans_le (measure_mono hsupp)⟩\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhfi : IntervalIntegrable f μ a b\nhgi : IntervalIntegrable g μ a b\nhle : f ≤ᵐ[Measure.restrict μ (Ioc a b)] g\nhlt : ↑↑(Measure.restrict μ (Ioc a b)) {x | f x < g x} ≠ 0\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ < ∫ (x : ℝ) in a..b, g x ∂μ\n[PROOFSTEP]\nrw [← sub_pos, ← integral_sub hgi hfi, integral_of_le hab, MeasureTheory.integral_pos_iff_support_of_nonneg_ae]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhfi : IntervalIntegrable f μ a b\nhgi : IntervalIntegrable g μ a b\nhle : f ≤ᵐ[Measure.restrict μ (Ioc a b)] g\nhlt : ↑↑(Measure.restrict μ (Ioc a b)) {x | f x < g x} ≠ 0\n⊢ 0 < ↑↑(Measure.restrict μ (Ioc a b)) (support fun x => g x - f x)\n[PROOFSTEP]\nrefine' pos_iff_ne_zero.2 (mt (measure_mono_null _) hlt)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhfi : IntervalIntegrable f μ a b\nhgi : IntervalIntegrable g μ a b\nhle : f ≤ᵐ[Measure.restrict μ (Ioc a b)] g\nhlt : ↑↑(Measure.restrict μ (Ioc a b)) {x | f x < g x} ≠ 0\n⊢ {x | f x < g x} ⊆ support fun x => g x - f x\n[PROOFSTEP]\nexact fun x hx => (sub_pos.2 hx.out).ne'\n[GOAL]\ncase hf\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhfi : IntervalIntegrable f μ a b\nhgi : IntervalIntegrable g μ a b\nhle : f ≤ᵐ[Measure.restrict μ (Ioc a b)] g\nhlt : ↑↑(Measure.restrict μ (Ioc a b)) {x | f x < g x} ≠ 0\n⊢ 0 ≤ᵐ[Measure.restrict μ (Ioc a b)] fun x => g x - f x\ncase hfi\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhfi : IntervalIntegrable f μ a b\nhgi : IntervalIntegrable g μ a b\nhle : f ≤ᵐ[Measure.restrict μ (Ioc a b)] g\nhlt : ↑↑(Measure.restrict μ (Ioc a b)) {x | f x < g x} ≠ 0\n⊢ Integrable fun x => g x - f x\n[PROOFSTEP]\nexacts [hle.mono fun x => sub_nonneg.2, hgi.1.sub hfi.1]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g✝ : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf g : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhgc : ContinuousOn g (Icc a b)\nhle : ∀ (x : ℝ), x ∈ Ioc a b → f x ≤ g x\nhlt : ∃ c, c ∈ Icc a b ∧ f c < g c\n⊢ ∫ (x : ℝ) in a..b, f x < ∫ (x : ℝ) in a..b, g x\n[PROOFSTEP]\napply\n  integral_lt_integral_of_ae_le_of_measure_setOf_lt_ne_zero hab.le (hfc.intervalIntegrable_of_Icc hab.le)\n    (hgc.intervalIntegrable_of_Icc hab.le)\n[GOAL]\ncase hle\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g✝ : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf g : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhgc : ContinuousOn g (Icc a b)\nhle : ∀ (x : ℝ), x ∈ Ioc a b → f x ≤ g x\nhlt : ∃ c, c ∈ Icc a b ∧ f c < g c\n⊢ f ≤ᵐ[Measure.restrict volume (Ioc a b)] g\n[PROOFSTEP]\nsimpa only [gt_iff_lt, not_lt, ge_iff_le, measurableSet_Ioc, ae_restrict_eq, le_principal_iff] using\n  (ae_restrict_mem measurableSet_Ioc).mono hle\n[GOAL]\ncase hlt\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g✝ : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf g : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhgc : ContinuousOn g (Icc a b)\nhle : ∀ (x : ℝ), x ∈ Ioc a b → f x ≤ g x\nhlt : ∃ c, c ∈ Icc a b ∧ f c < g c\n⊢ ↑↑(Measure.restrict volume (Ioc a b)) {x | f x < g x} ≠ 0\n[PROOFSTEP]\ncontrapose! hlt\n[GOAL]\ncase hlt\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g✝ : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf g : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhgc : ContinuousOn g (Icc a b)\nhle : ∀ (x : ℝ), x ∈ Ioc a b → f x ≤ g x\nhlt : ↑↑(Measure.restrict volume (Ioc a b)) {x | f x < g x} = 0\n⊢ ∀ (c : ℝ), c ∈ Icc a b → g c ≤ f c\n[PROOFSTEP]\nhave h_eq : f =ᵐ[volume.restrict (Ioc a b)] g :=\n  by\n  simp only [← not_le, ← ae_iff] at hlt \n  exact EventuallyLE.antisymm ((ae_restrict_iff' measurableSet_Ioc).2 <| eventually_of_forall hle) hlt\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g✝ : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf g : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhgc : ContinuousOn g (Icc a b)\nhle : ∀ (x : ℝ), x ∈ Ioc a b → f x ≤ g x\nhlt : ↑↑(Measure.restrict volume (Ioc a b)) {x | f x < g x} = 0\n⊢ f =ᵐ[Measure.restrict volume (Ioc a b)] g\n[PROOFSTEP]\nsimp only [← not_le, ← ae_iff] at hlt \n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g✝ : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf g : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhgc : ContinuousOn g (Icc a b)\nhle : ∀ (x : ℝ), x ∈ Ioc a b → f x ≤ g x\nhlt : ∀ᵐ (a : ℝ) ∂Measure.restrict volume (Ioc a b), g a ≤ f a\n⊢ f =ᵐ[Measure.restrict volume (Ioc a b)] g\n[PROOFSTEP]\nexact EventuallyLE.antisymm ((ae_restrict_iff' measurableSet_Ioc).2 <| eventually_of_forall hle) hlt\n[GOAL]\ncase hlt\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g✝ : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf g : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhgc : ContinuousOn g (Icc a b)\nhle : ∀ (x : ℝ), x ∈ Ioc a b → f x ≤ g x\nhlt : ↑↑(Measure.restrict volume (Ioc a b)) {x | f x < g x} = 0\nh_eq : f =ᵐ[Measure.restrict volume (Ioc a b)] g\n⊢ ∀ (c : ℝ), c ∈ Icc a b → g c ≤ f c\n[PROOFSTEP]\nrw [Measure.restrict_congr_set Ioc_ae_eq_Icc] at h_eq \n[GOAL]\ncase hlt\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf✝ g✝ : ℝ → ℝ\na✝ b✝ : ℝ\nμ : Measure ℝ\nf g : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhgc : ContinuousOn g (Icc a b)\nhle : ∀ (x : ℝ), x ∈ Ioc a b → f x ≤ g x\nhlt : ↑↑(Measure.restrict volume (Ioc a b)) {x | f x < g x} = 0\nh_eq : f =ᵐ[Measure.restrict volume (Icc a b)] g\n⊢ ∀ (c : ℝ), c ∈ Icc a b → g c ≤ f c\n[PROOFSTEP]\nexact fun c hc ↦ (Measure.eqOn_Icc_of_ae_eq volume hab.ne h_eq hfc hgc hc).ge\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhf : 0 ≤ᵐ[Measure.restrict μ (Icc a b)] f\n⊢ 0 ≤ ∫ (u : ℝ) in a..b, f u ∂μ\n[PROOFSTEP]\nlet H := ae_restrict_of_ae_restrict_of_subset Ioc_subset_Icc_self hf\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhf : 0 ≤ᵐ[Measure.restrict μ (Icc a b)] f\nH : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ioc a b), OfNat.ofNat 0 x ≤ f x :=\n  ae_restrict_of_ae_restrict_of_subset Ioc_subset_Icc_self hf\n⊢ 0 ≤ ∫ (u : ℝ) in a..b, f u ∂μ\n[PROOFSTEP]\nsimpa only [integral_of_le hab] using set_integral_nonneg_of_ae_restrict H\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\n⊢ |∫ (x : ℝ) in a..b, f x ∂μ| ≤ ∫ (x : ℝ) in a..b, |f x| ∂μ\n[PROOFSTEP]\nsimpa only [← Real.norm_eq_abs] using norm_integral_le_integral_norm hab\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhf : IntervalIntegrable f μ a b\nhg : IntervalIntegrable g μ a b\nh : f ≤ᵐ[Measure.restrict μ (Icc a b)] g\n⊢ ∫ (u : ℝ) in a..b, f u ∂μ ≤ ∫ (u : ℝ) in a..b, g u ∂μ\n[PROOFSTEP]\nlet H := h.filter_mono <| ae_mono <| Measure.restrict_mono Ioc_subset_Icc_self <| le_refl μ\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhf : IntervalIntegrable f μ a b\nhg : IntervalIntegrable g μ a b\nh : f ≤ᵐ[Measure.restrict μ (Icc a b)] g\nH : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ioc a b), f x ≤ g x :=\n  Eventually.filter_mono (ae_mono (Measure.restrict_mono Ioc_subset_Icc_self (le_refl μ))) h\n⊢ ∫ (u : ℝ) in a..b, f u ∂μ ≤ ∫ (u : ℝ) in a..b, g u ∂μ\n[PROOFSTEP]\nsimpa only [integral_of_le hab] using set_integral_mono_ae_restrict hf.1 hg.1 H\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhf : IntervalIntegrable f μ a b\nhg : IntervalIntegrable g μ a b\nh : f ≤ᵐ[μ] g\n⊢ ∫ (u : ℝ) in a..b, f u ∂μ ≤ ∫ (u : ℝ) in a..b, g u ∂μ\n[PROOFSTEP]\nsimpa only [integral_of_le hab] using set_integral_mono_ae hf.1 hg.1 h\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhf : IntervalIntegrable f μ a b\nhg : IntervalIntegrable g μ a b\nh : ∀ (x : ℝ), x ∈ Icc a b → f x ≤ g x\n⊢ ∫ (u : ℝ) in a..b, f u ∂μ ≤ ∫ (u : ℝ) in a..b, g u ∂μ\n[PROOFSTEP]\nlet H x hx := h x <| Ioc_subset_Icc_self hx\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab : a ≤ b\nhf : IntervalIntegrable f μ a b\nhg : IntervalIntegrable g μ a b\nh : ∀ (x : ℝ), x ∈ Icc a b → f x ≤ g x\nH : ∀ (x : ℝ), x ∈ Ioc a b → f x ≤ g x := fun x hx => h x (Ioc_subset_Icc_self hx)\n⊢ ∫ (u : ℝ) in a..b, f u ∂μ ≤ ∫ (u : ℝ) in a..b, g u ∂μ\n[PROOFSTEP]\nsimpa only [integral_of_le hab] using set_integral_mono_on hf.1 hg.1 measurableSet_Ioc H\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab✝ : a ≤ b\nhf✝ : IntervalIntegrable f μ a b\nhg : IntervalIntegrable g μ a b\nc d : ℝ\nhca : c ≤ a\nhab : a ≤ b\nhbd : b ≤ d\nhf : 0 ≤ᵐ[Measure.restrict μ (Ioc c d)] f\nhfi : IntervalIntegrable f μ c d\n⊢ ∫ (x : ℝ) in a..b, f x ∂μ ≤ ∫ (x : ℝ) in c..d, f x ∂μ\n[PROOFSTEP]\nrw [integral_of_le hab, integral_of_le (hca.trans (hab.trans hbd))]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nf g : ℝ → ℝ\na b : ℝ\nμ : Measure ℝ\nhab✝ : a ≤ b\nhf✝ : IntervalIntegrable f μ a b\nhg : IntervalIntegrable g μ a b\nc d : ℝ\nhca : c ≤ a\nhab : a ≤ b\nhbd : b ≤ d\nhf : 0 ≤ᵐ[Measure.restrict μ (Ioc c d)] f\nhfi : IntervalIntegrable f μ c d\n⊢ ∫ (x : ℝ) in Ioc a b, f x ∂μ ≤ ∫ (x : ℝ) in Ioc c d, f x ∂μ\n[PROOFSTEP]\nexact set_integral_mono_set hfi.1 hf (Ioc_subset_Ioc hca hbd).eventuallyLE\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nμ : Measure ℝ\nf : ℝ → E\nhfi : Integrable f\ny : ℝ\n⊢ HasSum (fun n => ∫ (x : ℝ) in y + ↑n..y + ↑n + 1, f x ∂μ) (∫ (x : ℝ), f x ∂μ)\n[PROOFSTEP]\nsimp_rw [integral_of_le (le_add_of_nonneg_right zero_le_one)]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nμ : Measure ℝ\nf : ℝ → E\nhfi : Integrable f\ny : ℝ\n⊢ HasSum (fun n => ∫ (x : ℝ) in Ioc (y + ↑n) (y + ↑n + 1), f x ∂μ) (∫ (x : ℝ), f x ∂μ)\n[PROOFSTEP]\nrw [← integral_univ, ← iUnion_Ioc_add_int_cast y]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nμ : Measure ℝ\nf : ℝ → E\nhfi : Integrable f\ny : ℝ\n⊢ HasSum (fun n => ∫ (x : ℝ) in Ioc (y + ↑n) (y + ↑n + 1), f x ∂μ)\n    (∫ (x : ℝ) in ⋃ (n : ℤ), Ioc (y + ↑n) (y + ↑n + 1), f x ∂μ)\n[PROOFSTEP]\nexact hasSum_integral_iUnion (fun i => measurableSet_Ioc) (pairwise_disjoint_Ioc_add_int_cast y) hfi.integrableOn\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nE : Type u_3\nF : Type u_4\nA : Type u_5\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nμ : Measure ℝ\nf : ℝ → E\nhfi : Integrable f\n⊢ HasSum (fun n => ∫ (x : ℝ) in 0 ..1, f (x + ↑n)) (∫ (x : ℝ), f x)\n[PROOFSTEP]\nsimpa only [integral_comp_add_right, zero_add, add_comm (1 : ℝ)] using hfi.hasSum_intervalIntegral 0\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Integral.IntervalIntegral", "llama_tokens": 99845, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802603710086, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3682903980214067}}
{"text": "[GOAL]\nα β γ : Type u\nF : Type u → Type v\ninst✝¹ : Applicative F\ninst✝ : LawfulApplicative F\nx : F (α → β)\nf : γ → α\ny : F γ\n⊢ (Seq.seq x fun x => f <$> y) = Seq.seq ((fun x => x ∘ f) <$> x) fun x => y\n[PROOFSTEP]\nsimp [← pure_seq]\n[GOAL]\nα β γ : Type u\nF : Type u → Type v\ninst✝¹ : Applicative F\ninst✝ : LawfulApplicative F\nx : F (α → β)\nf : γ → α\ny : F γ\n⊢ (Seq.seq x fun x => Seq.seq (pure f) fun x => y) = Seq.seq (Seq.seq (pure fun x => x ∘ f) fun x_1 => x) fun x => y\n[PROOFSTEP]\nsimp [seq_assoc, ← comp_map, (· ∘ ·)]\n[GOAL]\nα β γ : Type u\nF : Type u → Type v\ninst✝¹ : Applicative F\ninst✝ : LawfulApplicative F\nx : F (α → β)\nf : γ → α\ny : F γ\n⊢ (Seq.seq ((fun x x_1 => x (f x_1)) <$> x) fun x => y) =\n    Seq.seq (Seq.seq (pure fun x x_1 => x (f x_1)) fun x_1 => x) fun x => y\n[PROOFSTEP]\nsimp [pure_seq]\n[GOAL]\nα β γ : Type u\nF : Type u → Type v\ninst✝¹ : Applicative F\ninst✝ : LawfulApplicative F\nf : β → γ\nx : F (α → β)\ny : F α\n⊢ (f <$> Seq.seq x fun x => y) = Seq.seq ((fun x => f ∘ x) <$> x) fun x => y\n[PROOFSTEP]\nsimp only [← pure_seq]\n[GOAL]\nα β γ : Type u\nF : Type u → Type v\ninst✝¹ : Applicative F\ninst✝ : LawfulApplicative F\nf : β → γ\nx : F (α → β)\ny : F α\n⊢ (Seq.seq (pure f) fun x_1 => Seq.seq x fun x => y) = Seq.seq (Seq.seq (pure fun x => f ∘ x) fun x_1 => x) fun x => y\n[PROOFSTEP]\nsimp [seq_assoc]\n[GOAL]\nα β γ : Type u\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nx : m α\ng : α → m β\nf : β → γ\n⊢ f <$> (x >>= g) = do\n    let a ← x\n    f <$> g a\n[PROOFSTEP]\nrw [← bind_pure_comp, bind_assoc]\n[GOAL]\nα β γ : Type u\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nx : m α\ng : α → m β\nf : β → γ\n⊢ (do\n      let x ← x\n      let a ← g x\n      pure (f a)) =\n    do\n    let a ← x\n    f <$> g a\n[PROOFSTEP]\nsimp [bind_pure_comp]\n[GOAL]\nα β γ : Type u\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nx : m α\ng : β → m γ\nf : α → β\n⊢ f <$> x >>= g = x >>= g ∘ f\n[PROOFSTEP]\nrw [← bind_pure_comp, bind_assoc]\n[GOAL]\nα β γ : Type u\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nx : m α\ng : β → m γ\nf : α → β\n⊢ (x >>= fun x => pure (f x) >>= g) = x >>= g ∘ f\n[PROOFSTEP]\nsimp [pure_bind, (· ∘ ·)]\n[GOAL]\nα✝ β✝ γ : Type u\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα : Type u_1\nβ : Type u\nf : α → m β\n⊢ f >=> pure = f\n[PROOFSTEP]\nsimp only [(· >=> ·), functor_norm]\n[GOAL]\nα✝ β✝ γ : Type u\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα β : Type u\nf : α → m β\n⊢ pure >=> f = f\n[PROOFSTEP]\nsimp only [(· >=> ·), functor_norm]\n[GOAL]\nα✝ β✝ γ✝ : Type u\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα : Type u_1\nβ γ φ : Type u\nf : α → m β\ng : β → m γ\nh : γ → m φ\n⊢ (f >=> g) >=> h = f >=> g >=> h\n[PROOFSTEP]\nsimp only [(· >=> ·), functor_norm]\n[GOAL]\nα✝ β✝ γ : Type u\nm : Type u → Type u\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα β : Type u\nf : α → β\na : m (m α)\n⊢ joinM (Functor.map f <$> a) = f <$> joinM a\n[PROOFSTEP]\nsimp only [joinM, (· ∘ ·), id.def, ← bind_pure_comp, bind_assoc, map_bind, pure_bind]\n[GOAL]\nα✝ β γ : Type u\nm : Type u → Type u\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα : Type u\na : m (m (m α))\n⊢ joinM (joinM <$> a) = joinM (joinM a)\n[PROOFSTEP]\nsimp only [joinM, (· ∘ ·), id.def, map_bind, ← bind_pure_comp, bind_assoc, pure_bind]\n[GOAL]\nα✝ β γ : Type u\nm : Type u → Type u\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα : Type u\na : m α\n⊢ joinM (pure <$> a) = a\n[PROOFSTEP]\nsimp only [joinM, (· ∘ ·), id.def, map_bind, ← bind_pure_comp, bind_assoc, pure_bind, bind_pure]\n[GOAL]\nα β γ : Type u\nF : Type → Type v\ninst✝ : Alternative F\nh : Decidable True\n⊢ guard True = pure ()\n[PROOFSTEP]\nsimp [guard, if_pos]\n[GOAL]\nα β γ : Type u\nF : Type → Type v\ninst✝ : Alternative F\nh : Decidable False\n⊢ guard False = failure\n[PROOFSTEP]\nsimp [guard, if_neg not_false]\n[GOAL]\nα β γ : Type u\ne : Type v\n⊢ LawfulFunctor (Sum e)\n[PROOFSTEP]\nrefine' { .. }\n[GOAL]\ncase refine'_1\nα β γ : Type u\ne : Type v\n⊢ ∀ {α β : Type u}, Functor.mapConst = Functor.map ∘ Function.const β\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nα β γ : Type u\ne : Type v\n⊢ ∀ {α : Type u} (x : e ⊕ α), id <$> x = x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\nα β γ : Type u\ne : Type v\n⊢ ∀ {α β γ : Type u} (g : α → β) (h : β → γ) (x : e ⊕ α), (h ∘ g) <$> x = h <$> g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\n⊢ Functor.mapConst = Functor.map ∘ Function.const β✝\n[PROOFSTEP]\ntry casesm Sum _ _\n[GOAL]\ncase refine'_1\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\n⊢ Functor.mapConst = Functor.map ∘ Function.const β✝\n[PROOFSTEP]\ncasesm Sum _ _\n[GOAL]\ncase refine'_2\nα β γ : Type u\ne : Type v\nα✝ : Type u\nx✝ : e ⊕ α✝\n⊢ id <$> x✝ = x✝\n[PROOFSTEP]\ntry casesm Sum _ _\n[GOAL]\ncase refine'_2\nα β γ : Type u\ne : Type v\nα✝ : Type u\nx✝ : e ⊕ α✝\n⊢ id <$> x✝ = x✝\n[PROOFSTEP]\ncasesm Sum _ _\n[GOAL]\ncase refine'_3\nα β γ : Type u\ne : Type v\nα✝ β✝ γ✝ : Type u\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nx✝ : e ⊕ α✝\n⊢ (h✝ ∘ g✝) <$> x✝ = h✝ <$> g✝ <$> x✝\n[PROOFSTEP]\ntry casesm Sum _ _\n[GOAL]\ncase refine'_3\nα β γ : Type u\ne : Type v\nα✝ β✝ γ✝ : Type u\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nx✝ : e ⊕ α✝\n⊢ (h✝ ∘ g✝) <$> x✝ = h✝ <$> g✝ <$> x✝\n[PROOFSTEP]\ncasesm Sum _ _\n[GOAL]\ncase refine'_1\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\n⊢ Functor.mapConst = Functor.map ∘ Function.const β✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.inl\nα β γ : Type u\ne : Type v\nα✝ : Type u\nval✝ : e\n⊢ id <$> inl val✝ = inl val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.inr\nα β γ : Type u\ne : Type v\nα✝ : Type u\nval✝ : α✝\n⊢ id <$> inr val✝ = inr val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3.inl\nα β γ : Type u\ne : Type v\nα✝ β✝ γ✝ : Type u\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nval✝ : e\n⊢ (h✝ ∘ g✝) <$> inl val✝ = h✝ <$> g✝ <$> inl val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3.inr\nα β γ : Type u\ne : Type v\nα✝ β✝ γ✝ : Type u\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nval✝ : α✝\n⊢ (h✝ ∘ g✝) <$> inr val✝ = h✝ <$> g✝ <$> inr val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα β γ : Type u\ne : Type v\n⊢ ∀ {α β : Type u} (x : e ⊕ α) (y : e ⊕ β), (SeqLeft.seqLeft x fun x => y) = Seq.seq (Function.const β <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nx✝ : e ⊕ α✝\ny✝ : e ⊕ β✝\n⊢ (SeqLeft.seqLeft x✝ fun x => y✝) = Seq.seq (Function.const β✝ <$> x✝) fun x => y✝\n[PROOFSTEP]\ncasesm Sum _ _\n[GOAL]\ncase inl\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\ny✝ : e ⊕ β✝\nval✝ : e\n⊢ (SeqLeft.seqLeft (inl val✝) fun x => y✝) = Seq.seq (Function.const β✝ <$> inl val✝) fun x => y✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\ny✝ : e ⊕ β✝\nval✝ : α✝\n⊢ (SeqLeft.seqLeft (inr val✝) fun x => y✝) = Seq.seq (Function.const β✝ <$> inr val✝) fun x => y✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα β γ : Type u\ne : Type v\n⊢ ∀ {α β : Type u} (x : e ⊕ α) (y : e ⊕ β),\n    (SeqRight.seqRight x fun x => y) = Seq.seq (Function.const α id <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nx✝ : e ⊕ α✝\ny✝ : e ⊕ β✝\n⊢ (SeqRight.seqRight x✝ fun x => y✝) = Seq.seq (Function.const α✝ id <$> x✝) fun x => y✝\n[PROOFSTEP]\ncasesm Sum _ _\n[GOAL]\ncase inl\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\ny✝ : e ⊕ β✝\nval✝ : e\n⊢ (SeqRight.seqRight (inl val✝) fun x => y✝) = Seq.seq (Function.const α✝ id <$> inl val✝) fun x => y✝\n[PROOFSTEP]\ncasesm Sum _ _\n[GOAL]\ncase inr\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\ny✝ : e ⊕ β✝\nval✝ : α✝\n⊢ (SeqRight.seqRight (inr val✝) fun x => y✝) = Seq.seq (Function.const α✝ id <$> inr val✝) fun x => y✝\n[PROOFSTEP]\ncasesm Sum _ _\n[GOAL]\ncase inl.inl\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nval✝¹ val✝ : e\n⊢ (SeqRight.seqRight (inl val✝¹) fun x => inl val✝) = Seq.seq (Function.const α✝ id <$> inl val✝¹) fun x => inl val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inl.inr\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nval✝¹ : e\nval✝ : β✝\n⊢ (SeqRight.seqRight (inl val✝¹) fun x => inr val✝) = Seq.seq (Function.const α✝ id <$> inl val✝¹) fun x => inr val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.inl\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nval✝¹ : α✝\nval✝ : e\n⊢ (SeqRight.seqRight (inr val✝¹) fun x => inl val✝) = Seq.seq (Function.const α✝ id <$> inr val✝¹) fun x => inl val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.inr\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nval✝¹ : α✝\nval✝ : β✝\n⊢ (SeqRight.seqRight (inr val✝¹) fun x => inr val✝) = Seq.seq (Function.const α✝ id <$> inr val✝¹) fun x => inr val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα β γ : Type u\ne : Type v\n⊢ ∀ {α β : Type u} (g : α → β) (x : e ⊕ α), (Seq.seq (pure g) fun x_1 => x) = g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\ng✝ : α✝ → β✝\nx✝ : e ⊕ α✝\n⊢ (Seq.seq (pure g✝) fun x => x✝) = g✝ <$> x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα β γ : Type u\ne : Type v\n⊢ ∀ {α β : Type u} (f : α → β) (x : e ⊕ α),\n    (do\n        let a ← x\n        pure (f a)) =\n      f <$> x\n[PROOFSTEP]\nintros\n[GOAL]\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nf✝ : α✝ → β✝\nx✝ : e ⊕ α✝\n⊢ (do\n      let a ← x✝\n      pure (f✝ a)) =\n    f✝ <$> x✝\n[PROOFSTEP]\ncasesm Sum _ _\n[GOAL]\ncase inl\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nf✝ : α✝ → β✝\nval✝ : e\n⊢ (do\n      let a ← inl val✝\n      pure (f✝ a)) =\n    f✝ <$> inl val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nf✝ : α✝ → β✝\nval✝ : α✝\n⊢ (do\n      let a ← inr val✝\n      pure (f✝ a)) =\n    f✝ <$> inr val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα β γ : Type u\ne : Type v\n⊢ ∀ {α β : Type u} (f : e ⊕ (α → β)) (x : e ⊕ α),\n    (do\n        let x_1 ← f\n        x_1 <$> x) =\n      Seq.seq f fun x_1 => x\n[PROOFSTEP]\nintros\n[GOAL]\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nf✝ : e ⊕ (α✝ → β✝)\nx✝ : e ⊕ α✝\n⊢ (do\n      let x ← f✝\n      x <$> x✝) =\n    Seq.seq f✝ fun x => x✝\n[PROOFSTEP]\ncasesm Sum _ _\n[GOAL]\ncase inl\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nx✝ : e ⊕ α✝\nval✝ : e\n⊢ (do\n      let x ← inl val✝\n      x <$> x✝) =\n    Seq.seq (inl val✝) fun x => x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nx✝ : e ⊕ α✝\nval✝ : α✝ → β✝\n⊢ (do\n      let x ← inr val✝\n      x <$> x✝) =\n    Seq.seq (inr val✝) fun x => x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα β γ : Type u\ne : Type v\n⊢ ∀ {α β : Type u} (x : α) (f : α → e ⊕ β), pure x >>= f = f x\n[PROOFSTEP]\nintros\n[GOAL]\nα β γ : Type u\ne : Type v\nα✝ β✝ : Type u\nx✝ : α✝\nf✝ : α✝ → e ⊕ β✝\n⊢ pure x✝ >>= f✝ = f✝ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα β γ : Type u\ne : Type v\n⊢ ∀ {α β γ : Type u} (x : e ⊕ α) (f : α → e ⊕ β) (g : β → e ⊕ γ), x >>= f >>= g = x >>= fun x => f x >>= g\n[PROOFSTEP]\nintros\n[GOAL]\nα β γ : Type u\ne : Type v\nα✝ β✝ γ✝ : Type u\nx✝ : e ⊕ α✝\nf✝ : α✝ → e ⊕ β✝\ng✝ : β✝ → e ⊕ γ✝\n⊢ x✝ >>= f✝ >>= g✝ = x✝ >>= fun x => f✝ x >>= g✝\n[PROOFSTEP]\ncasesm Sum _ _\n[GOAL]\ncase inl\nα β γ : Type u\ne : Type v\nα✝ β✝ γ✝ : Type u\nf✝ : α✝ → e ⊕ β✝\ng✝ : β✝ → e ⊕ γ✝\nval✝ : e\n⊢ inl val✝ >>= f✝ >>= g✝ = inl val✝ >>= fun x => f✝ x >>= g✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nα β γ : Type u\ne : Type v\nα✝ β✝ γ✝ : Type u\nf✝ : α✝ → e ⊕ β✝\ng✝ : β✝ → e ⊕ γ✝\nval✝ : α✝\n⊢ inr val✝ >>= f✝ >>= g✝ = inr val✝ >>= fun x => f✝ x >>= g✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ β✝ γ✝ : Type u\nm✝ : ?m.20624\nm : Type u → Type v\nh : Applicative m\ninst✝ : CommApplicative m\nα β γ : Type u\na : m α\nb : m β\nf : α → β → γ\n⊢ (Seq.seq (f <$> a) fun x => b) = (fun p => f p.fst p.snd) <$> Seq.seq (Prod.mk <$> a) fun x => b\n[PROOFSTEP]\nsimp [seq_map_assoc, map_seq, seq_assoc, seq_pure, map_map]\n[GOAL]\nα✝ β✝ γ✝ : Type u\nm✝ : ?m.20624\nm : Type u → Type v\nh : Applicative m\ninst✝ : CommApplicative m\nα β γ : Type u\na : m α\nb : m β\nf : α → β → γ\n⊢ (Seq.seq (f <$> a) fun x => b) = Seq.seq (((fun x => (fun p => f p.fst p.snd) ∘ x) ∘ Prod.mk) <$> a) fun x => b\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ β✝ γ✝ : Type u\nm✝ : ?m.20624\nm : Type u → Type v\nh : Applicative m\ninst✝ : CommApplicative m\nα β γ : Type u\na : m α\nb : m β\nf : α → β → γ\n⊢ ((fun p => f p.fst p.snd) <$> Seq.seq (Prod.mk <$> a) fun x => b) = Seq.seq ((fun b a => f a b) <$> b) fun x => a\n[PROOFSTEP]\nrw [@CommApplicative.commutative_prod m h]\n[GOAL]\nα✝ β✝ γ✝ : Type u\nm✝ : ?m.20624\nm : Type u → Type v\nh : Applicative m\ninst✝ : CommApplicative m\nα β γ : Type u\na : m α\nb : m β\nf : α → β → γ\n⊢ ((fun p => f p.fst p.snd) <$> Seq.seq ((fun b a => (a, b)) <$> b) fun x => a) =\n    Seq.seq ((fun b a => f a b) <$> b) fun x => a\n[PROOFSTEP]\nsimp [seq_map_assoc, map_seq, seq_assoc, seq_pure, map_map, (· ∘ ·)]\n", "meta": {"mathlib_filename": "Mathlib.Control.Basic", "llama_tokens": 7181, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947155710233, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.36816641964831787}}
{"text": "[GOAL]\nM✝ : Type u_1\ninst✝⁵ : CancelMonoidWithZero M✝\ninst✝⁴ : Finite M✝\nM : Type u_2\ninst✝³ : CancelMonoidWithZero M\ninst✝² : DecidableEq M\ninst✝¹ : Fintype M\ninst✝ : Nontrivial M\nsrc✝¹ : Nontrivial M := inst✝\nsrc✝ : CancelMonoidWithZero M := inst✝³\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nsimp [Inv.inv, dif_pos rfl]\n[GOAL]\nM✝ : Type u_1\ninst✝⁵ : CancelMonoidWithZero M✝\ninst✝⁴ : Finite M✝\nM : Type u_2\ninst✝³ : CancelMonoidWithZero M\ninst✝² : DecidableEq M\ninst✝¹ : Fintype M\ninst✝ : Nontrivial M\nsrc✝¹ : Nontrivial M := inst✝\nsrc✝ : CancelMonoidWithZero M := inst✝³\na : M\nha : a ≠ 0\n⊢ a * a⁻¹ = 1\n[PROOFSTEP]\nsimp [Inv.inv, dif_neg ha]\n[GOAL]\nM✝ : Type u_1\ninst✝⁵ : CancelMonoidWithZero M✝\ninst✝⁴ : Finite M✝\nM : Type u_2\ninst✝³ : CancelMonoidWithZero M\ninst✝² : DecidableEq M\ninst✝¹ : Fintype M\ninst✝ : Nontrivial M\nsrc✝¹ : Nontrivial M := inst✝\nsrc✝ : CancelMonoidWithZero M := inst✝³\na : M\nha : a ≠ 0\n⊢ a * bijInv (_ : Bijective fun b => a * b) 1 = 1\n[PROOFSTEP]\nexact Fintype.rightInverse_bijInv _ _\n[GOAL]\nM : Type u_1\ninst✝⁵ : CancelMonoidWithZero M\ninst✝⁴ : Finite M\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : IsDomain R\ninst✝¹ : GCDMonoid R\ninst✝ : Unique Rˣ\na b c : R\nn : ℕ\ncp : IsCoprime a b\nh : a * b = c ^ n\n⊢ ∃ d, a = d ^ n\n[PROOFSTEP]\nrefine' exists_eq_pow_of_mul_eq_pow (isUnit_of_dvd_one _) h\n[GOAL]\nM : Type u_1\ninst✝⁵ : CancelMonoidWithZero M\ninst✝⁴ : Finite M\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : IsDomain R\ninst✝¹ : GCDMonoid R\ninst✝ : Unique Rˣ\na b c : R\nn : ℕ\ncp : IsCoprime a b\nh : a * b = c ^ n\n⊢ GCDMonoid.gcd a b ∣ 1\n[PROOFSTEP]\nobtain ⟨x, y, hxy⟩ := cp\n[GOAL]\ncase intro.intro\nM : Type u_1\ninst✝⁵ : CancelMonoidWithZero M\ninst✝⁴ : Finite M\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : IsDomain R\ninst✝¹ : GCDMonoid R\ninst✝ : Unique Rˣ\na b c : R\nn : ℕ\nh : a * b = c ^ n\nx y : R\nhxy : x * a + y * b = 1\n⊢ GCDMonoid.gcd a b ∣ 1\n[PROOFSTEP]\nrw [← hxy]\n[GOAL]\ncase intro.intro\nM : Type u_1\ninst✝⁵ : CancelMonoidWithZero M\ninst✝⁴ : Finite M\nR : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : IsDomain R\ninst✝¹ : GCDMonoid R\ninst✝ : Unique Rˣ\na b c : R\nn : ℕ\nh : a * b = c ^ n\nx y : R\nhxy : x * a + y * b = 1\n⊢ GCDMonoid.gcd a b ∣ x * a + y * b\n[PROOFSTEP]\nexact\n  -- porting note: added `GCDMonoid.` twicedvd_add (dvd_mul_of_dvd_right (GCDMonoid.gcd_dvd_left _ _) _)\n    (dvd_mul_of_dvd_right (GCDMonoid.gcd_dvd_right _ _) _)\n[GOAL]\nM : Type u_1\ninst✝⁵ : CancelMonoidWithZero M\ninst✝⁴ : Finite M\nι : Type u_2\nR : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : IsDomain R\ninst✝¹ : GCDMonoid R\ninst✝ : Unique Rˣ\nn : ℕ\nc : R\ns : Finset ι\nf : ι → R\nh : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → IsCoprime (f i) (f j)\nhprod : ∏ i in s, f i = c ^ n\n⊢ ∀ (i : ι), i ∈ s → ∃ d, f i = d ^ n\n[PROOFSTEP]\nclassical\nintro i hi\nrw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod \nrefine'\n  exists_eq_pow_of_mul_eq_pow_of_coprime (IsCoprime.prod_right fun j hj => h i hi j (erase_subset i s hj) fun hij => _)\n    hprod\nrw [hij] at hj \nexact (s.not_mem_erase _) hj\n[GOAL]\nM : Type u_1\ninst✝⁵ : CancelMonoidWithZero M\ninst✝⁴ : Finite M\nι : Type u_2\nR : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : IsDomain R\ninst✝¹ : GCDMonoid R\ninst✝ : Unique Rˣ\nn : ℕ\nc : R\ns : Finset ι\nf : ι → R\nh : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → IsCoprime (f i) (f j)\nhprod : ∏ i in s, f i = c ^ n\n⊢ ∀ (i : ι), i ∈ s → ∃ d, f i = d ^ n\n[PROOFSTEP]\nintro i hi\n[GOAL]\nM : Type u_1\ninst✝⁵ : CancelMonoidWithZero M\ninst✝⁴ : Finite M\nι : Type u_2\nR : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : IsDomain R\ninst✝¹ : GCDMonoid R\ninst✝ : Unique Rˣ\nn : ℕ\nc : R\ns : Finset ι\nf : ι → R\nh : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → IsCoprime (f i) (f j)\nhprod : ∏ i in s, f i = c ^ n\ni : ι\nhi : i ∈ s\n⊢ ∃ d, f i = d ^ n\n[PROOFSTEP]\nrw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod \n[GOAL]\nM : Type u_1\ninst✝⁵ : CancelMonoidWithZero M\ninst✝⁴ : Finite M\nι : Type u_2\nR : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : IsDomain R\ninst✝¹ : GCDMonoid R\ninst✝ : Unique Rˣ\nn : ℕ\nc : R\ns : Finset ι\nf : ι → R\nh : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → IsCoprime (f i) (f j)\ni : ι\nhprod : f i * ∏ x in erase s i, f x = c ^ n\nhi : i ∈ s\n⊢ ∃ d, f i = d ^ n\n[PROOFSTEP]\nrefine'\n  exists_eq_pow_of_mul_eq_pow_of_coprime (IsCoprime.prod_right fun j hj => h i hi j (erase_subset i s hj) fun hij => _)\n    hprod\n[GOAL]\nM : Type u_1\ninst✝⁵ : CancelMonoidWithZero M\ninst✝⁴ : Finite M\nι : Type u_2\nR : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : IsDomain R\ninst✝¹ : GCDMonoid R\ninst✝ : Unique Rˣ\nn : ℕ\nc : R\ns : Finset ι\nf : ι → R\nh : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → IsCoprime (f i) (f j)\ni : ι\nhprod : f i * ∏ x in erase s i, f x = c ^ n\nhi : i ∈ s\nj : ι\nhj : j ∈ erase s i\nhij : i = j\n⊢ False\n[PROOFSTEP]\nrw [hij] at hj \n[GOAL]\nM : Type u_1\ninst✝⁵ : CancelMonoidWithZero M\ninst✝⁴ : Finite M\nι : Type u_2\nR : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : IsDomain R\ninst✝¹ : GCDMonoid R\ninst✝ : Unique Rˣ\nn : ℕ\nc : R\ns : Finset ι\nf : ι → R\nh : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → IsCoprime (f i) (f j)\ni : ι\nhprod : f i * ∏ x in erase s i, f x = c ^ n\nhi : i ∈ s\nj : ι\nhj : j ∈ erase s j\nhij : i = j\n⊢ False\n[PROOFSTEP]\nexact (s.not_mem_erase _) hj\n[GOAL]\nR✝ : Type u_1\nG : Type u_2\ninst✝⁵ : Ring R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : Fintype R✝\nR : Type u_3\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Finite R\n⊢ IsField R\n[PROOFSTEP]\ncases nonempty_fintype R\n[GOAL]\ncase intro\nR✝ : Type u_1\nG : Type u_2\ninst✝⁵ : Ring R✝\ninst✝⁴ : IsDomain R✝\ninst✝³ : Fintype R✝\nR : Type u_3\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : Finite R\nval✝ : Fintype R\n⊢ IsField R\n[PROOFSTEP]\nexact @Field.toIsField R (@Fintype.fieldOfDomain R _ _ (Classical.decEq R) _)\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nf : G →* R\nhf : Injective ↑f\nn : ℕ\nhn : 0 < n\ng₀ : G\n⊢ card (filter (fun g => g ^ n = g₀) univ) ≤ ↑Multiset.card (nthRoots n (↑f g₀))\n[PROOFSTEP]\nhaveI : DecidableEq R := Classical.decEq _\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nf : G →* R\nhf : Injective ↑f\nn : ℕ\nhn : 0 < n\ng₀ : G\nthis : DecidableEq R\n⊢ card (filter (fun g => g ^ n = g₀) univ) ≤ ↑Multiset.card (nthRoots n (↑f g₀))\n[PROOFSTEP]\nrefine' le_trans _ (nthRoots n (f g₀)).toFinset_card_le\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nf : G →* R\nhf : Injective ↑f\nn : ℕ\nhn : 0 < n\ng₀ : G\nthis : DecidableEq R\n⊢ card (filter (fun g => g ^ n = g₀) univ) ≤ card (Multiset.toFinset (nthRoots n (↑f g₀)))\n[PROOFSTEP]\napply card_le_card_of_inj_on f\n[GOAL]\ncase hf\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nf : G →* R\nhf : Injective ↑f\nn : ℕ\nhn : 0 < n\ng₀ : G\nthis : DecidableEq R\n⊢ ∀ (a : G), a ∈ filter (fun g => g ^ n = g₀) univ → ↑f a ∈ Multiset.toFinset (nthRoots n (↑f g₀))\n[PROOFSTEP]\nintro g hg\n[GOAL]\ncase hf\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nf : G →* R\nhf : Injective ↑f\nn : ℕ\nhn : 0 < n\ng₀ : G\nthis : DecidableEq R\ng : G\nhg : g ∈ filter (fun g => g ^ n = g₀) univ\n⊢ ↑f g ∈ Multiset.toFinset (nthRoots n (↑f g₀))\n[PROOFSTEP]\nrw [mem_filter] at hg \n[GOAL]\ncase hf\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nf : G →* R\nhf : Injective ↑f\nn : ℕ\nhn : 0 < n\ng₀ : G\nthis : DecidableEq R\ng : G\nhg : g ∈ univ ∧ g ^ n = g₀\n⊢ ↑f g ∈ Multiset.toFinset (nthRoots n (↑f g₀))\n[PROOFSTEP]\nrw [Multiset.mem_toFinset, mem_nthRoots hn, ← f.map_pow, hg.2]\n[GOAL]\ncase f_inj\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nf : G →* R\nhf : Injective ↑f\nn : ℕ\nhn : 0 < n\ng₀ : G\nthis : DecidableEq R\n⊢ ∀ (a₁ : G),\n    a₁ ∈ filter (fun g => g ^ n = g₀) univ →\n      ∀ (a₂ : G), a₂ ∈ filter (fun g => g ^ n = g₀) univ → ↑f a₁ = ↑f a₂ → a₁ = a₂\n[PROOFSTEP]\nintros\n[GOAL]\ncase f_inj\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nf : G →* R\nhf : Injective ↑f\nn : ℕ\nhn : 0 < n\ng₀ : G\nthis : DecidableEq R\na₁✝ : G\na✝² : a₁✝ ∈ filter (fun g => g ^ n = g₀) univ\na₂✝ : G\na✝¹ : a₂✝ ∈ filter (fun g => g ^ n = g₀) univ\na✝ : ↑f a₁✝ = ↑f a₂✝\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\napply hf\n[GOAL]\ncase f_inj.a\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nf : G →* R\nhf : Injective ↑f\nn : ℕ\nhn : 0 < n\ng₀ : G\nthis : DecidableEq R\na₁✝ : G\na✝² : a₁✝ ∈ filter (fun g => g ^ n = g₀) univ\na₂✝ : G\na✝¹ : a₂✝ ∈ filter (fun g => g ^ n = g₀) univ\na✝ : ↑f a₁✝ = ↑f a₂✝\n⊢ ↑f a₁✝ = ↑f a₂✝\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Finite G\nf : G →* R\nhf : Injective ↑f\n⊢ IsCyclic G\n[PROOFSTEP]\nclassical\ncases nonempty_fintype G\napply isCyclic_of_card_pow_eq_one_le\nintro n hn\nexact le_trans (card_nthRoots_subgroup_units f hf hn 1) (card_nthRoots n (f 1))\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Finite G\nf : G →* R\nhf : Injective ↑f\n⊢ IsCyclic G\n[PROOFSTEP]\ncases nonempty_fintype G\n[GOAL]\ncase intro\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Finite G\nf : G →* R\nhf : Injective ↑f\nval✝ : Fintype G\n⊢ IsCyclic G\n[PROOFSTEP]\napply isCyclic_of_card_pow_eq_one_le\n[GOAL]\ncase intro.hn\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Finite G\nf : G →* R\nhf : Injective ↑f\nval✝ : Fintype G\n⊢ ∀ (n : ℕ), 0 < n → card (filter (fun a => a ^ n = 1) univ) ≤ n\n[PROOFSTEP]\nintro n hn\n[GOAL]\ncase intro.hn\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Finite G\nf : G →* R\nhf : Injective ↑f\nval✝ : Fintype G\nn : ℕ\nhn : 0 < n\n⊢ card (filter (fun a => a ^ n = 1) univ) ≤ n\n[PROOFSTEP]\nexact le_trans (card_nthRoots_subgroup_units f hf hn 1) (card_nthRoots n (f 1))\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\nS : Subgroup Rˣ\ninst✝ : Finite { x // x ∈ S }\n⊢ IsCyclic { x // x ∈ S }\n[PROOFSTEP]\napply isCyclic_of_subgroup_isDomain (R := R) (G := S) _ _\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\nS : Subgroup Rˣ\ninst✝ : Finite { x // x ∈ S }\n⊢ { x // x ∈ S } →* R\n[PROOFSTEP]\nexact MonoidHom.mk (OneHom.mk (fun s => ↑s.val) rfl) (by simp)\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\nS : Subgroup Rˣ\ninst✝ : Finite { x // x ∈ S }\n⊢ ∀ (x y : { x // x ∈ S }),\n    OneHom.toFun { toFun := fun s => ↑↑s, map_one' := (_ : (fun s => ↑↑s) 1 = (fun s => ↑↑s) 1) } (x * y) =\n      OneHom.toFun { toFun := fun s => ↑↑s, map_one' := (_ : (fun s => ↑↑s) 1 = (fun s => ↑↑s) 1) } x *\n        OneHom.toFun { toFun := fun s => ↑↑s, map_one' := (_ : (fun s => ↑↑s) 1 = (fun s => ↑↑s) 1) } y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\nS : Subgroup Rˣ\ninst✝ : Finite { x // x ∈ S }\n⊢ Injective\n    ↑{ toOneHom := { toFun := fun s => ↑↑s, map_one' := (_ : (fun s => ↑↑s) 1 = (fun s => ↑↑s) 1) },\n        map_mul' := (_ : ∀ (a a_1 : { x // x ∈ S }), ↑↑a * ↑↑a_1 = ↑↑a * ↑↑a_1) }\n[PROOFSTEP]\nexact Units.ext.comp Subtype.val_injective\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\nK : Type\ninst✝² : Field K\ninst✝¹ : Algebra R[X] K\ninst✝ : IsFractionRing R[X] K\nf g : R[X]\nhg : Monic g\n⊢ ∃ q r,\n    degree r < degree g ∧\n      ↑(algebraMap R[X] K) f / ↑(algebraMap R[X] K) g =\n        ↑(algebraMap R[X] K) q + ↑(algebraMap R[X] K) r / ↑(algebraMap R[X] K) g\n[PROOFSTEP]\nrefine' ⟨f /ₘ g, f %ₘ g, _, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\nK : Type\ninst✝² : Field K\ninst✝¹ : Algebra R[X] K\ninst✝ : IsFractionRing R[X] K\nf g : R[X]\nhg : Monic g\n⊢ degree (f %ₘ g) < degree g\n[PROOFSTEP]\nexact degree_modByMonic_lt _ hg\n[GOAL]\ncase refine'_2\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\nK : Type\ninst✝² : Field K\ninst✝¹ : Algebra R[X] K\ninst✝ : IsFractionRing R[X] K\nf g : R[X]\nhg : Monic g\n⊢ ↑(algebraMap R[X] K) f / ↑(algebraMap R[X] K) g =\n    ↑(algebraMap R[X] K) (f /ₘ g) + ↑(algebraMap R[X] K) (f %ₘ g) / ↑(algebraMap R[X] K) g\n[PROOFSTEP]\nhave hg' : algebraMap R[X] K g ≠ 0 :=\n  -- porting note: the proof was `by exact_mod_cast Monic.ne_zero hg`(map_ne_zero_iff _\n        (IsFractionRing.injective R[X] K)).mpr\n    (Monic.ne_zero hg)\n[GOAL]\ncase refine'_2\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\nK : Type\ninst✝² : Field K\ninst✝¹ : Algebra R[X] K\ninst✝ : IsFractionRing R[X] K\nf g : R[X]\nhg : Monic g\nhg' : ↑(algebraMap R[X] K) g ≠ 0\n⊢ ↑(algebraMap R[X] K) f / ↑(algebraMap R[X] K) g =\n    ↑(algebraMap R[X] K) (f /ₘ g) + ↑(algebraMap R[X] K) (f %ₘ g) / ↑(algebraMap R[X] K) g\n[PROOFSTEP]\nfield_simp [hg']\n  -- porting note: `norm_cast` was here, but does nothing.\n[GOAL]\ncase refine'_2\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\nK : Type\ninst✝² : Field K\ninst✝¹ : Algebra R[X] K\ninst✝ : IsFractionRing R[X] K\nf g : R[X]\nhg : Monic g\nhg' : ↑(algebraMap R[X] K) g ≠ 0\n⊢ ↑(algebraMap R[X] K) f = ↑(algebraMap R[X] K) (f /ₘ g) * ↑(algebraMap R[X] K) g + ↑(algebraMap R[X] K) (f %ₘ g)\n[PROOFSTEP]\nrw [add_comm, mul_comm, ← map_mul, ← map_add, modByMonic_add_div f hg]\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\ninst✝² : Fintype G\nH : Type u_3\ninst✝¹ : Group H\ninst✝ : DecidableEq H\nf : G →* H\nx y : H\nhx : x ∈ Set.range ↑f\nhy : y ∈ Set.range ↑f\n⊢ card (filter (fun g => ↑f g = x) univ) = card (filter (fun g => ↑f g = y) univ)\n[PROOFSTEP]\nrcases hx with ⟨x, rfl⟩\n[GOAL]\ncase intro\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\ninst✝² : Fintype G\nH : Type u_3\ninst✝¹ : Group H\ninst✝ : DecidableEq H\nf : G →* H\ny : H\nhy : y ∈ Set.range ↑f\nx : G\n⊢ card (filter (fun g => ↑f g = ↑f x) univ) = card (filter (fun g => ↑f g = y) univ)\n[PROOFSTEP]\nrcases hy with ⟨y, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\ninst✝² : Fintype G\nH : Type u_3\ninst✝¹ : Group H\ninst✝ : DecidableEq H\nf : G →* H\nx y : G\n⊢ card (filter (fun g => ↑f g = ↑f x) univ) = card (filter (fun g => ↑f g = ↑f y) univ)\n[PROOFSTEP]\nrefine' card_congr (fun g _ => g * x⁻¹ * y) _ _ fun g hg => ⟨g * y⁻¹ * x, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\ninst✝² : Fintype G\nH : Type u_3\ninst✝¹ : Group H\ninst✝ : DecidableEq H\nf : G →* H\nx y : G\n⊢ ∀ (a : G) (ha : a ∈ filter (fun g => ↑f g = ↑f x) univ),\n    (fun g x_1 => g * x⁻¹ * y) a ha ∈ filter (fun g => ↑f g = ↑f y) univ\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [*, mem_filter, one_mul, MonoidHom.map_mul, mem_univ, mul_right_inv,\n  eq_self_iff_true, MonoidHom.map_mul_inv, and_self_iff, forall_true_iff]\n  -- porting note: added the following `simp`\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\ninst✝² : Fintype G\nH : Type u_3\ninst✝¹ : Group H\ninst✝ : DecidableEq H\nf : G →* H\nx y : G\n⊢ ∀ (a : G), True ∧ ↑f a = ↑f x → True ∧ ↑f x * ↑f x⁻¹ * ↑f y = ↑f y\n[PROOFSTEP]\nsimp only [true_and, map_inv, mul_right_inv, one_mul, and_self, implies_true, forall_const]\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\ninst✝² : Fintype G\nH : Type u_3\ninst✝¹ : Group H\ninst✝ : DecidableEq H\nf : G →* H\nx y : G\n⊢ ∀ (a b : G) (ha : a ∈ filter (fun g => ↑f g = ↑f x) univ) (hb : b ∈ filter (fun g => ↑f g = ↑f x) univ),\n    (fun g x_1 => g * x⁻¹ * y) a ha = (fun g x_1 => g * x⁻¹ * y) b hb → a = b\n[PROOFSTEP]\nsimp only [mul_left_inj, imp_self, forall₂_true_iff]\n[GOAL]\ncase intro.intro.refine'_3\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\ninst✝² : Fintype G\nH : Type u_3\ninst✝¹ : Group H\ninst✝ : DecidableEq H\nf : G →* H\nx y g : G\nhg : g ∈ filter (fun g => ↑f g = ↑f y) univ\n⊢ ∃ ha, (fun g x_1 => g * x⁻¹ * y) (g * y⁻¹ * x) ha = g\n[PROOFSTEP]\nsimp only [true_and_iff, mem_filter, mem_univ] at hg \n[GOAL]\ncase intro.intro.refine'_3\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\ninst✝² : Fintype G\nH : Type u_3\ninst✝¹ : Group H\ninst✝ : DecidableEq H\nf : G →* H\nx y g : G\nhg : ↑f g = ↑f y\n⊢ ∃ ha, (fun g x_1 => g * x⁻¹ * y) (g * y⁻¹ * x) ha = g\n[PROOFSTEP]\nsimp only [hg, mem_filter, one_mul, MonoidHom.map_mul, mem_univ, mul_right_inv, eq_self_iff_true, exists_prop_of_true,\n  MonoidHom.map_mul_inv, and_self_iff, mul_inv_cancel_right, inv_mul_cancel_right]\n  -- porting note: added the next line.  It is weird!\n[GOAL]\ncase intro.intro.refine'_3\nR : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : Group G\ninst✝² : Fintype G\nH : Type u_3\ninst✝¹ : Group H\ninst✝ : DecidableEq H\nf : G →* H\nx y g : G\nhg : ↑f g = ↑f y\n⊢ ∃ h, True\n[PROOFSTEP]\nsimp only [map_inv, mul_right_inv, one_mul, and_self, exists_prop]\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\n⊢ ∑ g : G, ↑f g = 0\n[PROOFSTEP]\nclassical\nobtain ⟨x, hx⟩ : ∃ x : MonoidHom.range f.toHomUnits, ∀ y : MonoidHom.range f.toHomUnits, y ∈ Submonoid.powers x\nexact IsCyclic.exists_monoid_generator\nhave hx1 : x ≠ 1 := by\n  rintro rfl\n  apply hf\n  ext g\n  rw [MonoidHom.one_apply]\n  cases' hx ⟨f.toHomUnits g, g, rfl⟩ with n hn\n  rwa [Subtype.ext_iff, Units.ext_iff, Subtype.coe_mk, MonoidHom.coe_toHomUnits, one_pow, eq_comm] at hn \nreplace hx1 :\n  (x.val : R) - 1 ≠\n    0\n      -- porting note: was `(x : R)`\nexact fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))\nlet c := (univ.filter fun g => f.toHomUnits g = 1).card\ncalc\n  ∑ g : G, f g = ∑ g : G, (f.toHomUnits g : R) := rfl\n  _ = ∑ u : Rˣ in univ.image f.toHomUnits, (univ.filter fun g => f.toHomUnits g = u).card • (u : R) :=\n    (sum_comp ((↑) : Rˣ → R) f.toHomUnits)\n  _ = ∑ u : Rˣ in univ.image f.toHomUnits, c • (u : R) :=\n    (sum_congr rfl fun u hu => congr_arg₂ _ ?_ rfl)\n      -- remaining goal 1, proven below\n            -- Porting note: have to change `(b : R)` into `((b : Rˣ) : R)`\n  _ = ∑ b : MonoidHom.range f.toHomUnits, c • ((b : Rˣ) : R) := (Finset.sum_subtype _ (by simp) _)\n  _ = c • ∑ b : MonoidHom.range f.toHomUnits, ((b : Rˣ) : R) := smul_sum.symm\n  _ = c • (0 : R) :=\n    (congr_arg₂ _ rfl ?_)\n      -- remaining goal 2, proven below\n  _ = (0 : R) := smul_zero _\n·\n  -- remaining goal 1\n  show (univ.filter fun g : G => f.toHomUnits g = u).card = c\n  apply card_fiber_eq_of_mem_range f.toHomUnits\n  · simpa only [mem_image, mem_univ, true_and, Set.mem_range] using hu\n  ·\n    exact\n      ⟨1, f.toHomUnits.map_one⟩\n        -- remaining goal 2\nshow (∑ b : MonoidHom.range f.toHomUnits, ((b : Rˣ) : R)) = 0\ncalc\n  (∑ b : MonoidHom.range f.toHomUnits, ((b : Rˣ) : R)) = ∑ n in range (orderOf x), ((x : Rˣ) : R) ^ n :=\n    Eq.symm <|\n      sum_bij (fun n _ => x ^ n) (by simp only [mem_univ, forall_true_iff])\n        (by simp only [imp_true_iff, eq_self_iff_true, Subgroup.coe_pow, Units.val_pow_eq_pow_val])\n        (fun m n hm hn =>\n          pow_injective_of_lt_orderOf _ (by simpa only [mem_range] using hm) (by simpa only [mem_range] using hn))\n        (fun b _ =>\n          let ⟨n, hn⟩ := hx b\n          ⟨n % orderOf x, mem_range.2 (Nat.mod_lt _ (orderOf_pos _)),\n            -- Porting note: have to use `dsimp` to apply the functionby dsimp at hn ⊢; rw [← pow_eq_mod_orderOf, hn]⟩)\n  _ = 0 := ?_\nrw [← mul_left_inj' hx1, zero_mul, geom_sum_mul]\nnorm_cast\nsimp [pow_orderOf_eq_one]\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\n⊢ ∑ g : G, ↑f g = 0\n[PROOFSTEP]\nobtain ⟨x, hx⟩ : ∃ x : MonoidHom.range f.toHomUnits, ∀ y : MonoidHom.range f.toHomUnits, y ∈ Submonoid.powers x\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\n⊢ ∃ x, ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\ncase intro\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\n⊢ ∑ g : G, ↑f g = 0\n[PROOFSTEP]\nexact IsCyclic.exists_monoid_generator\n[GOAL]\ncase intro\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\n⊢ ∑ g : G, ↑f g = 0\n[PROOFSTEP]\nhave hx1 : x ≠ 1 := by\n  rintro rfl\n  apply hf\n  ext g\n  rw [MonoidHom.one_apply]\n  cases' hx ⟨f.toHomUnits g, g, rfl⟩ with n hn\n  rwa [Subtype.ext_iff, Units.ext_iff, Subtype.coe_mk, MonoidHom.coe_toHomUnits, one_pow, eq_comm] at hn \n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\n⊢ x ≠ 1\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers 1\n⊢ False\n[PROOFSTEP]\napply hf\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers 1\n⊢ f = 1\n[PROOFSTEP]\next g\n[GOAL]\ncase h\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers 1\ng : G\n⊢ ↑f g = ↑1 g\n[PROOFSTEP]\nrw [MonoidHom.one_apply]\n[GOAL]\ncase h\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers 1\ng : G\n⊢ ↑f g = 1\n[PROOFSTEP]\ncases' hx ⟨f.toHomUnits g, g, rfl⟩ with n hn\n[GOAL]\ncase h.intro\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers 1\ng : G\nn : ℕ\nhn :\n  (fun x x_1 => x ^ x_1) 1 n =\n    { val := ↑(MonoidHom.toHomUnits f) g,\n      property := (_ : ∃ y, ↑(MonoidHom.toHomUnits f) y = ↑(MonoidHom.toHomUnits f) g) }\n⊢ ↑f g = 1\n[PROOFSTEP]\nrwa [Subtype.ext_iff, Units.ext_iff, Subtype.coe_mk, MonoidHom.coe_toHomUnits, one_pow, eq_comm] at hn \n[GOAL]\ncase intro\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : x ≠ 1\n⊢ ∑ g : G, ↑f g = 0\n[PROOFSTEP]\nreplace hx1 :\n  (x.val : R) - 1 ≠\n    0\n      -- porting note: was `(x : R)`\n[GOAL]\ncase hx1\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : x ≠ 1\n⊢ ↑↑x - 1 ≠ 0\ncase intro\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\n⊢ ∑ g : G, ↑f g = 0\n[PROOFSTEP]\nexact fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))\n[GOAL]\ncase intro\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\n⊢ ∑ g : G, ↑f g = 0\n[PROOFSTEP]\nlet c := (univ.filter fun g => f.toHomUnits g = 1).card\n[GOAL]\ncase intro\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\n⊢ ∑ g : G, ↑f g = 0\n[PROOFSTEP]\ncalc\n  ∑ g : G, f g = ∑ g : G, (f.toHomUnits g : R) := rfl\n  _ = ∑ u : Rˣ in univ.image f.toHomUnits, (univ.filter fun g => f.toHomUnits g = u).card • (u : R) :=\n    (sum_comp ((↑) : Rˣ → R) f.toHomUnits)\n  _ = ∑ u : Rˣ in univ.image f.toHomUnits, c • (u : R) :=\n    (sum_congr rfl fun u hu => congr_arg₂ _ ?_ rfl)\n      -- remaining goal 1, proven below\n            -- Porting note: have to change `(b : R)` into `((b : Rˣ) : R)`\n  _ = ∑ b : MonoidHom.range f.toHomUnits, c • ((b : Rˣ) : R) := (Finset.sum_subtype _ (by simp) _)\n  _ = c • ∑ b : MonoidHom.range f.toHomUnits, ((b : Rˣ) : R) := smul_sum.symm\n  _ = c • (0 : R) :=\n    (congr_arg₂ _ rfl ?_)\n      -- remaining goal 2, proven below\n  _ = (0 : R) := smul_zero _\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\n⊢ ∀ (x : Rˣ), x ∈ image (↑(MonoidHom.toHomUnits f)) univ ↔ x ∈ MonoidHom.range (MonoidHom.toHomUnits f)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.calc_1\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\nu : Rˣ\nhu : u ∈ image (↑(MonoidHom.toHomUnits f)) univ\n⊢ card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = u) univ) = c\n[PROOFSTEP]\nshow (univ.filter fun g : G => f.toHomUnits g = u).card = c\n[GOAL]\ncase intro.calc_1\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\nu : Rˣ\nhu : u ∈ image (↑(MonoidHom.toHomUnits f)) univ\n⊢ card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = u) univ) = c\n[PROOFSTEP]\napply card_fiber_eq_of_mem_range f.toHomUnits\n[GOAL]\ncase intro.calc_1.hx\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\nu : Rˣ\nhu : u ∈ image (↑(MonoidHom.toHomUnits f)) univ\n⊢ u ∈ Set.range ↑(MonoidHom.toHomUnits f)\n[PROOFSTEP]\nsimpa only [mem_image, mem_univ, true_and, Set.mem_range] using hu\n[GOAL]\ncase intro.calc_1.hy\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\nu : Rˣ\nhu : u ∈ image (↑(MonoidHom.toHomUnits f)) univ\n⊢ 1 ∈ Set.range ↑(MonoidHom.toHomUnits f)\n[PROOFSTEP]\nexact\n  ⟨1, f.toHomUnits.map_one⟩\n    -- remaining goal 2\n[GOAL]\ncase intro.calc_2\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\n⊢ ∑ b : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }, ↑↑b = 0\n[PROOFSTEP]\nshow (∑ b : MonoidHom.range f.toHomUnits, ((b : Rˣ) : R)) = 0\n[GOAL]\ncase intro.calc_2\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\n⊢ ∑ b : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }, ↑↑b = 0\n[PROOFSTEP]\ncalc\n  (∑ b : MonoidHom.range f.toHomUnits, ((b : Rˣ) : R)) = ∑ n in range (orderOf x), ((x : Rˣ) : R) ^ n :=\n    Eq.symm <|\n      sum_bij (fun n _ => x ^ n) (by simp only [mem_univ, forall_true_iff])\n        (by simp only [imp_true_iff, eq_self_iff_true, Subgroup.coe_pow, Units.val_pow_eq_pow_val])\n        (fun m n hm hn =>\n          pow_injective_of_lt_orderOf _ (by simpa only [mem_range] using hm) (by simpa only [mem_range] using hn))\n        (fun b _ =>\n          let ⟨n, hn⟩ := hx b\n          ⟨n % orderOf x, mem_range.2 (Nat.mod_lt _ (orderOf_pos _)),\n            -- Porting note: have to use `dsimp` to apply the functionby dsimp at hn ⊢; rw [← pow_eq_mod_orderOf, hn]⟩)\n  _ = 0 := ?_\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\n⊢ ∀ (a : ℕ) (ha : a ∈ range (orderOf x)), (fun n x_1 => x ^ n) a ha ∈ univ\n[PROOFSTEP]\nsimp only [mem_univ, forall_true_iff]\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\n⊢ ∀ (a : ℕ) (ha : a ∈ range (orderOf x)), ↑↑x ^ a = ↑↑((fun n x_1 => x ^ n) a ha)\n[PROOFSTEP]\nsimp only [imp_true_iff, eq_self_iff_true, Subgroup.coe_pow, Units.val_pow_eq_pow_val]\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\nm n : ℕ\nhm : m ∈ range (orderOf x)\nhn : n ∈ range (orderOf x)\n⊢ m < orderOf x\n[PROOFSTEP]\nsimpa only [mem_range] using hm\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\nm n : ℕ\nhm : m ∈ range (orderOf x)\nhn : n ∈ range (orderOf x)\n⊢ n < orderOf x\n[PROOFSTEP]\nsimpa only [mem_range] using hn\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\nb : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nx✝ : b ∈ univ\nn : ℕ\nhn : (fun x x_1 => x ^ x_1) x n = b\n⊢ b = (fun n x_1 => x ^ n) (n % orderOf x) (_ : n % orderOf x ∈ range (orderOf x))\n[PROOFSTEP]\ndsimp at hn ⊢\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\nb : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nx✝ : b ∈ univ\nn : ℕ\nhn : x ^ n = b\n⊢ b = x ^ (n % orderOf x)\n[PROOFSTEP]\nrw [← pow_eq_mod_orderOf, hn]\n[GOAL]\ncase intro.calc_2\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\n⊢ ∑ n in range (orderOf x), ↑↑x ^ n = 0\n[PROOFSTEP]\nrw [← mul_left_inj' hx1, zero_mul, geom_sum_mul]\n[GOAL]\ncase intro.calc_2\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\n⊢ ↑↑x ^ orderOf x - 1 = 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.calc_2\nR : Type u_1\nG : Type u_2\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : Group G\ninst✝ : Fintype G\nf : G →* R\nhf : f ≠ 1\nx : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }\nhx : ∀ (y : { x // x ∈ MonoidHom.range (MonoidHom.toHomUnits f) }), y ∈ Submonoid.powers x\nhx1 : ↑↑x - 1 ≠ 0\nc : ℕ := card (filter (fun g => ↑(MonoidHom.toHomUnits f) g = 1) univ)\n⊢ ↑↑(x ^ orderOf x) - 1 = 0\n[PROOFSTEP]\nsimp [pow_orderOf_eq_one]\n[GOAL]\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\nf : G →* R\ninst✝ : Decidable (f = 1)\n⊢ ∑ g : G, ↑f g = ↑(if f = 1 then Fintype.card G else 0)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\nf : G →* R\ninst✝ : Decidable (f = 1)\nh : f = 1\n⊢ ∑ g : G, ↑f g = ↑(Fintype.card G)\n[PROOFSTEP]\nsimp [h, card_univ]\n[GOAL]\ncase neg\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\nf : G →* R\ninst✝ : Decidable (f = 1)\nh : ¬f = 1\n⊢ ∑ g : G, ↑f g = ↑0\n[PROOFSTEP]\nrw [cast_zero]\n  -- porting note: added\n[GOAL]\ncase neg\nR : Type u_1\nG : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : Group G\ninst✝¹ : Fintype G\nf : G →* R\ninst✝ : Decidable (f = 1)\nh : ¬f = 1\n⊢ ∑ g : G, ↑f g = 0\n[PROOFSTEP]\nexact sum_hom_units_eq_zero f h\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.IntegralDomain", "llama_tokens": 18823, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.672331699179286, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.36758939072995817}}
{"text": "[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni✝ j : ι\na : α i✝\ni : ι\n⊢ range (Sigma.mk i) = Sigma.fst ⁻¹' {i}\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase h₁\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni✝ j : ι\na : α i✝\ni : ι\n⊢ range (Sigma.mk i) ⊆ Sigma.fst ⁻¹' {i}\n[PROOFSTEP]\nrintro _ ⟨b, rfl⟩\n[GOAL]\ncase h₁.intro\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni✝ j : ι\na : α i✝\ni : ι\nb : α i\n⊢ { fst := i, snd := b } ∈ Sigma.fst ⁻¹' {i}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni✝ j : ι\na : α i✝\ni : ι\n⊢ Sigma.fst ⁻¹' {i} ⊆ range (Sigma.mk i)\n[PROOFSTEP]\nrintro ⟨x, y⟩ (rfl | _)\n[GOAL]\ncase h₂.mk.refl\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nx : ι\ny : α x\n⊢ { fst := x, snd := y } ∈ range (Sigma.mk { fst := x, snd := y }.fst)\n[PROOFSTEP]\nexact mem_range_self y\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns✝ s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na : α i\nh : i ≠ j\ns : Set (α j)\n⊢ Sigma.mk i ⁻¹' (Sigma.mk j '' s) = ∅\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns✝ s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nh : i ≠ j\ns : Set (α j)\nx : α i\n⊢ x ∈ Sigma.mk i ⁻¹' (Sigma.mk j '' s) ↔ x ∈ ∅\n[PROOFSTEP]\nsimp [h.symm]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ✝ : ι → Type u_4\ns✝ s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni✝ j : ι\na : α i✝\nβ : ι' → Type u_5\nf : ι → ι'\nhf : Function.Injective f\ng : (i : ι) → α i → β (f i)\ni : ι\ns : Set (β (f i))\n⊢ Sigma.mk i '' (g i ⁻¹' s) = Sigma.map f g ⁻¹' (Sigma.mk (f i) '' s)\n[PROOFSTEP]\nrefine' (image_sigmaMk_preimage_sigmaMap_subset f g i s).antisymm _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ✝ : ι → Type u_4\ns✝ s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni✝ j : ι\na : α i✝\nβ : ι' → Type u_5\nf : ι → ι'\nhf : Function.Injective f\ng : (i : ι) → α i → β (f i)\ni : ι\ns : Set (β (f i))\n⊢ Sigma.map f g ⁻¹' (Sigma.mk (f i) '' s) ⊆ Sigma.mk i '' (g i ⁻¹' s)\n[PROOFSTEP]\nrintro ⟨j, x⟩ ⟨y, hys, hxy⟩\n[GOAL]\ncase mk.intro.intro\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ✝ : ι → Type u_4\ns✝ s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni✝ j✝ : ι\na : α i✝\nβ : ι' → Type u_5\nf : ι → ι'\nhf : Function.Injective f\ng : (i : ι) → α i → β (f i)\ni : ι\ns : Set (β (f i))\nj : ι\nx : α j\ny : β (f i)\nhys : y ∈ s\nhxy : { fst := f i, snd := y } = Sigma.map f g { fst := j, snd := x }\n⊢ { fst := j, snd := x } ∈ Sigma.mk i '' (g i ⁻¹' s)\n[PROOFSTEP]\nsimp only [hf.eq_iff, Sigma.map, Sigma.ext_iff] at hxy \n[GOAL]\ncase mk.intro.intro\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ✝ : ι → Type u_4\ns✝ s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni✝ j✝ : ι\na : α i✝\nβ : ι' → Type u_5\nf : ι → ι'\nhf : Function.Injective f\ng : (i : ι) → α i → β (f i)\ni : ι\ns : Set (β (f i))\nj : ι\nx : α j\ny : β (f i)\nhys : y ∈ s\nhxy : i = j ∧ HEq y (g j x)\n⊢ { fst := j, snd := x } ∈ Sigma.mk i '' (g i ⁻¹' s)\n[PROOFSTEP]\nrcases hxy with ⟨rfl, hxy⟩\n[GOAL]\ncase mk.intro.intro.intro\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ✝ : ι → Type u_4\ns✝ s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni✝ j : ι\na : α i✝\nβ : ι' → Type u_5\nf : ι → ι'\nhf : Function.Injective f\ng : (i : ι) → α i → β (f i)\ni : ι\ns : Set (β (f i))\ny : β (f i)\nhys : y ∈ s\nx : α i\nhxy : HEq y (g i x)\n⊢ { fst := i, snd := x } ∈ Sigma.mk i '' (g i ⁻¹' s)\n[PROOFSTEP]\nrw [heq_iff_eq] at hxy \n[GOAL]\ncase mk.intro.intro.intro\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ✝ : ι → Type u_4\ns✝ s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni✝ j : ι\na : α i✝\nβ : ι' → Type u_5\nf : ι → ι'\nhf : Function.Injective f\ng : (i : ι) → α i → β (f i)\ni : ι\ns : Set (β (f i))\ny : β (f i)\nhys : y ∈ s\nx : α i\nhxy : y = g i x\n⊢ { fst := i, snd := x } ∈ Sigma.mk i '' (g i ⁻¹' s)\n[PROOFSTEP]\nsubst y\n[GOAL]\ncase mk.intro.intro.intro\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ✝ : ι → Type u_4\ns✝ s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni✝ j : ι\na : α i✝\nβ : ι' → Type u_5\nf : ι → ι'\nhf : Function.Injective f\ng : (i : ι) → α i → β (f i)\ni : ι\ns : Set (β (f i))\nx : α i\nhys : g i x ∈ s\n⊢ { fst := i, snd := x } ∈ Sigma.mk i '' (g i ⁻¹' s)\n[PROOFSTEP]\nexact ⟨x, hys, rfl⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nx : (i : ι) × α i\n⊢ x ∈ Set.Sigma {i} t ↔ x ∈ Sigma.mk i '' t i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nx : (i : ι) × α i\n⊢ x ∈ Set.Sigma {i} t → x ∈ Sigma.mk i '' t i\n[PROOFSTEP]\nobtain ⟨j, a⟩ := x\n[GOAL]\ncase mp.mk\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j✝ : ι\na✝ : α i\nj : ι\na : α j\n⊢ { fst := j, snd := a } ∈ Set.Sigma {i} t → { fst := j, snd := a } ∈ Sigma.mk i '' t i\n[PROOFSTEP]\nrintro ⟨rfl : j = i, ha⟩\n[GOAL]\ncase mp.mk.intro\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\nj✝ j : ι\na✝ : α j\nha : { fst := j, snd := a✝ }.snd ∈ t { fst := j, snd := a✝ }.fst\na : α j\n⊢ { fst := j, snd := a✝ } ∈ Sigma.mk j '' t j\n[PROOFSTEP]\nexact mem_image_of_mem _ ha\n[GOAL]\ncase mpr\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nx : (i : ι) × α i\n⊢ x ∈ Sigma.mk i '' t i → x ∈ Set.Sigma {i} t\n[PROOFSTEP]\nrintro ⟨b, hb, rfl⟩\n[GOAL]\ncase mpr.intro.intro\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na b : α i\nhb : b ∈ t i\n⊢ { fst := i, snd := b } ∈ Set.Sigma {i} t\n[PROOFSTEP]\nexact ⟨rfl, hb⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na✝ : α i\na : (i : ι) → α i\n⊢ (Set.Sigma s fun i => {a i}) = (fun i => { fst := i, snd := a i }) '' s\n[PROOFSTEP]\next ⟨x, y⟩\n[GOAL]\ncase h.mk\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na✝ : α i\na : (i : ι) → α i\nx : ι\ny : α x\n⊢ ({ fst := x, snd := y } ∈ Set.Sigma s fun i => {a i}) ↔\n    { fst := x, snd := y } ∈ (fun i => { fst := i, snd := a i }) '' s\n[PROOFSTEP]\nsimp [and_left_comm, eq_comm]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na✝ : α i\na : (i : ι) → α i\n⊢ (Set.Sigma {i} fun i => {a i}) = {{ fst := i, snd := a i }}\n[PROOFSTEP]\nrw [sigma_singleton, image_singleton]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na : α i\n⊢ Set.Sigma s₁ t₁ ∩ Set.Sigma s₂ t₂ = Set.Sigma (s₁ ∩ s₂) fun i => t₁ i ∩ t₂ i\n[PROOFSTEP]\next ⟨x, y⟩\n[GOAL]\ncase h.mk\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nx : ι\ny : α x\n⊢ { fst := x, snd := y } ∈ Set.Sigma s₁ t₁ ∩ Set.Sigma s₂ t₂ ↔\n    { fst := x, snd := y } ∈ Set.Sigma (s₁ ∩ s₂) fun i => t₁ i ∩ t₂ i\n[PROOFSTEP]\nsimp [and_assoc, and_left_comm]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na : α i\n⊢ Set.Sigma (insert i s) t = Sigma.mk i '' t i ∪ Set.Sigma s t\n[PROOFSTEP]\nrw [insert_eq, union_sigma, singleton_sigma]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na : α i\n⊢ α i\n[PROOFSTEP]\nexact a\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na✝ : α i\na : (i : ι) → α i\n⊢ (Set.Sigma s fun i => insert (a i) (t i)) = (fun i => { fst := i, snd := a i }) '' s ∪ Set.Sigma s t\n[PROOFSTEP]\nsimp_rw [insert_eq, sigma_union, sigma_singleton]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na : α i\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ Sigma.mk i ⁻¹' Set.Sigma s t = if i ∈ s then t i else ∅\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na : α i\ninst✝ : DecidablePred fun x => x ∈ s\nh✝ : i ∈ s\n⊢ Sigma.mk i ⁻¹' Set.Sigma s t = t i\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na : α i\ninst✝ : DecidablePred fun x => x ∈ s\nh✝ : ¬i ∈ s\n⊢ Sigma.mk i ⁻¹' Set.Sigma s t = ∅\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ✝ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na : α i\nβ : Type u_5\ninst✝ : DecidablePred fun x => x ∈ s\ng : β → α i\nx✝ : β\n⊢ x✝ ∈ (fun b => { fst := i, snd := g b }) ⁻¹' Set.Sigma s t ↔ x✝ ∈ if i ∈ s then g ⁻¹' t i else ∅\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ✝ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na : α i\nβ : Type u_5\ninst✝ : DecidablePred fun x => x ∈ s\ng : β → α i\nx✝ : β\nh✝ : i ∈ s\n⊢ x✝ ∈ (fun b => { fst := i, snd := g b }) ⁻¹' Set.Sigma s t ↔ x✝ ∈ g ⁻¹' t i\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ✝ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na : α i\nβ : Type u_5\ninst✝ : DecidablePred fun x => x ∈ s\ng : β → α i\nx✝ : β\nh✝ : ¬i ∈ s\n⊢ x✝ ∈ (fun b => { fst := i, snd := g b }) ⁻¹' Set.Sigma s t ↔ x✝ ∈ ∅\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na : α i\nf : (i : ι) → α i → β i\n⊢ ∀ (x : (i : ι) × β i),\n    (x ∈ Set.Sigma univ fun i => range (f i)) ↔ x ∈ range fun x => { fst := x.fst, snd := f x.fst x.snd }\n[PROOFSTEP]\nsimp [range]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx : (i : ι) × α i\ni j : ι\na : α i\n⊢ (¬∃ i, i ∈ s ∧ Set.Nonempty (t i)) ↔ ∀ (i : ι), i ∈ s → t i = ∅\n[PROOFSTEP]\nsimp only [not_nonempty_iff_eq_empty, not_and, not_exists]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nx : (i : ι) × α i\n⊢ x ∈ Set.Sigma s₁ t₁ \\ Set.Sigma s₂ t₂ ↔ x ∈ Set.Sigma s₁ (t₁ \\ t₂) ∪ Set.Sigma (s₁ \\ s₂) t₁\n[PROOFSTEP]\nby_cases h₁ : x.1 ∈ s₁\n[GOAL]\ncase pos\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nx : (i : ι) × α i\nh₁ : x.fst ∈ s₁\n⊢ x ∈ Set.Sigma s₁ t₁ \\ Set.Sigma s₂ t₂ ↔ x ∈ Set.Sigma s₁ (t₁ \\ t₂) ∪ Set.Sigma (s₁ \\ s₂) t₁\n[PROOFSTEP]\nby_cases h₂ : x.2 ∈ t₁ x.1\n[GOAL]\ncase neg\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nx : (i : ι) × α i\nh₁ : ¬x.fst ∈ s₁\n⊢ x ∈ Set.Sigma s₁ t₁ \\ Set.Sigma s₂ t₂ ↔ x ∈ Set.Sigma s₁ (t₁ \\ t₂) ∪ Set.Sigma (s₁ \\ s₂) t₁\n[PROOFSTEP]\nby_cases h₂ : x.2 ∈ t₁ x.1\n[GOAL]\ncase pos\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nx : (i : ι) × α i\nh₁ : x.fst ∈ s₁\nh₂ : x.snd ∈ t₁ x.fst\n⊢ x ∈ Set.Sigma s₁ t₁ \\ Set.Sigma s₂ t₂ ↔ x ∈ Set.Sigma s₁ (t₁ \\ t₂) ∪ Set.Sigma (s₁ \\ s₂) t₁\n[PROOFSTEP]\nsimp [*, ← imp_iff_or_not]\n[GOAL]\ncase neg\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nx : (i : ι) × α i\nh₁ : x.fst ∈ s₁\nh₂ : ¬x.snd ∈ t₁ x.fst\n⊢ x ∈ Set.Sigma s₁ t₁ \\ Set.Sigma s₂ t₂ ↔ x ∈ Set.Sigma s₁ (t₁ \\ t₂) ∪ Set.Sigma (s₁ \\ s₂) t₁\n[PROOFSTEP]\nsimp [*, ← imp_iff_or_not]\n[GOAL]\ncase pos\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nx : (i : ι) × α i\nh₁ : ¬x.fst ∈ s₁\nh₂ : x.snd ∈ t₁ x.fst\n⊢ x ∈ Set.Sigma s₁ t₁ \\ Set.Sigma s₂ t₂ ↔ x ∈ Set.Sigma s₁ (t₁ \\ t₂) ∪ Set.Sigma (s₁ \\ s₂) t₁\n[PROOFSTEP]\nsimp [*, ← imp_iff_or_not]\n[GOAL]\ncase neg\nι : Type u_1\nι' : Type u_2\nα : ι → Type u_3\nβ : ι → Type u_4\ns s₁ s₂ : Set ι\nt t₁ t₂ : (i : ι) → Set (α i)\nu : Set ((i : ι) × α i)\nx✝ : (i : ι) × α i\ni j : ι\na : α i\nx : (i : ι) × α i\nh₁ : ¬x.fst ∈ s₁\nh₂ : ¬x.snd ∈ t₁ x.fst\n⊢ x ∈ Set.Sigma s₁ t₁ \\ Set.Sigma s₂ t₂ ↔ x ∈ Set.Sigma s₁ (t₁ \\ t₂) ∪ Set.Sigma (s₁ \\ s₂) t₁\n[PROOFSTEP]\nsimp [*, ← imp_iff_or_not]\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Sigma", "llama_tokens": 8585, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.712232184238947, "lm_q2_score": 0.5156199157230157, "lm_q1q2_score": 0.3672410988125052}}
{"text": "[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nh : Sbtw ℝ p₁ p₂ p₃\n⊢ dist p₂ p < max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nhave hp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p := by simpa using h.left_ne_right\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nh : Sbtw ℝ p₁ p₂ p₃\n⊢ p₁ -ᵥ p ≠ p₃ -ᵥ p\n[PROOFSTEP]\nsimpa using h.left_ne_right\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nh : Sbtw ℝ p₁ p₂ p₃\nhp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p\n⊢ dist p₂ p < max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nrw [Sbtw, ← wbtw_vsub_const_iff p, Wbtw, affineSegment_eq_segment, ← insert_endpoints_openSegment, Set.mem_insert_iff,\n  Set.mem_insert_iff] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nh : (p₂ -ᵥ p = p₁ -ᵥ p ∨ p₂ -ᵥ p = p₃ -ᵥ p ∨ p₂ -ᵥ p ∈ openSegment ℝ (p₁ -ᵥ p) (p₃ -ᵥ p)) ∧ p₂ ≠ p₁ ∧ p₂ ≠ p₃\nhp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p\n⊢ dist p₂ p < max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nrcases h with ⟨h | h | h, hp₂p₁, hp₂p₃⟩\n[GOAL]\ncase intro.inl.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nhp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p\nh : p₂ -ᵥ p = p₁ -ᵥ p\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ dist p₂ p < max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nrw [vsub_left_cancel_iff] at h \n[GOAL]\ncase intro.inl.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nhp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p\nh : p₂ = p₁\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ dist p₂ p < max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nexact False.elim (hp₂p₁ h)\n[GOAL]\ncase intro.inr.inl.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nhp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p\nh : p₂ -ᵥ p = p₃ -ᵥ p\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ dist p₂ p < max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nrw [vsub_left_cancel_iff] at h \n[GOAL]\ncase intro.inr.inl.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nhp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p\nh : p₂ = p₃\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ dist p₂ p < max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nexact False.elim (hp₂p₃ h)\n[GOAL]\ncase intro.inr.inr.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nhp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p\nh : p₂ -ᵥ p ∈ openSegment ℝ (p₁ -ᵥ p) (p₃ -ᵥ p)\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ dist p₂ p < max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nrw [openSegment_eq_image, Set.mem_image] at h \n[GOAL]\ncase intro.inr.inr.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nhp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p\nh : ∃ x, x ∈ Set.Ioo 0 1 ∧ (1 - x) • (p₁ -ᵥ p) + x • (p₃ -ᵥ p) = p₂ -ᵥ p\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ dist p₂ p < max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nrcases h with ⟨r, ⟨hr0, hr1⟩, hr⟩\n[GOAL]\ncase intro.inr.inr.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nhp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nr : ℝ\nhr : (1 - r) • (p₁ -ᵥ p) + r • (p₃ -ᵥ p) = p₂ -ᵥ p\nhr0 : 0 < r\nhr1 : r < 1\n⊢ dist p₂ p < max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nsimp_rw [@dist_eq_norm_vsub V, ← hr]\n[GOAL]\ncase intro.inr.inr.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nhp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nr : ℝ\nhr : (1 - r) • (p₁ -ᵥ p) + r • (p₃ -ᵥ p) = p₂ -ᵥ p\nhr0 : 0 < r\nhr1 : r < 1\n⊢ ‖(1 - r) • (p₁ -ᵥ p) + r • (p₃ -ᵥ p)‖ < max ‖p₁ -ᵥ p‖ ‖p₃ -ᵥ p‖\n[PROOFSTEP]\nexact norm_combo_lt_of_ne (le_max_left _ _) (le_max_right _ _) hp₁p₃ (sub_pos.2 hr1) hr0 (by abel)\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nhp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nr : ℝ\nhr : (1 - r) • (p₁ -ᵥ p) + r • (p₃ -ᵥ p) = p₂ -ᵥ p\nhr0 : 0 < r\nhr1 : r < 1\n⊢ 1 - r + r = 1\n[PROOFSTEP]\nabel\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nhp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nr : ℝ\nhr : (1 - r) • (p₁ -ᵥ p) + r • (p₃ -ᵥ p) = p₂ -ᵥ p\nhr0 : 0 < r\nhr1 : r < 1\n⊢ 1 - r + r = 1\n[PROOFSTEP]\nabel\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\n⊢ dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nby_cases hp₁ : p₂ = p₁\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₁ : p₂ = p₁\n⊢ dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nsimp [hp₁]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₁ : ¬p₂ = p₁\n⊢ dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nby_cases hp₃ : p₂ = p₃\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₁ : ¬p₂ = p₁\nhp₃ : p₂ = p₃\n⊢ dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nsimp [hp₃]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₁ : ¬p₂ = p₁\nhp₃ : ¬p₂ = p₃\n⊢ dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nhave hs : Sbtw ℝ p₁ p₂ p₃ := ⟨h, hp₁, hp₃⟩\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₁ : ¬p₂ = p₁\nhp₃ : ¬p₂ = p₃\nhs : Sbtw ℝ p₁ p₂ p₃\n⊢ dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)\n[PROOFSTEP]\nexact (hs.dist_lt_max_dist _).le\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nrcases h.wbtw_or_wbtw_or_wbtw with (hw | hw | hw)\n[GOAL]\ncase inl\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₁ p₂ p₃\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nexact hw\n[GOAL]\ncase inr.inl\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₂ p₃ p₁\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nby_cases hp₃p₂ : p₃ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₂ p₃ p₁\nhp₃p₂ : p₃ = p₂\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nsimp [hp₃p₂]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₂ p₃ p₁\nhp₃p₂ : ¬p₃ = p₂\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nhave hs : Sbtw ℝ p₂ p₃ p₁ := ⟨hw, hp₃p₂, hp₁p₃.symm⟩\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₂ p₃ p₁\nhp₃p₂ : ¬p₃ = p₂\nhs : Sbtw ℝ p₂ p₃ p₁\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nhave hs' := hs.dist_lt_max_dist p\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₂ p₃ p₁\nhp₃p₂ : ¬p₃ = p₂\nhs : Sbtw ℝ p₂ p₃ p₁\nhs' : dist p₃ p < max (dist p₂ p) (dist p₁ p)\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nrw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, or_false_iff] at hs' \n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₂ p₃ p₁\nhp₃p₂ : ¬p₃ = p₂\nhs : Sbtw ℝ p₂ p₃ p₁\nhs' : r < dist p₂ p\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nexact False.elim (hp₂.not_lt hs')\n[GOAL]\ncase inr.inr\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₃ p₁ p₂\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nby_cases hp₁p₂ : p₁ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₃ p₁ p₂\nhp₁p₂ : p₁ = p₂\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nsimp [hp₁p₂]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₃ p₁ p₂\nhp₁p₂ : ¬p₁ = p₂\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nhave hs : Sbtw ℝ p₃ p₁ p₂ := ⟨hw, hp₁p₃, hp₁p₂⟩\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₃ p₁ p₂\nhp₁p₂ : ¬p₁ = p₂\nhs : Sbtw ℝ p₃ p₁ p₂\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nhave hs' := hs.dist_lt_max_dist p\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₃ p₁ p₂\nhp₁p₂ : ¬p₁ = p₂\nhs : Sbtw ℝ p₃ p₁ p₂\nhs' : dist p₁ p < max (dist p₃ p) (dist p₂ p)\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nrw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, false_or_iff] at hs' \n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p ≤ r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\nhw : Wbtw ℝ p₃ p₁ p₂\nhp₁p₂ : ¬p₁ = p₂\nhs : Sbtw ℝ p₃ p₁ p₂\nhs' : r < dist p₂ p\n⊢ Wbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nexact False.elim (hp₂.not_lt hs')\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p < r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\n⊢ Sbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nrefine' ⟨h.wbtw_of_dist_eq_of_dist_le hp₁ hp₂.le hp₃ hp₁p₃, _, _⟩\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p < r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\n⊢ p₂ ≠ p₁\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₂ p₃ : P\nr : ℝ\nhp₂ : dist p₂ p < r\nhp₃ : dist p₃ p = r\nh : Collinear ℝ {p₂, p₂, p₃}\nhp₁ : dist p₂ p = r\nhp₁p₃ : p₂ ≠ p₃\n⊢ False\n[PROOFSTEP]\nexact hp₂.ne hp₁\n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ p₃ : P\nr : ℝ\nh : Collinear ℝ {p₁, p₂, p₃}\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p < r\nhp₃ : dist p₃ p = r\nhp₁p₃ : p₁ ≠ p₃\n⊢ p₂ ≠ p₃\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : NormedSpace ℝ V\ninst✝² : PseudoMetricSpace P\ninst✝¹ : NormedAddTorsor V P\ninst✝ : StrictConvexSpace ℝ V\np p₁ p₂ : P\nr : ℝ\nhp₁ : dist p₁ p = r\nhp₂ : dist p₂ p < r\nh : Collinear ℝ {p₁, p₂, p₂}\nhp₃ : dist p₂ p = r\nhp₁p₃ : p₁ ≠ p₂\n⊢ False\n[PROOFSTEP]\nexact hp₂.ne hp₃\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.StrictConvexBetween", "llama_tokens": 8508, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7122321842389469, "lm_q2_score": 0.5156199157230157, "lm_q1q2_score": 0.36724109881250516}}
{"text": "[GOAL]\nG : Type u\ninst✝ : Monoid G\n⊢ ExponentExists G ↔ exponent G ≠ 0\n[PROOFSTEP]\nrw [exponent]\n[GOAL]\nG : Type u\ninst✝ : Monoid G\n⊢ ExponentExists G ↔ (if h : ExponentExists G then Nat.find h else 0) ≠ 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nG : Type u\ninst✝ : Monoid G\nh : ExponentExists G\n⊢ ExponentExists G ↔ Nat.find h ≠ 0\n[PROOFSTEP]\nsimp [h, @not_lt_zero' ℕ]\n  --if this isn't done this way, `to_additive` freaks\n[GOAL]\ncase neg\nG : Type u\ninst✝ : Monoid G\nh : ¬ExponentExists G\n⊢ ExponentExists G ↔ 0 ≠ 0\n[PROOFSTEP]\ntauto\n[GOAL]\nG : Type u\ninst✝ : Monoid G\n⊢ exponent G = 0 ↔ ¬ExponentExists G\n[PROOFSTEP]\nsimp only [exponentExists_iff_ne_zero, Classical.not_not]\n[GOAL]\nG : Type u\ninst✝ : Monoid G\ng : G\n⊢ g ^ exponent G = 1\n[PROOFSTEP]\nby_cases ExponentExists G\n[GOAL]\nG : Type u\ninst✝ : Monoid G\ng : G\n⊢ g ^ exponent G = 1\n[PROOFSTEP]\nby_cases ExponentExists G\n[GOAL]\ncase pos\nG : Type u\ninst✝ : Monoid G\ng : G\nh : ExponentExists G\n⊢ g ^ exponent G = 1\n[PROOFSTEP]\nsimp_rw [exponent, dif_pos h]\n[GOAL]\ncase pos\nG : Type u\ninst✝ : Monoid G\ng : G\nh : ExponentExists G\n⊢ g ^ Nat.find h = 1\n[PROOFSTEP]\nexact (Nat.find_spec h).2 g\n[GOAL]\ncase neg\nG : Type u\ninst✝ : Monoid G\ng : G\nh : ¬ExponentExists G\n⊢ g ^ exponent G = 1\n[PROOFSTEP]\nsimp_rw [exponent, dif_neg h, pow_zero]\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nn : ℕ\ng : G\n⊢ g ^ n = g ^ (n % exponent G + exponent G * (n / exponent G))\n[PROOFSTEP]\nrw [Nat.mod_add_div]\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nn : ℕ\ng : G\n⊢ g ^ (n % exponent G + exponent G * (n / exponent G)) = g ^ (n % exponent G)\n[PROOFSTEP]\nsimp [pow_add, pow_mul, pow_exponent_eq_one]\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nn : ℕ\nhpos : 0 < n\nhG : ∀ (g : G), g ^ n = 1\n⊢ 0 < exponent G\n[PROOFSTEP]\nhave h : ∃ n, 0 < n ∧ ∀ g : G, g ^ n = 1 := ⟨n, hpos, hG⟩\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nn : ℕ\nhpos : 0 < n\nhG : ∀ (g : G), g ^ n = 1\nh : ∃ n, 0 < n ∧ ∀ (g : G), g ^ n = 1\n⊢ 0 < exponent G\n[PROOFSTEP]\nrw [exponent, dif_pos]\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nn : ℕ\nhpos : 0 < n\nhG : ∀ (g : G), g ^ n = 1\nh : ∃ n, 0 < n ∧ ∀ (g : G), g ^ n = 1\n⊢ 0 < Nat.find ?hc\ncase hc\nG : Type u\ninst✝ : Monoid G\nn : ℕ\nhpos : 0 < n\nhG : ∀ (g : G), g ^ n = 1\nh : ∃ n, 0 < n ∧ ∀ (g : G), g ^ n = 1\n⊢ ExponentExists G\n[PROOFSTEP]\nexact (Nat.find_spec h).1\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nn : ℕ\nhpos : 0 < n\nhG : ∀ (g : G), g ^ n = 1\n⊢ exponent G ≤ n\n[PROOFSTEP]\nrw [exponent, dif_pos]\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nn : ℕ\nhpos : 0 < n\nhG : ∀ (g : G), g ^ n = 1\n⊢ Nat.find ?hc ≤ n\n[PROOFSTEP]\napply Nat.find_min'\n[GOAL]\ncase h\nG : Type u\ninst✝ : Monoid G\nn : ℕ\nhpos : 0 < n\nhG : ∀ (g : G), g ^ n = 1\n⊢ 0 < n ∧ ∀ (g : G), g ^ n = 1\n[PROOFSTEP]\nexact ⟨hpos, hG⟩\n[GOAL]\ncase hc\nG : Type u\ninst✝ : Monoid G\nn : ℕ\nhpos : 0 < n\nhG : ∀ (g : G), g ^ n = 1\n⊢ ExponentExists G\n[PROOFSTEP]\nexact ⟨n, hpos, hG⟩\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nm : ℕ\nhpos : 0 < m\nhm : m < exponent G\n⊢ ∃ g, g ^ m ≠ 1\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nm : ℕ\nhpos : 0 < m\nhm : m < exponent G\nh : ∀ (g : G), g ^ m = 1\n⊢ False\n[PROOFSTEP]\nhave hcon : exponent G ≤ m := exponent_min' m hpos h\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nm : ℕ\nhpos : 0 < m\nhm : m < exponent G\nh : ∀ (g : G), g ^ m = 1\nhcon : exponent G ≤ m\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Subsingleton G\n⊢ exponent G = 1\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Subsingleton G\n⊢ exponent G ≤ 1\n[PROOFSTEP]\napply exponent_min' _ Nat.one_pos\n[GOAL]\ncase a\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Subsingleton G\n⊢ ∀ (g : G), g ^ 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Subsingleton G\n⊢ 1 ≤ exponent G\n[PROOFSTEP]\napply Nat.succ_le_of_lt\n[GOAL]\ncase a.h\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Subsingleton G\n⊢ 0 < exponent G\n[PROOFSTEP]\napply exponent_pos_of_exists 1 Nat.one_pos\n[GOAL]\ncase a.h\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Subsingleton G\n⊢ ∀ (g : G), g ^ 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nG✝ : Type u\ninst✝¹ : Monoid G✝\nG : Type u_1\ninst✝ : Monoid G\nn : ℕ\nhG : ∀ (g : G), g ^ n = 1\n⊢ exponent G ∣ n\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hpos)\n[GOAL]\ncase inl\nG✝ : Type u\ninst✝¹ : Monoid G✝\nG : Type u_1\ninst✝ : Monoid G\nhG : ∀ (g : G), g ^ 0 = 1\n⊢ exponent G ∣ 0\n[PROOFSTEP]\nexact dvd_zero _\n[GOAL]\ncase inr\nG✝ : Type u\ninst✝¹ : Monoid G✝\nG : Type u_1\ninst✝ : Monoid G\nn : ℕ\nhG : ∀ (g : G), g ^ n = 1\nhpos : n > 0\n⊢ exponent G ∣ n\n[PROOFSTEP]\napply Nat.dvd_of_mod_eq_zero\n[GOAL]\ncase inr.H\nG✝ : Type u\ninst✝¹ : Monoid G✝\nG : Type u_1\ninst✝ : Monoid G\nn : ℕ\nhG : ∀ (g : G), g ^ n = 1\nhpos : n > 0\n⊢ n % exponent G = 0\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase inr.H\nG✝ : Type u\ninst✝¹ : Monoid G✝\nG : Type u_1\ninst✝ : Monoid G\nn : ℕ\nhG : ∀ (g : G), g ^ n = 1\nhpos : n > 0\nh : ¬n % exponent G = 0\n⊢ False\n[PROOFSTEP]\nhave h₁ := Nat.pos_of_ne_zero h\n[GOAL]\ncase inr.H\nG✝ : Type u\ninst✝¹ : Monoid G✝\nG : Type u_1\ninst✝ : Monoid G\nn : ℕ\nhG : ∀ (g : G), g ^ n = 1\nhpos : n > 0\nh : ¬n % exponent G = 0\nh₁ : 0 < n % exponent G\n⊢ False\n[PROOFSTEP]\nhave h₂ : n % exponent G < exponent G := Nat.mod_lt _ (exponent_pos_of_exists n hpos hG)\n[GOAL]\ncase inr.H\nG✝ : Type u\ninst✝¹ : Monoid G✝\nG : Type u_1\ninst✝ : Monoid G\nn : ℕ\nhG : ∀ (g : G), g ^ n = 1\nhpos : n > 0\nh : ¬n % exponent G = 0\nh₁ : 0 < n % exponent G\nh₂ : n % exponent G < exponent G\n⊢ False\n[PROOFSTEP]\nhave h₃ : exponent G ≤ n % exponent G := by\n  apply exponent_min' _ h₁\n  simp_rw [← pow_eq_mod_exponent]\n  exact hG\n[GOAL]\nG✝ : Type u\ninst✝¹ : Monoid G✝\nG : Type u_1\ninst✝ : Monoid G\nn : ℕ\nhG : ∀ (g : G), g ^ n = 1\nhpos : n > 0\nh : ¬n % exponent G = 0\nh₁ : 0 < n % exponent G\nh₂ : n % exponent G < exponent G\n⊢ exponent G ≤ n % exponent G\n[PROOFSTEP]\napply exponent_min' _ h₁\n[GOAL]\nG✝ : Type u\ninst✝¹ : Monoid G✝\nG : Type u_1\ninst✝ : Monoid G\nn : ℕ\nhG : ∀ (g : G), g ^ n = 1\nhpos : n > 0\nh : ¬n % exponent G = 0\nh₁ : 0 < n % exponent G\nh₂ : n % exponent G < exponent G\n⊢ ∀ (g : G), g ^ (n % exponent G) = 1\n[PROOFSTEP]\nsimp_rw [← pow_eq_mod_exponent]\n[GOAL]\nG✝ : Type u\ninst✝¹ : Monoid G✝\nG : Type u_1\ninst✝ : Monoid G\nn : ℕ\nhG : ∀ (g : G), g ^ n = 1\nhpos : n > 0\nh : ¬n % exponent G = 0\nh₁ : 0 < n % exponent G\nh₂ : n % exponent G < exponent G\n⊢ ∀ (g : G), g ^ n = 1\n[PROOFSTEP]\nexact hG\n[GOAL]\ncase inr.H\nG✝ : Type u\ninst✝¹ : Monoid G✝\nG : Type u_1\ninst✝ : Monoid G\nn : ℕ\nhG : ∀ (g : G), g ^ n = 1\nhpos : n > 0\nh : ¬n % exponent G = 0\nh₁ : 0 < n % exponent G\nh₂ : n % exponent G < exponent G\nh₃ : exponent G ≤ n % exponent G\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Fintype G\n⊢ Finset.lcm Finset.univ orderOf ∣ exponent G\n[PROOFSTEP]\napply Finset.lcm_dvd\n[GOAL]\ncase a\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Fintype G\n⊢ ∀ (b : G), b ∈ Finset.univ → orderOf b ∣ exponent G\n[PROOFSTEP]\nintro g _\n[GOAL]\ncase a\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Fintype G\ng : G\na✝ : g ∈ Finset.univ\n⊢ orderOf g ∣ exponent G\n[PROOFSTEP]\nexact order_dvd_exponent g\n[GOAL]\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\n⊢ ∃ g, orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\n[PROOFSTEP]\nhaveI := Fact.mk hp\n[GOAL]\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\n⊢ ∃ g, orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\n[PROOFSTEP]\nrcases eq_or_ne ((exponent G).factorization p) 0 with (h | h)\n[GOAL]\ncase inl\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : ↑(Nat.factorization (exponent G)) p = 0\n⊢ ∃ g, orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\n[PROOFSTEP]\nrefine' ⟨1, by rw [h, pow_zero, orderOf_one]⟩\n[GOAL]\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : ↑(Nat.factorization (exponent G)) p = 0\n⊢ orderOf 1 = p ^ ↑(Nat.factorization (exponent G)) p\n[PROOFSTEP]\nrw [h, pow_zero, orderOf_one]\n[GOAL]\ncase inr\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : ↑(Nat.factorization (exponent G)) p ≠ 0\n⊢ ∃ g, orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\n[PROOFSTEP]\nhave he : 0 < exponent G :=\n  Ne.bot_lt fun ht => by\n    rw [ht] at h \n    apply h\n    rw [bot_eq_zero, Nat.factorization_zero, Finsupp.zero_apply]\n[GOAL]\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : ↑(Nat.factorization (exponent G)) p ≠ 0\nht : exponent G = ⊥\n⊢ False\n[PROOFSTEP]\nrw [ht] at h \n[GOAL]\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : ↑(Nat.factorization ⊥) p ≠ 0\nht : exponent G = ⊥\n⊢ False\n[PROOFSTEP]\napply h\n[GOAL]\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : ↑(Nat.factorization ⊥) p ≠ 0\nht : exponent G = ⊥\n⊢ ↑(Nat.factorization ⊥) p = 0\n[PROOFSTEP]\nrw [bot_eq_zero, Nat.factorization_zero, Finsupp.zero_apply]\n[GOAL]\ncase inr\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : ↑(Nat.factorization (exponent G)) p ≠ 0\nhe : 0 < exponent G\n⊢ ∃ g, orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\n[PROOFSTEP]\nrw [← Finsupp.mem_support_iff] at h \n[GOAL]\ncase inr\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : p ∈ (Nat.factorization (exponent G)).support\nhe : 0 < exponent G\n⊢ ∃ g, orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\n[PROOFSTEP]\nobtain ⟨g, hg⟩ : ∃ g : G, g ^ (exponent G / p) ≠ 1 :=\n  by\n  suffices key : ¬exponent G ∣ exponent G / p\n  · simpa using mt (exponent_dvd_of_forall_pow_eq_one G (exponent G / p)) key\n  exact fun hd =>\n    hp.one_lt.not_le\n      ((mul_le_iff_le_one_left he).mp <| Nat.le_of_dvd he <| Nat.mul_dvd_of_dvd_div (Nat.dvd_of_mem_factorization h) hd)\n[GOAL]\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : p ∈ (Nat.factorization (exponent G)).support\nhe : 0 < exponent G\n⊢ ∃ g, g ^ (exponent G / p) ≠ 1\n[PROOFSTEP]\nsuffices key : ¬exponent G ∣ exponent G / p\n[GOAL]\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : p ∈ (Nat.factorization (exponent G)).support\nhe : 0 < exponent G\nkey : ¬exponent G ∣ exponent G / p\n⊢ ∃ g, g ^ (exponent G / p) ≠ 1\n[PROOFSTEP]\nsimpa using mt (exponent_dvd_of_forall_pow_eq_one G (exponent G / p)) key\n[GOAL]\ncase key\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : p ∈ (Nat.factorization (exponent G)).support\nhe : 0 < exponent G\n⊢ ¬exponent G ∣ exponent G / p\n[PROOFSTEP]\nexact fun hd =>\n  hp.one_lt.not_le\n    ((mul_le_iff_le_one_left he).mp <| Nat.le_of_dvd he <| Nat.mul_dvd_of_dvd_div (Nat.dvd_of_mem_factorization h) hd)\n[GOAL]\ncase inr.intro\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : p ∈ (Nat.factorization (exponent G)).support\nhe : 0 < exponent G\ng : G\nhg : g ^ (exponent G / p) ≠ 1\n⊢ ∃ g, orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\n[PROOFSTEP]\nobtain ⟨k, hk : exponent G = p ^ _ * k⟩ := Nat.ord_proj_dvd _ _\n[GOAL]\ncase inr.intro.intro\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : p ∈ (Nat.factorization (exponent G)).support\nhe : 0 < exponent G\ng : G\nhg : g ^ (exponent G / p) ≠ 1\nk : ℕ\nhk : exponent G = p ^ ↑(Nat.factorization (exponent G)) p * k\n⊢ ∃ g, orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := Nat.exists_eq_succ_of_ne_zero (Finsupp.mem_support_iff.mp h)\n[GOAL]\ncase inr.intro.intro.intro\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : p ∈ (Nat.factorization (exponent G)).support\nhe : 0 < exponent G\ng : G\nhg : g ^ (exponent G / p) ≠ 1\nk : ℕ\nhk : exponent G = p ^ ↑(Nat.factorization (exponent G)) p * k\nt : ℕ\nht : ↑(Nat.factorization (exponent G)) p = Nat.succ t\n⊢ ∃ g, orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\n[PROOFSTEP]\nrefine' ⟨g ^ k, _⟩\n[GOAL]\ncase inr.intro.intro.intro\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : p ∈ (Nat.factorization (exponent G)).support\nhe : 0 < exponent G\ng : G\nhg : g ^ (exponent G / p) ≠ 1\nk : ℕ\nhk : exponent G = p ^ ↑(Nat.factorization (exponent G)) p * k\nt : ℕ\nht : ↑(Nat.factorization (exponent G)) p = Nat.succ t\n⊢ orderOf (g ^ k) = p ^ ↑(Nat.factorization (exponent G)) p\n[PROOFSTEP]\nrw [ht]\n[GOAL]\ncase inr.intro.intro.intro\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : p ∈ (Nat.factorization (exponent G)).support\nhe : 0 < exponent G\ng : G\nhg : g ^ (exponent G / p) ≠ 1\nk : ℕ\nhk : exponent G = p ^ ↑(Nat.factorization (exponent G)) p * k\nt : ℕ\nht : ↑(Nat.factorization (exponent G)) p = Nat.succ t\n⊢ orderOf (g ^ k) = p ^ Nat.succ t\n[PROOFSTEP]\napply orderOf_eq_prime_pow\n[GOAL]\ncase inr.intro.intro.intro.hnot\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : p ∈ (Nat.factorization (exponent G)).support\nhe : 0 < exponent G\ng : G\nhg : g ^ (exponent G / p) ≠ 1\nk : ℕ\nhk : exponent G = p ^ ↑(Nat.factorization (exponent G)) p * k\nt : ℕ\nht : ↑(Nat.factorization (exponent G)) p = Nat.succ t\n⊢ ¬(g ^ k) ^ p ^ t = 1\n[PROOFSTEP]\nrwa [hk, mul_comm, ht, pow_succ', ← mul_assoc, Nat.mul_div_cancel _ hp.pos, pow_mul] at hg \n[GOAL]\ncase inr.intro.intro.intro.hfin\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : p ∈ (Nat.factorization (exponent G)).support\nhe : 0 < exponent G\ng : G\nhg : g ^ (exponent G / p) ≠ 1\nk : ℕ\nhk : exponent G = p ^ ↑(Nat.factorization (exponent G)) p * k\nt : ℕ\nht : ↑(Nat.factorization (exponent G)) p = Nat.succ t\n⊢ (g ^ k) ^ p ^ (t + 1) = 1\n[PROOFSTEP]\nrw [← Nat.succ_eq_add_one, ← ht, ← pow_mul, mul_comm, ← hk]\n[GOAL]\ncase inr.intro.intro.intro.hfin\nG : Type u\ninst✝ : Monoid G\np : ℕ\nhp : Nat.Prime p\nthis : Fact (Nat.Prime p)\nh : p ∈ (Nat.factorization (exponent G)).support\nhe : 0 < exponent G\ng : G\nhg : g ^ (exponent G / p) ≠ 1\nk : ℕ\nhk : exponent G = p ^ ↑(Nat.factorization (exponent G)) p * k\nt : ℕ\nht : ↑(Nat.factorization (exponent G)) p = Nat.succ t\n⊢ g ^ exponent G = 1\n[PROOFSTEP]\nexact pow_exponent_eq_one g\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\n⊢ exponent G ≠ 0 ↔ Set.Finite (Set.range orderOf)\n[PROOFSTEP]\nrefine' ⟨fun he => _, fun he => _⟩\n[GOAL]\ncase refine'_1\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\n⊢ Set.Finite (Set.range orderOf)\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase refine'_1\nG : Type u\ninst✝ : Monoid G\nh✝ : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nh : ¬Set.Finite (Set.range orderOf)\n⊢ False\n[PROOFSTEP]\nobtain ⟨m, ⟨t, rfl⟩, het⟩ := Set.Infinite.exists_gt h (exponent G)\n[GOAL]\ncase refine'_1.intro.intro.intro\nG : Type u\ninst✝ : Monoid G\nh✝ : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nh : ¬Set.Finite (Set.range orderOf)\nt : G\nhet : exponent G < orderOf t\n⊢ False\n[PROOFSTEP]\nexact pow_ne_one_of_lt_orderOf' he het (pow_exponent_eq_one t)\n[GOAL]\ncase refine'_2\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : Set.Finite (Set.range orderOf)\n⊢ exponent G ≠ 0\n[PROOFSTEP]\nlift Set.range (orderOf (G := G)) to Finset ℕ using he with t ht\n[GOAL]\ncase refine'_2.intro\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\n⊢ exponent G ≠ 0\n[PROOFSTEP]\nhave htpos : 0 < t.prod id := by\n  refine' Finset.prod_pos fun a ha => _\n  rw [← Finset.mem_coe, ht] at ha \n  obtain ⟨k, rfl⟩ := ha\n  exact h k\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\n⊢ 0 < Finset.prod t id\n[PROOFSTEP]\nrefine' Finset.prod_pos fun a ha => _\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\na : ℕ\nha : a ∈ t\n⊢ 0 < id a\n[PROOFSTEP]\nrw [← Finset.mem_coe, ht] at ha \n[GOAL]\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\na : ℕ\nha : a ∈ Set.range orderOf\n⊢ 0 < id a\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := ha\n[GOAL]\ncase intro\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\nk : G\n⊢ 0 < id (orderOf k)\n[PROOFSTEP]\nexact h k\n[GOAL]\ncase refine'_2.intro\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\nhtpos : 0 < Finset.prod t id\n⊢ exponent G ≠ 0\n[PROOFSTEP]\nsuffices exponent G ∣ t.prod id by\n  intro h\n  rw [h, zero_dvd_iff] at this \n  exact htpos.ne' this\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\nhtpos : 0 < Finset.prod t id\nthis : exponent G ∣ Finset.prod t id\n⊢ exponent G ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nh✝ : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\nhtpos : 0 < Finset.prod t id\nthis : exponent G ∣ Finset.prod t id\nh : exponent G = 0\n⊢ False\n[PROOFSTEP]\nrw [h, zero_dvd_iff] at this \n[GOAL]\nG : Type u\ninst✝ : Monoid G\nh✝ : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\nhtpos : 0 < Finset.prod t id\nthis : Finset.prod t id = 0\nh : exponent G = 0\n⊢ False\n[PROOFSTEP]\nexact htpos.ne' this\n[GOAL]\ncase refine'_2.intro\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\nhtpos : 0 < Finset.prod t id\n⊢ exponent G ∣ Finset.prod t id\n[PROOFSTEP]\nrefine' exponent_dvd_of_forall_pow_eq_one _ _ fun g => _\n[GOAL]\ncase refine'_2.intro\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\nhtpos : 0 < Finset.prod t id\ng : G\n⊢ g ^ Finset.prod t id = 1\n[PROOFSTEP]\nrw [pow_eq_mod_orderOf, Nat.mod_eq_zero_of_dvd, pow_zero g]\n[GOAL]\ncase refine'_2.intro\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\nhtpos : 0 < Finset.prod t id\ng : G\n⊢ orderOf g ∣ Finset.prod t id\n[PROOFSTEP]\napply Finset.dvd_prod_of_mem\n[GOAL]\ncase refine'_2.intro.ha\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\nhtpos : 0 < Finset.prod t id\ng : G\n⊢ Function.minimalPeriod (fun x => g * x) 1 ∈ t\n[PROOFSTEP]\nrw [← Finset.mem_coe, ht]\n[GOAL]\ncase refine'_2.intro.ha\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nt : Finset ℕ\nht : ↑t = Set.range orderOf\nexponent_ne_zero_iff_range_orderOf_finite✝ exponent_ne_zero_iff_range_orderOf_finite :\n  (∀ (g : G), 0 < orderOf g) → (exponent G ≠ 0 ↔ Set.Finite ↑t)\nhtpos : 0 < Finset.prod t id\ng : G\n⊢ Function.minimalPeriod (fun x => g * x) 1 ∈ Set.range orderOf\n[PROOFSTEP]\nexact Set.mem_range_self g\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\n⊢ exponent G = 0 ↔ Set.Infinite (Set.range orderOf)\n[PROOFSTEP]\nhave := exponent_ne_zero_iff_range_orderOf_finite h\n[GOAL]\nG : Type u\ninst✝ : Monoid G\nh : ∀ (g : G), 0 < orderOf g\nthis : exponent G ≠ 0 ↔ Set.Finite (Set.range orderOf)\n⊢ exponent G = 0 ↔ Set.Infinite (Set.range orderOf)\n[PROOFSTEP]\nrwa [Ne.def, not_iff_comm, Iff.comm] at this \n[GOAL]\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Fintype G\n⊢ Finset.lcm Finset.univ orderOf = exponent G\n[PROOFSTEP]\napply Nat.dvd_antisymm (lcm_orderOf_dvd_exponent G)\n[GOAL]\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Fintype G\n⊢ exponent G ∣ Finset.lcm Finset.univ orderOf\n[PROOFSTEP]\nrefine' exponent_dvd_of_forall_pow_eq_one G _ fun g => _\n[GOAL]\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Fintype G\ng : G\n⊢ g ^ Finset.lcm Finset.univ orderOf = 1\n[PROOFSTEP]\nobtain ⟨m, hm⟩ : orderOf g ∣ Finset.univ.lcm orderOf := Finset.dvd_lcm (Finset.mem_univ g)\n[GOAL]\ncase intro\nG : Type u\ninst✝¹ : Monoid G\ninst✝ : Fintype G\ng : G\nm : ℕ\nhm : Finset.lcm Finset.univ orderOf = orderOf g * m\n⊢ g ^ Finset.lcm Finset.univ orderOf = 1\n[PROOFSTEP]\nrw [hm, pow_mul, pow_orderOf_eq_one, one_pow]\n[GOAL]\nG : Type u\ninst✝¹ : LeftCancelMonoid G\ninst✝ : Finite G\n⊢ exponent G ≠ 0\n[PROOFSTEP]\ncases nonempty_fintype G\n[GOAL]\ncase intro\nG : Type u\ninst✝¹ : LeftCancelMonoid G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ exponent G ≠ 0\n[PROOFSTEP]\nsimpa [← lcm_order_eq_exponent, Finset.lcm_eq_zero_iff] using fun x => (orderOf_pos x).ne'\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\n⊢ exponent G = ⨆ (g : G), orderOf g\n[PROOFSTEP]\nrw [iSup]\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\n⊢ exponent G = sSup (Set.range fun g => orderOf g)\n[PROOFSTEP]\nrcases eq_or_ne (exponent G) 0 with (he | he)\n[GOAL]\ncase inl\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G = 0\n⊢ exponent G = sSup (Set.range fun g => orderOf g)\n[PROOFSTEP]\nrw [he, Set.Infinite.Nat.sSup_eq_zero <| (exponent_eq_zero_iff_range_orderOf_infinite h).1 he]\n[GOAL]\ncase inr\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\n⊢ exponent G = sSup (Set.range fun g => orderOf g)\n[PROOFSTEP]\nhave hne : (Set.range (orderOf : G → ℕ)).Nonempty := ⟨1, 1, orderOf_one⟩\n[GOAL]\ncase inr\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\n⊢ exponent G = sSup (Set.range fun g => orderOf g)\n[PROOFSTEP]\nhave hfin : (Set.range (orderOf : G → ℕ)).Finite := by rwa [← exponent_ne_zero_iff_range_orderOf_finite h]\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\n⊢ Set.Finite (Set.range orderOf)\n[PROOFSTEP]\nrwa [← exponent_ne_zero_iff_range_orderOf_finite h]\n[GOAL]\ncase inr\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\n⊢ exponent G = sSup (Set.range fun g => orderOf g)\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := hne.cSup_mem hfin\n[GOAL]\ncase inr.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\n⊢ exponent G = sSup (Set.range fun g => orderOf g)\n[PROOFSTEP]\napply Nat.dvd_antisymm _\n[GOAL]\ncase inr.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\n⊢ sSup (Set.range fun g => orderOf g) ∣ exponent G\n[PROOFSTEP]\nrw [← ht]\n[GOAL]\ncase inr.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\n⊢ orderOf t ∣ exponent G\n[PROOFSTEP]\napply order_dvd_exponent\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\n⊢ exponent G ∣ sSup (Set.range fun g => orderOf g)\n[PROOFSTEP]\nrefine' Nat.dvd_of_factors_subperm he _\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\n⊢ Nat.factors (exponent G) <+~ Nat.factors (sSup (Set.range fun g => orderOf g))\n[PROOFSTEP]\nrw [List.subperm_ext_iff]\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\n⊢ ∀ (x : ℕ),\n    x ∈ Nat.factors (exponent G) →\n      List.count x (Nat.factors (exponent G)) ≤ List.count x (Nat.factors (sSup (Set.range fun g => orderOf g)))\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh✝ : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\nh :\n  ∃ x,\n    x ∈ Nat.factors (exponent G) ∧\n      List.count x (Nat.factors (sSup (Set.range fun g => orderOf g))) < List.count x (Nat.factors (exponent G))\n⊢ False\n[PROOFSTEP]\nobtain ⟨p, hp, hpe⟩ := h\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : p ∈ Nat.factors (exponent G)\nhpe : List.count p (Nat.factors (sSup (Set.range fun g => orderOf g))) < List.count p (Nat.factors (exponent G))\n⊢ False\n[PROOFSTEP]\nreplace hp := Nat.prime_of_mem_factors hp\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhpe : List.count p (Nat.factors (sSup (Set.range fun g => orderOf g))) < List.count p (Nat.factors (exponent G))\nhp : Nat.Prime p\n⊢ False\n[PROOFSTEP]\nsimp only [Nat.factors_count_eq] at hpe \n[GOAL]\ncase intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\n⊢ False\n[PROOFSTEP]\nset k := (orderOf t).factorization p with hk\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\n⊢ False\n[PROOFSTEP]\nobtain ⟨g, hg⟩ := hp.exists_orderOf_eq_pow_factorization_exponent G\n[GOAL]\ncase intro.intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\n⊢ False\n[PROOFSTEP]\nsuffices orderOf t < orderOf (t ^ p ^ k * g) by\n  rw [ht] at this \n  exact this.not_le (le_csSup hfin.bddAbove <| Set.mem_range_self _)\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nthis : orderOf t < orderOf (t ^ p ^ k * g)\n⊢ False\n[PROOFSTEP]\nrw [ht] at this \n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nthis : sSup (Set.range orderOf) < orderOf (t ^ p ^ k * g)\n⊢ False\n[PROOFSTEP]\nexact this.not_le (le_csSup hfin.bddAbove <| Set.mem_range_self _)\n[GOAL]\ncase intro.intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\n⊢ orderOf t < orderOf (t ^ p ^ k * g)\n[PROOFSTEP]\nhave hpk : p ^ k ∣ orderOf t := Nat.ord_proj_dvd _ _\n[GOAL]\ncase intro.intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\n⊢ orderOf t < orderOf (t ^ p ^ k * g)\n[PROOFSTEP]\nhave hpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k := by\n  rw [orderOf_pow' t (pow_ne_zero k hp.ne_zero), Nat.gcd_eq_right hpk]\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\n⊢ orderOf (t ^ p ^ k) = orderOf t / p ^ k\n[PROOFSTEP]\nrw [orderOf_pow' t (pow_ne_zero k hp.ne_zero), Nat.gcd_eq_right hpk]\n[GOAL]\ncase intro.intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\n⊢ orderOf t < orderOf (t ^ p ^ k * g)\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := Nat.exists_eq_add_of_lt hpe\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\n⊢ orderOf t < orderOf (t ^ p ^ k * g)\n[PROOFSTEP]\nhave hcoprime : (orderOf (t ^ p ^ k)).coprime (orderOf g) :=\n  by\n  rw [hg, Nat.coprime_pow_right_iff (pos_of_gt hpe), Nat.coprime_comm]\n  apply Or.resolve_right (Nat.coprime_or_dvd_of_prime hp _)\n  nth_rw 1 [← pow_one p]\n  have : 1 = (Nat.factorization (orderOf (t ^ p ^ k))) p + 1 :=\n    by\n    rw [hpk', Nat.factorization_div hpk]\n    simp [hp]\n  rw [this]\n    -- Porting note: convert made to_additive complain\n  apply Nat.pow_succ_factorization_not_dvd (h <| t ^ p ^ k).ne' hp\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\n⊢ Nat.coprime (orderOf (t ^ p ^ k)) (orderOf g)\n[PROOFSTEP]\nrw [hg, Nat.coprime_pow_right_iff (pos_of_gt hpe), Nat.coprime_comm]\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\n⊢ Nat.coprime p (orderOf (t ^ p ^ k))\n[PROOFSTEP]\napply Or.resolve_right (Nat.coprime_or_dvd_of_prime hp _)\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\n⊢ ¬p ∣ orderOf (t ^ p ^ k)\n[PROOFSTEP]\nnth_rw 1 [← pow_one p]\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\n⊢ ¬p ^ 1 ∣ orderOf (t ^ p ^ k)\n[PROOFSTEP]\nhave : 1 = (Nat.factorization (orderOf (t ^ p ^ k))) p + 1 :=\n  by\n  rw [hpk', Nat.factorization_div hpk]\n  simp [hp]\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\n⊢ 1 = ↑(Nat.factorization (orderOf (t ^ p ^ k))) p + 1\n[PROOFSTEP]\nrw [hpk', Nat.factorization_div hpk]\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\n⊢ 1 = ↑(Nat.factorization (orderOf t) - Nat.factorization (p ^ k)) p + 1\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\nthis : 1 = ↑(Nat.factorization (orderOf (t ^ p ^ k))) p + 1\n⊢ ¬p ^ 1 ∣ orderOf (t ^ p ^ k)\n[PROOFSTEP]\nrw [this]\n  -- Porting note: convert made to_additive complain\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\nthis : 1 = ↑(Nat.factorization (orderOf (t ^ p ^ k))) p + 1\n⊢ ¬p ^ (↑(Nat.factorization (orderOf (t ^ p ^ k))) p + 1) ∣ orderOf (t ^ p ^ k)\n[PROOFSTEP]\napply Nat.pow_succ_factorization_not_dvd (h <| t ^ p ^ k).ne' hp\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\nhcoprime : Nat.coprime (orderOf (t ^ p ^ k)) (orderOf g)\n⊢ orderOf t < orderOf (t ^ p ^ k * g)\n[PROOFSTEP]\nrw [(Commute.all _ g).orderOf_mul_eq_mul_orderOf_of_coprime hcoprime, hpk', hg, ha, ← ht, ← hk, pow_add, pow_add,\n  pow_one, ← mul_assoc, ← mul_assoc, Nat.div_mul_cancel, mul_assoc, lt_mul_iff_one_lt_right <| h t, ← pow_succ']\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\nhcoprime : Nat.coprime (orderOf (t ^ p ^ k)) (orderOf g)\n⊢ 1 < p ^ (a + 1)\ncase intro.intro.intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\nhcoprime : Nat.coprime (orderOf (t ^ p ^ k)) (orderOf g)\n⊢ p ^ k ∣ orderOf t\n[PROOFSTEP]\nexact one_lt_pow hp.one_lt a.succ_ne_zero\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u\ninst✝ : CommMonoid G\nh : ∀ (g : G), 0 < orderOf g\nhe : exponent G ≠ 0\nhne : Set.Nonempty (Set.range orderOf)\nhfin : Set.Finite (Set.range orderOf)\nt : G\nht : orderOf t = sSup (Set.range orderOf)\np : ℕ\nhp : Nat.Prime p\nhpe : ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p < ↑(Nat.factorization (exponent G)) p\nk : ℕ := ↑(Nat.factorization (orderOf t)) p\nhk : k = ↑(Nat.factorization (orderOf t)) p\ng : G\nhg : orderOf g = p ^ ↑(Nat.factorization (exponent G)) p\nhpk : p ^ k ∣ orderOf t\nhpk' : orderOf (t ^ p ^ k) = orderOf t / p ^ k\na : ℕ\nha : ↑(Nat.factorization (exponent G)) p = ↑(Nat.factorization (sSup (Set.range fun g => orderOf g))) p + a + 1\nhcoprime : Nat.coprime (orderOf (t ^ p ^ k)) (orderOf g)\n⊢ p ^ k ∣ orderOf t\n[PROOFSTEP]\nexact hpk\n[GOAL]\nG : Type u\ninst✝ : CommMonoid G\n⊢ exponent G = if ∃ g, orderOf g = 0 then 0 else ⨆ (g : G), orderOf g\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nG : Type u\ninst✝ : CommMonoid G\nh : ∃ g, orderOf g = 0\n⊢ exponent G = 0\n[PROOFSTEP]\nobtain ⟨g, hg⟩ := h\n[GOAL]\ncase pos.intro\nG : Type u\ninst✝ : CommMonoid G\ng : G\nhg : orderOf g = 0\n⊢ exponent G = 0\n[PROOFSTEP]\nexact exponent_eq_zero_of_order_zero hg\n[GOAL]\ncase neg\nG : Type u\ninst✝ : CommMonoid G\nh : ¬∃ g, orderOf g = 0\n⊢ exponent G = ⨆ (g : G), orderOf g\n[PROOFSTEP]\nhave := not_exists.mp h\n[GOAL]\ncase neg\nG : Type u\ninst✝ : CommMonoid G\nh : ¬∃ g, orderOf g = 0\nthis : ∀ (x : G), ¬orderOf x = 0\n⊢ exponent G = ⨆ (g : G), orderOf g\n[PROOFSTEP]\nexact exponent_eq_iSup_orderOf fun g => Ne.bot_lt <| this g\n[GOAL]\nG : Type u\ninst✝¹ : CancelCommMonoid G\ninst✝ : Fintype G\n⊢ 1 ∈ Finset.image orderOf Finset.univ\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u\ninst✝¹ : CancelCommMonoid G\ninst✝ : Fintype G\n⊢ exponent G = Finset.max' (Finset.image orderOf Finset.univ) (_ : ∃ x, x ∈ Finset.image orderOf Finset.univ)\n[PROOFSTEP]\nrw [← Finset.Nonempty.cSup_eq_max', Finset.coe_image, Finset.coe_univ, Set.image_univ, ← iSup]\n[GOAL]\nG : Type u\ninst✝¹ : CancelCommMonoid G\ninst✝ : Fintype G\n⊢ exponent G = iSup orderOf\n[PROOFSTEP]\nexact exponent_eq_iSup_orderOf orderOf_pos\n[GOAL]\nG : Type u\ninst✝¹ : CommGroup G\ninst✝ : Group.FG G\n⊢ Nat.card G ∣ Monoid.exponent G ^ Group.rank G\n[PROOFSTEP]\nobtain ⟨S, hS1, hS2⟩ := Group.rank_spec G\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝¹ : CommGroup G\ninst✝ : Group.FG G\nS : Finset G\nhS1 : Finset.card S = Group.rank G\nhS2 : closure ↑S = ⊤\n⊢ Nat.card G ∣ Monoid.exponent G ^ Group.rank G\n[PROOFSTEP]\nrw [← hS1, ← Fintype.card_coe, ← Finset.card_univ, ← Finset.prod_const]\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝¹ : CommGroup G\ninst✝ : Group.FG G\nS : Finset G\nhS1 : Finset.card S = Group.rank G\nhS2 : closure ↑S = ⊤\n⊢ Nat.card G ∣ ∏ _x : { x // x ∈ S }, Monoid.exponent G\n[PROOFSTEP]\nlet f : (∀ g : S, zpowers (g : G)) →* G := noncommPiCoprod fun s t _ x y _ _ => mul_comm x _\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝¹ : CommGroup G\ninst✝ : Group.FG G\nS : Finset G\nhS1 : Finset.card S = Group.rank G\nhS2 : closure ↑S = ⊤\nf : ((g : { x // x ∈ S }) → { x // x ∈ zpowers ↑g }) →* G :=\n  noncommPiCoprod (_ : ∀ (s t : { x // x ∈ S }), s ≠ t → ∀ (x y : G), x ∈ zpowers ↑s → y ∈ zpowers ↑t → x * y = y * x)\n⊢ Nat.card G ∣ ∏ _x : { x // x ∈ S }, Monoid.exponent G\n[PROOFSTEP]\nhave hf : Function.Surjective f :=\n  by\n  rw [← MonoidHom.range_top_iff_surjective, eq_top_iff, ← hS2, closure_le]\n  exact fun g hg => ⟨Pi.mulSingle ⟨g, hg⟩ ⟨g, mem_zpowers g⟩, noncommPiCoprod_mulSingle _ _⟩\n[GOAL]\nG : Type u\ninst✝¹ : CommGroup G\ninst✝ : Group.FG G\nS : Finset G\nhS1 : Finset.card S = Group.rank G\nhS2 : closure ↑S = ⊤\nf : ((g : { x // x ∈ S }) → { x // x ∈ zpowers ↑g }) →* G :=\n  noncommPiCoprod (_ : ∀ (s t : { x // x ∈ S }), s ≠ t → ∀ (x y : G), x ∈ zpowers ↑s → y ∈ zpowers ↑t → x * y = y * x)\n⊢ Function.Surjective ↑f\n[PROOFSTEP]\nrw [← MonoidHom.range_top_iff_surjective, eq_top_iff, ← hS2, closure_le]\n[GOAL]\nG : Type u\ninst✝¹ : CommGroup G\ninst✝ : Group.FG G\nS : Finset G\nhS1 : Finset.card S = Group.rank G\nhS2 : closure ↑S = ⊤\nf : ((g : { x // x ∈ S }) → { x // x ∈ zpowers ↑g }) →* G :=\n  noncommPiCoprod (_ : ∀ (s t : { x // x ∈ S }), s ≠ t → ∀ (x y : G), x ∈ zpowers ↑s → y ∈ zpowers ↑t → x * y = y * x)\n⊢ ↑S ⊆ ↑(MonoidHom.range f)\n[PROOFSTEP]\nexact fun g hg => ⟨Pi.mulSingle ⟨g, hg⟩ ⟨g, mem_zpowers g⟩, noncommPiCoprod_mulSingle _ _⟩\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝¹ : CommGroup G\ninst✝ : Group.FG G\nS : Finset G\nhS1 : Finset.card S = Group.rank G\nhS2 : closure ↑S = ⊤\nf : ((g : { x // x ∈ S }) → { x // x ∈ zpowers ↑g }) →* G :=\n  noncommPiCoprod (_ : ∀ (s t : { x // x ∈ S }), s ≠ t → ∀ (x y : G), x ∈ zpowers ↑s → y ∈ zpowers ↑t → x * y = y * x)\nhf : Function.Surjective ↑f\n⊢ Nat.card G ∣ ∏ _x : { x // x ∈ S }, Monoid.exponent G\n[PROOFSTEP]\nreplace hf := nat_card_dvd_of_surjective f hf\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝¹ : CommGroup G\ninst✝ : Group.FG G\nS : Finset G\nhS1 : Finset.card S = Group.rank G\nhS2 : closure ↑S = ⊤\nf : ((g : { x // x ∈ S }) → { x // x ∈ zpowers ↑g }) →* G :=\n  noncommPiCoprod (_ : ∀ (s t : { x // x ∈ S }), s ≠ t → ∀ (x y : G), x ∈ zpowers ↑s → y ∈ zpowers ↑t → x * y = y * x)\nhf : Nat.card G ∣ Nat.card ((g : { x // x ∈ S }) → { x // x ∈ zpowers ↑g })\n⊢ Nat.card G ∣ ∏ _x : { x // x ∈ S }, Monoid.exponent G\n[PROOFSTEP]\nrw [Nat.card_pi] at hf \n[GOAL]\ncase intro.intro\nG : Type u\ninst✝¹ : CommGroup G\ninst✝ : Group.FG G\nS : Finset G\nhS1 : Finset.card S = Group.rank G\nhS2 : closure ↑S = ⊤\nf : ((g : { x // x ∈ S }) → { x // x ∈ zpowers ↑g }) →* G :=\n  noncommPiCoprod (_ : ∀ (s t : { x // x ∈ S }), s ≠ t → ∀ (x y : G), x ∈ zpowers ↑s → y ∈ zpowers ↑t → x * y = y * x)\nhf✝ : Nat.card G ∣ Nat.card ((g : { x // x ∈ S }) → { x // x ∈ zpowers ↑g })\nhf : Nat.card G ∣ ∏ a : { x // x ∈ S }, Nat.card { x // x ∈ zpowers ↑a }\n⊢ Nat.card G ∣ ∏ _x : { x // x ∈ S }, Monoid.exponent G\n[PROOFSTEP]\nrefine' hf.trans (Finset.prod_dvd_prod_of_dvd _ _ fun g _ => _)\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝¹ : CommGroup G\ninst✝ : Group.FG G\nS : Finset G\nhS1 : Finset.card S = Group.rank G\nhS2 : closure ↑S = ⊤\nf : ((g : { x // x ∈ S }) → { x // x ∈ zpowers ↑g }) →* G :=\n  noncommPiCoprod (_ : ∀ (s t : { x // x ∈ S }), s ≠ t → ∀ (x y : G), x ∈ zpowers ↑s → y ∈ zpowers ↑t → x * y = y * x)\nhf✝ : Nat.card G ∣ Nat.card ((g : { x // x ∈ S }) → { x // x ∈ zpowers ↑g })\nhf : Nat.card G ∣ ∏ a : { x // x ∈ S }, Nat.card { x // x ∈ zpowers ↑a }\ng : { x // x ∈ S }\nx✝ : g ∈ Finset.univ\n⊢ Nat.card { x // x ∈ zpowers ↑g } ∣ Monoid.exponent G\n[PROOFSTEP]\nrw [← order_eq_card_zpowers']\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝¹ : CommGroup G\ninst✝ : Group.FG G\nS : Finset G\nhS1 : Finset.card S = Group.rank G\nhS2 : closure ↑S = ⊤\nf : ((g : { x // x ∈ S }) → { x // x ∈ zpowers ↑g }) →* G :=\n  noncommPiCoprod (_ : ∀ (s t : { x // x ∈ S }), s ≠ t → ∀ (x y : G), x ∈ zpowers ↑s → y ∈ zpowers ↑t → x * y = y * x)\nhf✝ : Nat.card G ∣ Nat.card ((g : { x // x ∈ S }) → { x // x ∈ zpowers ↑g })\nhf : Nat.card G ∣ ∏ a : { x // x ∈ S }, Nat.card { x // x ∈ zpowers ↑a }\ng : { x // x ∈ S }\nx✝ : g ∈ Finset.univ\n⊢ orderOf ↑g ∣ Monoid.exponent G\n[PROOFSTEP]\nexact Monoid.order_dvd_exponent (g : G)\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Exponent", "llama_tokens": 23559, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7401743620390162, "lm_q2_score": 0.4960938294709195, "lm_q1q2_score": 0.3671959337401303}}
{"text": "[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nx y : X\nhxz : IsMaximal x (x ⊔ y)\nhyz : IsMaximal y (x ⊔ y)\n⊢ IsMaximal (x ⊓ y) y\n[PROOFSTEP]\nrw [inf_comm]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nx y : X\nhxz : IsMaximal x (x ⊔ y)\nhyz : IsMaximal y (x ⊔ y)\n⊢ IsMaximal (y ⊓ x) y\n[PROOFSTEP]\nrw [sup_comm] at hxz hyz \n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nx y : X\nhxz : IsMaximal x (y ⊔ x)\nhyz : IsMaximal y (y ⊔ x)\n⊢ IsMaximal (y ⊓ x) y\n[PROOFSTEP]\nexact isMaximal_inf_left_of_isMaximal_sup hyz hxz\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nx b a y : X\nha : x ⊓ y = a\nhxy : x ≠ y\nhxb : IsMaximal x b\nhyb : IsMaximal y b\n⊢ IsMaximal a y\n[PROOFSTEP]\nhave hb : x ⊔ y = b := sup_eq_of_isMaximal hxb hyb hxy\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nx b a y : X\nha : x ⊓ y = a\nhxy : x ≠ y\nhxb : IsMaximal x b\nhyb : IsMaximal y b\nhb : x ⊔ y = b\n⊢ IsMaximal a y\n[PROOFSTEP]\nsubsts a b\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nx y : X\nhxy : x ≠ y\nhxb : IsMaximal x (x ⊔ y)\nhyb : IsMaximal y (x ⊔ y)\n⊢ IsMaximal (x ⊓ y) y\n[PROOFSTEP]\nexact isMaximal_inf_right_of_isMaximal_sup hxb hyb\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nx y a b : X\nhm : IsMaximal x a\nha : x ⊔ y = a\nhb : x ⊓ y = b\n⊢ Iso (x, a) (b, y)\n[PROOFSTEP]\nsubsts a b\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nx y : X\nhm : IsMaximal x (x ⊔ y)\n⊢ Iso (x, x ⊔ y) (x ⊓ y, y)\n[PROOFSTEP]\nexact second_iso hm\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx y : X\nhx : x ∈ s\nhy : y ∈ s\n⊢ x ≤ y ∨ y ≤ x\n[PROOFSTEP]\nrcases Set.mem_range.1 hx with ⟨i, rfl⟩\n[GOAL]\ncase intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ny : X\nhy : y ∈ s\ni : Fin (s.length + 1)\nhx : series s i ∈ s\n⊢ series s i ≤ y ∨ y ≤ series s i\n[PROOFSTEP]\nrcases Set.mem_range.1 hy with ⟨j, rfl⟩\n[GOAL]\ncase intro.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length + 1)\nhx : series s i ∈ s\nj : Fin (s.length + 1)\nhy : series s j ∈ s\n⊢ series s i ≤ series s j ∨ series s j ≤ series s i\n[PROOFSTEP]\nrw [s.strictMono.le_iff_le, s.strictMono.le_iff_le]\n[GOAL]\ncase intro.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length + 1)\nhx : series s i ∈ s\nj : Fin (s.length + 1)\nhy : series s j ∈ s\n⊢ i ≤ j ∨ j ≤ i\n[PROOFSTEP]\nexact le_total i j\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhl : s₁.length = s₂.length\nh :\n  ∀ (i : Fin (s₁.length + 1)), series s₁ i = series s₂ (↑(Fin.castIso (_ : Nat.succ s₁.length = Nat.succ s₂.length)) i)\n⊢ s₁ = s₂\n[PROOFSTEP]\ncases s₁\n[GOAL]\ncase mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₂ : CompositionSeries X\nlength✝ : ℕ\nseries✝ : Fin (length✝ + 1) → X\nstep'✝ : ∀ (i : Fin length✝), IsMaximal (series✝ (Fin.castSucc i)) (series✝ (Fin.succ i))\nhl : { length := length✝, series := series✝, step' := step'✝ }.length = s₂.length\nh :\n  ∀ (i : Fin ({ length := length✝, series := series✝, step' := step'✝ }.length + 1)),\n    series { length := length✝, series := series✝, step' := step'✝ } i =\n      series s₂\n        (↑(Fin.castIso\n              (_ : Nat.succ { length := length✝, series := series✝, step' := step'✝ }.length = Nat.succ s₂.length))\n          i)\n⊢ { length := length✝, series := series✝, step' := step'✝ } = s₂\n[PROOFSTEP]\ncases s₂\n[GOAL]\ncase mk.mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nlength✝¹ : ℕ\nseries✝¹ : Fin (length✝¹ + 1) → X\nstep'✝¹ : ∀ (i : Fin length✝¹), IsMaximal (series✝¹ (Fin.castSucc i)) (series✝¹ (Fin.succ i))\nlength✝ : ℕ\nseries✝ : Fin (length✝ + 1) → X\nstep'✝ : ∀ (i : Fin length✝), IsMaximal (series✝ (Fin.castSucc i)) (series✝ (Fin.succ i))\nhl :\n  { length := length✝¹, series := series✝¹, step' := step'✝¹ }.length =\n    { length := length✝, series := series✝, step' := step'✝ }.length\nh :\n  ∀ (i : Fin ({ length := length✝¹, series := series✝¹, step' := step'✝¹ }.length + 1)),\n    series { length := length✝¹, series := series✝¹, step' := step'✝¹ } i =\n      series { length := length✝, series := series✝, step' := step'✝ }\n        (↑(Fin.castIso\n              (_ :\n                Nat.succ { length := length✝¹, series := series✝¹, step' := step'✝¹ }.length =\n                  Nat.succ { length := length✝, series := series✝, step' := step'✝ }.length))\n          i)\n⊢ { length := length✝¹, series := series✝¹, step' := step'✝¹ } =\n    { length := length✝, series := series✝, step' := step'✝ }\n[PROOFSTEP]\ndsimp at hl h \n[GOAL]\ncase mk.mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nlength✝¹ : ℕ\nseries✝¹ : Fin (length✝¹ + 1) → X\nstep'✝¹ : ∀ (i : Fin length✝¹), IsMaximal (series✝¹ (Fin.castSucc i)) (series✝¹ (Fin.succ i))\nlength✝ : ℕ\nseries✝ : Fin (length✝ + 1) → X\nstep'✝ : ∀ (i : Fin length✝), IsMaximal (series✝ (Fin.castSucc i)) (series✝ (Fin.succ i))\nhl : length✝¹ = length✝\nh : ∀ (i : Fin (length✝¹ + 1)), series✝¹ i = series✝ (↑(Fin.castIso (_ : Nat.succ length✝¹ = Nat.succ length✝)) i)\n⊢ { length := length✝¹, series := series✝¹, step' := step'✝¹ } =\n    { length := length✝, series := series✝, step' := step'✝ }\n[PROOFSTEP]\nsubst hl\n[GOAL]\ncase mk.mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nlength✝ : ℕ\nseries✝¹ : Fin (length✝ + 1) → X\nstep'✝¹ : ∀ (i : Fin length✝), IsMaximal (series✝¹ (Fin.castSucc i)) (series✝¹ (Fin.succ i))\nseries✝ : Fin (length✝ + 1) → X\nstep'✝ : ∀ (i : Fin length✝), IsMaximal (series✝ (Fin.castSucc i)) (series✝ (Fin.succ i))\nh : ∀ (i : Fin (length✝ + 1)), series✝¹ i = series✝ (↑(Fin.castIso (_ : Nat.succ length✝ = Nat.succ length✝)) i)\n⊢ { length := length✝, series := series✝¹, step' := step'✝¹ } =\n    { length := length✝, series := series✝, step' := step'✝ }\n[PROOFSTEP]\nsimpa [Function.funext_iff] using h\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\n⊢ List.length (toList s) = s.length + 1\n[PROOFSTEP]\nrw [toList, List.length_ofFn]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\n⊢ toList s ≠ []\n[PROOFSTEP]\nrw [← List.length_pos_iff_ne_nil, length_toList]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\n⊢ 0 < s.length + 1\n[PROOFSTEP]\nexact Nat.succ_pos _\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : List.ofFn s₁.series = List.ofFn s₂.series\n⊢ s₁ = s₂\n[PROOFSTEP]\nhave h₁ : s₁.length = s₂.length :=\n  Nat.succ_injective ((List.length_ofFn s₁).symm.trans <| (congr_arg List.length h).trans <| List.length_ofFn s₂)\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : List.ofFn s₁.series = List.ofFn s₂.series\nh₁ : s₁.length = s₂.length\n⊢ s₁ = s₂\n[PROOFSTEP]\nhave h₂ : ∀ i : Fin s₁.length.succ, s₁ i = s₂ (Fin.castIso (congr_arg Nat.succ h₁) i) :=\n  -- Porting note: `List.nthLe_ofFn` has been deprecated but `List.get_ofFn` has a\n      --               different type, so we do golf here.congr_fun <|\n    List.ofFn_injective <| h.trans <| List.ofFn_congr (congr_arg Nat.succ h₁).symm _\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : List.ofFn s₁.series = List.ofFn s₂.series\nh₁ : s₁.length = s₂.length\nh₂ :\n  ∀ (i : Fin (Nat.succ s₁.length)),\n    series s₁ i = series s₂ (↑(Fin.castIso (_ : Nat.succ s₁.length = Nat.succ s₂.length)) i)\n⊢ s₁ = s₂\n[PROOFSTEP]\ncases s₁\n[GOAL]\ncase mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₂ : CompositionSeries X\nlength✝ : ℕ\nseries✝ : Fin (length✝ + 1) → X\nstep'✝ : ∀ (i : Fin length✝), IsMaximal (series✝ (Fin.castSucc i)) (series✝ (Fin.succ i))\nh : List.ofFn { length := length✝, series := series✝, step' := step'✝ }.series = List.ofFn s₂.series\nh₁ : { length := length✝, series := series✝, step' := step'✝ }.length = s₂.length\nh₂ :\n  ∀ (i : Fin (Nat.succ { length := length✝, series := series✝, step' := step'✝ }.length)),\n    series { length := length✝, series := series✝, step' := step'✝ } i =\n      series s₂\n        (↑(Fin.castIso\n              (_ : Nat.succ { length := length✝, series := series✝, step' := step'✝ }.length = Nat.succ s₂.length))\n          i)\n⊢ { length := length✝, series := series✝, step' := step'✝ } = s₂\n[PROOFSTEP]\ncases s₂\n[GOAL]\ncase mk.mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nlength✝¹ : ℕ\nseries✝¹ : Fin (length✝¹ + 1) → X\nstep'✝¹ : ∀ (i : Fin length✝¹), IsMaximal (series✝¹ (Fin.castSucc i)) (series✝¹ (Fin.succ i))\nlength✝ : ℕ\nseries✝ : Fin (length✝ + 1) → X\nstep'✝ : ∀ (i : Fin length✝), IsMaximal (series✝ (Fin.castSucc i)) (series✝ (Fin.succ i))\nh :\n  List.ofFn { length := length✝¹, series := series✝¹, step' := step'✝¹ }.series =\n    List.ofFn { length := length✝, series := series✝, step' := step'✝ }.series\nh₁ :\n  { length := length✝¹, series := series✝¹, step' := step'✝¹ }.length =\n    { length := length✝, series := series✝, step' := step'✝ }.length\nh₂ :\n  ∀ (i : Fin (Nat.succ { length := length✝¹, series := series✝¹, step' := step'✝¹ }.length)),\n    series { length := length✝¹, series := series✝¹, step' := step'✝¹ } i =\n      series { length := length✝, series := series✝, step' := step'✝ }\n        (↑(Fin.castIso\n              (_ :\n                Nat.succ { length := length✝¹, series := series✝¹, step' := step'✝¹ }.length =\n                  Nat.succ { length := length✝, series := series✝, step' := step'✝ }.length))\n          i)\n⊢ { length := length✝¹, series := series✝¹, step' := step'✝¹ } =\n    { length := length✝, series := series✝, step' := step'✝ }\n[PROOFSTEP]\ndsimp at h h₁ h₂ \n[GOAL]\ncase mk.mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nlength✝¹ : ℕ\nseries✝¹ : Fin (length✝¹ + 1) → X\nstep'✝¹ : ∀ (i : Fin length✝¹), IsMaximal (series✝¹ (Fin.castSucc i)) (series✝¹ (Fin.succ i))\nlength✝ : ℕ\nseries✝ : Fin (length✝ + 1) → X\nstep'✝ : ∀ (i : Fin length✝), IsMaximal (series✝ (Fin.castSucc i)) (series✝ (Fin.succ i))\nh : List.ofFn series✝¹ = List.ofFn series✝\nh₁ : length✝¹ = length✝\nh₂ : ∀ (i : Fin (Nat.succ length✝¹)), series✝¹ i = series✝ (↑(Fin.castIso (_ : Nat.succ length✝¹ = Nat.succ length✝)) i)\n⊢ { length := length✝¹, series := series✝¹, step' := step'✝¹ } =\n    { length := length✝, series := series✝, step' := step'✝ }\n[PROOFSTEP]\nsubst h₁\n[GOAL]\ncase mk.mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nlength✝ : ℕ\nseries✝¹ : Fin (length✝ + 1) → X\nstep'✝¹ : ∀ (i : Fin length✝), IsMaximal (series✝¹ (Fin.castSucc i)) (series✝¹ (Fin.succ i))\nseries✝ : Fin (length✝ + 1) → X\nstep'✝ : ∀ (i : Fin length✝), IsMaximal (series✝ (Fin.castSucc i)) (series✝ (Fin.succ i))\nh : List.ofFn series✝¹ = List.ofFn series✝\nh₂ : ∀ (i : Fin (Nat.succ length✝)), series✝¹ i = series✝ (↑(Fin.castIso (_ : Nat.succ length✝ = Nat.succ length✝)) i)\n⊢ { length := length✝, series := series✝¹, step' := step'✝¹ } =\n    { length := length✝, series := series✝, step' := step'✝ }\n[PROOFSTEP]\nsimp only [mk.injEq, heq_eq_eq, true_and]\n[GOAL]\ncase mk.mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nlength✝ : ℕ\nseries✝¹ : Fin (length✝ + 1) → X\nstep'✝¹ : ∀ (i : Fin length✝), IsMaximal (series✝¹ (Fin.castSucc i)) (series✝¹ (Fin.succ i))\nseries✝ : Fin (length✝ + 1) → X\nstep'✝ : ∀ (i : Fin length✝), IsMaximal (series✝ (Fin.castSucc i)) (series✝ (Fin.succ i))\nh : List.ofFn series✝¹ = List.ofFn series✝\nh₂ : ∀ (i : Fin (Nat.succ length✝)), series✝¹ i = series✝ (↑(Fin.castIso (_ : Nat.succ length✝ = Nat.succ length✝)) i)\n⊢ series✝¹ = series✝\n[PROOFSTEP]\nsimp only [Fin.castIso_refl] at h₂ \n[GOAL]\ncase mk.mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nlength✝ : ℕ\nseries✝¹ : Fin (length✝ + 1) → X\nstep'✝¹ : ∀ (i : Fin length✝), IsMaximal (series✝¹ (Fin.castSucc i)) (series✝¹ (Fin.succ i))\nseries✝ : Fin (length✝ + 1) → X\nstep'✝ : ∀ (i : Fin length✝), IsMaximal (series✝ (Fin.castSucc i)) (series✝ (Fin.succ i))\nh : List.ofFn series✝¹ = List.ofFn series✝\nh₂ : ∀ (i : Fin (Nat.succ length✝)), series✝¹ i = series✝ (↑(OrderIso.refl (Fin (Nat.succ length✝))) i)\n⊢ series✝¹ = series✝\n[PROOFSTEP]\nexact funext h₂\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\n⊢ ∀ (i : ℕ) (h : i < List.length (toList s) - 1),\n    IsMaximal (List.get (toList s) { val := i, isLt := (_ : i < List.length (toList s)) })\n      (List.get (toList s) { val := i + 1, isLt := (_ : Nat.succ i < List.length (toList s)) })\n[PROOFSTEP]\nintro i hi\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : ℕ\nhi : i < List.length (toList s) - 1\n⊢ IsMaximal (List.get (toList s) { val := i, isLt := (_ : i < List.length (toList s)) })\n    (List.get (toList s) { val := i + 1, isLt := (_ : Nat.succ i < List.length (toList s)) })\n[PROOFSTEP]\nsimp only [toList, List.get_ofFn]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : ℕ\nhi : i < List.length (toList s) - 1\n⊢ IsMaximal\n    (series s\n      (↑(Fin.castIso (_ : List.length (List.ofFn s.series) = s.length + 1))\n        { val := i, isLt := (_ : i < List.length (toList s)) }))\n    (series s\n      (↑(Fin.castIso (_ : List.length (List.ofFn s.series) = s.length + 1))\n        { val := i + 1, isLt := (_ : Nat.succ i < List.length (toList s)) }))\n[PROOFSTEP]\nrw [length_toList] at hi \n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : ℕ\nhi✝ : i < List.length (toList s) - 1\nhi : i < s.length + 1 - 1\n⊢ IsMaximal\n    (series s\n      (↑(Fin.castIso (_ : List.length (List.ofFn s.series) = s.length + 1))\n        { val := i, isLt := (_ : i < List.length (toList s)) }))\n    (series s\n      (↑(Fin.castIso (_ : List.length (List.ofFn s.series) = s.length + 1))\n        { val := i + 1, isLt := (_ : Nat.succ i < List.length (toList s)) }))\n[PROOFSTEP]\nexact s.step ⟨i, hi⟩\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni j : Fin (List.length (toList s))\nh : i < j\n⊢ List.get (toList s) i < List.get (toList s) j\n[PROOFSTEP]\ndsimp [toList]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni j : Fin (List.length (toList s))\nh : i < j\n⊢ List.get (List.ofFn s.series) i < List.get (List.ofFn s.series) j\n[PROOFSTEP]\nrw [List.get_ofFn, List.get_ofFn]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni j : Fin (List.length (toList s))\nh : i < j\n⊢ series s (↑(Fin.castIso (_ : List.length (List.ofFn s.series) = s.length + 1)) i) <\n    series s (↑(Fin.castIso (_ : List.length (List.ofFn s.series) = s.length + 1)) j)\n[PROOFSTEP]\nexact s.strictMono h\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\n⊢ x ∈ toList s ↔ x ∈ s\n[PROOFSTEP]\nrw [toList, List.mem_ofFn, mem_def]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nl : List X\nhl : l ≠ []\nhc : List.Chain' IsMaximal l\ni : Fin (List.length l - 1 + 1)\n⊢ ↑i < List.length l\n[PROOFSTEP]\nconv_rhs => rw [← tsub_add_cancel_of_le (Nat.succ_le_of_lt (List.length_pos_of_ne_nil hl))]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nl : List X\nhl : l ≠ []\nhc : List.Chain' IsMaximal l\ni : Fin (List.length l - 1 + 1)\n| List.length l\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le (Nat.succ_le_of_lt (List.length_pos_of_ne_nil hl))]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nl : List X\nhl : l ≠ []\nhc : List.Chain' IsMaximal l\ni : Fin (List.length l - 1 + 1)\n| List.length l\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le (Nat.succ_le_of_lt (List.length_pos_of_ne_nil hl))]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nl : List X\nhl : l ≠ []\nhc : List.Chain' IsMaximal l\ni : Fin (List.length l - 1 + 1)\n| List.length l\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le (Nat.succ_le_of_lt (List.length_pos_of_ne_nil hl))]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nl : List X\nhl : l ≠ []\nhc : List.Chain' IsMaximal l\ni : Fin (List.length l - 1 + 1)\n⊢ ↑i < List.length l - Nat.succ 0 + Nat.succ 0\n[PROOFSTEP]\nexact i.2\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\n⊢ ofList (toList s) (_ : toList s ≠ []) (_ : List.Chain' IsMaximal (toList s)) = s\n[PROOFSTEP]\nrefine' ext_fun _ _\n[GOAL]\ncase refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\n⊢ (ofList (toList s) (_ : toList s ≠ []) (_ : List.Chain' IsMaximal (toList s))).length = s.length\n[PROOFSTEP]\nrw [length_ofList, length_toList, Nat.succ_sub_one]\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\n⊢ ∀ (i : Fin ((ofList (toList s) (_ : toList s ≠ []) (_ : List.Chain' IsMaximal (toList s))).length + 1)),\n    series (ofList (toList s) (_ : toList s ≠ []) (_ : List.Chain' IsMaximal (toList s))) i =\n      series s\n        (↑(Fin.castIso\n              (_ :\n                Nat.succ (ofList (toList s) (_ : toList s ≠ []) (_ : List.Chain' IsMaximal (toList s))).length =\n                  Nat.succ s.length))\n          i)\n[PROOFSTEP]\nrintro\n  ⟨i, hi⟩\n      -- Porting note: Was `dsimp [ofList, toList]; rw [List.nthLe_ofFn']`.\n[GOAL]\ncase refine'_2.mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : ℕ\nhi : i < (ofList (toList s) (_ : toList s ≠ []) (_ : List.Chain' IsMaximal (toList s))).length + 1\n⊢ series (ofList (toList s) (_ : toList s ≠ []) (_ : List.Chain' IsMaximal (toList s))) { val := i, isLt := hi } =\n    series s\n      (↑(Fin.castIso\n            (_ :\n              Nat.succ (ofList (toList s) (_ : toList s ≠ []) (_ : List.Chain' IsMaximal (toList s))).length =\n                Nat.succ s.length))\n        { val := i, isLt := hi })\n[PROOFSTEP]\nsimp [ofList, toList, -List.ofFn_succ]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nl : List X\nhl : l ≠ []\nhc : List.Chain' IsMaximal l\n⊢ toList (ofList l hl hc) = l\n[PROOFSTEP]\nrefine' List.ext_get _ _\n[GOAL]\ncase refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nl : List X\nhl : l ≠ []\nhc : List.Chain' IsMaximal l\n⊢ List.length (toList (ofList l hl hc)) = List.length l\n[PROOFSTEP]\nrw [length_toList, length_ofList, tsub_add_cancel_of_le (Nat.succ_le_of_lt <| List.length_pos_of_ne_nil hl)]\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nl : List X\nhl : l ≠ []\nhc : List.Chain' IsMaximal l\n⊢ ∀ (n : ℕ) (h₁ : n < List.length (toList (ofList l hl hc))) (h₂ : n < List.length l),\n    List.get (toList (ofList l hl hc)) { val := n, isLt := h₁ } = List.get l { val := n, isLt := h₂ }\n[PROOFSTEP]\nintro i hi hi'\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nl : List X\nhl : l ≠ []\nhc : List.Chain' IsMaximal l\ni : ℕ\nhi : i < List.length (toList (ofList l hl hc))\nhi' : i < List.length l\n⊢ List.get (toList (ofList l hl hc)) { val := i, isLt := hi } = List.get l { val := i, isLt := hi' }\n[PROOFSTEP]\ndsimp [ofList, toList]\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nl : List X\nhl : l ≠ []\nhc : List.Chain' IsMaximal l\ni : ℕ\nhi : i < List.length (toList (ofList l hl hc))\nhi' : i < List.length l\n⊢ List.get (List.ofFn fun i => List.nthLe l ↑i (_ : ↑i < List.length l)) { val := i, isLt := hi } =\n    List.get l { val := i, isLt := hi' }\n[PROOFSTEP]\nrw [List.get_ofFn]\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nl : List X\nhl : l ≠ []\nhc : List.Chain' IsMaximal l\ni : ℕ\nhi : i < List.length (toList (ofList l hl hc))\nhi' : i < List.length l\n⊢ List.nthLe l\n      ↑(↑(Fin.castIso\n              (_ : List.length (List.ofFn fun i => List.nthLe l ↑i (_ : ↑i < List.length l)) = List.length l - 1 + 1))\n          { val := i, isLt := hi })\n      (_ :\n        ↑(↑(Fin.castIso\n                  (_ :\n                    List.length (List.ofFn fun i => List.nthLe l ↑i (_ : ↑i < List.length l)) = List.length l - 1 + 1))\n              { val := i, isLt := hi }) <\n          List.length l) =\n    List.get l { val := i, isLt := hi' }\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : ∀ (x : X), x ∈ s₁ ↔ x ∈ s₂\n⊢ toList s₁ ~ toList s₂\n[PROOFSTEP]\nclassical exact List.perm_of_nodup_nodup_toFinset_eq s₁.toList_nodup s₂.toList_nodup (Finset.ext <| by simp [*])\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : ∀ (x : X), x ∈ s₁ ↔ x ∈ s₂\n⊢ toList s₁ ~ toList s₂\n[PROOFSTEP]\nexact List.perm_of_nodup_nodup_toFinset_eq s₁.toList_nodup s₂.toList_nodup (Finset.ext <| by simp [*])\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : ∀ (x : X), x ∈ s₁ ↔ x ∈ s₂\n⊢ ∀ (a : X), a ∈ List.toFinset (toList s₁) ↔ a ∈ List.toFinset (toList s₂)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length - 1)\n⊢ IsMaximal ((fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }) (Fin.castSucc i))\n    ((fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }) (Fin.succ i))\n[PROOFSTEP]\nhave := s.step ⟨i, lt_of_lt_of_le i.2 tsub_le_self⟩\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length - 1)\nthis :\n  IsMaximal (series s (Fin.castSucc { val := ↑i, isLt := (_ : ↑i < s.length) }))\n    (series s (Fin.succ { val := ↑i, isLt := (_ : ↑i < s.length) }))\n⊢ IsMaximal ((fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }) (Fin.castSucc i))\n    ((fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }) (Fin.succ i))\n[PROOFSTEP]\ncases i\n[GOAL]\ncase mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nval✝ : ℕ\nisLt✝ : val✝ < s.length - 1\nthis :\n  IsMaximal\n    (series s\n      (Fin.castSucc\n        { val := ↑{ val := val✝, isLt := isLt✝ }, isLt := (_ : ↑{ val := val✝, isLt := isLt✝ } < s.length) }))\n    (series s\n      (Fin.succ { val := ↑{ val := val✝, isLt := isLt✝ }, isLt := (_ : ↑{ val := val✝, isLt := isLt✝ } < s.length) }))\n⊢ IsMaximal\n    ((fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }) (Fin.castSucc { val := val✝, isLt := isLt✝ }))\n    ((fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }) (Fin.succ { val := val✝, isLt := isLt✝ }))\n[PROOFSTEP]\nexact this\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\n⊢ { val := ↑(Fin.last (eraseTop s).length), isLt := (_ : ↑(Fin.last (eraseTop s).length) < s.length + 1) } =\n    { val := s.length - 1, isLt := (_ : s.length - 1 < s.length + 1) }\n[PROOFSTEP]\next\n[GOAL]\ncase h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\n⊢ ↑{ val := ↑(Fin.last (eraseTop s).length), isLt := (_ : ↑(Fin.last (eraseTop s).length) < s.length + 1) } =\n    ↑{ val := s.length - 1, isLt := (_ : s.length - 1 < s.length + 1) }\n[PROOFSTEP]\nsimp only [eraseTop_length, Fin.val_last, Fin.coe_castSucc, Fin.coe_ofNat_eq_mod, Fin.val_mk]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\n⊢ top (eraseTop s) ≤ top s\n[PROOFSTEP]\nsimp [eraseTop, top, s.strictMono.le_iff_le, Fin.le_iff_val_le_val, tsub_le_self]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhx : x ≠ top s\nhxs : x ∈ s\n⊢ x ∈ eraseTop s\n[PROOFSTEP]\nrcases hxs with ⟨i, rfl⟩\n[GOAL]\ncase intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length + 1)\nhx : series s i ≠ top s\n⊢ series s i ∈ eraseTop s\n[PROOFSTEP]\nhave hi : (i : ℕ) < (s.length - 1).succ :=\n  by\n  conv_rhs => rw [← Nat.succ_sub (length_pos_of_mem_ne ⟨i, rfl⟩ s.top_mem hx), Nat.succ_sub_one]\n  exact lt_of_le_of_ne (Nat.le_of_lt_succ i.2) (by simpa [top, s.inj, Fin.ext_iff] using hx)\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length + 1)\nhx : series s i ≠ top s\n⊢ ↑i < Nat.succ (s.length - 1)\n[PROOFSTEP]\nconv_rhs => rw [← Nat.succ_sub (length_pos_of_mem_ne ⟨i, rfl⟩ s.top_mem hx), Nat.succ_sub_one]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length + 1)\nhx : series s i ≠ top s\n| Nat.succ (s.length - 1)\n[PROOFSTEP]\nrw [← Nat.succ_sub (length_pos_of_mem_ne ⟨i, rfl⟩ s.top_mem hx), Nat.succ_sub_one]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length + 1)\nhx : series s i ≠ top s\n| Nat.succ (s.length - 1)\n[PROOFSTEP]\nrw [← Nat.succ_sub (length_pos_of_mem_ne ⟨i, rfl⟩ s.top_mem hx), Nat.succ_sub_one]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length + 1)\nhx : series s i ≠ top s\n| Nat.succ (s.length - 1)\n[PROOFSTEP]\nrw [← Nat.succ_sub (length_pos_of_mem_ne ⟨i, rfl⟩ s.top_mem hx), Nat.succ_sub_one]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length + 1)\nhx : series s i ≠ top s\n⊢ ↑i < s.length\n[PROOFSTEP]\nexact lt_of_le_of_ne (Nat.le_of_lt_succ i.2) (by simpa [top, s.inj, Fin.ext_iff] using hx)\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length + 1)\nhx : series s i ≠ top s\n⊢ ↑i ≠ s.length\n[PROOFSTEP]\nsimpa [top, s.inj, Fin.ext_iff] using hx\n[GOAL]\ncase intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length + 1)\nhx : series s i ≠ top s\nhi : ↑i < Nat.succ (s.length - 1)\n⊢ series s i ∈ eraseTop s\n[PROOFSTEP]\nrefine' ⟨Fin.castSucc (n := s.length + 1) i, _⟩\n[GOAL]\ncase intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ni : Fin (s.length + 1)\nhx : series s i ≠ top s\nhi : ↑i < Nat.succ (s.length - 1)\n⊢ series (eraseTop s) ↑↑(Fin.castSucc i) = series s i\n[PROOFSTEP]\nsimp [Fin.ext_iff, Nat.mod_eq_of_lt hi]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nh : 0 < s.length\n⊢ x ∈ eraseTop s ↔ x ≠ top s ∧ x ∈ s\n[PROOFSTEP]\nsimp only [mem_def]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nh : 0 < s.length\n⊢ x ∈ range (eraseTop s).series ↔ x ≠ top s ∧ x ∈ range s.series\n[PROOFSTEP]\ndsimp only [eraseTop]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nh : 0 < s.length\n⊢ (x ∈ range fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }) ↔ x ≠ top s ∧ x ∈ range s.series\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nh : 0 < s.length\n⊢ (x ∈ range fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }) → x ≠ top s ∧ x ∈ range s.series\n[PROOFSTEP]\nrintro ⟨i, rfl⟩\n[GOAL]\ncase mp.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\ni : Fin (s.length - 1 + 1)\n⊢ (fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }) i ≠ top s ∧\n    (fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }) i ∈ range s.series\n[PROOFSTEP]\nhave hi : (i : ℕ) < s.length :=\n  by\n  conv_rhs => rw [← Nat.succ_sub_one s.length, Nat.succ_sub h]\n  exact\n    i.2\n      -- Porting note: Was `simp [top, Fin.ext_iff, ne_of_lt hi]`.\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\ni : Fin (s.length - 1 + 1)\n⊢ ↑i < s.length\n[PROOFSTEP]\nconv_rhs => rw [← Nat.succ_sub_one s.length, Nat.succ_sub h]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\ni : Fin (s.length - 1 + 1)\n| s.length\n[PROOFSTEP]\nrw [← Nat.succ_sub_one s.length, Nat.succ_sub h]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\ni : Fin (s.length - 1 + 1)\n| s.length\n[PROOFSTEP]\nrw [← Nat.succ_sub_one s.length, Nat.succ_sub h]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\ni : Fin (s.length - 1 + 1)\n| s.length\n[PROOFSTEP]\nrw [← Nat.succ_sub_one s.length, Nat.succ_sub h]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\ni : Fin (s.length - 1 + 1)\n⊢ ↑i < Nat.succ (s.length - Nat.succ 0)\n[PROOFSTEP]\nexact\n  i.2\n    -- Porting note: Was `simp [top, Fin.ext_iff, ne_of_lt hi]`.\n[GOAL]\ncase mp.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\ni : Fin (s.length - 1 + 1)\nhi : ↑i < s.length\n⊢ (fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }) i ≠ top s ∧\n    (fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }) i ∈ range s.series\n[PROOFSTEP]\nsimp [top, Fin.ext_iff, ne_of_lt hi, -Set.mem_range, Set.mem_range_self]\n[GOAL]\ncase mpr\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nh : 0 < s.length\n⊢ x ≠ top s ∧ x ∈ range s.series → x ∈ range fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nh✝ : 0 < s.length\nh : x ≠ top s ∧ x ∈ range s.series\n⊢ x ∈ range fun i => series s { val := ↑i, isLt := (_ : ↑i < s.length + 1) }\n[PROOFSTEP]\nexact mem_eraseTop_of_ne_of_mem h.1 h.2\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\n⊢ IsMaximal (top (eraseTop s)) (top s)\n[PROOFSTEP]\nhave : s.length - 1 + 1 = s.length := by conv_rhs => rw [← Nat.succ_sub_one s.length]; rw [Nat.succ_sub h]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\n⊢ s.length - 1 + 1 = s.length\n[PROOFSTEP]\nconv_rhs => rw [← Nat.succ_sub_one s.length]; rw [Nat.succ_sub h]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\n| s.length\n[PROOFSTEP]\nrw [← Nat.succ_sub_one s.length]; rw [Nat.succ_sub h]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\n| s.length\n[PROOFSTEP]\nrw [← Nat.succ_sub_one s.length]; rw [Nat.succ_sub h]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\n| s.length\n[PROOFSTEP]\nrw [← Nat.succ_sub_one s.length]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\n| Nat.succ s.length - 1\n[PROOFSTEP]\nrw [Nat.succ_sub h]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\nthis : s.length - 1 + 1 = s.length\n⊢ IsMaximal (top (eraseTop s)) (top s)\n[PROOFSTEP]\nrw [top_eraseTop, top]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\nthis : s.length - 1 + 1 = s.length\n⊢ IsMaximal (series s { val := s.length - 1, isLt := (_ : s.length - 1 < s.length + 1) }) (series s (Fin.last s.length))\n[PROOFSTEP]\nconvert s.step ⟨s.length - 1, Nat.sub_lt h zero_lt_one⟩\n[GOAL]\ncase h.e'_5.h.e'_5\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\nthis : s.length - 1 + 1 = s.length\n⊢ Fin.last s.length = Fin.succ { val := s.length - 1, isLt := (_ : s.length - 1 < s.length) }\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_5.h.e'_5.h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\nthis : s.length - 1 + 1 = s.length\n⊢ ↑(Fin.last s.length) = ↑(Fin.succ { val := s.length - 1, isLt := (_ : s.length - 1 < s.length) })\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\ni : Fin m\n⊢ Matrix.vecAppend (_ : Nat.succ (m + n) = m + Nat.succ n) (a ∘ Fin.castSucc) b (Fin.castSucc (Fin.castAdd n i)) =\n    a (Fin.castSucc i)\n[PROOFSTEP]\ncases i\n[GOAL]\ncase mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\nval✝ : ℕ\nisLt✝ : val✝ < m\n⊢ Matrix.vecAppend (_ : Nat.succ (m + n) = m + Nat.succ n) (a ∘ Fin.castSucc) b\n      (Fin.castSucc (Fin.castAdd n { val := val✝, isLt := isLt✝ })) =\n    a (Fin.castSucc { val := val✝, isLt := isLt✝ })\n[PROOFSTEP]\nsimp [Matrix.vecAppend_eq_ite, *]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\ni : Fin m\nh : a (Fin.last m) = b 0\n⊢ Matrix.vecAppend (_ : Nat.succ (m + n) = m + Nat.succ n) (a ∘ Fin.castSucc) b (Fin.succ (Fin.castAdd n i)) =\n    a (Fin.succ i)\n[PROOFSTEP]\ncases' i with i hi\n[GOAL]\ncase mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\nh : a (Fin.last m) = b 0\ni : ℕ\nhi : i < m\n⊢ Matrix.vecAppend (_ : Nat.succ (m + n) = m + Nat.succ n) (a ∘ Fin.castSucc) b\n      (Fin.succ (Fin.castAdd n { val := i, isLt := hi })) =\n    a (Fin.succ { val := i, isLt := hi })\n[PROOFSTEP]\nsimp only [Matrix.vecAppend_eq_ite, hi, Fin.succ_mk, Function.comp_apply, Fin.castSucc_mk, Fin.val_mk, Fin.castAdd_mk]\n[GOAL]\ncase mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\nh : a (Fin.last m) = b 0\ni : ℕ\nhi : i < m\n⊢ (if h : i + 1 < m then a { val := i + 1, isLt := (_ : i + 1 < Nat.succ m) }\n    else\n      b\n        { val := i + 1 - m,\n          isLt := (_ : ↑{ val := i + 1, isLt := (_ : Nat.succ i < Nat.succ (m + n)) } - m < Nat.succ n) }) =\n    a { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ m) }\n[PROOFSTEP]\nsplit_ifs with h_1\n[GOAL]\ncase pos\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\nh : a (Fin.last m) = b 0\ni : ℕ\nhi : i < m\nh_1 : i + 1 < m\n⊢ a { val := i + 1, isLt := (_ : i + 1 < Nat.succ m) } = a { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ m) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\nh : a (Fin.last m) = b 0\ni : ℕ\nhi : i < m\nh_1 : ¬i + 1 < m\n⊢ b\n      { val := i + 1 - m,\n        isLt := (_ : ↑{ val := i + 1, isLt := (_ : Nat.succ i < Nat.succ (m + n)) } - m < Nat.succ n) } =\n    a { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ m) }\n[PROOFSTEP]\nhave : i + 1 = m := le_antisymm hi (le_of_not_gt h_1)\n[GOAL]\ncase neg\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\nh : a (Fin.last m) = b 0\ni : ℕ\nhi : i < m\nh_1 : ¬i + 1 < m\nthis : i + 1 = m\n⊢ b\n      { val := i + 1 - m,\n        isLt := (_ : ↑{ val := i + 1, isLt := (_ : Nat.succ i < Nat.succ (m + n)) } - m < Nat.succ n) } =\n    a { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ m) }\n[PROOFSTEP]\ncalc\n  b ⟨i + 1 - m, by simp [this]⟩ = b 0 := congr_arg b (by simp [Fin.ext_iff, this])\n  _ = a (Fin.last _) := h.symm\n  _ = _ := congr_arg a (by simp [Fin.ext_iff, this])\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\nh : a (Fin.last m) = b 0\ni : ℕ\nhi : i < m\nh_1 : ¬i + 1 < m\nthis : i + 1 = m\n⊢ i + 1 - m < Nat.succ n\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\nh : a (Fin.last m) = b 0\ni : ℕ\nhi : i < m\nh_1 : ¬i + 1 < m\nthis : i + 1 = m\n⊢ { val := i + 1 - m, isLt := (_ : i + 1 - m < Nat.succ n) } = 0\n[PROOFSTEP]\nsimp [Fin.ext_iff, this]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\nh : a (Fin.last m) = b 0\ni : ℕ\nhi : i < m\nh_1 : ¬i + 1 < m\nthis : i + 1 = m\n⊢ Fin.last m = { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ m) }\n[PROOFSTEP]\nsimp [Fin.ext_iff, this]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\ni : Fin n\n⊢ Matrix.vecAppend (_ : Nat.succ (m + n) = m + Nat.succ n) (a ∘ Fin.castSucc) b (Fin.castSucc (Fin.natAdd m i)) =\n    b (Fin.castSucc i)\n[PROOFSTEP]\ncases i\n[GOAL]\ncase mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\nval✝ : ℕ\nisLt✝ : val✝ < n\n⊢ Matrix.vecAppend (_ : Nat.succ (m + n) = m + Nat.succ n) (a ∘ Fin.castSucc) b\n      (Fin.castSucc (Fin.natAdd m { val := val✝, isLt := isLt✝ })) =\n    b (Fin.castSucc { val := val✝, isLt := isLt✝ })\n[PROOFSTEP]\nsimp only [Matrix.vecAppend_eq_ite, Nat.not_lt_zero, Fin.natAdd_mk, add_lt_iff_neg_left, add_tsub_cancel_left, dif_neg,\n  Fin.castSucc_mk, not_false_iff, Fin.val_mk]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\ni : Fin n\n⊢ Matrix.vecAppend (_ : Nat.succ (m + n) = m + Nat.succ n) (a ∘ Fin.castSucc) b (Fin.succ (Fin.natAdd m i)) =\n    b (Fin.succ i)\n[PROOFSTEP]\ncases' i with i hi\n[GOAL]\ncase mk\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\nα : Type u_1\nm n : ℕ\na : Fin (Nat.succ m) → α\nb : Fin (Nat.succ n) → α\ni : ℕ\nhi : i < n\n⊢ Matrix.vecAppend (_ : Nat.succ (m + n) = m + Nat.succ n) (a ∘ Fin.castSucc) b\n      (Fin.succ (Fin.natAdd m { val := i, isLt := hi })) =\n    b (Fin.succ { val := i, isLt := hi })\n[PROOFSTEP]\nsimp only [Matrix.vecAppend_eq_ite, add_assoc, Nat.not_lt_zero, Fin.natAdd_mk, add_lt_iff_neg_left,\n  add_tsub_cancel_left, Fin.succ_mk, dif_neg, not_false_iff, Fin.val_mk]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : top s₁ = bot s₂\ni : Fin (s₁.length + s₂.length)\n⊢ IsMaximal\n    (Matrix.vecAppend (_ : Nat.succ (s₁.length + s₂.length) = s₁.length + Nat.succ s₂.length) (s₁.series ∘ Fin.castSucc)\n      s₂.series (Fin.castSucc i))\n    (Matrix.vecAppend (_ : Nat.succ (s₁.length + s₂.length) = s₁.length + Nat.succ s₂.length) (s₁.series ∘ Fin.castSucc)\n      s₂.series (Fin.succ i))\n[PROOFSTEP]\nrefine' Fin.addCases _ _ i\n[GOAL]\ncase refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : top s₁ = bot s₂\ni : Fin (s₁.length + s₂.length)\n⊢ ∀ (i : Fin s₁.length),\n    IsMaximal\n      (Matrix.vecAppend (_ : Nat.succ (s₁.length + s₂.length) = s₁.length + Nat.succ s₂.length)\n        (s₁.series ∘ Fin.castSucc) s₂.series (Fin.castSucc (Fin.castAdd s₂.length i)))\n      (Matrix.vecAppend (_ : Nat.succ (s₁.length + s₂.length) = s₁.length + Nat.succ s₂.length)\n        (s₁.series ∘ Fin.castSucc) s₂.series (Fin.succ (Fin.castAdd s₂.length i)))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : top s₁ = bot s₂\ni✝ : Fin (s₁.length + s₂.length)\ni : Fin s₁.length\n⊢ IsMaximal\n    (Matrix.vecAppend (_ : Nat.succ (s₁.length + s₂.length) = s₁.length + Nat.succ s₂.length) (s₁.series ∘ Fin.castSucc)\n      s₂.series (Fin.castSucc (Fin.castAdd s₂.length i)))\n    (Matrix.vecAppend (_ : Nat.succ (s₁.length + s₂.length) = s₁.length + Nat.succ s₂.length) (s₁.series ∘ Fin.castSucc)\n      s₂.series (Fin.succ (Fin.castAdd s₂.length i)))\n[PROOFSTEP]\nrw [append_succ_castAdd_aux _ _ _ h, append_castAdd_aux]\n[GOAL]\ncase refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : top s₁ = bot s₂\ni✝ : Fin (s₁.length + s₂.length)\ni : Fin s₁.length\n⊢ IsMaximal (series s₁ (Fin.castSucc i)) (series s₁ (Fin.succ i))\n[PROOFSTEP]\nexact s₁.step i\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : top s₁ = bot s₂\ni : Fin (s₁.length + s₂.length)\n⊢ ∀ (i : Fin s₂.length),\n    IsMaximal\n      (Matrix.vecAppend (_ : Nat.succ (s₁.length + s₂.length) = s₁.length + Nat.succ s₂.length)\n        (s₁.series ∘ Fin.castSucc) s₂.series (Fin.castSucc (Fin.natAdd s₁.length i)))\n      (Matrix.vecAppend (_ : Nat.succ (s₁.length + s₂.length) = s₁.length + Nat.succ s₂.length)\n        (s₁.series ∘ Fin.castSucc) s₂.series (Fin.succ (Fin.natAdd s₁.length i)))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : top s₁ = bot s₂\ni✝ : Fin (s₁.length + s₂.length)\ni : Fin s₂.length\n⊢ IsMaximal\n    (Matrix.vecAppend (_ : Nat.succ (s₁.length + s₂.length) = s₁.length + Nat.succ s₂.length) (s₁.series ∘ Fin.castSucc)\n      s₂.series (Fin.castSucc (Fin.natAdd s₁.length i)))\n    (Matrix.vecAppend (_ : Nat.succ (s₁.length + s₂.length) = s₁.length + Nat.succ s₂.length) (s₁.series ∘ Fin.castSucc)\n      s₂.series (Fin.succ (Fin.natAdd s₁.length i)))\n[PROOFSTEP]\nrw [append_natAdd_aux, append_succ_natAdd_aux]\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : top s₁ = bot s₂\ni✝ : Fin (s₁.length + s₂.length)\ni : Fin s₂.length\n⊢ IsMaximal (series s₂ (Fin.castSucc i)) (series s₂ (Fin.succ i))\n[PROOFSTEP]\nexact s₂.step i\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : top s₁ = bot s₂\ni : Fin s₁.length\n⊢ series (append s₁ s₂ h) (Fin.castSucc (Fin.castAdd s₂.length i)) = series s₁ (Fin.castSucc i)\n[PROOFSTEP]\nrw [coe_append, append_castAdd_aux _ _ i]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : top s₁ = bot s₂\ni : Fin s₁.length\n⊢ series (append s₁ s₂ h) (Fin.succ (Fin.castAdd s₂.length i)) = series s₁ (Fin.succ i)\n[PROOFSTEP]\nrw [coe_append, append_succ_castAdd_aux _ _ _ h]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : top s₁ = bot s₂\ni : Fin s₂.length\n⊢ series (append s₁ s₂ h) (Fin.castSucc (Fin.natAdd s₁.length i)) = series s₂ (Fin.castSucc i)\n[PROOFSTEP]\nrw [coe_append, append_natAdd_aux _ _ i]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : top s₁ = bot s₂\ni : Fin s₂.length\n⊢ series (append s₁ s₂ h) (Fin.succ (Fin.natAdd s₁.length i)) = series s₂ (Fin.succ i)\n[PROOFSTEP]\nrw [coe_append, append_succ_natAdd_aux _ _ i]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\ni : Fin (s.length + 1)\n⊢ IsMaximal (Fin.snoc s.series x (Fin.castSucc i)) (Fin.snoc s.series x (Fin.succ i))\n[PROOFSTEP]\nrefine' Fin.lastCases _ _ i\n[GOAL]\ncase refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\ni : Fin (s.length + 1)\n⊢ IsMaximal (Fin.snoc s.series x (Fin.castSucc (Fin.last s.length)))\n    (Fin.snoc s.series x (Fin.succ (Fin.last s.length)))\n[PROOFSTEP]\nrwa [Fin.snoc_castSucc, Fin.succ_last, Fin.snoc_last, ← top]\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\ni : Fin (s.length + 1)\n⊢ ∀ (i : Fin s.length),\n    IsMaximal (Fin.snoc s.series x (Fin.castSucc (Fin.castSucc i))) (Fin.snoc s.series x (Fin.succ (Fin.castSucc i)))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\ni✝ : Fin (s.length + 1)\ni : Fin s.length\n⊢ IsMaximal (Fin.snoc s.series x (Fin.castSucc (Fin.castSucc i))) (Fin.snoc s.series x (Fin.succ (Fin.castSucc i)))\n[PROOFSTEP]\nrw [Fin.snoc_castSucc, ← Fin.castSucc_fin_succ, Fin.snoc_castSucc]\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\ni✝ : Fin (s.length + 1)\ni : Fin s.length\n⊢ IsMaximal (series s (Fin.castSucc i)) (series s (Fin.succ i))\n[PROOFSTEP]\nexact s.step _\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\n⊢ bot (snoc s x hsat) = bot s\n[PROOFSTEP]\nrw [bot, bot, ← snoc_castSucc s x hsat 0, Fin.castSucc_zero' (n := s.length + 1)]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx y : X\nhsat : IsMaximal (top s) x\n⊢ y ∈ snoc s x hsat ↔ y ∈ s ∨ y = x\n[PROOFSTEP]\nsimp only [snoc, mem_def]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx y : X\nhsat : IsMaximal (top s) x\n⊢ y ∈ range (Fin.snoc s.series x) ↔ y ∈ range s.series ∨ y = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx y : X\nhsat : IsMaximal (top s) x\n⊢ y ∈ range (Fin.snoc s.series x) → y ∈ range s.series ∨ y = x\n[PROOFSTEP]\nrintro ⟨i, rfl⟩\n[GOAL]\ncase mp.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\ni : Fin (s.length + 1 + 1)\n⊢ Fin.snoc s.series x i ∈ range s.series ∨ Fin.snoc s.series x i = x\n[PROOFSTEP]\nrefine' Fin.lastCases _ (fun i => _) i\n[GOAL]\ncase mp.intro.refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\ni : Fin (s.length + 1 + 1)\n⊢ Fin.snoc s.series x (Fin.last (s.length + 1)) ∈ range s.series ∨ Fin.snoc s.series x (Fin.last (s.length + 1)) = x\n[PROOFSTEP]\nright\n[GOAL]\ncase mp.intro.refine'_1.h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\ni : Fin (s.length + 1 + 1)\n⊢ Fin.snoc s.series x (Fin.last (s.length + 1)) = x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.intro.refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\ni✝ : Fin (s.length + 1 + 1)\ni : Fin (s.length + 1)\n⊢ Fin.snoc s.series x (Fin.castSucc i) ∈ range s.series ∨ Fin.snoc s.series x (Fin.castSucc i) = x\n[PROOFSTEP]\nleft\n[GOAL]\ncase mp.intro.refine'_2.h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\ni✝ : Fin (s.length + 1 + 1)\ni : Fin (s.length + 1)\n⊢ Fin.snoc s.series x (Fin.castSucc i) ∈ range s.series\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx y : X\nhsat : IsMaximal (top s) x\n⊢ y ∈ range s.series ∨ y = x → y ∈ range (Fin.snoc s.series x)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx y : X\nhsat : IsMaximal (top s) x\nh : y ∈ range s.series ∨ y = x\n⊢ y ∈ range (Fin.snoc s.series x)\n[PROOFSTEP]\nrcases h with (⟨i, rfl⟩ | rfl)\n[GOAL]\ncase mpr.inl.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\ni : Fin (s.length + 1)\n⊢ series s i ∈ range (Fin.snoc s.series x)\n[PROOFSTEP]\nuse Fin.castSucc i\n[GOAL]\ncase h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhsat : IsMaximal (top s) x\ni : Fin (s.length + 1)\n⊢ Fin.snoc s.series x (Fin.castSucc i) = series s i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.inr\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ny : X\nhsat : IsMaximal (top s) y\n⊢ y ∈ range (Fin.snoc s.series y)\n[PROOFSTEP]\nuse Fin.last _\n[GOAL]\ncase h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\ny : X\nhsat : IsMaximal (top s) y\n⊢ Fin.snoc s.series y (Fin.last (s.length + 1)) = y\n[PROOFSTEP]\nsimp\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\n⊢ s = snoc (eraseTop s) (top s) (_ : IsMaximal (top (eraseTop s)) (top s))\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\nx : X\n⊢ x ∈ s ↔ x ∈ snoc (eraseTop s) (top s) (_ : IsMaximal (top (eraseTop s)) (top s))\n[PROOFSTEP]\nsimp [mem_snoc, mem_eraseTop h]\n[GOAL]\ncase h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : 0 < s.length\nx : X\n⊢ x ∈ s ↔ ¬x = top s ∧ x ∈ s ∨ x = top s\n[PROOFSTEP]\nby_cases h : x = s.top\n[GOAL]\ncase pos\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh✝ : 0 < s.length\nx : X\nh : x = top s\n⊢ x ∈ s ↔ ¬x = top s ∧ x ∈ s ∨ x = top s\n[PROOFSTEP]\nsimp [*, s.top_mem]\n[GOAL]\ncase neg\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh✝ : 0 < s.length\nx : X\nh : ¬x = top s\n⊢ x ∈ s ↔ ¬x = top s ∧ x ∈ s ∨ x = top s\n[PROOFSTEP]\nsimp [*, s.top_mem]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : IsMaximal (top (eraseTop s)) (top s)\n⊢ s.length ≠ 0\n[PROOFSTEP]\nintro hs\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : IsMaximal (top (eraseTop s)) (top s)\nhs : s.length = 0\n⊢ False\n[PROOFSTEP]\nrefine' ne_of_gt (lt_of_isMaximal h) _\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nh : IsMaximal (top (eraseTop s)) (top s)\nhs : s.length = 0\n⊢ top s = top (eraseTop s)\n[PROOFSTEP]\nsimp [top, Fin.ext_iff, hs]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : Equivalent s₁ s₂\ni : Fin s₂.length\n⊢ Iso (series s₁ (Fin.castSucc (↑(Exists.choose h).symm i)), series s₁ (Fin.succ (↑(Exists.choose h).symm i)))\n    (series s₂ (Fin.castSucc i), series s₂ (Fin.succ i))\n[PROOFSTEP]\nsimpa using h.choose_spec (h.choose.symm i)\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ t₁ t₂ : CompositionSeries X\nhs : top s₁ = bot s₂\nht : top t₁ = bot t₂\nh₁ : Equivalent s₁ t₁\nh₂ : Equivalent s₂ t₂\ne : Fin (s₁.length + s₂.length) ≃ Fin (t₁.length + t₂.length) :=\n  Trans.trans (Trans.trans finSumFinEquiv.symm (Equiv.sumCongr (Exists.choose h₁) (Exists.choose h₂))) finSumFinEquiv\n⊢ ∀ (i : Fin (CompositionSeries.append s₁ s₂ hs).length),\n    Iso\n      (series (CompositionSeries.append s₁ s₂ hs) (Fin.castSucc i),\n        series (CompositionSeries.append s₁ s₂ hs) (Fin.succ i))\n      (series (CompositionSeries.append t₁ t₂ ht) (Fin.castSucc (↑e i)),\n        series (CompositionSeries.append t₁ t₂ ht) (Fin.succ (↑e i)))\n[PROOFSTEP]\nintro i\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ t₁ t₂ : CompositionSeries X\nhs : top s₁ = bot s₂\nht : top t₁ = bot t₂\nh₁ : Equivalent s₁ t₁\nh₂ : Equivalent s₂ t₂\ne : Fin (s₁.length + s₂.length) ≃ Fin (t₁.length + t₂.length) :=\n  Trans.trans (Trans.trans finSumFinEquiv.symm (Equiv.sumCongr (Exists.choose h₁) (Exists.choose h₂))) finSumFinEquiv\ni : Fin (CompositionSeries.append s₁ s₂ hs).length\n⊢ Iso\n    (series (CompositionSeries.append s₁ s₂ hs) (Fin.castSucc i),\n      series (CompositionSeries.append s₁ s₂ hs) (Fin.succ i))\n    (series (CompositionSeries.append t₁ t₂ ht) (Fin.castSucc (↑e i)),\n      series (CompositionSeries.append t₁ t₂ ht) (Fin.succ (↑e i)))\n[PROOFSTEP]\nrefine' Fin.addCases _ _ i\n[GOAL]\ncase refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ t₁ t₂ : CompositionSeries X\nhs : top s₁ = bot s₂\nht : top t₁ = bot t₂\nh₁ : Equivalent s₁ t₁\nh₂ : Equivalent s₂ t₂\ne : Fin (s₁.length + s₂.length) ≃ Fin (t₁.length + t₂.length) :=\n  Trans.trans (Trans.trans finSumFinEquiv.symm (Equiv.sumCongr (Exists.choose h₁) (Exists.choose h₂))) finSumFinEquiv\ni : Fin (CompositionSeries.append s₁ s₂ hs).length\n⊢ ∀ (i : Fin s₁.length),\n    Iso\n      (series (CompositionSeries.append s₁ s₂ hs) (Fin.castSucc (Fin.castAdd s₂.length i)),\n        series (CompositionSeries.append s₁ s₂ hs) (Fin.succ (Fin.castAdd s₂.length i)))\n      (series (CompositionSeries.append t₁ t₂ ht) (Fin.castSucc (↑e (Fin.castAdd s₂.length i))),\n        series (CompositionSeries.append t₁ t₂ ht) (Fin.succ (↑e (Fin.castAdd s₂.length i))))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ t₁ t₂ : CompositionSeries X\nhs : top s₁ = bot s₂\nht : top t₁ = bot t₂\nh₁ : Equivalent s₁ t₁\nh₂ : Equivalent s₂ t₂\ne : Fin (s₁.length + s₂.length) ≃ Fin (t₁.length + t₂.length) :=\n  Trans.trans (Trans.trans finSumFinEquiv.symm (Equiv.sumCongr (Exists.choose h₁) (Exists.choose h₂))) finSumFinEquiv\ni✝ : Fin (CompositionSeries.append s₁ s₂ hs).length\ni : Fin s₁.length\n⊢ Iso\n    (series (CompositionSeries.append s₁ s₂ hs) (Fin.castSucc (Fin.castAdd s₂.length i)),\n      series (CompositionSeries.append s₁ s₂ hs) (Fin.succ (Fin.castAdd s₂.length i)))\n    (series (CompositionSeries.append t₁ t₂ ht) (Fin.castSucc (↑e (Fin.castAdd s₂.length i))),\n      series (CompositionSeries.append t₁ t₂ ht) (Fin.succ (↑e (Fin.castAdd s₂.length i))))\n[PROOFSTEP]\nsimpa [top, bot] using h₁.choose_spec i\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ t₁ t₂ : CompositionSeries X\nhs : top s₁ = bot s₂\nht : top t₁ = bot t₂\nh₁ : Equivalent s₁ t₁\nh₂ : Equivalent s₂ t₂\ne : Fin (s₁.length + s₂.length) ≃ Fin (t₁.length + t₂.length) :=\n  Trans.trans (Trans.trans finSumFinEquiv.symm (Equiv.sumCongr (Exists.choose h₁) (Exists.choose h₂))) finSumFinEquiv\ni : Fin (CompositionSeries.append s₁ s₂ hs).length\n⊢ ∀ (i : Fin s₂.length),\n    Iso\n      (series (CompositionSeries.append s₁ s₂ hs) (Fin.castSucc (Fin.natAdd s₁.length i)),\n        series (CompositionSeries.append s₁ s₂ hs) (Fin.succ (Fin.natAdd s₁.length i)))\n      (series (CompositionSeries.append t₁ t₂ ht) (Fin.castSucc (↑e (Fin.natAdd s₁.length i))),\n        series (CompositionSeries.append t₁ t₂ ht) (Fin.succ (↑e (Fin.natAdd s₁.length i))))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ t₁ t₂ : CompositionSeries X\nhs : top s₁ = bot s₂\nht : top t₁ = bot t₂\nh₁ : Equivalent s₁ t₁\nh₂ : Equivalent s₂ t₂\ne : Fin (s₁.length + s₂.length) ≃ Fin (t₁.length + t₂.length) :=\n  Trans.trans (Trans.trans finSumFinEquiv.symm (Equiv.sumCongr (Exists.choose h₁) (Exists.choose h₂))) finSumFinEquiv\ni✝ : Fin (CompositionSeries.append s₁ s₂ hs).length\ni : Fin s₂.length\n⊢ Iso\n    (series (CompositionSeries.append s₁ s₂ hs) (Fin.castSucc (Fin.natAdd s₁.length i)),\n      series (CompositionSeries.append s₁ s₂ hs) (Fin.succ (Fin.natAdd s₁.length i)))\n    (series (CompositionSeries.append t₁ t₂ ht) (Fin.castSucc (↑e (Fin.natAdd s₁.length i))),\n      series (CompositionSeries.append t₁ t₂ ht) (Fin.succ (↑e (Fin.natAdd s₁.length i))))\n[PROOFSTEP]\nsimpa [top, bot] using h₂.choose_spec i\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nx₁ x₂ : X\nhsat₁ : IsMaximal (top s₁) x₁\nhsat₂ : IsMaximal (top s₂) x₂\nhequiv : Equivalent s₁ s₂\nhtop : Iso (top s₁, x₁) (top s₂, x₂)\ne : Fin (Nat.succ s₁.length) ≃ Fin (Nat.succ s₂.length) :=\n  Trans.trans (Trans.trans finSuccEquivLast (Functor.mapEquiv Option (Exists.choose hequiv))) finSuccEquivLast.symm\ni : Fin (snoc s₁ x₁ hsat₁).length\n⊢ Iso (series (snoc s₁ x₁ hsat₁) (Fin.castSucc i), series (snoc s₁ x₁ hsat₁) (Fin.succ i))\n    (series (snoc s₂ x₂ hsat₂) (Fin.castSucc (↑e i)), series (snoc s₂ x₂ hsat₂) (Fin.succ (↑e i)))\n[PROOFSTEP]\nrefine' Fin.lastCases _ _ i\n[GOAL]\ncase refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nx₁ x₂ : X\nhsat₁ : IsMaximal (top s₁) x₁\nhsat₂ : IsMaximal (top s₂) x₂\nhequiv : Equivalent s₁ s₂\nhtop : Iso (top s₁, x₁) (top s₂, x₂)\ne : Fin (Nat.succ s₁.length) ≃ Fin (Nat.succ s₂.length) :=\n  Trans.trans (Trans.trans finSuccEquivLast (Functor.mapEquiv Option (Exists.choose hequiv))) finSuccEquivLast.symm\ni : Fin (snoc s₁ x₁ hsat₁).length\n⊢ Iso\n    (series (snoc s₁ x₁ hsat₁) (Fin.castSucc (Fin.last s₁.length)),\n      series (snoc s₁ x₁ hsat₁) (Fin.succ (Fin.last s₁.length)))\n    (series (snoc s₂ x₂ hsat₂) (Fin.castSucc (↑e (Fin.last s₁.length))),\n      series (snoc s₂ x₂ hsat₂) (Fin.succ (↑e (Fin.last s₁.length))))\n[PROOFSTEP]\nsimpa [top] using htop\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nx₁ x₂ : X\nhsat₁ : IsMaximal (top s₁) x₁\nhsat₂ : IsMaximal (top s₂) x₂\nhequiv : Equivalent s₁ s₂\nhtop : Iso (top s₁, x₁) (top s₂, x₂)\ne : Fin (Nat.succ s₁.length) ≃ Fin (Nat.succ s₂.length) :=\n  Trans.trans (Trans.trans finSuccEquivLast (Functor.mapEquiv Option (Exists.choose hequiv))) finSuccEquivLast.symm\ni : Fin (snoc s₁ x₁ hsat₁).length\n⊢ ∀ (i : Fin s₁.length),\n    Iso\n      (series (snoc s₁ x₁ hsat₁) (Fin.castSucc (Fin.castSucc i)), series (snoc s₁ x₁ hsat₁) (Fin.succ (Fin.castSucc i)))\n      (series (snoc s₂ x₂ hsat₂) (Fin.castSucc (↑e (Fin.castSucc i))),\n        series (snoc s₂ x₂ hsat₂) (Fin.succ (↑e (Fin.castSucc i))))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nx₁ x₂ : X\nhsat₁ : IsMaximal (top s₁) x₁\nhsat₂ : IsMaximal (top s₂) x₂\nhequiv : Equivalent s₁ s₂\nhtop : Iso (top s₁, x₁) (top s₂, x₂)\ne : Fin (Nat.succ s₁.length) ≃ Fin (Nat.succ s₂.length) :=\n  Trans.trans (Trans.trans finSuccEquivLast (Functor.mapEquiv Option (Exists.choose hequiv))) finSuccEquivLast.symm\ni✝ : Fin (snoc s₁ x₁ hsat₁).length\ni : Fin s₁.length\n⊢ Iso (series (snoc s₁ x₁ hsat₁) (Fin.castSucc (Fin.castSucc i)), series (snoc s₁ x₁ hsat₁) (Fin.succ (Fin.castSucc i)))\n    (series (snoc s₂ x₂ hsat₂) (Fin.castSucc (↑e (Fin.castSucc i))),\n      series (snoc s₂ x₂ hsat₂) (Fin.succ (↑e (Fin.castSucc i))))\n[PROOFSTEP]\nsimpa [Fin.succ_castSucc] using hequiv.choose_spec i\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nh : Equivalent s₁ s₂\n⊢ s₁.length = s₂.length\n[PROOFSTEP]\nsimpa using Fintype.card_congr h.choose\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx₁ x₂ y₁ y₂ : X\nhsat₁ : IsMaximal (top s) x₁\nhsat₂ : IsMaximal (top s) x₂\nhsaty₁ : IsMaximal (top (snoc s x₁ hsat₁)) y₁\nhsaty₂ : IsMaximal (top (snoc s x₂ hsat₂)) y₂\nhr₁ : Iso (top s, x₁) (x₂, y₂)\nhr₂ : Iso (x₁, y₁) (top s, x₂)\ne : Fin (s.length + 1 + 1) ≃ Fin (s.length + 1 + 1) :=\n  Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))\nx✝ : Fin s.length\n⊢ Fin.castSucc (Fin.castSucc x✝) < Fin.castSucc (Fin.last s.length)\n[PROOFSTEP]\nsimp [Fin.castSucc_lt_last]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx₁ x₂ y₁ y₂ : X\nhsat₁ : IsMaximal (top s) x₁\nhsat₂ : IsMaximal (top s) x₂\nhsaty₁ : IsMaximal (top (snoc s x₁ hsat₁)) y₁\nhsaty₂ : IsMaximal (top (snoc s x₂ hsat₂)) y₂\nhr₁ : Iso (top s, x₁) (x₂, y₂)\nhr₂ : Iso (x₁, y₁) (top s, x₂)\ne : Fin (s.length + 1 + 1) ≃ Fin (s.length + 1 + 1) :=\n  Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))\nh1 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.castSucc (Fin.last s.length)\nx✝ : Fin s.length\n⊢ Fin.castSucc (Fin.castSucc x✝) < Fin.last (s.length + 1)\n[PROOFSTEP]\nsimp [Fin.castSucc_lt_last]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx₁ x₂ y₁ y₂ : X\nhsat₁ : IsMaximal (top s) x₁\nhsat₂ : IsMaximal (top s) x₂\nhsaty₁ : IsMaximal (top (snoc s x₁ hsat₁)) y₁\nhsaty₂ : IsMaximal (top (snoc s x₂ hsat₂)) y₂\nhr₁ : Iso (top s, x₁) (x₂, y₂)\nhr₂ : Iso (x₁, y₁) (top s, x₂)\ne : Fin (s.length + 1 + 1) ≃ Fin (s.length + 1 + 1) :=\n  Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))\nh1 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.castSucc (Fin.last s.length)\nh2 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.last (s.length + 1)\n⊢ ∀ (i : Fin (snoc (snoc s x₁ hsat₁) y₁ hsaty₁).length),\n    Iso\n      (series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.castSucc i),\n        series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.succ i))\n      (series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂) (Fin.castSucc (↑e i)),\n        series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂) (Fin.succ (↑e i)))\n[PROOFSTEP]\nintro i\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx₁ x₂ y₁ y₂ : X\nhsat₁ : IsMaximal (top s) x₁\nhsat₂ : IsMaximal (top s) x₂\nhsaty₁ : IsMaximal (top (snoc s x₁ hsat₁)) y₁\nhsaty₂ : IsMaximal (top (snoc s x₂ hsat₂)) y₂\nhr₁ : Iso (top s, x₁) (x₂, y₂)\nhr₂ : Iso (x₁, y₁) (top s, x₂)\ne : Fin (s.length + 1 + 1) ≃ Fin (s.length + 1 + 1) :=\n  Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))\nh1 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.castSucc (Fin.last s.length)\nh2 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.last (s.length + 1)\ni : Fin (snoc (snoc s x₁ hsat₁) y₁ hsaty₁).length\n⊢ Iso\n    (series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.castSucc i), series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.succ i))\n    (series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂) (Fin.castSucc (↑e i)),\n      series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂) (Fin.succ (↑e i)))\n[PROOFSTEP]\ndsimp only []\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx₁ x₂ y₁ y₂ : X\nhsat₁ : IsMaximal (top s) x₁\nhsat₂ : IsMaximal (top s) x₂\nhsaty₁ : IsMaximal (top (snoc s x₁ hsat₁)) y₁\nhsaty₂ : IsMaximal (top (snoc s x₂ hsat₂)) y₂\nhr₁ : Iso (top s, x₁) (x₂, y₂)\nhr₂ : Iso (x₁, y₁) (top s, x₂)\ne : Fin (s.length + 1 + 1) ≃ Fin (s.length + 1 + 1) :=\n  Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))\nh1 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.castSucc (Fin.last s.length)\nh2 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.last (s.length + 1)\ni : Fin (snoc (snoc s x₁ hsat₁) y₁ hsaty₁).length\n⊢ Iso\n    (series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.castSucc i), series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.succ i))\n    (series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂)\n        (Fin.castSucc (↑(Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))) i)),\n      series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂)\n        (Fin.succ (↑(Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))) i)))\n[PROOFSTEP]\nrefine' Fin.lastCases _ (fun i => _) i\n[GOAL]\ncase refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx₁ x₂ y₁ y₂ : X\nhsat₁ : IsMaximal (top s) x₁\nhsat₂ : IsMaximal (top s) x₂\nhsaty₁ : IsMaximal (top (snoc s x₁ hsat₁)) y₁\nhsaty₂ : IsMaximal (top (snoc s x₂ hsat₂)) y₂\nhr₁ : Iso (top s, x₁) (x₂, y₂)\nhr₂ : Iso (x₁, y₁) (top s, x₂)\ne : Fin (s.length + 1 + 1) ≃ Fin (s.length + 1 + 1) :=\n  Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))\nh1 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.castSucc (Fin.last s.length)\nh2 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.last (s.length + 1)\ni : Fin (snoc (snoc s x₁ hsat₁) y₁ hsaty₁).length\n⊢ Iso\n    (series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.castSucc (Fin.last (snoc s x₁ hsat₁).length)),\n      series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.succ (Fin.last (snoc s x₁ hsat₁).length)))\n    (series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂)\n        (Fin.castSucc\n          (↑(Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length)))\n            (Fin.last (snoc s x₁ hsat₁).length))),\n      series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂)\n        (Fin.succ\n          (↑(Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length)))\n            (Fin.last (snoc s x₁ hsat₁).length))))\n[PROOFSTEP]\nerw [Equiv.swap_apply_left, snoc_castSucc, snoc_last, Fin.succ_last, snoc_last, snoc_castSucc, snoc_castSucc,\n  Fin.succ_castSucc, snoc_castSucc, Fin.succ_last, snoc_last]\n[GOAL]\ncase refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx₁ x₂ y₁ y₂ : X\nhsat₁ : IsMaximal (top s) x₁\nhsat₂ : IsMaximal (top s) x₂\nhsaty₁ : IsMaximal (top (snoc s x₁ hsat₁)) y₁\nhsaty₂ : IsMaximal (top (snoc s x₂ hsat₂)) y₂\nhr₁ : Iso (top s, x₁) (x₂, y₂)\nhr₂ : Iso (x₁, y₁) (top s, x₂)\ne : Fin (s.length + 1 + 1) ≃ Fin (s.length + 1 + 1) :=\n  Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))\nh1 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.castSucc (Fin.last s.length)\nh2 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.last (s.length + 1)\ni : Fin (snoc (snoc s x₁ hsat₁) y₁ hsaty₁).length\n⊢ Iso (x₁, y₁) (series s (Fin.last s.length), x₂)\n[PROOFSTEP]\nexact hr₂\n[GOAL]\ncase refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx₁ x₂ y₁ y₂ : X\nhsat₁ : IsMaximal (top s) x₁\nhsat₂ : IsMaximal (top s) x₂\nhsaty₁ : IsMaximal (top (snoc s x₁ hsat₁)) y₁\nhsaty₂ : IsMaximal (top (snoc s x₂ hsat₂)) y₂\nhr₁ : Iso (top s, x₁) (x₂, y₂)\nhr₂ : Iso (x₁, y₁) (top s, x₂)\ne : Fin (s.length + 1 + 1) ≃ Fin (s.length + 1 + 1) :=\n  Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))\nh1 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.castSucc (Fin.last s.length)\nh2 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.last (s.length + 1)\ni✝ : Fin (snoc (snoc s x₁ hsat₁) y₁ hsaty₁).length\ni : Fin (snoc s x₁ hsat₁).length\n⊢ Iso\n    (series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.castSucc (Fin.castSucc i)),\n      series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.succ (Fin.castSucc i)))\n    (series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂)\n        (Fin.castSucc (↑(Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))) (Fin.castSucc i))),\n      series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂)\n        (Fin.succ (↑(Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))) (Fin.castSucc i))))\n[PROOFSTEP]\nrefine' Fin.lastCases _ (fun i => _) i\n[GOAL]\ncase refine'_2.refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx₁ x₂ y₁ y₂ : X\nhsat₁ : IsMaximal (top s) x₁\nhsat₂ : IsMaximal (top s) x₂\nhsaty₁ : IsMaximal (top (snoc s x₁ hsat₁)) y₁\nhsaty₂ : IsMaximal (top (snoc s x₂ hsat₂)) y₂\nhr₁ : Iso (top s, x₁) (x₂, y₂)\nhr₂ : Iso (x₁, y₁) (top s, x₂)\ne : Fin (s.length + 1 + 1) ≃ Fin (s.length + 1 + 1) :=\n  Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))\nh1 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.castSucc (Fin.last s.length)\nh2 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.last (s.length + 1)\ni✝ : Fin (snoc (snoc s x₁ hsat₁) y₁ hsaty₁).length\ni : Fin (snoc s x₁ hsat₁).length\n⊢ Iso\n    (series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.castSucc (Fin.castSucc (Fin.last s.length))),\n      series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.succ (Fin.castSucc (Fin.last s.length))))\n    (series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂)\n        (Fin.castSucc\n          (↑(Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length)))\n            (Fin.castSucc (Fin.last s.length)))),\n      series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂)\n        (Fin.succ\n          (↑(Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length)))\n            (Fin.castSucc (Fin.last s.length)))))\n[PROOFSTEP]\nerw [Equiv.swap_apply_right, snoc_castSucc, snoc_castSucc, snoc_castSucc, Fin.succ_castSucc, snoc_castSucc,\n  Fin.succ_last, snoc_last, snoc_last, Fin.succ_last, snoc_last]\n[GOAL]\ncase refine'_2.refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx₁ x₂ y₁ y₂ : X\nhsat₁ : IsMaximal (top s) x₁\nhsat₂ : IsMaximal (top s) x₂\nhsaty₁ : IsMaximal (top (snoc s x₁ hsat₁)) y₁\nhsaty₂ : IsMaximal (top (snoc s x₂ hsat₂)) y₂\nhr₁ : Iso (top s, x₁) (x₂, y₂)\nhr₂ : Iso (x₁, y₁) (top s, x₂)\ne : Fin (s.length + 1 + 1) ≃ Fin (s.length + 1 + 1) :=\n  Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))\nh1 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.castSucc (Fin.last s.length)\nh2 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.last (s.length + 1)\ni✝ : Fin (snoc (snoc s x₁ hsat₁) y₁ hsaty₁).length\ni : Fin (snoc s x₁ hsat₁).length\n⊢ Iso (series s (Fin.last s.length), x₁) (x₂, y₂)\n[PROOFSTEP]\nexact hr₁\n[GOAL]\ncase refine'_2.refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx₁ x₂ y₁ y₂ : X\nhsat₁ : IsMaximal (top s) x₁\nhsat₂ : IsMaximal (top s) x₂\nhsaty₁ : IsMaximal (top (snoc s x₁ hsat₁)) y₁\nhsaty₂ : IsMaximal (top (snoc s x₂ hsat₂)) y₂\nhr₁ : Iso (top s, x₁) (x₂, y₂)\nhr₂ : Iso (x₁, y₁) (top s, x₂)\ne : Fin (s.length + 1 + 1) ≃ Fin (s.length + 1 + 1) :=\n  Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))\nh1 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.castSucc (Fin.last s.length)\nh2 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.last (s.length + 1)\ni✝¹ : Fin (snoc (snoc s x₁ hsat₁) y₁ hsaty₁).length\ni✝ : Fin (snoc s x₁ hsat₁).length\ni : Fin s.length\n⊢ Iso\n    (series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.castSucc (Fin.castSucc (Fin.castSucc i))),\n      series (snoc (snoc s x₁ hsat₁) y₁ hsaty₁) (Fin.succ (Fin.castSucc (Fin.castSucc i))))\n    (series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂)\n        (Fin.castSucc\n          (↑(Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))) (Fin.castSucc (Fin.castSucc i)))),\n      series (snoc (snoc s x₂ hsat₂) y₂ hsaty₂)\n        (Fin.succ\n          (↑(Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))) (Fin.castSucc (Fin.castSucc i)))))\n[PROOFSTEP]\nerw [Equiv.swap_apply_of_ne_of_ne h2 h1, snoc_castSucc, snoc_castSucc, snoc_castSucc, snoc_castSucc, Fin.succ_castSucc,\n  snoc_castSucc, Fin.succ_castSucc, snoc_castSucc, snoc_castSucc, snoc_castSucc]\n[GOAL]\ncase refine'_2.refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx₁ x₂ y₁ y₂ : X\nhsat₁ : IsMaximal (top s) x₁\nhsat₂ : IsMaximal (top s) x₂\nhsaty₁ : IsMaximal (top (snoc s x₁ hsat₁)) y₁\nhsaty₂ : IsMaximal (top (snoc s x₂ hsat₂)) y₂\nhr₁ : Iso (top s, x₁) (x₂, y₂)\nhr₂ : Iso (x₁, y₁) (top s, x₂)\ne : Fin (s.length + 1 + 1) ≃ Fin (s.length + 1 + 1) :=\n  Equiv.swap (Fin.last (s.length + 1)) (Fin.castSucc (Fin.last s.length))\nh1 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.castSucc (Fin.last s.length)\nh2 : ∀ {i : Fin s.length}, Fin.castSucc (Fin.castSucc i) ≠ Fin.last (s.length + 1)\ni✝¹ : Fin (snoc (snoc s x₁ hsat₁) y₁ hsaty₁).length\ni✝ : Fin (snoc s x₁ hsat₁).length\ni : Fin s.length\n⊢ Iso (series s (Fin.castSucc i), series s (Fin.succ i)) (series s (Fin.castSucc i), series s (Fin.succ i))\n[PROOFSTEP]\nexact (s.step i).iso_refl\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhs₁ : s₁.length = 0\n⊢ s₂.length = 0\n[PROOFSTEP]\nhave : s₁.bot = s₁.top := congr_arg s₁ (Fin.ext (by simp [hs₁]))\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhs₁ : s₁.length = 0\n⊢ ↑0 = ↑(Fin.last s₁.length)\n[PROOFSTEP]\nsimp [hs₁]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhs₁ : s₁.length = 0\nthis : bot s₁ = top s₁\n⊢ s₂.length = 0\n[PROOFSTEP]\nhave : Fin.last s₂.length = (0 : Fin s₂.length.succ) := s₂.injective (hb.symm.trans (this.trans ht)).symm\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhs₁ : s₁.length = 0\nthis✝ : bot s₁ = top s₁\nthis : Fin.last s₂.length = 0\n⊢ s₂.length = 0\n[PROOFSTEP]\nrw [Fin.ext_iff] at this \n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhs₁ : s₁.length = 0\nthis✝ : bot s₁ = top s₁\nthis : ↑(Fin.last s₂.length) = ↑0\n⊢ s₂.length = 0\n[PROOFSTEP]\nsimpa\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\n⊢ ¬0 < s₂.length → ¬0 < s₁.length\n[PROOFSTEP]\nsimp only [pos_iff_ne_zero, Ne.def, not_iff_not, Classical.not_not]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\n⊢ s₂.length = 0 → s₁.length = 0\n[PROOFSTEP]\nexact length_eq_zero_of_bot_eq_bot_of_top_eq_top_of_length_eq_zero hb.symm ht.symm\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhs₁0 : s₁.length = 0\n⊢ s₁ = s₂\n[PROOFSTEP]\nhave : ∀ x, x ∈ s₁ ↔ x = s₁.top := fun x =>\n  ⟨fun hx => forall_mem_eq_of_length_eq_zero hs₁0 hx s₁.top_mem, fun hx => hx.symm ▸ s₁.top_mem⟩\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhs₁0 : s₁.length = 0\nthis : ∀ (x : X), x ∈ s₁ ↔ x = top s₁\n⊢ s₁ = s₂\n[PROOFSTEP]\nhave : ∀ x, x ∈ s₂ ↔ x = s₂.top := fun x =>\n  ⟨fun hx =>\n    forall_mem_eq_of_length_eq_zero (length_eq_zero_of_bot_eq_bot_of_top_eq_top_of_length_eq_zero hb ht hs₁0) hx\n      s₂.top_mem,\n    fun hx => hx.symm ▸ s₂.top_mem⟩\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhs₁0 : s₁.length = 0\nthis✝ : ∀ (x : X), x ∈ s₁ ↔ x = top s₁\nthis : ∀ (x : X), x ∈ s₂ ↔ x = top s₂\n⊢ s₁ = s₂\n[PROOFSTEP]\next\n[GOAL]\ncase h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhs₁0 : s₁.length = 0\nthis✝ : ∀ (x : X), x ∈ s₁ ↔ x = top s₁\nthis : ∀ (x : X), x ∈ s₂ ↔ x = top s₂\nx✝ : X\n⊢ x✝ ∈ s₁ ↔ x✝ ∈ s₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\n⊢ ∃ t, bot t = bot s ∧ t.length + 1 = s.length ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\n[PROOFSTEP]\ninduction' hn : s.length with n ih generalizing s x\n[GOAL]\ncase zero\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.zero\n⊢ ∃ t, bot t = bot s ∧ t.length + 1 = Nat.zero ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\n[PROOFSTEP]\nexact (ne_of_gt (lt_of_le_of_lt hb (lt_of_isMaximal hm)) (forall_mem_eq_of_length_eq_zero hn s.top_mem s.bot_mem)).elim\n[GOAL]\ncase succ\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\n⊢ ∃ t, bot t = bot s ∧ t.length + 1 = Nat.succ n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\n[PROOFSTEP]\nhave h0s : 0 < s.length := hn.symm ▸ Nat.succ_pos _\n[GOAL]\ncase succ\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\n⊢ ∃ t, bot t = bot s ∧ t.length + 1 = Nat.succ n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\n[PROOFSTEP]\nby_cases hetx : s.eraseTop.top = x\n[GOAL]\ncase pos\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : top (eraseTop s) = x\n⊢ ∃ t, bot t = bot s ∧ t.length + 1 = Nat.succ n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\n[PROOFSTEP]\nuse s.eraseTop\n[GOAL]\ncase h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : top (eraseTop s) = x\n⊢ bot (eraseTop s) = bot s ∧\n    (eraseTop s).length + 1 = Nat.succ n ∧\n      ∃ htx, Equivalent s (snoc (eraseTop s) (top s) (_ : IsMaximal (top (eraseTop s)) (top s)))\n[PROOFSTEP]\nsimp [← hetx, hn]\n  -- Porting note: `rfl` is required.\n[GOAL]\ncase h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : top (eraseTop s) = x\n⊢ Equivalent s s\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\n⊢ ∃ t, bot t = bot s ∧ t.length + 1 = Nat.succ n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\n[PROOFSTEP]\nhave imxs : IsMaximal (x ⊓ s.eraseTop.top) s.eraseTop.top :=\n  isMaximal_of_eq_inf x s.top rfl (Ne.symm hetx) hm (isMaximal_eraseTop_top h0s)\n[GOAL]\ncase neg\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\n⊢ ∃ t, bot t = bot s ∧ t.length + 1 = Nat.succ n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\n[PROOFSTEP]\nhave := ih _ _ imxs (le_inf (by simpa) (le_top_of_mem s.eraseTop.bot_mem)) (by simp [hn])\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\n⊢ bot (eraseTop s) ≤ x\n[PROOFSTEP]\nsimpa\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\n⊢ (eraseTop s).length = n\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase neg\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nthis :\n  ∃ t,\n    bot t = bot (eraseTop s) ∧\n      t.length + 1 = n ∧\n        ∃ htx, Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\n⊢ ∃ t, bot t = bot s ∧ t.length + 1 = Nat.succ n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\n[PROOFSTEP]\nrcases this with ⟨t, htb, htl, htt, hteqv⟩\n[GOAL]\ncase neg.intro.intro.intro.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\n⊢ ∃ t, bot t = bot s ∧ t.length + 1 = Nat.succ n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\n[PROOFSTEP]\nhave hmtx : IsMaximal t.top x :=\n  isMaximal_of_eq_inf s.eraseTop.top s.top (by rw [inf_comm, htt]) hetx (isMaximal_eraseTop_top h0s) hm\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\n⊢ top (eraseTop s) ⊓ x = top t\n[PROOFSTEP]\nrw [inf_comm, htt]\n[GOAL]\ncase neg.intro.intro.intro.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n⊢ ∃ t, bot t = bot s ∧ t.length + 1 = Nat.succ n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\n[PROOFSTEP]\nuse snoc t x hmtx\n[GOAL]\ncase h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n⊢ bot (snoc t x hmtx) = bot s ∧\n    (snoc t x hmtx).length + 1 = Nat.succ n ∧\n      ∃ htx, Equivalent s (snoc (snoc t x hmtx) (top s) (_ : IsMaximal (top (snoc t x hmtx)) (top s)))\n[PROOFSTEP]\nrefine' ⟨by simp [htb], by simp [htl], by simp, _⟩\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n⊢ bot (snoc t x hmtx) = bot s\n[PROOFSTEP]\nsimp [htb]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n⊢ (snoc t x hmtx).length + 1 = Nat.succ n\n[PROOFSTEP]\nsimp [htl]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n⊢ top (snoc t x hmtx) = x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n⊢ Equivalent s (snoc (snoc t x hmtx) (top s) (_ : IsMaximal (top (snoc t x hmtx)) (top s)))\n[PROOFSTEP]\nhave :\n  s.Equivalent ((snoc t s.eraseTop.top (htt.symm ▸ imxs)).snoc s.top (by simpa using isMaximal_eraseTop_top h0s)) :=\n  by\n  conv_lhs => rw [eq_snoc_eraseTop h0s]\n  exact Equivalent.snoc hteqv (by simpa using (isMaximal_eraseTop_top h0s).iso_refl)\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n⊢ IsMaximal (top (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))) (top s)\n[PROOFSTEP]\nsimpa using isMaximal_eraseTop_top h0s\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n⊢ Equivalent s\n    (snoc (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s)))) (top s)\n      (_ : IsMaximal (top (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))) (top s)))\n[PROOFSTEP]\nconv_lhs => rw [eq_snoc_eraseTop h0s]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n| s\n[PROOFSTEP]\nrw [eq_snoc_eraseTop h0s]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n| s\n[PROOFSTEP]\nrw [eq_snoc_eraseTop h0s]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n| s\n[PROOFSTEP]\nrw [eq_snoc_eraseTop h0s]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n⊢ Equivalent (snoc (eraseTop s) (top s) (_ : IsMaximal (top (eraseTop s)) (top s)))\n    (snoc (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s)))) (top s)\n      (_ : IsMaximal (top (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))) (top s)))\n[PROOFSTEP]\nexact Equivalent.snoc hteqv (by simpa using (isMaximal_eraseTop_top h0s).iso_refl)\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\n⊢ Iso (top (eraseTop s), top s) (top (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s)))), top s)\n[PROOFSTEP]\nsimpa using (isMaximal_eraseTop_top h0s).iso_refl\n[GOAL]\ncase h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\nthis :\n  Equivalent s\n    (snoc (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s)))) (top s)\n      (_ : IsMaximal (top (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))) (top s)))\n⊢ Equivalent s (snoc (snoc t x hmtx) (top s) (_ : IsMaximal (top (snoc t x hmtx)) (top s)))\n[PROOFSTEP]\nrefine' this.trans _\n[GOAL]\ncase h\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\nthis :\n  Equivalent s\n    (snoc (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s)))) (top s)\n      (_ : IsMaximal (top (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))) (top s)))\n⊢ Equivalent\n    (snoc (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s)))) (top s)\n      (_ : IsMaximal (top (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))) (top s)))\n    (snoc (snoc t x hmtx) (top s) (_ : IsMaximal (top (snoc t x hmtx)) (top s)))\n[PROOFSTEP]\nrefine' Equivalent.snoc_snoc_swap _ _\n[GOAL]\ncase h.refine'_1\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\nthis :\n  Equivalent s\n    (snoc (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s)))) (top s)\n      (_ : IsMaximal (top (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))) (top s)))\n⊢ Iso (top t, top (eraseTop s)) (x, top s)\n[PROOFSTEP]\nexact iso_symm (second_iso_of_eq hm (sup_eq_of_isMaximal hm (isMaximal_eraseTop_top h0s) (Ne.symm hetx)) htt.symm)\n[GOAL]\ncase h.refine'_2\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\nthis :\n  Equivalent s\n    (snoc (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s)))) (top s)\n      (_ : IsMaximal (top (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))) (top s)))\n⊢ Iso (top (eraseTop s), top s) (top t, x)\n[PROOFSTEP]\nexact\n  second_iso_of_eq (isMaximal_eraseTop_top h0s) (sup_eq_of_isMaximal (isMaximal_eraseTop_top h0s) hm hetx)\n    (by rw [inf_comm, htt])\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns✝ : CompositionSeries X\nx✝¹ : X\nhm✝ : IsMaximal x✝¹ (top s✝)\nhb✝ : bot s✝ ≤ x✝¹\nx✝ : ℕ\nhn✝ : s✝.length = x✝\nn : ℕ\nih :\n  ∀ (s : CompositionSeries X) (x : X) (hm : IsMaximal x (top s)),\n    bot s ≤ x →\n      s.length = n →\n        ∃ t, bot t = bot s ∧ t.length + 1 = n ∧ ∃ htx, Equivalent s (snoc t (top s) (_ : IsMaximal (top t) (top s)))\ns : CompositionSeries X\nx : X\nhm : IsMaximal x (top s)\nhb : bot s ≤ x\nhn : s.length = Nat.succ n\nh0s : 0 < s.length\nhetx : ¬top (eraseTop s) = x\nimxs : IsMaximal (x ⊓ top (eraseTop s)) (top (eraseTop s))\nt : CompositionSeries X\nhtb : bot t = bot (eraseTop s)\nhtl : t.length + 1 = n\nhtt : top t = x ⊓ top (eraseTop s)\nhteqv : Equivalent (eraseTop s) (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))\nhmtx : IsMaximal (top t) x\nthis :\n  Equivalent s\n    (snoc (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s)))) (top s)\n      (_ : IsMaximal (top (snoc t (top (eraseTop s)) (_ : IsMaximal (top t) (top (eraseTop s))))) (top s)))\n⊢ top (eraseTop s) ⊓ x = top t\n[PROOFSTEP]\nrw [inf_comm, htt]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\n⊢ Equivalent s₁ s₂\n[PROOFSTEP]\ninduction' hle : s₁.length with n ih generalizing s₁ s₂\n[GOAL]\ncase zero\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.zero\n⊢ Equivalent s₁ s₂\n[PROOFSTEP]\nrw [eq_of_bot_eq_bot_of_top_eq_top_of_length_eq_zero hb ht hle]\n[GOAL]\ncase succ\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\nn : ℕ\nih : ∀ (s₁ s₂ : CompositionSeries X), bot s₁ = bot s₂ → top s₁ = top s₂ → s₁.length = n → Equivalent s₁ s₂\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.succ n\n⊢ Equivalent s₁ s₂\n[PROOFSTEP]\nhave h0s₂ : 0 < s₂.length := length_pos_of_bot_eq_bot_of_top_eq_top_of_length_pos hb ht (hle.symm ▸ Nat.succ_pos _)\n[GOAL]\ncase succ\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\nn : ℕ\nih : ∀ (s₁ s₂ : CompositionSeries X), bot s₁ = bot s₂ → top s₁ = top s₂ → s₁.length = n → Equivalent s₁ s₂\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.succ n\nh0s₂ : 0 < s₂.length\n⊢ Equivalent s₁ s₂\n[PROOFSTEP]\nrcases exists_top_eq_snoc_equivalant s₁ s₂.eraseTop.top (ht.symm ▸ isMaximal_eraseTop_top h0s₂)\n    (hb.symm ▸ s₂.bot_eraseTop ▸ bot_le_of_mem (top_mem _)) with\n  ⟨t, htb, htl, htt, hteq⟩\n[GOAL]\ncase succ.intro.intro.intro.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\nn : ℕ\nih : ∀ (s₁ s₂ : CompositionSeries X), bot s₁ = bot s₂ → top s₁ = top s₂ → s₁.length = n → Equivalent s₁ s₂\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.succ n\nh0s₂ : 0 < s₂.length\nt : CompositionSeries X\nhtb : bot t = bot s₁\nhtl : t.length + 1 = s₁.length\nhtt : top t = top (eraseTop s₂)\nhteq : Equivalent s₁ (snoc t (top s₁) (_ : IsMaximal (top t) (top s₁)))\n⊢ Equivalent s₁ s₂\n[PROOFSTEP]\nhave := ih t s₂.eraseTop (by simp [htb, ← hb]) htt (Nat.succ_inj'.1 (htl.trans hle))\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\nn : ℕ\nih : ∀ (s₁ s₂ : CompositionSeries X), bot s₁ = bot s₂ → top s₁ = top s₂ → s₁.length = n → Equivalent s₁ s₂\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.succ n\nh0s₂ : 0 < s₂.length\nt : CompositionSeries X\nhtb : bot t = bot s₁\nhtl : t.length + 1 = s₁.length\nhtt : top t = top (eraseTop s₂)\nhteq : Equivalent s₁ (snoc t (top s₁) (_ : IsMaximal (top t) (top s₁)))\n⊢ bot t = bot (eraseTop s₂)\n[PROOFSTEP]\nsimp [htb, ← hb]\n[GOAL]\ncase succ.intro.intro.intro.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\nn : ℕ\nih : ∀ (s₁ s₂ : CompositionSeries X), bot s₁ = bot s₂ → top s₁ = top s₂ → s₁.length = n → Equivalent s₁ s₂\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.succ n\nh0s₂ : 0 < s₂.length\nt : CompositionSeries X\nhtb : bot t = bot s₁\nhtl : t.length + 1 = s₁.length\nhtt : top t = top (eraseTop s₂)\nhteq : Equivalent s₁ (snoc t (top s₁) (_ : IsMaximal (top t) (top s₁)))\nthis : Equivalent t (eraseTop s₂)\n⊢ Equivalent s₁ s₂\n[PROOFSTEP]\nrefine' hteq.trans _\n[GOAL]\ncase succ.intro.intro.intro.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\nn : ℕ\nih : ∀ (s₁ s₂ : CompositionSeries X), bot s₁ = bot s₂ → top s₁ = top s₂ → s₁.length = n → Equivalent s₁ s₂\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.succ n\nh0s₂ : 0 < s₂.length\nt : CompositionSeries X\nhtb : bot t = bot s₁\nhtl : t.length + 1 = s₁.length\nhtt : top t = top (eraseTop s₂)\nhteq : Equivalent s₁ (snoc t (top s₁) (_ : IsMaximal (top t) (top s₁)))\nthis : Equivalent t (eraseTop s₂)\n⊢ Equivalent (snoc t (top s₁) (_ : IsMaximal (top t) (top s₁))) s₂\n[PROOFSTEP]\nconv_rhs => rw [eq_snoc_eraseTop h0s₂]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\nn : ℕ\nih : ∀ (s₁ s₂ : CompositionSeries X), bot s₁ = bot s₂ → top s₁ = top s₂ → s₁.length = n → Equivalent s₁ s₂\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.succ n\nh0s₂ : 0 < s₂.length\nt : CompositionSeries X\nhtb : bot t = bot s₁\nhtl : t.length + 1 = s₁.length\nhtt : top t = top (eraseTop s₂)\nhteq : Equivalent s₁ (snoc t (top s₁) (_ : IsMaximal (top t) (top s₁)))\nthis : Equivalent t (eraseTop s₂)\n| s₂\n[PROOFSTEP]\nrw [eq_snoc_eraseTop h0s₂]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\nn : ℕ\nih : ∀ (s₁ s₂ : CompositionSeries X), bot s₁ = bot s₂ → top s₁ = top s₂ → s₁.length = n → Equivalent s₁ s₂\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.succ n\nh0s₂ : 0 < s₂.length\nt : CompositionSeries X\nhtb : bot t = bot s₁\nhtl : t.length + 1 = s₁.length\nhtt : top t = top (eraseTop s₂)\nhteq : Equivalent s₁ (snoc t (top s₁) (_ : IsMaximal (top t) (top s₁)))\nthis : Equivalent t (eraseTop s₂)\n| s₂\n[PROOFSTEP]\nrw [eq_snoc_eraseTop h0s₂]\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\nn : ℕ\nih : ∀ (s₁ s₂ : CompositionSeries X), bot s₁ = bot s₂ → top s₁ = top s₂ → s₁.length = n → Equivalent s₁ s₂\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.succ n\nh0s₂ : 0 < s₂.length\nt : CompositionSeries X\nhtb : bot t = bot s₁\nhtl : t.length + 1 = s₁.length\nhtt : top t = top (eraseTop s₂)\nhteq : Equivalent s₁ (snoc t (top s₁) (_ : IsMaximal (top t) (top s₁)))\nthis : Equivalent t (eraseTop s₂)\n| s₂\n[PROOFSTEP]\nrw [eq_snoc_eraseTop h0s₂]\n[GOAL]\ncase succ.intro.intro.intro.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\nn : ℕ\nih : ∀ (s₁ s₂ : CompositionSeries X), bot s₁ = bot s₂ → top s₁ = top s₂ → s₁.length = n → Equivalent s₁ s₂\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.succ n\nh0s₂ : 0 < s₂.length\nt : CompositionSeries X\nhtb : bot t = bot s₁\nhtl : t.length + 1 = s₁.length\nhtt : top t = top (eraseTop s₂)\nhteq : Equivalent s₁ (snoc t (top s₁) (_ : IsMaximal (top t) (top s₁)))\nthis : Equivalent t (eraseTop s₂)\n⊢ Equivalent (snoc t (top s₁) (_ : IsMaximal (top t) (top s₁)))\n    (snoc (eraseTop s₂) (top s₂) (_ : IsMaximal (top (eraseTop s₂)) (top s₂)))\n[PROOFSTEP]\nsimp only [ht]\n[GOAL]\ncase succ.intro.intro.intro.intro\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\nn : ℕ\nih : ∀ (s₁ s₂ : CompositionSeries X), bot s₁ = bot s₂ → top s₁ = top s₂ → s₁.length = n → Equivalent s₁ s₂\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.succ n\nh0s₂ : 0 < s₂.length\nt : CompositionSeries X\nhtb : bot t = bot s₁\nhtl : t.length + 1 = s₁.length\nhtt : top t = top (eraseTop s₂)\nhteq : Equivalent s₁ (snoc t (top s₁) (_ : IsMaximal (top t) (top s₁)))\nthis : Equivalent t (eraseTop s₂)\n⊢ Equivalent (snoc t (top s₂) (_ : IsMaximal (top t) (top s₂)))\n    (snoc (eraseTop s₂) (top s₂) (_ : IsMaximal (top (eraseTop s₂)) (top s₂)))\n[PROOFSTEP]\nexact Equivalent.snoc this (by simp [htt, (isMaximal_eraseTop_top h0s₂).iso_refl])\n[GOAL]\nX : Type u\ninst✝¹ : Lattice X\ninst✝ : JordanHolderLattice X\ns₁✝ s₂✝ : CompositionSeries X\nhb✝ : bot s₁✝ = bot s₂✝\nht✝ : top s₁✝ = top s₂✝\nx✝ : ℕ\nhle✝ : s₁✝.length = x✝\nn : ℕ\nih : ∀ (s₁ s₂ : CompositionSeries X), bot s₁ = bot s₂ → top s₁ = top s₂ → s₁.length = n → Equivalent s₁ s₂\ns₁ s₂ : CompositionSeries X\nhb : bot s₁ = bot s₂\nht : top s₁ = top s₂\nhle : s₁.length = Nat.succ n\nh0s₂ : 0 < s₂.length\nt : CompositionSeries X\nhtb : bot t = bot s₁\nhtl : t.length + 1 = s₁.length\nhtt : top t = top (eraseTop s₂)\nhteq : Equivalent s₁ (snoc t (top s₁) (_ : IsMaximal (top t) (top s₁)))\nthis : Equivalent t (eraseTop s₂)\n⊢ Iso (top t, top s₂) (top (eraseTop s₂), top s₂)\n[PROOFSTEP]\nsimp [htt, (isMaximal_eraseTop_top h0s₂).iso_refl]\n", "meta": {"mathlib_filename": "Mathlib.Order.JordanHolder", "llama_tokens": 53535, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442250928250375, "lm_q2_score": 0.5698526514141572, "lm_q1q2_score": 0.36711337725387916}}
{"text": "[GOAL]\nR n : Type\ninst✝² : CommSemiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA B : Matrix n n (DualNumber R)\n⊢ Equiv.toFun\n      { toFun := fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)),\n        invFun := fun d => ↑of fun i j => (fst d i j, snd d i j),\n        left_inv :=\n          (_ :\n            ∀ (A : Matrix n n (DualNumber R)),\n              (fun d => ↑of fun i j => (fst d i j, snd d i j))\n                  ((fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j))) A) =\n                A),\n        right_inv :=\n          (_ :\n            ∀ (d : DualNumber (Matrix n n R)),\n              (fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)))\n                  ((fun d => ↑of fun i j => (fst d i j, snd d i j)) d) =\n                d) }\n      (A * B) =\n    Equiv.toFun\n        { toFun := fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)),\n          invFun := fun d => ↑of fun i j => (fst d i j, snd d i j),\n          left_inv :=\n            (_ :\n              ∀ (A : Matrix n n (DualNumber R)),\n                (fun d => ↑of fun i j => (fst d i j, snd d i j))\n                    ((fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j))) A) =\n                  A),\n          right_inv :=\n            (_ :\n              ∀ (d : DualNumber (Matrix n n R)),\n                (fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)))\n                    ((fun d => ↑of fun i j => (fst d i j, snd d i j)) d) =\n                  d) }\n        A *\n      Equiv.toFun\n        { toFun := fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)),\n          invFun := fun d => ↑of fun i j => (fst d i j, snd d i j),\n          left_inv :=\n            (_ :\n              ∀ (A : Matrix n n (DualNumber R)),\n                (fun d => ↑of fun i j => (fst d i j, snd d i j))\n                    ((fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j))) A) =\n                  A),\n          right_inv :=\n            (_ :\n              ∀ (d : DualNumber (Matrix n n R)),\n                (fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)))\n                    ((fun d => ↑of fun i j => (fst d i j, snd d i j)) d) =\n                  d) }\n        B\n[PROOFSTEP]\next\n[GOAL]\ncase h1.a.h\nR n : Type\ninst✝² : CommSemiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA B : Matrix n n (DualNumber R)\ni✝ x✝ : n\n⊢ fst\n      (Equiv.toFun\n        { toFun := fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)),\n          invFun := fun d => ↑of fun i j => (fst d i j, snd d i j),\n          left_inv :=\n            (_ :\n              ∀ (A : Matrix n n (DualNumber R)),\n                (fun d => ↑of fun i j => (fst d i j, snd d i j))\n                    ((fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j))) A) =\n                  A),\n          right_inv :=\n            (_ :\n              ∀ (d : DualNumber (Matrix n n R)),\n                (fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)))\n                    ((fun d => ↑of fun i j => (fst d i j, snd d i j)) d) =\n                  d) }\n        (A * B))\n      i✝ x✝ =\n    fst\n      (Equiv.toFun\n          { toFun := fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)),\n            invFun := fun d => ↑of fun i j => (fst d i j, snd d i j),\n            left_inv :=\n              (_ :\n                ∀ (A : Matrix n n (DualNumber R)),\n                  (fun d => ↑of fun i j => (fst d i j, snd d i j))\n                      ((fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j))) A) =\n                    A),\n            right_inv :=\n              (_ :\n                ∀ (d : DualNumber (Matrix n n R)),\n                  (fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)))\n                      ((fun d => ↑of fun i j => (fst d i j, snd d i j)) d) =\n                    d) }\n          A *\n        Equiv.toFun\n          { toFun := fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)),\n            invFun := fun d => ↑of fun i j => (fst d i j, snd d i j),\n            left_inv :=\n              (_ :\n                ∀ (A : Matrix n n (DualNumber R)),\n                  (fun d => ↑of fun i j => (fst d i j, snd d i j))\n                      ((fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j))) A) =\n                    A),\n            right_inv :=\n              (_ :\n                ∀ (d : DualNumber (Matrix n n R)),\n                  (fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)))\n                      ((fun d => ↑of fun i j => (fst d i j, snd d i j)) d) =\n                    d) }\n          B)\n      i✝ x✝\n[PROOFSTEP]\ndsimp [mul_apply]\n[GOAL]\ncase h1.a.h\nR n : Type\ninst✝² : CommSemiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA B : Matrix n n (DualNumber R)\ni✝ x✝ : n\n⊢ fst (Finset.sum Finset.univ fun j => A i✝ j * B j x✝) = Finset.sum Finset.univ fun j => fst (A i✝ j) * fst (B j x✝)\n[PROOFSTEP]\nsimp_rw [fst_sum]\n[GOAL]\ncase h1.a.h\nR n : Type\ninst✝² : CommSemiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA B : Matrix n n (DualNumber R)\ni✝ x✝ : n\n⊢ (Finset.sum Finset.univ fun i => fst (A i✝ i * B i x✝)) = Finset.sum Finset.univ fun j => fst (A i✝ j) * fst (B j x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h2.a.h\nR n : Type\ninst✝² : CommSemiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA B : Matrix n n (DualNumber R)\ni✝ x✝ : n\n⊢ snd\n      (Equiv.toFun\n        { toFun := fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)),\n          invFun := fun d => ↑of fun i j => (fst d i j, snd d i j),\n          left_inv :=\n            (_ :\n              ∀ (A : Matrix n n (DualNumber R)),\n                (fun d => ↑of fun i j => (fst d i j, snd d i j))\n                    ((fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j))) A) =\n                  A),\n          right_inv :=\n            (_ :\n              ∀ (d : DualNumber (Matrix n n R)),\n                (fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)))\n                    ((fun d => ↑of fun i j => (fst d i j, snd d i j)) d) =\n                  d) }\n        (A * B))\n      i✝ x✝ =\n    snd\n      (Equiv.toFun\n          { toFun := fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)),\n            invFun := fun d => ↑of fun i j => (fst d i j, snd d i j),\n            left_inv :=\n              (_ :\n                ∀ (A : Matrix n n (DualNumber R)),\n                  (fun d => ↑of fun i j => (fst d i j, snd d i j))\n                      ((fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j))) A) =\n                    A),\n            right_inv :=\n              (_ :\n                ∀ (d : DualNumber (Matrix n n R)),\n                  (fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)))\n                      ((fun d => ↑of fun i j => (fst d i j, snd d i j)) d) =\n                    d) }\n          A *\n        Equiv.toFun\n          { toFun := fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)),\n            invFun := fun d => ↑of fun i j => (fst d i j, snd d i j),\n            left_inv :=\n              (_ :\n                ∀ (A : Matrix n n (DualNumber R)),\n                  (fun d => ↑of fun i j => (fst d i j, snd d i j))\n                      ((fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j))) A) =\n                    A),\n            right_inv :=\n              (_ :\n                ∀ (d : DualNumber (Matrix n n R)),\n                  (fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)))\n                      ((fun d => ↑of fun i j => (fst d i j, snd d i j)) d) =\n                    d) }\n          B)\n      i✝ x✝\n[PROOFSTEP]\nsimp_rw [snd_mul, smul_eq_mul, op_smul_eq_mul]\n[GOAL]\ncase h2.a.h\nR n : Type\ninst✝² : CommSemiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA B : Matrix n n (DualNumber R)\ni✝ x✝ : n\n⊢ snd (↑of fun i j => fst ((A * B) i j), ↑of fun i j => snd ((A * B) i j)) i✝ x✝ =\n    (fst (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)) *\n          snd (↑of fun i j => fst (B i j), ↑of fun i j => snd (B i j)) +\n        snd (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)) *\n          fst (↑of fun i j => fst (B i j), ↑of fun i j => snd (B i j)))\n      i✝ x✝\n[PROOFSTEP]\nsimp [mul_apply, snd_sum, snd_mul]\n[GOAL]\ncase h2.a.h\nR n : Type\ninst✝² : CommSemiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nA B : Matrix n n (DualNumber R)\ni✝ x✝ : n\n⊢ (Finset.sum Finset.univ fun x => fst (A i✝ x) * snd (B x x✝) + snd (A i✝ x) * fst (B x x✝)) =\n    (Finset.sum Finset.univ fun x => fst (A i✝ x) * snd (B x x✝)) +\n      Finset.sum Finset.univ fun x => snd (A i✝ x) * fst (B x x✝)\n[PROOFSTEP]\nrw [← Finset.sum_add_distrib]\n[GOAL]\nR n : Type\ninst✝² : CommSemiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nr : R\n⊢ Equiv.toFun\n      { toFun := fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)),\n        invFun := fun d => ↑of fun i j => (fst d i j, snd d i j),\n        left_inv :=\n          (_ :\n            ∀ (A : Matrix n n (DualNumber R)),\n              (fun d => ↑of fun i j => (fst d i j, snd d i j))\n                  ((fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j))) A) =\n                A),\n        right_inv :=\n          (_ :\n            ∀ (d : DualNumber (Matrix n n R)),\n              (fun A => (↑of fun i j => fst (A i j), ↑of fun i j => snd (A i j)))\n                  ((fun d => ↑of fun i j => (fst d i j, snd d i j)) d) =\n                d) }\n      (↑(algebraMap R (Matrix n n (DualNumber R))) r) =\n    ↑(algebraMap R (DualNumber (Matrix n n R))) r\n[PROOFSTEP]\nsimp_rw [algebraMap_eq_inl', algebraMap_eq_diagonal, Pi.algebraMap_def, Algebra.id.map_eq_self, algebraMap_eq_inl, ←\n  diagonal_map (inl_zero R), map_apply, fst_inl, snd_inl]\n[GOAL]\nR n : Type\ninst✝² : CommSemiring R\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nr : R\n⊢ (↑of fun i j => diagonal (fun m => r) i j, ↑of fun i j => 0) = inl (diagonal fun m => r)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Data.Matrix.DualNumber", "llama_tokens": 4076, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7577943822145999, "lm_q2_score": 0.48438008427698437, "lm_q1q2_score": 0.36706050672173324}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ disjointed ≤ id\n[PROOFSTEP]\nrintro f n\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\nn : ℕ\n⊢ disjointed f n ≤ id f n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\n⊢ disjointed f Nat.zero ≤ id f Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\nn✝ : ℕ\n⊢ disjointed f (Nat.succ n✝) ≤ id f (Nat.succ n✝)\n[PROOFSTEP]\nexact sdiff_le\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\n⊢ Pairwise (Disjoint on disjointed f)\n[PROOFSTEP]\nrefine' (Symmetric.pairwise_on Disjoint.symm _).2 fun m n h => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\nm n : ℕ\nh : m < n\n⊢ Disjoint (disjointed f m) (disjointed f n)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\nm : ℕ\nh : m < Nat.zero\n⊢ Disjoint (disjointed f m) (disjointed f Nat.zero)\n[PROOFSTEP]\nexact (Nat.not_lt_zero _ h).elim\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\nm n✝ : ℕ\nh : m < Nat.succ n✝\n⊢ Disjoint (disjointed f m) (disjointed f (Nat.succ n✝))\n[PROOFSTEP]\nexact disjoint_sdiff_self_right.mono_left ((disjointed_le f m).trans (le_partialSups_of_le f (Nat.lt_add_one_iff.1 h)))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\np : α → Sort u_3\nhdiff : ⦃t : α⦄ → ⦃i : ℕ⦄ → p t → p (t \\ f i)\nn : ℕ\nh : p (f (n + 1))\n⊢ p (disjointed f (n + 1))\n[PROOFSTEP]\nsuffices H : ∀ k, p (f (n + 1) \\ partialSups f k)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\np : α → Sort u_3\nhdiff : ⦃t : α⦄ → ⦃i : ℕ⦄ → p t → p (t \\ f i)\nn : ℕ\nh : p (f (n + 1))\nH : (k : ℕ) → p (f (n + 1) \\ ↑(partialSups f) k)\n⊢ p (disjointed f (n + 1))\n[PROOFSTEP]\nexact H n\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\np : α → Sort u_3\nhdiff : ⦃t : α⦄ → ⦃i : ℕ⦄ → p t → p (t \\ f i)\nn : ℕ\nh : p (f (n + 1))\n⊢ (k : ℕ) → p (f (n + 1) \\ ↑(partialSups f) k)\n[PROOFSTEP]\nrintro k\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\np : α → Sort u_3\nhdiff : ⦃t : α⦄ → ⦃i : ℕ⦄ → p t → p (t \\ f i)\nn : ℕ\nh : p (f (n + 1))\nk : ℕ\n⊢ p (f (n + 1) \\ ↑(partialSups f) k)\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase H.zero\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\np : α → Sort u_3\nhdiff : ⦃t : α⦄ → ⦃i : ℕ⦄ → p t → p (t \\ f i)\nn : ℕ\nh : p (f (n + 1))\n⊢ p (f (n + 1) \\ ↑(partialSups f) Nat.zero)\n[PROOFSTEP]\nexact hdiff h\n[GOAL]\ncase H.succ\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\np : α → Sort u_3\nhdiff : ⦃t : α⦄ → ⦃i : ℕ⦄ → p t → p (t \\ f i)\nn : ℕ\nh : p (f (n + 1))\nk : ℕ\nih : p (f (n + 1) \\ ↑(partialSups f) k)\n⊢ p (f (n + 1) \\ ↑(partialSups f) (Nat.succ k))\n[PROOFSTEP]\nrw [partialSups_succ, ← sdiff_sdiff_left]\n[GOAL]\ncase H.succ\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\np : α → Sort u_3\nhdiff : ⦃t : α⦄ → ⦃i : ℕ⦄ → p t → p (t \\ f i)\nn : ℕ\nh : p (f (n + 1))\nk : ℕ\nih : p (f (n + 1) \\ ↑(partialSups f) k)\n⊢ p ((f (n + 1) \\ ↑(partialSups f) k) \\ f (k + 1))\n[PROOFSTEP]\nexact hdiff ih\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\nhf : Monotone f\nn : ℕ\n⊢ disjointed f (n + 1) = f (n + 1) \\ f n\n[PROOFSTEP]\nrw [disjointed_succ, hf.partialSups_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\n⊢ partialSups (disjointed f) = partialSups f\n[PROOFSTEP]\next n\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\nn : ℕ\n⊢ ↑(partialSups (disjointed f)) n = ↑(partialSups f) n\n[PROOFSTEP]\ninduction' n with k ih\n[GOAL]\ncase h.h.zero\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\n⊢ ↑(partialSups (disjointed f)) Nat.zero = ↑(partialSups f) Nat.zero\n[PROOFSTEP]\nrw [partialSups_zero, partialSups_zero, disjointed_zero]\n[GOAL]\ncase h.h.succ\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf : ℕ → α\nk : ℕ\nih : ↑(partialSups (disjointed f)) k = ↑(partialSups f) k\n⊢ ↑(partialSups (disjointed f)) (Nat.succ k) = ↑(partialSups f) (Nat.succ k)\n[PROOFSTEP]\nrw [partialSups_succ, partialSups_succ, disjointed_succ, ih, sup_sdiff_self_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\n⊢ d = disjointed f\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\nn : ℕ\n⊢ d n = disjointed f n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase h.zero\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\n⊢ d Nat.zero = disjointed f Nat.zero\n[PROOFSTEP]\nrw [← partialSups_zero d, hsups, partialSups_zero, disjointed_zero]\n[GOAL]\ncase h.succ\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\nn : ℕ\n⊢ d (Nat.succ n) = disjointed f (Nat.succ n)\n[PROOFSTEP]\nsuffices h : d n.succ = partialSups d n.succ \\ partialSups d n\n[GOAL]\ncase h.succ\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\nn : ℕ\nh : d (Nat.succ n) = ↑(partialSups d) (Nat.succ n) \\ ↑(partialSups d) n\n⊢ d (Nat.succ n) = disjointed f (Nat.succ n)\n[PROOFSTEP]\nrw [h, hsups, partialSups_succ, disjointed_succ, sup_sdiff, sdiff_self, bot_sup_eq]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\nn : ℕ\n⊢ d (Nat.succ n) = ↑(partialSups d) (Nat.succ n) \\ ↑(partialSups d) n\n[PROOFSTEP]\nrw [partialSups_succ, sup_sdiff, sdiff_self, bot_sup_eq, eq_comm, sdiff_eq_self_iff_disjoint]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\nn : ℕ\n⊢ Disjoint (↑(partialSups d) n) (d (n + 1))\n[PROOFSTEP]\nsuffices h : ∀ m ≤ n, Disjoint (partialSups d m) (d n.succ)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\nn : ℕ\nh : ∀ (m : ℕ), m ≤ n → Disjoint (↑(partialSups d) m) (d (Nat.succ n))\n⊢ Disjoint (↑(partialSups d) n) (d (n + 1))\n[PROOFSTEP]\nexact h n le_rfl\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\nn : ℕ\n⊢ ∀ (m : ℕ), m ≤ n → Disjoint (↑(partialSups d) m) (d (Nat.succ n))\n[PROOFSTEP]\nrintro m hm\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\nn m : ℕ\nhm : m ≤ n\n⊢ Disjoint (↑(partialSups d) m) (d (Nat.succ n))\n[PROOFSTEP]\ninduction' m with m ih\n[GOAL]\ncase h.zero\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\nn m : ℕ\nhm✝ : m ≤ n\nhm : Nat.zero ≤ n\n⊢ Disjoint (↑(partialSups d) Nat.zero) (d (Nat.succ n))\n[PROOFSTEP]\nexact hdisj (Nat.succ_ne_zero _).symm\n[GOAL]\ncase h.succ\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\nn m✝ : ℕ\nhm✝ : m✝ ≤ n\nm : ℕ\nih : m ≤ n → Disjoint (↑(partialSups d) m) (d (Nat.succ n))\nhm : Nat.succ m ≤ n\n⊢ Disjoint (↑(partialSups d) (Nat.succ m)) (d (Nat.succ n))\n[PROOFSTEP]\nrw [partialSups_succ, disjoint_iff, inf_sup_right, sup_eq_bot_iff, ← disjoint_iff, ← disjoint_iff]\n[GOAL]\ncase h.succ\nα : Type u_1\nβ : Type u_2\ninst✝ : GeneralizedBooleanAlgebra α\nf d : ℕ → α\nhdisj : Pairwise (Disjoint on d)\nhsups : partialSups d = partialSups f\nn m✝ : ℕ\nhm✝ : m✝ ≤ n\nm : ℕ\nih : m ≤ n → Disjoint (↑(partialSups d) m) (d (Nat.succ n))\nhm : Nat.succ m ≤ n\n⊢ Disjoint (↑(partialSups d) m) (d (Nat.succ n)) ∧ Disjoint (d (m + 1)) (d (Nat.succ n))\n[PROOFSTEP]\nexact ⟨ih (Nat.le_of_succ_le hm), hdisj (Nat.lt_succ_of_le hm).ne⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CompleteBooleanAlgebra α\nf : ℕ → α\nn : ℕ\n⊢ disjointed f n = f n ⊓ ⨅ (i : ℕ) (_ : i < n), (f i)ᶜ\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝ : CompleteBooleanAlgebra α\nf : ℕ → α\n⊢ disjointed f Nat.zero = f Nat.zero ⊓ ⨅ (i : ℕ) (_ : i < Nat.zero), (f i)ᶜ\n[PROOFSTEP]\nrw [disjointed_zero, eq_comm, inf_eq_left]\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝ : CompleteBooleanAlgebra α\nf : ℕ → α\n⊢ f Nat.zero ≤ ⨅ (i : ℕ) (_ : i < Nat.zero), (f i)ᶜ\n[PROOFSTEP]\nsimp_rw [le_iInf_iff]\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝ : CompleteBooleanAlgebra α\nf : ℕ → α\n⊢ ∀ (i : ℕ), i < Nat.zero → f Nat.zero ≤ (f i)ᶜ\n[PROOFSTEP]\nexact fun i hi => (i.not_lt_zero hi).elim\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝ : CompleteBooleanAlgebra α\nf : ℕ → α\nn✝ : ℕ\n⊢ disjointed f (Nat.succ n✝) = f (Nat.succ n✝) ⊓ ⨅ (i : ℕ) (_ : i < Nat.succ n✝), (f i)ᶜ\n[PROOFSTEP]\nsimp_rw [disjointed_succ, partialSups_eq_biSup, sdiff_eq, compl_iSup]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝ : CompleteBooleanAlgebra α\nf : ℕ → α\nn✝ : ℕ\n⊢ f (n✝ + 1) ⊓ ⨅ (i : ℕ) (_ : i ≤ n✝), (f i)ᶜ = f (Nat.succ n✝) ⊓ ⨅ (i : ℕ) (_ : i < Nat.succ n✝), (f i)ᶜ\n[PROOFSTEP]\ncongr\n[GOAL]\ncase succ.e_a.e_s\nα : Type u_1\nβ : Type u_2\ninst✝ : CompleteBooleanAlgebra α\nf : ℕ → α\nn✝ : ℕ\n⊢ (fun i => ⨅ (_ : i ≤ n✝), (f i)ᶜ) = fun i => ⨅ (_ : i < Nat.succ n✝), (f i)ᶜ\n[PROOFSTEP]\next i\n[GOAL]\ncase succ.e_a.e_s.h\nα : Type u_1\nβ : Type u_2\ninst✝ : CompleteBooleanAlgebra α\nf : ℕ → α\nn✝ i : ℕ\n⊢ ⨅ (_ : i ≤ n✝), (f i)ᶜ = ⨅ (_ : i < Nat.succ n✝), (f i)ᶜ\n[PROOFSTEP]\nrw [Nat.lt_succ_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : ℕ → Set α\nH : ∀ (x : α), ∃ n, x ∈ s n\ninst✝ : (x : α) → (n : ℕ) → Decidable (x ∈ s n)\nn : ℕ\n⊢ (fun x => Nat.find (_ : ∃ n, x ∈ s n)) ⁻¹' {n} = disjointed s n\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ns : ℕ → Set α\nH : ∀ (x : α), ∃ n, x ∈ s n\ninst✝ : (x : α) → (n : ℕ) → Decidable (x ∈ s n)\nn : ℕ\nx : α\n⊢ x ∈ (fun x => Nat.find (_ : ∃ n, x ∈ s n)) ⁻¹' {n} ↔ x ∈ disjointed s n\n[PROOFSTEP]\nsimp [Nat.find_eq_iff, disjointed_eq_inter_compl]\n", "meta": {"mathlib_filename": "Mathlib.Order.Disjointed", "llama_tokens": 5447, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6113819732941511, "lm_q2_score": 0.600188359260205, "lm_q1q2_score": 0.366944343432683}}
{"text": "[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\n⊢ ↑↑μ (frontier s) = 0\n[PROOFSTEP]\ncases' ne_or_eq (affineSpan ℝ s) ⊤ with hspan hspan\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nhspan : affineSpan ℝ s ≠ ⊤\n⊢ ↑↑μ (frontier s) = 0\n[PROOFSTEP]\nrefine' measure_mono_null _ (addHaar_affineSubspace _ _ hspan)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nhspan : affineSpan ℝ s ≠ ⊤\n⊢ frontier s ⊆ ↑(affineSpan ℝ s)\n[PROOFSTEP]\nexact\n  frontier_subset_closure.trans (closure_minimal (subset_affineSpan _ _) (affineSpan ℝ s).closed_of_finiteDimensional)\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nhspan : affineSpan ℝ s = ⊤\n⊢ ↑↑μ (frontier s) = 0\n[PROOFSTEP]\nrw [← hs.interior_nonempty_iff_affineSpan_eq_top] at hspan \n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nhspan : Set.Nonempty (interior s)\n⊢ ↑↑μ (frontier s) = 0\n[PROOFSTEP]\nrcases hspan with\n  ⟨x, hx⟩\n    /- Without loss of generality, `s` is bounded. Indeed, `∂s ⊆ ⋃ n, ∂(s ∩ ball x (n + 1))`, hence it\n        suffices to prove that `∀ n, μ (s ∩ ball x (n + 1)) = 0`; the latter set is bounded.\n        -/\n[GOAL]\ncase inr.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\n⊢ ↑↑μ (frontier s) = 0\n[PROOFSTEP]\nsuffices H : ∀ t : Set E, Convex ℝ t → x ∈ interior t → Bounded t → μ (frontier t) = 0\n[GOAL]\ncase inr.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\n⊢ ↑↑μ (frontier s) = 0\n[PROOFSTEP]\nlet B : ℕ → Set E := fun n => ball x (n + 1)\n[GOAL]\ncase inr.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\n⊢ ↑↑μ (frontier s) = 0\n[PROOFSTEP]\nhave : μ (⋃ n : ℕ, frontier (s ∩ B n)) = 0 :=\n  by\n  refine' measure_iUnion_null fun n => H _ (hs.inter (convex_ball _ _)) _ (bounded_ball.mono (inter_subset_right _ _))\n  rw [interior_inter, isOpen_ball.interior_eq]\n  exact ⟨hx, mem_ball_self (add_pos_of_nonneg_of_pos n.cast_nonneg zero_lt_one)⟩\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\n⊢ ↑↑μ (⋃ (n : ℕ), frontier (s ∩ B n)) = 0\n[PROOFSTEP]\nrefine' measure_iUnion_null fun n => H _ (hs.inter (convex_ball _ _)) _ (bounded_ball.mono (inter_subset_right _ _))\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\nn : ℕ\n⊢ x ∈ interior (s ∩ B n)\n[PROOFSTEP]\nrw [interior_inter, isOpen_ball.interior_eq]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\nn : ℕ\n⊢ x ∈ interior s ∩ ball x (↑n + 1)\n[PROOFSTEP]\nexact ⟨hx, mem_ball_self (add_pos_of_nonneg_of_pos n.cast_nonneg zero_lt_one)⟩\n[GOAL]\ncase inr.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\nthis : ↑↑μ (⋃ (n : ℕ), frontier (s ∩ B n)) = 0\n⊢ ↑↑μ (frontier s) = 0\n[PROOFSTEP]\nrefine' measure_mono_null (fun y hy => _) this\n[GOAL]\ncase inr.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\nthis : ↑↑μ (⋃ (n : ℕ), frontier (s ∩ B n)) = 0\ny : E\nhy : y ∈ frontier s\n⊢ y ∈ ⋃ (n : ℕ), frontier (s ∩ B n)\n[PROOFSTEP]\nclear this\n[GOAL]\ncase inr.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\ny : E\nhy : y ∈ frontier s\n⊢ y ∈ ⋃ (n : ℕ), frontier (s ∩ B n)\n[PROOFSTEP]\nset N : ℕ := ⌊dist y x⌋₊\n[GOAL]\ncase inr.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\ny : E\nhy : y ∈ frontier s\nN : ℕ := ⌊dist y x⌋₊\n⊢ y ∈ ⋃ (n : ℕ), frontier (s ∩ B n)\n[PROOFSTEP]\nrefine' mem_iUnion.2 ⟨N, _⟩\n[GOAL]\ncase inr.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\ny : E\nhy : y ∈ frontier s\nN : ℕ := ⌊dist y x⌋₊\n⊢ y ∈ frontier (s ∩ B N)\n[PROOFSTEP]\nhave hN : y ∈ B N := by simp [Nat.lt_floor_add_one]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\ny : E\nhy : y ∈ frontier s\nN : ℕ := ⌊dist y x⌋₊\n⊢ y ∈ B N\n[PROOFSTEP]\nsimp [Nat.lt_floor_add_one]\n[GOAL]\ncase inr.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\ny : E\nhy : y ∈ frontier s\nN : ℕ := ⌊dist y x⌋₊\nhN : y ∈ B N\n⊢ y ∈ frontier (s ∩ B N)\n[PROOFSTEP]\nsuffices : y ∈ frontier (s ∩ B N) ∩ B N\n[GOAL]\ncase inr.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\ny : E\nhy : y ∈ frontier s\nN : ℕ := ⌊dist y x⌋₊\nhN : y ∈ B N\nthis : y ∈ frontier (s ∩ B N) ∩ B N\n⊢ y ∈ frontier (s ∩ B N)\ncase this\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\ny : E\nhy : y ∈ frontier s\nN : ℕ := ⌊dist y x⌋₊\nhN : y ∈ B N\n⊢ y ∈ frontier (s ∩ B N) ∩ B N\n[PROOFSTEP]\nexact this.1\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\ny : E\nhy : y ∈ frontier s\nN : ℕ := ⌊dist y x⌋₊\nhN : y ∈ B N\n⊢ y ∈ frontier (s ∩ B N) ∩ B N\n[PROOFSTEP]\nrw [frontier_inter_open_inter isOpen_ball]\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\nH : ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\nB : ℕ → Set E := fun n => ball x (↑n + 1)\ny : E\nhy : y ∈ frontier s\nN : ℕ := ⌊dist y x⌋₊\nhN : y ∈ B N\n⊢ y ∈ frontier s ∩ ball x (↑N + 1)\n[PROOFSTEP]\nexact ⟨hy, hN⟩\n[GOAL]\ncase H\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nhs : Convex ℝ s\nx : E\nhx : x ∈ interior s\n⊢ ∀ (t : Set E), Convex ℝ t → x ∈ interior t → Metric.Bounded t → ↑↑μ (frontier t) = 0\n[PROOFSTEP]\nintro s hs hx hb\n[GOAL]\ncase H\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : Metric.Bounded s\n⊢ ↑↑μ (frontier s) = 0\n[PROOFSTEP]\nreplace hb : μ (interior s) ≠ ∞\n[GOAL]\ncase hb\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : Metric.Bounded s\n⊢ ↑↑μ (interior s) ≠ ⊤\ncase H\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : ↑↑μ (interior s) ≠ ⊤\n⊢ ↑↑μ (frontier s) = 0\n[PROOFSTEP]\nexact (hb.mono interior_subset).measure_lt_top.ne\n[GOAL]\ncase H\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : ↑↑μ (interior s) ≠ ⊤\n⊢ ↑↑μ (frontier s) = 0\n[PROOFSTEP]\nsuffices μ (closure s) ≤ μ (interior s) by\n  rwa [frontier, measure_diff interior_subset_closure isOpen_interior.measurableSet hb, tsub_eq_zero_iff_le]\n    /- Due to `Convex.closure_subset_image_homothety_interior_of_one_lt`, for any `r > 1` we have\n        `closure s ⊆ homothety x r '' interior s`, hence `μ (closure s) ≤ r ^ d * μ (interior s)`,\n        where `d = finrank ℝ E`. -/\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : ↑↑μ (interior s) ≠ ⊤\nthis : ↑↑μ (closure s) ≤ ↑↑μ (interior s)\n⊢ ↑↑μ (frontier s) = 0\n[PROOFSTEP]\nrwa [frontier, measure_diff interior_subset_closure isOpen_interior.measurableSet hb, tsub_eq_zero_iff_le]\n  /- Due to `Convex.closure_subset_image_homothety_interior_of_one_lt`, for any `r > 1` we have\n      `closure s ⊆ homothety x r '' interior s`, hence `μ (closure s) ≤ r ^ d * μ (interior s)`,\n      where `d = finrank ℝ E`. -/\n[GOAL]\ncase H\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : ↑↑μ (interior s) ≠ ⊤\n⊢ ↑↑μ (closure s) ≤ ↑↑μ (interior s)\n[PROOFSTEP]\nset d : ℕ := FiniteDimensional.finrank ℝ E\n[GOAL]\ncase H\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : ↑↑μ (interior s) ≠ ⊤\nd : ℕ := finrank ℝ E\n⊢ ↑↑μ (closure s) ≤ ↑↑μ (interior s)\n[PROOFSTEP]\nhave : ∀ r : ℝ≥0, 1 < r → μ (closure s) ≤ ↑(r ^ d) * μ (interior s) :=\n  by\n  intro r hr\n  refine' (measure_mono <| hs.closure_subset_image_homothety_interior_of_one_lt hx r hr).trans_eq _\n  rw [addHaar_image_homothety, ← NNReal.coe_pow, NNReal.abs_eq, ENNReal.ofReal_coe_nnreal]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : ↑↑μ (interior s) ≠ ⊤\nd : ℕ := finrank ℝ E\n⊢ ∀ (r : ℝ≥0), 1 < r → ↑↑μ (closure s) ≤ ↑(r ^ d) * ↑↑μ (interior s)\n[PROOFSTEP]\nintro r hr\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : ↑↑μ (interior s) ≠ ⊤\nd : ℕ := finrank ℝ E\nr : ℝ≥0\nhr : 1 < r\n⊢ ↑↑μ (closure s) ≤ ↑(r ^ d) * ↑↑μ (interior s)\n[PROOFSTEP]\nrefine' (measure_mono <| hs.closure_subset_image_homothety_interior_of_one_lt hx r hr).trans_eq _\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : ↑↑μ (interior s) ≠ ⊤\nd : ℕ := finrank ℝ E\nr : ℝ≥0\nhr : 1 < r\n⊢ ↑↑μ (↑(AffineMap.homothety x ↑r) '' interior s) = ↑(r ^ d) * ↑↑μ (interior s)\n[PROOFSTEP]\nrw [addHaar_image_homothety, ← NNReal.coe_pow, NNReal.abs_eq, ENNReal.ofReal_coe_nnreal]\n[GOAL]\ncase H\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : ↑↑μ (interior s) ≠ ⊤\nd : ℕ := finrank ℝ E\nthis : ∀ (r : ℝ≥0), 1 < r → ↑↑μ (closure s) ≤ ↑(r ^ d) * ↑↑μ (interior s)\n⊢ ↑↑μ (closure s) ≤ ↑↑μ (interior s)\n[PROOFSTEP]\nhave : ∀ᶠ (r : ℝ≥0) in 𝓝[>] 1, μ (closure s) ≤ ↑(r ^ d) * μ (interior s) := mem_of_superset self_mem_nhdsWithin this\n[GOAL]\ncase H\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : ↑↑μ (interior s) ≠ ⊤\nd : ℕ := finrank ℝ E\nthis✝ : ∀ (r : ℝ≥0), 1 < r → ↑↑μ (closure s) ≤ ↑(r ^ d) * ↑↑μ (interior s)\nthis : ∀ᶠ (r : ℝ≥0) in 𝓝[Ioi 1] 1, ↑↑μ (closure s) ≤ ↑(r ^ d) * ↑↑μ (interior s)\n⊢ ↑↑μ (closure s) ≤ ↑↑μ (interior s)\n[PROOFSTEP]\nrefine' ge_of_tendsto _ this\n[GOAL]\ncase H\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : ↑↑μ (interior s) ≠ ⊤\nd : ℕ := finrank ℝ E\nthis✝ : ∀ (r : ℝ≥0), 1 < r → ↑↑μ (closure s) ≤ ↑(r ^ d) * ↑↑μ (interior s)\nthis : ∀ᶠ (r : ℝ≥0) in 𝓝[Ioi 1] 1, ↑↑μ (closure s) ≤ ↑(r ^ d) * ↑↑μ (interior s)\n⊢ Tendsto (fun c => ↑(c ^ d) * ↑↑μ (interior s)) (𝓝[Ioi 1] 1) (𝓝 (↑↑μ (interior s)))\n[PROOFSTEP]\nrefine'\n  (((ENNReal.continuous_mul_const hb).comp (ENNReal.continuous_coe.comp (continuous_pow d))).tendsto' _ _ _).mono_left\n    nhdsWithin_le_nhds\n[GOAL]\ncase H\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns✝ : Set E\nhs✝ : Convex ℝ s✝\nx : E\nhx✝ : x ∈ interior s✝\ns : Set E\nhs : Convex ℝ s\nhx : x ∈ interior s\nhb : ↑↑μ (interior s) ≠ ⊤\nd : ℕ := finrank ℝ E\nthis✝ : ∀ (r : ℝ≥0), 1 < r → ↑↑μ (closure s) ≤ ↑(r ^ d) * ↑↑μ (interior s)\nthis : ∀ᶠ (r : ℝ≥0) in 𝓝[Ioi 1] 1, ↑↑μ (closure s) ≤ ↑(r ^ d) * ↑↑μ (interior s)\n⊢ ((fun x => x * ↑↑μ (interior s)) ∘ ENNReal.some ∘ fun a => a ^ d) 1 = ↑↑μ (interior s)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Measure", "llama_tokens": 9601, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646010190477, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.3668477899609583}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ns : Set E\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : Module ℝ E\ninst✝³ : SMulCommClass ℝ 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : LocallyConvexSpace ℝ E\ninst✝ : ContinuousSMul 𝕜 E\n⊢ Filter.HasBasis (𝓝 0) (fun s => s ∈ 𝓝 0 ∧ Balanced 𝕜 s ∧ Convex ℝ s) id\n[PROOFSTEP]\nrefine'\n  (LocallyConvexSpace.convex_basis_zero ℝ E).to_hasBasis (fun s hs => _) fun s hs => ⟨s, ⟨hs.1, hs.2.2⟩, rfl.subset⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ns✝ : Set E\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : Module ℝ E\ninst✝³ : SMulCommClass ℝ 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : LocallyConvexSpace ℝ E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0 ∧ Convex ℝ s\n⊢ ∃ i', (i' ∈ 𝓝 0 ∧ Balanced 𝕜 i' ∧ Convex ℝ i') ∧ id i' ⊆ id s\n[PROOFSTEP]\nrefine' ⟨convexHull ℝ (balancedCore 𝕜 s), _, convexHull_min (balancedCore_subset s) hs.2⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ns✝ : Set E\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : Module ℝ E\ninst✝³ : SMulCommClass ℝ 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : LocallyConvexSpace ℝ E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0 ∧ Convex ℝ s\n⊢ ↑(convexHull ℝ) (balancedCore 𝕜 s) ∈ 𝓝 0 ∧\n    Balanced 𝕜 (↑(convexHull ℝ) (balancedCore 𝕜 s)) ∧ Convex ℝ (↑(convexHull ℝ) (balancedCore 𝕜 s))\n[PROOFSTEP]\nrefine' ⟨Filter.mem_of_superset (balancedCore_mem_nhds_zero hs.1) (subset_convexHull ℝ _), _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ns✝ : Set E\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : Module ℝ E\ninst✝³ : SMulCommClass ℝ 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : LocallyConvexSpace ℝ E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0 ∧ Convex ℝ s\n⊢ Balanced 𝕜 (↑(convexHull ℝ) (balancedCore 𝕜 s)) ∧ Convex ℝ (↑(convexHull ℝ) (balancedCore 𝕜 s))\n[PROOFSTEP]\nrefine' ⟨balanced_convexHull_of_balanced (balancedCore_balanced s), _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ns✝ : Set E\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : Module ℝ E\ninst✝³ : SMulCommClass ℝ 𝕜 E\ninst✝² : TopologicalSpace E\ninst✝¹ : LocallyConvexSpace ℝ E\ninst✝ : ContinuousSMul 𝕜 E\ns : Set E\nhs : s ∈ 𝓝 0 ∧ Convex ℝ s\n⊢ Convex ℝ (↑(convexHull ℝ) (balancedCore 𝕜 s))\n[PROOFSTEP]\nexact convex_convexHull ℝ (balancedCore 𝕜 s)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ns : Set E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : TopologicalSpace E\ninst✝³ : LocallyConvexSpace ℝ E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : TopologicalAddGroup E\n⊢ Filter.HasBasis (𝓝 0) (fun s => 0 ∈ s ∧ IsOpen s ∧ Balanced 𝕜 s ∧ Convex ℝ s) id\n[PROOFSTEP]\nrefine' (nhds_basis_abs_convex 𝕜 E).to_hasBasis _ _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ns : Set E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : TopologicalSpace E\ninst✝³ : LocallyConvexSpace ℝ E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : TopologicalAddGroup E\n⊢ ∀ (i : Set E),\n    i ∈ 𝓝 0 ∧ Balanced 𝕜 i ∧ Convex ℝ i → ∃ i', (0 ∈ i' ∧ IsOpen i' ∧ Balanced 𝕜 i' ∧ Convex ℝ i') ∧ id i' ⊆ id i\n[PROOFSTEP]\nrintro s ⟨hs_nhds, hs_balanced, hs_convex⟩\n[GOAL]\ncase refine'_1.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ns✝ : Set E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : TopologicalSpace E\ninst✝³ : LocallyConvexSpace ℝ E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : TopologicalAddGroup E\ns : Set E\nhs_nhds : s ∈ 𝓝 0\nhs_balanced : Balanced 𝕜 s\nhs_convex : Convex ℝ s\n⊢ ∃ i', (0 ∈ i' ∧ IsOpen i' ∧ Balanced 𝕜 i' ∧ Convex ℝ i') ∧ id i' ⊆ id s\n[PROOFSTEP]\nrefine' ⟨interior s, _, interior_subset⟩\n[GOAL]\ncase refine'_1.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ns✝ : Set E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : TopologicalSpace E\ninst✝³ : LocallyConvexSpace ℝ E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : TopologicalAddGroup E\ns : Set E\nhs_nhds : s ∈ 𝓝 0\nhs_balanced : Balanced 𝕜 s\nhs_convex : Convex ℝ s\n⊢ 0 ∈ interior s ∧ IsOpen (interior s) ∧ Balanced 𝕜 (interior s) ∧ Convex ℝ (interior s)\n[PROOFSTEP]\nexact\n  ⟨mem_interior_iff_mem_nhds.mpr hs_nhds, isOpen_interior, hs_balanced.interior (mem_interior_iff_mem_nhds.mpr hs_nhds),\n    hs_convex.interior⟩\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ns : Set E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : TopologicalSpace E\ninst✝³ : LocallyConvexSpace ℝ E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : TopologicalAddGroup E\n⊢ ∀ (i' : Set E),\n    0 ∈ i' ∧ IsOpen i' ∧ Balanced 𝕜 i' ∧ Convex ℝ i' → ∃ i, (i ∈ 𝓝 0 ∧ Balanced 𝕜 i ∧ Convex ℝ i) ∧ id i ⊆ id i'\n[PROOFSTEP]\nrintro s ⟨hs_zero, hs_open, hs_balanced, hs_convex⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ns✝ : Set E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : AddCommGroup E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : TopologicalSpace E\ninst✝³ : LocallyConvexSpace ℝ E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : TopologicalAddGroup E\ns : Set E\nhs_zero : 0 ∈ s\nhs_open : IsOpen s\nhs_balanced : Balanced 𝕜 s\nhs_convex : Convex ℝ s\n⊢ ∃ i, (i ∈ 𝓝 0 ∧ Balanced 𝕜 i ∧ Convex ℝ i) ∧ id i ⊆ id s\n[PROOFSTEP]\nexact ⟨s, ⟨hs_open.mem_nhds hs_zero, hs_balanced, hs_convex⟩, rfl.subset⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : AddCommMonoid E\ninst✝³ : Zero E\ninst✝² : SeminormedRing 𝕜\ninst✝¹ : SMul 𝕜 E\ninst✝ : SMul ℝ E\n⊢ Nonempty (AbsConvexOpenSets 𝕜 E)\n[PROOFSTEP]\nrw [← exists_true_iff_nonempty]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : AddCommMonoid E\ninst✝³ : Zero E\ninst✝² : SeminormedRing 𝕜\ninst✝¹ : SMul 𝕜 E\ninst✝ : SMul ℝ E\n⊢ ∃ x, True\n[PROOFSTEP]\ndsimp only [AbsConvexOpenSets]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : AddCommMonoid E\ninst✝³ : Zero E\ninst✝² : SeminormedRing 𝕜\ninst✝¹ : SMul 𝕜 E\ninst✝ : SMul ℝ E\n⊢ ∃ x, True\n[PROOFSTEP]\nrw [Subtype.exists]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : AddCommMonoid E\ninst✝³ : Zero E\ninst✝² : SeminormedRing 𝕜\ninst✝¹ : SMul 𝕜 E\ninst✝ : SMul ℝ E\n⊢ ∃ a b, True\n[PROOFSTEP]\nexact ⟨Set.univ, ⟨mem_univ 0, isOpen_univ, balanced_univ, convex_univ⟩, trivial⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : TopologicalSpace E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : ContinuousSMul ℝ E\ns : AbsConvexOpenSets 𝕜 E\n⊢ Seminorm.ball (gaugeSeminormFamily 𝕜 E s) 0 1 = ↑s\n[PROOFSTEP]\ndsimp only [gaugeSeminormFamily]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : TopologicalSpace E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : ContinuousSMul ℝ E\ns : AbsConvexOpenSets 𝕜 E\n⊢ Seminorm.ball (gaugeSeminorm (_ : Balanced 𝕜 ↑s) (_ : Convex ℝ ↑s) (_ : Absorbent ℝ ↑s)) 0 1 = ↑s\n[PROOFSTEP]\nrw [Seminorm.ball_zero_eq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : TopologicalSpace E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : ContinuousSMul ℝ E\ns : AbsConvexOpenSets 𝕜 E\n⊢ {y | ↑(gaugeSeminorm (_ : Balanced 𝕜 ↑s) (_ : Convex ℝ ↑s) (_ : Absorbent ℝ ↑s)) y < 1} = ↑s\n[PROOFSTEP]\nsimp_rw [gaugeSeminorm_toFun]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : TopologicalSpace E\ninst✝³ : Module 𝕜 E\ninst✝² : Module ℝ E\ninst✝¹ : IsScalarTower ℝ 𝕜 E\ninst✝ : ContinuousSMul ℝ E\ns : AbsConvexOpenSets 𝕜 E\n⊢ {y | gauge (↑s) y < 1} = ↑s\n[PROOFSTEP]\nexact gauge_lt_one_eq_self_of_open s.coe_convex s.coe_zero_mem s.coe_isOpen\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\n⊢ WithSeminorms (gaugeSeminormFamily 𝕜 E)\n[PROOFSTEP]\nrefine' SeminormFamily.withSeminorms_of_hasBasis _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\n⊢ Filter.HasBasis (𝓝 0) (fun s => s ∈ SeminormFamily.basisSets (gaugeSeminormFamily 𝕜 E)) id\n[PROOFSTEP]\nrefine' (nhds_basis_abs_convex_open 𝕜 E).to_hasBasis (fun s hs => _) fun s hs => _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\ns : Set E\nhs : 0 ∈ s ∧ IsOpen s ∧ Balanced 𝕜 s ∧ Convex ℝ s\n⊢ ∃ i', i' ∈ SeminormFamily.basisSets (gaugeSeminormFamily 𝕜 E) ∧ id i' ⊆ id s\n[PROOFSTEP]\nrefine' ⟨s, ⟨_, rfl.subset⟩⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\ns : Set E\nhs : 0 ∈ s ∧ IsOpen s ∧ Balanced 𝕜 s ∧ Convex ℝ s\n⊢ s ∈ SeminormFamily.basisSets (gaugeSeminormFamily 𝕜 E)\n[PROOFSTEP]\nconvert (gaugeSeminormFamily _ _).basisSets_singleton_mem ⟨s, hs⟩ one_pos\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\ns : Set E\nhs : 0 ∈ s ∧ IsOpen s ∧ Balanced 𝕜 s ∧ Convex ℝ s\n⊢ s = Seminorm.ball (gaugeSeminormFamily 𝕜 E { val := s, property := hs }) 0 1\n[PROOFSTEP]\nrw [gaugeSeminormFamily_ball, Subtype.coe_mk]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\ns : Set E\nhs : s ∈ SeminormFamily.basisSets (gaugeSeminormFamily 𝕜 E)\n⊢ ∃ i, (0 ∈ i ∧ IsOpen i ∧ Balanced 𝕜 i ∧ Convex ℝ i) ∧ id i ⊆ id s\n[PROOFSTEP]\nrefine' ⟨s, ⟨_, rfl.subset⟩⟩\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\ns : Set E\nhs : s ∈ SeminormFamily.basisSets (gaugeSeminormFamily 𝕜 E)\n⊢ 0 ∈ s ∧ IsOpen s ∧ Balanced 𝕜 s ∧ Convex ℝ s\n[PROOFSTEP]\nrw [SeminormFamily.basisSets_iff] at hs \n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\ns : Set E\nhs : ∃ i r x, s = Seminorm.ball (Finset.sup i (gaugeSeminormFamily 𝕜 E)) 0 r\n⊢ 0 ∈ s ∧ IsOpen s ∧ Balanced 𝕜 s ∧ Convex ℝ s\n[PROOFSTEP]\nrcases hs with ⟨t, r, hr, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\nt : Finset (AbsConvexOpenSets 𝕜 E)\nr : ℝ\nhr : 0 < r\n⊢ 0 ∈ Seminorm.ball (Finset.sup t (gaugeSeminormFamily 𝕜 E)) 0 r ∧\n    IsOpen (Seminorm.ball (Finset.sup t (gaugeSeminormFamily 𝕜 E)) 0 r) ∧\n      Balanced 𝕜 (Seminorm.ball (Finset.sup t (gaugeSeminormFamily 𝕜 E)) 0 r) ∧\n        Convex ℝ (Seminorm.ball (Finset.sup t (gaugeSeminormFamily 𝕜 E)) 0 r)\n[PROOFSTEP]\nrw [Seminorm.ball_finset_sup_eq_iInter _ _ _ hr]\n  -- We have to show that the intersection contains zero, is open, balanced, and convex\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\nt : Finset (AbsConvexOpenSets 𝕜 E)\nr : ℝ\nhr : 0 < r\n⊢ 0 ∈ ⋂ (i : AbsConvexOpenSets 𝕜 E) (_ : i ∈ t), Seminorm.ball (gaugeSeminormFamily 𝕜 E i) 0 r ∧\n    IsOpen (⋂ (i : AbsConvexOpenSets 𝕜 E) (_ : i ∈ t), Seminorm.ball (gaugeSeminormFamily 𝕜 E i) 0 r) ∧\n      Balanced 𝕜 (⋂ (i : AbsConvexOpenSets 𝕜 E) (_ : i ∈ t), Seminorm.ball (gaugeSeminormFamily 𝕜 E i) 0 r) ∧\n        Convex ℝ (⋂ (i : AbsConvexOpenSets 𝕜 E) (_ : i ∈ t), Seminorm.ball (gaugeSeminormFamily 𝕜 E i) 0 r)\n[PROOFSTEP]\nrefine'\n  ⟨mem_iInter₂.mpr fun _ _ => by simp [Seminorm.mem_ball_zero, hr], isOpen_biInter (t.finite_toSet) fun S _ => _,\n    balanced_iInter₂ fun _ _ => Seminorm.balanced_ball_zero _ _, convex_iInter₂ fun _ _ => Seminorm.convex_ball _ _ _⟩\n    -- The only nontrivial part is to show that the ball is open\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\nt : Finset (AbsConvexOpenSets 𝕜 E)\nr : ℝ\nhr : 0 < r\nx✝¹ : AbsConvexOpenSets 𝕜 E\nx✝ : x✝¹ ∈ t\n⊢ 0 ∈ Seminorm.ball (gaugeSeminormFamily 𝕜 E x✝¹) 0 r\n[PROOFSTEP]\nsimp [Seminorm.mem_ball_zero, hr]\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\nt : Finset (AbsConvexOpenSets 𝕜 E)\nr : ℝ\nhr : 0 < r\nS : AbsConvexOpenSets 𝕜 E\nx✝ : S ∈ fun i => i ∈ t.val\n⊢ IsOpen (Seminorm.ball (gaugeSeminormFamily 𝕜 E S) 0 r)\n[PROOFSTEP]\nhave hr' : r = ‖(r : 𝕜)‖ * 1 := by simp [abs_of_pos hr]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\nt : Finset (AbsConvexOpenSets 𝕜 E)\nr : ℝ\nhr : 0 < r\nS : AbsConvexOpenSets 𝕜 E\nx✝ : S ∈ fun i => i ∈ t.val\n⊢ r = ‖↑r‖ * 1\n[PROOFSTEP]\nsimp [abs_of_pos hr]\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\nt : Finset (AbsConvexOpenSets 𝕜 E)\nr : ℝ\nhr : 0 < r\nS : AbsConvexOpenSets 𝕜 E\nx✝ : S ∈ fun i => i ∈ t.val\nhr' : r = ‖↑r‖ * 1\n⊢ IsOpen (Seminorm.ball (gaugeSeminormFamily 𝕜 E S) 0 r)\n[PROOFSTEP]\nhave hr'' : (r : 𝕜) ≠ 0 := by simp [hr.ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\nt : Finset (AbsConvexOpenSets 𝕜 E)\nr : ℝ\nhr : 0 < r\nS : AbsConvexOpenSets 𝕜 E\nx✝ : S ∈ fun i => i ∈ t.val\nhr' : r = ‖↑r‖ * 1\n⊢ ↑r ≠ 0\n[PROOFSTEP]\nsimp [hr.ne']\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\nt : Finset (AbsConvexOpenSets 𝕜 E)\nr : ℝ\nhr : 0 < r\nS : AbsConvexOpenSets 𝕜 E\nx✝ : S ∈ fun i => i ∈ t.val\nhr' : r = ‖↑r‖ * 1\nhr'' : ↑r ≠ 0\n⊢ IsOpen (Seminorm.ball (gaugeSeminormFamily 𝕜 E S) 0 r)\n[PROOFSTEP]\nrw [hr', ← Seminorm.smul_ball_zero hr'', gaugeSeminormFamily_ball]\n[GOAL]\ncase refine'_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : TopologicalSpace E\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module ℝ E\ninst✝⁵ : IsScalarTower ℝ 𝕜 E\ninst✝⁴ : ContinuousSMul ℝ E\ninst✝³ : TopologicalAddGroup E\ninst✝² : ContinuousSMul 𝕜 E\ninst✝¹ : SMulCommClass ℝ 𝕜 E\ninst✝ : LocallyConvexSpace ℝ E\nt : Finset (AbsConvexOpenSets 𝕜 E)\nr : ℝ\nhr : 0 < r\nS : AbsConvexOpenSets 𝕜 E\nx✝ : S ∈ fun i => i ∈ t.val\nhr' : r = ‖↑r‖ * 1\nhr'' : ↑r ≠ 0\n⊢ IsOpen (↑r • ↑S)\n[PROOFSTEP]\nexact S.coe_isOpen.smul₀ hr''\n", "meta": {"mathlib_filename": "Mathlib.Analysis.LocallyConvex.AbsConvex", "llama_tokens": 9904, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7279754489059774, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.3668313206973994}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP : Finpartition a\nb : α\nhb : b ∈ P.parts\n⊢ b ≠ ⊥\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP : Finpartition a\nb : α\nhb : b ∈ P.parts\nh : b = ⊥\n⊢ False\n[PROOFSTEP]\nrefine' P.not_bot_mem (_)\n[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP : Finpartition a\nb : α\nhb : b ∈ P.parts\nh : b = ⊥\n⊢ ⊥ ∈ P.parts\n[PROOFSTEP]\nrw [h] at hb \n[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP : Finpartition a\nb : α\nhb : ⊥ ∈ P.parts\nh : b = ⊥\n⊢ ⊥ ∈ P.parts\n[PROOFSTEP]\nexact hb\n[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP : Finpartition a\n⊢ P.parts = ∅ ↔ a = ⊥\n[PROOFSTEP]\nsimp_rw [← P.supParts]\n[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP : Finpartition a\n⊢ P.parts = ∅ ↔ sup P.parts id = ⊥\n[PROOFSTEP]\nrefine' ⟨fun h ↦ _, fun h ↦ eq_empty_iff_forall_not_mem.2 fun b hb ↦ P.not_bot_mem _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP : Finpartition a\nh : P.parts = ∅\n⊢ sup P.parts id = ⊥\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP : Finpartition a\nh : P.parts = ∅\n⊢ sup ∅ id = ⊥\n[PROOFSTEP]\nexact Finset.sup_empty\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP : Finpartition a\nh : sup P.parts id = ⊥\nb : α\nhb : b ∈ P.parts\n⊢ ⊥ ∈ P.parts\n[PROOFSTEP]\nrwa [← le_bot_iff.1 ((le_sup hb).trans h.le)]\n[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP : Finpartition a\n⊢ Finset.Nonempty P.parts ↔ a ≠ ⊥\n[PROOFSTEP]\nrw [nonempty_iff_ne_empty, not_iff_not, parts_eq_empty_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : Inhabited (Finpartition ⊥) := inferInstance\nP : Finpartition ⊥\n⊢ P = default\n[PROOFSTEP]\next a\n[GOAL]\ncase parts.a\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na✝ : α\nP✝ : Finpartition a✝\nsrc✝ : Inhabited (Finpartition ⊥) := inferInstance\nP : Finpartition ⊥\na : α\n⊢ a ∈ P.parts ↔ a ∈ default.parts\n[PROOFSTEP]\nexact iff_of_false (fun h ↦ P.ne_bot h <| le_bot_iff.1 <| P.le h) (not_mem_empty a)\n[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nha : IsAtom a\nP : Finpartition a\n⊢ P = default\n[PROOFSTEP]\nhave h : ∀ b ∈ P.parts, b = a := fun _ hb ↦ (ha.le_iff.mp <| P.le hb).resolve_left (P.ne_bot hb)\n[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nha : IsAtom a\nP : Finpartition a\nh : ∀ (b : α), b ∈ P.parts → b = a\n⊢ P = default\n[PROOFSTEP]\next b\n[GOAL]\ncase parts.a\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nha : IsAtom a\nP : Finpartition a\nh : ∀ (b : α), b ∈ P.parts → b = a\nb : α\n⊢ b ∈ P.parts ↔ b ∈ default.parts\n[PROOFSTEP]\nrefine' Iff.trans ⟨h b, _⟩ mem_singleton.symm\n[GOAL]\ncase parts.a\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nha : IsAtom a\nP : Finpartition a\nh : ∀ (b : α), b ∈ P.parts → b = a\nb : α\n⊢ b = a → b ∈ P.parts\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase parts.a\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\nb : α\nP✝ : Finpartition b\nha : IsAtom b\nP : Finpartition b\nh : ∀ (b_1 : α), b_1 ∈ P.parts → b_1 = b\n⊢ b ∈ P.parts\n[PROOFSTEP]\nobtain ⟨c, hc⟩ := P.parts_nonempty ha.1\n[GOAL]\ncase parts.a.intro\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\nb : α\nP✝ : Finpartition b\nha : IsAtom b\nP : Finpartition b\nh : ∀ (b_1 : α), b_1 ∈ P.parts → b_1 = b\nc : α\nhc : c ∈ P.parts\n⊢ b ∈ P.parts\n[PROOFSTEP]\nsimp_rw [← h c hc]\n[GOAL]\ncase parts.a.intro\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\nb : α\nP✝ : Finpartition b\nha : IsAtom b\nP : Finpartition b\nh : ∀ (b_1 : α), b_1 ∈ P.parts → b_1 = b\nc : α\nhc : c ∈ P.parts\n⊢ c ∈ P.parts\n[PROOFSTEP]\nexact hc\n[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q R : Finpartition a\nhPQ : P ≤ Q\nhQR : Q ≤ R\nb : α\nhb : b ∈ P.parts\n⊢ ∃ c, c ∈ R.parts ∧ b ≤ c\n[PROOFSTEP]\nobtain ⟨c, hc, hbc⟩ := hPQ hb\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q R : Finpartition a\nhPQ : P ≤ Q\nhQR : Q ≤ R\nb : α\nhb : b ∈ P.parts\nc : α\nhc : c ∈ Q.parts\nhbc : b ≤ c\n⊢ ∃ c, c ∈ R.parts ∧ b ≤ c\n[PROOFSTEP]\nobtain ⟨d, hd, hcd⟩ := hQR hc\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q R : Finpartition a\nhPQ : P ≤ Q\nhQR : Q ≤ R\nb : α\nhb : b ∈ P.parts\nc : α\nhc : c ∈ Q.parts\nhbc : b ≤ c\nd : α\nhd : d ∈ R.parts\nhcd : c ≤ d\n⊢ ∃ c, c ∈ R.parts ∧ b ≤ c\n[PROOFSTEP]\nexact ⟨d, hd, hbc.trans hcd⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q : Finpartition a\nhPQ : P ≤ Q\nhQP : Q ≤ P\n⊢ P = Q\n[PROOFSTEP]\next b\n[GOAL]\ncase parts.a\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q : Finpartition a\nhPQ : P ≤ Q\nhQP : Q ≤ P\nb : α\n⊢ b ∈ P.parts ↔ b ∈ Q.parts\n[PROOFSTEP]\nrefine' ⟨fun hb ↦ _, fun hb ↦ _⟩\n[GOAL]\ncase parts.a.refine'_1\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q : Finpartition a\nhPQ : P ≤ Q\nhQP : Q ≤ P\nb : α\nhb : b ∈ P.parts\n⊢ b ∈ Q.parts\n[PROOFSTEP]\nobtain ⟨c, hc, hbc⟩ := hPQ hb\n[GOAL]\ncase parts.a.refine'_1.intro.intro\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q : Finpartition a\nhPQ : P ≤ Q\nhQP : Q ≤ P\nb : α\nhb : b ∈ P.parts\nc : α\nhc : c ∈ Q.parts\nhbc : b ≤ c\n⊢ b ∈ Q.parts\n[PROOFSTEP]\nobtain ⟨d, hd, hcd⟩ := hQP hc\n[GOAL]\ncase parts.a.refine'_1.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q : Finpartition a\nhPQ : P ≤ Q\nhQP : Q ≤ P\nb : α\nhb : b ∈ P.parts\nc : α\nhc : c ∈ Q.parts\nhbc : b ≤ c\nd : α\nhd : d ∈ P.parts\nhcd : c ≤ d\n⊢ b ∈ Q.parts\n[PROOFSTEP]\nrwa [hbc.antisymm]\n[GOAL]\ncase parts.a.refine'_1.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q : Finpartition a\nhPQ : P ≤ Q\nhQP : Q ≤ P\nb : α\nhb : b ∈ P.parts\nc : α\nhc : c ∈ Q.parts\nhbc : b ≤ c\nd : α\nhd : d ∈ P.parts\nhcd : c ≤ d\n⊢ c ≤ b\n[PROOFSTEP]\nrwa [P.disjoint.eq_of_le hb hd (P.ne_bot hb) (hbc.trans hcd)]\n[GOAL]\ncase parts.a.refine'_2\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q : Finpartition a\nhPQ : P ≤ Q\nhQP : Q ≤ P\nb : α\nhb : b ∈ Q.parts\n⊢ b ∈ P.parts\n[PROOFSTEP]\nobtain ⟨c, hc, hbc⟩ := hQP hb\n[GOAL]\ncase parts.a.refine'_2.intro.intro\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q : Finpartition a\nhPQ : P ≤ Q\nhQP : Q ≤ P\nb : α\nhb : b ∈ Q.parts\nc : α\nhc : c ∈ P.parts\nhbc : b ≤ c\n⊢ b ∈ P.parts\n[PROOFSTEP]\nobtain ⟨d, hd, hcd⟩ := hPQ hc\n[GOAL]\ncase parts.a.refine'_2.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q : Finpartition a\nhPQ : P ≤ Q\nhQP : Q ≤ P\nb : α\nhb : b ∈ Q.parts\nc : α\nhc : c ∈ P.parts\nhbc : b ≤ c\nd : α\nhd : d ∈ Q.parts\nhcd : c ≤ d\n⊢ b ∈ P.parts\n[PROOFSTEP]\nrwa [hbc.antisymm]\n[GOAL]\ncase parts.a.refine'_2.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : OrderBot α\na : α\nP✝ : Finpartition a\nsrc✝ : LE (Finpartition a) := inferInstance\nP Q : Finpartition a\nhPQ : P ≤ Q\nhQP : Q ≤ P\nb : α\nhb : b ∈ Q.parts\nc : α\nhc : c ∈ P.parts\nhbc : b ≤ c\nd : α\nhd : d ∈ Q.parts\nhcd : c ≤ d\n⊢ c ≤ b\n[PROOFSTEP]\nrwa [Q.disjoint.eq_of_le hb hd (Q.ne_bot hb) (hbc.trans hcd)]\n[GOAL]\nα : Type u_1\ninst✝² : Lattice α\ninst✝¹ : OrderBot α\na : α\nP✝ : Finpartition a\ninst✝ : Decidable (a = ⊥)\nP : Finpartition a\n⊢ P ≤ ⊤\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : Lattice α\ninst✝¹ : OrderBot α\na : α\nP✝ : Finpartition a\ninst✝ : Decidable (a = ⊥)\nP : Finpartition a\nh : a = ⊥\n⊢ P ≤ ⊤\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : Lattice α\ninst✝¹ : OrderBot α\na : α\nP✝ : Finpartition a\ninst✝ : Decidable (a = ⊥)\nP : Finpartition a\nh : a = ⊥\nx : α\nhx : x ∈ P.parts\n⊢ ∃ c, c ∈ ⊤.parts ∧ x ≤ c\n[PROOFSTEP]\nsimpa [h, P.ne_bot hx] using P.le hx\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : Lattice α\ninst✝¹ : OrderBot α\na : α\nP✝ : Finpartition a\ninst✝ : Decidable (a = ⊥)\nP : Finpartition a\nh : ¬a = ⊥\n⊢ P ≤ ⊤\n[PROOFSTEP]\nexact fun b hb ↦ ⟨a, mem_singleton_self _, P.le hb⟩\n[GOAL]\nα : Type u_1\ninst✝² : Lattice α\ninst✝¹ : OrderBot α\na✝ : α\nP : Finpartition a✝\na : α\ninst✝ : Decidable (a = ⊥)\n⊢ ⊤.parts ⊆ {a}\n[PROOFSTEP]\nintro b hb\n[GOAL]\nα : Type u_1\ninst✝² : Lattice α\ninst✝¹ : OrderBot α\na✝ : α\nP : Finpartition a✝\na : α\ninst✝ : Decidable (a = ⊥)\nb : α\nhb : b ∈ ⊤.parts\n⊢ b ∈ {a}\n[PROOFSTEP]\nhave hb : b ∈ Finpartition.parts (dite _ _ _) := hb\n[GOAL]\nα : Type u_1\ninst✝² : Lattice α\ninst✝¹ : OrderBot α\na✝ : α\nP : Finpartition a✝\na : α\ninst✝ : Decidable (a = ⊥)\nb : α\nhb✝ : b ∈ ⊤.parts\nhb : b ∈ (if ha : a = ⊥ then copy (Finpartition.empty α) (_ : ⊥ = a) else indiscrete ha).parts\n⊢ b ∈ {a}\n[PROOFSTEP]\nsplit_ifs at hb \n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : Lattice α\ninst✝¹ : OrderBot α\na✝ : α\nP : Finpartition a✝\na : α\ninst✝ : Decidable (a = ⊥)\nb : α\nhb✝ : b ∈ ⊤.parts\nh✝ : a = ⊥\nhb : b ∈ (copy (Finpartition.empty α) (_ : ⊥ = a)).parts\n⊢ b ∈ {a}\n[PROOFSTEP]\nsimp only [copy_parts, empty_parts, not_mem_empty] at hb \n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : Lattice α\ninst✝¹ : OrderBot α\na✝ : α\nP : Finpartition a✝\na : α\ninst✝ : Decidable (a = ⊥)\nb : α\nhb✝ : b ∈ ⊤.parts\nh✝ : ¬a = ⊥\nhb : b ∈ (indiscrete h✝).parts\n⊢ b ∈ {a}\n[PROOFSTEP]\nexact hb\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\n⊢ SupIndep (image (fun bc => bc.fst ⊓ bc.snd) (P.parts ×ˢ Q.parts)) id\n[PROOFSTEP]\nrw [supIndep_iff_disjoint_erase]\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\n⊢ ∀ (i : α),\n    i ∈ image (fun bc => bc.fst ⊓ bc.snd) (P.parts ×ˢ Q.parts) →\n      Disjoint (id i) (sup (erase (image (fun bc => bc.fst ⊓ bc.snd) (P.parts ×ˢ Q.parts)) i) id)\n[PROOFSTEP]\nsimp only [mem_image, and_imp, exists_prop, forall_exists_index, id.def, Prod.exists, mem_product,\n  Finset.disjoint_sup_right, mem_erase, Ne.def]\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\n⊢ ∀ (i x x_1 : α),\n    x ∈ P.parts →\n      x_1 ∈ Q.parts →\n        x ⊓ x_1 = i →\n          ∀ ⦃i_1 : α⦄, ¬i_1 = i → ∀ (x x_2 : α), x ∈ P.parts → x_2 ∈ Q.parts → x ⊓ x_2 = i_1 → Disjoint i i_1\n[PROOFSTEP]\nrintro _ x₁ y₁ hx₁ hy₁ rfl _ h x₂ y₂ hx₂ hy₂ rfl\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\nx₁ y₁ : α\nhx₁ : x₁ ∈ P.parts\nhy₁ : y₁ ∈ Q.parts\nx₂ y₂ : α\nhx₂ : x₂ ∈ P.parts\nhy₂ : y₂ ∈ Q.parts\nh : ¬x₂ ⊓ y₂ = x₁ ⊓ y₁\n⊢ Disjoint (x₁ ⊓ y₁) (x₂ ⊓ y₂)\n[PROOFSTEP]\nrcases eq_or_ne x₁ x₂ with (rfl | xdiff)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\nx₁ y₁ : α\nhx₁ : x₁ ∈ P.parts\nhy₁ : y₁ ∈ Q.parts\ny₂ : α\nhy₂ : y₂ ∈ Q.parts\nhx₂ : x₁ ∈ P.parts\nh : ¬x₁ ⊓ y₂ = x₁ ⊓ y₁\n⊢ Disjoint (x₁ ⊓ y₁) (x₁ ⊓ y₂)\n[PROOFSTEP]\nrefine' Disjoint.mono inf_le_right inf_le_right (Q.disjoint hy₁ hy₂ _)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\nx₁ y₁ : α\nhx₁ : x₁ ∈ P.parts\nhy₁ : y₁ ∈ Q.parts\ny₂ : α\nhy₂ : y₂ ∈ Q.parts\nhx₂ : x₁ ∈ P.parts\nh : ¬x₁ ⊓ y₂ = x₁ ⊓ y₁\n⊢ y₁ ≠ y₂\n[PROOFSTEP]\nintro t\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\nx₁ y₁ : α\nhx₁ : x₁ ∈ P.parts\nhy₁ : y₁ ∈ Q.parts\ny₂ : α\nhy₂ : y₂ ∈ Q.parts\nhx₂ : x₁ ∈ P.parts\nh : ¬x₁ ⊓ y₂ = x₁ ⊓ y₁\nt : y₁ = y₂\n⊢ False\n[PROOFSTEP]\nsimp [t] at h \n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\nx₁ y₁ : α\nhx₁ : x₁ ∈ P.parts\nhy₁ : y₁ ∈ Q.parts\nx₂ y₂ : α\nhx₂ : x₂ ∈ P.parts\nhy₂ : y₂ ∈ Q.parts\nh : ¬x₂ ⊓ y₂ = x₁ ⊓ y₁\nxdiff : x₁ ≠ x₂\n⊢ Disjoint (x₁ ⊓ y₁) (x₂ ⊓ y₂)\n[PROOFSTEP]\nexact Disjoint.mono inf_le_left inf_le_left (P.disjoint hx₁ hx₂ xdiff)\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\n⊢ sup (image (fun bc => bc.fst ⊓ bc.snd) (P.parts ×ˢ Q.parts)) id = a\n[PROOFSTEP]\nrw [sup_image, comp.left_id, sup_product_left]\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\n⊢ (sup P.parts fun i => sup Q.parts fun i' => (i, i').fst ⊓ (i, i').snd) = a\n[PROOFSTEP]\ntrans P.parts.sup id ⊓ Q.parts.sup id\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\n⊢ (sup P.parts fun i => sup Q.parts fun i' => (i, i').fst ⊓ (i, i').snd) = sup P.parts id ⊓ sup Q.parts id\n[PROOFSTEP]\nsimp_rw [Finset.sup_inf_distrib_right, Finset.sup_inf_distrib_left]\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\n⊢ (sup P.parts fun i => sup Q.parts fun i' => i ⊓ i') = sup P.parts fun i => sup Q.parts fun i_1 => id i ⊓ id i_1\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP Q : Finpartition a\n⊢ sup P.parts id ⊓ sup Q.parts id = a\n[PROOFSTEP]\nrw [P.supParts, Q.supParts, inf_idem]\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b✝ c : α\nsrc✝¹ : PartialOrder (Finpartition a) := inferInstance\nsrc✝ : Inf (Finpartition a) := inferInstance\nP Q : Finpartition a\nb : α\nhb : b ∈ (P ⊓ Q).parts\n⊢ ∃ c, c ∈ P.parts ∧ b ≤ c\n[PROOFSTEP]\nobtain ⟨c, hc, rfl⟩ := mem_image.1 (mem_of_mem_erase hb)\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c✝ : α\nsrc✝¹ : PartialOrder (Finpartition a) := inferInstance\nsrc✝ : Inf (Finpartition a) := inferInstance\nP Q : Finpartition a\nc : α × α\nhc : c ∈ P.parts ×ˢ Q.parts\nhb : c.fst ⊓ c.snd ∈ (P ⊓ Q).parts\n⊢ ∃ c_1, c_1 ∈ P.parts ∧ c.fst ⊓ c.snd ≤ c_1\n[PROOFSTEP]\nrw [mem_product] at hc \n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c✝ : α\nsrc✝¹ : PartialOrder (Finpartition a) := inferInstance\nsrc✝ : Inf (Finpartition a) := inferInstance\nP Q : Finpartition a\nc : α × α\nhc : c.fst ∈ P.parts ∧ c.snd ∈ Q.parts\nhb : c.fst ⊓ c.snd ∈ (P ⊓ Q).parts\n⊢ ∃ c_1, c_1 ∈ P.parts ∧ c.fst ⊓ c.snd ≤ c_1\n[PROOFSTEP]\nexact ⟨c.1, hc.1, inf_le_left⟩\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b✝ c : α\nsrc✝¹ : PartialOrder (Finpartition a) := inferInstance\nsrc✝ : Inf (Finpartition a) := inferInstance\nP Q : Finpartition a\nb : α\nhb : b ∈ (P ⊓ Q).parts\n⊢ ∃ c, c ∈ Q.parts ∧ b ≤ c\n[PROOFSTEP]\nobtain ⟨c, hc, rfl⟩ := mem_image.1 (mem_of_mem_erase hb)\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c✝ : α\nsrc✝¹ : PartialOrder (Finpartition a) := inferInstance\nsrc✝ : Inf (Finpartition a) := inferInstance\nP Q : Finpartition a\nc : α × α\nhc : c ∈ P.parts ×ˢ Q.parts\nhb : c.fst ⊓ c.snd ∈ (P ⊓ Q).parts\n⊢ ∃ c_1, c_1 ∈ Q.parts ∧ c.fst ⊓ c.snd ≤ c_1\n[PROOFSTEP]\nrw [mem_product] at hc \n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c✝ : α\nsrc✝¹ : PartialOrder (Finpartition a) := inferInstance\nsrc✝ : Inf (Finpartition a) := inferInstance\nP Q : Finpartition a\nc : α × α\nhc : c.fst ∈ P.parts ∧ c.snd ∈ Q.parts\nhb : c.fst ⊓ c.snd ∈ (P ⊓ Q).parts\n⊢ ∃ c_1, c_1 ∈ Q.parts ∧ c.fst ⊓ c.snd ≤ c_1\n[PROOFSTEP]\nexact ⟨c.2, hc.2, inf_le_right⟩\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b✝ c : α\nsrc✝¹ : PartialOrder (Finpartition a) := inferInstance\nsrc✝ : Inf (Finpartition a) := inferInstance\nP Q R : Finpartition a\nhPQ : P ≤ Q\nhPR : P ≤ R\nb : α\nhb : b ∈ P.parts\n⊢ ∃ c, c ∈ (Q ⊓ R).parts ∧ b ≤ c\n[PROOFSTEP]\nobtain ⟨c, hc, hbc⟩ := hPQ hb\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b✝ c✝ : α\nsrc✝¹ : PartialOrder (Finpartition a) := inferInstance\nsrc✝ : Inf (Finpartition a) := inferInstance\nP Q R : Finpartition a\nhPQ : P ≤ Q\nhPR : P ≤ R\nb : α\nhb : b ∈ P.parts\nc : α\nhc : c ∈ Q.parts\nhbc : b ≤ c\n⊢ ∃ c, c ∈ (Q ⊓ R).parts ∧ b ≤ c\n[PROOFSTEP]\nobtain ⟨d, hd, hbd⟩ := hPR hb\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b✝ c✝ : α\nsrc✝¹ : PartialOrder (Finpartition a) := inferInstance\nsrc✝ : Inf (Finpartition a) := inferInstance\nP Q R : Finpartition a\nhPQ : P ≤ Q\nhPR : P ≤ R\nb : α\nhb : b ∈ P.parts\nc : α\nhc : c ∈ Q.parts\nhbc : b ≤ c\nd : α\nhd : d ∈ R.parts\nhbd : b ≤ d\n⊢ ∃ c, c ∈ (Q ⊓ R).parts ∧ b ≤ c\n[PROOFSTEP]\nhave h := _root_.le_inf hbc hbd\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b✝ c✝ : α\nsrc✝¹ : PartialOrder (Finpartition a) := inferInstance\nsrc✝ : Inf (Finpartition a) := inferInstance\nP Q R : Finpartition a\nhPQ : P ≤ Q\nhPR : P ≤ R\nb : α\nhb : b ∈ P.parts\nc : α\nhc : c ∈ Q.parts\nhbc : b ≤ c\nd : α\nhd : d ∈ R.parts\nhbd : b ≤ d\nh : b ≤ c ⊓ d\n⊢ ∃ c, c ∈ (Q ⊓ R).parts ∧ b ≤ c\n[PROOFSTEP]\nrefine'\n  ⟨c ⊓ d,\n    mem_erase_of_ne_of_mem (ne_bot_of_le_ne_bot (P.ne_bot hb) h) (mem_image.2 ⟨(c, d), mem_product.2 ⟨hc, hd⟩, rfl⟩), h⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na b : α\nP Q : Finpartition a\nh : P ≤ Q\nhb : b ∈ Q.parts\n⊢ ∃ c, c ∈ P.parts ∧ c ≤ b\n[PROOFSTEP]\nby_contra H\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na b : α\nP Q : Finpartition a\nh : P ≤ Q\nhb : b ∈ Q.parts\nH : ¬∃ c, c ∈ P.parts ∧ c ≤ b\n⊢ False\n[PROOFSTEP]\nrefine' Q.ne_bot hb (disjoint_self.1 <| Disjoint.mono_right (Q.le hb) _)\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na b : α\nP Q : Finpartition a\nh : P ≤ Q\nhb : b ∈ Q.parts\nH : ¬∃ c, c ∈ P.parts ∧ c ≤ b\n⊢ Disjoint b a\n[PROOFSTEP]\nrw [← P.supParts, Finset.disjoint_sup_right]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na b : α\nP Q : Finpartition a\nh : P ≤ Q\nhb : b ∈ Q.parts\nH : ¬∃ c, c ∈ P.parts ∧ c ≤ b\n⊢ ∀ ⦃i : α⦄, i ∈ P.parts → Disjoint b (id i)\n[PROOFSTEP]\nrintro c hc\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na b : α\nP Q : Finpartition a\nh : P ≤ Q\nhb : b ∈ Q.parts\nH : ¬∃ c, c ∈ P.parts ∧ c ≤ b\nc : α\nhc : c ∈ P.parts\n⊢ Disjoint b (id c)\n[PROOFSTEP]\nobtain ⟨d, hd, hcd⟩ := h hc\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na b : α\nP Q : Finpartition a\nh : P ≤ Q\nhb : b ∈ Q.parts\nH : ¬∃ c, c ∈ P.parts ∧ c ≤ b\nc : α\nhc : c ∈ P.parts\nd : α\nhd : d ∈ Q.parts\nhcd : c ≤ d\n⊢ Disjoint b (id c)\n[PROOFSTEP]\nrefine' (Q.disjoint hb hd _).mono_right hcd\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na b : α\nP Q : Finpartition a\nh : P ≤ Q\nhb : b ∈ Q.parts\nH : ¬∃ c, c ∈ P.parts ∧ c ≤ b\nc : α\nhc : c ∈ P.parts\nd : α\nhd : d ∈ Q.parts\nhcd : c ≤ d\n⊢ b ≠ d\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na b : α\nP Q : Finpartition a\nh : P ≤ Q\nhb : b ∈ Q.parts\nH : ¬∃ c, c ∈ P.parts ∧ c ≤ b\nc : α\nhc : c ∈ P.parts\nhd : b ∈ Q.parts\nhcd : c ≤ b\n⊢ False\n[PROOFSTEP]\nsimp only [not_exists, not_and] at H \n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na b : α\nP Q : Finpartition a\nh : P ≤ Q\nhb : b ∈ Q.parts\nc : α\nhc : c ∈ P.parts\nhd : b ∈ Q.parts\nhcd : c ≤ b\nH : ∀ (x : α), x ∈ P.parts → ¬x ≤ b\n⊢ False\n[PROOFSTEP]\nexact H _ hc hcd\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na : α\nP Q : Finpartition a\nh : P ≤ Q\n⊢ card Q.parts ≤ card P.parts\n[PROOFSTEP]\nclassical\nhave : ∀ b ∈ Q.parts, ∃ c ∈ P.parts, c ≤ b := fun b ↦ exists_le_of_le h\nchoose f hP hf using this\nrw [← card_attach]\nrefine' card_le_card_of_inj_on (fun b ↦ f _ b.2) (fun b _ ↦ hP _ b.2) fun b _ c _ h ↦ _\nexact\n  Subtype.coe_injective\n    (Q.disjoint.elim b.2 c.2 fun H ↦\n      P.ne_bot (hP _ b.2) <| disjoint_self.1 <| H.mono (hf _ b.2) <| h.le.trans <| hf _ c.2)\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na : α\nP Q : Finpartition a\nh : P ≤ Q\n⊢ card Q.parts ≤ card P.parts\n[PROOFSTEP]\nhave : ∀ b ∈ Q.parts, ∃ c ∈ P.parts, c ≤ b := fun b ↦ exists_le_of_le h\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na : α\nP Q : Finpartition a\nh : P ≤ Q\nthis : ∀ (b : α), b ∈ Q.parts → ∃ c, c ∈ P.parts ∧ c ≤ b\n⊢ card Q.parts ≤ card P.parts\n[PROOFSTEP]\nchoose f hP hf using this\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na : α\nP Q : Finpartition a\nh : P ≤ Q\nf : (b : α) → b ∈ Q.parts → α\nhP : ∀ (b : α) (a_1 : b ∈ Q.parts), f b a_1 ∈ P.parts\nhf : ∀ (b : α) (a : b ∈ Q.parts), f b a ≤ b\n⊢ card Q.parts ≤ card P.parts\n[PROOFSTEP]\nrw [← card_attach]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na : α\nP Q : Finpartition a\nh : P ≤ Q\nf : (b : α) → b ∈ Q.parts → α\nhP : ∀ (b : α) (a_1 : b ∈ Q.parts), f b a_1 ∈ P.parts\nhf : ∀ (b : α) (a : b ∈ Q.parts), f b a ≤ b\n⊢ card (attach Q.parts) ≤ card P.parts\n[PROOFSTEP]\nrefine' card_le_card_of_inj_on (fun b ↦ f _ b.2) (fun b _ ↦ hP _ b.2) fun b _ c _ h ↦ _\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na : α\nP Q : Finpartition a\nh✝ : P ≤ Q\nf : (b : α) → b ∈ Q.parts → α\nhP : ∀ (b : α) (a_1 : b ∈ Q.parts), f b a_1 ∈ P.parts\nhf : ∀ (b : α) (a : b ∈ Q.parts), f b a ≤ b\nb : { x // x ∈ Q.parts }\nx✝¹ : b ∈ attach Q.parts\nc : { x // x ∈ Q.parts }\nx✝ : c ∈ attach Q.parts\nh : (fun b => f ↑b (_ : ↑b ∈ Q.parts)) b = (fun b => f ↑b (_ : ↑b ∈ Q.parts)) c\n⊢ b = c\n[PROOFSTEP]\nexact\n  Subtype.coe_injective\n    (Q.disjoint.elim b.2 c.2 fun H ↦\n      P.ne_bot (hP _ b.2) <| disjoint_self.1 <| H.mono (hf _ b.2) <| h.le.trans <| hf _ c.2)\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP✝ : Finpartition a\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\n⊢ SupIndep (Finset.biUnion (attach P.parts) fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts) id\n[PROOFSTEP]\nrw [supIndep_iff_pairwiseDisjoint]\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP✝ : Finpartition a\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\n⊢ Set.PairwiseDisjoint (↑(Finset.biUnion (attach P.parts) fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts)) id\n[PROOFSTEP]\nrintro a ha b hb h\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na✝ b✝ c : α\nP✝ : Finpartition a✝\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a✝\nQ : (i : α) → i ∈ P.parts → Finpartition i\na : α\nha : a ∈ ↑(Finset.biUnion (attach P.parts) fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts)\nb : α\nhb : b ∈ ↑(Finset.biUnion (attach P.parts) fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts)\nh : a ≠ b\n⊢ (Disjoint on id) a b\n[PROOFSTEP]\nrw [Finset.mem_coe, Finset.mem_biUnion] at ha hb \n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na✝ b✝ c : α\nP✝ : Finpartition a✝\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a✝\nQ : (i : α) → i ∈ P.parts → Finpartition i\na : α\nha : ∃ a_1, a_1 ∈ attach P.parts ∧ a ∈ (Q ↑a_1 (_ : ↑a_1 ∈ P.parts)).parts\nb : α\nhb : ∃ a, a ∈ attach P.parts ∧ b ∈ (Q ↑a (_ : ↑a ∈ P.parts)).parts\nh : a ≠ b\n⊢ (Disjoint on id) a b\n[PROOFSTEP]\nobtain ⟨⟨A, hA⟩, -, ha⟩ := ha\n[GOAL]\ncase intro.mk.intro\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na✝ b✝ c : α\nP✝ : Finpartition a✝\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a✝\nQ : (i : α) → i ∈ P.parts → Finpartition i\na b : α\nhb : ∃ a, a ∈ attach P.parts ∧ b ∈ (Q ↑a (_ : ↑a ∈ P.parts)).parts\nh : a ≠ b\nA : α\nhA : A ∈ P.parts\nha : a ∈ (Q ↑{ val := A, property := hA } (_ : ↑{ val := A, property := hA } ∈ P.parts)).parts\n⊢ (Disjoint on id) a b\n[PROOFSTEP]\nobtain ⟨⟨B, hB⟩, -, hb⟩ := hb\n[GOAL]\ncase intro.mk.intro.intro.mk.intro\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na✝ b✝ c : α\nP✝ : Finpartition a✝\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a✝\nQ : (i : α) → i ∈ P.parts → Finpartition i\na b : α\nh : a ≠ b\nA : α\nhA : A ∈ P.parts\nha : a ∈ (Q ↑{ val := A, property := hA } (_ : ↑{ val := A, property := hA } ∈ P.parts)).parts\nB : α\nhB : B ∈ P.parts\nhb : b ∈ (Q ↑{ val := B, property := hB } (_ : ↑{ val := B, property := hB } ∈ P.parts)).parts\n⊢ (Disjoint on id) a b\n[PROOFSTEP]\nobtain rfl | hAB := eq_or_ne A B\n[GOAL]\ncase intro.mk.intro.intro.mk.intro.inl\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na✝ b✝ c : α\nP✝ : Finpartition a✝\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a✝\nQ : (i : α) → i ∈ P.parts → Finpartition i\na b : α\nh : a ≠ b\nA : α\nhA : A ∈ P.parts\nha : a ∈ (Q ↑{ val := A, property := hA } (_ : ↑{ val := A, property := hA } ∈ P.parts)).parts\nhB : A ∈ P.parts\nhb : b ∈ (Q ↑{ val := A, property := hB } (_ : ↑{ val := A, property := hB } ∈ P.parts)).parts\n⊢ (Disjoint on id) a b\n[PROOFSTEP]\nexact (Q A hA).disjoint ha hb h\n[GOAL]\ncase intro.mk.intro.intro.mk.intro.inr\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na✝ b✝ c : α\nP✝ : Finpartition a✝\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a✝\nQ : (i : α) → i ∈ P.parts → Finpartition i\na b : α\nh : a ≠ b\nA : α\nhA : A ∈ P.parts\nha : a ∈ (Q ↑{ val := A, property := hA } (_ : ↑{ val := A, property := hA } ∈ P.parts)).parts\nB : α\nhB : B ∈ P.parts\nhb : b ∈ (Q ↑{ val := B, property := hB } (_ : ↑{ val := B, property := hB } ∈ P.parts)).parts\nhAB : A ≠ B\n⊢ (Disjoint on id) a b\n[PROOFSTEP]\nexact (P.disjoint hA hB hAB).mono ((Q A hA).le ha) ((Q B hB).le hb)\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP✝ : Finpartition a\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\n⊢ sup (Finset.biUnion (attach P.parts) fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts) id = a\n[PROOFSTEP]\nsimp_rw [sup_biUnion]\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP✝ : Finpartition a\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\n⊢ (sup (attach P.parts) fun x => sup (Q ↑x (_ : ↑x ∈ P.parts)).parts id) = a\n[PROOFSTEP]\ntrans (sup P.parts id)\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP✝ : Finpartition a\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\n⊢ (sup (attach P.parts) fun x => sup (Q ↑x (_ : ↑x ∈ P.parts)).parts id) = sup P.parts id\n[PROOFSTEP]\nrw [eq_comm, ← Finset.sup_attach]\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP✝ : Finpartition a\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\n⊢ (sup (attach P.parts) fun x => id ↑x) = sup (attach P.parts) fun x => sup (Q ↑x (_ : ↑x ∈ P.parts)).parts id\n[PROOFSTEP]\nexact sup_congr rfl fun b _hb ↦ (Q b.1 b.2).supParts.symm\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP✝ : Finpartition a\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\n⊢ sup P.parts id = a\n[PROOFSTEP]\nexact P.supParts\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP✝ : Finpartition a\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\nh : ⊥ ∈ Finset.biUnion (attach P.parts) fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts\n⊢ False\n[PROOFSTEP]\nrw [Finset.mem_biUnion] at h \n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP✝ : Finpartition a\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\nh : ∃ a_1, a_1 ∈ attach P.parts ∧ ⊥ ∈ (Q ↑a_1 (_ : ↑a_1 ∈ P.parts)).parts\n⊢ False\n[PROOFSTEP]\nobtain ⟨⟨A, hA⟩, -, h⟩ := h\n[GOAL]\ncase intro.mk.intro\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP✝ : Finpartition a\nQ✝ : (i : α) → i ∈ P✝.parts → Finpartition i\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\nA : α\nhA : A ∈ P.parts\nh : ⊥ ∈ (Q ↑{ val := A, property := hA } (_ : ↑{ val := A, property := hA } ∈ P.parts)).parts\n⊢ False\n[PROOFSTEP]\nexact (Q A hA).not_bot_mem h\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\n⊢ b ∈ (bind P Q).parts ↔ ∃ A hA, b ∈ (Q A hA).parts\n[PROOFSTEP]\nrw [bind, mem_biUnion]\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\n⊢ (∃ a_1, a_1 ∈ attach P.parts ∧ b ∈ (Q ↑a_1 (_ : ↑a_1 ∈ P.parts)).parts) ↔ ∃ A hA, b ∈ (Q A hA).parts\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\n⊢ (∃ a_1, a_1 ∈ attach P.parts ∧ b ∈ (Q ↑a_1 (_ : ↑a_1 ∈ P.parts)).parts) → ∃ A hA, b ∈ (Q A hA).parts\n[PROOFSTEP]\nrintro ⟨⟨A, hA⟩, -, h⟩\n[GOAL]\ncase mp.intro.mk.intro\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\nA : α\nhA : A ∈ P.parts\nh : b ∈ (Q ↑{ val := A, property := hA } (_ : ↑{ val := A, property := hA } ∈ P.parts)).parts\n⊢ ∃ A hA, b ∈ (Q A hA).parts\n[PROOFSTEP]\nexact ⟨A, hA, h⟩\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\n⊢ (∃ A hA, b ∈ (Q A hA).parts) → ∃ a_2, a_2 ∈ attach P.parts ∧ b ∈ (Q ↑a_2 (_ : ↑a_2 ∈ P.parts)).parts\n[PROOFSTEP]\nrintro ⟨A, hA, h⟩\n[GOAL]\ncase mpr.intro.intro\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\nQ : (i : α) → i ∈ P.parts → Finpartition i\nA : α\nhA : A ∈ P.parts\nh : b ∈ (Q A hA).parts\n⊢ ∃ a_1, a_1 ∈ attach P.parts ∧ b ∈ (Q ↑a_1 (_ : ↑a_1 ∈ P.parts)).parts\n[PROOFSTEP]\nexact ⟨⟨A, hA⟩, mem_attach _ ⟨A, hA⟩, h⟩\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\nQ✝ Q : (i : α) → i ∈ P.parts → Finpartition i\n⊢ card (bind P Q).parts = ∑ A in attach P.parts, card (Q ↑A (_ : ↑A ∈ P.parts)).parts\n[PROOFSTEP]\napply card_biUnion\n[GOAL]\ncase h\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\nQ✝ Q : (i : α) → i ∈ P.parts → Finpartition i\n⊢ ∀ (x : { x // x ∈ P.parts }),\n    x ∈ attach P.parts →\n      ∀ (y : { x // x ∈ P.parts }),\n        y ∈ attach P.parts →\n          x ≠ y → Disjoint ((fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts) x) ((fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts) y)\n[PROOFSTEP]\nrintro ⟨b, hb⟩ - ⟨c, hc⟩ - hbc\n[GOAL]\ncase h.mk.mk\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b✝ c✝ : α\nP : Finpartition a\nQ✝ Q : (i : α) → i ∈ P.parts → Finpartition i\nb : α\nhb : b ∈ P.parts\nc : α\nhc : c ∈ P.parts\nhbc : { val := b, property := hb } ≠ { val := c, property := hc }\n⊢ Disjoint ((fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts) { val := b, property := hb })\n    ((fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts) { val := c, property := hc })\n[PROOFSTEP]\nrw [Finset.disjoint_left]\n[GOAL]\ncase h.mk.mk\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b✝ c✝ : α\nP : Finpartition a\nQ✝ Q : (i : α) → i ∈ P.parts → Finpartition i\nb : α\nhb : b ∈ P.parts\nc : α\nhc : c ∈ P.parts\nhbc : { val := b, property := hb } ≠ { val := c, property := hc }\n⊢ ∀ ⦃a_1 : α⦄,\n    a_1 ∈ (fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts) { val := b, property := hb } →\n      ¬a_1 ∈ (fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts) { val := c, property := hc }\n[PROOFSTEP]\nrintro d hdb hdc\n[GOAL]\ncase h.mk.mk\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b✝ c✝ : α\nP : Finpartition a\nQ✝ Q : (i : α) → i ∈ P.parts → Finpartition i\nb : α\nhb : b ∈ P.parts\nc : α\nhc : c ∈ P.parts\nhbc : { val := b, property := hb } ≠ { val := c, property := hc }\nd : α\nhdb : d ∈ (fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts) { val := b, property := hb }\nhdc : d ∈ (fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts) { val := c, property := hc }\n⊢ False\n[PROOFSTEP]\nrw [Ne.def, Subtype.mk_eq_mk] at hbc \n[GOAL]\ncase h.mk.mk\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b✝ c✝ : α\nP : Finpartition a\nQ✝ Q : (i : α) → i ∈ P.parts → Finpartition i\nb : α\nhb : b ∈ P.parts\nc : α\nhc : c ∈ P.parts\nhbc : ¬b = c\nd : α\nhdb : d ∈ (fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts) { val := b, property := hb }\nhdc : d ∈ (fun i => (Q ↑i (_ : ↑i ∈ P.parts)).parts) { val := c, property := hc }\n⊢ False\n[PROOFSTEP]\nexact\n  (Q b hb).ne_bot hdb\n    (eq_bot_iff.2 <| (le_inf ((Q b hb).le hdb) <| (Q c hc).le hdc).trans <| (P.disjoint hb hc hbc).le_bot)\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\nhb : b ≠ ⊥\nhab : Disjoint a b\nhc : a ⊔ b = c\n⊢ SupIndep (insert b P.parts) id\n[PROOFSTEP]\nrw [supIndep_iff_pairwiseDisjoint, coe_insert]\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\nhb : b ≠ ⊥\nhab : Disjoint a b\nhc : a ⊔ b = c\n⊢ Set.PairwiseDisjoint (insert b ↑P.parts) id\n[PROOFSTEP]\nexact P.disjoint.insert fun d hd _ ↦ hab.symm.mono_right <| P.le hd\n[GOAL]\nα : Type u_1\ninst✝² : DistribLattice α\ninst✝¹ : OrderBot α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\nhb : b ≠ ⊥\nhab : Disjoint a b\nhc : a ⊔ b = c\n⊢ sup (insert b P.parts) id = c\n[PROOFSTEP]\nrwa [sup_insert, P.supParts, id, _root_.sup_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : GeneralizedBooleanAlgebra α\ninst✝ : DecidableEq α\na b✝ c : α\nP : Finpartition a\nb : α\n⊢ sup (image (fun x => x \\ b) P.parts) id = a \\ b\n[PROOFSTEP]\nrw [sup_image, comp.left_id, Finset.sup_sdiff_right, ← id_def, P.supParts]\n[GOAL]\nα : Type u_1\ninst✝¹ : GeneralizedBooleanAlgebra α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\n⊢ c ∈ (avoid P b).parts ↔ ∃ d, d ∈ P.parts ∧ ¬d ≤ b ∧ d \\ b = c\n[PROOFSTEP]\nsimp only [avoid, ofErase, mem_erase, Ne.def, mem_image, exists_prop, ← exists_and_left, @and_left_comm (c ≠ ⊥)]\n[GOAL]\nα : Type u_1\ninst✝¹ : GeneralizedBooleanAlgebra α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\n⊢ (∃ x, x ∈ P.parts ∧ ¬c = ⊥ ∧ x \\ b = c) ↔ ∃ d, d ∈ P.parts ∧ ¬d ≤ b ∧ d \\ b = c\n[PROOFSTEP]\nrefine' exists_congr fun d ↦ and_congr_right' <| and_congr_left _\n[GOAL]\nα : Type u_1\ninst✝¹ : GeneralizedBooleanAlgebra α\ninst✝ : DecidableEq α\na b c : α\nP : Finpartition a\nd : α\n⊢ d \\ b = c → (¬c = ⊥ ↔ ¬d ≤ b)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝¹ : GeneralizedBooleanAlgebra α\ninst✝ : DecidableEq α\na b : α\nP : Finpartition a\nd : α\n⊢ ¬d \\ b = ⊥ ↔ ¬d ≤ b\n[PROOFSTEP]\nrw [sdiff_eq_bot_iff]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\na : α\nha : a ∈ s\n⊢ ∃ t, t ∈ P.parts ∧ a ∈ t\n[PROOFSTEP]\nsimp_rw [← P.supParts] at ha \n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\na : α\nha : a ∈ sup P.parts id\n⊢ ∃ t, t ∈ P.parts ∧ a ∈ t\n[PROOFSTEP]\nexact mem_sup.1 ha\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\n⊢ ∑ i in P.parts, card i = card s\n[PROOFSTEP]\nconvert congr_arg Finset.card P.biUnion_parts\n[GOAL]\ncase h.e'_2\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\n⊢ ∑ i in P.parts, card i = card (Finset.biUnion P.parts id)\n[PROOFSTEP]\nrw [card_biUnion P.supIndep.pairwiseDisjoint]\n[GOAL]\ncase h.e'_2\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\n⊢ ∑ i in P.parts, card i = ∑ u in P.parts, card (id u)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\n⊢ Set.PairwiseDisjoint (↑(map { toFun := singleton, inj' := (_ : Injective singleton) } s)) id\n[PROOFSTEP]\nrw [Finset.coe_map]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\n⊢ Set.PairwiseDisjoint (↑{ toFun := singleton, inj' := (_ : Injective singleton) } '' ↑s) id\n[PROOFSTEP]\nexact Finset.pairwiseDisjoint_range_singleton.subset (Set.image_subset_range _ _)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\n⊢ sup (map { toFun := singleton, inj' := (_ : Injective singleton) } s) id = s\n[PROOFSTEP]\nrw [sup_map, comp.left_id, Embedding.coeFn_mk, Finset.sup_singleton']\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\n⊢ ¬⊥ ∈ map { toFun := singleton, inj' := (_ : Injective singleton) } s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nP✝ : Finpartition s✝\ns : Finset α\nsrc✝ : Bot (Finpartition s) := inferInstance\nP : Finpartition s\nt : Finset α\nht : t ∈ ⊥.parts\n⊢ ∃ c, c ∈ P.parts ∧ t ≤ c\n[PROOFSTEP]\nrw [mem_bot_iff] at ht \n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nP✝ : Finpartition s✝\ns : Finset α\nsrc✝ : Bot (Finpartition s) := inferInstance\nP : Finpartition s\nt : Finset α\nht : ∃ a, a ∈ s ∧ {a} = t\n⊢ ∃ c, c ∈ P.parts ∧ t ≤ c\n[PROOFSTEP]\nobtain ⟨a, ha, rfl⟩ := ht\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP✝ : Finpartition s✝\ns : Finset α\nsrc✝ : Bot (Finpartition s) := inferInstance\nP : Finpartition s\na : α\nha : a ∈ s\n⊢ ∃ c, c ∈ P.parts ∧ {a} ≤ c\n[PROOFSTEP]\nobtain ⟨t, ht, hat⟩ := P.exists_mem ha\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nP✝ : Finpartition s✝\ns : Finset α\nsrc✝ : Bot (Finpartition s) := inferInstance\nP : Finpartition s\na : α\nha : a ∈ s\nt : Finset α\nht : t ∈ P.parts\nhat : a ∈ t\n⊢ ∃ c, c ∈ P.parts ∧ {a} ≤ c\n[PROOFSTEP]\nexact ⟨t, ht, singleton_subset_iff.2 hat⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP✝ P : Finpartition s\n⊢ card P.parts ≤ card s\n[PROOFSTEP]\nrw [← card_bot s]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP✝ P : Finpartition s\n⊢ card P.parts ≤ card ⊥.parts\n[PROOFSTEP]\nexact card_mono bot_le\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nx : Finset α\nhx : x ∈ ↑(image (fun Q => filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s) (powerset F))\ny : Finset α\nhy : y ∈ ↑(image (fun Q => filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s) (powerset F))\nh : x ≠ y\nz : α\nhz1 : z ∈ id x\nhz2 : z ∈ id y\n⊢ x = y\n[PROOFSTEP]\nrw [mem_coe, mem_image] at hx hy \n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nx : Finset α\nhx : ∃ a, a ∈ powerset F ∧ filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ a ↔ i ∈ t)) s = x\ny : Finset α\nhy : ∃ a, a ∈ powerset F ∧ filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ a ↔ i ∈ t)) s = y\nh : x ≠ y\nz : α\nhz1 : z ∈ id x\nhz2 : z ∈ id y\n⊢ x = y\n[PROOFSTEP]\nobtain ⟨Q, hQ, rfl⟩ := hx\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\ny : Finset α\nhy : ∃ a, a ∈ powerset F ∧ filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ a ↔ i ∈ t)) s = y\nz : α\nhz2 : z ∈ id y\nQ : Finset (Finset α)\nhQ : Q ∈ powerset F\nh : filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s ≠ y\nhz1 : z ∈ id (filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s)\n⊢ filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s = y\n[PROOFSTEP]\nobtain ⟨R, hR, rfl⟩ := hy\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nz : α\nQ : Finset (Finset α)\nhQ : Q ∈ powerset F\nhz1 : z ∈ id (filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s)\nR : Finset (Finset α)\nhR : R ∈ powerset F\nhz2 : z ∈ id (filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s)\nh :\n  filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s ≠\n    filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s\n⊢ filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s =\n    filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s\n[PROOFSTEP]\nsuffices h' : Q = R\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nz : α\nQ : Finset (Finset α)\nhQ : Q ∈ powerset F\nhz1 : z ∈ id (filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s)\nR : Finset (Finset α)\nhR : R ∈ powerset F\nhz2 : z ∈ id (filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s)\nh :\n  filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s ≠\n    filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s\nh' : Q = R\n⊢ filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s =\n    filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s\n[PROOFSTEP]\nsubst h'\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nz : α\nQ : Finset (Finset α)\nhQ : Q ∈ powerset F\nhz1 : z ∈ id (filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s)\nhR : Q ∈ powerset F\nhz2 : z ∈ id (filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s)\nh :\n  filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s ≠\n    filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s\n⊢ filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s =\n    filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s\n[PROOFSTEP]\nexact of_eq_true (eq_self (filter (fun i ↦ ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s))\n[GOAL]\ncase h'\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nz : α\nQ : Finset (Finset α)\nhQ : Q ∈ powerset F\nhz1 : z ∈ id (filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s)\nR : Finset (Finset α)\nhR : R ∈ powerset F\nhz2 : z ∈ id (filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s)\nh :\n  filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s ≠\n    filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s\n⊢ Q = R\n[PROOFSTEP]\nrw [id, mem_filter] at hz1 hz2 \n[GOAL]\ncase h'\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nz : α\nQ : Finset (Finset α)\nhQ : Q ∈ powerset F\nhz1 : z ∈ s ∧ ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ z ∈ t)\nR : Finset (Finset α)\nhR : R ∈ powerset F\nhz2 : z ∈ s ∧ ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ z ∈ t)\nh :\n  filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s ≠\n    filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s\n⊢ Q = R\n[PROOFSTEP]\nrw [mem_powerset] at hQ hR \n[GOAL]\ncase h'\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nz : α\nQ : Finset (Finset α)\nhQ : Q ⊆ F\nhz1 : z ∈ s ∧ ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ z ∈ t)\nR : Finset (Finset α)\nhR : R ⊆ F\nhz2 : z ∈ s ∧ ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ z ∈ t)\nh :\n  filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s ≠\n    filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s\n⊢ Q = R\n[PROOFSTEP]\next i\n[GOAL]\ncase h'.a\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nz : α\nQ : Finset (Finset α)\nhQ : Q ⊆ F\nhz1 : z ∈ s ∧ ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ z ∈ t)\nR : Finset (Finset α)\nhR : R ⊆ F\nhz2 : z ∈ s ∧ ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ z ∈ t)\nh :\n  filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s ≠\n    filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s\ni : Finset α\n⊢ i ∈ Q ↔ i ∈ R\n[PROOFSTEP]\nrefine' ⟨fun hi ↦ _, fun hi ↦ _⟩\n[GOAL]\ncase h'.a.refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nz : α\nQ : Finset (Finset α)\nhQ : Q ⊆ F\nhz1 : z ∈ s ∧ ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ z ∈ t)\nR : Finset (Finset α)\nhR : R ⊆ F\nhz2 : z ∈ s ∧ ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ z ∈ t)\nh :\n  filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s ≠\n    filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s\ni : Finset α\nhi : i ∈ Q\n⊢ i ∈ R\n[PROOFSTEP]\nrwa [hz2.2 _ (hQ hi), ← hz1.2 _ (hQ hi)]\n[GOAL]\ncase h'.a.refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nz : α\nQ : Finset (Finset α)\nhQ : Q ⊆ F\nhz1 : z ∈ s ∧ ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ z ∈ t)\nR : Finset (Finset α)\nhR : R ⊆ F\nhz2 : z ∈ s ∧ ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ z ∈ t)\nh :\n  filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s ≠\n    filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ R ↔ i ∈ t)) s\ni : Finset α\nhi : i ∈ R\n⊢ i ∈ Q\n[PROOFSTEP]\nrwa [hz1.2 _ (hR hi), ← hz2.2 _ (hR hi)]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\n⊢ sup (image (fun Q => filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s) (powerset F)) id = s\n[PROOFSTEP]\nrefine' (Finset.sup_le fun t ht ↦ _).antisymm fun a ha ↦ _\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nt : Finset α\nht : t ∈ image (fun Q => filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s) (powerset F)\n⊢ id t ≤ s\n[PROOFSTEP]\nrw [mem_image] at ht \n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\nt : Finset α\nht : ∃ a, a ∈ powerset F ∧ filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ a ↔ i ∈ t)) s = t\n⊢ id t ≤ s\n[PROOFSTEP]\nobtain ⟨A, _, rfl⟩ := ht\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF A : Finset (Finset α)\nleft✝ : A ∈ powerset F\n⊢ id (filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ A ↔ i ∈ t)) s) ≤ s\n[PROOFSTEP]\nexact s.filter_subset _\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\na : α\nha : a ∈ s\n⊢ a ∈ sup (image (fun Q => filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s) (powerset F)) id\n[PROOFSTEP]\nrw [mem_sup]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\na : α\nha : a ∈ s\n⊢ ∃ v, v ∈ image (fun Q => filter (fun i => ∀ (t : Finset α), t ∈ F → (t ∈ Q ↔ i ∈ t)) s) (powerset F) ∧ a ∈ id v\n[PROOFSTEP]\nrefine'\n  ⟨s.filter fun i ↦ ∀ t, t ∈ F → ((t ∈ F.filter fun u ↦ a ∈ u) ↔ i ∈ t),\n    mem_image_of_mem _ (mem_powerset.2 <| filter_subset _ _), mem_filter.2 ⟨ha, fun t ht ↦ _⟩⟩\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\na : α\nha : a ∈ s\nt : Finset α\nht : t ∈ F\n⊢ t ∈ filter (fun u => a ∈ u) F ↔ a ∈ t\n[PROOFSTEP]\nrw [mem_filter]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nP : Finpartition s✝\ns : Finset α\nF : Finset (Finset α)\na : α\nha : a ∈ s\nt : Finset α\nht : t ∈ F\n⊢ t ∈ F ∧ a ∈ t ↔ a ∈ t\n[PROOFSTEP]\nexact and_iff_right ht\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\n⊢ t ∈ (atomise s F).parts ↔ Finset.Nonempty t ∧ ∃ Q x, filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ Q ↔ i ∈ u)) s = t\n[PROOFSTEP]\nsimp only [atomise, ofErase, bot_eq_empty, mem_erase, mem_image, nonempty_iff_ne_empty, mem_singleton, and_comm,\n  mem_powerset, exists_prop]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nhs : Finset.Nonempty s\n⊢ (atomise s ∅).parts = {s}\n[PROOFSTEP]\nsimp only [atomise, powerset_empty, image_singleton, not_mem_empty, IsEmpty.forall_iff, imp_true_iff, filter_True]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nhs : Finset.Nonempty s\n⊢ (ofErase {s} (_ : SupIndep {s} id) (_ : sup {s} id = s)).parts = {s}\n[PROOFSTEP]\nexact erase_eq_of_not_mem (not_mem_singleton.2 hs.ne_empty.symm)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\nhts : t ⊆ s\n⊢ Finset.biUnion (filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts) id = t\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\nhts : t ⊆ s\na : α\n⊢ a ∈ Finset.biUnion (filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts) id ↔ a ∈ t\n[PROOFSTEP]\nrefine' mem_biUnion.trans ⟨fun ⟨u, hu, ha⟩ ↦ (mem_filter.1 hu).2.1 ha, fun ha ↦ _⟩\n[GOAL]\ncase a\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\nhts : t ⊆ s\na : α\nha : a ∈ t\n⊢ ∃ a_1, a_1 ∈ filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts ∧ a ∈ id a_1\n[PROOFSTEP]\nobtain ⟨u, hu, hau⟩ := (atomise s F).exists_mem (hts ha)\n[GOAL]\ncase a.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\nhts : t ⊆ s\na : α\nha : a ∈ t\nu : Finset α\nhu : u ∈ (atomise s F).parts\nhau : a ∈ u\n⊢ ∃ a_1, a_1 ∈ filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts ∧ a ∈ id a_1\n[PROOFSTEP]\nrefine' ⟨u, mem_filter.2 ⟨hu, fun b hb ↦ _, _, hau⟩, hau⟩\n[GOAL]\ncase a.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\nhts : t ⊆ s\na : α\nha : a ∈ t\nu : Finset α\nhu : u ∈ (atomise s F).parts\nhau : a ∈ u\nb : α\nhb : b ∈ u\n⊢ b ∈ t\n[PROOFSTEP]\nobtain ⟨Q, _hQ, rfl⟩ := (mem_atomise.1 hu).2\n[GOAL]\ncase a.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\nhts : t ⊆ s\na : α\nha : a ∈ t\nb : α\nQ : Finset (Finset α)\n_hQ : Q ⊆ F\nhu : filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ Q ↔ i ∈ u)) s ∈ (atomise s F).parts\nhau : a ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ Q ↔ i ∈ u)) s\nhb : b ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ Q ↔ i ∈ u)) s\n⊢ b ∈ t\n[PROOFSTEP]\nrw [mem_filter] at hau hb \n[GOAL]\ncase a.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\nhts : t ⊆ s\na : α\nha : a ∈ t\nb : α\nQ : Finset (Finset α)\n_hQ : Q ⊆ F\nhu : filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ Q ↔ i ∈ u)) s ∈ (atomise s F).parts\nhau : a ∈ s ∧ ∀ (u : Finset α), u ∈ F → (u ∈ Q ↔ a ∈ u)\nhb : b ∈ s ∧ ∀ (u : Finset α), u ∈ F → (u ∈ Q ↔ b ∈ u)\n⊢ b ∈ t\n[PROOFSTEP]\nrwa [← hb.2 _ ht, hau.2 _ ht]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\n⊢ card (filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts) ≤ 2 ^ (card F - 1)\n[PROOFSTEP]\nsuffices h :\n  ((atomise s F).parts.filter fun u ↦ u ⊆ t ∧ u.Nonempty) ⊆\n    (F.erase t).powerset.image fun P ↦ s.filter fun i ↦ ∀ x ∈ F, x ∈ insert t P ↔ i ∈ x\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\nh :\n  filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts ⊆\n    image (fun P => filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t P ↔ i ∈ x)) s) (powerset (erase F t))\n⊢ card (filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts) ≤ 2 ^ (card F - 1)\n[PROOFSTEP]\nrefine' (card_le_of_subset h).trans (card_image_le.trans _)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\nh :\n  filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts ⊆\n    image (fun P => filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t P ↔ i ∈ x)) s) (powerset (erase F t))\n⊢ card (powerset (erase F t)) ≤ 2 ^ (card F - 1)\n[PROOFSTEP]\nrw [card_powerset, card_erase_of_mem ht]\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\n⊢ filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts ⊆\n    image (fun P => filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t P ↔ i ∈ x)) s) (powerset (erase F t))\n[PROOFSTEP]\nrw [subset_iff]\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\n⊢ ∀ ⦃x : Finset α⦄,\n    x ∈ filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts →\n      x ∈ image (fun P => filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t P ↔ i ∈ x)) s) (powerset (erase F t))\n[PROOFSTEP]\nsimp_rw [mem_image, mem_powerset, mem_filter, and_imp, Finset.Nonempty, exists_imp, mem_atomise, and_imp,\n  Finset.Nonempty, exists_imp]\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\n⊢ ∀ ⦃x : Finset α⦄ (x_1 : α),\n    x_1 ∈ x →\n      ∀ (x_2 : Finset (Finset α)),\n        x_2 ⊆ F →\n          filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ x_2 ↔ i ∈ u)) s = x →\n            x ⊆ t →\n              ∀ (x_4 : α),\n                x_4 ∈ x →\n                  ∃ a, a ⊆ erase F t ∧ filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t a ↔ i ∈ x)) s = x\n[PROOFSTEP]\nrintro P' i hi P PQ rfl hy₂ j _hj\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP✝ : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\ni : α\nP : Finset (Finset α)\nPQ : P ⊆ F\nhi : i ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s\nhy₂ : filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s ⊆ t\nj : α\n_hj : j ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s\n⊢ ∃ a,\n    a ⊆ erase F t ∧\n      filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t a ↔ i ∈ x)) s =\n        filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s\n[PROOFSTEP]\nrefine' ⟨P.erase t, erase_subset_erase _ PQ, _⟩\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nP✝ : Finpartition s\nF : Finset (Finset α)\nht : t ∈ F\ni : α\nP : Finset (Finset α)\nPQ : P ⊆ F\nhi : i ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s\nhy₂ : filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s ⊆ t\nj : α\n_hj : j ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s\n⊢ filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t (erase P t) ↔ i ∈ x)) s =\n    filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s\n[PROOFSTEP]\nsimp only [insert_erase (((mem_filter.1 hi).2 _ ht).2 <| hy₂ hi)]\n", "meta": {"mathlib_filename": "Mathlib.Order.Partition.Finpartition", "llama_tokens": 28454, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5926665999540698, "lm_q2_score": 0.6187804267137442, "lm_q1q2_score": 0.36673049161856325}}
{"text": "[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA : C\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\nh : p₀ ∈ V.unop\n⊢ (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA : C\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\nh : p₀ ∈ V.unop\n⊢ (if p₀ ∈ U.unop then A else ⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C\n[PROOFSTEP]\nerw [if_pos h, if_pos (leOfHom i.unop h)]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA : C\nU V W : (Opens ↑X)ᵒᵖ\niVU : U ⟶ V\niWV : V ⟶ W\n⊢ { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n          map := fun {U V} i =>\n            if h : p₀ ∈ V.unop then\n              eqToHom (_ : (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V)\n            else\n              IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n                ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) U) }.map\n      (iVU ≫ iWV) =\n    { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n            map := fun {U V} i =>\n              if h : p₀ ∈ V.unop then\n                eqToHom\n                  (_ : (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V)\n              else\n                IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n                  ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) U) }.map\n        iVU ≫\n      { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n            map := fun {U V} i =>\n              if h : p₀ ∈ V.unop then\n                eqToHom\n                  (_ : (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V)\n              else\n                IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n                  ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) U) }.map\n        iWV\n[PROOFSTEP]\nby_cases hW : p₀ ∈ unop W\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA : C\nU V W : (Opens ↑X)ᵒᵖ\niVU : U ⟶ V\niWV : V ⟶ W\nhW : p₀ ∈ W.unop\n⊢ { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n          map := fun {U V} i =>\n            if h : p₀ ∈ V.unop then\n              eqToHom (_ : (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V)\n            else\n              IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n                ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) U) }.map\n      (iVU ≫ iWV) =\n    { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n            map := fun {U V} i =>\n              if h : p₀ ∈ V.unop then\n                eqToHom\n                  (_ : (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V)\n              else\n                IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n                  ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) U) }.map\n        iVU ≫\n      { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n            map := fun {U V} i =>\n              if h : p₀ ∈ V.unop then\n                eqToHom\n                  (_ : (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V)\n              else\n                IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n                  ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) U) }.map\n        iWV\n[PROOFSTEP]\nhave hV : p₀ ∈ unop V := leOfHom iWV.unop hW\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA : C\nU V W : (Opens ↑X)ᵒᵖ\niVU : U ⟶ V\niWV : V ⟶ W\nhW : p₀ ∈ W.unop\nhV : p₀ ∈ V.unop\n⊢ { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n          map := fun {U V} i =>\n            if h : p₀ ∈ V.unop then\n              eqToHom (_ : (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V)\n            else\n              IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n                ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) U) }.map\n      (iVU ≫ iWV) =\n    { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n            map := fun {U V} i =>\n              if h : p₀ ∈ V.unop then\n                eqToHom\n                  (_ : (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V)\n              else\n                IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n                  ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) U) }.map\n        iVU ≫\n      { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n            map := fun {U V} i =>\n              if h : p₀ ∈ V.unop then\n                eqToHom\n                  (_ : (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V)\n              else\n                IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n                  ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) U) }.map\n        iWV\n[PROOFSTEP]\nsimp only [dif_pos hW, dif_pos hV, eqToHom_trans]\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA : C\nU V W : (Opens ↑X)ᵒᵖ\niVU : U ⟶ V\niWV : V ⟶ W\nhW : ¬p₀ ∈ W.unop\n⊢ { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n          map := fun {U V} i =>\n            if h : p₀ ∈ V.unop then\n              eqToHom (_ : (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V)\n            else\n              IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n                ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) U) }.map\n      (iVU ≫ iWV) =\n    { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n            map := fun {U V} i =>\n              if h : p₀ ∈ V.unop then\n                eqToHom\n                  (_ : (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V)\n              else\n                IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n                  ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) U) }.map\n        iVU ≫\n      { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n            map := fun {U V} i =>\n              if h : p₀ ∈ V.unop then\n                eqToHom\n                  (_ : (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V)\n              else\n                IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n                  ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) U) }.map\n        iWV\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA : C\nU V W : (Opens ↑X)ᵒᵖ\niVU : U ⟶ V\niWV : V ⟶ W\nhW : ¬p₀ ∈ W.unop\n⊢ (if h : p₀ ∈ W.unop then eqToHom (_ : (if p₀ ∈ U.unop then A else ⊤_ C) = if p₀ ∈ W.unop then A else ⊤_ C)\n    else\n      IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ W.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n        (if p₀ ∈ U.unop then A else ⊤_ C)) =\n    (if h : p₀ ∈ V.unop then eqToHom (_ : (if p₀ ∈ U.unop then A else ⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then A else ⊤_ C)) ≫\n      if h : p₀ ∈ W.unop then eqToHom (_ : (if p₀ ∈ V.unop then A else ⊤_ C) = if p₀ ∈ W.unop then A else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ W.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ V.unop then A else ⊤_ C)\n[PROOFSTEP]\nrw [dif_neg hW]\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA : C\nU V W : (Opens ↑X)ᵒᵖ\niVU : U ⟶ V\niWV : V ⟶ W\nhW : ¬p₀ ∈ W.unop\n⊢ IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ W.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n      (if p₀ ∈ U.unop then A else ⊤_ C) =\n    (if h : p₀ ∈ V.unop then eqToHom (_ : (if p₀ ∈ U.unop then A else ⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then A else ⊤_ C)) ≫\n      if h : p₀ ∈ W.unop then eqToHom (_ : (if p₀ ∈ V.unop then A else ⊤_ C) = if p₀ ∈ W.unop then A else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ W.unop then A else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ V.unop then A else ⊤_ C)\n[PROOFSTEP]\napply ((if_neg hW).symm.ndrec terminalIsTerminal).hom_ext\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA : C\nhd : (U : Opens ↑(of PUnit)) → Decidable (PUnit.unit ∈ U)\n⊢ skyscraperPresheaf p₀ A = ContinuousMap.const (↑(of PUnit)) p₀ _* skyscraperPresheaf PUnit.unit A\n[PROOFSTEP]\nconvert_to @skyscraperPresheaf X p₀ (fun U => hd <| (Opens.map <| ContinuousMap.const _ p₀).obj U) C _ _ A = _\n[GOAL]\ncase h.e'_2\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA : C\nhd : (U : Opens ↑(of PUnit)) → Decidable (PUnit.unit ∈ U)\n⊢ skyscraperPresheaf p₀ A = skyscraperPresheaf p₀ A\n[PROOFSTEP]\ncongr\n[GOAL]\ncase convert_2\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA : C\nhd : (U : Opens ↑(of PUnit)) → Decidable (PUnit.unit ∈ U)\n⊢ skyscraperPresheaf p₀ A = ContinuousMap.const (↑(of PUnit)) p₀ _* skyscraperPresheaf PUnit.unit A\n[PROOFSTEP]\ncongr\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b : C\nf : a ⟶ b\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\n⊢ (skyscraperPresheaf p₀ a).map i ≫\n      (fun U =>\n          if h : p₀ ∈ U.unop then\n            eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ U.unop then b else ⊤_ C)\n          else\n            IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n              ((skyscraperPresheaf p₀ a).obj U))\n        V =\n    (fun U =>\n          if h : p₀ ∈ U.unop then\n            eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ U.unop then b else ⊤_ C)\n          else\n            IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n              ((skyscraperPresheaf p₀ a).obj U))\n        U ≫\n      (skyscraperPresheaf p₀ b).map i\n[PROOFSTEP]\nsimp only [skyscraperPresheaf_map]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b : C\nf : a ⟶ b\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\n⊢ ((if h : p₀ ∈ V.unop then\n        eqToHom (_ : (fun U => if p₀ ∈ U.unop then a else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then a else ⊤_ C) V)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then a else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then a else ⊤_ C)) ≫\n      if h : p₀ ∈ V.unop then\n        eqToHom (_ : (if p₀ ∈ V.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ V.unop then b else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          ((skyscraperPresheaf p₀ a).obj V)) =\n    (if h : p₀ ∈ U.unop then\n        eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ U.unop then b else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          ((skyscraperPresheaf p₀ a).obj U)) ≫\n      if h : p₀ ∈ V.unop then\n        eqToHom (_ : (fun U => if p₀ ∈ U.unop then b else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then b else ⊤_ C) V)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then b else ⊤_ C)\n[PROOFSTEP]\nby_cases hV : p₀ ∈ V.unop\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b : C\nf : a ⟶ b\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\nhV : p₀ ∈ V.unop\n⊢ ((if h : p₀ ∈ V.unop then\n        eqToHom (_ : (fun U => if p₀ ∈ U.unop then a else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then a else ⊤_ C) V)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then a else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then a else ⊤_ C)) ≫\n      if h : p₀ ∈ V.unop then\n        eqToHom (_ : (if p₀ ∈ V.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ V.unop then b else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          ((skyscraperPresheaf p₀ a).obj V)) =\n    (if h : p₀ ∈ U.unop then\n        eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ U.unop then b else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          ((skyscraperPresheaf p₀ a).obj U)) ≫\n      if h : p₀ ∈ V.unop then\n        eqToHom (_ : (fun U => if p₀ ∈ U.unop then b else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then b else ⊤_ C) V)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then b else ⊤_ C)\n[PROOFSTEP]\nhave hU : p₀ ∈ U.unop := leOfHom i.unop hV\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b : C\nf : a ⟶ b\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\nhV : p₀ ∈ V.unop\nhU : p₀ ∈ U.unop\n⊢ ((if h : p₀ ∈ V.unop then\n        eqToHom (_ : (fun U => if p₀ ∈ U.unop then a else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then a else ⊤_ C) V)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then a else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then a else ⊤_ C)) ≫\n      if h : p₀ ∈ V.unop then\n        eqToHom (_ : (if p₀ ∈ V.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ V.unop then b else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          ((skyscraperPresheaf p₀ a).obj V)) =\n    (if h : p₀ ∈ U.unop then\n        eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ U.unop then b else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          ((skyscraperPresheaf p₀ a).obj U)) ≫\n      if h : p₀ ∈ V.unop then\n        eqToHom (_ : (fun U => if p₀ ∈ U.unop then b else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then b else ⊤_ C) V)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then b else ⊤_ C)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b : C\nf : a ⟶ b\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\nhV : p₀ ∈ V.unop\nhU : p₀ ∈ U.unop\nh✝ : p₀ ∈ V.unop\n⊢ eqToHom (_ : (fun U => if p₀ ∈ U.unop then a else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then a else ⊤_ C) V) ≫\n      eqToHom (_ : (if p₀ ∈ V.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ V.unop then b else ⊤_ C) =\n    (eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ U.unop then b else ⊤_ C)) ≫\n      eqToHom (_ : (fun U => if p₀ ∈ U.unop then b else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then b else ⊤_ C) V)\n[PROOFSTEP]\nsimp only [eqToHom_trans_assoc, Category.assoc, eqToHom_trans]\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b : C\nf : a ⟶ b\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\nhV : p₀ ∈ V.unop\nhU : p₀ ∈ U.unop\nh✝ : ¬p₀ ∈ V.unop\n⊢ eqToHom (_ : (fun U => if p₀ ∈ U.unop then a else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then a else ⊤_ C) V) ≫\n      eqToHom (_ : (if p₀ ∈ V.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ V.unop then b else ⊤_ C) =\n    (eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ U.unop then b else ⊤_ C)) ≫\n      eqToHom (_ : (fun U => if p₀ ∈ U.unop then b else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then b else ⊤_ C) V)\n[PROOFSTEP]\nsimp only [eqToHom_trans_assoc, Category.assoc, eqToHom_trans]\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b : C\nf : a ⟶ b\nU V : (Opens ↑X)ᵒᵖ\ni : U ⟶ V\nhV : ¬p₀ ∈ V.unop\n⊢ ((if h : p₀ ∈ V.unop then\n        eqToHom (_ : (fun U => if p₀ ∈ U.unop then a else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then a else ⊤_ C) V)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then a else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then a else ⊤_ C)) ≫\n      if h : p₀ ∈ V.unop then\n        eqToHom (_ : (if p₀ ∈ V.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ V.unop then b else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          ((skyscraperPresheaf p₀ a).obj V)) =\n    (if h : p₀ ∈ U.unop then\n        eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ U.unop then b else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          ((skyscraperPresheaf p₀ a).obj U)) ≫\n      if h : p₀ ∈ V.unop then\n        eqToHom (_ : (fun U => if p₀ ∈ U.unop then b else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then b else ⊤_ C) V)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then b else ⊤_ C)\n[PROOFSTEP]\napply ((if_neg hV).symm.ndrec terminalIsTerminal).hom_ext\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a : C\n⊢ map' p₀ (𝟙 a) = 𝟙 (skyscraperPresheaf p₀ a)\n[PROOFSTEP]\nrefine NatTrans.ext _ _ <| funext fun U => ?_\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a : C\nU : (Opens ↑X)ᵒᵖ\n⊢ NatTrans.app (map' p₀ (𝟙 a)) U = NatTrans.app (𝟙 (skyscraperPresheaf p₀ a)) U\n[PROOFSTEP]\nsimp only [SkyscraperPresheafFunctor.map'_app, NatTrans.id_app]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a : C\nU : (Opens ↑X)ᵒᵖ\n⊢ (if h : p₀ ∈ U.unop then\n      eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ 𝟙 a ≫ eqToHom (_ : a = if p₀ ∈ U.unop then a else ⊤_ C)\n    else\n      IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then a else ⊤_ C) ▸ terminalIsTerminal)\n        ((skyscraperPresheaf p₀ a).obj U)) =\n    NatTrans.app (𝟙 (skyscraperPresheaf p₀ a)) U\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a : C\nU : (Opens ↑X)ᵒᵖ\nh✝ : p₀ ∈ U.unop\n⊢ eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ 𝟙 a ≫ eqToHom (_ : a = if p₀ ∈ U.unop then a else ⊤_ C) =\n    NatTrans.app (𝟙 (skyscraperPresheaf p₀ a)) U\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a : C\nU : (Opens ↑X)ᵒᵖ\nh✝ : ¬p₀ ∈ U.unop\n⊢ IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then a else ⊤_ C) ▸ terminalIsTerminal)\n      ((skyscraperPresheaf p₀ a).obj U) =\n    NatTrans.app (𝟙 (skyscraperPresheaf p₀ a)) U\n[PROOFSTEP]\naesop_cat\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b c : C\nf : a ⟶ b\ng : b ⟶ c\n⊢ map' p₀ (f ≫ g) = map' p₀ f ≫ map' p₀ g\n[PROOFSTEP]\nrefine\n  NatTrans.ext _ _ <|\n    funext fun U =>\n      ?_\n        -- Porting note : change `simp` to `rw`\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b c : C\nf : a ⟶ b\ng : b ⟶ c\nU : (Opens ↑X)ᵒᵖ\n⊢ NatTrans.app (map' p₀ (f ≫ g)) U = NatTrans.app (map' p₀ f ≫ map' p₀ g) U\n[PROOFSTEP]\nrw [NatTrans.comp_app]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b c : C\nf : a ⟶ b\ng : b ⟶ c\nU : (Opens ↑X)ᵒᵖ\n⊢ NatTrans.app (map' p₀ (f ≫ g)) U = NatTrans.app (map' p₀ f) U ≫ NatTrans.app (map' p₀ g) U\n[PROOFSTEP]\nsimp only [SkyscraperPresheafFunctor.map'_app]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b c : C\nf : a ⟶ b\ng : b ⟶ c\nU : (Opens ↑X)ᵒᵖ\n⊢ (if h : p₀ ∈ U.unop then\n      eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ (f ≫ g) ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n    else\n      IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal)\n        ((skyscraperPresheaf p₀ a).obj U)) =\n    (if h : p₀ ∈ U.unop then\n        eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ U.unop then b else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n          ((skyscraperPresheaf p₀ a).obj U)) ≫\n      if h : p₀ ∈ U.unop then\n        eqToHom (_ : (if p₀ ∈ U.unop then b else ⊤_ C) = b) ≫ g ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal)\n          ((skyscraperPresheaf p₀ b).obj U)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b c : C\nf : a ⟶ b\ng : b ⟶ c\nU : (Opens ↑X)ᵒᵖ\nh : p₀ ∈ U.unop\n⊢ eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ (f ≫ g) ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C) =\n    (eqToHom (_ : (if p₀ ∈ U.unop then a else ⊤_ C) = a) ≫ f ≫ eqToHom (_ : b = if p₀ ∈ U.unop then b else ⊤_ C)) ≫\n      eqToHom (_ : (if p₀ ∈ U.unop then b else ⊤_ C) = b) ≫ g ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{w, v} C\ninst✝ : HasTerminal C\nA a b c : C\nf : a ⟶ b\ng : b ⟶ c\nU : (Opens ↑X)ᵒᵖ\nh : ¬p₀ ∈ U.unop\n⊢ IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal)\n      ((skyscraperPresheaf p₀ a).obj U) =\n    IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then b else ⊤_ C) ▸ terminalIsTerminal)\n        ((skyscraperPresheaf p₀ a).obj U) ≫\n      IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal)\n        ((skyscraperPresheaf p₀ b).obj U)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : p₀ ⤳ y\nU V : (OpenNhds y)ᵒᵖ\ninc : U ⟶ V\n⊢ ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A).map inc ≫\n      (fun U => eqToHom (_ : (if p₀ ∈ U.unop.obj.carrier then A else ⊤_ C) = A)) V =\n    (fun U => eqToHom (_ : (if p₀ ∈ U.unop.obj.carrier then A else ⊤_ C) = A)) U ≫\n      ((Functor.const (OpenNhds y)ᵒᵖ).obj A).map inc\n[PROOFSTEP]\nchange dite _ _ _ ≫ _ = _\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : p₀ ⤳ y\nU V : (OpenNhds y)ᵒᵖ\ninc : U ⟶ V\n⊢ (if h : p₀ ∈ ((OpenNhds.inclusion y).op.obj V).unop then\n        (fun h =>\n            eqToHom\n              (_ :\n                (fun U => if p₀ ∈ U.unop then A else ⊤_ C) ((OpenNhds.inclusion y).op.obj U) =\n                  (fun U => if p₀ ∈ U.unop then A else ⊤_ C) ((OpenNhds.inclusion y).op.obj V)))\n          h\n      else\n        (fun h =>\n            IsTerminal.from\n              ((_ : (⊤_ C) = if p₀ ∈ ((OpenNhds.inclusion y).op.obj V).unop then A else ⊤_ C) ▸ terminalIsTerminal)\n              ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) ((OpenNhds.inclusion y).op.obj U)))\n          h) ≫\n      (fun U => eqToHom (_ : (if p₀ ∈ U.unop.obj.carrier then A else ⊤_ C) = A)) V =\n    (fun U => eqToHom (_ : (if p₀ ∈ U.unop.obj.carrier then A else ⊤_ C) = A)) U ≫\n      ((Functor.const (OpenNhds y)ᵒᵖ).obj A).map inc\n[PROOFSTEP]\nrw [dif_pos]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : p₀ ⤳ y\nU V : (OpenNhds y)ᵒᵖ\ninc : U ⟶ V\n⊢ (fun h =>\n          eqToHom\n            (_ :\n              (fun U => if p₀ ∈ U.unop then A else ⊤_ C) ((OpenNhds.inclusion y).op.obj U) =\n                (fun U => if p₀ ∈ U.unop then A else ⊤_ C) ((OpenNhds.inclusion y).op.obj V)))\n        ?hc ≫\n      (fun U => eqToHom (_ : (if p₀ ∈ U.unop.obj.carrier then A else ⊤_ C) = A)) V =\n    (fun U => eqToHom (_ : (if p₀ ∈ U.unop.obj.carrier then A else ⊤_ C) = A)) U ≫\n      ((Functor.const (OpenNhds y)ᵒᵖ).obj A).map inc\ncase hc\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : p₀ ⤳ y\nU V : (OpenNhds y)ᵒᵖ\ninc : U ⟶ V\n⊢ p₀ ∈ ((OpenNhds.inclusion y).op.obj V).unop\n[PROOFSTEP]\nswap\n  -- Porting note : swap goal to prevent proving same thing twice\n[GOAL]\ncase hc\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : p₀ ⤳ y\nU V : (OpenNhds y)ᵒᵖ\ninc : U ⟶ V\n⊢ p₀ ∈ ((OpenNhds.inclusion y).op.obj V).unop\n[PROOFSTEP]\nexact h.mem_open V.unop.1.2 V.unop.2\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : p₀ ⤳ y\nU V : (OpenNhds y)ᵒᵖ\ninc : U ⟶ V\n⊢ (fun h =>\n          eqToHom\n            (_ :\n              (fun U => if p₀ ∈ U.unop then A else ⊤_ C) ((OpenNhds.inclusion y).op.obj U) =\n                (fun U => if p₀ ∈ U.unop then A else ⊤_ C) ((OpenNhds.inclusion y).op.obj V)))\n        (_ : p₀ ∈ ↑((OpenNhds.inclusion y).op.obj V).unop) ≫\n      (fun U => eqToHom (_ : (if p₀ ∈ U.unop.obj.carrier then A else ⊤_ C) = A)) V =\n    (fun U => eqToHom (_ : (if p₀ ∈ U.unop.obj.carrier then A else ⊤_ C) = A)) U ≫\n      ((Functor.const (OpenNhds y)ᵒᵖ).obj A).map inc\n[PROOFSTEP]\nerw [Category.comp_id, eqToHom_trans]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : p₀ ⤳ y\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nU : (OpenNhds y)ᵒᵖ\n⊢ NatTrans.app (skyscraperPresheafCoconeOfSpecializes p₀ A h).ι U ≫\n      (fun c =>\n          eqToHom\n              (_ :\n                (skyscraperPresheafCoconeOfSpecializes p₀ A h).pt =\n                  if True then (skyscraperPresheafCoconeOfSpecializes p₀ A h).pt else ⊤_ C) ≫\n            NatTrans.app c.ι (op ⊤))\n        c =\n    NatTrans.app c.ι U\n[PROOFSTEP]\ndsimp\n  -- Porting note : added a `dsimp`\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : p₀ ⤳ y\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nU : (OpenNhds y)ᵒᵖ\n⊢ eqToHom (_ : (if p₀ ∈ U.unop.obj.carrier then A else ⊤_ C) = A) ≫\n      eqToHom (_ : A = if True then A else ⊤_ C) ≫ NatTrans.app c.ι (op ⊤) =\n    NatTrans.app c.ι U\n[PROOFSTEP]\nrw [← c.w (homOfLE <| (le_top : unop U ≤ _)).op]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : p₀ ⤳ y\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nU : (OpenNhds y)ᵒᵖ\n⊢ eqToHom (_ : (if p₀ ∈ U.unop.obj.carrier then A else ⊤_ C) = A) ≫\n      eqToHom (_ : A = if True then A else ⊤_ C) ≫\n        ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A).map (homOfLE (_ : U.unop ≤ ⊤)).op ≫\n          NatTrans.app c.ι (op U.unop) =\n    NatTrans.app c.ι U\n[PROOFSTEP]\nchange _ ≫ _ ≫ dite _ _ _ ≫ _ = _\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : p₀ ⤳ y\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nU : (OpenNhds y)ᵒᵖ\n⊢ eqToHom (_ : (if p₀ ∈ U.unop.obj.carrier then A else ⊤_ C) = A) ≫\n      eqToHom (_ : A = if True then A else ⊤_ C) ≫\n        (if h : p₀ ∈ ((OpenNhds.inclusion y).op.obj (op U.unop)).unop then\n            (fun h =>\n                eqToHom\n                  (_ :\n                    (fun U => if p₀ ∈ U.unop then A else ⊤_ C) ((OpenNhds.inclusion y).op.obj (op ⊤)) =\n                      (fun U => if p₀ ∈ U.unop then A else ⊤_ C) ((OpenNhds.inclusion y).op.obj (op U.unop))))\n              h\n          else\n            (fun h =>\n                IsTerminal.from\n                  ((_ : (⊤_ C) = if p₀ ∈ ((OpenNhds.inclusion y).op.obj (op U.unop)).unop then A else ⊤_ C) ▸\n                    terminalIsTerminal)\n                  ((fun U => if p₀ ∈ U.unop then A else ⊤_ C) ((OpenNhds.inclusion y).op.obj (op ⊤))))\n              h) ≫\n          NatTrans.app c.ι (op U.unop) =\n    NatTrans.app c.ι U\n[PROOFSTEP]\nrw [dif_pos]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : p₀ ⤳ y\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nU : (OpenNhds y)ᵒᵖ\n⊢ eqToHom (_ : (if p₀ ∈ U.unop.obj.carrier then A else ⊤_ C) = A) ≫\n      eqToHom (_ : A = if True then A else ⊤_ C) ≫\n        (fun h =>\n              eqToHom\n                (_ :\n                  (fun U => if p₀ ∈ U.unop then A else ⊤_ C) ((OpenNhds.inclusion y).op.obj (op ⊤)) =\n                    (fun U => if p₀ ∈ U.unop then A else ⊤_ C) ((OpenNhds.inclusion y).op.obj (op U.unop))))\n            ?hc ≫\n          NatTrans.app c.ι (op U.unop) =\n    NatTrans.app c.ι U\n[PROOFSTEP]\nsimp only [skyscraperPresheafCoconeOfSpecializes_ι_app, eqToHom_trans_assoc, eqToHom_refl, Category.id_comp, unop_op,\n  op_unop]\n[GOAL]\ncase hc\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : p₀ ⤳ y\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nU : (OpenNhds y)ᵒᵖ\n⊢ p₀ ∈ ((OpenNhds.inclusion y).op.obj (op U.unop)).unop\n[PROOFSTEP]\nexact h.mem_open U.unop.1.2 U.unop.2\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh✝ : p₀ ⤳ y\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nf : (skyscraperPresheafCoconeOfSpecializes p₀ A h✝).pt ⟶ c.pt\nh : ∀ (j : (OpenNhds y)ᵒᵖ), NatTrans.app (skyscraperPresheafCoconeOfSpecializes p₀ A h✝).ι j ≫ f = NatTrans.app c.ι j\n⊢ f =\n    (fun c =>\n        eqToHom\n            (_ :\n              (skyscraperPresheafCoconeOfSpecializes p₀ A h✝).pt =\n                if True then (skyscraperPresheafCoconeOfSpecializes p₀ A h✝).pt else ⊤_ C) ≫\n          NatTrans.app c.ι (op ⊤))\n      c\n[PROOFSTEP]\ndsimp\n  -- Porting note : added a `dsimp`\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh✝ : p₀ ⤳ y\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nf : (skyscraperPresheafCoconeOfSpecializes p₀ A h✝).pt ⟶ c.pt\nh : ∀ (j : (OpenNhds y)ᵒᵖ), NatTrans.app (skyscraperPresheafCoconeOfSpecializes p₀ A h✝).ι j ≫ f = NatTrans.app c.ι j\n⊢ f = eqToHom (_ : A = if True then A else ⊤_ C) ≫ NatTrans.app c.ι (op ⊤)\n[PROOFSTEP]\nrw [← h, skyscraperPresheafCoconeOfSpecializes_ι_app, eqToHom_trans_assoc, eqToHom_refl, Category.id_comp]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : ¬p₀ ⤳ y\nh1 : ∃ U, ¬p₀ ∈ U.obj :=\n  match Iff.mp not_specializes_iff_exists_open h with\n  | Exists.intro U { left := ho, right := { left := h₀, right := hy } } =>\n    Exists.intro { obj := { carrier := U, is_open' := ho }, property := h₀ } hy\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nU : (OpenNhds y)ᵒᵖ\n⊢ NatTrans.app (skyscraperPresheafCocone p₀ A y).ι U ≫\n      (fun c =>\n          eqToHom\n              (_ :\n                (skyscraperPresheafCocone p₀ A y).pt =\n                  if p₀ ∈ (Exists.choose h1).obj then A else (skyscraperPresheafCocone p₀ A y).pt) ≫\n            NatTrans.app c.ι (op (Exists.choose h1)))\n        c =\n    NatTrans.app c.ι U\n[PROOFSTEP]\nchange _ = c.ι.app (op U.unop)\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : ¬p₀ ⤳ y\nh1 : ∃ U, ¬p₀ ∈ U.obj :=\n  match Iff.mp not_specializes_iff_exists_open h with\n  | Exists.intro U { left := ho, right := { left := h₀, right := hy } } =>\n    Exists.intro { obj := { carrier := U, is_open' := ho }, property := h₀ } hy\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nU : (OpenNhds y)ᵒᵖ\n⊢ NatTrans.app (skyscraperPresheafCocone p₀ A y).ι U ≫\n      (fun c =>\n          eqToHom\n              (_ :\n                (skyscraperPresheafCocone p₀ A y).pt =\n                  if p₀ ∈ (Exists.choose h1).obj then A else (skyscraperPresheafCocone p₀ A y).pt) ≫\n            NatTrans.app c.ι (op (Exists.choose h1)))\n        c =\n    NatTrans.app c.ι (op U.unop)\n[PROOFSTEP]\nsimp only [← c.w (homOfLE <| @inf_le_left _ _ h1.choose U.unop).op, ←\n  c.w (homOfLE <| @inf_le_right _ _ h1.choose U.unop).op, ← Category.assoc]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : ¬p₀ ⤳ y\nh1 : ∃ U, ¬p₀ ∈ U.obj :=\n  match Iff.mp not_specializes_iff_exists_open h with\n  | Exists.intro U { left := ho, right := { left := h₀, right := hy } } =>\n    Exists.intro { obj := { carrier := U, is_open' := ho }, property := h₀ } hy\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nU : (OpenNhds y)ᵒᵖ\n⊢ ((NatTrans.app (skyscraperPresheafCocone p₀ A y).ι U ≫\n          eqToHom\n            (_ :\n              (skyscraperPresheafCocone p₀ A y).pt =\n                if p₀ ∈ (Exists.choose h1).obj then A else (skyscraperPresheafCocone p₀ A y).pt)) ≫\n        ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A).map\n          (homOfLE (_ : Exists.choose h1 ⊓ U.unop ≤ Exists.choose h1)).op) ≫\n      NatTrans.app c.ι (op (Exists.choose (_ : ∃ U, ¬p₀ ∈ U.obj) ⊓ U.unop)) =\n    ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A).map (homOfLE (_ : Exists.choose h1 ⊓ U.unop ≤ U.unop)).op ≫\n      NatTrans.app c.ι (op (Exists.choose (_ : ∃ U, ¬p₀ ∈ U.obj) ⊓ U.unop))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : ¬p₀ ⤳ y\nh1 : ∃ U, ¬p₀ ∈ U.obj :=\n  match Iff.mp not_specializes_iff_exists_open h with\n  | Exists.intro U { left := ho, right := { left := h₀, right := hy } } =>\n    Exists.intro { obj := { carrier := U, is_open' := ho }, property := h₀ } hy\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nU : (OpenNhds y)ᵒᵖ\n⊢ (NatTrans.app (skyscraperPresheafCocone p₀ A y).ι U ≫\n        eqToHom\n          (_ :\n            (skyscraperPresheafCocone p₀ A y).pt =\n              if p₀ ∈ (Exists.choose h1).obj then A else (skyscraperPresheafCocone p₀ A y).pt)) ≫\n      ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A).map\n        (homOfLE (_ : Exists.choose h1 ⊓ U.unop ≤ Exists.choose h1)).op =\n    ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A).map (homOfLE (_ : Exists.choose h1 ⊓ U.unop ≤ U.unop)).op\n[PROOFSTEP]\nrefine' ((if_neg _).symm.ndrec terminalIsTerminal).hom_ext _ _\n[GOAL]\ncase e_a\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : ¬p₀ ⤳ y\nh1 : ∃ U, ¬p₀ ∈ U.obj :=\n  match Iff.mp not_specializes_iff_exists_open h with\n  | Exists.intro U { left := ho, right := { left := h₀, right := hy } } =>\n    Exists.intro { obj := { carrier := U, is_open' := ho }, property := h₀ } hy\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nU : (OpenNhds y)ᵒᵖ\n⊢ ¬p₀ ∈ ((OpenNhds.inclusion y).op.obj (op (Exists.choose (_ : ∃ U, ¬p₀ ∈ U.obj) ⊓ U.unop))).unop\n[PROOFSTEP]\nexact fun h => h1.choose_spec h.1\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : ¬p₀ ⤳ y\nh1 : ∃ U, ¬p₀ ∈ U.obj :=\n  match Iff.mp not_specializes_iff_exists_open h with\n  | Exists.intro U { left := ho, right := { left := h₀, right := hy } } =>\n    Exists.intro { obj := { carrier := U, is_open' := ho }, property := h₀ } hy\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nf : (skyscraperPresheafCocone p₀ A y).pt ⟶ c.pt\nH : ∀ (j : (OpenNhds y)ᵒᵖ), NatTrans.app (skyscraperPresheafCocone p₀ A y).ι j ≫ f = NatTrans.app c.ι j\n⊢ f =\n    (fun c =>\n        eqToHom\n            (_ :\n              (skyscraperPresheafCocone p₀ A y).pt =\n                if p₀ ∈ (Exists.choose h1).obj then A else (skyscraperPresheafCocone p₀ A y).pt) ≫\n          NatTrans.app c.ι (op (Exists.choose h1)))\n      c\n[PROOFSTEP]\ndsimp\n  -- Porting note : added a `dsimp`\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : ¬p₀ ⤳ y\nh1 : ∃ U, ¬p₀ ∈ U.obj :=\n  match Iff.mp not_specializes_iff_exists_open h with\n  | Exists.intro U { left := ho, right := { left := h₀, right := hy } } =>\n    Exists.intro { obj := { carrier := U, is_open' := ho }, property := h₀ } hy\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nf : (skyscraperPresheafCocone p₀ A y).pt ⟶ c.pt\nH : ∀ (j : (OpenNhds y)ᵒᵖ), NatTrans.app (skyscraperPresheafCocone p₀ A y).ι j ≫ f = NatTrans.app c.ι j\n⊢ f =\n    eqToHom (_ : (⊤_ C) = if p₀ ∈ (Exists.choose (_ : ∃ U, ¬p₀ ∈ U.obj)).obj then A else ⊤_ C) ≫\n      NatTrans.app c.ι (op (Exists.choose (_ : ∃ U, ¬p₀ ∈ U.obj)))\n[PROOFSTEP]\nrw [← Category.id_comp f, ← H, ← Category.assoc]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : ¬p₀ ⤳ y\nh1 : ∃ U, ¬p₀ ∈ U.obj :=\n  match Iff.mp not_specializes_iff_exists_open h with\n  | Exists.intro U { left := ho, right := { left := h₀, right := hy } } =>\n    Exists.intro { obj := { carrier := U, is_open' := ho }, property := h₀ } hy\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nf : (skyscraperPresheafCocone p₀ A y).pt ⟶ c.pt\nH : ∀ (j : (OpenNhds y)ᵒᵖ), NatTrans.app (skyscraperPresheafCocone p₀ A y).ι j ≫ f = NatTrans.app c.ι j\n⊢ 𝟙 (skyscraperPresheafCocone p₀ A y).pt ≫ f =\n    (eqToHom (_ : (⊤_ C) = if p₀ ∈ (Exists.choose (_ : ∃ U, ¬p₀ ∈ U.obj)).obj then A else ⊤_ C) ≫\n        NatTrans.app (skyscraperPresheafCocone p₀ A y).ι (op (Exists.choose (_ : ∃ U, ¬p₀ ∈ U.obj)))) ≫\n      f\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\ny : ↑X\nh : ¬p₀ ⤳ y\nh1 : ∃ U, ¬p₀ ∈ U.obj :=\n  match Iff.mp not_specializes_iff_exists_open h with\n  | Exists.intro U { left := ho, right := { left := h₀, right := hy } } =>\n    Exists.intro { obj := { carrier := U, is_open' := ho }, property := h₀ } hy\nc : Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)\nf : (skyscraperPresheafCocone p₀ A y).pt ⟶ c.pt\nH : ∀ (j : (OpenNhds y)ᵒᵖ), NatTrans.app (skyscraperPresheafCocone p₀ A y).ι j ≫ f = NatTrans.app c.ι j\n⊢ 𝟙 (skyscraperPresheafCocone p₀ A y).pt =\n    eqToHom (_ : (⊤_ C) = if p₀ ∈ (Exists.choose (_ : ∃ U, ¬p₀ ∈ U.obj)).obj then A else ⊤_ C) ≫\n      NatTrans.app (skyscraperPresheafCocone p₀ A y).ι (op (Exists.choose (_ : ∃ U, ¬p₀ ∈ U.obj)))\n[PROOFSTEP]\napply terminalIsTerminal.hom_ext\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\n⊢ TopCat.Presheaf.IsSheaf (skyscraperPresheaf p₀ A)\n[PROOFSTEP]\nclassical exact\n  (Presheaf.isSheaf_iso_iff (eqToIso <| skyscraperPresheaf_eq_pushforward p₀ A)).mpr <|\n    (Sheaf.pushforward_sheaf_of_sheaf _\n      (Presheaf.isSheaf_on_punit_of_isTerminal _\n        (by\n          dsimp [skyscraperPresheaf]\n          rw [if_neg]\n          · exact terminalIsTerminal\n          · exact Set.not_mem_empty PUnit.unit)))\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\n⊢ TopCat.Presheaf.IsSheaf (skyscraperPresheaf p₀ A)\n[PROOFSTEP]\nexact\n  (Presheaf.isSheaf_iso_iff (eqToIso <| skyscraperPresheaf_eq_pushforward p₀ A)).mpr <|\n    (Sheaf.pushforward_sheaf_of_sheaf _\n      (Presheaf.isSheaf_on_punit_of_isTerminal _\n        (by\n          dsimp [skyscraperPresheaf]\n          rw [if_neg]\n          · exact terminalIsTerminal\n          · exact Set.not_mem_empty PUnit.unit)))\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\n⊢ IsTerminal ((skyscraperPresheaf PUnit.unit A).obj (op ⊥))\n[PROOFSTEP]\ndsimp [skyscraperPresheaf]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\n⊢ IsTerminal (if PUnit.unit ∈ ⊥ then A else ⊤_ C)\n[PROOFSTEP]\nrw [if_neg]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\n⊢ IsTerminal (⊤_ C)\n[PROOFSTEP]\nexact terminalIsTerminal\n[GOAL]\ncase hnc\nX : TopCat\np₀ : ↑X\ninst✝² : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝¹ : Category.{u, v} C\nA : C\ninst✝ : HasTerminal C\n⊢ ¬PUnit.unit ∈ ⊥\n[PROOFSTEP]\nexact Set.not_mem_empty PUnit.unit\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU V : (Opens ↑X)ᵒᵖ\ninc : U ⟶ V\n⊢ 𝓕.map inc ≫\n      (fun U =>\n          if h : p₀ ∈ U.unop then\n            Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n          else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj U))\n        V =\n    (fun U =>\n          if h : p₀ ∈ U.unop then\n            Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n          else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj U))\n        U ≫\n      (skyscraperPresheaf p₀ c).map inc\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU V : (Opens ↑X)ᵒᵖ\ninc : U ⟶ V\n⊢ (𝓕.map inc ≫\n      if h : p₀ ∈ V.unop then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ V.unop then c else ⊤_ C)\n      else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj V)) =\n    (if h : p₀ ∈ U.unop then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n      else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj U)) ≫\n      if h : p₀ ∈ V.unop then\n        eqToHom (_ : (fun U => if p₀ ∈ U.unop then c else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then c else ⊤_ C) V)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then c else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then c else ⊤_ C)\n[PROOFSTEP]\nby_cases hV : p₀ ∈ V.unop\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU V : (Opens ↑X)ᵒᵖ\ninc : U ⟶ V\nhV : p₀ ∈ V.unop\n⊢ (𝓕.map inc ≫\n      if h : p₀ ∈ V.unop then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ V.unop then c else ⊤_ C)\n      else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj V)) =\n    (if h : p₀ ∈ U.unop then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n      else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj U)) ≫\n      if h : p₀ ∈ V.unop then\n        eqToHom (_ : (fun U => if p₀ ∈ U.unop then c else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then c else ⊤_ C) V)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then c else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then c else ⊤_ C)\n[PROOFSTEP]\nhave hU : p₀ ∈ U.unop := leOfHom inc.unop hV\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU V : (Opens ↑X)ᵒᵖ\ninc : U ⟶ V\nhV : p₀ ∈ V.unop\nhU : p₀ ∈ U.unop\n⊢ (𝓕.map inc ≫\n      if h : p₀ ∈ V.unop then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ V.unop then c else ⊤_ C)\n      else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj V)) =\n    (if h : p₀ ∈ U.unop then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n      else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj U)) ≫\n      if h : p₀ ∈ V.unop then\n        eqToHom (_ : (fun U => if p₀ ∈ U.unop then c else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then c else ⊤_ C) V)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then c else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then c else ⊤_ C)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU V : (Opens ↑X)ᵒᵖ\ninc : U ⟶ V\nhV : p₀ ∈ V.unop\nhU : p₀ ∈ U.unop\nh✝ : p₀ ∈ V.unop\n⊢ 𝓕.map inc ≫ Presheaf.germ 𝓕 { val := p₀, property := h✝ } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ V.unop then c else ⊤_ C) =\n    (Presheaf.germ 𝓕 { val := p₀, property := hU } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)) ≫\n      eqToHom (_ : (fun U => if p₀ ∈ U.unop then c else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then c else ⊤_ C) V)\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU V : (Opens ↑X)ᵒᵖ\ninc : U ⟶ V\nhV : p₀ ∈ V.unop\nhU : p₀ ∈ U.unop\nh✝ : ¬p₀ ∈ V.unop\n⊢ 𝓕.map inc ≫ Presheaf.germ 𝓕 { val := p₀, property := hV } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ V.unop then c else ⊤_ C) =\n    (Presheaf.germ 𝓕 { val := p₀, property := hU } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)) ≫\n      eqToHom (_ : (fun U => if p₀ ∈ U.unop then c else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then c else ⊤_ C) V)\n[PROOFSTEP]\nerw [← Category.assoc, 𝓕.germ_res inc.unop, Category.assoc, Category.assoc, eqToHom_trans]\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU V : (Opens ↑X)ᵒᵖ\ninc : U ⟶ V\nhV : p₀ ∈ V.unop\nhU : p₀ ∈ U.unop\nh✝ : ¬p₀ ∈ V.unop\n⊢ 𝓕.map inc ≫ Presheaf.germ 𝓕 { val := p₀, property := hV } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ V.unop then c else ⊤_ C) =\n    (Presheaf.germ 𝓕 { val := p₀, property := hU } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)) ≫\n      eqToHom (_ : (fun U => if p₀ ∈ U.unop then c else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then c else ⊤_ C) V)\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU V : (Opens ↑X)ᵒᵖ\ninc : U ⟶ V\nhV : ¬p₀ ∈ V.unop\n⊢ (𝓕.map inc ≫\n      if h : p₀ ∈ V.unop then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ V.unop then c else ⊤_ C)\n      else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj V)) =\n    (if h : p₀ ∈ U.unop then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n      else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj U)) ≫\n      if h : p₀ ∈ V.unop then\n        eqToHom (_ : (fun U => if p₀ ∈ U.unop then c else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then c else ⊤_ C) V)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then c else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U.unop then c else ⊤_ C)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU V : (Opens ↑X)ᵒᵖ\ninc : U ⟶ V\nhV : ¬p₀ ∈ V.unop\nh✝ : p₀ ∈ V.unop\n⊢ 𝓕.map inc ≫ Presheaf.germ 𝓕 { val := p₀, property := h✝ } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ V.unop then c else ⊤_ C) =\n    (if h : p₀ ∈ U.unop then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n      else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj U)) ≫\n      eqToHom (_ : (fun U => if p₀ ∈ U.unop then c else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then c else ⊤_ C) V)\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU V : (Opens ↑X)ᵒᵖ\ninc : U ⟶ V\nhV h✝ : ¬p₀ ∈ V.unop\n⊢ 𝓕.map inc ≫ IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj V) =\n    (if h : p₀ ∈ U.unop then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n      else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj U)) ≫\n      IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then c else ⊤_ C) ▸ terminalIsTerminal)\n        (if p₀ ∈ U.unop then c else ⊤_ C)\n[PROOFSTEP]\napply ((if_neg hV).symm.ndrec terminalIsTerminal).hom_ext\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU V : (Opens ↑X)ᵒᵖ\ninc : U ⟶ V\nhV h✝ : ¬p₀ ∈ V.unop\n⊢ 𝓕.map inc ≫ IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj V) =\n    (if h : p₀ ∈ U.unop then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n      else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj U)) ≫\n      IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ V.unop then c else ⊤_ C) ▸ terminalIsTerminal)\n        (if p₀ ∈ U.unop then c else ⊤_ C)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU V : (OpenNhds p₀)ᵒᵖ\ninc : U ⟶ V\n⊢ ((OpenNhds.inclusion p₀).op ⋙ 𝓕).map inc ≫\n      (fun U => NatTrans.app f (op U.unop.obj) ≫ eqToHom (_ : (if p₀ ∈ U.unop.obj then c else ⊤_ C) = c)) V =\n    (fun U => NatTrans.app f (op U.unop.obj) ≫ eqToHom (_ : (if p₀ ∈ U.unop.obj then c else ⊤_ C) = c)) U ≫\n      ((Functor.const (OpenNhds p₀)ᵒᵖ).obj c).map inc\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU V : (OpenNhds p₀)ᵒᵖ\ninc : U ⟶ V\n⊢ 𝓕.map ((OpenNhds.inclusion p₀).map inc.unop).op ≫\n      NatTrans.app f (op V.unop.obj) ≫ eqToHom (_ : (if p₀ ∈ V.unop.obj then c else ⊤_ C) = c) =\n    (NatTrans.app f (op U.unop.obj) ≫ eqToHom (_ : (if p₀ ∈ U.unop.obj then c else ⊤_ C) = c)) ≫ 𝟙 c\n[PROOFSTEP]\nerw [Category.comp_id, ← Category.assoc, comp_eqToHom_iff, Category.assoc, eqToHom_trans, f.naturality,\n  skyscraperPresheaf_map]\n  -- Porting note : added this `dsimp` and `rfl` in the end\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU V : (OpenNhds p₀)ᵒᵖ\ninc : U ⟶ V\n⊢ (NatTrans.app f (op ((OpenNhds.inclusion p₀).obj U.unop)) ≫\n      if h : p₀ ∈ (op ((OpenNhds.inclusion p₀).obj V.unop)).unop then\n        eqToHom\n          (_ :\n            (fun U => if p₀ ∈ U.unop then c else ⊤_ C) (op ((OpenNhds.inclusion p₀).obj U.unop)) =\n              (fun U => if p₀ ∈ U.unop then c else ⊤_ C) (op ((OpenNhds.inclusion p₀).obj V.unop)))\n      else\n        IsTerminal.from\n          ((_ : (⊤_ C) = if p₀ ∈ (op ((OpenNhds.inclusion p₀).obj V.unop)).unop then c else ⊤_ C) ▸ terminalIsTerminal)\n          ((fun U => if p₀ ∈ U.unop then c else ⊤_ C) (op ((OpenNhds.inclusion p₀).obj U.unop)))) =\n    NatTrans.app f (op U.unop.obj) ≫\n      eqToHom (_ : (if p₀ ∈ U.unop.obj then c else ⊤_ C) = if p₀ ∈ V.unop.obj then c else ⊤_ C)\n[PROOFSTEP]\ndsimp only [skyscraperPresheaf_obj, unop_op, Eq.ndrec]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU V : (OpenNhds p₀)ᵒᵖ\ninc : U ⟶ V\n⊢ (NatTrans.app f (op ((OpenNhds.inclusion p₀).obj U.unop)) ≫\n      if h : p₀ ∈ (OpenNhds.inclusion p₀).obj V.unop then\n        eqToHom\n          (_ :\n            (fun U => if p₀ ∈ U.unop then c else ⊤_ C) (op ((OpenNhds.inclusion p₀).obj U.unop)) =\n              (fun U => if p₀ ∈ U.unop then c else ⊤_ C) (op ((OpenNhds.inclusion p₀).obj V.unop)))\n      else\n        IsTerminal.from\n          ((_ : (⊤_ C) = if p₀ ∈ (op ((OpenNhds.inclusion p₀).obj V.unop)).unop then c else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ (OpenNhds.inclusion p₀).obj U.unop then c else ⊤_ C)) =\n    NatTrans.app f (op U.unop.obj) ≫\n      eqToHom (_ : (if p₀ ∈ U.unop.obj then c else ⊤_ C) = if p₀ ∈ V.unop.obj then c else ⊤_ C)\n[PROOFSTEP]\nhave hV : p₀ ∈ (OpenNhds.inclusion p₀).obj V.unop := V.unop.2\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU V : (OpenNhds p₀)ᵒᵖ\ninc : U ⟶ V\nhV : p₀ ∈ (OpenNhds.inclusion p₀).obj V.unop\n⊢ (NatTrans.app f (op ((OpenNhds.inclusion p₀).obj U.unop)) ≫\n      if h : p₀ ∈ (OpenNhds.inclusion p₀).obj V.unop then\n        eqToHom\n          (_ :\n            (fun U => if p₀ ∈ U.unop then c else ⊤_ C) (op ((OpenNhds.inclusion p₀).obj U.unop)) =\n              (fun U => if p₀ ∈ U.unop then c else ⊤_ C) (op ((OpenNhds.inclusion p₀).obj V.unop)))\n      else\n        IsTerminal.from\n          ((_ : (⊤_ C) = if p₀ ∈ (op ((OpenNhds.inclusion p₀).obj V.unop)).unop then c else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ (OpenNhds.inclusion p₀).obj U.unop then c else ⊤_ C)) =\n    NatTrans.app f (op U.unop.obj) ≫\n      eqToHom (_ : (if p₀ ∈ U.unop.obj then c else ⊤_ C) = if p₀ ∈ V.unop.obj then c else ⊤_ C)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU V : (OpenNhds p₀)ᵒᵖ\ninc : U ⟶ V\nhV : p₀ ∈ (OpenNhds.inclusion p₀).obj V.unop\nh✝ : p₀ ∈ V.unop.obj\n⊢ NatTrans.app f (op ((OpenNhds.inclusion p₀).obj U.unop)) ≫\n      eqToHom\n        (_ :\n          (fun U => if p₀ ∈ U.unop then c else ⊤_ C) (op ((OpenNhds.inclusion p₀).obj U.unop)) =\n            (fun U => if p₀ ∈ U.unop then c else ⊤_ C) (op ((OpenNhds.inclusion p₀).obj V.unop))) =\n    NatTrans.app f (op U.unop.obj) ≫\n      eqToHom (_ : (if p₀ ∈ U.unop.obj then c else ⊤_ C) = if p₀ ∈ V.unop.obj then c else ⊤_ C)\n[PROOFSTEP]\nsimp only [comp_eqToHom_iff, Category.assoc, eqToHom_trans, eqToHom_refl, Category.comp_id]\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU V : (OpenNhds p₀)ᵒᵖ\ninc : U ⟶ V\nhV : p₀ ∈ (OpenNhds.inclusion p₀).obj V.unop\nh✝ : ¬p₀ ∈ V.unop.obj\n⊢ NatTrans.app f (op ((OpenNhds.inclusion p₀).obj U.unop)) ≫\n      eqToHom\n        (_ :\n          (fun U => if p₀ ∈ U.unop then c else ⊤_ C) (op ((OpenNhds.inclusion p₀).obj U.unop)) =\n            (fun U => if p₀ ∈ U.unop then c else ⊤_ C) (op ((OpenNhds.inclusion p₀).obj V.unop))) =\n    NatTrans.app f (op U.unop.obj) ≫\n      eqToHom (_ : (if p₀ ∈ U.unop.obj then c else ⊤_ C) = if p₀ ∈ V.unop.obj then c else ⊤_ C)\n[PROOFSTEP]\nsimp only [comp_eqToHom_iff, Category.assoc, eqToHom_trans, eqToHom_refl, Category.comp_id]\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU V : (OpenNhds p₀)ᵒᵖ\ninc : U ⟶ V\nhV : p₀ ∈ (OpenNhds.inclusion p₀).obj V.unop\nh✝ : p₀ ∈ V.unop.obj\n⊢ NatTrans.app f (op ((OpenNhds.inclusion p₀).obj U.unop)) = NatTrans.app f (op U.unop.obj)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU V : (OpenNhds p₀)ᵒᵖ\ninc : U ⟶ V\nhV : p₀ ∈ (OpenNhds.inclusion p₀).obj V.unop\nh✝ : ¬p₀ ∈ V.unop.obj\n⊢ NatTrans.app f (op ((OpenNhds.inclusion p₀).obj U.unop)) = NatTrans.app f (op U.unop.obj)\n[PROOFSTEP]\nrfl\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU : (Opens ↑X)ᵒᵖ\nh : p₀ ∈ U.unop\n⊢ NatTrans.app (toSkyscraperPresheaf p₀ (fromStalk p₀ f)) U = NatTrans.app f U\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU : (Opens ↑X)ᵒᵖ\nh : p₀ ∈ U.unop\n⊢ (if h : p₀ ∈ U.unop then\n      Presheaf.germ 𝓕 { val := p₀, property := h } ≫ fromStalk p₀ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n    else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj U)) =\n    NatTrans.app f U\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU : (Opens ↑X)ᵒᵖ\nh : p₀ ∈ U.unop\n⊢ Presheaf.germ 𝓕 { val := p₀, property := h } ≫ fromStalk p₀ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C) =\n    NatTrans.app f U\n[PROOFSTEP]\nerw [← Category.assoc, colimit.ι_desc, Category.assoc, eqToHom_trans, eqToHom_refl, Category.comp_id]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU : (Opens ↑X)ᵒᵖ\nh : p₀ ∈ U.unop\n⊢ NatTrans.app f (op (op { obj := U.unop, property := (_ : ↑{ val := p₀, property := h } ∈ U.unop) }).unop.obj) =\n    NatTrans.app f U\n[PROOFSTEP]\nrfl\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU : (Opens ↑X)ᵒᵖ\nh : ¬p₀ ∈ U.unop\n⊢ NatTrans.app (toSkyscraperPresheaf p₀ (fromStalk p₀ f)) U = NatTrans.app f U\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU : (Opens ↑X)ᵒᵖ\nh : ¬p₀ ∈ U.unop\n⊢ (if h : p₀ ∈ U.unop then\n      Presheaf.germ 𝓕 { val := p₀, property := h } ≫ fromStalk p₀ f ≫ eqToHom (_ : c = if p₀ ∈ U.unop then c else ⊤_ C)\n    else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj U)) =\n    NatTrans.app f U\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : 𝓕 ⟶ skyscraperPresheaf p₀ c\nU : (Opens ↑X)ᵒᵖ\nh : ¬p₀ ∈ U.unop\n⊢ IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ U.unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj U) = NatTrans.app f U\n[PROOFSTEP]\napply ((if_neg h).symm.ndrec terminalIsTerminal).hom_ext\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU : (OpenNhds p₀)ᵒᵖ\n⊢ colimit.ι (((whiskeringLeft (OpenNhds p₀)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion p₀).op).obj 𝓕) U ≫\n      fromStalk p₀ (toSkyscraperPresheaf p₀ f) =\n    colimit.ι (((whiskeringLeft (OpenNhds p₀)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion p₀).op).obj 𝓕) U ≫ f\n[PROOFSTEP]\nerw [colimit.ι_desc]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU : (OpenNhds p₀)ᵒᵖ\n⊢ NatTrans.app\n      { pt := c,\n          ι :=\n            NatTrans.mk fun U =>\n              NatTrans.app (toSkyscraperPresheaf p₀ f) (op U.unop.obj) ≫\n                eqToHom (_ : (if p₀ ∈ U.unop.obj then c else ⊤_ C) = c) }.ι\n      U =\n    colimit.ι (((whiskeringLeft (OpenNhds p₀)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion p₀).op).obj 𝓕) U ≫ f\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU : (OpenNhds p₀)ᵒᵖ\n⊢ (if h : p₀ ∈ U.unop.obj then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫\n          f ≫ eqToHom (_ : c = if p₀ ∈ (op U.unop.obj).unop then c else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U.unop.obj).unop then c else ⊤_ C) ▸ terminalIsTerminal)\n          (𝓕.obj (op U.unop.obj))) ≫\n      eqToHom (_ : (if p₀ ∈ U.unop.obj then c else ⊤_ C) = c) =\n    colimit.ι ((OpenNhds.inclusion p₀).op ⋙ 𝓕) U ≫ f\n[PROOFSTEP]\nrw [dif_pos U.unop.2]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU : (OpenNhds p₀)ᵒᵖ\n⊢ (Presheaf.germ 𝓕 { val := p₀, property := (_ : p₀ ∈ U.unop.obj) } ≫\n        f ≫ eqToHom (_ : c = if p₀ ∈ (op U.unop.obj).unop then c else ⊤_ C)) ≫\n      eqToHom (_ : (if p₀ ∈ U.unop.obj then c else ⊤_ C) = c) =\n    colimit.ι ((OpenNhds.inclusion p₀).op ⋙ 𝓕) U ≫ f\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc, eqToHom_trans, eqToHom_refl, Category.comp_id, Presheaf.germ]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nf : Presheaf.stalk 𝓕 p₀ ⟶ c\nU : (OpenNhds p₀)ᵒᵖ\n⊢ colimit.ι ((OpenNhds.inclusion ↑{ val := p₀, property := (_ : p₀ ∈ U.unop.obj) }).op ⋙ 𝓕)\n        (op { obj := U.unop.obj, property := (_ : ↑{ val := p₀, property := (_ : p₀ ∈ U.unop.obj) } ∈ U.unop.obj) }) ≫\n      f =\n    colimit.ι ((OpenNhds.inclusion p₀).op ⋙ 𝓕) U ≫ f\n[PROOFSTEP]\ncongr 3\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 𝓖 : Presheaf C X\nf : 𝓕 ⟶ 𝓖\n⊢ (𝟭 (Presheaf C X)).map f ≫ (fun 𝓕 => toSkyscraperPresheaf p₀ (𝟙 (Presheaf.stalk ((𝟭 (Presheaf C X)).obj 𝓕) p₀))) 𝓖 =\n    (fun 𝓕 => toSkyscraperPresheaf p₀ (𝟙 (Presheaf.stalk ((𝟭 (Presheaf C X)).obj 𝓕) p₀))) 𝓕 ≫\n      (Presheaf.stalkFunctor C p₀ ⋙ skyscraperPresheafFunctor p₀).map f\n[PROOFSTEP]\next U\n[GOAL]\ncase w\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 𝓖 : Presheaf C X\nf : 𝓕 ⟶ 𝓖\nU : Opens ↑X\n⊢ NatTrans.app\n      ((𝟭 (Presheaf C X)).map f ≫\n        (fun 𝓕 => toSkyscraperPresheaf p₀ (𝟙 (Presheaf.stalk ((𝟭 (Presheaf C X)).obj 𝓕) p₀))) 𝓖)\n      (op U) =\n    NatTrans.app\n      ((fun 𝓕 => toSkyscraperPresheaf p₀ (𝟙 (Presheaf.stalk ((𝟭 (Presheaf C X)).obj 𝓕) p₀))) 𝓕 ≫\n        (Presheaf.stalkFunctor C p₀ ⋙ skyscraperPresheafFunctor p₀).map f)\n      (op U)\n[PROOFSTEP]\ndsimp\n  -- Porting note : added the following `rw` and `dsimp` to make it compile\n[GOAL]\ncase w\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 𝓖 : Presheaf C X\nf : 𝓕 ⟶ 𝓖\nU : Opens ↑X\n⊢ NatTrans.app (f ≫ toSkyscraperPresheaf p₀ (𝟙 (Presheaf.stalk 𝓖 p₀))) (op U) =\n    NatTrans.app\n      (toSkyscraperPresheaf p₀ (𝟙 (Presheaf.stalk 𝓕 p₀)) ≫\n        SkyscraperPresheafFunctor.map' p₀ ((Presheaf.stalkFunctor C p₀).map f))\n      (op U)\n[PROOFSTEP]\nrw [NatTrans.comp_app, toSkyscraperPresheaf_app, NatTrans.comp_app, toSkyscraperPresheaf_app]\n[GOAL]\ncase w\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 𝓖 : Presheaf C X\nf : 𝓕 ⟶ 𝓖\nU : Opens ↑X\n⊢ (NatTrans.app f (op U) ≫\n      if h : p₀ ∈ (op U).unop then\n        Presheaf.germ 𝓖 { val := p₀, property := h } ≫\n          𝟙 (Presheaf.stalk 𝓖 p₀) ≫\n            eqToHom (_ : Presheaf.stalk 𝓖 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C) ▸ terminalIsTerminal)\n          (𝓖.obj (op U))) =\n    (if h : p₀ ∈ (op U).unop then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫\n          𝟙 (Presheaf.stalk 𝓕 p₀) ≫\n            eqToHom (_ : Presheaf.stalk 𝓕 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓕 p₀ else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓕 p₀ else ⊤_ C) ▸ terminalIsTerminal)\n          (𝓕.obj (op U))) ≫\n      NatTrans.app (SkyscraperPresheafFunctor.map' p₀ ((Presheaf.stalkFunctor C p₀).map f)) (op U)\n[PROOFSTEP]\ndsimp only [skyscraperPresheaf_obj, unop_op, Eq.ndrec, SkyscraperPresheafFunctor.map'_app]\n[GOAL]\ncase w\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 𝓖 : Presheaf C X\nf : 𝓕 ⟶ 𝓖\nU : Opens ↑X\n⊢ (NatTrans.app f (op U) ≫\n      if h : p₀ ∈ U then\n        Presheaf.germ 𝓖 { val := p₀, property := h } ≫\n          𝟙 (Presheaf.stalk 𝓖 p₀) ≫\n            eqToHom (_ : Presheaf.stalk 𝓖 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C) ▸ terminalIsTerminal)\n          (𝓖.obj (op U))) =\n    (if h : p₀ ∈ U then\n        Presheaf.germ 𝓕 { val := p₀, property := h } ≫\n          𝟙 (Presheaf.stalk 𝓕 p₀) ≫\n            eqToHom (_ : Presheaf.stalk 𝓕 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓕 p₀ else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓕 p₀ else ⊤_ C) ▸ terminalIsTerminal)\n          (𝓕.obj (op U))) ≫\n      if h : p₀ ∈ U then\n        eqToHom (_ : (if p₀ ∈ (op U).unop then Presheaf.stalk 𝓕 p₀ else ⊤_ C) = Presheaf.stalk 𝓕 p₀) ≫\n          (Presheaf.stalkFunctor C p₀).map f ≫\n            eqToHom (_ : Presheaf.stalk 𝓖 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C) ▸ terminalIsTerminal)\n          (if p₀ ∈ U then Presheaf.stalk 𝓕 p₀ else ⊤_ C)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 𝓖 : Presheaf C X\nf : 𝓕 ⟶ 𝓖\nU : Opens ↑X\nh : p₀ ∈ U\n⊢ NatTrans.app f (op U) ≫\n      Presheaf.germ 𝓖 { val := p₀, property := h } ≫\n        𝟙 (Presheaf.stalk 𝓖 p₀) ≫\n          eqToHom (_ : Presheaf.stalk 𝓖 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C) =\n    (Presheaf.germ 𝓕 { val := p₀, property := h } ≫\n        𝟙 (Presheaf.stalk 𝓕 p₀) ≫\n          eqToHom (_ : Presheaf.stalk 𝓕 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓕 p₀ else ⊤_ C)) ≫\n      eqToHom (_ : (if p₀ ∈ (op U).unop then Presheaf.stalk 𝓕 p₀ else ⊤_ C) = Presheaf.stalk 𝓕 p₀) ≫\n        (Presheaf.stalkFunctor C p₀).map f ≫\n          eqToHom (_ : Presheaf.stalk 𝓖 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C)\n[PROOFSTEP]\nsimp only [Category.id_comp, ← Category.assoc]\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 𝓖 : Presheaf C X\nf : 𝓕 ⟶ 𝓖\nU : Opens ↑X\nh : p₀ ∈ U\n⊢ (NatTrans.app f (op U) ≫ Presheaf.germ 𝓖 { val := p₀, property := h }) ≫\n      eqToHom (_ : Presheaf.stalk 𝓖 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C) =\n    (((Presheaf.germ 𝓕 { val := p₀, property := h } ≫\n            eqToHom (_ : Presheaf.stalk 𝓕 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓕 p₀ else ⊤_ C)) ≫\n          eqToHom (_ : (if p₀ ∈ (op U).unop then Presheaf.stalk 𝓕 p₀ else ⊤_ C) = Presheaf.stalk 𝓕 p₀)) ≫\n        (Presheaf.stalkFunctor C p₀).map f) ≫\n      eqToHom (_ : Presheaf.stalk 𝓖 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C)\n[PROOFSTEP]\nrw [comp_eqToHom_iff]\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 𝓖 : Presheaf C X\nf : 𝓕 ⟶ 𝓖\nU : Opens ↑X\nh : p₀ ∈ U\n⊢ NatTrans.app f (op U) ≫ Presheaf.germ 𝓖 { val := p₀, property := h } =\n    ((((Presheaf.germ 𝓕 { val := p₀, property := h } ≫\n              eqToHom (_ : Presheaf.stalk 𝓕 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓕 p₀ else ⊤_ C)) ≫\n            eqToHom (_ : (if p₀ ∈ (op U).unop then Presheaf.stalk 𝓕 p₀ else ⊤_ C) = Presheaf.stalk 𝓕 p₀)) ≫\n          (Presheaf.stalkFunctor C p₀).map f) ≫\n        eqToHom (_ : Presheaf.stalk 𝓖 p₀ = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C)) ≫\n      eqToHom (_ : (if p₀ ∈ U then Presheaf.stalk 𝓖 p₀ else ⊤_ C) = Presheaf.stalk 𝓖 p₀)\n[PROOFSTEP]\nsimp only [Category.assoc, eqToHom_trans, eqToHom_refl, Category.comp_id]\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 𝓖 : Presheaf C X\nf : 𝓕 ⟶ 𝓖\nU : Opens ↑X\nh : p₀ ∈ U\n⊢ NatTrans.app f (op U) ≫ Presheaf.germ 𝓖 { val := p₀, property := h } =\n    Presheaf.germ 𝓕 { val := p₀, property := h } ≫ (Presheaf.stalkFunctor C p₀).map f\n[PROOFSTEP]\nerw [colimit.ι_map]\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 𝓖 : Presheaf C X\nf : 𝓕 ⟶ 𝓖\nU : Opens ↑X\nh : p₀ ∈ U\n⊢ NatTrans.app f (op U) ≫ Presheaf.germ 𝓖 { val := p₀, property := h } =\n    NatTrans.app (((whiskeringLeft (OpenNhds p₀)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion p₀).op).map f)\n        (op { obj := U, property := (_ : ↑{ val := p₀, property := h } ∈ U) }) ≫\n      colimit.ι (((whiskeringLeft (OpenNhds p₀)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion p₀).op).obj 𝓖)\n        (op { obj := U, property := (_ : ↑{ val := p₀, property := h } ∈ U) })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 𝓖 : Presheaf C X\nf : 𝓕 ⟶ 𝓖\nU : Opens ↑X\nh : ¬p₀ ∈ U\n⊢ NatTrans.app f (op U) ≫\n      IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C) ▸ terminalIsTerminal)\n        (𝓖.obj (op U)) =\n    IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓕 p₀ else ⊤_ C) ▸ terminalIsTerminal)\n        (𝓕.obj (op U)) ≫\n      IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then Presheaf.stalk 𝓖 p₀ else ⊤_ C) ▸ terminalIsTerminal)\n        (if p₀ ∈ U then Presheaf.stalk 𝓕 p₀ else ⊤_ C)\n[PROOFSTEP]\napply ((if_neg h).symm.ndrec terminalIsTerminal).hom_ext\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\nx y : C\nf : x ⟶ y\nU : (OpenNhds p₀)ᵒᵖ\n⊢ colimit.ι\n        (((whiskeringLeft (OpenNhds p₀)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion p₀).op).obj\n          ((skyscraperPresheafFunctor p₀).obj x))\n        U ≫\n      (skyscraperPresheafFunctor p₀ ⋙ Presheaf.stalkFunctor C p₀).map f ≫\n        (fun c => (skyscraperPresheafStalkOfSpecializes p₀ c (_ : p₀ ⤳ p₀)).hom) y =\n    colimit.ι\n        (((whiskeringLeft (OpenNhds p₀)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion p₀).op).obj\n          ((skyscraperPresheafFunctor p₀).obj x))\n        U ≫\n      (fun c => (skyscraperPresheafStalkOfSpecializes p₀ c (_ : p₀ ⤳ p₀)).hom) x ≫ (𝟭 C).map f\n[PROOFSTEP]\nerw [← Category.assoc, colimit.ι_map, colimit.isoColimitCocone_ι_hom_assoc,\n  skyscraperPresheafCoconeOfSpecializes_ι_app (h := specializes_rfl), Category.assoc, colimit.ι_desc,\n  whiskeringLeft_obj_map, whiskerLeft_app, SkyscraperPresheafFunctor.map'_app, dif_pos U.unop.2,\n  skyscraperPresheafCoconeOfSpecializes_ι_app (h := specializes_rfl), comp_eqToHom_iff, Category.assoc,\n  eqToHom_comp_iff, ← Category.assoc, eqToHom_trans, eqToHom_refl, Category.id_comp, comp_eqToHom_iff, Category.assoc,\n  eqToHom_trans, eqToHom_refl, Category.comp_id, CategoryTheory.Functor.id_map]\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nα : (Presheaf.stalkFunctor C p₀).obj 𝓕 ⟶ c\n⊢ ↑((fun c 𝓕 =>\n            { toFun := toSkyscraperPresheaf p₀, invFun := fromStalk p₀,\n              left_inv := (_ : ∀ (f : Presheaf.stalk c p₀ ⟶ 𝓕), fromStalk p₀ (toSkyscraperPresheaf p₀ f) = f),\n              right_inv := (_ : ∀ (f : c ⟶ skyscraperPresheaf p₀ 𝓕), toSkyscraperPresheaf p₀ (fromStalk p₀ f) = f) })\n          𝓕 c)\n      α =\n    NatTrans.app (StalkSkyscraperPresheafAdjunctionAuxs.unit p₀) 𝓕 ≫ (skyscraperPresheafFunctor p₀).map α\n[PROOFSTEP]\next U\n[GOAL]\ncase w\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nα : (Presheaf.stalkFunctor C p₀).obj 𝓕 ⟶ c\nU : Opens ↑X\n⊢ NatTrans.app\n      (↑((fun c 𝓕 =>\n              { toFun := toSkyscraperPresheaf p₀, invFun := fromStalk p₀,\n                left_inv := (_ : ∀ (f : Presheaf.stalk c p₀ ⟶ 𝓕), fromStalk p₀ (toSkyscraperPresheaf p₀ f) = f),\n                right_inv := (_ : ∀ (f : c ⟶ skyscraperPresheaf p₀ 𝓕), toSkyscraperPresheaf p₀ (fromStalk p₀ f) = f) })\n            𝓕 c)\n        α)\n      (op U) =\n    NatTrans.app (NatTrans.app (StalkSkyscraperPresheafAdjunctionAuxs.unit p₀) 𝓕 ≫ (skyscraperPresheafFunctor p₀).map α)\n      (op U)\n[PROOFSTEP]\nrw [NatTrans.comp_app]\n[GOAL]\ncase w\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nα : (Presheaf.stalkFunctor C p₀).obj 𝓕 ⟶ c\nU : Opens ↑X\n⊢ NatTrans.app\n      (↑((fun c 𝓕 =>\n              { toFun := toSkyscraperPresheaf p₀, invFun := fromStalk p₀,\n                left_inv := (_ : ∀ (f : Presheaf.stalk c p₀ ⟶ 𝓕), fromStalk p₀ (toSkyscraperPresheaf p₀ f) = f),\n                right_inv := (_ : ∀ (f : c ⟶ skyscraperPresheaf p₀ 𝓕), toSkyscraperPresheaf p₀ (fromStalk p₀ f) = f) })\n            𝓕 c)\n        α)\n      (op U) =\n    NatTrans.app (NatTrans.app (StalkSkyscraperPresheafAdjunctionAuxs.unit p₀) 𝓕) (op U) ≫\n      NatTrans.app ((skyscraperPresheafFunctor p₀).map α) (op U)\n[PROOFSTEP]\nsimp only [Equiv.coe_fn_mk, toSkyscraperPresheaf_app, SkyscraperPresheafFunctor.map'_app, skyscraperPresheafFunctor_map,\n  unit_app]\n[GOAL]\ncase w\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nα : (Presheaf.stalkFunctor C p₀).obj 𝓕 ⟶ c\nU : Opens ↑X\n⊢ (if h : p₀ ∈ (op U).unop then\n      Presheaf.germ 𝓕 { val := p₀, property := (_ : p₀ ∈ (op U).unop) } ≫\n        α ≫ eqToHom (_ : c = if p₀ ∈ (op U).unop then c else ⊤_ C)\n    else IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj (op U))) =\n    (if h : p₀ ∈ (op U).unop then\n        Presheaf.germ 𝓕 { val := p₀, property := (_ : p₀ ∈ (op U).unop) } ≫\n          𝟙 (Presheaf.stalk ((𝟭 (Presheaf C X)).obj 𝓕) p₀) ≫\n            eqToHom\n              (_ :\n                (Presheaf.stalkFunctor C p₀).obj 𝓕 =\n                  if p₀ ∈ (op U).unop then (Presheaf.stalkFunctor C p₀).obj 𝓕 else ⊤_ C)\n      else\n        IsTerminal.from\n          ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then (Presheaf.stalkFunctor C p₀).obj 𝓕 else ⊤_ C) ▸ terminalIsTerminal)\n          (𝓕.obj (op U))) ≫\n      if h : p₀ ∈ (op U).unop then\n        eqToHom\n            (_ :\n              (if p₀ ∈ (op U).unop then (Presheaf.stalkFunctor C p₀).obj 𝓕 else ⊤_ C) =\n                (Presheaf.stalkFunctor C p₀).obj 𝓕) ≫\n          α ≫ eqToHom (_ : c = if p₀ ∈ (op U).unop then c else ⊤_ C)\n      else\n        IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then c else ⊤_ C) ▸ terminalIsTerminal)\n          ((skyscraperPresheaf p₀ ((Presheaf.stalkFunctor C p₀).obj 𝓕)).obj (op U))\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nα : (Presheaf.stalkFunctor C p₀).obj 𝓕 ⟶ c\nU : Opens ↑X\nh : p₀ ∈ (op U).unop\n⊢ Presheaf.germ 𝓕 { val := p₀, property := (_ : p₀ ∈ (op U).unop) } ≫\n      α ≫ eqToHom (_ : c = if p₀ ∈ (op U).unop then c else ⊤_ C) =\n    (Presheaf.germ 𝓕 { val := p₀, property := (_ : p₀ ∈ (op U).unop) } ≫\n        𝟙 (Presheaf.stalk ((𝟭 (Presheaf C X)).obj 𝓕) p₀) ≫\n          eqToHom\n            (_ :\n              (Presheaf.stalkFunctor C p₀).obj 𝓕 =\n                if p₀ ∈ (op U).unop then (Presheaf.stalkFunctor C p₀).obj 𝓕 else ⊤_ C)) ≫\n      eqToHom\n          (_ :\n            (if p₀ ∈ (op U).unop then (Presheaf.stalkFunctor C p₀).obj 𝓕 else ⊤_ C) =\n              (Presheaf.stalkFunctor C p₀).obj 𝓕) ≫\n        α ≫ eqToHom (_ : c = if p₀ ∈ (op U).unop then c else ⊤_ C)\n[PROOFSTEP]\nerw [Category.id_comp, ← Category.assoc, comp_eqToHom_iff, Category.assoc, Category.assoc, Category.assoc,\n  Category.assoc, eqToHom_trans, eqToHom_refl, Category.comp_id, ← Category.assoc _ _ α, eqToHom_trans, eqToHom_refl,\n  Category.id_comp]\n[GOAL]\ncase neg\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nα : (Presheaf.stalkFunctor C p₀).obj 𝓕 ⟶ c\nU : Opens ↑X\nh : ¬p₀ ∈ (op U).unop\n⊢ IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then c else ⊤_ C) ▸ terminalIsTerminal) (𝓕.obj (op U)) =\n    IsTerminal.from\n        ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then (Presheaf.stalkFunctor C p₀).obj 𝓕 else ⊤_ C) ▸ terminalIsTerminal)\n        (𝓕.obj (op U)) ≫\n      IsTerminal.from ((_ : (⊤_ C) = if p₀ ∈ (op U).unop then c else ⊤_ C) ▸ terminalIsTerminal)\n        ((skyscraperPresheaf p₀ ((Presheaf.stalkFunctor C p₀).obj 𝓕)).obj (op U))\n[PROOFSTEP]\napply ((if_neg h).symm.ndrec terminalIsTerminal).hom_ext\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nα : 𝓕 ⟶ (skyscraperPresheafFunctor p₀).obj c\n⊢ ↑((fun c 𝓕 =>\n              { toFun := toSkyscraperPresheaf p₀, invFun := fromStalk p₀,\n                left_inv := (_ : ∀ (f : Presheaf.stalk c p₀ ⟶ 𝓕), fromStalk p₀ (toSkyscraperPresheaf p₀ f) = f),\n                right_inv := (_ : ∀ (f : c ⟶ skyscraperPresheaf p₀ 𝓕), toSkyscraperPresheaf p₀ (fromStalk p₀ f) = f) })\n            𝓕 c).symm\n      α =\n    (Presheaf.stalkFunctor C p₀).map α ≫ NatTrans.app (StalkSkyscraperPresheafAdjunctionAuxs.counit p₀) c\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nα : 𝓕 ⟶ (skyscraperPresheafFunctor p₀).obj c\n⊢ fromStalk p₀ α = (Presheaf.stalkFunctor C p₀).map α ≫ (skyscraperPresheafStalkOfSpecializes p₀ c (_ : p₀ ⤳ p₀)).hom\n[PROOFSTEP]\next U\n[GOAL]\ncase ih\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nα : 𝓕 ⟶ (skyscraperPresheafFunctor p₀).obj c\nU : Opens ↑X\nhxU✝ : p₀ ∈ U\n⊢ Presheaf.germ 𝓕 { val := p₀, property := hxU✝ } ≫ fromStalk p₀ α =\n    Presheaf.germ 𝓕 { val := p₀, property := hxU✝ } ≫\n      (Presheaf.stalkFunctor C p₀).map α ≫ (skyscraperPresheafStalkOfSpecializes p₀ c (_ : p₀ ⤳ p₀)).hom\n[PROOFSTEP]\nsimp only [Equiv.coe_fn_symm_mk, counit_app]\n[GOAL]\ncase ih\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nα : 𝓕 ⟶ (skyscraperPresheafFunctor p₀).obj c\nU : Opens ↑X\nhxU✝ : p₀ ∈ U\n⊢ Presheaf.germ 𝓕 { val := p₀, property := hxU✝ } ≫ fromStalk p₀ α =\n    Presheaf.germ 𝓕 { val := p₀, property := hxU✝ } ≫\n      (Presheaf.stalkFunctor C p₀).map α ≫ (skyscraperPresheafStalkOfSpecializes p₀ c (_ : p₀ ⤳ p₀)).hom\n[PROOFSTEP]\nerw [colimit.ι_desc, ← Category.assoc, colimit.ι_map, whiskerLeft_app, Category.assoc, colimit.ι_desc]\n[GOAL]\ncase ih\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓕 : Presheaf C X\nc : C\nα : 𝓕 ⟶ (skyscraperPresheafFunctor p₀).obj c\nU : Opens ↑X\nhxU✝ : p₀ ∈ U\n⊢ NatTrans.app\n      { pt := c,\n          ι :=\n            NatTrans.mk fun U =>\n              NatTrans.app α (op U.unop.obj) ≫ eqToHom (_ : (if p₀ ∈ U.unop.obj then c else ⊤_ C) = c) }.ι\n      (op { obj := U, property := (_ : ↑{ val := p₀, property := hxU✝ } ∈ U) }) =\n    NatTrans.app α\n        ((OpenNhds.inclusion p₀).op.obj (op { obj := U, property := (_ : ↑{ val := p₀, property := hxU✝ } ∈ U) })) ≫\n      NatTrans.app\n        { cocone := skyscraperPresheafCoconeOfSpecializes p₀ c (_ : p₀ ⤳ p₀),\n              isColimit := skyscraperPresheafCoconeIsColimitOfSpecializes p₀ c (_ : p₀ ⤳ p₀) }.cocone.ι\n        (op { obj := U, property := (_ : ↑{ val := p₀, property := hxU✝ } ∈ U) })\n[PROOFSTEP]\nrfl\n[GOAL]\nX : TopCat\np₀ : ↑X\ninst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)\nC : Type v\ninst✝² : Category.{u, v} C\nA : C\ninst✝¹ : HasTerminal C\ninst✝ : HasColimits C\n𝓐 𝓑 : TopCat.Sheaf C X\nf : 𝓐 ⟶ 𝓑\n⊢ ((𝟭 (TopCat.Sheaf C X)).map f ≫\n        (fun 𝓕 => { val := NatTrans.app (StalkSkyscraperPresheafAdjunctionAuxs.unit p₀) 𝓕.val }) 𝓑).val =\n    ((fun 𝓕 => { val := NatTrans.app (StalkSkyscraperPresheafAdjunctionAuxs.unit p₀) 𝓕.val }) 𝓐 ≫\n        ((Sheaf.forget C X ⋙ Presheaf.stalkFunctor C p₀) ⋙ skyscraperSheafFunctor p₀).map f).val\n[PROOFSTEP]\napply (StalkSkyscraperPresheafAdjunctionAuxs.unit p₀).naturality\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sheaves.Skyscraper", "llama_tokens": 42654, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850278370112, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.3666703706758788}}
{"text": "[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf f₀ f₁ g : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nh : HasDerivAt f f' x\nhf' : f' ≠ 0\nz : 𝕜\n⊢ ‖z‖ ≤ ‖f'‖⁻¹ * ‖↑(ContinuousLinearMap.smulRight 1 f') z‖\n[PROOFSTEP]\nfield_simp [norm_smul, mt norm_eq_zero.1 hf']\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf✝ f₀ f₁ g✝ : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns✝ t✝ : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf g : 𝕜 → 𝕜\na : 𝕜\ns t : Set 𝕜\nha : a ∈ s\nhsu : UniqueDiffWithinAt 𝕜 s a\nhf : HasDerivWithinAt f 0 t (g a)\nhst : MapsTo g s t\nhfg : f ∘ g =ᶠ[𝓝[s] a] id\n⊢ ¬DifferentiableWithinAt 𝕜 g s a\n[PROOFSTEP]\nintro hg\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf✝ f₀ f₁ g✝ : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns✝ t✝ : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf g : 𝕜 → 𝕜\na : 𝕜\ns t : Set 𝕜\nha : a ∈ s\nhsu : UniqueDiffWithinAt 𝕜 s a\nhf : HasDerivWithinAt f 0 t (g a)\nhst : MapsTo g s t\nhfg : f ∘ g =ᶠ[𝓝[s] a] id\nhg : DifferentiableWithinAt 𝕜 g s a\n⊢ False\n[PROOFSTEP]\nhave := (hf.comp a hg.hasDerivWithinAt hst).congr_of_eventuallyEq_of_mem hfg.symm ha\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf✝ f₀ f₁ g✝ : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns✝ t✝ : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf g : 𝕜 → 𝕜\na : 𝕜\ns t : Set 𝕜\nha : a ∈ s\nhsu : UniqueDiffWithinAt 𝕜 s a\nhf : HasDerivWithinAt f 0 t (g a)\nhst : MapsTo g s t\nhfg : f ∘ g =ᶠ[𝓝[s] a] id\nhg : DifferentiableWithinAt 𝕜 g s a\nthis : HasDerivWithinAt id (0 * derivWithin g s a) s a\n⊢ False\n[PROOFSTEP]\nsimpa using hsu.eq_deriv _ this (hasDerivWithinAt_id _ _)\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf✝ f₀ f₁ g✝ : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf g : 𝕜 → 𝕜\na : 𝕜\nhf : HasDerivAt f 0 (g a)\nhfg : f ∘ g =ᶠ[𝓝 a] id\n⊢ ¬DifferentiableAt 𝕜 g a\n[PROOFSTEP]\nintro hg\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf✝ f₀ f₁ g✝ : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf g : 𝕜 → 𝕜\na : 𝕜\nhf : HasDerivAt f 0 (g a)\nhfg : f ∘ g =ᶠ[𝓝 a] id\nhg : DifferentiableAt 𝕜 g a\n⊢ False\n[PROOFSTEP]\nhave := (hf.comp a hg.hasDerivAt).congr_of_eventuallyEq hfg.symm\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type v\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type w\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf✝ f₀ f₁ g✝ : 𝕜 → F\nf' f₀' f₁' g' : F\nx : 𝕜\ns t : Set 𝕜\nL L₁ L₂ : Filter 𝕜\nf g : 𝕜 → 𝕜\na : 𝕜\nhf : HasDerivAt f 0 (g a)\nhfg : f ∘ g =ᶠ[𝓝 a] id\nhg : DifferentiableAt 𝕜 g a\nthis : HasDerivAt id (0 * deriv g a) a\n⊢ False\n[PROOFSTEP]\nsimpa using this.unique (hasDerivAt_id a)\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.Deriv.Inverse", "llama_tokens": 1791, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6654105454764747, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.366379947444169}}
{"text": "[GOAL]\nc : ℝ\n⊢ IntegrableOn exp (Iic c)\n[PROOFSTEP]\nrefine'\n  integrableOn_Iic_of_intervalIntegral_norm_bounded (exp c) c (fun y => intervalIntegrable_exp.1) tendsto_id\n    (eventually_of_mem (Iic_mem_atBot 0) fun y _ => _)\n[GOAL]\nc y : ℝ\nx✝ : y ∈ Iic 0\n⊢ ∫ (x : ℝ) in id y..c, ‖exp x‖ ≤ exp c\n[PROOFSTEP]\nsimp_rw [norm_of_nonneg (exp_pos _).le, integral_exp, sub_le_self_iff]\n[GOAL]\nc y : ℝ\nx✝ : y ∈ Iic 0\n⊢ 0 ≤ exp (id y)\n[PROOFSTEP]\nexact (exp_pos _).le\n[GOAL]\nc : ℝ\n⊢ ∫ (x : ℝ) in Iic c, exp x = exp c\n[PROOFSTEP]\nrefine' tendsto_nhds_unique (intervalIntegral_tendsto_integral_Iic _ (integrableOn_exp_Iic _) tendsto_id) _\n[GOAL]\nc : ℝ\n⊢ Tendsto (fun i => ∫ (x : ℝ) in id i..c, exp x) atBot (𝓝 (exp c))\n[PROOFSTEP]\nsimp_rw [integral_exp, show 𝓝 (exp c) = 𝓝 (exp c - 0) by rw [sub_zero]]\n[GOAL]\nc : ℝ\n⊢ 𝓝 (exp c) = 𝓝 (exp c - 0)\n[PROOFSTEP]\nrw [sub_zero]\n[GOAL]\nc : ℝ\n⊢ Tendsto (fun i => exp c - exp (id i)) atBot (𝓝 (exp c - 0))\n[PROOFSTEP]\nexact tendsto_exp_atBot.const_sub _\n[GOAL]\nc : ℝ\n⊢ ∫ (x : ℝ) in Ioi c, exp (-x) = exp (-c)\n[PROOFSTEP]\nsimpa only [integral_comp_neg_Ioi] using integral_exp_Iic (-c)\n[GOAL]\n⊢ ∫ (x : ℝ) in Ioi 0, exp (-x) = 1\n[PROOFSTEP]\nsimpa only [neg_zero, exp_zero] using integral_exp_neg_Ioi 0\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\n⊢ IntegrableOn (fun t => t ^ a) (Ioi c)\n[PROOFSTEP]\nhave hd : ∀ (x : ℝ) (_ : x ∈ Ici c), HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x :=\n  by\n  intro x hx\n  convert (hasDerivAt_rpow_const (p := a + 1) (Or.inl (hc.trans_le hx).ne')).div_const _ using 1\n  field_simp [show a + 1 ≠ 0 from ne_of_lt (by linarith), mul_comm]\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\n⊢ ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nx : ℝ\nhx : x ∈ Ici c\n⊢ HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\n[PROOFSTEP]\nconvert (hasDerivAt_rpow_const (p := a + 1) (Or.inl (hc.trans_le hx).ne')).div_const _ using 1\n[GOAL]\ncase h.e'_7\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nx : ℝ\nhx : x ∈ Ici c\n⊢ x ^ a = (a + 1) * x ^ (a + 1 - 1) / (a + 1)\n[PROOFSTEP]\nfield_simp [show a + 1 ≠ 0 from ne_of_lt (by linarith), mul_comm]\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nx : ℝ\nhx : x ∈ Ici c\n⊢ a + 1 < 0\n[PROOFSTEP]\nlinarith\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nhd : ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\n⊢ IntegrableOn (fun t => t ^ a) (Ioi c)\n[PROOFSTEP]\nhave ht : Tendsto (fun t => t ^ (a + 1) / (a + 1)) atTop (𝓝 (0 / (a + 1))) :=\n  by\n  apply Tendsto.div_const\n  simpa only [neg_neg] using tendsto_rpow_neg_atTop (by linarith : 0 < -(a + 1))\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nhd : ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\n⊢ Tendsto (fun t => t ^ (a + 1) / (a + 1)) atTop (𝓝 (0 / (a + 1)))\n[PROOFSTEP]\napply Tendsto.div_const\n[GOAL]\ncase hf\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nhd : ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\n⊢ Tendsto (fun a_1 => a_1 ^ (a + 1)) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa only [neg_neg] using tendsto_rpow_neg_atTop (by linarith : 0 < -(a + 1))\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nhd : ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\n⊢ 0 < -(a + 1)\n[PROOFSTEP]\nlinarith\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nhd : ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\nht : Tendsto (fun t => t ^ (a + 1) / (a + 1)) atTop (𝓝 (0 / (a + 1)))\n⊢ IntegrableOn (fun t => t ^ a) (Ioi c)\n[PROOFSTEP]\nexact integrableOn_Ioi_deriv_of_nonneg' hd (fun t ht => rpow_nonneg_of_nonneg (hc.trans ht).le a) ht\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\n⊢ ∫ (t : ℝ) in Ioi c, t ^ a = -c ^ (a + 1) / (a + 1)\n[PROOFSTEP]\nhave hd : ∀ (x : ℝ) (_ : x ∈ Ici c), HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x :=\n  by\n  intro x hx\n  convert (hasDerivAt_rpow_const (p := a + 1) (Or.inl (hc.trans_le hx).ne')).div_const _ using 1\n  field_simp [show a + 1 ≠ 0 from ne_of_lt (by linarith), mul_comm]\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\n⊢ ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nx : ℝ\nhx : x ∈ Ici c\n⊢ HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\n[PROOFSTEP]\nconvert (hasDerivAt_rpow_const (p := a + 1) (Or.inl (hc.trans_le hx).ne')).div_const _ using 1\n[GOAL]\ncase h.e'_7\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nx : ℝ\nhx : x ∈ Ici c\n⊢ x ^ a = (a + 1) * x ^ (a + 1 - 1) / (a + 1)\n[PROOFSTEP]\nfield_simp [show a + 1 ≠ 0 from ne_of_lt (by linarith), mul_comm]\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nx : ℝ\nhx : x ∈ Ici c\n⊢ a + 1 < 0\n[PROOFSTEP]\nlinarith\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nhd : ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\n⊢ ∫ (t : ℝ) in Ioi c, t ^ a = -c ^ (a + 1) / (a + 1)\n[PROOFSTEP]\nhave ht : Tendsto (fun t => t ^ (a + 1) / (a + 1)) atTop (𝓝 (0 / (a + 1))) :=\n  by\n  apply Tendsto.div_const\n  simpa only [neg_neg] using tendsto_rpow_neg_atTop (by linarith : 0 < -(a + 1))\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nhd : ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\n⊢ Tendsto (fun t => t ^ (a + 1) / (a + 1)) atTop (𝓝 (0 / (a + 1)))\n[PROOFSTEP]\napply Tendsto.div_const\n[GOAL]\ncase hf\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nhd : ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\n⊢ Tendsto (fun a_1 => a_1 ^ (a + 1)) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa only [neg_neg] using tendsto_rpow_neg_atTop (by linarith : 0 < -(a + 1))\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nhd : ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\n⊢ 0 < -(a + 1)\n[PROOFSTEP]\nlinarith\n[GOAL]\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nhd : ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\nht : Tendsto (fun t => t ^ (a + 1) / (a + 1)) atTop (𝓝 (0 / (a + 1)))\n⊢ ∫ (t : ℝ) in Ioi c, t ^ a = -c ^ (a + 1) / (a + 1)\n[PROOFSTEP]\nconvert integral_Ioi_of_hasDerivAt_of_tendsto' hd (integrableOn_Ioi_rpow_of_lt ha hc) ht using 1\n[GOAL]\ncase h.e'_3\na : ℝ\nha : a < -1\nc : ℝ\nhc : 0 < c\nhd : ∀ (x : ℝ), x ∈ Ici c → HasDerivAt (fun t => t ^ (a + 1) / (a + 1)) (x ^ a) x\nht : Tendsto (fun t => t ^ (a + 1) / (a + 1)) atTop (𝓝 (0 / (a + 1)))\n⊢ -c ^ (a + 1) / (a + 1) = 0 / (a + 1) - c ^ (a + 1) / (a + 1)\n[PROOFSTEP]\nsimp only [neg_div, zero_div, zero_sub]\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\n⊢ IntegrableOn (fun t => ↑t ^ a) (Ioi c)\n[PROOFSTEP]\nrw [IntegrableOn, ← integrable_norm_iff, ← IntegrableOn]\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\n⊢ IntegrableOn (fun a_1 => ‖↑a_1 ^ a‖) (Ioi c)\na : ℂ ha : a.re < -1 c : ℝ hc : 0 < c ⊢ AEStronglyMeasurable (fun t => ↑t ^ a) (Measure.restrict volume (Ioi c))\n[PROOFSTEP]\nrefine' (integrableOn_Ioi_rpow_of_lt ha hc).congr_fun (fun x hx => _) measurableSet_Ioi\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\nx : ℝ\nhx : x ∈ Ioi c\n⊢ x ^ a.re = ‖↑x ^ a‖\n[PROOFSTEP]\ndsimp only\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\nx : ℝ\nhx : x ∈ Ioi c\n⊢ x ^ a.re = ‖↑x ^ a‖\n[PROOFSTEP]\nrw [Complex.norm_eq_abs, Complex.abs_cpow_eq_rpow_re_of_pos (hc.trans hx)]\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\n⊢ AEStronglyMeasurable (fun t => ↑t ^ a) (Measure.restrict volume (Ioi c))\n[PROOFSTEP]\nrefine' ContinuousOn.aestronglyMeasurable (fun t ht => _) measurableSet_Ioi\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\nt : ℝ\nht : t ∈ Ioi c\n⊢ ContinuousWithinAt (fun t => ↑t ^ a) (Ioi c) t\n[PROOFSTEP]\nexact (Complex.continuousAt_ofReal_cpow_const _ _ (Or.inr (hc.trans ht).ne')).continuousWithinAt\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\n⊢ ∫ (t : ℝ) in Ioi c, ↑t ^ a = -↑c ^ (a + 1) / (a + 1)\n[PROOFSTEP]\nrefine' tendsto_nhds_unique (intervalIntegral_tendsto_integral_Ioi c (integrableOn_Ioi_cpow_of_lt ha hc) tendsto_id) _\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\n⊢ Tendsto (fun i => ∫ (x : ℝ) in c..id i, ↑x ^ a) atTop (𝓝 (-↑c ^ (a + 1) / (a + 1)))\n[PROOFSTEP]\nsuffices Tendsto (fun x : ℝ => ((x : ℂ) ^ (a + 1) - (c : ℂ) ^ (a + 1)) / (a + 1)) atTop (𝓝 <| -c ^ (a + 1) / (a + 1))\n  by\n  refine' this.congr' ((eventually_gt_atTop 0).mp (eventually_of_forall fun x hx => _))\n  dsimp only\n  rw [integral_cpow, id.def]\n  refine' Or.inr ⟨_, not_mem_uIcc_of_lt hc hx⟩\n  apply_fun Complex.re\n  rw [Complex.neg_re, Complex.one_re]\n  exact ha.ne\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\nthis : Tendsto (fun x => (↑x ^ (a + 1) - ↑c ^ (a + 1)) / (a + 1)) atTop (𝓝 (-↑c ^ (a + 1) / (a + 1)))\n⊢ Tendsto (fun i => ∫ (x : ℝ) in c..id i, ↑x ^ a) atTop (𝓝 (-↑c ^ (a + 1) / (a + 1)))\n[PROOFSTEP]\nrefine' this.congr' ((eventually_gt_atTop 0).mp (eventually_of_forall fun x hx => _))\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\nthis : Tendsto (fun x => (↑x ^ (a + 1) - ↑c ^ (a + 1)) / (a + 1)) atTop (𝓝 (-↑c ^ (a + 1) / (a + 1)))\nx : ℝ\nhx : 0 < x\n⊢ (↑x ^ (a + 1) - ↑c ^ (a + 1)) / (a + 1) = (fun i => ∫ (x : ℝ) in c..id i, ↑x ^ a) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\nthis : Tendsto (fun x => (↑x ^ (a + 1) - ↑c ^ (a + 1)) / (a + 1)) atTop (𝓝 (-↑c ^ (a + 1) / (a + 1)))\nx : ℝ\nhx : 0 < x\n⊢ (↑x ^ (a + 1) - ↑c ^ (a + 1)) / (a + 1) = ∫ (x : ℝ) in c..id x, ↑x ^ a\n[PROOFSTEP]\nrw [integral_cpow, id.def]\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\nthis : Tendsto (fun x => (↑x ^ (a + 1) - ↑c ^ (a + 1)) / (a + 1)) atTop (𝓝 (-↑c ^ (a + 1) / (a + 1)))\nx : ℝ\nhx : 0 < x\n⊢ -1 < a.re ∨ a ≠ -1 ∧ ¬0 ∈ uIcc c (id x)\n[PROOFSTEP]\nrefine' Or.inr ⟨_, not_mem_uIcc_of_lt hc hx⟩\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\nthis : Tendsto (fun x => (↑x ^ (a + 1) - ↑c ^ (a + 1)) / (a + 1)) atTop (𝓝 (-↑c ^ (a + 1) / (a + 1)))\nx : ℝ\nhx : 0 < x\n⊢ a ≠ -1\n[PROOFSTEP]\napply_fun Complex.re\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\nthis : Tendsto (fun x => (↑x ^ (a + 1) - ↑c ^ (a + 1)) / (a + 1)) atTop (𝓝 (-↑c ^ (a + 1) / (a + 1)))\nx : ℝ\nhx : 0 < x\n⊢ a.re ≠ (-1).re\n[PROOFSTEP]\nrw [Complex.neg_re, Complex.one_re]\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\nthis : Tendsto (fun x => (↑x ^ (a + 1) - ↑c ^ (a + 1)) / (a + 1)) atTop (𝓝 (-↑c ^ (a + 1) / (a + 1)))\nx : ℝ\nhx : 0 < x\n⊢ a.re ≠ -1\n[PROOFSTEP]\nexact ha.ne\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\n⊢ Tendsto (fun x => (↑x ^ (a + 1) - ↑c ^ (a + 1)) / (a + 1)) atTop (𝓝 (-↑c ^ (a + 1) / (a + 1)))\n[PROOFSTEP]\nsimp_rw [← zero_sub, sub_div]\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\n⊢ Tendsto (fun x => ↑x ^ (a + 1) / (a + 1) - ↑c ^ (a + 1) / (a + 1)) atTop (𝓝 (0 / (a + 1) - ↑c ^ (a + 1) / (a + 1)))\n[PROOFSTEP]\nrefine' (Tendsto.div_const _ _).sub_const _\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\n⊢ Tendsto (fun x => ↑x ^ (a + 1)) atTop (𝓝 0)\n[PROOFSTEP]\nrw [tendsto_zero_iff_norm_tendsto_zero]\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\n⊢ Tendsto (fun e => ‖↑e ^ (a + 1)‖) atTop (𝓝 0)\n[PROOFSTEP]\nrefine'\n  (tendsto_rpow_neg_atTop (by linarith : 0 < -(a.re + 1))).congr'\n    ((eventually_gt_atTop 0).mp (eventually_of_forall fun x hx => _))\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\n⊢ 0 < -(a.re + 1)\n[PROOFSTEP]\nlinarith\n[GOAL]\na : ℂ\nha : a.re < -1\nc : ℝ\nhc : 0 < c\nx : ℝ\nhx : 0 < x\n⊢ x ^ (- -(a.re + 1)) = (fun e => ‖↑e ^ (a + 1)‖) x\n[PROOFSTEP]\nsimp_rw [neg_neg, Complex.norm_eq_abs, Complex.abs_cpow_eq_rpow_re_of_pos hx, Complex.add_re, Complex.one_re]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "llama_tokens": 6371, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6513548646660543, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.36617639865290497}}
{"text": "[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\n⊢ CutExpand r ≤ InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) ↑toFinsupp\n[PROOFSTEP]\nrintro s t ⟨u, a, hr, he⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t u : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ u → r a' a\nhe : s + {a} = t + u\n⊢ InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) (↑toFinsupp) s t\n[PROOFSTEP]\nreplace hr := fun a' ↦ mt (hr a')\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t u : Multiset α\na : α\nhe : s + {a} = t + u\nhr : ∀ (a' : α), ¬r a' a → ¬a' ∈ u\n⊢ InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) (↑toFinsupp) s t\n[PROOFSTEP]\nclassical\nrefine ⟨a, fun b h ↦ ?_, ?_⟩ <;> simp_rw [toFinsupp_apply]\n· apply_fun count b at he \n  simpa only [count_add, count_singleton, if_neg h.2, add_zero, count_eq_zero.2 (hr b h.1)] using he\n· apply_fun count a at he \n  simp only [count_add, count_singleton_self, count_eq_zero.2 (hr _ (irrefl_of r a)), add_zero] at he \n  exact he ▸ Nat.lt_succ_self _\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t u : Multiset α\na : α\nhe : s + {a} = t + u\nhr : ∀ (a' : α), ¬r a' a → ¬a' ∈ u\n⊢ InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) (↑toFinsupp) s t\n[PROOFSTEP]\nrefine ⟨a, fun b h ↦ ?_, ?_⟩\n[GOAL]\ncase intro.intro.intro.refine_1\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t u : Multiset α\na : α\nhe : s + {a} = t + u\nhr : ∀ (a' : α), ¬r a' a → ¬a' ∈ u\nb : α\nh : (rᶜ ⊓ fun x x_1 => x ≠ x_1) b a\n⊢ ↑(↑toFinsupp s) b = ↑(↑toFinsupp t) b\n[PROOFSTEP]\nsimp_rw [toFinsupp_apply]\n[GOAL]\ncase intro.intro.intro.refine_2\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t u : Multiset α\na : α\nhe : s + {a} = t + u\nhr : ∀ (a' : α), ¬r a' a → ¬a' ∈ u\n⊢ (fun {i} x x_1 => x < x_1) (↑(↑toFinsupp s) a) (↑(↑toFinsupp t) a)\n[PROOFSTEP]\nsimp_rw [toFinsupp_apply]\n[GOAL]\ncase intro.intro.intro.refine_1\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t u : Multiset α\na : α\nhe : s + {a} = t + u\nhr : ∀ (a' : α), ¬r a' a → ¬a' ∈ u\nb : α\nh : (rᶜ ⊓ fun x x_1 => x ≠ x_1) b a\n⊢ count b s = count b t\n[PROOFSTEP]\napply_fun count b at he \n[GOAL]\ncase intro.intro.intro.refine_1\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t u : Multiset α\na : α\nhr : ∀ (a' : α), ¬r a' a → ¬a' ∈ u\nb : α\nh : (rᶜ ⊓ fun x x_1 => x ≠ x_1) b a\nhe : count b (s + {a}) = count b (t + u)\n⊢ count b s = count b t\n[PROOFSTEP]\nsimpa only [count_add, count_singleton, if_neg h.2, add_zero, count_eq_zero.2 (hr b h.1)] using he\n[GOAL]\ncase intro.intro.intro.refine_2\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t u : Multiset α\na : α\nhe : s + {a} = t + u\nhr : ∀ (a' : α), ¬r a' a → ¬a' ∈ u\n⊢ count a s < count a t\n[PROOFSTEP]\napply_fun count a at he \n[GOAL]\ncase intro.intro.intro.refine_2\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t u : Multiset α\na : α\nhr : ∀ (a' : α), ¬r a' a → ¬a' ∈ u\nhe : count a (s + {a}) = count a (t + u)\n⊢ count a s < count a t\n[PROOFSTEP]\nsimp only [count_add, count_singleton_self, count_eq_zero.2 (hr _ (irrefl_of r a)), add_zero] at he \n[GOAL]\ncase intro.intro.intro.refine_2\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t u : Multiset α\na : α\nhr : ∀ (a' : α), ¬r a' a → ¬a' ∈ u\nhe : count a s + 1 = count a t\n⊢ count a s < count a t\n[PROOFSTEP]\nexact he ▸ Nat.lt_succ_self _\n[GOAL]\nα : Type u_1\nr : α → α → Prop\nx' x : α\nh✝ : r x' x\na : α\nh : a ∈ {x'}\n⊢ r a x\n[PROOFSTEP]\nrwa [mem_singleton.1 h]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\nt u s x✝¹ : Multiset α\nx✝ : α\n⊢ s + t + {x✝} = s + u + x✝¹ ↔ t + {x✝} = u + x✝¹\n[PROOFSTEP]\nrw [add_assoc, add_assoc, add_left_cancel_iff]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns' s : Multiset α\n⊢ CutExpand r s' s ↔ ∃ t a, (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ s' = erase s a + t\n[PROOFSTEP]\nsimp_rw [CutExpand, add_singleton_eq_iff]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns' s : Multiset α\n⊢ (∃ t a, (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s + t ∧ s' = erase (s + t) a) ↔\n    ∃ t a, (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ s' = erase s a + t\n[PROOFSTEP]\nrefine' exists₂_congr fun t a ↦ ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns' s t : Multiset α\na : α\n⊢ (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s + t ∧ s' = erase (s + t) a →\n    (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ s' = erase s a + t\n[PROOFSTEP]\nrintro ⟨ht, ha, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t : Multiset α\na : α\nht : ∀ (a' : α), a' ∈ t → r a' a\nha : a ∈ s + t\n⊢ (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ erase (s + t) a = erase s a + t\n[PROOFSTEP]\nobtain h | h := mem_add.1 ha\n[GOAL]\ncase refine'_1.intro.intro.inl\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t : Multiset α\na : α\nht : ∀ (a' : α), a' ∈ t → r a' a\nha : a ∈ s + t\nh : a ∈ s\n⊢ (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ erase (s + t) a = erase s a + t\ncase refine'_1.intro.intro.inr\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t : Multiset α\na : α\nht : ∀ (a' : α), a' ∈ t → r a' a\nha : a ∈ s + t\nh : a ∈ t\n⊢ (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ erase (s + t) a = erase s a + t\n[PROOFSTEP]\nexacts [⟨ht, h, erase_add_left_pos t h⟩, (@irrefl α r _ a (ht a h)).elim]\n[GOAL]\ncase refine'_2\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns' s t : Multiset α\na : α\n⊢ (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ s' = erase s a + t →\n    (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s + t ∧ s' = erase (s + t) a\n[PROOFSTEP]\nrintro ⟨ht, h, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nr : α → α → Prop\ninst✝¹ : DecidableEq α\ninst✝ : IsIrrefl α r\ns t : Multiset α\na : α\nht : ∀ (a' : α), a' ∈ t → r a' a\nh : a ∈ s\n⊢ (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s + t ∧ erase s a + t = erase (s + t) a\n[PROOFSTEP]\nexact ⟨ht, mem_add.2 (Or.inl h), (erase_add_left_pos t h).symm⟩\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\ns : Multiset α\n⊢ ¬CutExpand r s 0\n[PROOFSTEP]\nclassical\nrw [cutExpand_iff]\nrintro ⟨_, _, _, ⟨⟩, _⟩\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\ns : Multiset α\n⊢ ¬CutExpand r s 0\n[PROOFSTEP]\nrw [cutExpand_iff]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\ns : Multiset α\n⊢ ¬∃ t a, (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ 0 ∧ s = erase 0 a + t\n[PROOFSTEP]\nrintro ⟨_, _, _, ⟨⟩, _⟩\n[GOAL]\nα : Type u_1\nr✝ r : α → α → Prop\n⊢ Fibration (GameAdd (CutExpand r) (CutExpand r)) (CutExpand r) fun s => s.fst + s.snd\n[PROOFSTEP]\nrintro ⟨s₁, s₂⟩ s ⟨t, a, hr, he⟩\n[GOAL]\ncase mk.intro.intro.intro\nα : Type u_1\nr✝ r : α → α → Prop\ns₁ s₂ s t : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nhe : s + {a} = (fun s => s.fst + s.snd) (s₁, s₂) + t\n⊢ ∃ a', GameAdd (CutExpand r) (CutExpand r) a' (s₁, s₂) ∧ (fun s => s.fst + s.snd) a' = s\n[PROOFSTEP]\ndsimp at he ⊢\n[GOAL]\ncase mk.intro.intro.intro\nα : Type u_1\nr✝ r : α → α → Prop\ns₁ s₂ s t : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nhe : s + {a} = s₁ + s₂ + t\n⊢ ∃ a', GameAdd (CutExpand r) (CutExpand r) a' (s₁, s₂) ∧ a'.fst + a'.snd = s\n[PROOFSTEP]\nclassical\n  -- Porting note: Originally `obtain ⟨ha, rfl⟩`\n    -- This is https://github.com/leanprover/std4/issues/62\nobtain ⟨ha, hb⟩ := add_singleton_eq_iff.1 he\nrw [hb]\nrw [add_assoc, mem_add] at ha \nobtain h | h := ha\n· refine' ⟨(s₁.erase a + t, s₂), GameAdd.fst ⟨t, a, hr, _⟩, _⟩\n  · rw [add_comm, ← add_assoc, singleton_add, cons_erase h]\n  · rw [add_assoc s₁, erase_add_left_pos _ h, add_right_comm, add_assoc]\n· refine' ⟨(s₁, (s₂ + t).erase a), GameAdd.snd ⟨t, a, hr, _⟩, _⟩\n  · rw [add_comm, singleton_add, cons_erase h]\n  · rw [add_assoc, erase_add_right_pos _ h]\n[GOAL]\ncase mk.intro.intro.intro\nα : Type u_1\nr✝ r : α → α → Prop\ns₁ s₂ s t : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nhe : s + {a} = s₁ + s₂ + t\n⊢ ∃ a', GameAdd (CutExpand r) (CutExpand r) a' (s₁, s₂) ∧ a'.fst + a'.snd = s\n[PROOFSTEP]\nobtain ⟨ha, hb⟩ := add_singleton_eq_iff.1 he\n[GOAL]\ncase mk.intro.intro.intro.intro\nα : Type u_1\nr✝ r : α → α → Prop\ns₁ s₂ s t : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nhe : s + {a} = s₁ + s₂ + t\nha : a ∈ s₁ + s₂ + t\nhb : s = erase (s₁ + s₂ + t) a\n⊢ ∃ a', GameAdd (CutExpand r) (CutExpand r) a' (s₁, s₂) ∧ a'.fst + a'.snd = s\n[PROOFSTEP]\nrw [hb]\n[GOAL]\ncase mk.intro.intro.intro.intro\nα : Type u_1\nr✝ r : α → α → Prop\ns₁ s₂ s t : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nhe : s + {a} = s₁ + s₂ + t\nha : a ∈ s₁ + s₂ + t\nhb : s = erase (s₁ + s₂ + t) a\n⊢ ∃ a', GameAdd (CutExpand r) (CutExpand r) a' (s₁, s₂) ∧ a'.fst + a'.snd = erase (s₁ + s₂ + t) a\n[PROOFSTEP]\nrw [add_assoc, mem_add] at ha \n[GOAL]\ncase mk.intro.intro.intro.intro\nα : Type u_1\nr✝ r : α → α → Prop\ns₁ s₂ s t : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nhe : s + {a} = s₁ + s₂ + t\nha : a ∈ s₁ ∨ a ∈ s₂ + t\nhb : s = erase (s₁ + s₂ + t) a\n⊢ ∃ a', GameAdd (CutExpand r) (CutExpand r) a' (s₁, s₂) ∧ a'.fst + a'.snd = erase (s₁ + s₂ + t) a\n[PROOFSTEP]\nobtain h | h := ha\n[GOAL]\ncase mk.intro.intro.intro.intro.inl\nα : Type u_1\nr✝ r : α → α → Prop\ns₁ s₂ s t : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nhe : s + {a} = s₁ + s₂ + t\nhb : s = erase (s₁ + s₂ + t) a\nh : a ∈ s₁\n⊢ ∃ a', GameAdd (CutExpand r) (CutExpand r) a' (s₁, s₂) ∧ a'.fst + a'.snd = erase (s₁ + s₂ + t) a\n[PROOFSTEP]\nrefine' ⟨(s₁.erase a + t, s₂), GameAdd.fst ⟨t, a, hr, _⟩, _⟩\n[GOAL]\ncase mk.intro.intro.intro.intro.inl.refine'_1\nα : Type u_1\nr✝ r : α → α → Prop\ns₁ s₂ s t : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nhe : s + {a} = s₁ + s₂ + t\nhb : s = erase (s₁ + s₂ + t) a\nh : a ∈ s₁\n⊢ erase s₁ a + t + {a} = s₁ + t\n[PROOFSTEP]\nrw [add_comm, ← add_assoc, singleton_add, cons_erase h]\n[GOAL]\ncase mk.intro.intro.intro.intro.inl.refine'_2\nα : Type u_1\nr✝ r : α → α → Prop\ns₁ s₂ s t : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nhe : s + {a} = s₁ + s₂ + t\nhb : s = erase (s₁ + s₂ + t) a\nh : a ∈ s₁\n⊢ (erase s₁ a + t, s₂).fst + (erase s₁ a + t, s₂).snd = erase (s₁ + s₂ + t) a\n[PROOFSTEP]\nrw [add_assoc s₁, erase_add_left_pos _ h, add_right_comm, add_assoc]\n[GOAL]\ncase mk.intro.intro.intro.intro.inr\nα : Type u_1\nr✝ r : α → α → Prop\ns₁ s₂ s t : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nhe : s + {a} = s₁ + s₂ + t\nhb : s = erase (s₁ + s₂ + t) a\nh : a ∈ s₂ + t\n⊢ ∃ a', GameAdd (CutExpand r) (CutExpand r) a' (s₁, s₂) ∧ a'.fst + a'.snd = erase (s₁ + s₂ + t) a\n[PROOFSTEP]\nrefine' ⟨(s₁, (s₂ + t).erase a), GameAdd.snd ⟨t, a, hr, _⟩, _⟩\n[GOAL]\ncase mk.intro.intro.intro.intro.inr.refine'_1\nα : Type u_1\nr✝ r : α → α → Prop\ns₁ s₂ s t : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nhe : s + {a} = s₁ + s₂ + t\nhb : s = erase (s₁ + s₂ + t) a\nh : a ∈ s₂ + t\n⊢ erase (s₂ + t) a + {a} = s₂ + t\n[PROOFSTEP]\nrw [add_comm, singleton_add, cons_erase h]\n[GOAL]\ncase mk.intro.intro.intro.intro.inr.refine'_2\nα : Type u_1\nr✝ r : α → α → Prop\ns₁ s₂ s t : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nhe : s + {a} = s₁ + s₂ + t\nhb : s = erase (s₁ + s₂ + t) a\nh : a ∈ s₂ + t\n⊢ (s₁, erase (s₂ + t) a).fst + (s₁, erase (s₂ + t) a).snd = erase (s₁ + s₂ + t) a\n[PROOFSTEP]\nrw [add_assoc, erase_add_right_pos _ h]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\ns : Multiset α\nhs : ∀ (a : α), a ∈ s → Acc (CutExpand r) {a}\n⊢ Acc (CutExpand r) s\n[PROOFSTEP]\ninduction s using Multiset.induction\n[GOAL]\ncase empty\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\nhs : ∀ (a : α), a ∈ 0 → Acc (CutExpand r) {a}\n⊢ Acc (CutExpand r) 0\ncase cons\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na✝¹ : α\ns✝ : Multiset α\na✝ : (∀ (a : α), a ∈ s✝ → Acc (CutExpand r) {a}) → Acc (CutExpand r) s✝\nhs : ∀ (a : α), a ∈ a✝¹ ::ₘ s✝ → Acc (CutExpand r) {a}\n⊢ Acc (CutExpand r) (a✝¹ ::ₘ s✝)\n[PROOFSTEP]\ncase empty => exact Acc.intro 0 fun s h ↦ (not_cutExpand_zero s h).elim\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\nhs : ∀ (a : α), a ∈ 0 → Acc (CutExpand r) {a}\n⊢ Acc (CutExpand r) 0\n[PROOFSTEP]\ncase empty => exact Acc.intro 0 fun s h ↦ (not_cutExpand_zero s h).elim\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\nhs : ∀ (a : α), a ∈ 0 → Acc (CutExpand r) {a}\n⊢ Acc (CutExpand r) 0\n[PROOFSTEP]\nexact Acc.intro 0 fun s h ↦ (not_cutExpand_zero s h).elim\n[GOAL]\ncase cons\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na✝¹ : α\ns✝ : Multiset α\na✝ : (∀ (a : α), a ∈ s✝ → Acc (CutExpand r) {a}) → Acc (CutExpand r) s✝\nhs : ∀ (a : α), a ∈ a✝¹ ::ₘ s✝ → Acc (CutExpand r) {a}\n⊢ Acc (CutExpand r) (a✝¹ ::ₘ s✝)\n[PROOFSTEP]\ncase cons a s ihs =>\n  rw [← s.singleton_add a]\n  rw [forall_mem_cons] at hs \n  exact (hs.1.prod_gameAdd <| ihs fun a ha ↦ hs.2 a ha).of_fibration _ (cutExpand_fibration r)\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na : α\ns : Multiset α\nihs : (∀ (a : α), a ∈ s → Acc (CutExpand r) {a}) → Acc (CutExpand r) s\nhs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Acc (CutExpand r) {a_1}\n⊢ Acc (CutExpand r) (a ::ₘ s)\n[PROOFSTEP]\ncase cons a s ihs =>\n  rw [← s.singleton_add a]\n  rw [forall_mem_cons] at hs \n  exact (hs.1.prod_gameAdd <| ihs fun a ha ↦ hs.2 a ha).of_fibration _ (cutExpand_fibration r)\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na : α\ns : Multiset α\nihs : (∀ (a : α), a ∈ s → Acc (CutExpand r) {a}) → Acc (CutExpand r) s\nhs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Acc (CutExpand r) {a_1}\n⊢ Acc (CutExpand r) (a ::ₘ s)\n[PROOFSTEP]\nrw [← s.singleton_add a]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na : α\ns : Multiset α\nihs : (∀ (a : α), a ∈ s → Acc (CutExpand r) {a}) → Acc (CutExpand r) s\nhs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Acc (CutExpand r) {a_1}\n⊢ Acc (CutExpand r) ({a} + s)\n[PROOFSTEP]\nrw [forall_mem_cons] at hs \n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na : α\ns : Multiset α\nihs : (∀ (a : α), a ∈ s → Acc (CutExpand r) {a}) → Acc (CutExpand r) s\nhs : Acc (CutExpand r) {a} ∧ ∀ (x : α), x ∈ s → Acc (CutExpand r) {x}\n⊢ Acc (CutExpand r) ({a} + s)\n[PROOFSTEP]\nexact (hs.1.prod_gameAdd <| ihs fun a ha ↦ hs.2 a ha).of_fibration _ (cutExpand_fibration r)\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na : α\nhacc : Acc r a\n⊢ Acc (CutExpand r) {a}\n[PROOFSTEP]\ninduction' hacc with a h ih\n[GOAL]\ncase intro\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na✝ a : α\nh : ∀ (y : α), r y a → Acc r y\nih : ∀ (y : α), r y a → Acc (CutExpand r) {y}\n⊢ Acc (CutExpand r) {a}\n[PROOFSTEP]\nrefine' Acc.intro _ fun s ↦ _\n[GOAL]\ncase intro\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na✝ a : α\nh : ∀ (y : α), r y a → Acc r y\nih : ∀ (y : α), r y a → Acc (CutExpand r) {y}\ns : Multiset α\n⊢ CutExpand r s {a} → Acc (CutExpand r) s\n[PROOFSTEP]\nclassical\nsimp only [cutExpand_iff, mem_singleton]\nrintro ⟨t, a, hr, rfl, rfl⟩\nrefine' acc_of_singleton fun a' ↦ _\nrw [erase_singleton, zero_add]\nexact ih a' ∘ hr a'\n[GOAL]\ncase intro\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na✝ a : α\nh : ∀ (y : α), r y a → Acc r y\nih : ∀ (y : α), r y a → Acc (CutExpand r) {y}\ns : Multiset α\n⊢ CutExpand r s {a} → Acc (CutExpand r) s\n[PROOFSTEP]\nsimp only [cutExpand_iff, mem_singleton]\n[GOAL]\ncase intro\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na✝ a : α\nh : ∀ (y : α), r y a → Acc r y\nih : ∀ (y : α), r y a → Acc (CutExpand r) {y}\ns : Multiset α\n⊢ (∃ t a_1, (∀ (a' : α), a' ∈ t → r a' a_1) ∧ a_1 = a ∧ s = erase {a} a_1 + t) → Acc (CutExpand r) s\n[PROOFSTEP]\nrintro ⟨t, a, hr, rfl, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na✝ : α\nt : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nh : ∀ (y : α), r y a → Acc r y\nih : ∀ (y : α), r y a → Acc (CutExpand r) {y}\n⊢ Acc (CutExpand r) (erase {a} a + t)\n[PROOFSTEP]\nrefine' acc_of_singleton fun a' ↦ _\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na✝ : α\nt : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nh : ∀ (y : α), r y a → Acc r y\nih : ∀ (y : α), r y a → Acc (CutExpand r) {y}\na' : α\n⊢ a' ∈ erase {a} a + t → Acc (CutExpand r) {a'}\n[PROOFSTEP]\nrw [erase_singleton, zero_add]\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsIrrefl α r\na✝ : α\nt : Multiset α\na : α\nhr : ∀ (a' : α), a' ∈ t → r a' a\nh : ∀ (y : α), r y a → Acc r y\nih : ∀ (y : α), r y a → Acc (CutExpand r) {y}\na' : α\n⊢ a' ∈ t → Acc (CutExpand r) {a'}\n[PROOFSTEP]\nexact ih a' ∘ hr a'\n", "meta": {"mathlib_filename": "Mathlib.Logic.Hydra", "llama_tokens": 8971, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6513548511303336, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.3661763910434409}}
{"text": "[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ diagram F U ⋙ G ≅ diagram (F ⋙ G) U\n[PROOFSTEP]\nfapply NatIso.ofComponents\n[GOAL]\ncase app\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ (X_1 : WalkingParallelPair) → (diagram F U ⋙ G).obj X_1 ≅ (diagram (F ⋙ G) U).obj X_1\ncase naturality\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ autoParam\n    (∀ {X_1 Y : WalkingParallelPair} (f : X_1 ⟶ Y),\n      (diagram F U ⋙ G).map f ≫ (?app Y).hom = (?app X_1).hom ≫ (diagram (F ⋙ G) U).map f)\n    _auto✝\n[PROOFSTEP]\nrintro ⟨j⟩\n[GOAL]\ncase app.zero\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ (diagram F U ⋙ G).obj WalkingParallelPair.zero ≅ (diagram (F ⋙ G) U).obj WalkingParallelPair.zero\ncase app.one\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ (diagram F U ⋙ G).obj WalkingParallelPair.one ≅ (diagram (F ⋙ G) U).obj WalkingParallelPair.one\ncase naturality\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ autoParam\n    (∀ {X_1 Y : WalkingParallelPair} (f : X_1 ⟶ Y),\n      (diagram F U ⋙ G).map f ≫ (?m.6024 Y).hom = (?m.6024 X_1).hom ≫ (diagram (F ⋙ G) U).map f)\n    _auto✝\n[PROOFSTEP]\nexact PreservesProduct.iso _ _\n[GOAL]\ncase app.one\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ (diagram F U ⋙ G).obj WalkingParallelPair.one ≅ (diagram (F ⋙ G) U).obj WalkingParallelPair.one\ncase naturality\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ autoParam\n    (∀ {X_1 Y : WalkingParallelPair} (f : X_1 ⟶ Y),\n      (diagram F U ⋙ G).map f ≫ (?m.6024 Y).hom = (?m.6024 X_1).hom ≫ (diagram (F ⋙ G) U).map f)\n    _auto✝\n[PROOFSTEP]\nexact PreservesProduct.iso _ _\n[GOAL]\ncase naturality\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ autoParam\n    (∀ {X_1 Y : WalkingParallelPair} (f : X_1 ⟶ Y),\n      (diagram F U ⋙ G).map f ≫\n          (WalkingParallelPair.casesOn Y (PreservesProduct.iso G fun i => F.obj (op (U i)))\n              (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom =\n        (WalkingParallelPair.casesOn X_1 (PreservesProduct.iso G fun i => F.obj (op (U i)))\n              (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom ≫\n          (diagram (F ⋙ G) U).map f)\n    _auto✝\n[PROOFSTEP]\nrintro ⟨⟩ ⟨⟩ ⟨⟩\n[GOAL]\ncase naturality.zero.zero.id\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ (diagram F U ⋙ G).map (WalkingParallelPairHom.id WalkingParallelPair.zero) ≫\n      (WalkingParallelPair.casesOn WalkingParallelPair.zero (PreservesProduct.iso G fun i => F.obj (op (U i)))\n          (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom =\n    (WalkingParallelPair.casesOn WalkingParallelPair.zero (PreservesProduct.iso G fun i => F.obj (op (U i)))\n          (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom ≫\n      (diagram (F ⋙ G) U).map (WalkingParallelPairHom.id WalkingParallelPair.zero)\n[PROOFSTEP]\nrefine limit.hom_ext (fun j => ?_)\n[GOAL]\ncase naturality.zero.zero.id\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : Discrete ι\n⊢ ((diagram F U ⋙ G).map (WalkingParallelPairHom.id WalkingParallelPair.zero) ≫\n        (WalkingParallelPair.casesOn WalkingParallelPair.zero (PreservesProduct.iso G fun i => F.obj (op (U i)))\n            (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom) ≫\n      limit.π (Discrete.functor fun i => (F ⋙ G).obj (op (U i))) j =\n    ((WalkingParallelPair.casesOn WalkingParallelPair.zero (PreservesProduct.iso G fun i => F.obj (op (U i)))\n            (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom ≫\n        (diagram (F ⋙ G) U).map (WalkingParallelPairHom.id WalkingParallelPair.zero)) ≫\n      limit.π (Discrete.functor fun i => (F ⋙ G).obj (op (U i))) j\n[PROOFSTEP]\nsimp\n[GOAL]\ncase naturality.zero.one.left\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ (diagram F U ⋙ G).map WalkingParallelPairHom.left ≫\n      (WalkingParallelPair.casesOn WalkingParallelPair.one (PreservesProduct.iso G fun i => F.obj (op (U i)))\n          (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom =\n    (WalkingParallelPair.casesOn WalkingParallelPair.zero (PreservesProduct.iso G fun i => F.obj (op (U i)))\n          (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom ≫\n      (diagram (F ⋙ G) U).map WalkingParallelPairHom.left\n[PROOFSTEP]\nrefine\n  limit.hom_ext\n    (fun j => ?_)\n      -- Porting note : `attribute [local reducible]` doesn't work, this is its replacement\n[GOAL]\ncase naturality.zero.one.left\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : Discrete (ι × ι)\n⊢ ((diagram F U ⋙ G).map WalkingParallelPairHom.left ≫\n        (WalkingParallelPair.casesOn WalkingParallelPair.one (PreservesProduct.iso G fun i => F.obj (op (U i)))\n            (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom) ≫\n      limit.π (Discrete.functor fun p => (F ⋙ G).obj (op (U p.fst ⊓ U p.snd))) j =\n    ((WalkingParallelPair.casesOn WalkingParallelPair.zero (PreservesProduct.iso G fun i => F.obj (op (U i)))\n            (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom ≫\n        (diagram (F ⋙ G) U).map WalkingParallelPairHom.left) ≫\n      limit.π (Discrete.functor fun p => (F ⋙ G).obj (op (U p.fst ⊓ U p.snd))) j\n[PROOFSTEP]\ndsimp [diagram, leftRes, rightRes]\n[GOAL]\ncase naturality.zero.one.left\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : Discrete (ι × ι)\n⊢ (G.map (Pi.lift fun p => Pi.π (fun i => F.obj (op (U i))) p.fst ≫ F.map (Opens.infLELeft (U p.fst) (U p.snd)).op) ≫\n        piComparison G fun p => F.obj (op (U p.fst ⊓ U p.snd))) ≫\n      limit.π (Discrete.functor fun p => G.obj (F.obj (op (U p.fst ⊓ U p.snd)))) j =\n    ((piComparison G fun i => F.obj (op (U i))) ≫\n        Pi.lift fun p =>\n          Pi.π (fun i => G.obj (F.obj (op (U i)))) p.fst ≫ G.map (F.map (Opens.infLELeft (U p.fst) (U p.snd)).op)) ≫\n      limit.π (Discrete.functor fun p => G.obj (F.obj (op (U p.fst ⊓ U p.snd)))) j\n[PROOFSTEP]\nsimp [limit.lift_π, Functor.comp_map, map_lift_piComparison, Fan.mk_π_app, PreservesProduct.iso_hom,\n  parallelPair_map_left, Functor.map_comp, Category.assoc]\n[GOAL]\ncase naturality.zero.one.right\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ (diagram F U ⋙ G).map WalkingParallelPairHom.right ≫\n      (WalkingParallelPair.casesOn WalkingParallelPair.one (PreservesProduct.iso G fun i => F.obj (op (U i)))\n          (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom =\n    (WalkingParallelPair.casesOn WalkingParallelPair.zero (PreservesProduct.iso G fun i => F.obj (op (U i)))\n          (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom ≫\n      (diagram (F ⋙ G) U).map WalkingParallelPairHom.right\n[PROOFSTEP]\nrefine\n  limit.hom_ext\n    (fun j => ?_)\n      -- Porting note : `attribute [local reducible]` doesn't work, this is its replacement\n[GOAL]\ncase naturality.zero.one.right\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : Discrete (ι × ι)\n⊢ ((diagram F U ⋙ G).map WalkingParallelPairHom.right ≫\n        (WalkingParallelPair.casesOn WalkingParallelPair.one (PreservesProduct.iso G fun i => F.obj (op (U i)))\n            (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom) ≫\n      limit.π (Discrete.functor fun p => (F ⋙ G).obj (op (U p.fst ⊓ U p.snd))) j =\n    ((WalkingParallelPair.casesOn WalkingParallelPair.zero (PreservesProduct.iso G fun i => F.obj (op (U i)))\n            (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom ≫\n        (diagram (F ⋙ G) U).map WalkingParallelPairHom.right) ≫\n      limit.π (Discrete.functor fun p => (F ⋙ G).obj (op (U p.fst ⊓ U p.snd))) j\n[PROOFSTEP]\ndsimp [diagram, leftRes, rightRes]\n[GOAL]\ncase naturality.zero.one.right\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : Discrete (ι × ι)\n⊢ (G.map (Pi.lift fun p => Pi.π (fun i => F.obj (op (U i))) p.snd ≫ F.map (Opens.infLERight (U p.fst) (U p.snd)).op) ≫\n        piComparison G fun p => F.obj (op (U p.fst ⊓ U p.snd))) ≫\n      limit.π (Discrete.functor fun p => G.obj (F.obj (op (U p.fst ⊓ U p.snd)))) j =\n    ((piComparison G fun i => F.obj (op (U i))) ≫\n        Pi.lift fun p =>\n          Pi.π (fun i => G.obj (F.obj (op (U i)))) p.snd ≫ G.map (F.map (Opens.infLERight (U p.fst) (U p.snd)).op)) ≫\n      limit.π (Discrete.functor fun p => G.obj (F.obj (op (U p.fst ⊓ U p.snd)))) j\n[PROOFSTEP]\nsimp [limit.lift_π, Functor.comp_map, map_lift_piComparison, Fan.mk_π_app, PreservesProduct.iso_hom,\n  parallelPair_map_left, Functor.map_comp, Category.assoc]\n[GOAL]\ncase naturality.one.one.id\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ (diagram F U ⋙ G).map (WalkingParallelPairHom.id WalkingParallelPair.one) ≫\n      (WalkingParallelPair.casesOn WalkingParallelPair.one (PreservesProduct.iso G fun i => F.obj (op (U i)))\n          (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom =\n    (WalkingParallelPair.casesOn WalkingParallelPair.one (PreservesProduct.iso G fun i => F.obj (op (U i)))\n          (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom ≫\n      (diagram (F ⋙ G) U).map (WalkingParallelPairHom.id WalkingParallelPair.one)\n[PROOFSTEP]\nrefine limit.hom_ext (fun j => ?_)\n[GOAL]\ncase naturality.one.one.id\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : Discrete (ι × ι)\n⊢ ((diagram F U ⋙ G).map (WalkingParallelPairHom.id WalkingParallelPair.one) ≫\n        (WalkingParallelPair.casesOn WalkingParallelPair.one (PreservesProduct.iso G fun i => F.obj (op (U i)))\n            (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom) ≫\n      limit.π (Discrete.functor fun p => (F ⋙ G).obj (op (U p.fst ⊓ U p.snd))) j =\n    ((WalkingParallelPair.casesOn WalkingParallelPair.one (PreservesProduct.iso G fun i => F.obj (op (U i)))\n            (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd)))).hom ≫\n        (diagram (F ⋙ G) U).map (WalkingParallelPairHom.id WalkingParallelPair.one)) ≫\n      limit.π (Discrete.functor fun p => (F ⋙ G).obj (op (U p.fst ⊓ U p.snd))) j\n[PROOFSTEP]\nsimp [diagram, leftRes, rightRes]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : WalkingParallelPair\n⊢ NatTrans.app (G.mapCone (fork F U)).π j =\n    (Iso.refl (G.mapCone (fork F U)).pt).hom ≫\n      NatTrans.app ((Cones.postcompose (diagramCompPreservesLimits G F U).inv).obj (fork (F ⋙ G) U)).π j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : WalkingParallelPair\n⊢ G.map (NatTrans.app (fork F U).π j) =\n    𝟙 (G.obj (F.obj (op (iSup U)))) ≫\n      NatTrans.app (fork (F ⋙ G) U).π j ≫ NatTrans.app (diagramCompPreservesLimits G F U).inv j\n[PROOFSTEP]\nsimp [diagramCompPreservesLimits]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : WalkingParallelPair\n⊢ G.map (NatTrans.app (fork F U).π j) =\n    NatTrans.app (fork (F ⋙ G) U).π j ≫\n      (WalkingParallelPair.rec (PreservesProduct.iso G fun i => F.obj (op (U i)))\n          (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd))) j).inv\n[PROOFSTEP]\ncases j\n[GOAL]\ncase zero\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ G.map (NatTrans.app (fork F U).π WalkingParallelPair.zero) =\n    NatTrans.app (fork (F ⋙ G) U).π WalkingParallelPair.zero ≫\n      (WalkingParallelPair.rec (PreservesProduct.iso G fun i => F.obj (op (U i)))\n          (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd))) WalkingParallelPair.zero).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase one\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ G.map (NatTrans.app (fork F U).π WalkingParallelPair.one) =\n    NatTrans.app (fork (F ⋙ G) U).π WalkingParallelPair.one ≫\n      (WalkingParallelPair.rec (PreservesProduct.iso G fun i => F.obj (op (U i)))\n          (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd))) WalkingParallelPair.one).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase zero\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ G.map (res F U) = res (F ⋙ G) U ≫ (PreservesProduct.iso G fun i => F.obj (op (U i))).inv\n[PROOFSTEP]\nrw [Iso.eq_comp_inv]\n  -- Porting note : `ext` can't see `limit.hom_ext` applies here:\n        -- See https://github.com/leanprover-community/mathlib4/issues/5229\n[GOAL]\ncase zero\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ G.map (res F U) ≫ (PreservesProduct.iso G fun i => F.obj (op (U i))).hom = res (F ⋙ G) U\n[PROOFSTEP]\nrefine\n  limit.hom_ext\n    (fun j => ?_)\n      -- Porting note : `attribute [local reducible]` doesn't work, this is its replacement\n[GOAL]\ncase zero\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : Discrete ι\n⊢ (G.map (res F U) ≫ (PreservesProduct.iso G fun i => F.obj (op (U i))).hom) ≫\n      limit.π (Discrete.functor fun i => (F ⋙ G).obj (op (U i))) j =\n    res (F ⋙ G) U ≫ limit.π (Discrete.functor fun i => (F ⋙ G).obj (op (U i))) j\n[PROOFSTEP]\nsimp [diagram, leftRes, rightRes, res]\n[GOAL]\ncase one\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ G.map (res F U ≫ leftRes F U) =\n    (res (F ⋙ G) U ≫ leftRes (F ⋙ G) U) ≫ (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd))).inv\n[PROOFSTEP]\nrw [Iso.eq_comp_inv]\n  -- Porting note : `ext` can't see `limit.hom_ext` applies here:\n        -- See https://github.com/leanprover-community/mathlib4/issues/5229\n[GOAL]\ncase one\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\n⊢ G.map (res F U ≫ leftRes F U) ≫ (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd))).hom =\n    res (F ⋙ G) U ≫ leftRes (F ⋙ G) U\n[PROOFSTEP]\nrefine\n  limit.hom_ext\n    (fun j => ?_)\n      -- Porting note : `attribute [local reducible]` doesn't work, this is its replacement\n[GOAL]\ncase one\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : Discrete (ι × ι)\n⊢ (G.map (res F U ≫ leftRes F U) ≫ (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd))).hom) ≫\n      limit.π (Discrete.functor fun p => (F ⋙ G).obj (op (U p.fst ⊓ U p.snd))) j =\n    (res (F ⋙ G) U ≫ leftRes (F ⋙ G) U) ≫ limit.π (Discrete.functor fun p => (F ⋙ G).obj (op (U p.fst ⊓ U p.snd))) j\n[PROOFSTEP]\ndsimp [diagram, leftRes, rightRes, res]\n  -- Porting note : there used to be a non-terminal `simp` for `squeeze_simp` did not work,\n        -- however, `simp?` works fine now, but in both mathlib3 and mathlib4, two `simp`s are\n        -- required to close goal\n[GOAL]\ncase one\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : Discrete (ι × ι)\n⊢ (G.map\n          ((Pi.lift fun i => F.map (Opens.leSupr U i).op) ≫\n            Pi.lift fun p => Pi.π (fun i => F.obj (op (U i))) p.fst ≫ F.map (Opens.infLELeft (U p.fst) (U p.snd)).op) ≫\n        piComparison G fun p => F.obj (op (U p.fst ⊓ U p.snd))) ≫\n      limit.π (Discrete.functor fun p => G.obj (F.obj (op (U p.fst ⊓ U p.snd)))) j =\n    ((Pi.lift fun i => G.map (F.map (Opens.leSupr U i).op)) ≫\n        Pi.lift fun p =>\n          Pi.π (fun i => G.obj (F.obj (op (U i)))) p.fst ≫ G.map (F.map (Opens.infLELeft (U p.fst) (U p.snd)).op)) ≫\n      limit.π (Discrete.functor fun p => G.obj (F.obj (op (U p.fst ⊓ U p.snd)))) j\n[PROOFSTEP]\nsimp only [Functor.map_comp, Category.assoc, map_lift_piComparison, limit.lift_π, Fan.mk_pt, Fan.mk_π_app,\n  limit.lift_π_assoc, Discrete.functor_obj]\n[GOAL]\ncase one\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : HasLimits C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : HasLimits D\nG : C ⥤ D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nι : Type v\nU : ι → Opens ↑X\nj : Discrete (ι × ι)\n⊢ G.map (Pi.lift fun i => F.map (Opens.leSupr U i).op) ≫\n      G.map (Pi.π (fun i => F.obj (op (U i))) j.as.fst) ≫ G.map (F.map (Opens.infLELeft (U j.as.fst) (U j.as.snd)).op) =\n    G.map (F.map (Opens.leSupr U j.as.fst).op) ≫ G.map (F.map (Opens.infLELeft (U j.as.fst) (U j.as.snd)).op)\n[PROOFSTEP]\nsimp only [limit.lift_π, Fan.mk_π_app, ← G.map_comp, limit.lift_π_assoc, Fan.mk_π_app]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\n⊢ IsSheaf F ↔ IsSheaf (F ⋙ G)\n[PROOFSTEP]\nrw [Presheaf.isSheaf_iff_isSheafEqualizerProducts, Presheaf.isSheaf_iff_isSheafEqualizerProducts]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\n⊢ IsSheafEqualizerProducts F ↔ IsSheafEqualizerProducts (F ⋙ G)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\n⊢ IsSheafEqualizerProducts F → IsSheafEqualizerProducts (F ⋙ G)\n[PROOFSTEP]\nintro S ι U\n[GOAL]\ncase mp\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts F\nι : Type v\nU : ι → Opens ↑X\n⊢ Nonempty (IsLimit (fork (F ⋙ G) U))\n[PROOFSTEP]\nobtain ⟨t₁⟩ := S U\n[GOAL]\ncase mp.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts F\nι : Type v\nU : ι → Opens ↑X\nt₁ : IsLimit (fork F U)\n⊢ Nonempty (IsLimit (fork (F ⋙ G) U))\n[PROOFSTEP]\nletI := preservesSmallestLimitsOfPreservesLimits G\n[GOAL]\ncase mp.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts F\nι : Type v\nU : ι → Opens ↑X\nt₁ : IsLimit (fork F U)\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\n⊢ Nonempty (IsLimit (fork (F ⋙ G) U))\n[PROOFSTEP]\nhave t₂ := @PreservesLimit.preserves _ _ _ _ _ _ _ G _ _ t₁\n[GOAL]\ncase mp.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts F\nι : Type v\nU : ι → Opens ↑X\nt₁ : IsLimit (fork F U)\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nt₂ : IsLimit (G.mapCone (fork F U))\n⊢ Nonempty (IsLimit (fork (F ⋙ G) U))\n[PROOFSTEP]\nhave t₃ :=\n  IsLimit.ofIsoLimit t₂\n    (mapConeFork G F U)\n      -- and as postcomposing by a natural isomorphism preserves limit cones,\n[GOAL]\ncase mp.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts F\nι : Type v\nU : ι → Opens ↑X\nt₁ : IsLimit (fork F U)\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nt₂ : IsLimit (G.mapCone (fork F U))\nt₃ : IsLimit ((Cones.postcompose (diagramCompPreservesLimits G F U).inv).obj (fork (F ⋙ G) U))\n⊢ Nonempty (IsLimit (fork (F ⋙ G) U))\n[PROOFSTEP]\nhave t₄ := IsLimit.postcomposeInvEquiv _ _ t₃\n[GOAL]\ncase mp.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts F\nι : Type v\nU : ι → Opens ↑X\nt₁ : IsLimit (fork F U)\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nt₂ : IsLimit (G.mapCone (fork F U))\nt₃ : IsLimit ((Cones.postcompose (diagramCompPreservesLimits G F U).inv).obj (fork (F ⋙ G) U))\nt₄ : (fun x => IsLimit (fork (F ⋙ G) U)) t₃\n⊢ Nonempty (IsLimit (fork (F ⋙ G) U))\n[PROOFSTEP]\nexact ⟨t₄⟩\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\n⊢ IsSheafEqualizerProducts (F ⋙ G) → IsSheafEqualizerProducts F\n[PROOFSTEP]\nintro S ι U\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\n⊢ Nonempty (IsLimit (fork F U))\n[PROOFSTEP]\nrefine'\n  ⟨_⟩\n    -- Let `f` be the universal morphism from `F.obj U` to the equalizer\n        -- of the sheaf condition fork, whatever it is.\n        -- Our goal is to show that this is an isomorphism.\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\n⊢ IsLimit (fork F U)\n[PROOFSTEP]\nlet f :=\n  equalizer.lift _\n    (w F U)\n      -- If we can do that,\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\n⊢ IsLimit (fork F U)\n[PROOFSTEP]\nsuffices IsIso (G.map f)\n  by\n  skip\n    -- we have that `f` itself is an isomorphism, since `G` reflects isomorphisms\n  haveI : IsIso f := isIso_of_reflects_iso f G\n  apply IsLimit.ofIsoLimit (limit.isLimit _)\n  apply Iso.symm\n  fapply Cones.ext\n  exact asIso f\n  rintro ⟨_ | _⟩ <;> · simp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nthis : IsIso (G.map f)\n⊢ IsLimit (fork F U)\n[PROOFSTEP]\nskip\n  -- we have that `f` itself is an isomorphism, since `G` reflects isomorphisms\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nthis : IsIso (G.map f)\n⊢ IsLimit (fork F U)\n[PROOFSTEP]\nhaveI : IsIso f := isIso_of_reflects_iso f G\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nthis✝ : IsIso (G.map f)\nthis : IsIso f\n⊢ IsLimit (fork F U)\n[PROOFSTEP]\napply IsLimit.ofIsoLimit (limit.isLimit _)\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nthis✝ : IsIso (G.map f)\nthis : IsIso f\n⊢ limit.cone (parallelPair (leftRes F U) (rightRes F U)) ≅ fork F U\n[PROOFSTEP]\napply Iso.symm\n[GOAL]\ncase I\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nthis✝ : IsIso (G.map f)\nthis : IsIso f\n⊢ fork F U ≅ limit.cone (parallelPair (leftRes F U) (rightRes F U))\n[PROOFSTEP]\nfapply Cones.ext\n[GOAL]\ncase I.φ\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nthis✝ : IsIso (G.map f)\nthis : IsIso f\n⊢ (fork F U).pt ≅ (limit.cone (parallelPair (leftRes F U) (rightRes F U))).pt\ncase I.w\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nthis✝ : IsIso (G.map f)\nthis : IsIso f\n⊢ autoParam\n    (∀ (j : WalkingParallelPair),\n      NatTrans.app (fork F U).π j =\n        ?I.φ.hom ≫ NatTrans.app (limit.cone (parallelPair (leftRes F U) (rightRes F U))).π j)\n    _auto✝\n[PROOFSTEP]\nexact asIso f\n[GOAL]\ncase I.w\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nthis✝ : IsIso (G.map f)\nthis : IsIso f\n⊢ autoParam\n    (∀ (j : WalkingParallelPair),\n      NatTrans.app (fork F U).π j =\n        (asIso f).hom ≫ NatTrans.app (limit.cone (parallelPair (leftRes F U) (rightRes F U))).π j)\n    _auto✝\n[PROOFSTEP]\nrintro ⟨_ | _⟩\n[GOAL]\ncase I.w.zero\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nthis✝ : IsIso (G.map f)\nthis : IsIso f\n⊢ NatTrans.app (fork F U).π WalkingParallelPair.zero =\n    (asIso f).hom ≫ NatTrans.app (limit.cone (parallelPair (leftRes F U) (rightRes F U))).π WalkingParallelPair.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase I.w.one\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nthis✝ : IsIso (G.map f)\nthis : IsIso f\n⊢ NatTrans.app (fork F U).π WalkingParallelPair.one =\n    (asIso f).hom ≫ NatTrans.app (limit.cone (parallelPair (leftRes F U) (rightRes F U))).π WalkingParallelPair.one\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\n⊢ IsIso (G.map f)\n[PROOFSTEP]\nlet c := fork (F ⋙ G) U\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\n⊢ IsIso (G.map f)\n[PROOFSTEP]\nobtain ⟨hc⟩ := S U\n[GOAL]\ncase mpr.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\n⊢ IsIso (G.map f)\n[PROOFSTEP]\nlet d := G.mapCone (equalizer.fork (leftRes.{v} F U) (rightRes F U))\n[GOAL]\ncase mpr.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\n⊢ IsIso (G.map f)\n[PROOFSTEP]\nletI := preservesSmallestLimitsOfPreservesLimits G\n[GOAL]\ncase mpr.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\n⊢ IsIso (G.map f)\n[PROOFSTEP]\nhave hd : IsLimit d :=\n  PreservesLimit.preserves\n    (limit.isLimit _)\n      -- Since both of these are limit cones\n            -- (`c` by our hypothesis `S`, and `d` because `G` preserves limits),\n            -- we hope to be able to conclude that `f` is an isomorphism.\n            -- We say \"not quite\" above because `c` and `d` don't quite have the same shape:\n            -- we need to postcompose by the natural isomorphism `diagramCompPreservesLimits`\n            -- introduced above.\n[GOAL]\ncase mpr.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nhd : IsLimit d\n⊢ IsIso (G.map f)\n[PROOFSTEP]\nlet d' := (Cones.postcompose (diagramCompPreservesLimits G F U).hom).obj d\n[GOAL]\ncase mpr.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nhd : IsLimit d\nd' : Cone (diagram (F ⋙ G) U) := (Cones.postcompose (diagramCompPreservesLimits G F U).hom).obj d\n⊢ IsIso (G.map f)\n[PROOFSTEP]\nhave hd' : IsLimit d' := (IsLimit.postcomposeHomEquiv (diagramCompPreservesLimits G F U : _) d).symm hd\n[GOAL]\ncase mpr.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nhd : IsLimit d\nd' : Cone (diagram (F ⋙ G) U) := (Cones.postcompose (diagramCompPreservesLimits G F U).hom).obj d\nhd' : IsLimit d'\n⊢ IsIso (G.map f)\n[PROOFSTEP]\nlet f' : c ⟶ d' :=\n  Fork.mkHom (G.map f)\n    (by\n      dsimp only [diagramCompPreservesLimits, res]\n      dsimp only [Fork.ι]\n        -- Porting note : `ext` can't see `limit.hom_ext` applies here:\n                -- See https://github.com/leanprover-community/mathlib4/issues/5229\n      refine limit.hom_ext fun j => ?_\n      dsimp\n      simp only [Category.assoc, ← Functor.map_comp_assoc, equalizer.lift_ι, map_lift_piComparison_assoc]\n      dsimp [res])\n      -- conclude that it is an isomorphism,\n            -- just because it's a morphism between two limit cones.\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nhd : IsLimit d\nd' : Cone (diagram (F ⋙ G) U) := (Cones.postcompose (diagramCompPreservesLimits G F U).hom).obj d\nhd' : IsLimit d'\n⊢ G.map f ≫ Fork.ι d' = Fork.ι c\n[PROOFSTEP]\ndsimp only [diagramCompPreservesLimits, res]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nhd : IsLimit d\nd' : Cone (diagram (F ⋙ G) U) := (Cones.postcompose (diagramCompPreservesLimits G F U).hom).obj d\nhd' : IsLimit d'\n⊢ G.map\n        (equalizer.lift (Pi.lift fun i => F.map (Opens.leSupr U i).op)\n          (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)) ≫\n      Fork.ι\n        ((Cones.postcompose\n              (NatIso.ofComponents fun X_1 =>\n                  WalkingParallelPair.rec (PreservesProduct.iso G fun i => F.obj (op (U i)))\n                    (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd))) X_1).hom).obj\n          (G.mapCone (equalizer.fork (leftRes F U) (rightRes F U)))) =\n    Fork.ι (fork (F ⋙ G) U)\n[PROOFSTEP]\ndsimp only [Fork.ι]\n  -- Porting note : `ext` can't see `limit.hom_ext` applies here:\n          -- See https://github.com/leanprover-community/mathlib4/issues/5229\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nhd : IsLimit d\nd' : Cone (diagram (F ⋙ G) U) := (Cones.postcompose (diagramCompPreservesLimits G F U).hom).obj d\nhd' : IsLimit d'\n⊢ G.map\n        (equalizer.lift (Pi.lift fun i => F.map (Opens.leSupr U i).op)\n          (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)) ≫\n      NatTrans.app\n        ((Cones.postcompose\n                (NatIso.ofComponents fun X_1 =>\n                    WalkingParallelPair.rec (PreservesProduct.iso G fun i => F.obj (op (U i)))\n                      (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd))) X_1).hom).obj\n            (G.mapCone (equalizer.fork (leftRes F U) (rightRes F U)))).π\n        WalkingParallelPair.zero =\n    NatTrans.app (fork (F ⋙ G) U).π WalkingParallelPair.zero\n[PROOFSTEP]\nrefine limit.hom_ext fun j => ?_\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nhd : IsLimit d\nd' : Cone (diagram (F ⋙ G) U) := (Cones.postcompose (diagramCompPreservesLimits G F U).hom).obj d\nhd' : IsLimit d'\nj : Discrete ι\n⊢ (G.map\n          (equalizer.lift (Pi.lift fun i => F.map (Opens.leSupr U i).op)\n            (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)) ≫\n        NatTrans.app\n          ((Cones.postcompose\n                  (NatIso.ofComponents fun X_1 =>\n                      WalkingParallelPair.rec (PreservesProduct.iso G fun i => F.obj (op (U i)))\n                        (PreservesProduct.iso G fun p => F.obj (op (U p.fst ⊓ U p.snd))) X_1).hom).obj\n              (G.mapCone (equalizer.fork (leftRes F U) (rightRes F U)))).π\n          WalkingParallelPair.zero) ≫\n      limit.π (Discrete.functor fun i => (F ⋙ G).obj (op (U i))) j =\n    NatTrans.app (fork (F ⋙ G) U).π WalkingParallelPair.zero ≫\n      limit.π (Discrete.functor fun i => (F ⋙ G).obj (op (U i))) j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nhd : IsLimit d\nd' : Cone (diagram (F ⋙ G) U) := (Cones.postcompose (diagramCompPreservesLimits G F U).hom).obj d\nhd' : IsLimit d'\nj : Discrete ι\n⊢ (G.map\n          (equalizer.lift (Pi.lift fun i => F.map (Opens.leSupr U i).op)\n            (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)) ≫\n        G.map (equalizer.ι (leftRes F U) (rightRes F U)) ≫ piComparison G fun i => F.obj (op (U i))) ≫\n      limit.π (Discrete.functor fun i => G.obj (F.obj (op (U i)))) j =\n    res (F ⋙ G) U ≫ limit.π (Discrete.functor fun i => G.obj (F.obj (op (U i)))) j\n[PROOFSTEP]\nsimp only [Category.assoc, ← Functor.map_comp_assoc, equalizer.lift_ι, map_lift_piComparison_assoc]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nhd : IsLimit d\nd' : Cone (diagram (F ⋙ G) U) := (Cones.postcompose (diagramCompPreservesLimits G F U).hom).obj d\nhd' : IsLimit d'\nj : Discrete ι\n⊢ (Pi.lift fun j => G.map (F.map (Opens.leSupr U j).op)) ≫\n      limit.π (Discrete.functor fun i => G.obj (F.obj (op (U i)))) j =\n    res (F ⋙ G) U ≫ limit.π (Discrete.functor fun i => G.obj (F.obj (op (U i)))) j\n[PROOFSTEP]\ndsimp [res]\n[GOAL]\ncase mpr.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\nthis : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nhd : IsLimit d\nd' : Cone (diagram (F ⋙ G) U) := (Cones.postcompose (diagramCompPreservesLimits G F U).hom).obj d\nhd' : IsLimit d'\nf' : c ⟶ d' := Fork.mkHom (G.map f) (_ : G.map f ≫ Fork.ι d' = Fork.ι c)\n⊢ IsIso (G.map f)\n[PROOFSTEP]\nhaveI : IsIso f' := IsLimit.hom_isIso hc hd' f'\n[GOAL]\ncase mpr.intro\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\nG : C ⥤ D\ninst✝³ : ReflectsIsomorphisms G\ninst✝² : HasLimits C\ninst✝¹ : HasLimits D\ninst✝ : PreservesLimits G\nX : TopCat\nF : Presheaf C X\nS : IsSheafEqualizerProducts (F ⋙ G)\nι : Type v\nU : ι → Opens ↑X\nf : F.obj (op (iSup U)) ⟶ equalizer (leftRes F U) (rightRes F U) :=\n  equalizer.lift (res F U) (_ : res F U ≫ leftRes F U = res F U ≫ rightRes F U)\nc : Fork (leftRes (F ⋙ G) U) (rightRes (F ⋙ G) U) := fork (F ⋙ G) U\nhc : IsLimit (fork (F ⋙ G) U)\nd : Cone (parallelPair (leftRes F U) (rightRes F U) ⋙ G) := G.mapCone (equalizer.fork (leftRes F U) (rightRes F U))\nthis✝ : PreservesLimitsOfSize.{0, 0, v, v, u₁, u₂} G := preservesSmallestLimitsOfPreservesLimits G\nhd : IsLimit d\nd' : Cone (diagram (F ⋙ G) U) := (Cones.postcompose (diagramCompPreservesLimits G F U).hom).obj d\nhd' : IsLimit d'\nf' : c ⟶ d' := Fork.mkHom (G.map f) (_ : G.map f ≫ Fork.ι d' = Fork.ι c)\nthis : IsIso f'\n⊢ IsIso (G.map f)\n[PROOFSTEP]\nexact IsIso.of_iso ((Cones.forget _).mapIso (asIso f'))\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sheaves.Forget", "llama_tokens": 24031, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.689305616785446, "lm_q2_score": 0.5312093733737562, "lm_q1q2_score": 0.3661656047556073}}
{"text": "[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF G H I : C ⥤ D\nα β : F ⟶ G\nh : α = β\nX : C\n⊢ app α X = app β X\n[PROOFSTEP]\nrw [h]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nF G H I : C ⥤ D\nα : F ⟶ G\ninst✝ : ∀ (X : C), Mono (app α X)\nZ✝ : C ⥤ D\ng h : Z✝ ⟶ F\neq : g ≫ α = h ≫ α\n⊢ g = h\n[PROOFSTEP]\next X\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nF G H I : C ⥤ D\nα : F ⟶ G\ninst✝ : ∀ (X : C), Mono (app α X)\nZ✝ : C ⥤ D\ng h : Z✝ ⟶ F\neq : g ≫ α = h ≫ α\nX : C\n⊢ app g X = app h X\n[PROOFSTEP]\nrw [← cancel_mono (α.app X), ← comp_app, eq, comp_app]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nF G H I : C ⥤ D\nα : F ⟶ G\ninst✝ : ∀ (X : C), Epi (app α X)\nZ✝ : C ⥤ D\ng h : G ⟶ Z✝\neq : α ≫ g = α ≫ h\n⊢ g = h\n[PROOFSTEP]\next X\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nF G H I : C ⥤ D\nα : F ⟶ G\ninst✝ : ∀ (X : C), Epi (app α X)\nZ✝ : C ⥤ D\ng h : G ⟶ Z✝\neq : α ≫ g = α ≫ h\nX : C\n⊢ app g X = app h X\n[PROOFSTEP]\nrw [← cancel_epi (α.app X), ← comp_app, eq, comp_app]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF G H✝ I✝ : C ⥤ D\nH I : D ⥤ E\nα : F ⟶ G\nβ : H ⟶ I\nX Y : C\nf : X ⟶ Y\n⊢ (F ⋙ H).map f ≫ (fun X => app β (F.obj X) ≫ I.map (app α X)) Y =\n    (fun X => app β (F.obj X) ≫ I.map (app α X)) X ≫ (G ⋙ I).map f\n[PROOFSTEP]\nrw [Functor.comp_map, Functor.comp_map, ← assoc, naturality, assoc, ← map_comp I, naturality, map_comp, assoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF G H✝ I : C ⥤ D\nH : D ⥤ E\nα : F ⟶ G\nX : C\n⊢ app (α ◫ 𝟙 H) X = H.map (app α X)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF G H✝ I : C ⥤ D\nH : E ⥤ C\nα : F ⟶ G\nX : E\n⊢ app (𝟙 H ◫ α) X = app α (H.obj X)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF G H I✝ : C ⥤ D\nI J K : D ⥤ E\nα : F ⟶ G\nβ : G ⟶ H\nγ : I ⟶ J\nδ : J ⟶ K\n⊢ (α ≫ β) ◫ (γ ≫ δ) = (α ◫ γ) ≫ β ◫ δ\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF✝ G H I : C ⥤ D\nF : C ⥤ D ⥤ E\nX Y : C\ne : X ≅ Y\nZ : D\n⊢ app (F.map e.hom) Z ≫ app (F.map e.inv) Z = 𝟙 ((F.obj X).obj Z)\n[PROOFSTEP]\nsimp [← NatTrans.comp_app, ← Functor.map_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nF✝ G H I : C ⥤ D\nF : C ⥤ D ⥤ E\nX Y : C\ne : X ≅ Y\nZ : D\n⊢ app (F.map e.inv) Z ≫ app (F.map e.hom) Z = 𝟙 ((F.obj Y).obj Z)\n[PROOFSTEP]\nsimp [← NatTrans.comp_app, ← Functor.map_comp]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Functor.Category", "llama_tokens": 1897, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6992544210587585, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.36600399306584264}}
{"text": "[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\nj : J\n⊢ coconeFun F j 0 = 0\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\nj : J\n⊢ Setoid.r (Prequotient.of j 0) zero\n[PROOFSTEP]\napply Relation.zero\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\nj : J\n⊢ ∀ (x y : ↑(F.obj j)),\n    ZeroHom.toFun\n        { toFun := coconeFun F j, map_zero' := (_ : Quot.mk Setoid.r (Prequotient.of j 0) = Quot.mk Setoid.r zero) }\n        (x + y) =\n      ZeroHom.toFun\n          { toFun := coconeFun F j, map_zero' := (_ : Quot.mk Setoid.r (Prequotient.of j 0) = Quot.mk Setoid.r zero) }\n          x +\n        ZeroHom.toFun\n          { toFun := coconeFun F j, map_zero' := (_ : Quot.mk Setoid.r (Prequotient.of j 0) = Quot.mk Setoid.r zero) } y\n[PROOFSTEP]\nintros\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\nj : J\nx✝ y✝ : ↑(F.obj j)\n⊢ ZeroHom.toFun\n      { toFun := coconeFun F j, map_zero' := (_ : Quot.mk Setoid.r (Prequotient.of j 0) = Quot.mk Setoid.r zero) }\n      (x✝ + y✝) =\n    ZeroHom.toFun\n        { toFun := coconeFun F j, map_zero' := (_ : Quot.mk Setoid.r (Prequotient.of j 0) = Quot.mk Setoid.r zero) }\n        x✝ +\n      ZeroHom.toFun\n        { toFun := coconeFun F j, map_zero' := (_ : Quot.mk Setoid.r (Prequotient.of j 0) = Quot.mk Setoid.r zero) } y✝\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\nj : J\nx✝ y✝ : ↑(F.obj j)\n⊢ Setoid.r (Prequotient.of j (x✝ + y✝)) (add (Prequotient.of j x✝) (Prequotient.of j y✝))\n[PROOFSTEP]\napply Relation.add\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\nj j' : J\nf : j ⟶ j'\n⊢ F.map f ≫ coconeMorphism F j' = coconeMorphism F j\n[PROOFSTEP]\next\n[GOAL]\ncase w\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\nj j' : J\nf : j ⟶ j'\nx✝ : ↑(F.obj j)\n⊢ ↑(F.map f ≫ coconeMorphism F j') x✝ = ↑(coconeMorphism F j) x✝\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase w.a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\nj j' : J\nf : j ⟶ j'\nx✝ : ↑(F.obj j)\n⊢ Setoid.r (Prequotient.of j' (↑(F.map f) x✝)) (Prequotient.of j x✝)\n[PROOFSTEP]\napply Relation.map\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\nj j' : J\nf : j ⟶ j'\nx : ↑(F.obj j)\n⊢ ↑(coconeMorphism F j') (↑(F.map f) x) = ↑(coconeMorphism F j) x\n[PROOFSTEP]\nrw [← cocone_naturality F f]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\nj j' : J\nf : j ⟶ j'\nx : ↑(F.obj j)\n⊢ ↑(coconeMorphism F j') (↑(F.map f) x) = ↑(F.map f ≫ coconeMorphism F j') x\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\n⊢ ColimitType F → ↑s.pt\n[PROOFSTEP]\nfapply Quot.lift\n[GOAL]\ncase f\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\n⊢ Prequotient F → ↑s.pt\n[PROOFSTEP]\nexact descFunLift F s\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\n⊢ ∀ (a b : Prequotient F), Setoid.r a b → descFunLift F s a = descFunLift F s b\n[PROOFSTEP]\nintro x y r\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y : Prequotient F\nr : Setoid.r x y\n⊢ descFunLift F s x = descFunLift F s y\n[PROOFSTEP]\ninduction r with\n| refl => rfl\n| symm _ _ _ r_ih => exact r_ih.symm\n| trans _ _ _ _ _ r_ih_h r_ih_k => exact Eq.trans r_ih_h r_ih_k\n| map j j' f x => simpa only [descFunLift, Functor.const_obj_obj] using FunLike.congr_fun (s.ι.naturality f) x\n| zero => simp\n| neg => simp\n| add => simp\n| neg_1 _ _ _ r_ih => dsimp; rw [r_ih]\n| add_1 _ _ _ _ r_ih => dsimp; rw [r_ih]\n| add_2 _ _ _ _ r_ih => dsimp; rw [r_ih]\n| zero_add => dsimp; rw [zero_add]\n| add_zero => dsimp; rw [add_zero]\n| add_left_neg => dsimp; rw [add_left_neg]\n| add_comm => dsimp; rw [add_comm]\n| add_assoc => dsimp; rw [add_assoc]\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y : Prequotient F\nr : Setoid.r x y\n⊢ descFunLift F s x = descFunLift F s y\n[PROOFSTEP]\ninduction r with\n| refl => rfl\n| symm _ _ _ r_ih => exact r_ih.symm\n| trans _ _ _ _ _ r_ih_h r_ih_k => exact Eq.trans r_ih_h r_ih_k\n| map j j' f x => simpa only [descFunLift, Functor.const_obj_obj] using FunLike.congr_fun (s.ι.naturality f) x\n| zero => simp\n| neg => simp\n| add => simp\n| neg_1 _ _ _ r_ih => dsimp; rw [r_ih]\n| add_1 _ _ _ _ r_ih => dsimp; rw [r_ih]\n| add_2 _ _ _ _ r_ih => dsimp; rw [r_ih]\n| zero_add => dsimp; rw [zero_add]\n| add_zero => dsimp; rw [add_zero]\n| add_left_neg => dsimp; rw [add_left_neg]\n| add_comm => dsimp; rw [add_comm]\n| add_assoc => dsimp; rw [add_assoc]\n[GOAL]\ncase a.refl\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s x✝ = descFunLift F s x✝\n[PROOFSTEP]\n\n| refl => rfl\n[GOAL]\ncase a.refl\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s x✝ = descFunLift F s x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.symm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝¹ y✝ : Prequotient F\nx✝ : Relation F x✝¹ y✝\nr_ih : descFunLift F s x✝¹ = descFunLift F s y✝\n⊢ descFunLift F s y✝ = descFunLift F s x✝¹\n[PROOFSTEP]\n\n| symm _ _ _ r_ih => exact r_ih.symm\n[GOAL]\ncase a.symm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝¹ y✝ : Prequotient F\nx✝ : Relation F x✝¹ y✝\nr_ih : descFunLift F s x✝¹ = descFunLift F s y✝\n⊢ descFunLift F s y✝ = descFunLift F s x✝¹\n[PROOFSTEP]\nexact r_ih.symm\n[GOAL]\ncase a.trans\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝² y✝ z✝ : Prequotient F\nx✝¹ : Relation F x✝² y✝\nx✝ : Relation F y✝ z✝\nr_ih_h : descFunLift F s x✝² = descFunLift F s y✝\nr_ih_k : descFunLift F s y✝ = descFunLift F s z✝\n⊢ descFunLift F s x✝² = descFunLift F s z✝\n[PROOFSTEP]\n\n| trans _ _ _ _ _ r_ih_h r_ih_k => exact Eq.trans r_ih_h r_ih_k\n[GOAL]\ncase a.trans\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝² y✝ z✝ : Prequotient F\nx✝¹ : Relation F x✝² y✝\nx✝ : Relation F y✝ z✝\nr_ih_h : descFunLift F s x✝² = descFunLift F s y✝\nr_ih_k : descFunLift F s y✝ = descFunLift F s z✝\n⊢ descFunLift F s x✝² = descFunLift F s z✝\n[PROOFSTEP]\nexact Eq.trans r_ih_h r_ih_k\n[GOAL]\ncase a.map\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx✝ y : Prequotient F\nj j' : J\nf : j ⟶ j'\nx : ↑(F.obj j)\n⊢ descFunLift F s (Prequotient.of j' (↑(F.map f) x)) = descFunLift F s (Prequotient.of j x)\n[PROOFSTEP]\n\n| map j j' f x => simpa only [descFunLift, Functor.const_obj_obj] using FunLike.congr_fun (s.ι.naturality f) x\n[GOAL]\ncase a.map\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx✝ y : Prequotient F\nj j' : J\nf : j ⟶ j'\nx : ↑(F.obj j)\n⊢ descFunLift F s (Prequotient.of j' (↑(F.map f) x)) = descFunLift F s (Prequotient.of j x)\n[PROOFSTEP]\nsimpa only [descFunLift, Functor.const_obj_obj] using FunLike.congr_fun (s.ι.naturality f) x\n[GOAL]\ncase a.zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y : Prequotient F\nj✝ : J\n⊢ descFunLift F s (Prequotient.of j✝ 0) = descFunLift F s zero\n[PROOFSTEP]\n\n| zero => simp\n[GOAL]\ncase a.zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y : Prequotient F\nj✝ : J\n⊢ descFunLift F s (Prequotient.of j✝ 0) = descFunLift F s zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y : Prequotient F\nj✝ : J\nx✝ : ↑(F.obj j✝)\n⊢ descFunLift F s (Prequotient.of j✝ (-x✝)) = descFunLift F s (neg (Prequotient.of j✝ x✝))\n[PROOFSTEP]\n\n| neg => simp\n[GOAL]\ncase a.neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y : Prequotient F\nj✝ : J\nx✝ : ↑(F.obj j✝)\n⊢ descFunLift F s (Prequotient.of j✝ (-x✝)) = descFunLift F s (neg (Prequotient.of j✝ x✝))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y : Prequotient F\nj✝ : J\nx✝ y✝ : ↑(F.obj j✝)\n⊢ descFunLift F s (Prequotient.of j✝ (x✝ + y✝)) = descFunLift F s (add (Prequotient.of j✝ x✝) (Prequotient.of j✝ y✝))\n[PROOFSTEP]\n\n| add => simp\n[GOAL]\ncase a.add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y : Prequotient F\nj✝ : J\nx✝ y✝ : ↑(F.obj j✝)\n⊢ descFunLift F s (Prequotient.of j✝ (x✝ + y✝)) = descFunLift F s (add (Prequotient.of j✝ x✝) (Prequotient.of j✝ y✝))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.neg_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝¹ x'✝ : Prequotient F\nx✝ : Relation F x✝¹ x'✝\nr_ih : descFunLift F s x✝¹ = descFunLift F s x'✝\n⊢ descFunLift F s (neg x✝¹) = descFunLift F s (neg x'✝)\n[PROOFSTEP]\n\n| neg_1 _ _ _ r_ih => dsimp; rw [r_ih]\n[GOAL]\ncase a.neg_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝¹ x'✝ : Prequotient F\nx✝ : Relation F x✝¹ x'✝\nr_ih : descFunLift F s x✝¹ = descFunLift F s x'✝\n⊢ descFunLift F s (neg x✝¹) = descFunLift F s (neg x'✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.neg_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝¹ x'✝ : Prequotient F\nx✝ : Relation F x✝¹ x'✝\nr_ih : descFunLift F s x✝¹ = descFunLift F s x'✝\n⊢ -descFunLift F s x✝¹ = -descFunLift F s x'✝\n[PROOFSTEP]\nrw [r_ih]\n[GOAL]\ncase a.add_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝¹ x'✝ y✝ : Prequotient F\nx✝ : Relation F x✝¹ x'✝\nr_ih : descFunLift F s x✝¹ = descFunLift F s x'✝\n⊢ descFunLift F s (add x✝¹ y✝) = descFunLift F s (add x'✝ y✝)\n[PROOFSTEP]\n\n| add_1 _ _ _ _ r_ih => dsimp; rw [r_ih]\n[GOAL]\ncase a.add_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝¹ x'✝ y✝ : Prequotient F\nx✝ : Relation F x✝¹ x'✝\nr_ih : descFunLift F s x✝¹ = descFunLift F s x'✝\n⊢ descFunLift F s (add x✝¹ y✝) = descFunLift F s (add x'✝ y✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.add_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝¹ x'✝ y✝ : Prequotient F\nx✝ : Relation F x✝¹ x'✝\nr_ih : descFunLift F s x✝¹ = descFunLift F s x'✝\n⊢ descFunLift F s x✝¹ + descFunLift F s y✝ = descFunLift F s x'✝ + descFunLift F s y✝\n[PROOFSTEP]\nrw [r_ih]\n[GOAL]\ncase a.add_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝¹ y✝ y'✝ : Prequotient F\nx✝ : Relation F y✝ y'✝\nr_ih : descFunLift F s y✝ = descFunLift F s y'✝\n⊢ descFunLift F s (add x✝¹ y✝) = descFunLift F s (add x✝¹ y'✝)\n[PROOFSTEP]\n\n| add_2 _ _ _ _ r_ih => dsimp; rw [r_ih]\n[GOAL]\ncase a.add_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝¹ y✝ y'✝ : Prequotient F\nx✝ : Relation F y✝ y'✝\nr_ih : descFunLift F s y✝ = descFunLift F s y'✝\n⊢ descFunLift F s (add x✝¹ y✝) = descFunLift F s (add x✝¹ y'✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.add_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝¹ y✝ y'✝ : Prequotient F\nx✝ : Relation F y✝ y'✝\nr_ih : descFunLift F s y✝ = descFunLift F s y'✝\n⊢ descFunLift F s x✝¹ + descFunLift F s y✝ = descFunLift F s x✝¹ + descFunLift F s y'✝\n[PROOFSTEP]\nrw [r_ih]\n[GOAL]\ncase a.zero_add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s (add zero x✝) = descFunLift F s x✝\n[PROOFSTEP]\n\n| zero_add => dsimp; rw [zero_add]\n[GOAL]\ncase a.zero_add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s (add zero x✝) = descFunLift F s x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.zero_add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ 0 + descFunLift F s x✝ = descFunLift F s x✝\n[PROOFSTEP]\nrw [zero_add]\n[GOAL]\ncase a.add_zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s (add x✝ zero) = descFunLift F s x✝\n[PROOFSTEP]\n\n| add_zero => dsimp; rw [add_zero]\n[GOAL]\ncase a.add_zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s (add x✝ zero) = descFunLift F s x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.add_zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s x✝ + 0 = descFunLift F s x✝\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\ncase a.add_left_neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s (add (neg x✝) x✝) = descFunLift F s zero\n[PROOFSTEP]\n\n| add_left_neg => dsimp; rw [add_left_neg]\n[GOAL]\ncase a.add_left_neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s (add (neg x✝) x✝) = descFunLift F s zero\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.add_left_neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ -descFunLift F s x✝ + descFunLift F s x✝ = 0\n[PROOFSTEP]\nrw [add_left_neg]\n[GOAL]\ncase a.add_comm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ y✝ : Prequotient F\n⊢ descFunLift F s (add x✝ y✝) = descFunLift F s (add y✝ x✝)\n[PROOFSTEP]\n\n| add_comm => dsimp; rw [add_comm]\n[GOAL]\ncase a.add_comm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ y✝ : Prequotient F\n⊢ descFunLift F s (add x✝ y✝) = descFunLift F s (add y✝ x✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.add_comm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ y✝ : Prequotient F\n⊢ descFunLift F s x✝ + descFunLift F s y✝ = descFunLift F s y✝ + descFunLift F s x✝\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\ncase a.add_assoc\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ y✝ z✝ : Prequotient F\n⊢ descFunLift F s (add (add x✝ y✝) z✝) = descFunLift F s (add x✝ (add y✝ z✝))\n[PROOFSTEP]\n\n| add_assoc => dsimp; rw [add_assoc]\n[GOAL]\ncase a.add_assoc\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ y✝ z✝ : Prequotient F\n⊢ descFunLift F s (add (add x✝ y✝) z✝) = descFunLift F s (add x✝ (add y✝ z✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.add_assoc\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y x✝ y✝ z✝ : Prequotient F\n⊢ descFunLift F s x✝ + descFunLift F s y✝ + descFunLift F s z✝ =\n    descFunLift F s x✝ + (descFunLift F s y✝ + descFunLift F s z✝)\n[PROOFSTEP]\nrw [add_assoc]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y : ↑(colimit F)\nx✝¹ x✝ : Prequotient F\n⊢ ZeroHom.toFun { toFun := descFun F s, map_zero' := (_ : descFun F s 0 = descFun F s 0) }\n      (Quot.mk Setoid.r x✝¹ + Quot.mk Setoid.r x✝) =\n    ZeroHom.toFun { toFun := descFun F s, map_zero' := (_ : descFun F s 0 = descFun F s 0) } (Quot.mk Setoid.r x✝¹) +\n      ZeroHom.toFun { toFun := descFun F s, map_zero' := (_ : descFun F s 0 = descFun F s 0) } (Quot.mk Setoid.r x✝)\n[PROOFSTEP]\ndsimp [(· + ·)]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y : ↑(colimit F)\nx✝¹ x✝ : Prequotient F\n⊢ descFun F s (Add.add (Quot.mk Setoid.r x✝¹) (Quot.mk Setoid.r x✝)) =\n    Add.add (descFun F s (Quot.mk Setoid.r x✝¹)) (descFun F s (Quot.mk Setoid.r x✝))\n[PROOFSTEP]\nrw [← quot_add F]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nx y : ↑(colimit F)\nx✝¹ x✝ : Prequotient F\n⊢ descFun F s (Quot.mk Setoid.r (add x✝¹ x✝)) =\n    Add.add (descFun F s (Quot.mk Setoid.r x✝¹)) (descFun F s (Quot.mk Setoid.r x✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx✝ : Quot Setoid.r\nx : Prequotient F\n⊢ ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\n[PROOFSTEP]\nchange (m : ColimitType F →+ s.pt) _ = (descMorphism F s : ColimitType F →+ s.pt) _\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx✝ : Quot Setoid.r\nx : Prequotient F\n⊢ ↑m (Quot.mk Setoid.r x) = ↑(descMorphism F s) (Quot.mk Setoid.r x)\n[PROOFSTEP]\ninduction x using Prequotient.recOn with\n| of j x => exact FunLike.congr_fun (w j) x\n| zero =>\n  dsimp only [quot_zero]\n  rw [map_zero, map_zero]\n| neg x ih =>\n  dsimp only [quot_neg]\n  rw [map_neg, map_neg, ih]\n| add x y ihx ihy =>\n  simp only [quot_add]\n  erw [m.map_add, (descMorphism F s).map_add, ihx, ihy]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx✝ : Quot Setoid.r\nx : Prequotient F\n⊢ ↑m (Quot.mk Setoid.r x) = ↑(descMorphism F s) (Quot.mk Setoid.r x)\n[PROOFSTEP]\ninduction x using Prequotient.recOn with\n| of j x => exact FunLike.congr_fun (w j) x\n| zero =>\n  dsimp only [quot_zero]\n  rw [map_zero, map_zero]\n| neg x ih =>\n  dsimp only [quot_neg]\n  rw [map_neg, map_neg, ih]\n| add x y ihx ihy =>\n  simp only [quot_add]\n  erw [m.map_add, (descMorphism F s).map_add, ihx, ihy]\n[GOAL]\ncase of\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx✝ : Quot Setoid.r\nj : J\nx : ↑(F.obj j)\n⊢ ↑m (Quot.mk Setoid.r (Prequotient.of j x)) = ↑(descMorphism F s) (Quot.mk Setoid.r (Prequotient.of j x))\n[PROOFSTEP]\n\n| of j x => exact FunLike.congr_fun (w j) x\n[GOAL]\ncase of\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx✝ : Quot Setoid.r\nj : J\nx : ↑(F.obj j)\n⊢ ↑m (Quot.mk Setoid.r (Prequotient.of j x)) = ↑(descMorphism F s) (Quot.mk Setoid.r (Prequotient.of j x))\n[PROOFSTEP]\nexact FunLike.congr_fun (w j) x\n[GOAL]\ncase zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx : Quot Setoid.r\n⊢ ↑m (Quot.mk Setoid.r zero) = ↑(descMorphism F s) (Quot.mk Setoid.r zero)\n[PROOFSTEP]\n\n| zero =>\n  dsimp only [quot_zero]\n  rw [map_zero, map_zero]\n[GOAL]\ncase zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx : Quot Setoid.r\n⊢ ↑m (Quot.mk Setoid.r zero) = ↑(descMorphism F s) (Quot.mk Setoid.r zero)\n[PROOFSTEP]\ndsimp only [quot_zero]\n[GOAL]\ncase zero\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx : Quot Setoid.r\n⊢ ↑m 0 = ↑(descMorphism F s) 0\n[PROOFSTEP]\nrw [map_zero, map_zero]\n[GOAL]\ncase neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx✝ : Quot Setoid.r\nx : Prequotient F\nih : ↑m (Quot.mk Setoid.r x) = ↑(descMorphism F s) (Quot.mk Setoid.r x)\n⊢ ↑m (Quot.mk Setoid.r (neg x)) = ↑(descMorphism F s) (Quot.mk Setoid.r (neg x))\n[PROOFSTEP]\n\n| neg x ih =>\n  dsimp only [quot_neg]\n  rw [map_neg, map_neg, ih]\n[GOAL]\ncase neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx✝ : Quot Setoid.r\nx : Prequotient F\nih : ↑m (Quot.mk Setoid.r x) = ↑(descMorphism F s) (Quot.mk Setoid.r x)\n⊢ ↑m (Quot.mk Setoid.r (neg x)) = ↑(descMorphism F s) (Quot.mk Setoid.r (neg x))\n[PROOFSTEP]\ndsimp only [quot_neg]\n[GOAL]\ncase neg\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx✝ : Quot Setoid.r\nx : Prequotient F\nih : ↑m (Quot.mk Setoid.r x) = ↑(descMorphism F s) (Quot.mk Setoid.r x)\n⊢ ↑m (-Quot.mk Setoid.r x) = ↑(descMorphism F s) (-Quot.mk Setoid.r x)\n[PROOFSTEP]\nrw [map_neg, map_neg, ih]\n[GOAL]\ncase add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx✝ : Quot Setoid.r\nx y : Prequotient F\nihx : ↑m (Quot.mk Setoid.r x) = ↑(descMorphism F s) (Quot.mk Setoid.r x)\nihy : ↑m (Quot.mk Setoid.r y) = ↑(descMorphism F s) (Quot.mk Setoid.r y)\n⊢ ↑m (Quot.mk Setoid.r (add x y)) = ↑(descMorphism F s) (Quot.mk Setoid.r (add x y))\n[PROOFSTEP]\n\n| add x y ihx ihy =>\n  simp only [quot_add]\n  erw [m.map_add, (descMorphism F s).map_add, ihx, ihy]\n[GOAL]\ncase add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx✝ : Quot Setoid.r\nx y : Prequotient F\nihx : ↑m (Quot.mk Setoid.r x) = ↑(descMorphism F s) (Quot.mk Setoid.r x)\nihy : ↑m (Quot.mk Setoid.r y) = ↑(descMorphism F s) (Quot.mk Setoid.r y)\n⊢ ↑m (Quot.mk Setoid.r (add x y)) = ↑(descMorphism F s) (Quot.mk Setoid.r (add x y))\n[PROOFSTEP]\nsimp only [quot_add]\n[GOAL]\ncase add\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ AddCommGroupCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx✝ : Quot Setoid.r\nx y : Prequotient F\nihx : ↑m (Quot.mk Setoid.r x) = ↑(descMorphism F s) (Quot.mk Setoid.r x)\nihy : ↑m (Quot.mk Setoid.r y) = ↑(descMorphism F s) (Quot.mk Setoid.r y)\n⊢ ↑m (Add.add (Quot.mk Setoid.r x) (Quot.mk Setoid.r y)) =\n    ↑(descMorphism F s) (Add.add (Quot.mk Setoid.r x) (Quot.mk Setoid.r y))\n[PROOFSTEP]\nerw [m.map_add, (descMorphism F s).map_add, ihx, ihy]\n[GOAL]\nG H : AddCommGroupCat\nf : G ⟶ H\n⊢ f ≫ mk' (AddMonoidHom.range f) = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nG H : AddCommGroupCat\nf : G ⟶ H\nx : ↑G\n⊢ ↑(f ≫ mk' (AddMonoidHom.range f)) x = ↑0 x\n[PROOFSTEP]\napply Quotient.sound\n[GOAL]\ncase w.a\nG H : AddCommGroupCat\nf : G ⟶ H\nx : ↑G\n⊢ ↑f x ≈ 0\n[PROOFSTEP]\napply leftRel_apply.mpr\n[GOAL]\ncase w.a\nG H : AddCommGroupCat\nf : G ⟶ H\nx : ↑G\n⊢ -↑f x + 0 ∈ AddMonoidHom.range f\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase w.a.w\nG H : AddCommGroupCat\nf : G ⟶ H\nx : ↑G\n⊢ ↑G\ncase w.a.h G H : AddCommGroupCat f : G ⟶ H x : ↑G ⊢ ↑f ?w.a.w = -↑f x + 0\n[PROOFSTEP]\nexact -x\n[GOAL]\ncase w.a.h\nG H : AddCommGroupCat\nf : G ⟶ H\nx : ↑G\n⊢ ↑f (-x) = -↑f x + 0\n[PROOFSTEP]\nsimp only [add_zero, AddMonoidHom.map_neg]\n[GOAL]\nG H : AddCommGroupCat\nf : G ⟶ H\n⊢ ∀ (x : ↑H), x ∈ AddMonoidHom.range f → ↑(cokernel.π f) x = 0\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩\n[GOAL]\ncase intro\nG H : AddCommGroupCat\nf : G ⟶ H\nx : ↑G\n⊢ ↑(cokernel.π f) (↑f x) = 0\n[PROOFSTEP]\nexact cokernel.condition_apply f x\n[GOAL]\nG H : AddCommGroupCat\nf : G ⟶ H\n⊢ cokernel.desc f (mk' (AddMonoidHom.range f)) (_ : f ≫ mk' (AddMonoidHom.range f) = 0) ≫\n      lift (AddMonoidHom.range f) (cokernel.π f) (_ : ∀ (x : ↑H), x ∈ AddMonoidHom.range f → ↑(cokernel.π f) x = 0) =\n    𝟙 (cokernel f)\n[PROOFSTEP]\nrefine coequalizer.hom_ext ?_\n[GOAL]\nG H : AddCommGroupCat\nf : G ⟶ H\n⊢ coequalizer.π f 0 ≫\n      cokernel.desc f (mk' (AddMonoidHom.range f)) (_ : f ≫ mk' (AddMonoidHom.range f) = 0) ≫\n        lift (AddMonoidHom.range f) (cokernel.π f) (_ : ∀ (x : ↑H), x ∈ AddMonoidHom.range f → ↑(cokernel.π f) x = 0) =\n    coequalizer.π f 0 ≫ 𝟙 (cokernel f)\n[PROOFSTEP]\nsimp only [coequalizer_as_cokernel, cokernel.π_desc_assoc, Category.comp_id]\n[GOAL]\nG H : AddCommGroupCat\nf : G ⟶ H\n⊢ mk' (AddMonoidHom.range f) ≫\n      lift (AddMonoidHom.range f) (cokernel.π f) (_ : ∀ (x : ↑H), x ∈ AddMonoidHom.range f → ↑(cokernel.π f) x = 0) =\n    cokernel.π f\n[PROOFSTEP]\nrfl\n[GOAL]\nG H : AddCommGroupCat\nf : G ⟶ H\n⊢ lift (AddMonoidHom.range f) (cokernel.π f) (_ : ∀ (x : ↑H), x ∈ AddMonoidHom.range f → ↑(cokernel.π f) x = 0) ≫\n      cokernel.desc f (mk' (AddMonoidHom.range f)) (_ : f ≫ mk' (AddMonoidHom.range f) = 0) =\n    𝟙 (of (↑H ⧸ AddMonoidHom.range f))\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nG H : AddCommGroupCat\nf : G ⟶ H\nx : ↑(of (↑H ⧸ AddMonoidHom.range f))\n⊢ ↑(lift (AddMonoidHom.range f) (cokernel.π f) (_ : ∀ (x : ↑H), x ∈ AddMonoidHom.range f → ↑(cokernel.π f) x = 0) ≫\n          cokernel.desc f (mk' (AddMonoidHom.range f)) (_ : f ≫ mk' (AddMonoidHom.range f) = 0))\n      x =\n    ↑(𝟙 (of (↑H ⧸ AddMonoidHom.range f))) x\n[PROOFSTEP]\nexact QuotientAddGroup.induction_on x <| cokernel.π_desc_apply f _ _\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.GroupCat.Colimits", "llama_tokens": 12377, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.63341027751814, "lm_q2_score": 0.5774953651858118, "lm_q1q2_score": 0.36579149952778467}}
{"text": "[GOAL]\na✝ b✝ c a b : Ordinal.{u}\n⊢ a ♯ b = max (blsub a fun a' x => a' ♯ b) (blsub b fun b' x => a ♯ b')\n[PROOFSTEP]\nrw [nadd]\n[GOAL]\na b c : Ordinal.{u}\n⊢ a < b ♯ c ↔ (∃ b', b' < b ∧ a ≤ b' ♯ c) ∨ ∃ c', c' < c ∧ a ≤ b ♯ c'\n[PROOFSTEP]\nrw [nadd_def]\n[GOAL]\na b c : Ordinal.{u}\n⊢ a < max (blsub b fun a' x => a' ♯ c) (blsub c fun b' x => b ♯ b') ↔\n    (∃ b', b' < b ∧ a ≤ b' ♯ c) ∨ ∃ c', c' < c ∧ a ≤ b ♯ c'\n[PROOFSTEP]\nsimp [lt_blsub_iff]\n[GOAL]\na b c : Ordinal.{u}\n⊢ b ♯ c ≤ a ↔ (∀ (b' : Ordinal.{u}), b' < b → b' ♯ c < a) ∧ ∀ (c' : Ordinal.{u}), c' < c → b ♯ c' < a\n[PROOFSTEP]\nrw [nadd_def]\n[GOAL]\na b c : Ordinal.{u}\n⊢ max (blsub b fun a' x => a' ♯ c) (blsub c fun b' x => b ♯ b') ≤ a ↔\n    (∀ (b' : Ordinal.{u}), b' < b → b' ♯ c < a) ∧ ∀ (c' : Ordinal.{u}), c' < c → b ♯ c' < a\n[PROOFSTEP]\nsimp [blsub_le_iff]\n[GOAL]\na✝ b c : Ordinal.{u}\nh : b ≤ c\na : Ordinal.{u}\n⊢ a ♯ b ≤ a ♯ c\n[PROOFSTEP]\nrcases lt_or_eq_of_le h with (h | rfl)\n[GOAL]\ncase inl\na✝ b c : Ordinal.{u}\nh✝ : b ≤ c\na : Ordinal.{u}\nh : b < c\n⊢ a ♯ b ≤ a ♯ c\n[PROOFSTEP]\nexact (nadd_lt_nadd_left h a).le\n[GOAL]\ncase inr\na✝ b a : Ordinal.{u}\nh : b ≤ b\n⊢ a ♯ b ≤ a ♯ b\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\na✝ b c : Ordinal.{u}\nh : b ≤ c\na : Ordinal.{u}\n⊢ b ♯ a ≤ c ♯ a\n[PROOFSTEP]\nrcases lt_or_eq_of_le h with (h | rfl)\n[GOAL]\ncase inl\na✝ b c : Ordinal.{u}\nh✝ : b ≤ c\na : Ordinal.{u}\nh : b < c\n⊢ b ♯ a ≤ c ♯ a\n[PROOFSTEP]\nexact (nadd_lt_nadd_right h a).le\n[GOAL]\ncase inr\na✝ b a : Ordinal.{u}\nh : b ≤ b\n⊢ b ♯ a ≤ b ♯ a\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\na✝ b✝ c : Ordinal.{u}\na b : Ordinal.{u_1}\n⊢ a ♯ b = b ♯ a\n[PROOFSTEP]\nrw [nadd_def, nadd_def, max_comm]\n[GOAL]\na✝ b✝ c : Ordinal.{u}\na b : Ordinal.{u_1}\n⊢ max (blsub b fun b' x => a ♯ b') (blsub a fun a' x => a' ♯ b) =\n    max (blsub b fun a' x => a' ♯ a) (blsub a fun b' x => b ♯ b')\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_f\na✝ b✝ c : Ordinal.{u}\na b : Ordinal.{u_1}\n⊢ (fun b' x => a ♯ b') = fun a' x => a' ♯ a\n[PROOFSTEP]\next\n[GOAL]\ncase e_a.e_f\na✝ b✝ c : Ordinal.{u}\na b : Ordinal.{u_1}\n⊢ (fun a' x => a' ♯ b) = fun b' x => b ♯ b'\n[PROOFSTEP]\next\n[GOAL]\ncase e_a.e_f.h.h\na✝ b✝ c : Ordinal.{u}\na b x✝¹ : Ordinal.{u_1}\nx✝ : x✝¹ < b\n⊢ a ♯ x✝¹ = x✝¹ ♯ a\n[PROOFSTEP]\napply nadd_comm\n[GOAL]\ncase e_a.e_f.h.h\na✝ b✝ c : Ordinal.{u}\na b x✝¹ : Ordinal.{u_1}\nx✝ : x✝¹ < a\n⊢ x✝¹ ♯ b = b ♯ x✝¹\n[PROOFSTEP]\napply nadd_comm\n[GOAL]\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\n⊢ blsub (a ♯ b) f =\n    max (blsub a fun a' ha' => f (a' ♯ b) (_ : a' ♯ b < a ♯ b)) (blsub b fun b' hb' => f (a ♯ b') (_ : a ♯ b' < a ♯ b))\n[PROOFSTEP]\napply (blsub_le_iff.2 fun i h => _).antisymm (max_le _ _)\n[GOAL]\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\n⊢ ∀ (i : Ordinal.{u}) (h : i < a ♯ b),\n    f i h <\n      max (blsub a fun a' ha' => f (a' ♯ b) (_ : a' ♯ b < a ♯ b))\n        (blsub b fun b' hb' => f (a ♯ b') (_ : a ♯ b' < a ♯ b))\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\n⊢ (blsub a fun a' ha' => f (a' ♯ b) (_ : a' ♯ b < a ♯ b)) ≤ blsub (a ♯ b) f\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\n⊢ (blsub b fun b' hb' => f (a ♯ b') (_ : a ♯ b' < a ♯ b)) ≤ blsub (a ♯ b) f\n[PROOFSTEP]\nintro i h\n[GOAL]\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\ni : Ordinal.{u}\nh : i < a ♯ b\n⊢ f i h <\n    max (blsub a fun a' ha' => f (a' ♯ b) (_ : a' ♯ b < a ♯ b)) (blsub b fun b' hb' => f (a ♯ b') (_ : a ♯ b' < a ♯ b))\n[PROOFSTEP]\nrcases lt_nadd_iff.1 h with (⟨a', ha', hi⟩ | ⟨b', hb', hi⟩)\n[GOAL]\ncase inl.intro.intro\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\ni : Ordinal.{u}\nh : i < a ♯ b\na' : Ordinal.{u}\nha' : a' < a\nhi : i ≤ a' ♯ b\n⊢ f i h <\n    max (blsub a fun a' ha' => f (a' ♯ b) (_ : a' ♯ b < a ♯ b)) (blsub b fun b' hb' => f (a ♯ b') (_ : a ♯ b' < a ♯ b))\n[PROOFSTEP]\nexact lt_max_of_lt_left ((hf h (nadd_lt_nadd_right ha' b) hi).trans_lt (lt_blsub _ _ ha'))\n[GOAL]\ncase inr.intro.intro\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\ni : Ordinal.{u}\nh : i < a ♯ b\nb' : Ordinal.{u}\nhb' : b' < b\nhi : i ≤ a ♯ b'\n⊢ f i h <\n    max (blsub a fun a' ha' => f (a' ♯ b) (_ : a' ♯ b < a ♯ b)) (blsub b fun b' hb' => f (a ♯ b') (_ : a ♯ b' < a ♯ b))\n[PROOFSTEP]\nexact lt_max_of_lt_right ((hf h (nadd_lt_nadd_left hb' a) hi).trans_lt (lt_blsub _ _ hb'))\n[GOAL]\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\n⊢ (blsub a fun a' ha' => f (a' ♯ b) (_ : a' ♯ b < a ♯ b)) ≤ blsub (a ♯ b) f\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\n⊢ (blsub b fun b' hb' => f (a ♯ b') (_ : a ♯ b' < a ♯ b)) ≤ blsub (a ♯ b) f\n[PROOFSTEP]\nall_goals\n  apply blsub_le_of_brange_subset.{u, u, v}\n  rintro c ⟨d, hd, rfl⟩\n  apply mem_brange_self\n[GOAL]\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\n⊢ (blsub a fun a' ha' => f (a' ♯ b) (_ : a' ♯ b < a ♯ b)) ≤ blsub (a ♯ b) f\n[PROOFSTEP]\napply blsub_le_of_brange_subset.{u, u, v}\n[GOAL]\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\n⊢ (brange a fun a_1 ha => (fun a' ha' => f (a' ♯ b) (_ : a' ♯ b < a ♯ b)) a_1 ha) ⊆\n    brange (a ♯ b) fun a_1 ha => f a_1 ha\n[PROOFSTEP]\nrintro c ⟨d, hd, rfl⟩\n[GOAL]\ncase intro.intro\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\nd : Ordinal.{u}\nhd : d < a\n⊢ (fun a_1 ha => (fun a' ha' => f (a' ♯ b) (_ : a' ♯ b < a ♯ b)) a_1 ha) d hd ∈ brange (a ♯ b) fun a_1 ha => f a_1 ha\n[PROOFSTEP]\napply mem_brange_self\n[GOAL]\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\n⊢ (blsub b fun b' hb' => f (a ♯ b') (_ : a ♯ b' < a ♯ b)) ≤ blsub (a ♯ b) f\n[PROOFSTEP]\napply blsub_le_of_brange_subset.{u, u, v}\n[GOAL]\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\n⊢ (brange b fun a_1 ha => (fun b' hb' => f (a ♯ b') (_ : a ♯ b' < a ♯ b)) a_1 ha) ⊆\n    brange (a ♯ b) fun a_1 ha => f a_1 ha\n[PROOFSTEP]\nrintro c ⟨d, hd, rfl⟩\n[GOAL]\ncase intro.intro\na b c : Ordinal.{u}\nf : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}\nhf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj\nd : Ordinal.{u}\nhd : d < b\n⊢ (fun a_1 ha => (fun b' hb' => f (a ♯ b') (_ : a ♯ b' < a ♯ b)) a_1 ha) d hd ∈ brange (a ♯ b) fun a_1 ha => f a_1 ha\n[PROOFSTEP]\napply mem_brange_self\n[GOAL]\na✝ b✝ c✝ : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ a ♯ b ♯ c = a ♯ (b ♯ c)\n[PROOFSTEP]\nrw [nadd_def a (b ♯ c), nadd_def, blsub_nadd_of_mono, blsub_nadd_of_mono, max_assoc]\n[GOAL]\na✝ b✝ c✝ : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ max (blsub a fun a' ha' => a' ♯ b ♯ c) (max (blsub b fun b' hb' => a ♯ b' ♯ c) (blsub c fun b' x => a ♯ b ♯ b')) =\n    max (blsub a fun a' x => a' ♯ (b ♯ c))\n      (max (blsub b fun a' ha' => a ♯ (a' ♯ c)) (blsub c fun b' hb' => a ♯ (b ♯ b')))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_f\na✝ b✝ c✝ : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ (fun a' ha' => a' ♯ b ♯ c) = fun a' x => a' ♯ (b ♯ c)\n[PROOFSTEP]\next (d hd)\n[GOAL]\ncase e_a.e_a.e_f\na✝ b✝ c✝ : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ (fun b' hb' => a ♯ b' ♯ c) = fun a' ha' => a ♯ (a' ♯ c)\n[PROOFSTEP]\next (d hd)\n[GOAL]\ncase e_a.e_a.e_f\na✝ b✝ c✝ : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ (fun b' x => a ♯ b ♯ b') = fun b' hb' => a ♯ (b ♯ b')\n[PROOFSTEP]\next (d hd)\n[GOAL]\ncase e_a.e_f.h.h\na✝ b✝ c✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd : d < a\n⊢ d ♯ b ♯ c = d ♯ (b ♯ c)\n[PROOFSTEP]\napply nadd_assoc\n[GOAL]\ncase e_a.e_a.e_f.h.h\na✝ b✝ c✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd : d < b\n⊢ a ♯ d ♯ c = a ♯ (d ♯ c)\n[PROOFSTEP]\napply nadd_assoc\n[GOAL]\ncase e_a.e_a.e_f.h.h\na✝ b✝ c✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd : d < c\n⊢ a ♯ b ♯ d = a ♯ (b ♯ d)\n[PROOFSTEP]\napply nadd_assoc\n[GOAL]\ncase hf\na✝ b✝ c✝ : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ ∀ {i j : Ordinal.{u_1}}, i < b ♯ c → j < b ♯ c → i ≤ j → a ♯ i ≤ a ♯ j\n[PROOFSTEP]\nexact fun _ _ h => nadd_le_nadd_left h a\n[GOAL]\ncase hf\na✝ b✝ c✝ : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ ∀ {i j : Ordinal.{u_1}}, i < a ♯ b → j < a ♯ b → i ≤ j → i ♯ c ≤ j ♯ c\n[PROOFSTEP]\nexact fun _ _ h => nadd_le_nadd_right h c\n[GOAL]\na b c : Ordinal.{u}\n⊢ a ♯ 0 = a\n[PROOFSTEP]\ninduction' a using Ordinal.induction with a IH\n[GOAL]\ncase h\na✝ b c a : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < a → k ♯ 0 = k\n⊢ a ♯ 0 = a\n[PROOFSTEP]\nrw [nadd_def, blsub_zero, max_zero_right]\n[GOAL]\ncase h\na✝ b c a : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < a → k ♯ 0 = k\n⊢ (blsub a fun a' x => a' ♯ 0) = a\n[PROOFSTEP]\nconvert blsub_id a\n[GOAL]\ncase h.e'_2.h.e'_2.h.h\na✝ b c a : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < a → k ♯ 0 = k\nx✝¹ : Ordinal.{u}\nx✝ : x✝¹ < a\n⊢ x✝¹ ♯ 0 = x✝¹\n[PROOFSTEP]\nrename_i hb\n[GOAL]\ncase h.e'_2.h.e'_2.h.h\na✝ b c a : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < a → k ♯ 0 = k\nx✝ : Ordinal.{u}\nhb : x✝ < a\n⊢ x✝ ♯ 0 = x✝\n[PROOFSTEP]\nexact IH _ hb\n[GOAL]\na b c : Ordinal.{u}\n⊢ 0 ♯ a = a\n[PROOFSTEP]\nrw [nadd_comm, nadd_zero]\n[GOAL]\na b c : Ordinal.{u}\n⊢ a ♯ 1 = succ a\n[PROOFSTEP]\ninduction' a using Ordinal.induction with a IH\n[GOAL]\ncase h\na✝ b c a : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < a → k ♯ 1 = succ k\n⊢ a ♯ 1 = succ a\n[PROOFSTEP]\nrw [nadd_def, blsub_one, nadd_zero, max_eq_right_iff, blsub_le_iff]\n[GOAL]\ncase h\na✝ b c a : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < a → k ♯ 1 = succ k\n⊢ ∀ (i : Ordinal.{u}), i < a → i ♯ 1 < succ a\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h\na✝ b c a : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < a → k ♯ 1 = succ k\ni : Ordinal.{u}\nhi : i < a\n⊢ i ♯ 1 < succ a\n[PROOFSTEP]\nrwa [IH i hi, succ_lt_succ_iff]\n[GOAL]\na b c : Ordinal.{u}\n⊢ 1 ♯ a = succ a\n[PROOFSTEP]\nrw [nadd_comm, nadd_one]\n[GOAL]\na b c : Ordinal.{u}\n⊢ a ♯ succ b = succ (a ♯ b)\n[PROOFSTEP]\nrw [← nadd_one (a ♯ b), nadd_assoc, nadd_one]\n[GOAL]\na b c : Ordinal.{u}\n⊢ succ a ♯ b = succ (a ♯ b)\n[PROOFSTEP]\nrw [← one_nadd (a ♯ b), ← nadd_assoc, one_nadd]\n[GOAL]\na b c : Ordinal.{u}\nn : ℕ\n⊢ a ♯ ↑n = a + ↑n\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\na b c : Ordinal.{u}\n⊢ a ♯ ↑Nat.zero = a + ↑Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\na b c : Ordinal.{u}\nn : ℕ\nhn : a ♯ ↑n = a + ↑n\n⊢ a ♯ ↑(Nat.succ n) = a + ↑(Nat.succ n)\n[PROOFSTEP]\nrw [Nat.cast_succ, add_one_eq_succ, nadd_succ, add_succ, hn]\n[GOAL]\na b c : Ordinal.{u}\nn : ℕ\n⊢ ↑n ♯ a = a + ↑n\n[PROOFSTEP]\nrw [nadd_comm, nadd_nat]\n[GOAL]\na b c : Ordinal.{u}\n⊢ a + b ≤ a ♯ b\n[PROOFSTEP]\ninduction b using limitRecOn with\n| H₁ => simp\n| H₂ c h => rwa [add_succ, nadd_succ, succ_le_succ_iff]\n| H₃ c hc H =>\n  simp_rw [← IsNormal.blsub_eq.{u, u} (add_isNormal a) hc, blsub_le_iff]\n  exact fun i hi => (H i hi).trans_lt (nadd_lt_nadd_left hi a)\n[GOAL]\na b c : Ordinal.{u}\n⊢ a + b ≤ a ♯ b\n[PROOFSTEP]\ninduction b using limitRecOn with\n| H₁ => simp\n| H₂ c h => rwa [add_succ, nadd_succ, succ_le_succ_iff]\n| H₃ c hc H =>\n  simp_rw [← IsNormal.blsub_eq.{u, u} (add_isNormal a) hc, blsub_le_iff]\n  exact fun i hi => (H i hi).trans_lt (nadd_lt_nadd_left hi a)\n[GOAL]\ncase H₁\na b c : Ordinal.{u}\n⊢ a + 0 ≤ a ♯ 0\n[PROOFSTEP]\n\n| H₁ => simp\n[GOAL]\ncase H₁\na b c : Ordinal.{u}\n⊢ a + 0 ≤ a ♯ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H₂\na b c✝ c : Ordinal.{u}\nh : a + c ≤ a ♯ c\n⊢ a + succ c ≤ a ♯ succ c\n[PROOFSTEP]\n\n| H₂ c h => rwa [add_succ, nadd_succ, succ_le_succ_iff]\n[GOAL]\ncase H₂\na b c✝ c : Ordinal.{u}\nh : a + c ≤ a ♯ c\n⊢ a + succ c ≤ a ♯ succ c\n[PROOFSTEP]\nrwa [add_succ, nadd_succ, succ_le_succ_iff]\n[GOAL]\ncase H₃\na b c✝ c : Ordinal.{u}\nhc : IsLimit c\nH : ∀ (o' : Ordinal.{u}), o' < c → a + o' ≤ a ♯ o'\n⊢ a + c ≤ a ♯ c\n[PROOFSTEP]\n\n| H₃ c hc H =>\n  simp_rw [← IsNormal.blsub_eq.{u, u} (add_isNormal a) hc, blsub_le_iff]\n  exact fun i hi => (H i hi).trans_lt (nadd_lt_nadd_left hi a)\n[GOAL]\ncase H₃\na b c✝ c : Ordinal.{u}\nhc : IsLimit c\nH : ∀ (o' : Ordinal.{u}), o' < c → a + o' ≤ a ♯ o'\n⊢ a + c ≤ a ♯ c\n[PROOFSTEP]\nsimp_rw [← IsNormal.blsub_eq.{u, u} (add_isNormal a) hc, blsub_le_iff]\n[GOAL]\ncase H₃\na b c✝ c : Ordinal.{u}\nhc : IsLimit c\nH : ∀ (o' : Ordinal.{u}), o' < c → a + o' ≤ a ♯ o'\n⊢ ∀ (i : Ordinal.{u}), i < c → a + i < a ♯ c\n[PROOFSTEP]\nexact fun i hi => (H i hi).trans_lt (nadd_lt_nadd_left hi a)\n[GOAL]\na b c : NatOrdinal\nh : a + b ≤ a + c\n⊢ b ≤ c\n[PROOFSTEP]\nby_contra' h'\n[GOAL]\na b c : NatOrdinal\nh : a + b ≤ a + c\nh' : c < b\n⊢ False\n[PROOFSTEP]\nexact h.not_lt (add_lt_add_left h' a)\n[GOAL]\nn : ℕ\n⊢ ↑toOrdinal ↑n = ↑n\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\n⊢ ↑toOrdinal ↑Nat.zero = ↑Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nn : ℕ\nhn : ↑toOrdinal ↑n = ↑n\n⊢ ↑toOrdinal ↑(Nat.succ n) = ↑(Nat.succ n)\n[PROOFSTEP]\nchange (toOrdinal n) ♯ 1 = n + 1\n[GOAL]\ncase succ\nn : ℕ\nhn : ↑toOrdinal ↑n = ↑n\n⊢ ↑toOrdinal ↑n ♯ 1 = ↑n + 1\n[PROOFSTEP]\nrw [hn]\n[GOAL]\ncase succ\nn : ℕ\nhn : ↑toOrdinal ↑n = ↑n\n⊢ ↑n ♯ 1 = ↑n + 1\n[PROOFSTEP]\nexact nadd_one n\n[GOAL]\nn : ℕ\n⊢ ↑toNatOrdinal ↑n = ↑n\n[PROOFSTEP]\nrw [← toOrdinal_cast_nat n]\n[GOAL]\nn : ℕ\n⊢ ↑toNatOrdinal (↑toOrdinal ↑n) = ↑n\n[PROOFSTEP]\nrfl\n[GOAL]\na b : Ordinal.{u_1}\n⊢ a ≤ b ♯ a\n[PROOFSTEP]\nsimpa using nadd_le_nadd_right (Ordinal.zero_le b) a\n[GOAL]\na b : Ordinal.{u_1}\n⊢ a ≤ a ♯ b\n[PROOFSTEP]\nsimpa using nadd_le_nadd_left (Ordinal.zero_le b) a\n[GOAL]\na✝ b✝ c d : Ordinal.{u}\na b : Ordinal.{u_1}\n⊢ a ⨳ b = sInf {c | ∀ (a' : Ordinal.{u_1}), a' < a → ∀ (b' : Ordinal.{u_1}), b' < b → a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'}\n[PROOFSTEP]\nrw [nmul]\n[GOAL]\na b c d a' b' : Ordinal.{u}\nha : a' < a\nhb : b' < b\n⊢ a' ⨳ b ♯ a ⨳ b' < a ⨳ b ♯ a' ⨳ b'\n[PROOFSTEP]\nrw [nmul_def a b]\n[GOAL]\na b c d a' b' : Ordinal.{u}\nha : a' < a\nhb : b' < b\n⊢ a' ⨳ b ♯ a ⨳ b' <\n    sInf {c | ∀ (a' : Ordinal.{u}), a' < a → ∀ (b' : Ordinal.{u}), b' < b → a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'} ♯ a' ⨳ b'\n[PROOFSTEP]\nexact csInf_mem (nmul_nonempty a b) a' ha b' hb\n[GOAL]\na b c d a' b' : Ordinal.{u}\nha : a' ≤ a\nhb : b' ≤ b\n⊢ a' ⨳ b ♯ a ⨳ b' ≤ a ⨳ b ♯ a' ⨳ b'\n[PROOFSTEP]\nrcases lt_or_eq_of_le ha with (ha | rfl)\n[GOAL]\ncase inl\na b c d a' b' : Ordinal.{u}\nha✝ : a' ≤ a\nhb : b' ≤ b\nha : a' < a\n⊢ a' ⨳ b ♯ a ⨳ b' ≤ a ⨳ b ♯ a' ⨳ b'\n[PROOFSTEP]\nrcases lt_or_eq_of_le hb with (hb | rfl)\n[GOAL]\ncase inl.inl\na b c d a' b' : Ordinal.{u}\nha✝ : a' ≤ a\nhb✝ : b' ≤ b\nha : a' < a\nhb : b' < b\n⊢ a' ⨳ b ♯ a ⨳ b' ≤ a ⨳ b ♯ a' ⨳ b'\n[PROOFSTEP]\nexact (nmul_nadd_lt ha hb).le\n[GOAL]\ncase inl.inr\na c d a' b' : Ordinal.{u}\nha✝ : a' ≤ a\nha : a' < a\nhb : b' ≤ b'\n⊢ a' ⨳ b' ♯ a ⨳ b' ≤ a ⨳ b' ♯ a' ⨳ b'\n[PROOFSTEP]\nrw [nadd_comm]\n[GOAL]\ncase inr\nb c d a' b' : Ordinal.{u}\nhb : b' ≤ b\nha : a' ≤ a'\n⊢ a' ⨳ b ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a' ⨳ b'\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\na b c d : Ordinal.{u}\n⊢ c < a ⨳ b ↔ ∃ a', a' < a ∧ ∃ b', b' < b ∧ c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\n[PROOFSTEP]\nrefine' ⟨fun h => _, _⟩\n[GOAL]\ncase refine'_1\na b c d : Ordinal.{u}\nh : c < a ⨳ b\n⊢ ∃ a', a' < a ∧ ∃ b', b' < b ∧ c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\n[PROOFSTEP]\nrw [nmul] at h \n[GOAL]\ncase refine'_1\na b c d : Ordinal.{u}\nh : c < sInf {c | ∀ (a' : Ordinal.{u}), a' < a → ∀ (b' : Ordinal.{u}), b' < b → a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'}\n⊢ ∃ a', a' < a ∧ ∃ b', b' < b ∧ c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\n[PROOFSTEP]\nsimpa using not_mem_of_lt_csInf h ⟨0, fun _ _ => bot_le⟩\n[GOAL]\ncase refine'_2\na b c d : Ordinal.{u}\n⊢ (∃ a', a' < a ∧ ∃ b', b' < b ∧ c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b') → c < a ⨳ b\n[PROOFSTEP]\nrintro ⟨a', ha, b', hb, h⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\na b c d a' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nh : c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\n⊢ c < a ⨳ b\n[PROOFSTEP]\nhave := h.trans_lt (nmul_nadd_lt ha hb)\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\na b c d a' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nh : c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\nthis : c ♯ a' ⨳ b' < a ⨳ b ♯ a' ⨳ b'\n⊢ c < a ⨳ b\n[PROOFSTEP]\nrwa [nadd_lt_nadd_iff_right] at this \n[GOAL]\na b c d : Ordinal.{u}\n⊢ a ⨳ b ≤ c ↔ ∀ (a' : Ordinal.{u}), a' < a → ∀ (b' : Ordinal.{u}), b' < b → a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'\n[PROOFSTEP]\nrw [← not_iff_not]\n[GOAL]\na b c d : Ordinal.{u}\n⊢ ¬a ⨳ b ≤ c ↔ ¬∀ (a' : Ordinal.{u}), a' < a → ∀ (b' : Ordinal.{u}), b' < b → a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'\n[PROOFSTEP]\nsimp [lt_nmul_iff]\n[GOAL]\na✝ b✝ c d : Ordinal.{u}\na b : Ordinal.{u_1}\n⊢ a ⨳ b = b ⨳ a\n[PROOFSTEP]\nrw [nmul, nmul]\n[GOAL]\na✝ b✝ c d : Ordinal.{u}\na b : Ordinal.{u_1}\n⊢ sInf {c | ∀ (a' : Ordinal.{u_1}), a' < a → ∀ (b' : Ordinal.{u_1}), b' < b → a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'} =\n    sInf {c | ∀ (a' : Ordinal.{u_1}), a' < b → ∀ (b' : Ordinal.{u_1}), b' < a → a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'}\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\na✝ b✝ c d : Ordinal.{u}\na b : Ordinal.{u_1}\n⊢ {c | ∀ (a' : Ordinal.{u_1}), a' < a → ∀ (b' : Ordinal.{u_1}), b' < b → a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'} =\n    {c | ∀ (a' : Ordinal.{u_1}), a' < b → ∀ (b' : Ordinal.{u_1}), b' < a → a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'}\n[PROOFSTEP]\next x\n[GOAL]\ncase e_a.h\na✝ b✝ c d : Ordinal.{u}\na b x : Ordinal.{u_1}\n⊢ x ∈ {c | ∀ (a' : Ordinal.{u_1}), a' < a → ∀ (b' : Ordinal.{u_1}), b' < b → a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'} ↔\n    x ∈ {c | ∀ (a' : Ordinal.{u_1}), a' < b → ∀ (b' : Ordinal.{u_1}), b' < a → a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase e_a.h.mp\na✝ b✝ c d : Ordinal.{u}\na b x : Ordinal.{u_1}\n⊢ x ∈ {c | ∀ (a' : Ordinal.{u_1}), a' < a → ∀ (b' : Ordinal.{u_1}), b' < b → a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'} →\n    x ∈ {c | ∀ (a' : Ordinal.{u_1}), a' < b → ∀ (b' : Ordinal.{u_1}), b' < a → a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'}\n[PROOFSTEP]\nintro H c hc d hd\n[GOAL]\ncase e_a.h.mpr\na✝ b✝ c d : Ordinal.{u}\na b x : Ordinal.{u_1}\n⊢ x ∈ {c | ∀ (a' : Ordinal.{u_1}), a' < b → ∀ (b' : Ordinal.{u_1}), b' < a → a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'} →\n    x ∈ {c | ∀ (a' : Ordinal.{u_1}), a' < a → ∀ (b' : Ordinal.{u_1}), b' < b → a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'}\n[PROOFSTEP]\nintro H c hc d hd\n[GOAL]\ncase e_a.h.mp\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b x : Ordinal.{u_1}\nH : x ∈ {c | ∀ (a' : Ordinal.{u_1}), a' < a → ∀ (b' : Ordinal.{u_1}), b' < b → a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'}\nc : Ordinal.{u_1}\nhc : c < b\nd : Ordinal.{u_1}\nhd : d < a\n⊢ c ⨳ a ♯ b ⨳ d < x ♯ c ⨳ d\n[PROOFSTEP]\nrw [nadd_comm, ← nmul_comm d b, ← nmul_comm a c, ← nmul_comm d]\n[GOAL]\ncase e_a.h.mp\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b x : Ordinal.{u_1}\nH : x ∈ {c | ∀ (a' : Ordinal.{u_1}), a' < a → ∀ (b' : Ordinal.{u_1}), b' < b → a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'}\nc : Ordinal.{u_1}\nhc : c < b\nd : Ordinal.{u_1}\nhd : d < a\n⊢ d ⨳ b ♯ a ⨳ c < x ♯ d ⨳ c\n[PROOFSTEP]\nexact H _ hd _ hc\n[GOAL]\ncase e_a.h.mpr\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b x : Ordinal.{u_1}\nH : x ∈ {c | ∀ (a' : Ordinal.{u_1}), a' < b → ∀ (b' : Ordinal.{u_1}), b' < a → a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'}\nc : Ordinal.{u_1}\nhc : c < a\nd : Ordinal.{u_1}\nhd : d < b\n⊢ c ⨳ b ♯ a ⨳ d < x ♯ c ⨳ d\n[PROOFSTEP]\nrw [nadd_comm, nmul_comm a d, nmul_comm c, nmul_comm c]\n[GOAL]\ncase e_a.h.mpr\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b x : Ordinal.{u_1}\nH : x ∈ {c | ∀ (a' : Ordinal.{u_1}), a' < b → ∀ (b' : Ordinal.{u_1}), b' < a → a' ⨳ a ♯ b ⨳ b' < c ♯ a' ⨳ b'}\nc : Ordinal.{u_1}\nhc : c < a\nd : Ordinal.{u_1}\nhd : d < b\n⊢ d ⨳ a ♯ b ⨳ c < x ♯ d ⨳ c\n[PROOFSTEP]\nexact H _ hd _ hc\n[GOAL]\na✝ b c d : Ordinal.{u}\na : Ordinal.{u_1}\n⊢ a ⨳ 0 = 0\n[PROOFSTEP]\nrw [← Ordinal.le_zero, nmul_le_iff]\n[GOAL]\na✝ b c d : Ordinal.{u}\na : Ordinal.{u_1}\n⊢ ∀ (a' : Ordinal.{u_1}), a' < a → ∀ (b' : Ordinal.{u_1}), b' < 0 → a' ⨳ 0 ♯ a ⨳ b' < 0 ♯ a' ⨳ b'\n[PROOFSTEP]\nexact fun _ _ a ha => (Ordinal.not_lt_zero a ha).elim\n[GOAL]\na✝ b c d : Ordinal.{u}\na : Ordinal.{u_1}\n⊢ 0 ⨳ a = 0\n[PROOFSTEP]\nrw [nmul_comm, nmul_zero]\n[GOAL]\na✝ b c d : Ordinal.{u}\na : Ordinal.{u_1}\n⊢ a ⨳ 1 = a\n[PROOFSTEP]\nrw [nmul]\n[GOAL]\na✝ b c d : Ordinal.{u}\na : Ordinal.{u_1}\n⊢ sInf {c | ∀ (a' : Ordinal.{u_1}), a' < a → ∀ (b' : Ordinal.{u_1}), b' < 1 → a' ⨳ 1 ♯ a ⨳ b' < c ♯ a' ⨳ b'} = a\n[PROOFSTEP]\nsimp only [lt_one_iff_zero, forall_eq, nmul_zero, nadd_zero]\n[GOAL]\na✝ b c d : Ordinal.{u}\na : Ordinal.{u_1}\n⊢ sInf {c | ∀ (a' : Ordinal.{u_1}), a' < a → a' ⨳ 1 < c} = a\n[PROOFSTEP]\nconvert csInf_Ici (α := Ordinal)\n[GOAL]\ncase h.e'_2.h.e'_3\na✝ b c d : Ordinal.{u}\na : Ordinal.{u_1}\n⊢ {c | ∀ (a' : Ordinal.{u_1}), a' < a → a' ⨳ 1 < c} = Set.Ici a\n[PROOFSTEP]\next b\n[GOAL]\ncase h.e'_2.h.e'_3.h\na✝ b✝ c d : Ordinal.{u}\na b : Ordinal.{u_1}\n⊢ b ∈ {c | ∀ (a' : Ordinal.{u_1}), a' < a → a' ⨳ 1 < c} ↔ b ∈ Set.Ici a\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, Set.mem_Ici]\n[GOAL]\ncase h.e'_2.h.e'_3.h\na✝ b✝ c d : Ordinal.{u}\na b : Ordinal.{u_1}\n⊢ (∀ (a' : Ordinal.{u_1}), a' < a → a' ⨳ 1 < b) ↔ a ≤ b\n[PROOFSTEP]\nrefine'\n  ⟨fun H => le_of_forall_lt fun c hc => _, fun ha c hc => _⟩\n    -- Porting note: had to add arguments to `nmul_one` in the next two lines\n      -- for the termination checker.\n[GOAL]\ncase h.e'_2.h.e'_3.h.refine'_1\na✝ b✝ c✝ d : Ordinal.{u}\na b : Ordinal.{u_1}\nH : ∀ (a' : Ordinal.{u_1}), a' < a → a' ⨳ 1 < b\nc : Ordinal.{u_1}\nhc : c < a\n⊢ c < b\n[PROOFSTEP]\nsimpa only [nmul_one c] using H c hc\n[GOAL]\ncase h.e'_2.h.e'_3.h.refine'_2\na✝ b✝ c✝ d : Ordinal.{u}\na b : Ordinal.{u_1}\nha : a ≤ b\nc : Ordinal.{u_1}\nhc : c < a\n⊢ c ⨳ 1 < b\n[PROOFSTEP]\nsimpa only [nmul_one c] using hc.trans_le ha\n[GOAL]\na✝ b c d : Ordinal.{u}\na : Ordinal.{u_1}\n⊢ 1 ⨳ a = a\n[PROOFSTEP]\nrw [nmul_comm, nmul_one]\n[GOAL]\na b c d : Ordinal.{u}\nh₁ : a < b\nh₂ : 0 < c\n⊢ c ⨳ a ♯ 0 ⨳ a ≤ 0 ⨳ b ♯ c ⨳ a\n[PROOFSTEP]\nsimp\n[GOAL]\na b c d : Ordinal.{u}\nh₁ : a < b\nh₂ : 0 < c\n⊢ a ⨳ c ♯ a ⨳ 0 ≤ a ⨳ c ♯ b ⨳ 0\n[PROOFSTEP]\nsimp\n[GOAL]\na b c d : Ordinal.{u}\nh₁ : a ≤ b\nh₂ : 0 ≤ c\n⊢ c ⨳ a ≤ c ⨳ b\n[PROOFSTEP]\nrcases lt_or_eq_of_le h₁ with (h₁ | rfl)\n[GOAL]\ncase inl\na b c d : Ordinal.{u}\nh₁✝ : a ≤ b\nh₂ : 0 ≤ c\nh₁ : a < b\n⊢ c ⨳ a ≤ c ⨳ b\n[PROOFSTEP]\nrcases lt_or_eq_of_le h₂ with (h₂ | rfl)\n[GOAL]\ncase inr\na c d : Ordinal.{u}\nh₂ : 0 ≤ c\nh₁ : a ≤ a\n⊢ c ⨳ a ≤ c ⨳ a\n[PROOFSTEP]\nrcases lt_or_eq_of_le h₂ with (h₂ | rfl)\n[GOAL]\ncase inl.inl\na b c d : Ordinal.{u}\nh₁✝ : a ≤ b\nh₂✝ : 0 ≤ c\nh₁ : a < b\nh₂ : 0 < c\n⊢ c ⨳ a ≤ c ⨳ b\n[PROOFSTEP]\nexact (nmul_lt_nmul_of_pos_left h₁ h₂).le\n[GOAL]\ncase inl.inr\na b d : Ordinal.{u}\nh₁✝ : a ≤ b\nh₁ : a < b\nh₂ : 0 ≤ 0\n⊢ 0 ⨳ a ≤ 0 ⨳ b\ncase inr.inl\na c d : Ordinal.{u}\nh₂✝ : 0 ≤ c\nh₁ : a ≤ a\nh₂ : 0 < c\n⊢ c ⨳ a ≤ c ⨳ a\ncase inr.inr a d : Ordinal.{u} h₁ : a ≤ a h₂ : 0 ≤ 0 ⊢ 0 ⨳ a ≤ 0 ⨳ a\n[PROOFSTEP]\nall_goals simp\n[GOAL]\ncase inl.inr\na b d : Ordinal.{u}\nh₁✝ : a ≤ b\nh₁ : a < b\nh₂ : 0 ≤ 0\n⊢ 0 ⨳ a ≤ 0 ⨳ b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inl\na c d : Ordinal.{u}\nh₂✝ : 0 ≤ c\nh₁ : a ≤ a\nh₂ : 0 < c\n⊢ c ⨳ a ≤ c ⨳ a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\na d : Ordinal.{u}\nh₁ : a ≤ a\nh₂ : 0 ≤ 0\n⊢ 0 ⨳ a ≤ 0 ⨳ a\n[PROOFSTEP]\nsimp\n[GOAL]\na b c d : Ordinal.{u}\nh₁ : a ≤ b\nh₂ : 0 ≤ c\n⊢ a ⨳ c ≤ b ⨳ c\n[PROOFSTEP]\nrw [nmul_comm, nmul_comm b]\n[GOAL]\na b c d : Ordinal.{u}\nh₁ : a ≤ b\nh₂ : 0 ≤ c\n⊢ c ⨳ a ≤ c ⨳ b\n[PROOFSTEP]\nexact nmul_le_nmul_of_nonneg_left h₁ h₂\n[GOAL]\na✝ b✝ c✝ d : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c\n[PROOFSTEP]\nrefine le_antisymm (nmul_le_iff.2 fun a' ha d hd => ?_) (nadd_le_iff.2 ⟨fun d hd => ?_, fun d hd => ?_⟩)\n[GOAL]\ncase refine_1\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nd : Ordinal.{u_1}\nhd : d < b ♯ c\n⊢ a' ⨳ (b ♯ c) ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d\n[PROOFSTEP]\nrw [nmul_nadd a' b c]\n[GOAL]\ncase refine_1\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nd : Ordinal.{u_1}\nhd : d < b ♯ c\n⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d\n[PROOFSTEP]\nrcases lt_nadd_iff.1 hd with (⟨b', hb, hd⟩ | ⟨c', hc, hd⟩)\n[GOAL]\ncase refine_1.inl.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nd : Ordinal.{u_1}\nhd✝ : d < b ♯ c\nb' : Ordinal.{u_1}\nhb : b' < b\nhd : d ≤ b' ♯ c\n⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d\n[PROOFSTEP]\nhave :=\n  nadd_lt_nadd_of_lt_of_le (nmul_nadd_lt ha hb)\n    (nmul_nadd_le ha.le hd)\n      -- Porting note: adding arguments to `nmul_nadd` for the termination checker.\n[GOAL]\ncase refine_1.inl.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nd : Ordinal.{u_1}\nhd✝ : d < b ♯ c\nb' : Ordinal.{u_1}\nhb : b' < b\nhd : d ≤ b' ♯ c\nthis : a' ⨳ b ♯ a ⨳ b' ♯ (a' ⨳ (b' ♯ c) ♯ a ⨳ d) < a ⨳ b ♯ a' ⨳ b' ♯ (a ⨳ (b' ♯ c) ♯ a' ⨳ d)\n⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d\n[PROOFSTEP]\nrw [nmul_nadd a' b' c, nmul_nadd a b' c] at this \n[GOAL]\ncase refine_1.inl.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nd : Ordinal.{u_1}\nhd✝ : d < b ♯ c\nb' : Ordinal.{u_1}\nhb : b' < b\nhd : d ≤ b' ♯ c\nthis : a' ⨳ b ♯ a ⨳ b' ♯ (a' ⨳ b' ♯ a' ⨳ c ♯ a ⨳ d) < a ⨳ b ♯ a' ⨳ b' ♯ (a ⨳ b' ♯ a ⨳ c ♯ a' ⨳ d)\n⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d\n[PROOFSTEP]\nsimp only [nadd_assoc] at this \n[GOAL]\ncase refine_1.inl.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nd : Ordinal.{u_1}\nhd✝ : d < b ♯ c\nb' : Ordinal.{u_1}\nhb : b' < b\nhd : d ≤ b' ♯ c\nthis : a' ⨳ b ♯ (a ⨳ b' ♯ (a' ⨳ b' ♯ (a' ⨳ c ♯ a ⨳ d))) < a ⨳ b ♯ (a' ⨳ b' ♯ (a ⨳ b' ♯ (a ⨳ c ♯ a' ⨳ d)))\n⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d\n[PROOFSTEP]\nrwa [nadd_left_comm, nadd_left_comm _ (a ⨳ b'), nadd_left_comm (a ⨳ b), nadd_lt_nadd_iff_left, nadd_left_comm (a' ⨳ b),\n  nadd_left_comm (a ⨳ b), nadd_lt_nadd_iff_left, ← nadd_assoc, ← nadd_assoc] at this \n[GOAL]\ncase refine_1.inr.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nd : Ordinal.{u_1}\nhd✝ : d < b ♯ c\nc' : Ordinal.{u_1}\nhc : c' < c\nhd : d ≤ b ♯ c'\n⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d\n[PROOFSTEP]\nhave :=\n  nadd_lt_nadd_of_le_of_lt (nmul_nadd_le ha.le hd)\n    (nmul_nadd_lt ha hc)\n      -- Porting note: adding arguments to `nmul_nadd` for the termination checker.\n[GOAL]\ncase refine_1.inr.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nd : Ordinal.{u_1}\nhd✝ : d < b ♯ c\nc' : Ordinal.{u_1}\nhc : c' < c\nhd : d ≤ b ♯ c'\nthis : a' ⨳ (b ♯ c') ♯ a ⨳ d ♯ (a' ⨳ c ♯ a ⨳ c') < a ⨳ (b ♯ c') ♯ a' ⨳ d ♯ (a ⨳ c ♯ a' ⨳ c')\n⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d\n[PROOFSTEP]\nrw [nmul_nadd a' b c', nmul_nadd a b c'] at this \n[GOAL]\ncase refine_1.inr.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nd : Ordinal.{u_1}\nhd✝ : d < b ♯ c\nc' : Ordinal.{u_1}\nhc : c' < c\nhd : d ≤ b ♯ c'\nthis : a' ⨳ b ♯ a' ⨳ c' ♯ a ⨳ d ♯ (a' ⨳ c ♯ a ⨳ c') < a ⨳ b ♯ a ⨳ c' ♯ a' ⨳ d ♯ (a ⨳ c ♯ a' ⨳ c')\n⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d\n[PROOFSTEP]\nsimp only [nadd_assoc] at this \n[GOAL]\ncase refine_1.inr.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nd : Ordinal.{u_1}\nhd✝ : d < b ♯ c\nc' : Ordinal.{u_1}\nhc : c' < c\nhd : d ≤ b ♯ c'\nthis : a' ⨳ b ♯ (a' ⨳ c' ♯ (a ⨳ d ♯ (a' ⨳ c ♯ a ⨳ c'))) < a ⨳ b ♯ (a ⨳ c' ♯ (a' ⨳ d ♯ (a ⨳ c ♯ a' ⨳ c')))\n⊢ a' ⨳ b ♯ a' ⨳ c ♯ a ⨳ d < a ⨳ b ♯ a ⨳ c ♯ a' ⨳ d\n[PROOFSTEP]\nrwa [nadd_left_comm, nadd_comm (a ⨳ c), nadd_left_comm (a' ⨳ d), nadd_left_comm (a ⨳ c'), nadd_left_comm (a ⨳ b),\n  nadd_lt_nadd_iff_left, nadd_comm (a' ⨳ c), nadd_left_comm (a ⨳ d), nadd_left_comm (a' ⨳ b), nadd_left_comm (a ⨳ b),\n  nadd_lt_nadd_iff_left, nadd_comm (a ⨳ d), nadd_comm (a' ⨳ d), ← nadd_assoc, ← nadd_assoc] at this \n[GOAL]\ncase refine_2\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd : d < a ⨳ b\n⊢ d ♯ a ⨳ c < a ⨳ (b ♯ c)\n[PROOFSTEP]\nrcases lt_nmul_iff.1 hd with ⟨a', ha, b', hb, hd⟩\n[GOAL]\ncase refine_2.intro.intro.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd✝ : d < a ⨳ b\na' : Ordinal.{u_1}\nha : a' < a\nb' : Ordinal.{u_1}\nhb : b' < b\nhd : d ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\n⊢ d ♯ a ⨳ c < a ⨳ (b ♯ c)\n[PROOFSTEP]\nhave :=\n  nadd_lt_nadd_of_le_of_lt hd\n    (nmul_nadd_lt ha (nadd_lt_nadd_right hb c))\n      -- Porting note: adding arguments to `nmul_nadd` for the termination checker.\n[GOAL]\ncase refine_2.intro.intro.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd✝ : d < a ⨳ b\na' : Ordinal.{u_1}\nha : a' < a\nb' : Ordinal.{u_1}\nhb : b' < b\nhd : d ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\nthis : d ♯ a' ⨳ b' ♯ (a' ⨳ (b ♯ c) ♯ a ⨳ (b' ♯ c)) < a' ⨳ b ♯ a ⨳ b' ♯ (a ⨳ (b ♯ c) ♯ a' ⨳ (b' ♯ c))\n⊢ d ♯ a ⨳ c < a ⨳ (b ♯ c)\n[PROOFSTEP]\nrw [nmul_nadd a' b c, nmul_nadd a b' c, nmul_nadd a'] at this \n[GOAL]\ncase refine_2.intro.intro.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd✝ : d < a ⨳ b\na' : Ordinal.{u_1}\nha : a' < a\nb' : Ordinal.{u_1}\nhb : b' < b\nhd : d ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\nthis : d ♯ a' ⨳ b' ♯ (a' ⨳ b ♯ a' ⨳ c ♯ (a ⨳ b' ♯ a ⨳ c)) < a' ⨳ b ♯ a ⨳ b' ♯ (a ⨳ (b ♯ c) ♯ (a' ⨳ b' ♯ a' ⨳ c))\n⊢ d ♯ a ⨳ c < a ⨳ (b ♯ c)\n[PROOFSTEP]\nsimp only [nadd_assoc] at this \n[GOAL]\ncase refine_2.intro.intro.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd✝ : d < a ⨳ b\na' : Ordinal.{u_1}\nha : a' < a\nb' : Ordinal.{u_1}\nhb : b' < b\nhd : d ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\nthis : d ♯ (a' ⨳ b' ♯ (a' ⨳ b ♯ (a' ⨳ c ♯ (a ⨳ b' ♯ a ⨳ c)))) < a' ⨳ b ♯ (a ⨳ b' ♯ (a ⨳ (b ♯ c) ♯ (a' ⨳ b' ♯ a' ⨳ c)))\n⊢ d ♯ a ⨳ c < a ⨳ (b ♯ c)\n[PROOFSTEP]\nrwa [nadd_left_comm (a' ⨳ b'), nadd_left_comm, nadd_lt_nadd_iff_left, nadd_left_comm, nadd_left_comm _ (a' ⨳ b'),\n  nadd_left_comm (a ⨳ b'), nadd_lt_nadd_iff_left, nadd_left_comm (a' ⨳ c), nadd_left_comm, nadd_lt_nadd_iff_left,\n  nadd_left_comm, nadd_comm _ (a' ⨳ c), nadd_lt_nadd_iff_left] at this \n[GOAL]\ncase refine_3\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd : d < a ⨳ c\n⊢ a ⨳ b ♯ d < a ⨳ (b ♯ c)\n[PROOFSTEP]\nrcases lt_nmul_iff.1 hd with ⟨a', ha, c', hc, hd⟩\n[GOAL]\ncase refine_3.intro.intro.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd✝ : d < a ⨳ c\na' : Ordinal.{u_1}\nha : a' < a\nc' : Ordinal.{u_1}\nhc : c' < c\nhd : d ♯ a' ⨳ c' ≤ a' ⨳ c ♯ a ⨳ c'\n⊢ a ⨳ b ♯ d < a ⨳ (b ♯ c)\n[PROOFSTEP]\nhave := nadd_lt_nadd_of_lt_of_le (nmul_nadd_lt ha (nadd_lt_nadd_left hc b)) hd\n[GOAL]\ncase refine_3.intro.intro.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd✝ : d < a ⨳ c\na' : Ordinal.{u_1}\nha : a' < a\nc' : Ordinal.{u_1}\nhc : c' < c\nhd : d ♯ a' ⨳ c' ≤ a' ⨳ c ♯ a ⨳ c'\nthis : a' ⨳ (b ♯ c) ♯ a ⨳ (b ♯ c') ♯ (d ♯ a' ⨳ c') < a ⨳ (b ♯ c) ♯ a' ⨳ (b ♯ c') ♯ (a' ⨳ c ♯ a ⨳ c')\n⊢ a ⨳ b ♯ d < a ⨳ (b ♯ c)\n[PROOFSTEP]\nrw [nmul_nadd a' b c, nmul_nadd a b c', nmul_nadd a'] at this \n[GOAL]\ncase refine_3.intro.intro.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd✝ : d < a ⨳ c\na' : Ordinal.{u_1}\nha : a' < a\nc' : Ordinal.{u_1}\nhc : c' < c\nhd : d ♯ a' ⨳ c' ≤ a' ⨳ c ♯ a ⨳ c'\nthis : a' ⨳ b ♯ a' ⨳ c ♯ (a ⨳ b ♯ a ⨳ c') ♯ (d ♯ a' ⨳ c') < a ⨳ (b ♯ c) ♯ (a' ⨳ b ♯ a' ⨳ c') ♯ (a' ⨳ c ♯ a ⨳ c')\n⊢ a ⨳ b ♯ d < a ⨳ (b ♯ c)\n[PROOFSTEP]\nsimp only [nadd_assoc] at this \n[GOAL]\ncase refine_3.intro.intro.intro.intro\na✝ b✝ c✝ d✝ : Ordinal.{u}\na b c d : Ordinal.{u_1}\nhd✝ : d < a ⨳ c\na' : Ordinal.{u_1}\nha : a' < a\nc' : Ordinal.{u_1}\nhc : c' < c\nhd : d ♯ a' ⨳ c' ≤ a' ⨳ c ♯ a ⨳ c'\nthis : a' ⨳ b ♯ (a' ⨳ c ♯ (a ⨳ b ♯ (a ⨳ c' ♯ (d ♯ a' ⨳ c')))) < a ⨳ (b ♯ c) ♯ (a' ⨳ b ♯ (a' ⨳ c' ♯ (a' ⨳ c ♯ a ⨳ c')))\n⊢ a ⨳ b ♯ d < a ⨳ (b ♯ c)\n[PROOFSTEP]\nrwa [nadd_left_comm _ (a' ⨳ b), nadd_lt_nadd_iff_left, nadd_left_comm (a' ⨳ c'), nadd_left_comm _ (a' ⨳ c),\n  nadd_lt_nadd_iff_left, nadd_left_comm, nadd_comm (a' ⨳ c'), nadd_left_comm _ (a ⨳ c'), nadd_lt_nadd_iff_left,\n  nadd_comm _ (a' ⨳ c'), nadd_comm _ (a' ⨳ c'), nadd_left_comm, nadd_lt_nadd_iff_left] at this \n[GOAL]\na✝ b✝ c✝ d : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ (a ♯ b) ⨳ c = a ⨳ c ♯ b ⨳ c\n[PROOFSTEP]\nrw [nmul_comm, nmul_nadd, nmul_comm, nmul_comm c]\n[GOAL]\na b c d a' b' c' : Ordinal.{u}\nha : a' < a\nhb : b' < b\nhc : c' < c\n⊢ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c' < a ⨳ b ⨳ c ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c'\n[PROOFSTEP]\nsimpa only [nadd_nmul, ← nadd_assoc] using nmul_nadd_lt (nmul_nadd_lt ha hb) hc\n[GOAL]\na b c d a' b' c' : Ordinal.{u}\nha : a' ≤ a\nhb : b' ≤ b\nhc : c' ≤ c\n⊢ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c' ≤ a ⨳ b ⨳ c ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c'\n[PROOFSTEP]\nsimpa only [nadd_nmul, ← nadd_assoc] using nmul_nadd_le (nmul_nadd_le ha hb) hc\n[GOAL]\na b c d a' b' c' : Ordinal.{u}\nha : a' < a\nhb : b' < b\nhc : c' < c\n⊢ a' ⨳ (b ⨳ c) ♯ a ⨳ (b' ⨳ c) ♯ a ⨳ (b ⨳ c') ♯ a' ⨳ (b' ⨳ c') <\n    a ⨳ (b ⨳ c) ♯ a' ⨳ (b' ⨳ c) ♯ a' ⨳ (b ⨳ c') ♯ a ⨳ (b' ⨳ c')\n[PROOFSTEP]\nsimp only [nmul_comm _ (_ ⨳ _)]\n[GOAL]\na b c d a' b' c' : Ordinal.{u}\nha : a' < a\nhb : b' < b\nhc : c' < c\n⊢ b ⨳ c ⨳ a' ♯ b' ⨳ c ⨳ a ♯ b ⨳ c' ⨳ a ♯ b' ⨳ c' ⨳ a' < b ⨳ c ⨳ a ♯ b' ⨳ c ⨳ a' ♯ b ⨳ c' ⨳ a' ♯ b' ⨳ c' ⨳ a\n[PROOFSTEP]\nconvert nmul_nadd_lt₃ hb hc ha using 1\n[GOAL]\ncase h.e'_3\na b c d a' b' c' : Ordinal.{u}\nha : a' < a\nhb : b' < b\nhc : c' < c\n⊢ b ⨳ c ⨳ a' ♯ b' ⨳ c ⨳ a ♯ b ⨳ c' ⨳ a ♯ b' ⨳ c' ⨳ a' = b' ⨳ c ⨳ a ♯ b ⨳ c' ⨳ a ♯ b ⨳ c ⨳ a' ♯ b' ⨳ c' ⨳ a'\n[PROOFSTEP]\nsimp only [nadd_eq_add, NatOrdinal.toOrdinal_toNatOrdinal]\n[GOAL]\ncase h.e'_3\na b c d a' b' c' : Ordinal.{u}\nha : a' < a\nhb : b' < b\nhc : c' < c\n⊢ ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ a') + ↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a')) =\n    ↑toOrdinal\n      (↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ a') +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a'))\n[PROOFSTEP]\nabel_nf\n[GOAL]\ncase h.e'_4\na b c d a' b' c' : Ordinal.{u}\nha : a' < a\nhb : b' < b\nhc : c' < c\n⊢ b ⨳ c ⨳ a ♯ b' ⨳ c ⨳ a' ♯ b ⨳ c' ⨳ a' ♯ b' ⨳ c' ⨳ a = b ⨳ c ⨳ a ♯ b' ⨳ c' ⨳ a ♯ b' ⨳ c ⨳ a' ♯ b ⨳ c' ⨳ a'\n[PROOFSTEP]\nsimp only [nadd_eq_add, NatOrdinal.toOrdinal_toNatOrdinal]\n[GOAL]\ncase h.e'_4\na b c d a' b' c' : Ordinal.{u}\nha : a' < a\nhb : b' < b\nhc : c' < c\n⊢ ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ a) + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a') +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a)) =\n    ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ a) + ↑toNatOrdinal (b' ⨳ c' ⨳ a) + ↑toNatOrdinal (b' ⨳ c ⨳ a') +\n        ↑toNatOrdinal (b ⨳ c' ⨳ a'))\n[PROOFSTEP]\nabel_nf\n[GOAL]\na b c d a' b' c' : Ordinal.{u}\nha : a' ≤ a\nhb : b' ≤ b\nhc : c' ≤ c\n⊢ a' ⨳ (b ⨳ c) ♯ a ⨳ (b' ⨳ c) ♯ a ⨳ (b ⨳ c') ♯ a' ⨳ (b' ⨳ c') ≤\n    a ⨳ (b ⨳ c) ♯ a' ⨳ (b' ⨳ c) ♯ a' ⨳ (b ⨳ c') ♯ a ⨳ (b' ⨳ c')\n[PROOFSTEP]\nsimp only [nmul_comm _ (_ ⨳ _)]\n[GOAL]\na b c d a' b' c' : Ordinal.{u}\nha : a' ≤ a\nhb : b' ≤ b\nhc : c' ≤ c\n⊢ b ⨳ c ⨳ a' ♯ b' ⨳ c ⨳ a ♯ b ⨳ c' ⨳ a ♯ b' ⨳ c' ⨳ a' ≤ b ⨳ c ⨳ a ♯ b' ⨳ c ⨳ a' ♯ b ⨳ c' ⨳ a' ♯ b' ⨳ c' ⨳ a\n[PROOFSTEP]\nconvert nmul_nadd_le₃ hb hc ha using 1\n[GOAL]\ncase h.e'_3\na b c d a' b' c' : Ordinal.{u}\nha : a' ≤ a\nhb : b' ≤ b\nhc : c' ≤ c\n⊢ b ⨳ c ⨳ a' ♯ b' ⨳ c ⨳ a ♯ b ⨳ c' ⨳ a ♯ b' ⨳ c' ⨳ a' = b' ⨳ c ⨳ a ♯ b ⨳ c' ⨳ a ♯ b ⨳ c ⨳ a' ♯ b' ⨳ c' ⨳ a'\n[PROOFSTEP]\nsimp only [nadd_eq_add, NatOrdinal.toOrdinal_toNatOrdinal]\n[GOAL]\ncase h.e'_3\na b c d a' b' c' : Ordinal.{u}\nha : a' ≤ a\nhb : b' ≤ b\nhc : c' ≤ c\n⊢ ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ a') + ↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a')) =\n    ↑toOrdinal\n      (↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ a') +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a'))\n[PROOFSTEP]\nabel_nf\n[GOAL]\ncase h.e'_4\na b c d a' b' c' : Ordinal.{u}\nha : a' ≤ a\nhb : b' ≤ b\nhc : c' ≤ c\n⊢ b ⨳ c ⨳ a ♯ b' ⨳ c ⨳ a' ♯ b ⨳ c' ⨳ a' ♯ b' ⨳ c' ⨳ a = b ⨳ c ⨳ a ♯ b' ⨳ c' ⨳ a ♯ b' ⨳ c ⨳ a' ♯ b ⨳ c' ⨳ a'\n[PROOFSTEP]\nsimp only [nadd_eq_add, NatOrdinal.toOrdinal_toNatOrdinal]\n[GOAL]\ncase h.e'_4\na b c d a' b' c' : Ordinal.{u}\nha : a' ≤ a\nhb : b' ≤ b\nhc : c' ≤ c\n⊢ ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ a) + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a') +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a)) =\n    ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ a) + ↑toNatOrdinal (b' ⨳ c' ⨳ a) + ↑toNatOrdinal (b' ⨳ c ⨳ a') +\n        ↑toNatOrdinal (b ⨳ c' ⨳ a'))\n[PROOFSTEP]\nabel_nf\n[GOAL]\na b c d : Ordinal.{u}\n⊢ d < a ⨳ b ⨳ c ↔\n    ∃ a',\n      a' < a ∧\n        ∃ b',\n          b' < b ∧\n            ∃ c',\n              c' < c ∧ d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\na b c d : Ordinal.{u}\n⊢ d < a ⨳ b ⨳ c →\n    ∃ a',\n      a' < a ∧\n        ∃ b',\n          b' < b ∧\n            ∃ c',\n              c' < c ∧ d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\na b c d : Ordinal.{u}\nh : d < a ⨳ b ⨳ c\n⊢ ∃ a',\n    a' < a ∧\n      ∃ b',\n        b' < b ∧\n          ∃ c',\n            c' < c ∧ d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\n[PROOFSTEP]\nrcases lt_nmul_iff.1 h with ⟨e, he, c', hc, H₁⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\na b c d : Ordinal.{u}\nh : d < a ⨳ b ⨳ c\ne : Ordinal.{u}\nhe : e < a ⨳ b\nc' : Ordinal.{u}\nhc : c' < c\nH₁ : d ♯ e ⨳ c' ≤ e ⨳ c ♯ a ⨳ b ⨳ c'\n⊢ ∃ a',\n    a' < a ∧\n      ∃ b',\n        b' < b ∧\n          ∃ c',\n            c' < c ∧ d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\n[PROOFSTEP]\nrcases lt_nmul_iff.1 he with ⟨a', ha, b', hb, H₂⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro\na b c d : Ordinal.{u}\nh : d < a ⨳ b ⨳ c\ne : Ordinal.{u}\nhe : e < a ⨳ b\nc' : Ordinal.{u}\nhc : c' < c\nH₁ : d ♯ e ⨳ c' ≤ e ⨳ c ♯ a ⨳ b ⨳ c'\na' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nH₂ : e ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\n⊢ ∃ a',\n    a' < a ∧\n      ∃ b',\n        b' < b ∧\n          ∃ c',\n            c' < c ∧ d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\n[PROOFSTEP]\nrefine' ⟨a', ha, b', hb, c', hc, _⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro\na b c d : Ordinal.{u}\nh : d < a ⨳ b ⨳ c\ne : Ordinal.{u}\nhe : e < a ⨳ b\nc' : Ordinal.{u}\nhc : c' < c\nH₁ : d ♯ e ⨳ c' ≤ e ⨳ c ♯ a ⨳ b ⨳ c'\na' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nH₂ : e ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\n⊢ d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\n[PROOFSTEP]\nhave := nadd_le_nadd H₁ (nmul_nadd_le H₂ hc.le)\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro\na b c d : Ordinal.{u}\nh : d < a ⨳ b ⨳ c\ne : Ordinal.{u}\nhe : e < a ⨳ b\nc' : Ordinal.{u}\nhc : c' < c\nH₁ : d ♯ e ⨳ c' ≤ e ⨳ c ♯ a ⨳ b ⨳ c'\na' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nH₂ : e ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\nthis :\n  d ♯ e ⨳ c' ♯ ((e ♯ a' ⨳ b') ⨳ c ♯ (a' ⨳ b ♯ a ⨳ b') ⨳ c') ≤\n    e ⨳ c ♯ a ⨳ b ⨳ c' ♯ ((a' ⨳ b ♯ a ⨳ b') ⨳ c ♯ (e ♯ a' ⨳ b') ⨳ c')\n⊢ d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\n[PROOFSTEP]\nsimp only [nadd_nmul, nadd_assoc] at this \n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro\na b c d : Ordinal.{u}\nh : d < a ⨳ b ⨳ c\ne : Ordinal.{u}\nhe : e < a ⨳ b\nc' : Ordinal.{u}\nhc : c' < c\nH₁ : d ♯ e ⨳ c' ≤ e ⨳ c ♯ a ⨳ b ⨳ c'\na' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nH₂ : e ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\nthis :\n  d ♯ (e ⨳ c' ♯ (e ⨳ c ♯ (a' ⨳ b' ⨳ c ♯ (a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c')))) ≤\n    e ⨳ c ♯ (a ⨳ b ⨳ c' ♯ (a' ⨳ b ⨳ c ♯ (a ⨳ b' ⨳ c ♯ (e ⨳ c' ♯ a' ⨳ b' ⨳ c'))))\n⊢ d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\n[PROOFSTEP]\nrw [nadd_left_comm, nadd_left_comm d, nadd_left_comm, nadd_le_nadd_iff_left, nadd_left_comm (a ⨳ b' ⨳ c),\n  nadd_left_comm (a' ⨳ b ⨳ c), nadd_left_comm (a ⨳ b ⨳ c'), nadd_le_nadd_iff_left, nadd_left_comm (a ⨳ b ⨳ c'),\n  nadd_left_comm (a ⨳ b ⨳ c')] at this \n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro\na b c d : Ordinal.{u}\nh : d < a ⨳ b ⨳ c\ne : Ordinal.{u}\nhe : e < a ⨳ b\nc' : Ordinal.{u}\nhc : c' < c\nH₁ : d ♯ e ⨳ c' ≤ e ⨳ c ♯ a ⨳ b ⨳ c'\na' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nH₂ : e ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'\nthis : d ♯ (a' ⨳ b' ⨳ c ♯ (a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c')) ≤ a' ⨳ b ⨳ c ♯ (a ⨳ b' ⨳ c ♯ (a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'))\n⊢ d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\n[PROOFSTEP]\nsimpa only [nadd_assoc]\n[GOAL]\ncase mpr\na b c d : Ordinal.{u}\n⊢ (∃ a',\n      a' < a ∧\n        ∃ b',\n          b' < b ∧\n            ∃ c',\n              c' < c ∧\n                d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c') →\n    d < a ⨳ b ⨳ c\n[PROOFSTEP]\nrintro ⟨a', ha, b', hb, c', hc, h⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro\na b c d a' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nc' : Ordinal.{u}\nhc : c' < c\nh : d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\n⊢ d < a ⨳ b ⨳ c\n[PROOFSTEP]\nhave := h.trans_lt (nmul_nadd_lt₃ ha hb hc)\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro\na b c d a' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nc' : Ordinal.{u}\nhc : c' < c\nh : d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\nthis : d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' < a ⨳ b ⨳ c ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c'\n⊢ d < a ⨳ b ⨳ c\n[PROOFSTEP]\nrepeat' rw [nadd_lt_nadd_iff_right] at this \n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro\na b c d a' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nc' : Ordinal.{u}\nhc : c' < c\nh : d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\nthis : d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' < a ⨳ b ⨳ c ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c'\n⊢ d < a ⨳ b ⨳ c\n[PROOFSTEP]\nrw [nadd_lt_nadd_iff_right] at this \n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro\na b c d a' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nc' : Ordinal.{u}\nhc : c' < c\nh : d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\nthis : d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' < a ⨳ b ⨳ c ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c'\n⊢ d < a ⨳ b ⨳ c\n[PROOFSTEP]\nrw [nadd_lt_nadd_iff_right] at this \n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro\na b c d a' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nc' : Ordinal.{u}\nhc : c' < c\nh : d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\nthis : d ♯ a' ⨳ b' ⨳ c < a ⨳ b ⨳ c ♯ a' ⨳ b' ⨳ c\n⊢ d < a ⨳ b ⨳ c\n[PROOFSTEP]\nrw [nadd_lt_nadd_iff_right] at this \n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro\na b c d a' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nc' : Ordinal.{u}\nhc : c' < c\nh : d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\nthis : d < a ⨳ b ⨳ c\n⊢ d < a ⨳ b ⨳ c\n[PROOFSTEP]\nrw [nadd_lt_nadd_iff_right] at this \n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro\na b c d a' : Ordinal.{u}\nha : a' < a\nb' : Ordinal.{u}\nhb : b' < b\nc' : Ordinal.{u}\nhc : c' < c\nh : d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c' ≤ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c'\nthis : d < a ⨳ b ⨳ c\n⊢ d < a ⨳ b ⨳ c\n[PROOFSTEP]\nassumption\n[GOAL]\na b c d : Ordinal.{u}\n⊢ a ⨳ b ⨳ c ≤ d ↔\n    ∀ (a' : Ordinal.{u}),\n      a' < a →\n        ∀ (b' : Ordinal.{u}),\n          b' < b →\n            ∀ (c' : Ordinal.{u}),\n              c' < c → a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c' < d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c'\n[PROOFSTEP]\nrw [← not_iff_not]\n[GOAL]\na b c d : Ordinal.{u}\n⊢ ¬a ⨳ b ⨳ c ≤ d ↔\n    ¬∀ (a' : Ordinal.{u}),\n        a' < a →\n          ∀ (b' : Ordinal.{u}),\n            b' < b →\n              ∀ (c' : Ordinal.{u}),\n                c' < c →\n                  a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c' < d ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c'\n[PROOFSTEP]\nsimp [lt_nmul_iff₃]\n[GOAL]\na b c d : Ordinal.{u}\n⊢ d < a ⨳ (b ⨳ c) ↔\n    ∃ a',\n      a' < a ∧\n        ∃ b',\n          b' < b ∧\n            ∃ c',\n              c' < c ∧\n                d ♯ a' ⨳ (b' ⨳ c) ♯ a' ⨳ (b ⨳ c') ♯ a ⨳ (b' ⨳ c') ≤\n                  a' ⨳ (b ⨳ c) ♯ a ⨳ (b' ⨳ c) ♯ a ⨳ (b ⨳ c') ♯ a' ⨳ (b' ⨳ c')\n[PROOFSTEP]\nsimp only [nmul_comm _ (_ ⨳ _), lt_nmul_iff₃, nadd_eq_add, NatOrdinal.toOrdinal_toNatOrdinal]\n[GOAL]\na b c d : Ordinal.{u}\n⊢ (∃ a',\n      a' < b ∧\n        ∃ b',\n          b' < c ∧\n            ∃ c',\n              c' < a ∧\n                ↑toOrdinal\n                    (↑toNatOrdinal d + ↑toNatOrdinal (a' ⨳ b' ⨳ a) + ↑toNatOrdinal (a' ⨳ c ⨳ c') +\n                      ↑toNatOrdinal (b ⨳ b' ⨳ c')) ≤\n                  ↑toOrdinal\n                    (↑toNatOrdinal (a' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ b' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ c') +\n                      ↑toNatOrdinal (a' ⨳ b' ⨳ c'))) ↔\n    ∃ a',\n      a' < a ∧\n        ∃ b',\n          b' < b ∧\n            ∃ c',\n              c' < c ∧\n                ↑toOrdinal\n                    (↑toNatOrdinal d + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a') +\n                      ↑toNatOrdinal (b' ⨳ c' ⨳ a)) ≤\n                  ↑toOrdinal\n                    (↑toNatOrdinal (b ⨳ c ⨳ a') + ↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) +\n                      ↑toNatOrdinal (b' ⨳ c' ⨳ a'))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\na b c d : Ordinal.{u}\n⊢ (∃ a',\n      a' < b ∧\n        ∃ b',\n          b' < c ∧\n            ∃ c',\n              c' < a ∧\n                ↑toOrdinal\n                    (↑toNatOrdinal d + ↑toNatOrdinal (a' ⨳ b' ⨳ a) + ↑toNatOrdinal (a' ⨳ c ⨳ c') +\n                      ↑toNatOrdinal (b ⨳ b' ⨳ c')) ≤\n                  ↑toOrdinal\n                    (↑toNatOrdinal (a' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ b' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ c') +\n                      ↑toNatOrdinal (a' ⨳ b' ⨳ c'))) →\n    ∃ a',\n      a' < a ∧\n        ∃ b',\n          b' < b ∧\n            ∃ c',\n              c' < c ∧\n                ↑toOrdinal\n                    (↑toNatOrdinal d + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a') +\n                      ↑toNatOrdinal (b' ⨳ c' ⨳ a)) ≤\n                  ↑toOrdinal\n                    (↑toNatOrdinal (b ⨳ c ⨳ a') + ↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) +\n                      ↑toNatOrdinal (b' ⨳ c' ⨳ a'))\n[PROOFSTEP]\nrintro ⟨b', hb, c', hc, a', ha, h⟩\n[GOAL]\ncase mpr\na b c d : Ordinal.{u}\n⊢ (∃ a',\n      a' < a ∧\n        ∃ b',\n          b' < b ∧\n            ∃ c',\n              c' < c ∧\n                ↑toOrdinal\n                    (↑toNatOrdinal d + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a') +\n                      ↑toNatOrdinal (b' ⨳ c' ⨳ a)) ≤\n                  ↑toOrdinal\n                    (↑toNatOrdinal (b ⨳ c ⨳ a') + ↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) +\n                      ↑toNatOrdinal (b' ⨳ c' ⨳ a'))) →\n    ∃ a',\n      a' < b ∧\n        ∃ b',\n          b' < c ∧\n            ∃ c',\n              c' < a ∧\n                ↑toOrdinal\n                    (↑toNatOrdinal d + ↑toNatOrdinal (a' ⨳ b' ⨳ a) + ↑toNatOrdinal (a' ⨳ c ⨳ c') +\n                      ↑toNatOrdinal (b ⨳ b' ⨳ c')) ≤\n                  ↑toOrdinal\n                    (↑toNatOrdinal (a' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ b' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ c') +\n                      ↑toNatOrdinal (a' ⨳ b' ⨳ c'))\n[PROOFSTEP]\nrintro ⟨b', hb, c', hc, a', ha, h⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro\na b c d b' : Ordinal.{u}\nhb : b' < b\nc' : Ordinal.{u}\nhc : c' < c\na' : Ordinal.{u}\nha : a' < a\nh :\n  ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (b' ⨳ c' ⨳ a) + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a')) ≤\n    ↑toOrdinal\n      (↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ a') +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a'))\n⊢ ∃ a',\n    a' < a ∧\n      ∃ b',\n        b' < b ∧\n          ∃ c',\n            c' < c ∧\n              ↑toOrdinal\n                  (↑toNatOrdinal d + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a') +\n                    ↑toNatOrdinal (b' ⨳ c' ⨳ a)) ≤\n                ↑toOrdinal\n                  (↑toNatOrdinal (b ⨳ c ⨳ a') + ↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) +\n                    ↑toNatOrdinal (b' ⨳ c' ⨳ a'))\n[PROOFSTEP]\nuse a', ha, b', hb, c', hc\n[GOAL]\ncase right\na b c d b' : Ordinal.{u}\nhb : b' < b\nc' : Ordinal.{u}\nhc : c' < c\na' : Ordinal.{u}\nha : a' < a\nh :\n  ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (b' ⨳ c' ⨳ a) + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a')) ≤\n    ↑toOrdinal\n      (↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ a') +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a'))\n⊢ ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a') + ↑toNatOrdinal (b' ⨳ c' ⨳ a)) ≤\n    ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ a') + ↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a'))\n[PROOFSTEP]\nconvert h using 1\n[GOAL]\ncase h.e'_3\na b c d b' : Ordinal.{u}\nhb : b' < b\nc' : Ordinal.{u}\nhc : c' < c\na' : Ordinal.{u}\nha : a' < a\nh :\n  ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (b' ⨳ c' ⨳ a) + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a')) ≤\n    ↑toOrdinal\n      (↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ a') +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a'))\n⊢ ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a') + ↑toNatOrdinal (b' ⨳ c' ⨳ a)) =\n    ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (b' ⨳ c' ⨳ a) + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a'))\n[PROOFSTEP]\nabel_nf\n[GOAL]\ncase h.e'_4\na b c d b' : Ordinal.{u}\nhb : b' < b\nc' : Ordinal.{u}\nhc : c' < c\na' : Ordinal.{u}\nha : a' < a\nh :\n  ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (b' ⨳ c' ⨳ a) + ↑toNatOrdinal (b' ⨳ c ⨳ a') + ↑toNatOrdinal (b ⨳ c' ⨳ a')) ≤\n    ↑toOrdinal\n      (↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ a') +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a'))\n⊢ ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ a') + ↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a')) =\n    ↑toOrdinal\n      (↑toNatOrdinal (b' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ c' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ a') +\n        ↑toNatOrdinal (b' ⨳ c' ⨳ a'))\n[PROOFSTEP]\nabel_nf\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro\na b c d b' : Ordinal.{u}\nhb : b' < a\nc' : Ordinal.{u}\nhc : c' < b\na' : Ordinal.{u}\nha : a' < c\nh :\n  ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (c' ⨳ c ⨳ b') + ↑toNatOrdinal (b ⨳ a' ⨳ b') + ↑toNatOrdinal (c' ⨳ a' ⨳ a)) ≤\n    ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ b') + ↑toNatOrdinal (c' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ a' ⨳ a) +\n        ↑toNatOrdinal (c' ⨳ a' ⨳ b'))\n⊢ ∃ a',\n    a' < b ∧\n      ∃ b',\n        b' < c ∧\n          ∃ c',\n            c' < a ∧\n              ↑toOrdinal\n                  (↑toNatOrdinal d + ↑toNatOrdinal (a' ⨳ b' ⨳ a) + ↑toNatOrdinal (a' ⨳ c ⨳ c') +\n                    ↑toNatOrdinal (b ⨳ b' ⨳ c')) ≤\n                ↑toOrdinal\n                  (↑toNatOrdinal (a' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ b' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ c') +\n                    ↑toNatOrdinal (a' ⨳ b' ⨳ c'))\n[PROOFSTEP]\nuse c', hc, a', ha, b', hb\n[GOAL]\ncase right\na b c d b' : Ordinal.{u}\nhb : b' < a\nc' : Ordinal.{u}\nhc : c' < b\na' : Ordinal.{u}\nha : a' < c\nh :\n  ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (c' ⨳ c ⨳ b') + ↑toNatOrdinal (b ⨳ a' ⨳ b') + ↑toNatOrdinal (c' ⨳ a' ⨳ a)) ≤\n    ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ b') + ↑toNatOrdinal (c' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ a' ⨳ a) +\n        ↑toNatOrdinal (c' ⨳ a' ⨳ b'))\n⊢ ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (c' ⨳ a' ⨳ a) + ↑toNatOrdinal (c' ⨳ c ⨳ b') + ↑toNatOrdinal (b ⨳ a' ⨳ b')) ≤\n    ↑toOrdinal\n      (↑toNatOrdinal (c' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ a' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ b') +\n        ↑toNatOrdinal (c' ⨳ a' ⨳ b'))\n[PROOFSTEP]\nconvert h using 1\n[GOAL]\ncase h.e'_3\na b c d b' : Ordinal.{u}\nhb : b' < a\nc' : Ordinal.{u}\nhc : c' < b\na' : Ordinal.{u}\nha : a' < c\nh :\n  ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (c' ⨳ c ⨳ b') + ↑toNatOrdinal (b ⨳ a' ⨳ b') + ↑toNatOrdinal (c' ⨳ a' ⨳ a)) ≤\n    ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ b') + ↑toNatOrdinal (c' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ a' ⨳ a) +\n        ↑toNatOrdinal (c' ⨳ a' ⨳ b'))\n⊢ ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (c' ⨳ a' ⨳ a) + ↑toNatOrdinal (c' ⨳ c ⨳ b') + ↑toNatOrdinal (b ⨳ a' ⨳ b')) =\n    ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (c' ⨳ c ⨳ b') + ↑toNatOrdinal (b ⨳ a' ⨳ b') + ↑toNatOrdinal (c' ⨳ a' ⨳ a))\n[PROOFSTEP]\nabel_nf\n[GOAL]\ncase h.e'_4\na b c d b' : Ordinal.{u}\nhb : b' < a\nc' : Ordinal.{u}\nhc : c' < b\na' : Ordinal.{u}\nha : a' < c\nh :\n  ↑toOrdinal\n      (↑toNatOrdinal d + ↑toNatOrdinal (c' ⨳ c ⨳ b') + ↑toNatOrdinal (b ⨳ a' ⨳ b') + ↑toNatOrdinal (c' ⨳ a' ⨳ a)) ≤\n    ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ b') + ↑toNatOrdinal (c' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ a' ⨳ a) +\n        ↑toNatOrdinal (c' ⨳ a' ⨳ b'))\n⊢ ↑toOrdinal\n      (↑toNatOrdinal (c' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ a' ⨳ a) + ↑toNatOrdinal (b ⨳ c ⨳ b') +\n        ↑toNatOrdinal (c' ⨳ a' ⨳ b')) =\n    ↑toOrdinal\n      (↑toNatOrdinal (b ⨳ c ⨳ b') + ↑toNatOrdinal (c' ⨳ c ⨳ a) + ↑toNatOrdinal (b ⨳ a' ⨳ a) +\n        ↑toNatOrdinal (c' ⨳ a' ⨳ b'))\n[PROOFSTEP]\nabel_nf\n[GOAL]\na b c d : Ordinal.{u}\n⊢ a ⨳ (b ⨳ c) ≤ d ↔\n    ∀ (a' : Ordinal.{u}),\n      a' < a →\n        ∀ (b' : Ordinal.{u}),\n          b' < b →\n            ∀ (c' : Ordinal.{u}),\n              c' < c →\n                a' ⨳ (b ⨳ c) ♯ a ⨳ (b' ⨳ c) ♯ a ⨳ (b ⨳ c') ♯ a' ⨳ (b' ⨳ c') <\n                  d ♯ a' ⨳ (b' ⨳ c) ♯ a' ⨳ (b ⨳ c') ♯ a ⨳ (b' ⨳ c')\n[PROOFSTEP]\nrw [← not_iff_not]\n[GOAL]\na b c d : Ordinal.{u}\n⊢ ¬a ⨳ (b ⨳ c) ≤ d ↔\n    ¬∀ (a' : Ordinal.{u}),\n        a' < a →\n          ∀ (b' : Ordinal.{u}),\n            b' < b →\n              ∀ (c' : Ordinal.{u}),\n                c' < c →\n                  a' ⨳ (b ⨳ c) ♯ a ⨳ (b' ⨳ c) ♯ a ⨳ (b ⨳ c') ♯ a' ⨳ (b' ⨳ c') <\n                    d ♯ a' ⨳ (b' ⨳ c) ♯ a' ⨳ (b ⨳ c') ♯ a ⨳ (b' ⨳ c')\n[PROOFSTEP]\nsimp [lt_nmul_iff₃']\n[GOAL]\na✝ b✝ c✝ d : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ a ⨳ b ⨳ c = a ⨳ (b ⨳ c)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\na✝ b✝ c✝ d : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ a ⨳ b ⨳ c ≤ a ⨳ (b ⨳ c)\n[PROOFSTEP]\nrw [nmul_le_iff₃]\n[GOAL]\ncase a\na✝ b✝ c✝ d : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ ∀ (a' : Ordinal.{u_1}),\n    a' < a →\n      ∀ (b' : Ordinal.{u_1}),\n        b' < b →\n          ∀ (c' : Ordinal.{u_1}),\n            c' < c →\n              a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c' <\n                a ⨳ (b ⨳ c) ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c'\n[PROOFSTEP]\nintro a' ha b' hb c' hc\n[GOAL]\ncase a\na✝ b✝ c✝ d : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nb' : Ordinal.{u_1}\nhb : b' < b\nc' : Ordinal.{u_1}\nhc : c' < c\n⊢ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c' < a ⨳ (b ⨳ c) ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c'\n[PROOFSTEP]\nrw [nmul_assoc a' b c, nmul_assoc a b' c, nmul_assoc a b c', nmul_assoc a' b' c', nmul_assoc a' b' c,\n  nmul_assoc a' b c', nmul_assoc a b' c']\n[GOAL]\ncase a\na✝ b✝ c✝ d : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nb' : Ordinal.{u_1}\nhb : b' < b\nc' : Ordinal.{u_1}\nhc : c' < c\n⊢ a' ⨳ (b ⨳ c) ♯ a ⨳ (b' ⨳ c) ♯ a ⨳ (b ⨳ c') ♯ a' ⨳ (b' ⨳ c') <\n    a ⨳ (b ⨳ c) ♯ a' ⨳ (b' ⨳ c) ♯ a' ⨳ (b ⨳ c') ♯ a ⨳ (b' ⨳ c')\n[PROOFSTEP]\nexact nmul_nadd_lt₃' ha hb hc\n[GOAL]\ncase a\na✝ b✝ c✝ d : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ a ⨳ (b ⨳ c) ≤ a ⨳ b ⨳ c\n[PROOFSTEP]\nrw [nmul_le_iff₃']\n[GOAL]\ncase a\na✝ b✝ c✝ d : Ordinal.{u}\na b c : Ordinal.{u_1}\n⊢ ∀ (a' : Ordinal.{u_1}),\n    a' < a →\n      ∀ (b' : Ordinal.{u_1}),\n        b' < b →\n          ∀ (c' : Ordinal.{u_1}),\n            c' < c →\n              a' ⨳ (b ⨳ c) ♯ a ⨳ (b' ⨳ c) ♯ a ⨳ (b ⨳ c') ♯ a' ⨳ (b' ⨳ c') <\n                a ⨳ b ⨳ c ♯ a' ⨳ (b' ⨳ c) ♯ a' ⨳ (b ⨳ c') ♯ a ⨳ (b' ⨳ c')\n[PROOFSTEP]\nintro a' ha b' hb c' hc\n[GOAL]\ncase a\na✝ b✝ c✝ d : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nb' : Ordinal.{u_1}\nhb : b' < b\nc' : Ordinal.{u_1}\nhc : c' < c\n⊢ a' ⨳ (b ⨳ c) ♯ a ⨳ (b' ⨳ c) ♯ a ⨳ (b ⨳ c') ♯ a' ⨳ (b' ⨳ c') <\n    a ⨳ b ⨳ c ♯ a' ⨳ (b' ⨳ c) ♯ a' ⨳ (b ⨳ c') ♯ a ⨳ (b' ⨳ c')\n[PROOFSTEP]\nrw [← nmul_assoc a' b c, ← nmul_assoc a b' c, ← nmul_assoc a b c', ← nmul_assoc a' b' c', ← nmul_assoc a' b' c, ←\n  nmul_assoc a' b c', ← nmul_assoc a b' c']\n[GOAL]\ncase a\na✝ b✝ c✝ d : Ordinal.{u}\na b c a' : Ordinal.{u_1}\nha : a' < a\nb' : Ordinal.{u_1}\nhb : b' < b\nc' : Ordinal.{u_1}\nhc : c' < c\n⊢ a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c' < a ⨳ b ⨳ c ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c'\n[PROOFSTEP]\nexact nmul_nadd_lt₃ ha hb hc\n[GOAL]\na b : Ordinal.{u_1}\n⊢ a ⨳ succ b = a ⨳ b ♯ a\n[PROOFSTEP]\nrw [← nadd_one, nmul_nadd_one]\n[GOAL]\na b : Ordinal.{u_1}\n⊢ succ a ⨳ b = a ⨳ b ♯ b\n[PROOFSTEP]\nrw [← nadd_one, nadd_one_nmul]\n[GOAL]\na b : Ordinal.{u}\n⊢ a * b ≤ a ⨳ b\n[PROOFSTEP]\nrefine b.limitRecOn ?_ ?_ ?_\n[GOAL]\ncase refine_1\na b : Ordinal.{u}\n⊢ a * 0 ≤ a ⨳ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_2\na b : Ordinal.{u}\n⊢ ∀ (o : Ordinal.{u}), a * o ≤ a ⨳ o → a * succ o ≤ a ⨳ succ o\n[PROOFSTEP]\nintro c h\n[GOAL]\ncase refine_2\na b c : Ordinal.{u}\nh : a * c ≤ a ⨳ c\n⊢ a * succ c ≤ a ⨳ succ c\n[PROOFSTEP]\nrw [mul_succ, nmul_succ]\n[GOAL]\ncase refine_2\na b c : Ordinal.{u}\nh : a * c ≤ a ⨳ c\n⊢ a * c + a ≤ a ⨳ c ♯ a\n[PROOFSTEP]\nexact (add_le_nadd _ a).trans (nadd_le_nadd_right h a)\n[GOAL]\ncase refine_3\na b : Ordinal.{u}\n⊢ ∀ (o : Ordinal.{u}), IsLimit o → (∀ (o' : Ordinal.{u}), o' < o → a * o' ≤ a ⨳ o') → a * o ≤ a ⨳ o\n[PROOFSTEP]\nintro c hc H\n[GOAL]\ncase refine_3\na b c : Ordinal.{u}\nhc : IsLimit c\nH : ∀ (o' : Ordinal.{u}), o' < c → a * o' ≤ a ⨳ o'\n⊢ a * c ≤ a ⨳ c\n[PROOFSTEP]\nrcases eq_zero_or_pos a with (rfl | ha)\n[GOAL]\ncase refine_3.inl\nb c : Ordinal.{u}\nhc : IsLimit c\nH : ∀ (o' : Ordinal.{u}), o' < c → 0 * o' ≤ 0 ⨳ o'\n⊢ 0 * c ≤ 0 ⨳ c\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_3.inr\na b c : Ordinal.{u}\nhc : IsLimit c\nH : ∀ (o' : Ordinal.{u}), o' < c → a * o' ≤ a ⨳ o'\nha : 0 < a\n⊢ a * c ≤ a ⨳ c\n[PROOFSTEP]\nhave := IsNormal.blsub_eq.{u, u} (mul_isNormal ha) hc\n[GOAL]\ncase refine_3.inr\na b c : Ordinal.{u}\nhc : IsLimit c\nH : ∀ (o' : Ordinal.{u}), o' < c → a * o' ≤ a ⨳ o'\nha : 0 < a\nthis : (blsub c fun x x_1 => (fun x x_2 => x * x_2) a x) = (fun x x_1 => x * x_1) a c\n⊢ a * c ≤ a ⨳ c\n[PROOFSTEP]\ndsimp at this \n[GOAL]\ncase refine_3.inr\na b c : Ordinal.{u}\nhc : IsLimit c\nH : ∀ (o' : Ordinal.{u}), o' < c → a * o' ≤ a ⨳ o'\nha : 0 < a\nthis : (blsub c fun x x_1 => a * x) = a * c\n⊢ a * c ≤ a ⨳ c\n[PROOFSTEP]\nrw [← this, blsub_le_iff]\n[GOAL]\ncase refine_3.inr\na b c : Ordinal.{u}\nhc : IsLimit c\nH : ∀ (o' : Ordinal.{u}), o' < c → a * o' ≤ a ⨳ o'\nha : 0 < a\nthis : (blsub c fun x x_1 => a * x) = a * c\n⊢ ∀ (i : Ordinal.{u}), i < c → a * i < a ⨳ c\n[PROOFSTEP]\nexact fun i hi => (H i hi).trans_lt (nmul_lt_nmul_of_pos_left hi ha)\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Ordinal.NaturalOps", "llama_tokens": 37833, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7371581741774411, "lm_q2_score": 0.49609382947091946, "lm_q1q2_score": 0.3656996215534778}}
{"text": "[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝¹ : DecidableEq M\ninst✝ : CommSemiring R\nf : M → ι\ni : ι\nm : M\nh : m ∈ 0.support\n⊢ f m = i\n[PROOFSTEP]\ncases h\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝¹ : DecidableEq M\ninst✝ : CommSemiring R\n⊢ gradeBy R id = grade R\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝¹ : DecidableEq M\ninst✝ : CommSemiring R\nf : M → ι\ni : ι\na : AddMonoidAlgebra R M\n⊢ a ∈ gradeBy R f i ↔ ↑a.support ⊆ f ⁻¹' {i}\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝¹ : DecidableEq M\ninst✝ : CommSemiring R\nm : M\na : AddMonoidAlgebra R M\n⊢ a ∈ grade R m ↔ a.support ⊆ {m}\n[PROOFSTEP]\nrw [← Finset.coe_subset, Finset.coe_singleton]\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝¹ : DecidableEq M\ninst✝ : CommSemiring R\nm : M\na : AddMonoidAlgebra R M\n⊢ a ∈ grade R m ↔ ↑a.support ⊆ {m}\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝¹ : DecidableEq M\ninst✝ : CommSemiring R\nm : M\na : AddMonoidAlgebra R M\n⊢ a ∈ grade R m ↔ a ∈ LinearMap.range (Finsupp.lsingle m)\n[PROOFSTEP]\nrw [mem_grade_iff, Finsupp.support_subset_singleton']\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝¹ : DecidableEq M\ninst✝ : CommSemiring R\nm : M\na : AddMonoidAlgebra R M\n⊢ (∃ b, a = Finsupp.single m b) ↔ a ∈ LinearMap.range (Finsupp.lsingle m)\n[PROOFSTEP]\napply exists_congr\n[GOAL]\ncase h\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝¹ : DecidableEq M\ninst✝ : CommSemiring R\nm : M\na : AddMonoidAlgebra R M\n⊢ ∀ (a_1 : R), a = Finsupp.single m a_1 ↔ ↑(Finsupp.lsingle m) a_1 = a\n[PROOFSTEP]\nintro r\n[GOAL]\ncase h\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝¹ : DecidableEq M\ninst✝ : CommSemiring R\nm : M\na : AddMonoidAlgebra R M\nr : R\n⊢ a = Finsupp.single m r ↔ ↑(Finsupp.lsingle m) r = a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝¹ : DecidableEq M\ninst✝ : CommSemiring R\nm : M\na : AddMonoidAlgebra R M\nr : R\n⊢ a = Finsupp.single m r → ↑(Finsupp.lsingle m) r = a\n[PROOFSTEP]\nexact Eq.symm\n[GOAL]\ncase h.mpr\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝¹ : DecidableEq M\ninst✝ : CommSemiring R\nm : M\na : AddMonoidAlgebra R M\nr : R\n⊢ ↑(Finsupp.lsingle m) r = a → a = Finsupp.single m r\n[PROOFSTEP]\nexact Eq.symm\n[GOAL]\nM : Type u_1\nι : Type u_2\nR✝ : Type u_3\ninst✝² : DecidableEq M\ninst✝¹ : CommSemiring R✝\nR : Type u_4\ninst✝ : CommSemiring R\nf : M → ι\nm : M\nr : R\n⊢ Finsupp.single m r ∈ gradeBy R f (f m)\n[PROOFSTEP]\nintro x hx\n[GOAL]\nM : Type u_1\nι : Type u_2\nR✝ : Type u_3\ninst✝² : DecidableEq M\ninst✝¹ : CommSemiring R✝\nR : Type u_4\ninst✝ : CommSemiring R\nf : M → ι\nm : M\nr : R\nx : M\nhx : x ∈ (Finsupp.single m r).support\n⊢ f x = f m\n[PROOFSTEP]\nrw [Finset.mem_singleton.mp (Finsupp.support_single_subset hx)]\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝³ : DecidableEq M\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nh : m ∈ 1.support\n⊢ ↑f m = 0\n[PROOFSTEP]\nrw [one_def] at h \n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝³ : DecidableEq M\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nh : m ∈ (single 0 1).support\n⊢ ↑f m = 0\n[PROOFSTEP]\nby_cases H : (1 : R) = (0 : R)\n[GOAL]\ncase pos\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝³ : DecidableEq M\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nh : m ∈ (single 0 1).support\nH : 1 = 0\n⊢ ↑f m = 0\n[PROOFSTEP]\nrw [H, single, Finsupp.single_zero] at h \n[GOAL]\ncase pos\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝³ : DecidableEq M\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nh : m ∈ 0.support\nH : 1 = 0\n⊢ ↑f m = 0\n[PROOFSTEP]\ncases h\n[GOAL]\ncase neg\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝³ : DecidableEq M\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nh : m ∈ (single 0 1).support\nH : ¬1 = 0\n⊢ ↑f m = 0\n[PROOFSTEP]\nrw [Finsupp.support_single_ne_zero _ H, Finset.mem_singleton] at h \n[GOAL]\ncase neg\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝³ : DecidableEq M\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nh : m = 0\nH : ¬1 = 0\n⊢ ↑f m = 0\n[PROOFSTEP]\nrw [h, AddMonoidHom.map_zero]\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝³ : DecidableEq M\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : ι\na b : AddMonoidAlgebra R M\nha : a ∈ gradeBy R (↑f) i\nhb : b ∈ gradeBy R (↑f) j\nc : M\nhc : c ∈ (a * b).support\n⊢ ↑f c = i + j\n[PROOFSTEP]\nset h := support_mul a b hc\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝³ : DecidableEq M\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : ι\na b : AddMonoidAlgebra R M\nha : a ∈ gradeBy R (↑f) i\nhb : b ∈ gradeBy R (↑f) j\nc : M\nhc : c ∈ (a * b).support\nh : c ∈ Finset.biUnion a.support fun a₁ => Finset.biUnion b.support fun a₂ => {a₁ + a₂} := support_mul a b hc\n⊢ ↑f c = i + j\n[PROOFSTEP]\nsimp only [Finset.mem_biUnion] at h \n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝³ : DecidableEq M\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : ι\na b : AddMonoidAlgebra R M\nha : a ∈ gradeBy R (↑f) i\nhb : b ∈ gradeBy R (↑f) j\nc : M\nhc : c ∈ (a * b).support\nh : ∃ a_1, a_1 ∈ a.support ∧ ∃ a, a ∈ b.support ∧ c ∈ {a_1 + a}\n⊢ ↑f c = i + j\n[PROOFSTEP]\nrcases h with ⟨ma, ⟨hma, ⟨mb, ⟨hmb, hmc⟩⟩⟩⟩\n[GOAL]\ncase intro.intro.intro.intro\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝³ : DecidableEq M\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : ι\na b : AddMonoidAlgebra R M\nha : a ∈ gradeBy R (↑f) i\nhb : b ∈ gradeBy R (↑f) j\nc : M\nhc : c ∈ (a * b).support\nma : M\nhma : ma ∈ a.support\nmb : M\nhmb : mb ∈ b.support\nhmc : c ∈ {ma + mb}\n⊢ ↑f c = i + j\n[PROOFSTEP]\nrw [← ha ma hma, ← hb mb hmb, Finset.mem_singleton.mp hmc]\n[GOAL]\ncase intro.intro.intro.intro\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝³ : DecidableEq M\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : ι\na b : AddMonoidAlgebra R M\nha : a ∈ gradeBy R (↑f) i\nhb : b ∈ gradeBy R (↑f) j\nc : M\nhc : c ∈ (a * b).support\nma : M\nhma : ma ∈ a.support\nmb : M\nhmb : mb ∈ b.support\nhmc : c ∈ {ma + mb}\n⊢ ↑f (ma + mb) = ↑f ma + ↑f mb\n[PROOFSTEP]\napply AddMonoidHom.map_add\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝² : DecidableEq M\ninst✝¹ : AddMonoid M\ninst✝ : CommSemiring R\n⊢ SetLike.GradedMonoid (grade R)\n[PROOFSTEP]\napply gradeBy.gradedMonoid (AddMonoidHom.id _)\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\n⊢ GradedMonoid.mk (↑f (↑Multiplicative.toAdd 1))\n      { val := Finsupp.single (↑Multiplicative.toAdd 1) 1,\n        property := (_ : Finsupp.single (↑Multiplicative.toAdd 1) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1))) } =\n    GradedMonoid.mk 0 GradedMonoid.GOne.one\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.e_3.h\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\n⊢ ↑f (↑Multiplicative.toAdd 1) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e_4.e_2.h\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\n⊢ (fun x => x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1))) = fun x => x ∈ (fun i => gradeBy R (↑f) i) 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e_4.e_4\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\n⊢ HEq (_ : Finsupp.single (↑Multiplicative.toAdd 1) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1)))\n    (_ : 1 ∈ gradeBy R (↑f) 0)\n[PROOFSTEP]\nsimp\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\n⊢ OneHom.toFun\n      {\n        toFun := fun m =>\n          ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd m)))\n            { val := Finsupp.single (↑Multiplicative.toAdd m) 1,\n              property :=\n                (_ : Finsupp.single (↑Multiplicative.toAdd m) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd m))) },\n        map_one' :=\n          (_ :\n            ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd 1)))\n                { val := Finsupp.single (↑Multiplicative.toAdd 1) 1,\n                  property :=\n                    (_ : Finsupp.single (↑Multiplicative.toAdd 1) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1))) } =\n              ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) 0) GradedMonoid.GOne.one) }\n      (i * j) =\n    OneHom.toFun\n        {\n          toFun := fun m =>\n            ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd m)))\n              { val := Finsupp.single (↑Multiplicative.toAdd m) 1,\n                property :=\n                  (_ : Finsupp.single (↑Multiplicative.toAdd m) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd m))) },\n          map_one' :=\n            (_ :\n              ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd 1)))\n                  { val := Finsupp.single (↑Multiplicative.toAdd 1) 1,\n                    property :=\n                      (_ :\n                        Finsupp.single (↑Multiplicative.toAdd 1) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1))) } =\n                ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) 0) GradedMonoid.GOne.one) }\n        i *\n      OneHom.toFun\n        {\n          toFun := fun m =>\n            ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd m)))\n              { val := Finsupp.single (↑Multiplicative.toAdd m) 1,\n                property :=\n                  (_ : Finsupp.single (↑Multiplicative.toAdd m) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd m))) },\n          map_one' :=\n            (_ :\n              ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd 1)))\n                  { val := Finsupp.single (↑Multiplicative.toAdd 1) 1,\n                    property :=\n                      (_ :\n                        Finsupp.single (↑Multiplicative.toAdd 1) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1))) } =\n                ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) 0) GradedMonoid.GOne.one) }\n        j\n[PROOFSTEP]\nsymm\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\n⊢ OneHom.toFun\n        {\n          toFun := fun m =>\n            ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd m)))\n              { val := Finsupp.single (↑Multiplicative.toAdd m) 1,\n                property :=\n                  (_ : Finsupp.single (↑Multiplicative.toAdd m) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd m))) },\n          map_one' :=\n            (_ :\n              ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd 1)))\n                  { val := Finsupp.single (↑Multiplicative.toAdd 1) 1,\n                    property :=\n                      (_ :\n                        Finsupp.single (↑Multiplicative.toAdd 1) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1))) } =\n                ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) 0) GradedMonoid.GOne.one) }\n        i *\n      OneHom.toFun\n        {\n          toFun := fun m =>\n            ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd m)))\n              { val := Finsupp.single (↑Multiplicative.toAdd m) 1,\n                property :=\n                  (_ : Finsupp.single (↑Multiplicative.toAdd m) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd m))) },\n          map_one' :=\n            (_ :\n              ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd 1)))\n                  { val := Finsupp.single (↑Multiplicative.toAdd 1) 1,\n                    property :=\n                      (_ :\n                        Finsupp.single (↑Multiplicative.toAdd 1) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1))) } =\n                ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) 0) GradedMonoid.GOne.one) }\n        j =\n    OneHom.toFun\n      {\n        toFun := fun m =>\n          ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd m)))\n            { val := Finsupp.single (↑Multiplicative.toAdd m) 1,\n              property :=\n                (_ : Finsupp.single (↑Multiplicative.toAdd m) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd m))) },\n        map_one' :=\n          (_ :\n            ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd 1)))\n                { val := Finsupp.single (↑Multiplicative.toAdd 1) 1,\n                  property :=\n                    (_ : Finsupp.single (↑Multiplicative.toAdd 1) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1))) } =\n              ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) 0) GradedMonoid.GOne.one) }\n      (i * j)\n[PROOFSTEP]\ndsimp only [toAdd_one, Eq.ndrec, Set.mem_setOf_eq, ne_eq, OneHom.toFun_eq_coe, OneHom.coe_mk, toAdd_mul]\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\n⊢ ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd i)))\n        { val := Finsupp.single (↑Multiplicative.toAdd i) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd i) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i))) } *\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd j)))\n        { val := Finsupp.single (↑Multiplicative.toAdd j) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd j) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd j))) } =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)))\n      { val := Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1,\n        property :=\n          (_ :\n            Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 ∈\n              gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j))) }\n[PROOFSTEP]\nconvert DirectSum.of_mul_of (A := (fun i : ι => gradeBy R f i)) _ _\n[GOAL]\ncase h.e'_3.h.e'_1.h.e'_1.h.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_1.h.e'_3.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_2.h.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_4.e'_4.e'_2.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_4.e'_6.e'_4.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝² :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_4✝ : HEq AddZeroClass.toAdd AddZeroClass.toAdd\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_5.e'_5\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_3\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    ↑(GradedMonoid.GMul.mul\n        { val := Finsupp.single (↑Multiplicative.toAdd i) 1,\n          property := (_ : Finsupp.single (↑Multiplicative.toAdd i) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i))) }\n        { val := Finsupp.single (↑Multiplicative.toAdd j) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd j) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd j))) })\n[PROOFSTEP]\nrepeat {rw [AddMonoidHom.map_add]\n}\n[GOAL]\ncase h.e'_3.h.e'_1.h.e'_1.h.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_1.h.e'_3.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_2.h.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_4.e'_4.e'_2.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_4.e'_6.e'_4.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝² :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_4✝ : HEq AddZeroClass.toAdd AddZeroClass.toAdd\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_5.e'_5\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_3\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    ↑(GradedMonoid.GMul.mul\n        { val := Finsupp.single (↑Multiplicative.toAdd i) 1,\n          property := (_ : Finsupp.single (↑Multiplicative.toAdd i) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i))) }\n        { val := Finsupp.single (↑Multiplicative.toAdd j) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd j) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd j))) })\n[PROOFSTEP]\n{rw [AddMonoidHom.map_add]\n}\n[GOAL]\ncase h.e'_3.h.e'_1.h.e'_1.h.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\n[PROOFSTEP]\nrw [AddMonoidHom.map_add]\n[GOAL]\ncase h.e'_3.h.e'_1.h.e'_3.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_2.h.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_4.e'_4.e'_2.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_4.e'_6.e'_4.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝² :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_4✝ : HEq AddZeroClass.toAdd AddZeroClass.toAdd\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_5.e'_5\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_3\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    ↑(GradedMonoid.GMul.mul\n        { val := Finsupp.single (↑Multiplicative.toAdd i) 1,\n          property := (_ : Finsupp.single (↑Multiplicative.toAdd i) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i))) }\n        { val := Finsupp.single (↑Multiplicative.toAdd j) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd j) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd j))) })\n[PROOFSTEP]\n{rw [AddMonoidHom.map_add]\n}\n[GOAL]\ncase h.e'_3.h.e'_1.h.e'_3.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\n[PROOFSTEP]\nrw [AddMonoidHom.map_add]\n[GOAL]\ncase h.e'_3.h.e'_2.h.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_4.e'_4.e'_2.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_4.e'_6.e'_4.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝² :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_4✝ : HEq AddZeroClass.toAdd AddZeroClass.toAdd\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_5.e'_5\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_3\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    ↑(GradedMonoid.GMul.mul\n        { val := Finsupp.single (↑Multiplicative.toAdd i) 1,\n          property := (_ : Finsupp.single (↑Multiplicative.toAdd i) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i))) }\n        { val := Finsupp.single (↑Multiplicative.toAdd j) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd j) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd j))) })\n[PROOFSTEP]\n{rw [AddMonoidHom.map_add]\n}\n[GOAL]\ncase h.e'_3.h.e'_2.h.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\n[PROOFSTEP]\nrw [AddMonoidHom.map_add]\n[GOAL]\ncase h.e'_3.h.e'_4.e'_4.e'_2.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_4.e'_6.e'_4.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝² :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_4✝ : HEq AddZeroClass.toAdd AddZeroClass.toAdd\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_5.e'_5\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_3\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    ↑(GradedMonoid.GMul.mul\n        { val := Finsupp.single (↑Multiplicative.toAdd i) 1,\n          property := (_ : Finsupp.single (↑Multiplicative.toAdd i) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i))) }\n        { val := Finsupp.single (↑Multiplicative.toAdd j) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd j) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd j))) })\n[PROOFSTEP]\n{rw [AddMonoidHom.map_add]\n}\n[GOAL]\ncase h.e'_3.h.e'_4.e'_4.e'_2.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\n[PROOFSTEP]\nrw [AddMonoidHom.map_add]\n[GOAL]\ncase h.e'_3.h.e'_4.e'_6.e'_4.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝² :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_4✝ : HEq AddZeroClass.toAdd AddZeroClass.toAdd\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_5.e'_5\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_3\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    ↑(GradedMonoid.GMul.mul\n        { val := Finsupp.single (↑Multiplicative.toAdd i) 1,\n          property := (_ : Finsupp.single (↑Multiplicative.toAdd i) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i))) }\n        { val := Finsupp.single (↑Multiplicative.toAdd j) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd j) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd j))) })\n[PROOFSTEP]\n{rw [AddMonoidHom.map_add]\n}\n[GOAL]\ncase h.e'_3.h.e'_4.e'_6.e'_4.e'_2.e'_2.e'_8\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝² :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝¹ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_3✝ : HEq (fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) fun x => ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }\ne_1✝¹ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\ne_4✝ : HEq AddZeroClass.toAdd AddZeroClass.toAdd\ne_1✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\n[PROOFSTEP]\nrw [AddMonoidHom.map_add]\n[GOAL]\ncase h.e'_3.h.e'_5.e'_5\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_3\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    ↑(GradedMonoid.GMul.mul\n        { val := Finsupp.single (↑Multiplicative.toAdd i) 1,\n          property := (_ : Finsupp.single (↑Multiplicative.toAdd i) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i))) }\n        { val := Finsupp.single (↑Multiplicative.toAdd j) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd j) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd j))) })\n[PROOFSTEP]\n{rw [AddMonoidHom.map_add]\n}\n[GOAL]\ncase h.e'_3.h.e'_5.e'_5\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_1✝ :\n  ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i }) =\n    ({ x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) } →+\n      ⨁ (i : ι), { x // x ∈ gradeBy R (↑f) i })\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\n[PROOFSTEP]\nrw [AddMonoidHom.map_add]\n[GOAL]\ncase h.e'_3.h.e'_6.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\ncase h.e'_3.h.e'_6.e'_3\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    ↑(GradedMonoid.GMul.mul\n        { val := Finsupp.single (↑Multiplicative.toAdd i) 1,\n          property := (_ : Finsupp.single (↑Multiplicative.toAdd i) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i))) }\n        { val := Finsupp.single (↑Multiplicative.toAdd j) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd j) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd j))) })\n[PROOFSTEP]\n{rw [AddMonoidHom.map_add]\n}\n[GOAL]\ncase h.e'_3.h.e'_6.e'_2.h.h.e'_5.h.e'_7\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\nx✝ : AddMonoidAlgebra R M\n⊢ ↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) = ↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)\n[PROOFSTEP]\nrw [AddMonoidHom.map_add]\n[GOAL]\ncase h.e'_3.h.e'_6.e'_3\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    ↑(GradedMonoid.GMul.mul\n        { val := Finsupp.single (↑Multiplicative.toAdd i) 1,\n          property := (_ : Finsupp.single (↑Multiplicative.toAdd i) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i))) }\n        { val := Finsupp.single (↑Multiplicative.toAdd j) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd j) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd j))) })\n[PROOFSTEP]\n{rw [AddMonoidHom.map_add]\n}\n[GOAL]\ncase h.e'_3.h.e'_6.e'_3\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    ↑(GradedMonoid.GMul.mul\n        { val := Finsupp.single (↑Multiplicative.toAdd i) 1,\n          property := (_ : Finsupp.single (↑Multiplicative.toAdd i) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i))) }\n        { val := Finsupp.single (↑Multiplicative.toAdd j) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd j) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd j))) })\n[PROOFSTEP]\nrw [AddMonoidHom.map_add]\n[GOAL]\ncase h.e'_3.h.e'_6.e'_3\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    ↑(GradedMonoid.GMul.mul\n        { val := Finsupp.single (↑Multiplicative.toAdd i) 1,\n          property := (_ : Finsupp.single (↑Multiplicative.toAdd i) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i))) }\n        { val := Finsupp.single (↑Multiplicative.toAdd j) 1,\n          property :=\n            (_ : Finsupp.single (↑Multiplicative.toAdd j) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd j))) })\n[PROOFSTEP]\nsimp only [SetLike.coe_gMul]\n[GOAL]\ncase h.e'_3.h.e'_6.e'_3\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    Finsupp.single (↑Multiplicative.toAdd i) 1 * Finsupp.single (↑Multiplicative.toAdd j) 1\n[PROOFSTEP]\nrefine Eq.trans (by rw [one_mul]) single_mul_single.symm\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni j : Multiplicative M\ne_2✝ :\n  { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j)) } =\n    { x // x ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd i) + ↑f (↑Multiplicative.toAdd j)) }\n⊢ Finsupp.single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) 1 =\n    single (↑Multiplicative.toAdd i + ↑Multiplicative.toAdd j) (1 * 1)\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nr : R\n⊢ ↑(decomposeAux f) (Finsupp.single m r) =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m))\n      { val := Finsupp.single m r, property := (_ : Finsupp.single m r ∈ gradeBy R (↑f) (↑f m)) }\n[PROOFSTEP]\nrefine' (lift_single _ _ _).trans _\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nr : R\n⊢ r •\n      ↑{\n            toOneHom :=\n              {\n                toFun := fun m =>\n                  ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd m)))\n                    { val := Finsupp.single (↑Multiplicative.toAdd m) 1,\n                      property :=\n                        (_ :\n                          Finsupp.single (↑Multiplicative.toAdd m) 1 ∈ gradeBy R (↑f) (↑f (↑Multiplicative.toAdd m))) },\n                map_one' :=\n                  (_ :\n                    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd 1)))\n                        { val := Finsupp.single (↑Multiplicative.toAdd 1) 1,\n                          property :=\n                            (_ :\n                              Finsupp.single (↑Multiplicative.toAdd 1) 1 ∈\n                                gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1))) } =\n                      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) 0) GradedMonoid.GOne.one) },\n            map_mul' :=\n              (_ :\n                ∀ (i j : Multiplicative M),\n                  OneHom.toFun\n                      {\n                        toFun := fun m =>\n                          ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd m)))\n                            { val := Finsupp.single (↑Multiplicative.toAdd m) 1,\n                              property :=\n                                (_ :\n                                  Finsupp.single (↑Multiplicative.toAdd m) 1 ∈\n                                    gradeBy R (↑f) (↑f (↑Multiplicative.toAdd m))) },\n                        map_one' :=\n                          (_ :\n                            ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd 1)))\n                                { val := Finsupp.single (↑Multiplicative.toAdd 1) 1,\n                                  property :=\n                                    (_ :\n                                      Finsupp.single (↑Multiplicative.toAdd 1) 1 ∈\n                                        gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1))) } =\n                              ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) 0) GradedMonoid.GOne.one) }\n                      (i * j) =\n                    OneHom.toFun\n                        {\n                          toFun := fun m =>\n                            ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd m)))\n                              { val := Finsupp.single (↑Multiplicative.toAdd m) 1,\n                                property :=\n                                  (_ :\n                                    Finsupp.single (↑Multiplicative.toAdd m) 1 ∈\n                                      gradeBy R (↑f) (↑f (↑Multiplicative.toAdd m))) },\n                          map_one' :=\n                            (_ :\n                              ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd 1)))\n                                  { val := Finsupp.single (↑Multiplicative.toAdd 1) 1,\n                                    property :=\n                                      (_ :\n                                        Finsupp.single (↑Multiplicative.toAdd 1) 1 ∈\n                                          gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1))) } =\n                                ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) 0) GradedMonoid.GOne.one) }\n                        i *\n                      OneHom.toFun\n                        {\n                          toFun := fun m =>\n                            ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd m)))\n                              { val := Finsupp.single (↑Multiplicative.toAdd m) 1,\n                                property :=\n                                  (_ :\n                                    Finsupp.single (↑Multiplicative.toAdd m) 1 ∈\n                                      gradeBy R (↑f) (↑f (↑Multiplicative.toAdd m))) },\n                          map_one' :=\n                            (_ :\n                              ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f (↑Multiplicative.toAdd 1)))\n                                  { val := Finsupp.single (↑Multiplicative.toAdd 1) 1,\n                                    property :=\n                                      (_ :\n                                        Finsupp.single (↑Multiplicative.toAdd 1) 1 ∈\n                                          gradeBy R (↑f) (↑f (↑Multiplicative.toAdd 1))) } =\n                                ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) 0) GradedMonoid.GOne.one) }\n                        j) }\n        (↑Multiplicative.ofAdd m) =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m))\n      { val := Finsupp.single m r, property := (_ : Finsupp.single m r ∈ gradeBy R (↑f) (↑f m)) }\n[PROOFSTEP]\nrefine' (DirectSum.of_smul R _ _ _).symm.trans _\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nr : R\n⊢ ↑(DirectSum.of (fun i => (fun i => { x // x ∈ gradeBy R (↑f) i }) i)\n          (↑f (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m))))\n      (r •\n        { val := Finsupp.single (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)) 1,\n          property :=\n            (_ :\n              Finsupp.single (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)) 1 ∈\n                gradeBy R (↑f) (↑f (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)))) }) =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m))\n      { val := Finsupp.single m r, property := (_ : Finsupp.single m r ∈ gradeBy R (↑f) (↑f m)) }\n[PROOFSTEP]\napply DirectSum.of_eq_of_gradedMonoid_eq\n[GOAL]\ncase h\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nr : R\n⊢ GradedMonoid.mk (↑f (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)))\n      (r •\n        { val := Finsupp.single (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)) 1,\n          property :=\n            (_ :\n              Finsupp.single (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)) 1 ∈\n                gradeBy R (↑f) (↑f (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)))) }) =\n    GradedMonoid.mk (↑f m) { val := Finsupp.single m r, property := (_ : Finsupp.single m r ∈ gradeBy R (↑f) (↑f m)) }\n[PROOFSTEP]\nrefine' Sigma.subtype_ext rfl _\n[GOAL]\ncase h\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nr : R\n⊢ ↑(GradedMonoid.mk (↑f (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)))\n          (r •\n            { val := Finsupp.single (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)) 1,\n              property :=\n                (_ :\n                  Finsupp.single (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)) 1 ∈\n                    gradeBy R (↑f) (↑f (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)))) })).snd =\n    ↑(GradedMonoid.mk (↑f m)\n          { val := Finsupp.single m r, property := (_ : Finsupp.single m r ∈ gradeBy R (↑f) (↑f m)) }).snd\n[PROOFSTEP]\nrefine' (Finsupp.smul_single' _ _ _).trans _\n[GOAL]\ncase h\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nr : R\n⊢ Finsupp.single (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)) (r * 1) =\n    ↑(GradedMonoid.mk (↑f m)\n          { val := Finsupp.single m r, property := (_ : Finsupp.single m r ∈ gradeBy R (↑f) (↑f m)) }).snd\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase h\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nm : M\nr : R\n⊢ Finsupp.single (↑Multiplicative.toAdd (↑Multiplicative.ofAdd m)) r =\n    ↑(GradedMonoid.mk (↑f m)\n          { val := Finsupp.single m r, property := (_ : Finsupp.single m r ∈ gradeBy R (↑f) (↑f m)) }).snd\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : { x // x ∈ gradeBy R (↑f) i }\n⊢ ↑(decomposeAux f) ↑x = ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) x\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := x\n[GOAL]\ncase mk\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\nhx : x ∈ gradeBy R (↑f) i\n⊢ ↑(decomposeAux f) ↑{ val := x, property := hx } =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := x, property := hx }\n[PROOFSTEP]\nrevert hx\n[GOAL]\ncase mk\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\n⊢ ∀ (hx : x ∈ gradeBy R (↑f) i),\n    ↑(decomposeAux f) ↑{ val := x, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := x, property := hx }\n[PROOFSTEP]\nrefine' Finsupp.induction x _ _\n[GOAL]\ncase mk.refine'_1\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\n⊢ ∀ (hx : 0 ∈ gradeBy R (↑f) i),\n    ↑(decomposeAux f) ↑{ val := 0, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := 0, property := hx }\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase mk.refine'_1\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\nhx : 0 ∈ gradeBy R (↑f) i\n⊢ ↑(decomposeAux f) ↑{ val := 0, property := hx } =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := 0, property := hx }\n[PROOFSTEP]\nsymm\n[GOAL]\ncase mk.refine'_1\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\nhx : 0 ∈ gradeBy R (↑f) i\n⊢ ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := 0, property := hx } =\n    ↑(decomposeAux f) ↑{ val := 0, property := hx }\n[PROOFSTEP]\nexact AddMonoidHom.map_zero _\n[GOAL]\ncase mk.refine'_2\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\n⊢ ∀ (a : M) (b : R) (f_1 : M →₀ R),\n    ¬a ∈ f_1.support →\n      b ≠ 0 →\n        (∀ (hx : f_1 ∈ gradeBy R (↑f) i),\n            ↑(decomposeAux f) ↑{ val := f_1, property := hx } =\n              ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := f_1, property := hx }) →\n          ∀ (hx : Finsupp.single a b + f_1 ∈ gradeBy R (↑f) i),\n            ↑(decomposeAux f) ↑{ val := Finsupp.single a b + f_1, property := hx } =\n              ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i)\n                { val := Finsupp.single a b + f_1, property := hx }\n[PROOFSTEP]\nintro m b y hmy hb ih hmby\n[GOAL]\ncase mk.refine'_2\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) i),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := y, property := hx }\nhmby : Finsupp.single m b + y ∈ gradeBy R (↑f) i\n⊢ ↑(decomposeAux f) ↑{ val := Finsupp.single m b + y, property := hmby } =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := Finsupp.single m b + y, property := hmby }\n[PROOFSTEP]\nhave : Disjoint (Finsupp.single m b).support y.support := by\n  simpa only [Finsupp.support_single_ne_zero _ hb, Finset.disjoint_singleton_left]\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) i),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := y, property := hx }\nhmby : Finsupp.single m b + y ∈ gradeBy R (↑f) i\n⊢ Disjoint (Finsupp.single m b).support y.support\n[PROOFSTEP]\nsimpa only [Finsupp.support_single_ne_zero _ hb, Finset.disjoint_singleton_left]\n[GOAL]\ncase mk.refine'_2\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) i),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := y, property := hx }\nhmby : Finsupp.single m b + y ∈ gradeBy R (↑f) i\nthis : Disjoint (Finsupp.single m b).support y.support\n⊢ ↑(decomposeAux f) ↑{ val := Finsupp.single m b + y, property := hmby } =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := Finsupp.single m b + y, property := hmby }\n[PROOFSTEP]\nrw [mem_gradeBy_iff, Finsupp.support_add_eq this, Finset.coe_union, Set.union_subset_iff] at hmby \n[GOAL]\ncase mk.refine'_2\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) i),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := y, property := hx }\nhmby✝ : Finsupp.single m b + y ∈ gradeBy R (↑f) i\nhmby : ↑(Finsupp.single m b).support ⊆ ↑f ⁻¹' {i} ∧ ↑y.support ⊆ ↑f ⁻¹' {i}\nthis : Disjoint (Finsupp.single m b).support y.support\n⊢ ↑(decomposeAux f) ↑{ val := Finsupp.single m b + y, property := hmby✝ } =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := Finsupp.single m b + y, property := hmby✝ }\n[PROOFSTEP]\ncases' hmby with h1 h2\n[GOAL]\ncase mk.refine'_2.intro\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) i),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := y, property := hx }\nhmby : Finsupp.single m b + y ∈ gradeBy R (↑f) i\nthis : Disjoint (Finsupp.single m b).support y.support\nh1 : ↑(Finsupp.single m b).support ⊆ ↑f ⁻¹' {i}\nh2 : ↑y.support ⊆ ↑f ⁻¹' {i}\n⊢ ↑(decomposeAux f) ↑{ val := Finsupp.single m b + y, property := hmby } =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := Finsupp.single m b + y, property := hmby }\n[PROOFSTEP]\nhave : f m = i := by rwa [Finsupp.support_single_ne_zero _ hb, Finset.coe_singleton, Set.singleton_subset_iff] at h1 \n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) i),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := y, property := hx }\nhmby : Finsupp.single m b + y ∈ gradeBy R (↑f) i\nthis : Disjoint (Finsupp.single m b).support y.support\nh1 : ↑(Finsupp.single m b).support ⊆ ↑f ⁻¹' {i}\nh2 : ↑y.support ⊆ ↑f ⁻¹' {i}\n⊢ ↑f m = i\n[PROOFSTEP]\nrwa [Finsupp.support_single_ne_zero _ hb, Finset.coe_singleton, Set.singleton_subset_iff] at h1 \n[GOAL]\ncase mk.refine'_2.intro\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) i),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := y, property := hx }\nhmby : Finsupp.single m b + y ∈ gradeBy R (↑f) i\nthis✝ : Disjoint (Finsupp.single m b).support y.support\nh1 : ↑(Finsupp.single m b).support ⊆ ↑f ⁻¹' {i}\nh2 : ↑y.support ⊆ ↑f ⁻¹' {i}\nthis : ↑f m = i\n⊢ ↑(decomposeAux f) ↑{ val := Finsupp.single m b + y, property := hmby } =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) { val := Finsupp.single m b + y, property := hmby }\n[PROOFSTEP]\nsubst this\n[GOAL]\ncase mk.refine'_2.intro\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nthis : Disjoint (Finsupp.single m b).support y.support\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) (↑f m)),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := y, property := hx }\nhmby : Finsupp.single m b + y ∈ gradeBy R (↑f) (↑f m)\nh1 : ↑(Finsupp.single m b).support ⊆ ↑f ⁻¹' {↑f m}\nh2 : ↑y.support ⊆ ↑f ⁻¹' {↑f m}\n⊢ ↑(decomposeAux f) ↑{ val := Finsupp.single m b + y, property := hmby } =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := Finsupp.single m b + y, property := hmby }\n[PROOFSTEP]\nsimp only [AlgHom.map_add, Submodule.coe_mk, decomposeAux_single f m]\n[GOAL]\ncase mk.refine'_2.intro\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nthis : Disjoint (Finsupp.single m b).support y.support\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) (↑f m)),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := y, property := hx }\nhmby : Finsupp.single m b + y ∈ gradeBy R (↑f) (↑f m)\nh1 : ↑(Finsupp.single m b).support ⊆ ↑f ⁻¹' {↑f m}\nh2 : ↑y.support ⊆ ↑f ⁻¹' {↑f m}\n⊢ ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m))\n        { val := Finsupp.single m b, property := (_ : Finsupp.single m b ∈ gradeBy R (↑f) (↑f m)) } +\n      ↑(decomposeAux f) y =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := Finsupp.single m b + y, property := hmby }\n[PROOFSTEP]\nlet ih' := ih h2\n[GOAL]\ncase mk.refine'_2.intro\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nthis : Disjoint (Finsupp.single m b).support y.support\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) (↑f m)),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := y, property := hx }\nhmby : Finsupp.single m b + y ∈ gradeBy R (↑f) (↑f m)\nh1 : ↑(Finsupp.single m b).support ⊆ ↑f ⁻¹' {↑f m}\nh2 : ↑y.support ⊆ ↑f ⁻¹' {↑f m}\nih' : ↑(decomposeAux f) ↑{ val := y, property := h2 } =\n  ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := y, property := h2 } :=\n  ih h2\n⊢ ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m))\n        { val := Finsupp.single m b, property := (_ : Finsupp.single m b ∈ gradeBy R (↑f) (↑f m)) } +\n      ↑(decomposeAux f) y =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := Finsupp.single m b + y, property := hmby }\n[PROOFSTEP]\ndsimp at ih' \n[GOAL]\ncase mk.refine'_2.intro\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nthis : Disjoint (Finsupp.single m b).support y.support\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) (↑f m)),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := y, property := hx }\nhmby : Finsupp.single m b + y ∈ gradeBy R (↑f) (↑f m)\nh1 : ↑(Finsupp.single m b).support ⊆ ↑f ⁻¹' {↑f m}\nh2 : ↑y.support ⊆ ↑f ⁻¹' {↑f m}\nih' : ↑(decomposeAux f) y =\n  ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := y, property := h2 } :=\n  ih h2\n⊢ ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m))\n        { val := Finsupp.single m b, property := (_ : Finsupp.single m b ∈ gradeBy R (↑f) (↑f m)) } +\n      ↑(decomposeAux f) y =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := Finsupp.single m b + y, property := hmby }\n[PROOFSTEP]\nrw [ih', ← AddMonoidHom.map_add]\n[GOAL]\ncase mk.refine'_2.intro\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nthis : Disjoint (Finsupp.single m b).support y.support\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) (↑f m)),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := y, property := hx }\nhmby : Finsupp.single m b + y ∈ gradeBy R (↑f) (↑f m)\nh1 : ↑(Finsupp.single m b).support ⊆ ↑f ⁻¹' {↑f m}\nh2 : ↑y.support ⊆ ↑f ⁻¹' {↑f m}\nih' : ↑(decomposeAux f) y =\n  ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := y, property := h2 } :=\n  ih h2\n⊢ ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m))\n      ({ val := Finsupp.single m b, property := (_ : Finsupp.single m b ∈ gradeBy R (↑f) (↑f m)) } +\n        { val := y, property := h2 }) =\n    ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := Finsupp.single m b + y, property := hmby }\n[PROOFSTEP]\napply DirectSum.of_eq_of_gradedMonoid_eq\n[GOAL]\ncase mk.refine'_2.intro.h\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nx : AddMonoidAlgebra R M\nm : M\nb : R\ny : M →₀ R\nhmy : ¬m ∈ y.support\nhb : b ≠ 0\nthis : Disjoint (Finsupp.single m b).support y.support\nih :\n  ∀ (hx : y ∈ gradeBy R (↑f) (↑f m)),\n    ↑(decomposeAux f) ↑{ val := y, property := hx } =\n      ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := y, property := hx }\nhmby : Finsupp.single m b + y ∈ gradeBy R (↑f) (↑f m)\nh1 : ↑(Finsupp.single m b).support ⊆ ↑f ⁻¹' {↑f m}\nh2 : ↑y.support ⊆ ↑f ⁻¹' {↑f m}\nih' : ↑(decomposeAux f) y =\n  ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) (↑f m)) { val := y, property := h2 } :=\n  ih h2\n⊢ GradedMonoid.mk (↑f m)\n      ({ val := Finsupp.single m b, property := (_ : Finsupp.single m b ∈ gradeBy R (↑f) (↑f m)) } +\n        { val := y, property := h2 }) =\n    GradedMonoid.mk (↑f m) { val := Finsupp.single m b + y, property := hmby }\n[PROOFSTEP]\ncongr 2\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\n⊢ AlgHom.comp (coeAlgHom (gradeBy R ↑f)) (decomposeAux f) = AlgHom.id R (AddMonoidAlgebra R M)\n[PROOFSTEP]\next : 2\n[GOAL]\ncase h.h\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nx✝ : Multiplicative M\n⊢ ↑(MonoidHom.comp (↑(AlgHom.comp (coeAlgHom (gradeBy R ↑f)) (decomposeAux f))) (of R M)) x✝ =\n    ↑(MonoidHom.comp (↑(AlgHom.id R (AddMonoidAlgebra R M))) (of R M)) x✝\n[PROOFSTEP]\nsimp only [MonoidHom.coe_comp, MonoidHom.coe_coe, AlgHom.coe_comp, Function.comp_apply, of_apply, AlgHom.coe_id, id_eq]\n[GOAL]\ncase h.h\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\nx✝ : Multiplicative M\n⊢ ↑(coeAlgHom (gradeBy R ↑f)) (↑(decomposeAux f) (single (↑Multiplicative.toAdd x✝) 1)) =\n    single (↑Multiplicative.toAdd x✝) 1\n[PROOFSTEP]\nrw [decomposeAux_single, DirectSum.coeAlgHom_of, Subtype.coe_mk]\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\ni : ι\nx : { x // x ∈ gradeBy R (↑f) i }\n⊢ ↑(decomposeAux f) ↑x = ↑(DirectSum.of (fun i => { x // x ∈ gradeBy R (↑f) i }) i) x\n[PROOFSTEP]\nrw [decomposeAux_coe f x]\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\n⊢ Decomposition (gradeBy R ↑f)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nM : Type u_1\nι : Type u_2\nR : Type u_3\ninst✝⁴ : DecidableEq M\ninst✝³ : AddMonoid M\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : CommSemiring R\nf : M →+ ι\n⊢ Decomposition (grade R)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Algebra.MonoidAlgebra.Grading", "llama_tokens": 42454, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191214879992, "lm_q2_score": 0.5156199157230157, "lm_q1q2_score": 0.36558437966764873}}
{"text": "[GOAL]\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ : C\ninst✝ : HasPullbacks C\nX Y : C\nf : X ⟶ Y\ng h : Over Y\nk : g ⟶ h\n⊢ (pullback.fst ≫ k.left) ≫ h.hom = pullback.snd ≫ f\n[PROOFSTEP]\nsimp [pullback.condition]\n[GOAL]\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ (map f).obj g ⟶ h\n[PROOFSTEP]\nrefine' Over.homMk _ _\n[GOAL]\ncase refine'_1\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ ((map f).obj g).left ⟶ h.left\ncase refine'_2\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ ?refine'_1 ≫ h.hom = ((map f).obj g).hom\n[PROOFSTEP]\nrefine' Y.left ≫ pullback.fst\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ (Y.left ≫ pullback.fst) ≫ h.hom = ((map f).obj g).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ (Y.left ≫ pullback.fst) ≫ h.hom = g.hom ≫ f\n[PROOFSTEP]\nrw [← Over.w Y, Category.assoc, pullback.condition, Category.assoc]\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ Y.left ≫ pullback.snd ≫ f = Y.left ≫ ((pullback f).obj h).hom ≫ f\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nX : (map f).obj g ⟶ h\n⊢ (fun Y => homMk (Y.left ≫ pullback.fst))\n      ((fun X => homMk (pullback.lift X.left g.hom (_ : X.left ≫ h.hom = ((map f).obj g).hom))) X) =\n    X\n[PROOFSTEP]\next\n[GOAL]\ncase h\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nX : (map f).obj g ⟶ h\n⊢ ((fun Y => homMk (Y.left ≫ pullback.fst))\n        ((fun X => homMk (pullback.lift X.left g.hom (_ : X.left ≫ h.hom = ((map f).obj g).hom))) X)).left =\n    X.left\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nX : (map f).obj g ⟶ h\n⊢ pullback.lift X.left g.hom (_ : X.left ≫ h.hom = ((map f).obj g).hom) ≫ pullback.fst = X.left\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ (fun X => homMk (pullback.lift X.left g.hom (_ : X.left ≫ h.hom = ((map f).obj g).hom)))\n      ((fun Y => homMk (Y.left ≫ pullback.fst)) Y) =\n    Y\n[PROOFSTEP]\napply OverMorphism.ext\n[GOAL]\ncase h\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ ((fun X => homMk (pullback.lift X.left g.hom (_ : X.left ≫ h.hom = ((map f).obj g).hom)))\n        ((fun Y => homMk (Y.left ≫ pullback.fst)) Y)).left =\n    Y.left\n[PROOFSTEP]\napply pullback.hom_ext\n[GOAL]\ncase h.h₀\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ ((fun X => homMk (pullback.lift X.left g.hom (_ : X.left ≫ h.hom = ((map f).obj g).hom)))\n          ((fun Y => homMk (Y.left ≫ pullback.fst)) Y)).left ≫\n      pullback.fst =\n    Y.left ≫ pullback.fst\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.h₀\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ pullback.lift (Y.left ≫ pullback.fst) g.hom (_ : (homMk (Y.left ≫ pullback.fst)).left ≫ h.hom = ((map f).obj g).hom) ≫\n      pullback.fst =\n    Y.left ≫ pullback.fst\n[PROOFSTEP]\nsimp only [limit.lift_π, PullbackCone.mk_pt, PullbackCone.mk_π_app]\n[GOAL]\ncase h.h₁\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ ((fun X => homMk (pullback.lift X.left g.hom (_ : X.left ≫ h.hom = ((map f).obj g).hom)))\n          ((fun Y => homMk (Y.left ≫ pullback.fst)) Y)).left ≫\n      pullback.snd =\n    Y.left ≫ pullback.snd\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.h₁\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ pullback.lift (Y.left ≫ pullback.fst) g.hom (_ : (homMk (Y.left ≫ pullback.fst)).left ≫ h.hom = ((map f).obj g).hom) ≫\n      pullback.snd =\n    Y.left ≫ pullback.snd\n[PROOFSTEP]\nsimp only [limit.lift_π, PullbackCone.mk_pt, PullbackCone.mk_π_app, ← Over.w Y]\n[GOAL]\ncase h.h₁\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : C\ninst✝ : HasPullbacks C\nA B : C\nf : A ⟶ B\ng : Over A\nh : Over B\nY : g ⟶ (pullback f).obj h\n⊢ Y.left ≫ ((pullback f).obj h).hom = Y.left ≫ pullback.snd\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝² : SmallCategory J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ : C\ninst✝ : HasPushouts C\nX Y : C\nf : X ⟶ Y\ng h : Under X\nk : g ⟶ h\n⊢ g.hom ≫ k.right ≫ pushout.inl = f ≫ pushout.inr\n[PROOFSTEP]\nsimp [← pushout.condition]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Over", "llama_tokens": 2852, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6370307944803832, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.36545081167571325}}
{"text": "[GOAL]\nα : Type u\nf g : MonoOver α\nt : f ⟶ g\n⊢ (fun f => Set.range f.obj.hom) f ≤ (fun f => Set.range f.obj.hom) g\n[PROOFSTEP]\nrintro a ⟨x, rfl⟩\n[GOAL]\ncase intro\nα : Type u\nf g : MonoOver α\nt : f ⟶ g\nx : (𝟭 (Type u)).obj f.obj.left\n⊢ Comma.hom f.obj x ∈ (fun f => Set.range f.obj.hom) g\n[PROOFSTEP]\nexact ⟨t.1 x, congr_fun t.w x⟩\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Subobject.Types", "llama_tokens": 173, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.6825737344123242, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.3652441327058327}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\n⊢ HasStrictFDerivAt b (deriv h p) p\n[PROOFSTEP]\nsimp only [HasStrictFDerivAt]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\n⊢ (fun p_1 => b p_1.fst - b p_1.snd - ↑(deriv h p) (p_1.fst - p_1.snd)) =o[𝓝 (p, p)] fun p => p.fst - p.snd\n[PROOFSTEP]\nsimp only [← map_add_left_nhds_zero (p, p), isLittleO_map]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\n⊢ ((fun p_1 => b p_1.fst - b p_1.snd - ↑(deriv h p) (p_1.fst - p_1.snd)) ∘ fun x => (p, p) + x) =o[𝓝 0]\n    ((fun p => p.fst - p.snd) ∘ fun x => (p, p) + x)\n[PROOFSTEP]\nset T := (E × F) × E × F\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\nT : Type (max u_3 u_2) := (E × F) × E × F\n⊢ ((fun p_1 => b p_1.fst - b p_1.snd - ↑(deriv h p) (p_1.fst - p_1.snd)) ∘ fun x => (p, p) + x) =o[𝓝 0]\n    ((fun p => p.fst - p.snd) ∘ fun x => (p, p) + x)\n[PROOFSTEP]\ncalc\n  _ = fun x ↦ h.deriv (x.1 - x.2) (x.2.1, x.1.2) :=\n    by\n    ext ⟨⟨x₁, y₁⟩, ⟨x₂, y₂⟩⟩\n    rcases p with ⟨x, y⟩\n    simp [h.add_left, h.add_right, h.deriv_apply, h.map_sub_left, h.map_sub_right]\n    abel\n      -- _ =O[𝓝 (0 : T)] fun x ↦ ‖x.1 - x.2‖ * ‖(x.2.1, x.1.2)‖ :=\n          --     h.toContinuousLinearMap.deriv₂.isBoundedBilinearMap.isBigO_comp\n          -- _ = o[𝓝 0] fun x ↦ ‖x.1 - x.2‖ * 1 := _\n  _ =o[𝓝 (0 : T)] fun x ↦ x.1 - x.2 := by\n    -- TODO : add 2 `calc` steps instead of the next 3 lines\n    refine h.toContinuousLinearMap.deriv₂.isBoundedBilinearMap.isBigO_comp.trans_isLittleO ?_\n    suffices : (fun x : T ↦ ‖x.1 - x.2‖ * ‖(x.2.1, x.1.2)‖) =o[𝓝 0] fun x ↦ ‖x.1 - x.2‖ * 1\n    · simpa only [mul_one, isLittleO_norm_right] using this\n    refine\n      (isBigO_refl _ _).mul_isLittleO\n        ((isLittleO_one_iff _).2 ?_)\n          -- TODO: `continuity` fails\n    exact (continuous_snd.fst.prod_mk continuous_fst.snd).norm.tendsto' _ _ (by simp)\n  _ = _ := by simp [(· ∘ ·)]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\nT : Type (max u_3 u_2) := (E × F) × E × F\n⊢ ((fun p_1 => b p_1.fst - b p_1.snd - ↑(deriv h p) (p_1.fst - p_1.snd)) ∘ fun x => (p, p) + x) = fun x =>\n    ↑(deriv h (x.fst - x.snd)) (x.snd.fst, x.fst.snd)\n[PROOFSTEP]\next ⟨⟨x₁, y₁⟩, ⟨x₂, y₂⟩⟩\n[GOAL]\ncase h.mk.mk.mk\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\nT : Type (max u_3 u_2) := (E × F) × E × F\nx₁ : E\ny₁ : F\nx₂ : E\ny₂ : F\n⊢ ((fun p_1 => b p_1.fst - b p_1.snd - ↑(deriv h p) (p_1.fst - p_1.snd)) ∘ fun x => (p, p) + x) ((x₁, y₁), x₂, y₂) =\n    ↑(deriv h (((x₁, y₁), x₂, y₂).fst - ((x₁, y₁), x₂, y₂).snd))\n      (((x₁, y₁), x₂, y₂).snd.fst, ((x₁, y₁), x₂, y₂).fst.snd)\n[PROOFSTEP]\nrcases p with ⟨x, y⟩\n[GOAL]\ncase h.mk.mk.mk.mk\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx✝ : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\nT : Type (max u_3 u_2) := (E × F) × E × F\nx₁ : E\ny₁ : F\nx₂ : E\ny₂ : F\nx : E\ny : F\n⊢ ((fun p => b p.fst - b p.snd - ↑(deriv h (x, y)) (p.fst - p.snd)) ∘ fun x_1 => ((x, y), x, y) + x_1)\n      ((x₁, y₁), x₂, y₂) =\n    ↑(deriv h (((x₁, y₁), x₂, y₂).fst - ((x₁, y₁), x₂, y₂).snd))\n      (((x₁, y₁), x₂, y₂).snd.fst, ((x₁, y₁), x₂, y₂).fst.snd)\n[PROOFSTEP]\nsimp [h.add_left, h.add_right, h.deriv_apply, h.map_sub_left, h.map_sub_right]\n[GOAL]\ncase h.mk.mk.mk.mk\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx✝ : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\nT : Type (max u_3 u_2) := (E × F) × E × F\nx₁ : E\ny₁ : F\nx₂ : E\ny₂ : F\nx : E\ny : F\n⊢ b (x, y) + b (x₁, y) + (b (x, y₁) + b (x₁, y₁)) - (b (x, y) + b (x₂, y) + (b (x, y₂) + b (x₂, y₂))) -\n      (b (x, y) + b (x, y₁) + (b (x, y) + b (x₁, y)) - (b (x, y) + b (x, y₂) + (b (x, y) + b (x₂, y)))) =\n    b (x₁, y₁) - b (x₂, y₂)\n[PROOFSTEP]\nabel\n  -- _ =O[𝓝 (0 : T)] fun x ↦ ‖x.1 - x.2‖ * ‖(x.2.1, x.1.2)‖ :=\n      --     h.toContinuousLinearMap.deriv₂.isBoundedBilinearMap.isBigO_comp\n      -- _ = o[𝓝 0] fun x ↦ ‖x.1 - x.2‖ * 1 := _\n[GOAL]\ncase h.mk.mk.mk.mk\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx✝ : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\nT : Type (max u_3 u_2) := (E × F) × E × F\nx₁ : E\ny₁ : F\nx₂ : E\ny₂ : F\nx : E\ny : F\n⊢ b (x, y) + b (x₁, y) + (b (x, y₁) + b (x₁, y₁)) - (b (x, y) + b (x₂, y) + (b (x, y₂) + b (x₂, y₂))) -\n      (b (x, y) + b (x, y₁) + (b (x, y) + b (x₁, y)) - (b (x, y) + b (x, y₂) + (b (x, y) + b (x₂, y)))) =\n    b (x₁, y₁) - b (x₂, y₂)\n[PROOFSTEP]\nabel\n  -- _ =O[𝓝 (0 : T)] fun x ↦ ‖x.1 - x.2‖ * ‖(x.2.1, x.1.2)‖ :=\n      --     h.toContinuousLinearMap.deriv₂.isBoundedBilinearMap.isBigO_comp\n      -- _ = o[𝓝 0] fun x ↦ ‖x.1 - x.2‖ * 1 := _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\nT : Type (max u_3 u_2) := (E × F) × E × F\n⊢ (fun x => ↑(deriv h (x.fst - x.snd)) (x.snd.fst, x.fst.snd)) =o[𝓝 0] fun x => x.fst - x.snd\n[PROOFSTEP]\nrefine h.toContinuousLinearMap.deriv₂.isBoundedBilinearMap.isBigO_comp.trans_isLittleO ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\nT : Type (max u_3 u_2) := (E × F) × E × F\n⊢ (fun x => ‖x.fst - x.snd‖ * ‖(x.snd.fst, x.fst.snd)‖) =o[𝓝 0] fun x => x.fst - x.snd\n[PROOFSTEP]\nsuffices : (fun x : T ↦ ‖x.1 - x.2‖ * ‖(x.2.1, x.1.2)‖) =o[𝓝 0] fun x ↦ ‖x.1 - x.2‖ * 1\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\nT : Type (max u_3 u_2) := (E × F) × E × F\nthis : (fun x => ‖x.fst - x.snd‖ * ‖(x.snd.fst, x.fst.snd)‖) =o[𝓝 0] fun x => ‖x.fst - x.snd‖ * 1\n⊢ (fun x => ‖x.fst - x.snd‖ * ‖(x.snd.fst, x.fst.snd)‖) =o[𝓝 0] fun x => x.fst - x.snd\n[PROOFSTEP]\nsimpa only [mul_one, isLittleO_norm_right] using this\n[GOAL]\ncase this\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\nT : Type (max u_3 u_2) := (E × F) × E × F\n⊢ (fun x => ‖x.fst - x.snd‖ * ‖(x.snd.fst, x.fst.snd)‖) =o[𝓝 0] fun x => ‖x.fst - x.snd‖ * 1\n[PROOFSTEP]\nrefine\n  (isBigO_refl _ _).mul_isLittleO\n    ((isLittleO_one_iff _).2 ?_)\n      -- TODO: `continuity` fails\n[GOAL]\ncase this\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\nT : Type (max u_3 u_2) := (E × F) × E × F\n⊢ Tendsto (fun x => ‖(x.snd.fst, x.fst.snd)‖) (𝓝 0) (𝓝 0)\n[PROOFSTEP]\nexact (continuous_snd.fst.prod_mk continuous_fst.snd).norm.tendsto' _ _ (by simp)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\nT : Type (max u_3 u_2) := (E × F) × E × F\n⊢ ‖(0.snd.fst, 0.fst.snd)‖ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\nT : Type (max u_3 u_2) := (E × F) × E × F\n⊢ (fun x => x.fst - x.snd) = (fun p => p.fst - p.snd) ∘ fun x => (p, p) + x\n[PROOFSTEP]\nsimp [(· ∘ ·)]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\nhxs : UniqueDiffWithinAt 𝕜 u p\n⊢ fderivWithin 𝕜 b u p = deriv h p\n[PROOFSTEP]\nrw [DifferentiableAt.fderivWithin (h.differentiableAt p) hxs]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝¹ : NormedAddCommGroup G'\ninst✝ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nb : E × F → G\nu : Set (E × F)\nh : IsBoundedBilinearMap 𝕜 b\np : E × F\nhxs : UniqueDiffWithinAt 𝕜 u p\n⊢ fderiv 𝕜 b p = deriv h p\n[PROOFSTEP]\nexact h.fderiv p\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.FDeriv.Bilinear", "llama_tokens": 7645, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419831347361, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.36524156249333783}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : Semiring R\ninst✝ : OrderedSemiring S\nabv f g : AbsoluteValue R S\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\nobtain ⟨⟨_, _⟩, _⟩ := f\n[GOAL]\ncase mk.mk\nR : Type u_1\nS : Type u_2\ninst✝¹ : Semiring R\ninst✝ : OrderedSemiring S\nabv g : AbsoluteValue R S\ntoFun✝ : R → S\nmap_mul'✝ : ∀ (x y : R), toFun✝ (x * y) = toFun✝ x * toFun✝ y\nnonneg'✝ : ∀ (x : R), 0 ≤ MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } x\neq_zero'✝ : ∀ (x : R), MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } x = 0 ↔ x = 0\nadd_le'✝ :\n  ∀ (x y : R),\n    MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } (x + y) ≤\n      MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } x +\n        MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } y\nh :\n  (fun f => f.toFun)\n      { toMulHom := { toFun := toFun✝, map_mul' := map_mul'✝ }, nonneg' := nonneg'✝, eq_zero' := eq_zero'✝,\n        add_le' := add_le'✝ } =\n    (fun f => f.toFun) g\n⊢ { toMulHom := { toFun := toFun✝, map_mul' := map_mul'✝ }, nonneg' := nonneg'✝, eq_zero' := eq_zero'✝,\n      add_le' := add_le'✝ } =\n    g\n[PROOFSTEP]\nobtain ⟨⟨_, _⟩, _⟩ := g\n[GOAL]\ncase mk.mk.mk.mk\nR : Type u_1\nS : Type u_2\ninst✝¹ : Semiring R\ninst✝ : OrderedSemiring S\nabv : AbsoluteValue R S\ntoFun✝¹ : R → S\nmap_mul'✝¹ : ∀ (x y : R), toFun✝¹ (x * y) = toFun✝¹ x * toFun✝¹ y\nnonneg'✝¹ : ∀ (x : R), 0 ≤ MulHom.toFun { toFun := toFun✝¹, map_mul' := map_mul'✝¹ } x\neq_zero'✝¹ : ∀ (x : R), MulHom.toFun { toFun := toFun✝¹, map_mul' := map_mul'✝¹ } x = 0 ↔ x = 0\nadd_le'✝¹ :\n  ∀ (x y : R),\n    MulHom.toFun { toFun := toFun✝¹, map_mul' := map_mul'✝¹ } (x + y) ≤\n      MulHom.toFun { toFun := toFun✝¹, map_mul' := map_mul'✝¹ } x +\n        MulHom.toFun { toFun := toFun✝¹, map_mul' := map_mul'✝¹ } y\ntoFun✝ : R → S\nmap_mul'✝ : ∀ (x y : R), toFun✝ (x * y) = toFun✝ x * toFun✝ y\nnonneg'✝ : ∀ (x : R), 0 ≤ MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } x\neq_zero'✝ : ∀ (x : R), MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } x = 0 ↔ x = 0\nadd_le'✝ :\n  ∀ (x y : R),\n    MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } (x + y) ≤\n      MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } x +\n        MulHom.toFun { toFun := toFun✝, map_mul' := map_mul'✝ } y\nh :\n  (fun f => f.toFun)\n      { toMulHom := { toFun := toFun✝¹, map_mul' := map_mul'✝¹ }, nonneg' := nonneg'✝¹, eq_zero' := eq_zero'✝¹,\n        add_le' := add_le'✝¹ } =\n    (fun f => f.toFun)\n      { toMulHom := { toFun := toFun✝, map_mul' := map_mul'✝ }, nonneg' := nonneg'✝, eq_zero' := eq_zero'✝,\n        add_le' := add_le'✝ }\n⊢ { toMulHom := { toFun := toFun✝¹, map_mul' := map_mul'✝¹ }, nonneg' := nonneg'✝¹, eq_zero' := eq_zero'✝¹,\n      add_le' := add_le'✝¹ } =\n    { toMulHom := { toFun := toFun✝, map_mul' := map_mul'✝ }, nonneg' := nonneg'✝, eq_zero' := eq_zero'✝,\n      add_le' := add_le'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : Semiring R\ninst✝ : OrderedSemiring S\nabv : AbsoluteValue R S\nh : IsLeftRegular (↑abv 1)\n⊢ (fun x => ↑abv 1 * x) (↑abv 1) = (fun x => ↑abv 1 * x) 1\n[PROOFSTEP]\nsimp [← abv.map_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : OrderedSemiring S\nabv : AbsoluteValue R S\na b c : R\n⊢ ↑abv (a - c) ≤ ↑abv (a - b) + ↑abv (b - c)\n[PROOFSTEP]\nsimpa [sub_eq_add_neg, add_assoc] using abv.add_le (a - b) (b - c)\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : OrderedRing S\nabv : AbsoluteValue R S\na b : R\n⊢ ↑abv a ≤ ↑abv (a - b) + ↑abv b\n[PROOFSTEP]\nsimpa using abv.add_le (a - b) b\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : Ring R\ninst✝¹ : OrderedCommRing S\nabv : AbsoluteValue R S\ninst✝ : NoZeroDivisors S\na : R\n⊢ ↑abv (-a) = ↑abv a\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\ninst✝² : Ring R\ninst✝¹ : OrderedCommRing S\nabv : AbsoluteValue R S\ninst✝ : NoZeroDivisors S\na : R\nha : a = 0\n⊢ ↑abv (-a) = ↑abv a\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\ninst✝² : Ring R\ninst✝¹ : OrderedCommRing S\nabv : AbsoluteValue R S\ninst✝ : NoZeroDivisors S\na : R\nha : ¬a = 0\n⊢ ↑abv (-a) = ↑abv a\n[PROOFSTEP]\nrefine' (mul_self_eq_mul_self_iff.mp (by rw [← abv.map_mul, neg_mul_neg, abv.map_mul])).resolve_right _\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : Ring R\ninst✝¹ : OrderedCommRing S\nabv : AbsoluteValue R S\ninst✝ : NoZeroDivisors S\na : R\nha : ¬a = 0\n⊢ ↑abv (-a) * ↑abv (-a) = ↑abv a * ↑abv a\n[PROOFSTEP]\nrw [← abv.map_mul, neg_mul_neg, abv.map_mul]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\ninst✝² : Ring R\ninst✝¹ : OrderedCommRing S\nabv : AbsoluteValue R S\ninst✝ : NoZeroDivisors S\na : R\nha : ¬a = 0\n⊢ ¬↑abv (-a) = -↑abv a\n[PROOFSTEP]\nexact ((neg_lt_zero.mpr (abv.pos ha)).trans (abv.pos (neg_ne_zero.mpr ha))).ne'\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : Ring R\ninst✝¹ : OrderedCommRing S\nabv : AbsoluteValue R S\ninst✝ : NoZeroDivisors S\na b : R\n⊢ ↑abv (a - b) = ↑abv (b - a)\n[PROOFSTEP]\nrw [← neg_sub, abv.map_neg]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : LinearOrderedCommRing S\nabv : AbsoluteValue R S\na b : R\n⊢ ↑abv b - ↑abv a ≤ ↑abv (a - b)\n[PROOFSTEP]\nrw [abv.map_sub]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : LinearOrderedCommRing S\nabv : AbsoluteValue R S\na b : R\n⊢ ↑abv b - ↑abv a ≤ ↑abv (b - a)\n[PROOFSTEP]\napply abv.le_sub\n[GOAL]\nS : Type u_1\ninst✝² : OrderedRing S\nR : Type u_2\ninst✝¹ : Ring R\nabv : R → S\ninst✝ : IsAbsoluteValue abv\na b c : R\n⊢ abv (a - c) ≤ abv (a - b) + abv (b - c)\n[PROOFSTEP]\nsimpa [sub_eq_add_neg, add_assoc] using abv_add abv (a - b) (b - c)\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.AbsoluteValue", "llama_tokens": 2968, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.658417487156366, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.3650730502416665}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝ : AddGroup n\n⊢ Injective circulant\n[PROOFSTEP]\nintro v w h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝ : AddGroup n\nv w : n → α\nh : circulant v = circulant w\n⊢ v = w\n[PROOFSTEP]\next k\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝ : AddGroup n\nv w : n → α\nh : circulant v = circulant w\nk : n\n⊢ v k = w k\n[PROOFSTEP]\nrw [← circulant_col_zero_eq v, ← circulant_col_zero_eq w, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\n⊢ Injective fun v => circulant v\n[PROOFSTEP]\nsimp [Injective]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝ : AddGroup n\nv : n → α\n⊢ (circulant v)ᵀ = circulant fun i => v (-i)\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝ : AddGroup n\nv : n → α\ni✝ x✝ : n\n⊢ (circulant v)ᵀ i✝ x✝ = circulant (fun i => v (-i)) i✝ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝¹ : Star α\ninst✝ : AddGroup n\nv : n → α\n⊢ (circulant v)ᴴ = circulant (star fun i => v (-i))\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝¹ : Star α\ninst✝ : AddGroup n\nv : n → α\ni✝ x✝ : n\n⊢ (circulant v)ᴴ i✝ x✝ = circulant (star fun i => v (-i)) i✝ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\n⊢ ∀ (v : Fin 0 → α), (circulant v)ᵀ = circulant fun i => v (-i)\n[PROOFSTEP]\nsimp [Injective]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝ : Star α\n⊢ ∀ (v : Fin 0 → α), (circulant v)ᴴ = circulant (star fun i => v (-i))\n[PROOFSTEP]\nsimp [Injective]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝² : Semiring α\ninst✝¹ : Fintype n\ninst✝ : AddGroup n\nv w : n → α\n⊢ circulant v * circulant w = circulant (mulVec (circulant v) w)\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝² : Semiring α\ninst✝¹ : Fintype n\ninst✝ : AddGroup n\nv w : n → α\ni j : n\n⊢ (circulant v * circulant w) i j = circulant (mulVec (circulant v) w) i j\n[PROOFSTEP]\nsimp only [mul_apply, mulVec, circulant_apply, dotProduct]\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝² : Semiring α\ninst✝¹ : Fintype n\ninst✝ : AddGroup n\nv w : n → α\ni j : n\n⊢ ∑ x : n, v (i - x) * w (x - j) = ∑ x : n, v (i - j - x) * w x\n[PROOFSTEP]\nrefine' Fintype.sum_equiv (Equiv.subRight j) _ _ _\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝² : Semiring α\ninst✝¹ : Fintype n\ninst✝ : AddGroup n\nv w : n → α\ni j : n\n⊢ ∀ (x : n), v (i - x) * w (x - j) = v (i - j - ↑(Equiv.subRight j) x) * w (↑(Equiv.subRight j) x)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝² : Semiring α\ninst✝¹ : Fintype n\ninst✝ : AddGroup n\nv w : n → α\ni j x : n\n⊢ v (i - x) * w (x - j) = v (i - j - ↑(Equiv.subRight j) x) * w (↑(Equiv.subRight j) x)\n[PROOFSTEP]\nsimp only [Equiv.subRight_apply, sub_sub_sub_cancel_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝ : Semiring α\n⊢ ∀ (v w : Fin 0 → α), circulant v * circulant w = circulant (mulVec (circulant v) w)\n[PROOFSTEP]\nsimp [Injective]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝³ : CommSemigroup α\ninst✝² : AddCommMonoid α\ninst✝¹ : Fintype n\ninst✝ : AddCommGroup n\nv w : n → α\n⊢ circulant v * circulant w = circulant w * circulant v\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝³ : CommSemigroup α\ninst✝² : AddCommMonoid α\ninst✝¹ : Fintype n\ninst✝ : AddCommGroup n\nv w : n → α\ni j : n\n⊢ (circulant v * circulant w) i j = (circulant w * circulant v) i j\n[PROOFSTEP]\nsimp only [mul_apply, circulant_apply, mul_comm]\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝³ : CommSemigroup α\ninst✝² : AddCommMonoid α\ninst✝¹ : Fintype n\ninst✝ : AddCommGroup n\nv w : n → α\ni j : n\n⊢ ∑ x : n, v (i - x) * w (x - j) = ∑ x : n, w (i - x) * v (x - j)\n[PROOFSTEP]\nrefine' Fintype.sum_equiv ((Equiv.subLeft i).trans (Equiv.addRight j)) _ _ _\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝³ : CommSemigroup α\ninst✝² : AddCommMonoid α\ninst✝¹ : Fintype n\ninst✝ : AddCommGroup n\nv w : n → α\ni j : n\n⊢ ∀ (x : n),\n    v (i - x) * w (x - j) =\n      w (i - ↑((Equiv.subLeft i).trans (Equiv.addRight j)) x) * v (↑((Equiv.subLeft i).trans (Equiv.addRight j)) x - j)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝³ : CommSemigroup α\ninst✝² : AddCommMonoid α\ninst✝¹ : Fintype n\ninst✝ : AddCommGroup n\nv w : n → α\ni j x : n\n⊢ v (i - x) * w (x - j) =\n    w (i - ↑((Equiv.subLeft i).trans (Equiv.addRight j)) x) * v (↑((Equiv.subLeft i).trans (Equiv.addRight j)) x - j)\n[PROOFSTEP]\nsimp [mul_comm]\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝³ : CommSemigroup α\ninst✝² : AddCommMonoid α\ninst✝¹ : Fintype n\ninst✝ : AddCommGroup n\nv w : n → α\ni j x : n\n⊢ v (i - x) * w (x - j) = v (i - x) * w (i - (i - x + j))\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase a.h.e_a.e_a\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝³ : CommSemigroup α\ninst✝² : AddCommMonoid α\ninst✝¹ : Fintype n\ninst✝ : AddCommGroup n\nv w : n → α\ni j x : n\n⊢ x - j = i - (i - x + j)\n[PROOFSTEP]\nabel\n[GOAL]\ncase a.h.e_a.e_a\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝³ : CommSemigroup α\ninst✝² : AddCommMonoid α\ninst✝¹ : Fintype n\ninst✝ : AddCommGroup n\nv w : n → α\ni j x : n\n⊢ x - j = i - (i - x + j)\n[PROOFSTEP]\nabel\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝¹ : CommSemigroup α\ninst✝ : AddCommMonoid α\n⊢ ∀ (v w : Fin 0 → α), circulant v * circulant w = circulant w * circulant v\n[PROOFSTEP]\nsimp [Injective]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nm : Type u_3\nn✝ : Type u_4\nR : Type u_5\nα : Type u_6\nn : Type u_7\ninst✝³ : Zero α\ninst✝² : One α\ninst✝¹ : DecidableEq n\ninst✝ : AddGroup n\n⊢ circulant (Pi.single 0 1) = 1\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nα✝ : Type u_1\nβ : Type u_2\nm : Type u_3\nn✝ : Type u_4\nR : Type u_5\nα : Type u_6\nn : Type u_7\ninst✝³ : Zero α\ninst✝² : One α\ninst✝¹ : DecidableEq n\ninst✝ : AddGroup n\ni j : n\n⊢ circulant (Pi.single 0 1) i j = OfNat.ofNat 1 i j\n[PROOFSTEP]\nsimp [one_apply, Pi.single_apply, sub_eq_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn✝ : Type u_4\nR : Type u_5\nn : Type u_6\ninst✝³ : Semiring α\ninst✝² : DecidableEq n\ninst✝¹ : AddGroup n\ninst✝ : Fintype n\na : α\n⊢ circulant (Pi.single 0 a) = ↑(scalar n) a\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn✝ : Type u_4\nR : Type u_5\nn : Type u_6\ninst✝³ : Semiring α\ninst✝² : DecidableEq n\ninst✝¹ : AddGroup n\ninst✝ : Fintype n\na : α\ni j : n\n⊢ circulant (Pi.single 0 a) i j = ↑(scalar n) a i j\n[PROOFSTEP]\nsimp [Pi.single_apply, one_apply, sub_eq_zero]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\nα : Type u_6\ninst✝¹ : Zero α\ninst✝ : One α\n⊢ (circulant fun i => if ↑i = 0 then 1 else 0) = 1\n[PROOFSTEP]\nsimp [Injective]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nm : Type u_3\nn✝ : Type u_4\nR : Type u_5\nα : Type u_6\ninst✝¹ : Zero α\ninst✝ : One α\nn : ℕ\n⊢ (circulant fun i => if ↑i = 0 then 1 else 0) = 1\n[PROOFSTEP]\nrw [← circulant_single_one]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nm : Type u_3\nn✝ : Type u_4\nR : Type u_5\nα : Type u_6\ninst✝¹ : Zero α\ninst✝ : One α\nn : ℕ\n⊢ (circulant fun i => if ↑i = 0 then 1 else 0) = circulant (Pi.single 0 1)\n[PROOFSTEP]\ncongr with j\n[GOAL]\ncase a.h\nα✝ : Type u_1\nβ : Type u_2\nm : Type u_3\nn✝ : Type u_4\nR : Type u_5\nα : Type u_6\ninst✝¹ : Zero α\ninst✝ : One α\nn : ℕ\nj x✝ : Fin (n + 1)\n⊢ circulant (fun i => if ↑i = 0 then 1 else 0) j x✝ = circulant (Pi.single 0 1) j x✝\n[PROOFSTEP]\nsimp [Pi.single_apply, Fin.ext_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\ninst✝ : AddGroup n\nv : n → α\n⊢ IsSymm (circulant v) ↔ ∀ (i : n), v (-i) = v i\n[PROOFSTEP]\nrw [IsSymm, transpose_circulant, circulant_inj, funext_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : Type u_3\nn : Type u_4\nR : Type u_5\nv✝ : Fin 0 → α\n⊢ IsSymm (circulant v✝) ↔ ∀ (i : Fin 0), v✝ (-i) = v✝ i\n[PROOFSTEP]\nsimp [IsSymm.ext_iff, IsEmpty.forall_iff]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Circulant", "llama_tokens": 4425, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.640635854839898, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.36506804047149094}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\nd : ℝ≥0∞\n⊢ d ≤ einfsep s ↔ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → d ≤ edist x y\n[PROOFSTEP]\nsimp_rw [einfsep, le_iInf_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\n⊢ einfsep s = 0 ↔ ∀ (C : ℝ≥0∞), 0 < C → ∃ x x_1 y x_2 _hxy, edist x y < C\n[PROOFSTEP]\nsimp_rw [einfsep, ← _root_.bot_eq_zero, iInf_eq_bot, iInf_lt_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\n⊢ 0 < einfsep s ↔ ∃ C _hC, ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → C ≤ edist x y\n[PROOFSTEP]\nrw [pos_iff_ne_zero, Ne.def, einfsep_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\n⊢ (¬∀ (C : ℝ≥0∞), 0 < C → ∃ x x_1 y x_2 _hxy, edist x y < C) ↔\n    ∃ C _hC, ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → C ≤ edist x y\n[PROOFSTEP]\nsimp only [not_forall, not_exists, not_lt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\n⊢ einfsep s = ⊤ ↔ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → edist x y = ⊤\n[PROOFSTEP]\nsimp_rw [einfsep, iInf_eq_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\n⊢ einfsep s < ⊤ ↔ ∃ x x_1 y x_2 _hxy, edist x y < ⊤\n[PROOFSTEP]\nsimp_rw [einfsep, iInf_lt_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\n⊢ einfsep s ≠ ⊤ ↔ ∃ x x_1 y x_2 _hxy, edist x y ≠ ⊤\n[PROOFSTEP]\nsimp_rw [← lt_top_iff_ne_top, einfsep_lt_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\nd : ℝ≥0∞\n⊢ einfsep s < d ↔ ∃ x x_1 y x_2 _h, edist x y < d\n[PROOFSTEP]\nsimp_rw [einfsep, iInf_lt_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\nhs : einfsep s < ⊤\n⊢ Set.Nontrivial s\n[PROOFSTEP]\nrcases einfsep_lt_top.1 hs with ⟨_, hx, _, hy, hxy, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\nhs : einfsep s < ⊤\nw✝¹ : α\nhx : w✝¹ ∈ s\nw✝ : α\nhy : w✝ ∈ s\nhxy : w✝¹ ≠ w✝\nh✝ : edist w✝¹ w✝ < ⊤\n⊢ Set.Nontrivial s\n[PROOFSTEP]\nexact ⟨_, hx, _, hy, hxy⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\nhs : Set.Subsingleton s\n⊢ Set.einfsep s = ⊤\n[PROOFSTEP]\nrw [einfsep_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\nhs : Set.Subsingleton s\n⊢ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → edist x y = ⊤\n[PROOFSTEP]\nexact fun _ hx _ hy hxy => (hxy <| hs hx hy).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns✝ t : Set α\nd : ℝ≥0∞\nf : β → α\ns : Set β\n⊢ d ≤ einfsep (f '' s) ↔ ∀ (x : β), x ∈ s → ∀ (y : β), y ∈ s → f x ≠ f y → d ≤ edist (f x) (f y)\n[PROOFSTEP]\nsimp_rw [le_einfsep_iff, ball_image_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns✝ t : Set α\nι : Type u_3\no : Option ι\ns : ι → Set α\n⊢ einfsep (⋃ (i : ι) (_ : i ∈ o), s i) = ⨅ (i : ι) (_ : i ∈ o), einfsep (s i)\n[PROOFSTEP]\ncases o\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns✝ t : Set α\nι : Type u_3\ns : ι → Set α\n⊢ einfsep (⋃ (i : ι) (_ : i ∈ none), s i) = ⨅ (i : ι) (_ : i ∈ none), einfsep (s i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns✝ t : Set α\nι : Type u_3\ns : ι → Set α\nval✝ : ι\n⊢ einfsep (⋃ (i : ι) (_ : i ∈ Option.some val✝), s i) = ⨅ (i : ι) (_ : i ∈ Option.some val✝), einfsep (s i)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\n⊢ einfsep (insert x s) ≤ ⨅ (y : α) (_ : y ∈ s) (_ : x ≠ y), edist x y\n[PROOFSTEP]\nsimp_rw [le_iInf_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\n⊢ ∀ (i : α), i ∈ s → x ≠ i → einfsep (insert x s) ≤ edist x i\n[PROOFSTEP]\nrefine' fun _ hy hxy => einfsep_le_edist_of_mem (mem_insert _ _) (mem_insert_of_mem _ hy) hxy\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\n⊢ edist x y ⊓ edist y x ≤ einfsep {x, y}\n[PROOFSTEP]\nsimp_rw [le_einfsep_iff, inf_le_iff, mem_insert_iff, mem_singleton_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\n⊢ ∀ (x_1 : α),\n    x_1 = x ∨ x_1 = y →\n      ∀ (y_1 : α), y_1 = x ∨ y_1 = y → x_1 ≠ y_1 → edist x y ≤ edist x_1 y_1 ∨ edist y x ≤ edist x_1 y_1\n[PROOFSTEP]\nrintro a (rfl | rfl) b (rfl | rfl) hab\n[GOAL]\ncase inl.inl\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\ny : α\ns t : Set α\nb : α\nhab : b ≠ b\n⊢ edist b y ≤ edist b b ∨ edist y b ≤ edist b b\n[PROOFSTEP]\ntry simp only [le_refl, true_or, or_true]\n[GOAL]\ncase inl.inl\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\ny : α\ns t : Set α\nb : α\nhab : b ≠ b\n⊢ edist b y ≤ edist b b ∨ edist y b ≤ edist b b\n[PROOFSTEP]\nsimp only [le_refl, true_or, or_true]\n[GOAL]\ncase inl.inr\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\ns t : Set α\na b : α\nhab : a ≠ b\n⊢ edist a b ≤ edist a b ∨ edist b a ≤ edist a b\n[PROOFSTEP]\ntry simp only [le_refl, true_or, or_true]\n[GOAL]\ncase inl.inr\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\ns t : Set α\na b : α\nhab : a ≠ b\n⊢ edist a b ≤ edist a b ∨ edist b a ≤ edist a b\n[PROOFSTEP]\nsimp only [le_refl, true_or, or_true]\n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\ns t : Set α\na b : α\nhab : a ≠ b\n⊢ edist b a ≤ edist a b ∨ edist a b ≤ edist a b\n[PROOFSTEP]\ntry simp only [le_refl, true_or, or_true]\n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\ns t : Set α\na b : α\nhab : a ≠ b\n⊢ edist b a ≤ edist a b ∨ edist a b ≤ edist a b\n[PROOFSTEP]\nsimp only [le_refl, true_or, or_true]\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx : α\ns t : Set α\nb : α\nhab : b ≠ b\n⊢ edist x b ≤ edist b b ∨ edist b x ≤ edist b b\n[PROOFSTEP]\ntry simp only [le_refl, true_or, or_true]\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx : α\ns t : Set α\nb : α\nhab : b ≠ b\n⊢ edist x b ≤ edist b b ∨ edist b x ≤ edist b b\n[PROOFSTEP]\nsimp only [le_refl, true_or, or_true]\n[GOAL]\ncase inl.inl\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\ny : α\ns t : Set α\nb : α\nhab : b ≠ b\n⊢ edist b y ≤ edist b b ∨ edist y b ≤ edist b b\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx : α\ns t : Set α\nb : α\nhab : b ≠ b\n⊢ edist x b ≤ edist b b ∨ edist b x ≤ edist b b\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\nhxy : x ≠ y\n⊢ einfsep {x, y} ≤ edist y x\n[PROOFSTEP]\nrw [pair_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\nhxy : x ≠ y\n⊢ einfsep {y, x} ≤ edist y x\n[PROOFSTEP]\nexact einfsep_pair_le_left hxy.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\n⊢ einfsep s = ⨅ (d : ↑(offDiag s)), uncurry edist ↑d\n[PROOFSTEP]\nrefine' eq_of_forall_le_iff fun _ => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\nx✝ : ℝ≥0∞\n⊢ x✝ ≤ einfsep s ↔ x✝ ≤ ⨅ (d : ↑(offDiag s)), uncurry edist ↑d\n[PROOFSTEP]\nsimp_rw [le_einfsep_iff, le_iInf_iff, imp_forall_iff, SetCoe.forall, mem_offDiag, Prod.forall, uncurry_apply_pair,\n  and_imp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : EDist α\nx y : α\ns t : Set α\ninst✝¹ : DecidableEq α\ninst✝ : Fintype ↑s\n⊢ einfsep s = Finset.inf (toFinset (offDiag s)) (uncurry edist)\n[PROOFSTEP]\nrefine' eq_of_forall_le_iff fun _ => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : EDist α\nx y : α\ns t : Set α\ninst✝¹ : DecidableEq α\ninst✝ : Fintype ↑s\nx✝ : ℝ≥0∞\n⊢ x✝ ≤ einfsep s ↔ x✝ ≤ Finset.inf (toFinset (offDiag s)) (uncurry edist)\n[PROOFSTEP]\nsimp_rw [le_einfsep_iff, imp_forall_iff, Finset.le_inf_iff, mem_toFinset, mem_offDiag, Prod.forall, uncurry_apply_pair,\n  and_imp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\nhs : Set.Finite s\n⊢ Set.einfsep s = Finset.inf (Finite.toFinset (_ : Set.Finite (offDiag s))) (uncurry edist)\n[PROOFSTEP]\nrefine' eq_of_forall_le_iff fun _ => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns t : Set α\nhs : Set.Finite s\nx✝ : ℝ≥0∞\n⊢ x✝ ≤ Set.einfsep s ↔ x✝ ≤ Finset.inf (Finite.toFinset (_ : Set.Finite (offDiag s))) (uncurry edist)\n[PROOFSTEP]\nsimp_rw [le_einfsep_iff, imp_forall_iff, Finset.le_inf_iff, Finite.mem_toFinset, mem_offDiag, Prod.forall,\n  uncurry_apply_pair, and_imp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EDist α\nx y : α\ns✝ t : Set α\ninst✝ : DecidableEq α\ns : Finset α\n⊢ einfsep ↑s = Finset.inf (Finset.offDiag s) (uncurry edist)\n[PROOFSTEP]\nsimp_rw [einfsep_of_fintype, ← Finset.coe_offDiag, Finset.toFinset_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EDist α\nx y : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\n⊢ ∃ x x_1 y x_2 _hxy, einfsep s = edist x y\n[PROOFSTEP]\nclassical\ncases nonempty_fintype s\nsimp_rw [einfsep_of_fintype]\nrcases@Finset.exists_mem_eq_inf _ _ _ _ s.offDiag.toFinset (by simpa) (uncurry edist) with ⟨w, hxy, hed⟩\nsimp_rw [mem_toFinset] at hxy \nrefine' ⟨w.fst, hxy.1, w.snd, hxy.2.1, hxy.2.2, hed⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EDist α\nx y : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\n⊢ ∃ x x_1 y x_2 _hxy, einfsep s = edist x y\n[PROOFSTEP]\ncases nonempty_fintype s\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EDist α\nx y : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\nval✝ : Fintype ↑s\n⊢ ∃ x x_1 y x_2 _hxy, einfsep s = edist x y\n[PROOFSTEP]\nsimp_rw [einfsep_of_fintype]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EDist α\nx y : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\nval✝ : Fintype ↑s\n⊢ ∃ x h y h h, Finset.inf (toFinset (offDiag s)) (uncurry edist) = edist x y\n[PROOFSTEP]\nrcases@Finset.exists_mem_eq_inf _ _ _ _ s.offDiag.toFinset (by simpa) (uncurry edist) with ⟨w, hxy, hed⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EDist α\nx y : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\nval✝ : Fintype ↑s\n⊢ Finset.Nonempty (toFinset (offDiag s))\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EDist α\nx y : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\nval✝ : Fintype ↑s\nw : α × α\nhxy : w ∈ toFinset (offDiag s)\nhed : Finset.inf (toFinset (offDiag s)) (uncurry edist) = uncurry edist w\n⊢ ∃ x h y h h, Finset.inf (toFinset (offDiag s)) (uncurry edist) = edist x y\n[PROOFSTEP]\nsimp_rw [mem_toFinset] at hxy \n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EDist α\nx y : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\nval✝ : Fintype ↑s\nw : α × α\nhed : Finset.inf (toFinset (offDiag s)) (uncurry edist) = uncurry edist w\nhxy : w ∈ offDiag s\n⊢ ∃ x h y h h, Finset.inf (toFinset (offDiag s)) (uncurry edist) = edist x y\n[PROOFSTEP]\nrefine' ⟨w.fst, hxy.1, w.snd, hxy.2.1, hxy.2.2, hed⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\nx y z : α\ns t : Set α\nhxy : x ≠ y\n⊢ einfsep {x, y} = edist x y\n[PROOFSTEP]\nnth_rw 1 [← min_self (edist x y)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\nx y z : α\ns t : Set α\nhxy : x ≠ y\n⊢ einfsep {x, y} = min (edist x y) (edist x y)\n[PROOFSTEP]\nconvert einfsep_pair_eq_inf hxy using 2\n[GOAL]\ncase h.e'_3.h.e'_2\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\nx y z : α\ns t : Set α\nhxy : x ≠ y\n⊢ edist x y = edist y x\n[PROOFSTEP]\nrw [edist_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\nx y z : α\ns t : Set α\n⊢ einfsep (insert x s) = (⨅ (y : α) (_ : y ∈ s) (_ : x ≠ y), edist x y) ⊓ einfsep s\n[PROOFSTEP]\nrefine' le_antisymm (le_min einfsep_insert_le (einfsep_anti (subset_insert _ _))) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\nx y z : α\ns t : Set α\n⊢ (⨅ (y : α) (_ : y ∈ s) (_ : x ≠ y), edist x y) ⊓ einfsep s ≤ einfsep (insert x s)\n[PROOFSTEP]\nsimp_rw [le_einfsep_iff, inf_le_iff, mem_insert_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\nx y z : α\ns t : Set α\n⊢ ∀ (x_1 : α),\n    x_1 = x ∨ x_1 ∈ s →\n      ∀ (y : α),\n        y = x ∨ y ∈ s → x_1 ≠ y → ⨅ (y : α) (_ : y ∈ s) (_ : x ≠ y), edist x y ≤ edist x_1 y ∨ einfsep s ≤ edist x_1 y\n[PROOFSTEP]\nrintro y (rfl | hy) z (rfl | hz) hyz\n[GOAL]\ncase inl.inl\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\ny z✝ : α\ns t : Set α\nz : α\nhyz : z ≠ z\n⊢ ⨅ (y : α) (_ : y ∈ s) (_ : z ≠ y), edist z y ≤ edist z z ∨ einfsep s ≤ edist z z\n[PROOFSTEP]\nexact False.elim (hyz rfl)\n[GOAL]\ncase inl.inr\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\ny✝ z✝ : α\ns t : Set α\ny z : α\nhz : z ∈ s\nhyz : y ≠ z\n⊢ ⨅ (y_1 : α) (_ : y_1 ∈ s) (_ : y ≠ y_1), edist y y_1 ≤ edist y z ∨ einfsep s ≤ edist y z\n[PROOFSTEP]\nexact Or.inl (iInf_le_of_le _ (iInf₂_le hz hyz))\n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\ny✝ z✝ : α\ns t : Set α\ny : α\nhy : y ∈ s\nz : α\nhyz : y ≠ z\n⊢ ⨅ (y : α) (_ : y ∈ s) (_ : z ≠ y), edist z y ≤ edist y z ∨ einfsep s ≤ edist y z\n[PROOFSTEP]\nrw [edist_comm]\n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\ny✝ z✝ : α\ns t : Set α\ny : α\nhy : y ∈ s\nz : α\nhyz : y ≠ z\n⊢ ⨅ (y : α) (_ : y ∈ s) (_ : z ≠ y), edist z y ≤ edist z y ∨ einfsep s ≤ edist z y\n[PROOFSTEP]\nexact Or.inl (iInf_le_of_le _ (iInf₂_le hy hyz.symm))\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\nx y✝ z✝ : α\ns t : Set α\ny : α\nhy : y ∈ s\nz : α\nhz : z ∈ s\nhyz : y ≠ z\n⊢ ⨅ (y : α) (_ : y ∈ s) (_ : x ≠ y), edist x y ≤ edist y z ∨ einfsep s ≤ edist y z\n[PROOFSTEP]\nexact Or.inr (einfsep_le_edist_of_mem hy hz hyz)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\nx y z : α\ns t : Set α\nhxy : x ≠ y\nhyz : y ≠ z\nhxz : x ≠ z\n⊢ einfsep {x, y, z} = edist x y ⊓ edist x z ⊓ edist y z\n[PROOFSTEP]\nsimp_rw [einfsep_insert, iInf_insert, iInf_singleton, einfsep_singleton, inf_top_eq, ciInf_pos hxy, ciInf_pos hyz,\n  ciInf_pos hxz]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : PseudoEMetricSpace α\nx y z : α\ns✝ t : Set α\nπ : β → Type u_3\ninst✝¹ : Fintype β\ninst✝ : (b : β) → PseudoEMetricSpace (π b)\ns : (b : β) → Set (π b)\nc : ℝ≥0∞\nh : ∀ (b : β), c ≤ einfsep (s b)\n⊢ c ≤ einfsep (pi univ s)\n[PROOFSTEP]\nrefine' le_einfsep fun x hx y hy hxy => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : PseudoEMetricSpace α\nx✝ y✝ z : α\ns✝ t : Set α\nπ : β → Type u_3\ninst✝¹ : Fintype β\ninst✝ : (b : β) → PseudoEMetricSpace (π b)\ns : (b : β) → Set (π b)\nc : ℝ≥0∞\nh : ∀ (b : β), c ≤ einfsep (s b)\nx : (i : β) → π i\nhx : x ∈ pi univ s\ny : (i : β) → π i\nhy : y ∈ pi univ s\nhxy : x ≠ y\n⊢ c ≤ edist x y\n[PROOFSTEP]\nrw [mem_univ_pi] at hx hy \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : PseudoEMetricSpace α\nx✝ y✝ z : α\ns✝ t : Set α\nπ : β → Type u_3\ninst✝¹ : Fintype β\ninst✝ : (b : β) → PseudoEMetricSpace (π b)\ns : (b : β) → Set (π b)\nc : ℝ≥0∞\nh : ∀ (b : β), c ≤ einfsep (s b)\nx : (i : β) → π i\nhx : ∀ (i : β), x i ∈ s i\ny : (i : β) → π i\nhy : ∀ (i : β), y i ∈ s i\nhxy : x ≠ y\n⊢ c ≤ edist x y\n[PROOFSTEP]\nrcases Function.ne_iff.mp hxy with ⟨i, hi⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : PseudoEMetricSpace α\nx✝ y✝ z : α\ns✝ t : Set α\nπ : β → Type u_3\ninst✝¹ : Fintype β\ninst✝ : (b : β) → PseudoEMetricSpace (π b)\ns : (b : β) → Set (π b)\nc : ℝ≥0∞\nh : ∀ (b : β), c ≤ einfsep (s b)\nx : (i : β) → π i\nhx : ∀ (i : β), x i ∈ s i\ny : (i : β) → π i\nhy : ∀ (i : β), y i ∈ s i\nhxy : x ≠ y\ni : β\nhi : x i ≠ y i\n⊢ c ≤ edist x y\n[PROOFSTEP]\nexact le_trans (le_einfsep_iff.1 (h i) _ (hx _) _ (hy _) hi) (edist_le_pi_edist _ _ i)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\ns : Set α\nhs : einfsep s = ⊤\n⊢ Set.Subsingleton s\n[PROOFSTEP]\nrw [einfsep_top] at hs \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\ns : Set α\nhs : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → edist x y = ⊤\n⊢ Set.Subsingleton s\n[PROOFSTEP]\nexact fun _ hx _ hy => of_not_not fun hxy => edist_ne_top _ _ (hs _ hx _ hy hxy)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\ns : Set α\nhs : Set.Nontrivial s\n⊢ einfsep s ≠ ⊤\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\ns : Set α\nhs : einfsep s = ⊤\n⊢ ¬Set.Nontrivial s\n[PROOFSTEP]\nrw [not_nontrivial_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\ns : Set α\nhs : einfsep s = ⊤\n⊢ Set.Subsingleton s\n[PROOFSTEP]\nexact subsingleton_of_einfsep_eq_top hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\ns : Set α\nhs : Set.Nontrivial s\n⊢ einfsep s < ⊤\n[PROOFSTEP]\nrw [lt_top_iff_ne_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\ns : Set α\nhs : Set.Nontrivial s\n⊢ einfsep s ≠ ⊤\n[PROOFSTEP]\nexact hs.einfsep_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EMetricSpace α\nx y z : α\ns t : Set α\nC : ℝ≥0∞\nsC : Set ℝ≥0∞\ninst✝ : Finite ↑s\n⊢ 0 < einfsep s\n[PROOFSTEP]\ncases nonempty_fintype s\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EMetricSpace α\nx y z : α\ns t : Set α\nC : ℝ≥0∞\nsC : Set ℝ≥0∞\ninst✝ : Finite ↑s\nval✝ : Fintype ↑s\n⊢ 0 < einfsep s\n[PROOFSTEP]\nby_cases hs : s.Nontrivial\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EMetricSpace α\nx y z : α\ns t : Set α\nC : ℝ≥0∞\nsC : Set ℝ≥0∞\ninst✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : Set.Nontrivial s\n⊢ 0 < einfsep s\n[PROOFSTEP]\nrcases hs.einfsep_exists_of_finite with ⟨x, _hx, y, _hy, hxy, hxy'⟩\n[GOAL]\ncase pos.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EMetricSpace α\nx✝ y✝ z : α\ns t : Set α\nC : ℝ≥0∞\nsC : Set ℝ≥0∞\ninst✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : Set.Nontrivial s\nx : α\n_hx : x ∈ s\ny : α\n_hy : y ∈ s\nhxy : x ≠ y\nhxy' : einfsep s = edist x y\n⊢ 0 < einfsep s\n[PROOFSTEP]\nexact hxy'.symm ▸ edist_pos.2 hxy\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EMetricSpace α\nx y z : α\ns t : Set α\nC : ℝ≥0∞\nsC : Set ℝ≥0∞\ninst✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : ¬Set.Nontrivial s\n⊢ 0 < einfsep s\n[PROOFSTEP]\nrw [not_nontrivial_iff] at hs \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EMetricSpace α\nx y z : α\ns t : Set α\nC : ℝ≥0∞\nsC : Set ℝ≥0∞\ninst✝ : Finite ↑s\nval✝ : Fintype ↑s\nhs : Set.Subsingleton s\n⊢ 0 < einfsep s\n[PROOFSTEP]\nexact hs.einfsep.symm ▸ WithTop.zero_lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EMetricSpace α\nx y z : α\ns t : Set α\nC : ℝ≥0∞\nsC : Set ℝ≥0∞\ninst✝ : Finite ↑s\n⊢ ∃ C _hC, ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → C ≤ edist x y\n[PROOFSTEP]\nrw [← einfsep_pos]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : EMetricSpace α\nx y z : α\ns t : Set α\nC : ℝ≥0∞\nsC : Set ℝ≥0∞\ninst✝ : Finite ↑s\n⊢ 0 < einfsep s\n[PROOFSTEP]\nexact einfsep_pos_of_finite\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns : Set α\n⊢ infsep s = 0 ↔ einfsep s = 0 ∨ einfsep s = ⊤\n[PROOFSTEP]\nrw [infsep, ENNReal.toReal_eq_zero_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns : Set α\n⊢ 0 < infsep s ↔ 0 < einfsep s ∧ einfsep s < ⊤\n[PROOFSTEP]\nsimp_rw [infsep, ENNReal.toReal_pos_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns : Set α\nhs : Set.Subsingleton s\n⊢ infsep s = 0\n[PROOFSTEP]\nrw [infsep_zero.mpr]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns : Set α\nhs : Set.Subsingleton s\n⊢ Set.einfsep s = 0 ∨ Set.einfsep s = ⊤\n[PROOFSTEP]\nright\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns : Set α\nhs : Set.Subsingleton s\n⊢ Set.einfsep s = ⊤\n[PROOFSTEP]\nexact hs.einfsep\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns : Set α\nhs : 0 < infsep s\n⊢ Set.Nontrivial s\n[PROOFSTEP]\ncontrapose hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns : Set α\nhs : ¬Set.Nontrivial s\n⊢ ¬0 < infsep s\n[PROOFSTEP]\nrw [not_nontrivial_iff] at hs \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns : Set α\nhs : Set.Subsingleton s\n⊢ ¬0 < infsep s\n[PROOFSTEP]\nexact hs.infsep_zero ▸ lt_irrefl _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns : Set α\nhxy : x ≠ y\n⊢ infsep {x, y} ≤ ENNReal.toReal (edist x y ⊓ edist y x)\n[PROOFSTEP]\nsimp_rw [infsep, einfsep_pair_eq_inf hxy]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : EDist α\nx y : α\ns : Set α\nhxy : x ≠ y\n⊢ ENNReal.toReal (edist x y ⊓ edist y x) ≤ ENNReal.toReal (edist x y ⊓ edist y x)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\nx y : α\ns : Set α\n⊢ infsep {x, y} = ENNReal.toReal (edist x y)\n[PROOFSTEP]\nby_cases hxy : x = y\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\nx y : α\ns : Set α\nhxy : x = y\n⊢ infsep {x, y} = ENNReal.toReal (edist x y)\n[PROOFSTEP]\nrw [hxy]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\nx y : α\ns : Set α\nhxy : x = y\n⊢ infsep {y, y} = ENNReal.toReal (edist y y)\n[PROOFSTEP]\nsimp only [infsep_singleton, pair_eq_singleton, edist_self, ENNReal.zero_toReal]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoEMetricSpace α\nx y : α\ns : Set α\nhxy : ¬x = y\n⊢ infsep {x, y} = ENNReal.toReal (edist x y)\n[PROOFSTEP]\nrw [infsep, einfsep_pair hxy]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx y z : α\ns t : Set α\nd : ℝ\nhs : Set.Nontrivial s\n⊢ d ≤ infsep s ↔ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → d ≤ dist x y\n[PROOFSTEP]\nsimp_rw [infsep, ← ENNReal.ofReal_le_iff_le_toReal hs.einfsep_ne_top, le_einfsep_iff, edist_dist,\n  ENNReal.ofReal_le_ofReal_iff dist_nonneg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx y z : α\ns t : Set α\nd : ℝ\nhs : Set.Nontrivial s\n⊢ infsep s < d ↔ ∃ x x_1 y x_2 _hxy, dist x y < d\n[PROOFSTEP]\nrw [← not_iff_not]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx y z : α\ns t : Set α\nd : ℝ\nhs : Set.Nontrivial s\n⊢ ¬infsep s < d ↔ ¬∃ x x_1 y x_2 _hxy, dist x y < d\n[PROOFSTEP]\npush_neg\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx y z : α\ns t : Set α\nd : ℝ\nhs : Set.Nontrivial s\n⊢ d ≤ infsep s ↔ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≠ y → d ≤ dist x y\n[PROOFSTEP]\nexact hs.le_infsep_iff\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx✝ y✝ z : α\ns t : Set α\nd : ℝ\nx : α\nhx : x ∈ s\ny : α\nhy : y ∈ s\nhxy : x ≠ y\nhd : d ≤ infsep s\n⊢ d ≤ dist x y\n[PROOFSTEP]\nby_cases hs : s.Nontrivial\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx✝ y✝ z : α\ns t : Set α\nd : ℝ\nx : α\nhx : x ∈ s\ny : α\nhy : y ∈ s\nhxy : x ≠ y\nhd : d ≤ infsep s\nhs : Set.Nontrivial s\n⊢ d ≤ dist x y\n[PROOFSTEP]\nexact hs.le_infsep_iff.1 hd x hx y hy hxy\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx✝ y✝ z : α\ns t : Set α\nd : ℝ\nx : α\nhx : x ∈ s\ny : α\nhy : y ∈ s\nhxy : x ≠ y\nhd : d ≤ infsep s\nhs : ¬Set.Nontrivial s\n⊢ d ≤ dist x y\n[PROOFSTEP]\nrw [not_nontrivial_iff] at hs \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx✝ y✝ z : α\ns t : Set α\nd : ℝ\nx : α\nhx : x ∈ s\ny : α\nhy : y ∈ s\nhxy : x ≠ y\nhd : d ≤ infsep s\nhs : Set.Subsingleton s\n⊢ d ≤ dist x y\n[PROOFSTEP]\nrw [hs.infsep_zero] at hd \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx✝ y✝ z : α\ns t : Set α\nd : ℝ\nx : α\nhx : x ∈ s\ny : α\nhy : y ∈ s\nhxy : x ≠ y\nhd : d ≤ 0\nhs : Set.Subsingleton s\n⊢ d ≤ dist x y\n[PROOFSTEP]\nexact le_trans hd dist_nonneg\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx y z : α\ns t : Set α\n⊢ infsep {x, y} = dist x y\n[PROOFSTEP]\nrw [infsep_pair_eq_toReal, edist_dist]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx y z : α\ns t : Set α\n⊢ ENNReal.toReal (ENNReal.ofReal (dist x y)) = dist x y\n[PROOFSTEP]\nexact ENNReal.toReal_ofReal dist_nonneg\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx y z : α\ns t : Set α\nhxy : x ≠ y\nhyz : y ≠ z\nhxz : x ≠ z\n⊢ infsep {x, y, z} = dist x y ⊓ dist x z ⊓ dist y z\n[PROOFSTEP]\nsimp only [infsep, einfsep_triple hxy hyz hxz, ENNReal.toReal_inf, edist_ne_top x y, edist_ne_top x z, edist_ne_top y z,\n  dist_edist, Ne.def, inf_eq_top_iff, and_self_iff, not_false_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\n⊢ infsep s = if Set.Nontrivial s then ⨅ (d : ↑(offDiag s)), uncurry dist ↑d else 0\n[PROOFSTEP]\nsplit_ifs with hs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhs : Set.Nontrivial s\n⊢ infsep s = ⨅ (d : ↑(offDiag s)), uncurry dist ↑d\n[PROOFSTEP]\nhave hb : BddBelow (uncurry dist '' s.offDiag) :=\n  by\n  refine' ⟨0, fun d h => _⟩\n  simp_rw [mem_image, Prod.exists, uncurry_apply_pair] at h \n  rcases h with ⟨_, _, _, rfl⟩\n  exact dist_nonneg\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhs : Set.Nontrivial s\n⊢ BddBelow (uncurry dist '' offDiag s)\n[PROOFSTEP]\nrefine' ⟨0, fun d h => _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhs : Set.Nontrivial s\nd : ℝ\nh : d ∈ uncurry dist '' offDiag s\n⊢ 0 ≤ d\n[PROOFSTEP]\nsimp_rw [mem_image, Prod.exists, uncurry_apply_pair] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhs : Set.Nontrivial s\nd : ℝ\nh : ∃ a b, (a, b) ∈ offDiag s ∧ dist a b = d\n⊢ 0 ≤ d\n[PROOFSTEP]\nrcases h with ⟨_, _, _, rfl⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhs : Set.Nontrivial s\nw✝¹ w✝ : α\nleft✝ : (w✝¹, w✝) ∈ offDiag s\n⊢ 0 ≤ dist w✝¹ w✝\n[PROOFSTEP]\nexact dist_nonneg\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhs : Set.Nontrivial s\nhb : BddBelow (uncurry dist '' offDiag s)\n⊢ infsep s = ⨅ (d : ↑(offDiag s)), uncurry dist ↑d\n[PROOFSTEP]\nrefine' eq_of_forall_le_iff fun _ => _\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhs : Set.Nontrivial s\nhb : BddBelow (uncurry dist '' offDiag s)\nx✝ : ℝ\n⊢ x✝ ≤ infsep s ↔ x✝ ≤ ⨅ (d : ↑(offDiag s)), uncurry dist ↑d\n[PROOFSTEP]\nsimp_rw [hs.le_infsep_iff, le_ciInf_set_iff (offDiag_nonempty.mpr hs) hb, imp_forall_iff, mem_offDiag, Prod.forall,\n  uncurry_apply_pair, and_imp]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhs : ¬Set.Nontrivial s\n⊢ infsep s = 0\n[PROOFSTEP]\nexact (not_nontrivial_iff.mp hs).infsep_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx y z : α\ns t : Set α\nhs : Set.Nontrivial s\n⊢ infsep s = ⨅ (d : ↑(offDiag s)), uncurry dist ↑d\n[PROOFSTEP]\nclassical rw [Set.infsep_eq_iInf, if_pos hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx y z : α\ns t : Set α\nhs : Set.Nontrivial s\n⊢ infsep s = ⨅ (d : ↑(offDiag s)), uncurry dist ↑d\n[PROOFSTEP]\nrw [Set.infsep_eq_iInf, if_pos hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝² : Decidable (Set.Nontrivial s)\ninst✝¹ : DecidableEq α\ninst✝ : Fintype ↑s\nhs : Set.Nontrivial s\n⊢ Finset.Nonempty (toFinset (offDiag s))\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝² : Decidable (Set.Nontrivial s)\ninst✝¹ : DecidableEq α\ninst✝ : Fintype ↑s\n⊢ infsep s =\n    if hs : Set.Nontrivial s then\n      Finset.inf' (toFinset (offDiag s)) (_ : Finset.Nonempty (toFinset (offDiag s))) (uncurry dist)\n    else 0\n[PROOFSTEP]\nsplit_ifs with hs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝² : Decidable (Set.Nontrivial s)\ninst✝¹ : DecidableEq α\ninst✝ : Fintype ↑s\nhs : Set.Nontrivial s\n⊢ infsep s = Finset.inf' (toFinset (offDiag s)) (_ : Finset.Nonempty (toFinset (offDiag s))) (uncurry dist)\n[PROOFSTEP]\nrefine' eq_of_forall_le_iff fun _ => _\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝² : Decidable (Set.Nontrivial s)\ninst✝¹ : DecidableEq α\ninst✝ : Fintype ↑s\nhs : Set.Nontrivial s\nx✝ : ℝ\n⊢ x✝ ≤ infsep s ↔ x✝ ≤ Finset.inf' (toFinset (offDiag s)) (_ : Finset.Nonempty (toFinset (offDiag s))) (uncurry dist)\n[PROOFSTEP]\nsimp_rw [hs.le_infsep_iff, imp_forall_iff, Finset.le_inf'_iff, mem_toFinset, mem_offDiag, Prod.forall,\n  uncurry_apply_pair, and_imp]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝² : Decidable (Set.Nontrivial s)\ninst✝¹ : DecidableEq α\ninst✝ : Fintype ↑s\nhs : ¬Set.Nontrivial s\n⊢ infsep s = 0\n[PROOFSTEP]\nrw [not_nontrivial_iff] at hs \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝² : Decidable (Set.Nontrivial s)\ninst✝¹ : DecidableEq α\ninst✝ : Fintype ↑s\nhs : Set.Subsingleton s\n⊢ infsep s = 0\n[PROOFSTEP]\nexact hs.infsep_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝¹ : DecidableEq α\ninst✝ : Fintype ↑s\nhs : Set.Nontrivial s\n⊢ Finset.Nonempty (toFinset (offDiag s))\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝¹ : DecidableEq α\ninst✝ : Fintype ↑s\nhs : Set.Nontrivial s\n⊢ infsep s = Finset.inf' (toFinset (offDiag s)) (_ : Finset.Nonempty (toFinset (offDiag s))) (uncurry dist)\n[PROOFSTEP]\nclassical rw [Set.infsep_of_fintype, dif_pos hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝¹ : DecidableEq α\ninst✝ : Fintype ↑s\nhs : Set.Nontrivial s\n⊢ infsep s = Finset.inf' (toFinset (offDiag s)) (_ : Finset.Nonempty (toFinset (offDiag s))) (uncurry dist)\n[PROOFSTEP]\nrw [Set.infsep_of_fintype, dif_pos hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhsf : Set.Finite s\nhs : Set.Nontrivial s\n⊢ Finset.Nonempty (Finite.toFinset (_ : Set.Finite (offDiag s)))\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhsf : Set.Finite s\n⊢ Set.infsep s =\n    if hs : Set.Nontrivial s then\n      Finset.inf' (Finite.toFinset (_ : Set.Finite (offDiag s)))\n        (_ : Finset.Nonempty (Finite.toFinset (_ : Set.Finite (offDiag s)))) (uncurry dist)\n    else 0\n[PROOFSTEP]\nsplit_ifs with hs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhsf : Set.Finite s\nhs : Set.Nontrivial s\n⊢ Set.infsep s =\n    Finset.inf' (Finite.toFinset (_ : Set.Finite (offDiag s)))\n      (_ : Finset.Nonempty (Finite.toFinset (_ : Set.Finite (offDiag s)))) (uncurry dist)\n[PROOFSTEP]\nrefine' eq_of_forall_le_iff fun _ => _\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhsf : Set.Finite s\nhs : Set.Nontrivial s\nx✝ : ℝ\n⊢ x✝ ≤ Set.infsep s ↔\n    x✝ ≤\n      Finset.inf' (Finite.toFinset (_ : Set.Finite (offDiag s)))\n        (_ : Finset.Nonempty (Finite.toFinset (_ : Set.Finite (offDiag s)))) (uncurry dist)\n[PROOFSTEP]\nsimp_rw [hs.le_infsep_iff, imp_forall_iff, Finset.le_inf'_iff, Finite.mem_toFinset, mem_offDiag, Prod.forall,\n  uncurry_apply_pair, and_imp]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhsf : Set.Finite s\nhs : ¬Set.Nontrivial s\n⊢ Set.infsep s = 0\n[PROOFSTEP]\nrw [not_nontrivial_iff] at hs \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Decidable (Set.Nontrivial s)\nhsf : Set.Finite s\nhs : Set.Subsingleton s\n⊢ Set.infsep s = 0\n[PROOFSTEP]\nexact hs.infsep_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx y z : α\ns t : Set α\nhsf : Set.Finite s\nhs : Set.Nontrivial s\n⊢ Finset.Nonempty (Finite.toFinset (_ : Set.Finite (offDiag s)))\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx y z : α\ns t : Set α\nhsf : Set.Finite s\nhs : Set.Nontrivial s\n⊢ Set.infsep s =\n    Finset.inf' (Finite.toFinset (_ : Set.Finite (offDiag s)))\n      (_ : Finset.Nonempty (Finite.toFinset (_ : Set.Finite (offDiag s)))) (uncurry dist)\n[PROOFSTEP]\nclassical simp_rw [hsf.infsep, dif_pos hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : PseudoMetricSpace α\nx y z : α\ns t : Set α\nhsf : Set.Finite s\nhs : Set.Nontrivial s\n⊢ Set.infsep s =\n    Finset.inf' (Finite.toFinset (_ : Set.Finite (offDiag s)))\n      (_ : Finset.Nonempty (Finite.toFinset (_ : Set.Finite (offDiag s)))) (uncurry dist)\n[PROOFSTEP]\nsimp_rw [hsf.infsep, dif_pos hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns✝ t : Set α\ninst✝ : DecidableEq α\ns : Finset α\n⊢ infsep ↑s = if hs : Finset.Nonempty (Finset.offDiag s) then Finset.inf' (Finset.offDiag s) hs (uncurry dist) else 0\n[PROOFSTEP]\nhave H : (s : Set α).Nontrivial ↔ s.offDiag.Nonempty := by\n  rw [← Set.offDiag_nonempty, ← Finset.coe_offDiag, Finset.coe_nonempty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns✝ t : Set α\ninst✝ : DecidableEq α\ns : Finset α\n⊢ Set.Nontrivial ↑s ↔ Finset.Nonempty (Finset.offDiag s)\n[PROOFSTEP]\nrw [← Set.offDiag_nonempty, ← Finset.coe_offDiag, Finset.coe_nonempty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns✝ t : Set α\ninst✝ : DecidableEq α\ns : Finset α\nH : Set.Nontrivial ↑s ↔ Finset.Nonempty (Finset.offDiag s)\n⊢ infsep ↑s = if hs : Finset.Nonempty (Finset.offDiag s) then Finset.inf' (Finset.offDiag s) hs (uncurry dist) else 0\n[PROOFSTEP]\nsplit_ifs with hs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns✝ t : Set α\ninst✝ : DecidableEq α\ns : Finset α\nH : Set.Nontrivial ↑s ↔ Finset.Nonempty (Finset.offDiag s)\nhs : Finset.Nonempty (Finset.offDiag s)\n⊢ infsep ↑s = Finset.inf' (Finset.offDiag s) hs (uncurry dist)\n[PROOFSTEP]\nsimp_rw [(H.mpr hs).infsep_of_fintype, ← Finset.coe_offDiag, Finset.toFinset_coe]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns✝ t : Set α\ninst✝ : DecidableEq α\ns : Finset α\nH : Set.Nontrivial ↑s ↔ Finset.Nonempty (Finset.offDiag s)\nhs : ¬Finset.Nonempty (Finset.offDiag s)\n⊢ infsep ↑s = 0\n[PROOFSTEP]\nexact (not_nontrivial_iff.mp (H.mp.mt hs)).infsep_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns✝ t : Set α\ninst✝ : DecidableEq α\ns : Finset α\nhs : Finset.Nonempty (Finset.offDiag s)\n⊢ infsep ↑s = Finset.inf' (Finset.offDiag s) hs (uncurry dist)\n[PROOFSTEP]\nrw [Finset.coe_infsep, dif_pos hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns✝ t : Set α\ninst✝ : DecidableEq α\ns : Finset α\nhs : Finset.offDiag s = ∅\n⊢ infsep ↑s = 0\n[PROOFSTEP]\nrw [← Finset.not_nonempty_iff_eq_empty] at hs \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns✝ t : Set α\ninst✝ : DecidableEq α\ns : Finset α\nhs : ¬Finset.Nonempty (Finset.offDiag s)\n⊢ infsep ↑s = 0\n[PROOFSTEP]\nrw [Finset.coe_infsep, dif_neg hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\n⊢ ∃ x x_1 y x_2 _hxy, infsep s = dist x y\n[PROOFSTEP]\nclassical\ncases nonempty_fintype s\nsimp_rw [hs.infsep_of_fintype]\nrcases@Finset.exists_mem_eq_inf' _ _ _ s.offDiag.toFinset (by simpa) (uncurry dist) with ⟨w, hxy, hed⟩\nsimp_rw [mem_toFinset] at hxy \nexact ⟨w.fst, hxy.1, w.snd, hxy.2.1, hxy.2.2, hed⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\n⊢ ∃ x x_1 y x_2 _hxy, infsep s = dist x y\n[PROOFSTEP]\ncases nonempty_fintype s\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\nval✝ : Fintype ↑s\n⊢ ∃ x x_1 y x_2 _hxy, infsep s = dist x y\n[PROOFSTEP]\nsimp_rw [hs.infsep_of_fintype]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\nval✝ : Fintype ↑s\n⊢ ∃ x h y h h, Finset.inf' (toFinset (offDiag s)) (_ : Finset.Nonempty (toFinset (offDiag s))) (uncurry dist) = dist x y\n[PROOFSTEP]\nrcases@Finset.exists_mem_eq_inf' _ _ _ s.offDiag.toFinset (by simpa) (uncurry dist) with ⟨w, hxy, hed⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\nval✝ : Fintype ↑s\n⊢ Finset.Nonempty (toFinset (offDiag s))\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\nval✝ : Fintype ↑s\nw : α × α\nhxy : w ∈ toFinset (offDiag s)\nhed : Finset.inf' (toFinset (offDiag s)) (_ : Finset.Nonempty (toFinset (offDiag s))) (uncurry dist) = uncurry dist w\n⊢ ∃ x h y h h, Finset.inf' (toFinset (offDiag s)) (_ : Finset.Nonempty (toFinset (offDiag s))) (uncurry dist) = dist x y\n[PROOFSTEP]\nsimp_rw [mem_toFinset] at hxy \n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : PseudoMetricSpace α\nx y z : α\ns t : Set α\ninst✝ : Finite ↑s\nhs : Set.Nontrivial s\nval✝ : Fintype ↑s\nw : α × α\nhed : Finset.inf' (toFinset (offDiag s)) (_ : Finset.Nonempty (toFinset (offDiag s))) (uncurry dist) = uncurry dist w\nhxy : w ∈ offDiag s\n⊢ ∃ x h y h h, Finset.inf' (toFinset (offDiag s)) (_ : Finset.Nonempty (toFinset (offDiag s))) (uncurry dist) = dist x y\n[PROOFSTEP]\nexact ⟨w.fst, hxy.1, w.snd, hxy.2.1, hxy.2.2, hed⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Set α\ninst✝ : Finite ↑s\n⊢ infsep s = 0 ↔ Set.Subsingleton s\n[PROOFSTEP]\nrw [infsep_zero, einfsep_eq_top_iff, or_iff_right_iff_imp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Set α\ninst✝ : Finite ↑s\n⊢ einfsep s = 0 → Set.Subsingleton s\n[PROOFSTEP]\nexact fun H => (einfsep_pos_of_finite.ne' H).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Set α\ninst✝ : Finite ↑s\n⊢ 0 < infsep s ↔ Set.Nontrivial s\n[PROOFSTEP]\nrw [infsep_pos, einfsep_lt_top_iff, and_iff_right_iff_imp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Set α\ninst✝ : Finite ↑s\n⊢ Set.Nontrivial s → 0 < einfsep s\n[PROOFSTEP]\nexact fun _ => einfsep_pos_of_finite\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.Infsep", "llama_tokens": 19536, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.672331699179286, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.36498419359741635}}
{"text": "[GOAL]\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhS : ∀ (ε : G), ε > 0 → ∃ g, g ∈ S ∧ g ∈ Ioo 0 ε\n⊢ Dense ↑S\n[PROOFSTEP]\ncases subsingleton_or_nontrivial G\n[GOAL]\ncase inl\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhS : ∀ (ε : G), ε > 0 → ∃ g, g ∈ S ∧ g ∈ Ioo 0 ε\nh✝ : Subsingleton G\n⊢ Dense ↑S\n[PROOFSTEP]\nrefine fun x => _root_.subset_closure ?_\n[GOAL]\ncase inl\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhS : ∀ (ε : G), ε > 0 → ∃ g, g ∈ S ∧ g ∈ Ioo 0 ε\nh✝ : Subsingleton G\nx : G\n⊢ x ∈ ↑S\n[PROOFSTEP]\nrw [Subsingleton.elim x 0]\n[GOAL]\ncase inl\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhS : ∀ (ε : G), ε > 0 → ∃ g, g ∈ S ∧ g ∈ Ioo 0 ε\nh✝ : Subsingleton G\nx : G\n⊢ 0 ∈ ↑S\n[PROOFSTEP]\nexact zero_mem S\n[GOAL]\ncase inr\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhS : ∀ (ε : G), ε > 0 → ∃ g, g ∈ S ∧ g ∈ Ioo 0 ε\nh✝ : Nontrivial G\n⊢ Dense ↑S\n[PROOFSTEP]\nrefine dense_of_exists_between fun a b hlt => ?_\n[GOAL]\ncase inr\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhS : ∀ (ε : G), ε > 0 → ∃ g, g ∈ S ∧ g ∈ Ioo 0 ε\nh✝ : Nontrivial G\na b : G\nhlt : a < b\n⊢ ∃ c, c ∈ ↑S ∧ a < c ∧ c < b\n[PROOFSTEP]\nrcases hS (b - a) (sub_pos.2 hlt) with ⟨g, hgS, hg0, hg⟩\n[GOAL]\ncase inr.intro.intro.intro\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhS : ∀ (ε : G), ε > 0 → ∃ g, g ∈ S ∧ g ∈ Ioo 0 ε\nh✝ : Nontrivial G\na b : G\nhlt : a < b\ng : G\nhgS : g ∈ S\nhg0 : 0 < g\nhg : g < b - a\n⊢ ∃ c, c ∈ ↑S ∧ a < c ∧ c < b\n[PROOFSTEP]\nrcases(existsUnique_add_zsmul_mem_Ioc hg0 0 a).exists with ⟨m, hm⟩\n[GOAL]\ncase inr.intro.intro.intro.intro\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhS : ∀ (ε : G), ε > 0 → ∃ g, g ∈ S ∧ g ∈ Ioo 0 ε\nh✝ : Nontrivial G\na b : G\nhlt : a < b\ng : G\nhgS : g ∈ S\nhg0 : 0 < g\nhg : g < b - a\nm : ℤ\nhm : 0 + m • g ∈ Ioc a (a + g)\n⊢ ∃ c, c ∈ ↑S ∧ a < c ∧ c < b\n[PROOFSTEP]\nrw [zero_add] at hm \n[GOAL]\ncase inr.intro.intro.intro.intro\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhS : ∀ (ε : G), ε > 0 → ∃ g, g ∈ S ∧ g ∈ Ioo 0 ε\nh✝ : Nontrivial G\na b : G\nhlt : a < b\ng : G\nhgS : g ∈ S\nhg0 : 0 < g\nhg : g < b - a\nm : ℤ\nhm : m • g ∈ Ioc a (a + g)\n⊢ ∃ c, c ∈ ↑S ∧ a < c ∧ c < b\n[PROOFSTEP]\nrefine ⟨m • g, zsmul_mem hgS _, hm.1, hm.2.trans_lt ?_⟩\n[GOAL]\ncase inr.intro.intro.intro.intro\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhS : ∀ (ε : G), ε > 0 → ∃ g, g ∈ S ∧ g ∈ Ioo 0 ε\nh✝ : Nontrivial G\na b : G\nhlt : a < b\ng : G\nhgS : g ∈ S\nhg0 : 0 < g\nhg : g < b - a\nm : ℤ\nhm : m • g ∈ Ioc a (a + g)\n⊢ a + g < b\n[PROOFSTEP]\nrwa [lt_sub_iff_add_lt'] at hg \n[GOAL]\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhbot : S ≠ ⊥\nH : ¬∃ a, IsLeast {g | g ∈ S ∧ 0 < g} a\n⊢ Dense ↑S\n[PROOFSTEP]\nrefine S.dense_of_not_isolated_zero fun ε ε0 => ?_\n[GOAL]\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhbot : S ≠ ⊥\nH : ¬∃ a, IsLeast {g | g ∈ S ∧ 0 < g} a\nε : G\nε0 : ε > 0\n⊢ ∃ g, g ∈ S ∧ g ∈ Ioo 0 ε\n[PROOFSTEP]\ncontrapose! H\n[GOAL]\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nhbot : S ≠ ⊥\nε : G\nε0 : ε > 0\nH : ∀ (g : G), g ∈ S → ¬g ∈ Ioo 0 ε\n⊢ ∃ a, IsLeast {g | g ∈ S ∧ 0 < g} a\n[PROOFSTEP]\nexact exists_isLeast_pos hbot ε0 (disjoint_left.2 H)\n[GOAL]\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\n⊢ Dense ↑S ∨ ∃ a, S = closure {a}\n[PROOFSTEP]\nrefine (em _).imp (dense_of_not_isolated_zero S) fun h => ?_\n[GOAL]\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nh : ¬∀ (ε : G), ε > 0 → ∃ g, g ∈ S ∧ g ∈ Ioo 0 ε\n⊢ ∃ a, S = closure {a}\n[PROOFSTEP]\npush_neg at h \n[GOAL]\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nh : ∃ ε, ε > 0 ∧ ∀ (g : G), g ∈ S → ¬g ∈ Ioo 0 ε\n⊢ ∃ a, S = closure {a}\n[PROOFSTEP]\nrcases h with ⟨ε, ε0, hε⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝³ : LinearOrderedAddCommGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : OrderTopology G\ninst✝ : Archimedean G\nS : AddSubgroup G\nε : G\nε0 : ε > 0\nhε : ∀ (g : G), g ∈ S → ¬g ∈ Ioo 0 ε\n⊢ ∃ a, S = closure {a}\n[PROOFSTEP]\nexact cyclic_of_isolated_zero ε0 (disjoint_left.2 hε)\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Order.Archimedean", "llama_tokens": 2834, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7025300698514777, "lm_q2_score": 0.5195213219520929, "lm_q1q2_score": 0.3649793506003359}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Preorder α\n⊢ UpperSetTopology α\n[PROOFSTEP]\nletI := upperSetTopology' α\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Preorder α\nthis : TopologicalSpace α := upperSetTopology' α\n⊢ UpperSetTopology α\n[PROOFSTEP]\nexact ⟨rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Preorder α\n⊢ LowerSetTopology α\n[PROOFSTEP]\nletI := lowerSetTopology' α\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Preorder α\nthis : TopologicalSpace α := lowerSetTopology' α\n⊢ LowerSetTopology α\n[PROOFSTEP]\nexact ⟨rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : UpperSetTopology α\ns : Set α\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\n⊢ instTopologicalSpaceOrderDual = lowerSetTopology' αᵒᵈ\n[PROOFSTEP]\nrefine topologicalSpace_eq ?_\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : UpperSetTopology α\ns : Set α\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\n⊢ IsOpen = IsOpen\n[PROOFSTEP]\nrw [(UpperSetTopology.topology_eq (α))]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\n⊢ WithUpperSetTopology.instTopologicalSpaceWithUpperSetTopology = induced (↑WithUpperSetTopology.ofUpperSet) inst✝¹\n[PROOFSTEP]\nerw [topology_eq α, induced_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\n⊢ WithUpperSetTopology.instTopologicalSpaceWithUpperSetTopology = upperSetTopology' α\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\n⊢ IsOpen s ↔ IsUpperSet s\n[PROOFSTEP]\nrw [topology_eq α]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\n⊢ IsOpen s ↔ IsUpperSet s\n[PROOFSTEP]\nrfl\n  -- Alexandrov property, set formulation\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\nS : Set (Set α)\nhf : ∀ (s : Set α), s ∈ S → IsOpen s\n⊢ IsOpen (⋂₀ S)\n[PROOFSTEP]\nsimp_rw [IsOpen_iff_IsUpperSet] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\nS : Set (Set α)\nhf : ∀ (s : Set α), s ∈ S → IsUpperSet s\n⊢ IsUpperSet (⋂₀ S)\n[PROOFSTEP]\napply isUpperSet_sInter\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\nS : Set (Set α)\nhf : ∀ (s : Set α), s ∈ S → IsUpperSet s\n⊢ ∀ (s : Set α), s ∈ S → IsUpperSet s\n[PROOFSTEP]\nintros s hs\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns✝ : Set α\nS : Set (Set α)\nhf : ∀ (s : Set α), s ∈ S → IsUpperSet s\ns : Set α\nhs : s ∈ S\n⊢ IsUpperSet s\n[PROOFSTEP]\nexact hf _ hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\nι : Sort u_3\nf : ι → Set α\nhf : ∀ (i : ι), IsOpen (f i)\n⊢ IsOpen (⋂ (i : ι), f i)\n[PROOFSTEP]\nsimp_rw [IsOpen_iff_IsUpperSet] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\nι : Sort u_3\nf : ι → Set α\nhf : ∀ (i : ι), IsUpperSet (f i)\n⊢ IsUpperSet (⋂ (i : ι), f i)\n[PROOFSTEP]\napply isUpperSet_iInter\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\nι : Sort u_3\nf : ι → Set α\nhf : ∀ (i : ι), IsUpperSet (f i)\n⊢ ∀ (i : ι), IsUpperSet (f i)\n[PROOFSTEP]\nintros i\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\nι : Sort u_3\nf : ι → Set α\nhf : ∀ (i : ι), IsUpperSet (f i)\ni : ι\n⊢ IsUpperSet (f i)\n[PROOFSTEP]\nexact hf i\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns✝ s : Set α\n⊢ IsClosed s ↔ IsLowerSet s\n[PROOFSTEP]\nrw [← isOpen_compl_iff, IsOpen_iff_IsUpperSet, isLowerSet_compl.symm, compl_compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns✝ s : Set α\n⊢ closure s = ↑(lowerClosure s)\n[PROOFSTEP]\nrw [subset_antisymm_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns✝ s : Set α\n⊢ closure s ⊆ ↑(lowerClosure s) ∧ ↑(lowerClosure s) ⊆ closure s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns✝ s : Set α\n⊢ closure s ⊆ ↑(lowerClosure s)\n[PROOFSTEP]\napply closure_minimal subset_lowerClosure _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns✝ s : Set α\n⊢ IsClosed ↑(lowerClosure s)\n[PROOFSTEP]\nrw [isClosed_iff_isLower]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns✝ s : Set α\n⊢ IsLowerSet ↑(lowerClosure s)\n[PROOFSTEP]\nexact LowerSet.lower (lowerClosure s)\n[GOAL]\ncase right\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns✝ s : Set α\n⊢ ↑(lowerClosure s) ⊆ closure s\n[PROOFSTEP]\napply lowerClosure_min subset_closure (isClosed_isLower isClosed_closure)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\na : α\n⊢ closure {a} = Iic a\n[PROOFSTEP]\nrw [closure_eq_lowerClosure, lowerClosure_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : UpperSetTopology α\ns : Set α\na : α\n⊢ ↑(LowerSet.Iic a) = Iic a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperSetTopology β\nf : α → β\n⊢ Monotone f ↔ Continuous f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperSetTopology β\nf : α → β\n⊢ Monotone f → Continuous f\n[PROOFSTEP]\nintro hf\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperSetTopology β\nf : α → β\nhf : Monotone f\n⊢ Continuous f\n[PROOFSTEP]\nsimp_rw [continuous_def, IsOpen_iff_IsUpperSet]\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperSetTopology β\nf : α → β\nhf : Monotone f\n⊢ ∀ (s : Set β), IsUpperSet s → IsUpperSet (f ⁻¹' s)\n[PROOFSTEP]\nexact fun _ hs ↦ IsUpperSet.preimage hs hf\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperSetTopology β\nf : α → β\n⊢ Continuous f → Monotone f\n[PROOFSTEP]\nintro hf a b hab\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperSetTopology β\nf : α → β\nhf : Continuous f\na b : α\nhab : a ≤ b\n⊢ f a ≤ f b\n[PROOFSTEP]\nrw [← mem_Iic, ← closure_singleton] at hab ⊢\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperSetTopology β\nf : α → β\nhf : Continuous f\na b : α\nhab✝ : a ∈ Iic b\nhab : a ∈ closure {b}\n⊢ f a ∈ closure {f b}\n[PROOFSTEP]\napply (Continuous.closure_preimage_subset hf {f b})\n[GOAL]\ncase mpr.a\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperSetTopology β\nf : α → β\nhf : Continuous f\na b : α\nhab✝ : a ∈ Iic b\nhab : a ∈ closure {b}\n⊢ a ∈ closure (f ⁻¹' {f b})\n[PROOFSTEP]\napply mem_of_mem_of_subset hab\n[GOAL]\ncase mpr.a\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperSetTopology β\nf : α → β\nhf : Continuous f\na b : α\nhab✝ : a ∈ Iic b\nhab : a ∈ closure {b}\n⊢ closure {b} ⊆ closure (f ⁻¹' {f b})\n[PROOFSTEP]\napply closure_mono\n[GOAL]\ncase mpr.a.h\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperSetTopology β\nf : α → β\nhf : Continuous f\na b : α\nhab✝ : a ∈ Iic b\nhab : a ∈ closure {b}\n⊢ {b} ⊆ f ⁻¹' {f b}\n[PROOFSTEP]\nrw [singleton_subset_iff, mem_preimage, mem_singleton_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperTopology β\nf : α → β\nhf : Monotone f\n⊢ Continuous f\n[PROOFSTEP]\nrw [continuous_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperTopology β\nf : α → β\nhf : Monotone f\n⊢ ∀ (s : Set β), IsOpen s → IsOpen (f ⁻¹' s)\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperTopology β\nf : α → β\nhf : Monotone f\ns : Set β\nhs : IsOpen s\n⊢ IsOpen (f ⁻¹' s)\n[PROOFSTEP]\nrw [IsOpen_iff_IsUpperSet]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperTopology β\nf : α → β\nhf : Monotone f\ns : Set β\nhs : IsOpen s\n⊢ IsUpperSet (f ⁻¹' s)\n[PROOFSTEP]\napply IsUpperSet.preimage _ hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : UpperSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : UpperTopology β\nf : α → β\nhf : Monotone f\ns : Set β\nhs : IsOpen s\n⊢ IsUpperSet s\n[PROOFSTEP]\napply UpperTopology.isUpperSet_of_isOpen hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Preorder α\ninst✝² : Preorder β\nt₁ : TopologicalSpace α\ninst✝¹ : UpperSetTopology α\nt₂ : TopologicalSpace α\ninst✝ : UpperTopology α\ns : Set α\nhs : IsOpen s\n⊢ IsOpen s\n[PROOFSTEP]\nrw [@IsOpen_iff_IsUpperSet α _ t₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Preorder α\ninst✝² : Preorder β\nt₁ : TopologicalSpace α\ninst✝¹ : UpperSetTopology α\nt₂ : TopologicalSpace α\ninst✝ : UpperTopology α\ns : Set α\nhs : IsOpen s\n⊢ IsUpperSet s\n[PROOFSTEP]\nexact UpperTopology.isUpperSet_of_isOpen hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : LowerSetTopology α\ns : Set α\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : LowerSetTopology α\n⊢ instTopologicalSpaceOrderDual = upperSetTopology' αᵒᵈ\n[PROOFSTEP]\nrefine topologicalSpace_eq ?_\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : LowerSetTopology α\ns : Set α\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : LowerSetTopology α\n⊢ IsOpen = IsOpen\n[PROOFSTEP]\nrw [(LowerSetTopology.topology_eq (α))]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : LowerSetTopology α\ns : Set α\n⊢ WithLowerSetTopology.instTopologicalSpaceWithLowerSetTopology = induced (↑WithLowerSetTopology.ofLowerSet) inst✝¹\n[PROOFSTEP]\nerw [topology_eq α, induced_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : LowerSetTopology α\ns : Set α\n⊢ WithLowerSetTopology.instTopologicalSpaceWithLowerSetTopology = lowerSetTopology' α\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : LowerSetTopology α\ns : Set α\n⊢ IsOpen s ↔ IsLowerSet s\n[PROOFSTEP]\nrw [topology_eq α]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : LowerSetTopology α\ns : Set α\n⊢ IsOpen s ↔ IsLowerSet s\n[PROOFSTEP]\nrfl\n  -- Alexandrov property, set formulation\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : LowerSetTopology α\ns✝ s : Set α\n⊢ IsClosed s ↔ IsUpperSet s\n[PROOFSTEP]\nrw [← isOpen_compl_iff, IsOpen_iff_IsLowerSet, isUpperSet_compl.symm, compl_compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : LowerSetTopology α\ns : Set α\na : α\n⊢ closure {a} = Ici a\n[PROOFSTEP]\nrw [closure_eq_upperClosure, upperClosure_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : TopologicalSpace α\ninst✝ : LowerSetTopology α\ns : Set α\na : α\n⊢ ↑(UpperSet.Ici a) = Ici a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : LowerSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : LowerSetTopology β\nf : α → β\n⊢ Monotone f ↔ Continuous f\n[PROOFSTEP]\nrw [← monotone_dual_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : LowerSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : LowerSetTopology β\nf : α → β\n⊢ Monotone (↑toDual ∘ f ∘ ↑ofDual) ↔ Continuous f\n[PROOFSTEP]\nexact UpperSetTopology.monotone_iff_continuous (α := αᵒᵈ) (β := βᵒᵈ) (f := (toDual ∘ f ∘ ofDual : αᵒᵈ → βᵒᵈ))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : LowerSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : LowerTopology β\nf : α → β\nhf : Monotone f\n⊢ Continuous f\n[PROOFSTEP]\napply\n  UpperSetTopology.Monotone_to_UpperTopology_Continuous (α := αᵒᵈ) (β := βᵒᵈ) (f := (toDual ∘ f ∘ ofDual : αᵒᵈ → βᵒᵈ))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : Preorder α\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace α\ninst✝² : LowerSetTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : LowerTopology β\nf : α → β\nhf : Monotone f\n⊢ Monotone (↑toDual ∘ f ∘ ↑ofDual)\n[PROOFSTEP]\nexact Monotone.dual hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Preorder α\ninst✝² : Preorder β\nt₁ : TopologicalSpace α\ninst✝¹ : LowerSetTopology α\nt₂ : TopologicalSpace α\ninst✝ : LowerTopology α\ns : Set α\nhs : IsOpen s\n⊢ IsOpen s\n[PROOFSTEP]\nrw [@IsOpen_iff_IsLowerSet α _ t₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Preorder α\ninst✝² : Preorder β\nt₁ : TopologicalSpace α\ninst✝¹ : LowerSetTopology α\nt₂ : TopologicalSpace α\ninst✝ : LowerTopology α\ns : Set α\nhs : IsOpen s\n⊢ IsLowerSet s\n[PROOFSTEP]\nexact LowerTopology.isLowerSet_of_isOpen hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : TopologicalSpace α\n⊢ UpperSetTopology αᵒᵈ ↔ LowerSetTopology α\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : TopologicalSpace α\n⊢ UpperSetTopology αᵒᵈ → LowerSetTopology α\n[PROOFSTEP]\napply UpperSetTopology.instLowerSetTopologyDual\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : TopologicalSpace α\n⊢ LowerSetTopology α → UpperSetTopology αᵒᵈ\n[PROOFSTEP]\napply LowerSetTopology.instUpperSetTopologyDual\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : TopologicalSpace α\n⊢ LowerSetTopology αᵒᵈ ↔ UpperSetTopology α\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : TopologicalSpace α\n⊢ LowerSetTopology αᵒᵈ → UpperSetTopology α\n[PROOFSTEP]\napply LowerSetTopology.instUpperSetTopologyDual\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : TopologicalSpace α\n⊢ UpperSetTopology α → LowerSetTopology αᵒᵈ\n[PROOFSTEP]\napply UpperSetTopology.instLowerSetTopologyDual\n", "meta": {"mathlib_filename": "Mathlib.Topology.Order.UpperLowerSetTopology", "llama_tokens": 7405, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6039318194686359, "lm_q2_score": 0.6039318337259584, "lm_q1q2_score": 0.36473365117714773}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\ninst✝ : DiscreteTopology α\n⊢ ∀ (a : α), IsCountablyGenerated (nhds a)\n[PROOFSTEP]\nrw [nhds_discrete]\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\ninst✝ : DiscreteTopology α\n⊢ ∀ (a : α), IsCountablyGenerated (pure a)\n[PROOFSTEP]\nexact isCountablyGenerated_pure\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nhd : DiscreteTopology α\ninst✝ : Encodable α\ni : α\n⊢ instTopologicalSpaceSubtype = generateFrom {univ}\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\n⊢ ⊥ = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a}\n[PROOFSTEP]\nrefine' (eq_bot_of_singletons_open fun a => _).symm\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\na : α\n⊢ IsOpen {a}\n[PROOFSTEP]\nhave h_singleton_eq_inter : { a } = Iio (succ a) ∩ Ioi (pred a) :=\n  by\n  suffices h_singleton_eq_inter' : { a } = Iic a ∩ Ici a\n  · rw [h_singleton_eq_inter', ← Ioi_pred, ← Iio_succ]\n  rw [inter_comm, Ici_inter_Iic, Icc_self a]\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\na : α\n⊢ {a} = Iio (succ a) ∩ Ioi (pred a)\n[PROOFSTEP]\nsuffices h_singleton_eq_inter' : { a } = Iic a ∩ Ici a\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\na : α\nh_singleton_eq_inter' : {a} = Iic a ∩ Ici a\n⊢ {a} = Iio (succ a) ∩ Ioi (pred a)\n[PROOFSTEP]\nrw [h_singleton_eq_inter', ← Ioi_pred, ← Iio_succ]\n[GOAL]\ncase h_singleton_eq_inter'\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\na : α\n⊢ {a} = Iic a ∩ Ici a\n[PROOFSTEP]\nrw [inter_comm, Ici_inter_Iic, Icc_self a]\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a)\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [h_singleton_eq_inter]\n  -- Porting note: Specified instance for `IsOpen.inter` explicitly to fix an error.\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a)\n⊢ IsOpen (Iio (succ a) ∩ Ioi (pred a))\n[PROOFSTEP]\napply @IsOpen.inter _ _ _ (generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a})\n[GOAL]\ncase h₁\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a)\n⊢ IsOpen (Iio (succ a))\n[PROOFSTEP]\nexact isOpen_generateFrom_of_mem ⟨succ a, Or.inr rfl⟩\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a)\n⊢ IsOpen (Ioi (pred a))\n[PROOFSTEP]\nexact isOpen_generateFrom_of_mem ⟨pred a, Or.inl rfl⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\n⊢ DiscreteTopology α ↔ OrderTopology α\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨_⟩, fun h => ⟨_⟩⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\nh : DiscreteTopology α\n⊢ inst✝⁵ = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a}\n[PROOFSTEP]\nrw [h.eq_bot]\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\nh : DiscreteTopology α\n⊢ ⊥ = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a}\n[PROOFSTEP]\nexact bot_topologicalSpace_eq_generateFrom_of_pred_succOrder\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\nh : OrderTopology α\n⊢ inst✝⁵ = ⊥\n[PROOFSTEP]\nrw [h.topology_eq_generate_intervals]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : PartialOrder α\ninst✝³ : PredOrder α\ninst✝² : SuccOrder α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\nh : OrderTopology α\n⊢ generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a} = ⊥\n[PROOFSTEP]\nexact bot_topologicalSpace_eq_generateFrom_of_pred_succOrder.symm\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\n⊢ ⊥ = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a}\n[PROOFSTEP]\nrefine' (eq_bot_of_singletons_open fun a => _).symm\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\n⊢ IsOpen {a}\n[PROOFSTEP]\nhave h_singleton_eq_inter : { a } = Iic a ∩ Ici a := by rw [inter_comm, Ici_inter_Iic, Icc_self a]\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\n⊢ {a} = Iic a ∩ Ici a\n[PROOFSTEP]\nrw [inter_comm, Ici_inter_Iic, Icc_self a]\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iic a ∩ Ici a\n⊢ IsOpen {a}\n[PROOFSTEP]\nby_cases ha_top : IsTop a\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iic a ∩ Ici a\nha_top : IsTop a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [ha_top.Iic_eq, inter_comm, inter_univ] at h_singleton_eq_inter \n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Ici a\nha_top : IsTop a\n⊢ IsOpen {a}\n[PROOFSTEP]\nby_cases ha_bot : IsBot a\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Ici a\nha_top : IsTop a\nha_bot : IsBot a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [ha_bot.Ici_eq] at h_singleton_eq_inter \n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = univ\nha_top : IsTop a\nha_bot : IsBot a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [h_singleton_eq_inter]\n  -- Porting note: Specified instance for `isOpen_univ` explicitly to fix an error.\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = univ\nha_top : IsTop a\nha_bot : IsBot a\n⊢ IsOpen univ\n[PROOFSTEP]\napply @isOpen_univ _ (generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a})\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Ici a\nha_top : IsTop a\nha_bot : ¬IsBot a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [isBot_iff_isMin] at ha_bot \n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Ici a\nha_top : IsTop a\nha_bot : ¬IsMin a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [← Ioi_pred_of_not_isMin ha_bot] at h_singleton_eq_inter \n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Ioi (pred a)\nha_top : IsTop a\nha_bot : ¬IsMin a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [h_singleton_eq_inter]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Ioi (pred a)\nha_top : IsTop a\nha_bot : ¬IsMin a\n⊢ IsOpen (Ioi (pred a))\n[PROOFSTEP]\nexact isOpen_generateFrom_of_mem ⟨pred a, Or.inl rfl⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iic a ∩ Ici a\nha_top : ¬IsTop a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [isTop_iff_isMax] at ha_top \n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iic a ∩ Ici a\nha_top : ¬IsMax a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [← Iio_succ_of_not_isMax ha_top] at h_singleton_eq_inter \n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a) ∩ Ici a\nha_top : ¬IsMax a\n⊢ IsOpen {a}\n[PROOFSTEP]\nby_cases ha_bot : IsBot a\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a) ∩ Ici a\nha_top : ¬IsMax a\nha_bot : IsBot a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [ha_bot.Ici_eq, inter_univ] at h_singleton_eq_inter \n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a)\nha_top : ¬IsMax a\nha_bot : IsBot a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [h_singleton_eq_inter]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a)\nha_top : ¬IsMax a\nha_bot : IsBot a\n⊢ IsOpen (Iio (succ a))\n[PROOFSTEP]\nexact isOpen_generateFrom_of_mem ⟨succ a, Or.inr rfl⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a) ∩ Ici a\nha_top : ¬IsMax a\nha_bot : ¬IsBot a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [isBot_iff_isMin] at ha_bot \n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a) ∩ Ici a\nha_top : ¬IsMax a\nha_bot : ¬IsMin a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [← Ioi_pred_of_not_isMin ha_bot] at h_singleton_eq_inter \n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a)\nha_top : ¬IsMax a\nha_bot : ¬IsMin a\n⊢ IsOpen {a}\n[PROOFSTEP]\nrw [h_singleton_eq_inter]\n  -- Porting note: Specified instance for `IsOpen.inter` explicitly to fix an error.\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a)\nha_top : ¬IsMax a\nha_bot : ¬IsMin a\n⊢ IsOpen (Iio (succ a) ∩ Ioi (pred a))\n[PROOFSTEP]\napply @IsOpen.inter _ _ _ (generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a})\n[GOAL]\ncase neg.h₁\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a)\nha_top : ¬IsMax a\nha_bot : ¬IsMin a\n⊢ IsOpen (Iio (succ a))\n[PROOFSTEP]\nexact isOpen_generateFrom_of_mem ⟨succ a, Or.inr rfl⟩\n[GOAL]\ncase neg.h₂\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\na : α\nh_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a)\nha_top : ¬IsMax a\nha_bot : ¬IsMin a\n⊢ IsOpen (Ioi (pred a))\n[PROOFSTEP]\nexact isOpen_generateFrom_of_mem ⟨pred a, Or.inl rfl⟩\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\n⊢ DiscreteTopology α ↔ OrderTopology α\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨_⟩, fun h => ⟨_⟩⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\nh : DiscreteTopology α\n⊢ inst✝³ = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a}\n[PROOFSTEP]\nrw [h.eq_bot]\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\nh : DiscreteTopology α\n⊢ ⊥ = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a}\n[PROOFSTEP]\nexact LinearOrder.bot_topologicalSpace_eq_generateFrom\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\nh : OrderTopology α\n⊢ inst✝³ = ⊥\n[PROOFSTEP]\nrw [h.topology_eq_generate_intervals]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝³ : TopologicalSpace α\ninst✝² : LinearOrder α\ninst✝¹ : PredOrder α\ninst✝ : SuccOrder α\nh : OrderTopology α\n⊢ generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a} = ⊥\n[PROOFSTEP]\nexact LinearOrder.bot_topologicalSpace_eq_generateFrom.symm\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\ninst✝ : DiscreteTopology α\n⊢ MetrizableSpace α\n[PROOFSTEP]\nobtain rfl := DiscreteTopology.eq_bot (α := α)\n[GOAL]\nα : Type u_1\ninst✝ : DiscreteTopology α\n⊢ MetrizableSpace α\n[PROOFSTEP]\nexact @UniformSpace.metrizableSpace α ⊥ (isCountablyGenerated_principal _) _\n", "meta": {"mathlib_filename": "Mathlib.Topology.Instances.Discrete", "llama_tokens": 6300, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6150878555160665, "lm_q2_score": 0.5926665999540698, "lm_q1q2_score": 0.36454202800174723}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : OrderBot α\nn : α\nφ : α → α\nhφ : StrictMonoOn φ (Iic n)\n⊢ ∀ (m : α), m ≤ n → m ≤ φ m\n[PROOFSTEP]\nrevert hφ\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : OrderBot α\nn : α\nφ : α → α\n⊢ StrictMonoOn φ (Iic n) → ∀ (m : α), m ≤ n → m ≤ φ m\n[PROOFSTEP]\nrefine' Succ.rec_bot (fun n => StrictMonoOn φ (Set.Iic n) → ∀ m ≤ n, m ≤ φ m) (fun _ _ hm => hm.trans bot_le) _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : OrderBot α\nn : α\nφ : α → α\n⊢ ∀ (a : α),\n    (fun n => StrictMonoOn φ (Iic n) → ∀ (m : α), m ≤ n → m ≤ φ m) a →\n      (fun n => StrictMonoOn φ (Iic n) → ∀ (m : α), m ≤ n → m ≤ φ m) (succ a)\n[PROOFSTEP]\nrintro k ih hφ m hm\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : OrderBot α\nn : α\nφ : α → α\nk : α\nih : StrictMonoOn φ (Iic k) → ∀ (m : α), m ≤ k → m ≤ φ m\nhφ : StrictMonoOn φ (Iic (succ k))\nm : α\nhm : m ≤ succ k\n⊢ m ≤ φ m\n[PROOFSTEP]\nby_cases hk : IsMax k\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : OrderBot α\nn : α\nφ : α → α\nk : α\nih : StrictMonoOn φ (Iic k) → ∀ (m : α), m ≤ k → m ≤ φ m\nhφ : StrictMonoOn φ (Iic (succ k))\nm : α\nhm : m ≤ succ k\nhk : IsMax k\n⊢ m ≤ φ m\n[PROOFSTEP]\nrw [succ_eq_iff_isMax.2 hk] at hm \n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : OrderBot α\nn : α\nφ : α → α\nk : α\nih : StrictMonoOn φ (Iic k) → ∀ (m : α), m ≤ k → m ≤ φ m\nhφ : StrictMonoOn φ (Iic (succ k))\nm : α\nhm : m ≤ k\nhk : IsMax k\n⊢ m ≤ φ m\n[PROOFSTEP]\nexact ih (hφ.mono <| Iic_subset_Iic.2 (le_succ _)) _ hm\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : OrderBot α\nn : α\nφ : α → α\nk : α\nih : StrictMonoOn φ (Iic k) → ∀ (m : α), m ≤ k → m ≤ φ m\nhφ : StrictMonoOn φ (Iic (succ k))\nm : α\nhm : m ≤ succ k\nhk : ¬IsMax k\n⊢ m ≤ φ m\n[PROOFSTEP]\nobtain rfl | h := le_succ_iff_eq_or_le.1 hm\n[GOAL]\ncase neg.inl\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : OrderBot α\nn : α\nφ : α → α\nk : α\nih : StrictMonoOn φ (Iic k) → ∀ (m : α), m ≤ k → m ≤ φ m\nhφ : StrictMonoOn φ (Iic (succ k))\nhk : ¬IsMax k\nhm : succ k ≤ succ k\n⊢ succ k ≤ φ (succ k)\n[PROOFSTEP]\nspecialize ih (StrictMonoOn.mono hφ fun x hx => le_trans hx (le_succ _)) k le_rfl\n[GOAL]\ncase neg.inl\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : OrderBot α\nn : α\nφ : α → α\nk : α\nhφ : StrictMonoOn φ (Iic (succ k))\nhk : ¬IsMax k\nhm : succ k ≤ succ k\nih : k ≤ φ k\n⊢ succ k ≤ φ (succ k)\n[PROOFSTEP]\nrefine' le_trans (succ_mono ih) (succ_le_of_lt (hφ (le_succ _) le_rfl _))\n[GOAL]\ncase neg.inl\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : OrderBot α\nn : α\nφ : α → α\nk : α\nhφ : StrictMonoOn φ (Iic (succ k))\nhk : ¬IsMax k\nhm : succ k ≤ succ k\nih : k ≤ φ k\n⊢ k < succ k\n[PROOFSTEP]\nrw [lt_succ_iff_eq_or_lt_of_not_isMax hk]\n[GOAL]\ncase neg.inl\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : OrderBot α\nn : α\nφ : α → α\nk : α\nhφ : StrictMonoOn φ (Iic (succ k))\nhk : ¬IsMax k\nhm : succ k ≤ succ k\nih : k ≤ φ k\n⊢ k = k ∨ k < k\n[PROOFSTEP]\nexact Or.inl rfl\n[GOAL]\ncase neg.inr\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : OrderBot α\nn : α\nφ : α → α\nk : α\nih : StrictMonoOn φ (Iic k) → ∀ (m : α), m ≤ k → m ≤ φ m\nhφ : StrictMonoOn φ (Iic (succ k))\nm : α\nhm : m ≤ succ k\nhk : ¬IsMax k\nh : m ≤ k\n⊢ m ≤ φ m\n[PROOFSTEP]\nexact ih (StrictMonoOn.mono hφ fun x hx => le_trans hx (le_succ _)) _ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\n⊢ StrictMonoOn ψ (Iic n)\n[PROOFSTEP]\nintro x hx y hy hxy\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ∈ Iic n\ny : α\nhy : y ∈ Iic n\nhxy : x < y\n⊢ ψ x < ψ y\n[PROOFSTEP]\nobtain ⟨i, rfl⟩ := hxy.le.exists_succ_iterate\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ∈ Iic n\ni : ℕ\nhy : succ^[i] x ∈ Iic n\nhxy : x < succ^[i] x\n⊢ ψ x < ψ (succ^[i] x)\n[PROOFSTEP]\ninduction' i with k ih\n[GOAL]\ncase intro.zero\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ∈ Iic n\ni : ℕ\nhy✝ : succ^[i] x ∈ Iic n\nhxy✝ : x < succ^[i] x\nhy : succ^[Nat.zero] x ∈ Iic n\nhxy : x < succ^[Nat.zero] x\n⊢ ψ x < ψ (succ^[Nat.zero] x)\n[PROOFSTEP]\nsimp at hxy \n[GOAL]\ncase intro.succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ∈ Iic n\ni : ℕ\nhy✝ : succ^[i] x ∈ Iic n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ^[k] x ∈ Iic n → x < succ^[k] x → ψ x < ψ (succ^[k] x)\nhy : succ^[Nat.succ k] x ∈ Iic n\nhxy : x < succ^[Nat.succ k] x\n⊢ ψ x < ψ (succ^[Nat.succ k] x)\n[PROOFSTEP]\ncases' k with k\n[GOAL]\ncase intro.succ.zero\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ∈ Iic n\ni : ℕ\nhy✝ : succ^[i] x ∈ Iic n\nhxy✝ : x < succ^[i] x\nih : succ^[Nat.zero] x ∈ Iic n → x < succ^[Nat.zero] x → ψ x < ψ (succ^[Nat.zero] x)\nhy : succ^[Nat.succ Nat.zero] x ∈ Iic n\nhxy : x < succ^[Nat.succ Nat.zero] x\n⊢ ψ x < ψ (succ^[Nat.succ Nat.zero] x)\n[PROOFSTEP]\nexact hψ _ (lt_of_lt_of_le hxy hy)\n[GOAL]\ncase intro.succ.succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ∈ Iic n\ni : ℕ\nhy✝ : succ^[i] x ∈ Iic n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ^[Nat.succ k] x ∈ Iic n → x < succ^[Nat.succ k] x → ψ x < ψ (succ^[Nat.succ k] x)\nhy : succ^[Nat.succ (Nat.succ k)] x ∈ Iic n\nhxy : x < succ^[Nat.succ (Nat.succ k)] x\n⊢ ψ x < ψ (succ^[Nat.succ (Nat.succ k)] x)\n[PROOFSTEP]\nrw [Set.mem_Iic] at *\n[GOAL]\ncase intro.succ.succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ≤ n\ni : ℕ\nhy✝ : succ^[i] x ≤ n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ^[Nat.succ k] x ≤ n → x < succ^[Nat.succ k] x → ψ x < ψ (succ^[Nat.succ k] x)\nhy : succ^[Nat.succ (Nat.succ k)] x ≤ n\nhxy : x < succ^[Nat.succ (Nat.succ k)] x\n⊢ ψ x < ψ (succ^[Nat.succ (Nat.succ k)] x)\n[PROOFSTEP]\nsimp only [Function.iterate_succ', Function.comp_apply] at ih hxy hy ⊢\n[GOAL]\ncase intro.succ.succ\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ≤ n\ni : ℕ\nhy✝ : succ^[i] x ≤ n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))\nhxy : x < succ (succ (succ^[k] x))\nhy : succ (succ (succ^[k] x)) ≤ n\n⊢ ψ x < ψ (succ (succ (succ^[k] x)))\n[PROOFSTEP]\nby_cases hmax : IsMax (succ^[k] x)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ≤ n\ni : ℕ\nhy✝ : succ^[i] x ≤ n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))\nhxy : x < succ (succ (succ^[k] x))\nhy : succ (succ (succ^[k] x)) ≤ n\nhmax : IsMax (succ^[k] x)\n⊢ ψ x < ψ (succ (succ (succ^[k] x)))\n[PROOFSTEP]\nrw [succ_eq_iff_isMax.2 hmax] at hxy ⊢\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ≤ n\ni : ℕ\nhy✝ : succ^[i] x ≤ n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))\nhxy : x < succ (succ^[k] x)\nhy : succ (succ (succ^[k] x)) ≤ n\nhmax : IsMax (succ^[k] x)\n⊢ ψ x < ψ (succ (succ^[k] x))\n[PROOFSTEP]\nexact ih (le_trans (le_succ _) hy) hxy\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ≤ n\ni : ℕ\nhy✝ : succ^[i] x ≤ n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))\nhxy : x < succ (succ (succ^[k] x))\nhy : succ (succ (succ^[k] x)) ≤ n\nhmax : ¬IsMax (succ^[k] x)\n⊢ ψ x < ψ (succ (succ (succ^[k] x)))\n[PROOFSTEP]\nby_cases hmax' : IsMax (succ (succ^[k] x))\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ≤ n\ni : ℕ\nhy✝ : succ^[i] x ≤ n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))\nhxy : x < succ (succ (succ^[k] x))\nhy : succ (succ (succ^[k] x)) ≤ n\nhmax : ¬IsMax (succ^[k] x)\nhmax' : IsMax (succ (succ^[k] x))\n⊢ ψ x < ψ (succ (succ (succ^[k] x)))\n[PROOFSTEP]\nrw [succ_eq_iff_isMax.2 hmax'] at hxy ⊢\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ≤ n\ni : ℕ\nhy✝ : succ^[i] x ≤ n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))\nhxy : x < succ (succ^[k] x)\nhy : succ (succ (succ^[k] x)) ≤ n\nhmax : ¬IsMax (succ^[k] x)\nhmax' : IsMax (succ (succ^[k] x))\n⊢ ψ x < ψ (succ (succ^[k] x))\n[PROOFSTEP]\nexact ih (le_trans (le_succ _) hy) hxy\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ≤ n\ni : ℕ\nhy✝ : succ^[i] x ≤ n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))\nhxy : x < succ (succ (succ^[k] x))\nhy : succ (succ (succ^[k] x)) ≤ n\nhmax : ¬IsMax (succ^[k] x)\nhmax' : ¬IsMax (succ (succ^[k] x))\n⊢ ψ x < ψ (succ (succ (succ^[k] x)))\n[PROOFSTEP]\nrefine' lt_trans (ih (le_trans (le_succ _) hy) (lt_of_le_of_lt (le_succ_iterate k _) (lt_succ_iff_not_isMax.2 hmax))) _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ≤ n\ni : ℕ\nhy✝ : succ^[i] x ≤ n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))\nhxy : x < succ (succ (succ^[k] x))\nhy : succ (succ (succ^[k] x)) ≤ n\nhmax : ¬IsMax (succ^[k] x)\nhmax' : ¬IsMax (succ (succ^[k] x))\n⊢ ψ (succ (succ^[k] x)) < ψ (succ (succ (succ^[k] x)))\n[PROOFSTEP]\nrw [← Function.comp_apply (f := succ), ← Function.iterate_succ']\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ≤ n\ni : ℕ\nhy✝ : succ^[i] x ≤ n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))\nhxy : x < succ (succ (succ^[k] x))\nhy : succ (succ (succ^[k] x)) ≤ n\nhmax : ¬IsMax (succ^[k] x)\nhmax' : ¬IsMax (succ (succ^[k] x))\n⊢ ψ (succ^[Nat.succ k] x) < ψ (succ (succ^[Nat.succ k] x))\n[PROOFSTEP]\nrefine' hψ _ (lt_of_lt_of_le _ hy)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : Preorder β\nψ : α → β\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nn : α\nhψ : ∀ (m : α), m < n → ψ m < ψ (succ m)\nx : α\nhx : x ≤ n\ni : ℕ\nhy✝ : succ^[i] x ≤ n\nhxy✝ : x < succ^[i] x\nk : ℕ\nih : succ (succ^[k] x) ≤ n → x < succ (succ^[k] x) → ψ x < ψ (succ (succ^[k] x))\nhxy : x < succ (succ (succ^[k] x))\nhy : succ (succ (succ^[k] x)) ≤ n\nhmax : ¬IsMax (succ^[k] x)\nhmax' : ¬IsMax (succ (succ^[k] x))\n⊢ succ^[Nat.succ k] x < succ (succ (succ^[k] x))\n[PROOFSTEP]\nrwa [Function.iterate_succ', Function.comp_apply, lt_succ_iff_not_isMax]\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Intervals.Monotone", "llama_tokens": 7412, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6150878555160665, "lm_q2_score": 0.5926665999540697, "lm_q1q2_score": 0.3645420280017472}}
{"text": "[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\np : ℕ\nh✝ : CharP R p\nh : ∀ (x : ℕ), ↑x = 0 ↔ p ∣ x\nn : ℕ\n⊢ ↑n = 0 ↔ p ∣ n\n[PROOFSTEP]\nrw [← map_natCast C, ← C_0, C_inj, h]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : WithBot ℕ\nf : R[X]\n⊢ f ∈ degreeLE R n ↔ degree f ≤ n\n[PROOFSTEP]\nsimp only [degreeLE, Submodule.mem_iInf, degree_le_iff_coeff_zero, LinearMap.mem_ker]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : WithBot ℕ\nf : R[X]\n⊢ (∀ (i : ℕ), ↑i > n → ↑(lcoeff R i) f = 0) ↔ ∀ (m : ℕ), n < ↑m → coeff f m = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\n⊢ degreeLE R ↑n = Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\n⊢ degreeLE R ↑n ≤ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : p ∈ degreeLE R ↑n\n⊢ p ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))\n[PROOFSTEP]\nreplace hp := mem_degreeLE.1 hp\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : degree p ≤ ↑n\n⊢ p ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))\n[PROOFSTEP]\nrw [← Polynomial.sum_monomial_eq p, Polynomial.sum]\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : degree p ≤ ↑n\n⊢ ∑ n in support p, ↑(monomial n) (coeff p n) ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))\n[PROOFSTEP]\nrefine' Submodule.sum_mem _ fun k hk => _\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : degree p ≤ ↑n\nk : ℕ\nhk : k ∈ support p\n⊢ ↑(monomial k) (coeff p k) ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))\n[PROOFSTEP]\nhave := WithBot.coe_le_coe.1 (Finset.sup_le_iff.1 hp k hk)\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : degree p ≤ ↑n\nk : ℕ\nhk : k ∈ support p\nthis : k ≤ ↑n\n⊢ ↑(monomial k) (coeff p k) ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))\n[PROOFSTEP]\nrw [← C_mul_X_pow_eq_monomial, C_mul']\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : degree p ≤ ↑n\nk : ℕ\nhk : k ∈ support p\nthis : k ≤ ↑n\n⊢ coeff p k • X ^ k ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))\n[PROOFSTEP]\nrefine'\n  Submodule.smul_mem _ _\n    (Submodule.subset_span <|\n      Finset.mem_coe.2 <| Finset.mem_image.2 ⟨_, Finset.mem_range.2 (Nat.lt_succ_of_le this), rfl⟩)\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\n⊢ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1))) ≤ degreeLE R ↑n\n[PROOFSTEP]\nrw [Submodule.span_le, Finset.coe_image, Set.image_subset_iff]\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\n⊢ ↑(range (n + 1)) ⊆ (fun n => X ^ n) ⁻¹' ↑(degreeLE R ↑n)\n[PROOFSTEP]\nintro k hk\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn k : ℕ\nhk : k ∈ ↑(range (n + 1))\n⊢ k ∈ (fun n => X ^ n) ⁻¹' ↑(degreeLE R ↑n)\n[PROOFSTEP]\napply mem_degreeLE.2\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn k : ℕ\nhk : k ∈ ↑(range (n + 1))\n⊢ degree ((fun n => X ^ n) k) ≤ ↑n\n[PROOFSTEP]\nexact (degree_X_pow_le _).trans (WithBot.coe_le_coe.2 <| Nat.le_of_lt_succ <| Finset.mem_range.1 hk)\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n⊢ f ∈ degreeLT R n ↔ degree f < ↑n\n[PROOFSTEP]\nrw [degreeLT, Submodule.mem_iInf]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n⊢ (∀ (i : ℕ), f ∈ ⨅ (_ : i ≥ n), LinearMap.ker (lcoeff R i)) ↔ degree f < ↑n\n[PROOFSTEP]\nconv_lhs => intro i; rw [Submodule.mem_iInf]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n| ∀ (i : ℕ), f ∈ ⨅ (_ : i ≥ n), LinearMap.ker (lcoeff R i)\n[PROOFSTEP]\nintro i; rw [Submodule.mem_iInf]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n| ∀ (i : ℕ), f ∈ ⨅ (_ : i ≥ n), LinearMap.ker (lcoeff R i)\n[PROOFSTEP]\nintro i; rw [Submodule.mem_iInf]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n| ∀ (i : ℕ), f ∈ ⨅ (_ : i ≥ n), LinearMap.ker (lcoeff R i)\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\ni : ℕ\n| f ∈ ⨅ (_ : i ≥ n), LinearMap.ker (lcoeff R i)\n[PROOFSTEP]\nrw [Submodule.mem_iInf]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n⊢ (∀ (i : ℕ), i ≥ n → f ∈ LinearMap.ker (lcoeff R i)) ↔ degree f < ↑n\n[PROOFSTEP]\nrw [degree, Finset.max_eq_sup_coe]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n⊢ (∀ (i : ℕ), i ≥ n → f ∈ LinearMap.ker (lcoeff R i)) ↔ sup (support f) WithBot.some < ↑n\n[PROOFSTEP]\nrw [Finset.sup_lt_iff ?_]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n⊢ (∀ (i : ℕ), i ≥ n → f ∈ LinearMap.ker (lcoeff R i)) ↔ ∀ (b : ℕ), b ∈ support f → ↑b < ↑n\nR : Type u S : Type u_1 inst✝ : Semiring R n : ℕ f : R[X] ⊢ ⊥ < ↑n\n[PROOFSTEP]\nrotate_left\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n⊢ ⊥ < ↑n\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n⊢ (∀ (i : ℕ), i ≥ n → f ∈ LinearMap.ker (lcoeff R i)) ↔ ∀ (b : ℕ), b ∈ support f → ↑b < ↑n\n[PROOFSTEP]\napply WithBot.bot_lt_coe\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n⊢ (∀ (i : ℕ), i ≥ n → f ∈ LinearMap.ker (lcoeff R i)) ↔ ∀ (b : ℕ), b ∈ support f → ↑b < ↑n\n[PROOFSTEP]\nconv_rhs =>\n  simp only [mem_support_iff]\n  intro b\n  rw [Nat.cast_withBot, WithBot.coe_lt_coe, lt_iff_not_le, Ne, not_imp_not]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n| ∀ (b : ℕ), b ∈ support f → ↑b < ↑n\n[PROOFSTEP]\n  simp only [mem_support_iff]\n  intro b\n  rw [Nat.cast_withBot, WithBot.coe_lt_coe, lt_iff_not_le, Ne, not_imp_not]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n| ∀ (b : ℕ), b ∈ support f → ↑b < ↑n\n[PROOFSTEP]\n  simp only [mem_support_iff]\n  intro b\n  rw [Nat.cast_withBot, WithBot.coe_lt_coe, lt_iff_not_le, Ne, not_imp_not]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n| ∀ (b : ℕ), b ∈ support f → ↑b < ↑n\n[PROOFSTEP]\nsimp only [mem_support_iff]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\n| ∀ (b : ℕ), coeff f b ≠ 0 → ↑b < ↑n\n[PROOFSTEP]\nintro b\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nf : R[X]\nb : ℕ\n| coeff f b ≠ 0 → ↑b < ↑n\n[PROOFSTEP]\nrw [Nat.cast_withBot, WithBot.coe_lt_coe, lt_iff_not_le, Ne, not_imp_not]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\n⊢ degreeLT R n = Submodule.span R ↑(image (fun n => X ^ n) (range n))\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\n⊢ degreeLT R n ≤ Submodule.span R ↑(image (fun n => X ^ n) (range n))\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : p ∈ degreeLT R n\n⊢ p ∈ Submodule.span R ↑(image (fun n => X ^ n) (range n))\n[PROOFSTEP]\nreplace hp := mem_degreeLT.1 hp\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : degree p < ↑n\n⊢ p ∈ Submodule.span R ↑(image (fun n => X ^ n) (range n))\n[PROOFSTEP]\nrw [← Polynomial.sum_monomial_eq p, Polynomial.sum]\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : degree p < ↑n\n⊢ ∑ n in support p, ↑(monomial n) (coeff p n) ∈ Submodule.span R ↑(image (fun n => X ^ n) (range n))\n[PROOFSTEP]\nrefine' Submodule.sum_mem _ fun k hk => _\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : degree p < ↑n\nk : ℕ\nhk : k ∈ support p\n⊢ ↑(monomial k) (coeff p k) ∈ Submodule.span R ↑(image (fun n => X ^ n) (range n))\n[PROOFSTEP]\nhave := WithBot.coe_lt_coe.1 ((Finset.sup_lt_iff <| WithBot.bot_lt_coe n).1 hp k hk)\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : degree p < ↑n\nk : ℕ\nhk : k ∈ support p\nthis : k < n\n⊢ ↑(monomial k) (coeff p k) ∈ Submodule.span R ↑(image (fun n => X ^ n) (range n))\n[PROOFSTEP]\nrw [← C_mul_X_pow_eq_monomial, C_mul']\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : degree p < ↑n\nk : ℕ\nhk : k ∈ support p\nthis : k < n\n⊢ coeff p k • X ^ k ∈ Submodule.span R ↑(image (fun n => X ^ n) (range n))\n[PROOFSTEP]\nrefine'\n  Submodule.smul_mem _ _\n    (Submodule.subset_span <| Finset.mem_coe.2 <| Finset.mem_image.2 ⟨_, Finset.mem_range.2 this, rfl⟩)\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\n⊢ Submodule.span R ↑(image (fun n => X ^ n) (range n)) ≤ degreeLT R n\n[PROOFSTEP]\nrw [Submodule.span_le, Finset.coe_image, Set.image_subset_iff]\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\n⊢ ↑(range n) ⊆ (fun n => X ^ n) ⁻¹' ↑(degreeLT R n)\n[PROOFSTEP]\nintro k hk\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn k : ℕ\nhk : k ∈ ↑(range n)\n⊢ k ∈ (fun n => X ^ n) ⁻¹' ↑(degreeLT R n)\n[PROOFSTEP]\napply mem_degreeLT.2\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn k : ℕ\nhk : k ∈ ↑(range n)\n⊢ degree ((fun n => X ^ n) k) < ↑n\n[PROOFSTEP]\nexact lt_of_le_of_lt (degree_X_pow_le _) (WithBot.coe_lt_coe.2 <| Finset.mem_range.1 hk)\n[GOAL]\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\np q : { x // x ∈ degreeLT R n }\n⊢ (fun p n_1 => coeff ↑p ↑n_1) (p + q) = (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\np q : { x // x ∈ degreeLT R n }\nx✝ : Fin n\n⊢ (fun p n_1 => coeff ↑p ↑n_1) (p + q) x✝ = ((fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\np q : { x // x ∈ degreeLT R n }\nx✝ : Fin n\n⊢ coeff (↑p + ↑q) ↑x✝ = coeff ↑p ↑x✝ + coeff ↑q ↑x✝\n[PROOFSTEP]\nrw [coeff_add]\n[GOAL]\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nx : R\np : { x // x ∈ degreeLT R n }\n⊢ AddHom.toFun\n      { toFun := fun p n_1 => coeff ↑p ↑n_1,\n        map_add' :=\n          (_ :\n            ∀ (p q : { x // x ∈ degreeLT R n }),\n              (fun p n_1 => coeff ↑p ↑n_1) (p + q) = (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n      (x • p) =\n    ↑(RingHom.id R) x •\n      AddHom.toFun\n        { toFun := fun p n_1 => coeff ↑p ↑n_1,\n          map_add' :=\n            (_ :\n              ∀ (p q : { x // x ∈ degreeLT R n }),\n                (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                  (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n        p\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nx : R\np : { x // x ∈ degreeLT R n }\nx✝ : Fin n\n⊢ AddHom.toFun\n      { toFun := fun p n_1 => coeff ↑p ↑n_1,\n        map_add' :=\n          (_ :\n            ∀ (p q : { x // x ∈ degreeLT R n }),\n              (fun p n_1 => coeff ↑p ↑n_1) (p + q) = (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n      (x • p) x✝ =\n    (↑(RingHom.id R) x •\n        AddHom.toFun\n          { toFun := fun p n_1 => coeff ↑p ↑n_1,\n            map_add' :=\n              (_ :\n                ∀ (p q : { x // x ∈ degreeLT R n }),\n                  (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                    (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n          p)\n      x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nx : R\np : { x // x ∈ degreeLT R n }\nx✝ : Fin n\n⊢ coeff (x • ↑p) ↑x✝ = x * coeff ↑p ↑x✝\n[PROOFSTEP]\nrw [coeff_smul]\n[GOAL]\ncase h\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nx : R\np : { x // x ∈ degreeLT R n }\nx✝ : Fin n\n⊢ x • coeff ↑p ↑x✝ = x * coeff ↑p ↑x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\n⊢ Function.LeftInverse\n    (fun f =>\n      { val := ∑ i : Fin n, ↑(monomial ↑i) (f i), property := (_ : ∑ i : Fin n, ↑(monomial ↑i) (f i) ∈ degreeLT R n) })\n    {\n          toAddHom :=\n            { toFun := fun p n_1 => coeff ↑p ↑n_1,\n              map_add' :=\n                (_ :\n                  ∀ (p q : { x // x ∈ degreeLT R n }),\n                    (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                      (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) },\n          map_smul' :=\n            (_ :\n              ∀ (x : R) (p : { x // x ∈ degreeLT R n }),\n                AddHom.toFun\n                    { toFun := fun p n_1 => coeff ↑p ↑n_1,\n                      map_add' :=\n                        (_ :\n                          ∀ (p q : { x // x ∈ degreeLT R n }),\n                            (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                              (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n                    (x • p) =\n                  ↑(RingHom.id R) x •\n                    AddHom.toFun\n                      { toFun := fun p n_1 => coeff ↑p ↑n_1,\n                        map_add' :=\n                          (_ :\n                            ∀ (p q : { x // x ∈ degreeLT R n }),\n                              (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                                (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n                      p) }.toAddHom.toFun\n[PROOFSTEP]\nrintro ⟨p, hp⟩\n[GOAL]\ncase mk\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : p ∈ degreeLT R n\n⊢ (fun f =>\n        { val := ∑ i : Fin n, ↑(monomial ↑i) (f i),\n          property := (_ : ∑ i : Fin n, ↑(monomial ↑i) (f i) ∈ degreeLT R n) })\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun p n_1 => coeff ↑p ↑n_1,\n                map_add' :=\n                  (_ :\n                    ∀ (p q : { x // x ∈ degreeLT R n }),\n                      (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                        (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) },\n            map_smul' :=\n              (_ :\n                ∀ (x : R) (p : { x // x ∈ degreeLT R n }),\n                  AddHom.toFun\n                      { toFun := fun p n_1 => coeff ↑p ↑n_1,\n                        map_add' :=\n                          (_ :\n                            ∀ (p q : { x // x ∈ degreeLT R n }),\n                              (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                                (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n                      (x • p) =\n                    ↑(RingHom.id R) x •\n                      AddHom.toFun\n                        { toFun := fun p n_1 => coeff ↑p ↑n_1,\n                          map_add' :=\n                            (_ :\n                              ∀ (p q : { x // x ∈ degreeLT R n }),\n                                (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                                  (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n                        p) }.toAddHom\n        { val := p, property := hp }) =\n    { val := p, property := hp }\n[PROOFSTEP]\next1\n[GOAL]\ncase mk.a\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : p ∈ degreeLT R n\n⊢ ↑((fun f =>\n          { val := ∑ i : Fin n, ↑(monomial ↑i) (f i),\n            property := (_ : ∑ i : Fin n, ↑(monomial ↑i) (f i) ∈ degreeLT R n) })\n        (AddHom.toFun\n          {\n              toAddHom :=\n                { toFun := fun p n_1 => coeff ↑p ↑n_1,\n                  map_add' :=\n                    (_ :\n                      ∀ (p q : { x // x ∈ degreeLT R n }),\n                        (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                          (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) },\n              map_smul' :=\n                (_ :\n                  ∀ (x : R) (p : { x // x ∈ degreeLT R n }),\n                    AddHom.toFun\n                        { toFun := fun p n_1 => coeff ↑p ↑n_1,\n                          map_add' :=\n                            (_ :\n                              ∀ (p q : { x // x ∈ degreeLT R n }),\n                                (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                                  (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n                        (x • p) =\n                      ↑(RingHom.id R) x •\n                        AddHom.toFun\n                          { toFun := fun p n_1 => coeff ↑p ↑n_1,\n                            map_add' :=\n                              (_ :\n                                ∀ (p q : { x // x ∈ degreeLT R n }),\n                                  (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                                    (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n                          p) }.toAddHom\n          { val := p, property := hp })) =\n    ↑{ val := p, property := hp }\n[PROOFSTEP]\nsimp only [Submodule.coe_mk]\n[GOAL]\ncase mk.a\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : p ∈ degreeLT R n\n⊢ ∑ x : Fin n, ↑(monomial ↑x) (coeff p ↑x) = p\n[PROOFSTEP]\nby_cases hp0 : p = 0\n[GOAL]\ncase pos\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : p ∈ degreeLT R n\nhp0 : p = 0\n⊢ ∑ x : Fin n, ↑(monomial ↑x) (coeff p ↑x) = p\n[PROOFSTEP]\nsubst hp0\n[GOAL]\ncase pos\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nhp : 0 ∈ degreeLT R n\n⊢ ∑ x : Fin n, ↑(monomial ↑x) (coeff 0 ↑x) = 0\n[PROOFSTEP]\nsimp only [coeff_zero, LinearMap.map_zero, Finset.sum_const_zero]\n[GOAL]\ncase neg\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : p ∈ degreeLT R n\nhp0 : ¬p = 0\n⊢ ∑ x : Fin n, ↑(monomial ↑x) (coeff p ↑x) = p\n[PROOFSTEP]\nrw [mem_degreeLT, degree_eq_natDegree hp0, Nat.cast_withBot, Nat.cast_withBot, WithBot.coe_lt_coe] at hp \n[GOAL]\ncase neg\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : natDegree p < n\nhp0 : ¬p = 0\n⊢ ∑ x : Fin n, ↑(monomial ↑x) (coeff p ↑x) = p\n[PROOFSTEP]\nconv_rhs => rw [p.as_sum_range' n hp, ← Fin.sum_univ_eq_sum_range]\n[GOAL]\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : natDegree p < n\nhp0 : ¬p = 0\n| p\n[PROOFSTEP]\nrw [p.as_sum_range' n hp, ← Fin.sum_univ_eq_sum_range]\n[GOAL]\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : natDegree p < n\nhp0 : ¬p = 0\n| p\n[PROOFSTEP]\nrw [p.as_sum_range' n hp, ← Fin.sum_univ_eq_sum_range]\n[GOAL]\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : natDegree p < n\nhp0 : ¬p = 0\n| p\n[PROOFSTEP]\nrw [p.as_sum_range' n hp, ← Fin.sum_univ_eq_sum_range]\n[GOAL]\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nf : Fin n → R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun p n_1 => coeff ↑p ↑n_1,\n              map_add' :=\n                (_ :\n                  ∀ (p q : { x // x ∈ degreeLT R n }),\n                    (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                      (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) },\n          map_smul' :=\n            (_ :\n              ∀ (x : R) (p : { x // x ∈ degreeLT R n }),\n                AddHom.toFun\n                    { toFun := fun p n_1 => coeff ↑p ↑n_1,\n                      map_add' :=\n                        (_ :\n                          ∀ (p q : { x // x ∈ degreeLT R n }),\n                            (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                              (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n                    (x • p) =\n                  ↑(RingHom.id R) x •\n                    AddHom.toFun\n                      { toFun := fun p n_1 => coeff ↑p ↑n_1,\n                        map_add' :=\n                          (_ :\n                            ∀ (p q : { x // x ∈ degreeLT R n }),\n                              (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                                (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n                      p) }.toAddHom\n      ((fun f =>\n          { val := ∑ i : Fin n, ↑(monomial ↑i) (f i),\n            property := (_ : ∑ i : Fin n, ↑(monomial ↑i) (f i) ∈ degreeLT R n) })\n        f) =\n    f\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nf : Fin n → R\ni : Fin n\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun p n_1 => coeff ↑p ↑n_1,\n              map_add' :=\n                (_ :\n                  ∀ (p q : { x // x ∈ degreeLT R n }),\n                    (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                      (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) },\n          map_smul' :=\n            (_ :\n              ∀ (x : R) (p : { x // x ∈ degreeLT R n }),\n                AddHom.toFun\n                    { toFun := fun p n_1 => coeff ↑p ↑n_1,\n                      map_add' :=\n                        (_ :\n                          ∀ (p q : { x // x ∈ degreeLT R n }),\n                            (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                              (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n                    (x • p) =\n                  ↑(RingHom.id R) x •\n                    AddHom.toFun\n                      { toFun := fun p n_1 => coeff ↑p ↑n_1,\n                        map_add' :=\n                          (_ :\n                            ∀ (p q : { x // x ∈ degreeLT R n }),\n                              (fun p n_1 => coeff ↑p ↑n_1) (p + q) =\n                                (fun p n_1 => coeff ↑p ↑n_1) p + (fun p n_1 => coeff ↑p ↑n_1) q) }\n                      p) }.toAddHom\n      ((fun f =>\n          { val := ∑ i : Fin n, ↑(monomial ↑i) (f i),\n            property := (_ : ∑ i : Fin n, ↑(monomial ↑i) (f i) ∈ degreeLT R n) })\n        f)\n      i =\n    f i\n[PROOFSTEP]\nsimp only [finset_sum_coeff, Submodule.coe_mk]\n[GOAL]\ncase h\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nf : Fin n → R\ni : Fin n\n⊢ ∑ b : Fin n, coeff (↑(monomial ↑b) (f b)) ↑i = f i\n[PROOFSTEP]\nrw [Finset.sum_eq_single i, coeff_monomial, if_pos rfl]\n[GOAL]\ncase h.h₀\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nf : Fin n → R\ni : Fin n\n⊢ ∀ (b : Fin n), b ∈ univ → b ≠ i → coeff (↑(monomial ↑b) (f b)) ↑i = 0\n[PROOFSTEP]\nrintro j - hji\n[GOAL]\ncase h.h₀\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nf : Fin n → R\ni j : Fin n\nhji : j ≠ i\n⊢ coeff (↑(monomial ↑j) (f j)) ↑i = 0\n[PROOFSTEP]\nrw [coeff_monomial, if_neg]\n[GOAL]\ncase h.h₀.hnc\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nf : Fin n → R\ni j : Fin n\nhji : j ≠ i\n⊢ ¬↑j = ↑i\n[PROOFSTEP]\nrwa [← Fin.ext_iff]\n[GOAL]\ncase h.h₁\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nf : Fin n → R\ni : Fin n\n⊢ ¬i ∈ univ → coeff (↑(monomial ↑i) (f i)) ↑i = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.h₁\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Semiring R✝\nR : Type ?u.20302\ninst✝ : Semiring R\nn : ℕ\nf : Fin n → R\ni : Fin n\nh : ¬i ∈ univ\n⊢ coeff (↑(monomial ↑i) (f i)) ↑i = 0\n[PROOFSTEP]\nexact (h (Finset.mem_univ _)).elim\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : p ∈ degreeLT R n\n⊢ ↑(degreeLTEquiv R n) { val := p, property := hp } = 0 ↔ p = 0\n[PROOFSTEP]\nrw [LinearEquiv.map_eq_zero_iff, Submodule.mk_eq_zero]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : p ∈ degreeLT R n\nx : R\n⊢ eval x p = ∑ i : Fin n, ↑(degreeLTEquiv R n) { val := p, property := hp } i * x ^ ↑i\n[PROOFSTEP]\nsimp_rw [eval_eq_sum]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : p ∈ degreeLT R n\nx : R\n⊢ (sum p fun e a => a * x ^ e) = ∑ x_1 : Fin n, ↑(degreeLTEquiv R n) { val := p, property := hp } x_1 * x ^ ↑x_1\n[PROOFSTEP]\nexact (sum_fin _ (by simp_rw [zero_mul, forall_const]) (mem_degreeLT.mp hp)).symm\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\np : R[X]\nhp : p ∈ degreeLT R n\nx : R\n⊢ ∀ (i : ℕ), 0 * x ^ i = 0\n[PROOFSTEP]\nsimp_rw [zero_mul, forall_const]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\np : R[X]\nc : R\n⊢ c ∈ frange p ↔ ∃ n, n ∈ support p ∧ c = coeff p n\n[PROOFSTEP]\nsimp [frange, eq_comm]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\n⊢ frange 1 ⊆ {1}\n[PROOFSTEP]\nsimp only [frange]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\n⊢ image (fun n => coeff 1 n) (support 1) ⊆ {1}\n[PROOFSTEP]\nrw [Finset.image_subset_iff]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\n⊢ ∀ (x : ℕ), x ∈ support 1 → coeff 1 x ∈ {1}\n[PROOFSTEP]\nsimp only [mem_support_iff, ne_eq, mem_singleton, ← C_1, coeff_C]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\n⊢ ∀ (x : ℕ), ¬(if x = 0 then 1 else 0) = 0 → (if x = 0 then 1 else 0) = 1\n[PROOFSTEP]\nintro n hn\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nhn : ¬(if n = 0 then 1 else 0) = 0\n⊢ (if n = 0 then 1 else 0) = 1\n[PROOFSTEP]\nsimp only [exists_prop, ite_eq_right_iff, not_forall] at hn \n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nhn : n = 0 ∧ ¬1 = 0\n⊢ (if n = 0 then 1 else 0) = 1\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\np : R[X]\nn : ℕ\nh : coeff p n ≠ 0\n⊢ coeff p n ∈ frange p\n[PROOFSTEP]\nsimp only [frange, exists_prop, mem_support_iff, Finset.mem_image, Ne.def]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\np : R[X]\nn : ℕ\nh : coeff p n ≠ 0\n⊢ ∃ a, ¬coeff p a = 0 ∧ coeff p a = coeff p n\n[PROOFSTEP]\nexact ⟨n, h, rfl⟩\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\n⊢ comp (∑ i in range n, X ^ i) (X + 1) = ∑ i in range n, ↑(Nat.choose n (i + 1)) * X ^ i\n[PROOFSTEP]\next i\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn i : ℕ\n⊢ coeff (comp (∑ i in range n, X ^ i) (X + 1)) i = coeff (∑ i in range n, ↑(Nat.choose n (i + 1)) * X ^ i) i\n[PROOFSTEP]\ntrans (n.choose (i + 1) : R)\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn i : ℕ\n⊢ coeff (comp (∑ i in range n, X ^ i) (X + 1)) i = ↑(Nat.choose n (i + 1))\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn i : ℕ\n⊢ ↑(Nat.choose n (i + 1)) = coeff (∑ i in range n, ↑(Nat.choose n (i + 1)) * X ^ i) i\n[PROOFSTEP]\nswap\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn i : ℕ\n⊢ ↑(Nat.choose n (i + 1)) = coeff (∑ i in range n, ↑(Nat.choose n (i + 1)) * X ^ i) i\n[PROOFSTEP]\nsimp only [finset_sum_coeff, ← C_eq_nat_cast, coeff_C_mul_X_pow]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn i : ℕ\n⊢ ↑(Nat.choose n (i + 1)) = ∑ x in range n, if i = x then ↑(Nat.choose n (x + 1)) else 0\n[PROOFSTEP]\nrw [Finset.sum_eq_single i, if_pos rfl]\n[GOAL]\ncase h₀\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn i : ℕ\n⊢ ∀ (b : ℕ), b ∈ range n → b ≠ i → (if i = b then ↑(Nat.choose n (b + 1)) else 0) = 0\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [@eq_comm _ i, if_false, eq_self_iff_true, imp_true_iff]\n[GOAL]\ncase h₁\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn i : ℕ\n⊢ ¬i ∈ range n → (if i = i then ↑(Nat.choose n (i + 1)) else 0) = 0\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [Nat.lt_add_one_iff, Nat.choose_eq_zero_of_lt, Nat.cast_zero,\n  Finset.mem_range, not_lt, eq_self_iff_true, if_true, imp_true_iff]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn i : ℕ\n⊢ coeff (comp (∑ i in range n, X ^ i) (X + 1)) i = ↑(Nat.choose n (i + 1))\n[PROOFSTEP]\ninduction' n with n ih generalizing i\n[GOAL]\ncase zero\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\ni✝ i : ℕ\n⊢ coeff (comp (∑ i in range Nat.zero, X ^ i) (X + 1)) i = ↑(Nat.choose Nat.zero (i + 1))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase zero\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\ni✝ i : ℕ\n⊢ coeff (comp 0 (X + 1)) i = ↑0\n[PROOFSTEP]\nsimp only [zero_comp, coeff_zero, Nat.cast_zero]\n[GOAL]\ncase succ\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\ni✝ n : ℕ\nih : ∀ (i : ℕ), coeff (comp (∑ i in range n, X ^ i) (X + 1)) i = ↑(Nat.choose n (i + 1))\ni : ℕ\n⊢ coeff (comp (∑ i in range (Nat.succ n), X ^ i) (X + 1)) i = ↑(Nat.choose (Nat.succ n) (i + 1))\n[PROOFSTEP]\nsimp only [geom_sum_succ', ih, add_comp, X_pow_comp, coeff_add, Nat.choose_succ_succ, Nat.cast_add, coeff_X_add_one_pow]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nP : R[X]\nhP : Monic P\nhdeg : 0 < natDegree P\nn : ℕ\nhn : n ≠ 0\n⊢ Monic (∑ i in range n, P ^ i)\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nP : R[X]\nhP : Monic P\nhdeg : 0 < natDegree P\nn : ℕ\nhn : n ≠ 0\n✝ : Nontrivial R\n⊢ Monic (∑ i in range n, P ^ i)\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hn\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nP : R[X]\nhP : Monic P\nhdeg : 0 < natDegree P\n✝ : Nontrivial R\nn : ℕ\nhn : Nat.succ n ≠ 0\n⊢ Monic (∑ i in range (Nat.succ n), P ^ i)\n[PROOFSTEP]\nrw [geom_sum_succ']\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nP : R[X]\nhP : Monic P\nhdeg : 0 < natDegree P\n✝ : Nontrivial R\nn : ℕ\nhn : Nat.succ n ≠ 0\n⊢ Monic (P ^ n + ∑ i in range n, P ^ i)\n[PROOFSTEP]\nrefine' (hP.pow _).add_of_left _\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nP : R[X]\nhP : Monic P\nhdeg : 0 < natDegree P\n✝ : Nontrivial R\nn : ℕ\nhn : Nat.succ n ≠ 0\n⊢ degree (∑ i in range n, P ^ i) < degree (P ^ n)\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (degree_sum_le _ _) _\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nP : R[X]\nhP : Monic P\nhdeg : 0 < natDegree P\n✝ : Nontrivial R\nn : ℕ\nhn : Nat.succ n ≠ 0\n⊢ (sup (range n) fun b => degree (P ^ b)) < degree (P ^ n)\n[PROOFSTEP]\nrw [Finset.sup_lt_iff]\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nP : R[X]\nhP : Monic P\nhdeg : 0 < natDegree P\n✝ : Nontrivial R\nn : ℕ\nhn : Nat.succ n ≠ 0\n⊢ ∀ (b : ℕ), b ∈ range n → degree (P ^ b) < degree (P ^ n)\n[PROOFSTEP]\nsimp only [Finset.mem_range, degree_eq_natDegree (hP.pow _).ne_zero]\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nP : R[X]\nhP : Monic P\nhdeg : 0 < natDegree P\n✝ : Nontrivial R\nn : ℕ\nhn : Nat.succ n ≠ 0\n⊢ ∀ (b : ℕ), b < n → ↑(natDegree (P ^ b)) < ↑(natDegree (P ^ n))\n[PROOFSTEP]\nsimp only [Nat.cast_withBot, WithBot.coe_lt_coe, hP.natDegree_pow]\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nP : R[X]\nhP : Monic P\nhdeg : 0 < natDegree P\n✝ : Nontrivial R\nn : ℕ\nhn : Nat.succ n ≠ 0\n⊢ ∀ (b : ℕ), b < n → b * natDegree P < n * natDegree P\n[PROOFSTEP]\nintro k\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nP : R[X]\nhP : Monic P\nhdeg : 0 < natDegree P\n✝ : Nontrivial R\nn : ℕ\nhn : Nat.succ n ≠ 0\nk : ℕ\n⊢ k < n → k * natDegree P < n * natDegree P\n[PROOFSTEP]\nexact nsmul_lt_nsmul hdeg\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nP : R[X]\nhP : Monic P\nhdeg : 0 < natDegree P\n✝ : Nontrivial R\nn : ℕ\nhn : Nat.succ n ≠ 0\n⊢ ⊥ < degree (P ^ n)\n[PROOFSTEP]\nrw [bot_lt_iff_ne_bot, Ne.def, degree_eq_bot]\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nP : R[X]\nhP : Monic P\nhdeg : 0 < natDegree P\n✝ : Nontrivial R\nn : ℕ\nhn : Nat.succ n ≠ 0\n⊢ ¬P ^ n = 0\n[PROOFSTEP]\nexact (hP.pow _).ne_zero\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nhn : n ≠ 0\n⊢ Monic (∑ i in range n, X ^ i)\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nhn : n ≠ 0\n✝ : Nontrivial R\n⊢ Monic (∑ i in range n, X ^ i)\n[PROOFSTEP]\napply monic_X.geom_sum _ hn\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nn : ℕ\nhn : n ≠ 0\n✝ : Nontrivial R\n⊢ 0 < natDegree X\n[PROOFSTEP]\nsimp only [natDegree_X, zero_lt_one]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\nn : ℕ\n⊢ ↑(coeff (restriction p) n) = coeff p n\n[PROOFSTEP]\nsimp only [restriction, coeff_monomial, finset_sum_coeff, mem_support_iff, Finset.sum_ite_eq', Ne.def, ite_not]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\nn : ℕ\n⊢ ↑(if coeff p n = 0 then 0 else { val := coeff p n, property := (_ : coeff p n ∈ Subring.closure ↑(frange p)) }) =\n    coeff p n\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\nn : ℕ\nh : coeff p n = 0\n⊢ ↑0 = coeff p n\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\nn : ℕ\nh : coeff p n = 0\n⊢ ↑0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\nn : ℕ\nh : ¬coeff p n = 0\n⊢ ↑{ val := coeff p n, property := (_ : coeff p n ∈ Subring.closure ↑(frange p)) } = coeff p n\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\n⊢ support (restriction p) = support p\n[PROOFSTEP]\next i\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\ni : ℕ\n⊢ i ∈ support (restriction p) ↔ i ∈ support p\n[PROOFSTEP]\nsimp only [mem_support_iff, not_iff_not, Ne.def]\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\ni : ℕ\n⊢ coeff (restriction p) i = 0 ↔ coeff p i = 0\n[PROOFSTEP]\nconv_rhs => rw [← coeff_restriction]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\ni : ℕ\n| coeff p i = 0\n[PROOFSTEP]\nrw [← coeff_restriction]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\ni : ℕ\n| coeff p i = 0\n[PROOFSTEP]\nrw [← coeff_restriction]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\ni : ℕ\n| coeff p i = 0\n[PROOFSTEP]\nrw [← coeff_restriction]\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\ni : ℕ\n⊢ coeff (restriction p) i = 0 ↔ ↑(coeff (restriction p) i) = 0\n[PROOFSTEP]\nexact ⟨fun H => by rw [H, ZeroMemClass.coe_zero], fun H => Subtype.coe_injective H⟩\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\ni : ℕ\nH : coeff (restriction p) i = 0\n⊢ ↑(coeff (restriction p) i) = 0\n[PROOFSTEP]\nrw [H, ZeroMemClass.coe_zero]\n[GOAL]\nR✝ : Type u\nS : Type u_1\ninst✝¹ : Ring R✝\nR : Type u\ninst✝ : CommRing R\np : R[X]\nn : ℕ\n⊢ coeff (map (algebraMap { x // x ∈ Subring.closure ↑(frange p) } R) (restriction p)) n = coeff p n\n[PROOFSTEP]\nrw [coeff_map, Algebra.algebraMap_ofSubring_apply, coeff_restriction]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\n⊢ degree (restriction p) = degree p\n[PROOFSTEP]\nsimp [degree]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\n⊢ natDegree (restriction p) = natDegree p\n[PROOFSTEP]\nsimp [natDegree]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\n⊢ Monic (restriction p) ↔ Monic p\n[PROOFSTEP]\nsimp only [Monic, leadingCoeff, natDegree_restriction]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\n⊢ coeff (restriction p) (natDegree p) = 1 ↔ coeff p (natDegree p) = 1\n[PROOFSTEP]\nrw [← @coeff_restriction _ _ p]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\n⊢ coeff (restriction p) (natDegree p) = 1 ↔ ↑(coeff (restriction p) (natDegree p)) = 1\n[PROOFSTEP]\nexact ⟨fun H => by rw [H, OneMemClass.coe_one], fun H => Subtype.coe_injective H⟩\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\np : R[X]\nH : coeff (restriction p) (natDegree p) = 1\n⊢ ↑(coeff (restriction p) (natDegree p)) = 1\n[PROOFSTEP]\nrw [H, OneMemClass.coe_one]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\n⊢ restriction 0 = 0\n[PROOFSTEP]\nsimp only [restriction, Finset.sum_empty, support_zero]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\ni : ℕ\n⊢ ↑(coeff (restriction 1) i) = ↑(coeff 1 i)\n[PROOFSTEP]\nrw [coeff_restriction', coeff_one, coeff_one]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\ni : ℕ\n⊢ (if 0 = i then 1 else 0) = ↑(if 0 = i then 1 else 0)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u\nS : Type u_1\ninst✝ : Ring R\ni : ℕ\nh✝ : 0 = i\n⊢ 1 = ↑1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u\nS : Type u_1\ninst✝ : Ring R\ni : ℕ\nh✝ : ¬0 = i\n⊢ 0 = ↑0\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\n⊢ eval₂ f x p = eval₂ (RingHom.comp f (Subring.subtype (Subring.closure ↑(frange p)))) x (restriction p)\n[PROOFSTEP]\nsimp only [eval₂_eq_sum, sum, support_restriction, ← @coeff_restriction _ _ p, RingHom.comp_apply, Subring.coeSubtype]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\nn : ℕ\n⊢ ↑(coeff (toSubring p T hp) n) = coeff p n\n[PROOFSTEP]\nsimp only [toSubring, coeff_monomial, finset_sum_coeff, mem_support_iff, Finset.sum_ite_eq', Ne.def, ite_not]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\nn : ℕ\n⊢ ↑(if coeff p n = 0 then 0 else { val := coeff p n, property := (_ : coeff p n ∈ T) }) = coeff p n\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\nn : ℕ\nh : coeff p n = 0\n⊢ ↑0 = coeff p n\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\nn : ℕ\nh : coeff p n = 0\n⊢ ↑0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\nn : ℕ\nh : ¬coeff p n = 0\n⊢ ↑{ val := coeff p n, property := (_ : coeff p n ∈ T) } = coeff p n\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\n⊢ support (toSubring p T hp) = support p\n[PROOFSTEP]\next i\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\ni : ℕ\n⊢ i ∈ support (toSubring p T hp) ↔ i ∈ support p\n[PROOFSTEP]\nsimp only [mem_support_iff, not_iff_not, Ne.def]\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\ni : ℕ\n⊢ coeff (toSubring p T hp) i = 0 ↔ coeff p i = 0\n[PROOFSTEP]\nconv_rhs => rw [← coeff_toSubring p T hp]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\ni : ℕ\n| coeff p i = 0\n[PROOFSTEP]\nrw [← coeff_toSubring p T hp]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\ni : ℕ\n| coeff p i = 0\n[PROOFSTEP]\nrw [← coeff_toSubring p T hp]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\ni : ℕ\n| coeff p i = 0\n[PROOFSTEP]\nrw [← coeff_toSubring p T hp]\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\ni : ℕ\n⊢ coeff (toSubring p T hp) i = 0 ↔ ↑(coeff (toSubring p T hp) i) = 0\n[PROOFSTEP]\nexact ⟨fun H => by rw [H, ZeroMemClass.coe_zero], fun H => Subtype.coe_injective H⟩\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\ni : ℕ\nH : coeff (toSubring p T hp) i = 0\n⊢ ↑(coeff (toSubring p T hp) i) = 0\n[PROOFSTEP]\nrw [H, ZeroMemClass.coe_zero]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\n⊢ degree (toSubring p T hp) = degree p\n[PROOFSTEP]\nsimp [degree]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\n⊢ natDegree (toSubring p T hp) = natDegree p\n[PROOFSTEP]\nsimp [natDegree]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\n⊢ Monic (toSubring p T hp) ↔ Monic p\n[PROOFSTEP]\nsimp_rw [Monic, leadingCoeff, natDegree_toSubring, ← coeff_toSubring p T hp]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\n⊢ coeff (toSubring p T hp) (natDegree p) = 1 ↔ ↑(coeff (toSubring p T hp) (natDegree p)) = 1\n[PROOFSTEP]\nexact ⟨fun H => by rw [H, OneMemClass.coe_one], fun H => Subtype.coe_injective H⟩\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\nH : coeff (toSubring p T hp) (natDegree p) = 1\n⊢ ↑(coeff (toSubring p T hp) (natDegree p)) = 1\n[PROOFSTEP]\nrw [H, OneMemClass.coe_one]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\n⊢ ↑(frange 0) ⊆ ↑T\n[PROOFSTEP]\nsimp [frange_zero]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\n⊢ toSubring 0 T (_ : ↑∅ ⊆ ↑T) = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase a.a\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\ni : ℕ\n⊢ ↑(coeff (toSubring 0 T (_ : ↑∅ ⊆ ↑T)) i) = ↑(coeff 0 i)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\ni : ℕ\n⊢ ↑(coeff (toSubring 1 T (_ : ↑(frange 1) ⊆ ↑T)) i) = ↑(coeff 1 i)\n[PROOFSTEP]\nrw [coeff_toSubring', coeff_one, coeff_one, apply_ite Subtype.val, ZeroMemClass.coe_zero, OneMemClass.coe_one]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\n⊢ map (Subring.subtype T) (toSubring p T hp) = p\n[PROOFSTEP]\next n\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\np : R[X]\nT : Subring R\nhp : ↑(frange p) ⊆ ↑T\nn : ℕ\n⊢ coeff (map (Subring.subtype T) (toSubring p T hp)) n = coeff p n\n[PROOFSTEP]\nsimp [coeff_map]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\nT : Subring R\np : { x // x ∈ T }[X]\nn : ℕ\n⊢ coeff (ofSubring T p) n = ↑(coeff p n)\n[PROOFSTEP]\nsimp only [ofSubring, coeff_monomial, finset_sum_coeff, mem_support_iff, Finset.sum_ite_eq', ite_eq_right_iff, Ne.def,\n  ite_not, Classical.not_not, ite_eq_left_iff]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\nT : Subring R\np : { x // x ∈ T }[X]\nn : ℕ\n⊢ coeff p n = 0 → 0 = ↑(coeff p n)\n[PROOFSTEP]\nintro h\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\nT : Subring R\np : { x // x ∈ T }[X]\nn : ℕ\nh : coeff p n = 0\n⊢ 0 = ↑(coeff p n)\n[PROOFSTEP]\nrw [h, ZeroMemClass.coe_zero]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\nT : Subring R\np : { x // x ∈ T }[X]\n⊢ ↑(frange (ofSubring T p)) ⊆ ↑T\n[PROOFSTEP]\nintro i hi\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\nT : Subring R\np : { x // x ∈ T }[X]\ni : R\nhi : i ∈ ↑(frange (ofSubring T p))\n⊢ i ∈ ↑T\n[PROOFSTEP]\nsimp only [frange, Set.mem_image, mem_support_iff, Ne.def, Finset.mem_coe, Finset.coe_image] at hi \n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\nT : Subring R\np : { x // x ∈ T }[X]\ni : R\nhi : ∃ x, ¬coeff (ofSubring T p) x = 0 ∧ coeff (ofSubring T p) x = i\n⊢ i ∈ ↑T\n[PROOFSTEP]\nrcases hi with ⟨n, _, h'n⟩\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\nT : Subring R\np : { x // x ∈ T }[X]\ni : R\nn : ℕ\nleft✝ : ¬coeff (ofSubring T p) n = 0\nh'n : coeff (ofSubring T p) n = i\n⊢ i ∈ ↑T\n[PROOFSTEP]\nrw [← h'n, coeff_ofSubring]\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nf : R →+* S\nx : S\nT : Subring R\np : { x // x ∈ T }[X]\ni : R\nn : ℕ\nleft✝ : ¬coeff (ofSubring T p) n = 0\nh'n : coeff (ofSubring T p) n = i\n⊢ ↑(coeff p n) ∈ ↑T\n[PROOFSTEP]\nexact Subtype.mem (coeff p n : T)\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nI : Ideal R[X]\nc : R\nx : R[X]\nH :\n  x ∈\n    { toAddSubsemigroup := { carrier := I.carrier, add_mem' := (_ : ∀ {a b : R[X]}, a ∈ I → b ∈ I → a + b ∈ I) },\n          zero_mem' := (_ : 0 ∈ I) }.toAddSubsemigroup.carrier\n⊢ c • x ∈\n    { toAddSubsemigroup := { carrier := I.carrier, add_mem' := (_ : ∀ {a b : R[X]}, a ∈ I → b ∈ I → a + b ∈ I) },\n          zero_mem' := (_ : 0 ∈ I) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrw [← C_mul']\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Semiring R\nI : Ideal R[X]\nc : R\nx : R[X]\nH :\n  x ∈\n    { toAddSubsemigroup := { carrier := I.carrier, add_mem' := (_ : ∀ {a b : R[X]}, a ∈ I → b ∈ I → a + b ∈ I) },\n          zero_mem' := (_ : 0 ∈ I) }.toAddSubsemigroup.carrier\n⊢ ↑C c * x ∈\n    { toAddSubsemigroup := { carrier := I.carrier, add_mem' := (_ : ∀ {a b : R[X]}, a ∈ I → b ∈ I → a + b ∈ I) },\n          zero_mem' := (_ : 0 ∈ I) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nexact I.mul_mem_left _ H\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\n⊢ f ∈ map C I ↔ ∀ (n : ℕ), coeff f n ∈ I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\n⊢ f ∈ map C I → ∀ (n : ℕ), coeff f n ∈ I\n[PROOFSTEP]\nintro hf\n[GOAL]\ncase mp\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\nhf : f ∈ map C I\n⊢ ∀ (n : ℕ), coeff f n ∈ I\n[PROOFSTEP]\napply @Submodule.span_induction _ _ _ _ _ f _ _ hf\n[GOAL]\ncase mp.Hs\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\nhf : f ∈ map C I\n⊢ ∀ (x : R[X]), x ∈ ↑C '' ↑I → ∀ (n : ℕ), coeff x n ∈ I\n[PROOFSTEP]\nintro f hf n\n[GOAL]\ncase mp.Hs\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf✝ : R[X]\nhf✝ : f✝ ∈ map C I\nf : R[X]\nhf : f ∈ ↑C '' ↑I\nn : ℕ\n⊢ coeff f n ∈ I\n[PROOFSTEP]\ncases' (Set.mem_image _ _ _).mp hf with x hx\n[GOAL]\ncase mp.Hs.intro\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf✝ : R[X]\nhf✝ : f✝ ∈ map C I\nf : R[X]\nhf : f ∈ ↑C '' ↑I\nn : ℕ\nx : R\nhx : x ∈ ↑I ∧ ↑C x = f\n⊢ coeff f n ∈ I\n[PROOFSTEP]\nrw [← hx.right, coeff_C]\n[GOAL]\ncase mp.Hs.intro\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf✝ : R[X]\nhf✝ : f✝ ∈ map C I\nf : R[X]\nhf : f ∈ ↑C '' ↑I\nn : ℕ\nx : R\nhx : x ∈ ↑I ∧ ↑C x = f\n⊢ (if n = 0 then x else 0) ∈ I\n[PROOFSTEP]\nby_cases h : n = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf✝ : R[X]\nhf✝ : f✝ ∈ map C I\nf : R[X]\nhf : f ∈ ↑C '' ↑I\nn : ℕ\nx : R\nhx : x ∈ ↑I ∧ ↑C x = f\nh : n = 0\n⊢ (if n = 0 then x else 0) ∈ I\n[PROOFSTEP]\nsimpa [h] using hx.left\n[GOAL]\ncase neg\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf✝ : R[X]\nhf✝ : f✝ ∈ map C I\nf : R[X]\nhf : f ∈ ↑C '' ↑I\nn : ℕ\nx : R\nhx : x ∈ ↑I ∧ ↑C x = f\nh : ¬n = 0\n⊢ (if n = 0 then x else 0) ∈ I\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase mp.H0\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\nhf : f ∈ map C I\n⊢ ∀ (n : ℕ), coeff 0 n ∈ I\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.H1\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\nhf : f ∈ map C I\n⊢ ∀ (x y : R[X]), (∀ (n : ℕ), coeff x n ∈ I) → (∀ (n : ℕ), coeff y n ∈ I) → ∀ (n : ℕ), coeff (x + y) n ∈ I\n[PROOFSTEP]\nexact fun f g hf hg n => by simp [I.add_mem (hf n) (hg n)]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf✝ : R[X]\nhf✝ : f✝ ∈ map C I\nf g : R[X]\nhf : ∀ (n : ℕ), coeff f n ∈ I\nhg : ∀ (n : ℕ), coeff g n ∈ I\nn : ℕ\n⊢ coeff (f + g) n ∈ I\n[PROOFSTEP]\nsimp [I.add_mem (hf n) (hg n)]\n[GOAL]\ncase mp.H2\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\nhf : f ∈ map C I\n⊢ ∀ (a x : R[X]), (∀ (n : ℕ), coeff x n ∈ I) → ∀ (n : ℕ), coeff (a • x) n ∈ I\n[PROOFSTEP]\nrefine' fun f g hg n => _\n[GOAL]\ncase mp.H2\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf✝ : R[X]\nhf : f✝ ∈ map C I\nf g : R[X]\nhg : ∀ (n : ℕ), coeff g n ∈ I\nn : ℕ\n⊢ coeff (f • g) n ∈ I\n[PROOFSTEP]\nrw [smul_eq_mul, coeff_mul]\n[GOAL]\ncase mp.H2\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf✝ : R[X]\nhf : f✝ ∈ map C I\nf g : R[X]\nhg : ∀ (n : ℕ), coeff g n ∈ I\nn : ℕ\n⊢ ∑ x in Nat.antidiagonal n, coeff f x.fst * coeff g x.snd ∈ I\n[PROOFSTEP]\nexact I.sum_mem fun c _ => I.mul_mem_left (f.coeff c.fst) (hg c.snd)\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\n⊢ (∀ (n : ℕ), coeff f n ∈ I) → f ∈ map C I\n[PROOFSTEP]\nintro hf\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\nhf : ∀ (n : ℕ), coeff f n ∈ I\n⊢ f ∈ map C I\n[PROOFSTEP]\nrw [← sum_monomial_eq f]\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\nhf : ∀ (n : ℕ), coeff f n ∈ I\n⊢ (sum f fun n a => ↑(monomial n) a) ∈ map C I\n[PROOFSTEP]\nrefine' (I.map C : Ideal R[X]).sum_mem fun n _ => _\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\nhf : ∀ (n : ℕ), coeff f n ∈ I\nn : ℕ\nx✝ : n ∈ support f\n⊢ (fun n a => ↑(monomial n) a) n (coeff f n) ∈ map C I\n[PROOFSTEP]\nsimp [← C_mul_X_pow_eq_monomial]\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\nhf : ∀ (n : ℕ), coeff f n ∈ I\nn : ℕ\nx✝ : n ∈ support f\n⊢ ↑C (coeff f n) * X ^ n ∈ map C I\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R\nf : R[X]\nhf : ∀ (n : ℕ), coeff f n ∈ I\nn : ℕ\nx✝ : n ∈ support f\n⊢ X ^ n * ↑C (coeff f n) ∈ map C I\n[PROOFSTEP]\nexact (I.map C : Ideal R[X]).mul_mem_left _ (mem_map_of_mem _ (hf n))\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nf : R →+* S\n⊢ LinearMap.ker (RingHom.toSemilinearMap (mapRingHom f)) = map C (RingHom.ker f)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nf : R →+* S\nx✝ : R[X]\n⊢ x✝ ∈ LinearMap.ker (RingHom.toSemilinearMap (mapRingHom f)) ↔ x✝ ∈ map C (RingHom.ker f)\n[PROOFSTEP]\nsimp only [LinearMap.mem_ker, RingHom.toSemilinearMap_apply, coe_mapRingHom]\n[GOAL]\ncase h\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nf : R →+* S\nx✝ : R[X]\n⊢ Polynomial.map f x✝ = 0 ↔ x✝ ∈ map C (RingHom.ker f)\n[PROOFSTEP]\nrw [mem_map_C_iff, Polynomial.ext_iff]\n[GOAL]\ncase h\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nf : R →+* S\nx✝ : R[X]\n⊢ (∀ (n : ℕ), coeff (Polynomial.map f x✝) n = coeff 0 n) ↔ ∀ (n : ℕ), coeff x✝ n ∈ RingHom.ker f\n[PROOFSTEP]\nsimp_rw [RingHom.mem_ker f, coeff_map, coeff_zero]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\nx : R\n⊢ x ∈ leadingCoeffNth I n ↔ ∃ p, p ∈ I ∧ degree p ≤ ↑n ∧ Polynomial.leadingCoeff p = x\n[PROOFSTEP]\nsimp only [leadingCoeffNth, degreeLE, Submodule.mem_map, lcoeff_apply, Submodule.mem_inf, mem_degreeLE]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\nx : R\n⊢ (∃ y, (degree y ≤ ↑n ∧ y ∈ ofPolynomial I) ∧ coeff y n = x) ↔\n    ∃ p, p ∈ I ∧ degree p ≤ ↑n ∧ Polynomial.leadingCoeff p = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\nx : R\n⊢ (∃ y, (degree y ≤ ↑n ∧ y ∈ ofPolynomial I) ∧ coeff y n = x) →\n    ∃ p, p ∈ I ∧ degree p ≤ ↑n ∧ Polynomial.leadingCoeff p = x\n[PROOFSTEP]\nrintro ⟨p, ⟨hpdeg, hpI⟩, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\np : R[X]\nhpdeg : degree p ≤ ↑n\nhpI : p ∈ ofPolynomial I\n⊢ ∃ p_1, p_1 ∈ I ∧ degree p_1 ≤ ↑n ∧ Polynomial.leadingCoeff p_1 = coeff p n\n[PROOFSTEP]\ncases' lt_or_eq_of_le hpdeg with hpdeg hpdeg\n[GOAL]\ncase mp.intro.intro.intro.inl\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\np : R[X]\nhpdeg✝ : degree p ≤ ↑n\nhpI : p ∈ ofPolynomial I\nhpdeg : degree p < ↑n\n⊢ ∃ p_1, p_1 ∈ I ∧ degree p_1 ≤ ↑n ∧ Polynomial.leadingCoeff p_1 = coeff p n\n[PROOFSTEP]\nrefine' ⟨0, I.zero_mem, bot_le, _⟩\n[GOAL]\ncase mp.intro.intro.intro.inl\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\np : R[X]\nhpdeg✝ : degree p ≤ ↑n\nhpI : p ∈ ofPolynomial I\nhpdeg : degree p < ↑n\n⊢ Polynomial.leadingCoeff 0 = coeff p n\n[PROOFSTEP]\nrw [leadingCoeff_zero, eq_comm]\n[GOAL]\ncase mp.intro.intro.intro.inl\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\np : R[X]\nhpdeg✝ : degree p ≤ ↑n\nhpI : p ∈ ofPolynomial I\nhpdeg : degree p < ↑n\n⊢ coeff p n = 0\n[PROOFSTEP]\nexact coeff_eq_zero_of_degree_lt hpdeg\n[GOAL]\ncase mp.intro.intro.intro.inr\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\np : R[X]\nhpdeg✝ : degree p ≤ ↑n\nhpI : p ∈ ofPolynomial I\nhpdeg : degree p = ↑n\n⊢ ∃ p_1, p_1 ∈ I ∧ degree p_1 ≤ ↑n ∧ Polynomial.leadingCoeff p_1 = coeff p n\n[PROOFSTEP]\nrefine' ⟨p, hpI, le_of_eq hpdeg, _⟩\n[GOAL]\ncase mp.intro.intro.intro.inr\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\np : R[X]\nhpdeg✝ : degree p ≤ ↑n\nhpI : p ∈ ofPolynomial I\nhpdeg : degree p = ↑n\n⊢ Polynomial.leadingCoeff p = coeff p n\n[PROOFSTEP]\nrw [Polynomial.leadingCoeff, natDegree, hpdeg, Nat.cast_withBot, WithBot.unbot'_coe]\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\nx : R\n⊢ (∃ p, p ∈ I ∧ degree p ≤ ↑n ∧ Polynomial.leadingCoeff p = x) →\n    ∃ y, (degree y ≤ ↑n ∧ y ∈ ofPolynomial I) ∧ coeff y n = x\n[PROOFSTEP]\nrintro ⟨p, hpI, hpdeg, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\np : R[X]\nhpI : p ∈ I\nhpdeg : degree p ≤ ↑n\n⊢ ∃ y, (degree y ≤ ↑n ∧ y ∈ ofPolynomial I) ∧ coeff y n = Polynomial.leadingCoeff p\n[PROOFSTEP]\nhave : natDegree p + (n - natDegree p) = n := add_tsub_cancel_of_le (natDegree_le_of_degree_le hpdeg)\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\np : R[X]\nhpI : p ∈ I\nhpdeg : degree p ≤ ↑n\nthis : natDegree p + (n - natDegree p) = n\n⊢ ∃ y, (degree y ≤ ↑n ∧ y ∈ ofPolynomial I) ∧ coeff y n = Polynomial.leadingCoeff p\n[PROOFSTEP]\nrefine' ⟨p * X ^ (n - natDegree p), ⟨_, I.mul_mem_right _ hpI⟩, _⟩\n[GOAL]\ncase mpr.intro.intro.intro.refine'_1\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\np : R[X]\nhpI : p ∈ I\nhpdeg : degree p ≤ ↑n\nthis : natDegree p + (n - natDegree p) = n\n⊢ degree (p * X ^ (n - natDegree p)) ≤ ↑n\n[PROOFSTEP]\napply le_trans (degree_mul_le _ _) _\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\np : R[X]\nhpI : p ∈ I\nhpdeg : degree p ≤ ↑n\nthis : natDegree p + (n - natDegree p) = n\n⊢ degree p + degree (X ^ (n - natDegree p)) ≤ ↑n\n[PROOFSTEP]\napply le_trans (add_le_add degree_le_natDegree (degree_X_pow_le _)) _\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\np : R[X]\nhpI : p ∈ I\nhpdeg : degree p ≤ ↑n\nthis : natDegree p + (n - natDegree p) = n\n⊢ ↑(natDegree p) + ↑(n - natDegree p) ≤ ↑n\n[PROOFSTEP]\nrw [Nat.cast_withBot, Nat.cast_withBot, ← WithBot.coe_add, this, Nat.cast_withBot]\n[GOAL]\ncase mpr.intro.intro.intro.refine'_2\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nn : ℕ\np : R[X]\nhpI : p ∈ I\nhpdeg : degree p ≤ ↑n\nthis : natDegree p + (n - natDegree p) = n\n⊢ coeff (p * X ^ (n - natDegree p)) n = Polynomial.leadingCoeff p\n[PROOFSTEP]\nrw [Polynomial.leadingCoeff, ← coeff_mul_X_pow p (n - natDegree p), this]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nx : R\nx✝ : ∃ p, p ∈ I ∧ degree p ≤ ↑0 ∧ Polynomial.leadingCoeff p = x\np : R[X]\nhpI : p ∈ I\nhpdeg : degree p ≤ ↑0\nhpx : Polynomial.leadingCoeff p = x\n⊢ ↑C x ∈ I\n[PROOFSTEP]\nrwa [← hpx, Polynomial.leadingCoeff, Nat.eq_zero_of_le_zero (natDegree_le_of_degree_le hpdeg), ←\n  eq_C_of_degree_le_zero hpdeg]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nm n : ℕ\nH : m ≤ n\n⊢ leadingCoeffNth I m ≤ leadingCoeffNth I n\n[PROOFSTEP]\nintro r hr\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nm n : ℕ\nH : m ≤ n\nr : R\nhr : r ∈ leadingCoeffNth I m\n⊢ r ∈ leadingCoeffNth I n\n[PROOFSTEP]\nsimp only [SetLike.mem_coe, mem_leadingCoeffNth] at hr ⊢\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nm n : ℕ\nH : m ≤ n\nr : R\nhr : ∃ p, p ∈ I ∧ degree p ≤ ↑m ∧ Polynomial.leadingCoeff p = r\n⊢ ∃ p, p ∈ I ∧ degree p ≤ ↑n ∧ Polynomial.leadingCoeff p = r\n[PROOFSTEP]\nrcases hr with ⟨p, hpI, hpdeg, rfl⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nm n : ℕ\nH : m ≤ n\np : R[X]\nhpI : p ∈ I\nhpdeg : degree p ≤ ↑m\n⊢ ∃ p_1, p_1 ∈ I ∧ degree p_1 ≤ ↑n ∧ Polynomial.leadingCoeff p_1 = Polynomial.leadingCoeff p\n[PROOFSTEP]\nrefine' ⟨p * X ^ (n - m), I.mul_mem_right _ hpI, _, leadingCoeff_mul_X_pow⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nm n : ℕ\nH : m ≤ n\np : R[X]\nhpI : p ∈ I\nhpdeg : degree p ≤ ↑m\n⊢ degree (p * X ^ (n - m)) ≤ ↑n\n[PROOFSTEP]\nrefine' le_trans (degree_mul_le _ _) _\n[GOAL]\ncase intro.intro.intro\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nm n : ℕ\nH : m ≤ n\np : R[X]\nhpI : p ∈ I\nhpdeg : degree p ≤ ↑m\n⊢ degree p + degree (X ^ (n - m)) ≤ ↑n\n[PROOFSTEP]\nrefine' le_trans (add_le_add hpdeg (degree_X_pow_le _)) _\n[GOAL]\ncase intro.intro.intro\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nm n : ℕ\nH : m ≤ n\np : R[X]\nhpI : p ∈ I\nhpdeg : degree p ≤ ↑m\n⊢ ↑m + ↑(n - m) ≤ ↑n\n[PROOFSTEP]\nrw [Nat.cast_withBot, Nat.cast_withBot, ← WithBot.coe_add, add_tsub_cancel_of_le H, Nat.cast_withBot]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nx : R\n⊢ x ∈ leadingCoeff I ↔ ∃ p, p ∈ I ∧ Polynomial.leadingCoeff p = x\n[PROOFSTEP]\nrw [leadingCoeff, Submodule.mem_iSup_of_directed]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nx : R\n⊢ (∃ i, x ∈ leadingCoeffNth I i) ↔ ∃ p, p ∈ I ∧ Polynomial.leadingCoeff p = x\ncase H\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nx : R\n⊢ Directed (fun x x_1 => x ≤ x_1) fun n => leadingCoeffNth I n\n[PROOFSTEP]\nsimp only [mem_leadingCoeffNth]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nx : R\n⊢ (∃ i p, p ∈ I ∧ degree p ≤ ↑i ∧ Polynomial.leadingCoeff p = x) ↔ ∃ p, p ∈ I ∧ Polynomial.leadingCoeff p = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nx : R\n⊢ (∃ i p, p ∈ I ∧ degree p ≤ ↑i ∧ Polynomial.leadingCoeff p = x) → ∃ p, p ∈ I ∧ Polynomial.leadingCoeff p = x\n[PROOFSTEP]\nrintro ⟨i, p, hpI, _, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\ni : ℕ\np : R[X]\nhpI : p ∈ I\nleft✝ : degree p ≤ ↑i\n⊢ ∃ p_1, p_1 ∈ I ∧ Polynomial.leadingCoeff p_1 = Polynomial.leadingCoeff p\n[PROOFSTEP]\nexact ⟨p, hpI, rfl⟩\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nx : R\n⊢ (∃ p, p ∈ I ∧ Polynomial.leadingCoeff p = x) → ∃ i p, p ∈ I ∧ degree p ≤ ↑i ∧ Polynomial.leadingCoeff p = x\n[PROOFSTEP]\nrintro ⟨p, hpI, rfl⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\np : R[X]\nhpI : p ∈ I\n⊢ ∃ i p_1, p_1 ∈ I ∧ degree p_1 ≤ ↑i ∧ Polynomial.leadingCoeff p_1 = Polynomial.leadingCoeff p\n[PROOFSTEP]\nexact ⟨natDegree p, p, hpI, degree_le_natDegree, rfl⟩\n[GOAL]\ncase H\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nx : R\n⊢ Directed (fun x x_1 => x ≤ x_1) fun n => leadingCoeffNth I n\n[PROOFSTEP]\nintro i j\n[GOAL]\ncase H\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI : Ideal R[X]\nx : R\ni j : ℕ\n⊢ ∃ z,\n    (fun x x_1 => x ≤ x_1) ((fun n => leadingCoeffNth I n) i) ((fun n => leadingCoeffNth I n) z) ∧\n      (fun x x_1 => x ≤ x_1) ((fun n => leadingCoeffNth I n) j) ((fun n => leadingCoeffNth I n) z)\n[PROOFSTEP]\nexact ⟨i + j, I.leadingCoeffNth_mono (Nat.le_add_right _ _), I.leadingCoeffNth_mono (Nat.le_add_left _ _)⟩\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI✝ : Ideal R[X]\nι : Type u_2\ns : Finset ι\nf : ι → R[X]\nI : Ideal R\nn : ι → ℕ\nh : ∀ (i : ι), i ∈ s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk : ℕ\n⊢ coeff (Finset.prod s f) k ∈ I ^ (Finset.sum s n - k)\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction with a s ha hs generalizing k\n· rw [sum_empty, prod_empty, coeff_one, zero_tsub, pow_zero, Ideal.one_eq_top]\n  exact Submodule.mem_top\n· rw [sum_insert ha, prod_insert ha, coeff_mul]\n  apply sum_mem\n  rintro ⟨i, j⟩ e\n  obtain rfl : i + j = k := Nat.mem_antidiagonal.mp e\n  apply Ideal.pow_le_pow add_tsub_add_le_tsub_add_tsub\n  rw [pow_add]\n  exact\n    Ideal.mul_mem_mul (h _ (Finset.mem_insert.mpr <| Or.inl rfl) _)\n      (hs (fun i hi k => h _ (Finset.mem_insert.mpr <| Or.inr hi) _) j)\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI✝ : Ideal R[X]\nι : Type u_2\ns : Finset ι\nf : ι → R[X]\nI : Ideal R\nn : ι → ℕ\nh : ∀ (i : ι), i ∈ s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk : ℕ\n⊢ coeff (Finset.prod s f) k ∈ I ^ (Finset.sum s n - k)\n[PROOFSTEP]\ninduction' s using Finset.induction with a s ha hs generalizing k\n[GOAL]\ncase empty\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI✝ : Ideal R[X]\nι : Type u_2\ns : Finset ι\nf : ι → R[X]\nI : Ideal R\nn : ι → ℕ\nh✝ : ∀ (i : ι), i ∈ s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk✝ : ℕ\nh : ∀ (i : ι), i ∈ ∅ → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk : ℕ\n⊢ coeff (Finset.prod ∅ f) k ∈ I ^ (Finset.sum ∅ n - k)\n[PROOFSTEP]\nrw [sum_empty, prod_empty, coeff_one, zero_tsub, pow_zero, Ideal.one_eq_top]\n[GOAL]\ncase empty\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI✝ : Ideal R[X]\nι : Type u_2\ns : Finset ι\nf : ι → R[X]\nI : Ideal R\nn : ι → ℕ\nh✝ : ∀ (i : ι), i ∈ s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk✝ : ℕ\nh : ∀ (i : ι), i ∈ ∅ → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk : ℕ\n⊢ (if 0 = k then 1 else 0) ∈ ⊤\n[PROOFSTEP]\nexact Submodule.mem_top\n[GOAL]\ncase insert\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI✝ : Ideal R[X]\nι : Type u_2\ns✝ : Finset ι\nf : ι → R[X]\nI : Ideal R\nn : ι → ℕ\nh✝ : ∀ (i : ι), i ∈ s✝ → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk✝ : ℕ\na : ι\ns : Finset ι\nha : ¬a ∈ s\nhs :\n  (∀ (i : ι), i ∈ s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)) →\n    ∀ (k : ℕ), coeff (Finset.prod s f) k ∈ I ^ (Finset.sum s n - k)\nh : ∀ (i : ι), i ∈ insert a s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk : ℕ\n⊢ coeff (Finset.prod (insert a s) f) k ∈ I ^ (Finset.sum (insert a s) n - k)\n[PROOFSTEP]\nrw [sum_insert ha, prod_insert ha, coeff_mul]\n[GOAL]\ncase insert\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI✝ : Ideal R[X]\nι : Type u_2\ns✝ : Finset ι\nf : ι → R[X]\nI : Ideal R\nn : ι → ℕ\nh✝ : ∀ (i : ι), i ∈ s✝ → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk✝ : ℕ\na : ι\ns : Finset ι\nha : ¬a ∈ s\nhs :\n  (∀ (i : ι), i ∈ s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)) →\n    ∀ (k : ℕ), coeff (Finset.prod s f) k ∈ I ^ (Finset.sum s n - k)\nh : ∀ (i : ι), i ∈ insert a s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk : ℕ\n⊢ ∑ x in Nat.antidiagonal k, coeff (f a) x.fst * coeff (∏ x in s, f x) x.snd ∈ I ^ (n a + ∑ x in s, n x - k)\n[PROOFSTEP]\napply sum_mem\n[GOAL]\ncase insert.a\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI✝ : Ideal R[X]\nι : Type u_2\ns✝ : Finset ι\nf : ι → R[X]\nI : Ideal R\nn : ι → ℕ\nh✝ : ∀ (i : ι), i ∈ s✝ → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk✝ : ℕ\na : ι\ns : Finset ι\nha : ¬a ∈ s\nhs :\n  (∀ (i : ι), i ∈ s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)) →\n    ∀ (k : ℕ), coeff (Finset.prod s f) k ∈ I ^ (Finset.sum s n - k)\nh : ∀ (i : ι), i ∈ insert a s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk : ℕ\n⊢ ∀ (c : ℕ × ℕ),\n    c ∈ Nat.antidiagonal k → coeff (f a) c.fst * coeff (∏ x in s, f x) c.snd ∈ I ^ (n a + ∑ x in s, n x - k)\n[PROOFSTEP]\nrintro ⟨i, j⟩ e\n[GOAL]\ncase insert.a.mk\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI✝ : Ideal R[X]\nι : Type u_2\ns✝ : Finset ι\nf : ι → R[X]\nI : Ideal R\nn : ι → ℕ\nh✝ : ∀ (i : ι), i ∈ s✝ → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk✝ : ℕ\na : ι\ns : Finset ι\nha : ¬a ∈ s\nhs :\n  (∀ (i : ι), i ∈ s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)) →\n    ∀ (k : ℕ), coeff (Finset.prod s f) k ∈ I ^ (Finset.sum s n - k)\nh : ∀ (i : ι), i ∈ insert a s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk i j : ℕ\ne : (i, j) ∈ Nat.antidiagonal k\n⊢ coeff (f a) (i, j).fst * coeff (∏ x in s, f x) (i, j).snd ∈ I ^ (n a + ∑ x in s, n x - k)\n[PROOFSTEP]\nobtain rfl : i + j = k := Nat.mem_antidiagonal.mp e\n[GOAL]\ncase insert.a.mk\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI✝ : Ideal R[X]\nι : Type u_2\ns✝ : Finset ι\nf : ι → R[X]\nI : Ideal R\nn : ι → ℕ\nh✝ : ∀ (i : ι), i ∈ s✝ → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk : ℕ\na : ι\ns : Finset ι\nha : ¬a ∈ s\nhs :\n  (∀ (i : ι), i ∈ s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)) →\n    ∀ (k : ℕ), coeff (Finset.prod s f) k ∈ I ^ (Finset.sum s n - k)\nh : ∀ (i : ι), i ∈ insert a s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\ni j : ℕ\ne : (i, j) ∈ Nat.antidiagonal (i + j)\n⊢ coeff (f a) (i, j).fst * coeff (∏ x in s, f x) (i, j).snd ∈ I ^ (n a + ∑ x in s, n x - (i + j))\n[PROOFSTEP]\napply Ideal.pow_le_pow add_tsub_add_le_tsub_add_tsub\n[GOAL]\ncase insert.a.mk.a\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI✝ : Ideal R[X]\nι : Type u_2\ns✝ : Finset ι\nf : ι → R[X]\nI : Ideal R\nn : ι → ℕ\nh✝ : ∀ (i : ι), i ∈ s✝ → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk : ℕ\na : ι\ns : Finset ι\nha : ¬a ∈ s\nhs :\n  (∀ (i : ι), i ∈ s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)) →\n    ∀ (k : ℕ), coeff (Finset.prod s f) k ∈ I ^ (Finset.sum s n - k)\nh : ∀ (i : ι), i ∈ insert a s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\ni j : ℕ\ne : (i, j) ∈ Nat.antidiagonal (i + j)\n⊢ coeff (f a) (i, j).fst * coeff (∏ x in s, f x) (i, j).snd ∈ I ^ (n a - i + (∑ x in s, n x - j))\n[PROOFSTEP]\nrw [pow_add]\n[GOAL]\ncase insert.a.mk.a\nR : Type u\nS : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Semiring S\nI✝ : Ideal R[X]\nι : Type u_2\ns✝ : Finset ι\nf : ι → R[X]\nI : Ideal R\nn : ι → ℕ\nh✝ : ∀ (i : ι), i ∈ s✝ → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\nk : ℕ\na : ι\ns : Finset ι\nha : ¬a ∈ s\nhs :\n  (∀ (i : ι), i ∈ s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)) →\n    ∀ (k : ℕ), coeff (Finset.prod s f) k ∈ I ^ (Finset.sum s n - k)\nh : ∀ (i : ι), i ∈ insert a s → ∀ (k : ℕ), coeff (f i) k ∈ I ^ (n i - k)\ni j : ℕ\ne : (i, j) ∈ Nat.antidiagonal (i + j)\n⊢ coeff (f a) (i, j).fst * coeff (∏ x in s, f x) (i, j).snd ∈ I ^ (n a - i) * I ^ (∑ x in s, n x - j)\n[PROOFSTEP]\nexact\n  Ideal.mul_mem_mul (h _ (Finset.mem_insert.mpr <| Or.inl rfl) _)\n    (hs (fun i hi k => h _ (Finset.mem_insert.mpr <| Or.inr hi) _) j)\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\n⊢ ¬IsField R[X]\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\n✝ : Nontrivial R\n⊢ ¬IsField R[X]\n[PROOFSTEP]\nintro hR\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\n✝ : Nontrivial R\nhR : IsField R[X]\n⊢ False\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := hR.mul_inv_cancel X_ne_zero\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Ring R\n✝ : Nontrivial R\nhR : IsField R[X]\np : R[X]\nhp : X * p = 1\n⊢ False\n[PROOFSTEP]\nhave hp0 : p ≠ 0 := right_ne_zero_of_mul_eq_one hp\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Ring R\n✝ : Nontrivial R\nhR : IsField R[X]\np : R[X]\nhp : X * p = 1\nhp0 : p ≠ 0\n⊢ False\n[PROOFSTEP]\nhave := degree_lt_degree_mul_X hp0\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Ring R\n✝ : Nontrivial R\nhR : IsField R[X]\np : R[X]\nhp : X * p = 1\nhp0 : p ≠ 0\nthis : degree p < degree (p * X)\n⊢ False\n[PROOFSTEP]\nrw [← X_mul, congr_arg degree hp, degree_one, Nat.WithBot.lt_zero_iff, degree_eq_bot] at this \n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Ring R\n✝ : Nontrivial R\nhR : IsField R[X]\np : R[X]\nhp : X * p = 1\nhp0 : p ≠ 0\nthis : p = 0\n⊢ False\n[PROOFSTEP]\nexact hp0 this\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\nhR : IsField R\nI : Ideal R[X]\nhI : IsMaximal I\nx : R\nhx : ↑C x ∈ I\n⊢ x = 0\n[PROOFSTEP]\nrefine' Classical.by_contradiction fun hx0 => hI.ne_top ((eq_top_iff_one I).2 _)\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : Ring R\nhR : IsField R\nI : Ideal R[X]\nhI : IsMaximal I\nx : R\nhx : ↑C x ∈ I\nhx0 : ¬x = 0\n⊢ 1 ∈ I\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := hR.mul_inv_cancel hx0\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\ninst✝ : Ring R\nhR : IsField R\nI : Ideal R[X]\nhI : IsMaximal I\nx : R\nhx : ↑C x ∈ I\nhx0 : ¬x = 0\ny : R\nhy : x * y = 1\n⊢ 1 ∈ I\n[PROOFSTEP]\nconvert I.mul_mem_left (C y) hx\n[GOAL]\ncase h.e'_4\nR : Type u\nS : Type u_1\ninst✝ : Ring R\nhR : IsField R\nI : Ideal R[X]\nhI : IsMaximal I\nx : R\nhx : ↑C x ∈ I\nhx0 : ¬x = 0\ny : R\nhy : x * y = 1\n⊢ 1 = ↑C y * ↑C x\n[PROOFSTEP]\nrw [← C.map_mul, hR.mul_comm y x, hy, RingHom.map_one]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\n⊢ IsPrime (map C P) ↔ IsPrime P\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\n⊢ IsPrime (map C P) → IsPrime P\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nH : IsPrime (map C P)\n⊢ IsPrime P\n[PROOFSTEP]\nhave := @comap_isPrime R R[X] (R →+* R[X]) _ _ _ C (map C P) H\n[GOAL]\ncase mp\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nH : IsPrime (map C P)\nthis : IsPrime (comap C (map C P))\n⊢ IsPrime P\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_3\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nH : IsPrime (map C P)\nthis : IsPrime (comap C (map C P))\n⊢ P = comap C (map C P)\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_3.h\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nH : IsPrime (map C P)\nthis : IsPrime (comap C (map C P))\nx : R\n⊢ x ∈ P ↔ x ∈ comap C (map C P)\n[PROOFSTEP]\nsimp only [mem_comap, mem_map_C_iff]\n[GOAL]\ncase h.e'_3.h\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nH : IsPrime (map C P)\nthis : IsPrime (comap C (map C P))\nx : R\n⊢ x ∈ P ↔ ∀ (n : ℕ), coeff (↑C x) n ∈ P\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.e'_3.h.mp\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nH : IsPrime (map C P)\nthis : IsPrime (comap C (map C P))\nx : R\n⊢ x ∈ P → ∀ (n : ℕ), coeff (↑C x) n ∈ P\n[PROOFSTEP]\nrintro h (- | n)\n[GOAL]\ncase h.e'_3.h.mp.zero\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nH : IsPrime (map C P)\nthis : IsPrime (comap C (map C P))\nx : R\nh : x ∈ P\n⊢ coeff (↑C x) Nat.zero ∈ P\n[PROOFSTEP]\nrwa [coeff_C_zero]\n[GOAL]\ncase h.e'_3.h.mp.succ\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nH : IsPrime (map C P)\nthis : IsPrime (comap C (map C P))\nx : R\nh : x ∈ P\nn : ℕ\n⊢ coeff (↑C x) (Nat.succ n) ∈ P\n[PROOFSTEP]\nsimp only [coeff_C_ne_zero (Nat.succ_ne_zero _), Submodule.zero_mem]\n[GOAL]\ncase h.e'_3.h.mpr\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nH : IsPrime (map C P)\nthis : IsPrime (comap C (map C P))\nx : R\n⊢ (∀ (n : ℕ), coeff (↑C x) n ∈ P) → x ∈ P\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.e'_3.h.mpr\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nH : IsPrime (map C P)\nthis : IsPrime (comap C (map C P))\nx : R\nh : ∀ (n : ℕ), coeff (↑C x) n ∈ P\n⊢ x ∈ P\n[PROOFSTEP]\nsimpa only [coeff_C_zero] using h 0\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\n⊢ IsPrime P → IsPrime (map C P)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\n⊢ IsPrime (map C P)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.ne_top'\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\n⊢ map C P ≠ ⊤\n[PROOFSTEP]\nrw [Ne.def, eq_top_iff_one, mem_map_C_iff, not_forall]\n[GOAL]\ncase mpr.ne_top'\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\n⊢ ∃ x, ¬coeff 1 x ∈ P\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\n⊢ ¬coeff 1 0 ∈ P\n[PROOFSTEP]\nrw [coeff_one_zero, ← eq_top_iff_one]\n[GOAL]\ncase h\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\n⊢ ¬P = ⊤\n[PROOFSTEP]\nexact h.1\n[GOAL]\ncase mpr.mem_or_mem'\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\n⊢ ∀ {x y : R[X]}, x * y ∈ map C P → x ∈ map C P ∨ y ∈ map C P\n[PROOFSTEP]\nintro f g\n[GOAL]\ncase mpr.mem_or_mem'\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\n⊢ f * g ∈ map C P → f ∈ map C P ∨ g ∈ map C P\n[PROOFSTEP]\nsimp only [mem_map_C_iff]\n[GOAL]\ncase mpr.mem_or_mem'\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\n⊢ (∀ (n : ℕ), coeff (f * g) n ∈ P) → (∀ (n : ℕ), coeff f n ∈ P) ∨ ∀ (n : ℕ), coeff g n ∈ P\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase mpr.mem_or_mem'\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\n⊢ ((∃ n, ¬coeff f n ∈ P) ∧ ∃ n, ¬coeff g n ∈ P) → ∃ n, ¬coeff (f * g) n ∈ P\n[PROOFSTEP]\nrintro ⟨hf, hg⟩\n[GOAL]\ncase mpr.mem_or_mem'.intro\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\n⊢ ∃ n, ¬coeff (f * g) n ∈ P\n[PROOFSTEP]\nclassical\nlet m := Nat.find hf\nlet n := Nat.find hg\nrefine' ⟨m + n, _⟩\nrw [coeff_mul, ← Finset.insert_erase ((@Finset.Nat.mem_antidiagonal _ (m, n)).mpr rfl),\n  Finset.sum_insert (Finset.not_mem_erase _ _), (P.add_mem_iff_left _).not]\n· apply mt h.2\n  rw [not_or]\n  exact ⟨Nat.find_spec hf, Nat.find_spec hg⟩\napply P.sum_mem\nrintro ⟨i, j⟩ hij\nrw [Finset.mem_erase, Finset.Nat.mem_antidiagonal] at hij \nsimp only [Ne.def, Prod.mk.inj_iff, not_and_or] at hij \nobtain hi | hj : i < m ∨ j < n := by\n  rw [or_iff_not_imp_left, not_lt, le_iff_lt_or_eq]\n  rintro (hmi | rfl)\n  · rw [← not_le]\n    intro hnj\n    exact (add_lt_add_of_lt_of_le hmi hnj).ne hij.2.symm\n  · simp only [eq_self_iff_true, not_true, false_or_iff, add_right_inj, not_and_self_iff] at hij \n· rw [mul_comm]\n  apply P.mul_mem_left\n  exact Classical.not_not.1 (Nat.find_min hf hi)\n· apply P.mul_mem_left\n  exact Classical.not_not.1 (Nat.find_min hg hj)\n[GOAL]\ncase mpr.mem_or_mem'.intro\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\n⊢ ∃ n, ¬coeff (f * g) n ∈ P\n[PROOFSTEP]\nlet m := Nat.find hf\n[GOAL]\ncase mpr.mem_or_mem'.intro\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\n⊢ ∃ n, ¬coeff (f * g) n ∈ P\n[PROOFSTEP]\nlet n := Nat.find hg\n[GOAL]\ncase mpr.mem_or_mem'.intro\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\n⊢ ∃ n, ¬coeff (f * g) n ∈ P\n[PROOFSTEP]\nrefine' ⟨m + n, _⟩\n[GOAL]\ncase mpr.mem_or_mem'.intro\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\n⊢ ¬coeff (f * g) (m + n) ∈ P\n[PROOFSTEP]\nrw [coeff_mul, ← Finset.insert_erase ((@Finset.Nat.mem_antidiagonal _ (m, n)).mpr rfl),\n  Finset.sum_insert (Finset.not_mem_erase _ _), (P.add_mem_iff_left _).not]\n[GOAL]\ncase mpr.mem_or_mem'.intro\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\n⊢ ¬coeff f (m, n).fst * coeff g (m, n).snd ∈ P\n[PROOFSTEP]\napply mt h.2\n[GOAL]\ncase mpr.mem_or_mem'.intro\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\n⊢ ¬(coeff f (m, n).fst ∈ P ∨ coeff g (m, n).snd ∈ P)\n[PROOFSTEP]\nrw [not_or]\n[GOAL]\ncase mpr.mem_or_mem'.intro\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\n⊢ ¬coeff f (m, n).fst ∈ P ∧ ¬coeff g (m, n).snd ∈ P\n[PROOFSTEP]\nexact ⟨Nat.find_spec hf, Nat.find_spec hg⟩\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\n⊢ ∑ x in Finset.erase (Nat.antidiagonal ((m, n).fst + (m, n).snd)) (m, n), coeff f x.fst * coeff g x.snd ∈ P\n[PROOFSTEP]\napply P.sum_mem\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\n⊢ ∀ (c : ℕ × ℕ),\n    c ∈ Finset.erase (Nat.antidiagonal ((m, n).fst + (m, n).snd)) (m, n) → coeff f c.fst * coeff g c.snd ∈ P\n[PROOFSTEP]\nrintro ⟨i, j⟩ hij\n[GOAL]\ncase mk\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (i, j) ∈ Finset.erase (Nat.antidiagonal ((m, n).fst + (m, n).snd)) (m, n)\n⊢ coeff f (i, j).fst * coeff g (i, j).snd ∈ P\n[PROOFSTEP]\nrw [Finset.mem_erase, Finset.Nat.mem_antidiagonal] at hij \n[GOAL]\ncase mk\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (i, j) ≠ (m, n) ∧ (i, j).fst + (i, j).snd = (m, n).fst + (m, n).snd\n⊢ coeff f (i, j).fst * coeff g (i, j).snd ∈ P\n[PROOFSTEP]\nsimp only [Ne.def, Prod.mk.inj_iff, not_and_or] at hij \n[GOAL]\ncase mk\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (¬i = Nat.find hf ∨ ¬j = Nat.find hg) ∧ i + j = Nat.find hf + Nat.find hg\n⊢ coeff f (i, j).fst * coeff g (i, j).snd ∈ P\n[PROOFSTEP]\nobtain hi | hj : i < m ∨ j < n := by\n  rw [or_iff_not_imp_left, not_lt, le_iff_lt_or_eq]\n  rintro (hmi | rfl)\n  · rw [← not_le]\n    intro hnj\n    exact (add_lt_add_of_lt_of_le hmi hnj).ne hij.2.symm\n  · simp only [eq_self_iff_true, not_true, false_or_iff, add_right_inj, not_and_self_iff] at hij \n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (¬i = Nat.find hf ∨ ¬j = Nat.find hg) ∧ i + j = Nat.find hf + Nat.find hg\n⊢ i < m ∨ j < n\n[PROOFSTEP]\nrw [or_iff_not_imp_left, not_lt, le_iff_lt_or_eq]\n[GOAL]\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (¬i = Nat.find hf ∨ ¬j = Nat.find hg) ∧ i + j = Nat.find hf + Nat.find hg\n⊢ m < i ∨ m = i → j < n\n[PROOFSTEP]\nrintro (hmi | rfl)\n[GOAL]\ncase inl\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (¬i = Nat.find hf ∨ ¬j = Nat.find hg) ∧ i + j = Nat.find hf + Nat.find hg\nhmi : m < i\n⊢ j < n\n[PROOFSTEP]\nrw [← not_le]\n[GOAL]\ncase inl\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (¬i = Nat.find hf ∨ ¬j = Nat.find hg) ∧ i + j = Nat.find hf + Nat.find hg\nhmi : m < i\n⊢ ¬n ≤ j\n[PROOFSTEP]\nintro hnj\n[GOAL]\ncase inl\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (¬i = Nat.find hf ∨ ¬j = Nat.find hg) ∧ i + j = Nat.find hf + Nat.find hg\nhmi : m < i\nhnj : n ≤ j\n⊢ False\n[PROOFSTEP]\nexact (add_lt_add_of_lt_of_le hmi hnj).ne hij.2.symm\n[GOAL]\ncase inr\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\nj : ℕ\nhij : (¬m = Nat.find hf ∨ ¬j = Nat.find hg) ∧ m + j = Nat.find hf + Nat.find hg\n⊢ j < n\n[PROOFSTEP]\nsimp only [eq_self_iff_true, not_true, false_or_iff, add_right_inj, not_and_self_iff] at hij \n[GOAL]\ncase mk.inl\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (¬i = Nat.find hf ∨ ¬j = Nat.find hg) ∧ i + j = Nat.find hf + Nat.find hg\nhi : i < m\n⊢ coeff f (i, j).fst * coeff g (i, j).snd ∈ P\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase mk.inl\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (¬i = Nat.find hf ∨ ¬j = Nat.find hg) ∧ i + j = Nat.find hf + Nat.find hg\nhi : i < m\n⊢ coeff g (i, j).snd * coeff f (i, j).fst ∈ P\n[PROOFSTEP]\napply P.mul_mem_left\n[GOAL]\ncase mk.inl.a\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (¬i = Nat.find hf ∨ ¬j = Nat.find hg) ∧ i + j = Nat.find hf + Nat.find hg\nhi : i < m\n⊢ coeff f (i, j).fst ∈ P\n[PROOFSTEP]\nexact Classical.not_not.1 (Nat.find_min hf hi)\n[GOAL]\ncase mk.inr\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (¬i = Nat.find hf ∨ ¬j = Nat.find hg) ∧ i + j = Nat.find hf + Nat.find hg\nhj : j < n\n⊢ coeff f (i, j).fst * coeff g (i, j).snd ∈ P\n[PROOFSTEP]\napply P.mul_mem_left\n[GOAL]\ncase mk.inr.a\nR : Type u\nS : Type u_1\ninst✝ : CommRing R\nP : Ideal R\nh : IsPrime P\nf g : R[X]\nhf : ∃ n, ¬coeff f n ∈ P\nhg : ∃ n, ¬coeff g n ∈ P\nm : ℕ := Nat.find hf\nn : ℕ := Nat.find hg\ni j : ℕ\nhij : (¬i = Nat.find hf ∨ ¬j = Nat.find hg) ∧ i + j = Nat.find hf + Nat.find hg\nhj : j < n\n⊢ coeff g (i, j).snd ∈ P\n[PROOFSTEP]\nexact Classical.not_not.1 (Nat.find_min hg hj)\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\n⊢ Prime r → Prime (↑C r)\n[PROOFSTEP]\nintro hr\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\n⊢ Prime (↑C r)\n[PROOFSTEP]\nhave := hr.1\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\nthis : r ≠ 0\n⊢ Prime (↑C r)\n[PROOFSTEP]\nrw [← Ideal.span_singleton_prime] at hr ⊢\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Ideal.IsPrime (Ideal.span {r})\nthis : r ≠ 0\n⊢ Ideal.IsPrime (Ideal.span {↑C r})\n[PROOFSTEP]\nrw [← Set.image_singleton, ← Ideal.map_span]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Ideal.IsPrime (Ideal.span {r})\nthis : r ≠ 0\n⊢ Ideal.IsPrime (Ideal.map C (Ideal.span {r}))\n[PROOFSTEP]\napply Ideal.isPrime_map_C_of_isPrime hr\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Ideal.IsPrime (Ideal.span {r})\nthis : r ≠ 0\n⊢ ↑C r ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Ideal.IsPrime (Ideal.span {r})\nthis : r ≠ 0\nh : ↑C r = 0\n⊢ False\n[PROOFSTEP]\napply (this (C_eq_zero.mp h))\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\nthis : r ≠ 0\n⊢ r ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\n⊢ Prime (↑C r) ↔ Prime r\n[PROOFSTEP]\nlet f (d : ℕ) := (finSuccEquiv R d).symm.toMulEquiv\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n⊢ Prime (↑C r) ↔ Prime r\n[PROOFSTEP]\nlet _coe' (d : ℕ) :\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R)\n    (fun _ => (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R) :=\n  inferInstance\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\n⊢ Prime (↑C r) ↔ Prime r\n[PROOFSTEP]\nhave that (d : ℕ) : @C R (Fin (d + 1)) _ r = (f d) (Polynomial.C (@C R (Fin d) _ r)) := by\n  rw [← finSuccEquiv_comp_C_eq_C]; rfl\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\nd : ℕ\n⊢ ↑C r = ↑(f d) (↑Polynomial.C (↑C r))\n[PROOFSTEP]\nrw [← finSuccEquiv_comp_C_eq_C]\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\nd : ℕ\n⊢ ↑(RingHom.comp (↑(AlgEquiv.symm (finSuccEquiv R d))) (RingHom.comp Polynomial.C C)) r = ↑(f d) (↑Polynomial.C (↑C r))\n[PROOFSTEP]\nrfl\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\nthat : ∀ (d : ℕ), ↑C r = ↑(f d) (↑Polynomial.C (↑C r))\n⊢ Prime (↑C r) ↔ Prime r\n[PROOFSTEP]\nrw [(renameEquiv R (Fintype.equivFin σ)).toMulEquiv.prime_iff]\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\nthat : ∀ (d : ℕ), ↑C r = ↑(f d) (↑Polynomial.C (↑C r))\n⊢ Prime (↑(AlgEquiv.toMulEquiv (renameEquiv R (Fintype.equivFin σ))) (↑C r)) ↔ Prime r\n[PROOFSTEP]\nconvert_to Prime (C r) ↔ _\n[GOAL]\ncase h.e'_1.a\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\nthat : ∀ (d : ℕ), ↑C r = ↑(f d) (↑Polynomial.C (↑C r))\n⊢ Prime (↑(AlgEquiv.toMulEquiv (renameEquiv R (Fintype.equivFin σ))) (↑C r)) ↔ Prime (↑C r)\n[PROOFSTEP]\ncongr!\n[GOAL]\ncase h.e'_1.a.a.h.e'_3\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\nthat : ∀ (d : ℕ), ↑C r = ↑(f d) (↑Polynomial.C (↑C r))\n⊢ ↑(AlgEquiv.toMulEquiv (renameEquiv R (Fintype.equivFin σ))) (↑C r) = ↑C r\n[PROOFSTEP]\napply rename_C\n[GOAL]\ncase convert_3\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\nthat : ∀ (d : ℕ), ↑C r = ↑(f d) (↑Polynomial.C (↑C r))\n⊢ Prime (↑C r) ↔ Prime r\n[PROOFSTEP]\nsymm\n[GOAL]\ncase convert_3\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\nthat : ∀ (d : ℕ), ↑C r = ↑(f d) (↑Polynomial.C (↑C r))\n⊢ Prime r ↔ Prime (↑C r)\n[PROOFSTEP]\ninduction' Fintype.card σ with d hd\n[GOAL]\ncase convert_3.zero\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\nthat : ∀ (d : ℕ), ↑C r = ↑(f d) (↑Polynomial.C (↑C r))\n⊢ Prime r ↔ Prime (↑C r)\n[PROOFSTEP]\nexact (isEmptyAlgEquiv R (Fin 0)).toMulEquiv.symm.prime_iff\n[GOAL]\ncase convert_3.succ\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\nthat : ∀ (d : ℕ), ↑C r = ↑(f d) (↑Polynomial.C (↑C r))\nd : ℕ\nhd : Prime r ↔ Prime (↑C r)\n⊢ Prime r ↔ Prime (↑C r)\n[PROOFSTEP]\nrw [hd, ← Polynomial.prime_C_iff]\n[GOAL]\ncase convert_3.succ\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\nthat : ∀ (d : ℕ), ↑C r = ↑(f d) (↑Polynomial.C (↑C r))\nd : ℕ\nhd : Prime r ↔ Prime (↑C r)\n⊢ Prime (↑Polynomial.C (↑C r)) ↔ Prime (↑C r)\n[PROOFSTEP]\nrw [that d]\n  -- Porting note: change ?_ to _ and watch it time out\n[GOAL]\ncase convert_3.succ\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nr✝ : R✝\nR : Type u\nσ : Type v\nr : R\ninst✝¹ : CommRing R\ninst✝ : Fintype σ\nf : (d : ℕ) → (MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R :=\n  fun d => AlgEquiv.toMulEquiv (AlgEquiv.symm (finSuccEquiv R d))\n_coe' : (d : ℕ) →\n  CoeFun ((MvPolynomial (Fin d) R)[X] ≃* MvPolynomial (Fin (d + 1)) R) fun x =>\n    (MvPolynomial (Fin d) R)[X] → MvPolynomial (Fin (d + 1)) R :=\n  fun d => inferInstance\nthat : ∀ (d : ℕ), ↑C r = ↑(f d) (↑Polynomial.C (↑C r))\nd : ℕ\nhd : Prime r ↔ Prime (↑C r)\n⊢ Prime (↑Polynomial.C (↑C r)) ↔ Prime (↑(f d) (↑Polynomial.C (↑C r)))\n[PROOFSTEP]\nrefine\n  @MulEquiv.prime_iff (MvPolynomial (Fin d) R)[X] (MvPolynomial (Fin (d + 1)) R) ?_ ?_ (Polynomial.C (C r))\n    ?_\n      -- Porting note: @'s help with multiple timeouts. It seems like there are too many things to unify\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\nh : ↑C r = 0\n⊢ r = 0\n[PROOFSTEP]\nrw [← C_inj, h]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\nh : ↑C r = 0\n⊢ 0 = ↑C 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\nh : IsUnit (↑C r)\n⊢ IsUnit r\n[PROOFSTEP]\nrw [← constantCoeff_C _ r]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\nh : IsUnit (↑C r)\n⊢ IsUnit (↑constantCoeff (↑C r))\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\nh : IsUnit (↑C r)\n⊢ Type ?u.516051\n[PROOFSTEP]\nexact h.map _\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\na b : (fun x => MvPolynomial σ R) r\nhd : ↑C r ∣ a * b\n⊢ ↑C r ∣ a ∨ ↑C r ∣ b\n[PROOFSTEP]\nobtain ⟨s, a', b', rfl, rfl⟩ := exists_finset_rename₂ a b\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\ns : Finset σ\na' b' : MvPolynomial { x // x ∈ s } R\nhd : ↑C r ∣ ↑(rename Subtype.val) a' * ↑(rename Subtype.val) b'\n⊢ ↑C r ∣ ↑(rename Subtype.val) a' ∨ ↑C r ∣ ↑(rename Subtype.val) b'\n[PROOFSTEP]\nrw [← algebraMap_eq] at hd \n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\ns : Finset σ\na' b' : MvPolynomial { x // x ∈ s } R\nhd : ↑(algebraMap R (MvPolynomial σ R)) r ∣ ↑(rename Subtype.val) a' * ↑(rename Subtype.val) b'\n⊢ ↑C r ∣ ↑(rename Subtype.val) a' ∨ ↑C r ∣ ↑(rename Subtype.val) b'\n[PROOFSTEP]\nhave := (@killCompl s σ R _ ((↑) : s → σ) Subtype.coe_injective).toRingHom.map_dvd hd\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\ns : Finset σ\na' b' : MvPolynomial { x // x ∈ s } R\nhd : ↑(algebraMap R (MvPolynomial σ R)) r ∣ ↑(rename Subtype.val) a' * ↑(rename Subtype.val) b'\nthis :\n  ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(algebraMap R (MvPolynomial σ R)) r) ∣\n    ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(rename Subtype.val) a' * ↑(rename Subtype.val) b')\n⊢ ↑C r ∣ ↑(rename Subtype.val) a' ∨ ↑C r ∣ ↑(rename Subtype.val) b'\n[PROOFSTEP]\nhave : algebraMap R _ r ∣ a' * b' := by convert this <;> simp\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\ns : Finset σ\na' b' : MvPolynomial { x // x ∈ s } R\nhd : ↑(algebraMap R (MvPolynomial σ R)) r ∣ ↑(rename Subtype.val) a' * ↑(rename Subtype.val) b'\nthis :\n  ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(algebraMap R (MvPolynomial σ R)) r) ∣\n    ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(rename Subtype.val) a' * ↑(rename Subtype.val) b')\n⊢ ↑(algebraMap R (MvPolynomial { x // x ∈ s } R)) r ∣ a' * b'\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_3\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\ns : Finset σ\na' b' : MvPolynomial { x // x ∈ s } R\nhd : ↑(algebraMap R (MvPolynomial σ R)) r ∣ ↑(rename Subtype.val) a' * ↑(rename Subtype.val) b'\nthis :\n  ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(algebraMap R (MvPolynomial σ R)) r) ∣\n    ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(rename Subtype.val) a' * ↑(rename Subtype.val) b')\n⊢ ↑(algebraMap R (MvPolynomial { x // x ∈ s } R)) r =\n    ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(algebraMap R (MvPolynomial σ R)) r)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_4\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\ns : Finset σ\na' b' : MvPolynomial { x // x ∈ s } R\nhd : ↑(algebraMap R (MvPolynomial σ R)) r ∣ ↑(rename Subtype.val) a' * ↑(rename Subtype.val) b'\nthis :\n  ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(algebraMap R (MvPolynomial σ R)) r) ∣\n    ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(rename Subtype.val) a' * ↑(rename Subtype.val) b')\n⊢ a' * b' = ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(rename Subtype.val) a' * ↑(rename Subtype.val) b')\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\ns : Finset σ\na' b' : MvPolynomial { x // x ∈ s } R\nhd : ↑(algebraMap R (MvPolynomial σ R)) r ∣ ↑(rename Subtype.val) a' * ↑(rename Subtype.val) b'\nthis✝ :\n  ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(algebraMap R (MvPolynomial σ R)) r) ∣\n    ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(rename Subtype.val) a' * ↑(rename Subtype.val) b')\nthis : ↑(algebraMap R (MvPolynomial { x // x ∈ s } R)) r ∣ a' * b'\n⊢ ↑C r ∣ ↑(rename Subtype.val) a' ∨ ↑C r ∣ ↑(rename Subtype.val) b'\n[PROOFSTEP]\nrw [← rename_C ((↑) : s → σ)]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\ns : Finset σ\na' b' : MvPolynomial { x // x ∈ s } R\nhd : ↑(algebraMap R (MvPolynomial σ R)) r ∣ ↑(rename Subtype.val) a' * ↑(rename Subtype.val) b'\nthis✝ :\n  ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(algebraMap R (MvPolynomial σ R)) r) ∣\n    ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(rename Subtype.val) a' * ↑(rename Subtype.val) b')\nthis : ↑(algebraMap R (MvPolynomial { x // x ∈ s } R)) r ∣ a' * b'\n⊢ ↑(rename Subtype.val) (↑C r) ∣ ↑(rename Subtype.val) a' ∨ ↑(rename Subtype.val) (↑C r) ∣ ↑(rename Subtype.val) b'\n[PROOFSTEP]\nlet f := @AlgHom.toRingHom R (MvPolynomial s R) (MvPolynomial σ R) _ _ _ _ _ (@rename _ _ R _ ((↑) : s → σ))\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\nhr : Prime r\ns : Finset σ\na' b' : MvPolynomial { x // x ∈ s } R\nhd : ↑(algebraMap R (MvPolynomial σ R)) r ∣ ↑(rename Subtype.val) a' * ↑(rename Subtype.val) b'\nthis✝ :\n  ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(algebraMap R (MvPolynomial σ R)) r) ∣\n    ↑↑(killCompl (_ : Function.Injective fun a => ↑a)) (↑(rename Subtype.val) a' * ↑(rename Subtype.val) b')\nthis : ↑(algebraMap R (MvPolynomial { x // x ∈ s } R)) r ∣ a' * b'\nf : MvPolynomial { x // x ∈ s } R →+* MvPolynomial σ R := ↑(rename Subtype.val)\n⊢ ↑(rename Subtype.val) (↑C r) ∣ ↑(rename Subtype.val) a' ∨ ↑(rename Subtype.val) (↑C r) ∣ ↑(rename Subtype.val) b'\n[PROOFSTEP]\nexact (((prime_C_iff_of_fintype s).2 hr).2.2 a' b' this).imp f.map_dvd f.map_dvd\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\n⊢ Prime (↑(rename Subtype.val) p) ↔ Prime p\n[PROOFSTEP]\nclassical\nsymm\nlet eqv := (sumAlgEquiv R (↥sᶜ) s).symm.trans (renameEquiv R <| (Equiv.sumComm (↥sᶜ) s).trans <| Equiv.Set.sumCompl s)\nhave : (rename (↑)).toRingHom = eqv.toAlgHom.toRingHom.comp C :=\n  by\n  apply ringHom_ext\n  · intro\n    dsimp\n    erw [iterToSum_C_C, rename_C, rename_C]\n  · intro\n    dsimp\n    erw [iterToSum_C_X, rename_X, rename_X]\n    rfl\nrw [← @prime_C_iff (MvPolynomial s R) (↥sᶜ) instCommRingMvPolynomial p]\nrw [@MulEquiv.prime_iff (MvPolynomial ↑sᶜ (MvPolynomial (↑s) R)) (MvPolynomial σ R) (_) (_)]\nrotate_left\nexact eqv.toMulEquiv\nconvert Iff.rfl\napply RingHom.congr_fun this p\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\n⊢ Prime (↑(rename Subtype.val) p) ↔ Prime p\n[PROOFSTEP]\nsymm\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\n⊢ Prime p ↔ Prime (↑(rename Subtype.val) p)\n[PROOFSTEP]\nlet eqv := (sumAlgEquiv R (↥sᶜ) s).symm.trans (renameEquiv R <| (Equiv.sumComm (↥sᶜ) s).trans <| Equiv.Set.sumCompl s)\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\n⊢ Prime p ↔ Prime (↑(rename Subtype.val) p)\n[PROOFSTEP]\nhave : (rename (↑)).toRingHom = eqv.toAlgHom.toRingHom.comp C :=\n  by\n  apply ringHom_ext\n  · intro\n    dsimp\n    erw [iterToSum_C_C, rename_C, rename_C]\n  · intro\n    dsimp\n    erw [iterToSum_C_X, rename_X, rename_X]\n    rfl\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\n⊢ ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C\n[PROOFSTEP]\napply ringHom_ext\n[GOAL]\ncase hC\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\n⊢ ∀ (r : R), ↑↑(rename Subtype.val) (↑C r) = ↑(RingHom.comp (↑↑eqv) C) (↑C r)\n[PROOFSTEP]\nintro\n[GOAL]\ncase hC\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\nr✝ : R\n⊢ ↑↑(rename Subtype.val) (↑C r✝) = ↑(RingHom.comp (↑↑eqv) C) (↑C r✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase hC\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\nr✝ : R\n⊢ ↑(rename Subtype.val) (↑C r✝) =\n    ↑(rename (↑(Equiv.Set.sumCompl s) ∘ Sum.swap)) (↑(AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s)) (↑C (↑C r✝)))\n[PROOFSTEP]\nerw [iterToSum_C_C, rename_C, rename_C]\n[GOAL]\ncase hX\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\n⊢ ∀ (i : ↑s), ↑↑(rename Subtype.val) (X i) = ↑(RingHom.comp (↑↑eqv) C) (X i)\n[PROOFSTEP]\nintro\n[GOAL]\ncase hX\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\ni✝ : ↑s\n⊢ ↑↑(rename Subtype.val) (X i✝) = ↑(RingHom.comp (↑↑eqv) C) (X i✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase hX\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\ni✝ : ↑s\n⊢ ↑(rename Subtype.val) (X i✝) =\n    ↑(rename (↑(Equiv.Set.sumCompl s) ∘ Sum.swap)) (↑(AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s)) (↑C (X i✝)))\n[PROOFSTEP]\nerw [iterToSum_C_X, rename_X, rename_X]\n[GOAL]\ncase hX\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\ni✝ : ↑s\n⊢ X ↑i✝ = X ((↑(Equiv.Set.sumCompl s) ∘ Sum.swap) (Sum.inr i✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\nthis : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C\n⊢ Prime p ↔ Prime (↑(rename Subtype.val) p)\n[PROOFSTEP]\nrw [← @prime_C_iff (MvPolynomial s R) (↥sᶜ) instCommRingMvPolynomial p]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\nthis : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C\n⊢ Prime (↑C p) ↔ Prime (↑(rename Subtype.val) p)\n[PROOFSTEP]\nrw [@MulEquiv.prime_iff (MvPolynomial ↑sᶜ (MvPolynomial (↑s) R)) (MvPolynomial σ R) (_) (_)]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\nthis : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C\n⊢ Prime (↑?e (↑C p)) ↔ Prime (↑(rename Subtype.val) p)\ncase e\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\nthis : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C\n⊢ MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃* MvPolynomial σ R\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\nthis : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C\n⊢ CommMonoidWithZero (MvPolynomial σ R)\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase e\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\nthis : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C\n⊢ MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃* MvPolynomial σ R\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\nthis : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C\n⊢ CommMonoidWithZero (MvPolynomial σ R)\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\nthis : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C\n⊢ Prime (↑?e (↑C p)) ↔ Prime (↑(rename Subtype.val) p)\n[PROOFSTEP]\nexact eqv.toMulEquiv\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\nthis : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C\n⊢ Prime (↑(AlgEquiv.toMulEquiv eqv) (↑C p)) ↔ Prime (↑(rename Subtype.val) p)\n[PROOFSTEP]\nconvert Iff.rfl\n[GOAL]\ncase h.e'_2.h.e'_3\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nr : R\ns : Set σ\np : MvPolynomial (↑s) R\neqv : MvPolynomial (↑sᶜ) (MvPolynomial (↑s) R) ≃ₐ[R] MvPolynomial σ R :=\n  AlgEquiv.trans (AlgEquiv.symm (sumAlgEquiv R ↑sᶜ ↑s))\n    (renameEquiv R ((Equiv.sumComm ↑sᶜ ↑s).trans (Equiv.Set.sumCompl s)))\nthis : ↑(rename Subtype.val) = RingHom.comp (↑↑eqv) C\n⊢ ↑(rename Subtype.val) p = ↑(AlgEquiv.toMulEquiv eqv) (↑C p)\n[PROOFSTEP]\napply RingHom.congr_fun this p\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\n⊢ WellFounded DvdNotUnit\n[PROOFSTEP]\nclassical\nrefine'\n  RelHomClass.wellFounded\n    (⟨fun p : R[X] => ((if p = 0 then ⊤ else ↑p.degree : WithTop (WithBot ℕ)), p.leadingCoeff), _⟩ :\n      DvdNotUnit →r Prod.Lex (· < ·) DvdNotUnit)\n    (WellFounded.prod_lex (WithTop.wellFounded_lt <| WithBot.wellFounded_lt Nat.lt_wfRel.wf)\n      ‹WfDvdMonoid R›.wellFounded_dvdNotUnit)\nrintro a b ⟨ane0, ⟨c, ⟨not_unit_c, rfl⟩⟩⟩\ndsimp\nrw [Polynomial.degree_mul, if_neg ane0]\nsplit_ifs with hac\n· rw [hac, Polynomial.leadingCoeff_zero]\n  apply Prod.Lex.left\n  exact lt_of_le_of_ne le_top WithTop.coe_ne_top\nhave cne0 : c ≠ 0 := right_ne_zero_of_mul hac\nsimp only [cne0, ane0, Polynomial.leadingCoeff_mul]\nby_cases hdeg : c.degree = 0\n· simp only [hdeg, add_zero]\n  refine' Prod.Lex.right _ ⟨_, ⟨c.leadingCoeff, fun unit_c => not_unit_c _, rfl⟩⟩\n  · rwa [Ne, Polynomial.leadingCoeff_eq_zero]\n  rw [Polynomial.isUnit_iff, Polynomial.eq_C_of_degree_eq_zero hdeg]\n  use c.leadingCoeff, unit_c\n  rw [Polynomial.leadingCoeff, Polynomial.natDegree_eq_of_degree_eq_some hdeg]; rfl\n· apply Prod.Lex.left\n  rw [Polynomial.degree_eq_natDegree cne0] at *\n  rw [WithTop.coe_lt_coe, Polynomial.degree_eq_natDegree ane0, Nat.cast_withBot, Nat.cast_withBot, ← WithBot.coe_add,\n    WithBot.coe_lt_coe]\n  exact lt_add_of_pos_right _ (Nat.pos_of_ne_zero fun h => hdeg (h.symm ▸ WithBot.coe_zero))\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\n⊢ WellFounded DvdNotUnit\n[PROOFSTEP]\nrefine'\n  RelHomClass.wellFounded\n    (⟨fun p : R[X] => ((if p = 0 then ⊤ else ↑p.degree : WithTop (WithBot ℕ)), p.leadingCoeff), _⟩ :\n      DvdNotUnit →r Prod.Lex (· < ·) DvdNotUnit)\n    (WellFounded.prod_lex (WithTop.wellFounded_lt <| WithBot.wellFounded_lt Nat.lt_wfRel.wf)\n      ‹WfDvdMonoid R›.wellFounded_dvdNotUnit)\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\n⊢ ∀ {a b : R[X]},\n    DvdNotUnit a b →\n      Prod.Lex (fun x x_1 => x < x_1) DvdNotUnit ((fun p => (if p = 0 then ⊤ else ↑(degree p), leadingCoeff p)) a)\n        ((fun p => (if p = 0 then ⊤ else ↑(degree p), leadingCoeff p)) b)\n[PROOFSTEP]\nrintro a b ⟨ane0, ⟨c, ⟨not_unit_c, rfl⟩⟩⟩\n[GOAL]\ncase intro.intro.intro\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\n⊢ Prod.Lex (fun x x_1 => x < x_1) DvdNotUnit ((fun p => (if p = 0 then ⊤ else ↑(degree p), leadingCoeff p)) a)\n    ((fun p => (if p = 0 then ⊤ else ↑(degree p), leadingCoeff p)) (a * c))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro.intro\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\n⊢ Prod.Lex (fun x x_1 => x < x_1) DvdNotUnit (if a = 0 then ⊤ else ↑(degree a), leadingCoeff a)\n    (if a * c = 0 then ⊤ else ↑(degree (a * c)), leadingCoeff (a * c))\n[PROOFSTEP]\nrw [Polynomial.degree_mul, if_neg ane0]\n[GOAL]\ncase intro.intro.intro\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\n⊢ Prod.Lex (fun x x_1 => x < x_1) DvdNotUnit (↑(degree a), leadingCoeff a)\n    (if a * c = 0 then ⊤ else ↑(degree a + degree c), leadingCoeff (a * c))\n[PROOFSTEP]\nsplit_ifs with hac\n[GOAL]\ncase pos\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : a * c = 0\n⊢ Prod.Lex (fun x x_1 => x < x_1) DvdNotUnit (↑(degree a), leadingCoeff a) (⊤, leadingCoeff (a * c))\n[PROOFSTEP]\nrw [hac, Polynomial.leadingCoeff_zero]\n[GOAL]\ncase pos\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : a * c = 0\n⊢ Prod.Lex (fun x x_1 => x < x_1) DvdNotUnit (↑(degree a), leadingCoeff a) (⊤, 0)\n[PROOFSTEP]\napply Prod.Lex.left\n[GOAL]\ncase pos.h\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : a * c = 0\n⊢ ↑(degree a) < ⊤\n[PROOFSTEP]\nexact lt_of_le_of_ne le_top WithTop.coe_ne_top\n[GOAL]\ncase neg\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\n⊢ Prod.Lex (fun x x_1 => x < x_1) DvdNotUnit (↑(degree a), leadingCoeff a)\n    (↑(degree a + degree c), leadingCoeff (a * c))\n[PROOFSTEP]\nhave cne0 : c ≠ 0 := right_ne_zero_of_mul hac\n[GOAL]\ncase neg\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\n⊢ Prod.Lex (fun x x_1 => x < x_1) DvdNotUnit (↑(degree a), leadingCoeff a)\n    (↑(degree a + degree c), leadingCoeff (a * c))\n[PROOFSTEP]\nsimp only [cne0, ane0, Polynomial.leadingCoeff_mul]\n[GOAL]\ncase neg\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\n⊢ Prod.Lex (fun x x_1 => x < x_1) DvdNotUnit (↑(degree a), leadingCoeff a)\n    (↑(degree a + degree c), leadingCoeff a * leadingCoeff c)\n[PROOFSTEP]\nby_cases hdeg : c.degree = 0\n[GOAL]\ncase pos\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\nhdeg : degree c = 0\n⊢ Prod.Lex (fun x x_1 => x < x_1) DvdNotUnit (↑(degree a), leadingCoeff a)\n    (↑(degree a + degree c), leadingCoeff a * leadingCoeff c)\n[PROOFSTEP]\nsimp only [hdeg, add_zero]\n[GOAL]\ncase pos\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\nhdeg : degree c = 0\n⊢ Prod.Lex (fun x x_1 => x < x_1) DvdNotUnit (↑(degree a), leadingCoeff a)\n    (↑(degree a), leadingCoeff a * leadingCoeff c)\n[PROOFSTEP]\nrefine' Prod.Lex.right _ ⟨_, ⟨c.leadingCoeff, fun unit_c => not_unit_c _, rfl⟩⟩\n[GOAL]\ncase pos.refine'_1\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\nhdeg : degree c = 0\n⊢ leadingCoeff a ≠ 0\n[PROOFSTEP]\nrwa [Ne, Polynomial.leadingCoeff_eq_zero]\n[GOAL]\ncase pos.refine'_2\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\nhdeg : degree c = 0\nunit_c : IsUnit (leadingCoeff c)\n⊢ IsUnit c\n[PROOFSTEP]\nrw [Polynomial.isUnit_iff, Polynomial.eq_C_of_degree_eq_zero hdeg]\n[GOAL]\ncase pos.refine'_2\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\nhdeg : degree c = 0\nunit_c : IsUnit (leadingCoeff c)\n⊢ ∃ r, IsUnit r ∧ ↑C r = ↑C (coeff c 0)\n[PROOFSTEP]\nuse c.leadingCoeff, unit_c\n[GOAL]\ncase right\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\nhdeg : degree c = 0\nunit_c : IsUnit (leadingCoeff c)\n⊢ ↑C (leadingCoeff c) = ↑C (coeff c 0)\n[PROOFSTEP]\nrw [Polynomial.leadingCoeff, Polynomial.natDegree_eq_of_degree_eq_some hdeg]\n[GOAL]\ncase right\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\nhdeg : degree c = 0\nunit_c : IsUnit (leadingCoeff c)\n⊢ ↑C (coeff c Zero.zero) = ↑C (coeff c 0)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\nhdeg : ¬degree c = 0\n⊢ Prod.Lex (fun x x_1 => x < x_1) DvdNotUnit (↑(degree a), leadingCoeff a)\n    (↑(degree a + degree c), leadingCoeff a * leadingCoeff c)\n[PROOFSTEP]\napply Prod.Lex.left\n[GOAL]\ncase neg.h\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\nhdeg : ¬degree c = 0\n⊢ ↑(degree a) < ↑(degree a + degree c)\n[PROOFSTEP]\nrw [Polynomial.degree_eq_natDegree cne0] at *\n[GOAL]\ncase neg.h\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\nhdeg : ¬↑(natDegree c) = 0\n⊢ ↑(degree a) < ↑(degree a + ↑(natDegree c))\n[PROOFSTEP]\nrw [WithTop.coe_lt_coe, Polynomial.degree_eq_natDegree ane0, Nat.cast_withBot, Nat.cast_withBot, ← WithBot.coe_add,\n  WithBot.coe_lt_coe]\n[GOAL]\ncase neg.h\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\na : R[X]\nane0 : a ≠ 0\nc : R[X]\nnot_unit_c : ¬IsUnit c\nhac : ¬a * c = 0\ncne0 : c ≠ 0\nhdeg : ¬↑(natDegree c) = 0\n⊢ natDegree a < natDegree a + natDegree c\n[PROOFSTEP]\nexact lt_add_of_pos_right _ (Nat.pos_of_ne_zero fun h => hdeg (h.symm ▸ WithBot.coe_zero))\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\ninst : IsNoetherianRing R\nI : Ideal R[X]\n⊢ IsNoetherian R R\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nk : ℕ\nh : N < k\nx : R\nhx : x ∈ Ideal.leadingCoeffNth I k\nhxm : ¬x ∈ M\nthis : IsNoetherian R R\n⊢ ¬M < Ideal.leadingCoeffNth I k\n[PROOFSTEP]\nrefine' WellFounded.not_lt_min (wellFounded_submodule_gt R R) _ _ _\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nk : ℕ\nh : N < k\nx : R\nhx : x ∈ Ideal.leadingCoeffNth I k\nhxm : ¬x ∈ M\nthis : IsNoetherian R R\n⊢ Ideal.leadingCoeffNth I k ∈ Set.range (Ideal.leadingCoeffNth I)\n[PROOFSTEP]\nexact ⟨k, rfl⟩\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\n⊢ I ≤ Submodule.span R[X] ↑s\n[PROOFSTEP]\nhave : Submodule.span R[X] ↑s = Ideal.span ↑s := by rfl\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\n⊢ Submodule.span R[X] ↑s = Ideal.span ↑s\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\n⊢ I ≤ Submodule.span R[X] ↑s\n[PROOFSTEP]\nrw [this]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\n⊢ I ≤ Ideal.span ↑s\n[PROOFSTEP]\nintro p hp\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np : R[X]\nhp : p ∈ I\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\ngeneralize hn : p.natDegree = k\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nk : ℕ\nhn : natDegree p = k\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\ninduction' k using Nat.strong_induction_on with k ih generalizing p\n[GOAL]\ncase h\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\ncases' le_or_lt k N with h h\n[GOAL]\ncase h.inl\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : k ≤ N\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nsubst k\n[GOAL]\ncase h.inl\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk : ℕ\nhn : natDegree p✝ = k\np : R[X]\nhp : p ∈ I\nih : ∀ (m : ℕ), m < natDegree p → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\nh : natDegree p ≤ N\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nrefine' hs2 ⟨Polynomial.mem_degreeLE.2 (le_trans Polynomial.degree_le_natDegree <| WithBot.coe_le_coe.2 h), hp⟩\n[GOAL]\ncase h.inr\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nhave hp0 : p ≠ 0 := by\n  rintro rfl\n  cases hn\n  exact Nat.not_lt_zero _ h\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\n⊢ p ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np : R[X]\nhp✝ : p ∈ I\nk✝ : ℕ\nhn✝ : natDegree p = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\nh : N < k\nhp : 0 ∈ I\nhn : natDegree 0 = k\n⊢ False\n[PROOFSTEP]\ncases hn\n[GOAL]\ncase refl\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np : R[X]\nhp✝ : p ∈ I\nk : ℕ\nhn : natDegree p = k\nhp : 0 ∈ I\nih : ∀ (m : ℕ), m < natDegree 0 → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\nh : N < natDegree 0\n⊢ False\n[PROOFSTEP]\nexact Nat.not_lt_zero _ h\n[GOAL]\ncase h.inr\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nhave : (0 : R) ≠ 1 := by\n  intro h\n  apply hp0\n  ext i\n  refine' (mul_one _).symm.trans _\n  rw [← h, mul_zero]\n  rfl\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\n⊢ 0 ≠ 1\n[PROOFSTEP]\nintro h\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh✝ : N < k\nhp0 : p ≠ 0\nh : 0 = 1\n⊢ False\n[PROOFSTEP]\napply hp0\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh✝ : N < k\nhp0 : p ≠ 0\nh : 0 = 1\n⊢ p = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh✝ : N < k\nhp0 : p ≠ 0\nh : 0 = 1\ni : ℕ\n⊢ coeff p i = coeff 0 i\n[PROOFSTEP]\nrefine' (mul_one _).symm.trans _\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh✝ : N < k\nhp0 : p ≠ 0\nh : 0 = 1\ni : ℕ\n⊢ coeff p i * 1 = coeff 0 i\n[PROOFSTEP]\nrw [← h, mul_zero]\n[GOAL]\ncase a\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh✝ : N < k\nhp0 : p ≠ 0\nh : 0 = 1\ni : ℕ\n⊢ 0 = coeff 0 i\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.inr\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis : 0 ≠ 1\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nhaveI : Nontrivial R := ⟨⟨0, 1, this⟩⟩\n[GOAL]\ncase h.inr\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nhave : p.leadingCoeff ∈ I.leadingCoeffNth N := by\n  rw [HN]\n  exact hm2 k ((I.mem_leadingCoeffNth _ _).2 ⟨_, hp, hn ▸ Polynomial.degree_le_natDegree, rfl⟩)\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\n⊢ leadingCoeff p ∈ Ideal.leadingCoeffNth I N\n[PROOFSTEP]\nrw [HN]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\n⊢ leadingCoeff p ∈ M\n[PROOFSTEP]\nexact hm2 k ((I.mem_leadingCoeffNth _ _).2 ⟨_, hp, hn ▸ Polynomial.degree_le_natDegree, rfl⟩)\n[GOAL]\ncase h.inr\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝² : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝¹ : 0 ≠ 1\nthis✝ : Nontrivial R\nthis : leadingCoeff p ∈ Ideal.leadingCoeffNth I N\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nrw [I.mem_leadingCoeffNth] at this \n[GOAL]\ncase h.inr\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝² : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝¹ : 0 ≠ 1\nthis✝ : Nontrivial R\nthis : ∃ p_1, p_1 ∈ I ∧ degree p_1 ≤ ↑N ∧ leadingCoeff p_1 = leadingCoeff p\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nrcases this with ⟨q, hq, hdq, hlqp⟩\n[GOAL]\ncase h.inr.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nhave hq0 : q ≠ 0 := by\n  intro H\n  rw [← Polynomial.leadingCoeff_eq_zero] at H \n  rw [hlqp, Polynomial.leadingCoeff_eq_zero] at H \n  exact hp0 H\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\n⊢ q ≠ 0\n[PROOFSTEP]\nintro H\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nH : q = 0\n⊢ False\n[PROOFSTEP]\nrw [← Polynomial.leadingCoeff_eq_zero] at H \n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nH : leadingCoeff q = 0\n⊢ False\n[PROOFSTEP]\nrw [hlqp, Polynomial.leadingCoeff_eq_zero] at H \n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nH : p = 0\n⊢ False\n[PROOFSTEP]\nexact hp0 H\n[GOAL]\ncase h.inr.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nhave h1 : p.degree = (q * Polynomial.X ^ (k - q.natDegree)).degree :=\n  by\n  rw [Polynomial.degree_mul', Polynomial.degree_X_pow]\n  rw [Polynomial.degree_eq_natDegree hp0, Polynomial.degree_eq_natDegree hq0]\n  rw [Nat.cast_withBot, Nat.cast_withBot, Nat.cast_withBot, ← WithBot.coe_add, add_tsub_cancel_of_le, hn]\n  · refine' le_trans (Polynomial.natDegree_le_of_degree_le hdq) (le_of_lt h)\n  rw [Polynomial.leadingCoeff_X_pow, mul_one]\n  exact mt Polynomial.leadingCoeff_eq_zero.1 hq0\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\n⊢ degree p = degree (q * X ^ (k - natDegree q))\n[PROOFSTEP]\nrw [Polynomial.degree_mul', Polynomial.degree_X_pow]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\n⊢ degree p = degree q + ↑(k - natDegree q)\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\n⊢ leadingCoeff q * leadingCoeff (X ^ (k - natDegree q)) ≠ 0\n[PROOFSTEP]\nrw [Polynomial.degree_eq_natDegree hp0, Polynomial.degree_eq_natDegree hq0]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\n⊢ ↑(natDegree p) = ↑(natDegree q) + ↑(k - natDegree q)\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\n⊢ leadingCoeff q * leadingCoeff (X ^ (k - natDegree q)) ≠ 0\n[PROOFSTEP]\nrw [Nat.cast_withBot, Nat.cast_withBot, Nat.cast_withBot, ← WithBot.coe_add, add_tsub_cancel_of_le, hn]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\n⊢ natDegree q ≤ k\n[PROOFSTEP]\nrefine' le_trans (Polynomial.natDegree_le_of_degree_le hdq) (le_of_lt h)\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\n⊢ leadingCoeff q * leadingCoeff (X ^ (k - natDegree q)) ≠ 0\n[PROOFSTEP]\nrw [Polynomial.leadingCoeff_X_pow, mul_one]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\n⊢ leadingCoeff q ≠ 0\n[PROOFSTEP]\nexact mt Polynomial.leadingCoeff_eq_zero.1 hq0\n[GOAL]\ncase h.inr.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\nh1 : degree p = degree (q * X ^ (k - natDegree q))\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nhave h2 : p.leadingCoeff = (q * Polynomial.X ^ (k - q.natDegree)).leadingCoeff := by\n  rw [← hlqp, Polynomial.leadingCoeff_mul_X_pow]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\nh1 : degree p = degree (q * X ^ (k - natDegree q))\n⊢ leadingCoeff p = leadingCoeff (q * X ^ (k - natDegree q))\n[PROOFSTEP]\nrw [← hlqp, Polynomial.leadingCoeff_mul_X_pow]\n[GOAL]\ncase h.inr.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝¹ : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝ : 0 ≠ 1\nthis : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\nh1 : degree p = degree (q * X ^ (k - natDegree q))\nh2 : leadingCoeff p = leadingCoeff (q * X ^ (k - natDegree q))\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nhave := Polynomial.degree_sub_lt h1 hp0 h2\n[GOAL]\ncase h.inr.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝² : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝¹ : 0 ≠ 1\nthis✝ : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\nh1 : degree p = degree (q * X ^ (k - natDegree q))\nh2 : leadingCoeff p = leadingCoeff (q * X ^ (k - natDegree q))\nthis : degree (p - q * X ^ (k - natDegree q)) < degree p\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nrw [Polynomial.degree_eq_natDegree hp0] at this \n[GOAL]\ncase h.inr.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝² : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝¹ : 0 ≠ 1\nthis✝ : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\nh1 : degree p = degree (q * X ^ (k - natDegree q))\nh2 : leadingCoeff p = leadingCoeff (q * X ^ (k - natDegree q))\nthis : degree (p - q * X ^ (k - natDegree q)) < ↑(natDegree p)\n⊢ p ∈ Ideal.span ↑s\n[PROOFSTEP]\nrw [← sub_add_cancel p (q * Polynomial.X ^ (k - q.natDegree))]\n[GOAL]\ncase h.inr.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝² : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝¹ : 0 ≠ 1\nthis✝ : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\nh1 : degree p = degree (q * X ^ (k - natDegree q))\nh2 : leadingCoeff p = leadingCoeff (q * X ^ (k - natDegree q))\nthis : degree (p - q * X ^ (k - natDegree q)) < ↑(natDegree p)\n⊢ p - q * X ^ (k - natDegree q) + q * X ^ (k - natDegree q) ∈ Ideal.span ↑s\n[PROOFSTEP]\nrefine' (Ideal.span ↑s).add_mem _ ((Ideal.span ↑s).mul_mem_right _ _)\n[GOAL]\ncase h.inr.intro.intro.intro.refine'_1\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝² : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝¹ : 0 ≠ 1\nthis✝ : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\nh1 : degree p = degree (q * X ^ (k - natDegree q))\nh2 : leadingCoeff p = leadingCoeff (q * X ^ (k - natDegree q))\nthis : degree (p - q * X ^ (k - natDegree q)) < ↑(natDegree p)\n⊢ p - q * X ^ (k - natDegree q) ∈ Ideal.span ↑s\n[PROOFSTEP]\nby_cases hpq : p - q * Polynomial.X ^ (k - q.natDegree) = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝² : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝¹ : 0 ≠ 1\nthis✝ : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\nh1 : degree p = degree (q * X ^ (k - natDegree q))\nh2 : leadingCoeff p = leadingCoeff (q * X ^ (k - natDegree q))\nthis : degree (p - q * X ^ (k - natDegree q)) < ↑(natDegree p)\nhpq : p - q * X ^ (k - natDegree q) = 0\n⊢ p - q * X ^ (k - natDegree q) ∈ Ideal.span ↑s\n[PROOFSTEP]\nrw [hpq]\n[GOAL]\ncase pos\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝² : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝¹ : 0 ≠ 1\nthis✝ : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\nh1 : degree p = degree (q * X ^ (k - natDegree q))\nh2 : leadingCoeff p = leadingCoeff (q * X ^ (k - natDegree q))\nthis : degree (p - q * X ^ (k - natDegree q)) < ↑(natDegree p)\nhpq : p - q * X ^ (k - natDegree q) = 0\n⊢ 0 ∈ Ideal.span ↑s\n[PROOFSTEP]\nexact Ideal.zero_mem _\n[GOAL]\ncase neg\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝² : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝¹ : 0 ≠ 1\nthis✝ : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\nh1 : degree p = degree (q * X ^ (k - natDegree q))\nh2 : leadingCoeff p = leadingCoeff (q * X ^ (k - natDegree q))\nthis : degree (p - q * X ^ (k - natDegree q)) < ↑(natDegree p)\nhpq : ¬p - q * X ^ (k - natDegree q) = 0\n⊢ p - q * X ^ (k - natDegree q) ∈ Ideal.span ↑s\n[PROOFSTEP]\nrefine' ih _ _ (I.sub_mem hp (I.mul_mem_right _ hq)) rfl\n[GOAL]\ncase neg\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝² : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝¹ : 0 ≠ 1\nthis✝ : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\nh1 : degree p = degree (q * X ^ (k - natDegree q))\nh2 : leadingCoeff p = leadingCoeff (q * X ^ (k - natDegree q))\nthis : degree (p - q * X ^ (k - natDegree q)) < ↑(natDegree p)\nhpq : ¬p - q * X ^ (k - natDegree q) = 0\n⊢ natDegree (p - q * X ^ (k - natDegree q)) < k\n[PROOFSTEP]\nrwa [Polynomial.degree_eq_natDegree hpq, Nat.cast_withBot, Nat.cast_withBot, WithBot.coe_lt_coe, hn] at this \n[GOAL]\ncase h.inr.intro.intro.intro.refine'_2\nR : Type u\nS : Type u_1\nσ : Type v\nM✝ : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M✝\ninst✝ : Module R M✝\ninst : IsNoetherianRing R\nI : Ideal R[X]\nM : Submodule R R :=\n  WellFounded.min (_ : WellFounded fun x x_1 => x > x_1) (Set.range (Ideal.leadingCoeffNth I))\n    (_ : ∃ x, x ∈ Set.range (Ideal.leadingCoeffNth I))\nhm : M ∈ Set.range (Ideal.leadingCoeffNth I)\nN : ℕ\nHN : Ideal.leadingCoeffNth I N = M\ns : Finset R[X]\nhs : Submodule.span R ↑s = Ideal.degreeLE I ↑N\nhm2 : ∀ (k : ℕ), Ideal.leadingCoeffNth I k ≤ M\nhs2 : ∀ {x : R[X]}, x ∈ Ideal.degreeLE I ↑N → x ∈ Ideal.span ↑s\nthis✝² : Submodule.span R[X] ↑s = Ideal.span ↑s\np✝ : R[X]\nhp✝ : p✝ ∈ I\nk✝ : ℕ\nhn✝ : natDegree p✝ = k✝\nk : ℕ\nih : ∀ (m : ℕ), m < k → ∀ ⦃p : R[X]⦄, p ∈ I → natDegree p = m → p ∈ Ideal.span ↑s\np : R[X]\nhp : p ∈ I\nhn : natDegree p = k\nh : N < k\nhp0 : p ≠ 0\nthis✝¹ : 0 ≠ 1\nthis✝ : Nontrivial R\nq : R[X]\nhq : q ∈ I\nhdq : degree q ≤ ↑N\nhlqp : leadingCoeff q = leadingCoeff p\nhq0 : q ≠ 0\nh1 : degree p = degree (q * X ^ (k - natDegree q))\nh2 : leadingCoeff p = leadingCoeff (q * X ^ (k - natDegree q))\nthis : degree (p - q * X ^ (k - natDegree q)) < ↑(natDegree p)\n⊢ q ∈ Ideal.span ↑s\n[PROOFSTEP]\nexact hs2 ⟨Polynomial.mem_degreeLE.2 hdq, hq⟩\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\nf : R[X]\nhf : 0 < natDegree f\n⊢ 0 < degree f\n[PROOFSTEP]\ncontrapose! hf\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : WfDvdMonoid R\nf : R[X]\nhf : degree f ≤ 0\n⊢ natDegree f ≤ 0\n[PROOFSTEP]\nexact natDegree_le_of_degree_le hf\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\nv : M\n⊢ (LinearIndependent R fun n => ↑(f ^ n) v) ↔ ∀ (p : R[X]), ↑(↑(aeval f) p) v = 0 → p = 0\n[PROOFSTEP]\nrw [linearIndependent_iff]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\nv : M\n⊢ (∀ (l : ℕ →₀ R), ↑(Finsupp.total ℕ ((fun x => M) v) R fun n => ↑(f ^ n) v) l = 0 → l = 0) ↔\n    ∀ (p : R[X]), ↑(↑(aeval f) p) v = 0 → p = 0\n[PROOFSTEP]\nsimp only [Finsupp.total_apply, aeval_endomorphism, forall_iff_forall_finsupp, Sum, support, coeff, ofFinsupp_eq_zero]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\nv : M\n⊢ (∀ (l : ℕ →₀ R), (Finsupp.sum l fun i a => a • ↑(f ^ i) v) = 0 → l = 0) ↔\n    ∀ (q : AddMonoidAlgebra R ℕ), (sum { toFinsupp := q } fun n b => b • ↑(f ^ n) v) = 0 → q = 0\n[PROOFSTEP]\nexact Iff.rfl\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nhpq : IsCoprime p q\n⊢ Disjoint (LinearMap.ker (↑(aeval f) p)) (LinearMap.ker (↑(aeval f) q))\n[PROOFSTEP]\nrw [disjoint_iff_inf_le]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nhpq : IsCoprime p q\n⊢ LinearMap.ker (↑(aeval f) p) ⊓ LinearMap.ker (↑(aeval f) q) ≤ ⊥\n[PROOFSTEP]\nintro v hv\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nhpq : IsCoprime p q\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) p) ⊓ LinearMap.ker (↑(aeval f) q)\n⊢ v ∈ ⊥\n[PROOFSTEP]\nrcases hpq with ⟨p', q', hpq'⟩\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) p) ⊓ LinearMap.ker (↑(aeval f) q)\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\n⊢ v ∈ ⊥\n[PROOFSTEP]\nsimpa [LinearMap.mem_ker.1 (Submodule.mem_inf.1 hv).1, LinearMap.mem_ker.1 (Submodule.mem_inf.1 hv).2] using\n  congr_arg (fun p : R[X] => aeval f p v) hpq'.symm\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nhpq : IsCoprime p q\n⊢ LinearMap.range (↑(aeval f) p) ⊔ LinearMap.range (↑(aeval f) q) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nhpq : IsCoprime p q\n⊢ ⊤ ≤ LinearMap.range (↑(aeval f) p) ⊔ LinearMap.range (↑(aeval f) q)\n[PROOFSTEP]\nintro v _\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nhpq : IsCoprime p q\nv : M\na✝ : v ∈ ⊤\n⊢ v ∈ LinearMap.range (↑(aeval f) p) ⊔ LinearMap.range (↑(aeval f) q)\n[PROOFSTEP]\nrw [Submodule.mem_sup]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nhpq : IsCoprime p q\nv : M\na✝ : v ∈ ⊤\n⊢ ∃ y, y ∈ LinearMap.range (↑(aeval f) p) ∧ ∃ z, z ∈ LinearMap.range (↑(aeval f) q) ∧ y + z = v\n[PROOFSTEP]\nrcases hpq with ⟨p', q', hpq'⟩\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\na✝ : v ∈ ⊤\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\n⊢ ∃ y, y ∈ LinearMap.range (↑(aeval f) p) ∧ ∃ z, z ∈ LinearMap.range (↑(aeval f) q) ∧ y + z = v\n[PROOFSTEP]\nuse aeval f (p * p') v\n[GOAL]\ncase h\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\na✝ : v ∈ ⊤\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\n⊢ ↑(↑(aeval f) (p * p')) v ∈ LinearMap.range (↑(aeval f) p) ∧\n    ∃ z, z ∈ LinearMap.range (↑(aeval f) q) ∧ ↑(↑(aeval f) (p * p')) v + z = v\n[PROOFSTEP]\nuse LinearMap.mem_range.2 ⟨aeval f p' v, by simp only [LinearMap.mul_apply, aeval_mul]⟩\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\na✝ : v ∈ ⊤\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\n⊢ ↑(↑(aeval f) p) (↑(↑(aeval f) p') v) = ↑(↑(aeval f) (p * p')) v\n[PROOFSTEP]\nsimp only [LinearMap.mul_apply, aeval_mul]\n[GOAL]\ncase right\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\na✝ : v ∈ ⊤\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\n⊢ ∃ z, z ∈ LinearMap.range (↑(aeval f) q) ∧ ↑(↑(aeval f) (p * p')) v + z = v\n[PROOFSTEP]\nuse aeval f (q * q') v\n[GOAL]\ncase h\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\na✝ : v ∈ ⊤\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\n⊢ ↑(↑(aeval f) (q * q')) v ∈ LinearMap.range (↑(aeval f) q) ∧ ↑(↑(aeval f) (p * p')) v + ↑(↑(aeval f) (q * q')) v = v\n[PROOFSTEP]\nuse LinearMap.mem_range.2 ⟨aeval f q' v, by simp only [LinearMap.mul_apply, aeval_mul]⟩\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\na✝ : v ∈ ⊤\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\n⊢ ↑(↑(aeval f) q) (↑(↑(aeval f) q') v) = ↑(↑(aeval f) (q * q')) v\n[PROOFSTEP]\nsimp only [LinearMap.mul_apply, aeval_mul]\n[GOAL]\ncase right\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\na✝ : v ∈ ⊤\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\n⊢ ↑(↑(aeval f) (p * p')) v + ↑(↑(aeval f) (q * q')) v = v\n[PROOFSTEP]\nsimpa only [mul_comm p p', mul_comm q q', aeval_one, aeval_add] using congr_arg (fun p : R[X] => aeval f p v) hpq'\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\n⊢ LinearMap.ker (↑(aeval f) p) ⊔ LinearMap.ker (↑(aeval f) q) ≤ LinearMap.ker (↑(aeval f) (p * q))\n[PROOFSTEP]\nintro v hv\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) p) ⊔ LinearMap.ker (↑(aeval f) q)\n⊢ v ∈ LinearMap.ker (↑(aeval f) (p * q))\n[PROOFSTEP]\nrcases Submodule.mem_sup.1 hv with ⟨x, hx, y, hy, hxy⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) p) ⊔ LinearMap.ker (↑(aeval f) q)\nx : M\nhx : x ∈ LinearMap.ker (↑(aeval f) p)\ny : M\nhy : y ∈ LinearMap.ker (↑(aeval f) q)\nhxy : x + y = v\n⊢ v ∈ LinearMap.ker (↑(aeval f) (p * q))\n[PROOFSTEP]\nhave h_eval_x : aeval f (p * q) x = 0 := by\n  rw [mul_comm, aeval_mul, LinearMap.mul_apply, LinearMap.mem_ker.1 hx, LinearMap.map_zero]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) p) ⊔ LinearMap.ker (↑(aeval f) q)\nx : M\nhx : x ∈ LinearMap.ker (↑(aeval f) p)\ny : M\nhy : y ∈ LinearMap.ker (↑(aeval f) q)\nhxy : x + y = v\n⊢ ↑(↑(aeval f) (p * q)) x = 0\n[PROOFSTEP]\nrw [mul_comm, aeval_mul, LinearMap.mul_apply, LinearMap.mem_ker.1 hx, LinearMap.map_zero]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) p) ⊔ LinearMap.ker (↑(aeval f) q)\nx : M\nhx : x ∈ LinearMap.ker (↑(aeval f) p)\ny : M\nhy : y ∈ LinearMap.ker (↑(aeval f) q)\nhxy : x + y = v\nh_eval_x : ↑(↑(aeval f) (p * q)) x = 0\n⊢ v ∈ LinearMap.ker (↑(aeval f) (p * q))\n[PROOFSTEP]\nhave h_eval_y : aeval f (p * q) y = 0 := by\n  rw [aeval_mul, LinearMap.mul_apply, LinearMap.mem_ker.1 hy, LinearMap.map_zero]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) p) ⊔ LinearMap.ker (↑(aeval f) q)\nx : M\nhx : x ∈ LinearMap.ker (↑(aeval f) p)\ny : M\nhy : y ∈ LinearMap.ker (↑(aeval f) q)\nhxy : x + y = v\nh_eval_x : ↑(↑(aeval f) (p * q)) x = 0\n⊢ ↑(↑(aeval f) (p * q)) y = 0\n[PROOFSTEP]\nrw [aeval_mul, LinearMap.mul_apply, LinearMap.mem_ker.1 hy, LinearMap.map_zero]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) p) ⊔ LinearMap.ker (↑(aeval f) q)\nx : M\nhx : x ∈ LinearMap.ker (↑(aeval f) p)\ny : M\nhy : y ∈ LinearMap.ker (↑(aeval f) q)\nhxy : x + y = v\nh_eval_x : ↑(↑(aeval f) (p * q)) x = 0\nh_eval_y : ↑(↑(aeval f) (p * q)) y = 0\n⊢ v ∈ LinearMap.ker (↑(aeval f) (p * q))\n[PROOFSTEP]\nrw [LinearMap.mem_ker, ← hxy, LinearMap.map_add, h_eval_x, h_eval_y, add_zero]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nhpq : IsCoprime p q\n⊢ LinearMap.ker (↑(aeval f) p) ⊔ LinearMap.ker (↑(aeval f) q) = LinearMap.ker (↑(aeval f) (p * q))\n[PROOFSTEP]\napply le_antisymm sup_ker_aeval_le_ker_aeval_mul\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nhpq : IsCoprime p q\n⊢ LinearMap.ker (↑(aeval f) (p * q)) ≤ LinearMap.ker (↑(aeval f) p) ⊔ LinearMap.ker (↑(aeval f) q)\n[PROOFSTEP]\nintro v hv\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nhpq : IsCoprime p q\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) (p * q))\n⊢ v ∈ LinearMap.ker (↑(aeval f) p) ⊔ LinearMap.ker (↑(aeval f) q)\n[PROOFSTEP]\nrw [Submodule.mem_sup]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nhpq : IsCoprime p q\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) (p * q))\n⊢ ∃ y, y ∈ LinearMap.ker (↑(aeval f) p) ∧ ∃ z, z ∈ LinearMap.ker (↑(aeval f) q) ∧ y + z = v\n[PROOFSTEP]\nrcases hpq with ⟨p', q', hpq'⟩\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) (p * q))\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\n⊢ ∃ y, y ∈ LinearMap.ker (↑(aeval f) p) ∧ ∃ z, z ∈ LinearMap.ker (↑(aeval f) q) ∧ y + z = v\n[PROOFSTEP]\nhave h_eval₂_qpp' :=\n  calc\n    aeval f (q * (p * p')) v = aeval f (p' * (p * q)) v := by\n      rw [mul_comm, mul_assoc, mul_comm, mul_assoc, mul_comm q p]\n    _ = 0 := by rw [aeval_mul, LinearMap.mul_apply, LinearMap.mem_ker.1 hv, LinearMap.map_zero]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) (p * q))\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\n⊢ ↑(↑(aeval f) (q * (p * p'))) v = ↑(↑(aeval f) (p' * (p * q))) v\n[PROOFSTEP]\nrw [mul_comm, mul_assoc, mul_comm, mul_assoc, mul_comm q p]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) (p * q))\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\n⊢ ↑(↑(aeval f) (p' * (p * q))) v = 0\n[PROOFSTEP]\nrw [aeval_mul, LinearMap.mul_apply, LinearMap.mem_ker.1 hv, LinearMap.map_zero]\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) (p * q))\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\nh_eval₂_qpp' : ↑(↑(aeval f) (q * (p * p'))) v = 0\n⊢ ∃ y, y ∈ LinearMap.ker (↑(aeval f) p) ∧ ∃ z, z ∈ LinearMap.ker (↑(aeval f) q) ∧ y + z = v\n[PROOFSTEP]\nhave h_eval₂_pqq' :=\n  calc\n    aeval f (p * (q * q')) v = aeval f (q' * (p * q)) v := by rw [← mul_assoc, mul_comm]\n    _ = 0 := by rw [aeval_mul, LinearMap.mul_apply, LinearMap.mem_ker.1 hv, LinearMap.map_zero]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) (p * q))\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\nh_eval₂_qpp' : ↑(↑(aeval f) (q * (p * p'))) v = 0\n⊢ ↑(↑(aeval f) (p * (q * q'))) v = ↑(↑(aeval f) (q' * (p * q))) v\n[PROOFSTEP]\nrw [← mul_assoc, mul_comm]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) (p * q))\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\nh_eval₂_qpp' : ↑(↑(aeval f) (q * (p * p'))) v = 0\n⊢ ↑(↑(aeval f) (q' * (p * q))) v = 0\n[PROOFSTEP]\nrw [aeval_mul, LinearMap.mul_apply, LinearMap.mem_ker.1 hv, LinearMap.map_zero]\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) (p * q))\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\nh_eval₂_qpp' : ↑(↑(aeval f) (q * (p * p'))) v = 0\nh_eval₂_pqq' : ↑(↑(aeval f) (p * (q * q'))) v = 0\n⊢ ∃ y, y ∈ LinearMap.ker (↑(aeval f) p) ∧ ∃ z, z ∈ LinearMap.ker (↑(aeval f) q) ∧ y + z = v\n[PROOFSTEP]\nrw [aeval_mul] at h_eval₂_qpp' h_eval₂_pqq' \n[GOAL]\ncase intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) (p * q))\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\nh_eval₂_qpp' : ↑(↑(aeval f) q * ↑(aeval f) (p * p')) v = 0\nh_eval₂_pqq' : ↑(↑(aeval f) p * ↑(aeval f) (q * q')) v = 0\n⊢ ∃ y, y ∈ LinearMap.ker (↑(aeval f) p) ∧ ∃ z, z ∈ LinearMap.ker (↑(aeval f) q) ∧ y + z = v\n[PROOFSTEP]\nrefine' ⟨aeval f (q * q') v, LinearMap.mem_ker.1 h_eval₂_pqq', aeval f (p * p') v, LinearMap.mem_ker.1 h_eval₂_qpp', _⟩\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) (p * q))\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\nh_eval₂_qpp' : ↑(↑(aeval f) q * ↑(aeval f) (p * p')) v = 0\nh_eval₂_pqq' : ↑(↑(aeval f) p * ↑(aeval f) (q * q')) v = 0\n⊢ ↑(↑(aeval f) (q * q')) v + ↑(↑(aeval f) (p * p')) v = v\n[PROOFSTEP]\nrw [add_comm, mul_comm p p', mul_comm q q']\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : M →ₗ[R] M\np q : R[X]\nv : M\nhv : v ∈ LinearMap.ker (↑(aeval f) (p * q))\np' q' : R[X]\nhpq' : p' * p + q' * q = 1\nh_eval₂_qpp' : ↑(↑(aeval f) q * ↑(aeval f) (p * p')) v = 0\nh_eval₂_pqq' : ↑(↑(aeval f) p * ↑(aeval f) (q * q')) v = 0\n⊢ ↑(↑(aeval f) (p' * p)) v + ↑(↑(aeval f) (q' * q)) v = v\n[PROOFSTEP]\nsimpa only [map_add, map_mul, aeval_one] using congr_arg (fun p : R[X] => aeval f p v) hpq'\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ninst✝ : IsNoetherianRing R\n⊢ IsNoetherianRing (MvPolynomial (Fin 0) R)\n[PROOFSTEP]\napply isNoetherianRing_of_ringEquiv R\n[GOAL]\ncase f\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ninst✝ : IsNoetherianRing R\n⊢ R ≃+* MvPolynomial (Fin 0) R\n[PROOFSTEP]\nsymm\n[GOAL]\ncase f\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\ninst✝ : IsNoetherianRing R\n⊢ MvPolynomial (Fin 0) R ≃+* R\n[PROOFSTEP]\napply MvPolynomial.isEmptyRingEquiv R (Fin 0)\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Finite σ\ninst✝ : IsNoetherianRing R\n⊢ IsNoetherianRing (MvPolynomial σ R)\n[PROOFSTEP]\ncases nonempty_fintype σ\n[GOAL]\ncase intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : Finite σ\ninst✝ : IsNoetherianRing R\nval✝ : Fintype σ\n⊢ IsNoetherianRing (MvPolynomial σ R)\n[PROOFSTEP]\nexact\n  @isNoetherianRing_of_ringEquiv (MvPolynomial (Fin (Fintype.card σ)) R) _ _ _\n    (renameEquiv R (Fintype.equivFin σ).symm).toRingEquiv isNoetherianRing_fin\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u\nσ : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Finite σ\ninst✝ : NoZeroDivisors R\n⊢ NoZeroDivisors (MvPolynomial σ R)\n[PROOFSTEP]\ncases nonempty_fintype σ\n[GOAL]\ncase intro\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u\nσ : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Finite σ\ninst✝ : NoZeroDivisors R\nval✝ : Fintype σ\n⊢ NoZeroDivisors (MvPolynomial σ R)\n[PROOFSTEP]\nhaveI := noZeroDivisors_fin R (Fintype.card σ)\n[GOAL]\ncase intro\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R✝ M\nR : Type u\nσ : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Finite σ\ninst✝ : NoZeroDivisors R\nval✝ : Fintype σ\nthis : NoZeroDivisors (MvPolynomial (Fin (Fintype.card σ)) R)\n⊢ NoZeroDivisors (MvPolynomial σ R)\n[PROOFSTEP]\nexact (renameEquiv R (Fintype.equivFin σ)).injective.noZeroDivisors _ (map_zero _) (map_mul _)\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nσ : Type v\np q : MvPolynomial σ R\nh : p * q = 0\n⊢ p = 0 ∨ q = 0\n[PROOFSTEP]\nobtain ⟨s, p, rfl⟩ := exists_finset_rename p\n[GOAL]\ncase intro.intro\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nσ : Type v\nq : MvPolynomial σ R\ns : Finset σ\np : MvPolynomial { x // x ∈ s } R\nh : ↑(rename Subtype.val) p * q = 0\n⊢ ↑(rename Subtype.val) p = 0 ∨ q = 0\n[PROOFSTEP]\nobtain ⟨t, q, rfl⟩ := exists_finset_rename q\n[GOAL]\ncase intro.intro.intro.intro\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nσ : Type v\ns : Finset σ\np : MvPolynomial { x // x ∈ s } R\nt : Finset σ\nq : MvPolynomial { x // x ∈ t } R\nh : ↑(rename Subtype.val) p * ↑(rename Subtype.val) q = 0\n⊢ ↑(rename Subtype.val) p = 0 ∨ ↑(rename Subtype.val) q = 0\n[PROOFSTEP]\nhave :\n  rename (Subtype.map id (Finset.subset_union_left s t) : { x // x ∈ s } → { x // x ∈ s ∪ t }) p *\n      rename (Subtype.map id (Finset.subset_union_right s t) : { x // x ∈ t } → { x // x ∈ s ∪ t }) q =\n    0 :=\n  by\n  apply rename_injective _ Subtype.val_injective\n  simpa using h\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nσ : Type v\ns : Finset σ\np : MvPolynomial { x // x ∈ s } R\nt : Finset σ\nq : MvPolynomial { x // x ∈ t } R\nh : ↑(rename Subtype.val) p * ↑(rename Subtype.val) q = 0\n⊢ ↑(rename (Subtype.map id (_ : s ⊆ s ∪ t))) p * ↑(rename (Subtype.map id (_ : t ⊆ s ∪ t))) q = 0\n[PROOFSTEP]\napply rename_injective _ Subtype.val_injective\n[GOAL]\ncase a\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nσ : Type v\ns : Finset σ\np : MvPolynomial { x // x ∈ s } R\nt : Finset σ\nq : MvPolynomial { x // x ∈ t } R\nh : ↑(rename Subtype.val) p * ↑(rename Subtype.val) q = 0\n⊢ ↑(rename Subtype.val) (↑(rename (Subtype.map id (_ : s ⊆ s ∪ t))) p * ↑(rename (Subtype.map id (_ : t ⊆ s ∪ t))) q) =\n    ↑(rename Subtype.val) 0\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase intro.intro.intro.intro\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nσ : Type v\ns : Finset σ\np : MvPolynomial { x // x ∈ s } R\nt : Finset σ\nq : MvPolynomial { x // x ∈ t } R\nh : ↑(rename Subtype.val) p * ↑(rename Subtype.val) q = 0\nthis : ↑(rename (Subtype.map id (_ : s ⊆ s ∪ t))) p * ↑(rename (Subtype.map id (_ : t ⊆ s ∪ t))) q = 0\n⊢ ↑(rename Subtype.val) p = 0 ∨ ↑(rename Subtype.val) q = 0\n[PROOFSTEP]\nletI that := MvPolynomial.noZeroDivisors_of_finite R { x // x ∈ s ∪ t }\n[GOAL]\ncase intro.intro.intro.intro\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nσ : Type v\ns : Finset σ\np : MvPolynomial { x // x ∈ s } R\nt : Finset σ\nq : MvPolynomial { x // x ∈ t } R\nh : ↑(rename Subtype.val) p * ↑(rename Subtype.val) q = 0\nthis : ↑(rename (Subtype.map id (_ : s ⊆ s ∪ t))) p * ↑(rename (Subtype.map id (_ : t ⊆ s ∪ t))) q = 0\nthat : NoZeroDivisors (MvPolynomial { x // x ∈ s ∪ t } R) := noZeroDivisors_of_finite R { x // x ∈ s ∪ t }\n⊢ ↑(rename Subtype.val) p = 0 ∨ ↑(rename Subtype.val) q = 0\n[PROOFSTEP]\nrw [mul_eq_zero] at this \n[GOAL]\ncase intro.intro.intro.intro\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nσ : Type v\ns : Finset σ\np : MvPolynomial { x // x ∈ s } R\nt : Finset σ\nq : MvPolynomial { x // x ∈ t } R\nh : ↑(rename Subtype.val) p * ↑(rename Subtype.val) q = 0\nthis : ↑(rename (Subtype.map id (_ : s ⊆ s ∪ t))) p = 0 ∨ ↑(rename (Subtype.map id (_ : t ⊆ s ∪ t))) q = 0\nthat : NoZeroDivisors (MvPolynomial { x // x ∈ s ∪ t } R) := noZeroDivisors_of_finite R { x // x ∈ s ∪ t }\n⊢ ↑(rename Subtype.val) p = 0 ∨ ↑(rename Subtype.val) q = 0\n[PROOFSTEP]\napply this.imp\n[GOAL]\ncase intro.intro.intro.intro.f\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nσ : Type v\ns : Finset σ\np : MvPolynomial { x // x ∈ s } R\nt : Finset σ\nq : MvPolynomial { x // x ∈ t } R\nh : ↑(rename Subtype.val) p * ↑(rename Subtype.val) q = 0\nthis : ↑(rename (Subtype.map id (_ : s ⊆ s ∪ t))) p = 0 ∨ ↑(rename (Subtype.map id (_ : t ⊆ s ∪ t))) q = 0\nthat : NoZeroDivisors (MvPolynomial { x // x ∈ s ∪ t } R) := noZeroDivisors_of_finite R { x // x ∈ s ∪ t }\n⊢ ↑(rename (Subtype.map id (_ : s ⊆ s ∪ t))) p = 0 → ↑(rename Subtype.val) p = 0\n[PROOFSTEP]\nintro that\n[GOAL]\ncase intro.intro.intro.intro.g\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nσ : Type v\ns : Finset σ\np : MvPolynomial { x // x ∈ s } R\nt : Finset σ\nq : MvPolynomial { x // x ∈ t } R\nh : ↑(rename Subtype.val) p * ↑(rename Subtype.val) q = 0\nthis : ↑(rename (Subtype.map id (_ : s ⊆ s ∪ t))) p = 0 ∨ ↑(rename (Subtype.map id (_ : t ⊆ s ∪ t))) q = 0\nthat : NoZeroDivisors (MvPolynomial { x // x ∈ s ∪ t } R) := noZeroDivisors_of_finite R { x // x ∈ s ∪ t }\n⊢ ↑(rename (Subtype.map id (_ : t ⊆ s ∪ t))) q = 0 → ↑(rename Subtype.val) q = 0\n[PROOFSTEP]\nintro that\n[GOAL]\ncase intro.intro.intro.intro.f\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nσ : Type v\ns : Finset σ\np : MvPolynomial { x // x ∈ s } R\nt : Finset σ\nq : MvPolynomial { x // x ∈ t } R\nh : ↑(rename Subtype.val) p * ↑(rename Subtype.val) q = 0\nthis : ↑(rename (Subtype.map id (_ : s ⊆ s ∪ t))) p = 0 ∨ ↑(rename (Subtype.map id (_ : t ⊆ s ∪ t))) q = 0\nthat✝ : NoZeroDivisors (MvPolynomial { x // x ∈ s ∪ t } R) := noZeroDivisors_of_finite R { x // x ∈ s ∪ t }\nthat : ↑(rename (Subtype.map id (_ : s ⊆ s ∪ t))) p = 0\n⊢ ↑(rename Subtype.val) p = 0\n[PROOFSTEP]\nsimpa using congr_arg (rename Subtype.val) that\n[GOAL]\ncase intro.intro.intro.intro.g\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nσ : Type v\ns : Finset σ\np : MvPolynomial { x // x ∈ s } R\nt : Finset σ\nq : MvPolynomial { x // x ∈ t } R\nh : ↑(rename Subtype.val) p * ↑(rename Subtype.val) q = 0\nthis : ↑(rename (Subtype.map id (_ : s ⊆ s ∪ t))) p = 0 ∨ ↑(rename (Subtype.map id (_ : t ⊆ s ∪ t))) q = 0\nthat✝ : NoZeroDivisors (MvPolynomial { x // x ∈ s ∪ t } R) := noZeroDivisors_of_finite R { x // x ∈ s ∪ t }\nthat : ↑(rename (Subtype.map id (_ : t ⊆ s ∪ t))) q = 0\n⊢ ↑(rename Subtype.val) q = 0\n[PROOFSTEP]\nsimpa using congr_arg (rename Subtype.val) that\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\nσ : Type v\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\n⊢ IsDomain (MvPolynomial σ R)\n[PROOFSTEP]\napply @NoZeroDivisors.to_isDomain (MvPolynomial σ R) _ ?_ _\n[GOAL]\nR✝ : Type u\nS : Type u_1\nσ✝ : Type v\nM : Type w\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S\ninst✝³ : AddCommGroup M\ninst✝² : Module R✝ M\nR : Type u\nσ : Type v\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\n⊢ Nontrivial (MvPolynomial σ R)\n[PROOFSTEP]\napply AddMonoidAlgebra.nontrivial\n[GOAL]\nR : Type u\nS✝ : Type u_1\nσ : Type v\nM : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S✝\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : Finite σ\nϕ : MvPolynomial σ R →+* S\np : MvPolynomial σ R\n⊢ ↑ϕ p = eval₂ (RingHom.comp ϕ C) (fun s => ↑ϕ (X s)) p\n[PROOFSTEP]\ncases nonempty_fintype σ\n[GOAL]\ncase intro\nR : Type u\nS✝ : Type u_1\nσ : Type v\nM : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S✝\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : Finite σ\nϕ : MvPolynomial σ R →+* S\np : MvPolynomial σ R\nval✝ : Fintype σ\n⊢ ↑ϕ p = eval₂ (RingHom.comp ϕ C) (fun s => ↑ϕ (X s)) p\n[PROOFSTEP]\nrefine' Trans.trans (congr_arg ϕ (MvPolynomial.as_sum p)) _\n[GOAL]\ncase intro\nR : Type u\nS✝ : Type u_1\nσ : Type v\nM : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S✝\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : Finite σ\nϕ : MvPolynomial σ R →+* S\np : MvPolynomial σ R\nval✝ : Fintype σ\n⊢ ↑ϕ (∑ v in support p, ↑(monomial v) (coeff v p)) = eval₂ (RingHom.comp ϕ C) (fun s => ↑ϕ (X s)) p\n[PROOFSTEP]\nrw [MvPolynomial.eval₂_eq', ϕ.map_sum]\n[GOAL]\ncase intro\nR : Type u\nS✝ : Type u_1\nσ : Type v\nM : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S✝\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : Finite σ\nϕ : MvPolynomial σ R →+* S\np : MvPolynomial σ R\nval✝ : Fintype σ\n⊢ ∑ x in support p, ↑ϕ (↑(monomial x) (coeff x p)) =\n    ∑ d in support p, ↑(RingHom.comp ϕ C) (coeff d p) * ∏ i : σ, ↑ϕ (X i) ^ ↑d i\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.e_f\nR : Type u\nS✝ : Type u_1\nσ : Type v\nM : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S✝\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : Finite σ\nϕ : MvPolynomial σ R →+* S\np : MvPolynomial σ R\nval✝ : Fintype σ\n⊢ (fun x => ↑ϕ (↑(monomial x) (coeff x p))) = fun d => ↑(RingHom.comp ϕ C) (coeff d p) * ∏ i : σ, ↑ϕ (X i) ^ ↑d i\n[PROOFSTEP]\next\n[GOAL]\ncase intro.e_f.h\nR : Type u\nS✝ : Type u_1\nσ : Type v\nM : Type w\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S✝\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : Finite σ\nϕ : MvPolynomial σ R →+* S\np : MvPolynomial σ R\nval✝ : Fintype σ\nx✝ : σ →₀ ℕ\n⊢ ↑ϕ (↑(monomial x✝) (coeff x✝ p)) = ↑(RingHom.comp ϕ C) (coeff x✝ p) * ∏ i : σ, ↑ϕ (X i) ^ ↑x✝ i\n[PROOFSTEP]\nsimp only [monomial_eq, ϕ.map_pow, ϕ.map_prod, ϕ.comp_apply, ϕ.map_mul, Finsupp.prod_pow]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal (MvPolynomial σ R)\np : MvPolynomial σ R\nhcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I\n⊢ p ∈ I\n[PROOFSTEP]\nrw [as_sum p]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal (MvPolynomial σ R)\np : MvPolynomial σ R\nhcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I\n⊢ ∑ v in support p, ↑(monomial v) (coeff v p) ∈ I\n[PROOFSTEP]\nsuffices ∀ m ∈ p.support, monomial m (MvPolynomial.coeff m p) ∈ I by exact Submodule.sum_mem I this\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal (MvPolynomial σ R)\np : MvPolynomial σ R\nhcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I\nthis : ∀ (m : σ →₀ ℕ), m ∈ support p → ↑(monomial m) (coeff m p) ∈ I\n⊢ ∑ v in support p, ↑(monomial v) (coeff v p) ∈ I\n[PROOFSTEP]\nexact Submodule.sum_mem I this\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal (MvPolynomial σ R)\np : MvPolynomial σ R\nhcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I\n⊢ ∀ (m : σ →₀ ℕ), m ∈ support p → ↑(monomial m) (coeff m p) ∈ I\n[PROOFSTEP]\nintro m _\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal (MvPolynomial σ R)\np : MvPolynomial σ R\nhcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I\nm : σ →₀ ℕ\na✝ : m ∈ support p\n⊢ ↑(monomial m) (coeff m p) ∈ I\n[PROOFSTEP]\nrw [← mul_one (coeff m p), ← C_mul_monomial]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal (MvPolynomial σ R)\np : MvPolynomial σ R\nhcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I\nm : σ →₀ ℕ\na✝ : m ∈ support p\n⊢ ↑C (coeff m p) * ↑(monomial m) 1 ∈ I\n[PROOFSTEP]\nsuffices C (coeff m p) ∈ I by exact I.mul_mem_right (monomial m 1) this\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal (MvPolynomial σ R)\np : MvPolynomial σ R\nhcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I\nm : σ →₀ ℕ\na✝ : m ∈ support p\nthis : ↑C (coeff m p) ∈ I\n⊢ ↑C (coeff m p) * ↑(monomial m) 1 ∈ I\n[PROOFSTEP]\nexact I.mul_mem_right (monomial m 1) this\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal (MvPolynomial σ R)\np : MvPolynomial σ R\nhcoe : ∀ (m : σ →₀ ℕ), coeff m p ∈ Ideal.comap C I\nm : σ →₀ ℕ\na✝ : m ∈ support p\n⊢ ↑C (coeff m p) ∈ I\n[PROOFSTEP]\nsimpa [Ideal.mem_comap] using hcoe m\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\n⊢ f ∈ Ideal.map C I ↔ ∀ (m : σ →₀ ℕ), coeff m f ∈ I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\n⊢ f ∈ Ideal.map C I → ∀ (m : σ →₀ ℕ), coeff m f ∈ I\n[PROOFSTEP]\nintro hf\n[GOAL]\ncase mp\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : f ∈ Ideal.map C I\n⊢ ∀ (m : σ →₀ ℕ), coeff m f ∈ I\n[PROOFSTEP]\napply @Submodule.span_induction _ _ _ _ Semiring.toModule f _ _ hf\n[GOAL]\ncase mp.Hs\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : f ∈ Ideal.map C I\n⊢ ∀ (x : MvPolynomial σ R), x ∈ ↑C '' ↑I → ∀ (m : σ →₀ ℕ), coeff m x ∈ I\n[PROOFSTEP]\nintro f hf n\n[GOAL]\ncase mp.Hs\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf✝ : MvPolynomial σ R\nhf✝ : f✝ ∈ Ideal.map C I\nf : MvPolynomial σ R\nhf : f ∈ ↑C '' ↑I\nn : σ →₀ ℕ\n⊢ coeff n f ∈ I\n[PROOFSTEP]\ncases' (Set.mem_image _ _ _).mp hf with x hx\n[GOAL]\ncase mp.Hs.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf✝ : MvPolynomial σ R\nhf✝ : f✝ ∈ Ideal.map C I\nf : MvPolynomial σ R\nhf : f ∈ ↑C '' ↑I\nn : σ →₀ ℕ\nx : R\nhx : x ∈ ↑I ∧ ↑C x = f\n⊢ coeff n f ∈ I\n[PROOFSTEP]\nrw [← hx.right, coeff_C]\n[GOAL]\ncase mp.Hs.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf✝ : MvPolynomial σ R\nhf✝ : f✝ ∈ Ideal.map C I\nf : MvPolynomial σ R\nhf : f ∈ ↑C '' ↑I\nn : σ →₀ ℕ\nx : R\nhx : x ∈ ↑I ∧ ↑C x = f\n⊢ (if 0 = n then x else 0) ∈ I\n[PROOFSTEP]\nby_cases h : n = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf✝ : MvPolynomial σ R\nhf✝ : f✝ ∈ Ideal.map C I\nf : MvPolynomial σ R\nhf : f ∈ ↑C '' ↑I\nn : σ →₀ ℕ\nx : R\nhx : x ∈ ↑I ∧ ↑C x = f\nh : n = 0\n⊢ (if 0 = n then x else 0) ∈ I\n[PROOFSTEP]\nsimpa [h] using hx.left\n[GOAL]\ncase neg\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf✝ : MvPolynomial σ R\nhf✝ : f✝ ∈ Ideal.map C I\nf : MvPolynomial σ R\nhf : f ∈ ↑C '' ↑I\nn : σ →₀ ℕ\nx : R\nhx : x ∈ ↑I ∧ ↑C x = f\nh : ¬n = 0\n⊢ (if 0 = n then x else 0) ∈ I\n[PROOFSTEP]\nsimp [Ne.symm h]\n[GOAL]\ncase mp.H0\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : f ∈ Ideal.map C I\n⊢ ∀ (m : σ →₀ ℕ), coeff m 0 ∈ I\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.H1\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : f ∈ Ideal.map C I\n⊢ ∀ (x y : MvPolynomial σ R),\n    (∀ (m : σ →₀ ℕ), coeff m x ∈ I) → (∀ (m : σ →₀ ℕ), coeff m y ∈ I) → ∀ (m : σ →₀ ℕ), coeff m (x + y) ∈ I\n[PROOFSTEP]\nexact fun f g hf hg n => by simp [I.add_mem (hf n) (hg n)]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf✝ : MvPolynomial σ R\nhf✝ : f✝ ∈ Ideal.map C I\nf g : MvPolynomial σ R\nhf : ∀ (m : σ →₀ ℕ), coeff m f ∈ I\nhg : ∀ (m : σ →₀ ℕ), coeff m g ∈ I\nn : σ →₀ ℕ\n⊢ coeff n (f + g) ∈ I\n[PROOFSTEP]\nsimp [I.add_mem (hf n) (hg n)]\n[GOAL]\ncase mp.H2\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : f ∈ Ideal.map C I\n⊢ ∀ (a x : MvPolynomial σ R), (∀ (m : σ →₀ ℕ), coeff m x ∈ I) → ∀ (m : σ →₀ ℕ), coeff m (a • x) ∈ I\n[PROOFSTEP]\nrefine' fun f g hg n => _\n[GOAL]\ncase mp.H2\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf✝ : MvPolynomial σ R\nhf : f✝ ∈ Ideal.map C I\nf g : MvPolynomial σ R\nhg : ∀ (m : σ →₀ ℕ), coeff m g ∈ I\nn : σ →₀ ℕ\n⊢ coeff n (f • g) ∈ I\n[PROOFSTEP]\nrw [smul_eq_mul, coeff_mul]\n[GOAL]\ncase mp.H2\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf✝ : MvPolynomial σ R\nhf : f✝ ∈ Ideal.map C I\nf g : MvPolynomial σ R\nhg : ∀ (m : σ →₀ ℕ), coeff m g ∈ I\nn : σ →₀ ℕ\n⊢ ∑ x in Finsupp.antidiagonal n, coeff x.fst f * coeff x.snd g ∈ I\n[PROOFSTEP]\nexact I.sum_mem fun c _ => I.mul_mem_left (f.coeff c.fst) (hg c.snd)\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\n⊢ (∀ (m : σ →₀ ℕ), coeff m f ∈ I) → f ∈ Ideal.map C I\n[PROOFSTEP]\nintro hf\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : ∀ (m : σ →₀ ℕ), coeff m f ∈ I\n⊢ f ∈ Ideal.map C I\n[PROOFSTEP]\nrw [as_sum f]\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : ∀ (m : σ →₀ ℕ), coeff m f ∈ I\n⊢ ∑ v in support f, ↑(monomial v) (coeff v f) ∈ Ideal.map C I\n[PROOFSTEP]\nsuffices ∀ m ∈ f.support, monomial m (coeff m f) ∈ (Ideal.map C I : Ideal (MvPolynomial σ R)) by\n  exact Submodule.sum_mem _ this\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : ∀ (m : σ →₀ ℕ), coeff m f ∈ I\nthis : ∀ (m : σ →₀ ℕ), m ∈ support f → ↑(monomial m) (coeff m f) ∈ Ideal.map C I\n⊢ ∑ v in support f, ↑(monomial v) (coeff v f) ∈ Ideal.map C I\n[PROOFSTEP]\nexact Submodule.sum_mem _ this\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : ∀ (m : σ →₀ ℕ), coeff m f ∈ I\n⊢ ∀ (m : σ →₀ ℕ), m ∈ support f → ↑(monomial m) (coeff m f) ∈ Ideal.map C I\n[PROOFSTEP]\nintro m _\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : ∀ (m : σ →₀ ℕ), coeff m f ∈ I\nm : σ →₀ ℕ\na✝ : m ∈ support f\n⊢ ↑(monomial m) (coeff m f) ∈ Ideal.map C I\n[PROOFSTEP]\nrw [← mul_one (coeff m f), ← C_mul_monomial]\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : ∀ (m : σ →₀ ℕ), coeff m f ∈ I\nm : σ →₀ ℕ\na✝ : m ∈ support f\n⊢ ↑C (coeff m f) * ↑(monomial m) 1 ∈ Ideal.map C I\n[PROOFSTEP]\nsuffices C (coeff m f) ∈ (Ideal.map C I : Ideal (MvPolynomial σ R)) by exact Ideal.mul_mem_right _ _ this\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : ∀ (m : σ →₀ ℕ), coeff m f ∈ I\nm : σ →₀ ℕ\na✝ : m ∈ support f\nthis : ↑C (coeff m f) ∈ Ideal.map C I\n⊢ ↑C (coeff m f) * ↑(monomial m) 1 ∈ Ideal.map C I\n[PROOFSTEP]\nexact Ideal.mul_mem_right _ _ this\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : ∀ (m : σ →₀ ℕ), coeff m f ∈ I\nm : σ →₀ ℕ\na✝ : m ∈ support f\n⊢ ↑C (coeff m f) ∈ Ideal.map C I\n[PROOFSTEP]\napply Ideal.mem_map_of_mem _\n[GOAL]\ncase mpr\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : MvPolynomial σ R\nhf : ∀ (m : σ →₀ ℕ), coeff m f ∈ I\nm : σ →₀ ℕ\na✝ : m ∈ support f\n⊢ coeff m f ∈ I\n[PROOFSTEP]\nexact hf m\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : R →+* S\n⊢ RingHom.ker (map f) = Ideal.map C (RingHom.ker f)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : R →+* S\nx✝ : MvPolynomial σ R\n⊢ x✝ ∈ RingHom.ker (map f) ↔ x✝ ∈ Ideal.map C (RingHom.ker f)\n[PROOFSTEP]\nrw [MvPolynomial.mem_map_C_iff, RingHom.mem_ker, MvPolynomial.ext_iff]\n[GOAL]\ncase h\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : R →+* S\nx✝ : MvPolynomial σ R\n⊢ (∀ (m : σ →₀ ℕ), coeff m (↑(map f) x✝) = coeff m 0) ↔ ∀ (m : σ →₀ ℕ), coeff m x✝ ∈ RingHom.ker f\n[PROOFSTEP]\nsimp_rw [coeff_map, coeff_zero, RingHom.mem_ker]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nD : Type u\ninst✝² : CommRing D\ninst✝¹ : IsDomain D\ninst✝ : UniqueFactorizationMonoid D\n⊢ UniqueFactorizationMonoid D[X]\n[PROOFSTEP]\nhaveI : NormalizationMonoid D := Inhabited.default\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nD : Type u\ninst✝² : CommRing D\ninst✝¹ : IsDomain D\ninst✝ : UniqueFactorizationMonoid D\nthis : NormalizationMonoid D\n⊢ UniqueFactorizationMonoid D[X]\n[PROOFSTEP]\nhaveI := toNormalizedGCDMonoid D\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nD : Type u\ninst✝² : CommRing D\ninst✝¹ : IsDomain D\ninst✝ : UniqueFactorizationMonoid D\nthis✝ : NormalizationMonoid D\nthis : NormalizedGCDMonoid D\n⊢ UniqueFactorizationMonoid D[X]\n[PROOFSTEP]\nexact ufm_of_gcd_of_wfDvdMonoid\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nD : Type u\ninst✝² : CommRing D\ninst✝¹ : IsDomain D\ninst✝ : UniqueFactorizationMonoid D\nd : ℕ\n⊢ CancelCommMonoidWithZero (MvPolynomial (Fin d) D)[X]\n[PROOFSTEP]\napply IsDomain.toCancelCommMonoidWithZero\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nD : Type u\ninst✝³ : CommRing D\ninst✝² : IsDomain D\ninst✝¹ : UniqueFactorizationMonoid D\nd : ℕ\ninst✝ : Fintype σ\n⊢ UniqueFactorizationMonoid (MvPolynomial (Fin (Fintype.card σ)) D)\n[PROOFSTEP]\ninduction' Fintype.card σ with d hd\n[GOAL]\ncase zero\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nD : Type u\ninst✝³ : CommRing D\ninst✝² : IsDomain D\ninst✝¹ : UniqueFactorizationMonoid D\nd : ℕ\ninst✝ : Fintype σ\n⊢ UniqueFactorizationMonoid (MvPolynomial (Fin Nat.zero) D)\n[PROOFSTEP]\napply (isEmptyAlgEquiv D (Fin 0)).toMulEquiv.symm.uniqueFactorizationMonoid\n[GOAL]\ncase zero\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nD : Type u\ninst✝³ : CommRing D\ninst✝² : IsDomain D\ninst✝¹ : UniqueFactorizationMonoid D\nd : ℕ\ninst✝ : Fintype σ\n⊢ UniqueFactorizationMonoid D\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase succ\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nD : Type u\ninst✝³ : CommRing D\ninst✝² : IsDomain D\ninst✝¹ : UniqueFactorizationMonoid D\nd✝ : ℕ\ninst✝ : Fintype σ\nd : ℕ\nhd : UniqueFactorizationMonoid (MvPolynomial (Fin d) D)\n⊢ UniqueFactorizationMonoid (MvPolynomial (Fin (Nat.succ d)) D)\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one d]\n[GOAL]\ncase succ\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nD : Type u\ninst✝³ : CommRing D\ninst✝² : IsDomain D\ninst✝¹ : UniqueFactorizationMonoid D\nd✝ : ℕ\ninst✝ : Fintype σ\nd : ℕ\nhd : UniqueFactorizationMonoid (MvPolynomial (Fin d) D)\n⊢ UniqueFactorizationMonoid (MvPolynomial (Fin (d + 1)) D)\n[PROOFSTEP]\napply @MulEquiv.uniqueFactorizationMonoid _ _ (_) (_)\n[GOAL]\ncase succ.e\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nD : Type u\ninst✝³ : CommRing D\ninst✝² : IsDomain D\ninst✝¹ : UniqueFactorizationMonoid D\nd✝ : ℕ\ninst✝ : Fintype σ\nd : ℕ\nhd : UniqueFactorizationMonoid (MvPolynomial (Fin d) D)\n⊢ ?m.1042176 ≃* MvPolynomial (Fin (d + 1)) D\n[PROOFSTEP]\nexact (finSuccEquiv D d).toMulEquiv.symm\n[GOAL]\ncase succ.hα\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nD : Type u\ninst✝³ : CommRing D\ninst✝² : IsDomain D\ninst✝¹ : UniqueFactorizationMonoid D\nd✝ : ℕ\ninst✝ : Fintype σ\nd : ℕ\nhd : UniqueFactorizationMonoid (MvPolynomial (Fin d) D)\n⊢ UniqueFactorizationMonoid (MvPolynomial (Fin d) D)[X]\n[PROOFSTEP]\napply @Polynomial.uniqueFactorizationMonoid (MvPolynomial (Fin d) D) _ _ ?_\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\nD : Type u\ninst✝³ : CommRing D\ninst✝² : IsDomain D\ninst✝¹ : UniqueFactorizationMonoid D\nd✝ : ℕ\ninst✝ : Fintype σ\nd : ℕ\nhd : UniqueFactorizationMonoid (MvPolynomial (Fin d) D)\n⊢ UniqueFactorizationMonoid (MvPolynomial (Fin d) D)\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nD : Type u\ninst✝² : CommRing D\ninst✝¹ : IsDomain D\ninst✝ : UniqueFactorizationMonoid D\nd : ℕ\n⊢ UniqueFactorizationMonoid (MvPolynomial σ D)\n[PROOFSTEP]\nrw [iff_exists_prime_factors]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nD : Type u\ninst✝² : CommRing D\ninst✝¹ : IsDomain D\ninst✝ : UniqueFactorizationMonoid D\nd : ℕ\n⊢ ∀ (a : MvPolynomial σ D), a ≠ 0 → ∃ f, (∀ (b : MvPolynomial σ D), b ∈ f → Prime b) ∧ Associated (Multiset.prod f) a\n[PROOFSTEP]\nintro a ha\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nD : Type u\ninst✝² : CommRing D\ninst✝¹ : IsDomain D\ninst✝ : UniqueFactorizationMonoid D\nd : ℕ\na : MvPolynomial σ D\nha : a ≠ 0\n⊢ ∃ f, (∀ (b : MvPolynomial σ D), b ∈ f → Prime b) ∧ Associated (Multiset.prod f) a\n[PROOFSTEP]\nobtain ⟨s, a', rfl⟩ := exists_finset_rename a\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nD : Type u\ninst✝² : CommRing D\ninst✝¹ : IsDomain D\ninst✝ : UniqueFactorizationMonoid D\nd : ℕ\ns : Finset σ\na' : MvPolynomial { x // x ∈ s } D\nha : ↑(rename Subtype.val) a' ≠ 0\n⊢ ∃ f, (∀ (b : MvPolynomial σ D), b ∈ f → Prime b) ∧ Associated (Multiset.prod f) (↑(rename Subtype.val) a')\n[PROOFSTEP]\nobtain ⟨w, h, u, hw⟩ :=\n  iff_exists_prime_factors.1 (uniqueFactorizationMonoid_of_fintype s) a' fun h => ha <| by simp [h]\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nD : Type u\ninst✝² : CommRing D\ninst✝¹ : IsDomain D\ninst✝ : UniqueFactorizationMonoid D\nd : ℕ\ns : Finset σ\na' : MvPolynomial { x // x ∈ s } D\nha : ↑(rename Subtype.val) a' ≠ 0\nh : a' = 0\n⊢ ↑(rename Subtype.val) a' = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nD : Type u\ninst✝² : CommRing D\ninst✝¹ : IsDomain D\ninst✝ : UniqueFactorizationMonoid D\nd : ℕ\ns : Finset σ\na' : MvPolynomial { x // x ∈ s } D\nha : ↑(rename Subtype.val) a' ≠ 0\nw : Multiset (MvPolynomial { x // x ∈ s } D)\nh : ∀ (b : MvPolynomial { x // x ∈ s } D), b ∈ w → Prime b\nu : (MvPolynomial { x // x ∈ s } D)ˣ\nhw : Multiset.prod w * ↑u = a'\n⊢ ∃ f, (∀ (b : MvPolynomial σ D), b ∈ f → Prime b) ∧ Associated (Multiset.prod f) (↑(rename Subtype.val) a')\n[PROOFSTEP]\nexact\n  ⟨w.map (rename (↑)), fun b hb =>\n    let ⟨b', hb', he⟩ := Multiset.mem_map.1 hb\n    he ▸ (prime_rename_iff ↑s).2 (h b' hb'),\n    Units.map (@rename s σ D _ (↑)).toRingHom.toMonoidHom u, by erw [Multiset.prod_hom, ← map_mul, hw]⟩\n[GOAL]\nR : Type u\nS : Type u_1\nσ : Type v\nM : Type w\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nD : Type u\ninst✝² : CommRing D\ninst✝¹ : IsDomain D\ninst✝ : UniqueFactorizationMonoid D\nd : ℕ\ns : Finset σ\na' : MvPolynomial { x // x ∈ s } D\nha : ↑(rename Subtype.val) a' ≠ 0\nw : Multiset (MvPolynomial { x // x ∈ s } D)\nh : ∀ (b : MvPolynomial { x // x ∈ s } D), b ∈ w → Prime b\nu : (MvPolynomial { x // x ∈ s } D)ˣ\nhw : Multiset.prod w * ↑u = a'\n⊢ Multiset.prod (Multiset.map (↑(rename Subtype.val)) w) * ↑(↑(Units.map ↑↑(rename Subtype.val)) u) =\n    ↑(rename Subtype.val) a'\n[PROOFSTEP]\nerw [Multiset.prod_hom, ← map_mul, hw]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.Basic", "llama_tokens": 121822, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3644596108592753}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ iteratedDerivWithin n f univ = iteratedDeriv n f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\n⊢ iteratedDerivWithin n f univ x = iteratedDeriv n f x\n[PROOFSTEP]\nrw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ iteratedDerivWithin n f s =\n    ↑(LinearIsometryEquiv.symm (ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F)) ∘ iteratedFDerivWithin 𝕜 n f s\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\n⊢ iteratedDerivWithin n f s x =\n    (↑(LinearIsometryEquiv.symm (ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F)) ∘ iteratedFDerivWithin 𝕜 n f s) x\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ iteratedFDerivWithin 𝕜 n f s = ↑(ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F) ∘ iteratedDerivWithin n f s\n[PROOFSTEP]\nrw [iteratedDerivWithin_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm, Function.left_id]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nm : Fin n → 𝕜\n⊢ ↑(iteratedFDerivWithin 𝕜 n f s x) m = (∏ i : Fin n, m i) • iteratedDerivWithin n f s x\n[PROOFSTEP]\nrw [iteratedDerivWithin_eq_iteratedFDerivWithin, ← ContinuousMultilinearMap.map_smul_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nm : Fin n → 𝕜\n⊢ ↑(iteratedFDerivWithin 𝕜 n f s x) m = ↑(iteratedFDerivWithin 𝕜 n f s x) fun i => m i • 1\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ ‖iteratedFDerivWithin 𝕜 n f s x‖ = ‖iteratedDerivWithin n f s x‖\n[PROOFSTEP]\nrw [iteratedDerivWithin_eq_equiv_comp, Function.comp_apply, LinearIsometryEquiv.norm_map]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ iteratedDerivWithin 0 f s = f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\n⊢ iteratedDerivWithin 0 f s x = f x\n[PROOFSTEP]\nsimp [iteratedDerivWithin]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\nh : UniqueDiffWithinAt 𝕜 s x\n⊢ iteratedDerivWithin 1 f s x = derivWithin f s x\n[PROOFSTEP]\nsimp only [iteratedDerivWithin, iteratedFDerivWithin_one_apply h]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\nh : UniqueDiffWithinAt 𝕜 s x\n⊢ ↑(fderivWithin 𝕜 f s x) 1 = derivWithin f s x\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nn : ℕ∞\nHcont : ∀ (m : ℕ), ↑m ≤ n → ContinuousOn (fun x => iteratedDerivWithin m f s x) s\nHdiff : ∀ (m : ℕ), ↑m < n → DifferentiableOn 𝕜 (fun x => iteratedDerivWithin m f s x) s\n⊢ ContDiffOn 𝕜 n f s\n[PROOFSTEP]\napply contDiffOn_of_continuousOn_differentiableOn\n[GOAL]\ncase Hcont\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nn : ℕ∞\nHcont : ∀ (m : ℕ), ↑m ≤ n → ContinuousOn (fun x => iteratedDerivWithin m f s x) s\nHdiff : ∀ (m : ℕ), ↑m < n → DifferentiableOn 𝕜 (fun x => iteratedDerivWithin m f s x) s\n⊢ ∀ (m : ℕ), ↑m ≤ n → ContinuousOn (fun x => iteratedFDerivWithin 𝕜 m f s x) s\n[PROOFSTEP]\nsimpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff]\n[GOAL]\ncase Hdiff\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nn : ℕ∞\nHcont : ∀ (m : ℕ), ↑m ≤ n → ContinuousOn (fun x => iteratedDerivWithin m f s x) s\nHdiff : ∀ (m : ℕ), ↑m < n → DifferentiableOn 𝕜 (fun x => iteratedDerivWithin m f s x) s\n⊢ ∀ (m : ℕ), ↑m < n → DifferentiableOn 𝕜 (fun x => iteratedFDerivWithin 𝕜 m f s x) s\n[PROOFSTEP]\nsimpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nn : ℕ∞\nh : ∀ (m : ℕ), ↑m ≤ n → DifferentiableOn 𝕜 (iteratedDerivWithin m f s) s\n⊢ ContDiffOn 𝕜 n f s\n[PROOFSTEP]\napply contDiffOn_of_differentiableOn\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nn : ℕ∞\nh : ∀ (m : ℕ), ↑m ≤ n → DifferentiableOn 𝕜 (iteratedDerivWithin m f s) s\n⊢ ∀ (m : ℕ), ↑m ≤ n → DifferentiableOn 𝕜 (iteratedFDerivWithin 𝕜 m f s) s\n[PROOFSTEP]\nsimpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nn : ℕ∞\nm : ℕ\nh : ContDiffOn 𝕜 n f s\nhmn : ↑m ≤ n\nhs : UniqueDiffOn 𝕜 s\n⊢ ContinuousOn (iteratedDerivWithin m f s) s\n[PROOFSTEP]\nsimpa only [iteratedDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff] using\n  h.continuousOn_iteratedFDerivWithin hmn hs\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nn : ℕ∞\nm : ℕ\nh : ContDiffWithinAt 𝕜 n f s x\nhmn : ↑m < n\nhs : UniqueDiffOn 𝕜 (insert x s)\n⊢ DifferentiableWithinAt 𝕜 (iteratedDerivWithin m f s) s x\n[PROOFSTEP]\nsimpa only [iteratedDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableWithinAt_iff] using\n  h.differentiableWithinAt_iteratedFDerivWithin hmn hs\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ : 𝕜\nn : ℕ∞\nm : ℕ\nh : ContDiffOn 𝕜 n f s\nhmn : ↑m < n\nhs : UniqueDiffOn 𝕜 s\nx : 𝕜\nhx : x ∈ s\n⊢ UniqueDiffOn 𝕜 (insert x s)\n[PROOFSTEP]\nrwa [insert_eq_of_mem hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nn : ℕ∞\nhs : UniqueDiffOn 𝕜 s\n⊢ ContDiffOn 𝕜 n f s ↔\n    (∀ (m : ℕ), ↑m ≤ n → ContinuousOn (iteratedDerivWithin m f s) s) ∧\n      ∀ (m : ℕ), ↑m < n → DifferentiableOn 𝕜 (iteratedDerivWithin m f s) s\n[PROOFSTEP]\nsimp only [contDiffOn_iff_continuousOn_differentiableOn hs, iteratedFDerivWithin_eq_equiv_comp,\n  LinearIsometryEquiv.comp_continuousOn_iff, LinearIsometryEquiv.comp_differentiableOn_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\nhxs : UniqueDiffWithinAt 𝕜 s x\n⊢ iteratedDerivWithin (n + 1) f s x = derivWithin (iteratedDerivWithin n f s) s x\n[PROOFSTEP]\nrw [iteratedDerivWithin_eq_iteratedFDerivWithin, iteratedFDerivWithin_succ_apply_left,\n  iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_fderivWithin _ hxs, derivWithin]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\nhxs : UniqueDiffWithinAt 𝕜 s x\n⊢ ↑(↑(ContinuousLinearMap.comp\n              (↑(ContinuousLinearEquiv.mk (ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F).toLinearEquiv))\n              (fderivWithin 𝕜 (iteratedDerivWithin n f s) s x))\n          1)\n      (Fin.tail fun x => 1) =\n    ↑(fderivWithin 𝕜 (iteratedDerivWithin n f s) s x) 1\n[PROOFSTEP]\nchange\n  ((ContinuousMultilinearMap.mkPiField 𝕜 (Fin n) ((fderivWithin 𝕜 (iteratedDerivWithin n f s) s x : 𝕜 → F) 1) :\n        (Fin n → 𝕜) → F)\n      fun i : Fin n => 1) =\n    (fderivWithin 𝕜 (iteratedDerivWithin n f s) s x : 𝕜 → F) 1\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\nhxs : UniqueDiffWithinAt 𝕜 s x\n⊢ (↑(ContinuousMultilinearMap.mkPiField 𝕜 (Fin n) (↑(fderivWithin 𝕜 (iteratedDerivWithin n f s) s x) 1)) fun i => 1) =\n    ↑(fderivWithin 𝕜 (iteratedDerivWithin n f s) s x) 1\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\nhs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\n⊢ iteratedDerivWithin n f s x = (fun g => derivWithin g s)^[n] f x\n[PROOFSTEP]\ninduction' n with n IH generalizing x\n[GOAL]\ncase zero\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝¹ x✝ : 𝕜\nhs : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\nx : 𝕜\nhx : x ∈ s\n⊢ iteratedDerivWithin Nat.zero f s x = (fun g => derivWithin g s)^[Nat.zero] f x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝¹ x✝ : 𝕜\nhs : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\nn : ℕ\nIH : ∀ {x : 𝕜}, x ∈ s → iteratedDerivWithin n f s x = (fun g => derivWithin g s)^[n] f x\nx : 𝕜\nhx : x ∈ s\n⊢ iteratedDerivWithin (Nat.succ n) f s x = (fun g => derivWithin g s)^[Nat.succ n] f x\n[PROOFSTEP]\nrw [iteratedDerivWithin_succ (hs x hx), Function.iterate_succ']\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝¹ x✝ : 𝕜\nhs : UniqueDiffOn 𝕜 s\nhx✝ : x✝ ∈ s\nn : ℕ\nIH : ∀ {x : 𝕜}, x ∈ s → iteratedDerivWithin n f s x = (fun g => derivWithin g s)^[n] f x\nx : 𝕜\nhx : x ∈ s\n⊢ derivWithin (iteratedDerivWithin n f s) s x = ((fun g => derivWithin g s) ∘ (fun g => derivWithin g s)^[n]) f x\n[PROOFSTEP]\nexact derivWithin_congr (fun y hy => IH hy) (IH hx)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\nhxs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\n⊢ iteratedDerivWithin (n + 1) f s x = iteratedDerivWithin n (derivWithin f s) s x\n[PROOFSTEP]\nrw [iteratedDerivWithin_eq_iterate hxs hx, iteratedDerivWithin_eq_iterate hxs hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\nhxs : UniqueDiffOn 𝕜 s\nhx : x ∈ s\n⊢ (fun g => derivWithin g s)^[n + 1] f x = (fun g => derivWithin g s)^[n] (derivWithin f s) x\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ iteratedDeriv n f =\n    ↑(LinearIsometryEquiv.symm (ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F)) ∘ iteratedFDeriv 𝕜 n f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\n⊢ iteratedDeriv n f x =\n    (↑(LinearIsometryEquiv.symm (ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F)) ∘ iteratedFDeriv 𝕜 n f) x\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ iteratedFDeriv 𝕜 n f = ↑(ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F) ∘ iteratedDeriv n f\n[PROOFSTEP]\nrw [iteratedDeriv_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm, Function.left_id]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nm : Fin n → 𝕜\n⊢ ↑(iteratedFDeriv 𝕜 n f x) m = (∏ i : Fin n, m i) • iteratedDeriv n f x\n[PROOFSTEP]\nrw [iteratedDeriv_eq_iteratedFDeriv, ← ContinuousMultilinearMap.map_smul_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nm : Fin n → 𝕜\n⊢ ↑(iteratedFDeriv 𝕜 n f x) m = ↑(iteratedFDeriv 𝕜 n f x) fun i => m i • 1\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ ‖iteratedFDeriv 𝕜 n f x‖ = ‖iteratedDeriv n f x‖\n[PROOFSTEP]\nrw [iteratedDeriv_eq_equiv_comp, Function.comp_apply, LinearIsometryEquiv.norm_map]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ iteratedDeriv 0 f = f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\n⊢ iteratedDeriv 0 f x = f x\n[PROOFSTEP]\nsimp [iteratedDeriv]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ iteratedDeriv 1 f = deriv f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\n⊢ iteratedDeriv 1 f x = deriv f x\n[PROOFSTEP]\nsimp [iteratedDeriv]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\n⊢ ↑(fderiv 𝕜 f x) 1 = deriv f x\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn✝ : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\nn : ℕ∞\n⊢ ContDiff 𝕜 n f ↔\n    (∀ (m : ℕ), ↑m ≤ n → Continuous (iteratedDeriv m f)) ∧ ∀ (m : ℕ), ↑m < n → Differentiable 𝕜 (iteratedDeriv m f)\n[PROOFSTEP]\nsimp only [contDiff_iff_continuous_differentiable, iteratedFDeriv_eq_equiv_comp,\n  LinearIsometryEquiv.comp_continuous_iff, LinearIsometryEquiv.comp_differentiable_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ iteratedDeriv (n + 1) f = deriv (iteratedDeriv n f)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\n⊢ iteratedDeriv (n + 1) f x = deriv (iteratedDeriv n f) x\n[PROOFSTEP]\nrw [← iteratedDerivWithin_univ, ← iteratedDerivWithin_univ, ← derivWithin_univ]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\n⊢ iteratedDerivWithin (n + 1) f univ x = derivWithin (iteratedDerivWithin n f univ) univ x\n[PROOFSTEP]\nexact iteratedDerivWithin_succ uniqueDiffWithinAt_univ\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ iteratedDeriv n f = deriv^[n] f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\n⊢ iteratedDeriv n f x = deriv^[n] f x\n[PROOFSTEP]\nrw [← iteratedDerivWithin_univ]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝ x : 𝕜\n⊢ iteratedDerivWithin n f univ x = deriv^[n] f x\n[PROOFSTEP]\nconvert iteratedDerivWithin_eq_iterate uniqueDiffOn_univ (F := F) (mem_univ x)\n[GOAL]\ncase h.e'_3.h.e'_1.h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx✝¹ x : 𝕜\nx✝ : 𝕜 → F\n⊢ deriv x✝ = derivWithin x✝ univ\n[PROOFSTEP]\nsimp [derivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ iteratedDeriv (n + 1) f = iteratedDeriv n (deriv f)\n[PROOFSTEP]\nrw [iteratedDeriv_eq_iterate, iteratedDeriv_eq_iterate]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nE : Type u_3\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nn : ℕ\nf : 𝕜 → F\ns : Set 𝕜\nx : 𝕜\n⊢ deriv^[n + 1] f = deriv^[n] (deriv f)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.IteratedDeriv", "llama_tokens": 10315, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3644596108592753}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\n[PROOFSTEP]\nclassical\nrevert hσ σ hfg\napply\n  Finset.induction_on_max_value (fun i ↦ toLex (g i, f i)) (p := fun t ↦\n    ∀ {σ : Perm ι}, MonovaryOn f g t → {x | σ x ≠ x} ⊆ t → (∑ i in t, f i • g (σ i)) ≤ ∑ i in t, f i • g i) s\n· simp only [le_rfl, Finset.sum_empty, imp_true_iff]\nintro a s has hamax hind σ hfg hσ\nset τ : Perm ι := σ.trans (swap a (σ a)) with hτ\nhave hτs : {x | τ x ≠ x} ⊆ s := by\n  intro x hx\n  simp only [Ne.def, Set.mem_setOf_eq, Equiv.coe_trans, Equiv.swap_comp_apply] at hx \n  split_ifs at hx  with h₁ h₂\n  · obtain rfl | hax := eq_or_ne x a\n    · contradiction\n    · exact mem_of_mem_insert_of_ne (hσ fun h ↦ hax <| h.symm.trans h₁) hax\n  · exact (hx <| σ.injective h₂.symm).elim\n  · exact mem_of_mem_insert_of_ne (hσ hx) (ne_of_apply_ne _ h₂)\nspecialize hind (hfg.subset <| subset_insert _ _) hτs\nsimp_rw [sum_insert has]\nrefine' le_trans _ (add_le_add_left hind _)\nobtain hσa | hσa := eq_or_ne a (σ a)\n· rw [hτ, ← hσa, swap_self, trans_refl]\nhave h1s : σ⁻¹ a ∈ s := by\n  rw [Ne.def, ← inv_eq_iff_eq] at hσa \n  refine' mem_of_mem_insert_of_ne (hσ fun h ↦ hσa _) hσa\n  rwa [apply_inv_self, eq_comm] at h \nsimp only [← s.sum_erase_add _ h1s, add_comm]\nrw [← add_assoc, ← add_assoc]\nsimp only [hτ, swap_apply_left, Function.comp_apply, Equiv.coe_trans, apply_inv_self]\nrefine' add_le_add (smul_add_smul_le_smul_add_smul' _ _) (sum_congr rfl fun x hx ↦ _).le\n· specialize hamax (σ⁻¹ a) h1s\n  rw [Prod.Lex.le_iff] at hamax \n  cases' hamax with hamax hamax\n  · exact hfg (mem_insert_of_mem h1s) (mem_insert_self _ _) hamax\n  · exact hamax.2\n· specialize hamax (σ a) (mem_of_mem_insert_of_ne (hσ <| σ.injective.ne hσa.symm) hσa.symm)\n  rw [Prod.Lex.le_iff] at hamax \n  cases' hamax with hamax hamax\n  · exact hamax.le\n  · exact hamax.1.le\n· rw [mem_erase, Ne.def, eq_inv_iff_eq] at hx \n  rw [swap_apply_of_ne_of_ne hx.1 (σ.injective.ne _)]\n  rintro rfl\n  exact has hx.2\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\n[PROOFSTEP]\nrevert hσ σ hfg\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nf : ι → α\ng : ι → β\n⊢ ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\n[PROOFSTEP]\napply\n  Finset.induction_on_max_value (fun i ↦ toLex (g i, f i)) (p := fun t ↦\n    ∀ {σ : Perm ι}, MonovaryOn f g t → {x | σ x ≠ x} ⊆ t → (∑ i in t, f i • g (σ i)) ≤ ∑ i in t, f i • g i) s\n[GOAL]\ncase h0\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nf : ι → α\ng : ι → β\n⊢ ∀ {σ : Perm ι}, MonovaryOn f g ↑∅ → {x | ↑σ x ≠ x} ⊆ ↑∅ → ∑ i in ∅, f i • g (↑σ i) ≤ ∑ i in ∅, f i • g i\n[PROOFSTEP]\nsimp only [le_rfl, Finset.sum_empty, imp_true_iff]\n[GOAL]\ncase step\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nf : ι → α\ng : ι → β\n⊢ ∀ (a : ι) (s : Finset ι),\n    ¬a ∈ s →\n      (∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)) →\n        (∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i) →\n          ∀ {σ : Perm ι},\n            MonovaryOn f g ↑(insert a s) →\n              {x | ↑σ x ≠ x} ⊆ ↑(insert a s) → ∑ i in insert a s, f i • g (↑σ i) ≤ ∑ i in insert a s, f i • g i\n[PROOFSTEP]\nintro a s has hamax hind σ hfg hσ\n[GOAL]\ncase step\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nhind : ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\n⊢ ∑ i in insert a s, f i • g (↑σ i) ≤ ∑ i in insert a s, f i • g i\n[PROOFSTEP]\nset τ : Perm ι := σ.trans (swap a (σ a)) with hτ\n[GOAL]\ncase step\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nhind : ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\n⊢ ∑ i in insert a s, f i • g (↑σ i) ≤ ∑ i in insert a s, f i • g i\n[PROOFSTEP]\nhave hτs : {x | τ x ≠ x} ⊆ s := by\n  intro x hx\n  simp only [Ne.def, Set.mem_setOf_eq, Equiv.coe_trans, Equiv.swap_comp_apply] at hx \n  split_ifs at hx  with h₁ h₂\n  · obtain rfl | hax := eq_or_ne x a\n    · contradiction\n    · exact mem_of_mem_insert_of_ne (hσ fun h ↦ hax <| h.symm.trans h₁) hax\n  · exact (hx <| σ.injective h₂.symm).elim\n  · exact mem_of_mem_insert_of_ne (hσ hx) (ne_of_apply_ne _ h₂)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nhind : ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\n⊢ {x | ↑τ x ≠ x} ⊆ ↑s\n[PROOFSTEP]\nintro x hx\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nhind : ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nx : ι\nhx : x ∈ {x | ↑τ x ≠ x}\n⊢ x ∈ ↑s\n[PROOFSTEP]\nsimp only [Ne.def, Set.mem_setOf_eq, Equiv.coe_trans, Equiv.swap_comp_apply] at hx \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nhind : ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nx : ι\nhx : ¬(if ↑σ x = a then ↑σ a else if ↑σ x = ↑σ a then a else ↑σ x) = x\n⊢ x ∈ ↑s\n[PROOFSTEP]\nsplit_ifs at hx  with h₁ h₂\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nhind : ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nx : ι\nh₁ : ↑σ x = a\nhx : ¬↑σ a = x\n⊢ x ∈ ↑s\n[PROOFSTEP]\nobtain rfl | hax := eq_or_ne x a\n[GOAL]\ncase pos.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\ns : Finset ι\nhind : ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\nσ : Perm ι\nx : ι\nhas : ¬x ∈ s\nhamax : ∀ (x_1 : ι), x_1 ∈ s → ↑toLex (g x_1, f x_1) ≤ ↑toLex (g x, f x)\nhfg : MonovaryOn f g ↑(insert x s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert x s)\nτ : Perm ι := σ.trans (Equiv.swap x (↑σ x))\nhτ : τ = σ.trans (Equiv.swap x (↑σ x))\nh₁ : ↑σ x = x\nhx : ¬↑σ x = x\n⊢ x ∈ ↑s\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase pos.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nhind : ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nx : ι\nh₁ : ↑σ x = a\nhx : ¬↑σ a = x\nhax : x ≠ a\n⊢ x ∈ ↑s\n[PROOFSTEP]\nexact mem_of_mem_insert_of_ne (hσ fun h ↦ hax <| h.symm.trans h₁) hax\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nhind : ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nx : ι\nh₁ : ¬↑σ x = a\nh₂ : ↑σ x = ↑σ a\nhx : ¬a = x\n⊢ x ∈ ↑s\n[PROOFSTEP]\nexact (hx <| σ.injective h₂.symm).elim\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nhind : ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nx : ι\nh₁ : ¬↑σ x = a\nh₂ : ¬↑σ x = ↑σ a\nhx : ¬↑σ x = x\n⊢ x ∈ ↑s\n[PROOFSTEP]\nexact mem_of_mem_insert_of_ne (hσ hx) (ne_of_apply_ne _ h₂)\n[GOAL]\ncase step\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nhind : ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | ↑σ x ≠ x} ⊆ ↑s → ∑ i in s, f i • g (↑σ i) ≤ ∑ i in s, f i • g i\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\n⊢ ∑ i in insert a s, f i • g (↑σ i) ≤ ∑ i in insert a s, f i • g i\n[PROOFSTEP]\nspecialize hind (hfg.subset <| subset_insert _ _) hτs\n[GOAL]\ncase step\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\n⊢ ∑ i in insert a s, f i • g (↑σ i) ≤ ∑ i in insert a s, f i • g i\n[PROOFSTEP]\nsimp_rw [sum_insert has]\n[GOAL]\ncase step\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\n⊢ f a • g (↑σ a) + ∑ x in s, f x • g (↑σ x) ≤ f a • g a + ∑ i in s, f i • g i\n[PROOFSTEP]\nrefine' le_trans _ (add_le_add_left hind _)\n[GOAL]\ncase step\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\n⊢ f a • g (↑σ a) + ∑ x in s, f x • g (↑σ x) ≤ f a • g a + ∑ i in s, f i • g (↑τ i)\n[PROOFSTEP]\nobtain hσa | hσa := eq_or_ne a (σ a)\n[GOAL]\ncase step.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a = ↑σ a\n⊢ f a • g (↑σ a) + ∑ x in s, f x • g (↑σ x) ≤ f a • g a + ∑ i in s, f i • g (↑τ i)\n[PROOFSTEP]\nrw [hτ, ← hσa, swap_self, trans_refl]\n[GOAL]\ncase step.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\n⊢ f a • g (↑σ a) + ∑ x in s, f x • g (↑σ x) ≤ f a • g a + ∑ i in s, f i • g (↑τ i)\n[PROOFSTEP]\nhave h1s : σ⁻¹ a ∈ s := by\n  rw [Ne.def, ← inv_eq_iff_eq] at hσa \n  refine' mem_of_mem_insert_of_ne (hσ fun h ↦ hσa _) hσa\n  rwa [apply_inv_self, eq_comm] at h \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\n⊢ ↑σ⁻¹ a ∈ s\n[PROOFSTEP]\nrw [Ne.def, ← inv_eq_iff_eq] at hσa \n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : ¬↑σ⁻¹ a = a\n⊢ ↑σ⁻¹ a ∈ s\n[PROOFSTEP]\nrefine' mem_of_mem_insert_of_ne (hσ fun h ↦ hσa _) hσa\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : ¬↑σ⁻¹ a = a\nh : ↑σ (↑σ⁻¹ a) = ↑σ⁻¹ a\n⊢ ↑σ⁻¹ a = a\n[PROOFSTEP]\nrwa [apply_inv_self, eq_comm] at h \n[GOAL]\ncase step.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\n⊢ f a • g (↑σ a) + ∑ x in s, f x • g (↑σ x) ≤ f a • g a + ∑ i in s, f i • g (↑τ i)\n[PROOFSTEP]\nsimp only [← s.sum_erase_add _ h1s, add_comm]\n[GOAL]\ncase step.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\n⊢ f a • g (↑σ a) + (f (↑σ⁻¹ a) • g (↑σ (↑σ⁻¹ a)) + ∑ x in erase s (↑σ⁻¹ a), f x • g (↑σ x)) ≤\n    f a • g a +\n      (f (↑σ⁻¹ a) • g (↑(σ.trans (Equiv.swap a (↑σ a))) (↑σ⁻¹ a)) +\n        ∑ x in erase s (↑σ⁻¹ a), f x • g (↑(σ.trans (Equiv.swap a (↑σ a))) x))\n[PROOFSTEP]\nrw [← add_assoc, ← add_assoc]\n[GOAL]\ncase step.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\n⊢ f a • g (↑σ a) + f (↑σ⁻¹ a) • g (↑σ (↑σ⁻¹ a)) + ∑ x in erase s (↑σ⁻¹ a), f x • g (↑σ x) ≤\n    f a • g a + f (↑σ⁻¹ a) • g (↑(σ.trans (Equiv.swap a (↑σ a))) (↑σ⁻¹ a)) +\n      ∑ x in erase s (↑σ⁻¹ a), f x • g (↑(σ.trans (Equiv.swap a (↑σ a))) x)\n[PROOFSTEP]\nsimp only [hτ, swap_apply_left, Function.comp_apply, Equiv.coe_trans, apply_inv_self]\n[GOAL]\ncase step.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\n⊢ f a • g (↑σ a) + f (↑σ⁻¹ a) • g a + ∑ x in erase s (↑σ⁻¹ a), f x • g (↑σ x) ≤\n    f a • g a + f (↑σ⁻¹ a) • g (↑σ a) + ∑ x in erase s (↑σ⁻¹ a), f x • g (↑(Equiv.swap a (↑σ a)) (↑σ x))\n[PROOFSTEP]\nrefine' add_le_add (smul_add_smul_le_smul_add_smul' _ _) (sum_congr rfl fun x hx ↦ _).le\n[GOAL]\ncase step.inr.refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\n⊢ f (↑σ⁻¹ a) ≤ f a\n[PROOFSTEP]\nspecialize hamax (σ⁻¹ a) h1s\n[GOAL]\ncase step.inr.refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\nhamax : ↑toLex (g (↑σ⁻¹ a), f (↑σ⁻¹ a)) ≤ ↑toLex (g a, f a)\n⊢ f (↑σ⁻¹ a) ≤ f a\n[PROOFSTEP]\nrw [Prod.Lex.le_iff] at hamax \n[GOAL]\ncase step.inr.refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\nhamax :\n  (g (↑σ⁻¹ a), f (↑σ⁻¹ a)).fst < (g a, f a).fst ∨\n    (g (↑σ⁻¹ a), f (↑σ⁻¹ a)).fst = (g a, f a).fst ∧ (g (↑σ⁻¹ a), f (↑σ⁻¹ a)).snd ≤ (g a, f a).snd\n⊢ f (↑σ⁻¹ a) ≤ f a\n[PROOFSTEP]\ncases' hamax with hamax hamax\n[GOAL]\ncase step.inr.refine'_1.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\nhamax : (g (↑σ⁻¹ a), f (↑σ⁻¹ a)).fst < (g a, f a).fst\n⊢ f (↑σ⁻¹ a) ≤ f a\n[PROOFSTEP]\nexact hfg (mem_insert_of_mem h1s) (mem_insert_self _ _) hamax\n[GOAL]\ncase step.inr.refine'_1.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\nhamax : (g (↑σ⁻¹ a), f (↑σ⁻¹ a)).fst = (g a, f a).fst ∧ (g (↑σ⁻¹ a), f (↑σ⁻¹ a)).snd ≤ (g a, f a).snd\n⊢ f (↑σ⁻¹ a) ≤ f a\n[PROOFSTEP]\nexact hamax.2\n[GOAL]\ncase step.inr.refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\n⊢ g (↑σ a) ≤ g a\n[PROOFSTEP]\nspecialize hamax (σ a) (mem_of_mem_insert_of_ne (hσ <| σ.injective.ne hσa.symm) hσa.symm)\n[GOAL]\ncase step.inr.refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\nhamax : ↑toLex (g (↑σ a), f (↑σ a)) ≤ ↑toLex (g a, f a)\n⊢ g (↑σ a) ≤ g a\n[PROOFSTEP]\nrw [Prod.Lex.le_iff] at hamax \n[GOAL]\ncase step.inr.refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\nhamax :\n  (g (↑σ a), f (↑σ a)).fst < (g a, f a).fst ∨\n    (g (↑σ a), f (↑σ a)).fst = (g a, f a).fst ∧ (g (↑σ a), f (↑σ a)).snd ≤ (g a, f a).snd\n⊢ g (↑σ a) ≤ g a\n[PROOFSTEP]\ncases' hamax with hamax hamax\n[GOAL]\ncase step.inr.refine'_2.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\nhamax : (g (↑σ a), f (↑σ a)).fst < (g a, f a).fst\n⊢ g (↑σ a) ≤ g a\n[PROOFSTEP]\nexact hamax.le\n[GOAL]\ncase step.inr.refine'_2.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\nhamax : (g (↑σ a), f (↑σ a)).fst = (g a, f a).fst ∧ (g (↑σ a), f (↑σ a)).snd ≤ (g a, f a).snd\n⊢ g (↑σ a) ≤ g a\n[PROOFSTEP]\nexact hamax.1.le\n[GOAL]\ncase step.inr.refine'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\nx : ι\nhx : x ∈ erase s (↑σ⁻¹ a)\n⊢ f x • g (↑σ x) = f x • g (↑(Equiv.swap a (↑σ a)) (↑σ x))\n[PROOFSTEP]\nrw [mem_erase, Ne.def, eq_inv_iff_eq] at hx \n[GOAL]\ncase step.inr.refine'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\nx : ι\nhx : ¬↑σ x = a ∧ x ∈ s\n⊢ f x • g (↑σ x) = f x • g (↑(Equiv.swap a (↑σ a)) (↑σ x))\n[PROOFSTEP]\nrw [swap_apply_of_ne_of_ne hx.1 (σ.injective.ne _)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nhamax : ∀ (x : ι), x ∈ s → ↑toLex (g x, f x) ≤ ↑toLex (g a, f a)\nσ : Perm ι\nhfg : MonovaryOn f g ↑(insert a s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert a s)\nτ : Perm ι := σ.trans (Equiv.swap a (↑σ a))\nhτ : τ = σ.trans (Equiv.swap a (↑σ a))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : a ≠ ↑σ a\nh1s : ↑σ⁻¹ a ∈ s\nx : ι\nhx : ¬↑σ x = a ∧ x ∈ s\n⊢ x ≠ a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns✝ : Finset ι\nf : ι → α\ng : ι → β\ns : Finset ι\nσ : Perm ι\nx : ι\nhas : ¬x ∈ s\nhamax : ∀ (x_1 : ι), x_1 ∈ s → ↑toLex (g x_1, f x_1) ≤ ↑toLex (g x, f x)\nhfg : MonovaryOn f g ↑(insert x s)\nhσ : {x | ↑σ x ≠ x} ⊆ ↑(insert x s)\nτ : Perm ι := σ.trans (Equiv.swap x (↑σ x))\nhτ : τ = σ.trans (Equiv.swap x (↑σ x))\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhind : ∑ i in s, f i • g (↑τ i) ≤ ∑ i in s, f i • g i\nhσa : x ≠ ↑σ x\nh1s : ↑σ⁻¹ x ∈ s\nhx : ¬↑σ x = x ∧ x ∈ s\n⊢ False\n[PROOFSTEP]\nexact has hx.2\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f i • g (↑σ i) = ∑ i in s, f i • g i ↔ MonovaryOn f (g ∘ ↑σ) ↑s\n[PROOFSTEP]\nclassical\nrefine' ⟨not_imp_not.1 fun h ↦ _, fun h ↦ (hfg.sum_smul_comp_perm_le_sum_smul hσ).antisymm _⟩\n· rw [MonovaryOn] at h \n  push_neg at h \n  obtain ⟨x, hx, y, hy, hgxy, hfxy⟩ := h\n  set τ : Perm ι := (Equiv.swap x y).trans σ\n  have hτs : {x | τ x ≠ x} ⊆ s :=\n    by\n    refine' (set_support_mul_subset σ <| swap x y).trans (Set.union_subset hσ fun z hz ↦ _)\n    obtain ⟨_, rfl | rfl⟩ := swap_apply_ne_self_iff.1 hz <;> assumption\n  refine' ((hfg.sum_smul_comp_perm_le_sum_smul hτs).trans_lt' _).ne\n  obtain rfl | hxy := eq_or_ne x y\n  · cases lt_irrefl _ hfxy\n  simp only [← s.sum_erase_add _ hx, ← (s.erase x).sum_erase_add _ (mem_erase.2 ⟨hxy.symm, hy⟩), add_assoc,\n    Equiv.coe_trans, Function.comp_apply, swap_apply_right, swap_apply_left]\n  refine' add_lt_add_of_le_of_lt (Finset.sum_congr rfl fun z hz ↦ _).le (smul_add_smul_lt_smul_add_smul hfxy hgxy)\n  simp_rw [mem_erase] at hz \n  rw [swap_apply_of_ne_of_ne hz.2.1 hz.1]\n· convert h.sum_smul_comp_perm_le_sum_smul ((set_support_inv_eq _).subset.trans hσ) using 1\n  simp_rw [Function.comp_apply, apply_inv_self]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f i • g (↑σ i) = ∑ i in s, f i • g i ↔ MonovaryOn f (g ∘ ↑σ) ↑s\n[PROOFSTEP]\nrefine' ⟨not_imp_not.1 fun h ↦ _, fun h ↦ (hfg.sum_smul_comp_perm_le_sum_smul hσ).antisymm _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nh : ¬MonovaryOn f (g ∘ ↑σ) ↑s\n⊢ ¬∑ i in s, f i • g (↑σ i) = ∑ i in s, f i • g i\n[PROOFSTEP]\nrw [MonovaryOn] at h \n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nh : ¬∀ ⦃i : ι⦄, i ∈ ↑s → ∀ ⦃j : ι⦄, j ∈ ↑s → (g ∘ ↑σ) i < (g ∘ ↑σ) j → f i ≤ f j\n⊢ ¬∑ i in s, f i • g (↑σ i) = ∑ i in s, f i • g i\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nh : Exists fun ⦃i⦄ => i ∈ ↑s ∧ Exists fun ⦃j⦄ => j ∈ ↑s ∧ (g ∘ ↑σ) i < (g ∘ ↑σ) j ∧ f j < f i\n⊢ ¬∑ i in s, f i • g (↑σ i) = ∑ i in s, f i • g i\n[PROOFSTEP]\nobtain ⟨x, hx, y, hy, hgxy, hfxy⟩ := h\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nx : ι\nhx : x ∈ ↑s\ny : ι\nhy : y ∈ ↑s\nhgxy : (g ∘ ↑σ) x < (g ∘ ↑σ) y\nhfxy : f y < f x\n⊢ ¬∑ i in s, f i • g (↑σ i) = ∑ i in s, f i • g i\n[PROOFSTEP]\nset τ : Perm ι := (Equiv.swap x y).trans σ\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nx : ι\nhx : x ∈ ↑s\ny : ι\nhy : y ∈ ↑s\nhgxy : (g ∘ ↑σ) x < (g ∘ ↑σ) y\nhfxy : f y < f x\nτ : Perm ι := (Equiv.swap x y).trans σ\n⊢ ¬∑ i in s, f i • g (↑σ i) = ∑ i in s, f i • g i\n[PROOFSTEP]\nhave hτs : {x | τ x ≠ x} ⊆ s :=\n  by\n  refine' (set_support_mul_subset σ <| swap x y).trans (Set.union_subset hσ fun z hz ↦ _)\n  obtain ⟨_, rfl | rfl⟩ := swap_apply_ne_self_iff.1 hz <;> assumption\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nx : ι\nhx : x ∈ ↑s\ny : ι\nhy : y ∈ ↑s\nhgxy : (g ∘ ↑σ) x < (g ∘ ↑σ) y\nhfxy : f y < f x\nτ : Perm ι := (Equiv.swap x y).trans σ\n⊢ {x | ↑τ x ≠ x} ⊆ ↑s\n[PROOFSTEP]\nrefine' (set_support_mul_subset σ <| swap x y).trans (Set.union_subset hσ fun z hz ↦ _)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nx : ι\nhx : x ∈ ↑s\ny : ι\nhy : y ∈ ↑s\nhgxy : (g ∘ ↑σ) x < (g ∘ ↑σ) y\nhfxy : f y < f x\nτ : Perm ι := (Equiv.swap x y).trans σ\nz : ι\nhz : z ∈ {x_1 | ↑(Equiv.swap x y) x_1 ≠ x_1}\n⊢ z ∈ ↑s\n[PROOFSTEP]\nobtain ⟨_, rfl | rfl⟩ := swap_apply_ne_self_iff.1 hz\n[GOAL]\ncase intro.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\ny : ι\nhy : y ∈ ↑s\nz : ι\nhx : z ∈ ↑s\nhgxy : (g ∘ ↑σ) z < (g ∘ ↑σ) y\nhfxy : f y < f z\nτ : Perm ι := (Equiv.swap z y).trans σ\nhz : z ∈ {x | ↑(Equiv.swap z y) x ≠ x}\nleft✝ : z ≠ y\n⊢ z ∈ ↑s\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nx : ι\nhx : x ∈ ↑s\nz : ι\nhy : z ∈ ↑s\nhgxy : (g ∘ ↑σ) x < (g ∘ ↑σ) z\nhfxy : f z < f x\nτ : Perm ι := (Equiv.swap x z).trans σ\nhz : z ∈ {x_1 | ↑(Equiv.swap x z) x_1 ≠ x_1}\nleft✝ : x ≠ z\n⊢ z ∈ ↑s\n[PROOFSTEP]\nassumption\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nx : ι\nhx : x ∈ ↑s\ny : ι\nhy : y ∈ ↑s\nhgxy : (g ∘ ↑σ) x < (g ∘ ↑σ) y\nhfxy : f y < f x\nτ : Perm ι := (Equiv.swap x y).trans σ\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\n⊢ ¬∑ i in s, f i • g (↑σ i) = ∑ i in s, f i • g i\n[PROOFSTEP]\nrefine' ((hfg.sum_smul_comp_perm_le_sum_smul hτs).trans_lt' _).ne\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nx : ι\nhx : x ∈ ↑s\ny : ι\nhy : y ∈ ↑s\nhgxy : (g ∘ ↑σ) x < (g ∘ ↑σ) y\nhfxy : f y < f x\nτ : Perm ι := (Equiv.swap x y).trans σ\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f i • g (↑σ i) < ∑ i in s, f i • g (↑τ i)\n[PROOFSTEP]\nobtain rfl | hxy := eq_or_ne x y\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nx : ι\nhx hy : x ∈ ↑s\nhgxy : (g ∘ ↑σ) x < (g ∘ ↑σ) x\nhfxy : f x < f x\nτ : Perm ι := (Equiv.swap x x).trans σ\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f i • g (↑σ i) < ∑ i in s, f i • g (↑τ i)\n[PROOFSTEP]\ncases lt_irrefl _ hfxy\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nx : ι\nhx : x ∈ ↑s\ny : ι\nhy : y ∈ ↑s\nhgxy : (g ∘ ↑σ) x < (g ∘ ↑σ) y\nhfxy : f y < f x\nτ : Perm ι := (Equiv.swap x y).trans σ\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhxy : x ≠ y\n⊢ ∑ i in s, f i • g (↑σ i) < ∑ i in s, f i • g (↑τ i)\n[PROOFSTEP]\nsimp only [← s.sum_erase_add _ hx, ← (s.erase x).sum_erase_add _ (mem_erase.2 ⟨hxy.symm, hy⟩), add_assoc,\n  Equiv.coe_trans, Function.comp_apply, swap_apply_right, swap_apply_left]\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nx : ι\nhx : x ∈ ↑s\ny : ι\nhy : y ∈ ↑s\nhgxy : (g ∘ ↑σ) x < (g ∘ ↑σ) y\nhfxy : f y < f x\nτ : Perm ι := (Equiv.swap x y).trans σ\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhxy : x ≠ y\n⊢ ∑ x in erase (erase s x) y, f x • g (↑σ x) + (f y • g (↑σ y) + f x • g (↑σ x)) <\n    ∑ x_1 in erase (erase s x) y, f x_1 • g (↑σ (↑(Equiv.swap x y) x_1)) + (f y • g (↑σ x) + f x • g (↑σ y))\n[PROOFSTEP]\nrefine' add_lt_add_of_le_of_lt (Finset.sum_congr rfl fun z hz ↦ _).le (smul_add_smul_lt_smul_add_smul hfxy hgxy)\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nx : ι\nhx : x ∈ ↑s\ny : ι\nhy : y ∈ ↑s\nhgxy : (g ∘ ↑σ) x < (g ∘ ↑σ) y\nhfxy : f y < f x\nτ : Perm ι := (Equiv.swap x y).trans σ\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhxy : x ≠ y\nz : ι\nhz : z ∈ erase (erase s x) y\n⊢ f z • g (↑σ z) = f z • g (↑σ (↑(Equiv.swap x y) z))\n[PROOFSTEP]\nsimp_rw [mem_erase] at hz \n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nx : ι\nhx : x ∈ ↑s\ny : ι\nhy : y ∈ ↑s\nhgxy : (g ∘ ↑σ) x < (g ∘ ↑σ) y\nhfxy : f y < f x\nτ : Perm ι := (Equiv.swap x y).trans σ\nhτs : {x | ↑τ x ≠ x} ⊆ ↑s\nhxy : x ≠ y\nz : ι\nhz : z ≠ y ∧ z ≠ x ∧ z ∈ s\n⊢ f z • g (↑σ z) = f z • g (↑σ (↑(Equiv.swap x y) z))\n[PROOFSTEP]\nrw [swap_apply_of_ne_of_ne hz.2.1 hz.1]\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nh : MonovaryOn f (g ∘ ↑σ) ↑s\n⊢ ∑ i in s, f i • g i ≤ ∑ i in s, f i • g (↑σ i)\n[PROOFSTEP]\nconvert h.sum_smul_comp_perm_le_sum_smul ((set_support_inv_eq _).subset.trans hσ) using 1\n[GOAL]\ncase h.e'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nh : MonovaryOn f (g ∘ ↑σ) ↑s\n⊢ ∑ i in s, f i • g i = ∑ i in s, f i • (g ∘ ↑σ) (↑σ⁻¹ i)\n[PROOFSTEP]\nsimp_rw [Function.comp_apply, apply_inv_self]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f i • g (↑σ i) < ∑ i in s, f i • g i ↔ ¬MonovaryOn f (g ∘ ↑σ) ↑s\n[PROOFSTEP]\nsimp [← hfg.sum_smul_comp_perm_eq_sum_smul_iff hσ, lt_iff_le_and_ne, hfg.sum_smul_comp_perm_le_sum_smul hσ]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f (↑σ i) • g i ≤ ∑ i in s, f i • g i\n[PROOFSTEP]\nconvert hfg.sum_smul_comp_perm_le_sum_smul (show {x | σ⁻¹ x ≠ x} ⊆ s by simp only [set_support_inv_eq, hσ]) using 1\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s\n[PROOFSTEP]\nsimp only [set_support_inv_eq, hσ]\n[GOAL]\ncase h.e'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f (↑σ i) • g i = ∑ i in s, f i • g (↑σ⁻¹ i)\n[PROOFSTEP]\nexact σ.sum_comp' s (fun i j ↦ f i • g j) hσ\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f (↑σ i) • g i = ∑ i in s, f i • g i ↔ MonovaryOn (f ∘ ↑σ) g ↑s\n[PROOFSTEP]\nhave hσinv : {x | σ⁻¹ x ≠ x} ⊆ s := (set_support_inv_eq _).subset.trans hσ\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nhσinv : {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f (↑σ i) • g i = ∑ i in s, f i • g i ↔ MonovaryOn (f ∘ ↑σ) g ↑s\n[PROOFSTEP]\nrefine' (Iff.trans _ <| hfg.sum_smul_comp_perm_eq_sum_smul_iff hσinv).trans ⟨fun h ↦ _, fun h ↦ _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nhσinv : {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f (↑σ i) • g i = ∑ i in s, f i • g i ↔ ∑ i in s, f i • g (↑σ⁻¹ i) = ∑ i in s, f i • g i\n[PROOFSTEP]\napply eq_iff_eq_cancel_right.2\n[GOAL]\ncase refine'_1.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nhσinv : {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f (↑σ i) • g i = ∑ i in s, f i • g (↑σ⁻¹ i)\n[PROOFSTEP]\nrw [σ.sum_comp' s (fun i j ↦ f i • g j) hσ]\n[GOAL]\ncase refine'_1.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nhσinv : {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s\n⊢ ∑ x in s, f x • g (↑σ.symm x) = ∑ i in s, f i • g (↑σ⁻¹ i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nhσinv : {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s\nh : MonovaryOn f (g ∘ ↑σ⁻¹) ↑s\n⊢ MonovaryOn (f ∘ ↑σ) g ↑s\n[PROOFSTEP]\nconvert h.comp_right σ\n[GOAL]\ncase h.e'_7\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nhσinv : {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s\nh : MonovaryOn f (g ∘ ↑σ⁻¹) ↑s\n⊢ g = (g ∘ ↑σ⁻¹) ∘ ↑σ\n[PROOFSTEP]\nrw [comp.assoc, inv_def, symm_comp_self, comp.right_id]\n[GOAL]\ncase h.e'_8\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nhσinv : {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s\nh : MonovaryOn f (g ∘ ↑σ⁻¹) ↑s\n⊢ ↑s = ↑σ ⁻¹' ↑s\n[PROOFSTEP]\nrw [σ.eq_preimage_iff_image_eq, Set.image_perm hσ]\n[GOAL]\ncase refine'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nhσinv : {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s\nh : MonovaryOn (f ∘ ↑σ) g ↑s\n⊢ MonovaryOn f (g ∘ ↑σ⁻¹) ↑s\n[PROOFSTEP]\nconvert h.comp_right σ.symm\n[GOAL]\ncase h.e'_6\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nhσinv : {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s\nh : MonovaryOn (f ∘ ↑σ) g ↑s\n⊢ f = (f ∘ ↑σ) ∘ ↑σ.symm\n[PROOFSTEP]\nrw [comp.assoc, self_comp_symm, comp.right_id]\n[GOAL]\ncase h.e'_8\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nhσinv : {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s\nh : MonovaryOn (f ∘ ↑σ) g ↑s\n⊢ ↑s = ↑σ.symm ⁻¹' ↑s\n[PROOFSTEP]\nrw [σ.symm.eq_preimage_iff_image_eq]\n[GOAL]\ncase h.e'_8\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\nhσinv : {x | ↑σ⁻¹ x ≠ x} ⊆ ↑s\nh : MonovaryOn (f ∘ ↑σ) g ↑s\n⊢ ↑σ.symm '' ↑s = ↑s\n[PROOFSTEP]\nexact Set.image_perm hσinv\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f (↑σ i) • g i < ∑ i in s, f i • g i ↔ ¬MonovaryOn (f ∘ ↑σ) g ↑s\n[PROOFSTEP]\nsimp [← hfg.sum_comp_perm_smul_eq_sum_smul_iff hσ, lt_iff_le_and_ne, hfg.sum_comp_perm_smul_le_sum_smul hσ]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : AntivaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f i • g i < ∑ i in s, f i • g (↑σ i) ↔ ¬AntivaryOn f (g ∘ ↑σ) ↑s\n[PROOFSTEP]\nsimp [← hfg.sum_smul_eq_sum_smul_comp_perm_iff hσ, lt_iff_le_and_ne, eq_comm, hfg.sum_smul_le_sum_smul_comp_perm hσ]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : AntivaryOn f g ↑s\nhσ : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ ∑ i in s, f i • g i < ∑ i in s, f (↑σ i) • g i ↔ ¬AntivaryOn (f ∘ ↑σ) g ↑s\n[PROOFSTEP]\nsimp [← hfg.sum_smul_eq_sum_comp_perm_smul_iff hσ, eq_comm, lt_iff_le_and_ne, hfg.sum_smul_le_sum_comp_perm_smul hσ]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module α β\ninst✝¹ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\ninst✝ : Fintype ι\nhfg : Monovary f g\n⊢ ∑ i : ι, f i • g (↑σ i) = ∑ i : ι, f i • g i ↔ Monovary f (g ∘ ↑σ)\n[PROOFSTEP]\nsimp [(hfg.monovaryOn _).sum_smul_comp_perm_eq_sum_smul_iff fun _ _ ↦ mem_univ _]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module α β\ninst✝¹ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\ninst✝ : Fintype ι\nhfg : Monovary f g\n⊢ ∑ i : ι, f i • g (↑σ i) < ∑ i : ι, f i • g i ↔ ¬Monovary f (g ∘ ↑σ)\n[PROOFSTEP]\nsimp [(hfg.monovaryOn _).sum_smul_comp_perm_lt_sum_smul_iff fun _ _ ↦ mem_univ _]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module α β\ninst✝¹ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\ninst✝ : Fintype ι\nhfg : Monovary f g\n⊢ ∑ i : ι, f (↑σ i) • g i = ∑ i : ι, f i • g i ↔ Monovary (f ∘ ↑σ) g\n[PROOFSTEP]\nsimp [(hfg.monovaryOn _).sum_comp_perm_smul_eq_sum_smul_iff fun _ _ ↦ mem_univ _]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module α β\ninst✝¹ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\ninst✝ : Fintype ι\nhfg : Monovary f g\n⊢ ∑ i : ι, f (↑σ i) • g i < ∑ i : ι, f i • g i ↔ ¬Monovary (f ∘ ↑σ) g\n[PROOFSTEP]\nsimp [(hfg.monovaryOn _).sum_comp_perm_smul_lt_sum_smul_iff fun _ _ ↦ mem_univ _]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module α β\ninst✝¹ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\ninst✝ : Fintype ι\nhfg : Antivary f g\n⊢ ∑ i : ι, f i • g (↑σ i) = ∑ i : ι, f i • g i ↔ Antivary f (g ∘ ↑σ)\n[PROOFSTEP]\nsimp [(hfg.antivaryOn _).sum_smul_eq_sum_smul_comp_perm_iff fun _ _ ↦ mem_univ _]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module α β\ninst✝¹ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\ninst✝ : Fintype ι\nhfg : Antivary f g\n⊢ ∑ i : ι, f i • g i < ∑ i : ι, f i • g (↑σ i) ↔ ¬Antivary f (g ∘ ↑σ)\n[PROOFSTEP]\nsimp [(hfg.antivaryOn _).sum_smul_lt_sum_smul_comp_perm_iff fun _ _ ↦ mem_univ _]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module α β\ninst✝¹ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\ninst✝ : Fintype ι\nhfg : Antivary f g\n⊢ ∑ i : ι, f (↑σ i) • g i = ∑ i : ι, f i • g i ↔ Antivary (f ∘ ↑σ) g\n[PROOFSTEP]\nsimp [(hfg.antivaryOn _).sum_smul_eq_sum_comp_perm_smul_iff fun _ _ ↦ mem_univ _]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module α β\ninst✝¹ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\ninst✝ : Fintype ι\nhfg : Antivary f g\n⊢ ∑ i : ι, f i • g i < ∑ i : ι, f (↑σ i) • g i ↔ ¬Antivary (f ∘ ↑σ) g\n[PROOFSTEP]\nsimp [(hfg.antivaryOn _).sum_smul_lt_sum_comp_perm_smul_iff fun _ _ ↦ mem_univ _]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Rearrangement", "llama_tokens": 29925, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3644596108592753}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nh : f.toFun = g.toFun\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ng : C(α, β)\ntoFun✝ : α → β\ncontinuous_toFun✝ : Continuous toFun✝\nh : (mk toFun✝).toFun = g.toFun\n⊢ mk toFun✝ = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ntoFun✝¹ : α → β\ncontinuous_toFun✝¹ : Continuous toFun✝¹\ntoFun✝ : α → β\ncontinuous_toFun✝ : Continuous toFun✝\nh : (mk toFun✝¹).toFun = (mk toFun✝).toFun\n⊢ mk toFun✝¹ = mk toFun✝\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf✝ g✝ f g : C(α, β)\nh : ↑f = ↑g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g✝ g : C(α, β)\ntoFun✝ : α → β\ncontinuous_toFun✝ : Continuous toFun✝\nh : ↑(mk toFun✝) = ↑g\n⊢ mk toFun✝ = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\ntoFun✝¹ : α → β\ncontinuous_toFun✝¹ : Continuous toFun✝¹\ntoFun✝ : α → β\ncontinuous_toFun✝ : Continuous toFun✝\nh : ↑(mk toFun✝¹) = ↑(mk toFun✝)\n⊢ mk toFun✝¹ = mk toFun✝\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : TopologicalSpace δ\nf g : C(α, β)\ninst✝ : DiscreteTopology α\nx✝ : C(α, β)\n⊢ (fun f => mk f) ((fun f => ↑f) x✝) = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : TopologicalSpace δ\nf g : C(α, β)\ninst✝ : DiscreteTopology α\nx✝ : C(α, β)\na✝ : α\n⊢ ↑((fun f => mk f) ((fun f => ↑f) x✝)) a✝ = ↑x✝ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : TopologicalSpace δ\nf g : C(α, β)\ninst✝ : DiscreteTopology α\nx✝ : α → β\n⊢ (fun f => ↑f) ((fun f => mk f) x✝) = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁴ : TopologicalSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : TopologicalSpace δ\nf g : C(α, β)\ninst✝ : DiscreteTopology α\nx✝¹ : α → β\nx✝ : α\n⊢ (fun f => ↑f) ((fun f => mk f) x✝¹) x✝ = x✝¹ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf✝ g : C(α, β)\nf : C(β, γ)\ng₁ g₂ : C(α, β)\nhf : Injective ↑f\nh : comp f g₁ = comp f g₂\na : α\n⊢ ↑f (↑g₁ a) = ↑f (↑g₂ a)\n[PROOFSTEP]\nrw [← comp_apply, h, comp_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS : ι → Set α\nφ : (i : ι) → C(↑(S i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S i ∈ nhds x\nH : ⋃ (i : ι), S i = Set.univ\ni : ι\n⊢ ContinuousOn (Set.liftCover S (fun i => ↑(φ i)) hφ H) (S i)\n[PROOFSTEP]\nrw [continuousOn_iff_continuous_restrict]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS : ι → Set α\nφ : (i : ι) → C(↑(S i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S i ∈ nhds x\nH : ⋃ (i : ι), S i = Set.univ\ni : ι\n⊢ Continuous (Set.restrict (S i) (Set.liftCover S (fun i => ↑(φ i)) hφ H))\n[PROOFSTEP]\nsimpa only [Set.restrict, Set.liftCover_coe] using (φ i).continuous\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS : ι → Set α\nφ : (i : ι) → C(↑(S i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S i ∈ nhds x\ni : ι\nx : ↑(S i)\n⊢ ↑(liftCover S φ hφ hS) ↑x = ↑(φ i) x\n[PROOFSTEP]\nrw [liftCover, coe_mk, Set.liftCover_coe _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS : ι → Set α\nφ : (i : ι) → C(↑(S i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S i ∈ nhds x\ni : ι\n⊢ restrict (S i) (liftCover S φ hφ hS) = φ i\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS : ι → Set α\nφ : (i : ι) → C(↑(S i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S i ∈ nhds x\ni : ι\na✝ : ↑(S i)\n⊢ ↑(restrict (S i) (liftCover S φ hφ hS)) a✝ = ↑(φ i) a✝\n[PROOFSTEP]\nsimp only [coe_restrict, Function.comp_apply, liftCover_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS : ι → Set α\nφ : (i : ι) → C(↑(S i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S i ∈ nhds x\nA : Set (Set α)\nF : (s : Set α) → s ∈ A → C(↑s, β)\nhF :\n  ∀ (s : Set α) (hs : s ∈ A) (t : Set α) (ht : t ∈ A) (x : α) (hxi : x ∈ s) (hxj : x ∈ t),\n    ↑(F s hs) { val := x, property := hxi } = ↑(F t ht) { val := x, property := hxj }\nhA : ∀ (x : α), ∃ i, i ∈ A ∧ i ∈ nhds x\n⊢ C(α, β)\n[PROOFSTEP]\nlet S : A → Set α := (↑)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS✝ : ι → Set α\nφ : (i : ι) → C(↑(S✝ i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S✝ i) (hxj : x ∈ S✝ j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S✝ i ∈ nhds x\nA : Set (Set α)\nF : (s : Set α) → s ∈ A → C(↑s, β)\nhF :\n  ∀ (s : Set α) (hs : s ∈ A) (t : Set α) (ht : t ∈ A) (x : α) (hxi : x ∈ s) (hxj : x ∈ t),\n    ↑(F s hs) { val := x, property := hxi } = ↑(F t ht) { val := x, property := hxj }\nhA : ∀ (x : α), ∃ i, i ∈ A ∧ i ∈ nhds x\nS : ↑A → Set α := Subtype.val\n⊢ C(α, β)\n[PROOFSTEP]\nlet F : ∀ i : A, C(i, β) := fun i => F i i.prop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS✝ : ι → Set α\nφ : (i : ι) → C(↑(S✝ i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S✝ i) (hxj : x ∈ S✝ j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S✝ i ∈ nhds x\nA : Set (Set α)\nF✝ : (s : Set α) → s ∈ A → C(↑s, β)\nhF :\n  ∀ (s : Set α) (hs : s ∈ A) (t : Set α) (ht : t ∈ A) (x : α) (hxi : x ∈ s) (hxj : x ∈ t),\n    ↑(F✝ s hs) { val := x, property := hxi } = ↑(F✝ t ht) { val := x, property := hxj }\nhA : ∀ (x : α), ∃ i, i ∈ A ∧ i ∈ nhds x\nS : ↑A → Set α := Subtype.val\nF : (i : ↑A) → C(↑↑i, β) := fun i => F✝ ↑i (_ : ↑i ∈ A)\n⊢ C(α, β)\n[PROOFSTEP]\nrefine' liftCover S F (fun i j => hF i i.prop j j.prop) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS✝ : ι → Set α\nφ : (i : ι) → C(↑(S✝ i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S✝ i) (hxj : x ∈ S✝ j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S✝ i ∈ nhds x\nA : Set (Set α)\nF✝ : (s : Set α) → s ∈ A → C(↑s, β)\nhF :\n  ∀ (s : Set α) (hs : s ∈ A) (t : Set α) (ht : t ∈ A) (x : α) (hxi : x ∈ s) (hxj : x ∈ t),\n    ↑(F✝ s hs) { val := x, property := hxi } = ↑(F✝ t ht) { val := x, property := hxj }\nhA : ∀ (x : α), ∃ i, i ∈ A ∧ i ∈ nhds x\nS : ↑A → Set α := Subtype.val\nF : (i : ↑A) → C(↑↑i, β) := fun i => F✝ ↑i (_ : ↑i ∈ A)\n⊢ ∀ (x : α), ∃ i, S i ∈ nhds x\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS✝ : ι → Set α\nφ : (i : ι) → C(↑(S✝ i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S✝ i) (hxj : x ∈ S✝ j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S✝ i ∈ nhds x\nA : Set (Set α)\nF✝ : (s : Set α) → s ∈ A → C(↑s, β)\nhF :\n  ∀ (s : Set α) (hs : s ∈ A) (t : Set α) (ht : t ∈ A) (x : α) (hxi : x ∈ s) (hxj : x ∈ t),\n    ↑(F✝ s hs) { val := x, property := hxi } = ↑(F✝ t ht) { val := x, property := hxj }\nhA : ∀ (x : α), ∃ i, i ∈ A ∧ i ∈ nhds x\nS : ↑A → Set α := Subtype.val\nF : (i : ↑A) → C(↑↑i, β) := fun i => F✝ ↑i (_ : ↑i ∈ A)\nx : α\n⊢ ∃ i, S i ∈ nhds x\n[PROOFSTEP]\nobtain ⟨s, hs, hsx⟩ := hA x\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS✝ : ι → Set α\nφ : (i : ι) → C(↑(S✝ i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S✝ i) (hxj : x ∈ S✝ j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S✝ i ∈ nhds x\nA : Set (Set α)\nF✝ : (s : Set α) → s ∈ A → C(↑s, β)\nhF :\n  ∀ (s : Set α) (hs : s ∈ A) (t : Set α) (ht : t ∈ A) (x : α) (hxi : x ∈ s) (hxj : x ∈ t),\n    ↑(F✝ s hs) { val := x, property := hxi } = ↑(F✝ t ht) { val := x, property := hxj }\nhA : ∀ (x : α), ∃ i, i ∈ A ∧ i ∈ nhds x\nS : ↑A → Set α := Subtype.val\nF : (i : ↑A) → C(↑↑i, β) := fun i => F✝ ↑i (_ : ↑i ∈ A)\nx : α\ns : Set α\nhs : s ∈ A\nhsx : s ∈ nhds x\n⊢ ∃ i, S i ∈ nhds x\n[PROOFSTEP]\nexact ⟨⟨s, hs⟩, hsx⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS : ι → Set α\nφ : (i : ι) → C(↑(S i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S i ∈ nhds x\nA : Set (Set α)\nF : (s : Set α) → s ∈ A → C(↑s, β)\nhF :\n  ∀ (s : Set α) (hs : s ∈ A) (t : Set α) (ht : t ∈ A) (x : α) (hxi : x ∈ s) (hxj : x ∈ t),\n    ↑(F s hs) { val := x, property := hxi } = ↑(F t ht) { val := x, property := hxj }\nhA : ∀ (x : α), ∃ i, i ∈ A ∧ i ∈ nhds x\ns : Set α\nhs : s ∈ A\nx : ↑s\nx' : ↑↑{ val := s, property := hs } := x\n⊢ ↑(liftCover' A F hF hA) ↑x = ↑(F s hs) x\n[PROOFSTEP]\ndelta liftCover'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf g : C(α, β)\nι : Type u_5\nS : ι → Set α\nφ : (i : ι) → C(↑(S i), β)\nhφ :\n  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),\n    ↑(φ i) { val := x, property := hxi } = ↑(φ j) { val := x, property := hxj }\nhS : ∀ (x : α), ∃ i, S i ∈ nhds x\nA : Set (Set α)\nF : (s : Set α) → s ∈ A → C(↑s, β)\nhF :\n  ∀ (s : Set α) (hs : s ∈ A) (t : Set α) (ht : t ∈ A) (x : α) (hxi : x ∈ s) (hxj : x ∈ t),\n    ↑(F s hs) { val := x, property := hxi } = ↑(F t ht) { val := x, property := hxj }\nhA : ∀ (x : α), ∃ i, i ∈ A ∧ i ∈ nhds x\ns : Set α\nhs : s ∈ A\nx : ↑s\nx' : ↑↑{ val := s, property := hs } := x\n⊢ ↑(let S := Subtype.val;\n        let F_1 := fun i => F ↑i (_ : ↑i ∈ A);\n        liftCover S F_1\n          (_ :\n            ∀ (i j : ↑A) (x : α) (hxi : x ∈ ↑i) (hxj : x ∈ ↑j),\n              ↑(F ↑i (_ : ↑i ∈ A)) { val := x, property := hxi } = ↑(F ↑j (_ : ↑j ∈ A)) { val := x, property := hxj })\n          (_ : ∀ (x : α), ∃ i, ↑i ∈ nhds x))\n      ↑x =\n    ↑(F s hs) x\n[PROOFSTEP]\nexact liftCover_coe x'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α ≃ₜ β\ng : β ≃ₜ γ\n⊢ ContinuousMap.comp (toContinuousMap (Homeomorph.symm f)) (toContinuousMap f) = ContinuousMap.id α\n[PROOFSTEP]\nrw [← coe_trans, self_trans_symm, coe_refl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α ≃ₜ β\ng : β ≃ₜ γ\n⊢ ContinuousMap.comp (toContinuousMap f) (toContinuousMap (Homeomorph.symm f)) = ContinuousMap.id β\n[PROOFSTEP]\nrw [← coe_trans, symm_trans_self, coe_refl]\n", "meta": {"mathlib_filename": "Mathlib.Topology.ContinuousFunction.Basic", "llama_tokens": 7535, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6187804196836383, "lm_q2_score": 0.5888891307678321, "lm_q1q2_score": 0.3643930634836521}}
{"text": "[GOAL]\nR : Type u\nX : Type v\ninst✝ : CommRing R\na b c : lib R X\nh : Rel R X b c\n⊢ Rel R X (a + b) (a + c)\n[PROOFSTEP]\nrw [add_comm _ b, add_comm _ c]\n[GOAL]\nR : Type u\nX : Type v\ninst✝ : CommRing R\na b c : lib R X\nh : Rel R X b c\n⊢ Rel R X (b + a) (c + a)\n[PROOFSTEP]\nexact h.add_right _\n[GOAL]\nR : Type u\nX : Type v\ninst✝ : CommRing R\na b : lib R X\nh : Rel R X a b\n⊢ Rel R X (-a) (-b)\n[PROOFSTEP]\nsimpa only [neg_one_smul] using h.smul (-1)\n[GOAL]\nR : Type u\nX : Type v\ninst✝ : CommRing R\na b c : lib R X\nh : Rel R X b c\n⊢ Rel R X (a - b) (a - c)\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using h.neg.addLeft a\n[GOAL]\nR : Type u\nX : Type v\ninst✝ : CommRing R\na b c : lib R X\nh : Rel R X a b\n⊢ Rel R X (a - c) (b - c)\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using h.add_right (-c)\n[GOAL]\nR : Type u\nX : Type v\ninst✝³ : CommRing R\nS : Type u_1\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : IsScalarTower S R R\nt : S\na b : lib R X\nh : Rel R X a b\n⊢ Rel R X (t • a) (t • b)\n[PROOFSTEP]\nrw [← smul_one_smul R t a, ← smul_one_smul R t b]\n[GOAL]\nR : Type u\nX : Type v\ninst✝³ : CommRing R\nS : Type u_1\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S R\ninst✝ : IsScalarTower S R R\nt : S\na b : lib R X\nh : Rel R X a b\n⊢ Rel R X ((t • 1) • a) ((t • 1) • b)\n[PROOFSTEP]\nexact h.smul _\n[GOAL]\nR : Type u\nX : Type v\ninst✝ : CommRing R\n⊢ Inhabited (FreeLieAlgebra R X)\n[PROOFSTEP]\nrw [FreeLieAlgebra]\n[GOAL]\nR : Type u\nX : Type v\ninst✝ : CommRing R\n⊢ Inhabited (Quot (FreeLieAlgebra.Rel R X))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nX : Type v\ninst✝ : CommRing R\n⊢ ∀ (x y z : FreeLieAlgebra R X), ⁅x + y, z⁆ = ⁅x, z⁆ + ⁅y, z⁆\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩ ⟨c⟩\n[GOAL]\ncase mk.mk.mk\nR : Type u\nX : Type v\ninst✝ : CommRing R\nx✝ : FreeLieAlgebra R X\na : lib R X\ny✝ : FreeLieAlgebra R X\nb : lib R X\nz✝ : FreeLieAlgebra R X\nc : lib R X\n⊢ ⁅Quot.mk (Rel R X) a + Quot.mk (Rel R X) b, Quot.mk (Rel R X) c⁆ =\n    ⁅Quot.mk (Rel R X) a, Quot.mk (Rel R X) c⁆ + ⁅Quot.mk (Rel R X) b, Quot.mk (Rel R X) c⁆\n[PROOFSTEP]\nchange Quot.mk _ _ = Quot.mk _ _\n[GOAL]\ncase mk.mk.mk\nR : Type u\nX : Type v\ninst✝ : CommRing R\nx✝ : FreeLieAlgebra R X\na : lib R X\ny✝ : FreeLieAlgebra R X\nb : lib R X\nz✝ : FreeLieAlgebra R X\nc : lib R X\n⊢ Quot.mk (Rel R X) ((fun x x_1 => x * x_1) ((fun x x_1 => x + x_1) a b) c) =\n    Quot.mk (Rel R X) ((fun x x_1 => x + x_1) ((fun x x_1 => x * x_1) a c) ((fun x x_1 => x * x_1) b c))\n[PROOFSTEP]\nsimp_rw [add_mul]\n[GOAL]\nR : Type u\nX : Type v\ninst✝ : CommRing R\n⊢ ∀ (x y z : FreeLieAlgebra R X), ⁅x, y + z⁆ = ⁅x, y⁆ + ⁅x, z⁆\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩ ⟨c⟩\n[GOAL]\ncase mk.mk.mk\nR : Type u\nX : Type v\ninst✝ : CommRing R\nx✝ : FreeLieAlgebra R X\na : lib R X\ny✝ : FreeLieAlgebra R X\nb : lib R X\nz✝ : FreeLieAlgebra R X\nc : lib R X\n⊢ ⁅Quot.mk (Rel R X) a, Quot.mk (Rel R X) b + Quot.mk (Rel R X) c⁆ =\n    ⁅Quot.mk (Rel R X) a, Quot.mk (Rel R X) b⁆ + ⁅Quot.mk (Rel R X) a, Quot.mk (Rel R X) c⁆\n[PROOFSTEP]\nchange Quot.mk _ _ = Quot.mk _ _\n[GOAL]\ncase mk.mk.mk\nR : Type u\nX : Type v\ninst✝ : CommRing R\nx✝ : FreeLieAlgebra R X\na : lib R X\ny✝ : FreeLieAlgebra R X\nb : lib R X\nz✝ : FreeLieAlgebra R X\nc : lib R X\n⊢ Quot.mk (Rel R X) ((fun x x_1 => x * x_1) a ((fun x x_1 => x + x_1) b c)) =\n    Quot.mk (Rel R X) ((fun x x_1 => x + x_1) ((fun x x_1 => x * x_1) a b) ((fun x x_1 => x * x_1) a c))\n[PROOFSTEP]\nsimp_rw [mul_add]\n[GOAL]\nR : Type u\nX : Type v\ninst✝ : CommRing R\n⊢ ∀ (x : FreeLieAlgebra R X), ⁅x, x⁆ = 0\n[PROOFSTEP]\nrintro ⟨a⟩\n[GOAL]\ncase mk\nR : Type u\nX : Type v\ninst✝ : CommRing R\nx✝ : FreeLieAlgebra R X\na : lib R X\n⊢ ⁅Quot.mk (Rel R X) a, Quot.mk (Rel R X) a⁆ = 0\n[PROOFSTEP]\nexact Quot.sound (Rel.lie_self a)\n[GOAL]\nR : Type u\nX : Type v\ninst✝ : CommRing R\n⊢ ∀ (x y z : FreeLieAlgebra R X), ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩ ⟨c⟩\n[GOAL]\ncase mk.mk.mk\nR : Type u\nX : Type v\ninst✝ : CommRing R\nx✝ : FreeLieAlgebra R X\na : lib R X\ny✝ : FreeLieAlgebra R X\nb : lib R X\nz✝ : FreeLieAlgebra R X\nc : lib R X\n⊢ ⁅Quot.mk (Rel R X) a, ⁅Quot.mk (Rel R X) b, Quot.mk (Rel R X) c⁆⁆ =\n    ⁅⁅Quot.mk (Rel R X) a, Quot.mk (Rel R X) b⁆, Quot.mk (Rel R X) c⁆ +\n      ⁅Quot.mk (Rel R X) b, ⁅Quot.mk (Rel R X) a, Quot.mk (Rel R X) c⁆⁆\n[PROOFSTEP]\nexact Quot.sound (Rel.leibniz_lie a b c)\n[GOAL]\nR : Type u\nX : Type v\ninst✝ : CommRing R\n⊢ ∀ (t : R) (x y : FreeLieAlgebra R X), ⁅x, t • y⁆ = t • ⁅x, y⁆\n[PROOFSTEP]\nrintro t ⟨a⟩ ⟨c⟩\n[GOAL]\ncase mk.mk\nR : Type u\nX : Type v\ninst✝ : CommRing R\nt : R\nx✝ : FreeLieAlgebra R X\na : lib R X\ny✝ : FreeLieAlgebra R X\nc : lib R X\n⊢ ⁅Quot.mk (Rel R X) a, t • Quot.mk (Rel R X) c⁆ = t • ⁅Quot.mk (Rel R X) a, Quot.mk (Rel R X) c⁆\n[PROOFSTEP]\nchange Quot.mk _ (a • t • c) = Quot.mk _ (t • a • c)\n[GOAL]\ncase mk.mk\nR : Type u\nX : Type v\ninst✝ : CommRing R\nt : R\nx✝ : FreeLieAlgebra R X\na : lib R X\ny✝ : FreeLieAlgebra R X\nc : lib R X\n⊢ Quot.mk (Rel R X) (a • t • c) = Quot.mk (Rel R X) (t • a • c)\n[PROOFSTEP]\nrw [← smul_comm]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b : lib R X\nh : Rel R X a b\n⊢ ↑(liftAux R f) a = ↑(liftAux R f) b\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase lie_self\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝ : lib R X\n⊢ ↑(liftAux R f) (a✝ * a✝) = ↑(liftAux R f) 0\ncase leibniz_lie\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝ b✝ c✝ : lib R X\n⊢ ↑(liftAux R f) (a✝ * (b✝ * c✝)) = ↑(liftAux R f) (a✝ * b✝ * c✝ + b✝ * (a✝ * c✝))\ncase smul\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b : lib R X\nt✝ : R\na✝¹ b✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (t✝ • a✝¹) = ↑(liftAux R f) (t✝ • b✝)\ncase add_right\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (a✝¹ + c✝) = ↑(liftAux R f) (b✝ + c✝)\ncase mul_left\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X b✝ c✝\na_ih✝ : ↑(liftAux R f) b✝ = ↑(liftAux R f) c✝\n⊢ ↑(liftAux R f) (a✝¹ * b✝) = ↑(liftAux R f) (a✝¹ * c✝)\ncase mul_right\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (a✝¹ * c✝) = ↑(liftAux R f) (b✝ * c✝)\n[PROOFSTEP]\ncase lie_self a' => simp only [liftAux_map_mul, NonUnitalAlgHom.map_zero, lie_self]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a' : lib R X\n⊢ ↑(liftAux R f) (a' * a') = ↑(liftAux R f) 0\n[PROOFSTEP]\ncase lie_self a' => simp only [liftAux_map_mul, NonUnitalAlgHom.map_zero, lie_self]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a' : lib R X\n⊢ ↑(liftAux R f) (a' * a') = ↑(liftAux R f) 0\n[PROOFSTEP]\nsimp only [liftAux_map_mul, NonUnitalAlgHom.map_zero, lie_self]\n[GOAL]\ncase leibniz_lie\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝ b✝ c✝ : lib R X\n⊢ ↑(liftAux R f) (a✝ * (b✝ * c✝)) = ↑(liftAux R f) (a✝ * b✝ * c✝ + b✝ * (a✝ * c✝))\ncase smul\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b : lib R X\nt✝ : R\na✝¹ b✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (t✝ • a✝¹) = ↑(liftAux R f) (t✝ • b✝)\ncase add_right\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (a✝¹ + c✝) = ↑(liftAux R f) (b✝ + c✝)\ncase mul_left\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X b✝ c✝\na_ih✝ : ↑(liftAux R f) b✝ = ↑(liftAux R f) c✝\n⊢ ↑(liftAux R f) (a✝¹ * b✝) = ↑(liftAux R f) (a✝¹ * c✝)\ncase mul_right\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (a✝¹ * c✝) = ↑(liftAux R f) (b✝ * c✝)\n[PROOFSTEP]\ncase leibniz_lie a' b' c' => simp only [liftAux_map_mul, liftAux_map_add, sub_add_cancel, lie_lie]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a' b' c' : lib R X\n⊢ ↑(liftAux R f) (a' * (b' * c')) = ↑(liftAux R f) (a' * b' * c' + b' * (a' * c'))\n[PROOFSTEP]\ncase leibniz_lie a' b' c' => simp only [liftAux_map_mul, liftAux_map_add, sub_add_cancel, lie_lie]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a' b' c' : lib R X\n⊢ ↑(liftAux R f) (a' * (b' * c')) = ↑(liftAux R f) (a' * b' * c' + b' * (a' * c'))\n[PROOFSTEP]\nsimp only [liftAux_map_mul, liftAux_map_add, sub_add_cancel, lie_lie]\n[GOAL]\ncase smul\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b : lib R X\nt✝ : R\na✝¹ b✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (t✝ • a✝¹) = ↑(liftAux R f) (t✝ • b✝)\ncase add_right\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (a✝¹ + c✝) = ↑(liftAux R f) (b✝ + c✝)\ncase mul_left\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X b✝ c✝\na_ih✝ : ↑(liftAux R f) b✝ = ↑(liftAux R f) c✝\n⊢ ↑(liftAux R f) (a✝¹ * b✝) = ↑(liftAux R f) (a✝¹ * c✝)\ncase mul_right\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (a✝¹ * c✝) = ↑(liftAux R f) (b✝ * c✝)\n[PROOFSTEP]\ncase smul t a' b' _ h₂ => simp only [liftAux_map_smul, h₂]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b : lib R X\nt : R\na' b' : lib R X\na✝ : Rel R X a' b'\nh₂ : ↑(liftAux R f) a' = ↑(liftAux R f) b'\n⊢ ↑(liftAux R f) (t • a') = ↑(liftAux R f) (t • b')\n[PROOFSTEP]\ncase smul t a' b' _ h₂ => simp only [liftAux_map_smul, h₂]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b : lib R X\nt : R\na' b' : lib R X\na✝ : Rel R X a' b'\nh₂ : ↑(liftAux R f) a' = ↑(liftAux R f) b'\n⊢ ↑(liftAux R f) (t • a') = ↑(liftAux R f) (t • b')\n[PROOFSTEP]\nsimp only [liftAux_map_smul, h₂]\n[GOAL]\ncase add_right\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (a✝¹ + c✝) = ↑(liftAux R f) (b✝ + c✝)\ncase mul_left\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X b✝ c✝\na_ih✝ : ↑(liftAux R f) b✝ = ↑(liftAux R f) c✝\n⊢ ↑(liftAux R f) (a✝¹ * b✝) = ↑(liftAux R f) (a✝¹ * c✝)\ncase mul_right\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (a✝¹ * c✝) = ↑(liftAux R f) (b✝ * c✝)\n[PROOFSTEP]\ncase add_right a' b' c' _ h₂ => simp only [liftAux_map_add, h₂]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a' b' c' : lib R X\na✝ : Rel R X a' b'\nh₂ : ↑(liftAux R f) a' = ↑(liftAux R f) b'\n⊢ ↑(liftAux R f) (a' + c') = ↑(liftAux R f) (b' + c')\n[PROOFSTEP]\ncase add_right a' b' c' _ h₂ => simp only [liftAux_map_add, h₂]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a' b' c' : lib R X\na✝ : Rel R X a' b'\nh₂ : ↑(liftAux R f) a' = ↑(liftAux R f) b'\n⊢ ↑(liftAux R f) (a' + c') = ↑(liftAux R f) (b' + c')\n[PROOFSTEP]\nsimp only [liftAux_map_add, h₂]\n[GOAL]\ncase mul_left\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X b✝ c✝\na_ih✝ : ↑(liftAux R f) b✝ = ↑(liftAux R f) c✝\n⊢ ↑(liftAux R f) (a✝¹ * b✝) = ↑(liftAux R f) (a✝¹ * c✝)\ncase mul_right\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (a✝¹ * c✝) = ↑(liftAux R f) (b✝ * c✝)\n[PROOFSTEP]\ncase mul_left a' b' c' _ h₂ => simp only [liftAux_map_mul, h₂]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a' b' c' : lib R X\na✝ : Rel R X b' c'\nh₂ : ↑(liftAux R f) b' = ↑(liftAux R f) c'\n⊢ ↑(liftAux R f) (a' * b') = ↑(liftAux R f) (a' * c')\n[PROOFSTEP]\ncase mul_left a' b' c' _ h₂ => simp only [liftAux_map_mul, h₂]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a' b' c' : lib R X\na✝ : Rel R X b' c'\nh₂ : ↑(liftAux R f) b' = ↑(liftAux R f) c'\n⊢ ↑(liftAux R f) (a' * b') = ↑(liftAux R f) (a' * c')\n[PROOFSTEP]\nsimp only [liftAux_map_mul, h₂]\n[GOAL]\ncase mul_right\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a✝¹ b✝ c✝ : lib R X\na✝ : Rel R X a✝¹ b✝\na_ih✝ : ↑(liftAux R f) a✝¹ = ↑(liftAux R f) b✝\n⊢ ↑(liftAux R f) (a✝¹ * c✝) = ↑(liftAux R f) (b✝ * c✝)\n[PROOFSTEP]\ncase mul_right a' b' c' _ h₂ => simp only [liftAux_map_mul, h₂]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a' b' c' : lib R X\na✝ : Rel R X a' b'\nh₂ : ↑(liftAux R f) a' = ↑(liftAux R f) b'\n⊢ ↑(liftAux R f) (a' * c') = ↑(liftAux R f) (b' * c')\n[PROOFSTEP]\ncase mul_right a' b' c' _ h₂ => simp only [liftAux_map_mul, h₂]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\na b a' b' c' : lib R X\na✝ : Rel R X a' b'\nh₂ : ↑(liftAux R f) a' = ↑(liftAux R f) b'\n⊢ ↑(liftAux R f) (a' * c') = ↑(liftAux R f) (b' * c')\n[PROOFSTEP]\nsimp only [liftAux_map_mul, h₂]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\n⊢ ∀ (x y : FreeLieAlgebra R X),\n    (fun c => Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n        (x + y) =\n      (fun c => Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n          x +\n        (fun c =>\n            Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n          y\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase mk.mk\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\nx✝ : FreeLieAlgebra R X\na : lib R X\ny✝ : FreeLieAlgebra R X\nb : lib R X\n⊢ (fun c => Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n      (Quot.mk (Rel R X) a + Quot.mk (Rel R X) b) =\n    (fun c => Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n        (Quot.mk (Rel R X) a) +\n      (fun c => Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n        (Quot.mk (Rel R X) b)\n[PROOFSTEP]\nrw [← liftAux_map_add]\n[GOAL]\ncase mk.mk\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\nx✝ : FreeLieAlgebra R X\na : lib R X\ny✝ : FreeLieAlgebra R X\nb : lib R X\n⊢ (fun c => Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n      (Quot.mk (Rel R X) a + Quot.mk (Rel R X) b) =\n    ↑(liftAux R f) (a + b)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\n⊢ ∀ (r : R) (x : FreeLieAlgebra R X),\n    AddHom.toFun\n        {\n          toFun := fun c =>\n            Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n          map_add' :=\n            (_ :\n              ∀ (x y : FreeLieAlgebra R X),\n                (fun c =>\n                      Quot.liftOn c ↑(liftAux R f)\n                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                    (x + y) =\n                  (fun c =>\n                        Quot.liftOn c ↑(liftAux R f)\n                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                      x +\n                    (fun c =>\n                        Quot.liftOn c ↑(liftAux R f)\n                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                      y) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          {\n            toFun := fun c =>\n              Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n            map_add' :=\n              (_ :\n                ∀ (x y : FreeLieAlgebra R X),\n                  (fun c =>\n                        Quot.liftOn c ↑(liftAux R f)\n                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                      (x + y) =\n                    (fun c =>\n                          Quot.liftOn c ↑(liftAux R f)\n                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                        x +\n                      (fun c =>\n                          Quot.liftOn c ↑(liftAux R f)\n                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                        y) }\n          x\n[PROOFSTEP]\nrintro t ⟨a⟩\n[GOAL]\ncase mk\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\nt : R\nx✝ : FreeLieAlgebra R X\na : lib R X\n⊢ AddHom.toFun\n      {\n        toFun := fun c =>\n          Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n        map_add' :=\n          (_ :\n            ∀ (x y : FreeLieAlgebra R X),\n              (fun c =>\n                    Quot.liftOn c ↑(liftAux R f)\n                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                  (x + y) =\n                (fun c =>\n                      Quot.liftOn c ↑(liftAux R f)\n                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                    x +\n                  (fun c =>\n                      Quot.liftOn c ↑(liftAux R f)\n                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                    y) }\n      (t • Quot.mk (Rel R X) a) =\n    ↑(RingHom.id R) t •\n      AddHom.toFun\n        {\n          toFun := fun c =>\n            Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n          map_add' :=\n            (_ :\n              ∀ (x y : FreeLieAlgebra R X),\n                (fun c =>\n                      Quot.liftOn c ↑(liftAux R f)\n                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                    (x + y) =\n                  (fun c =>\n                        Quot.liftOn c ↑(liftAux R f)\n                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                      x +\n                    (fun c =>\n                        Quot.liftOn c ↑(liftAux R f)\n                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                      y) }\n        (Quot.mk (Rel R X) a)\n[PROOFSTEP]\nrw [← liftAux_map_smul]\n[GOAL]\ncase mk\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\nt : R\nx✝ : FreeLieAlgebra R X\na : lib R X\n⊢ AddHom.toFun\n      {\n        toFun := fun c =>\n          Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n        map_add' :=\n          (_ :\n            ∀ (x y : FreeLieAlgebra R X),\n              (fun c =>\n                    Quot.liftOn c ↑(liftAux R f)\n                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                  (x + y) =\n                (fun c =>\n                      Quot.liftOn c ↑(liftAux R f)\n                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                    x +\n                  (fun c =>\n                      Quot.liftOn c ↑(liftAux R f)\n                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                    y) }\n      (t • Quot.mk (Rel R X) a) =\n    ↑(liftAux ((fun x => R) t) f) (↑(RingHom.id R) t • a)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\n⊢ ∀ {x y : FreeLieAlgebra R X},\n    AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun c =>\n                  Quot.liftOn c ↑(liftAux R f)\n                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : FreeLieAlgebra R X),\n                      (fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                          (x + y) =\n                        (fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                            x +\n                          (fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                            y) },\n            map_smul' :=\n              (_ :\n                ∀ (t : R) (x : FreeLieAlgebra R X),\n                  AddHom.toFun\n                      {\n                        toFun := fun c =>\n                          Quot.liftOn c ↑(liftAux R f)\n                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : FreeLieAlgebra R X),\n                              (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  (x + y) =\n                                (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    x +\n                                  (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    y) }\n                      (t • x) =\n                    ↑(RingHom.id R) t •\n                      AddHom.toFun\n                        {\n                          toFun := fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : FreeLieAlgebra R X),\n                                (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    (x + y) =\n                                  (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      x +\n                                    (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      y) }\n                        x) }.toAddHom\n        ⁅x, y⁆ =\n      ⁅AddHom.toFun\n          {\n              toAddHom :=\n                {\n                  toFun := fun c =>\n                    Quot.liftOn c ↑(liftAux R f)\n                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : FreeLieAlgebra R X),\n                        (fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                            (x + y) =\n                          (fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                              x +\n                            (fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                              y) },\n              map_smul' :=\n                (_ :\n                  ∀ (t : R) (x : FreeLieAlgebra R X),\n                    AddHom.toFun\n                        {\n                          toFun := fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : FreeLieAlgebra R X),\n                                (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    (x + y) =\n                                  (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      x +\n                                    (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      y) }\n                        (t • x) =\n                      ↑(RingHom.id R) t •\n                        AddHom.toFun\n                          {\n                            toFun := fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : FreeLieAlgebra R X),\n                                  (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      (x + y) =\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        x +\n                                      (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        y) }\n                          x) }.toAddHom\n          x,\n        AddHom.toFun\n          {\n              toAddHom :=\n                {\n                  toFun := fun c =>\n                    Quot.liftOn c ↑(liftAux R f)\n                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : FreeLieAlgebra R X),\n                        (fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                            (x + y) =\n                          (fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                              x +\n                            (fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                              y) },\n              map_smul' :=\n                (_ :\n                  ∀ (t : R) (x : FreeLieAlgebra R X),\n                    AddHom.toFun\n                        {\n                          toFun := fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : FreeLieAlgebra R X),\n                                (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    (x + y) =\n                                  (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      x +\n                                    (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      y) }\n                        (t • x) =\n                      ↑(RingHom.id R) t •\n                        AddHom.toFun\n                          {\n                            toFun := fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : FreeLieAlgebra R X),\n                                  (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      (x + y) =\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        x +\n                                      (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        y) }\n                          x) }.toAddHom\n          y⁆\n[PROOFSTEP]\nrintro ⟨a⟩ ⟨b⟩\n[GOAL]\ncase mk.mk\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\nx✝ : FreeLieAlgebra R X\na : lib R X\ny✝ : FreeLieAlgebra R X\nb : lib R X\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            {\n              toFun := fun c =>\n                Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n              map_add' :=\n                (_ :\n                  ∀ (x y : FreeLieAlgebra R X),\n                    (fun c =>\n                          Quot.liftOn c ↑(liftAux R f)\n                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                        (x + y) =\n                      (fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                          x +\n                        (fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                          y) },\n          map_smul' :=\n            (_ :\n              ∀ (t : R) (x : FreeLieAlgebra R X),\n                AddHom.toFun\n                    {\n                      toFun := fun c =>\n                        Quot.liftOn c ↑(liftAux R f)\n                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : FreeLieAlgebra R X),\n                            (fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                (x + y) =\n                              (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  x +\n                                (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  y) }\n                    (t • x) =\n                  ↑(RingHom.id R) t •\n                    AddHom.toFun\n                      {\n                        toFun := fun c =>\n                          Quot.liftOn c ↑(liftAux R f)\n                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : FreeLieAlgebra R X),\n                              (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  (x + y) =\n                                (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    x +\n                                  (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    y) }\n                      x) }.toAddHom\n      ⁅Quot.mk (Rel R X) a, Quot.mk (Rel R X) b⁆ =\n    ⁅AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun c =>\n                  Quot.liftOn c ↑(liftAux R f)\n                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : FreeLieAlgebra R X),\n                      (fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                          (x + y) =\n                        (fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                            x +\n                          (fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                            y) },\n            map_smul' :=\n              (_ :\n                ∀ (t : R) (x : FreeLieAlgebra R X),\n                  AddHom.toFun\n                      {\n                        toFun := fun c =>\n                          Quot.liftOn c ↑(liftAux R f)\n                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : FreeLieAlgebra R X),\n                              (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  (x + y) =\n                                (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    x +\n                                  (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    y) }\n                      (t • x) =\n                    ↑(RingHom.id R) t •\n                      AddHom.toFun\n                        {\n                          toFun := fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : FreeLieAlgebra R X),\n                                (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    (x + y) =\n                                  (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      x +\n                                    (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      y) }\n                        x) }.toAddHom\n        (Quot.mk (Rel R X) a),\n      AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun c =>\n                  Quot.liftOn c ↑(liftAux R f)\n                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : FreeLieAlgebra R X),\n                      (fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                          (x + y) =\n                        (fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                            x +\n                          (fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                            y) },\n            map_smul' :=\n              (_ :\n                ∀ (t : R) (x : FreeLieAlgebra R X),\n                  AddHom.toFun\n                      {\n                        toFun := fun c =>\n                          Quot.liftOn c ↑(liftAux R f)\n                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : FreeLieAlgebra R X),\n                              (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  (x + y) =\n                                (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    x +\n                                  (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    y) }\n                      (t • x) =\n                    ↑(RingHom.id R) t •\n                      AddHom.toFun\n                        {\n                          toFun := fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : FreeLieAlgebra R X),\n                                (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    (x + y) =\n                                  (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      x +\n                                    (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      y) }\n                        x) }.toAddHom\n        (Quot.mk (Rel R X) b)⁆\n[PROOFSTEP]\nrw [← liftAux_map_mul]\n[GOAL]\ncase mk.mk\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\nx✝ : FreeLieAlgebra R X\na : lib R X\ny✝ : FreeLieAlgebra R X\nb : lib R X\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            {\n              toFun := fun c =>\n                Quot.liftOn c ↑(liftAux R f) (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n              map_add' :=\n                (_ :\n                  ∀ (x y : FreeLieAlgebra R X),\n                    (fun c =>\n                          Quot.liftOn c ↑(liftAux R f)\n                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                        (x + y) =\n                      (fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                          x +\n                        (fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                          y) },\n          map_smul' :=\n            (_ :\n              ∀ (t : R) (x : FreeLieAlgebra R X),\n                AddHom.toFun\n                    {\n                      toFun := fun c =>\n                        Quot.liftOn c ↑(liftAux R f)\n                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : FreeLieAlgebra R X),\n                            (fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                (x + y) =\n                              (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  x +\n                                (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  y) }\n                    (t • x) =\n                  ↑(RingHom.id R) t •\n                    AddHom.toFun\n                      {\n                        toFun := fun c =>\n                          Quot.liftOn c ↑(liftAux R f)\n                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : FreeLieAlgebra R X),\n                              (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  (x + y) =\n                                (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    x +\n                                  (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    y) }\n                      x) }.toAddHom\n      ⁅Quot.mk (Rel R X) a, Quot.mk (Rel R X) b⁆ =\n    ↑(liftAux R f) (a * b)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\n⊢ (fun F => ↑F ∘ of R)\n      ((fun f =>\n          {\n            toLinearMap :=\n              {\n                toAddHom :=\n                  {\n                    toFun := fun c =>\n                      Quot.liftOn c ↑(liftAux R f)\n                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : FreeLieAlgebra R X),\n                          (fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                              (x + y) =\n                            (fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                x +\n                              (fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                y) },\n                map_smul' :=\n                  (_ :\n                    ∀ (t : R) (x : FreeLieAlgebra R X),\n                      AddHom.toFun\n                          {\n                            toFun := fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : FreeLieAlgebra R X),\n                                  (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      (x + y) =\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        x +\n                                      (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        y) }\n                          (t • x) =\n                        ↑(RingHom.id R) t •\n                          AddHom.toFun\n                            {\n                              toFun := fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : FreeLieAlgebra R X),\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        (x + y) =\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          x +\n                                        (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          y) }\n                            x) },\n            map_lie' :=\n              (_ :\n                ∀ {x y : FreeLieAlgebra R X},\n                  AddHom.toFun\n                      {\n                          toAddHom :=\n                            {\n                              toFun := fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : FreeLieAlgebra R X),\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        (x + y) =\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          x +\n                                        (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          y) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (t : R) (x : FreeLieAlgebra R X),\n                                AddHom.toFun\n                                    {\n                                      toFun := fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (x y : FreeLieAlgebra R X),\n                                            (fun c =>\n                                                  Quot.liftOn c ↑(liftAux R f)\n                                                    (_ :\n                                                      ∀ (a b : lib R X),\n                                                        Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                (x + y) =\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  x +\n                                                (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  y) }\n                                    (t • x) =\n                                  ↑(RingHom.id R) t •\n                                    AddHom.toFun\n                                      {\n                                        toFun := fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (x y : FreeLieAlgebra R X),\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  (x + y) =\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    x +\n                                                  (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    y) }\n                                      x) }.toAddHom\n                      ⁅x, y⁆ =\n                    ⁅AddHom.toFun\n                        {\n                            toAddHom :=\n                              {\n                                toFun := fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : FreeLieAlgebra R X),\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          (x + y) =\n                                        (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            x +\n                                          (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            y) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (t : R) (x : FreeLieAlgebra R X),\n                                  AddHom.toFun\n                                      {\n                                        toFun := fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (x y : FreeLieAlgebra R X),\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  (x + y) =\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    x +\n                                                  (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    y) }\n                                      (t • x) =\n                                    ↑(RingHom.id R) t •\n                                      AddHom.toFun\n                                        {\n                                          toFun := fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (x y : FreeLieAlgebra R X),\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    (x + y) =\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      x +\n                                                    (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      y) }\n                                        x) }.toAddHom\n                        x,\n                      AddHom.toFun\n                        {\n                            toAddHom :=\n                              {\n                                toFun := fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : FreeLieAlgebra R X),\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          (x + y) =\n                                        (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            x +\n                                          (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            y) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (t : R) (x : FreeLieAlgebra R X),\n                                  AddHom.toFun\n                                      {\n                                        toFun := fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (x y : FreeLieAlgebra R X),\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  (x + y) =\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    x +\n                                                  (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    y) }\n                                      (t • x) =\n                                    ↑(RingHom.id R) t •\n                                      AddHom.toFun\n                                        {\n                                          toFun := fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (x y : FreeLieAlgebra R X),\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    (x + y) =\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      x +\n                                                    (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      y) }\n                                        x) }.toAddHom\n                        y⁆) })\n        f) =\n    f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\nx : X\n⊢ (fun F => ↑F ∘ of R)\n      ((fun f =>\n          {\n            toLinearMap :=\n              {\n                toAddHom :=\n                  {\n                    toFun := fun c =>\n                      Quot.liftOn c ↑(liftAux R f)\n                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : FreeLieAlgebra R X),\n                          (fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                              (x + y) =\n                            (fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                x +\n                              (fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                y) },\n                map_smul' :=\n                  (_ :\n                    ∀ (t : R) (x : FreeLieAlgebra R X),\n                      AddHom.toFun\n                          {\n                            toFun := fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : FreeLieAlgebra R X),\n                                  (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      (x + y) =\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        x +\n                                      (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        y) }\n                          (t • x) =\n                        ↑(RingHom.id R) t •\n                          AddHom.toFun\n                            {\n                              toFun := fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : FreeLieAlgebra R X),\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        (x + y) =\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          x +\n                                        (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          y) }\n                            x) },\n            map_lie' :=\n              (_ :\n                ∀ {x y : FreeLieAlgebra R X},\n                  AddHom.toFun\n                      {\n                          toAddHom :=\n                            {\n                              toFun := fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : FreeLieAlgebra R X),\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        (x + y) =\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          x +\n                                        (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          y) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (t : R) (x : FreeLieAlgebra R X),\n                                AddHom.toFun\n                                    {\n                                      toFun := fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (x y : FreeLieAlgebra R X),\n                                            (fun c =>\n                                                  Quot.liftOn c ↑(liftAux R f)\n                                                    (_ :\n                                                      ∀ (a b : lib R X),\n                                                        Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                (x + y) =\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  x +\n                                                (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  y) }\n                                    (t • x) =\n                                  ↑(RingHom.id R) t •\n                                    AddHom.toFun\n                                      {\n                                        toFun := fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (x y : FreeLieAlgebra R X),\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  (x + y) =\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    x +\n                                                  (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    y) }\n                                      x) }.toAddHom\n                      ⁅x, y⁆ =\n                    ⁅AddHom.toFun\n                        {\n                            toAddHom :=\n                              {\n                                toFun := fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : FreeLieAlgebra R X),\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          (x + y) =\n                                        (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            x +\n                                          (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            y) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (t : R) (x : FreeLieAlgebra R X),\n                                  AddHom.toFun\n                                      {\n                                        toFun := fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (x y : FreeLieAlgebra R X),\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  (x + y) =\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    x +\n                                                  (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    y) }\n                                      (t • x) =\n                                    ↑(RingHom.id R) t •\n                                      AddHom.toFun\n                                        {\n                                          toFun := fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (x y : FreeLieAlgebra R X),\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    (x + y) =\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      x +\n                                                    (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      y) }\n                                        x) }.toAddHom\n                        x,\n                      AddHom.toFun\n                        {\n                            toAddHom :=\n                              {\n                                toFun := fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : FreeLieAlgebra R X),\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          (x + y) =\n                                        (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            x +\n                                          (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            y) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (t : R) (x : FreeLieAlgebra R X),\n                                  AddHom.toFun\n                                      {\n                                        toFun := fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (x y : FreeLieAlgebra R X),\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  (x + y) =\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    x +\n                                                  (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    y) }\n                                      (t • x) =\n                                    ↑(RingHom.id R) t •\n                                      AddHom.toFun\n                                        {\n                                          toFun := fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (x y : FreeLieAlgebra R X),\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    (x + y) =\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      x +\n                                                    (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      y) }\n                                        x) }.toAddHom\n                        y⁆) })\n        f)\n      x =\n    f x\n[PROOFSTEP]\nsimp only [liftAux, of, Quot.liftOn_mk, LieHom.coe_mk, Function.comp_apply, lib.lift_of_apply]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nF : FreeLieAlgebra R X →ₗ⁅R⁆ L\n⊢ (fun f =>\n        {\n          toLinearMap :=\n            {\n              toAddHom :=\n                {\n                  toFun := fun c =>\n                    Quot.liftOn c ↑(liftAux R f)\n                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : FreeLieAlgebra R X),\n                        (fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                            (x + y) =\n                          (fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                              x +\n                            (fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                              y) },\n              map_smul' :=\n                (_ :\n                  ∀ (t : R) (x : FreeLieAlgebra R X),\n                    AddHom.toFun\n                        {\n                          toFun := fun c =>\n                            Quot.liftOn c ↑(liftAux R f)\n                              (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : FreeLieAlgebra R X),\n                                (fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                    (x + y) =\n                                  (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      x +\n                                    (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      y) }\n                        (t • x) =\n                      ↑(RingHom.id R) t •\n                        AddHom.toFun\n                          {\n                            toFun := fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : FreeLieAlgebra R X),\n                                  (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      (x + y) =\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        x +\n                                      (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        y) }\n                          x) },\n          map_lie' :=\n            (_ :\n              ∀ {x y : FreeLieAlgebra R X},\n                AddHom.toFun\n                    {\n                        toAddHom :=\n                          {\n                            toFun := fun c =>\n                              Quot.liftOn c ↑(liftAux R f)\n                                (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : FreeLieAlgebra R X),\n                                  (fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                      (x + y) =\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        x +\n                                      (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        y) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (t : R) (x : FreeLieAlgebra R X),\n                              AddHom.toFun\n                                  {\n                                    toFun := fun c =>\n                                      Quot.liftOn c ↑(liftAux R f)\n                                        (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (x y : FreeLieAlgebra R X),\n                                          (fun c =>\n                                                Quot.liftOn c ↑(liftAux R f)\n                                                  (_ :\n                                                    ∀ (a b : lib R X),\n                                                      Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                              (x + y) =\n                                            (fun c =>\n                                                  Quot.liftOn c ↑(liftAux R f)\n                                                    (_ :\n                                                      ∀ (a b : lib R X),\n                                                        Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                x +\n                                              (fun c =>\n                                                  Quot.liftOn c ↑(liftAux R f)\n                                                    (_ :\n                                                      ∀ (a b : lib R X),\n                                                        Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                y) }\n                                  (t • x) =\n                                ↑(RingHom.id R) t •\n                                  AddHom.toFun\n                                    {\n                                      toFun := fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (x y : FreeLieAlgebra R X),\n                                            (fun c =>\n                                                  Quot.liftOn c ↑(liftAux R f)\n                                                    (_ :\n                                                      ∀ (a b : lib R X),\n                                                        Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                (x + y) =\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  x +\n                                                (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  y) }\n                                    x) }.toAddHom\n                    ⁅x, y⁆ =\n                  ⁅AddHom.toFun\n                      {\n                          toAddHom :=\n                            {\n                              toFun := fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : FreeLieAlgebra R X),\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        (x + y) =\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          x +\n                                        (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          y) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (t : R) (x : FreeLieAlgebra R X),\n                                AddHom.toFun\n                                    {\n                                      toFun := fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (x y : FreeLieAlgebra R X),\n                                            (fun c =>\n                                                  Quot.liftOn c ↑(liftAux R f)\n                                                    (_ :\n                                                      ∀ (a b : lib R X),\n                                                        Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                (x + y) =\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  x +\n                                                (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  y) }\n                                    (t • x) =\n                                  ↑(RingHom.id R) t •\n                                    AddHom.toFun\n                                      {\n                                        toFun := fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (x y : FreeLieAlgebra R X),\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  (x + y) =\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    x +\n                                                  (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    y) }\n                                      x) }.toAddHom\n                      x,\n                    AddHom.toFun\n                      {\n                          toAddHom :=\n                            {\n                              toFun := fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : FreeLieAlgebra R X),\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        (x + y) =\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          x +\n                                        (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          y) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (t : R) (x : FreeLieAlgebra R X),\n                                AddHom.toFun\n                                    {\n                                      toFun := fun c =>\n                                        Quot.liftOn c ↑(liftAux R f)\n                                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (x y : FreeLieAlgebra R X),\n                                            (fun c =>\n                                                  Quot.liftOn c ↑(liftAux R f)\n                                                    (_ :\n                                                      ∀ (a b : lib R X),\n                                                        Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                (x + y) =\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  x +\n                                                (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  y) }\n                                    (t • x) =\n                                  ↑(RingHom.id R) t •\n                                    AddHom.toFun\n                                      {\n                                        toFun := fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (x y : FreeLieAlgebra R X),\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  (x + y) =\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    x +\n                                                  (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    y) }\n                                      x) }.toAddHom\n                      y⁆) })\n      ((fun F => ↑F ∘ of R) F) =\n    F\n[PROOFSTEP]\next ⟨a⟩\n[GOAL]\ncase h.mk\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nF : FreeLieAlgebra R X →ₗ⁅R⁆ L\nx✝ : FreeLieAlgebra R X\na : lib R X\n⊢ ↑((fun f =>\n            {\n              toLinearMap :=\n                {\n                  toAddHom :=\n                    {\n                      toFun := fun c =>\n                        Quot.liftOn c ↑(liftAux R f)\n                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : FreeLieAlgebra R X),\n                            (fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                (x + y) =\n                              (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  x +\n                                (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  y) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (t : R) (x : FreeLieAlgebra R X),\n                        AddHom.toFun\n                            {\n                              toFun := fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : FreeLieAlgebra R X),\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        (x + y) =\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          x +\n                                        (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          y) }\n                            (t • x) =\n                          ↑(RingHom.id R) t •\n                            AddHom.toFun\n                              {\n                                toFun := fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : FreeLieAlgebra R X),\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          (x + y) =\n                                        (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            x +\n                                          (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            y) }\n                              x) },\n              map_lie' :=\n                (_ :\n                  ∀ {x y : FreeLieAlgebra R X},\n                    AddHom.toFun\n                        {\n                            toAddHom :=\n                              {\n                                toFun := fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : FreeLieAlgebra R X),\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          (x + y) =\n                                        (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            x +\n                                          (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            y) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (t : R) (x : FreeLieAlgebra R X),\n                                  AddHom.toFun\n                                      {\n                                        toFun := fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (x y : FreeLieAlgebra R X),\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  (x + y) =\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    x +\n                                                  (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    y) }\n                                      (t • x) =\n                                    ↑(RingHom.id R) t •\n                                      AddHom.toFun\n                                        {\n                                          toFun := fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (x y : FreeLieAlgebra R X),\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    (x + y) =\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      x +\n                                                    (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      y) }\n                                        x) }.toAddHom\n                        ⁅x, y⁆ =\n                      ⁅AddHom.toFun\n                          {\n                              toAddHom :=\n                                {\n                                  toFun := fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (x y : FreeLieAlgebra R X),\n                                        (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            (x + y) =\n                                          (fun c =>\n                                                Quot.liftOn c ↑(liftAux R f)\n                                                  (_ :\n                                                    ∀ (a b : lib R X),\n                                                      Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                              x +\n                                            (fun c =>\n                                                Quot.liftOn c ↑(liftAux R f)\n                                                  (_ :\n                                                    ∀ (a b : lib R X),\n                                                      Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                              y) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (t : R) (x : FreeLieAlgebra R X),\n                                    AddHom.toFun\n                                        {\n                                          toFun := fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (x y : FreeLieAlgebra R X),\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    (x + y) =\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      x +\n                                                    (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      y) }\n                                        (t • x) =\n                                      ↑(RingHom.id R) t •\n                                        AddHom.toFun\n                                          {\n                                            toFun := fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (x y : FreeLieAlgebra R X),\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      (x + y) =\n                                                    (fun c =>\n                                                          Quot.liftOn c ↑(liftAux R f)\n                                                            (_ :\n                                                              ∀ (a b : lib R X),\n                                                                Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                        x +\n                                                      (fun c =>\n                                                          Quot.liftOn c ↑(liftAux R f)\n                                                            (_ :\n                                                              ∀ (a b : lib R X),\n                                                                Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                        y) }\n                                          x) }.toAddHom\n                          x,\n                        AddHom.toFun\n                          {\n                              toAddHom :=\n                                {\n                                  toFun := fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (x y : FreeLieAlgebra R X),\n                                        (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            (x + y) =\n                                          (fun c =>\n                                                Quot.liftOn c ↑(liftAux R f)\n                                                  (_ :\n                                                    ∀ (a b : lib R X),\n                                                      Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                              x +\n                                            (fun c =>\n                                                Quot.liftOn c ↑(liftAux R f)\n                                                  (_ :\n                                                    ∀ (a b : lib R X),\n                                                      Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                              y) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (t : R) (x : FreeLieAlgebra R X),\n                                    AddHom.toFun\n                                        {\n                                          toFun := fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (x y : FreeLieAlgebra R X),\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    (x + y) =\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      x +\n                                                    (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      y) }\n                                        (t • x) =\n                                      ↑(RingHom.id R) t •\n                                        AddHom.toFun\n                                          {\n                                            toFun := fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (x y : FreeLieAlgebra R X),\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      (x + y) =\n                                                    (fun c =>\n                                                          Quot.liftOn c ↑(liftAux R f)\n                                                            (_ :\n                                                              ∀ (a b : lib R X),\n                                                                Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                        x +\n                                                      (fun c =>\n                                                          Quot.liftOn c ↑(liftAux R f)\n                                                            (_ :\n                                                              ∀ (a b : lib R X),\n                                                                Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                        y) }\n                                          x) }.toAddHom\n                          y⁆) })\n          ((fun F => ↑F ∘ of R) F))\n      (Quot.mk (Rel R X) a) =\n    ↑F (Quot.mk (Rel R X) a)\n[PROOFSTEP]\nlet F' := F.toNonUnitalAlgHom.comp (mk R)\n[GOAL]\ncase h.mk\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nF : FreeLieAlgebra R X →ₗ⁅R⁆ L\nx✝ : FreeLieAlgebra R X\na : lib R X\nF' : lib R X →ₙₐ[R] CommutatorRing L := NonUnitalAlgHom.comp (LieHom.toNonUnitalAlgHom F) (mk R)\n⊢ ↑((fun f =>\n            {\n              toLinearMap :=\n                {\n                  toAddHom :=\n                    {\n                      toFun := fun c =>\n                        Quot.liftOn c ↑(liftAux R f)\n                          (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : FreeLieAlgebra R X),\n                            (fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                (x + y) =\n                              (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  x +\n                                (fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                  y) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (t : R) (x : FreeLieAlgebra R X),\n                        AddHom.toFun\n                            {\n                              toFun := fun c =>\n                                Quot.liftOn c ↑(liftAux R f)\n                                  (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : FreeLieAlgebra R X),\n                                    (fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                        (x + y) =\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          x +\n                                        (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          y) }\n                            (t • x) =\n                          ↑(RingHom.id R) t •\n                            AddHom.toFun\n                              {\n                                toFun := fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : FreeLieAlgebra R X),\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          (x + y) =\n                                        (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            x +\n                                          (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            y) }\n                              x) },\n              map_lie' :=\n                (_ :\n                  ∀ {x y : FreeLieAlgebra R X},\n                    AddHom.toFun\n                        {\n                            toAddHom :=\n                              {\n                                toFun := fun c =>\n                                  Quot.liftOn c ↑(liftAux R f)\n                                    (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : FreeLieAlgebra R X),\n                                      (fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                          (x + y) =\n                                        (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            x +\n                                          (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            y) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (t : R) (x : FreeLieAlgebra R X),\n                                  AddHom.toFun\n                                      {\n                                        toFun := fun c =>\n                                          Quot.liftOn c ↑(liftAux R f)\n                                            (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (x y : FreeLieAlgebra R X),\n                                              (fun c =>\n                                                    Quot.liftOn c ↑(liftAux R f)\n                                                      (_ :\n                                                        ∀ (a b : lib R X),\n                                                          Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                  (x + y) =\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    x +\n                                                  (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    y) }\n                                      (t • x) =\n                                    ↑(RingHom.id R) t •\n                                      AddHom.toFun\n                                        {\n                                          toFun := fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (x y : FreeLieAlgebra R X),\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    (x + y) =\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      x +\n                                                    (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      y) }\n                                        x) }.toAddHom\n                        ⁅x, y⁆ =\n                      ⁅AddHom.toFun\n                          {\n                              toAddHom :=\n                                {\n                                  toFun := fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (x y : FreeLieAlgebra R X),\n                                        (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            (x + y) =\n                                          (fun c =>\n                                                Quot.liftOn c ↑(liftAux R f)\n                                                  (_ :\n                                                    ∀ (a b : lib R X),\n                                                      Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                              x +\n                                            (fun c =>\n                                                Quot.liftOn c ↑(liftAux R f)\n                                                  (_ :\n                                                    ∀ (a b : lib R X),\n                                                      Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                              y) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (t : R) (x : FreeLieAlgebra R X),\n                                    AddHom.toFun\n                                        {\n                                          toFun := fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (x y : FreeLieAlgebra R X),\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    (x + y) =\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      x +\n                                                    (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      y) }\n                                        (t • x) =\n                                      ↑(RingHom.id R) t •\n                                        AddHom.toFun\n                                          {\n                                            toFun := fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (x y : FreeLieAlgebra R X),\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      (x + y) =\n                                                    (fun c =>\n                                                          Quot.liftOn c ↑(liftAux R f)\n                                                            (_ :\n                                                              ∀ (a b : lib R X),\n                                                                Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                        x +\n                                                      (fun c =>\n                                                          Quot.liftOn c ↑(liftAux R f)\n                                                            (_ :\n                                                              ∀ (a b : lib R X),\n                                                                Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                        y) }\n                                          x) }.toAddHom\n                          x,\n                        AddHom.toFun\n                          {\n                              toAddHom :=\n                                {\n                                  toFun := fun c =>\n                                    Quot.liftOn c ↑(liftAux R f)\n                                      (_ : ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (x y : FreeLieAlgebra R X),\n                                        (fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                            (x + y) =\n                                          (fun c =>\n                                                Quot.liftOn c ↑(liftAux R f)\n                                                  (_ :\n                                                    ∀ (a b : lib R X),\n                                                      Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                              x +\n                                            (fun c =>\n                                                Quot.liftOn c ↑(liftAux R f)\n                                                  (_ :\n                                                    ∀ (a b : lib R X),\n                                                      Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                              y) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (t : R) (x : FreeLieAlgebra R X),\n                                    AddHom.toFun\n                                        {\n                                          toFun := fun c =>\n                                            Quot.liftOn c ↑(liftAux R f)\n                                              (_ :\n                                                ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (x y : FreeLieAlgebra R X),\n                                                (fun c =>\n                                                      Quot.liftOn c ↑(liftAux R f)\n                                                        (_ :\n                                                          ∀ (a b : lib R X),\n                                                            Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                    (x + y) =\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      x +\n                                                    (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      y) }\n                                        (t • x) =\n                                      ↑(RingHom.id R) t •\n                                        AddHom.toFun\n                                          {\n                                            toFun := fun c =>\n                                              Quot.liftOn c ↑(liftAux R f)\n                                                (_ :\n                                                  ∀ (a b : lib R X), Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (x y : FreeLieAlgebra R X),\n                                                  (fun c =>\n                                                        Quot.liftOn c ↑(liftAux R f)\n                                                          (_ :\n                                                            ∀ (a b : lib R X),\n                                                              Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                      (x + y) =\n                                                    (fun c =>\n                                                          Quot.liftOn c ↑(liftAux R f)\n                                                            (_ :\n                                                              ∀ (a b : lib R X),\n                                                                Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                        x +\n                                                      (fun c =>\n                                                          Quot.liftOn c ↑(liftAux R f)\n                                                            (_ :\n                                                              ∀ (a b : lib R X),\n                                                                Rel R X a b → ↑(liftAux R f) a = ↑(liftAux R f) b))\n                                                        y) }\n                                          x) }.toAddHom\n                          y⁆) })\n          ((fun F => ↑F ∘ of R) F))\n      (Quot.mk (Rel R X) a) =\n    ↑F (Quot.mk (Rel R X) a)\n[PROOFSTEP]\nexact NonUnitalAlgHom.congr_fun (lib.lift_comp_of R F') a\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nf : X → L\nx : X\n⊢ ↑(↑(lift R) f) (of R x) = f x\n[PROOFSTEP]\nrw [← @Function.comp_apply _ _ _ (lift R f) (of R) x, of_comp_lift]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nF : FreeLieAlgebra R X →ₗ⁅R⁆ L\n⊢ ↑(lift R) (↑F ∘ of R) = F\n[PROOFSTEP]\nrw [← lift_symm_apply]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nF : FreeLieAlgebra R X →ₗ⁅R⁆ L\n⊢ ↑(lift R) (↑(lift R).symm F) = F\n[PROOFSTEP]\nexact (lift R).apply_symm_apply F\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nF₁ F₂ : FreeLieAlgebra R X →ₗ⁅R⁆ L\nh : ∀ (x : X), ↑F₁ (of R x) = ↑F₂ (of R x)\n⊢ ↑(lift R).symm F₁ = ↑(lift R).symm F₂\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nF₁ F₂ : FreeLieAlgebra R X →ₗ⁅R⁆ L\nh : ∀ (x : X), ↑F₁ (of R x) = ↑F₂ (of R x)\nx✝ : X\n⊢ ↑(lift R).symm F₁ x✝ = ↑(lift R).symm F₂ x✝\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\n⊢ AlgHom.comp (↑(UniversalEnvelopingAlgebra.lift R) (↑(lift R) (FreeAlgebra.ι R)))\n      (↑(FreeAlgebra.lift R) (↑(UniversalEnvelopingAlgebra.ι R) ∘ of R)) =\n    AlgHom.id R (FreeAlgebra R X)\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx✝ : X\n⊢ (↑(AlgHom.comp (↑(UniversalEnvelopingAlgebra.lift R) (↑(lift R) (FreeAlgebra.ι R)))\n            (↑(FreeAlgebra.lift R) (↑(UniversalEnvelopingAlgebra.ι R) ∘ of R))) ∘\n        FreeAlgebra.ι R)\n      x✝ =\n    (↑(AlgHom.id R (FreeAlgebra R X)) ∘ FreeAlgebra.ι R) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\n⊢ AlgHom.comp (↑(FreeAlgebra.lift R) (↑(UniversalEnvelopingAlgebra.ι R) ∘ of R))\n      (↑(UniversalEnvelopingAlgebra.lift R) (↑(lift R) (FreeAlgebra.ι R))) =\n    AlgHom.id R (UniversalEnvelopingAlgebra R (FreeLieAlgebra R X))\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nR : Type u\nX : Type v\ninst✝² : CommRing R\nL : Type w\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx✝ : X\n⊢ ↑(LieHom.comp\n          (AlgHom.toLieHom\n            (AlgHom.comp (↑(FreeAlgebra.lift R) (↑(UniversalEnvelopingAlgebra.ι R) ∘ of R))\n              (↑(UniversalEnvelopingAlgebra.lift R) (↑(lift R) (FreeAlgebra.ι R)))))\n          (UniversalEnvelopingAlgebra.ι R))\n      (of R x✝) =\n    ↑(LieHom.comp (AlgHom.toLieHom (AlgHom.id R (UniversalEnvelopingAlgebra R (FreeLieAlgebra R X))))\n          (UniversalEnvelopingAlgebra.ι R))\n      (of R x✝)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.Free", "llama_tokens": 47786, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.746138993030751, "lm_q2_score": 0.48828339529583464, "lm_q1q2_score": 0.3643272808796702}}
{"text": "[GOAL]\nR : Type u₁\ninst✝¹ : CommRing R\np : ℕ\nhp : Fact (Nat.Prime p)\ninst✝ : CharP R p\nn : ℕ\n⊢ (-1) (n + 1) ^ p = (-1) n\n[PROOFSTEP]\nsimp_rw [← frobenius_def, Pi.neg_apply, Pi.one_apply, RingHom.map_neg, RingHom.map_one]\n[GOAL]\nR : Type u₁\ninst✝¹ : CommSemiring R\np : ℕ\nhp : Fact (Nat.Prime p)\ninst✝ : CharP R p\nf : Ring.Perfection R p\nn : ℕ\n⊢ ↑(coeff R p (n + 1)) (f ^ p) = ↑(coeff R p n) f\n[PROOFSTEP]\nrw [RingHom.map_pow]\n[GOAL]\nR : Type u₁\ninst✝¹ : CommSemiring R\np : ℕ\nhp : Fact (Nat.Prime p)\ninst✝ : CharP R p\nf : Ring.Perfection R p\nn : ℕ\n⊢ ↑(coeff R p (n + 1)) f ^ p = ↑(coeff R p n) f\n[PROOFSTEP]\nexact f.2 n\n[GOAL]\nR : Type u₁\ninst✝¹ : CommSemiring R\np : ℕ\nhp : Fact (Nat.Prime p)\ninst✝ : CharP R p\nf : Ring.Perfection R p\nn : ℕ\n⊢ ↑(coeff R p (n + 1)) (↑(frobenius (Ring.Perfection R p) p) f) = ↑(coeff R p n) f\n[PROOFSTEP]\napply coeff_pow_p f n\n[GOAL]\nR : Type u₁\ninst✝¹ : CommSemiring R\np : ℕ\nhp : Fact (Nat.Prime p)\ninst✝ : CharP R p\nf : Ring.Perfection R p\nn m✝ m : ℕ\nih : ↑(coeff R p (n + m)) ((↑(frobenius (Ring.Perfection R p) p))^[m] f) = ↑(coeff R p n) f\n⊢ ↑(coeff R p (n + Nat.succ m)) ((↑(frobenius (Ring.Perfection R p) p))^[Nat.succ m] f) = ↑(coeff R p n) f\n[PROOFSTEP]\nerw [Function.iterate_succ_apply', coeff_frobenius, ih]\n[GOAL]\nR : Type u₁\ninst✝¹ : CommSemiring R\np : ℕ\nhp : Fact (Nat.Prime p)\ninst✝ : CharP R p\nx : Ring.Perfection R p\nn : ℕ\n⊢ ↑(coeff R p n) (↑(RingHom.comp (pthRoot R p) (frobenius (Ring.Perfection R p) p)) x) =\n    ↑(coeff R p n) (↑(RingHom.id (Ring.Perfection R p)) x)\n[PROOFSTEP]\nrw [RingHom.comp_apply, RingHom.id_apply, coeff_pthRoot, coeff_frobenius]\n[GOAL]\nR : Type u₁\ninst✝¹ : CommSemiring R\np : ℕ\nhp : Fact (Nat.Prime p)\ninst✝ : CharP R p\nx : Ring.Perfection R p\nn : ℕ\n⊢ ↑(coeff R p n) (↑(RingHom.comp (frobenius (Ring.Perfection R p) p) (pthRoot R p)) x) =\n    ↑(coeff R p n) (↑(RingHom.id (Ring.Perfection R p)) x)\n[PROOFSTEP]\nrw [RingHom.comp_apply, RingHom.id_apply, RingHom.map_frobenius, coeff_pthRoot, ←\n  @RingHom.map_frobenius (Ring.Perfection R p) _ R, coeff_frobenius]\n[GOAL]\nR : Type u₁\ninst✝¹ : CommSemiring R\np : ℕ\nhp : Fact (Nat.Prime p)\ninst✝ : CharP R p\nf : Ring.Perfection R p\nn : ℕ\nhfn : ↑(coeff R p n) f ≠ 0\nk✝ k : ℕ\nih : ↑(coeff R p (n + k)) f ≠ 0\nh : ↑(coeff R p (n + Nat.succ k)) f = 0\n⊢ ↑(coeff R p (n + k)) f = 0\n[PROOFSTEP]\nerw [← coeff_pow_p, RingHom.map_pow, h, zero_pow hp.1.pos]\n[GOAL]\nR✝ : Type u₁\ninst✝⁶ : CommSemiring R✝\np : ℕ\nhp : Fact (Nat.Prime p)\ninst✝⁵ : CharP R✝ p\nR : Type u₁\ninst✝⁴ : CommSemiring R\ninst✝³ : CharP R p\ninst✝² : PerfectRing R p\nS : Type u₂\ninst✝¹ : CommSemiring S\ninst✝ : CharP S p\nf : R →+* S\nr : R\nn : ℕ\n⊢ (fun n => ↑f ((↑↑(RingEquiv.symm (frobeniusEquiv R p)))^[n] r)) (n + 1) ^ p =\n    (fun n => ↑f ((↑↑(RingEquiv.symm (frobeniusEquiv R p)))^[n] r)) n\n[PROOFSTEP]\nerw [← f.map_pow, Function.iterate_succ_apply', frobeniusEquiv_symm_pow_p]\n[GOAL]\nR✝ : Type u₁\ninst✝⁶ : CommSemiring R✝\np : ℕ\nhp : Fact (Nat.Prime p)\ninst✝⁵ : CharP R✝ p\nR : Type u₁\ninst✝⁴ : CommSemiring R\ninst✝³ : CharP R p\ninst✝² : PerfectRing R p\nS : Type u₂\ninst✝¹ : CommSemiring S\ninst✝ : CharP S p\nf : R →+* Ring.Perfection S p\nr : R\nn : ℕ\n⊢ ↑(coeff S p 0) (↑f ((↑(RingEquiv.symm (frobeniusEquiv R p)))^[n] r)) = ↑(coeff S p n) (↑f r)\n[PROOFSTEP]\nrw [← coeff_iterate_frobenius _ 0 n, zero_add, ← RingHom.map_iterate_frobenius,\n  Function.RightInverse.iterate (frobenius_apply_frobeniusEquiv_symm R p) n]\n[GOAL]\nR : Type u₁\ninst✝³ : CommSemiring R\np : ℕ\nhp : Fact (Nat.Prime p)\ninst✝² : CharP R p\nS : Type u₂\ninst✝¹ : CommSemiring S\ninst✝ : CharP S p\nφ : R →+* S\nf : Ring.Perfection R p\nn : ℕ\n⊢ (fun n => ↑φ (↑(coeff R p n) f)) (n + 1) ^ p = (fun n => ↑φ (↑(coeff R p n) f)) n\n[PROOFSTEP]\nrw [← φ.map_pow, coeff_pow_p']\n[GOAL]\np : ℕ\ninst✝⁵ : Fact (Nat.Prime p)\nR : Type u₁\ninst✝⁴ : CommSemiring R\ninst✝³ : CharP R p\nP : Type u₃\ninst✝² : CommSemiring P\ninst✝¹ : CharP P p\ninst✝ : PerfectRing P p\nf : P →+* R\ng : P ≃+* Ring.Perfection R p\nhfg : ↑(Perfection.lift p P R) f = ↑g\ny : ℕ → R\nhy : ∀ (n : ℕ), y (n + 1) ^ p = y n\nx : P\nhx : ↑g x = { val := y, property := hy }\nn : ℕ\n⊢ ↑(Perfection.coeff R p n) (↑(↑(Perfection.lift p P R) f) x) = ↑(Perfection.coeff R p n) { val := y, property := hy }\n[PROOFSTEP]\nsimp [hfg, hx]\n[GOAL]\np : ℕ\ninst✝⁶ : Fact (Nat.Prime p)\nR : Type u₁\ninst✝⁵ : CommSemiring R\ninst✝⁴ : CharP R p\nP : Type u₃\ninst✝³ : CommSemiring P\ninst✝² : CharP P p\ninst✝¹ : PerfectRing P p\ninst✝ : PerfectRing R p\nf : ℕ → R\nhf : ∀ (n : ℕ), f (n + 1) ^ p = f n\nn✝ n : ℕ\nih : (↑(RingEquiv.symm (frobeniusEquiv R p)))^[n] (f 0) = f n\n⊢ (↑(RingEquiv.symm (frobeniusEquiv R p)))^[Nat.succ n] (f 0) ^ p = f (Nat.succ n) ^ p\n[PROOFSTEP]\nrw [Function.iterate_succ_apply', frobeniusEquiv_symm_pow_p, ih, hf]\n[GOAL]\np : ℕ\ninst✝¹¹ : Fact (Nat.Prime p)\nR : Type u₁\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CharP R p\nP✝ : Type u₃\ninst✝⁸ : CommSemiring P✝\ninst✝⁷ : CharP P✝ p\ninst✝⁶ : PerfectRing P✝ p\ninst✝⁵ : PerfectRing R p\nS : Type u₂\ninst✝⁴ : CommSemiring S\ninst✝³ : CharP S p\nP : Type u₃\ninst✝² : CommSemiring P\ninst✝¹ : CharP P p\ninst✝ : PerfectRing P p\nπ : P →+* S\nm : PerfectionMap p π\nf : R →+* S\n⊢ (fun f => RingHom.comp π f) ((fun f => RingHom.comp (↑(RingEquiv.symm (equiv m))) (↑(Perfection.lift p R S) f)) f) = f\n[PROOFSTEP]\nsimp_rw [← RingHom.comp_assoc, comp_symm_equiv']\n[GOAL]\np : ℕ\ninst✝¹¹ : Fact (Nat.Prime p)\nR : Type u₁\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CharP R p\nP✝ : Type u₃\ninst✝⁸ : CommSemiring P✝\ninst✝⁷ : CharP P✝ p\ninst✝⁶ : PerfectRing P✝ p\ninst✝⁵ : PerfectRing R p\nS : Type u₂\ninst✝⁴ : CommSemiring S\ninst✝³ : CharP S p\nP : Type u₃\ninst✝² : CommSemiring P\ninst✝¹ : CharP P p\ninst✝ : PerfectRing P p\nπ : P →+* S\nm : PerfectionMap p π\nf : R →+* S\n⊢ RingHom.comp (Perfection.coeff S p 0) (↑(Perfection.lift p R S) f) = f\n[PROOFSTEP]\nexact (Perfection.lift p R S).symm_apply_apply f\n[GOAL]\np : ℕ\ninst✝¹¹ : Fact (Nat.Prime p)\nR : Type u₁\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CharP R p\nP✝ : Type u₃\ninst✝⁸ : CommSemiring P✝\ninst✝⁷ : CharP P✝ p\ninst✝⁶ : PerfectRing P✝ p\ninst✝⁵ : PerfectRing R p\nS : Type u₂\ninst✝⁴ : CommSemiring S\ninst✝³ : CharP S p\nP : Type u₃\ninst✝² : CommSemiring P\ninst✝¹ : CharP P p\ninst✝ : PerfectRing P p\nπ : P →+* S\nm : PerfectionMap p π\nf : R →+* P\n⊢ (fun f => RingHom.comp (↑(RingEquiv.symm (equiv m))) (↑(Perfection.lift p R S) f)) ((fun f => RingHom.comp π f) f) = f\n[PROOFSTEP]\nexact\n  RingHom.ext fun x =>\n    m.equiv.injective <|\n      (m.equiv.apply_symm_apply _).trans <|\n        show Perfection.lift p R S (π.comp f) x = RingHom.comp (↑m.equiv) f x from\n          RingHom.ext_iff.1 (by rw [Equiv.apply_eq_iff_eq_symm_apply]; rfl) _\n[GOAL]\np : ℕ\ninst✝¹¹ : Fact (Nat.Prime p)\nR : Type u₁\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CharP R p\nP✝ : Type u₃\ninst✝⁸ : CommSemiring P✝\ninst✝⁷ : CharP P✝ p\ninst✝⁶ : PerfectRing P✝ p\ninst✝⁵ : PerfectRing R p\nS : Type u₂\ninst✝⁴ : CommSemiring S\ninst✝³ : CharP S p\nP : Type u₃\ninst✝² : CommSemiring P\ninst✝¹ : CharP P p\ninst✝ : PerfectRing P p\nπ : P →+* S\nm : PerfectionMap p π\nf : R →+* P\nx : R\n⊢ ↑(Perfection.lift p R S) (RingHom.comp π f) = RingHom.comp (↑(equiv m)) f\n[PROOFSTEP]\nrw [Equiv.apply_eq_iff_eq_symm_apply]\n[GOAL]\np : ℕ\ninst✝¹¹ : Fact (Nat.Prime p)\nR : Type u₁\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CharP R p\nP✝ : Type u₃\ninst✝⁸ : CommSemiring P✝\ninst✝⁷ : CharP P✝ p\ninst✝⁶ : PerfectRing P✝ p\ninst✝⁵ : PerfectRing R p\nS : Type u₂\ninst✝⁴ : CommSemiring S\ninst✝³ : CharP S p\nP : Type u₃\ninst✝² : CommSemiring P\ninst✝¹ : CharP P p\ninst✝ : PerfectRing P p\nπ : P →+* S\nm : PerfectionMap p π\nf : R →+* P\nx : R\n⊢ RingHom.comp π f = ↑(Perfection.lift p R S).symm (RingHom.comp (↑(equiv m)) f)\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\ninst✝¹⁰ : Fact (Nat.Prime p)\nR : Type u₁\ninst✝⁹ : CommSemiring R\ninst✝⁸ : CharP R p\nP : Type u₃\ninst✝⁷ : CommSemiring P\ninst✝⁶ : CharP P p\ninst✝⁵ : PerfectRing P p\nS : Type u₂\ninst✝⁴ : CommSemiring S\ninst✝³ : CharP S p\nQ : Type u₄\ninst✝² : CommSemiring Q\ninst✝¹ : CharP Q p\ninst✝ : PerfectRing Q p\nφ : R →+* S\nf : Ring.Perfection R p\n⊢ ↑(Perfection.coeff S p 0)\n      (↑(map p (_ : PerfectionMap p (Perfection.coeff R p 0)) (_ : PerfectionMap p (Perfection.coeff S p 0)) φ) f) =\n    ↑(Perfection.coeff S p 0) (↑(Perfection.map p φ) f)\n[PROOFSTEP]\nrw [map_map, Perfection.coeff_map]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x ≠ 0\n⊢ preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) x) = ↑v (↑(algebraMap O K) x)\n[PROOFSTEP]\nobtain ⟨r, hr⟩ : ∃ (a : O), a * (p : O) = (Quotient.mk'' x).out' - x :=\n  Ideal.mem_span_singleton'.1 <| Ideal.Quotient.eq.1 <| Quotient.sound' <| Quotient.mk_out' _\n[GOAL]\ncase intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x ≠ 0\nr : O\nhr : r * ↑p = Quotient.out' (Quotient.mk'' x) - x\n⊢ preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) x) = ↑v (↑(algebraMap O K) x)\n[PROOFSTEP]\nrefine' (if_neg hx).trans (v.map_eq_of_sub_lt <| lt_of_not_le _)\n[GOAL]\ncase intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x ≠ 0\nr : O\nhr : r * ↑p = Quotient.out' (Quotient.mk'' x) - x\n⊢ ¬↑v (↑(algebraMap O K) x) ≤\n      ↑v (↑(algebraMap O K) (Quotient.out' (↑(Ideal.Quotient.mk (Ideal.span {↑p})) x)) - ↑(algebraMap O K) x)\n[PROOFSTEP]\nerw [← RingHom.map_sub, ← hr, hv.le_iff_dvd]\n[GOAL]\ncase intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x ≠ 0\nr : O\nhr : r * ↑p = Quotient.out' (Quotient.mk'' x) - x\n⊢ ¬r * ↑p ∣ x\n[PROOFSTEP]\nexact fun hprx => hx (Ideal.Quotient.eq_zero_iff_mem.2 <| Ideal.mem_span_singleton.2 <| dvd_of_mul_left_dvd hprx)\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhxy0 : x * y ≠ 0\n⊢ preVal K v O hv p (x * y) = preVal K v O hv p x * preVal K v O hv p y\n[PROOFSTEP]\nhave hx0 : x ≠ 0 := mt (by rintro rfl; rw [zero_mul]) hxy0\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhxy0 : x * y ≠ 0\n⊢ x = 0 → x * y = 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\ny : ModP K v O hv p\nhxy0 : 0 * y ≠ 0\n⊢ 0 * y = 0\n[PROOFSTEP]\nrw [zero_mul]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhxy0 : x * y ≠ 0\nhx0 : x ≠ 0\n⊢ preVal K v O hv p (x * y) = preVal K v O hv p x * preVal K v O hv p y\n[PROOFSTEP]\nhave hy0 : y ≠ 0 := mt (by rintro rfl; rw [mul_zero]) hxy0\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhxy0 : x * y ≠ 0\nhx0 : x ≠ 0\n⊢ y = 0 → x * y = 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx : ModP K v O hv p\nhx0 : x ≠ 0\nhxy0 : x * 0 ≠ 0\n⊢ x * 0 = 0\n[PROOFSTEP]\nrw [mul_zero]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhxy0 : x * y ≠ 0\nhx0 : x ≠ 0\nhy0 : y ≠ 0\n⊢ preVal K v O hv p (x * y) = preVal K v O hv p x * preVal K v O hv p y\n[PROOFSTEP]\nobtain ⟨r, rfl⟩ := Ideal.Quotient.mk_surjective x\n[GOAL]\ncase intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\ny : ModP K v O hv p\nhy0 : y ≠ 0\nr : O\nhxy0 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r * y ≠ 0\nhx0 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r ≠ 0\n⊢ preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) r * y) =\n    preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) r) * preVal K v O hv p y\n[PROOFSTEP]\nobtain ⟨s, rfl⟩ := Ideal.Quotient.mk_surjective y\n[GOAL]\ncase intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx0 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r ≠ 0\ns : O\nhy0 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) s ≠ 0\nhxy0 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r * ↑(Ideal.Quotient.mk (Ideal.span {↑p})) s ≠ 0\n⊢ preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) r * ↑(Ideal.Quotient.mk (Ideal.span {↑p})) s) =\n    preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) r) *\n      preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) s)\n[PROOFSTEP]\nrw [← RingHom.map_mul] at hxy0 ⊢\n[GOAL]\ncase intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx0 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r ≠ 0\ns : O\nhy0 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) s ≠ 0\nhxy0 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) (r * s) ≠ 0\n⊢ preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) (r * s)) =\n    preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) r) *\n      preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) s)\n[PROOFSTEP]\nrw [preVal_mk hx0, preVal_mk hy0, preVal_mk hxy0, RingHom.map_mul, v.map_mul]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\n⊢ preVal K v O hv p (x + y) ≤ max (preVal K v O hv p x) (preVal K v O hv p y)\n[PROOFSTEP]\nby_cases hx0 : x = 0\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhx0 : x = 0\n⊢ preVal K v O hv p (x + y) ≤ max (preVal K v O hv p x) (preVal K v O hv p y)\n[PROOFSTEP]\nrw [hx0, zero_add]\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhx0 : x = 0\n⊢ preVal K v O hv p y ≤ max (preVal K v O hv p 0) (preVal K v O hv p y)\n[PROOFSTEP]\nexact le_max_right _ _\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhx0 : ¬x = 0\n⊢ preVal K v O hv p (x + y) ≤ max (preVal K v O hv p x) (preVal K v O hv p y)\n[PROOFSTEP]\nby_cases hy0 : y = 0\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhx0 : ¬x = 0\nhy0 : y = 0\n⊢ preVal K v O hv p (x + y) ≤ max (preVal K v O hv p x) (preVal K v O hv p y)\n[PROOFSTEP]\nrw [hy0, add_zero]\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhx0 : ¬x = 0\nhy0 : y = 0\n⊢ preVal K v O hv p x ≤ max (preVal K v O hv p x) (preVal K v O hv p 0)\n[PROOFSTEP]\nexact le_max_left _ _\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhx0 : ¬x = 0\nhy0 : ¬y = 0\n⊢ preVal K v O hv p (x + y) ≤ max (preVal K v O hv p x) (preVal K v O hv p y)\n[PROOFSTEP]\nby_cases hxy0 : x + y = 0\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhx0 : ¬x = 0\nhy0 : ¬y = 0\nhxy0 : x + y = 0\n⊢ preVal K v O hv p (x + y) ≤ max (preVal K v O hv p x) (preVal K v O hv p y)\n[PROOFSTEP]\nrw [hxy0, preVal_zero]\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhx0 : ¬x = 0\nhy0 : ¬y = 0\nhxy0 : x + y = 0\n⊢ 0 ≤ max (preVal K v O hv p x) (preVal K v O hv p y)\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhx0 : ¬x = 0\nhy0 : ¬y = 0\nhxy0 : ¬x + y = 0\n⊢ preVal K v O hv p (x + y) ≤ max (preVal K v O hv p x) (preVal K v O hv p y)\n[PROOFSTEP]\nobtain ⟨r, rfl⟩ := Ideal.Quotient.mk_surjective x\n[GOAL]\ncase neg.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\ny : ModP K v O hv p\nhy0 : ¬y = 0\nr : O\nhx0 : ¬↑(Ideal.Quotient.mk (Ideal.span {↑p})) r = 0\nhxy0 : ¬↑(Ideal.Quotient.mk (Ideal.span {↑p})) r + y = 0\n⊢ preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) r + y) ≤\n    max (preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) r)) (preVal K v O hv p y)\n[PROOFSTEP]\nobtain ⟨s, rfl⟩ := Ideal.Quotient.mk_surjective y\n[GOAL]\ncase neg.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx0 : ¬↑(Ideal.Quotient.mk (Ideal.span {↑p})) r = 0\ns : O\nhy0 : ¬↑(Ideal.Quotient.mk (Ideal.span {↑p})) s = 0\nhxy0 : ¬↑(Ideal.Quotient.mk (Ideal.span {↑p})) r + ↑(Ideal.Quotient.mk (Ideal.span {↑p})) s = 0\n⊢ preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) r + ↑(Ideal.Quotient.mk (Ideal.span {↑p})) s) ≤\n    max (preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) r))\n      (preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) s))\n[PROOFSTEP]\nrw [← RingHom.map_add] at hxy0 ⊢\n[GOAL]\ncase neg.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx0 : ¬↑(Ideal.Quotient.mk (Ideal.span {↑p})) r = 0\ns : O\nhy0 : ¬↑(Ideal.Quotient.mk (Ideal.span {↑p})) s = 0\nhxy0 : ¬↑(Ideal.Quotient.mk (Ideal.span {↑p})) (r + s) = 0\n⊢ preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) (r + s)) ≤\n    max (preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) r))\n      (preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) s))\n[PROOFSTEP]\nrw [preVal_mk hx0, preVal_mk hy0, preVal_mk hxy0, RingHom.map_add]\n[GOAL]\ncase neg.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx0 : ¬↑(Ideal.Quotient.mk (Ideal.span {↑p})) r = 0\ns : O\nhy0 : ¬↑(Ideal.Quotient.mk (Ideal.span {↑p})) s = 0\nhxy0 : ¬↑(Ideal.Quotient.mk (Ideal.span {↑p})) (r + s) = 0\n⊢ ↑v (↑(algebraMap O K) r + ↑(algebraMap O K) s) ≤ max (↑v (↑(algebraMap O K) r)) (↑v (↑(algebraMap O K) s))\n[PROOFSTEP]\nexact v.map_add _ _\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx : ModP K v O hv p\n⊢ ↑v ↑p < preVal K v O hv p x ↔ x ≠ 0\n[PROOFSTEP]\nrefine' ⟨fun h hx => by rw [hx, preVal_zero] at h ; exact not_lt_zero' h, fun h => lt_of_not_le fun hp => h _⟩\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx : ModP K v O hv p\nh : ↑v ↑p < preVal K v O hv p x\nhx : x = 0\n⊢ False\n[PROOFSTEP]\nrw [hx, preVal_zero] at h \n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx : ModP K v O hv p\nh : ↑v ↑p < 0\nhx : x = 0\n⊢ False\n[PROOFSTEP]\nexact not_lt_zero' h\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp✝ : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx : ModP K v O hv p\nh : x ≠ 0\nhp : preVal K v O hv p x ≤ ↑v ↑p\n⊢ x = 0\n[PROOFSTEP]\nobtain ⟨r, rfl⟩ := Ideal.Quotient.mk_surjective x\n[GOAL]\ncase intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp✝ : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nh : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r ≠ 0\nhp : preVal K v O hv p (↑(Ideal.Quotient.mk (Ideal.span {↑p})) r) ≤ ↑v ↑p\n⊢ ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r = 0\n[PROOFSTEP]\nrw [preVal_mk h, ← map_natCast (algebraMap O K) p, hv.le_iff_dvd] at hp \n[GOAL]\ncase intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp✝ : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nh : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r ≠ 0\nhp : ↑p ∣ r\n⊢ ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r = 0\n[PROOFSTEP]\nrw [Ideal.Quotient.eq_zero_iff_mem, Ideal.mem_span_singleton]\n[GOAL]\ncase intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp✝ : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nh : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r ≠ 0\nhp : ↑p ∣ r\n⊢ ↑p ∣ r\n[PROOFSTEP]\nexact hp\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx : ModP K v O hv p\nhvx : preVal K v O hv p x = 0\nhx0 : x ≠ 0\n⊢ False\n[PROOFSTEP]\nrw [← v_p_lt_preVal, hvx] at hx0 \n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx : ModP K v O hv p\nhvx : preVal K v O hv p x = 0\nhx0 : ↑v ↑p < 0\n⊢ False\n[PROOFSTEP]\nexact not_lt_zero' hx0\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx : O\n⊢ ↑v ↑p < ↑v (↑(algebraMap O K) x) ↔ ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x ≠ 0\n[PROOFSTEP]\nrw [lt_iff_not_le, not_iff_not, ← map_natCast (algebraMap O K) p, hv.le_iff_dvd, Ideal.Quotient.eq_zero_iff_mem,\n  Ideal.mem_span_singleton]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nx y : ModP K v O hv p\nhx : x ^ p ≠ 0\nhy : y ^ p ≠ 0\n⊢ x * y ≠ 0\n[PROOFSTEP]\nobtain ⟨r, rfl⟩ := Ideal.Quotient.mk_surjective x\n[GOAL]\ncase intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\ny : ModP K v O hv p\nhy : y ^ p ≠ 0\nr : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r ^ p ≠ 0\n⊢ ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r * y ≠ 0\n[PROOFSTEP]\nobtain ⟨s, rfl⟩ := Ideal.Quotient.mk_surjective y\n[GOAL]\ncase intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r ^ p ≠ 0\ns : O\nhy : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) s ^ p ≠ 0\n⊢ ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r * ↑(Ideal.Quotient.mk (Ideal.span {↑p})) s ≠ 0\n[PROOFSTEP]\nhave h1p : (0 : ℝ) < 1 / p := one_div_pos.2 (Nat.cast_pos.2 hp.1.pos)\n[GOAL]\ncase intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r ^ p ≠ 0\ns : O\nhy : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) s ^ p ≠ 0\nh1p : 0 < 1 / ↑p\n⊢ ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r * ↑(Ideal.Quotient.mk (Ideal.span {↑p})) s ≠ 0\n[PROOFSTEP]\nrw [← RingHom.map_mul]\n[GOAL]\ncase intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) r ^ p ≠ 0\ns : O\nhy : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) s ^ p ≠ 0\nh1p : 0 < 1 / ↑p\n⊢ ↑(Ideal.Quotient.mk (Ideal.span {↑p})) (r * s) ≠ 0\n[PROOFSTEP]\nrw [← RingHom.map_pow] at hx hy \n[GOAL]\ncase intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) (r ^ p) ≠ 0\ns : O\nhy : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) (s ^ p) ≠ 0\nh1p : 0 < 1 / ↑p\n⊢ ↑(Ideal.Quotient.mk (Ideal.span {↑p})) (r * s) ≠ 0\n[PROOFSTEP]\nrw [← v_p_lt_val hv] at hx hy ⊢\n[GOAL]\ncase intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p < ↑v (↑(algebraMap O K) (r ^ p))\ns : O\nhy : ↑v ↑p < ↑v (↑(algebraMap O K) (s ^ p))\nh1p : 0 < 1 / ↑p\n⊢ ↑v ↑p < ↑v (↑(algebraMap O K) (r * s))\n[PROOFSTEP]\nrw [RingHom.map_pow, v.map_pow, ← rpow_lt_rpow_iff h1p, ← rpow_nat_cast, ← rpow_mul,\n  mul_one_div_cancel (Nat.cast_ne_zero.2 hp.1.ne_zero : (p : ℝ) ≠ 0), rpow_one] at hx hy \n[GOAL]\ncase intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\n⊢ ↑v ↑p < ↑v (↑(algebraMap O K) (r * s))\n[PROOFSTEP]\nrw [RingHom.map_mul, v.map_mul]\n[GOAL]\ncase intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\n⊢ ↑v ↑p < ↑v (↑(algebraMap O K) r) * ↑v (↑(algebraMap O K) s)\n[PROOFSTEP]\nrefine' lt_of_le_of_lt _ (mul_lt_mul₀ hx hy)\n[GOAL]\ncase intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\n⊢ ↑v ↑p ≤ ↑v ↑p ^ (1 / ↑p) * ↑v ↑p ^ (1 / ↑p)\n[PROOFSTEP]\nby_cases hvp : v p = 0\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp✝ : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\nhvp : ↑v ↑p = 0\n⊢ ↑v ↑p ≤ ↑v ↑p ^ (1 / ↑p) * ↑v ↑p ^ (1 / ↑p)\n[PROOFSTEP]\nrw [hvp]\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp✝ : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\nhvp : ↑v ↑p = 0\n⊢ 0 ≤ 0 ^ (1 / ↑p) * 0 ^ (1 / ↑p)\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp✝ : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\nhvp : ¬↑v ↑p = 0\n⊢ ↑v ↑p ≤ ↑v ↑p ^ (1 / ↑p) * ↑v ↑p ^ (1 / ↑p)\n[PROOFSTEP]\nreplace hvp := zero_lt_iff.2 hvp\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp✝ : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\nhvp : 0 < ↑v ↑p\n⊢ ↑v ↑p ≤ ↑v ↑p ^ (1 / ↑p) * ↑v ↑p ^ (1 / ↑p)\n[PROOFSTEP]\nconv_lhs => rw [← rpow_one (v p)]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp✝ : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\nhvp : 0 < ↑v ↑p\n| ↑v ↑p\n[PROOFSTEP]\nrw [← rpow_one (v p)]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp✝ : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\nhvp : 0 < ↑v ↑p\n| ↑v ↑p\n[PROOFSTEP]\nrw [← rpow_one (v p)]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp✝ : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\nhvp : 0 < ↑v ↑p\n| ↑v ↑p\n[PROOFSTEP]\nrw [← rpow_one (v p)]\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp✝ : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\nhvp : 0 < ↑v ↑p\n⊢ ↑v ↑p ^ 1 ≤ ↑v ↑p ^ (1 / ↑p) * ↑v ↑p ^ (1 / ↑p)\n[PROOFSTEP]\nrw [← rpow_add (ne_of_gt hvp)]\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp✝ : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\nhvp : 0 < ↑v ↑p\n⊢ ↑v ↑p ^ 1 ≤ ↑v ↑p ^ (1 / ↑p + 1 / ↑p)\n[PROOFSTEP]\nrefine' rpow_le_rpow_of_exponent_ge hvp (map_natCast (algebraMap O K) p ▸ hv.2 _) _\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp✝ : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\nhvp : 0 < ↑v ↑p\n⊢ 1 / ↑p + 1 / ↑p ≤ 1\n[PROOFSTEP]\nrw [← add_div, div_le_one (Nat.cast_pos.2 hp.1.pos : 0 < (p : ℝ))]\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp✝ : Fact (↑v ↑p ≠ 1)\nr : O\nhx : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) r)\ns : O\nhy : ↑v ↑p ^ (1 / ↑p) < ↑v (↑(algebraMap O K) s)\nh1p : 0 < 1 / ↑p\nhvp : 0 < ↑v ↑p\n⊢ 1 + 1 ≤ ↑p\n[PROOFSTEP]\nexact_mod_cast hp.1.two_le\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nn : ℕ\nhfn : ↑(coeff (ModP K v O hv p) p n) f ≠ 0\n⊢ valAux K v O hv p f = ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p n) f) ^ p ^ n\n[PROOFSTEP]\nhave h : ∃ n, coeff _ _ n f ≠ 0 := ⟨n, hfn⟩\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nn : ℕ\nhfn : ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nh : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\n⊢ valAux K v O hv p f = ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p n) f) ^ p ^ n\n[PROOFSTEP]\nrw [valAux, dif_pos h]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nn : ℕ\nhfn : ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nh : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\n⊢ ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p n) f) ^ p ^ n\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le (Nat.find_min' h hfn)\n[GOAL]\ncase intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nh : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nk : ℕ\nhfn : ↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f ≠ 0\n⊢ ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f) ^ p ^ (Nat.find h + k)\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase intro.zero\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nh : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nk : ℕ\nhfn✝ : ↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f ≠ 0\nhfn : ↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.zero)) f ≠ 0\n⊢ ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.zero)) f) ^ p ^ (Nat.find h + Nat.zero)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.succ\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nh : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nk✝ : ℕ\nhfn✝ : ↑(coeff (ModP K v O hv p) p (Nat.find h + k✝)) f ≠ 0\nk : ℕ\nih :\n  ↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f ≠ 0 →\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n      ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f) ^ p ^ (Nat.find h + k)\nhfn : ↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.succ k)) f ≠ 0\n⊢ ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.succ k)) f) ^ p ^ (Nat.find h + Nat.succ k)\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := Ideal.Quotient.mk_surjective (coeff _ _ (Nat.find h + k + 1) f)\n[GOAL]\ncase intro.succ.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nh : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nk✝ : ℕ\nhfn✝ : ↑(coeff (ModP K v O hv p) p (Nat.find h + k✝)) f ≠ 0\nk : ℕ\nih :\n  ↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f ≠ 0 →\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n      ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f) ^ p ^ (Nat.find h + k)\nhfn : ↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.succ k)) f ≠ 0\nx : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x = ↑(coeff (ModP K v O hv p) p (Nat.find h + k + 1)) f\n⊢ ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.succ k)) f) ^ p ^ (Nat.find h + Nat.succ k)\n[PROOFSTEP]\nhave h1 : (Ideal.Quotient.mk _ x : ModP K v O hv p) ≠ 0 := hx.symm ▸ hfn\n[GOAL]\ncase intro.succ.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nh : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nk✝ : ℕ\nhfn✝ : ↑(coeff (ModP K v O hv p) p (Nat.find h + k✝)) f ≠ 0\nk : ℕ\nih :\n  ↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f ≠ 0 →\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n      ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f) ^ p ^ (Nat.find h + k)\nhfn : ↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.succ k)) f ≠ 0\nx : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x = ↑(coeff (ModP K v O hv p) p (Nat.find h + k + 1)) f\nh1 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x ≠ 0\n⊢ ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.succ k)) f) ^ p ^ (Nat.find h + Nat.succ k)\n[PROOFSTEP]\nhave h2 : (Ideal.Quotient.mk _ (x ^ p) : ModP K v O hv p) ≠ 0 :=\n  by\n  erw [RingHom.map_pow, hx, ← RingHom.map_pow, coeff_pow_p]\n  exact coeff_nat_find_add_ne_zero k\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nh : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nk✝ : ℕ\nhfn✝ : ↑(coeff (ModP K v O hv p) p (Nat.find h + k✝)) f ≠ 0\nk : ℕ\nih :\n  ↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f ≠ 0 →\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n      ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f) ^ p ^ (Nat.find h + k)\nhfn : ↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.succ k)) f ≠ 0\nx : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x = ↑(coeff (ModP K v O hv p) p (Nat.find h + k + 1)) f\nh1 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x ≠ 0\n⊢ ↑(Ideal.Quotient.mk (Ideal.span {↑p})) (x ^ p) ≠ 0\n[PROOFSTEP]\nerw [RingHom.map_pow, hx, ← RingHom.map_pow, coeff_pow_p]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nh : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nk✝ : ℕ\nhfn✝ : ↑(coeff (ModP K v O hv p) p (Nat.find h + k✝)) f ≠ 0\nk : ℕ\nih :\n  ↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f ≠ 0 →\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n      ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f) ^ p ^ (Nat.find h + k)\nhfn : ↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.succ k)) f ≠ 0\nx : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x = ↑(coeff (ModP K v O hv p) p (Nat.find h + k + 1)) f\nh1 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x ≠ 0\n⊢ ↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f ≠ 0\n[PROOFSTEP]\nexact coeff_nat_find_add_ne_zero k\n[GOAL]\ncase intro.succ.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nh : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nk✝ : ℕ\nhfn✝ : ↑(coeff (ModP K v O hv p) p (Nat.find h + k✝)) f ≠ 0\nk : ℕ\nih :\n  ↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f ≠ 0 →\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n      ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f) ^ p ^ (Nat.find h + k)\nhfn : ↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.succ k)) f ≠ 0\nx : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x = ↑(coeff (ModP K v O hv p) p (Nat.find h + k + 1)) f\nh1 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x ≠ 0\nh2 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) (x ^ p) ≠ 0\n⊢ ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.succ k)) f) ^ p ^ (Nat.find h + Nat.succ k)\n[PROOFSTEP]\nerw [ih (coeff_nat_find_add_ne_zero k), ← hx, ← coeff_pow_p, RingHom.map_pow, ← hx, ← RingHom.map_pow,\n  ModP.preVal_mk h1, ModP.preVal_mk h2, RingHom.map_pow, v.map_pow, ← pow_mul, pow_succ]\n[GOAL]\ncase intro.succ.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nh : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nk✝ : ℕ\nhfn✝ : ↑(coeff (ModP K v O hv p) p (Nat.find h + k✝)) f ≠ 0\nk : ℕ\nih :\n  ↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f ≠ 0 →\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h)) f) ^ p ^ Nat.find h =\n      ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (Nat.find h + k)) f) ^ p ^ (Nat.find h + k)\nhfn : ↑(coeff (ModP K v O hv p) p (Nat.find h + Nat.succ k)) f ≠ 0\nx : O\nhx : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x = ↑(coeff (ModP K v O hv p) p (Nat.find h + k + 1)) f\nh1 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) x ≠ 0\nh2 : ↑(Ideal.Quotient.mk (Ideal.span {↑p})) (x ^ p) ≠ 0\n⊢ ↑v (↑(algebraMap O K) x) ^ (p * p ^ (Nat.find h + k)) = ↑v (↑(algebraMap O K) x) ^ (p * p ^ Nat.add (Nat.find h) k)\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\n⊢ ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p 0) 1) ^ p ^ 0 = 1\n[PROOFSTEP]\nrw [pow_zero, pow_one, RingHom.map_one, ← (Ideal.Quotient.mk _).map_one, ModP.preVal_mk, RingHom.map_one, v.map_one]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\n⊢ ↑(Ideal.Quotient.mk (Ideal.span {↑p})) 1 ≠ 0\n[PROOFSTEP]\nchange (1 : ModP K v O hv p) ≠ 0\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\n⊢ valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g\n[PROOFSTEP]\nby_cases hf : f = 0\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : f = 0\n⊢ valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g\n[PROOFSTEP]\nrw [hf, zero_mul, valAux_zero, zero_mul]\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\n⊢ valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g\n[PROOFSTEP]\nby_cases hg : g = 0\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : g = 0\n⊢ valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g\n[PROOFSTEP]\nrw [hg, mul_zero, valAux_zero, mul_zero]\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\n⊢ valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g\n[PROOFSTEP]\nobtain ⟨m, hm⟩ : ∃ n, coeff _ _ n f ≠ 0 := not_forall.1 fun h => hf <| Perfection.ext h\n[GOAL]\ncase neg.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm : ℕ\nhm : ↑(coeff (ModP K v O hv p) p m) f ≠ 0\n⊢ valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n, coeff _ _ n g ≠ 0 := not_forall.1 fun h => hg <| Perfection.ext h\n[GOAL]\ncase neg.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm : ℕ\nhm : ↑(coeff (ModP K v O hv p) p m) f ≠ 0\nn : ℕ\nhn : ↑(coeff (ModP K v O hv p) p n) g ≠ 0\n⊢ valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g\n[PROOFSTEP]\nreplace hm := coeff_ne_zero_of_le hm (le_max_left m n)\n[GOAL]\ncase neg.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm n : ℕ\nhn : ↑(coeff (ModP K v O hv p) p n) g ≠ 0\nhm : ↑(coeff (ModP K v O hv p) p (max m n)) f ≠ 0\n⊢ valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g\n[PROOFSTEP]\nreplace hn := coeff_ne_zero_of_le hn (le_max_right m n)\n[GOAL]\ncase neg.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm n : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max m n)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max m n)) g ≠ 0\n⊢ valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g\n[PROOFSTEP]\nhave hfg : coeff _ _ (max m n + 1) (f * g) ≠ 0 :=\n  by\n  rw [RingHom.map_mul]\n  refine' ModP.mul_ne_zero_of_pow_p_ne_zero _ _\n  · rw [← RingHom.map_pow, coeff_pow_p f]; assumption\n  · rw [← RingHom.map_pow, coeff_pow_p g]; assumption\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm n : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max m n)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max m n)) g ≠ 0\n⊢ ↑(coeff (ModP K v O hv p) p (max m n + 1)) (f * g) ≠ 0\n[PROOFSTEP]\nrw [RingHom.map_mul]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm n : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max m n)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max m n)) g ≠ 0\n⊢ ↑(coeff (ModP K v O hv p) p (max m n + 1)) f * ↑(coeff (ModP K v O hv p) p (max m n + 1)) g ≠ 0\n[PROOFSTEP]\nrefine' ModP.mul_ne_zero_of_pow_p_ne_zero _ _\n[GOAL]\ncase refine'_1\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm n : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max m n)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max m n)) g ≠ 0\n⊢ ↑(coeff (ModP K v O hv p) p (max m n + 1)) f ^ p ≠ 0\n[PROOFSTEP]\nrw [← RingHom.map_pow, coeff_pow_p f]\n[GOAL]\ncase refine'_1\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm n : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max m n)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max m n)) g ≠ 0\n⊢ ↑(coeff (ModP K v O hv p) p (max m n)) f ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase refine'_2\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm n : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max m n)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max m n)) g ≠ 0\n⊢ ↑(coeff (ModP K v O hv p) p (max m n + 1)) g ^ p ≠ 0\n[PROOFSTEP]\nrw [← RingHom.map_pow, coeff_pow_p g]\n[GOAL]\ncase refine'_2\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm n : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max m n)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max m n)) g ≠ 0\n⊢ ↑(coeff (ModP K v O hv p) p (max m n)) g ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm n : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max m n)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max m n)) g ≠ 0\nhfg : ↑(coeff (ModP K v O hv p) p (max m n + 1)) (f * g) ≠ 0\n⊢ valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g\n[PROOFSTEP]\nrw [valAux_eq (coeff_add_ne_zero hm 1), valAux_eq (coeff_add_ne_zero hn 1), valAux_eq hfg]\n[GOAL]\ncase neg.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm n : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max m n)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max m n)) g ≠ 0\nhfg : ↑(coeff (ModP K v O hv p) p (max m n + 1)) (f * g) ≠ 0\n⊢ ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max m n + 1)) (f * g)) ^ p ^ (max m n + 1) =\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max m n + 1)) f) ^ p ^ (max m n + 1) *\n      ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max m n + 1)) g) ^ p ^ (max m n + 1)\n[PROOFSTEP]\nrw [RingHom.map_mul] at hfg ⊢\n[GOAL]\ncase neg.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nm n : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max m n)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max m n)) g ≠ 0\nhfg : ↑(coeff (ModP K v O hv p) p (max m n + 1)) f * ↑(coeff (ModP K v O hv p) p (max m n + 1)) g ≠ 0\n⊢ ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max m n + 1)) f * ↑(coeff (ModP K v O hv p) p (max m n + 1)) g) ^\n      p ^ (max m n + 1) =\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max m n + 1)) f) ^ p ^ (max m n + 1) *\n      ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max m n + 1)) g) ^ p ^ (max m n + 1)\n[PROOFSTEP]\nrw [ModP.preVal_mul hfg, mul_pow]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nby_cases hf : f = 0\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : f = 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nrw [hf, zero_add, valAux_zero, max_eq_right]\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : f = 0\n⊢ 0 ≤ valAux K v O hv p g\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nby_cases hg : g = 0\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : g = 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nrw [hg, add_zero, valAux_zero, max_eq_left]\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : g = 0\n⊢ 0 ≤ valAux K v O hv p f\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nby_cases hfg : f + g = 0\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nhfg : f + g = 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nrw [hfg, valAux_zero]\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nhfg : f + g = 0\n⊢ 0 ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ¬f = 0\nhg : ¬g = 0\nhfg : ¬f + g = 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nreplace hf : ∃ n, coeff _ _ n f ≠ 0 := not_forall.1 fun h => hf <| Perfection.ext h\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhg : ¬g = 0\nhfg : ¬f + g = 0\nhf : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nreplace hg : ∃ n, coeff _ _ n g ≠ 0 := not_forall.1 fun h => hg <| Perfection.ext h\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhfg : ¬f + g = 0\nhf : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nhg : ∃ n, ↑(coeff (ModP K v O hv p) p n) g ≠ 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nreplace hfg : ∃ n, coeff _ _ n (f + g) ≠ 0 := not_forall.1 fun h => hfg <| Perfection.ext h\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhf : ∃ n, ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nhg : ∃ n, ↑(coeff (ModP K v O hv p) p n) g ≠ 0\nhfg : ∃ n, ↑(coeff (ModP K v O hv p) p n) (f + g) ≠ 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nobtain ⟨m, hm⟩ := hf\n[GOAL]\ncase neg.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhg : ∃ n, ↑(coeff (ModP K v O hv p) p n) g ≠ 0\nhfg : ∃ n, ↑(coeff (ModP K v O hv p) p n) (f + g) ≠ 0\nm : ℕ\nhm : ↑(coeff (ModP K v O hv p) p m) f ≠ 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := hg\n[GOAL]\ncase neg.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nhfg : ∃ n, ↑(coeff (ModP K v O hv p) p n) (f + g) ≠ 0\nm : ℕ\nhm : ↑(coeff (ModP K v O hv p) p m) f ≠ 0\nn : ℕ\nhn : ↑(coeff (ModP K v O hv p) p n) g ≠ 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := hfg\n[GOAL]\ncase neg.intro.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nm : ℕ\nhm : ↑(coeff (ModP K v O hv p) p m) f ≠ 0\nn : ℕ\nhn : ↑(coeff (ModP K v O hv p) p n) g ≠ 0\nk : ℕ\nhk : ↑(coeff (ModP K v O hv p) p k) (f + g) ≠ 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nreplace hm := coeff_ne_zero_of_le hm (le_trans (le_max_left m n) (le_max_left _ k))\n[GOAL]\ncase neg.intro.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nm n : ℕ\nhn : ↑(coeff (ModP K v O hv p) p n) g ≠ 0\nk : ℕ\nhk : ↑(coeff (ModP K v O hv p) p k) (f + g) ≠ 0\nhm : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) f ≠ 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nreplace hn := coeff_ne_zero_of_le hn (le_trans (le_max_right m n) (le_max_left _ k))\n[GOAL]\ncase neg.intro.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nm n k : ℕ\nhk : ↑(coeff (ModP K v O hv p) p k) (f + g) ≠ 0\nhm : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) g ≠ 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nreplace hk := coeff_ne_zero_of_le hk (le_max_right (max m n) k)\n[GOAL]\ncase neg.intro.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nm n k : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) g ≠ 0\nhk : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) (f + g) ≠ 0\n⊢ valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)\n[PROOFSTEP]\nrw [valAux_eq hm, valAux_eq hn, valAux_eq hk, RingHom.map_add]\n[GOAL]\ncase neg.intro.intro.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nm n k : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) g ≠ 0\nhk : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) (f + g) ≠ 0\n⊢ ModP.preVal K v O hv p\n        (↑(coeff (ModP K v O hv p) p (max (max m n) k)) f + ↑(coeff (ModP K v O hv p) p (max (max m n) k)) g) ^\n      p ^ max (max m n) k ≤\n    max (ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max (max m n) k)) f) ^ p ^ max (max m n) k)\n      (ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max (max m n) k)) g) ^ p ^ max (max m n) k)\n[PROOFSTEP]\ncases' le_max_iff.1 (ModP.preVal_add (coeff _ _ (max (max m n) k) f) (coeff _ _ (max (max m n) k) g)) with h h\n[GOAL]\ncase neg.intro.intro.intro.inl\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nm n k : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) g ≠ 0\nhk : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) (f + g) ≠ 0\nh :\n  ModP.preVal K v O hv p\n      (↑(coeff (ModP K v O hv p) p (max (max m n) k)) f + ↑(coeff (ModP K v O hv p) p (max (max m n) k)) g) ≤\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max (max m n) k)) f)\n⊢ ModP.preVal K v O hv p\n        (↑(coeff (ModP K v O hv p) p (max (max m n) k)) f + ↑(coeff (ModP K v O hv p) p (max (max m n) k)) g) ^\n      p ^ max (max m n) k ≤\n    max (ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max (max m n) k)) f) ^ p ^ max (max m n) k)\n      (ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max (max m n) k)) g) ^ p ^ max (max m n) k)\n[PROOFSTEP]\nexact le_max_of_le_left (pow_le_pow_of_le_left' h _)\n[GOAL]\ncase neg.intro.intro.intro.inr\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf g : PreTilt K v O hv p\nm n k : ℕ\nhm : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) f ≠ 0\nhn : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) g ≠ 0\nhk : ↑(coeff (ModP K v O hv p) p (max (max m n) k)) (f + g) ≠ 0\nh :\n  ModP.preVal K v O hv p\n      (↑(coeff (ModP K v O hv p) p (max (max m n) k)) f + ↑(coeff (ModP K v O hv p) p (max (max m n) k)) g) ≤\n    ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max (max m n) k)) g)\n⊢ ModP.preVal K v O hv p\n        (↑(coeff (ModP K v O hv p) p (max (max m n) k)) f + ↑(coeff (ModP K v O hv p) p (max (max m n) k)) g) ^\n      p ^ max (max m n) k ≤\n    max (ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max (max m n) k)) f) ^ p ^ max (max m n) k)\n      (ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p (max (max m n) k)) g) ^ p ^ max (max m n) k)\n[PROOFSTEP]\nexact le_max_of_le_right (pow_le_pow_of_le_left' h _)\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\n⊢ ↑(val K v O hv p) f = 0 ↔ f = 0\n[PROOFSTEP]\nby_cases hf0 : f = 0\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nhf0 : f = 0\n⊢ ↑(val K v O hv p) f = 0 ↔ f = 0\n[PROOFSTEP]\nrw [hf0]\n[GOAL]\ncase pos\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nhf0 : f = 0\n⊢ ↑(val K v O hv p) 0 = 0 ↔ 0 = 0\n[PROOFSTEP]\nexact iff_of_true (Valuation.map_zero _) rfl\n[GOAL]\ncase neg\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nhf0 : ¬f = 0\n⊢ ↑(val K v O hv p) f = 0 ↔ f = 0\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n, coeff _ _ n f ≠ 0 := not_forall.1 fun h => hf0 <| Perfection.ext h\n[GOAL]\ncase neg.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nhf0 : ¬f = 0\nn : ℕ\nhn : ↑(coeff (ModP K v O hv p) p n) f ≠ 0\n⊢ ↑(val K v O hv p) f = 0 ↔ f = 0\n[PROOFSTEP]\nshow valAux K v O hv p f = 0 ↔ f = 0\n[GOAL]\ncase neg.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nhf0 : ¬f = 0\nn : ℕ\nhn : ↑(coeff (ModP K v O hv p) p n) f ≠ 0\n⊢ valAux K v O hv p f = 0 ↔ f = 0\n[PROOFSTEP]\nrefine' iff_of_false (fun hvf => hn _) hf0\n[GOAL]\ncase neg.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nhf0 : ¬f = 0\nn : ℕ\nhn : ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nhvf : valAux K v O hv p f = 0\n⊢ ↑(coeff (ModP K v O hv p) p n) f = 0\n[PROOFSTEP]\nrw [valAux_eq hn] at hvf \n[GOAL]\ncase neg.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nhf0 : ¬f = 0\nn : ℕ\nhn : ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nhvf : ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p n) f) ^ p ^ n = 0\n⊢ ↑(coeff (ModP K v O hv p) p n) f = 0\n[PROOFSTEP]\nreplace hvf := pow_eq_zero hvf\n[GOAL]\ncase neg.intro\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nf : PreTilt K v O hv p\nhf0 : ¬f = 0\nn : ℕ\nhn : ↑(coeff (ModP K v O hv p) p n) f ≠ 0\nhvf : ModP.preVal K v O hv p (↑(coeff (ModP K v O hv p) p n) f) = 0\n⊢ ↑(coeff (ModP K v O hv p) p n) f = 0\n[PROOFSTEP]\nrwa [ModP.preVal_eq_zero] at hvf \n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\n⊢ IsDomain (PreTilt K v O hv p)\n[PROOFSTEP]\nhaveI : Nontrivial (PreTilt K v O hv p) := ⟨(CharP.nontrivial_of_char_ne_one hp.1.ne_one).1⟩\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nthis : Nontrivial (PreTilt K v O hv p)\n⊢ IsDomain (PreTilt K v O hv p)\n[PROOFSTEP]\nhaveI : NoZeroDivisors (PreTilt K v O hv p) :=\n  ⟨fun hfg => by\n    simp_rw [← map_eq_zero] at hfg ⊢; contrapose! hfg; rw [Valuation.map_mul]\n    exact mul_ne_zero hfg.1 hfg.2⟩\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nthis : Nontrivial (PreTilt K v O hv p)\na✝ b✝ : PreTilt K v O hv p\nhfg : a✝ * b✝ = 0\n⊢ a✝ = 0 ∨ b✝ = 0\n[PROOFSTEP]\nsimp_rw [← map_eq_zero] at hfg ⊢\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nthis : Nontrivial (PreTilt K v O hv p)\na✝ b✝ : PreTilt K v O hv p\nhfg : ↑(val K v O hv p) (a✝ * b✝) = 0\n⊢ ↑(val K v O hv p) a✝ = 0 ∨ ↑(val K v O hv p) b✝ = 0\n[PROOFSTEP]\ncontrapose! hfg\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nthis : Nontrivial (PreTilt K v O hv p)\na✝ b✝ : PreTilt K v O hv p\nhfg : ↑(val K v O hv p) a✝ ≠ 0 ∧ ↑(val K v O hv p) b✝ ≠ 0\n⊢ ↑(val K v O hv p) (a✝ * b✝) ≠ 0\n[PROOFSTEP]\nrw [Valuation.map_mul]\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nthis : Nontrivial (PreTilt K v O hv p)\na✝ b✝ : PreTilt K v O hv p\nhfg : ↑(val K v O hv p) a✝ ≠ 0 ∧ ↑(val K v O hv p) b✝ ≠ 0\n⊢ ↑(val K v O hv p) a✝ * ↑(val K v O hv p) b✝ ≠ 0\n[PROOFSTEP]\nexact mul_ne_zero hfg.1 hfg.2\n[GOAL]\nK : Type u₁\ninst✝² : Field K\nv : Valuation K ℝ≥0\nO : Type u₂\ninst✝¹ : CommRing O\ninst✝ : Algebra O K\nhv : Valuation.Integers v O\np : ℕ\nhp : Fact (Nat.Prime p)\nhvp : Fact (↑v ↑p ≠ 1)\nthis✝ : Nontrivial (PreTilt K v O hv p)\nthis : NoZeroDivisors (PreTilt K v O hv p)\n⊢ IsDomain (PreTilt K v O hv p)\n[PROOFSTEP]\nexact NoZeroDivisors.to_isDomain _\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Perfection", "llama_tokens": 39018, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646140788308, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.3642257881229782}}
{"text": "[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nx y : α →₀ M\n⊢ ↑(x + y) = ↑x + ↑y\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nx y : α →₀ M\nx✝ : α\n⊢ ↑(x + y) x✝ = (↑x + ↑y) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nx : R\ny : α →₀ M\n⊢ AddHom.toFun { toFun := FunLike.coe, map_add' := (_ : ∀ (x y : α →₀ M), ↑(x + y) = ↑x + ↑y) } (x • y) =\n    ↑(RingHom.id R) x • AddHom.toFun { toFun := FunLike.coe, map_add' := (_ : ∀ (x y : α →₀ M), ↑(x + y) = ↑x + ↑y) } y\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nx : R\ny : α →₀ M\nx✝ : α\n⊢ AddHom.toFun { toFun := FunLike.coe, map_add' := (_ : ∀ (x y : α →₀ M), ↑(x + y) = ↑x + ↑y) } (x • y) x✝ =\n    (↑(RingHom.id R) x •\n        AddHom.toFun { toFun := FunLike.coe, map_add' := (_ : ∀ (x y : α →₀ M), ↑(x + y) = ↑x + ↑y) } y)\n      x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nh : Disjoint s t\n⊢ ⨆ (a : α) (_ : a ∈ s), LinearMap.range (lsingle a) ≤ ⨅ (a : α) (_ : a ∈ t), ker (lapply a)\n[PROOFSTEP]\nrefine' iSup_le fun a₁ => iSup_le fun h₁ => range_le_iff_comap.2 _\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nh : Disjoint s t\na₁ : α\nh₁ : a₁ ∈ s\n⊢ comap (lsingle a₁) (⨅ (a : α) (_ : a ∈ t), ker (lapply a)) = ⊤\n[PROOFSTEP]\nsimp only [(ker_comp _ _).symm, eq_top_iff, SetLike.le_def, mem_ker, comap_iInf, mem_iInf]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nh : Disjoint s t\na₁ : α\nh₁ : a₁ ∈ s\n⊢ ∀ ⦃x : M⦄, x ∈ ⊤ → ∀ (i : α), i ∈ t → ↑(comp (lapply i) (lsingle a₁)) x = 0\n[PROOFSTEP]\nintro b _ a₂ h₂\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nh : Disjoint s t\na₁ : α\nh₁ : a₁ ∈ s\nb : M\na✝ : b ∈ ⊤\na₂ : α\nh₂ : a₂ ∈ t\n⊢ ↑(comp (lapply a₂) (lsingle a₁)) b = 0\n[PROOFSTEP]\nhave : a₁ ≠ a₂ := fun eq => h.le_bot ⟨h₁, eq.symm ▸ h₂⟩\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nh : Disjoint s t\na₁ : α\nh₁ : a₁ ∈ s\nb : M\na✝ : b ∈ ⊤\na₂ : α\nh₂ : a₂ ∈ t\nthis : a₁ ≠ a₂\n⊢ ↑(comp (lapply a₂) (lsingle a₁)) b = 0\n[PROOFSTEP]\nexact single_eq_of_ne this\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\n⊢ ⨅ (a : α), ker (lapply a) ≤ ⊥\n[PROOFSTEP]\nsimp only [SetLike.le_def, mem_iInf, mem_ker, mem_bot, lapply_apply]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\n⊢ ∀ ⦃x : α →₀ M⦄, (∀ (i : α), ↑x i = 0) → x = 0\n[PROOFSTEP]\nexact fun a h => Finsupp.ext h\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\n⊢ ⨆ (a : α), LinearMap.range (lsingle a) = ⊤\n[PROOFSTEP]\nrefine' eq_top_iff.2 <| SetLike.le_def.2 fun f _ => _\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nf : α →₀ M\nx✝ : f ∈ ⊤\n⊢ f ∈ ⨆ (a : α), LinearMap.range (lsingle a)\n[PROOFSTEP]\nrw [← sum_single f]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nf : α →₀ M\nx✝ : f ∈ ⊤\n⊢ sum f single ∈ ⨆ (a : α), LinearMap.range (lsingle a)\n[PROOFSTEP]\nexact sum_mem fun a _ => Submodule.mem_iSup_of_mem a ⟨_, rfl⟩\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nhs : Disjoint s t\n⊢ Disjoint (⨆ (a : α) (_ : a ∈ s), LinearMap.range (lsingle a)) (⨆ (a : α) (_ : a ∈ t), LinearMap.range (lsingle a))\n[PROOFSTEP]\nrefine' (Disjoint.mono (lsingle_range_le_ker_lapply s sᶜ _) (lsingle_range_le_ker_lapply t tᶜ _)) _\n[GOAL]\ncase refine'_1\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nhs : Disjoint s t\n⊢ Disjoint s sᶜ\n[PROOFSTEP]\napply disjoint_compl_right\n[GOAL]\ncase refine'_2\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nhs : Disjoint s t\n⊢ Disjoint t tᶜ\n[PROOFSTEP]\napply disjoint_compl_right\n[GOAL]\ncase refine'_3\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nhs : Disjoint s t\n⊢ Disjoint (⨅ (a : α) (_ : a ∈ sᶜ), ker (lapply a)) (⨅ (a : α) (_ : a ∈ tᶜ), ker (lapply a))\n[PROOFSTEP]\nrw [disjoint_iff_inf_le]\n[GOAL]\ncase refine'_3\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nhs : Disjoint s t\n⊢ (⨅ (a : α) (_ : a ∈ sᶜ), ker (lapply a)) ⊓ ⨅ (a : α) (_ : a ∈ tᶜ), ker (lapply a) ≤ ⊥\n[PROOFSTEP]\nrefine' le_trans (le_iInf fun i => _) iInf_ker_lapply_le_bot\n[GOAL]\ncase refine'_3\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nhs : Disjoint s t\ni : α\n⊢ (⨅ (a : α) (_ : a ∈ sᶜ), ker (lapply a)) ⊓ ⨅ (a : α) (_ : a ∈ tᶜ), ker (lapply a) ≤ ker (lapply i)\n[PROOFSTEP]\nclassical\nby_cases his : i ∈ s\n· by_cases hit : i ∈ t\n  · exact (hs.le_bot ⟨his, hit⟩).elim\n  exact inf_le_of_right_le (iInf_le_of_le i <| iInf_le _ hit)\nexact inf_le_of_left_le (iInf_le_of_le i <| iInf_le _ his)\n[GOAL]\ncase refine'_3\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nhs : Disjoint s t\ni : α\n⊢ (⨅ (a : α) (_ : a ∈ sᶜ), ker (lapply a)) ⊓ ⨅ (a : α) (_ : a ∈ tᶜ), ker (lapply a) ≤ ker (lapply i)\n[PROOFSTEP]\nby_cases his : i ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nhs : Disjoint s t\ni : α\nhis : i ∈ s\n⊢ (⨅ (a : α) (_ : a ∈ sᶜ), ker (lapply a)) ⊓ ⨅ (a : α) (_ : a ∈ tᶜ), ker (lapply a) ≤ ker (lapply i)\n[PROOFSTEP]\nby_cases hit : i ∈ t\n[GOAL]\ncase pos\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nhs : Disjoint s t\ni : α\nhis : i ∈ s\nhit : i ∈ t\n⊢ (⨅ (a : α) (_ : a ∈ sᶜ), ker (lapply a)) ⊓ ⨅ (a : α) (_ : a ∈ tᶜ), ker (lapply a) ≤ ker (lapply i)\n[PROOFSTEP]\nexact (hs.le_bot ⟨his, hit⟩).elim\n[GOAL]\ncase neg\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nhs : Disjoint s t\ni : α\nhis : i ∈ s\nhit : ¬i ∈ t\n⊢ (⨅ (a : α) (_ : a ∈ sᶜ), ker (lapply a)) ⊓ ⨅ (a : α) (_ : a ∈ tᶜ), ker (lapply a) ≤ ker (lapply i)\n[PROOFSTEP]\nexact inf_le_of_right_le (iInf_le_of_le i <| iInf_le _ hit)\n[GOAL]\ncase neg\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nhs : Disjoint s t\ni : α\nhis : ¬i ∈ s\n⊢ (⨅ (a : α) (_ : a ∈ sᶜ), ker (lapply a)) ⊓ ⨅ (a : α) (_ : a ∈ tᶜ), ker (lapply a) ≤ ker (lapply i)\n[PROOFSTEP]\nexact inf_le_of_left_le (iInf_le_of_le i <| iInf_le _ his)\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set M\na : α\n⊢ span R (single a '' s) = map (lsingle a) (span R s)\n[PROOFSTEP]\nrw [← span_image]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set M\na : α\n⊢ span R (single a '' s) = span R (↑(lsingle a) '' s)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\np q : α →₀ M\nhp : p ∈ {p | ↑p.support ⊆ s}\nhq : q ∈ {p | ↑p.support ⊆ s}\n⊢ p + q ∈ {p | ↑p.support ⊆ s}\n[PROOFSTEP]\nclassical\nrefine' Subset.trans (Subset.trans (Finset.coe_subset.2 support_add) _) (union_subset hp hq)\nrw [Finset.coe_union]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\np q : α →₀ M\nhp : p ∈ {p | ↑p.support ⊆ s}\nhq : q ∈ {p | ↑p.support ⊆ s}\n⊢ p + q ∈ {p | ↑p.support ⊆ s}\n[PROOFSTEP]\nrefine' Subset.trans (Subset.trans (Finset.coe_subset.2 support_add) _) (union_subset hp hq)\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\np q : α →₀ M\nhp : p ∈ {p | ↑p.support ⊆ s}\nhq : q ∈ {p | ↑p.support ⊆ s}\n⊢ ↑(p.support ∪ q.support) ⊆ ↑p.support ∪ ↑q.support\n[PROOFSTEP]\nrw [Finset.coe_union]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\n⊢ 0 ∈\n    { carrier := {p | ↑p.support ⊆ s},\n        add_mem' :=\n          (_ : ∀ {p q : α →₀ M}, p ∈ {p | ↑p.support ⊆ s} → q ∈ {p | ↑p.support ⊆ s} → ↑(p + q).support ⊆ s) }.carrier\n[PROOFSTEP]\nsimp only [subset_def, Finset.mem_coe, Set.mem_setOf_eq, mem_support_iff, zero_apply]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\n⊢ ∀ (x : α), 0 ≠ 0 → x ∈ s\n[PROOFSTEP]\nintro h ha\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nh : α\nha : 0 ≠ 0\n⊢ h ∈ s\n[PROOFSTEP]\nexact (ha rfl).elim\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\np : α →₀ M\n⊢ p ∈ supported M R s ↔ ∀ (x : α), ¬x ∈ s → ↑p x = 0\n[PROOFSTEP]\nhaveI := Classical.decPred fun x : α => x ∈ s\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\np : α →₀ M\nthis : DecidablePred fun x => x ∈ s\n⊢ p ∈ supported M R s ↔ ∀ (x : α), ¬x ∈ s → ↑p x = 0\n[PROOFSTEP]\nsimp [mem_supported, Set.subset_def, not_imp_comm]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\np : α →₀ M\n⊢ p ∈ supported M R ↑p.support\n[PROOFSTEP]\nrw [Finsupp.mem_supported]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\n⊢ supported R R s = span R ((fun i => single i 1) '' s)\n[PROOFSTEP]\nrefine' (span_eq_of_le _ _ (SetLike.le_def.2 fun l hl => _)).symm\n[GOAL]\ncase refine'_1\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\n⊢ (fun i => single i 1) '' s ⊆ ↑(supported R R s)\n[PROOFSTEP]\nrintro _ ⟨_, hp, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nw✝ : α\nhp : w✝ ∈ s\n⊢ (fun i => single i 1) w✝ ∈ ↑(supported R R s)\n[PROOFSTEP]\nexact single_mem_supported R 1 hp\n[GOAL]\ncase refine'_2\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nl : α →₀ R\nhl : l ∈ supported R R s\n⊢ l ∈ span R ((fun i => single i 1) '' s)\n[PROOFSTEP]\nrw [← l.sum_single]\n[GOAL]\ncase refine'_2\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nl : α →₀ R\nhl : l ∈ supported R R s\n⊢ sum l single ∈ span R ((fun i => single i 1) '' s)\n[PROOFSTEP]\nrefine'\n  sum_mem fun i il =>\n    _\n      -- Porting note: Needed to help this convert quite a bit replacing underscores\n[GOAL]\ncase refine'_2\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nl : α →₀ R\nhl : l ∈ supported R R s\ni : α\nil : i ∈ l.support\n⊢ single i (↑l i) ∈ span R ((fun i => single i 1) '' s)\n[PROOFSTEP]\nconvert smul_mem (M := α →₀ R) (x := single i 1) (span R ((fun i => single i 1) '' s)) (l i) ?_\n[GOAL]\ncase h.e'_4\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nl : α →₀ R\nhl : l ∈ supported R R s\ni : α\nil : i ∈ l.support\n⊢ single i (↑l i) = ↑l i • single i 1\n[PROOFSTEP]\nsimp [span]\n[GOAL]\ncase refine'_2\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nl : α →₀ R\nhl : l ∈ supported R R s\ni : α\nil : i ∈ l.support\n⊢ single i 1 ∈ span R ((fun i => single i 1) '' s)\n[PROOFSTEP]\napply subset_span\n[GOAL]\ncase refine'_2.a\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nl : α →₀ R\nhl : l ∈ supported R R s\ni : α\nil : i ∈ l.support\n⊢ single i 1 ∈ (fun i => single i 1) '' s\n[PROOFSTEP]\napply Set.mem_image_of_mem _ (hl il)\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\n⊢ comp (restrictDom M R s) (Submodule.subtype (supported M R s)) = LinearMap.id\n[PROOFSTEP]\next l a\n[GOAL]\ncase h.a.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nl : { x // x ∈ supported M R s }\na : α\n⊢ ↑↑(↑(comp (restrictDom M R s) (Submodule.subtype (supported M R s))) l) a = ↑↑(↑LinearMap.id l) a\n[PROOFSTEP]\nby_cases h : a ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nl : { x // x ∈ supported M R s }\na : α\nh : a ∈ s\n⊢ ↑↑(↑(comp (restrictDom M R s) (Submodule.subtype (supported M R s))) l) a = ↑↑(↑LinearMap.id l) a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nl : { x // x ∈ supported M R s }\na : α\nh : ¬a ∈ s\n⊢ ↑↑(↑(comp (restrictDom M R s) (Submodule.subtype (supported M R s))) l) a = ↑↑(↑LinearMap.id l) a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nl : { x // x ∈ supported M R s }\na : α\nh : ¬a ∈ s\n⊢ 0 = ↑↑l a\n[PROOFSTEP]\nexact ((mem_supported' R l.1).1 l.2 a h).symm\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nl : α →₀ M\nh : l ∈ supported M R ∅\n⊢ l = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nl : α →₀ M\nh : l ∈ supported M R ∅\na✝ : α\n⊢ ↑l a✝ = ↑0 a✝\n[PROOFSTEP]\nsimp_all [mem_supported']\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\n⊢ supported M R (⋃ (i : δ), s i) = ⨆ (i : δ), supported M R (s i)\n[PROOFSTEP]\nrefine' le_antisymm _ (iSup_le fun i => supported_mono <| Set.subset_iUnion _ _)\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\n⊢ supported M R (⋃ (i : δ), s i) ≤ ⨆ (i : δ), supported M R (s i)\n[PROOFSTEP]\nhaveI := Classical.decPred fun x => x ∈ ⋃ i, s i\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\nthis : DecidablePred fun x => x ∈ ⋃ (i : δ), s i\n⊢ supported M R (⋃ (i : δ), s i) ≤ ⨆ (i : δ), supported M R (s i)\n[PROOFSTEP]\nsuffices LinearMap.range ((Submodule.subtype _).comp (restrictDom M R (⋃ i, s i))) ≤ ⨆ i, supported M R (s i) by\n  rwa [LinearMap.range_comp, range_restrictDom, Submodule.map_top, range_subtype] at this \n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\nthis✝ : DecidablePred fun x => x ∈ ⋃ (i : δ), s i\nthis :\n  LinearMap.range (comp (Submodule.subtype (supported M R (⋃ (i : δ), s i))) (restrictDom M R (⋃ (i : δ), s i))) ≤\n    ⨆ (i : δ), supported M R (s i)\n⊢ supported M R (⋃ (i : δ), s i) ≤ ⨆ (i : δ), supported M R (s i)\n[PROOFSTEP]\nrwa [LinearMap.range_comp, range_restrictDom, Submodule.map_top, range_subtype] at this \n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\nthis : DecidablePred fun x => x ∈ ⋃ (i : δ), s i\n⊢ LinearMap.range (comp (Submodule.subtype (supported M R (⋃ (i : δ), s i))) (restrictDom M R (⋃ (i : δ), s i))) ≤\n    ⨆ (i : δ), supported M R (s i)\n[PROOFSTEP]\nrw [range_le_iff_comap, eq_top_iff]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\nthis : DecidablePred fun x => x ∈ ⋃ (i : δ), s i\n⊢ ⊤ ≤\n    comap (comp (Submodule.subtype (supported M R (⋃ (i : δ), s i))) (restrictDom M R (⋃ (i : δ), s i)))\n      (⨆ (i : δ), supported M R (s i))\n[PROOFSTEP]\nrintro l\n  ⟨⟩\n      -- Porting note: Was ported as `induction l using Finsupp.induction`\n[GOAL]\ncase intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\nthis : DecidablePred fun x => x ∈ ⋃ (i : δ), s i\nl : α →₀ M\n⊢ l ∈\n    comap (comp (Submodule.subtype (supported M R (⋃ (i : δ), s i))) (restrictDom M R (⋃ (i : δ), s i)))\n      (⨆ (i : δ), supported M R (s i))\n[PROOFSTEP]\nrefine Finsupp.induction l ?_ ?_\n[GOAL]\ncase intro.refine_1\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\nthis : DecidablePred fun x => x ∈ ⋃ (i : δ), s i\nl : α →₀ M\n⊢ 0 ∈\n    comap (comp (Submodule.subtype (supported M R (⋃ (i : δ), s i))) (restrictDom M R (⋃ (i : δ), s i)))\n      (⨆ (i : δ), supported M R (s i))\n[PROOFSTEP]\nexact zero_mem _\n[GOAL]\ncase intro.refine_2\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\nthis : DecidablePred fun x => x ∈ ⋃ (i : δ), s i\nl : α →₀ M\n⊢ ∀ (a : α) (b : M) (f : α →₀ M),\n    ¬a ∈ f.support →\n      b ≠ 0 →\n        f ∈\n            comap (comp (Submodule.subtype (supported M R (⋃ (i : δ), s i))) (restrictDom M R (⋃ (i : δ), s i)))\n              (⨆ (i : δ), supported M R (s i)) →\n          single a b + f ∈\n            comap (comp (Submodule.subtype (supported M R (⋃ (i : δ), s i))) (restrictDom M R (⋃ (i : δ), s i)))\n              (⨆ (i : δ), supported M R (s i))\n[PROOFSTEP]\nrefine' fun x a l _ _ => add_mem _\n[GOAL]\ncase intro.refine_2\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\nthis : DecidablePred fun x => x ∈ ⋃ (i : δ), s i\nl✝ : α →₀ M\nx : α\na : M\nl : α →₀ M\nx✝¹ : ¬x ∈ l.support\nx✝ : a ≠ 0\n⊢ single x a ∈\n    comap (comp (Submodule.subtype (supported M R (⋃ (i : δ), s i))) (restrictDom M R (⋃ (i : δ), s i)))\n      (⨆ (i : δ), supported M R (s i))\n[PROOFSTEP]\nby_cases h : ∃ i, x ∈ s i\n[GOAL]\ncase pos\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\nthis : DecidablePred fun x => x ∈ ⋃ (i : δ), s i\nl✝ : α →₀ M\nx : α\na : M\nl : α →₀ M\nx✝¹ : ¬x ∈ l.support\nx✝ : a ≠ 0\nh : ∃ i, x ∈ s i\n⊢ single x a ∈\n    comap (comp (Submodule.subtype (supported M R (⋃ (i : δ), s i))) (restrictDom M R (⋃ (i : δ), s i)))\n      (⨆ (i : δ), supported M R (s i))\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\nthis : DecidablePred fun x => x ∈ ⋃ (i : δ), s i\nl✝ : α →₀ M\nx : α\na : M\nl : α →₀ M\nx✝¹ : ¬x ∈ l.support\nx✝ : a ≠ 0\nh : ¬∃ i, x ∈ s i\n⊢ single x a ∈\n    comap (comp (Submodule.subtype (supported M R (⋃ (i : δ), s i))) (restrictDom M R (⋃ (i : δ), s i)))\n      (⨆ (i : δ), supported M R (s i))\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase pos\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\nthis : DecidablePred fun x => x ∈ ⋃ (i : δ), s i\nl✝ : α →₀ M\nx : α\na : M\nl : α →₀ M\nx✝¹ : ¬x ∈ l.support\nx✝ : a ≠ 0\nh : ∃ i, x ∈ s i\n⊢ single x a ∈ ⨆ (i : δ), supported M R (s i)\n[PROOFSTEP]\ncases' h with i hi\n[GOAL]\ncase pos.intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nδ : Type u_7\ns : δ → Set α\nthis : DecidablePred fun x => x ∈ ⋃ (i : δ), s i\nl✝ : α →₀ M\nx : α\na : M\nl : α →₀ M\nx✝¹ : ¬x ∈ l.support\nx✝ : a ≠ 0\ni : δ\nhi : x ∈ s i\n⊢ single x a ∈ ⨆ (i : δ), supported M R (s i)\n[PROOFSTEP]\nexact le_iSup (fun i => supported M R (s i)) i (single_mem_supported R _ hi)\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\n⊢ supported M R (s ∪ t) = supported M R s ⊔ supported M R t\n[PROOFSTEP]\nerw [Set.union_eq_iUnion, supported_iUnion, iSup_bool_eq]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\n⊢ supported M R (bif true then s else t) ⊔ supported M R (bif false then s else t) = supported M R s ⊔ supported M R t\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nι : Type u_7\ns : ι → Set α\nx : α →₀ M\n⊢ x ∈ supported M R (⋂ (i : ι), s i) ↔ x ∈ ⨅ (i : ι), supported M R (s i)\n[PROOFSTEP]\nsimp [mem_supported, subset_iInter_iff]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\n⊢ supported M R (s ∩ t) = supported M R s ⊓ supported M R t\n[PROOFSTEP]\nrw [Set.inter_eq_iInter, supported_iInter, iInf_bool_eq]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\n⊢ supported M R (bif true then s else t) ⊓ supported M R (bif false then s else t) = supported M R s ⊓ supported M R t\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns t : Set α\nh : Disjoint s t\n⊢ supported M R s ⊓ supported M R t = ⊥\n[PROOFSTEP]\nrw [← supported_inter, disjoint_iff_inter_eq_empty.1 h, supported_empty]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\ninst✝ : Nontrivial M\ns t : Set α\n⊢ Disjoint (supported M R s) (supported M R t) ↔ Disjoint s t\n[PROOFSTEP]\nrefine' ⟨fun h => Set.disjoint_left.mpr fun x hx1 hx2 => _, disjoint_supported_supported⟩\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\ninst✝ : Nontrivial M\ns t : Set α\nh : Disjoint (supported M R s) (supported M R t)\nx : α\nhx1 : x ∈ s\nhx2 : x ∈ t\n⊢ False\n[PROOFSTEP]\nrcases exists_ne (0 : M) with ⟨y, hy⟩\n[GOAL]\ncase intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\ninst✝ : Nontrivial M\ns t : Set α\nh : Disjoint (supported M R s) (supported M R t)\nx : α\nhx1 : x ∈ s\nhx2 : x ∈ t\ny : M\nhy : y ≠ 0\n⊢ False\n[PROOFSTEP]\nhave := h.le_bot ⟨single_mem_supported R y hx1, single_mem_supported R y hx2⟩\n[GOAL]\ncase intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\ninst✝ : Nontrivial M\ns t : Set α\nh : Disjoint (supported M R s) (supported M R t)\nx : α\nhx1 : x ∈ s\nhx2 : x ∈ t\ny : M\nhy : y ≠ 0\nthis : single x y ∈ ⊥\n⊢ False\n[PROOFSTEP]\nrw [mem_bot, single_eq_zero] at this \n[GOAL]\ncase intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\ninst✝ : Nontrivial M\ns t : Set α\nh : Disjoint (supported M R s) (supported M R t)\nx : α\nhx1 : x ∈ s\nhx2 : x ∈ t\ny : M\nhy : y ≠ 0\nthis : y = 0\n⊢ False\n[PROOFSTEP]\nexact hy this\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\n⊢ { x // x ∈ supported M R s } ≃ₗ[R] ↑s →₀ M\n[PROOFSTEP]\nlet F : supported M R s ≃ (s →₀ M) := restrictSupportEquiv s M\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nF : { x // x ∈ supported M R s } ≃ (↑s →₀ M) := restrictSupportEquiv s M\n⊢ { x // x ∈ supported M R s } ≃ₗ[R] ↑s →₀ M\n[PROOFSTEP]\nrefine' F.toLinearEquiv _\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nF : { x // x ∈ supported M R s } ≃ (↑s →₀ M) := restrictSupportEquiv s M\n⊢ IsLinearMap R ↑F\n[PROOFSTEP]\nhave :\n  (F : supported M R s → ↥s →₀ M) =\n    (lsubtypeDomain s : (α →₀ M) →ₗ[R] s →₀ M).comp (Submodule.subtype (supported M R s)) :=\n  rfl\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nF : { x // x ∈ supported M R s } ≃ (↑s →₀ M) := restrictSupportEquiv s M\nthis : ↑F = ↑(comp (lsubtypeDomain s) (Submodule.subtype (supported M R s)))\n⊢ IsLinearMap R ↑F\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\ns : Set α\nF : { x // x ∈ supported M R s } ≃ (↑s →₀ M) := restrictSupportEquiv s M\nthis : ↑F = ↑(comp (lsubtypeDomain s) (Submodule.subtype (supported M R s)))\n⊢ IsLinearMap R ↑(comp (lsubtypeDomain s) (Submodule.subtype (supported M R s)))\n[PROOFSTEP]\nexact LinearMap.isLinear _\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : α → M →ₗ[R] N\nc : R\nf : α →₀ M\n⊢ AddHom.toFun\n      { toFun := fun d => sum d fun i => ↑(F i),\n        map_add' :=\n          (_ :\n            ∀ (a b : α →₀ M),\n              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a + ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) }\n      (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := fun d => sum d fun i => ↑(F i),\n          map_add' :=\n            (_ :\n              ∀ (a b : α →₀ M),\n                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a + ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) }\n        f\n[PROOFSTEP]\nsimp [sum_smul_index', smul_sum]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF G : α → M →ₗ[R] N\n⊢ (fun F =>\n        {\n          toAddHom :=\n            { toFun := fun d => sum d fun i => ↑(F i),\n              map_add' :=\n                (_ :\n                  ∀ (a b : α →₀ M),\n                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n          map_smul' := (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n      (F + G) =\n    (fun F =>\n          {\n            toAddHom :=\n              { toFun := fun d => sum d fun i => ↑(F i),\n                map_add' :=\n                  (_ :\n                    ∀ (a b : α →₀ M),\n                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n            map_smul' := (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n        F +\n      (fun F =>\n          {\n            toAddHom :=\n              { toFun := fun d => sum d fun i => ↑(F i),\n                map_add' :=\n                  (_ :\n                    ∀ (a b : α →₀ M),\n                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n            map_smul' := (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n        G\n[PROOFSTEP]\next x y\n[GOAL]\ncase h.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF G : α → M →ₗ[R] N\nx : α\ny : M\n⊢ ↑(comp\n          ((fun F =>\n              {\n                toAddHom :=\n                  { toFun := fun d => sum d fun i => ↑(F i),\n                    map_add' :=\n                      (_ :\n                        ∀ (a b : α →₀ M),\n                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                map_smul' := (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n            (F + G))\n          (lsingle x))\n      y =\n    ↑(comp\n          ((fun F =>\n                {\n                  toAddHom :=\n                    { toFun := fun d => sum d fun i => ↑(F i),\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : α →₀ M),\n                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                  map_smul' :=\n                    (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n              F +\n            (fun F =>\n                {\n                  toAddHom :=\n                    { toFun := fun d => sum d fun i => ↑(F i),\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : α →₀ M),\n                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                  map_smul' :=\n                    (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n              G)\n          (lsingle x))\n      y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : S\nG : α → M →ₗ[R] N\n⊢ AddHom.toFun\n      {\n        toFun := fun F =>\n          {\n            toAddHom :=\n              { toFun := fun d => sum d fun i => ↑(F i),\n                map_add' :=\n                  (_ :\n                    ∀ (a b : α →₀ M),\n                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n            map_smul' := (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n        map_add' :=\n          (_ :\n            ∀ (F G : α → M →ₗ[R] N),\n              (fun F =>\n                    {\n                      toAddHom :=\n                        { toFun := fun d => sum d fun i => ↑(F i),\n                          map_add' :=\n                            (_ :\n                              ∀ (a b : α →₀ M),\n                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                      map_smul' :=\n                        (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                  (F + G) =\n                (fun F =>\n                      {\n                        toAddHom :=\n                          { toFun := fun d => sum d fun i => ↑(F i),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : α →₀ M),\n                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                        map_smul' :=\n                          (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                    F +\n                  (fun F =>\n                      {\n                        toAddHom :=\n                          { toFun := fun d => sum d fun i => ↑(F i),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : α →₀ M),\n                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                        map_smul' :=\n                          (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                    G) }\n      (F • G) =\n    ↑(RingHom.id S) F •\n      AddHom.toFun\n        {\n          toFun := fun F =>\n            {\n              toAddHom :=\n                { toFun := fun d => sum d fun i => ↑(F i),\n                  map_add' :=\n                    (_ :\n                      ∀ (a b : α →₀ M),\n                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n              map_smul' := (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n          map_add' :=\n            (_ :\n              ∀ (F G : α → M →ₗ[R] N),\n                (fun F =>\n                      {\n                        toAddHom :=\n                          { toFun := fun d => sum d fun i => ↑(F i),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : α →₀ M),\n                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                        map_smul' :=\n                          (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                    (F + G) =\n                  (fun F =>\n                        {\n                          toAddHom :=\n                            { toFun := fun d => sum d fun i => ↑(F i),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : α →₀ M),\n                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                          map_smul' :=\n                            (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                      F +\n                    (fun F =>\n                        {\n                          toAddHom :=\n                            { toFun := fun d => sum d fun i => ↑(F i),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : α →₀ M),\n                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                          map_smul' :=\n                            (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                      G) }\n        G\n[PROOFSTEP]\next x y\n[GOAL]\ncase h.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : S\nG : α → M →ₗ[R] N\nx : α\ny : M\n⊢ ↑(comp\n          (AddHom.toFun\n            {\n              toFun := fun F =>\n                {\n                  toAddHom :=\n                    { toFun := fun d => sum d fun i => ↑(F i),\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : α →₀ M),\n                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                  map_smul' :=\n                    (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n              map_add' :=\n                (_ :\n                  ∀ (F G : α → M →ₗ[R] N),\n                    (fun F =>\n                          {\n                            toAddHom :=\n                              { toFun := fun d => sum d fun i => ↑(F i),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : α →₀ M),\n                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                            map_smul' :=\n                              (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                        (F + G) =\n                      (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := fun d => sum d fun i => ↑(F i),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : α →₀ M),\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                          F +\n                        (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := fun d => sum d fun i => ↑(F i),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : α →₀ M),\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                          G) }\n            (F • G))\n          (lsingle x))\n      y =\n    ↑(comp\n          (↑(RingHom.id S) F •\n            AddHom.toFun\n              {\n                toFun := fun F =>\n                  {\n                    toAddHom :=\n                      { toFun := fun d => sum d fun i => ↑(F i),\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : α →₀ M),\n                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                    map_smul' :=\n                      (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n                map_add' :=\n                  (_ :\n                    ∀ (F G : α → M →ₗ[R] N),\n                      (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := fun d => sum d fun i => ↑(F i),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : α →₀ M),\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                          (F + G) =\n                        (fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun d => sum d fun i => ↑(F i),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : α →₀ M),\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : α →₀ M),\n                                      (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                            F +\n                          (fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun d => sum d fun i => ↑(F i),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : α →₀ M),\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : α →₀ M),\n                                      (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                            G) }\n              G)\n          (lsingle x))\n      y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : α → M →ₗ[R] N\n⊢ (fun F x => comp F (lsingle x))\n      (AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun F =>\n                  {\n                    toAddHom :=\n                      { toFun := fun d => sum d fun i => ↑(F i),\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : α →₀ M),\n                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                    map_smul' :=\n                      (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n                map_add' :=\n                  (_ :\n                    ∀ (F G : α → M →ₗ[R] N),\n                      (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := fun d => sum d fun i => ↑(F i),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : α →₀ M),\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                          (F + G) =\n                        (fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun d => sum d fun i => ↑(F i),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : α →₀ M),\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : α →₀ M),\n                                      (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                            F +\n                          (fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun d => sum d fun i => ↑(F i),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : α →₀ M),\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : α →₀ M),\n                                      (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                            G) },\n            map_smul' :=\n              (_ :\n                ∀ (F : S) (G : α → M →ₗ[R] N),\n                  AddHom.toFun\n                      {\n                        toFun := fun F =>\n                          {\n                            toAddHom :=\n                              { toFun := fun d => sum d fun i => ↑(F i),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : α →₀ M),\n                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                            map_smul' :=\n                              (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n                        map_add' :=\n                          (_ :\n                            ∀ (F G : α → M →ₗ[R] N),\n                              (fun F =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun d => sum d fun i => ↑(F i),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : α →₀ M),\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (c : R) (f : α →₀ M),\n                                            (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                  (F + G) =\n                                (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun d => sum d fun i => ↑(F i),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : α →₀ M),\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : α →₀ M),\n                                              (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                    F +\n                                  (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun d => sum d fun i => ↑(F i),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : α →₀ M),\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : α →₀ M),\n                                              (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                    G) }\n                      (F • G) =\n                    ↑(RingHom.id S) F •\n                      AddHom.toFun\n                        {\n                          toFun := fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := fun d => sum d fun i => ↑(F i),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : α →₀ M),\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n                          map_add' :=\n                            (_ :\n                              ∀ (F G : α → M →ₗ[R] N),\n                                (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun d => sum d fun i => ↑(F i),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : α →₀ M),\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : α →₀ M),\n                                              (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                    (F + G) =\n                                  (fun F =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun d => sum d fun i => ↑(F i),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : α →₀ M),\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (c : R) (f : α →₀ M),\n                                                (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                      F +\n                                    (fun F =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun d => sum d fun i => ↑(F i),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : α →₀ M),\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (c : R) (f : α →₀ M),\n                                                (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                      G) }\n                        G) }.toAddHom\n        F) =\n    F\n[PROOFSTEP]\next x y\n[GOAL]\ncase h.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : α → M →ₗ[R] N\nx : α\ny : M\n⊢ ↑((fun F x => comp F (lsingle x))\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  {\n                    toFun := fun F =>\n                      {\n                        toAddHom :=\n                          { toFun := fun d => sum d fun i => ↑(F i),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : α →₀ M),\n                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                        map_smul' :=\n                          (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n                    map_add' :=\n                      (_ :\n                        ∀ (F G : α → M →ₗ[R] N),\n                          (fun F =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun d => sum d fun i => ↑(F i),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : α →₀ M),\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (c : R) (f : α →₀ M),\n                                        (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                              (F + G) =\n                            (fun F =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun d => sum d fun i => ↑(F i),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : α →₀ M),\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (c : R) (f : α →₀ M),\n                                          (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                F +\n                              (fun F =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun d => sum d fun i => ↑(F i),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : α →₀ M),\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (c : R) (f : α →₀ M),\n                                          (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                G) },\n                map_smul' :=\n                  (_ :\n                    ∀ (F : S) (G : α → M →ₗ[R] N),\n                      AddHom.toFun\n                          {\n                            toFun := fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun d => sum d fun i => ↑(F i),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : α →₀ M),\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : α →₀ M),\n                                      (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n                            map_add' :=\n                              (_ :\n                                ∀ (F G : α → M →ₗ[R] N),\n                                  (fun F =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun d => sum d fun i => ↑(F i),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : α →₀ M),\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (c : R) (f : α →₀ M),\n                                                (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                      (F + G) =\n                                    (fun F =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun d => sum d fun i => ↑(F i),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : α →₀ M),\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (c : R) (f : α →₀ M),\n                                                  (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                        F +\n                                      (fun F =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun d => sum d fun i => ↑(F i),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : α →₀ M),\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (c : R) (f : α →₀ M),\n                                                  (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                        G) }\n                          (F • G) =\n                        ↑(RingHom.id S) F •\n                          AddHom.toFun\n                            {\n                              toFun := fun F =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun d => sum d fun i => ↑(F i),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : α →₀ M),\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (c : R) (f : α →₀ M),\n                                        (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (F G : α → M →ₗ[R] N),\n                                    (fun F =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun d => sum d fun i => ↑(F i),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : α →₀ M),\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (c : R) (f : α →₀ M),\n                                                  (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                        (F + G) =\n                                      (fun F =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun d => sum d fun i => ↑(F i),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : α →₀ M),\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (c : R) (f : α →₀ M),\n                                                    (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                          F +\n                                        (fun F =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun d => sum d fun i => ↑(F i),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : α →₀ M),\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (c : R) (f : α →₀ M),\n                                                    (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                          G) }\n                            G) }.toAddHom\n            F)\n          x)\n      y =\n    ↑(F x) y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (α →₀ M) →ₗ[R] N\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            {\n              toFun := fun F =>\n                {\n                  toAddHom :=\n                    { toFun := fun d => sum d fun i => ↑(F i),\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : α →₀ M),\n                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                  map_smul' :=\n                    (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n              map_add' :=\n                (_ :\n                  ∀ (F G : α → M →ₗ[R] N),\n                    (fun F =>\n                          {\n                            toAddHom :=\n                              { toFun := fun d => sum d fun i => ↑(F i),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : α →₀ M),\n                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                            map_smul' :=\n                              (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                        (F + G) =\n                      (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := fun d => sum d fun i => ↑(F i),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : α →₀ M),\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                          F +\n                        (fun F =>\n                            {\n                              toAddHom :=\n                                { toFun := fun d => sum d fun i => ↑(F i),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (a b : α →₀ M),\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                          G) },\n          map_smul' :=\n            (_ :\n              ∀ (F : S) (G : α → M →ₗ[R] N),\n                AddHom.toFun\n                    {\n                      toFun := fun F =>\n                        {\n                          toAddHom :=\n                            { toFun := fun d => sum d fun i => ↑(F i),\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : α →₀ M),\n                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                          map_smul' :=\n                            (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n                      map_add' :=\n                        (_ :\n                          ∀ (F G : α → M →ₗ[R] N),\n                            (fun F =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun d => sum d fun i => ↑(F i),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : α →₀ M),\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (c : R) (f : α →₀ M),\n                                          (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                (F + G) =\n                              (fun F =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun d => sum d fun i => ↑(F i),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : α →₀ M),\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (c : R) (f : α →₀ M),\n                                            (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                  F +\n                                (fun F =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun d => sum d fun i => ↑(F i),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : α →₀ M),\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (c : R) (f : α →₀ M),\n                                            (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                  G) }\n                    (F • G) =\n                  ↑(RingHom.id S) F •\n                    AddHom.toFun\n                      {\n                        toFun := fun F =>\n                          {\n                            toAddHom :=\n                              { toFun := fun d => sum d fun i => ↑(F i),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (a b : α →₀ M),\n                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                            map_smul' :=\n                              (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n                        map_add' :=\n                          (_ :\n                            ∀ (F G : α → M →ₗ[R] N),\n                              (fun F =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun d => sum d fun i => ↑(F i),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (a b : α →₀ M),\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (c : R) (f : α →₀ M),\n                                            (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                  (F + G) =\n                                (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun d => sum d fun i => ↑(F i),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : α →₀ M),\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : α →₀ M),\n                                              (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                    F +\n                                  (fun F =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun d => sum d fun i => ↑(F i),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (a b : α →₀ M),\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (c : R) (f : α →₀ M),\n                                              (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                    G) }\n                      G) }.toAddHom\n      ((fun F x => comp F (lsingle x)) F) =\n    F\n[PROOFSTEP]\next x y\n[GOAL]\ncase h.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\ninst✝¹ : Module S N\ninst✝ : SMulCommClass R S N\nF : (α →₀ M) →ₗ[R] N\nx : α\ny : M\n⊢ ↑(comp\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  {\n                    toFun := fun F =>\n                      {\n                        toAddHom :=\n                          { toFun := fun d => sum d fun i => ↑(F i),\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : α →₀ M),\n                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                        map_smul' :=\n                          (_ : ∀ (c : R) (f : α →₀ M), (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n                    map_add' :=\n                      (_ :\n                        ∀ (F G : α → M →ₗ[R] N),\n                          (fun F =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun d => sum d fun i => ↑(F i),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : α →₀ M),\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (c : R) (f : α →₀ M),\n                                        (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                              (F + G) =\n                            (fun F =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun d => sum d fun i => ↑(F i),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : α →₀ M),\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (c : R) (f : α →₀ M),\n                                          (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                F +\n                              (fun F =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun d => sum d fun i => ↑(F i),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (a b : α →₀ M),\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                  ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (c : R) (f : α →₀ M),\n                                          (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                G) },\n                map_smul' :=\n                  (_ :\n                    ∀ (F : S) (G : α → M →ₗ[R] N),\n                      AddHom.toFun\n                          {\n                            toFun := fun F =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun d => sum d fun i => ↑(F i),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (a b : α →₀ M),\n                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (f : α →₀ M),\n                                      (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n                            map_add' :=\n                              (_ :\n                                ∀ (F G : α → M →ₗ[R] N),\n                                  (fun F =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun d => sum d fun i => ↑(F i),\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (a b : α →₀ M),\n                                                    ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (c : R) (f : α →₀ M),\n                                                (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                      (F + G) =\n                                    (fun F =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun d => sum d fun i => ↑(F i),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : α →₀ M),\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (c : R) (f : α →₀ M),\n                                                  (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                        F +\n                                      (fun F =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun d => sum d fun i => ↑(F i),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : α →₀ M),\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (c : R) (f : α →₀ M),\n                                                  (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                        G) }\n                          (F • G) =\n                        ↑(RingHom.id S) F •\n                          AddHom.toFun\n                            {\n                              toFun := fun F =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun d => sum d fun i => ↑(F i),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (a b : α →₀ M),\n                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                              ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (c : R) (f : α →₀ M),\n                                        (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (F G : α → M →ₗ[R] N),\n                                    (fun F =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun d => sum d fun i => ↑(F i),\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (a b : α →₀ M),\n                                                      ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (c : R) (f : α →₀ M),\n                                                  (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                        (F + G) =\n                                      (fun F =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun d => sum d fun i => ↑(F i),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : α →₀ M),\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (c : R) (f : α →₀ M),\n                                                    (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                          F +\n                                        (fun F =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun d => sum d fun i => ↑(F i),\n                                                  map_add' :=\n                                                    (_ :\n                                                      ∀ (a b : α →₀ M),\n                                                        ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) (a + b) =\n                                                          ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) a +\n                                                            ↑(↑liftAddHom fun x => toAddMonoidHom (F x)) b) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (c : R) (f : α →₀ M),\n                                                    (sum (c • f) fun i => ↑(F i)) = c • sum f fun i => ↑(F i)) })\n                                          G) }\n                            G) }.toAddHom\n            ((fun F x => comp F (lsingle x)) F))\n          (lsingle x))\n      y =\n    ↑(comp F (lsingle x)) y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nX : Type u_7\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nsrc✝ : (X → M) ≃+ ((X →₀ R) →ₗ[R] M) := lift M R X\n⊢ ∀ (r : S) (x : X → M),\n    AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : X → M),\n                Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n        (r • x) =\n      ↑(RingHom.id S) r •\n        AddHom.toFun\n          { toFun := src✝.toFun,\n            map_add' :=\n              (_ :\n                ∀ (x y : X → M),\n                  Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n          x\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nX : Type u_7\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nsrc✝ : (X → M) ≃+ ((X →₀ R) →ₗ[R] M) := lift M R X\nr✝ : S\nx✝ : X → M\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ :\n            ∀ (x y : X → M),\n              Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n      (r✝ • x✝) =\n    ↑(RingHom.id S) r✝ •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : X → M),\n                Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n        x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nX : Type u_7\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nsrc✝ : (X → M) ≃+ ((X →₀ R) →ₗ[R] M) := lift M R X\nr✝ : S\nx✝ : X → M\n⊢ ↑(lift M R X) (r✝ • x✝) = r✝ • ↑(lift M R X) x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nX : Type u_7\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nsrc✝ : (X → M) ≃+ ((X →₀ R) →ₗ[R] M) := lift M R X\nr✝ : S\nx✝ : X → M\na✝ : X\n⊢ ↑(comp (↑(lift M R X) (r✝ • x✝)) (lsingle a✝)) 1 = ↑(comp (r✝ • ↑(lift M R X) x✝) (lsingle a✝)) 1\n[PROOFSTEP]\nsimp only [coe_comp, Function.comp_apply, lsingle_apply, lift_apply, Pi.smul_apply, sum_single_index, zero_smul,\n  one_smul, LinearMap.smul_apply]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α'\n⊢ supported M R (f ⁻¹' s) ≤ comap (lmapDomain M R f) (supported M R s)\n[PROOFSTEP]\nclassical\nintro l (hl : (l.support : Set α) ⊆ f ⁻¹' s)\nshow ↑(mapDomain f l).support ⊆ s\nrw [← Set.image_subset_iff, ← Finset.coe_image] at hl \nexact Set.Subset.trans mapDomain_support hl\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α'\n⊢ supported M R (f ⁻¹' s) ≤ comap (lmapDomain M R f) (supported M R s)\n[PROOFSTEP]\nintro l (hl : (l.support : Set α) ⊆ f ⁻¹' s)\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α'\nl : α →₀ M\nhl : ↑l.support ⊆ f ⁻¹' s\n⊢ l ∈ comap (lmapDomain M R f) (supported M R s)\n[PROOFSTEP]\nshow ↑(mapDomain f l).support ⊆ s\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α'\nl : α →₀ M\nhl : ↑l.support ⊆ f ⁻¹' s\n⊢ ↑(mapDomain f l).support ⊆ s\n[PROOFSTEP]\nrw [← Set.image_subset_iff, ← Finset.coe_image] at hl \n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α'\nl : α →₀ M\nhl✝ : f '' ↑l.support ⊆ s\nhl : ↑(Finset.image f l.support) ⊆ s\n⊢ ↑(mapDomain f l).support ⊆ s\n[PROOFSTEP]\nexact Set.Subset.trans mapDomain_support hl\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\nα' : Type u_7\nα'' : Type u_8\ninst✝ : Nonempty α\nf : α → α'\ns : Set α\n⊢ map (lmapDomain M R f) (supported M R s) = supported M R (f '' s)\n[PROOFSTEP]\nclassical\ninhabit α\nrefine\n  le_antisymm\n    (map_le_iff_le_comap.2 <|\n      le_trans (supported_mono <| Set.subset_preimage_image _ _) (supported_comap_lmapDomain M R _ _))\n    ?_\nintro l hl\nrefine' ⟨(lmapDomain M R (Function.invFunOn f s) : (α' →₀ M) →ₗ[R] α →₀ M) l, fun x hx => _, _⟩\n· rcases Finset.mem_image.1 (mapDomain_support hx) with ⟨c, hc, rfl⟩\n  exact Function.invFunOn_mem (by simpa using hl hc)\n· rw [← LinearMap.comp_apply, ← lmapDomain_comp]\n  refine' (mapDomain_congr fun c hc => _).trans mapDomain_id\n  exact Function.invFunOn_eq (by simpa using hl hc)\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\nα' : Type u_7\nα'' : Type u_8\ninst✝ : Nonempty α\nf : α → α'\ns : Set α\n⊢ map (lmapDomain M R f) (supported M R s) = supported M R (f '' s)\n[PROOFSTEP]\ninhabit α\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\nα' : Type u_7\nα'' : Type u_8\ninst✝ : Nonempty α\nf : α → α'\ns : Set α\ninhabited_h : Inhabited α\n⊢ map (lmapDomain M R f) (supported M R s) = supported M R (f '' s)\n[PROOFSTEP]\nrefine\n  le_antisymm\n    (map_le_iff_le_comap.2 <|\n      le_trans (supported_mono <| Set.subset_preimage_image _ _) (supported_comap_lmapDomain M R _ _))\n    ?_\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\nα' : Type u_7\nα'' : Type u_8\ninst✝ : Nonempty α\nf : α → α'\ns : Set α\ninhabited_h : Inhabited α\n⊢ supported M R (f '' s) ≤ map (lmapDomain M R f) (supported M R s)\n[PROOFSTEP]\nintro l hl\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\nα' : Type u_7\nα'' : Type u_8\ninst✝ : Nonempty α\nf : α → α'\ns : Set α\ninhabited_h : Inhabited α\nl : α' →₀ M\nhl : l ∈ supported M R (f '' s)\n⊢ l ∈ map (lmapDomain M R f) (supported M R s)\n[PROOFSTEP]\nrefine' ⟨(lmapDomain M R (Function.invFunOn f s) : (α' →₀ M) →ₗ[R] α →₀ M) l, fun x hx => _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\nα' : Type u_7\nα'' : Type u_8\ninst✝ : Nonempty α\nf : α → α'\ns : Set α\ninhabited_h : Inhabited α\nl : α' →₀ M\nhl : l ∈ supported M R (f '' s)\nx : α\nhx : x ∈ ↑(↑(lmapDomain M R (Function.invFunOn f s)) l).support\n⊢ x ∈ s\n[PROOFSTEP]\nrcases Finset.mem_image.1 (mapDomain_support hx) with ⟨c, hc, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\nα' : Type u_7\nα'' : Type u_8\ninst✝ : Nonempty α\nf : α → α'\ns : Set α\ninhabited_h : Inhabited α\nl : α' →₀ M\nhl : l ∈ supported M R (f '' s)\nc : α'\nhc : c ∈ l.support\nhx : Function.invFunOn f s c ∈ ↑(↑(lmapDomain M R (Function.invFunOn f s)) l).support\n⊢ Function.invFunOn f s c ∈ s\n[PROOFSTEP]\nexact Function.invFunOn_mem (by simpa using hl hc)\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\nα' : Type u_7\nα'' : Type u_8\ninst✝ : Nonempty α\nf : α → α'\ns : Set α\ninhabited_h : Inhabited α\nl : α' →₀ M\nhl : l ∈ supported M R (f '' s)\nc : α'\nhc : c ∈ l.support\nhx : Function.invFunOn f s c ∈ ↑(↑(lmapDomain M R (Function.invFunOn f s)) l).support\n⊢ ∃ a, a ∈ s ∧ f a = c\n[PROOFSTEP]\nsimpa using hl hc\n[GOAL]\ncase refine'_2\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\nα' : Type u_7\nα'' : Type u_8\ninst✝ : Nonempty α\nf : α → α'\ns : Set α\ninhabited_h : Inhabited α\nl : α' →₀ M\nhl : l ∈ supported M R (f '' s)\n⊢ ↑(lmapDomain M R f) (↑(lmapDomain M R (Function.invFunOn f s)) l) = l\n[PROOFSTEP]\nrw [← LinearMap.comp_apply, ← lmapDomain_comp]\n[GOAL]\ncase refine'_2\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\nα' : Type u_7\nα'' : Type u_8\ninst✝ : Nonempty α\nf : α → α'\ns : Set α\ninhabited_h : Inhabited α\nl : α' →₀ M\nhl : l ∈ supported M R (f '' s)\n⊢ ↑(lmapDomain M R (f ∘ Function.invFunOn f s)) l = l\n[PROOFSTEP]\nrefine' (mapDomain_congr fun c hc => _).trans mapDomain_id\n[GOAL]\ncase refine'_2\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\nα' : Type u_7\nα'' : Type u_8\ninst✝ : Nonempty α\nf : α → α'\ns : Set α\ninhabited_h : Inhabited α\nl : α' →₀ M\nhl : l ∈ supported M R (f '' s)\nc : α'\nhc : c ∈ l.support\n⊢ (f ∘ Function.invFunOn f s) c = _root_.id c\n[PROOFSTEP]\nexact Function.invFunOn_eq (by simpa using hl hc)\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring S\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : Module R M\ninst✝⁴ : AddCommMonoid N\ninst✝³ : Module R N\ninst✝² : AddCommMonoid P\ninst✝¹ : Module R P\nα' : Type u_7\nα'' : Type u_8\ninst✝ : Nonempty α\nf : α → α'\ns : Set α\ninhabited_h : Inhabited α\nl : α' →₀ M\nhl : l ∈ supported M R (f '' s)\nc : α'\nhc : c ∈ l.support\n⊢ ∃ a, a ∈ s ∧ f a = c\n[PROOFSTEP]\nsimpa using hl hc\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\n⊢ Disjoint (supported M R s) (ker (lmapDomain M R f))\n[PROOFSTEP]\nrw [disjoint_iff_inf_le]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\n⊢ supported M R s ⊓ ker (lmapDomain M R f) ≤ ⊥\n[PROOFSTEP]\nrintro l ⟨h₁, h₂⟩\n[GOAL]\ncase intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : l ∈ ↑(ker (lmapDomain M R f))\n⊢ l ∈ ⊥\n[PROOFSTEP]\nrw [SetLike.mem_coe, mem_ker, lmapDomain_apply, mapDomain] at h₂ \n[GOAL]\ncase intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\n⊢ l ∈ ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\n⊢ l = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase intro.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\nx : α\n⊢ ↑l x = ↑0 x\n[PROOFSTEP]\nhaveI := Classical.decPred fun x => x ∈ s\n[GOAL]\ncase intro.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\nx : α\nthis : DecidablePred fun x => x ∈ s\n⊢ ↑l x = ↑0 x\n[PROOFSTEP]\nby_cases xs : x ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\nx : α\nthis : DecidablePred fun x => x ∈ s\nxs : x ∈ s\n⊢ ↑l x = ↑0 x\n[PROOFSTEP]\nhave : Finsupp.sum l (fun a => Finsupp.single (f a)) (f x) = 0 :=\n  by\n  rw [h₂]\n  rfl\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\nx : α\nthis : DecidablePred fun x => x ∈ s\nxs : x ∈ s\n⊢ ↑(sum l fun a => single (f a)) (f x) = 0\n[PROOFSTEP]\nrw [h₂]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\nx : α\nthis : DecidablePred fun x => x ∈ s\nxs : x ∈ s\n⊢ ↑0 (f x) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\nx : α\nthis✝ : DecidablePred fun x => x ∈ s\nxs : x ∈ s\nthis : ↑(sum l fun a => single (f a)) (f x) = 0\n⊢ ↑l x = ↑0 x\n[PROOFSTEP]\nrw [Finsupp.sum_apply, Finsupp.sum, Finset.sum_eq_single x, single_eq_same] at this \n[GOAL]\ncase pos\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\nx : α\nthis✝ : DecidablePred fun x => x ∈ s\nxs : x ∈ s\nthis : ↑l x = 0\n⊢ ↑l x = ↑0 x\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase pos.h₀\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\nx : α\nthis✝ : DecidablePred fun x => x ∈ s\nxs : x ∈ s\nthis : ∑ a in l.support, ↑(single (f a) (↑l a)) (f x) = 0\n⊢ ∀ (b : α), b ∈ l.support → b ≠ x → ↑(single (f b) (↑l b)) (f x) = 0\n[PROOFSTEP]\nintro y hy xy\n[GOAL]\ncase pos.h₀\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\nx : α\nthis✝ : DecidablePred fun x => x ∈ s\nxs : x ∈ s\nthis : ∑ a in l.support, ↑(single (f a) (↑l a)) (f x) = 0\ny : α\nhy : y ∈ l.support\nxy : y ≠ x\n⊢ ↑(single (f y) (↑l y)) (f x) = 0\n[PROOFSTEP]\nsimp [mt (H _ (h₁ hy) _ xs) xy]\n[GOAL]\ncase pos.h₁\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\nx : α\nthis✝ : DecidablePred fun x => x ∈ s\nxs : x ∈ s\nthis : ∑ a in l.support, ↑(single (f a) (↑l a)) (f x) = 0\n⊢ ¬x ∈ l.support → ↑(single (f x) (↑l x)) (f x) = 0\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\ncase neg\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\nx : α\nthis : DecidablePred fun x => x ∈ s\nxs : ¬x ∈ s\n⊢ ↑l x = ↑0 x\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase neg\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\nα'' : Type u_8\nf : α → α'\ns : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → f a = f b → a = b\nl : α →₀ M\nh₁ : l ∈ ↑(supported M R s)\nh₂ : (sum l fun a => single (f a)) = 0\nx : α\nthis : DecidablePred fun x => x ∈ s\nxs : ¬x ∈ s\nh : ¬↑l x = ↑0 x\n⊢ False\n[PROOFSTEP]\nexact xs (h₁ <| Finsupp.mem_support_iff.2 h)\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nβ : Type u_7\nf : α → β\nhf : Function.Injective f\nx y : β →₀ M\n⊢ (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) (x + y) =\n    (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) x +\n      (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) y\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nβ : Type u_7\nf : α → β\nhf : Function.Injective f\nx y : β →₀ M\na✝ : α\n⊢ ↑((fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) (x + y)) a✝ =\n    ↑((fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) x +\n          (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) y)\n      a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nβ : Type u_7\nf : α → β\nhf : Function.Injective f\nc : R\nx : β →₀ M\n⊢ AddHom.toFun\n      { toFun := fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support)),\n        map_add' :=\n          (_ :\n            ∀ (x y : β →₀ M),\n              (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) (x + y) =\n                (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) x +\n                  (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) y) }\n      (c • x) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support)),\n          map_add' :=\n            (_ :\n              ∀ (x y : β →₀ M),\n                (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) (x + y) =\n                  (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) x +\n                    (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) y) }\n        x\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nβ : Type u_7\nf : α → β\nhf : Function.Injective f\nc : R\nx : β →₀ M\na✝ : α\n⊢ ↑(AddHom.toFun\n          { toFun := fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support)),\n            map_add' :=\n              (_ :\n                ∀ (x y : β →₀ M),\n                  (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) (x + y) =\n                    (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) x +\n                      (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) y) }\n          (c • x))\n      a✝ =\n    ↑(↑(RingHom.id R) c •\n          AddHom.toFun\n            { toFun := fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support)),\n              map_add' :=\n                (_ :\n                  ∀ (x y : β →₀ M),\n                    (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) (x + y) =\n                      (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) x +\n                        (fun l => comapDomain f l (_ : InjOn f (f ⁻¹' ↑l.support))) y) }\n            x)\n      a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nl : α →₀ R\ns : Finset α\nhs : l ∈ supported R R ↑s\nx : α\nx✝ : x ∈ s\nhxg : ¬x ∈ l.support\n⊢ ↑l x • v x = 0\n[PROOFSTEP]\nrw [not_mem_support_iff.1 hxg, zero_smul]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nc : R\na : α\n⊢ ↑(Finsupp.total α M R v) (single a c) = c • v a\n[PROOFSTEP]\nsimp [total_apply, sum_single_index]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx : α →₀ R\n⊢ ↑(Finsupp.total α M R 0) x = 0\n[PROOFSTEP]\nsimp [Finsupp.total_apply]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv✝ : α → M\nv' : α' → M'\nf : M →ₗ[R] M'\nv : α → M\nl : α →₀ R\n⊢ ↑f (↑(Finsupp.total α M R v) l) = ↑(Finsupp.total α M' R (↑f ∘ v)) l\n[PROOFSTEP]\napply Finsupp.induction_linear l\n[GOAL]\ncase h0\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv✝ : α → M\nv' : α' → M'\nf : M →ₗ[R] M'\nv : α → M\nl : α →₀ R\n⊢ ↑f (↑(Finsupp.total α M R v) 0) = ↑(Finsupp.total α M' R (↑f ∘ v)) 0\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\ncase hadd\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv✝ : α → M\nv' : α' → M'\nf : M →ₗ[R] M'\nv : α → M\nl : α →₀ R\n⊢ ∀ (f_1 g : α →₀ R),\n    ↑f (↑(Finsupp.total α M R v) f_1) = ↑(Finsupp.total α M' R (↑f ∘ v)) f_1 →\n      ↑f (↑(Finsupp.total α M R v) g) = ↑(Finsupp.total α M' R (↑f ∘ v)) g →\n        ↑f (↑(Finsupp.total α M R v) (f_1 + g)) = ↑(Finsupp.total α M' R (↑f ∘ v)) (f_1 + g)\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\ncase hsingle\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv✝ : α → M\nv' : α' → M'\nf : M →ₗ[R] M'\nv : α → M\nl : α →₀ R\n⊢ ∀ (a : α) (b : R), ↑f (↑(Finsupp.total α M R v) (single a b)) = ↑(Finsupp.total α M' R (↑f ∘ v)) (single a b)\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring S\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : Module R M\ninst✝⁶ : AddCommMonoid N\ninst✝⁵ : Module R N\ninst✝⁴ : AddCommMonoid P\ninst✝³ : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝² : AddCommMonoid M'\ninst✝¹ : Module R M'\nv✝ : α → M\nv' : α' → M'\ninst✝ : Unique α\nl : α →₀ R\nv : α → M\n⊢ ↑(Finsupp.total α M R v) l = ↑l default • v default\n[PROOFSTEP]\nrw [← total_single, ← unique_single l]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nh : Function.Surjective v\n⊢ Function.Surjective ↑(Finsupp.total α M R v)\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nh : Function.Surjective v\nx : M\n⊢ ∃ a, ↑(Finsupp.total α M R v) a = x\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := h x\n[GOAL]\ncase intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nh : Function.Surjective v\nx : M\ny : α\nhy : v y = x\n⊢ ∃ a, ↑(Finsupp.total α M R v) a = x\n[PROOFSTEP]\nexact ⟨Finsupp.single y 1, by simp [hy]⟩\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nh : Function.Surjective v\nx : M\ny : α\nhy : v y = x\n⊢ ↑(Finsupp.total α M R v) (single y 1) = x\n[PROOFSTEP]\nsimp [hy]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\n⊢ LinearMap.range (Finsupp.total α M R v) = span R (Set.range v)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx : M\n⊢ x ∈ LinearMap.range (Finsupp.total α M R v) ↔ x ∈ span R (Set.range v)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx : M\n⊢ x ∈ LinearMap.range (Finsupp.total α M R v) → x ∈ span R (Set.range v)\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase h.mp\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx : M\nhx : x ∈ LinearMap.range (Finsupp.total α M R v)\n⊢ x ∈ span R (Set.range v)\n[PROOFSTEP]\nrw [LinearMap.mem_range] at hx \n[GOAL]\ncase h.mp\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx : M\nhx : ∃ y, ↑(Finsupp.total α M R v) y = x\n⊢ x ∈ span R (Set.range v)\n[PROOFSTEP]\nrcases hx with ⟨l, hl⟩\n[GOAL]\ncase h.mp.intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx : M\nl : α →₀ R\nhl : ↑(Finsupp.total α M R v) l = x\n⊢ x ∈ span R (Set.range v)\n[PROOFSTEP]\nrw [← hl]\n[GOAL]\ncase h.mp.intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx : M\nl : α →₀ R\nhl : ↑(Finsupp.total α M R v) l = x\n⊢ ↑(Finsupp.total α M R v) l ∈ span R (Set.range v)\n[PROOFSTEP]\nrw [Finsupp.total_apply]\n[GOAL]\ncase h.mp.intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx : M\nl : α →₀ R\nhl : ↑(Finsupp.total α M R v) l = x\n⊢ (sum l fun i a => a • v i) ∈ span R (Set.range v)\n[PROOFSTEP]\nexact sum_mem fun i _ => Submodule.smul_mem _ _ (subset_span (mem_range_self i))\n[GOAL]\ncase h.mpr\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx : M\n⊢ x ∈ span R (Set.range v) → x ∈ LinearMap.range (Finsupp.total α M R v)\n[PROOFSTEP]\napply span_le.2\n[GOAL]\ncase h.mpr.a\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx : M\n⊢ Set.range v ⊆ ↑(LinearMap.range (Finsupp.total α M R v))\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h.mpr.a\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx✝ x : M\nhx : x ∈ Set.range v\n⊢ x ∈ ↑(LinearMap.range (Finsupp.total α M R v))\n[PROOFSTEP]\nrcases hx with ⟨i, hi⟩\n[GOAL]\ncase h.mpr.a.intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx✝ x : M\ni : α\nhi : v i = x\n⊢ x ∈ ↑(LinearMap.range (Finsupp.total α M R v))\n[PROOFSTEP]\nrw [SetLike.mem_coe, LinearMap.mem_range]\n[GOAL]\ncase h.mpr.a.intro\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx✝ x : M\ni : α\nhi : v i = x\n⊢ ∃ y, ↑(Finsupp.total α M R v) y = x\n[PROOFSTEP]\nuse Finsupp.single i 1\n[GOAL]\ncase h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nx✝ x : M\ni : α\nhi : v i = x\n⊢ ↑(Finsupp.total α M R v) (single i 1) = x\n[PROOFSTEP]\nsimp [hi]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nf : α → α'\ng : M →ₗ[R] M'\nh : ∀ (i : α), ↑g (v i) = v' (f i)\n⊢ comp (Finsupp.total α' M' R v') (lmapDomain R R f) = comp g (Finsupp.total α M R v)\n[PROOFSTEP]\next l\n[GOAL]\ncase h.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nf : α → α'\ng : M →ₗ[R] M'\nh : ∀ (i : α), ↑g (v i) = v' (f i)\nl : α\n⊢ ↑(comp (comp (Finsupp.total α' M' R v') (lmapDomain R R f)) (lsingle l)) 1 =\n    ↑(comp (comp g (Finsupp.total α M R v)) (lsingle l)) 1\n[PROOFSTEP]\nsimp [total_apply, Finsupp.sum_mapDomain_index, add_smul, h]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nf : α → α'\n⊢ comp (Finsupp.total α' M' R v') (lmapDomain R R f) = Finsupp.total α M' R (v' ∘ f)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nf : α → α'\na✝ : α\n⊢ ↑(comp (comp (Finsupp.total α' M' R v') (lmapDomain R R f)) (lsingle a✝)) 1 =\n    ↑(comp (Finsupp.total α M' R (v' ∘ f)) (lsingle a✝)) 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nf : α ↪ α'\nl : α →₀ R\n⊢ ↑(Finsupp.total α' M' R v') (embDomain f l) = ↑(Finsupp.total α M' R (v' ∘ ↑f)) l\n[PROOFSTEP]\nsimp [total_apply, Finsupp.sum, support_embDomain, embDomain_apply]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nf : α ≃ α'\nl : α →₀ R\n⊢ ↑(Finsupp.total α' M' R v') (equivMapDomain f l) = ↑(Finsupp.total α M' R (v' ∘ ↑f)) l\n[PROOFSTEP]\nrw [equivMapDomain_eq_mapDomain, total_mapDomain]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set M\n⊢ span R s = LinearMap.range (Finsupp.total (↑s) M R Subtype.val)\n[PROOFSTEP]\nrw [range_total, Subtype.range_coe_subtype, Set.setOf_mem_eq]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv✝ : α → M\nv' : α' → M'\nv : α → M\nx : M\n⊢ x ∈ span R (Set.range v) ↔ ∃ c, (sum c fun i a => a • v i) = x\n[PROOFSTEP]\nsimp only [← Finsupp.range_total, LinearMap.mem_range, Finsupp.total_apply]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\n⊢ span R (v '' s) = map (Finsupp.total α M R v) (supported R R s)\n[PROOFSTEP]\napply span_eq_of_le\n[GOAL]\ncase h₁\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\n⊢ v '' s ⊆ ↑(map (Finsupp.total α M R v) (supported R R s))\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h₁\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nx : M\nhx : x ∈ v '' s\n⊢ x ∈ ↑(map (Finsupp.total α M R v) (supported R R s))\n[PROOFSTEP]\nrw [Set.mem_image] at hx \n[GOAL]\ncase h₁\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nx : M\nhx : ∃ x_1, x_1 ∈ s ∧ v x_1 = x\n⊢ x ∈ ↑(map (Finsupp.total α M R v) (supported R R s))\n[PROOFSTEP]\napply Exists.elim hx\n[GOAL]\ncase h₁\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nx : M\nhx : ∃ x_1, x_1 ∈ s ∧ v x_1 = x\n⊢ ∀ (a : α), a ∈ s ∧ v a = x → x ∈ ↑(map (Finsupp.total α M R v) (supported R R s))\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h₁\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nx : M\nhx : ∃ x_1, x_1 ∈ s ∧ v x_1 = x\ni : α\nhi : i ∈ s ∧ v i = x\n⊢ x ∈ ↑(map (Finsupp.total α M R v) (supported R R s))\n[PROOFSTEP]\nexact ⟨_, Finsupp.single_mem_supported R 1 hi.1, by simp [hi.2]⟩\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nx : M\nhx : ∃ x_1, x_1 ∈ s ∧ v x_1 = x\ni : α\nhi : i ∈ s ∧ v i = x\n⊢ ↑(Finsupp.total α M R v) (single i 1) = x\n[PROOFSTEP]\nsimp [hi.2]\n[GOAL]\ncase h₂\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\n⊢ map (Finsupp.total α M R v) (supported R R s) ≤ span R (v '' s)\n[PROOFSTEP]\nrefine' map_le_iff_le_comap.2 fun z hz => _\n[GOAL]\ncase h₂\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nz : α →₀ R\nhz : z ∈ supported R R s\n⊢ z ∈ comap (Finsupp.total α M R v) (span R (v '' s))\n[PROOFSTEP]\nhave : ∀ i, z i • v i ∈ span R (v '' s) := by\n  intro c\n  haveI := Classical.decPred fun x => x ∈ s\n  by_cases h : c ∈ s\n  · exact smul_mem _ _ (subset_span (Set.mem_image_of_mem _ h))\n  ·\n    simp [(Finsupp.mem_supported' R _).1 hz _ h]\n      -- Porting note: `rw` is required to infer metavariables in `sum_mem`.\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nz : α →₀ R\nhz : z ∈ supported R R s\n⊢ ∀ (i : α), ↑z i • v i ∈ span R (v '' s)\n[PROOFSTEP]\nintro c\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nz : α →₀ R\nhz : z ∈ supported R R s\nc : α\n⊢ ↑z c • v c ∈ span R (v '' s)\n[PROOFSTEP]\nhaveI := Classical.decPred fun x => x ∈ s\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nz : α →₀ R\nhz : z ∈ supported R R s\nc : α\nthis : DecidablePred fun x => x ∈ s\n⊢ ↑z c • v c ∈ span R (v '' s)\n[PROOFSTEP]\nby_cases h : c ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nz : α →₀ R\nhz : z ∈ supported R R s\nc : α\nthis : DecidablePred fun x => x ∈ s\nh : c ∈ s\n⊢ ↑z c • v c ∈ span R (v '' s)\n[PROOFSTEP]\nexact smul_mem _ _ (subset_span (Set.mem_image_of_mem _ h))\n[GOAL]\ncase neg\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nz : α →₀ R\nhz : z ∈ supported R R s\nc : α\nthis : DecidablePred fun x => x ∈ s\nh : ¬c ∈ s\n⊢ ↑z c • v c ∈ span R (v '' s)\n[PROOFSTEP]\nsimp [(Finsupp.mem_supported' R _).1 hz _ h]\n  -- Porting note: `rw` is required to infer metavariables in `sum_mem`.\n[GOAL]\ncase h₂\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nz : α →₀ R\nhz : z ∈ supported R R s\nthis : ∀ (i : α), ↑z i • v i ∈ span R (v '' s)\n⊢ z ∈ comap (Finsupp.total α M R v) (span R (v '' s))\n[PROOFSTEP]\nrw [mem_comap, total_apply]\n[GOAL]\ncase h₂\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nz : α →₀ R\nhz : z ∈ supported R R s\nthis : ∀ (i : α), ↑z i • v i ∈ span R (v '' s)\n⊢ (sum z fun i a => a • v i) ∈ span R (v '' s)\n[PROOFSTEP]\nrefine' sum_mem _\n[GOAL]\ncase h₂\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nz : α →₀ R\nhz : z ∈ supported R R s\nthis : ∀ (i : α), ↑z i • v i ∈ span R (v '' s)\n⊢ ∀ (c : α), c ∈ z.support → (fun i a => a • v i) c (↑z c) ∈ span R (v '' s)\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nx : M\n⊢ x ∈ span R (v '' s) ↔ ∃ l, l ∈ supported R R s ∧ ↑(Finsupp.total α M R v) l = x\n[PROOFSTEP]\nrw [span_image_eq_map_total]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\nx : M\n⊢ x ∈ map (Finsupp.total α M R v) (supported R R s) ↔ ∃ l, l ∈ supported R R s ∧ ↑(Finsupp.total α M R v) l = x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv✝ : α → M\nv' : α' → M'\nv : Option α → M\nf : Option α →₀ R\n⊢ ↑(Finsupp.total (Option α) M R v) f = ↑f none • v none + ↑(Finsupp.total α M R (v ∘ Option.some)) (some f)\n[PROOFSTEP]\nrw [total_apply, sum_option_index_smul, total_apply]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv✝ : α → M\nv' : α' → M'\nv : Option α → M\nf : Option α →₀ R\n⊢ (↑f none • v none + sum (some f) fun a r => r • v (Option.some a)) =\n    ↑f none • v none + sum (some f) fun i a => a • (v ∘ Option.some) i\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α✝ → M\nv' : α' → M'\nα : Type u_9\nβ : Type u_10\nA : α → M\nB : β → α →₀ R\nf : β →₀ R\n⊢ ↑(Finsupp.total α M R A) (↑(Finsupp.total β (α →₀ R) R B) f) =\n    ↑(Finsupp.total β M R fun b => ↑(Finsupp.total α M R A) (B b)) f\n[PROOFSTEP]\nclassical\nsimp only [total_apply]\napply induction_linear f\n· simp only [sum_zero_index]\n· intro f₁ f₂ h₁ h₂\n  simp [sum_add_index, h₁, h₂, add_smul]\n· simp [sum_single_index, sum_smul_index, smul_sum, mul_smul]\n[GOAL]\nα✝ : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α✝ → M\nv' : α' → M'\nα : Type u_9\nβ : Type u_10\nA : α → M\nB : β → α →₀ R\nf : β →₀ R\n⊢ ↑(Finsupp.total α M R A) (↑(Finsupp.total β (α →₀ R) R B) f) =\n    ↑(Finsupp.total β M R fun b => ↑(Finsupp.total α M R A) (B b)) f\n[PROOFSTEP]\nsimp only [total_apply]\n[GOAL]\nα✝ : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α✝ → M\nv' : α' → M'\nα : Type u_9\nβ : Type u_10\nA : α → M\nB : β → α →₀ R\nf : β →₀ R\n⊢ (sum (sum f fun i a => a • B i) fun i a => a • A i) = sum f fun i a => a • sum (B i) fun i a => a • A i\n[PROOFSTEP]\napply induction_linear f\n[GOAL]\ncase h0\nα✝ : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α✝ → M\nv' : α' → M'\nα : Type u_9\nβ : Type u_10\nA : α → M\nB : β → α →₀ R\nf : β →₀ R\n⊢ (sum (sum 0 fun i a => a • B i) fun i a => a • A i) = sum 0 fun i a => a • sum (B i) fun i a => a • A i\n[PROOFSTEP]\nsimp only [sum_zero_index]\n[GOAL]\ncase hadd\nα✝ : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α✝ → M\nv' : α' → M'\nα : Type u_9\nβ : Type u_10\nA : α → M\nB : β → α →₀ R\nf : β →₀ R\n⊢ ∀ (f g : β →₀ R),\n    ((sum (sum f fun i a => a • B i) fun i a => a • A i) = sum f fun i a => a • sum (B i) fun i a => a • A i) →\n      ((sum (sum g fun i a => a • B i) fun i a => a • A i) = sum g fun i a => a • sum (B i) fun i a => a • A i) →\n        (sum (sum (f + g) fun i a => a • B i) fun i a => a • A i) =\n          sum (f + g) fun i a => a • sum (B i) fun i a => a • A i\n[PROOFSTEP]\nintro f₁ f₂ h₁ h₂\n[GOAL]\ncase hadd\nα✝ : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α✝ → M\nv' : α' → M'\nα : Type u_9\nβ : Type u_10\nA : α → M\nB : β → α →₀ R\nf : β →₀ R\nf₁ f₂ : β →₀ R\nh₁ : (sum (sum f₁ fun i a => a • B i) fun i a => a • A i) = sum f₁ fun i a => a • sum (B i) fun i a => a • A i\nh₂ : (sum (sum f₂ fun i a => a • B i) fun i a => a • A i) = sum f₂ fun i a => a • sum (B i) fun i a => a • A i\n⊢ (sum (sum (f₁ + f₂) fun i a => a • B i) fun i a => a • A i) =\n    sum (f₁ + f₂) fun i a => a • sum (B i) fun i a => a • A i\n[PROOFSTEP]\nsimp [sum_add_index, h₁, h₂, add_smul]\n[GOAL]\ncase hsingle\nα✝ : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α✝ → M\nv' : α' → M'\nα : Type u_9\nβ : Type u_10\nA : α → M\nB : β → α →₀ R\nf : β →₀ R\n⊢ ∀ (a : β) (b : R),\n    (sum (sum (single a b) fun i a => a • B i) fun i a => a • A i) =\n      sum (single a b) fun i a => a • sum (B i) fun i a => a • A i\n[PROOFSTEP]\nsimp [sum_single_index, sum_smul_index, smul_sum, mul_smul]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nf : Fin 0 → M\n⊢ Finsupp.total (Fin 0) M R f = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase h.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nf : Fin 0 → M\ni : Fin 0\n⊢ ↑(comp (Finsupp.total (Fin 0) M R f) (lsingle i)) 1 = ↑(comp 0 (lsingle i)) 1\n[PROOFSTEP]\napply finZeroElim i\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\n⊢ LinearMap.range (Finsupp.totalOn α M R v s) = ⊤\n[PROOFSTEP]\nrw [Finsupp.totalOn, LinearMap.range_eq_map, LinearMap.map_codRestrict, ← LinearMap.range_le_iff_comap, range_subtype,\n  Submodule.map_top, LinearMap.range_comp, range_subtype]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Set α\n⊢ span R (v '' s) ≤ map (Finsupp.total α M R v) (supported R R s)\n[PROOFSTEP]\nexact (span_image_eq_map_total _ _).le\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nf : α' → α\n⊢ Finsupp.total α' M R (v ∘ f) = comp (Finsupp.total α M R v) (lmapDomain R R f)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nf : α' → α\na✝ : α'\n⊢ ↑(comp (Finsupp.total α' M R (v ∘ f)) (lsingle a✝)) 1 =\n    ↑(comp (comp (Finsupp.total α M R v) (lmapDomain R R f)) (lsingle a✝)) 1\n[PROOFSTEP]\nsimp [total_apply]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nf : α → α'\nl : α' →₀ R\nhf : InjOn f (f ⁻¹' ↑l.support)\n⊢ ↑(Finsupp.total α M R v) (comapDomain f l hf) = ∑ i in Finset.preimage l.support f hf, ↑l (f i) • v i\n[PROOFSTEP]\nrw [Finsupp.total_apply]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\nf : α → α'\nl : α' →₀ R\nhf : InjOn f (f ⁻¹' ↑l.support)\n⊢ (sum (comapDomain f l hf) fun i a => a • v i) = ∑ i in Finset.preimage l.support f hf, ↑l (f i) • v i\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Finset α\nf : α → R\ng : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\n⊢ ↑(Finsupp.total α M R g) (onFinset s f hf) = ∑ x in s, f x • g x\n[PROOFSTEP]\nclassical\nsimp only [Finsupp.total_apply, Finsupp.sum, Finsupp.onFinset_apply, Finsupp.support_onFinset]\nrw [Finset.sum_filter_of_ne]\nintro x _ h\ncontrapose! h\nsimp [h]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Finset α\nf : α → R\ng : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\n⊢ ↑(Finsupp.total α M R g) (onFinset s f hf) = ∑ x in s, f x • g x\n[PROOFSTEP]\nsimp only [Finsupp.total_apply, Finsupp.sum, Finsupp.onFinset_apply, Finsupp.support_onFinset]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Finset α\nf : α → R\ng : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\n⊢ ∑ x in Finset.filter (fun a => f a ≠ 0) s, f x • g x = ∑ x in s, f x • g x\n[PROOFSTEP]\nrw [Finset.sum_filter_of_ne]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Finset α\nf : α → R\ng : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\n⊢ ∀ (x : α), x ∈ s → f x • g x ≠ 0 → f x ≠ 0\n[PROOFSTEP]\nintro x _ h\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Finset α\nf : α → R\ng : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\nx : α\na✝ : x ∈ s\nh : f x • g x ≠ 0\n⊢ f x ≠ 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nα' : Type u_7\nM' : Type u_8\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nv : α → M\nv' : α' → M'\ns : Finset α\nf : α → R\ng : α → M\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\nx : α\na✝ : x ∈ s\nh : f x = 0\n⊢ f x • g x = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα₁ : Type u_7\nα₂ : Type u_8\ne : α₁ ≃ α₂\n⊢ ∀ (c : R) (x : α₁ →₀ M), ↑(Finsupp.domCongr e) (c • x) = c • ↑(Finsupp.domCongr e) x\n[PROOFSTEP]\nsimpa only [equivMapDomain_eq_mapDomain, domCongr_apply] using (lmapDomain M R e).map_smul\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα₁ : Type u_7\nα₂ : Type u_8\ne : α₁ ≃ α₂\ni : α₁\nm : M\n⊢ ↑(Finsupp.domLCongr e) (single i m) = single (↑e i) m\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\ns : Set α\nt : Set α'\ne : ↑s ≃ ↑t\n⊢ { x // x ∈ supported M R s } ≃ₗ[R] { x // x ∈ supported M R t }\n[PROOFSTEP]\nhaveI := Classical.decPred fun x => x ∈ s\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\ns : Set α\nt : Set α'\ne : ↑s ≃ ↑t\nthis : DecidablePred fun x => x ∈ s\n⊢ { x // x ∈ supported M R s } ≃ₗ[R] { x // x ∈ supported M R t }\n[PROOFSTEP]\nhaveI := Classical.decPred fun x => x ∈ t\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα' : Type u_7\ns : Set α\nt : Set α'\ne : ↑s ≃ ↑t\nthis✝ : DecidablePred fun x => x ∈ s\nthis : DecidablePred fun x => x ∈ t\n⊢ { x // x ∈ supported M R s } ≃ₗ[R] { x // x ∈ supported M R t }\n[PROOFSTEP]\nexact Finsupp.supportedEquivFinsupp s ≪≫ₗ (Finsupp.domLCongr e ≪≫ₗ (Finsupp.supportedEquivFinsupp t).symm)\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nι : Type u_7\nκ : Type u_8\ne₁ : ι ≃ κ\ne₂ : M ≃ₗ[R] N\ni : ι\nm : M\n⊢ ↑(lcongr e₁ e₂) (single i m) = single (↑e₁ i) (↑e₂ m)\n[PROOFSTEP]\nsimp [lcongr]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nι : Type u_7\nκ : Type u_8\ne₁ : ι ≃ κ\ne₂ : M ≃ₗ[R] N\nk : κ\nn : N\n⊢ ↑(LinearEquiv.symm (lcongr e₁ e₂)) (single k n) = single (↑e₁.symm k) (↑(LinearEquiv.symm e₂) n)\n[PROOFSTEP]\napply_fun (lcongr e₁ e₂ : (ι →₀ M) → (κ →₀ N)) using (lcongr e₁ e₂).injective\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nι : Type u_7\nκ : Type u_8\ne₁ : ι ≃ κ\ne₂ : M ≃ₗ[R] N\nk : κ\nn : N\n⊢ ↑(lcongr e₁ e₂) (↑(LinearEquiv.symm (lcongr e₁ e₂)) (single k n)) =\n    ↑(lcongr e₁ e₂) (single (↑e₁.symm k) (↑(LinearEquiv.symm e₂) n))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nι : Type u_7\nκ : Type u_8\ne₁ : ι ≃ κ\ne₂ : M ≃ₗ[R] N\n⊢ LinearEquiv.symm (lcongr e₁ e₂) = lcongr e₁.symm (LinearEquiv.symm e₂)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nι : Type u_7\nκ : Type u_8\ne₁ : ι ≃ κ\ne₂ : M ≃ₗ[R] N\nx✝ : κ →₀ N\na✝ : ι\n⊢ ↑(↑(LinearEquiv.symm (lcongr e₁ e₂)) x✝) a✝ = ↑(↑(lcongr e₁.symm (LinearEquiv.symm e₂)) x✝) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα : Type u_7\nβ : Type u_8\nsrc✝ : (α ⊕ β →₀ M) ≃+ (α →₀ M) × (β →₀ M) := sumFinsuppAddEquivProdFinsupp\n⊢ ∀ (r : R) (x : α ⊕ β →₀ M),\n    AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : α ⊕ β →₀ M),\n                Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := src✝.toFun,\n            map_add' :=\n              (_ :\n                ∀ (x y : α ⊕ β →₀ M),\n                  Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n          x\n[PROOFSTEP]\nintros\n[GOAL]\nα✝ : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα : Type u_7\nβ : Type u_8\nsrc✝ : (α ⊕ β →₀ M) ≃+ (α →₀ M) × (β →₀ M) := sumFinsuppAddEquivProdFinsupp\nr✝ : R\nx✝ : α ⊕ β →₀ M\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ :\n            ∀ (x y : α ⊕ β →₀ M),\n              Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n      (r✝ • x✝) =\n    ↑(RingHom.id R) r✝ •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : α ⊕ β →₀ M),\n                Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n        x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h₁.h\nα✝ : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα : Type u_7\nβ : Type u_8\nsrc✝ : (α ⊕ β →₀ M) ≃+ (α →₀ M) × (β →₀ M) := sumFinsuppAddEquivProdFinsupp\nr✝ : R\nx✝ : α ⊕ β →₀ M\na✝ : α\n⊢ ↑(AddHom.toFun\n            { toFun := src✝.toFun,\n              map_add' :=\n                (_ :\n                  ∀ (x y : α ⊕ β →₀ M),\n                    Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n            (r✝ • x✝)).fst\n      a✝ =\n    ↑(↑(RingHom.id R) r✝ •\n            AddHom.toFun\n              { toFun := src✝.toFun,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : α ⊕ β →₀ M),\n                      Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n              x✝).fst\n      a✝\n[PROOFSTEP]\nsimp only [Equiv.toFun_as_coe, AddEquiv.toEquiv_eq_coe, AddEquiv.coe_toEquiv, Prod.smul_fst, Prod.smul_snd, smul_apply,\n  snd_sumFinsuppAddEquivProdFinsupp, fst_sumFinsuppAddEquivProdFinsupp, RingHom.id_apply]\n[GOAL]\ncase h₂.h\nα✝ : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring S\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : AddCommMonoid P\ninst✝ : Module R P\nα : Type u_7\nβ : Type u_8\nsrc✝ : (α ⊕ β →₀ M) ≃+ (α →₀ M) × (β →₀ M) := sumFinsuppAddEquivProdFinsupp\nr✝ : R\nx✝ : α ⊕ β →₀ M\na✝ : β\n⊢ ↑(AddHom.toFun\n            { toFun := src✝.toFun,\n              map_add' :=\n                (_ :\n                  ∀ (x y : α ⊕ β →₀ M),\n                    Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n            (r✝ • x✝)).snd\n      a✝ =\n    ↑(↑(RingHom.id R) r✝ •\n            AddHom.toFun\n              { toFun := src✝.toFun,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : α ⊕ β →₀ M),\n                      Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n              x✝).snd\n      a✝\n[PROOFSTEP]\nsimp only [Equiv.toFun_as_coe, AddEquiv.toEquiv_eq_coe, AddEquiv.coe_toEquiv, Prod.smul_fst, Prod.smul_snd, smul_apply,\n  snd_sumFinsuppAddEquivProdFinsupp, fst_sumFinsuppAddEquivProdFinsupp, RingHom.id_apply]\n[GOAL]\nα : Type u_1\nM✝ : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring S\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R M✝\ninst✝⁷ : AddCommMonoid N\ninst✝⁶ : Module R N\ninst✝⁵ : AddCommMonoid P\ninst✝⁴ : Module R P\nη : Type u_7\ninst✝³ : Fintype η\nιs✝ : η → Type u_8\ninst✝² : Zero α\nM : Type u_9\nιs : η → Type u_10\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nsrc✝ : ((j : η) × ιs j →₀ M) ≃+ ((j : η) → ιs j →₀ M) := sigmaFinsuppAddEquivPiFinsupp\nc : R\nf : (j : η) × ιs j →₀ M\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ :\n            ∀ (x y : (j : η) × ιs j →₀ M),\n              Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n      (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : (j : η) × ιs j →₀ M),\n                Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n        f\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nα : Type u_1\nM✝ : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring S\ninst✝⁹ : AddCommMonoid M✝\ninst✝⁸ : Module R M✝\ninst✝⁷ : AddCommMonoid N\ninst✝⁶ : Module R N\ninst✝⁵ : AddCommMonoid P\ninst✝⁴ : Module R P\nη : Type u_7\ninst✝³ : Fintype η\nιs✝ : η → Type u_8\ninst✝² : Zero α\nM : Type u_9\nιs : η → Type u_10\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nsrc✝ : ((j : η) × ιs j →₀ M) ≃+ ((j : η) → ιs j →₀ M) := sigmaFinsuppAddEquivPiFinsupp\nc : R\nf : (j : η) × ιs j →₀ M\nx✝ : η\na✝ : ιs x✝\n⊢ ↑(AddHom.toFun\n          { toFun := src✝.toFun,\n            map_add' :=\n              (_ :\n                ∀ (x y : (j : η) × ιs j →₀ M),\n                  Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n          (c • f) x✝)\n      a✝ =\n    ↑((↑(RingHom.id R) c •\n            AddHom.toFun\n              { toFun := src✝.toFun,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : (j : η) × ιs j →₀ M),\n                      Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n              f)\n          x✝)\n      a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nM✝ : Type u_2\nN : Type u_3\nP : Type u_4\nR✝ : Type u_5\nS : Type u_6\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : Semiring S\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : Module R✝ M✝\ninst✝⁶ : AddCommMonoid N\ninst✝⁵ : Module R✝ N\ninst✝⁴ : AddCommMonoid P\ninst✝³ : Module R✝ P\nα : Type u_7\nβ : Type u_8\nR : Type u_9\nM : Type u_10\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nsrc✝ : (α × β →₀ M) ≃ (α →₀ β →₀ M) := finsuppProdEquiv\nf g : α × β →₀ M\n⊢ Equiv.toFun src✝ (f + g) = Equiv.toFun src✝ f + Equiv.toFun src✝ g\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nα✝ : Type u_1\nM✝ : Type u_2\nN : Type u_3\nP : Type u_4\nR✝ : Type u_5\nS : Type u_6\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : Semiring S\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : Module R✝ M✝\ninst✝⁶ : AddCommMonoid N\ninst✝⁵ : Module R✝ N\ninst✝⁴ : AddCommMonoid P\ninst✝³ : Module R✝ P\nα : Type u_7\nβ : Type u_8\nR : Type u_9\nM : Type u_10\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nsrc✝ : (α × β →₀ M) ≃ (α →₀ β →₀ M) := finsuppProdEquiv\nf g : α × β →₀ M\na✝¹ : α\na✝ : β\n⊢ ↑(↑(Equiv.toFun src✝ (f + g)) a✝¹) a✝ = ↑(↑(Equiv.toFun src✝ f + Equiv.toFun src✝ g) a✝¹) a✝\n[PROOFSTEP]\nsimp [finsuppProdEquiv, curry_apply]\n[GOAL]\nα✝ : Type u_1\nM✝ : Type u_2\nN : Type u_3\nP : Type u_4\nR✝ : Type u_5\nS : Type u_6\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : Semiring S\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : Module R✝ M✝\ninst✝⁶ : AddCommMonoid N\ninst✝⁵ : Module R✝ N\ninst✝⁴ : AddCommMonoid P\ninst✝³ : Module R✝ P\nα : Type u_7\nβ : Type u_8\nR : Type u_9\nM : Type u_10\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nsrc✝ : (α × β →₀ M) ≃ (α →₀ β →₀ M) := finsuppProdEquiv\nc : R\nf : α × β →₀ M\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' := (_ : ∀ (f g : α × β →₀ M), Equiv.toFun src✝ (f + g) = Equiv.toFun src✝ f + Equiv.toFun src✝ g) }\n      (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' := (_ : ∀ (f g : α × β →₀ M), Equiv.toFun src✝ (f + g) = Equiv.toFun src✝ f + Equiv.toFun src✝ g) }\n        f\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nα✝ : Type u_1\nM✝ : Type u_2\nN : Type u_3\nP : Type u_4\nR✝ : Type u_5\nS : Type u_6\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : Semiring S\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : Module R✝ M✝\ninst✝⁶ : AddCommMonoid N\ninst✝⁵ : Module R✝ N\ninst✝⁴ : AddCommMonoid P\ninst✝³ : Module R✝ P\nα : Type u_7\nβ : Type u_8\nR : Type u_9\nM : Type u_10\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nsrc✝ : (α × β →₀ M) ≃ (α →₀ β →₀ M) := finsuppProdEquiv\nc : R\nf : α × β →₀ M\na✝¹ : α\na✝ : β\n⊢ ↑(↑(AddHom.toFun\n              { toFun := src✝.toFun,\n                map_add' :=\n                  (_ : ∀ (f g : α × β →₀ M), Equiv.toFun src✝ (f + g) = Equiv.toFun src✝ f + Equiv.toFun src✝ g) }\n              (c • f))\n          a✝¹)\n      a✝ =\n    ↑(↑(↑(RingHom.id R) c •\n              AddHom.toFun\n                { toFun := src✝.toFun,\n                  map_add' :=\n                    (_ : ∀ (f g : α × β →₀ M), Equiv.toFun src✝ (f + g) = Equiv.toFun src✝ f + Equiv.toFun src✝ g) }\n                f)\n          a✝¹)\n      a✝\n[PROOFSTEP]\nsimp [finsuppProdEquiv, curry_apply]\n[GOAL]\nα✝ : Type u_1\nM✝ : Type u_2\nN : Type u_3\nP : Type u_4\nR✝ : Type u_5\nS : Type u_6\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : Semiring S\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : Module R✝ M✝\ninst✝⁶ : AddCommMonoid N\ninst✝⁵ : Module R✝ N\ninst✝⁴ : AddCommMonoid P\ninst✝³ : Module R✝ P\nα : Type u_7\nβ : Type u_8\nR : Type u_9\nM : Type u_10\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nf : α × β →₀ M\nx : α\ny : β\n⊢ ↑(↑(↑(finsuppProdLEquiv R) f) x) y = ↑f (x, y)\n[PROOFSTEP]\nrw [finsuppProdLEquiv, LinearEquiv.coe_mk, finsuppProdEquiv, Finsupp.curry_apply]\n[GOAL]\nα✝ : Type u_1\nM✝ : Type u_2\nN : Type u_3\nP : Type u_4\nR✝ : Type u_5\nS : Type u_6\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : Semiring S\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : Module R✝ M✝\ninst✝⁶ : AddCommMonoid N\ninst✝⁵ : Module R✝ N\ninst✝⁴ : AddCommMonoid P\ninst✝³ : Module R✝ P\nα : Type u_7\nβ : Type u_8\nR : Type u_9\nM : Type u_10\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nf : α →₀ β →₀ M\nxy : α × β\n⊢ ↑(↑(LinearEquiv.symm (finsuppProdLEquiv R)) f) xy = ↑(↑f xy.fst) xy.snd\n[PROOFSTEP]\nconv_rhs => rw [← (finsuppProdLEquiv R).apply_symm_apply f, finsuppProdLEquiv_apply, Prod.mk.eta]\n[GOAL]\nα✝ : Type u_1\nM✝ : Type u_2\nN : Type u_3\nP : Type u_4\nR✝ : Type u_5\nS : Type u_6\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : Semiring S\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : Module R✝ M✝\ninst✝⁶ : AddCommMonoid N\ninst✝⁵ : Module R✝ N\ninst✝⁴ : AddCommMonoid P\ninst✝³ : Module R✝ P\nα : Type u_7\nβ : Type u_8\nR : Type u_9\nM : Type u_10\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nf : α →₀ β →₀ M\nxy : α × β\n| ↑(↑f xy.fst) xy.snd\n[PROOFSTEP]\nrw [← (finsuppProdLEquiv R).apply_symm_apply f, finsuppProdLEquiv_apply, Prod.mk.eta]\n[GOAL]\nα✝ : Type u_1\nM✝ : Type u_2\nN : Type u_3\nP : Type u_4\nR✝ : Type u_5\nS : Type u_6\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : Semiring S\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : Module R✝ M✝\ninst✝⁶ : AddCommMonoid N\ninst✝⁵ : Module R✝ N\ninst✝⁴ : AddCommMonoid P\ninst✝³ : Module R✝ P\nα : Type u_7\nβ : Type u_8\nR : Type u_9\nM : Type u_10\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nf : α →₀ β →₀ M\nxy : α × β\n| ↑(↑f xy.fst) xy.snd\n[PROOFSTEP]\nrw [← (finsuppProdLEquiv R).apply_symm_apply f, finsuppProdLEquiv_apply, Prod.mk.eta]\n[GOAL]\nα✝ : Type u_1\nM✝ : Type u_2\nN : Type u_3\nP : Type u_4\nR✝ : Type u_5\nS : Type u_6\ninst✝¹⁰ : Semiring R✝\ninst✝⁹ : Semiring S\ninst✝⁸ : AddCommMonoid M✝\ninst✝⁷ : Module R✝ M✝\ninst✝⁶ : AddCommMonoid N\ninst✝⁵ : Module R✝ N\ninst✝⁴ : AddCommMonoid P\ninst✝³ : Module R✝ P\nα : Type u_7\nβ : Type u_8\nR : Type u_9\nM : Type u_10\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nf : α →₀ β →₀ M\nxy : α × β\n| ↑(↑f xy.fst) xy.snd\n[PROOFSTEP]\nrw [← (finsuppProdLEquiv R).apply_symm_apply f, finsuppProdLEquiv_apply, Prod.mk.eta]\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nι : Type u_7\ninst✝¹ : Countable R\ninst✝ : Countable ι\nv : ι → M\n⊢ Countable { x // x ∈ span R (Set.range v) }\n[PROOFSTEP]\nrefine\n  Set.countable_coe_iff.mpr\n    (Set.Countable.mono ?_ (Set.countable_range (fun c : (ι →₀ R) => c.sum fun i _ => (c i) • v i)))\n[GOAL]\nα : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nR : Type u_5\nS : Type u_6\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring S\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R N\ninst✝³ : AddCommMonoid P\ninst✝² : Module R P\nι : Type u_7\ninst✝¹ : Countable R\ninst✝ : Countable ι\nv : ι → M\n⊢ ↑(span R (Set.range v)) ⊆ Set.range fun c => sum c fun i x => ↑c i • v i\n[PROOFSTEP]\nexact fun _ h => Finsupp.mem_span_range_iff_exists_finsupp.mp (SetLike.mem_coe.mp h)\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv✝ v : α → M\nf g : α → R\n⊢ (fun f => ∑ i : α, f i • v i) (f + g) = (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g\n[PROOFSTEP]\nsimp_rw [← Finset.sum_add_distrib, ← add_smul]\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv✝ v : α → M\nf g : α → R\n⊢ ∑ i : α, (f + g) i • v i = ∑ x : α, (f x + g x) • v x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv✝ v : α → M\nr : R\nf : α → R\n⊢ AddHom.toFun\n      { toFun := fun f => ∑ i : α, f i • v i,\n        map_add' :=\n          (_ :\n            ∀ (f g : α → R),\n              (fun f => ∑ i : α, f i • v i) (f + g) =\n                (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n      (r • f) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun f => ∑ i : α, f i • v i,\n          map_add' :=\n            (_ :\n              ∀ (f g : α → R),\n                (fun f => ∑ i : α, f i • v i) (f + g) =\n                  (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n        f\n[PROOFSTEP]\nsimp_rw [Finset.smul_sum, smul_smul]\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv✝ v : α → M\nr : R\nf : α → R\n⊢ ∑ i : α, (r • f) i • v i = ∑ x : α, (↑(RingHom.id R) r * f x) • v x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv✝ u v : α → M\n⊢ (fun v =>\n        {\n          toAddHom :=\n            { toFun := fun f => ∑ i : α, f i • v i,\n              map_add' :=\n                (_ :\n                  ∀ (f g : α → R),\n                    (fun f => ∑ i : α, f i • v i) (f + g) =\n                      (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (f : α → R),\n                AddHom.toFun\n                    { toFun := fun f => ∑ i : α, f i • v i,\n                      map_add' :=\n                        (_ :\n                          ∀ (f g : α → R),\n                            (fun f => ∑ i : α, f i • v i) (f + g) =\n                              (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                    (r • f) =\n                  ↑(RingHom.id R) r •\n                    AddHom.toFun\n                      { toFun := fun f => ∑ i : α, f i • v i,\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : α → R),\n                              (fun f => ∑ i : α, f i • v i) (f + g) =\n                                (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                      f) })\n      (u + v) =\n    (fun v =>\n          {\n            toAddHom :=\n              { toFun := fun f => ∑ i : α, f i • v i,\n                map_add' :=\n                  (_ :\n                    ∀ (f g : α → R),\n                      (fun f => ∑ i : α, f i • v i) (f + g) =\n                        (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (f : α → R),\n                  AddHom.toFun\n                      { toFun := fun f => ∑ i : α, f i • v i,\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : α → R),\n                              (fun f => ∑ i : α, f i • v i) (f + g) =\n                                (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                      (r • f) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun f => ∑ i : α, f i • v i,\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : α → R),\n                                (fun f => ∑ i : α, f i • v i) (f + g) =\n                                  (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                        f) })\n        u +\n      (fun v =>\n          {\n            toAddHom :=\n              { toFun := fun f => ∑ i : α, f i • v i,\n                map_add' :=\n                  (_ :\n                    ∀ (f g : α → R),\n                      (fun f => ∑ i : α, f i • v i) (f + g) =\n                        (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (f : α → R),\n                  AddHom.toFun\n                      { toFun := fun f => ∑ i : α, f i • v i,\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : α → R),\n                              (fun f => ∑ i : α, f i • v i) (f + g) =\n                                (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                      (r • f) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun f => ∑ i : α, f i • v i,\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : α → R),\n                                (fun f => ∑ i : α, f i • v i) (f + g) =\n                                  (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                        f) })\n        v\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv✝ u v : α → M\nx✝ : α → R\n⊢ ↑((fun v =>\n            {\n              toAddHom :=\n                { toFun := fun f => ∑ i : α, f i • v i,\n                  map_add' :=\n                    (_ :\n                      ∀ (f g : α → R),\n                        (fun f => ∑ i : α, f i • v i) (f + g) =\n                          (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (f : α → R),\n                    AddHom.toFun\n                        { toFun := fun f => ∑ i : α, f i • v i,\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : α → R),\n                                (fun f => ∑ i : α, f i • v i) (f + g) =\n                                  (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                        (r • f) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun f => ∑ i : α, f i • v i,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : α → R),\n                                  (fun f => ∑ i : α, f i • v i) (f + g) =\n                                    (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                          f) })\n          (u + v))\n      x✝ =\n    ↑((fun v =>\n              {\n                toAddHom :=\n                  { toFun := fun f => ∑ i : α, f i • v i,\n                    map_add' :=\n                      (_ :\n                        ∀ (f g : α → R),\n                          (fun f => ∑ i : α, f i • v i) (f + g) =\n                            (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (f : α → R),\n                      AddHom.toFun\n                          { toFun := fun f => ∑ i : α, f i • v i,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : α → R),\n                                  (fun f => ∑ i : α, f i • v i) (f + g) =\n                                    (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                          (r • f) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun f => ∑ i : α, f i • v i,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : α → R),\n                                    (fun f => ∑ i : α, f i • v i) (f + g) =\n                                      (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                            f) })\n            u +\n          (fun v =>\n              {\n                toAddHom :=\n                  { toFun := fun f => ∑ i : α, f i • v i,\n                    map_add' :=\n                      (_ :\n                        ∀ (f g : α → R),\n                          (fun f => ∑ i : α, f i • v i) (f + g) =\n                            (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (f : α → R),\n                      AddHom.toFun\n                          { toFun := fun f => ∑ i : α, f i • v i,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : α → R),\n                                  (fun f => ∑ i : α, f i • v i) (f + g) =\n                                    (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                          (r • f) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun f => ∑ i : α, f i • v i,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : α → R),\n                                    (fun f => ∑ i : α, f i • v i) (f + g) =\n                                      (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                            f) })\n            v)\n      x✝\n[PROOFSTEP]\nsimp [Finset.sum_add_distrib, Pi.add_apply, smul_add]\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv✝ : α → M\nr : S\nv : α → M\n⊢ AddHom.toFun\n      {\n        toFun := fun v =>\n          {\n            toAddHom :=\n              { toFun := fun f => ∑ i : α, f i • v i,\n                map_add' :=\n                  (_ :\n                    ∀ (f g : α → R),\n                      (fun f => ∑ i : α, f i • v i) (f + g) =\n                        (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (f : α → R),\n                  AddHom.toFun\n                      { toFun := fun f => ∑ i : α, f i • v i,\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : α → R),\n                              (fun f => ∑ i : α, f i • v i) (f + g) =\n                                (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                      (r • f) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun f => ∑ i : α, f i • v i,\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : α → R),\n                                (fun f => ∑ i : α, f i • v i) (f + g) =\n                                  (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                        f) },\n        map_add' :=\n          (_ :\n            ∀ (u v : α → M),\n              (fun v =>\n                    {\n                      toAddHom :=\n                        { toFun := fun f => ∑ i : α, f i • v i,\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : α → R),\n                                (fun f => ∑ i : α, f i • v i) (f + g) =\n                                  (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                      map_smul' :=\n                        (_ :\n                          ∀ (r : R) (f : α → R),\n                            AddHom.toFun\n                                { toFun := fun f => ∑ i : α, f i • v i,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (f g : α → R),\n                                        (fun f => ∑ i : α, f i • v i) (f + g) =\n                                          (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                (r • f) =\n                              ↑(RingHom.id R) r •\n                                AddHom.toFun\n                                  { toFun := fun f => ∑ i : α, f i • v i,\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (f g : α → R),\n                                          (fun f => ∑ i : α, f i • v i) (f + g) =\n                                            (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                  f) })\n                  (u + v) =\n                (fun v =>\n                      {\n                        toAddHom :=\n                          { toFun := fun f => ∑ i : α, f i • v i,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : α → R),\n                                  (fun f => ∑ i : α, f i • v i) (f + g) =\n                                    (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (f : α → R),\n                              AddHom.toFun\n                                  { toFun := fun f => ∑ i : α, f i • v i,\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (f g : α → R),\n                                          (fun f => ∑ i : α, f i • v i) (f + g) =\n                                            (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                  (r • f) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun f => ∑ i : α, f i • v i,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (f g : α → R),\n                                            (fun f => ∑ i : α, f i • v i) (f + g) =\n                                              (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                    f) })\n                    u +\n                  (fun v =>\n                      {\n                        toAddHom :=\n                          { toFun := fun f => ∑ i : α, f i • v i,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : α → R),\n                                  (fun f => ∑ i : α, f i • v i) (f + g) =\n                                    (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (f : α → R),\n                              AddHom.toFun\n                                  { toFun := fun f => ∑ i : α, f i • v i,\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (f g : α → R),\n                                          (fun f => ∑ i : α, f i • v i) (f + g) =\n                                            (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                  (r • f) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun f => ∑ i : α, f i • v i,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (f g : α → R),\n                                            (fun f => ∑ i : α, f i • v i) (f + g) =\n                                              (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                    f) })\n                    v) }\n      (r • v) =\n    ↑(RingHom.id S) r •\n      AddHom.toFun\n        {\n          toFun := fun v =>\n            {\n              toAddHom :=\n                { toFun := fun f => ∑ i : α, f i • v i,\n                  map_add' :=\n                    (_ :\n                      ∀ (f g : α → R),\n                        (fun f => ∑ i : α, f i • v i) (f + g) =\n                          (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (f : α → R),\n                    AddHom.toFun\n                        { toFun := fun f => ∑ i : α, f i • v i,\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : α → R),\n                                (fun f => ∑ i : α, f i • v i) (f + g) =\n                                  (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                        (r • f) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun f => ∑ i : α, f i • v i,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : α → R),\n                                  (fun f => ∑ i : α, f i • v i) (f + g) =\n                                    (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                          f) },\n          map_add' :=\n            (_ :\n              ∀ (u v : α → M),\n                (fun v =>\n                      {\n                        toAddHom :=\n                          { toFun := fun f => ∑ i : α, f i • v i,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : α → R),\n                                  (fun f => ∑ i : α, f i • v i) (f + g) =\n                                    (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (f : α → R),\n                              AddHom.toFun\n                                  { toFun := fun f => ∑ i : α, f i • v i,\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (f g : α → R),\n                                          (fun f => ∑ i : α, f i • v i) (f + g) =\n                                            (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                  (r • f) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun f => ∑ i : α, f i • v i,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (f g : α → R),\n                                            (fun f => ∑ i : α, f i • v i) (f + g) =\n                                              (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                    f) })\n                    (u + v) =\n                  (fun v =>\n                        {\n                          toAddHom :=\n                            { toFun := fun f => ∑ i : α, f i • v i,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : α → R),\n                                    (fun f => ∑ i : α, f i • v i) (f + g) =\n                                      (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (f : α → R),\n                                AddHom.toFun\n                                    { toFun := fun f => ∑ i : α, f i • v i,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (f g : α → R),\n                                            (fun f => ∑ i : α, f i • v i) (f + g) =\n                                              (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                    (r • f) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun f => ∑ i : α, f i • v i,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (f g : α → R),\n                                              (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                      f) })\n                      u +\n                    (fun v =>\n                        {\n                          toAddHom :=\n                            { toFun := fun f => ∑ i : α, f i • v i,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : α → R),\n                                    (fun f => ∑ i : α, f i • v i) (f + g) =\n                                      (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (f : α → R),\n                                AddHom.toFun\n                                    { toFun := fun f => ∑ i : α, f i • v i,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (f g : α → R),\n                                            (fun f => ∑ i : α, f i • v i) (f + g) =\n                                              (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                    (r • f) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun f => ∑ i : α, f i • v i,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (f g : α → R),\n                                              (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                      f) })\n                      v) }\n        v\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv✝ : α → M\nr : S\nv : α → M\nx✝ : α → R\n⊢ ↑(AddHom.toFun\n          {\n            toFun := fun v =>\n              {\n                toAddHom :=\n                  { toFun := fun f => ∑ i : α, f i • v i,\n                    map_add' :=\n                      (_ :\n                        ∀ (f g : α → R),\n                          (fun f => ∑ i : α, f i • v i) (f + g) =\n                            (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (f : α → R),\n                      AddHom.toFun\n                          { toFun := fun f => ∑ i : α, f i • v i,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : α → R),\n                                  (fun f => ∑ i : α, f i • v i) (f + g) =\n                                    (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                          (r • f) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun f => ∑ i : α, f i • v i,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : α → R),\n                                    (fun f => ∑ i : α, f i • v i) (f + g) =\n                                      (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                            f) },\n            map_add' :=\n              (_ :\n                ∀ (u v : α → M),\n                  (fun v =>\n                        {\n                          toAddHom :=\n                            { toFun := fun f => ∑ i : α, f i • v i,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : α → R),\n                                    (fun f => ∑ i : α, f i • v i) (f + g) =\n                                      (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (f : α → R),\n                                AddHom.toFun\n                                    { toFun := fun f => ∑ i : α, f i • v i,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (f g : α → R),\n                                            (fun f => ∑ i : α, f i • v i) (f + g) =\n                                              (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                    (r • f) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun f => ∑ i : α, f i • v i,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (f g : α → R),\n                                              (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                      f) })\n                      (u + v) =\n                    (fun v =>\n                          {\n                            toAddHom :=\n                              { toFun := fun f => ∑ i : α, f i • v i,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (f g : α → R),\n                                      (fun f => ∑ i : α, f i • v i) (f + g) =\n                                        (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (f : α → R),\n                                  AddHom.toFun\n                                      { toFun := fun f => ∑ i : α, f i • v i,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (f g : α → R),\n                                              (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                      (r • f) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun f => ∑ i : α, f i • v i,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (f g : α → R),\n                                                (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                  (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                        f) })\n                        u +\n                      (fun v =>\n                          {\n                            toAddHom :=\n                              { toFun := fun f => ∑ i : α, f i • v i,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (f g : α → R),\n                                      (fun f => ∑ i : α, f i • v i) (f + g) =\n                                        (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (f : α → R),\n                                  AddHom.toFun\n                                      { toFun := fun f => ∑ i : α, f i • v i,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (f g : α → R),\n                                              (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                      (r • f) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun f => ∑ i : α, f i • v i,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (f g : α → R),\n                                                (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                  (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                        f) })\n                        v) }\n          (r • v))\n      x✝ =\n    ↑(↑(RingHom.id S) r •\n          AddHom.toFun\n            {\n              toFun := fun v =>\n                {\n                  toAddHom :=\n                    { toFun := fun f => ∑ i : α, f i • v i,\n                      map_add' :=\n                        (_ :\n                          ∀ (f g : α → R),\n                            (fun f => ∑ i : α, f i • v i) (f + g) =\n                              (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (f : α → R),\n                        AddHom.toFun\n                            { toFun := fun f => ∑ i : α, f i • v i,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : α → R),\n                                    (fun f => ∑ i : α, f i • v i) (f + g) =\n                                      (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                            (r • f) =\n                          ↑(RingHom.id R) r •\n                            AddHom.toFun\n                              { toFun := fun f => ∑ i : α, f i • v i,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (f g : α → R),\n                                      (fun f => ∑ i : α, f i • v i) (f + g) =\n                                        (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                              f) },\n              map_add' :=\n                (_ :\n                  ∀ (u v : α → M),\n                    (fun v =>\n                          {\n                            toAddHom :=\n                              { toFun := fun f => ∑ i : α, f i • v i,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (f g : α → R),\n                                      (fun f => ∑ i : α, f i • v i) (f + g) =\n                                        (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (f : α → R),\n                                  AddHom.toFun\n                                      { toFun := fun f => ∑ i : α, f i • v i,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (f g : α → R),\n                                              (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                      (r • f) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun f => ∑ i : α, f i • v i,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (f g : α → R),\n                                                (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                  (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                        f) })\n                        (u + v) =\n                      (fun v =>\n                            {\n                              toAddHom :=\n                                { toFun := fun f => ∑ i : α, f i • v i,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (f g : α → R),\n                                        (fun f => ∑ i : α, f i • v i) (f + g) =\n                                          (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (f : α → R),\n                                    AddHom.toFun\n                                        { toFun := fun f => ∑ i : α, f i • v i,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (f g : α → R),\n                                                (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                  (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                        (r • f) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun f => ∑ i : α, f i • v i,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (f g : α → R),\n                                                  (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                    (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                          f) })\n                          u +\n                        (fun v =>\n                            {\n                              toAddHom :=\n                                { toFun := fun f => ∑ i : α, f i • v i,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (f g : α → R),\n                                        (fun f => ∑ i : α, f i • v i) (f + g) =\n                                          (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (f : α → R),\n                                    AddHom.toFun\n                                        { toFun := fun f => ∑ i : α, f i • v i,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (f g : α → R),\n                                                (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                  (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                        (r • f) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun f => ∑ i : α, f i • v i,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (f g : α → R),\n                                                  (fun f => ∑ i : α, f i • v i) (f + g) =\n                                                    (fun f => ∑ i : α, f i • v i) f + (fun f => ∑ i : α, f i • v i) g) }\n                                          f) })\n                          v) }\n            v)\n      x✝\n[PROOFSTEP]\nsimp [Finset.smul_sum, smul_comm]\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁷ : Fintype α\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nS : Type u_4\ninst✝³ : Semiring S\ninst✝² : Module S M\ninst✝¹ : SMulCommClass R S M\nv : α → M\ninst✝ : DecidableEq α\ni : α\nr : R\n⊢ ↑(↑(Fintype.total R S) v) (Pi.single i r) = r • v i\n[PROOFSTEP]\nsimp_rw [Fintype.total_apply, Pi.single_apply, ite_smul, zero_smul]\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁷ : Fintype α\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : Module R M\nS : Type u_4\ninst✝³ : Semiring S\ninst✝² : Module S M\ninst✝¹ : SMulCommClass R S M\nv : α → M\ninst✝ : DecidableEq α\ni : α\nr : R\n⊢ (∑ x : α, if x = i then r • v x else 0) = r • v i\n[PROOFSTEP]\nrw [Finset.sum_ite_eq', if_pos (Finset.mem_univ _)]\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv : α → M\nx : α → R\n⊢ ↑(Finsupp.total α M R v) (↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x) = ↑(↑(Fintype.total R S) v) x\n[PROOFSTEP]\napply Finset.sum_subset\n[GOAL]\ncase h\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv : α → M\nx : α → R\n⊢ (↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x).support ⊆ Finset.univ\n[PROOFSTEP]\nexact Finset.subset_univ _\n[GOAL]\ncase hf\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv : α → M\nx : α → R\n⊢ ∀ (x_1 : α),\n    x_1 ∈ Finset.univ →\n      ¬x_1 ∈ (↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x).support →\n        (fun i => ↑((fun i => smulRight LinearMap.id (v i)) i)) x_1\n            (↑(↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x) x_1) =\n          0\n[PROOFSTEP]\nintro x _ hx\n[GOAL]\ncase hf\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv : α → M\nx✝ : α → R\nx : α\na✝ : x ∈ Finset.univ\nhx : ¬x ∈ (↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x✝).support\n⊢ (fun i => ↑((fun i => smulRight LinearMap.id (v i)) i)) x\n      (↑(↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x✝) x) =\n    0\n[PROOFSTEP]\nrw [Finsupp.not_mem_support_iff.mp hx]\n[GOAL]\ncase hf\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv : α → M\nx✝ : α → R\nx : α\na✝ : x ∈ Finset.univ\nhx : ¬x ∈ (↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x✝).support\n⊢ (fun i => ↑((fun i => smulRight LinearMap.id (v i)) i)) x 0 = 0\n[PROOFSTEP]\nexact zero_smul _ _\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv : α → M\n⊢ LinearMap.range (↑(Fintype.total R S) v) = span R (Set.range v)\n[PROOFSTEP]\nrw [← Finsupp.total_eq_fintype_total, LinearMap.range_comp, LinearEquiv.range, Submodule.map_top, Finsupp.range_total]\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv : α → M\nx : M\n⊢ x ∈ span R (Set.range v) ↔ ∃ c, ∑ i : α, c i • v i = x\n[PROOFSTEP]\nrw [Finsupp.equivFunOnFinite.surjective.exists]\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv : α → M\nx : M\n⊢ x ∈ span R (Set.range v) ↔ ∃ x_1, ∑ i : α, ↑Finsupp.equivFunOnFinite x_1 i • v i = x\n[PROOFSTEP]\nsimp [Finsupp.mem_span_range_iff_exists_finsupp, Finsupp.equivFunOnFinite_apply]\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv : α → M\nx : M\n⊢ (∃ c, (Finsupp.sum c fun i a => a • v i) = x) ↔ ∃ x_1, ∑ x : α, ↑x_1 x • v x = x\n[PROOFSTEP]\nexact exists_congr fun c => Eq.congr_left <| Finsupp.sum_fintype _ _ fun i => zero_smul _ _\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv : α → M\nx : M\n⊢ ⊤ ≤ span R (Set.range v) ↔ ∀ (x : M), ∃ c, ∑ i : α, c i • v i = x\n[PROOFSTEP]\nsimp_rw [← mem_span_range_iff_exists_fun]\n[GOAL]\nα : Type u_1\nM : Type u_2\nR : Type u_3\ninst✝⁶ : Fintype α\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_4\ninst✝² : Semiring S\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nv : α → M\nx : M\n⊢ ⊤ ≤ span R (Set.range v) ↔ ∀ (x : M), x ∈ span R (Set.range fun i => v i)\n[PROOFSTEP]\nexact ⟨fun h x => h trivial, fun h x _ => h x⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nw : Set M\nx : { x // x ∈ span R w }\n⊢ ↑(Finsupp.total (↑w) M R Subtype.val) (repr R w x) = ↑x\n[PROOFSTEP]\nrw [Span.repr_def]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nw : Set M\nx : { x // x ∈ span R w }\n⊢ ↑(Finsupp.total (↑w) M R Subtype.val) (Exists.choose (_ : ∃ l, ↑(Finsupp.total (↑w) M R Subtype.val) l = ↑x)) = ↑x\n[PROOFSTEP]\nexact ((Finsupp.mem_span_iff_total _ _ _).mp x.2).choose_spec\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nf : M →ₗ[R] N\nι : Type u_4\ng : ι → M\nl : ι →₀ R\n⊢ ↑f (↑(Finsupp.total ι M R g) l) = ↑(Finsupp.total ι N R (↑f ∘ g)) l\n[PROOFSTEP]\nsimp only [Finsupp.total_apply, Finsupp.total_apply, Finsupp.sum, f.map_sum, f.map_smul, (· ∘ ·)]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nι : Type u_4\np : ι → Submodule R M\nm : M\nhm : m ∈ ⨆ (i : ι), p i\n⊢ ∃ s, m ∈ ⨆ (i : ι) (_ : i ∈ s), p i\n[PROOFSTEP]\nhave :=\n  CompleteLattice.IsCompactElement.exists_finset_of_le_iSup (Submodule R M)\n    (Submodule.singleton_span_isCompactElement m) p\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nι : Type u_4\np : ι → Submodule R M\nm : M\nhm : m ∈ ⨆ (i : ι), p i\nthis : span R {m} ≤ ⨆ (i : ι), p i → ∃ s, span R {m} ≤ ⨆ (i : ι) (_ : i ∈ s), p i\n⊢ ∃ s, m ∈ ⨆ (i : ι) (_ : i ∈ s), p i\n[PROOFSTEP]\nsimp only [Submodule.span_singleton_le_iff_mem] at this \n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nι : Type u_4\np : ι → Submodule R M\nm : M\nhm : m ∈ ⨆ (i : ι), p i\nthis : m ∈ ⨆ (i : ι), p i → ∃ s, m ∈ ⨆ (i : ι) (_ : i ∈ s), p i\n⊢ ∃ s, m ∈ ⨆ (i : ι) (_ : i ∈ s), p i\n[PROOFSTEP]\nexact this hm\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\ns : Finset M\nx : M\nhx : x ∈ span R ↑s\n⊢ x ∈ span R (_root_.id '' ↑s)\n[PROOFSTEP]\nrwa [Set.image_id]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nm : M\ns : Set M\n⊢ m ∈ span R s ↔ ∃ c, ↑c.support ⊆ s ∧ (Finsupp.sum c fun mi r => r • mi) = m\n[PROOFSTEP]\nconv_lhs => rw [← Set.image_id s]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nm : M\ns : Set M\n| m ∈ span R s\n[PROOFSTEP]\nrw [← Set.image_id s]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nm : M\ns : Set M\n| m ∈ span R s\n[PROOFSTEP]\nrw [← Set.image_id s]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nm : M\ns : Set M\n| m ∈ span R s\n[PROOFSTEP]\nrw [← Set.image_id s]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nm : M\ns : Set M\n⊢ m ∈ span R (_root_.id '' s) ↔ ∃ c, ↑c.support ⊆ s ∧ (Finsupp.sum c fun mi r => r • mi) = m\n[PROOFSTEP]\nexact Finsupp.mem_span_image_iff_total R (v := _root_.id (α := M))\n[GOAL]\nR✝ : Type u_1\nM✝ : Type u_2\nN : Type u_3\ninst✝⁸ : Semiring R✝\ninst✝⁷ : AddCommMonoid M✝\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R✝ N\nR : Type u_4\nM : Type u_5\nι : Type u_6\ninst✝³ : Semiring R\ninst✝² : Subsingleton R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\n⊢ (fun x => 0)\n      (AddHom.toFun\n        { toAddHom := { toFun := fun x => 0, map_add' := (_ : M → M → 0 = 0 + 0) },\n            map_smul' := (_ : ∀ (r : R), M → 0 = r • 0) }.toAddHom\n        m) =\n    m\n[PROOFSTEP]\nletI := Module.subsingleton R M\n[GOAL]\nR✝ : Type u_1\nM✝ : Type u_2\nN : Type u_3\ninst✝⁸ : Semiring R✝\ninst✝⁷ : AddCommMonoid M✝\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R✝ N\nR : Type u_4\nM : Type u_5\nι : Type u_6\ninst✝³ : Semiring R\ninst✝² : Subsingleton R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\nthis : Subsingleton M := Module.subsingleton R M\n⊢ (fun x => 0)\n      (AddHom.toFun\n        { toAddHom := { toFun := fun x => 0, map_add' := (_ : M → M → 0 = 0 + 0) },\n            map_smul' := (_ : ∀ (r : R), M → 0 = r • 0) }.toAddHom\n        m) =\n    m\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nR✝ : Type u_1\nM✝ : Type u_2\nN : Type u_3\ninst✝⁸ : Semiring R✝\ninst✝⁷ : AddCommMonoid M✝\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : Module R✝ N\nR : Type u_4\nM : Type u_5\nι : Type u_6\ninst✝³ : Semiring R\ninst✝² : Subsingleton R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nf : ι →₀ R\n⊢ AddHom.toFun\n      { toAddHom := { toFun := fun x => 0, map_add' := (_ : M → M → 0 = 0 + 0) },\n          map_smul' := (_ : ∀ (r : R), M → 0 = r • 0) }.toAddHom\n      ((fun x => 0) f) =\n    f\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nα : Type u_4\nf : M →ₗ[R] α →₀ R\ns : Surjective ↑f\n⊢ comp f (splittingOfFinsuppSurjective f s) = id\n[PROOFSTEP]\nrefine lhom_ext' fun x => ext_ring <| Finsupp.ext fun y => ?_\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nα : Type u_4\nf : M →ₗ[R] α →₀ R\ns : Surjective ↑f\nx y : α\n⊢ ↑(↑(comp (comp f (splittingOfFinsuppSurjective f s)) (lsingle x)) 1) y = ↑(↑(comp id (lsingle x)) 1) y\n[PROOFSTEP]\ndsimp [splittingOfFinsuppSurjective]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nα : Type u_4\nf : M →ₗ[R] α →₀ R\ns : Surjective ↑f\nx y : α\n⊢ ↑(↑f (sum (Finsupp.single x 1) fun x r => r • Exists.choose (_ : ∃ a, ↑f a = Finsupp.single x 1))) y =\n    ↑(Finsupp.single x 1) y\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nα : Type u_4\nf : M →ₗ[R] α →₀ R\ns : Surjective ↑f\nx y : α\n⊢ ↑f (sum (Finsupp.single x 1) fun x r => r • Exists.choose (_ : ∃ a, ↑f a = Finsupp.single x 1)) = Finsupp.single x 1\n[PROOFSTEP]\nrw [sum_single_index, one_smul]\n[GOAL]\ncase e_a\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nα : Type u_4\nf : M →ₗ[R] α →₀ R\ns : Surjective ↑f\nx y : α\n⊢ ↑f (Exists.choose (_ : ∃ a, ↑f a = Finsupp.single x 1)) = Finsupp.single x 1\n[PROOFSTEP]\nexact (s (Finsupp.single x 1)).choose_spec\n[GOAL]\ncase e_a\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nα : Type u_4\nf : M →ₗ[R] α →₀ R\ns : Surjective ↑f\nx y : α\n⊢ 0 • Exists.choose (_ : ∃ a, ↑f a = Finsupp.single x 1) = 0\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\nα : Type u_4\ninst✝ : Fintype α\nf : M →ₗ[R] α → R\ns : Surjective ↑f\n⊢ comp f (splittingOfFunOnFintypeSurjective f s) = id\n[PROOFSTEP]\nclassical\n  -- Porting note: `ext` can't find appropriate theorems.\nrefine pi_ext' fun x => ext_ring <| funext fun y => ?_\ndsimp [splittingOfFunOnFintypeSurjective]\nrw [linearEquivFunOnFinite_symm_single, Finsupp.sum_single_index, one_smul, (s (Finsupp.single x 1)).choose_spec,\n  Finsupp.single_eq_pi_single]\nrw [zero_smul]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\nα : Type u_4\ninst✝ : Fintype α\nf : M →ₗ[R] α → R\ns : Surjective ↑f\n⊢ comp f (splittingOfFunOnFintypeSurjective f s) = id\n[PROOFSTEP]\nrefine pi_ext' fun x => ext_ring <| funext fun y => ?_\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\nα : Type u_4\ninst✝ : Fintype α\nf : M →ₗ[R] α → R\ns : Surjective ↑f\nx y : α\n⊢ ↑(comp (comp f (splittingOfFunOnFintypeSurjective f s)) (single x)) 1 y = ↑(comp id (single x)) 1 y\n[PROOFSTEP]\ndsimp [splittingOfFunOnFintypeSurjective]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\nα : Type u_4\ninst✝ : Fintype α\nf : M →ₗ[R] α → R\ns : Surjective ↑f\nx y : α\n⊢ ↑f\n      (sum (↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) (Pi.single x 1)) fun x r =>\n        r • Exists.choose (_ : ∃ a, ↑f a = ↑(Finsupp.single x 1)))\n      y =\n    Pi.single x 1 y\n[PROOFSTEP]\nrw [linearEquivFunOnFinite_symm_single, Finsupp.sum_single_index, one_smul, (s (Finsupp.single x 1)).choose_spec,\n  Finsupp.single_eq_pi_single]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : Semiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\nα : Type u_4\ninst✝ : Fintype α\nf : M →ₗ[R] α → R\ns : Surjective ↑f\nx y : α\n⊢ 0 • Exists.choose (_ : ∃ a, ↑f a = ↑(Finsupp.single x 1)) = 0\n[PROOFSTEP]\nrw [zero_smul]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Finsupp", "llama_tokens": 101013, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7341195269001831, "lm_q2_score": 0.4960938294709195, "lm_q1q2_score": 0.36419216738929155}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : StrictMonoOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioc (f a) b\n⊢ ContinuousWithinAt f (Ici a) a\n[PROOFSTEP]\nhave ha : a ∈ Ici a := left_mem_Ici\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : StrictMonoOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioc (f a) b\nha : a ∈ Ici a\n⊢ ContinuousWithinAt f (Ici a) a\n[PROOFSTEP]\nhave has : a ∈ s := mem_of_mem_nhdsWithin ha hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : StrictMonoOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioc (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\n⊢ ContinuousWithinAt f (Ici a) a\n[PROOFSTEP]\nrefine' tendsto_order.2 ⟨fun b hb => _, fun b hb => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : StrictMonoOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioc (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\nb : β\nhb : b < f a\n⊢ ∀ᶠ (b_1 : α) in 𝓝[Ici a] a, b < f b_1\n[PROOFSTEP]\nfilter_upwards [hs, @self_mem_nhdsWithin _ _ a (Ici a)] with _ hxs hxa using\n  hb.trans_le ((h_mono.le_iff_le has hxs).2 hxa)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : StrictMonoOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioc (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\nb : β\nhb : b > f a\n⊢ ∀ᶠ (b_1 : α) in 𝓝[Ici a] a, f b_1 < b\n[PROOFSTEP]\nrcases hfs b hb with ⟨c, hcs, hac, hcb⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : StrictMonoOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioc (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\nb : β\nhb : b > f a\nc : α\nhcs : c ∈ s\nhac : f a < f c\nhcb : f c ≤ b\n⊢ ∀ᶠ (b_1 : α) in 𝓝[Ici a] a, f b_1 < b\n[PROOFSTEP]\nrw [h_mono.lt_iff_lt has hcs] at hac \n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : StrictMonoOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioc (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\nb : β\nhb : b > f a\nc : α\nhcs : c ∈ s\nhac : a < c\nhcb : f c ≤ b\n⊢ ∀ᶠ (b_1 : α) in 𝓝[Ici a] a, f b_1 < b\n[PROOFSTEP]\nfilter_upwards [hs, Ico_mem_nhdsWithin_Ici (left_mem_Ico.2 hac)]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : StrictMonoOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioc (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\nb : β\nhb : b > f a\nc : α\nhcs : c ∈ s\nhac : a < c\nhcb : f c ≤ b\n⊢ ∀ (a_1 : α), a_1 ∈ s → a_1 ∈ Ico a c → f a_1 < b\n[PROOFSTEP]\nrintro x hx ⟨_, hxc⟩\n[GOAL]\ncase h.intro\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : StrictMonoOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioc (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\nb : β\nhb : b > f a\nc : α\nhcs : c ∈ s\nhac : a < c\nhcb : f c ≤ b\nx : α\nhx : x ∈ s\nleft✝ : a ≤ x\nhxc : x < c\n⊢ f x < b\n[PROOFSTEP]\nexact ((h_mono.lt_iff_lt hx hcs).2 hxc).trans_le hcb\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\n⊢ ContinuousWithinAt f (Ici a) a\n[PROOFSTEP]\nhave ha : a ∈ Ici a := left_mem_Ici\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\nha : a ∈ Ici a\n⊢ ContinuousWithinAt f (Ici a) a\n[PROOFSTEP]\nhave has : a ∈ s := mem_of_mem_nhdsWithin ha hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\n⊢ ContinuousWithinAt f (Ici a) a\n[PROOFSTEP]\nrefine' tendsto_order.2 ⟨fun b hb => _, fun b hb => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\nb : β\nhb : b < f a\n⊢ ∀ᶠ (b_1 : α) in 𝓝[Ici a] a, b < f b_1\n[PROOFSTEP]\nfilter_upwards [hs, @self_mem_nhdsWithin _ _ a (Ici a)] with _ hxs hxa using hb.trans_le (h_mono has hxs hxa)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\nb : β\nhb : b > f a\n⊢ ∀ᶠ (b_1 : α) in 𝓝[Ici a] a, f b_1 < b\n[PROOFSTEP]\nrcases hfs b hb with ⟨c, hcs, hac, hcb⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\nb : β\nhb : b > f a\nc : α\nhcs : c ∈ s\nhac : f a < f c\nhcb : f c < b\n⊢ ∀ᶠ (b_1 : α) in 𝓝[Ici a] a, f b_1 < b\n[PROOFSTEP]\nhave : a < c := not_le.1 fun h => hac.not_le <| h_mono hcs has h\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\nb : β\nhb : b > f a\nc : α\nhcs : c ∈ s\nhac : f a < f c\nhcb : f c < b\nthis : a < c\n⊢ ∀ᶠ (b_1 : α) in 𝓝[Ici a] a, f b_1 < b\n[PROOFSTEP]\nfilter_upwards [hs, Ico_mem_nhdsWithin_Ici (left_mem_Ico.2 this)]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\nb : β\nhb : b > f a\nc : α\nhcs : c ∈ s\nhac : f a < f c\nhcb : f c < b\nthis : a < c\n⊢ ∀ (a_1 : α), a_1 ∈ s → a_1 ∈ Ico a c → f a_1 < b\n[PROOFSTEP]\nrintro x hx ⟨_, hxc⟩\n[GOAL]\ncase h.intro\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : LinearOrder α\ninst✝⁴ : TopologicalSpace α\ninst✝³ : OrderTopology α\ninst✝² : LinearOrder β\ninst✝¹ : TopologicalSpace β\ninst✝ : OrderTopology β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : ∀ (b : β), b > f a → ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\nha : a ∈ Ici a\nhas : a ∈ s\nb : β\nhb : b > f a\nc : α\nhcs : c ∈ s\nhac : f a < f c\nhcb : f c < b\nthis : a < c\nx : α\nhx : x ∈ s\nleft✝ : a ≤ x\nhxc : x < c\n⊢ f x < b\n[PROOFSTEP]\nexact (h_mono hx hcs hxc.le).trans_lt hcb\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : LinearOrder α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : OrderTopology α\ninst✝³ : LinearOrder β\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology β\ninst✝ : DenselyOrdered β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : closure (f '' s) ∈ 𝓝[Ici (f a)] f a\n⊢ ContinuousWithinAt f (Ici a) a\n[PROOFSTEP]\nrefine' continuousWithinAt_right_of_monotoneOn_of_exists_between h_mono hs fun b hb => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : LinearOrder α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : OrderTopology α\ninst✝³ : LinearOrder β\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology β\ninst✝ : DenselyOrdered β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : closure (f '' s) ∈ 𝓝[Ici (f a)] f a\nb : β\nhb : b > f a\n⊢ ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\n[PROOFSTEP]\nrcases(mem_nhdsWithin_Ici_iff_exists_mem_Ioc_Ico_subset hb).1 hfs with ⟨b', ⟨hab', hbb'⟩, hb'⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : LinearOrder α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : OrderTopology α\ninst✝³ : LinearOrder β\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology β\ninst✝ : DenselyOrdered β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : closure (f '' s) ∈ 𝓝[Ici (f a)] f a\nb : β\nhb : b > f a\nb' : β\nhb' : Ico (f a) b' ⊆ closure (f '' s)\nhab' : f a < b'\nhbb' : b' ≤ b\n⊢ ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\n[PROOFSTEP]\nrcases exists_between hab' with ⟨c', hc'⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : LinearOrder α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : OrderTopology α\ninst✝³ : LinearOrder β\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology β\ninst✝ : DenselyOrdered β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : closure (f '' s) ∈ 𝓝[Ici (f a)] f a\nb : β\nhb : b > f a\nb' : β\nhb' : Ico (f a) b' ⊆ closure (f '' s)\nhab' : f a < b'\nhbb' : b' ≤ b\nc' : β\nhc' : f a < c' ∧ c' < b'\n⊢ ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\n[PROOFSTEP]\nrcases mem_closure_iff.1 (hb' ⟨hc'.1.le, hc'.2⟩) (Ioo (f a) b') isOpen_Ioo hc' with ⟨_, hc, ⟨c, hcs, rfl⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : LinearOrder α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : OrderTopology α\ninst✝³ : LinearOrder β\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology β\ninst✝ : DenselyOrdered β\nf : α → β\ns : Set α\na : α\nh_mono : MonotoneOn f s\nhs : s ∈ 𝓝[Ici a] a\nhfs : closure (f '' s) ∈ 𝓝[Ici (f a)] f a\nb : β\nhb : b > f a\nb' : β\nhb' : Ico (f a) b' ⊆ closure (f '' s)\nhab' : f a < b'\nhbb' : b' ≤ b\nc' : β\nhc' : f a < c' ∧ c' < b'\nc : α\nhcs : c ∈ s\nhc : f c ∈ Ioo (f a) b'\n⊢ ∃ c, c ∈ s ∧ f c ∈ Ioo (f a) b\n[PROOFSTEP]\nexact ⟨c, hcs, hc.1, hc.2.trans_le hbb'⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : LinearOrder α\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : OrderTopology α\ninst✝³ : LinearOrder β\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology β\ninst✝ : DenselyOrdered β\nf : α → β\nh_mono : Monotone f\nh_dense : DenseRange f\na : α\n⊢ closure (f '' univ) ∈ 𝓝 (f a)\n[PROOFSTEP]\nsimp only [image_univ, h_dense.closure_eq, univ_mem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : PartialOrder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology α\ninst✝ : OrderTopology β\ne : α ≃o β\n⊢ Continuous ↑e\n[PROOFSTEP]\nrw [‹OrderTopology β›.topology_eq_generate_intervals]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : PartialOrder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology α\ninst✝ : OrderTopology β\ne : α ≃o β\n⊢ Continuous ↑e\n[PROOFSTEP]\nrefine' continuous_generateFrom fun s hs => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : PartialOrder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology α\ninst✝ : OrderTopology β\ne : α ≃o β\ns : Set β\nhs : s ∈ {s | ∃ a, s = Ioi a ∨ s = Iio a}\n⊢ IsOpen (↑e ⁻¹' s)\n[PROOFSTEP]\nrcases hs with ⟨a, rfl | rfl⟩\n[GOAL]\ncase intro.inl\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : PartialOrder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology α\ninst✝ : OrderTopology β\ne : α ≃o β\na : β\n⊢ IsOpen (↑e ⁻¹' Ioi a)\n[PROOFSTEP]\nrw [e.preimage_Ioi]\n[GOAL]\ncase intro.inl\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : PartialOrder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology α\ninst✝ : OrderTopology β\ne : α ≃o β\na : β\n⊢ IsOpen (Ioi (↑(symm e) a))\n[PROOFSTEP]\napply isOpen_lt'\n[GOAL]\ncase intro.inr\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : PartialOrder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology α\ninst✝ : OrderTopology β\ne : α ≃o β\na : β\n⊢ IsOpen (↑e ⁻¹' Iio a)\n[PROOFSTEP]\nrw [e.preimage_Iio]\n[GOAL]\ncase intro.inr\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : PartialOrder β\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : OrderTopology α\ninst✝ : OrderTopology β\ne : α ≃o β\na : β\n⊢ IsOpen (Iio (↑(symm e) a))\n[PROOFSTEP]\napply isOpen_gt'\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Order.MonotoneContinuity", "llama_tokens": 7388, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6477982043529716, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.3641769278032568}}
{"text": "[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nA B : Subspace K V\n⊢ A.carrier = B.carrier → A = B\n[PROOFSTEP]\ncases A\n[GOAL]\ncase mk\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nB : Subspace K V\ncarrier✝ : Set (ℙ K V)\nmem_add'✝ :\n  ∀ (v w : V) (hv : v ≠ 0) (hw : w ≠ 0) (hvw : v + w ≠ 0),\n    Projectivization.mk K v hv ∈ carrier✝ →\n      Projectivization.mk K w hw ∈ carrier✝ → Projectivization.mk K (v + w) hvw ∈ carrier✝\n⊢ { carrier := carrier✝, mem_add' := mem_add'✝ }.carrier = B.carrier →\n    { carrier := carrier✝, mem_add' := mem_add'✝ } = B\n[PROOFSTEP]\ncases B\n[GOAL]\ncase mk.mk\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\ncarrier✝¹ : Set (ℙ K V)\nmem_add'✝¹ :\n  ∀ (v w : V) (hv : v ≠ 0) (hw : w ≠ 0) (hvw : v + w ≠ 0),\n    Projectivization.mk K v hv ∈ carrier✝¹ →\n      Projectivization.mk K w hw ∈ carrier✝¹ → Projectivization.mk K (v + w) hvw ∈ carrier✝¹\ncarrier✝ : Set (ℙ K V)\nmem_add'✝ :\n  ∀ (v w : V) (hv : v ≠ 0) (hw : w ≠ 0) (hvw : v + w ≠ 0),\n    Projectivization.mk K v hv ∈ carrier✝ →\n      Projectivization.mk K w hw ∈ carrier✝ → Projectivization.mk K (v + w) hvw ∈ carrier✝\n⊢ { carrier := carrier✝¹, mem_add' := mem_add'✝¹ }.carrier = { carrier := carrier✝, mem_add' := mem_add'✝ }.carrier →\n    { carrier := carrier✝¹, mem_add' := mem_add'✝¹ } = { carrier := carrier✝, mem_add' := mem_add'✝ }\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nA : Set (ℙ K V)\nB : Subspace K V\n⊢ A ≤ ↑B → span A ≤ B\n[PROOFSTEP]\nintro h x hx\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nA : Set (ℙ K V)\nB : Subspace K V\nh : A ≤ ↑B\nx : ℙ K V\nhx : x ∈ span A\n⊢ x ∈ B\n[PROOFSTEP]\ninduction' hx with y hy\n[GOAL]\ncase of\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nA : Set (ℙ K V)\nB : Subspace K V\nh : A ≤ ↑B\nx y : ℙ K V\nhy : y ∈ A\n⊢ y ∈ B\n[PROOFSTEP]\napply h\n[GOAL]\ncase of.a\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nA : Set (ℙ K V)\nB : Subspace K V\nh : A ≤ ↑B\nx y : ℙ K V\nhy : y ∈ A\n⊢ y ∈ A\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mem_add\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nA : Set (ℙ K V)\nB : Subspace K V\nh : A ≤ ↑B\nx : ℙ K V\nv✝ w✝ : V\nhv✝ : v✝ ≠ 0\nhw✝ : w✝ ≠ 0\nhvw✝ : v✝ + w✝ ≠ 0\na✝¹ : spanCarrier A (Projectivization.mk K v✝ hv✝)\na✝ : spanCarrier A (Projectivization.mk K w✝ hw✝)\na_ih✝¹ : Projectivization.mk K v✝ hv✝ ∈ B\na_ih✝ : Projectivization.mk K w✝ hw✝ ∈ B\n⊢ Projectivization.mk K (v✝ + w✝) hvw✝ ∈ B\n[PROOFSTEP]\napply B.mem_add\n[GOAL]\ncase mem_add.a\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nA : Set (ℙ K V)\nB : Subspace K V\nh : A ≤ ↑B\nx : ℙ K V\nv✝ w✝ : V\nhv✝ : v✝ ≠ 0\nhw✝ : w✝ ≠ 0\nhvw✝ : v✝ + w✝ ≠ 0\na✝¹ : spanCarrier A (Projectivization.mk K v✝ hv✝)\na✝ : spanCarrier A (Projectivization.mk K w✝ hw✝)\na_ih✝¹ : Projectivization.mk K v✝ hv✝ ∈ B\na_ih✝ : Projectivization.mk K w✝ hw✝ ∈ B\n⊢ Projectivization.mk K v✝ ?mem_add.hv ∈ B\ncase mem_add.a\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nA : Set (ℙ K V)\nB : Subspace K V\nh : A ≤ ↑B\nx : ℙ K V\nv✝ w✝ : V\nhv✝ : v✝ ≠ 0\nhw✝ : w✝ ≠ 0\nhvw✝ : v✝ + w✝ ≠ 0\na✝¹ : spanCarrier A (Projectivization.mk K v✝ hv✝)\na✝ : spanCarrier A (Projectivization.mk K w✝ hw✝)\na_ih✝¹ : Projectivization.mk K v✝ hv✝ ∈ B\na_ih✝ : Projectivization.mk K w✝ hw✝ ∈ B\n⊢ Projectivization.mk K w✝ ?mem_add.hw ∈ B\ncase mem_add.hv\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nA : Set (ℙ K V)\nB : Subspace K V\nh : A ≤ ↑B\nx : ℙ K V\nv✝ w✝ : V\nhv✝ : v✝ ≠ 0\nhw✝ : w✝ ≠ 0\nhvw✝ : v✝ + w✝ ≠ 0\na✝¹ : spanCarrier A (Projectivization.mk K v✝ hv✝)\na✝ : spanCarrier A (Projectivization.mk K w✝ hw✝)\na_ih✝¹ : Projectivization.mk K v✝ hv✝ ∈ B\na_ih✝ : Projectivization.mk K w✝ hw✝ ∈ B\n⊢ v✝ ≠ 0\ncase mem_add.hw\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nA : Set (ℙ K V)\nB : Subspace K V\nh : A ≤ ↑B\nx : ℙ K V\nv✝ w✝ : V\nhv✝ : v✝ ≠ 0\nhw✝ : w✝ ≠ 0\nhvw✝ : v✝ + w✝ ≠ 0\na✝¹ : spanCarrier A (Projectivization.mk K v✝ hv✝)\na✝ : spanCarrier A (Projectivization.mk K w✝ hw✝)\na_ih✝¹ : Projectivization.mk K v✝ hv✝ ∈ B\na_ih✝ : Projectivization.mk K w✝ hw✝ ∈ B\n⊢ w✝ ≠ 0\n[PROOFSTEP]\nassumption'\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nA : Set (Subspace K V)\nv w : V\nhv : v ≠ 0\nhw : w ≠ 0\nhvw : v + w ≠ 0\nh1 : Projectivization.mk K v hv ∈ sInf (SetLike.coe '' A)\nh2 : Projectivization.mk K w hw ∈ sInf (SetLike.coe '' A)\nt : Set (ℙ K V)\n⊢ t ∈ SetLike.coe '' A → Projectivization.mk K (v + w) hvw ∈ t\n[PROOFSTEP]\nrintro ⟨s, hs, rfl⟩\n[GOAL]\ncase intro.intro\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nA : Set (Subspace K V)\nv w : V\nhv : v ≠ 0\nhw : w ≠ 0\nhvw : v + w ≠ 0\nh1 : Projectivization.mk K v hv ∈ sInf (SetLike.coe '' A)\nh2 : Projectivization.mk K w hw ∈ sInf (SetLike.coe '' A)\ns : Subspace K V\nhs : s ∈ A\n⊢ Projectivization.mk K (v + w) hvw ∈ ↑s\n[PROOFSTEP]\nexact s.mem_add v w hv hw _ (h1 s ⟨s, hs, rfl⟩) (h2 s ⟨s, hs, rfl⟩)\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nsrc✝ : Inf (Subspace K V) := inferInstance\n⊢ ∀ (s : Set (Subspace K V)), IsGLB s (sInf s)\n[PROOFSTEP]\nrefine fun s => ⟨fun a ha x hx => hx _ ⟨a, ha, rfl⟩, fun a ha x hx E => ?_⟩\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nsrc✝ : Inf (Subspace K V) := inferInstance\ns : Set (Subspace K V)\na : Subspace K V\nha : a ∈ lowerBounds s\nx : ℙ K V\nhx : x ∈ a\nE : Set (ℙ K V)\n⊢ E ∈ SetLike.coe '' s → x ∈ E\n[PROOFSTEP]\nrintro ⟨E, hE, rfl⟩\n[GOAL]\ncase intro.intro\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nsrc✝ : Inf (Subspace K V) := inferInstance\ns : Set (Subspace K V)\na : Subspace K V\nha : a ∈ lowerBounds s\nx : ℙ K V\nhx : x ∈ a\nE : Subspace K V\nhE : E ∈ s\n⊢ x ∈ ↑E\n[PROOFSTEP]\nexact ha hE hx\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\n⊢ span Set.univ = ⊤\n[PROOFSTEP]\nrw [eq_top_iff, SetLike.le_def]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\n⊢ ∀ ⦃x : ℙ K V⦄, x ∈ ⊤ → x ∈ span Set.univ\n[PROOFSTEP]\nintro x _hx\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nx : ℙ K V\n_hx : x ∈ ⊤\n⊢ x ∈ span Set.univ\n[PROOFSTEP]\nexact subset_span _ (Set.mem_univ x)\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nS : Set (ℙ K V)\nW : Subspace K V\n⊢ W ⊔ span S = span (↑W ∪ S)\n[PROOFSTEP]\nrw [span_union, span_coe]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nS : Set (ℙ K V)\nW : Subspace K V\n⊢ span S ⊔ W = span (S ∪ ↑W)\n[PROOFSTEP]\nrw [span_union, span_coe]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nS : Set (ℙ K V)\nu : ℙ K V\n⊢ u ∈ span S ↔ ∀ (W : Subspace K V), S ⊆ ↑W → u ∈ W\n[PROOFSTEP]\nsimp_rw [← span_le_subspace_iff]\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nS : Set (ℙ K V)\nu : ℙ K V\n⊢ u ∈ span S ↔ ∀ (W : Subspace K V), span S ≤ W → u ∈ W\n[PROOFSTEP]\nexact ⟨fun hu W hW => hW hu, fun W => W (span S) (le_refl _)⟩\n[GOAL]\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nS : Set (ℙ K V)\n⊢ span S = sInf {W | S ⊆ ↑W}\n[PROOFSTEP]\next x\n[GOAL]\ncase carrier.h\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nS : Set (ℙ K V)\nx : ℙ K V\n⊢ x ∈ (span S).carrier ↔ x ∈ (sInf {W | S ⊆ ↑W}).carrier\n[PROOFSTEP]\nsimp_rw [mem_carrier_iff, mem_span x]\n[GOAL]\ncase carrier.h\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nS : Set (ℙ K V)\nx : ℙ K V\n⊢ (∀ (W : Subspace K V), S ⊆ ↑W → x ∈ W) ↔ x ∈ sInf {W | S ⊆ ↑W}\n[PROOFSTEP]\nrefine ⟨fun hx => ?_, fun hx W hW => ?_⟩\n[GOAL]\ncase carrier.h.refine_1\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nS : Set (ℙ K V)\nx : ℙ K V\nhx : ∀ (W : Subspace K V), S ⊆ ↑W → x ∈ W\n⊢ x ∈ sInf {W | S ⊆ ↑W}\n[PROOFSTEP]\nrintro W ⟨T, hT, rfl⟩\n[GOAL]\ncase carrier.h.refine_1.intro.intro\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nS : Set (ℙ K V)\nx : ℙ K V\nhx : ∀ (W : Subspace K V), S ⊆ ↑W → x ∈ W\nT : Subspace K V\nhT : T ∈ {W | S ⊆ ↑W}\n⊢ x ∈ ↑T\n[PROOFSTEP]\nexact hx T hT\n[GOAL]\ncase carrier.h.refine_2\nK : Type u_1\nV : Type u_2\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nS : Set (ℙ K V)\nx : ℙ K V\nhx : x ∈ sInf {W | S ⊆ ↑W}\nW : Subspace K V\nhW : S ⊆ ↑W\n⊢ x ∈ W\n[PROOFSTEP]\nexact (@sInf_le _ _ {W : Subspace K V | S ⊆ ↑W} W hW) hx\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.ProjectiveSpace.Subspace", "llama_tokens": 5020, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850278370112, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.36391681657188596}}
{"text": "[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.1349, u_2} V\ninst✝ : HasZeroMorphisms V\nX : DifferentialObject ℤ (GradedObjectWithShift b V)\nx y : β\nh : x = y\n⊢ (fun b_1 => b_1 + { as := 1 }.as • b) x = (fun b_1 => b_1 + { as := 1 }.as • b) y\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.1349, u_2} V\ninst✝ : HasZeroMorphisms V\nX : DifferentialObject ℤ (GradedObjectWithShift b V)\nx : β\n⊢ (fun b_1 => b_1 + { as := 1 }.as • b) x = (fun b_1 => b_1 + { as := 1 }.as • b) x\n[PROOFSTEP]\nrfl\n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{u_3, u_2} V\ninst✝ : HasZeroMorphisms V\nX : DifferentialObject ℤ (GradedObjectWithShift b V)\nx y : β\nh : x = y\n⊢ objEqToHom X h ≫ d X y =\n    d X x ≫ objEqToHom X (_ : (fun b_1 => b_1 + { as := 1 }.as • b) x = (fun b_1 => b_1 + { as := 1 }.as • b) y)\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{u_3, u_2} V\ninst✝ : HasZeroMorphisms V\nX : DifferentialObject ℤ (GradedObjectWithShift b V)\nx : β\n⊢ objEqToHom X (_ : x = x) ≫ d X x =\n    d X x ≫ objEqToHom X (_ : (fun b_1 => b_1 + { as := 1 }.as • b) x = (fun b_1 => b_1 + { as := 1 }.as • b) x)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refl\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{u_3, u_2} V\ninst✝ : HasZeroMorphisms V\nX : DifferentialObject ℤ (GradedObjectWithShift b V)\nx : β\n⊢ 𝟙 (obj X x) ≫ d X x = d X x ≫ 𝟙 (obj X (x + 1 • b))\n[PROOFSTEP]\nsimp\n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{u_3, u_2} V\ninst✝ : HasZeroMorphisms V\nX✝ X Y : DifferentialObject ℤ (GradedObjectWithShift b V)\nf : X ⟶ Y\nx y : β\nh : x = y\n⊢ objEqToHom X h ≫ Hom.f f y = Hom.f f x ≫ objEqToHom Y h\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{u_3, u_2} V\ninst✝ : HasZeroMorphisms V\nX✝ X Y : DifferentialObject ℤ (GradedObjectWithShift b V)\nf : X ⟶ Y\nx : β\n⊢ objEqToHom X (_ : x = x) ≫ Hom.f f x = Hom.f f x ≫ objEqToHom Y (_ : x = x)\n[PROOFSTEP]\nsimp\n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{u_3, u_2} V\ninst✝ : HasZeroMorphisms V\nX : HomologicalComplex V (ComplexShape.up' b)\nx y z : β\nh : y = z\n⊢ d X x y ≫ eqToHom (_ : HomologicalComplex.X X y = HomologicalComplex.X X z) = d X x z\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{u_3, u_2} V\ninst✝ : HasZeroMorphisms V\nX : HomologicalComplex V (ComplexShape.up' b)\nx y : β\n⊢ d X x y ≫ eqToHom (_ : HomologicalComplex.X X y = HomologicalComplex.X X y) = d X x y\n[PROOFSTEP]\nsimp\n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.42080, u_2} V\ninst✝ : HasZeroMorphisms V\nX : DifferentialObject ℤ (GradedObjectWithShift b V)\ni j : β\nh : i + b = j\n⊢ i + 1 • b = j\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.42080, u_2} V\ninst✝ : HasZeroMorphisms V\nX : DifferentialObject ℤ (GradedObjectWithShift b V)\ni j : β\nw : ¬ComplexShape.Rel (ComplexShape.up' b) i j\n⊢ (fun i j => if h : i + b = j then DifferentialObject.d X i ≫ objEqToHom X (_ : i + 1 • b = j) else 0) i j = 0\n[PROOFSTEP]\ndsimp at w \n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.42080, u_2} V\ninst✝ : HasZeroMorphisms V\nX : DifferentialObject ℤ (GradedObjectWithShift b V)\ni j : β\nw : ¬i + b = j\n⊢ (fun i j => if h : i + b = j then DifferentialObject.d X i ≫ objEqToHom X (_ : i + 1 • b = j) else 0) i j = 0\n[PROOFSTEP]\nconvert dif_neg w\n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.42080, u_2} V\ninst✝ : HasZeroMorphisms V\nX : DifferentialObject ℤ (GradedObjectWithShift b V)\ni j k : β\nhij : ComplexShape.Rel (ComplexShape.up' b) i j\nhjk : ComplexShape.Rel (ComplexShape.up' b) j k\n⊢ (fun i j => if h : i + b = j then DifferentialObject.d X i ≫ objEqToHom X (_ : i + 1 • b = j) else 0) i j ≫\n      (fun i j => if h : i + b = j then DifferentialObject.d X i ≫ objEqToHom X (_ : i + 1 • b = j) else 0) j k =\n    0\n[PROOFSTEP]\ndsimp at hij hjk \n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.42080, u_2} V\ninst✝ : HasZeroMorphisms V\nX : DifferentialObject ℤ (GradedObjectWithShift b V)\ni j k : β\nhij : i + b = j\nhjk : j + b = k\n⊢ (fun i j => if h : i + b = j then DifferentialObject.d X i ≫ objEqToHom X (_ : i + 1 • b = j) else 0) i j ≫\n      (fun i j => if h : i + b = j then DifferentialObject.d X i ≫ objEqToHom X (_ : i + 1 • b = j) else 0) j k =\n    0\n[PROOFSTEP]\nsubsts hij hjk\n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.42080, u_2} V\ninst✝ : HasZeroMorphisms V\nX : DifferentialObject ℤ (GradedObjectWithShift b V)\ni : β\n⊢ (fun i j => if h : i + b = j then DifferentialObject.d X i ≫ objEqToHom X (_ : i + 1 • b = j) else 0) i (i + b) ≫\n      (fun i j => if h : i + b = j then DifferentialObject.d X i ≫ objEqToHom X (_ : i + 1 • b = j) else 0) (i + b)\n        (i + b + b) =\n    0\n[PROOFSTEP]\nsimp\n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.42080, u_2} V\ninst✝ : HasZeroMorphisms V\nX Y : DifferentialObject ℤ (GradedObjectWithShift b V)\nf : X ⟶ Y\ni j : β\nh : ComplexShape.Rel (ComplexShape.up' b) i j\n⊢ DifferentialObject.Hom.f f i ≫\n      d\n        ((fun X =>\n            mk (fun i => obj X i) fun i j =>\n              if h : i + b = j then DifferentialObject.d X i ≫ objEqToHom X (_ : i + 1 • b = j) else 0)\n          Y)\n        i j =\n    d\n        ((fun X =>\n            mk (fun i => obj X i) fun i j =>\n              if h : i + b = j then DifferentialObject.d X i ≫ objEqToHom X (_ : i + 1 • b = j) else 0)\n          X)\n        i j ≫\n      DifferentialObject.Hom.f f j\n[PROOFSTEP]\ndsimp at h ⊢\n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.42080, u_2} V\ninst✝ : HasZeroMorphisms V\nX Y : DifferentialObject ℤ (GradedObjectWithShift b V)\nf : X ⟶ Y\ni j : β\nh : i + b = j\n⊢ (DifferentialObject.Hom.f f i ≫\n      if h : i + b = j then DifferentialObject.d Y i ≫ objEqToHom Y (_ : i + 1 • b = j) else 0) =\n    (if h : i + b = j then DifferentialObject.d X i ≫ objEqToHom X (_ : i + 1 • b = j) else 0) ≫\n      DifferentialObject.Hom.f f j\n[PROOFSTEP]\nsubst h\n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.42080, u_2} V\ninst✝ : HasZeroMorphisms V\nX Y : DifferentialObject ℤ (GradedObjectWithShift b V)\nf : X ⟶ Y\ni : β\n⊢ (DifferentialObject.Hom.f f i ≫\n      if h : i + b = i + b then DifferentialObject.d Y i ≫ objEqToHom Y (_ : i + 1 • b = i + b) else 0) =\n    (if h : i + b = i + b then DifferentialObject.d X i ≫ objEqToHom X (_ : i + 1 • b = i + b) else 0) ≫\n      DifferentialObject.Hom.f f (i + b)\n[PROOFSTEP]\nsimp only [dite_true, Category.assoc, eqToHom_f']\n  -- Porting note: this `rw` used to be part of the `simp`.\n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.42080, u_2} V\ninst✝ : HasZeroMorphisms V\nX Y : DifferentialObject ℤ (GradedObjectWithShift b V)\nf : X ⟶ Y\ni : β\n⊢ DifferentialObject.Hom.f f i ≫ DifferentialObject.d Y i ≫ objEqToHom Y (_ : i + 1 • b = i + b) =\n    DifferentialObject.d X i ≫ DifferentialObject.Hom.f f (i + 1 • b) ≫ objEqToHom Y (_ : i + 1 • b = i + b)\n[PROOFSTEP]\nhave : f.f i ≫ Y.d i = X.d i ≫ f.f _ := (congr_fun f.comm i).symm\n[GOAL]\nβ : Type u_1\ninst✝² : AddCommGroup β\nb : β\nV : Type u_2\ninst✝¹ : Category.{?u.42080, u_2} V\ninst✝ : HasZeroMorphisms V\nX Y : DifferentialObject ℤ (GradedObjectWithShift b V)\nf : X ⟶ Y\ni : β\nthis :\n  DifferentialObject.Hom.f f i ≫ DifferentialObject.d Y i =\n    DifferentialObject.d X i ≫ DifferentialObject.Hom.f f ((fun b_1 => b_1 + { as := 1 }.as • b) i)\n⊢ DifferentialObject.Hom.f f i ≫ DifferentialObject.d Y i ≫ objEqToHom Y (_ : i + 1 • b = i + b) =\n    DifferentialObject.d X i ≫ DifferentialObject.Hom.f f (i + 1 • b) ≫ objEqToHom Y (_ : i + 1 • b = i + b)\n[PROOFSTEP]\nrw [reassoc_of% this]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Homology.DifferentialObject", "llama_tokens": 3925, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850278370111, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.3639168165718859}}
{"text": "[GOAL]\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\ni : n\n⊢ charmatrix M i i = X - ↑C (M i i)\n[PROOFSTEP]\nsimp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply_eq, map_apply]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\ni j : n\nh : i ≠ j\n⊢ charmatrix M i j = -↑C (M i j)\n[PROOFSTEP]\nsimp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply_ne _ _ _ h, map_apply, sub_eq_neg_self]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\n⊢ ↑matPolyEquiv (charmatrix M) = X - ↑C M\n[PROOFSTEP]\next k i j\n[GOAL]\ncase a.a.h\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni j : n\n⊢ coeff (↑matPolyEquiv (charmatrix M)) k i j = coeff (X - ↑C M) k i j\n[PROOFSTEP]\nsimp only [matPolyEquiv_coeff_apply, coeff_sub, Pi.sub_apply]\n[GOAL]\ncase a.a.h\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni j : n\n⊢ coeff (charmatrix M i j) k = (coeff X k - coeff (↑C M) k) i j\n[PROOFSTEP]\nby_cases h : i = j\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni j : n\nh : i = j\n⊢ coeff (charmatrix M i j) k = (coeff X k - coeff (↑C M) k) i j\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni : n\n⊢ coeff (charmatrix M i i) k = (coeff X k - coeff (↑C M) k) i i\n[PROOFSTEP]\nrw [charmatrix_apply_eq, coeff_sub]\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni : n\n⊢ coeff X k - coeff (↑C (M i i)) k = (coeff X k - coeff (↑C M) k) i i\n[PROOFSTEP]\nsimp only [coeff_X, coeff_C]\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni : n\n⊢ ((if 1 = k then 1 else 0) - if k = 0 then M i i else 0) = ((if 1 = k then 1 else 0) - if k = 0 then M else 0) i i\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni : n\nh✝¹ : 1 = k\nh✝ : k = 0\n⊢ 1 - M i i = (1 - M) i i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni : n\nh✝¹ : 1 = k\nh✝ : ¬k = 0\n⊢ 1 - 0 = (1 - 0) i i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni : n\nh✝¹ : ¬1 = k\nh✝ : k = 0\n⊢ 0 - M i i = (0 - M) i i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni : n\nh✝¹ : ¬1 = k\nh✝ : ¬k = 0\n⊢ 0 - 0 = (0 - 0) i i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni j : n\nh : ¬i = j\n⊢ coeff (charmatrix M i j) k = (coeff X k - coeff (↑C M) k) i j\n[PROOFSTEP]\nrw [charmatrix_apply_ne _ _ _ h, coeff_X, coeff_neg, coeff_C, coeff_C]\n[GOAL]\ncase neg\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni j : n\nh : ¬i = j\n⊢ (-if k = 0 then M i j else 0) = ((if 1 = k then 1 else 0) - if k = 0 then M else 0) i j\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni j : n\nh : ¬i = j\nh✝¹ : k = 0\nh✝ : 1 = k\n⊢ -M i j = (1 - M) i j\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni j : n\nh : ¬i = j\nh✝¹ : k = 0\nh✝ : ¬1 = k\n⊢ -M i j = (0 - M) i j\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase pos\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni j : n\nh : ¬i = j\nh✝¹ : ¬k = 0\nh✝ : 1 = k\n⊢ -0 = (1 - 0) i j\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nk : ℕ\ni j : n\nh : ¬i = j\nh✝¹ : ¬k = 0\nh✝ : ¬1 = k\n⊢ -0 = (0 - 0) i j\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn : Type w\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nm : Type v\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\ne : n ≃ m\nM : Matrix n n R\n⊢ charmatrix (↑(reindex e e) M) = ↑(reindex e e) (charmatrix M)\n[PROOFSTEP]\next i j x\n[GOAL]\ncase a.h.a\nR : Type u\ninst✝⁴ : CommRing R\nn : Type w\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nm : Type v\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\ne : n ≃ m\nM : Matrix n n R\ni j : m\nx : ℕ\n⊢ coeff (charmatrix (↑(reindex e e) M) i j) x = coeff (↑(reindex e e) (charmatrix M) i j) x\n[PROOFSTEP]\nby_cases h : i = j\n[GOAL]\ncase pos\nR : Type u\ninst✝⁴ : CommRing R\nn : Type w\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nm : Type v\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\ne : n ≃ m\nM : Matrix n n R\ni j : m\nx : ℕ\nh : i = j\n⊢ coeff (charmatrix (↑(reindex e e) M) i j) x = coeff (↑(reindex e e) (charmatrix M) i j) x\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn : Type w\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nm : Type v\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\ne : n ≃ m\nM : Matrix n n R\ni j : m\nx : ℕ\nh : ¬i = j\n⊢ coeff (charmatrix (↑(reindex e e) M) i j) x = coeff (↑(reindex e e) (charmatrix M) i j) x\n[PROOFSTEP]\nall_goals simp [h]\n[GOAL]\ncase pos\nR : Type u\ninst✝⁴ : CommRing R\nn : Type w\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nm : Type v\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\ne : n ≃ m\nM : Matrix n n R\ni j : m\nx : ℕ\nh : i = j\n⊢ coeff (charmatrix (↑(reindex e e) M) i j) x = coeff (↑(reindex e e) (charmatrix M) i j) x\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn : Type w\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nm : Type v\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\ne : n ≃ m\nM : Matrix n n R\ni j : m\nx : ℕ\nh : ¬i = j\n⊢ coeff (charmatrix (↑(reindex e e) M) i j) x = coeff (↑(reindex e e) (charmatrix M) i j) x\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn : Type w\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nm : Type v\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\ne : n ≃ m\nM : Matrix n n R\n⊢ charpoly (↑(reindex e e) M) = charpoly M\n[PROOFSTEP]\nunfold Matrix.charpoly\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn : Type w\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nm : Type v\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\ne : n ≃ m\nM : Matrix n n R\n⊢ det (charmatrix (↑(reindex e e) M)) = det (charmatrix M)\n[PROOFSTEP]\nrw [charmatrix_reindex, Matrix.det_reindex_self]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\n⊢ ↑(aeval M) (charpoly M) = 0\n[PROOFSTEP]\nhave h : M.charpoly • (1 : Matrix n n R[X]) = adjugate (charmatrix M) * charmatrix M := (adjugate_mul _).symm\n[GOAL]\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nh : charpoly M • 1 = adjugate (charmatrix M) * charmatrix M\n⊢ ↑(aeval M) (charpoly M) = 0\n[PROOFSTEP]\napply_fun matPolyEquiv at h \n[GOAL]\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nh : ↑matPolyEquiv (charpoly M • 1) = ↑matPolyEquiv (adjugate (charmatrix M) * charmatrix M)\n⊢ ↑(aeval M) (charpoly M) = 0\n[PROOFSTEP]\nsimp only [matPolyEquiv.map_mul, matPolyEquiv_charmatrix] at h \n[GOAL]\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nh : ↑matPolyEquiv (charpoly M • 1) = ↑matPolyEquiv (adjugate (charmatrix M)) * (X - ↑C M)\n⊢ ↑(aeval M) (charpoly M) = 0\n[PROOFSTEP]\napply_fun fun p => p.eval M at h \n[GOAL]\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nh : eval M (↑matPolyEquiv (charpoly M • 1)) = eval M (↑matPolyEquiv (adjugate (charmatrix M)) * (X - ↑C M))\n⊢ ↑(aeval M) (charpoly M) = 0\n[PROOFSTEP]\nrw [eval_mul_X_sub_C] at h \n[GOAL]\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nh : eval M (↑matPolyEquiv (charpoly M • 1)) = 0\n⊢ ↑(aeval M) (charpoly M) = 0\n[PROOFSTEP]\nrw [matPolyEquiv_smul_one, eval_map] at h \n[GOAL]\nR : Type u\ninst✝² : CommRing R\nn : Type w\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nM : Matrix n n R\nh : eval₂ (algebraMap R (Matrix n n R)) M (charpoly M) = 0\n⊢ ↑(aeval M) (charpoly M) = 0\n[PROOFSTEP]\nexact h\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Charpoly.Basic", "llama_tokens": 4455, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6654105454764747, "lm_q2_score": 0.546738151984614, "lm_q1q2_score": 0.3638053319448817}}
{"text": "[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ lpMeas E' 𝕜 m p μ }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f x ∂μ = 0\n⊢ ↑↑↑f =ᵐ[μ] 0\n[PROOFSTEP]\nobtain ⟨g, hg_sm, hfg⟩ := lpMeas.ae_fin_strongly_measurable' hm f hp_ne_zero hp_ne_top\n[GOAL]\ncase intro.intro\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ lpMeas E' 𝕜 m p μ }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f x ∂μ = 0\ng : α → E'\nhg_sm : FinStronglyMeasurable g (Measure.trim μ hm)\nhfg : ↑↑↑f =ᵐ[μ] g\n⊢ ↑↑↑f =ᵐ[μ] 0\n[PROOFSTEP]\nrefine'\n  hfg.trans\n    _\n      -- Porting note: added\n[GOAL]\ncase intro.intro\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ lpMeas E' 𝕜 m p μ }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f x ∂μ = 0\ng : α → E'\nhg_sm : FinStronglyMeasurable g (Measure.trim μ hm)\nhfg : ↑↑↑f =ᵐ[μ] g\n⊢ g =ᵐ[μ] 0\n[PROOFSTEP]\nunfold Filter.EventuallyEq at hfg \n[GOAL]\ncase intro.intro\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ lpMeas E' 𝕜 m p μ }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f x ∂μ = 0\ng : α → E'\nhg_sm : FinStronglyMeasurable g (Measure.trim μ hm)\nhfg : ∀ᵐ (x : α) ∂μ, ↑↑↑f x = g x\n⊢ g =ᵐ[μ] 0\n[PROOFSTEP]\nrefine' ae_eq_zero_of_forall_set_integral_eq_of_finStronglyMeasurable_trim hm _ _ hg_sm\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ lpMeas E' 𝕜 m p μ }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f x ∂μ = 0\ng : α → E'\nhg_sm : FinStronglyMeasurable g (Measure.trim μ hm)\nhfg : ∀ᵐ (x : α) ∂μ, ↑↑↑f x = g x\n⊢ ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\n[PROOFSTEP]\nintro s hs hμs\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ lpMeas E' 𝕜 m p μ }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f x ∂μ = 0\ng : α → E'\nhg_sm : FinStronglyMeasurable g (Measure.trim μ hm)\nhfg : ∀ᵐ (x : α) ∂μ, ↑↑↑f x = g x\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ IntegrableOn g s\n[PROOFSTEP]\nhave hfg_restrict : f =ᵐ[μ.restrict s] g := ae_restrict_of_ae hfg\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ lpMeas E' 𝕜 m p μ }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f x ∂μ = 0\ng : α → E'\nhg_sm : FinStronglyMeasurable g (Measure.trim μ hm)\nhfg : ∀ᵐ (x : α) ∂μ, ↑↑↑f x = g x\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\nhfg_restrict : ↑↑↑f =ᵐ[Measure.restrict μ s] g\n⊢ IntegrableOn g s\n[PROOFSTEP]\nrw [IntegrableOn, integrable_congr hfg_restrict.symm]\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ lpMeas E' 𝕜 m p μ }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f x ∂μ = 0\ng : α → E'\nhg_sm : FinStronglyMeasurable g (Measure.trim μ hm)\nhfg : ∀ᵐ (x : α) ∂μ, ↑↑↑f x = g x\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\nhfg_restrict : ↑↑↑f =ᵐ[Measure.restrict μ s] g\n⊢ Integrable ↑↑↑f\n[PROOFSTEP]\nexact hf_int_finite s hs hμs\n[GOAL]\ncase intro.intro.refine'_2\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ lpMeas E' 𝕜 m p μ }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f x ∂μ = 0\ng : α → E'\nhg_sm : FinStronglyMeasurable g (Measure.trim μ hm)\nhfg : ∀ᵐ (x : α) ∂μ, ↑↑↑f x = g x\n⊢ ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, g x ∂μ = 0\n[PROOFSTEP]\nintro s hs hμs\n[GOAL]\ncase intro.intro.refine'_2\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ lpMeas E' 𝕜 m p μ }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f x ∂μ = 0\ng : α → E'\nhg_sm : FinStronglyMeasurable g (Measure.trim μ hm)\nhfg : ∀ᵐ (x : α) ∂μ, ↑↑↑f x = g x\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ ∫ (x : α) in s, g x ∂μ = 0\n[PROOFSTEP]\nhave hfg_restrict : f =ᵐ[μ.restrict s] g := ae_restrict_of_ae hfg\n[GOAL]\ncase intro.intro.refine'_2\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ lpMeas E' 𝕜 m p μ }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f x ∂μ = 0\ng : α → E'\nhg_sm : FinStronglyMeasurable g (Measure.trim μ hm)\nhfg : ∀ᵐ (x : α) ∂μ, ↑↑↑f x = g x\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\nhfg_restrict : ↑↑↑f =ᵐ[Measure.restrict μ s] g\n⊢ ∫ (x : α) in s, g x ∂μ = 0\n[PROOFSTEP]\nrw [integral_congr_ae hfg_restrict.symm]\n[GOAL]\ncase intro.intro.refine'_2\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ lpMeas E' 𝕜 m p μ }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f x ∂μ = 0\ng : α → E'\nhg_sm : FinStronglyMeasurable g (Measure.trim μ hm)\nhfg : ∀ᵐ (x : α) ∂μ, ↑↑↑f x = g x\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\nhfg_restrict : ↑↑↑f =ᵐ[Measure.restrict μ s] g\n⊢ ∫ (a : α) in s, ↑↑↑f a ∂μ = 0\n[PROOFSTEP]\nexact hf_zero s hs hμs\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\n⊢ ↑↑f =ᵐ[μ] 0\n[PROOFSTEP]\nlet f_meas : lpMeas E' 𝕜 m p μ :=\n  ⟨f, hf_meas⟩\n    -- Porting note: `simp only` does not call `rfl` to try to close the goal. See https://github.com/leanprover-community/mathlib4/issues/5025\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\n⊢ ↑↑f =ᵐ[μ] 0\n[PROOFSTEP]\nhave hf_f_meas : f =ᵐ[μ] f_meas := by simp only [Subtype.coe_mk]; rfl\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\n⊢ ↑↑f =ᵐ[μ] ↑↑↑f_meas\n[PROOFSTEP]\nsimp only [Subtype.coe_mk]\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\n⊢ ↑↑f =ᵐ[μ] ↑↑f\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\nhf_f_meas : ↑↑f =ᵐ[μ] ↑↑↑f_meas\n⊢ ↑↑f =ᵐ[μ] 0\n[PROOFSTEP]\nrefine' hf_f_meas.trans _\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\nhf_f_meas : ↑↑f =ᵐ[μ] ↑↑↑f_meas\n⊢ ↑↑↑f_meas =ᵐ[μ] 0\n[PROOFSTEP]\nrefine' lpMeas.ae_eq_zero_of_forall_set_integral_eq_zero hm f_meas hp_ne_zero hp_ne_top _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\nhf_f_meas : ↑↑f =ᵐ[μ] ↑↑↑f_meas\n⊢ ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑↑f_meas) s\n[PROOFSTEP]\nintro s hs hμs\n[GOAL]\ncase refine'_1\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\nhf_f_meas : ↑↑f =ᵐ[μ] ↑↑↑f_meas\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ IntegrableOn (↑↑↑f_meas) s\n[PROOFSTEP]\nhave hfg_restrict : f =ᵐ[μ.restrict s] f_meas := ae_restrict_of_ae hf_f_meas\n[GOAL]\ncase refine'_1\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\nhf_f_meas : ↑↑f =ᵐ[μ] ↑↑↑f_meas\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\nhfg_restrict : ↑↑f =ᵐ[Measure.restrict μ s] ↑↑↑f_meas\n⊢ IntegrableOn (↑↑↑f_meas) s\n[PROOFSTEP]\nrw [IntegrableOn, integrable_congr hfg_restrict.symm]\n[GOAL]\ncase refine'_1\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\nhf_f_meas : ↑↑f =ᵐ[μ] ↑↑↑f_meas\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\nhfg_restrict : ↑↑f =ᵐ[Measure.restrict μ s] ↑↑↑f_meas\n⊢ Integrable ↑↑f\n[PROOFSTEP]\nexact hf_int_finite s hs hμs\n[GOAL]\ncase refine'_2\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\nhf_f_meas : ↑↑f =ᵐ[μ] ↑↑↑f_meas\n⊢ ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑↑f_meas x ∂μ = 0\n[PROOFSTEP]\nintro s hs hμs\n[GOAL]\ncase refine'_2\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\nhf_f_meas : ↑↑f =ᵐ[μ] ↑↑↑f_meas\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ ∫ (x : α) in s, ↑↑↑f_meas x ∂μ = 0\n[PROOFSTEP]\nhave hfg_restrict : f =ᵐ[μ.restrict s] f_meas := ae_restrict_of_ae hf_f_meas\n[GOAL]\ncase refine'_2\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\nhf_f_meas : ↑↑f =ᵐ[μ] ↑↑↑f_meas\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\nhfg_restrict : ↑↑f =ᵐ[Measure.restrict μ s] ↑↑↑f_meas\n⊢ ∫ (x : α) in s, ↑↑↑f_meas x ∂μ = 0\n[PROOFSTEP]\nrw [integral_congr_ae hfg_restrict.symm]\n[GOAL]\ncase refine'_2\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nf_meas : { x // x ∈ lpMeas E' 𝕜 m p μ } := { val := f, property := hf_meas }\nhf_f_meas : ↑↑f =ᵐ[μ] ↑↑↑f_meas\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\nhfg_restrict : ↑↑f =ᵐ[Measure.restrict μ s] ↑↑↑f_meas\n⊢ ∫ (a : α) in s, ↑↑f a ∂μ = 0\n[PROOFSTEP]\nexact hf_zero s hs hμs\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\n⊢ ↑↑f =ᵐ[μ] ↑↑g\n[PROOFSTEP]\nsuffices h_sub : ⇑(f - g) =ᵐ[μ] 0\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\nh_sub : ↑↑(f - g) =ᵐ[μ] 0\n⊢ ↑↑f =ᵐ[μ] ↑↑g\n[PROOFSTEP]\nrw [← sub_ae_eq_zero]\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\nh_sub : ↑↑(f - g) =ᵐ[μ] 0\n⊢ ↑↑f - ↑↑g =ᵐ[μ] 0\n[PROOFSTEP]\nexact (Lp.coeFn_sub f g).symm.trans h_sub\n[GOAL]\ncase h_sub\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\n⊢ ↑↑(f - g) =ᵐ[μ] 0\n[PROOFSTEP]\nhave hfg' : ∀ s : Set α, MeasurableSet[m] s → μ s < ∞ → (∫ x in s, (f - g) x ∂μ) = 0 :=\n  by\n  intro s hs hμs\n  rw [integral_congr_ae (ae_restrict_of_ae (Lp.coeFn_sub f g))]\n  rw [integral_sub' (hf_int_finite s hs hμs) (hg_int_finite s hs hμs)]\n  exact sub_eq_zero.mpr (hfg s hs hμs)\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\n⊢ ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑(f - g) x ∂μ = 0\n[PROOFSTEP]\nintro s hs hμs\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ ∫ (x : α) in s, ↑↑(f - g) x ∂μ = 0\n[PROOFSTEP]\nrw [integral_congr_ae (ae_restrict_of_ae (Lp.coeFn_sub f g))]\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ ∫ (a : α) in s, (↑↑f - ↑↑g) a ∂μ = 0\n[PROOFSTEP]\nrw [integral_sub' (hf_int_finite s hs hμs) (hg_int_finite s hs hμs)]\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ ∫ (a : α) in s, ↑↑f a ∂μ - ∫ (a : α) in s, ↑↑g a ∂μ = 0\n[PROOFSTEP]\nexact sub_eq_zero.mpr (hfg s hs hμs)\n[GOAL]\ncase h_sub\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\nhfg' : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑(f - g) x ∂μ = 0\n⊢ ↑↑(f - g) =ᵐ[μ] 0\n[PROOFSTEP]\nhave hfg_int : ∀ s, MeasurableSet[m] s → μ s < ∞ → IntegrableOn (⇑(f - g)) s μ :=\n  by\n  intro s hs hμs\n  rw [IntegrableOn, integrable_congr (ae_restrict_of_ae (Lp.coeFn_sub f g))]\n  exact (hf_int_finite s hs hμs).sub (hg_int_finite s hs hμs)\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\nhfg' : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑(f - g) x ∂μ = 0\n⊢ ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑(f - g)) s\n[PROOFSTEP]\nintro s hs hμs\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\nhfg' : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑(f - g) x ∂μ = 0\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ IntegrableOn (↑↑(f - g)) s\n[PROOFSTEP]\nrw [IntegrableOn, integrable_congr (ae_restrict_of_ae (Lp.coeFn_sub f g))]\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\nhfg' : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑(f - g) x ∂μ = 0\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ Integrable fun x => (↑↑f - ↑↑g) x\n[PROOFSTEP]\nexact (hf_int_finite s hs hμs).sub (hg_int_finite s hs hμs)\n[GOAL]\ncase h_sub\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\nhfg' : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑(f - g) x ∂μ = 0\nhfg_int : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑(f - g)) s\n⊢ ↑↑(f - g) =ᵐ[μ] 0\n[PROOFSTEP]\nhave hfg_meas : AEStronglyMeasurable' m (⇑(f - g)) μ :=\n  AEStronglyMeasurable'.congr (hf_meas.sub hg_meas) (Lp.coeFn_sub f g).symm\n[GOAL]\ncase h_sub\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\nhm : m ≤ m0\nf g : { x // x ∈ Lp E' p }\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑f) s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑g) s\nhfg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ\nhf_meas : AEStronglyMeasurable' m (↑↑f) μ\nhg_meas : AEStronglyMeasurable' m (↑↑g) μ\nhfg' : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, ↑↑(f - g) x ∂μ = 0\nhfg_int : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn (↑↑(f - g)) s\nhfg_meas : AEStronglyMeasurable' m (↑↑(f - g)) μ\n⊢ ↑↑(f - g) =ᵐ[μ] 0\n[PROOFSTEP]\nexact Lp.ae_eq_zero_of_forall_set_integral_eq_zero' 𝕜 hm (f - g) hp_ne_zero hp_ne_top hfg_int hfg' hfg_meas\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\n⊢ f =ᵐ[μ] g\n[PROOFSTEP]\nrw [← ae_eq_trim_iff_of_aeStronglyMeasurable' hm hfm hgm]\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\n⊢ AEStronglyMeasurable'.mk f hfm =ᵐ[Measure.trim μ hm] AEStronglyMeasurable'.mk g hgm\n[PROOFSTEP]\nhave hf_mk_int_finite : ∀ s, MeasurableSet[m] s → μ.trim hm s < ∞ → @IntegrableOn _ _ m _ (hfm.mk f) s (μ.trim hm) :=\n  by\n  intro s hs hμs\n  rw [trim_measurableSet_eq hm hs] at hμs \n  unfold IntegrableOn\n  rw [restrict_trim hm _ hs]\n  refine' Integrable.trim hm _ hfm.stronglyMeasurable_mk\n  exact Integrable.congr (hf_int_finite s hs hμs) (ae_restrict_of_ae hfm.ae_eq_mk)\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\n⊢ ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\n[PROOFSTEP]\nintro s hs hμs\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑(Measure.trim μ hm) s < ⊤\n⊢ IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\n[PROOFSTEP]\nrw [trim_measurableSet_eq hm hs] at hμs \n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\n[PROOFSTEP]\nunfold IntegrableOn\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ Integrable (AEStronglyMeasurable'.mk f hfm)\n[PROOFSTEP]\nrw [restrict_trim hm _ hs]\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ Integrable (AEStronglyMeasurable'.mk f hfm)\n[PROOFSTEP]\nrefine' Integrable.trim hm _ hfm.stronglyMeasurable_mk\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ Integrable (AEStronglyMeasurable'.mk f hfm)\n[PROOFSTEP]\nexact Integrable.congr (hf_int_finite s hs hμs) (ae_restrict_of_ae hfm.ae_eq_mk)\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\n⊢ AEStronglyMeasurable'.mk f hfm =ᵐ[Measure.trim μ hm] AEStronglyMeasurable'.mk g hgm\n[PROOFSTEP]\nhave hg_mk_int_finite : ∀ s, MeasurableSet[m] s → μ.trim hm s < ∞ → @IntegrableOn _ _ m _ (hgm.mk g) s (μ.trim hm) :=\n  by\n  intro s hs hμs\n  rw [trim_measurableSet_eq hm hs] at hμs \n  unfold IntegrableOn\n  rw [restrict_trim hm _ hs]\n  refine' Integrable.trim hm _ hgm.stronglyMeasurable_mk\n  exact Integrable.congr (hg_int_finite s hs hμs) (ae_restrict_of_ae hgm.ae_eq_mk)\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\n⊢ ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk g hgm) s\n[PROOFSTEP]\nintro s hs hμs\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑(Measure.trim μ hm) s < ⊤\n⊢ IntegrableOn (AEStronglyMeasurable'.mk g hgm) s\n[PROOFSTEP]\nrw [trim_measurableSet_eq hm hs] at hμs \n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ IntegrableOn (AEStronglyMeasurable'.mk g hgm) s\n[PROOFSTEP]\nunfold IntegrableOn\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ Integrable (AEStronglyMeasurable'.mk g hgm)\n[PROOFSTEP]\nrw [restrict_trim hm _ hs]\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ Integrable (AEStronglyMeasurable'.mk g hgm)\n[PROOFSTEP]\nrefine' Integrable.trim hm _ hgm.stronglyMeasurable_mk\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ Integrable (AEStronglyMeasurable'.mk g hgm)\n[PROOFSTEP]\nexact Integrable.congr (hg_int_finite s hs hμs) (ae_restrict_of_ae hgm.ae_eq_mk)\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\nhg_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk g hgm) s\n⊢ AEStronglyMeasurable'.mk f hfm =ᵐ[Measure.trim μ hm] AEStronglyMeasurable'.mk g hgm\n[PROOFSTEP]\nhave hfg_mk_eq :\n  ∀ s : Set α,\n    MeasurableSet[m] s → μ.trim hm s < ∞ → ∫ x in s, hfm.mk f x ∂μ.trim hm = ∫ x in s, hgm.mk g x ∂μ.trim hm :=\n  by\n  intro s hs hμs\n  rw [trim_measurableSet_eq hm hs] at hμs \n  rw [restrict_trim hm _ hs, ← integral_trim hm hfm.stronglyMeasurable_mk, ← integral_trim hm hgm.stronglyMeasurable_mk,\n    integral_congr_ae (ae_restrict_of_ae hfm.ae_eq_mk.symm), integral_congr_ae (ae_restrict_of_ae hgm.ae_eq_mk.symm)]\n  exact hfg_eq s hs hμs\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\nhg_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk g hgm) s\n⊢ ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑(Measure.trim μ hm) s < ⊤ →\n        ∫ (x : α) in s, AEStronglyMeasurable'.mk f hfm x ∂Measure.trim μ hm =\n          ∫ (x : α) in s, AEStronglyMeasurable'.mk g hgm x ∂Measure.trim μ hm\n[PROOFSTEP]\nintro s hs hμs\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\nhg_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk g hgm) s\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑(Measure.trim μ hm) s < ⊤\n⊢ ∫ (x : α) in s, AEStronglyMeasurable'.mk f hfm x ∂Measure.trim μ hm =\n    ∫ (x : α) in s, AEStronglyMeasurable'.mk g hgm x ∂Measure.trim μ hm\n[PROOFSTEP]\nrw [trim_measurableSet_eq hm hs] at hμs \n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\nhg_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk g hgm) s\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ ∫ (x : α) in s, AEStronglyMeasurable'.mk f hfm x ∂Measure.trim μ hm =\n    ∫ (x : α) in s, AEStronglyMeasurable'.mk g hgm x ∂Measure.trim μ hm\n[PROOFSTEP]\nrw [restrict_trim hm _ hs, ← integral_trim hm hfm.stronglyMeasurable_mk, ← integral_trim hm hgm.stronglyMeasurable_mk,\n  integral_congr_ae (ae_restrict_of_ae hfm.ae_eq_mk.symm), integral_congr_ae (ae_restrict_of_ae hgm.ae_eq_mk.symm)]\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\nhg_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk g hgm) s\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ ∫ (a : α) in s, f a ∂μ = ∫ (a : α) in s, g a ∂μ\n[PROOFSTEP]\nexact hfg_eq s hs hμs\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\ninst✝⁶ : CompleteSpace E'\ninst✝⁵ : NormedSpace ℝ E'\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : NormedSpace 𝕜 F'\ninst✝² : NormedSpace ℝ F'\ninst✝¹ : CompleteSpace F'\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\nhf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s\nhg_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn g s\nhfg_eq : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ\nhfm : AEStronglyMeasurable' m f μ\nhgm : AEStronglyMeasurable' m g μ\nhf_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk f hfm) s\nhg_mk_int_finite :\n  ∀ (s : Set α), MeasurableSet s → ↑↑(Measure.trim μ hm) s < ⊤ → IntegrableOn (AEStronglyMeasurable'.mk g hgm) s\nhfg_mk_eq :\n  ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑(Measure.trim μ hm) s < ⊤ →\n        ∫ (x : α) in s, AEStronglyMeasurable'.mk f hfm x ∂Measure.trim μ hm =\n          ∫ (x : α) in s, AEStronglyMeasurable'.mk g hgm x ∂Measure.trim μ hm\n⊢ AEStronglyMeasurable'.mk f hfm =ᵐ[Measure.trim μ hm] AEStronglyMeasurable'.mk g hgm\n[PROOFSTEP]\nexact ae_eq_of_forall_set_integral_eq_of_sigmaFinite hf_mk_int_finite hg_mk_int_finite hfg_mk_eq\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∫ (x : α) in s, ‖g x‖ ∂μ ≤ ∫ (x : α) in s, ‖f x‖ ∂μ\n[PROOFSTEP]\nrw [integral_norm_eq_pos_sub_neg hgi, integral_norm_eq_pos_sub_neg hfi]\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂Measure.restrict μ s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂Measure.restrict μ s ≤\n    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂Measure.restrict μ s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂Measure.restrict μ s\n[PROOFSTEP]\nhave h_meas_nonneg_g : MeasurableSet[m] {x | 0 ≤ g x} := (@stronglyMeasurable_const _ _ m _ _).measurableSet_le hg\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nh_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}\n⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂Measure.restrict μ s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂Measure.restrict μ s ≤\n    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂Measure.restrict μ s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂Measure.restrict μ s\n[PROOFSTEP]\nhave h_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x} := stronglyMeasurable_const.measurableSet_le hf\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nh_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}\nh_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}\n⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂Measure.restrict μ s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂Measure.restrict μ s ≤\n    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂Measure.restrict μ s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂Measure.restrict μ s\n[PROOFSTEP]\nhave h_meas_nonpos_g : MeasurableSet[m] {x | g x ≤ 0} := hg.measurableSet_le (@stronglyMeasurable_const _ _ m _ _)\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nh_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}\nh_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}\nh_meas_nonpos_g : MeasurableSet {x | g x ≤ 0}\n⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂Measure.restrict μ s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂Measure.restrict μ s ≤\n    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂Measure.restrict μ s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂Measure.restrict μ s\n[PROOFSTEP]\nhave h_meas_nonpos_f : MeasurableSet {x | f x ≤ 0} := hf.measurableSet_le stronglyMeasurable_const\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nh_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}\nh_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}\nh_meas_nonpos_g : MeasurableSet {x | g x ≤ 0}\nh_meas_nonpos_f : MeasurableSet {x | f x ≤ 0}\n⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂Measure.restrict μ s - ∫ (x : α) in {x | g x ≤ 0}, g x ∂Measure.restrict μ s ≤\n    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂Measure.restrict μ s - ∫ (x : α) in {x | f x ≤ 0}, f x ∂Measure.restrict μ s\n[PROOFSTEP]\nrefine' sub_le_sub _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nh_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}\nh_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}\nh_meas_nonpos_g : MeasurableSet {x | g x ≤ 0}\nh_meas_nonpos_f : MeasurableSet {x | f x ≤ 0}\n⊢ ∫ (x : α) in {x | 0 ≤ g x}, g x ∂Measure.restrict μ s ≤ ∫ (x : α) in {x | 0 ≤ f x}, f x ∂Measure.restrict μ s\n[PROOFSTEP]\nrw [Measure.restrict_restrict (hm _ h_meas_nonneg_g), Measure.restrict_restrict h_meas_nonneg_f,\n  hgf _ (@MeasurableSet.inter α m _ _ h_meas_nonneg_g hs)\n    ((measure_mono (Set.inter_subset_right _ _)).trans_lt (lt_top_iff_ne_top.mpr hμs)),\n  ← Measure.restrict_restrict (hm _ h_meas_nonneg_g), ← Measure.restrict_restrict h_meas_nonneg_f]\n[GOAL]\ncase refine'_1\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nh_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}\nh_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}\nh_meas_nonpos_g : MeasurableSet {x | g x ≤ 0}\nh_meas_nonpos_f : MeasurableSet {x | f x ≤ 0}\n⊢ ∫ (x : α) in {x | 0 ≤ g x}, f x ∂Measure.restrict μ s ≤ ∫ (x : α) in {x | 0 ≤ f x}, f x ∂Measure.restrict μ s\n[PROOFSTEP]\nexact set_integral_le_nonneg (hm _ h_meas_nonneg_g) hf hfi\n[GOAL]\ncase refine'_2\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nh_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}\nh_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}\nh_meas_nonpos_g : MeasurableSet {x | g x ≤ 0}\nh_meas_nonpos_f : MeasurableSet {x | f x ≤ 0}\n⊢ ∫ (x : α) in {x | f x ≤ 0}, f x ∂Measure.restrict μ s ≤ ∫ (x : α) in {x | g x ≤ 0}, g x ∂Measure.restrict μ s\n[PROOFSTEP]\nrw [Measure.restrict_restrict (hm _ h_meas_nonpos_g), Measure.restrict_restrict h_meas_nonpos_f,\n  hgf _ (@MeasurableSet.inter α m _ _ h_meas_nonpos_g hs)\n    ((measure_mono (Set.inter_subset_right _ _)).trans_lt (lt_top_iff_ne_top.mpr hμs)),\n  ← Measure.restrict_restrict (hm _ h_meas_nonpos_g), ← Measure.restrict_restrict h_meas_nonpos_f]\n[GOAL]\ncase refine'_2\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nh_meas_nonneg_g : MeasurableSet {x | 0 ≤ g x}\nh_meas_nonneg_f : MeasurableSet {x | 0 ≤ f x}\nh_meas_nonpos_g : MeasurableSet {x | g x ≤ 0}\nh_meas_nonpos_f : MeasurableSet {x | f x ≤ 0}\n⊢ ∫ (x : α) in {x | f x ≤ 0}, f x ∂Measure.restrict μ s ≤ ∫ (x : α) in {x | g x ≤ 0}, f x ∂Measure.restrict μ s\n[PROOFSTEP]\nexact set_integral_nonpos_le (hm _ h_meas_nonpos_g) hf hfi\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∫⁻ (x : α) in s, ↑‖g x‖₊ ∂μ ≤ ∫⁻ (x : α) in s, ↑‖f x‖₊ ∂μ\n[PROOFSTEP]\nrw [← ofReal_integral_norm_eq_lintegral_nnnorm hfi, ← ofReal_integral_norm_eq_lintegral_nnnorm hgi,\n  ENNReal.ofReal_le_ofReal_iff]\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∫ (x : α) in s, ‖g x‖ ∂μ ≤ ∫ (x : α) in s, ‖f x‖ ∂μ\n[PROOFSTEP]\nexact integral_norm_le_of_forall_fin_meas_integral_eq hm hf hfi hg hgi hgf hs hμs\n[GOAL]\nα : Type u_1\nE' : Type u_2\nF' : Type u_3\n𝕜 : Type u_4\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ : Measure α\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\ninst✝⁵ : CompleteSpace E'\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup F'\ninst✝² : NormedSpace 𝕜 F'\ninst✝¹ : NormedSpace ℝ F'\ninst✝ : CompleteSpace F'\ns : Set α\nhm : m ≤ m0\nf g : α → ℝ\nhf : StronglyMeasurable f\nhfi : IntegrableOn f s\nhg : StronglyMeasurable g\nhgi : IntegrableOn g s\nhgf : ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ 0 ≤ ∫ (x : α) in s, ‖f x‖ ∂μ\n[PROOFSTEP]\nexact integral_nonneg fun x => norm_nonneg _\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.ConditionalExpectation.Unique", "llama_tokens": 38274, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.689305616785446, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.36348224138930957}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝² : DivInvMonoid G₀\ninst✝¹ : TopologicalSpace G₀\ninst✝ : ContinuousMul G₀\nf : α → G₀\ns : Set α\nl : Filter α\nx : G₀\nhf : Tendsto f l (𝓝 x)\ny : G₀\n⊢ Tendsto (fun a => f a / y) l (𝓝 (x / y))\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using hf.mul tendsto_const_nhds\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝³ : DivInvMonoid G₀\ninst✝² : TopologicalSpace G₀\ninst✝¹ : ContinuousMul G₀\nf : α → G₀\ns : Set α\nl : Filter α\ninst✝ : TopologicalSpace α\nhf : ContinuousOn f s\ny : G₀\n⊢ ContinuousOn (fun x => f x / y) s\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using hf.mul continuousOn_const\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝³ : DivInvMonoid G₀\ninst✝² : TopologicalSpace G₀\ninst✝¹ : ContinuousMul G₀\nf : α → G₀\ns : Set α\nl : Filter α\ninst✝ : TopologicalSpace α\nhf : Continuous f\ny : G₀\n⊢ Continuous fun x => f x / y\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using hf.mul continuous_const\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝³ : GroupWithZero G₀\ninst✝² : TopologicalSpace G₀\ninst✝¹ : HasContinuousInv₀ G₀\ninst✝ : ContinuousMul G₀\nf g : α → G₀\nl : Filter α\na b : G₀\nhf : Tendsto f l (𝓝 a)\nhg : Tendsto g l (𝓝 b)\nhy : b ≠ 0\n⊢ Tendsto (f / g) l (𝓝 (a / b))\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using hf.mul (hg.inv₀ hy)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝⁴ : GroupWithZero G₀\ninst✝³ : TopologicalSpace G₀\ninst✝² : HasContinuousInv₀ G₀\ninst✝¹ : ContinuousMul G₀\nf✝ g✝ : α → G₀\ninst✝ : T1Space G₀\nf g : α → G₀\nl : Filter α\nx y : G₀\nhg : Tendsto g l (𝓝 y)\nhy : y ≠ 0\n⊢ Tendsto (fun n => f n * g n) l (𝓝 (x * y)) ↔ Tendsto f l (𝓝 x)\n[PROOFSTEP]\nrefine' ⟨fun hfg => _, fun hf => hf.mul hg⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝⁴ : GroupWithZero G₀\ninst✝³ : TopologicalSpace G₀\ninst✝² : HasContinuousInv₀ G₀\ninst✝¹ : ContinuousMul G₀\nf✝ g✝ : α → G₀\ninst✝ : T1Space G₀\nf g : α → G₀\nl : Filter α\nx y : G₀\nhg : Tendsto g l (𝓝 y)\nhy : y ≠ 0\nhfg : Tendsto (fun n => f n * g n) l (𝓝 (x * y))\n⊢ Tendsto f l (𝓝 x)\n[PROOFSTEP]\nrw [← mul_div_cancel x hy]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝⁴ : GroupWithZero G₀\ninst✝³ : TopologicalSpace G₀\ninst✝² : HasContinuousInv₀ G₀\ninst✝¹ : ContinuousMul G₀\nf✝ g✝ : α → G₀\ninst✝ : T1Space G₀\nf g : α → G₀\nl : Filter α\nx y : G₀\nhg : Tendsto g l (𝓝 y)\nhy : y ≠ 0\nhfg : Tendsto (fun n => f n * g n) l (𝓝 (x * y))\n⊢ Tendsto f l (𝓝 (x * y / y))\n[PROOFSTEP]\nrefine' Tendsto.congr' _ (hfg.div hg hy)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝⁴ : GroupWithZero G₀\ninst✝³ : TopologicalSpace G₀\ninst✝² : HasContinuousInv₀ G₀\ninst✝¹ : ContinuousMul G₀\nf✝ g✝ : α → G₀\ninst✝ : T1Space G₀\nf g : α → G₀\nl : Filter α\nx y : G₀\nhg : Tendsto g l (𝓝 y)\nhy : y ≠ 0\nhfg : Tendsto (fun n => f n * g n) l (𝓝 (x * y))\n⊢ (fun n => f n * g n) / g =ᶠ[l] f\n[PROOFSTEP]\nrefine' (hg.eventually_ne hy).mono fun n hn => mul_div_cancel _ hn\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝⁵ : GroupWithZero G₀\ninst✝⁴ : TopologicalSpace G₀\ninst✝³ : HasContinuousInv₀ G₀\ninst✝² : ContinuousMul G₀\nf g : α → G₀\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns : Set α\na : α\nhf : Continuous f\nhg : Continuous g\nh₀ : ∀ (x : α), g x ≠ 0\n⊢ Continuous (f / g)\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using hf.mul (hg.inv₀ h₀)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝⁵ : GroupWithZero G₀\ninst✝⁴ : TopologicalSpace G₀\ninst✝³ : HasContinuousInv₀ G₀\ninst✝² : ContinuousMul G₀\nf✝ g✝ : α → G₀\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns : Set α\na : α\nf g : α → G₀\nh : α → G₀ → β\nhf : ContinuousAt f a\nhg : ContinuousAt g a\nhh : g a ≠ 0 → ContinuousAt (↿h) (a, f a / g a)\nh2h : g a = 0 → Tendsto (↿h) (𝓝 a ×ˢ ⊤) (𝓝 (h a 0))\n⊢ ContinuousAt (fun x => h x (f x / g x)) a\n[PROOFSTEP]\nshow ContinuousAt (↿h ∘ fun x => (x, f x / g x)) a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝⁵ : GroupWithZero G₀\ninst✝⁴ : TopologicalSpace G₀\ninst✝³ : HasContinuousInv₀ G₀\ninst✝² : ContinuousMul G₀\nf✝ g✝ : α → G₀\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns : Set α\na : α\nf g : α → G₀\nh : α → G₀ → β\nhf : ContinuousAt f a\nhg : ContinuousAt g a\nhh : g a ≠ 0 → ContinuousAt (↿h) (a, f a / g a)\nh2h : g a = 0 → Tendsto (↿h) (𝓝 a ×ˢ ⊤) (𝓝 (h a 0))\n⊢ ContinuousAt (↿h ∘ fun x => (x, f x / g x)) a\n[PROOFSTEP]\nby_cases hga : g a = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝⁵ : GroupWithZero G₀\ninst✝⁴ : TopologicalSpace G₀\ninst✝³ : HasContinuousInv₀ G₀\ninst✝² : ContinuousMul G₀\nf✝ g✝ : α → G₀\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns : Set α\na : α\nf g : α → G₀\nh : α → G₀ → β\nhf : ContinuousAt f a\nhg : ContinuousAt g a\nhh : g a ≠ 0 → ContinuousAt (↿h) (a, f a / g a)\nh2h : g a = 0 → Tendsto (↿h) (𝓝 a ×ˢ ⊤) (𝓝 (h a 0))\nhga : g a = 0\n⊢ ContinuousAt (↿h ∘ fun x => (x, f x / g x)) a\n[PROOFSTEP]\nrw [ContinuousAt]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝⁵ : GroupWithZero G₀\ninst✝⁴ : TopologicalSpace G₀\ninst✝³ : HasContinuousInv₀ G₀\ninst✝² : ContinuousMul G₀\nf✝ g✝ : α → G₀\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns : Set α\na : α\nf g : α → G₀\nh : α → G₀ → β\nhf : ContinuousAt f a\nhg : ContinuousAt g a\nhh : g a ≠ 0 → ContinuousAt (↿h) (a, f a / g a)\nh2h : g a = 0 → Tendsto (↿h) (𝓝 a ×ˢ ⊤) (𝓝 (h a 0))\nhga : g a = 0\n⊢ Tendsto (↿h ∘ fun x => (x, f x / g x)) (𝓝 a) (𝓝 ((↿h ∘ fun x => (x, f x / g x)) a))\n[PROOFSTEP]\nsimp_rw [comp_apply, hga, div_zero]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝⁵ : GroupWithZero G₀\ninst✝⁴ : TopologicalSpace G₀\ninst✝³ : HasContinuousInv₀ G₀\ninst✝² : ContinuousMul G₀\nf✝ g✝ : α → G₀\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns : Set α\na : α\nf g : α → G₀\nh : α → G₀ → β\nhf : ContinuousAt f a\nhg : ContinuousAt g a\nhh : g a ≠ 0 → ContinuousAt (↿h) (a, f a / g a)\nh2h : g a = 0 → Tendsto (↿h) (𝓝 a ×ˢ ⊤) (𝓝 (h a 0))\nhga : g a = 0\n⊢ Tendsto (↿h ∘ fun x => (x, f x / g x)) (𝓝 a) (𝓝 ((↿h) (a, 0)))\n[PROOFSTEP]\nexact (h2h hga).comp (continuousAt_id.prod_mk tendsto_top)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝⁵ : GroupWithZero G₀\ninst✝⁴ : TopologicalSpace G₀\ninst✝³ : HasContinuousInv₀ G₀\ninst✝² : ContinuousMul G₀\nf✝ g✝ : α → G₀\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns : Set α\na : α\nf g : α → G₀\nh : α → G₀ → β\nhf : ContinuousAt f a\nhg : ContinuousAt g a\nhh : g a ≠ 0 → ContinuousAt (↿h) (a, f a / g a)\nh2h : g a = 0 → Tendsto (↿h) (𝓝 a ×ˢ ⊤) (𝓝 (h a 0))\nhga : ¬g a = 0\n⊢ ContinuousAt (↿h ∘ fun x => (x, f x / g x)) a\n[PROOFSTEP]\nexact ContinuousAt.comp (hh hga) (continuousAt_id.prod (hf.div hg hga))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝² : TopologicalSpace G₀\ninst✝¹ : GroupWithZero G₀\ninst✝ : ContinuousMul G₀\na : G₀\nha : a ≠ 0\n⊢ map (fun x => a * x) (𝓝 1) = 𝓝 a\n[PROOFSTEP]\nrw [map_mul_left_nhds₀ ha, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝² : TopologicalSpace G₀\ninst✝¹ : GroupWithZero G₀\ninst✝ : ContinuousMul G₀\na : G₀\nha : a ≠ 0\n⊢ map (fun x => x * a) (𝓝 1) = 𝓝 a\n[PROOFSTEP]\nrw [map_mul_right_nhds₀ ha, one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝² : TopologicalSpace G₀\ninst✝¹ : GroupWithZero G₀\ninst✝ : ContinuousMul G₀\na : G₀\nha : a ≠ 0\n⊢ 𝓝 (↑(Homeomorph.symm (Homeomorph.symm (Homeomorph.mulRight₀ a ha))) 1) = 𝓝 a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝² : TopologicalSpace G₀\ninst✝¹ : GroupWithZero G₀\ninst✝ : ContinuousMul G₀\na : G₀\nh : Tendsto Inv.inv (𝓝 1) (𝓝 1)\nx : G₀\nhx : x ≠ 0\n⊢ ContinuousAt Inv.inv x\n[PROOFSTEP]\nhave hx' := inv_ne_zero hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝² : TopologicalSpace G₀\ninst✝¹ : GroupWithZero G₀\ninst✝ : ContinuousMul G₀\na : G₀\nh : Tendsto Inv.inv (𝓝 1) (𝓝 1)\nx : G₀\nhx : x ≠ 0\nhx' : x⁻¹ ≠ 0\n⊢ ContinuousAt Inv.inv x\n[PROOFSTEP]\nrw [ContinuousAt, ← map_mul_left_nhds_one₀ hx, ← nhds_translation_mul_inv₀ hx', tendsto_map'_iff, tendsto_comap_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝² : TopologicalSpace G₀\ninst✝¹ : GroupWithZero G₀\ninst✝ : ContinuousMul G₀\na : G₀\nh : Tendsto Inv.inv (𝓝 1) (𝓝 1)\nx : G₀\nhx : x ≠ 0\nhx' : x⁻¹ ≠ 0\n⊢ Tendsto ((fun x_1 => x_1 * x⁻¹⁻¹) ∘ Inv.inv ∘ fun x_1 => x * x_1) (𝓝 1) (𝓝 1)\n[PROOFSTEP]\nsimpa only [(· ∘ ·), mul_inv_rev, mul_inv_cancel_right₀ hx']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝³ : GroupWithZero G₀\ninst✝² : TopologicalSpace G₀\ninst✝¹ : HasContinuousInv₀ G₀\ninst✝ : ContinuousMul G₀\nx : G₀\nm : ℤ\nh : x ≠ 0 ∨ 0 ≤ m\n⊢ ContinuousAt (fun x => x ^ m) x\n[PROOFSTEP]\ncases' m with m m\n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝³ : GroupWithZero G₀\ninst✝² : TopologicalSpace G₀\ninst✝¹ : HasContinuousInv₀ G₀\ninst✝ : ContinuousMul G₀\nx : G₀\nm : ℕ\nh : x ≠ 0 ∨ 0 ≤ Int.ofNat m\n⊢ ContinuousAt (fun x => x ^ Int.ofNat m) x\n[PROOFSTEP]\nsimpa only [Int.ofNat_eq_coe, zpow_coe_nat] using continuousAt_pow x m\n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝³ : GroupWithZero G₀\ninst✝² : TopologicalSpace G₀\ninst✝¹ : HasContinuousInv₀ G₀\ninst✝ : ContinuousMul G₀\nx : G₀\nm : ℕ\nh : x ≠ 0 ∨ 0 ≤ Int.negSucc m\n⊢ ContinuousAt (fun x => x ^ Int.negSucc m) x\n[PROOFSTEP]\nsimp only [zpow_negSucc]\n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝³ : GroupWithZero G₀\ninst✝² : TopologicalSpace G₀\ninst✝¹ : HasContinuousInv₀ G₀\ninst✝ : ContinuousMul G₀\nx : G₀\nm : ℕ\nh : x ≠ 0 ∨ 0 ≤ Int.negSucc m\n⊢ ContinuousAt (fun x => (x ^ (m + 1))⁻¹) x\n[PROOFSTEP]\nhave hx : x ≠ 0 := h.resolve_right (Int.negSucc_lt_zero m).not_le\n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\nG₀ : Type u_3\ninst✝³ : GroupWithZero G₀\ninst✝² : TopologicalSpace G₀\ninst✝¹ : HasContinuousInv₀ G₀\ninst✝ : ContinuousMul G₀\nx : G₀\nm : ℕ\nh : x ≠ 0 ∨ 0 ≤ Int.negSucc m\nhx : x ≠ 0\n⊢ ContinuousAt (fun x => (x ^ (m + 1))⁻¹) x\n[PROOFSTEP]\nexact (continuousAt_pow x (m + 1)).inv₀ (pow_ne_zero _ hx)\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.GroupWithZero", "llama_tokens": 5164, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6791786861878392, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.3634274477357992}}
{"text": "[GOAL]\nk G✝ : Type u\ninst✝² : CommRing k\nn✝ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn : ℕ\nf : Fin (n + 1) → G\n⊢ Hom.hom (actionDiagonalSucc G n).hom f = (f 0, fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i))\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nk G✝ : Type u\ninst✝² : CommRing k\nn✝ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn : ℕ\nf✝ : Fin (n + 1) → G\nf : Fin (Nat.zero + 1) → G\n⊢ Hom.hom (actionDiagonalSucc G Nat.zero).hom f = (f 0, fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i))\n[PROOFSTEP]\nexact Prod.ext rfl (funext fun x => Fin.elim0 x)\n[GOAL]\ncase succ\nk G✝ : Type u\ninst✝² : CommRing k\nn✝¹ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn✝ : ℕ\nf✝ : Fin (n✝ + 1) → G\nn : ℕ\nhn :\n  ∀ (f : Fin (n + 1) → G),\n    Hom.hom (actionDiagonalSucc G n).hom f = (f 0, fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i))\nf : Fin (Nat.succ n + 1) → G\n⊢ Hom.hom (actionDiagonalSucc G (Nat.succ n)).hom f = (f 0, fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i))\n[PROOFSTEP]\nrefine'\n  Prod.ext rfl\n    (funext fun x => _)\n      /- Porting note: broken proof was\n          · dsimp only [actionDiagonalSucc]\n            simp only [Iso.trans_hom, comp_hom, types_comp_apply, diagonalSucc_hom_hom,\n              leftRegularTensorIso_hom_hom, tensorIso_hom, mkIso_hom_hom, Equiv.toIso_hom,\n              Action.tensorHom, Equiv.piFinSuccAboveEquiv_symm_apply, tensor_apply, types_id_apply,\n              tensor_rho, MonoidHom.one_apply, End.one_def, hn fun j : Fin (n + 1) => f j.succ,\n              Fin.insertNth_zero']\n            refine' Fin.cases (Fin.cons_zero _ _) (fun i => _) x\n            · simp only [Fin.cons_succ, mul_left_inj, inv_inj, Fin.castSucc_fin_succ] -/\n[GOAL]\ncase succ\nk G✝ : Type u\ninst✝² : CommRing k\nn✝¹ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn✝ : ℕ\nf✝ : Fin (n✝ + 1) → G\nn : ℕ\nhn :\n  ∀ (f : Fin (n + 1) → G),\n    Hom.hom (actionDiagonalSucc G n).hom f = (f 0, fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i))\nf : Fin (Nat.succ n + 1) → G\nx : Fin (Nat.succ n)\n⊢ Prod.snd (Hom.hom (actionDiagonalSucc G (Nat.succ n)).hom f) x =\n    Prod.snd (f 0, fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i)) x\n[PROOFSTEP]\ndsimp [actionDiagonalSucc]\n[GOAL]\ncase succ\nk G✝ : Type u\ninst✝² : CommRing k\nn✝¹ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn✝ : ℕ\nf✝ : Fin (n✝ + 1) → G\nn : ℕ\nhn :\n  ∀ (f : Fin (n + 1) → G),\n    Hom.hom (actionDiagonalSucc G n).hom f = (f 0, fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i))\nf : Fin (Nat.succ n + 1) → G\nx : Fin (Nat.succ n)\n⊢ ↑(Equiv.piFinSuccAboveEquiv (fun x => G) 0).symm\n      (↑(FunctorCategoryEquivalence.inverse.obj\n              (FunctorCategoryEquivalence.functor.obj (leftRegular G) ⊗\n                FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 })).ρ\n        (↑(Equiv.piFinSuccAboveEquiv (fun a => G) 0) f).fst⁻¹\n        (Hom.hom (actionDiagonalSucc G n).hom (↑(Equiv.piFinSuccAboveEquiv (fun a => G) 0) f).snd))\n      x =\n    (f (Fin.castSucc x))⁻¹ * f (Fin.succ x)\n[PROOFSTEP]\nerw [hn (fun (j : Fin (n + 1)) => f j.succ)]\n[GOAL]\ncase succ\nk G✝ : Type u\ninst✝² : CommRing k\nn✝¹ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn✝ : ℕ\nf✝ : Fin (n✝ + 1) → G\nn : ℕ\nhn :\n  ∀ (f : Fin (n + 1) → G),\n    Hom.hom (actionDiagonalSucc G n).hom f = (f 0, fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i))\nf : Fin (Nat.succ n + 1) → G\nx : Fin (Nat.succ n)\n⊢ ↑(Equiv.piFinSuccAboveEquiv (fun x => G) 0).symm\n      (↑(FunctorCategoryEquivalence.inverse.obj\n              (FunctorCategoryEquivalence.functor.obj (leftRegular G) ⊗\n                FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 })).ρ\n        (↑(Equiv.piFinSuccAboveEquiv (fun a => G) 0) f).fst⁻¹\n        (f (Fin.succ 0), fun i => (f (Fin.succ (Fin.castSucc i)))⁻¹ * f (Fin.succ (Fin.succ i))))\n      x =\n    (f (Fin.castSucc x))⁻¹ * f (Fin.succ x)\n[PROOFSTEP]\nexact Fin.cases rfl (fun i => rfl) x\n[GOAL]\nk G✝ : Type u\ninst✝² : CommRing k\nn✝ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn : ℕ\ng : G\nf : Fin n → G\n⊢ Hom.hom (actionDiagonalSucc G n).inv (g, f) = g • partialProd f\n[PROOFSTEP]\nrevert g\n[GOAL]\nk G✝ : Type u\ninst✝² : CommRing k\nn✝ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn : ℕ\nf : Fin n → G\n⊢ ∀ (g : G), Hom.hom (actionDiagonalSucc G n).inv (g, f) = g • partialProd f\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nk G✝ : Type u\ninst✝² : CommRing k\nn✝ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn : ℕ\nf✝ : Fin n → G\nf : Fin Nat.zero → G\n⊢ ∀ (g : G), Hom.hom (actionDiagonalSucc G Nat.zero).inv (g, f) = g • partialProd f\n[PROOFSTEP]\nintro g\n[GOAL]\ncase zero\nk G✝ : Type u\ninst✝² : CommRing k\nn✝ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn : ℕ\nf✝ : Fin n → G\nf : Fin Nat.zero → G\ng : G\n⊢ Hom.hom (actionDiagonalSucc G Nat.zero).inv (g, f) = g • partialProd f\n[PROOFSTEP]\nfunext (x : Fin 1)\n[GOAL]\ncase zero.h\nk G✝ : Type u\ninst✝² : CommRing k\nn✝ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn : ℕ\nf✝ : Fin n → G\nf : Fin Nat.zero → G\ng : G\nx : Fin 1\n⊢ Hom.hom (actionDiagonalSucc G Nat.zero).inv (g, f) x = (g • partialProd f) x\n[PROOFSTEP]\nsimp only [Subsingleton.elim x 0, Pi.smul_apply, Fin.partialProd_zero, smul_eq_mul, mul_one]\n[GOAL]\ncase zero.h\nk G✝ : Type u\ninst✝² : CommRing k\nn✝ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn : ℕ\nf✝ : Fin n → G\nf : Fin Nat.zero → G\ng : G\nx : Fin 1\n⊢ Hom.hom (actionDiagonalSucc G Nat.zero).inv (g, f) 0 = g\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nk G✝ : Type u\ninst✝² : CommRing k\nn✝¹ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn✝ : ℕ\nf✝ : Fin n✝ → G\nn : ℕ\nhn : ∀ (f : Fin n → G) (g : G), Hom.hom (actionDiagonalSucc G n).inv (g, f) = g • partialProd f\nf : Fin (Nat.succ n) → G\n⊢ ∀ (g : G), Hom.hom (actionDiagonalSucc G (Nat.succ n)).inv (g, f) = g • partialProd f\n[PROOFSTEP]\nintro g\n[GOAL]\ncase succ\nk G✝ : Type u\ninst✝² : CommRing k\nn✝¹ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn✝ : ℕ\nf✝ : Fin n✝ → G\nn : ℕ\nhn : ∀ (f : Fin n → G) (g : G), Hom.hom (actionDiagonalSucc G n).inv (g, f) = g • partialProd f\nf : Fin (Nat.succ n) → G\ng : G\n⊢ Hom.hom (actionDiagonalSucc G (Nat.succ n)).inv (g, f) = g • partialProd f\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase succ.h\nk G✝ : Type u\ninst✝² : CommRing k\nn✝¹ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn✝ : ℕ\nf✝ : Fin n✝ → G\nn : ℕ\nhn : ∀ (f : Fin n → G) (g : G), Hom.hom (actionDiagonalSucc G n).inv (g, f) = g • partialProd f\nf : Fin (Nat.succ n) → G\ng : G\nx : Fin (Nat.succ n + 1)\n⊢ Hom.hom (actionDiagonalSucc G (Nat.succ n)).inv (g, f) x = (g • partialProd f) x\n[PROOFSTEP]\ndsimp [actionDiagonalSucc]\n[GOAL]\ncase succ.h\nk G✝ : Type u\ninst✝² : CommRing k\nn✝¹ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn✝ : ℕ\nf✝ : Fin n✝ → G\nn : ℕ\nhn : ∀ (f : Fin n → G) (g : G), Hom.hom (actionDiagonalSucc G n).inv (g, f) = g • partialProd f\nf : Fin (Nat.succ n) → G\ng : G\nx : Fin (Nat.succ n + 1)\n⊢ ↑(Equiv.piFinSuccAboveEquiv (fun a => G) 0).symm\n      (g,\n        Hom.hom (actionDiagonalSucc G n).inv\n          (↑(FunctorCategoryEquivalence.inverse.obj\n                  (FunctorCategoryEquivalence.functor.obj (leftRegular G) ⊗\n                    FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 })).ρ\n            g (↑(Equiv.piFinSuccAboveEquiv (fun x => G) 0) f)))\n      x =\n    g * partialProd f x\n[PROOFSTEP]\nerw [hn, Equiv.piFinSuccAboveEquiv_symm_apply]\n[GOAL]\ncase succ.h\nk G✝ : Type u\ninst✝² : CommRing k\nn✝¹ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn✝ : ℕ\nf✝ : Fin n✝ → G\nn : ℕ\nhn : ∀ (f : Fin n → G) (g : G), Hom.hom (actionDiagonalSucc G n).inv (g, f) = g • partialProd f\nf : Fin (Nat.succ n) → G\ng : G\nx : Fin (Nat.succ n + 1)\n⊢ (fun f => Fin.insertNth 0 f.fst f.snd)\n      (g,\n        Limits.BinaryFan.fst\n            (Limits.BinaryFan.mk\n              (NatTrans.app\n                  (Limits.Types.binaryProductLimitCone\n                        ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                        ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                  { as := Limits.WalkingPair.left } ≫\n                (FunctorCategoryEquivalence.functor.obj (leftRegular G)).map g)\n              (NatTrans.app\n                  (Limits.Types.binaryProductLimitCone\n                        ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                        ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                  { as := Limits.WalkingPair.right } ≫\n                (FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).map g))\n            (↑(Equiv.piFinSuccAboveEquiv (fun x => G) 0) f) •\n          partialProd\n            (Limits.BinaryFan.snd\n              (Limits.BinaryFan.mk\n                (NatTrans.app\n                    (Limits.Types.binaryProductLimitCone\n                          ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                          ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                    { as := Limits.WalkingPair.left } ≫\n                  (FunctorCategoryEquivalence.functor.obj (leftRegular G)).map g)\n                (NatTrans.app\n                    (Limits.Types.binaryProductLimitCone\n                          ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                          ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                    { as := Limits.WalkingPair.right } ≫\n                  (FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).map g))\n              (↑(Equiv.piFinSuccAboveEquiv (fun x => G) 0) f)))\n      x =\n    g * partialProd f x\n[PROOFSTEP]\nrefine' Fin.cases _ (fun i => _) x\n[GOAL]\ncase succ.h.refine'_1\nk G✝ : Type u\ninst✝² : CommRing k\nn✝¹ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn✝ : ℕ\nf✝ : Fin n✝ → G\nn : ℕ\nhn : ∀ (f : Fin n → G) (g : G), Hom.hom (actionDiagonalSucc G n).inv (g, f) = g • partialProd f\nf : Fin (Nat.succ n) → G\ng : G\nx : Fin (Nat.succ n + 1)\n⊢ (fun f => Fin.insertNth 0 f.fst f.snd)\n      (g,\n        Limits.BinaryFan.fst\n            (Limits.BinaryFan.mk\n              (NatTrans.app\n                  (Limits.Types.binaryProductLimitCone\n                        ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                        ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                  { as := Limits.WalkingPair.left } ≫\n                (FunctorCategoryEquivalence.functor.obj (leftRegular G)).map g)\n              (NatTrans.app\n                  (Limits.Types.binaryProductLimitCone\n                        ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                        ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                  { as := Limits.WalkingPair.right } ≫\n                (FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).map g))\n            (↑(Equiv.piFinSuccAboveEquiv (fun x => G) 0) f) •\n          partialProd\n            (Limits.BinaryFan.snd\n              (Limits.BinaryFan.mk\n                (NatTrans.app\n                    (Limits.Types.binaryProductLimitCone\n                          ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                          ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                    { as := Limits.WalkingPair.left } ≫\n                  (FunctorCategoryEquivalence.functor.obj (leftRegular G)).map g)\n                (NatTrans.app\n                    (Limits.Types.binaryProductLimitCone\n                          ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                          ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                    { as := Limits.WalkingPair.right } ≫\n                  (FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).map g))\n              (↑(Equiv.piFinSuccAboveEquiv (fun x => G) 0) f)))\n      0 =\n    g * partialProd f 0\n[PROOFSTEP]\nsimp only [Fin.insertNth_zero, Fin.cons_zero, Fin.partialProd_zero, mul_one]\n[GOAL]\ncase succ.h.refine'_2\nk G✝ : Type u\ninst✝² : CommRing k\nn✝¹ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn✝ : ℕ\nf✝ : Fin n✝ → G\nn : ℕ\nhn : ∀ (f : Fin n → G) (g : G), Hom.hom (actionDiagonalSucc G n).inv (g, f) = g • partialProd f\nf : Fin (Nat.succ n) → G\ng : G\nx : Fin (Nat.succ n + 1)\ni : Fin (n + 1)\n⊢ (fun f => Fin.insertNth 0 f.fst f.snd)\n      (g,\n        Limits.BinaryFan.fst\n            (Limits.BinaryFan.mk\n              (NatTrans.app\n                  (Limits.Types.binaryProductLimitCone\n                        ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                        ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                  { as := Limits.WalkingPair.left } ≫\n                (FunctorCategoryEquivalence.functor.obj (leftRegular G)).map g)\n              (NatTrans.app\n                  (Limits.Types.binaryProductLimitCone\n                        ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                        ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                  { as := Limits.WalkingPair.right } ≫\n                (FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).map g))\n            (↑(Equiv.piFinSuccAboveEquiv (fun x => G) 0) f) •\n          partialProd\n            (Limits.BinaryFan.snd\n              (Limits.BinaryFan.mk\n                (NatTrans.app\n                    (Limits.Types.binaryProductLimitCone\n                          ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                          ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                    { as := Limits.WalkingPair.left } ≫\n                  (FunctorCategoryEquivalence.functor.obj (leftRegular G)).map g)\n                (NatTrans.app\n                    (Limits.Types.binaryProductLimitCone\n                          ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                          ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                    { as := Limits.WalkingPair.right } ≫\n                  (FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).map g))\n              (↑(Equiv.piFinSuccAboveEquiv (fun x => G) 0) f)))\n      (Fin.succ i) =\n    g * partialProd f (Fin.succ i)\n[PROOFSTEP]\nsimp only [Fin.cons_succ, Pi.smul_apply, smul_eq_mul, Fin.partialProd_succ', ← mul_assoc]\n[GOAL]\ncase succ.h.refine'_2\nk G✝ : Type u\ninst✝² : CommRing k\nn✝¹ : ℕ\ninst✝¹ : Group G✝\nG : Type u\ninst✝ : Group G\nn✝ : ℕ\nf✝ : Fin n✝ → G\nn : ℕ\nhn : ∀ (f : Fin n → G) (g : G), Hom.hom (actionDiagonalSucc G n).inv (g, f) = g • partialProd f\nf : Fin (Nat.succ n) → G\ng : G\nx : Fin (Nat.succ n + 1)\ni : Fin (n + 1)\n⊢ Fin.insertNth 0 g\n      (Limits.BinaryFan.fst\n          (Limits.BinaryFan.mk\n            (NatTrans.app\n                (Limits.Types.binaryProductLimitCone\n                      ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                      ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                { as := Limits.WalkingPair.left } ≫\n              (FunctorCategoryEquivalence.functor.obj (leftRegular G)).map g)\n            (NatTrans.app\n                (Limits.Types.binaryProductLimitCone\n                      ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                      ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                { as := Limits.WalkingPair.right } ≫\n              (FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).map g))\n          (↑(Equiv.piFinSuccAboveEquiv (fun x => G) 0) f) •\n        partialProd\n          (Limits.BinaryFan.snd\n            (Limits.BinaryFan.mk\n              (NatTrans.app\n                  (Limits.Types.binaryProductLimitCone\n                        ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                        ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                  { as := Limits.WalkingPair.left } ≫\n                (FunctorCategoryEquivalence.functor.obj (leftRegular G)).map g)\n              (NatTrans.app\n                  (Limits.Types.binaryProductLimitCone\n                        ((FunctorCategoryEquivalence.functor.obj (leftRegular G)).obj PUnit.unit)\n                        ((FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).obj PUnit.unit)).cone.π\n                  { as := Limits.WalkingPair.right } ≫\n                (FunctorCategoryEquivalence.functor.obj { V := Fin n → G, ρ := 1 }).map g))\n            (↑(Equiv.piFinSuccAboveEquiv (fun x => G) 0) f)))\n      (Fin.succ i) =\n    g * f 0 * partialProd (Fin.tail f) i\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nf : Fin (n + 1) → G\na : k\n⊢ ↑(diagonalSucc k G n).hom.hom (single f a) =\n    single (f 0) 1 ⊗ₜ[k] single (fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i)) a\n[PROOFSTEP]\nchange\n  (𝟙 ((linearization k G).1.obj (Action.leftRegular G)).V ⊗ (linearizationTrivialIso k G (Fin n → G)).hom.hom)\n      ((inv ((linearization k G).μ (Action.leftRegular G) { V := Fin n → G, ρ := 1 })).hom\n        ((lmapDomain k k (actionDiagonalSucc G n).hom.hom) (single f a))) =\n    _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nf : Fin (n + 1) → G\na : k\n⊢ ↑(𝟙 ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj (Action.leftRegular G)).V ⊗\n          (linearizationTrivialIso k G (Fin n → G)).hom.hom)\n      (↑(inv\n              (LaxMonoidalFunctor.μ (linearization k G).toLaxMonoidalFunctor (Action.leftRegular G)\n                { V := Fin n → G, ρ := 1 })).hom\n        (↑(lmapDomain k k (actionDiagonalSucc G n).hom.hom) (single f a))) =\n    single (f 0) 1 ⊗ₜ[k] single (fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i)) a\n[PROOFSTEP]\nsimp only [CategoryTheory.Functor.map_id, linearization_μ_inv_hom]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nf : Fin (n + 1) → G\na : k\n⊢ ↑(𝟙 ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj (Action.leftRegular G)).V ⊗\n          (linearizationTrivialIso k G (Fin n → G)).hom.hom)\n      (↑↑(LinearEquiv.symm (finsuppTensorFinsupp' k (Action.leftRegular G).V (Fin n → G)))\n        (↑(lmapDomain k k (actionDiagonalSucc G n).hom.hom) (single f a))) =\n    single (f 0) 1 ⊗ₜ[k] single (fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i)) a\n[PROOFSTEP]\nrw [lmapDomain_apply, mapDomain_single, LinearEquiv.coe_toLinearMap, finsuppTensorFinsupp', LinearEquiv.trans_symm,\n  LinearEquiv.trans_apply, lcongr_symm, Equiv.refl_symm]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nf : Fin (n + 1) → G\na : k\n⊢ ↑(𝟙 ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj (Action.leftRegular G)).V ⊗\n          (linearizationTrivialIso k G (Fin n → G)).hom.hom)\n      (↑(LinearEquiv.symm (finsuppTensorFinsupp k k k (Action.leftRegular G).V (Fin n → G)))\n        (↑(lcongr (Equiv.refl ((Action.leftRegular G).V × (Fin n → G))) (LinearEquiv.symm (TensorProduct.lid k k)))\n          (single (Action.Hom.hom (actionDiagonalSucc G n).hom f) a))) =\n    single (f 0) 1 ⊗ₜ[k] single (fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i)) a\n[PROOFSTEP]\nerw [lcongr_single]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nf : Fin (n + 1) → G\na : k\n⊢ ↑(𝟙 ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj (Action.leftRegular G)).V ⊗\n          (linearizationTrivialIso k G (Fin n → G)).hom.hom)\n      (↑(LinearEquiv.symm (finsuppTensorFinsupp k k k (Action.leftRegular G).V (Fin n → G)))\n        (single (↑(Equiv.refl ((Action.leftRegular G).V × (Fin n → G))) (Action.Hom.hom (actionDiagonalSucc G n).hom f))\n          (↑(LinearEquiv.symm (TensorProduct.lid k k)) a))) =\n    single (f 0) 1 ⊗ₜ[k] single (fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i)) a\n[PROOFSTEP]\nrw [TensorProduct.lid_symm_apply, actionDiagonalSucc_hom_apply, finsuppTensorFinsupp_symm_single]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nf : Fin (n + 1) → G\na : k\n⊢ ↑(𝟙 ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj (Action.leftRegular G)).V ⊗\n          (linearizationTrivialIso k G (Fin n → G)).hom.hom)\n      (single\n          (↑(Equiv.refl ((Action.leftRegular G).V × (Fin n → G)))\n              (f 0, fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i))).fst\n          1 ⊗ₜ[k]\n        single\n          (↑(Equiv.refl ((Action.leftRegular G).V × (Fin n → G)))\n              (f 0, fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i))).snd\n          a) =\n    single (f 0) 1 ⊗ₜ[k] single (fun i => (f (Fin.castSucc i))⁻¹ * f (Fin.succ i)) a\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G\nf : Fin n → G\na b : k\n⊢ ↑(diagonalSucc k G n).inv.hom (single g a ⊗ₜ[k] single f b) = single (g • partialProd f) (a * b)\n[PROOFSTEP]\nchange\n  mapDomain (actionDiagonalSucc G n).inv.hom\n      (lcongr (Equiv.refl (G × (Fin n → G))) (TensorProduct.lid k k)\n        (finsuppTensorFinsupp k k k G (Fin n → G) (single g a ⊗ₜ[k] single f b))) =\n    single (g • partialProd f) (a * b)\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G\nf : Fin n → G\na b : k\n⊢ mapDomain (actionDiagonalSucc G n).inv.hom\n      (↑(lcongr (Equiv.refl (G × (Fin n → G))) (TensorProduct.lid k k))\n        (↑(finsuppTensorFinsupp k k k G (Fin n → G)) (single g a ⊗ₜ[k] single f b))) =\n    single (g • partialProd f) (a * b)\n[PROOFSTEP]\nrw [finsuppTensorFinsupp_single, lcongr_single, mapDomain_single, Equiv.refl_apply, actionDiagonalSucc_inv_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G\nf : Fin n → G\na b : k\n⊢ single (g • partialProd f) (↑(TensorProduct.lid k k) (a ⊗ₜ[k] b)) = single (g • partialProd f) (a * b)\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G\nf : (Fin n → G) →₀ k\nr : k\n⊢ ↑(diagonalSucc k G n).inv.hom (single g r ⊗ₜ[k] f) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => single (g • partialProd f) r) f\n[PROOFSTEP]\nrefine'\n  f.induction _\n    _\n      /- Porting note: broken proof was\n        · simp only [TensorProduct.tmul_zero, map_zero]\n        · intro a b x ha hb hx\n          simp only [lift_apply, smul_single', mul_one, TensorProduct.tmul_add, map_add,\n            diagonalSucc_inv_single_single, hx, Finsupp.sum_single_index, mul_comm b,\n            zero_mul, single_zero] -/\n[GOAL]\ncase refine'_1\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G\nf : (Fin n → G) →₀ k\nr : k\n⊢ ↑(diagonalSucc k G n).inv.hom (single g r ⊗ₜ[k] 0) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => single (g • partialProd f) r) 0\n[PROOFSTEP]\nrw [TensorProduct.tmul_zero, map_zero, map_zero]\n[GOAL]\ncase refine'_2\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G\nf : (Fin n → G) →₀ k\nr : k\n⊢ ∀ (a : Fin n → G) (b : k) (f : (Fin n → G) →₀ k),\n    ¬a ∈ f.support →\n      b ≠ 0 →\n        ↑(diagonalSucc k G n).inv.hom (single g r ⊗ₜ[k] f) =\n            ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => single (g • partialProd f) r) f →\n          ↑(diagonalSucc k G n).inv.hom (single g r ⊗ₜ[k] (single a b + f)) =\n            ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => single (g • partialProd f) r)\n              (single a b + f)\n[PROOFSTEP]\nintro _ _ _ _ _ hx\n[GOAL]\ncase refine'_2\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G\nf : (Fin n → G) →₀ k\nr : k\na✝² : Fin n → G\nb✝ : k\nf✝ : (Fin n → G) →₀ k\na✝¹ : ¬a✝² ∈ f✝.support\na✝ : b✝ ≠ 0\nhx :\n  ↑(diagonalSucc k G n).inv.hom (single g r ⊗ₜ[k] f✝) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => single (g • partialProd f) r) f✝\n⊢ ↑(diagonalSucc k G n).inv.hom (single g r ⊗ₜ[k] (single a✝² b✝ + f✝)) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => single (g • partialProd f) r) (single a✝² b✝ + f✝)\n[PROOFSTEP]\nrw [TensorProduct.tmul_add, map_add, map_add, hx]\n[GOAL]\ncase refine'_2\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G\nf : (Fin n → G) →₀ k\nr : k\na✝² : Fin n → G\nb✝ : k\nf✝ : (Fin n → G) →₀ k\na✝¹ : ¬a✝² ∈ f✝.support\na✝ : b✝ ≠ 0\nhx :\n  ↑(diagonalSucc k G n).inv.hom (single g r ⊗ₜ[k] f✝) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => single (g • partialProd f) r) f✝\n⊢ ↑(diagonalSucc k G n).inv.hom (single g r ⊗ₜ[k] single a✝² b✝) +\n      ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => single (g • partialProd f) r) f✝ =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => single (g • partialProd f) r) (single a✝² b✝) +\n      ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => single (g • partialProd f) r) f✝\n[PROOFSTEP]\nsimp_rw [lift_apply, smul_single, smul_eq_mul, diagonalSucc_inv_single_single]\n[GOAL]\ncase refine'_2\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G\nf : (Fin n → G) →₀ k\nr : k\na✝² : Fin n → G\nb✝ : k\nf✝ : (Fin n → G) →₀ k\na✝¹ : ¬a✝² ∈ f✝.support\na✝ : b✝ ≠ 0\nhx :\n  ↑(diagonalSucc k G n).inv.hom (single g r ⊗ₜ[k] f✝) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => single (g • partialProd f) r) f✝\n⊢ (single (g • partialProd a✝²) (r * b✝) + sum f✝ fun x r_1 => single (g • partialProd x) (r_1 * r)) =\n    (sum (single a✝² b✝) fun x r_1 => single (g • partialProd x) (r_1 * r)) +\n      sum f✝ fun x r_1 => single (g • partialProd x) (r_1 * r)\n[PROOFSTEP]\nrw [sum_single_index, mul_comm]\n[GOAL]\ncase refine'_2\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G\nf : (Fin n → G) →₀ k\nr : k\na✝² : Fin n → G\nb✝ : k\nf✝ : (Fin n → G) →₀ k\na✝¹ : ¬a✝² ∈ f✝.support\na✝ : b✝ ≠ 0\nhx :\n  ↑(diagonalSucc k G n).inv.hom (single g r ⊗ₜ[k] f✝) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k (Fin n → G)) fun f => single (g • partialProd f) r) f✝\n⊢ single (g • partialProd a✝²) (0 * r) = 0\n[PROOFSTEP]\nrw [zero_mul, single_zero]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G →₀ k\nf : Fin n → G\nr : k\n⊢ ↑(diagonalSucc k G n).inv.hom (g ⊗ₜ[k] single f r) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => single (a • partialProd f) r) g\n[PROOFSTEP]\nrefine'\n  g.induction _\n    _\n      /- Porting note: broken proof was\n        · simp only [TensorProduct.zero_tmul, map_zero]\n        · intro a b x ha hb hx\n          simp only [lift_apply, smul_single', map_add, hx, diagonalSucc_inv_single_single,\n            TensorProduct.add_tmul, Finsupp.sum_single_index, zero_mul, single_zero] -/\n[GOAL]\ncase refine'_1\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G →₀ k\nf : Fin n → G\nr : k\n⊢ ↑(diagonalSucc k G n).inv.hom (0 ⊗ₜ[k] single f r) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => single (a • partialProd f) r) 0\n[PROOFSTEP]\nrw [TensorProduct.zero_tmul, map_zero, map_zero]\n[GOAL]\ncase refine'_2\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G →₀ k\nf : Fin n → G\nr : k\n⊢ ∀ (a : G) (b : k) (f_1 : G →₀ k),\n    ¬a ∈ f_1.support →\n      b ≠ 0 →\n        ↑(diagonalSucc k G n).inv.hom (f_1 ⊗ₜ[k] single f r) =\n            ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => single (a • partialProd f) r) f_1 →\n          ↑(diagonalSucc k G n).inv.hom ((single a b + f_1) ⊗ₜ[k] single f r) =\n            ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => single (a • partialProd f) r) (single a b + f_1)\n[PROOFSTEP]\nintro _ _ _ _ _ hx\n[GOAL]\ncase refine'_2\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G →₀ k\nf : Fin n → G\nr : k\na✝² : G\nb✝ : k\nf✝ : G →₀ k\na✝¹ : ¬a✝² ∈ f✝.support\na✝ : b✝ ≠ 0\nhx :\n  ↑(diagonalSucc k G n).inv.hom (f✝ ⊗ₜ[k] single f r) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => single (a • partialProd f) r) f✝\n⊢ ↑(diagonalSucc k G n).inv.hom ((single a✝² b✝ + f✝) ⊗ₜ[k] single f r) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => single (a • partialProd f) r) (single a✝² b✝ + f✝)\n[PROOFSTEP]\nrw [TensorProduct.add_tmul, map_add, map_add, hx]\n[GOAL]\ncase refine'_2\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G →₀ k\nf : Fin n → G\nr : k\na✝² : G\nb✝ : k\nf✝ : G →₀ k\na✝¹ : ¬a✝² ∈ f✝.support\na✝ : b✝ ≠ 0\nhx :\n  ↑(diagonalSucc k G n).inv.hom (f✝ ⊗ₜ[k] single f r) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => single (a • partialProd f) r) f✝\n⊢ ↑(diagonalSucc k G n).inv.hom (single a✝² b✝ ⊗ₜ[k] single f r) +\n      ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => single (a • partialProd f) r) f✝ =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => single (a • partialProd f) r) (single a✝² b✝) +\n      ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => single (a • partialProd f) r) f✝\n[PROOFSTEP]\nsimp_rw [lift_apply, smul_single', diagonalSucc_inv_single_single]\n[GOAL]\ncase refine'_2\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G →₀ k\nf : Fin n → G\nr : k\na✝² : G\nb✝ : k\nf✝ : G →₀ k\na✝¹ : ¬a✝² ∈ f✝.support\na✝ : b✝ ≠ 0\nhx :\n  ↑(diagonalSucc k G n).inv.hom (f✝ ⊗ₜ[k] single f r) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => single (a • partialProd f) r) f✝\n⊢ (single (a✝² • partialProd f) (b✝ * r) + sum f✝ fun x r_1 => single (x • partialProd f) (r_1 * r)) =\n    (sum (single a✝² b✝) fun x r_1 => single (x • partialProd f) (r_1 * r)) +\n      sum f✝ fun x r_1 => single (x • partialProd f) (r_1 * r)\n[PROOFSTEP]\nrw [sum_single_index]\n[GOAL]\ncase refine'_2\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\ng : G →₀ k\nf : Fin n → G\nr : k\na✝² : G\nb✝ : k\nf✝ : G →₀ k\na✝¹ : ¬a✝² ∈ f✝.support\na✝ : b✝ ≠ 0\nhx :\n  ↑(diagonalSucc k G n).inv.hom (f✝ ⊗ₜ[k] single f r) =\n    ↑(↑(Finsupp.lift ((Fin (n + 1) → G) →₀ k) k G) fun a => single (a • partialProd f) r) f✝\n⊢ single (a✝² • partialProd f) (0 * r) = 0\n[PROOFSTEP]\nrw [zero_mul, single_zero]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nsrc✝ : ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj\n      (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k))) ≃ₗ[MonoidAlgebra k G]\n  ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj (Rep.diagonal k G (n + 1))) :=\n  Iso.toLinearEquiv (Rep.equivalenceModuleMonoidAlgebra.functor.mapIso (diagonalSucc k G n).symm)\nr : MonoidAlgebra k G\nx : MonoidAlgebra k G ⊗[k] ((Fin n → G) →₀ k)\n⊢ AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id (MonoidAlgebra k G)) r • AddHom.toFun src✝.toAddHom x\n[PROOFSTEP]\nrw [RingHom.id_apply, LinearEquiv.toFun_eq_coe, ← LinearEquiv.map_smul]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nsrc✝ : ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj\n      (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k))) ≃ₗ[MonoidAlgebra k G]\n  ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj (Rep.diagonal k G (n + 1))) :=\n  Iso.toLinearEquiv (Rep.equivalenceModuleMonoidAlgebra.functor.mapIso (diagonalSucc k G n).symm)\nr : MonoidAlgebra k G\nx : MonoidAlgebra k G ⊗[k] ((Fin n → G) →₀ k)\n⊢ ↑src✝ (r • x) = ↑src✝ (r • x)\n[PROOFSTEP]\ncongr 1\n  /- Porting note: broken proof was\n        refine' x.induction_on _ (fun x y => _) fun y z hy hz => _\n        · simp only [smul_zero]\n        · simp only [TensorProduct.smul_tmul']\n          show (r * x) ⊗ₜ y = _\n          rw [← ofMulAction_self_smul_eq_mul, smul_tprod_one_asModule]\n        · rw [smul_add, hz, hy, smul_add] -/\n[GOAL]\ncase h.e_6.h\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nsrc✝ : ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj\n      (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k))) ≃ₗ[MonoidAlgebra k G]\n  ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj (Rep.diagonal k G (n + 1))) :=\n  Iso.toLinearEquiv (Rep.equivalenceModuleMonoidAlgebra.functor.mapIso (diagonalSucc k G n).symm)\nr : MonoidAlgebra k G\nx : MonoidAlgebra k G ⊗[k] ((Fin n → G) →₀ k)\n⊢ r • x = r • x\n[PROOFSTEP]\nshow _ = Representation.asAlgebraHom (tensorObj (Rep.leftRegular k G) (Rep.trivial k G ((Fin n → G) →₀ k))).ρ r _\n[GOAL]\ncase h.e_6.h\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nsrc✝ : ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj\n      (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k))) ≃ₗ[MonoidAlgebra k G]\n  ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj (Rep.diagonal k G (n + 1))) :=\n  Iso.toLinearEquiv (Rep.equivalenceModuleMonoidAlgebra.functor.mapIso (diagonalSucc k G n).symm)\nr : MonoidAlgebra k G\nx : MonoidAlgebra k G ⊗[k] ((Fin n → G) →₀ k)\n⊢ r • x = ↑(↑(asAlgebraHom (Rep.ρ (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k)))) r) x\n[PROOFSTEP]\nrefine' x.induction_on _ (fun x y => _) fun y z hy hz => _\n[GOAL]\ncase h.e_6.h.refine'_1\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nsrc✝ : ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj\n      (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k))) ≃ₗ[MonoidAlgebra k G]\n  ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj (Rep.diagonal k G (n + 1))) :=\n  Iso.toLinearEquiv (Rep.equivalenceModuleMonoidAlgebra.functor.mapIso (diagonalSucc k G n).symm)\nr : MonoidAlgebra k G\nx : MonoidAlgebra k G ⊗[k] ((Fin n → G) →₀ k)\n⊢ r • 0 = ↑(↑(asAlgebraHom (Rep.ρ (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k)))) r) 0\n[PROOFSTEP]\nrw [smul_zero, map_zero]\n[GOAL]\ncase h.e_6.h.refine'_2\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nsrc✝ : ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj\n      (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k))) ≃ₗ[MonoidAlgebra k G]\n  ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj (Rep.diagonal k G (n + 1))) :=\n  Iso.toLinearEquiv (Rep.equivalenceModuleMonoidAlgebra.functor.mapIso (diagonalSucc k G n).symm)\nr : MonoidAlgebra k G\nx✝ : MonoidAlgebra k G ⊗[k] ((Fin n → G) →₀ k)\nx : MonoidAlgebra k G\ny : (Fin n → G) →₀ k\n⊢ r • x ⊗ₜ[k] y = ↑(↑(asAlgebraHom (Rep.ρ (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k)))) r) (x ⊗ₜ[k] y)\n[PROOFSTEP]\nrw [TensorProduct.smul_tmul', smul_eq_mul, ← ofMulAction_self_smul_eq_mul]\n[GOAL]\ncase h.e_6.h.refine'_2\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nsrc✝ : ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj\n      (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k))) ≃ₗ[MonoidAlgebra k G]\n  ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj (Rep.diagonal k G (n + 1))) :=\n  Iso.toLinearEquiv (Rep.equivalenceModuleMonoidAlgebra.functor.mapIso (diagonalSucc k G n).symm)\nr : MonoidAlgebra k G\nx✝ : MonoidAlgebra k G ⊗[k] ((Fin n → G) →₀ k)\nx : MonoidAlgebra k G\ny : (Fin n → G) →₀ k\n⊢ (r • x) ⊗ₜ[k] y = ↑(↑(asAlgebraHom (Rep.ρ (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k)))) r) (x ⊗ₜ[k] y)\n[PROOFSTEP]\nexact (smul_tprod_one_asModule (Representation.ofMulAction k G G) r x y).symm\n[GOAL]\ncase h.e_6.h.refine'_3\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nsrc✝ : ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj\n      (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k))) ≃ₗ[MonoidAlgebra k G]\n  ↑(Rep.equivalenceModuleMonoidAlgebra.functor.obj (Rep.diagonal k G (n + 1))) :=\n  Iso.toLinearEquiv (Rep.equivalenceModuleMonoidAlgebra.functor.mapIso (diagonalSucc k G n).symm)\nr : MonoidAlgebra k G\nx y z : MonoidAlgebra k G ⊗[k] ((Fin n → G) →₀ k)\nhy : r • y = ↑(↑(asAlgebraHom (Rep.ρ (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k)))) r) y\nhz : r • z = ↑(↑(asAlgebraHom (Rep.ρ (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k)))) r) z\n⊢ r • (y + z) = ↑(↑(asAlgebraHom (Rep.ρ (Rep.leftRegular k G ⊗ Rep.trivial k G ((Fin n → G) →₀ k)))) r) (y + z)\n[PROOFSTEP]\nrw [smul_add, hz, hy, map_add]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : ofMulAction k G (Fin (n + 1) → G) ⟶ A\nx : Fin n → G\n⊢ ↑(diagonalHomEquiv n A) f x = ↑f.hom (Finsupp.single (Fin.partialProd x) 1)\n[PROOFSTEP]\nchange f.hom ((diagonalSucc k G n).inv.hom (Finsupp.single 1 1 ⊗ₜ[k] Finsupp.single x 1)) = _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : ofMulAction k G (Fin (n + 1) → G) ⟶ A\nx : Fin n → G\n⊢ ↑f.hom (↑(diagonalSucc k G n).inv.hom (Finsupp.single 1 1 ⊗ₜ[k] Finsupp.single x 1)) =\n    ↑f.hom (Finsupp.single (Fin.partialProd x) 1)\n[PROOFSTEP]\nrw [diagonalSucc_inv_single_single, one_smul, one_mul]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ ↑(↑(LinearEquiv.symm (diagonalHomEquiv n A)) f).hom (Finsupp.single x 1) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\n[PROOFSTEP]\nunfold diagonalHomEquiv\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ ↑(↑(LinearEquiv.symm\n                (LinearEquiv.trans\n                  (LinearEquiv.trans\n                    (Linear.homCongr k\n                      (diagonalSucc k G n ≪≫ Representation.repOfTprodIso (Representation.ofMulAction k G G) 1)\n                      (Iso.refl A))\n                    (LinearEquiv.trans\n                      (MonoidalClosed.linearHomEquivComm (of (Representation.ofMulAction k G G)) (of 1) A)\n                      (leftRegularHomEquiv ((ihom (of 1)).obj A))))\n                  (LinearEquiv.symm (Finsupp.llift (CoeSort.coe A) k k (Fin n → G)))))\n            f).hom\n      (Finsupp.single x 1) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\n[PROOFSTEP]\nsimp only [LinearEquiv.trans_symm, LinearEquiv.symm_symm, LinearEquiv.trans_apply, leftRegularHomEquiv_symm_apply,\n  Linear.homCongr_symm_apply, Iso.trans_hom, Iso.refl_inv, Category.comp_id, Action.comp_hom,\n  MonoidalClosed.linearHomEquivComm_symm_hom]\n  -- Porting note: This is a sure sign that coercions for morphisms in `ModuleCat`\n    -- are still not set up properly.\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ ↑(((diagonalSucc k G n).hom.hom ≫ (Representation.repOfTprodIso (Representation.ofMulAction k G G) 1).hom.hom) ≫\n          ↑(TensorProduct.uncurry k (CoeSort.coe (of (Representation.ofMulAction k G G))) (CoeSort.coe (of 1))\n                (CoeSort.coe A))\n            (leftRegularHom ((ihom (of 1)).obj A) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f)).hom)\n      (Finsupp.single x 1) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\n[PROOFSTEP]\nrw [ModuleCat.coe_comp]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ (↑(↑(TensorProduct.uncurry k (CoeSort.coe (of (Representation.ofMulAction k G G))) (CoeSort.coe (of 1))\n                (CoeSort.coe A))\n            (leftRegularHom ((ihom (of 1)).obj A) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f)).hom) ∘\n        ↑((diagonalSucc k G n).hom.hom ≫ (Representation.repOfTprodIso (Representation.ofMulAction k G G) 1).hom.hom))\n      (Finsupp.single x 1) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\n[PROOFSTEP]\nsimp only [ModuleCat.coe_comp, Function.comp_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ ↑(↑(TensorProduct.uncurry k (CoeSort.coe (of (Representation.ofMulAction k G G))) (CoeSort.coe (of 1))\n              (CoeSort.coe A))\n          (leftRegularHom ((ihom (of 1)).obj A) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f)).hom)\n      (↑(Representation.repOfTprodIso (Representation.ofMulAction k G G) 1).hom.hom\n        (↑(diagonalSucc k G n).hom.hom (Finsupp.single x 1))) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\n[PROOFSTEP]\nrw [diagonalSucc_hom_single]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ ↑(↑(TensorProduct.uncurry k (CoeSort.coe (of (Representation.ofMulAction k G G))) (CoeSort.coe (of 1))\n              (CoeSort.coe A))\n          (leftRegularHom ((ihom (of 1)).obj A) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f)).hom)\n      (↑(Representation.repOfTprodIso (Representation.ofMulAction k G G) 1).hom.hom\n        (Finsupp.single (x 0) 1 ⊗ₜ[k] Finsupp.single (fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i)) 1)) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\n[PROOFSTEP]\nerw [TensorProduct.uncurry_apply, Finsupp.lift_apply, Finsupp.sum_single_index]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ ↑(1 • ↑(↑(ρ ((ihom (of 1)).obj A)) (x 0)) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f))\n      (Finsupp.single (fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i)) 1) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ 0 • ↑(↑(ρ ((ihom (of 1)).obj A)) (x 0)) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f) = 0\n[PROOFSTEP]\nsimp only [one_smul]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ ↑(↑(↑(ρ ((ihom (of 1)).obj A)) (x 0)) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f))\n      (Finsupp.single (fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i)) 1) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ 0 • ↑(↑(ρ ((ihom (of 1)).obj A)) (x 0)) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f) = 0\n[PROOFSTEP]\nerw [Representation.linHom_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ ↑(LinearMap.comp (↑(ρ A) (x 0))\n          (LinearMap.comp (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f) (↑(ρ (of 1)) (x 0)⁻¹)))\n      (Finsupp.single (fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i)) 1) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ 0 • ↑(↑(ρ ((ihom (of 1)).obj A)) (x 0)) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f) = 0\n[PROOFSTEP]\nsimp only [LinearMap.comp_apply, MonoidHom.one_apply, LinearMap.one_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ ↑(↑(ρ A) (x 0))\n      (↑(↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f)\n        (↑(↑(ρ (of 1)) (x 0)⁻¹) (Finsupp.single (fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i)) 1))) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ 0 • ↑(↑(ρ ((ihom (of 1)).obj A)) (x 0)) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f) = 0\n[PROOFSTEP]\nerw [Finsupp.llift_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ ↑(↑(ρ A) (x 0))\n      (↑(↑(Finsupp.lift (CoeSort.coe A) k (Fin n → G)) f)\n        (↑(↑(ρ (of 1)) (x 0)⁻¹) (Finsupp.single (fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i)) 1))) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ 0 • ↑(↑(ρ ((ihom (of 1)).obj A)) (x 0)) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f) = 0\n[PROOFSTEP]\nrw [Finsupp.lift_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ ↑(↑(ρ A) (x 0))\n      (Finsupp.sum (↑(↑(ρ (of 1)) (x 0)⁻¹) (Finsupp.single (fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i)) 1))\n        fun x r => r • f x) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ 0 • ↑(↑(ρ ((ihom (of 1)).obj A)) (x 0)) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f) = 0\n[PROOFSTEP]\nerw [Finsupp.sum_single_index]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ ↑(↑(ρ A) (x 0)) (1 • f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i)) =\n    ↑(↑(ρ A) (x 0)) (f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i))\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ (0 • f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i)) = 0\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ 0 • ↑(↑(ρ ((ihom (of 1)).obj A)) (x 0)) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f) = 0\n[PROOFSTEP]\nrw [one_smul]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ (0 • f fun i => (x (Fin.castSucc i))⁻¹ * x (Fin.succ i)) = 0\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\nx : Fin (n + 1) → G\n⊢ 0 • ↑(↑(ρ ((ihom (of 1)).obj A)) (x 0)) (↑(Finsupp.llift (CoeSort.coe A) k k (Fin n → G)) f) = 0\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\ng : Fin (n + 1) → G\na : Fin (n + 1)\n⊢ ↑(↑(LinearEquiv.symm (diagonalHomEquiv n A)) f).hom\n      (Finsupp.single (Fin.partialProd g ∘ Fin.succAbove (Fin.succ a)) 1) =\n    f (Fin.contractNth a (fun x x_1 => x * x_1) g)\n[PROOFSTEP]\nsimp only [diagonalHomEquiv_symm_apply, Function.comp_apply, Fin.succ_succAbove_zero, Fin.partialProd_zero, map_one,\n  Fin.succ_succAbove_succ, LinearMap.one_apply, Fin.partialProd_succ]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\ng : Fin (n + 1) → G\na : Fin (n + 1)\n⊢ (f fun i =>\n      (Fin.partialProd g (Fin.succAbove (Fin.succ a) (Fin.castSucc i)))⁻¹ *\n        (Fin.partialProd g (Fin.castSucc (Fin.succAbove a i)) * g (Fin.succAbove a i))) =\n    f (Fin.contractNth a (fun x x_1 => x * x_1) g)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\ng : Fin (n + 1) → G\na : Fin (n + 1)\n⊢ (fun i =>\n      (Fin.partialProd g (Fin.succAbove (Fin.succ a) (Fin.castSucc i)))⁻¹ *\n        (Fin.partialProd g (Fin.castSucc (Fin.succAbove a i)) * g (Fin.succAbove a i))) =\n    Fin.contractNth a (fun x x_1 => x * x_1) g\n[PROOFSTEP]\next\n[GOAL]\ncase e_a.h\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Group G\nA : Rep k G\nf : (Fin n → G) → CoeSort.coe A\ng : Fin (n + 1) → G\na : Fin (n + 1)\nx✝ : Fin n\n⊢ (Fin.partialProd g (Fin.succAbove (Fin.succ a) (Fin.castSucc x✝)))⁻¹ *\n      (Fin.partialProd g (Fin.castSucc (Fin.succAbove a x✝)) * g (Fin.succAbove a x✝)) =\n    Fin.contractNth a (fun x x_1 => x * x_1) g x✝\n[PROOFSTEP]\nrw [← Fin.partialProd_succ, Fin.inv_partialProd_mul_eq_contractNth]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nX✝ Y✝ : SimplexCategoryᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ (cechNerveTerminalFrom (Action.ofMulAction G G)).map f ≫\n      ((fun n => limit.isoLimitCone (Action.ofMulActionLimitCone G fun x => G)) Y✝).hom =\n    ((fun n => limit.isoLimitCone (Action.ofMulActionLimitCone G fun x => G)) X✝).hom ≫\n      (classifyingSpaceUniversalCover G).map f\n[PROOFSTEP]\nrefine' IsLimit.hom_ext (Action.ofMulActionLimitCone.{u, 0} G fun _ => G).2 fun j => _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nX✝ Y✝ : SimplexCategoryᵒᵖ\nf : X✝ ⟶ Y✝\nj : Discrete (Fin (SimplexCategory.len Y✝.unop + 1))\n⊢ ((cechNerveTerminalFrom (Action.ofMulAction G G)).map f ≫\n        ((fun n => limit.isoLimitCone (Action.ofMulActionLimitCone G fun x => G)) Y✝).hom) ≫\n      NatTrans.app (Action.ofMulActionLimitCone G fun x => G).cone.π j =\n    (((fun n => limit.isoLimitCone (Action.ofMulActionLimitCone G fun x => G)) X✝).hom ≫\n        (classifyingSpaceUniversalCover G).map f) ≫\n      NatTrans.app (Action.ofMulActionLimitCone G fun x => G).cone.π j\n[PROOFSTEP]\ndsimp only [cechNerveTerminalFrom, Pi.lift]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nX✝ Y✝ : SimplexCategoryᵒᵖ\nf : X✝ ⟶ Y✝\nj : Discrete (Fin (SimplexCategory.len Y✝.unop + 1))\n⊢ (limit.lift (Discrete.functor fun b => Action.ofMulAction G G)\n          (Fan.mk (∏ fun x => Action.ofMulAction G G) fun i =>\n            Pi.π (fun x => Action.ofMulAction G G) (↑(SimplexCategory.Hom.toOrderHom f.unop) i)) ≫\n        (limit.isoLimitCone (Action.ofMulActionLimitCone G fun x => G)).hom) ≫\n      NatTrans.app (Action.ofMulActionLimitCone G fun x => G).cone.π j =\n    ((limit.isoLimitCone (Action.ofMulActionLimitCone G fun x => G)).hom ≫ (classifyingSpaceUniversalCover G).map f) ≫\n      NatTrans.app (Action.ofMulActionLimitCone G fun x => G).cone.π j\n[PROOFSTEP]\nrw [Category.assoc, limit.isoLimitCone_hom_π, limit.lift_π, Category.assoc]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nX✝ Y✝ : SimplexCategoryᵒᵖ\nf : X✝ ⟶ Y✝\nj : Discrete (Fin (SimplexCategory.len Y✝.unop + 1))\n⊢ NatTrans.app\n      (Fan.mk (∏ fun x => Action.ofMulAction G G) fun i =>\n          Pi.π (fun x => Action.ofMulAction G G) (↑(SimplexCategory.Hom.toOrderHom f.unop) i)).π\n      j =\n    (limit.isoLimitCone (Action.ofMulActionLimitCone G fun x => G)).hom ≫\n      (classifyingSpaceUniversalCover G).map f ≫ NatTrans.app (Action.ofMulActionLimitCone G fun x => G).cone.π j\n[PROOFSTEP]\nexact (limit.isoLimitCone_hom_π _ _).symm\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ ExtraDegeneracy (compForgetAugmented G)\n[PROOFSTEP]\nrefine'\n  ExtraDegeneracy.ofIso (_ : (Arrow.mk <| terminal.from G).augmentedCechNerve ≅ _) (extraDegeneracyAugmentedCechNerve G)\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ Arrow.augmentedCechNerve (mk (terminal.from G)) ≅ compForgetAugmented G\n[PROOFSTEP]\nexact\n  Comma.isoMk (CechNerveTerminalFrom.iso G ≪≫ cechNerveTerminalFromIsoCompForget G) (Iso.refl _)\n    (by ext : 1; exact IsTerminal.hom_ext terminalIsTerminal _ _)\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ (𝟭 (SimplicialObject (Type u))).map (CechNerveTerminalFrom.iso G ≪≫ cechNerveTerminalFromIsoCompForget G).hom ≫\n      (compForgetAugmented G).hom =\n    (Arrow.augmentedCechNerve (mk (terminal.from G))).hom ≫\n      (const (Type u)).map (Iso.refl (Arrow.augmentedCechNerve (mk (terminal.from G))).right).hom\n[PROOFSTEP]\next : 1\n[GOAL]\ncase h\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nn✝ : SimplexCategoryᵒᵖ\n⊢ NatTrans.app\n      ((𝟭 (SimplicialObject (Type u))).map (CechNerveTerminalFrom.iso G ≪≫ cechNerveTerminalFromIsoCompForget G).hom ≫\n        (compForgetAugmented G).hom)\n      n✝ =\n    NatTrans.app\n      ((Arrow.augmentedCechNerve (mk (terminal.from G))).hom ≫\n        (const (Type u)).map (Iso.refl (Arrow.augmentedCechNerve (mk (terminal.from G))).right).hom)\n      n✝\n[PROOFSTEP]\nexact IsTerminal.hom_ext terminalIsTerminal _ _\n[GOAL]\nk G✝ : Type u\ninst✝¹ : CommRing k\nn✝ : ℕ\ninst✝ : Monoid G✝\nG : Type u\nn : ℕ\nc : Fin (n + 1) → G\n⊢ ↑(d k G n) (Finsupp.single c 1) = Finset.sum Finset.univ fun p => Finsupp.single (c ∘ Fin.succAbove p) ((-1) ^ ↑p)\n[PROOFSTEP]\nsimp [d]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn✝ : ℕ\ninst✝ : Monoid G\nn : ℕ\n⊢ (HomologicalComplex.d (resolution k G) (n + 1) n).hom = d k G (n + 1)\n[PROOFSTEP]\nrefine' Finsupp.lhom_ext' fun x => LinearMap.ext_ring _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn✝ : ℕ\ninst✝ : Monoid G\nn : ℕ\nx : ((classifyingSpaceUniversalCover G).obj (Opposite.op (SimplexCategory.mk (n + 1)))).V\n⊢ ↑(LinearMap.comp (HomologicalComplex.d (resolution k G) (n + 1) n).hom (Finsupp.lsingle x)) 1 =\n    ↑(LinearMap.comp (d k G (n + 1)) (Finsupp.lsingle x)) 1\n[PROOFSTEP]\ndsimp [GroupCohomology.resolution]\n  /- Porting note: broken proof was\n    simpa [← @intCast_smul k, simplicial_object.δ] -/\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn✝ : ℕ\ninst✝ : Monoid G\nn : ℕ\nx : ((classifyingSpaceUniversalCover G).obj (Opposite.op (SimplexCategory.mk (n + 1)))).V\n⊢ ↑(HomologicalComplex.d\n            ((alternatingFaceMapComplex (Rep k G)).obj\n              (classifyingSpaceUniversalCover G ⋙ (Rep.linearization k G).toLaxMonoidalFunctor.toFunctor))\n            (n + 1) n).hom\n      (Finsupp.single x 1) =\n    ↑(d k G (n + 1)) (Finsupp.single x 1)\n[PROOFSTEP]\nsimp_rw [alternatingFaceMapComplex_obj_d, AlternatingFaceMapComplex.objD, SimplicialObject.δ, Functor.comp_map, ←\n  intCast_smul (k := k) ((-1) ^ _ : ℤ), Int.cast_pow, Int.cast_neg, Int.cast_one, Action.sum_hom, Action.smul_hom,\n  Rep.linearization_map_hom]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn✝ : ℕ\ninst✝ : Monoid G\nn : ℕ\nx : ((classifyingSpaceUniversalCover G).obj (Opposite.op (SimplexCategory.mk (n + 1)))).V\n⊢ ↑(Finset.sum Finset.univ fun x =>\n          (-1) ^ ↑x • Finsupp.lmapDomain k k ((classifyingSpaceUniversalCover G).map (SimplexCategory.δ x).op).hom)\n      (Finsupp.single x 1) =\n    ↑(d k G (n + 1)) (Finsupp.single x 1)\n[PROOFSTEP]\nrw [LinearMap.coeFn_sum, Fintype.sum_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn✝ : ℕ\ninst✝ : Monoid G\nn : ℕ\nx : ((classifyingSpaceUniversalCover G).obj (Opposite.op (SimplexCategory.mk (n + 1)))).V\n⊢ (Finset.sum Finset.univ fun c =>\n      ↑((-1) ^ ↑c • Finsupp.lmapDomain k k ((classifyingSpaceUniversalCover G).map (SimplexCategory.δ c).op).hom)\n        (Finsupp.single x 1)) =\n    ↑(d k G (n + 1)) (Finsupp.single x 1)\n[PROOFSTEP]\nerw [d_of (k := k) x]\n  /- Porting note: want to rewrite `LinearMap.smul_apply` but simp/simp_rw won't do it; I need erw,\n  so using Finset.sum_congr to get rid of the binder -/\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn✝ : ℕ\ninst✝ : Monoid G\nn : ℕ\nx : ((classifyingSpaceUniversalCover G).obj (Opposite.op (SimplexCategory.mk (n + 1)))).V\n⊢ (Finset.sum Finset.univ fun c =>\n      ↑((-1) ^ ↑c • Finsupp.lmapDomain k k ((classifyingSpaceUniversalCover G).map (SimplexCategory.δ c).op).hom)\n        (Finsupp.single x 1)) =\n    Finset.sum Finset.univ fun p => Finsupp.single (x ∘ Fin.succAbove p) ((-1) ^ ↑p)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun _ _ => _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn✝ : ℕ\ninst✝ : Monoid G\nn : ℕ\nx : ((classifyingSpaceUniversalCover G).obj (Opposite.op (SimplexCategory.mk (n + 1)))).V\nx✝¹ : Fin (n + 2)\nx✝ : x✝¹ ∈ Finset.univ\n⊢ ↑((-1) ^ ↑x✝¹ • Finsupp.lmapDomain k k ((classifyingSpaceUniversalCover G).map (SimplexCategory.δ x✝¹).op).hom)\n      (Finsupp.single x 1) =\n    Finsupp.single (x ∘ Fin.succAbove x✝¹) ((-1) ^ ↑x✝¹)\n[PROOFSTEP]\nerw [LinearMap.smul_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn✝ : ℕ\ninst✝ : Monoid G\nn : ℕ\nx : ((classifyingSpaceUniversalCover G).obj (Opposite.op (SimplexCategory.mk (n + 1)))).V\nx✝¹ : Fin (n + 2)\nx✝ : x✝¹ ∈ Finset.univ\n⊢ (-1) ^ ↑x✝¹ •\n      ↑(Finsupp.lmapDomain k k ((classifyingSpaceUniversalCover G).map (SimplexCategory.δ x✝¹).op).hom)\n        (Finsupp.single x 1) =\n    Finsupp.single (x ∘ Fin.succAbove x✝¹) ((-1) ^ ↑x✝¹)\n[PROOFSTEP]\nrw [Finsupp.lmapDomain_apply, Finsupp.mapDomain_single, Finsupp.smul_single', mul_one]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn✝ : ℕ\ninst✝ : Monoid G\nn : ℕ\nx : ((classifyingSpaceUniversalCover G).obj (Opposite.op (SimplexCategory.mk (n + 1)))).V\nx✝¹ : Fin (n + 2)\nx✝ : x✝¹ ∈ Finset.univ\n⊢ Finsupp.single (Action.Hom.hom ((classifyingSpaceUniversalCover G).map (SimplexCategory.δ x✝¹).op) x) ((-1) ^ ↑x✝¹) =\n    Finsupp.single (x ∘ Fin.succAbove x✝¹) ((-1) ^ ↑x✝¹)\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\ng : ↑(MonCat.of G)\nx✝ : Fin 1 → G\n⊢ ↑(LinearMap.comp\n          (↑(Rep.ofMulAction k G (Fin 1 → G)).ρ g ≫ Finsupp.total (Fin 1 → G) (↑(Rep.trivial k G k).V) k fun x => 1)\n          (Finsupp.lsingle x✝))\n      1 =\n    ↑(LinearMap.comp ((Finsupp.total (Fin 1 → G) (↑(Rep.trivial k G k).V) k fun x => 1) ≫ ↑(Rep.trivial k G k).ρ g)\n          (Finsupp.lsingle x✝))\n      1\n[PROOFSTEP]\nshow\n  Finsupp.total (Fin 1 → G) k k (fun _ => (1 : k)) (Finsupp.mapDomain _ (Finsupp.single _ _)) =\n    Finsupp.total (Fin 1 → G) k k (fun _ => (1 : k)) (Finsupp.single _ _)\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\ng : ↑(MonCat.of G)\nx✝ : Fin 1 → G\n⊢ ↑(Finsupp.total (Fin 1 → G) k k fun x => 1)\n      (Finsupp.mapDomain (fun a => (fun x x_1 => x • x_1) g a) (Finsupp.single x✝ 1)) =\n    ↑(Finsupp.total (Fin 1 → G) k k fun x => 1) (Finsupp.single x✝ 1)\n[PROOFSTEP]\nsimp only [Finsupp.mapDomain_single, Finsupp.total_single]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ HomologicalComplex.Hom.f (forget₂ToModuleCatHomotopyEquiv k G).hom 0 = (forget₂ (Rep k G) (ModuleCat k)).map (ε k G)\n[PROOFSTEP]\nshow (HomotopyEquiv.hom _ ≫ HomotopyEquiv.hom _ ≫ HomotopyEquiv.hom _).f 0 = _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ HomologicalComplex.Hom.f\n      ((HomotopyEquiv.ofIso (compForgetAugmentedIso k G).symm).hom ≫\n        (SimplicialObject.Augmented.ExtraDegeneracy.homotopyEquiv\n              (extraDegeneracyCompForgetAugmentedToModule k G)).hom ≫\n          (HomotopyEquiv.ofIso\n              ((ChainComplex.single₀ (ModuleCat k)).mapIso\n                (LinearEquiv.toModuleIso (Finsupp.LinearEquiv.finsuppUnique k k (⊤_ Type u))))).hom)\n      0 =\n    (forget₂ (Rep k G) (ModuleCat k)).map (ε k G)\n[PROOFSTEP]\nsimp only [HomologicalComplex.comp_f]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ HomologicalComplex.Hom.f (HomotopyEquiv.ofIso (compForgetAugmentedIso k G).symm).hom 0 ≫\n      HomologicalComplex.Hom.f\n          (SimplicialObject.Augmented.ExtraDegeneracy.homotopyEquiv\n              (extraDegeneracyCompForgetAugmentedToModule k G)).hom\n          0 ≫\n        HomologicalComplex.Hom.f\n          (HomotopyEquiv.ofIso\n              ((ChainComplex.single₀ (ModuleCat k)).mapIso\n                (LinearEquiv.toModuleIso (Finsupp.LinearEquiv.finsuppUnique k k (⊤_ Type u))))).hom\n          0 =\n    (forget₂ (Rep k G) (ModuleCat k)).map (ε k G)\n[PROOFSTEP]\ndsimp\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ HomologicalComplex.Hom.f (HomotopyEquiv.ofIso (compForgetAugmentedIso k G).symm).hom 0 ≫\n      HomologicalComplex.Hom.f\n          (SimplicialObject.Augmented.ExtraDegeneracy.homotopyEquiv\n              (extraDegeneracyCompForgetAugmentedToModule k G)).hom\n          0 ≫\n        HomologicalComplex.Hom.f\n          (HomotopyEquiv.ofIso\n              ((ChainComplex.single₀ (ModuleCat k)).mapIso\n                (LinearEquiv.toModuleIso (Finsupp.LinearEquiv.finsuppUnique k k (⊤_ Type u))))).hom\n          0 =\n    (forget₂ (Rep k G) (ModuleCat k)).map (ε k G)\n[PROOFSTEP]\nconvert Category.id_comp (X := (forget₂ToModuleCat k G).X 0) _\n[GOAL]\ncase h.e'_2.h.e'_6.h\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\ne_4✝ :\n  (compForgetAugmented.toModule k G).left.obj (Opposite.op (SimplexCategory.mk 0)) =\n    HomologicalComplex.X (forget₂ToModuleCat k G) 0\n⊢ HomologicalComplex.Hom.f (HomotopyEquiv.ofIso (compForgetAugmentedIso k G).symm).hom 0 =\n    𝟙 (HomologicalComplex.X (forget₂ToModuleCat k G) 0)\n[PROOFSTEP]\ndsimp only [HomotopyEquiv.ofIso, compForgetAugmentedIso, map_alternatingFaceMapComplex]\n[GOAL]\ncase h.e'_2.h.e'_6.h\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\ne_4✝ :\n  (compForgetAugmented.toModule k G).left.obj (Opposite.op (SimplexCategory.mk 0)) =\n    HomologicalComplex.X (forget₂ToModuleCat k G) 0\n⊢ HomologicalComplex.Hom.f\n      (eqToIso\n            (_ :\n              ((SimplicialObject.whiskering (Rep k G) (ModuleCat k)).obj (forget₂ (Rep k G) (ModuleCat k)) ⋙\n                      alternatingFaceMapComplex (ModuleCat k)).obj\n                  (classifyingSpaceUniversalCover G ⋙ (Rep.linearization k G).toLaxMonoidalFunctor.toFunctor) =\n                (alternatingFaceMapComplex (Rep k G) ⋙\n                      Functor.mapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k)) (ComplexShape.down ℕ)).obj\n                  (classifyingSpaceUniversalCover G ⋙ (Rep.linearization k G).toLaxMonoidalFunctor.toFunctor))).symm.hom\n      0 =\n    𝟙 (HomologicalComplex.X (forget₂ToModuleCat k G) 0)\n[PROOFSTEP]\nsimp only [Iso.symm_hom, eqToIso.inv, HomologicalComplex.eqToHom_f, eqToHom_refl]\n[GOAL]\ncase h.e'_3\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ (forget₂ (Rep k G) (ModuleCat k)).map (ε k G) =\n    HomologicalComplex.Hom.f\n        (SimplicialObject.Augmented.ExtraDegeneracy.homotopyEquiv (extraDegeneracyCompForgetAugmentedToModule k G)).hom\n        0 ≫\n      HomologicalComplex.Hom.f\n        (HomotopyEquiv.ofIso\n            ((ChainComplex.single₀ (ModuleCat k)).mapIso\n              (LinearEquiv.toModuleIso (Finsupp.LinearEquiv.finsuppUnique k k (⊤_ Type u))))).hom\n        0\n[PROOFSTEP]\ntrans (Finsupp.total _ _ _ fun _ => (1 : k)).comp ((ModuleCat.free k).map (terminal.from _))\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ (forget₂ (Rep k G) (ModuleCat k)).map (ε k G) =\n    LinearMap.comp (Finsupp.total (⊤_ Type u) k k fun x => 1) ((ModuleCat.free k).map (terminal.from (Fin 1 → G)))\n[PROOFSTEP]\ndsimp\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ (forget₂ (Rep k G) (ModuleCat k)).map (ε k G) =\n    LinearMap.comp (Finsupp.total (⊤_ Type u) k k fun x => 1) (Finsupp.lmapDomain k k (terminal.from (Fin 1 → G)))\n[PROOFSTEP]\nerw [Finsupp.lmapDomain_total (α := Fin 1 → G) (R := k) (α' := ⊤_ Type u) (v := fun _ => (1 : k)) (v' := fun _ =>\n    (1 : k)) (terminal.from ((classifyingSpaceUniversalCover G).obj (Opposite.op (SimplexCategory.mk 0))).V)\n    LinearMap.id fun i => rfl,\n  LinearMap.id_comp]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ (forget₂ (Rep k G) (ModuleCat k)).map (ε k G) = Finsupp.total (Fin 1 → G) k k fun x => 1\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ LinearMap.comp (Finsupp.total (⊤_ Type u) k k fun x => 1) ((ModuleCat.free k).map (terminal.from (Fin 1 → G))) =\n    HomologicalComplex.Hom.f\n        (SimplicialObject.Augmented.ExtraDegeneracy.homotopyEquiv (extraDegeneracyCompForgetAugmentedToModule k G)).hom\n        0 ≫\n      HomologicalComplex.Hom.f\n        (HomotopyEquiv.ofIso\n            ((ChainComplex.single₀ (ModuleCat k)).mapIso\n              (LinearEquiv.toModuleIso (Finsupp.LinearEquiv.finsuppUnique k k (⊤_ Type u))))).hom\n        0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ (Finsupp.total (⊤_ Type u) k k fun x => 1) =\n    HomologicalComplex.Hom.f\n      (HomotopyEquiv.ofIso\n          ((ChainComplex.single₀ (ModuleCat k)).mapIso\n            (LinearEquiv.toModuleIso (Finsupp.LinearEquiv.finsuppUnique k k (⊤_ Type u))))).hom\n      0\n[PROOFSTEP]\next x\n[GOAL]\ncase e_f.h.h\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nx : ⊤_ Type u\n⊢ ↑(LinearMap.comp (Finsupp.total (⊤_ Type u) k k fun x => 1) (Finsupp.lsingle x)) 1 =\n    ↑(LinearMap.comp\n          (HomologicalComplex.Hom.f\n            (HomotopyEquiv.ofIso\n                ((ChainComplex.single₀ (ModuleCat k)).mapIso\n                  (LinearEquiv.toModuleIso (Finsupp.LinearEquiv.finsuppUnique k k (⊤_ Type u))))).hom\n            0)\n          (Finsupp.lsingle x))\n      1\n[PROOFSTEP]\ndsimp [HomotopyEquiv.ofIso, Finsupp.LinearEquiv.finsuppUnique]\n[GOAL]\ncase e_f.h.h\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nx : ⊤_ Type u\n⊢ ↑(Finsupp.total (⊤_ Type u) k k fun x => 1) (Finsupp.single x 1) = ↑(Finsupp.single x 1) default\n[PROOFSTEP]\nrw [Finsupp.total_single, one_smul, @Unique.eq_default _ Types.terminalIso.toEquiv.unique x, Finsupp.single_eq_same]\n[GOAL]\ncase e_g.e_a\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ terminal.from (Fin 1 → G) = fun a => NatTrans.app (compForgetAugmented G).hom (Opposite.op (SimplexCategory.mk 0)) a\n[PROOFSTEP]\nexact @Subsingleton.elim _ (@Unique.instSubsingleton _ (Limits.uniqueToTerminal _)) _ _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ HomologicalComplex.d (resolution k G) 1 0 ≫ ε k G = 0\n[PROOFSTEP]\next : 1\n[GOAL]\ncase h\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ (HomologicalComplex.d (resolution k G) 1 0 ≫ ε k G).hom = 0.hom\n[PROOFSTEP]\nrefine' LinearMap.ext fun x => _\n[GOAL]\ncase h\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nx : ↑(HomologicalComplex.X (resolution k G) 1).V\n⊢ ↑(HomologicalComplex.d (resolution k G) 1 0 ≫ ε k G).hom x = ↑0.hom x\n[PROOFSTEP]\nhave : (forget₂ToModuleCat k G).d 1 0 ≫ (forget₂ (Rep k G) (ModuleCat.{u} k)).map (ε k G) = 0 :=\n  by\n  rw [← forget₂ToModuleCatHomotopyEquiv_f_0_eq, ← (forget₂ToModuleCatHomotopyEquiv k G).1.2 1 0 rfl]\n  exact comp_zero\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nx : ↑(HomologicalComplex.X (resolution k G) 1).V\n⊢ HomologicalComplex.d (forget₂ToModuleCat k G) 1 0 ≫ (forget₂ (Rep k G) (ModuleCat k)).map (ε k G) = 0\n[PROOFSTEP]\nrw [← forget₂ToModuleCatHomotopyEquiv_f_0_eq, ← (forget₂ToModuleCatHomotopyEquiv k G).1.2 1 0 rfl]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nx : ↑(HomologicalComplex.X (resolution k G) 1).V\n⊢ HomologicalComplex.Hom.f (forget₂ToModuleCatHomotopyEquiv k G).hom 1 ≫\n      HomologicalComplex.d\n        ((ChainComplex.single₀ (ModuleCat k)).obj ((forget₂ (Rep k G) (ModuleCat k)).obj (Rep.trivial k G k))) 1 0 =\n    0\n[PROOFSTEP]\nexact comp_zero\n[GOAL]\ncase h\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nx : ↑(HomologicalComplex.X (resolution k G) 1).V\nthis : HomologicalComplex.d (forget₂ToModuleCat k G) 1 0 ≫ (forget₂ (Rep k G) (ModuleCat k)).map (ε k G) = 0\n⊢ ↑(HomologicalComplex.d (resolution k G) 1 0 ≫ ε k G).hom x = ↑0.hom x\n[PROOFSTEP]\nexact LinearMap.ext_iff.1 this _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ (Functor.mapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k)) (ComplexShape.down ℕ)).map (εToSingle₀ k G) ≫\n      NatTrans.app (ChainComplex.single₀MapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k))).hom\n        (Rep.trivial k G k) =\n    (forget₂ToModuleCatHomotopyEquiv k G).hom\n[PROOFSTEP]\nrefine' ChainComplex.to_single₀_ext _ _ _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ HomologicalComplex.Hom.f\n      ((Functor.mapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k)) (ComplexShape.down ℕ)).map (εToSingle₀ k G) ≫\n        NatTrans.app (ChainComplex.single₀MapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k))).hom\n          (Rep.trivial k G k))\n      0 =\n    HomologicalComplex.Hom.f (forget₂ToModuleCatHomotopyEquiv k G).hom 0\n[PROOFSTEP]\ndsimp\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ (forget₂ (Rep k G) (ModuleCat k)).map (HomologicalComplex.Hom.f (εToSingle₀ k G) 0) ≫\n      𝟙 ((forget₂ (Rep k G) (ModuleCat k)).obj (Rep.trivial k G k)) =\n    HomologicalComplex.Hom.f (forget₂ToModuleCatHomotopyEquiv k G).hom 0\n[PROOFSTEP]\nrw [Category.comp_id]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ (forget₂ (Rep k G) (ModuleCat k)).map (HomologicalComplex.Hom.f (εToSingle₀ k G) 0) =\n    HomologicalComplex.Hom.f (forget₂ToModuleCatHomotopyEquiv k G).hom 0\n[PROOFSTEP]\nexact (forget₂ToModuleCatHomotopyEquiv_f_0_eq k G).symm\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\n⊢ QuasiIso\n    ((Functor.mapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k)) (ComplexShape.down ℕ)).map (εToSingle₀ k G))\n[PROOFSTEP]\nhave h : QuasiIso (forget₂ToModuleCatHomotopyEquiv k G).hom := HomotopyEquiv.toQuasiIso _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nh : QuasiIso (forget₂ToModuleCatHomotopyEquiv k G).hom\n⊢ QuasiIso\n    ((Functor.mapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k)) (ComplexShape.down ℕ)).map (εToSingle₀ k G))\n[PROOFSTEP]\nrw [← εToSingle₀_comp_eq k G] at h \n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nh :\n  QuasiIso\n    ((Functor.mapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k)) (ComplexShape.down ℕ)).map (εToSingle₀ k G) ≫\n      NatTrans.app (ChainComplex.single₀MapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k))).hom\n        (Rep.trivial k G k))\n⊢ QuasiIso\n    ((Functor.mapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k)) (ComplexShape.down ℕ)).map (εToSingle₀ k G))\n[PROOFSTEP]\nhaveI := h\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\nn : ℕ\ninst✝ : Monoid G\nh this :\n  QuasiIso\n    ((Functor.mapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k)) (ComplexShape.down ℕ)).map (εToSingle₀ k G) ≫\n      NatTrans.app (ChainComplex.single₀MapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k))).hom\n        (Rep.trivial k G k))\n⊢ QuasiIso\n    ((Functor.mapHomologicalComplex (forget₂ (Rep k G) (ModuleCat k)) (ComplexShape.down ℕ)).map (εToSingle₀ k G))\n[PROOFSTEP]\nexact quasiIso_of_comp_right _ ((ChainComplex.single₀MapHomologicalComplex _).hom.app _)\n", "meta": {"mathlib_filename": "Mathlib.RepresentationTheory.GroupCohomology.Resolution", "llama_tokens": 31968, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6992544210587585, "lm_q2_score": 0.5195213219520929, "lm_q1q2_score": 0.36327758120929154}}
{"text": "[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\n⊢ (𝟙 X).hom = 𝟙 X\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\n⊢ ∀ {X Y : Core C}, Function.Injective (inclusion C).map\n[PROOFSTEP]\nintro _ _\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX✝ Y✝ : Core C\n⊢ Function.Injective (inclusion C).map\n[PROOFSTEP]\napply Iso.ext\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nm : Type u₁ → Type u₂\ninst✝ : EquivFunctor m\nα : Core (Type u₁)\n⊢ { obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.map (𝟙 α) =\n    𝟙 ({ obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.obj α)\n[PROOFSTEP]\napply Iso.ext\n[GOAL]\ncase w\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nm : Type u₁ → Type u₂\ninst✝ : EquivFunctor m\nα : Core (Type u₁)\n⊢ ({ obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.map (𝟙 α)).hom =\n    (𝟙 ({ obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.obj α)).hom\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nm : Type u₁ → Type u₂\ninst✝ : EquivFunctor m\nα : Core (Type u₁)\nx : { obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.obj α\n⊢ ({ obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.map (𝟙 α)).hom x =\n    (𝟙 ({ obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.obj α)).hom x\n[PROOFSTEP]\nexact congr_fun (EquivFunctor.map_refl' _) x\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nm : Type u₁ → Type u₂\ninst✝ : EquivFunctor m\nX✝ Y✝ Z✝ : Core (Type u₁)\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.map (f ≫ g) =\n    { obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.map f ≫\n      { obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.map g\n[PROOFSTEP]\napply Iso.ext\n[GOAL]\ncase w\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nm : Type u₁ → Type u₂\ninst✝ : EquivFunctor m\nX✝ Y✝ Z✝ : Core (Type u₁)\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ ({ obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.map (f ≫ g)).hom =\n    ({ obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.map f ≫\n        { obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.map g).hom\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nm : Type u₁ → Type u₂\ninst✝ : EquivFunctor m\nX✝ Y✝ Z✝ : Core (Type u₁)\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nx : { obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.obj X✝\n⊢ ({ obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.map (f ≫ g)).hom x =\n    ({ obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.map f ≫\n          { obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.map g).hom\n      x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nm : Type u₁ → Type u₂\ninst✝ : EquivFunctor m\nX✝ Y✝ Z✝ : Core (Type u₁)\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nx : { obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.obj X✝\n⊢ EquivFunctor.map (f ≫ g).toEquiv x = EquivFunctor.map g.toEquiv (EquivFunctor.map f.toEquiv x)\n[PROOFSTEP]\nerw [Iso.toEquiv_comp, EquivFunctor.map_trans']\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nm : Type u₁ → Type u₂\ninst✝ : EquivFunctor m\nX✝ Y✝ Z✝ : Core (Type u₁)\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nx : { obj := m, map := fun {X Y} f => Equiv.toIso (EquivFunctor.mapEquiv m f.toEquiv) }.obj X✝\n⊢ (EquivFunctor.map g.toEquiv ∘ EquivFunctor.map f.toEquiv) x =\n    EquivFunctor.map g.toEquiv (EquivFunctor.map f.toEquiv x)\n[PROOFSTEP]\nrw [Function.comp]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Core", "llama_tokens": 1974, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947425132315, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.3631197923814508}}
{"text": "[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\n⊢ ∀ (e : PE ≃ᵢ PE), ↑e x = x → ↑e y = y → ↑e (midpoint ℝ x y) = midpoint ℝ x y\n[PROOFSTEP]\nset z := midpoint ℝ x y\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\n⊢ ∀ (e : PE ≃ᵢ PE), ↑e x = x → ↑e y = y → ↑e z = z\n[PROOFSTEP]\nset s := {e : PE ≃ᵢ PE | e x = x ∧ e y = y}\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\n⊢ ∀ (e : PE ≃ᵢ PE), ↑e x = x → ↑e y = y → ↑e z = z\n[PROOFSTEP]\nhaveI : Nonempty s :=\n  ⟨⟨IsometryEquiv.refl PE, rfl, rfl⟩⟩\n    -- On the one hand, `e` cannot send the midpoint `z` of `[x, y]` too far\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\n⊢ ∀ (e : PE ≃ᵢ PE), ↑e x = x → ↑e y = y → ↑e z = z\n[PROOFSTEP]\nhave h_bdd : BddAbove (range fun e : s => dist ((e : PE ≃ᵢ PE) z) z) :=\n  by\n  refine' ⟨dist x z + dist x z, forall_range_iff.2 <| Subtype.forall.2 _⟩\n  rintro e ⟨hx, _⟩\n  calc\n    dist (e z) z ≤ dist (e z) x + dist x z := dist_triangle (e z) x z\n    _ = dist (e x) (e z) + dist x z := by rw [hx, dist_comm]\n    _ = dist x z + dist x z := by\n      erw [e.dist_eq x z]\n        -- On the other hand, consider the map `f : (E ≃ᵢ E) → (E ≃ᵢ E)`\n          -- sending each `e` to `R ∘ e⁻¹ ∘ R ∘ e`, where `R` is the point reflection in the\n          -- midpoint `z` of `[x, y]`.\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\n⊢ BddAbove (range fun e => dist (↑↑e z) z)\n[PROOFSTEP]\nrefine' ⟨dist x z + dist x z, forall_range_iff.2 <| Subtype.forall.2 _⟩\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\n⊢ ∀ (a : PE ≃ᵢ PE) (b : a ∈ s), dist (↑↑{ val := a, property := b } z) z ≤ dist x z + dist x z\n[PROOFSTEP]\nrintro e ⟨hx, _⟩\n[GOAL]\ncase intro\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\ne : PE ≃ᵢ PE\nhx : ↑e x = x\nright✝ : ↑e y = y\n⊢ dist (↑↑{ val := e, property := (_ : ↑e x = x ∧ ↑e y = y) } z) z ≤ dist x z + dist x z\n[PROOFSTEP]\ncalc\n  dist (e z) z ≤ dist (e z) x + dist x z := dist_triangle (e z) x z\n  _ = dist (e x) (e z) + dist x z := by rw [hx, dist_comm]\n  _ = dist x z + dist x z := by\n    erw [e.dist_eq x z]\n      -- On the other hand, consider the map `f : (E ≃ᵢ E) → (E ≃ᵢ E)`\n        -- sending each `e` to `R ∘ e⁻¹ ∘ R ∘ e`, where `R` is the point reflection in the\n        -- midpoint `z` of `[x, y]`.\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\ne : PE ≃ᵢ PE\nhx : ↑e x = x\nright✝ : ↑e y = y\n⊢ dist (↑e z) x + dist x z = dist (↑e x) (↑e z) + dist x z\n[PROOFSTEP]\nrw [hx, dist_comm]\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\ne : PE ≃ᵢ PE\nhx : ↑e x = x\nright✝ : ↑e y = y\n⊢ dist (↑e x) (↑e z) + dist x z = dist x z + dist x z\n[PROOFSTEP]\nerw [e.dist_eq x z]\n  -- On the other hand, consider the map `f : (E ≃ᵢ E) → (E ≃ᵢ E)`\n    -- sending each `e` to `R ∘ e⁻¹ ∘ R ∘ e`, where `R` is the point reflection in the\n    -- midpoint `z` of `[x, y]`.\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\n⊢ ∀ (e : PE ≃ᵢ PE), ↑e x = x → ↑e y = y → ↑e z = z\n[PROOFSTEP]\nset R : PE ≃ᵢ PE := (pointReflection ℝ z).toIsometryEquiv\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\n⊢ ∀ (e : PE ≃ᵢ PE), ↑e x = x → ↑e y = y → ↑e z = z\n[PROOFSTEP]\nset f : PE ≃ᵢ PE → PE ≃ᵢ PE := fun e => ((e.trans R).trans e.symm).trans R\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\n⊢ ∀ (e : PE ≃ᵢ PE), ↑e x = x → ↑e y = y → ↑e z = z\n[PROOFSTEP]\nhave hf_dist : ∀ e, dist (f e z) z = 2 * dist (e z) z :=\n  by\n  intro e\n  dsimp\n  rw [dist_pointReflection_fixed, ← e.dist_eq, e.apply_symm_apply, dist_pointReflection_self_real, dist_comm]\n    -- Also note that `f` maps `s` to itself\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\n⊢ ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\n[PROOFSTEP]\nintro e\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\ne : PE ≃ᵢ PE\n⊢ dist (↑(f e) z) z = 2 * dist (↑e z) z\n[PROOFSTEP]\ndsimp\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\ne : PE ≃ᵢ PE\n⊢ dist\n      (↑(pointReflection ℝ (midpoint ℝ x y))\n        (↑(IsometryEquiv.symm e) (↑(pointReflection ℝ (midpoint ℝ x y)) (↑e (midpoint ℝ x y)))))\n      (midpoint ℝ x y) =\n    2 * dist (↑e (midpoint ℝ x y)) (midpoint ℝ x y)\n[PROOFSTEP]\nrw [dist_pointReflection_fixed, ← e.dist_eq, e.apply_symm_apply, dist_pointReflection_self_real, dist_comm]\n  -- Also note that `f` maps `s` to itself\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\n⊢ ∀ (e : PE ≃ᵢ PE), ↑e x = x → ↑e y = y → ↑e z = z\n[PROOFSTEP]\nhave hf_maps_to : MapsTo f s s := by\n  rintro e ⟨hx, hy⟩\n  constructor <;>\n    simp [hx, hy, e.symm_apply_eq.2 hx.symm, e.symm_apply_eq.2 hy.symm]\n      -- Therefore, `dist (e z) z = 0` for all `e ∈ s`.\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\n⊢ MapsTo f s s\n[PROOFSTEP]\nrintro e ⟨hx, hy⟩\n[GOAL]\ncase intro\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\ne : PE ≃ᵢ PE\nhx : ↑e x = x\nhy : ↑e y = y\n⊢ f e ∈ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.left\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\ne : PE ≃ᵢ PE\nhx : ↑e x = x\nhy : ↑e y = y\n⊢ ↑(f e) x = x\n[PROOFSTEP]\nsimp [hx, hy, e.symm_apply_eq.2 hx.symm, e.symm_apply_eq.2 hy.symm]\n  -- Therefore, `dist (e z) z = 0` for all `e ∈ s`.\n[GOAL]\ncase intro.right\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\ne : PE ≃ᵢ PE\nhx : ↑e x = x\nhy : ↑e y = y\n⊢ ↑(f e) y = y\n[PROOFSTEP]\nsimp [hx, hy, e.symm_apply_eq.2 hx.symm, e.symm_apply_eq.2 hy.symm]\n  -- Therefore, `dist (e z) z = 0` for all `e ∈ s`.\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\nhf_maps_to : MapsTo f s s\n⊢ ∀ (e : PE ≃ᵢ PE), ↑e x = x → ↑e y = y → ↑e z = z\n[PROOFSTEP]\nset c := ⨆ e : s, dist ((e : PE ≃ᵢ PE) z) z\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\nhf_maps_to : MapsTo f s s\nc : ℝ := ⨆ (e : ↑s), dist (↑↑e z) z\n⊢ ∀ (e : PE ≃ᵢ PE), ↑e x = x → ↑e y = y → ↑e z = z\n[PROOFSTEP]\nhave : c ≤ c / 2 := by\n  apply ciSup_le\n  rintro ⟨e, he⟩\n  simp only [Subtype.coe_mk, le_div_iff' (zero_lt_two' ℝ), ← hf_dist]\n  exact le_ciSup h_bdd ⟨f e, hf_maps_to he⟩\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\nhf_maps_to : MapsTo f s s\nc : ℝ := ⨆ (e : ↑s), dist (↑↑e z) z\n⊢ c ≤ c / 2\n[PROOFSTEP]\napply ciSup_le\n[GOAL]\ncase H\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\nhf_maps_to : MapsTo f s s\nc : ℝ := ⨆ (e : ↑s), dist (↑↑e z) z\n⊢ ∀ (x : ↑s), dist (↑↑x z) z ≤ c / 2\n[PROOFSTEP]\nrintro ⟨e, he⟩\n[GOAL]\ncase H.mk\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\nhf_maps_to : MapsTo f s s\nc : ℝ := ⨆ (e : ↑s), dist (↑↑e z) z\ne : PE ≃ᵢ PE\nhe : e ∈ s\n⊢ dist (↑↑{ val := e, property := he } z) z ≤ c / 2\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, le_div_iff' (zero_lt_two' ℝ), ← hf_dist]\n[GOAL]\ncase H.mk\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\nhf_maps_to : MapsTo f s s\nc : ℝ := ⨆ (e : ↑s), dist (↑↑e z) z\ne : PE ≃ᵢ PE\nhe : e ∈ s\n⊢ dist\n      (↑(IsometryEquiv.trans\n            (IsometryEquiv.trans (IsometryEquiv.trans e (toIsometryEquiv (pointReflection ℝ (midpoint ℝ x y))))\n              (IsometryEquiv.symm e))\n            (toIsometryEquiv (pointReflection ℝ (midpoint ℝ x y))))\n        (midpoint ℝ x y))\n      (midpoint ℝ x y) ≤\n    ⨆ (e : ↑{e | ↑e x = x ∧ ↑e y = y}), dist (↑↑e (midpoint ℝ x y)) (midpoint ℝ x y)\n[PROOFSTEP]\nexact le_ciSup h_bdd ⟨f e, hf_maps_to he⟩\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis✝ : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\nhf_maps_to : MapsTo f s s\nc : ℝ := ⨆ (e : ↑s), dist (↑↑e z) z\nthis : c ≤ c / 2\n⊢ ∀ (e : PE ≃ᵢ PE), ↑e x = x → ↑e y = y → ↑e z = z\n[PROOFSTEP]\nreplace : c ≤ 0\n[GOAL]\ncase this\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis✝ : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\nhf_maps_to : MapsTo f s s\nc : ℝ := ⨆ (e : ↑s), dist (↑↑e z) z\nthis : c ≤ c / 2\n⊢ c ≤ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis✝ : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\nhf_maps_to : MapsTo f s s\nc : ℝ := ⨆ (e : ↑s), dist (↑↑e z) z\nthis : c ≤ 0\n⊢ ∀ (e : PE ≃ᵢ PE), ↑e x = x → ↑e y = y → ↑e z = z\n[PROOFSTEP]\nrefine' fun e hx hy => dist_le_zero.1 (le_trans _ this)\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nx y : PE\nz : PE := midpoint ℝ x y\ns : Set (PE ≃ᵢ PE) := {e | ↑e x = x ∧ ↑e y = y}\nthis✝ : Nonempty ↑s\nh_bdd : BddAbove (range fun e => dist (↑↑e z) z)\nR : PE ≃ᵢ PE := toIsometryEquiv (pointReflection ℝ z)\nf : PE ≃ᵢ PE → PE ≃ᵢ PE :=\n  fun e => IsometryEquiv.trans (IsometryEquiv.trans (IsometryEquiv.trans e R) (IsometryEquiv.symm e)) R\nhf_dist : ∀ (e : PE ≃ᵢ PE), dist (↑(f e) z) z = 2 * dist (↑e z) z\nhf_maps_to : MapsTo f s s\nc : ℝ := ⨆ (e : ↑s), dist (↑↑e z) z\nthis : c ≤ 0\ne : PE ≃ᵢ PE\nhx : ↑e x = x\nhy : ↑e y = y\n⊢ dist (↑e z) z ≤ c\n[PROOFSTEP]\nexact le_ciSup h_bdd ⟨e, hx, hy⟩\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : PE ≃ᵢ PF\nx y : PE\n⊢ ↑f (midpoint ℝ x y) = midpoint ℝ (↑f x) (↑f y)\n[PROOFSTEP]\nset e : PE ≃ᵢ PE :=\n  ((f.trans <| (pointReflection ℝ <| midpoint ℝ (f x) (f y)).toIsometryEquiv).trans f.symm).trans\n    (pointReflection ℝ <| midpoint ℝ x y).toIsometryEquiv\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : PE ≃ᵢ PF\nx y : PE\ne : PE ≃ᵢ PE :=\n  IsometryEquiv.trans\n    (IsometryEquiv.trans (IsometryEquiv.trans f (toIsometryEquiv (pointReflection ℝ (midpoint ℝ (↑f x) (↑f y)))))\n      (IsometryEquiv.symm f))\n    (toIsometryEquiv (pointReflection ℝ (midpoint ℝ x y)))\n⊢ ↑f (midpoint ℝ x y) = midpoint ℝ (↑f x) (↑f y)\n[PROOFSTEP]\nhave hx : e x = x := by simp\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : PE ≃ᵢ PF\nx y : PE\ne : PE ≃ᵢ PE :=\n  IsometryEquiv.trans\n    (IsometryEquiv.trans (IsometryEquiv.trans f (toIsometryEquiv (pointReflection ℝ (midpoint ℝ (↑f x) (↑f y)))))\n      (IsometryEquiv.symm f))\n    (toIsometryEquiv (pointReflection ℝ (midpoint ℝ x y)))\n⊢ ↑e x = x\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : PE ≃ᵢ PF\nx y : PE\ne : PE ≃ᵢ PE :=\n  IsometryEquiv.trans\n    (IsometryEquiv.trans (IsometryEquiv.trans f (toIsometryEquiv (pointReflection ℝ (midpoint ℝ (↑f x) (↑f y)))))\n      (IsometryEquiv.symm f))\n    (toIsometryEquiv (pointReflection ℝ (midpoint ℝ x y)))\nhx : ↑e x = x\n⊢ ↑f (midpoint ℝ x y) = midpoint ℝ (↑f x) (↑f y)\n[PROOFSTEP]\nhave hy : e y = y := by simp\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : PE ≃ᵢ PF\nx y : PE\ne : PE ≃ᵢ PE :=\n  IsometryEquiv.trans\n    (IsometryEquiv.trans (IsometryEquiv.trans f (toIsometryEquiv (pointReflection ℝ (midpoint ℝ (↑f x) (↑f y)))))\n      (IsometryEquiv.symm f))\n    (toIsometryEquiv (pointReflection ℝ (midpoint ℝ x y)))\nhx : ↑e x = x\n⊢ ↑e y = y\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : PE ≃ᵢ PF\nx y : PE\ne : PE ≃ᵢ PE :=\n  IsometryEquiv.trans\n    (IsometryEquiv.trans (IsometryEquiv.trans f (toIsometryEquiv (pointReflection ℝ (midpoint ℝ (↑f x) (↑f y)))))\n      (IsometryEquiv.symm f))\n    (toIsometryEquiv (pointReflection ℝ (midpoint ℝ x y)))\nhx : ↑e x = x\nhy : ↑e y = y\n⊢ ↑f (midpoint ℝ x y) = midpoint ℝ (↑f x) (↑f y)\n[PROOFSTEP]\nhave hm := e.midpoint_fixed hx hy\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : PE ≃ᵢ PF\nx y : PE\ne : PE ≃ᵢ PE :=\n  IsometryEquiv.trans\n    (IsometryEquiv.trans (IsometryEquiv.trans f (toIsometryEquiv (pointReflection ℝ (midpoint ℝ (↑f x) (↑f y)))))\n      (IsometryEquiv.symm f))\n    (toIsometryEquiv (pointReflection ℝ (midpoint ℝ x y)))\nhx : ↑e x = x\nhy : ↑e y = y\nhm : ↑e (midpoint ℝ x y) = midpoint ℝ x y\n⊢ ↑f (midpoint ℝ x y) = midpoint ℝ (↑f x) (↑f y)\n[PROOFSTEP]\nsimp only [trans_apply] at hm \n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : PE ≃ᵢ PF\nx y : PE\ne : PE ≃ᵢ PE :=\n  IsometryEquiv.trans\n    (IsometryEquiv.trans (IsometryEquiv.trans f (toIsometryEquiv (pointReflection ℝ (midpoint ℝ (↑f x) (↑f y)))))\n      (IsometryEquiv.symm f))\n    (toIsometryEquiv (pointReflection ℝ (midpoint ℝ x y)))\nhx : ↑e x = x\nhy : ↑e y = y\nhm :\n  ↑(toIsometryEquiv (pointReflection ℝ (midpoint ℝ x y)))\n      (↑(IsometryEquiv.symm f)\n        (↑(toIsometryEquiv (pointReflection ℝ (midpoint ℝ (↑f x) (↑f y)))) (↑f (midpoint ℝ x y)))) =\n    midpoint ℝ x y\n⊢ ↑f (midpoint ℝ x y) = midpoint ℝ (↑f x) (↑f y)\n[PROOFSTEP]\nrwa [← eq_symm_apply, toIsometryEquiv_symm, pointReflection_symm, coe_toIsometryEquiv, coe_toIsometryEquiv,\n  pointReflection_self, symm_apply_eq, @pointReflection_fixed_iff] at hm \n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : E ≃ᵢ F\nh0 : ↑f 0 = 0\nsrc✝ : E →L[ℝ] F :=\n  AddMonoidHom.toRealLinearMap\n    (AddMonoidHom.ofMapMidpoint ℝ ℝ (↑f) h0 (_ : ∀ (x y : E), ↑f (midpoint ℝ x y) = midpoint ℝ (↑f x) (↑f y)))\n    (_ : Continuous ↑f)\nx : E\n⊢ ‖↑f x‖ = ‖x‖\n[PROOFSTEP]\nsimp only [← dist_zero_right, ← h0, f.dist_eq]\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : E ≃ᵢ F\n⊢ ↑(IsometryEquiv.trans f (IsometryEquiv.symm (addRight (↑f 0)))) 0 = 0\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using sub_self (f 0)\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : PE ≃ᵢ PF\np : PE\n⊢ ↑f p =\n    ↑(toRealLinearIsometryEquiv\n            (IsometryEquiv.trans (vaddConst (Classical.arbitrary PE))\n              (IsometryEquiv.trans f (IsometryEquiv.symm (vaddConst (↑f (Classical.arbitrary PE)))))))\n        (p -ᵥ Classical.arbitrary PE) +ᵥ\n      ↑f (Classical.arbitrary PE)\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : PE ≃ᵢ PF\n⊢ toIsometryEquiv (toRealAffineIsometryEquiv f) = f\n[PROOFSTEP]\next\n[GOAL]\ncase H\nE : Type u_1\nPE : Type u_2\nF : Type u_3\nPF : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : MetricSpace PE\ninst✝⁴ : NormedAddTorsor E PE\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : MetricSpace PF\ninst✝ : NormedAddTorsor F PF\nf : PE ≃ᵢ PF\nx✝ : PE\n⊢ ↑(toIsometryEquiv (toRealAffineIsometryEquiv f)) x✝ = ↑f x✝\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.MazurUlam", "llama_tokens": 15838, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947425132315, "lm_q2_score": 0.5544704649604272, "lm_q1q2_score": 0.36311979238145076}}
{"text": "[GOAL]\nF : PFunctor\nn : ℕ\nx : CofixA F (n + 1)\n⊢ x = CofixA.intro (head' x) (children' x)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase intro\nF : PFunctor\nn : ℕ\na✝¹ : F.A\na✝ : B F a✝¹ → CofixA F (Nat.add n 0)\n⊢ CofixA.intro a✝¹ a✝ = CofixA.intro (head' (CofixA.intro a✝¹ a✝)) (children' (CofixA.intro a✝¹ a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nF : PFunctor\nx : CofixA F 0\ny : CofixA F 1\n⊢ Agree x y\n[PROOFSTEP]\nconstructor\n[GOAL]\nF : PFunctor\nn : ℕ\nx : CofixA F (succ n)\ny : CofixA F (succ n + 1)\ni : B F (head' x)\nj : B F (head' y)\nh₀ : HEq i j\nh₁ : Agree x y\n⊢ Agree (children' x i) (children' y j)\n[PROOFSTEP]\ncases' h₁ with _ _ _ _ _ _ hagree\n[GOAL]\ncase intro\nF : PFunctor\nn : ℕ\na✝ : F.A\nx✝ : B F a✝ → CofixA F n\nx'✝ : B F a✝ → CofixA F (n + 1)\nhagree : ∀ (i : B F a✝), Agree (x✝ i) (x'✝ i)\ni : B F (head' (CofixA.intro a✝ x✝))\nj : B F (head' (CofixA.intro a✝ x'✝))\nh₀ : HEq i j\n⊢ Agree (children' (CofixA.intro a✝ x✝) i) (children' (CofixA.intro a✝ x'✝) j)\n[PROOFSTEP]\ncases h₀\n[GOAL]\ncase intro.refl\nF : PFunctor\nn : ℕ\na✝ : F.A\nx✝ : B F a✝ → CofixA F n\nx'✝ : B F a✝ → CofixA F (n + 1)\nhagree : ∀ (i : B F a✝), Agree (x✝ i) (x'✝ i)\ni : B F (head' (CofixA.intro a✝ x✝))\n⊢ Agree (children' (CofixA.intro a✝ x✝) i) (children' (CofixA.intro a✝ x'✝) i)\n[PROOFSTEP]\napply hagree\n[GOAL]\nF : PFunctor\nn : ℕ\nx : CofixA F n\ny : CofixA F (succ n)\nh : Agree x y\n⊢ truncate y = x\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nF : PFunctor\nx : CofixA F zero\ny : CofixA F (succ zero)\nh : Agree x y\n⊢ truncate y = x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase succ\nF : PFunctor\nn✝ : ℕ\nn_ih✝ : ∀ (x : CofixA F n✝) (y : CofixA F (succ n✝)), Agree x y → truncate y = x\nx : CofixA F (succ n✝)\ny : CofixA F (succ (succ n✝))\nh : Agree x y\n⊢ truncate y = x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase zero.continue\nF : PFunctor\ny : CofixA F (succ zero)\nh : Agree CofixA.continue y\n⊢ truncate y = CofixA.continue\n[PROOFSTEP]\ncases y\n[GOAL]\ncase succ.intro\nF : PFunctor\nn✝ : ℕ\nn_ih✝ : ∀ (x : CofixA F n✝) (y : CofixA F (succ n✝)), Agree x y → truncate y = x\ny : CofixA F (succ (succ n✝))\na✝¹ : F.A\na✝ : B F a✝¹ → CofixA F n✝\nh : Agree (CofixA.intro a✝¹ a✝) y\n⊢ truncate y = CofixA.intro a✝¹ a✝\n[PROOFSTEP]\ncases y\n[GOAL]\ncase zero.continue.intro\nF : PFunctor\na✝¹ : F.A\na✝ : B F a✝¹ → CofixA F 0\nh : Agree CofixA.continue (CofixA.intro a✝¹ a✝)\n⊢ truncate (CofixA.intro a✝¹ a✝) = CofixA.continue\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.intro.intro\nF : PFunctor\nn✝ : ℕ\nn_ih✝ : ∀ (x : CofixA F n✝) (y : CofixA F (succ n✝)), Agree x y → truncate y = x\na✝³ : F.A\na✝² : B F a✝³ → CofixA F n✝\na✝¹ : F.A\na✝ : B F a✝¹ → CofixA F (succ n✝)\nh : Agree (CofixA.intro a✝³ a✝²) (CofixA.intro a✝¹ a✝)\n⊢ truncate (CofixA.intro a✝¹ a✝) = CofixA.intro a✝³ a✝²\n[PROOFSTEP]\ncases h\n[GOAL]\ncase succ.intro.intro.intro\nF : PFunctor\nn✝ : ℕ\nn_ih✝ : ∀ (x : CofixA F n✝) (y : CofixA F (succ n✝)), Agree x y → truncate y = x\na✝² : F.A\na✝¹ : B F a✝² → CofixA F n✝\nx'✝ : B F a✝² → CofixA F (n✝ + 1)\na✝ : ∀ (i : B F a✝²), Agree (a✝¹ i) (x'✝ i)\n⊢ truncate (CofixA.intro a✝² x'✝) = CofixA.intro a✝² a✝¹\n[PROOFSTEP]\nsimp only [truncate, Function.comp, true_and_iff, eq_self_iff_true, heq_iff_eq]\n  -- porting note: used to be `ext y`\n[GOAL]\ncase succ.intro.intro.intro\nF : PFunctor\nn✝ : ℕ\nn_ih✝ : ∀ (x : CofixA F n✝) (y : CofixA F (succ n✝)), Agree x y → truncate y = x\na✝² : F.A\na✝¹ : B F a✝² → CofixA F n✝\nx'✝ : B F a✝² → CofixA F (n✝ + 1)\na✝ : ∀ (i : B F a✝²), Agree (a✝¹ i) (x'✝ i)\n⊢ (CofixA.intro a✝² fun x => truncate (x'✝ x)) = CofixA.intro a✝² a✝¹\n[PROOFSTEP]\nrename_i n_ih a f y h₁\n[GOAL]\ncase succ.intro.intro.intro\nF : PFunctor\nn✝ : ℕ\nn_ih : ∀ (x : CofixA F n✝) (y : CofixA F (succ n✝)), Agree x y → truncate y = x\na : F.A\nf : B F a → CofixA F n✝\ny : B F a → CofixA F (n✝ + 1)\nh₁ : ∀ (i : B F a), Agree (f i) (y i)\n⊢ (CofixA.intro a fun x => truncate (y x)) = CofixA.intro a f\n[PROOFSTEP]\nsuffices (fun x => truncate (y x)) = f by simp [this]; try (exact HEq.rfl; )\n[GOAL]\nF : PFunctor\nn✝ : ℕ\nn_ih : ∀ (x : CofixA F n✝) (y : CofixA F (succ n✝)), Agree x y → truncate y = x\na : F.A\nf : B F a → CofixA F n✝\ny : B F a → CofixA F (n✝ + 1)\nh₁ : ∀ (i : B F a), Agree (f i) (y i)\nthis : (fun x => truncate (y x)) = f\n⊢ (CofixA.intro a fun x => truncate (y x)) = CofixA.intro a f\n[PROOFSTEP]\nsimp [this]\n[GOAL]\n\n[PROOFSTEP]\ntry (exact HEq.rfl; )\n[GOAL]\n\n[PROOFSTEP]\nexact HEq.rfl\n[GOAL]\ncase succ.intro.intro.intro\nF : PFunctor\nn✝ : ℕ\nn_ih : ∀ (x : CofixA F n✝) (y : CofixA F (succ n✝)), Agree x y → truncate y = x\na : F.A\nf : B F a → CofixA F n✝\ny : B F a → CofixA F (n✝ + 1)\nh₁ : ∀ (i : B F a), Agree (f i) (y i)\n⊢ (fun x => truncate (y x)) = f\n[PROOFSTEP]\nfunext y\n[GOAL]\ncase succ.intro.intro.intro.h\nF : PFunctor\nn✝ : ℕ\nn_ih : ∀ (x : CofixA F n✝) (y : CofixA F (succ n✝)), Agree x y → truncate y = x\na : F.A\nf : B F a → CofixA F n✝\ny✝ : B F a → CofixA F (n✝ + 1)\nh₁ : ∀ (i : B F a), Agree (f i) (y✝ i)\ny : B F a\n⊢ truncate (y✝ y) = f y\n[PROOFSTEP]\napply n_ih\n[GOAL]\ncase succ.intro.intro.intro.h.h\nF : PFunctor\nn✝ : ℕ\nn_ih : ∀ (x : CofixA F n✝) (y : CofixA F (succ n✝)), Agree x y → truncate y = x\na : F.A\nf : B F a → CofixA F n✝\ny✝ : B F a → CofixA F (n✝ + 1)\nh₁ : ∀ (i : B F a), Agree (f i) (y✝ i)\ny : B F a\n⊢ Agree (f y) (y✝ y)\n[PROOFSTEP]\napply h₁\n[GOAL]\nF : PFunctor\nX : Type w\nf : X → Obj F X\ni : X\nn : ℕ\n⊢ Agree (sCorec f i n) (sCorec f i (succ n))\n[PROOFSTEP]\ninduction' n with n n_ih generalizing i\n[GOAL]\ncase zero\nF : PFunctor\nX : Type w\nf : X → Obj F X\ni✝ i : X\n⊢ Agree (sCorec f i zero) (sCorec f i (succ zero))\ncase succ\nF : PFunctor\nX : Type w\nf : X → Obj F X\ni✝ : X\nn : ℕ\nn_ih : ∀ (i : X), Agree (sCorec f i n) (sCorec f i (succ n))\ni : X\n⊢ Agree (sCorec f i (succ n)) (sCorec f i (succ (succ n)))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ\nF : PFunctor\nX : Type w\nf : X → Obj F X\ni✝ : X\nn : ℕ\nn_ih : ∀ (i : X), Agree (sCorec f i n) (sCorec f i (succ n))\ni : X\n⊢ Agree (sCorec f i (succ n)) (sCorec f i (succ (succ n)))\n[PROOFSTEP]\ncases' h : f i with y g\n[GOAL]\ncase succ.mk\nF : PFunctor\nX : Type w\nf : X → Obj F X\ni✝ : X\nn : ℕ\nn_ih : ∀ (i : X), Agree (sCorec f i n) (sCorec f i (succ n))\ni : X\ny : F.A\ng : B F y → X\nh : f i = { fst := y, snd := g }\n⊢ Agree (sCorec f i (succ n)) (sCorec f i (succ (succ n)))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.mk.a\nF : PFunctor\nX : Type w\nf : X → Obj F X\ni✝ : X\nn : ℕ\nn_ih : ∀ (i : X), Agree (sCorec f i n) (sCorec f i (succ n))\ni : X\ny : F.A\ng : B F y → X\nh : f i = { fst := y, snd := g }\n⊢ ∀ (i_1 : B F (f i).fst), Agree (sCorec f (Sigma.snd (f i) i_1) n) (sCorec f (Sigma.snd (f i) i_1) (succ n))\n[PROOFSTEP]\nintrov\n[GOAL]\ncase succ.mk.a\nF : PFunctor\nX : Type w\nf : X → Obj F X\ni✝¹ : X\nn : ℕ\nn_ih : ∀ (i : X), Agree (sCorec f i n) (sCorec f i (succ n))\ni✝ : X\ny : F.A\ng : B F y → X\nh : f i✝ = { fst := y, snd := g }\ni : B F (f i✝).fst\n⊢ Agree (sCorec f (Sigma.snd (f i✝) i) n) (sCorec f (Sigma.snd (f i✝) i) (succ n))\n[PROOFSTEP]\napply n_ih\n[GOAL]\nF : PFunctor\nX : Type w\nf : X → Obj F X\n⊢ ∀ (a b : CofixA F 0), a = b\n[PROOFSTEP]\nrintro ⟨⟩ ⟨⟩\n[GOAL]\ncase continue.continue\nF : PFunctor\nX : Type w\nf : X → Obj F X\n⊢ continue = continue\n[PROOFSTEP]\nrfl\n[GOAL]\nF : PFunctor\nX : Type w\nf : X → Obj F X\nn m : ℕ\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\n⊢ head' (x (succ n)) = head' (x (succ m))\n[PROOFSTEP]\nsuffices ∀ n, head' (x (succ n)) = head' (x 1) by simp [this]\n[GOAL]\nF : PFunctor\nX : Type w\nf : X → Obj F X\nn m : ℕ\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nthis : ∀ (n : ℕ), head' (x (succ n)) = head' (x 1)\n⊢ head' (x (succ n)) = head' (x (succ m))\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nF : PFunctor\nX : Type w\nf : X → Obj F X\nn m : ℕ\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\n⊢ ∀ (n : ℕ), head' (x (succ n)) = head' (x 1)\n[PROOFSTEP]\nclear m n\n[GOAL]\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\n⊢ ∀ (n : ℕ), head' (x (succ n)) = head' (x 1)\n[PROOFSTEP]\nintro n\n[GOAL]\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn : ℕ\n⊢ head' (x (succ n)) = head' (x 1)\n[PROOFSTEP]\ncases' h₀ : x (succ n) with _ i₀ f₀\n[GOAL]\ncase intro\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn : ℕ\ni₀ : F.A\nf₀ : B F i₀ → CofixA F n\nh₀ : x (succ n) = CofixA.intro i₀ f₀\n⊢ head' (CofixA.intro i₀ f₀) = head' (x 1)\n[PROOFSTEP]\ncases' h₁ : x 1 with _ i₁ f₁\n[GOAL]\ncase intro.intro\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn : ℕ\ni₀ : F.A\nf₀ : B F i₀ → CofixA F n\nh₀ : x (succ n) = CofixA.intro i₀ f₀\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\n⊢ head' (CofixA.intro i₀ f₀) = head' (CofixA.intro i₁ f₁)\n[PROOFSTEP]\ndsimp only [head']\n[GOAL]\ncase intro.intro\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn : ℕ\ni₀ : F.A\nf₀ : B F i₀ → CofixA F n\nh₀ : x (succ n) = CofixA.intro i₀ f₀\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\n⊢ i₀ = i₁\n[PROOFSTEP]\ninduction' n with n n_ih\n[GOAL]\ncase intro.intro.zero\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n\nh₀✝ : x (succ n) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nf₀ : B F i₀ → CofixA F zero\nh₀ : x (succ zero) = CofixA.intro i₀ f₀\n⊢ i₀ = i₁\n[PROOFSTEP]\nrw [h₁] at h₀ \n[GOAL]\ncase intro.intro.zero\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n\nh₀✝ : x (succ n) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nf₀ : B F i₀ → CofixA F zero\nh₀ : CofixA.intro i₁ f₁ = CofixA.intro i₀ f₀\n⊢ i₀ = i₁\n[PROOFSTEP]\ncases h₀\n[GOAL]\ncase intro.intro.zero.refl\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n\nh₀ : x (succ n) = CofixA.intro i₀ f₀✝\nf₀ : B F i₀ → CofixA F zero\nh₁ : x 1 = CofixA.intro i₀ f₀\n⊢ i₀ = i₀\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase intro.intro.succ\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn✝ : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n✝\nh₀✝ : x (succ n✝) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nn : ℕ\nn_ih : ∀ (f₀ : B F i₀ → CofixA F n), x (succ n) = CofixA.intro i₀ f₀ → i₀ = i₁\nf₀ : B F i₀ → CofixA F (succ n)\nh₀ : x (succ (succ n)) = CofixA.intro i₀ f₀\n⊢ i₀ = i₁\n[PROOFSTEP]\nhave H := Hconsistent (succ n)\n[GOAL]\ncase intro.intro.succ\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn✝ : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n✝\nh₀✝ : x (succ n✝) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nn : ℕ\nn_ih : ∀ (f₀ : B F i₀ → CofixA F n), x (succ n) = CofixA.intro i₀ f₀ → i₀ = i₁\nf₀ : B F i₀ → CofixA F (succ n)\nh₀ : x (succ (succ n)) = CofixA.intro i₀ f₀\nH : Agree (x (succ n)) (x (succ (succ n)))\n⊢ i₀ = i₁\n[PROOFSTEP]\ncases' h₂ : x (succ n) with _ i₂ f₂\n[GOAL]\ncase intro.intro.succ.intro\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn✝ : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n✝\nh₀✝ : x (succ n✝) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nn : ℕ\nn_ih : ∀ (f₀ : B F i₀ → CofixA F n), x (succ n) = CofixA.intro i₀ f₀ → i₀ = i₁\nf₀ : B F i₀ → CofixA F (succ n)\nh₀ : x (succ (succ n)) = CofixA.intro i₀ f₀\nH : Agree (x (succ n)) (x (succ (succ n)))\ni₂ : F.A\nf₂ : B F i₂ → CofixA F n\nh₂ : x (succ n) = CofixA.intro i₂ f₂\n⊢ i₀ = i₁\n[PROOFSTEP]\nrw [h₀, h₂] at H \n[GOAL]\ncase intro.intro.succ.intro\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn✝ : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n✝\nh₀✝ : x (succ n✝) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nn : ℕ\nn_ih : ∀ (f₀ : B F i₀ → CofixA F n), x (succ n) = CofixA.intro i₀ f₀ → i₀ = i₁\nf₀ : B F i₀ → CofixA F (succ n)\nh₀ : x (succ (succ n)) = CofixA.intro i₀ f₀\ni₂ : F.A\nf₂ : B F i₂ → CofixA F n\nH : Agree (CofixA.intro i₂ f₂) (CofixA.intro i₀ f₀)\nh₂ : x (succ n) = CofixA.intro i₂ f₂\n⊢ i₀ = i₁\n[PROOFSTEP]\napply n_ih (truncate ∘ f₀)\n[GOAL]\ncase intro.intro.succ.intro\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn✝ : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n✝\nh₀✝ : x (succ n✝) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nn : ℕ\nn_ih : ∀ (f₀ : B F i₀ → CofixA F n), x (succ n) = CofixA.intro i₀ f₀ → i₀ = i₁\nf₀ : B F i₀ → CofixA F (succ n)\nh₀ : x (succ (succ n)) = CofixA.intro i₀ f₀\ni₂ : F.A\nf₂ : B F i₂ → CofixA F n\nH : Agree (CofixA.intro i₂ f₂) (CofixA.intro i₀ f₀)\nh₂ : x (succ n) = CofixA.intro i₂ f₂\n⊢ x (succ n) = CofixA.intro i₀ (truncate ∘ f₀)\n[PROOFSTEP]\nrw [h₂]\n[GOAL]\ncase intro.intro.succ.intro\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn✝ : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n✝\nh₀✝ : x (succ n✝) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nn : ℕ\nn_ih : ∀ (f₀ : B F i₀ → CofixA F n), x (succ n) = CofixA.intro i₀ f₀ → i₀ = i₁\nf₀ : B F i₀ → CofixA F (succ n)\nh₀ : x (succ (succ n)) = CofixA.intro i₀ f₀\ni₂ : F.A\nf₂ : B F i₂ → CofixA F n\nH : Agree (CofixA.intro i₂ f₂) (CofixA.intro i₀ f₀)\nh₂ : x (succ n) = CofixA.intro i₂ f₂\n⊢ CofixA.intro i₂ f₂ = CofixA.intro i₀ (truncate ∘ f₀)\n[PROOFSTEP]\ncases' H with _ _ _ _ _ _ hagree\n[GOAL]\ncase intro.intro.succ.intro.intro\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn✝ : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n✝\nh₀✝ : x (succ n✝) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nn : ℕ\nn_ih : ∀ (f₀ : B F i₀ → CofixA F n), x (succ n) = CofixA.intro i₀ f₀ → i₀ = i₁\nf₀ : B F i₀ → CofixA F (succ n)\nh₀ : x (succ (succ n)) = CofixA.intro i₀ f₀\nf₂ : B F i₀ → CofixA F n\nh₂ : x (succ n) = CofixA.intro i₀ f₂\nhagree : ∀ (i : B F i₀), Agree (f₂ i) (f₀ i)\n⊢ CofixA.intro i₀ f₂ = CofixA.intro i₀ (truncate ∘ f₀)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.intro.succ.intro.intro.e_a\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn✝ : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n✝\nh₀✝ : x (succ n✝) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nn : ℕ\nn_ih : ∀ (f₀ : B F i₀ → CofixA F n), x (succ n) = CofixA.intro i₀ f₀ → i₀ = i₁\nf₀ : B F i₀ → CofixA F (succ n)\nh₀ : x (succ (succ n)) = CofixA.intro i₀ f₀\nf₂ : B F i₀ → CofixA F n\nh₂ : x (succ n) = CofixA.intro i₀ f₂\nhagree : ∀ (i : B F i₀), Agree (f₂ i) (f₀ i)\n⊢ f₂ = truncate ∘ f₀\n[PROOFSTEP]\nfunext j\n[GOAL]\ncase intro.intro.succ.intro.intro.e_a.h\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn✝ : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n✝\nh₀✝ : x (succ n✝) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nn : ℕ\nn_ih : ∀ (f₀ : B F i₀ → CofixA F n), x (succ n) = CofixA.intro i₀ f₀ → i₀ = i₁\nf₀ : B F i₀ → CofixA F (succ n)\nh₀ : x (succ (succ n)) = CofixA.intro i₀ f₀\nf₂ : B F i₀ → CofixA F n\nh₂ : x (succ n) = CofixA.intro i₀ f₂\nhagree : ∀ (i : B F i₀), Agree (f₂ i) (f₀ i)\nj : B F i₀\n⊢ f₂ j = (truncate ∘ f₀) j\n[PROOFSTEP]\ndsimp only [comp_apply]\n[GOAL]\ncase intro.intro.succ.intro.intro.e_a.h\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn✝ : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n✝\nh₀✝ : x (succ n✝) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nn : ℕ\nn_ih : ∀ (f₀ : B F i₀ → CofixA F n), x (succ n) = CofixA.intro i₀ f₀ → i₀ = i₁\nf₀ : B F i₀ → CofixA F (succ n)\nh₀ : x (succ (succ n)) = CofixA.intro i₀ f₀\nf₂ : B F i₀ → CofixA F n\nh₂ : x (succ n) = CofixA.intro i₀ f₂\nhagree : ∀ (i : B F i₀), Agree (f₂ i) (f₀ i)\nj : B F i₀\n⊢ f₂ j = truncate (f₀ j)\n[PROOFSTEP]\nrw [truncate_eq_of_agree]\n[GOAL]\ncase intro.intro.succ.intro.intro.e_a.h.h\nF : PFunctor\nX : Type w\nf : X → Obj F X\nx : (n : ℕ) → CofixA F n\nHconsistent : AllAgree x\nn✝ : ℕ\ni₀ : F.A\nf₀✝ : B F i₀ → CofixA F n✝\nh₀✝ : x (succ n✝) = CofixA.intro i₀ f₀✝\ni₁ : F.A\nf₁ : B F i₁ → CofixA F 0\nh₁ : x 1 = CofixA.intro i₁ f₁\nn : ℕ\nn_ih : ∀ (f₀ : B F i₀ → CofixA F n), x (succ n) = CofixA.intro i₀ f₀ → i₀ = i₁\nf₀ : B F i₀ → CofixA F (succ n)\nh₀ : x (succ (succ n)) = CofixA.intro i₀ f₀\nf₂ : B F i₀ → CofixA F n\nh₂ : x (succ n) = CofixA.intro i₀ f₂\nhagree : ∀ (i : B F i₀), Agree (f₂ i) (f₀ i)\nj : B F i₀\n⊢ Agree (f₂ j) (f₀ j)\n[PROOFSTEP]\napply hagree\n[GOAL]\nF : PFunctor\ninst✝ : Inhabited F.A\n⊢ Inhabited (M F)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nF : PFunctor\nx y : M F\nH : ∀ (i : ℕ), MIntl.approx x i = MIntl.approx y i\n⊢ x = y\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nF : PFunctor\ny : M F\napprox✝ : (n : ℕ) → CofixA F n\nconsistent✝ : AllAgree approx✝\nH : ∀ (i : ℕ), MIntl.approx { approx := approx✝, consistent := consistent✝ } i = MIntl.approx y i\n⊢ { approx := approx✝, consistent := consistent✝ } = y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nF : PFunctor\napprox✝¹ : (n : ℕ) → CofixA F n\nconsistent✝¹ : AllAgree approx✝¹\napprox✝ : (n : ℕ) → CofixA F n\nconsistent✝ : AllAgree approx✝\nH :\n  ∀ (i : ℕ),\n    MIntl.approx { approx := approx✝¹, consistent := consistent✝¹ } i =\n      MIntl.approx { approx := approx✝, consistent := consistent✝ } i\n⊢ { approx := approx✝¹, consistent := consistent✝¹ } = { approx := approx✝, consistent := consistent✝ }\n[PROOFSTEP]\ncongr with n\n[GOAL]\ncase mk.mk.e_approx.h\nF : PFunctor\napprox✝¹ : (n : ℕ) → CofixA F n\nconsistent✝¹ : AllAgree approx✝¹\napprox✝ : (n : ℕ) → CofixA F n\nconsistent✝ : AllAgree approx✝\nH :\n  ∀ (i : ℕ),\n    MIntl.approx { approx := approx✝¹, consistent := consistent✝¹ } i =\n      MIntl.approx { approx := approx✝, consistent := consistent✝ } i\nn : ℕ\n⊢ approx✝¹ n = approx✝ n\n[PROOFSTEP]\napply H\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\ni : B F (head x)\nH : ∀ (n : ℕ), head' (MIntl.approx x (succ n)) = head' (MIntl.approx x (succ 0)) :=\n  fun n => head_succ' n 0 x.approx x.consistent\nn : ℕ\n⊢ head x = head' (MIntl.approx x (succ n))\n[PROOFSTEP]\nsimp only [head, H]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\ni : B F (head x)\nH : ∀ (n : ℕ), head' (MIntl.approx x (succ n)) = head' (MIntl.approx x (succ 0)) :=\n  fun n => head_succ' n 0 x.approx x.consistent\n⊢ AllAgree fun n =>\n    children' (MIntl.approx x (succ n)) (cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ n)))) i)\n[PROOFSTEP]\nintro n\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\ni : B F (head x)\nH : ∀ (n : ℕ), head' (MIntl.approx x (succ n)) = head' (MIntl.approx x (succ 0)) :=\n  fun n => head_succ' n 0 x.approx x.consistent\nn : ℕ\n⊢ Agree\n    ((fun n => children' (MIntl.approx x (succ n)) (cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ n)))) i))\n      n)\n    ((fun n => children' (MIntl.approx x (succ n)) (cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ n)))) i))\n      (succ n))\n[PROOFSTEP]\nhave P' := x.2 (succ n)\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\ni : B F (head x)\nH : ∀ (n : ℕ), head' (MIntl.approx x (succ n)) = head' (MIntl.approx x (succ 0)) :=\n  fun n => head_succ' n 0 x.approx x.consistent\nn : ℕ\nP' : Agree (MIntl.approx x (succ n)) (MIntl.approx x (succ (succ n)))\n⊢ Agree\n    ((fun n => children' (MIntl.approx x (succ n)) (cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ n)))) i))\n      n)\n    ((fun n => children' (MIntl.approx x (succ n)) (cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ n)))) i))\n      (succ n))\n[PROOFSTEP]\napply agree_children _ _ _ P'\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\ni : B F (head x)\nH : ∀ (n : ℕ), head' (MIntl.approx x (succ n)) = head' (MIntl.approx x (succ 0)) :=\n  fun n => head_succ' n 0 x.approx x.consistent\nn : ℕ\nP' : Agree (MIntl.approx x (succ n)) (MIntl.approx x (succ (succ n)))\n⊢ HEq (cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ n)))) i)\n    (cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ (succ n))))) i)\n[PROOFSTEP]\ntrans i\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\ni : B F (head x)\nH : ∀ (n : ℕ), head' (MIntl.approx x (succ n)) = head' (MIntl.approx x (succ 0)) :=\n  fun n => head_succ' n 0 x.approx x.consistent\nn : ℕ\nP' : Agree (MIntl.approx x (succ n)) (MIntl.approx x (succ (succ n)))\n⊢ HEq (cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ n)))) i) i\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\ni : B F (head x)\nH : ∀ (n : ℕ), head' (MIntl.approx x (succ n)) = head' (MIntl.approx x (succ 0)) :=\n  fun n => head_succ' n 0 x.approx x.consistent\nn : ℕ\nP' : Agree (MIntl.approx x (succ n)) (MIntl.approx x (succ (succ n)))\n⊢ HEq i (cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ (succ n))))) i)\n[PROOFSTEP]\napply cast_heq\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\ni : B F (head x)\nH : ∀ (n : ℕ), head' (MIntl.approx x (succ n)) = head' (MIntl.approx x (succ 0)) :=\n  fun n => head_succ' n 0 x.approx x.consistent\nn : ℕ\nP' : Agree (MIntl.approx x (succ n)) (MIntl.approx x (succ (succ n)))\n⊢ HEq i (cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ (succ n))))) i)\n[PROOFSTEP]\nsymm\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\ni : B F (head x)\nH : ∀ (n : ℕ), head' (MIntl.approx x (succ n)) = head' (MIntl.approx x (succ 0)) :=\n  fun n => head_succ' n 0 x.approx x.consistent\nn : ℕ\nP' : Agree (MIntl.approx x (succ n)) (MIntl.approx x (succ (succ n)))\n⊢ HEq (cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ (succ n))))) i) i\n[PROOFSTEP]\napply cast_heq\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\ni : IdxCat F\nx : M F\nH' : i.fst = head x\n⊢ i.fst = head x\n[PROOFSTEP]\nsimp only [head, H']\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : Obj F (M F)\n⊢ Agree (Approx.sMk x 0) (Approx.sMk x (succ 0))\n[PROOFSTEP]\nconstructor\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : Obj F (M F)\nn : ℕ\n⊢ Agree (Approx.sMk x (succ n)) (Approx.sMk x (succ (succ n)))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : Obj F (M F)\nn : ℕ\n⊢ ∀ (i : B F x.fst), Agree (MIntl.approx (Sigma.snd x i) n) (MIntl.approx (Sigma.snd x i) (succ n))\n[PROOFSTEP]\nintrov\n[GOAL]\ncase a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : Obj F (M F)\nn : ℕ\ni : B F x.fst\n⊢ Agree (MIntl.approx (Sigma.snd x i) n) (MIntl.approx (Sigma.snd x i) (succ n))\n[PROOFSTEP]\napply (x.2 i).consistent\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : Obj F (M F)\n⊢ dest (M.mk x) = x\n[PROOFSTEP]\nrfl\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\n⊢ M.mk (dest x) = x\n[PROOFSTEP]\napply ext'\n[GOAL]\ncase H\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\n⊢ ∀ (i : ℕ), MIntl.approx (M.mk (dest x)) i = MIntl.approx x i\n[PROOFSTEP]\nintro n\n[GOAL]\ncase H\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\n⊢ MIntl.approx (M.mk (dest x)) n = MIntl.approx x n\n[PROOFSTEP]\ndsimp only [M.mk]\n[GOAL]\ncase H\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\n⊢ Approx.sMk (dest x) n = MIntl.approx x n\n[PROOFSTEP]\ninduction' n with n\n[GOAL]\ncase H.zero\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\n⊢ Approx.sMk (dest x) zero = MIntl.approx x zero\n[PROOFSTEP]\napply @Subsingleton.elim _ CofixA.instSubsingleton\n[GOAL]\ncase H.succ\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\n⊢ Approx.sMk (dest x) (succ n) = MIntl.approx x (succ n)\n[PROOFSTEP]\ndsimp only [Approx.sMk, dest, head]\n[GOAL]\ncase H.succ\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\n⊢ (CofixA.intro (head' (MIntl.approx x 1)) fun i => MIntl.approx (children x i) n) = MIntl.approx x (succ n)\n[PROOFSTEP]\ncases' h : x.approx (succ n) with _ hd ch\n[GOAL]\ncase H.succ.intro\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nch : B F hd → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro hd ch\n⊢ (CofixA.intro (head' (MIntl.approx x 1)) fun i => MIntl.approx (children x i) n) = CofixA.intro hd ch\n[PROOFSTEP]\nhave h' : hd = head' (x.approx 1) := by\n  rw [← head_succ' n, h, head']\n  apply x.consistent\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nch : B F hd → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro hd ch\n⊢ hd = head' (MIntl.approx x 1)\n[PROOFSTEP]\nrw [← head_succ' n, h, head']\n[GOAL]\ncase Hconsistent\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nch : B F hd → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro hd ch\n⊢ AllAgree x.approx\n[PROOFSTEP]\napply x.consistent\n[GOAL]\ncase H.succ.intro\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nch : B F hd → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro hd ch\nh' : hd = head' (MIntl.approx x 1)\n⊢ (CofixA.intro (head' (MIntl.approx x 1)) fun i => MIntl.approx (children x i) n) = CofixA.intro hd ch\n[PROOFSTEP]\nrevert ch\n[GOAL]\ncase H.succ.intro\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nh' : hd = head' (MIntl.approx x 1)\n⊢ ∀ (ch : B F hd → CofixA F n),\n    MIntl.approx x (succ n) = CofixA.intro hd ch →\n      (CofixA.intro (head' (MIntl.approx x 1)) fun i => MIntl.approx (children x i) n) = CofixA.intro hd ch\n[PROOFSTEP]\nrw [h']\n[GOAL]\ncase H.succ.intro\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nh' : hd = head' (MIntl.approx x 1)\n⊢ ∀ (ch : B F (head' (MIntl.approx x 1)) → CofixA F n),\n    MIntl.approx x (succ n) = CofixA.intro (head' (MIntl.approx x 1)) ch →\n      (CofixA.intro (head' (MIntl.approx x 1)) fun i => MIntl.approx (children x i) n) =\n        CofixA.intro (head' (MIntl.approx x 1)) ch\n[PROOFSTEP]\nintros ch h\n[GOAL]\ncase H.succ.intro\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nh' : hd = head' (MIntl.approx x 1)\nch : B F (head' (MIntl.approx x 1)) → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro (head' (MIntl.approx x 1)) ch\n⊢ (CofixA.intro (head' (MIntl.approx x 1)) fun i => MIntl.approx (children x i) n) =\n    CofixA.intro (head' (MIntl.approx x 1)) ch\n[PROOFSTEP]\ncongr\n[GOAL]\ncase H.succ.intro.e_a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nh' : hd = head' (MIntl.approx x 1)\nch : B F (head' (MIntl.approx x 1)) → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro (head' (MIntl.approx x 1)) ch\n⊢ (fun i => MIntl.approx (children x i) n) = ch\n[PROOFSTEP]\next a\n[GOAL]\ncase H.succ.intro.e_a.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nh' : hd = head' (MIntl.approx x 1)\nch : B F (head' (MIntl.approx x 1)) → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro (head' (MIntl.approx x 1)) ch\na : B F (head' (MIntl.approx x 1))\n⊢ MIntl.approx (children x a) n = ch a\n[PROOFSTEP]\ndsimp only [children]\n[GOAL]\ncase H.succ.intro.e_a.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nh' : hd = head' (MIntl.approx x 1)\nch : B F (head' (MIntl.approx x 1)) → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro (head' (MIntl.approx x 1)) ch\na : B F (head' (MIntl.approx x 1))\n⊢ children' (MIntl.approx x (succ n)) (cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ n)))) a) = ch a\n[PROOFSTEP]\ngeneralize hh : cast _ a = a''\n[GOAL]\ncase H.succ.intro.e_a.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nh' : hd = head' (MIntl.approx x 1)\nch : B F (head' (MIntl.approx x 1)) → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro (head' (MIntl.approx x 1)) ch\na : B F (head' (MIntl.approx x 1))\na'' : B F (head' (MIntl.approx x (succ n)))\nhh : cast (_ : B F (head x) = B F (head' (MIntl.approx x (succ n)))) a = a''\n⊢ children' (MIntl.approx x (succ n)) a'' = ch a\n[PROOFSTEP]\nrw [cast_eq_iff_heq] at hh \n[GOAL]\ncase H.succ.intro.e_a.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nh' : hd = head' (MIntl.approx x 1)\nch : B F (head' (MIntl.approx x 1)) → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro (head' (MIntl.approx x 1)) ch\na : B F (head' (MIntl.approx x 1))\na'' : B F (head' (MIntl.approx x (succ n)))\nhh : HEq a a''\n⊢ children' (MIntl.approx x (succ n)) a'' = ch a\n[PROOFSTEP]\nrevert a''\n[GOAL]\ncase H.succ.intro.e_a.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nh' : hd = head' (MIntl.approx x 1)\nch : B F (head' (MIntl.approx x 1)) → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro (head' (MIntl.approx x 1)) ch\na : B F (head' (MIntl.approx x 1))\n⊢ ∀ (a'' : B F (head' (MIntl.approx x (succ n)))), HEq a a'' → children' (MIntl.approx x (succ n)) a'' = ch a\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase H.succ.intro.e_a.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nh' : hd = head' (MIntl.approx x 1)\nch : B F (head' (MIntl.approx x 1)) → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro (head' (MIntl.approx x 1)) ch\na : B F (head' (MIntl.approx x 1))\n⊢ ∀ (a'' : B F (head' (CofixA.intro (head' (MIntl.approx x 1)) ch))),\n    HEq a a'' → children' (CofixA.intro (head' (MIntl.approx x 1)) ch) a'' = ch a\n[PROOFSTEP]\nintros _ hh\n[GOAL]\ncase H.succ.intro.e_a.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nh' : hd = head' (MIntl.approx x 1)\nch : B F (head' (MIntl.approx x 1)) → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro (head' (MIntl.approx x 1)) ch\na : B F (head' (MIntl.approx x 1))\na''✝ : B F (head' (CofixA.intro (head' (MIntl.approx x 1)) ch))\nhh : HEq a a''✝\n⊢ children' (CofixA.intro (head' (MIntl.approx x 1)) ch) a''✝ = ch a\n[PROOFSTEP]\ncases hh\n[GOAL]\ncase H.succ.intro.e_a.h.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn : ℕ\nn_ih✝ : Approx.sMk (dest x) n = MIntl.approx x n\nhd : F.A\nh' : hd = head' (MIntl.approx x 1)\nch : B F (head' (MIntl.approx x 1)) → CofixA F n\nh : MIntl.approx x (succ n) = CofixA.intro (head' (MIntl.approx x 1)) ch\na : B F (head' (MIntl.approx x 1))\n⊢ children' (CofixA.intro (head' (MIntl.approx x 1)) ch) a = ch a\n[PROOFSTEP]\nrfl\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx y : Obj F (M F)\nh : M.mk x = M.mk y\n⊢ x = y\n[PROOFSTEP]\nrw [← dest_mk x, h, dest_mk]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nr : M F → Sort w\nf : (x : Obj F (M F)) → r (M.mk x)\nx : M F\nthis : r (M.mk (dest x))\n⊢ r x\n[PROOFSTEP]\nrw [← mk_dest x]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nr : M F → Sort w\nf : (x : Obj F (M F)) → r (M.mk x)\nx : M F\nthis : r (M.mk (dest x))\n⊢ r (M.mk (dest x))\n[PROOFSTEP]\nexact this\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx : M F\n⊢ Agree' n x x\n[PROOFSTEP]\ninduction' n with _ n_ih generalizing x\n[GOAL]\ncase zero\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx✝ x : M F\n⊢ Agree' zero x x\n[PROOFSTEP]\ninduction x using PFunctor.M.casesOn'\n[GOAL]\ncase succ\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx✝ : M F\nn✝ : ℕ\nn_ih : ∀ (x : M F), Agree' n✝ x x\nx : M F\n⊢ Agree' (succ n✝) x x\n[PROOFSTEP]\ninduction x using PFunctor.M.casesOn'\n[GOAL]\ncase zero.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\na✝ : F.A\nf✝ : B F a✝ → M F\n⊢ Agree' zero (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f✝ })\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn✝ : ℕ\nn_ih : ∀ (x : M F), Agree' n✝ x x\na✝ : F.A\nf✝ : B F a✝ → M F\n⊢ Agree' (succ n✝) (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f✝ })\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.f.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn✝ : ℕ\nn_ih : ∀ (x : M F), Agree' n✝ x x\na✝ : F.A\nf✝ : B F a✝ → M F\n⊢ M.mk { fst := a✝, snd := f✝ } = M.mk { fst := ?succ.f.a, snd := ?succ.f.x }\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase succ.f.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn✝ : ℕ\nn_ih : ∀ (x : M F), Agree' n✝ x x\na✝ : F.A\nf✝ : B F a✝ → M F\n⊢ M.mk { fst := a✝, snd := f✝ } = M.mk { fst := ?succ.f.a, snd := ?succ.f.x }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.f.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn✝ : ℕ\nn_ih : ∀ (x : M F), Agree' n✝ x x\na✝ : F.A\nf✝ : B F a✝ → M F\n⊢ M.mk { fst := a✝, snd := f✝ } = M.mk { fst := a✝, snd := ?succ.f.y }\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase succ.f.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn✝ : ℕ\nn_ih : ∀ (x : M F), Agree' n✝ x x\na✝ : F.A\nf✝ : B F a✝ → M F\n⊢ M.mk { fst := a✝, snd := f✝ } = M.mk { fst := a✝, snd := ?succ.f.y }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.f.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn✝ : ℕ\nn_ih : ∀ (x : M F), Agree' n✝ x x\na✝ : F.A\nf✝ : B F a✝ → M F\n⊢ ∀ (i : B F a✝), Agree' n✝ (f✝ i) (f✝ i)\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase succ.f.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn✝ : ℕ\nn_ih : ∀ (x : M F), Agree' n✝ x x\na✝ : F.A\nf✝ : B F a✝ → M F\n⊢ ∀ (i : B F a✝), Agree' n✝ (f✝ i) (f✝ i)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.f.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn✝ : ℕ\nn_ih : ∀ (x : M F), Agree' n✝ x x\na✝ : F.A\nf✝ : B F a✝ → M F\n⊢ ∀ (i : B F a✝), Agree' n✝ (f✝ i) (f✝ i)\n[PROOFSTEP]\nintros\n[GOAL]\ncase succ.f.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : M F\nn✝ : ℕ\nn_ih : ∀ (x : M F), Agree' n✝ x x\na✝ : F.A\nf✝ : B F a✝ → M F\ni✝ : B F a✝\n⊢ Agree' n✝ (f✝ i✝) (f✝ i✝)\n[PROOFSTEP]\napply n_ih\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\n⊢ Agree (MIntl.approx x n) (MIntl.approx y (n + 1)) ↔ Agree' n x y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\n⊢ Agree (MIntl.approx x n) (MIntl.approx y (n + 1)) → Agree' n x y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\n⊢ Agree' n x y → Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\n⊢ Agree' n x y\n[PROOFSTEP]\ninduction' n with _ n_ih generalizing x y\n[GOAL]\ncase mp.zero\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh✝ : Agree (MIntl.approx x✝ n) (MIntl.approx y✝ (n + 1))\nx y : M F\nh : Agree (MIntl.approx x zero) (MIntl.approx y (zero + 1))\n⊢ Agree' zero x y\ncase mp.succ\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh✝ : Agree (MIntl.approx x✝ n) (MIntl.approx y✝ (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\nx y : M F\nh : Agree (MIntl.approx x (succ n✝)) (MIntl.approx y (succ n✝ + 1))\n⊢ Agree' (succ n✝) x y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.succ\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh✝ : Agree (MIntl.approx x✝ n) (MIntl.approx y✝ (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\nx y : M F\nh : Agree (MIntl.approx x (succ n✝)) (MIntl.approx y (succ n✝ + 1))\n⊢ Agree' (succ n✝) x y\n[PROOFSTEP]\ninduction x using PFunctor.M.casesOn'\n[GOAL]\ncase mp.succ.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y✝ : M F\nh✝ : Agree (MIntl.approx x n) (MIntl.approx y✝ (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\ny : M F\na✝ : F.A\nf✝ : B F a✝ → M F\nh : Agree (MIntl.approx (M.mk { fst := a✝, snd := f✝ }) (succ n✝)) (MIntl.approx y (succ n✝ + 1))\n⊢ Agree' (succ n✝) (M.mk { fst := a✝, snd := f✝ }) y\n[PROOFSTEP]\ninduction y using PFunctor.M.casesOn'\n[GOAL]\ncase mp.succ.f.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh✝ : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\na✝¹ : F.A\nf✝¹ : B F a✝¹ → M F\na✝ : F.A\nf✝ : B F a✝ → M F\nh :\n  Agree (MIntl.approx (M.mk { fst := a✝¹, snd := f✝¹ }) (succ n✝))\n    (MIntl.approx (M.mk { fst := a✝, snd := f✝ }) (succ n✝ + 1))\n⊢ Agree' (succ n✝) (M.mk { fst := a✝¹, snd := f✝¹ }) (M.mk { fst := a✝, snd := f✝ })\n[PROOFSTEP]\nsimp only [approx_mk] at h \n[GOAL]\ncase mp.succ.f.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh✝ : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\na✝¹ : F.A\nf✝¹ : B F a✝¹ → M F\na✝ : F.A\nf✝ : B F a✝ → M F\nh : Agree (CofixA.intro a✝¹ fun j => MIntl.approx (f✝¹ j) n✝) (CofixA.intro a✝ fun j => MIntl.approx (f✝ j) (n✝ + 1))\n⊢ Agree' (succ n✝) (M.mk { fst := a✝¹, snd := f✝¹ }) (M.mk { fst := a✝, snd := f✝ })\n[PROOFSTEP]\ncases' h with _ _ _ _ _ _ hagree\n[GOAL]\ncase mp.succ.f.f.intro\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\na✝ : F.A\nf✝¹ f✝ : B F a✝ → M F\nhagree : ∀ (i : B F a✝), Agree ((fun j => MIntl.approx (f✝¹ j) n✝) i) ((fun j => MIntl.approx (f✝ j) (n✝ + 1)) i)\n⊢ Agree' (succ n✝) (M.mk { fst := a✝, snd := f✝¹ }) (M.mk { fst := a✝, snd := f✝ })\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.succ.f.f.intro.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\na✝ : F.A\nf✝¹ f✝ : B F a✝ → M F\nhagree : ∀ (i : B F a✝), Agree ((fun j => MIntl.approx (f✝¹ j) n✝) i) ((fun j => MIntl.approx (f✝ j) (n✝ + 1)) i)\n⊢ M.mk { fst := a✝, snd := f✝¹ } = M.mk { fst := ?mp.succ.f.f.intro.a, snd := ?mp.succ.f.f.intro.x }\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase mp.succ.f.f.intro.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\na✝ : F.A\nf✝¹ f✝ : B F a✝ → M F\nhagree : ∀ (i : B F a✝), Agree ((fun j => MIntl.approx (f✝¹ j) n✝) i) ((fun j => MIntl.approx (f✝ j) (n✝ + 1)) i)\n⊢ M.mk { fst := a✝, snd := f✝¹ } = M.mk { fst := ?mp.succ.f.f.intro.a, snd := ?mp.succ.f.f.intro.x }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mp.succ.f.f.intro.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\na✝ : F.A\nf✝¹ f✝ : B F a✝ → M F\nhagree : ∀ (i : B F a✝), Agree ((fun j => MIntl.approx (f✝¹ j) n✝) i) ((fun j => MIntl.approx (f✝ j) (n✝ + 1)) i)\n⊢ M.mk { fst := a✝, snd := f✝ } = M.mk { fst := a✝, snd := ?mp.succ.f.f.intro.y }\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase mp.succ.f.f.intro.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\na✝ : F.A\nf✝¹ f✝ : B F a✝ → M F\nhagree : ∀ (i : B F a✝), Agree ((fun j => MIntl.approx (f✝¹ j) n✝) i) ((fun j => MIntl.approx (f✝ j) (n✝ + 1)) i)\n⊢ M.mk { fst := a✝, snd := f✝ } = M.mk { fst := a✝, snd := ?mp.succ.f.f.intro.y }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mp.succ.f.f.intro.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\na✝ : F.A\nf✝¹ f✝ : B F a✝ → M F\nhagree : ∀ (i : B F a✝), Agree ((fun j => MIntl.approx (f✝¹ j) n✝) i) ((fun j => MIntl.approx (f✝ j) (n✝ + 1)) i)\n⊢ ∀ (i : B F a✝), Agree' n✝ (f✝¹ i) (f✝ i)\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase mp.succ.f.f.intro.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\na✝ : F.A\nf✝¹ f✝ : B F a✝ → M F\nhagree : ∀ (i : B F a✝), Agree ((fun j => MIntl.approx (f✝¹ j) n✝) i) ((fun j => MIntl.approx (f✝ j) (n✝ + 1)) i)\n⊢ ∀ (i : B F a✝), Agree' n✝ (f✝¹ i) (f✝ i)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mp.succ.f.f.intro.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\na✝ : F.A\nf✝¹ f✝ : B F a✝ → M F\nhagree : ∀ (i : B F a✝), Agree ((fun j => MIntl.approx (f✝¹ j) n✝) i) ((fun j => MIntl.approx (f✝ j) (n✝ + 1)) i)\n⊢ ∀ (i : B F a✝), Agree' n✝ (f✝¹ i) (f✝ i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mp.succ.f.f.intro.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\na✝ : F.A\nf✝¹ f✝ : B F a✝ → M F\nhagree : ∀ (i : B F a✝), Agree ((fun j => MIntl.approx (f✝¹ j) n✝) i) ((fun j => MIntl.approx (f✝ j) (n✝ + 1)) i)\ni : B F a✝\n⊢ Agree' n✝ (f✝¹ i) (f✝ i)\n[PROOFSTEP]\napply n_ih\n[GOAL]\ncase mp.succ.f.f.intro.a.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh : Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1)) → Agree' n✝ x y\na✝ : F.A\nf✝¹ f✝ : B F a✝ → M F\nhagree : ∀ (i : B F a✝), Agree ((fun j => MIntl.approx (f✝¹ j) n✝) i) ((fun j => MIntl.approx (f✝ j) (n✝ + 1)) i)\ni : B F a✝\n⊢ Agree (MIntl.approx (f✝¹ i) n✝) (MIntl.approx (f✝ i) (n✝ + 1))\n[PROOFSTEP]\napply hagree\n[GOAL]\ncase mpr\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx y : M F\nh : Agree' n x y\n⊢ Agree (MIntl.approx x n) (MIntl.approx y (n + 1))\n[PROOFSTEP]\ninduction' n with _ n_ih generalizing x y\n[GOAL]\ncase mpr.zero\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh✝ : Agree' n x✝ y✝\nx y : M F\nh : Agree' zero x y\n⊢ Agree (MIntl.approx x zero) (MIntl.approx y (zero + 1))\ncase mpr.succ\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh✝ : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\nh : Agree' (succ n✝) x y\n⊢ Agree (MIntl.approx x (succ n✝)) (MIntl.approx y (succ n✝ + 1))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.succ\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh✝ : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\nh : Agree' (succ n✝) x y\n⊢ Agree (MIntl.approx x (succ n✝)) (MIntl.approx y (succ n✝ + 1))\n[PROOFSTEP]\ncases' h with _ _ _ a x' y'\n[GOAL]\ncase mpr.succ.step\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\na : F.A\nx' y' : B F a → M F\na✝² : ∀ (i : B F a), Agree' n✝ (x' i) (y' i)\na✝¹ : x = M.mk { fst := a, snd := x' }\na✝ : y = M.mk { fst := a, snd := y' }\n⊢ Agree (MIntl.approx x (succ n✝)) (MIntl.approx y (succ n✝ + 1))\n[PROOFSTEP]\ninduction' x using PFunctor.M.casesOn' with x_a x_f\n[GOAL]\ncase mpr.succ.step.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\na : F.A\nx' y' : B F a → M F\na✝³ : ∀ (i : B F a), Agree' n✝ (x' i) (y' i)\na✝² : x = M.mk { fst := a, snd := x' }\na✝¹ : y = M.mk { fst := a, snd := y' }\nx_a : F.A\nx_f : B F x_a → M F\na✝ : M.mk { fst := x_a, snd := x_f } = M.mk { fst := a, snd := x' }\n⊢ Agree (MIntl.approx (M.mk { fst := x_a, snd := x_f }) (succ n✝)) (MIntl.approx y (succ n✝ + 1))\n[PROOFSTEP]\ninduction' y using PFunctor.M.casesOn' with y_a y_f\n[GOAL]\ncase mpr.succ.step.f.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\na : F.A\nx' y' : B F a → M F\na✝⁴ : ∀ (i : B F a), Agree' n✝ (x' i) (y' i)\na✝³ : x = M.mk { fst := a, snd := x' }\na✝² : y = M.mk { fst := a, snd := y' }\nx_a : F.A\nx_f : B F x_a → M F\na✝¹ : M.mk { fst := x_a, snd := x_f } = M.mk { fst := a, snd := x' }\ny_a : F.A\ny_f : B F y_a → M F\na✝ : M.mk { fst := y_a, snd := y_f } = M.mk { fst := a, snd := y' }\n⊢ Agree (MIntl.approx (M.mk { fst := x_a, snd := x_f }) (succ n✝))\n    (MIntl.approx (M.mk { fst := y_a, snd := y_f }) (succ n✝ + 1))\n[PROOFSTEP]\nsimp only [approx_mk]\n[GOAL]\ncase mpr.succ.step.f.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\na : F.A\nx' y' : B F a → M F\na✝⁴ : ∀ (i : B F a), Agree' n✝ (x' i) (y' i)\na✝³ : x = M.mk { fst := a, snd := x' }\na✝² : y = M.mk { fst := a, snd := y' }\nx_a : F.A\nx_f : B F x_a → M F\na✝¹ : M.mk { fst := x_a, snd := x_f } = M.mk { fst := a, snd := x' }\ny_a : F.A\ny_f : B F y_a → M F\na✝ : M.mk { fst := y_a, snd := y_f } = M.mk { fst := a, snd := y' }\n⊢ Agree (CofixA.intro x_a fun j => MIntl.approx (x_f j) n✝) (CofixA.intro y_a fun j => MIntl.approx (y_f j) (n✝ + 1))\n[PROOFSTEP]\nhave h_a_1 := mk_inj ‹M.mk ⟨x_a, x_f⟩ = M.mk ⟨a, x'⟩›\n[GOAL]\ncase mpr.succ.step.f.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\na : F.A\nx' y' : B F a → M F\na✝⁴ : ∀ (i : B F a), Agree' n✝ (x' i) (y' i)\na✝³ : x = M.mk { fst := a, snd := x' }\na✝² : y = M.mk { fst := a, snd := y' }\nx_a : F.A\nx_f : B F x_a → M F\na✝¹ : M.mk { fst := x_a, snd := x_f } = M.mk { fst := a, snd := x' }\ny_a : F.A\ny_f : B F y_a → M F\na✝ : M.mk { fst := y_a, snd := y_f } = M.mk { fst := a, snd := y' }\nh_a_1 : { fst := x_a, snd := x_f } = { fst := a, snd := x' }\n⊢ Agree (CofixA.intro x_a fun j => MIntl.approx (x_f j) n✝) (CofixA.intro y_a fun j => MIntl.approx (y_f j) (n✝ + 1))\n[PROOFSTEP]\ncases h_a_1\n[GOAL]\ncase mpr.succ.step.f.f.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\na : F.A\nx' y' : B F a → M F\na✝⁴ : ∀ (i : B F a), Agree' n✝ (x' i) (y' i)\na✝³ : x = M.mk { fst := a, snd := x' }\na✝² : y = M.mk { fst := a, snd := y' }\ny_a : F.A\ny_f : B F y_a → M F\na✝¹ : M.mk { fst := y_a, snd := y_f } = M.mk { fst := a, snd := y' }\na✝ : M.mk { fst := a, snd := x' } = M.mk { fst := a, snd := x' }\n⊢ Agree (CofixA.intro a fun j => MIntl.approx (x' j) n✝) (CofixA.intro y_a fun j => MIntl.approx (y_f j) (n✝ + 1))\n[PROOFSTEP]\nreplace h_a_2 := mk_inj ‹M.mk ⟨y_a, y_f⟩ = M.mk ⟨a, y'⟩›\n[GOAL]\ncase mpr.succ.step.f.f.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\na : F.A\nx' y' : B F a → M F\na✝⁴ : ∀ (i : B F a), Agree' n✝ (x' i) (y' i)\na✝³ : x = M.mk { fst := a, snd := x' }\na✝² : y = M.mk { fst := a, snd := y' }\ny_a : F.A\ny_f : B F y_a → M F\na✝¹ : M.mk { fst := y_a, snd := y_f } = M.mk { fst := a, snd := y' }\na✝ : M.mk { fst := a, snd := x' } = M.mk { fst := a, snd := x' }\nh_a_2 : { fst := y_a, snd := y_f } = { fst := a, snd := y' }\n⊢ Agree (CofixA.intro a fun j => MIntl.approx (x' j) n✝) (CofixA.intro y_a fun j => MIntl.approx (y_f j) (n✝ + 1))\n[PROOFSTEP]\ncases h_a_2\n[GOAL]\ncase mpr.succ.step.f.f.refl.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\na : F.A\nx' y' : B F a → M F\na✝⁴ : ∀ (i : B F a), Agree' n✝ (x' i) (y' i)\na✝³ : x = M.mk { fst := a, snd := x' }\na✝² : y = M.mk { fst := a, snd := y' }\na✝¹ : M.mk { fst := a, snd := x' } = M.mk { fst := a, snd := x' }\na✝ : M.mk { fst := a, snd := y' } = M.mk { fst := a, snd := y' }\n⊢ Agree (CofixA.intro a fun j => MIntl.approx (x' j) n✝) (CofixA.intro a fun j => MIntl.approx (y' j) (n✝ + 1))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.succ.step.f.f.refl.refl.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\na : F.A\nx' y' : B F a → M F\na✝⁴ : ∀ (i : B F a), Agree' n✝ (x' i) (y' i)\na✝³ : x = M.mk { fst := a, snd := x' }\na✝² : y = M.mk { fst := a, snd := y' }\na✝¹ : M.mk { fst := a, snd := x' } = M.mk { fst := a, snd := x' }\na✝ : M.mk { fst := a, snd := y' } = M.mk { fst := a, snd := y' }\n⊢ ∀ (i : B F a), Agree (MIntl.approx (x' i) n✝) (MIntl.approx (y' i) (n✝ + 1))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mpr.succ.step.f.f.refl.refl.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\na : F.A\nx' y' : B F a → M F\na✝⁴ : ∀ (i : B F a), Agree' n✝ (x' i) (y' i)\na✝³ : x = M.mk { fst := a, snd := x' }\na✝² : y = M.mk { fst := a, snd := y' }\na✝¹ : M.mk { fst := a, snd := x' } = M.mk { fst := a, snd := x' }\na✝ : M.mk { fst := a, snd := y' } = M.mk { fst := a, snd := y' }\ni : B F a\n⊢ Agree (MIntl.approx (x' i) n✝) (MIntl.approx (y' i) (n✝ + 1))\n[PROOFSTEP]\napply n_ih\n[GOAL]\ncase mpr.succ.step.f.f.refl.refl.a.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nn : ℕ\nx✝ y✝ : M F\nh : Agree' n x✝ y✝\nn✝ : ℕ\nn_ih : ∀ (x y : M F), Agree' n✝ x y → Agree (MIntl.approx x n✝) (MIntl.approx y (n✝ + 1))\nx y : M F\na : F.A\nx' y' : B F a → M F\na✝⁴ : ∀ (i : B F a), Agree' n✝ (x' i) (y' i)\na✝³ : x = M.mk { fst := a, snd := x' }\na✝² : y = M.mk { fst := a, snd := y' }\na✝¹ : M.mk { fst := a, snd := x' } = M.mk { fst := a, snd := x' }\na✝ : M.mk { fst := a, snd := y' } = M.mk { fst := a, snd := y' }\ni : B F a\n⊢ Agree' n✝ (x' i) (y' i)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nr : M F → Sort u_2\nx : Obj F (M F)\nf : (x : Obj F (M F)) → r (M.mk x)\n⊢ M.cases f (M.mk x) = f x\n[PROOFSTEP]\ndsimp only [M.mk, PFunctor.M.cases, dest, head, Approx.sMk, head']\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nr : M F → Sort u_2\nx : Obj F (M F)\nf : (x : Obj F (M F)) → r (M.mk x)\n⊢ Eq.mpr\n      (_ :\n        r\n            {\n              approx := fun x_1 =>\n                match x_1 with\n                | 0 => CofixA.continue\n                | succ n => CofixA.intro x.fst fun i => MIntl.approx (Sigma.snd x i) n,\n              consistent := (_ : AllAgree (Approx.sMk x)) } =\n          r\n            {\n              approx := fun x_1 =>\n                match x_1 with\n                | 0 => CofixA.continue\n                | succ n =>\n                  CofixA.intro x.fst fun i =>\n                    MIntl.approx\n                      (children\n                        {\n                          approx := fun x_2 =>\n                            match x_2 with\n                            | 0 => CofixA.continue\n                            | succ n => CofixA.intro x.fst fun i => MIntl.approx (Sigma.snd x i) n,\n                          consistent := (_ : AllAgree (Approx.sMk x)) }\n                        i)\n                      n,\n              consistent :=\n                (_ :\n                  AllAgree\n                    (Approx.sMk\n                      { fst := x.fst,\n                        snd := fun i =>\n                          children\n                            {\n                              approx := fun x_1 =>\n                                match x_1 with\n                                | 0 => CofixA.continue\n                                | succ n => CofixA.intro x.fst fun i => MIntl.approx (Sigma.snd x i) n,\n                              consistent := (_ : AllAgree (Approx.sMk x)) }\n                            i })) })\n      (f\n        { fst := x.fst,\n          snd := fun i =>\n            children\n              {\n                approx := fun x_1 =>\n                  match x_1 with\n                  | 0 => CofixA.continue\n                  | succ n => CofixA.intro x.fst fun i => MIntl.approx (Sigma.snd x i) n,\n                consistent := (_ : AllAgree (Approx.sMk x)) }\n              i }) =\n    f x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nr : M F → Sort u_2\nf : (x : Obj F (M F)) → r (M.mk x)\nfst✝ : F.A\nsnd✝ : B F fst✝ → M F\n⊢ Eq.mpr\n      (_ :\n        r\n            {\n              approx := fun x =>\n                match x with\n                | 0 => CofixA.continue\n                | succ n =>\n                  CofixA.intro { fst := fst✝, snd := snd✝ }.fst fun i =>\n                    MIntl.approx (Sigma.snd { fst := fst✝, snd := snd✝ } i) n,\n              consistent := (_ : AllAgree (Approx.sMk { fst := fst✝, snd := snd✝ })) } =\n          r\n            {\n              approx := fun x =>\n                match x with\n                | 0 => CofixA.continue\n                | succ n =>\n                  CofixA.intro { fst := fst✝, snd := snd✝ }.fst fun i =>\n                    MIntl.approx\n                      (children\n                        {\n                          approx := fun x =>\n                            match x with\n                            | 0 => CofixA.continue\n                            | succ n =>\n                              CofixA.intro { fst := fst✝, snd := snd✝ }.fst fun i =>\n                                MIntl.approx (Sigma.snd { fst := fst✝, snd := snd✝ } i) n,\n                          consistent := (_ : AllAgree (Approx.sMk { fst := fst✝, snd := snd✝ })) }\n                        i)\n                      n,\n              consistent :=\n                (_ :\n                  AllAgree\n                    (Approx.sMk\n                      { fst := { fst := fst✝, snd := snd✝ }.fst,\n                        snd := fun i =>\n                          children\n                            {\n                              approx := fun x =>\n                                match x with\n                                | 0 => CofixA.continue\n                                | succ n =>\n                                  CofixA.intro { fst := fst✝, snd := snd✝ }.fst fun i =>\n                                    MIntl.approx (Sigma.snd { fst := fst✝, snd := snd✝ } i) n,\n                              consistent := (_ : AllAgree (Approx.sMk { fst := fst✝, snd := snd✝ })) }\n                            i })) })\n      (f\n        { fst := { fst := fst✝, snd := snd✝ }.fst,\n          snd := fun i =>\n            children\n              {\n                approx := fun x =>\n                  match x with\n                  | 0 => CofixA.continue\n                  | succ n =>\n                    CofixA.intro { fst := fst✝, snd := snd✝ }.fst fun i =>\n                      MIntl.approx (Sigma.snd { fst := fst✝, snd := snd✝ } i) n,\n                consistent := (_ : AllAgree (Approx.sMk { fst := fst✝, snd := snd✝ })) }\n              i }) =\n    f { fst := fst✝, snd := snd✝ }\n[PROOFSTEP]\ndsimp only [Approx.sMk]\n[GOAL]\ncase mk\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nr : M F → Sort u_2\nf : (x : Obj F (M F)) → r (M.mk x)\nfst✝ : F.A\nsnd✝ : B F fst✝ → M F\n⊢ Eq.mpr\n      (_ :\n        r\n            {\n              approx := fun x =>\n                match x with\n                | 0 => CofixA.continue\n                | succ n => CofixA.intro fst✝ fun i => MIntl.approx (snd✝ i) n,\n              consistent := (_ : AllAgree (Approx.sMk { fst := fst✝, snd := snd✝ })) } =\n          r\n            {\n              approx := fun x =>\n                match x with\n                | 0 => CofixA.continue\n                | succ n =>\n                  CofixA.intro fst✝ fun i =>\n                    MIntl.approx\n                      (children\n                        {\n                          approx := fun x =>\n                            match x with\n                            | 0 => CofixA.continue\n                            | succ n => CofixA.intro fst✝ fun i => MIntl.approx (snd✝ i) n,\n                          consistent := (_ : AllAgree (Approx.sMk { fst := fst✝, snd := snd✝ })) }\n                        i)\n                      n,\n              consistent :=\n                (_ :\n                  AllAgree\n                    (Approx.sMk\n                      { fst := fst✝,\n                        snd := fun i =>\n                          children\n                            {\n                              approx := fun x =>\n                                match x with\n                                | 0 => CofixA.continue\n                                | succ n => CofixA.intro fst✝ fun i => MIntl.approx (snd✝ i) n,\n                              consistent := (_ : AllAgree (Approx.sMk { fst := fst✝, snd := snd✝ })) }\n                            i })) })\n      (f\n        { fst := fst✝,\n          snd := fun i =>\n            children\n              {\n                approx := fun x =>\n                  match x with\n                  | 0 => CofixA.continue\n                  | succ n => CofixA.intro fst✝ fun i => MIntl.approx (snd✝ i) n,\n                consistent := (_ : AllAgree (Approx.sMk { fst := fst✝, snd := snd✝ })) }\n              i }) =\n    f { fst := fst✝, snd := snd✝ }\n[PROOFSTEP]\nsimp only [Eq.mpr]\n[GOAL]\ncase mk\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nr : M F → Sort u_2\nf : (x : Obj F (M F)) → r (M.mk x)\nfst✝ : F.A\nsnd✝ : B F fst✝ → M F\n⊢ f\n      { fst := fst✝,\n        snd := fun i =>\n          children\n            {\n              approx := fun x =>\n                match x with\n                | 0 => CofixA.continue\n                | succ n => CofixA.intro fst✝ fun i => MIntl.approx (snd✝ i) n,\n              consistent := (_ : AllAgree (Approx.sMk { fst := fst✝, snd := snd✝ })) }\n            i } =\n    f { fst := fst✝, snd := snd✝ }\n[PROOFSTEP]\napply congrFun\n[GOAL]\ncase mk.h\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nr : M F → Sort u_2\nf : (x : Obj F (M F)) → r (M.mk x)\nfst✝ : F.A\nsnd✝ : B F fst✝ → M F\n⊢ f = f\n[PROOFSTEP]\nrfl\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nxs : Path F\na a' : F.A\nf : B F a → M F\ni : B F a'\n⊢ IsPath ({ fst := a', snd := i } :: xs) (M.mk { fst := a, snd := f }) → a = a'\n[PROOFSTEP]\ngeneralize h : M.mk ⟨a, f⟩ = x\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nxs : Path F\na a' : F.A\nf : B F a → M F\ni : B F a'\nx : M F\nh : M.mk { fst := a, snd := f } = x\n⊢ IsPath ({ fst := a', snd := i } :: xs) x → a = a'\n[PROOFSTEP]\nrintro (_ | ⟨_, _, _, _, rfl, _⟩)\n[GOAL]\ncase cons\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nxs : Path F\na a' : F.A\nf : B F a → M F\ni : B F a'\nf✝ : B F a' → M F\na✝ : IsPath xs (f✝ i)\nh : M.mk { fst := a, snd := f } = M.mk { fst := a', snd := f✝ }\n⊢ a = a'\n[PROOFSTEP]\ncases mk_inj h\n[GOAL]\ncase cons.refl\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nxs : Path F\na : F.A\nf : B F a → M F\ni : B F a\na✝ : IsPath xs (f i)\nh : M.mk { fst := a, snd := f } = M.mk { fst := a, snd := f }\n⊢ a = a\n[PROOFSTEP]\nrfl\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nxs : Path F\na : F.A\nf : B F a → M F\ni : B F a\n⊢ IsPath ({ fst := a, snd := i } :: xs) (M.mk { fst := a, snd := f }) → IsPath xs (f i)\n[PROOFSTEP]\ngeneralize h : M.mk ⟨a, f⟩ = x\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nxs : Path F\na : F.A\nf : B F a → M F\ni : B F a\nx : M F\nh : M.mk { fst := a, snd := f } = x\n⊢ IsPath ({ fst := a, snd := i } :: xs) x → IsPath xs (f i)\n[PROOFSTEP]\nrintro (_ | ⟨_, _, _, _, rfl, hp⟩)\n[GOAL]\ncase cons\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nxs : Path F\na : F.A\nf : B F a → M F\ni : B F a\nf✝ : B F a → M F\nhp : IsPath xs (f✝ i)\nh : M.mk { fst := a, snd := f } = M.mk { fst := a, snd := f✝ }\n⊢ IsPath xs (f i)\n[PROOFSTEP]\ncases mk_inj h\n[GOAL]\ncase cons.refl\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nxs : Path F\na : F.A\nf : B F a → M F\ni : B F a\nhp : IsPath xs (f i)\nh : M.mk { fst := a, snd := f } = M.mk { fst := a, snd := f }\n⊢ IsPath xs (f i)\n[PROOFSTEP]\nexact hp\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\na : F.A\ni : B F a\nps : List (IdxCat F)\nx : M F\na' : F.A\nf : B F a' → M F\nh : a = a'\n⊢ B F a = B F a'\n[PROOFSTEP]\nrw [h]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx : M F\nh : ¬IsPath ps x\n⊢ iselect ps x = head default\n[PROOFSTEP]\ninduction' ps with ps_hd ps_tail ps_ih generalizing x\n[GOAL]\ncase nil\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝ : ¬IsPath ps x✝\nx : M F\nh : ¬IsPath [] x\n⊢ iselect [] x = head default\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase nil.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝ : ¬IsPath ps x✝\nx : M F\nh : ¬IsPath [] x\n⊢ False\n[PROOFSTEP]\napply h\n[GOAL]\ncase nil.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝ : ¬IsPath ps x✝\nx : M F\nh : ¬IsPath [] x\n⊢ IsPath [] x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝ : ¬IsPath ps x✝\nps_hd : IdxCat F\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → iselect ps_tail x = head default\nx : M F\nh : ¬IsPath (ps_hd :: ps_tail) x\n⊢ iselect (ps_hd :: ps_tail) x = head default\n[PROOFSTEP]\ncases' ps_hd with a i\n[GOAL]\ncase cons.mk\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → iselect ps_tail x = head default\nx : M F\na : F.A\ni : B F a\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\n⊢ iselect ({ fst := a, snd := i } :: ps_tail) x = head default\n[PROOFSTEP]\ninduction' x using PFunctor.M.casesOn' with x_a x_f\n[GOAL]\ncase cons.mk.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → iselect ps_tail x = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_a : F.A\nx_f : B F x_a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := x_a, snd := x_f })\n⊢ iselect ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := x_a, snd := x_f }) = head default\n[PROOFSTEP]\nsimp only [iselect, isubtree] at ps_ih ⊢\n[GOAL]\ncase cons.mk.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_a : F.A\nx_f : B F x_a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := x_a, snd := x_f })\n⊢ head\n      (M.casesOn' (M.mk { fst := x_a, snd := x_f }) fun a' f =>\n        if h : a = a' then isubtree ps_tail (f (cast (_ : B F a = B F a') i)) else default) =\n    head default\n[PROOFSTEP]\nby_cases h'' : a = x_a\n[GOAL]\ncase pos\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_a : F.A\nx_f : B F x_a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := x_a, snd := x_f })\nh'' : a = x_a\n⊢ head\n      (M.casesOn' (M.mk { fst := x_a, snd := x_f }) fun a' f =>\n        if h : a = a' then isubtree ps_tail (f (cast (_ : B F a = B F a') i)) else default) =\n    head default\ncase neg\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_a : F.A\nx_f : B F x_a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := x_a, snd := x_f })\nh'' : ¬a = x_a\n⊢ head\n      (M.casesOn' (M.mk { fst := x_a, snd := x_f }) fun a' f =>\n        if h : a = a' then isubtree ps_tail (f (cast (_ : B F a = B F a') i)) else default) =\n    head default\n[PROOFSTEP]\nsubst x_a\n[GOAL]\ncase pos\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_f : B F a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := a, snd := x_f })\n⊢ head\n      (M.casesOn' (M.mk { fst := a, snd := x_f }) fun a' f =>\n        if h : a = a' then isubtree ps_tail (f (cast (_ : B F a = B F a') i)) else default) =\n    head default\n[PROOFSTEP]\nsimp only [dif_pos, eq_self_iff_true, casesOn_mk']\n[GOAL]\ncase pos\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_f : B F a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := a, snd := x_f })\n⊢ head (isubtree ps_tail (x_f (cast (_ : B F a = B F a) i))) = head default\n[PROOFSTEP]\nrw [ps_ih]\n[GOAL]\ncase pos.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_f : B F a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := a, snd := x_f })\n⊢ ¬IsPath ps_tail (x_f (cast (_ : B F a = B F a) i))\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase pos.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_f : B F a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := a, snd := x_f })\nh' : IsPath ps_tail (x_f (cast (_ : B F a = B F a) i))\n⊢ False\n[PROOFSTEP]\napply h\n[GOAL]\ncase pos.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_f : B F a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := a, snd := x_f })\nh' : IsPath ps_tail (x_f (cast (_ : B F a = B F a) i))\n⊢ IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := a, snd := x_f })\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase pos.h.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_f : B F a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := a, snd := x_f })\nh' : IsPath ps_tail (x_f (cast (_ : B F a = B F a) i))\n⊢ M.mk { fst := a, snd := x_f } = M.mk { fst := a, snd := ?pos.h.f✝ }\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos.h.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_f : B F a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := a, snd := x_f })\nh' : IsPath ps_tail (x_f (cast (_ : B F a = B F a) i))\n⊢ M.mk { fst := a, snd := x_f } = M.mk { fst := a, snd := ?pos.h.f✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos.h.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_f : B F a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := a, snd := x_f })\nh' : IsPath ps_tail (x_f (cast (_ : B F a = B F a) i))\n⊢ IsPath ps_tail (x_f i)\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos.h.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_f : B F a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := a, snd := x_f })\nh' : IsPath ps_tail (x_f (cast (_ : B F a = B F a) i))\n⊢ IsPath ps_tail (x_f i)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos.h.a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_f : B F a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := a, snd := x_f })\nh' : IsPath ps_tail (x_f (cast (_ : B F a = B F a) i))\n⊢ IsPath ps_tail (x_f i)\n[PROOFSTEP]\napply h'\n[GOAL]\ncase neg\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\nx✝ : M F\nh✝¹ : ¬IsPath ps x✝\nps_tail : List (IdxCat F)\nps_ih : ∀ (x : M F), ¬IsPath ps_tail x → head (isubtree ps_tail x) = head default\nx : M F\na : F.A\ni : B F a\nh✝ : ¬IsPath ({ fst := a, snd := i } :: ps_tail) x\nx_a : F.A\nx_f : B F x_a → M F\nh : ¬IsPath ({ fst := a, snd := i } :: ps_tail) (M.mk { fst := x_a, snd := x_f })\nh'' : ¬a = x_a\n⊢ head\n      (M.casesOn' (M.mk { fst := x_a, snd := x_f }) fun a' f =>\n        if h : a = a' then isubtree ps_tail (f (cast (_ : B F a = B F a') i)) else default) =\n    head default\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : Obj F (M F)\n⊢ x.fst = (dest (M.mk x)).fst\n[PROOFSTEP]\nrw [dest_mk]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nx : Obj F (M F)\n⊢ (dest (M.mk x)).fst = head (M.mk x)\n[PROOFSTEP]\nrfl\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\na : F.A\nx : B F a → M F\ni : B F (head (M.mk { fst := a, snd := x }))\n⊢ B F (head (M.mk { fst := a, snd := x })) = B F a\n[PROOFSTEP]\nrw [head_mk]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\na : F.A\nx : B F a → M F\ni : B F (head (M.mk { fst := a, snd := x }))\n⊢ children (M.mk { fst := a, snd := x }) i = x (cast (_ : B F (head (M.mk { fst := a, snd := x })) = B F a) i)\n[PROOFSTEP]\napply ext'\n[GOAL]\ncase H\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\na : F.A\nx : B F a → M F\ni : B F (head (M.mk { fst := a, snd := x }))\n⊢ ∀ (i_1 : ℕ),\n    MIntl.approx (children (M.mk { fst := a, snd := x }) i) i_1 =\n      MIntl.approx (x (cast (_ : B F (head (M.mk { fst := a, snd := x })) = B F a) i)) i_1\n[PROOFSTEP]\nintro n\n[GOAL]\ncase H\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\na : F.A\nx : B F a → M F\ni : B F (head (M.mk { fst := a, snd := x }))\nn : ℕ\n⊢ MIntl.approx (children (M.mk { fst := a, snd := x }) i) n =\n    MIntl.approx (x (cast (_ : B F (head (M.mk { fst := a, snd := x })) = B F a) i)) n\n[PROOFSTEP]\nrfl\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nx : Obj F (M F)\ni : IdxCat F\n⊢ ichildren i (M.mk x) = Obj.iget x i\n[PROOFSTEP]\ndsimp only [ichildren, PFunctor.Obj.iget]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nx : Obj F (M F)\ni : IdxCat F\n⊢ (if H' : i.fst = head (M.mk x) then children (M.mk x) (cast (_ : B F i.fst = B F (head (M.mk x))) i.snd)\n    else default) =\n    if h : i.fst = x.fst then Sigma.snd x (cast (_ : B F i.fst = B F x.fst) i.snd) else default\n[PROOFSTEP]\ncongr with h\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\na : F.A\nf : B F a → M F\ni : B F a\n⊢ isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) = isubtree ps (f i)\n[PROOFSTEP]\nsimp only [isubtree, ichildren_mk, PFunctor.Obj.iget, dif_pos, isubtree, M.casesOn_mk']\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\na : F.A\nf : B F a → M F\ni : B F a\n⊢ isubtree ps (f (cast (_ : B F a = B F a) i)) = isubtree ps (f i)\n[PROOFSTEP]\nrfl\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\na : F.A\nf : B F a → M F\n⊢ iselect [] (M.mk { fst := a, snd := f }) = a\n[PROOFSTEP]\nrfl\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\ninst✝¹ : DecidableEq F.A\ninst✝ : Inhabited (M F)\nps : Path F\na : F.A\nf : B F a → M F\ni : B F a\n⊢ iselect ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) = iselect ps (f i)\n[PROOFSTEP]\nsimp only [iselect, isubtree_cons]\n[GOAL]\nF : PFunctor\nX✝ : Type u_1\nf✝ : X✝ → Obj F X✝\nX : Type u\nf : X → Obj F X\nx₀ : X\n⊢ M.corec f x₀ = M.mk (M.corec f <$> f x₀)\n[PROOFSTEP]\ndsimp only [M.corec, M.mk]\n[GOAL]\nF : PFunctor\nX✝ : Type u_1\nf✝ : X✝ → Obj F X✝\nX : Type u\nf : X → Obj F X\nx₀ : X\n⊢ { approx := sCorec f x₀, consistent := (_ : ∀ (n : ℕ), Agree (sCorec f x₀ n) (sCorec f x₀ (succ n))) } =\n    {\n      approx :=\n        Approx.sMk\n          ((fun i =>\n              { approx := sCorec f i, consistent := (_ : ∀ (n : ℕ), Agree (sCorec f i n) (sCorec f i (succ n))) }) <$>\n            f x₀),\n      consistent :=\n        (_ :\n          AllAgree\n            (Approx.sMk\n              ((fun i =>\n                  { approx := sCorec f i,\n                    consistent := (_ : ∀ (n : ℕ), Agree (sCorec f i n) (sCorec f i (succ n))) }) <$>\n                f x₀))) }\n[PROOFSTEP]\ncongr with n\n[GOAL]\ncase e_approx.h\nF : PFunctor\nX✝ : Type u_1\nf✝ : X✝ → Obj F X✝\nX : Type u\nf : X → Obj F X\nx₀ : X\nn : ℕ\n⊢ sCorec f x₀ n =\n    Approx.sMk\n      ((fun i =>\n          { approx := sCorec f i, consistent := (_ : ∀ (n : ℕ), Agree (sCorec f i n) (sCorec f i (succ n))) }) <$>\n        f x₀)\n      n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase e_approx.h.zero\nF : PFunctor\nX✝ : Type u_1\nf✝ : X✝ → Obj F X✝\nX : Type u\nf : X → Obj F X\nx₀ : X\n⊢ sCorec f x₀ zero =\n    Approx.sMk\n      ((fun i =>\n          { approx := sCorec f i, consistent := (_ : ∀ (n : ℕ), Agree (sCorec f i n) (sCorec f i (succ n))) }) <$>\n        f x₀)\n      zero\n[PROOFSTEP]\ndsimp only [sCorec, Approx.sMk]\n[GOAL]\ncase e_approx.h.succ\nF : PFunctor\nX✝ : Type u_1\nf✝ : X✝ → Obj F X✝\nX : Type u\nf : X → Obj F X\nx₀ : X\nn : ℕ\n⊢ sCorec f x₀ (succ n) =\n    Approx.sMk\n      ((fun i =>\n          { approx := sCorec f i, consistent := (_ : ∀ (n : ℕ), Agree (sCorec f i n) (sCorec f i (succ n))) }) <$>\n        f x₀)\n      (succ n)\n[PROOFSTEP]\ndsimp only [sCorec, Approx.sMk]\n[GOAL]\ncase e_approx.h.succ\nF : PFunctor\nX✝ : Type u_1\nf✝ : X✝ → Obj F X✝\nX : Type u\nf : X → Obj F X\nx₀ : X\nn : ℕ\n⊢ (CofixA.intro (f x₀).fst fun i => sCorec f (Sigma.snd (f x₀) i) n) =\n    CofixA.intro\n      ((fun i =>\n            { approx := sCorec f i, consistent := (_ : ∀ (n : ℕ), Agree (sCorec f i n) (sCorec f i (succ n))) }) <$>\n          f x₀).fst\n      fun i =>\n      MIntl.approx\n        (Sigma.snd\n          ((fun i =>\n              { approx := sCorec f i, consistent := (_ : ∀ (n : ℕ), Agree (sCorec f i n) (sCorec f i (succ n))) }) <$>\n            f x₀)\n          i)\n        n\n[PROOFSTEP]\ncases h : f x₀\n[GOAL]\ncase e_approx.h.succ.mk\nF : PFunctor\nX✝ : Type u_1\nf✝ : X✝ → Obj F X✝\nX : Type u\nf : X → Obj F X\nx₀ : X\nn : ℕ\nfst✝ : F.A\nsnd✝ : B F fst✝ → X\nh : f x₀ = { fst := fst✝, snd := snd✝ }\n⊢ (CofixA.intro { fst := fst✝, snd := snd✝ }.fst fun i => sCorec f (Sigma.snd { fst := fst✝, snd := snd✝ } i) n) =\n    CofixA.intro\n      ((fun i =>\n            { approx := sCorec f i, consistent := (_ : ∀ (n : ℕ), Agree (sCorec f i n) (sCorec f i (succ n))) }) <$>\n          { fst := fst✝, snd := snd✝ }).fst\n      fun i =>\n      MIntl.approx\n        (Sigma.snd\n          ((fun i =>\n              { approx := sCorec f i, consistent := (_ : ∀ (n : ℕ), Agree (sCorec f i n) (sCorec f i (succ n))) }) <$>\n            { fst := fst✝, snd := snd✝ })\n          i)\n        n\n[PROOFSTEP]\ndsimp only [(· <$> ·), PFunctor.map]\n[GOAL]\ncase e_approx.h.succ.mk\nF : PFunctor\nX✝ : Type u_1\nf✝ : X✝ → Obj F X✝\nX : Type u\nf : X → Obj F X\nx₀ : X\nn : ℕ\nfst✝ : F.A\nsnd✝ : B F fst✝ → X\nh : f x₀ = { fst := fst✝, snd := snd✝ }\n⊢ (CofixA.intro fst✝ fun i => sCorec f (snd✝ i) n) =\n    CofixA.intro fst✝ fun i =>\n      MIntl.approx\n        (((fun i =>\n              { approx := sCorec f i, consistent := (_ : ∀ (n : ℕ), Agree (sCorec f i n) (sCorec f i (succ n))) }) ∘\n            snd✝)\n          i)\n        n\n[PROOFSTEP]\ncongr\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn : ℕ\nx y z : M F\nhx : Agree' n z x\nhy : Agree' n z y\nhrec : ∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y\n⊢ MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\n[PROOFSTEP]\ninduction' n with n n_ih generalizing x y z\n[GOAL]\ncase zero\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn : ℕ\nx✝ y✝ z✝ : M F\nhx✝ : Agree' n z✝ x✝\nhy✝ : Agree' n z✝ y✝\nhrec✝ : ∀ (ps : Path F), n = length ps → iselect ps x✝ = iselect ps y✝\nx y z : M F\nhx : Agree' zero z x\nhy : Agree' zero z y\nhrec : ∀ (ps : Path F), zero = length ps → iselect ps x = iselect ps y\n⊢ MIntl.approx x (zero + 1) = MIntl.approx y (zero + 1)\n[PROOFSTEP]\nspecialize hrec [] rfl\n[GOAL]\ncase zero\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn : ℕ\nx✝ y✝ z✝ : M F\nhx✝ : Agree' n z✝ x✝\nhy✝ : Agree' n z✝ y✝\nhrec✝ : ∀ (ps : Path F), n = length ps → iselect ps x✝ = iselect ps y✝\nx y z : M F\nhx : Agree' zero z x\nhy : Agree' zero z y\nhrec : iselect [] x = iselect [] y\n⊢ MIntl.approx x (zero + 1) = MIntl.approx y (zero + 1)\n[PROOFSTEP]\ninduction x using PFunctor.M.casesOn'\n[GOAL]\ncase zero.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn : ℕ\nx y✝ z✝ : M F\nhx✝ : Agree' n z✝ x\nhy✝ : Agree' n z✝ y✝\nhrec✝ : ∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y✝\ny z : M F\nhy : Agree' zero z y\na✝ : F.A\nf✝ : B F a✝ → M F\nhx : Agree' zero z (M.mk { fst := a✝, snd := f✝ })\nhrec : iselect [] (M.mk { fst := a✝, snd := f✝ }) = iselect [] y\n⊢ MIntl.approx (M.mk { fst := a✝, snd := f✝ }) (zero + 1) = MIntl.approx y (zero + 1)\n[PROOFSTEP]\ninduction y using PFunctor.M.casesOn'\n[GOAL]\ncase zero.f.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn : ℕ\nx y z✝ : M F\nhx✝ : Agree' n z✝ x\nhy✝ : Agree' n z✝ y\nhrec✝ : ∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y\nz : M F\na✝¹ : F.A\nf✝¹ : B F a✝¹ → M F\nhx : Agree' zero z (M.mk { fst := a✝¹, snd := f✝¹ })\na✝ : F.A\nf✝ : B F a✝ → M F\nhy : Agree' zero z (M.mk { fst := a✝, snd := f✝ })\nhrec : iselect [] (M.mk { fst := a✝¹, snd := f✝¹ }) = iselect [] (M.mk { fst := a✝, snd := f✝ })\n⊢ MIntl.approx (M.mk { fst := a✝¹, snd := f✝¹ }) (zero + 1) = MIntl.approx (M.mk { fst := a✝, snd := f✝ }) (zero + 1)\n[PROOFSTEP]\nsimp only [iselect_nil] at hrec \n[GOAL]\ncase zero.f.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn : ℕ\nx y z✝ : M F\nhx✝ : Agree' n z✝ x\nhy✝ : Agree' n z✝ y\nhrec✝ : ∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y\nz : M F\na✝¹ : F.A\nf✝¹ : B F a✝¹ → M F\nhx : Agree' zero z (M.mk { fst := a✝¹, snd := f✝¹ })\na✝ : F.A\nf✝ : B F a✝ → M F\nhy : Agree' zero z (M.mk { fst := a✝, snd := f✝ })\nhrec : a✝¹ = a✝\n⊢ MIntl.approx (M.mk { fst := a✝¹, snd := f✝¹ }) (zero + 1) = MIntl.approx (M.mk { fst := a✝, snd := f✝ }) (zero + 1)\n[PROOFSTEP]\nsubst hrec\n[GOAL]\ncase zero.f.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn : ℕ\nx y z✝ : M F\nhx✝ : Agree' n z✝ x\nhy✝ : Agree' n z✝ y\nhrec : ∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y\nz : M F\na✝ : F.A\nf✝¹ : B F a✝ → M F\nhx : Agree' zero z (M.mk { fst := a✝, snd := f✝¹ })\nf✝ : B F a✝ → M F\nhy : Agree' zero z (M.mk { fst := a✝, snd := f✝ })\n⊢ MIntl.approx (M.mk { fst := a✝, snd := f✝¹ }) (zero + 1) = MIntl.approx (M.mk { fst := a✝, snd := f✝ }) (zero + 1)\n[PROOFSTEP]\nsimp only [approx_mk, true_and_iff, eq_self_iff_true, heq_iff_eq, zero_eq, CofixA.intro.injEq, heq_eq_eq,\n  eq_iff_true_of_subsingleton, and_self]\n[GOAL]\ncase succ\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx✝ y✝ z✝ : M F\nhx✝ : Agree' n✝ z✝ x✝\nhy✝ : Agree' n✝ z✝ y✝\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x✝ = iselect ps y✝\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\nx y z : M F\nhx : Agree' (succ n) z x\nhy : Agree' (succ n) z y\nhrec : ∀ (ps : Path F), succ n = length ps → iselect ps x = iselect ps y\n⊢ MIntl.approx x (succ n + 1) = MIntl.approx y (succ n + 1)\n[PROOFSTEP]\ncases hx\n[GOAL]\ncase succ.step\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx✝¹ y✝¹ z✝ : M F\nhx : Agree' n✝ z✝ x✝¹\nhy✝ : Agree' n✝ z✝ y✝¹\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x✝¹ = iselect ps y✝¹\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\nx y z : M F\nhy : Agree' (succ n) z y\nhrec : ∀ (ps : Path F), succ n = length ps → iselect ps x = iselect ps y\na✝³ : F.A\nx✝ y✝ : B F a✝³ → M F\na✝² : ∀ (i : B F a✝³), Agree' n (x✝ i) (y✝ i)\na✝¹ : z = M.mk { fst := a✝³, snd := x✝ }\na✝ : x = M.mk { fst := a✝³, snd := y✝ }\n⊢ MIntl.approx x (succ n + 1) = MIntl.approx y (succ n + 1)\n[PROOFSTEP]\ncases hy\n[GOAL]\ncase succ.step.step\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx✝² y✝² z✝ : M F\nhx : Agree' n✝ z✝ x✝²\nhy : Agree' n✝ z✝ y✝²\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x✝² = iselect ps y✝²\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\nx y z : M F\nhrec : ∀ (ps : Path F), succ n = length ps → iselect ps x = iselect ps y\na✝⁷ : F.A\nx✝¹ y✝¹ : B F a✝⁷ → M F\na✝⁶ : ∀ (i : B F a✝⁷), Agree' n (x✝¹ i) (y✝¹ i)\na✝⁵ : z = M.mk { fst := a✝⁷, snd := x✝¹ }\na✝⁴ : x = M.mk { fst := a✝⁷, snd := y✝¹ }\na✝³ : F.A\nx✝ y✝ : B F a✝³ → M F\na✝² : ∀ (i : B F a✝³), Agree' n (x✝ i) (y✝ i)\na✝¹ : z = M.mk { fst := a✝³, snd := x✝ }\na✝ : y = M.mk { fst := a✝³, snd := y✝ }\n⊢ MIntl.approx x (succ n + 1) = MIntl.approx y (succ n + 1)\n[PROOFSTEP]\ninduction x using PFunctor.M.casesOn'\n[GOAL]\ncase succ.step.step.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y✝² z✝ : M F\nhx : Agree' n✝ z✝ x\nhy : Agree' n✝ z✝ y✝²\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y✝²\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\ny z : M F\na✝⁸ : F.A\nx✝¹ y✝¹ : B F a✝⁸ → M F\na✝⁷ : ∀ (i : B F a✝⁸), Agree' n (x✝¹ i) (y✝¹ i)\na✝⁶ : z = M.mk { fst := a✝⁸, snd := x✝¹ }\na✝⁵ : F.A\nx✝ y✝ : B F a✝⁵ → M F\na✝⁴ : ∀ (i : B F a✝⁵), Agree' n (x✝ i) (y✝ i)\na✝³ : z = M.mk { fst := a✝⁵, snd := x✝ }\na✝² : y = M.mk { fst := a✝⁵, snd := y✝ }\na✝¹ : F.A\nf✝ : B F a✝¹ → M F\nhrec : ∀ (ps : Path F), succ n = length ps → iselect ps (M.mk { fst := a✝¹, snd := f✝ }) = iselect ps y\na✝ : M.mk { fst := a✝¹, snd := f✝ } = M.mk { fst := a✝⁸, snd := y✝¹ }\n⊢ MIntl.approx (M.mk { fst := a✝¹, snd := f✝ }) (succ n + 1) = MIntl.approx y (succ n + 1)\n[PROOFSTEP]\ninduction y using PFunctor.M.casesOn'\n[GOAL]\ncase succ.step.step.f.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z✝ : M F\nhx : Agree' n✝ z✝ x\nhy : Agree' n✝ z✝ y\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\nz : M F\na✝⁹ : F.A\nx✝¹ y✝¹ : B F a✝⁹ → M F\na✝⁸ : ∀ (i : B F a✝⁹), Agree' n (x✝¹ i) (y✝¹ i)\na✝⁷ : z = M.mk { fst := a✝⁹, snd := x✝¹ }\na✝⁶ : F.A\nx✝ y✝ : B F a✝⁶ → M F\na✝⁵ : ∀ (i : B F a✝⁶), Agree' n (x✝ i) (y✝ i)\na✝⁴ : z = M.mk { fst := a✝⁶, snd := x✝ }\na✝³ : F.A\nf✝¹ : B F a✝³ → M F\na✝² : M.mk { fst := a✝³, snd := f✝¹ } = M.mk { fst := a✝⁹, snd := y✝¹ }\na✝¹ : F.A\nf✝ : B F a✝¹ → M F\na✝ : M.mk { fst := a✝¹, snd := f✝ } = M.mk { fst := a✝⁶, snd := y✝ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝³, snd := f✝¹ }) = iselect ps (M.mk { fst := a✝¹, snd := f✝ })\n⊢ MIntl.approx (M.mk { fst := a✝³, snd := f✝¹ }) (succ n + 1) =\n    MIntl.approx (M.mk { fst := a✝¹, snd := f✝ }) (succ n + 1)\n[PROOFSTEP]\nsubst z\n[GOAL]\ncase succ.step.step.f.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na✝⁸ : F.A\nx✝¹ y✝¹ : B F a✝⁸ → M F\na✝⁷ : ∀ (i : B F a✝⁸), Agree' n (x✝¹ i) (y✝¹ i)\na✝⁶ : F.A\nx✝ y✝ : B F a✝⁶ → M F\na✝⁵ : ∀ (i : B F a✝⁶), Agree' n (x✝ i) (y✝ i)\na✝⁴ : F.A\nf✝¹ : B F a✝⁴ → M F\na✝³ : M.mk { fst := a✝⁴, snd := f✝¹ } = M.mk { fst := a✝⁸, snd := y✝¹ }\na✝² : F.A\nf✝ : B F a✝² → M F\na✝¹ : M.mk { fst := a✝², snd := f✝ } = M.mk { fst := a✝⁶, snd := y✝ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝⁴, snd := f✝¹ }) = iselect ps (M.mk { fst := a✝², snd := f✝ })\na✝ : M.mk { fst := a✝⁸, snd := x✝¹ } = M.mk { fst := a✝⁶, snd := x✝ }\n⊢ MIntl.approx (M.mk { fst := a✝⁴, snd := f✝¹ }) (succ n + 1) =\n    MIntl.approx (M.mk { fst := a✝², snd := f✝ }) (succ n + 1)\n[PROOFSTEP]\niterate 3 (have := mk_inj ‹_›; cases this)\n[GOAL]\ncase succ.step.step.f.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na✝⁸ : F.A\nx✝¹ y✝¹ : B F a✝⁸ → M F\na✝⁷ : ∀ (i : B F a✝⁸), Agree' n (x✝¹ i) (y✝¹ i)\na✝⁶ : F.A\nx✝ y✝ : B F a✝⁶ → M F\na✝⁵ : ∀ (i : B F a✝⁶), Agree' n (x✝ i) (y✝ i)\na✝⁴ : F.A\nf✝¹ : B F a✝⁴ → M F\na✝³ : M.mk { fst := a✝⁴, snd := f✝¹ } = M.mk { fst := a✝⁸, snd := y✝¹ }\na✝² : F.A\nf✝ : B F a✝² → M F\na✝¹ : M.mk { fst := a✝², snd := f✝ } = M.mk { fst := a✝⁶, snd := y✝ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝⁴, snd := f✝¹ }) = iselect ps (M.mk { fst := a✝², snd := f✝ })\na✝ : M.mk { fst := a✝⁸, snd := x✝¹ } = M.mk { fst := a✝⁶, snd := x✝ }\n⊢ MIntl.approx (M.mk { fst := a✝⁴, snd := f✝¹ }) (succ n + 1) =\n    MIntl.approx (M.mk { fst := a✝², snd := f✝ }) (succ n + 1)\n[PROOFSTEP]\nhave := mk_inj ‹_›\n[GOAL]\ncase succ.step.step.f.f\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na✝⁸ : F.A\nx✝¹ y✝¹ : B F a✝⁸ → M F\na✝⁷ : ∀ (i : B F a✝⁸), Agree' n (x✝¹ i) (y✝¹ i)\na✝⁶ : F.A\nx✝ y✝ : B F a✝⁶ → M F\na✝⁵ : ∀ (i : B F a✝⁶), Agree' n (x✝ i) (y✝ i)\na✝⁴ : F.A\nf✝¹ : B F a✝⁴ → M F\na✝³ : M.mk { fst := a✝⁴, snd := f✝¹ } = M.mk { fst := a✝⁸, snd := y✝¹ }\na✝² : F.A\nf✝ : B F a✝² → M F\na✝¹ : M.mk { fst := a✝², snd := f✝ } = M.mk { fst := a✝⁶, snd := y✝ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝⁴, snd := f✝¹ }) = iselect ps (M.mk { fst := a✝², snd := f✝ })\na✝ : M.mk { fst := a✝⁸, snd := x✝¹ } = M.mk { fst := a✝⁶, snd := x✝ }\nthis : { fst := a✝⁸, snd := x✝¹ } = { fst := a✝⁶, snd := x✝ }\n⊢ MIntl.approx (M.mk { fst := a✝⁴, snd := f✝¹ }) (succ n + 1) =\n    MIntl.approx (M.mk { fst := a✝², snd := f✝ }) (succ n + 1)\n[PROOFSTEP]\ncases this\n[GOAL]\ncase succ.step.step.f.f.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na✝⁷ : F.A\nx✝ y✝¹ : B F a✝⁷ → M F\na✝⁶ : ∀ (i : B F a✝⁷), Agree' n (x✝ i) (y✝¹ i)\na✝⁵ : F.A\nf✝¹ : B F a✝⁵ → M F\na✝⁴ : M.mk { fst := a✝⁵, snd := f✝¹ } = M.mk { fst := a✝⁷, snd := y✝¹ }\na✝³ : F.A\nf✝ : B F a✝³ → M F\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝⁵, snd := f✝¹ }) = iselect ps (M.mk { fst := a✝³, snd := f✝ })\ny✝ : B F a✝⁷ → M F\na✝² : M.mk { fst := a✝³, snd := f✝ } = M.mk { fst := a✝⁷, snd := y✝ }\na✝¹ : ∀ (i : B F a✝⁷), Agree' n (x✝ i) (y✝ i)\na✝ : M.mk { fst := a✝⁷, snd := x✝ } = M.mk { fst := a✝⁷, snd := x✝ }\n⊢ MIntl.approx (M.mk { fst := a✝⁵, snd := f✝¹ }) (succ n + 1) =\n    MIntl.approx (M.mk { fst := a✝³, snd := f✝ }) (succ n + 1)\n[PROOFSTEP]\nhave := mk_inj ‹_›\n[GOAL]\ncase succ.step.step.f.f.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na✝⁷ : F.A\nx✝ y✝¹ : B F a✝⁷ → M F\na✝⁶ : ∀ (i : B F a✝⁷), Agree' n (x✝ i) (y✝¹ i)\na✝⁵ : F.A\nf✝¹ : B F a✝⁵ → M F\na✝⁴ : M.mk { fst := a✝⁵, snd := f✝¹ } = M.mk { fst := a✝⁷, snd := y✝¹ }\na✝³ : F.A\nf✝ : B F a✝³ → M F\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝⁵, snd := f✝¹ }) = iselect ps (M.mk { fst := a✝³, snd := f✝ })\ny✝ : B F a✝⁷ → M F\na✝² : M.mk { fst := a✝³, snd := f✝ } = M.mk { fst := a✝⁷, snd := y✝ }\na✝¹ : ∀ (i : B F a✝⁷), Agree' n (x✝ i) (y✝ i)\na✝ : M.mk { fst := a✝⁷, snd := x✝ } = M.mk { fst := a✝⁷, snd := x✝ }\nthis : { fst := a✝⁷, snd := x✝ } = { fst := a✝⁷, snd := x✝ }\n⊢ MIntl.approx (M.mk { fst := a✝⁵, snd := f✝¹ }) (succ n + 1) =\n    MIntl.approx (M.mk { fst := a✝³, snd := f✝ }) (succ n + 1)\n[PROOFSTEP]\ncases this\n[GOAL]\ncase succ.step.step.f.f.refl.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na✝⁷ : F.A\nx✝ y✝¹ : B F a✝⁷ → M F\na✝⁶ : ∀ (i : B F a✝⁷), Agree' n (x✝ i) (y✝¹ i)\na✝⁵ : F.A\nf✝¹ : B F a✝⁵ → M F\na✝⁴ : M.mk { fst := a✝⁵, snd := f✝¹ } = M.mk { fst := a✝⁷, snd := y✝¹ }\na✝³ : F.A\nf✝ : B F a✝³ → M F\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝⁵, snd := f✝¹ }) = iselect ps (M.mk { fst := a✝³, snd := f✝ })\ny✝ : B F a✝⁷ → M F\na✝² : M.mk { fst := a✝³, snd := f✝ } = M.mk { fst := a✝⁷, snd := y✝ }\na✝¹ : ∀ (i : B F a✝⁷), Agree' n (x✝ i) (y✝ i)\na✝ : M.mk { fst := a✝⁷, snd := x✝ } = M.mk { fst := a✝⁷, snd := x✝ }\n⊢ MIntl.approx (M.mk { fst := a✝⁵, snd := f✝¹ }) (succ n + 1) =\n    MIntl.approx (M.mk { fst := a✝³, snd := f✝ }) (succ n + 1)\n[PROOFSTEP]\nhave := mk_inj ‹_›\n[GOAL]\ncase succ.step.step.f.f.refl.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na✝⁷ : F.A\nx✝ y✝¹ : B F a✝⁷ → M F\na✝⁶ : ∀ (i : B F a✝⁷), Agree' n (x✝ i) (y✝¹ i)\na✝⁵ : F.A\nf✝¹ : B F a✝⁵ → M F\na✝⁴ : M.mk { fst := a✝⁵, snd := f✝¹ } = M.mk { fst := a✝⁷, snd := y✝¹ }\na✝³ : F.A\nf✝ : B F a✝³ → M F\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝⁵, snd := f✝¹ }) = iselect ps (M.mk { fst := a✝³, snd := f✝ })\ny✝ : B F a✝⁷ → M F\na✝² : M.mk { fst := a✝³, snd := f✝ } = M.mk { fst := a✝⁷, snd := y✝ }\na✝¹ : ∀ (i : B F a✝⁷), Agree' n (x✝ i) (y✝ i)\na✝ : M.mk { fst := a✝⁷, snd := x✝ } = M.mk { fst := a✝⁷, snd := x✝ }\nthis : { fst := a✝⁷, snd := x✝ } = { fst := a✝⁷, snd := x✝ }\n⊢ MIntl.approx (M.mk { fst := a✝⁵, snd := f✝¹ }) (succ n + 1) =\n    MIntl.approx (M.mk { fst := a✝³, snd := f✝ }) (succ n + 1)\n[PROOFSTEP]\ncases this\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nhrec✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na✝⁷ : F.A\nx✝ y✝¹ : B F a✝⁷ → M F\na✝⁶ : ∀ (i : B F a✝⁷), Agree' n (x✝ i) (y✝¹ i)\na✝⁵ : F.A\nf✝¹ : B F a✝⁵ → M F\na✝⁴ : M.mk { fst := a✝⁵, snd := f✝¹ } = M.mk { fst := a✝⁷, snd := y✝¹ }\na✝³ : F.A\nf✝ : B F a✝³ → M F\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝⁵, snd := f✝¹ }) = iselect ps (M.mk { fst := a✝³, snd := f✝ })\ny✝ : B F a✝⁷ → M F\na✝² : M.mk { fst := a✝³, snd := f✝ } = M.mk { fst := a✝⁷, snd := y✝ }\na✝¹ : ∀ (i : B F a✝⁷), Agree' n (x✝ i) (y✝ i)\na✝ : M.mk { fst := a✝⁷, snd := x✝ } = M.mk { fst := a✝⁷, snd := x✝ }\n⊢ MIntl.approx (M.mk { fst := a✝⁵, snd := f✝¹ }) (succ n + 1) =\n    MIntl.approx (M.mk { fst := a✝³, snd := f✝ }) (succ n + 1)\n[PROOFSTEP]\nrename_i n_ih a f₃ f₂ hAgree₂ _ _ h₂ _ _ f₁ h₁ hAgree₁ clr\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\na✝¹ : F.A\nf✝¹ : B F a✝¹ → M F\nh₂ : M.mk { fst := a✝¹, snd := f✝¹ } = M.mk { fst := a, snd := f₂ }\na✝ : F.A\nf✝ : B F a✝ → M F\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝¹, snd := f✝¹ }) = iselect ps (M.mk { fst := a✝, snd := f✝ })\nf₁ : B F a → M F\nh₁ : M.mk { fst := a✝, snd := f✝ } = M.mk { fst := a, snd := f₁ }\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\n⊢ MIntl.approx (M.mk { fst := a✝¹, snd := f✝¹ }) (succ n + 1) =\n    MIntl.approx (M.mk { fst := a✝, snd := f✝ }) (succ n + 1)\n[PROOFSTEP]\nsimp only [approx_mk, true_and_iff, eq_self_iff_true, heq_iff_eq]\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\na✝¹ : F.A\nf✝¹ : B F a✝¹ → M F\nh₂ : M.mk { fst := a✝¹, snd := f✝¹ } = M.mk { fst := a, snd := f₂ }\na✝ : F.A\nf✝ : B F a✝ → M F\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝¹, snd := f✝¹ }) = iselect ps (M.mk { fst := a✝, snd := f✝ })\nf₁ : B F a → M F\nh₁ : M.mk { fst := a✝, snd := f✝ } = M.mk { fst := a, snd := f₁ }\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\n⊢ (CofixA.intro a✝¹ fun j => MIntl.approx (f✝¹ j) (n + 1)) = CofixA.intro a✝ fun j => MIntl.approx (f✝ j) (n + 1)\n[PROOFSTEP]\nhave := mk_inj h₁\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\na✝¹ : F.A\nf✝¹ : B F a✝¹ → M F\nh₂ : M.mk { fst := a✝¹, snd := f✝¹ } = M.mk { fst := a, snd := f₂ }\na✝ : F.A\nf✝ : B F a✝ → M F\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝¹, snd := f✝¹ }) = iselect ps (M.mk { fst := a✝, snd := f✝ })\nf₁ : B F a → M F\nh₁ : M.mk { fst := a✝, snd := f✝ } = M.mk { fst := a, snd := f₁ }\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\nthis : { fst := a✝, snd := f✝ } = { fst := a, snd := f₁ }\n⊢ (CofixA.intro a✝¹ fun j => MIntl.approx (f✝¹ j) (n + 1)) = CofixA.intro a✝ fun j => MIntl.approx (f✝ j) (n + 1)\n[PROOFSTEP]\ncases this\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\na✝ : F.A\nf✝ : B F a✝ → M F\nh₂ : M.mk { fst := a✝, snd := f✝ } = M.mk { fst := a, snd := f₂ }\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝, snd := f✝ }) = iselect ps (M.mk { fst := a, snd := f₁ })\nh₁ : M.mk { fst := a, snd := f₁ } = M.mk { fst := a, snd := f₁ }\n⊢ (CofixA.intro a✝ fun j => MIntl.approx (f✝ j) (n + 1)) = CofixA.intro a fun j => MIntl.approx (f₁ j) (n + 1)\n[PROOFSTEP]\nclear h₁\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\na✝ : F.A\nf✝ : B F a✝ → M F\nh₂ : M.mk { fst := a✝, snd := f✝ } = M.mk { fst := a, snd := f₂ }\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝, snd := f✝ }) = iselect ps (M.mk { fst := a, snd := f₁ })\n⊢ (CofixA.intro a✝ fun j => MIntl.approx (f✝ j) (n + 1)) = CofixA.intro a fun j => MIntl.approx (f₁ j) (n + 1)\n[PROOFSTEP]\nhave := mk_inj h₂\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\na✝ : F.A\nf✝ : B F a✝ → M F\nh₂ : M.mk { fst := a✝, snd := f✝ } = M.mk { fst := a, snd := f₂ }\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a✝, snd := f✝ }) = iselect ps (M.mk { fst := a, snd := f₁ })\nthis : { fst := a✝, snd := f✝ } = { fst := a, snd := f₂ }\n⊢ (CofixA.intro a✝ fun j => MIntl.approx (f✝ j) (n + 1)) = CofixA.intro a fun j => MIntl.approx (f₁ j) (n + 1)\n[PROOFSTEP]\ncases this\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\nh₂ : M.mk { fst := a, snd := f₂ } = M.mk { fst := a, snd := f₂ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a, snd := f₂ }) = iselect ps (M.mk { fst := a, snd := f₁ })\n⊢ (CofixA.intro a fun j => MIntl.approx (f₂ j) (n + 1)) = CofixA.intro a fun j => MIntl.approx (f₁ j) (n + 1)\n[PROOFSTEP]\nclear h₂\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a, snd := f₂ }) = iselect ps (M.mk { fst := a, snd := f₁ })\n⊢ (CofixA.intro a fun j => MIntl.approx (f₂ j) (n + 1)) = CofixA.intro a fun j => MIntl.approx (f₁ j) (n + 1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl.refl.e_a\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a, snd := f₂ }) = iselect ps (M.mk { fst := a, snd := f₁ })\n⊢ (fun j => MIntl.approx (f₂ j) (n + 1)) = fun j => MIntl.approx (f₁ j) (n + 1)\n[PROOFSTEP]\next i\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl.refl.e_a.h\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a, snd := f₂ }) = iselect ps (M.mk { fst := a, snd := f₁ })\ni : B F a\n⊢ MIntl.approx (f₂ i) (n + 1) = MIntl.approx (f₁ i) (n + 1)\n[PROOFSTEP]\napply n_ih\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl.refl.e_a.h.hx\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a, snd := f₂ }) = iselect ps (M.mk { fst := a, snd := f₁ })\ni : B F a\n⊢ Agree' n ?succ.step.step.f.f.refl.refl.refl.refl.refl.e_a.h.z (f₂ i)\n[PROOFSTEP]\nsolve_by_elim\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl.refl.e_a.h.hy\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a, snd := f₂ }) = iselect ps (M.mk { fst := a, snd := f₁ })\ni : B F a\n⊢ Agree' n (f₃ i) (f₁ i)\n[PROOFSTEP]\nsolve_by_elim\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl.refl.e_a.h.hrec\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a, snd := f₂ }) = iselect ps (M.mk { fst := a, snd := f₁ })\ni : B F a\n⊢ ∀ (ps : Path F), n = length ps → iselect ps (f₂ i) = iselect ps (f₁ i)\n[PROOFSTEP]\nintrov h\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl.refl.e_a.h.hrec\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\nhrec :\n  ∀ (ps : Path F),\n    succ n = length ps → iselect ps (M.mk { fst := a, snd := f₂ }) = iselect ps (M.mk { fst := a, snd := f₁ })\ni : B F a\nps : Path F\nh : n = length ps\n⊢ iselect ps (f₂ i) = iselect ps (f₁ i)\n[PROOFSTEP]\nspecialize hrec (⟨_, i⟩ :: ps) (congr_arg _ h)\n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl.refl.e_a.h.hrec\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\ni : B F a\nps : Path F\nh : n = length ps\nhrec :\n  iselect ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f₂ }) =\n    iselect ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f₁ })\n⊢ iselect ps (f₂ i) = iselect ps (f₁ i)\n[PROOFSTEP]\nsimp only [iselect_cons] at hrec \n[GOAL]\ncase succ.step.step.f.f.refl.refl.refl.refl.refl.e_a.h.hrec\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝¹ : Inhabited (M F)\ninst✝ : DecidableEq F.A\nn✝ : ℕ\nx y z : M F\nhx : Agree' n✝ z x\nhy : Agree' n✝ z y\nn_ih✝ : ∀ (ps : Path F), n✝ = length ps → iselect ps x = iselect ps y\nn : ℕ\nn_ih :\n  ∀ (x y z : M F),\n    Agree' n z x →\n      Agree' n z y →\n        (∀ (ps : Path F), n = length ps → iselect ps x = iselect ps y) → MIntl.approx x (n + 1) = MIntl.approx y (n + 1)\na : F.A\nf₃ f₂ : B F a → M F\nhAgree₂ : ∀ (i : B F a), Agree' n (f₃ i) (f₂ i)\nf₁ : B F a → M F\nhAgree₁ : ∀ (i : B F a), Agree' n (f₃ i) (f₁ i)\nclr : M.mk { fst := a, snd := f₃ } = M.mk { fst := a, snd := f₃ }\ni : B F a\nps : Path F\nh : n = length ps\nhrec : iselect ps (f₂ i) = iselect ps (f₁ i)\n⊢ iselect ps (f₂ i) = iselect ps (f₁ i)\n[PROOFSTEP]\nexact hrec\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\n⊢ x = y\n[PROOFSTEP]\napply ext'\n[GOAL]\ncase H\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\n⊢ ∀ (i : ℕ), MIntl.approx x i = MIntl.approx y i\n[PROOFSTEP]\nintro i\n[GOAL]\ncase H\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\ni : ℕ\n⊢ MIntl.approx x i = MIntl.approx y i\n[PROOFSTEP]\ninduction' i with i i_ih\n[GOAL]\ncase H.zero\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\n⊢ MIntl.approx x zero = MIntl.approx y zero\n[PROOFSTEP]\ncases x.approx 0\n[GOAL]\ncase H.zero.continue\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\n⊢ CofixA.continue = MIntl.approx y zero\n[PROOFSTEP]\ncases y.approx 0\n[GOAL]\ncase H.zero.continue.continue\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\n⊢ CofixA.continue = CofixA.continue\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase H.succ\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\ni : ℕ\ni_ih : MIntl.approx x i = MIntl.approx y i\n⊢ MIntl.approx x (succ i) = MIntl.approx y (succ i)\n[PROOFSTEP]\napply ext_aux x y x\n[GOAL]\ncase H.succ.hx\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\ni : ℕ\ni_ih : MIntl.approx x i = MIntl.approx y i\n⊢ Agree' i x x\n[PROOFSTEP]\nrw [← agree_iff_agree']\n[GOAL]\ncase H.succ.hx\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\ni : ℕ\ni_ih : MIntl.approx x i = MIntl.approx y i\n⊢ Agree (MIntl.approx x i) (MIntl.approx x (i + 1))\n[PROOFSTEP]\napply x.consistent\n[GOAL]\ncase H.succ.hy\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\ni : ℕ\ni_ih : MIntl.approx x i = MIntl.approx y i\n⊢ Agree' i x y\n[PROOFSTEP]\nrw [← agree_iff_agree', i_ih]\n[GOAL]\ncase H.succ.hy\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\ni : ℕ\ni_ih : MIntl.approx x i = MIntl.approx y i\n⊢ Agree (MIntl.approx y i) (MIntl.approx y (i + 1))\n[PROOFSTEP]\napply y.consistent\n[GOAL]\ncase H.succ.hrec\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\ni : ℕ\ni_ih : MIntl.approx x i = MIntl.approx y i\n⊢ ∀ (ps : Path F), i = length ps → iselect ps x = iselect ps y\n[PROOFSTEP]\nintrov H'\n[GOAL]\ncase H.succ.hrec\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), iselect ps x = iselect ps y\ni : ℕ\ni_ih : MIntl.approx x i = MIntl.approx y i\nps : Path F\nH' : i = length ps\n⊢ iselect ps x = iselect ps y\n[PROOFSTEP]\ndsimp only [iselect] at H \n[GOAL]\ncase H.succ.hrec\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), head (isubtree ps x) = head (isubtree ps y)\ni : ℕ\ni_ih : MIntl.approx x i = MIntl.approx y i\nps : Path F\nH' : i = length ps\n⊢ iselect ps x = iselect ps y\n[PROOFSTEP]\ncases H'\n[GOAL]\ncase H.succ.hrec.refl\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\ninst✝ : Inhabited (M F)\nx y : M F\nH : ∀ (ps : Path F), head (isubtree ps x) = head (isubtree ps y)\nps : Path F\ni_ih : MIntl.approx x (length ps) = MIntl.approx y (length ps)\n⊢ iselect ps x = iselect ps y\n[PROOFSTEP]\napply H ps\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps : Path F\n⊢ R s₁ s₂ →\n    IsPath ps s₁ ∨ IsPath ps s₂ →\n      iselect ps s₁ = iselect ps s₂ ∧\n        ∃ a f f',\n          isubtree ps s₁ = M.mk { fst := a, snd := f } ∧\n            isubtree ps s₂ = M.mk { fst := a, snd := f' } ∧ ∀ (i : B F a), R (f i) (f' i)\n[PROOFSTEP]\nintro h₀ hh\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps : Path F\nh₀ : R s₁ s₂\nhh : IsPath ps s₁ ∨ IsPath ps s₂\n⊢ iselect ps s₁ = iselect ps s₂ ∧\n    ∃ a f f',\n      isubtree ps s₁ = M.mk { fst := a, snd := f } ∧\n        isubtree ps s₂ = M.mk { fst := a, snd := f' } ∧ ∀ (i : B F a), R (f i) (f' i)\n[PROOFSTEP]\ninduction' s₁ using PFunctor.M.casesOn' with a f\n[GOAL]\ncase f\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps : Path F\nh₀✝ : R s₁ s₂\nhh✝ : IsPath ps s₁ ∨ IsPath ps s₂\na : F.A\nf : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) s₂\nhh : IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps s₂\n⊢ iselect ps (M.mk { fst := a, snd := f }) = iselect ps s₂ ∧\n    ∃ a_1 f_1 f',\n      isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree ps s₂ = M.mk { fst := a_1, snd := f' } ∧ ∀ (i : B F a_1), R (f_1 i) (f' i)\n[PROOFSTEP]\nrename_i h₁ hh₁\n[GOAL]\ncase f\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps : Path F\nh₁ : R s₁ s₂\nhh₁ : IsPath ps s₁ ∨ IsPath ps s₂\na : F.A\nf : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) s₂\nhh : IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps s₂\n⊢ iselect ps (M.mk { fst := a, snd := f }) = iselect ps s₂ ∧\n    ∃ a_1 f_1 f',\n      isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree ps s₂ = M.mk { fst := a_1, snd := f' } ∧ ∀ (i : B F a_1), R (f_1 i) (f' i)\n[PROOFSTEP]\ninduction' s₂ using PFunctor.M.casesOn' with a' f'\n[GOAL]\ncase f.f\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps : Path F\nh₁✝ : R s₁ s₂\nhh₁✝ : IsPath ps s₁ ∨ IsPath ps s₂\na : F.A\nf : B F a → M F\nh₀✝ : R (M.mk { fst := a, snd := f }) s₂\nhh✝ : IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps s₂\na' : F.A\nf' : B F a' → M F\nh₁ : R s₁ (M.mk { fst := a', snd := f' })\nhh₁ : IsPath ps s₁ ∨ IsPath ps (M.mk { fst := a', snd := f' })\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a', snd := f' })\nhh : IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a', snd := f' })\n⊢ iselect ps (M.mk { fst := a, snd := f }) = iselect ps (M.mk { fst := a', snd := f' }) ∧\n    ∃ a_1 f_1 f'_1,\n      isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree ps (M.mk { fst := a', snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n          ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\n[PROOFSTEP]\nrename_i h₁' hh₁' h₂ hh₂\n[GOAL]\ncase f.f\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps : Path F\nh₁' : R s₁ s₂\nhh₁' : IsPath ps s₁ ∨ IsPath ps s₂\na : F.A\nf : B F a → M F\nh₂ : R (M.mk { fst := a, snd := f }) s₂\nhh₂ : IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps s₂\na' : F.A\nf' : B F a' → M F\nh₁ : R s₁ (M.mk { fst := a', snd := f' })\nhh₁ : IsPath ps s₁ ∨ IsPath ps (M.mk { fst := a', snd := f' })\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a', snd := f' })\nhh : IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a', snd := f' })\n⊢ iselect ps (M.mk { fst := a, snd := f }) = iselect ps (M.mk { fst := a', snd := f' }) ∧\n    ∃ a_1 f_1 f'_1,\n      isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree ps (M.mk { fst := a', snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n          ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\n[PROOFSTEP]\nclear h₁ hh₁ h₂ hh₂ hh₁'\n[GOAL]\ncase f.f\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps : Path F\nh₁' : R s₁ s₂\na : F.A\nf : B F a → M F\na' : F.A\nf' : B F a' → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a', snd := f' })\nhh : IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a', snd := f' })\n⊢ iselect ps (M.mk { fst := a, snd := f }) = iselect ps (M.mk { fst := a', snd := f' }) ∧\n    ∃ a_1 f_1 f'_1,\n      isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree ps (M.mk { fst := a', snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n          ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\n[PROOFSTEP]\nobtain rfl : a = a' := bisim.head h₀\n[GOAL]\ncase f.f\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps : Path F\nh₁' : R s₁ s₂\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\nhh : IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' })\n⊢ iselect ps (M.mk { fst := a, snd := f }) = iselect ps (M.mk { fst := a, snd := f' }) ∧\n    ∃ a_1 f_1 f'_1,\n      isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n          ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\n[PROOFSTEP]\ninduction' ps with i ps ps_ih generalizing a f f'\n[GOAL]\ncase f.f.nil\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps (M.mk { fst := a✝, snd := f'✝ })\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\nhh : IsPath [] (M.mk { fst := a, snd := f }) ∨ IsPath [] (M.mk { fst := a, snd := f' })\n⊢ iselect [] (M.mk { fst := a, snd := f }) = iselect [] (M.mk { fst := a, snd := f' }) ∧\n    ∃ a_1 f_1 f'_1,\n      isubtree [] (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree [] (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n          ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\n[PROOFSTEP]\nexists rfl, a, f, f', rfl, rfl\n[GOAL]\ncase f.f.nil\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps (M.mk { fst := a✝, snd := f'✝ })\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\nhh : IsPath [] (M.mk { fst := a, snd := f }) ∨ IsPath [] (M.mk { fst := a, snd := f' })\n⊢ ∀ (i : B F a), R (f i) (f' i)\n[PROOFSTEP]\napply bisim.tail h₀\n[GOAL]\ncase f.f.cons\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\ni : IdxCat F\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        iselect ps (M.mk { fst := a, snd := f }) = iselect ps (M.mk { fst := a, snd := f' }) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\nhh : IsPath (i :: ps) (M.mk { fst := a, snd := f }) ∨ IsPath (i :: ps) (M.mk { fst := a, snd := f' })\n⊢ iselect (i :: ps) (M.mk { fst := a, snd := f }) = iselect (i :: ps) (M.mk { fst := a, snd := f' }) ∧\n    ∃ a_1 f_1 f'_1,\n      isubtree (i :: ps) (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree (i :: ps) (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n          ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\n[PROOFSTEP]\ncases' i with a' i\n[GOAL]\ncase f.f.cons.mk\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        iselect ps (M.mk { fst := a, snd := f }) = iselect ps (M.mk { fst := a, snd := f' }) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\na' : F.A\ni : B F a'\nhh :\n  IsPath ({ fst := a', snd := i } :: ps) (M.mk { fst := a, snd := f }) ∨\n    IsPath ({ fst := a', snd := i } :: ps) (M.mk { fst := a, snd := f' })\n⊢ iselect ({ fst := a', snd := i } :: ps) (M.mk { fst := a, snd := f }) =\n      iselect ({ fst := a', snd := i } :: ps) (M.mk { fst := a, snd := f' }) ∧\n    ∃ a_1 f_1 f'_1,\n      isubtree ({ fst := a', snd := i } :: ps) (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree ({ fst := a', snd := i } :: ps) (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n          ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\n[PROOFSTEP]\nobtain rfl : a = a' := by rcases hh with hh | hh <;> cases isPath_cons hh <;> rfl\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        iselect ps (M.mk { fst := a, snd := f }) = iselect ps (M.mk { fst := a, snd := f' }) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\na' : F.A\ni : B F a'\nhh :\n  IsPath ({ fst := a', snd := i } :: ps) (M.mk { fst := a, snd := f }) ∨\n    IsPath ({ fst := a', snd := i } :: ps) (M.mk { fst := a, snd := f' })\n⊢ a = a'\n[PROOFSTEP]\nrcases hh with hh | hh\n[GOAL]\ncase inl\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        iselect ps (M.mk { fst := a, snd := f }) = iselect ps (M.mk { fst := a, snd := f' }) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\na' : F.A\ni : B F a'\nhh : IsPath ({ fst := a', snd := i } :: ps) (M.mk { fst := a, snd := f })\n⊢ a = a'\n[PROOFSTEP]\ncases isPath_cons hh\n[GOAL]\ncase inr\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        iselect ps (M.mk { fst := a, snd := f }) = iselect ps (M.mk { fst := a, snd := f' }) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\na' : F.A\ni : B F a'\nhh : IsPath ({ fst := a', snd := i } :: ps) (M.mk { fst := a, snd := f' })\n⊢ a = a'\n[PROOFSTEP]\ncases isPath_cons hh\n[GOAL]\ncase inl.refl\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        iselect ps (M.mk { fst := a, snd := f }) = iselect ps (M.mk { fst := a, snd := f' }) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B F a\nhh : IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f })\n⊢ a = a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.refl\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        iselect ps (M.mk { fst := a, snd := f }) = iselect ps (M.mk { fst := a, snd := f' }) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B F a\nhh : IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })\n⊢ a = a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase f.f.cons.mk\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        iselect ps (M.mk { fst := a, snd := f }) = iselect ps (M.mk { fst := a, snd := f' }) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B F a\nhh :\n  IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) ∨\n    IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })\n⊢ iselect ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) =\n      iselect ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' }) ∧\n    ∃ a_1 f_1 f'_1,\n      isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n          ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\n[PROOFSTEP]\ndsimp only [iselect] at ps_ih ⊢\n[GOAL]\ncase f.f.cons.mk\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        head (isubtree ps (M.mk { fst := a, snd := f })) = head (isubtree ps (M.mk { fst := a, snd := f' })) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B F a\nhh :\n  IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) ∨\n    IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })\n⊢ head (isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f })) =\n      head (isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })) ∧\n    ∃ a_1 f_1 f'_1,\n      isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n          ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\n[PROOFSTEP]\nhave h₁ := bisim.tail h₀ i\n[GOAL]\ncase f.f.cons.mk\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        head (isubtree ps (M.mk { fst := a, snd := f })) = head (isubtree ps (M.mk { fst := a, snd := f' })) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B F a\nhh :\n  IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) ∨\n    IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })\nh₁ : R (f i) (f' i)\n⊢ head (isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f })) =\n      head (isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })) ∧\n    ∃ a_1 f_1 f'_1,\n      isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n          ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\n[PROOFSTEP]\ninduction' h : f i using PFunctor.M.casesOn' with a₀ f₀\n[GOAL]\ncase f.f.cons.mk.f\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        head (isubtree ps (M.mk { fst := a, snd := f })) = head (isubtree ps (M.mk { fst := a, snd := f' })) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B F a\nhh :\n  IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) ∨\n    IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })\nh₁ : R (f i) (f' i)\nx✝ : M F\nh✝ : f i = x✝\na₀ : F.A\nf₀ : B F a₀ → M F\nh : f i = M.mk { fst := a₀, snd := f₀ }\n⊢ head (isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f })) =\n      head (isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })) ∧\n    ∃ a_1 f_1 f'_1,\n      isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n          ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\n[PROOFSTEP]\ninduction' h' : f' i using PFunctor.M.casesOn' with a₁ f₁\n[GOAL]\ncase f.f.cons.mk.f.f\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        head (isubtree ps (M.mk { fst := a, snd := f })) = head (isubtree ps (M.mk { fst := a, snd := f' })) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B F a\nhh :\n  IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) ∨\n    IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })\nh₁ : R (f i) (f' i)\nx✝¹ : M F\nh✝ : f i = x✝¹\na₀ : F.A\nf₀ : B F a₀ → M F\nh : f i = M.mk { fst := a₀, snd := f₀ }\nx✝ : M F\nh'✝ : f' i = x✝\na₁ : F.A\nf₁ : B F a₁ → M F\nh' : f' i = M.mk { fst := a₁, snd := f₁ }\n⊢ head (isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f })) =\n      head (isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })) ∧\n    ∃ a_1 f_1 f'_1,\n      isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n        isubtree ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n          ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\n[PROOFSTEP]\nsimp only [h, h', isubtree_cons] at ps_ih ⊢\n[GOAL]\ncase f.f.cons.mk.f.f\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        head (isubtree ps (M.mk { fst := a, snd := f })) = head (isubtree ps (M.mk { fst := a, snd := f' })) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B F a\nhh :\n  IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) ∨\n    IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })\nh₁ : R (f i) (f' i)\nx✝¹ : M F\nh✝ : f i = x✝¹\na₀ : F.A\nf₀ : B F a₀ → M F\nh : f i = M.mk { fst := a₀, snd := f₀ }\nx✝ : M F\nh'✝ : f' i = x✝\na₁ : F.A\nf₁ : B F a₁ → M F\nh' : f' i = M.mk { fst := a₁, snd := f₁ }\n⊢ head (isubtree ps (M.mk { fst := a₀, snd := f₀ })) = head (isubtree ps (M.mk { fst := a₁, snd := f₁ })) ∧\n    ∃ a f f',\n      isubtree ps (M.mk { fst := a₀, snd := f₀ }) = M.mk { fst := a, snd := f } ∧\n        isubtree ps (M.mk { fst := a₁, snd := f₁ }) = M.mk { fst := a, snd := f' } ∧ ∀ (i : B F a), R (f i) (f' i)\n[PROOFSTEP]\nrw [h, h'] at h₁ \n[GOAL]\ncase f.f.cons.mk.f.f\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        head (isubtree ps (M.mk { fst := a, snd := f })) = head (isubtree ps (M.mk { fst := a, snd := f' })) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B F a\nhh :\n  IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) ∨\n    IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })\nx✝¹ : M F\nh✝ : f i = x✝¹\na₀ : F.A\nf₀ : B F a₀ → M F\nh : f i = M.mk { fst := a₀, snd := f₀ }\nx✝ : M F\nh'✝ : f' i = x✝\na₁ : F.A\nf₁ : B F a₁ → M F\nh₁ : R (M.mk { fst := a₀, snd := f₀ }) (M.mk { fst := a₁, snd := f₁ })\nh' : f' i = M.mk { fst := a₁, snd := f₁ }\n⊢ head (isubtree ps (M.mk { fst := a₀, snd := f₀ })) = head (isubtree ps (M.mk { fst := a₁, snd := f₁ })) ∧\n    ∃ a f f',\n      isubtree ps (M.mk { fst := a₀, snd := f₀ }) = M.mk { fst := a, snd := f } ∧\n        isubtree ps (M.mk { fst := a₁, snd := f₁ }) = M.mk { fst := a, snd := f' } ∧ ∀ (i : B F a), R (f i) (f' i)\n[PROOFSTEP]\nobtain rfl : a₀ = a₁ := bisim.head h₁\n[GOAL]\ncase f.f.cons.mk.f.f\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        head (isubtree ps (M.mk { fst := a, snd := f })) = head (isubtree ps (M.mk { fst := a, snd := f' })) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B F a\nhh :\n  IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) ∨\n    IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })\nx✝¹ : M F\nh✝ : f i = x✝¹\na₀ : F.A\nf₀ : B F a₀ → M F\nh : f i = M.mk { fst := a₀, snd := f₀ }\nx✝ : M F\nh'✝ : f' i = x✝\nf₁ : B F a₀ → M F\nh₁ : R (M.mk { fst := a₀, snd := f₀ }) (M.mk { fst := a₀, snd := f₁ })\nh' : f' i = M.mk { fst := a₀, snd := f₁ }\n⊢ head (isubtree ps (M.mk { fst := a₀, snd := f₀ })) = head (isubtree ps (M.mk { fst := a₀, snd := f₁ })) ∧\n    ∃ a f f',\n      isubtree ps (M.mk { fst := a₀, snd := f₀ }) = M.mk { fst := a, snd := f } ∧\n        isubtree ps (M.mk { fst := a₀, snd := f₁ }) = M.mk { fst := a, snd := f' } ∧ ∀ (i : B F a), R (f i) (f' i)\n[PROOFSTEP]\napply ps_ih _ _ _ h₁\n[GOAL]\ncase f.f.cons.mk.f.f\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        head (isubtree ps (M.mk { fst := a, snd := f })) = head (isubtree ps (M.mk { fst := a, snd := f' })) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B F a\nhh :\n  IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) ∨\n    IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })\nx✝¹ : M F\nh✝ : f i = x✝¹\na₀ : F.A\nf₀ : B F a₀ → M F\nh : f i = M.mk { fst := a₀, snd := f₀ }\nx✝ : M F\nh'✝ : f' i = x✝\nf₁ : B F a₀ → M F\nh₁ : R (M.mk { fst := a₀, snd := f₀ }) (M.mk { fst := a₀, snd := f₁ })\nh' : f' i = M.mk { fst := a₀, snd := f₁ }\n⊢ IsPath ps (M.mk { fst := a₀, snd := f₀ }) ∨ IsPath ps (M.mk { fst := a₀, snd := f₁ })\n[PROOFSTEP]\nrw [← h, ← h']\n[GOAL]\ncase f.f.cons.mk.f.f\nF : PFunctor\nX : Type u_1\nf✝¹ : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Inhabited (M F)\nbisim : IsBisimulation R\ns₁ s₂ : M F\nps✝ : Path F\nh₁' : R s₁ s₂\na✝ : F.A\nf✝ f'✝ : B F a✝ → M F\nh₀✝ : R (M.mk { fst := a✝, snd := f✝ }) (M.mk { fst := a✝, snd := f'✝ })\nhh✝ : IsPath ps✝ (M.mk { fst := a✝, snd := f✝ }) ∨ IsPath ps✝ (M.mk { fst := a✝, snd := f'✝ })\nps : List (IdxCat F)\nps_ih :\n  ∀ (a : F.A) (f f' : B F a → M F),\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) →\n      IsPath ps (M.mk { fst := a, snd := f }) ∨ IsPath ps (M.mk { fst := a, snd := f' }) →\n        head (isubtree ps (M.mk { fst := a, snd := f })) = head (isubtree ps (M.mk { fst := a, snd := f' })) ∧\n          ∃ a_1 f_1 f'_1,\n            isubtree ps (M.mk { fst := a, snd := f }) = M.mk { fst := a_1, snd := f_1 } ∧\n              isubtree ps (M.mk { fst := a, snd := f' }) = M.mk { fst := a_1, snd := f'_1 } ∧\n                ∀ (i : B F a_1), R (f_1 i) (f'_1 i)\na : F.A\nf f' : B F a → M F\nh₀ : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B F a\nhh :\n  IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f }) ∨\n    IsPath ({ fst := a, snd := i } :: ps) (M.mk { fst := a, snd := f' })\nx✝¹ : M F\nh✝ : f i = x✝¹\na₀ : F.A\nf₀ : B F a₀ → M F\nh : f i = M.mk { fst := a₀, snd := f₀ }\nx✝ : M F\nh'✝ : f' i = x✝\nf₁ : B F a₀ → M F\nh₁ : R (M.mk { fst := a₀, snd := f₀ }) (M.mk { fst := a₀, snd := f₁ })\nh' : f' i = M.mk { fst := a₀, snd := f₁ }\n⊢ IsPath ps (f i) ∨ IsPath ps (f' i)\n[PROOFSTEP]\napply Or.imp isPath_cons' isPath_cons' hh\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Nonempty (M F)\nbisim : IsBisimulation R\n⊢ ∀ (s₁ s₂ : M F), R s₁ s₂ → s₁ = s₂\n[PROOFSTEP]\ninhabit M F\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Nonempty (M F)\nbisim : IsBisimulation R\ninhabited_h : Inhabited (M F)\n⊢ ∀ (s₁ s₂ : M F), R s₁ s₂ → s₁ = s₂\n[PROOFSTEP]\nintrov Hr\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Nonempty (M F)\nbisim : IsBisimulation R\ninhabited_h : Inhabited (M F)\ns₁ s₂ : M F\nHr : R s₁ s₂\n⊢ s₁ = s₂\n[PROOFSTEP]\napply ext\n[GOAL]\ncase H\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Nonempty (M F)\nbisim : IsBisimulation R\ninhabited_h : Inhabited (M F)\ns₁ s₂ : M F\nHr : R s₁ s₂\n⊢ ∀ (ps : Path F), iselect ps s₁ = iselect ps s₂\n[PROOFSTEP]\nintrov\n[GOAL]\ncase H\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Nonempty (M F)\nbisim : IsBisimulation R\ninhabited_h : Inhabited (M F)\ns₁ s₂ : M F\nHr : R s₁ s₂\nps : Path F\n⊢ iselect ps s₁ = iselect ps s₂\n[PROOFSTEP]\nby_cases h : IsPath ps s₁ ∨ IsPath ps s₂\n[GOAL]\ncase pos\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Nonempty (M F)\nbisim : IsBisimulation R\ninhabited_h : Inhabited (M F)\ns₁ s₂ : M F\nHr : R s₁ s₂\nps : Path F\nh : IsPath ps s₁ ∨ IsPath ps s₂\n⊢ iselect ps s₁ = iselect ps s₂\n[PROOFSTEP]\nhave H := nth_of_bisim R bisim _ _ ps Hr h\n[GOAL]\ncase pos\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Nonempty (M F)\nbisim : IsBisimulation R\ninhabited_h : Inhabited (M F)\ns₁ s₂ : M F\nHr : R s₁ s₂\nps : Path F\nh : IsPath ps s₁ ∨ IsPath ps s₂\nH :\n  iselect ps s₁ = iselect ps s₂ ∧\n    ∃ a f f',\n      isubtree ps s₁ = M.mk { fst := a, snd := f } ∧\n        isubtree ps s₂ = M.mk { fst := a, snd := f' } ∧ ∀ (i : B F a), R (f i) (f' i)\n⊢ iselect ps s₁ = iselect ps s₂\n[PROOFSTEP]\nexact H.left\n[GOAL]\ncase neg\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Nonempty (M F)\nbisim : IsBisimulation R\ninhabited_h : Inhabited (M F)\ns₁ s₂ : M F\nHr : R s₁ s₂\nps : Path F\nh : ¬(IsPath ps s₁ ∨ IsPath ps s₂)\n⊢ iselect ps s₁ = iselect ps s₂\n[PROOFSTEP]\nrw [not_or] at h \n[GOAL]\ncase neg\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Nonempty (M F)\nbisim : IsBisimulation R\ninhabited_h : Inhabited (M F)\ns₁ s₂ : M F\nHr : R s₁ s₂\nps : Path F\nh : ¬IsPath ps s₁ ∧ ¬IsPath ps s₂\n⊢ iselect ps s₁ = iselect ps s₂\n[PROOFSTEP]\ncases' h with h₀ h₁\n[GOAL]\ncase neg.intro\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nR : M F → M F → Prop\ninst✝ : Nonempty (M F)\nbisim : IsBisimulation R\ninhabited_h : Inhabited (M F)\ns₁ s₂ : M F\nHr : R s₁ s₂\nps : Path F\nh₀ : ¬IsPath ps s₁\nh₁ : ¬IsPath ps s₂\n⊢ iselect ps s₁ = iselect ps s₂\n[PROOFSTEP]\nsimp only [iselect_eq_default, *, not_false_iff]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nx : α\n⊢ dest (M.corec g x) = M.corec g <$> g x\n[PROOFSTEP]\nrw [corec_def, dest_mk]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nh :\n  ∀ (x y : M P),\n    R x y → ∃ a f f', dest x = { fst := a, snd := f } ∧ dest y = { fst := a, snd := f' } ∧ ∀ (i : B P a), R (f i) (f' i)\n⊢ ∀ (x y : M P), R x y → x = y\n[PROOFSTEP]\nintrov h'\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nh :\n  ∀ (x y : M P),\n    R x y → ∃ a f f', dest x = { fst := a, snd := f } ∧ dest y = { fst := a, snd := f' } ∧ ∀ (i : B P a), R (f i) (f' i)\nx y : M P\nh' : R x y\n⊢ x = y\n[PROOFSTEP]\nhaveI := Inhabited.mk x.head\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nh :\n  ∀ (x y : M P),\n    R x y → ∃ a f f', dest x = { fst := a, snd := f } ∧ dest y = { fst := a, snd := f' } ∧ ∀ (i : B P a), R (f i) (f' i)\nx y : M P\nh' : R x y\nthis : Inhabited P.A\n⊢ x = y\n[PROOFSTEP]\napply eq_of_bisim R _ _ _ h'\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nh :\n  ∀ (x y : M P),\n    R x y → ∃ a f f', dest x = { fst := a, snd := f } ∧ dest y = { fst := a, snd := f' } ∧ ∀ (i : B P a), R (f i) (f' i)\nx y : M P\nh' : R x y\nthis : Inhabited P.A\n⊢ IsBisimulation R\n[PROOFSTEP]\nclear h' x y\n[GOAL]\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nh :\n  ∀ (x y : M P),\n    R x y → ∃ a f f', dest x = { fst := a, snd := f } ∧ dest y = { fst := a, snd := f' } ∧ ∀ (i : B P a), R (f i) (f' i)\nthis : Inhabited P.A\n⊢ IsBisimulation R\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase head\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nh :\n  ∀ (x y : M P),\n    R x y → ∃ a f f', dest x = { fst := a, snd := f } ∧ dest y = { fst := a, snd := f' } ∧ ∀ (i : B P a), R (f i) (f' i)\nthis : Inhabited P.A\n⊢ ∀ {a a' : P.A} {f : B P a → M P} {f' : B P a' → M P},\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a', snd := f' }) → a = a'\n[PROOFSTEP]\nintrov ih\n[GOAL]\ncase tail\nF : PFunctor\nX : Type u_1\nf : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nh :\n  ∀ (x y : M P),\n    R x y → ∃ a f f', dest x = { fst := a, snd := f } ∧ dest y = { fst := a, snd := f' } ∧ ∀ (i : B P a), R (f i) (f' i)\nthis : Inhabited P.A\n⊢ ∀ {a : P.A} {f f' : B P a → M P},\n    R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' }) → ∀ (i : B P a), R (f i) (f' i)\n[PROOFSTEP]\nintrov ih\n[GOAL]\ncase head\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nh :\n  ∀ (x y : M P),\n    R x y → ∃ a f f', dest x = { fst := a, snd := f } ∧ dest y = { fst := a, snd := f' } ∧ ∀ (i : B P a), R (f i) (f' i)\nthis : Inhabited P.A\na a' : P.A\nf : B P a → M P\nf' : B P a' → M P\nih : R (M.mk { fst := a, snd := f }) (M.mk { fst := a', snd := f' })\n⊢ a = a'\n[PROOFSTEP]\nrcases h _ _ ih with ⟨a'', g, g', h₀, h₁, h₂⟩\n[GOAL]\ncase tail\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nh :\n  ∀ (x y : M P),\n    R x y → ∃ a f f', dest x = { fst := a, snd := f } ∧ dest y = { fst := a, snd := f' } ∧ ∀ (i : B P a), R (f i) (f' i)\nthis : Inhabited P.A\na : P.A\nf f' : B P a → M P\nih : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B P a\n⊢ R (f i) (f' i)\n[PROOFSTEP]\nrcases h _ _ ih with ⟨a'', g, g', h₀, h₁, h₂⟩\n[GOAL]\ncase head.intro.intro.intro.intro.intro\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nh :\n  ∀ (x y : M P),\n    R x y → ∃ a f f', dest x = { fst := a, snd := f } ∧ dest y = { fst := a, snd := f' } ∧ ∀ (i : B P a), R (f i) (f' i)\nthis : Inhabited P.A\na a' : P.A\nf : B P a → M P\nf' : B P a' → M P\nih : R (M.mk { fst := a, snd := f }) (M.mk { fst := a', snd := f' })\na'' : P.A\ng g' : B P a'' → M P\nh₀ : dest (M.mk { fst := a, snd := f }) = { fst := a'', snd := g }\nh₁ : dest (M.mk { fst := a', snd := f' }) = { fst := a'', snd := g' }\nh₂ : ∀ (i : B P a''), R (g i) (g' i)\n⊢ a = a'\n[PROOFSTEP]\nclear h\n[GOAL]\ncase tail.intro.intro.intro.intro.intro\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nh :\n  ∀ (x y : M P),\n    R x y → ∃ a f f', dest x = { fst := a, snd := f } ∧ dest y = { fst := a, snd := f' } ∧ ∀ (i : B P a), R (f i) (f' i)\nthis : Inhabited P.A\na : P.A\nf f' : B P a → M P\nih : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B P a\na'' : P.A\ng g' : B P a'' → M P\nh₀ : dest (M.mk { fst := a, snd := f }) = { fst := a'', snd := g }\nh₁ : dest (M.mk { fst := a, snd := f' }) = { fst := a'', snd := g' }\nh₂ : ∀ (i : B P a''), R (g i) (g' i)\n⊢ R (f i) (f' i)\n[PROOFSTEP]\nclear h\n[GOAL]\ncase head.intro.intro.intro.intro.intro\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nthis : Inhabited P.A\na a' : P.A\nf : B P a → M P\nf' : B P a' → M P\nih : R (M.mk { fst := a, snd := f }) (M.mk { fst := a', snd := f' })\na'' : P.A\ng g' : B P a'' → M P\nh₀ : dest (M.mk { fst := a, snd := f }) = { fst := a'', snd := g }\nh₁ : dest (M.mk { fst := a', snd := f' }) = { fst := a'', snd := g' }\nh₂ : ∀ (i : B P a''), R (g i) (g' i)\n⊢ a = a'\n[PROOFSTEP]\nreplace h₀ := congr_arg Sigma.fst h₀\n[GOAL]\ncase head.intro.intro.intro.intro.intro\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nthis : Inhabited P.A\na a' : P.A\nf : B P a → M P\nf' : B P a' → M P\nih : R (M.mk { fst := a, snd := f }) (M.mk { fst := a', snd := f' })\na'' : P.A\ng g' : B P a'' → M P\nh₁ : dest (M.mk { fst := a', snd := f' }) = { fst := a'', snd := g' }\nh₂ : ∀ (i : B P a''), R (g i) (g' i)\nh₀ : (dest (M.mk { fst := a, snd := f })).fst = { fst := a'', snd := g }.fst\n⊢ a = a'\n[PROOFSTEP]\nreplace h₁ := congr_arg Sigma.fst h₁\n[GOAL]\ncase head.intro.intro.intro.intro.intro\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nthis : Inhabited P.A\na a' : P.A\nf : B P a → M P\nf' : B P a' → M P\nih : R (M.mk { fst := a, snd := f }) (M.mk { fst := a', snd := f' })\na'' : P.A\ng g' : B P a'' → M P\nh₂ : ∀ (i : B P a''), R (g i) (g' i)\nh₀ : (dest (M.mk { fst := a, snd := f })).fst = { fst := a'', snd := g }.fst\nh₁ : (dest (M.mk { fst := a', snd := f' })).fst = { fst := a'', snd := g' }.fst\n⊢ a = a'\n[PROOFSTEP]\nsimp only [dest_mk] at h₀ h₁ \n[GOAL]\ncase head.intro.intro.intro.intro.intro\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nthis : Inhabited P.A\na a' : P.A\nf : B P a → M P\nf' : B P a' → M P\nih : R (M.mk { fst := a, snd := f }) (M.mk { fst := a', snd := f' })\na'' : P.A\ng g' : B P a'' → M P\nh₂ : ∀ (i : B P a''), R (g i) (g' i)\nh₀ : a = a''\nh₁ : a' = a''\n⊢ a = a'\n[PROOFSTEP]\nrw [h₀, h₁]\n[GOAL]\ncase tail.intro.intro.intro.intro.intro\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nthis : Inhabited P.A\na : P.A\nf f' : B P a → M P\nih : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B P a\na'' : P.A\ng g' : B P a'' → M P\nh₀ : dest (M.mk { fst := a, snd := f }) = { fst := a'', snd := g }\nh₁ : dest (M.mk { fst := a, snd := f' }) = { fst := a'', snd := g' }\nh₂ : ∀ (i : B P a''), R (g i) (g' i)\n⊢ R (f i) (f' i)\n[PROOFSTEP]\nsimp only [dest_mk] at h₀ h₁ \n[GOAL]\ncase tail.intro.intro.intro.intro.intro\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nthis : Inhabited P.A\na : P.A\nf f' : B P a → M P\nih : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B P a\na'' : P.A\ng g' : B P a'' → M P\nh₀ : { fst := a, snd := f } = { fst := a'', snd := g }\nh₁ : { fst := a, snd := f' } = { fst := a'', snd := g' }\nh₂ : ∀ (i : B P a''), R (g i) (g' i)\n⊢ R (f i) (f' i)\n[PROOFSTEP]\ncases h₀\n[GOAL]\ncase tail.intro.intro.intro.intro.intro.refl\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nthis : Inhabited P.A\na : P.A\nf f' : B P a → M P\nih : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B P a\ng' : B P a → M P\nh₁ : { fst := a, snd := f' } = { fst := a, snd := g' }\nh₂ : ∀ (i : B P a), R (f i) (g' i)\n⊢ R (f i) (f' i)\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase tail.intro.intro.intro.intro.intro.refl.refl\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\nR : M P → M P → Prop\nthis : Inhabited P.A\na : P.A\nf f' : B P a → M P\nih : R (M.mk { fst := a, snd := f }) (M.mk { fst := a, snd := f' })\ni : B P a\nh₂ : ∀ (i : B P a), R (f i) (f' i)\n⊢ R (f i) (f' i)\n[PROOFSTEP]\napply h₂\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nf : α → M P\nhyp : ∀ (x : α), dest (f x) = f <$> g x\n⊢ f = M.corec g\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nf : α → M P\nhyp : ∀ (x : α), dest (f x) = f <$> g x\nx : α\n⊢ f x = M.corec g x\n[PROOFSTEP]\napply bisim' (fun _ => True) _ _ _ _ trivial\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nf : α → M P\nhyp : ∀ (x : α), dest (f x) = f <$> g x\nx : α\n⊢ ∀ (x : α),\n    (fun x => True) x →\n      ∃ a f_1 f',\n        dest (f x) = { fst := a, snd := f_1 } ∧\n          dest (M.corec g x) = { fst := a, snd := f' } ∧\n            ∀ (i : B P a), ∃ x', (fun x => True) x' ∧ f_1 i = f x' ∧ f' i = M.corec g x'\n[PROOFSTEP]\nclear x\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nf : α → M P\nhyp : ∀ (x : α), dest (f x) = f <$> g x\n⊢ ∀ (x : α),\n    (fun x => True) x →\n      ∃ a f_1 f',\n        dest (f x) = { fst := a, snd := f_1 } ∧\n          dest (M.corec g x) = { fst := a, snd := f' } ∧\n            ∀ (i : B P a), ∃ x', (fun x => True) x' ∧ f_1 i = f x' ∧ f' i = M.corec g x'\n[PROOFSTEP]\nintro x _\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nf : α → M P\nhyp : ∀ (x : α), dest (f x) = f <$> g x\nx : α\na✝ : True\n⊢ ∃ a f_1 f',\n    dest (f x) = { fst := a, snd := f_1 } ∧\n      dest (M.corec g x) = { fst := a, snd := f' } ∧\n        ∀ (i : B P a), ∃ x', (fun x => True) x' ∧ f_1 i = f x' ∧ f' i = M.corec g x'\n[PROOFSTEP]\ncases' gxeq : g x with a f'\n[GOAL]\ncase mk\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nf : α → M P\nhyp : ∀ (x : α), dest (f x) = f <$> g x\nx : α\na✝ : True\na : P.A\nf' : B P a → α\ngxeq : g x = { fst := a, snd := f' }\n⊢ ∃ a f_1 f',\n    dest (f x) = { fst := a, snd := f_1 } ∧\n      dest (M.corec g x) = { fst := a, snd := f' } ∧\n        ∀ (i : B P a), ∃ x', (fun x => True) x' ∧ f_1 i = f x' ∧ f' i = M.corec g x'\n[PROOFSTEP]\nhave h₀ : M.dest (f x) = ⟨a, f ∘ f'⟩ := by rw [hyp, gxeq, PFunctor.map_eq]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nf : α → M P\nhyp : ∀ (x : α), dest (f x) = f <$> g x\nx : α\na✝ : True\na : P.A\nf' : B P a → α\ngxeq : g x = { fst := a, snd := f' }\n⊢ dest (f x) = { fst := a, snd := f ∘ f' }\n[PROOFSTEP]\nrw [hyp, gxeq, PFunctor.map_eq]\n[GOAL]\ncase mk\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nf : α → M P\nhyp : ∀ (x : α), dest (f x) = f <$> g x\nx : α\na✝ : True\na : P.A\nf' : B P a → α\ngxeq : g x = { fst := a, snd := f' }\nh₀ : dest (f x) = { fst := a, snd := f ∘ f' }\n⊢ ∃ a f_1 f',\n    dest (f x) = { fst := a, snd := f_1 } ∧\n      dest (M.corec g x) = { fst := a, snd := f' } ∧\n        ∀ (i : B P a), ∃ x', (fun x => True) x' ∧ f_1 i = f x' ∧ f' i = M.corec g x'\n[PROOFSTEP]\nhave h₁ : M.dest (M.corec g x) = ⟨a, M.corec g ∘ f'⟩ := by rw [dest_corec, gxeq, PFunctor.map_eq]\n[GOAL]\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nf : α → M P\nhyp : ∀ (x : α), dest (f x) = f <$> g x\nx : α\na✝ : True\na : P.A\nf' : B P a → α\ngxeq : g x = { fst := a, snd := f' }\nh₀ : dest (f x) = { fst := a, snd := f ∘ f' }\n⊢ dest (M.corec g x) = { fst := a, snd := M.corec g ∘ f' }\n[PROOFSTEP]\nrw [dest_corec, gxeq, PFunctor.map_eq]\n[GOAL]\ncase mk\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nf : α → M P\nhyp : ∀ (x : α), dest (f x) = f <$> g x\nx : α\na✝ : True\na : P.A\nf' : B P a → α\ngxeq : g x = { fst := a, snd := f' }\nh₀ : dest (f x) = { fst := a, snd := f ∘ f' }\nh₁ : dest (M.corec g x) = { fst := a, snd := M.corec g ∘ f' }\n⊢ ∃ a f_1 f',\n    dest (f x) = { fst := a, snd := f_1 } ∧\n      dest (M.corec g x) = { fst := a, snd := f' } ∧\n        ∀ (i : B P a), ∃ x', (fun x => True) x' ∧ f_1 i = f x' ∧ f' i = M.corec g x'\n[PROOFSTEP]\nrefine' ⟨_, _, _, h₀, h₁, _⟩\n[GOAL]\ncase mk\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nf : α → M P\nhyp : ∀ (x : α), dest (f x) = f <$> g x\nx : α\na✝ : True\na : P.A\nf' : B P a → α\ngxeq : g x = { fst := a, snd := f' }\nh₀ : dest (f x) = { fst := a, snd := f ∘ f' }\nh₁ : dest (M.corec g x) = { fst := a, snd := M.corec g ∘ f' }\n⊢ ∀ (i : B P a), ∃ x', (fun x => True) x' ∧ (f ∘ f') i = f x' ∧ (M.corec g ∘ f') i = M.corec g x'\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mk\nF : PFunctor\nX : Type u_1\nf✝ : X → Obj F X\nP : PFunctor\nα : Type u\ng : α → Obj P α\nf : α → M P\nhyp : ∀ (x : α), dest (f x) = f <$> g x\nx : α\na✝ : True\na : P.A\nf' : B P a → α\ngxeq : g x = { fst := a, snd := f' }\nh₀ : dest (f x) = { fst := a, snd := f ∘ f' }\nh₁ : dest (M.corec g x) = { fst := a, snd := M.corec g ∘ f' }\ni : B P a\n⊢ ∃ x', (fun x => True) x' ∧ (f ∘ f') i = f x' ∧ (M.corec g ∘ f') i = M.corec g x'\n[PROOFSTEP]\nexact ⟨f' i, trivial, rfl, rfl⟩\n", "meta": {"mathlib_filename": "Mathlib.Data.PFunctor.Univariate.M", "llama_tokens": 89638, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802471698041, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.36311052702783664}}
{"text": "[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\np q : NonUnitalSubalgebra R A\nh : (fun s => s.carrier) p = (fun s => s.carrier) q\n⊢ p = q\n[PROOFSTEP]\ncases p\n[GOAL]\ncase mk\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nq : NonUnitalSubalgebra R A\ntoNonUnitalSubsemiring✝ : NonUnitalSubsemiring A\nsmul_mem'✝ : ∀ (c : R) {x : A}, x ∈ toNonUnitalSubsemiring✝.carrier → c • x ∈ toNonUnitalSubsemiring✝.carrier\nh :\n  (fun s => s.carrier) { toNonUnitalSubsemiring := toNonUnitalSubsemiring✝, smul_mem' := smul_mem'✝ } =\n    (fun s => s.carrier) q\n⊢ { toNonUnitalSubsemiring := toNonUnitalSubsemiring✝, smul_mem' := smul_mem'✝ } = q\n[PROOFSTEP]\ncases q\n[GOAL]\ncase mk.mk\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\ntoNonUnitalSubsemiring✝¹ : NonUnitalSubsemiring A\nsmul_mem'✝¹ : ∀ (c : R) {x : A}, x ∈ toNonUnitalSubsemiring✝¹.carrier → c • x ∈ toNonUnitalSubsemiring✝¹.carrier\ntoNonUnitalSubsemiring✝ : NonUnitalSubsemiring A\nsmul_mem'✝ : ∀ (c : R) {x : A}, x ∈ toNonUnitalSubsemiring✝.carrier → c • x ∈ toNonUnitalSubsemiring✝.carrier\nh :\n  (fun s => s.carrier) { toNonUnitalSubsemiring := toNonUnitalSubsemiring✝¹, smul_mem' := smul_mem'✝¹ } =\n    (fun s => s.carrier) { toNonUnitalSubsemiring := toNonUnitalSubsemiring✝, smul_mem' := smul_mem'✝ }\n⊢ { toNonUnitalSubsemiring := toNonUnitalSubsemiring✝¹, smul_mem' := smul_mem'✝¹ } =\n    { toNonUnitalSubsemiring := toNonUnitalSubsemiring✝, smul_mem' := smul_mem'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_toNonUnitalSubsemiring\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\ntoNonUnitalSubsemiring✝¹ : NonUnitalSubsemiring A\nsmul_mem'✝¹ : ∀ (c : R) {x : A}, x ∈ toNonUnitalSubsemiring✝¹.carrier → c • x ∈ toNonUnitalSubsemiring✝¹.carrier\ntoNonUnitalSubsemiring✝ : NonUnitalSubsemiring A\nsmul_mem'✝ : ∀ (c : R) {x : A}, x ∈ toNonUnitalSubsemiring✝.carrier → c • x ∈ toNonUnitalSubsemiring✝.carrier\nh :\n  (fun s => s.carrier) { toNonUnitalSubsemiring := toNonUnitalSubsemiring✝¹, smul_mem' := smul_mem'✝¹ } =\n    (fun s => s.carrier) { toNonUnitalSubsemiring := toNonUnitalSubsemiring✝, smul_mem' := smul_mem'✝ }\n⊢ toNonUnitalSubsemiring✝¹ = toNonUnitalSubsemiring✝\n[PROOFSTEP]\nexact SetLike.coe_injective h\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nS T : NonUnitalSubalgebra R A\nh : S.toNonUnitalSubsemiring = T.toNonUnitalSubsemiring\nx : A\n⊢ x ∈ S ↔ x ∈ T\n[PROOFSTEP]\nrw [← mem_toNonUnitalSubsemiring, ← mem_toNonUnitalSubsemiring, h]\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nS T : NonUnitalSubalgebra R A\nh : toSubmodule S = toSubmodule T\nx : A\n⊢ x ∈ S ↔ x ∈ T\n[PROOFSTEP]\nrw [← mem_toSubmodule, ← mem_toSubmodule, h]\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nS : NonUnitalSubalgebra R A\ns : Set A\nhs : s = ↑S\nsrc✝ : NonUnitalSubsemiring A := NonUnitalSubsemiring.copy S.toNonUnitalSubsemiring s hs\nr : R\na : A\nha : a ∈ s\n⊢ r • a ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            mul_mem' :=\n              (_ :\n                ∀ {a b : A},\n                  a ∈ src✝.carrier → b ∈ src✝.carrier → a * b ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nshow r • a ∈ s\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nS : NonUnitalSubalgebra R A\ns : Set A\nhs : s = ↑S\nsrc✝ : NonUnitalSubsemiring A := NonUnitalSubsemiring.copy S.toNonUnitalSubsemiring s hs\nr : R\na : A\nha : a ∈ s\n⊢ r • a ∈ s\n[PROOFSTEP]\nrw [hs] at ha ⊢\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nS : NonUnitalSubalgebra R A\ns : Set A\nhs : s = ↑S\nsrc✝ : NonUnitalSubsemiring A := NonUnitalSubsemiring.copy S.toNonUnitalSubsemiring s hs\nr : R\na : A\nha : a ∈ ↑S\n⊢ r • a ∈ ↑S\n[PROOFSTEP]\nexact S.smul_mem' r ha\n[GOAL]\nF : Type v'\nR' : Type u'\nR✝ : Type u\nA✝ : Type v\nB : Type w\nC : Type w'\ninst✝¹⁰ : CommSemiring R✝\ninst✝⁹ : NonUnitalNonAssocSemiring A✝\ninst✝⁸ : Module R✝ A✝\ninst✝⁷ : NonUnitalNonAssocSemiring B\ninst✝⁶ : Module R✝ B\ninst✝⁵ : NonUnitalNonAssocSemiring C\ninst✝⁴ : Module R✝ C\ninst✝³ : NonUnitalAlgHomClass F R✝ A✝ B\nS✝ : NonUnitalSubalgebra R✝ A✝\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : NonUnitalRing A\ninst✝ : Module R A\nS T : NonUnitalSubalgebra R A\nh : toNonUnitalSubring S = toNonUnitalSubring T\nx : A\n⊢ x ∈ S ↔ x ∈ T\n[PROOFSTEP]\nrw [← mem_toNonUnitalSubring, ← mem_toNonUnitalSubring, h]\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nS✝ S T : NonUnitalSubalgebra R A\nh : (fun S => toSubmodule S) S = (fun S => toSubmodule S) T\n⊢ ∀ (x : A), x ∈ S ↔ x ∈ T\n[PROOFSTEP]\napply SetLike.ext_iff.1 h\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nS✝ S T : NonUnitalSubalgebra R A\nh : (fun S => S.toNonUnitalSubsemiring) S = (fun S => S.toNonUnitalSubsemiring) T\n⊢ ∀ (x : A), x ∈ S ↔ x ∈ T\n[PROOFSTEP]\napply SetLike.ext_iff.1 h\n[GOAL]\nF : Type v'\nR' : Type u'\nR✝ : Type u\nA✝ : Type v\nB : Type w\nC : Type w'\ninst✝¹⁰ : CommSemiring R✝\ninst✝⁹ : NonUnitalNonAssocSemiring A✝\ninst✝⁸ : Module R✝ A✝\ninst✝⁷ : NonUnitalNonAssocSemiring B\ninst✝⁶ : Module R✝ B\ninst✝⁵ : NonUnitalNonAssocSemiring C\ninst✝⁴ : Module R✝ C\ninst✝³ : NonUnitalAlgHomClass F R✝ A✝ B\nS✝ : NonUnitalSubalgebra R✝ A✝\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : NonUnitalRing A\ninst✝ : Module R A\nS T : NonUnitalSubalgebra R A\nh : (fun S => toNonUnitalSubring S) S = (fun S => toNonUnitalSubring S) T\n⊢ ∀ (x : A), x ∈ S ↔ x ∈ T\n[PROOFSTEP]\napply SetLike.ext_iff.1 h\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nS✝ : NonUnitalSubalgebra R A\nf : F\nS : NonUnitalSubalgebra R A\nsrc✝ : NonUnitalSubsemiring B := NonUnitalSubsemiring.map (↑f) S.toNonUnitalSubsemiring\nr : R\nb : B\nhb :\n  b ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            mul_mem' :=\n              (_ :\n                ∀ {a b : B},\n                  a ∈ src✝.carrier → b ∈ src✝.carrier → a * b ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n⊢ r • b ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            mul_mem' :=\n              (_ :\n                ∀ {a b : B},\n                  a ∈ src✝.carrier → b ∈ src✝.carrier → a * b ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrcases hb with ⟨a, ha, rfl⟩\n[GOAL]\ncase intro.intro\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nS✝ : NonUnitalSubalgebra R A\nf : F\nS : NonUnitalSubalgebra R A\nsrc✝ : NonUnitalSubsemiring B := NonUnitalSubsemiring.map (↑f) S.toNonUnitalSubsemiring\nr : R\na : A\nha : a ∈ ↑S.toNonUnitalSubsemiring\n⊢ r • ↑↑f a ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            mul_mem' :=\n              (_ :\n                ∀ {a b : B},\n                  a ∈ src✝.carrier → b ∈ src✝.carrier → a * b ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nexact map_smul f r a ▸ Set.mem_image_of_mem f (S.smul_mem' r ha)\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nφ : F\nr : R\na : B\n⊢ a ∈ (NonUnitalRingHom.srange ↑φ).toAddSubmonoid.toAddSubsemigroup.carrier →\n    r • a ∈ (NonUnitalRingHom.srange ↑φ).toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrintro ⟨a, rfl⟩\n[GOAL]\ncase intro\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nφ : F\nr : R\na : A\n⊢ r • ↑↑φ a ∈ (NonUnitalRingHom.srange ↑φ).toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nexact ⟨r • a, map_smul φ r a⟩\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nφ : F\n⊢ ↑(NonUnitalAlgHom.range φ) = Set.range ↑φ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nφ : F\nx✝ : B\n⊢ x✝ ∈ ↑(NonUnitalAlgHom.range φ) ↔ x✝ ∈ Set.range ↑φ\n[PROOFSTEP]\nrw [SetLike.mem_coe, mem_range]\n[GOAL]\ncase h\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nφ : F\nx✝ : B\n⊢ (∃ x, ↑φ x = x✝) ↔ x✝ ∈ Set.range ↑φ\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nϕ ψ : F\nx y : A\nhx : ↑ϕ x = ↑ψ x\nhy : ↑ϕ y = ↑ψ y\n⊢ x + y ∈ {a | ↑ϕ a = ↑ψ a}\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, map_add, map_add, hx, hy]\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nϕ ψ : F\n⊢ 0 ∈\n    { carrier := {a | ↑ϕ a = ↑ψ a},\n        add_mem' := (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x + y ∈ {a | ↑ϕ a = ↑ψ a}) }.carrier\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, map_zero, map_zero]\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nϕ ψ : F\nx y : A\nhx : ↑ϕ x = ↑ψ x\nhy : ↑ϕ y = ↑ψ y\n⊢ x * y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {a | ↑ϕ a = ↑ψ a},\n              add_mem' := (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x + y ∈ {a | ↑ϕ a = ↑ψ a}) },\n          zero_mem' :=\n            (_ :\n              0 ∈\n                { carrier := {a | ↑ϕ a = ↑ψ a},\n                    add_mem' :=\n                      (_ :\n                        ∀ {x y : A},\n                          ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x + y ∈ {a | ↑ϕ a = ↑ψ a}) }.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, map_mul, map_mul, hx, hy]\n[GOAL]\nF : Type v'\nR' : Type u'\nR : Type u\nA : Type v\nB : Type w\nC : Type w'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : NonUnitalNonAssocSemiring A\ninst✝⁵ : Module R A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : NonUnitalNonAssocSemiring C\ninst✝¹ : Module R C\ninst✝ : NonUnitalAlgHomClass F R A B\nϕ ψ : F\nr : R\nx : A\nhx : ↑ϕ x = ↑ψ x\n⊢ r • x ∈\n    {\n            toAddSubmonoid :=\n              {\n                toAddSubsemigroup :=\n                  { carrier := {a | ↑ϕ a = ↑ψ a},\n                    add_mem' := (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x + y ∈ {a | ↑ϕ a = ↑ψ a}) },\n                zero_mem' :=\n                  (_ :\n                    0 ∈\n                      { carrier := {a | ↑ϕ a = ↑ψ a},\n                          add_mem' :=\n                            (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x + y ∈ {a | ↑ϕ a = ↑ψ a}) }.carrier) },\n            mul_mem' :=\n              (_ :\n                ∀ {x y : A},\n                  ↑ϕ x = ↑ψ x →\n                    ↑ϕ y = ↑ψ y →\n                      x * y ∈\n                        {\n                              toAddSubsemigroup :=\n                                { carrier := {a | ↑ϕ a = ↑ψ a},\n                                  add_mem' :=\n                                    (_ : ∀ {x y : A}, ↑ϕ x = ↑ψ x → ↑ϕ y = ↑ψ y → x + y ∈ {a | ↑ϕ a = ↑ψ a}) },\n                              zero_mem' :=\n                                (_ :\n                                  0 ∈\n                                    { carrier := {a | ↑ϕ a = ↑ψ a},\n                                        add_mem' :=\n                                          (_ :\n                                            ∀ {x y : A},\n                                              ↑ϕ x = ↑ψ x →\n                                                ↑ϕ y = ↑ψ y →\n                                                  x + y ∈\n                                                    {a |\n                                                      ↑ϕ a =\n                                                        ↑ψ\n                                                          a}) }.carrier) }.toAddSubsemigroup.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, map_smul, map_smul, hx]\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\nsrc✝ : Submodule R A := Submodule.span R ↑(NonUnitalSubsemiring.closure s)\na b : A\nha : a ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\nhb : b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n⊢ a * b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n[PROOFSTEP]\nrefine' Submodule.span_induction ha _ _ _ _\n[GOAL]\ncase refine'_1\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\nsrc✝ : Submodule R A := Submodule.span R ↑(NonUnitalSubsemiring.closure s)\na b : A\nha : a ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\nhb : b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n⊢ ∀ (x : A), x ∈ ↑(NonUnitalSubsemiring.closure s) → x * b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n[PROOFSTEP]\nrefine' Submodule.span_induction hb _ _ _ _\n[GOAL]\ncase refine'_1.refine'_1\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\nsrc✝ : Submodule R A := Submodule.span R ↑(NonUnitalSubsemiring.closure s)\na b : A\nha : a ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\nhb : b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n⊢ ∀ (x : A),\n    x ∈ ↑(NonUnitalSubsemiring.closure s) →\n      ∀ (x_1 : A),\n        x_1 ∈ ↑(NonUnitalSubsemiring.closure s) → x_1 * x ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n[PROOFSTEP]\nexact fun x (hx : x ∈ NonUnitalSubsemiring.closure s) y (hy : y ∈ NonUnitalSubsemiring.closure s) =>\n  Submodule.subset_span (mul_mem hy hx)\n[GOAL]\ncase refine'_1.refine'_2\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\nsrc✝ : Submodule R A := Submodule.span R ↑(NonUnitalSubsemiring.closure s)\na b : A\nha : a ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\nhb : b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n⊢ ∀ (x : A), x ∈ ↑(NonUnitalSubsemiring.closure s) → x * 0 ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n[PROOFSTEP]\nexact fun x _hx => (mul_zero x).symm ▸ Submodule.zero_mem _\n[GOAL]\ncase refine'_1.refine'_3\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\nsrc✝ : Submodule R A := Submodule.span R ↑(NonUnitalSubsemiring.closure s)\na b : A\nha : a ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\nhb : b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n⊢ ∀ (x y : A),\n    (∀ (x_1 : A),\n        x_1 ∈ ↑(NonUnitalSubsemiring.closure s) → x_1 * x ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)) →\n      (∀ (x : A), x ∈ ↑(NonUnitalSubsemiring.closure s) → x * y ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)) →\n        ∀ (x_1 : A),\n          x_1 ∈ ↑(NonUnitalSubsemiring.closure s) → x_1 * (x + y) ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n[PROOFSTEP]\nexact fun x y hx hy z hz => (mul_add z x y).symm ▸ add_mem (hx z hz) (hy z hz)\n[GOAL]\ncase refine'_1.refine'_4\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\nsrc✝ : Submodule R A := Submodule.span R ↑(NonUnitalSubsemiring.closure s)\na b : A\nha : a ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\nhb : b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n⊢ ∀ (a : R) (x : A),\n    (∀ (x_1 : A),\n        x_1 ∈ ↑(NonUnitalSubsemiring.closure s) → x_1 * x ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)) →\n      ∀ (x_1 : A),\n        x_1 ∈ ↑(NonUnitalSubsemiring.closure s) → x_1 * a • x ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n[PROOFSTEP]\nexact fun r x hx y hy => (mul_smul_comm r y x).symm ▸ SMulMemClass.smul_mem r (hx y hy)\n[GOAL]\ncase refine'_2\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\nsrc✝ : Submodule R A := Submodule.span R ↑(NonUnitalSubsemiring.closure s)\na b : A\nha : a ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\nhb : b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n⊢ 0 * b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n[PROOFSTEP]\nexact (zero_mul b).symm ▸ Submodule.zero_mem _\n[GOAL]\ncase refine'_3\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\nsrc✝ : Submodule R A := Submodule.span R ↑(NonUnitalSubsemiring.closure s)\na b : A\nha : a ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\nhb : b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n⊢ ∀ (x y : A),\n    x * b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s) →\n      y * b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s) →\n        (x + y) * b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n[PROOFSTEP]\nexact fun x y => (add_mul x y b).symm ▸ add_mem\n[GOAL]\ncase refine'_4\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\nsrc✝ : Submodule R A := Submodule.span R ↑(NonUnitalSubsemiring.closure s)\na b : A\nha : a ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\nhb : b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n⊢ ∀ (a : R) (x : A),\n    x * b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s) →\n      a • x * b ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure s)\n[PROOFSTEP]\nexact fun r x hx => (smul_mul_assoc r x b).symm ▸ SMulMemClass.smul_mem r hx\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nH0 : p 0\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHsmul : ∀ (r : R) (x : { x // x ∈ adjoin R s }), p x → p (r • x)\nb : A\nhb : b ∈ adjoin R s\n⊢ p { val := b, property := hb }\n[PROOFSTEP]\nrefine Exists.elim ?_ (fun (hb : b ∈ adjoin R s) (hc : p ⟨b, hb⟩) => hc)\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nH0 : p 0\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHsmul : ∀ (r : R) (x : { x // x ∈ adjoin R s }), p x → p (r • x)\nb : A\nhb : b ∈ adjoin R s\n⊢ ∃ x, p { val := b, property := x }\n[PROOFSTEP]\napply adjoin_induction hb\n[GOAL]\ncase Hs\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nH0 : p 0\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHsmul : ∀ (r : R) (x : { x // x ∈ adjoin R s }), p x → p (r • x)\nb : A\nhb : b ∈ adjoin R s\n⊢ ∀ (x : A), x ∈ s → ∃ x_1, p { val := x, property := x_1 }\n[PROOFSTEP]\nexact fun x hx => ⟨subset_adjoin R hx, Hs x hx⟩\n[GOAL]\ncase Hadd\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nH0 : p 0\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHsmul : ∀ (r : R) (x : { x // x ∈ adjoin R s }), p x → p (r • x)\nb : A\nhb : b ∈ adjoin R s\n⊢ ∀ (x y : A),\n    (∃ x_1, p { val := x, property := x_1 }) →\n      (∃ x, p { val := y, property := x }) → ∃ x_1, p { val := x + y, property := x_1 }\n[PROOFSTEP]\nexact fun x y hx hy => Exists.elim hx <| fun hx' hx => Exists.elim hy <| fun hy' hy => ⟨add_mem hx' hy', Hadd _ _ hx hy⟩\n[GOAL]\ncase H0\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nH0 : p 0\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHsmul : ∀ (r : R) (x : { x // x ∈ adjoin R s }), p x → p (r • x)\nb : A\nhb : b ∈ adjoin R s\n⊢ ∃ x, p { val := 0, property := x }\n[PROOFSTEP]\nexact ⟨_, H0⟩\n[GOAL]\ncase Hmul\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nH0 : p 0\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHsmul : ∀ (r : R) (x : { x // x ∈ adjoin R s }), p x → p (r • x)\nb : A\nhb : b ∈ adjoin R s\n⊢ ∀ (x y : A),\n    (∃ x_1, p { val := x, property := x_1 }) →\n      (∃ x, p { val := y, property := x }) → ∃ x_1, p { val := x * y, property := x_1 }\n[PROOFSTEP]\nexact fun x y hx hy => Exists.elim hx <| fun hx' hx => Exists.elim hy <| fun hy' hy => ⟨mul_mem hx' hy', Hmul _ _ hx hy⟩\n[GOAL]\ncase Hsmul\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nH0 : p 0\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHsmul : ∀ (r : R) (x : { x // x ∈ adjoin R s }), p x → p (r • x)\nb : A\nhb : b ∈ adjoin R s\n⊢ ∀ (r : R) (x : A), (∃ x_1, p { val := x, property := x_1 }) → ∃ x_1, p { val := r • x, property := x_1 }\n[PROOFSTEP]\nexact fun r x hx => Exists.elim hx <| fun hx' hx => ⟨SMulMemClass.smul_mem r hx', Hsmul r _ hx⟩\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\n⊢ adjoin R ⊥ = ⊥\n[PROOFSTEP]\napply GaloisConnection.l_bot\n[GOAL]\ncase gc\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\n⊢ GaloisConnection (adjoin R) ?u\ncase u\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\n⊢ NonUnitalSubalgebra R A → Set A\n[PROOFSTEP]\nexact NonUnitalAlgebra.gc\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nS T : NonUnitalSubalgebra R A\n⊢ ∀ {x : A}, x ∈ S → x ∈ S ⊔ T\n[PROOFSTEP]\nrw [← SetLike.le_def]\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nS T : NonUnitalSubalgebra R A\n⊢ S ≤ S ⊔ T\n[PROOFSTEP]\nexact le_sup_left\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nS T : NonUnitalSubalgebra R A\n⊢ ∀ {x : A}, x ∈ T → x ∈ S ⊔ T\n[PROOFSTEP]\nrw [← SetLike.le_def]\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nS T : NonUnitalSubalgebra R A\n⊢ T ≤ S ⊔ T\n[PROOFSTEP]\nexact le_sup_right\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nS : Set (NonUnitalSubalgebra R A)\nx : A\n⊢ x ∈ sInf S ↔ ∀ (p : NonUnitalSubalgebra R A), p ∈ S → x ∈ p\n[PROOFSTEP]\nsimp only [← SetLike.mem_coe, coe_sInf, Set.mem_iInter₂]\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nS : Set (NonUnitalSubalgebra R A)\n⊢ ↑(NonUnitalSubalgebra.toSubmodule (sInf S)) = ↑(sInf (NonUnitalSubalgebra.toSubmodule '' S))\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nS : Set (NonUnitalSubalgebra R A)\n⊢ ↑(sInf S).toNonUnitalSubsemiring = ↑(sInf (NonUnitalSubalgebra.toNonUnitalSubsemiring '' S))\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nι : Sort u_2\nS : ι → NonUnitalSubalgebra R A\n⊢ ↑(⨅ (i : ι), S i) = ⋂ (i : ι), ↑(S i)\n[PROOFSTEP]\nsimp [iInf]\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nι : Sort u_2\nS : ι → NonUnitalSubalgebra R A\nx : A\n⊢ x ∈ ⨅ (i : ι), S i ↔ ∀ (i : ι), x ∈ S i\n[PROOFSTEP]\nsimp only [iInf, mem_sInf, Set.forall_range_iff]\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nι : Sort u_2\nS : ι → NonUnitalSubalgebra R A\n⊢ ↑(NonUnitalSubalgebra.toSubmodule (⨅ (i : ι), S i)) = ↑(⨅ (i : ι), NonUnitalSubalgebra.toSubmodule (S i))\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nx : A\n⊢ x ∈ Submodule.span R ↑(NonUnitalSubsemiring.closure ∅) ↔ x = 0\n[PROOFSTEP]\nrw [NonUnitalSubsemiring.closure_empty, NonUnitalSubsemiring.coe_bot, Submodule.span_zero_singleton, Submodule.mem_bot]\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\n⊢ NonUnitalSubalgebra.toSubmodule ⊥ = ⊥\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nx✝ : A\n⊢ x✝ ∈ NonUnitalSubalgebra.toSubmodule ⊥ ↔ x✝ ∈ ⊥\n[PROOFSTEP]\nsimp only [mem_bot, NonUnitalSubalgebra.mem_toSubmodule, Submodule.mem_bot]\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\n⊢ ↑⊥ = {0}\n[PROOFSTEP]\nsimp [Set.ext_iff, NonUnitalAlgebra.mem_bot]\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nS : NonUnitalSubalgebra R A\nh : S = ⊤\nx : A\n⊢ x ∈ S\n[PROOFSTEP]\nrw [h]\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nS : NonUnitalSubalgebra R A\nh : S = ⊤\nx : A\n⊢ x ∈ ⊤\n[PROOFSTEP]\nexact mem_top\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nS : NonUnitalSubalgebra R A\nh : ∀ (x : A), x ∈ S\n⊢ S = ⊤\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nS : NonUnitalSubalgebra R A\nh : ∀ (x : A), x ∈ S\nx : A\n⊢ x ∈ S ↔ x ∈ ⊤\n[PROOFSTEP]\nexact ⟨fun _ => mem_top, fun _ => h x⟩\n[GOAL]\nF : Type u_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\ninst✝ : NonUnitalAlgHomClass F R A B\nf : A →ₙₐ[R] B\n⊢ ↑(NonUnitalSubalgebra.map f ⊥) = ↑⊥\n[PROOFSTEP]\nsimp [NonUnitalAlgebra.coe_bot, NonUnitalSubalgebra.coe_map]\n[GOAL]\nR : Type u\nA : Type v\nB✝ : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B✝\ninst✝³ : Module R B✝\ninst✝² : IsScalarTower R B✝ B✝\ninst✝¹ : SMulCommClass R B✝ B✝\nS : NonUnitalSubalgebra R A\ninst✝ : Subsingleton A\nB C : NonUnitalSubalgebra R A\nx : A\n⊢ x ∈ B ↔ x ∈ C\n[PROOFSTEP]\nsimp only [Subsingleton.elim x 0, zero_mem B, zero_mem C]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁸ : CommSemiring R\ninst✝⁷ : NonUnitalNonAssocSemiring A\ninst✝⁶ : Module R A\ninst✝⁵ : IsScalarTower R A A\ninst✝⁴ : SMulCommClass R A A\ninst✝³ : NonUnitalNonAssocSemiring B\ninst✝² : Module R B\ninst✝¹ : IsScalarTower R B B\ninst✝ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nS₁ : NonUnitalSubalgebra R B\n⊢ prod ⊤ ⊤ = ⊤\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁸ : CommSemiring R\ninst✝⁷ : NonUnitalNonAssocSemiring A\ninst✝⁶ : Module R A\ninst✝⁵ : IsScalarTower R A A\ninst✝⁴ : SMulCommClass R A A\ninst✝³ : NonUnitalNonAssocSemiring B\ninst✝² : Module R B\ninst✝¹ : IsScalarTower R B B\ninst✝ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nS₁ : NonUnitalSubalgebra R B\nx✝ : A × B\n⊢ x✝ ∈ prod ⊤ ⊤ ↔ x✝ ∈ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nT : NonUnitalSubalgebra R A\nhT : T = iSup K\n⊢ { x // x ∈ T } →ₙₐ[R] B\n[PROOFSTEP]\nsubst hT\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ { x // x ∈ iSup K } →ₙₐ[R] B\n[PROOFSTEP]\nexact\n  { toFun :=\n      Set.iUnionLift (fun i => ↑(K i)) (fun i x => f i x)\n        (fun i j x hxi hxj => by\n          let ⟨k, hik, hjk⟩ := dir i j\n          simp only\n          rw [hf i k hik, hf j k hjk]\n          rfl)\n        (↑(iSup K)) (by rw [coe_iSup_of_directed dir])\n    map_zero' := by\n      dsimp\n      exact Set.iUnionLift_const _ (fun i : ι => (0 : K i)) (fun _ => rfl) _ (by simp)\n    map_mul' := by\n      dsimp\n      apply Set.iUnionLift_binary (coe_iSup_of_directed dir) dir _ (fun _ => (· * ·))\n      on_goal 3 => rw [coe_iSup_of_directed dir]\n      all_goals simp\n    map_add' := by\n      dsimp\n      apply Set.iUnionLift_binary (coe_iSup_of_directed dir) dir _ (fun _ => (· + ·))\n      on_goal 3 => rw [coe_iSup_of_directed dir]\n      all_goals simp\n    map_smul' := fun r => by\n      dsimp\n      apply Set.iUnionLift_unary (coe_iSup_of_directed dir) _ (fun _ x => r • x) (fun _ _ => rfl)\n      on_goal 2 => rw [coe_iSup_of_directed dir]\n      all_goals simp }\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\ni j : ι\nx : A\nhxi : x ∈ (fun i => ↑(K i)) i\nhxj : x ∈ (fun i => ↑(K i)) j\n⊢ (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj }\n[PROOFSTEP]\nlet ⟨k, hik, hjk⟩ := dir i j\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\ni j : ι\nx : A\nhxi : x ∈ (fun i => ↑(K i)) i\nhxj : x ∈ (fun i => ↑(K i)) j\nk : ι\nhik : (fun x x_1 => x ≤ x_1) (K i) (K k)\nhjk : (fun x x_1 => x ≤ x_1) (K j) (K k)\n⊢ (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj }\n[PROOFSTEP]\nsimp only\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\ni j : ι\nx : A\nhxi : x ∈ (fun i => ↑(K i)) i\nhxj : x ∈ (fun i => ↑(K i)) j\nk : ι\nhik : (fun x x_1 => x ≤ x_1) (K i) (K k)\nhjk : (fun x x_1 => x ≤ x_1) (K j) (K k)\n⊢ ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj }\n[PROOFSTEP]\nrw [hf i k hik, hf j k hjk]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\ni j : ι\nx : A\nhxi : x ∈ (fun i => ↑(K i)) i\nhxj : x ∈ (fun i => ↑(K i)) j\nk : ι\nhik : (fun x x_1 => x ≤ x_1) (K i) (K k)\nhjk : (fun x x_1 => x ≤ x_1) (K j) (K k)\n⊢ ↑(NonUnitalAlgHom.comp (f k) (inclusion hik)) { val := x, property := hxi } =\n    ↑(NonUnitalAlgHom.comp (f k) (inclusion hjk)) { val := x, property := hxj }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\nrw [coe_iSup_of_directed dir]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nr : R\n⊢ ∀ (x : { x // x ∈ iSup K }),\n    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n        (_ :\n          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n      r •\n        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n          (_ :\n            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n              (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                (fun i x => ↑(f i) x) j { val := x, property := hxj })\n          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nr : R\n⊢ ∀ (x : { x // x ∈ iSup K }),\n    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n        (_ :\n          ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n            ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n      r •\n        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n          (_ :\n            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x\n[PROOFSTEP]\napply Set.iUnionLift_unary (coe_iSup_of_directed dir) _ (fun _ x => r • x) (fun _ _ => rfl)\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nr : R\n⊢ ∀ (i : ι) (x : ↑↑(K i)), ↑(f i) (r • x) = r • ↑(f i) x\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nr : R\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\non_goal 2 => rw [coe_iSup_of_directed dir]\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nr : R\n⊢ ∀ (i : ι) (x : ↑↑(K i)), ↑(f i) (r • x) = r • ↑(f i) x\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nr : R\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\non_goal 2 => rw [coe_iSup_of_directed dir]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nr : R\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\nrw [coe_iSup_of_directed dir]\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nr : R\n⊢ ∀ (i : ι) (x : ↑↑(K i)), ↑(f i) (r • x) = r • ↑(f i) x\n[PROOFSTEP]\nall_goals simp\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nr : R\n⊢ ∀ (i : ι) (x : ↑↑(K i)), ↑(f i) (r • x) = r • ↑(f i) x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ MulActionHom.toFun\n      {\n        toFun :=\n          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n            (_ :\n              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n            ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n        map_smul' :=\n          (_ :\n            ∀ (r : R) (x : { x // x ∈ iSup K }),\n              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                  (_ :\n                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                r •\n                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                    (_ :\n                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n      0 =\n    0\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n      (_ :\n        ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n          ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) 0 =\n    0\n[PROOFSTEP]\nexact Set.iUnionLift_const _ (fun i : ι => (0 : K i)) (fun _ => rfl) _ (by simp)\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι), ↑(f i) ((fun i => 0) i) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (x y : { x // x ∈ iSup K }),\n    MulActionHom.toFun\n        {\n          toFun :=\n            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n              (_ :\n                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : { x // x ∈ iSup K }),\n                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                    (_ :\n                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                  r •\n                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                      (_ :\n                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n        (x + y) =\n      MulActionHom.toFun\n          {\n            toFun :=\n              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                (_ :\n                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : { x // x ∈ iSup K }),\n                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                      (_ :\n                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                    r •\n                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                        (_ :\n                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n          x +\n        MulActionHom.toFun\n          {\n            toFun :=\n              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                (_ :\n                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : { x // x ∈ iSup K }),\n                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                      (_ :\n                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                    r •\n                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                        (_ :\n                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n          y\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (x y : { x // x ∈ iSup K }),\n    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n        (_ :\n          ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n            ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (x + y) =\n      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n          (_ :\n            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x +\n        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n          (_ :\n            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) y\n[PROOFSTEP]\napply Set.iUnionLift_binary (coe_iSup_of_directed dir) dir _ (fun _ => (· + ·))\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x + y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x + Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x + y) = ↑(f i) x + ↑(f i) y\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\non_goal 3 => rw [coe_iSup_of_directed dir]\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x + y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x + Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x + y) = ↑(f i) x + ↑(f i) y\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\non_goal 3 => rw [coe_iSup_of_directed dir]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\nrw [coe_iSup_of_directed dir]\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x + y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x + Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x + y) = ↑(f i) x + ↑(f i) y\n[PROOFSTEP]\nall_goals simp\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x + y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x + Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x + y) = ↑(f i) x + ↑(f i) y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (x y : { x // x ∈ iSup K }),\n    MulActionHom.toFun\n        {\n            toMulActionHom :=\n              {\n                toFun :=\n                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                    (_ :\n                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (x : { x // x ∈ iSup K }),\n                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                          (_ :\n                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                        r •\n                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                            (_ :\n                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                            ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) },\n            map_zero' :=\n              (_ :\n                MulActionHom.toFun\n                    {\n                      toFun :=\n                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                          (_ :\n                            ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                              (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                      map_smul' :=\n                        (_ :\n                          ∀ (r : R) (x : { x // x ∈ iSup K }),\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                              r •\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (x y : { x // x ∈ iSup K }),\n                  MulActionHom.toFun\n                      {\n                        toFun :=\n                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                            (_ :\n                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                            ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (x : { x // x ∈ iSup K }),\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                                r •\n                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n                      (x + y) =\n                    MulActionHom.toFun\n                        {\n                          toFun :=\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (x : { x // x ∈ iSup K }),\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                                  r •\n                                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                      (_ :\n                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                          (hxj : x ∈ (fun i => ↑(K i)) j),\n                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n                        x +\n                      MulActionHom.toFun\n                        {\n                          toFun :=\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (x : { x // x ∈ iSup K }),\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                                  r •\n                                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                      (_ :\n                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                          (hxj : x ∈ (fun i => ↑(K i)) j),\n                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n                        y) }.toMulActionHom\n        (x * y) =\n      MulActionHom.toFun\n          {\n              toMulActionHom :=\n                {\n                  toFun :=\n                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                      (_ :\n                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (x : { x // x ∈ iSup K }),\n                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                            (_ :\n                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                            ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                          r •\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) },\n              map_zero' :=\n                (_ :\n                  MulActionHom.toFun\n                      {\n                        toFun :=\n                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                            (_ :\n                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                            ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (x : { x // x ∈ iSup K }),\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                                r •\n                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n                      0 =\n                    0),\n              map_add' :=\n                (_ :\n                  ∀ (x y : { x // x ∈ iSup K }),\n                    MulActionHom.toFun\n                        {\n                          toFun :=\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (x : { x // x ∈ iSup K }),\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                                  r •\n                                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                      (_ :\n                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                          (hxj : x ∈ (fun i => ↑(K i)) j),\n                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n                        (x + y) =\n                      MulActionHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (x : { x // x ∈ iSup K }),\n                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                      (_ :\n                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                          (hxj : x ∈ (fun i => ↑(K i)) j),\n                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                                    r •\n                                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                        (_ :\n                                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                            (hxj : x ∈ (fun i => ↑(K i)) j),\n                                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n                          x +\n                        MulActionHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (x : { x // x ∈ iSup K }),\n                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                      (_ :\n                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                          (hxj : x ∈ (fun i => ↑(K i)) j),\n                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                                    r •\n                                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                        (_ :\n                                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                            (hxj : x ∈ (fun i => ↑(K i)) j),\n                                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n                          y) }.toMulActionHom\n          x *\n        MulActionHom.toFun\n          {\n              toMulActionHom :=\n                {\n                  toFun :=\n                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                      (_ :\n                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (x : { x // x ∈ iSup K }),\n                        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                            (_ :\n                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                            ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                          r •\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) },\n              map_zero' :=\n                (_ :\n                  MulActionHom.toFun\n                      {\n                        toFun :=\n                          Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                            (_ :\n                              ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                  (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                            ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (x : { x // x ∈ iSup K }),\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                  (_ :\n                                    ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                      (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                        (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                  ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                                r •\n                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n                      0 =\n                    0),\n              map_add' :=\n                (_ :\n                  ∀ (x y : { x // x ∈ iSup K }),\n                    MulActionHom.toFun\n                        {\n                          toFun :=\n                            Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                              (_ :\n                                ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                  (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                    (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                              ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (x : { x // x ∈ iSup K }),\n                                Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                    (_ :\n                                      ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                        (hxj : x ∈ (fun i => ↑(K i)) j),\n                                        (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                          (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                    ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                                  r •\n                                    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                      (_ :\n                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                          (hxj : x ∈ (fun i => ↑(K i)) j),\n                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n                        (x + y) =\n                      MulActionHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (x : { x // x ∈ iSup K }),\n                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                      (_ :\n                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                          (hxj : x ∈ (fun i => ↑(K i)) j),\n                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                                    r •\n                                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                        (_ :\n                                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                            (hxj : x ∈ (fun i => ↑(K i)) j),\n                                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n                          x +\n                        MulActionHom.toFun\n                          {\n                            toFun :=\n                              Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                (_ :\n                                  ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n                                    (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                      (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)),\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (x : { x // x ∈ iSup K }),\n                                  Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                      (_ :\n                                        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                          (hxj : x ∈ (fun i => ↑(K i)) j),\n                                          (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                            (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (r • x) =\n                                    r •\n                                      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n                                        (_ :\n                                          ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i)\n                                            (hxj : x ∈ (fun i => ↑(K i)) j),\n                                            (fun i x => ↑(f i) x) i { val := x, property := hxi } =\n                                              (fun i x => ↑(f i) x) j { val := x, property := hxj })\n                                        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x) }\n                          y) }.toMulActionHom\n          y\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (x y : { x // x ∈ iSup K }),\n    Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n        (_ :\n          ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n            ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n        ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (x * y) =\n      Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n          (_ :\n            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x *\n        Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n          (_ :\n            ∀ (i j : ι) (x : A) (hxi : x ∈ ↑(K i)) (hxj : x ∈ ↑(K j)),\n              ↑(f i) { val := x, property := hxi } = ↑(f j) { val := x, property := hxj })\n          ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) y\n[PROOFSTEP]\napply Set.iUnionLift_binary (coe_iSup_of_directed dir) dir _ (fun _ => (· * ·))\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x * y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x * Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x * y) = ↑(f i) x * ↑(f i) y\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\non_goal 3 => rw [coe_iSup_of_directed dir]\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x * y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x * Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x * y) = ↑(f i) x * ↑(f i) y\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\non_goal 3 => rw [coe_iSup_of_directed dir]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)\n[PROOFSTEP]\nrw [coe_iSup_of_directed dir]\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x * y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x * Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x * y) = ↑(f i) x * ↑(f i) y\n[PROOFSTEP]\nall_goals simp\n[GOAL]\ncase hopi\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)),\n    Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) (x * y) =\n      Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) x * Set.inclusion (_ : ↑(K i) ⊆ ↑(iSup K)) y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\n⊢ ∀ (i : ι) (x y : ↑↑(K i)), ↑(f i) (x * y) = ↑(f i) x * ↑(f i) y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nT : NonUnitalSubalgebra R A\nhT : T = iSup K\ni : ι\nx : { x // x ∈ K i }\nh : K i ≤ T\n⊢ ↑(iSupLift K dir f hf T hT) (↑(inclusion h) x) = ↑(f i) x\n[PROOFSTEP]\nsubst T\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\ni : ι\nx : { x // x ∈ K i }\nh : K i ≤ iSup K\n⊢ ↑(iSupLift K dir f hf (iSup K) (_ : iSup K = iSup K)) (↑(inclusion h) x) = ↑(f i) x\n[PROOFSTEP]\ndsimp [iSupLift]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\ni : ι\nx : { x // x ∈ K i }\nh : K i ≤ iSup K\n⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n      (_ :\n        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n          (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj })\n      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) (↑(inclusion h) x) =\n    ↑(f i) x\n[PROOFSTEP]\napply Set.iUnionLift_inclusion\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\ni : ι\nx : { x // x ∈ K i }\nh : K i ≤ iSup K\n⊢ ↑(K i) ⊆ ↑(iSup K)\n[PROOFSTEP]\nexact h\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nT : NonUnitalSubalgebra R A\nhT : T = iSup K\ni : ι\nh : K i ≤ T\n⊢ NonUnitalAlgHom.comp (iSupLift K dir f hf T hT) (inclusion h) = f i\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nT : NonUnitalSubalgebra R A\nhT : T = iSup K\ni : ι\nh : K i ≤ T\nx✝ : { x // x ∈ K i }\n⊢ ↑(NonUnitalAlgHom.comp (iSupLift K dir f hf T hT) (inclusion h)) x✝ = ↑(f i) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nT : NonUnitalSubalgebra R A\nhT : T = iSup K\ni : ι\nx : { x // x ∈ K i }\nhx : ↑x ∈ T\n⊢ ↑(iSupLift K dir f hf T hT) { val := ↑x, property := hx } = ↑(f i) x\n[PROOFSTEP]\nsubst hT\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\ni : ι\nx : { x // x ∈ K i }\nhx : ↑x ∈ iSup K\n⊢ ↑(iSupLift K dir f hf (iSup K) (_ : iSup K = iSup K)) { val := ↑x, property := hx } = ↑(f i) x\n[PROOFSTEP]\ndsimp [iSupLift]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\ni : ι\nx : { x // x ∈ K i }\nhx : ↑x ∈ iSup K\n⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n      (_ :\n        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n          (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj })\n      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) { val := ↑x, property := hx } =\n    ↑(f i) x\n[PROOFSTEP]\napply Set.iUnionLift_mk\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\nT : NonUnitalSubalgebra R A\nhT : T = iSup K\ni : ι\nx : { x // x ∈ T }\nhx : ↑x ∈ K i\n⊢ ↑(iSupLift K dir f hf T hT) x = ↑(f i) { val := ↑x, property := hx }\n[PROOFSTEP]\nsubst hT\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\ni : ι\nx : { x // x ∈ iSup K }\nhx : ↑x ∈ K i\n⊢ ↑(iSupLift K dir f hf (iSup K) (_ : iSup K = iSup K)) x = ↑(f i) { val := ↑x, property := hx }\n[PROOFSTEP]\ndsimp [iSupLift]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁹ : CommSemiring R\ninst✝⁸ : NonUnitalNonAssocSemiring A\ninst✝⁷ : Module R A\ninst✝⁶ : IsScalarTower R A A\ninst✝⁵ : SMulCommClass R A A\ninst✝⁴ : NonUnitalNonAssocSemiring B\ninst✝³ : Module R B\ninst✝² : IsScalarTower R B B\ninst✝¹ : SMulCommClass R B B\nS : NonUnitalSubalgebra R A\nι : Type u_1\ninst✝ : Nonempty ι\nK : ι → NonUnitalSubalgebra R A\ndir : Directed (fun x x_1 => x ≤ x_1) K\nf : (i : ι) → { x // x ∈ K i } →ₙₐ[R] B\nhf : ∀ (i j : ι) (h : K i ≤ K j), f i = NonUnitalAlgHom.comp (f j) (inclusion h)\ni : ι\nx : { x // x ∈ iSup K }\nhx : ↑x ∈ K i\n⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)\n      (_ :\n        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),\n          (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj })\n      ↑(iSup K) (_ : ↑(iSup K) ⊆ ⋃ (i : ι), ↑(K i)) x =\n    ↑(f i) { val := ↑x, property := hx }\n[PROOFSTEP]\napply Set.iUnionLift_of_mem\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\nr : R\na : A\nha : a ∈ Set.center A\n⊢ r • a ∈ Set.center A\n[PROOFSTEP]\nsimp [Set.mem_center_iff, mul_smul_comm, smul_mul_assoc, (Set.mem_center_iff A).mp ha]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalSemiring A\ninst✝² : Module R A\ninst✝¹ : IsScalarTower R A A\ninst✝ : SMulCommClass R A A\ns : Set A\nr : R\na : A\nha : a ∈ Set.centralizer s\nx : A\nhx : x ∈ s\n⊢ x * r • a = r • a * x\n[PROOFSTEP]\nrw [mul_smul_comm, smul_mul_assoc, ha x hx]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Algebra.NonUnitalSubalgebra", "llama_tokens": 54444, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7371581626286833, "lm_q2_score": 0.49218813572079556, "lm_q1q2_score": 0.3628205017955787}}
{"text": "[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\n⊢ ∃ u x, PairwiseDisjoint u B ∧ ∀ (a : ι), a ∈ t → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ δ a ≤ τ * δ b\n[PROOFSTEP]\nlet T : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      u.PairwiseDisjoint B ∧ ∀ a ∈ t, ∀ b ∈ u, (B a ∩ B b).Nonempty → ∃ c ∈ u, (B a ∩ B c).Nonempty ∧ δ a ≤ τ * δ c}\n    -- By Zorn, choose a maximal family in the good set `T` of disjoint families.\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\n⊢ ∃ u x, PairwiseDisjoint u B ∧ ∀ (a : ι), a ∈ t → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ δ a ≤ τ * δ b\n[PROOFSTEP]\nobtain ⟨u, uT, hu⟩ : ∃ u ∈ T, ∀ v ∈ T, u ⊆ v → v = u :=\n  by\n  refine' zorn_subset _ fun U UT hU => _\n  refine' ⟨⋃₀ U, _, fun s hs => subset_sUnion_of_mem hs⟩\n  simp only [Set.sUnion_subset_iff, and_imp, exists_prop, forall_exists_index, mem_sUnion, Set.mem_setOf_eq]\n  refine'\n    ⟨fun u hu => (UT hu).1, (pairwiseDisjoint_sUnion hU.directedOn).2 fun u hu => (UT hu).2.1,\n      fun a hat b u uU hbu hab => _⟩\n  obtain ⟨c, cu, ac, hc⟩ : ∃ c, c ∈ u ∧ (B a ∩ B c).Nonempty ∧ δ a ≤ τ * δ c := (UT uU).2.2 a hat b hbu hab\n  exact\n    ⟨c, ⟨u, uU, cu⟩, ac, hc⟩\n      -- The only nontrivial bit is to check that every `a ∈ t` intersects an element `b ∈ u` with\n        -- comparatively large `δ b`. Assume this is not the case, then we will contradict the maximality.\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\n⊢ ∃ u, u ∈ T ∧ ∀ (v : Set ι), v ∈ T → u ⊆ v → v = u\n[PROOFSTEP]\nrefine' zorn_subset _ fun U UT hU => _\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nU : Set (Set ι)\nUT : U ⊆ T\nhU : IsChain (fun x x_1 => x ⊆ x_1) U\n⊢ ∃ ub, ub ∈ T ∧ ∀ (s : Set ι), s ∈ U → s ⊆ ub\n[PROOFSTEP]\nrefine' ⟨⋃₀ U, _, fun s hs => subset_sUnion_of_mem hs⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nU : Set (Set ι)\nUT : U ⊆ T\nhU : IsChain (fun x x_1 => x ⊆ x_1) U\n⊢ ⋃₀ U ∈ T\n[PROOFSTEP]\nsimp only [Set.sUnion_subset_iff, and_imp, exists_prop, forall_exists_index, mem_sUnion, Set.mem_setOf_eq]\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nU : Set (Set ι)\nUT : U ⊆ T\nhU : IsChain (fun x x_1 => x ⊆ x_1) U\n⊢ (∀ (t' : Set ι), t' ∈ U → t' ⊆ t) ∧\n    PairwiseDisjoint (⋃₀ U) B ∧\n      ∀ (a : ι),\n        a ∈ t →\n          ∀ (b : ι) (x : Set ι),\n            x ∈ U →\n              b ∈ x → Set.Nonempty (B a ∩ B b) → ∃ c, (∃ t, t ∈ U ∧ c ∈ t) ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c\n[PROOFSTEP]\nrefine'\n  ⟨fun u hu => (UT hu).1, (pairwiseDisjoint_sUnion hU.directedOn).2 fun u hu => (UT hu).2.1, fun a hat b u uU hbu hab =>\n    _⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nU : Set (Set ι)\nUT : U ⊆ T\nhU : IsChain (fun x x_1 => x ⊆ x_1) U\na : ι\nhat : a ∈ t\nb : ι\nu : Set ι\nuU : u ∈ U\nhbu : b ∈ u\nhab : Set.Nonempty (B a ∩ B b)\n⊢ ∃ c, (∃ t, t ∈ U ∧ c ∈ t) ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c\n[PROOFSTEP]\nobtain ⟨c, cu, ac, hc⟩ : ∃ c, c ∈ u ∧ (B a ∩ B c).Nonempty ∧ δ a ≤ τ * δ c := (UT uU).2.2 a hat b hbu hab\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nU : Set (Set ι)\nUT : U ⊆ T\nhU : IsChain (fun x x_1 => x ⊆ x_1) U\na : ι\nhat : a ∈ t\nb : ι\nu : Set ι\nuU : u ∈ U\nhbu : b ∈ u\nhab : Set.Nonempty (B a ∩ B b)\nc : ι\ncu : c ∈ u\nac : Set.Nonempty (B a ∩ B c)\nhc : δ a ≤ τ * δ c\n⊢ ∃ c, (∃ t, t ∈ U ∧ c ∈ t) ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c\n[PROOFSTEP]\nexact\n  ⟨c, ⟨u, uU, cu⟩, ac, hc⟩\n    -- The only nontrivial bit is to check that every `a ∈ t` intersects an element `b ∈ u` with\n      -- comparatively large `δ b`. Assume this is not the case, then we will contradict the maximality.\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nhu : ∀ (v : Set ι), v ∈ T → u ⊆ v → v = u\n⊢ ∃ u x, PairwiseDisjoint u B ∧ ∀ (a : ι), a ∈ t → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ δ a ≤ τ * δ b\n[PROOFSTEP]\nrefine' ⟨u, uT.1, uT.2.1, fun a hat => _⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nhu : ∀ (v : Set ι), v ∈ T → u ⊆ v → v = u\na : ι\nhat : a ∈ t\n⊢ ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ δ a ≤ τ * δ b\n[PROOFSTEP]\ncontrapose! hu\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\n⊢ ∃ v,\n    v ∈\n        {u |\n          u ⊆ t ∧\n            PairwiseDisjoint u B ∧\n              ∀ (a : ι),\n                a ∈ t →\n                  ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c} ∧\n      u ⊆ v ∧ v ≠ u\n[PROOFSTEP]\nhave a_disj : ∀ c ∈ u, Disjoint (B a) (B c) := by\n  intro c hc\n  by_contra h\n  rw [not_disjoint_iff_nonempty_inter] at h \n  obtain ⟨d, du, ad, hd⟩ : ∃ d, d ∈ u ∧ (B a ∩ B d).Nonempty ∧ δ a ≤ τ * δ d := uT.2.2 a hat c hc h\n  exact\n    lt_irrefl _\n      ((hu d du ad).trans_le hd)\n        -- Let `A` be all the elements of `t` which do not intersect the family `u`. It is nonempty as it\n          -- contains `a`. We will pick an element `a'` of `A` with `δ a'` almost as large as possible.\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\n⊢ ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\n[PROOFSTEP]\nintro c hc\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\nc : ι\nhc : c ∈ u\n⊢ Disjoint (B a) (B c)\n[PROOFSTEP]\nby_contra h\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\nc : ι\nhc : c ∈ u\nh : ¬Disjoint (B a) (B c)\n⊢ False\n[PROOFSTEP]\nrw [not_disjoint_iff_nonempty_inter] at h \n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\nc : ι\nhc : c ∈ u\nh : Set.Nonempty (B a ∩ B c)\n⊢ False\n[PROOFSTEP]\nobtain ⟨d, du, ad, hd⟩ : ∃ d, d ∈ u ∧ (B a ∩ B d).Nonempty ∧ δ a ≤ τ * δ d := uT.2.2 a hat c hc h\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\nc : ι\nhc : c ∈ u\nh : Set.Nonempty (B a ∩ B c)\nd : ι\ndu : d ∈ u\nad : Set.Nonempty (B a ∩ B d)\nhd : δ a ≤ τ * δ d\n⊢ False\n[PROOFSTEP]\nexact\n  lt_irrefl _\n    ((hu d du ad).trans_le hd)\n      -- Let `A` be all the elements of `t` which do not intersect the family `u`. It is nonempty as it\n        -- contains `a`. We will pick an element `a'` of `A` with `δ a'` almost as large as possible.\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\n⊢ ∃ v,\n    v ∈\n        {u |\n          u ⊆ t ∧\n            PairwiseDisjoint u B ∧\n              ∀ (a : ι),\n                a ∈ t →\n                  ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c} ∧\n      u ⊆ v ∧ v ≠ u\n[PROOFSTEP]\nlet A := {a' | a' ∈ t ∧ ∀ c ∈ u, Disjoint (B a') (B c)}\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\n⊢ ∃ v,\n    v ∈\n        {u |\n          u ⊆ t ∧\n            PairwiseDisjoint u B ∧\n              ∀ (a : ι),\n                a ∈ t →\n                  ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c} ∧\n      u ⊆ v ∧ v ≠ u\n[PROOFSTEP]\nhave Anonempty : A.Nonempty := ⟨a, hat, a_disj⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\n⊢ ∃ v,\n    v ∈\n        {u |\n          u ⊆ t ∧\n            PairwiseDisjoint u B ∧\n              ∀ (a : ι),\n                a ∈ t →\n                  ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c} ∧\n      u ⊆ v ∧ v ≠ u\n[PROOFSTEP]\nlet m := sSup (δ '' A)\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\n⊢ ∃ v,\n    v ∈\n        {u |\n          u ⊆ t ∧\n            PairwiseDisjoint u B ∧\n              ∀ (a : ι),\n                a ∈ t →\n                  ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c} ∧\n      u ⊆ v ∧ v ≠ u\n[PROOFSTEP]\nhave bddA : BddAbove (δ '' A) := by\n  refine' ⟨R, fun x xA => _⟩\n  rcases(mem_image _ _ _).1 xA with ⟨a', ha', rfl⟩\n  exact δle a' ha'.1\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\n⊢ BddAbove (δ '' A)\n[PROOFSTEP]\nrefine' ⟨R, fun x xA => _⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nx : ℝ\nxA : x ∈ δ '' A\n⊢ x ≤ R\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 xA with ⟨a', ha', rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\na' : ι\nha' : a' ∈ A\nxA : δ a' ∈ δ '' A\n⊢ δ a' ≤ R\n[PROOFSTEP]\nexact δle a' ha'.1\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\n⊢ ∃ v,\n    v ∈\n        {u |\n          u ⊆ t ∧\n            PairwiseDisjoint u B ∧\n              ∀ (a : ι),\n                a ∈ t →\n                  ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c} ∧\n      u ⊆ v ∧ v ≠ u\n[PROOFSTEP]\nobtain ⟨a', a'A, ha'⟩ : ∃ a' ∈ A, m / τ ≤ δ a' :=\n  by\n  have : 0 ≤ m := (δnonneg a hat).trans (le_csSup bddA (mem_image_of_mem _ ⟨hat, a_disj⟩))\n  rcases eq_or_lt_of_le this with (mzero | mpos)\n  · refine' ⟨a, ⟨hat, a_disj⟩, _⟩\n    simpa only [← mzero, zero_div] using δnonneg a hat\n  · have I : m / τ < m := by\n      rw [div_lt_iff (zero_lt_one.trans hτ)]\n      conv_lhs => rw [← mul_one m]\n      exact (mul_lt_mul_left mpos).2 hτ\n    rcases exists_lt_of_lt_csSup (nonempty_image_iff.2 Anonempty) I with ⟨x, xA, hx⟩\n    rcases(mem_image _ _ _).1 xA with ⟨a', ha', rfl⟩\n    exact ⟨a', ha', hx.le⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\n⊢ ∃ a', a' ∈ A ∧ m / τ ≤ δ a'\n[PROOFSTEP]\nhave : 0 ≤ m := (δnonneg a hat).trans (le_csSup bddA (mem_image_of_mem _ ⟨hat, a_disj⟩))\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\n⊢ ∃ a', a' ∈ A ∧ m / τ ≤ δ a'\n[PROOFSTEP]\nrcases eq_or_lt_of_le this with (mzero | mpos)\n[GOAL]\ncase inl\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\nmzero : 0 = m\n⊢ ∃ a', a' ∈ A ∧ m / τ ≤ δ a'\n[PROOFSTEP]\nrefine' ⟨a, ⟨hat, a_disj⟩, _⟩\n[GOAL]\ncase inl\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\nmzero : 0 = m\n⊢ m / τ ≤ δ a\n[PROOFSTEP]\nsimpa only [← mzero, zero_div] using δnonneg a hat\n[GOAL]\ncase inr\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\nmpos : 0 < m\n⊢ ∃ a', a' ∈ A ∧ m / τ ≤ δ a'\n[PROOFSTEP]\nhave I : m / τ < m := by\n  rw [div_lt_iff (zero_lt_one.trans hτ)]\n  conv_lhs => rw [← mul_one m]\n  exact (mul_lt_mul_left mpos).2 hτ\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\nmpos : 0 < m\n⊢ m / τ < m\n[PROOFSTEP]\nrw [div_lt_iff (zero_lt_one.trans hτ)]\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\nmpos : 0 < m\n⊢ m < m * τ\n[PROOFSTEP]\nconv_lhs => rw [← mul_one m]\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\nmpos : 0 < m\n| m\n[PROOFSTEP]\nrw [← mul_one m]\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\nmpos : 0 < m\n| m\n[PROOFSTEP]\nrw [← mul_one m]\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\nmpos : 0 < m\n| m\n[PROOFSTEP]\nrw [← mul_one m]\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\nmpos : 0 < m\n⊢ m * 1 < m * τ\n[PROOFSTEP]\nexact (mul_lt_mul_left mpos).2 hτ\n[GOAL]\ncase inr\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\nmpos : 0 < m\nI : m / τ < m\n⊢ ∃ a', a' ∈ A ∧ m / τ ≤ δ a'\n[PROOFSTEP]\nrcases exists_lt_of_lt_csSup (nonempty_image_iff.2 Anonempty) I with ⟨x, xA, hx⟩\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\nmpos : 0 < m\nI : m / τ < m\nx : ℝ\nxA : x ∈ δ '' A\nhx : m / τ < x\n⊢ ∃ a', a' ∈ A ∧ m / τ ≤ δ a'\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 xA with ⟨a', ha', rfl⟩\n[GOAL]\ncase inr.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nthis : 0 ≤ m\nmpos : 0 < m\nI : m / τ < m\na' : ι\nha' : a' ∈ A\nxA : δ a' ∈ δ '' A\nhx : m / τ < δ a'\n⊢ ∃ a', a' ∈ A ∧ m / τ ≤ δ a'\n[PROOFSTEP]\nexact ⟨a', ha', hx.le⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\na : ι\nhat : a ∈ t\nhu : ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → τ * δ b < δ a\na_disj : ∀ (c : ι), c ∈ u → Disjoint (B a) (B c)\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\n⊢ ∃ v,\n    v ∈\n        {u |\n          u ⊆ t ∧\n            PairwiseDisjoint u B ∧\n              ∀ (a : ι),\n                a ∈ t →\n                  ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c} ∧\n      u ⊆ v ∧ v ≠ u\n[PROOFSTEP]\nclear hat hu a_disj a\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\n⊢ ∃ v,\n    v ∈\n        {u |\n          u ⊆ t ∧\n            PairwiseDisjoint u B ∧\n              ∀ (a : ι),\n                a ∈ t →\n                  ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c} ∧\n      u ⊆ v ∧ v ≠ u\n[PROOFSTEP]\nhave a'_ne_u : a' ∉ u := fun H =>\n  (hne _ a'A.1).ne_empty\n    (disjoint_self.1 (a'A.2 _ H))\n      -- we claim that `u ∪ {a'}` still belongs to `T`, contradicting the maximality of `u`.\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\n⊢ ∃ v,\n    v ∈\n        {u |\n          u ⊆ t ∧\n            PairwiseDisjoint u B ∧\n              ∀ (a : ι),\n                a ∈ t →\n                  ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c} ∧\n      u ⊆ v ∧ v ≠ u\n[PROOFSTEP]\nrefine' ⟨insert a' u, ⟨_, _, _⟩, subset_insert _ _, (ne_insert_of_not_mem _ a'_ne_u).symm⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\n⊢ insert a' u ⊆ t\n[PROOFSTEP]\nrw [insert_subset_iff]\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\n⊢ a' ∈ t ∧ u ⊆ t\n[PROOFSTEP]\nexact ⟨a'A.1, uT.1⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\n⊢ PairwiseDisjoint (insert a' u) B\n[PROOFSTEP]\nexact uT.2.1.insert fun b bu _ => a'A.2 b bu\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\n⊢ ∀ (a : ι),\n    a ∈ t →\n      ∀ (b : ι),\n        b ∈ insert a' u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ insert a' u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c\n[PROOFSTEP]\nintro c ct b ba'u hcb\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\nc : ι\nct : c ∈ t\nb : ι\nba'u : b ∈ insert a' u\nhcb : Set.Nonempty (B c ∩ B b)\n⊢ ∃ c_1, c_1 ∈ insert a' u ∧ Set.Nonempty (B c ∩ B c_1) ∧ δ c ≤ τ * δ c_1\n[PROOFSTEP]\nby_cases H : ∃ d ∈ u, (B c ∩ B d).Nonempty\n[GOAL]\ncase pos\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\nc : ι\nct : c ∈ t\nb : ι\nba'u : b ∈ insert a' u\nhcb : Set.Nonempty (B c ∩ B b)\nH : ∃ d, d ∈ u ∧ Set.Nonempty (B c ∩ B d)\n⊢ ∃ c_1, c_1 ∈ insert a' u ∧ Set.Nonempty (B c ∩ B c_1) ∧ δ c ≤ τ * δ c_1\n[PROOFSTEP]\nrcases H with ⟨d, du, hd⟩\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\nc : ι\nct : c ∈ t\nb : ι\nba'u : b ∈ insert a' u\nhcb : Set.Nonempty (B c ∩ B b)\nd : ι\ndu : d ∈ u\nhd : Set.Nonempty (B c ∩ B d)\n⊢ ∃ c_1, c_1 ∈ insert a' u ∧ Set.Nonempty (B c ∩ B c_1) ∧ δ c ≤ τ * δ c_1\n[PROOFSTEP]\nrcases uT.2.2 c ct d du hd with ⟨d', d'u, hd'⟩\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\nc : ι\nct : c ∈ t\nb : ι\nba'u : b ∈ insert a' u\nhcb : Set.Nonempty (B c ∩ B b)\nd : ι\ndu : d ∈ u\nhd : Set.Nonempty (B c ∩ B d)\nd' : ι\nd'u : d' ∈ u\nhd' : Set.Nonempty (B c ∩ B d') ∧ δ c ≤ τ * δ d'\n⊢ ∃ c_1, c_1 ∈ insert a' u ∧ Set.Nonempty (B c ∩ B c_1) ∧ δ c ≤ τ * δ c_1\n[PROOFSTEP]\nexact ⟨d', mem_insert_of_mem _ d'u, hd'⟩\n[GOAL]\ncase neg\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\nc : ι\nct : c ∈ t\nb : ι\nba'u : b ∈ insert a' u\nhcb : Set.Nonempty (B c ∩ B b)\nH : ¬∃ d, d ∈ u ∧ Set.Nonempty (B c ∩ B d)\n⊢ ∃ c_1, c_1 ∈ insert a' u ∧ Set.Nonempty (B c ∩ B c_1) ∧ δ c ≤ τ * δ c_1\n[PROOFSTEP]\npush_neg at H \n[GOAL]\ncase neg\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\nc : ι\nct : c ∈ t\nb : ι\nba'u : b ∈ insert a' u\nhcb : Set.Nonempty (B c ∩ B b)\nH : ∀ (d : ι), d ∈ u → ¬Set.Nonempty (B c ∩ B d)\n⊢ ∃ c_1, c_1 ∈ insert a' u ∧ Set.Nonempty (B c ∩ B c_1) ∧ δ c ≤ τ * δ c_1\n[PROOFSTEP]\nsimp only [← not_disjoint_iff_nonempty_inter, Classical.not_not] at H \n[GOAL]\ncase neg\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\nc : ι\nct : c ∈ t\nb : ι\nba'u : b ∈ insert a' u\nhcb : Set.Nonempty (B c ∩ B b)\nH : ∀ (d : ι), d ∈ u → Disjoint (B c) (B d)\n⊢ ∃ c_1, c_1 ∈ insert a' u ∧ Set.Nonempty (B c ∩ B c_1) ∧ δ c ≤ τ * δ c_1\n[PROOFSTEP]\nrcases mem_insert_iff.1 ba'u with (rfl | H')\n[GOAL]\ncase neg.inl\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nc : ι\nct : c ∈ t\nb : ι\nhcb : Set.Nonempty (B c ∩ B b)\nH : ∀ (d : ι), d ∈ u → Disjoint (B c) (B d)\na'A : b ∈ A\nha' : m / τ ≤ δ b\na'_ne_u : ¬b ∈ u\nba'u : b ∈ insert b u\n⊢ ∃ c_1, c_1 ∈ insert b u ∧ Set.Nonempty (B c ∩ B c_1) ∧ δ c ≤ τ * δ c_1\n[PROOFSTEP]\nrefine' ⟨b, mem_insert _ _, hcb, _⟩\n[GOAL]\ncase neg.inl\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nc : ι\nct : c ∈ t\nb : ι\nhcb : Set.Nonempty (B c ∩ B b)\nH : ∀ (d : ι), d ∈ u → Disjoint (B c) (B d)\na'A : b ∈ A\nha' : m / τ ≤ δ b\na'_ne_u : ¬b ∈ u\nba'u : b ∈ insert b u\n⊢ δ c ≤ τ * δ b\n[PROOFSTEP]\ncalc\n  δ c ≤ m := le_csSup bddA (mem_image_of_mem _ ⟨ct, H⟩)\n  _ = τ * (m / τ) := by\n    field_simp [(zero_lt_one.trans hτ).ne']\n    ring\n  _ ≤ τ * δ b := mul_le_mul_of_nonneg_left ha' (zero_le_one.trans hτ.le)\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nc : ι\nct : c ∈ t\nb : ι\nhcb : Set.Nonempty (B c ∩ B b)\nH : ∀ (d : ι), d ∈ u → Disjoint (B c) (B d)\na'A : b ∈ A\nha' : m / τ ≤ δ b\na'_ne_u : ¬b ∈ u\nba'u : b ∈ insert b u\n⊢ m = τ * (m / τ)\n[PROOFSTEP]\nfield_simp [(zero_lt_one.trans hτ).ne']\n[GOAL]\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\nc : ι\nct : c ∈ t\nb : ι\nhcb : Set.Nonempty (B c ∩ B b)\nH : ∀ (d : ι), d ∈ u → Disjoint (B c) (B d)\na'A : b ∈ A\nha' : m / τ ≤ δ b\na'_ne_u : ¬b ∈ u\nba'u : b ∈ insert b u\n⊢ sSup (δ '' {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}) * τ =\n    τ * sSup (δ '' {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)})\n[PROOFSTEP]\nring\n[GOAL]\ncase neg.inr\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\nc : ι\nct : c ∈ t\nb : ι\nba'u : b ∈ insert a' u\nhcb : Set.Nonempty (B c ∩ B b)\nH : ∀ (d : ι), d ∈ u → Disjoint (B c) (B d)\nH' : b ∈ u\n⊢ ∃ c_1, c_1 ∈ insert a' u ∧ Set.Nonempty (B c ∩ B c_1) ∧ δ c ≤ τ * δ c_1\n[PROOFSTEP]\nrw [← not_disjoint_iff_nonempty_inter] at hcb \n[GOAL]\ncase neg.inr\nα : Type u_1\nι : Type u_2\nB : ι → Set α\nt : Set ι\nδ : ι → ℝ\nτ : ℝ\nhτ : 1 < τ\nδnonneg : ∀ (a : ι), a ∈ t → 0 ≤ δ a\nR : ℝ\nδle : ∀ (a : ι), a ∈ t → δ a ≤ R\nhne : ∀ (a : ι), a ∈ t → Set.Nonempty (B a)\nT : Set (Set ι) :=\n  {u |\n    u ⊆ t ∧\n      PairwiseDisjoint u B ∧\n        ∀ (a : ι),\n          a ∈ t → ∀ (b : ι), b ∈ u → Set.Nonempty (B a ∩ B b) → ∃ c, c ∈ u ∧ Set.Nonempty (B a ∩ B c) ∧ δ a ≤ τ * δ c}\nu : Set ι\nuT : u ∈ T\nA : Set ι := {a' | a' ∈ t ∧ ∀ (c : ι), c ∈ u → Disjoint (B a') (B c)}\nAnonempty : Set.Nonempty A\nm : ℝ := sSup (δ '' A)\nbddA : BddAbove (δ '' A)\na' : ι\na'A : a' ∈ A\nha' : m / τ ≤ δ a'\na'_ne_u : ¬a' ∈ u\nc : ι\nct : c ∈ t\nb : ι\nba'u : b ∈ insert a' u\nhcb : ¬Disjoint (B c) (B b)\nH : ∀ (d : ι), d ∈ u → Disjoint (B c) (B d)\nH' : b ∈ u\n⊢ ∃ c_1, c_1 ∈ insert a' u ∧ Set.Nonempty (B c ∩ B c_1) ∧ δ c ≤ τ * δ c_1\n[PROOFSTEP]\nexact (hcb (H _ H')).elim\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\n⊢ ∃ u x_1,\n    (PairwiseDisjoint u fun a => closedBall (x a) (r a)) ∧\n      ∀ (a : ι), a ∈ t → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nrcases eq_empty_or_nonempty t with (rfl | _)\n[GOAL]\ncase inl\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ ∅ → r a ≤ R\n⊢ ∃ u x_1,\n    (PairwiseDisjoint u fun a => closedBall (x a) (r a)) ∧\n      ∀ (a : ι), a ∈ ∅ → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nexact ⟨∅, Subset.refl _, pairwiseDisjoint_empty, by simp⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ ∅ → r a ≤ R\n⊢ ∀ (a : ι), a ∈ ∅ → ∃ b, b ∈ ∅ ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\n⊢ ∃ u x_1,\n    (PairwiseDisjoint u fun a => closedBall (x a) (r a)) ∧\n      ∀ (a : ι), a ∈ t → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nby_cases ht : ∀ a ∈ t, r a < 0\n[GOAL]\ncase pos\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∀ (a : ι), a ∈ t → r a < 0\n⊢ ∃ u x_1,\n    (PairwiseDisjoint u fun a => closedBall (x a) (r a)) ∧\n      ∀ (a : ι), a ∈ t → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nexact\n  ⟨t, Subset.rfl, fun a ha b _ _ => by simp only [Function.onFun, closedBall_eq_empty.2 (ht a ha), empty_disjoint],\n    fun a ha => ⟨a, ha, by simp only [closedBall_eq_empty.2 (ht a ha), empty_subset]⟩⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∀ (a : ι), a ∈ t → r a < 0\na : ι\nha : a ∈ t\nb : ι\nx✝¹ : b ∈ t\nx✝ : a ≠ b\n⊢ (Disjoint on fun a => closedBall (x a) (r a)) a b\n[PROOFSTEP]\nsimp only [Function.onFun, closedBall_eq_empty.2 (ht a ha), empty_disjoint]\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∀ (a : ι), a ∈ t → r a < 0\na : ι\nha : a ∈ t\n⊢ closedBall (x a) (r a) ⊆ closedBall (x a) (5 * r a)\n[PROOFSTEP]\nsimp only [closedBall_eq_empty.2 (ht a ha), empty_subset]\n[GOAL]\ncase neg\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ¬∀ (a : ι), a ∈ t → r a < 0\n⊢ ∃ u x_1,\n    (PairwiseDisjoint u fun a => closedBall (x a) (r a)) ∧\n      ∀ (a : ι), a ∈ t → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\npush_neg at ht \n[GOAL]\ncase neg\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\n⊢ ∃ u x_1,\n    (PairwiseDisjoint u fun a => closedBall (x a) (r a)) ∧\n      ∀ (a : ι), a ∈ t → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nlet t' := {a ∈ t | 0 ≤ r a}\n[GOAL]\ncase neg\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\n⊢ ∃ u x_1,\n    (PairwiseDisjoint u fun a => closedBall (x a) (r a)) ∧\n      ∀ (a : ι), a ∈ t → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nrcases exists_disjoint_subfamily_covering_enlargment (fun a => closedBall (x a) (r a)) t' r 2 one_lt_two\n    (fun a ha => ha.2) R (fun a ha => hr a ha.1) fun a ha => ⟨x a, mem_closedBall_self ha.2⟩ with\n  ⟨u, ut', u_disj, hu⟩\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\n⊢ ∃ u x_1,\n    (PairwiseDisjoint u fun a => closedBall (x a) (r a)) ∧\n      ∀ (a : ι), a ∈ t → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nhave A : ∀ a ∈ t', ∃ b ∈ u, closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b) :=\n  by\n  intro a ha\n  rcases hu a ha with ⟨b, bu, hb, rb⟩\n  refine' ⟨b, bu, _⟩\n  have : dist (x a) (x b) ≤ r a + r b := dist_le_add_of_nonempty_closedBall_inter_closedBall hb\n  apply closedBall_subset_closedBall'\n  linarith\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\n⊢ ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nintro a ha\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\na : ι\nha : a ∈ t'\n⊢ ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nrcases hu a ha with ⟨b, bu, hb, rb⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\na : ι\nha : a ∈ t'\nb : ι\nbu : b ∈ u\nhb : Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b))\nrb : r a ≤ 2 * r b\n⊢ ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nrefine' ⟨b, bu, _⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\na : ι\nha : a ∈ t'\nb : ι\nbu : b ∈ u\nhb : Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b))\nrb : r a ≤ 2 * r b\n⊢ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nhave : dist (x a) (x b) ≤ r a + r b := dist_le_add_of_nonempty_closedBall_inter_closedBall hb\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\na : ι\nha : a ∈ t'\nb : ι\nbu : b ∈ u\nhb : Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b))\nrb : r a ≤ 2 * r b\nthis : dist (x a) (x b) ≤ r a + r b\n⊢ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\napply closedBall_subset_closedBall'\n[GOAL]\ncase intro.intro.intro.h\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\na : ι\nha : a ∈ t'\nb : ι\nbu : b ∈ u\nhb : Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b))\nrb : r a ≤ 2 * r b\nthis : dist (x a) (x b) ≤ r a + r b\n⊢ r a + dist (x a) (x b) ≤ 5 * r b\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\nA : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n⊢ ∃ u x_1,\n    (PairwiseDisjoint u fun a => closedBall (x a) (r a)) ∧\n      ∀ (a : ι), a ∈ t → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nrefine' ⟨u, ut'.trans fun a ha => ha.1, u_disj, fun a ha => _⟩\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\nA : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\na : ι\nha : a ∈ t\n⊢ ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nrcases le_or_lt 0 (r a) with (h'a | h'a)\n[GOAL]\ncase neg.intro.intro.intro.inl\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\nA : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\na : ι\nha : a ∈ t\nh'a : 0 ≤ r a\n⊢ ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nexact A a ⟨ha, h'a⟩\n[GOAL]\ncase neg.intro.intro.intro.inr\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nht : ∃ a, a ∈ t ∧ 0 ≤ r a\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\nA : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\na : ι\nha : a ∈ t\nh'a : r a < 0\n⊢ ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nrcases ht with ⟨b, rb⟩\n[GOAL]\ncase neg.intro.intro.intro.inr.intro\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\nA : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\na : ι\nha : a ∈ t\nh'a : r a < 0\nb : ι\nrb : b ∈ t ∧ 0 ≤ r b\n⊢ ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nrcases A b ⟨rb.1, rb.2⟩ with ⟨c, cu, _⟩\n[GOAL]\ncase neg.intro.intro.intro.inr.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\nA : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\na : ι\nha : a ∈ t\nh'a : r a < 0\nb : ι\nrb : b ∈ t ∧ 0 ≤ r b\nc : ι\ncu : c ∈ u\nright✝ : closedBall (x b) (r b) ⊆ closedBall (x c) (5 * r c)\n⊢ ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\n[PROOFSTEP]\nrefine' ⟨c, cu, by simp only [closedBall_eq_empty.2 h'a, empty_subset]⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝ : MetricSpace α\nt : Set ι\nx : ι → α\nr : ι → ℝ\nR : ℝ\nhr : ∀ (a : ι), a ∈ t → r a ≤ R\nh✝ : Set.Nonempty t\nt' : Set ι := {a | a ∈ t ∧ 0 ≤ r a}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u fun a => closedBall (x a) (r a)\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (closedBall (x a) (r a) ∩ closedBall (x b) (r b)) ∧ r a ≤ 2 * r b\nA : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ closedBall (x a) (r a) ⊆ closedBall (x b) (5 * r b)\na : ι\nha : a ∈ t\nh'a : r a < 0\nb : ι\nrb : b ∈ t ∧ 0 ≤ r b\nc : ι\ncu : c ∈ u\nright✝ : closedBall (x b) (r b) ⊆ closedBall (x c) (5 * r c)\n⊢ closedBall (x a) (r a) ⊆ closedBall (x c) (5 * r c)\n[PROOFSTEP]\nsimp only [closedBall_eq_empty.2 h'a, empty_subset]\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\n⊢ ∃ u x, Set.Countable u ∧ PairwiseDisjoint u B ∧ ↑↑μ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) = 0\n[PROOFSTEP]\nhave : ∀ x, ∃ R, 0 < R ∧ R ≤ 1 ∧ μ (closedBall x (20 * R)) < ∞ :=\n  by\n  intro x\n  obtain ⟨R, Rpos, μR⟩ : ∃ R, 0 < R ∧ μ (closedBall x R) < ∞ :=\n    (μ.finiteAt_nhds x).exists_mem_basis nhds_basis_closedBall\n  refine' ⟨min 1 (R / 20), _, min_le_left _ _, _⟩\n  · simp only [true_and_iff, lt_min_iff, zero_lt_one]\n    linarith\n  · apply lt_of_le_of_lt (measure_mono _) μR\n    apply closedBall_subset_closedBall\n    calc\n      20 * min 1 (R / 20) ≤ 20 * (R / 20) := mul_le_mul_of_nonneg_left (min_le_right _ _) (by norm_num)\n      _ = R := by ring\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\n⊢ ∀ (x : α), ∃ R, 0 < R ∧ R ≤ 1 ∧ ↑↑μ (closedBall x (20 * R)) < ⊤\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nx : α\n⊢ ∃ R, 0 < R ∧ R ≤ 1 ∧ ↑↑μ (closedBall x (20 * R)) < ⊤\n[PROOFSTEP]\nobtain ⟨R, Rpos, μR⟩ : ∃ R, 0 < R ∧ μ (closedBall x R) < ∞ := (μ.finiteAt_nhds x).exists_mem_basis nhds_basis_closedBall\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nx : α\nR : ℝ\nRpos : 0 < R\nμR : ↑↑μ (closedBall x R) < ⊤\n⊢ ∃ R, 0 < R ∧ R ≤ 1 ∧ ↑↑μ (closedBall x (20 * R)) < ⊤\n[PROOFSTEP]\nrefine' ⟨min 1 (R / 20), _, min_le_left _ _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nx : α\nR : ℝ\nRpos : 0 < R\nμR : ↑↑μ (closedBall x R) < ⊤\n⊢ 0 < min 1 (R / 20)\n[PROOFSTEP]\nsimp only [true_and_iff, lt_min_iff, zero_lt_one]\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nx : α\nR : ℝ\nRpos : 0 < R\nμR : ↑↑μ (closedBall x R) < ⊤\n⊢ 0 < R / 20\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase intro.intro.refine'_2\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nx : α\nR : ℝ\nRpos : 0 < R\nμR : ↑↑μ (closedBall x R) < ⊤\n⊢ ↑↑μ (closedBall x (20 * min 1 (R / 20))) < ⊤\n[PROOFSTEP]\napply lt_of_le_of_lt (measure_mono _) μR\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nx : α\nR : ℝ\nRpos : 0 < R\nμR : ↑↑μ (closedBall x R) < ⊤\n⊢ closedBall x (20 * min 1 (R / 20)) ⊆ closedBall x R\n[PROOFSTEP]\napply closedBall_subset_closedBall\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nx : α\nR : ℝ\nRpos : 0 < R\nμR : ↑↑μ (closedBall x R) < ⊤\n⊢ 20 * min 1 (R / 20) ≤ R\n[PROOFSTEP]\ncalc\n  20 * min 1 (R / 20) ≤ 20 * (R / 20) := mul_le_mul_of_nonneg_left (min_le_right _ _) (by norm_num)\n  _ = R := by ring\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nx : α\nR : ℝ\nRpos : 0 < R\nμR : ↑↑μ (closedBall x R) < ⊤\n⊢ 0 ≤ 20\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nx : α\nR : ℝ\nRpos : 0 < R\nμR : ↑↑μ (closedBall x R) < ⊤\n⊢ 20 * (R / 20) = R\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nthis : ∀ (x : α), ∃ R, 0 < R ∧ R ≤ 1 ∧ ↑↑μ (closedBall x (20 * R)) < ⊤\n⊢ ∃ u x, Set.Countable u ∧ PairwiseDisjoint u B ∧ ↑↑μ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) = 0\n[PROOFSTEP]\nchoose R hR0 hR1 hRμ using this\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\n⊢ ∃ u x, Set.Countable u ∧ PairwiseDisjoint u B ∧ ↑↑μ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) = 0\n[PROOFSTEP]\nlet t' :=\n  {a ∈ t | r a ≤ R (c a)}\n    -- extract a disjoint subfamily `u` of `t'` thanks to the abstract Vitali covering theorem.\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\n⊢ ∃ u x, Set.Countable u ∧ PairwiseDisjoint u B ∧ ↑↑μ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) = 0\n[PROOFSTEP]\nobtain ⟨u, ut', u_disj, hu⟩ :\n  ∃ (u : _) (_ : u ⊆ t'), u.PairwiseDisjoint B ∧ ∀ a ∈ t', ∃ b ∈ u, (B a ∩ B b).Nonempty ∧ r a ≤ 2 * r b :=\n  by\n  have A : ∀ a ∈ t', r a ≤ 1 := by\n    intro a ha\n    apply ha.2.trans (hR1 (c a))\n  have A' : ∀ a ∈ t', (B a).Nonempty := fun a hat' => Set.Nonempty.mono interior_subset (ht a hat'.1)\n  refine' exists_disjoint_subfamily_covering_enlargment B t' r 2 one_lt_two (fun a ha => _) 1 A A'\n  exact nonempty_closedBall.1 ((A' a ha).mono (hB a ha.1))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\n⊢ ∃ u x, PairwiseDisjoint u B ∧ ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\n[PROOFSTEP]\nhave A : ∀ a ∈ t', r a ≤ 1 := by\n  intro a ha\n  apply ha.2.trans (hR1 (c a))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\n⊢ ∀ (a : ι), a ∈ t' → r a ≤ 1\n[PROOFSTEP]\nintro a ha\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\na : ι\nha : a ∈ t'\n⊢ r a ≤ 1\n[PROOFSTEP]\napply ha.2.trans (hR1 (c a))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nA : ∀ (a : ι), a ∈ t' → r a ≤ 1\n⊢ ∃ u x, PairwiseDisjoint u B ∧ ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\n[PROOFSTEP]\nhave A' : ∀ a ∈ t', (B a).Nonempty := fun a hat' => Set.Nonempty.mono interior_subset (ht a hat'.1)\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nA : ∀ (a : ι), a ∈ t' → r a ≤ 1\nA' : ∀ (a : ι), a ∈ t' → Set.Nonempty (B a)\n⊢ ∃ u x, PairwiseDisjoint u B ∧ ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\n[PROOFSTEP]\nrefine' exists_disjoint_subfamily_covering_enlargment B t' r 2 one_lt_two (fun a ha => _) 1 A A'\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nA : ∀ (a : ι), a ∈ t' → r a ≤ 1\nA' : ∀ (a : ι), a ∈ t' → Set.Nonempty (B a)\na : ι\nha : a ∈ t'\n⊢ 0 ≤ r a\n[PROOFSTEP]\nexact nonempty_closedBall.1 ((A' a ha).mono (hB a ha.1))\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\n⊢ ∃ u x, Set.Countable u ∧ PairwiseDisjoint u B ∧ ↑↑μ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) = 0\n[PROOFSTEP]\nhave ut : u ⊆ t := fun a hau =>\n  (ut' hau).1\n    -- As the space is second countable, the family is countable since all its sets have nonempty\n      -- interior.\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\n⊢ ∃ u x, Set.Countable u ∧ PairwiseDisjoint u B ∧ ↑↑μ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) = 0\n[PROOFSTEP]\nhave u_count : u.Countable :=\n  u_disj.countable_of_nonempty_interior fun a ha =>\n    ht a\n      (ut ha)\n        -- the family `u` will be the desired family\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\n⊢ ∃ u x, Set.Countable u ∧ PairwiseDisjoint u B ∧ ↑↑μ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) = 0\n[PROOFSTEP]\nrefine'\n  ⟨u, fun a hat' => (ut' hat').1, u_count, u_disj, _⟩\n    -- it suffices to show that it covers almost all `s` locally around each point `x`.\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\n⊢ ↑↑μ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) = 0\n[PROOFSTEP]\nrefine'\n  null_of_locally_null _ fun x _ =>\n    _\n      -- let `v` be the subfamily of `u` made of those sets intersecting the small ball `ball x (r x)`\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\n⊢ ∃ u_1, u_1 ∈ 𝓝[s \\ ⋃ (a : ι) (_ : a ∈ u), B a] x ∧ ↑↑μ u_1 = 0\n[PROOFSTEP]\nlet v := {a ∈ u | (B a ∩ ball x (R x)).Nonempty}\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\n⊢ ∃ u_1, u_1 ∈ 𝓝[s \\ ⋃ (a : ι) (_ : a ∈ u), B a] x ∧ ↑↑μ u_1 = 0\n[PROOFSTEP]\nhave vu : v ⊆ u := fun a ha =>\n  ha.1\n    -- they are all contained in a fixed ball of finite measure, thanks to our choice of `t'`\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\n⊢ ∃ u_1, u_1 ∈ 𝓝[s \\ ⋃ (a : ι) (_ : a ∈ u), B a] x ∧ ↑↑μ u_1 = 0\n[PROOFSTEP]\nobtain ⟨K, μK, hK⟩ : ∃ K, μ (closedBall x K) < ∞ ∧ ∀ a ∈ u, (B a ∩ ball x (R x)).Nonempty → B a ⊆ closedBall x K :=\n  by\n  have Idist_v : ∀ a ∈ v, dist (c a) x ≤ r a + R x := by\n    intro a hav\n    apply dist_le_add_of_nonempty_closedBall_inter_closedBall\n    refine' hav.2.mono _\n    apply inter_subset_inter _ ball_subset_closedBall\n    exact hB a (ut (vu hav))\n  set R0 := sSup (r '' v) with R0_def\n  have R0_bdd : BddAbove (r '' v) := by\n    refine' ⟨1, fun r' hr' => _⟩\n    rcases(mem_image _ _ _).1 hr' with ⟨b, hb, rfl⟩\n    exact le_trans (ut' (vu hb)).2 (hR1 (c b))\n  rcases le_total R0 (R x) with (H | H)\n  · refine' ⟨20 * R x, hRμ x, fun a au hax => _⟩\n    refine' (hB a (ut au)).trans _\n    apply closedBall_subset_closedBall'\n    have : r a ≤ R0 := le_csSup R0_bdd (mem_image_of_mem _ ⟨au, hax⟩)\n    linarith [Idist_v a ⟨au, hax⟩, hR0 x]\n  · have R0pos : 0 < R0 := (hR0 x).trans_le H\n    have vnonempty : v.Nonempty := by\n      by_contra h\n      rw [nonempty_iff_ne_empty, Classical.not_not] at h \n      rw [h, image_empty, Real.sSup_empty] at R0_def \n      exact lt_irrefl _ (R0pos.trans_le (le_of_eq R0_def))\n    obtain ⟨a, hav, R0a⟩ : ∃ a ∈ v, R0 / 2 < r a :=\n      by\n      obtain ⟨r', r'mem, hr'⟩ : ∃ r' ∈ r '' v, R0 / 2 < r' :=\n        exists_lt_of_lt_csSup (nonempty_image_iff.2 vnonempty) (half_lt_self R0pos)\n      rcases(mem_image _ _ _).1 r'mem with ⟨a, hav, rfl⟩\n      exact ⟨a, hav, hr'⟩\n    refine' ⟨8 * R0, _, _⟩\n    · apply lt_of_le_of_lt (measure_mono _) (hRμ (c a))\n      apply closedBall_subset_closedBall'\n      rw [dist_comm]\n      linarith [Idist_v a hav, (ut' (vu hav)).2]\n    · intro b bu hbx\n      refine' (hB b (ut bu)).trans _\n      apply closedBall_subset_closedBall'\n      have : r b ≤ R0 := le_csSup R0_bdd (mem_image_of_mem _ ⟨bu, hbx⟩)\n      linarith [Idist_v b ⟨bu, hbx⟩]\n        -- we will show that, in `ball x (R x)`, almost all `s` is covered by the family `u`.\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\n⊢ ∃ K, ↑↑μ (closedBall x K) < ⊤ ∧ ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\n[PROOFSTEP]\nhave Idist_v : ∀ a ∈ v, dist (c a) x ≤ r a + R x := by\n  intro a hav\n  apply dist_le_add_of_nonempty_closedBall_inter_closedBall\n  refine' hav.2.mono _\n  apply inter_subset_inter _ ball_subset_closedBall\n  exact hB a (ut (vu hav))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\n⊢ ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\n[PROOFSTEP]\nintro a hav\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\na : ι\nhav : a ∈ v\n⊢ dist (c a) x ≤ r a + R x\n[PROOFSTEP]\napply dist_le_add_of_nonempty_closedBall_inter_closedBall\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\na : ι\nhav : a ∈ v\n⊢ Set.Nonempty (closedBall (c a) (r a) ∩ closedBall x (R x))\n[PROOFSTEP]\nrefine' hav.2.mono _\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\na : ι\nhav : a ∈ v\n⊢ B a ∩ ball x (R x) ⊆ closedBall (c a) (r a) ∩ closedBall x (R x)\n[PROOFSTEP]\napply inter_subset_inter _ ball_subset_closedBall\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\na : ι\nhav : a ∈ v\n⊢ B a ⊆ closedBall (c a) (r a)\n[PROOFSTEP]\nexact hB a (ut (vu hav))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\n⊢ ∃ K, ↑↑μ (closedBall x K) < ⊤ ∧ ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\n[PROOFSTEP]\nset R0 := sSup (r '' v) with R0_def\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\n⊢ ∃ K, ↑↑μ (closedBall x K) < ⊤ ∧ ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\n[PROOFSTEP]\nhave R0_bdd : BddAbove (r '' v) := by\n  refine' ⟨1, fun r' hr' => _⟩\n  rcases(mem_image _ _ _).1 hr' with ⟨b, hb, rfl⟩\n  exact le_trans (ut' (vu hb)).2 (hR1 (c b))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\n⊢ BddAbove (r '' v)\n[PROOFSTEP]\nrefine' ⟨1, fun r' hr' => _⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nr' : ℝ\nhr' : r' ∈ r '' v\n⊢ r' ≤ 1\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 hr' with ⟨b, hb, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nb : ι\nhb : b ∈ v\nhr' : r b ∈ r '' v\n⊢ r b ≤ 1\n[PROOFSTEP]\nexact le_trans (ut' (vu hb)).2 (hR1 (c b))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\n⊢ ∃ K, ↑↑μ (closedBall x K) < ⊤ ∧ ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\n[PROOFSTEP]\nrcases le_total R0 (R x) with (H | H)\n[GOAL]\ncase inl\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R0 ≤ R x\n⊢ ∃ K, ↑↑μ (closedBall x K) < ⊤ ∧ ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\n[PROOFSTEP]\nrefine' ⟨20 * R x, hRμ x, fun a au hax => _⟩\n[GOAL]\ncase inl\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R0 ≤ R x\na : ι\nau : a ∈ u\nhax : Set.Nonempty (B a ∩ ball x (R x))\n⊢ B a ⊆ closedBall x (20 * R x)\n[PROOFSTEP]\nrefine' (hB a (ut au)).trans _\n[GOAL]\ncase inl\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R0 ≤ R x\na : ι\nau : a ∈ u\nhax : Set.Nonempty (B a ∩ ball x (R x))\n⊢ closedBall (c a) (r a) ⊆ closedBall x (20 * R x)\n[PROOFSTEP]\napply closedBall_subset_closedBall'\n[GOAL]\ncase inl.h\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R0 ≤ R x\na : ι\nau : a ∈ u\nhax : Set.Nonempty (B a ∩ ball x (R x))\n⊢ r a + dist (c a) x ≤ 20 * R x\n[PROOFSTEP]\nhave : r a ≤ R0 := le_csSup R0_bdd (mem_image_of_mem _ ⟨au, hax⟩)\n[GOAL]\ncase inl.h\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R0 ≤ R x\na : ι\nau : a ∈ u\nhax : Set.Nonempty (B a ∩ ball x (R x))\nthis : r a ≤ R0\n⊢ r a + dist (c a) x ≤ 20 * R x\n[PROOFSTEP]\nlinarith [Idist_v a ⟨au, hax⟩, hR0 x]\n[GOAL]\ncase inr\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\n⊢ ∃ K, ↑↑μ (closedBall x K) < ⊤ ∧ ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\n[PROOFSTEP]\nhave R0pos : 0 < R0 := (hR0 x).trans_le H\n[GOAL]\ncase inr\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\n⊢ ∃ K, ↑↑μ (closedBall x K) < ⊤ ∧ ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\n[PROOFSTEP]\nhave vnonempty : v.Nonempty := by\n  by_contra h\n  rw [nonempty_iff_ne_empty, Classical.not_not] at h \n  rw [h, image_empty, Real.sSup_empty] at R0_def \n  exact lt_irrefl _ (R0pos.trans_le (le_of_eq R0_def))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\n⊢ Set.Nonempty v\n[PROOFSTEP]\nby_contra h\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nh : ¬Set.Nonempty v\n⊢ False\n[PROOFSTEP]\nrw [nonempty_iff_ne_empty, Classical.not_not] at h \n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nh : v = ∅\n⊢ False\n[PROOFSTEP]\nrw [h, image_empty, Real.sSup_empty] at R0_def \n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = 0\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nh : v = ∅\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ (R0pos.trans_le (le_of_eq R0_def))\n[GOAL]\ncase inr\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\n⊢ ∃ K, ↑↑μ (closedBall x K) < ⊤ ∧ ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\n[PROOFSTEP]\nobtain ⟨a, hav, R0a⟩ : ∃ a ∈ v, R0 / 2 < r a :=\n  by\n  obtain ⟨r', r'mem, hr'⟩ : ∃ r' ∈ r '' v, R0 / 2 < r' :=\n    exists_lt_of_lt_csSup (nonempty_image_iff.2 vnonempty) (half_lt_self R0pos)\n  rcases(mem_image _ _ _).1 r'mem with ⟨a, hav, rfl⟩\n  exact ⟨a, hav, hr'⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\n⊢ ∃ a, a ∈ v ∧ R0 / 2 < r a\n[PROOFSTEP]\nobtain ⟨r', r'mem, hr'⟩ : ∃ r' ∈ r '' v, R0 / 2 < r' :=\n  exists_lt_of_lt_csSup (nonempty_image_iff.2 vnonempty) (half_lt_self R0pos)\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\nr' : ℝ\nr'mem : r' ∈ r '' v\nhr' : R0 / 2 < r'\n⊢ ∃ a, a ∈ v ∧ R0 / 2 < r a\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 r'mem with ⟨a, hav, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\na : ι\nhav : a ∈ v\nr'mem : r a ∈ r '' v\nhr' : R0 / 2 < r a\n⊢ ∃ a, a ∈ v ∧ R0 / 2 < r a\n[PROOFSTEP]\nexact ⟨a, hav, hr'⟩\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\na : ι\nhav : a ∈ v\nR0a : R0 / 2 < r a\n⊢ ∃ K, ↑↑μ (closedBall x K) < ⊤ ∧ ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\n[PROOFSTEP]\nrefine' ⟨8 * R0, _, _⟩\n[GOAL]\ncase inr.intro.intro.refine'_1\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\na : ι\nhav : a ∈ v\nR0a : R0 / 2 < r a\n⊢ ↑↑μ (closedBall x (8 * R0)) < ⊤\n[PROOFSTEP]\napply lt_of_le_of_lt (measure_mono _) (hRμ (c a))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\na : ι\nhav : a ∈ v\nR0a : R0 / 2 < r a\n⊢ closedBall x (8 * R0) ⊆ closedBall (c a) (20 * R (c a))\n[PROOFSTEP]\napply closedBall_subset_closedBall'\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\na : ι\nhav : a ∈ v\nR0a : R0 / 2 < r a\n⊢ 8 * R0 + dist x (c a) ≤ 20 * R (c a)\n[PROOFSTEP]\nrw [dist_comm]\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\na : ι\nhav : a ∈ v\nR0a : R0 / 2 < r a\n⊢ 8 * R0 + dist (c a) x ≤ 20 * R (c a)\n[PROOFSTEP]\nlinarith [Idist_v a hav, (ut' (vu hav)).2]\n[GOAL]\ncase inr.intro.intro.refine'_2\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\na : ι\nhav : a ∈ v\nR0a : R0 / 2 < r a\n⊢ ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x (8 * R0)\n[PROOFSTEP]\nintro b bu hbx\n[GOAL]\ncase inr.intro.intro.refine'_2\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\na : ι\nhav : a ∈ v\nR0a : R0 / 2 < r a\nb : ι\nbu : b ∈ u\nhbx : Set.Nonempty (B b ∩ ball x (R x))\n⊢ B b ⊆ closedBall x (8 * R0)\n[PROOFSTEP]\nrefine' (hB b (ut bu)).trans _\n[GOAL]\ncase inr.intro.intro.refine'_2\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\na : ι\nhav : a ∈ v\nR0a : R0 / 2 < r a\nb : ι\nbu : b ∈ u\nhbx : Set.Nonempty (B b ∩ ball x (R x))\n⊢ closedBall (c b) (r b) ⊆ closedBall x (8 * R0)\n[PROOFSTEP]\napply closedBall_subset_closedBall'\n[GOAL]\ncase inr.intro.intro.refine'_2.h\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\na : ι\nhav : a ∈ v\nR0a : R0 / 2 < r a\nb : ι\nbu : b ∈ u\nhbx : Set.Nonempty (B b ∩ ball x (R x))\n⊢ r b + dist (c b) x ≤ 8 * R0\n[PROOFSTEP]\nhave : r b ≤ R0 := le_csSup R0_bdd (mem_image_of_mem _ ⟨bu, hbx⟩)\n[GOAL]\ncase inr.intro.intro.refine'_2.h\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nIdist_v : ∀ (a : ι), a ∈ v → dist (c a) x ≤ r a + R x\nR0 : ℝ := sSup (r '' v)\nR0_def : R0 = sSup (r '' v)\nR0_bdd : BddAbove (r '' v)\nH : R x ≤ R0\nR0pos : 0 < R0\nvnonempty : Set.Nonempty v\na : ι\nhav : a ∈ v\nR0a : R0 / 2 < r a\nb : ι\nbu : b ∈ u\nhbx : Set.Nonempty (B b ∩ ball x (R x))\nthis : r b ≤ R0\n⊢ r b + dist (c b) x ≤ 8 * R0\n[PROOFSTEP]\nlinarith [Idist_v b ⟨bu, hbx⟩]\n  -- we will show that, in `ball x (R x)`, almost all `s` is covered by the family `u`.\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\n⊢ ∃ u_1, u_1 ∈ 𝓝[s \\ ⋃ (a : ι) (_ : a ∈ u), B a] x ∧ ↑↑μ u_1 = 0\n[PROOFSTEP]\nrefine'\n  ⟨_ ∩ ball x (R x), inter_mem_nhdsWithin _ (ball_mem_nhds _ (hR0 _)),\n    nonpos_iff_eq_zero.mp (le_of_forall_le_of_dense fun ε εpos => _)⟩\n    -- the elements of `v` are disjoint and all contained in a finite volume ball, hence the sum\n      -- of their measures is finite.\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\n⊢ ↑↑μ ((s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)) ≤ ε\n[PROOFSTEP]\nhave I : (∑' a : v, μ (B a)) < ∞ := by\n  calc\n    (∑' a : v, μ (B a)) = μ (⋃ a ∈ v, B a) :=\n      by\n      rw [measure_biUnion (u_count.mono vu) _ fun a ha => (h't _ (vu.trans ut ha)).measurableSet]\n      exact u_disj.subset vu\n    _ ≤ μ (closedBall x K) := (measure_mono (iUnion₂_subset fun a ha => hK a (vu ha) ha.2))\n    _ < ∞ := μK\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\n⊢ ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\n[PROOFSTEP]\ncalc\n  (∑' a : v, μ (B a)) = μ (⋃ a ∈ v, B a) :=\n    by\n    rw [measure_biUnion (u_count.mono vu) _ fun a ha => (h't _ (vu.trans ut ha)).measurableSet]\n    exact u_disj.subset vu\n  _ ≤ μ (closedBall x K) := (measure_mono (iUnion₂_subset fun a ha => hK a (vu ha) ha.2))\n  _ < ∞ := μK\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\n⊢ ∑' (a : ↑v), ↑↑μ (B ↑a) = ↑↑μ (⋃ (a : ι) (_ : a ∈ v), B a)\n[PROOFSTEP]\nrw [measure_biUnion (u_count.mono vu) _ fun a ha => (h't _ (vu.trans ut ha)).measurableSet]\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\n⊢ PairwiseDisjoint v fun a => B a\n[PROOFSTEP]\nexact u_disj.subset vu\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\n⊢ ↑↑μ ((s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)) ≤ ε\n[PROOFSTEP]\nobtain ⟨w, hw⟩ : ∃ w : Finset v, (∑' a : { a // a ∉ w }, μ (B a)) < ε / C :=\n  haveI : 0 < ε / C := by\n    simp only [ENNReal.div_pos_iff, εpos.ne', ENNReal.coe_ne_top, Ne.def, not_false_iff, and_self_iff]\n  ((tendsto_order.1 (ENNReal.tendsto_tsum_compl_atTop_zero I.ne)).2 _ this).exists\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\n⊢ 0 < ε / ↑C\n[PROOFSTEP]\nsimp only [ENNReal.div_pos_iff, εpos.ne', ENNReal.coe_ne_top, Ne.def, not_false_iff, and_self_iff]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\n⊢ ↑↑μ ((s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)) ≤ ε\n[PROOFSTEP]\nhave M : (s \\ ⋃ a ∈ u, B a) ∩ ball x (R x) ⊆ ⋃ a : { a // a ∉ w }, closedBall (c a) (3 * r a) :=\n  by\n  intro z hz\n  set k := ⋃ (a : v) (_ : a ∈ w), B a\n  have k_closed : IsClosed k := isClosed_biUnion w.finite_toSet fun i _ => h't _ (ut (vu i.2))\n  have z_notmem_k : z ∉ k :=\n    by\n    simp only [not_exists, exists_prop, mem_iUnion, mem_sep_iff, forall_exists_index, SetCoe.exists, not_and,\n      exists_and_right, Subtype.coe_mk]\n    intro b hbv _ h'z\n    have : z ∈ (s \\ ⋃ a ∈ u, B a) ∩ ⋃ a ∈ u, B a := mem_inter (mem_of_mem_inter_left hz) (mem_biUnion (vu hbv) h'z)\n    simpa only [diff_inter_self]\n      -- since the elements of `w` are closed and finitely many, one can find a small ball around `z`\n          -- not intersecting them\n  have : ball x (R x) \\ k ∈ 𝓝 z :=\n    by\n    apply IsOpen.mem_nhds (isOpen_ball.sdiff k_closed) _\n    exact (mem_diff _).2 ⟨mem_of_mem_inter_right hz, z_notmem_k⟩\n  obtain ⟨d, dpos, hd⟩ : ∃ d, 0 < d ∧ closedBall z d ⊆ ball x (R x) \\ k := nhds_basis_closedBall.mem_iff.1 this\n  obtain ⟨a, hat, ad, rfl⟩ : ∃ a ∈ t, r a ≤ min d (R z) ∧ c a = z\n  exact hf z ((mem_diff _).1 (mem_of_mem_inter_left hz)).1 (min d (R z)) (lt_min dpos (hR0 z))\n  have ax : B a ⊆ ball x (R x) := by\n    refine' (hB a hat).trans _\n    refine' Subset.trans _ (hd.trans (diff_subset (ball x (R x)) k))\n    exact\n      closedBall_subset_closedBall\n        (ad.trans (min_le_left _ _))\n          -- it intersects an element `b` of `u` with comparable diameter, by definition of `u`\n  obtain ⟨b, bu, ab, bdiam⟩ : ∃ b ∈ u, (B a ∩ B b).Nonempty ∧ r a ≤ 2 * r b\n  exact hu a ⟨hat, ad.trans (min_le_right _ _)⟩\n  have bv : b ∈ v := by\n    refine' ⟨bu, ab.mono _⟩\n    rw [inter_comm]\n    exact inter_subset_inter_right _ ax\n  let b' : v :=\n    ⟨b, bv⟩\n      -- `b` cannot belong to `w`, as the elements of `w` do not intersect `closedBall z d`,\n          -- contrary to `b`\n  have b'_notmem_w : b' ∉ w := by\n    intro b'w\n    have b'k : B b' ⊆ k := @Finset.subset_set_biUnion_of_mem _ _ _ (fun y : v => B y) _ b'w\n    have : (ball x (R x) \\ k ∩ k).Nonempty :=\n      by\n      apply ab.mono (inter_subset_inter _ b'k)\n      refine' ((hB _ hat).trans _).trans hd\n      exact closedBall_subset_closedBall (ad.trans (min_le_left _ _))\n    simpa only [diff_inter_self, Set.not_nonempty_empty]\n  let b'' : { a // a ∉ w } :=\n    ⟨b', b'_notmem_w⟩\n      -- since `a` and `b` have comparable diameters, it follows that `z` belongs to the\n          -- enlargement of `b`\n  have zb : c a ∈ closedBall (c b) (3 * r b) :=\n    by\n    rcases ab with ⟨e, ⟨ea, eb⟩⟩\n    have A : dist (c a) e ≤ r a := mem_closedBall'.1 (hB a hat ea)\n    have B : dist e (c b) ≤ r b := mem_closedBall.1 (hB b (ut bu) eb)\n    simp only [mem_closedBall]\n    linarith only [dist_triangle (c a) e (c b), A, B, bdiam]\n  suffices H : closedBall (c b'') (3 * r b'') ⊆ ⋃ a : { a // a ∉ w }, closedBall (c a) (3 * r a)\n  exact H zb\n  exact subset_iUnion (fun a : { a // a ∉ w } => closedBall (c a) (3 * r a)) b''\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\n⊢ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x) ⊆ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nintro z hz\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\n⊢ z ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nset k := ⋃ (a : v) (_ : a ∈ w), B a\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\n⊢ z ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nhave k_closed : IsClosed k := isClosed_biUnion w.finite_toSet fun i _ => h't _ (ut (vu i.2))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\n⊢ z ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nhave z_notmem_k : z ∉ k :=\n  by\n  simp only [not_exists, exists_prop, mem_iUnion, mem_sep_iff, forall_exists_index, SetCoe.exists, not_and,\n    exists_and_right, Subtype.coe_mk]\n  intro b hbv _ h'z\n  have : z ∈ (s \\ ⋃ a ∈ u, B a) ∩ ⋃ a ∈ u, B a := mem_inter (mem_of_mem_inter_left hz) (mem_biUnion (vu hbv) h'z)\n  simpa only [diff_inter_self]\n    -- since the elements of `w` are closed and finitely many, one can find a small ball around `z`\n        -- not intersecting them\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\n⊢ ¬z ∈ k\n[PROOFSTEP]\nsimp only [not_exists, exists_prop, mem_iUnion, mem_sep_iff, forall_exists_index, SetCoe.exists, not_and,\n  exists_and_right, Subtype.coe_mk]\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\n⊢ ∀ (x_1 : ι) (x_2 : x_1 ∈ u ∧ Set.Nonempty (B x_1 ∩ ball x (R x))),\n    { val := x_1, property := (_ : x_1 ∈ {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}) } ∈ w → ¬z ∈ B x_1\n[PROOFSTEP]\nintro b hbv _ h'z\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nb : ι\nhbv : b ∈ u ∧ Set.Nonempty (B b ∩ ball x (R x))\nh✝ : { val := b, property := (_ : b ∈ {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}) } ∈ w\nh'z : z ∈ B b\n⊢ False\n[PROOFSTEP]\nhave : z ∈ (s \\ ⋃ a ∈ u, B a) ∩ ⋃ a ∈ u, B a := mem_inter (mem_of_mem_inter_left hz) (mem_biUnion (vu hbv) h'z)\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nb : ι\nhbv : b ∈ u ∧ Set.Nonempty (B b ∩ ball x (R x))\nh✝ : { val := b, property := (_ : b ∈ {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}) } ∈ w\nh'z : z ∈ B b\nthis : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ⋃ (a : ι) (_ : a ∈ u), B a\n⊢ False\n[PROOFSTEP]\nsimpa only [diff_inter_self]\n  -- since the elements of `w` are closed and finitely many, one can find a small ball around `z`\n      -- not intersecting them\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nz_notmem_k : ¬z ∈ k\n⊢ z ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nhave : ball x (R x) \\ k ∈ 𝓝 z := by\n  apply IsOpen.mem_nhds (isOpen_ball.sdiff k_closed) _\n  exact (mem_diff _).2 ⟨mem_of_mem_inter_right hz, z_notmem_k⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nz_notmem_k : ¬z ∈ k\n⊢ ball x (R x) \\ k ∈ 𝓝 z\n[PROOFSTEP]\napply IsOpen.mem_nhds (isOpen_ball.sdiff k_closed) _\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nz_notmem_k : ¬z ∈ k\n⊢ z ∈ ball x (R x) \\ k\n[PROOFSTEP]\nexact (mem_diff _).2 ⟨mem_of_mem_inter_right hz, z_notmem_k⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nz_notmem_k : ¬z ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 z\n⊢ z ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nobtain ⟨d, dpos, hd⟩ : ∃ d, 0 < d ∧ closedBall z d ⊆ ball x (R x) \\ k := nhds_basis_closedBall.mem_iff.1 this\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nz_notmem_k : ¬z ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 z\nd : ℝ\ndpos : 0 < d\nhd : closedBall z d ⊆ ball x (R x) \\ k\n⊢ z ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nobtain ⟨a, hat, ad, rfl⟩ : ∃ a ∈ t, r a ≤ min d (R z) ∧ c a = z\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nz : α\nhz : z ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nz_notmem_k : ¬z ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 z\nd : ℝ\ndpos : 0 < d\nhd : closedBall z d ⊆ ball x (R x) \\ k\n⊢ ∃ a, a ∈ t ∧ r a ≤ min d (R z) ∧ c a = z\ncase intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\n⊢ c a ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nexact hf z ((mem_diff _).1 (mem_of_mem_inter_left hz)).1 (min d (R z)) (lt_min dpos (hR0 z))\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\n⊢ c a ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nhave ax : B a ⊆ ball x (R x) := by\n  refine' (hB a hat).trans _\n  refine' Subset.trans _ (hd.trans (diff_subset (ball x (R x)) k))\n  exact\n    closedBall_subset_closedBall\n      (ad.trans (min_le_left _ _))\n        -- it intersects an element `b` of `u` with comparable diameter, by definition of `u`\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\n⊢ B a ⊆ ball x (R x)\n[PROOFSTEP]\nrefine' (hB a hat).trans _\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\n⊢ closedBall (c a) (r a) ⊆ ball x (R x)\n[PROOFSTEP]\nrefine' Subset.trans _ (hd.trans (diff_subset (ball x (R x)) k))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\n⊢ closedBall (c a) (r a) ⊆ closedBall (c a) d\n[PROOFSTEP]\nexact\n  closedBall_subset_closedBall\n    (ad.trans (min_le_left _ _))\n      -- it intersects an element `b` of `u` with comparable diameter, by definition of `u`\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\n⊢ c a ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nobtain ⟨b, bu, ab, bdiam⟩ : ∃ b ∈ u, (B a ∩ B b).Nonempty ∧ r a ≤ 2 * r b\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\n⊢ ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\n⊢ c a ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nexact hu a ⟨hat, ad.trans (min_le_right _ _)⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\n⊢ c a ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nhave bv : b ∈ v := by\n  refine' ⟨bu, ab.mono _⟩\n  rw [inter_comm]\n  exact inter_subset_inter_right _ ax\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\n⊢ b ∈ v\n[PROOFSTEP]\nrefine' ⟨bu, ab.mono _⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\n⊢ B a ∩ B b ⊆ B b ∩ ball x (R x)\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\n⊢ B b ∩ B a ⊆ B b ∩ ball x (R x)\n[PROOFSTEP]\nexact inter_subset_inter_right _ ax\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\n⊢ c a ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nlet b' : v :=\n  ⟨b, bv⟩\n    -- `b` cannot belong to `w`, as the elements of `w` do not intersect `closedBall z d`,\n        -- contrary to `b`\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\n⊢ c a ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nhave b'_notmem_w : b' ∉ w := by\n  intro b'w\n  have b'k : B b' ⊆ k := @Finset.subset_set_biUnion_of_mem _ _ _ (fun y : v => B y) _ b'w\n  have : (ball x (R x) \\ k ∩ k).Nonempty :=\n    by\n    apply ab.mono (inter_subset_inter _ b'k)\n    refine' ((hB _ hat).trans _).trans hd\n    exact closedBall_subset_closedBall (ad.trans (min_le_left _ _))\n  simpa only [diff_inter_self, Set.not_nonempty_empty]\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\n⊢ ¬b' ∈ w\n[PROOFSTEP]\nintro b'w\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'w : b' ∈ w\n⊢ False\n[PROOFSTEP]\nhave b'k : B b' ⊆ k := @Finset.subset_set_biUnion_of_mem _ _ _ (fun y : v => B y) _ b'w\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'w : b' ∈ w\nb'k : B ↑b' ⊆ k\n⊢ False\n[PROOFSTEP]\nhave : (ball x (R x) \\ k ∩ k).Nonempty :=\n  by\n  apply ab.mono (inter_subset_inter _ b'k)\n  refine' ((hB _ hat).trans _).trans hd\n  exact closedBall_subset_closedBall (ad.trans (min_le_left _ _))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'w : b' ∈ w\nb'k : B ↑b' ⊆ k\n⊢ Set.Nonempty (ball x (R x) \\ k ∩ k)\n[PROOFSTEP]\napply ab.mono (inter_subset_inter _ b'k)\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'w : b' ∈ w\nb'k : B ↑b' ⊆ k\n⊢ B a ⊆ ball x (R x) \\ k\n[PROOFSTEP]\nrefine' ((hB _ hat).trans _).trans hd\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'w : b' ∈ w\nb'k : B ↑b' ⊆ k\n⊢ closedBall (c a) (r a) ⊆ closedBall (c a) d\n[PROOFSTEP]\nexact closedBall_subset_closedBall (ad.trans (min_le_left _ _))\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis✝ : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'w : b' ∈ w\nb'k : B ↑b' ⊆ k\nthis : Set.Nonempty (ball x (R x) \\ k ∩ k)\n⊢ False\n[PROOFSTEP]\nsimpa only [diff_inter_self, Set.not_nonempty_empty]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'_notmem_w : ¬b' ∈ w\n⊢ c a ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nlet b'' : { a // a ∉ w } :=\n  ⟨b', b'_notmem_w⟩\n    -- since `a` and `b` have comparable diameters, it follows that `z` belongs to the\n        -- enlargement of `b`\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'_notmem_w : ¬b' ∈ w\nb'' : { a // ¬a ∈ w } := { val := b', property := b'_notmem_w }\n⊢ c a ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nhave zb : c a ∈ closedBall (c b) (3 * r b) :=\n  by\n  rcases ab with ⟨e, ⟨ea, eb⟩⟩\n  have A : dist (c a) e ≤ r a := mem_closedBall'.1 (hB a hat ea)\n  have B : dist e (c b) ≤ r b := mem_closedBall.1 (hB b (ut bu) eb)\n  simp only [mem_closedBall]\n  linarith only [dist_triangle (c a) e (c b), A, B, bdiam]\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'_notmem_w : ¬b' ∈ w\nb'' : { a // ¬a ∈ w } := { val := b', property := b'_notmem_w }\n⊢ c a ∈ closedBall (c b) (3 * r b)\n[PROOFSTEP]\nrcases ab with ⟨e, ⟨ea, eb⟩⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'_notmem_w : ¬b' ∈ w\nb'' : { a // ¬a ∈ w } := { val := b', property := b'_notmem_w }\ne : α\nea : e ∈ B a\neb : e ∈ B b\n⊢ c a ∈ closedBall (c b) (3 * r b)\n[PROOFSTEP]\nhave A : dist (c a) e ≤ r a := mem_closedBall'.1 (hB a hat ea)\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'_notmem_w : ¬b' ∈ w\nb'' : { a // ¬a ∈ w } := { val := b', property := b'_notmem_w }\ne : α\nea : e ∈ B a\neb : e ∈ B b\nA : dist (c a) e ≤ r a\n⊢ c a ∈ closedBall (c b) (3 * r b)\n[PROOFSTEP]\nhave B : dist e (c b) ≤ r b := mem_closedBall.1 (hB b (ut bu) eb)\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB✝ : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B✝ a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B✝ a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B✝ a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B✝ a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B✝\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B✝ a ∩ B✝ b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B✝ a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B✝ a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B✝ a ∩ ball x (R x)) → B✝ a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B✝ ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B✝ ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B✝ ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B✝ a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B✝ a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'_notmem_w : ¬b' ∈ w\nb'' : { a // ¬a ∈ w } := { val := b', property := b'_notmem_w }\ne : α\nea : e ∈ B✝ a\neb : e ∈ B✝ b\nA : dist (c a) e ≤ r a\nB : dist e (c b) ≤ r b\n⊢ c a ∈ closedBall (c b) (3 * r b)\n[PROOFSTEP]\nsimp only [mem_closedBall]\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB✝ : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B✝ a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B✝ a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B✝ a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B✝ a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B✝\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B✝ a ∩ B✝ b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B✝ a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B✝ a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B✝ a ∩ ball x (R x)) → B✝ a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B✝ ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B✝ ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B✝ ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B✝ a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B✝ a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'_notmem_w : ¬b' ∈ w\nb'' : { a // ¬a ∈ w } := { val := b', property := b'_notmem_w }\ne : α\nea : e ∈ B✝ a\neb : e ∈ B✝ b\nA : dist (c a) e ≤ r a\nB : dist e (c b) ≤ r b\n⊢ dist (c a) (c b) ≤ 3 * r b\n[PROOFSTEP]\nlinarith only [dist_triangle (c a) e (c b), A, B, bdiam]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'_notmem_w : ¬b' ∈ w\nb'' : { a // ¬a ∈ w } := { val := b', property := b'_notmem_w }\nzb : c a ∈ closedBall (c b) (3 * r b)\n⊢ c a ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nsuffices H : closedBall (c b'') (3 * r b'') ⊆ ⋃ a : { a // a ∉ w }, closedBall (c a) (3 * r a)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'_notmem_w : ¬b' ∈ w\nb'' : { a // ¬a ∈ w } := { val := b', property := b'_notmem_w }\nzb : c a ∈ closedBall (c b) (3 * r b)\nH : closedBall (c ↑↑b'') (3 * r ↑↑b'') ⊆ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n⊢ c a ∈ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\ncase H\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'_notmem_w : ¬b' ∈ w\nb'' : { a // ¬a ∈ w } := { val := b', property := b'_notmem_w }\nzb : c a ∈ closedBall (c b) (3 * r b)\n⊢ closedBall (c ↑↑b'') (3 * r ↑↑b'') ⊆ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nexact H zb\n[GOAL]\ncase H\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nk : Set α := ⋃ (a : ↑v) (_ : a ∈ w), B ↑a\nk_closed : IsClosed k\nd : ℝ\ndpos : 0 < d\na : ι\nhat : a ∈ t\nhz : c a ∈ (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)\nz_notmem_k : ¬c a ∈ k\nthis : ball x (R x) \\ k ∈ 𝓝 (c a)\nhd : closedBall (c a) d ⊆ ball x (R x) \\ k\nad : r a ≤ min d (R (c a))\nax : B a ⊆ ball x (R x)\nb : ι\nbu : b ∈ u\nab : Set.Nonempty (B a ∩ B b)\nbdiam : r a ≤ 2 * r b\nbv : b ∈ v\nb' : ↑v := { val := b, property := bv }\nb'_notmem_w : ¬b' ∈ w\nb'' : { a // ¬a ∈ w } := { val := b', property := b'_notmem_w }\nzb : c a ∈ closedBall (c b) (3 * r b)\n⊢ closedBall (c ↑↑b'') (3 * r ↑↑b'') ⊆ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n[PROOFSTEP]\nexact subset_iUnion (fun a : { a // a ∉ w } => closedBall (c a) (3 * r a)) b''\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nM : (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x) ⊆ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\n⊢ ↑↑μ ((s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)) ≤ ε\n[PROOFSTEP]\nhaveI : Encodable v := (u_count.mono vu).toEncodable\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set α\nt : Set ι\nC : ℝ≥0\nr : ι → ℝ\nc : ι → α\nB : ι → Set α\nhB : ∀ (a : ι), a ∈ t → B a ⊆ closedBall (c a) (r a)\nμB : ∀ (a : ι), a ∈ t → ↑↑μ (closedBall (c a) (3 * r a)) ≤ ↑C * ↑↑μ (B a)\nht : ∀ (a : ι), a ∈ t → Set.Nonempty (interior (B a))\nh't : ∀ (a : ι), a ∈ t → IsClosed (B a)\nhf : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ t ∧ r a ≤ ε ∧ c a = x\nR : α → ℝ\nhR0 : ∀ (x : α), 0 < R x\nhR1 : ∀ (x : α), R x ≤ 1\nhRμ : ∀ (x : α), ↑↑μ (closedBall x (20 * R x)) < ⊤\nt' : Set ι := {a | a ∈ t ∧ r a ≤ R (c a)}\nu : Set ι\nut' : u ⊆ t'\nu_disj : PairwiseDisjoint u B\nhu : ∀ (a : ι), a ∈ t' → ∃ b, b ∈ u ∧ Set.Nonempty (B a ∩ B b) ∧ r a ≤ 2 * r b\nut : u ⊆ t\nu_count : Set.Countable u\nx : α\nx✝ : x ∈ s \\ ⋃ (a : ι) (_ : a ∈ u), B a\nv : Set ι := {a | a ∈ u ∧ Set.Nonempty (B a ∩ ball x (R x))}\nvu : v ⊆ u\nK : ℝ\nμK : ↑↑μ (closedBall x K) < ⊤\nhK : ∀ (a : ι), a ∈ u → Set.Nonempty (B a ∩ ball x (R x)) → B a ⊆ closedBall x K\nε : ℝ≥0∞\nεpos : 0 < ε\nI : ∑' (a : ↑v), ↑↑μ (B ↑a) < ⊤\nw : Finset ↑v\nhw : ∑' (a : { a // ¬a ∈ w }), ↑↑μ (B ↑↑a) < ε / ↑C\nM : (s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x) ⊆ ⋃ (a : { a // ¬a ∈ w }), closedBall (c ↑↑a) (3 * r ↑↑a)\nthis : Encodable ↑v\n⊢ ↑↑μ ((s \\ ⋃ (a : ι) (_ : a ∈ u), B a) ∩ ball x (R x)) ≤ ε\n[PROOFSTEP]\ncalc\n  μ ((s \\ ⋃ a ∈ u, B a) ∩ ball x (R x)) ≤ μ (⋃ a : { a // a ∉ w }, closedBall (c a) (3 * r a)) := measure_mono M\n  _ ≤ ∑' a : { a // a ∉ w }, μ (closedBall (c a) (3 * r a)) := (measure_iUnion_le _)\n  _ ≤ ∑' a : { a // a ∉ w }, C * μ (B a) := (ENNReal.tsum_le_tsum fun a => μB a (ut (vu a.1.2)))\n  _ = C * ∑' a : { a // a ∉ w }, μ (B a) := ENNReal.tsum_mul_left\n  _ ≤ C * (ε / C) := (mul_le_mul_left' hw.le _)\n  _ ≤ ε := ENNReal.mul_div_le\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\nx : α\nε : ℝ\nεpos : ε > 0\n⊢ ∃ y,\n    y ∈\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x ∧\n      y ⊆ closedBall x ε\n[PROOFSTEP]\nobtain ⟨r, μr, rpos, rε⟩ : ∃ r, μ (closedBall x (3 * r)) ≤ C * μ (closedBall x r) ∧ r ∈ Ioc (0 : ℝ) ε :=\n  ((h x).and_eventually (Ioc_mem_nhdsWithin_Ioi ⟨le_rfl, εpos⟩)).exists\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\nx : α\nε : ℝ\nεpos : ε > 0\nr : ℝ\nμr : ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\nrpos : 0 < r\nrε : r ≤ ε\n⊢ ∃ y,\n    y ∈\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x ∧\n      y ⊆ closedBall x ε\n[PROOFSTEP]\nrefine' ⟨closedBall x r, ⟨isClosed_ball, _, ⟨r, Subset.rfl, μr⟩⟩, closedBall_subset_closedBall rε⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\nx : α\nε : ℝ\nεpos : ε > 0\nr : ℝ\nμr : ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\nrpos : 0 < r\nrε : r ≤ ε\n⊢ Set.Nonempty (interior (closedBall x r))\n[PROOFSTEP]\nexact (nonempty_ball.2 rpos).mono ball_subset_interior_closedBall\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\n⊢ ∀ (s : Set α) (f : α → Set (Set α)),\n    (∀ (x : α),\n        x ∈ s →\n          f x ⊆\n            (fun x =>\n                {a |\n                  IsClosed a ∧\n                    Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n              x) →\n      (∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε) →\n        ∃ t,\n          (∀ (p : α × Set α), p ∈ t → p.fst ∈ s) ∧\n            (PairwiseDisjoint t fun p => p.snd) ∧\n              (∀ (p : α × Set α), p ∈ t → p.snd ∈ f p.fst) ∧ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ t), p.snd) = 0\n[PROOFSTEP]\nintro s f fsubset ffine\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\n⊢ ∃ t,\n    (∀ (p : α × Set α), p ∈ t → p.fst ∈ s) ∧\n      (PairwiseDisjoint t fun p => p.snd) ∧\n        (∀ (p : α × Set α), p ∈ t → p.snd ∈ f p.fst) ∧ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ t), p.snd) = 0\n[PROOFSTEP]\nlet t : Set (ℝ × α × Set α) :=\n  {p |\n    p.2.2 ⊆ closedBall p.2.1 p.1 ∧\n      μ (closedBall p.2.1 (3 * p.1)) ≤ C * μ p.2.2 ∧\n        (interior p.2.2).Nonempty ∧ IsClosed p.2.2 ∧ p.2.2 ∈ f p.2.1 ∧ p.2.1 ∈ s}\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\n⊢ ∃ t,\n    (∀ (p : α × Set α), p ∈ t → p.fst ∈ s) ∧\n      (PairwiseDisjoint t fun p => p.snd) ∧\n        (∀ (p : α × Set α), p ∈ t → p.snd ∈ f p.fst) ∧ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ t), p.snd) = 0\n[PROOFSTEP]\nhave A : ∀ x ∈ s, ∀ ε : ℝ, ε > 0 → ∃ p, p ∈ t ∧ p.1 ≤ ε ∧ p.2.1 = x :=\n  by\n  intro x xs ε εpos\n  rcases ffine x xs ε εpos with ⟨a, ha, h'a⟩\n  rcases fsubset x xs ha with ⟨a_closed, a_int, ⟨r, ar, μr⟩⟩\n  refine' ⟨⟨min r ε, x, a⟩, ⟨_, _, a_int, a_closed, ha, xs⟩, min_le_right _ _, rfl⟩\n  · rcases min_cases r ε with (h' | h') <;> rwa [h'.1]\n  · apply le_trans (measure_mono (closedBall_subset_closedBall _)) μr\n    exact mul_le_mul_of_nonneg_left (min_le_left _ _) zero_le_three\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\n⊢ ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\n[PROOFSTEP]\nintro x xs ε εpos\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nx : α\nxs : x ∈ s\nε : ℝ\nεpos : ε > 0\n⊢ ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\n[PROOFSTEP]\nrcases ffine x xs ε εpos with ⟨a, ha, h'a⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nx : α\nxs : x ∈ s\nε : ℝ\nεpos : ε > 0\na : Set α\nha : a ∈ f x\nh'a : a ⊆ closedBall x ε\n⊢ ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\n[PROOFSTEP]\nrcases fsubset x xs ha with ⟨a_closed, a_int, ⟨r, ar, μr⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nx : α\nxs : x ∈ s\nε : ℝ\nεpos : ε > 0\na : Set α\nha : a ∈ f x\nh'a : a ⊆ closedBall x ε\na_closed : IsClosed a\na_int : Set.Nonempty (interior a)\nr : ℝ\nar : a ⊆ closedBall x r\nμr : ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a\n⊢ ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\n[PROOFSTEP]\nrefine' ⟨⟨min r ε, x, a⟩, ⟨_, _, a_int, a_closed, ha, xs⟩, min_le_right _ _, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nx : α\nxs : x ∈ s\nε : ℝ\nεpos : ε > 0\na : Set α\nha : a ∈ f x\nh'a : a ⊆ closedBall x ε\na_closed : IsClosed a\na_int : Set.Nonempty (interior a)\nr : ℝ\nar : a ⊆ closedBall x r\nμr : ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a\n⊢ (min r ε, x, a).snd.snd ⊆ closedBall (min r ε, x, a).snd.fst (min r ε, x, a).fst\n[PROOFSTEP]\nrcases min_cases r ε with (h' | h')\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1.inl\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nx : α\nxs : x ∈ s\nε : ℝ\nεpos : ε > 0\na : Set α\nha : a ∈ f x\nh'a : a ⊆ closedBall x ε\na_closed : IsClosed a\na_int : Set.Nonempty (interior a)\nr : ℝ\nar : a ⊆ closedBall x r\nμr : ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a\nh' : min r ε = r ∧ r ≤ ε\n⊢ (min r ε, x, a).snd.snd ⊆ closedBall (min r ε, x, a).snd.fst (min r ε, x, a).fst\n[PROOFSTEP]\nrwa [h'.1]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1.inr\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nx : α\nxs : x ∈ s\nε : ℝ\nεpos : ε > 0\na : Set α\nha : a ∈ f x\nh'a : a ⊆ closedBall x ε\na_closed : IsClosed a\na_int : Set.Nonempty (interior a)\nr : ℝ\nar : a ⊆ closedBall x r\nμr : ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a\nh' : min r ε = ε ∧ ε < r\n⊢ (min r ε, x, a).snd.snd ⊆ closedBall (min r ε, x, a).snd.fst (min r ε, x, a).fst\n[PROOFSTEP]\nrwa [h'.1]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nx : α\nxs : x ∈ s\nε : ℝ\nεpos : ε > 0\na : Set α\nha : a ∈ f x\nh'a : a ⊆ closedBall x ε\na_closed : IsClosed a\na_int : Set.Nonempty (interior a)\nr : ℝ\nar : a ⊆ closedBall x r\nμr : ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a\n⊢ ↑↑μ (closedBall (min r ε, x, a).snd.fst (3 * (min r ε, x, a).fst)) ≤ ↑C * ↑↑μ (min r ε, x, a).snd.snd\n[PROOFSTEP]\napply le_trans (measure_mono (closedBall_subset_closedBall _)) μr\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nx : α\nxs : x ∈ s\nε : ℝ\nεpos : ε > 0\na : Set α\nha : a ∈ f x\nh'a : a ⊆ closedBall x ε\na_closed : IsClosed a\na_int : Set.Nonempty (interior a)\nr : ℝ\nar : a ⊆ closedBall x r\nμr : ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a\n⊢ 3 * (min r ε, x, a).fst ≤ 3 * r\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left (min_le_left _ _) zero_le_three\n[GOAL]\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nA : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\n⊢ ∃ t,\n    (∀ (p : α × Set α), p ∈ t → p.fst ∈ s) ∧\n      (PairwiseDisjoint t fun p => p.snd) ∧\n        (∀ (p : α × Set α), p ∈ t → p.snd ∈ f p.fst) ∧ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ t), p.snd) = 0\n[PROOFSTEP]\nrcases exists_disjoint_covering_ae μ s t C (fun p => p.1) (fun p => p.2.1) (fun p => p.2.2) (fun p hp => hp.1)\n    (fun p hp => hp.2.1) (fun p hp => hp.2.2.1) (fun p hp => hp.2.2.2.1) A with\n  ⟨t', t't, _, t'_disj, μt'⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nA : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\nt' : Set (ℝ × α × Set α)\nt't : t' ⊆ t\nleft✝ : Set.Countable t'\nt'_disj : PairwiseDisjoint t' fun p => p.snd.snd\nμt' : ↑↑μ (s \\ ⋃ (a : ℝ × α × Set α) (_ : a ∈ t'), a.snd.snd) = 0\n⊢ ∃ t,\n    (∀ (p : α × Set α), p ∈ t → p.fst ∈ s) ∧\n      (PairwiseDisjoint t fun p => p.snd) ∧\n        (∀ (p : α × Set α), p ∈ t → p.snd ∈ f p.fst) ∧ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ t), p.snd) = 0\n[PROOFSTEP]\nrefine' ⟨(fun p : ℝ × α × Set α => p.2) '' t', _, _, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nA : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\nt' : Set (ℝ × α × Set α)\nt't : t' ⊆ t\nleft✝ : Set.Countable t'\nt'_disj : PairwiseDisjoint t' fun p => p.snd.snd\nμt' : ↑↑μ (s \\ ⋃ (a : ℝ × α × Set α) (_ : a ∈ t'), a.snd.snd) = 0\n⊢ ∀ (p : α × Set α), p ∈ (fun p => p.snd) '' t' → p.fst ∈ s\n[PROOFSTEP]\nrintro - ⟨q, hq, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nA : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\nt' : Set (ℝ × α × Set α)\nt't : t' ⊆ t\nleft✝ : Set.Countable t'\nt'_disj : PairwiseDisjoint t' fun p => p.snd.snd\nμt' : ↑↑μ (s \\ ⋃ (a : ℝ × α × Set α) (_ : a ∈ t'), a.snd.snd) = 0\nq : ℝ × α × Set α\nhq : q ∈ t'\n⊢ ((fun p => p.snd) q).fst ∈ s\n[PROOFSTEP]\nexact (t't hq).2.2.2.2.2\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nA : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\nt' : Set (ℝ × α × Set α)\nt't : t' ⊆ t\nleft✝ : Set.Countable t'\nt'_disj : PairwiseDisjoint t' fun p => p.snd.snd\nμt' : ↑↑μ (s \\ ⋃ (a : ℝ × α × Set α) (_ : a ∈ t'), a.snd.snd) = 0\n⊢ PairwiseDisjoint ((fun p => p.snd) '' t') fun p => p.snd\n[PROOFSTEP]\nrintro p ⟨q, hq, rfl⟩ p' ⟨q', hq', rfl⟩ hqq'\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nA : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\nt' : Set (ℝ × α × Set α)\nt't : t' ⊆ t\nleft✝ : Set.Countable t'\nt'_disj : PairwiseDisjoint t' fun p => p.snd.snd\nμt' : ↑↑μ (s \\ ⋃ (a : ℝ × α × Set α) (_ : a ∈ t'), a.snd.snd) = 0\nq : ℝ × α × Set α\nhq : q ∈ t'\nq' : ℝ × α × Set α\nhq' : q' ∈ t'\nhqq' : (fun p => p.snd) q ≠ (fun p => p.snd) q'\n⊢ (Disjoint on fun p => p.snd) ((fun p => p.snd) q) ((fun p => p.snd) q')\n[PROOFSTEP]\nexact t'_disj hq hq' (ne_of_apply_ne _ hqq')\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nA : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\nt' : Set (ℝ × α × Set α)\nt't : t' ⊆ t\nleft✝ : Set.Countable t'\nt'_disj : PairwiseDisjoint t' fun p => p.snd.snd\nμt' : ↑↑μ (s \\ ⋃ (a : ℝ × α × Set α) (_ : a ∈ t'), a.snd.snd) = 0\n⊢ ∀ (p : α × Set α), p ∈ (fun p => p.snd) '' t' → p.snd ∈ f p.fst\n[PROOFSTEP]\nrintro - ⟨q, hq, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_3.intro.intro\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nA : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\nt' : Set (ℝ × α × Set α)\nt't : t' ⊆ t\nleft✝ : Set.Countable t'\nt'_disj : PairwiseDisjoint t' fun p => p.snd.snd\nμt' : ↑↑μ (s \\ ⋃ (a : ℝ × α × Set α) (_ : a ∈ t'), a.snd.snd) = 0\nq : ℝ × α × Set α\nhq : q ∈ t'\n⊢ ((fun p => p.snd) q).snd ∈ f ((fun p => p.snd) q).fst\n[PROOFSTEP]\nexact (t't hq).2.2.2.2.1\n[GOAL]\ncase intro.intro.intro.intro.refine'_4\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nA : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\nt' : Set (ℝ × α × Set α)\nt't : t' ⊆ t\nleft✝ : Set.Countable t'\nt'_disj : PairwiseDisjoint t' fun p => p.snd.snd\nμt' : ↑↑μ (s \\ ⋃ (a : ℝ × α × Set α) (_ : a ∈ t'), a.snd.snd) = 0\n⊢ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ (fun p => p.snd) '' t'), p.snd) = 0\n[PROOFSTEP]\nconvert μt' using 3\n[GOAL]\ncase h.e'_2.h.e'_3.h.e'_4\nα : Type u_1\nι : Type u_2\ninst✝⁴ : MetricSpace α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : SecondCountableTopology α\nμ : Measure α\ninst✝ : IsLocallyFiniteMeasure μ\nC : ℝ≥0\nh : ∀ (x : α), ∃ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ (closedBall x r)\ns : Set α\nf : α → Set (Set α)\nfsubset :\n  ∀ (x : α),\n    x ∈ s →\n      f x ⊆\n        (fun x =>\n            {a |\n              IsClosed a ∧\n                Set.Nonempty (interior a) ∧ ∃ r, a ⊆ closedBall x r ∧ ↑↑μ (closedBall x (3 * r)) ≤ ↑C * ↑↑μ a})\n          x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\nt : Set (ℝ × α × Set α) :=\n  {p |\n    p.snd.snd ⊆ closedBall p.snd.fst p.fst ∧\n      ↑↑μ (closedBall p.snd.fst (3 * p.fst)) ≤ ↑C * ↑↑μ p.snd.snd ∧\n        Set.Nonempty (interior p.snd.snd) ∧ IsClosed p.snd.snd ∧ p.snd.snd ∈ f p.snd.fst ∧ p.snd.fst ∈ s}\nA : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ p, p ∈ t ∧ p.fst ≤ ε ∧ p.snd.fst = x\nt' : Set (ℝ × α × Set α)\nt't : t' ⊆ t\nleft✝ : Set.Countable t'\nt'_disj : PairwiseDisjoint t' fun p => p.snd.snd\nμt' : ↑↑μ (s \\ ⋃ (a : ℝ × α × Set α) (_ : a ∈ t'), a.snd.snd) = 0\n⊢ ⋃ (p : α × Set α) (_ : p ∈ (fun p => p.snd) '' t'), p.snd = ⋃ (a : ℝ × α × Set α) (_ : a ∈ t'), a.snd.snd\n[PROOFSTEP]\nrw [biUnion_image]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Covering.Vitali", "llama_tokens": 151923, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7371581626286833, "lm_q2_score": 0.49218813572079556, "lm_q1q2_score": 0.3628205017955787}}
{"text": "[GOAL]\nα β : SemilatSupCat\ne : α.X ≃o β.X\n⊢ { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : α.X), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n        map_bot' := (_ : ↑e ⊥ = ⊥) } ≫\n      {\n        toSupHom :=\n          { toFun := ↑(OrderIso.symm e),\n            map_sup' := (_ : ∀ (a b : β.X), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n        map_bot' := (_ : ↑(OrderIso.symm e) ⊥ = ⊥) } =\n    𝟙 α\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : SemilatSupCat\ne : α.X ≃o β.X\nx✝ : (forget SemilatSupCat).obj α\n⊢ ↑({ toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : α.X), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n            map_bot' := (_ : ↑e ⊥ = ⊥) } ≫\n          {\n            toSupHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_sup' :=\n                  (_ : ∀ (a b : β.X), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n            map_bot' := (_ : ↑(OrderIso.symm e) ⊥ = ⊥) })\n      x✝ =\n    ↑(𝟙 α) x✝\n[PROOFSTEP]\nexact e.symm_apply_apply _\n[GOAL]\nα β : SemilatSupCat\ne : α.X ≃o β.X\n⊢ {\n        toSupHom :=\n          { toFun := ↑(OrderIso.symm e),\n            map_sup' := (_ : ∀ (a b : β.X), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n        map_bot' := (_ : ↑(OrderIso.symm e) ⊥ = ⊥) } ≫\n      { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : α.X), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n        map_bot' := (_ : ↑e ⊥ = ⊥) } =\n    𝟙 β\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : SemilatSupCat\ne : α.X ≃o β.X\nx✝ : (forget SemilatSupCat).obj β\n⊢ ↑({\n            toSupHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_sup' :=\n                  (_ : ∀ (a b : β.X), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n            map_bot' := (_ : ↑(OrderIso.symm e) ⊥ = ⊥) } ≫\n          { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : α.X), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n            map_bot' := (_ : ↑e ⊥ = ⊥) })\n      x✝ =\n    ↑(𝟙 β) x✝\n[PROOFSTEP]\nexact e.apply_symm_apply _\n[GOAL]\nα β : SemilatInfCat\ne : α.X ≃o β.X\n⊢ { toInfHom := { toFun := ↑e, map_inf' := (_ : ∀ (a b : α.X), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) },\n        map_top' := (_ : ↑e ⊤ = ⊤) } ≫\n      {\n        toInfHom :=\n          { toFun := ↑(OrderIso.symm e),\n            map_inf' := (_ : ∀ (a b : β.X), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) },\n        map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤) } =\n    𝟙 α\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : SemilatInfCat\ne : α.X ≃o β.X\nx✝ : (forget SemilatInfCat).obj α\n⊢ ↑({ toInfHom := { toFun := ↑e, map_inf' := (_ : ∀ (a b : α.X), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) },\n            map_top' := (_ : ↑e ⊤ = ⊤) } ≫\n          {\n            toInfHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_inf' :=\n                  (_ : ∀ (a b : β.X), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) },\n            map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤) })\n      x✝ =\n    ↑(𝟙 α) x✝\n[PROOFSTEP]\nexact e.symm_apply_apply _\n[GOAL]\nα β : SemilatInfCat\ne : α.X ≃o β.X\n⊢ {\n        toInfHom :=\n          { toFun := ↑(OrderIso.symm e),\n            map_inf' := (_ : ∀ (a b : β.X), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) },\n        map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤) } ≫\n      { toInfHom := { toFun := ↑e, map_inf' := (_ : ∀ (a b : α.X), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) },\n        map_top' := (_ : ↑e ⊤ = ⊤) } =\n    𝟙 β\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : SemilatInfCat\ne : α.X ≃o β.X\nx✝ : (forget SemilatInfCat).obj β\n⊢ ↑({\n            toInfHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_inf' :=\n                  (_ : ∀ (a b : β.X), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) },\n            map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤) } ≫\n          { toInfHom := { toFun := ↑e, map_inf' := (_ : ∀ (a b : α.X), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) },\n            map_top' := (_ : ↑e ⊤ = ⊤) })\n      x✝ =\n    ↑(𝟙 β) x✝\n[PROOFSTEP]\nexact e.apply_symm_apply _\n", "meta": {"mathlib_filename": "Mathlib.Order.Category.SemilatCat", "llama_tokens": 2188, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6825737473266735, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.3625895725987789}}
{"text": "[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : SupSet α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nh : sSup (Subtype.val '' t) ∈ s\n⊢ sSup (Subtype.val '' t) = ↑(sSup t)\n[PROOFSTEP]\nsimp [dif_pos h]\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : InfSet α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nh : sInf (Subtype.val '' t) ∈ s\n⊢ sInf (Subtype.val '' t) = ↑(sInf t)\n[PROOFSTEP]\nsimp [dif_pos h]\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\n⊢ sSup t = sSup univ\n[PROOFSTEP]\nhave A : ∀ (u : Set s), ¬BddAbove u → BddAbove (Subtype.val '' u) → sSup ((↑) '' u : Set α) ∉ s :=\n  by\n  intro u hu Hu\n  contrapose! hu\n  refine ⟨⟨_, hu⟩, ?_⟩\n  rintro ⟨x, xs⟩ hx\n  simp only [Subtype.mk_le_mk]\n  apply le_csSup Hu\n  exact ⟨⟨x, xs⟩, hx, rfl⟩\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\n⊢ ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\n[PROOFSTEP]\nintro u hu Hu\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nu : Set ↑s\nhu : ¬BddAbove u\nHu : BddAbove (Subtype.val '' u)\n⊢ ¬sSup (Subtype.val '' u) ∈ s\n[PROOFSTEP]\ncontrapose! hu\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nu : Set ↑s\nHu : BddAbove (Subtype.val '' u)\nhu : sSup (Subtype.val '' u) ∈ s\n⊢ BddAbove u\n[PROOFSTEP]\nrefine ⟨⟨_, hu⟩, ?_⟩\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nu : Set ↑s\nHu : BddAbove (Subtype.val '' u)\nhu : sSup (Subtype.val '' u) ∈ s\n⊢ { val := sSup (Subtype.val '' u), property := hu } ∈ upperBounds u\n[PROOFSTEP]\nrintro ⟨x, xs⟩ hx\n[GOAL]\ncase mk\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nu : Set ↑s\nHu : BddAbove (Subtype.val '' u)\nhu : sSup (Subtype.val '' u) ∈ s\nx : α\nxs : x ∈ s\nhx : { val := x, property := xs } ∈ u\n⊢ { val := x, property := xs } ≤ { val := sSup (Subtype.val '' u), property := hu }\n[PROOFSTEP]\nsimp only [Subtype.mk_le_mk]\n[GOAL]\ncase mk\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nu : Set ↑s\nHu : BddAbove (Subtype.val '' u)\nhu : sSup (Subtype.val '' u) ∈ s\nx : α\nxs : x ∈ s\nhx : { val := x, property := xs } ∈ u\n⊢ x ≤ sSup (Subtype.val '' u)\n[PROOFSTEP]\napply le_csSup Hu\n[GOAL]\ncase mk\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nu : Set ↑s\nHu : BddAbove (Subtype.val '' u)\nhu : sSup (Subtype.val '' u) ∈ s\nx : α\nxs : x ∈ s\nhx : { val := x, property := xs } ∈ u\n⊢ x ∈ Subtype.val '' u\n[PROOFSTEP]\nexact ⟨⟨x, xs⟩, hx, rfl⟩\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\n⊢ sSup t = sSup univ\n[PROOFSTEP]\nby_cases Ht : BddAbove ((↑) '' t : Set α)\n[GOAL]\ncase pos\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\n⊢ sSup t = sSup univ\n[PROOFSTEP]\nhave I1 : sSup ((↑) '' t : Set α) ∉ s := A t ht Ht\n[GOAL]\ncase pos\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\n⊢ sSup t = sSup univ\n[PROOFSTEP]\nhave I2 : sSup ((↑) '' (univ : Set s) : Set α) ∉ s := by\n  apply A\n  · contrapose! ht; exact ht.mono (subset_univ _)\n  · refine ⟨sSup ((↑) '' t : Set α), ?_⟩\n    rintro - ⟨⟨x, hx⟩, -, rfl⟩\n    simp [BddAbove, not_nonempty_iff_eq_empty] at ht \n    have : ⟨x, hx⟩ ∉ upperBounds t := by simp [ht]\n    obtain ⟨⟨y, ys⟩, yt, hy⟩ : ∃ y, y ∈ t ∧ { val := x, property := hx } < y := by\n      simpa only [Subtype.mk_le_mk, not_forall, not_le, exists_prop, exists_and_right, mem_upperBounds]\n    refine le_trans (le_of_lt hy) ?_\n    exact le_csSup Ht ⟨⟨y, ys⟩, yt, rfl⟩\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\n⊢ ¬sSup (Subtype.val '' univ) ∈ s\n[PROOFSTEP]\napply A\n[GOAL]\ncase a\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\n⊢ ¬BddAbove univ\n[PROOFSTEP]\ncontrapose! ht\n[GOAL]\ncase a\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\nht : BddAbove univ\n⊢ BddAbove t\n[PROOFSTEP]\nexact ht.mono (subset_univ _)\n[GOAL]\ncase a\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\n⊢ BddAbove (Subtype.val '' univ)\n[PROOFSTEP]\nrefine ⟨sSup ((↑) '' t : Set α), ?_⟩\n[GOAL]\ncase a\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\n⊢ sSup (Subtype.val '' t) ∈ upperBounds (Subtype.val '' univ)\n[PROOFSTEP]\nrintro - ⟨⟨x, hx⟩, -, rfl⟩\n[GOAL]\ncase a.intro.mk.intro\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\nx : α\nhx : x ∈ s\n⊢ ↑{ val := x, property := hx } ≤ sSup (Subtype.val '' t)\n[PROOFSTEP]\nsimp [BddAbove, not_nonempty_iff_eq_empty] at ht \n[GOAL]\ncase a.intro.mk.intro\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\nx : α\nhx : x ∈ s\nht : upperBounds t = ∅\n⊢ ↑{ val := x, property := hx } ≤ sSup (Subtype.val '' t)\n[PROOFSTEP]\nhave : ⟨x, hx⟩ ∉ upperBounds t := by simp [ht]\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\nx : α\nhx : x ∈ s\nht : upperBounds t = ∅\n⊢ ¬{ val := x, property := hx } ∈ upperBounds t\n[PROOFSTEP]\nsimp [ht]\n[GOAL]\ncase a.intro.mk.intro\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\nx : α\nhx : x ∈ s\nht : upperBounds t = ∅\nthis : ¬{ val := x, property := hx } ∈ upperBounds t\n⊢ ↑{ val := x, property := hx } ≤ sSup (Subtype.val '' t)\n[PROOFSTEP]\nobtain ⟨⟨y, ys⟩, yt, hy⟩ : ∃ y, y ∈ t ∧ { val := x, property := hx } < y := by\n  simpa only [Subtype.mk_le_mk, not_forall, not_le, exists_prop, exists_and_right, mem_upperBounds]\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\nx : α\nhx : x ∈ s\nht : upperBounds t = ∅\nthis : ¬{ val := x, property := hx } ∈ upperBounds t\n⊢ ∃ y, y ∈ t ∧ { val := x, property := hx } < y\n[PROOFSTEP]\nsimpa only [Subtype.mk_le_mk, not_forall, not_le, exists_prop, exists_and_right, mem_upperBounds]\n[GOAL]\ncase a.intro.mk.intro.intro.mk.intro\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\nx : α\nhx : x ∈ s\nht : upperBounds t = ∅\nthis : ¬{ val := x, property := hx } ∈ upperBounds t\ny : α\nys : y ∈ s\nyt : { val := y, property := ys } ∈ t\nhy : { val := x, property := hx } < { val := y, property := ys }\n⊢ ↑{ val := x, property := hx } ≤ sSup (Subtype.val '' t)\n[PROOFSTEP]\nrefine le_trans (le_of_lt hy) ?_\n[GOAL]\ncase a.intro.mk.intro.intro.mk.intro\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\nx : α\nhx : x ∈ s\nht : upperBounds t = ∅\nthis : ¬{ val := x, property := hx } ∈ upperBounds t\ny : α\nys : y ∈ s\nyt : { val := y, property := ys } ∈ t\nhy : { val := x, property := hx } < { val := y, property := ys }\n⊢ ↑{ val := y, property := ys } ≤ sSup (Subtype.val '' t)\n[PROOFSTEP]\nexact le_csSup Ht ⟨⟨y, ys⟩, yt, rfl⟩\n[GOAL]\ncase pos\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' t)\nI1 : ¬sSup (Subtype.val '' t) ∈ s\nI2 : ¬sSup (Subtype.val '' univ) ∈ s\n⊢ sSup t = sSup univ\n[PROOFSTEP]\nsimp only [sSup, I1, I2, dite_false]\n[GOAL]\ncase neg\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : ¬BddAbove (Subtype.val '' t)\n⊢ sSup t = sSup univ\n[PROOFSTEP]\nhave I : ¬BddAbove ((↑) '' (univ : Set s) : Set α) := by contrapose! Ht;\n  exact Ht.mono (image_subset Subtype.val (subset_univ _))\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : ¬BddAbove (Subtype.val '' t)\n⊢ ¬BddAbove (Subtype.val '' univ)\n[PROOFSTEP]\ncontrapose! Ht\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : BddAbove (Subtype.val '' univ)\n⊢ BddAbove (Subtype.val '' t)\n[PROOFSTEP]\nexact Ht.mono (image_subset Subtype.val (subset_univ _))\n[GOAL]\ncase neg\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : ¬BddAbove (Subtype.val '' t)\nI : ¬BddAbove (Subtype.val '' univ)\n⊢ sSup t = sSup univ\n[PROOFSTEP]\nhave X : sSup ((↑) '' t : Set α) = sSup (univ : Set α) := ConditionallyCompleteLinearOrder.csSup_of_not_bddAbove _ Ht\n[GOAL]\ncase neg\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : ¬BddAbove (Subtype.val '' t)\nI : ¬BddAbove (Subtype.val '' univ)\nX : sSup (Subtype.val '' t) = sSup univ\n⊢ sSup t = sSup univ\n[PROOFSTEP]\nhave Y : sSup ((↑) '' (univ : Set s) : Set α) = sSup (univ : Set α) :=\n  ConditionallyCompleteLinearOrder.csSup_of_not_bddAbove _ I\n[GOAL]\ncase neg\nα : Type u_1\ns✝ : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ns : Set α\ninst✝ : Inhabited ↑s\nt : Set ↑s\nht : ¬BddAbove t\nA : ∀ (u : Set ↑s), ¬BddAbove u → BddAbove (Subtype.val '' u) → ¬sSup (Subtype.val '' u) ∈ s\nHt : ¬BddAbove (Subtype.val '' t)\nI : ¬BddAbove (Subtype.val '' univ)\nX : sSup (Subtype.val '' t) = sSup univ\nY : sSup (Subtype.val '' univ) = sSup univ\n⊢ sSup t = sSup univ\n[PROOFSTEP]\nsimp only [sSup, X, Y]\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ninst✝ : Inhabited ↑s\nh_Sup : ∀ {t : Set ↑s}, Set.Nonempty t → BddAbove t → sSup (Subtype.val '' t) ∈ s\nh_Inf : ∀ {t : Set ↑s}, Set.Nonempty t → BddBelow t → sInf (Subtype.val '' t) ∈ s\nsrc✝³ : SupSet ↑s := subsetSupSet s\nsrc✝² : InfSet ↑s := subsetInfSet s\nsrc✝¹ : Lattice ↑s := DistribLattice.toLattice\nsrc✝ : LinearOrder ↑s := inferInstance\n⊢ ∀ (s_1 : Set ↑s) (a : ↑s), BddAbove s_1 → a ∈ s_1 → a ≤ sSup s_1\n[PROOFSTEP]\nrintro t c h_bdd hct\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ninst✝ : Inhabited ↑s\nh_Sup : ∀ {t : Set ↑s}, Set.Nonempty t → BddAbove t → sSup (Subtype.val '' t) ∈ s\nh_Inf : ∀ {t : Set ↑s}, Set.Nonempty t → BddBelow t → sInf (Subtype.val '' t) ∈ s\nsrc✝³ : SupSet ↑s := subsetSupSet s\nsrc✝² : InfSet ↑s := subsetInfSet s\nsrc✝¹ : Lattice ↑s := DistribLattice.toLattice\nsrc✝ : LinearOrder ↑s := inferInstance\nt : Set ↑s\nc : ↑s\nh_bdd : BddAbove t\nhct : c ∈ t\n⊢ c ≤ sSup t\n[PROOFSTEP]\nrw [← Subtype.coe_le_coe, ← subset_sSup_of_within s (h_Sup ⟨c, hct⟩ h_bdd)]\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ninst✝ : Inhabited ↑s\nh_Sup : ∀ {t : Set ↑s}, Set.Nonempty t → BddAbove t → sSup (Subtype.val '' t) ∈ s\nh_Inf : ∀ {t : Set ↑s}, Set.Nonempty t → BddBelow t → sInf (Subtype.val '' t) ∈ s\nsrc✝³ : SupSet ↑s := subsetSupSet s\nsrc✝² : InfSet ↑s := subsetInfSet s\nsrc✝¹ : Lattice ↑s := DistribLattice.toLattice\nsrc✝ : LinearOrder ↑s := inferInstance\nt : Set ↑s\nc : ↑s\nh_bdd : BddAbove t\nhct : c ∈ t\n⊢ ↑c ≤ sSup (Subtype.val '' t)\n[PROOFSTEP]\nexact (Subtype.mono_coe _).le_csSup_image hct h_bdd\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ninst✝ : Inhabited ↑s\nh_Sup : ∀ {t : Set ↑s}, Set.Nonempty t → BddAbove t → sSup (Subtype.val '' t) ∈ s\nh_Inf : ∀ {t : Set ↑s}, Set.Nonempty t → BddBelow t → sInf (Subtype.val '' t) ∈ s\nsrc✝³ : SupSet ↑s := subsetSupSet s\nsrc✝² : InfSet ↑s := subsetInfSet s\nsrc✝¹ : Lattice ↑s := DistribLattice.toLattice\nsrc✝ : LinearOrder ↑s := inferInstance\n⊢ ∀ (s_1 : Set ↑s) (a : ↑s), Set.Nonempty s_1 → a ∈ upperBounds s_1 → sSup s_1 ≤ a\n[PROOFSTEP]\nrintro t B ht hB\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ninst✝ : Inhabited ↑s\nh_Sup : ∀ {t : Set ↑s}, Set.Nonempty t → BddAbove t → sSup (Subtype.val '' t) ∈ s\nh_Inf : ∀ {t : Set ↑s}, Set.Nonempty t → BddBelow t → sInf (Subtype.val '' t) ∈ s\nsrc✝³ : SupSet ↑s := subsetSupSet s\nsrc✝² : InfSet ↑s := subsetInfSet s\nsrc✝¹ : Lattice ↑s := DistribLattice.toLattice\nsrc✝ : LinearOrder ↑s := inferInstance\nt : Set ↑s\nB : ↑s\nht : Set.Nonempty t\nhB : B ∈ upperBounds t\n⊢ sSup t ≤ B\n[PROOFSTEP]\nrw [← Subtype.coe_le_coe, ← subset_sSup_of_within s (h_Sup ht ⟨B, hB⟩)]\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ninst✝ : Inhabited ↑s\nh_Sup : ∀ {t : Set ↑s}, Set.Nonempty t → BddAbove t → sSup (Subtype.val '' t) ∈ s\nh_Inf : ∀ {t : Set ↑s}, Set.Nonempty t → BddBelow t → sInf (Subtype.val '' t) ∈ s\nsrc✝³ : SupSet ↑s := subsetSupSet s\nsrc✝² : InfSet ↑s := subsetInfSet s\nsrc✝¹ : Lattice ↑s := DistribLattice.toLattice\nsrc✝ : LinearOrder ↑s := inferInstance\nt : Set ↑s\nB : ↑s\nht : Set.Nonempty t\nhB : B ∈ upperBounds t\n⊢ sSup (Subtype.val '' t) ≤ ↑B\n[PROOFSTEP]\nexact (Subtype.mono_coe s).csSup_image_le ht hB\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ninst✝ : Inhabited ↑s\nh_Sup : ∀ {t : Set ↑s}, Set.Nonempty t → BddAbove t → sSup (Subtype.val '' t) ∈ s\nh_Inf : ∀ {t : Set ↑s}, Set.Nonempty t → BddBelow t → sInf (Subtype.val '' t) ∈ s\nsrc✝³ : SupSet ↑s := subsetSupSet s\nsrc✝² : InfSet ↑s := subsetInfSet s\nsrc✝¹ : Lattice ↑s := DistribLattice.toLattice\nsrc✝ : LinearOrder ↑s := inferInstance\n⊢ ∀ (s_1 : Set ↑s) (a : ↑s), BddBelow s_1 → a ∈ s_1 → sInf s_1 ≤ a\n[PROOFSTEP]\nrintro t c h_bdd hct\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ninst✝ : Inhabited ↑s\nh_Sup : ∀ {t : Set ↑s}, Set.Nonempty t → BddAbove t → sSup (Subtype.val '' t) ∈ s\nh_Inf : ∀ {t : Set ↑s}, Set.Nonempty t → BddBelow t → sInf (Subtype.val '' t) ∈ s\nsrc✝³ : SupSet ↑s := subsetSupSet s\nsrc✝² : InfSet ↑s := subsetInfSet s\nsrc✝¹ : Lattice ↑s := DistribLattice.toLattice\nsrc✝ : LinearOrder ↑s := inferInstance\nt : Set ↑s\nc : ↑s\nh_bdd : BddBelow t\nhct : c ∈ t\n⊢ sInf t ≤ c\n[PROOFSTEP]\nrw [← Subtype.coe_le_coe, ← subset_sInf_of_within s (h_Inf ⟨c, hct⟩ h_bdd)]\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ninst✝ : Inhabited ↑s\nh_Sup : ∀ {t : Set ↑s}, Set.Nonempty t → BddAbove t → sSup (Subtype.val '' t) ∈ s\nh_Inf : ∀ {t : Set ↑s}, Set.Nonempty t → BddBelow t → sInf (Subtype.val '' t) ∈ s\nsrc✝³ : SupSet ↑s := subsetSupSet s\nsrc✝² : InfSet ↑s := subsetInfSet s\nsrc✝¹ : Lattice ↑s := DistribLattice.toLattice\nsrc✝ : LinearOrder ↑s := inferInstance\nt : Set ↑s\nc : ↑s\nh_bdd : BddBelow t\nhct : c ∈ t\n⊢ sInf (Subtype.val '' t) ≤ ↑c\n[PROOFSTEP]\nexact (Subtype.mono_coe s).csInf_image_le hct h_bdd\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ninst✝ : Inhabited ↑s\nh_Sup : ∀ {t : Set ↑s}, Set.Nonempty t → BddAbove t → sSup (Subtype.val '' t) ∈ s\nh_Inf : ∀ {t : Set ↑s}, Set.Nonempty t → BddBelow t → sInf (Subtype.val '' t) ∈ s\nsrc✝³ : SupSet ↑s := subsetSupSet s\nsrc✝² : InfSet ↑s := subsetInfSet s\nsrc✝¹ : Lattice ↑s := DistribLattice.toLattice\nsrc✝ : LinearOrder ↑s := inferInstance\n⊢ ∀ (s_1 : Set ↑s) (a : ↑s), Set.Nonempty s_1 → a ∈ lowerBounds s_1 → a ≤ sInf s_1\n[PROOFSTEP]\nintro t B ht hB\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ninst✝ : Inhabited ↑s\nh_Sup : ∀ {t : Set ↑s}, Set.Nonempty t → BddAbove t → sSup (Subtype.val '' t) ∈ s\nh_Inf : ∀ {t : Set ↑s}, Set.Nonempty t → BddBelow t → sInf (Subtype.val '' t) ∈ s\nsrc✝³ : SupSet ↑s := subsetSupSet s\nsrc✝² : InfSet ↑s := subsetInfSet s\nsrc✝¹ : Lattice ↑s := DistribLattice.toLattice\nsrc✝ : LinearOrder ↑s := inferInstance\nt : Set ↑s\nB : ↑s\nht : Set.Nonempty t\nhB : B ∈ lowerBounds t\n⊢ B ≤ sInf t\n[PROOFSTEP]\nrw [← Subtype.coe_le_coe, ← subset_sInf_of_within s (h_Inf ht ⟨B, hB⟩)]\n[GOAL]\nα : Type u_1\ns : Set α\ninst✝¹ : ConditionallyCompleteLinearOrder α\ninst✝ : Inhabited ↑s\nh_Sup : ∀ {t : Set ↑s}, Set.Nonempty t → BddAbove t → sSup (Subtype.val '' t) ∈ s\nh_Inf : ∀ {t : Set ↑s}, Set.Nonempty t → BddBelow t → sInf (Subtype.val '' t) ∈ s\nsrc✝³ : SupSet ↑s := subsetSupSet s\nsrc✝² : InfSet ↑s := subsetInfSet s\nsrc✝¹ : Lattice ↑s := DistribLattice.toLattice\nsrc✝ : LinearOrder ↑s := inferInstance\nt : Set ↑s\nB : ↑s\nht : Set.Nonempty t\nhB : B ∈ lowerBounds t\n⊢ ↑B ≤ sInf (Subtype.val '' t)\n[PROOFSTEP]\nexact (Subtype.mono_coe s).le_csInf_image ht hB\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝ : ConditionallyCompleteLinearOrder α\ns : Set α\nhs : OrdConnected s\nt : Set ↑s\nht : Set.Nonempty t\nh_bdd : BddAbove t\n⊢ sSup (Subtype.val '' t) ∈ s\n[PROOFSTEP]\nobtain ⟨c, hct⟩ : ∃ c, c ∈ t := ht\n[GOAL]\ncase intro\nα : Type u_1\ns✝ : Set α\ninst✝ : ConditionallyCompleteLinearOrder α\ns : Set α\nhs : OrdConnected s\nt : Set ↑s\nh_bdd : BddAbove t\nc : ↑s\nhct : c ∈ t\n⊢ sSup (Subtype.val '' t) ∈ s\n[PROOFSTEP]\nobtain ⟨B, hB⟩ : ∃ B, B ∈ upperBounds t := h_bdd\n[GOAL]\ncase intro.intro\nα : Type u_1\ns✝ : Set α\ninst✝ : ConditionallyCompleteLinearOrder α\ns : Set α\nhs : OrdConnected s\nt : Set ↑s\nc : ↑s\nhct : c ∈ t\nB : ↑s\nhB : B ∈ upperBounds t\n⊢ sSup (Subtype.val '' t) ∈ s\n[PROOFSTEP]\nrefine' hs.out c.2 B.2 ⟨_, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\ns✝ : Set α\ninst✝ : ConditionallyCompleteLinearOrder α\ns : Set α\nhs : OrdConnected s\nt : Set ↑s\nc : ↑s\nhct : c ∈ t\nB : ↑s\nhB : B ∈ upperBounds t\n⊢ ↑c ≤ sSup (Subtype.val '' t)\n[PROOFSTEP]\nexact (Subtype.mono_coe s).le_csSup_image hct ⟨B, hB⟩\n[GOAL]\ncase intro.intro.refine'_2\nα : Type u_1\ns✝ : Set α\ninst✝ : ConditionallyCompleteLinearOrder α\ns : Set α\nhs : OrdConnected s\nt : Set ↑s\nc : ↑s\nhct : c ∈ t\nB : ↑s\nhB : B ∈ upperBounds t\n⊢ sSup (Subtype.val '' t) ≤ ↑B\n[PROOFSTEP]\nexact (Subtype.mono_coe s).csSup_image_le ⟨c, hct⟩ hB\n[GOAL]\nα : Type u_1\ns✝ : Set α\ninst✝ : ConditionallyCompleteLinearOrder α\ns : Set α\nhs : OrdConnected s\nt : Set ↑s\nht : Set.Nonempty t\nh_bdd : BddBelow t\n⊢ sInf (Subtype.val '' t) ∈ s\n[PROOFSTEP]\nobtain ⟨c, hct⟩ : ∃ c, c ∈ t := ht\n[GOAL]\ncase intro\nα : Type u_1\ns✝ : Set α\ninst✝ : ConditionallyCompleteLinearOrder α\ns : Set α\nhs : OrdConnected s\nt : Set ↑s\nh_bdd : BddBelow t\nc : ↑s\nhct : c ∈ t\n⊢ sInf (Subtype.val '' t) ∈ s\n[PROOFSTEP]\nobtain ⟨B, hB⟩ : ∃ B, B ∈ lowerBounds t := h_bdd\n[GOAL]\ncase intro.intro\nα : Type u_1\ns✝ : Set α\ninst✝ : ConditionallyCompleteLinearOrder α\ns : Set α\nhs : OrdConnected s\nt : Set ↑s\nc : ↑s\nhct : c ∈ t\nB : ↑s\nhB : B ∈ lowerBounds t\n⊢ sInf (Subtype.val '' t) ∈ s\n[PROOFSTEP]\nrefine' hs.out B.2 c.2 ⟨_, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\ns✝ : Set α\ninst✝ : ConditionallyCompleteLinearOrder α\ns : Set α\nhs : OrdConnected s\nt : Set ↑s\nc : ↑s\nhct : c ∈ t\nB : ↑s\nhB : B ∈ lowerBounds t\n⊢ ↑B ≤ sInf (Subtype.val '' t)\n[PROOFSTEP]\nexact (Subtype.mono_coe s).le_csInf_image ⟨c, hct⟩ hB\n[GOAL]\ncase intro.intro.refine'_2\nα : Type u_1\ns✝ : Set α\ninst✝ : ConditionallyCompleteLinearOrder α\ns : Set α\nhs : OrdConnected s\nt : Set ↑s\nc : ↑s\nhct : c ∈ t\nB : ↑s\nhB : B ∈ lowerBounds t\n⊢ sInf (Subtype.val '' t) ≤ ↑c\n[PROOFSTEP]\nexact (Subtype.mono_coe s).csInf_image_le hct ⟨B, hB⟩\n", "meta": {"mathlib_filename": "Mathlib.Order.CompleteLatticeIntervals", "llama_tokens": 11093, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6584175139669997, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.362529532787632}}
{"text": "[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf : MvPolynomial σ R\n⊢ ↑(expand 1) f = f\n[PROOFSTEP]\nsimp only [expand, pow_one, eval₂Hom_eq_bind₂, bind₂_C_left, RingHom.toMonoidHom_eq_coe, RingHom.coe_monoidHom_id,\n  AlgHom.coe_mk, RingHom.coe_mk, MonoidHom.id_apply]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\n⊢ expand 1 = AlgHom.id R (MvPolynomial σ R)\n[PROOFSTEP]\next1 f\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf : σ\n⊢ ↑(expand 1) (X f) = ↑(AlgHom.id R (MvPolynomial σ R)) (X f)\n[PROOFSTEP]\nrw [expand_one_apply, AlgHom.id_apply]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\np : ℕ\nf : σ → MvPolynomial τ R\n⊢ AlgHom.comp (expand p) (bind₁ f) = bind₁ fun i => ↑(expand p) (f i)\n[PROOFSTEP]\napply algHom_ext\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\np : ℕ\nf : σ → MvPolynomial τ R\n⊢ ∀ (i : σ), ↑(AlgHom.comp (expand p) (bind₁ f)) (X i) = ↑(bind₁ fun i => ↑(expand p) (f i)) (X i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\np : ℕ\nf : σ → MvPolynomial τ R\ni : σ\n⊢ ↑(AlgHom.comp (expand p) (bind₁ f)) (X i) = ↑(bind₁ fun i => ↑(expand p) (f i)) (X i)\n[PROOFSTEP]\nsimp only [AlgHom.comp_apply, bind₁_X_right]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\np : ℕ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\n⊢ ↑(expand p) (↑(bind₁ f) φ) = ↑(bind₁ fun i => ↑(expand p) (f i)) φ\n[PROOFSTEP]\nrw [← AlgHom.comp_apply, expand_comp_bind₁]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf : R →+* S\np : ℕ\nφ : MvPolynomial σ R\n⊢ ↑(map f) (↑(expand p) φ) = ↑(expand p) (↑(map f) φ)\n[PROOFSTEP]\nsimp [expand, map_bind₁]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf : σ → τ\np : ℕ\nφ : MvPolynomial σ R\n⊢ ↑(rename f) (↑(expand p) φ) = ↑(expand p) (↑(rename f) φ)\n[PROOFSTEP]\nsimp [expand, bind₁_rename, rename_bind₁, Function.comp]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf : σ → τ\np : ℕ\n⊢ AlgHom.comp (rename f) (expand p) = AlgHom.comp (expand p) (rename f)\n[PROOFSTEP]\next1 φ\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf : σ → τ\np : ℕ\nφ : σ\n⊢ ↑(AlgHom.comp (rename f) (expand p)) (X φ) = ↑(AlgHom.comp (expand p) (rename f)) (X φ)\n[PROOFSTEP]\nsimp only [rename_expand, AlgHom.comp_apply]\n", "meta": {"mathlib_filename": "Mathlib.Data.MvPolynomial.Expand", "llama_tokens": 1438, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6723316860482762, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.3623754975166808}}
{"text": "[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns : Set M\ninst✝ : Add A\nt : Set A\np q : Subsemigroup M\nh : p.carrier = q.carrier\n⊢ p = q\n[PROOFSTEP]\ncases p\n[GOAL]\ncase mk\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns : Set M\ninst✝ : Add A\nt : Set A\nq : Subsemigroup M\ncarrier✝ : Set M\nmul_mem'✝ : ∀ {a b : M}, a ∈ carrier✝ → b ∈ carrier✝ → a * b ∈ carrier✝\nh : { carrier := carrier✝, mul_mem' := mul_mem'✝ }.carrier = q.carrier\n⊢ { carrier := carrier✝, mul_mem' := mul_mem'✝ } = q\n[PROOFSTEP]\ncases q\n[GOAL]\ncase mk.mk\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns : Set M\ninst✝ : Add A\nt : Set A\ncarrier✝¹ : Set M\nmul_mem'✝¹ : ∀ {a b : M}, a ∈ carrier✝¹ → b ∈ carrier✝¹ → a * b ∈ carrier✝¹\ncarrier✝ : Set M\nmul_mem'✝ : ∀ {a b : M}, a ∈ carrier✝ → b ∈ carrier✝ → a * b ∈ carrier✝\nh : { carrier := carrier✝¹, mul_mem' := mul_mem'✝¹ }.carrier = { carrier := carrier✝, mul_mem' := mul_mem'✝ }.carrier\n⊢ { carrier := carrier✝¹, mul_mem' := mul_mem'✝¹ } = { carrier := carrier✝, mul_mem' := mul_mem'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns✝ : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\ns : Set (Subsemigroup M)\na✝ b✝ : M\nhx : a✝ ∈ ⋂ (t : Subsemigroup M) (_ : t ∈ s), ↑t\nhy : b✝ ∈ ⋂ (t : Subsemigroup M) (_ : t ∈ s), ↑t\ni : Subsemigroup M\nh : i ∈ s\n⊢ a✝ ∈ i\n[PROOFSTEP]\napply Set.mem_iInter₂.1 hx i h\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns✝ : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\ns : Set (Subsemigroup M)\na✝ b✝ : M\nhx : a✝ ∈ ⋂ (t : Subsemigroup M) (_ : t ∈ s), ↑t\nhy : b✝ ∈ ⋂ (t : Subsemigroup M) (_ : t ∈ s), ↑t\ni : Subsemigroup M\nh : i ∈ s\n⊢ b✝ ∈ i\n[PROOFSTEP]\napply Set.mem_iInter₂.1 hy i h\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns : Set M\ninst✝ : Add A\nt : Set A\nS✝ : Subsemigroup M\nι : Sort u_4\nS : ι → Subsemigroup M\nx : M\n⊢ x ∈ ⨅ (i : ι), S i ↔ ∀ (i : ι), x ∈ S i\n[PROOFSTEP]\nsimp only [iInf, mem_sInf, Set.forall_range_iff]\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns : Set M\ninst✝ : Add A\nt : Set A\nS✝ : Subsemigroup M\nι : Sort u_4\nS : ι → Subsemigroup M\n⊢ ↑(⨅ (i : ι), S i) = ⋂ (i : ι), ↑(S i)\n[PROOFSTEP]\nsimp only [iInf, coe_sInf, Set.biInter_range]\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝² : Mul M\ns : Set M\ninst✝¹ : Add A\nt : Set A\nS : Subsemigroup M\ninst✝ : Subsingleton (Subsemigroup M)\n⊢ Subsingleton M\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝² : Mul M\ns : Set M\ninst✝¹ : Add A\nt : Set A\nS : Subsemigroup M\ninst✝ : Subsingleton (Subsemigroup M)\n⊢ ∀ (a b : M), a = b\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase allEq\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝² : Mul M\ns : Set M\ninst✝¹ : Add A\nt : Set A\nS : Subsemigroup M\ninst✝ : Subsingleton (Subsemigroup M)\nx y : M\n⊢ x = y\n[PROOFSTEP]\nhave : ∀ a : M, a ∈ (⊥ : Subsemigroup M) := by simp [Subsingleton.elim (⊥ : Subsemigroup M) ⊤]\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝² : Mul M\ns : Set M\ninst✝¹ : Add A\nt : Set A\nS : Subsemigroup M\ninst✝ : Subsingleton (Subsemigroup M)\nx y : M\n⊢ ∀ (a : M), a ∈ ⊥\n[PROOFSTEP]\nsimp [Subsingleton.elim (⊥ : Subsemigroup M) ⊤]\n[GOAL]\ncase allEq\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝² : Mul M\ns : Set M\ninst✝¹ : Add A\nt : Set A\nS : Subsemigroup M\ninst✝ : Subsingleton (Subsemigroup M)\nx y : M\nthis : ∀ (a : M), a ∈ ⊥\n⊢ x = y\n[PROOFSTEP]\nexact absurd (this x) not_mem_bot\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\nhn : Nonempty M\nh : ⊥ = ⊤\n⊢ False\n[PROOFSTEP]\nobtain ⟨x⟩ := id hn\n[GOAL]\ncase intro\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\nhn : Nonempty M\nh : ⊥ = ⊤\nx : M\n⊢ False\n[PROOFSTEP]\nrefine' absurd (_ : x ∈ ⊥) not_mem_bot\n[GOAL]\ncase intro\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\nhn : Nonempty M\nh : ⊥ = ⊤\nx : M\n⊢ x ∈ ⊥\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns✝ : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\ns : Set M\np : (x : M) → x ∈ closure s → Prop\nHs : ∀ (x : M) (h : x ∈ s), p x (_ : x ∈ ↑(closure s))\nHmul : ∀ (x : M) (hx : x ∈ closure s) (y : M) (hy : y ∈ closure s), p x hx → p y hy → p (x * y) (_ : x * y ∈ closure s)\nx : M\nhx : x ∈ closure s\n⊢ p x hx\n[PROOFSTEP]\nrefine' Exists.elim _ fun (hx : x ∈ closure s) (hc : p x hx) => hc\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns✝ : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\ns : Set M\np : (x : M) → x ∈ closure s → Prop\nHs : ∀ (x : M) (h : x ∈ s), p x (_ : x ∈ ↑(closure s))\nHmul : ∀ (x : M) (hx : x ∈ closure s) (y : M) (hy : y ∈ closure s), p x hx → p y hy → p (x * y) (_ : x * y ∈ closure s)\nx : M\nhx : x ∈ closure s\n⊢ ∃ x_1, p x x_1\n[PROOFSTEP]\nexact closure_induction hx (fun x hx => ⟨_, Hs x hx⟩) fun x y ⟨hx', hx⟩ ⟨hy', hy⟩ => ⟨_, Hmul _ _ _ _ hx hy⟩\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns✝ : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\np : M → Prop\nx : M\ns : Set M\nhs : closure s = ⊤\nHs : ∀ (x : M), x ∈ s → p x\nHmul : ∀ (x y : M), p x → p y → p (x * y)\n⊢ p x\n[PROOFSTEP]\nhave : ∀ x ∈ closure s, p x := fun x hx => closure_induction hx Hs Hmul\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns✝ : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\np : M → Prop\nx : M\ns : Set M\nhs : closure s = ⊤\nHs : ∀ (x : M), x ∈ s → p x\nHmul : ∀ (x y : M), p x → p y → p (x * y)\nthis : ∀ (x : M), x ∈ closure s → p x\n⊢ p x\n[PROOFSTEP]\nsimpa [hs] using this x\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\nm : M\np : Subsemigroup M\n⊢ closure {m} ≤ p ↔ m ∈ p\n[PROOFSTEP]\nrw [closure_le, singleton_subset_iff, SetLike.mem_coe]\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\nι : Sort u_4\np : ι → Subsemigroup M\nm : M\n⊢ m ∈ ⨆ (i : ι), p i ↔ ∀ (N : Subsemigroup M), (∀ (i : ι), p i ≤ N) → m ∈ N\n[PROOFSTEP]\nrw [← closure_singleton_le_iff_mem, le_iSup_iff]\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\nι : Sort u_4\np : ι → Subsemigroup M\nm : M\n⊢ (∀ (b : Subsemigroup M), (∀ (i : ι), p i ≤ b) → closure {m} ≤ b) ↔\n    ∀ (N : Subsemigroup M), (∀ (i : ι), p i ≤ N) → m ∈ N\n[PROOFSTEP]\nsimp only [closure_singleton_le_iff_mem]\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝¹ : Mul M\ns : Set M\ninst✝ : Add A\nt : Set A\nS : Subsemigroup M\nι : Sort u_4\np : ι → Subsemigroup M\n⊢ ⨆ (i : ι), p i = closure (⋃ (i : ι), ↑(p i))\n[PROOFSTEP]\nsimp_rw [Subsemigroup.closure_iUnion, Subsemigroup.closure_eq]\n[GOAL]\nM : Type u_1\nN : Type u_2\nA : Type u_3\ninst✝² : Mul M\ns : Set M\ninst✝¹ : Add A\nt : Set A\ninst✝ : Mul N\nf g : M →ₙ* N\na✝ b✝ : M\nhx : ↑f a✝ = ↑g a✝\nhy : ↑f b✝ = ↑g b✝\n⊢ a✝ * b✝ ∈ {x | ↑f x = ↑g x}\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nM✝ : Type u_1\nN✝ : Type u_2\nA : Type u_3\nM : Type ?u.26668\nN : Type ?u.26671\ninst✝¹ : Semigroup M\ninst✝ : Semigroup N\ns : Set M\nf : M → N\nhs : closure s = ⊤\nhmul : ∀ (x y : M), y ∈ s → f (x * y) = f x * f y\nx✝ y y₁ y₂ : M\nh₁ : ∀ (x : M), f (x * y₁) = f x * f y₁\nh₂ : ∀ (x : M), f (x * y₂) = f x * f y₂\nx : M\n⊢ f (x * (y₁ * y₂)) = f x * f (y₁ * y₂)\n[PROOFSTEP]\nsimp only [← mul_assoc, h₁, h₂]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Subsemigroup.Basic", "llama_tokens": 3980, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6723316860482762, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.3623754975166808}}
{"text": "[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nxs : List α\nh : ∀ (x : α), x ∈ xs\nh' : List.Nodup xs\nx : α\n⊢ List.indexOf x xs < List.length xs\n[PROOFSTEP]\nrw [List.indexOf_lt_length]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nxs : List α\nh : ∀ (x : α), x ∈ xs\nh' : List.Nodup xs\nx : α\n⊢ x ∈ xs\n[PROOFSTEP]\napply h\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nxs : List α\nh : ∀ (x : α), x ∈ xs\nh' : List.Nodup xs\nx : α\n⊢ (fun x =>\n        match x with\n        | { val := i, isLt := h } => List.nthLe xs i h)\n      ((fun x => { val := List.indexOf x xs, isLt := (_ : List.indexOf x xs < List.length xs) }) x) =\n    x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nxs : List α\nh✝ : ∀ (x : α), x ∈ xs\nh' : List.Nodup xs\nx✝ : Fin (List.length xs)\ni : ℕ\nh : i < List.length xs\n⊢ (fun x => { val := List.indexOf x xs, isLt := (_ : List.indexOf x xs < List.length xs) })\n      ((fun x =>\n          match x with\n          | { val := i, isLt := h } => List.nthLe xs i h)\n        { val := i, isLt := h }) =\n    { val := i, isLt := h }\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nxs : List α\nh : ∀ (x : α), x ∈ xs\n⊢ ∀ (x : α), x ∈ List.dedup xs\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : FinEnum α\nx : α\n⊢ x ∈ toList α\n[PROOFSTEP]\nsimp [toList]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : FinEnum α\nx : α\n⊢ ∃ a, ↑equiv.symm a = x\n[PROOFSTEP]\nexists equiv x\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : FinEnum α\nx : α\n⊢ ↑equiv.symm (↑equiv x) = x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : FinEnum α\n⊢ List.Nodup (toList α)\n[PROOFSTEP]\nsimp [toList]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : FinEnum α\n⊢ List.Nodup (List.map (↑equiv.symm) (List.finRange (card α)))\n[PROOFSTEP]\napply List.Nodup.map <;> [apply Equiv.injective; apply List.nodup_finRange]\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : FinEnum α\n⊢ List.Nodup (List.map (↑equiv.symm) (List.finRange (card α)))\n[PROOFSTEP]\napply List.Nodup.map\n[GOAL]\ncase hf\nα : Type u\nβ : α → Type v\ninst✝ : FinEnum α\n⊢ Injective ↑equiv.symm\n[PROOFSTEP]\napply Equiv.injective\n[GOAL]\ncase a\nα : Type u\nβ : α → Type v\ninst✝ : FinEnum α\n⊢ List.Nodup (List.finRange (card α))\n[PROOFSTEP]\napply List.nodup_finRange\n[GOAL]\nα : Type u\nβ✝ : α → Type v\nβ : Type ?u.8688\nf : β → α\ninst✝¹ : DecidableEq α\ninst✝ : FinEnum β\nh : Surjective f\n⊢ ∀ (x : α), x ∈ List.map f (toList β)\n[PROOFSTEP]\nintro\n[GOAL]\nα : Type u\nβ✝ : α → Type v\nβ : Type ?u.8688\nf : β → α\ninst✝¹ : DecidableEq α\ninst✝ : FinEnum β\nh : Surjective f\nx✝ : α\n⊢ x✝ ∈ List.map f (toList β)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ✝ : α → Type v\nβ : Type ?u.8688\nf : β → α\ninst✝¹ : DecidableEq α\ninst✝ : FinEnum β\nh : Surjective f\nx✝ : α\n⊢ ∃ a, f a = x✝\n[PROOFSTEP]\nexact h _\n[GOAL]\nα✝ : Type u\nβ✝ : α✝ → Type v\nα : Type ?u.11794\nβ : Type ?u.11876\nf : α → β\ninst✝¹ : DecidableEq α\ninst✝ : FinEnum β\nh : Injective f\n⊢ ∀ (x : α), x ∈ List.filterMap (partialInv f) (toList β)\n[PROOFSTEP]\nintro x\n[GOAL]\nα✝ : Type u\nβ✝ : α✝ → Type v\nα : Type ?u.11794\nβ : Type ?u.11876\nf : α → β\ninst✝¹ : DecidableEq α\ninst✝ : FinEnum β\nh : Injective f\nx : α\n⊢ x ∈ List.filterMap (partialInv f) (toList β)\n[PROOFSTEP]\nsimp only [mem_toList, true_and_iff, List.mem_filterMap]\n[GOAL]\nα✝ : Type u\nβ✝ : α✝ → Type v\nα : Type ?u.11794\nβ : Type ?u.11876\nf : α → β\ninst✝¹ : DecidableEq α\ninst✝ : FinEnum β\nh : Injective f\nx : α\n⊢ ∃ a, partialInv f a = some x\n[PROOFSTEP]\nuse f x\n[GOAL]\ncase h\nα✝ : Type u\nβ✝ : α✝ → Type v\nα : Type ?u.11794\nβ : Type ?u.11876\nf : α → β\ninst✝¹ : DecidableEq α\ninst✝ : FinEnum β\nh : Injective f\nx : α\n⊢ partialInv f (f x) = some x\n[PROOFSTEP]\nsimp only [h, Function.partialInv_left]\n[GOAL]\nα : Type u\nβ : α → Type v\nx : PUnit\n⊢ x ∈ [PUnit.unit]\n[PROOFSTEP]\ncases x\n[GOAL]\ncase unit\nα : Type u\nβ : α → Type v\n⊢ PUnit.unit ∈ [PUnit.unit]\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ✝ : α → Type v\nβ : Type ?u.13079\ninst✝¹ : FinEnum α\ninst✝ : FinEnum β\nx : α × β\n⊢ x ∈ toList α ×ˢ toList β\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα : Type u\nβ✝ : α → Type v\nβ : Type ?u.13079\ninst✝¹ : FinEnum α\ninst✝ : FinEnum β\nfst✝ : α\nsnd✝ : β\n⊢ (fst✝, snd✝) ∈ toList α ×ˢ toList β\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ✝ : α → Type v\nβ : Type ?u.16461\ninst✝¹ : FinEnum α\ninst✝ : FinEnum β\nx : α ⊕ β\n⊢ x ∈ List.map Sum.inl (toList α) ++ List.map Sum.inr (toList β)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nα : Type u\nβ✝ : α → Type v\nβ : Type ?u.16461\ninst✝¹ : FinEnum α\ninst✝ : FinEnum β\nval✝ : α\n⊢ Sum.inl val✝ ∈ List.map Sum.inl (toList α) ++ List.map Sum.inr (toList β)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u\nβ✝ : α → Type v\nβ : Type ?u.16461\ninst✝¹ : FinEnum α\ninst✝ : FinEnum β\nval✝ : β\n⊢ Sum.inr val✝ ∈ List.map Sum.inl (toList α) ++ List.map Sum.inr (toList β)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\nn : ℕ\n⊢ ∀ (x : Fin n), x ∈ List.finRange n\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns : Finset α\nxs : List α\n⊢ s ∈ enum xs ↔ ∀ (x : α), x ∈ s → x ∈ xs\n[PROOFSTEP]\ninduction' xs with xs_hd generalizing s\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ s : Finset α\n⊢ s ∈ enum [] ↔ ∀ (x : α), x ∈ s → x ∈ []\n[PROOFSTEP]\nsimp [*, Finset.enum]\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\n⊢ s ∈ enum (xs_hd :: tail✝) ↔ ∀ (x : α), x ∈ s → x ∈ xs_hd :: tail✝\n[PROOFSTEP]\nsimp [*, Finset.enum]\n[GOAL]\ncase nil\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ s : Finset α\n⊢ s = ∅ ↔ ∀ (x : α), x ∈ s → False\n[PROOFSTEP]\nsimp [Finset.eq_empty_iff_forall_not_mem]\n[GOAL]\ncase cons\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\n⊢ (∃ a, (∀ (x : α), x ∈ a → x ∈ tail✝) ∧ (s = a ∨ s = {xs_hd} ∪ a)) ↔ ∀ (x : α), x ∈ s → x = xs_hd ∨ x ∈ tail✝\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons.mp\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\n⊢ (∃ a, (∀ (x : α), x ∈ a → x ∈ tail✝) ∧ (s = a ∨ s = {xs_hd} ∪ a)) → ∀ (x : α), x ∈ s → x = xs_hd ∨ x ∈ tail✝\n[PROOFSTEP]\nrintro ⟨a, h, h'⟩ x hx\n[GOAL]\ncase cons.mp.intro.intro\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns a : Finset α\nh : ∀ (x : α), x ∈ a → x ∈ tail✝\nh' : s = a ∨ s = {xs_hd} ∪ a\nx : α\nhx : x ∈ s\n⊢ x = xs_hd ∨ x ∈ tail✝\n[PROOFSTEP]\ncases' h' with _ h' a b\n[GOAL]\ncase cons.mp.intro.intro.inl\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns a : Finset α\nh : ∀ (x : α), x ∈ a → x ∈ tail✝\nx : α\nhx : x ∈ s\nh✝ : s = a\n⊢ x = xs_hd ∨ x ∈ tail✝\n[PROOFSTEP]\nright\n[GOAL]\ncase cons.mp.intro.intro.inl.h\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns a : Finset α\nh : ∀ (x : α), x ∈ a → x ∈ tail✝\nx : α\nhx : x ∈ s\nh✝ : s = a\n⊢ x ∈ tail✝\n[PROOFSTEP]\napply h\n[GOAL]\ncase cons.mp.intro.intro.inl.h.a\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns a : Finset α\nh : ∀ (x : α), x ∈ a → x ∈ tail✝\nx : α\nhx : x ∈ s\nh✝ : s = a\n⊢ x ∈ a\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase cons.mp.intro.intro.inl.h.a\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nx : α\nhx : x ∈ s\nh : ∀ (x : α), x ∈ s → x ∈ tail✝\n⊢ x ∈ s\n[PROOFSTEP]\nexact hx\n[GOAL]\ncase cons.mp.intro.intro.inr\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns a : Finset α\nh : ∀ (x : α), x ∈ a → x ∈ tail✝\nx : α\nhx : x ∈ s\nh' : s = {xs_hd} ∪ a\n⊢ x = xs_hd ∨ x ∈ tail✝\n[PROOFSTEP]\nsimp only [h', mem_union, mem_singleton] at hx ⊢\n[GOAL]\ncase cons.mp.intro.intro.inr\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns a : Finset α\nh : ∀ (x : α), x ∈ a → x ∈ tail✝\nx : α\nh' : s = {xs_hd} ∪ a\nhx : x = xs_hd ∨ x ∈ a\n⊢ x = xs_hd ∨ x ∈ tail✝\n[PROOFSTEP]\ncases' hx with hx hx'\n[GOAL]\ncase cons.mp.intro.intro.inr.inl\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns a : Finset α\nh : ∀ (x : α), x ∈ a → x ∈ tail✝\nx : α\nh' : s = {xs_hd} ∪ a\nhx : x = xs_hd\n⊢ x = xs_hd ∨ x ∈ tail✝\n[PROOFSTEP]\nexact Or.inl hx\n[GOAL]\ncase cons.mp.intro.intro.inr.inr\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns a : Finset α\nh : ∀ (x : α), x ∈ a → x ∈ tail✝\nx : α\nh' : s = {xs_hd} ∪ a\nhx' : x ∈ a\n⊢ x = xs_hd ∨ x ∈ tail✝\n[PROOFSTEP]\nexact Or.inr (h _ hx')\n[GOAL]\ncase cons.mpr\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\n⊢ (∀ (x : α), x ∈ s → x = xs_hd ∨ x ∈ tail✝) → ∃ a, (∀ (x : α), x ∈ a → x ∈ tail✝) ∧ (s = a ∨ s = {xs_hd} ∪ a)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase cons.mpr\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh : ∀ (x : α), x ∈ s → x = xs_hd ∨ x ∈ tail✝\n⊢ ∃ a, (∀ (x : α), x ∈ a → x ∈ tail✝) ∧ (s = a ∨ s = {xs_hd} ∪ a)\n[PROOFSTEP]\nexists s \\ ({ xs_hd } : Finset α)\n[GOAL]\ncase cons.mpr\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh : ∀ (x : α), x ∈ s → x = xs_hd ∨ x ∈ tail✝\n⊢ (∀ (x : α), x ∈ s \\ {xs_hd} → x ∈ tail✝) ∧ (s = s \\ {xs_hd} ∨ s = {xs_hd} ∪ s \\ {xs_hd})\n[PROOFSTEP]\nsimp only [and_imp, mem_sdiff, mem_singleton]\n[GOAL]\ncase cons.mpr\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh : ∀ (x : α), x ∈ s → x = xs_hd ∨ x ∈ tail✝\n⊢ (∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝) ∧ (s = s \\ {xs_hd} ∨ s = {xs_hd} ∪ s \\ {xs_hd})\n[PROOFSTEP]\nsimp only [or_iff_not_imp_left] at h \n[GOAL]\ncase cons.mpr\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh : ∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝\n⊢ (∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝) ∧ (s = s \\ {xs_hd} ∨ s = {xs_hd} ∪ s \\ {xs_hd})\n[PROOFSTEP]\nexists h\n[GOAL]\ncase cons.mpr\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh : ∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝\n⊢ s = s \\ {xs_hd} ∨ s = {xs_hd} ∪ s \\ {xs_hd}\n[PROOFSTEP]\nby_cases h : xs_hd ∈ s\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh✝ : ∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝\nh : xs_hd ∈ s\n⊢ s = s \\ {xs_hd} ∨ s = {xs_hd} ∪ s \\ {xs_hd}\n[PROOFSTEP]\nhave : { xs_hd } ⊆ s\n[GOAL]\ncase this\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh✝ : ∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝\nh : xs_hd ∈ s\n⊢ {xs_hd} ⊆ s\ncase pos\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh✝ : ∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝\nh : xs_hd ∈ s\nthis : {xs_hd} ⊆ s\n⊢ s = s \\ {xs_hd} ∨ s = {xs_hd} ∪ s \\ {xs_hd}\n[PROOFSTEP]\nsimp only [HasSubset.Subset, *, forall_eq, mem_singleton]\n[GOAL]\ncase pos\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh✝ : ∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝\nh : xs_hd ∈ s\nthis : {xs_hd} ⊆ s\n⊢ s = s \\ {xs_hd} ∨ s = {xs_hd} ∪ s \\ {xs_hd}\n[PROOFSTEP]\nsimp only [union_sdiff_of_subset this, or_true_iff, Finset.union_sdiff_of_subset, eq_self_iff_true]\n[GOAL]\ncase neg\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh✝ : ∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝\nh : ¬xs_hd ∈ s\n⊢ s = s \\ {xs_hd} ∨ s = {xs_hd} ∪ s \\ {xs_hd}\n[PROOFSTEP]\nleft\n[GOAL]\ncase neg.h\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh✝ : ∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝\nh : ¬xs_hd ∈ s\n⊢ s = s \\ {xs_hd}\n[PROOFSTEP]\nsymm\n[GOAL]\ncase neg.h\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh✝ : ∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝\nh : ¬xs_hd ∈ s\n⊢ s \\ {xs_hd} = s\n[PROOFSTEP]\nsimp only [sdiff_eq_self]\n[GOAL]\ncase neg.h\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh✝ : ∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝\nh : ¬xs_hd ∈ s\n⊢ s ∩ {xs_hd} ⊆ ∅\n[PROOFSTEP]\nintro a\n[GOAL]\ncase neg.h\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh✝ : ∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝\nh : ¬xs_hd ∈ s\na : α\n⊢ a ∈ s ∩ {xs_hd} → a ∈ ∅\n[PROOFSTEP]\nsimp only [and_imp, mem_inter, mem_singleton]\n[GOAL]\ncase neg.h\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\nxs_hd : α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\nh✝ : ∀ (x : α), x ∈ s → ¬x = xs_hd → x ∈ tail✝\nh : ¬xs_hd ∈ s\na : α\n⊢ a ∈ s → a = xs_hd → a ∈ ∅\n[PROOFSTEP]\nrintro h₀ rfl\n[GOAL]\ncase neg.h\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\ns✝ : Finset α\ntail✝ : List α\ntail_ih✝ : ∀ (s : Finset α), s ∈ enum tail✝ ↔ ∀ (x : α), x ∈ s → x ∈ tail✝\ns : Finset α\na : α\nh₀ : a ∈ s\nh✝ : ∀ (x : α), x ∈ s → ¬x = a → x ∈ tail✝\nh : ¬a ∈ s\n⊢ a ∈ ∅\n[PROOFSTEP]\nexact (h h₀).elim\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : FinEnum α\n⊢ ∀ (x : Finset α), x ∈ enum (toList α)\n[PROOFSTEP]\nintro\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : FinEnum α\nx✝ : Finset α\n⊢ x✝ ∈ enum (toList α)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝¹ : FinEnum α\np : α → Prop\ninst✝ : DecidablePred p\n⊢ ∀ (x : { x // p x }),\n    x ∈ List.filterMap (fun x => if h : p x then some { val := x, property := h } else none) (toList α)\n[PROOFSTEP]\nrintro ⟨x, h⟩\n[GOAL]\ncase mk\nα : Type u\nβ : α → Type v\ninst✝¹ : FinEnum α\np : α → Prop\ninst✝ : DecidablePred p\nx : α\nh : p x\n⊢ { val := x, property := h } ∈\n    List.filterMap (fun x => if h : p x then some { val := x, property := h } else none) (toList α)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk\nα : Type u\nβ : α → Type v\ninst✝¹ : FinEnum α\np : α → Prop\ninst✝ : DecidablePred p\nx : α\nh : p x\n⊢ ∃ a, (if h : p a then some { val := a, property := h } else none) = some { val := x, property := h }\n[PROOFSTEP]\nexists x\n[GOAL]\ncase mk\nα : Type u\nβ : α → Type v\ninst✝¹ : FinEnum α\np : α → Prop\ninst✝ : DecidablePred p\nx : α\nh : p x\n⊢ (if h : p x then some { val := x, property := h } else none) = some { val := x, property := h }\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u\nβ✝ β : α → Type v\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\n⊢ ∀ (x : Sigma β), x ∈ List.bind (toList α) fun a => List.map (Sigma.mk a) (toList (β a))\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u\nβ✝ β : α → Type v\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nx : Sigma β\n⊢ x ∈ List.bind (toList α) fun a => List.map (Sigma.mk a) (toList (β a))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα : Type u\nβ✝ β : α → Type v\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nfst✝ : α\nsnd✝ : β fst✝\n⊢ { fst := fst✝, snd := snd✝ } ∈ List.bind (toList α) fun a => List.map (Sigma.mk a) (toList (β a))\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u\nβ✝ : α✝ → Type v\nα : Prop\nβ : α → Type v\ninst✝¹ : (a : α) → FinEnum (β a)\ninst✝ : Decidable α\nh : α\nx✝ : (a : α) ×' β a\na : α\nBa : β a\n⊢ { fst := a, snd := Ba } ∈ List.map (PSigma.mk h) (toList (β h))\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u\nβ✝ : α✝ → Type v\nα : Prop\nβ : α → Prop\ninst✝¹ : Decidable α\ninst✝ : (a : α) → Decidable (β a)\nh : ∃ a, β a\n⊢ ∀ (x : (a : α) ×' β a), x ∈ [{ fst := (_ : α), snd := (_ : β (_ : α)) }]\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase mk\nα✝ : Type u\nβ✝ : α✝ → Type v\nα : Prop\nβ : α → Prop\ninst✝¹ : Decidable α\ninst✝ : (a : α) → Decidable (β a)\nh : ∃ a, β a\nfst✝ : α\nsnd✝ : β fst✝\n⊢ { fst := fst✝, snd := snd✝ } ∈ [{ fst := (_ : α), snd := (_ : β (_ : α)) }]\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : FinEnum α\n⊢ ∀ (x : α), x ∈ map (Equiv.toEmbedding equiv.symm) univ\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : FinEnum α\nx✝ : α\n⊢ x✝ ∈ map (Equiv.toEmbedding equiv.symm) univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : α → Type v\ninst✝ : DecidableEq α\nx : α\nxs : List α\ny : β x\nf : (a : α) → a ∈ xs → β a\nb : α\nh : b ∈ x :: xs\nh' : b = x\n⊢ β x = β b\n[PROOFSTEP]\nrw [h']\n[GOAL]\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf : (a : α) → a ∈ xs → β a\n⊢ f ∈ pi xs fun x => toList (β x)\n[PROOFSTEP]\ninduction' xs with xs_hd xs_tl xs_ih\n[GOAL]\ncase nil\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nf : (a : α) → a ∈ [] → β a\n⊢ f ∈ pi [] fun x => toList (β x)\n[PROOFSTEP]\nsimp [pi, -List.map_eq_map, monad_norm, functor_norm]\n[GOAL]\ncase cons\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\n⊢ f ∈ pi (xs_hd :: xs_tl) fun x => toList (β x)\n[PROOFSTEP]\nsimp [pi, -List.map_eq_map, monad_norm, functor_norm]\n[GOAL]\ncase nil\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nf : (a : α) → a ∈ [] → β a\n⊢ f = fun x h => False.elim (_ : False)\n[PROOFSTEP]\next a ⟨⟩\n[GOAL]\ncase cons\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\n⊢ ∃ a, (∃ a_1, a = Pi.cons xs_hd xs_tl a_1) ∧ ∃ a_1, (a_1 ∈ pi xs_tl fun x => toList (β x)) ∧ f = a a_1\n[PROOFSTEP]\nexists Pi.cons xs_hd xs_tl (f _ (List.mem_cons_self _ _))\n[GOAL]\ncase cons\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\n⊢ (∃ a, Pi.cons xs_hd xs_tl (f xs_hd (_ : xs_hd ∈ xs_hd :: xs_tl)) = Pi.cons xs_hd xs_tl a) ∧\n    ∃ a, (a ∈ pi xs_tl fun x => toList (β x)) ∧ f = Pi.cons xs_hd xs_tl (f xs_hd (_ : xs_hd ∈ xs_hd :: xs_tl)) a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons.left\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\n⊢ ∃ a, Pi.cons xs_hd xs_tl (f xs_hd (_ : xs_hd ∈ xs_hd :: xs_tl)) = Pi.cons xs_hd xs_tl a\ncase cons.right\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\n⊢ ∃ a, (a ∈ pi xs_tl fun x => toList (β x)) ∧ f = Pi.cons xs_hd xs_tl (f xs_hd (_ : xs_hd ∈ xs_hd :: xs_tl)) a\n[PROOFSTEP]\nexact ⟨_, rfl⟩\n[GOAL]\ncase cons.right\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\n⊢ ∃ a, (a ∈ pi xs_tl fun x => toList (β x)) ∧ f = Pi.cons xs_hd xs_tl (f xs_hd (_ : xs_hd ∈ xs_hd :: xs_tl)) a\n[PROOFSTEP]\nexists Pi.tail f\n[GOAL]\ncase cons.right\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\n⊢ (Pi.tail f ∈ pi xs_tl fun x => toList (β x)) ∧\n    f = Pi.cons xs_hd xs_tl (f xs_hd (_ : xs_hd ∈ xs_hd :: xs_tl)) (Pi.tail f)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons.right.left\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\n⊢ Pi.tail f ∈ pi xs_tl fun x => toList (β x)\n[PROOFSTEP]\napply xs_ih\n[GOAL]\ncase cons.right.right\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\n⊢ f = Pi.cons xs_hd xs_tl (f xs_hd (_ : xs_hd ∈ xs_hd :: xs_tl)) (Pi.tail f)\n[PROOFSTEP]\next x h\n[GOAL]\ncase cons.right.right.h.h\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\nx : α\nh : x ∈ xs_hd :: xs_tl\n⊢ f x h = Pi.cons xs_hd xs_tl (f xs_hd (_ : xs_hd ∈ xs_hd :: xs_tl)) (Pi.tail f) x h\n[PROOFSTEP]\nsimp [Pi.cons]\n[GOAL]\ncase cons.right.right.h.h\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\nx : α\nh : x ∈ xs_hd :: xs_tl\n⊢ f x h =\n    if h' : x = xs_hd then cast (_ : β xs_hd = β x) (f xs_hd (_ : xs_hd ∈ xs_hd :: xs_tl))\n    else Pi.tail f x (_ : x ∈ xs_tl)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\nx : α\nh : x ∈ xs_hd :: xs_tl\nh✝ : x = xs_hd\n⊢ f x h = cast (_ : β xs_hd = β x) (f xs_hd (_ : xs_hd ∈ xs_hd :: xs_tl))\n[PROOFSTEP]\nsubst x\n[GOAL]\ncase pos\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\nh : xs_hd ∈ xs_hd :: xs_tl\n⊢ f xs_hd h = cast (_ : β xs_hd = β xs_hd) (f xs_hd (_ : xs_hd ∈ xs_hd :: xs_tl))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u u_1)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nxs : List α\nf✝ : (a : α) → a ∈ xs → β a\nxs_hd : α\nxs_tl : List α\nxs_ih : ∀ (f : (a : α) → a ∈ xs_tl → β a), f ∈ pi xs_tl fun x => toList (β x)\nf : (a : α) → a ∈ xs_hd :: xs_tl → β a\nx : α\nh : x ∈ xs_hd :: xs_tl\nh✝ : ¬x = xs_hd\n⊢ f x h = Pi.tail f x (_ : x ∈ xs_tl)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u v)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nf : (a : α) → β a\n⊢ f ∈ enum β\n[PROOFSTEP]\nsimp [pi.enum]\n[GOAL]\nα : Type u\nβ✝ : α → Type v\nβ : α → Type (max u v)\ninst✝¹ : FinEnum α\ninst✝ : (a : α) → FinEnum (β a)\nf : (a : α) → β a\n⊢ ∃ a, (a ∈ pi (toList α) fun x => toList (β x)) ∧ (fun x => a x (_ : x ∈ toList α)) = f\n[PROOFSTEP]\nrefine' ⟨fun a _ => f a, mem_pi _ _, rfl⟩\n[GOAL]\nα✝ : Type u\nβ : α✝ → Type v\np : Prop\ninst✝¹ : Decidable p\nα : p → Type\ninst✝ : (hp : p) → FinEnum (α hp)\nhp : p\n⊢ ∀ (x : (hp : p) → α hp), x ∈ List.map (fun x x_1 => x) (toList (α hp))\n[PROOFSTEP]\nintro x\n[GOAL]\nα✝ : Type u\nβ : α✝ → Type v\np : Prop\ninst✝¹ : Decidable p\nα : p → Type\ninst✝ : (hp : p) → FinEnum (α hp)\nhp : p\nx : (hp : p) → α hp\n⊢ x ∈ List.map (fun x x_1 => x) (toList (α hp))\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u\nβ : α✝ → Type v\np : Prop\ninst✝¹ : Decidable p\nα : p → Type\ninst✝ : (hp : p) → FinEnum (α hp)\nhp : p\nx : (hp : p) → α hp\n⊢ ∃ a, (fun x => a) = x\n[PROOFSTEP]\nexact ⟨x hp, rfl⟩\n[GOAL]\nα✝ : Type u\nβ : α✝ → Type v\np : Prop\ninst✝¹ : Decidable p\nα : p → Type\ninst✝ : (hp : p) → FinEnum (α hp)\nhp : ¬p\n⊢ ∀ (x : (hp : p) → α hp), x ∈ [fun hp' => False.elim (_ : False)]\n[PROOFSTEP]\nintro\n[GOAL]\nα✝ : Type u\nβ : α✝ → Type v\np : Prop\ninst✝¹ : Decidable p\nα : p → Type\ninst✝ : (hp : p) → FinEnum (α hp)\nhp : ¬p\nx✝ : (hp : p) → α hp\n⊢ x✝ ∈ [fun hp' => False.elim (_ : False)]\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u\nβ : α✝ → Type v\np : Prop\ninst✝¹ : Decidable p\nα : p → Type\ninst✝ : (hp : p) → FinEnum (α hp)\nhp : ¬p\nx✝ : (hp : p) → α hp\n⊢ x✝ = fun hp' => False.elim (_ : False)\n[PROOFSTEP]\next hp'\n[GOAL]\ncase h\nα✝ : Type u\nβ : α✝ → Type v\np : Prop\ninst✝¹ : Decidable p\nα : p → Type\ninst✝ : (hp : p) → FinEnum (α hp)\nhp : ¬p\nx✝ : (hp : p) → α hp\nhp' : p\n⊢ x✝ hp' = False.elim (_ : False)\n[PROOFSTEP]\ncases hp hp'\n", "meta": {"mathlib_filename": "Mathlib.Data.FinEnum", "llama_tokens": 14708, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6113819874558603, "lm_q2_score": 0.5926665999540697, "lm_q1q2_score": 0.36234568377862636}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x : α\n⊢ ↑toDual x ∈ ordConnectedComponent (↑ofDual ⁻¹' s) (↑toDual x✝) ↔ ↑toDual x ∈ ↑ofDual ⁻¹' ordConnectedComponent s x✝\n[PROOFSTEP]\nrw [mem_ordConnectedComponent, dual_uIcc]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x : α\n⊢ ↑ofDual ⁻¹' [[x✝, x]] ⊆ ↑ofDual ⁻¹' s ↔ ↑toDual x ∈ ↑ofDual ⁻¹' ordConnectedComponent s x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx y z : α\n⊢ x ∈ ordConnectedComponent s x ↔ x ∈ s\n[PROOFSTEP]\nrw [mem_ordConnectedComponent, uIcc_self, singleton_subset_iff]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx y z : α\n⊢ ordConnectedComponent s x = ∅ ↔ ¬x ∈ s\n[PROOFSTEP]\nrw [← not_nonempty_iff_eq_empty, nonempty_ordConnectedComponent]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx y z : α\n⊢ ordConnectedComponent univ x = univ\n[PROOFSTEP]\nsimp [ordConnectedComponent]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns✝ t✝ : Set α\nx✝ y z : α\ns t : Set α\nx : α\n⊢ ordConnectedComponent (s ∩ t) x = ordConnectedComponent s x ∩ ordConnectedComponent t x\n[PROOFSTEP]\nsimp [ordConnectedComponent, setOf_and]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx y z : α\n⊢ y ∈ ordConnectedComponent s x ↔ x ∈ ordConnectedComponent s y\n[PROOFSTEP]\nrw [mem_ordConnectedComponent, mem_ordConnectedComponent, uIcc_comm]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y✝ z : α\nx y : ↑s\n⊢ ordConnectedProj s x = ordConnectedProj s y ↔ [[↑x, ↑y]] ⊆ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y✝ z : α\nx y : ↑s\n⊢ ordConnectedProj s x = ordConnectedProj s y → [[↑x, ↑y]] ⊆ s\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y✝ z : α\nx y : ↑s\n⊢ [[↑x, ↑y]] ⊆ s → ordConnectedProj s x = ordConnectedProj s y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y✝ z : α\nx y : ↑s\nh : ordConnectedProj s x = ordConnectedProj s y\n⊢ [[↑x, ↑y]] ⊆ s\n[PROOFSTEP]\nrw [← mem_ordConnectedComponent, ← ordConnectedComponent_ordConnectedProj, h, ordConnectedComponent_ordConnectedProj,\n  self_mem_ordConnectedComponent]\n[GOAL]\ncase mp\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y✝ z : α\nx y : ↑s\nh : ordConnectedProj s x = ordConnectedProj s y\n⊢ ↑y ∈ s\n[PROOFSTEP]\nexact y.2\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y✝ z : α\nx y : ↑s\nh : [[↑x, ↑y]] ⊆ s\n⊢ ordConnectedProj s x = ordConnectedProj s y\n[PROOFSTEP]\nsimp only [ordConnectedProj, ordConnectedComponent_eq h]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns✝ t : Set α\nx y z : α\ns : Set α\n⊢ ordConnectedSection (↑ofDual ⁻¹' s) = ↑ofDual ⁻¹' ordConnectedSection s\n[PROOFSTEP]\nsimp_rw [ordConnectedSection, ordConnectedProj]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns✝ t : Set α\nx y z : α\ns : Set α\n⊢ (range fun x => Nonempty.some (_ : Set.Nonempty (ordConnectedComponent (↑ofDual ⁻¹' s) ↑x))) =\n    ↑ofDual ⁻¹' range fun x => Nonempty.some (_ : Set.Nonempty (ordConnectedComponent s ↑x))\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : LinearOrder α\ns✝ t : Set α\nx✝ y z : α\ns : Set α\nx : αᵒᵈ\n⊢ (x ∈ range fun x => Nonempty.some (_ : Set.Nonempty (ordConnectedComponent (↑ofDual ⁻¹' s) ↑x))) ↔\n    x ∈ ↑ofDual ⁻¹' range fun x => Nonempty.some (_ : Set.Nonempty (ordConnectedComponent s ↑x))\n[PROOFSTEP]\nsimp [dual_ordConnectedComponent]\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : LinearOrder α\ns✝ t : Set α\nx✝ y z : α\ns : Set α\nx : αᵒᵈ\n⊢ (∃ a h, Nonempty.some (_ : Set.Nonempty (↑ofDual ⁻¹' ordConnectedComponent s a)) = x) ↔\n    ∃ a h, Nonempty.some (_ : Set.Nonempty (ordConnectedComponent s ↑{ val := a, property := (_ : a ∈ s) })) = ↑ofDual x\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx y z : α\nhx : x ∈ ordConnectedSection s\nhy : y ∈ ordConnectedSection s\nh : [[x, y]] ⊆ s\n⊢ x = y\n[PROOFSTEP]\nrcases hx with ⟨x, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\ny z : α\nhy : y ∈ ordConnectedSection s\nx : ↑s\nh : [[ordConnectedProj s x, y]] ⊆ s\n⊢ ordConnectedProj s x = y\n[PROOFSTEP]\nrcases hy with ⟨y, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nz : α\nx y : ↑s\nh : [[ordConnectedProj s x, ordConnectedProj s y]] ⊆ s\n⊢ ordConnectedProj s x = ordConnectedProj s y\n[PROOFSTEP]\nexact\n  ordConnectedProj_eq.2\n    (mem_ordConnectedComponent_trans\n      (mem_ordConnectedComponent_trans (ordConnectedProj_mem_ordConnectedComponent _ _) h)\n      (mem_ordConnectedComponent_ordConnectedProj _ _))\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx y z : α\n⊢ ordSeparatingSet (↑ofDual ⁻¹' s) (↑ofDual ⁻¹' t) = ↑ofDual ⁻¹' ordSeparatingSet s t\n[PROOFSTEP]\nsimp only [ordSeparatingSet, mem_preimage, ← toDual.surjective.iUnion_comp, ofDual_toDual, dual_ordConnectedComponent, ←\n  preimage_compl, preimage_inter, preimage_iUnion]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx y z : α\n⊢ Disjoint (ordT5Nhd s t) (ordT5Nhd t s)\n[PROOFSTEP]\nrw [disjoint_iff_inf_le]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx y z : α\n⊢ ordT5Nhd s t ⊓ ordT5Nhd t s ≤ ⊥\n[PROOFSTEP]\nrintro x ⟨hx₁, hx₂⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x : α\nhx₁ : x ∈ ordT5Nhd s t\nhx₂ : x ∈ ordT5Nhd t s\n⊢ x ∈ ⊥\n[PROOFSTEP]\nrcases mem_iUnion₂.1 hx₁ with ⟨a, has, ha⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x : α\nhx₁ : x ∈ ordT5Nhd s t\nhx₂ : x ∈ ordT5Nhd t s\na : α\nhas : a ∈ s\nha : x ∈ ordConnectedComponent (tᶜ ∩ (ordConnectedSection (ordSeparatingSet s t))ᶜ) a\n⊢ x ∈ ⊥\n[PROOFSTEP]\nclear hx₁\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x : α\nhx₂ : x ∈ ordT5Nhd t s\na : α\nhas : a ∈ s\nha : x ∈ ordConnectedComponent (tᶜ ∩ (ordConnectedSection (ordSeparatingSet s t))ᶜ) a\n⊢ x ∈ ⊥\n[PROOFSTEP]\nrcases mem_iUnion₂.1 hx₂ with ⟨b, hbt, hb⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x : α\nhx₂ : x ∈ ordT5Nhd t s\na : α\nhas : a ∈ s\nha : x ∈ ordConnectedComponent (tᶜ ∩ (ordConnectedSection (ordSeparatingSet s t))ᶜ) a\nb : α\nhbt : b ∈ t\nhb : x ∈ ordConnectedComponent (sᶜ ∩ (ordConnectedSection (ordSeparatingSet t s))ᶜ) b\n⊢ x ∈ ⊥\n[PROOFSTEP]\nclear hx₂\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nha : x ∈ ordConnectedComponent (tᶜ ∩ (ordConnectedSection (ordSeparatingSet s t))ᶜ) a\nb : α\nhbt : b ∈ t\nhb : x ∈ ordConnectedComponent (sᶜ ∩ (ordConnectedSection (ordSeparatingSet t s))ᶜ) b\n⊢ x ∈ ⊥\n[PROOFSTEP]\nrw [mem_ordConnectedComponent, subset_inter_iff] at ha hb \n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nb : α\nhbt : b ∈ t\nhb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\n⊢ x ∈ ⊥\n[PROOFSTEP]\ncases' le_total a b with hab hab\n[GOAL]\ncase intro.intro.intro.intro.intro.inl\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nb : α\nhbt : b ∈ t\nhb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\nhab : a ≤ b\n⊢ x ∈ ⊥\ncase intro.intro.intro.intro.intro.inr\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nb : α\nhbt : b ∈ t\nhb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\nhab : b ≤ a\n⊢ x ∈ ⊥\n[PROOFSTEP]\non_goal 2 => swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt\n[GOAL]\ncase intro.intro.intro.intro.intro.inl\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nb : α\nhbt : b ∈ t\nhb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\nhab : a ≤ b\n⊢ x ∈ ⊥\ncase intro.intro.intro.intro.intro.inr\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nb : α\nhbt : b ∈ t\nhb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\nhab : b ≤ a\n⊢ x ∈ ⊥\n[PROOFSTEP]\non_goal 2 => swap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt\n[GOAL]\ncase intro.intro.intro.intro.intro.inr\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nb : α\nhbt : b ∈ t\nhb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\nhab : b ≤ a\n⊢ x ∈ ⊥\n[PROOFSTEP]\nswap_var a ↔ b, s ↔ t, ha ↔ hb, has ↔ hbt\n[GOAL]\ncase intro.intro.intro.intro.intro.inl\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nb : α\nhbt : b ∈ t\nhb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\nhab : a ≤ b\n⊢ x ∈ ⊥\ncase intro.intro.intro.intro.intro.inr\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\nhb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\na : α\nhas : a ∈ s\nha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhab : a ≤ b\n⊢ x ∈ ⊥\n[PROOFSTEP]\nall_goals\n  -- porting note: wlog not implemented yet, the following replaces the three previous lines\n  -- wlog (discharger := tactic.skip) hab : a ≤ b := le_total a b using a b s t, b a t s\n  cases' ha with ha ha'\n  cases' hb with hb hb'\n  have hsub : [[a, b]] ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ :=\n    by\n    rw [ordSeparatingSet_comm, uIcc_comm] at hb' \n    calc\n      [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc\n      _ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' hb'\n  clear ha' hb'\n  cases' le_total x a with hxa hax\n  · exact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has\n  cases' le_total b x with hbx hxb\n  · exact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt\n  have h' : x ∈ ordSeparatingSet s t :=\n    ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨b, hbt, hb⟩⟩\n      -- porting note: lift not implemented yet\n          -- lift x to ordSeparatingSet s t using this\n  suffices : ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]\n  exact hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)\n  rintro y (hy : [[x, y]] ⊆ ordSeparatingSet s t)\n  rw [uIcc_of_le hab, mem_Icc, ← not_lt, ← not_lt]\n  have sol1 := fun (hya : y < a) =>\n    (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_left_ordSeparatingSet has\n      (hy <| Icc_subset_uIcc' ⟨hya.le, hax⟩)\n  have sol2 := fun (hby : b < y) =>\n    (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_right_ordSeparatingSet hbt\n      (hy <| Icc_subset_uIcc ⟨hxb, hby.le⟩)\n  exact ⟨sol1, sol2⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.inl\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nb : α\nhbt : b ∈ t\nhb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\nhab : a ≤ b\n⊢ x ∈ ⊥\n[PROOFSTEP]\ncases' ha with ha ha'\n[GOAL]\ncase intro.intro.intro.intro.intro.inl.intro\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nha' : [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\n⊢ x ∈ ⊥\n[PROOFSTEP]\ncases' hb with hb hb'\n[GOAL]\ncase intro.intro.intro.intro.intro.inl.intro.intro\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nha' : [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhb : [[b, x]] ⊆ sᶜ\nhb' : [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\n⊢ x ∈ ⊥\n[PROOFSTEP]\nhave hsub : [[a, b]] ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ :=\n  by\n  rw [ordSeparatingSet_comm, uIcc_comm] at hb' \n  calc\n    [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc\n    _ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' hb'\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nha' : [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhb : [[b, x]] ⊆ sᶜ\nhb' : [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\n⊢ [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\n[PROOFSTEP]\nrw [ordSeparatingSet_comm, uIcc_comm] at hb' \n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nha' : [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhb : [[b, x]] ⊆ sᶜ\nhb' : [[x, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\n⊢ [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\n[PROOFSTEP]\ncalc\n  [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc\n  _ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' hb'\n[GOAL]\ncase intro.intro.intro.intro.intro.inl.intro.intro\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nha' : [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhb : [[b, x]] ⊆ sᶜ\nhb' : [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\n⊢ x ∈ ⊥\n[PROOFSTEP]\nclear ha' hb'\n[GOAL]\ncase intro.intro.intro.intro.intro.inl.intro.intro\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\n⊢ x ∈ ⊥\n[PROOFSTEP]\ncases' le_total x a with hxa hax\n[GOAL]\ncase intro.intro.intro.intro.intro.inl.intro.intro.inl\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhxa : x ≤ a\n⊢ x ∈ ⊥\n[PROOFSTEP]\nexact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has\n[GOAL]\ncase intro.intro.intro.intro.intro.inl.intro.intro.inr\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\n⊢ x ∈ ⊥\n[PROOFSTEP]\ncases' le_total b x with hbx hxb\n[GOAL]\ncase intro.intro.intro.intro.intro.inl.intro.intro.inr.inl\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhbx : b ≤ x\n⊢ x ∈ ⊥\n[PROOFSTEP]\nexact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt\n[GOAL]\ncase intro.intro.intro.intro.intro.inl.intro.intro.inr.inr\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\n⊢ x ∈ ⊥\n[PROOFSTEP]\nhave h' : x ∈ ordSeparatingSet s t :=\n  ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨b, hbt, hb⟩⟩\n    -- porting note: lift not implemented yet\n        -- lift x to ordSeparatingSet s t using this\n[GOAL]\ncase intro.intro.intro.intro.intro.inl.intro.intro.inr.inr\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\n⊢ x ∈ ⊥\n[PROOFSTEP]\nsuffices : ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]\n[GOAL]\ncase intro.intro.intro.intro.intro.inl.intro.intro.inr.inr\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\nthis : ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]\n⊢ x ∈ ⊥\ncase this\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\n⊢ ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]\n[PROOFSTEP]\nexact hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)\n[GOAL]\ncase this\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\n⊢ ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]\n[PROOFSTEP]\nrintro y (hy : [[x, y]] ⊆ ordSeparatingSet s t)\n[GOAL]\ncase this\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y✝ z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\ny : α\nhy : [[x, y]] ⊆ ordSeparatingSet s t\n⊢ y ∈ [[a, b]]\n[PROOFSTEP]\nrw [uIcc_of_le hab, mem_Icc, ← not_lt, ← not_lt]\n[GOAL]\ncase this\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y✝ z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\ny : α\nhy : [[x, y]] ⊆ ordSeparatingSet s t\n⊢ ¬y < a ∧ ¬b < y\n[PROOFSTEP]\nhave sol1 := fun (hya : y < a) =>\n  (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_left_ordSeparatingSet has\n    (hy <| Icc_subset_uIcc' ⟨hya.le, hax⟩)\n[GOAL]\ncase this\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y✝ z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\ny : α\nhy : [[x, y]] ⊆ ordSeparatingSet s t\nsol1 : y < a → False\n⊢ ¬y < a ∧ ¬b < y\n[PROOFSTEP]\nhave sol2 := fun (hby : b < y) =>\n  (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_right_ordSeparatingSet hbt\n    (hy <| Icc_subset_uIcc ⟨hxb, hby.le⟩)\n[GOAL]\ncase this\nα : Type u_1\ninst✝ : LinearOrder α\ns t : Set α\nx✝ y✝ z x a : α\nhas : a ∈ s\nb : α\nhbt : b ∈ t\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\ny : α\nhy : [[x, y]] ⊆ ordSeparatingSet s t\nsol1 : y < a → False\nsol2 : b < y → False\n⊢ ¬y < a ∧ ¬b < y\n[PROOFSTEP]\nexact ⟨sol1, sol2⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.inr\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\nhb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\na : α\nhas : a ∈ s\nha : [[a, x]] ⊆ tᶜ ∧ [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhab : a ≤ b\n⊢ x ∈ ⊥\n[PROOFSTEP]\ncases' ha with ha ha'\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.intro\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\nhb : [[b, x]] ⊆ sᶜ ∧ [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nha' : [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\n⊢ x ∈ ⊥\n[PROOFSTEP]\ncases' hb with hb hb'\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.intro.intro\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nha' : [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhb : [[b, x]] ⊆ sᶜ\nhb' : [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\n⊢ x ∈ ⊥\n[PROOFSTEP]\nhave hsub : [[a, b]] ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ :=\n  by\n  rw [ordSeparatingSet_comm, uIcc_comm] at hb' \n  calc\n    [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc\n    _ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' hb'\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nha' : [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhb : [[b, x]] ⊆ sᶜ\nhb' : [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\n⊢ [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\n[PROOFSTEP]\nrw [ordSeparatingSet_comm, uIcc_comm] at hb' \n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nha' : [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhb : [[b, x]] ⊆ sᶜ\nhb' : [[x, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\n⊢ [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\n[PROOFSTEP]\ncalc\n  [[a, b]] ⊆ [[a, x]] ∪ [[x, b]] := uIcc_subset_uIcc_union_uIcc\n  _ ⊆ (ordSeparatingSet s t).ordConnectedSectionᶜ := union_subset ha' hb'\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.intro.intro\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nha' : [[a, x]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhb : [[b, x]] ⊆ sᶜ\nhb' : [[b, x]] ⊆ (ordConnectedSection (ordSeparatingSet t s))ᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\n⊢ x ∈ ⊥\n[PROOFSTEP]\nclear ha' hb'\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.intro.intro\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\n⊢ x ∈ ⊥\n[PROOFSTEP]\ncases' le_total x a with hxa hax\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.intro.intro.inl\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhxa : x ≤ a\n⊢ x ∈ ⊥\n[PROOFSTEP]\nexact hb (Icc_subset_uIcc' ⟨hxa, hab⟩) has\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.intro.intro.inr\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\n⊢ x ∈ ⊥\n[PROOFSTEP]\ncases' le_total b x with hbx hxb\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.intro.intro.inr.inl\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhbx : b ≤ x\n⊢ x ∈ ⊥\n[PROOFSTEP]\nexact ha (Icc_subset_uIcc ⟨hab, hbx⟩) hbt\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.intro.intro.inr.inr\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\n⊢ x ∈ ⊥\n[PROOFSTEP]\nhave h' : x ∈ ordSeparatingSet s t :=\n  ⟨mem_iUnion₂.2 ⟨a, has, ha⟩, mem_iUnion₂.2 ⟨b, hbt, hb⟩⟩\n    -- porting note: lift not implemented yet\n        -- lift x to ordSeparatingSet s t using this\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.intro.intro.inr.inr\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\n⊢ x ∈ ⊥\n[PROOFSTEP]\nsuffices : ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]\n[GOAL]\ncase intro.intro.intro.intro.intro.inr.intro.intro.inr.inr\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\nthis : ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]\n⊢ x ∈ ⊥\ncase this\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\n⊢ ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]\n[PROOFSTEP]\nexact hsub (this <| ordConnectedProj_mem_ordConnectedComponent _ ⟨x, h'⟩) (mem_range_self _)\n[GOAL]\ncase this\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\n⊢ ordConnectedComponent (ordSeparatingSet s t) x ⊆ [[a, b]]\n[PROOFSTEP]\nrintro y (hy : [[x, y]] ⊆ ordSeparatingSet s t)\n[GOAL]\ncase this\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y✝ z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\ny : α\nhy : [[x, y]] ⊆ ordSeparatingSet s t\n⊢ y ∈ [[a, b]]\n[PROOFSTEP]\nrw [uIcc_of_le hab, mem_Icc, ← not_lt, ← not_lt]\n[GOAL]\ncase this\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y✝ z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\ny : α\nhy : [[x, y]] ⊆ ordSeparatingSet s t\n⊢ ¬y < a ∧ ¬b < y\n[PROOFSTEP]\nhave sol1 := fun (hya : y < a) =>\n  (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_left_ordSeparatingSet has\n    (hy <| Icc_subset_uIcc' ⟨hya.le, hax⟩)\n[GOAL]\ncase this\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y✝ z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\ny : α\nhy : [[x, y]] ⊆ ordSeparatingSet s t\nsol1 : y < a → False\n⊢ ¬y < a ∧ ¬b < y\n[PROOFSTEP]\nhave sol2 := fun (hby : b < y) =>\n  (disjoint_left (t := ordSeparatingSet s t)).1 disjoint_right_ordSeparatingSet hbt\n    (hy <| Icc_subset_uIcc ⟨hxb, hby.le⟩)\n[GOAL]\ncase this\nα : Type u_1\ninst✝ : LinearOrder α\nt s : Set α\nx✝ y✝ z x b : α\nhbt : b ∈ t\na : α\nhas : a ∈ s\nhab : a ≤ b\nha : [[a, x]] ⊆ tᶜ\nhb : [[b, x]] ⊆ sᶜ\nhsub : [[a, b]] ⊆ (ordConnectedSection (ordSeparatingSet s t))ᶜ\nhax : a ≤ x\nhxb : x ≤ b\nh' : x ∈ ordSeparatingSet s t\ny : α\nhy : [[x, y]] ⊆ ordSeparatingSet s t\nsol1 : y < a → False\nsol2 : b < y → False\n⊢ ¬y < a ∧ ¬b < y\n[PROOFSTEP]\nexact ⟨sol1, sol2⟩\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Intervals.OrdConnectedComponent", "llama_tokens": 13624, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6113819591324416, "lm_q2_score": 0.5926665999540698, "lm_q1q2_score": 0.3623456669922822}}
{"text": "[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\np q : StarSubalgebra R A\nh : (fun S => S.carrier) p = (fun S => S.carrier) q\n⊢ p = q\n[PROOFSTEP]\nobtain ⟨⟨⟨⟨⟨_, _⟩, _⟩, _⟩, _⟩, _⟩ := p\n[GOAL]\ncase mk.mk.mk.mk.mk\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nq : StarSubalgebra R A\ncarrier✝ : Set A\nmul_mem'✝ : ∀ {a b : A}, a ∈ carrier✝ → b ∈ carrier✝ → a * b ∈ carrier✝\none_mem'✝ : 1 ∈ { carrier := carrier✝, mul_mem' := mul_mem'✝ }.carrier\nadd_mem'✝ :\n  ∀ {a b : A},\n    a ∈\n        { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ },\n              one_mem' := one_mem'✝ }.toSubsemigroup.carrier →\n      b ∈\n          { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ },\n                one_mem' := one_mem'✝ }.toSubsemigroup.carrier →\n        a + b ∈\n          { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ },\n                one_mem' := one_mem'✝ }.toSubsemigroup.carrier\nzero_mem'✝ :\n  0 ∈ { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ }.toSubsemigroup.carrier\nalgebraMap_mem'✝ :\n  ∀ (r : R),\n    ↑(algebraMap R A) r ∈\n      { toSubmonoid := { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },\n              add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ }.toSubmonoid.toSubsemigroup.carrier\nstar_mem'✝ :\n  ∀ {a : A},\n    a ∈\n        {\n                  toSubsemiring :=\n                    {\n                      toSubmonoid :=\n                        { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },\n                      add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ },\n                  algebraMap_mem' := algebraMap_mem'✝ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →\n      star a ∈\n        {\n                  toSubsemiring :=\n                    {\n                      toSubmonoid :=\n                        { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },\n                      add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ },\n                  algebraMap_mem' := algebraMap_mem'✝ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\nh :\n  (fun S => S.carrier)\n      {\n        toSubalgebra :=\n          {\n            toSubsemiring :=\n              {\n                toSubmonoid :=\n                  { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },\n                add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ },\n            algebraMap_mem' := algebraMap_mem'✝ },\n        star_mem' := star_mem'✝ } =\n    (fun S => S.carrier) q\n⊢ {\n      toSubalgebra :=\n        {\n          toSubsemiring :=\n            {\n              toSubmonoid :=\n                { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },\n              add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ },\n          algebraMap_mem' := algebraMap_mem'✝ },\n      star_mem' := star_mem'✝ } =\n    q\n[PROOFSTEP]\ncases q\n[GOAL]\ncase mk.mk.mk.mk.mk.mk\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\ncarrier✝ : Set A\nmul_mem'✝ : ∀ {a b : A}, a ∈ carrier✝ → b ∈ carrier✝ → a * b ∈ carrier✝\none_mem'✝ : 1 ∈ { carrier := carrier✝, mul_mem' := mul_mem'✝ }.carrier\nadd_mem'✝ :\n  ∀ {a b : A},\n    a ∈\n        { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ },\n              one_mem' := one_mem'✝ }.toSubsemigroup.carrier →\n      b ∈\n          { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ },\n                one_mem' := one_mem'✝ }.toSubsemigroup.carrier →\n        a + b ∈\n          { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ },\n                one_mem' := one_mem'✝ }.toSubsemigroup.carrier\nzero_mem'✝ :\n  0 ∈ { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ }.toSubsemigroup.carrier\nalgebraMap_mem'✝ :\n  ∀ (r : R),\n    ↑(algebraMap R A) r ∈\n      { toSubmonoid := { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },\n              add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ }.toSubmonoid.toSubsemigroup.carrier\nstar_mem'✝¹ :\n  ∀ {a : A},\n    a ∈\n        {\n                  toSubsemiring :=\n                    {\n                      toSubmonoid :=\n                        { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },\n                      add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ },\n                  algebraMap_mem' := algebraMap_mem'✝ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →\n      star a ∈\n        {\n                  toSubsemiring :=\n                    {\n                      toSubmonoid :=\n                        { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },\n                      add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ },\n                  algebraMap_mem' := algebraMap_mem'✝ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\ntoSubalgebra✝ : Subalgebra R A\nstar_mem'✝ : ∀ {a : A}, a ∈ toSubalgebra✝.carrier → star a ∈ toSubalgebra✝.carrier\nh :\n  (fun S => S.carrier)\n      {\n        toSubalgebra :=\n          {\n            toSubsemiring :=\n              {\n                toSubmonoid :=\n                  { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },\n                add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ },\n            algebraMap_mem' := algebraMap_mem'✝ },\n        star_mem' := star_mem'✝¹ } =\n    (fun S => S.carrier) { toSubalgebra := toSubalgebra✝, star_mem' := star_mem'✝ }\n⊢ {\n      toSubalgebra :=\n        {\n          toSubsemiring :=\n            {\n              toSubmonoid :=\n                { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },\n              add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ },\n          algebraMap_mem' := algebraMap_mem'✝ },\n      star_mem' := star_mem'✝¹ } =\n    { toSubalgebra := toSubalgebra✝, star_mem' := star_mem'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS T : StarSubalgebra R A\nh : S.toSubalgebra = T.toSubalgebra\nx : A\n⊢ x ∈ S ↔ x ∈ T\n[PROOFSTEP]\nrw [← mem_toSubalgebra, ← mem_toSubalgebra, h]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\ns : Set A\nhs : s = ↑S\na : A\nha : a ∈ (Subalgebra.copy S.toSubalgebra s hs).toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n⊢ a ∈ S.carrier\n[PROOFSTEP]\nsimpa [hs] using ha\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\na : A\nhs : ↑S = ↑S\nha : a ∈ (Subalgebra.copy S.toSubalgebra (↑S) hs).toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n⊢ a ∈ S.carrier\n[PROOFSTEP]\nsimpa [hs] using ha\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\n⊢ { x // x ∈ S } →⋆ₐ[R] A\n[PROOFSTEP]\nrefine' { toFun := ((↑) : S → A), .. }\n[GOAL]\ncase refine'_1\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\n⊢ ↑1 = 1\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\n⊢ ∀ (x y : { x // x ∈ S }),\n    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n          map_mul' :=\n            (_ :\n              ∀ (x y : { x // x ∈ S }),\n                OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                  OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n      0 =\n    0\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\n⊢ ∀ (x y : { x // x ∈ S }),\n    OneHom.toFun\n        (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n            map_mul' :=\n              (_ :\n                ∀ (x y : { x // x ∈ S }),\n                  OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n        (x + y) =\n      OneHom.toFun\n          (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : { x // x ∈ S }),\n                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n          x +\n        OneHom.toFun\n          (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : { x // x ∈ S }),\n                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n          y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\n⊢ ∀ (r : R),\n    OneHom.toFun\n        (↑↑{\n              toMonoidHom :=\n                { toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : { x // x ∈ S }),\n                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                          OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                            OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) },\n              map_zero' := ?refine'_3,\n              map_add' :=\n                (_ :\n                  ∀ (x y : { x // x ∈ S }),\n                    OneHom.toFun\n                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : { x // x ∈ S }),\n                                  OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n                        (x + y) =\n                      OneHom.toFun\n                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (x y : { x // x ∈ S }),\n                                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n                          x +\n                        OneHom.toFun\n                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (x y : { x // x ∈ S }),\n                                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n                          y) })\n        (↑(algebraMap R { x // x ∈ S }) r) =\n      ↑(algebraMap R A) r\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\n⊢ ∀ (x : { x // x ∈ S }),\n    OneHom.toFun\n        (↑↑↑{\n                toRingHom :=\n                  {\n                    toMonoidHom :=\n                      { toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                        map_mul' :=\n                          (_ :\n                            ∀ (x y : { x // x ∈ S }),\n                              OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                  OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) },\n                    map_zero' := ?refine'_3,\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : { x // x ∈ S }),\n                          OneHom.toFun\n                              (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                  map_mul' :=\n                                    (_ :\n                                      ∀ (x y : { x // x ∈ S }),\n                                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                          OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                            OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n                              (x + y) =\n                            OneHom.toFun\n                                (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                    map_mul' :=\n                                      (_ :\n                                        ∀ (x y : { x // x ∈ S }),\n                                          OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                            OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                              OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n                                x +\n                              OneHom.toFun\n                                (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                    map_mul' :=\n                                      (_ :\n                                        ∀ (x y : { x // x ∈ S }),\n                                          OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                            OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                              OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n                                y) },\n                commutes' :=\n                  (_ :\n                    ∀ (r : R),\n                      OneHom.toFun\n                          (↑↑{\n                                toMonoidHom :=\n                                  { toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                    map_mul' :=\n                                      (_ :\n                                        ∀ (x y : { x // x ∈ S }),\n                                          OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                            OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                              OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) },\n                                map_zero' := ?refine'_3,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : { x // x ∈ S }),\n                                      OneHom.toFun\n                                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                              map_mul' :=\n                                                (_ :\n                                                  ∀ (x y : { x // x ∈ S }),\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                        (x * y) =\n                                                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                          y) })\n                                          (x + y) =\n                                        OneHom.toFun\n                                            (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                                map_mul' :=\n                                                  (_ :\n                                                    ∀ (x y : { x // x ∈ S }),\n                                                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                          (x * y) =\n                                                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                            x *\n                                                          OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                            y) })\n                                            x +\n                                          OneHom.toFun\n                                            (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                                map_mul' :=\n                                                  (_ :\n                                                    ∀ (x y : { x // x ∈ S }),\n                                                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                          (x * y) =\n                                                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                            x *\n                                                          OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                            y) })\n                                            y) })\n                          (↑(algebraMap R { x // x ∈ S }) r) =\n                        ↑(algebraMap R A) r) })\n        (star x) =\n      star\n        (OneHom.toFun\n          (↑↑↑{\n                  toRingHom :=\n                    {\n                      toMonoidHom :=\n                        { toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                          map_mul' :=\n                            (_ :\n                              ∀ (x y : { x // x ∈ S }),\n                                OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                  OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) },\n                      map_zero' := ?refine'_3,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : { x // x ∈ S }),\n                            OneHom.toFun\n                                (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                    map_mul' :=\n                                      (_ :\n                                        ∀ (x y : { x // x ∈ S }),\n                                          OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                            OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                              OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n                                (x + y) =\n                              OneHom.toFun\n                                  (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                      map_mul' :=\n                                        (_ :\n                                          ∀ (x y : { x // x ∈ S }),\n                                            OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                              OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                                OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n                                  x +\n                                OneHom.toFun\n                                  (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                      map_mul' :=\n                                        (_ :\n                                          ∀ (x y : { x // x ∈ S }),\n                                            OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                              OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                                OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n                                  y) },\n                  commutes' :=\n                    (_ :\n                      ∀ (r : R),\n                        OneHom.toFun\n                            (↑↑{\n                                  toMonoidHom :=\n                                    { toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                      map_mul' :=\n                                        (_ :\n                                          ∀ (x y : { x // x ∈ S }),\n                                            OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =\n                                              OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *\n                                                OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) },\n                                  map_zero' := ?refine'_3,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (x y : { x // x ∈ S }),\n                                        OneHom.toFun\n                                            (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                                map_mul' :=\n                                                  (_ :\n                                                    ∀ (x y : { x // x ∈ S }),\n                                                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                          (x * y) =\n                                                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                            x *\n                                                          OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                            y) })\n                                            (x + y) =\n                                          OneHom.toFun\n                                              (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                                  map_mul' :=\n                                                    (_ :\n                                                      ∀ (x y : { x // x ∈ S }),\n                                                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                            (x * y) =\n                                                          OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                              x *\n                                                            OneHom.toFun\n                                                              { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n                                              x +\n                                            OneHom.toFun\n                                              (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },\n                                                  map_mul' :=\n                                                    (_ :\n                                                      ∀ (x y : { x // x ∈ S }),\n                                                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                            (x * y) =\n                                                          OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 }\n                                                              x *\n                                                            OneHom.toFun\n                                                              { toFun := Subtype.val, map_one' := ?refine'_1 } y) })\n                                              y) })\n                            (↑(algebraMap R { x // x ∈ S }) r) =\n                          ↑(algebraMap R A) r) })\n          x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\n⊢ ↑1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\nx✝ y✝ : { x // x ∈ S }\n⊢ OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x✝ * y✝) =\n    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } x✝ *\n      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } y✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : { x // x ∈ S }),\n                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n      0 =\n    0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\nx✝ y✝ : { x // x ∈ S }\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : { x // x ∈ S }),\n                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n      (x✝ + y✝) =\n    OneHom.toFun\n        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : { x // x ∈ S }),\n                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n        x✝ +\n      OneHom.toFun\n        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : { x // x ∈ S }),\n                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n        y✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_5\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\nr✝ : R\n⊢ OneHom.toFun\n      (↑↑{\n            toMonoidHom :=\n              { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : { x // x ∈ S }),\n                      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                        OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) },\n            map_zero' :=\n              (_ :\n                OneHom.toFun\n                    (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (x y : { x // x ∈ S }),\n                              OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n                    0 =\n                  OneHom.toFun\n                    (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (x y : { x // x ∈ S }),\n                              OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n                    0),\n            map_add' :=\n              (_ :\n                ∀ (x y : { x // x ∈ S }),\n                  OneHom.toFun\n                      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (x y : { x // x ∈ S }),\n                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n                      (x + y) =\n                    OneHom.toFun\n                      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (x y : { x // x ∈ S }),\n                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n                      (x + y)) })\n      (↑(algebraMap R { x // x ∈ S }) r✝) =\n    ↑(algebraMap R A) r✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_6\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\nx✝ : { x // x ∈ S }\n⊢ OneHom.toFun\n      (↑↑↑{\n              toRingHom :=\n                {\n                  toMonoidHom :=\n                    { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                      map_mul' :=\n                        (_ :\n                          ∀ (x y : { x // x ∈ S }),\n                            OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                              OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) },\n                  map_zero' :=\n                    (_ :\n                      OneHom.toFun\n                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (x y : { x // x ∈ S }),\n                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n                          0 =\n                        OneHom.toFun\n                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (x y : { x // x ∈ S }),\n                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n                          0),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : { x // x ∈ S }),\n                        OneHom.toFun\n                            (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (x y : { x // x ∈ S }),\n                                      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                        OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n                            (x + y) =\n                          OneHom.toFun\n                            (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (x y : { x // x ∈ S }),\n                                      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                        OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n                            (x + y)) },\n              commutes' :=\n                (_ :\n                  ∀ (r : R),\n                    OneHom.toFun\n                        (↑↑{\n                              toMonoidHom :=\n                                { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                  map_mul' :=\n                                    (_ :\n                                      ∀ (x y : { x // x ∈ S }),\n                                        OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                          OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) },\n                              map_zero' :=\n                                (_ :\n                                  OneHom.toFun\n                                      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                          map_mul' :=\n                                            (_ :\n                                              ∀ (x y : { x // x ∈ S }),\n                                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                    (x * y) =\n                                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                    (x * y)) })\n                                      0 =\n                                    OneHom.toFun\n                                      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                          map_mul' :=\n                                            (_ :\n                                              ∀ (x y : { x // x ∈ S }),\n                                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                    (x * y) =\n                                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                    (x * y)) })\n                                      0),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : { x // x ∈ S }),\n                                    OneHom.toFun\n                                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                            map_mul' :=\n                                              (_ :\n                                                ∀ (x y : { x // x ∈ S }),\n                                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y) =\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y)) })\n                                        (x + y) =\n                                      OneHom.toFun\n                                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                            map_mul' :=\n                                              (_ :\n                                                ∀ (x y : { x // x ∈ S }),\n                                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y) =\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y)) })\n                                        (x + y)) })\n                        (↑(algebraMap R { x // x ∈ S }) r) =\n                      OneHom.toFun\n                        (↑↑{\n                              toMonoidHom :=\n                                { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                  map_mul' :=\n                                    (_ :\n                                      ∀ (x y : { x // x ∈ S }),\n                                        OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                          OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) },\n                              map_zero' :=\n                                (_ :\n                                  OneHom.toFun\n                                      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                          map_mul' :=\n                                            (_ :\n                                              ∀ (x y : { x // x ∈ S }),\n                                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                    (x * y) =\n                                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                    (x * y)) })\n                                      0 =\n                                    OneHom.toFun\n                                      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                          map_mul' :=\n                                            (_ :\n                                              ∀ (x y : { x // x ∈ S }),\n                                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                    (x * y) =\n                                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                    (x * y)) })\n                                      0),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : { x // x ∈ S }),\n                                    OneHom.toFun\n                                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                            map_mul' :=\n                                              (_ :\n                                                ∀ (x y : { x // x ∈ S }),\n                                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y) =\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y)) })\n                                        (x + y) =\n                                      OneHom.toFun\n                                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                            map_mul' :=\n                                              (_ :\n                                                ∀ (x y : { x // x ∈ S }),\n                                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y) =\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y)) })\n                                        (x + y)) })\n                        (↑(algebraMap R { x // x ∈ S }) r)) })\n      (star x✝) =\n    star\n      (OneHom.toFun\n        (↑↑↑{\n                toRingHom :=\n                  {\n                    toMonoidHom :=\n                      { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (x y : { x // x ∈ S }),\n                              OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) },\n                    map_zero' :=\n                      (_ :\n                        OneHom.toFun\n                            (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (x y : { x // x ∈ S }),\n                                      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                        OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n                            0 =\n                          OneHom.toFun\n                            (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (x y : { x // x ∈ S }),\n                                      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                        OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n                            0),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : { x // x ∈ S }),\n                          OneHom.toFun\n                              (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                  map_mul' :=\n                                    (_ :\n                                      ∀ (x y : { x // x ∈ S }),\n                                        OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                          OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n                              (x + y) =\n                            OneHom.toFun\n                              (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                  map_mul' :=\n                                    (_ :\n                                      ∀ (x y : { x // x ∈ S }),\n                                        OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                          OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })\n                              (x + y)) },\n                commutes' :=\n                  (_ :\n                    ∀ (r : R),\n                      OneHom.toFun\n                          (↑↑{\n                                toMonoidHom :=\n                                  { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                    map_mul' :=\n                                      (_ :\n                                        ∀ (x y : { x // x ∈ S }),\n                                          OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                            OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) },\n                                map_zero' :=\n                                  (_ :\n                                    OneHom.toFun\n                                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                            map_mul' :=\n                                              (_ :\n                                                ∀ (x y : { x // x ∈ S }),\n                                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y) =\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y)) })\n                                        0 =\n                                      OneHom.toFun\n                                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                            map_mul' :=\n                                              (_ :\n                                                ∀ (x y : { x // x ∈ S }),\n                                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y) =\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y)) })\n                                        0),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : { x // x ∈ S }),\n                                      OneHom.toFun\n                                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                              map_mul' :=\n                                                (_ :\n                                                  ∀ (x y : { x // x ∈ S }),\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                        (x * y) =\n                                                      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                        (x * y)) })\n                                          (x + y) =\n                                        OneHom.toFun\n                                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                              map_mul' :=\n                                                (_ :\n                                                  ∀ (x y : { x // x ∈ S }),\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                        (x * y) =\n                                                      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                        (x * y)) })\n                                          (x + y)) })\n                          (↑(algebraMap R { x // x ∈ S }) r) =\n                        OneHom.toFun\n                          (↑↑{\n                                toMonoidHom :=\n                                  { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                    map_mul' :=\n                                      (_ :\n                                        ∀ (x y : { x // x ∈ S }),\n                                          OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =\n                                            OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) },\n                                map_zero' :=\n                                  (_ :\n                                    OneHom.toFun\n                                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                            map_mul' :=\n                                              (_ :\n                                                ∀ (x y : { x // x ∈ S }),\n                                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y) =\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y)) })\n                                        0 =\n                                      OneHom.toFun\n                                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                            map_mul' :=\n                                              (_ :\n                                                ∀ (x y : { x // x ∈ S }),\n                                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y) =\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                      (x * y)) })\n                                        0),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : { x // x ∈ S }),\n                                      OneHom.toFun\n                                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                              map_mul' :=\n                                                (_ :\n                                                  ∀ (x y : { x // x ∈ S }),\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                        (x * y) =\n                                                      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                        (x * y)) })\n                                          (x + y) =\n                                        OneHom.toFun\n                                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },\n                                              map_mul' :=\n                                                (_ :\n                                                  ∀ (x y : { x // x ∈ S }),\n                                                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                        (x * y) =\n                                                      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) }\n                                                        (x * y)) })\n                                          (x + y)) })\n                          (↑(algebraMap R { x // x ∈ S }) r)) })\n        x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS✝ : StarSubalgebra R A\nf : A →⋆ₐ[R] B\nS : StarSubalgebra R A\nsrc✝ : Subalgebra R B := Subalgebra.map f.toAlgHom S.toSubalgebra\n⊢ ∀ {a : B},\n    a ∈\n        { toSubsemiring := src✝.toSubsemiring,\n                  algebraMap_mem' :=\n                    (_ :\n                      ∀ (r : R),\n                        ↑(algebraMap R B) r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →\n      star a ∈\n        { toSubsemiring := src✝.toSubsemiring,\n                  algebraMap_mem' :=\n                    (_ :\n                      ∀ (r : R), ↑(algebraMap R B) r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nrintro _ ⟨a, ha, rfl⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS✝ : StarSubalgebra R A\nf : A →⋆ₐ[R] B\nS : StarSubalgebra R A\nsrc✝ : Subalgebra R B := Subalgebra.map f.toAlgHom S.toSubalgebra\na : A\nha : a ∈ ↑S.toSubsemiring\n⊢ star (↑↑f.toAlgHom a) ∈\n    { toSubsemiring := src✝.toSubsemiring,\n              algebraMap_mem' :=\n                (_ : ∀ (r : R), ↑(algebraMap R B) r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nexact map_star f a ▸ Set.mem_image_of_mem _ (S.star_mem' ha)\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS✝ : StarSubalgebra R A\nS : StarSubalgebra R C\ng : B →⋆ₐ[R] C\nf : A →⋆ₐ[R] B\n⊢ ↑(comap f (comap g S)) = ↑(comap (StarAlgHom.comp g f) S)\n[PROOFSTEP]\nexact Set.preimage_preimage\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\ns : Set A\nz : A\n⊢ z ∈ centralizer R s ↔ ∀ (g : A), g ∈ s → g * z = z * g ∧ star g * z = z * star g\n[PROOFSTEP]\nshow (∀ g ∈ s ∪ star s, g * z = z * g) ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\ns : Set A\nz : A\n⊢ (∀ (g : A), g ∈ s ∪ star s → g * z = z * g) ↔ ∀ (g : A), g ∈ s → g * z = z * g ∧ star g * z = z * star g\n[PROOFSTEP]\nsimp only [Set.mem_union, or_imp, forall_and, and_congr_right_iff]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\nC : Type u_5\ninst✝¹³ : CommSemiring R\ninst✝¹² : StarRing R\ninst✝¹¹ : Semiring A\ninst✝¹⁰ : StarRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : StarModule R A\ninst✝⁷ : Semiring B\ninst✝⁶ : StarRing B\ninst✝⁵ : Algebra R B\ninst✝⁴ : StarModule R B\ninst✝³ : Semiring C\ninst✝² : StarRing C\ninst✝¹ : Algebra R C\ninst✝ : StarModule R C\nS : StarSubalgebra R A\ns : Set A\nz : A\n⊢ (∀ (x : A), x ∈ s → x * z = z * x) →\n    ((∀ (x : A), x ∈ star s → x * z = z * x) ↔ ∀ (x : A), x ∈ s → star x * z = z * star x)\n[PROOFSTEP]\nexact fun _ => ⟨fun hz a ha => hz _ (Set.star_mem_star.mpr ha), fun hz a ha => star_star a ▸ hz _ ha⟩\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : Subalgebra R A\nx y : A\nhx : x ∈ star S.carrier\nhy : y ∈ star S.carrier\n⊢ x * y ∈ star S.carrier\n[PROOFSTEP]\nsimp only [Set.mem_star, Subalgebra.mem_carrier] at *\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : Subalgebra R A\nx y : A\nhx : star x ∈ S\nhy : star y ∈ S\n⊢ star (x * y) ∈ S\n[PROOFSTEP]\nexact (star_mul x y).symm ▸ mul_mem hy hx\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : Subalgebra R A\nx y : A\nhx :\n  x ∈\n    {\n          toSubsemigroup :=\n            { carrier := star S.carrier,\n              mul_mem' := (_ : ∀ {x y : A}, x ∈ star S.carrier → y ∈ star S.carrier → x * y ∈ star S.carrier) },\n          one_mem' := (_ : star 1 ∈ S.toSubsemigroup.1) }.toSubsemigroup.carrier\nhy :\n  y ∈\n    {\n          toSubsemigroup :=\n            { carrier := star S.carrier,\n              mul_mem' := (_ : ∀ {x y : A}, x ∈ star S.carrier → y ∈ star S.carrier → x * y ∈ star S.carrier) },\n          one_mem' := (_ : star 1 ∈ S.toSubsemigroup.1) }.toSubsemigroup.carrier\n⊢ x + y ∈\n    {\n          toSubsemigroup :=\n            { carrier := star S.carrier,\n              mul_mem' := (_ : ∀ {x y : A}, x ∈ star S.carrier → y ∈ star S.carrier → x * y ∈ star S.carrier) },\n          one_mem' := (_ : star 1 ∈ S.toSubsemigroup.1) }.toSubsemigroup.carrier\n[PROOFSTEP]\nsimp only [Set.mem_star, Subalgebra.mem_carrier] at *\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : Subalgebra R A\nx y : A\nhx : star x ∈ S\nhy : star y ∈ S\n⊢ star (x + y) ∈ S\n[PROOFSTEP]\nexact (star_add x y).symm ▸ add_mem hx hy\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : Subalgebra R A\nr : R\n⊢ ↑(algebraMap R A) r ∈\n    {\n            toSubmonoid :=\n              {\n                toSubsemigroup :=\n                  { carrier := star S.carrier,\n                    mul_mem' := (_ : ∀ {x y : A}, x ∈ star S.carrier → y ∈ star S.carrier → x * y ∈ star S.carrier) },\n                one_mem' := (_ : star 1 ∈ S.toSubsemigroup.1) },\n            add_mem' :=\n              (_ :\n                ∀ {x y : A},\n                  x ∈\n                      {\n                            toSubsemigroup :=\n                              { carrier := star S.carrier,\n                                mul_mem' :=\n                                  (_ : ∀ {x y : A}, x ∈ star S.carrier → y ∈ star S.carrier → x * y ∈ star S.carrier) },\n                            one_mem' := (_ : star 1 ∈ S.toSubsemigroup.1) }.toSubsemigroup.carrier →\n                    y ∈\n                        {\n                              toSubsemigroup :=\n                                { carrier := star S.carrier,\n                                  mul_mem' :=\n                                    (_ :\n                                      ∀ {x y : A}, x ∈ star S.carrier → y ∈ star S.carrier → x * y ∈ star S.carrier) },\n                              one_mem' := (_ : star 1 ∈ S.toSubsemigroup.1) }.toSubsemigroup.carrier →\n                      x + y ∈\n                        {\n                              toSubsemigroup :=\n                                { carrier := star S.carrier,\n                                  mul_mem' :=\n                                    (_ :\n                                      ∀ {x y : A}, x ∈ star S.carrier → y ∈ star S.carrier → x * y ∈ star S.carrier) },\n                              one_mem' := (_ : star 1 ∈ S.toSubsemigroup.1) }.toSubsemigroup.carrier),\n            zero_mem' := (_ : star 0 ∈ S.toSubsemigroup.1) }.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nsimpa only [Set.mem_star, Subalgebra.mem_carrier, ← algebraMap_star_comm] using S.algebraMap_mem (star r)\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : Subalgebra R A\nx : A\n⊢ star x ∈ star S ↔ x ∈ S\n[PROOFSTEP]\nsimp only [mem_star_iff, star_star]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nthis : ∀ (t : Set A), Algebra.adjoin R (star t) ≤ star (Algebra.adjoin R t)\n⊢ star (Algebra.adjoin R s) ≤ Algebra.adjoin R (star s)\n[PROOFSTEP]\nsimpa only [star_star] using Subalgebra.star_mono (this (star s))\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : Subalgebra R A\na : A\nha : a ∈ (S ⊔ star S).carrier\n⊢ star a ∈ (S ⊔ star S).carrier\n[PROOFSTEP]\nsimp only [Subalgebra.mem_carrier, ← (@Algebra.gi R A _ _ _).l_sup_u _ _] at *\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : Subalgebra R A\na : A\nha : a ∈ Algebra.adjoin R (↑S ⊔ ↑(star S))\n⊢ star a ∈ Algebra.adjoin R (↑S ⊔ ↑(star S))\n[PROOFSTEP]\nrw [← mem_star_iff _ a, star_adjoin_comm, sup_comm]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : Subalgebra R A\na : A\nha : a ∈ Algebra.adjoin R (↑S ⊔ ↑(star S))\n⊢ a ∈ Algebra.adjoin R (star (↑(star S) ⊔ ↑S))\n[PROOFSTEP]\nsimpa using ha\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nsrc✝ : Subalgebra R A := Algebra.adjoin R (s ∪ star s)\na✝ : A\nhx :\n  a✝ ∈\n    { toSubsemiring := src✝.toSubsemiring,\n              algebraMap_mem' :=\n                (_ : ∀ (r : R), ↑(algebraMap R A) r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n⊢ star a✝ ∈\n    { toSubsemiring := src✝.toSubsemiring,\n              algebraMap_mem' :=\n                (_ : ∀ (r : R), ↑(algebraMap R A) r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nrwa [Subalgebra.mem_carrier, ← Subalgebra.mem_star_iff, Subalgebra.star_adjoin_comm, Set.union_star, star_star,\n  Set.union_comm]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\n⊢ GaloisConnection (adjoin R) SetLike.coe\n[PROOFSTEP]\nintro s S\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nS : StarSubalgebra R A\n⊢ adjoin R s ≤ S ↔ s ≤ ↑S\n[PROOFSTEP]\nrw [← toSubalgebra_le_iff, adjoin_toSubalgebra, Algebra.adjoin_le_iff, coe_toSubalgebra]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nS : StarSubalgebra R A\n⊢ s ∪ star s ⊆ ↑S ↔ s ≤ ↑S\n[PROOFSTEP]\nexact\n  ⟨fun h => (Set.subset_union_left s _).trans h, fun h =>\n    Set.union_subset h fun x hx => star_star x ▸ star_mem (show star x ∈ S from h hx)⟩\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\n⊢ p a b\n[PROOFSTEP]\nrefine'\n  Algebra.adjoin_induction₂ ha hb (fun x hx y hy => _) Halg (fun r x hx => _) (fun r x hx => _) Hadd_left Hadd_right\n    Hmul_left Hmul_right\n[GOAL]\ncase refine'_1\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nx : A\nhx : x ∈ s ∪ star s\ny : A\nhy : y ∈ s ∪ star s\n⊢ p x y\n[PROOFSTEP]\ncases' hx with hx hx\n[GOAL]\ncase refine'_1.inl\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nx y : A\nhy : y ∈ s ∪ star s\nhx : x ∈ s\n⊢ p x y\n[PROOFSTEP]\ncases' hy with hy hy\n[GOAL]\ncase refine'_1.inr\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nx y : A\nhy : y ∈ s ∪ star s\nhx : x ∈ star s\n⊢ p x y\n[PROOFSTEP]\ncases' hy with hy hy\n[GOAL]\ncase refine'_1.inl.inl\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nx y : A\nhx : x ∈ s\nhy : y ∈ s\n⊢ p x y\n[PROOFSTEP]\nexact Hs x hx y hy\n[GOAL]\ncase refine'_1.inl.inr\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nx y : A\nhx : x ∈ s\nhy : y ∈ star s\n⊢ p x y\n[PROOFSTEP]\nexact star_star y ▸ Hstar_right _ _ (Hs _ hx _ hy)\n[GOAL]\ncase refine'_1.inr.inl\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nx y : A\nhx : x ∈ star s\nhy : y ∈ s\n⊢ p x y\n[PROOFSTEP]\nexact star_star x ▸ Hstar_left _ _ (Hs _ hx _ hy)\n[GOAL]\ncase refine'_1.inr.inr\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nx y : A\nhx : x ∈ star s\nhy : y ∈ star s\n⊢ p x y\n[PROOFSTEP]\nexact star_star x ▸ star_star y ▸ Hstar _ _ (Hs _ hx _ hy)\n[GOAL]\ncase refine'_2\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nr : R\nx : A\nhx : x ∈ s ∪ star s\n⊢ p (↑(algebraMap R A) r) x\n[PROOFSTEP]\ncases' hx with hx hx\n[GOAL]\ncase refine'_2.inl\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nr : R\nx : A\nhx : x ∈ s\n⊢ p (↑(algebraMap R A) r) x\n[PROOFSTEP]\nexact Halg_left _ _ hx\n[GOAL]\ncase refine'_2.inr\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nr : R\nx : A\nhx : x ∈ star s\n⊢ p (↑(algebraMap R A) r) x\n[PROOFSTEP]\nexact star_star x ▸ Hstar_right _ _ (Halg_left r _ hx)\n[GOAL]\ncase refine'_3\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nr : R\nx : A\nhx : x ∈ s ∪ star s\n⊢ p x (↑(algebraMap R A) r)\n[PROOFSTEP]\ncases' hx with hx hx\n[GOAL]\ncase refine'_3.inl\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nr : R\nx : A\nhx : x ∈ s\n⊢ p x (↑(algebraMap R A) r)\n[PROOFSTEP]\nexact Halg_right _ _ hx\n[GOAL]\ncase refine'_3.inr\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : A → A → Prop\na b : A\nha : a ∈ adjoin R s\nhb : b ∈ adjoin R s\nHs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y\nHalg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)\nHalg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x\nHalg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)\nHadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y\nHadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)\nHmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y\nHmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)\nHstar : ∀ (x y : A), p x y → p (star x) (star y)\nHstar_left : ∀ (x y : A), p x y → p (star x) y\nHstar_right : ∀ (x y : A), p x y → p x (star y)\nr : R\nx : A\nhx : x ∈ star s\n⊢ p x (↑(algebraMap R A) r)\n[PROOFSTEP]\nexact star_star x ▸ Hstar_left _ _ (Halg_right r _ hx)\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHalg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)\nb : A\nhb : b ∈ adjoin R s\n⊢ p { val := b, property := hb }\n[PROOFSTEP]\nrefine' Exists.elim _ fun (hb : b ∈ adjoin R s) (hc : p ⟨b, hb⟩) => hc\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHalg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)\nb : A\nhb : b ∈ adjoin R s\n⊢ ∃ x, p { val := b, property := x }\n[PROOFSTEP]\napply adjoin_induction hb\n[GOAL]\ncase Hs\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHalg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)\nb : A\nhb : b ∈ adjoin R s\n⊢ ∀ (x : A), x ∈ s → ∃ x_1, p { val := x, property := x_1 }\ncase Halg\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHalg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)\nb : A\nhb : b ∈ adjoin R s\n⊢ ∀ (r : R), ∃ x, p { val := ↑(algebraMap R A) r, property := x }\ncase Hadd\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHalg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)\nb : A\nhb : b ∈ adjoin R s\n⊢ ∀ (x y : A),\n    (∃ x_1, p { val := x, property := x_1 }) →\n      (∃ x, p { val := y, property := x }) → ∃ x_1, p { val := x + y, property := x_1 }\ncase Hmul\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHalg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)\nb : A\nhb : b ∈ adjoin R s\n⊢ ∀ (x y : A),\n    (∃ x_1, p { val := x, property := x_1 }) →\n      (∃ x, p { val := y, property := x }) → ∃ x_1, p { val := x * y, property := x_1 }\ncase Hstar\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\np : { x // x ∈ adjoin R s } → Prop\na : { x // x ∈ adjoin R s }\nHs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\nHalg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)\nHadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)\nHmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)\nHstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)\nb : A\nhb : b ∈ adjoin R s\n⊢ ∀ (x : A), (∃ x_1, p { val := x, property := x_1 }) → ∃ x_1, p { val := star x, property := x_1 }\n[PROOFSTEP]\nexacts [fun x hx => ⟨subset_adjoin R s hx, Hs x hx⟩, fun r => ⟨StarSubalgebra.algebraMap_mem _ r, Halg r⟩,\n  fun x y hx hy => Exists.elim hx fun hx' hx => Exists.elim hy fun hy' hy => ⟨add_mem hx' hy', Hadd _ _ hx hy⟩,\n  fun x y hx hy => Exists.elim hx fun hx' hx => Exists.elim hy fun hy' hy => ⟨mul_mem hx' hy', Hmul _ _ hx hy⟩,\n  fun x hx => Exists.elim hx fun hx' hx => ⟨star_mem hx', Hstar _ hx⟩]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\n⊢ ∀ (a b : { x // x ∈ adjoin R s }), a * b = b * a\n[PROOFSTEP]\nrintro ⟨x, hx⟩ ⟨y, hy⟩\n[GOAL]\ncase mk.mk\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ adjoin R s\ny : A\nhy : y ∈ adjoin R s\n⊢ { val := x, property := hx } * { val := y, property := hy } =\n    { val := y, property := hy } * { val := x, property := hx }\n[PROOFSTEP]\next\n[GOAL]\ncase mk.mk.a\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ adjoin R s\ny : A\nhy : y ∈ adjoin R s\n⊢ ↑({ val := x, property := hx } * { val := y, property := hy }) =\n    ↑({ val := y, property := hy } * { val := x, property := hx })\n[PROOFSTEP]\nsimp only [MulMemClass.mk_mul_mk]\n[GOAL]\ncase mk.mk.a\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ adjoin R s\ny : A\nhy : y ∈ adjoin R s\n⊢ x * y = y * x\n[PROOFSTEP]\nrw [← mem_toSubalgebra, adjoin_toSubalgebra] at hx hy \n[GOAL]\ncase mk.mk.a\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ Algebra.adjoin R (s ∪ star s)\ny : A\nhy : y ∈ Algebra.adjoin R (s ∪ star s)\n⊢ x * y = y * x\n[PROOFSTEP]\nletI : CommSemiring (Algebra.adjoin R (s ∪ star s)) :=\n  Algebra.adjoinCommSemiringOfComm R\n    (by\n      intro a ha b hb\n      cases' ha with ha ha <;> cases' hb with hb hb\n      · exact hcomm _ ha _ hb\n      · exact star_star b ▸ hcomm_star _ ha _ hb\n      · exact star_star a ▸ (hcomm_star _ hb _ ha).symm\n      · simpa only [star_mul, star_star] using congr_arg star (hcomm _ hb _ ha))\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ Algebra.adjoin R (s ∪ star s)\ny : A\nhy : y ∈ Algebra.adjoin R (s ∪ star s)\n⊢ ∀ (a : A), a ∈ s ∪ star s → ∀ (b : A), b ∈ s ∪ star s → a * b = b * a\n[PROOFSTEP]\nintro a ha b hb\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ Algebra.adjoin R (s ∪ star s)\ny : A\nhy : y ∈ Algebra.adjoin R (s ∪ star s)\na : A\nha : a ∈ s ∪ star s\nb : A\nhb : b ∈ s ∪ star s\n⊢ a * b = b * a\n[PROOFSTEP]\ncases' ha with ha ha\n[GOAL]\ncase inl\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ Algebra.adjoin R (s ∪ star s)\ny : A\nhy : y ∈ Algebra.adjoin R (s ∪ star s)\na b : A\nhb : b ∈ s ∪ star s\nha : a ∈ s\n⊢ a * b = b * a\n[PROOFSTEP]\ncases' hb with hb hb\n[GOAL]\ncase inr\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ Algebra.adjoin R (s ∪ star s)\ny : A\nhy : y ∈ Algebra.adjoin R (s ∪ star s)\na b : A\nhb : b ∈ s ∪ star s\nha : a ∈ star s\n⊢ a * b = b * a\n[PROOFSTEP]\ncases' hb with hb hb\n[GOAL]\ncase inl.inl\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ Algebra.adjoin R (s ∪ star s)\ny : A\nhy : y ∈ Algebra.adjoin R (s ∪ star s)\na b : A\nha : a ∈ s\nhb : b ∈ s\n⊢ a * b = b * a\n[PROOFSTEP]\nexact hcomm _ ha _ hb\n[GOAL]\ncase inl.inr\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ Algebra.adjoin R (s ∪ star s)\ny : A\nhy : y ∈ Algebra.adjoin R (s ∪ star s)\na b : A\nha : a ∈ s\nhb : b ∈ star s\n⊢ a * b = b * a\n[PROOFSTEP]\nexact star_star b ▸ hcomm_star _ ha _ hb\n[GOAL]\ncase inr.inl\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ Algebra.adjoin R (s ∪ star s)\ny : A\nhy : y ∈ Algebra.adjoin R (s ∪ star s)\na b : A\nha : a ∈ star s\nhb : b ∈ s\n⊢ a * b = b * a\n[PROOFSTEP]\nexact star_star a ▸ (hcomm_star _ hb _ ha).symm\n[GOAL]\ncase inr.inr\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ Algebra.adjoin R (s ∪ star s)\ny : A\nhy : y ∈ Algebra.adjoin R (s ∪ star s)\na b : A\nha : a ∈ star s\nhb : b ∈ star s\n⊢ a * b = b * a\n[PROOFSTEP]\nsimpa only [star_mul, star_star] using congr_arg star (hcomm _ hb _ ha)\n[GOAL]\ncase mk.mk.a\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\ns : Set A\nhcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a\nhcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a\nsrc✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra\nx : A\nhx : x ∈ Algebra.adjoin R (s ∪ star s)\ny : A\nhy : y ∈ Algebra.adjoin R (s ∪ star s)\nthis : CommSemiring { x // x ∈ Algebra.adjoin R (s ∪ star s) } :=\n  Algebra.adjoinCommSemiringOfComm R (_ : ∀ (a : A), a ∈ s ∪ star s → ∀ (b : A), b ∈ s ∪ star s → a * b = b * a)\n⊢ x * y = y * x\n[PROOFSTEP]\nexact congr_arg Subtype.val (mul_comm (⟨x, hx⟩ : Algebra.adjoin R (s ∪ star s)) ⟨y, hy⟩)\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : StarRing R\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : StarRing A\ninst✝⁵ : StarModule R A\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R B\ninst✝² : StarRing B\ninst✝¹ : StarModule R B\nx : A\ninst✝ : IsStarNormal x\na : A\nha : a ∈ {x}\nb : A\nhb : b ∈ {x}\n⊢ a * b = b * a\n[PROOFSTEP]\nrw [Set.mem_singleton_iff] at ha hb \n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : StarRing R\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : StarRing A\ninst✝⁵ : StarModule R A\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R B\ninst✝² : StarRing B\ninst✝¹ : StarModule R B\nx : A\ninst✝ : IsStarNormal x\na : A\nha : a = x\nb : A\nhb : b = x\n⊢ a * b = b * a\n[PROOFSTEP]\nrw [ha, hb]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : StarRing R\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : StarRing A\ninst✝⁵ : StarModule R A\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R B\ninst✝² : StarRing B\ninst✝¹ : StarModule R B\nx : A\ninst✝ : IsStarNormal x\na : A\nha : a ∈ {x}\nb : A\nhb : b ∈ {x}\n⊢ a * star b = star b * a\n[PROOFSTEP]\nrw [Set.mem_singleton_iff] at ha hb \n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : StarRing R\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : StarRing A\ninst✝⁵ : StarModule R A\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R B\ninst✝² : StarRing B\ninst✝¹ : StarModule R B\nx : A\ninst✝ : IsStarNormal x\na : A\nha : a = x\nb : A\nhb : b = x\n⊢ a * star b = star b * a\n[PROOFSTEP]\nsimpa only [ha, hb] using (star_comm_self' x).symm\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\n⊢ ⊤.toSubalgebra = ⊤\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nx✝ : A\n⊢ x✝ ∈ ⊤.toSubalgebra ↔ x✝ ∈ ⊤\n[PROOFSTEP]\nsimp\n  -- porting note: Lean can no longer prove this by `rfl`, it times out\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS T : StarSubalgebra R A\n⊢ (S ⊓ T).toSubalgebra = S.toSubalgebra ⊓ T.toSubalgebra\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS T : StarSubalgebra R A\nx✝ : A\n⊢ x✝ ∈ (S ⊓ T).toSubalgebra ↔ x✝ ∈ S.toSubalgebra ⊓ T.toSubalgebra\n[PROOFSTEP]\nsimp\n  -- porting note: Lean can no longer prove this by `rfl`, it times out\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : Set (StarSubalgebra R A)\nx : A\n⊢ x ∈ sInf S ↔ ∀ (p : StarSubalgebra R A), p ∈ S → x ∈ p\n[PROOFSTEP]\nsimp only [← SetLike.mem_coe, coe_sInf, Set.mem_iInter₂]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : Set (StarSubalgebra R A)\n⊢ ↑(sInf S).toSubalgebra = ↑(sInf (toSubalgebra '' S))\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nι : Sort u_5\nS : ι → StarSubalgebra R A\n⊢ ↑(⨅ (i : ι), S i) = ⋂ (i : ι), ↑(S i)\n[PROOFSTEP]\nsimp [iInf]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nι : Sort u_5\nS : ι → StarSubalgebra R A\nx : A\n⊢ x ∈ ⨅ (i : ι), S i ↔ ∀ (i : ι), x ∈ S i\n[PROOFSTEP]\nsimp only [iInf, mem_sInf, Set.forall_range_iff]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nι : Sort u_5\nS : ι → StarSubalgebra R A\n⊢ ↑(⨅ (i : ι), S i).toSubalgebra = ↑(⨅ (i : ι), (S i).toSubalgebra)\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\n⊢ ⊥.toSubalgebra = ⊥\n[PROOFSTEP]\nchange Algebra.adjoin R (∅ ∪ star ∅) = Algebra.adjoin R ∅\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\n⊢ Algebra.adjoin R (∅ ∪ star ∅) = Algebra.adjoin R ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nx : A\n⊢ x ∈ ⊥ ↔ x ∈ Set.range ↑(algebraMap R A)\n[PROOFSTEP]\nrw [← mem_toSubalgebra, bot_toSubalgebra, Algebra.mem_bot]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\n⊢ ↑⊥ = Set.range ↑(algebraMap R A)\n[PROOFSTEP]\nsimp [Set.ext_iff, mem_bot]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : StarSubalgebra R A\nh : S = ⊤\nx : A\n⊢ x ∈ S\n[PROOFSTEP]\nrw [h]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : StarSubalgebra R A\nh : S = ⊤\nx : A\n⊢ x ∈ ⊤\n[PROOFSTEP]\nexact mem_top\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : StarSubalgebra R A\nh : ∀ (x : A), x ∈ S\n⊢ S = ⊤\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nS : StarSubalgebra R A\nh : ∀ (x : A), x ∈ S\nx : A\n⊢ x ∈ S ↔ x ∈ ⊤\n[PROOFSTEP]\nexact ⟨fun _ => mem_top, fun _ => h x⟩\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nhF : StarAlgHomClass F R A B\nf g : F\na : A\nha : ↑f a = ↑g a\n⊢ star a ∈ (AlgHom.equalizer ↑f ↑g).toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nsimpa only [← map_star] using congrArg star ha\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : StarRing R\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : StarRing A\ninst✝⁵ : StarModule R A\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R B\ninst✝² : StarRing B\ninst✝¹ : StarModule R B\nhF : StarAlgHomClass F R A B\nf✝ g✝ : F\ns : Set A\ninst✝ : StarAlgHomClass F R { x // x ∈ adjoin R s } B\nf g : F\nh : ∀ (x : { x // x ∈ adjoin R s }), ↑x ∈ s → ↑f x = ↑g x\n⊢ f = g\n[PROOFSTEP]\nrefine'\n  FunLike.ext f g fun a =>\n    adjoin_induction' (p := fun y => f y = g y) a (fun x hx => _) (fun r => _) (fun x y hx hy => _) (fun x y hx hy => _)\n      fun x hx => _\n[GOAL]\ncase refine'_1\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : StarRing R\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : StarRing A\ninst✝⁵ : StarModule R A\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R B\ninst✝² : StarRing B\ninst✝¹ : StarModule R B\nhF : StarAlgHomClass F R A B\nf✝ g✝ : F\ns : Set A\ninst✝ : StarAlgHomClass F R { x // x ∈ adjoin R s } B\nf g : F\nh : ∀ (x : { x // x ∈ adjoin R s }), ↑x ∈ s → ↑f x = ↑g x\na : { x // x ∈ adjoin R s }\nx : A\nhx : x ∈ s\n⊢ (fun y => ↑f y = ↑g y) { val := x, property := (_ : x ∈ ↑(adjoin R s)) }\n[PROOFSTEP]\nexact h ⟨x, subset_adjoin R s hx⟩ hx\n[GOAL]\ncase refine'_2\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : StarRing R\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : StarRing A\ninst✝⁵ : StarModule R A\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R B\ninst✝² : StarRing B\ninst✝¹ : StarModule R B\nhF : StarAlgHomClass F R A B\nf✝ g✝ : F\ns : Set A\ninst✝ : StarAlgHomClass F R { x // x ∈ adjoin R s } B\nf g : F\nh : ∀ (x : { x // x ∈ adjoin R s }), ↑x ∈ s → ↑f x = ↑g x\na : { x // x ∈ adjoin R s }\nr : R\n⊢ (fun y => ↑f y = ↑g y) (↑(algebraMap R { x // x ∈ adjoin R s }) r)\n[PROOFSTEP]\nsimp only [AlgHomClass.commutes]\n[GOAL]\ncase refine'_3\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : StarRing R\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : StarRing A\ninst✝⁵ : StarModule R A\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R B\ninst✝² : StarRing B\ninst✝¹ : StarModule R B\nhF : StarAlgHomClass F R A B\nf✝ g✝ : F\ns : Set A\ninst✝ : StarAlgHomClass F R { x // x ∈ adjoin R s } B\nf g : F\nh : ∀ (x : { x // x ∈ adjoin R s }), ↑x ∈ s → ↑f x = ↑g x\na x y : { x // x ∈ adjoin R s }\nhx : (fun y => ↑f y = ↑g y) x\nhy : (fun y => ↑f y = ↑g y) y\n⊢ (fun y => ↑f y = ↑g y) (x + y)\n[PROOFSTEP]\nsimp only [map_add, map_add, hx, hy]\n[GOAL]\ncase refine'_4\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : StarRing R\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : StarRing A\ninst✝⁵ : StarModule R A\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R B\ninst✝² : StarRing B\ninst✝¹ : StarModule R B\nhF : StarAlgHomClass F R A B\nf✝ g✝ : F\ns : Set A\ninst✝ : StarAlgHomClass F R { x // x ∈ adjoin R s } B\nf g : F\nh : ∀ (x : { x // x ∈ adjoin R s }), ↑x ∈ s → ↑f x = ↑g x\na x y : { x // x ∈ adjoin R s }\nhx : (fun y => ↑f y = ↑g y) x\nhy : (fun y => ↑f y = ↑g y) y\n⊢ (fun y => ↑f y = ↑g y) (x * y)\n[PROOFSTEP]\nsimp only [map_mul, map_mul, hx, hy]\n[GOAL]\ncase refine'_5\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : StarRing R\ninst✝⁸ : Semiring A\ninst✝⁷ : Algebra R A\ninst✝⁶ : StarRing A\ninst✝⁵ : StarModule R A\ninst✝⁴ : Semiring B\ninst✝³ : Algebra R B\ninst✝² : StarRing B\ninst✝¹ : StarModule R B\nhF : StarAlgHomClass F R A B\nf✝ g✝ : F\ns : Set A\ninst✝ : StarAlgHomClass F R { x // x ∈ adjoin R s } B\nf g : F\nh : ∀ (x : { x // x ∈ adjoin R s }), ↑x ∈ s → ↑f x = ↑g x\na x : { x // x ∈ adjoin R s }\nhx : (fun y => ↑f y = ↑g y) x\n⊢ (fun y => ↑f y = ↑g y) (star x)\n[PROOFSTEP]\nsimp only [map_star, hx]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nhF : StarAlgHomClass F R A B\nf g : F\nφ : A →⋆ₐ[R] B\n⊢ ∀ {a : B},\n    a ∈ (AlgHom.range φ.toAlgHom).toSubsemiring.toSubmonoid.toSubsemigroup.carrier →\n      star a ∈ (AlgHom.range φ.toAlgHom).toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nrintro _ ⟨b, rfl⟩\n[GOAL]\ncase intro\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nhF : StarAlgHomClass F R A B\nf g : F\nφ : A →⋆ₐ[R] B\nb : A\n⊢ star (↑↑φ.toAlgHom b) ∈ (AlgHom.range φ.toAlgHom).toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nexact ⟨star b, map_star φ b⟩\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nhF : StarAlgHomClass F R A B\nf g : F\nφ : A →⋆ₐ[R] B\nx : B\n⊢ x ∈ StarAlgHom.range φ → x ∈ map φ ⊤\n[PROOFSTEP]\nrintro ⟨a, ha⟩\n[GOAL]\ncase intro\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nhF : StarAlgHomClass F R A B\nf g : F\nφ : A →⋆ₐ[R] B\nx : B\na : A\nha : ↑↑φ.toAlgHom a = x\n⊢ x ∈ map φ ⊤\n[PROOFSTEP]\nexact ⟨a, by simp, ha⟩\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nhF : StarAlgHomClass F R A B\nf g : F\nφ : A →⋆ₐ[R] B\nx : B\na : A\nha : ↑↑φ.toAlgHom a = x\n⊢ a ∈ ↑⊤.toSubsemiring\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nhF : StarAlgHomClass F R A B\nf g : F\nφ : A →⋆ₐ[R] B\nx : B\n⊢ x ∈ map φ ⊤ → x ∈ StarAlgHom.range φ\n[PROOFSTEP]\nrintro ⟨a, -, ha⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁹ : CommSemiring R\ninst✝⁸ : StarRing R\ninst✝⁷ : Semiring A\ninst✝⁶ : Algebra R A\ninst✝⁵ : StarRing A\ninst✝⁴ : StarModule R A\ninst✝³ : Semiring B\ninst✝² : Algebra R B\ninst✝¹ : StarRing B\ninst✝ : StarModule R B\nhF : StarAlgHomClass F R A B\nf g : F\nφ : A →⋆ₐ[R] B\nx : B\na : A\nha : ↑↑φ.toAlgHom a = x\n⊢ x ∈ StarAlgHom.range φ\n[PROOFSTEP]\nexact ⟨a, ha⟩\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Star.Subalgebra", "llama_tokens": 49469, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7185943805178138, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.3621041424504484}}
{"text": "[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m : α\nh : ∀ (i : α), i ∈ Ico n m → r i (succ i)\nhnm : n ≤ m\n⊢ ReflTransGen r n m\n[PROOFSTEP]\nrevert h\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m : α\nhnm : n ≤ m\n⊢ (∀ (i : α), i ∈ Ico n m → r i (succ i)) → ReflTransGen r n m\n[PROOFSTEP]\nrefine' Succ.rec _ _ hnm\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m : α\nhnm : n ≤ m\n⊢ (∀ (i : α), i ∈ Ico n n → r i (succ i)) → ReflTransGen r n n\n[PROOFSTEP]\nintro _\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m : α\nhnm : n ≤ m\nh✝ : ∀ (i : α), i ∈ Ico n n → r i (succ i)\n⊢ ReflTransGen r n n\n[PROOFSTEP]\nexact ReflTransGen.refl\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m : α\nhnm : n ≤ m\n⊢ ∀ (n_1 : α),\n    n ≤ n_1 →\n      ((∀ (i : α), i ∈ Ico n n_1 → r i (succ i)) → ReflTransGen r n n_1) →\n        (∀ (i : α), i ∈ Ico n (succ n_1) → r i (succ i)) → ReflTransGen r n (succ n_1)\n[PROOFSTEP]\nintro m hnm ih h\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m✝ : α\nhnm✝ : n ≤ m✝\nm : α\nhnm : n ≤ m\nih : (∀ (i : α), i ∈ Ico n m → r i (succ i)) → ReflTransGen r n m\nh : ∀ (i : α), i ∈ Ico n (succ m) → r i (succ i)\n⊢ ReflTransGen r n (succ m)\n[PROOFSTEP]\nhave : ReflTransGen r n m := ih fun i hi => h i ⟨hi.1, hi.2.trans_le <| le_succ m⟩\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m✝ : α\nhnm✝ : n ≤ m✝\nm : α\nhnm : n ≤ m\nih : (∀ (i : α), i ∈ Ico n m → r i (succ i)) → ReflTransGen r n m\nh : ∀ (i : α), i ∈ Ico n (succ m) → r i (succ i)\nthis : ReflTransGen r n m\n⊢ ReflTransGen r n (succ m)\n[PROOFSTEP]\ncases' (le_succ m).eq_or_lt with hm hm\n[GOAL]\ncase refine'_2.inl\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m✝ : α\nhnm✝ : n ≤ m✝\nm : α\nhnm : n ≤ m\nih : (∀ (i : α), i ∈ Ico n m → r i (succ i)) → ReflTransGen r n m\nh : ∀ (i : α), i ∈ Ico n (succ m) → r i (succ i)\nthis : ReflTransGen r n m\nhm : m = succ m\n⊢ ReflTransGen r n (succ m)\n[PROOFSTEP]\nrwa [← hm]\n[GOAL]\ncase refine'_2.inr\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m✝ : α\nhnm✝ : n ≤ m✝\nm : α\nhnm : n ≤ m\nih : (∀ (i : α), i ∈ Ico n m → r i (succ i)) → ReflTransGen r n m\nh : ∀ (i : α), i ∈ Ico n (succ m) → r i (succ i)\nthis : ReflTransGen r n m\nhm : m < succ m\n⊢ ReflTransGen r n (succ m)\n[PROOFSTEP]\nexact this.tail (h m ⟨hnm, hm⟩)\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m : α\nh : ∀ (i : α), i ∈ Ico m n → r (succ i) i\nhmn : m ≤ n\n⊢ ReflTransGen r n m\n[PROOFSTEP]\nrw [← reflTransGen_swap]\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m : α\nh : ∀ (i : α), i ∈ Ico m n → r (succ i) i\nhmn : m ≤ n\n⊢ ReflTransGen (swap r) m n\n[PROOFSTEP]\nexact reflTransGen_of_succ_of_le (swap r) h hmn\n[GOAL]\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m : α\nhr : Reflexive r\nh1 : ∀ (i : α), i ∈ Ico n m → r i (succ i)\nh2 : ∀ (i : α), i ∈ Ico m n → r (succ i) i\n⊢ TransGen r n m\n[PROOFSTEP]\nrcases eq_or_ne m n with (rfl | hmn)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nm : α\nhr : Reflexive r\nh1 : ∀ (i : α), i ∈ Ico m m → r i (succ i)\nh2 : ∀ (i : α), i ∈ Ico m m → r (succ i) i\n⊢ TransGen r m m\n[PROOFSTEP]\nexact TransGen.single (hr m)\n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : LinearOrder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nr : α → α → Prop\nn m : α\nhr : Reflexive r\nh1 : ∀ (i : α), i ∈ Ico n m → r i (succ i)\nh2 : ∀ (i : α), i ∈ Ico m n → r (succ i) i\nhmn : m ≠ n\n⊢ TransGen r n m\n[PROOFSTEP]\nexact transGen_of_succ_of_ne r h1 h2 hmn.symm\n", "meta": {"mathlib_filename": "Mathlib.Order.SuccPred.Relation", "llama_tokens": 2242, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6187804196836383, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.36204913775525654}}
{"text": "[GOAL]\n⊢ φ 1 = 1\n[PROOFSTEP]\nsimp [totient]\n[GOAL]\nn : ℕ\n⊢ φ n = Nat.card ↑{m | m < n ∧ coprime n m}\n[PROOFSTEP]\nlet e : {m | m < n ∧ n.coprime m} ≃ Finset.filter n.coprime (Finset.range n) :=\n  { toFun := fun m => ⟨m, by simpa only [Finset.mem_filter, Finset.mem_range] using m.property⟩\n    invFun := fun m => ⟨m, by simpa only [Finset.mem_filter, Finset.mem_range] using m.property⟩\n    left_inv := fun m => by simp only [Subtype.coe_mk, Subtype.coe_eta]\n    right_inv := fun m => by simp only [Subtype.coe_mk, Subtype.coe_eta] }\n[GOAL]\nn : ℕ\nm : ↑{m | m < n ∧ coprime n m}\n⊢ ↑m ∈ filter (coprime n) (range n)\n[PROOFSTEP]\nsimpa only [Finset.mem_filter, Finset.mem_range] using m.property\n[GOAL]\nn : ℕ\nm : { x // x ∈ filter (coprime n) (range n) }\n⊢ ↑m ∈ {m | m < n ∧ coprime n m}\n[PROOFSTEP]\nsimpa only [Finset.mem_filter, Finset.mem_range] using m.property\n[GOAL]\nn : ℕ\nm : ↑{m | m < n ∧ coprime n m}\n⊢ (fun m => { val := ↑m, property := (_ : ↑m < n ∧ coprime n ↑m) })\n      ((fun m => { val := ↑m, property := (_ : ↑m ∈ filter (coprime n) (range n)) }) m) =\n    m\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, Subtype.coe_eta]\n[GOAL]\nn : ℕ\nm : { x // x ∈ filter (coprime n) (range n) }\n⊢ (fun m => { val := ↑m, property := (_ : ↑m ∈ filter (coprime n) (range n)) })\n      ((fun m => { val := ↑m, property := (_ : ↑m < n ∧ coprime n ↑m) }) m) =\n    m\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, Subtype.coe_eta]\n[GOAL]\nn : ℕ\ne : ↑{m | m < n ∧ coprime n m} ≃ { x // x ∈ filter (coprime n) (range n) } :=\n  { toFun := fun m => { val := ↑m, property := (_ : ↑m ∈ filter (coprime n) (range n)) },\n    invFun := fun m => { val := ↑m, property := (_ : ↑m < n ∧ coprime n ↑m) },\n    left_inv :=\n      (_ :\n        ∀ (m : ↑{m | m < n ∧ coprime n m}),\n          { val := ↑m,\n              property :=\n                (_ :\n                  ↑((fun m => { val := ↑m, property := (_ : ↑m ∈ filter (coprime n) (range n)) }) m) < n ∧\n                    coprime n ↑((fun m => { val := ↑m, property := (_ : ↑m ∈ filter (coprime n) (range n)) }) m)) } =\n            m),\n    right_inv :=\n      (_ :\n        ∀ (m : { x // x ∈ filter (coprime n) (range n) }),\n          { val := ↑m,\n              property :=\n                (_ :\n                  ↑((fun m => { val := ↑m, property := (_ : ↑m < n ∧ coprime n ↑m) }) m) ∈\n                    filter (coprime n) (range n)) } =\n            m) }\n⊢ φ n = Nat.card ↑{m | m < n ∧ coprime n m}\n[PROOFSTEP]\nrw [totient_eq_card_coprime, card_congr e, card_eq_fintype_card, Fintype.card_coe]\n[GOAL]\nn : ℕ\nhn : 1 < n\n⊢ 0 ∈ range n ∧ ¬coprime n 0\n[PROOFSTEP]\nsimp [hn.ne', pos_of_gt hn]\n[GOAL]\n⊢ 0 < 0 → 0 < φ 0\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ 0 < 1 → 0 < φ 1\n[PROOFSTEP]\nsimp [totient]\n[GOAL]\nn : ℕ\nx✝ : 0 < n + 2\n⊢ 1 < n + 2\n[PROOFSTEP]\nsimp\n[GOAL]\na n : ℕ\n⊢ card (filter (coprime a) (Ico n (n + a))) = φ a\n[PROOFSTEP]\nrw [totient, filter_Ico_card_eq_of_periodic, count_eq_card_filter_range]\n[GOAL]\ncase pp\na n : ℕ\n⊢ Function.Periodic (coprime a) a\n[PROOFSTEP]\nexact periodic_coprime a\n[GOAL]\na k n : ℕ\na_pos : 0 < a\n⊢ card (filter (coprime a) (Ico k (k + n))) ≤ φ a * (n / a + 1)\n[PROOFSTEP]\nconv_lhs => rw [← Nat.mod_add_div n a]\n[GOAL]\na k n : ℕ\na_pos : 0 < a\n| card (filter (coprime a) (Ico k (k + n)))\n[PROOFSTEP]\nrw [← Nat.mod_add_div n a]\n[GOAL]\na k n : ℕ\na_pos : 0 < a\n| card (filter (coprime a) (Ico k (k + n)))\n[PROOFSTEP]\nrw [← Nat.mod_add_div n a]\n[GOAL]\na k n : ℕ\na_pos : 0 < a\n| card (filter (coprime a) (Ico k (k + n)))\n[PROOFSTEP]\nrw [← Nat.mod_add_div n a]\n[GOAL]\na k n : ℕ\na_pos : 0 < a\n⊢ card (filter (coprime a) (Ico k (k + (n % a + a * (n / a))))) ≤ φ a * (n / a + 1)\n[PROOFSTEP]\ninduction' n / a with i ih\n[GOAL]\ncase zero\na k n : ℕ\na_pos : 0 < a\n⊢ card (filter (coprime a) (Ico k (k + (n % a + a * zero)))) ≤ φ a * (zero + 1)\n[PROOFSTEP]\nrw [← filter_coprime_Ico_eq_totient a k]\n[GOAL]\ncase zero\na k n : ℕ\na_pos : 0 < a\n⊢ card (filter (coprime a) (Ico k (k + (n % a + a * zero)))) ≤ card (filter (coprime a) (Ico k (k + a))) * (zero + 1)\n[PROOFSTEP]\nsimp only [add_zero, mul_one, mul_zero, le_of_lt (mod_lt n a_pos), Nat.zero_eq, zero_add]\n  --Porting note: below line was `mono`\n[GOAL]\ncase zero\na k n : ℕ\na_pos : 0 < a\n⊢ card (filter (coprime a) (Ico k (k + n % a))) ≤ card (filter (coprime a) (Ico k (k + a)))\n[PROOFSTEP]\nrefine Finset.card_mono ?_\n[GOAL]\ncase zero\na k n : ℕ\na_pos : 0 < a\n⊢ filter (coprime a) (Ico k (k + n % a)) ≤ filter (coprime a) (Ico k (k + a))\n[PROOFSTEP]\nrefine' monotone_filter_left a.coprime _\n[GOAL]\ncase zero\na k n : ℕ\na_pos : 0 < a\n⊢ Ico k (k + n % a) ≤ Ico k (k + a)\n[PROOFSTEP]\nsimp only [Finset.le_eq_subset]\n[GOAL]\ncase zero\na k n : ℕ\na_pos : 0 < a\n⊢ Ico k (k + n % a) ⊆ Ico k (k + a)\n[PROOFSTEP]\nexact Ico_subset_Ico rfl.le (add_le_add_left (le_of_lt (mod_lt n a_pos)) k)\n[GOAL]\ncase succ\na k n : ℕ\na_pos : 0 < a\ni : ℕ\nih : card (filter (coprime a) (Ico k (k + (n % a + a * i)))) ≤ φ a * (i + 1)\n⊢ card (filter (coprime a) (Ico k (k + (n % a + a * succ i)))) ≤ φ a * (succ i + 1)\n[PROOFSTEP]\nsimp only [mul_succ]\n[GOAL]\ncase succ\na k n : ℕ\na_pos : 0 < a\ni : ℕ\nih : card (filter (coprime a) (Ico k (k + (n % a + a * i)))) ≤ φ a * (i + 1)\n⊢ card (filter (coprime a) (Ico k (k + (n % a + (a * i + a))))) ≤ φ a * i + φ a + φ a\n[PROOFSTEP]\nsimp_rw [← add_assoc] at ih ⊢\n[GOAL]\ncase succ\na k n : ℕ\na_pos : 0 < a\ni : ℕ\nih : card (filter (coprime a) (Ico k (k + n % a + a * i))) ≤ φ a * (i + 1)\n⊢ card (filter (coprime a) (Ico k (k + n % a + a * i + a))) ≤ φ a * i + φ a + φ a\n[PROOFSTEP]\ncalc\n  (filter a.coprime (Ico k (k + n % a + a * i + a))).card =\n      (filter a.coprime (Ico k (k + n % a + a * i) ∪ Ico (k + n % a + a * i) (k + n % a + a * i + a))).card :=\n    by\n    congr\n    rw [Ico_union_Ico_eq_Ico]\n    rw [add_assoc]\n    exact le_self_add\n    exact le_self_add\n  _ ≤ (filter a.coprime (Ico k (k + n % a + a * i))).card + a.totient :=\n    by\n    rw [filter_union, ← filter_coprime_Ico_eq_totient a (k + n % a + a * i)]\n    apply card_union_le\n  _ ≤ a.totient * i + a.totient + a.totient := add_le_add_right ih (totient a)\n[GOAL]\na k n : ℕ\na_pos : 0 < a\ni : ℕ\nih : card (filter (coprime a) (Ico k (k + n % a + a * i))) ≤ φ a * (i + 1)\n⊢ card (filter (coprime a) (Ico k (k + n % a + a * i + a))) =\n    card (filter (coprime a) (Ico k (k + n % a + a * i) ∪ Ico (k + n % a + a * i) (k + n % a + a * i + a)))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_s.e_s\na k n : ℕ\na_pos : 0 < a\ni : ℕ\nih : card (filter (coprime a) (Ico k (k + n % a + a * i))) ≤ φ a * (i + 1)\n⊢ Ico k (k + n % a + a * i + a) = Ico k (k + n % a + a * i) ∪ Ico (k + n % a + a * i) (k + n % a + a * i + a)\n[PROOFSTEP]\nrw [Ico_union_Ico_eq_Ico]\n[GOAL]\ncase e_s.e_s.hab\na k n : ℕ\na_pos : 0 < a\ni : ℕ\nih : card (filter (coprime a) (Ico k (k + n % a + a * i))) ≤ φ a * (i + 1)\n⊢ k ≤ k + n % a + a * i\ncase e_s.e_s.hbc\na k n : ℕ\na_pos : 0 < a\ni : ℕ\nih : card (filter (coprime a) (Ico k (k + n % a + a * i))) ≤ φ a * (i + 1)\n⊢ k + n % a + a * i ≤ k + n % a + a * i + a\n[PROOFSTEP]\nrw [add_assoc]\n[GOAL]\ncase e_s.e_s.hab\na k n : ℕ\na_pos : 0 < a\ni : ℕ\nih : card (filter (coprime a) (Ico k (k + n % a + a * i))) ≤ φ a * (i + 1)\n⊢ k ≤ k + (n % a + a * i)\ncase e_s.e_s.hbc\na k n : ℕ\na_pos : 0 < a\ni : ℕ\nih : card (filter (coprime a) (Ico k (k + n % a + a * i))) ≤ φ a * (i + 1)\n⊢ k + n % a + a * i ≤ k + n % a + a * i + a\n[PROOFSTEP]\nexact le_self_add\n[GOAL]\ncase e_s.e_s.hbc\na k n : ℕ\na_pos : 0 < a\ni : ℕ\nih : card (filter (coprime a) (Ico k (k + n % a + a * i))) ≤ φ a * (i + 1)\n⊢ k + n % a + a * i ≤ k + n % a + a * i + a\n[PROOFSTEP]\nexact le_self_add\n[GOAL]\na k n : ℕ\na_pos : 0 < a\ni : ℕ\nih : card (filter (coprime a) (Ico k (k + n % a + a * i))) ≤ φ a * (i + 1)\n⊢ card (filter (coprime a) (Ico k (k + n % a + a * i) ∪ Ico (k + n % a + a * i) (k + n % a + a * i + a))) ≤\n    card (filter (coprime a) (Ico k (k + n % a + a * i))) + φ a\n[PROOFSTEP]\nrw [filter_union, ← filter_coprime_Ico_eq_totient a (k + n % a + a * i)]\n[GOAL]\na k n : ℕ\na_pos : 0 < a\ni : ℕ\nih : card (filter (coprime a) (Ico k (k + n % a + a * i))) ≤ φ a * (i + 1)\n⊢ card\n      (filter (coprime a) (Ico k (k + n % a + a * i)) ∪\n        filter (coprime a) (Ico (k + n % a + a * i) (k + n % a + a * i + a))) ≤\n    card (filter (coprime a) (Ico k (k + n % a + a * i))) +\n      card (filter (coprime a) (Ico (k + n % a + a * i) (k + n % a + a * i + a)))\n[PROOFSTEP]\napply card_union_le\n[GOAL]\nn : ℕ\ninst✝¹ : NeZero n\ninst✝ : Fintype (ZMod n)ˣ\n⊢ Fintype.card { x // coprime (ZMod.val x) n } = φ n\n[PROOFSTEP]\nobtain ⟨m, rfl⟩ : ∃ m, n = m + 1 := exists_eq_succ_of_ne_zero NeZero.out\n[GOAL]\ncase intro\nm : ℕ\ninst✝¹ : NeZero (m + 1)\ninst✝ : Fintype (ZMod (m + 1))ˣ\n⊢ Fintype.card { x // coprime (ZMod.val x) (m + 1) } = φ (m + 1)\n[PROOFSTEP]\nsimp only [totient, Finset.card_eq_sum_ones, Fintype.card_subtype, Finset.sum_filter, ← Fin.sum_univ_eq_sum_range,\n  @Nat.coprime_comm (m + 1)]\n[GOAL]\ncase intro\nm : ℕ\ninst✝¹ : NeZero (m + 1)\ninst✝ : Fintype (ZMod (m + 1))ˣ\n⊢ (∑ a : ZMod (m + 1), if coprime (ZMod.val a) (m + 1) then 1 else 0) =\n    ∑ i : Fin (m + 1), if coprime (↑i) (m + 1) then 1 else 0\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nhn : 2 < n\n⊢ Even (φ n)\n[PROOFSTEP]\nhaveI : Fact (1 < n) := ⟨one_lt_two.trans hn⟩\n[GOAL]\nn : ℕ\nhn : 2 < n\nthis : Fact (1 < n)\n⊢ Even (φ n)\n[PROOFSTEP]\nhaveI : NeZero n := NeZero.of_gt hn\n[GOAL]\nn : ℕ\nhn : 2 < n\nthis✝ : Fact (1 < n)\nthis : NeZero n\n⊢ Even (φ n)\n[PROOFSTEP]\nsuffices 2 = orderOf (-1 : (ZMod n)ˣ)\n  by\n  rw [← ZMod.card_units_eq_totient, even_iff_two_dvd, this]\n  exact orderOf_dvd_card_univ\n[GOAL]\nn : ℕ\nhn : 2 < n\nthis✝¹ : Fact (1 < n)\nthis✝ : NeZero n\nthis : 2 = orderOf (-1)\n⊢ Even (φ n)\n[PROOFSTEP]\nrw [← ZMod.card_units_eq_totient, even_iff_two_dvd, this]\n[GOAL]\nn : ℕ\nhn : 2 < n\nthis✝¹ : Fact (1 < n)\nthis✝ : NeZero n\nthis : 2 = orderOf (-1)\n⊢ orderOf (-1) ∣ Fintype.card (ZMod n)ˣ\n[PROOFSTEP]\nexact orderOf_dvd_card_univ\n[GOAL]\nn : ℕ\nhn : 2 < n\nthis✝ : Fact (1 < n)\nthis : NeZero n\n⊢ 2 = orderOf (-1)\n[PROOFSTEP]\nrw [← orderOf_units, Units.coe_neg_one, orderOf_neg_one, ringChar.eq (ZMod n) n, if_neg hn.ne']\n[GOAL]\nm n : ℕ\nh : coprime m n\nhmn0 : m * n = 0\n⊢ φ (m * n) = φ m * φ n\n[PROOFSTEP]\ncases' Nat.mul_eq_zero.1 hmn0 with h h\n[GOAL]\ncase inl\nm n : ℕ\nh✝ : coprime m n\nhmn0 : m * n = 0\nh : m = 0\n⊢ φ (m * n) = φ m * φ n\n[PROOFSTEP]\nsimp only [totient_zero, mul_zero, zero_mul, h]\n[GOAL]\ncase inr\nm n : ℕ\nh✝ : coprime m n\nhmn0 : m * n = 0\nh : n = 0\n⊢ φ (m * n) = φ m * φ n\n[PROOFSTEP]\nsimp only [totient_zero, mul_zero, zero_mul, h]\n[GOAL]\nm n : ℕ\nh : coprime m n\nhmn0 : ¬m * n = 0\n⊢ φ (m * n) = φ m * φ n\n[PROOFSTEP]\nhaveI : NeZero (m * n) := ⟨hmn0⟩\n[GOAL]\nm n : ℕ\nh : coprime m n\nhmn0 : ¬m * n = 0\nthis : NeZero (m * n)\n⊢ φ (m * n) = φ m * φ n\n[PROOFSTEP]\nhaveI : NeZero m := ⟨left_ne_zero_of_mul hmn0⟩\n[GOAL]\nm n : ℕ\nh : coprime m n\nhmn0 : ¬m * n = 0\nthis✝ : NeZero (m * n)\nthis : NeZero m\n⊢ φ (m * n) = φ m * φ n\n[PROOFSTEP]\nhaveI : NeZero n := ⟨right_ne_zero_of_mul hmn0⟩\n[GOAL]\nm n : ℕ\nh : coprime m n\nhmn0 : ¬m * n = 0\nthis✝¹ : NeZero (m * n)\nthis✝ : NeZero m\nthis : NeZero n\n⊢ φ (m * n) = φ m * φ n\n[PROOFSTEP]\nsimp only [← ZMod.card_units_eq_totient]\n[GOAL]\nm n : ℕ\nh : coprime m n\nhmn0 : ¬m * n = 0\nthis✝¹ : NeZero (m * n)\nthis✝ : NeZero m\nthis : NeZero n\n⊢ Fintype.card (ZMod (m * n))ˣ = Fintype.card (ZMod m)ˣ * Fintype.card (ZMod n)ˣ\n[PROOFSTEP]\nrw [Fintype.card_congr (Units.mapEquiv (ZMod.chineseRemainder h).toMulEquiv).toEquiv,\n  Fintype.card_congr (@MulEquiv.prodUnits (ZMod m) (ZMod n) _ _).toEquiv, Fintype.card_prod]\n[GOAL]\nn d : ℕ\nhnd : d ∣ n\n⊢ φ (n / d) = Finset.card (filter (fun k => gcd n k = d) (range n))\n[PROOFSTEP]\nrcases d.eq_zero_or_pos with (rfl | hd0)\n[GOAL]\ncase inl\nn : ℕ\nhnd : 0 ∣ n\n⊢ φ (n / 0) = Finset.card (filter (fun k => gcd n k = 0) (range n))\n[PROOFSTEP]\nsimp [eq_zero_of_zero_dvd hnd]\n[GOAL]\ncase inr\nn d : ℕ\nhnd : d ∣ n\nhd0 : d > 0\n⊢ φ (n / d) = Finset.card (filter (fun k => gcd n k = d) (range n))\n[PROOFSTEP]\nrcases hnd with ⟨x, rfl⟩\n[GOAL]\ncase inr.intro\nd : ℕ\nhd0 : d > 0\nx : ℕ\n⊢ φ (d * x / d) = Finset.card (filter (fun k => gcd (d * x) k = d) (range (d * x)))\n[PROOFSTEP]\nrw [Nat.mul_div_cancel_left x hd0]\n[GOAL]\ncase inr.intro\nd : ℕ\nhd0 : d > 0\nx : ℕ\n⊢ φ x = Finset.card (filter (fun k => gcd (d * x) k = d) (range (d * x)))\n[PROOFSTEP]\napply Finset.card_congr fun k _ => d * k\n[GOAL]\ncase inr.intro.h₁\nd : ℕ\nhd0 : d > 0\nx : ℕ\n⊢ ∀ (a : ℕ), a ∈ filter (coprime x) (range x) → d * a ∈ filter (fun k => gcd (d * x) k = d) (range (d * x))\n[PROOFSTEP]\nsimp only [mem_filter, mem_range, and_imp, coprime]\n[GOAL]\ncase inr.intro.h₁\nd : ℕ\nhd0 : d > 0\nx : ℕ\n⊢ ∀ (a : ℕ), a < x → gcd x a = 1 → d * a < d * x ∧ gcd (d * x) (d * a) = d\n[PROOFSTEP]\nrefine' fun a ha1 ha2 => ⟨(mul_lt_mul_left hd0).2 ha1, _⟩\n[GOAL]\ncase inr.intro.h₁\nd : ℕ\nhd0 : d > 0\nx a : ℕ\nha1 : a < x\nha2 : gcd x a = 1\n⊢ gcd (d * x) (d * a) = d\n[PROOFSTEP]\nrw [gcd_mul_left, ha2, mul_one]\n[GOAL]\ncase inr.intro.h₂\nd : ℕ\nhd0 : d > 0\nx : ℕ\n⊢ ∀ (a b : ℕ), a ∈ filter (coprime x) (range x) → b ∈ filter (coprime x) (range x) → d * a = d * b → a = b\n[PROOFSTEP]\nsimp [hd0.ne']\n[GOAL]\ncase inr.intro.h₃\nd : ℕ\nhd0 : d > 0\nx : ℕ\n⊢ ∀ (b : ℕ), b ∈ filter (fun k => gcd (d * x) k = d) (range (d * x)) → ∃ a ha, d * a = b\n[PROOFSTEP]\nsimp only [mem_filter, mem_range, exists_prop, and_imp]\n[GOAL]\ncase inr.intro.h₃\nd : ℕ\nhd0 : d > 0\nx : ℕ\n⊢ ∀ (b : ℕ), b < d * x → gcd (d * x) b = d → ∃ a, (a < x ∧ coprime x a) ∧ d * a = b\n[PROOFSTEP]\nrefine' fun b hb1 hb2 => _\n[GOAL]\ncase inr.intro.h₃\nd : ℕ\nhd0 : d > 0\nx b : ℕ\nhb1 : b < d * x\nhb2 : gcd (d * x) b = d\n⊢ ∃ a, (a < x ∧ coprime x a) ∧ d * a = b\n[PROOFSTEP]\nhave : d ∣ b := by\n  rw [← hb2]\n  apply gcd_dvd_right\n[GOAL]\nd : ℕ\nhd0 : d > 0\nx b : ℕ\nhb1 : b < d * x\nhb2 : gcd (d * x) b = d\n⊢ d ∣ b\n[PROOFSTEP]\nrw [← hb2]\n[GOAL]\nd : ℕ\nhd0 : d > 0\nx b : ℕ\nhb1 : b < d * x\nhb2 : gcd (d * x) b = d\n⊢ gcd (d * x) b ∣ b\n[PROOFSTEP]\napply gcd_dvd_right\n[GOAL]\ncase inr.intro.h₃\nd : ℕ\nhd0 : d > 0\nx b : ℕ\nhb1 : b < d * x\nhb2 : gcd (d * x) b = d\nthis : d ∣ b\n⊢ ∃ a, (a < x ∧ coprime x a) ∧ d * a = b\n[PROOFSTEP]\nrcases this with ⟨q, rfl⟩\n[GOAL]\ncase inr.intro.h₃.intro\nd : ℕ\nhd0 : d > 0\nx q : ℕ\nhb1 : d * q < d * x\nhb2 : gcd (d * x) (d * q) = d\n⊢ ∃ a, (a < x ∧ coprime x a) ∧ d * a = d * q\n[PROOFSTEP]\nrefine' ⟨q, ⟨⟨(mul_lt_mul_left hd0).1 hb1, _⟩, rfl⟩⟩\n[GOAL]\ncase inr.intro.h₃.intro\nd : ℕ\nhd0 : d > 0\nx q : ℕ\nhb1 : d * q < d * x\nhb2 : gcd (d * x) (d * q) = d\n⊢ coprime x q\n[PROOFSTEP]\nrwa [gcd_mul_left, mul_right_eq_self_iff hd0] at hb2 \n[GOAL]\nn : ℕ\n⊢ Finset.sum (divisors n) φ = n\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hn)\n[GOAL]\ncase inl\n⊢ Finset.sum (divisors 0) φ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn : ℕ\nhn : n > 0\n⊢ Finset.sum (divisors n) φ = n\n[PROOFSTEP]\nrw [← sum_div_divisors n φ]\n[GOAL]\ncase inr\nn : ℕ\nhn : n > 0\n⊢ ∑ d in divisors n, φ (n / d) = n\n[PROOFSTEP]\nhave : n = ∑ d : ℕ in n.divisors, (filter (fun k : ℕ => n.gcd k = d) (range n)).card :=\n  by\n  nth_rw 1 [← card_range n]\n  refine' card_eq_sum_card_fiberwise fun x _ => mem_divisors.2 ⟨_, hn.ne'⟩\n  apply gcd_dvd_left\n[GOAL]\nn : ℕ\nhn : n > 0\n⊢ n = ∑ d in divisors n, Finset.card (filter (fun k => gcd n k = d) (range n))\n[PROOFSTEP]\nnth_rw 1 [← card_range n]\n[GOAL]\nn : ℕ\nhn : n > 0\n⊢ Finset.card (range n) = ∑ d in divisors n, Finset.card (filter (fun k => gcd n k = d) (range n))\n[PROOFSTEP]\nrefine' card_eq_sum_card_fiberwise fun x _ => mem_divisors.2 ⟨_, hn.ne'⟩\n[GOAL]\nn : ℕ\nhn : n > 0\nx : ℕ\nx✝ : x ∈ range n\n⊢ gcd n x ∣ n\n[PROOFSTEP]\napply gcd_dvd_left\n[GOAL]\ncase inr\nn : ℕ\nhn : n > 0\nthis : n = ∑ d in divisors n, Finset.card (filter (fun k => gcd n k = d) (range n))\n⊢ ∑ d in divisors n, φ (n / d) = n\n[PROOFSTEP]\nnth_rw 3 [this]\n[GOAL]\ncase inr\nn : ℕ\nhn : n > 0\nthis : n = ∑ d in divisors n, Finset.card (filter (fun k => gcd n k = d) (range n))\n⊢ ∑ d in divisors n, φ (n / d) = ∑ d in divisors n, Finset.card (filter (fun k => gcd n k = d) (range n))\n[PROOFSTEP]\nexact sum_congr rfl fun x hx => totient_div_of_dvd (dvd_of_mem_divisors hx)\n[GOAL]\nn : ℕ\n⊢ ∑ m in filter (fun x => x ∣ n) (range (succ n)), φ m = n\n[PROOFSTEP]\nconvert sum_totient _ using 1\n[GOAL]\ncase h.e'_2\nn : ℕ\n⊢ ∑ m in filter (fun x => x ∣ n) (range (succ n)), φ m = Finset.sum (divisors n) φ\n[PROOFSTEP]\nsimp only [Nat.divisors, sum_filter, range_eq_Ico]\n[GOAL]\ncase h.e'_2\nn : ℕ\n⊢ (∑ a in Ico 0 (succ n), if a ∣ n then φ a else 0) = ∑ a in Ico 1 (n + 1), if a ∣ n then φ a else 0\n[PROOFSTEP]\nrw [sum_eq_sum_Ico_succ_bot]\n[GOAL]\ncase h.e'_2\nn : ℕ\n⊢ ((if 0 ∣ n then φ 0 else 0) + ∑ k in Ico (0 + 1) (succ n), if k ∣ n then φ k else 0) =\n    ∑ a in Ico 1 (n + 1), if a ∣ n then φ a else 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_2.hab\nn : ℕ\n⊢ 0 < succ n\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\nhp : Prime p\nn : ℕ\n⊢ filter (coprime (p ^ (n + 1))) (range (p ^ (n + 1))) = range (p ^ (n + 1)) \\ image (fun x => x * p) (range (p ^ n))\n[PROOFSTEP]\nrw [sdiff_eq_filter]\n[GOAL]\np : ℕ\nhp : Prime p\nn : ℕ\n⊢ filter (coprime (p ^ (n + 1))) (range (p ^ (n + 1))) =\n    filter (fun x => ¬x ∈ image (fun x => x * p) (range (p ^ n))) (range (p ^ (n + 1)))\n[PROOFSTEP]\napply filter_congr\n[GOAL]\ncase H\np : ℕ\nhp : Prime p\nn : ℕ\n⊢ ∀ (x : ℕ), x ∈ range (p ^ (n + 1)) → (coprime (p ^ (n + 1)) x ↔ ¬x ∈ image (fun x => x * p) (range (p ^ n)))\n[PROOFSTEP]\nsimp only [mem_range, mem_filter, coprime_pow_left_iff n.succ_pos, mem_image, not_exists, hp.coprime_iff_not_dvd]\n[GOAL]\ncase H\np : ℕ\nhp : Prime p\nn : ℕ\n⊢ ∀ (x : ℕ), x < p ^ (n + 1) → (¬p ∣ x ↔ ∀ (x_1 : ℕ), ¬(x_1 < p ^ n ∧ x_1 * p = x))\n[PROOFSTEP]\nintro a ha\n[GOAL]\ncase H\np : ℕ\nhp : Prime p\nn a : ℕ\nha : a < p ^ (n + 1)\n⊢ ¬p ∣ a ↔ ∀ (x : ℕ), ¬(x < p ^ n ∧ x * p = a)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase H.mp\np : ℕ\nhp : Prime p\nn a : ℕ\nha : a < p ^ (n + 1)\n⊢ ¬p ∣ a → ∀ (x : ℕ), ¬(x < p ^ n ∧ x * p = a)\n[PROOFSTEP]\nintro hap b h\n[GOAL]\ncase H.mp\np : ℕ\nhp : Prime p\nn a : ℕ\nha : a < p ^ (n + 1)\nhap : ¬p ∣ a\nb : ℕ\nh : b < p ^ n ∧ b * p = a\n⊢ False\n[PROOFSTEP]\nrcases h with ⟨_, rfl⟩\n[GOAL]\ncase H.mp.intro\np : ℕ\nhp : Prime p\nn b : ℕ\nleft✝ : b < p ^ n\nha : b * p < p ^ (n + 1)\nhap : ¬p ∣ b * p\n⊢ False\n[PROOFSTEP]\nexact hap (dvd_mul_left _ _)\n[GOAL]\ncase H.mpr\np : ℕ\nhp : Prime p\nn a : ℕ\nha : a < p ^ (n + 1)\n⊢ (∀ (x : ℕ), ¬(x < p ^ n ∧ x * p = a)) → ¬p ∣ a\n[PROOFSTEP]\nrintro h ⟨b, rfl⟩\n[GOAL]\ncase H.mpr.intro\np : ℕ\nhp : Prime p\nn b : ℕ\nha : p * b < p ^ (n + 1)\nh : ∀ (x : ℕ), ¬(x < p ^ n ∧ x * p = p * b)\n⊢ False\n[PROOFSTEP]\nrw [pow_succ'] at ha \n[GOAL]\ncase H.mpr.intro\np : ℕ\nhp : Prime p\nn b : ℕ\nha : p * b < p * p ^ n\nh : ∀ (x : ℕ), ¬(x < p ^ n ∧ x * p = p * b)\n⊢ False\n[PROOFSTEP]\nexact h b ⟨lt_of_mul_lt_mul_left ha (zero_le _), mul_comm _ _⟩\n[GOAL]\np : ℕ\nhp : Prime p\nn : ℕ\n⊢ Finset.card (range (p ^ (n + 1)) \\ image (fun x => x * p) (range (p ^ n))) = p ^ n * (p - 1)\n[PROOFSTEP]\nhave h1 : Function.Injective (· * p) := mul_left_injective₀ hp.ne_zero\n[GOAL]\np : ℕ\nhp : Prime p\nn : ℕ\nh1 : Function.Injective fun x => x * p\n⊢ Finset.card (range (p ^ (n + 1)) \\ image (fun x => x * p) (range (p ^ n))) = p ^ n * (p - 1)\n[PROOFSTEP]\nhave h2 : (range (p ^ n)).image (· * p) ⊆ range (p ^ (n + 1)) := fun a =>\n  by\n  simp only [mem_image, mem_range, exists_imp]\n  rintro b ⟨h, rfl⟩\n  rw [pow_succ]\n  exact (mul_lt_mul_right hp.pos).2 h\n[GOAL]\np : ℕ\nhp : Prime p\nn : ℕ\nh1 : Function.Injective fun x => x * p\na : ℕ\n⊢ a ∈ image (fun x => x * p) (range (p ^ n)) → a ∈ range (p ^ (n + 1))\n[PROOFSTEP]\nsimp only [mem_image, mem_range, exists_imp]\n[GOAL]\np : ℕ\nhp : Prime p\nn : ℕ\nh1 : Function.Injective fun x => x * p\na : ℕ\n⊢ ∀ (x : ℕ), x < p ^ n ∧ x * p = a → a < p ^ (n + 1)\n[PROOFSTEP]\nrintro b ⟨h, rfl⟩\n[GOAL]\ncase intro\np : ℕ\nhp : Prime p\nn : ℕ\nh1 : Function.Injective fun x => x * p\nb : ℕ\nh : b < p ^ n\n⊢ b * p < p ^ (n + 1)\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\ncase intro\np : ℕ\nhp : Prime p\nn : ℕ\nh1 : Function.Injective fun x => x * p\nb : ℕ\nh : b < p ^ n\n⊢ b * p < p ^ n * p\n[PROOFSTEP]\nexact (mul_lt_mul_right hp.pos).2 h\n[GOAL]\np : ℕ\nhp : Prime p\nn : ℕ\nh1 : Function.Injective fun x => x * p\nh2 : image (fun x => x * p) (range (p ^ n)) ⊆ range (p ^ (n + 1))\n⊢ Finset.card (range (p ^ (n + 1)) \\ image (fun x => x * p) (range (p ^ n))) = p ^ n * (p - 1)\n[PROOFSTEP]\nrw [card_sdiff h2, card_image_of_injOn (h1.injOn _), card_range, card_range, ← one_mul (p ^ n), pow_succ', ← tsub_mul,\n  one_mul, mul_comm]\n[GOAL]\np : ℕ\nhp : Prime p\nn : ℕ\nhn : 0 < n\n⊢ φ (p ^ n) = p ^ (n - 1) * (p - 1)\n[PROOFSTEP]\nrcases exists_eq_succ_of_ne_zero (pos_iff_ne_zero.1 hn) with ⟨m, rfl⟩\n[GOAL]\ncase intro\np : ℕ\nhp : Prime p\nm : ℕ\nhn : 0 < succ m\n⊢ φ (p ^ succ m) = p ^ (succ m - 1) * (p - 1)\n[PROOFSTEP]\nexact totient_prime_pow_succ hp _\n[GOAL]\np : ℕ\nhp : Prime p\n⊢ φ p = p - 1\n[PROOFSTEP]\nrw [← pow_one p, totient_prime_pow hp]\n[GOAL]\np : ℕ\nhp : Prime p\n⊢ p ^ (1 - 1) * (p - 1) = p ^ 1 - 1\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\nhp : Prime p\n⊢ 0 < 1\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\nhp : 0 < p\n⊢ φ p = p - 1 ↔ Prime p\n[PROOFSTEP]\nrefine' ⟨fun h => _, totient_prime⟩\n[GOAL]\np : ℕ\nhp : 0 < p\nh : φ p = p - 1\n⊢ Prime p\n[PROOFSTEP]\nreplace hp : 1 < p\n[GOAL]\ncase hp\np : ℕ\nhp : 0 < p\nh : φ p = p - 1\n⊢ 1 < p\n[PROOFSTEP]\napply lt_of_le_of_ne\n[GOAL]\ncase hp.a\np : ℕ\nhp : 0 < p\nh : φ p = p - 1\n⊢ 1 ≤ p\n[PROOFSTEP]\nrwa [succ_le_iff]\n[GOAL]\ncase hp.a\np : ℕ\nhp : 0 < p\nh : φ p = p - 1\n⊢ 1 ≠ p\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase hp.a\nhp : 0 < 1\nh : φ 1 = 1 - 1\n⊢ False\n[PROOFSTEP]\nrw [totient_one, tsub_self] at h \n[GOAL]\ncase hp.a\nhp : 0 < 1\nh✝ : 1 = 1 - 1\nh : 1 = 0\n⊢ False\n[PROOFSTEP]\nexact one_ne_zero h\n[GOAL]\np : ℕ\nh : φ p = p - 1\nhp : 1 < p\n⊢ Prime p\n[PROOFSTEP]\nrw [totient_eq_card_coprime, range_eq_Ico, ← Ico_insert_succ_left hp.le, Finset.filter_insert,\n  if_neg (not_coprime_of_dvd_of_dvd hp (dvd_refl p) (dvd_zero p)), ← Nat.card_Ico 1 p] at h \n[GOAL]\np : ℕ\nh : Finset.card (filter (coprime p) (Ico (succ 0) p)) = Finset.card (Ico 1 p)\nhp : 1 < p\n⊢ Prime p\n[PROOFSTEP]\nrefine' p.prime_of_coprime hp fun n hn hnz => Finset.filter_card_eq h n <| Finset.mem_Ico.mpr ⟨_, hn⟩\n[GOAL]\np : ℕ\nh : Finset.card (filter (coprime p) (Ico (succ 0) p)) = Finset.card (Ico 1 p)\nhp : 1 < p\nn : ℕ\nhn : n < p\nhnz : n ≠ 0\n⊢ succ 0 ≤ n\n[PROOFSTEP]\nrwa [succ_le_iff, pos_iff_ne_zero]\n[GOAL]\np : ℕ\nhp : 1 < p\ninst✝ : Fintype (ZMod p)ˣ\n⊢ Fintype.card (ZMod p)ˣ ≤ p - 1\n[PROOFSTEP]\nhaveI : NeZero p := ⟨(pos_of_gt hp).ne'⟩\n[GOAL]\np : ℕ\nhp : 1 < p\ninst✝ : Fintype (ZMod p)ˣ\nthis : NeZero p\n⊢ Fintype.card (ZMod p)ˣ ≤ p - 1\n[PROOFSTEP]\nrw [ZMod.card_units_eq_totient p]\n[GOAL]\np : ℕ\nhp : 1 < p\ninst✝ : Fintype (ZMod p)ˣ\nthis : NeZero p\n⊢ φ p ≤ p - 1\n[PROOFSTEP]\nexact Nat.le_pred_of_lt (Nat.totient_lt p hp)\n[GOAL]\np : ℕ\ninst✝ : Fintype (ZMod p)ˣ\n⊢ Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1\n[PROOFSTEP]\ncases' eq_zero_or_neZero p with hp hp\n[GOAL]\ncase inl\np : ℕ\ninst✝ : Fintype (ZMod p)ˣ\nhp : p = 0\n⊢ Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1\n[PROOFSTEP]\nsubst hp\n[GOAL]\ncase inl\ninst✝ : Fintype (ZMod 0)ˣ\n⊢ Prime 0 ↔ Fintype.card (ZMod 0)ˣ = 0 - 1\n[PROOFSTEP]\nsimp only [ZMod, not_prime_zero, false_iff_iff, zero_tsub]\n  -- the subst created a non-defeq but subsingleton instance diamond; resolve it\n[GOAL]\ncase inl\ninst✝ : Fintype (ZMod 0)ˣ\n⊢ ¬Fintype.card ℤˣ = 0\n[PROOFSTEP]\nsuffices Fintype.card ℤˣ ≠ 0 by convert this\n[GOAL]\ninst✝ : Fintype (ZMod 0)ˣ\nthis : Fintype.card ℤˣ ≠ 0\n⊢ ¬Fintype.card ℤˣ = 0\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase inl\ninst✝ : Fintype (ZMod 0)ˣ\n⊢ Fintype.card ℤˣ ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\np : ℕ\ninst✝ : Fintype (ZMod p)ˣ\nhp : NeZero p\n⊢ Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1\n[PROOFSTEP]\nrw [ZMod.card_units_eq_totient, Nat.totient_eq_iff_prime <| NeZero.pos p]\n[GOAL]\n⊢ φ 0 = 1 ↔ 0 = 1 ∨ 0 = 2\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ φ 1 = 1 ↔ 1 = 1 ∨ 1 = 2\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ φ 2 = 1 ↔ 2 = 1 ∨ 2 = 2\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ φ (n + 3) = 1 ↔ n + 3 = 1 ∨ n + 3 = 2\n[PROOFSTEP]\nhave : 3 ≤ n + 3 := le_add_self\n[GOAL]\nn : ℕ\nthis : 3 ≤ n + 3\n⊢ φ (n + 3) = 1 ↔ n + 3 = 1 ∨ n + 3 = 2\n[PROOFSTEP]\nsimp only [succ_succ_ne_one, false_or_iff]\n[GOAL]\nn : ℕ\nthis : 3 ≤ n + 3\n⊢ φ (n + 3) = 1 ↔ n + 3 = 2\n[PROOFSTEP]\nexact ⟨fun h => not_even_one.elim <| h ▸ totient_even this, by rintro ⟨⟩⟩\n[GOAL]\nn : ℕ\nthis : 3 ≤ n + 3\n⊢ n + 3 = 2 → φ (n + 3) = 1\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\nn : ℕ\nhn : n ≠ 0\n⊢ φ n = Finsupp.prod (factorization n) fun p k => p ^ (k - 1) * (p - 1)\n[PROOFSTEP]\nrw [multiplicative_factorization φ (@totient_mul) totient_one hn]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\n⊢ (Finsupp.prod (factorization n) fun p k => φ (p ^ k)) =\n    Finsupp.prod (factorization n) fun p k => p ^ (k - 1) * (p - 1)\n[PROOFSTEP]\napply Finsupp.prod_congr _\n[GOAL]\nn : ℕ\nhn : n ≠ 0\n⊢ ∀ (x : ℕ), x ∈ (factorization n).support → φ (x ^ ↑(factorization n) x) = x ^ (↑(factorization n) x - 1) * (x - 1)\n[PROOFSTEP]\nintro p hp\n[GOAL]\nn : ℕ\nhn : n ≠ 0\np : ℕ\nhp : p ∈ (factorization n).support\n⊢ φ (p ^ ↑(factorization n) p) = p ^ (↑(factorization n) p - 1) * (p - 1)\n[PROOFSTEP]\nhave h := zero_lt_iff.mpr (Finsupp.mem_support_iff.mp hp)\n[GOAL]\nn : ℕ\nhn : n ≠ 0\np : ℕ\nhp : p ∈ (factorization n).support\nh : 0 < ↑(factorization n) p\n⊢ φ (p ^ ↑(factorization n) p) = p ^ (↑(factorization n) p - 1) * (p - 1)\n[PROOFSTEP]\nrw [totient_prime_pow (prime_of_mem_factorization hp) h]\n[GOAL]\nn : ℕ\n⊢ φ n * ∏ p in List.toFinset (factors n), p = n * ∏ p in List.toFinset (factors n), (p - 1)\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\nn : ℕ\nhn : n = 0\n⊢ φ n * ∏ p in List.toFinset (factors n), p = n * ∏ p in List.toFinset (factors n), (p - 1)\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\n⊢ φ n * ∏ p in List.toFinset (factors n), p = n * ∏ p in List.toFinset (factors n), (p - 1)\n[PROOFSTEP]\nrw [totient_eq_prod_factorization hn]\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\n⊢ (Finsupp.prod (factorization n) fun p k => p ^ (k - 1) * (p - 1)) * ∏ p in List.toFinset (factors n), p =\n    n * ∏ p in List.toFinset (factors n), (p - 1)\n[PROOFSTEP]\nnth_rw 3 [← factorization_prod_pow_eq_self hn]\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\n⊢ (Finsupp.prod (factorization n) fun p k => p ^ (k - 1) * (p - 1)) * ∏ p in List.toFinset (factors n), p =\n    (Finsupp.prod (factorization n) fun x x_1 => x ^ x_1) * ∏ p in List.toFinset (factors n), (p - 1)\n[PROOFSTEP]\nsimp only [← prod_factorization_eq_prod_factors, ← Finsupp.prod_mul]\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\n⊢ (Finsupp.prod (factorization n) fun a b => a ^ (b - 1) * (a - 1) * a) =\n    Finsupp.prod (factorization n) fun a b => a ^ b * (a - 1)\n[PROOFSTEP]\nrefine' Finsupp.prod_congr (M := ℕ) (N := ℕ) fun p hp => _\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\np : ℕ\nhp : p ∈ (factorization n).support\n⊢ p ^ (↑(factorization n) p - 1) * (p - 1) * p = p ^ ↑(factorization n) p * (p - 1)\n[PROOFSTEP]\nrw [Finsupp.mem_support_iff, ← zero_lt_iff] at hp \n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\np : ℕ\nhp : 0 < ↑(factorization n) p\n⊢ p ^ (↑(factorization n) p - 1) * (p - 1) * p = p ^ ↑(factorization n) p * (p - 1)\n[PROOFSTEP]\nrw [mul_comm, ← mul_assoc, ← pow_succ', Nat.sub_one, Nat.succ_pred_eq_of_pos hp]\n[GOAL]\nn : ℕ\n⊢ φ n = (n / ∏ p in List.toFinset (factors n), p) * ∏ p in List.toFinset (factors n), (p - 1)\n[PROOFSTEP]\nrw [← mul_div_left n.totient, totient_mul_prod_factors, mul_comm, Nat.mul_div_assoc _ (prod_prime_factors_dvd n),\n  mul_comm]\n[GOAL]\nn : ℕ\n⊢ 0 < ∏ p in List.toFinset (factors n), p\n[PROOFSTEP]\nhave := prod_pos (fun p => pos_of_mem_factorization (n := n))\n[GOAL]\nn : ℕ\nthis : 0 < ∏ i in (factorization n).support, i\n⊢ 0 < ∏ p in List.toFinset (factors n), p\n[PROOFSTEP]\nsimpa [prod_factorization_eq_prod_factors] using this\n[GOAL]\nn : ℕ\n⊢ ↑(φ n) = ↑n * ∏ p in List.toFinset (factors n), (1 - (↑p)⁻¹)\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\nn : ℕ\nhn : n = 0\n⊢ ↑(φ n) = ↑n * ∏ p in List.toFinset (factors n), (1 - (↑p)⁻¹)\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\n⊢ ↑(φ n) = ↑n * ∏ p in List.toFinset (factors n), (1 - (↑p)⁻¹)\n[PROOFSTEP]\nhave hn' : (n : ℚ) ≠ 0 := by simp [hn]\n[GOAL]\nn : ℕ\nhn : ¬n = 0\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\nhn' : ↑n ≠ 0\n⊢ ↑(φ n) = ↑n * ∏ p in List.toFinset (factors n), (1 - (↑p)⁻¹)\n[PROOFSTEP]\nhave hpQ : (∏ p in n.factors.toFinset, (p : ℚ)) ≠ 0 :=\n  by\n  rw [← cast_prod, cast_ne_zero, ← zero_lt_iff, ← prod_factorization_eq_prod_factors]\n  exact prod_pos fun p hp => pos_of_mem_factorization hp\n[GOAL]\nn : ℕ\nhn : ¬n = 0\nhn' : ↑n ≠ 0\n⊢ ∏ p in List.toFinset (factors n), ↑p ≠ 0\n[PROOFSTEP]\nrw [← cast_prod, cast_ne_zero, ← zero_lt_iff, ← prod_factorization_eq_prod_factors]\n[GOAL]\nn : ℕ\nhn : ¬n = 0\nhn' : ↑n ≠ 0\n⊢ 0 < Finsupp.prod (factorization n) fun p x => p\n[PROOFSTEP]\nexact prod_pos fun p hp => pos_of_mem_factorization hp\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\nhn' : ↑n ≠ 0\nhpQ : ∏ p in List.toFinset (factors n), ↑p ≠ 0\n⊢ ↑(φ n) = ↑n * ∏ p in List.toFinset (factors n), (1 - (↑p)⁻¹)\n[PROOFSTEP]\nsimp only [totient_eq_div_factors_mul n, prod_prime_factors_dvd n, cast_mul, cast_prod, cast_div_charZero, mul_comm_div,\n  mul_right_inj' hn', div_eq_iff hpQ, ← prod_mul_distrib]\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\nhn' : ↑n ≠ 0\nhpQ : ∏ p in List.toFinset (factors n), ↑p ≠ 0\n⊢ ∏ i in List.toFinset (factors n), ↑(i - 1) = ∏ x in List.toFinset (factors n), (1 - (↑x)⁻¹) * ↑x\n[PROOFSTEP]\nrefine' prod_congr rfl fun p hp => _\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\nhn' : ↑n ≠ 0\nhpQ : ∏ p in List.toFinset (factors n), ↑p ≠ 0\np : ℕ\nhp : p ∈ List.toFinset (factors n)\n⊢ ↑(p - 1) = (1 - (↑p)⁻¹) * ↑p\n[PROOFSTEP]\nhave hp := pos_of_mem_factors (List.mem_toFinset.mp hp)\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\nhn' : ↑n ≠ 0\nhpQ : ∏ p in List.toFinset (factors n), ↑p ≠ 0\np : ℕ\nhp✝ : p ∈ List.toFinset (factors n)\nhp : 0 < p\n⊢ ↑(p - 1) = (1 - (↑p)⁻¹) * ↑p\n[PROOFSTEP]\nhave hp' : (p : ℚ) ≠ 0 := cast_ne_zero.mpr hp.ne.symm\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\nhn' : ↑n ≠ 0\nhpQ : ∏ p in List.toFinset (factors n), ↑p ≠ 0\np : ℕ\nhp✝ : p ∈ List.toFinset (factors n)\nhp : 0 < p\nhp' : ↑p ≠ 0\n⊢ ↑(p - 1) = (1 - (↑p)⁻¹) * ↑p\n[PROOFSTEP]\nrw [sub_mul, one_mul, mul_comm, mul_inv_cancel hp', cast_pred hp]\n[GOAL]\na b : ℕ\n⊢ φ (gcd a b) * φ (a * b) = φ a * φ b * gcd a b\n[PROOFSTEP]\nhave shuffle :\n  ∀ a1 a2 b1 b2 c1 c2 : ℕ, b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2) :=\n  by\n  intro a1 a2 b1 b2 c1 c2 h1 h2\n  calc\n    a1 / b1 * c1 * (a2 / b2 * c2) = a1 / b1 * (a2 / b2) * (c1 * c2) := by apply mul_mul_mul_comm\n    _ = a1 * a2 / (b1 * b2) * (c1 * c2) := by\n      congr 1\n      exact div_mul_div_comm h1 h2\n[GOAL]\na b : ℕ\n⊢ ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n[PROOFSTEP]\nintro a1 a2 b1 b2 c1 c2 h1 h2\n[GOAL]\na b a1 a2 b1 b2 c1 c2 : ℕ\nh1 : b1 ∣ a1\nh2 : b2 ∣ a2\n⊢ a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n[PROOFSTEP]\ncalc\n  a1 / b1 * c1 * (a2 / b2 * c2) = a1 / b1 * (a2 / b2) * (c1 * c2) := by apply mul_mul_mul_comm\n  _ = a1 * a2 / (b1 * b2) * (c1 * c2) := by\n    congr 1\n    exact div_mul_div_comm h1 h2\n[GOAL]\na b a1 a2 b1 b2 c1 c2 : ℕ\nh1 : b1 ∣ a1\nh2 : b2 ∣ a2\n⊢ a1 / b1 * c1 * (a2 / b2 * c2) = a1 / b1 * (a2 / b2) * (c1 * c2)\n[PROOFSTEP]\napply mul_mul_mul_comm\n[GOAL]\na b a1 a2 b1 b2 c1 c2 : ℕ\nh1 : b1 ∣ a1\nh2 : b2 ∣ a2\n⊢ a1 / b1 * (a2 / b2) * (c1 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\na b a1 a2 b1 b2 c1 c2 : ℕ\nh1 : b1 ∣ a1\nh2 : b2 ∣ a2\n⊢ a1 / b1 * (a2 / b2) = a1 * a2 / (b1 * b2)\n[PROOFSTEP]\nexact div_mul_div_comm h1 h2\n[GOAL]\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ φ (gcd a b) * φ (a * b) = φ a * φ b * gcd a b\n[PROOFSTEP]\nsimp only [totient_eq_div_factors_mul]\n[GOAL]\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ((gcd a b / ∏ p in List.toFinset (factors (gcd a b)), p) * ∏ p in List.toFinset (factors (gcd a b)), (p - 1)) *\n      ((a * b / ∏ p in List.toFinset (factors (a * b)), p) * ∏ p in List.toFinset (factors (a * b)), (p - 1)) =\n    ((a / ∏ p in List.toFinset (factors a), p) * ∏ p in List.toFinset (factors a), (p - 1)) *\n        ((b / ∏ p in List.toFinset (factors b), p) * ∏ p in List.toFinset (factors b), (p - 1)) *\n      gcd a b\n[PROOFSTEP]\nrw [shuffle, shuffle]\n[GOAL]\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ gcd a b * (a * b) / ((∏ p in List.toFinset (factors (gcd a b)), p) * ∏ p in List.toFinset (factors (a * b)), p) *\n      ((∏ p in List.toFinset (factors (gcd a b)), (p - 1)) * ∏ p in List.toFinset (factors (a * b)), (p - 1)) =\n    a * b / ((∏ p in List.toFinset (factors a), p) * ∏ p in List.toFinset (factors b), p) *\n        ((∏ p in List.toFinset (factors a), (p - 1)) * ∏ p in List.toFinset (factors b), (p - 1)) *\n      gcd a b\ncase a\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ∏ p in List.toFinset (factors a), p ∣ a\ncase a\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ∏ p in List.toFinset (factors b), p ∣ b\ncase a\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ∏ p in List.toFinset (factors (gcd a b)), p ∣ gcd a b\ncase a\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ∏ p in List.toFinset (factors (a * b)), p ∣ a * b\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase a\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ∏ p in List.toFinset (factors a), p ∣ a\ncase a\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ∏ p in List.toFinset (factors b), p ∣ b\ncase a\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ∏ p in List.toFinset (factors (gcd a b)), p ∣ gcd a b\ncase a\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ∏ p in List.toFinset (factors (a * b)), p ∣ a * b\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ gcd a b * (a * b) / ((∏ p in List.toFinset (factors (gcd a b)), p) * ∏ p in List.toFinset (factors (a * b)), p) *\n      ((∏ p in List.toFinset (factors (gcd a b)), (p - 1)) * ∏ p in List.toFinset (factors (a * b)), (p - 1)) =\n    a * b / ((∏ p in List.toFinset (factors a), p) * ∏ p in List.toFinset (factors b), p) *\n        ((∏ p in List.toFinset (factors a), (p - 1)) * ∏ p in List.toFinset (factors b), (p - 1)) *\n      gcd a b\n[PROOFSTEP]\nrepeat' apply prod_prime_factors_dvd\n[GOAL]\ncase a\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ∏ p in List.toFinset (factors a), p ∣ a\n[PROOFSTEP]\napply prod_prime_factors_dvd\n[GOAL]\ncase a\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ∏ p in List.toFinset (factors b), p ∣ b\n[PROOFSTEP]\napply prod_prime_factors_dvd\n[GOAL]\ncase a\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ∏ p in List.toFinset (factors (gcd a b)), p ∣ gcd a b\n[PROOFSTEP]\napply prod_prime_factors_dvd\n[GOAL]\ncase a\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ ∏ p in List.toFinset (factors (a * b)), p ∣ a * b\n[PROOFSTEP]\napply prod_prime_factors_dvd\n[GOAL]\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ gcd a b * (a * b) / ((∏ p in List.toFinset (factors (gcd a b)), p) * ∏ p in List.toFinset (factors (a * b)), p) *\n      ((∏ p in List.toFinset (factors (gcd a b)), (p - 1)) * ∏ p in List.toFinset (factors (a * b)), (p - 1)) =\n    a * b / ((∏ p in List.toFinset (factors a), p) * ∏ p in List.toFinset (factors b), p) *\n        ((∏ p in List.toFinset (factors a), (p - 1)) * ∏ p in List.toFinset (factors b), (p - 1)) *\n      gcd a b\n[PROOFSTEP]\napply prod_prime_factors_dvd\n[GOAL]\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ gcd a b * (a * b) / ((∏ p in List.toFinset (factors (gcd a b)), p) * ∏ p in List.toFinset (factors (a * b)), p) *\n      ((∏ p in List.toFinset (factors (gcd a b)), (p - 1)) * ∏ p in List.toFinset (factors (a * b)), (p - 1)) =\n    a * b / ((∏ p in List.toFinset (factors a), p) * ∏ p in List.toFinset (factors b), p) *\n        ((∏ p in List.toFinset (factors a), (p - 1)) * ∏ p in List.toFinset (factors b), (p - 1)) *\n      gcd a b\n[PROOFSTEP]\nsimp only [prod_factors_gcd_mul_prod_factors_mul]\n[GOAL]\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ gcd a b * (a * b) / ((∏ p in List.toFinset (factors a), p) * ∏ p in List.toFinset (factors b), p) *\n      ((∏ p in List.toFinset (factors a), (p - 1)) * ∏ p in List.toFinset (factors b), (p - 1)) =\n    a * b / ((∏ p in List.toFinset (factors a), p) * ∏ p in List.toFinset (factors b), p) *\n        ((∏ p in List.toFinset (factors a), (p - 1)) * ∏ p in List.toFinset (factors b), (p - 1)) *\n      gcd a b\n[PROOFSTEP]\nrw [eq_comm, mul_comm, ← mul_assoc, ← Nat.mul_div_assoc]\n[GOAL]\ncase H\na b : ℕ\nshuffle : ∀ (a1 a2 b1 b2 c1 c2 : ℕ), b1 ∣ a1 → b2 ∣ a2 → a1 / b1 * c1 * (a2 / b2 * c2) = a1 * a2 / (b1 * b2) * (c1 * c2)\n⊢ (∏ p in List.toFinset (factors a), p) * ∏ p in List.toFinset (factors b), p ∣ a * b\n[PROOFSTEP]\nexact mul_dvd_mul (prod_prime_factors_dvd a) (prod_prime_factors_dvd b)\n[GOAL]\na b : ℕ\n⊢ φ a * φ b ≤ φ (a * b)\n[PROOFSTEP]\nlet d := a.gcd b\n[GOAL]\na b : ℕ\nd : ℕ := gcd a b\n⊢ φ a * φ b ≤ φ (a * b)\n[PROOFSTEP]\nrcases(zero_le a).eq_or_lt with (rfl | ha0)\n[GOAL]\ncase inl\nb : ℕ\nd : ℕ := gcd 0 b\n⊢ φ 0 * φ b ≤ φ (0 * b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\na b : ℕ\nd : ℕ := gcd a b\nha0 : 0 < a\n⊢ φ a * φ b ≤ φ (a * b)\n[PROOFSTEP]\nhave hd0 : 0 < d := Nat.gcd_pos_of_pos_left _ ha0\n[GOAL]\ncase inr\na b : ℕ\nd : ℕ := gcd a b\nha0 : 0 < a\nhd0 : 0 < d\n⊢ φ a * φ b ≤ φ (a * b)\n[PROOFSTEP]\napply le_of_mul_le_mul_right _ hd0\n[GOAL]\na b : ℕ\nd : ℕ := gcd a b\nha0 : 0 < a\nhd0 : 0 < d\n⊢ φ a * φ b * d ≤ φ (a * b) * d\n[PROOFSTEP]\nrw [← totient_gcd_mul_totient_mul a b, mul_comm]\n[GOAL]\na b : ℕ\nd : ℕ := gcd a b\nha0 : 0 < a\nhd0 : 0 < d\n⊢ φ (a * b) * φ (gcd a b) ≤ φ (a * b) * d\n[PROOFSTEP]\napply mul_le_mul_left' (Nat.totient_le d)\n[GOAL]\na b : ℕ\nh : a ∣ b\n⊢ φ a ∣ φ b\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha0)\n[GOAL]\ncase inl\nb : ℕ\nh : 0 ∣ b\n⊢ φ 0 ∣ φ b\n[PROOFSTEP]\nsimp [zero_dvd_iff.1 h]\n[GOAL]\ncase inr\na b : ℕ\nh : a ∣ b\nha0 : a ≠ 0\n⊢ φ a ∣ φ b\n[PROOFSTEP]\nrcases eq_or_ne b 0 with (rfl | hb0)\n[GOAL]\ncase inr.inl\na : ℕ\nha0 : a ≠ 0\nh : a ∣ 0\n⊢ φ a ∣ φ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\na b : ℕ\nh : a ∣ b\nha0 : a ≠ 0\nhb0 : b ≠ 0\n⊢ φ a ∣ φ b\n[PROOFSTEP]\nhave hab' : a.factorization.support ⊆ b.factorization.support :=\n  by\n  intro p\n  simp only [support_factorization, List.mem_toFinset]\n  apply factors_subset_of_dvd h hb0\n[GOAL]\na b : ℕ\nh : a ∣ b\nha0 : a ≠ 0\nhb0 : b ≠ 0\n⊢ (factorization a).support ⊆ (factorization b).support\n[PROOFSTEP]\nintro p\n[GOAL]\na b : ℕ\nh : a ∣ b\nha0 : a ≠ 0\nhb0 : b ≠ 0\np : ℕ\n⊢ p ∈ (factorization a).support → p ∈ (factorization b).support\n[PROOFSTEP]\nsimp only [support_factorization, List.mem_toFinset]\n[GOAL]\na b : ℕ\nh : a ∣ b\nha0 : a ≠ 0\nhb0 : b ≠ 0\np : ℕ\n⊢ p ∈ factors a → p ∈ factors b\n[PROOFSTEP]\napply factors_subset_of_dvd h hb0\n[GOAL]\ncase inr.inr\na b : ℕ\nh : a ∣ b\nha0 : a ≠ 0\nhb0 : b ≠ 0\nhab' : (factorization a).support ⊆ (factorization b).support\n⊢ φ a ∣ φ b\n[PROOFSTEP]\nrw [totient_eq_prod_factorization ha0, totient_eq_prod_factorization hb0]\n[GOAL]\ncase inr.inr\na b : ℕ\nh : a ∣ b\nha0 : a ≠ 0\nhb0 : b ≠ 0\nhab' : (factorization a).support ⊆ (factorization b).support\n⊢ (Finsupp.prod (factorization a) fun p k => p ^ (k - 1) * (p - 1)) ∣\n    Finsupp.prod (factorization b) fun p k => p ^ (k - 1) * (p - 1)\n[PROOFSTEP]\nrefine' Finsupp.prod_dvd_prod_of_subset_of_dvd hab' fun p _ => mul_dvd_mul _ dvd_rfl\n[GOAL]\ncase inr.inr\na b : ℕ\nh : a ∣ b\nha0 : a ≠ 0\nhb0 : b ≠ 0\nhab' : (factorization a).support ⊆ (factorization b).support\np : ℕ\nx✝ : p ∈ (factorization a).support\n⊢ p ^ (↑(factorization a) p - 1) ∣ p ^ (↑(factorization b) p - 1)\n[PROOFSTEP]\nexact pow_dvd_pow p (tsub_le_tsub_right ((factorization_le_iff_dvd ha0 hb0).2 h p) 1)\n[GOAL]\np n : ℕ\nhp : Prime p\nh : p ∣ n\n⊢ φ (p * n) = p * φ n\n[PROOFSTEP]\nhave h1 := totient_gcd_mul_totient_mul p n\n[GOAL]\np n : ℕ\nhp : Prime p\nh : p ∣ n\nh1 : φ (gcd p n) * φ (p * n) = φ p * φ n * gcd p n\n⊢ φ (p * n) = p * φ n\n[PROOFSTEP]\nrw [gcd_eq_left h, mul_assoc] at h1 \n[GOAL]\np n : ℕ\nhp : Prime p\nh : p ∣ n\nh1 : φ p * φ (p * n) = φ p * (φ n * p)\n⊢ φ (p * n) = p * φ n\n[PROOFSTEP]\nsimpa [(totient_pos hp.pos).ne', mul_comm] using h1\n[GOAL]\np n : ℕ\nhp : Prime p\nh : ¬p ∣ n\n⊢ φ (p * n) = (p - 1) * φ n\n[PROOFSTEP]\nrw [totient_mul _, totient_prime hp]\n[GOAL]\np n : ℕ\nhp : Prime p\nh : ¬p ∣ n\n⊢ coprime p n\n[PROOFSTEP]\nsimpa [h] using coprime_or_dvd_of_prime hp n\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Totient", "llama_tokens": 22268, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.3618984898985668}}
{"text": "[GOAL]\n⊢ StableUnderComposition fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f\n[PROOFSTEP]\nintrov R hf hg\n[GOAL]\nR S T : Type u_1\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nf : R →+* S\ng : S →+* T\nhf : Function.Surjective ↑f\nhg : Function.Surjective ↑g\n⊢ Function.Surjective ↑(comp g f)\n[PROOFSTEP]\nexact hg.comp hf\n[GOAL]\n⊢ RespectsIso fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f\n[PROOFSTEP]\napply surjective_stableUnderComposition.respectsIso\n[GOAL]\n⊢ ∀ {R S : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S),\n    Function.Surjective ↑(RingEquiv.toRingHom e)\n[PROOFSTEP]\nintros _ _ _ _ e\n[GOAL]\nR✝ S✝ : Type u_1\ninst✝¹ : CommRing R✝\ninst✝ : CommRing S✝\ne : R✝ ≃+* S✝\n⊢ Function.Surjective ↑(RingEquiv.toRingHom e)\n[PROOFSTEP]\nexact e.surjective\n[GOAL]\n⊢ StableUnderBaseChange fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f\n[PROOFSTEP]\nrefine' StableUnderBaseChange.mk _ surjective_respectsIso _\n[GOAL]\n⊢ ∀ ⦃R S T : Type u_1⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], Function.Surjective ↑(algebraMap R T) → Function.Surjective ↑includeLeftRingHom\n[PROOFSTEP]\nclassical\nintrov h x\nskip\ninduction x using TensorProduct.induction_on with\n| zero => exact ⟨0, map_zero _⟩\n| tmul x y =>\n  obtain ⟨y, rfl⟩ := h y; use y • x; dsimp\n  rw [TensorProduct.smul_tmul, Algebra.algebraMap_eq_smul_one]\n| add x y ex ey => obtain ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩ := ex, ey; exact ⟨x + y, map_add _ x y⟩\n[GOAL]\n⊢ ∀ ⦃R S T : Type u_1⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], Function.Surjective ↑(algebraMap R T) → Function.Surjective ↑includeLeftRingHom\n[PROOFSTEP]\nintrov h x\n[GOAL]\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\nx : S ⊗[R] T\n⊢ ∃ a, ↑includeLeftRingHom a = x\n[PROOFSTEP]\nskip\n[GOAL]\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\nx : S ⊗[R] T\n⊢ ∃ a, ↑includeLeftRingHom a = x\n[PROOFSTEP]\ninduction x using TensorProduct.induction_on with\n| zero => exact ⟨0, map_zero _⟩\n| tmul x y =>\n  obtain ⟨y, rfl⟩ := h y; use y • x; dsimp\n  rw [TensorProduct.smul_tmul, Algebra.algebraMap_eq_smul_one]\n| add x y ex ey => obtain ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩ := ex, ey; exact ⟨x + y, map_add _ x y⟩\n[GOAL]\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\nx : S ⊗[R] T\n⊢ ∃ a, ↑includeLeftRingHom a = x\n[PROOFSTEP]\ninduction x using TensorProduct.induction_on with\n| zero => exact ⟨0, map_zero _⟩\n| tmul x y =>\n  obtain ⟨y, rfl⟩ := h y; use y • x; dsimp\n  rw [TensorProduct.smul_tmul, Algebra.algebraMap_eq_smul_one]\n| add x y ex ey => obtain ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩ := ex, ey; exact ⟨x + y, map_add _ x y⟩\n[GOAL]\ncase zero\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\n⊢ ∃ a, ↑includeLeftRingHom a = 0\n[PROOFSTEP]\n\n| zero => exact ⟨0, map_zero _⟩\n[GOAL]\ncase zero\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\n⊢ ∃ a, ↑includeLeftRingHom a = 0\n[PROOFSTEP]\nexact ⟨0, map_zero _⟩\n[GOAL]\ncase tmul\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\nx : S\ny : T\n⊢ ∃ a, ↑includeLeftRingHom a = x ⊗ₜ[R] y\n[PROOFSTEP]\n\n| tmul x y =>\n  obtain ⟨y, rfl⟩ := h y; use y • x; dsimp\n  rw [TensorProduct.smul_tmul, Algebra.algebraMap_eq_smul_one]\n[GOAL]\ncase tmul\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\nx : S\ny : T\n⊢ ∃ a, ↑includeLeftRingHom a = x ⊗ₜ[R] y\n[PROOFSTEP]\nobtain ⟨y, rfl⟩ := h y\n[GOAL]\ncase tmul.intro\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\nx : S\ny : R\n⊢ ∃ a, ↑includeLeftRingHom a = x ⊗ₜ[R] ↑(algebraMap R T) y\n[PROOFSTEP]\nuse y • x\n[GOAL]\ncase h\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\nx : S\ny : R\n⊢ ↑includeLeftRingHom (y • x) = x ⊗ₜ[R] ↑(algebraMap R T) y\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\nx : S\ny : R\n⊢ (y • x) ⊗ₜ[R] 1 = x ⊗ₜ[R] ↑(algebraMap R T) y\n[PROOFSTEP]\nrw [TensorProduct.smul_tmul, Algebra.algebraMap_eq_smul_one]\n[GOAL]\ncase add\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\nx y : S ⊗[R] T\nex : ∃ a, ↑includeLeftRingHom a = x\ney : ∃ a, ↑includeLeftRingHom a = y\n⊢ ∃ a, ↑includeLeftRingHom a = x + y\n[PROOFSTEP]\n\n| add x y ex ey => obtain ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩ := ex, ey; exact ⟨x + y, map_add _ x y⟩\n[GOAL]\ncase add\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\nx y : S ⊗[R] T\nex : ∃ a, ↑includeLeftRingHom a = x\ney : ∃ a, ↑includeLeftRingHom a = y\n⊢ ∃ a, ↑includeLeftRingHom a = x + y\n[PROOFSTEP]\nobtain ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩ := ex, ey\n[GOAL]\ncase add.intro.intro\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : Function.Surjective ↑(algebraMap R T)\nx y : S\n⊢ ∃ a, ↑includeLeftRingHom a = ↑includeLeftRingHom x + ↑includeLeftRingHom y\n[PROOFSTEP]\nexact ⟨x + y, map_add _ x y⟩\n[GOAL]\n⊢ OfLocalizationSpan fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f\n[PROOFSTEP]\nintrov R hs H\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\n⊢ Function.Surjective ↑f\n[PROOFSTEP]\nskip\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\n⊢ Function.Surjective ↑f\n[PROOFSTEP]\nletI := f.toAlgebra\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\n⊢ Function.Surjective ↑f\n[PROOFSTEP]\nshow Function.Surjective (Algebra.ofId R S)\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\n⊢ Function.Surjective ↑(Algebra.ofId R S)\n[PROOFSTEP]\nrw [← Algebra.range_top_iff_surjective, eq_top_iff]\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\n⊢ ⊤ ≤ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nrintro x -\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\n⊢ x ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nobtain ⟨l, hl⟩ := (Finsupp.mem_span_iff_total R s 1).mp (show _ ∈ Ideal.span s by rw [hs]; trivial)\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\n⊢ 1 ∈ Ideal.span s\n[PROOFSTEP]\nrw [hs]\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\n⊢ 1 ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase intro\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\n⊢ x ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nfapply Subalgebra.mem_of_finset_sum_eq_one_of_pow_smul_mem _ l.support (fun x : s => f x) fun x : s => f (l x)\n[GOAL]\ncase intro.e\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\n⊢ ∑ i in l.support, ↑f (↑l i) * ↑f ↑i = 1\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase intro.e\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\n⊢ ∑ i in l.support, ↑f (↑l i) * ↑f ↑i = 1\n[PROOFSTEP]\nsimp_rw [← _root_.map_mul, ← map_sum, ← f.map_one]\n[GOAL]\ncase intro.e\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\n⊢ ↑f (∑ x in l.support, ↑l x * ↑x) = ↑f 1\n[PROOFSTEP]\nexact f.congr_arg hl\n[GOAL]\ncase intro.hs\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\n⊢ ∀ (i : ↑s), ↑f ↑i ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nexact fun _ => Set.mem_range_self _\n[GOAL]\ncase intro.hl\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\n⊢ ∀ (i : ↑s), ↑f (↑l i) ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nexact fun _ => Set.mem_range_self _\n[GOAL]\ncase intro.H\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\n⊢ ∀ (i : ↑s), ∃ n, ↑f ↑i ^ n • x ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nintro r\n[GOAL]\ncase intro.H\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\nr : ↑s\n⊢ ∃ n, ↑f ↑r ^ n • x ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := H r (IsLocalization.mk' _ x (1 : Submonoid.powers (f r)))\n[GOAL]\ncase intro.H.intro\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\nr : ↑s\ny : Localization.Away ↑r\nhy : ↑(Localization.awayMap f ↑r) y = IsLocalization.mk' (Localization.Away (↑f ↑r)) x 1\n⊢ ∃ n, ↑f ↑r ^ n • x ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nobtain ⟨z, ⟨_, n, rfl⟩, rfl⟩ := IsLocalization.mk'_surjective (Submonoid.powers (r : R)) y\n[GOAL]\ncase intro.H.intro.intro.intro.mk.intro\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\nr : ↑s\nz : R\nn : ℕ\nhy :\n  ↑(Localization.awayMap f ↑r)\n      (IsLocalization.mk' (Localization.Away ↑r) z\n        { val := (fun x x_1 => x ^ x_1) (↑r) n,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) }) =\n    IsLocalization.mk' (Localization.Away (↑f ↑r)) x 1\n⊢ ∃ n, ↑f ↑r ^ n • x ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nerw [IsLocalization.map_mk', IsLocalization.eq] at hy \n[GOAL]\ncase intro.H.intro.intro.intro.mk.intro\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\nr : ↑s\nz : R\nn : ℕ\nhy :\n  ∃ c,\n    ↑c * (↑1 * ↑f z) =\n      ↑c *\n        (↑{\n              val :=\n                ↑f\n                  ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                      property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) },\n              property :=\n                (_ :\n                  ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                        property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) } ∈\n                    Submonoid.comap f (Submonoid.powers (↑f ↑r))) } *\n          x)\n⊢ ∃ n, ↑f ↑r ^ n • x ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nobtain ⟨⟨_, m, rfl⟩, hm⟩ := hy\n[GOAL]\ncase intro.H.intro.intro.intro.mk.intro.intro.mk.intro\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\nr : ↑s\nz : R\nn m : ℕ\nhm :\n  ↑{ val := (fun x x_1 => x ^ x_1) (↑f ↑r) m,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑f ↑r) y = (fun x x_1 => x ^ x_1) (↑f ↑r) m) } *\n      (↑1 * ↑f z) =\n    ↑{ val := (fun x x_1 => x ^ x_1) (↑f ↑r) m,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑f ↑r) y = (fun x x_1 => x ^ x_1) (↑f ↑r) m) } *\n      (↑{\n            val :=\n              ↑f\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                    property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) },\n            property :=\n              (_ :\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                      property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) } ∈\n                  Submonoid.comap f (Submonoid.powers (↑f ↑r))) } *\n        x)\n⊢ ∃ n, ↑f ↑r ^ n • x ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nrefine' ⟨m + n, _⟩\n[GOAL]\ncase intro.H.intro.intro.intro.mk.intro.intro.mk.intro\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\nr : ↑s\nz : R\nn m : ℕ\nhm :\n  ↑{ val := (fun x x_1 => x ^ x_1) (↑f ↑r) m,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑f ↑r) y = (fun x x_1 => x ^ x_1) (↑f ↑r) m) } *\n      (↑1 * ↑f z) =\n    ↑{ val := (fun x x_1 => x ^ x_1) (↑f ↑r) m,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑f ↑r) y = (fun x x_1 => x ^ x_1) (↑f ↑r) m) } *\n      (↑{\n            val :=\n              ↑f\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                    property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) },\n            property :=\n              (_ :\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                      property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) } ∈\n                  Submonoid.comap f (Submonoid.powers (↑f ↑r))) } *\n        x)\n⊢ ↑f ↑r ^ (m + n) • x ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\ndsimp at hm ⊢\n[GOAL]\ncase intro.H.intro.intro.intro.mk.intro.intro.mk.intro\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\nr : ↑s\nz : R\nn m : ℕ\nhm : ↑f ↑r ^ m * (1 * ↑f z) = ↑f ↑r ^ m * (↑f (↑r ^ n) * x)\n⊢ ↑f ↑r ^ (m + n) * x ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nsimp_rw [_root_.one_mul, ← _root_.mul_assoc, ← map_pow, ← f.map_mul, ← pow_add, map_pow] at hm \n[GOAL]\ncase intro.H.intro.intro.intro.mk.intro.intro.mk.intro\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nH : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ↑f) (Localization.awayMap f ↑r)\nthis : Algebra R S := toAlgebra f\nx : S\nl : ↑s →₀ R\nhl : ↑(Finsupp.total (↑s) R R Subtype.val) l = 1\nr : ↑s\nz : R\nn m : ℕ\nhm : ↑f (↑r ^ m * z) = ↑f ↑r ^ (m + n) * x\n⊢ ↑f ↑r ^ (m + n) * x ∈ AlgHom.range (Algebra.ofId R S)\n[PROOFSTEP]\nexact ⟨_, hm⟩\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.RingHom.Surjective", "llama_tokens": 9065, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6224593312018546, "lm_q2_score": 0.5813030906443133, "lm_q1q2_score": 0.3618375330280303}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁸ : CommSemiring R\ninst✝⁷ : CommSemiring S\ninst✝⁶ : Semiring A\ninst✝⁵ : Semiring B\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\ne₁ : Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ ≃ₗ[S] (A ⊗[R] B)ᵐᵒᵖ :=\n  LinearEquiv.trans\n    (TensorProduct.AlgebraTensorModule.congr (LinearEquiv.symm (opLinearEquiv S)) (LinearEquiv.symm (opLinearEquiv R)))\n    (opLinearEquiv S)\ne₂ : A ⊗[R] B ≃ₗ[S] (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)ᵐᵒᵖ :=\n  LinearEquiv.trans (TensorProduct.AlgebraTensorModule.congr (opLinearEquiv S) (opLinearEquiv R)) (opLinearEquiv S)\n⊢ ↑AlgHom.op.symm\n      (AlgHom.comp\n        (algHomOfLinearMapTensorProduct ↑e₁\n          (_ :\n            ∀ (a₁ a₂ : Aᵐᵒᵖ) (b₁ b₂ : Bᵐᵒᵖ), ↑↑e₁ ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = ↑↑e₁ (a₁ ⊗ₜ[R] b₁) * ↑↑e₁ (a₂ ⊗ₜ[R] b₂))\n          (_ : ∀ (r : S), ↑↑e₁ (↑(algebraMap S Aᵐᵒᵖ) r ⊗ₜ[R] 1) = ↑(algebraMap S (A ⊗[R] B)ᵐᵒᵖ) r))\n        (↑AlgHom.opComm\n          (algHomOfLinearMapTensorProduct ↑e₂\n            (_ : ∀ (a₁ a₂ : A) (b₁ b₂ : B), ↑↑e₂ ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = ↑↑e₂ (a₁ ⊗ₜ[R] b₁) * ↑↑e₂ (a₂ ⊗ₜ[R] b₂))\n            (_ : ∀ (r : S), ↑↑e₂ (↑(algebraMap S A) r ⊗ₜ[R] 1) = ↑(algebraMap S (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)ᵐᵒᵖ) r)))) =\n    ↑AlgHom.op.symm (AlgHom.id S (A ⊗[R] B)ᵐᵒᵖ)\n[PROOFSTEP]\next\n[GOAL]\ncase ha.H\nR : Type u_1\nS : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁸ : CommSemiring R\ninst✝⁷ : CommSemiring S\ninst✝⁶ : Semiring A\ninst✝⁵ : Semiring B\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\ne₁ : Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ ≃ₗ[S] (A ⊗[R] B)ᵐᵒᵖ :=\n  LinearEquiv.trans\n    (TensorProduct.AlgebraTensorModule.congr (LinearEquiv.symm (opLinearEquiv S)) (LinearEquiv.symm (opLinearEquiv R)))\n    (opLinearEquiv S)\ne₂ : A ⊗[R] B ≃ₗ[S] (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)ᵐᵒᵖ :=\n  LinearEquiv.trans (TensorProduct.AlgebraTensorModule.congr (opLinearEquiv S) (opLinearEquiv R)) (opLinearEquiv S)\nx✝ : A\n⊢ ↑(AlgHom.comp\n          (↑AlgHom.op.symm\n            (AlgHom.comp\n              (algHomOfLinearMapTensorProduct ↑e₁\n                (_ :\n                  ∀ (a₁ a₂ : Aᵐᵒᵖ) (b₁ b₂ : Bᵐᵒᵖ),\n                    ↑↑e₁ ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = ↑↑e₁ (a₁ ⊗ₜ[R] b₁) * ↑↑e₁ (a₂ ⊗ₜ[R] b₂))\n                (_ : ∀ (r : S), ↑↑e₁ (↑(algebraMap S Aᵐᵒᵖ) r ⊗ₜ[R] 1) = ↑(algebraMap S (A ⊗[R] B)ᵐᵒᵖ) r))\n              (↑AlgHom.opComm\n                (algHomOfLinearMapTensorProduct ↑e₂\n                  (_ :\n                    ∀ (a₁ a₂ : A) (b₁ b₂ : B),\n                      ↑↑e₂ ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = ↑↑e₂ (a₁ ⊗ₜ[R] b₁) * ↑↑e₂ (a₂ ⊗ₜ[R] b₂))\n                  (_ : ∀ (r : S), ↑↑e₂ (↑(algebraMap S A) r ⊗ₜ[R] 1) = ↑(algebraMap S (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)ᵐᵒᵖ) r)))))\n          includeLeft)\n      x✝ =\n    ↑(AlgHom.comp (↑AlgHom.op.symm (AlgHom.id S (A ⊗[R] B)ᵐᵒᵖ)) includeLeft) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hb.H\nR : Type u_1\nS : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁸ : CommSemiring R\ninst✝⁷ : CommSemiring S\ninst✝⁶ : Semiring A\ninst✝⁵ : Semiring B\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\ne₁ : Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ ≃ₗ[S] (A ⊗[R] B)ᵐᵒᵖ :=\n  LinearEquiv.trans\n    (TensorProduct.AlgebraTensorModule.congr (LinearEquiv.symm (opLinearEquiv S)) (LinearEquiv.symm (opLinearEquiv R)))\n    (opLinearEquiv S)\ne₂ : A ⊗[R] B ≃ₗ[S] (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)ᵐᵒᵖ :=\n  LinearEquiv.trans (TensorProduct.AlgebraTensorModule.congr (opLinearEquiv S) (opLinearEquiv R)) (opLinearEquiv S)\nx✝ : B\n⊢ ↑(AlgHom.comp\n          (AlgHom.restrictScalars R\n            (↑AlgHom.op.symm\n              (AlgHom.comp\n                (algHomOfLinearMapTensorProduct ↑e₁\n                  (_ :\n                    ∀ (a₁ a₂ : Aᵐᵒᵖ) (b₁ b₂ : Bᵐᵒᵖ),\n                      ↑↑e₁ ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = ↑↑e₁ (a₁ ⊗ₜ[R] b₁) * ↑↑e₁ (a₂ ⊗ₜ[R] b₂))\n                  (_ : ∀ (r : S), ↑↑e₁ (↑(algebraMap S Aᵐᵒᵖ) r ⊗ₜ[R] 1) = ↑(algebraMap S (A ⊗[R] B)ᵐᵒᵖ) r))\n                (↑AlgHom.opComm\n                  (algHomOfLinearMapTensorProduct ↑e₂\n                    (_ :\n                      ∀ (a₁ a₂ : A) (b₁ b₂ : B),\n                        ↑↑e₂ ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = ↑↑e₂ (a₁ ⊗ₜ[R] b₁) * ↑↑e₂ (a₂ ⊗ₜ[R] b₂))\n                    (_ : ∀ (r : S), ↑↑e₂ (↑(algebraMap S A) r ⊗ₜ[R] 1) = ↑(algebraMap S (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)ᵐᵒᵖ) r))))))\n          includeRight)\n      x✝ =\n    ↑(AlgHom.comp (AlgHom.restrictScalars R (↑AlgHom.op.symm (AlgHom.id S (A ⊗[R] B)ᵐᵒᵖ))) includeRight) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁸ : CommSemiring R\ninst✝⁷ : CommSemiring S\ninst✝⁶ : Semiring A\ninst✝⁵ : Semiring B\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\ne₁ : Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ ≃ₗ[S] (A ⊗[R] B)ᵐᵒᵖ :=\n  LinearEquiv.trans\n    (TensorProduct.AlgebraTensorModule.congr (LinearEquiv.symm (opLinearEquiv S)) (LinearEquiv.symm (opLinearEquiv R)))\n    (opLinearEquiv S)\ne₂ : A ⊗[R] B ≃ₗ[S] (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)ᵐᵒᵖ :=\n  LinearEquiv.trans (TensorProduct.AlgebraTensorModule.congr (opLinearEquiv S) (opLinearEquiv R)) (opLinearEquiv S)\n⊢ AlgHom.comp\n      (↑AlgHom.opComm\n        (algHomOfLinearMapTensorProduct ↑e₂\n          (_ : ∀ (a₁ a₂ : A) (b₁ b₂ : B), ↑↑e₂ ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = ↑↑e₂ (a₁ ⊗ₜ[R] b₁) * ↑↑e₂ (a₂ ⊗ₜ[R] b₂))\n          (_ : ∀ (r : S), ↑↑e₂ (↑(algebraMap S A) r ⊗ₜ[R] 1) = ↑(algebraMap S (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)ᵐᵒᵖ) r)))\n      (algHomOfLinearMapTensorProduct ↑e₁\n        (_ :\n          ∀ (a₁ a₂ : Aᵐᵒᵖ) (b₁ b₂ : Bᵐᵒᵖ), ↑↑e₁ ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = ↑↑e₁ (a₁ ⊗ₜ[R] b₁) * ↑↑e₁ (a₂ ⊗ₜ[R] b₂))\n        (_ : ∀ (r : S), ↑↑e₁ (↑(algebraMap S Aᵐᵒᵖ) r ⊗ₜ[R] 1) = ↑(algebraMap S (A ⊗[R] B)ᵐᵒᵖ) r)) =\n    AlgHom.id S (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)\n[PROOFSTEP]\next\n[GOAL]\ncase ha.H\nR : Type u_1\nS : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁸ : CommSemiring R\ninst✝⁷ : CommSemiring S\ninst✝⁶ : Semiring A\ninst✝⁵ : Semiring B\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\ne₁ : Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ ≃ₗ[S] (A ⊗[R] B)ᵐᵒᵖ :=\n  LinearEquiv.trans\n    (TensorProduct.AlgebraTensorModule.congr (LinearEquiv.symm (opLinearEquiv S)) (LinearEquiv.symm (opLinearEquiv R)))\n    (opLinearEquiv S)\ne₂ : A ⊗[R] B ≃ₗ[S] (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)ᵐᵒᵖ :=\n  LinearEquiv.trans (TensorProduct.AlgebraTensorModule.congr (opLinearEquiv S) (opLinearEquiv R)) (opLinearEquiv S)\nx✝ : Aᵐᵒᵖ\n⊢ ↑(AlgHom.comp\n          (AlgHom.comp\n            (↑AlgHom.opComm\n              (algHomOfLinearMapTensorProduct ↑e₂\n                (_ :\n                  ∀ (a₁ a₂ : A) (b₁ b₂ : B), ↑↑e₂ ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = ↑↑e₂ (a₁ ⊗ₜ[R] b₁) * ↑↑e₂ (a₂ ⊗ₜ[R] b₂))\n                (_ : ∀ (r : S), ↑↑e₂ (↑(algebraMap S A) r ⊗ₜ[R] 1) = ↑(algebraMap S (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)ᵐᵒᵖ) r)))\n            (algHomOfLinearMapTensorProduct ↑e₁\n              (_ :\n                ∀ (a₁ a₂ : Aᵐᵒᵖ) (b₁ b₂ : Bᵐᵒᵖ),\n                  ↑↑e₁ ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = ↑↑e₁ (a₁ ⊗ₜ[R] b₁) * ↑↑e₁ (a₂ ⊗ₜ[R] b₂))\n              (_ : ∀ (r : S), ↑↑e₁ (↑(algebraMap S Aᵐᵒᵖ) r ⊗ₜ[R] 1) = ↑(algebraMap S (A ⊗[R] B)ᵐᵒᵖ) r)))\n          includeLeft)\n      x✝ =\n    ↑(AlgHom.comp (AlgHom.id S (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)) includeLeft) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hb.H\nR : Type u_1\nS : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁸ : CommSemiring R\ninst✝⁷ : CommSemiring S\ninst✝⁶ : Semiring A\ninst✝⁵ : Semiring B\ninst✝⁴ : Algebra R S\ninst✝³ : Algebra R A\ninst✝² : Algebra R B\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\ne₁ : Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ ≃ₗ[S] (A ⊗[R] B)ᵐᵒᵖ :=\n  LinearEquiv.trans\n    (TensorProduct.AlgebraTensorModule.congr (LinearEquiv.symm (opLinearEquiv S)) (LinearEquiv.symm (opLinearEquiv R)))\n    (opLinearEquiv S)\ne₂ : A ⊗[R] B ≃ₗ[S] (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)ᵐᵒᵖ :=\n  LinearEquiv.trans (TensorProduct.AlgebraTensorModule.congr (opLinearEquiv S) (opLinearEquiv R)) (opLinearEquiv S)\nx✝ : Bᵐᵒᵖ\n⊢ ↑(AlgHom.comp\n          (AlgHom.restrictScalars R\n            (AlgHom.comp\n              (↑AlgHom.opComm\n                (algHomOfLinearMapTensorProduct ↑e₂\n                  (_ :\n                    ∀ (a₁ a₂ : A) (b₁ b₂ : B),\n                      ↑↑e₂ ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = ↑↑e₂ (a₁ ⊗ₜ[R] b₁) * ↑↑e₂ (a₂ ⊗ₜ[R] b₂))\n                  (_ : ∀ (r : S), ↑↑e₂ (↑(algebraMap S A) r ⊗ₜ[R] 1) = ↑(algebraMap S (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)ᵐᵒᵖ) r)))\n              (algHomOfLinearMapTensorProduct ↑e₁\n                (_ :\n                  ∀ (a₁ a₂ : Aᵐᵒᵖ) (b₁ b₂ : Bᵐᵒᵖ),\n                    ↑↑e₁ ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = ↑↑e₁ (a₁ ⊗ₜ[R] b₁) * ↑↑e₁ (a₂ ⊗ₜ[R] b₂))\n                (_ : ∀ (r : S), ↑↑e₁ (↑(algebraMap S Aᵐᵒᵖ) r ⊗ₜ[R] 1) = ↑(algebraMap S (A ⊗[R] B)ᵐᵒᵖ) r))))\n          includeRight)\n      x✝ =\n    ↑(AlgHom.comp (AlgHom.restrictScalars R (AlgHom.id S (Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ))) includeRight) x✝\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.TensorProduct.Opposite", "llama_tokens": 5017, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7718434978390747, "lm_q2_score": 0.4687906266262437, "lm_q1q2_score": 0.3618329970093716}}
{"text": "[GOAL]\nC : Type v\ninst✝ : SmallCategory C\nX : Cᵒᵖ\n⊢ (X_1 : C) → (coyoneda.obj X).obj X_1 ⟶ ((Functor.const C).obj PUnit).obj X_1\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type v\ninst✝ : SmallCategory C\nX : Cᵒᵖ\ns : Cocone (coyoneda.obj X)\nY : C\n⊢ NatTrans.app (colimitCocone X).ι Y ≫ (fun s x => NatTrans.app s.ι X.unop (𝟙 X.unop)) s = NatTrans.app s.ι Y\n[PROOFSTEP]\nfunext f\n[GOAL]\ncase h\nC : Type v\ninst✝ : SmallCategory C\nX : Cᵒᵖ\ns : Cocone (coyoneda.obj X)\nY : C\nf : (coyoneda.obj X).obj Y\n⊢ (NatTrans.app (colimitCocone X).ι Y ≫ (fun s x => NatTrans.app s.ι X.unop (𝟙 X.unop)) s) f = NatTrans.app s.ι Y f\n[PROOFSTEP]\nconvert congr_fun (s.w f).symm (𝟙 (unop X))\n[GOAL]\ncase h.e'_3.h\nC : Type v\ninst✝ : SmallCategory C\nX : Cᵒᵖ\ns : Cocone (coyoneda.obj X)\nY : C\nf : (coyoneda.obj X).obj Y\ne_1✝ : s.pt = ((Functor.const C).obj s.pt).obj X.unop\n⊢ NatTrans.app s.ι Y f = ((coyoneda.obj X).map f ≫ NatTrans.app s.ι Y) (𝟙 X.unop)\n[PROOFSTEP]\nsimp only [coyoneda_obj_obj, Functor.const_obj_obj, types_comp_apply, coyoneda_obj_map, Category.id_comp]\n[GOAL]\nC : Type v\ninst✝ : SmallCategory C\nX : Cᵒᵖ\ns : Cocone (coyoneda.obj X)\nm : (colimitCocone X).pt ⟶ s.pt\nw : ∀ (j : C), NatTrans.app (colimitCocone X).ι j ≫ m = NatTrans.app s.ι j\n⊢ m = (fun s x => NatTrans.app s.ι X.unop (𝟙 X.unop)) s\n[PROOFSTEP]\napply funext\n[GOAL]\ncase h\nC : Type v\ninst✝ : SmallCategory C\nX : Cᵒᵖ\ns : Cocone (coyoneda.obj X)\nm : (colimitCocone X).pt ⟶ s.pt\nw : ∀ (j : C), NatTrans.app (colimitCocone X).ι j ≫ m = NatTrans.app s.ι j\n⊢ ∀ (x : (colimitCocone X).pt), m x = (fun s x => NatTrans.app s.ι X.unop (𝟙 X.unop)) s x\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase h.unit\nC : Type v\ninst✝ : SmallCategory C\nX : Cᵒᵖ\ns : Cocone (coyoneda.obj X)\nm : (colimitCocone X).pt ⟶ s.pt\nw : ∀ (j : C), NatTrans.app (colimitCocone X).ι j ≫ m = NatTrans.app s.ι j\n⊢ m PUnit.unit = (fun s x => NatTrans.app s.ι X.unop (𝟙 X.unop)) s PUnit.unit\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.unit\nC : Type v\ninst✝ : SmallCategory C\nX : Cᵒᵖ\ns : Cocone (coyoneda.obj X)\nm : (colimitCocone X).pt ⟶ s.pt\nw : ∀ (j : C), NatTrans.app (colimitCocone X).ι j ≫ m = NatTrans.app s.ι j\n⊢ m PUnit.unit = NatTrans.app s.ι X.unop (𝟙 X.unop)\n[PROOFSTEP]\nrw [← w]\n[GOAL]\ncase h.unit\nC : Type v\ninst✝ : SmallCategory C\nX : Cᵒᵖ\ns : Cocone (coyoneda.obj X)\nm : (colimitCocone X).pt ⟶ s.pt\nw : ∀ (j : C), NatTrans.app (colimitCocone X).ι j ≫ m = NatTrans.app s.ι j\n⊢ m PUnit.unit = (NatTrans.app (colimitCocone X).ι X.unop ≫ m) (𝟙 X.unop)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type v\ninst✝ : SmallCategory C\nX : Cᵒᵖ\n⊢ colimit (coyoneda.obj X) ≅ PUnit\n[PROOFSTEP]\napply\n  colimit.isoColimitCocone\n    { cocone := _\n      isColimit := colimitCoconeIsColimit X }\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : C\nJ : Type v\n𝒥 : Category.{v, v} J\nK : J ⥤ Cᵒᵖ\nc : Cone K\nt : IsLimit c\ns : Cone (K ⋙ yoneda.obj X)\nm : s.pt ⟶ ((yoneda.obj X).mapCone c).pt\nw : ∀ (j : J), m ≫ NatTrans.app ((yoneda.obj X).mapCone c).π j = NatTrans.app s.π j\nx : s.pt\n⊢ m x = (fun s x => (IsLimit.lift t { pt := op X, π := NatTrans.mk fun j => (NatTrans.app s.π j x).op }).unop) s x\n[PROOFSTEP]\nrefine' Quiver.Hom.op_inj (t.uniq ⟨op X, _, _⟩ _ fun j => _)\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ ∀ (X : C) {J : Type v} (𝒥 : Category.{v, v} J) {K : J ⥤ Cᵒᵖ} {c : Cone K},\n    IsLimit c →\n      ∀ (s : Cone (K ⋙ yoneda.obj X)) (x : s.pt) (j₁ j₂ : J) (α : j₁ ⟶ j₂),\n        ((Functor.const J).obj (op X)).map α ≫ (fun j => (NatTrans.app s.π j x).op) j₂ =\n          (fun j => (NatTrans.app s.π j x).op) j₁ ≫ K.map α\n[PROOFSTEP]\nintro X _ _ _ _ _ s _ _ _ α\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝ : Category.{v, u} C\nX : C\nJ✝ : Type v\n𝒥✝ : Category.{v, v} J✝\nK✝ : J✝ ⥤ Cᵒᵖ\nc✝ : Cone K✝\nt✝ : IsLimit c✝\ns : Cone (K✝ ⋙ yoneda.obj X)\nx✝ : s.pt\nj₁✝ j₂✝ : J✝\nα : j₁✝ ⟶ j₂✝\n⊢ ((Functor.const J✝).obj (op X)).map α ≫ (fun j => (NatTrans.app s.π j x✝).op) j₂✝ =\n    (fun j => (NatTrans.app s.π j x✝).op) j₁✝ ≫ K✝.map α\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝ : Category.{v, u} C\nX : C\nJ✝ : Type v\n𝒥✝ : Category.{v, v} J✝\nK✝ : J✝ ⥤ Cᵒᵖ\nc✝ : Cone K✝\nt✝ : IsLimit c✝\ns : Cone (K✝ ⋙ yoneda.obj X)\nx✝ : s.pt\nj₁✝ j₂✝ : J✝\nα : j₁✝ ⟶ j₂✝\n⊢ 𝟙 (op X) ≫ (NatTrans.app s.π j₂✝ x✝).op = (NatTrans.app s.π j₁✝ x✝).op ≫ K✝.map α\n[PROOFSTEP]\nsimp [← s.w α]\n  -- See library note [dsimp, simp]\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝ : Category.{v, u} C\nX : C\nJ : Type v\n𝒥 : Category.{v, v} J\nK : J ⥤ Cᵒᵖ\nc : Cone K\nt : IsLimit c\ns : Cone (K ⋙ yoneda.obj X)\nm : s.pt ⟶ ((yoneda.obj X).mapCone c).pt\nw : ∀ (j : J), m ≫ NatTrans.app ((yoneda.obj X).mapCone c).π j = NatTrans.app s.π j\nx : s.pt\nj : J\n⊢ (m x).op ≫ NatTrans.app c.π j = NatTrans.app { pt := op X, π := NatTrans.mk fun j => (NatTrans.app s.π j x).op }.π j\n[PROOFSTEP]\nexact Quiver.Hom.unop_inj (congrFun (w j) x)\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Cᵒᵖ\nJ : Type v\n𝒥 : Category.{v, v} J\nK : J ⥤ C\nc : Cone K\nt : IsLimit c\ns : Cone (K ⋙ coyoneda.obj X)\nx : s.pt\nj₁ j₂ : J\nα : j₁ ⟶ j₂\n⊢ ((Functor.const J).obj X.unop).map α ≫ (fun j => NatTrans.app s.π j x) j₂ =\n    (fun j => NatTrans.app s.π j x) j₁ ≫ K.map α\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Cᵒᵖ\nJ : Type v\n𝒥 : Category.{v, v} J\nK : J ⥤ C\nc : Cone K\nt : IsLimit c\ns : Cone (K ⋙ coyoneda.obj X)\nx : s.pt\nj₁ j₂ : J\nα : j₁ ⟶ j₂\n⊢ 𝟙 X.unop ≫ NatTrans.app s.π j₂ x = NatTrans.app s.π j₁ x ≫ K.map α\n[PROOFSTEP]\nsimp [← s.w α]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Cᵒᵖ\nJ : Type v\n𝒥 : Category.{v, v} J\nK : J ⥤ C\nc : Cone K\nt : IsLimit c\ns : Cone (K ⋙ coyoneda.obj X)\nm : s.pt ⟶ ((coyoneda.obj X).mapCone c).pt\nw : ∀ (j : J), m ≫ NatTrans.app ((coyoneda.obj X).mapCone c).π j = NatTrans.app s.π j\nx : s.pt\n⊢ m x = (fun s x => IsLimit.lift t { pt := X.unop, π := NatTrans.mk fun j => NatTrans.app s.π j x }) s x\n[PROOFSTEP]\nrefine' t.uniq ⟨unop X, _⟩ _ fun j => _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Cᵒᵖ\nJ : Type v\n𝒥 : Category.{v, v} J\nK : J ⥤ C\nc : Cone K\nt : IsLimit c\ns : Cone (K ⋙ coyoneda.obj X)\nm : s.pt ⟶ ((coyoneda.obj X).mapCone c).pt\nw : ∀ (j : J), m ≫ NatTrans.app ((coyoneda.obj X).mapCone c).π j = NatTrans.app s.π j\nx : s.pt\nj : J\n⊢ m x ≫ NatTrans.app c.π j = NatTrans.app { pt := X.unop, π := NatTrans.mk fun j => NatTrans.app s.π j x }.π j\n[PROOFSTEP]\nexact congrFun (w j) x\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ Cᵒᵖ\nc : Cone K\nt : (X : C) → IsLimit ((yoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ yoneda.obj s.pt.unop) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => (NatTrans.app s.π j).unop }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\n⊢ m = (fun s => (IsLimit.lift (t s.pt.unop) (s' s) PUnit.unit).op) s\n[PROOFSTEP]\napply Quiver.Hom.unop_inj\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ Cᵒᵖ\nc : Cone K\nt : (X : C) → IsLimit ((yoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ yoneda.obj s.pt.unop) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => (NatTrans.app s.π j).unop }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\n⊢ m.unop = ((fun s => (IsLimit.lift (t s.pt.unop) (s' s) PUnit.unit).op) s).unop\n[PROOFSTEP]\nsuffices (fun _ : PUnit => m.unop) = (t s.pt.unop).lift (s' s) by apply congr_fun this PUnit.unit\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ Cᵒᵖ\nc : Cone K\nt : (X : C) → IsLimit ((yoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ yoneda.obj s.pt.unop) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => (NatTrans.app s.π j).unop }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\nthis : (fun x => m.unop) = IsLimit.lift (t s.pt.unop) (s' s)\n⊢ m.unop = ((fun s => (IsLimit.lift (t s.pt.unop) (s' s) PUnit.unit).op) s).unop\n[PROOFSTEP]\napply congr_fun this PUnit.unit\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ Cᵒᵖ\nc : Cone K\nt : (X : C) → IsLimit ((yoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ yoneda.obj s.pt.unop) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => (NatTrans.app s.π j).unop }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\n⊢ (fun x => m.unop) = IsLimit.lift (t s.pt.unop) (s' s)\n[PROOFSTEP]\napply (t _).uniq (s' s) _ fun j => _\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ Cᵒᵖ\nc : Cone K\nt : (X : C) → IsLimit ((yoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ yoneda.obj s.pt.unop) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => (NatTrans.app s.π j).unop }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\n⊢ ∀ (j : J), (fun x => m.unop) ≫ NatTrans.app ((yoneda.obj s.pt.unop).mapCone c).π j = NatTrans.app (s' s).π j\n[PROOFSTEP]\nintro j\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ Cᵒᵖ\nc : Cone K\nt : (X : C) → IsLimit ((yoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ yoneda.obj s.pt.unop) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => (NatTrans.app s.π j).unop }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\nj : J\n⊢ (fun x => m.unop) ≫ NatTrans.app ((yoneda.obj s.pt.unop).mapCone c).π j = NatTrans.app (s' s).π j\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ Cᵒᵖ\nc : Cone K\nt : (X : C) → IsLimit ((yoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ yoneda.obj s.pt.unop) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => (NatTrans.app s.π j).unop }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\nj : J\nx✝ : (s' s).pt\n⊢ ((fun x => m.unop) ≫ NatTrans.app ((yoneda.obj s.pt.unop).mapCone c).π j) x✝ = NatTrans.app (s' s).π j x✝\n[PROOFSTEP]\nexact Quiver.Hom.op_inj (w j)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ C\nc : Cone K\nt : (X : Cᵒᵖ) → IsLimit ((coyoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ coyoneda.obj (op s.pt)) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => NatTrans.app s.π j }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\n⊢ m = (fun s => IsLimit.lift (t (op s.pt)) (s' s) PUnit.unit) s\n[PROOFSTEP]\nsuffices (fun _ : PUnit => m) = (t _).lift (s' s) by apply congr_fun this PUnit.unit\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ C\nc : Cone K\nt : (X : Cᵒᵖ) → IsLimit ((coyoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ coyoneda.obj (op s.pt)) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => NatTrans.app s.π j }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\nthis : (fun x => m) = IsLimit.lift (t (op s.pt)) (s' s)\n⊢ m = (fun s => IsLimit.lift (t (op s.pt)) (s' s) PUnit.unit) s\n[PROOFSTEP]\napply congr_fun this PUnit.unit\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ C\nc : Cone K\nt : (X : Cᵒᵖ) → IsLimit ((coyoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ coyoneda.obj (op s.pt)) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => NatTrans.app s.π j }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\n⊢ (fun x => m) = IsLimit.lift (t (op s.pt)) (s' s)\n[PROOFSTEP]\napply (t _).uniq (s' s) _ fun j => _\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ C\nc : Cone K\nt : (X : Cᵒᵖ) → IsLimit ((coyoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ coyoneda.obj (op s.pt)) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => NatTrans.app s.π j }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\n⊢ ∀ (j : J), (fun x => m) ≫ NatTrans.app ((coyoneda.obj (op s.pt)).mapCone c).π j = NatTrans.app (s' s).π j\n[PROOFSTEP]\nintro j\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ C\nc : Cone K\nt : (X : Cᵒᵖ) → IsLimit ((coyoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ coyoneda.obj (op s.pt)) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => NatTrans.app s.π j }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\nj : J\n⊢ (fun x => m) ≫ NatTrans.app ((coyoneda.obj (op s.pt)).mapCone c).π j = NatTrans.app (s' s).π j\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ C\nc : Cone K\nt : (X : Cᵒᵖ) → IsLimit ((coyoneda.obj X).mapCone c)\ns' : (s : Cone K) → Cone (K ⋙ coyoneda.obj (op s.pt)) :=\n  fun s => { pt := PUnit, π := NatTrans.mk fun j x => NatTrans.app s.π j }\ns : Cone K\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\nj : J\nx✝ : (s' s).pt\n⊢ ((fun x => m) ≫ NatTrans.app ((coyoneda.obj (op s.pt)).mapCone c).π j) x✝ = NatTrans.app (s' s).π j x✝\n[PROOFSTEP]\nexact w j\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u\ninst✝ : SmallCategory D\n⊢ PreservesLimits yoneda\n[PROOFSTEP]\napply preservesLimitsOfEvaluation\n[GOAL]\ncase x\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u\ninst✝ : SmallCategory D\n⊢ (k : Dᵒᵖ) → PreservesLimitsOfSize.{u, u, u, u, u, u + 1} (yoneda ⋙ (evaluation Dᵒᵖ (Type u)).obj k)\n[PROOFSTEP]\nintro K\n[GOAL]\ncase x\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u\ninst✝ : SmallCategory D\nK : Dᵒᵖ\n⊢ PreservesLimitsOfSize.{u, u, u, u, u, u + 1} (yoneda ⋙ (evaluation Dᵒᵖ (Type u)).obj K)\n[PROOFSTEP]\nchange PreservesLimits (coyoneda.obj K)\n[GOAL]\ncase x\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u\ninst✝ : SmallCategory D\nK : Dᵒᵖ\n⊢ PreservesLimits (coyoneda.obj K)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u\ninst✝ : SmallCategory D\n⊢ PreservesLimits coyoneda\n[PROOFSTEP]\napply preservesLimitsOfEvaluation\n[GOAL]\ncase x\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u\ninst✝ : SmallCategory D\n⊢ (k : D) → PreservesLimitsOfSize.{u, u, u, u, u, u + 1} (coyoneda ⋙ (evaluation D (Type u)).obj k)\n[PROOFSTEP]\nintro K\n[GOAL]\ncase x\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u\ninst✝ : SmallCategory D\nK : D\n⊢ PreservesLimitsOfSize.{u, u, u, u, u, u + 1} (coyoneda ⋙ (evaluation D (Type u)).obj K)\n[PROOFSTEP]\nchange PreservesLimits (yoneda.obj K)\n[GOAL]\ncase x\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u\ninst✝ : SmallCategory D\nK : D\n⊢ PreservesLimits (yoneda.obj K)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Yoneda", "llama_tokens": 7687, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583250334526, "lm_q2_score": 0.5195213219520929, "lm_q1q2_score": 0.3615651890449436}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁷ : TopologicalSpace Ω\ninst✝⁶ : MeasurableSpace Ω\ninst✝⁵ : PolishSpace Ω\ninst✝⁴ : BorelSpace Ω\ninst✝³ : Nonempty Ω\ninst✝² : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝¹ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\ninst✝ : MeasurableSpace β\n⊢ IsMarkovKernel (condDistrib Y X μ)\n[PROOFSTEP]\nrw [condDistrib]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁷ : TopologicalSpace Ω\ninst✝⁶ : MeasurableSpace Ω\ninst✝⁵ : PolishSpace Ω\ninst✝⁴ : BorelSpace Ω\ninst✝³ : Nonempty Ω\ninst✝² : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝¹ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\ninst✝ : MeasurableSpace β\n⊢ IsMarkovKernel (Measure.condKernel (Measure.map (fun a => (X a, Y a)) μ))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhY : AEMeasurable Y\nhf : AEStronglyMeasurable f (Measure.map (fun a => (X a, Y a)) μ)\n⊢ ((∀ᵐ (a : β) ∂Measure.map X μ, Integrable fun ω => f (a, ω)) ∧\n      Integrable fun a => ∫ (ω : Ω), ‖f (a, ω)‖ ∂↑(condDistrib Y X μ) a) ↔\n    Integrable f\n[PROOFSTEP]\nrw [condDistrib, ← hf.ae_integrable_condKernel_iff, Measure.fst_map_prod_mk₀ hY]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhY : AEMeasurable Y\nhf : AEStronglyMeasurable f (Measure.map (fun a => (X a, Y a)) μ)\n⊢ AEStronglyMeasurable (fun x => ∫ (y : Ω), f (x, y) ∂↑(condDistrib Y X μ) x) (Measure.map X μ)\n[PROOFSTEP]\nrw [← Measure.fst_map_prod_mk₀ hY, condDistrib]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhY : AEMeasurable Y\nhf : AEStronglyMeasurable f (Measure.map (fun a => (X a, Y a)) μ)\n⊢ AEStronglyMeasurable (fun x => ∫ (y : Ω), f (x, y) ∂↑(Measure.condKernel (Measure.map (fun a => (X a, Y a)) μ)) x)\n    (Measure.fst (Measure.map (fun a => (X a, Y a)) μ))\n[PROOFSTEP]\nexact hf.integral_condKernel\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : AEMeasurable X\nhs : MeasurableSet s\n⊢ Integrable fun a => ENNReal.toReal (↑↑(↑(condDistrib Y X μ) (X a)) s)\n[PROOFSTEP]\nrefine' integrable_toReal_of_lintegral_ne_top _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : AEMeasurable X\nhs : MeasurableSet s\n⊢ AEMeasurable fun a => ↑↑(↑(condDistrib Y X μ) (X a)) s\n[PROOFSTEP]\nexact Measurable.comp_aemeasurable (kernel.measurable_coe _ hs) hX\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : AEMeasurable X\nhs : MeasurableSet s\n⊢ ∫⁻ (x : α), ↑↑(↑(condDistrib Y X μ) (X x)) s ∂μ ≠ ⊤\n[PROOFSTEP]\nrefine' ne_of_lt _\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : AEMeasurable X\nhs : MeasurableSet s\n⊢ ∫⁻ (x : α), ↑↑(↑(condDistrib Y X μ) (X x)) s ∂μ < ⊤\n[PROOFSTEP]\ncalc\n  ∫⁻ a, condDistrib Y X μ (X a) s ∂μ ≤ ∫⁻ _, 1 ∂μ := lintegral_mono fun a => prob_le_one\n  _ = μ univ := lintegral_one\n  _ < ∞ := measure_lt_top _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhY : AEMeasurable Y\nhf_int : Integrable f\n⊢ ∀ᵐ (b : β) ∂Measure.map X μ, Integrable fun ω => f (b, ω)\n[PROOFSTEP]\nrw [condDistrib, ← Measure.fst_map_prod_mk₀ (X := X) hY]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhY : AEMeasurable Y\nhf_int : Integrable f\n⊢ ∀ᵐ (b : β) ∂Measure.fst (Measure.map (fun a => (X a, Y a)) μ), Integrable fun ω => f (b, ω)\n[PROOFSTEP]\nexact hf_int.condKernel_ae\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhY : AEMeasurable Y\nhf_int : Integrable f\n⊢ Integrable fun x => ∫ (y : Ω), ‖f (x, y)‖ ∂↑(condDistrib Y X μ) x\n[PROOFSTEP]\nrw [condDistrib, ← Measure.fst_map_prod_mk₀ (X := X) hY]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhY : AEMeasurable Y\nhf_int : Integrable f\n⊢ Integrable fun x => ∫ (y : Ω), ‖f (x, y)‖ ∂↑(Measure.condKernel (Measure.map (fun a => (X a, Y a)) μ)) x\n[PROOFSTEP]\nexact hf_int.integral_norm_condKernel\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhY : AEMeasurable Y\nhf_int : Integrable f\n⊢ Integrable fun x => ‖∫ (y : Ω), f (x, y) ∂↑(condDistrib Y X μ) x‖\n[PROOFSTEP]\nrw [condDistrib, ← Measure.fst_map_prod_mk₀ (X := X) hY]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhY : AEMeasurable Y\nhf_int : Integrable f\n⊢ Integrable fun x => ‖∫ (y : Ω), f (x, y) ∂↑(Measure.condKernel (Measure.map (fun a => (X a, Y a)) μ)) x‖\n[PROOFSTEP]\nexact hf_int.norm_integral_condKernel\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : AEMeasurable Y\nhs : MeasurableSet s\nht : MeasurableSet t\n⊢ ∫⁻ (a : α) in X ⁻¹' t, ↑↑(↑(condDistrib Y X μ) (X a)) s ∂μ = ↑↑μ (X ⁻¹' t ∩ Y ⁻¹' s)\n[PROOFSTEP]\nconv_lhs => arg 2; change (fun a => ((condDistrib Y X μ) a) s) ∘ X\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : AEMeasurable Y\nhs : MeasurableSet s\nht : MeasurableSet t\n| ∫⁻ (a : α) in X ⁻¹' t, ↑↑(↑(condDistrib Y X μ) (X a)) s ∂μ\n[PROOFSTEP]\narg 2; change (fun a => ((condDistrib Y X μ) a) s) ∘ X\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : AEMeasurable Y\nhs : MeasurableSet s\nht : MeasurableSet t\n| ∫⁻ (a : α) in X ⁻¹' t, ↑↑(↑(condDistrib Y X μ) (X a)) s ∂μ\n[PROOFSTEP]\narg 2; change (fun a => ((condDistrib Y X μ) a) s) ∘ X\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : AEMeasurable Y\nhs : MeasurableSet s\nht : MeasurableSet t\n| ∫⁻ (a : α) in X ⁻¹' t, ↑↑(↑(condDistrib Y X μ) (X a)) s ∂μ\n[PROOFSTEP]\narg 2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : AEMeasurable Y\nhs : MeasurableSet s\nht : MeasurableSet t\n| fun a => ↑↑(↑(condDistrib Y X μ) (X a)) s\n[PROOFSTEP]\nchange (fun a => ((condDistrib Y X μ) a) s) ∘ X\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : AEMeasurable Y\nhs : MeasurableSet s\nht : MeasurableSet t\n⊢ lintegral (Measure.restrict μ (X ⁻¹' t)) ((fun a => ↑↑(↑(condDistrib Y X μ) a) s) ∘ X) = ↑↑μ (X ⁻¹' t ∩ Y ⁻¹' s)\n[PROOFSTEP]\nrw [lintegral_comp (kernel.measurable_coe _ hs) hX, condDistrib, ← Measure.restrict_map hX ht, ←\n  Measure.fst_map_prod_mk₀ hY, set_lintegral_condKernel_eq_measure_prod _ ht hs,\n  Measure.map_apply_of_aemeasurable (hX.aemeasurable.prod_mk hY) (ht.prod hs), mk_preimage_prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt✝ : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : AEMeasurable Y\nhs : MeasurableSet s\nt : Set α\nht : MeasurableSet t\n⊢ ∫⁻ (a : α) in t, ↑↑(↑(condDistrib Y X μ) (X a)) s ∂μ = ↑↑μ (t ∩ Y ⁻¹' s)\n[PROOFSTEP]\nobtain ⟨t', ht', rfl⟩ := ht\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : AEMeasurable Y\nhs : MeasurableSet s\nt' : Set β\nht' : MeasurableSet t'\n⊢ ∫⁻ (a : α) in X ⁻¹' t', ↑↑(↑(condDistrib Y X μ) (X a)) s ∂μ = ↑↑μ (X ⁻¹' t' ∩ Y ⁻¹' s)\n[PROOFSTEP]\nrw [set_lintegral_preimage_condDistrib hX hY hs ht']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : Measurable Y\nhs : MeasurableSet s\n⊢ (fun a => ENNReal.toReal (↑↑(↑(condDistrib Y X μ) (X a)) s)) =ᵐ[μ]\n    μ[indicator (Y ⁻¹' s) fun ω => 1|MeasurableSpace.comap X mβ]\n[PROOFSTEP]\nrefine' ae_eq_condexp_of_forall_set_integral_eq hX.comap_le _ _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : Measurable Y\nhs : MeasurableSet s\n⊢ Integrable (indicator (Y ⁻¹' s) fun ω => 1)\n[PROOFSTEP]\nexact (integrable_const _).indicator (hY hs)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : Measurable Y\nhs : MeasurableSet s\n⊢ ∀ (s_1 : Set α),\n    MeasurableSet s_1 → ↑↑μ s_1 < ⊤ → IntegrableOn (fun a => ENNReal.toReal (↑↑(↑(condDistrib Y X μ) (X a)) s)) s_1\n[PROOFSTEP]\nexact fun t _ _ => (integrable_toReal_condDistrib hX.aemeasurable hs).integrableOn\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : Measurable Y\nhs : MeasurableSet s\n⊢ ∀ (s_1 : Set α),\n    MeasurableSet s_1 →\n      ↑↑μ s_1 < ⊤ →\n        ∫ (x : α) in s_1, ENNReal.toReal (↑↑(↑(condDistrib Y X μ) (X x)) s) ∂μ =\n          ∫ (x : α) in s_1, indicator (Y ⁻¹' s) (fun ω => 1) x ∂μ\n[PROOFSTEP]\nintro t ht _\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt✝ : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : Measurable Y\nhs : MeasurableSet s\nt : Set α\nht : MeasurableSet t\na✝ : ↑↑μ t < ⊤\n⊢ ∫ (x : α) in t, ENNReal.toReal (↑↑(↑(condDistrib Y X μ) (X x)) s) ∂μ =\n    ∫ (x : α) in t, indicator (Y ⁻¹' s) (fun ω => 1) x ∂μ\n[PROOFSTEP]\nrw [integral_toReal ((measurable_condDistrib hs).mono hX.comap_le le_rfl).aemeasurable\n    (eventually_of_forall fun ω => measure_lt_top (condDistrib Y X μ (X ω)) _),\n  integral_indicator_const _ (hY hs), Measure.restrict_apply (hY hs), smul_eq_mul, mul_one, inter_comm,\n  set_lintegral_condDistrib_of_measurableSet hX hY.aemeasurable hs ht]\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : Measurable Y\nhs : MeasurableSet s\n⊢ AEStronglyMeasurable' (MeasurableSpace.comap X mβ) (fun a => ENNReal.toReal (↑↑(↑(condDistrib Y X μ) (X a)) s)) μ\n[PROOFSTEP]\nrefine' (Measurable.stronglyMeasurable _).aeStronglyMeasurable'\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω\ninst✝⁵ : MeasurableSpace Ω\ninst✝⁴ : PolishSpace Ω\ninst✝³ : BorelSpace Ω\ninst✝² : Nonempty Ω\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\nhX : Measurable X\nhY : Measurable Y\nhs : MeasurableSet s\n⊢ Measurable fun a => ENNReal.toReal (↑↑(↑(condDistrib Y X μ) (X a)) s)\n[PROOFSTEP]\nexact @Measurable.ennreal_toReal _ (mβ.comap X) _ (measurable_condDistrib hs)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\n⊢ μ[fun a => f (X a, Y a)|MeasurableSpace.comap X mβ] =ᵐ[μ] fun a => ∫ (y : Ω), f (X a, y) ∂↑(condDistrib Y X μ) (X a)\n[PROOFSTEP]\nhave hf_int' : Integrable (fun a => f (X a, Y a)) μ :=\n  (integrable_map_measure hf_int.1 (hX.aemeasurable.prod_mk hY)).mp hf_int\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\nhf_int' : Integrable fun a => f (X a, Y a)\n⊢ μ[fun a => f (X a, Y a)|MeasurableSpace.comap X mβ] =ᵐ[μ] fun a => ∫ (y : Ω), f (X a, y) ∂↑(condDistrib Y X μ) (X a)\n[PROOFSTEP]\nrefine' (ae_eq_condexp_of_forall_set_integral_eq hX.comap_le hf_int' (fun s _ _ => _) _ _).symm\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns✝ : Set Ω\nt : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\nhf_int' : Integrable fun a => f (X a, Y a)\ns : Set α\nx✝¹ : MeasurableSet s\nx✝ : ↑↑μ s < ⊤\n⊢ IntegrableOn (fun a => ∫ (y : Ω), f (X a, y) ∂↑(condDistrib Y X μ) (X a)) s\n[PROOFSTEP]\nexact (hf_int.integral_condDistrib hX.aemeasurable hY).integrableOn\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\nhf_int' : Integrable fun a => f (X a, Y a)\n⊢ ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s < ⊤ → ∫ (x : α) in s, ∫ (y : Ω), f (X x, y) ∂↑(condDistrib Y X μ) (X x) ∂μ = ∫ (x : α) in s, f (X x, Y x) ∂μ\n[PROOFSTEP]\nrintro s ⟨t, ht, rfl⟩ _\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt✝ : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\nhf_int' : Integrable fun a => f (X a, Y a)\nt : Set β\nht : MeasurableSet t\na✝ : ↑↑μ (X ⁻¹' t) < ⊤\n⊢ ∫ (x : α) in X ⁻¹' t, ∫ (y : Ω), f (X x, y) ∂↑(condDistrib Y X μ) (X x) ∂μ = ∫ (x : α) in X ⁻¹' t, f (X x, Y x) ∂μ\n[PROOFSTEP]\nchange ∫ a in X ⁻¹' t, ((fun x' => ∫ y, f (x', y) ∂(condDistrib Y X μ) x') ∘ X) a ∂μ = ∫ a in X ⁻¹' t, f (X a, Y a) ∂μ\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt✝ : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\nhf_int' : Integrable fun a => f (X a, Y a)\nt : Set β\nht : MeasurableSet t\na✝ : ↑↑μ (X ⁻¹' t) < ⊤\n⊢ ∫ (a : α) in X ⁻¹' t, ((fun x' => ∫ (y : Ω), f (x', y) ∂↑(condDistrib Y X μ) x') ∘ X) a ∂μ =\n    ∫ (a : α) in X ⁻¹' t, f (X a, Y a) ∂μ\n[PROOFSTEP]\nsimp only [Function.comp_apply]\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt✝ : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\nhf_int' : Integrable fun a => f (X a, Y a)\nt : Set β\nht : MeasurableSet t\na✝ : ↑↑μ (X ⁻¹' t) < ⊤\n⊢ ∫ (a : α) in X ⁻¹' t, ∫ (y : Ω), f (X a, y) ∂↑(condDistrib Y X μ) (X a) ∂μ = ∫ (a : α) in X ⁻¹' t, f (X a, Y a) ∂μ\n[PROOFSTEP]\nrw [← integral_map hX.aemeasurable (f := fun x' => ∫ y, f (x', y) ∂(condDistrib Y X μ) x')]\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt✝ : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\nhf_int' : Integrable fun a => f (X a, Y a)\nt : Set β\nht : MeasurableSet t\na✝ : ↑↑μ (X ⁻¹' t) < ⊤\n⊢ ∫ (y : β), ∫ (y_1 : Ω), f (y, y_1) ∂↑(condDistrib Y X μ) y ∂Measure.map X (Measure.restrict μ (X ⁻¹' t)) =\n    ∫ (a : α) in X ⁻¹' t, f (X a, Y a) ∂μ\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt✝ : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\nhf_int' : Integrable fun a => f (X a, Y a)\nt : Set β\nht : MeasurableSet t\na✝ : ↑↑μ (X ⁻¹' t) < ⊤\n⊢ AEStronglyMeasurable (fun x' => ∫ (y : Ω), f (x', y) ∂↑(condDistrib Y X μ) x')\n    (Measure.map X (Measure.restrict μ (X ⁻¹' t)))\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt✝ : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\nhf_int' : Integrable fun a => f (X a, Y a)\nt : Set β\nht : MeasurableSet t\na✝ : ↑↑μ (X ⁻¹' t) < ⊤\n⊢ AEStronglyMeasurable (fun x' => ∫ (y : Ω), f (x', y) ∂↑(condDistrib Y X μ) x')\n    (Measure.map X (Measure.restrict μ (X ⁻¹' t)))\n[PROOFSTEP]\nrw [← Measure.restrict_map hX ht]\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt✝ : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\nhf_int' : Integrable fun a => f (X a, Y a)\nt : Set β\nht : MeasurableSet t\na✝ : ↑↑μ (X ⁻¹' t) < ⊤\n⊢ AEStronglyMeasurable (fun x' => ∫ (y : Ω), f (x', y) ∂↑(condDistrib Y X μ) x') (Measure.restrict (Measure.map X μ) t)\n[PROOFSTEP]\nexact (hf_int.1.integral_condDistrib_map hY).restrict\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt✝ : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\nhf_int' : Integrable fun a => f (X a, Y a)\nt : Set β\nht : MeasurableSet t\na✝ : ↑↑μ (X ⁻¹' t) < ⊤\n⊢ ∫ (y : β), ∫ (y_1 : Ω), f (y, y_1) ∂↑(condDistrib Y X μ) y ∂Measure.map X (Measure.restrict μ (X ⁻¹' t)) =\n    ∫ (a : α) in X ⁻¹' t, f (X a, Y a) ∂μ\n[PROOFSTEP]\nrw [← Measure.restrict_map hX ht, ← Measure.fst_map_prod_mk₀ hY, condDistrib,\n  set_integral_condKernel_univ_right ht hf_int.integrableOn,\n  set_integral_map (ht.prod MeasurableSet.univ) hf_int.1 (hX.aemeasurable.prod_mk hY), mk_preimage_prod, preimage_univ,\n  inter_univ]\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf_int : Integrable f\nhf_int' : Integrable fun a => f (X a, Y a)\n⊢ AEStronglyMeasurable' (MeasurableSpace.comap X mβ) (fun a => ∫ (y : Ω), f (X a, y) ∂↑(condDistrib Y X μ) (X a)) μ\n[PROOFSTEP]\nexact aestronglyMeasurable'_integral_condDistrib hX.aemeasurable hY hf_int.1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf : AEStronglyMeasurable f (Measure.map (fun a => (X a, Y a)) μ)\nhf_int : Integrable fun a => f (X a, Y a)\n⊢ Integrable f\n[PROOFSTEP]\nrwa [integrable_map_measure hf (hX.aemeasurable.prod_mk hY)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ : Type u_3\nF : Type u_4\ninst✝⁸ : TopologicalSpace Ω\ninst✝⁷ : MeasurableSpace Ω\ninst✝⁶ : PolishSpace Ω\ninst✝⁵ : BorelSpace Ω\ninst✝⁴ : Nonempty Ω\ninst✝³ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ : Measure α\ninst✝² : IsFiniteMeasure μ\nX : α → β\nY : α → Ω\nmβ : MeasurableSpace β\ns : Set Ω\nt : Set β\nf : β × Ω → F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nhX : Measurable X\nhY : AEMeasurable Y\nhf : StronglyMeasurable f\nhf_int : Integrable fun a => f (X a, Y a)\n⊢ Integrable f\n[PROOFSTEP]\nrwa [integrable_map_measure hf.aestronglyMeasurable (hX.aemeasurable.prod_mk hY)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\n⊢ AEStronglyMeasurable (fun x => f x.snd) (Measure.map (fun ω => (X ω, ω)) μ)\n[PROOFSTEP]\nrefine' ⟨fun x => hf.mk f x.2, hf.stronglyMeasurable_mk.comp_measurable measurable_snd, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\n⊢ (fun x => f x.snd) =ᵐ[Measure.map (fun ω => (X ω, ω)) μ] fun x => AEStronglyMeasurable.mk f hf x.snd\n[PROOFSTEP]\nsuffices h : Measure.QuasiMeasurePreserving Prod.snd (μ.map fun ω => (X ω, ω)) μ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\nh : Measure.QuasiMeasurePreserving Prod.snd\n⊢ (fun x => f x.snd) =ᵐ[Measure.map (fun ω => (X ω, ω)) μ] fun x => AEStronglyMeasurable.mk f hf x.snd\n[PROOFSTEP]\nexact Measure.QuasiMeasurePreserving.ae_eq h hf.ae_eq_mk\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\n⊢ Measure.QuasiMeasurePreserving Prod.snd\n[PROOFSTEP]\nrefine' ⟨measurable_snd, Measure.AbsolutelyContinuous.mk fun s hs hμs => _⟩\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\n⊢ ↑↑(Measure.map Prod.snd (Measure.map (fun ω => (X ω, ω)) μ)) s = 0\n[PROOFSTEP]\nrw [Measure.map_apply _ hs]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\n⊢ ↑↑(Measure.map (fun ω => (X ω, ω)) μ) (Prod.snd ⁻¹' s) = 0\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\n⊢ Measurable Prod.snd\n[PROOFSTEP]\nswap\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\n⊢ Measurable Prod.snd\n[PROOFSTEP]\nexact measurable_snd\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\n⊢ ↑↑(Measure.map (fun ω => (X ω, ω)) μ) (Prod.snd ⁻¹' s) = 0\n[PROOFSTEP]\nby_cases hX : AEMeasurable X μ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\nhX : AEMeasurable X\n⊢ ↑↑(Measure.map (fun ω => (X ω, ω)) μ) (Prod.snd ⁻¹' s) = 0\n[PROOFSTEP]\nrw [Measure.map_apply_of_aemeasurable]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\nhX : AEMeasurable X\n⊢ ↑↑μ ((fun ω => (X ω, ω)) ⁻¹' (Prod.snd ⁻¹' s)) = 0\n[PROOFSTEP]\nrw [← univ_prod, mk_preimage_prod, preimage_univ, univ_inter, preimage_id']\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\nhX : AEMeasurable X\n⊢ ↑↑μ s = 0\n[PROOFSTEP]\nexact hμs\n[GOAL]\ncase pos.hf\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\nhX : AEMeasurable X\n⊢ AEMeasurable fun ω => (X ω, ω)\n[PROOFSTEP]\nexact hX.prod_mk aemeasurable_id\n[GOAL]\ncase pos.hs\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\nhX : AEMeasurable X\n⊢ MeasurableSet (Prod.snd ⁻¹' s)\n[PROOFSTEP]\nexact measurable_snd hs\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\nhX : ¬AEMeasurable X\n⊢ ↑↑(Measure.map (fun ω => (X ω, ω)) μ) (Prod.snd ⁻¹' s) = 0\n[PROOFSTEP]\nrw [Measure.map_of_not_aemeasurable]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\nhX : ¬AEMeasurable X\n⊢ ↑↑0 (Prod.snd ⁻¹' s) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\nhX : ¬AEMeasurable X\n⊢ ¬AEMeasurable fun ω => (X ω, ω)\n[PROOFSTEP]\ncontrapose! hX\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF✝ : Type u_4\ninst✝⁷ : TopologicalSpace Ω✝\ninst✝⁶ : MeasurableSpace Ω✝\ninst✝⁵ : PolishSpace Ω✝\ninst✝⁴ : BorelSpace Ω✝\ninst✝³ : Nonempty Ω✝\ninst✝² : NormedAddCommGroup F✝\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns✝ : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F✝\nΩ : Type u_5\nF : Type u_6\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\ninst✝ : TopologicalSpace F\nf : Ω → F\nhf : AEStronglyMeasurable f μ\ns : Set Ω\nhs : MeasurableSet s\nhμs : ↑↑μ s = 0\nhX : AEMeasurable fun ω => (X ω, ω)\n⊢ AEMeasurable X\n[PROOFSTEP]\nexact measurable_fst.comp_aemeasurable hX\n[GOAL]\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω✝\ninst✝⁵ : MeasurableSpace Ω✝\ninst✝⁴ : PolishSpace Ω✝\ninst✝³ : BorelSpace Ω✝\ninst✝² : Nonempty Ω✝\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F\nΩ : Type u_5\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\nf : Ω → F\nhf_int : Integrable f\n⊢ Integrable fun x => f x.snd\n[PROOFSTEP]\nby_cases hX : AEMeasurable X μ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω✝\ninst✝⁵ : MeasurableSpace Ω✝\ninst✝⁴ : PolishSpace Ω✝\ninst✝³ : BorelSpace Ω✝\ninst✝² : Nonempty Ω✝\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F\nΩ : Type u_5\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\nf : Ω → F\nhf_int : Integrable f\nhX : AEMeasurable X\n⊢ Integrable fun x => f x.snd\n[PROOFSTEP]\nhave hf := hf_int.1.comp_snd_map_prod_mk X (mΩ := mΩ) (mβ := mβ)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω✝\ninst✝⁵ : MeasurableSpace Ω✝\ninst✝⁴ : PolishSpace Ω✝\ninst✝³ : BorelSpace Ω✝\ninst✝² : Nonempty Ω✝\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F\nΩ : Type u_5\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\nf : Ω → F\nhf_int : Integrable f\nhX : AEMeasurable X\nhf : AEStronglyMeasurable (fun x => f x.snd) (Measure.map (fun ω => (X ω, ω)) μ)\n⊢ Integrable fun x => f x.snd\n[PROOFSTEP]\nrefine' ⟨hf, _⟩\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω✝\ninst✝⁵ : MeasurableSpace Ω✝\ninst✝⁴ : PolishSpace Ω✝\ninst✝³ : BorelSpace Ω✝\ninst✝² : Nonempty Ω✝\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F\nΩ : Type u_5\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\nf : Ω → F\nhf_int : Integrable f\nhX : AEMeasurable X\nhf : AEStronglyMeasurable (fun x => f x.snd) (Measure.map (fun ω => (X ω, ω)) μ)\n⊢ HasFiniteIntegral fun x => f x.snd\n[PROOFSTEP]\nrw [HasFiniteIntegral, lintegral_map' hf.ennnorm (hX.prod_mk aemeasurable_id)]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω✝\ninst✝⁵ : MeasurableSpace Ω✝\ninst✝⁴ : PolishSpace Ω✝\ninst✝³ : BorelSpace Ω✝\ninst✝² : Nonempty Ω✝\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F\nΩ : Type u_5\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\nf : Ω → F\nhf_int : Integrable f\nhX : AEMeasurable X\nhf : AEStronglyMeasurable (fun x => f x.snd) (Measure.map (fun ω => (X ω, ω)) μ)\n⊢ ∫⁻ (a : Ω), ↑‖f (X a, a).snd‖₊ ∂μ < ⊤\n[PROOFSTEP]\nexact hf_int.2\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω✝\ninst✝⁵ : MeasurableSpace Ω✝\ninst✝⁴ : PolishSpace Ω✝\ninst✝³ : BorelSpace Ω✝\ninst✝² : Nonempty Ω✝\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F\nΩ : Type u_5\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\nf : Ω → F\nhf_int : Integrable f\nhX : ¬AEMeasurable X\n⊢ Integrable fun x => f x.snd\n[PROOFSTEP]\nrw [Measure.map_of_not_aemeasurable]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω✝\ninst✝⁵ : MeasurableSpace Ω✝\ninst✝⁴ : PolishSpace Ω✝\ninst✝³ : BorelSpace Ω✝\ninst✝² : Nonempty Ω✝\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F\nΩ : Type u_5\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\nf : Ω → F\nhf_int : Integrable f\nhX : ¬AEMeasurable X\n⊢ Integrable fun x => f x.snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω✝\ninst✝⁵ : MeasurableSpace Ω✝\ninst✝⁴ : PolishSpace Ω✝\ninst✝³ : BorelSpace Ω✝\ninst✝² : Nonempty Ω✝\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F\nΩ : Type u_5\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\nf : Ω → F\nhf_int : Integrable f\nhX : ¬AEMeasurable X\n⊢ ¬AEMeasurable fun ω => (X ω, ω)\n[PROOFSTEP]\ncontrapose! hX\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nF : Type u_4\ninst✝⁶ : TopologicalSpace Ω✝\ninst✝⁵ : MeasurableSpace Ω✝\ninst✝⁴ : PolishSpace Ω✝\ninst✝³ : BorelSpace Ω✝\ninst✝² : Nonempty Ω✝\ninst✝¹ : NormedAddCommGroup F\nmα : MeasurableSpace α\nμ✝ : Measure α\ninst✝ : IsFiniteMeasure μ✝\nX✝ : α → β\nY : α → Ω✝\nmβ : MeasurableSpace β\ns : Set Ω✝\nt : Set β\nf✝ : β × Ω✝ → F\nΩ : Type u_5\nmΩ : MeasurableSpace Ω\nX : Ω → β\nμ : Measure Ω\nf : Ω → F\nhf_int : Integrable f\nhX : AEMeasurable fun ω => (X ω, ω)\n⊢ AEMeasurable X\n[PROOFSTEP]\nexact measurable_fst.comp_aemeasurable hX\n", "meta": {"mathlib_filename": "Mathlib.Probability.Kernel.CondDistrib", "llama_tokens": 24704, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7401743620390163, "lm_q2_score": 0.48828339529583464, "lm_q1q2_score": 0.36141485060733924}}
{"text": "[GOAL]\nT : Type u\ninst✝ : Category.{v, u} T\nf : Arrow T\n⊢ mk f.hom = f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nT : Type u\ninst✝ : Category.{v, u} T\nleft✝ right✝ : T\nhom✝ : (𝟭 T).obj left✝ ⟶ (𝟭 T).obj right✝\n⊢ mk { left := left✝, right := right✝, hom := hom✝ }.hom = { left := left✝, right := right✝, hom := hom✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nT : Type u\ninst✝ : Category.{v, u} T\nA B : T\nf g : A ⟶ B\nh : mk f = mk g\n⊢ f = g\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nT : Type u\ninst✝ : Category.{v, u} T\nA B : T\nf : A ⟶ B\n⊢ f = f\n[PROOFSTEP]\nrfl\n[GOAL]\nT : Type u\ninst✝² : Category.{v, u} T\nf g : Arrow T\nff : f ⟶ g\ninst✝¹ : IsIso ff.left\ninst✝ : IsIso ff.right\n⊢ ∃ inv, ff ≫ inv = 𝟙 f ∧ inv ≫ ff = 𝟙 g\n[PROOFSTEP]\nlet inverse : g ⟶ f := ⟨inv ff.left, inv ff.right, (by simp)⟩\n[GOAL]\nT : Type u\ninst✝² : Category.{v, u} T\nf g : Arrow T\nff : f ⟶ g\ninst✝¹ : IsIso ff.left\ninst✝ : IsIso ff.right\n⊢ (𝟭 T).map (inv ff.left) ≫ f.hom = g.hom ≫ (𝟭 T).map (inv ff.right)\n[PROOFSTEP]\nsimp\n[GOAL]\nT : Type u\ninst✝² : Category.{v, u} T\nf g : Arrow T\nff : f ⟶ g\ninst✝¹ : IsIso ff.left\ninst✝ : IsIso ff.right\ninverse : g ⟶ f := CommaMorphism.mk (inv ff.left) (inv ff.right)\n⊢ ∃ inv, ff ≫ inv = 𝟙 f ∧ inv ≫ ff = 𝟙 g\n[PROOFSTEP]\napply Exists.intro inverse\n[GOAL]\nT : Type u\ninst✝² : Category.{v, u} T\nf g : Arrow T\nff : f ⟶ g\ninst✝¹ : IsIso ff.left\ninst✝ : IsIso ff.right\ninverse : g ⟶ f := CommaMorphism.mk (inv ff.left) (inv ff.right)\n⊢ ff ≫ inverse = 𝟙 f ∧ inverse ≫ ff = 𝟙 g\n[PROOFSTEP]\naesop_cat\n[GOAL]\nT : Type u\ninst✝ : Category.{v, u} T\nf g : Arrow T\nφ₁ φ₂ : f ⟶ g\nh : φ₁ = φ₂\n⊢ φ₁.left = φ₂.left\n[PROOFSTEP]\nrw [h]\n[GOAL]\nT : Type u\ninst✝ : Category.{v, u} T\nf g : Arrow T\nφ₁ φ₂ : f ⟶ g\nh : φ₁ = φ₂\n⊢ φ₁.right = φ₂.right\n[PROOFSTEP]\nrw [h]\n[GOAL]\nT : Type u\ninst✝ : Category.{v, u} T\nf g : Arrow T\ne : f ≅ g\n⊢ g.hom = e.inv.left ≫ f.hom ≫ e.hom.right\n[PROOFSTEP]\nhave eq := Arrow.hom.congr_right e.inv_hom_id\n[GOAL]\nT : Type u\ninst✝ : Category.{v, u} T\nf g : Arrow T\ne : f ≅ g\neq : (e.inv ≫ e.hom).right = (𝟙 g).right\n⊢ g.hom = e.inv.left ≫ f.hom ≫ e.hom.right\n[PROOFSTEP]\nrw [Arrow.comp_right, Arrow.id_right] at eq \n[GOAL]\nT : Type u\ninst✝ : Category.{v, u} T\nf g : Arrow T\ne : f ≅ g\neq : e.inv.right ≫ e.hom.right = 𝟙 g.right\n⊢ g.hom = e.inv.left ≫ f.hom ≫ e.hom.right\n[PROOFSTEP]\nerw [Arrow.w_assoc, eq, Category.comp_id]\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : IsIso sq\n⊢ ∃ inv, sq.left ≫ inv = 𝟙 f.left ∧ inv ≫ sq.left = 𝟙 g.left\n[PROOFSTEP]\napply Exists.intro (inv sq).left\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : IsIso sq\n⊢ sq.left ≫ (inv sq).left = 𝟙 f.left ∧ (inv sq).left ≫ sq.left = 𝟙 g.left\n[PROOFSTEP]\nsimp only [← Comma.comp_left, IsIso.hom_inv_id, IsIso.inv_hom_id, Arrow.id_left, eq_self_iff_true, and_self_iff]\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : IsIso sq\n⊢ (𝟙 f).left = 𝟙 f.left ∧ (𝟙 g).left = 𝟙 g.left\n[PROOFSTEP]\nsimp\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : IsIso sq\n⊢ ∃ inv, sq.right ≫ inv = 𝟙 f.right ∧ inv ≫ sq.right = 𝟙 g.right\n[PROOFSTEP]\napply Exists.intro (inv sq).right\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : IsIso sq\n⊢ sq.right ≫ (inv sq).right = 𝟙 f.right ∧ (inv sq).right ≫ sq.right = 𝟙 g.right\n[PROOFSTEP]\nsimp only [← Comma.comp_right, IsIso.hom_inv_id, IsIso.inv_hom_id, Arrow.id_right, eq_self_iff_true, and_self_iff]\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : IsIso sq\n⊢ (𝟙 f).right = 𝟙 f.right ∧ (𝟙 g).right = 𝟙 g.right\n[PROOFSTEP]\nsimp\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : IsIso sq\n⊢ sq.left ≫ (inv sq).left = 𝟙 f.left\n[PROOFSTEP]\nrw [← Comma.comp_left, IsIso.hom_inv_id, id_left]\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : IsIso sq\n⊢ sq.right ≫ (inv sq).right = 𝟙 f.right\n[PROOFSTEP]\nrw [← Comma.comp_right, IsIso.hom_inv_id, id_right]\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : IsIso sq\n⊢ sq.left ≫ g.hom ≫ inv sq.right = f.hom\n[PROOFSTEP]\nsimp only [← Category.assoc, IsIso.comp_inv_eq, w]\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : IsIso sq\n⊢ inv sq.left ≫ f.hom ≫ sq.right = g.hom\n[PROOFSTEP]\nsimp only [w, IsIso.inv_comp_eq]\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Mono sq\nZ : T\nφ ψ : Z ⟶ f.left\nh : φ ≫ sq.left = ψ ≫ sq.left\n⊢ φ = ψ\n[PROOFSTEP]\nlet aux : (Z ⟶ f.left) → (Arrow.mk (𝟙 Z) ⟶ f) := fun φ =>\n  { left := φ\n    right := φ ≫ f.hom }\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Mono sq\nZ : T\nφ ψ : Z ⟶ f.left\nh : φ ≫ sq.left = ψ ≫ sq.left\naux : (Z ⟶ f.left) → (mk (𝟙 Z) ⟶ f) := fun φ => CommaMorphism.mk φ (φ ≫ f.hom)\n⊢ φ = ψ\n[PROOFSTEP]\nhave : ∀ g, (aux g).right = g ≫ f.hom := fun g => by dsimp\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g✝ : Arrow T\nsq : f ⟶ g✝\ninst✝ : Mono sq\nZ : T\nφ ψ : Z ⟶ f.left\nh : φ ≫ sq.left = ψ ≫ sq.left\naux : (Z ⟶ f.left) → (mk (𝟙 Z) ⟶ f) := fun φ => CommaMorphism.mk φ (φ ≫ f.hom)\ng : Z ⟶ f.left\n⊢ (aux g).right = g ≫ f.hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Mono sq\nZ : T\nφ ψ : Z ⟶ f.left\nh : φ ≫ sq.left = ψ ≫ sq.left\naux : (Z ⟶ f.left) → (mk (𝟙 Z) ⟶ f) := fun φ => CommaMorphism.mk φ (φ ≫ f.hom)\nthis : ∀ (g : Z ⟶ f.left), (aux g).right = g ≫ f.hom\n⊢ φ = ψ\n[PROOFSTEP]\nshow (aux φ).left = (aux ψ).left\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Mono sq\nZ : T\nφ ψ : Z ⟶ f.left\nh : φ ≫ sq.left = ψ ≫ sq.left\naux : (Z ⟶ f.left) → (mk (𝟙 Z) ⟶ f) := fun φ => CommaMorphism.mk φ (φ ≫ f.hom)\nthis : ∀ (g : Z ⟶ f.left), (aux g).right = g ≫ f.hom\n⊢ (aux φ).left = (aux ψ).left\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_self\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Mono sq\nZ : T\nφ ψ : Z ⟶ f.left\nh : φ ≫ sq.left = ψ ≫ sq.left\naux : (Z ⟶ f.left) → (mk (𝟙 Z) ⟶ f) := fun φ => CommaMorphism.mk φ (φ ≫ f.hom)\nthis : ∀ (g : Z ⟶ f.left), (aux g).right = g ≫ f.hom\n⊢ aux φ = aux ψ\n[PROOFSTEP]\nrw [← cancel_mono sq]\n[GOAL]\ncase e_self\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Mono sq\nZ : T\nφ ψ : Z ⟶ f.left\nh : φ ≫ sq.left = ψ ≫ sq.left\naux : (Z ⟶ f.left) → (mk (𝟙 Z) ⟶ f) := fun φ => CommaMorphism.mk φ (φ ≫ f.hom)\nthis : ∀ (g : Z ⟶ f.left), (aux g).right = g ≫ f.hom\n⊢ aux φ ≫ sq = aux ψ ≫ sq\n[PROOFSTEP]\napply CommaMorphism.ext\n[GOAL]\ncase e_self.left\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Mono sq\nZ : T\nφ ψ : Z ⟶ f.left\nh : φ ≫ sq.left = ψ ≫ sq.left\naux : (Z ⟶ f.left) → (mk (𝟙 Z) ⟶ f) := fun φ => CommaMorphism.mk φ (φ ≫ f.hom)\nthis : ∀ (g : Z ⟶ f.left), (aux g).right = g ≫ f.hom\n⊢ (aux φ ≫ sq).left = (aux ψ ≫ sq).left\n[PROOFSTEP]\nexact h\n[GOAL]\ncase e_self.right\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Mono sq\nZ : T\nφ ψ : Z ⟶ f.left\nh : φ ≫ sq.left = ψ ≫ sq.left\naux : (Z ⟶ f.left) → (mk (𝟙 Z) ⟶ f) := fun φ => CommaMorphism.mk φ (φ ≫ f.hom)\nthis : ∀ (g : Z ⟶ f.left), (aux g).right = g ≫ f.hom\n⊢ (aux φ ≫ sq).right = (aux ψ ≫ sq).right\n[PROOFSTEP]\nrw [Comma.comp_right, Comma.comp_right, this, this, Category.assoc, Category.assoc]\n[GOAL]\ncase e_self.right\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Mono sq\nZ : T\nφ ψ : Z ⟶ f.left\nh : φ ≫ sq.left = ψ ≫ sq.left\naux : (Z ⟶ f.left) → (mk (𝟙 Z) ⟶ f) := fun φ => CommaMorphism.mk φ (φ ≫ f.hom)\nthis : ∀ (g : Z ⟶ f.left), (aux g).right = g ≫ f.hom\n⊢ φ ≫ f.hom ≫ sq.right = ψ ≫ f.hom ≫ sq.right\n[PROOFSTEP]\nrw [← Arrow.w]\n[GOAL]\ncase e_self.right\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Mono sq\nZ : T\nφ ψ : Z ⟶ f.left\nh : φ ≫ sq.left = ψ ≫ sq.left\naux : (Z ⟶ f.left) → (mk (𝟙 Z) ⟶ f) := fun φ => CommaMorphism.mk φ (φ ≫ f.hom)\nthis : ∀ (g : Z ⟶ f.left), (aux g).right = g ≫ f.hom\n⊢ φ ≫ sq.left ≫ g.hom = ψ ≫ sq.left ≫ g.hom\n[PROOFSTEP]\nsimp only [← Category.assoc, h]\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Epi sq\nZ : T\nφ ψ : g.right ⟶ Z\nh : sq.right ≫ φ = sq.right ≫ ψ\n⊢ φ = ψ\n[PROOFSTEP]\nlet aux : (g.right ⟶ Z) → (g ⟶ Arrow.mk (𝟙 Z)) := fun φ =>\n  { right := φ\n    left := g.hom ≫ φ }\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Epi sq\nZ : T\nφ ψ : g.right ⟶ Z\nh : sq.right ≫ φ = sq.right ≫ ψ\naux : (g.right ⟶ Z) → (g ⟶ mk (𝟙 Z)) := fun φ => CommaMorphism.mk (g.hom ≫ φ) φ\n⊢ φ = ψ\n[PROOFSTEP]\nshow (aux φ).right = (aux ψ).right\n[GOAL]\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Epi sq\nZ : T\nφ ψ : g.right ⟶ Z\nh : sq.right ≫ φ = sq.right ≫ ψ\naux : (g.right ⟶ Z) → (g ⟶ mk (𝟙 Z)) := fun φ => CommaMorphism.mk (g.hom ≫ φ) φ\n⊢ (aux φ).right = (aux ψ).right\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_self\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Epi sq\nZ : T\nφ ψ : g.right ⟶ Z\nh : sq.right ≫ φ = sq.right ≫ ψ\naux : (g.right ⟶ Z) → (g ⟶ mk (𝟙 Z)) := fun φ => CommaMorphism.mk (g.hom ≫ φ) φ\n⊢ aux φ = aux ψ\n[PROOFSTEP]\nrw [← cancel_epi sq]\n[GOAL]\ncase e_self\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Epi sq\nZ : T\nφ ψ : g.right ⟶ Z\nh : sq.right ≫ φ = sq.right ≫ ψ\naux : (g.right ⟶ Z) → (g ⟶ mk (𝟙 Z)) := fun φ => CommaMorphism.mk (g.hom ≫ φ) φ\n⊢ sq ≫ aux φ = sq ≫ aux ψ\n[PROOFSTEP]\napply CommaMorphism.ext\n[GOAL]\ncase e_self.left\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Epi sq\nZ : T\nφ ψ : g.right ⟶ Z\nh : sq.right ≫ φ = sq.right ≫ ψ\naux : (g.right ⟶ Z) → (g ⟶ mk (𝟙 Z)) := fun φ => CommaMorphism.mk (g.hom ≫ φ) φ\n⊢ (sq ≫ aux φ).left = (sq ≫ aux ψ).left\n[PROOFSTEP]\nrw [Comma.comp_left, Comma.comp_left, Arrow.w_assoc, Arrow.w_assoc, h]\n[GOAL]\ncase e_self.right\nT : Type u\ninst✝¹ : Category.{v, u} T\nf g : Arrow T\nsq : f ⟶ g\ninst✝ : Epi sq\nZ : T\nφ ψ : g.right ⟶ Z\nh : sq.right ≫ φ = sq.right ≫ ψ\naux : (g.right ⟶ Z) → (g ⟶ mk (𝟙 Z)) := fun φ => CommaMorphism.mk (g.hom ≫ φ) φ\n⊢ (sq ≫ aux φ).right = (sq ≫ aux ψ).right\n[PROOFSTEP]\nexact h\n[GOAL]\nT : Type u\ninst✝ : Category.{v, u} T\ni : Arrow T\nX Y : T\np : X ≅ Y\nsq : i ⟶ mk p.hom\n⊢ i.hom ≫ sq.right ≫ p.inv = sq.left\n[PROOFSTEP]\nsimpa only [Category.assoc] using (Iso.comp_inv_eq p).mpr (Arrow.w_mk_right sq).symm\n[GOAL]\nT : Type u\ninst✝ : Category.{v, u} T\nX Y : T\ni : X ≅ Y\np : Arrow T\nsq : mk i.hom ⟶ p\n⊢ i.inv ≫ sq.left ≫ p.hom = sq.right\n[PROOFSTEP]\nsimp only [Iso.inv_hom_id_assoc, Arrow.w, Arrow.mk_hom]\n[GOAL]\nT : Type u\ninst✝² : Category.{v, u} T\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ : Arrow C\nf : X✝ ⟶ Y✝\n⊢ (𝟭 D).map (F.map f.left) ≫ ((fun a => { left := F.obj a.left, right := F.obj a.right, hom := F.map a.hom }) Y✝).hom =\n    ((fun a => { left := F.obj a.left, right := F.obj a.right, hom := F.map a.hom }) X✝).hom ≫ (𝟭 D).map (F.map f.right)\n[PROOFSTEP]\nlet w := f.w\n[GOAL]\nT : Type u\ninst✝² : Category.{v, u} T\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ : Arrow C\nf : X✝ ⟶ Y✝\nw : (𝟭 C).map f.left ≫ Y✝.hom = X✝.hom ≫ (𝟭 C).map f.right := f.w\n⊢ (𝟭 D).map (F.map f.left) ≫ ((fun a => { left := F.obj a.left, right := F.obj a.right, hom := F.map a.hom }) Y✝).hom =\n    ((fun a => { left := F.obj a.left, right := F.obj a.right, hom := F.map a.hom }) X✝).hom ≫ (𝟭 D).map (F.map f.right)\n[PROOFSTEP]\nsimp only [id_map] at w \n[GOAL]\nT : Type u\ninst✝² : Category.{v, u} T\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ : Arrow C\nf : X✝ ⟶ Y✝\nw : f.left ≫ Y✝.hom = X✝.hom ≫ f.right := f.w\n⊢ (𝟭 D).map (F.map f.left) ≫ ((fun a => { left := F.obj a.left, right := F.obj a.right, hom := F.map a.hom }) Y✝).hom =\n    ((fun a => { left := F.obj a.left, right := F.obj a.right, hom := F.map a.hom }) X✝).hom ≫ (𝟭 D).map (F.map f.right)\n[PROOFSTEP]\ndsimp\n[GOAL]\nT : Type u\ninst✝² : Category.{v, u} T\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nX✝ Y✝ : Arrow C\nf : X✝ ⟶ Y✝\nw : f.left ≫ Y✝.hom = X✝.hom ≫ f.right := f.w\n⊢ F.map f.left ≫ F.map Y✝.hom = F.map X✝.hom ≫ F.map f.right\n[PROOFSTEP]\nsimp only [← F.map_comp, w]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Arrow", "llama_tokens": 6734, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6513548646660543, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.3611570346656233}}
{"text": "[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ C\nc : Cocone F\nh : IsVanKampenColimit c\n⊢ IsColimit c\n[PROOFSTEP]\nrefine'\n  ((h c (𝟙 F) (𝟙 c.pt : _) (by rw [Functor.map_id, Category.comp_id, Category.id_comp])\n          (NatTrans.equifibered_of_isIso _)).mpr\n      fun j => _).some\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ C\nc : Cocone F\nh : IsVanKampenColimit c\n⊢ 𝟙 F ≫ c.ι = c.ι ≫ (Functor.const J).map (𝟙 c.pt)\n[PROOFSTEP]\nrw [Functor.map_id, Category.comp_id, Category.id_comp]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ C\nc : Cocone F\nh : IsVanKampenColimit c\nj : J\n⊢ IsPullback (NatTrans.app c.ι j) (NatTrans.app (𝟙 F) j) (𝟙 c.pt) (NatTrans.app c.ι j)\n[PROOFSTEP]\nhaveI : IsIso (𝟙 c.pt) := inferInstance\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ C\nc : Cocone F\nh : IsVanKampenColimit c\nj : J\nthis : IsIso (𝟙 c.pt)\n⊢ IsPullback (NatTrans.app c.ι j) (NatTrans.app (𝟙 F) j) (𝟙 c.pt) (NatTrans.app c.ι j)\n[PROOFSTEP]\nexact IsPullback.of_vert_isIso ⟨by erw [NatTrans.id_app, Category.comp_id, Category.id_comp]⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ C\nc : Cocone F\nh : IsVanKampenColimit c\nj : J\nthis : IsIso (𝟙 c.pt)\n⊢ NatTrans.app c.ι j ≫ 𝟙 c.pt = NatTrans.app (𝟙 F) j ≫ NatTrans.app c.ι j\n[PROOFSTEP]\nerw [NatTrans.id_app, Category.comp_id, Category.id_comp]\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nX : C\nh : IsInitial X\n⊢ IsVanKampenColimit (asEmptyCocone X)\n[PROOFSTEP]\nintro F' c' α f hf hα\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nX : C\nh : IsInitial X\nF' : Discrete PEmpty ⥤ C\nc' : Cocone F'\nα : F' ⟶ Functor.empty C\nf : c'.pt ⟶ (asEmptyCocone X).pt\nhf : α ≫ (asEmptyCocone X).ι = c'.ι ≫ (Functor.const (Discrete PEmpty)).map f\nhα : NatTrans.Equifibered α\n⊢ Nonempty (IsColimit c') ↔\n    ∀ (j : Discrete PEmpty), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app (asEmptyCocone X).ι j)\n[PROOFSTEP]\nhave : F' = Functor.empty C := by apply Functor.hext <;> rintro ⟨⟨⟩⟩\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nX : C\nh : IsInitial X\nF' : Discrete PEmpty ⥤ C\nc' : Cocone F'\nα : F' ⟶ Functor.empty C\nf : c'.pt ⟶ (asEmptyCocone X).pt\nhf : α ≫ (asEmptyCocone X).ι = c'.ι ≫ (Functor.const (Discrete PEmpty)).map f\nhα : NatTrans.Equifibered α\n⊢ F' = Functor.empty C\n[PROOFSTEP]\napply Functor.hext\n[GOAL]\ncase h_obj\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nX : C\nh : IsInitial X\nF' : Discrete PEmpty ⥤ C\nc' : Cocone F'\nα : F' ⟶ Functor.empty C\nf : c'.pt ⟶ (asEmptyCocone X).pt\nhf : α ≫ (asEmptyCocone X).ι = c'.ι ≫ (Functor.const (Discrete PEmpty)).map f\nhα : NatTrans.Equifibered α\n⊢ ∀ (X : Discrete PEmpty), F'.obj X = (Functor.empty C).obj X\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase h_map\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nX : C\nh : IsInitial X\nF' : Discrete PEmpty ⥤ C\nc' : Cocone F'\nα : F' ⟶ Functor.empty C\nf : c'.pt ⟶ (asEmptyCocone X).pt\nhf : α ≫ (asEmptyCocone X).ι = c'.ι ≫ (Functor.const (Discrete PEmpty)).map f\nhα : NatTrans.Equifibered α\n⊢ ∀ (X Y : Discrete PEmpty) (f : X ⟶ Y), HEq (F'.map f) ((Functor.empty C).map f)\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nX : C\nh : IsInitial X\nF' : Discrete PEmpty ⥤ C\nc' : Cocone F'\nα : F' ⟶ Functor.empty C\nf : c'.pt ⟶ (asEmptyCocone X).pt\nhf : α ≫ (asEmptyCocone X).ι = c'.ι ≫ (Functor.const (Discrete PEmpty)).map f\nhα : NatTrans.Equifibered α\nthis : F' = Functor.empty C\n⊢ Nonempty (IsColimit c') ↔\n    ∀ (j : Discrete PEmpty), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app (asEmptyCocone X).ι j)\n[PROOFSTEP]\nsubst this\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nX : C\nh : IsInitial X\nc' : Cocone (Functor.empty C)\nα : Functor.empty C ⟶ Functor.empty C\nf : c'.pt ⟶ (asEmptyCocone X).pt\nhf : α ≫ (asEmptyCocone X).ι = c'.ι ≫ (Functor.const (Discrete PEmpty)).map f\nhα : NatTrans.Equifibered α\n⊢ Nonempty (IsColimit c') ↔\n    ∀ (j : Discrete PEmpty), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app (asEmptyCocone X).ι j)\n[PROOFSTEP]\nhaveI := h.isIso_to f\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nX : C\nh : IsInitial X\nc' : Cocone (Functor.empty C)\nα : Functor.empty C ⟶ Functor.empty C\nf : c'.pt ⟶ (asEmptyCocone X).pt\nhf : α ≫ (asEmptyCocone X).ι = c'.ι ≫ (Functor.const (Discrete PEmpty)).map f\nhα : NatTrans.Equifibered α\nthis : IsIso f\n⊢ Nonempty (IsColimit c') ↔\n    ∀ (j : Discrete PEmpty), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app (asEmptyCocone X).ι j)\n[PROOFSTEP]\nrefine' ⟨by rintro _ ⟨⟨⟩⟩, fun _ => ⟨IsColimit.ofIsoColimit h (Cocones.ext (asIso f).symm <| by rintro ⟨⟨⟩⟩)⟩⟩\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nX : C\nh : IsInitial X\nc' : Cocone (Functor.empty C)\nα : Functor.empty C ⟶ Functor.empty C\nf : c'.pt ⟶ (asEmptyCocone X).pt\nhf : α ≫ (asEmptyCocone X).ι = c'.ι ≫ (Functor.const (Discrete PEmpty)).map f\nhα : NatTrans.Equifibered α\nthis : IsIso f\n⊢ Nonempty (IsColimit c') →\n    ∀ (j : Discrete PEmpty), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app (asEmptyCocone X).ι j)\n[PROOFSTEP]\nrintro _ ⟨⟨⟩⟩\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasStrictInitialObjects C\nX : C\nh : IsInitial X\nc' : Cocone (Functor.empty C)\nα : Functor.empty C ⟶ Functor.empty C\nf : c'.pt ⟶ (asEmptyCocone X).pt\nhf : α ≫ (asEmptyCocone X).ι = c'.ι ≫ (Functor.const (Discrete PEmpty)).map f\nhα : NatTrans.Equifibered α\nthis : IsIso f\nx✝ : ∀ (j : Discrete PEmpty), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app (asEmptyCocone X).ι j)\n⊢ ∀ (j : Discrete PEmpty), NatTrans.app (asEmptyCocone X).ι j ≫ (asIso f).symm.hom = NatTrans.app c'.ι j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : FinitaryExtensive C\nF : Discrete WalkingPair ⥤ C\nc : Cocone F\nhc : IsColimit c\n⊢ IsVanKampenColimit c\n[PROOFSTEP]\nlet X := F.obj ⟨WalkingPair.left⟩\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y : C\ninst✝ : FinitaryExtensive C\nF : Discrete WalkingPair ⥤ C\nc : Cocone F\nhc : IsColimit c\nX : C := F.obj { as := WalkingPair.left }\n⊢ IsVanKampenColimit c\n[PROOFSTEP]\nlet Y := F.obj ⟨WalkingPair.right⟩\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : FinitaryExtensive C\nF : Discrete WalkingPair ⥤ C\nc : Cocone F\nhc : IsColimit c\nX : C := F.obj { as := WalkingPair.left }\nY : C := F.obj { as := WalkingPair.right }\n⊢ IsVanKampenColimit c\n[PROOFSTEP]\nhave : F = pair X Y := by\n  apply Functor.hext\n  · rintro ⟨⟨⟩⟩ <;> rfl\n  · rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ <;> simp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : FinitaryExtensive C\nF : Discrete WalkingPair ⥤ C\nc : Cocone F\nhc : IsColimit c\nX : C := F.obj { as := WalkingPair.left }\nY : C := F.obj { as := WalkingPair.right }\n⊢ F = pair X Y\n[PROOFSTEP]\napply Functor.hext\n[GOAL]\ncase h_obj\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : FinitaryExtensive C\nF : Discrete WalkingPair ⥤ C\nc : Cocone F\nhc : IsColimit c\nX : C := F.obj { as := WalkingPair.left }\nY : C := F.obj { as := WalkingPair.right }\n⊢ ∀ (X_1 : Discrete WalkingPair), F.obj X_1 = (pair X Y).obj X_1\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase h_obj.mk.left\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : FinitaryExtensive C\nF : Discrete WalkingPair ⥤ C\nc : Cocone F\nhc : IsColimit c\nX : C := F.obj { as := WalkingPair.left }\nY : C := F.obj { as := WalkingPair.right }\n⊢ F.obj { as := WalkingPair.left } = (pair X Y).obj { as := WalkingPair.left }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_obj.mk.right\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : FinitaryExtensive C\nF : Discrete WalkingPair ⥤ C\nc : Cocone F\nhc : IsColimit c\nX : C := F.obj { as := WalkingPair.left }\nY : C := F.obj { as := WalkingPair.right }\n⊢ F.obj { as := WalkingPair.right } = (pair X Y).obj { as := WalkingPair.right }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_map\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : FinitaryExtensive C\nF : Discrete WalkingPair ⥤ C\nc : Cocone F\nhc : IsColimit c\nX : C := F.obj { as := WalkingPair.left }\nY : C := F.obj { as := WalkingPair.right }\n⊢ ∀ (X_1 Y_1 : Discrete WalkingPair) (f : X_1 ⟶ Y_1), HEq (F.map f) ((pair X Y).map f)\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩\n[GOAL]\ncase h_map.mk.left.mk.up.up\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : FinitaryExtensive C\nF : Discrete WalkingPair ⥤ C\nc : Cocone F\nhc : IsColimit c\nX : C := F.obj { as := WalkingPair.left }\nY : C := F.obj { as := WalkingPair.right }\n⊢ HEq (F.map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } })\n    ((pair X Y).map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } })\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_map.mk.right.mk.up.up\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : FinitaryExtensive C\nF : Discrete WalkingPair ⥤ C\nc : Cocone F\nhc : IsColimit c\nX : C := F.obj { as := WalkingPair.left }\nY : C := F.obj { as := WalkingPair.right }\n⊢ HEq (F.map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } })\n    ((pair X Y).map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } })\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : FinitaryExtensive C\nF : Discrete WalkingPair ⥤ C\nc : Cocone F\nhc : IsColimit c\nX : C := F.obj { as := WalkingPair.left }\nY : C := F.obj { as := WalkingPair.right }\nthis : F = pair X Y\n⊢ IsVanKampenColimit c\n[PROOFSTEP]\nclear_value X Y\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : FinitaryExtensive C\nF : Discrete WalkingPair ⥤ C\nc : Cocone F\nhc : IsColimit c\nY X : C\nthis : F = pair X Y\n⊢ IsVanKampenColimit c\n[PROOFSTEP]\nsubst this\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : FinitaryExtensive C\nY X : C\nc : Cocone (pair X Y)\nhc : IsColimit c\n⊢ IsVanKampenColimit c\n[PROOFSTEP]\nexact FinitaryExtensive.van_kampen' c hc\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nF F' : Discrete WalkingPair ⥤ C\nα : F ⟶ F'\n⊢ NatTrans.Equifibered α\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩\n[GOAL]\ncase mk.left.mk.up.up\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nF F' : Discrete WalkingPair ⥤ C\nα : F ⟶ F'\n⊢ IsPullback (F.map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } })\n    (NatTrans.app α { as := WalkingPair.left }) (NatTrans.app α { as := { as := WalkingPair.left }.as })\n    (F'.map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } })\ncase mk.right.mk.up.up\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nF F' : Discrete WalkingPair ⥤ C\nα : F ⟶ F'\n⊢ IsPullback (F.map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } })\n    (NatTrans.app α { as := WalkingPair.right }) (NatTrans.app α { as := { as := WalkingPair.right }.as })\n    (F'.map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } })\n[PROOFSTEP]\nall_goals\n  dsimp; simp only [Discrete.functor_map_id]\n  exact IsPullback.of_horiz_isIso ⟨by simp only [Category.comp_id, Category.id_comp]⟩\n[GOAL]\ncase mk.left.mk.up.up\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nF F' : Discrete WalkingPair ⥤ C\nα : F ⟶ F'\n⊢ IsPullback (F.map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } })\n    (NatTrans.app α { as := WalkingPair.left }) (NatTrans.app α { as := { as := WalkingPair.left }.as })\n    (F'.map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } })\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.left.mk.up.up\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nF F' : Discrete WalkingPair ⥤ C\nα : F ⟶ F'\n⊢ IsPullback (F.map { down := { down := (_ : WalkingPair.left = WalkingPair.left) } })\n    (NatTrans.app α { as := WalkingPair.left }) (NatTrans.app α { as := WalkingPair.left })\n    (F'.map { down := { down := (_ : WalkingPair.left = WalkingPair.left) } })\n[PROOFSTEP]\nsimp only [Discrete.functor_map_id]\n[GOAL]\ncase mk.left.mk.up.up\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nF F' : Discrete WalkingPair ⥤ C\nα : F ⟶ F'\n⊢ IsPullback (𝟙 (F.obj { as := WalkingPair.left })) (NatTrans.app α { as := WalkingPair.left })\n    (NatTrans.app α { as := WalkingPair.left }) (𝟙 (F'.obj { as := WalkingPair.left }))\n[PROOFSTEP]\nexact IsPullback.of_horiz_isIso ⟨by simp only [Category.comp_id, Category.id_comp]⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nF F' : Discrete WalkingPair ⥤ C\nα : F ⟶ F'\n⊢ 𝟙 (F.obj { as := WalkingPair.left }) ≫ NatTrans.app α { as := WalkingPair.left } =\n    NatTrans.app α { as := WalkingPair.left } ≫ 𝟙 (F'.obj { as := WalkingPair.left })\n[PROOFSTEP]\nsimp only [Category.comp_id, Category.id_comp]\n[GOAL]\ncase mk.right.mk.up.up\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nF F' : Discrete WalkingPair ⥤ C\nα : F ⟶ F'\n⊢ IsPullback (F.map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } })\n    (NatTrans.app α { as := WalkingPair.right }) (NatTrans.app α { as := { as := WalkingPair.right }.as })\n    (F'.map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } })\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.right.mk.up.up\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nF F' : Discrete WalkingPair ⥤ C\nα : F ⟶ F'\n⊢ IsPullback (F.map { down := { down := (_ : WalkingPair.right = WalkingPair.right) } })\n    (NatTrans.app α { as := WalkingPair.right }) (NatTrans.app α { as := WalkingPair.right })\n    (F'.map { down := { down := (_ : WalkingPair.right = WalkingPair.right) } })\n[PROOFSTEP]\nsimp only [Discrete.functor_map_id]\n[GOAL]\ncase mk.right.mk.up.up\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nF F' : Discrete WalkingPair ⥤ C\nα : F ⟶ F'\n⊢ IsPullback (𝟙 (F.obj { as := WalkingPair.right })) (NatTrans.app α { as := WalkingPair.right })\n    (NatTrans.app α { as := WalkingPair.right }) (𝟙 (F'.obj { as := WalkingPair.right }))\n[PROOFSTEP]\nexact IsPullback.of_horiz_isIso ⟨by simp only [Category.comp_id, Category.id_comp]⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nF F' : Discrete WalkingPair ⥤ C\nα : F ⟶ F'\n⊢ 𝟙 (F.obj { as := WalkingPair.right }) ≫ NatTrans.app α { as := WalkingPair.right } =\n    NatTrans.app α { as := WalkingPair.right } ≫ 𝟙 (F'.obj { as := WalkingPair.right })\n[PROOFSTEP]\nsimp only [Category.comp_id, Category.id_comp]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\n⊢ IsVanKampenColimit c ↔\n    ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n      αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n        αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n          (Nonempty (IsColimit c') ↔\n            IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n              IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\n⊢ IsVanKampenColimit c →\n    ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n      αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n        αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n          (Nonempty (IsColimit c') ↔\n            IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n              IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\n[PROOFSTEP]\nintrov H hαX hαY\n[GOAL]\ncase mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH : IsVanKampenColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhαX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhαY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ Nonempty (IsColimit c') ↔\n    IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nrw [H c' (mapPair αX αY) f (by ext ⟨⟨⟩⟩ <;> dsimp <;> assumption) (mapPair_equifibered _)]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH : IsVanKampenColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhαX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhαY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ mapPair αX αY ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\n[PROOFSTEP]\next ⟨⟨⟩⟩\n[GOAL]\ncase w.h.mk.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH : IsVanKampenColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhαX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhαY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ NatTrans.app (mapPair αX αY ≫ c.ι) { as := WalkingPair.left } =\n    NatTrans.app (c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.mk.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH : IsVanKampenColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhαX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhαY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ NatTrans.app (mapPair αX αY ≫ c.ι) { as := WalkingPair.right } =\n    NatTrans.app (c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.right }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.mk.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH : IsVanKampenColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhαX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhαY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\n[PROOFSTEP]\nassumption\n[GOAL]\ncase w.h.mk.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH : IsVanKampenColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhαX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhαY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH : IsVanKampenColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhαX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhαY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ (∀ (j : Discrete WalkingPair),\n      IsPullback (NatTrans.app c'.ι j) (NatTrans.app (mapPair αX αY) j) f (NatTrans.app c.ι j)) ↔\n    IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH : IsVanKampenColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhαX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhαY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ (∀ (j : Discrete WalkingPair),\n      IsPullback (NatTrans.app c'.ι j) (NatTrans.app (mapPair αX αY) j) f (NatTrans.app c.ι j)) →\n    IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp.mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH✝ : IsVanKampenColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhαX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhαY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH :\n  ∀ (j : Discrete WalkingPair), IsPullback (NatTrans.app c'.ι j) (NatTrans.app (mapPair αX αY) j) f (NatTrans.app c.ι j)\n⊢ IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nexact ⟨H _, H _⟩\n[GOAL]\ncase mp.mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH : IsVanKampenColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhαX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhαY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c) →\n    ∀ (j : Discrete WalkingPair),\n      IsPullback (NatTrans.app c'.ι j) (NatTrans.app (mapPair αX αY) j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nrintro H ⟨⟨⟩⟩\n[GOAL]\ncase mp.mpr.mk.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH✝ : IsVanKampenColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhαX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhαY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n⊢ IsPullback (NatTrans.app c'.ι { as := WalkingPair.left }) (NatTrans.app (mapPair αX αY) { as := WalkingPair.left }) f\n    (NatTrans.app c.ι { as := WalkingPair.left })\ncase mp.mpr.mk.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH✝ : IsVanKampenColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhαX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhαY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n⊢ IsPullback (NatTrans.app c'.ι { as := WalkingPair.right }) (NatTrans.app (mapPair αX αY) { as := WalkingPair.right })\n    f (NatTrans.app c.ι { as := WalkingPair.right })\n[PROOFSTEP]\nexacts [H.1, H.2]\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\n⊢ (∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n      αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n        αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n          (Nonempty (IsColimit c') ↔\n            IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n              IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))) →\n    IsVanKampenColimit c\n[PROOFSTEP]\nintrov H F' hα h\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nF' : Discrete WalkingPair ⥤ C\nc' : Cocone F'\nα : F' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\n⊢ Nonempty (IsColimit c') ↔\n    ∀ (j : Discrete WalkingPair), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nlet X' := F'.obj ⟨WalkingPair.left⟩\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nF' : Discrete WalkingPair ⥤ C\nc' : Cocone F'\nα : F' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\nX' : C := F'.obj { as := WalkingPair.left }\n⊢ Nonempty (IsColimit c') ↔\n    ∀ (j : Discrete WalkingPair), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nlet Y' := F'.obj ⟨WalkingPair.right⟩\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nF' : Discrete WalkingPair ⥤ C\nc' : Cocone F'\nα : F' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\nX' : C := F'.obj { as := WalkingPair.left }\nY' : C := F'.obj { as := WalkingPair.right }\n⊢ Nonempty (IsColimit c') ↔\n    ∀ (j : Discrete WalkingPair), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nhave : F' = pair X' Y' := by\n  apply Functor.hext\n  · rintro ⟨⟨⟩⟩ <;> rfl\n  · rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ <;> simp\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nF' : Discrete WalkingPair ⥤ C\nc' : Cocone F'\nα : F' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\nX' : C := F'.obj { as := WalkingPair.left }\nY' : C := F'.obj { as := WalkingPair.right }\n⊢ F' = pair X' Y'\n[PROOFSTEP]\napply Functor.hext\n[GOAL]\ncase h_obj\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nF' : Discrete WalkingPair ⥤ C\nc' : Cocone F'\nα : F' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\nX' : C := F'.obj { as := WalkingPair.left }\nY' : C := F'.obj { as := WalkingPair.right }\n⊢ ∀ (X : Discrete WalkingPair), F'.obj X = (pair X' Y').obj X\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase h_obj.mk.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nF' : Discrete WalkingPair ⥤ C\nc' : Cocone F'\nα : F' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\nX' : C := F'.obj { as := WalkingPair.left }\nY' : C := F'.obj { as := WalkingPair.right }\n⊢ F'.obj { as := WalkingPair.left } = (pair X' Y').obj { as := WalkingPair.left }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_obj.mk.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nF' : Discrete WalkingPair ⥤ C\nc' : Cocone F'\nα : F' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\nX' : C := F'.obj { as := WalkingPair.left }\nY' : C := F'.obj { as := WalkingPair.right }\n⊢ F'.obj { as := WalkingPair.right } = (pair X' Y').obj { as := WalkingPair.right }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_map\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nF' : Discrete WalkingPair ⥤ C\nc' : Cocone F'\nα : F' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\nX' : C := F'.obj { as := WalkingPair.left }\nY' : C := F'.obj { as := WalkingPair.right }\n⊢ ∀ (X Y : Discrete WalkingPair) (f : X ⟶ Y), HEq (F'.map f) ((pair X' Y').map f)\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩\n[GOAL]\ncase h_map.mk.left.mk.up.up\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nF' : Discrete WalkingPair ⥤ C\nc' : Cocone F'\nα : F' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\nX' : C := F'.obj { as := WalkingPair.left }\nY' : C := F'.obj { as := WalkingPair.right }\n⊢ HEq (F'.map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } })\n    ((pair X' Y').map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } })\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_map.mk.right.mk.up.up\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nF' : Discrete WalkingPair ⥤ C\nc' : Cocone F'\nα : F' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\nX' : C := F'.obj { as := WalkingPair.left }\nY' : C := F'.obj { as := WalkingPair.right }\n⊢ HEq (F'.map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } })\n    ((pair X' Y').map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } })\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nF' : Discrete WalkingPair ⥤ C\nc' : Cocone F'\nα : F' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\nX' : C := F'.obj { as := WalkingPair.left }\nY' : C := F'.obj { as := WalkingPair.right }\nthis : F' = pair X' Y'\n⊢ Nonempty (IsColimit c') ↔\n    ∀ (j : Discrete WalkingPair), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nclear_value X' Y'\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nF' : Discrete WalkingPair ⥤ C\nc' : Cocone F'\nα : F' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\nY' X' : C\nthis : F' = pair X' Y'\n⊢ Nonempty (IsColimit c') ↔\n    ∀ (j : Discrete WalkingPair), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nsubst this\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nY' X' : C\nc' : Cocone (pair X' Y')\nα : pair X' Y' ⟶ pair X Y\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nh : NatTrans.Equifibered α\n⊢ Nonempty (IsColimit c') ↔\n    ∀ (j : Discrete WalkingPair), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nchange BinaryCofan X' Y' at c' \n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nY' X' : C\nα : pair X' Y' ⟶ pair X Y\nh : NatTrans.Equifibered α\nc' : BinaryCofan X' Y'\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\n⊢ Nonempty (IsColimit c') ↔\n    ∀ (j : Discrete WalkingPair), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nrw [H c' _ _ _ (NatTrans.congr_app hα ⟨WalkingPair.left⟩) (NatTrans.congr_app hα ⟨WalkingPair.right⟩)]\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nY' X' : C\nα : pair X' Y' ⟶ pair X Y\nh : NatTrans.Equifibered α\nc' : BinaryCofan X' Y'\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\n⊢ IsPullback (BinaryCofan.inl c') (NatTrans.app α { as := WalkingPair.left })\n        (NatTrans.app ((Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }) (BinaryCofan.inl c) ∧\n      IsPullback (BinaryCofan.inr c') (NatTrans.app α { as := WalkingPair.right })\n        (NatTrans.app ((Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }) (BinaryCofan.inr c) ↔\n    ∀ (j : Discrete WalkingPair), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nY' X' : C\nα : pair X' Y' ⟶ pair X Y\nh : NatTrans.Equifibered α\nc' : BinaryCofan X' Y'\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\n⊢ IsPullback (BinaryCofan.inl c') (NatTrans.app α { as := WalkingPair.left })\n        (NatTrans.app ((Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }) (BinaryCofan.inl c) ∧\n      IsPullback (BinaryCofan.inr c') (NatTrans.app α { as := WalkingPair.right })\n        (NatTrans.app ((Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }) (BinaryCofan.inr c) →\n    ∀ (j : Discrete WalkingPair), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nrintro H ⟨⟨⟩⟩\n[GOAL]\ncase mpr.mp.mk.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH✝ :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nY' X' : C\nα : pair X' Y' ⟶ pair X Y\nh : NatTrans.Equifibered α\nc' : BinaryCofan X' Y'\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nH :\n  IsPullback (BinaryCofan.inl c') (NatTrans.app α { as := WalkingPair.left })\n      (NatTrans.app ((Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }) (BinaryCofan.inl c) ∧\n    IsPullback (BinaryCofan.inr c') (NatTrans.app α { as := WalkingPair.right })\n      (NatTrans.app ((Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }) (BinaryCofan.inr c)\n⊢ IsPullback (NatTrans.app c'.ι { as := WalkingPair.left }) (NatTrans.app α { as := WalkingPair.left }) f\n    (NatTrans.app c.ι { as := WalkingPair.left })\ncase mpr.mp.mk.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH✝ :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nY' X' : C\nα : pair X' Y' ⟶ pair X Y\nh : NatTrans.Equifibered α\nc' : BinaryCofan X' Y'\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nH :\n  IsPullback (BinaryCofan.inl c') (NatTrans.app α { as := WalkingPair.left })\n      (NatTrans.app ((Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }) (BinaryCofan.inl c) ∧\n    IsPullback (BinaryCofan.inr c') (NatTrans.app α { as := WalkingPair.right })\n      (NatTrans.app ((Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }) (BinaryCofan.inr c)\n⊢ IsPullback (NatTrans.app c'.ι { as := WalkingPair.right }) (NatTrans.app α { as := WalkingPair.right }) f\n    (NatTrans.app c.ι { as := WalkingPair.right })\n[PROOFSTEP]\nexacts [H.1, H.2]\n[GOAL]\ncase mpr.mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nY' X' : C\nα : pair X' Y' ⟶ pair X Y\nh : NatTrans.Equifibered α\nc' : BinaryCofan X' Y'\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\n⊢ (∀ (j : Discrete WalkingPair), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)) →\n    IsPullback (BinaryCofan.inl c') (NatTrans.app α { as := WalkingPair.left })\n        (NatTrans.app ((Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }) (BinaryCofan.inl c) ∧\n      IsPullback (BinaryCofan.inr c') (NatTrans.app α { as := WalkingPair.right })\n        (NatTrans.app ((Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }) (BinaryCofan.inr c)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr.mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nc : BinaryCofan X Y\nH✝ :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\nY' X' : C\nα : pair X' Y' ⟶ pair X Y\nh : NatTrans.Equifibered α\nc' : BinaryCofan X' Y'\nf : c'.pt ⟶ c.pt\nhα : α ≫ c.ι = c'.ι ≫ (Functor.const (Discrete WalkingPair)).map f\nH : ∀ (j : Discrete WalkingPair), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n⊢ IsPullback (BinaryCofan.inl c') (NatTrans.app α { as := WalkingPair.left })\n      (NatTrans.app ((Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }) (BinaryCofan.inl c) ∧\n    IsPullback (BinaryCofan.inr c') (NatTrans.app α { as := WalkingPair.right })\n      (NatTrans.app ((Functor.const (Discrete WalkingPair)).map f) { as := WalkingPair.left }) (BinaryCofan.inr c)\n[PROOFSTEP]\nexact ⟨H _, H _⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\n⊢ IsVanKampenColimit c\n[PROOFSTEP]\nrw [BinaryCofan.isVanKampen_iff]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\n⊢ ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\n[PROOFSTEP]\nintrov hX hY\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ Nonempty (IsColimit c') ↔\n    IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ Nonempty (IsColimit c') →\n    IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nrintro ⟨h⟩\n[GOAL]\ncase mp.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\n⊢ IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nlet e := h.coconePointUniqueUpToIso (colimits _ _)\n[GOAL]\ncase mp.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\n⊢ IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nobtain ⟨hl, hr⟩ := h₁ αX αY (e.inv ≫ f) (by simp [hX]) (by simp [hY])\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\n⊢ αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ e.inv ≫ f\n[PROOFSTEP]\nsimp [hX]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\n⊢ αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ e.inv ≫ f\n[PROOFSTEP]\nsimp [hY]\n[GOAL]\ncase mp.intro.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\n⊢ IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.intro.intro.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\n⊢ IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c)\n[PROOFSTEP]\nrw [← Category.id_comp αX, ← Iso.hom_inv_id_assoc e f]\n[GOAL]\ncase mp.intro.intro.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\n⊢ IsPullback (BinaryCofan.inl c') (𝟙 X' ≫ αX) (e.hom ≫ e.inv ≫ f) (BinaryCofan.inl c)\n[PROOFSTEP]\nhaveI : IsIso (𝟙 X') := inferInstance\n[GOAL]\ncase mp.intro.intro.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\nthis : IsIso (𝟙 X')\n⊢ IsPullback (BinaryCofan.inl c') (𝟙 X' ≫ αX) (e.hom ≫ e.inv ≫ f) (BinaryCofan.inl c)\n[PROOFSTEP]\nhave : c'.inl ≫ e.hom = 𝟙 X' ≫ (cofans X' Y').inl := by\n  dsimp\n  simp\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\nthis : IsIso (𝟙 X')\n⊢ BinaryCofan.inl c' ≫ e.hom = 𝟙 X' ≫ BinaryCofan.inl (cofans X' Y')\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\nthis : IsIso (𝟙 X')\n⊢ BinaryCofan.inl c' ≫ (IsColimit.coconePointUniqueUpToIso h (colimits X' Y')).hom =\n    𝟙 X' ≫ BinaryCofan.inl (cofans X' Y')\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.intro.intro.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\nthis✝ : IsIso (𝟙 X')\nthis : BinaryCofan.inl c' ≫ e.hom = 𝟙 X' ≫ BinaryCofan.inl (cofans X' Y')\n⊢ IsPullback (BinaryCofan.inl c') (𝟙 X' ≫ αX) (e.hom ≫ e.inv ≫ f) (BinaryCofan.inl c)\n[PROOFSTEP]\nexact (IsPullback.of_vert_isIso ⟨this⟩).paste_vert hl\n[GOAL]\ncase mp.intro.intro.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\n⊢ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nrw [← Category.id_comp αY, ← Iso.hom_inv_id_assoc e f]\n[GOAL]\ncase mp.intro.intro.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\n⊢ IsPullback (BinaryCofan.inr c') (𝟙 Y' ≫ αY) (e.hom ≫ e.inv ≫ f) (BinaryCofan.inr c)\n[PROOFSTEP]\nhaveI : IsIso (𝟙 Y') := inferInstance\n[GOAL]\ncase mp.intro.intro.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\nthis : IsIso (𝟙 Y')\n⊢ IsPullback (BinaryCofan.inr c') (𝟙 Y' ≫ αY) (e.hom ≫ e.inv ≫ f) (BinaryCofan.inr c)\n[PROOFSTEP]\nhave : c'.inr ≫ e.hom = 𝟙 Y' ≫ (cofans X' Y').inr := by\n  dsimp\n  simp\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\nthis : IsIso (𝟙 Y')\n⊢ BinaryCofan.inr c' ≫ e.hom = 𝟙 Y' ≫ BinaryCofan.inr (cofans X' Y')\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\nthis : IsIso (𝟙 Y')\n⊢ BinaryCofan.inr c' ≫ (IsColimit.coconePointUniqueUpToIso h (colimits X' Y')).hom =\n    𝟙 Y' ≫ BinaryCofan.inr (cofans X' Y')\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.intro.intro.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nh : IsColimit c'\ne : c'.pt ≅ (cofans X' Y').pt := IsColimit.coconePointUniqueUpToIso h (colimits X' Y')\nhl : IsPullback (BinaryCofan.inl (cofans X' Y')) αX (e.inv ≫ f) (BinaryCofan.inl c)\nhr : IsPullback (BinaryCofan.inr (cofans X' Y')) αY (e.inv ≫ f) (BinaryCofan.inr c)\nthis✝ : IsIso (𝟙 Y')\nthis : BinaryCofan.inr c' ≫ e.hom = 𝟙 Y' ≫ BinaryCofan.inr (cofans X' Y')\n⊢ IsPullback (BinaryCofan.inr c') (𝟙 Y' ≫ αY) (e.hom ≫ e.inv ≫ f) (BinaryCofan.inr c)\n[PROOFSTEP]\nexact (IsPullback.of_vert_isIso ⟨this⟩).paste_vert hr\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c) →\n    Nonempty (IsColimit c')\n[PROOFSTEP]\nrintro ⟨H₁, H₂⟩\n[GOAL]\ncase mpr.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH₁ : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c)\nH₂ : IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n⊢ Nonempty (IsColimit c')\n[PROOFSTEP]\nrefine' ⟨IsColimit.ofIsoColimit _ <| (isoBinaryCofanMk _).symm⟩\n[GOAL]\ncase mpr.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH₁ : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c)\nH₂ : IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n⊢ IsColimit (BinaryCofan.mk (BinaryCofan.inl c') (BinaryCofan.inr c'))\n[PROOFSTEP]\nlet e₁ : X' ≅ _ := H₁.isLimit.conePointUniqueUpToIso (limits _ _)\n[GOAL]\ncase mpr.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH₁ : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c)\nH₂ : IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\ne₁ : X' ≅ (cones f (BinaryCofan.inl c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₁) (limits f (BinaryCofan.inl c))\n⊢ IsColimit (BinaryCofan.mk (BinaryCofan.inl c') (BinaryCofan.inr c'))\n[PROOFSTEP]\nlet e₂ : Y' ≅ _ := H₂.isLimit.conePointUniqueUpToIso (limits _ _)\n[GOAL]\ncase mpr.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH₁ : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c)\nH₂ : IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\ne₁ : X' ≅ (cones f (BinaryCofan.inl c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₁) (limits f (BinaryCofan.inl c))\ne₂ : Y' ≅ (cones f (BinaryCofan.inr c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₂) (limits f (BinaryCofan.inr c))\n⊢ IsColimit (BinaryCofan.mk (BinaryCofan.inl c') (BinaryCofan.inr c'))\n[PROOFSTEP]\nhave he₁ : c'.inl = e₁.hom ≫ (cones f c.inl).fst := by simp\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH₁ : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c)\nH₂ : IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\ne₁ : X' ≅ (cones f (BinaryCofan.inl c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₁) (limits f (BinaryCofan.inl c))\ne₂ : Y' ≅ (cones f (BinaryCofan.inr c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₂) (limits f (BinaryCofan.inr c))\n⊢ BinaryCofan.inl c' = e₁.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inl c))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH₁ : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c)\nH₂ : IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\ne₁ : X' ≅ (cones f (BinaryCofan.inl c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₁) (limits f (BinaryCofan.inl c))\ne₂ : Y' ≅ (cones f (BinaryCofan.inr c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₂) (limits f (BinaryCofan.inr c))\nhe₁ : BinaryCofan.inl c' = e₁.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inl c))\n⊢ IsColimit (BinaryCofan.mk (BinaryCofan.inl c') (BinaryCofan.inr c'))\n[PROOFSTEP]\nhave he₂ : c'.inr = e₂.hom ≫ (cones f c.inr).fst := by simp\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH₁ : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c)\nH₂ : IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\ne₁ : X' ≅ (cones f (BinaryCofan.inl c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₁) (limits f (BinaryCofan.inl c))\ne₂ : Y' ≅ (cones f (BinaryCofan.inr c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₂) (limits f (BinaryCofan.inr c))\nhe₁ : BinaryCofan.inl c' = e₁.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inl c))\n⊢ BinaryCofan.inr c' = e₂.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inr c))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH₁ : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c)\nH₂ : IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\ne₁ : X' ≅ (cones f (BinaryCofan.inl c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₁) (limits f (BinaryCofan.inl c))\ne₂ : Y' ≅ (cones f (BinaryCofan.inr c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₂) (limits f (BinaryCofan.inr c))\nhe₁ : BinaryCofan.inl c' = e₁.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inl c))\nhe₂ : BinaryCofan.inr c' = e₂.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inr c))\n⊢ IsColimit (BinaryCofan.mk (BinaryCofan.inl c') (BinaryCofan.inr c'))\n[PROOFSTEP]\nrw [he₁, he₂]\n[GOAL]\ncase mpr.intro\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH₁ : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c)\nH₂ : IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\ne₁ : X' ≅ (cones f (BinaryCofan.inl c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₁) (limits f (BinaryCofan.inl c))\ne₂ : Y' ≅ (cones f (BinaryCofan.inr c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₂) (limits f (BinaryCofan.inr c))\nhe₁ : BinaryCofan.inl c' = e₁.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inl c))\nhe₂ : BinaryCofan.inr c' = e₂.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inr c))\n⊢ IsColimit\n    (BinaryCofan.mk (e₁.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inl c)))\n      (e₂.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inr c))))\n[PROOFSTEP]\napply BinaryCofan.isColimitCompRightIso (BinaryCofan.mk _ _)\n[GOAL]\ncase mpr.intro.h\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH₁ : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c)\nH₂ : IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\ne₁ : X' ≅ (cones f (BinaryCofan.inl c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₁) (limits f (BinaryCofan.inl c))\ne₂ : Y' ≅ (cones f (BinaryCofan.inr c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₂) (limits f (BinaryCofan.inr c))\nhe₁ : BinaryCofan.inl c' = e₁.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inl c))\nhe₂ : BinaryCofan.inr c' = e₂.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inr c))\n⊢ IsColimit\n    (BinaryCofan.mk (e₁.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inl c)))\n      ((cones f (BinaryCofan.inr c)).π.1 WalkingCospan.left))\n[PROOFSTEP]\napply BinaryCofan.isColimitCompLeftIso (BinaryCofan.mk _ _)\n[GOAL]\ncase mpr.intro.h.h\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ X Y : C\nc : BinaryCofan X Y\ncofans : (X Y : C) → BinaryCofan X Y\ncolimits : (X Y : C) → IsColimit (cofans X Y)\ncones : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PullbackCone f g\nlimits : {X Y Z : C} → (f : X ⟶ Z) → (g : Y ⟶ Z) → IsLimit (cones f g)\nh₁ :\n  ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt),\n    αX ≫ BinaryCofan.inl c = BinaryCofan.inl (cofans X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr c = BinaryCofan.inr (cofans X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (cofans X' Y')) αX f (BinaryCofan.inl c) ∧\n          IsPullback (BinaryCofan.inr (cofans X' Y')) αY f (BinaryCofan.inr c)\nh₂ :\n  {Z : C} →\n    (f : Z ⟶ c.pt) →\n      IsColimit\n        (BinaryCofan.mk (PullbackCone.fst (cones f (BinaryCofan.inl c)))\n          (PullbackCone.fst (cones f (BinaryCofan.inr c))))\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nH₁ : IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c)\nH₂ : IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\ne₁ : X' ≅ (cones f (BinaryCofan.inl c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₁) (limits f (BinaryCofan.inl c))\ne₂ : Y' ≅ (cones f (BinaryCofan.inr c)).pt :=\n  IsLimit.conePointUniqueUpToIso (IsPullback.isLimit H₂) (limits f (BinaryCofan.inr c))\nhe₁ : BinaryCofan.inl c' = e₁.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inl c))\nhe₂ : BinaryCofan.inr c' = e₂.hom ≫ PullbackCone.fst (cones f (BinaryCofan.inr c))\n⊢ IsColimit\n    (BinaryCofan.mk ((cones f (BinaryCofan.inl c)).π.1 WalkingCospan.left)\n      ((cones f (BinaryCofan.inr c)).π.1 WalkingCospan.left))\n[PROOFSTEP]\nexact h₂ f\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : HasInitial C\nX Y : C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ Mono (BinaryCofan.inr c)\n[PROOFSTEP]\nrefine' PullbackCone.mono_of_isLimitMkIdId _ (IsPullback.isLimit _)\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : HasInitial C\nX Y : C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ IsPullback (𝟙 ((pair X Y).obj { as := WalkingPair.right })) (𝟙 ((pair X Y).obj { as := WalkingPair.right }))\n    (BinaryCofan.inr c) (BinaryCofan.inr c)\n[PROOFSTEP]\nrefine'\n  (h (BinaryCofan.mk (initial.to Y) (𝟙 Y)) (mapPair (initial.to X) (𝟙 Y)) c.inr _ (mapPair_equifibered _)).mp ⟨_⟩\n    ⟨WalkingPair.right⟩\n[GOAL]\ncase refine'_1\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : HasInitial C\nX Y : C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ mapPair (initial.to X) (𝟙 Y) ≫ c.ι =\n    (BinaryCofan.mk (initial.to Y) (𝟙 Y)).ι ≫ (Functor.const (Discrete WalkingPair)).map (BinaryCofan.inr c)\n[PROOFSTEP]\next ⟨⟨⟩⟩\n[GOAL]\ncase refine'_1.w.h.mk.left\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : HasInitial C\nX Y : C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ NatTrans.app (mapPair (initial.to X) (𝟙 Y) ≫ c.ι) { as := WalkingPair.left } =\n    NatTrans.app\n      ((BinaryCofan.mk (initial.to Y) (𝟙 Y)).ι ≫ (Functor.const (Discrete WalkingPair)).map (BinaryCofan.inr c))\n      { as := WalkingPair.left }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1.w.h.mk.right\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : HasInitial C\nX Y : C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ NatTrans.app (mapPair (initial.to X) (𝟙 Y) ≫ c.ι) { as := WalkingPair.right } =\n    NatTrans.app\n      ((BinaryCofan.mk (initial.to Y) (𝟙 Y)).ι ≫ (Functor.const (Discrete WalkingPair)).map (BinaryCofan.inr c))\n      { as := WalkingPair.right }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1.w.h.mk.left\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : HasInitial C\nX Y : C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ initial.to X ≫ BinaryCofan.inl c = initial.to Y ≫ BinaryCofan.inr c\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : HasInitial C\nX Y : C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ IsColimit (BinaryCofan.mk (initial.to Y) (𝟙 Y))\n[PROOFSTEP]\nexact\n  ((BinaryCofan.isColimit_iff_isIso_inr initialIsInitial _).mpr\n      (by\n        dsimp\n        infer_instance)).some\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : HasInitial C\nX Y : C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ IsIso (BinaryCofan.inr (BinaryCofan.mk (initial.to Y) (𝟙 Y)))\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ : C\ninst✝ : HasInitial C\nX Y : C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ IsIso (𝟙 Y)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ IsPullback (initial.to ((pair X Y).obj { as := WalkingPair.left }))\n    (initial.to ((pair X Y).obj { as := WalkingPair.right })) (BinaryCofan.inl c) (BinaryCofan.inr c)\n[PROOFSTEP]\nrefine'\n  ((h (BinaryCofan.mk (initial.to Y) (𝟙 Y)) (mapPair (initial.to X) (𝟙 Y)) c.inr _ (mapPair_equifibered _)).mp ⟨_⟩\n      ⟨WalkingPair.left⟩).flip\n[GOAL]\ncase refine'_1\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ mapPair (initial.to X) (𝟙 Y) ≫ c.ι =\n    (BinaryCofan.mk (initial.to Y) (𝟙 Y)).ι ≫ (Functor.const (Discrete WalkingPair)).map (BinaryCofan.inr c)\n[PROOFSTEP]\next ⟨⟨⟩⟩\n[GOAL]\ncase refine'_1.w.h.mk.left\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ NatTrans.app (mapPair (initial.to X) (𝟙 Y) ≫ c.ι) { as := WalkingPair.left } =\n    NatTrans.app\n      ((BinaryCofan.mk (initial.to Y) (𝟙 Y)).ι ≫ (Functor.const (Discrete WalkingPair)).map (BinaryCofan.inr c))\n      { as := WalkingPair.left }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1.w.h.mk.right\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ NatTrans.app (mapPair (initial.to X) (𝟙 Y) ≫ c.ι) { as := WalkingPair.right } =\n    NatTrans.app\n      ((BinaryCofan.mk (initial.to Y) (𝟙 Y)).ι ≫ (Functor.const (Discrete WalkingPair)).map (BinaryCofan.inr c))\n      { as := WalkingPair.right }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1.w.h.mk.left\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ initial.to X ≫ BinaryCofan.inl c = initial.to Y ≫ BinaryCofan.inr c\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ IsColimit (BinaryCofan.mk (initial.to Y) (𝟙 Y))\n[PROOFSTEP]\nexact\n  ((BinaryCofan.isColimit_iff_isIso_inr initialIsInitial _).mpr\n      (by\n        dsimp\n        infer_instance)).some\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ IsIso (BinaryCofan.inr (BinaryCofan.mk (initial.to Y) (𝟙 Y)))\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nc : BinaryCofan X Y\nh : IsVanKampenColimit c\n⊢ IsIso (𝟙 Y)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\n⊢ ∀ (A : C) (f : A ⟶ ⊥_ C), IsIso f\n[PROOFSTEP]\nintro A f\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\n⊢ IsIso f\n[PROOFSTEP]\nsuffices IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))\n  by\n  obtain ⟨l, h₁, h₂⟩ := Limits.BinaryCofan.IsColimit.desc' this (f ≫ initial.to A) (𝟙 A)\n  rcases(Category.id_comp _).symm.trans h₂ with rfl\n  exact ⟨⟨_, ((Category.id_comp _).symm.trans h₁).symm, initialIsInitial.hom_ext _ _⟩⟩\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\nthis : IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))\n⊢ IsIso f\n[PROOFSTEP]\nobtain ⟨l, h₁, h₂⟩ := Limits.BinaryCofan.IsColimit.desc' this (f ≫ initial.to A) (𝟙 A)\n[GOAL]\ncase mk.intro\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\nthis : IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))\nl : (BinaryCofan.mk (𝟙 A) (𝟙 A)).pt ⟶ A\nh₁ : BinaryCofan.inl (BinaryCofan.mk (𝟙 A) (𝟙 A)) ≫ l = f ≫ initial.to A\nh₂ : BinaryCofan.inr (BinaryCofan.mk (𝟙 A) (𝟙 A)) ≫ l = 𝟙 A\n⊢ IsIso f\n[PROOFSTEP]\nrcases(Category.id_comp _).symm.trans h₂ with rfl\n[GOAL]\ncase mk.intro\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\nthis : IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))\nh₁ : BinaryCofan.inl (BinaryCofan.mk (𝟙 A) (𝟙 A)) ≫ 𝟙 A = f ≫ initial.to A\nh₂ : BinaryCofan.inr (BinaryCofan.mk (𝟙 A) (𝟙 A)) ≫ 𝟙 A = 𝟙 A\n⊢ IsIso f\n[PROOFSTEP]\nexact ⟨⟨_, ((Category.id_comp _).symm.trans h₁).symm, initialIsInitial.hom_ext _ _⟩⟩\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\n⊢ IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A))\n[PROOFSTEP]\nrefine' (H (BinaryCofan.mk (𝟙 _) (𝟙 _)) (mapPair f f) f (by ext ⟨⟨⟩⟩ <;> dsimp <;> simp) (mapPair_equifibered _) _).some\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\n⊢ mapPair f f ≫ (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C))).ι =\n    (BinaryCofan.mk (𝟙 A) (𝟙 A)).ι ≫ (Functor.const (Discrete WalkingPair)).map f\n[PROOFSTEP]\next ⟨⟨⟩⟩\n[GOAL]\ncase w.h.mk.left\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\n⊢ NatTrans.app (mapPair f f ≫ (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C))).ι) { as := WalkingPair.left } =\n    NatTrans.app ((BinaryCofan.mk (𝟙 A) (𝟙 A)).ι ≫ (Functor.const (Discrete WalkingPair)).map f)\n      { as := WalkingPair.left }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.mk.right\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\n⊢ NatTrans.app (mapPair f f ≫ (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C))).ι) { as := WalkingPair.right } =\n    NatTrans.app ((BinaryCofan.mk (𝟙 A) (𝟙 A)).ι ≫ (Functor.const (Discrete WalkingPair)).map f)\n      { as := WalkingPair.right }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.mk.left\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\n⊢ f ≫ 𝟙 (⊥_ C) = 𝟙 A ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\ncase w.h.mk.right\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\n⊢ f ≫ 𝟙 (⊥_ C) = 𝟙 A ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\n⊢ ∀ (j : Discrete WalkingPair),\n    IsPullback (NatTrans.app (BinaryCofan.mk (𝟙 A) (𝟙 A)).ι j) (NatTrans.app (mapPair f f) j) f\n      (NatTrans.app (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C))).ι j)\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\n⊢ IsPullback (NatTrans.app (BinaryCofan.mk (𝟙 A) (𝟙 A)).ι { as := WalkingPair.left })\n    (NatTrans.app (mapPair f f) { as := WalkingPair.left }) f\n    (NatTrans.app (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C))).ι { as := WalkingPair.left })\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.right\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\n⊢ IsPullback (NatTrans.app (BinaryCofan.mk (𝟙 A) (𝟙 A)).ι { as := WalkingPair.right })\n    (NatTrans.app (mapPair f f) { as := WalkingPair.right }) f\n    (NatTrans.app (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C))).ι { as := WalkingPair.right })\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.left\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\n⊢ IsPullback (𝟙 A) f f (𝟙 (⊥_ C))\n[PROOFSTEP]\nexact IsPullback.of_horiz_isIso ⟨(Category.id_comp _).trans (Category.comp_id _).symm⟩\n[GOAL]\ncase mk.right\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : HasInitial C\nH : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))\nA : C\nf : A ⟶ ⊥_ C\n⊢ IsPullback (𝟙 A) f f (𝟙 (⊥_ C))\n[PROOFSTEP]\nexact IsPullback.of_horiz_isIso ⟨(Category.id_comp _).trans (Category.comp_id _).symm⟩\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : FinitaryExtensive C\n⊢ IsIso (BinaryCofan.inr (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C))))\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\ninst✝ : FinitaryExtensive C\n⊢ IsIso (𝟙 (⊥_ C))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nX Y : C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasFiniteCoproducts C\nT : C\nHT : IsTerminal T\nc₀ : BinaryCofan T T\nhc₀ : IsColimit c₀\n⊢ FinitaryExtensive C ↔ IsVanKampenColimit c₀\n[PROOFSTEP]\nrefine' ⟨fun H => H.2 c₀ hc₀, fun H => _⟩\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nX Y : C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasFiniteCoproducts C\nT : C\nHT : IsTerminal T\nc₀ : BinaryCofan T T\nhc₀ : IsColimit c₀\nH : IsVanKampenColimit c₀\n⊢ FinitaryExtensive C\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase van_kampen'\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nX Y : C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasFiniteCoproducts C\nT : C\nHT : IsTerminal T\nc₀ : BinaryCofan T T\nhc₀ : IsColimit c₀\nH : IsVanKampenColimit c₀\n⊢ ∀ {X Y : C} (c : BinaryCofan X Y), IsColimit c → IsVanKampenColimit c\n[PROOFSTEP]\nsimp_rw [BinaryCofan.isVanKampen_iff] at H ⊢\n[GOAL]\ncase van_kampen'\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nX Y : C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasFiniteCoproducts C\nT : C\nHT : IsTerminal T\nc₀ : BinaryCofan T T\nhc₀ : IsColimit c₀\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ T) (αY : Y' ⟶ T) (f : c'.pt ⟶ c₀.pt),\n    αX ≫ BinaryCofan.inl c₀ = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c₀ = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c₀) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c₀))\n⊢ ∀ {X Y : C} (c : BinaryCofan X Y),\n    IsColimit c →\n      ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),\n        αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f →\n          αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f →\n            (Nonempty (IsColimit c') ↔\n              IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧\n                IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c))\n[PROOFSTEP]\nintro X Y c hc X' Y' c' αX αY f hX hY\n[GOAL]\ncase van_kampen'\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nX✝ Y✝ : C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasFiniteCoproducts C\nT : C\nHT : IsTerminal T\nc₀ : BinaryCofan T T\nhc₀ : IsColimit c₀\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ T) (αY : Y' ⟶ T) (f : c'.pt ⟶ c₀.pt),\n    αX ≫ BinaryCofan.inl c₀ = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c₀ = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c₀) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c₀))\nX Y : C\nc : BinaryCofan X Y\nhc : IsColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\n⊢ Nonempty (IsColimit c') ↔\n    IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nobtain ⟨d, hd, hd'⟩ := Limits.BinaryCofan.IsColimit.desc' hc (HT.from _ ≫ c₀.inl) (HT.from _ ≫ c₀.inr)\n[GOAL]\ncase van_kampen'.mk.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nX✝ Y✝ : C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasFiniteCoproducts C\nT : C\nHT : IsTerminal T\nc₀ : BinaryCofan T T\nhc₀ : IsColimit c₀\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ T) (αY : Y' ⟶ T) (f : c'.pt ⟶ c₀.pt),\n    αX ≫ BinaryCofan.inl c₀ = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c₀ = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c₀) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c₀))\nX Y : C\nc : BinaryCofan X Y\nhc : IsColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nd : c.pt ⟶ ((Functor.const (Discrete WalkingPair)).obj c₀.pt).obj { as := WalkingPair.left }\nhd : BinaryCofan.inl c ≫ d = IsTerminal.from HT X ≫ BinaryCofan.inl c₀\nhd' : BinaryCofan.inr c ≫ d = IsTerminal.from HT Y ≫ BinaryCofan.inr c₀\n⊢ Nonempty (IsColimit c') ↔\n    IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nrw [H c' (αX ≫ HT.from _) (αY ≫ HT.from _) (f ≫ d) (by rw [← reassoc_of% hX, hd, Category.assoc])\n    (by rw [← reassoc_of% hY, hd', Category.assoc])]\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nX✝ Y✝ : C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasFiniteCoproducts C\nT : C\nHT : IsTerminal T\nc₀ : BinaryCofan T T\nhc₀ : IsColimit c₀\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ T) (αY : Y' ⟶ T) (f : c'.pt ⟶ c₀.pt),\n    αX ≫ BinaryCofan.inl c₀ = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c₀ = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c₀) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c₀))\nX Y : C\nc : BinaryCofan X Y\nhc : IsColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nd : c.pt ⟶ ((Functor.const (Discrete WalkingPair)).obj c₀.pt).obj { as := WalkingPair.left }\nhd : BinaryCofan.inl c ≫ d = IsTerminal.from HT X ≫ BinaryCofan.inl c₀\nhd' : BinaryCofan.inr c ≫ d = IsTerminal.from HT Y ≫ BinaryCofan.inr c₀\n⊢ (αX ≫ IsTerminal.from HT X) ≫ BinaryCofan.inl c₀ = BinaryCofan.inl c' ≫ f ≫ d\n[PROOFSTEP]\nrw [← reassoc_of% hX, hd, Category.assoc]\n[GOAL]\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nX✝ Y✝ : C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasFiniteCoproducts C\nT : C\nHT : IsTerminal T\nc₀ : BinaryCofan T T\nhc₀ : IsColimit c₀\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ T) (αY : Y' ⟶ T) (f : c'.pt ⟶ c₀.pt),\n    αX ≫ BinaryCofan.inl c₀ = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c₀ = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c₀) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c₀))\nX Y : C\nc : BinaryCofan X Y\nhc : IsColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nd : c.pt ⟶ ((Functor.const (Discrete WalkingPair)).obj c₀.pt).obj { as := WalkingPair.left }\nhd : BinaryCofan.inl c ≫ d = IsTerminal.from HT X ≫ BinaryCofan.inl c₀\nhd' : BinaryCofan.inr c ≫ d = IsTerminal.from HT Y ≫ BinaryCofan.inr c₀\n⊢ (αY ≫ IsTerminal.from HT Y) ≫ BinaryCofan.inr c₀ = BinaryCofan.inr c' ≫ f ≫ d\n[PROOFSTEP]\nrw [← reassoc_of% hY, hd', Category.assoc]\n[GOAL]\ncase van_kampen'.mk.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nX✝ Y✝ : C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasFiniteCoproducts C\nT : C\nHT : IsTerminal T\nc₀ : BinaryCofan T T\nhc₀ : IsColimit c₀\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ T) (αY : Y' ⟶ T) (f : c'.pt ⟶ c₀.pt),\n    αX ≫ BinaryCofan.inl c₀ = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c₀ = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c₀) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c₀))\nX Y : C\nc : BinaryCofan X Y\nhc : IsColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nd : c.pt ⟶ ((Functor.const (Discrete WalkingPair)).obj c₀.pt).obj { as := WalkingPair.left }\nhd : BinaryCofan.inl c ≫ d = IsTerminal.from HT X ≫ BinaryCofan.inl c₀\nhd' : BinaryCofan.inr c ≫ d = IsTerminal.from HT Y ≫ BinaryCofan.inr c₀\n⊢ IsPullback (BinaryCofan.inl c') (αX ≫ IsTerminal.from HT X) (f ≫ d) (BinaryCofan.inl c₀) ∧\n      IsPullback (BinaryCofan.inr c') (αY ≫ IsTerminal.from HT Y) (f ≫ d) (BinaryCofan.inr c₀) ↔\n    IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nobtain ⟨hl, hr⟩ := (H c (HT.from _) (HT.from _) d hd.symm hd'.symm).mp ⟨hc⟩\n[GOAL]\ncase van_kampen'.mk.intro.intro\nJ : Type v'\ninst✝³ : Category.{u', v'} J\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nX✝ Y✝ : C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasFiniteCoproducts C\nT : C\nHT : IsTerminal T\nc₀ : BinaryCofan T T\nhc₀ : IsColimit c₀\nH :\n  ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ T) (αY : Y' ⟶ T) (f : c'.pt ⟶ c₀.pt),\n    αX ≫ BinaryCofan.inl c₀ = BinaryCofan.inl c' ≫ f →\n      αY ≫ BinaryCofan.inr c₀ = BinaryCofan.inr c' ≫ f →\n        (Nonempty (IsColimit c') ↔\n          IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c₀) ∧\n            IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c₀))\nX Y : C\nc : BinaryCofan X Y\nhc : IsColimit c\nX' Y' : C\nc' : BinaryCofan X' Y'\nαX : X' ⟶ X\nαY : Y' ⟶ Y\nf : c'.pt ⟶ c.pt\nhX : αX ≫ BinaryCofan.inl c = BinaryCofan.inl c' ≫ f\nhY : αY ≫ BinaryCofan.inr c = BinaryCofan.inr c' ≫ f\nd : c.pt ⟶ ((Functor.const (Discrete WalkingPair)).obj c₀.pt).obj { as := WalkingPair.left }\nhd : BinaryCofan.inl c ≫ d = IsTerminal.from HT X ≫ BinaryCofan.inl c₀\nhd' : BinaryCofan.inr c ≫ d = IsTerminal.from HT Y ≫ BinaryCofan.inr c₀\nhl : IsPullback (BinaryCofan.inl c) (IsTerminal.from HT X) d (BinaryCofan.inl c₀)\nhr : IsPullback (BinaryCofan.inr c) (IsTerminal.from HT Y) d (BinaryCofan.inr c₀)\n⊢ IsPullback (BinaryCofan.inl c') (αX ≫ IsTerminal.from HT X) (f ≫ d) (BinaryCofan.inl c₀) ∧\n      IsPullback (BinaryCofan.inr c') (αY ≫ IsTerminal.from HT Y) (f ≫ d) (BinaryCofan.inr c₀) ↔\n    IsPullback (BinaryCofan.inl c') αX f (BinaryCofan.inl c) ∧ IsPullback (BinaryCofan.inr c') αY f (BinaryCofan.inr c)\n[PROOFSTEP]\nrw [hl.paste_vert_iff hX.symm, hr.paste_vert_iff hY.symm]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n⊢ FinitaryExtensive (Type u)\n[PROOFSTEP]\nclassical\nrw [finitaryExtensive_iff_of_isTerminal (Type u) PUnit Types.isTerminalPunit _ (Types.binaryCoproductColimit _ _)]\napply\n  BinaryCofan.isVanKampen_mk _ _ (fun X Y => Types.binaryCoproductColimit X Y) _ fun f g =>\n    (Limits.Types.pullbackLimitCone f g).2\n· intros _ _ _ _ f hαX hαY\n  constructor\n  · refine' ⟨⟨hαX.symm⟩, ⟨PullbackCone.isLimitAux' _ _⟩⟩\n    intro s\n    have : ∀ x, ∃! y, s.fst x = Sum.inl y := by\n      intro x\n      cases' h : s.fst x with val val\n      · simp only [Types.binaryCoproductCocone_pt, Functor.const_obj_obj, Sum.inl.injEq, exists_unique_eq']\n      · apply_fun f at h \n        cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαY val : _).symm\n    delta ExistsUnique at this \n    choose l hl hl' using this\n    exact\n      ⟨l, (funext hl).symm, Types.isTerminalPunit.hom_ext _ _, fun {l'} h₁ _ =>\n        funext fun x => hl' x (l' x) (congr_fun h₁ x).symm⟩\n  · refine' ⟨⟨hαY.symm⟩, ⟨PullbackCone.isLimitAux' _ _⟩⟩\n    intro s\n    have : ∀ x, ∃! y, s.fst x = Sum.inr y := by\n      intro x\n      cases' h : s.fst x with val val\n      · apply_fun f at h \n        cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαX val : _).symm\n      · simp only [Types.binaryCoproductCocone_pt, Functor.const_obj_obj, Sum.inr.injEq, exists_unique_eq']\n    delta ExistsUnique at this \n    choose l hl hl' using this\n    exact\n      ⟨l, (funext hl).symm, Types.isTerminalPunit.hom_ext _ _, fun {l'} h₁ _ =>\n        funext fun x => hl' x (l' x) (congr_fun h₁ x).symm⟩\n· intro Z f\n  dsimp [Limits.Types.binaryCoproductCocone]\n  delta Types.PullbackObj\n  have : ∀ x, f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit :=\n    by\n    intro x\n    rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩)\n    exacts [Or.inl rfl, Or.inr rfl]\n  let eX : { p : Z × PUnit // f p.fst = Sum.inl p.snd } ≃ { x : Z // f x = Sum.inl PUnit.unit } :=\n    ⟨fun p => ⟨p.1.1, by convert p.2⟩, fun x => ⟨⟨_, _⟩, x.2⟩, fun _ => by ext; rfl, fun _ => by ext; rfl⟩\n  let eY : { p : Z × PUnit // f p.fst = Sum.inr p.snd } ≃ { x : Z // f x = Sum.inr PUnit.unit } :=\n    ⟨fun p => ⟨p.1.1, p.2.trans (congr_arg Sum.inr <| Subsingleton.elim _ _)⟩, fun x => ⟨⟨_, _⟩, x.2⟩, fun _ => by ext;\n      rfl, fun _ => by ext; rfl⟩\n  fapply BinaryCofan.isColimitMk\n  · exact fun s x => dite _ (fun h => s.inl <| eX.symm ⟨x, h⟩) fun h => s.inr <| eY.symm ⟨x, (this x).resolve_left h⟩\n  · intro s\n    ext ⟨⟨x, ⟨⟩⟩, _⟩\n    dsimp\n    split_ifs <;> rfl\n  · intro s\n    ext ⟨⟨x, ⟨⟩⟩, hx⟩\n    dsimp\n    split_ifs with h\n    · cases h.symm.trans hx\n    · rfl\n  · intro s m e₁ e₂\n    ext x\n    split_ifs\n    · rw [← e₁]\n      rfl\n    · rw [← e₂]\n      rfl\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n⊢ FinitaryExtensive (Type u)\n[PROOFSTEP]\nrw [finitaryExtensive_iff_of_isTerminal (Type u) PUnit Types.isTerminalPunit _ (Types.binaryCoproductColimit _ _)]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n⊢ IsVanKampenColimit (Types.binaryCoproductCocone PUnit PUnit)\n[PROOFSTEP]\napply\n  BinaryCofan.isVanKampen_mk _ _ (fun X Y => Types.binaryCoproductColimit X Y) _ fun f g =>\n    (Limits.Types.pullbackLimitCone f g).2\n[GOAL]\ncase h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n⊢ ∀ {X' Y' : Type u} (αX : X' ⟶ PUnit) (αY : Y' ⟶ PUnit)\n    (f : (Types.binaryCoproductCocone X' Y').pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt),\n    αX ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n        BinaryCofan.inl (Types.binaryCoproductCocone X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n          BinaryCofan.inr (Types.binaryCoproductCocone X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (Types.binaryCoproductCocone X' Y')) αX f\n            (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit)) ∧\n          IsPullback (BinaryCofan.inr (Types.binaryCoproductCocone X' Y')) αY f\n            (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))\n[PROOFSTEP]\nintros _ _ _ _ f hαX hαY\n[GOAL]\ncase h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\n⊢ IsPullback (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝ f\n      (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit)) ∧\n    IsPullback (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝ f\n      (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\n⊢ IsPullback (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝ f\n    (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))\n[PROOFSTEP]\nrefine' ⟨⟨hαX.symm⟩, ⟨PullbackCone.isLimitAux' _ _⟩⟩\n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\n⊢ (s : PullbackCone f (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) →\n    { l //\n      l ≫\n            PullbackCone.fst\n              (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                (_ :\n                  BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                    αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n          PullbackCone.fst s ∧\n        l ≫\n              PullbackCone.snd\n                (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                  (_ :\n                    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                      αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n            PullbackCone.snd s ∧\n          ∀\n            {m :\n              s.pt ⟶\n                (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                    (_ :\n                      BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                        αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))).pt},\n            m ≫\n                  PullbackCone.fst\n                    (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                      (_ :\n                        BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                          αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n                PullbackCone.fst s →\n              m ≫\n                    PullbackCone.snd\n                      (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                        (_ :\n                          BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                            αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n                  PullbackCone.snd s →\n                m = l }\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n              (_ :\n                BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                (_ :\n                  BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                    αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                  (_ :\n                    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                      αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                    (_ :\n                      BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                        αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                      (_ :\n                        BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                          αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\nhave : ∀ x, ∃! y, s.fst x = Sum.inl y := by\n  intro x\n  cases' h : s.fst x with val val\n  · simp only [Types.binaryCoproductCocone_pt, Functor.const_obj_obj, Sum.inl.injEq, exists_unique_eq']\n  · apply_fun f at h \n    cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαY val : _).symm\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))\n⊢ ∀ (x : s.pt), ∃! y, PullbackCone.fst s x = Sum.inl y\n[PROOFSTEP]\nintro x\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))\nx : s.pt\n⊢ ∃! y, PullbackCone.fst s x = Sum.inl y\n[PROOFSTEP]\ncases' h : s.fst x with val val\n[GOAL]\ncase inl\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))\nx : s.pt\nval : X'✝\nh : PullbackCone.fst s x = Sum.inl val\n⊢ ∃! y, Sum.inl val = Sum.inl y\n[PROOFSTEP]\nsimp only [Types.binaryCoproductCocone_pt, Functor.const_obj_obj, Sum.inl.injEq, exists_unique_eq']\n[GOAL]\ncase inr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))\nx : s.pt\nval : Y'✝\nh : PullbackCone.fst s x = Sum.inr val\n⊢ ∃! y, Sum.inr val = Sum.inl y\n[PROOFSTEP]\napply_fun f at h \n[GOAL]\ncase inr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))\nx : s.pt\nval : Y'✝\nh : f (PullbackCone.fst s x) = f (Sum.inr val)\n⊢ ∃! y, Sum.inr val = Sum.inl y\n[PROOFSTEP]\ncases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαY val : _).symm\n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))\nthis : ∀ (x : s.pt), ∃! y, PullbackCone.fst s x = Sum.inl y\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n              (_ :\n                BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                (_ :\n                  BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                    αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                  (_ :\n                    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                      αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                    (_ :\n                      BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                        αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                      (_ :\n                        BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                          αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\ndelta ExistsUnique at this \n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))\nthis :\n  ∀ (x : s.pt),\n    ∃ x_1,\n      (fun y => PullbackCone.fst s x = Sum.inl y) x_1 ∧\n        ∀ (y : X'✝), (fun y => PullbackCone.fst s x = Sum.inl y) y → y = x_1\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n              (_ :\n                BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                (_ :\n                  BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                    αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                  (_ :\n                    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                      αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                    (_ :\n                      BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                        αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                      (_ :\n                        BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                          αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\nchoose l hl hl' using this\n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))\nl : s.pt → X'✝\nhl : ∀ (x : s.pt), (fun y => PullbackCone.fst s x = Sum.inl y) (l x)\nhl' : ∀ (x : s.pt) (y : X'✝), (fun y => PullbackCone.fst s x = Sum.inl y) y → y = l x\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n              (_ :\n                BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                (_ :\n                  BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                    αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                  (_ :\n                    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                      αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                    (_ :\n                      BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                        αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝)) αX✝\n                      (_ :\n                        BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                          αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\nexact\n  ⟨l, (funext hl).symm, Types.isTerminalPunit.hom_ext _ _, fun {l'} h₁ _ =>\n    funext fun x => hl' x (l' x) (congr_fun h₁ x).symm⟩\n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\n⊢ IsPullback (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝ f\n    (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))\n[PROOFSTEP]\nrefine' ⟨⟨hαY.symm⟩, ⟨PullbackCone.isLimitAux' _ _⟩⟩\n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\n⊢ (s : PullbackCone f (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) →\n    { l //\n      l ≫\n            PullbackCone.fst\n              (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                (_ :\n                  BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                    αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n          PullbackCone.fst s ∧\n        l ≫\n              PullbackCone.snd\n                (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                  (_ :\n                    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                      αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n            PullbackCone.snd s ∧\n          ∀\n            {m :\n              s.pt ⟶\n                (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                    (_ :\n                      BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                        αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))).pt},\n            m ≫\n                  PullbackCone.fst\n                    (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                      (_ :\n                        BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                          αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n                PullbackCone.fst s →\n              m ≫\n                    PullbackCone.snd\n                      (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                        (_ :\n                          BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                            αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n                  PullbackCone.snd s →\n                m = l }\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n              (_ :\n                BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                (_ :\n                  BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                    αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                  (_ :\n                    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                      αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                    (_ :\n                      BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                        αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                      (_ :\n                        BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                          αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\nhave : ∀ x, ∃! y, s.fst x = Sum.inr y := by\n  intro x\n  cases' h : s.fst x with val val\n  · apply_fun f at h \n    cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαX val : _).symm\n  · simp only [Types.binaryCoproductCocone_pt, Functor.const_obj_obj, Sum.inr.injEq, exists_unique_eq']\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))\n⊢ ∀ (x : s.pt), ∃! y, PullbackCone.fst s x = Sum.inr y\n[PROOFSTEP]\nintro x\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))\nx : s.pt\n⊢ ∃! y, PullbackCone.fst s x = Sum.inr y\n[PROOFSTEP]\ncases' h : s.fst x with val val\n[GOAL]\ncase inl\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))\nx : s.pt\nval : X'✝\nh : PullbackCone.fst s x = Sum.inl val\n⊢ ∃! y, Sum.inl val = Sum.inr y\n[PROOFSTEP]\napply_fun f at h \n[GOAL]\ncase inl\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))\nx : s.pt\nval : X'✝\nh : f (PullbackCone.fst s x) = f (Sum.inl val)\n⊢ ∃! y, Sum.inl val = Sum.inr y\n[PROOFSTEP]\ncases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαX val : _).symm\n[GOAL]\ncase inr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))\nx : s.pt\nval : Y'✝\nh : PullbackCone.fst s x = Sum.inr val\n⊢ ∃! y, Sum.inr val = Sum.inr y\n[PROOFSTEP]\nsimp only [Types.binaryCoproductCocone_pt, Functor.const_obj_obj, Sum.inr.injEq, exists_unique_eq']\n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))\nthis : ∀ (x : s.pt), ∃! y, PullbackCone.fst s x = Sum.inr y\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n              (_ :\n                BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                (_ :\n                  BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                    αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                  (_ :\n                    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                      αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                    (_ :\n                      BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                        αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                      (_ :\n                        BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                          αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\ndelta ExistsUnique at this \n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))\nthis :\n  ∀ (x : s.pt),\n    ∃ x_1,\n      (fun y => PullbackCone.fst s x = Sum.inr y) x_1 ∧\n        ∀ (y : Y'✝), (fun y => PullbackCone.fst s x = Sum.inr y) y → y = x_1\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n              (_ :\n                BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                (_ :\n                  BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                    αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                  (_ :\n                    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                      αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                    (_ :\n                      BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                        αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                      (_ :\n                        BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                          αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\nchoose l hl hl' using this\n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX'✝ Y'✝ : Type u\nαX✝ : X'✝ ⟶ PUnit\nαY✝ : Y'✝ ⟶ PUnit\nf : (Types.binaryCoproductCocone X'✝ Y'✝).pt ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nhαX :\n  αX✝ ≫ BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inl (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\nhαY :\n  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit) =\n    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f\ns : PullbackCone f (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))\nl : s.pt → Y'✝\nhl : ∀ (x : s.pt), (fun y => PullbackCone.fst s x = Sum.inr y) (l x)\nhl' : ∀ (x : s.pt) (y : Y'✝), (fun y => PullbackCone.fst s x = Sum.inr y) y → y = l x\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n              (_ :\n                BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                  αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                (_ :\n                  BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                    αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                  (_ :\n                    BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                      αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                    (_ :\n                      BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                        αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝)) αY✝\n                      (_ :\n                        BinaryCofan.inr (Types.binaryCoproductCocone X'✝ Y'✝) ≫ f =\n                          αY✝ ≫ BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\nexact\n  ⟨l, (funext hl).symm, Types.isTerminalPunit.hom_ext _ _, fun {l'} h₁ _ =>\n    funext fun x => hl' x (l' x) (congr_fun h₁ x).symm⟩\n[GOAL]\ncase h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n⊢ {Z : Type u} →\n    (f : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt) →\n      IsColimit\n        (BinaryCofan.mk\n          (PullbackCone.fst\n            (Types.pullbackLimitCone f (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))).cone)\n          (PullbackCone.fst\n            (Types.pullbackLimitCone f (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))).cone))\n[PROOFSTEP]\nintro Z f\n[GOAL]\ncase h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\n⊢ IsColimit\n    (BinaryCofan.mk\n      (PullbackCone.fst (Types.pullbackLimitCone f (BinaryCofan.inl (Types.binaryCoproductCocone PUnit PUnit))).cone)\n      (PullbackCone.fst (Types.pullbackLimitCone f (BinaryCofan.inr (Types.binaryCoproductCocone PUnit PUnit))).cone))\n[PROOFSTEP]\ndsimp [Limits.Types.binaryCoproductCocone]\n[GOAL]\ncase h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\n⊢ IsColimit (BinaryCofan.mk (fun p => (↑p).fst) fun p => (↑p).fst)\n[PROOFSTEP]\ndelta Types.PullbackObj\n[GOAL]\ncase h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\n⊢ IsColimit (BinaryCofan.mk (fun p => (↑p).fst) fun p => (↑p).fst)\n[PROOFSTEP]\nhave : ∀ x, f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit :=\n  by\n  intro x\n  rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩)\n  exacts [Or.inl rfl, Or.inr rfl]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\n⊢ ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\n[PROOFSTEP]\nintro x\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nx : Z\n⊢ f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\n[PROOFSTEP]\nrcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩)\n[GOAL]\ncase inl.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nx : Z\n⊢ Sum.inl PUnit.unit = Sum.inl PUnit.unit ∨ Sum.inl PUnit.unit = Sum.inr PUnit.unit\ncase inr.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nx : Z\n⊢ Sum.inr PUnit.unit = Sum.inl PUnit.unit ∨ Sum.inr PUnit.unit = Sum.inr PUnit.unit\n[PROOFSTEP]\nexacts [Or.inl rfl, Or.inr rfl]\n[GOAL]\ncase h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\n⊢ IsColimit (BinaryCofan.mk (fun p => (↑p).fst) fun p => (↑p).fst)\n[PROOFSTEP]\nlet eX : { p : Z × PUnit // f p.fst = Sum.inl p.snd } ≃ { x : Z // f x = Sum.inl PUnit.unit } :=\n  ⟨fun p => ⟨p.1.1, by convert p.2⟩, fun x => ⟨⟨_, _⟩, x.2⟩, fun _ => by ext; rfl, fun _ => by ext; rfl⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\np : { p // f p.fst = Sum.inl p.snd }\n⊢ f (↑p).fst = Sum.inl PUnit.unit\n[PROOFSTEP]\nconvert p.2\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\nx✝ : { p // f p.fst = Sum.inl p.snd }\n⊢ (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n      ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\nx✝ : { p // f p.fst = Sum.inl p.snd }\n⊢ (↑((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n          ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x✝))).fst =\n    (↑x✝).fst\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\nx✝ : { x // f x = Sum.inl PUnit.unit }\n⊢ (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n      ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\nx✝ : { x // f x = Sum.inl PUnit.unit }\n⊢ ↑((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n        ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x✝)) =\n    ↑x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\n⊢ IsColimit (BinaryCofan.mk (fun p => (↑p).fst) fun p => (↑p).fst)\n[PROOFSTEP]\nlet eY : { p : Z × PUnit // f p.fst = Sum.inr p.snd } ≃ { x : Z // f x = Sum.inr PUnit.unit } :=\n  ⟨fun p => ⟨p.1.1, p.2.trans (congr_arg Sum.inr <| Subsingleton.elim _ _)⟩, fun x => ⟨⟨_, _⟩, x.2⟩, fun _ => by ext;\n    rfl, fun _ => by ext; rfl⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\nx✝ : { p // f p.fst = Sum.inr p.snd }\n⊢ (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n      ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\nx✝ : { p // f p.fst = Sum.inr p.snd }\n⊢ (↑((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n          ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x✝))).fst =\n    (↑x✝).fst\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\nx✝ : { x // f x = Sum.inr PUnit.unit }\n⊢ (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n      ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\nx✝ : { x // f x = Sum.inr PUnit.unit }\n⊢ ↑((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n        ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x✝)) =\n    ↑x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ IsColimit (BinaryCofan.mk (fun p => (↑p).fst) fun p => (↑p).fst)\n[PROOFSTEP]\nfapply BinaryCofan.isColimitMk\n[GOAL]\ncase h₂.desc\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ (s : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }) → Z ⟶ s.pt\n[PROOFSTEP]\nexact fun s x => dite _ (fun h => s.inl <| eX.symm ⟨x, h⟩) fun h => s.inr <| eY.symm ⟨x, (this x).resolve_left h⟩\n[GOAL]\ncase h₂.fac_left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ ∀ (s : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }),\n    ((fun p => (↑p).fst) ≫ fun x =>\n        if h : f x = Sum.inl PUnit.unit then BinaryCofan.inl s (↑eX.symm { val := x, property := h })\n        else BinaryCofan.inr s (↑eY.symm { val := x, property := (_ : f x = Sum.inr PUnit.unit) })) =\n      BinaryCofan.inl s\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h₂.fac_left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\n⊢ ((fun p => (↑p).fst) ≫ fun x =>\n      if h : f x = Sum.inl PUnit.unit then BinaryCofan.inl s (↑eX.symm { val := x, property := h })\n      else BinaryCofan.inr s (↑eY.symm { val := x, property := (_ : f x = Sum.inr PUnit.unit) })) =\n    BinaryCofan.inl s\n[PROOFSTEP]\next ⟨⟨x, ⟨⟩⟩, _⟩\n[GOAL]\ncase h₂.fac_left.h.mk.mk.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nx : Z\nproperty✝ : f (x, PUnit.unit).fst = Sum.inl (x, PUnit.unit).snd\n⊢ ((fun p => (↑p).fst) ≫ fun x =>\n        if h : f x = Sum.inl PUnit.unit then BinaryCofan.inl s (↑eX.symm { val := x, property := h })\n        else BinaryCofan.inr s (↑eY.symm { val := x, property := (_ : f x = Sum.inr PUnit.unit) }))\n      { val := (x, PUnit.unit), property := property✝ } =\n    BinaryCofan.inl s { val := (x, PUnit.unit), property := property✝ }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₂.fac_left.h.mk.mk.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nx : Z\nproperty✝ : f (x, PUnit.unit).fst = Sum.inl (x, PUnit.unit).snd\n⊢ (if h : f x = Sum.inl PUnit.unit then\n      BinaryCofan.inl s { val := ({ val := x, property := h }.1, PUnit.unit), property := h }\n    else\n      BinaryCofan.inr s\n        { val := ({ val := x, property := (_ : f x = Sum.inr PUnit.unit) }.1, PUnit.unit),\n          property := (_ : f x = Sum.inr PUnit.unit) }) =\n    BinaryCofan.inl s { val := (x, PUnit.unit), property := property✝ }\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nx : Z\nproperty✝ : f (x, PUnit.unit).fst = Sum.inl (x, PUnit.unit).snd\nh✝ : f x = Sum.inl PUnit.unit\n⊢ BinaryCofan.inl s { val := (x, PUnit.unit), property := (_ : f x = Sum.inl PUnit.unit) } =\n    BinaryCofan.inl s { val := (x, PUnit.unit), property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nx : Z\nproperty✝ : f (x, PUnit.unit).fst = Sum.inl (x, PUnit.unit).snd\nh✝ : ¬f x = Sum.inl PUnit.unit\n⊢ BinaryCofan.inl s { val := (x, PUnit.unit), property := (_ : f x = Sum.inl PUnit.unit) } =\n    BinaryCofan.inl s { val := (x, PUnit.unit), property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂.fac_right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ ∀ (s : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }),\n    ((fun p => (↑p).fst) ≫ fun x =>\n        if h : f x = Sum.inl PUnit.unit then BinaryCofan.inl s (↑eX.symm { val := x, property := h })\n        else BinaryCofan.inr s (↑eY.symm { val := x, property := (_ : f x = Sum.inr PUnit.unit) })) =\n      BinaryCofan.inr s\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h₂.fac_right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\n⊢ ((fun p => (↑p).fst) ≫ fun x =>\n      if h : f x = Sum.inl PUnit.unit then BinaryCofan.inl s (↑eX.symm { val := x, property := h })\n      else BinaryCofan.inr s (↑eY.symm { val := x, property := (_ : f x = Sum.inr PUnit.unit) })) =\n    BinaryCofan.inr s\n[PROOFSTEP]\next ⟨⟨x, ⟨⟩⟩, hx⟩\n[GOAL]\ncase h₂.fac_right.h.mk.mk.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nx : Z\nhx : f (x, PUnit.unit).fst = Sum.inr (x, PUnit.unit).snd\n⊢ ((fun p => (↑p).fst) ≫ fun x =>\n        if h : f x = Sum.inl PUnit.unit then BinaryCofan.inl s (↑eX.symm { val := x, property := h })\n        else BinaryCofan.inr s (↑eY.symm { val := x, property := (_ : f x = Sum.inr PUnit.unit) }))\n      { val := (x, PUnit.unit), property := hx } =\n    BinaryCofan.inr s { val := (x, PUnit.unit), property := hx }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₂.fac_right.h.mk.mk.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nx : Z\nhx : f (x, PUnit.unit).fst = Sum.inr (x, PUnit.unit).snd\n⊢ (if h : f x = Sum.inl PUnit.unit then\n      BinaryCofan.inl s { val := ({ val := x, property := h }.1, PUnit.unit), property := h }\n    else\n      BinaryCofan.inr s\n        { val := ({ val := x, property := (_ : f x = Sum.inr PUnit.unit) }.1, PUnit.unit),\n          property := (_ : f x = Sum.inr PUnit.unit) }) =\n    BinaryCofan.inr s { val := (x, PUnit.unit), property := hx }\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nx : Z\nhx : f (x, PUnit.unit).fst = Sum.inr (x, PUnit.unit).snd\nh : f x = Sum.inl PUnit.unit\n⊢ BinaryCofan.inl s { val := (x, PUnit.unit), property := (_ : f x = Sum.inl PUnit.unit) } =\n    BinaryCofan.inr s { val := (x, PUnit.unit), property := hx }\n[PROOFSTEP]\ncases h.symm.trans hx\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nx : Z\nhx : f (x, PUnit.unit).fst = Sum.inr (x, PUnit.unit).snd\nh : ¬f x = Sum.inl PUnit.unit\n⊢ BinaryCofan.inr s { val := (x, PUnit.unit), property := (_ : f x = Sum.inr PUnit.unit) } =\n    BinaryCofan.inr s { val := (x, PUnit.unit), property := hx }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂.uniq\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ ∀ (s : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }) (m : Z ⟶ s.pt),\n    (fun p => (↑p).fst) ≫ m = BinaryCofan.inl s →\n      (fun p => (↑p).fst) ≫ m = BinaryCofan.inr s →\n        m = fun x =>\n          if h : f x = Sum.inl PUnit.unit then BinaryCofan.inl s (↑eX.symm { val := x, property := h })\n          else BinaryCofan.inr s (↑eY.symm { val := x, property := (_ : f x = Sum.inr PUnit.unit) })\n[PROOFSTEP]\nintro s m e₁ e₂\n[GOAL]\ncase h₂.uniq\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nm : Z ⟶ s.pt\ne₁ : (fun p => (↑p).fst) ≫ m = BinaryCofan.inl s\ne₂ : (fun p => (↑p).fst) ≫ m = BinaryCofan.inr s\n⊢ m = fun x =>\n    if h : f x = Sum.inl PUnit.unit then BinaryCofan.inl s (↑eX.symm { val := x, property := h })\n    else BinaryCofan.inr s (↑eY.symm { val := x, property := (_ : f x = Sum.inr PUnit.unit) })\n[PROOFSTEP]\next x\n[GOAL]\ncase h₂.uniq.h\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nm : Z ⟶ s.pt\ne₁ : (fun p => (↑p).fst) ≫ m = BinaryCofan.inl s\ne₂ : (fun p => (↑p).fst) ≫ m = BinaryCofan.inr s\nx : Z\n⊢ m x =\n    if h : f x = Sum.inl PUnit.unit then BinaryCofan.inl s (↑eX.symm { val := x, property := h })\n    else BinaryCofan.inr s (↑eY.symm { val := x, property := (_ : f x = Sum.inr PUnit.unit) })\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nm : Z ⟶ s.pt\ne₁ : (fun p => (↑p).fst) ≫ m = BinaryCofan.inl s\ne₂ : (fun p => (↑p).fst) ≫ m = BinaryCofan.inr s\nx : Z\nh✝ : f x = Sum.inl PUnit.unit\n⊢ m x = BinaryCofan.inl s (↑eX.symm { val := x, property := h✝ })\n[PROOFSTEP]\nrw [← e₁]\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nm : Z ⟶ s.pt\ne₁ : (fun p => (↑p).fst) ≫ m = BinaryCofan.inl s\ne₂ : (fun p => (↑p).fst) ≫ m = BinaryCofan.inr s\nx : Z\nh✝ : f x = Sum.inl PUnit.unit\n⊢ m x = ((fun p => (↑p).fst) ≫ m) (↑eX.symm { val := x, property := h✝ })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nm : Z ⟶ s.pt\ne₁ : (fun p => (↑p).fst) ≫ m = BinaryCofan.inl s\ne₂ : (fun p => (↑p).fst) ≫ m = BinaryCofan.inr s\nx : Z\nh✝ : ¬f x = Sum.inl PUnit.unit\n⊢ m x = BinaryCofan.inr s (↑eY.symm { val := x, property := (_ : f x = Sum.inr PUnit.unit) })\n[PROOFSTEP]\nrw [← e₂]\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : Type u\nf : Z ⟶ (Types.binaryCoproductCocone PUnit PUnit).pt\nthis : ∀ (x : Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit\neX : { p // f p.fst = Sum.inl p.snd } ≃ { x // f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // f p.fst = Sum.inr p.snd } ≃ { x // f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns : BinaryCofan { p // f p.fst = Sum.inl p.snd } { p // f p.fst = Sum.inr p.snd }\nm : Z ⟶ s.pt\ne₁ : (fun p => (↑p).fst) ≫ m = BinaryCofan.inl s\ne₂ : (fun p => (↑p).fst) ≫ m = BinaryCofan.inr s\nx : Z\nh✝ : ¬f x = Sum.inl PUnit.unit\n⊢ m x = ((fun p => (↑p).fst) ≫ m) (↑eY.symm { val := x, property := (_ : f x = Sum.inr PUnit.unit) })\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\n⊢ IsColimit\n    (BinaryCofan.mk (TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n      (TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))))\n[PROOFSTEP]\nhave : ∀ x, f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit :=\n  by\n  intro x\n  rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩)\n  exacts [Or.inl rfl, Or.inr rfl]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\n⊢ ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\n[PROOFSTEP]\nintro x\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nx : (forget TopCat).obj Z\n⊢ ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\n[PROOFSTEP]\nrcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩)\n[GOAL]\ncase inl.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nx : (forget TopCat).obj Z\n⊢ Sum.inl PUnit.unit = Sum.inl PUnit.unit ∨ Sum.inl PUnit.unit = Sum.inr PUnit.unit\ncase inr.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nx : (forget TopCat).obj Z\n⊢ Sum.inr PUnit.unit = Sum.inl PUnit.unit ∨ Sum.inr PUnit.unit = Sum.inr PUnit.unit\n[PROOFSTEP]\nexacts [Or.inl rfl, Or.inr rfl]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\n⊢ IsColimit\n    (BinaryCofan.mk (TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n      (TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))))\n[PROOFSTEP]\nletI eX : { p : Z × PUnit // f p.fst = Sum.inl p.snd } ≃ { x : Z // f x = Sum.inl PUnit.unit } :=\n  ⟨fun p => ⟨p.1.1, p.2.trans (congr_arg Sum.inl <| Subsingleton.elim _ _)⟩, fun x => ⟨⟨_, PUnit.unit⟩, x.2⟩, fun _ =>\n    by ext; rfl, fun _ => by ext; rfl⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\nx✝ : { p // ↑f p.fst = Sum.inl p.snd }\n⊢ (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n      ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\nx✝ : { p // ↑f p.fst = Sum.inl p.snd }\n⊢ (↑((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n          ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x✝))).fst =\n    (↑x✝).fst\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\nx✝ : { x // ↑f x = Sum.inl PUnit.unit }\n⊢ (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n      ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\nx✝ : { x // ↑f x = Sum.inl PUnit.unit }\n⊢ ↑((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n        ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x✝)) =\n    ↑x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\n⊢ IsColimit\n    (BinaryCofan.mk (TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n      (TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))))\n[PROOFSTEP]\nletI eY : { p : Z × PUnit // f p.fst = Sum.inr p.snd } ≃ { x : Z // f x = Sum.inr PUnit.unit } :=\n  ⟨fun p => ⟨p.1.1, p.2.trans (congr_arg Sum.inr <| Subsingleton.elim _ _)⟩, fun x => ⟨⟨_, PUnit.unit⟩, x.2⟩, fun _ =>\n    by ext; rfl, fun _ => by ext; rfl⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\nx✝ : { p // ↑f p.fst = Sum.inr p.snd }\n⊢ (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n      ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a.h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\nx✝ : { p // ↑f p.fst = Sum.inr p.snd }\n⊢ (↑((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n          ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x✝))).fst =\n    (↑x✝).fst\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\nx✝ : { x // ↑f x = Sum.inr PUnit.unit }\n⊢ (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n      ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\nx✝ : { x // ↑f x = Sum.inr PUnit.unit }\n⊢ ↑((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n        ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x✝)) =\n    ↑x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ IsColimit\n    (BinaryCofan.mk (TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n      (TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))))\n[PROOFSTEP]\nfapply BinaryCofan.isColimitMk\n[GOAL]\ncase desc\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ (s :\n      BinaryCofan\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })) →\n    Z ⟶ s.pt\ncase fac_left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ ∀\n    (s :\n      BinaryCofan\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })),\n    TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ ?desc s =\n      BinaryCofan.inl s\ncase fac_right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ ∀\n    (s :\n      BinaryCofan\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })),\n    TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ ?desc s =\n      BinaryCofan.inr s\ncase uniq\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ ∀\n    (s :\n      BinaryCofan\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd }))\n    (m : Z ⟶ s.pt),\n    TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n        BinaryCofan.inl s →\n      TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n          BinaryCofan.inr s →\n        m = ?desc s\n[PROOFSTEP]\nclassical\n  -- Porting note: Added\n· refine' fun s =>\n    ⟨fun x => dite _ (fun h => s.inl <| eX.symm ⟨x, h⟩) fun h => s.inr <| eY.symm ⟨x, (this x).resolve_left h⟩, _⟩\n  rw [continuous_iff_continuousAt]\n  intro x\n  by_cases f x = Sum.inl PUnit.unit\n  · revert h x\n    apply (IsOpen.continuousOn_iff _).mp\n    · rw [continuousOn_iff_continuous_restrict]\n      convert_to Continuous fun x : {x | f x = Sum.inl PUnit.unit} => s.inl ⟨(x.1, PUnit.unit), x.2⟩\n      · ext ⟨x, hx⟩\n        exact dif_pos hx\n      have := (BinaryCofan.inl s).2\n      continuity\n    · convert f.2.1 _ openEmbedding_inl.open_range\n      rename_i x\n      exact ⟨fun h => ⟨_, h.symm⟩, fun ⟨e, h⟩ => h.symm.trans (congr_arg Sum.inl <| Subsingleton.elim _ _)⟩\n  · revert h x\n    apply (IsOpen.continuousOn_iff _).mp\n    · rw [continuousOn_iff_continuous_restrict]\n      convert_to\n        Continuous fun x : {x | f x ≠ Sum.inl PUnit.unit} => s.inr ⟨(x.1, PUnit.unit), (this _).resolve_left x.2⟩\n      · ext ⟨x, hx⟩\n        exact dif_neg hx\n      have := (BinaryCofan.inr s).2\n      continuity\n    · convert f.2.1 _ openEmbedding_inr.open_range\n      rename_i x\n      change f x ≠ Sum.inl PUnit.unit ↔ f x ∈ Set.range Sum.inr\n      trans f x = Sum.inr PUnit.unit\n      · rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩) <;> simp only [iff_self_iff, eq_self_iff_true, not_true, Ne.def, not_false_iff]\n      · exact ⟨fun h => ⟨_, h.symm⟩, fun ⟨e, h⟩ => h.symm.trans (congr_arg Sum.inr <| Subsingleton.elim _ _)⟩\n· intro s\n  ext ⟨⟨x, ⟨⟩⟩, (hx : f x = Sum.inl PUnit.unit)⟩\n  change dite _ _ _ = _\n  split_ifs with h\n  · rfl\n  ·\n    cases\n      (h hx)\n        -- Porting note : in Lean3 it is `rfl`\n· intro s\n  ext ⟨⟨x, ⟨⟩⟩, hx⟩\n  change dite _ _ _ = _\n  split_ifs with h\n  · cases h.symm.trans hx\n  · rfl\n· intro s m e₁ e₂\n  ext x\n  change m x = dite _ _ _\n  split_ifs\n  · rw [← e₁]\n    rfl\n  · rw [← e₂]\n    rfl\n[GOAL]\ncase desc\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ (s :\n      BinaryCofan\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })) →\n    Z ⟶ s.pt\n[PROOFSTEP]\nrefine' fun s =>\n  ⟨fun x => dite _ (fun h => s.inl <| eX.symm ⟨x, h⟩) fun h => s.inr <| eY.symm ⟨x, (this x).resolve_left h⟩, _⟩\n[GOAL]\ncase desc\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ Continuous fun x =>\n    if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n    else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) })\n[PROOFSTEP]\nrw [continuous_iff_continuousAt]\n[GOAL]\ncase desc\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ ∀ (x : ↑Z),\n    ContinuousAt\n      (fun x =>\n        if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n        else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n      x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase desc\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\n⊢ ContinuousAt\n    (fun x =>\n      if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n      else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n    x\n[PROOFSTEP]\nby_cases f x = Sum.inl PUnit.unit\n[GOAL]\ncase desc\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\n⊢ ContinuousAt\n    (fun x =>\n      if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n      else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n    x\n[PROOFSTEP]\nby_cases f x = Sum.inl PUnit.unit\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\nh : ↑f x = Sum.inl PUnit.unit\n⊢ ContinuousAt\n    (fun x =>\n      if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n      else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n    x\n[PROOFSTEP]\nrevert h x\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ ∀ (x : ↑Z),\n    ↑f x = Sum.inl PUnit.unit →\n      ContinuousAt\n        (fun x =>\n          if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n          else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n        x\n[PROOFSTEP]\napply (IsOpen.continuousOn_iff _).mp\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ ContinuousOn\n    (fun x =>\n      if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n      else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n    fun a => ↑f a = Sum.inl PUnit.unit\n[PROOFSTEP]\nrw [continuousOn_iff_continuous_restrict]\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ Continuous\n    (Set.restrict (fun a => ↑f a = Sum.inl PUnit.unit) fun x =>\n      if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n      else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n[PROOFSTEP]\nconvert_to Continuous fun x : {x | f x = Sum.inl PUnit.unit} => s.inl ⟨(x.1, PUnit.unit), x.2⟩\n[GOAL]\ncase h.e'_5.h\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\ne_1✝ : (↑fun a => ↑f a = Sum.inl PUnit.unit) = ↑{x | ↑f x = Sum.inl PUnit.unit}\ne_2✝ : ↑s.pt = (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj s.pt).obj { as := WalkingPair.left })\n⊢ (Set.restrict (fun a => ↑f a = Sum.inl PUnit.unit) fun x =>\n      if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n      else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) })) =\n    fun x => ↑(BinaryCofan.inl s) { val := (↑x, PUnit.unit), property := (_ : ↑x ∈ {x | ↑f x = Sum.inl PUnit.unit}) }\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase h.e'_5.h.h.mk\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\ne_1✝ : (↑fun a => ↑f a = Sum.inl PUnit.unit) = ↑{x | ↑f x = Sum.inl PUnit.unit}\ne_2✝ : ↑s.pt = (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj s.pt).obj { as := WalkingPair.left })\nx : ↑Z\nhx : x ∈ fun a => ↑f a = Sum.inl PUnit.unit\n⊢ Set.restrict (fun a => ↑f a = Sum.inl PUnit.unit)\n      (fun x =>\n        if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n        else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n      { val := x, property := hx } =\n    ↑(BinaryCofan.inl s)\n      { val := (↑{ val := x, property := hx }, PUnit.unit),\n        property := (_ : ↑{ val := x, property := hx } ∈ {x | ↑f x = Sum.inl PUnit.unit}) }\n[PROOFSTEP]\nexact dif_pos hx\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ Continuous fun x =>\n    ↑(BinaryCofan.inl s) { val := (↑x, PUnit.unit), property := (_ : ↑x ∈ {x | ↑f x = Sum.inl PUnit.unit}) }\n[PROOFSTEP]\nhave := (BinaryCofan.inl s).2\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis✝ : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nthis : Continuous (BinaryCofan.inl s).toFun\n⊢ Continuous fun x =>\n    ↑(BinaryCofan.inl s) { val := (↑x, PUnit.unit), property := (_ : ↑x ∈ {x | ↑f x = Sum.inl PUnit.unit}) }\n[PROOFSTEP]\ncontinuity\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ IsOpen fun a => ↑f a = Sum.inl PUnit.unit\n[PROOFSTEP]\nconvert f.2.1 _ openEmbedding_inl.open_range\n[GOAL]\ncase h.e'_3.h.a\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx✝ : ↑Z\n⊢ ↑f x✝ = Sum.inl PUnit.unit ↔ (f.toFun ⁻¹' Set.range Sum.inl) x✝\n[PROOFSTEP]\nrename_i x\n[GOAL]\ncase h.e'_3.h.a\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\n⊢ ↑f x = Sum.inl PUnit.unit ↔ (f.toFun ⁻¹' Set.range Sum.inl) x\n[PROOFSTEP]\nexact ⟨fun h => ⟨_, h.symm⟩, fun ⟨e, h⟩ => h.symm.trans (congr_arg Sum.inl <| Subsingleton.elim _ _)⟩\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\nh : ¬↑f x = Sum.inl PUnit.unit\n⊢ ContinuousAt\n    (fun x =>\n      if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n      else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n    x\n[PROOFSTEP]\nrevert h x\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ ∀ (x : ↑Z),\n    ¬↑f x = Sum.inl PUnit.unit →\n      ContinuousAt\n        (fun x =>\n          if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n          else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n        x\n[PROOFSTEP]\napply (IsOpen.continuousOn_iff _).mp\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ ContinuousOn\n    (fun x =>\n      if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n      else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n    fun a => ↑f a = Sum.inl PUnit.unit → False\n[PROOFSTEP]\nrw [continuousOn_iff_continuous_restrict]\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ Continuous\n    (Set.restrict (fun a => ↑f a = Sum.inl PUnit.unit → False) fun x =>\n      if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n      else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n[PROOFSTEP]\nconvert_to Continuous fun x : {x | f x ≠ Sum.inl PUnit.unit} => s.inr ⟨(x.1, PUnit.unit), (this _).resolve_left x.2⟩\n[GOAL]\ncase h.e'_5.h\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\ne_1✝ : (↑fun a => ↑f a = Sum.inl PUnit.unit → False) = ↑{x | ↑f x ≠ Sum.inl PUnit.unit}\ne_2✝ : ↑s.pt = (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj s.pt).obj { as := WalkingPair.right })\n⊢ (Set.restrict (fun a => ↑f a = Sum.inl PUnit.unit → False) fun x =>\n      if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n      else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) })) =\n    fun x =>\n    ↑(BinaryCofan.inr s) { val := (↑x, PUnit.unit), property := (_ : ↑f (↑x, PUnit.unit).fst = Sum.inr PUnit.unit) }\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase h.e'_5.h.h.mk\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\ne_1✝ : (↑fun a => ↑f a = Sum.inl PUnit.unit → False) = ↑{x | ↑f x ≠ Sum.inl PUnit.unit}\ne_2✝ : ↑s.pt = (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj s.pt).obj { as := WalkingPair.right })\nx : ↑Z\nhx : x ∈ fun a => ↑f a = Sum.inl PUnit.unit → False\n⊢ Set.restrict (fun a => ↑f a = Sum.inl PUnit.unit → False)\n      (fun x =>\n        if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n        else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n      { val := x, property := hx } =\n    ↑(BinaryCofan.inr s)\n      { val := (↑{ val := x, property := hx }, PUnit.unit),\n        property := (_ : ↑f (↑{ val := x, property := hx }, PUnit.unit).fst = Sum.inr PUnit.unit) }\n[PROOFSTEP]\nexact dif_neg hx\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ Continuous fun x =>\n    ↑(BinaryCofan.inr s) { val := (↑x, PUnit.unit), property := (_ : ↑f (↑x, PUnit.unit).fst = Sum.inr PUnit.unit) }\n[PROOFSTEP]\nhave := (BinaryCofan.inr s).2\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis✝ : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nthis : Continuous (BinaryCofan.inr s).toFun\n⊢ Continuous fun x =>\n    ↑(BinaryCofan.inr s) { val := (↑x, PUnit.unit), property := (_ : ↑f (↑x, PUnit.unit).fst = Sum.inr PUnit.unit) }\n[PROOFSTEP]\ncontinuity\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ IsOpen fun a => ↑f a = Sum.inl PUnit.unit → False\n[PROOFSTEP]\nconvert f.2.1 _ openEmbedding_inr.open_range\n[GOAL]\ncase h.e'_3.h.a\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx✝ : ↑Z\n⊢ ↑f x✝ = Sum.inl PUnit.unit → False ↔ (f.toFun ⁻¹' Set.range Sum.inr) x✝\n[PROOFSTEP]\nrename_i x\n[GOAL]\ncase h.e'_3.h.a\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\n⊢ ↑f x = Sum.inl PUnit.unit → False ↔ (f.toFun ⁻¹' Set.range Sum.inr) x\n[PROOFSTEP]\nchange f x ≠ Sum.inl PUnit.unit ↔ f x ∈ Set.range Sum.inr\n[GOAL]\ncase h.e'_3.h.a\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\n⊢ ↑f x ≠ Sum.inl PUnit.unit ↔ ↑f x ∈ Set.range Sum.inr\n[PROOFSTEP]\ntrans f x = Sum.inr PUnit.unit\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\n⊢ ↑f x ≠ Sum.inl PUnit.unit ↔ ↑f x = Sum.inr PUnit.unit\n[PROOFSTEP]\nrcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩)\n[GOAL]\ncase inl.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\n⊢ Sum.inl PUnit.unit ≠ Sum.inl PUnit.unit ↔ Sum.inl PUnit.unit = Sum.inr PUnit.unit\n[PROOFSTEP]\nsimp only [iff_self_iff, eq_self_iff_true, not_true, Ne.def, not_false_iff]\n[GOAL]\ncase inr.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\n⊢ Sum.inr PUnit.unit ≠ Sum.inl PUnit.unit ↔ Sum.inr PUnit.unit = Sum.inr PUnit.unit\n[PROOFSTEP]\nsimp only [iff_self_iff, eq_self_iff_true, not_true, Ne.def, not_false_iff]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\n⊢ ↑f x = Sum.inr PUnit.unit ↔ ↑f x ∈ Set.range Sum.inr\n[PROOFSTEP]\nexact ⟨fun h => ⟨_, h.symm⟩, fun ⟨e, h⟩ => h.symm.trans (congr_arg Sum.inr <| Subsingleton.elim _ _)⟩\n[GOAL]\ncase fac_left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ ∀\n    (s :\n      BinaryCofan\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })),\n    (TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫\n        ContinuousMap.mk fun x =>\n          if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n          else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) })) =\n      BinaryCofan.inl s\n[PROOFSTEP]\nintro s\n[GOAL]\ncase fac_left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ (TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫\n      ContinuousMap.mk fun x =>\n        if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n        else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) })) =\n    BinaryCofan.inl s\n[PROOFSTEP]\next ⟨⟨x, ⟨⟩⟩, (hx : f x = Sum.inl PUnit.unit)⟩\n[GOAL]\ncase fac_left.w.mk.mk.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\nhx : ↑f x = Sum.inl PUnit.unit\n⊢ ↑(TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫\n          ContinuousMap.mk fun x =>\n            if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n            else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n      { val := (x, PUnit.unit), property := hx } =\n    ↑(BinaryCofan.inl s) { val := (x, PUnit.unit), property := hx }\n[PROOFSTEP]\nchange dite _ _ _ = _\n[GOAL]\ncase fac_left.w.mk.mk.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\nhx : ↑f x = Sum.inl PUnit.unit\n⊢ (if h :\n        ↑f\n            (↑(TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n              { val := (x, PUnit.unit), property := hx }) =\n          Sum.inl PUnit.unit then\n      (fun h =>\n          ↑(BinaryCofan.inl s)\n            (↑eX.symm\n              {\n                val :=\n                  ↑(TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n                    { val := (x, PUnit.unit), property := hx },\n                property := h }))\n        h\n    else\n      (fun h =>\n          ↑(BinaryCofan.inr s)\n            (↑eY.symm\n              {\n                val :=\n                  ↑(TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n                    { val := (x, PUnit.unit), property := hx },\n                property :=\n                  (_ :\n                    ↑f\n                        (↑(TopCat.pullbackFst f\n                              (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n                          { val := (x, PUnit.unit), property := hx }) =\n                      Sum.inr PUnit.unit) }))\n        h) =\n    ↑(BinaryCofan.inl s) { val := (x, PUnit.unit), property := hx }\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\nhx : ↑f x = Sum.inl PUnit.unit\nh :\n  ↑f\n      (↑(TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n        { val := (x, PUnit.unit), property := hx }) =\n    Sum.inl PUnit.unit\n⊢ (fun h =>\n        ↑(BinaryCofan.inl s)\n          (↑eX.symm\n            {\n              val :=\n                ↑(TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n                  { val := (x, PUnit.unit), property := hx },\n              property := h }))\n      h =\n    ↑(BinaryCofan.inl s) { val := (x, PUnit.unit), property := hx }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\nhx : ↑f x = Sum.inl PUnit.unit\nh :\n  ¬↑f\n        (↑(TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n          { val := (x, PUnit.unit), property := hx }) =\n      Sum.inl PUnit.unit\n⊢ (fun h =>\n        ↑(BinaryCofan.inr s)\n          (↑eY.symm\n            {\n              val :=\n                ↑(TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n                  { val := (x, PUnit.unit), property := hx },\n              property :=\n                (_ :\n                  ↑f\n                      (↑(TopCat.pullbackFst f\n                            (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n                        { val := (x, PUnit.unit), property := hx }) =\n                    Sum.inr PUnit.unit) }))\n      h =\n    ↑(BinaryCofan.inl s) { val := (x, PUnit.unit), property := hx }\n[PROOFSTEP]\ncases\n  (h hx)\n    -- Porting note : in Lean3 it is `rfl`\n[GOAL]\ncase fac_right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ ∀\n    (s :\n      BinaryCofan\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })),\n    (TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫\n        ContinuousMap.mk fun x =>\n          if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n          else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) })) =\n      BinaryCofan.inr s\n[PROOFSTEP]\nintro s\n[GOAL]\ncase fac_right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n⊢ (TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫\n      ContinuousMap.mk fun x =>\n        if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n        else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) })) =\n    BinaryCofan.inr s\n[PROOFSTEP]\next ⟨⟨x, ⟨⟩⟩, hx⟩\n[GOAL]\ncase fac_right.w.mk.mk.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\nhx :\n  ↑f (x, PUnit.unit).fst =\n    ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) (x, PUnit.unit).snd\n⊢ ↑(TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫\n          ContinuousMap.mk fun x =>\n            if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n            else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n      { val := (x, PUnit.unit), property := hx } =\n    ↑(BinaryCofan.inr s) { val := (x, PUnit.unit), property := hx }\n[PROOFSTEP]\nchange dite _ _ _ = _\n[GOAL]\ncase fac_right.w.mk.mk.unit\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\nhx :\n  ↑f (x, PUnit.unit).fst =\n    ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) (x, PUnit.unit).snd\n⊢ (if h :\n        ↑f\n            (↑(TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n              { val := (x, PUnit.unit), property := hx }) =\n          Sum.inl PUnit.unit then\n      (fun h =>\n          ↑(BinaryCofan.inl s)\n            (↑eX.symm\n              {\n                val :=\n                  ↑(TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n                    { val := (x, PUnit.unit), property := hx },\n                property := h }))\n        h\n    else\n      (fun h =>\n          ↑(BinaryCofan.inr s)\n            (↑eY.symm\n              {\n                val :=\n                  ↑(TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n                    { val := (x, PUnit.unit), property := hx },\n                property :=\n                  (_ :\n                    ↑f\n                        (↑(TopCat.pullbackFst f\n                              (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n                          { val := (x, PUnit.unit), property := hx }) =\n                      Sum.inr PUnit.unit) }))\n        h) =\n    ↑(BinaryCofan.inr s) { val := (x, PUnit.unit), property := hx }\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\nhx :\n  ↑f (x, PUnit.unit).fst =\n    ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) (x, PUnit.unit).snd\nh :\n  ↑f\n      (↑(TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n        { val := (x, PUnit.unit), property := hx }) =\n    Sum.inl PUnit.unit\n⊢ (fun h =>\n        ↑(BinaryCofan.inl s)\n          (↑eX.symm\n            {\n              val :=\n                ↑(TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n                  { val := (x, PUnit.unit), property := hx },\n              property := h }))\n      h =\n    ↑(BinaryCofan.inr s) { val := (x, PUnit.unit), property := hx }\n[PROOFSTEP]\ncases h.symm.trans hx\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nx : ↑Z\nhx :\n  ↑f (x, PUnit.unit).fst =\n    ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) (x, PUnit.unit).snd\nh :\n  ¬↑f\n        (↑(TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n          { val := (x, PUnit.unit), property := hx }) =\n      Sum.inl PUnit.unit\n⊢ (fun h =>\n        ↑(BinaryCofan.inr s)\n          (↑eY.symm\n            {\n              val :=\n                ↑(TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n                  { val := (x, PUnit.unit), property := hx },\n              property :=\n                (_ :\n                  ↑f\n                      (↑(TopCat.pullbackFst f\n                            (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))\n                        { val := (x, PUnit.unit), property := hx }) =\n                    Sum.inr PUnit.unit) }))\n      h =\n    ↑(BinaryCofan.inr s) { val := (x, PUnit.unit), property := hx }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase uniq\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\n⊢ ∀\n    (s :\n      BinaryCofan\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n        (TopCat.of\n          { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd }))\n    (m : Z ⟶ s.pt),\n    TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n        BinaryCofan.inl s →\n      TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n          BinaryCofan.inr s →\n        m =\n          ContinuousMap.mk fun x =>\n            if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n            else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) })\n[PROOFSTEP]\nintro s m e₁ e₂\n[GOAL]\ncase uniq\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nm : Z ⟶ s.pt\ne₁ :\n  TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inl s\ne₂ :\n  TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inr s\n⊢ m =\n    ContinuousMap.mk fun x =>\n      if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n      else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) })\n[PROOFSTEP]\next x\n[GOAL]\ncase uniq.w\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nm : Z ⟶ s.pt\ne₁ :\n  TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inl s\ne₂ :\n  TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inr s\nx : (forget TopCat).obj Z\n⊢ ↑m x =\n    ↑(ContinuousMap.mk fun x =>\n          if h : ↑f x = Sum.inl PUnit.unit then ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })\n          else ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n      x\n[PROOFSTEP]\nchange m x = dite _ _ _\n[GOAL]\ncase uniq.w\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nm : Z ⟶ s.pt\ne₁ :\n  TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inl s\ne₂ :\n  TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inr s\nx : (forget TopCat).obj Z\n⊢ ↑m x =\n    if h : ↑f x = Sum.inl PUnit.unit then (fun h => ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })) h\n    else (fun h => ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) })) h\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nm : Z ⟶ s.pt\ne₁ :\n  TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inl s\ne₂ :\n  TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inr s\nx : (forget TopCat).obj Z\nh✝ : ↑f x = Sum.inl PUnit.unit\n⊢ ↑m x = (fun h => ↑(BinaryCofan.inl s) (↑eX.symm { val := x, property := h })) h✝\n[PROOFSTEP]\nrw [← e₁]\n[GOAL]\ncase pos\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nm : Z ⟶ s.pt\ne₁ :\n  TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inl s\ne₂ :\n  TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inr s\nx : (forget TopCat).obj Z\nh✝ : ↑f x = Sum.inl PUnit.unit\n⊢ ↑m x =\n    (fun h =>\n        ↑(TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m)\n          (↑eX.symm { val := x, property := h }))\n      h✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nm : Z ⟶ s.pt\ne₁ :\n  TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inl s\ne₂ :\n  TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inr s\nx : (forget TopCat).obj Z\nh✝ : ¬↑f x = Sum.inl PUnit.unit\n⊢ ↑m x = (fun h => ↑(BinaryCofan.inr s) (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) })) h✝\n[PROOFSTEP]\nrw [← e₂]\n[GOAL]\ncase neg\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ TopCat.of (PUnit ⊕ PUnit)\nthis : ∀ (x : (forget TopCat).obj Z), ↑f x = Sum.inl PUnit.unit ∨ ↑f x = Sum.inr PUnit.unit\neX : { p // ↑f p.fst = Sum.inl p.snd } ≃ { x // ↑f x = Sum.inl PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inl p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inl PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inl PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inl PUnit.unit) }) x) =\n            x) }\neY : { p // ↑f p.fst = Sum.inr p.snd } ≃ { x // ↑f x = Sum.inr PUnit.unit } :=\n  { toFun := fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) },\n    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) },\n    left_inv :=\n      (_ :\n        ∀ (x : { p // ↑f p.fst = Sum.inr p.snd }),\n          (fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) })\n              ((fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) }) x) =\n            x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // ↑f x = Sum.inr PUnit.unit }),\n          (fun p => { val := (↑p).fst, property := (_ : ↑f (↑p).fst = Sum.inr PUnit.unit) })\n              ((fun x => { val := (x.1, PUnit.unit), property := (_ : ↑f ↑x = Sum.inr PUnit.unit) }) x) =\n            x) }\ns :\n  BinaryCofan\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\n    (TopCat.of { p // ↑f p.fst = ↑(BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) p.snd })\nm : Z ⟶ s.pt\ne₁ :\n  TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inl s\ne₂ :\n  TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m =\n    BinaryCofan.inr s\nx : (forget TopCat).obj Z\nh✝ : ¬↑f x = Sum.inl PUnit.unit\n⊢ ↑m x =\n    (fun h =>\n        ↑(TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ≫ m)\n          (↑eY.symm { val := x, property := (_ : ↑f x = Sum.inr PUnit.unit) }))\n      h✝\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n⊢ FinitaryExtensive TopCat\n[PROOFSTEP]\nrw [finitaryExtensive_iff_of_isTerminal TopCat.{u} _ TopCat.isTerminalPUnit _ (TopCat.binaryCofanIsColimit _ _)]\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n⊢ IsVanKampenColimit (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))\n[PROOFSTEP]\napply\n  BinaryCofan.isVanKampen_mk _ _ (fun X Y => TopCat.binaryCofanIsColimit X Y) _ fun f g =>\n    TopCat.pullbackConeIsLimit f g\n[GOAL]\ncase h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n⊢ ∀ {X' Y' : TopCat} (αX : X' ⟶ TopCat.of PUnit) (αY : Y' ⟶ TopCat.of PUnit)\n    (f : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt),\n    αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n        BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f →\n      αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n          BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f →\n        IsPullback (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX f\n            (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ∧\n          IsPullback (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY f\n            (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\n[PROOFSTEP]\nintro X' Y' αX αY f hαX hαY\n[GOAL]\ncase h₁\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\n⊢ IsPullback (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX f\n      (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))) ∧\n    IsPullback (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY f\n      (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\n⊢ IsPullback (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX f\n    (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\n[PROOFSTEP]\nrefine' ⟨⟨hαX.symm⟩, ⟨PullbackCone.isLimitAux' _ _⟩⟩\n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\n⊢ (s : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) →\n    { l //\n      l ≫\n            PullbackCone.fst\n              (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                (_ :\n                  BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                    αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n          PullbackCone.fst s ∧\n        l ≫\n              PullbackCone.snd\n                (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                  (_ :\n                    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                      αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n            PullbackCone.snd s ∧\n          ∀\n            {m :\n              s.pt ⟶\n                (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                    (_ :\n                      BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                        αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))).pt},\n            m ≫\n                  PullbackCone.fst\n                    (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                      (_ :\n                        BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                          αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n                PullbackCone.fst s →\n              m ≫\n                    PullbackCone.snd\n                      (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                        (_ :\n                          BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                            αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n                  PullbackCone.snd s →\n                m = l }\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n              (_ :\n                BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                (_ :\n                  BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                    αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                  (_ :\n                    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                      αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                    (_ :\n                      BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                        αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                      (_ :\n                        BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                          αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\nhave : ∀ x, ∃! y, s.fst x = Sum.inl y := by\n  intro x\n  cases' h : s.fst x with val val\n  · exact ⟨val, rfl, fun y h => Sum.inl_injective h.symm⟩\n  · apply_fun f at h \n    cases ((ConcreteCategory.congr_hom s.condition x).symm.trans h).trans (ConcreteCategory.congr_hom hαY val : _).symm\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\n⊢ ∀ (x : (forget TopCat).obj s.pt), ∃! y, ↑(PullbackCone.fst s) x = Sum.inl y\n[PROOFSTEP]\nintro x\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nx : (forget TopCat).obj s.pt\n⊢ ∃! y, ↑(PullbackCone.fst s) x = Sum.inl y\n[PROOFSTEP]\ncases' h : s.fst x with val val\n[GOAL]\ncase inl\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nx : (forget TopCat).obj s.pt\nval : ↑X'\nh : ↑(PullbackCone.fst s) x = Sum.inl val\n⊢ ∃! y, Sum.inl val = Sum.inl y\n[PROOFSTEP]\nexact ⟨val, rfl, fun y h => Sum.inl_injective h.symm⟩\n[GOAL]\ncase inr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nx : (forget TopCat).obj s.pt\nval : ↑Y'\nh : ↑(PullbackCone.fst s) x = Sum.inr val\n⊢ ∃! y, Sum.inr val = Sum.inl y\n[PROOFSTEP]\napply_fun f at h \n[GOAL]\ncase inr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nx : (forget TopCat).obj s.pt\nval : ↑Y'\nh : ↑f (↑(PullbackCone.fst s) x) = ↑f (Sum.inr val)\n⊢ ∃! y, Sum.inr val = Sum.inl y\n[PROOFSTEP]\ncases ((ConcreteCategory.congr_hom s.condition x).symm.trans h).trans (ConcreteCategory.congr_hom hαY val : _).symm\n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nthis : ∀ (x : (forget TopCat).obj s.pt), ∃! y, ↑(PullbackCone.fst s) x = Sum.inl y\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n              (_ :\n                BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                (_ :\n                  BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                    αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                  (_ :\n                    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                      αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                    (_ :\n                      BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                        αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                      (_ :\n                        BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                          αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\ndelta ExistsUnique at this \n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nthis :\n  ∀ (x : (forget TopCat).obj s.pt),\n    ∃ x_1,\n      (fun y => ↑(PullbackCone.fst s) x = Sum.inl y) x_1 ∧\n        ∀ (y : ↑X'), (fun y => ↑(PullbackCone.fst s) x = Sum.inl y) y → y = x_1\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n              (_ :\n                BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                (_ :\n                  BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                    αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                  (_ :\n                    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                      αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                    (_ :\n                      BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                        αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                      (_ :\n                        BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                          αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\nchoose l hl hl' using this\n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nl : (forget TopCat).obj s.pt → ↑X'\nhl : ∀ (x : (forget TopCat).obj s.pt), (fun y => ↑(PullbackCone.fst s) x = Sum.inl y) (l x)\nhl' : ∀ (x : (forget TopCat).obj s.pt) (y : ↑X'), (fun y => ↑(PullbackCone.fst s) x = Sum.inl y) y → y = l x\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n              (_ :\n                BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                (_ :\n                  BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                    αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                  (_ :\n                    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                      αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                    (_ :\n                      BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                        αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inl (TopCat.binaryCofan X' Y')) αX\n                      (_ :\n                        BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f =\n                          αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\nrefine'\n  ⟨⟨l, _⟩, ContinuousMap.ext fun a => (hl a).symm, TopCat.isTerminalPUnit.hom_ext _ _, fun {l'} h₁ _ =>\n    ContinuousMap.ext fun x => hl' x (l' x) (ConcreteCategory.congr_hom h₁ x).symm⟩\n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nl : (forget TopCat).obj s.pt → ↑X'\nhl : ∀ (x : (forget TopCat).obj s.pt), (fun y => ↑(PullbackCone.fst s) x = Sum.inl y) (l x)\nhl' : ∀ (x : (forget TopCat).obj s.pt) (y : ↑X'), (fun y => ↑(PullbackCone.fst s) x = Sum.inl y) y → y = l x\n⊢ Continuous l\n[PROOFSTEP]\napply (embedding_inl (α := X') (β := Y')).toInducing.continuous_iff.mpr\n[GOAL]\ncase h₁.left\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nl : (forget TopCat).obj s.pt → ↑X'\nhl : ∀ (x : (forget TopCat).obj s.pt), (fun y => ↑(PullbackCone.fst s) x = Sum.inl y) (l x)\nhl' : ∀ (x : (forget TopCat).obj s.pt) (y : ↑X'), (fun y => ↑(PullbackCone.fst s) x = Sum.inl y) y → y = l x\n⊢ Continuous (Sum.inl ∘ l)\n[PROOFSTEP]\nconvert s.fst.2 using 1\n[GOAL]\ncase h.e'_5.h\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nl : (forget TopCat).obj s.pt → ↑X'\nhl : ∀ (x : (forget TopCat).obj s.pt), (fun y => ↑(PullbackCone.fst s) x = Sum.inl y) (l x)\nhl' : ∀ (x : (forget TopCat).obj s.pt) (y : ↑X'), (fun y => ↑(PullbackCone.fst s) x = Sum.inl y) y → y = l x\ne_2✝ :\n  (↑X' ⊕ ↑Y') =\n    ↑(((Functor.const (Discrete WalkingPair)).obj (TopCat.binaryCofan X' Y').pt).obj { as := WalkingPair.left })\n⊢ Sum.inl ∘ l = (PullbackCone.fst s).toFun\n[PROOFSTEP]\nexact (funext hl).symm\n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\n⊢ IsPullback (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY f\n    (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\n[PROOFSTEP]\nrefine' ⟨⟨hαY.symm⟩, ⟨PullbackCone.isLimitAux' _ _⟩⟩\n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\n⊢ (s : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) →\n    { l //\n      l ≫\n            PullbackCone.fst\n              (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                (_ :\n                  BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                    αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n          PullbackCone.fst s ∧\n        l ≫\n              PullbackCone.snd\n                (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                  (_ :\n                    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                      αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n            PullbackCone.snd s ∧\n          ∀\n            {m :\n              s.pt ⟶\n                (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                    (_ :\n                      BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                        αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))).pt},\n            m ≫\n                  PullbackCone.fst\n                    (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                      (_ :\n                        BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                          αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n                PullbackCone.fst s →\n              m ≫\n                    PullbackCone.snd\n                      (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                        (_ :\n                          BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                            αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n                  PullbackCone.snd s →\n                m = l }\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n              (_ :\n                BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                (_ :\n                  BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                    αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                  (_ :\n                    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                      αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                    (_ :\n                      BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                        αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                      (_ :\n                        BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                          αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\nhave : ∀ x, ∃! y, s.fst x = Sum.inr y := by\n  intro x\n  cases' h : s.fst x with val val\n  · apply_fun f at h \n    cases ((ConcreteCategory.congr_hom s.condition x).symm.trans h).trans (ConcreteCategory.congr_hom hαX val : _).symm\n  · exact ⟨val, rfl, fun y h => Sum.inr_injective h.symm⟩\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\n⊢ ∀ (x : (forget TopCat).obj s.pt), ∃! y, ↑(PullbackCone.fst s) x = Sum.inr y\n[PROOFSTEP]\nintro x\n[GOAL]\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nx : (forget TopCat).obj s.pt\n⊢ ∃! y, ↑(PullbackCone.fst s) x = Sum.inr y\n[PROOFSTEP]\ncases' h : s.fst x with val val\n[GOAL]\ncase inl\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nx : (forget TopCat).obj s.pt\nval : ↑X'\nh : ↑(PullbackCone.fst s) x = Sum.inl val\n⊢ ∃! y, Sum.inl val = Sum.inr y\n[PROOFSTEP]\napply_fun f at h \n[GOAL]\ncase inl\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nx : (forget TopCat).obj s.pt\nval : ↑X'\nh : ↑f (↑(PullbackCone.fst s) x) = ↑f (Sum.inl val)\n⊢ ∃! y, Sum.inl val = Sum.inr y\n[PROOFSTEP]\ncases ((ConcreteCategory.congr_hom s.condition x).symm.trans h).trans (ConcreteCategory.congr_hom hαX val : _).symm\n[GOAL]\ncase inr\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nx : (forget TopCat).obj s.pt\nval : ↑Y'\nh : ↑(PullbackCone.fst s) x = Sum.inr val\n⊢ ∃! y, Sum.inr val = Sum.inr y\n[PROOFSTEP]\nexact ⟨val, rfl, fun y h => Sum.inr_injective h.symm⟩\n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nthis : ∀ (x : (forget TopCat).obj s.pt), ∃! y, ↑(PullbackCone.fst s) x = Sum.inr y\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n              (_ :\n                BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                (_ :\n                  BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                    αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                  (_ :\n                    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                      αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                    (_ :\n                      BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                        αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                      (_ :\n                        BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                          αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\ndelta ExistsUnique at this \n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nthis :\n  ∀ (x : (forget TopCat).obj s.pt),\n    ∃ x_1,\n      (fun y => ↑(PullbackCone.fst s) x = Sum.inr y) x_1 ∧\n        ∀ (y : ↑Y'), (fun y => ↑(PullbackCone.fst s) x = Sum.inr y) y → y = x_1\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n              (_ :\n                BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                (_ :\n                  BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                    αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                  (_ :\n                    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                      αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                    (_ :\n                      BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                        αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                      (_ :\n                        BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                          αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\nchoose l hl hl' using this\n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nl : (forget TopCat).obj s.pt → ↑Y'\nhl : ∀ (x : (forget TopCat).obj s.pt), (fun y => ↑(PullbackCone.fst s) x = Sum.inr y) (l x)\nhl' : ∀ (x : (forget TopCat).obj s.pt) (y : ↑Y'), (fun y => ↑(PullbackCone.fst s) x = Sum.inr y) y → y = l x\n⊢ { l //\n    l ≫\n          PullbackCone.fst\n            (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n              (_ :\n                BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n        PullbackCone.fst s ∧\n      l ≫\n            PullbackCone.snd\n              (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                (_ :\n                  BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                    αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n          PullbackCone.snd s ∧\n        ∀\n          {m :\n            s.pt ⟶\n              (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                  (_ :\n                    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                      αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))).pt},\n          m ≫\n                PullbackCone.fst\n                  (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                    (_ :\n                      BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                        αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n              PullbackCone.fst s →\n            m ≫\n                  PullbackCone.snd\n                    (PullbackCone.mk (BinaryCofan.inr (TopCat.binaryCofan X' Y')) αY\n                      (_ :\n                        BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f =\n                          αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))) =\n                PullbackCone.snd s →\n              m = l }\n[PROOFSTEP]\nrefine'\n  ⟨⟨l, _⟩, ContinuousMap.ext fun a => (hl a).symm, TopCat.isTerminalPUnit.hom_ext _ _, fun {l'} h₁ _ =>\n    ContinuousMap.ext fun x => hl' x (l' x) (ConcreteCategory.congr_hom h₁ x).symm⟩\n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nl : (forget TopCat).obj s.pt → ↑Y'\nhl : ∀ (x : (forget TopCat).obj s.pt), (fun y => ↑(PullbackCone.fst s) x = Sum.inr y) (l x)\nhl' : ∀ (x : (forget TopCat).obj s.pt) (y : ↑Y'), (fun y => ↑(PullbackCone.fst s) x = Sum.inr y) y → y = l x\n⊢ Continuous l\n[PROOFSTEP]\napply (embedding_inr (α := X') (β := Y')).toInducing.continuous_iff.mpr\n[GOAL]\ncase h₁.right\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nl : (forget TopCat).obj s.pt → ↑Y'\nhl : ∀ (x : (forget TopCat).obj s.pt), (fun y => ↑(PullbackCone.fst s) x = Sum.inr y) (l x)\nhl' : ∀ (x : (forget TopCat).obj s.pt) (y : ↑Y'), (fun y => ↑(PullbackCone.fst s) x = Sum.inr y) y → y = l x\n⊢ Continuous (Sum.inr ∘ l)\n[PROOFSTEP]\nconvert s.fst.2 using 1\n[GOAL]\ncase h.e'_5.h\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nX' Y' : TopCat\nαX : X' ⟶ TopCat.of PUnit\nαY : Y' ⟶ TopCat.of PUnit\nf : (TopCat.binaryCofan X' Y').pt ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\nhαX :\n  αX ≫ BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inl (TopCat.binaryCofan X' Y') ≫ f\nhαY :\n  αY ≫ BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)) =\n    BinaryCofan.inr (TopCat.binaryCofan X' Y') ≫ f\ns : PullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))\nl : (forget TopCat).obj s.pt → ↑Y'\nhl : ∀ (x : (forget TopCat).obj s.pt), (fun y => ↑(PullbackCone.fst s) x = Sum.inr y) (l x)\nhl' : ∀ (x : (forget TopCat).obj s.pt) (y : ↑Y'), (fun y => ↑(PullbackCone.fst s) x = Sum.inr y) y → y = l x\ne_2✝ :\n  (↑X' ⊕ ↑Y') =\n    ↑(((Functor.const (Discrete WalkingPair)).obj (TopCat.binaryCofan X' Y').pt).obj { as := WalkingPair.right })\n⊢ Sum.inr ∘ l = (PullbackCone.fst s).toFun\n[PROOFSTEP]\nexact (funext hl).symm\n[GOAL]\ncase h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\n⊢ {Z : TopCat} →\n    (f : Z ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt) →\n      IsColimit\n        (BinaryCofan.mk\n          (PullbackCone.fst\n            (TopCat.pullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))))\n          (PullbackCone.fst\n            (TopCat.pullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))))\n[PROOFSTEP]\nintro Z f\n[GOAL]\ncase h₂\nJ : Type v'\ninst✝¹ : Category.{u', v'} J\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : C\nZ : TopCat\nf : Z ⟶ (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).pt\n⊢ IsColimit\n    (BinaryCofan.mk\n      (PullbackCone.fst\n        (TopCat.pullbackCone f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)))))\n      (PullbackCone.fst\n        (TopCat.pullbackCone f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit))))))\n[PROOFSTEP]\nexact finitaryExtensiveTopCatAux Z f\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\n⊢ IsVanKampenColimit c'\n[PROOFSTEP]\nintro F' c'' α f h hα\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\n⊢ Nonempty (IsColimit c'') ↔ ∀ (j : J), IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j) f (NatTrans.app c'.ι j)\n[PROOFSTEP]\nhave : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι := by\n  ext j\n  exact e.inv.2 j\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\n⊢ c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι\n[PROOFSTEP]\next j\n[GOAL]\ncase w.h\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nj : J\n⊢ NatTrans.app (c'.ι ≫ (Functor.const J).map e.inv.Hom) j = NatTrans.app c.ι j\n[PROOFSTEP]\nexact e.inv.2 j\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι\n⊢ Nonempty (IsColimit c'') ↔ ∀ (j : J), IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j) f (NatTrans.app c'.ι j)\n[PROOFSTEP]\nrw [H c'' α (f ≫ e.inv.1) (by rw [Functor.map_comp, ← reassoc_of% h, this]) hα]\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι\n⊢ α ≫ c.ι = c''.ι ≫ (Functor.const J).map (f ≫ e.inv.Hom)\n[PROOFSTEP]\nrw [Functor.map_comp, ← reassoc_of% h, this]\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι\n⊢ (∀ (j : J), IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j) (f ≫ e.inv.Hom) (NatTrans.app c.ι j)) ↔\n    ∀ (j : J), IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j) f (NatTrans.app c'.ι j)\n[PROOFSTEP]\napply forall_congr'\n[GOAL]\ncase h\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι\n⊢ ∀ (a : J),\n    IsPullback (NatTrans.app c''.ι a) (NatTrans.app α a) (f ≫ e.inv.Hom) (NatTrans.app c.ι a) ↔\n      IsPullback (NatTrans.app c''.ι a) (NatTrans.app α a) f (NatTrans.app c'.ι a)\n[PROOFSTEP]\nintro j\n[GOAL]\ncase h\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι\nj : J\n⊢ IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j) (f ≫ e.inv.Hom) (NatTrans.app c.ι j) ↔\n    IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j) f (NatTrans.app c'.ι j)\n[PROOFSTEP]\nconv_lhs => rw [← Category.comp_id (α.app j)]\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι\nj : J\n| IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j) (f ≫ e.inv.Hom) (NatTrans.app c.ι j)\n[PROOFSTEP]\nrw [← Category.comp_id (α.app j)]\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι\nj : J\n| IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j) (f ≫ e.inv.Hom) (NatTrans.app c.ι j)\n[PROOFSTEP]\nrw [← Category.comp_id (α.app j)]\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι\nj : J\n| IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j) (f ≫ e.inv.Hom) (NatTrans.app c.ι j)\n[PROOFSTEP]\nrw [← Category.comp_id (α.app j)]\n[GOAL]\ncase h\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι\nj : J\n⊢ IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j ≫ 𝟙 (F.obj j)) (f ≫ e.inv.Hom) (NatTrans.app c.ι j) ↔\n    IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j) f (NatTrans.app c'.ι j)\n[PROOFSTEP]\nhaveI : IsIso e.inv.Hom := Functor.map_isIso (Cocones.forget _) e.inv\n[GOAL]\ncase h\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis✝ : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι\nj : J\nthis : IsIso e.inv.Hom\n⊢ IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j ≫ 𝟙 (F.obj j)) (f ≫ e.inv.Hom) (NatTrans.app c.ι j) ↔\n    IsPullback (NatTrans.app c''.ι j) (NatTrans.app α j) f (NatTrans.app c'.ι j)\n[PROOFSTEP]\nexact (IsPullback.of_vert_isIso ⟨by simp⟩).paste_vert_iff (NatTrans.congr_app h j).symm\n[GOAL]\nJ : Type v'\ninst✝² : Category.{u', v'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝ : Category.{v'', u''} D\nF : J ⥤ C\nc c' : Cocone F\nH : IsVanKampenColimit c\ne : c ≅ c'\nF' : J ⥤ C\nc'' : Cocone F'\nα : F' ⟶ F\nf : c''.pt ⟶ c'.pt\nh : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis✝ : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι\nj : J\nthis : IsIso e.inv.Hom\n⊢ NatTrans.app c'.ι j ≫ e.inv.Hom = 𝟙 (F.obj j) ≫ NatTrans.app c.ι j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v'\ninst✝⁷ : Category.{u', v'} J\nC : Type u\ninst✝⁶ : Category.{v, u} C\nX Y : C\nD✝ : Type u''\ninst✝⁵ : Category.{v'', u''} D✝\nD : Type u_1\ninst✝⁴ : Category.{u_2, u_1} D\nG : C ⥤ D\nF : J ⥤ C\nc : Cocone F\ninst✝³ : PreservesLimitsOfShape WalkingCospan G\ninst✝² : ReflectsLimitsOfShape WalkingCospan G\ninst✝¹ : PreservesColimitsOfShape J G\ninst✝ : ReflectsColimitsOfShape J G\nH : IsVanKampenColimit (G.mapCocone c)\n⊢ IsVanKampenColimit c\n[PROOFSTEP]\nintro F' c' α f h hα\n[GOAL]\nJ : Type v'\ninst✝⁷ : Category.{u', v'} J\nC : Type u\ninst✝⁶ : Category.{v, u} C\nX Y : C\nD✝ : Type u''\ninst✝⁵ : Category.{v'', u''} D✝\nD : Type u_1\ninst✝⁴ : Category.{u_2, u_1} D\nG : C ⥤ D\nF : J ⥤ C\nc : Cocone F\ninst✝³ : PreservesLimitsOfShape WalkingCospan G\ninst✝² : ReflectsLimitsOfShape WalkingCospan G\ninst✝¹ : PreservesColimitsOfShape J G\ninst✝ : ReflectsColimitsOfShape J G\nH : IsVanKampenColimit (G.mapCocone c)\nF' : J ⥤ C\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\nh : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\n⊢ Nonempty (IsColimit c') ↔ ∀ (j : J), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nrefine'\n  (Iff.trans _\n        (H (G.mapCocone c') (whiskerRight α G) (G.map f) (by ext j; simpa using G.congr_map (NatTrans.congr_app h j))\n          (hα.whiskerRight G))).trans\n    (forall_congr' fun j => _)\n[GOAL]\nJ : Type v'\ninst✝⁷ : Category.{u', v'} J\nC : Type u\ninst✝⁶ : Category.{v, u} C\nX Y : C\nD✝ : Type u''\ninst✝⁵ : Category.{v'', u''} D✝\nD : Type u_1\ninst✝⁴ : Category.{u_2, u_1} D\nG : C ⥤ D\nF : J ⥤ C\nc : Cocone F\ninst✝³ : PreservesLimitsOfShape WalkingCospan G\ninst✝² : ReflectsLimitsOfShape WalkingCospan G\ninst✝¹ : PreservesColimitsOfShape J G\ninst✝ : ReflectsColimitsOfShape J G\nH : IsVanKampenColimit (G.mapCocone c)\nF' : J ⥤ C\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\nh : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\n⊢ whiskerRight α G ≫ (G.mapCocone c).ι = (G.mapCocone c').ι ≫ (Functor.const J).map (G.map f)\n[PROOFSTEP]\next j\n[GOAL]\ncase w.h\nJ : Type v'\ninst✝⁷ : Category.{u', v'} J\nC : Type u\ninst✝⁶ : Category.{v, u} C\nX Y : C\nD✝ : Type u''\ninst✝⁵ : Category.{v'', u''} D✝\nD : Type u_1\ninst✝⁴ : Category.{u_2, u_1} D\nG : C ⥤ D\nF : J ⥤ C\nc : Cocone F\ninst✝³ : PreservesLimitsOfShape WalkingCospan G\ninst✝² : ReflectsLimitsOfShape WalkingCospan G\ninst✝¹ : PreservesColimitsOfShape J G\ninst✝ : ReflectsColimitsOfShape J G\nH : IsVanKampenColimit (G.mapCocone c)\nF' : J ⥤ C\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\nh : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nj : J\n⊢ NatTrans.app (whiskerRight α G ≫ (G.mapCocone c).ι) j =\n    NatTrans.app ((G.mapCocone c').ι ≫ (Functor.const J).map (G.map f)) j\n[PROOFSTEP]\nsimpa using G.congr_map (NatTrans.congr_app h j)\n[GOAL]\ncase refine'_1\nJ : Type v'\ninst✝⁷ : Category.{u', v'} J\nC : Type u\ninst✝⁶ : Category.{v, u} C\nX Y : C\nD✝ : Type u''\ninst✝⁵ : Category.{v'', u''} D✝\nD : Type u_1\ninst✝⁴ : Category.{u_2, u_1} D\nG : C ⥤ D\nF : J ⥤ C\nc : Cocone F\ninst✝³ : PreservesLimitsOfShape WalkingCospan G\ninst✝² : ReflectsLimitsOfShape WalkingCospan G\ninst✝¹ : PreservesColimitsOfShape J G\ninst✝ : ReflectsColimitsOfShape J G\nH : IsVanKampenColimit (G.mapCocone c)\nF' : J ⥤ C\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\nh : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\n⊢ Nonempty (IsColimit c') ↔ Nonempty (IsColimit (G.mapCocone c'))\n[PROOFSTEP]\nexact ⟨fun h => ⟨isColimitOfPreserves G h.some⟩, fun h => ⟨isColimitOfReflects G h.some⟩⟩\n[GOAL]\ncase refine'_2\nJ : Type v'\ninst✝⁷ : Category.{u', v'} J\nC : Type u\ninst✝⁶ : Category.{v, u} C\nX Y : C\nD✝ : Type u''\ninst✝⁵ : Category.{v'', u''} D✝\nD : Type u_1\ninst✝⁴ : Category.{u_2, u_1} D\nG : C ⥤ D\nF : J ⥤ C\nc : Cocone F\ninst✝³ : PreservesLimitsOfShape WalkingCospan G\ninst✝² : ReflectsLimitsOfShape WalkingCospan G\ninst✝¹ : PreservesColimitsOfShape J G\ninst✝ : ReflectsColimitsOfShape J G\nH : IsVanKampenColimit (G.mapCocone c)\nF' : J ⥤ C\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\nh : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nj : J\n⊢ IsPullback (NatTrans.app (G.mapCocone c').ι j) (NatTrans.app (whiskerRight α G) j) (G.map f)\n      (NatTrans.app (G.mapCocone c).ι j) ↔\n    IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nexact IsPullback.map_iff G (NatTrans.congr_app h.symm j)\n[GOAL]\nJ : Type v'\ninst✝⁴ : Category.{u', v'} J\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝² : Category.{v'', u''} D\ninst✝¹ : HasPullbacks D\ninst✝ : HasColimitsOfShape J D\nF : J ⥤ C ⥤ D\nc : Cocone F\nhc : ∀ (x : C), IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)\n⊢ IsVanKampenColimit c\n[PROOFSTEP]\nintro F' c' α f e hα\n[GOAL]\nJ : Type v'\ninst✝⁴ : Category.{u', v'} J\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝² : Category.{v'', u''} D\ninst✝¹ : HasPullbacks D\ninst✝ : HasColimitsOfShape J D\nF : J ⥤ C ⥤ D\nc : Cocone F\nhc : ∀ (x : C), IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)\nF' : J ⥤ C ⥤ D\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\ne : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\n⊢ Nonempty (IsColimit c') ↔ ∀ (j : J), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nhave := fun x =>\n  hc x (((evaluation C D).obj x).mapCocone c') (whiskerRight α _) (((evaluation C D).obj x).map f)\n    (by\n      ext y\n      dsimp\n      exact NatTrans.congr_app (NatTrans.congr_app e y) x)\n    (hα.whiskerRight _)\n[GOAL]\nJ : Type v'\ninst✝⁴ : Category.{u', v'} J\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝² : Category.{v'', u''} D\ninst✝¹ : HasPullbacks D\ninst✝ : HasColimitsOfShape J D\nF : J ⥤ C ⥤ D\nc : Cocone F\nhc : ∀ (x : C), IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)\nF' : J ⥤ C ⥤ D\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\ne : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nx : C\n⊢ whiskerRight α ((evaluation C D).obj x) ≫ (((evaluation C D).obj x).mapCocone c).ι =\n    (((evaluation C D).obj x).mapCocone c').ι ≫ (Functor.const J).map (((evaluation C D).obj x).map f)\n[PROOFSTEP]\next y\n[GOAL]\ncase w.h\nJ : Type v'\ninst✝⁴ : Category.{u', v'} J\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝² : Category.{v'', u''} D\ninst✝¹ : HasPullbacks D\ninst✝ : HasColimitsOfShape J D\nF : J ⥤ C ⥤ D\nc : Cocone F\nhc : ∀ (x : C), IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)\nF' : J ⥤ C ⥤ D\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\ne : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nx : C\ny : J\n⊢ NatTrans.app (whiskerRight α ((evaluation C D).obj x) ≫ (((evaluation C D).obj x).mapCocone c).ι) y =\n    NatTrans.app ((((evaluation C D).obj x).mapCocone c').ι ≫ (Functor.const J).map (((evaluation C D).obj x).map f)) y\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h\nJ : Type v'\ninst✝⁴ : Category.{u', v'} J\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝² : Category.{v'', u''} D\ninst✝¹ : HasPullbacks D\ninst✝ : HasColimitsOfShape J D\nF : J ⥤ C ⥤ D\nc : Cocone F\nhc : ∀ (x : C), IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)\nF' : J ⥤ C ⥤ D\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\ne : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nx : C\ny : J\n⊢ NatTrans.app (NatTrans.app α y) x ≫ NatTrans.app (NatTrans.app c.ι y) x =\n    NatTrans.app (NatTrans.app c'.ι y) x ≫ NatTrans.app f x\n[PROOFSTEP]\nexact NatTrans.congr_app (NatTrans.congr_app e y) x\n[GOAL]\nJ : Type v'\ninst✝⁴ : Category.{u', v'} J\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝² : Category.{v'', u''} D\ninst✝¹ : HasPullbacks D\ninst✝ : HasColimitsOfShape J D\nF : J ⥤ C ⥤ D\nc : Cocone F\nhc : ∀ (x : C), IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)\nF' : J ⥤ C ⥤ D\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\ne : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis :\n  ∀ (x : C),\n    Nonempty (IsColimit (((evaluation C D).obj x).mapCocone c')) ↔\n      ∀ (j : J),\n        IsPullback (NatTrans.app (((evaluation C D).obj x).mapCocone c').ι j)\n          (NatTrans.app (whiskerRight α ((evaluation C D).obj x)) j) (((evaluation C D).obj x).map f)\n          (NatTrans.app (((evaluation C D).obj x).mapCocone c).ι j)\n⊢ Nonempty (IsColimit c') ↔ ∀ (j : J), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nJ : Type v'\ninst✝⁴ : Category.{u', v'} J\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝² : Category.{v'', u''} D\ninst✝¹ : HasPullbacks D\ninst✝ : HasColimitsOfShape J D\nF : J ⥤ C ⥤ D\nc : Cocone F\nhc : ∀ (x : C), IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)\nF' : J ⥤ C ⥤ D\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\ne : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis :\n  ∀ (x : C),\n    Nonempty (IsColimit (((evaluation C D).obj x).mapCocone c')) ↔\n      ∀ (j : J),\n        IsPullback (NatTrans.app (((evaluation C D).obj x).mapCocone c').ι j)\n          (NatTrans.app (whiskerRight α ((evaluation C D).obj x)) j) (((evaluation C D).obj x).map f)\n          (NatTrans.app (((evaluation C D).obj x).mapCocone c).ι j)\n⊢ Nonempty (IsColimit c') → ∀ (j : J), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nrintro ⟨hc'⟩ j\n[GOAL]\ncase mp.intro\nJ : Type v'\ninst✝⁴ : Category.{u', v'} J\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝² : Category.{v'', u''} D\ninst✝¹ : HasPullbacks D\ninst✝ : HasColimitsOfShape J D\nF : J ⥤ C ⥤ D\nc : Cocone F\nhc : ∀ (x : C), IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)\nF' : J ⥤ C ⥤ D\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\ne : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis :\n  ∀ (x : C),\n    Nonempty (IsColimit (((evaluation C D).obj x).mapCocone c')) ↔\n      ∀ (j : J),\n        IsPullback (NatTrans.app (((evaluation C D).obj x).mapCocone c').ι j)\n          (NatTrans.app (whiskerRight α ((evaluation C D).obj x)) j) (((evaluation C D).obj x).map f)\n          (NatTrans.app (((evaluation C D).obj x).mapCocone c).ι j)\nhc' : IsColimit c'\nj : J\n⊢ IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)\n[PROOFSTEP]\nrefine' ⟨⟨(NatTrans.congr_app e j).symm⟩, ⟨evaluationJointlyReflectsLimits _ _⟩⟩\n[GOAL]\ncase mp.intro\nJ : Type v'\ninst✝⁴ : Category.{u', v'} J\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝² : Category.{v'', u''} D\ninst✝¹ : HasPullbacks D\ninst✝ : HasColimitsOfShape J D\nF : J ⥤ C ⥤ D\nc : Cocone F\nhc : ∀ (x : C), IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)\nF' : J ⥤ C ⥤ D\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\ne : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis :\n  ∀ (x : C),\n    Nonempty (IsColimit (((evaluation C D).obj x).mapCocone c')) ↔\n      ∀ (j : J),\n        IsPullback (NatTrans.app (((evaluation C D).obj x).mapCocone c').ι j)\n          (NatTrans.app (whiskerRight α ((evaluation C D).obj x)) j) (((evaluation C D).obj x).map f)\n          (NatTrans.app (((evaluation C D).obj x).mapCocone c).ι j)\nhc' : IsColimit c'\nj : J\n⊢ (k : C) →\n    IsLimit\n      (((evaluation C D).obj k).mapCone\n        (PullbackCone.mk (NatTrans.app c'.ι j) (NatTrans.app α j)\n          (_ : NatTrans.app c'.ι j ≫ f = NatTrans.app α j ≫ NatTrans.app c.ι j)))\n[PROOFSTEP]\nrefine' fun x => (isLimitMapConePullbackConeEquiv _ _).symm _\n[GOAL]\ncase mp.intro\nJ : Type v'\ninst✝⁴ : Category.{u', v'} J\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝² : Category.{v'', u''} D\ninst✝¹ : HasPullbacks D\ninst✝ : HasColimitsOfShape J D\nF : J ⥤ C ⥤ D\nc : Cocone F\nhc : ∀ (x : C), IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)\nF' : J ⥤ C ⥤ D\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\ne : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis :\n  ∀ (x : C),\n    Nonempty (IsColimit (((evaluation C D).obj x).mapCocone c')) ↔\n      ∀ (j : J),\n        IsPullback (NatTrans.app (((evaluation C D).obj x).mapCocone c').ι j)\n          (NatTrans.app (whiskerRight α ((evaluation C D).obj x)) j) (((evaluation C D).obj x).map f)\n          (NatTrans.app (((evaluation C D).obj x).mapCocone c).ι j)\nhc' : IsColimit c'\nj : J\nx : C\n⊢ IsLimit\n    (PullbackCone.mk (((evaluation C D).obj x).map (NatTrans.app c'.ι j))\n      (((evaluation C D).obj x).map (NatTrans.app α j))\n      (_ :\n        ((evaluation C D).obj x).map (NatTrans.app c'.ι j) ≫ ((evaluation C D).obj x).map f =\n          ((evaluation C D).obj x).map (NatTrans.app α j) ≫ ((evaluation C D).obj x).map (NatTrans.app c.ι j)))\n[PROOFSTEP]\nexact ((this x).mp ⟨PreservesColimit.preserves hc'⟩ _).isLimit\n[GOAL]\ncase mpr\nJ : Type v'\ninst✝⁴ : Category.{u', v'} J\nC : Type u\ninst✝³ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝² : Category.{v'', u''} D\ninst✝¹ : HasPullbacks D\ninst✝ : HasColimitsOfShape J D\nF : J ⥤ C ⥤ D\nc : Cocone F\nhc : ∀ (x : C), IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)\nF' : J ⥤ C ⥤ D\nc' : Cocone F'\nα : F' ⟶ F\nf : c'.pt ⟶ c.pt\ne : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f\nhα : NatTrans.Equifibered α\nthis :\n  ∀ (x : C),\n    Nonempty (IsColimit (((evaluation C D).obj x).mapCocone c')) ↔\n      ∀ (j : J),\n        IsPullback (NatTrans.app (((evaluation C D).obj x).mapCocone c').ι j)\n          (NatTrans.app (whiskerRight α ((evaluation C D).obj x)) j) (((evaluation C D).obj x).map f)\n          (NatTrans.app (((evaluation C D).obj x).mapCocone c).ι j)\n⊢ (∀ (j : J), IsPullback (NatTrans.app c'.ι j) (NatTrans.app α j) f (NatTrans.app c.ι j)) → Nonempty (IsColimit c')\n[PROOFSTEP]\nexact fun H =>\n  ⟨evaluationJointlyReflectsColimits _ fun x => ((this x).mpr fun j => (H j).map ((evaluation C D).obj x)).some⟩\n[GOAL]\nJ : Type v'\ninst✝⁸ : Category.{u', v'} J\nC : Type u\ninst✝⁷ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝⁶ : Category.{v'', u''} D\nF : C ⥤ D\ninst✝⁵ : FinitaryExtensive D\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasPullbacks C\ninst✝² : PreservesLimitsOfShape WalkingCospan F\ninst✝¹ : PreservesColimitsOfShape (Discrete WalkingPair) F\ninst✝ : ReflectsIsomorphisms F\n⊢ FinitaryExtensive C\n[PROOFSTEP]\nhaveI : ReflectsLimitsOfShape WalkingCospan F := reflectsLimitsOfShapeOfReflectsIsomorphisms\n[GOAL]\nJ : Type v'\ninst✝⁸ : Category.{u', v'} J\nC : Type u\ninst✝⁷ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝⁶ : Category.{v'', u''} D\nF : C ⥤ D\ninst✝⁵ : FinitaryExtensive D\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasPullbacks C\ninst✝² : PreservesLimitsOfShape WalkingCospan F\ninst✝¹ : PreservesColimitsOfShape (Discrete WalkingPair) F\ninst✝ : ReflectsIsomorphisms F\nthis : ReflectsLimitsOfShape WalkingCospan F\n⊢ FinitaryExtensive C\n[PROOFSTEP]\nhaveI : ReflectsColimitsOfShape (Discrete WalkingPair) F := reflectsColimitsOfShapeOfReflectsIsomorphisms\n[GOAL]\nJ : Type v'\ninst✝⁸ : Category.{u', v'} J\nC : Type u\ninst✝⁷ : Category.{v, u} C\nX Y : C\nD : Type u''\ninst✝⁶ : Category.{v'', u''} D\nF : C ⥤ D\ninst✝⁵ : FinitaryExtensive D\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasPullbacks C\ninst✝² : PreservesLimitsOfShape WalkingCospan F\ninst✝¹ : PreservesColimitsOfShape (Discrete WalkingPair) F\ninst✝ : ReflectsIsomorphisms F\nthis✝ : ReflectsLimitsOfShape WalkingCospan F\nthis : ReflectsColimitsOfShape (Discrete WalkingPair) F\n⊢ FinitaryExtensive C\n[PROOFSTEP]\nexact finitaryExtensive_of_preserves_and_reflects F\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Extensive", "llama_tokens": 208311, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6513548646660543, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.3611570346656233}}
{"text": "[GOAL]\nT : ℝ\nhT : 0 < T\nt : ℝ\nμ : autoParam (Measure ℝ) _auto✝\n⊢ IsAddFundamentalDomain { x // x ∈ zmultiples T } (Ioc t (t + T))\n[PROOFSTEP]\nrefine' IsAddFundamentalDomain.mk' measurableSet_Ioc.nullMeasurableSet fun x => _\n[GOAL]\nT : ℝ\nhT : 0 < T\nt : ℝ\nμ : autoParam (Measure ℝ) _auto✝\nx : ℝ\n⊢ ∃! g, g +ᵥ x ∈ Ioc t (t + T)\n[PROOFSTEP]\nhave : Bijective (codRestrict (fun n : ℤ => n • T) (AddSubgroup.zmultiples T) _) :=\n  (Equiv.ofInjective (fun n : ℤ => n • T) (zsmul_strictMono_left hT).injective).bijective\n[GOAL]\nT : ℝ\nhT : 0 < T\nt : ℝ\nμ : autoParam (Measure ℝ) _auto✝\nx : ℝ\nthis : Bijective (codRestrict (fun n => n • T) ↑(zmultiples T) (_ : ∀ (x : ℤ), ∃ y, y • T = x • T))\n⊢ ∃! g, g +ᵥ x ∈ Ioc t (t + T)\n[PROOFSTEP]\nrefine' this.existsUnique_iff.2 _\n[GOAL]\nT : ℝ\nhT : 0 < T\nt : ℝ\nμ : autoParam (Measure ℝ) _auto✝\nx : ℝ\nthis : Bijective (codRestrict (fun n => n • T) ↑(zmultiples T) (_ : ∀ (x : ℤ), ∃ y, y • T = x • T))\n⊢ ∃! x_1, codRestrict (fun n => n • T) ↑(zmultiples T) (_ : ∀ (x : ℤ), ∃ y, y • T = x • T) x_1 +ᵥ x ∈ Ioc t (t + T)\n[PROOFSTEP]\nsimpa only [add_comm x] using existsUnique_add_zsmul_mem_Ioc hT x t\n[GOAL]\nT : ℝ\nhT : 0 < T\nt : ℝ\nμ : autoParam (Measure ℝ) _auto✝\n⊢ IsAddFundamentalDomain { x // x ∈ ↑opposite (zmultiples T) } (Ioc t (t + T))\n[PROOFSTEP]\nrefine' IsAddFundamentalDomain.mk' measurableSet_Ioc.nullMeasurableSet fun x => _\n[GOAL]\nT : ℝ\nhT : 0 < T\nt : ℝ\nμ : autoParam (Measure ℝ) _auto✝\nx : ℝ\n⊢ ∃! g, g +ᵥ x ∈ Ioc t (t + T)\n[PROOFSTEP]\nhave : Bijective (codRestrict (fun n : ℤ => n • T) (AddSubgroup.zmultiples T) _) :=\n  (Equiv.ofInjective (fun n : ℤ => n • T) (zsmul_strictMono_left hT).injective).bijective\n[GOAL]\nT : ℝ\nhT : 0 < T\nt : ℝ\nμ : autoParam (Measure ℝ) _auto✝\nx : ℝ\nthis : Bijective (codRestrict (fun n => n • T) ↑(zmultiples T) (_ : ∀ (x : ℤ), ∃ y, y • T = x • T))\n⊢ ∃! g, g +ᵥ x ∈ Ioc t (t + T)\n[PROOFSTEP]\nrefine' (AddSubgroup.oppositeEquiv _).bijective.comp this |>.existsUnique_iff.2 _\n[GOAL]\nT : ℝ\nhT : 0 < T\nt : ℝ\nμ : autoParam (Measure ℝ) _auto✝\nx : ℝ\nthis : Bijective (codRestrict (fun n => n • T) ↑(zmultiples T) (_ : ∀ (x : ℤ), ∃ y, y • T = x • T))\n⊢ ∃! x_1,\n    (↑(oppositeEquiv (zmultiples T)) ∘ codRestrict (fun n => n • T) ↑(zmultiples T) (_ : ∀ (x : ℤ), ∃ y, y • T = x • T))\n          x_1 +ᵥ\n        x ∈\n      Ioc t (t + T)\n[PROOFSTEP]\nsimpa using existsUnique_add_zsmul_mem_Ioc hT x t\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\n⊢ ↑↑volume univ = ENNReal.ofReal T\n[PROOFSTEP]\ndsimp [volume]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\n⊢ ENNReal.ofReal T * ↑↑(addHaarMeasure ⊤) univ = ENNReal.ofReal T\n[PROOFSTEP]\nrw [← PositiveCompacts.coe_top]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\n⊢ ENNReal.ofReal T * ↑↑(addHaarMeasure ⊤) ↑⊤ = ENNReal.ofReal T\n[PROOFSTEP]\nsimp [addHaarMeasure_self (G := AddCircle T), -PositiveCompacts.coe_top]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\n⊢ ENNReal.ofReal T ≠ 0\n[PROOFSTEP]\nsimp [hT.out]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\n⊢ ↑↑volume univ < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\n⊢ MeasurePreserving QuotientAddGroup.mk\n[PROOFSTEP]\napply MeasurePreservingQuotientAddGroup.mk'\n[GOAL]\ncase h𝓕\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\n⊢ IsAddFundamentalDomain { x // x ∈ ↑opposite (zmultiples T) } (Ioc t (t + T))\n[PROOFSTEP]\nexact isAddFundamentalDomain_Ioc' hT.out t\n[GOAL]\ncase h𝓕_finite\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\n⊢ ↑↑volume (Ioc t (t + T)) < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\n⊢ ↑↑volume (Ioc t (t + T) ∩ ↑(QuotientAddGroup.mk' (zmultiples T)) ⁻¹' ↑⊤) = ↑(Real.toNNReal T)\n[PROOFSTEP]\nhaveI : CompactSpace (ℝ ⧸ zmultiples T) := inferInstanceAs (CompactSpace (AddCircle T))\n[GOAL]\ncase h\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nthis : CompactSpace (ℝ ⧸ zmultiples T)\n⊢ ↑↑volume (Ioc t (t + T) ∩ ↑(QuotientAddGroup.mk' (zmultiples T)) ⁻¹' ↑⊤) = ↑(Real.toNNReal T)\n[PROOFSTEP]\nsimp [← ENNReal.ofReal_coe_nnreal, Real.coe_toNNReal T hT.out.le, -Real.coe_toNNReal']\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\n⊢ ↑↑volume (Metric.closedBall x ε) = ENNReal.ofReal (min T (2 * ε))\n[PROOFSTEP]\nhave hT' : |T| = T := abs_eq_self.mpr hT.out.le\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\n⊢ ↑↑volume (Metric.closedBall x ε) = ENNReal.ofReal (min T (2 * ε))\n[PROOFSTEP]\nlet I := Ioc (-(T / 2)) (T / 2)\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\n⊢ ↑↑volume (Metric.closedBall x ε) = ENNReal.ofReal (min T (2 * ε))\n[PROOFSTEP]\nhave h₁ : ε < T / 2 → Metric.closedBall (0 : ℝ) ε ∩ I = Metric.closedBall (0 : ℝ) ε :=\n  by\n  intro hε\n  rw [inter_eq_left_iff_subset, Real.closedBall_eq_Icc, zero_sub, zero_add]\n  rintro y ⟨hy₁, hy₂⟩; constructor <;> linarith\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\n⊢ ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\n[PROOFSTEP]\nintro hε\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nhε : ε < T / 2\n⊢ Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\n[PROOFSTEP]\nrw [inter_eq_left_iff_subset, Real.closedBall_eq_Icc, zero_sub, zero_add]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nhε : ε < T / 2\n⊢ Icc (-ε) ε ⊆ I\n[PROOFSTEP]\nrintro y ⟨hy₁, hy₂⟩\n[GOAL]\ncase intro\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nhε : ε < T / 2\ny : ℝ\nhy₁ : -ε ≤ y\nhy₂ : y ≤ ε\n⊢ y ∈ I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.left\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nhε : ε < T / 2\ny : ℝ\nhy₁ : -ε ≤ y\nhy₂ : y ≤ ε\n⊢ -(T / 2) < y\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase intro.right\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nhε : ε < T / 2\ny : ℝ\nhy₁ : -ε ≤ y\nhy₂ : y ≤ ε\n⊢ y ≤ T / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\n⊢ ↑↑volume (Metric.closedBall x ε) = ENNReal.ofReal (min T (2 * ε))\n[PROOFSTEP]\nhave h₂ : (↑) ⁻¹' Metric.closedBall (0 : AddCircle T) ε ∩ I = if ε < T / 2 then Metric.closedBall (0 : ℝ) ε else I :=\n  by\n  conv_rhs => rw [← if_ctx_congr (Iff.rfl : ε < T / 2 ↔ ε < T / 2) h₁ fun _ => rfl, ← hT']\n  apply coe_real_preimage_closedBall_inter_eq\n  simpa only [hT', Real.closedBall_eq_Icc, zero_add, zero_sub] using Ioc_subset_Icc_self\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\n⊢ QuotientAddGroup.mk ⁻¹' Metric.closedBall 0 ε ∩ I = if ε < T / 2 then Metric.closedBall 0 ε else I\n[PROOFSTEP]\nconv_rhs => rw [← if_ctx_congr (Iff.rfl : ε < T / 2 ↔ ε < T / 2) h₁ fun _ => rfl, ← hT']\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\n| if ε < T / 2 then Metric.closedBall 0 ε else I\n[PROOFSTEP]\nrw [← if_ctx_congr (Iff.rfl : ε < T / 2 ↔ ε < T / 2) h₁ fun _ => rfl, ← hT']\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\n| if ε < T / 2 then Metric.closedBall 0 ε else I\n[PROOFSTEP]\nrw [← if_ctx_congr (Iff.rfl : ε < T / 2 ↔ ε < T / 2) h₁ fun _ => rfl, ← hT']\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\n| if ε < T / 2 then Metric.closedBall 0 ε else I\n[PROOFSTEP]\nrw [← if_ctx_congr (Iff.rfl : ε < T / 2 ↔ ε < T / 2) h₁ fun _ => rfl, ← hT']\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\n⊢ QuotientAddGroup.mk ⁻¹' Metric.closedBall 0 ε ∩ I = if ε < |T| / 2 then Metric.closedBall 0 ε ∩ I else I\n[PROOFSTEP]\napply coe_real_preimage_closedBall_inter_eq\n[GOAL]\ncase hs\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\n⊢ I ⊆ Metric.closedBall 0 (|T| / 2)\n[PROOFSTEP]\nsimpa only [hT', Real.closedBall_eq_Icc, zero_add, zero_sub] using Ioc_subset_Icc_self\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\nh₂ : QuotientAddGroup.mk ⁻¹' Metric.closedBall 0 ε ∩ I = if ε < T / 2 then Metric.closedBall 0 ε else I\n⊢ ↑↑volume (Metric.closedBall x ε) = ENNReal.ofReal (min T (2 * ε))\n[PROOFSTEP]\nrw [addHaar_closedBall_center]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\nh₂ : QuotientAddGroup.mk ⁻¹' Metric.closedBall 0 ε ∩ I = if ε < T / 2 then Metric.closedBall 0 ε else I\n⊢ ↑↑volume (Metric.closedBall 0 ε) = ENNReal.ofReal (min T (2 * ε))\n[PROOFSTEP]\nsimp only [restrict_apply' measurableSet_Ioc, (by linarith : -(T / 2) + T = T / 2), h₂, ←\n  (AddCircle.measurePreserving_mk T (-(T / 2))).measure_preimage measurableSet_closedBall]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\nh₂ : QuotientAddGroup.mk ⁻¹' Metric.closedBall 0 ε ∩ I = if ε < T / 2 then Metric.closedBall 0 ε else I\n⊢ -(T / 2) + T = T / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\nh₂ : QuotientAddGroup.mk ⁻¹' Metric.closedBall 0 ε ∩ I = if ε < T / 2 then Metric.closedBall 0 ε else I\n⊢ ↑↑volume (if ε < T / 2 then Metric.closedBall 0 ε else Ioc (-(T / 2)) (T / 2)) = ENNReal.ofReal (min T (2 * ε))\n[PROOFSTEP]\nby_cases hε : ε < T / 2\n[GOAL]\ncase pos\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\nh₂ : QuotientAddGroup.mk ⁻¹' Metric.closedBall 0 ε ∩ I = if ε < T / 2 then Metric.closedBall 0 ε else I\nhε : ε < T / 2\n⊢ ↑↑volume (if ε < T / 2 then Metric.closedBall 0 ε else Ioc (-(T / 2)) (T / 2)) = ENNReal.ofReal (min T (2 * ε))\n[PROOFSTEP]\nsimp [hε, min_eq_right (by linarith : 2 * ε ≤ T)]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\nh₂ : QuotientAddGroup.mk ⁻¹' Metric.closedBall 0 ε ∩ I = if ε < T / 2 then Metric.closedBall 0 ε else I\nhε : ε < T / 2\n⊢ 2 * ε ≤ T\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\nh₂ : QuotientAddGroup.mk ⁻¹' Metric.closedBall 0 ε ∩ I = if ε < T / 2 then Metric.closedBall 0 ε else I\nhε : ¬ε < T / 2\n⊢ ↑↑volume (if ε < T / 2 then Metric.closedBall 0 ε else Ioc (-(T / 2)) (T / 2)) = ENNReal.ofReal (min T (2 * ε))\n[PROOFSTEP]\nsimp [hε, min_eq_left (by linarith : T ≤ 2 * ε)]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nx : AddCircle T\nε : ℝ\nhT' : |T| = T\nI : Set ℝ := Ioc (-(T / 2)) (T / 2)\nh₁ : ε < T / 2 → Metric.closedBall 0 ε ∩ I = Metric.closedBall 0 ε\nh₂ : QuotientAddGroup.mk ⁻¹' Metric.closedBall 0 ε ∩ I = if ε < T / 2 then Metric.closedBall 0 ε else I\nhε : ¬ε < T / 2\n⊢ T ≤ 2 * ε\n[PROOFSTEP]\nlinarith\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\n⊢ IsUnifLocDoublingMeasure volume\n[PROOFSTEP]\nrefine' ⟨⟨Real.toNNReal 2, Filter.eventually_of_forall fun ε x => _⟩⟩\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nε : ℝ\nx : AddCircle T\n⊢ ↑↑volume (Metric.closedBall x (2 * ε)) ≤ ↑(Real.toNNReal 2) * ↑↑volume (Metric.closedBall x ε)\n[PROOFSTEP]\nsimp only [volume_closedBall]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nε : ℝ\nx : AddCircle T\n⊢ ENNReal.ofReal (min T (2 * (2 * ε))) ≤ ↑(Real.toNNReal 2) * ENNReal.ofReal (min T (2 * ε))\n[PROOFSTEP]\nerw [← ENNReal.ofReal_mul zero_le_two]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nε : ℝ\nx : AddCircle T\n⊢ ENNReal.ofReal (min T (2 * (2 * ε))) ≤ ENNReal.ofReal (2 * min T (2 * ε))\n[PROOFSTEP]\napply ENNReal.ofReal_le_ofReal\n[GOAL]\ncase h\nT : ℝ\nhT : Fact (0 < T)\nε : ℝ\nx : AddCircle T\n⊢ min T (2 * (2 * ε)) ≤ 2 * min T (2 * ε)\n[PROOFSTEP]\nrw [mul_min_of_nonneg _ _ (zero_le_two : (0 : ℝ) ≤ 2)]\n[GOAL]\ncase h\nT : ℝ\nhT : Fact (0 < T)\nε : ℝ\nx : AddCircle T\n⊢ min T (2 * (2 * ε)) ≤ min (2 * T) (2 * (2 * ε))\n[PROOFSTEP]\nexact min_le_min (by linarith [hT.out]) (le_refl _)\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nε : ℝ\nx : AddCircle T\n⊢ T ≤ 2 * T\n[PROOFSTEP]\nlinarith [hT.out]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\n⊢ ∫⁻ (a : ℝ) in Ioc t (t + T), f ↑a = ∫⁻ (b : AddCircle T), f b\n[PROOFSTEP]\nhave m : MeasurableSet (Ioc t (t + T)) := measurableSet_Ioc\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\n⊢ ∫⁻ (a : ℝ) in Ioc t (t + T), f ↑a = ∫⁻ (b : AddCircle T), f b\n[PROOFSTEP]\nhave := lintegral_map_equiv (μ := volume) f (measurableEquivIoc T t).symm\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\nthis :\n  ∫⁻ (a : AddCircle T), f a ∂Measure.map (↑(MeasurableEquiv.symm (measurableEquivIoc T t))) volume =\n    ∫⁻ (a : ↑(Ioc t (t + T))), f (↑(MeasurableEquiv.symm (measurableEquivIoc T t)) a)\n⊢ ∫⁻ (a : ℝ) in Ioc t (t + T), f ↑a = ∫⁻ (b : AddCircle T), f b\n[PROOFSTEP]\nsimp only [measurableEquivIoc, equivIoc, QuotientAddGroup.equivIocMod, MeasurableEquiv.symm_mk, MeasurableEquiv.coe_mk,\n  Equiv.coe_fn_symm_mk] at this \n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\nthis : ∫⁻ (a : AddCircle T), f a ∂Measure.map (fun x => ↑↑x) volume = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\n⊢ ∫⁻ (a : ℝ) in Ioc t (t + T), f ↑a = ∫⁻ (b : AddCircle T), f b\n[PROOFSTEP]\nrw [← (AddCircle.measurePreserving_mk T t).map_eq]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\nthis : ∫⁻ (a : AddCircle T), f a ∂Measure.map (fun x => ↑↑x) volume = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\n⊢ ∫⁻ (a : ℝ) in Ioc t (t + T), f ↑a =\n    ∫⁻ (b : AddCircle T), f b ∂Measure.map QuotientAddGroup.mk (Measure.restrict volume (Ioc t (t + T)))\n[PROOFSTEP]\nconvert this.symm using 1\n[GOAL]\ncase h.e'_2\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\nthis : ∫⁻ (a : AddCircle T), f a ∂Measure.map (fun x => ↑↑x) volume = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\n⊢ ∫⁻ (a : ℝ) in Ioc t (t + T), f ↑a = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\n[PROOFSTEP]\nrw [← map_comap_subtype_coe m _]\n[GOAL]\ncase h.e'_2\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\nthis : ∫⁻ (a : AddCircle T), f a ∂Measure.map (fun x => ↑↑x) volume = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\n⊢ ∫⁻ (a : ℝ), f ↑a ∂Measure.map Subtype.val (Measure.comap Subtype.val volume) = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\n[PROOFSTEP]\nexact MeasurableEmbedding.lintegral_map (MeasurableEmbedding.subtype_coe m) _\n[GOAL]\ncase h.e'_3\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\nthis : ∫⁻ (a : AddCircle T), f a ∂Measure.map (fun x => ↑↑x) volume = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\n⊢ ∫⁻ (b : AddCircle T), f b ∂Measure.map QuotientAddGroup.mk (Measure.restrict volume (Ioc t (t + T))) =\n    ∫⁻ (a : AddCircle T), f a ∂Measure.map (fun x => ↑↑x) volume\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_3.e_μ\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\nthis : ∫⁻ (a : AddCircle T), f a ∂Measure.map (fun x => ↑↑x) volume = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\n⊢ Measure.map QuotientAddGroup.mk (Measure.restrict volume (Ioc t (t + T))) = Measure.map (fun x => ↑↑x) volume\n[PROOFSTEP]\nhave : ((↑) : Ioc t (t + T) → AddCircle T) = ((↑) : ℝ → AddCircle T) ∘ ((↑) : _ → ℝ) := by ext1 x; rfl\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\nthis : ∫⁻ (a : AddCircle T), f a ∂Measure.map (fun x => ↑↑x) volume = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\n⊢ (fun x => ↑↑x) = QuotientAddGroup.mk ∘ Subtype.val\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\nthis : ∫⁻ (a : AddCircle T), f a ∂Measure.map (fun x => ↑↑x) volume = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\nx : ↑(Ioc t (t + T))\n⊢ ↑↑x = (QuotientAddGroup.mk ∘ Subtype.val) x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3.e_μ\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\nthis✝ : ∫⁻ (a : AddCircle T), f a ∂Measure.map (fun x => ↑↑x) volume = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\nthis : (fun x => ↑↑x) = QuotientAddGroup.mk ∘ Subtype.val\n⊢ Measure.map QuotientAddGroup.mk (Measure.restrict volume (Ioc t (t + T))) = Measure.map (fun x => ↑↑x) volume\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\ncase h.e'_3.e_μ\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\nthis✝ : ∫⁻ (a : AddCircle T), f a ∂Measure.map (fun x => ↑↑x) volume = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\nthis : (fun x => ↑↑x) = QuotientAddGroup.mk ∘ Subtype.val\n⊢ Measure.map QuotientAddGroup.mk (Measure.restrict volume (Ioc t (t + T))) =\n    Measure.map (QuotientAddGroup.mk ∘ Subtype.val) volume\n[PROOFSTEP]\nrw [← map_map AddCircle.measurable_mk' measurable_subtype_coe, ← map_comap_subtype_coe m]\n[GOAL]\ncase h.e'_3.e_μ\nT : ℝ\nhT : Fact (0 < T)\nt : ℝ\nf : AddCircle T → ℝ≥0∞\nm : MeasurableSet (Ioc t (t + T))\nthis✝ : ∫⁻ (a : AddCircle T), f a ∂Measure.map (fun x => ↑↑x) volume = ∫⁻ (a : ↑(Ioc t (t + T))), f ↑↑a\nthis : (fun x => ↑↑x) = QuotientAddGroup.mk ∘ Subtype.val\n⊢ Measure.map QuotientAddGroup.mk (Measure.map Subtype.val (Measure.comap Subtype.val volume)) =\n    Measure.map QuotientAddGroup.mk (Measure.map Subtype.val volume)\n[PROOFSTEP]\nrfl\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nt : ℝ\nf : AddCircle T → E\n⊢ ∫ (a : ℝ) in Ioc t (t + T), f ↑a = ∫ (b : AddCircle T), f b\n[PROOFSTEP]\nhave m : MeasurableSet (Ioc t (t + T)) := measurableSet_Ioc\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nt : ℝ\nf : AddCircle T → E\nm : MeasurableSet (Ioc t (t + T))\n⊢ ∫ (a : ℝ) in Ioc t (t + T), f ↑a = ∫ (b : AddCircle T), f b\n[PROOFSTEP]\nhave := integral_map_equiv (μ := volume) (measurableEquivIoc T t).symm f\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nt : ℝ\nf : AddCircle T → E\nm : MeasurableSet (Ioc t (t + T))\nthis :\n  ∫ (y : AddCircle T), f y ∂Measure.map (↑(MeasurableEquiv.symm (measurableEquivIoc T t))) volume =\n    ∫ (x : ↑(Ioc t (t + T))), f (↑(MeasurableEquiv.symm (measurableEquivIoc T t)) x)\n⊢ ∫ (a : ℝ) in Ioc t (t + T), f ↑a = ∫ (b : AddCircle T), f b\n[PROOFSTEP]\nsimp only [measurableEquivIoc, equivIoc, QuotientAddGroup.equivIocMod, MeasurableEquiv.symm_mk, MeasurableEquiv.coe_mk,\n  Equiv.coe_fn_symm_mk] at this \n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nt : ℝ\nf : AddCircle T → E\nm : MeasurableSet (Ioc t (t + T))\nthis : ∫ (y : AddCircle T), f y ∂Measure.map (fun x => ↑↑x) volume = ∫ (x : ↑(Ioc t (t + T))), f ↑↑x\n⊢ ∫ (a : ℝ) in Ioc t (t + T), f ↑a = ∫ (b : AddCircle T), f b\n[PROOFSTEP]\nrw [← (AddCircle.measurePreserving_mk T t).map_eq, set_integral_eq_subtype m, ← this]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nt : ℝ\nf : AddCircle T → E\nm : MeasurableSet (Ioc t (t + T))\nthis : ∫ (y : AddCircle T), f y ∂Measure.map (fun x => ↑↑x) volume = ∫ (x : ↑(Ioc t (t + T))), f ↑↑x\n⊢ ∫ (y : AddCircle T), f y ∂Measure.map (fun x => ↑↑x) volume =\n    ∫ (b : AddCircle T), f b ∂Measure.map QuotientAddGroup.mk (Measure.restrict volume (Ioc t (t + T)))\n[PROOFSTEP]\nhave : ((↑) : Ioc t (t + T) → AddCircle T) = ((↑) : ℝ → AddCircle T) ∘ ((↑) : _ → ℝ) := by ext1 x; rfl\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nt : ℝ\nf : AddCircle T → E\nm : MeasurableSet (Ioc t (t + T))\nthis : ∫ (y : AddCircle T), f y ∂Measure.map (fun x => ↑↑x) volume = ∫ (x : ↑(Ioc t (t + T))), f ↑↑x\n⊢ (fun x => ↑↑x) = QuotientAddGroup.mk ∘ Subtype.val\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nT : ℝ\nhT : Fact (0 < T)\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nt : ℝ\nf : AddCircle T → E\nm : MeasurableSet (Ioc t (t + T))\nthis : ∫ (y : AddCircle T), f y ∂Measure.map (fun x => ↑↑x) volume = ∫ (x : ↑(Ioc t (t + T))), f ↑↑x\nx : ↑(Ioc t (t + T))\n⊢ ↑↑x = (QuotientAddGroup.mk ∘ Subtype.val) x\n[PROOFSTEP]\nrfl\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nt : ℝ\nf : AddCircle T → E\nm : MeasurableSet (Ioc t (t + T))\nthis✝ : ∫ (y : AddCircle T), f y ∂Measure.map (fun x => ↑↑x) volume = ∫ (x : ↑(Ioc t (t + T))), f ↑↑x\nthis : (fun x => ↑↑x) = QuotientAddGroup.mk ∘ Subtype.val\n⊢ ∫ (y : AddCircle T), f y ∂Measure.map (fun x => ↑↑x) volume =\n    ∫ (b : AddCircle T), f b ∂Measure.map QuotientAddGroup.mk (Measure.restrict volume (Ioc t (t + T)))\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nt : ℝ\nf : AddCircle T → E\nm : MeasurableSet (Ioc t (t + T))\nthis✝ : ∫ (y : AddCircle T), f y ∂Measure.map (fun x => ↑↑x) volume = ∫ (x : ↑(Ioc t (t + T))), f ↑↑x\nthis : (fun x => ↑↑x) = QuotientAddGroup.mk ∘ Subtype.val\n⊢ ∫ (y : AddCircle T), f y ∂Measure.map (QuotientAddGroup.mk ∘ Subtype.val) volume =\n    ∫ (y : AddCircle T), f y ∂Measure.map QuotientAddGroup.mk (Measure.restrict volume (Ioc t (t + T)))\n[PROOFSTEP]\nrw [← map_map AddCircle.measurable_mk' measurable_subtype_coe, ← map_comap_subtype_coe m]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nt : ℝ\nf : AddCircle T → E\nm : MeasurableSet (Ioc t (t + T))\nthis✝ : ∫ (y : AddCircle T), f y ∂Measure.map (fun x => ↑↑x) volume = ∫ (x : ↑(Ioc t (t + T))), f ↑↑x\nthis : (fun x => ↑↑x) = QuotientAddGroup.mk ∘ Subtype.val\n⊢ ∫ (y : AddCircle T), f y ∂Measure.map QuotientAddGroup.mk (Measure.map Subtype.val volume) =\n    ∫ (y : AddCircle T),\n      f y ∂Measure.map QuotientAddGroup.mk (Measure.map Subtype.val (Measure.comap Subtype.val volume))\n[PROOFSTEP]\nrfl\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nt : ℝ\nf : AddCircle T → E\n⊢ ∫ (a : ℝ) in t..t + T, f ↑a = ∫ (b : AddCircle T), f b\n[PROOFSTEP]\nrw [integral_of_le, AddCircle.integral_preimage T t f]\n[GOAL]\nT : ℝ\nhT : Fact (0 < T)\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nt : ℝ\nf : AddCircle T → E\n⊢ t ≤ t + T\n[PROOFSTEP]\nlinarith [hT.out]\n[GOAL]\n⊢ ↑↑volume univ = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nhT : 0 < T\nt s : ℝ\n⊢ ∫ (x : ℝ) in t..t + T, f x = ∫ (x : ℝ) in s..s + T, f x\n[PROOFSTEP]\nsimp only [integral_of_le, hT.le, le_add_iff_nonneg_right]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nhT : 0 < T\nt s : ℝ\n⊢ ∫ (x : ℝ) in Ioc t (t + T), f x = ∫ (x : ℝ) in Ioc s (s + T), f x\n[PROOFSTEP]\nhaveI : VAddInvariantMeasure (AddSubgroup.zmultiples T) ℝ volume := ⟨fun c s _ => measure_preimage_add _ _ _⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nhT : 0 < T\nt s : ℝ\nthis : VAddInvariantMeasure { x // x ∈ zmultiples T } ℝ volume\n⊢ ∫ (x : ℝ) in Ioc t (t + T), f x = ∫ (x : ℝ) in Ioc s (s + T), f x\n[PROOFSTEP]\napply IsAddFundamentalDomain.set_integral_eq (G := AddSubgroup.zmultiples T)\n[GOAL]\ncase hs\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nhT : 0 < T\nt s : ℝ\nthis : VAddInvariantMeasure { x // x ∈ zmultiples T } ℝ volume\n⊢ IsAddFundamentalDomain { x // x ∈ zmultiples T } (Ioc t (t + T))\ncase ht\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nhT : 0 < T\nt s : ℝ\nthis : VAddInvariantMeasure { x // x ∈ zmultiples T } ℝ volume\n⊢ IsAddFundamentalDomain { x // x ∈ zmultiples T } (Ioc s (s + T))\ncase hf\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nhT : 0 < T\nt s : ℝ\nthis : VAddInvariantMeasure { x // x ∈ zmultiples T } ℝ volume\n⊢ ∀ (g : { x // x ∈ zmultiples T }) (x : ℝ), f (g +ᵥ x) = f x\n[PROOFSTEP]\nexacts [isAddFundamentalDomain_Ioc hT t, isAddFundamentalDomain_Ioc hT s, hf.map_vadd_zmultiples]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt s : ℝ\n⊢ ∫ (x : ℝ) in t..t + T, f x = ∫ (x : ℝ) in s..s + T, f x\n[PROOFSTEP]\nrcases lt_trichotomy (0 : ℝ) T with (hT | rfl | hT)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt s : ℝ\nhT : 0 < T\n⊢ ∫ (x : ℝ) in t..t + T, f x = ∫ (x : ℝ) in s..s + T, f x\n[PROOFSTEP]\nexact hf.intervalIntegral_add_eq_of_pos hT t s\n[GOAL]\ncase inr.inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nt s : ℝ\nhf : Periodic f 0\n⊢ ∫ (x : ℝ) in t..t + 0, f x = ∫ (x : ℝ) in s..s + 0, f x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt s : ℝ\nhT : T < 0\n⊢ ∫ (x : ℝ) in t..t + T, f x = ∫ (x : ℝ) in s..s + T, f x\n[PROOFSTEP]\nrw [← neg_inj, ← integral_symm, ← integral_symm]\n[GOAL]\ncase inr.inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt s : ℝ\nhT : T < 0\n⊢ ∫ (x : ℝ) in t + T..t, f x = ∫ (x : ℝ) in s + T..s, f x\n[PROOFSTEP]\nsimpa only [← sub_eq_add_neg, add_sub_cancel] using hf.neg.intervalIntegral_add_eq_of_pos (neg_pos.2 hT) (t + T) (s + T)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt s : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\n⊢ ∫ (x : ℝ) in t..s + T, f x = (∫ (x : ℝ) in t..s, f x) + ∫ (x : ℝ) in t..t + T, f x\n[PROOFSTEP]\nrw [hf.intervalIntegral_add_eq t s, integral_add_adjacent_intervals (h_int t s) (h_int s _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nn : ℤ\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\n⊢ ∫ (x : ℝ) in t..t + n • T, f x = n • ∫ (x : ℝ) in t..t + T, f x\n[PROOFSTEP]\nsuffices (∫ x in (0)..(n • T), f x) = n • ∫ x in (0)..T, f x by\n  simp only [hf.intervalIntegral_add_eq t 0, (hf.zsmul n).intervalIntegral_add_eq t 0, zero_add, this]\n    -- First prove it for natural numbers\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nn : ℤ\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nthis : ∫ (x : ℝ) in 0 ..n • T, f x = n • ∫ (x : ℝ) in 0 ..T, f x\n⊢ ∫ (x : ℝ) in t..t + n • T, f x = n • ∫ (x : ℝ) in t..t + T, f x\n[PROOFSTEP]\nsimp only [hf.intervalIntegral_add_eq t 0, (hf.zsmul n).intervalIntegral_add_eq t 0, zero_add, this]\n  -- First prove it for natural numbers\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nn : ℤ\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\n⊢ ∫ (x : ℝ) in 0 ..n • T, f x = n • ∫ (x : ℝ) in 0 ..T, f x\n[PROOFSTEP]\nhave : ∀ m : ℕ, (∫ x in (0)..m • T, f x) = m • ∫ x in (0)..T, f x := fun m ↦\n  by\n  induction' m with m ih\n  · simp\n  ·\n    simp only [succ_nsmul', hf.intervalIntegral_add_eq_add 0 (m • T) h_int, ih, zero_add]\n      -- Then prove it for all integers\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nn : ℤ\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nm : ℕ\n⊢ ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\n[PROOFSTEP]\ninduction' m with m ih\n[GOAL]\ncase zero\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nn : ℤ\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\n⊢ ∫ (x : ℝ) in 0 ..Nat.zero • T, f x = Nat.zero • ∫ (x : ℝ) in 0 ..T, f x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nn : ℤ\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nm : ℕ\nih : ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\n⊢ ∫ (x : ℝ) in 0 ..Nat.succ m • T, f x = Nat.succ m • ∫ (x : ℝ) in 0 ..T, f x\n[PROOFSTEP]\nsimp only [succ_nsmul', hf.intervalIntegral_add_eq_add 0 (m • T) h_int, ih, zero_add]\n  -- Then prove it for all integers\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nn : ℤ\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nthis : ∀ (m : ℕ), ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\n⊢ ∫ (x : ℝ) in 0 ..n • T, f x = n • ∫ (x : ℝ) in 0 ..T, f x\n[PROOFSTEP]\ncases' n with n n\n[GOAL]\ncase ofNat\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nthis : ∀ (m : ℕ), ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\nn : ℕ\n⊢ ∫ (x : ℝ) in 0 ..Int.ofNat n • T, f x = Int.ofNat n • ∫ (x : ℝ) in 0 ..T, f x\n[PROOFSTEP]\nsimp [← this n]\n[GOAL]\ncase negSucc\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nthis : ∀ (m : ℕ), ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\nn : ℕ\n⊢ ∫ (x : ℝ) in 0 ..Int.negSucc n • T, f x = Int.negSucc n • ∫ (x : ℝ) in 0 ..T, f x\n[PROOFSTEP]\nconv_rhs => rw [negSucc_zsmul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nthis : ∀ (m : ℕ), ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\nn : ℕ\n| Int.negSucc n • ∫ (x : ℝ) in 0 ..T, f x\n[PROOFSTEP]\nrw [negSucc_zsmul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nthis : ∀ (m : ℕ), ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\nn : ℕ\n| Int.negSucc n • ∫ (x : ℝ) in 0 ..T, f x\n[PROOFSTEP]\nrw [negSucc_zsmul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nthis : ∀ (m : ℕ), ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\nn : ℕ\n| Int.negSucc n • ∫ (x : ℝ) in 0 ..T, f x\n[PROOFSTEP]\nrw [negSucc_zsmul]\n[GOAL]\ncase negSucc\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nthis : ∀ (m : ℕ), ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\nn : ℕ\n⊢ ∫ (x : ℝ) in 0 ..Int.negSucc n • T, f x = -((n + 1) • ∫ (x : ℝ) in 0 ..T, f x)\n[PROOFSTEP]\nhave h₀ : Int.negSucc n • T + (n + 1) • T = 0 := by simp; linarith\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nthis : ∀ (m : ℕ), ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\nn : ℕ\n⊢ Int.negSucc n • T + (n + 1) • T = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nthis : ∀ (m : ℕ), ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\nn : ℕ\n⊢ (-1 + -↑n) * T + (↑n + 1) * T = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase negSucc\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nthis : ∀ (m : ℕ), ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\nn : ℕ\nh₀ : Int.negSucc n • T + (n + 1) • T = 0\n⊢ ∫ (x : ℝ) in 0 ..Int.negSucc n • T, f x = -((n + 1) • ∫ (x : ℝ) in 0 ..T, f x)\n[PROOFSTEP]\nrw [integral_symm, ← (hf.nsmul (n + 1)).funext, neg_inj]\n[GOAL]\ncase negSucc\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\nhf : Periodic f T\nt : ℝ\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable f volume t₁ t₂\nthis : ∀ (m : ℕ), ∫ (x : ℝ) in 0 ..m • T, f x = m • ∫ (x : ℝ) in 0 ..T, f x\nn : ℕ\nh₀ : Int.negSucc n • T + (n + 1) • T = 0\n⊢ ∫ (x : ℝ) in Int.negSucc n • T..0, (fun x => f (x + (n + 1) • T)) x =\n    (n + 1) • ∫ (x : ℝ) in 0 ..T, (fun x => f (x + (n + 1) • T)) x\n[PROOFSTEP]\nsimp_rw [integral_comp_add_right, h₀, zero_add, this (n + 1), add_comm T, hf.intervalIntegral_add_eq ((n + 1) • T) 0,\n  zero_add]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\n⊢ sInf ((fun t => ∫ (x : ℝ) in 0 ..t, g x) '' Icc 0 T) + ⌊t / T⌋ • ∫ (x : ℝ) in 0 ..T, g x ≤ ∫ (x : ℝ) in 0 ..t, g x\n[PROOFSTEP]\nlet ε := Int.fract (t / T) * T\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n⊢ sInf ((fun t => ∫ (x : ℝ) in 0 ..t, g x) '' Icc 0 T) + ⌊t / T⌋ • ∫ (x : ℝ) in 0 ..T, g x ≤ ∫ (x : ℝ) in 0 ..t, g x\n[PROOFSTEP]\nconv_rhs =>\n  rw [← Int.fract_div_mul_self_add_zsmul_eq T t (by linarith), ←\n    integral_add_adjacent_intervals (h_int 0 ε) (h_int _ _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n| ∫ (x : ℝ) in 0 ..t, g x\n[PROOFSTEP]\nrw [← Int.fract_div_mul_self_add_zsmul_eq T t (by linarith), ← integral_add_adjacent_intervals (h_int 0 ε) (h_int _ _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n| ∫ (x : ℝ) in 0 ..t, g x\n[PROOFSTEP]\nrw [← Int.fract_div_mul_self_add_zsmul_eq T t (by linarith), ← integral_add_adjacent_intervals (h_int 0 ε) (h_int _ _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n| ∫ (x : ℝ) in 0 ..t, g x\n[PROOFSTEP]\nrw [← Int.fract_div_mul_self_add_zsmul_eq T t (by linarith), ← integral_add_adjacent_intervals (h_int 0 ε) (h_int _ _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n⊢ T ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n⊢ sInf ((fun t => ∫ (x : ℝ) in 0 ..t, g x) '' Icc 0 T) + ⌊t / T⌋ • ∫ (x : ℝ) in 0 ..T, g x ≤\n    (∫ (x : ℝ) in 0 ..ε, g x) + ∫ (x : ℝ) in ε..Int.fract (t / T) * T + ⌊t / T⌋ • T, g x\n[PROOFSTEP]\nrw [hg.intervalIntegral_add_zsmul_eq ⌊t / T⌋ ε h_int, hg.intervalIntegral_add_eq ε 0, zero_add, add_le_add_iff_right]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n⊢ sInf ((fun t => ∫ (x : ℝ) in 0 ..t, g x) '' Icc 0 T) ≤ ∫ (x : ℝ) in 0 ..ε, g x\n[PROOFSTEP]\nexact\n  (continuous_primitive h_int 0).continuousOn.sInf_image_Icc_le <|\n    mem_Icc_of_Ico (Int.fract_div_mul_self_mem_Ico T t hT)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\n⊢ ∫ (x : ℝ) in 0 ..t, g x ≤ sSup ((fun t => ∫ (x : ℝ) in 0 ..t, g x) '' Icc 0 T) + ⌊t / T⌋ • ∫ (x : ℝ) in 0 ..T, g x\n[PROOFSTEP]\nlet ε := Int.fract (t / T) * T\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n⊢ ∫ (x : ℝ) in 0 ..t, g x ≤ sSup ((fun t => ∫ (x : ℝ) in 0 ..t, g x) '' Icc 0 T) + ⌊t / T⌋ • ∫ (x : ℝ) in 0 ..T, g x\n[PROOFSTEP]\nconv_lhs =>\n  rw [← Int.fract_div_mul_self_add_zsmul_eq T t (by linarith), ←\n    integral_add_adjacent_intervals (h_int 0 ε) (h_int _ _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n| ∫ (x : ℝ) in 0 ..t, g x\n[PROOFSTEP]\nrw [← Int.fract_div_mul_self_add_zsmul_eq T t (by linarith), ← integral_add_adjacent_intervals (h_int 0 ε) (h_int _ _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n| ∫ (x : ℝ) in 0 ..t, g x\n[PROOFSTEP]\nrw [← Int.fract_div_mul_self_add_zsmul_eq T t (by linarith), ← integral_add_adjacent_intervals (h_int 0 ε) (h_int _ _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n| ∫ (x : ℝ) in 0 ..t, g x\n[PROOFSTEP]\nrw [← Int.fract_div_mul_self_add_zsmul_eq T t (by linarith), ← integral_add_adjacent_intervals (h_int 0 ε) (h_int _ _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n⊢ T ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n⊢ (∫ (x : ℝ) in 0 ..ε, g x) + ∫ (x : ℝ) in ε..Int.fract (t / T) * T + ⌊t / T⌋ • T, g x ≤\n    sSup ((fun t => ∫ (x : ℝ) in 0 ..t, g x) '' Icc 0 T) + ⌊t / T⌋ • ∫ (x : ℝ) in 0 ..T, g x\n[PROOFSTEP]\nrw [hg.intervalIntegral_add_zsmul_eq ⌊t / T⌋ ε h_int, hg.intervalIntegral_add_eq ε 0, zero_add, add_le_add_iff_right]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nhT : 0 < T\nt : ℝ\nε : ℝ := Int.fract (t / T) * T\n⊢ ∫ (x : ℝ) in 0 ..ε, g x ≤ sSup ((fun t => ∫ (x : ℝ) in 0 ..t, g x) '' Icc 0 T)\n[PROOFSTEP]\nexact\n  (continuous_primitive h_int 0).continuousOn.le_sSup_image_Icc (mem_Icc_of_Ico (Int.fract_div_mul_self_mem_Ico T t hT))\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nh₀ : 0 < ∫ (x : ℝ) in 0 ..T, g x\nhT : 0 < T\n⊢ Tendsto (fun t => ∫ (x : ℝ) in 0 ..t, g x) atTop atTop\n[PROOFSTEP]\napply tendsto_atTop_mono (hg.sInf_add_zsmul_le_integral_of_pos h_int hT)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nh₀ : 0 < ∫ (x : ℝ) in 0 ..T, g x\nhT : 0 < T\n⊢ Tendsto (fun n => sInf ((fun t => ∫ (x : ℝ) in 0 ..t, g x) '' Icc 0 T) + ⌊n / T⌋ • ∫ (x : ℝ) in 0 ..T, g x) atTop\n    atTop\n[PROOFSTEP]\napply atTop.tendsto_atTop_add_const_left (sInf <| (fun t => ∫ x in (0)..t, g x) '' Icc 0 T)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nh₀ : 0 < ∫ (x : ℝ) in 0 ..T, g x\nhT : 0 < T\n⊢ Tendsto (fun x => ⌊x / T⌋ • ∫ (x : ℝ) in 0 ..T, g x) atTop atTop\n[PROOFSTEP]\napply Tendsto.atTop_zsmul_const h₀\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nh₀ : 0 < ∫ (x : ℝ) in 0 ..T, g x\nhT : 0 < T\n⊢ Tendsto (fun x => ⌊x / T⌋) atTop atTop\n[PROOFSTEP]\nexact tendsto_floor_atTop.comp (tendsto_id.atTop_mul_const (inv_pos.mpr hT))\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nh₀ : 0 < ∫ (x : ℝ) in 0 ..T, g x\nhT : 0 < T\n⊢ Tendsto (fun t => ∫ (x : ℝ) in 0 ..t, g x) atBot atBot\n[PROOFSTEP]\napply tendsto_atBot_mono (hg.integral_le_sSup_add_zsmul_of_pos h_int hT)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nh₀ : 0 < ∫ (x : ℝ) in 0 ..T, g x\nhT : 0 < T\n⊢ Tendsto (fun n => sSup ((fun t => ∫ (x : ℝ) in 0 ..t, g x) '' Icc 0 T) + ⌊n / T⌋ • ∫ (x : ℝ) in 0 ..T, g x) atBot\n    atBot\n[PROOFSTEP]\napply atBot.tendsto_atBot_add_const_left (sSup <| (fun t => ∫ x in (0)..t, g x) '' Icc 0 T)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nh₀ : 0 < ∫ (x : ℝ) in 0 ..T, g x\nhT : 0 < T\n⊢ Tendsto (fun x => ⌊x / T⌋ • ∫ (x : ℝ) in 0 ..T, g x) atBot atBot\n[PROOFSTEP]\napply Tendsto.atBot_zsmul_const h₀\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℝ → E\nT : ℝ\ng : ℝ → ℝ\nhg : Periodic g T\nh_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g volume t₁ t₂\nh₀ : 0 < ∫ (x : ℝ) in 0 ..T, g x\nhT : 0 < T\n⊢ Tendsto (fun x => ⌊x / T⌋) atBot atBot\n[PROOFSTEP]\nexact tendsto_floor_atBot.comp (tendsto_id.atBot_mul_const (inv_pos.mpr hT))\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Integral.Periodic", "llama_tokens": 23332, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.63341027751814, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.36095052607668915}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : SMul 𝕜 E\nS✝ T✝ S T : ConvexCone 𝕜 E\nh : S.carrier = T.carrier\n⊢ S = T\n[PROOFSTEP]\ncases S\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : SMul 𝕜 E\nS T✝ T : ConvexCone 𝕜 E\ncarrier✝ : Set E\nsmul_mem'✝ : ∀ ⦃c : 𝕜⦄, 0 < c → ∀ ⦃x : E⦄, x ∈ carrier✝ → c • x ∈ carrier✝\nadd_mem'✝ : ∀ ⦃x : E⦄, x ∈ carrier✝ → ∀ ⦃y : E⦄, y ∈ carrier✝ → x + y ∈ carrier✝\nh : { carrier := carrier✝, smul_mem' := smul_mem'✝, add_mem' := add_mem'✝ }.carrier = T.carrier\n⊢ { carrier := carrier✝, smul_mem' := smul_mem'✝, add_mem' := add_mem'✝ } = T\n[PROOFSTEP]\ncases T\n[GOAL]\ncase mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : SMul 𝕜 E\nS T : ConvexCone 𝕜 E\ncarrier✝¹ : Set E\nsmul_mem'✝¹ : ∀ ⦃c : 𝕜⦄, 0 < c → ∀ ⦃x : E⦄, x ∈ carrier✝¹ → c • x ∈ carrier✝¹\nadd_mem'✝¹ : ∀ ⦃x : E⦄, x ∈ carrier✝¹ → ∀ ⦃y : E⦄, y ∈ carrier✝¹ → x + y ∈ carrier✝¹\ncarrier✝ : Set E\nsmul_mem'✝ : ∀ ⦃c : 𝕜⦄, 0 < c → ∀ ⦃x : E⦄, x ∈ carrier✝ → c • x ∈ carrier✝\nadd_mem'✝ : ∀ ⦃x : E⦄, x ∈ carrier✝ → ∀ ⦃y : E⦄, y ∈ carrier✝ → x + y ∈ carrier✝\nh :\n  { carrier := carrier✝¹, smul_mem' := smul_mem'✝¹, add_mem' := add_mem'✝¹ }.carrier =\n    { carrier := carrier✝, smul_mem' := smul_mem'✝, add_mem' := add_mem'✝ }.carrier\n⊢ { carrier := carrier✝¹, smul_mem' := smul_mem'✝¹, add_mem' := add_mem'✝¹ } =\n    { carrier := carrier✝, smul_mem' := smul_mem'✝, add_mem' := add_mem'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : SMul 𝕜 E\nS T : ConvexCone 𝕜 E\nι : Sort u_5\nf : ι → ConvexCone 𝕜 E\n⊢ ↑(iInf f) = ⋂ (i : ι), ↑(f i)\n[PROOFSTEP]\nsimp [iInf]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : SMul 𝕜 E\nS T : ConvexCone 𝕜 E\nι : Sort u_5\nx : E\nf : ι → ConvexCone 𝕜 E\n⊢ (∀ (i : ConvexCone 𝕜 E), i ∈ Set.range f → x ∈ ↑i) ↔ ∀ (i : ι), x ∈ f i\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : LinearOrderedField 𝕜\ninst✝⁵ : AddCommMonoid E\ninst✝⁴ : AddCommMonoid F\ninst✝³ : AddCommMonoid G\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 F\ninst✝ : Module 𝕜 G\nf : E →ₗ[𝕜] F\nS : ConvexCone 𝕜 F\nc : 𝕜\nhc : 0 < c\nx : E\nhx : x ∈ ↑f ⁻¹' ↑S\n⊢ c • x ∈ ↑f ⁻¹' ↑S\n[PROOFSTEP]\nrw [mem_preimage, f.map_smul c]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : LinearOrderedField 𝕜\ninst✝⁵ : AddCommMonoid E\ninst✝⁴ : AddCommMonoid F\ninst✝³ : AddCommMonoid G\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 F\ninst✝ : Module 𝕜 G\nf : E →ₗ[𝕜] F\nS : ConvexCone 𝕜 F\nc : 𝕜\nhc : 0 < c\nx : E\nhx : x ∈ ↑f ⁻¹' ↑S\n⊢ c • ↑f x ∈ ↑S\n[PROOFSTEP]\nexact S.smul_mem hc hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : LinearOrderedField 𝕜\ninst✝⁵ : AddCommMonoid E\ninst✝⁴ : AddCommMonoid F\ninst✝³ : AddCommMonoid G\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 F\ninst✝ : Module 𝕜 G\nf : E →ₗ[𝕜] F\nS : ConvexCone 𝕜 F\nx : E\nhx : x ∈ ↑f ⁻¹' ↑S\ny : E\nhy : y ∈ ↑f ⁻¹' ↑S\n⊢ x + y ∈ ↑f ⁻¹' ↑S\n[PROOFSTEP]\nrw [mem_preimage, f.map_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : LinearOrderedField 𝕜\ninst✝⁵ : AddCommMonoid E\ninst✝⁴ : AddCommMonoid F\ninst✝³ : AddCommMonoid G\ninst✝² : Module 𝕜 E\ninst✝¹ : Module 𝕜 F\ninst✝ : Module 𝕜 G\nf : E →ₗ[𝕜] F\nS : ConvexCone 𝕜 F\nx : E\nhx : x ∈ ↑f ⁻¹' ↑S\ny : E\nhy : y ∈ ↑f ⁻¹' ↑S\n⊢ ↑f x + ↑f y ∈ ↑S\n[PROOFSTEP]\nexact S.add_mem hx hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : OrderedAddCommGroup E\ninst✝ : Module 𝕜 E\nS : ConvexCone 𝕜 E\nh : ∀ (x y : E), x ≤ y ↔ y - x ∈ S\n⊢ ∀ ⦃a b : E⦄ ⦃c : 𝕜⦄, a < b → 0 < c → c • a ≤ c • b\n[PROOFSTEP]\nintro x y z xy hz\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : OrderedAddCommGroup E\ninst✝ : Module 𝕜 E\nS : ConvexCone 𝕜 E\nh : ∀ (x y : E), x ≤ y ↔ y - x ∈ S\nx y : E\nz : 𝕜\nxy : x < y\nhz : 0 < z\n⊢ z • x ≤ z • y\n[PROOFSTEP]\nrw [h (z • x) (z • y), ← smul_sub z y x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : OrderedAddCommGroup E\ninst✝ : Module 𝕜 E\nS : ConvexCone 𝕜 E\nh : ∀ (x y : E), x ≤ y ↔ y - x ∈ S\nx y : E\nz : 𝕜\nxy : x < y\nhz : 0 < z\n⊢ z • (y - x) ∈ S\n[PROOFSTEP]\nexact smul_mem S hz ((h x y).mp xy.le)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : SMul 𝕜 E\nS✝ S : ConvexCone 𝕜 E\n⊢ Blunt S ↔ ¬Pointed S\n[PROOFSTEP]\nrw [pointed_iff_not_blunt, Classical.not_not]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS✝ S : ConvexCone 𝕜 E\n⊢ Salient S ↔ ¬Flat S\n[PROOFSTEP]\nsimp [Salient, Flat]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS✝ S : ConvexCone 𝕜 E\nhS : Flat S\n⊢ Pointed S\n[PROOFSTEP]\nobtain ⟨x, hx, _, hxneg⟩ := hS\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS✝ S : ConvexCone 𝕜 E\nx : E\nhx : x ∈ S\nleft✝ : x ≠ 0\nhxneg : -x ∈ S\n⊢ Pointed S\n[PROOFSTEP]\nrw [Pointed, ← add_neg_self x]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS✝ S : ConvexCone 𝕜 E\nx : E\nhx : x ∈ S\nleft✝ : x ≠ 0\nhxneg : -x ∈ S\n⊢ x + -x ∈ S\n[PROOFSTEP]\nexact add_mem S hx hxneg\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS✝ S : ConvexCone 𝕜 E\n⊢ Blunt S → Salient S\n[PROOFSTEP]\nrw [salient_iff_not_flat, blunt_iff_not_pointed]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS✝ S : ConvexCone 𝕜 E\n⊢ ¬Pointed S → ¬Flat S\n[PROOFSTEP]\nexact mt Flat.pointed\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nx : E\n⊢ x ≤ x\n[PROOFSTEP]\nchange x - x ∈ S\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nx : E\n⊢ x - x ∈ S\n[PROOFSTEP]\nrw [sub_self x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nx : E\n⊢ 0 ∈ S\n[PROOFSTEP]\nexact h₁\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nx y z : E\nxy : x ≤ y\nzy : y ≤ z\n⊢ x ≤ z\n[PROOFSTEP]\nsimpa using add_mem S zy xy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nh₂ : Salient S\nsrc✝ : Preorder E := toPreorder S h₁\n⊢ ∀ (a b : E), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nintro a b ab ba\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nh₂ : Salient S\nsrc✝ : Preorder E := toPreorder S h₁\na b : E\nab : a ≤ b\nba : b ≤ a\n⊢ a = b\n[PROOFSTEP]\nby_contra h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nh₂ : Salient S\nsrc✝ : Preorder E := toPreorder S h₁\na b : E\nab : a ≤ b\nba : b ≤ a\nh : ¬a = b\n⊢ False\n[PROOFSTEP]\nhave h' : b - a ≠ 0 := fun h'' => h (eq_of_sub_eq_zero h'').symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nh₂ : Salient S\nsrc✝ : Preorder E := toPreorder S h₁\na b : E\nab : a ≤ b\nba : b ≤ a\nh : ¬a = b\nh' : b - a ≠ 0\n⊢ False\n[PROOFSTEP]\nhave H := h₂ (b - a) ab h'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nh₂ : Salient S\nsrc✝ : Preorder E := toPreorder S h₁\na b : E\nab : a ≤ b\nba : b ≤ a\nh : ¬a = b\nh' : b - a ≠ 0\nH : ¬-(b - a) ∈ S\n⊢ False\n[PROOFSTEP]\nrw [neg_sub b a] at H \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nh₂ : Salient S\nsrc✝ : Preorder E := toPreorder S h₁\na b : E\nab : a ≤ b\nba : b ≤ a\nh : ¬a = b\nh' : b - a ≠ 0\nH : ¬a - b ∈ S\n⊢ False\n[PROOFSTEP]\nexact H ba\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nh₂ : Salient S\nsrc✝ : PartialOrder E := toPartialOrder S h₁ h₂\n⊢ AddCommGroup E\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nh₂ : Salient S\nsrc✝¹ : PartialOrder E := toPartialOrder S h₁ h₂\nsrc✝ : AddCommGroup E :=\n  let_fun this := inferInstance;\n  this\n⊢ ∀ (a b : E), a ≤ b → ∀ (c : E), c + a ≤ c + b\n[PROOFSTEP]\nintro a b hab c\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nh₂ : Salient S\nsrc✝¹ : PartialOrder E := toPartialOrder S h₁ h₂\nsrc✝ : AddCommGroup E :=\n  let_fun this := inferInstance;\n  this\na b : E\nhab : a ≤ b\nc : E\n⊢ c + a ≤ c + b\n[PROOFSTEP]\nchange c + b - (c + a) ∈ S\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nh₂ : Salient S\nsrc✝¹ : PartialOrder E := toPartialOrder S h₁ h₂\nsrc✝ : AddCommGroup E :=\n  let_fun this := inferInstance;\n  this\na b : E\nhab : a ≤ b\nc : E\n⊢ c + b - (c + a) ∈ S\n[PROOFSTEP]\nrw [add_sub_add_left_eq_sub]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : SMul 𝕜 E\nS : ConvexCone 𝕜 E\nh₁ : Pointed S\nh₂ : Salient S\nsrc✝¹ : PartialOrder E := toPartialOrder S h₁ h₂\nsrc✝ : AddCommGroup E :=\n  let_fun this := inferInstance;\n  this\na b : E\nhab : a ≤ b\nc : E\n⊢ b - a ∈ S\n[PROOFSTEP]\nexact hab\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nx✝¹ : 𝕜\nx✝ : 0 < x✝¹\n⊢ ∀ ⦃x : E⦄, x ∈ 0 → x✝¹ • x ∈ 0\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nx✝ : E\n⊢ x✝ ∈ 0 → ∀ ⦃y : E⦄, y ∈ 0 → x✝ + y ∈ 0\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\n⊢ Pointed 0\n[PROOFSTEP]\nrw [Pointed, mem_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nK₁ K₂ : ConvexCone 𝕜 E\n⊢ ∀ ⦃c : 𝕜⦄,\n    0 < c → ∀ ⦃x : E⦄, x ∈ {z | ∃ x y, x ∈ K₁ ∧ y ∈ K₂ ∧ x + y = z} → c • x ∈ {z | ∃ x y, x ∈ K₁ ∧ y ∈ K₂ ∧ x + y = z}\n[PROOFSTEP]\nrintro c hc _ ⟨x, y, hx, hy, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nK₁ K₂ : ConvexCone 𝕜 E\nc : 𝕜\nhc : 0 < c\nx y : E\nhx : x ∈ K₁\nhy : y ∈ K₂\n⊢ c • (x + y) ∈ {z | ∃ x y, x ∈ K₁ ∧ y ∈ K₂ ∧ x + y = z}\n[PROOFSTEP]\nrw [smul_add]\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nK₁ K₂ : ConvexCone 𝕜 E\nc : 𝕜\nhc : 0 < c\nx y : E\nhx : x ∈ K₁\nhy : y ∈ K₂\n⊢ c • x + c • y ∈ {z | ∃ x y, x ∈ K₁ ∧ y ∈ K₂ ∧ x + y = z}\n[PROOFSTEP]\nuse c • x, c • y, K₁.smul_mem hc hx, K₂.smul_mem hc hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nK₁ K₂ : ConvexCone 𝕜 E\n⊢ ∀ ⦃x : E⦄,\n    x ∈ {z | ∃ x y, x ∈ K₁ ∧ y ∈ K₂ ∧ x + y = z} →\n      ∀ ⦃y : E⦄, y ∈ {z | ∃ x y, x ∈ K₁ ∧ y ∈ K₂ ∧ x + y = z} → x + y ∈ {z | ∃ x y, x ∈ K₁ ∧ y ∈ K₂ ∧ x + y = z}\n[PROOFSTEP]\nrintro _ ⟨x₁, x₂, hx₁, hx₂, rfl⟩ y ⟨y₁, y₂, hy₁, hy₂, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nK₁ K₂ : ConvexCone 𝕜 E\nx₁ x₂ : E\nhx₁ : x₁ ∈ K₁\nhx₂ : x₂ ∈ K₂\ny₁ y₂ : E\nhy₁ : y₁ ∈ K₁\nhy₂ : y₂ ∈ K₂\n⊢ x₁ + x₂ + (y₁ + y₂) ∈ {z | ∃ x y, x ∈ K₁ ∧ y ∈ K₂ ∧ x + y = z}\n[PROOFSTEP]\nuse x₁ + y₁, x₂ + y₂, K₁.add_mem hx₁ hy₁, K₂.add_mem hx₂ hy₂\n[GOAL]\ncase right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nK₁ K₂ : ConvexCone 𝕜 E\nx₁ x₂ : E\nhx₁ : x₁ ∈ K₁\nhx₂ : x₂ ∈ K₂\ny₁ y₂ : E\nhy₁ : y₁ ∈ K₁\nhy₂ : y₂ ∈ K₂\n⊢ x₁ + y₁ + (x₂ + y₂) = x₁ + x₂ + (y₁ + y₂)\n[PROOFSTEP]\nabel\n[GOAL]\ncase right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nK₁ K₂ : ConvexCone 𝕜 E\nx₁ x₂ : E\nhx₁ : x₁ ∈ K₁\nhx₂ : x₂ ∈ K₂\ny₁ y₂ : E\nhy₁ : y₁ ∈ K₁\nhy₂ : y₂ ∈ K₂\n⊢ x₁ + y₁ + (x₂ + y₂) = x₁ + x₂ + (y₁ + y₂)\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nx✝ : ConvexCone 𝕜 E\n⊢ 0 + x✝ = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nx✝¹ : ConvexCone 𝕜 E\nx✝ : E\n⊢ x✝ ∈ 0 + x✝¹ ↔ x✝ ∈ x✝¹\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nx✝ : ConvexCone 𝕜 E\n⊢ x✝ + 0 = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\nx✝¹ : ConvexCone 𝕜 E\nx✝ : E\n⊢ x✝ ∈ x✝¹ + 0 ↔ x✝ ∈ x✝¹\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\n⊢ ConvexCone 𝕜 E\n[PROOFSTEP]\napply ConvexCone.mk (⋃ (c : 𝕜) (_ : 0 < c), c • s)\n[GOAL]\ncase smul_mem'\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\n⊢ ∀ ⦃c : 𝕜⦄, 0 < c → ∀ ⦃x : E⦄, x ∈ ⋃ (c : 𝕜) (_ : 0 < c), c • s → c • x ∈ ⋃ (c : 𝕜) (_ : 0 < c), c • s\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_smul_set]\n[GOAL]\ncase add_mem'\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\n⊢ ∀ ⦃x : E⦄,\n    x ∈ ⋃ (c : 𝕜) (_ : 0 < c), c • s →\n      ∀ ⦃y : E⦄, y ∈ ⋃ (c : 𝕜) (_ : 0 < c), c • s → x + y ∈ ⋃ (c : 𝕜) (_ : 0 < c), c • s\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_smul_set]\n[GOAL]\ncase smul_mem'\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\n⊢ ∀ ⦃c : 𝕜⦄, 0 < c → ∀ ⦃x : E⦄, (∃ i h y, y ∈ s ∧ i • y = x) → ∃ i h y, y ∈ s ∧ i • y = c • x\n[PROOFSTEP]\nrintro c c_pos _ ⟨c', c'_pos, x, hx, rfl⟩\n[GOAL]\ncase smul_mem'.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nc : 𝕜\nc_pos : 0 < c\nc' : 𝕜\nc'_pos : 0 < c'\nx : E\nhx : x ∈ s\n⊢ ∃ i h y, y ∈ s ∧ i • y = c • c' • x\n[PROOFSTEP]\nexact ⟨c * c', mul_pos c_pos c'_pos, x, hx, (smul_smul _ _ _).symm⟩\n[GOAL]\ncase add_mem'\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\n⊢ ∀ ⦃x : E⦄,\n    (∃ i h y, y ∈ s ∧ i • y = x) → ∀ ⦃y : E⦄, (∃ i h y_1, y_1 ∈ s ∧ i • y_1 = y) → ∃ i h y_1, y_1 ∈ s ∧ i • y_1 = x + y\n[PROOFSTEP]\nrintro _ ⟨cx, cx_pos, x, hx, rfl⟩ _ ⟨cy, cy_pos, y, hy, rfl⟩\n[GOAL]\ncase add_mem'.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\ncx : 𝕜\ncx_pos : 0 < cx\nx : E\nhx : x ∈ s\ncy : 𝕜\ncy_pos : 0 < cy\ny : E\nhy : y ∈ s\n⊢ ∃ i h y_1, y_1 ∈ s ∧ i • y_1 = cx • x + cy • y\n[PROOFSTEP]\nhave : 0 < cx + cy := add_pos cx_pos cy_pos\n[GOAL]\ncase add_mem'.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\ncx : 𝕜\ncx_pos : 0 < cx\nx : E\nhx : x ∈ s\ncy : 𝕜\ncy_pos : 0 < cy\ny : E\nhy : y ∈ s\nthis : 0 < cx + cy\n⊢ ∃ i h y_1, y_1 ∈ s ∧ i • y_1 = cx • x + cy • y\n[PROOFSTEP]\nrefine' ⟨_, this, _, convex_iff_div.1 hs hx hy cx_pos.le cy_pos.le this, _⟩\n[GOAL]\ncase add_mem'.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\ncx : 𝕜\ncx_pos : 0 < cx\nx : E\nhx : x ∈ s\ncy : 𝕜\ncy_pos : 0 < cy\ny : E\nhy : y ∈ s\nthis : 0 < cx + cy\n⊢ (cx + cy) • ((cx / (cx + cy)) • x + (cy / (cx + cy)) • y) = cx • x + cy • y\n[PROOFSTEP]\nsimp only [smul_add, smul_smul, mul_div_assoc', mul_div_cancel_left _ this.ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nx : E\n⊢ x ∈ toCone s hs ↔ ∃ c, 0 < c ∧ ∃ y, y ∈ s ∧ c • y = x\n[PROOFSTEP]\nsimp only [toCone, ConvexCone.mem_mk, mem_iUnion, mem_smul_set, eq_comm, exists_prop]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nx : E\n⊢ x ∈ toCone s hs ↔ ∃ c, 0 < c ∧ c • x ∈ s\n[PROOFSTEP]\nrefine' hs.mem_toCone.trans ⟨_, _⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nx : E\n⊢ (∃ c, 0 < c ∧ ∃ y, y ∈ s ∧ c • y = x) → ∃ c, 0 < c ∧ c • x ∈ s\n[PROOFSTEP]\nrintro ⟨c, hc, y, hy, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nc : 𝕜\nhc : 0 < c\ny : E\nhy : y ∈ s\n⊢ ∃ c_1, 0 < c_1 ∧ c_1 • c • y ∈ s\n[PROOFSTEP]\nexact ⟨c⁻¹, inv_pos.2 hc, by rwa [smul_smul, inv_mul_cancel hc.ne', one_smul]⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nc : 𝕜\nhc : 0 < c\ny : E\nhy : y ∈ s\n⊢ c⁻¹ • c • y ∈ s\n[PROOFSTEP]\nrwa [smul_smul, inv_mul_cancel hc.ne', one_smul]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nx : E\n⊢ (∃ c, 0 < c ∧ c • x ∈ s) → ∃ c, 0 < c ∧ ∃ y, y ∈ s ∧ c • y = x\n[PROOFSTEP]\nrintro ⟨c, hc, hcx⟩\n[GOAL]\ncase refine'_2.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nx : E\nc : 𝕜\nhc : 0 < c\nhcx : c • x ∈ s\n⊢ ∃ c, 0 < c ∧ ∃ y, y ∈ s ∧ c • y = x\n[PROOFSTEP]\nexact ⟨c⁻¹, inv_pos.2 hc, _, hcx, by rw [smul_smul, inv_mul_cancel hc.ne', one_smul]⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nx : E\nc : 𝕜\nhc : 0 < c\nhcx : c • x ∈ s\n⊢ c⁻¹ • c • x = x\n[PROOFSTEP]\nrw [smul_smul, inv_mul_cancel hc.ne', one_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nx✝ x : E\nhx : x ∈ s\n⊢ 1 • x ∈ s\n[PROOFSTEP]\nrwa [one_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nx : E\n⊢ IsLeast {t | s ⊆ ↑t} (toCone s hs)\n[PROOFSTEP]\nrefine' ⟨hs.subset_toCone, fun t ht x hx => _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nx✝ : E\nt : ConvexCone 𝕜 E\nht : t ∈ {t | s ⊆ ↑t}\nx : E\nhx : x ∈ toCone s hs\n⊢ x ∈ t\n[PROOFSTEP]\nrcases hs.mem_toCone.1 hx with ⟨c, hc, y, hy, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nhs : Convex 𝕜 s\nx : E\nt : ConvexCone 𝕜 E\nht : t ∈ {t | s ⊆ ↑t}\nc : 𝕜\nhc : 0 < c\ny : E\nhy : y ∈ s\nhx : c • y ∈ toCone s hs\n⊢ c • y ∈ t\n[PROOFSTEP]\nexact t.smul_mem hc (ht hy)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\n⊢ IsLeast {t | s ⊆ ↑t} (Convex.toCone (↑(convexHull 𝕜) s) (_ : Convex 𝕜 (↑(convexHull 𝕜) s)))\n[PROOFSTEP]\nconvert (convex_convexHull 𝕜 s).toCone_isLeast using 1\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\n⊢ {t | s ⊆ ↑t} = {t | ↑(convexHull 𝕜) s ⊆ ↑t}\n[PROOFSTEP]\next t\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ns : Set E\nt : ConvexCone 𝕜 E\n⊢ t ∈ {t | s ⊆ ↑t} ↔ t ∈ {t | ↑(convexHull 𝕜) s ⊆ ↑t}\n[PROOFSTEP]\nexact ⟨fun h => convexHull_min h t.convex, (subset_convexHull 𝕜 s).trans⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\n⊢ ∃ g, f < g ∧ ∀ (x : { x // x ∈ g.domain }), ↑x ∈ s → 0 ≤ ↑g x\n[PROOFSTEP]\nobtain ⟨y, -, hy⟩ : ∃ y ∈ ⊤, y ∉ f.domain := @SetLike.exists_of_lt (Submodule ℝ E) _ _ _ _ (lt_top_iff_ne_top.2 hdom)\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\n⊢ ∃ g, f < g ∧ ∀ (x : { x // x ∈ g.domain }), ↑x ∈ s → 0 ≤ ↑g x\n[PROOFSTEP]\nobtain ⟨c, le_c, c_le⟩ :\n  ∃ c, (∀ x : f.domain, -(x : E) - y ∈ s → f x ≤ c) ∧ ∀ x : f.domain, (x : E) + y ∈ s → c ≤ f x :=\n  by\n  set Sp := f '' {x : f.domain | (x : E) + y ∈ s}\n  set Sn := f '' {x : f.domain | -(x : E) - y ∈ s}\n  suffices (upperBounds Sn ∩ lowerBounds Sp).Nonempty by\n    simpa only [Set.Nonempty, upperBounds, lowerBounds, ball_image_iff] using this\n  refine' exists_between_of_forall_le (Nonempty.image f _) (Nonempty.image f (dense y)) _\n  · rcases dense (-y) with ⟨x, hx⟩\n    rw [← neg_neg x, AddSubgroupClass.coe_neg, ← sub_eq_add_neg] at hx \n    exact ⟨_, hx⟩\n  rintro a ⟨xn, hxn, rfl⟩ b ⟨xp, hxp, rfl⟩\n  have := s.add_mem hxp hxn\n  rw [add_assoc, add_sub_cancel'_right, ← sub_eq_add_neg, ← AddSubgroupClass.coe_sub] at this \n  replace := nonneg _ this\n  rwa [f.map_sub, sub_nonneg] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\n⊢ ∃ c, (∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c) ∧ ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\n[PROOFSTEP]\nset Sp := f '' {x : f.domain | (x : E) + y ∈ s}\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nSp : Set ℝ := ↑f '' {x | ↑x + y ∈ s}\n⊢ ∃ c, (∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c) ∧ ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\n[PROOFSTEP]\nset Sn := f '' {x : f.domain | -(x : E) - y ∈ s}\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nSp : Set ℝ := ↑f '' {x | ↑x + y ∈ s}\nSn : Set ℝ := ↑f '' {x | -↑x - y ∈ s}\n⊢ ∃ c, (∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c) ∧ ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\n[PROOFSTEP]\nsuffices (upperBounds Sn ∩ lowerBounds Sp).Nonempty by\n  simpa only [Set.Nonempty, upperBounds, lowerBounds, ball_image_iff] using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nSp : Set ℝ := ↑f '' {x | ↑x + y ∈ s}\nSn : Set ℝ := ↑f '' {x | -↑x - y ∈ s}\nthis : Set.Nonempty (upperBounds Sn ∩ lowerBounds Sp)\n⊢ ∃ c, (∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c) ∧ ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\n[PROOFSTEP]\nsimpa only [Set.Nonempty, upperBounds, lowerBounds, ball_image_iff] using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nSp : Set ℝ := ↑f '' {x | ↑x + y ∈ s}\nSn : Set ℝ := ↑f '' {x | -↑x - y ∈ s}\n⊢ Set.Nonempty (upperBounds Sn ∩ lowerBounds Sp)\n[PROOFSTEP]\nrefine' exists_between_of_forall_le (Nonempty.image f _) (Nonempty.image f (dense y)) _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nSp : Set ℝ := ↑f '' {x | ↑x + y ∈ s}\nSn : Set ℝ := ↑f '' {x | -↑x - y ∈ s}\n⊢ Set.Nonempty {x | -↑x - y ∈ s}\n[PROOFSTEP]\nrcases dense (-y) with ⟨x, hx⟩\n[GOAL]\ncase refine'_1.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nSp : Set ℝ := ↑f '' {x | ↑x + y ∈ s}\nSn : Set ℝ := ↑f '' {x | -↑x - y ∈ s}\nx : { x // x ∈ f.domain }\nhx : ↑x + -y ∈ s\n⊢ Set.Nonempty {x | -↑x - y ∈ s}\n[PROOFSTEP]\nrw [← neg_neg x, AddSubgroupClass.coe_neg, ← sub_eq_add_neg] at hx \n[GOAL]\ncase refine'_1.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nSp : Set ℝ := ↑f '' {x | ↑x + y ∈ s}\nSn : Set ℝ := ↑f '' {x | -↑x - y ∈ s}\nx : { x // x ∈ f.domain }\nhx : -↑(-x) - y ∈ s\n⊢ Set.Nonempty {x | -↑x - y ∈ s}\n[PROOFSTEP]\nexact ⟨_, hx⟩\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nSp : Set ℝ := ↑f '' {x | ↑x + y ∈ s}\nSn : Set ℝ := ↑f '' {x | -↑x - y ∈ s}\n⊢ ∀ (x : ℝ), x ∈ Sn → ∀ (y : ℝ), y ∈ Sp → x ≤ y\n[PROOFSTEP]\nrintro a ⟨xn, hxn, rfl⟩ b ⟨xp, hxp, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nSp : Set ℝ := ↑f '' {x | ↑x + y ∈ s}\nSn : Set ℝ := ↑f '' {x | -↑x - y ∈ s}\nxn : { x // x ∈ f.domain }\nhxn : xn ∈ {x | -↑x - y ∈ s}\nxp : { x // x ∈ f.domain }\nhxp : xp ∈ {x | ↑x + y ∈ s}\n⊢ ↑f xn ≤ ↑f xp\n[PROOFSTEP]\nhave := s.add_mem hxp hxn\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nSp : Set ℝ := ↑f '' {x | ↑x + y ∈ s}\nSn : Set ℝ := ↑f '' {x | -↑x - y ∈ s}\nxn : { x // x ∈ f.domain }\nhxn : xn ∈ {x | -↑x - y ∈ s}\nxp : { x // x ∈ f.domain }\nhxp : xp ∈ {x | ↑x + y ∈ s}\nthis : ↑xp + y + (-↑xn - y) ∈ s\n⊢ ↑f xn ≤ ↑f xp\n[PROOFSTEP]\nrw [add_assoc, add_sub_cancel'_right, ← sub_eq_add_neg, ← AddSubgroupClass.coe_sub] at this \n[GOAL]\ncase refine'_2.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nSp : Set ℝ := ↑f '' {x | ↑x + y ∈ s}\nSn : Set ℝ := ↑f '' {x | -↑x - y ∈ s}\nxn : { x // x ∈ f.domain }\nhxn : xn ∈ {x | -↑x - y ∈ s}\nxp : { x // x ∈ f.domain }\nhxp : xp ∈ {x | ↑x + y ∈ s}\nthis✝ : ↑xp - ↑xn ∈ s\nthis : ↑(xp - xn) ∈ s\n⊢ ↑f xn ≤ ↑f xp\n[PROOFSTEP]\nreplace := nonneg _ this\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nSp : Set ℝ := ↑f '' {x | ↑x + y ∈ s}\nSn : Set ℝ := ↑f '' {x | -↑x - y ∈ s}\nxn : { x // x ∈ f.domain }\nhxn : xn ∈ {x | -↑x - y ∈ s}\nxp : { x // x ∈ f.domain }\nhxp : xp ∈ {x | ↑x + y ∈ s}\nthis✝ : ↑xp - ↑xn ∈ s\nthis : 0 ≤ ↑f (xp - xn)\n⊢ ↑f xn ≤ ↑f xp\n[PROOFSTEP]\nrwa [f.map_sub, sub_nonneg] at this \n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\n⊢ ∃ g, f < g ∧ ∀ (x : { x // x ∈ g.domain }), ↑x ∈ s → 0 ≤ ↑g x\n[PROOFSTEP]\nrefine' ⟨f.supSpanSingleton y (-c) hy, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\n⊢ f < LinearPMap.supSpanSingleton f y (-c) hy\n[PROOFSTEP]\nrefine' lt_iff_le_not_le.2 ⟨f.left_le_sup _ _, fun H => _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nH : LinearPMap.supSpanSingleton f y (-c) hy ≤ f\n⊢ False\n[PROOFSTEP]\nreplace H := LinearPMap.domain_mono.monotone H\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nH : (LinearPMap.supSpanSingleton f y (-c) hy).domain ≤ f.domain\n⊢ False\n[PROOFSTEP]\nrw [LinearPMap.domain_supSpanSingleton, sup_le_iff, span_le, singleton_subset_iff] at H \n[GOAL]\ncase intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nH : f.domain ≤ f.domain ∧ y ∈ ↑f.domain\n⊢ False\n[PROOFSTEP]\nexact hy H.2\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\n⊢ ∀ (x : { x // x ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain }),\n    ↑x ∈ s → 0 ≤ ↑(LinearPMap.supSpanSingleton f y (-c) hy) x\n[PROOFSTEP]\nrintro ⟨z, hz⟩ hzs\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nz : E\nhz : z ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : ↑{ val := z, property := hz } ∈ s\n⊢ 0 ≤ ↑(LinearPMap.supSpanSingleton f y (-c) hy) { val := z, property := hz }\n[PROOFSTEP]\nrcases mem_sup.1 hz with ⟨x, hx, y', hy', rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\ny' : E\nhy' : y' ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + y' ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : ↑{ val := x + y', property := hz } ∈ s\n⊢ 0 ≤ ↑(LinearPMap.supSpanSingleton f y (-c) hy) { val := x + y', property := hz }\n[PROOFSTEP]\nrcases mem_span_singleton.1 hy' with ⟨r, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : ↑{ val := x + r • y, property := hz } ∈ s\n⊢ 0 ≤ ↑(LinearPMap.supSpanSingleton f y (-c) hy) { val := x + r • y, property := hz }\n[PROOFSTEP]\nsimp only [Subtype.coe_mk] at hzs \n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\n⊢ 0 ≤ ↑(LinearPMap.supSpanSingleton f y (-c) hy) { val := x + r • y, property := hz }\n[PROOFSTEP]\nerw [LinearPMap.supSpanSingleton_apply_mk _ _ _ _ _ hx, smul_neg, ← sub_eq_add_neg, sub_nonneg]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\n⊢ r • c ≤ ↑f { val := x, property := hx }\n[PROOFSTEP]\nrcases lt_trichotomy r 0 with (hr | hr | hr)\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\nhr : r < 0\n⊢ r • c ≤ ↑f { val := x, property := hx }\n[PROOFSTEP]\nhave : -(r⁻¹ • x) - y ∈ s := by\n  rwa [← s.smul_mem_iff (neg_pos.2 hr), smul_sub, smul_neg, neg_smul, neg_neg, smul_smul, mul_inv_cancel hr.ne,\n    one_smul, sub_eq_add_neg, neg_smul, neg_neg]\n    -- Porting note: added type annotation and `by exact`\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\nhr : r < 0\n⊢ -(r⁻¹ • x) - y ∈ s\n[PROOFSTEP]\nrwa [← s.smul_mem_iff (neg_pos.2 hr), smul_sub, smul_neg, neg_smul, neg_neg, smul_smul, mul_inv_cancel hr.ne, one_smul,\n  sub_eq_add_neg, neg_smul, neg_neg]\n  -- Porting note: added type annotation and `by exact`\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\nhr : r < 0\nthis : -(r⁻¹ • x) - y ∈ s\n⊢ r • c ≤ ↑f { val := x, property := hx }\n[PROOFSTEP]\nreplace : f (r⁻¹ • ⟨x, hx⟩) ≤ c := le_c (r⁻¹ • ⟨x, hx⟩) (by exact this)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\nhr : r < 0\nthis : -(r⁻¹ • x) - y ∈ s\n⊢ -↑(r⁻¹ • { val := x, property := hx }) - y ∈ s\n[PROOFSTEP]\nexact this\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\nhr : r < 0\nthis : ↑f (r⁻¹ • { val := x, property := hx }) ≤ c\n⊢ r • c ≤ ↑f { val := x, property := hx }\n[PROOFSTEP]\nrwa [← mul_le_mul_left (neg_pos.2 hr), neg_mul, neg_mul, neg_le_neg_iff, f.map_smul, smul_eq_mul, ← mul_assoc,\n  mul_inv_cancel hr.ne, one_mul] at this \n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro.inr.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\nhr : r = 0\n⊢ r • c ≤ ↑f { val := x, property := hx }\n[PROOFSTEP]\nsubst r\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro.inr.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nhy' : 0 • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + 0 • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + 0 • y ∈ s\n⊢ 0 • c ≤ ↑f { val := x, property := hx }\n[PROOFSTEP]\nsimp only [zero_smul, add_zero] at hzs ⊢\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro.inr.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nhy' : 0 • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + 0 • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x ∈ s\n⊢ 0 ≤ ↑f { val := x, property := hx }\n[PROOFSTEP]\napply nonneg\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro.inr.inl.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nhy' : 0 • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + 0 • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x ∈ s\n⊢ ↑{ val := x, property := hx } ∈ s\n[PROOFSTEP]\nexact hzs\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro.inr.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\nhr : 0 < r\n⊢ r • c ≤ ↑f { val := x, property := hx }\n[PROOFSTEP]\nhave : r⁻¹ • x + y ∈ s := by\n  rwa [← s.smul_mem_iff hr, smul_add, smul_smul, mul_inv_cancel hr.ne', one_smul]\n    -- Porting note: added type annotation and `by exact`\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\nhr : 0 < r\n⊢ r⁻¹ • x + y ∈ s\n[PROOFSTEP]\nrwa [← s.smul_mem_iff hr, smul_add, smul_smul, mul_inv_cancel hr.ne', one_smul]\n  -- Porting note: added type annotation and `by exact`\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro.inr.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\nhr : 0 < r\nthis : r⁻¹ • x + y ∈ s\n⊢ r • c ≤ ↑f { val := x, property := hx }\n[PROOFSTEP]\nreplace : c ≤ f (r⁻¹ • ⟨x, hx⟩) := c_le (r⁻¹ • ⟨x, hx⟩) (by exact this)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\nhr : 0 < r\nthis : r⁻¹ • x + y ∈ s\n⊢ ↑(r⁻¹ • { val := x, property := hx }) + y ∈ s\n[PROOFSTEP]\nexact this\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.mk.intro.intro.intro.intro.intro.inr.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nhdom : f.domain ≠ ⊤\ny : E\nhy : ¬y ∈ f.domain\nc : ℝ\nle_c : ∀ (x : { x // x ∈ f.domain }), -↑x - y ∈ s → ↑f x ≤ c\nc_le : ∀ (x : { x // x ∈ f.domain }), ↑x + y ∈ s → c ≤ ↑f x\nx : E\nhx : x ∈ f.domain\nr : ℝ\nhy' : r • y ∈ (LinearPMap.mkSpanSingleton y (-c) (_ : y = 0 → False)).domain\nhz : x + r • y ∈ (LinearPMap.supSpanSingleton f y (-c) hy).domain\nhzs : x + r • y ∈ s\nhr : 0 < r\nthis : c ≤ ↑f (r⁻¹ • { val := x, property := hx })\n⊢ r • c ≤ ↑f { val := x, property := hx }\n[PROOFSTEP]\nrwa [← mul_le_mul_left hr, f.map_smul, smul_eq_mul, ← mul_assoc, mul_inv_cancel hr.ne', one_mul] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf p : E →ₗ.[ℝ] ℝ\nhp_nonneg : ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x\nhp_dense : ∀ (y : E), ∃ x, ↑x + y ∈ s\n⊢ ∃ q, q ≥ p ∧ q.domain = ⊤ ∧ ∀ (x : { x // x ∈ q.domain }), ↑x ∈ s → 0 ≤ ↑q x\n[PROOFSTEP]\nset S := {p : E →ₗ.[ℝ] ℝ | ∀ x : p.domain, (x : E) ∈ s → 0 ≤ p x}\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf p : E →ₗ.[ℝ] ℝ\nhp_nonneg : ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x\nhp_dense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\n⊢ ∃ q, q ≥ p ∧ q.domain = ⊤ ∧ ∀ (x : { x // x ∈ q.domain }), ↑x ∈ s → 0 ≤ ↑q x\n[PROOFSTEP]\nhave hSc : ∀ c, c ⊆ S → IsChain (· ≤ ·) c → ∀ y ∈ c, ∃ ub ∈ S, ∀ z ∈ c, z ≤ ub\n[GOAL]\ncase hSc\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf p : E →ₗ.[ℝ] ℝ\nhp_nonneg : ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x\nhp_dense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\n⊢ ∀ (c : Set (E →ₗ.[ℝ] ℝ)),\n    c ⊆ S →\n      IsChain (fun x x_1 => x ≤ x_1) c → ∀ (y : E →ₗ.[ℝ] ℝ), y ∈ c → ∃ ub, ub ∈ S ∧ ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ c → z ≤ ub\n[PROOFSTEP]\nintro c hcs c_chain y hy\n[GOAL]\ncase hSc\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf p : E →ₗ.[ℝ] ℝ\nhp_nonneg : ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x\nhp_dense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nc : Set (E →ₗ.[ℝ] ℝ)\nhcs : c ⊆ S\nc_chain : IsChain (fun x x_1 => x ≤ x_1) c\ny : E →ₗ.[ℝ] ℝ\nhy : y ∈ c\n⊢ ∃ ub, ub ∈ S ∧ ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ c → z ≤ ub\n[PROOFSTEP]\nclear hp_nonneg hp_dense p\n[GOAL]\ncase hSc\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nc : Set (E →ₗ.[ℝ] ℝ)\nhcs : c ⊆ S\nc_chain : IsChain (fun x x_1 => x ≤ x_1) c\ny : E →ₗ.[ℝ] ℝ\nhy : y ∈ c\n⊢ ∃ ub, ub ∈ S ∧ ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ c → z ≤ ub\n[PROOFSTEP]\nhave cne : c.Nonempty := ⟨y, hy⟩\n[GOAL]\ncase hSc\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nc : Set (E →ₗ.[ℝ] ℝ)\nhcs : c ⊆ S\nc_chain : IsChain (fun x x_1 => x ≤ x_1) c\ny : E →ₗ.[ℝ] ℝ\nhy : y ∈ c\ncne : Set.Nonempty c\n⊢ ∃ ub, ub ∈ S ∧ ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ c → z ≤ ub\n[PROOFSTEP]\nhave hcd : DirectedOn (· ≤ ·) c := c_chain.directedOn\n[GOAL]\ncase hSc\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nc : Set (E →ₗ.[ℝ] ℝ)\nhcs : c ⊆ S\nc_chain : IsChain (fun x x_1 => x ≤ x_1) c\ny : E →ₗ.[ℝ] ℝ\nhy : y ∈ c\ncne : Set.Nonempty c\nhcd : DirectedOn (fun x x_1 => x ≤ x_1) c\n⊢ ∃ ub, ub ∈ S ∧ ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ c → z ≤ ub\n[PROOFSTEP]\nrefine' ⟨LinearPMap.sSup c hcd, _, fun _ ↦ LinearPMap.le_sSup hcd⟩\n[GOAL]\ncase hSc\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nc : Set (E →ₗ.[ℝ] ℝ)\nhcs : c ⊆ S\nc_chain : IsChain (fun x x_1 => x ≤ x_1) c\ny : E →ₗ.[ℝ] ℝ\nhy : y ∈ c\ncne : Set.Nonempty c\nhcd : DirectedOn (fun x x_1 => x ≤ x_1) c\n⊢ LinearPMap.sSup c hcd ∈ S\n[PROOFSTEP]\nrintro ⟨x, hx⟩ hxs\n[GOAL]\ncase hSc.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nc : Set (E →ₗ.[ℝ] ℝ)\nhcs : c ⊆ S\nc_chain : IsChain (fun x x_1 => x ≤ x_1) c\ny : E →ₗ.[ℝ] ℝ\nhy : y ∈ c\ncne : Set.Nonempty c\nhcd : DirectedOn (fun x x_1 => x ≤ x_1) c\nx : E\nhx : x ∈ (LinearPMap.sSup c hcd).domain\nhxs : ↑{ val := x, property := hx } ∈ s\n⊢ 0 ≤ ↑(LinearPMap.sSup c hcd) { val := x, property := hx }\n[PROOFSTEP]\nhave hdir : DirectedOn (· ≤ ·) (LinearPMap.domain '' c) :=\n  directedOn_image.2 (hcd.mono fun h ↦ LinearPMap.domain_mono.monotone h)\n[GOAL]\ncase hSc.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nc : Set (E →ₗ.[ℝ] ℝ)\nhcs : c ⊆ S\nc_chain : IsChain (fun x x_1 => x ≤ x_1) c\ny : E →ₗ.[ℝ] ℝ\nhy : y ∈ c\ncne : Set.Nonempty c\nhcd : DirectedOn (fun x x_1 => x ≤ x_1) c\nx : E\nhx : x ∈ (LinearPMap.sSup c hcd).domain\nhxs : ↑{ val := x, property := hx } ∈ s\nhdir : DirectedOn (fun x x_1 => x ≤ x_1) (LinearPMap.domain '' c)\n⊢ 0 ≤ ↑(LinearPMap.sSup c hcd) { val := x, property := hx }\n[PROOFSTEP]\nrcases(mem_sSup_of_directed (cne.image _) hdir).1 hx with ⟨_, ⟨f, hfc, rfl⟩, hfx⟩\n[GOAL]\ncase hSc.mk.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf✝ : E →ₗ.[ℝ] ℝ\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nc : Set (E →ₗ.[ℝ] ℝ)\nhcs : c ⊆ S\nc_chain : IsChain (fun x x_1 => x ≤ x_1) c\ny : E →ₗ.[ℝ] ℝ\nhy : y ∈ c\ncne : Set.Nonempty c\nhcd : DirectedOn (fun x x_1 => x ≤ x_1) c\nx : E\nhx : x ∈ (LinearPMap.sSup c hcd).domain\nhxs : ↑{ val := x, property := hx } ∈ s\nhdir : DirectedOn (fun x x_1 => x ≤ x_1) (LinearPMap.domain '' c)\nf : E →ₗ.[ℝ] ℝ\nhfc : f ∈ c\nhfx : x ∈ f.domain\n⊢ 0 ≤ ↑(LinearPMap.sSup c hcd) { val := x, property := hx }\n[PROOFSTEP]\nhave : f ≤ LinearPMap.sSup c hcd := LinearPMap.le_sSup _ hfc\n[GOAL]\ncase hSc.mk.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf✝ : E →ₗ.[ℝ] ℝ\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nc : Set (E →ₗ.[ℝ] ℝ)\nhcs : c ⊆ S\nc_chain : IsChain (fun x x_1 => x ≤ x_1) c\ny : E →ₗ.[ℝ] ℝ\nhy : y ∈ c\ncne : Set.Nonempty c\nhcd : DirectedOn (fun x x_1 => x ≤ x_1) c\nx : E\nhx : x ∈ (LinearPMap.sSup c hcd).domain\nhxs : ↑{ val := x, property := hx } ∈ s\nhdir : DirectedOn (fun x x_1 => x ≤ x_1) (LinearPMap.domain '' c)\nf : E →ₗ.[ℝ] ℝ\nhfc : f ∈ c\nhfx : x ∈ f.domain\nthis : f ≤ LinearPMap.sSup c hcd\n⊢ 0 ≤ ↑(LinearPMap.sSup c hcd) { val := x, property := hx }\n[PROOFSTEP]\nconvert ← hcs hfc ⟨x, hfx⟩ hxs using 1\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf✝ : E →ₗ.[ℝ] ℝ\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nc : Set (E →ₗ.[ℝ] ℝ)\nhcs : c ⊆ S\nc_chain : IsChain (fun x x_1 => x ≤ x_1) c\ny : E →ₗ.[ℝ] ℝ\nhy : y ∈ c\ncne : Set.Nonempty c\nhcd : DirectedOn (fun x x_1 => x ≤ x_1) c\nx : E\nhx : x ∈ (LinearPMap.sSup c hcd).domain\nhxs : ↑{ val := x, property := hx } ∈ s\nhdir : DirectedOn (fun x x_1 => x ≤ x_1) (LinearPMap.domain '' c)\nf : E →ₗ.[ℝ] ℝ\nhfc : f ∈ c\nhfx : x ∈ f.domain\nthis : f ≤ LinearPMap.sSup c hcd\n⊢ ↑f { val := x, property := hfx } = ↑(LinearPMap.sSup c hcd) { val := x, property := hx }\n[PROOFSTEP]\nexact this.2 rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf p : E →ₗ.[ℝ] ℝ\nhp_nonneg : ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x\nhp_dense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nhSc :\n  ∀ (c : Set (E →ₗ.[ℝ] ℝ)),\n    c ⊆ S →\n      IsChain (fun x x_1 => x ≤ x_1) c → ∀ (y : E →ₗ.[ℝ] ℝ), y ∈ c → ∃ ub, ub ∈ S ∧ ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ c → z ≤ ub\n⊢ ∃ q, q ≥ p ∧ q.domain = ⊤ ∧ ∀ (x : { x // x ∈ q.domain }), ↑x ∈ s → 0 ≤ ↑q x\n[PROOFSTEP]\nobtain ⟨q, hqs, hpq, hq⟩ := zorn_nonempty_partialOrder₀ S hSc p hp_nonneg\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf p : E →ₗ.[ℝ] ℝ\nhp_nonneg : ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x\nhp_dense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nhSc :\n  ∀ (c : Set (E →ₗ.[ℝ] ℝ)),\n    c ⊆ S →\n      IsChain (fun x x_1 => x ≤ x_1) c → ∀ (y : E →ₗ.[ℝ] ℝ), y ∈ c → ∃ ub, ub ∈ S ∧ ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ c → z ≤ ub\nq : E →ₗ.[ℝ] ℝ\nhqs : q ∈ S\nhpq : p ≤ q\nhq : ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ S → q ≤ z → z = q\n⊢ ∃ q, q ≥ p ∧ q.domain = ⊤ ∧ ∀ (x : { x // x ∈ q.domain }), ↑x ∈ s → 0 ≤ ↑q x\n[PROOFSTEP]\nrefine' ⟨q, hpq, _, hqs⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf p : E →ₗ.[ℝ] ℝ\nhp_nonneg : ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x\nhp_dense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nhSc :\n  ∀ (c : Set (E →ₗ.[ℝ] ℝ)),\n    c ⊆ S →\n      IsChain (fun x x_1 => x ≤ x_1) c → ∀ (y : E →ₗ.[ℝ] ℝ), y ∈ c → ∃ ub, ub ∈ S ∧ ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ c → z ≤ ub\nq : E →ₗ.[ℝ] ℝ\nhqs : q ∈ S\nhpq : p ≤ q\nhq : ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ S → q ≤ z → z = q\n⊢ q.domain = ⊤\n[PROOFSTEP]\ncontrapose! hq\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf p : E →ₗ.[ℝ] ℝ\nhp_nonneg : ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x\nhp_dense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nhSc :\n  ∀ (c : Set (E →ₗ.[ℝ] ℝ)),\n    c ⊆ S →\n      IsChain (fun x x_1 => x ≤ x_1) c → ∀ (y : E →ₗ.[ℝ] ℝ), y ∈ c → ∃ ub, ub ∈ S ∧ ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ c → z ≤ ub\nq : E →ₗ.[ℝ] ℝ\nhqs : q ∈ S\nhpq : p ≤ q\nhq : q.domain ≠ ⊤\n⊢ ∃ z, z ∈ {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x} ∧ q ≤ z ∧ z ≠ q\n[PROOFSTEP]\nhave hqd : ∀ y, ∃ x : q.domain, (x : E) + y ∈ s := fun y ↦\n  let ⟨x, hx⟩ := hp_dense y\n  ⟨ofLe hpq.left x, hx⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf p : E →ₗ.[ℝ] ℝ\nhp_nonneg : ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x\nhp_dense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nhSc :\n  ∀ (c : Set (E →ₗ.[ℝ] ℝ)),\n    c ⊆ S →\n      IsChain (fun x x_1 => x ≤ x_1) c → ∀ (y : E →ₗ.[ℝ] ℝ), y ∈ c → ∃ ub, ub ∈ S ∧ ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ c → z ≤ ub\nq : E →ₗ.[ℝ] ℝ\nhqs : q ∈ S\nhpq : p ≤ q\nhq : q.domain ≠ ⊤\nhqd : ∀ (y : E), ∃ x, ↑x + y ∈ s\n⊢ ∃ z, z ∈ {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x} ∧ q ≤ z ∧ z ≠ q\n[PROOFSTEP]\nrcases step s q hqs hqd hq with ⟨r, hqr, hr⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf p : E →ₗ.[ℝ] ℝ\nhp_nonneg : ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x\nhp_dense : ∀ (y : E), ∃ x, ↑x + y ∈ s\nS : Set (E →ₗ.[ℝ] ℝ) := {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x}\nhSc :\n  ∀ (c : Set (E →ₗ.[ℝ] ℝ)),\n    c ⊆ S →\n      IsChain (fun x x_1 => x ≤ x_1) c → ∀ (y : E →ₗ.[ℝ] ℝ), y ∈ c → ∃ ub, ub ∈ S ∧ ∀ (z : E →ₗ.[ℝ] ℝ), z ∈ c → z ≤ ub\nq : E →ₗ.[ℝ] ℝ\nhqs : q ∈ S\nhpq : p ≤ q\nhq : q.domain ≠ ⊤\nhqd : ∀ (y : E), ∃ x, ↑x + y ∈ s\nr : E →ₗ.[ℝ] ℝ\nhqr : q < r\nhr : ∀ (x : { x // x ∈ r.domain }), ↑x ∈ s → 0 ≤ ↑r x\n⊢ ∃ z, z ∈ {p | ∀ (x : { x // x ∈ p.domain }), ↑x ∈ s → 0 ≤ ↑p x} ∧ q ≤ z ∧ z ≠ q\n[PROOFSTEP]\nexact ⟨r, hr, hqr.le, hqr.ne'⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\n⊢ ∃ g, (∀ (x : { x // x ∈ f.domain }), ↑g ↑x = ↑f x) ∧ ∀ (x : E), x ∈ s → 0 ≤ ↑g x\n[PROOFSTEP]\nrcases RieszExtension.exists_top s f nonneg dense with ⟨⟨g_dom, g⟩, ⟨-, hfg⟩, rfl : g_dom = ⊤, hgs⟩\n[GOAL]\ncase intro.mk.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\ng : { x // x ∈ ⊤ } →ₗ[ℝ] ℝ\nhfg :\n  ∀ ⦃x : { x // x ∈ f.domain }⦄ ⦃y : { x // x ∈ { domain := ⊤, toFun := g }.domain }⦄,\n    ↑x = ↑y → ↑f x = ↑{ domain := ⊤, toFun := g } y\nhgs : ∀ (x : { x // x ∈ { domain := ⊤, toFun := g }.domain }), ↑x ∈ s → 0 ≤ ↑{ domain := ⊤, toFun := g } x\n⊢ ∃ g, (∀ (x : { x // x ∈ f.domain }), ↑g ↑x = ↑f x) ∧ ∀ (x : E), x ∈ s → 0 ≤ ↑g x\n[PROOFSTEP]\nrefine' ⟨g.comp (LinearMap.id.codRestrict ⊤ fun _ ↦ trivial), _, _⟩\n[GOAL]\ncase intro.mk.intro.intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\ng : { x // x ∈ ⊤ } →ₗ[ℝ] ℝ\nhfg :\n  ∀ ⦃x : { x // x ∈ f.domain }⦄ ⦃y : { x // x ∈ { domain := ⊤, toFun := g }.domain }⦄,\n    ↑x = ↑y → ↑f x = ↑{ domain := ⊤, toFun := g } y\nhgs : ∀ (x : { x // x ∈ { domain := ⊤, toFun := g }.domain }), ↑x ∈ s → 0 ≤ ↑{ domain := ⊤, toFun := g } x\n⊢ ∀ (x : { x // x ∈ f.domain }), ↑(comp g (LinearMap.codRestrict ⊤ LinearMap.id (_ : E → True))) ↑x = ↑f x\n[PROOFSTEP]\nexact fun x => (hfg rfl).symm\n[GOAL]\ncase intro.mk.intro.intro.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\ns : ConvexCone ℝ E\nf : E →ₗ.[ℝ] ℝ\nnonneg : ∀ (x : { x // x ∈ f.domain }), ↑x ∈ s → 0 ≤ ↑f x\ndense : ∀ (y : E), ∃ x, ↑x + y ∈ s\ng : { x // x ∈ ⊤ } →ₗ[ℝ] ℝ\nhfg :\n  ∀ ⦃x : { x // x ∈ f.domain }⦄ ⦃y : { x // x ∈ { domain := ⊤, toFun := g }.domain }⦄,\n    ↑x = ↑y → ↑f x = ↑{ domain := ⊤, toFun := g } y\nhgs : ∀ (x : { x // x ∈ { domain := ⊤, toFun := g }.domain }), ↑x ∈ s → 0 ≤ ↑{ domain := ⊤, toFun := g } x\n⊢ ∀ (x : E), x ∈ s → 0 ≤ ↑(comp g (LinearMap.codRestrict ⊤ LinearMap.id (_ : E → True))) x\n[PROOFSTEP]\nexact fun x hx => hgs ⟨x, _⟩ hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\n⊢ ∃ g, (∀ (x : { x // x ∈ f.domain }), ↑g ↑x = ↑f x) ∧ ∀ (x : E), ↑g x ≤ N x\n[PROOFSTEP]\nlet s : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p : E × ℝ | N p.1 ≤ p.2}\n    smul_mem' := fun c hc p hp =>\n      calc\n        N (c • p.1) = c * N p.1 := N_hom c hc p.1\n        _ ≤ c * p.2 := mul_le_mul_of_nonneg_left hp hc.le\n    add_mem' := fun x hx y hy => (N_add _ _).trans (add_le_add hx hy) }\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\n⊢ ∃ g, (∀ (x : { x // x ∈ f.domain }), ↑g ↑x = ↑f x) ∧ ∀ (x : E), ↑g x ≤ N x\n[PROOFSTEP]\nset f' := (-f).coprod (LinearMap.id.toPMap ⊤)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\n⊢ ∃ g, (∀ (x : { x // x ∈ f.domain }), ↑g ↑x = ↑f x) ∧ ∀ (x : E), ↑g x ≤ N x\n[PROOFSTEP]\nhave hf'_nonneg : ∀ x : f'.domain, x.1 ∈ s → 0 ≤ f' x := fun x (hx : N x.1.1 ≤ x.1.2) ↦ by\n  simpa using le_trans (hf ⟨x.1.1, x.2.1⟩) hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nx : { x // x ∈ f'.domain }\nhx : N (↑x).fst ≤ (↑x).snd\n⊢ 0 ≤ ↑f' x\n[PROOFSTEP]\nsimpa using le_trans (hf ⟨x.1.1, x.2.1⟩) hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nhf'_nonneg : ∀ (x : { x // x ∈ f'.domain }), ↑x ∈ s → 0 ≤ ↑f' x\n⊢ ∃ g, (∀ (x : { x // x ∈ f.domain }), ↑g ↑x = ↑f x) ∧ ∀ (x : E), ↑g x ≤ N x\n[PROOFSTEP]\nhave hf'_dense : ∀ y : E × ℝ, ∃ x : f'.domain, ↑x + y ∈ s\n[GOAL]\ncase hf'_dense\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nhf'_nonneg : ∀ (x : { x // x ∈ f'.domain }), ↑x ∈ s → 0 ≤ ↑f' x\n⊢ ∀ (y : E × ℝ), ∃ x, ↑x + y ∈ s\n[PROOFSTEP]\nrintro ⟨x, y⟩\n[GOAL]\ncase hf'_dense.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nhf'_nonneg : ∀ (x : { x // x ∈ f'.domain }), ↑x ∈ s → 0 ≤ ↑f' x\nx : E\ny : ℝ\n⊢ ∃ x_1, ↑x_1 + (x, y) ∈ s\n[PROOFSTEP]\nrefine' ⟨⟨(0, N x - y), ⟨f.domain.zero_mem, trivial⟩⟩, _⟩\n[GOAL]\ncase hf'_dense.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nhf'_nonneg : ∀ (x : { x // x ∈ f'.domain }), ↑x ∈ s → 0 ≤ ↑f' x\nx : E\ny : ℝ\n⊢ ↑{ val := (0, N x - y),\n          property := (_ : (0, N x - y).fst ∈ ↑(-f).domain ∧ (0, N x - y).snd ∈ ↑(toPMap LinearMap.id ⊤).domain) } +\n      (x, y) ∈\n    s\n[PROOFSTEP]\nsimp only [ConvexCone.mem_mk, mem_setOf_eq, Prod.fst_add, Prod.snd_add, zero_add, sub_add_cancel, le_rfl]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nhf'_nonneg : ∀ (x : { x // x ∈ f'.domain }), ↑x ∈ s → 0 ≤ ↑f' x\nhf'_dense : ∀ (y : E × ℝ), ∃ x, ↑x + y ∈ s\n⊢ ∃ g, (∀ (x : { x // x ∈ f.domain }), ↑g ↑x = ↑f x) ∧ ∀ (x : E), ↑g x ≤ N x\n[PROOFSTEP]\nobtain ⟨g, g_eq, g_nonneg⟩ := riesz_extension s f' hf'_nonneg hf'_dense\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nhf'_nonneg : ∀ (x : { x // x ∈ f'.domain }), ↑x ∈ s → 0 ≤ ↑f' x\nhf'_dense : ∀ (y : E × ℝ), ∃ x, ↑x + y ∈ s\ng : E × ℝ →ₗ[ℝ] ℝ\ng_eq : ∀ (x : { x // x ∈ f'.domain }), ↑g ↑x = ↑f' x\ng_nonneg : ∀ (x : E × ℝ), x ∈ s → 0 ≤ ↑g x\n⊢ ∃ g, (∀ (x : { x // x ∈ f.domain }), ↑g ↑x = ↑f x) ∧ ∀ (x : E), ↑g x ≤ N x\n[PROOFSTEP]\nreplace g_eq : ∀ (x : f.domain) (y : ℝ), g (x, y) = y - f x := fun x y ↦\n  (g_eq ⟨(x, y), ⟨x.2, trivial⟩⟩).trans (sub_eq_neg_add _ _).symm\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nhf'_nonneg : ∀ (x : { x // x ∈ f'.domain }), ↑x ∈ s → 0 ≤ ↑f' x\nhf'_dense : ∀ (y : E × ℝ), ∃ x, ↑x + y ∈ s\ng : E × ℝ →ₗ[ℝ] ℝ\ng_nonneg : ∀ (x : E × ℝ), x ∈ s → 0 ≤ ↑g x\ng_eq : ∀ (x : { x // x ∈ f.domain }) (y : ℝ), ↑g (↑x, y) = y - ↑f x\n⊢ ∃ g, (∀ (x : { x // x ∈ f.domain }), ↑g ↑x = ↑f x) ∧ ∀ (x : E), ↑g x ≤ N x\n[PROOFSTEP]\nrefine ⟨-g.comp (inl ℝ E ℝ), fun x ↦ ?_, fun x ↦ ?_⟩\n[GOAL]\ncase intro.intro.refine_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nhf'_nonneg : ∀ (x : { x // x ∈ f'.domain }), ↑x ∈ s → 0 ≤ ↑f' x\nhf'_dense : ∀ (y : E × ℝ), ∃ x, ↑x + y ∈ s\ng : E × ℝ →ₗ[ℝ] ℝ\ng_nonneg : ∀ (x : E × ℝ), x ∈ s → 0 ≤ ↑g x\ng_eq : ∀ (x : { x // x ∈ f.domain }) (y : ℝ), ↑g (↑x, y) = y - ↑f x\nx : { x // x ∈ f.domain }\n⊢ ↑(-comp g (inl ℝ E ℝ)) ↑x = ↑f x\n[PROOFSTEP]\nsimp [g_eq x 0]\n[GOAL]\ncase intro.intro.refine_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nhf'_nonneg : ∀ (x : { x // x ∈ f'.domain }), ↑x ∈ s → 0 ≤ ↑f' x\nhf'_dense : ∀ (y : E × ℝ), ∃ x, ↑x + y ∈ s\ng : E × ℝ →ₗ[ℝ] ℝ\ng_nonneg : ∀ (x : E × ℝ), x ∈ s → 0 ≤ ↑g x\ng_eq : ∀ (x : { x // x ∈ f.domain }) (y : ℝ), ↑g (↑x, y) = y - ↑f x\nx : E\n⊢ ↑(-comp g (inl ℝ E ℝ)) x ≤ N x\n[PROOFSTEP]\ncalc\n  -g (x, 0) = g (0, N x) - g (x, N x) := by simp [← map_sub, ← map_neg]\n  _ = N x - g (x, N x) := by simpa using g_eq 0 (N x)\n  _ ≤ N x := by simpa using g_nonneg ⟨x, N x⟩ (le_refl (N x))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nhf'_nonneg : ∀ (x : { x // x ∈ f'.domain }), ↑x ∈ s → 0 ≤ ↑f' x\nhf'_dense : ∀ (y : E × ℝ), ∃ x, ↑x + y ∈ s\ng : E × ℝ →ₗ[ℝ] ℝ\ng_nonneg : ∀ (x : E × ℝ), x ∈ s → 0 ≤ ↑g x\ng_eq : ∀ (x : { x // x ∈ f.domain }) (y : ℝ), ↑g (↑x, y) = y - ↑f x\nx : E\n⊢ -↑g (x, 0) = ↑g (0, N x) - ↑g (x, N x)\n[PROOFSTEP]\nsimp [← map_sub, ← map_neg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nhf'_nonneg : ∀ (x : { x // x ∈ f'.domain }), ↑x ∈ s → 0 ≤ ↑f' x\nhf'_dense : ∀ (y : E × ℝ), ∃ x, ↑x + y ∈ s\ng : E × ℝ →ₗ[ℝ] ℝ\ng_nonneg : ∀ (x : E × ℝ), x ∈ s → 0 ≤ ↑g x\ng_eq : ∀ (x : { x // x ∈ f.domain }) (y : ℝ), ↑g (↑x, y) = y - ↑f x\nx : E\n⊢ ↑g (0, N x) - ↑g (x, N x) = N x - ↑g (x, N x)\n[PROOFSTEP]\nsimpa using g_eq 0 (N x)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℝ E\nf : E →ₗ.[ℝ] ℝ\nN : E → ℝ\nN_hom : ∀ (c : ℝ), 0 < c → ∀ (x : E), N (c • x) = c * N x\nN_add : ∀ (x y : E), N (x + y) ≤ N x + N y\nhf : ∀ (x : { x // x ∈ f.domain }), ↑f x ≤ N ↑x\ns : ConvexCone ℝ (E × ℝ) :=\n  { carrier := {p | N p.fst ≤ p.snd},\n    smul_mem' := (_ : ∀ (c : ℝ), 0 < c → ∀ (p : E × ℝ), p ∈ {p | N p.fst ≤ p.snd} → N (c • p.fst) ≤ c * p.snd),\n    add_mem' :=\n      (_ :\n        ∀ (x : E × ℝ),\n          x ∈ {p | N p.fst ≤ p.snd} → ∀ (y : E × ℝ), y ∈ {p | N p.fst ≤ p.snd} → N (x.fst + y.fst) ≤ (x + y).snd) }\nf' : E × ℝ →ₗ.[ℝ] ℝ := LinearPMap.coprod (-f) (toPMap LinearMap.id ⊤)\nhf'_nonneg : ∀ (x : { x // x ∈ f'.domain }), ↑x ∈ s → 0 ≤ ↑f' x\nhf'_dense : ∀ (y : E × ℝ), ∃ x, ↑x + y ∈ s\ng : E × ℝ →ₗ[ℝ] ℝ\ng_nonneg : ∀ (x : E × ℝ), x ∈ s → 0 ≤ ↑g x\ng_eq : ∀ (x : { x // x ∈ f.domain }) (y : ℝ), ↑g (↑x, y) = y - ↑f x\nx : E\n⊢ N x - ↑g (x, N x) ≤ N x\n[PROOFSTEP]\nsimpa using g_nonneg ⟨x, N x⟩ (le_refl (N x))\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Cone.Basic", "llama_tokens": 44340, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7217432062975979, "lm_q2_score": 0.5, "lm_q1q2_score": 0.36087160314879896}}
{"text": "[GOAL]\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\n⊢ ↟(Submodule.subtype (LinearMap.ker f)) ≫ f = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\nx : ↑(of R { x // x ∈ LinearMap.ker f })\n⊢ ↑(↟(Submodule.subtype (LinearMap.ker f)) ≫ f) x = ↑0 x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase h.mk\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\nval✝ : ↑M\nproperty✝ : val✝ ∈ LinearMap.ker f\n⊢ ↑(↟(Submodule.subtype (LinearMap.ker f)) ≫ f) { val := val✝, property := property✝ } =\n    ↑0 { val := val✝, property := property✝ }\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\ns : Fork f 0\nc : ↑s.pt\n⊢ ↑f (↑(Fork.ι s) c) = 0\n[PROOFSTEP]\nrw [← @Function.comp_apply _ _ _ f (Fork.ι s) c, ← coe_comp, Fork.condition, HasZeroMorphisms.comp_zero (Fork.ι s) N]\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\ns : Fork f 0\nc : ↑s.pt\n⊢ ↑0 c = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\ns : Fork f 0\nm : s.pt ⟶ (kernelCone f).pt\nh : m ≫ Fork.ι (kernelCone f) = Fork.ι s\nx : ↑s.pt\n⊢ ↑(↑m x) =\n    ↑(↑((fun s =>\n              LinearMap.codRestrict (LinearMap.ker f) (Fork.ι s) (_ : ∀ (c : ↑s.pt), ↑(Fork.ι s) c ∈ LinearMap.ker f))\n            s)\n        x)\n[PROOFSTEP]\nsimp [← h]\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\ns : Fork f 0\nm : s.pt ⟶ (kernelCone f).pt\nh : m ≫ Fork.ι (kernelCone f) = Fork.ι s\nx : ↑s.pt\n⊢ ↑m x =\n    ↑(LinearMap.codRestrict (LinearMap.ker f) (m ≫ Fork.ι (kernelCone f))\n          (_ : ∀ (c : ↑s.pt), ↑(m ≫ Fork.ι (kernelCone f)) c ∈ LinearMap.ker f))\n      x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\ns : Cofork f 0\nm : (cokernelCocone f).pt ⟶ s.pt\nh : Cofork.π (cokernelCocone f) ≫ m = Cofork.π s\n⊢ m = (fun s => Submodule.liftQ (LinearMap.range f) (Cofork.π s) (_ : LinearMap.range f ≤ LinearMap.ker (Cofork.π s))) s\n[PROOFSTEP]\nhaveI : Epi (asHom (LinearMap.range f).mkQ) :=\n  (epi_iff_range_eq_top _).mpr\n    (Submodule.range_mkQ _)\n      -- Porting note: broken dot notation\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\ns : Cofork f 0\nm : (cokernelCocone f).pt ⟶ s.pt\nh : Cofork.π (cokernelCocone f) ≫ m = Cofork.π s\nthis : Epi (↟(Submodule.mkQ (LinearMap.range f)))\n⊢ m = (fun s => Submodule.liftQ (LinearMap.range f) (Cofork.π s) (_ : LinearMap.range f ≤ LinearMap.ker (Cofork.π s))) s\n[PROOFSTEP]\napply (cancel_epi (asHom (LinearMap.range f).mkQ)).1\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\nf : M ⟶ N\ns : Cofork f 0\nm : (cokernelCocone f).pt ⟶ s.pt\nh : Cofork.π (cokernelCocone f) ≫ m = Cofork.π s\nthis : Epi (↟(Submodule.mkQ (LinearMap.range f)))\n⊢ ↟(Submodule.mkQ (LinearMap.range f)) ≫ m =\n    ↟(Submodule.mkQ (LinearMap.range f)) ≫\n      (fun s => Submodule.liftQ (LinearMap.range f) (Cofork.π s) (_ : LinearMap.range f ≤ LinearMap.ker (Cofork.π s))) s\n[PROOFSTEP]\nconvert h\n[GOAL]\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf : G ⟶ H\n⊢ cokernel.π f ≫ (cokernelIsoRangeQuotient f).hom = Submodule.mkQ (LinearMap.range f)\n[PROOFSTEP]\nconvert colimit.isoColimitCocone_ι_hom (F := parallelPair f 0) _ _\n[GOAL]\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf✝ : G ⟶ H\nM N : ModuleCat R\nf : M ⟶ N\nx y : ↑N\nm : ↑M\nw : x = y + ↑f m\n⊢ ↑(cokernel.π f) x = ↑(cokernel.π f) y\n[PROOFSTEP]\nsubst w\n[GOAL]\nR : Type u\ninst✝ : Ring R\nG H : ModuleCat R\nf✝ : G ⟶ H\nM N : ModuleCat R\nf : M ⟶ N\ny : ↑N\nm : ↑M\n⊢ ↑(cokernel.π f) (y + ↑f m) = ↑(cokernel.π f) y\n[PROOFSTEP]\nsimpa only [map_add, add_right_eq_self] using cokernel.condition_apply f m\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.ModuleCat.Kernels", "llama_tokens": 1779, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6791787121629466, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.3607860980968736}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : α → β\ny : β\no : Option α\n⊢ y ∈ Option.map f o ↔ ∃ x, x ∈ o ∧ f x = y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : α → β\nH : Function.Injective f\na : α\no : Option α\n⊢ f a ∈ Option.map f o ↔ a ∈ o\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : α → β\no : Option α\np : β → Prop\n⊢ (∀ (y : β), y ∈ Option.map f o → p y) ↔ ∀ (x : α), x ∈ o → p (f x)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : α → β\no : Option α\np : β → Prop\n⊢ (∃ y, y ∈ Option.map f o ∧ p y) ↔ ∃ x, x ∈ o ∧ p (f x)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : α → β\nHf : Function.Injective f\na₁ a₂ : α\nH : Option.map f (some a₁) = Option.map f (some a₂)\n⊢ some a₁ = some a₂\n[PROOFSTEP]\nrw [Hf (Option.some.inj H)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nx : Option α\nf : α → Option β\nb : β\n⊢ Option.bind x f = some b ↔ ∃ a, x = some a ∧ f a = some b\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : α → Option β\nb : β\n⊢ Option.bind none f = some b ↔ ∃ a, none = some a ∧ f a = some b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : α → Option β\nb : β\nval✝ : α\n⊢ Option.bind (some val✝) f = some b ↔ ∃ a, some val✝ = some a ∧ f a = some b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\no : Option α\nf : α → Option β\n⊢ Option.bind o f = none ↔ ∀ (b : β) (a : α), a ∈ o → ¬b ∈ f a\n[PROOFSTEP]\nsimp only [eq_none_iff_forall_not_mem, mem_def, bind_eq_some, not_exists, not_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf g : α → β\nh : Option.map f = Option.map g\nx : α\n⊢ some (f x) = some (g x)\n[PROOFSTEP]\nsimp only [← map_some', h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf₁ : α → β\nf₂ : α → γ\ng₁ : β → δ\ng₂ : γ → δ\nh : g₁ ∘ f₁ = g₂ ∘ f₂\na : α\n⊢ Option.map g₁ (Option.map f₁ (some a)) = Option.map g₂ (Option.map f₂ (some a))\n[PROOFSTEP]\nrw [map_map, h, ← map_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx✝ : Option α\nf : α → Option β\nx : Option α\n⊢ (pbind x fun a x => f a) = Option.bind x f\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\nf : α → Option β\n⊢ (pbind none fun a x => f a) = Option.bind none f\n[PROOFSTEP]\nsimp only [pbind, none_bind', some_bind']\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\nf : α → Option β\nval✝ : α\n⊢ (pbind (some val✝) fun a x => f a) = Option.bind (some val✝) f\n[PROOFSTEP]\nsimp only [pbind, none_bind', some_bind']\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\np : α✝ → Prop\nf✝ : (a : α✝) → p a → β✝\nx✝ : Option α✝\nα β γ : Type u_5\nf : β → γ\nx : Option α\ng : α → Option β\n⊢ Option.map f (x >>= g) = do\n    let a ← x\n    Option.map f (g a)\n[PROOFSTEP]\nsimp only [← map_eq_map, ← bind_pure_comp, LawfulMonad.bind_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx✝ : Option α\nf : β → γ\nx : Option α\ng : α → Option β\n⊢ Option.map f (Option.bind x g) = Option.bind x fun a => Option.map f (g a)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\nf : β → γ\ng : α → Option β\n⊢ Option.map f (Option.bind none g) = Option.bind none fun a => Option.map f (g a)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\nf : β → γ\ng : α → Option β\nval✝ : α\n⊢ Option.map f (Option.bind (some val✝) g) = Option.bind (some val✝) fun a => Option.map f (g a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx✝ : Option α\nf : β → γ\nx : Option α\ng : (a : α) → a ∈ x → Option β\n⊢ Option.map f (pbind x g) = pbind x fun a H => Option.map f (g a H)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\nf : β → γ\ng : (a : α) → a ∈ none → Option β\n⊢ Option.map f (pbind none g) = pbind none fun a H => Option.map f (g a H)\n[PROOFSTEP]\nsimp only [pbind, map_none']\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\nf : β → γ\nval✝ : α\ng : (a : α) → a ∈ some val✝ → Option β\n⊢ Option.map f (pbind (some val✝) g) = pbind (some val✝) fun a H => Option.map f (g a H)\n[PROOFSTEP]\nsimp only [pbind, map_none']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx✝ : Option α\nf : α → β\nx : Option α\ng : (b : β) → b ∈ Option.map f x → Option γ\n⊢ pbind (Option.map f x) g = pbind x fun a h => g (f a) (_ : f a ∈ Option.map f x)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\nf : α → β\ng : (b : β) → b ∈ Option.map f none → Option γ\n⊢ pbind (Option.map f none) g = pbind none fun a h => g (f a) (_ : f a ∈ Option.map f none)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\nf : α → β\nval✝ : α\ng : (b : β) → b ∈ Option.map f (some val✝) → Option γ\n⊢ pbind (Option.map f (some val✝)) g = pbind (some val✝) fun a h => g (f a) (_ : f a ∈ Option.map f (some val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\nx : Option α\na : α\nh : ∀ (a : α), a ∈ x → p a\nha : a ∈ x\n⊢ f a (_ : p a) ∈ pmap f x h\n[PROOFSTEP]\nrw [mem_def] at ha ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\nx : Option α\na : α\nh : ∀ (a : α), a ∈ x → p a\nha✝ : a ∈ x\nha : x = some a\n⊢ pmap f x h = some (f a (_ : p a))\n[PROOFSTEP]\nsubst ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\na : α\nh : ∀ (a_1 : α), a_1 ∈ some a → p a_1\nha : a ∈ some a\n⊢ pmap f (some a) h = some (f a (_ : p a))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\nx✝ : Option α\ng : γ → α\nx : Option γ\nH : ∀ (a : α), a ∈ Option.map g x → p a\n⊢ pmap f (Option.map g x) H = pmap (fun a h => f (g a) h) x (_ : ∀ (a : γ), a ∈ x → p (g a))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\nx : Option α\ng : γ → α\nH : ∀ (a : α), a ∈ Option.map g none → p a\n⊢ pmap f (Option.map g none) H = pmap (fun a h => f (g a) h) none (_ : ∀ (a : γ), a ∈ none → p (g a))\n[PROOFSTEP]\nsimp only [map_none', map_some', pmap]\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\nx : Option α\ng : γ → α\nval✝ : γ\nH : ∀ (a : α), a ∈ Option.map g (some val✝) → p a\n⊢ pmap f (Option.map g (some val✝)) H = pmap (fun a h => f (g a) h) (some val✝) (_ : ∀ (a : γ), a ∈ some val✝ → p (g a))\n[PROOFSTEP]\nsimp only [map_none', map_some', pmap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx✝ : Option α\ng : β → γ\nf : (a : α) → p a → β\nx : Option α\nH : ∀ (a : α), a ∈ x → p a\n⊢ Option.map g (pmap f x H) = pmap (fun a h => g (f a h)) x H\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\ng : β → γ\nf : (a : α) → p a → β\nH : ∀ (a : α), a ∈ none → p a\n⊢ Option.map g (pmap f none H) = pmap (fun a h => g (f a h)) none H\n[PROOFSTEP]\nsimp only [map_none', map_some', pmap]\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\ng : β → γ\nf : (a : α) → p a → β\nval✝ : α\nH : ∀ (a : α), a ∈ some val✝ → p a\n⊢ Option.map g (pmap f (some val✝) H) = pmap (fun a h => g (f a h)) (some val✝) H\n[PROOFSTEP]\nsimp only [map_none', map_some', pmap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np✝ : α → Prop\nf✝ : (a : α) → p✝ a → β\nx✝ : Option α\np : α → Prop\nf : α → β\nx : Option α\nH : ∀ (a : α), a ∈ x → p a\n⊢ pmap (fun a x => f a) x H = Option.map f x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np✝ : α → Prop\nf✝ : (a : α) → p✝ a → β\nx : Option α\np : α → Prop\nf : α → β\nH : ∀ (a : α), a ∈ none → p a\n⊢ pmap (fun a x => f a) none H = Option.map f none\n[PROOFSTEP]\nsimp only [map_none', map_some', pmap]\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np✝ : α → Prop\nf✝ : (a : α) → p✝ a → β\nx : Option α\np : α → Prop\nf : α → β\nval✝ : α\nH : ∀ (a : α), a ∈ some val✝ → p a\n⊢ pmap (fun a x => f a) (some val✝) H = Option.map f (some val✝)\n[PROOFSTEP]\nsimp only [map_none', map_some', pmap]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\np✝ : α✝ → Prop\nf✝ : (a : α✝) → p✝ a → β✝\nx✝ : Option α✝\nα β γ : Type u_5\nx : Option α\ng : α → Option β\np : β → Prop\nf : (b : β) → p b → γ\nH : ∀ (a : β), a ∈ x >>= g → p a\nH' : ∀ (a : α) (b : β), b ∈ g a → b ∈ x >>= g\n⊢ pmap f (x >>= g) H = do\n    let a ← x\n    pmap f (g a) (_ : ∀ (b : β), b ∈ g a → p b)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\np✝ : α✝ → Prop\nf✝ : (a : α✝) → p✝ a → β✝\nx : Option α✝\nα β γ : Type u_5\ng : α → Option β\np : β → Prop\nf : (b : β) → p b → γ\nH : ∀ (a : β), a ∈ none >>= g → p a\nH' : ∀ (a : α) (b : β), b ∈ g a → b ∈ none >>= g\n⊢ pmap f (none >>= g) H = do\n    let a ← none\n    pmap f (g a) (_ : ∀ (b : β), b ∈ g a → p b)\n[PROOFSTEP]\nsimp only [pmap, bind_eq_bind, none_bind, some_bind]\n[GOAL]\ncase some\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\np✝ : α✝ → Prop\nf✝ : (a : α✝) → p✝ a → β✝\nx : Option α✝\nα β γ : Type u_5\ng : α → Option β\np : β → Prop\nf : (b : β) → p b → γ\nval✝ : α\nH : ∀ (a : β), a ∈ some val✝ >>= g → p a\nH' : ∀ (a : α) (b : β), b ∈ g a → b ∈ some val✝ >>= g\n⊢ pmap f (some val✝ >>= g) H = do\n    let a ← some val✝\n    pmap f (g a) (_ : ∀ (b : β), b ∈ g a → p b)\n[PROOFSTEP]\nsimp only [pmap, bind_eq_bind, none_bind, some_bind]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\np✝ : α✝ → Prop\nf✝ : (a : α✝) → p✝ a → β✝\nx✝ : Option α✝\nα : Type u_5\nβ γ : Type u_6\np : α → Prop\nf : (a : α) → p a → β\nx : Option α\ng : β → Option γ\nH : ∀ (a : α), a ∈ x → p a\n⊢ pmap f x H >>= g = pbind x fun a h => g (f a (_ : p a))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\np✝ : α✝ → Prop\nf✝ : (a : α✝) → p✝ a → β✝\nx : Option α✝\nα : Type u_5\nβ γ : Type u_6\np : α → Prop\nf : (a : α) → p a → β\ng : β → Option γ\nH : ∀ (a : α), a ∈ none → p a\n⊢ pmap f none H >>= g = pbind none fun a h => g (f a (_ : p a))\n[PROOFSTEP]\nsimp only [pmap, bind_eq_bind, none_bind, some_bind, pbind]\n[GOAL]\ncase some\nα✝ : Type u_1\nβ✝ : Type u_2\nγ✝ : Type u_3\nδ : Type u_4\np✝ : α✝ → Prop\nf✝ : (a : α✝) → p✝ a → β✝\nx : Option α✝\nα : Type u_5\nβ γ : Type u_6\np : α → Prop\nf : (a : α) → p a → β\ng : β → Option γ\nval✝ : α\nH : ∀ (a : α), a ∈ some val✝ → p a\n⊢ pmap f (some val✝) H >>= g = pbind (some val✝) fun a h => g (f a (_ : p a))\n[PROOFSTEP]\nsimp only [pmap, bind_eq_bind, none_bind, some_bind, pbind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\nf : (a : α) → a ∈ x → Option β\nh' : ∀ (a : α) (H : a ∈ x), f a H = none → x = none\n⊢ pbind x f = none ↔ x = none\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nf : (a : α) → a ∈ none → Option β\nh' : ∀ (a : α) (H : a ∈ none), f a H = none → none = none\n⊢ pbind none f = none ↔ none = none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nval✝ : α\nf : (a : α) → a ∈ some val✝ → Option β\nh' : ∀ (a : α) (H : a ∈ some val✝), f a H = none → some val✝ = none\n⊢ pbind (some val✝) f = none ↔ some val✝ = none\n[PROOFSTEP]\nsimp only [pbind, iff_false]\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nval✝ : α\nf : (a : α) → a ∈ some val✝ → Option β\nh' : ∀ (a : α) (H : a ∈ some val✝), f a H = none → some val✝ = none\n⊢ ¬f val✝ (_ : some val✝ = some val✝) = none\n[PROOFSTEP]\nintro h\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nval✝ : α\nf : (a : α) → a ∈ some val✝ → Option β\nh' : ∀ (a : α) (H : a ∈ some val✝), f a H = none → some val✝ = none\nh : f val✝ (_ : some val✝ = some val✝) = none\n⊢ False\n[PROOFSTEP]\ncases h' _ rfl h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\nf : (a : α) → a ∈ x → Option β\ny : β\n⊢ pbind x f = some y ↔ ∃ z H, f z H = some y\n[PROOFSTEP]\nrcases x with (_ | x)\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\ny : β\nf : (a : α) → a ∈ none → Option β\n⊢ pbind none f = some y ↔ ∃ z H, f z H = some y\n[PROOFSTEP]\nsimp only [pbind, false_iff, not_exists]\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\ny : β\nf : (a : α) → a ∈ none → Option β\n⊢ ∀ (x : α) (x_1 : x ∈ none), ¬f x x_1 = some y\n[PROOFSTEP]\nintro z h\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\ny : β\nf : (a : α) → a ∈ none → Option β\nz : α\nh : z ∈ none\n⊢ ¬f z h = some y\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\ny : β\nx : α\nf : (a : α) → a ∈ some x → Option β\n⊢ pbind (some x) f = some y ↔ ∃ z H, f z H = some y\n[PROOFSTEP]\nsimp only [pbind]\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\ny : β\nx : α\nf : (a : α) → a ∈ some x → Option β\n⊢ f x (_ : some x = some x) = some y ↔ ∃ z H, f z H = some y\n[PROOFSTEP]\nrefine ⟨λ h => ⟨x, rfl, h⟩, ?_⟩\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\ny : β\nx : α\nf : (a : α) → a ∈ some x → Option β\n⊢ (∃ z H, f z H = some y) → f x (_ : some x = some x) = some y\n[PROOFSTEP]\nrintro ⟨z, H, hz⟩\n[GOAL]\ncase some.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\ny : β\nx : α\nf : (a : α) → a ∈ some x → Option β\nz : α\nH : z ∈ some x\nhz : f z H = some y\n⊢ f x (_ : some x = some x) = some y\n[PROOFSTEP]\nsimp only [mem_def, Option.some_inj] at H \n[GOAL]\ncase some.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\ny : β\nx : α\nf : (a : α) → a ∈ some x → Option β\nz : α\nH✝ : z ∈ some x\nhz : f z H✝ = some y\nH : x = z\n⊢ f x (_ : some x = some x) = some y\n[PROOFSTEP]\nsimpa [H] using hz\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\nx : Option α\nh : ∀ (a : α), a ∈ x → p a\n⊢ pmap f x h = none ↔ x = none\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\nh : ∀ (a : α), a ∈ none → p a\n⊢ pmap f none h = none ↔ none = none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\nval✝ : α\nh : ∀ (a : α), a ∈ some val✝ → p a\n⊢ pmap f (some val✝) h = none ↔ some val✝ = none\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\nx : Option α\nhf : ∀ (a : α), a ∈ x → p a\ny : β\n⊢ pmap f x hf = some y ↔ ∃ a H, f a (_ : p a) = y\n[PROOFSTEP]\nrcases x with (_ | x)\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\ny : β\nhf : ∀ (a : α), a ∈ none → p a\n⊢ pmap f none hf = some y ↔ ∃ a H, f a (_ : p a) = y\n[PROOFSTEP]\nsimp only [not_mem_none, exists_false, pmap, not_false_iff, exists_prop_of_false]\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\ny : β\nx : α\nhf : ∀ (a : α), a ∈ some x → p a\n⊢ pmap f (some x) hf = some y ↔ ∃ a H, f a (_ : p a) = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase some.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\ny : β\nx : α\nhf : ∀ (a : α), a ∈ some x → p a\n⊢ pmap f (some x) hf = some y → ∃ a H, f a (_ : p a) = y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase some.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\ny : β\nx : α\nhf : ∀ (a : α), a ∈ some x → p a\nh : pmap f (some x) hf = some y\n⊢ ∃ a H, f a (_ : p a) = y\n[PROOFSTEP]\nsimp only [pmap, Option.some_inj] at h \n[GOAL]\ncase some.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\ny : β\nx : α\nhf : ∀ (a : α), a ∈ some x → p a\nh : f x (_ : p x) = y\n⊢ ∃ a H, f a (_ : p a) = y\n[PROOFSTEP]\nrefine ⟨x, rfl, h⟩\n[GOAL]\ncase some.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\ny : β\nx : α\nhf : ∀ (a : α), a ∈ some x → p a\n⊢ (∃ a H, f a (_ : p a) = y) → pmap f (some x) hf = some y\n[PROOFSTEP]\nrintro ⟨a, H, rfl⟩\n[GOAL]\ncase some.mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\nx : α\nhf : ∀ (a : α), a ∈ some x → p a\na : α\nH : some x = some a\n⊢ pmap f (some x) hf = some (f a (_ : p a))\n[PROOFSTEP]\nsimp only [mem_def, Option.some_inj] at H \n[GOAL]\ncase some.mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf : (a : α) → p a → β\nx : α\nhf : ∀ (a : α), a ∈ some x → p a\na : α\nH✝ : some x = some a\nH : x = a\n⊢ pmap f (some x) hf = some (f a (_ : p a))\n[PROOFSTEP]\nsimp only [H, pmap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx✝ : Option α\nf : (a : α) → p a → β\nx : Option (Option α)\nH : ∀ (a : Option α), a ∈ x → ∀ (a_2 : α), a_2 ∈ a → p a_2\n⊢ join (pmap (pmap f) x H) = pmap f (join x) (_ : ∀ (a : α), a ∈ join x → p a)\n[PROOFSTEP]\nrcases x with (_ | _ | x)\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\nf : (a : α) → p a → β\nH : ∀ (a : Option α), a ∈ none → ∀ (a_2 : α), a_2 ∈ a → p a_2\n⊢ join (pmap (pmap f) none H) = pmap f (join none) (_ : ∀ (a : α), a ∈ join none → p a)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some.none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx : Option α\nf : (a : α) → p a → β\nH : ∀ (a : Option α), a ∈ some none → ∀ (a_2 : α), a_2 ∈ a → p a_2\n⊢ join (pmap (pmap f) (some none) H) = pmap f (join (some none)) (_ : ∀ (a : α), a ∈ join (some none) → p a)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some.some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : α → Prop\nf✝ : (a : α) → p a → β\nx✝ : Option α\nf : (a : α) → p a → β\nx : α\nH : ∀ (a : Option α), a ∈ some (some x) → ∀ (a_2 : α), a_2 ∈ a → p a_2\n⊢ join (pmap (pmap f) (some (some x)) H) = pmap f (join (some (some x))) (_ : ∀ (a : α), a ∈ join (some (some x)) → p a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nx : Option α\n⊢ (Option.orElse none fun x_1 => x) = x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\n⊢ (Option.orElse none fun x => none) = none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nval✝ : α\n⊢ (Option.orElse none fun x => some val✝) = some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nx : Option α\n⊢ (Option.orElse x fun x => none) = x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\n⊢ (Option.orElse none fun x => none) = none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nval✝ : α\n⊢ (Option.orElse (some val✝) fun x => none) = some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Inhabited α\no : Option α\n⊢ getD o default = iget o\n[PROOFSTEP]\ncases o\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Inhabited α\n⊢ getD none default = iget none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝ : Inhabited α\nval✝ : α\n⊢ getD (some val✝) default = iget (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : Prop\ninst✝ : Decidable p\nu : Unit\n⊢ _root_.guard p = some u ↔ p\n[PROOFSTEP]\ncases u\n[GOAL]\ncase unit\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : Prop\ninst✝ : Decidable p\n⊢ _root_.guard p = some PUnit.unit ↔ p\n[PROOFSTEP]\nby_cases h : p\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : Prop\ninst✝ : Decidable p\nh : p\n⊢ _root_.guard p = some PUnit.unit ↔ p\n[PROOFSTEP]\nsimp [_root_.guard, h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\np : Prop\ninst✝ : Decidable p\nh : ¬p\n⊢ _root_.guard p = some PUnit.unit ↔ p\n[PROOFSTEP]\nsimp [_root_.guard, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : α → α → α\nh : ∀ (a b : α), f a b = a ∨ f a b = b\na b : α\n⊢ liftOrGet f (some a) (some b) = some a ∨ liftOrGet f (some a) (some b) = some b\n[PROOFSTEP]\nsimpa [liftOrGet] using h a b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : Option α → β\no : Option α\n⊢ casesOn' o (f none) (f ∘ fun a => some a) = f o\n[PROOFSTEP]\ncases o\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : Option α → β\n⊢ casesOn' none (f none) (f ∘ fun a => some a) = f none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : Option α → β\nval✝ : α\n⊢ casesOn' (some val✝) (f none) (f ∘ fun a => some a) = f (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\no o' : Option α\nx : α\n⊢ (HOrElse.hOrElse o fun x => o') = some x ↔ o = some x ∨ o = none ∧ o' = some x\n[PROOFSTEP]\ncases o\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\no' : Option α\nx : α\n⊢ (HOrElse.hOrElse none fun x => o') = some x ↔ none = some x ∨ none = none ∧ o' = some x\n[PROOFSTEP]\nsimp only [true_and, false_or, eq_self_iff_true, none_orElse]\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\no' : Option α\nx val✝ : α\n⊢ (HOrElse.hOrElse (some val✝) fun x => o') = some x ↔ some val✝ = some x ∨ some val✝ = none ∧ o' = some x\n[PROOFSTEP]\nsimp only [some_orElse, or_false, false_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\no o' : Option α\n⊢ (HOrElse.hOrElse o fun x => o') = none ↔ o = none ∧ o' = none\n[PROOFSTEP]\ncases o\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\no' : Option α\n⊢ (HOrElse.hOrElse none fun x => o') = none ↔ none = none ∧ o' = none\n[PROOFSTEP]\nsimp only [true_and, none_orElse, eq_self_iff_true]\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\no' : Option α\nval✝ : α\n⊢ (HOrElse.hOrElse (some val✝) fun x => o') = none ↔ some val✝ = none ∧ o' = none\n[PROOFSTEP]\nsimp only [some_orElse, false_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : Option α → β\no : Option α\n⊢ Option.elim o (f none) (f ∘ some) = f o\n[PROOFSTEP]\ncases o\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : Option α → β\n⊢ Option.elim none (f none) (f ∘ some) = f none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nf : Option α → β\nval✝ : α\n⊢ Option.elim (some val✝) (f none) (f ∘ some) = f (some val✝)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Data.Option.Basic", "llama_tokens": 12465, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947425132314, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3605898688780899}}
{"text": "[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p = 0\n⊢ trailingDegree p = ⊤\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : p ≠ 0\n⊢ trailingDegree p = ↑(natTrailingDegree p)\n[PROOFSTEP]\nlet ⟨n, hn⟩ := not_forall.1 (mt Option.eq_none_iff_forall_not_mem.2 (mt trailingDegree_eq_top.1 hp))\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : p ≠ 0\nn : ℕ\nhn : ¬¬n ∈ trailingDegree p\n⊢ trailingDegree p = ↑(natTrailingDegree p)\n[PROOFSTEP]\nhave hn : trailingDegree p = n := Classical.not_not.1 hn\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : p ≠ 0\nn : ℕ\nhn✝ : ¬¬n ∈ trailingDegree p\nhn : trailingDegree p = ↑n\n⊢ trailingDegree p = ↑(natTrailingDegree p)\n[PROOFSTEP]\nrw [natTrailingDegree, hn]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : p ≠ 0\nn : ℕ\nhn✝ : ¬¬n ∈ trailingDegree p\nhn : trailingDegree p = ↑n\n⊢ ↑n = ↑(Option.getD (↑n) 0)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhp : p ≠ 0\n⊢ trailingDegree p = ↑n ↔ natTrailingDegree p = n\n[PROOFSTEP]\nrw [trailingDegree_eq_natTrailingDegree hp]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhp : p ≠ 0\n⊢ ↑(natTrailingDegree p) = ↑n ↔ natTrailingDegree p = n\n[PROOFSTEP]\nexact WithTop.coe_eq_coe\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\n⊢ trailingDegree p = ↑n ↔ natTrailingDegree p = n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\n⊢ trailingDegree p = ↑n → natTrailingDegree p = n\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\nH : trailingDegree p = ↑n\n⊢ natTrailingDegree p = n\n[PROOFSTEP]\nrwa [← trailingDegree_eq_iff_natTrailingDegree_eq]\n[GOAL]\ncase mp\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\nH : trailingDegree p = ↑n\n⊢ p ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : 0 < n\nH : trailingDegree 0 = ↑n\n⊢ False\n[PROOFSTEP]\nrw [trailingDegree_zero] at H \n[GOAL]\ncase mp\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : 0 < n\nH : ⊤ = ↑n\n⊢ False\n[PROOFSTEP]\nexact Option.noConfusion H\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\n⊢ natTrailingDegree p = n → trailingDegree p = ↑n\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\nH : natTrailingDegree p = n\n⊢ trailingDegree p = ↑n\n[PROOFSTEP]\nrwa [trailingDegree_eq_iff_natTrailingDegree_eq]\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nhn : 0 < n\nH : natTrailingDegree p = n\n⊢ p ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : 0 < n\nH : natTrailingDegree 0 = n\n⊢ False\n[PROOFSTEP]\nrw [natTrailingDegree_zero] at H \n[GOAL]\ncase mpr\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : 0 < n\nH : 0 = n\n⊢ False\n[PROOFSTEP]\nrw [H] at hn \n[GOAL]\ncase mpr\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : n < n\nH : 0 = n\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ hn\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : trailingDegree p = ↑n\nhp0 : p = 0\n⊢ False\n[PROOFSTEP]\nrw [hp0] at h \n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : trailingDegree 0 = ↑n\nhp0 : p = 0\n⊢ False\n[PROOFSTEP]\nexact Option.noConfusion h\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : trailingDegree p = ↑n\nhp0 : p ≠ 0\n⊢ ↑(natTrailingDegree p) = ↑n\n[PROOFSTEP]\nrwa [← trailingDegree_eq_natTrailingDegree hp0]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ ↑(natTrailingDegree p) ≤ trailingDegree p\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : p = 0\n⊢ ↑(natTrailingDegree p) ≤ trailingDegree p\n[PROOFSTEP]\nrw [hp, trailingDegree_zero]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : p = 0\n⊢ ↑(natTrailingDegree 0) ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : ¬p = 0\n⊢ ↑(natTrailingDegree p) ≤ trailingDegree p\n[PROOFSTEP]\nrw [trailingDegree_eq_natTrailingDegree hp]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝¹ : Semiring R\np q✝ r : R[X]\ninst✝ : Semiring S\nq : S[X]\nh : trailingDegree p = trailingDegree q\n⊢ natTrailingDegree p = natTrailingDegree q\n[PROOFSTEP]\nunfold natTrailingDegree\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝¹ : Semiring R\np q✝ r : R[X]\ninst✝ : Semiring S\nq : S[X]\nh : trailingDegree p = trailingDegree q\n⊢ Option.getD (trailingDegree p) 0 = Option.getD (trailingDegree q) 0\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff p n ≠ 0\n⊢ natTrailingDegree p ≤ n\n[PROOFSTEP]\nhave : WithTop.some (natTrailingDegree p) = Nat.cast (natTrailingDegree p) := rfl\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff p n ≠ 0\nthis : ↑(natTrailingDegree p) = ↑(natTrailingDegree p)\n⊢ natTrailingDegree p ≤ n\n[PROOFSTEP]\nrw [← WithTop.coe_le_coe, this, ← trailingDegree_eq_natTrailingDegree]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff p n ≠ 0\nthis : ↑(natTrailingDegree p) = ↑(natTrailingDegree p)\n⊢ trailingDegree p ≤ ↑n\n[PROOFSTEP]\nexact le_trailingDegree_of_ne_zero h\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff p n ≠ 0\nthis : ↑(natTrailingDegree p) = ↑(natTrailingDegree p)\n⊢ p ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh✝ : coeff p n ≠ 0\nthis : ↑(natTrailingDegree p) = ↑(natTrailingDegree p)\nh : p = 0\n⊢ False\n[PROOFSTEP]\nsubst h\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\nq r : R[X]\nh : coeff 0 n ≠ 0\nthis : ↑(natTrailingDegree 0) = ↑(natTrailingDegree 0)\n⊢ False\n[PROOFSTEP]\nexact h rfl\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff q (natTrailingDegree p) ≠ 0\n⊢ trailingDegree q ≤ trailingDegree p\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff q (natTrailingDegree p) ≠ 0\nhp : p = 0\n⊢ trailingDegree q ≤ trailingDegree p\n[PROOFSTEP]\nrw [hp]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff q (natTrailingDegree p) ≠ 0\nhp : p = 0\n⊢ trailingDegree q ≤ trailingDegree 0\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff q (natTrailingDegree p) ≠ 0\nhp : ¬p = 0\n⊢ trailingDegree q ≤ trailingDegree p\n[PROOFSTEP]\nrw [trailingDegree_eq_natTrailingDegree hp]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : coeff q (natTrailingDegree p) ≠ 0\nhp : ¬p = 0\n⊢ trailingDegree q ≤ ↑(natTrailingDegree p)\n[PROOFSTEP]\nexact le_trailingDegree_of_ne_zero h\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\n⊢ natTrailingDegree p ≠ n → trailingDegree p ≠ ↑n\n[PROOFSTEP]\nhave : Nat.cast n = WithTop.some n := rfl\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nthis : ↑n = ↑n\n⊢ natTrailingDegree p ≠ n → trailingDegree p ≠ ↑n\n[PROOFSTEP]\nexact mt fun h => by rw [natTrailingDegree, h, this, ← WithTop.some_eq_coe, Option.getD_some]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nthis : ↑n = ↑n\nh : trailingDegree p = ↑n\n⊢ natTrailingDegree p = n\n[PROOFSTEP]\nrw [natTrailingDegree, h, this, ← WithTop.some_eq_coe, Option.getD_some]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhp : p ≠ 0\nH : ↑n ≤ trailingDegree p\n⊢ n ≤ natTrailingDegree p\n[PROOFSTEP]\nrw [trailingDegree_eq_natTrailingDegree hp] at H \n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhp : p ≠ 0\nH : ↑n ≤ ↑(natTrailingDegree p)\n⊢ n ≤ natTrailingDegree p\n[PROOFSTEP]\nexact WithTop.coe_le_coe.mp H\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhq : q ≠ 0\nhpq : trailingDegree p ≤ trailingDegree q\n⊢ natTrailingDegree p ≤ natTrailingDegree q\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhq : q ≠ 0\nhpq : trailingDegree p ≤ trailingDegree q\nhp : p = 0\n⊢ natTrailingDegree p ≤ natTrailingDegree q\n[PROOFSTEP]\nrw [hp, natTrailingDegree_zero]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhq : q ≠ 0\nhpq : trailingDegree p ≤ trailingDegree q\nhp : p = 0\n⊢ 0 ≤ natTrailingDegree q\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhq : q ≠ 0\nhpq : trailingDegree p ≤ trailingDegree q\nhp : ¬p = 0\n⊢ natTrailingDegree p ≤ natTrailingDegree q\n[PROOFSTEP]\nrw [trailingDegree_eq_natTrailingDegree hp, trailingDegree_eq_natTrailingDegree hq] at hpq \n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhq : q ≠ 0\nhpq : ↑(natTrailingDegree p) ≤ ↑(natTrailingDegree q)\nhp : ¬p = 0\n⊢ natTrailingDegree p ≤ natTrailingDegree q\n[PROOFSTEP]\nexact WithTop.coe_le_coe.1 hpq\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nha : a ≠ 0\n⊢ trailingDegree (↑(monomial n) a) = ↑n\n[PROOFSTEP]\nrw [trailingDegree, support_monomial n ha, min_singleton]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nha : a ≠ 0\n⊢ ↑n = ↑n\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nha : a ≠ 0\n⊢ natTrailingDegree (↑(monomial n) a) = n\n[PROOFSTEP]\nrw [natTrailingDegree, trailingDegree_monomial ha]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nha : a ≠ 0\n⊢ Option.getD (↑n) 0 = n\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nha : a = 0\n⊢ natTrailingDegree (↑(monomial n) a) ≤ n\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nha : a = 0\n⊢ ↑n ≤ trailingDegree (↑(monomial n) a)\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ 0 ≤ trailingDegree 1\n[PROOFSTEP]\nrw [← C_1]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ 0 ≤ trailingDegree (↑C 1)\n[PROOFSTEP]\nexact le_trailingDegree_C\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\n⊢ natTrailingDegree ↑n = 0\n[PROOFSTEP]\nsimp only [← C_eq_nat_cast, natTrailingDegree_C]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nha : a ≠ 0\n⊢ trailingDegree (↑C a * X ^ n) = ↑n\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial, trailingDegree_monomial ha]\n[GOAL]\nR : Type u\nS : Type v\na✝ b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\na : R\n⊢ ↑n ≤ trailingDegree (↑C a * X ^ n)\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial]\n[GOAL]\nR : Type u\nS : Type v\na✝ b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\na : R\n⊢ ↑n ≤ trailingDegree (↑(monomial n) a)\n[PROOFSTEP]\nexact le_trailingDegree_monomial\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : n < natTrailingDegree p\n⊢ coeff p n = 0\n[PROOFSTEP]\napply coeff_eq_zero_of_trailingDegree_lt\n[GOAL]\ncase h\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : n < natTrailingDegree p\n⊢ ↑n < trailingDegree p\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : n < natTrailingDegree p\nhp : p = 0\n⊢ ↑n < trailingDegree p\n[PROOFSTEP]\nrw [hp, trailingDegree_zero]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : n < natTrailingDegree p\nhp : p = 0\n⊢ ↑n < ⊤\n[PROOFSTEP]\nexact WithTop.coe_lt_top n\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : n < natTrailingDegree p\nhp : ¬p = 0\n⊢ ↑n < trailingDegree p\n[PROOFSTEP]\nrw [trailingDegree_eq_natTrailingDegree hp]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nn : ℕ\nh : n < natTrailingDegree p\nhp : ¬p = 0\n⊢ ↑n < ↑(natTrailingDegree p)\n[PROOFSTEP]\nexact WithTop.coe_lt_coe.2 h\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\n⊢ ↑n ≤ trailingDegree (X ^ n)\n[PROOFSTEP]\nsimpa only [C_1, one_mul] using le_trailingDegree_C_mul_X_pow n (1 : R)\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p ≠ 0\n⊢ natTrailingDegree p = min' (support p) (_ : Finset.Nonempty (support p))\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p ≠ 0\n⊢ natTrailingDegree p ≤ min' (support p) (_ : Finset.Nonempty (support p))\n[PROOFSTEP]\napply le_min'\n[GOAL]\ncase a.H2\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p ≠ 0\n⊢ ∀ (y : ℕ), y ∈ support p → natTrailingDegree p ≤ y\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase a.H2\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p ≠ 0\ny : ℕ\nhy : y ∈ support p\n⊢ natTrailingDegree p ≤ y\n[PROOFSTEP]\nexact natTrailingDegree_le_of_mem_supp y hy\n[GOAL]\ncase a\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p ≠ 0\n⊢ min' (support p) (_ : Finset.Nonempty (support p)) ≤ natTrailingDegree p\n[PROOFSTEP]\napply Finset.min'_le\n[GOAL]\ncase a.H2\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p ≠ 0\n⊢ natTrailingDegree p ∈ support p\n[PROOFSTEP]\nexact mem_support_iff.mpr (trailingCoeff_nonzero_iff_nonzero.mpr h)\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : p ≠ 0\nhn : ∀ (m : ℕ), m < n → coeff p m = 0\n⊢ n ≤ natTrailingDegree p\n[PROOFSTEP]\nrw [natTrailingDegree_eq_support_min' hp]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nhp : p ≠ 0\nhn : ∀ (m : ℕ), m < n → coeff p m = 0\n⊢ n ≤ min' (support p) (_ : Finset.Nonempty (support p))\n[PROOFSTEP]\nexact Finset.le_min' _ _ _ fun m hm => not_lt.1 fun hmn => mem_support_iff.1 hm <| hn _ hmn\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\n⊢ natTrailingDegree p ≤ natDegree p\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nhp : p = 0\n⊢ natTrailingDegree p ≤ natDegree p\n[PROOFSTEP]\nrw [hp, natDegree_zero, natTrailingDegree_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nhp : ¬p = 0\n⊢ natTrailingDegree p ≤ natDegree p\n[PROOFSTEP]\nexact le_natDegree_of_ne_zero (mt trailingCoeff_eq_zero.mp hp)\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nhp : p ≠ 0\nn : ℕ\n⊢ natTrailingDegree (p * X ^ n) = natTrailingDegree p + n\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nhp : p ≠ 0\nn : ℕ\n⊢ natTrailingDegree (p * X ^ n) ≤ natTrailingDegree p + n\n[PROOFSTEP]\nrefine' natTrailingDegree_le_of_ne_zero fun h => mt trailingCoeff_eq_zero.mp hp _\n[GOAL]\ncase a\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nhp : p ≠ 0\nn : ℕ\nh : coeff (p * X ^ n) (natTrailingDegree p + n) = 0\n⊢ trailingCoeff p = 0\n[PROOFSTEP]\nrwa [trailingCoeff, ← coeff_mul_X_pow]\n[GOAL]\ncase a\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nhp : p ≠ 0\nn : ℕ\n⊢ natTrailingDegree p + n ≤ natTrailingDegree (p * X ^ n)\n[PROOFSTEP]\nrw [natTrailingDegree_eq_support_min' fun h => hp (mul_X_pow_eq_zero h), Finset.le_min'_iff]\n[GOAL]\ncase a\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nhp : p ≠ 0\nn : ℕ\n⊢ ∀ (y : ℕ), y ∈ support (p * X ^ n) → natTrailingDegree p + n ≤ y\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase a\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nhp : p ≠ 0\nn y : ℕ\nhy : y ∈ support (p * X ^ n)\n⊢ natTrailingDegree p + n ≤ y\n[PROOFSTEP]\nhave key : n ≤ y := by\n  rw [mem_support_iff, coeff_mul_X_pow'] at hy \n  exact by_contra fun h => hy (if_neg h)\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nhp : p ≠ 0\nn y : ℕ\nhy : y ∈ support (p * X ^ n)\n⊢ n ≤ y\n[PROOFSTEP]\nrw [mem_support_iff, coeff_mul_X_pow'] at hy \n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nhp : p ≠ 0\nn y : ℕ\nhy : (if n ≤ y then coeff p (y - n) else 0) ≠ 0\n⊢ n ≤ y\n[PROOFSTEP]\nexact by_contra fun h => hy (if_neg h)\n[GOAL]\ncase a\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nhp : p ≠ 0\nn y : ℕ\nhy : y ∈ support (p * X ^ n)\nkey : n ≤ y\n⊢ natTrailingDegree p + n ≤ y\n[PROOFSTEP]\nrw [mem_support_iff, coeff_mul_X_pow', if_pos key] at hy \n[GOAL]\ncase a\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np✝ q r p : R[X]\nhp : p ≠ 0\nn y : ℕ\nhy : coeff p (y - n) ≠ 0\nkey : n ≤ y\n⊢ natTrailingDegree p + n ≤ y\n[PROOFSTEP]\nexact (le_tsub_iff_right key).mp (natTrailingDegree_le_of_ne_zero hy)\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ trailingDegree p + trailingDegree q ≤ trailingDegree (p * q)\n[PROOFSTEP]\nrefine' Finset.le_min fun n hn => _\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : n ∈ support (p * q)\n⊢ trailingDegree p + trailingDegree q ≤ ↑n\n[PROOFSTEP]\nrw [mem_support_iff, coeff_mul] at hn \n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : ∑ x in Nat.antidiagonal n, coeff p x.fst * coeff q x.snd ≠ 0\n⊢ trailingDegree p + trailingDegree q ≤ ↑n\n[PROOFSTEP]\nobtain ⟨⟨i, j⟩, hij, hpq⟩ := exists_ne_zero_of_sum_ne_zero hn\n[GOAL]\ncase intro.mk.intro\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : ∑ x in Nat.antidiagonal n, coeff p x.fst * coeff q x.snd ≠ 0\ni j : ℕ\nhij : (i, j) ∈ Nat.antidiagonal n\nhpq : coeff p (i, j).fst * coeff q (i, j).snd ≠ 0\n⊢ trailingDegree p + trailingDegree q ≤ ↑n\n[PROOFSTEP]\nrefine'\n  (add_le_add (min_le (mem_support_iff.mpr (left_ne_zero_of_mul hpq)))\n        (min_le (mem_support_iff.mpr (right_ne_zero_of_mul hpq)))).trans\n    (le_of_eq _)\n[GOAL]\ncase intro.mk.intro\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\nhn : ∑ x in Nat.antidiagonal n, coeff p x.fst * coeff q x.snd ≠ 0\ni j : ℕ\nhij : (i, j) ∈ Nat.antidiagonal n\nhpq : coeff p (i, j).fst * coeff q (i, j).snd ≠ 0\n⊢ ↑(i, j).fst + ↑(i, j).snd = ↑n\n[PROOFSTEP]\nrwa [← WithTop.coe_add, WithTop.coe_eq_coe, ← Nat.mem_antidiagonal]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p * q ≠ 0\n⊢ natTrailingDegree p + natTrailingDegree q ≤ natTrailingDegree (p * q)\n[PROOFSTEP]\nhave hp : p ≠ 0 := fun hp => h (by rw [hp, zero_mul])\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p * q ≠ 0\nhp : p = 0\n⊢ p * q = 0\n[PROOFSTEP]\nrw [hp, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p * q ≠ 0\nhp : p ≠ 0\n⊢ natTrailingDegree p + natTrailingDegree q ≤ natTrailingDegree (p * q)\n[PROOFSTEP]\nhave hq : q ≠ 0 := fun hq =>\n  h\n    (by rw [hq, mul_zero])\n      -- Porting note: Needed to account for different coercion behaviour & add the lemma below\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p * q ≠ 0\nhp : p ≠ 0\nhq : q = 0\n⊢ p * q = 0\n[PROOFSTEP]\nrw [hq, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p * q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ natTrailingDegree p + natTrailingDegree q ≤ natTrailingDegree (p * q)\n[PROOFSTEP]\nhave : ∀ (p : R[X]), WithTop.some (natTrailingDegree p) = Nat.cast (natTrailingDegree p) := fun p ↦ rfl\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p * q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\nthis : ∀ (p : R[X]), ↑(natTrailingDegree p) = ↑(natTrailingDegree p)\n⊢ natTrailingDegree p + natTrailingDegree q ≤ natTrailingDegree (p * q)\n[PROOFSTEP]\nrw [← WithTop.coe_le_coe, WithTop.coe_add, this p, this q, this (p * q), ← trailingDegree_eq_natTrailingDegree hp, ←\n  trailingDegree_eq_natTrailingDegree hq, ← trailingDegree_eq_natTrailingDegree h]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : p * q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\nthis : ∀ (p : R[X]), ↑(natTrailingDegree p) = ↑(natTrailingDegree p)\n⊢ trailingDegree p + trailingDegree q ≤ trailingDegree (p * q)\n[PROOFSTEP]\nexact le_trailingDegree_mul\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ coeff (p * q) (natTrailingDegree p + natTrailingDegree q) = trailingCoeff p * trailingCoeff q\n[PROOFSTEP]\nrw [coeff_mul]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ ∑ x in Nat.antidiagonal (natTrailingDegree p + natTrailingDegree q), coeff p x.fst * coeff q x.snd =\n    trailingCoeff p * trailingCoeff q\n[PROOFSTEP]\nrefine'\n  Finset.sum_eq_single (p.natTrailingDegree, q.natTrailingDegree) _ fun h => (h (Nat.mem_antidiagonal.mpr rfl)).elim\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\n⊢ ∀ (b : ℕ × ℕ),\n    b ∈ Nat.antidiagonal (natTrailingDegree p + natTrailingDegree q) →\n      b ≠ (natTrailingDegree p, natTrailingDegree q) → coeff p b.fst * coeff q b.snd = 0\n[PROOFSTEP]\nrintro ⟨i, j⟩ h₁ h₂\n[GOAL]\ncase mk\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\ni j : ℕ\nh₁ : (i, j) ∈ Nat.antidiagonal (natTrailingDegree p + natTrailingDegree q)\nh₂ : (i, j) ≠ (natTrailingDegree p, natTrailingDegree q)\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nrw [Nat.mem_antidiagonal] at h₁ \n[GOAL]\ncase mk\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natTrailingDegree p + natTrailingDegree q\nh₂ : (i, j) ≠ (natTrailingDegree p, natTrailingDegree q)\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nby_cases hi : i < p.natTrailingDegree\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natTrailingDegree p + natTrailingDegree q\nh₂ : (i, j) ≠ (natTrailingDegree p, natTrailingDegree q)\nhi : i < natTrailingDegree p\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nrw [coeff_eq_zero_of_lt_natTrailingDegree hi, zero_mul]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natTrailingDegree p + natTrailingDegree q\nh₂ : (i, j) ≠ (natTrailingDegree p, natTrailingDegree q)\nhi : ¬i < natTrailingDegree p\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nby_cases hj : j < q.natTrailingDegree\n[GOAL]\ncase pos\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natTrailingDegree p + natTrailingDegree q\nh₂ : (i, j) ≠ (natTrailingDegree p, natTrailingDegree q)\nhi : ¬i < natTrailingDegree p\nhj : j < natTrailingDegree q\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nrw [coeff_eq_zero_of_lt_natTrailingDegree hj, mul_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natTrailingDegree p + natTrailingDegree q\nh₂ : (i, j) ≠ (natTrailingDegree p, natTrailingDegree q)\nhi : ¬i < natTrailingDegree p\nhj : ¬j < natTrailingDegree q\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nrw [not_lt] at hi hj \n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natTrailingDegree p + natTrailingDegree q\nh₂ : (i, j) ≠ (natTrailingDegree p, natTrailingDegree q)\nhi : natTrailingDegree p ≤ i\nhj : natTrailingDegree q ≤ j\n⊢ coeff p (i, j).fst * coeff q (i, j).snd = 0\n[PROOFSTEP]\nrefine' (h₂ (Prod.ext_iff.mpr _).symm).elim\n[GOAL]\ncase neg\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\ni j : ℕ\nh₁ : (i, j).fst + (i, j).snd = natTrailingDegree p + natTrailingDegree q\nh₂ : (i, j) ≠ (natTrailingDegree p, natTrailingDegree q)\nhi : natTrailingDegree p ≤ i\nhj : natTrailingDegree q ≤ j\n⊢ (natTrailingDegree p, natTrailingDegree q).fst = (i, j).fst ∧\n    (natTrailingDegree p, natTrailingDegree q).snd = (i, j).snd\n[PROOFSTEP]\nexact (add_eq_add_iff_eq_and_eq hi hj).mp h₁.symm\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\n⊢ trailingDegree (p * q) = trailingDegree p + trailingDegree q\n[PROOFSTEP]\nhave hp : p ≠ 0 := fun hp => h (by rw [hp, trailingCoeff_zero, zero_mul])\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p = 0\n⊢ trailingCoeff p * trailingCoeff q = 0\n[PROOFSTEP]\nrw [hp, trailingCoeff_zero, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p ≠ 0\n⊢ trailingDegree (p * q) = trailingDegree p + trailingDegree q\n[PROOFSTEP]\nhave hq : q ≠ 0 := fun hq => h (by rw [hq, trailingCoeff_zero, mul_zero])\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q = 0\n⊢ trailingCoeff p * trailingCoeff q = 0\n[PROOFSTEP]\nrw [hq, trailingCoeff_zero, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ trailingDegree (p * q) = trailingDegree p + trailingDegree q\n[PROOFSTEP]\nrefine' le_antisymm _ le_trailingDegree_mul\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ trailingDegree (p * q) ≤ trailingDegree p + trailingDegree q\n[PROOFSTEP]\nrw [trailingDegree_eq_natTrailingDegree hp, trailingDegree_eq_natTrailingDegree hq, ← ENat.coe_add]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ trailingDegree (p * q) ≤ ↑(natTrailingDegree p + natTrailingDegree q)\n[PROOFSTEP]\napply le_trailingDegree_of_ne_zero\n[GOAL]\ncase h\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ coeff (p * q) (natTrailingDegree p + natTrailingDegree q) ≠ 0\n[PROOFSTEP]\nrwa [coeff_mul_natTrailingDegree_add_natTrailingDegree]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\n⊢ natTrailingDegree (p * q) = natTrailingDegree p + natTrailingDegree q\n[PROOFSTEP]\nhave hp : p ≠ 0 := fun hp => h (by rw [hp, trailingCoeff_zero, zero_mul])\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p = 0\n⊢ trailingCoeff p * trailingCoeff q = 0\n[PROOFSTEP]\nrw [hp, trailingCoeff_zero, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p ≠ 0\n⊢ natTrailingDegree (p * q) = natTrailingDegree p + natTrailingDegree q\n[PROOFSTEP]\nhave hq : q ≠ 0 := fun hq =>\n  h\n    (by rw [hq, trailingCoeff_zero, mul_zero])\n      -- Porting note: Needed to account for different coercion behaviour & add the lemmas below\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q = 0\n⊢ trailingCoeff p * trailingCoeff q = 0\n[PROOFSTEP]\nrw [hq, trailingCoeff_zero, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ natTrailingDegree (p * q) = natTrailingDegree p + natTrailingDegree q\n[PROOFSTEP]\nhave aux1 : ∀ n, Nat.cast n = WithTop.some (n) := fun n ↦ rfl\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\naux1 : ∀ (n : ℕ), ↑n = ↑n\n⊢ natTrailingDegree (p * q) = natTrailingDegree p + natTrailingDegree q\n[PROOFSTEP]\nhave aux2 : ∀ (p : R[X]), WithTop.some (natTrailingDegree p) = Nat.cast (natTrailingDegree p) := fun p ↦ rfl\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\naux1 : ∀ (n : ℕ), ↑n = ↑n\naux2 : ∀ (p : R[X]), ↑(natTrailingDegree p) = ↑(natTrailingDegree p)\n⊢ natTrailingDegree (p * q) = natTrailingDegree p + natTrailingDegree q\n[PROOFSTEP]\napply natTrailingDegree_eq_of_trailingDegree_eq_some\n[GOAL]\ncase h\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np q r : R[X]\nh : trailingCoeff p * trailingCoeff q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\naux1 : ∀ (n : ℕ), ↑n = ↑n\naux2 : ∀ (p : R[X]), ↑(natTrailingDegree p) = ↑(natTrailingDegree p)\n⊢ trailingDegree (p * q) = ↑(natTrailingDegree p + natTrailingDegree q)\n[PROOFSTEP]\nrw [trailingDegree_mul' h, aux1 (natTrailingDegree p + natTrailingDegree q), WithTop.coe_add, aux2 p, aux2 q, ←\n  trailingDegree_eq_natTrailingDegree hp, ← trailingDegree_eq_natTrailingDegree hq]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Ring R\np : R[X]\n⊢ trailingDegree (-p) = trailingDegree p\n[PROOFSTEP]\nunfold trailingDegree\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Ring R\np : R[X]\n⊢ Finset.min (support (-p)) = Finset.min (support p)\n[PROOFSTEP]\nrw [support_neg]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Ring R\np : R[X]\n⊢ natTrailingDegree (-p) = natTrailingDegree p\n[PROOFSTEP]\nsimp [natTrailingDegree]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Ring R\nn : ℤ\n⊢ natTrailingDegree ↑n = 0\n[PROOFSTEP]\nsimp only [← C_eq_int_cast, natTrailingDegree_C]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\nc : R\n⊢ nextCoeffUp (↑C c) = 0\n[PROOFSTEP]\nrw [nextCoeffUp]\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\nc : R\n⊢ (if natTrailingDegree (↑C c) = 0 then 0 else coeff (↑C c) (natTrailingDegree (↑C c) + 1)) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np : R[X]\nhp : 0 < natTrailingDegree p\n⊢ nextCoeffUp p = coeff p (natTrailingDegree p + 1)\n[PROOFSTEP]\nrw [nextCoeffUp, if_neg]\n[GOAL]\ncase hnc\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np : R[X]\nhp : 0 < natTrailingDegree p\n⊢ ¬natTrailingDegree p = 0\n[PROOFSTEP]\ncontrapose! hp\n[GOAL]\ncase hnc\nR : Type u\nS : Type v\na b : R\nn m : ℕ\ninst✝ : Semiring R\np : R[X]\nhp : natTrailingDegree p = 0\n⊢ natTrailingDegree p ≤ 0\n[PROOFSTEP]\nsimpa\n[GOAL]\nR : Type u\nS : Type v\na b : R\nn✝ m : ℕ\ninst✝ : Semiring R\np q : R[X]\nι : Type u_1\nn : ℕ∞\nh : trailingDegree p < n\nh₀ : p = 0\n⊢ n ≤ trailingDegree p\n[PROOFSTEP]\nsimp [h₀]\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.Degree.TrailingDegree", "llama_tokens": 16482, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947290421275, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3605898614608009}}
{"text": "[GOAL]\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nX Y : Comma L R\nH : X = Y\n⊢ X.left = Y.left\n[PROOFSTEP]\ncases H\n[GOAL]\ncase refl\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nX : Comma L R\n⊢ X.left = X.left\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nX Y : Comma L R\nH : X = Y\n⊢ (eqToHom H).left = eqToHom (_ : X.left = Y.left)\n[PROOFSTEP]\ncases H\n[GOAL]\ncase refl\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nX : Comma L R\n⊢ (eqToHom (_ : X = X)).left = eqToHom (_ : X.left = X.left)\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nX Y : Comma L R\nH : X = Y\n⊢ X.right = Y.right\n[PROOFSTEP]\ncases H\n[GOAL]\ncase refl\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nX : Comma L R\n⊢ X.right = X.right\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nX Y : Comma L R\nH : X = Y\n⊢ (eqToHom H).right = eqToHom (_ : X.right = Y.right)\n[PROOFSTEP]\ncases H\n[GOAL]\ncase refl\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nX : Comma L R\n⊢ (eqToHom (_ : X = X)).right = eqToHom (_ : X.right = X.right)\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nL₁ L₂ L₃ : A ⥤ T\nR₁ R₂ R₃ : B ⥤ T\nX Y : Comma L₁ R₁\nl : X.left ≅ Y.left\nr : X.right ≅ Y.right\nh : autoParam (L₁.map l.hom ≫ Y.hom = X.hom ≫ R₁.map r.hom) _auto✝\n⊢ L₁.map l.inv ≫ X.hom = Y.hom ≫ R₁.map r.inv\n[PROOFSTEP]\nrw [← L₁.mapIso_inv l, Iso.inv_comp_eq, L₁.mapIso_hom, ← Category.assoc, h, Category.assoc, ← R₁.map_comp]\n[GOAL]\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nL₁ L₂ L₃ : A ⥤ T\nR₁ R₂ R₃ : B ⥤ T\nX Y : Comma L₁ R₁\nl : X.left ≅ Y.left\nr : X.right ≅ Y.right\nh : autoParam (L₁.map l.hom ≫ Y.hom = X.hom ≫ R₁.map r.hom) _auto✝\n⊢ X.hom = X.hom ≫ R₁.map (r.hom ≫ r.inv)\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nL₁ L₂ L₃ : A ⥤ T\nR₁ R₂ R₃ : B ⥤ T\nl l' : L₁ ⟶ L₂\nh : l = l'\nX : Comma L₂ R\n⊢ L₁.map (Iso.refl ((mapLeft R l).obj X).left).hom ≫ ((mapLeft R l').obj X).hom =\n    ((mapLeft R l).obj X).hom ≫ R.map (Iso.refl ((mapLeft R l).obj X).right).hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nL₁ L₂ L₃ : A ⥤ T\nR₁ R₂ R₃ : B ⥤ T\nl l' : L₁ ⟶ L₂\nh : l = l'\n⊢ ∀ {X Y : Comma L₂ R} (f : X ⟶ Y),\n    (mapLeft R l).map f ≫\n        ((fun X => isoMk (Iso.refl ((mapLeft R l).obj X).left) (Iso.refl ((mapLeft R l).obj X).right)) Y).hom =\n      ((fun X => isoMk (Iso.refl ((mapLeft R l).obj X).left) (Iso.refl ((mapLeft R l).obj X).right)) X).hom ≫\n        (mapLeft R l').map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nL₁ L₂ L₃ : A ⥤ T\nR₁ R₂ R₃ : B ⥤ T\nr r' : R₁ ⟶ R₂\nh : r = r'\nX : Comma L R₁\n⊢ L.map (Iso.refl ((mapRight L r).obj X).left).hom ≫ ((mapRight L r').obj X).hom =\n    ((mapRight L r).obj X).hom ≫ R₂.map (Iso.refl ((mapRight L r).obj X).right).hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\nA : Type u₁\ninst✝² : Category.{v₁, u₁} A\nB : Type u₂\ninst✝¹ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝ : Category.{v₃, u₃} T\nL : A ⥤ T\nR : B ⥤ T\nL₁ L₂ L₃ : A ⥤ T\nR₁ R₂ R₃ : B ⥤ T\nr r' : R₁ ⟶ R₂\nh : r = r'\n⊢ ∀ {X Y : Comma L R₁} (f : X ⟶ Y),\n    (mapRight L r).map f ≫\n        ((fun X => isoMk (Iso.refl ((mapRight L r).obj X).left) (Iso.refl ((mapRight L r).obj X).right)) Y).hom =\n      ((fun X => isoMk (Iso.refl ((mapRight L r).obj X).left) (Iso.refl ((mapRight L r).obj X).right)) X).hom ≫\n        (mapRight L r').map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nA : Type u₁\ninst✝⁴ : Category.{v₁, u₁} A\nB : Type u₂\ninst✝³ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝² : Category.{v₃, u₃} T\nL✝ : A ⥤ T\nR✝ : B ⥤ T\nC : Type u₄\ninst✝¹ : Category.{v₄, u₄} C\nD : Type u₅\ninst✝ : Category.{v₅, u₅} D\nF : C ⥤ A\nL : A ⥤ T\nR : B ⥤ T\nX✝ Y✝ : Comma (F ⋙ L) R\nf : X✝ ⟶ Y✝\n⊢ L.map (F.map f.left) ≫ ((fun X => { left := F.obj X.left, right := X.right, hom := X.hom }) Y✝).hom =\n    ((fun X => { left := F.obj X.left, right := X.right, hom := X.hom }) X✝).hom ≫ R.map f.right\n[PROOFSTEP]\nsimpa using f.w\n[GOAL]\nA : Type u₁\ninst✝⁵ : Category.{v₁, u₁} A\nB : Type u₂\ninst✝⁴ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝³ : Category.{v₃, u₃} T\nL✝ : A ⥤ T\nR✝ : B ⥤ T\nC : Type u₄\ninst✝² : Category.{v₄, u₄} C\nD : Type u₅\ninst✝¹ : Category.{v₅, u₅} D\nF : C ⥤ A\nL : A ⥤ T\nR : B ⥤ T\ninst✝ : Faithful F\nX Y : Comma (F ⋙ L) R\nf g : X ⟶ Y\nh : (preLeft F L R).map f = (preLeft F L R).map g\n⊢ f.right = g.right\n[PROOFSTEP]\napply congrArg CommaMorphism.right h\n[GOAL]\nA : Type u₁\ninst✝⁵ : Category.{v₁, u₁} A\nB : Type u₂\ninst✝⁴ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝³ : Category.{v₃, u₃} T\nL✝ : A ⥤ T\nR✝ : B ⥤ T\nC : Type u₄\ninst✝² : Category.{v₄, u₄} C\nD : Type u₅\ninst✝¹ : Category.{v₅, u₅} D\nF : C ⥤ A\nL : A ⥤ T\nR : B ⥤ T\ninst✝ : Full F\nX Y : Comma (F ⋙ L) R\nf : (preLeft F L R).obj X ⟶ (preLeft F L R).obj Y\n⊢ (F ⋙ L).map (F.preimage f.left) ≫ Y.hom = X.hom ≫ R.map f.right\n[PROOFSTEP]\nsimpa using f.w\n[GOAL]\nA : Type u₁\ninst✝⁵ : Category.{v₁, u₁} A\nB : Type u₂\ninst✝⁴ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝³ : Category.{v₃, u₃} T\nL✝ : A ⥤ T\nR✝ : B ⥤ T\nC : Type u₄\ninst✝² : Category.{v₄, u₄} C\nD : Type u₅\ninst✝¹ : Category.{v₅, u₅} D\nF : C ⥤ A\nL : A ⥤ T\nR : B ⥤ T\ninst✝ : EssSurj F\nY : Comma L R\n⊢ L.map (Functor.objObjPreimageIso F Y.left).hom ≫ Y.hom =\n    ((preLeft F L R).obj\n          { left := Functor.objPreimage F Y.left, right := Y.right,\n            hom := (L.mapIso (Functor.objObjPreimageIso F Y.left)).hom ≫ Y.hom }).hom ≫\n      R.map\n        (Iso.refl\n            ((preLeft F L R).obj\n                { left := Functor.objPreimage F Y.left, right := Y.right,\n                  hom := (L.mapIso (Functor.objObjPreimageIso F Y.left)).hom ≫ Y.hom }).right).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u₁\ninst✝⁵ : Category.{v₁, u₁} A\nB : Type u₂\ninst✝⁴ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝³ : Category.{v₃, u₃} T\nL✝ : A ⥤ T\nR✝ : B ⥤ T\nC : Type u₄\ninst✝² : Category.{v₄, u₄} C\nD : Type u₅\ninst✝¹ : Category.{v₅, u₅} D\nL : A ⥤ T\nF : C ⥤ B\nR : B ⥤ T\ninst✝ : Faithful F\nX Y : Comma L (F ⋙ R)\nf g : X ⟶ Y\nh : (preRight L F R).map f = (preRight L F R).map g\n⊢ f.left = g.left\n[PROOFSTEP]\napply congrArg CommaMorphism.left h\n[GOAL]\nA : Type u₁\ninst✝⁵ : Category.{v₁, u₁} A\nB : Type u₂\ninst✝⁴ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝³ : Category.{v₃, u₃} T\nL✝ : A ⥤ T\nR✝ : B ⥤ T\nC : Type u₄\ninst✝² : Category.{v₄, u₄} C\nD : Type u₅\ninst✝¹ : Category.{v₅, u₅} D\nL : A ⥤ T\nF : C ⥤ B\nR : B ⥤ T\ninst✝ : Full F\nX Y : Comma L (F ⋙ R)\nf : (preRight L F R).obj X ⟶ (preRight L F R).obj Y\n⊢ L.map f.left ≫ Y.hom = X.hom ≫ (F ⋙ R).map (F.preimage f.right)\n[PROOFSTEP]\nsimpa using f.w\n[GOAL]\nA : Type u₁\ninst✝⁵ : Category.{v₁, u₁} A\nB : Type u₂\ninst✝⁴ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝³ : Category.{v₃, u₃} T\nL✝ : A ⥤ T\nR✝ : B ⥤ T\nC : Type u₄\ninst✝² : Category.{v₄, u₄} C\nD : Type u₅\ninst✝¹ : Category.{v₅, u₅} D\nL : A ⥤ T\nF : C ⥤ B\nR : B ⥤ T\ninst✝ : EssSurj F\nY : Comma L R\n⊢ L.map\n        (Iso.refl\n            ((preRight L F R).obj\n                { left := Y.left, right := Functor.objPreimage F Y.right,\n                  hom := Y.hom ≫ (R.mapIso (Functor.objObjPreimageIso F Y.right)).inv }).left).hom ≫\n      Y.hom =\n    ((preRight L F R).obj\n          { left := Y.left, right := Functor.objPreimage F Y.right,\n            hom := Y.hom ≫ (R.mapIso (Functor.objObjPreimageIso F Y.right)).inv }).hom ≫\n      R.map (Functor.objObjPreimageIso F Y.right).hom\n[PROOFSTEP]\nsimp [← R.map_comp]\n[GOAL]\nA : Type u₁\ninst✝⁴ : Category.{v₁, u₁} A\nB : Type u₂\ninst✝³ : Category.{v₂, u₂} B\nT : Type u₃\ninst✝² : Category.{v₃, u₃} T\nL✝ : A ⥤ T\nR✝ : B ⥤ T\nC : Type u₄\ninst✝¹ : Category.{v₄, u₄} C\nD : Type u₅\ninst✝ : Category.{v₅, u₅} D\nL : A ⥤ T\nR : B ⥤ T\nF : T ⥤ C\nX✝ Y✝ : Comma L R\nf : X✝ ⟶ Y✝\n⊢ (L ⋙ F).map f.left ≫ ((fun X => { left := X.left, right := X.right, hom := F.map X.hom }) Y✝).hom =\n    ((fun X => { left := X.left, right := X.right, hom := F.map X.hom }) X✝).hom ≫ (R ⋙ F).map f.right\n[PROOFSTEP]\nsimp only [Functor.comp_map, ← F.map_comp, f.w]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Comma", "llama_tokens": 4857, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802603710086, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.3605152369891829}}
{"text": "[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j k : ι\n⊢ d C i j ≫ d C j k = 0\n[PROOFSTEP]\nby_cases hij : c.Rel i j\n[GOAL]\ncase pos\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j k : ι\nhij : ComplexShape.Rel c i j\n⊢ d C i j ≫ d C j k = 0\n[PROOFSTEP]\nby_cases hjk : c.Rel j k\n[GOAL]\ncase pos\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j k : ι\nhij : ComplexShape.Rel c i j\nhjk : ComplexShape.Rel c j k\n⊢ d C i j ≫ d C j k = 0\n[PROOFSTEP]\nexact C.d_comp_d' i j k hij hjk\n[GOAL]\ncase neg\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j k : ι\nhij : ComplexShape.Rel c i j\nhjk : ¬ComplexShape.Rel c j k\n⊢ d C i j ≫ d C j k = 0\n[PROOFSTEP]\nrw [C.shape j k hjk, comp_zero]\n[GOAL]\ncase neg\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j k : ι\nhij : ¬ComplexShape.Rel c i j\n⊢ d C i j ≫ d C j k = 0\n[PROOFSTEP]\nrw [C.shape i j hij, zero_comp]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC₁ C₂ : HomologicalComplex V c\nh_X : C₁.X = C₂.X\nh_d :\n  ∀ (i j : ι),\n    ComplexShape.Rel c i j → d C₁ i j ≫ eqToHom (_ : X C₁ j = X C₂ j) = eqToHom (_ : X C₁ i = X C₂ i) ≫ d C₂ i j\n⊢ C₁ = C₂\n[PROOFSTEP]\nobtain ⟨X₁, d₁, s₁, h₁⟩ := C₁\n[GOAL]\ncase mk\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC₂ : HomologicalComplex V c\nX₁ : ι → V\nd₁ : (i j : ι) → X₁ i ⟶ X₁ j\ns₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0\nh₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0\nh_X : (mk X₁ d₁).X = C₂.X\nh_d :\n  ∀ (i j : ι),\n    ComplexShape.Rel c i j →\n      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X C₂ j) = eqToHom (_ : X (mk X₁ d₁) i = X C₂ i) ≫ d C₂ i j\n⊢ mk X₁ d₁ = C₂\n[PROOFSTEP]\nobtain ⟨X₂, d₂, s₂, h₂⟩ := C₂\n[GOAL]\ncase mk.mk\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nX₁ : ι → V\nd₁ : (i j : ι) → X₁ i ⟶ X₁ j\ns₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0\nh₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0\nX₂ : ι → V\nd₂ : (i j : ι) → X₂ i ⟶ X₂ j\ns₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0\nh₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0\nh_X : (mk X₁ d₁).X = (mk X₂ d₂).X\nh_d :\n  ∀ (i j : ι),\n    ComplexShape.Rel c i j →\n      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₂ d₂) j) =\n        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₂ d₂) i) ≫ d (mk X₂ d₂) i j\n⊢ mk X₁ d₁ = mk X₂ d₂\n[PROOFSTEP]\ndsimp at h_X \n[GOAL]\ncase mk.mk\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nX₁ : ι → V\nd₁ : (i j : ι) → X₁ i ⟶ X₁ j\ns₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0\nh₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0\nX₂ : ι → V\nd₂ : (i j : ι) → X₂ i ⟶ X₂ j\ns₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0\nh₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0\nh_X : X₁ = X₂\nh_d :\n  ∀ (i j : ι),\n    ComplexShape.Rel c i j →\n      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₂ d₂) j) =\n        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₂ d₂) i) ≫ d (mk X₂ d₂) i j\n⊢ mk X₁ d₁ = mk X₂ d₂\n[PROOFSTEP]\nsubst h_X\n[GOAL]\ncase mk.mk\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nX₁ : ι → V\nd₁ : (i j : ι) → X₁ i ⟶ X₁ j\ns₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0\nh₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0\nd₂ : (i j : ι) → X₁ i ⟶ X₁ j\ns₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0\nh₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0\nh_d :\n  ∀ (i j : ι),\n    ComplexShape.Rel c i j →\n      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =\n        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j\n⊢ mk X₁ d₁ = mk X₁ d₂\n[PROOFSTEP]\nsimp only [mk.injEq, heq_eq_eq, true_and]\n[GOAL]\ncase mk.mk\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nX₁ : ι → V\nd₁ : (i j : ι) → X₁ i ⟶ X₁ j\ns₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0\nh₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0\nd₂ : (i j : ι) → X₁ i ⟶ X₁ j\ns₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0\nh₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0\nh_d :\n  ∀ (i j : ι),\n    ComplexShape.Rel c i j →\n      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =\n        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j\n⊢ d₁ = d₂\n[PROOFSTEP]\next i j\n[GOAL]\ncase mk.mk.h.h\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nX₁ : ι → V\nd₁ : (i j : ι) → X₁ i ⟶ X₁ j\ns₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0\nh₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0\nd₂ : (i j : ι) → X₁ i ⟶ X₁ j\ns₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0\nh₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0\nh_d :\n  ∀ (i j : ι),\n    ComplexShape.Rel c i j →\n      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =\n        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j\ni j : ι\n⊢ d₁ i j = d₂ i j\n[PROOFSTEP]\nby_cases hij : c.Rel i j\n[GOAL]\ncase pos\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nX₁ : ι → V\nd₁ : (i j : ι) → X₁ i ⟶ X₁ j\ns₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0\nh₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0\nd₂ : (i j : ι) → X₁ i ⟶ X₁ j\ns₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0\nh₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0\nh_d :\n  ∀ (i j : ι),\n    ComplexShape.Rel c i j →\n      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =\n        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j\ni j : ι\nhij : ComplexShape.Rel c i j\n⊢ d₁ i j = d₂ i j\n[PROOFSTEP]\nsimpa only [comp_id, id_comp, eqToHom_refl] using h_d i j hij\n[GOAL]\ncase neg\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nX₁ : ι → V\nd₁ : (i j : ι) → X₁ i ⟶ X₁ j\ns₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0\nh₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0\nd₂ : (i j : ι) → X₁ i ⟶ X₁ j\ns₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0\nh₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0\nh_d :\n  ∀ (i j : ι),\n    ComplexShape.Rel c i j →\n      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =\n        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j\ni j : ι\nhij : ¬ComplexShape.Rel c i j\n⊢ d₁ i j = d₂ i j\n[PROOFSTEP]\nrw [s₁ i j hij, s₂ i j hij]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np q : ι\nh : p = q\n⊢ X K p = X K q\n[PROOFSTEP]\nrw [h]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₁ p₂ p₃ : ι\nh₁₂ : p₁ = p₂\nh₂₃ : p₂ = p₃\n⊢ (XIsoOfEq K h₁₂).hom ≫ (XIsoOfEq K h₂₃).hom = (XIsoOfEq K (_ : p₁ = p₃)).hom\n[PROOFSTEP]\ndsimp [XIsoOfEq]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₁ p₂ p₃ : ι\nh₁₂ : p₁ = p₂\nh₂₃ : p₂ = p₃\n⊢ eqToHom (_ : X K p₁ = X K p₂) ≫ eqToHom (_ : X K p₂ = X K p₃) = eqToHom (_ : X K p₁ = X K p₃)\n[PROOFSTEP]\nsimp only [eqToHom_trans]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₁ p₂ p₃ : ι\nh₁₂ : p₁ = p₂\nh₃₂ : p₃ = p₂\n⊢ (XIsoOfEq K h₁₂).hom ≫ (XIsoOfEq K h₃₂).inv = (XIsoOfEq K (_ : p₁ = p₃)).hom\n[PROOFSTEP]\ndsimp [XIsoOfEq]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₁ p₂ p₃ : ι\nh₁₂ : p₁ = p₂\nh₃₂ : p₃ = p₂\n⊢ eqToHom (_ : X K p₁ = X K p₂) ≫ eqToHom (_ : X K p₂ = X K p₃) = eqToHom (_ : X K p₁ = X K p₃)\n[PROOFSTEP]\nsimp only [eqToHom_trans]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₁ p₂ p₃ : ι\nh₂₁ : p₂ = p₁\nh₂₃ : p₂ = p₃\n⊢ (XIsoOfEq K h₂₁).inv ≫ (XIsoOfEq K h₂₃).hom = (XIsoOfEq K (_ : p₁ = p₃)).hom\n[PROOFSTEP]\ndsimp [XIsoOfEq]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₁ p₂ p₃ : ι\nh₂₁ : p₂ = p₁\nh₂₃ : p₂ = p₃\n⊢ eqToHom (_ : X K p₁ = X K p₂) ≫ eqToHom (_ : X K p₂ = X K p₃) = eqToHom (_ : X K p₁ = X K p₃)\n[PROOFSTEP]\nsimp only [eqToHom_trans]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₁ p₂ p₃ : ι\nh₂₁ : p₂ = p₁\nh₃₂ : p₃ = p₂\n⊢ (XIsoOfEq K h₂₁).inv ≫ (XIsoOfEq K h₃₂).inv = (XIsoOfEq K (_ : p₁ = p₃)).hom\n[PROOFSTEP]\ndsimp [XIsoOfEq]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₁ p₂ p₃ : ι\nh₂₁ : p₂ = p₁\nh₃₂ : p₃ = p₂\n⊢ eqToHom (_ : X K p₁ = X K p₂) ≫ eqToHom (_ : X K p₂ = X K p₃) = eqToHom (_ : X K p₁ = X K p₃)\n[PROOFSTEP]\nsimp only [eqToHom_trans]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₁ p₂ : ι\nh : p₁ = p₂\np₃ : ι\n⊢ (XIsoOfEq K h).hom ≫ d K p₂ p₃ = d K p₁ p₃\n[PROOFSTEP]\nsubst h\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₁ p₃ : ι\n⊢ (XIsoOfEq K (_ : p₁ = p₁)).hom ≫ d K p₁ p₃ = d K p₁ p₃\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₂ p₁ : ι\nh : p₂ = p₁\np₃ : ι\n⊢ (XIsoOfEq K h).inv ≫ d K p₂ p₃ = d K p₁ p₃\n[PROOFSTEP]\nsubst h\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₂ p₃ : ι\n⊢ (XIsoOfEq K (_ : p₂ = p₂)).inv ≫ d K p₂ p₃ = d K p₂ p₃\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₂ p₃ : ι\nh : p₂ = p₃\np₁ : ι\n⊢ d K p₁ p₂ ≫ (XIsoOfEq K h).hom = d K p₁ p₃\n[PROOFSTEP]\nsubst h\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₂ p₁ : ι\n⊢ d K p₁ p₂ ≫ (XIsoOfEq K (_ : p₂ = p₂)).hom = d K p₁ p₂\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₂ p₃ : ι\nh : p₃ = p₂\np₁ : ι\n⊢ d K p₁ p₂ ≫ (XIsoOfEq K h).inv = d K p₁ p₃\n[PROOFSTEP]\nsubst h\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nK : HomologicalComplex V c\np₃ p₁ : ι\n⊢ d K p₁ p₃ ≫ (XIsoOfEq K (_ : p₃ = p₃)).inv = d K p₁ p₃\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\n⊢ ComplexShape.next (ComplexShape.down ℕ) 0 = 0\n[PROOFSTEP]\nclassical\nrefine' dif_neg _\npush_neg\nintro\napply Nat.noConfusion\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\n⊢ ComplexShape.next (ComplexShape.down ℕ) 0 = 0\n[PROOFSTEP]\nrefine' dif_neg _\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\n⊢ ¬∃ j, ComplexShape.Rel (ComplexShape.down ℕ) 0 j\n[PROOFSTEP]\npush_neg\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\n⊢ ∀ (j : ℕ), ¬ComplexShape.Rel (ComplexShape.down ℕ) 0 j\n[PROOFSTEP]\nintro\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nj✝ : ℕ\n⊢ ¬ComplexShape.Rel (ComplexShape.down ℕ) 0 j✝\n[PROOFSTEP]\napply Nat.noConfusion\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\n⊢ ComplexShape.prev (ComplexShape.up ℕ) 0 = 0\n[PROOFSTEP]\nclassical\nrefine' dif_neg _\npush_neg\nintro\napply Nat.noConfusion\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\n⊢ ComplexShape.prev (ComplexShape.up ℕ) 0 = 0\n[PROOFSTEP]\nrefine' dif_neg _\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\n⊢ ¬∃ i, ComplexShape.Rel (ComplexShape.up ℕ) i 0\n[PROOFSTEP]\npush_neg\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\n⊢ ∀ (i : ℕ), ¬ComplexShape.Rel (ComplexShape.up ℕ) i 0\n[PROOFSTEP]\nintro\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\ni✝ : ℕ\n⊢ ¬ComplexShape.Rel (ComplexShape.up ℕ) i✝ 0\n[PROOFSTEP]\napply Nat.noConfusion\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC A B : HomologicalComplex V c\nf : Hom A B\ni j : ι\n⊢ HomologicalComplex.Hom.f f i ≫ d B i j = d A i j ≫ HomologicalComplex.Hom.f f j\n[PROOFSTEP]\nby_cases hij : c.Rel i j\n[GOAL]\ncase pos\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC A B : HomologicalComplex V c\nf : Hom A B\ni j : ι\nhij : ComplexShape.Rel c i j\n⊢ HomologicalComplex.Hom.f f i ≫ d B i j = d A i j ≫ HomologicalComplex.Hom.f f j\n[PROOFSTEP]\nexact f.comm' i j hij\n[GOAL]\ncase neg\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC A B : HomologicalComplex V c\nf : Hom A B\ni j : ι\nhij : ¬ComplexShape.Rel c i j\n⊢ HomologicalComplex.Hom.f f i ≫ d B i j = d A i j ≫ HomologicalComplex.Hom.f f j\n[PROOFSTEP]\nrw [A.shape i j hij, B.shape i j hij, comp_zero, zero_comp]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC✝ C D : HomologicalComplex V c\nf g : C ⟶ D\nh : ∀ (i : ι), Hom.f f i = Hom.f g i\n⊢ f = g\n[PROOFSTEP]\napply Hom.ext\n[GOAL]\ncase f\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC✝ C D : HomologicalComplex V c\nf g : C ⟶ D\nh : ∀ (i : ι), Hom.f f i = Hom.f g i\n⊢ f.f = g.f\n[PROOFSTEP]\nfunext\n[GOAL]\ncase f.h\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC✝ C D : HomologicalComplex V c\nf g : C ⟶ D\nh : ∀ (i : ι), Hom.f f i = Hom.f g i\nx✝ : ι\n⊢ Hom.f f x✝ = Hom.f g x✝\n[PROOFSTEP]\napply h\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ : HomologicalComplex V c\nh : C₁ = C₂\nn : ι\n⊢ Hom.f (eqToHom h) n = eqToHom (_ : X C₁ n = X C₂ n)\n[PROOFSTEP]\nsubst h\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ : HomologicalComplex V c\nn : ι\n⊢ Hom.f (eqToHom (_ : C₁ = C₁)) n = eqToHom (_ : X C₁ n = X C₁ n)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ : HomologicalComplex V c\n⊢ Function.Injective fun f => f.f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasZeroObject V\n⊢ IsZero zero\n[PROOFSTEP]\nrefine' ⟨fun X => ⟨⟨⟨0⟩, fun f => _⟩⟩, fun X => ⟨⟨⟨0⟩, fun f => _⟩⟩⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasZeroObject V\nX : HomologicalComplex V c\nf : zero ⟶ X\n⊢ f = default\ncase refine'_2\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasZeroObject V\nX : HomologicalComplex V c\nf : X ⟶ zero\n⊢ f = default\n[PROOFSTEP]\nall_goals\n  ext\n  dsimp [zero]\n  apply Subsingleton.elim\n[GOAL]\ncase refine'_1\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasZeroObject V\nX : HomologicalComplex V c\nf : zero ⟶ X\n⊢ f = default\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_1.h\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasZeroObject V\nX : HomologicalComplex V c\nf : zero ⟶ X\ni✝ : ι\n⊢ Hom.f f i✝ = Hom.f default i✝\n[PROOFSTEP]\ndsimp [zero]\n[GOAL]\ncase refine'_1.h\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasZeroObject V\nX : HomologicalComplex V c\nf : zero ⟶ X\ni✝ : ι\n⊢ Hom.f f i✝ = 0\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\ncase refine'_2\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasZeroObject V\nX : HomologicalComplex V c\nf : X ⟶ zero\n⊢ f = default\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_2.h\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasZeroObject V\nX : HomologicalComplex V c\nf : X ⟶ zero\ni✝ : ι\n⊢ Hom.f f i✝ = Hom.f default i✝\n[PROOFSTEP]\ndsimp [zero]\n[GOAL]\ncase refine'_2.h\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasZeroObject V\nX : HomologicalComplex V c\nf : X ⟶ zero\ni✝ : ι\n⊢ Hom.f f i✝ = 0\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j j' : ι\nrij : ComplexShape.Rel c i j\nrij' : ComplexShape.Rel c i j'\n⊢ d C i j' ≫ eqToHom (_ : X C j' = X C j) = d C i j\n[PROOFSTEP]\nobtain rfl := c.next_eq rij rij'\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j : ι\nrij rij' : ComplexShape.Rel c i j\n⊢ d C i j ≫ eqToHom (_ : X C j = X C j) = d C i j\n[PROOFSTEP]\nsimp only [eqToHom_refl, comp_id]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni i' j : ι\nrij : ComplexShape.Rel c i j\nrij' : ComplexShape.Rel c i' j\n⊢ eqToHom (_ : X C i = X C i') ≫ d C i' j = d C i j\n[PROOFSTEP]\nobtain rfl := c.prev_eq rij rij'\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j : ι\nrij rij' : ComplexShape.Rel c i j\n⊢ eqToHom (_ : X C i = X C i) ≫ d C i j = d C i j\n[PROOFSTEP]\nsimp only [eqToHom_refl, id_comp]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasKernels V\ni j j' : ι\nr : ComplexShape.Rel c i j\nr' : ComplexShape.Rel c i j'\n⊢ kernelSubobject (d C i j) = kernelSubobject (d C i j')\n[PROOFSTEP]\nrw [← d_comp_eqToHom C r r']\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasKernels V\ni j j' : ι\nr : ComplexShape.Rel c i j\nr' : ComplexShape.Rel c i j'\n⊢ kernelSubobject (d C i j' ≫ eqToHom (_ : X C j' = X C j)) = kernelSubobject (d C i j')\n[PROOFSTEP]\napply kernelSubobject_comp_mono\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝¹ : HasImages V\ninst✝ : HasEqualizers V\ni i' j : ι\nr : ComplexShape.Rel c i j\nr' : ComplexShape.Rel c i' j\n⊢ imageSubobject (d C i j) = imageSubobject (d C i' j)\n[PROOFSTEP]\nrw [← eqToHom_comp_d C r r']\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝¹ : HasImages V\ninst✝ : HasEqualizers V\ni i' j : ι\nr : ComplexShape.Rel c i j\nr' : ComplexShape.Rel c i' j\n⊢ imageSubobject (eqToHom (_ : X C i = X C i') ≫ d C i' j) = imageSubobject (d C i' j)\n[PROOFSTEP]\napply imageSubobject_iso_comp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j : ι\nr : ComplexShape.Rel c i j\n⊢ xPrev C j = X C i\n[PROOFSTEP]\nrw [← c.prev_eq' r]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\nj : ι\nh : ¬ComplexShape.Rel c (ComplexShape.prev c j) j\n⊢ ComplexShape.prev c j = j\n[PROOFSTEP]\ndsimp [ComplexShape.prev]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\nj : ι\nh : ¬ComplexShape.Rel c (ComplexShape.prev c j) j\n⊢ (if h : ∃ i, ComplexShape.Rel c i j then Exists.choose h else j) = j\n[PROOFSTEP]\nrw [dif_neg]\n[GOAL]\ncase hnc\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\nj : ι\nh : ¬ComplexShape.Rel c (ComplexShape.prev c j) j\n⊢ ¬∃ i, ComplexShape.Rel c i j\n[PROOFSTEP]\npush_neg\n[GOAL]\ncase hnc\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\nj : ι\nh : ¬ComplexShape.Rel c (ComplexShape.prev c j) j\n⊢ ∀ (i : ι), ¬ComplexShape.Rel c i j\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase hnc\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\nj : ι\nh : ¬ComplexShape.Rel c (ComplexShape.prev c j) j\ni : ι\nhi : ComplexShape.Rel c i j\n⊢ False\n[PROOFSTEP]\nhave : c.prev j = i := c.prev_eq' hi\n[GOAL]\ncase hnc\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\nj : ι\nh : ¬ComplexShape.Rel c (ComplexShape.prev c j) j\ni : ι\nhi : ComplexShape.Rel c i j\nthis : ComplexShape.prev c j = i\n⊢ False\n[PROOFSTEP]\nrw [this] at h \n[GOAL]\ncase hnc\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\nj i : ι\nh : ¬ComplexShape.Rel c i j\nhi : ComplexShape.Rel c i j\nthis : ComplexShape.prev c j = i\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j : ι\nr : ComplexShape.Rel c i j\n⊢ xNext C i = X C j\n[PROOFSTEP]\nrw [← c.next_eq' r]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni : ι\nh : ¬ComplexShape.Rel c i (ComplexShape.next c i)\n⊢ ComplexShape.next c i = i\n[PROOFSTEP]\ndsimp [ComplexShape.next]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni : ι\nh : ¬ComplexShape.Rel c i (ComplexShape.next c i)\n⊢ (if h : ∃ j, ComplexShape.Rel c i j then Exists.choose h else i) = i\n[PROOFSTEP]\nrw [dif_neg]\n[GOAL]\ncase hnc\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni : ι\nh : ¬ComplexShape.Rel c i (ComplexShape.next c i)\n⊢ ¬∃ j, ComplexShape.Rel c i j\n[PROOFSTEP]\nrintro ⟨j, hj⟩\n[GOAL]\ncase hnc.intro\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni : ι\nh : ¬ComplexShape.Rel c i (ComplexShape.next c i)\nj : ι\nhj : ComplexShape.Rel c i j\n⊢ False\n[PROOFSTEP]\nhave : c.next i = j := c.next_eq' hj\n[GOAL]\ncase hnc.intro\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni : ι\nh : ¬ComplexShape.Rel c i (ComplexShape.next c i)\nj : ι\nhj : ComplexShape.Rel c i j\nthis : ComplexShape.next c i = j\n⊢ False\n[PROOFSTEP]\nrw [this] at h \n[GOAL]\ncase hnc.intro\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j : ι\nh : ¬ComplexShape.Rel c i j\nhj : ComplexShape.Rel c i j\nthis : ComplexShape.next c i = j\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j : ι\nr : ComplexShape.Rel c i j\n⊢ dTo C j = (xPrevIso C r).hom ≫ d C i j\n[PROOFSTEP]\nobtain rfl := c.prev_eq' r\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\nj : ι\nr : ComplexShape.Rel c (ComplexShape.prev c j) j\n⊢ dTo C j = (xPrevIso C r).hom ≫ d C (ComplexShape.prev c j) j\n[PROOFSTEP]\nexact (Category.id_comp _).symm\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j : ι\nr : ComplexShape.Rel c i j\n⊢ dFrom C i = d C i j ≫ (xNextIso C r).inv\n[PROOFSTEP]\nobtain rfl := c.next_eq' r\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni : ι\nr : ComplexShape.Rel c i (ComplexShape.next c i)\n⊢ dFrom C i = d C i (ComplexShape.next c i) ≫ (xNextIso C r).inv\n[PROOFSTEP]\nexact (Category.comp_id _).symm\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j : ι\nr : ComplexShape.Rel c i j\n⊢ (xPrevIso C r).inv ≫ dTo C j = d C i j\n[PROOFSTEP]\nsimp [C.dTo_eq r]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\nj : ι\nh : ¬ComplexShape.Rel c (ComplexShape.prev c j) j\n⊢ (xPrevIsoSelf C h).inv ≫ dTo C j = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni j : ι\nr : ComplexShape.Rel c i j\n⊢ dFrom C i ≫ (xNextIso C r).hom = d C i j\n[PROOFSTEP]\nsimp [C.dFrom_eq r]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ni : ι\nh : ¬ComplexShape.Rel c i (ComplexShape.next c i)\n⊢ dFrom C i ≫ (xNextIsoSelf C h).hom = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasKernels V\ni j : ι\nr : ComplexShape.Rel c i j\n⊢ kernelSubobject (dFrom C i) = kernelSubobject (d C i j)\n[PROOFSTEP]\nrw [C.dFrom_eq r]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝² : Category.{v, u} V\ninst✝¹ : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝ : HasKernels V\ni j : ι\nr : ComplexShape.Rel c i j\n⊢ kernelSubobject (d C i j ≫ (xNextIso C r).inv) = kernelSubobject (d C i j)\n[PROOFSTEP]\napply kernelSubobject_comp_mono\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝¹ : HasImages V\ninst✝ : HasEqualizers V\ni j : ι\nr : ComplexShape.Rel c i j\n⊢ imageSubobject (dTo C j) = imageSubobject (d C i j)\n[PROOFSTEP]\nrw [C.dTo_eq r]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝³ : Category.{v, u} V\ninst✝² : HasZeroMorphisms V\nc : ComplexShape ι\nC : HomologicalComplex V c\ninst✝¹ : HasImages V\ninst✝ : HasEqualizers V\ni j : ι\nr : ComplexShape.Rel c i j\n⊢ imageSubobject ((xPrevIso C r).hom ≫ d C i j) = imageSubobject (d C i j)\n[PROOFSTEP]\napply imageSubobject_iso_comp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : (i : ι) → X C₁ i ≅ X C₂ i\nhf : autoParam (∀ (i j : ι), ComplexShape.Rel c i j → (f i).hom ≫ d C₂ i j = d C₁ i j ≫ (f j).hom) _auto✝\ni j : ι\nhij : ComplexShape.Rel c i j\n⊢ (f i).inv ≫ d C₁ i j = (f i).inv ≫ (d C₁ i j ≫ (f j).hom) ≫ (f j).inv\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : (i : ι) → X C₁ i ≅ X C₂ i\nhf : autoParam (∀ (i j : ι), ComplexShape.Rel c i j → (f i).hom ≫ d C₂ i j = d C₁ i j ≫ (f j).hom) _auto✝\ni j : ι\nhij : ComplexShape.Rel c i j\n⊢ (f i).inv ≫ (d C₁ i j ≫ (f j).hom) ≫ (f j).inv = (f i).inv ≫ ((f i).hom ≫ d C₂ i j) ≫ (f j).inv\n[PROOFSTEP]\nrw [hf i j hij]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : (i : ι) → X C₁ i ≅ X C₂ i\nhf : autoParam (∀ (i j : ι), ComplexShape.Rel c i j → (f i).hom ≫ d C₂ i j = d C₁ i j ≫ (f j).hom) _auto✝\ni j : ι\nhij : ComplexShape.Rel c i j\n⊢ (f i).inv ≫ ((f i).hom ≫ d C₂ i j) ≫ (f j).inv = d C₂ i j ≫ (f j).inv\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : (i : ι) → X C₁ i ≅ X C₂ i\nhf : autoParam (∀ (i j : ι), ComplexShape.Rel c i j → (f i).hom ≫ d C₂ i j = d C₁ i j ≫ (f j).hom) _auto✝\n⊢ ((mk fun i => (f i).hom) ≫ mk fun i => (f i).inv) = 𝟙 C₁\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : (i : ι) → X C₁ i ≅ X C₂ i\nhf : autoParam (∀ (i j : ι), ComplexShape.Rel c i j → (f i).hom ≫ d C₂ i j = d C₁ i j ≫ (f j).hom) _auto✝\ni : ι\n⊢ HomologicalComplex.Hom.f ((mk fun i => (f i).hom) ≫ mk fun i => (f i).inv) i = HomologicalComplex.Hom.f (𝟙 C₁) i\n[PROOFSTEP]\nexact (f i).hom_inv_id\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : (i : ι) → X C₁ i ≅ X C₂ i\nhf : autoParam (∀ (i j : ι), ComplexShape.Rel c i j → (f i).hom ≫ d C₂ i j = d C₁ i j ≫ (f j).hom) _auto✝\n⊢ ((mk fun i => (f i).inv) ≫ mk fun i => (f i).hom) = 𝟙 C₂\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : (i : ι) → X C₁ i ≅ X C₂ i\nhf : autoParam (∀ (i j : ι), ComplexShape.Rel c i j → (f i).hom ≫ d C₂ i j = d C₁ i j ≫ (f j).hom) _auto✝\ni : ι\n⊢ HomologicalComplex.Hom.f ((mk fun i => (f i).inv) ≫ mk fun i => (f i).hom) i = HomologicalComplex.Hom.f (𝟙 C₂) i\n[PROOFSTEP]\nexact (f i).inv_hom_id\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : (i : ι) → X C₁ i ≅ X C₂ i\nhf : ∀ (i j : ι), ComplexShape.Rel c i j → (f i).hom ≫ d C₂ i j = d C₁ i j ≫ (f j).hom\ni : ι\n⊢ isoApp (isoOfComponents f) i = f i\n[PROOFSTEP]\next\n[GOAL]\ncase w\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : (i : ι) → X C₁ i ≅ X C₂ i\nhf : ∀ (i j : ι), ComplexShape.Rel c i j → (f i).hom ≫ d C₂ i j = d C₁ i j ≫ (f j).hom\ni : ι\n⊢ (isoApp (isoOfComponents f) i).hom = (f i).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : Hom C₁ C₂\ni j : ι\nw : ComplexShape.Rel c i j\n⊢ prev f j = (xPrevIso C₁ w).hom ≫ HomologicalComplex.Hom.f f i ≫ (xPrevIso C₂ w).inv\n[PROOFSTEP]\nobtain rfl := c.prev_eq' w\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : Hom C₁ C₂\nj : ι\nw : ComplexShape.Rel c (ComplexShape.prev c j) j\n⊢ prev f j = (xPrevIso C₁ w).hom ≫ HomologicalComplex.Hom.f f (ComplexShape.prev c j) ≫ (xPrevIso C₂ w).inv\n[PROOFSTEP]\nsimp only [xPrevIso, eqToIso_refl, Iso.refl_hom, Iso.refl_inv, comp_id, id_comp]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : Hom C₁ C₂\ni j : ι\nw : ComplexShape.Rel c i j\n⊢ next f i = (xNextIso C₁ w).hom ≫ HomologicalComplex.Hom.f f j ≫ (xNextIso C₂ w).inv\n[PROOFSTEP]\nobtain rfl := c.next_eq' w\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nc : ComplexShape ι\nC C₁ C₂ C₃ : HomologicalComplex V c\nf : Hom C₁ C₂\ni : ι\nw : ComplexShape.Rel c i (ComplexShape.next c i)\n⊢ next f i = (xNextIso C₁ w).hom ≫ HomologicalComplex.Hom.f f (ComplexShape.next c i) ≫ (xNextIso C₂ w).inv\n[PROOFSTEP]\nsimp only [xNextIso, eqToIso_refl, Iso.refl_hom, Iso.refl_inv, comp_id, id_comp]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X (n + 1) ⟶ X n\nsq : ∀ (n : α), d (n + 1) ≫ d n = 0\ni j : α\nh : i = j + 1\n⊢ X i = X (j + 1)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X (n + 1) ⟶ X n\nsq : ∀ (n : α), d (n + 1) ≫ d n = 0\ni j : α\nw : ¬ComplexShape.Rel (ComplexShape.down α) i j\n⊢ (fun i j => if h : i = j + 1 then eqToHom (_ : X i = X (j + 1)) ≫ d j else 0) i j = 0\n[PROOFSTEP]\ndsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X (n + 1) ⟶ X n\nsq : ∀ (n : α), d (n + 1) ≫ d n = 0\ni j : α\nw : ¬ComplexShape.Rel (ComplexShape.down α) i j\n⊢ (if h : i = j + 1 then eqToHom (_ : X i = X (j + 1)) ≫ d j else 0) = 0\n[PROOFSTEP]\nrw [dif_neg (Ne.symm w)]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X (n + 1) ⟶ X n\nsq : ∀ (n : α), d (n + 1) ≫ d n = 0\ni j k : α\nhij : ComplexShape.Rel (ComplexShape.down α) i j\nhjk : ComplexShape.Rel (ComplexShape.down α) j k\n⊢ (fun i j => if h : i = j + 1 then eqToHom (_ : X i = X (j + 1)) ≫ d j else 0) i j ≫\n      (fun i j => if h : i = j + 1 then eqToHom (_ : X i = X (j + 1)) ≫ d j else 0) j k =\n    0\n[PROOFSTEP]\ndsimp at hij hjk \n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X (n + 1) ⟶ X n\nsq : ∀ (n : α), d (n + 1) ≫ d n = 0\ni j k : α\nhij : j + 1 = i\nhjk : k + 1 = j\n⊢ (fun i j => if h : i = j + 1 then eqToHom (_ : X i = X (j + 1)) ≫ d j else 0) i j ≫\n      (fun i j => if h : i = j + 1 then eqToHom (_ : X i = X (j + 1)) ≫ d j else 0) j k =\n    0\n[PROOFSTEP]\nsubsts hij hjk\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X (n + 1) ⟶ X n\nsq : ∀ (n : α), d (n + 1) ≫ d n = 0\nk : α\n⊢ (fun i j => if h : i = j + 1 then eqToHom (_ : X i = X (j + 1)) ≫ d j else 0) (k + 1 + 1) (k + 1) ≫\n      (fun i j => if h : i = j + 1 then eqToHom (_ : X i = X (j + 1)) ≫ d j else 0) (k + 1) k =\n    0\n[PROOFSTEP]\nsimp only [eqToHom_refl, id_comp, dite_eq_ite, ite_true, sq]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X (n + 1) ⟶ X n\nsq : ∀ (n : α), d (n + 1) ≫ d n = 0\nj : α\n⊢ HomologicalComplex.d (of X d sq) (j + 1) j = d j\n[PROOFSTEP]\ndsimp [of]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X (n + 1) ⟶ X n\nsq : ∀ (n : α), d (n + 1) ≫ d n = 0\nj : α\n⊢ (if j + 1 = j + 1 then 𝟙 (X (j + 1)) ≫ d j else 0) = d j\n[PROOFSTEP]\nrw [if_pos rfl, Category.id_comp]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X (n + 1) ⟶ X n\nsq : ∀ (n : α), d (n + 1) ≫ d n = 0\ni j : α\nh : i ≠ j + 1\n⊢ HomologicalComplex.d (of X d sq) i j = 0\n[PROOFSTEP]\ndsimp [of]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X (n + 1) ⟶ X n\nsq : ∀ (n : α), d (n + 1) ≫ d n = 0\ni j : α\nh : i ≠ j + 1\n⊢ (if h : i = j + 1 then eqToHom (_ : X i = X (j + 1)) ≫ d j else 0) = 0\n[PROOFSTEP]\nrw [dif_neg h]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd_X : (n : α) → X (n + 1) ⟶ X n\nsq_X : ∀ (n : α), d_X (n + 1) ≫ d_X n = 0\nY : α → V\nd_Y : (n : α) → Y (n + 1) ⟶ Y n\nsq_Y : ∀ (n : α), d_Y (n + 1) ≫ d_Y n = 0\nf : (i : α) → X i ⟶ Y i\ncomm : ∀ (i : α), f (i + 1) ≫ d_Y i = d_X i ≫ f i\nn m : α\n⊢ ComplexShape.Rel (ComplexShape.down α) n m →\n    f n ≫ HomologicalComplex.d (of Y d_Y sq_Y) n m = HomologicalComplex.d (of X d_X sq_X) n m ≫ f m\n[PROOFSTEP]\nby_cases h : n = m + 1\n[GOAL]\ncase pos\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd_X : (n : α) → X (n + 1) ⟶ X n\nsq_X : ∀ (n : α), d_X (n + 1) ≫ d_X n = 0\nY : α → V\nd_Y : (n : α) → Y (n + 1) ⟶ Y n\nsq_Y : ∀ (n : α), d_Y (n + 1) ≫ d_Y n = 0\nf : (i : α) → X i ⟶ Y i\ncomm : ∀ (i : α), f (i + 1) ≫ d_Y i = d_X i ≫ f i\nn m : α\nh : n = m + 1\n⊢ ComplexShape.Rel (ComplexShape.down α) n m →\n    f n ≫ HomologicalComplex.d (of Y d_Y sq_Y) n m = HomologicalComplex.d (of X d_X sq_X) n m ≫ f m\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd_X : (n : α) → X (n + 1) ⟶ X n\nsq_X : ∀ (n : α), d_X (n + 1) ≫ d_X n = 0\nY : α → V\nd_Y : (n : α) → Y (n + 1) ⟶ Y n\nsq_Y : ∀ (n : α), d_Y (n + 1) ≫ d_Y n = 0\nf : (i : α) → X i ⟶ Y i\ncomm : ∀ (i : α), f (i + 1) ≫ d_Y i = d_X i ≫ f i\nm : α\n⊢ ComplexShape.Rel (ComplexShape.down α) (m + 1) m →\n    f (m + 1) ≫ HomologicalComplex.d (of Y d_Y sq_Y) (m + 1) m = HomologicalComplex.d (of X d_X sq_X) (m + 1) m ≫ f m\n[PROOFSTEP]\nsimpa using comm m\n[GOAL]\ncase neg\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd_X : (n : α) → X (n + 1) ⟶ X n\nsq_X : ∀ (n : α), d_X (n + 1) ≫ d_X n = 0\nY : α → V\nd_Y : (n : α) → Y (n + 1) ⟶ Y n\nsq_Y : ∀ (n : α), d_Y (n + 1) ≫ d_Y n = 0\nf : (i : α) → X i ⟶ Y i\ncomm : ∀ (i : α), f (i + 1) ≫ d_Y i = d_X i ≫ f i\nn m : α\nh : ¬n = m + 1\n⊢ ComplexShape.Rel (ComplexShape.down α) n m →\n    f n ≫ HomologicalComplex.d (of Y d_Y sq_Y) n m = HomologicalComplex.d (of X d_X sq_X) n m ≫ f m\n[PROOFSTEP]\nrw [of_d_ne X _ _ h, of_d_ne Y _ _ h]\n[GOAL]\ncase neg\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd_X : (n : α) → X (n + 1) ⟶ X n\nsq_X : ∀ (n : α), d_X (n + 1) ≫ d_X n = 0\nY : α → V\nd_Y : (n : α) → Y (n + 1) ⟶ Y n\nsq_Y : ∀ (n : α), d_Y (n + 1) ≫ d_Y n = 0\nf : (i : α) → X i ⟶ Y i\ncomm : ∀ (i : α), f (i + 1) ≫ d_Y i = d_X i ≫ f i\nn m : α\nh : ¬n = m + 1\n⊢ ComplexShape.Rel (ComplexShape.down α) n m → f n ≫ 0 = 0 ≫ f m\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nX₀ X₁ X₂ : V\nd₀ : X₁ ⟶ X₀\nd₁ : X₂ ⟶ X₁\ns : d₁ ≫ d₀ = 0\nsucc :\n  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ ⟶ X₀) ×' (d₁ : X₂ ⟶ X₁) ×' d₁ ≫ d₀ = 0) →\n    (X₃ : V) ×' (d₂ : X₃ ⟶ t.snd.snd.fst) ×' d₂ ≫ t.snd.snd.snd.snd.fst = 0\n⊢ HomologicalComplex.d (mk X₀ X₁ X₂ d₀ d₁ s succ) 1 0 = d₀\n[PROOFSTEP]\nchange ite (1 = 0 + 1) (𝟙 X₁ ≫ d₀) 0 = d₀\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nX₀ X₁ X₂ : V\nd₀ : X₁ ⟶ X₀\nd₁ : X₂ ⟶ X₁\ns : d₁ ≫ d₀ = 0\nsucc :\n  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ ⟶ X₀) ×' (d₁ : X₂ ⟶ X₁) ×' d₁ ≫ d₀ = 0) →\n    (X₃ : V) ×' (d₂ : X₃ ⟶ t.snd.snd.fst) ×' d₂ ≫ t.snd.snd.snd.snd.fst = 0\n⊢ (if 1 = 0 + 1 then 𝟙 X₁ ≫ d₀ else 0) = d₀\n[PROOFSTEP]\nrw [if_pos rfl, Category.id_comp]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nX₀ X₁ X₂ : V\nd₀ : X₁ ⟶ X₀\nd₁ : X₂ ⟶ X₁\ns : d₁ ≫ d₀ = 0\nsucc :\n  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ ⟶ X₀) ×' (d₁ : X₂ ⟶ X₁) ×' d₁ ≫ d₀ = 0) →\n    (X₃ : V) ×' (d₂ : X₃ ⟶ t.snd.snd.fst) ×' d₂ ≫ t.snd.snd.snd.snd.fst = 0\n⊢ HomologicalComplex.d (mk X₀ X₁ X₂ d₀ d₁ s succ) 2 1 = d₁\n[PROOFSTEP]\nchange ite (2 = 1 + 1) (𝟙 X₂ ≫ d₁) 0 = d₁\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nX₀ X₁ X₂ : V\nd₀ : X₁ ⟶ X₀\nd₁ : X₂ ⟶ X₁\ns : d₁ ≫ d₀ = 0\nsucc :\n  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ ⟶ X₀) ×' (d₁ : X₂ ⟶ X₁) ×' d₁ ≫ d₀ = 0) →\n    (X₃ : V) ×' (d₂ : X₃ ⟶ t.snd.snd.fst) ×' d₂ ≫ t.snd.snd.snd.snd.fst = 0\n⊢ (if 2 = 1 + 1 then 𝟙 X₂ ≫ d₁ else 0) = d₁\n[PROOFSTEP]\nrw [if_pos rfl, Category.id_comp]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nX₀ X₁ X₂ : V\nd₀ : X₁ ⟶ X₀\nd₁ : X₂ ⟶ X₁\ns : d₁ ≫ d₀ = 0\nsucc :\n  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ ⟶ X₀) ×' (d₁ : X₂ ⟶ X₁) ×' d₁ ≫ d₀ = 0) →\n    (X₃ : V) ×' (d₂ : X₃ ⟶ t.snd.snd.fst) ×' d₂ ≫ t.snd.snd.snd.snd.fst = 0\nsucc' : (t : (X₀ : V) × (X₁ : V) × (X₁ ⟶ X₀)) → (X₂ : V) ×' (d : X₂ ⟶ t.snd.fst) ×' d ≫ t.snd.snd = 0\n⊢ HomologicalComplex.d (mk' X₀ X₁ d₀ succ') 1 0 = d₀\n[PROOFSTEP]\nchange ite (1 = 0 + 1) (𝟙 X₁ ≫ d₀) 0 = d₀\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nX₀ X₁ X₂ : V\nd₀ : X₁ ⟶ X₀\nd₁ : X₂ ⟶ X₁\ns : d₁ ≫ d₀ = 0\nsucc :\n  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ ⟶ X₀) ×' (d₁ : X₂ ⟶ X₁) ×' d₁ ≫ d₀ = 0) →\n    (X₃ : V) ×' (d₂ : X₃ ⟶ t.snd.snd.fst) ×' d₂ ≫ t.snd.snd.snd.snd.fst = 0\nsucc' : (t : (X₀ : V) × (X₁ : V) × (X₁ ⟶ X₀)) → (X₂ : V) ×' (d : X₂ ⟶ t.snd.fst) ×' d ≫ t.snd.snd = 0\n⊢ (if 1 = 0 + 1 then 𝟙 X₁ ≫ d₀ else 0) = d₀\n[PROOFSTEP]\nrw [if_pos rfl, Category.id_comp]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nP Q : ChainComplex V ℕ\nzero : HomologicalComplex.X P 0 ⟶ HomologicalComplex.X Q 0\none : HomologicalComplex.X P 1 ⟶ HomologicalComplex.X Q 1\none_zero_comm : one ≫ HomologicalComplex.d Q 1 0 = HomologicalComplex.d P 1 0 ≫ zero\nsucc :\n  (n : ℕ) →\n    (p :\n        (f : HomologicalComplex.X P n ⟶ HomologicalComplex.X Q n) ×'\n          (f' : HomologicalComplex.X P (n + 1) ⟶ HomologicalComplex.X Q (n + 1)) ×'\n            f' ≫ HomologicalComplex.d Q (n + 1) n = HomologicalComplex.d P (n + 1) n ≫ f) →\n      (f'' : HomologicalComplex.X P (n + 2) ⟶ HomologicalComplex.X Q (n + 2)) ×'\n        f'' ≫ HomologicalComplex.d Q (n + 2) (n + 1) = HomologicalComplex.d P (n + 2) (n + 1) ≫ p.snd.fst\nn m : ℕ\n⊢ ComplexShape.Rel (ComplexShape.down ℕ) n m →\n    (fun n => (mkHomAux P Q zero one one_zero_comm succ n).fst) n ≫ HomologicalComplex.d Q n m =\n      HomologicalComplex.d P n m ≫ (fun n => (mkHomAux P Q zero one one_zero_comm succ n).fst) m\n[PROOFSTEP]\nrintro (rfl : m + 1 = n)\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nP Q : ChainComplex V ℕ\nzero : HomologicalComplex.X P 0 ⟶ HomologicalComplex.X Q 0\none : HomologicalComplex.X P 1 ⟶ HomologicalComplex.X Q 1\none_zero_comm : one ≫ HomologicalComplex.d Q 1 0 = HomologicalComplex.d P 1 0 ≫ zero\nsucc :\n  (n : ℕ) →\n    (p :\n        (f : HomologicalComplex.X P n ⟶ HomologicalComplex.X Q n) ×'\n          (f' : HomologicalComplex.X P (n + 1) ⟶ HomologicalComplex.X Q (n + 1)) ×'\n            f' ≫ HomologicalComplex.d Q (n + 1) n = HomologicalComplex.d P (n + 1) n ≫ f) →\n      (f'' : HomologicalComplex.X P (n + 2) ⟶ HomologicalComplex.X Q (n + 2)) ×'\n        f'' ≫ HomologicalComplex.d Q (n + 2) (n + 1) = HomologicalComplex.d P (n + 2) (n + 1) ≫ p.snd.fst\nm : ℕ\n⊢ (fun n => (mkHomAux P Q zero one one_zero_comm succ n).fst) (m + 1) ≫ HomologicalComplex.d Q (m + 1) m =\n    HomologicalComplex.d P (m + 1) m ≫ (fun n => (mkHomAux P Q zero one one_zero_comm succ n).fst) m\n[PROOFSTEP]\nexact (mkHomAux P Q zero one one_zero_comm succ m).2.2\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nP Q : ChainComplex V ℕ\nzero : HomologicalComplex.X P 0 ⟶ HomologicalComplex.X Q 0\none : HomologicalComplex.X P 1 ⟶ HomologicalComplex.X Q 1\none_zero_comm : one ≫ HomologicalComplex.d Q 1 0 = HomologicalComplex.d P 1 0 ≫ zero\nsucc :\n  (n : ℕ) →\n    (p :\n        (f : HomologicalComplex.X P n ⟶ HomologicalComplex.X Q n) ×'\n          (f' : HomologicalComplex.X P (n + 1) ⟶ HomologicalComplex.X Q (n + 1)) ×'\n            f' ≫ HomologicalComplex.d Q (n + 1) n = HomologicalComplex.d P (n + 1) n ≫ f) →\n      (f'' : HomologicalComplex.X P (n + 2) ⟶ HomologicalComplex.X Q (n + 2)) ×'\n        f'' ≫ HomologicalComplex.d Q (n + 2) (n + 1) = HomologicalComplex.d P (n + 2) (n + 1) ≫ p.snd.fst\nn : ℕ\n⊢ HomologicalComplex.Hom.f (mkHom P Q zero one one_zero_comm succ) (n + 2) =\n    (succ n\n        { fst := HomologicalComplex.Hom.f (mkHom P Q zero one one_zero_comm succ) n,\n          snd :=\n            { fst := HomologicalComplex.Hom.f (mkHom P Q zero one one_zero_comm succ) (n + 1),\n              snd :=\n                (_ :\n                  HomologicalComplex.Hom.f (mkHom P Q zero one one_zero_comm succ) (n + 1) ≫\n                      HomologicalComplex.d Q (n + 1) n =\n                    HomologicalComplex.d P (n + 1) n ≫\n                      HomologicalComplex.Hom.f (mkHom P Q zero one one_zero_comm succ) n) } }).fst\n[PROOFSTEP]\ndsimp [mkHom, mkHomAux]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j : α\nh : i + 1 = j\n⊢ X (i + 1) = X j\n[PROOFSTEP]\nrw [h]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j : α\nw : ¬ComplexShape.Rel (ComplexShape.up α) i j\n⊢ (fun i j => if h : i + 1 = j then d i ≫ eqToHom (_ : X (i + 1) = X j) else 0) i j = 0\n[PROOFSTEP]\ndsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j : α\nw : ¬ComplexShape.Rel (ComplexShape.up α) i j\n⊢ (if h : i + 1 = j then d i ≫ eqToHom (_ : X (i + 1) = X j) else 0) = 0\n[PROOFSTEP]\nrw [dif_neg]\n[GOAL]\ncase hnc\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j : α\nw : ¬ComplexShape.Rel (ComplexShape.up α) i j\n⊢ ¬i + 1 = j\n[PROOFSTEP]\nexact w\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j k : α\n⊢ ComplexShape.Rel (ComplexShape.up α) i j →\n    ComplexShape.Rel (ComplexShape.up α) j k →\n      (fun i j => if h : i + 1 = j then d i ≫ eqToHom (_ : X (i + 1) = X j) else 0) i j ≫\n          (fun i j => if h : i + 1 = j then d i ≫ eqToHom (_ : X (i + 1) = X j) else 0) j k =\n        0\n[PROOFSTEP]\ndsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j k : α\n⊢ i + 1 = j →\n    j + 1 = k →\n      ((if h : i + 1 = j then d i ≫ eqToHom (_ : X (i + 1) = X j) else 0) ≫\n          if h : j + 1 = k then d j ≫ eqToHom (_ : X (j + 1) = X k) else 0) =\n        0\n[PROOFSTEP]\nsplit_ifs with h h' h'\n[GOAL]\ncase pos\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j k : α\nh : i + 1 = j\nh' : j + 1 = k\n⊢ i + 1 = j → j + 1 = k → (d i ≫ eqToHom (_ : X (i + 1) = X j)) ≫ d j ≫ eqToHom (_ : X (j + 1) = X k) = 0\n[PROOFSTEP]\nsubsts h h'\n[GOAL]\ncase pos\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni : α\n⊢ i + 1 = i + 1 →\n    i + 1 + 1 = i + 1 + 1 →\n      (d i ≫ eqToHom (_ : X (i + 1) = X (i + 1))) ≫ d (i + 1) ≫ eqToHom (_ : X (i + 1 + 1) = X (i + 1 + 1)) = 0\n[PROOFSTEP]\nsimp [sq]\n[GOAL]\ncase neg\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j k : α\nh : i + 1 = j\nh' : ¬j + 1 = k\n⊢ i + 1 = j → j + 1 = k → (d i ≫ eqToHom (_ : X (i + 1) = X j)) ≫ 0 = 0\ncase pos\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j k : α\nh : ¬i + 1 = j\nh' : j + 1 = k\n⊢ i + 1 = j → j + 1 = k → 0 ≫ d j ≫ eqToHom (_ : X (j + 1) = X k) = 0\ncase neg\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j k : α\nh : ¬i + 1 = j\nh' : ¬j + 1 = k\n⊢ i + 1 = j → j + 1 = k → 0 ≫ 0 = 0\n[PROOFSTEP]\nall_goals simp\n[GOAL]\ncase neg\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j k : α\nh : i + 1 = j\nh' : ¬j + 1 = k\n⊢ i + 1 = j → j + 1 = k → (d i ≫ eqToHom (_ : X (i + 1) = X j)) ≫ 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j k : α\nh : ¬i + 1 = j\nh' : j + 1 = k\n⊢ i + 1 = j → j + 1 = k → 0 ≫ d j ≫ eqToHom (_ : X (j + 1) = X k) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j k : α\nh : ¬i + 1 = j\nh' : ¬j + 1 = k\n⊢ i + 1 = j → j + 1 = k → 0 ≫ 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\nj : α\n⊢ HomologicalComplex.d (of X d sq) j (j + 1) = d j\n[PROOFSTEP]\ndsimp [of]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\nj : α\n⊢ (if j + 1 = j + 1 then d j ≫ 𝟙 (X (j + 1)) else 0) = d j\n[PROOFSTEP]\nrw [if_pos rfl, Category.comp_id]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j : α\nh : i + 1 ≠ j\n⊢ HomologicalComplex.d (of X d sq) i j = 0\n[PROOFSTEP]\ndsimp [of]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd : (n : α) → X n ⟶ X (n + 1)\nsq : ∀ (n : α), d n ≫ d (n + 1) = 0\ni j : α\nh : i + 1 ≠ j\n⊢ (if h : i + 1 = j then d i ≫ eqToHom (_ : X (i + 1) = X j) else 0) = 0\n[PROOFSTEP]\nrw [dif_neg h]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd_X : (n : α) → X n ⟶ X (n + 1)\nsq_X : ∀ (n : α), d_X n ≫ d_X (n + 1) = 0\nY : α → V\nd_Y : (n : α) → Y n ⟶ Y (n + 1)\nsq_Y : ∀ (n : α), d_Y n ≫ d_Y (n + 1) = 0\nf : (i : α) → X i ⟶ Y i\ncomm : ∀ (i : α), f i ≫ d_Y i = d_X i ≫ f (i + 1)\nn m : α\n⊢ ComplexShape.Rel (ComplexShape.up α) n m →\n    f n ≫ HomologicalComplex.d (of Y d_Y sq_Y) n m = HomologicalComplex.d (of X d_X sq_X) n m ≫ f m\n[PROOFSTEP]\nby_cases h : n + 1 = m\n[GOAL]\ncase pos\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd_X : (n : α) → X n ⟶ X (n + 1)\nsq_X : ∀ (n : α), d_X n ≫ d_X (n + 1) = 0\nY : α → V\nd_Y : (n : α) → Y n ⟶ Y (n + 1)\nsq_Y : ∀ (n : α), d_Y n ≫ d_Y (n + 1) = 0\nf : (i : α) → X i ⟶ Y i\ncomm : ∀ (i : α), f i ≫ d_Y i = d_X i ≫ f (i + 1)\nn m : α\nh : n + 1 = m\n⊢ ComplexShape.Rel (ComplexShape.up α) n m →\n    f n ≫ HomologicalComplex.d (of Y d_Y sq_Y) n m = HomologicalComplex.d (of X d_X sq_X) n m ≫ f m\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd_X : (n : α) → X n ⟶ X (n + 1)\nsq_X : ∀ (n : α), d_X n ≫ d_X (n + 1) = 0\nY : α → V\nd_Y : (n : α) → Y n ⟶ Y (n + 1)\nsq_Y : ∀ (n : α), d_Y n ≫ d_Y (n + 1) = 0\nf : (i : α) → X i ⟶ Y i\ncomm : ∀ (i : α), f i ≫ d_Y i = d_X i ≫ f (i + 1)\nn : α\n⊢ ComplexShape.Rel (ComplexShape.up α) n (n + 1) →\n    f n ≫ HomologicalComplex.d (of Y d_Y sq_Y) n (n + 1) = HomologicalComplex.d (of X d_X sq_X) n (n + 1) ≫ f (n + 1)\n[PROOFSTEP]\nsimpa using comm n\n[GOAL]\ncase neg\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd_X : (n : α) → X n ⟶ X (n + 1)\nsq_X : ∀ (n : α), d_X n ≫ d_X (n + 1) = 0\nY : α → V\nd_Y : (n : α) → Y n ⟶ Y (n + 1)\nsq_Y : ∀ (n : α), d_Y n ≫ d_Y (n + 1) = 0\nf : (i : α) → X i ⟶ Y i\ncomm : ∀ (i : α), f i ≫ d_Y i = d_X i ≫ f (i + 1)\nn m : α\nh : ¬n + 1 = m\n⊢ ComplexShape.Rel (ComplexShape.up α) n m →\n    f n ≫ HomologicalComplex.d (of Y d_Y sq_Y) n m = HomologicalComplex.d (of X d_X sq_X) n m ≫ f m\n[PROOFSTEP]\nrw [of_d_ne X _ _ h, of_d_ne Y _ _ h]\n[GOAL]\ncase neg\nι : Type u_1\nV : Type u\ninst✝⁴ : Category.{v, u} V\ninst✝³ : HasZeroMorphisms V\nα : Type u_2\ninst✝² : AddRightCancelSemigroup α\ninst✝¹ : One α\ninst✝ : DecidableEq α\nX : α → V\nd_X : (n : α) → X n ⟶ X (n + 1)\nsq_X : ∀ (n : α), d_X n ≫ d_X (n + 1) = 0\nY : α → V\nd_Y : (n : α) → Y n ⟶ Y (n + 1)\nsq_Y : ∀ (n : α), d_Y n ≫ d_Y (n + 1) = 0\nf : (i : α) → X i ⟶ Y i\ncomm : ∀ (i : α), f i ≫ d_Y i = d_X i ≫ f (i + 1)\nn m : α\nh : ¬n + 1 = m\n⊢ ComplexShape.Rel (ComplexShape.up α) n m → f n ≫ 0 = 0 ≫ f m\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nX₀ X₁ X₂ : V\nd₀ : X₀ ⟶ X₁\nd₁ : X₁ ⟶ X₂\ns : d₀ ≫ d₁ = 0\nsucc :\n  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ ⟶ X₁) ×' (d₁ : X₁ ⟶ X₂) ×' d₀ ≫ d₁ = 0) →\n    (X₃ : V) ×' (d₂ : t.snd.snd.fst ⟶ X₃) ×' t.snd.snd.snd.snd.fst ≫ d₂ = 0\n⊢ HomologicalComplex.d (mk X₀ X₁ X₂ d₀ d₁ s succ) 0 1 = d₀\n[PROOFSTEP]\nchange ite (1 = 0 + 1) (d₀ ≫ 𝟙 X₁) 0 = d₀\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nX₀ X₁ X₂ : V\nd₀ : X₀ ⟶ X₁\nd₁ : X₁ ⟶ X₂\ns : d₀ ≫ d₁ = 0\nsucc :\n  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ ⟶ X₁) ×' (d₁ : X₁ ⟶ X₂) ×' d₀ ≫ d₁ = 0) →\n    (X₃ : V) ×' (d₂ : t.snd.snd.fst ⟶ X₃) ×' t.snd.snd.snd.snd.fst ≫ d₂ = 0\n⊢ (if 1 = 0 + 1 then d₀ ≫ 𝟙 X₁ else 0) = d₀\n[PROOFSTEP]\nrw [if_pos rfl, Category.comp_id]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nX₀ X₁ X₂ : V\nd₀ : X₀ ⟶ X₁\nd₁ : X₁ ⟶ X₂\ns : d₀ ≫ d₁ = 0\nsucc :\n  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ ⟶ X₁) ×' (d₁ : X₁ ⟶ X₂) ×' d₀ ≫ d₁ = 0) →\n    (X₃ : V) ×' (d₂ : t.snd.snd.fst ⟶ X₃) ×' t.snd.snd.snd.snd.fst ≫ d₂ = 0\n⊢ HomologicalComplex.d (mk X₀ X₁ X₂ d₀ d₁ s succ) 1 2 = d₁\n[PROOFSTEP]\nchange ite (2 = 1 + 1) (d₁ ≫ 𝟙 X₂) 0 = d₁\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nX₀ X₁ X₂ : V\nd₀ : X₀ ⟶ X₁\nd₁ : X₁ ⟶ X₂\ns : d₀ ≫ d₁ = 0\nsucc :\n  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ ⟶ X₁) ×' (d₁ : X₁ ⟶ X₂) ×' d₀ ≫ d₁ = 0) →\n    (X₃ : V) ×' (d₂ : t.snd.snd.fst ⟶ X₃) ×' t.snd.snd.snd.snd.fst ≫ d₂ = 0\n⊢ (if 2 = 1 + 1 then d₁ ≫ 𝟙 X₂ else 0) = d₁\n[PROOFSTEP]\nrw [if_pos rfl, Category.comp_id]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nX₀ X₁ X₂ : V\nd₀ : X₀ ⟶ X₁\nd₁ : X₁ ⟶ X₂\ns : d₀ ≫ d₁ = 0\nsucc :\n  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ ⟶ X₁) ×' (d₁ : X₁ ⟶ X₂) ×' d₀ ≫ d₁ = 0) →\n    (X₃ : V) ×' (d₂ : t.snd.snd.fst ⟶ X₃) ×' t.snd.snd.snd.snd.fst ≫ d₂ = 0\nsucc' : (t : (X₀ : V) × (X₁ : V) × (X₀ ⟶ X₁)) → (X₂ : V) ×' (d : t.snd.fst ⟶ X₂) ×' t.snd.snd ≫ d = 0\n⊢ HomologicalComplex.d (mk' X₀ X₁ d₀ succ') 0 1 = d₀\n[PROOFSTEP]\nchange ite (1 = 0 + 1) (d₀ ≫ 𝟙 X₁) 0 = d₀\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nX₀ X₁ X₂ : V\nd₀ : X₀ ⟶ X₁\nd₁ : X₁ ⟶ X₂\ns : d₀ ≫ d₁ = 0\nsucc :\n  (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ ⟶ X₁) ×' (d₁ : X₁ ⟶ X₂) ×' d₀ ≫ d₁ = 0) →\n    (X₃ : V) ×' (d₂ : t.snd.snd.fst ⟶ X₃) ×' t.snd.snd.snd.snd.fst ≫ d₂ = 0\nsucc' : (t : (X₀ : V) × (X₁ : V) × (X₀ ⟶ X₁)) → (X₂ : V) ×' (d : t.snd.fst ⟶ X₂) ×' t.snd.snd ≫ d = 0\n⊢ (if 1 = 0 + 1 then d₀ ≫ 𝟙 X₁ else 0) = d₀\n[PROOFSTEP]\nrw [if_pos rfl, Category.comp_id]\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nP Q : CochainComplex V ℕ\nzero : HomologicalComplex.X P 0 ⟶ HomologicalComplex.X Q 0\none : HomologicalComplex.X P 1 ⟶ HomologicalComplex.X Q 1\none_zero_comm : zero ≫ HomologicalComplex.d Q 0 1 = HomologicalComplex.d P 0 1 ≫ one\nsucc :\n  (n : ℕ) →\n    (p :\n        (f : HomologicalComplex.X P n ⟶ HomologicalComplex.X Q n) ×'\n          (f' : HomologicalComplex.X P (n + 1) ⟶ HomologicalComplex.X Q (n + 1)) ×'\n            f ≫ HomologicalComplex.d Q n (n + 1) = HomologicalComplex.d P n (n + 1) ≫ f') →\n      (f'' : HomologicalComplex.X P (n + 2) ⟶ HomologicalComplex.X Q (n + 2)) ×'\n        p.snd.fst ≫ HomologicalComplex.d Q (n + 1) (n + 2) = HomologicalComplex.d P (n + 1) (n + 2) ≫ f''\nn m : ℕ\n⊢ ComplexShape.Rel (ComplexShape.up ℕ) n m →\n    (fun n => (mkHomAux P Q zero one one_zero_comm succ n).fst) n ≫ HomologicalComplex.d Q n m =\n      HomologicalComplex.d P n m ≫ (fun n => (mkHomAux P Q zero one one_zero_comm succ n).fst) m\n[PROOFSTEP]\nrintro (rfl : n + 1 = m)\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nP Q : CochainComplex V ℕ\nzero : HomologicalComplex.X P 0 ⟶ HomologicalComplex.X Q 0\none : HomologicalComplex.X P 1 ⟶ HomologicalComplex.X Q 1\none_zero_comm : zero ≫ HomologicalComplex.d Q 0 1 = HomologicalComplex.d P 0 1 ≫ one\nsucc :\n  (n : ℕ) →\n    (p :\n        (f : HomologicalComplex.X P n ⟶ HomologicalComplex.X Q n) ×'\n          (f' : HomologicalComplex.X P (n + 1) ⟶ HomologicalComplex.X Q (n + 1)) ×'\n            f ≫ HomologicalComplex.d Q n (n + 1) = HomologicalComplex.d P n (n + 1) ≫ f') →\n      (f'' : HomologicalComplex.X P (n + 2) ⟶ HomologicalComplex.X Q (n + 2)) ×'\n        p.snd.fst ≫ HomologicalComplex.d Q (n + 1) (n + 2) = HomologicalComplex.d P (n + 1) (n + 2) ≫ f''\nn : ℕ\n⊢ (fun n => (mkHomAux P Q zero one one_zero_comm succ n).fst) n ≫ HomologicalComplex.d Q n (n + 1) =\n    HomologicalComplex.d P n (n + 1) ≫ (fun n => (mkHomAux P Q zero one one_zero_comm succ n).fst) (n + 1)\n[PROOFSTEP]\nexact (mkHomAux P Q zero one one_zero_comm succ n).2.2\n[GOAL]\nι : Type u_1\nV : Type u\ninst✝¹ : Category.{v, u} V\ninst✝ : HasZeroMorphisms V\nP Q : CochainComplex V ℕ\nzero : HomologicalComplex.X P 0 ⟶ HomologicalComplex.X Q 0\none : HomologicalComplex.X P 1 ⟶ HomologicalComplex.X Q 1\none_zero_comm : zero ≫ HomologicalComplex.d Q 0 1 = HomologicalComplex.d P 0 1 ≫ one\nsucc :\n  (n : ℕ) →\n    (p :\n        (f : HomologicalComplex.X P n ⟶ HomologicalComplex.X Q n) ×'\n          (f' : HomologicalComplex.X P (n + 1) ⟶ HomologicalComplex.X Q (n + 1)) ×'\n            f ≫ HomologicalComplex.d Q n (n + 1) = HomologicalComplex.d P n (n + 1) ≫ f') →\n      (f'' : HomologicalComplex.X P (n + 2) ⟶ HomologicalComplex.X Q (n + 2)) ×'\n        p.snd.fst ≫ HomologicalComplex.d Q (n + 1) (n + 2) = HomologicalComplex.d P (n + 1) (n + 2) ≫ f''\nn : ℕ\n⊢ HomologicalComplex.Hom.f (mkHom P Q zero one one_zero_comm succ) (n + 2) =\n    (succ n\n        { fst := HomologicalComplex.Hom.f (mkHom P Q zero one one_zero_comm succ) n,\n          snd :=\n            { fst := HomologicalComplex.Hom.f (mkHom P Q zero one one_zero_comm succ) (n + 1),\n              snd :=\n                (_ :\n                  HomologicalComplex.Hom.f (mkHom P Q zero one one_zero_comm succ) n ≫\n                      HomologicalComplex.d Q n (n + 1) =\n                    HomologicalComplex.d P n (n + 1) ≫\n                      HomologicalComplex.Hom.f (mkHom P Q zero one one_zero_comm succ) (n + 1)) } }).fst\n[PROOFSTEP]\ndsimp [mkHom, mkHomAux]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Homology.HomologicalComplex", "llama_tokens": 32180, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802603710086, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.3605152369891829}}
{"text": "[GOAL]\nα : Type u_1\nm n : ℕ\na : α\nv : Vector3 α n\ni : Fin2 (succ n)\n⊢ α\n[PROOFSTEP]\nrefine' i.cases' _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nm n : ℕ\na : α\nv : Vector3 α n\ni : Fin2 (succ n)\n⊢ α\ncase refine'_2 α : Type u_1 m n : ℕ a : α v : Vector3 α n i : Fin2 (succ n) ⊢ Fin2 n → α\n[PROOFSTEP]\nexact a\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\na : α\nv : Vector3 α n\ni : Fin2 (succ n)\n⊢ Fin2 n → α\n[PROOFSTEP]\nexact v\n[GOAL]\nα : Type u_1\nm n : ℕ\nC : Vector3 α 0 → Sort u\nH : C []\nv : Vector3 α 0\n⊢ C v\n[PROOFSTEP]\nrw [eq_nil v]\n[GOAL]\nα : Type u_1\nm n : ℕ\nC : Vector3 α 0 → Sort u\nH : C []\nv : Vector3 α 0\n⊢ C []\n[PROOFSTEP]\napply H\n[GOAL]\nα : Type u_1\nm n : ℕ\nC : Vector3 α (succ n) → Sort u\nH : (a : α) → (t : Vector3 α n) → C (a :: t)\nv : Vector3 α (succ n)\n⊢ C v\n[PROOFSTEP]\nrw [← cons_head_tail v]\n[GOAL]\nα : Type u_1\nm n : ℕ\nC : Vector3 α (succ n) → Sort u\nH : (a : α) → (t : Vector3 α n) → C (a :: t)\nv : Vector3 α (succ n)\n⊢ C (head v :: tail v)\n[PROOFSTEP]\napply H\n[GOAL]\nα : Type u_1\nm✝ n✝ m : ℕ\nv : Vector3 α (succ m)\nn : ℕ\nw : Vector3 α n\na : α\n_t : Vector3 α m\n⊢ ((a :: _t) +-+ w) (left n fz) = (a :: _t) fz\n[PROOFSTEP]\nsimp [*, left]\n[GOAL]\nα : Type u_1\nm✝ n✝ m : ℕ\ni : Fin2 m\nv : Vector3 α (succ m)\nn : ℕ\nw : Vector3 α n\n_a : α\nt : Vector3 α m\n⊢ ((_a :: t) +-+ w) (left n (fs i)) = (_a :: t) (fs i)\n[PROOFSTEP]\nsimp [append_left, left]\n[GOAL]\nα : Type u_1\nm✝ n✝ m : ℕ\nv : Vector3 α (succ m)\nn : ℕ\nw : Vector3 α n\ni : Fin2 n\n_a : α\nt : Vector3 α m\n⊢ ((_a :: t) +-+ w) (add i (succ m)) = w i\n[PROOFSTEP]\nsimp [append_add, add]\n[GOAL]\nα : Type u_1\nm n : ℕ\na : α\nv : Vector3 α n\n⊢ insert a v fz = a :: v\n[PROOFSTEP]\nrefine' funext fun j => j.cases' _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nm n : ℕ\na : α\nv : Vector3 α n\nj : Fin2 (succ n)\n⊢ insert a v fz fz = (a :: v) fz\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\na : α\nv : Vector3 α n\nj : Fin2 (succ n)\n⊢ ∀ (n_1 : Fin2 n), insert a v fz (fs n_1) = (a :: v) (fs n_1)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα : Type u_1\nm n : ℕ\na : α\nv : Vector3 α n\nj : Fin2 (succ n)\n⊢ insert a v fz fz = (a :: v) fz\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\na : α\nv : Vector3 α n\nj : Fin2 (succ n)\nn✝ : Fin2 n\n⊢ insert a v fz (fs n✝) = (a :: v) (fs n✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nm n : ℕ\na b : α\nv : Vector3 α n\ni : Fin2 (succ n)\nj : Fin2 (succ (succ n))\n⊢ insert a (b :: v) (fs i) j = (b :: insert a v i) j\n[PROOFSTEP]\nrefine' j.cases' _ fun j => _\n[GOAL]\ncase refine'_1\nα : Type u_1\nm n : ℕ\na b : α\nv : Vector3 α n\ni : Fin2 (succ n)\nj : Fin2 (succ (succ n))\n⊢ insert a (b :: v) (fs i) fz = (b :: insert a v i) fz\n[PROOFSTEP]\nsimp [insert, insertPerm]\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\na b : α\nv : Vector3 α n\ni : Fin2 (succ n)\nj✝ : Fin2 (succ (succ n))\nj : Fin2 (n + 1)\n⊢ insert a (b :: v) (fs i) (fs j) = (b :: insert a v i) (fs j)\n[PROOFSTEP]\nsimp [insert, insertPerm]\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\na b : α\nv : Vector3 α n\ni : Fin2 (succ n)\nj✝ : Fin2 (succ (succ n))\nj : Fin2 (n + 1)\n⊢ (a :: b :: v)\n      (match insertPerm i j with\n      | fz => fz\n      | fs k => fs (fs k)) =\n    (a :: v) (insertPerm i j)\n[PROOFSTEP]\nrefine' Fin2.cases' _ _ (insertPerm i j)\n[GOAL]\ncase refine'_2.refine'_1\nα : Type u_1\nm n : ℕ\na b : α\nv : Vector3 α n\ni : Fin2 (succ n)\nj✝ : Fin2 (succ (succ n))\nj : Fin2 (n + 1)\n⊢ (a :: b :: v)\n      (match fz with\n      | fz => fz\n      | fs k => fs (fs k)) =\n    (a :: v) fz\n[PROOFSTEP]\nsimp [insertPerm]\n[GOAL]\ncase refine'_2.refine'_2\nα : Type u_1\nm n : ℕ\na b : α\nv : Vector3 α n\ni : Fin2 (succ n)\nj✝ : Fin2 (succ (succ n))\nj : Fin2 (n + 1)\n⊢ ∀ (n_1 : Fin2 n),\n    (a :: b :: v)\n        (match fs n_1 with\n        | fz => fz\n        | fs k => fs (fs k)) =\n      (a :: v) (fs n_1)\n[PROOFSTEP]\nsimp [insertPerm]\n[GOAL]\nα : Type u_1\nm n : ℕ\na : α\nt : Vector3 α m\nv : Vector3 α n\ni : Fin2 (succ n)\ne : succ n + m = succ (n + m)\n⊢ insert a (t +-+ v) (Eq.recOn e (add i m)) = Eq.recOn e (t +-+ insert a v i)\n[PROOFSTEP]\nrefine' Vector3.recOn t (fun e => _) (@fun k b t IH _ => _) e\n[GOAL]\ncase refine'_1\nα : Type u_1\nm n : ℕ\na : α\nt : Vector3 α m\nv : Vector3 α n\ni : Fin2 (succ n)\ne✝ : succ n + m = succ (n + m)\ne : succ n + 0 = succ (n + 0)\n⊢ insert a ([] +-+ v) (Eq.recOn e (add i 0)) = Eq.recOn e ([] +-+ insert a v i)\ncase refine'_2\nα : Type u_1\nm n : ℕ\na : α\nt✝ : Vector3 α m\nv : Vector3 α n\ni : Fin2 (succ n)\ne : succ n + m = succ (n + m)\nk : ℕ\nb : α\nt : Vector3 α k\nIH : ∀ (x : succ n + k = succ (n + k)), insert a (t +-+ v) (Eq.recOn x (add i k)) = Eq.recOn x (t +-+ insert a v i)\nx✝ : succ n + succ k = succ (n + succ k)\n⊢ insert a ((b :: t) +-+ v) (Eq.recOn x✝ (add i (succ k))) = Eq.recOn x✝ ((b :: t) +-+ insert a v i)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\na : α\nt✝ : Vector3 α m\nv : Vector3 α n\ni : Fin2 (succ n)\ne : succ n + m = succ (n + m)\nk : ℕ\nb : α\nt : Vector3 α k\nIH : ∀ (x : succ n + k = succ (n + k)), insert a (t +-+ v) (Eq.recOn x (add i k)) = Eq.recOn x (t +-+ insert a v i)\nx✝ : succ n + succ k = succ (n + succ k)\n⊢ insert a ((b :: t) +-+ v) (Eq.recOn x✝ (add i (succ k))) = Eq.recOn x✝ ((b :: t) +-+ insert a v i)\n[PROOFSTEP]\nhave e' := succ_add n k\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\na : α\nt✝ : Vector3 α m\nv : Vector3 α n\ni : Fin2 (succ n)\ne : succ n + m = succ (n + m)\nk : ℕ\nb : α\nt : Vector3 α k\nIH : ∀ (x : succ n + k = succ (n + k)), insert a (t +-+ v) (Eq.recOn x (add i k)) = Eq.recOn x (t +-+ insert a v i)\nx✝ : succ n + succ k = succ (n + succ k)\ne' : succ n + k = succ (n + k)\n⊢ insert a ((b :: t) +-+ v) (Eq.recOn x✝ (add i (succ k))) = Eq.recOn x✝ ((b :: t) +-+ insert a v i)\n[PROOFSTEP]\nchange\n  insert a (b :: t +-+ v) (Eq.recOn (congr_arg succ e') (fs (add i k))) =\n    Eq.recOn (congr_arg succ e') (b :: t +-+ insert a v i)\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\na : α\nt✝ : Vector3 α m\nv : Vector3 α n\ni : Fin2 (succ n)\ne : succ n + m = succ (n + m)\nk : ℕ\nb : α\nt : Vector3 α k\nIH : ∀ (x : succ n + k = succ (n + k)), insert a (t +-+ v) (Eq.recOn x (add i k)) = Eq.recOn x (t +-+ insert a v i)\nx✝ : succ n + succ k = succ (n + succ k)\ne' : succ n + k = succ (n + k)\n⊢ insert a (b :: t +-+ v) (Eq.recOn (_ : succ (succ n + k) = succ (succ (n + k))) (fs (add i k))) =\n    Eq.recOn (_ : succ (succ n + k) = succ (succ (n + k))) (b :: t +-+ insert a v i)\n[PROOFSTEP]\nrw [←\n  (Eq.recOn e' rfl : fs (Eq.recOn e' (i.add k) : Fin2 (succ (n + k))) = Eq.recOn (congr_arg succ e') (fs (i.add k)))]\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\na : α\nt✝ : Vector3 α m\nv : Vector3 α n\ni : Fin2 (succ n)\ne : succ n + m = succ (n + m)\nk : ℕ\nb : α\nt : Vector3 α k\nIH : ∀ (x : succ n + k = succ (n + k)), insert a (t +-+ v) (Eq.recOn x (add i k)) = Eq.recOn x (t +-+ insert a v i)\nx✝ : succ n + succ k = succ (n + succ k)\ne' : succ n + k = succ (n + k)\n⊢ insert a (b :: t +-+ v) (fs (Eq.recOn e' (add i k))) =\n    Eq.recOn (_ : succ (succ n + k) = succ (succ (n + k))) (b :: t +-+ insert a v i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\na : α\nt✝ : Vector3 α m\nv : Vector3 α n\ni : Fin2 (succ n)\ne : succ n + m = succ (n + m)\nk : ℕ\nb : α\nt : Vector3 α k\nIH : ∀ (x : succ n + k = succ (n + k)), insert a (t +-+ v) (Eq.recOn x (add i k)) = Eq.recOn x (t +-+ insert a v i)\nx✝ : succ n + succ k = succ (n + succ k)\ne' : succ n + k = succ (n + k)\n⊢ (b :: insert a (t +-+ v) (e' ▸ add i k)) = (_ : succ (succ n + k) = succ (succ (n + k))) ▸ b :: t +-+ insert a v i\n[PROOFSTEP]\nrw [IH]\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\na : α\nt✝ : Vector3 α m\nv : Vector3 α n\ni : Fin2 (succ n)\ne : succ n + m = succ (n + m)\nk : ℕ\nb : α\nt : Vector3 α k\nIH : ∀ (x : succ n + k = succ (n + k)), insert a (t +-+ v) (Eq.recOn x (add i k)) = Eq.recOn x (t +-+ insert a v i)\nx✝ : succ n + succ k = succ (n + succ k)\ne' : succ n + k = succ (n + k)\n⊢ (b :: Eq.recOn e' (t +-+ insert a v i)) = (_ : succ (succ n + k) = succ (succ (n + k))) ▸ b :: t +-+ insert a v i\n[PROOFSTEP]\nexact Eq.recOn e' rfl\n[GOAL]\nα : Type u_1\nm n : ℕ\nf : Vector3 α 0 → Prop\nx✝ : Exists f\nv : Vector3 α 0\nfv : f v\n⊢ f []\n[PROOFSTEP]\nrw [← eq_nil v]\n[GOAL]\nα : Type u_1\nm n : ℕ\nf : Vector3 α 0 → Prop\nx✝ : Exists f\nv : Vector3 α 0\nfv : f v\n⊢ f v\n[PROOFSTEP]\nexact fv\n[GOAL]\nα : Type u_1\nm n : ℕ\nf : Vector3 α (succ n) → Prop\nx✝ : Exists f\nv : Vector3 α (succ n)\nfv : f v\n⊢ f (?m.40396 f x✝ v fv :: ?m.40397 f x✝ v fv)\n[PROOFSTEP]\nrw [cons_head_tail v]\n[GOAL]\nα : Type u_1\nm n : ℕ\nf : Vector3 α (succ n) → Prop\nx✝ : Exists f\nv : Vector3 α (succ n)\nfv : f v\n⊢ f v\n[PROOFSTEP]\nexact fv\n[GOAL]\nα : Type u_1\nm n : ℕ\np : α → Prop\nv : Vector3 α n\n⊢ VectorAllP p v ↔ ∀ (i : Fin2 n), p (v i)\n[PROOFSTEP]\nrefine' v.recOn _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nm n : ℕ\np : α → Prop\nv : Vector3 α n\n⊢ VectorAllP p [] ↔ ∀ (i : Fin2 0), p []\n[PROOFSTEP]\nexact ⟨fun _ => Fin2.elim0, fun _ => trivial⟩\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\np : α → Prop\nv : Vector3 α n\n⊢ ∀ {n : ℕ} (a : α) (w : Vector3 α n),\n    (VectorAllP p w ↔ ∀ (i : Fin2 n), p (w i)) → (VectorAllP p (a :: w) ↔ ∀ (i : Fin2 (succ n)), p ((a :: w) i))\n[PROOFSTEP]\nsimp only [vectorAllP_cons]\n[GOAL]\ncase refine'_2\nα : Type u_1\nm n : ℕ\np : α → Prop\nv : Vector3 α n\n⊢ ∀ {n : ℕ} (a : α) (w : Vector3 α n),\n    (VectorAllP p w ↔ ∀ (i : Fin2 n), p (w i)) → (p a ∧ VectorAllP p w ↔ ∀ (i : Fin2 (succ n)), p ((a :: w) i))\n[PROOFSTEP]\nrefine' fun {n} a v IH =>\n  (and_congr_right fun _ => IH).trans\n    ⟨fun ⟨pa, h⟩ i => by\n      refine' i.cases' _ _\n      exacts [pa, h], fun h => ⟨_, fun i => _⟩⟩\n[GOAL]\nα : Type u_1\nm n✝ : ℕ\np : α → Prop\nv✝ : Vector3 α n✝\nn : ℕ\na : α\nv : Vector3 α n\nIH : VectorAllP p v ↔ ∀ (i : Fin2 n), p (v i)\nx✝ : p a ∧ ∀ (i : Fin2 n), p (v i)\ni : Fin2 (succ n)\npa : p a\nh : ∀ (i : Fin2 n), p (v i)\n⊢ p ((a :: v) i)\n[PROOFSTEP]\nrefine' i.cases' _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nm n✝ : ℕ\np : α → Prop\nv✝ : Vector3 α n✝\nn : ℕ\na : α\nv : Vector3 α n\nIH : VectorAllP p v ↔ ∀ (i : Fin2 n), p (v i)\nx✝ : p a ∧ ∀ (i : Fin2 n), p (v i)\ni : Fin2 (succ n)\npa : p a\nh : ∀ (i : Fin2 n), p (v i)\n⊢ p ((a :: v) fz)\ncase refine'_2\nα : Type u_1\nm n✝ : ℕ\np : α → Prop\nv✝ : Vector3 α n✝\nn : ℕ\na : α\nv : Vector3 α n\nIH : VectorAllP p v ↔ ∀ (i : Fin2 n), p (v i)\nx✝ : p a ∧ ∀ (i : Fin2 n), p (v i)\ni : Fin2 (succ n)\npa : p a\nh : ∀ (i : Fin2 n), p (v i)\n⊢ ∀ (n_1 : Fin2 n), p ((a :: v) (fs n_1))\n[PROOFSTEP]\nexacts [pa, h]\n[GOAL]\ncase refine'_2.refine'_1\nα : Type u_1\nm n✝ : ℕ\np : α → Prop\nv✝ : Vector3 α n✝\nn : ℕ\na : α\nv : Vector3 α n\nIH : VectorAllP p v ↔ ∀ (i : Fin2 n), p (v i)\nh : ∀ (i : Fin2 (succ n)), p ((a :: v) i)\n⊢ p a\n[PROOFSTEP]\nsimpa using h fz\n[GOAL]\ncase refine'_2.refine'_2\nα : Type u_1\nm n✝ : ℕ\np : α → Prop\nv✝ : Vector3 α n✝\nn : ℕ\na : α\nv : Vector3 α n\nIH : VectorAllP p v ↔ ∀ (i : Fin2 n), p (v i)\nh : ∀ (i : Fin2 (succ n)), p ((a :: v) i)\ni : Fin2 n\n⊢ p (v i)\n[PROOFSTEP]\nsimpa using h (fs i)\n", "meta": {"mathlib_filename": "Mathlib.Data.Vector3", "llama_tokens": 5594, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6001883592602049, "lm_q2_score": 0.600188359260205, "lm_q1q2_score": 0.3602260665914568}}
{"text": "[GOAL]\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\n⊢ EssentiallySmall C ↔ EssentiallySmall D\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase mp\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\n⊢ EssentiallySmall C → EssentiallySmall D\n[PROOFSTEP]\nrintro ⟨S, 𝒮, ⟨f⟩⟩\n[GOAL]\ncase mp.mk.intro.intro.intro\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nS : Type w\n𝒮 : SmallCategory S\nf : C ≌ S\n⊢ EssentiallySmall D\n[PROOFSTEP]\nskip\n[GOAL]\ncase mp.mk.intro.intro.intro\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nS : Type w\n𝒮 : SmallCategory S\nf : C ≌ S\n⊢ EssentiallySmall D\n[PROOFSTEP]\nexact EssentiallySmall.mk' (e.symm.trans f)\n[GOAL]\ncase mpr\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\n⊢ EssentiallySmall D → EssentiallySmall C\n[PROOFSTEP]\nrintro ⟨S, 𝒮, ⟨f⟩⟩\n[GOAL]\ncase mpr.mk.intro.intro.intro\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nS : Type w\n𝒮 : SmallCategory S\nf : D ≌ S\n⊢ EssentiallySmall C\n[PROOFSTEP]\nskip\n[GOAL]\ncase mpr.mk.intro.intro.intro\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nS : Type w\n𝒮 : SmallCategory S\nf : D ≌ S\n⊢ EssentiallySmall C\n[PROOFSTEP]\nexact EssentiallySmall.mk' (e.trans f)\n[GOAL]\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\n⊢ LocallySmall C ↔ LocallySmall D\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase mp\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\n⊢ LocallySmall C → LocallySmall D\n[PROOFSTEP]\nrintro ⟨L⟩\n[GOAL]\ncase mp.mk\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nL : ∀ (X Y : C), Small.{w, v} (X ⟶ Y)\n⊢ LocallySmall D\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase mp.mk.hom_small\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nL : ∀ (X Y : C), Small.{w, v} (X ⟶ Y)\n⊢ autoParam (∀ (X Y : D), Small.{w, v'} (X ⟶ Y)) _auto✝\n[PROOFSTEP]\nintro X Y\n[GOAL]\ncase mp.mk.hom_small\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nL : ∀ (X Y : C), Small.{w, v} (X ⟶ Y)\nX Y : D\n⊢ Small.{w, v'} (X ⟶ Y)\n[PROOFSTEP]\nspecialize L (e.inverse.obj X) (e.inverse.obj Y)\n[GOAL]\ncase mp.mk.hom_small\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nX Y : D\nL : Small.{w, v} (e.inverse.obj X ⟶ e.inverse.obj Y)\n⊢ Small.{w, v'} (X ⟶ Y)\n[PROOFSTEP]\nrefine' (small_congr _).mpr L\n[GOAL]\ncase mp.mk.hom_small\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nX Y : D\nL : Small.{w, v} (e.inverse.obj X ⟶ e.inverse.obj Y)\n⊢ (X ⟶ Y) ≃ (e.inverse.obj X ⟶ e.inverse.obj Y)\n[PROOFSTEP]\nexact equivOfFullyFaithful e.inverse\n[GOAL]\ncase mpr\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\n⊢ LocallySmall D → LocallySmall C\n[PROOFSTEP]\nrintro ⟨L⟩\n[GOAL]\ncase mpr.mk\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nL : ∀ (X Y : D), Small.{w, v'} (X ⟶ Y)\n⊢ LocallySmall C\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase mpr.mk.hom_small\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nL : ∀ (X Y : D), Small.{w, v'} (X ⟶ Y)\n⊢ autoParam (∀ (X Y : C), Small.{w, v} (X ⟶ Y)) _auto✝\n[PROOFSTEP]\nintro X Y\n[GOAL]\ncase mpr.mk.hom_small\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nL : ∀ (X Y : D), Small.{w, v'} (X ⟶ Y)\nX Y : C\n⊢ Small.{w, v} (X ⟶ Y)\n[PROOFSTEP]\nspecialize L (e.functor.obj X) (e.functor.obj Y)\n[GOAL]\ncase mpr.mk.hom_small\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nX Y : C\nL : Small.{w, v'} (e.functor.obj X ⟶ e.functor.obj Y)\n⊢ Small.{w, v} (X ⟶ Y)\n[PROOFSTEP]\nrefine' (small_congr _).mpr L\n[GOAL]\ncase mpr.mk.hom_small\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\ne : C ≌ D\nX Y : C\nL : Small.{w, v'} (e.functor.obj X ⟶ e.functor.obj Y)\n⊢ (X ⟶ Y) ≃ (e.functor.obj X ⟶ e.functor.obj Y)\n[PROOFSTEP]\nexact equivOfFullyFaithful e.functor\n[GOAL]\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ EssentiallySmall C ↔ Small.{w, u} (Skeleton C) ∧ LocallySmall C\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase mp\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ EssentiallySmall C → Small.{w, u} (Skeleton C) ∧ LocallySmall C\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\nh : EssentiallySmall C\n⊢ Small.{w, u} (Skeleton C) ∧ LocallySmall C\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase mp.left\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\nh : EssentiallySmall C\n⊢ Small.{w, u} (Skeleton C)\n[PROOFSTEP]\nrcases h with ⟨S, 𝒮, ⟨e⟩⟩\n[GOAL]\ncase mp.left.mk.intro.intro.intro\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\nS : Type w\n𝒮 : SmallCategory S\ne : C ≌ S\n⊢ Small.{w, u} (Skeleton C)\n[PROOFSTEP]\nskip\n[GOAL]\ncase mp.left.mk.intro.intro.intro\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\nS : Type w\n𝒮 : SmallCategory S\ne : C ≌ S\n⊢ Small.{w, u} (Skeleton C)\n[PROOFSTEP]\nrefine' ⟨⟨Skeleton S, ⟨_⟩⟩⟩\n[GOAL]\ncase mp.left.mk.intro.intro.intro\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\nS : Type w\n𝒮 : SmallCategory S\ne : C ≌ S\n⊢ Skeleton C ≃ Skeleton S\n[PROOFSTEP]\nexact e.skeletonEquiv\n[GOAL]\ncase mp.right\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\nh : EssentiallySmall C\n⊢ LocallySmall C\n[PROOFSTEP]\nskip\n[GOAL]\ncase mp.right\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\nh : EssentiallySmall C\n⊢ LocallySmall C\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase mpr\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ Small.{w, u} (Skeleton C) ∧ LocallySmall C → EssentiallySmall C\n[PROOFSTEP]\nrintro ⟨⟨S, ⟨e⟩⟩, L⟩\n[GOAL]\ncase mpr.intro.mk.intro.intro\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\nL : LocallySmall C\nS : Type w\ne : Skeleton C ≃ S\n⊢ EssentiallySmall C\n[PROOFSTEP]\nskip\n[GOAL]\ncase mpr.intro.mk.intro.intro\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\nL : LocallySmall C\nS : Type w\ne : Skeleton C ≃ S\n⊢ EssentiallySmall C\n[PROOFSTEP]\nlet e' := (ShrinkHoms.equivalence C).skeletonEquiv.symm\n[GOAL]\ncase mpr.intro.mk.intro.intro\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\nL : LocallySmall C\nS : Type w\ne : Skeleton C ≃ S\ne' : Skeleton (ShrinkHoms C) ≃ Skeleton C := (Equivalence.skeletonEquiv (ShrinkHoms.equivalence C)).symm\n⊢ EssentiallySmall C\n[PROOFSTEP]\nletI : Category S := InducedCategory.category (e'.trans e).symm\n[GOAL]\ncase mpr.intro.mk.intro.intro\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\nL : LocallySmall C\nS : Type w\ne : Skeleton C ≃ S\ne' : Skeleton (ShrinkHoms C) ≃ Skeleton C := (Equivalence.skeletonEquiv (ShrinkHoms.equivalence C)).symm\nthis : Category.{w, w} S := InducedCategory.category ↑(e'.trans e).symm\n⊢ EssentiallySmall C\n[PROOFSTEP]\nrefine' ⟨⟨S, this, ⟨_⟩⟩⟩\n[GOAL]\ncase mpr.intro.mk.intro.intro\nC✝ : Type u\ninst✝¹ : Category.{v, u} C✝\nC : Type u\ninst✝ : Category.{v, u} C\nL : LocallySmall C\nS : Type w\ne : Skeleton C ≃ S\ne' : Skeleton (ShrinkHoms C) ≃ Skeleton C := (Equivalence.skeletonEquiv (ShrinkHoms.equivalence C)).symm\nthis : Category.{w, w} S := InducedCategory.category ↑(e'.trans e).symm\n⊢ C ≌ S\n[PROOFSTEP]\nrefine'\n  (ShrinkHoms.equivalence C).trans <|\n    (skeletonEquivalence (ShrinkHoms C)).symm.trans ((inducedFunctor (e'.trans e).symm).asEquivalence.symm)\n[GOAL]\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Quiver.IsThin C\n⊢ EssentiallySmall C ↔ Small.{w, u} (Skeleton C)\n[PROOFSTEP]\nsimp [essentiallySmall_iff, CategoryTheory.locallySmall_of_thin]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.EssentiallySmall", "llama_tokens": 4701, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6039318337259584, "lm_q2_score": 0.5964331462646254, "lm_q1q2_score": 0.36020496371853794}}
{"text": "[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝⁶ : NormedAddCommGroup E'\ng : G → E'\ninst✝⁵ : MeasurableSpace G\nμ : Measure G\ninst✝⁴ : NormedSpace ℝ E'\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace ℝ G\ninst✝¹ : HasContDiffBump G\ninst✝ : CompleteSpace E'\nφ : ContDiffBump 0\nx₀✝ x₀ : G\nhg : ∀ (x : G), x ∈ ball x₀ φ.rOut → g x = g x₀\n⊢ ↑φ ⋆[lsmul ℝ ℝ, x₀] g = integral μ ↑φ • g x₀\n[PROOFSTEP]\nsimp_rw [convolution_eq_right' _ φ.support_eq.subset hg, lsmul_apply, integral_smul_const]\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹⁰ : NormedAddCommGroup E'\ng : G → E'\ninst✝⁹ : MeasurableSpace G\nμ : Measure G\ninst✝⁸ : NormedSpace ℝ E'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace ℝ G\ninst✝⁵ : HasContDiffBump G\ninst✝⁴ : CompleteSpace E'\nφ : ContDiffBump 0\nx₀✝ : G\ninst✝³ : BorelSpace G\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : FiniteDimensional ℝ G\nx₀ : G\nhg : ∀ (x : G), x ∈ ball x₀ φ.rOut → g x = g x₀\n⊢ ContDiffBump.normed φ μ ⋆[lsmul ℝ ℝ, x₀] g = g x₀\n[PROOFSTEP]\nrw [convolution_eq_right' _ φ.support_normed_eq.subset hg]\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹⁰ : NormedAddCommGroup E'\ng : G → E'\ninst✝⁹ : MeasurableSpace G\nμ : Measure G\ninst✝⁸ : NormedSpace ℝ E'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedSpace ℝ G\ninst✝⁵ : HasContDiffBump G\ninst✝⁴ : CompleteSpace E'\nφ : ContDiffBump 0\nx₀✝ : G\ninst✝³ : BorelSpace G\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : FiniteDimensional ℝ G\nx₀ : G\nhg : ∀ (x : G), x ∈ ball x₀ φ.rOut → g x = g x₀\n⊢ ∫ (t : G), ↑(↑(lsmul ℝ ℝ) (ContDiffBump.normed φ μ t)) (g x₀) ∂μ = g x₀\n[PROOFSTEP]\nexact integral_normed_smul φ μ (g x₀)\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nx₀ : G\nε : ℝ\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ φ.rOut → dist (g x) (g x₀) ≤ ε\n⊢ 0 ≤ ε\n[PROOFSTEP]\nsimp_rw [← dist_self (g x₀), hg x₀ (mem_ball_self φ.rOut_pos)]\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\n⊢ ∀ᵐ (x₀ : G) ∂μ, Tendsto (fun i => ContDiffBump.normed (φ i) μ ⋆[lsmul ℝ ℝ, x₀] g) l (𝓝 (g x₀))\n[PROOFSTEP]\nhave : IsAddHaarMeasure μ :=\n  ⟨⟩\n    -- By Lebesgue differentiation theorem, the average of `g` on a small ball converges\n      -- almost everywhere to the value of `g` as the radius shrinks to zero.\n      -- We will see that this set of points satisfies the desired conclusion.\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis : IsAddHaarMeasure μ\n⊢ ∀ᵐ (x₀ : G) ∂μ, Tendsto (fun i => ContDiffBump.normed (φ i) μ ⋆[lsmul ℝ ℝ, x₀] g) l (𝓝 (g x₀))\n[PROOFSTEP]\nfilter_upwards [(Besicovitch.vitaliFamily μ).ae_tendsto_average_norm_sub hg] with x₀ h₀\n[GOAL]\ncase h\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\n⊢ Tendsto (fun i => ContDiffBump.normed (φ i) μ ⋆[lsmul ℝ ℝ, x₀] g) l (𝓝 (g x₀))\n[PROOFSTEP]\nsimp only [convolution_eq_swap, lsmul_apply]\n[GOAL]\ncase h\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\n⊢ Tendsto (fun i => ∫ (t : G), ContDiffBump.normed (φ i) μ (x₀ - t) • g t ∂μ) l (𝓝 (g x₀))\n[PROOFSTEP]\nhave hφ' : Tendsto (fun i ↦ (φ i).rOut) l (𝓝[>] 0) :=\n  tendsto_nhdsWithin_iff.2 ⟨hφ, eventually_of_forall (fun i ↦ (φ i).rOut_pos)⟩\n[GOAL]\ncase h\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\n⊢ Tendsto (fun i => ∫ (t : G), ContDiffBump.normed (φ i) μ (x₀ - t) • g t ∂μ) l (𝓝 (g x₀))\n[PROOFSTEP]\nhave := (h₀.comp (Besicovitch.tendsto_filterAt μ x₀)).comp hφ'\n[GOAL]\ncase h\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (((fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) ∘ fun r => closedBall x₀ r) ∘ fun i => (φ i).rOut) l (𝓝 0)\n⊢ Tendsto (fun i => ∫ (t : G), ContDiffBump.normed (φ i) μ (x₀ - t) • g t ∂μ) l (𝓝 (g x₀))\n[PROOFSTEP]\nsimp only [Function.comp] at this \n[GOAL]\ncase h\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\n⊢ Tendsto (fun i => ∫ (t : G), ContDiffBump.normed (φ i) μ (x₀ - t) • g t ∂μ) l (𝓝 (g x₀))\n[PROOFSTEP]\napply tendsto_integral_smul_of_tendsto_average_norm_sub (K ^ (FiniteDimensional.finrank ℝ G)) this\n[GOAL]\ncase h.f_int\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\n⊢ ∀ᶠ (i : ι) in l, IntegrableOn (fun y => g y) (closedBall x₀ (φ i).rOut)\n[PROOFSTEP]\napply eventually_of_forall (fun i ↦ ?_)\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\ni : ι\n⊢ IntegrableOn (fun y => g y) (closedBall x₀ (φ i).rOut)\n[PROOFSTEP]\napply hg.integrableOn_isCompact\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\ni : ι\n⊢ IsCompact (closedBall x₀ (φ i).rOut)\n[PROOFSTEP]\nexact isCompact_closedBall _ _\n[GOAL]\ncase h.hg\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\n⊢ Tendsto (fun i => ∫ (y : G), ContDiffBump.normed (φ i) μ (x₀ - y) ∂μ) l (𝓝 1)\n[PROOFSTEP]\napply tendsto_const_nhds.congr (fun i ↦ ?_)\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\ni : ι\n⊢ 1 = ∫ (y : G), ContDiffBump.normed (φ i) μ (x₀ - y) ∂μ\n[PROOFSTEP]\nrw [← integral_neg_eq_self]\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\ni : ι\n⊢ 1 = ∫ (x : G), ContDiffBump.normed (φ i) μ (x₀ - -x) ∂μ\n[PROOFSTEP]\nsimp only [sub_neg_eq_add, integral_add_left_eq_self, integral_normed]\n[GOAL]\ncase h.g_supp\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\n⊢ ∀ᶠ (i : ι) in l, (support fun y => ContDiffBump.normed (φ i) μ (x₀ - y)) ⊆ closedBall x₀ (φ i).rOut\n[PROOFSTEP]\napply eventually_of_forall (fun i ↦ ?_)\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\ni : ι\n⊢ (support fun y => ContDiffBump.normed (φ i) μ (x₀ - y)) ⊆ closedBall x₀ (φ i).rOut\n[PROOFSTEP]\nchange support ((ContDiffBump.normed (φ i) μ) ∘ (fun y ↦ x₀ - y)) ⊆ closedBall x₀ (φ i).rOut\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\ni : ι\n⊢ support (ContDiffBump.normed (φ i) μ ∘ fun y => x₀ - y) ⊆ closedBall x₀ (φ i).rOut\n[PROOFSTEP]\nsimp only [support_comp_eq_preimage, support_normed_eq]\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\ni : ι\n⊢ (fun y => x₀ - y) ⁻¹' ball 0 (φ i).rOut ⊆ closedBall x₀ (φ i).rOut\n[PROOFSTEP]\nintro x hx\n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\ni : ι\nx : G\nhx : x ∈ (fun y => x₀ - y) ⁻¹' ball 0 (φ i).rOut\n⊢ x ∈ closedBall x₀ (φ i).rOut\n[PROOFSTEP]\nsimp only [mem_preimage, mem_ball, dist_zero_right] at hx \n[GOAL]\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\ni : ι\nx : G\nhx : ‖x₀ - x‖ < (φ i).rOut\n⊢ x ∈ closedBall x₀ (φ i).rOut\n[PROOFSTEP]\nsimpa [dist_eq_norm_sub'] using hx.le\n[GOAL]\ncase h.g_bound\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\n⊢ ∀ᶠ (i : ι) in l,\n    ∀ (x : G),\n      |ContDiffBump.normed (φ i) μ (x₀ - x)| ≤\n        K ^ FiniteDimensional.finrank ℝ G / ENNReal.toReal (↑↑μ (closedBall x₀ (φ i).rOut))\n[PROOFSTEP]\nfilter_upwards [h'φ] with i hi x\n[GOAL]\ncase h\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\ni : ι\nhi : (φ i).rOut ≤ K * (φ i).rIn\nx : G\n⊢ |ContDiffBump.normed (φ i) μ (x₀ - x)| ≤\n    K ^ FiniteDimensional.finrank ℝ G / ENNReal.toReal (↑↑μ (closedBall x₀ (φ i).rOut))\n[PROOFSTEP]\nrw [abs_of_nonneg (nonneg_normed _ _), addHaar_closedBall_center]\n[GOAL]\ncase h\nG : Type uG\nE' : Type uE'\ninst✝¹¹ : NormedAddCommGroup E'\ng : G → E'\ninst✝¹⁰ : MeasurableSpace G\nμ : Measure G\ninst✝⁹ : NormedSpace ℝ E'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedSpace ℝ G\ninst✝⁶ : HasContDiffBump G\ninst✝⁵ : CompleteSpace E'\nφ✝ : ContDiffBump 0\nx₀✝ : G\ninst✝⁴ : BorelSpace G\ninst✝³ : IsLocallyFiniteMeasure μ\ninst✝² : IsOpenPosMeasure μ\ninst✝¹ : FiniteDimensional ℝ G\ninst✝ : IsAddLeftInvariant μ\nι : Type u_1\nφ : ι → ContDiffBump 0\nl : Filter ι\nK : ℝ\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\nh'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn\nhg : LocallyIntegrable g\nthis✝ : IsAddHaarMeasure μ\nx₀ : G\nh₀ : Tendsto (fun a => ⨍ (y : G) in a, ‖g y - g x₀‖ ∂μ) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x₀) (𝓝 0)\nhφ' : Tendsto (fun i => (φ i).rOut) l (𝓝[Ioi 0] 0)\nthis : Tendsto (fun x => ⨍ (y : G) in closedBall x₀ (φ x).rOut, ‖g y - g x₀‖ ∂μ) l (𝓝 0)\ni : ι\nhi : (φ i).rOut ≤ K * (φ i).rIn\nx : G\n⊢ ContDiffBump.normed (φ i) μ (x₀ - x) ≤\n    K ^ FiniteDimensional.finrank ℝ G / ENNReal.toReal (↑↑μ (closedBall 0 (φ i).rOut))\n[PROOFSTEP]\nexact (φ i).normed_le_div_measure_closedBall_rOut _ _ hi _\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.BumpFunction.Convolution", "llama_tokens": 13078, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6076631698328916, "lm_q2_score": 0.5926665999540698, "lm_q1q2_score": 0.36014166478217235}}
{"text": "[GOAL]\nα : Sort u_1\ninst✝ : Subsingleton α\np : α → Prop\nx✝¹ x✝ : Subtype p\nx : α\nproperty✝¹ : p x\ny : α\nproperty✝ : p y\n⊢ { val := x, property := property✝¹ } = { val := y, property := property✝ }\n[PROOFSTEP]\ncases Subsingleton.elim x y\n[GOAL]\ncase refl\nα : Sort u_1\ninst✝ : Subsingleton α\np : α → Prop\nx✝¹ x✝ : Subtype p\nx : α\nproperty✝¹ property✝ : p x\n⊢ { val := x, property := property✝¹ } = { val := x, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα β : Sort u_1\nγ : Sort u_2\nf : α → γ\ng : β → γ\nx : α\ny : β\nh₁ : HEq f g\nh₂ : HEq x y\n⊢ f x = g y\n[PROOFSTEP]\ncases h₂\n[GOAL]\ncase refl\nα : Sort u_1\nγ : Sort u_2\nf : α → γ\nx : α\ng : α → γ\nh₁ : HEq f g\n⊢ f x = g x\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase refl.refl\nα : Sort u_1\nγ : Sort u_2\nf : α → γ\nx : α\n⊢ f x = f x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\na b : α\nx✝ : { down := a }.down = { down := b }.down\n⊢ { down := a } = { down := b }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\na b : ULift α\nh : a = b\n⊢ a.down = b.down\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Sort u_1\na b : α\nx✝ : { down := a }.down = { down := b }.down\n⊢ { down := a } = { down := b }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Sort u_1\na b : PLift α\nh : a = b\n⊢ a.down = b.down\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Sort u_1\nb c : α\nh : ∀ {a : α}, a = b ↔ a = c\n⊢ b = c\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Sort u_1\nb c : α\nh : b = c\na : α\n⊢ a = b ↔ a = c\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Sort u_1\na b : α\nh : ∀ {c : α}, a = c ↔ b = c\n⊢ a = b\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Sort u_1\na✝ b : α\nh : a✝ = b\na : α\n⊢ a✝ = a ↔ b = a\n[PROOFSTEP]\nrw [h]\n[GOAL]\n⊢ Eq True = id\n[PROOFSTEP]\nfunext _\n[GOAL]\ncase h\nx✝ : Prop\n⊢ (True = x✝) = id x✝\n[PROOFSTEP]\nsimp only [true_iff, id.def, eq_iff_iff]\n[GOAL]\n⊢ Xor' True = Not\n[PROOFSTEP]\nsimp [Xor']\n[GOAL]\n⊢ Xor' False = id\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nx✝ : Prop\n⊢ Xor' False x✝ ↔ id x✝\n[PROOFSTEP]\nsimp [Xor']\n[GOAL]\na b : Prop\n⊢ Xor' a b = Xor' b a\n[PROOFSTEP]\nsimp [Xor', and_comm, or_comm]\n[GOAL]\na : Prop\n⊢ Xor' a a = False\n[PROOFSTEP]\nsimp [Xor']\n[GOAL]\na b : Prop\n⊢ Xor' (¬a) b ↔ (a ↔ b)\n[PROOFSTEP]\nby_cases a\n[GOAL]\na b : Prop\n⊢ Xor' (¬a) b ↔ (a ↔ b)\n[PROOFSTEP]\nby_cases a\n[GOAL]\ncase pos\na b : Prop\nh : a\n⊢ Xor' (¬a) b ↔ (a ↔ b)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\na b : Prop\nh : ¬a\n⊢ Xor' (¬a) b ↔ (a ↔ b)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\na b : Prop\n⊢ Xor' a ¬b ↔ (a ↔ b)\n[PROOFSTEP]\nby_cases a\n[GOAL]\na b : Prop\n⊢ Xor' a ¬b ↔ (a ↔ b)\n[PROOFSTEP]\nby_cases a\n[GOAL]\ncase pos\na b : Prop\nh : a\n⊢ Xor' a ¬b ↔ (a ↔ b)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\na b : Prop\nh : ¬a\n⊢ Xor' a ¬b ↔ (a ↔ b)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\na b : Prop\n⊢ Xor' (¬a) ¬b ↔ Xor' a b\n[PROOFSTEP]\nsimp [Xor', or_comm, and_comm]\n[GOAL]\nα : Sort u_1\na b : α\np : Prop\n⊢ p ∧ a = b ↔ p ∧ b = a\n[PROOFSTEP]\nsimp [eq_comm]\n[GOAL]\nα : Sort u_1\na b : α\np : Prop\n⊢ a = b ∧ p ↔ b = a ∧ p\n[PROOFSTEP]\nsimp [eq_comm]\n[GOAL]\nP Q : Prop\n⊢ ¬Xor' P Q ↔ (P ↔ Q)\n[PROOFSTEP]\nsimp only [not_and, Xor', not_or, not_not, ← iff_iff_implies_and_implies]\n[GOAL]\na b : Prop\n⊢ Xor' a b ↔ (a ↔ ¬b)\n[PROOFSTEP]\nsimp only [← @xor_not_right a, not_not]\n[GOAL]\na b : Prop\n⊢ Xor' a b ↔ (¬a ↔ b)\n[PROOFSTEP]\nsimp only [← @xor_not_left _ b, not_not]\n[GOAL]\na✝¹ a✝ : Sort u_1\ne : a✝¹ = a✝\na : a✝¹\na' : a✝\nh : HEq a a'\n⊢ cast e a = a'\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\na✝ : Sort u_1\na : a✝\ne : a✝ = a✝\n⊢ cast e a = a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u_1\na' : α\nmotive : (a : α) → a' = a → Sort u\np : motive a' (_ : a' = a')\na : α\nt : a' = a\n⊢ HEq (t ▸ p) p\n[PROOFSTEP]\nsubst t\n[GOAL]\nα : Sort u_1\na' : α\nmotive : (a : α) → a' = a → Sort u\np : motive a' (_ : a' = a')\n⊢ HEq ((_ : a' = a') ▸ p) p\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u_2\na : α\nβ : Sort u_1\nb : α\nC : α → Sort u_1\nx : C a\ny : β\ne : a = b\nh : HEq x y\n⊢ HEq (e ▸ x) y\n[PROOFSTEP]\nsubst e\n[GOAL]\nα : Sort u_2\na : α\nβ : Sort u_1\nC : α → Sort u_1\nx : C a\ny : β\nh : HEq x y\n⊢ HEq ((_ : a = a) ▸ x) y\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Sort u_2\na : α\nβ : Sort u_1\nb : α\nC : α → Sort u_1\nx : C a\ny : β\ne : a = b\n⊢ HEq (e ▸ x) y ↔ HEq x y\n[PROOFSTEP]\nsubst e\n[GOAL]\nα : Sort u_2\na : α\nβ : Sort u_1\nC : α → Sort u_1\nx : C a\ny : β\n⊢ HEq ((_ : a = a) ▸ x) y ↔ HEq x y\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u_2\nβ : Sort u_1\na b : α\nC : α → Sort u_1\nx : β\ny : C a\ne : a = b\n⊢ HEq x (e ▸ y) ↔ HEq x y\n[PROOFSTEP]\nsubst e\n[GOAL]\nα : Sort u_2\nβ : Sort u_1\na : α\nC : α → Sort u_1\nx : β\ny : C a\n⊢ HEq x ((_ : a = a) ▸ y) ↔ HEq x y\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Sort u_1\nx₁ y₁ x₂ y₂ : α✝\nh₁ : x₁ = y₁\nh₂ : x₂ = y₂\n⊢ x₁ = x₂ ↔ y₁ = y₂\n[PROOFSTEP]\nsubst h₁\n[GOAL]\nα✝ : Sort u_1\nx₁ x₂ y₂ : α✝\nh₂ : x₂ = y₂\n⊢ x₁ = x₂ ↔ x₁ = y₂\n[PROOFSTEP]\nsubst h₂\n[GOAL]\nα✝ : Sort u_1\nx₁ x₂ : α✝\n⊢ x₁ = x₂ ↔ x₁ = x₂\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u_1\nx y z : α\nh : x = y\n⊢ x = z ↔ y = z\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Sort u_1\nx y z : α\nh : x = y\n⊢ z = x ↔ z = y\n[PROOFSTEP]\nrw [h]\n[GOAL]\nι : Sort ?u.13179\nα : Sort u_2\nκ : ι → Sort u_1\np q : α → Prop\ninst✝ : (x : α) → Decidable (p x)\n⊢ (¬∃ x, ¬p x) ↔ ∀ (x : α), p x\n[PROOFSTEP]\nsimp only [not_exists, Decidable.not_not]\n[GOAL]\nι : Sort ?u.13446\nα : Sort u_2\nκ : ι → Sort u_1\np q : α → Prop\nb : Prop\nha : Nonempty α\n⊢ (∀ (x : α), p x) → b ↔ ∃ x, p x → b\n[PROOFSTEP]\nlet ⟨a⟩ := ha\n[GOAL]\nι : Sort ?u.13446\nα : Sort u_2\nκ : ι → Sort u_1\np q : α → Prop\nb : Prop\nha : Nonempty α\na : α\n⊢ (∀ (x : α), p x) → b ↔ ∃ x, p x → b\n[PROOFSTEP]\nrefine ⟨fun h ↦ not_forall_not.1 fun h' ↦ ?_, fun ⟨x, hx⟩ h ↦ hx (h x)⟩\n[GOAL]\nι : Sort ?u.13446\nα : Sort u_2\nκ : ι → Sort u_1\np q : α → Prop\nb : Prop\nha : Nonempty α\na : α\nh : (∀ (x : α), p x) → b\nh' : ∀ (x : α), ¬(p x → b)\n⊢ False\n[PROOFSTEP]\nexact if hb : b then h' a fun _ ↦ hb else hb <| h fun x ↦ (not_imp.1 (h' x)).1\n[GOAL]\nι : Sort ?u.13873\nα : Sort ?u.13878\nκ : ι → Sort u_1\np q : α → Prop\nβ : α → Sort u_2\n⊢ (∀ (a : α), β a → True) ↔ True\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Sort ?u.14073\nα : Sort ?u.14078\nκ : ι → Sort u_1\np q : α → Prop\nβ : α → Sort u_2\nγ : (a : α) → β a → Sort u_3\n⊢ (∀ (a : α) (b : β a), γ a b → True) ↔ True\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Sort ?u.14717\nα✝ : Sort ?u.14722\nκ : ι → Sort u_1\np q : α✝ → Prop\nb : Prop\nα : Sort u_2\ni : Nonempty α\ninst✝ : Subsingleton α\n⊢ (∃! x, b) ↔ b\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Sort ?u.14980\nα : Sort u_2\nκ : ι → Sort u_1\np✝ q : α → Prop\ninst✝ : DecidableEq α\na : α\np : α → Prop\n⊢ (p a ∧ ∀ (b : α), b ≠ a → p b) ↔ ∀ (b : α), p b\n[PROOFSTEP]\nsimp only [← @forall_eq _ p a, ← forall_and, ← or_imp, Decidable.em, forall_const]\n[GOAL]\nι : Sort ?u.15561\nα : Sort u_2\nκ : ι → Sort u_1\np q : α → Prop\na' : α\n⊢ ∃! a, a = a'\n[PROOFSTEP]\nsimp only [eq_comm, ExistsUnique, and_self, forall_eq', exists_eq']\n[GOAL]\nι : Sort ?u.15937\nα : Sort u_2\nκ : ι → Sort u_1\np q : α → Prop\na' : α\n⊢ ∃! a, a' = a\n[PROOFSTEP]\nsimp only [ExistsUnique, and_self, forall_eq', exists_eq']\n[GOAL]\nι : Sort ?u.17741\nα : Sort ?u.17746\nκ : ι → Sort u_1\np✝ q : α → Prop\nβ : Sort u_2\nf : α → β\np : β → Prop\n⊢ (∀ (a : α) (b : β), f a = b → p b) ↔ ∀ (a : α), p (f a)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Sort ?u.18041\nα : Sort ?u.18046\nκ : ι → Sort u_1\np✝ q : α → Prop\nβ : Sort u_2\nf : α → β\np : β → Prop\n⊢ (∀ (b : β) (a : α), f a = b → p b) ↔ ∀ (a : α), p (f a)\n[PROOFSTEP]\nsimp [forall_swap]\n[GOAL]\nι : Sort ?u.18571\nα : Sort ?u.18576\nκ : ι → Sort u_1\np✝ q : α → Prop\nβ : Sort u_2\nf : α → β\np : β → Prop\n⊢ (∀ (a : α) (b : β), b = f a → p b) ↔ ∀ (a : α), p (f a)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Sort ?u.18901\nα : Sort ?u.18906\nκ : ι → Sort u_1\np✝ q : α → Prop\nβ : Sort u_2\nf : α → β\np : β → Prop\n⊢ (∀ (b : β) (a : α), b = f a → p b) ↔ ∀ (a : α), p (f a)\n[PROOFSTEP]\nsimp [forall_swap]\n[GOAL]\nι : Sort ?u.19647\nα : Sort u_2\nκ : ι → Sort u_1\np q : α → Prop\na' : α\n⊢ (∃ a, p a ∧ a' = a) ↔ p a'\n[PROOFSTEP]\nsimp [@eq_comm _ a']\n[GOAL]\nι : Sort ?u.19995\nα : Sort ?u.20000\nκ : ι → Sort u_1\np✝ q : α → Prop\nι₁ : Sort u_4\nι₂ : Sort u_5\nκ₁ : ι₁ → Sort u_2\nκ₂ : ι₂ → Sort u_3\np : (i₁ : ι₁) → κ₁ i₁ → (i₂ : ι₂) → κ₂ i₂ → Prop\n⊢ (∃ i₁ j₁ i₂ j₂, p i₁ j₁ i₂ j₂) ↔ ∃ i₂ j₂ i₁ j₁, p i₁ j₁ i₂ j₂\n[PROOFSTEP]\nsimp only [@exists_comm (κ₁ _), @exists_comm ι₁]\n[GOAL]\nι : Sort ?u.21140\nα : Sort ?u.21145\nκ : ι → Sort u_1\np✝ q✝ : α → Prop\nq : Prop\np : α → Prop\ninst✝ : Decidable q\n⊢ (∀ (x : α), p x ∨ q) ↔ (∀ (x : α), p x) ∨ q\n[PROOFSTEP]\nsimp [or_comm, Decidable.forall_or_left]\n[GOAL]\nι : Sort ?u.21525\nα : Sort ?u.21530\nκ : ι → Sort u_1\np✝ q✝ : α → Prop\np q : Prop\n⊢ (∃! x, q) ↔ p ∧ q\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Sort ?u.22333\nα : Sort ?u.22338\nκ : ι → Sort u_1\np✝ q : α → Prop\np : Prop → Prop\nx✝ : ∃ h, p h\nh₁ : Prop\nh₂ : p h₁\nH : h₁\n⊢ p True\n[PROOFSTEP]\nsimpa only [H] using h₂\n[GOAL]\nι : Sort ?u.22333\nα : Sort ?u.22338\nκ : ι → Sort u_1\np✝ q : α → Prop\np : Prop → Prop\nx✝ : ∃ h, p h\nh₁ : Prop\nh₂ : p h₁\nH : ¬h₁\n⊢ p False\n[PROOFSTEP]\nsimpa only [H] using h₂\n[GOAL]\nι : Sort ?u.22592\nα : Sort ?u.22597\nκ : ι → Sort u_1\np✝ q : α → Prop\np : Prop → Prop\nx✝ : p False ∧ p True\nh : Prop\nh₁ : p False\nh₂ : p True\n⊢ p h\n[PROOFSTEP]\nby_cases H : h\n[GOAL]\ncase pos\nι : Sort ?u.22592\nα : Sort ?u.22597\nκ : ι → Sort u_1\np✝ q : α → Prop\np : Prop → Prop\nx✝ : p False ∧ p True\nh : Prop\nh₁ : p False\nh₂ : p True\nH : h\n⊢ p h\n[PROOFSTEP]\nsimpa only [H]\n[GOAL]\ncase neg\nι : Sort ?u.22592\nα : Sort ?u.22597\nκ : ι → Sort u_1\np✝ q : α → Prop\np : Prop → Prop\nx✝ : p False ∧ p True\nh : Prop\nh₁ : p False\nh₂ : p True\nH : ¬h\n⊢ p h\n[PROOFSTEP]\nsimpa only [H]\n[GOAL]\nι : Sort ?u.23891\nα✝ : Sort ?u.23896\nκ : ι → Sort u_1\np✝ q✝ : α✝ → Prop\nα : Sort u_2\np : α → Sort u_3\ninst✝ : ∀ (x : α), Subsingleton (p x)\nq : (x : α) → p x → Prop\nb : Prop\nh₂ : ∃! x h, q x h\nh₁ : ∀ (x : α) (h : p x), q x h → (∀ (y : α) (hy : p y), q y hy → y = x) → b\n⊢ b\n[PROOFSTEP]\nsimp only [exists_unique_iff_exists] at h₂ \n[GOAL]\nι : Sort ?u.23891\nα✝ : Sort ?u.23896\nκ : ι → Sort u_1\np✝ q✝ : α✝ → Prop\nα : Sort u_2\np : α → Sort u_3\ninst✝ : ∀ (x : α), Subsingleton (p x)\nq : (x : α) → p x → Prop\nb : Prop\nh₁ : ∀ (x : α) (h : p x), q x h → (∀ (y : α) (hy : p y), q y hy → y = x) → b\nh₂ : ∃! x, ∃ h, q x h\n⊢ b\n[PROOFSTEP]\napply h₂.elim\n[GOAL]\nι : Sort ?u.23891\nα✝ : Sort ?u.23896\nκ : ι → Sort u_1\np✝ q✝ : α✝ → Prop\nα : Sort u_2\np : α → Sort u_3\ninst✝ : ∀ (x : α), Subsingleton (p x)\nq : (x : α) → p x → Prop\nb : Prop\nh₁ : ∀ (x : α) (h : p x), q x h → (∀ (y : α) (hy : p y), q y hy → y = x) → b\nh₂ : ∃! x, ∃ h, q x h\n⊢ ∀ (x : α), (∃ h, q x h) → (∀ (y : α), (∃ h, q y h) → y = x) → b\n[PROOFSTEP]\nexact fun x ⟨hxp, hxq⟩ H ↦ h₁ x hxp hxq fun y hyp hyq ↦ H y ⟨hyp, hyq⟩\n[GOAL]\nι : Sort ?u.24313\nα✝ : Sort ?u.24318\nκ : ι → Sort u_1\np✝ q✝ : α✝ → Prop\nα : Sort u_2\np : α → Sort u_3\ninst✝ : ∀ (x : α), Subsingleton (p x)\nq : (x : α) → p x → Prop\nw : α\nhp : p w\nhq : q w hp\nH : ∀ (y : α) (hy : p y), q y hy → y = w\n⊢ ∃! x hx, q x hx\n[PROOFSTEP]\nsimp only [exists_unique_iff_exists]\n[GOAL]\nι : Sort ?u.24313\nα✝ : Sort ?u.24318\nκ : ι → Sort u_1\np✝ q✝ : α✝ → Prop\nα : Sort u_2\np : α → Sort u_3\ninst✝ : ∀ (x : α), Subsingleton (p x)\nq : (x : α) → p x → Prop\nw : α\nhp : p w\nhq : q w hp\nH : ∀ (y : α) (hy : p y), q y hy → y = w\n⊢ ∃! x, ∃ hx, q x hx\n[PROOFSTEP]\nexact ExistsUnique.intro w ⟨hp, hq⟩ fun y ⟨hyp, hyq⟩ ↦ H y hyp hyq\n[GOAL]\nι : Sort ?u.24821\nα✝ : Sort ?u.24826\nκ : ι → Sort u_1\np✝ q✝ : α✝ → Prop\nα : Sort u_2\np : α → Sort u_3\ninst✝ : ∀ (x : α), Subsingleton (p x)\nq : (x : α) → p x → Prop\nh : ∃! x hx, q x hx\ny₁ y₂ : α\nhpy₁ : p y₁\nhqy₁ : q y₁ hpy₁\nhpy₂ : p y₂\nhqy₂ : q y₂ hpy₂\n⊢ y₁ = y₂\n[PROOFSTEP]\nsimp only [exists_unique_iff_exists] at h \n[GOAL]\nι : Sort ?u.24821\nα✝ : Sort ?u.24826\nκ : ι → Sort u_1\np✝ q✝ : α✝ → Prop\nα : Sort u_2\np : α → Sort u_3\ninst✝ : ∀ (x : α), Subsingleton (p x)\nq : (x : α) → p x → Prop\ny₁ y₂ : α\nhpy₁ : p y₁\nhqy₁ : q y₁ hpy₁\nhpy₂ : p y₂\nhqy₂ : q y₂ hpy₂\nh : ∃! x, ∃ hx, q x hx\n⊢ y₁ = y₂\n[PROOFSTEP]\nexact h.unique ⟨hpy₁, hqy₁⟩ ⟨hpy₂, hqy₂⟩\n[GOAL]\nα : Sort ?u.25125\np✝ : α → Prop\np : Prop\n⊢ Decidable p\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Sort ?u.25149\np✝ p : α → Prop\n⊢ DecidablePred p\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Sort ?u.25193\np✝ : α → Prop\np : α → α → Prop\n⊢ DecidableRel p\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα✝ : Sort ?u.25252\np : α✝ → Prop\nα : Sort u\n⊢ DecidableEq α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Sort u_1\nr p q : α → Prop\nP Q : (x : α) → p x → Prop\nb : Prop\na : α\n⊢ (∃ x x_1, p x) ↔ p a\n[PROOFSTEP]\nsimp only [exists_prop, exists_eq_left]\n[GOAL]\nα : Sort u_1\nr p q : α → Prop\nP Q : (x : α) → p x → Prop\nb : Prop\n⊢ (∃ x h, P x h) → b ↔ ∀ (x : α) (h : p x), P x h → b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Sort u_1\nr p q : α → Prop\nP Q : (x : α) → p x → Prop\nb : Prop\n⊢ (∃ x x_1, r x) ↔ (∃ x x_1, r x) ∨ ∃ x x_1, r x\n[PROOFSTEP]\nsimp only [exists_prop]\n[GOAL]\nα : Sort u_1\nr p q : α → Prop\nP Q : (x : α) → p x → Prop\nb : Prop\n⊢ (∃ x, (p x ∨ q x) ∧ r x) ↔ (∃ x, p x ∧ r x) ∨ ∃ x, q x ∧ r x\n[PROOFSTEP]\nexact Iff.trans (exists_congr fun x ↦ or_and_right) exists_or\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.31192\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ dite P A B = c ↔ (∃ h, A h = c) ∨ ∃ h, B h = c\n[PROOFSTEP]\nby_cases P\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.31192\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ dite P A B = c ↔ (∃ h, A h = c) ∨ ∃ h, B h = c\n[PROOFSTEP]\nby_cases P\n[GOAL]\ncase pos\nα : Sort u_2\nβ : Sort ?u.31192\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nh : P\n⊢ dite P A B = c ↔ (∃ h, A h = c) ∨ ∃ h, B h = c\n[PROOFSTEP]\nsimp [*, exists_prop_of_true, exists_prop_of_false]\n[GOAL]\ncase neg\nα : Sort u_2\nβ : Sort ?u.31192\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nh : ¬P\n⊢ dite P A B = c ↔ (∃ h, A h = c) ∨ ∃ h, B h = c\n[PROOFSTEP]\nsimp [*, exists_prop_of_true, exists_prop_of_false]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.31675\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ ((∃ h, (fun x => a) h = c) ∨ ∃ h, (fun x => b) h = c) ↔ P ∧ a = c ∨ ¬P ∧ b = c\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.31675\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ ((∃ h, a = c) ∨ ∃ h, b = c) ↔ P ∧ a = c ∨ ¬P ∧ b = c\n[PROOFSTEP]\nrw [exists_prop, exists_prop]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.32661\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ dite P (fun x => a) B = a ↔ ∀ (h : ¬P), B h = a\n[PROOFSTEP]\nby_cases P\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.32661\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ dite P (fun x => a) B = a ↔ ∀ (h : ¬P), B h = a\n[PROOFSTEP]\nby_cases P\n[GOAL]\ncase pos\nα : Sort u_2\nβ : Sort ?u.32661\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nh : P\n⊢ dite P (fun x => a) B = a ↔ ∀ (h : ¬P), B h = a\n[PROOFSTEP]\nsimp [*, forall_prop_of_true, forall_prop_of_false]\n[GOAL]\ncase neg\nα : Sort u_2\nβ : Sort ?u.32661\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nh : ¬P\n⊢ dite P (fun x => a) B = a ↔ ∀ (h : ¬P), B h = a\n[PROOFSTEP]\nsimp [*, forall_prop_of_true, forall_prop_of_false]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.33174\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ (dite P A fun x => b) = b ↔ ∀ (h : P), A h = b\n[PROOFSTEP]\nby_cases P\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.33174\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ (dite P A fun x => b) = b ↔ ∀ (h : P), A h = b\n[PROOFSTEP]\nby_cases P\n[GOAL]\ncase pos\nα : Sort u_2\nβ : Sort ?u.33174\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nh : P\n⊢ (dite P A fun x => b) = b ↔ ∀ (h : P), A h = b\n[PROOFSTEP]\nsimp [*, forall_prop_of_true, forall_prop_of_false]\n[GOAL]\ncase neg\nα : Sort u_2\nβ : Sort ?u.33174\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nh : ¬P\n⊢ (dite P A fun x => b) = b ↔ ∀ (h : P), A h = b\n[PROOFSTEP]\nsimp [*, forall_prop_of_true, forall_prop_of_false]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.33996\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ dite P (fun x => a) B ≠ a ↔ ∃ h, a ≠ B h\n[PROOFSTEP]\nrw [Ne.def, dite_eq_left_iff, not_forall]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.33996\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ (∃ x, ¬B x = a) ↔ ∃ h, a ≠ B h\n[PROOFSTEP]\nexact exists_congr fun h ↦ by rw [ne_comm]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.33996\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nh : ¬P\n⊢ ¬B h = a ↔ a ≠ B h\n[PROOFSTEP]\nrw [ne_comm]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.34290\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ (dite P A fun x => b) ≠ b ↔ ∃ h, A h ≠ b\n[PROOFSTEP]\nsimp only [Ne.def, dite_eq_right_iff, not_forall]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.34782\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ (∃ h, a ≠ (fun x => b) h) ↔ ¬P ∧ a ≠ b\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.34782\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ (∃ h, a ≠ b) ↔ ¬P ∧ a ≠ b\n[PROOFSTEP]\nrw [exists_prop]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.35052\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ (∃ h, (fun x => a) h ≠ b) ↔ P ∧ a ≠ b\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.35052\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ (∃ h, a ≠ b) ↔ P ∧ a ≠ b\n[PROOFSTEP]\nrw [exists_prop]\n[GOAL]\nα : Sort u_3\nβ : Sort u_4\nσ : α → Sort u_1\nf✝ : α → β\nP✝ Q : Prop\ninst✝² : Decidable P✝\ninst✝¹ : Decidable Q\na✝ b✝ c✝ : α\nA : P✝ → α\nB : ¬P✝ → α\nγ : Sort u_2\nf : α → β → γ\nP : Prop\ninst✝ : Decidable P\na : P → α\nb : ¬P → α\nc : P → β\nd : ¬P → β\n⊢ f (dite P a b) (dite P c d) = if h : P then f (a h) (c h) else f (b h) (d h)\n[PROOFSTEP]\nby_cases h : P\n[GOAL]\ncase pos\nα : Sort u_3\nβ : Sort u_4\nσ : α → Sort u_1\nf✝ : α → β\nP✝ Q : Prop\ninst✝² : Decidable P✝\ninst✝¹ : Decidable Q\na✝ b✝ c✝ : α\nA : P✝ → α\nB : ¬P✝ → α\nγ : Sort u_2\nf : α → β → γ\nP : Prop\ninst✝ : Decidable P\na : P → α\nb : ¬P → α\nc : P → β\nd : ¬P → β\nh : P\n⊢ f (dite P a b) (dite P c d) = if h : P then f (a h) (c h) else f (b h) (d h)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Sort u_3\nβ : Sort u_4\nσ : α → Sort u_1\nf✝ : α → β\nP✝ Q : Prop\ninst✝² : Decidable P✝\ninst✝¹ : Decidable Q\na✝ b✝ c✝ : α\nA : P✝ → α\nB : ¬P✝ → α\nγ : Sort u_2\nf : α → β → γ\nP : Prop\ninst✝ : Decidable P\na : P → α\nb : ¬P → α\nc : P → β\nd : ¬P → β\nh : ¬P\n⊢ f (dite P a b) (dite P c d) = if h : P then f (a h) (c h) else f (b h) (d h)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.37772\nσ : α → Sort u_1\nf✝ : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na✝ b c : α\nA : P → α\nB : ¬P → α\nf : P → (a : α) → σ a\ng : ¬P → (a : α) → σ a\na : α\n⊢ dite P f g a = if h : P then f h a else g h a\n[PROOFSTEP]\nby_cases h : P\n[GOAL]\ncase pos\nα : Sort u_2\nβ : Sort ?u.37772\nσ : α → Sort u_1\nf✝ : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na✝ b c : α\nA : P → α\nB : ¬P → α\nf : P → (a : α) → σ a\ng : ¬P → (a : α) → σ a\na : α\nh : P\n⊢ dite P f g a = if h : P then f h a else g h a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Sort u_2\nβ : Sort ?u.37772\nσ : α → Sort u_1\nf✝ : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na✝ b c : α\nA : P → α\nB : ¬P → α\nf : P → (a : α) → σ a\ng : ¬P → (a : α) → σ a\na : α\nh : ¬P\n⊢ dite P f g a = if h : P then f h a else g h a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.38314\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\n⊢ (if P ∧ Q then a else b) = if P then if Q then a else b else b\n[PROOFSTEP]\nby_cases hp : P\n[GOAL]\ncase pos\nα : Sort u_2\nβ : Sort ?u.38314\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nhp : P\n⊢ (if P ∧ Q then a else b) = if P then if Q then a else b else b\n[PROOFSTEP]\nby_cases hq : Q\n[GOAL]\ncase neg\nα : Sort u_2\nβ : Sort ?u.38314\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nhp : ¬P\n⊢ (if P ∧ Q then a else b) = if P then if Q then a else b else b\n[PROOFSTEP]\nby_cases hq : Q\n[GOAL]\ncase pos\nα : Sort u_2\nβ : Sort ?u.38314\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nhp : P\nhq : Q\n⊢ (if P ∧ Q then a else b) = if P then if Q then a else b else b\n[PROOFSTEP]\nsimp [hp, hq]\n[GOAL]\ncase neg\nα : Sort u_2\nβ : Sort ?u.38314\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nhp : P\nhq : ¬Q\n⊢ (if P ∧ Q then a else b) = if P then if Q then a else b else b\n[PROOFSTEP]\nsimp [hp, hq]\n[GOAL]\ncase pos\nα : Sort u_2\nβ : Sort ?u.38314\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nhp : ¬P\nhq : Q\n⊢ (if P ∧ Q then a else b) = if P then if Q then a else b else b\n[PROOFSTEP]\nsimp [hp, hq]\n[GOAL]\ncase neg\nα : Sort u_2\nβ : Sort ?u.38314\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB : ¬P → α\nhp : ¬P\nhq : ¬Q\n⊢ (if P ∧ Q then a else b) = if P then if Q then a else b else b\n[PROOFSTEP]\nsimp [hp, hq]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.39011\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB✝ : ¬P → α\nB : Q → α\nC : ¬P → ¬Q → α\nh : P → ¬Q\np : P\n⊢ A p = if q : Q then B q else if p : P then A p else C p q\n[PROOFSTEP]\nrw [dif_neg (h p), dif_pos p]\n[GOAL]\nα : Sort u_2\nβ : Sort ?u.39011\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB✝ : ¬P → α\nB : Q → α\nC : ¬P → ¬Q → α\nh : P → ¬Q\nnp : ¬P\n⊢ (if q : Q then B q else C np q) = if q : Q then B q else if p : P then A p else C p q\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_e\nα : Sort u_2\nβ : Sort ?u.39011\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB✝ : ¬P → α\nB : Q → α\nC : ¬P → ¬Q → α\nh : P → ¬Q\nnp : ¬P\n⊢ (fun q => C np q) = fun q => if p : P then A p else C p q\n[PROOFSTEP]\nfunext _\n[GOAL]\ncase e_e.h\nα : Sort u_2\nβ : Sort ?u.39011\nσ : α → Sort u_1\nf : α → β\nP Q : Prop\ninst✝¹ : Decidable P\ninst✝ : Decidable Q\na b c : α\nA : P → α\nB✝ : ¬P → α\nB : Q → α\nC : ¬P → ¬Q → α\nh : P → ¬Q\nnp : ¬P\nx✝ : ¬Q\n⊢ C np x✝ = if p : P then A p else C p x✝\n[PROOFSTEP]\nrw [dif_neg np]\n", "meta": {"mathlib_filename": "Mathlib.Logic.Basic", "llama_tokens": 13117, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5926665999540698, "lm_q2_score": 0.6076631698328916, "lm_q1q2_score": 0.36014166478217235}}
{"text": "[GOAL]\nf : Type u → Type v\ninst✝¹ : Functor f\ninst✝ : LawfulFunctor f\nα β : Type u\nh : α ≃ β\nx : f α\n⊢ ↑h.symm <$> ↑h <$> x = x\n[PROOFSTEP]\nsimp [map_map]\n[GOAL]\nf : Type u → Type v\ninst✝¹ : Functor f\ninst✝ : LawfulFunctor f\nα β : Type u\nh : α ≃ β\nx : f β\n⊢ ↑h <$> ↑h.symm <$> x = x\n[PROOFSTEP]\nsimp [map_map]\n", "meta": {"mathlib_filename": "Mathlib.Data.Equiv.Functor", "llama_tokens": 177, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.7090191337850933, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.3600483281370349}}
{"text": "[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : Subsingleton A\na : A\n⊢ spectralRadius 𝕜 a = 0\n[PROOFSTEP]\nsimp [spectralRadius]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra 𝕜 A\n⊢ spectralRadius 𝕜 0 = 0\n[PROOFSTEP]\nnontriviality A\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra 𝕜 A\n✝ : Nontrivial A\n⊢ spectralRadius 𝕜 0 = 0\n[PROOFSTEP]\nsimp [spectralRadius]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nh : ‖a‖ * ‖1‖ < ‖k‖\n⊢ k ∈ ρ a\n[PROOFSTEP]\nrw [resolventSet, Set.mem_setOf_eq, Algebra.algebraMap_eq_smul_one]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nh : ‖a‖ * ‖1‖ < ‖k‖\n⊢ IsUnit (k • 1 - a)\n[PROOFSTEP]\nnontriviality A\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nh : ‖a‖ * ‖1‖ < ‖k‖\n✝ : Nontrivial A\n⊢ IsUnit (k • 1 - a)\n[PROOFSTEP]\nhave hk : k ≠ 0 := ne_zero_of_norm_ne_zero ((mul_nonneg (norm_nonneg _) (norm_nonneg _)).trans_lt h).ne'\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nh : ‖a‖ * ‖1‖ < ‖k‖\n✝ : Nontrivial A\nhk : k ≠ 0\n⊢ IsUnit (k • 1 - a)\n[PROOFSTEP]\nletI ku := Units.map ↑ₐ.toMonoidHom (Units.mk0 k hk)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nh : ‖a‖ * ‖1‖ < ‖k‖\n✝ : Nontrivial A\nhk : k ≠ 0\nku : (fun x => Aˣ) (Units.mk0 k hk) := ↑(Units.map ↑↑ₐ) (Units.mk0 k hk)\n⊢ IsUnit (k • 1 - a)\n[PROOFSTEP]\nrw [← inv_inv ‖(1 : A)‖, mul_inv_lt_iff (inv_pos.2 <| norm_pos_iff.2 (one_ne_zero : (1 : A) ≠ 0))] at h \n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nh : ‖a‖ < ‖1‖⁻¹ * ‖k‖\n✝ : Nontrivial A\nhk : k ≠ 0\nku : Aˣ := ↑(Units.map ↑↑ₐ) (Units.mk0 k hk)\n⊢ IsUnit (k • 1 - a)\n[PROOFSTEP]\nhave hku : ‖-a‖ < ‖(↑ku⁻¹ : A)‖⁻¹ := by simpa [norm_algebraMap] using h\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nh : ‖a‖ < ‖1‖⁻¹ * ‖k‖\n✝ : Nontrivial A\nhk : k ≠ 0\nku : Aˣ := ↑(Units.map ↑↑ₐ) (Units.mk0 k hk)\n⊢ ‖-a‖ < ‖↑ku⁻¹‖⁻¹\n[PROOFSTEP]\nsimpa [norm_algebraMap] using h\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nh : ‖a‖ < ‖1‖⁻¹ * ‖k‖\n✝ : Nontrivial A\nhk : k ≠ 0\nku : Aˣ := ↑(Units.map ↑↑ₐ) (Units.mk0 k hk)\nhku : ‖-a‖ < ‖↑ku⁻¹‖⁻¹\n⊢ IsUnit (k • 1 - a)\n[PROOFSTEP]\nsimpa [sub_eq_add_neg, Algebra.algebraMap_eq_smul_one] using (ku.add (-a) hku).isUnit\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra 𝕜 A\ninst✝¹ : CompleteSpace A\ninst✝ : NormOneClass A\na : A\nk : 𝕜\nh : ‖a‖ < ‖k‖\n⊢ ‖a‖ * ‖1‖ < ‖k‖\n[PROOFSTEP]\nrwa [norm_one, mul_one]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nhk : k ∈ σ a\n⊢ k ∈ Metric.closedBall 0 (‖a‖ * ‖1‖)\n[PROOFSTEP]\nsimp [norm_le_norm_mul_of_mem hk]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra 𝕜 A\ninst✝¹ : CompleteSpace A\ninst✝ : NormOneClass A\na : A\nk : 𝕜\nhk : k ∈ σ a\n⊢ k ∈ Metric.closedBall 0 ‖a‖\n[PROOFSTEP]\nsimp [norm_le_norm_of_mem hk]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra 𝕜 A\ninst✝¹ : CompleteSpace A\ninst✝ : NormOneClass A\na : A\n⊢ spectralRadius 𝕜 a ≤ ↑‖a‖₊\n[PROOFSTEP]\nrefine' iSup₂_le fun k hk => _\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra 𝕜 A\ninst✝¹ : CompleteSpace A\ninst✝ : NormOneClass A\na : A\nk : 𝕜\nhk : k ∈ σ a\n⊢ ↑‖k‖₊ ≤ ↑‖a‖₊\n[PROOFSTEP]\nexact_mod_cast norm_le_norm_of_mem hk\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra 𝕜 A\ninst✝¹ : CompleteSpace A\ninst✝ : ProperSpace 𝕜\na : A\nha : Set.Nonempty (σ a)\n⊢ ∃ k, k ∈ σ a ∧ ↑‖k‖₊ = spectralRadius 𝕜 a\n[PROOFSTEP]\nobtain ⟨k, hk, h⟩ := (spectrum.isCompact a).exists_forall_ge ha continuous_nnnorm.continuousOn\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra 𝕜 A\ninst✝¹ : CompleteSpace A\ninst✝ : ProperSpace 𝕜\na : A\nha : Set.Nonempty (σ a)\nk : 𝕜\nhk : k ∈ σ a\nh : ∀ (y : 𝕜), y ∈ σ a → ‖y‖₊ ≤ ‖k‖₊\n⊢ ∃ k, k ∈ σ a ∧ ↑‖k‖₊ = spectralRadius 𝕜 a\n[PROOFSTEP]\nexact ⟨k, hk, le_antisymm (le_iSup₂ (α := ℝ≥0∞) k hk) (iSup₂_le <| by exact_mod_cast h)⟩\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra 𝕜 A\ninst✝¹ : CompleteSpace A\ninst✝ : ProperSpace 𝕜\na : A\nha : Set.Nonempty (σ a)\nk : 𝕜\nhk : k ∈ σ a\nh : ∀ (y : 𝕜), y ∈ σ a → ‖y‖₊ ≤ ‖k‖₊\n⊢ ∀ (i : 𝕜), i ∈ σ a → ↑‖i‖₊ ≤ ↑‖k‖₊\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra 𝕜 A\ninst✝¹ : CompleteSpace A\ninst✝ : ProperSpace 𝕜\na : A\nha : Set.Nonempty (σ a)\nr : ℝ≥0\nhr : ∀ (k : 𝕜), k ∈ σ a → ‖k‖₊ < r\n⊢ ∀ (x : 𝕜), x ∈ σ a → (ENNReal.some ∘ fun a => ‖a‖₊) x < ↑r\n[PROOFSTEP]\ndsimp only [(· ∘ ·)]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NormedField 𝕜\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra 𝕜 A\ninst✝¹ : CompleteSpace A\ninst✝ : ProperSpace 𝕜\na : A\nha : Set.Nonempty (σ a)\nr : ℝ≥0\nhr : ∀ (k : 𝕜), k ∈ σ a → ‖k‖₊ < r\n⊢ ∀ (x : 𝕜), x ∈ σ a → ↑‖x‖₊ < ↑r\n[PROOFSTEP]\nexact_mod_cast hr\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\n⊢ spectralRadius 𝕜 a ≤ ↑‖a ^ (n + 1)‖₊ ^ (1 / (↑n + 1)) * ↑‖1‖₊ ^ (1 / (↑n + 1))\n[PROOFSTEP]\nrefine'\n  iSup₂_le fun k hk =>\n    _\n      -- apply easy direction of the spectral mapping theorem for polynomials\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\n⊢ ↑‖k‖₊ ≤ ↑‖a ^ (n + 1)‖₊ ^ (1 / (↑n + 1)) * ↑‖1‖₊ ^ (1 / (↑n + 1))\n[PROOFSTEP]\nhave pow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1)) := by\n  simpa only [one_mul, Algebra.algebraMap_eq_smul_one, one_smul, aeval_monomial, one_mul, eval_monomial] using\n    subset_polynomial_aeval a (@monomial 𝕜 _ (n + 1) (1 : 𝕜))\n      ⟨k, hk, rfl⟩\n        -- power of the norm is bounded by norm of the power\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\n⊢ k ^ (n + 1) ∈ σ (a ^ (n + 1))\n[PROOFSTEP]\nsimpa only [one_mul, Algebra.algebraMap_eq_smul_one, one_smul, aeval_monomial, one_mul, eval_monomial] using\n  subset_polynomial_aeval a (@monomial 𝕜 _ (n + 1) (1 : 𝕜))\n    ⟨k, hk, rfl⟩\n      -- power of the norm is bounded by norm of the power\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\npow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1))\n⊢ ↑‖k‖₊ ≤ ↑‖a ^ (n + 1)‖₊ ^ (1 / (↑n + 1)) * ↑‖1‖₊ ^ (1 / (↑n + 1))\n[PROOFSTEP]\nhave nnnorm_pow_le : (↑(‖k‖₊ ^ (n + 1)) : ℝ≥0∞) ≤ ‖a ^ (n + 1)‖₊ * ‖(1 : A)‖₊ := by\n  simpa only [Real.toNNReal_mul (norm_nonneg _), norm_toNNReal, nnnorm_pow k (n + 1), ENNReal.coe_mul] using\n    coe_mono\n      (Real.toNNReal_mono (norm_le_norm_mul_of_mem pow_mem))\n        -- take (n + 1)ᵗʰ roots and clean up the left-hand side\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\npow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1))\n⊢ ↑(‖k‖₊ ^ (n + 1)) ≤ ↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊\n[PROOFSTEP]\nsimpa only [Real.toNNReal_mul (norm_nonneg _), norm_toNNReal, nnnorm_pow k (n + 1), ENNReal.coe_mul] using\n  coe_mono\n    (Real.toNNReal_mono (norm_le_norm_mul_of_mem pow_mem))\n      -- take (n + 1)ᵗʰ roots and clean up the left-hand side\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\npow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1))\nnnnorm_pow_le : ↑(‖k‖₊ ^ (n + 1)) ≤ ↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊\n⊢ ↑‖k‖₊ ≤ ↑‖a ^ (n + 1)‖₊ ^ (1 / (↑n + 1)) * ↑‖1‖₊ ^ (1 / (↑n + 1))\n[PROOFSTEP]\nhave hn : 0 < ((n + 1 : ℕ) : ℝ) := by exact_mod_cast Nat.succ_pos'\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\npow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1))\nnnnorm_pow_le : ↑(‖k‖₊ ^ (n + 1)) ≤ ↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊\n⊢ 0 < ↑(n + 1)\n[PROOFSTEP]\nexact_mod_cast Nat.succ_pos'\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\npow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1))\nnnnorm_pow_le : ↑(‖k‖₊ ^ (n + 1)) ≤ ↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊\nhn : 0 < ↑(n + 1)\n⊢ ↑‖k‖₊ ≤ ↑‖a ^ (n + 1)‖₊ ^ (1 / (↑n + 1)) * ↑‖1‖₊ ^ (1 / (↑n + 1))\n[PROOFSTEP]\nconvert monotone_rpow_of_nonneg (one_div_pos.mpr hn).le nnnorm_pow_le using 1\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\npow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1))\nnnnorm_pow_le : ↑(‖k‖₊ ^ (n + 1)) ≤ ↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊\nhn : 0 < ↑(n + 1)\n⊢ ↑‖k‖₊ = (fun x => x ^ (1 / ↑(n + 1))) ↑(‖k‖₊ ^ (n + 1))\ncase h.e'_4\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\npow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1))\nnnnorm_pow_le : ↑(‖k‖₊ ^ (n + 1)) ≤ ↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊\nhn : 0 < ↑(n + 1)\n⊢ ↑‖a ^ (n + 1)‖₊ ^ (1 / (↑n + 1)) * ↑‖1‖₊ ^ (1 / (↑n + 1)) = (fun x => x ^ (1 / ↑(n + 1))) (↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊)\n[PROOFSTEP]\nall_goals dsimp\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\npow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1))\nnnnorm_pow_le : ↑(‖k‖₊ ^ (n + 1)) ≤ ↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊\nhn : 0 < ↑(n + 1)\n⊢ ↑‖k‖₊ = (fun x => x ^ (1 / ↑(n + 1))) ↑(‖k‖₊ ^ (n + 1))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\npow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1))\nnnnorm_pow_le : ↑(‖k‖₊ ^ (n + 1)) ≤ ↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊\nhn : 0 < ↑(n + 1)\n⊢ ↑‖a ^ (n + 1)‖₊ ^ (1 / (↑n + 1)) * ↑‖1‖₊ ^ (1 / (↑n + 1)) = (fun x => x ^ (1 / ↑(n + 1))) (↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\npow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1))\nnnnorm_pow_le : ↑(‖k‖₊ ^ (n + 1)) ≤ ↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊\nhn : 0 < ↑(n + 1)\n⊢ ↑‖k‖₊ = ↑(‖k‖₊ ^ (n + 1)) ^ (1 / ↑(n + 1))\ncase h.e'_4\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\npow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1))\nnnnorm_pow_le : ↑(‖k‖₊ ^ (n + 1)) ≤ ↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊\nhn : 0 < ↑(n + 1)\n⊢ ↑‖a ^ (n + 1)‖₊ ^ (1 / (↑n + 1)) * ↑‖1‖₊ ^ (1 / (↑n + 1)) = (↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊) ^ (1 / ↑(n + 1))\n[PROOFSTEP]\nerw [coe_pow, ← rpow_nat_cast, ← rpow_mul, mul_one_div_cancel hn.ne', rpow_one]\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nn : ℕ\nk : 𝕜\nhk : k ∈ σ a\npow_mem : k ^ (n + 1) ∈ σ (a ^ (n + 1))\nnnnorm_pow_le : ↑(‖k‖₊ ^ (n + 1)) ≤ ↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊\nhn : 0 < ↑(n + 1)\n⊢ ↑‖a ^ (n + 1)‖₊ ^ (1 / (↑n + 1)) * ↑‖1‖₊ ^ (1 / (↑n + 1)) = (↑‖a ^ (n + 1)‖₊ * ↑‖1‖₊) ^ (1 / ↑(n + 1))\n[PROOFSTEP]\nrw [Nat.cast_succ, ENNReal.coe_mul_rpow]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\n⊢ spectralRadius 𝕜 a ≤ liminf (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) atTop\n[PROOFSTEP]\nrefine' ENNReal.le_of_forall_lt_one_mul_le fun ε hε => _\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\n⊢ ε * spectralRadius 𝕜 a ≤ liminf (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) atTop\n[PROOFSTEP]\nby_cases ε = 0\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\n⊢ ε * spectralRadius 𝕜 a ≤ liminf (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) atTop\n[PROOFSTEP]\nby_cases ε = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\nh : ε = 0\n⊢ ε * spectralRadius 𝕜 a ≤ liminf (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) atTop\n[PROOFSTEP]\nsimp only [h, zero_mul, zero_le']\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\nh : ¬ε = 0\n⊢ ε * spectralRadius 𝕜 a ≤ liminf (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) atTop\n[PROOFSTEP]\nhave hε' : ε⁻¹ ≠ ∞ := fun h' => h (by simpa only [inv_inv, inv_top] using congr_arg (fun x : ℝ≥0∞ => x⁻¹) h')\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\nh : ¬ε = 0\nh' : ε⁻¹ = ⊤\n⊢ ε = 0\n[PROOFSTEP]\nsimpa only [inv_inv, inv_top] using congr_arg (fun x : ℝ≥0∞ => x⁻¹) h'\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\n⊢ ε * spectralRadius 𝕜 a ≤ liminf (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) atTop\n[PROOFSTEP]\nsimp only [ENNReal.mul_le_iff_le_inv h (hε.trans_le le_top).ne, mul_comm ε⁻¹, liminf_eq_iSup_iInf_of_nat',\n  ENNReal.iSup_mul]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\n⊢ spectralRadius 𝕜 a ≤ ⨆ (i : ℕ), (⨅ (i_1 : ℕ), ↑‖a ^ (i_1 + i)‖₊ ^ (1 / ↑(i_1 + i))) * ε⁻¹\n[PROOFSTEP]\nconv_rhs => arg 1; intro i; rw [ENNReal.iInf_mul hε']\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\n| ⨆ (i : ℕ), (⨅ (i_1 : ℕ), ↑‖a ^ (i_1 + i)‖₊ ^ (1 / ↑(i_1 + i))) * ε⁻¹\n[PROOFSTEP]\narg 1; intro i; rw [ENNReal.iInf_mul hε']\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\n| ⨆ (i : ℕ), (⨅ (i_1 : ℕ), ↑‖a ^ (i_1 + i)‖₊ ^ (1 / ↑(i_1 + i))) * ε⁻¹\n[PROOFSTEP]\narg 1; intro i; rw [ENNReal.iInf_mul hε']\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\n| ⨆ (i : ℕ), (⨅ (i_1 : ℕ), ↑‖a ^ (i_1 + i)‖₊ ^ (1 / ↑(i_1 + i))) * ε⁻¹\n[PROOFSTEP]\narg 1\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\n| fun i => (⨅ (i_1 : ℕ), ↑‖a ^ (i_1 + i)‖₊ ^ (1 / ↑(i_1 + i))) * ε⁻¹\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\ni : ℕ\n| (⨅ (i_1 : ℕ), ↑‖a ^ (i_1 + i)‖₊ ^ (1 / ↑(i_1 + i))) * ε⁻¹\n[PROOFSTEP]\nrw [ENNReal.iInf_mul hε']\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : ε < 1\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\n⊢ spectralRadius 𝕜 a ≤ ⨆ (i : ℕ), ⨅ (i_1 : ℕ), ↑‖a ^ (i_1 + i)‖₊ ^ (1 / ↑(i_1 + i)) * ε⁻¹\n[PROOFSTEP]\nrw [← ENNReal.inv_lt_inv, inv_one] at hε \n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : 1 < ε⁻¹\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\n⊢ spectralRadius 𝕜 a ≤ ⨆ (i : ℕ), ⨅ (i_1 : ℕ), ↑‖a ^ (i_1 + i)‖₊ ^ (1 / ↑(i_1 + i)) * ε⁻¹\n[PROOFSTEP]\nobtain ⟨N, hN⟩ := eventually_atTop.mp (ENNReal.eventually_pow_one_div_le (ENNReal.coe_ne_top : ↑‖(1 : A)‖₊ ≠ ∞) hε)\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : 1 < ε⁻¹\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ↑‖1‖₊ ^ (1 / ↑b) ≤ ε⁻¹\n⊢ spectralRadius 𝕜 a ≤ ⨆ (i : ℕ), ⨅ (i_1 : ℕ), ↑‖a ^ (i_1 + i)‖₊ ^ (1 / ↑(i_1 + i)) * ε⁻¹\n[PROOFSTEP]\nrefine' le_trans _ (le_iSup _ (N + 1))\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : 1 < ε⁻¹\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ↑‖1‖₊ ^ (1 / ↑b) ≤ ε⁻¹\n⊢ spectralRadius 𝕜 a ≤ ⨅ (i : ℕ), ↑‖a ^ (i + (N + 1))‖₊ ^ (1 / ↑(i + (N + 1))) * ε⁻¹\n[PROOFSTEP]\nrefine' le_iInf fun n => _\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : 1 < ε⁻¹\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ↑‖1‖₊ ^ (1 / ↑b) ≤ ε⁻¹\nn : ℕ\n⊢ spectralRadius 𝕜 a ≤ ↑‖a ^ (n + (N + 1))‖₊ ^ (1 / ↑(n + (N + 1))) * ε⁻¹\n[PROOFSTEP]\nsimp only [← add_assoc]\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : 1 < ε⁻¹\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ↑‖1‖₊ ^ (1 / ↑b) ≤ ε⁻¹\nn : ℕ\n⊢ spectralRadius 𝕜 a ≤ ↑‖a ^ (n + N + 1)‖₊ ^ (1 / ↑(n + N + 1)) * ε⁻¹\n[PROOFSTEP]\nrefine' (spectralRadius_le_pow_nnnorm_pow_one_div 𝕜 a (n + N)).trans _\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : 1 < ε⁻¹\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ↑‖1‖₊ ^ (1 / ↑b) ≤ ε⁻¹\nn : ℕ\n⊢ ↑‖a ^ (n + N + 1)‖₊ ^ (1 / (↑(n + N) + 1)) * ↑‖1‖₊ ^ (1 / (↑(n + N) + 1)) ≤\n    ↑‖a ^ (n + N + 1)‖₊ ^ (1 / ↑(n + N + 1)) * ε⁻¹\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : 1 < ε⁻¹\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ↑‖1‖₊ ^ (1 / ↑b) ≤ ε⁻¹\nn : ℕ\n⊢ ↑‖a ^ (n + N + 1)‖₊ ^ (1 / ↑(n + N + 1)) * ↑‖1‖₊ ^ (1 / ↑(n + N + 1)) ≤ ↑‖a ^ (n + N + 1)‖₊ ^ (1 / ↑(n + N + 1)) * ε⁻¹\n[PROOFSTEP]\nexact mul_le_mul_left' (hN (n + N + 1) (by linarith)) _\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nε : ℝ≥0∞\nhε : 1 < ε⁻¹\nh : ¬ε = 0\nhε' : ε⁻¹ ≠ ⊤\nN : ℕ\nhN : ∀ (b : ℕ), b ≥ N → ↑‖1‖₊ ^ (1 / ↑b) ≤ ε⁻¹\nn : ℕ\n⊢ n + N + 1 ≥ N\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nhk : k ∈ ρ a\n⊢ HasDerivAt (resolvent a) (-resolvent a k ^ 2) k\n[PROOFSTEP]\nhave H₁ : HasFDerivAt Ring.inverse _ (↑ₐ k - a) := hasFDerivAt_ring_inverse (𝕜 := 𝕜) hk.unit\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nhk : k ∈ ρ a\nH₁ :\n  HasFDerivAt Ring.inverse\n    (-↑(↑(ContinuousLinearMap.mulLeftRight 𝕜 ((fun x => A) k)) ↑(IsUnit.unit hk)⁻¹) ↑(IsUnit.unit hk)⁻¹) (↑↑ₐ k - a)\n⊢ HasDerivAt (resolvent a) (-resolvent a k ^ 2) k\n[PROOFSTEP]\nhave H₂ : HasDerivAt (fun k => ↑ₐ k - a) 1 k := by simpa using (Algebra.linearMap 𝕜 A).hasDerivAt.sub_const a\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nhk : k ∈ ρ a\nH₁ :\n  HasFDerivAt Ring.inverse\n    (-↑(↑(ContinuousLinearMap.mulLeftRight 𝕜 ((fun x => A) k)) ↑(IsUnit.unit hk)⁻¹) ↑(IsUnit.unit hk)⁻¹) (↑↑ₐ k - a)\n⊢ HasDerivAt (fun k => ↑↑ₐ k - a) 1 k\n[PROOFSTEP]\nsimpa using (Algebra.linearMap 𝕜 A).hasDerivAt.sub_const a\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nk : 𝕜\nhk : k ∈ ρ a\nH₁ :\n  HasFDerivAt Ring.inverse\n    (-↑(↑(ContinuousLinearMap.mulLeftRight 𝕜 ((fun x => A) k)) ↑(IsUnit.unit hk)⁻¹) ↑(IsUnit.unit hk)⁻¹) (↑↑ₐ k - a)\nH₂ : HasDerivAt (fun k => ↑↑ₐ k - a) 1 k\n⊢ HasDerivAt (resolvent a) (-resolvent a k ^ 2) k\n[PROOFSTEP]\nsimpa [resolvent, sq, hk.unit_spec, ← Ring.inverse_unit hk.unit] using H₁.comp_hasDerivAt k H₂\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\n⊢ ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : 𝕜), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\n[PROOFSTEP]\nobtain ⟨c, c_pos, hc⟩ := (@NormedRing.inverse_one_sub_norm A _ _).exists_pos\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nhc : IsBigOWith c (nhds 0) (fun t => Ring.inverse (1 - t)) fun _t => 1\n⊢ ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : 𝕜), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\n[PROOFSTEP]\nrw [isBigOWith_iff, eventually_iff, Metric.mem_nhds_iff] at hc \n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nhc : ∃ ε, ε > 0 ∧ Metric.ball 0 ε ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c * ‖1‖}\n⊢ ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : 𝕜), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\n[PROOFSTEP]\nrcases hc with ⟨δ, δ_pos, hδ⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c * ‖1‖}\n⊢ ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : 𝕜), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\n[PROOFSTEP]\nsimp only [CstarRing.norm_one, mul_one] at hδ \n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\n⊢ ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : 𝕜), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\n[PROOFSTEP]\nintro ε hε\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\n⊢ ∃ R, R > 0 ∧ ∀ (z : 𝕜), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\n[PROOFSTEP]\nhave ha₁ : 0 < ‖a‖ + 1 := lt_of_le_of_lt (norm_nonneg a) (lt_add_one _)\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\n⊢ ∃ R, R > 0 ∧ ∀ (z : 𝕜), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\n[PROOFSTEP]\nhave min_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹) :=\n  lt_min (mul_pos δ_pos (inv_pos.mpr ha₁)) (mul_pos hε (inv_pos.mpr c_pos))\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\n⊢ ∃ R, R > 0 ∧ ∀ (z : 𝕜), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\n[PROOFSTEP]\nrefine' ⟨(min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹))⁻¹, inv_pos.mpr min_pos, fun z hz => _⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜\nhz : (min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹))⁻¹ ≤ ‖z‖\n⊢ ‖resolvent a z‖ ≤ ε\n[PROOFSTEP]\nhave hnz : z ≠ 0 := norm_pos_iff.mp (lt_of_lt_of_le (inv_pos.mpr min_pos) hz)\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜\nhz : (min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹))⁻¹ ≤ ‖z‖\nhnz : z ≠ 0\n⊢ ‖resolvent a z‖ ≤ ε\n[PROOFSTEP]\nreplace hz := inv_le_of_inv_le min_pos hz\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜\nhnz : z ≠ 0\nhz : ‖z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\n⊢ ‖resolvent a z‖ ≤ ε\n[PROOFSTEP]\nrcases(⟨Units.mk0 z hnz, Units.val_mk0 hnz⟩ : IsUnit z) with ⟨z, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜ˣ\nhnz : ↑z ≠ 0\nhz : ‖↑z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\n⊢ ‖resolvent a ↑z‖ ≤ ε\n[PROOFSTEP]\nhave lt_δ : ‖z⁻¹ • a‖ < δ :=\n  by\n  rw [Units.smul_def, norm_smul, Units.val_inv_eq_inv_val, norm_inv]\n  calc\n    ‖(z : 𝕜)‖⁻¹ * ‖a‖ ≤ δ * (‖a‖ + 1)⁻¹ * ‖a‖ := mul_le_mul_of_nonneg_right (hz.trans (min_le_left _ _)) (norm_nonneg _)\n    _ < δ := by\n      conv => rw [mul_assoc]; rhs; rw [(mul_one δ).symm]\n      exact mul_lt_mul_of_pos_left ((inv_mul_lt_iff ha₁).mpr ((mul_one (‖a‖ + 1)).symm ▸ lt_add_one _)) δ_pos\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜ˣ\nhnz : ↑z ≠ 0\nhz : ‖↑z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\n⊢ ‖z⁻¹ • a‖ < δ\n[PROOFSTEP]\nrw [Units.smul_def, norm_smul, Units.val_inv_eq_inv_val, norm_inv]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜ˣ\nhnz : ↑z ≠ 0\nhz : ‖↑z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\n⊢ ‖↑z‖⁻¹ * ‖a‖ < δ\n[PROOFSTEP]\ncalc\n  ‖(z : 𝕜)‖⁻¹ * ‖a‖ ≤ δ * (‖a‖ + 1)⁻¹ * ‖a‖ := mul_le_mul_of_nonneg_right (hz.trans (min_le_left _ _)) (norm_nonneg _)\n  _ < δ := by\n    conv => rw [mul_assoc]; rhs; rw [(mul_one δ).symm]\n    exact mul_lt_mul_of_pos_left ((inv_mul_lt_iff ha₁).mpr ((mul_one (‖a‖ + 1)).symm ▸ lt_add_one _)) δ_pos\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜ˣ\nhnz : ↑z ≠ 0\nhz : ‖↑z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\n⊢ δ * (‖a‖ + 1)⁻¹ * ‖a‖ < δ\n[PROOFSTEP]\nconv => rw [mul_assoc]; rhs; rw [(mul_one δ).symm]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜ˣ\nhnz : ↑z ≠ 0\nhz : ‖↑z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\n| δ * (‖a‖ + 1)⁻¹ * ‖a‖ < δ\n[PROOFSTEP]\nrw [mul_assoc]; rhs; rw [(mul_one δ).symm]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜ˣ\nhnz : ↑z ≠ 0\nhz : ‖↑z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\n| δ * (‖a‖ + 1)⁻¹ * ‖a‖ < δ\n[PROOFSTEP]\nrw [mul_assoc]; rhs; rw [(mul_one δ).symm]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜ˣ\nhnz : ↑z ≠ 0\nhz : ‖↑z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\n| δ * (‖a‖ + 1)⁻¹ * ‖a‖ < δ\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜ˣ\nhnz : ↑z ≠ 0\nhz : ‖↑z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\n| δ * ((‖a‖ + 1)⁻¹ * ‖a‖) < δ\n[PROOFSTEP]\nrhs\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜ˣ\nhnz : ↑z ≠ 0\nhz : ‖↑z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\n| δ\n[PROOFSTEP]\nrw [(mul_one δ).symm]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜ˣ\nhnz : ↑z ≠ 0\nhz : ‖↑z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\n⊢ δ * ((‖a‖ + 1)⁻¹ * ‖a‖) < δ * 1\n[PROOFSTEP]\nexact mul_lt_mul_of_pos_left ((inv_mul_lt_iff ha₁).mpr ((mul_one (‖a‖ + 1)).symm ▸ lt_add_one _)) δ_pos\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜ˣ\nhnz : ↑z ≠ 0\nhz : ‖↑z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nlt_δ : ‖z⁻¹ • a‖ < δ\n⊢ ‖resolvent a ↑z‖ ≤ ε\n[PROOFSTEP]\nrw [← inv_smul_smul z (resolvent a (z : 𝕜)), units_smul_resolvent_self, resolvent, Algebra.algebraMap_eq_smul_one,\n  one_smul, Units.smul_def, norm_smul, Units.val_inv_eq_inv_val, norm_inv]\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nc : ℝ\nc_pos : 0 < c\nδ : ℝ\nδ_pos : δ > 0\nhδ : Metric.ball 0 δ ⊆ {x | ‖Ring.inverse (1 - x)‖ ≤ c}\nε : ℝ\nhε : ε > 0\nha₁ : 0 < ‖a‖ + 1\nmin_pos : 0 < min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nz : 𝕜ˣ\nhnz : ↑z ≠ 0\nhz : ‖↑z‖⁻¹ ≤ min (δ * (‖a‖ + 1)⁻¹) (ε * c⁻¹)\nlt_δ : ‖z⁻¹ • a‖ < δ\n⊢ ‖↑z‖⁻¹ * ‖Ring.inverse (1 - z⁻¹ • a)‖ ≤ ε\n[PROOFSTEP]\ncalc\n  _ ≤ ε * c⁻¹ * c :=\n    mul_le_mul (hz.trans (min_le_right _ _)) (hδ (mem_ball_zero_iff.mpr lt_δ)) (norm_nonneg _)\n      (mul_pos hε (inv_pos.mpr c_pos)).le\n  _ = _ := inv_mul_cancel_right₀ c_pos.ne.symm ε\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\n⊢ (↑‖a‖₊)⁻¹ ≤ radius fun n => ContinuousMultilinearMap.mkPiField 𝕜 (Fin n) (a ^ n)\n[PROOFSTEP]\nrefine' le_of_forall_nnreal_lt fun r hr => le_radius_of_bound_nnreal _ (max 1 ‖(1 : A)‖₊) fun n => _\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (↑‖a‖₊)⁻¹\nn : ℕ\n⊢ ‖ContinuousMultilinearMap.mkPiField 𝕜 (Fin n) (a ^ n)‖₊ * r ^ n ≤ max 1 ‖1‖₊\n[PROOFSTEP]\nrw [← norm_toNNReal, norm_mkPiField, norm_toNNReal]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (↑‖a‖₊)⁻¹\nn : ℕ\n⊢ ‖a ^ n‖₊ * r ^ n ≤ max 1 ‖1‖₊\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (↑‖a‖₊)⁻¹\n⊢ ‖a ^ Nat.zero‖₊ * r ^ Nat.zero ≤ max 1 ‖1‖₊\n[PROOFSTEP]\nsimp only [Nat.zero_eq, le_refl, mul_one, or_true_iff, le_max_iff, pow_zero]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (↑‖a‖₊)⁻¹\nn : ℕ\n⊢ ‖a ^ Nat.succ n‖₊ * r ^ Nat.succ n ≤ max 1 ‖1‖₊\n[PROOFSTEP]\nrefine' le_trans (le_trans (mul_le_mul_right' (nnnorm_pow_le' a n.succ_pos) (r ^ n.succ)) _) (le_max_left _ _)\n[GOAL]\ncase succ\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (↑‖a‖₊)⁻¹\nn : ℕ\n⊢ ‖a‖₊ ^ Nat.succ n * r ^ Nat.succ n ≤ 1\n[PROOFSTEP]\nby_cases ‖a‖₊ = 0\n[GOAL]\ncase succ\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (↑‖a‖₊)⁻¹\nn : ℕ\n⊢ ‖a‖₊ ^ Nat.succ n * r ^ Nat.succ n ≤ 1\n[PROOFSTEP]\nby_cases ‖a‖₊ = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (↑‖a‖₊)⁻¹\nn : ℕ\nh : ‖a‖₊ = 0\n⊢ ‖a‖₊ ^ Nat.succ n * r ^ Nat.succ n ≤ 1\n[PROOFSTEP]\nsimp only [h, zero_mul, zero_le', pow_succ]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (↑‖a‖₊)⁻¹\nn : ℕ\nh : ¬‖a‖₊ = 0\n⊢ ‖a‖₊ ^ Nat.succ n * r ^ Nat.succ n ≤ 1\n[PROOFSTEP]\nrw [← coe_inv h, coe_lt_coe, NNReal.lt_inv_iff_mul_lt h] at hr \n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : r * ‖a‖₊ < 1\nn : ℕ\nh : ¬‖a‖₊ = 0\n⊢ ‖a‖₊ ^ Nat.succ n * r ^ Nat.succ n ≤ 1\n[PROOFSTEP]\nsimpa only [← mul_pow, mul_comm] using pow_le_one' hr.le n.succ\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\ny : 𝕜\nhy : y ∈ EMetric.ball 0 (↑‖a‖₊)⁻¹\n⊢ HasSum (fun n => ↑(ContinuousMultilinearMap.mkPiField 𝕜 (Fin n) (a ^ n)) fun x => y) (Ring.inverse (1 - (0 + y) • a))\n[PROOFSTEP]\nhave norm_lt : ‖y • a‖ < 1 := by\n  by_cases h : ‖a‖₊ = 0\n  · simp only [nnnorm_eq_zero.mp h, norm_zero, zero_lt_one, smul_zero]\n  · have nnnorm_lt : ‖y‖₊ < ‖a‖₊⁻¹ := by\n      simpa only [← coe_inv h, mem_ball_zero_iff, Metric.emetric_ball_nnreal] using hy\n    rwa [← coe_nnnorm, ← Real.lt_toNNReal_iff_coe_lt, Real.toNNReal_one, nnnorm_smul, ← NNReal.lt_inv_iff_mul_lt h]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\ny : 𝕜\nhy : y ∈ EMetric.ball 0 (↑‖a‖₊)⁻¹\n⊢ ‖y • a‖ < 1\n[PROOFSTEP]\nby_cases h : ‖a‖₊ = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\ny : 𝕜\nhy : y ∈ EMetric.ball 0 (↑‖a‖₊)⁻¹\nh : ‖a‖₊ = 0\n⊢ ‖y • a‖ < 1\n[PROOFSTEP]\nsimp only [nnnorm_eq_zero.mp h, norm_zero, zero_lt_one, smul_zero]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\ny : 𝕜\nhy : y ∈ EMetric.ball 0 (↑‖a‖₊)⁻¹\nh : ¬‖a‖₊ = 0\n⊢ ‖y • a‖ < 1\n[PROOFSTEP]\nhave nnnorm_lt : ‖y‖₊ < ‖a‖₊⁻¹ := by simpa only [← coe_inv h, mem_ball_zero_iff, Metric.emetric_ball_nnreal] using hy\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\ny : 𝕜\nhy : y ∈ EMetric.ball 0 (↑‖a‖₊)⁻¹\nh : ¬‖a‖₊ = 0\n⊢ ‖y‖₊ < ‖a‖₊⁻¹\n[PROOFSTEP]\nsimpa only [← coe_inv h, mem_ball_zero_iff, Metric.emetric_ball_nnreal] using hy\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\ny : 𝕜\nhy : y ∈ EMetric.ball 0 (↑‖a‖₊)⁻¹\nh : ¬‖a‖₊ = 0\nnnnorm_lt : ‖y‖₊ < ‖a‖₊⁻¹\n⊢ ‖y • a‖ < 1\n[PROOFSTEP]\nrwa [← coe_nnnorm, ← Real.lt_toNNReal_iff_coe_lt, Real.toNNReal_one, nnnorm_smul, ← NNReal.lt_inv_iff_mul_lt h]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\ny : 𝕜\nhy : y ∈ EMetric.ball 0 (↑‖a‖₊)⁻¹\nnorm_lt : ‖y • a‖ < 1\n⊢ HasSum (fun n => ↑(ContinuousMultilinearMap.mkPiField 𝕜 (Fin n) (a ^ n)) fun x => y) (Ring.inverse (1 - (0 + y) • a))\n[PROOFSTEP]\nsimpa [← smul_pow, (NormedRing.summable_geometric_of_norm_lt_1 _ norm_lt).hasSum_iff] using\n  (NormedRing.inverse_one_sub _ norm_lt).symm\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra 𝕜 A\na : A\nz : 𝕜\nh : ↑‖z‖₊ < (spectralRadius 𝕜 a)⁻¹\n⊢ IsUnit (1 - z • a)\n[PROOFSTEP]\nby_cases hz : z = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra 𝕜 A\na : A\nz : 𝕜\nh : ↑‖z‖₊ < (spectralRadius 𝕜 a)⁻¹\nhz : z = 0\n⊢ IsUnit (1 - z • a)\n[PROOFSTEP]\nsimp only [hz, isUnit_one, sub_zero, zero_smul]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra 𝕜 A\na : A\nz : 𝕜\nh : ↑‖z‖₊ < (spectralRadius 𝕜 a)⁻¹\nhz : ¬z = 0\n⊢ IsUnit (1 - z • a)\n[PROOFSTEP]\nlet u := Units.mk0 z hz\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra 𝕜 A\na : A\nz : 𝕜\nh : ↑‖z‖₊ < (spectralRadius 𝕜 a)⁻¹\nhz : ¬z = 0\nu : 𝕜ˣ := Units.mk0 z hz\n⊢ IsUnit (1 - z • a)\n[PROOFSTEP]\nsuffices hu : IsUnit (u⁻¹ • (1 : A) - a)\n[GOAL]\ncase neg\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra 𝕜 A\na : A\nz : 𝕜\nh : ↑‖z‖₊ < (spectralRadius 𝕜 a)⁻¹\nhz : ¬z = 0\nu : 𝕜ˣ := Units.mk0 z hz\nhu : IsUnit (u⁻¹ • 1 - a)\n⊢ IsUnit (1 - z • a)\n[PROOFSTEP]\nrwa [IsUnit.smul_sub_iff_sub_inv_smul, inv_inv u] at hu \n[GOAL]\ncase hu\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra 𝕜 A\na : A\nz : 𝕜\nh : ↑‖z‖₊ < (spectralRadius 𝕜 a)⁻¹\nhz : ¬z = 0\nu : 𝕜ˣ := Units.mk0 z hz\n⊢ IsUnit (u⁻¹ • 1 - a)\n[PROOFSTEP]\nrw [Units.smul_def, ← Algebra.algebraMap_eq_smul_one, ← mem_resolventSet_iff]\n[GOAL]\ncase hu\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra 𝕜 A\na : A\nz : 𝕜\nh : ↑‖z‖₊ < (spectralRadius 𝕜 a)⁻¹\nhz : ¬z = 0\nu : 𝕜ˣ := Units.mk0 z hz\n⊢ ↑u⁻¹ ∈ resolventSet 𝕜 a\n[PROOFSTEP]\nrefine' mem_resolventSet_of_spectralRadius_lt _\n[GOAL]\ncase hu\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NontriviallyNormedField 𝕜\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra 𝕜 A\na : A\nz : 𝕜\nh : ↑‖z‖₊ < (spectralRadius 𝕜 a)⁻¹\nhz : ¬z = 0\nu : 𝕜ˣ := Units.mk0 z hz\n⊢ spectralRadius 𝕜 a < ↑‖↑u⁻¹‖₊\n[PROOFSTEP]\nrwa [Units.val_inv_eq_inv_val, nnnorm_inv, coe_inv (nnnorm_ne_zero_iff.mpr (Units.val_mk0 hz ▸ hz : (u : 𝕜) ≠ 0)),\n  lt_inv_iff_lt_inv]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (spectralRadius 𝕜 a)⁻¹\n⊢ DifferentiableOn 𝕜 (fun z => Ring.inverse (1 - z • a)) (Metric.closedBall 0 ↑r)\n[PROOFSTEP]\nintro z z_mem\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (spectralRadius 𝕜 a)⁻¹\nz : 𝕜\nz_mem : z ∈ Metric.closedBall 0 ↑r\n⊢ DifferentiableWithinAt 𝕜 (fun z => Ring.inverse (1 - z • a)) (Metric.closedBall 0 ↑r) z\n[PROOFSTEP]\napply DifferentiableAt.differentiableWithinAt\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (spectralRadius 𝕜 a)⁻¹\nz : 𝕜\nz_mem : z ∈ Metric.closedBall 0 ↑r\n⊢ DifferentiableAt 𝕜 (fun z => Ring.inverse (1 - z • a)) z\n[PROOFSTEP]\nhave hu : IsUnit (1 - z • a) :=\n  by\n  refine' isUnit_one_sub_smul_of_lt_inv_radius (lt_of_le_of_lt (coe_mono _) hr)\n  simpa only [norm_toNNReal, Real.toNNReal_coe] using Real.toNNReal_mono (mem_closedBall_zero_iff.mp z_mem)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (spectralRadius 𝕜 a)⁻¹\nz : 𝕜\nz_mem : z ∈ Metric.closedBall 0 ↑r\n⊢ IsUnit (1 - z • a)\n[PROOFSTEP]\nrefine' isUnit_one_sub_smul_of_lt_inv_radius (lt_of_le_of_lt (coe_mono _) hr)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (spectralRadius 𝕜 a)⁻¹\nz : 𝕜\nz_mem : z ∈ Metric.closedBall 0 ↑r\n⊢ ‖z‖₊ ≤ r\n[PROOFSTEP]\nsimpa only [norm_toNNReal, Real.toNNReal_coe] using Real.toNNReal_mono (mem_closedBall_zero_iff.mp z_mem)\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (spectralRadius 𝕜 a)⁻¹\nz : 𝕜\nz_mem : z ∈ Metric.closedBall 0 ↑r\nhu : IsUnit (1 - z • a)\n⊢ DifferentiableAt 𝕜 (fun z => Ring.inverse (1 - z • a)) z\n[PROOFSTEP]\nhave H₁ : Differentiable 𝕜 fun w : 𝕜 => 1 - w • a := (differentiable_id.smul_const a).const_sub 1\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nhr : ↑r < (spectralRadius 𝕜 a)⁻¹\nz : 𝕜\nz_mem : z ∈ Metric.closedBall 0 ↑r\nhu : IsUnit (1 - z • a)\nH₁ : Differentiable 𝕜 fun w => 1 - w • a\n⊢ DifferentiableAt 𝕜 (fun z => Ring.inverse (1 - z • a)) z\n[PROOFSTEP]\nexact DifferentiableAt.comp z (differentiableAt_inverse hu) H₁.differentiableAt\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\n⊢ limsup (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) atTop ≤ spectralRadius ℂ a\n[PROOFSTEP]\nrefine' ENNReal.inv_le_inv.mp (le_of_forall_pos_nnreal_lt fun r r_pos r_lt => _)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nr_pos : 0 < r\nr_lt : ↑r < (spectralRadius ℂ a)⁻¹\n⊢ ↑r ≤ (limsup (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) atTop)⁻¹\n[PROOFSTEP]\nsimp_rw [inv_limsup, ← one_div]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nr_pos : 0 < r\nr_lt : ↑r < (spectralRadius ℂ a)⁻¹\n⊢ ↑r ≤ liminf (fun i => 1 / ↑‖a ^ i‖₊ ^ (1 / ↑i)) atTop\n[PROOFSTEP]\nlet p : FormalMultilinearSeries ℂ ℂ A := fun n => ContinuousMultilinearMap.mkPiField ℂ (Fin n) (a ^ n)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nr_pos : 0 < r\nr_lt : ↑r < (spectralRadius ℂ a)⁻¹\np : FormalMultilinearSeries ℂ ℂ A := fun n => ContinuousMultilinearMap.mkPiField ℂ (Fin n) (a ^ n)\n⊢ ↑r ≤ liminf (fun i => 1 / ↑‖a ^ i‖₊ ^ (1 / ↑i)) atTop\n[PROOFSTEP]\nsuffices h : (r : ℝ≥0∞) ≤ p.radius\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nr_pos : 0 < r\nr_lt : ↑r < (spectralRadius ℂ a)⁻¹\np : FormalMultilinearSeries ℂ ℂ A := fun n => ContinuousMultilinearMap.mkPiField ℂ (Fin n) (a ^ n)\nh : ↑r ≤ FormalMultilinearSeries.radius p\n⊢ ↑r ≤ liminf (fun i => 1 / ↑‖a ^ i‖₊ ^ (1 / ↑i)) atTop\n[PROOFSTEP]\nconvert h\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nr_pos : 0 < r\nr_lt : ↑r < (spectralRadius ℂ a)⁻¹\np : FormalMultilinearSeries ℂ ℂ A := fun n => ContinuousMultilinearMap.mkPiField ℂ (Fin n) (a ^ n)\nh : ↑r ≤ FormalMultilinearSeries.radius p\n⊢ liminf (fun i => 1 / ↑‖a ^ i‖₊ ^ (1 / ↑i)) atTop = FormalMultilinearSeries.radius p\n[PROOFSTEP]\nsimp only [p.radius_eq_liminf, ← norm_toNNReal, norm_mkPiField]\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nr_pos : 0 < r\nr_lt : ↑r < (spectralRadius ℂ a)⁻¹\np : FormalMultilinearSeries ℂ ℂ A := fun n => ContinuousMultilinearMap.mkPiField ℂ (Fin n) (a ^ n)\nh : ↑r ≤ FormalMultilinearSeries.radius p\n⊢ liminf (fun i => 1 / ↑(Real.toNNReal ‖a ^ i‖) ^ (1 / ↑i)) atTop =\n    liminf (fun n => 1 / ↑(Real.toNNReal ‖a ^ n‖ ^ (1 / ↑n))) atTop\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_4.e_u\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nr_pos : 0 < r\nr_lt : ↑r < (spectralRadius ℂ a)⁻¹\np : FormalMultilinearSeries ℂ ℂ A := fun n => ContinuousMultilinearMap.mkPiField ℂ (Fin n) (a ^ n)\nh : ↑r ≤ FormalMultilinearSeries.radius p\n⊢ (fun i => 1 / ↑(Real.toNNReal ‖a ^ i‖) ^ (1 / ↑i)) = fun n => 1 / ↑(Real.toNNReal ‖a ^ n‖ ^ (1 / ↑n))\n[PROOFSTEP]\next n\n[GOAL]\ncase h.e'_4.e_u.h\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nr_pos : 0 < r\nr_lt : ↑r < (spectralRadius ℂ a)⁻¹\np : FormalMultilinearSeries ℂ ℂ A := fun n => ContinuousMultilinearMap.mkPiField ℂ (Fin n) (a ^ n)\nh : ↑r ≤ FormalMultilinearSeries.radius p\nn : ℕ\n⊢ 1 / ↑(Real.toNNReal ‖a ^ n‖) ^ (1 / ↑n) = 1 / ↑(Real.toNNReal ‖a ^ n‖ ^ (1 / ↑n))\n[PROOFSTEP]\nrw [norm_toNNReal, ENNReal.coe_rpow_def ‖a ^ n‖₊ (1 / n : ℝ), if_neg]\n[GOAL]\ncase h.e'_4.e_u.h.hnc\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nr_pos : 0 < r\nr_lt : ↑r < (spectralRadius ℂ a)⁻¹\np : FormalMultilinearSeries ℂ ℂ A := fun n => ContinuousMultilinearMap.mkPiField ℂ (Fin n) (a ^ n)\nh : ↑r ≤ FormalMultilinearSeries.radius p\nn : ℕ\n⊢ ¬(‖a ^ n‖₊ = 0 ∧ 1 / ↑n < 0)\n[PROOFSTEP]\nexact fun ha => (lt_self_iff_false _).mp (ha.2.trans_le (one_div_nonneg.mpr n.cast_nonneg : 0 ≤ (1 / n : ℝ)))\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nr_pos : 0 < r\nr_lt : ↑r < (spectralRadius ℂ a)⁻¹\np : FormalMultilinearSeries ℂ ℂ A := fun n => ContinuousMultilinearMap.mkPiField ℂ (Fin n) (a ^ n)\n⊢ ↑r ≤ FormalMultilinearSeries.radius p\n[PROOFSTEP]\nhave H₁ := (differentiableOn_inverse_one_sub_smul r_lt).hasFPowerSeriesOnBall r_pos\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nr : ℝ≥0\nr_pos : 0 < r\nr_lt : ↑r < (spectralRadius ℂ a)⁻¹\np : FormalMultilinearSeries ℂ ℂ A := fun n => ContinuousMultilinearMap.mkPiField ℂ (Fin n) (a ^ n)\nH₁ :\n  HasFPowerSeriesOnBall (fun z => Ring.inverse (1 - z • a)) (cauchyPowerSeries (fun z => Ring.inverse (1 - z • a)) 0 ↑r)\n    0 ↑r\n⊢ ↑r ≤ FormalMultilinearSeries.radius p\n[PROOFSTEP]\nexact ((hasFPowerSeriesOnBall_inverse_one_sub_smul ℂ a).exchange_radius H₁).r_le\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\n⊢ Tendsto (fun n => ENNReal.ofReal (‖a ^ n‖ ^ (1 / ↑n))) atTop (𝓝 (spectralRadius ℂ a))\n[PROOFSTEP]\nconvert pow_nnnorm_pow_one_div_tendsto_nhds_spectralRadius a using 1\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\n⊢ (fun n => ENNReal.ofReal (‖a ^ n‖ ^ (1 / ↑n))) = fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)\n[PROOFSTEP]\next1\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nx✝ : ℕ\n⊢ ENNReal.ofReal (‖a ^ x✝‖ ^ (1 / ↑x✝)) = ↑‖a ^ x✝‖₊ ^ (1 / ↑x✝)\n[PROOFSTEP]\nrw [← ofReal_rpow_of_nonneg (norm_nonneg _) _, ← coe_nnnorm, coe_nnreal_eq]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nx✝ : ℕ\n⊢ 0 ≤ 1 / ↑x✝\n[PROOFSTEP]\nexact one_div_nonneg.mpr (by exact_mod_cast zero_le _)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\ninst✝ : CompleteSpace A\na : A\nx✝ : ℕ\n⊢ 0 ≤ ↑x✝\n[PROOFSTEP]\nexact_mod_cast zero_le _\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\n⊢ Set.Nonempty (spectrum ℂ a)\n[PROOFSTEP]\nrw [Set.nonempty_iff_ne_empty]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\n⊢ spectrum ℂ a ≠ ∅\n[PROOFSTEP]\nby_contra h\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\n⊢ False\n[PROOFSTEP]\nhave H₀ : resolventSet ℂ a = Set.univ := by rwa [spectrum, Set.compl_empty_iff] at h \n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\n⊢ resolventSet ℂ a = Set.univ\n[PROOFSTEP]\nrwa [spectrum, Set.compl_empty_iff] at h \n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\n⊢ False\n[PROOFSTEP]\nhave H₁ : Differentiable ℂ fun z : ℂ => resolvent a z := fun z =>\n  (hasDerivAt_resolvent (H₀.symm ▸ Set.mem_univ z : z ∈ resolventSet ℂ a)).differentiableAt\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\n⊢ False\n[PROOFSTEP]\nhave H₂ := norm_resolvent_le_forall (𝕜 := ℂ) a\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\n⊢ False\n[PROOFSTEP]\nhave H₃ : ∀ z : ℂ, resolvent a z = resolvent a (0 : ℂ) :=\n  by\n  refine' fun z => H₁.apply_eq_apply_of_bounded (bounded_iff_forall_norm_le.mpr _) z 0\n  rcases H₂ 1 zero_lt_one with ⟨R, _, hR⟩\n  rcases(ProperSpace.isCompact_closedBall (0 : ℂ) R).exists_bound_of_continuousOn H₁.continuous.continuousOn with\n    ⟨C, hC⟩\n  use max C 1\n  rintro _ ⟨w, rfl⟩\n  refine' Or.elim (em (‖w‖ ≤ R)) (fun hw => _) fun hw => _\n  · exact (hC w (mem_closedBall_zero_iff.mpr hw)).trans (le_max_left _ _)\n  ·\n    exact\n      (hR w (not_le.mp hw).le).trans\n        (le_max_right _ _)\n          -- `resolvent a 0 = 0`, which is a contradiction because it isn't a unit.\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\n⊢ ∀ (z : ℂ), resolvent a z = resolvent a 0\n[PROOFSTEP]\nrefine' fun z => H₁.apply_eq_apply_of_bounded (bounded_iff_forall_norm_le.mpr _) z 0\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nz : ℂ\n⊢ ∃ C, ∀ (x : A), (x ∈ Set.range fun z => resolvent a z) → ‖x‖ ≤ C\n[PROOFSTEP]\nrcases H₂ 1 zero_lt_one with ⟨R, _, hR⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nz : ℂ\nR : ℝ\nleft✝ : R > 0\nhR : ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ 1\n⊢ ∃ C, ∀ (x : A), (x ∈ Set.range fun z => resolvent a z) → ‖x‖ ≤ C\n[PROOFSTEP]\nrcases(ProperSpace.isCompact_closedBall (0 : ℂ) R).exists_bound_of_continuousOn H₁.continuous.continuousOn with ⟨C, hC⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nz : ℂ\nR : ℝ\nleft✝ : R > 0\nhR : ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ 1\nC : ℝ\nhC : ∀ (x : ℂ), x ∈ Metric.closedBall 0 R → ‖resolvent a x‖ ≤ C\n⊢ ∃ C, ∀ (x : A), (x ∈ Set.range fun z => resolvent a z) → ‖x‖ ≤ C\n[PROOFSTEP]\nuse max C 1\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nz : ℂ\nR : ℝ\nleft✝ : R > 0\nhR : ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ 1\nC : ℝ\nhC : ∀ (x : ℂ), x ∈ Metric.closedBall 0 R → ‖resolvent a x‖ ≤ C\n⊢ ∀ (x : A), (x ∈ Set.range fun z => resolvent a z) → ‖x‖ ≤ max C 1\n[PROOFSTEP]\nrintro _ ⟨w, rfl⟩\n[GOAL]\ncase h.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nz : ℂ\nR : ℝ\nleft✝ : R > 0\nhR : ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ 1\nC : ℝ\nhC : ∀ (x : ℂ), x ∈ Metric.closedBall 0 R → ‖resolvent a x‖ ≤ C\nw : ℂ\n⊢ ‖(fun z => resolvent a z) w‖ ≤ max C 1\n[PROOFSTEP]\nrefine' Or.elim (em (‖w‖ ≤ R)) (fun hw => _) fun hw => _\n[GOAL]\ncase h.intro.refine'_1\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nz : ℂ\nR : ℝ\nleft✝ : R > 0\nhR : ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ 1\nC : ℝ\nhC : ∀ (x : ℂ), x ∈ Metric.closedBall 0 R → ‖resolvent a x‖ ≤ C\nw : ℂ\nhw : ‖w‖ ≤ R\n⊢ ‖(fun z => resolvent a z) w‖ ≤ max C 1\n[PROOFSTEP]\nexact (hC w (mem_closedBall_zero_iff.mpr hw)).trans (le_max_left _ _)\n[GOAL]\ncase h.intro.refine'_2\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nz : ℂ\nR : ℝ\nleft✝ : R > 0\nhR : ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ 1\nC : ℝ\nhC : ∀ (x : ℂ), x ∈ Metric.closedBall 0 R → ‖resolvent a x‖ ≤ C\nw : ℂ\nhw : ¬‖w‖ ≤ R\n⊢ ‖(fun z => resolvent a z) w‖ ≤ max C 1\n[PROOFSTEP]\nexact\n  (hR w (not_le.mp hw).le).trans\n    (le_max_right _ _)\n      -- `resolvent a 0 = 0`, which is a contradiction because it isn't a unit.\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nH₃ : ∀ (z : ℂ), resolvent a z = resolvent a 0\n⊢ False\n[PROOFSTEP]\nhave H₅ : resolvent a (0 : ℂ) = 0 :=\n  by\n  refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun ε hε => _) (norm_nonneg _))\n  rcases H₂ ε hε with ⟨R, _, hR⟩\n  simpa only [H₃ R] using\n    (zero_add ε).symm.subst\n      (hR R (by simp [le_abs_self]))\n        -- `not_isUnit_zero` is where we need `Nontrivial A`, it is unavoidable.\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nH₃ : ∀ (z : ℂ), resolvent a z = resolvent a 0\n⊢ resolvent a 0 = 0\n[PROOFSTEP]\nrefine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun ε hε => _) (norm_nonneg _))\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nH₃ : ∀ (z : ℂ), resolvent a z = resolvent a 0\nε : ℝ\nhε : 0 < ε\n⊢ ‖resolvent a 0‖ ≤ 0 + ε\n[PROOFSTEP]\nrcases H₂ ε hε with ⟨R, _, hR⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nH₃ : ∀ (z : ℂ), resolvent a z = resolvent a 0\nε : ℝ\nhε : 0 < ε\nR : ℝ\nleft✝ : R > 0\nhR : ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\n⊢ ‖resolvent a 0‖ ≤ 0 + ε\n[PROOFSTEP]\nsimpa only [H₃ R] using\n  (zero_add ε).symm.subst\n    (hR R (by simp [le_abs_self]))\n      -- `not_isUnit_zero` is where we need `Nontrivial A`, it is unavoidable.\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nH₃ : ∀ (z : ℂ), resolvent a z = resolvent a 0\nε : ℝ\nhε : 0 < ε\nR : ℝ\nleft✝ : R > 0\nhR : ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\n⊢ R ≤ ‖↑R‖\n[PROOFSTEP]\nsimp [le_abs_self]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nh : spectrum ℂ a = ∅\nH₀ : resolventSet ℂ a = Set.univ\nH₁ : Differentiable ℂ fun z => resolvent a z\nH₂ : ∀ (ε : ℝ), ε > 0 → ∃ R, R > 0 ∧ ∀ (z : ℂ), R ≤ ‖z‖ → ‖resolvent a z‖ ≤ ε\nH₃ : ∀ (z : ℂ), resolvent a z = resolvent a 0\nH₅ : resolvent a 0 = 0\n⊢ False\n[PROOFSTEP]\nexact not_isUnit_zero (H₅.subst (isUnit_resolvent.mp (mem_resolventSet_iff.mp (H₀.symm ▸ Set.mem_univ 0))))\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra ℂ A\ninst✝¹ : CompleteSpace A\ninst✝ : Nontrivial A\na : A\nn : ℕ\n⊢ spectrum ℂ (a ^ n) = (fun x => x ^ n) '' spectrum ℂ a\n[PROOFSTEP]\nsimpa only [aeval_X_pow, eval_pow, eval_X] using map_polynomial_aeval a (X ^ n)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝¹ : NormedRing A\ninst✝ : NormedAlgebra ℂ A\nhA : ∀ {a : A}, IsUnit a ↔ a ≠ 0\na : A\nz : ℂ\nh : z ∈ σ a\n⊢ ↑(algebraMap ℂ A) z = a\n[PROOFSTEP]\nrwa [mem_iff, hA, Classical.not_not, sub_eq_zero] at h \n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra ℂ A\nhA : ∀ {a : A}, IsUnit a ↔ a ≠ 0\ninst✝ : CompleteSpace A\nnt : Nontrivial A :=\n  {\n    exists_pair_ne :=\n      Exists.intro 1\n        (Exists.intro 0\n          (Iff.mp hA (Exists.intro { val := 1, inv := 1, val_inv := mul_one 1, inv_val := mul_one 1 } rfl))) }\nsrc✝ : ℂ →ₐ[ℂ] A := Algebra.ofId ℂ A\nz : ℂ\n⊢ (fun a => Set.Nonempty.some (_ : Set.Nonempty (σ a))) (↑(algebraMap ℂ A) z) = z\n[PROOFSTEP]\nsimpa only [@scalar_eq _ _ _ _ _ nt _] using (@spectrum.nonempty _ _ _ _ nt <| algebraMap ℂ A z).some_mem\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\n⊢ exp 𝕜 z ∈ spectrum 𝕜 (exp 𝕜 a)\n[PROOFSTEP]\nhave hexpmul : exp 𝕜 a = exp 𝕜 (a - ↑ₐ z) * ↑ₐ (exp 𝕜 z) := by\n  rw [algebraMap_exp_comm z, ← exp_add_of_commute (Algebra.commutes z (a - ↑ₐ z)).symm, sub_add_cancel]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\n⊢ exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\n[PROOFSTEP]\nrw [algebraMap_exp_comm z, ← exp_add_of_commute (Algebra.commutes z (a - ↑ₐ z)).symm, sub_add_cancel]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\n⊢ exp 𝕜 z ∈ spectrum 𝕜 (exp 𝕜 a)\n[PROOFSTEP]\nlet b := ∑' n : ℕ, ((n + 1).factorial⁻¹ : 𝕜) • (a - ↑ₐ z) ^ n\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\n⊢ exp 𝕜 z ∈ spectrum 𝕜 (exp 𝕜 a)\n[PROOFSTEP]\nhave hb : Summable fun n : ℕ => ((n + 1).factorial⁻¹ : 𝕜) • (a - ↑ₐ z) ^ n :=\n  by\n  refine' summable_of_norm_bounded_eventually _ (Real.summable_pow_div_factorial ‖a - ↑ₐ z‖) _\n  filter_upwards [Filter.eventually_cofinite_ne 0] with n hn\n  rw [norm_smul, mul_comm, norm_inv, IsROrC.norm_natCast, ← div_eq_mul_inv]\n  exact\n    div_le_div (pow_nonneg (norm_nonneg _) n) (norm_pow_le' (a - ↑ₐ z) (zero_lt_iff.mpr hn))\n      (by exact_mod_cast Nat.factorial_pos n) (by exact_mod_cast Nat.factorial_le (lt_add_one n).le)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\n⊢ Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\n[PROOFSTEP]\nrefine' summable_of_norm_bounded_eventually _ (Real.summable_pow_div_factorial ‖a - ↑ₐ z‖) _\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\n⊢ ∀ᶠ (i : ℕ) in Filter.cofinite, ‖(↑(Nat.factorial (i + 1)))⁻¹ • (a - ↑↑ₐ z) ^ i‖ ≤ ‖a - ↑↑ₐ z‖ ^ i / ↑(Nat.factorial i)\n[PROOFSTEP]\nfilter_upwards [Filter.eventually_cofinite_ne 0] with n hn\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nn : ℕ\nhn : n ≠ 0\n⊢ ‖(↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n‖ ≤ ‖a - ↑↑ₐ z‖ ^ n / ↑(Nat.factorial n)\n[PROOFSTEP]\nrw [norm_smul, mul_comm, norm_inv, IsROrC.norm_natCast, ← div_eq_mul_inv]\n[GOAL]\ncase h\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nn : ℕ\nhn : n ≠ 0\n⊢ ‖(a - ↑↑ₐ z) ^ n‖ / ↑(Nat.factorial (n + 1)) ≤ ‖a - ↑↑ₐ z‖ ^ n / ↑(Nat.factorial n)\n[PROOFSTEP]\nexact\n  div_le_div (pow_nonneg (norm_nonneg _) n) (norm_pow_le' (a - ↑ₐ z) (zero_lt_iff.mpr hn))\n    (by exact_mod_cast Nat.factorial_pos n) (by exact_mod_cast Nat.factorial_le (lt_add_one n).le)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nn : ℕ\nhn : n ≠ 0\n⊢ 0 < ↑(Nat.factorial n)\n[PROOFSTEP]\nexact_mod_cast Nat.factorial_pos n\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nn : ℕ\nhn : n ≠ 0\n⊢ ↑(Nat.factorial n) ≤ ↑(Nat.factorial (n + 1))\n[PROOFSTEP]\nexact_mod_cast Nat.factorial_le (lt_add_one n).le\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nhb : Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\n⊢ exp 𝕜 z ∈ spectrum 𝕜 (exp 𝕜 a)\n[PROOFSTEP]\nhave h₀ : (∑' n : ℕ, ((n + 1).factorial⁻¹ : 𝕜) • (a - ↑ₐ z) ^ (n + 1)) = (a - ↑ₐ z) * b := by\n  simpa only [mul_smul_comm, pow_succ] using hb.tsum_mul_left (a - ↑ₐ z)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nhb : Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\n⊢ ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = (a - ↑↑ₐ z) * b\n[PROOFSTEP]\nsimpa only [mul_smul_comm, pow_succ] using hb.tsum_mul_left (a - ↑ₐ z)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nhb : Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nh₀ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = (a - ↑↑ₐ z) * b\n⊢ exp 𝕜 z ∈ spectrum 𝕜 (exp 𝕜 a)\n[PROOFSTEP]\nhave h₁ : (∑' n : ℕ, ((n + 1).factorial⁻¹ : 𝕜) • (a - ↑ₐ z) ^ (n + 1)) = b * (a - ↑ₐ z) := by\n  simpa only [pow_succ', Algebra.smul_mul_assoc] using hb.tsum_mul_right (a - ↑ₐ z)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nhb : Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nh₀ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = (a - ↑↑ₐ z) * b\n⊢ ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = b * (a - ↑↑ₐ z)\n[PROOFSTEP]\nsimpa only [pow_succ', Algebra.smul_mul_assoc] using hb.tsum_mul_right (a - ↑ₐ z)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nhb : Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nh₀ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = (a - ↑↑ₐ z) * b\nh₁ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = b * (a - ↑↑ₐ z)\n⊢ exp 𝕜 z ∈ spectrum 𝕜 (exp 𝕜 a)\n[PROOFSTEP]\nhave h₃ : exp 𝕜 (a - ↑ₐ z) = 1 + (a - ↑ₐ z) * b := by\n  rw [exp_eq_tsum]\n  convert tsum_eq_zero_add (expSeries_summable' (𝕂 := 𝕜) (a - ↑ₐ z))\n  simp only [Nat.factorial_zero, Nat.cast_one, inv_one, pow_zero, one_smul]\n  exact h₀.symm\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nhb : Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nh₀ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = (a - ↑↑ₐ z) * b\nh₁ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = b * (a - ↑↑ₐ z)\n⊢ exp 𝕜 (a - ↑↑ₐ z) = 1 + (a - ↑↑ₐ z) * b\n[PROOFSTEP]\nrw [exp_eq_tsum]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nhb : Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nh₀ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = (a - ↑↑ₐ z) * b\nh₁ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = b * (a - ↑↑ₐ z)\n⊢ (fun x => ∑' (n : ℕ), (↑(Nat.factorial n))⁻¹ • x ^ n) (a - ↑↑ₐ z) = 1 + (a - ↑↑ₐ z) * b\n[PROOFSTEP]\nconvert tsum_eq_zero_add (expSeries_summable' (𝕂 := 𝕜) (a - ↑ₐ z))\n[GOAL]\ncase h.e'_3.h.e'_5\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nhb : Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nh₀ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = (a - ↑↑ₐ z) * b\nh₁ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = b * (a - ↑↑ₐ z)\n⊢ 1 = (↑(Nat.factorial 0))⁻¹ • (a - ↑↑ₐ z) ^ 0\ncase h.e'_3.h.e'_6\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nhb : Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nh₀ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = (a - ↑↑ₐ z) * b\nh₁ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = b * (a - ↑↑ₐ z)\n⊢ (a - ↑↑ₐ z) * b = ∑' (b : ℕ), (↑(Nat.factorial (b + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (b + 1)\n[PROOFSTEP]\nsimp only [Nat.factorial_zero, Nat.cast_one, inv_one, pow_zero, one_smul]\n[GOAL]\ncase h.e'_3.h.e'_6\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nhb : Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nh₀ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = (a - ↑↑ₐ z) * b\nh₁ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = b * (a - ↑↑ₐ z)\n⊢ (a - ↑↑ₐ z) * b = ∑' (b : ℕ), (↑(Nat.factorial (b + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (b + 1)\n[PROOFSTEP]\nexact h₀.symm\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nhb : Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nh₀ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = (a - ↑↑ₐ z) * b\nh₁ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = b * (a - ↑↑ₐ z)\nh₃ : exp 𝕜 (a - ↑↑ₐ z) = 1 + (a - ↑↑ₐ z) * b\n⊢ exp 𝕜 z ∈ spectrum 𝕜 (exp 𝕜 a)\n[PROOFSTEP]\nrw [spectrum.mem_iff, IsUnit.sub_iff, ← one_mul (↑ₐ (exp 𝕜 z)), hexpmul, ← _root_.sub_mul,\n  Commute.isUnit_mul_iff (Algebra.commutes (exp 𝕜 z) (exp 𝕜 (a - ↑ₐ z) - 1)).symm, sub_eq_iff_eq_add'.mpr h₃,\n  Commute.isUnit_mul_iff (h₀ ▸ h₁ : (a - ↑ₐ z) * b = b * (a - ↑ₐ z))]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : CompleteSpace A\na : A\nz : 𝕜\nhz : z ∈ spectrum 𝕜 a\nhexpmul : exp 𝕜 a = exp 𝕜 (a - ↑↑ₐ z) * ↑↑ₐ (exp 𝕜 z)\nb : A := ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nhb : Summable fun n => (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ n\nh₀ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = (a - ↑↑ₐ z) * b\nh₁ : ∑' (n : ℕ), (↑(Nat.factorial (n + 1)))⁻¹ • (a - ↑↑ₐ z) ^ (n + 1) = b * (a - ↑↑ₐ z)\nh₃ : exp 𝕜 (a - ↑↑ₐ z) = 1 + (a - ↑↑ₐ z) * b\n⊢ ¬((IsUnit (a - ↑↑ₐ z) ∧ IsUnit b) ∧ IsUnit (↑↑ₐ (exp 𝕜 z)))\n[PROOFSTEP]\nexact not_and_of_not_left _ (not_and_of_not_left _ ((not_iff_not.mpr IsUnit.sub_iff).mp hz))\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁴ : NontriviallyNormedField 𝕜\ninst✝³ : NormedRing A\ninst✝² : NormedAlgebra 𝕜 A\ninst✝¹ : CompleteSpace A\ninst✝ : NormOneClass A\nφ : A →ₐ[𝕜] 𝕜\nx✝¹ : ℝ\nx✝ : x✝¹ ≥ 0\nh : ∀ (x : A), ‖↑(toContinuousLinearMap φ) x‖ ≤ x✝¹ * ‖x‖\n⊢ 1 ≤ x✝¹\n[PROOFSTEP]\nsimpa only [coe_toContinuousLinearMap, map_one, norm_one, mul_one] using h 1\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : CompleteSpace A\ninst✝ : NormedAlgebra 𝕜 A\nf : A →ₐ[𝕜] 𝕜\n⊢ AlgHom.toContinuousLinearMap f ∈ characterSpace 𝕜 A\n[PROOFSTEP]\nrw [eq_set_map_one_map_mul]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : NormedRing A\ninst✝¹ : CompleteSpace A\ninst✝ : NormedAlgebra 𝕜 A\nf : A →ₐ[𝕜] 𝕜\n⊢ AlgHom.toContinuousLinearMap f ∈ {φ | ↑φ 1 = 1 ∧ ∀ (x y : A), ↑φ (x * y) = ↑φ x * ↑φ y}\n[PROOFSTEP]\nexact ⟨map_one f, map_mul f⟩\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.Spectrum", "llama_tokens": 42615, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191337850933, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.3600483281370349}}
{"text": "[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ns₁ s₂ : Set (Set Ω)\nh : IndepSets s₁ s₂ κ\n⊢ IndepSets s₂ s₁ κ\n[PROOFSTEP]\nintros t1 t2 ht1 ht2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ns₁ s₂ : Set (Set Ω)\nh : IndepSets s₁ s₂ κ\nt1 t2 : Set Ω\nht1 : t1 ∈ s₂\nht2 : t2 ∈ s₁\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nfilter_upwards [h t2 t1 ht2 ht1] with a ha\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ns₁ s₂ : Set (Set Ω)\nh : IndepSets s₁ s₂ κ\nt1 t2 : Set Ω\nht1 : t1 ∈ s₂\nht2 : t2 ∈ s₁\na : α\nha : ↑↑(↑κ a) (t2 ∩ t1) = ↑↑(↑κ a) t2 * ↑↑(↑κ a) t1\n⊢ ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrwa [Set.inter_comm, mul_comm]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm' _mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\n⊢ Indep m' ⊥ κ\n[PROOFSTEP]\nintros s t _ ht\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm' _mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns t : Set Ω\na✝ : s ∈ {s | MeasurableSet s}\nht : t ∈ {s | MeasurableSet s}\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (s ∩ t) = ↑↑(↑κ a) s * ↑↑(↑κ a) t\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, MeasurableSpace.measurableSet_bot_iff] at ht \n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm' _mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns t : Set Ω\na✝ : s ∈ {s | MeasurableSet s}\nht : t = ∅ ∨ t = Set.univ\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (s ∩ t) = ↑↑(↑κ a) s * ↑↑(↑κ a) t\n[PROOFSTEP]\nrefine Filter.eventually_of_forall (fun a ↦ ?_)\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm' _mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns t : Set Ω\na✝ : s ∈ {s | MeasurableSet s}\nht : t = ∅ ∨ t = Set.univ\na : α\n⊢ ↑↑(↑κ a) (s ∩ t) = ↑↑(↑κ a) s * ↑↑(↑κ a) t\n[PROOFSTEP]\ncases' ht with ht ht\n[GOAL]\ncase inl\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm' _mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns t : Set Ω\na✝ : s ∈ {s | MeasurableSet s}\na : α\nht : t = ∅\n⊢ ↑↑(↑κ a) (s ∩ t) = ↑↑(↑κ a) s * ↑↑(↑κ a) t\n[PROOFSTEP]\nrw [ht, Set.inter_empty, measure_empty, mul_zero]\n[GOAL]\ncase inr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm' _mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns t : Set Ω\na✝ : s ∈ {s | MeasurableSet s}\na : α\nht : t = Set.univ\n⊢ ↑↑(↑κ a) (s ∩ t) = ↑↑(↑κ a) s * ↑↑(↑κ a) t\n[PROOFSTEP]\nrw [ht, Set.inter_univ, measure_univ, mul_one]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : Set Ω\n⊢ IndepSet s ∅ κ\n[PROOFSTEP]\nsimp only [IndepSet, generateFrom_singleton_empty]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : Set Ω\n⊢ Indep (generateFrom {s}) ⊥ κ\n[PROOFSTEP]\nexact indep_bot_right _\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns₁ s₂ s' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh₁ : IndepSets s₁ s' κ\nh₂ : IndepSets s₂ s' κ\n⊢ IndepSets (s₁ ∪ s₂) s' κ\n[PROOFSTEP]\nintro t1 t2 ht1 ht2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns₁ s₂ s' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh₁ : IndepSets s₁ s' κ\nh₂ : IndepSets s₂ s' κ\nt1 t2 : Set Ω\nht1 : t1 ∈ s₁ ∪ s₂\nht2 : t2 ∈ s'\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\ncases' (Set.mem_union _ _ _).mp ht1 with ht1₁ ht1₂\n[GOAL]\ncase inl\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns₁ s₂ s' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh₁ : IndepSets s₁ s' κ\nh₂ : IndepSets s₂ s' κ\nt1 t2 : Set Ω\nht1 : t1 ∈ s₁ ∪ s₂\nht2 : t2 ∈ s'\nht1₁ : t1 ∈ s₁\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nexact h₁ t1 t2 ht1₁ ht2\n[GOAL]\ncase inr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns₁ s₂ s' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh₁ : IndepSets s₁ s' κ\nh₂ : IndepSets s₂ s' κ\nt1 t2 : Set Ω\nht1 : t1 ∈ s₁ ∪ s₂\nht2 : t2 ∈ s'\nht1₂ : t1 ∈ s₂\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nexact h₂ t1 t2 ht1₂ ht2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nhyp : ∀ (n : ι), IndepSets (s n) s' κ\n⊢ IndepSets (⋃ (n : ι), s n) s' κ\n[PROOFSTEP]\nintro t1 t2 ht1 ht2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nhyp : ∀ (n : ι), IndepSets (s n) s' κ\nt1 t2 : Set Ω\nht1 : t1 ∈ ⋃ (n : ι), s n\nht2 : t2 ∈ s'\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrw [Set.mem_iUnion] at ht1 \n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nhyp : ∀ (n : ι), IndepSets (s n) s' κ\nt1 t2 : Set Ω\nht1 : ∃ i, t1 ∈ s i\nht2 : t2 ∈ s'\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\ncases' ht1 with n ht1\n[GOAL]\ncase intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nhyp : ∀ (n : ι), IndepSets (s n) s' κ\nt1 t2 : Set Ω\nht2 : t2 ∈ s'\nn : ι\nht1 : t1 ∈ s n\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nexact hyp n t1 t2 ht1 ht2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nu : Set ι\nhyp : ∀ (n : ι), n ∈ u → IndepSets (s n) s' κ\n⊢ IndepSets (⋃ (n : ι) (_ : n ∈ u), s n) s' κ\n[PROOFSTEP]\nintro t1 t2 ht1 ht2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nu : Set ι\nhyp : ∀ (n : ι), n ∈ u → IndepSets (s n) s' κ\nt1 t2 : Set Ω\nht1 : t1 ∈ ⋃ (n : ι) (_ : n ∈ u), s n\nht2 : t2 ∈ s'\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nsimp_rw [Set.mem_iUnion] at ht1 \n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nu : Set ι\nhyp : ∀ (n : ι), n ∈ u → IndepSets (s n) s' κ\nt1 t2 : Set Ω\nht2 : t2 ∈ s'\nht1 : ∃ i i_1, t1 ∈ s i\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrcases ht1 with ⟨n, hpn, ht1⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nu : Set ι\nhyp : ∀ (n : ι), n ∈ u → IndepSets (s n) s' κ\nt1 t2 : Set Ω\nht2 : t2 ∈ s'\nn : ι\nhpn : n ∈ u\nht1 : t1 ∈ s n\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nexact hyp n hpn t1 t2 ht1 ht2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh : ∃ n, IndepSets (s n) s' κ\n⊢ IndepSets (⋂ (n : ι), s n) s' κ\n[PROOFSTEP]\nintro t1 t2 ht1 ht2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh : ∃ n, IndepSets (s n) s' κ\nt1 t2 : Set Ω\nht1 : t1 ∈ ⋂ (n : ι), s n\nht2 : t2 ∈ s'\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\ncases' h with n h\n[GOAL]\ncase intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nt1 t2 : Set Ω\nht1 : t1 ∈ ⋂ (n : ι), s n\nht2 : t2 ∈ s'\nn : ι\nh : IndepSets (s n) s' κ\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nexact h t1 t2 (Set.mem_iInter.mp ht1 n) ht2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nu : Set ι\nh : ∃ n, n ∈ u ∧ IndepSets (s n) s' κ\n⊢ IndepSets (⋂ (n : ι) (_ : n ∈ u), s n) s' κ\n[PROOFSTEP]\nintro t1 t2 ht1 ht2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nu : Set ι\nh : ∃ n, n ∈ u ∧ IndepSets (s n) s' κ\nt1 t2 : Set Ω\nht1 : t1 ∈ ⋂ (n : ι) (_ : n ∈ u), s n\nht2 : t2 ∈ s'\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrcases h with ⟨n, hn, h⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\ns' : Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nu : Set ι\nt1 t2 : Set Ω\nht1 : t1 ∈ ⋂ (n : ι) (_ : n ∈ u), s n\nht2 : t2 ∈ s'\nn : ι\nhn : n ∈ u\nh : IndepSets (s n) s' κ\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nexact h t1 t2 (Set.biInter_subset_of_mem hn ht1) ht2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns t : Set Ω\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (s ∩ t) = ↑↑(↑κ a) s * ↑↑(↑κ a) t\ns1 t1 : Set Ω\nhs1 : s1 ∈ {s}\nht1 : t1 ∈ {t}\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (s1 ∩ t1) = ↑↑(↑κ a) s1 * ↑↑(↑κ a) t1\n[PROOFSTEP]\nrwa [Set.mem_singleton_iff.mp hs1, Set.mem_singleton_iff.mp ht1]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\n⊢ IndepSets (s i) (s j) κ\n[PROOFSTEP]\nclassical\nintro t₁ t₂ ht₁ ht₂\nhave hf_m : ∀ x : ι, x ∈ ({ i, j } : Finset ι) → ite (x = i) t₁ t₂ ∈ s x :=\n  by\n  intro x hx\n  cases' Finset.mem_insert.mp hx with hx hx\n  · simp [hx, ht₁]\n  · simp [Finset.mem_singleton.mp hx, hij.symm, ht₂]\nhave h1 : t₁ = ite (i = i) t₁ t₂ := by simp only [if_true, eq_self_iff_true]\nhave h2 : t₂ = ite (j = i) t₁ t₂ := by simp only [hij.symm, if_false]\nhave h_inter : ⋂ (t : ι) (_ : t ∈ ({ i, j } : Finset ι)), ite (t = i) t₁ t₂ = ite (i = i) t₁ t₂ ∩ ite (j = i) t₁ t₂ :=\n  by simp only [Finset.set_biInter_singleton, Finset.set_biInter_insert]\nfilter_upwards [h_indep { i, j } hf_m] with a h_indep'\nhave h_prod :\n  (∏ t : ι in ({ i, j } : Finset ι), κ a (ite (t = i) t₁ t₂)) = κ a (ite (i = i) t₁ t₂) * κ a (ite (j = i) t₁ t₂) := by\n  simp only [hij, Finset.prod_singleton, Finset.prod_insert, not_false_iff, Finset.mem_singleton]\nrw [h1]\nnth_rw 2 [h2]\nnth_rw 4 [h2]\nrw [← h_inter, ← h_prod, h_indep']\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\n⊢ IndepSets (s i) (s j) κ\n[PROOFSTEP]\nintro t₁ t₂ ht₁ ht₂\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t₁ ∩ t₂) = ↑↑(↑κ a) t₁ * ↑↑(↑κ a) t₂\n[PROOFSTEP]\nhave hf_m : ∀ x : ι, x ∈ ({ i, j } : Finset ι) → ite (x = i) t₁ t₂ ∈ s x :=\n  by\n  intro x hx\n  cases' Finset.mem_insert.mp hx with hx hx\n  · simp [hx, ht₁]\n  · simp [Finset.mem_singleton.mp hx, hij.symm, ht₂]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\n⊢ ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nx : ι\nhx : x ∈ {i, j}\n⊢ (if x = i then t₁ else t₂) ∈ s x\n[PROOFSTEP]\ncases' Finset.mem_insert.mp hx with hx hx\n[GOAL]\ncase inl\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nx : ι\nhx✝ : x ∈ {i, j}\nhx : x = i\n⊢ (if x = i then t₁ else t₂) ∈ s x\n[PROOFSTEP]\nsimp [hx, ht₁]\n[GOAL]\ncase inr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nx : ι\nhx✝ : x ∈ {i, j}\nhx : x ∈ {j}\n⊢ (if x = i then t₁ else t₂) ∈ s x\n[PROOFSTEP]\nsimp [Finset.mem_singleton.mp hx, hij.symm, ht₂]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t₁ ∩ t₂) = ↑↑(↑κ a) t₁ * ↑↑(↑κ a) t₂\n[PROOFSTEP]\nhave h1 : t₁ = ite (i = i) t₁ t₂ := by simp only [if_true, eq_self_iff_true]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\n⊢ t₁ = if i = i then t₁ else t₂\n[PROOFSTEP]\nsimp only [if_true, eq_self_iff_true]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\nh1 : t₁ = if i = i then t₁ else t₂\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t₁ ∩ t₂) = ↑↑(↑κ a) t₁ * ↑↑(↑κ a) t₂\n[PROOFSTEP]\nhave h2 : t₂ = ite (j = i) t₁ t₂ := by simp only [hij.symm, if_false]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\nh1 : t₁ = if i = i then t₁ else t₂\n⊢ t₂ = if j = i then t₁ else t₂\n[PROOFSTEP]\nsimp only [hij.symm, if_false]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\nh1 : t₁ = if i = i then t₁ else t₂\nh2 : t₂ = if j = i then t₁ else t₂\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t₁ ∩ t₂) = ↑↑(↑κ a) t₁ * ↑↑(↑κ a) t₂\n[PROOFSTEP]\nhave h_inter : ⋂ (t : ι) (_ : t ∈ ({ i, j } : Finset ι)), ite (t = i) t₁ t₂ = ite (i = i) t₁ t₂ ∩ ite (j = i) t₁ t₂ :=\n  by simp only [Finset.set_biInter_singleton, Finset.set_biInter_insert]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\nh1 : t₁ = if i = i then t₁ else t₂\nh2 : t₂ = if j = i then t₁ else t₂\n⊢ (⋂ (t : ι) (_ : t ∈ {i, j}), if t = i then t₁ else t₂) = (if i = i then t₁ else t₂) ∩ if j = i then t₁ else t₂\n[PROOFSTEP]\nsimp only [Finset.set_biInter_singleton, Finset.set_biInter_insert]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\nh1 : t₁ = if i = i then t₁ else t₂\nh2 : t₂ = if j = i then t₁ else t₂\nh_inter : (⋂ (t : ι) (_ : t ∈ {i, j}), if t = i then t₁ else t₂) = (if i = i then t₁ else t₂) ∩ if j = i then t₁ else t₂\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t₁ ∩ t₂) = ↑↑(↑κ a) t₁ * ↑↑(↑κ a) t₂\n[PROOFSTEP]\nfilter_upwards [h_indep { i, j } hf_m] with a h_indep'\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\nh1 : t₁ = if i = i then t₁ else t₂\nh2 : t₂ = if j = i then t₁ else t₂\nh_inter : (⋂ (t : ι) (_ : t ∈ {i, j}), if t = i then t₁ else t₂) = (if i = i then t₁ else t₂) ∩ if j = i then t₁ else t₂\na : α\nh_indep' :\n  ↑↑(↑κ a) (⋂ (i_1 : ι) (_ : i_1 ∈ {i, j}), if i_1 = i then t₁ else t₂) =\n    ∏ i_1 in {i, j}, ↑↑(↑κ a) (if i_1 = i then t₁ else t₂)\n⊢ ↑↑(↑κ a) (t₁ ∩ t₂) = ↑↑(↑κ a) t₁ * ↑↑(↑κ a) t₂\n[PROOFSTEP]\nhave h_prod :\n  (∏ t : ι in ({ i, j } : Finset ι), κ a (ite (t = i) t₁ t₂)) = κ a (ite (i = i) t₁ t₂) * κ a (ite (j = i) t₁ t₂) := by\n  simp only [hij, Finset.prod_singleton, Finset.prod_insert, not_false_iff, Finset.mem_singleton]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\nh1 : t₁ = if i = i then t₁ else t₂\nh2 : t₂ = if j = i then t₁ else t₂\nh_inter : (⋂ (t : ι) (_ : t ∈ {i, j}), if t = i then t₁ else t₂) = (if i = i then t₁ else t₂) ∩ if j = i then t₁ else t₂\na : α\nh_indep' :\n  ↑↑(↑κ a) (⋂ (i_1 : ι) (_ : i_1 ∈ {i, j}), if i_1 = i then t₁ else t₂) =\n    ∏ i_1 in {i, j}, ↑↑(↑κ a) (if i_1 = i then t₁ else t₂)\n⊢ ∏ t in {i, j}, ↑↑(↑κ a) (if t = i then t₁ else t₂) =\n    ↑↑(↑κ a) (if i = i then t₁ else t₂) * ↑↑(↑κ a) (if j = i then t₁ else t₂)\n[PROOFSTEP]\nsimp only [hij, Finset.prod_singleton, Finset.prod_insert, not_false_iff, Finset.mem_singleton]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\nh1 : t₁ = if i = i then t₁ else t₂\nh2 : t₂ = if j = i then t₁ else t₂\nh_inter : (⋂ (t : ι) (_ : t ∈ {i, j}), if t = i then t₁ else t₂) = (if i = i then t₁ else t₂) ∩ if j = i then t₁ else t₂\na : α\nh_indep' :\n  ↑↑(↑κ a) (⋂ (i_1 : ι) (_ : i_1 ∈ {i, j}), if i_1 = i then t₁ else t₂) =\n    ∏ i_1 in {i, j}, ↑↑(↑κ a) (if i_1 = i then t₁ else t₂)\nh_prod :\n  ∏ t in {i, j}, ↑↑(↑κ a) (if t = i then t₁ else t₂) =\n    ↑↑(↑κ a) (if i = i then t₁ else t₂) * ↑↑(↑κ a) (if j = i then t₁ else t₂)\n⊢ ↑↑(↑κ a) (t₁ ∩ t₂) = ↑↑(↑κ a) t₁ * ↑↑(↑κ a) t₂\n[PROOFSTEP]\nrw [h1]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\nh1 : t₁ = if i = i then t₁ else t₂\nh2 : t₂ = if j = i then t₁ else t₂\nh_inter : (⋂ (t : ι) (_ : t ∈ {i, j}), if t = i then t₁ else t₂) = (if i = i then t₁ else t₂) ∩ if j = i then t₁ else t₂\na : α\nh_indep' :\n  ↑↑(↑κ a) (⋂ (i_1 : ι) (_ : i_1 ∈ {i, j}), if i_1 = i then t₁ else t₂) =\n    ∏ i_1 in {i, j}, ↑↑(↑κ a) (if i_1 = i then t₁ else t₂)\nh_prod :\n  ∏ t in {i, j}, ↑↑(↑κ a) (if t = i then t₁ else t₂) =\n    ↑↑(↑κ a) (if i = i then t₁ else t₂) * ↑↑(↑κ a) (if j = i then t₁ else t₂)\n⊢ ↑↑(↑κ a) ((if i = i then t₁ else t₂) ∩ t₂) = ↑↑(↑κ a) (if i = i then t₁ else t₂) * ↑↑(↑κ a) t₂\n[PROOFSTEP]\nnth_rw 2 [h2]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\nh1 : t₁ = if i = i then t₁ else t₂\nh2 : t₂ = if j = i then t₁ else t₂\nh_inter : (⋂ (t : ι) (_ : t ∈ {i, j}), if t = i then t₁ else t₂) = (if i = i then t₁ else t₂) ∩ if j = i then t₁ else t₂\na : α\nh_indep' :\n  ↑↑(↑κ a) (⋂ (i_1 : ι) (_ : i_1 ∈ {i, j}), if i_1 = i then t₁ else t₂) =\n    ∏ i_1 in {i, j}, ↑↑(↑κ a) (if i_1 = i then t₁ else t₂)\nh_prod :\n  ∏ t in {i, j}, ↑↑(↑κ a) (if t = i then t₁ else t₂) =\n    ↑↑(↑κ a) (if i = i then t₁ else t₂) * ↑↑(↑κ a) (if j = i then t₁ else t₂)\n⊢ ↑↑(↑κ a) ((if i = i then t₁ else t₂) ∩ if j = i then t₁ else t₂) = ↑↑(↑κ a) (if i = i then t₁ else t₂) * ↑↑(↑κ a) t₂\n[PROOFSTEP]\nnth_rw 4 [h2]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\ns : ι → Set (Set Ω)\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndepSets s κ\ni j : ι\nhij : i ≠ j\nt₁ t₂ : Set Ω\nht₁ : t₁ ∈ s i\nht₂ : t₂ ∈ s j\nhf_m : ∀ (x : ι), x ∈ {i, j} → (if x = i then t₁ else t₂) ∈ s x\nh1 : t₁ = if i = i then t₁ else t₂\nh2 : t₂ = if j = i then t₁ else t₂\nh_inter : (⋂ (t : ι) (_ : t ∈ {i, j}), if t = i then t₁ else t₂) = (if i = i then t₁ else t₂) ∩ if j = i then t₁ else t₂\na : α\nh_indep' :\n  ↑↑(↑κ a) (⋂ (i_1 : ι) (_ : i_1 ∈ {i, j}), if i_1 = i then t₁ else t₂) =\n    ∏ i_1 in {i, j}, ↑↑(↑κ a) (if i_1 = i then t₁ else t₂)\nh_prod :\n  ∏ t in {i, j}, ↑↑(↑κ a) (if t = i then t₁ else t₂) =\n    ↑↑(↑κ a) (if i = i then t₁ else t₂) * ↑↑(↑κ a) (if j = i then t₁ else t₂)\n⊢ ↑↑(↑κ a) ((if i = i then t₁ else t₂) ∩ if j = i then t₁ else t₂) =\n    ↑↑(↑κ a) (if i = i then t₁ else t₂) * ↑↑(↑κ a) (if j = i then t₁ else t₂)\n[PROOFSTEP]\nrw [← h_inter, ← h_prod, h_indep']\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm : ι → MeasurableSpace Ω\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndep m κ\ni j : ι\nhij : i ≠ j\n⊢ Indep (m i) (m j) κ\n[PROOFSTEP]\nchange IndepSets ((fun x => MeasurableSet[m x]) i) ((fun x => MeasurableSet[m x]) j) κ μ\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm : ι → MeasurableSpace Ω\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : iIndep m κ\ni j : ι\nhij : i ≠ j\n⊢ IndepSets ((fun x => MeasurableSet) i) ((fun x => MeasurableSet) j) κ\n[PROOFSTEP]\nexact iIndepSets.indepSets h_indep hij\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrefine @induction_on_inter _ (fun t ↦ ∀ᵐ a ∂μ, κ a (t1 ∩ t) = κ a t1 * κ a t) _ m₂ hpm2 hp2 ?_ ?_ ?_ ?_ t2 ht2m\n[GOAL]\ncase refine_1\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\n⊢ (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t) ∅\n[PROOFSTEP]\nsimp only [Set.inter_empty, measure_empty, mul_zero, eq_self_iff_true, Filter.eventually_true]\n[GOAL]\ncase refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\n⊢ ∀ (t : Set Ω), t ∈ p2 → (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t) t\n[PROOFSTEP]\nexact fun t ht_mem_p2 ↦ hyp t1 t ht1 ht_mem_p2\n[GOAL]\ncase refine_3\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\n⊢ ∀ (t : Set Ω),\n    MeasurableSet t →\n      (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t) t →\n        (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t) tᶜ\n[PROOFSTEP]\nintros t ht h\n[GOAL]\ncase refine_3\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nt : Set Ω\nht : MeasurableSet t\nh : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ tᶜ) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) tᶜ\n[PROOFSTEP]\nfilter_upwards [h] with a ha\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nt : Set Ω\nht : MeasurableSet t\nh : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t\na : α\nha : ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t\n⊢ ↑↑(↑κ a) (t1 ∩ tᶜ) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) tᶜ\n[PROOFSTEP]\nhave : t1 ∩ tᶜ = t1 \\ (t1 ∩ t) := by rw [Set.diff_self_inter, Set.diff_eq_compl_inter, Set.inter_comm]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nt : Set Ω\nht : MeasurableSet t\nh : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t\na : α\nha : ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t\n⊢ t1 ∩ tᶜ = t1 \\ (t1 ∩ t)\n[PROOFSTEP]\nrw [Set.diff_self_inter, Set.diff_eq_compl_inter, Set.inter_comm]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nt : Set Ω\nht : MeasurableSet t\nh : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t\na : α\nha : ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t\nthis : t1 ∩ tᶜ = t1 \\ (t1 ∩ t)\n⊢ ↑↑(↑κ a) (t1 ∩ tᶜ) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) tᶜ\n[PROOFSTEP]\nrw [this, measure_diff (Set.inter_subset_left _ _) (ht1m.inter (h2 _ ht)) (measure_ne_top (κ a) _),\n  measure_compl (h2 _ ht) (measure_ne_top (κ a) t), measure_univ, ENNReal.mul_sub (fun _ _ ↦ measure_ne_top (κ a) _),\n  mul_one, ha]\n[GOAL]\ncase refine_4\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\n⊢ ∀ (f : ℕ → Set Ω),\n    Pairwise (Disjoint on f) →\n      (∀ (i : ℕ), MeasurableSet (f i)) →\n        (∀ (i : ℕ), (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t) (f i)) →\n          (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t) (⋃ (i : ℕ), f i)\n[PROOFSTEP]\nintros f hf_disj hf_meas h\n[GOAL]\ncase refine_4\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ (i : ℕ), (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t) (f i)\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ ⋃ (i : ℕ), f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (⋃ (i : ℕ), f i)\n[PROOFSTEP]\nrw [← ae_all_iff] at h \n[GOAL]\ncase refine_4\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ ⋃ (i : ℕ), f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (⋃ (i : ℕ), f i)\n[PROOFSTEP]\nfilter_upwards [h] with a ha\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\n⊢ ↑↑(↑κ a) (t1 ∩ ⋃ (i : ℕ), f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (⋃ (i : ℕ), f i)\n[PROOFSTEP]\nrw [Set.inter_iUnion, measure_iUnion]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\n⊢ ∑' (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (⋃ (i : ℕ), f i)\n[PROOFSTEP]\nrw [measure_iUnion hf_disj (fun i ↦ h2 _ (hf_meas i))]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\n⊢ ∑' (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ∑' (i : ℕ), ↑↑(↑κ a) (f i)\n[PROOFSTEP]\nrw [← ENNReal.tsum_mul_left]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\n⊢ ∑' (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ∑' (i : ℕ), ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\n[PROOFSTEP]\ncongr with i\n[GOAL]\ncase h.e_f.h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\ni : ℕ\n⊢ ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\n[PROOFSTEP]\nrw [ha i]\n[GOAL]\ncase h.hn\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\n⊢ Pairwise (Disjoint on fun i => t1 ∩ f i)\n[PROOFSTEP]\nintros i j hij\n[GOAL]\ncase h.hn\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\ni j : ℕ\nhij : i ≠ j\n⊢ (Disjoint on fun i => t1 ∩ f i) i j\n[PROOFSTEP]\nrw [Function.onFun, Set.inter_comm t1, Set.inter_comm t1]\n[GOAL]\ncase h.hn\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\ni j : ℕ\nhij : i ≠ j\n⊢ Disjoint (f i ∩ t1) (f j ∩ t1)\n[PROOFSTEP]\nexact Disjoint.inter_left _ (Disjoint.inter_right _ (hf_disj hij))\n[GOAL]\ncase h.h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm₂ m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh2 : m₂ ≤ m\nhp2 : IsPiSystem p2\nhpm2 : m₂ = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ p1\nht1m : MeasurableSet t1\nht2m : MeasurableSet t2\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (t1 ∩ f i) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) (f i)\n⊢ ∀ (i : ℕ), MeasurableSet (t1 ∩ f i)\n[PROOFSTEP]\nexact fun i ↦ ht1m.inter (h2 _ (hf_meas i))\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\n⊢ Indep m1 m2 κ\n[PROOFSTEP]\nintros t1 t2 ht1 ht2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrefine @induction_on_inter _ (fun t ↦ ∀ᵐ (a : α) ∂μ, κ a (t ∩ t2) = κ a t * κ a t2) _ m1 hpm1 hp1 ?_ ?_ ?_ ?_ _ ht1\n[GOAL]\ncase refine_1\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\n⊢ (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2) ∅\n[PROOFSTEP]\nsimp only [Set.empty_inter, measure_empty, zero_mul, eq_self_iff_true, Filter.eventually_true]\n[GOAL]\ncase refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\n⊢ ∀ (t : Set Ω), t ∈ p1 → (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2) t\n[PROOFSTEP]\nintros t ht_mem_p1\n[GOAL]\ncase refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nt : Set Ω\nht_mem_p1 : t ∈ p1\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2\n[PROOFSTEP]\nhave ht1 : MeasurableSet[m] t := by\n  refine h1 _ ?_\n  rw [hpm1]\n  exact measurableSet_generateFrom ht_mem_p1\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nt : Set Ω\nht_mem_p1 : t ∈ p1\n⊢ MeasurableSet t\n[PROOFSTEP]\nrefine h1 _ ?_\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nt : Set Ω\nht_mem_p1 : t ∈ p1\n⊢ MeasurableSet t\n[PROOFSTEP]\nrw [hpm1]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nt : Set Ω\nht_mem_p1 : t ∈ p1\n⊢ MeasurableSet t\n[PROOFSTEP]\nexact measurableSet_generateFrom ht_mem_p1\n[GOAL]\ncase refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1✝ : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nt : Set Ω\nht_mem_p1 : t ∈ p1\nht1 : MeasurableSet t\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2\n[PROOFSTEP]\nexact IndepSets.indep_aux h2 hp2 hpm2 hyp ht_mem_p1 ht1 ht2\n[GOAL]\ncase refine_3\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\n⊢ ∀ (t : Set Ω),\n    MeasurableSet t →\n      (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2) t →\n        (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2) tᶜ\n[PROOFSTEP]\nintros t ht h\n[GOAL]\ncase refine_3\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nt : Set Ω\nht : MeasurableSet t\nh : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (tᶜ ∩ t2) = ↑↑(↑κ a) tᶜ * ↑↑(↑κ a) t2\n[PROOFSTEP]\nfilter_upwards [h] with a ha\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nt : Set Ω\nht : MeasurableSet t\nh : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2\na : α\nha : ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2\n⊢ ↑↑(↑κ a) (tᶜ ∩ t2) = ↑↑(↑κ a) tᶜ * ↑↑(↑κ a) t2\n[PROOFSTEP]\nhave : tᶜ ∩ t2 = t2 \\ (t ∩ t2) := by rw [Set.inter_comm t, Set.diff_self_inter, Set.diff_eq_compl_inter]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nt : Set Ω\nht : MeasurableSet t\nh : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2\na : α\nha : ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2\n⊢ tᶜ ∩ t2 = t2 \\ (t ∩ t2)\n[PROOFSTEP]\nrw [Set.inter_comm t, Set.diff_self_inter, Set.diff_eq_compl_inter]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nt : Set Ω\nht : MeasurableSet t\nh : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2\na : α\nha : ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2\nthis : tᶜ ∩ t2 = t2 \\ (t ∩ t2)\n⊢ ↑↑(↑κ a) (tᶜ ∩ t2) = ↑↑(↑κ a) tᶜ * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrw [this, Set.inter_comm t t2,\n  measure_diff (Set.inter_subset_left _ _) ((h2 _ ht2).inter (h1 _ ht)) (measure_ne_top (κ a) _), Set.inter_comm, ha,\n  measure_compl (h1 _ ht) (measure_ne_top (κ a) t), measure_univ, mul_comm (1 - κ a t),\n  ENNReal.mul_sub (fun _ _ ↦ measure_ne_top (κ a) _), mul_one, mul_comm]\n[GOAL]\ncase refine_4\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\n⊢ ∀ (f : ℕ → Set Ω),\n    Pairwise (Disjoint on f) →\n      (∀ (i : ℕ), MeasurableSet (f i)) →\n        (∀ (i : ℕ), (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2) (f i)) →\n          (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2) (⋃ (i : ℕ), f i)\n[PROOFSTEP]\nintros f hf_disj hf_meas h\n[GOAL]\ncase refine_4\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ (i : ℕ), (fun t => ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t ∩ t2) = ↑↑(↑κ a) t * ↑↑(↑κ a) t2) (f i)\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) ((⋃ (i : ℕ), f i) ∩ t2) = ↑↑(↑κ a) (⋃ (i : ℕ), f i) * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrw [← ae_all_iff] at h \n[GOAL]\ncase refine_4\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) ((⋃ (i : ℕ), f i) ∩ t2) = ↑↑(↑κ a) (⋃ (i : ℕ), f i) * ↑↑(↑κ a) t2\n[PROOFSTEP]\nfilter_upwards [h] with a ha\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\n⊢ ↑↑(↑κ a) ((⋃ (i : ℕ), f i) ∩ t2) = ↑↑(↑κ a) (⋃ (i : ℕ), f i) * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrw [Set.inter_comm, Set.inter_iUnion, measure_iUnion]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\n⊢ ∑' (i : ℕ), ↑↑(↑κ a) (t2 ∩ f i) = ↑↑(↑κ a) (⋃ (i : ℕ), f i) * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrw [measure_iUnion hf_disj (fun i ↦ h1 _ (hf_meas i))]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\n⊢ ∑' (i : ℕ), ↑↑(↑κ a) (t2 ∩ f i) = (∑' (i : ℕ), ↑↑(↑κ a) (f i)) * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrw [← ENNReal.tsum_mul_right]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\n⊢ ∑' (i : ℕ), ↑↑(↑κ a) (t2 ∩ f i) = ∑' (i : ℕ), ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\n[PROOFSTEP]\ncongr 1 with i\n[GOAL]\ncase h.e_f.h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\ni : ℕ\n⊢ ↑↑(↑κ a) (t2 ∩ f i) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrw [Set.inter_comm t2, ha i]\n[GOAL]\ncase h.hn\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\n⊢ Pairwise (Disjoint on fun i => t2 ∩ f i)\n[PROOFSTEP]\nintros i j hij\n[GOAL]\ncase h.hn\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\ni j : ℕ\nhij : i ≠ j\n⊢ (Disjoint on fun i => t2 ∩ f i) i j\n[PROOFSTEP]\nrw [Function.onFun, Set.inter_comm t2, Set.inter_comm t2]\n[GOAL]\ncase h.hn\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\ni j : ℕ\nhij : i ≠ j\n⊢ Disjoint (f i ∩ t2) (f j ∩ t2)\n[PROOFSTEP]\nexact Disjoint.inter_left _ (Disjoint.inter_right _ (hf_disj hij))\n[GOAL]\ncase h.h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\nm1 m2 m : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\np1 p2 : Set (Set Ω)\nh1 : m1 ≤ m\nh2 : m2 ≤ m\nhp1 : IsPiSystem p1\nhp2 : IsPiSystem p2\nhpm1 : m1 = generateFrom p1\nhpm2 : m2 = generateFrom p2\nhyp : IndepSets p1 p2 κ\nt1 t2 : Set Ω\nht1 : t1 ∈ {s | MeasurableSet s}\nht2 : t2 ∈ {s | MeasurableSet s}\nf : ℕ → Set Ω\nhf_disj : Pairwise (Disjoint on f)\nhf_meas : ∀ (i : ℕ), MeasurableSet (f i)\nh : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\na : α\nha : ∀ (i : ℕ), ↑↑(↑κ a) (f i ∩ t2) = ↑↑(↑κ a) (f i) * ↑↑(↑κ a) t2\n⊢ ∀ (i : ℕ), MeasurableSet (t2 ∩ f i)\n[PROOFSTEP]\nexact fun i ↦ (h2 _ ht2).inter (h1 _ (hf_meas i))\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\n⊢ IndepSets (piiUnionInter s S) (piiUnionInter s T) κ\n[PROOFSTEP]\nrintro t1 t2 ⟨p1, hp1, f1, ht1_m, ht1_eq⟩ ⟨p2, hp2, f2, ht2_m, ht2_eq⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nclassical\nlet g i := ite (i ∈ p1) (f1 i) Set.univ ∩ ite (i ∈ p2) (f2 i) Set.univ\nhave h_P_inter : ∀ᵐ a ∂μ, κ a (t1 ∩ t2) = ∏ n in p1 ∪ p2, κ a (g n) :=\n  by\n  have hgm : ∀ i ∈ p1 ∪ p2, g i ∈ s i := by\n    intro i hi_mem_union\n    rw [Finset.mem_union] at hi_mem_union \n    cases' hi_mem_union with hi1 hi2\n    · have hi2 : i ∉ p2 := fun hip2 => Set.disjoint_left.mp hST (hp1 hi1) (hp2 hip2)\n      simp_rw [if_pos hi1, if_neg hi2, Set.inter_univ]\n      exact ht1_m i hi1\n    · have hi1 : i ∉ p1 := fun hip1 => Set.disjoint_right.mp hST (hp2 hi2) (hp1 hip1)\n      simp_rw [if_neg hi1, if_pos hi2, Set.univ_inter]\n      exact ht2_m i hi2\n  have h_p1_inter_p2 :\n    ((⋂ x ∈ p1, f1 x) ∩ ⋂ x ∈ p2, f2 x) = ⋂ i ∈ p1 ∪ p2, ite (i ∈ p1) (f1 i) Set.univ ∩ ite (i ∈ p2) (f2 i) Set.univ :=\n    by\n    ext1 x\n    simp only [Set.mem_ite_univ_right, Set.mem_inter_iff, Set.mem_iInter, Finset.mem_union]\n    exact\n      ⟨fun h i _ => ⟨h.1 i, h.2 i⟩, fun h => ⟨fun i hi => (h i (Or.inl hi)).1 hi, fun i hi => (h i (Or.inr hi)).2 hi⟩⟩\n  filter_upwards [h_indep _ hgm] with a ha\n  rw [ht1_eq, ht2_eq, h_p1_inter_p2, ← ha]\nfilter_upwards [h_P_inter, h_indep p1 ht1_m, h_indep p2 ht2_m] with a h_P_inter ha1 ha2\nhave h_μg : ∀ n, κ a (g n) = (ite (n ∈ p1) (κ a (f1 n)) 1) * (ite (n ∈ p2) (κ a (f2 n)) 1) :=\n  by\n  intro n\n  dsimp only\n  split_ifs with h1 h2\n  · exact absurd rfl (Set.disjoint_iff_forall_ne.mp hST (hp1 h1) (hp2 h2))\n  all_goals simp only [measure_univ, one_mul, mul_one, Set.inter_univ, Set.univ_inter]\nsimp_rw [h_P_inter, h_μg, Finset.prod_mul_distrib, Finset.prod_ite_mem (p1 ∪ p2) p1 (fun x ↦ κ a (f1 x)),\n  Finset.union_inter_cancel_left, Finset.prod_ite_mem (p1 ∪ p2) p2 (fun x => κ a (f2 x)),\n  Finset.union_inter_cancel_right, ht1_eq, ← ha1, ht2_eq, ← ha2]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nlet g i := ite (i ∈ p1) (f1 i) Set.univ ∩ ite (i ∈ p2) (f2 i) Set.univ\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nhave h_P_inter : ∀ᵐ a ∂μ, κ a (t1 ∩ t2) = ∏ n in p1 ∪ p2, κ a (g n) :=\n  by\n  have hgm : ∀ i ∈ p1 ∪ p2, g i ∈ s i := by\n    intro i hi_mem_union\n    rw [Finset.mem_union] at hi_mem_union \n    cases' hi_mem_union with hi1 hi2\n    · have hi2 : i ∉ p2 := fun hip2 => Set.disjoint_left.mp hST (hp1 hi1) (hp2 hip2)\n      simp_rw [if_pos hi1, if_neg hi2, Set.inter_univ]\n      exact ht1_m i hi1\n    · have hi1 : i ∉ p1 := fun hip1 => Set.disjoint_right.mp hST (hp2 hi2) (hp1 hip1)\n      simp_rw [if_neg hi1, if_pos hi2, Set.univ_inter]\n      exact ht2_m i hi2\n  have h_p1_inter_p2 :\n    ((⋂ x ∈ p1, f1 x) ∩ ⋂ x ∈ p2, f2 x) = ⋂ i ∈ p1 ∪ p2, ite (i ∈ p1) (f1 i) Set.univ ∩ ite (i ∈ p2) (f2 i) Set.univ :=\n    by\n    ext1 x\n    simp only [Set.mem_ite_univ_right, Set.mem_inter_iff, Set.mem_iInter, Finset.mem_union]\n    exact\n      ⟨fun h i _ => ⟨h.1 i, h.2 i⟩, fun h => ⟨fun i hi => (h i (Or.inl hi)).1 hi, fun i hi => (h i (Or.inr hi)).2 hi⟩⟩\n  filter_upwards [h_indep _ hgm] with a ha\n  rw [ht1_eq, ht2_eq, h_p1_inter_p2, ← ha]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\n[PROOFSTEP]\nhave hgm : ∀ i ∈ p1 ∪ p2, g i ∈ s i := by\n  intro i hi_mem_union\n  rw [Finset.mem_union] at hi_mem_union \n  cases' hi_mem_union with hi1 hi2\n  · have hi2 : i ∉ p2 := fun hip2 => Set.disjoint_left.mp hST (hp1 hi1) (hp2 hip2)\n    simp_rw [if_pos hi1, if_neg hi2, Set.inter_univ]\n    exact ht1_m i hi1\n  · have hi1 : i ∉ p1 := fun hip1 => Set.disjoint_right.mp hST (hp2 hi2) (hp1 hip1)\n    simp_rw [if_neg hi1, if_pos hi2, Set.univ_inter]\n    exact ht2_m i hi2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\n⊢ ∀ (i : ι), i ∈ p1 ∪ p2 → g i ∈ s i\n[PROOFSTEP]\nintro i hi_mem_union\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\ni : ι\nhi_mem_union : i ∈ p1 ∪ p2\n⊢ g i ∈ s i\n[PROOFSTEP]\nrw [Finset.mem_union] at hi_mem_union \n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\ni : ι\nhi_mem_union : i ∈ p1 ∨ i ∈ p2\n⊢ g i ∈ s i\n[PROOFSTEP]\ncases' hi_mem_union with hi1 hi2\n[GOAL]\ncase inl\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\ni : ι\nhi1 : i ∈ p1\n⊢ g i ∈ s i\n[PROOFSTEP]\nhave hi2 : i ∉ p2 := fun hip2 => Set.disjoint_left.mp hST (hp1 hi1) (hp2 hip2)\n[GOAL]\ncase inl\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\ni : ι\nhi1 : i ∈ p1\nhi2 : ¬i ∈ p2\n⊢ g i ∈ s i\n[PROOFSTEP]\nsimp_rw [if_pos hi1, if_neg hi2, Set.inter_univ]\n[GOAL]\ncase inl\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\ni : ι\nhi1 : i ∈ p1\nhi2 : ¬i ∈ p2\n⊢ f1 i ∈ s i\n[PROOFSTEP]\nexact ht1_m i hi1\n[GOAL]\ncase inr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\ni : ι\nhi2 : i ∈ p2\n⊢ g i ∈ s i\n[PROOFSTEP]\nhave hi1 : i ∉ p1 := fun hip1 => Set.disjoint_right.mp hST (hp2 hi2) (hp1 hip1)\n[GOAL]\ncase inr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\ni : ι\nhi2 : i ∈ p2\nhi1 : ¬i ∈ p1\n⊢ g i ∈ s i\n[PROOFSTEP]\nsimp_rw [if_neg hi1, if_pos hi2, Set.univ_inter]\n[GOAL]\ncase inr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\ni : ι\nhi2 : i ∈ p2\nhi1 : ¬i ∈ p1\n⊢ f2 i ∈ s i\n[PROOFSTEP]\nexact ht2_m i hi2\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nhgm : ∀ (i : ι), i ∈ p1 ∪ p2 → g i ∈ s i\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\n[PROOFSTEP]\nhave h_p1_inter_p2 :\n  ((⋂ x ∈ p1, f1 x) ∩ ⋂ x ∈ p2, f2 x) = ⋂ i ∈ p1 ∪ p2, ite (i ∈ p1) (f1 i) Set.univ ∩ ite (i ∈ p2) (f2 i) Set.univ :=\n  by\n  ext1 x\n  simp only [Set.mem_ite_univ_right, Set.mem_inter_iff, Set.mem_iInter, Finset.mem_union]\n  exact ⟨fun h i _ => ⟨h.1 i, h.2 i⟩, fun h => ⟨fun i hi => (h i (Or.inl hi)).1 hi, fun i hi => (h i (Or.inr hi)).2 hi⟩⟩\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nhgm : ∀ (i : ι), i ∈ p1 ∪ p2 → g i ∈ s i\n⊢ (⋂ (x : ι) (_ : x ∈ p1), f1 x) ∩ ⋂ (x : ι) (_ : x ∈ p2), f2 x =\n    ⋂ (i : ι) (_ : i ∈ p1 ∪ p2), (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nhgm : ∀ (i : ι), i ∈ p1 ∪ p2 → g i ∈ s i\nx : Ω\n⊢ x ∈ (⋂ (x : ι) (_ : x ∈ p1), f1 x) ∩ ⋂ (x : ι) (_ : x ∈ p2), f2 x ↔\n    x ∈ ⋂ (i : ι) (_ : i ∈ p1 ∪ p2), (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\n[PROOFSTEP]\nsimp only [Set.mem_ite_univ_right, Set.mem_inter_iff, Set.mem_iInter, Finset.mem_union]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nhgm : ∀ (i : ι), i ∈ p1 ∪ p2 → g i ∈ s i\nx : Ω\n⊢ ((∀ (i : ι), i ∈ p1 → x ∈ f1 i) ∧ ∀ (i : ι), i ∈ p2 → x ∈ f2 i) ↔\n    ∀ (i : ι), i ∈ p1 ∨ i ∈ p2 → (i ∈ p1 → x ∈ f1 i) ∧ (i ∈ p2 → x ∈ f2 i)\n[PROOFSTEP]\nexact ⟨fun h i _ => ⟨h.1 i, h.2 i⟩, fun h => ⟨fun i hi => (h i (Or.inl hi)).1 hi, fun i hi => (h i (Or.inr hi)).2 hi⟩⟩\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nhgm : ∀ (i : ι), i ∈ p1 ∪ p2 → g i ∈ s i\nh_p1_inter_p2 :\n  (⋂ (x : ι) (_ : x ∈ p1), f1 x) ∩ ⋂ (x : ι) (_ : x ∈ p2), f2 x =\n    ⋂ (i : ι) (_ : i ∈ p1 ∪ p2), (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\n[PROOFSTEP]\nfilter_upwards [h_indep _ hgm] with a ha\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nhgm : ∀ (i : ι), i ∈ p1 ∪ p2 → g i ∈ s i\nh_p1_inter_p2 :\n  (⋂ (x : ι) (_ : x ∈ p1), f1 x) ∩ ⋂ (x : ι) (_ : x ∈ p2), f2 x =\n    ⋂ (i : ι) (_ : i ∈ p1 ∪ p2), (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\na : α\nha :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1 ∪ p2), (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ) =\n    ∏ i in p1 ∪ p2, ↑↑(↑κ a) ((if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ)\n⊢ ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\n[PROOFSTEP]\nrw [ht1_eq, ht2_eq, h_p1_inter_p2, ← ha]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nfilter_upwards [h_P_inter, h_indep p1 ht1_m, h_indep p2 ht2_m] with a h_P_inter ha1 ha2\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter✝ : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\na : α\nh_P_inter :\n  ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\nha1 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1), f1 i) = ∏ i in p1, ↑↑(↑κ a) (f1 i)\nha2 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p2), f2 i) = ∏ i in p2, ↑↑(↑κ a) (f2 i)\n⊢ ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nhave h_μg : ∀ n, κ a (g n) = (ite (n ∈ p1) (κ a (f1 n)) 1) * (ite (n ∈ p2) (κ a (f2 n)) 1) :=\n  by\n  intro n\n  dsimp only\n  split_ifs with h1 h2\n  · exact absurd rfl (Set.disjoint_iff_forall_ne.mp hST (hp1 h1) (hp2 h2))\n  all_goals simp only [measure_univ, one_mul, mul_one, Set.inter_univ, Set.univ_inter]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter✝ : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\na : α\nh_P_inter :\n  ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\nha1 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1), f1 i) = ∏ i in p1, ↑↑(↑κ a) (f1 i)\nha2 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p2), f2 i) = ∏ i in p2, ↑↑(↑κ a) (f2 i)\n⊢ ∀ (n : ι), ↑↑(↑κ a) (g n) = (if n ∈ p1 then ↑↑(↑κ a) (f1 n) else 1) * if n ∈ p2 then ↑↑(↑κ a) (f2 n) else 1\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter✝ : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\na : α\nh_P_inter :\n  ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\nha1 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1), f1 i) = ∏ i in p1, ↑↑(↑κ a) (f1 i)\nha2 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p2), f2 i) = ∏ i in p2, ↑↑(↑κ a) (f2 i)\nn : ι\n⊢ ↑↑(↑κ a) (g n) = (if n ∈ p1 then ↑↑(↑κ a) (f1 n) else 1) * if n ∈ p2 then ↑↑(↑κ a) (f2 n) else 1\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter✝ : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\na : α\nh_P_inter :\n  ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\nha1 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1), f1 i) = ∏ i in p1, ↑↑(↑κ a) (f1 i)\nha2 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p2), f2 i) = ∏ i in p2, ↑↑(↑κ a) (f2 i)\nn : ι\n⊢ ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ) =\n    (if n ∈ p1 then ↑↑(↑κ a) (f1 n) else 1) * if n ∈ p2 then ↑↑(↑κ a) (f2 n) else 1\n[PROOFSTEP]\nsplit_ifs with h1 h2\n[GOAL]\ncase pos\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter✝ : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\na : α\nh_P_inter :\n  ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\nha1 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1), f1 i) = ∏ i in p1, ↑↑(↑κ a) (f1 i)\nha2 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p2), f2 i) = ∏ i in p2, ↑↑(↑κ a) (f2 i)\nn : ι\nh1 : n ∈ p1\nh2 : n ∈ p2\n⊢ ↑↑(↑κ a) (f1 n ∩ f2 n) = ↑↑(↑κ a) (f1 n) * ↑↑(↑κ a) (f2 n)\n[PROOFSTEP]\nexact absurd rfl (Set.disjoint_iff_forall_ne.mp hST (hp1 h1) (hp2 h2))\n[GOAL]\ncase neg\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter✝ : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\na : α\nh_P_inter :\n  ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\nha1 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1), f1 i) = ∏ i in p1, ↑↑(↑κ a) (f1 i)\nha2 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p2), f2 i) = ∏ i in p2, ↑↑(↑κ a) (f2 i)\nn : ι\nh1 : n ∈ p1\nh2 : ¬n ∈ p2\n⊢ ↑↑(↑κ a) (f1 n ∩ Set.univ) = ↑↑(↑κ a) (f1 n) * 1\ncase pos\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter✝ : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\na : α\nh_P_inter :\n  ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\nha1 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1), f1 i) = ∏ i in p1, ↑↑(↑κ a) (f1 i)\nha2 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p2), f2 i) = ∏ i in p2, ↑↑(↑κ a) (f2 i)\nn : ι\nh1 : ¬n ∈ p1\nh✝ : n ∈ p2\n⊢ ↑↑(↑κ a) (Set.univ ∩ f2 n) = 1 * ↑↑(↑κ a) (f2 n)\ncase neg\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter✝ : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\na : α\nh_P_inter :\n  ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\nha1 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1), f1 i) = ∏ i in p1, ↑↑(↑κ a) (f1 i)\nha2 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p2), f2 i) = ∏ i in p2, ↑↑(↑κ a) (f2 i)\nn : ι\nh1 : ¬n ∈ p1\nh✝ : ¬n ∈ p2\n⊢ ↑↑(↑κ a) (Set.univ ∩ Set.univ) = 1 * 1\n[PROOFSTEP]\nall_goals simp only [measure_univ, one_mul, mul_one, Set.inter_univ, Set.univ_inter]\n[GOAL]\ncase neg\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter✝ : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\na : α\nh_P_inter :\n  ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\nha1 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1), f1 i) = ∏ i in p1, ↑↑(↑κ a) (f1 i)\nha2 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p2), f2 i) = ∏ i in p2, ↑↑(↑κ a) (f2 i)\nn : ι\nh1 : n ∈ p1\nh2 : ¬n ∈ p2\n⊢ ↑↑(↑κ a) (f1 n ∩ Set.univ) = ↑↑(↑κ a) (f1 n) * 1\n[PROOFSTEP]\nsimp only [measure_univ, one_mul, mul_one, Set.inter_univ, Set.univ_inter]\n[GOAL]\ncase pos\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter✝ : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\na : α\nh_P_inter :\n  ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\nha1 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1), f1 i) = ∏ i in p1, ↑↑(↑κ a) (f1 i)\nha2 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p2), f2 i) = ∏ i in p2, ↑↑(↑κ a) (f2 i)\nn : ι\nh1 : ¬n ∈ p1\nh✝ : n ∈ p2\n⊢ ↑↑(↑κ a) (Set.univ ∩ f2 n) = 1 * ↑↑(↑κ a) (f2 n)\n[PROOFSTEP]\nsimp only [measure_univ, one_mul, mul_one, Set.inter_univ, Set.univ_inter]\n[GOAL]\ncase neg\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter✝ : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\na : α\nh_P_inter :\n  ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\nha1 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1), f1 i) = ∏ i in p1, ↑↑(↑κ a) (f1 i)\nha2 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p2), f2 i) = ∏ i in p2, ↑↑(↑κ a) (f2 i)\nn : ι\nh1 : ¬n ∈ p1\nh✝ : ¬n ∈ p2\n⊢ ↑↑(↑κ a) (Set.univ ∩ Set.univ) = 1 * 1\n[PROOFSTEP]\nsimp only [measure_univ, one_mul, mul_one, Set.inter_univ, Set.univ_inter]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set (Set Ω)\nS T : Set ι\nh_indep : iIndepSets s κ\nhST : Disjoint S T\nt1 t2 : Set Ω\np1 : Finset ι\nhp1 : ↑p1 ⊆ S\nf1 : ι → Set Ω\nht1_m : ∀ (x : ι), x ∈ p1 → f1 x ∈ s x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ p1), f1 x\np2 : Finset ι\nhp2 : ↑p2 ⊆ T\nf2 : ι → Set Ω\nht2_m : ∀ (x : ι), x ∈ p2 → f2 x ∈ s x\nht2_eq : t2 = ⋂ (x : ι) (_ : x ∈ p2), f2 x\ng : ι → Set Ω := fun i => (if i ∈ p1 then f1 i else Set.univ) ∩ if i ∈ p2 then f2 i else Set.univ\nh_P_inter✝ : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ∏ n in p1 ∪ p2, ↑↑(↑κ a) (g n)\na : α\nh_P_inter :\n  ↑↑(↑κ a) (t1 ∩ t2) =\n    ∏ n in p1 ∪ p2, ↑↑(↑κ a) ((if n ∈ p1 then f1 n else Set.univ) ∩ if n ∈ p2 then f2 n else Set.univ)\nha1 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p1), f1 i) = ∏ i in p1, ↑↑(↑κ a) (f1 i)\nha2 : ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ p2), f2 i) = ∏ i in p2, ↑↑(↑κ a) (f2 i)\nh_μg : ∀ (n : ι), ↑↑(↑κ a) (g n) = (if n ∈ p1 then ↑↑(↑κ a) (f1 n) else 1) * if n ∈ p2 then ↑↑(↑κ a) (f2 n) else 1\n⊢ ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nsimp_rw [h_P_inter, h_μg, Finset.prod_mul_distrib, Finset.prod_ite_mem (p1 ∪ p2) p1 (fun x ↦ κ a (f1 x)),\n  Finset.union_inter_cancel_left, Finset.prod_ite_mem (p1 ∪ p2) p2 (fun x => κ a (f2 x)),\n  Finset.union_inter_cancel_right, ht1_eq, ← ha1, ht2_eq, ← ha2]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set Ω\nhsm : ∀ (n : ι), MeasurableSet (s n)\nhs : iIndepSet s κ\nS T : Set ι\nhST : Disjoint S T\n⊢ Indep (generateFrom {t | ∃ n, n ∈ S ∧ s n = t}) (generateFrom {t | ∃ k, k ∈ T ∧ s k = t}) κ\n[PROOFSTEP]\nrw [← generateFrom_piiUnionInter_singleton_left, ← generateFrom_piiUnionInter_singleton_left]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set Ω\nhsm : ∀ (n : ι), MeasurableSet (s n)\nhs : iIndepSet s κ\nS T : Set ι\nhST : Disjoint S T\n⊢ Indep (generateFrom (piiUnionInter (fun k => {s k}) S)) (generateFrom (piiUnionInter (fun k => {s k}) T)) κ\n[PROOFSTEP]\nrefine'\n  IndepSets.indep' (fun t ht => generateFrom_piiUnionInter_le _ _ _ _ (measurableSet_generateFrom ht))\n    (fun t ht => generateFrom_piiUnionInter_le _ _ _ _ (measurableSet_generateFrom ht)) _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set Ω\nhsm : ∀ (n : ι), MeasurableSet (s n)\nhs : iIndepSet s κ\nS T : Set ι\nhST : Disjoint S T\nt : Set Ω\nht : t ∈ piiUnionInter (fun k => {s k}) S\n⊢ ∀ (n : ι), generateFrom {s n} ≤ _mΩ\n[PROOFSTEP]\nexact fun k => generateFrom_le fun t ht => (Set.mem_singleton_iff.1 ht).symm ▸ hsm k\n[GOAL]\ncase refine'_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set Ω\nhsm : ∀ (n : ι), MeasurableSet (s n)\nhs : iIndepSet s κ\nS T : Set ι\nhST : Disjoint S T\nt : Set Ω\nht : t ∈ piiUnionInter (fun k => {s k}) T\n⊢ ∀ (n : ι), generateFrom {s n} ≤ _mΩ\n[PROOFSTEP]\nexact fun k => generateFrom_le fun t ht => (Set.mem_singleton_iff.1 ht).symm ▸ hsm k\n[GOAL]\ncase refine'_3\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set Ω\nhsm : ∀ (n : ι), MeasurableSet (s n)\nhs : iIndepSet s κ\nS T : Set ι\nhST : Disjoint S T\n⊢ IsPiSystem (piiUnionInter (fun k => {s k}) S)\n[PROOFSTEP]\nexact isPiSystem_piiUnionInter _ (fun k => IsPiSystem.singleton _) _\n[GOAL]\ncase refine'_4\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set Ω\nhsm : ∀ (n : ι), MeasurableSet (s n)\nhs : iIndepSet s κ\nS T : Set ι\nhST : Disjoint S T\n⊢ IsPiSystem (piiUnionInter (fun k => {s k}) T)\n[PROOFSTEP]\nexact isPiSystem_piiUnionInter _ (fun k => IsPiSystem.singleton _) _\n[GOAL]\ncase refine'_5\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set Ω\nhsm : ∀ (n : ι), MeasurableSet (s n)\nhs : iIndepSet s κ\nS T : Set ι\nhST : Disjoint S T\n⊢ IndepSets (piiUnionInter (fun k => {s k}) S) (piiUnionInter (fun k => {s k}) T) κ\n[PROOFSTEP]\nclassical exact indepSets_piiUnionInter_of_disjoint (iIndep.iIndepSets (fun n => rfl) hs) hST\n[GOAL]\ncase refine'_5\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\ns : ι → Set Ω\nhsm : ∀ (n : ι), MeasurableSet (s n)\nhs : iIndepSet s κ\nS T : Set ι\nhST : Disjoint S T\n⊢ IndepSets (piiUnionInter (fun k => {s k}) S) (piiUnionInter (fun k => {s k}) T) κ\n[PROOFSTEP]\nexact indepSets_piiUnionInter_of_disjoint (iIndep.iIndepSets (fun n => rfl) hs) hST\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nh_indep : iIndep m κ\nS T : Set ι\nhST : Disjoint S T\n⊢ Indep (⨆ (i : ι) (_ : i ∈ S), m i) (⨆ (i : ι) (_ : i ∈ T), m i) κ\n[PROOFSTEP]\nrefine'\n  IndepSets.indep (iSup₂_le fun i _ => h_le i) (iSup₂_le fun i _ => h_le i) _ _\n    (generateFrom_piiUnionInter_measurableSet m S).symm (generateFrom_piiUnionInter_measurableSet m T).symm _\n[GOAL]\ncase refine'_1\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nh_indep : iIndep m κ\nS T : Set ι\nhST : Disjoint S T\n⊢ IsPiSystem (piiUnionInter (fun n => {s | MeasurableSet s}) S)\n[PROOFSTEP]\nexact isPiSystem_piiUnionInter _ (fun n => @isPiSystem_measurableSet Ω (m n)) _\n[GOAL]\ncase refine'_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nh_indep : iIndep m κ\nS T : Set ι\nhST : Disjoint S T\n⊢ IsPiSystem (piiUnionInter (fun n => {s | MeasurableSet s}) T)\n[PROOFSTEP]\nexact isPiSystem_piiUnionInter _ (fun n => @isPiSystem_measurableSet Ω (m n)) _\n[GOAL]\ncase refine'_3\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nh_indep : iIndep m κ\nS T : Set ι\nhST : Disjoint S T\n⊢ IndepSets (piiUnionInter (fun n => {s | MeasurableSet s}) S) (piiUnionInter (fun n => {s | MeasurableSet s}) T) κ\n[PROOFSTEP]\nclassical exact indepSets_piiUnionInter_of_disjoint h_indep hST\n[GOAL]\ncase refine'_3\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nh_indep : iIndep m κ\nS T : Set ι\nhST : Disjoint S T\n⊢ IndepSets (piiUnionInter (fun n => {s | MeasurableSet s}) S) (piiUnionInter (fun n => {s | MeasurableSet s}) T) κ\n[PROOFSTEP]\nexact indepSets_piiUnionInter_of_disjoint h_indep hST\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\n⊢ Indep (⨆ (i : ι), m i) m' κ\n[PROOFSTEP]\nlet p : ι → Set (Set Ω) := fun n => {t | MeasurableSet[m n] t}\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\n⊢ Indep (⨆ (i : ι), m i) m' κ\n[PROOFSTEP]\nhave hp : ∀ n, IsPiSystem (p n) := fun n => @isPiSystem_measurableSet Ω (m n)\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\n⊢ Indep (⨆ (i : ι), m i) m' κ\n[PROOFSTEP]\nhave h_gen_n : ∀ n, m n = generateFrom (p n) := fun n => (@generateFrom_measurableSet Ω (m n)).symm\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\n⊢ Indep (⨆ (i : ι), m i) m' κ\n[PROOFSTEP]\nhave hp_supr_pi : IsPiSystem (⋃ n, p n) := isPiSystem_iUnion_of_directed_le p hp hm\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\n⊢ Indep (⨆ (i : ι), m i) m' κ\n[PROOFSTEP]\nlet p' := {t : Set Ω | MeasurableSet[m'] t}\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\np' : Set (Set Ω) := {t | MeasurableSet t}\n⊢ Indep (⨆ (i : ι), m i) m' κ\n[PROOFSTEP]\nhave hp'_pi : IsPiSystem p' := @isPiSystem_measurableSet Ω m'\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\np' : Set (Set Ω) := {t | MeasurableSet t}\nhp'_pi : IsPiSystem p'\n⊢ Indep (⨆ (i : ι), m i) m' κ\n[PROOFSTEP]\nhave h_gen' : m' = generateFrom p' := (@generateFrom_measurableSet Ω m').symm\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\np' : Set (Set Ω) := {t | MeasurableSet t}\nhp'_pi : IsPiSystem p'\nh_gen' : m' = generateFrom p'\n⊢ Indep (⨆ (i : ι), m i) m' κ\n[PROOFSTEP]\nhave h_pi_system_indep : IndepSets (⋃ n, p n) p' κ μ :=\n  by\n  refine IndepSets.iUnion ?_\n  conv at h_indep =>\n    intro i\n    rw [h_gen_n i, h_gen']\n  exact fun n => (h_indep n).indepSets\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\np' : Set (Set Ω) := {t | MeasurableSet t}\nhp'_pi : IsPiSystem p'\nh_gen' : m' = generateFrom p'\n⊢ IndepSets (⋃ (n : ι), p n) p' κ\n[PROOFSTEP]\nrefine IndepSets.iUnion ?_\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\np' : Set (Set Ω) := {t | MeasurableSet t}\nhp'_pi : IsPiSystem p'\nh_gen' : m' = generateFrom p'\n⊢ ∀ (n : ι), IndepSets (p n) p' κ\n[PROOFSTEP]\nconv at h_indep =>\n  intro i\n  rw [h_gen_n i, h_gen']\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\np' : Set (Set Ω) := {t | MeasurableSet t}\nhp'_pi : IsPiSystem p'\nh_gen' : m' = generateFrom p'\n| ∀ (i : ι), Indep (m i) m' κ\n[PROOFSTEP]\n  intro i\n  rw [h_gen_n i, h_gen']\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\np' : Set (Set Ω) := {t | MeasurableSet t}\nhp'_pi : IsPiSystem p'\nh_gen' : m' = generateFrom p'\n| ∀ (i : ι), Indep (m i) m' κ\n[PROOFSTEP]\n  intro i\n  rw [h_gen_n i, h_gen']\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\np' : Set (Set Ω) := {t | MeasurableSet t}\nhp'_pi : IsPiSystem p'\nh_gen' : m' = generateFrom p'\n| ∀ (i : ι), Indep (m i) m' κ\n[PROOFSTEP]\nintro i\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\np' : Set (Set Ω) := {t | MeasurableSet t}\nhp'_pi : IsPiSystem p'\nh_gen' : m' = generateFrom p'\ni : ι\n| Indep (m i) m' κ\n[PROOFSTEP]\nrw [h_gen_n i, h_gen']\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\np' : Set (Set Ω) := {t | MeasurableSet t}\nh_indep : ∀ (i : ι), Indep (generateFrom (p i)) (generateFrom p') κ\nhp'_pi : IsPiSystem p'\nh_gen' : m' = generateFrom p'\n⊢ ∀ (n : ι), IndepSets (p n) p' κ\n[PROOFSTEP]\nexact fun n => (h_indep n).indepSets\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\np' : Set (Set Ω) := {t | MeasurableSet t}\nhp'_pi : IsPiSystem p'\nh_gen' : m' = generateFrom p'\nh_pi_system_indep : IndepSets (⋃ (n : ι), p n) p' κ\n⊢ Indep (⨆ (i : ι), m i) m' κ\n[PROOFSTEP]\nrefine' IndepSets.indep (iSup_le h_le) h_le' hp_supr_pi hp'_pi _ h_gen' h_pi_system_indep\n[GOAL]\nα : Type u_1\nΩ✝ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω✝\nκ✝ : { x // x ∈ kernel α Ω✝ }\nμ✝ : Measure α\nΩ : Type u_4\nm : ι → MeasurableSpace Ω\nm' m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh_indep : ∀ (i : ι), Indep (m i) m' κ\nh_le : ∀ (i : ι), m i ≤ m0\nh_le' : m' ≤ m0\nhm : Directed (fun x x_1 => x ≤ x_1) m\np : ι → Set (Set Ω) := fun n => {t | MeasurableSet t}\nhp : ∀ (n : ι), IsPiSystem (p n)\nh_gen_n : ∀ (n : ι), m n = generateFrom (p n)\nhp_supr_pi : IsPiSystem (⋃ (n : ι), p n)\np' : Set (Set Ω) := {t | MeasurableSet t}\nhp'_pi : IsPiSystem p'\nh_gen' : m' = generateFrom p'\nh_pi_system_indep : IndepSets (⋃ (n : ι), p n) p' κ\n⊢ ⨆ (i : ι), m i = generateFrom (⋃ (n : ι), p n)\n[PROOFSTEP]\nexact (generateFrom_iUnion_measurableSet _).symm\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝¹ : Preorder ι\ninst✝ : IsMarkovKernel κ\ns : ι → Set Ω\nhsm : ∀ (n : ι), MeasurableSet (s n)\nhs : iIndepSet s κ\ni : ι\n⊢ Indep (generateFrom {s i}) (generateFrom {t | ∃ j, j < i ∧ s j = t}) κ\n[PROOFSTEP]\nconvert\n  iIndepSet.indep_generateFrom_of_disjoint hsm hs { i } {j | j < i} (Set.disjoint_singleton_left.mpr (lt_irrefl _))\n[GOAL]\ncase h.e'_4.h.e'_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝¹ : Preorder ι\ninst✝ : IsMarkovKernel κ\ns : ι → Set Ω\nhsm : ∀ (n : ι), MeasurableSet (s n)\nhs : iIndepSet s κ\ni : ι\n⊢ {s i} = {t | ∃ n, n ∈ {i} ∧ s n = t}\n[PROOFSTEP]\nsimp only [Set.mem_singleton_iff, exists_prop, exists_eq_left, Set.setOf_eq_eq_singleton']\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝¹ : LinearOrder ι\ninst✝ : IsMarkovKernel κ\ns : ι → Set Ω\nhsm : ∀ (n : ι), MeasurableSet (s n)\nhs : iIndepSet s κ\ni k : ι\nhk : i < k\n⊢ Indep (generateFrom {s k}) (generateFrom {t | ∃ j, j ≤ i ∧ s j = t}) κ\n[PROOFSTEP]\nconvert iIndepSet.indep_generateFrom_of_disjoint hsm hs { k } {j | j ≤ i} (Set.disjoint_singleton_left.mpr hk.not_le)\n[GOAL]\ncase h.e'_4.h.e'_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝¹ : LinearOrder ι\ninst✝ : IsMarkovKernel κ\ns : ι → Set Ω\nhsm : ∀ (n : ι), MeasurableSet (s n)\nhs : iIndepSet s κ\ni k : ι\nhk : i < k\n⊢ {s k} = {t | ∃ n, n ∈ {k} ∧ s n = t}\n[PROOFSTEP]\nsimp only [Set.mem_singleton_iff, exists_prop, exists_eq_left, Set.setOf_eq_eq_singleton']\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\n⊢ IndepSets (piiUnionInter π ↑S) (π a) κ\n[PROOFSTEP]\nrintro t1 t2 ⟨s, hs_mem, ft1, hft1_mem, ht1_eq⟩ ht2_mem_pia\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : ↑s ⊆ ↑S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nrw [Finset.coe_subset] at hs_mem \n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nclassical\nlet f := fun n => ite (n = a) t2 (ite (n ∈ s) (ft1 n) Set.univ)\nhave h_f_mem : ∀ n ∈ insert a s, f n ∈ π n := by\n  intro n hn_mem_insert\n  dsimp only\n  cases' Finset.mem_insert.mp hn_mem_insert with hn_mem hn_mem\n  · simp [hn_mem, ht2_mem_pia]\n  · have hn_ne_a : n ≠ a := by rintro rfl; exact haS (hs_mem hn_mem)\n    simp [hn_ne_a, hn_mem, hft1_mem n hn_mem]\nhave h_f_mem_pi : ∀ n ∈ s, f n ∈ π n := fun x hxS => h_f_mem x (by simp [hxS])\nhave h_t1 : t1 = ⋂ n ∈ s, f n := by\n  suffices h_forall : ∀ n ∈ s, f n = ft1 n\n  · rw [ht1_eq]\n    ext x\n    simp_rw [Set.mem_iInter]\n    conv => lhs; intro i hns; rw [← h_forall i hns]\n  intro n hnS\n  have hn_ne_a : n ≠ a := by rintro rfl; exact haS (hs_mem hnS)\n  simp_rw [if_pos hnS, if_neg hn_ne_a]\nhave h_μ_t1 : ∀ᵐ a' ∂μ, κ a' t1 = ∏ n in s, κ a' (f n) :=\n  by\n  filter_upwards [hp_ind s h_f_mem_pi] with a' ha'\n  rw [h_t1, ← ha']\nhave h_t2 : t2 = f a := by simp\nhave h_μ_inter : ∀ᵐ a' ∂μ, κ a' (t1 ∩ t2) = ∏ n in insert a s, κ a' (f n) :=\n  by\n  have h_t1_inter_t2 : t1 ∩ t2 = ⋂ n ∈ insert a s, f n := by rw [h_t1, h_t2, Finset.set_biInter_insert, Set.inter_comm]\n  filter_upwards [hp_ind (insert a s) h_f_mem] with a' ha'\n  rw [h_t1_inter_t2, ← ha']\nhave has : a ∉ s := fun has_mem => haS (hs_mem has_mem)\nfilter_upwards [h_μ_t1, h_μ_inter] with a' ha1 ha2\nrw [ha2, Finset.prod_insert has, h_t2, mul_comm, ha1]\nsimp only [ite_true]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nlet f := fun n => ite (n = a) t2 (ite (n ∈ s) (ft1 n) Set.univ)\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nhave h_f_mem : ∀ n ∈ insert a s, f n ∈ π n := by\n  intro n hn_mem_insert\n  dsimp only\n  cases' Finset.mem_insert.mp hn_mem_insert with hn_mem hn_mem\n  · simp [hn_mem, ht2_mem_pia]\n  · have hn_ne_a : n ≠ a := by rintro rfl; exact haS (hs_mem hn_mem)\n    simp [hn_ne_a, hn_mem, hft1_mem n hn_mem]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\n⊢ ∀ (n : ι), n ∈ insert a s → f n ∈ π n\n[PROOFSTEP]\nintro n hn_mem_insert\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nn : ι\nhn_mem_insert : n ∈ insert a s\n⊢ f n ∈ π n\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nn : ι\nhn_mem_insert : n ∈ insert a s\n⊢ (if n = a then t2 else if n ∈ s then ft1 n else Set.univ) ∈ π n\n[PROOFSTEP]\ncases' Finset.mem_insert.mp hn_mem_insert with hn_mem hn_mem\n[GOAL]\ncase inl\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nn : ι\nhn_mem_insert : n ∈ insert a s\nhn_mem : n = a\n⊢ (if n = a then t2 else if n ∈ s then ft1 n else Set.univ) ∈ π n\n[PROOFSTEP]\nsimp [hn_mem, ht2_mem_pia]\n[GOAL]\ncase inr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nn : ι\nhn_mem_insert : n ∈ insert a s\nhn_mem : n ∈ s\n⊢ (if n = a then t2 else if n ∈ s then ft1 n else Set.univ) ∈ π n\n[PROOFSTEP]\nhave hn_ne_a : n ≠ a := by rintro rfl; exact haS (hs_mem hn_mem)\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nn : ι\nhn_mem_insert : n ∈ insert a s\nhn_mem : n ∈ s\n⊢ n ≠ a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\nS : Finset ι\nhp_ind : iIndepSets π κ\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nn : ι\nhn_mem : n ∈ s\nhaS : ¬n ∈ S\nht2_mem_pia : t2 ∈ π n\nf : ι → Set Ω := fun n_1 => if n_1 = n then t2 else if n_1 ∈ s then ft1 n_1 else Set.univ\nhn_mem_insert : n ∈ insert n s\n⊢ False\n[PROOFSTEP]\nexact haS (hs_mem hn_mem)\n[GOAL]\ncase inr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nn : ι\nhn_mem_insert : n ∈ insert a s\nhn_mem : n ∈ s\nhn_ne_a : n ≠ a\n⊢ (if n = a then t2 else if n ∈ s then ft1 n else Set.univ) ∈ π n\n[PROOFSTEP]\nsimp [hn_ne_a, hn_mem, hft1_mem n hn_mem]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nhave h_f_mem_pi : ∀ n ∈ s, f n ∈ π n := fun x hxS => h_f_mem x (by simp [hxS])\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nx : ι\nhxS : x ∈ s\n⊢ x ∈ insert a s\n[PROOFSTEP]\nsimp [hxS]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nhave h_t1 : t1 = ⋂ n ∈ s, f n := by\n  suffices h_forall : ∀ n ∈ s, f n = ft1 n\n  · rw [ht1_eq]\n    ext x\n    simp_rw [Set.mem_iInter]\n    conv => lhs; intro i hns; rw [← h_forall i hns]\n  intro n hnS\n  have hn_ne_a : n ≠ a := by rintro rfl; exact haS (hs_mem hnS)\n  simp_rw [if_pos hnS, if_neg hn_ne_a]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\n⊢ t1 = ⋂ (n : ι) (_ : n ∈ s), f n\n[PROOFSTEP]\nsuffices h_forall : ∀ n ∈ s, f n = ft1 n\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_forall : ∀ (n : ι), n ∈ s → f n = ft1 n\n⊢ t1 = ⋂ (n : ι) (_ : n ∈ s), f n\n[PROOFSTEP]\nrw [ht1_eq]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_forall : ∀ (n : ι), n ∈ s → f n = ft1 n\n⊢ ⋂ (x : ι) (_ : x ∈ s), ft1 x = ⋂ (n : ι) (_ : n ∈ s), f n\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_forall : ∀ (n : ι), n ∈ s → f n = ft1 n\nx : Ω\n⊢ x ∈ ⋂ (x : ι) (_ : x ∈ s), ft1 x ↔ x ∈ ⋂ (n : ι) (_ : n ∈ s), f n\n[PROOFSTEP]\nsimp_rw [Set.mem_iInter]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_forall : ∀ (n : ι), n ∈ s → f n = ft1 n\nx : Ω\n⊢ (∀ (i : ι), i ∈ s → x ∈ ft1 i) ↔ ∀ (i : ι), i ∈ s → x ∈ if i = a then t2 else if i ∈ s then ft1 i else Set.univ\n[PROOFSTEP]\nconv => lhs; intro i hns; rw [← h_forall i hns]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_forall : ∀ (n : ι), n ∈ s → f n = ft1 n\nx : Ω\n| (∀ (i : ι), i ∈ s → x ∈ ft1 i) ↔ ∀ (i : ι), i ∈ s → x ∈ if i = a then t2 else if i ∈ s then ft1 i else Set.univ\n[PROOFSTEP]\nlhs; intro i hns; rw [← h_forall i hns]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_forall : ∀ (n : ι), n ∈ s → f n = ft1 n\nx : Ω\n| (∀ (i : ι), i ∈ s → x ∈ ft1 i) ↔ ∀ (i : ι), i ∈ s → x ∈ if i = a then t2 else if i ∈ s then ft1 i else Set.univ\n[PROOFSTEP]\nlhs; intro i hns; rw [← h_forall i hns]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_forall : ∀ (n : ι), n ∈ s → f n = ft1 n\nx : Ω\n| (∀ (i : ι), i ∈ s → x ∈ ft1 i) ↔ ∀ (i : ι), i ∈ s → x ∈ if i = a then t2 else if i ∈ s then ft1 i else Set.univ\n[PROOFSTEP]\nlhs\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_forall : ∀ (n : ι), n ∈ s → f n = ft1 n\nx : Ω\n| ∀ (i : ι), i ∈ s → x ∈ ft1 i\n[PROOFSTEP]\nintro i hns\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_forall : ∀ (n : ι), n ∈ s → f n = ft1 n\nx : Ω\ni : ι\nhns : i ∈ s\n| x ∈ ft1 i\n[PROOFSTEP]\nrw [← h_forall i hns]\n[GOAL]\ncase h_forall\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\n⊢ ∀ (n : ι), n ∈ s → f n = ft1 n\n[PROOFSTEP]\nintro n hnS\n[GOAL]\ncase h_forall\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nn : ι\nhnS : n ∈ s\n⊢ f n = ft1 n\n[PROOFSTEP]\nhave hn_ne_a : n ≠ a := by rintro rfl; exact haS (hs_mem hnS)\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nn : ι\nhnS : n ∈ s\n⊢ n ≠ a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\nS : Finset ι\nhp_ind : iIndepSets π κ\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nn : ι\nhnS : n ∈ s\nhaS : ¬n ∈ S\nht2_mem_pia : t2 ∈ π n\nf : ι → Set Ω := fun n_1 => if n_1 = n then t2 else if n_1 ∈ s then ft1 n_1 else Set.univ\nh_f_mem : ∀ (n_1 : ι), n_1 ∈ insert n s → f n_1 ∈ π n_1\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\n⊢ False\n[PROOFSTEP]\nexact haS (hs_mem hnS)\n[GOAL]\ncase h_forall\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nn : ι\nhnS : n ∈ s\nhn_ne_a : n ≠ a\n⊢ f n = ft1 n\n[PROOFSTEP]\nsimp_rw [if_pos hnS, if_neg hn_ne_a]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nhave h_μ_t1 : ∀ᵐ a' ∂μ, κ a' t1 = ∏ n in s, κ a' (f n) :=\n  by\n  filter_upwards [hp_ind s h_f_mem_pi] with a' ha'\n  rw [h_t1, ← ha']\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\n⊢ ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (f n)\n[PROOFSTEP]\nfilter_upwards [hp_ind s h_f_mem_pi] with a' ha'\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\na' : α\nha' :\n  ↑↑(↑κ a') (⋂ (i : ι) (_ : i ∈ s), if i = a then t2 else if i ∈ s then ft1 i else Set.univ) =\n    ∏ i in s, ↑↑(↑κ a') (if i = a then t2 else if i ∈ s then ft1 i else Set.univ)\n⊢ ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (if n = a then t2 else if n ∈ s then ft1 n else Set.univ)\n[PROOFSTEP]\nrw [h_t1, ← ha']\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\nh_μ_t1 : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (f n)\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nhave h_t2 : t2 = f a := by simp\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\nh_μ_t1 : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (f n)\n⊢ t2 = f a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\nh_μ_t1 : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (f n)\nh_t2 : t2 = f a\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nhave h_μ_inter : ∀ᵐ a' ∂μ, κ a' (t1 ∩ t2) = ∏ n in insert a s, κ a' (f n) :=\n  by\n  have h_t1_inter_t2 : t1 ∩ t2 = ⋂ n ∈ insert a s, f n := by rw [h_t1, h_t2, Finset.set_biInter_insert, Set.inter_comm]\n  filter_upwards [hp_ind (insert a s) h_f_mem] with a' ha'\n  rw [h_t1_inter_t2, ← ha']\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\nh_μ_t1 : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (f n)\nh_t2 : t2 = f a\n⊢ ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') (t1 ∩ t2) = ∏ n in insert a s, ↑↑(↑κ a') (f n)\n[PROOFSTEP]\nhave h_t1_inter_t2 : t1 ∩ t2 = ⋂ n ∈ insert a s, f n := by rw [h_t1, h_t2, Finset.set_biInter_insert, Set.inter_comm]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\nh_μ_t1 : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (f n)\nh_t2 : t2 = f a\n⊢ t1 ∩ t2 = ⋂ (n : ι) (_ : n ∈ insert a s), f n\n[PROOFSTEP]\nrw [h_t1, h_t2, Finset.set_biInter_insert, Set.inter_comm]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\nh_μ_t1 : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (f n)\nh_t2 : t2 = f a\nh_t1_inter_t2 : t1 ∩ t2 = ⋂ (n : ι) (_ : n ∈ insert a s), f n\n⊢ ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') (t1 ∩ t2) = ∏ n in insert a s, ↑↑(↑κ a') (f n)\n[PROOFSTEP]\nfilter_upwards [hp_ind (insert a s) h_f_mem] with a' ha'\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\nh_μ_t1 : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (f n)\nh_t2 : t2 = f a\nh_t1_inter_t2 : t1 ∩ t2 = ⋂ (n : ι) (_ : n ∈ insert a s), f n\na' : α\nha' :\n  ↑↑(↑κ a') (⋂ (i : ι) (_ : i ∈ insert a s), if i = a then t2 else if i ∈ s then ft1 i else Set.univ) =\n    ∏ i in insert a s, ↑↑(↑κ a') (if i = a then t2 else if i ∈ s then ft1 i else Set.univ)\n⊢ ↑↑(↑κ a') (t1 ∩ t2) = ∏ n in insert a s, ↑↑(↑κ a') (if n = a then t2 else if n ∈ s then ft1 n else Set.univ)\n[PROOFSTEP]\nrw [h_t1_inter_t2, ← ha']\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\nh_μ_t1 : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (f n)\nh_t2 : t2 = f a\nh_μ_inter : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') (t1 ∩ t2) = ∏ n in insert a s, ↑↑(↑κ a') (f n)\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nhave has : a ∉ s := fun has_mem => haS (hs_mem has_mem)\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\nh_μ_t1 : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (f n)\nh_t2 : t2 = f a\nh_μ_inter : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') (t1 ∩ t2) = ∏ n in insert a s, ↑↑(↑κ a') (f n)\nhas : ¬a ∈ s\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (t1 ∩ t2) = ↑↑(↑κ a) t1 * ↑↑(↑κ a) t2\n[PROOFSTEP]\nfilter_upwards [h_μ_t1, h_μ_inter] with a' ha1 ha2\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\nh_μ_t1 : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (f n)\nh_t2 : t2 = f a\nh_μ_inter : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') (t1 ∩ t2) = ∏ n in insert a s, ↑↑(↑κ a') (f n)\nhas : ¬a ∈ s\na' : α\nha1 : ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (if n = a then t2 else if n ∈ s then ft1 n else Set.univ)\nha2 : ↑↑(↑κ a') (t1 ∩ t2) = ∏ n in insert a s, ↑↑(↑κ a') (if n = a then t2 else if n ∈ s then ft1 n else Set.univ)\n⊢ ↑↑(↑κ a') (t1 ∩ t2) = ↑↑(↑κ a') t1 * ↑↑(↑κ a') t2\n[PROOFSTEP]\nrw [ha2, Finset.prod_insert has, h_t2, mul_comm, ha1]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nπ : ι → Set (Set Ω)\na : ι\nS : Finset ι\nhp_ind : iIndepSets π κ\nhaS : ¬a ∈ S\nt1 t2 : Set Ω\ns : Finset ι\nhs_mem : s ⊆ S\nft1 : ι → Set Ω\nhft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x\nht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x\nht2_mem_pia : t2 ∈ π a\nf : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ\nh_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n\nh_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n\nh_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n\nh_μ_t1 : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (f n)\nh_t2 : t2 = f a\nh_μ_inter : ∀ᵐ (a' : α) ∂μ, ↑↑(↑κ a') (t1 ∩ t2) = ∏ n in insert a s, ↑↑(↑κ a') (f n)\nhas : ¬a ∈ s\na' : α\nha1 : ↑↑(↑κ a') t1 = ∏ n in s, ↑↑(↑κ a') (if n = a then t2 else if n ∈ s then ft1 n else Set.univ)\nha2 : ↑↑(↑κ a') (t1 ∩ t2) = ∏ n in insert a s, ↑↑(↑κ a') (if n = a then t2 else if n ∈ s then ft1 n else Set.univ)\n⊢ (∏ x in s, ↑↑(↑κ a') (if x = a then f a else if x ∈ s then ft1 x else Set.univ)) *\n      ↑↑(↑κ a') (if a = a then f a else if a ∈ s then ft1 a else Set.univ) =\n    (∏ n in s, ↑↑(↑κ a') (if n = a then t2 else if n ∈ s then ft1 n else Set.univ)) * ↑↑(↑κ a') (f a)\n[PROOFSTEP]\nsimp only [ite_true]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\n⊢ kernel.iIndep m κ\n[PROOFSTEP]\nclassical\nintro s f\nrefine Finset.induction ?_ ?_ s\n·\n  simp only [Finset.not_mem_empty, Set.mem_setOf_eq, IsEmpty.forall_iff, implies_true, Set.iInter_of_empty,\n    Set.iInter_univ, measure_univ, Finset.prod_empty, Filter.eventually_true, forall_true_left]\n· intro a S ha_notin_S h_rec hf_m\n  have hf_m_S : ∀ x ∈ S, MeasurableSet[m x] (f x) := fun x hx => hf_m x (by simp [hx])\n  let p := piiUnionInter π S\n  set m_p := generateFrom p with hS_eq_generate\n  have h_indep : Indep m_p (m a) κ μ :=\n    by\n    have hp : IsPiSystem p := isPiSystem_piiUnionInter π h_pi S\n    have h_le' : ∀ i, generateFrom (π i) ≤ _mΩ := fun i ↦ (h_generate i).symm.trans_le (h_le i)\n    have hm_p : m_p ≤ _mΩ := generateFrom_piiUnionInter_le π h_le' S\n    exact\n      IndepSets.indep hm_p (h_le a) hp (h_pi a) hS_eq_generate (h_generate a)\n        (iIndepSets.piiUnionInter_of_not_mem h_ind ha_notin_S)\n  have h := h_indep.symm (f a) (⋂ n ∈ S, f n) (hf_m a (Finset.mem_insert_self a S)) ?_\n  · filter_upwards [h_rec hf_m_S, h] with a' ha' h'\n    rwa [Finset.set_biInter_insert, Finset.prod_insert ha_notin_S, ← ha']\n  · have h_le_p : ∀ i ∈ S, m i ≤ m_p := by\n      intros n hn\n      rw [hS_eq_generate, h_generate n]\n      refine le_generateFrom_piiUnionInter (S : Set ι) hn\n    have h_S_f : ∀ i ∈ S, MeasurableSet[m_p] (f i) := fun i hi ↦ (h_le_p i hi) (f i) (hf_m_S i hi)\n    exact S.measurableSet_biInter h_S_f\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\n⊢ kernel.iIndep m κ\n[PROOFSTEP]\nintro s f\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\n⊢ (∀ (i : ι), i ∈ s → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ s), f i) = ∏ i in s, ↑↑(↑κ a) (f i)\n[PROOFSTEP]\nrefine Finset.induction ?_ ?_ s\n[GOAL]\ncase refine_1\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\n⊢ (∀ (i : ι), i ∈ ∅ → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ ∅), f i) = ∏ i in ∅, ↑↑(↑κ a) (f i)\n[PROOFSTEP]\nsimp only [Finset.not_mem_empty, Set.mem_setOf_eq, IsEmpty.forall_iff, implies_true, Set.iInter_of_empty,\n  Set.iInter_univ, measure_univ, Finset.prod_empty, Filter.eventually_true, forall_true_left]\n[GOAL]\ncase refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\n⊢ ∀ ⦃a : ι⦄ {s : Finset ι},\n    ¬a ∈ s →\n      ((∀ (i : ι), i ∈ s → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n          ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ s), f i) = ∏ i in s, ↑↑(↑κ a) (f i)) →\n        (∀ (i : ι), i ∈ insert a s → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n          ∀ᵐ (a_3 : α) ∂μ, ↑↑(↑κ a_3) (⋂ (i : ι) (_ : i ∈ insert a s), f i) = ∏ i in insert a s, ↑↑(↑κ a_3) (f i)\n[PROOFSTEP]\nintro a S ha_notin_S h_rec hf_m\n[GOAL]\ncase refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\n⊢ ∀ᵐ (a_1 : α) ∂μ, ↑↑(↑κ a_1) (⋂ (i : ι) (_ : i ∈ insert a S), f i) = ∏ i in insert a S, ↑↑(↑κ a_1) (f i)\n[PROOFSTEP]\nhave hf_m_S : ∀ x ∈ S, MeasurableSet[m x] (f x) := fun x hx => hf_m x (by simp [hx])\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nx : ι\nhx : x ∈ S\n⊢ x ∈ insert a S\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\n⊢ ∀ᵐ (a_1 : α) ∂μ, ↑↑(↑κ a_1) (⋂ (i : ι) (_ : i ∈ insert a S), f i) = ∏ i in insert a S, ↑↑(↑κ a_1) (f i)\n[PROOFSTEP]\nlet p := piiUnionInter π S\n[GOAL]\ncase refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\n⊢ ∀ᵐ (a_1 : α) ∂μ, ↑↑(↑κ a_1) (⋂ (i : ι) (_ : i ∈ insert a S), f i) = ∏ i in insert a S, ↑↑(↑κ a_1) (f i)\n[PROOFSTEP]\nset m_p := generateFrom p with hS_eq_generate\n[GOAL]\ncase refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\n⊢ ∀ᵐ (a_1 : α) ∂μ, ↑↑(↑κ a_1) (⋂ (i : ι) (_ : i ∈ insert a S), f i) = ∏ i in insert a S, ↑↑(↑κ a_1) (f i)\n[PROOFSTEP]\nhave h_indep : Indep m_p (m a) κ μ :=\n  by\n  have hp : IsPiSystem p := isPiSystem_piiUnionInter π h_pi S\n  have h_le' : ∀ i, generateFrom (π i) ≤ _mΩ := fun i ↦ (h_generate i).symm.trans_le (h_le i)\n  have hm_p : m_p ≤ _mΩ := generateFrom_piiUnionInter_le π h_le' S\n  exact\n    IndepSets.indep hm_p (h_le a) hp (h_pi a) hS_eq_generate (h_generate a)\n      (iIndepSets.piiUnionInter_of_not_mem h_ind ha_notin_S)\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\n⊢ Indep m_p (m a) κ\n[PROOFSTEP]\nhave hp : IsPiSystem p := isPiSystem_piiUnionInter π h_pi S\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\nhp : IsPiSystem p\n⊢ Indep m_p (m a) κ\n[PROOFSTEP]\nhave h_le' : ∀ i, generateFrom (π i) ≤ _mΩ := fun i ↦ (h_generate i).symm.trans_le (h_le i)\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\nhp : IsPiSystem p\nh_le' : ∀ (i : ι), generateFrom (π i) ≤ _mΩ\n⊢ Indep m_p (m a) κ\n[PROOFSTEP]\nhave hm_p : m_p ≤ _mΩ := generateFrom_piiUnionInter_le π h_le' S\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\nhp : IsPiSystem p\nh_le' : ∀ (i : ι), generateFrom (π i) ≤ _mΩ\nhm_p : m_p ≤ _mΩ\n⊢ Indep m_p (m a) κ\n[PROOFSTEP]\nexact\n  IndepSets.indep hm_p (h_le a) hp (h_pi a) hS_eq_generate (h_generate a)\n    (iIndepSets.piiUnionInter_of_not_mem h_ind ha_notin_S)\n[GOAL]\ncase refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\nh_indep : Indep m_p (m a) κ\n⊢ ∀ᵐ (a_1 : α) ∂μ, ↑↑(↑κ a_1) (⋂ (i : ι) (_ : i ∈ insert a S), f i) = ∏ i in insert a S, ↑↑(↑κ a_1) (f i)\n[PROOFSTEP]\nhave h := h_indep.symm (f a) (⋂ n ∈ S, f n) (hf_m a (Finset.mem_insert_self a S)) ?_\n[GOAL]\ncase refine_2.refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\nh_indep : Indep m_p (m a) κ\nh :\n  ∀ᵐ (a_1 : α) ∂μ,\n    ↑↑(↑κ a_1) (f a ∩ ⋂ (n : ι) (_ : n ∈ S), f n) = ↑↑(↑κ a_1) (f a) * ↑↑(↑κ a_1) (⋂ (n : ι) (_ : n ∈ S), f n)\n⊢ ∀ᵐ (a_1 : α) ∂μ, ↑↑(↑κ a_1) (⋂ (i : ι) (_ : i ∈ insert a S), f i) = ∏ i in insert a S, ↑↑(↑κ a_1) (f i)\n[PROOFSTEP]\nfilter_upwards [h_rec hf_m_S, h] with a' ha' h'\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\nh_indep : Indep m_p (m a) κ\nh :\n  ∀ᵐ (a_1 : α) ∂μ,\n    ↑↑(↑κ a_1) (f a ∩ ⋂ (n : ι) (_ : n ∈ S), f n) = ↑↑(↑κ a_1) (f a) * ↑↑(↑κ a_1) (⋂ (n : ι) (_ : n ∈ S), f n)\na' : α\nha' : ↑↑(↑κ a') (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a') (f i)\nh' : ↑↑(↑κ a') (f a ∩ ⋂ (n : ι) (_ : n ∈ S), f n) = ↑↑(↑κ a') (f a) * ↑↑(↑κ a') (⋂ (n : ι) (_ : n ∈ S), f n)\n⊢ ↑↑(↑κ a') (⋂ (i : ι) (_ : i ∈ insert a S), f i) = ∏ i in insert a S, ↑↑(↑κ a') (f i)\n[PROOFSTEP]\nrwa [Finset.set_biInter_insert, Finset.prod_insert ha_notin_S, ← ha']\n[GOAL]\ncase refine_2.refine_1\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\nh_indep : Indep m_p (m a) κ\n⊢ ⋂ (n : ι) (_ : n ∈ S), f n ∈ {s | MeasurableSet s}\n[PROOFSTEP]\nhave h_le_p : ∀ i ∈ S, m i ≤ m_p := by\n  intros n hn\n  rw [hS_eq_generate, h_generate n]\n  refine le_generateFrom_piiUnionInter (S : Set ι) hn\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\nh_indep : Indep m_p (m a) κ\n⊢ ∀ (i : ι), i ∈ S → m i ≤ m_p\n[PROOFSTEP]\nintros n hn\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\nh_indep : Indep m_p (m a) κ\nn : ι\nhn : n ∈ S\n⊢ m n ≤ m_p\n[PROOFSTEP]\nrw [hS_eq_generate, h_generate n]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\nh_indep : Indep m_p (m a) κ\nn : ι\nhn : n ∈ S\n⊢ generateFrom (π n) ≤ generateFrom p\n[PROOFSTEP]\nrefine le_generateFrom_piiUnionInter (S : Set ι) hn\n[GOAL]\ncase refine_2.refine_1\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\nh_indep : Indep m_p (m a) κ\nh_le_p : ∀ (i : ι), i ∈ S → m i ≤ m_p\n⊢ ⋂ (n : ι) (_ : n ∈ S), f n ∈ {s | MeasurableSet s}\n[PROOFSTEP]\nhave h_S_f : ∀ i ∈ S, MeasurableSet[m_p] (f i) := fun i hi ↦ (h_le_p i hi) (f i) (hf_m_S i hi)\n[GOAL]\ncase refine_2.refine_1\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nm : ι → MeasurableSpace Ω\nh_le : ∀ (i : ι), m i ≤ _mΩ\nπ : ι → Set (Set Ω)\nh_pi : ∀ (n : ι), IsPiSystem (π n)\nh_generate : ∀ (i : ι), m i = generateFrom (π i)\nh_ind : iIndepSets π κ\ns : Finset ι\nf : ι → Set Ω\na : ι\nS : Finset ι\nha_notin_S : ¬a ∈ S\nh_rec :\n  (∀ (i : ι), i ∈ S → f i ∈ (fun x => {s | MeasurableSet s}) i) →\n    ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i) = ∏ i in S, ↑↑(↑κ a) (f i)\nhf_m : ∀ (i : ι), i ∈ insert a S → f i ∈ (fun x => {s | MeasurableSet s}) i\nhf_m_S : ∀ (x : ι), x ∈ S → MeasurableSet (f x)\np : Set (Set Ω) := piiUnionInter π ↑S\nm_p : MeasurableSpace Ω := generateFrom p\nhS_eq_generate : m_p = generateFrom p\nh_indep : Indep m_p (m a) κ\nh_le_p : ∀ (i : ι), i ∈ S → m i ≤ m_p\nh_S_f : ∀ (i : ι), i ∈ S → MeasurableSet (f i)\n⊢ ⋂ (n : ι) (_ : n ∈ S), f n ∈ {s | MeasurableSet s}\n[PROOFSTEP]\nexact S.measurableSet_biInter h_S_f\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns t : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm0 : MeasurableSpace Ω\nhs_meas : MeasurableSet s\nht_meas : MeasurableSet t\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh : IndepSets {s} {t} κ\nu : Set Ω\nhu : u ∈ {s}\n⊢ MeasurableSet u\n[PROOFSTEP]\nrwa [Set.mem_singleton_iff.mp hu]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns t : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm0 : MeasurableSpace Ω\nhs_meas : MeasurableSet s\nht_meas : MeasurableSet t\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\ninst✝ : IsMarkovKernel κ\nh : IndepSets {s} {t} κ\nu : Set Ω\nhu : u ∈ {t}\n⊢ MeasurableSet u\n[PROOFSTEP]\nrwa [Set.mem_singleton_iff.mp hu]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns✝ t✝ : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm₁ m₂ m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : Indep m₁ m₂ κ\ns t : Set Ω\nhs : MeasurableSet s\nht : MeasurableSet t\n⊢ IndepSet s t κ\n[PROOFSTEP]\nrefine fun s' t' hs' ht' => h_indep s' t' ?_ ?_\n[GOAL]\ncase refine_1\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns✝ t✝ : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm₁ m₂ m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : Indep m₁ m₂ κ\ns t : Set Ω\nhs : MeasurableSet s\nht : MeasurableSet t\ns' t' : Set Ω\nhs' : s' ∈ {s_1 | MeasurableSet s_1}\nht' : t' ∈ {s | MeasurableSet s}\n⊢ s' ∈ {s | MeasurableSet s}\n[PROOFSTEP]\nrefine @generateFrom_induction _ (fun u => MeasurableSet[m₁] u) { s } ?_ ?_ ?_ ?_ _ hs'\n[GOAL]\ncase refine_1.refine_1\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns✝ t✝ : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm₁ m₂ m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : Indep m₁ m₂ κ\ns t : Set Ω\nhs : MeasurableSet s\nht : MeasurableSet t\ns' t' : Set Ω\nhs' : s' ∈ {s_1 | MeasurableSet s_1}\nht' : t' ∈ {s | MeasurableSet s}\n⊢ ∀ (t : Set Ω), t ∈ {s} → (fun u => MeasurableSet u) t\n[PROOFSTEP]\nsimp only [Set.mem_singleton_iff, forall_eq, hs]\n[GOAL]\ncase refine_1.refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns✝ t✝ : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm₁ m₂ m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : Indep m₁ m₂ κ\ns t : Set Ω\nhs : MeasurableSet s\nht : MeasurableSet t\ns' t' : Set Ω\nhs' : s' ∈ {s_1 | MeasurableSet s_1}\nht' : t' ∈ {s | MeasurableSet s}\n⊢ (fun u => MeasurableSet u) ∅\n[PROOFSTEP]\nexact @MeasurableSet.empty _ m₁\n[GOAL]\ncase refine_1.refine_3\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns✝ t✝ : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm₁ m₂ m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : Indep m₁ m₂ κ\ns t : Set Ω\nhs : MeasurableSet s\nht : MeasurableSet t\ns' t' : Set Ω\nhs' : s' ∈ {s_1 | MeasurableSet s_1}\nht' : t' ∈ {s | MeasurableSet s}\n⊢ ∀ (t : Set Ω), (fun u => MeasurableSet u) t → (fun u => MeasurableSet u) tᶜ\n[PROOFSTEP]\nexact fun u hu => hu.compl\n[GOAL]\ncase refine_1.refine_4\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns✝ t✝ : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm₁ m₂ m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : Indep m₁ m₂ κ\ns t : Set Ω\nhs : MeasurableSet s\nht : MeasurableSet t\ns' t' : Set Ω\nhs' : s' ∈ {s_1 | MeasurableSet s_1}\nht' : t' ∈ {s | MeasurableSet s}\n⊢ ∀ (f : ℕ → Set Ω), (∀ (n : ℕ), (fun u => MeasurableSet u) (f n)) → (fun u => MeasurableSet u) (⋃ (i : ℕ), f i)\n[PROOFSTEP]\nexact fun f hf => MeasurableSet.iUnion hf\n[GOAL]\ncase refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns✝ t✝ : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm₁ m₂ m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : Indep m₁ m₂ κ\ns t : Set Ω\nhs : MeasurableSet s\nht : MeasurableSet t\ns' t' : Set Ω\nhs' : s' ∈ {s_1 | MeasurableSet s_1}\nht' : t' ∈ {s | MeasurableSet s}\n⊢ t' ∈ {s | MeasurableSet s}\n[PROOFSTEP]\nrefine @generateFrom_induction _ (fun u => MeasurableSet[m₂] u) { t } ?_ ?_ ?_ ?_ _ ht'\n[GOAL]\ncase refine_2.refine_1\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns✝ t✝ : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm₁ m₂ m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : Indep m₁ m₂ κ\ns t : Set Ω\nhs : MeasurableSet s\nht : MeasurableSet t\ns' t' : Set Ω\nhs' : s' ∈ {s_1 | MeasurableSet s_1}\nht' : t' ∈ {s | MeasurableSet s}\n⊢ ∀ (t_1 : Set Ω), t_1 ∈ {t} → (fun u => MeasurableSet u) t_1\n[PROOFSTEP]\nsimp only [Set.mem_singleton_iff, forall_eq, ht]\n[GOAL]\ncase refine_2.refine_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns✝ t✝ : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm₁ m₂ m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : Indep m₁ m₂ κ\ns t : Set Ω\nhs : MeasurableSet s\nht : MeasurableSet t\ns' t' : Set Ω\nhs' : s' ∈ {s_1 | MeasurableSet s_1}\nht' : t' ∈ {s | MeasurableSet s}\n⊢ (fun u => MeasurableSet u) ∅\n[PROOFSTEP]\nexact @MeasurableSet.empty _ m₂\n[GOAL]\ncase refine_2.refine_3\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns✝ t✝ : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm₁ m₂ m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : Indep m₁ m₂ κ\ns t : Set Ω\nhs : MeasurableSet s\nht : MeasurableSet t\ns' t' : Set Ω\nhs' : s' ∈ {s_1 | MeasurableSet s_1}\nht' : t' ∈ {s | MeasurableSet s}\n⊢ ∀ (t : Set Ω), (fun u => MeasurableSet u) t → (fun u => MeasurableSet u) tᶜ\n[PROOFSTEP]\nexact fun u hu => hu.compl\n[GOAL]\ncase refine_2.refine_4\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\ns✝ t✝ : Set Ω\nS T : Set (Set Ω)\n_mα : MeasurableSpace α\nm₁ m₂ m0 : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nh_indep : Indep m₁ m₂ κ\ns t : Set Ω\nhs : MeasurableSet s\nht : MeasurableSet t\ns' t' : Set Ω\nhs' : s' ∈ {s_1 | MeasurableSet s_1}\nht' : t' ∈ {s | MeasurableSet s}\n⊢ ∀ (f : ℕ → Set Ω), (∀ (n : ℕ), (fun u => MeasurableSet u) (f n)) → (fun u => MeasurableSet u) (⋃ (i : ℕ), f i)\n[PROOFSTEP]\nexact fun f hf => MeasurableSet.iUnion hf\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\n⊢ IndepFun f g κ ↔\n    ∀ (s : Set β) (t : Set β'),\n      MeasurableSet s →\n        MeasurableSet t → ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\n⊢ IndepFun f g κ →\n    ∀ (s : Set β) (t : Set β'),\n      MeasurableSet s →\n        MeasurableSet t → ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\n⊢ (∀ (s : Set β) (t : Set β'),\n      MeasurableSet s →\n        MeasurableSet t → ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)) →\n    IndepFun f g κ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\nh : IndepFun f g κ\n⊢ ∀ (s : Set β) (t : Set β'),\n    MeasurableSet s →\n      MeasurableSet t → ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)\n[PROOFSTEP]\nrefine' fun s t hs ht => h (f ⁻¹' s) (g ⁻¹' t) ⟨s, hs, rfl⟩ ⟨t, ht, rfl⟩\n[GOAL]\ncase mpr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\nh :\n  ∀ (s : Set β) (t : Set β'),\n    MeasurableSet s →\n      MeasurableSet t → ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)\n⊢ IndepFun f g κ\n[PROOFSTEP]\nrintro _ _ ⟨s, hs, rfl⟩ ⟨t, ht, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\nh :\n  ∀ (s : Set β) (t : Set β'),\n    MeasurableSet s →\n      MeasurableSet t → ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)\ns : Set β\nhs : MeasurableSet s\nt : Set β'\nht : MeasurableSet t\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)\n[PROOFSTEP]\nexact h s t hs ht\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\n⊢ iIndepFun m f κ ↔\n    ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n      (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n        ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\n[PROOFSTEP]\nrefine' ⟨fun h S sets h_meas => h _ fun i hi_mem => ⟨sets i, h_meas i hi_mem, rfl⟩, _⟩\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\n⊢ (∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n      (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n        ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)) →\n    iIndepFun m f κ\n[PROOFSTEP]\nintro h S setsΩ h_meas\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑(↑κ a) (setsΩ i)\n[PROOFSTEP]\nclassical\nlet setsβ : ∀ i : ι, Set (β i) := fun i => dite (i ∈ S) (fun hi_mem => (h_meas i hi_mem).choose) fun _ => Set.univ\nhave h_measβ : ∀ i ∈ S, MeasurableSet[m i] (setsβ i) :=\n  by\n  intro i hi_mem\n  simp_rw [dif_pos hi_mem]\n  exact (h_meas i hi_mem).choose_spec.1\nhave h_preim : ∀ i ∈ S, setsΩ i = f i ⁻¹' setsβ i :=\n  by\n  intro i hi_mem\n  simp_rw [dif_pos hi_mem]\n  exact (h_meas i hi_mem).choose_spec.2.symm\nhave h_left_eq : ∀ a, κ a (⋂ i ∈ S, setsΩ i) = κ a (⋂ i ∈ S, (f i) ⁻¹' (setsβ i)) :=\n  by\n  intro a\n  congr with x\n  simp_rw [Set.mem_iInter]\n  constructor <;> intro h i hi_mem <;> specialize h i hi_mem\n  · rwa [h_preim i hi_mem] at h \n  · rwa [h_preim i hi_mem]\nhave h_right_eq : ∀ a, (∏ i in S, κ a (setsΩ i)) = ∏ i in S, κ a ((f i) ⁻¹' (setsβ i)) :=\n  by\n  refine' fun a ↦ Finset.prod_congr rfl fun i hi_mem => _\n  rw [h_preim i hi_mem]\nfilter_upwards [h S h_measβ] with a ha\nrw [h_left_eq a, h_right_eq a, ha]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑(↑κ a) (setsΩ i)\n[PROOFSTEP]\nlet setsβ : ∀ i : ι, Set (β i) := fun i => dite (i ∈ S) (fun hi_mem => (h_meas i hi_mem).choose) fun _ => Set.univ\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑(↑κ a) (setsΩ i)\n[PROOFSTEP]\nhave h_measβ : ∀ i ∈ S, MeasurableSet[m i] (setsβ i) :=\n  by\n  intro i hi_mem\n  simp_rw [dif_pos hi_mem]\n  exact (h_meas i hi_mem).choose_spec.1\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\n⊢ ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\n[PROOFSTEP]\nintro i hi_mem\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\ni : ι\nhi_mem : i ∈ S\n⊢ MeasurableSet (setsβ i)\n[PROOFSTEP]\nsimp_rw [dif_pos hi_mem]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\ni : ι\nhi_mem : i ∈ S\n⊢ MeasurableSet (Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i))\n[PROOFSTEP]\nexact (h_meas i hi_mem).choose_spec.1\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑(↑κ a) (setsΩ i)\n[PROOFSTEP]\nhave h_preim : ∀ i ∈ S, setsΩ i = f i ⁻¹' setsβ i :=\n  by\n  intro i hi_mem\n  simp_rw [dif_pos hi_mem]\n  exact (h_meas i hi_mem).choose_spec.2.symm\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\n⊢ ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\n[PROOFSTEP]\nintro i hi_mem\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\ni : ι\nhi_mem : i ∈ S\n⊢ setsΩ i = f i ⁻¹' setsβ i\n[PROOFSTEP]\nsimp_rw [dif_pos hi_mem]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\ni : ι\nhi_mem : i ∈ S\n⊢ setsΩ i = f i ⁻¹' Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i)\n[PROOFSTEP]\nexact (h_meas i hi_mem).choose_spec.2.symm\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑(↑κ a) (setsΩ i)\n[PROOFSTEP]\nhave h_left_eq : ∀ a, κ a (⋂ i ∈ S, setsΩ i) = κ a (⋂ i ∈ S, (f i) ⁻¹' (setsβ i)) :=\n  by\n  intro a\n  congr with x\n  simp_rw [Set.mem_iInter]\n  constructor <;> intro h i hi_mem <;> specialize h i hi_mem\n  · rwa [h_preim i hi_mem] at h \n  · rwa [h_preim i hi_mem]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\n⊢ ∀ (a : α), ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)\n[PROOFSTEP]\nintro a\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\na : α\n⊢ ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase e_a.h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\na : α\nx : Ω\n⊢ x ∈ ⋂ (i : ι) (_ : i ∈ S), setsΩ i ↔ x ∈ ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i\n[PROOFSTEP]\nsimp_rw [Set.mem_iInter]\n[GOAL]\ncase e_a.h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\na : α\nx : Ω\n⊢ (∀ (i : ι), i ∈ S → x ∈ setsΩ i) ↔\n    ∀ (i : ι),\n      i ∈ S →\n        x ∈ f i ⁻¹' if h : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase e_a.h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\na : α\nx : Ω\n⊢ (∀ (i : ι), i ∈ S → x ∈ setsΩ i) →\n    ∀ (i : ι),\n      i ∈ S →\n        x ∈ f i ⁻¹' if h : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\n[PROOFSTEP]\nintro h i hi_mem\n[GOAL]\ncase e_a.h.mpr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\na : α\nx : Ω\n⊢ (∀ (i : ι),\n      i ∈ S →\n        x ∈ f i ⁻¹' if h : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ) →\n    ∀ (i : ι), i ∈ S → x ∈ setsΩ i\n[PROOFSTEP]\nintro h i hi_mem\n[GOAL]\ncase e_a.h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh✝ :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\na : α\nx : Ω\nh : ∀ (i : ι), i ∈ S → x ∈ setsΩ i\ni : ι\nhi_mem : i ∈ S\n⊢ x ∈ f i ⁻¹' if h : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\n[PROOFSTEP]\nspecialize h i hi_mem\n[GOAL]\ncase e_a.h.mpr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh✝ :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\na : α\nx : Ω\nh :\n  ∀ (i : ι),\n    i ∈ S → x ∈ f i ⁻¹' if h : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\ni : ι\nhi_mem : i ∈ S\n⊢ x ∈ setsΩ i\n[PROOFSTEP]\nspecialize h i hi_mem\n[GOAL]\ncase e_a.h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh✝ :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\na : α\nx : Ω\ni : ι\nhi_mem : i ∈ S\nh : x ∈ setsΩ i\n⊢ x ∈ f i ⁻¹' if h : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\n[PROOFSTEP]\nrwa [h_preim i hi_mem] at h \n[GOAL]\ncase e_a.h.mpr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh✝ :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\na : α\nx : Ω\ni : ι\nhi_mem : i ∈ S\nh : x ∈ f i ⁻¹' if h : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\n⊢ x ∈ setsΩ i\n[PROOFSTEP]\nrwa [h_preim i hi_mem]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\nh_left_eq : ∀ (a : α), ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑(↑κ a) (setsΩ i)\n[PROOFSTEP]\nhave h_right_eq : ∀ a, (∏ i in S, κ a (setsΩ i)) = ∏ i in S, κ a ((f i) ⁻¹' (setsβ i)) :=\n  by\n  refine' fun a ↦ Finset.prod_congr rfl fun i hi_mem => _\n  rw [h_preim i hi_mem]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\nh_left_eq : ∀ (a : α), ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)\n⊢ ∀ (a : α), ∏ i in S, ↑↑(↑κ a) (setsΩ i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' setsβ i)\n[PROOFSTEP]\nrefine' fun a ↦ Finset.prod_congr rfl fun i hi_mem => _\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\nh_left_eq : ∀ (a : α), ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)\na : α\ni : ι\nhi_mem : i ∈ S\n⊢ ↑↑(↑κ a) (setsΩ i) = ↑↑(↑κ a) (f i ⁻¹' setsβ i)\n[PROOFSTEP]\nrw [h_preim i hi_mem]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\nh_left_eq : ∀ (a : α), ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)\nh_right_eq : ∀ (a : α), ∏ i in S, ↑↑(↑κ a) (setsΩ i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' setsβ i)\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑(↑κ a) (setsΩ i)\n[PROOFSTEP]\nfilter_upwards [h S h_measβ] with a ha\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\nι : Type u_8\nβ : ι → Type u_9\nm : (x : ι) → MeasurableSpace (β x)\nf : (i : ι) → Ω → β i\nh :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nS : Finset ι\nsetsΩ : ι → Set Ω\nh_meas : ∀ (i : ι), i ∈ S → setsΩ i ∈ (fun x => {s | MeasurableSet s}) i\nsetsβ : (i : ι) → Set (β i) :=\n  fun i => if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ\nh_measβ : ∀ (i : ι), i ∈ S → MeasurableSet (setsβ i)\nh_preim : ∀ (i : ι), i ∈ S → setsΩ i = f i ⁻¹' setsβ i\nh_left_eq : ∀ (a : α), ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' setsβ i)\nh_right_eq : ∀ (a : α), ∏ i in S, ↑↑(↑κ a) (setsΩ i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' setsβ i)\na : α\nha :\n  ↑↑(↑κ a)\n      (⋂ (i : ι) (_ : i ∈ S),\n        f i ⁻¹' if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ) =\n    ∏ i in S,\n      ↑↑(↑κ a)\n        (f i ⁻¹' if hi_mem : i ∈ S then Exists.choose (_ : setsΩ i ∈ (fun x => {s | MeasurableSet s}) i) else Set.univ)\n⊢ ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), setsΩ i) = ∏ i in S, ↑↑(↑κ a) (setsΩ i)\n[PROOFSTEP]\nrw [h_left_eq a, h_right_eq a, ha]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\ninst✝ : IsMarkovKernel κ\nhf : Measurable f\nhg : Measurable g\n⊢ IndepFun f g κ ↔ ∀ (s : Set β) (t : Set β'), MeasurableSet s → MeasurableSet t → IndepSet (f ⁻¹' s) (g ⁻¹' t) κ\n[PROOFSTEP]\nrefine' indepFun_iff_measure_inter_preimage_eq_mul.trans _\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\ninst✝ : IsMarkovKernel κ\nhf : Measurable f\nhg : Measurable g\n⊢ (∀ (s : Set β) (t : Set β'),\n      MeasurableSet s →\n        MeasurableSet t → ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)) ↔\n    ∀ (s : Set β) (t : Set β'), MeasurableSet s → MeasurableSet t → IndepSet (f ⁻¹' s) (g ⁻¹' t) κ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\ninst✝ : IsMarkovKernel κ\nhf : Measurable f\nhg : Measurable g\n⊢ (∀ (s : Set β) (t : Set β'),\n      MeasurableSet s →\n        MeasurableSet t → ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)) →\n    ∀ (s : Set β) (t : Set β'), MeasurableSet s → MeasurableSet t → IndepSet (f ⁻¹' s) (g ⁻¹' t) κ\n[PROOFSTEP]\nintro h s t hs ht\n[GOAL]\ncase mpr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\ninst✝ : IsMarkovKernel κ\nhf : Measurable f\nhg : Measurable g\n⊢ (∀ (s : Set β) (t : Set β'), MeasurableSet s → MeasurableSet t → IndepSet (f ⁻¹' s) (g ⁻¹' t) κ) →\n    ∀ (s : Set β) (t : Set β'),\n      MeasurableSet s →\n        MeasurableSet t → ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)\n[PROOFSTEP]\nintro h s t hs ht\n[GOAL]\ncase mp\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\ninst✝ : IsMarkovKernel κ\nhf : Measurable f\nhg : Measurable g\nh :\n  ∀ (s : Set β) (t : Set β'),\n    MeasurableSet s →\n      MeasurableSet t → ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)\ns : Set β\nt : Set β'\nhs : MeasurableSet s\nht : MeasurableSet t\n⊢ IndepSet (f ⁻¹' s) (g ⁻¹' t) κ\n[PROOFSTEP]\nspecialize h s t hs ht\n[GOAL]\ncase mpr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\ninst✝ : IsMarkovKernel κ\nhf : Measurable f\nhg : Measurable g\nh : ∀ (s : Set β) (t : Set β'), MeasurableSet s → MeasurableSet t → IndepSet (f ⁻¹' s) (g ⁻¹' t) κ\ns : Set β\nt : Set β'\nhs : MeasurableSet s\nht : MeasurableSet t\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)\n[PROOFSTEP]\nspecialize h s t hs ht\n[GOAL]\ncase mp\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\ninst✝ : IsMarkovKernel κ\nhf : Measurable f\nhg : Measurable g\ns : Set β\nt : Set β'\nhs : MeasurableSet s\nht : MeasurableSet t\nh : ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)\n⊢ IndepSet (f ⁻¹' s) (g ⁻¹' t) κ\n[PROOFSTEP]\nrwa [indepSet_iff_measure_inter_eq_mul (hf hs) (hg ht) κ μ]\n[GOAL]\ncase mpr\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\ninst✝ : IsMarkovKernel κ\nhf : Measurable f\nhg : Measurable g\ns : Set β\nt : Set β'\nhs : MeasurableSet s\nht : MeasurableSet t\nh : IndepSet (f ⁻¹' s) (g ⁻¹' t) κ\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f ⁻¹' s ∩ g ⁻¹' t) = ↑↑(↑κ a) (f ⁻¹' s) * ↑↑(↑κ a) (g ⁻¹' t)\n[PROOFSTEP]\nrwa [← indepSet_iff_measure_inter_eq_mul (hf hs) (hg ht) κ μ]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β\ng✝ : Ω → β'\nmβ : MeasurableSpace β\nf g f' g' : Ω → β\nhfg : IndepFun f g κ\nhf : ∀ᵐ (a : α) ∂μ, f =ᵐ[↑κ a] f'\nhg : ∀ᵐ (a : α) ∂μ, g =ᵐ[↑κ a] g'\n⊢ IndepFun f' g' κ\n[PROOFSTEP]\nrintro _ _ ⟨A, hA, rfl⟩ ⟨B, hB, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β\ng✝ : Ω → β'\nmβ : MeasurableSpace β\nf g f' g' : Ω → β\nhfg : IndepFun f g κ\nhf : ∀ᵐ (a : α) ∂μ, f =ᵐ[↑κ a] f'\nhg : ∀ᵐ (a : α) ∂μ, g =ᵐ[↑κ a] g'\nA : Set β\nhA : MeasurableSet A\nB : Set β\nhB : MeasurableSet B\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (f' ⁻¹' A ∩ g' ⁻¹' B) = ↑↑(↑κ a) (f' ⁻¹' A) * ↑↑(↑κ a) (g' ⁻¹' B)\n[PROOFSTEP]\nfilter_upwards [hf, hg, hfg _ _ ⟨_, hA, rfl⟩ ⟨_, hB, rfl⟩] with a hf' hg' hfg'\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β\ng✝ : Ω → β'\nmβ : MeasurableSpace β\nf g f' g' : Ω → β\nhfg : IndepFun f g κ\nhf : ∀ᵐ (a : α) ∂μ, f =ᵐ[↑κ a] f'\nhg : ∀ᵐ (a : α) ∂μ, g =ᵐ[↑κ a] g'\nA : Set β\nhA : MeasurableSet A\nB : Set β\nhB : MeasurableSet B\na : α\nhf' : f =ᵐ[↑κ a] f'\nhg' : g =ᵐ[↑κ a] g'\nhfg' : ↑↑(↑κ a) (f ⁻¹' A ∩ g ⁻¹' B) = ↑↑(↑κ a) (f ⁻¹' A) * ↑↑(↑κ a) (g ⁻¹' B)\n⊢ ↑↑(↑κ a) (f' ⁻¹' A ∩ g' ⁻¹' B) = ↑↑(↑κ a) (f' ⁻¹' A) * ↑↑(↑κ a) (g' ⁻¹' B)\n[PROOFSTEP]\nhave h1 : f ⁻¹' A =ᵐ[κ a] f' ⁻¹' A := hf'.fun_comp A\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β\ng✝ : Ω → β'\nmβ : MeasurableSpace β\nf g f' g' : Ω → β\nhfg : IndepFun f g κ\nhf : ∀ᵐ (a : α) ∂μ, f =ᵐ[↑κ a] f'\nhg : ∀ᵐ (a : α) ∂μ, g =ᵐ[↑κ a] g'\nA : Set β\nhA : MeasurableSet A\nB : Set β\nhB : MeasurableSet B\na : α\nhf' : f =ᵐ[↑κ a] f'\nhg' : g =ᵐ[↑κ a] g'\nhfg' : ↑↑(↑κ a) (f ⁻¹' A ∩ g ⁻¹' B) = ↑↑(↑κ a) (f ⁻¹' A) * ↑↑(↑κ a) (g ⁻¹' B)\nh1 : f ⁻¹' A =ᵐ[↑κ a] f' ⁻¹' A\n⊢ ↑↑(↑κ a) (f' ⁻¹' A ∩ g' ⁻¹' B) = ↑↑(↑κ a) (f' ⁻¹' A) * ↑↑(↑κ a) (g' ⁻¹' B)\n[PROOFSTEP]\nhave h2 : g ⁻¹' B =ᵐ[κ a] g' ⁻¹' B := hg'.fun_comp B\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β\ng✝ : Ω → β'\nmβ : MeasurableSpace β\nf g f' g' : Ω → β\nhfg : IndepFun f g κ\nhf : ∀ᵐ (a : α) ∂μ, f =ᵐ[↑κ a] f'\nhg : ∀ᵐ (a : α) ∂μ, g =ᵐ[↑κ a] g'\nA : Set β\nhA : MeasurableSet A\nB : Set β\nhB : MeasurableSet B\na : α\nhf' : f =ᵐ[↑κ a] f'\nhg' : g =ᵐ[↑κ a] g'\nhfg' : ↑↑(↑κ a) (f ⁻¹' A ∩ g ⁻¹' B) = ↑↑(↑κ a) (f ⁻¹' A) * ↑↑(↑κ a) (g ⁻¹' B)\nh1 : f ⁻¹' A =ᵐ[↑κ a] f' ⁻¹' A\nh2 : g ⁻¹' B =ᵐ[↑κ a] g' ⁻¹' B\n⊢ ↑↑(↑κ a) (f' ⁻¹' A ∩ g' ⁻¹' B) = ↑↑(↑κ a) (f' ⁻¹' A) * ↑↑(↑κ a) (g' ⁻¹' B)\n[PROOFSTEP]\nrwa [← measure_congr h1, ← measure_congr h2, ← measure_congr (h1.inter h2)]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\nmγ : MeasurableSpace γ\nmγ' : MeasurableSpace γ'\nφ : β → γ\nψ : β' → γ'\nhfg : IndepFun f g κ\nhφ : Measurable φ\nhψ : Measurable ψ\n⊢ IndepFun (φ ∘ f) (ψ ∘ g) κ\n[PROOFSTEP]\nrintro _ _ ⟨A, hA, rfl⟩ ⟨B, hB, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\nmγ : MeasurableSpace γ\nmγ' : MeasurableSpace γ'\nφ : β → γ\nψ : β' → γ'\nhfg : IndepFun f g κ\nhφ : Measurable φ\nhψ : Measurable ψ\nA : Set γ\nhA : MeasurableSet A\nB : Set γ'\nhB : MeasurableSet B\n⊢ ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (φ ∘ f ⁻¹' A ∩ ψ ∘ g ⁻¹' B) = ↑↑(↑κ a) (φ ∘ f ⁻¹' A) * ↑↑(↑κ a) (ψ ∘ g ⁻¹' B)\n[PROOFSTEP]\napply hfg\n[GOAL]\ncase intro.intro.intro.intro.a\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\nmγ : MeasurableSpace γ\nmγ' : MeasurableSpace γ'\nφ : β → γ\nψ : β' → γ'\nhfg : IndepFun f g κ\nhφ : Measurable φ\nhψ : Measurable ψ\nA : Set γ\nhA : MeasurableSet A\nB : Set γ'\nhB : MeasurableSet B\n⊢ φ ∘ f ⁻¹' A ∈ {s | MeasurableSet s}\n[PROOFSTEP]\nexact ⟨φ ⁻¹' A, hφ hA, Set.preimage_comp.symm⟩\n[GOAL]\ncase intro.intro.intro.intro.a\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\nmβ : MeasurableSpace β\nmβ' : MeasurableSpace β'\nmγ : MeasurableSpace γ\nmγ' : MeasurableSpace γ'\nφ : β → γ\nψ : β' → γ'\nhfg : IndepFun f g κ\nhφ : Measurable φ\nhψ : Measurable ψ\nA : Set γ\nhA : MeasurableSet A\nB : Set γ'\nhB : MeasurableSet B\n⊢ ψ ∘ g ⁻¹' B ∈ {s | MeasurableSet s}\n[PROOFSTEP]\nexact ⟨ψ ⁻¹' B, hψ hB, Set.preimage_comp.symm⟩\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\n⊢ IndepFun (fun a i => f (↑i) a) (fun a i => f (↑i) a) κ\n[PROOFSTEP]\nlet πSβ := Set.pi (Set.univ : Set S) '' Set.pi (Set.univ : Set S) fun i => {s : Set (β i) | MeasurableSet[m i] s}\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\n⊢ IndepFun (fun a i => f (↑i) a) (fun a i => f (↑i) a) κ\n[PROOFSTEP]\nlet πS := {s : Set Ω | ∃ t ∈ πSβ, (fun a (i : S) => f i a) ⁻¹' t = s}\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\n⊢ IndepFun (fun a i => f (↑i) a) (fun a i => f (↑i) a) κ\n[PROOFSTEP]\nhave hπS_pi : IsPiSystem πS := by exact IsPiSystem.comap (@isPiSystem_pi _ _ ?_) _\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\n⊢ IsPiSystem πS\n[PROOFSTEP]\nexact IsPiSystem.comap (@isPiSystem_pi _ _ ?_) _\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\n⊢ IndepFun (fun a i => f (↑i) a) (fun a i => f (↑i) a) κ\n[PROOFSTEP]\nhave hπS_gen : (MeasurableSpace.pi.comap fun a (i : S) => f i a) = generateFrom πS :=\n  by\n  rw [generateFrom_pi.symm, comap_generateFrom]\n  congr\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\n⊢ MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\n[PROOFSTEP]\nrw [generateFrom_pi.symm, comap_generateFrom]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\n⊢ generateFrom\n      ((Set.preimage fun a i => f (↑i) a) '' (Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s})) =\n    generateFrom πS\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\n⊢ IndepFun (fun a i => f (↑i) a) (fun a i => f (↑i) a) κ\n[PROOFSTEP]\nlet πTβ := Set.pi (Set.univ : Set T) '' Set.pi (Set.univ : Set T) fun i => {s : Set (β i) | MeasurableSet[m i] s}\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\n⊢ IndepFun (fun a i => f (↑i) a) (fun a i => f (↑i) a) κ\n[PROOFSTEP]\nlet πT := {s : Set Ω | ∃ t ∈ πTβ, (fun a (i : T) => f i a) ⁻¹' t = s}\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\n⊢ IndepFun (fun a i => f (↑i) a) (fun a i => f (↑i) a) κ\n[PROOFSTEP]\nhave hπT_pi : IsPiSystem πT := by exact IsPiSystem.comap (@isPiSystem_pi _ _ ?_) _\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\n⊢ IsPiSystem πT\n[PROOFSTEP]\nexact IsPiSystem.comap (@isPiSystem_pi _ _ ?_) _\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\n⊢ IndepFun (fun a i => f (↑i) a) (fun a i => f (↑i) a) κ\n[PROOFSTEP]\nhave hπT_gen : (MeasurableSpace.pi.comap fun a (i : T) => f i a) = generateFrom πT :=\n  by\n  rw [generateFrom_pi.symm, comap_generateFrom]\n  congr\n    -- To prove independence, we prove independence of the generating π-systems.\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\n⊢ MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\n[PROOFSTEP]\nrw [generateFrom_pi.symm, comap_generateFrom]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\n⊢ generateFrom\n      ((Set.preimage fun a i => f (↑i) a) '' (Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s})) =\n    generateFrom πT\n[PROOFSTEP]\ncongr\n  -- To prove independence, we prove independence of the generating π-systems.\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\n⊢ IndepFun (fun a i => f (↑i) a) (fun a i => f (↑i) a) κ\n[PROOFSTEP]\nrefine\n  IndepSets.indep (Measurable.comap_le (measurable_pi_iff.mpr fun i => hf_meas i))\n    (Measurable.comap_le (measurable_pi_iff.mpr fun i => hf_meas i)) hπS_pi hπT_pi hπS_gen hπT_gen ?_\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\n⊢ IndepSets πS πT κ\n[PROOFSTEP]\nrintro _ _ ⟨s, ⟨sets_s, hs1, hs2⟩, rfl⟩ ⟨t, ⟨sets_t, ht1, ht2⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs1 : sets_s ∈ Set.pi Set.univ fun i => {s | MeasurableSet s}\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht1 : sets_t ∈ Set.pi Set.univ fun i => {s | MeasurableSet s}\nht2 : Set.pi Set.univ sets_t = t\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' s ∩ (fun a i => f (↑i) a) ⁻¹' t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' s) * ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' t)\n[PROOFSTEP]\nsimp only [Set.mem_univ_pi, Set.mem_setOf_eq] at hs1 ht1 \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' s ∩ (fun a i => f (↑i) a) ⁻¹' t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' s) * ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' t)\n[PROOFSTEP]\nrw [← hs2, ← ht2]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nclassical\nlet sets_s' : ∀ i : ι, Set (β i) := fun i => dite (i ∈ S) (fun hi => sets_s ⟨i, hi⟩) fun _ => Set.univ\nhave h_sets_s'_eq : ∀ {i} (hi : i ∈ S), sets_s' i = sets_s ⟨i, hi⟩ := by intro i hi; simp_rw [dif_pos hi]\nhave h_sets_s'_univ : ∀ {i} (_hi : i ∈ T), sets_s' i = Set.univ := by intro i hi;\n  simp_rw [dif_neg (Finset.disjoint_right.mp hST hi)]\nlet sets_t' : ∀ i : ι, Set (β i) := fun i => dite (i ∈ T) (fun hi => sets_t ⟨i, hi⟩) fun _ => Set.univ\nhave h_sets_t'_univ : ∀ {i} (_hi : i ∈ S), sets_t' i = Set.univ := by intro i hi;\n  simp_rw [dif_neg (Finset.disjoint_left.mp hST hi)]\nhave h_meas_s' : ∀ i ∈ S, MeasurableSet (sets_s' i) := by intro i hi; rw [h_sets_s'_eq hi]; exact hs1 _\nhave h_meas_t' : ∀ i ∈ T, MeasurableSet (sets_t' i) := by intro i hi; simp_rw [dif_pos hi]; exact ht1 _\nhave h_eq_inter_S : (fun (ω : Ω) (i : ↥S) => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ i ∈ S, f i ⁻¹' sets_s' i :=\n  by\n  ext1 x\n  simp_rw [Set.mem_preimage, Set.mem_univ_pi, Set.mem_iInter]\n  constructor <;> intro h\n  · intro i hi; simp only [h_sets_s'_eq hi, Set.mem_preimage]; exact h ⟨i, hi⟩\n  · rintro ⟨i, hi⟩; specialize h i hi; rwa [dif_pos hi] at h \nhave h_eq_inter_T : (fun (ω : Ω) (i : ↥T) => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ i ∈ T, f i ⁻¹' sets_t' i :=\n  by\n  ext1 x\n  simp only [Set.mem_preimage, Set.mem_univ_pi, Set.mem_iInter]\n  constructor <;> intro h\n  · intro i hi; simp_rw [dif_pos hi]; exact h ⟨i, hi⟩\n  · rintro ⟨i, hi⟩; specialize h i hi; simp_rw [dif_pos hi] at h ; exact h\nrw [iIndepFun_iff_measure_inter_preimage_eq_mul] at hf_Indep \nhave h_Inter_inter :\n  ((⋂ i ∈ S, f i ⁻¹' sets_s' i) ∩ ⋂ i ∈ T, f i ⁻¹' sets_t' i) = ⋂ i ∈ S ∪ T, f i ⁻¹' (sets_s' i ∩ sets_t' i) :=\n  by\n  ext1 x\n  simp_rw [Set.mem_inter_iff, Set.mem_iInter, Set.mem_preimage, Finset.mem_union]\n  constructor <;> intro h\n  · intro i hi\n    cases' hi with hiS hiT\n    · replace h := h.1 i hiS\n      simp_rw [dif_pos hiS, dif_neg (Finset.disjoint_left.mp hST hiS)]\n      exact ⟨by rwa [dif_pos hiS] at h , Set.mem_univ _⟩\n    · replace h := h.2 i hiT\n      simp_rw [dif_pos hiT, dif_neg (Finset.disjoint_right.mp hST hiT)]\n      exact ⟨Set.mem_univ _, by rwa [dif_pos hiT] at h ⟩\n  · exact ⟨fun i hi => (h i (Or.inl hi)).1, fun i hi => (h i (Or.inr hi)).2⟩\nhave h_meas_inter : ∀ i ∈ S ∪ T, MeasurableSet (sets_s' i ∩ sets_t' i) :=\n  by\n  intros i hi_mem\n  rw [Finset.mem_union] at hi_mem \n  cases' hi_mem with hi_mem hi_mem\n  · rw [h_sets_t'_univ hi_mem, Set.inter_univ]\n    exact h_meas_s' i hi_mem\n  · rw [h_sets_s'_univ hi_mem, Set.univ_inter]\n    exact h_meas_t' i hi_mem\nfilter_upwards [hf_Indep S h_meas_s', hf_Indep T h_meas_t', hf_Indep (S ∪ T) h_meas_inter] with a h_indepS h_indepT\n  h_indepST\nrw [h_eq_inter_S, h_eq_inter_T, h_indepS, h_indepT, h_Inter_inter, h_indepST, Finset.prod_union hST]\ncongr 1\n· refine'\n    Finset.prod_congr rfl fun i hi =>\n      _\n        -- todo : show is necessary because of todo above\n  show κ a (f i ⁻¹' (sets_s' i ∩ sets_t' i)) = κ a (f i ⁻¹' (sets_s' i))\n  rw [h_sets_t'_univ hi, Set.inter_univ]\n· refine'\n    Finset.prod_congr rfl fun i hi =>\n      _\n        -- todo : show is necessary because of todo above\n  show κ a (f i ⁻¹' (sets_s' i ∩ sets_t' i)) = κ a (f i ⁻¹' (sets_t' i))\n  rw [h_sets_s'_univ hi, Set.univ_inter]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nlet sets_s' : ∀ i : ι, Set (β i) := fun i => dite (i ∈ S) (fun hi => sets_s ⟨i, hi⟩) fun _ => Set.univ\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nhave h_sets_s'_eq : ∀ {i} (hi : i ∈ S), sets_s' i = sets_s ⟨i, hi⟩ := by intro i hi; simp_rw [dif_pos hi]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\n⊢ ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\n[PROOFSTEP]\nintro i hi\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\ni : ι\nhi : i ∈ S\n⊢ sets_s' i = sets_s { val := i, property := hi }\n[PROOFSTEP]\nsimp_rw [dif_pos hi]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nhave h_sets_s'_univ : ∀ {i} (_hi : i ∈ T), sets_s' i = Set.univ := by intro i hi;\n  simp_rw [dif_neg (Finset.disjoint_right.mp hST hi)]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\n⊢ ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\n[PROOFSTEP]\nintro i hi\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\ni : ι\nhi : i ∈ T\n⊢ sets_s' i = Set.univ\n[PROOFSTEP]\nsimp_rw [dif_neg (Finset.disjoint_right.mp hST hi)]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nlet sets_t' : ∀ i : ι, Set (β i) := fun i => dite (i ∈ T) (fun hi => sets_t ⟨i, hi⟩) fun _ => Set.univ\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nhave h_sets_t'_univ : ∀ {i} (_hi : i ∈ S), sets_t' i = Set.univ := by intro i hi;\n  simp_rw [dif_neg (Finset.disjoint_left.mp hST hi)]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n⊢ ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\n[PROOFSTEP]\nintro i hi\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\ni : ι\nhi : i ∈ S\n⊢ sets_t' i = Set.univ\n[PROOFSTEP]\nsimp_rw [dif_neg (Finset.disjoint_left.mp hST hi)]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nhave h_meas_s' : ∀ i ∈ S, MeasurableSet (sets_s' i) := by intro i hi; rw [h_sets_s'_eq hi]; exact hs1 _\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\n⊢ ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\n[PROOFSTEP]\nintro i hi\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\ni : ι\nhi : i ∈ S\n⊢ MeasurableSet (sets_s' i)\n[PROOFSTEP]\nrw [h_sets_s'_eq hi]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\ni : ι\nhi : i ∈ S\n⊢ MeasurableSet (sets_s { val := i, property := hi })\n[PROOFSTEP]\nexact hs1 _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nhave h_meas_t' : ∀ i ∈ T, MeasurableSet (sets_t' i) := by intro i hi; simp_rw [dif_pos hi]; exact ht1 _\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\n⊢ ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\n[PROOFSTEP]\nintro i hi\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\ni : ι\nhi : i ∈ T\n⊢ MeasurableSet (sets_t' i)\n[PROOFSTEP]\nsimp_rw [dif_pos hi]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\ni : ι\nhi : i ∈ T\n⊢ MeasurableSet (sets_t { val := i, property := hi })\n[PROOFSTEP]\nexact ht1 _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nhave h_eq_inter_S : (fun (ω : Ω) (i : ↥S) => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ i ∈ S, f i ⁻¹' sets_s' i :=\n  by\n  ext1 x\n  simp_rw [Set.mem_preimage, Set.mem_univ_pi, Set.mem_iInter]\n  constructor <;> intro h\n  · intro i hi; simp only [h_sets_s'_eq hi, Set.mem_preimage]; exact h ⟨i, hi⟩\n  · rintro ⟨i, hi⟩; specialize h i hi; rwa [dif_pos hi] at h \n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\n⊢ (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nx : Ω\n⊢ x ∈ (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s ↔ x ∈ ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\n[PROOFSTEP]\nsimp_rw [Set.mem_preimage, Set.mem_univ_pi, Set.mem_iInter]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nx : Ω\n⊢ (∀ (i : { x // x ∈ S }), f (↑i) x ∈ sets_s i) ↔\n    ∀ (i : ι), i ∈ S → x ∈ f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nx : Ω\n⊢ (∀ (i : { x // x ∈ S }), f (↑i) x ∈ sets_s i) →\n    ∀ (i : ι), i ∈ S → x ∈ f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mpr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nx : Ω\n⊢ (∀ (i : ι), i ∈ S → x ∈ f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) →\n    ∀ (i : { x // x ∈ S }), f (↑i) x ∈ sets_s i\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nx : Ω\nh : ∀ (i : { x // x ∈ S }), f (↑i) x ∈ sets_s i\n⊢ ∀ (i : ι), i ∈ S → x ∈ f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nx : Ω\nh : ∀ (i : { x // x ∈ S }), f (↑i) x ∈ sets_s i\ni : ι\nhi : i ∈ S\n⊢ x ∈ f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nsimp only [h_sets_s'_eq hi, Set.mem_preimage]\n[GOAL]\ncase h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nx : Ω\nh : ∀ (i : { x // x ∈ S }), f (↑i) x ∈ sets_s i\ni : ι\nhi : i ∈ S\n⊢ f i x ∈ sets_s { val := i, property := hi }\n[PROOFSTEP]\nexact h ⟨i, hi⟩\n[GOAL]\ncase h.mpr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nx : Ω\nh : ∀ (i : ι), i ∈ S → x ∈ f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\n⊢ ∀ (i : { x // x ∈ S }), f (↑i) x ∈ sets_s i\n[PROOFSTEP]\nrintro ⟨i, hi⟩\n[GOAL]\ncase h.mpr.mk\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nx : Ω\nh : ∀ (i : ι), i ∈ S → x ∈ f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\ni : ι\nhi : i ∈ S\n⊢ f (↑{ val := i, property := hi }) x ∈ sets_s { val := i, property := hi }\n[PROOFSTEP]\nspecialize h i hi\n[GOAL]\ncase h.mpr.mk\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nx : Ω\ni : ι\nhi : i ∈ S\nh : x ∈ f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\n⊢ f (↑{ val := i, property := hi }) x ∈ sets_s { val := i, property := hi }\n[PROOFSTEP]\nrwa [dif_pos hi] at h \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nhave h_eq_inter_T : (fun (ω : Ω) (i : ↥T) => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ i ∈ T, f i ⁻¹' sets_t' i :=\n  by\n  ext1 x\n  simp only [Set.mem_preimage, Set.mem_univ_pi, Set.mem_iInter]\n  constructor <;> intro h\n  · intro i hi; simp_rw [dif_pos hi]; exact h ⟨i, hi⟩\n  · rintro ⟨i, hi⟩; specialize h i hi; simp_rw [dif_pos hi] at h ; exact h\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\n⊢ (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nx : Ω\n⊢ x ∈ (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t ↔ x ∈ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\n[PROOFSTEP]\nsimp only [Set.mem_preimage, Set.mem_univ_pi, Set.mem_iInter]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nx : Ω\n⊢ (∀ (i : { x // x ∈ T }), f (↑i) x ∈ sets_t i) ↔\n    ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nx : Ω\n⊢ (∀ (i : { x // x ∈ T }), f (↑i) x ∈ sets_t i) →\n    ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mpr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nx : Ω\n⊢ (∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ) →\n    ∀ (i : { x // x ∈ T }), f (↑i) x ∈ sets_t i\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nx : Ω\nh : ∀ (i : { x // x ∈ T }), f (↑i) x ∈ sets_t i\n⊢ ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nx : Ω\nh : ∀ (i : { x // x ∈ T }), f (↑i) x ∈ sets_t i\ni : ι\nhi : i ∈ T\n⊢ f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nsimp_rw [dif_pos hi]\n[GOAL]\ncase h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nx : Ω\nh : ∀ (i : { x // x ∈ T }), f (↑i) x ∈ sets_t i\ni : ι\nhi : i ∈ T\n⊢ f i x ∈ sets_t { val := i, property := hi }\n[PROOFSTEP]\nexact h ⟨i, hi⟩\n[GOAL]\ncase h.mpr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nx : Ω\nh : ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n⊢ ∀ (i : { x // x ∈ T }), f (↑i) x ∈ sets_t i\n[PROOFSTEP]\nrintro ⟨i, hi⟩\n[GOAL]\ncase h.mpr.mk\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nx : Ω\nh : ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\ni : ι\nhi : i ∈ T\n⊢ f (↑{ val := i, property := hi }) x ∈ sets_t { val := i, property := hi }\n[PROOFSTEP]\nspecialize h i hi\n[GOAL]\ncase h.mpr.mk\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nx : Ω\ni : ι\nhi : i ∈ T\nh : f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n⊢ f (↑{ val := i, property := hi }) x ∈ sets_t { val := i, property := hi }\n[PROOFSTEP]\nsimp_rw [dif_pos hi] at h \n[GOAL]\ncase h.mpr.mk\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nx : Ω\ni : ι\nhi : i ∈ T\nh : f i x ∈ sets_t { val := i, property := hi }\n⊢ f (↑{ val := i, property := hi }) x ∈ sets_t { val := i, property := hi }\n[PROOFSTEP]\nexact h\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nrw [iIndepFun_iff_measure_inter_preimage_eq_mul] at hf_Indep \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nhave h_Inter_inter :\n  ((⋂ i ∈ S, f i ⁻¹' sets_s' i) ∩ ⋂ i ∈ T, f i ⁻¹' sets_t' i) = ⋂ i ∈ S ∪ T, f i ⁻¹' (sets_s' i ∩ sets_t' i) :=\n  by\n  ext1 x\n  simp_rw [Set.mem_inter_iff, Set.mem_iInter, Set.mem_preimage, Finset.mem_union]\n  constructor <;> intro h\n  · intro i hi\n    cases' hi with hiS hiT\n    · replace h := h.1 i hiS\n      simp_rw [dif_pos hiS, dif_neg (Finset.disjoint_left.mp hST hiS)]\n      exact ⟨by rwa [dif_pos hiS] at h , Set.mem_univ _⟩\n    · replace h := h.2 i hiT\n      simp_rw [dif_pos hiT, dif_neg (Finset.disjoint_right.mp hST hiT)]\n      exact ⟨Set.mem_univ _, by rwa [dif_pos hiT] at h ⟩\n  · exact ⟨fun i hi => (h i (Or.inl hi)).1, fun i hi => (h i (Or.inr hi)).2⟩\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\n⊢ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\n⊢ x ∈ (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i ↔\n    x ∈ ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\n[PROOFSTEP]\nsimp_rw [Set.mem_inter_iff, Set.mem_iInter, Set.mem_preimage, Finset.mem_union]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\n⊢ ((∀ (i : ι), i ∈ S → f i x ∈ if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∧\n      ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ) ↔\n    ∀ (i : ι),\n      i ∈ S ∨ i ∈ T →\n        f i x ∈\n          (if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\n⊢ ((∀ (i : ι), i ∈ S → f i x ∈ if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∧\n      ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ) →\n    ∀ (i : ι),\n      i ∈ S ∨ i ∈ T →\n        f i x ∈\n          (if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mpr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\n⊢ (∀ (i : ι),\n      i ∈ S ∨ i ∈ T →\n        f i x ∈\n          (if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ) →\n    (∀ (i : ι), i ∈ S → f i x ∈ if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∧\n      ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\nh :\n  (∀ (i : ι), i ∈ S → f i x ∈ if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∧\n    ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n⊢ ∀ (i : ι),\n    i ∈ S ∨ i ∈ T →\n      f i x ∈\n        (if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n          if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.mp\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\nh :\n  (∀ (i : ι), i ∈ S → f i x ∈ if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∧\n    ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\ni : ι\nhi : i ∈ S ∨ i ∈ T\n⊢ f i x ∈\n    (if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n      if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\ncases' hi with hiS hiT\n[GOAL]\ncase h.mp.inl\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\nh :\n  (∀ (i : ι), i ∈ S → f i x ∈ if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∧\n    ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\ni : ι\nhiS : i ∈ S\n⊢ f i x ∈\n    (if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n      if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nreplace h := h.1 i hiS\n[GOAL]\ncase h.mp.inl\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\ni : ι\nhiS : i ∈ S\nh : f i x ∈ if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\n⊢ f i x ∈\n    (if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n      if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nsimp_rw [dif_pos hiS, dif_neg (Finset.disjoint_left.mp hST hiS)]\n[GOAL]\ncase h.mp.inl\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\ni : ι\nhiS : i ∈ S\nh : f i x ∈ if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\n⊢ f i x ∈ sets_s { val := i, property := hiS } ∩ Set.univ\n[PROOFSTEP]\nexact ⟨by rwa [dif_pos hiS] at h , Set.mem_univ _⟩\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\ni : ι\nhiS : i ∈ S\nh : f i x ∈ if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\n⊢ f i x ∈ sets_s { val := i, property := hiS }\n[PROOFSTEP]\nrwa [dif_pos hiS] at h \n[GOAL]\ncase h.mp.inr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\nh :\n  (∀ (i : ι), i ∈ S → f i x ∈ if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∧\n    ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\ni : ι\nhiT : i ∈ T\n⊢ f i x ∈\n    (if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n      if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nreplace h := h.2 i hiT\n[GOAL]\ncase h.mp.inr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\ni : ι\nhiT : i ∈ T\nh : f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n⊢ f i x ∈\n    (if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n      if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nsimp_rw [dif_pos hiT, dif_neg (Finset.disjoint_right.mp hST hiT)]\n[GOAL]\ncase h.mp.inr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\ni : ι\nhiT : i ∈ T\nh : f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n⊢ f i x ∈ Set.univ ∩ sets_t { val := i, property := hiT }\n[PROOFSTEP]\nexact ⟨Set.mem_univ _, by rwa [dif_pos hiT] at h ⟩\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\ni : ι\nhiT : i ∈ T\nh : f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n⊢ f i x ∈ sets_t { val := i, property := hiT }\n[PROOFSTEP]\nrwa [dif_pos hiT] at h \n[GOAL]\ncase h.mpr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nx : Ω\nh :\n  ∀ (i : ι),\n    i ∈ S ∨ i ∈ T →\n      f i x ∈\n        (if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n          if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n⊢ (∀ (i : ι), i ∈ S → f i x ∈ if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∧\n    ∀ (i : ι), i ∈ T → f i x ∈ if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\n[PROOFSTEP]\nexact ⟨fun i hi => (h i (Or.inl hi)).1, fun i hi => (h i (Or.inr hi)).2⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nhave h_meas_inter : ∀ i ∈ S ∪ T, MeasurableSet (sets_s' i ∩ sets_t' i) :=\n  by\n  intros i hi_mem\n  rw [Finset.mem_union] at hi_mem \n  cases' hi_mem with hi_mem hi_mem\n  · rw [h_sets_t'_univ hi_mem, Set.inter_univ]\n    exact h_meas_s' i hi_mem\n  · rw [h_sets_s'_univ hi_mem, Set.univ_inter]\n    exact h_meas_t' i hi_mem\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\n⊢ ∀ (i : ι), i ∈ S ∪ T → MeasurableSet (sets_s' i ∩ sets_t' i)\n[PROOFSTEP]\nintros i hi_mem\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\ni : ι\nhi_mem : i ∈ S ∪ T\n⊢ MeasurableSet (sets_s' i ∩ sets_t' i)\n[PROOFSTEP]\nrw [Finset.mem_union] at hi_mem \n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\ni : ι\nhi_mem : i ∈ S ∨ i ∈ T\n⊢ MeasurableSet (sets_s' i ∩ sets_t' i)\n[PROOFSTEP]\ncases' hi_mem with hi_mem hi_mem\n[GOAL]\ncase inl\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\ni : ι\nhi_mem : i ∈ S\n⊢ MeasurableSet (sets_s' i ∩ sets_t' i)\n[PROOFSTEP]\nrw [h_sets_t'_univ hi_mem, Set.inter_univ]\n[GOAL]\ncase inl\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\ni : ι\nhi_mem : i ∈ S\n⊢ MeasurableSet (sets_s' i)\n[PROOFSTEP]\nexact h_meas_s' i hi_mem\n[GOAL]\ncase inr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\ni : ι\nhi_mem : i ∈ T\n⊢ MeasurableSet (sets_s' i ∩ sets_t' i)\n[PROOFSTEP]\nrw [h_sets_s'_univ hi_mem, Set.univ_inter]\n[GOAL]\ncase inr\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\ni : ι\nhi_mem : i ∈ T\n⊢ MeasurableSet (sets_t' i)\n[PROOFSTEP]\nexact h_meas_t' i hi_mem\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\nh_meas_inter : ∀ (i : ι), i ∈ S ∪ T → MeasurableSet (sets_s' i ∩ sets_t' i)\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n        ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nfilter_upwards [hf_Indep S h_meas_s', hf_Indep T h_meas_t', hf_Indep (S ∪ T) h_meas_inter] with a h_indepS h_indepT\n  h_indepST\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\nh_meas_inter : ∀ (i : ι), i ∈ S ∪ T → MeasurableSet (sets_s' i ∩ sets_t' i)\na : α\nh_indepS :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) =\n    ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ)\nh_indepT :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ) =\n    ∏ i in T, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)\nh_indepST :\n  ↑↑(↑κ a)\n      (⋂ (i : ι) (_ : i ∈ S ∪ T),\n        f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)) =\n    ∏ i in S ∪ T,\n      ↑↑(↑κ a)\n        (f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ))\n⊢ ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s ∩ (fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t) =\n    ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_s) *\n      ↑↑(↑κ a) ((fun a i => f (↑i) a) ⁻¹' Set.pi Set.univ sets_t)\n[PROOFSTEP]\nrw [h_eq_inter_S, h_eq_inter_T, h_indepS, h_indepT, h_Inter_inter, h_indepST, Finset.prod_union hST]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\nh_meas_inter : ∀ (i : ι), i ∈ S ∪ T → MeasurableSet (sets_s' i ∩ sets_t' i)\na : α\nh_indepS :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) =\n    ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ)\nh_indepT :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ) =\n    ∏ i in T, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)\nh_indepST :\n  ↑↑(↑κ a)\n      (⋂ (i : ι) (_ : i ∈ S ∪ T),\n        f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)) =\n    ∏ i in S ∪ T,\n      ↑↑(↑κ a)\n        (f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ))\n⊢ (∏ x in S,\n        ↑↑(↑κ a)\n          (f x ⁻¹'\n            ((if hi : x ∈ S then sets_s { val := x, property := hi } else Set.univ) ∩\n              if hi : x ∈ T then sets_t { val := x, property := hi } else Set.univ))) *\n      ∏ x in T,\n        ↑↑(↑κ a)\n          (f x ⁻¹'\n            ((if hi : x ∈ S then sets_s { val := x, property := hi } else Set.univ) ∩\n              if hi : x ∈ T then sets_t { val := x, property := hi } else Set.univ)) =\n    (∏ i in S, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ)) *\n      ∏ i in T, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e_a\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\nh_meas_inter : ∀ (i : ι), i ∈ S ∪ T → MeasurableSet (sets_s' i ∩ sets_t' i)\na : α\nh_indepS :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) =\n    ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ)\nh_indepT :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ) =\n    ∏ i in T, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)\nh_indepST :\n  ↑↑(↑κ a)\n      (⋂ (i : ι) (_ : i ∈ S ∪ T),\n        f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)) =\n    ∏ i in S ∪ T,\n      ↑↑(↑κ a)\n        (f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ))\n⊢ ∏ x in S,\n      ↑↑(↑κ a)\n        (f x ⁻¹'\n          ((if hi : x ∈ S then sets_s { val := x, property := hi } else Set.univ) ∩\n            if hi : x ∈ T then sets_t { val := x, property := hi } else Set.univ)) =\n    ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ)\n[PROOFSTEP]\nrefine'\n  Finset.prod_congr rfl fun i hi =>\n    _\n      -- todo : show is necessary because of todo above\n[GOAL]\ncase h.e_a\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\nh_meas_inter : ∀ (i : ι), i ∈ S ∪ T → MeasurableSet (sets_s' i ∩ sets_t' i)\na : α\nh_indepS :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) =\n    ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ)\nh_indepT :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ) =\n    ∏ i in T, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)\nh_indepST :\n  ↑↑(↑κ a)\n      (⋂ (i : ι) (_ : i ∈ S ∪ T),\n        f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)) =\n    ∏ i in S ∪ T,\n      ↑↑(↑κ a)\n        (f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ))\ni : ι\nhi : i ∈ S\n⊢ ↑↑(↑κ a)\n      (f i ⁻¹'\n        ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n          if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)) =\n    ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ)\n[PROOFSTEP]\nshow κ a (f i ⁻¹' (sets_s' i ∩ sets_t' i)) = κ a (f i ⁻¹' (sets_s' i))\n[GOAL]\ncase h.e_a\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\nh_meas_inter : ∀ (i : ι), i ∈ S ∪ T → MeasurableSet (sets_s' i ∩ sets_t' i)\na : α\nh_indepS :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) =\n    ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ)\nh_indepT :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ) =\n    ∏ i in T, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)\nh_indepST :\n  ↑↑(↑κ a)\n      (⋂ (i : ι) (_ : i ∈ S ∪ T),\n        f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)) =\n    ∏ i in S ∪ T,\n      ↑↑(↑κ a)\n        (f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ))\ni : ι\nhi : i ∈ S\n⊢ ↑↑(↑κ a) (f i ⁻¹' (sets_s' i ∩ sets_t' i)) = ↑↑(↑κ a) (f i ⁻¹' sets_s' i)\n[PROOFSTEP]\nrw [h_sets_t'_univ hi, Set.inter_univ]\n[GOAL]\ncase h.e_a\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\nh_meas_inter : ∀ (i : ι), i ∈ S ∪ T → MeasurableSet (sets_s' i ∩ sets_t' i)\na : α\nh_indepS :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) =\n    ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ)\nh_indepT :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ) =\n    ∏ i in T, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)\nh_indepST :\n  ↑↑(↑κ a)\n      (⋂ (i : ι) (_ : i ∈ S ∪ T),\n        f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)) =\n    ∏ i in S ∪ T,\n      ↑↑(↑κ a)\n        (f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ))\n⊢ ∏ x in T,\n      ↑↑(↑κ a)\n        (f x ⁻¹'\n          ((if hi : x ∈ S then sets_s { val := x, property := hi } else Set.univ) ∩\n            if hi : x ∈ T then sets_t { val := x, property := hi } else Set.univ)) =\n    ∏ i in T, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)\n[PROOFSTEP]\nrefine'\n  Finset.prod_congr rfl fun i hi =>\n    _\n      -- todo : show is necessary because of todo above\n[GOAL]\ncase h.e_a\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\nh_meas_inter : ∀ (i : ι), i ∈ S ∪ T → MeasurableSet (sets_s' i ∩ sets_t' i)\na : α\nh_indepS :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) =\n    ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ)\nh_indepT :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ) =\n    ∏ i in T, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)\nh_indepST :\n  ↑↑(↑κ a)\n      (⋂ (i : ι) (_ : i ∈ S ∪ T),\n        f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)) =\n    ∏ i in S ∪ T,\n      ↑↑(↑κ a)\n        (f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ))\ni : ι\nhi : i ∈ T\n⊢ ↑↑(↑κ a)\n      (f i ⁻¹'\n        ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n          if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)) =\n    ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)\n[PROOFSTEP]\nshow κ a (f i ⁻¹' (sets_s' i ∩ sets_t' i)) = κ a (f i ⁻¹' (sets_t' i))\n[GOAL]\ncase h.e_a\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nS T : Finset ι\nhST : Disjoint S T\nhf_Indep :\n  ∀ (S : Finset ι) {sets : (i : ι) → Set (β i)},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ, ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets i) = ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' sets i)\nhf_meas : ∀ (i : ι), Measurable (f i)\nπSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπS : Set (Set Ω) := {s | ∃ t, t ∈ πSβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπS_pi : IsPiSystem πS\nhπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πS\nπTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := Set.pi Set.univ '' Set.pi Set.univ fun i => {s | MeasurableSet s}\nπT : Set (Set Ω) := {s | ∃ t, t ∈ πTβ ∧ (fun a i => f (↑i) a) ⁻¹' t = s}\nhπT_pi : IsPiSystem πT\nhπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) pi = generateFrom πT\ns : Set ((i : { x // x ∈ S }) → β ↑i)\nsets_s : (i : { x // x ∈ S }) → Set (β ↑i)\nhs2 : Set.pi Set.univ sets_s = s\nt : Set ((i : { x // x ∈ T }) → β ↑i)\nsets_t : (i : { x // x ∈ T }) → Set (β ↑i)\nht2 : Set.pi Set.univ sets_t = t\nhs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)\nht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)\nsets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ\nh_sets_s'_eq : ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s { val := i, property := hi }\nh_sets_s'_univ : ∀ {i : ι}, i ∈ T → sets_s' i = Set.univ\nsets_t' : (i : ι) → Set (β i) := fun i => if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ\nh_sets_t'_univ : ∀ {i : ι}, i ∈ S → sets_t' i = Set.univ\nh_meas_s' : ∀ (i : ι), i ∈ S → MeasurableSet (sets_s' i)\nh_meas_t' : ∀ (i : ι), i ∈ T → MeasurableSet (sets_t' i)\nh_eq_inter_S : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_s = ⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i\nh_eq_inter_T : (fun ω i => f (↑i) ω) ⁻¹' Set.pi Set.univ sets_t = ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i\nh_Inter_inter :\n  (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' sets_s' i) ∩ ⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' sets_t' i =\n    ⋂ (i : ι) (_ : i ∈ S ∪ T), f i ⁻¹' (sets_s' i ∩ sets_t' i)\nh_meas_inter : ∀ (i : ι), i ∈ S ∪ T → MeasurableSet (sets_s' i ∩ sets_t' i)\na : α\nh_indepS :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) =\n    ∏ i in S, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ)\nh_indepT :\n  ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ T), f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ) =\n    ∏ i in T, ↑↑(↑κ a) (f i ⁻¹' if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)\nh_indepST :\n  ↑↑(↑κ a)\n      (⋂ (i : ι) (_ : i ∈ S ∪ T),\n        f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ)) =\n    ∏ i in S ∪ T,\n      ↑↑(↑κ a)\n        (f i ⁻¹'\n          ((if hi : i ∈ S then sets_s { val := i, property := hi } else Set.univ) ∩\n            if hi : i ∈ T then sets_t { val := i, property := hi } else Set.univ))\ni : ι\nhi : i ∈ T\n⊢ ↑↑(↑κ a) (f i ⁻¹' (sets_s' i ∩ sets_t' i)) = ↑↑(↑κ a) (f i ⁻¹' sets_t' i)\n[PROOFSTEP]\nrw [h_sets_s'_univ hi, Set.univ_inter]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\n⊢ IndepFun (fun a => (f i a, f j a)) (f k) κ\n[PROOFSTEP]\nclassical\nhave h_right :\n  f k =\n    (fun p : ∀ j : ({ k } : Finset ι), β j => p ⟨k, Finset.mem_singleton_self k⟩) ∘ fun a (j : ({ k } : Finset ι)) =>\n      f j a :=\n  rfl\nhave h_meas_right : Measurable fun p : ∀ j : ({ k } : Finset ι), β j => p ⟨k, Finset.mem_singleton_self k⟩ :=\n  measurable_pi_apply _\nlet s : Finset ι := { i, j }\nhave h_left :\n  (fun ω => (f i ω, f j ω)) =\n    (fun p : ∀ l : s, β l =>\n        (p ⟨i, Finset.mem_insert_self i _⟩, p ⟨j, Finset.mem_insert_of_mem (Finset.mem_singleton_self _)⟩)) ∘\n      fun a (j : s) => f j a :=\n  by\n  ext1 a\n  simp only [Prod.mk.inj_iff]\n  constructor\nhave h_meas_left :\n  Measurable fun p : ∀ l : s, β l =>\n    (p ⟨i, Finset.mem_insert_self i _⟩, p ⟨j, Finset.mem_insert_of_mem (Finset.mem_singleton_self _)⟩) :=\n  Measurable.prod (measurable_pi_apply _) (measurable_pi_apply _)\nrw [h_left, h_right]\nrefine' (hf_Indep.indepFun_finset s { k } _ hf_meas).comp h_meas_left h_meas_right\nrw [Finset.disjoint_singleton_right]\nsimp only [Finset.mem_insert, Finset.mem_singleton, not_or]\nexact ⟨hik.symm, hjk.symm⟩\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\n⊢ IndepFun (fun a => (f i a, f j a)) (f k) κ\n[PROOFSTEP]\nhave h_right :\n  f k =\n    (fun p : ∀ j : ({ k } : Finset ι), β j => p ⟨k, Finset.mem_singleton_self k⟩) ∘ fun a (j : ({ k } : Finset ι)) =>\n      f j a :=\n  rfl\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nh_right : f k = (fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a\n⊢ IndepFun (fun a => (f i a, f j a)) (f k) κ\n[PROOFSTEP]\nhave h_meas_right : Measurable fun p : ∀ j : ({ k } : Finset ι), β j => p ⟨k, Finset.mem_singleton_self k⟩ :=\n  measurable_pi_apply _\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nh_right : f k = (fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := k, property := (_ : k ∈ {k}) }\n⊢ IndepFun (fun a => (f i a, f j a)) (f k) κ\n[PROOFSTEP]\nlet s : Finset ι := { i, j }\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nh_right : f k = (fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := k, property := (_ : k ∈ {k}) }\ns : Finset ι := {i, j}\n⊢ IndepFun (fun a => (f i a, f j a)) (f k) κ\n[PROOFSTEP]\nhave h_left :\n  (fun ω => (f i ω, f j ω)) =\n    (fun p : ∀ l : s, β l =>\n        (p ⟨i, Finset.mem_insert_self i _⟩, p ⟨j, Finset.mem_insert_of_mem (Finset.mem_singleton_self _)⟩)) ∘\n      fun a (j : s) => f j a :=\n  by\n  ext1 a\n  simp only [Prod.mk.inj_iff]\n  constructor\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nh_right : f k = (fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := k, property := (_ : k ∈ {k}) }\ns : Finset ι := {i, j}\n⊢ (fun ω => (f i ω, f j ω)) =\n    (fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })) ∘ fun a j =>\n      f (↑j) a\n[PROOFSTEP]\next1 a\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nh_right : f k = (fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := k, property := (_ : k ∈ {k}) }\ns : Finset ι := {i, j}\na : Ω\n⊢ (f i a, f j a) =\n    ((fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })) ∘\n        fun a j => f (↑j) a)\n      a\n[PROOFSTEP]\nsimp only [Prod.mk.inj_iff]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nh_right : f k = (fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := k, property := (_ : k ∈ {k}) }\ns : Finset ι := {i, j}\na : Ω\n⊢ (f i a, f j a) =\n    ((fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })) ∘\n        fun a j_1 => f (↑j_1) a)\n      a\n[PROOFSTEP]\nconstructor\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nh_right : f k = (fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := k, property := (_ : k ∈ {k}) }\ns : Finset ι := {i, j}\nh_left :\n  (fun ω => (f i ω, f j ω)) =\n    (fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })) ∘ fun a j =>\n      f (↑j) a\n⊢ IndepFun (fun a => (f i a, f j a)) (f k) κ\n[PROOFSTEP]\nhave h_meas_left :\n  Measurable fun p : ∀ l : s, β l =>\n    (p ⟨i, Finset.mem_insert_self i _⟩, p ⟨j, Finset.mem_insert_of_mem (Finset.mem_singleton_self _)⟩) :=\n  Measurable.prod (measurable_pi_apply _) (measurable_pi_apply _)\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nh_right : f k = (fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := k, property := (_ : k ∈ {k}) }\ns : Finset ι := {i, j}\nh_left :\n  (fun ω => (f i ω, f j ω)) =\n    (fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })) ∘ fun a j =>\n      f (↑j) a\nh_meas_left :\n  Measurable fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })\n⊢ IndepFun (fun a => (f i a, f j a)) (f k) κ\n[PROOFSTEP]\nrw [h_left, h_right]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nh_right : f k = (fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := k, property := (_ : k ∈ {k}) }\ns : Finset ι := {i, j}\nh_left :\n  (fun ω => (f i ω, f j ω)) =\n    (fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })) ∘ fun a j =>\n      f (↑j) a\nh_meas_left :\n  Measurable fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })\n⊢ IndepFun\n    ((fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })) ∘\n      fun a j => f (↑j) a)\n    ((fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a) κ\n[PROOFSTEP]\nrefine' (hf_Indep.indepFun_finset s { k } _ hf_meas).comp h_meas_left h_meas_right\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nh_right : f k = (fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := k, property := (_ : k ∈ {k}) }\ns : Finset ι := {i, j}\nh_left :\n  (fun ω => (f i ω, f j ω)) =\n    (fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })) ∘ fun a j =>\n      f (↑j) a\nh_meas_left :\n  Measurable fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })\n⊢ Disjoint s {k}\n[PROOFSTEP]\nrw [Finset.disjoint_singleton_right]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nh_right : f k = (fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := k, property := (_ : k ∈ {k}) }\ns : Finset ι := {i, j}\nh_left :\n  (fun ω => (f i ω, f j ω)) =\n    (fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })) ∘ fun a j =>\n      f (↑j) a\nh_meas_left :\n  Measurable fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })\n⊢ ¬k ∈ s\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_singleton, not_or]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝ : IsMarkovKernel κ\nι : Type u_8\nβ : ι → Type u_9\nm : (i : ι) → MeasurableSpace (β i)\nf : (i : ι) → Ω → β i\nhf_Indep : iIndepFun m f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nh_right : f k = (fun p => p { val := k, property := (_ : k ∈ {k}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := k, property := (_ : k ∈ {k}) }\ns : Finset ι := {i, j}\nh_left :\n  (fun ω => (f i ω, f j ω)) =\n    (fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })) ∘ fun a j =>\n      f (↑j) a\nh_meas_left :\n  Measurable fun p => (p { val := i, property := (_ : i ∈ {i, j}) }, p { val := j, property := (_ : j ∈ {i, j}) })\n⊢ ¬k = i ∧ ¬k = j\n[PROOFSTEP]\nexact ⟨hik.symm, hjk.symm⟩\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : Mul β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\n⊢ IndepFun (f i * f j) (f k) κ\n[PROOFSTEP]\nhave : IndepFun (fun ω => (f i ω, f j ω)) (f k) κ μ := hf_Indep.indepFun_prod hf_meas i j k hik hjk\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : Mul β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nthis : IndepFun (fun ω => (f i ω, f j ω)) (f k) κ\n⊢ IndepFun (f i * f j) (f k) κ\n[PROOFSTEP]\nchange IndepFun ((fun p : β × β => p.fst * p.snd) ∘ fun ω => (f i ω, f j ω)) (id ∘ f k) κ μ\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : Mul β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ni j k : ι\nhik : i ≠ k\nhjk : j ≠ k\nthis : IndepFun (fun ω => (f i ω, f j ω)) (f k) κ\n⊢ IndepFun ((fun p => p.fst * p.snd) ∘ fun ω => (f i ω, f j ω)) (id ∘ f k) κ\n[PROOFSTEP]\nexact IndepFun.comp this (measurable_fst.mul measurable_snd) measurable_id\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : CommMonoid β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ns : Finset ι\ni : ι\nhi : ¬i ∈ s\n⊢ IndepFun (∏ j in s, f j) (f i) κ\n[PROOFSTEP]\nclassical\nhave h_right :\n  f i =\n    (fun p : ∀ _j : ({ i } : Finset ι), β => p ⟨i, Finset.mem_singleton_self i⟩) ∘ fun a (j : ({ i } : Finset ι)) =>\n      f j a :=\n  rfl\nhave h_meas_right : Measurable fun p : ∀ _j : ({ i } : Finset ι), β => p ⟨i, Finset.mem_singleton_self i⟩ :=\n  measurable_pi_apply ⟨i, Finset.mem_singleton_self i⟩\nhave h_left : ∏ j in s, f j = (fun p : ∀ _j : s, β => ∏ j, p j) ∘ fun a (j : s) => f j a :=\n  by\n  ext1 a\n  simp only [Function.comp_apply]\n  have : (∏ j : ↥s, f (↑j) a) = (∏ j : ↥s, f ↑j) a := by rw [Finset.prod_apply]\n  rw [this, Finset.prod_coe_sort]\nhave h_meas_left : Measurable fun p : ∀ _j : s, β => ∏ j, p j :=\n  Finset.univ.measurable_prod fun (j : ↥s) (_H : j ∈ Finset.univ) => measurable_pi_apply j\nrw [h_left, h_right]\nexact\n  (hf_Indep.indepFun_finset s { i } (Finset.disjoint_singleton_left.mpr hi).symm hf_meas).comp h_meas_left h_meas_right\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : CommMonoid β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ns : Finset ι\ni : ι\nhi : ¬i ∈ s\n⊢ IndepFun (∏ j in s, f j) (f i) κ\n[PROOFSTEP]\nhave h_right :\n  f i =\n    (fun p : ∀ _j : ({ i } : Finset ι), β => p ⟨i, Finset.mem_singleton_self i⟩) ∘ fun a (j : ({ i } : Finset ι)) =>\n      f j a :=\n  rfl\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : CommMonoid β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ns : Finset ι\ni : ι\nhi : ¬i ∈ s\nh_right : f i = (fun p => p { val := i, property := (_ : i ∈ {i}) }) ∘ fun a j => f (↑j) a\n⊢ IndepFun (∏ j in s, f j) (f i) κ\n[PROOFSTEP]\nhave h_meas_right : Measurable fun p : ∀ _j : ({ i } : Finset ι), β => p ⟨i, Finset.mem_singleton_self i⟩ :=\n  measurable_pi_apply ⟨i, Finset.mem_singleton_self i⟩\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : CommMonoid β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ns : Finset ι\ni : ι\nhi : ¬i ∈ s\nh_right : f i = (fun p => p { val := i, property := (_ : i ∈ {i}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := i, property := (_ : i ∈ {i}) }\n⊢ IndepFun (∏ j in s, f j) (f i) κ\n[PROOFSTEP]\nhave h_left : ∏ j in s, f j = (fun p : ∀ _j : s, β => ∏ j, p j) ∘ fun a (j : s) => f j a :=\n  by\n  ext1 a\n  simp only [Function.comp_apply]\n  have : (∏ j : ↥s, f (↑j) a) = (∏ j : ↥s, f ↑j) a := by rw [Finset.prod_apply]\n  rw [this, Finset.prod_coe_sort]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : CommMonoid β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ns : Finset ι\ni : ι\nhi : ¬i ∈ s\nh_right : f i = (fun p => p { val := i, property := (_ : i ∈ {i}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := i, property := (_ : i ∈ {i}) }\n⊢ ∏ j in s, f j = (fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a\n[PROOFSTEP]\next1 a\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : CommMonoid β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ns : Finset ι\ni : ι\nhi : ¬i ∈ s\nh_right : f i = (fun p => p { val := i, property := (_ : i ∈ {i}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := i, property := (_ : i ∈ {i}) }\na : Ω\n⊢ Finset.prod s (fun j => f j) a = ((fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a) a\n[PROOFSTEP]\nsimp only [Function.comp_apply]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : CommMonoid β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ns : Finset ι\ni : ι\nhi : ¬i ∈ s\nh_right : f i = (fun p => p { val := i, property := (_ : i ∈ {i}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := i, property := (_ : i ∈ {i}) }\na : Ω\n⊢ Finset.prod s (fun j => f j) a = ∏ j : { x // x ∈ s }, f (↑j) a\n[PROOFSTEP]\nhave : (∏ j : ↥s, f (↑j) a) = (∏ j : ↥s, f ↑j) a := by rw [Finset.prod_apply]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : CommMonoid β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ns : Finset ι\ni : ι\nhi : ¬i ∈ s\nh_right : f i = (fun p => p { val := i, property := (_ : i ∈ {i}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := i, property := (_ : i ∈ {i}) }\na : Ω\n⊢ ∏ j : { x // x ∈ s }, f (↑j) a = Finset.prod Finset.univ (fun j => f ↑j) a\n[PROOFSTEP]\nrw [Finset.prod_apply]\n[GOAL]\ncase h\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : CommMonoid β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ns : Finset ι\ni : ι\nhi : ¬i ∈ s\nh_right : f i = (fun p => p { val := i, property := (_ : i ∈ {i}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := i, property := (_ : i ∈ {i}) }\na : Ω\nthis : ∏ j : { x // x ∈ s }, f (↑j) a = Finset.prod Finset.univ (fun j => f ↑j) a\n⊢ Finset.prod s (fun j => f j) a = ∏ j : { x // x ∈ s }, f (↑j) a\n[PROOFSTEP]\nrw [this, Finset.prod_coe_sort]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : CommMonoid β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ns : Finset ι\ni : ι\nhi : ¬i ∈ s\nh_right : f i = (fun p => p { val := i, property := (_ : i ∈ {i}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := i, property := (_ : i ∈ {i}) }\nh_left : ∏ j in s, f j = (fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a\n⊢ IndepFun (∏ j in s, f j) (f i) κ\n[PROOFSTEP]\nhave h_meas_left : Measurable fun p : ∀ _j : s, β => ∏ j, p j :=\n  Finset.univ.measurable_prod fun (j : ↥s) (_H : j ∈ Finset.univ) => measurable_pi_apply j\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : CommMonoid β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ns : Finset ι\ni : ι\nhi : ¬i ∈ s\nh_right : f i = (fun p => p { val := i, property := (_ : i ∈ {i}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := i, property := (_ : i ∈ {i}) }\nh_left : ∏ j in s, f j = (fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a\nh_meas_left : Measurable fun p => ∏ j : { x // x ∈ s }, p j\n⊢ IndepFun (∏ j in s, f j) (f i) κ\n[PROOFSTEP]\nrw [h_left, h_right]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι✝ : Type u_3\nβ✝ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf✝ : Ω → β✝\ng : Ω → β'\ninst✝² : IsMarkovKernel κ\nι : Type u_8\nβ : Type u_9\nm : MeasurableSpace β\ninst✝¹ : CommMonoid β\ninst✝ : MeasurableMul₂ β\nf : ι → Ω → β\nhf_Indep : iIndepFun (fun x => m) f κ\nhf_meas : ∀ (i : ι), Measurable (f i)\ns : Finset ι\ni : ι\nhi : ¬i ∈ s\nh_right : f i = (fun p => p { val := i, property := (_ : i ∈ {i}) }) ∘ fun a j => f (↑j) a\nh_meas_right : Measurable fun p => p { val := i, property := (_ : i ∈ {i}) }\nh_left : ∏ j in s, f j = (fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a\nh_meas_left : Measurable fun p => ∏ j : { x // x ∈ s }, p j\n⊢ IndepFun ((fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a)\n    ((fun p => p { val := i, property := (_ : i ∈ {i}) }) ∘ fun a j => f (↑j) a) κ\n[PROOFSTEP]\nexact\n  (hf_Indep.indepFun_finset s { i } (Finset.disjoint_singleton_left.mpr hi).symm hf_meas).comp h_meas_left h_meas_right\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\ninst✝¹ : Zero β\ninst✝ : One β\nm : MeasurableSpace β\ns : ι → Set Ω\nhs : iIndepSet s κ\n⊢ iIndepFun (fun _n => m) (fun n => Set.indicator (s n) fun _ω => 1) κ\n[PROOFSTEP]\nclassical\nrw [iIndepFun_iff_measure_inter_preimage_eq_mul]\nrintro S π _hπ\nsimp_rw [Set.indicator_const_preimage_eq_union]\nrefine' @hs S (fun i => ite (1 ∈ π i) (s i) ∅ ∪ ite ((0 : β) ∈ π i) (s i)ᶜ ∅) fun i _hi => _\nhave hsi : MeasurableSet[generateFrom {s i}] (s i) := measurableSet_generateFrom (Set.mem_singleton _)\nrefine'\n  MeasurableSet.union (MeasurableSet.ite' (fun _ => hsi) fun _ => _)\n    (MeasurableSet.ite' (fun _ => hsi.compl) fun _ => _)\n· exact @MeasurableSet.empty _ (generateFrom {s i})\n· exact @MeasurableSet.empty _ (generateFrom {s i})\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\ninst✝¹ : Zero β\ninst✝ : One β\nm : MeasurableSpace β\ns : ι → Set Ω\nhs : iIndepSet s κ\n⊢ iIndepFun (fun _n => m) (fun n => Set.indicator (s n) fun _ω => 1) κ\n[PROOFSTEP]\nrw [iIndepFun_iff_measure_inter_preimage_eq_mul]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\ninst✝¹ : Zero β\ninst✝ : One β\nm : MeasurableSpace β\ns : ι → Set Ω\nhs : iIndepSet s κ\n⊢ ∀ (S : Finset ι) {sets : ι → Set β},\n    (∀ (i : ι), i ∈ S → MeasurableSet (sets i)) →\n      ∀ᵐ (a : α) ∂μ,\n        ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), (Set.indicator (s i) fun _ω => 1) ⁻¹' sets i) =\n          ∏ i in S, ↑↑(↑κ a) ((Set.indicator (s i) fun _ω => 1) ⁻¹' sets i)\n[PROOFSTEP]\nrintro S π _hπ\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\ninst✝¹ : Zero β\ninst✝ : One β\nm : MeasurableSpace β\ns : ι → Set Ω\nhs : iIndepSet s κ\nS : Finset ι\nπ : ι → Set β\n_hπ : ∀ (i : ι), i ∈ S → MeasurableSet (π i)\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), (Set.indicator (s i) fun _ω => 1) ⁻¹' π i) =\n      ∏ i in S, ↑↑(↑κ a) ((Set.indicator (s i) fun _ω => 1) ⁻¹' π i)\n[PROOFSTEP]\nsimp_rw [Set.indicator_const_preimage_eq_union]\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\ninst✝¹ : Zero β\ninst✝ : One β\nm : MeasurableSpace β\ns : ι → Set Ω\nhs : iIndepSet s κ\nS : Finset ι\nπ : ι → Set β\n_hπ : ∀ (i : ι), i ∈ S → MeasurableSet (π i)\n⊢ ∀ᵐ (a : α) ∂μ,\n    ↑↑(↑κ a) (⋂ (i : ι) (_ : i ∈ S), (if 1 ∈ π i then s i else ∅) ∪ if 0 ∈ π i then (s i)ᶜ else ∅) =\n      ∏ x in S, ↑↑(↑κ a) ((if 1 ∈ π x then s x else ∅) ∪ if 0 ∈ π x then (s x)ᶜ else ∅)\n[PROOFSTEP]\nrefine' @hs S (fun i => ite (1 ∈ π i) (s i) ∅ ∪ ite ((0 : β) ∈ π i) (s i)ᶜ ∅) fun i _hi => _\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\ninst✝¹ : Zero β\ninst✝ : One β\nm : MeasurableSpace β\ns : ι → Set Ω\nhs : iIndepSet s κ\nS : Finset ι\nπ : ι → Set β\n_hπ : ∀ (i : ι), i ∈ S → MeasurableSet (π i)\ni : ι\n_hi : i ∈ S\n⊢ (fun i => (if 1 ∈ π i then s i else ∅) ∪ if 0 ∈ π i then (s i)ᶜ else ∅) i ∈ (fun x => {s_1 | MeasurableSet s_1}) i\n[PROOFSTEP]\nhave hsi : MeasurableSet[generateFrom {s i}] (s i) := measurableSet_generateFrom (Set.mem_singleton _)\n[GOAL]\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\ninst✝¹ : Zero β\ninst✝ : One β\nm : MeasurableSpace β\ns : ι → Set Ω\nhs : iIndepSet s κ\nS : Finset ι\nπ : ι → Set β\n_hπ : ∀ (i : ι), i ∈ S → MeasurableSet (π i)\ni : ι\n_hi : i ∈ S\nhsi : MeasurableSet (s i)\n⊢ (fun i => (if 1 ∈ π i then s i else ∅) ∪ if 0 ∈ π i then (s i)ᶜ else ∅) i ∈ (fun x => {s_1 | MeasurableSet s_1}) i\n[PROOFSTEP]\nrefine'\n  MeasurableSet.union (MeasurableSet.ite' (fun _ => hsi) fun _ => _)\n    (MeasurableSet.ite' (fun _ => hsi.compl) fun _ => _)\n[GOAL]\ncase refine'_1\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\ninst✝¹ : Zero β\ninst✝ : One β\nm : MeasurableSpace β\ns : ι → Set Ω\nhs : iIndepSet s κ\nS : Finset ι\nπ : ι → Set β\n_hπ : ∀ (i : ι), i ∈ S → MeasurableSet (π i)\ni : ι\n_hi : i ∈ S\nhsi : MeasurableSet (s i)\nx✝ : ¬1 ∈ π i\n⊢ MeasurableSet ∅\n[PROOFSTEP]\nexact @MeasurableSet.empty _ (generateFrom {s i})\n[GOAL]\ncase refine'_2\nα : Type u_1\nΩ : Type u_2\nι : Type u_3\nβ : Type u_4\nβ' : Type u_5\nγ : Type u_6\nγ' : Type u_7\n_mα : MeasurableSpace α\n_mΩ : MeasurableSpace Ω\nκ : { x // x ∈ kernel α Ω }\nμ : Measure α\nf : Ω → β\ng : Ω → β'\ninst✝¹ : Zero β\ninst✝ : One β\nm : MeasurableSpace β\ns : ι → Set Ω\nhs : iIndepSet s κ\nS : Finset ι\nπ : ι → Set β\n_hπ : ∀ (i : ι), i ∈ S → MeasurableSet (π i)\ni : ι\n_hi : i ∈ S\nhsi : MeasurableSet (s i)\nx✝ : ¬0 ∈ π i\n⊢ MeasurableSet ∅\n[PROOFSTEP]\nexact @MeasurableSet.empty _ (generateFrom {s i})\n", "meta": {"mathlib_filename": "Mathlib.Probability.Independence.Kernel", "llama_tokens": 250973, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191337850932, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.36004832813703486}}
{"text": "[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\nf : α →₀ M\ns : Finset α\nhs : f.support ⊆ s\ng : α → M → N\nh : ∀ (i : α), i ∈ s → g i 0 = 1\n⊢ prod f g = ∏ x in s, g x (↑f x)\n[PROOFSTEP]\nrefine Finset.prod_subset hs fun x hxs hx => h x hxs ▸ (congr_arg (g x) ?_)\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx✝ : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\nf : α →₀ M\ns : Finset α\nhs : f.support ⊆ s\ng : α → M → N\nh : ∀ (i : α), i ∈ s → g i 0 = 1\nx : α\nhxs : x ∈ s\nhx : ¬x ∈ f.support\n⊢ ↑f x = 0\n[PROOFSTEP]\nexact not_mem_support_iff.1 hx\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\na : α\nb : M\nh : α → M → N\nh_zero : h a 0 = 1\n⊢ ∏ x in {a}, h x (↑(single a b) x) = h a b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0✝ : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH✝ : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\nf : M → M'\nhf : f 0 = 0\ng : α →₀ M\nh : α → M' → N\nh0 : ∀ (a : α), h a 0 = 1\nx✝¹ : α\nx✝ : x✝¹ ∈ g.support\nH : ¬x✝¹ ∈ (mapRange f hf g).support\n⊢ h x✝¹ (↑(mapRange f hf g) x✝¹) = 1\n[PROOFSTEP]\nrw [not_mem_support_iff.1 H, h0]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁶ : AddCommMonoid A\ninst✝⁵ : AddCommMonoid B\ninst✝⁴ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝³ : Zero M\ninst✝² : Zero M'\ninst✝¹ : CommMonoid N\ninst✝ : DecidableEq α\nf : α →₀ M\na : α\nb : α → M → N\n⊢ (prod f fun x v => if a = x then b x v else 1) = if a ∈ f.support then b a (↑f a) else 1\n[PROOFSTEP]\ndsimp [Finsupp.prod]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁶ : AddCommMonoid A\ninst✝⁵ : AddCommMonoid B\ninst✝⁴ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝³ : Zero M\ninst✝² : Zero M'\ninst✝¹ : CommMonoid N\ninst✝ : DecidableEq α\nf : α →₀ M\na : α\nb : α → M → N\n⊢ (∏ a_1 in f.support, if a = a_1 then b a_1 (↑f a_1) else 1) = if a ∈ f.support then b a (↑f a) else 1\n[PROOFSTEP]\nrw [f.support.prod_ite_eq]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁷ : AddCommMonoid A\ninst✝⁶ : AddCommMonoid B\ninst✝⁵ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN✝ : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝⁴ : Zero M\ninst✝³ : Zero M'\ninst✝² : CommMonoid N✝\ninst✝¹ : DecidableEq α\nN : Type u_16\ninst✝ : AddCommMonoid N\nf : α →₀ N\na : α\n⊢ (sum f fun x v => if a = x then v else 0) = ↑f a\n[PROOFSTEP]\nclassical\nconvert f.sum_ite_eq a fun _ => id\nsimp [ite_eq_right_iff.2 Eq.symm]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁷ : AddCommMonoid A\ninst✝⁶ : AddCommMonoid B\ninst✝⁵ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN✝ : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝⁴ : Zero M\ninst✝³ : Zero M'\ninst✝² : CommMonoid N✝\ninst✝¹ : DecidableEq α\nN : Type u_16\ninst✝ : AddCommMonoid N\nf : α →₀ N\na : α\n⊢ (sum f fun x v => if a = x then v else 0) = ↑f a\n[PROOFSTEP]\nconvert f.sum_ite_eq a fun _ => id\n[GOAL]\ncase h.e'_3\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁷ : AddCommMonoid A\ninst✝⁶ : AddCommMonoid B\ninst✝⁵ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN✝ : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝⁴ : Zero M\ninst✝³ : Zero M'\ninst✝² : CommMonoid N✝\ninst✝¹ : DecidableEq α\nN : Type u_16\ninst✝ : AddCommMonoid N\nf : α →₀ N\na : α\n⊢ ↑f a = if a ∈ f.support then id (↑f a) else 0\n[PROOFSTEP]\nsimp [ite_eq_right_iff.2 Eq.symm]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁷ : AddCommMonoid A\ninst✝⁶ : AddCommMonoid B\ninst✝⁵ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN✝ : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝⁴ : Zero M\ninst✝³ : Zero M'\ninst✝² : CommMonoid N✝\ninst✝¹ : DecidableEq α\nN : Type u_16\ninst✝ : AddCommMonoid N\nf : α →₀ N\na : α\n⊢ (if a ∈ f.support then ↑f a else 0) = ↑f a\n[PROOFSTEP]\nsimp only [mem_support_iff, ne_eq, ite_eq_left_iff, not_not]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁷ : AddCommMonoid A\ninst✝⁶ : AddCommMonoid B\ninst✝⁵ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN✝ : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝⁴ : Zero M\ninst✝³ : Zero M'\ninst✝² : CommMonoid N✝\ninst✝¹ : DecidableEq α\nN : Type u_16\ninst✝ : AddCommMonoid N\nf : α →₀ N\na : α\n⊢ ↑f a = 0 → 0 = ↑f a\n[PROOFSTEP]\nexact fun h ↦ h.symm\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁶ : AddCommMonoid A\ninst✝⁵ : AddCommMonoid B\ninst✝⁴ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝³ : Zero M\ninst✝² : Zero M'\ninst✝¹ : CommMonoid N\ninst✝ : DecidableEq α\nf : α →₀ M\na : α\nb : α → M → N\n⊢ (prod f fun x v => if x = a then b x v else 1) = if a ∈ f.support then b a (↑f a) else 1\n[PROOFSTEP]\ndsimp [Finsupp.prod]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁶ : AddCommMonoid A\ninst✝⁵ : AddCommMonoid B\ninst✝⁴ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝³ : Zero M\ninst✝² : Zero M'\ninst✝¹ : CommMonoid N\ninst✝ : DecidableEq α\nf : α →₀ M\na : α\nb : α → M → N\n⊢ (∏ a_1 in f.support, if a_1 = a then b a_1 (↑f a_1) else 1) = if a ∈ f.support then b a (↑f a) else 1\n[PROOFSTEP]\nrw [f.support.prod_ite_eq']\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁷ : AddCommMonoid A\ninst✝⁶ : AddCommMonoid B\ninst✝⁵ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN✝ : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝⁴ : Zero M\ninst✝³ : Zero M'\ninst✝² : CommMonoid N✝\ninst✝¹ : DecidableEq α\nN : Type u_16\ninst✝ : AddCommMonoid N\nf : α →₀ N\na : α\n⊢ (sum f fun x v => if x = a then v else 0) = ↑f a\n[PROOFSTEP]\nclassical\nconvert f.sum_ite_eq' a fun _ => id\nsimp [ite_eq_right_iff.2 Eq.symm]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁷ : AddCommMonoid A\ninst✝⁶ : AddCommMonoid B\ninst✝⁵ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN✝ : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝⁴ : Zero M\ninst✝³ : Zero M'\ninst✝² : CommMonoid N✝\ninst✝¹ : DecidableEq α\nN : Type u_16\ninst✝ : AddCommMonoid N\nf : α →₀ N\na : α\n⊢ (sum f fun x v => if x = a then v else 0) = ↑f a\n[PROOFSTEP]\nconvert f.sum_ite_eq' a fun _ => id\n[GOAL]\ncase h.e'_3\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁷ : AddCommMonoid A\ninst✝⁶ : AddCommMonoid B\ninst✝⁵ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN✝ : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝⁴ : Zero M\ninst✝³ : Zero M'\ninst✝² : CommMonoid N✝\ninst✝¹ : DecidableEq α\nN : Type u_16\ninst✝ : AddCommMonoid N\nf : α →₀ N\na : α\n⊢ ↑f a = if a ∈ f.support then id (↑f a) else 0\n[PROOFSTEP]\nsimp [ite_eq_right_iff.2 Eq.symm]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\ns : Finset α\nf : α → M\ng : α → M → N\nhf : ∀ (a : α), f a ≠ 0 → a ∈ s\nhg : ∀ (a : α), g a 0 = 1\n⊢ ∀ (x : α), x ∈ s → ¬x ∈ (onFinset s f hf).support → g x (↑(onFinset s f hf) x) = 1\n[PROOFSTEP]\nsimp (config := { contextual := true }) [*]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\nf : α →₀ M\ny : α\ng : α → M → N\nhyf : y ∈ f.support\n⊢ g y (↑f y) * prod (erase y f) g = prod f g\n[PROOFSTEP]\nclassical\nrw [Finsupp.prod, Finsupp.prod, ← Finset.mul_prod_erase _ _ hyf, Finsupp.support_erase, Finset.prod_congr rfl]\nintro h hx\nrw [Finsupp.erase_ne (ne_of_mem_erase hx)]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\nf : α →₀ M\ny : α\ng : α → M → N\nhyf : y ∈ f.support\n⊢ g y (↑f y) * prod (erase y f) g = prod f g\n[PROOFSTEP]\nrw [Finsupp.prod, Finsupp.prod, ← Finset.mul_prod_erase _ _ hyf, Finsupp.support_erase, Finset.prod_congr rfl]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\nf : α →₀ M\ny : α\ng : α → M → N\nhyf : y ∈ f.support\n⊢ ∀ (x : α), x ∈ Finset.erase f.support y → g x (↑(erase y f) x) = g x (↑f x)\n[PROOFSTEP]\nintro h hx\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\nf : α →₀ M\ny : α\ng : α → M → N\nhyf : y ∈ f.support\nh : α\nhx : h ∈ Finset.erase f.support y\n⊢ g h (↑(erase y f) h) = g h (↑f h)\n[PROOFSTEP]\nrw [Finsupp.erase_ne (ne_of_mem_erase hx)]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\nf : α →₀ M\ny : α\ng : α → M → N\nhg : ∀ (i : α), g i 0 = 1\n⊢ g y (↑f y) * prod (erase y f) g = prod f g\n[PROOFSTEP]\nclassical\nby_cases hyf : y ∈ f.support\n· exact Finsupp.mul_prod_erase f y g hyf\n· rw [not_mem_support_iff.mp hyf, hg y, erase_of_not_mem_support hyf, one_mul]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\nf : α →₀ M\ny : α\ng : α → M → N\nhg : ∀ (i : α), g i 0 = 1\n⊢ g y (↑f y) * prod (erase y f) g = prod f g\n[PROOFSTEP]\nby_cases hyf : y ∈ f.support\n[GOAL]\ncase pos\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\nf : α →₀ M\ny : α\ng : α → M → N\nhg : ∀ (i : α), g i 0 = 1\nhyf : y ∈ f.support\n⊢ g y (↑f y) * prod (erase y f) g = prod f g\n[PROOFSTEP]\nexact Finsupp.mul_prod_erase f y g hyf\n[GOAL]\ncase neg\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : Zero M\ninst✝¹ : Zero M'\ninst✝ : CommMonoid N\nf : α →₀ M\ny : α\ng : α → M → N\nhg : ∀ (i : α), g i 0 = 1\nhyf : ¬y ∈ f.support\n⊢ g y (↑f y) * prod (erase y f) g = prod f g\n[PROOFSTEP]\nrw [not_mem_support_iff.mp hyf, hg y, erase_of_not_mem_support hyf, one_mul]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝³ : AddCommMonoid A\ninst✝² : AddCommMonoid B\ninst✝¹ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝¹ : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝ : AddCommMonoid M\ns✝ : Multiset M\na✝ : α\na : M\ns : Multiset M\nih : single a✝ (Multiset.sum s) = Multiset.sum (Multiset.map (single a✝) s)\n⊢ single a✝ (Multiset.sum (a ::ₘ s)) = Multiset.sum (Multiset.map (single a✝) (a ::ₘ s))\n[PROOFSTEP]\nrw [Multiset.sum_cons, single_add, ih, Multiset.map_cons, Multiset.sum_cons]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝³ : AddCommMonoid A\ninst✝² : AddCommMonoid B\ninst✝¹ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝ : AddCommMonoid M\ns : Finset ι\nf : ι → M\na : α\n⊢ single a (∑ b in s, f b) = ∑ b in s, single a (f b)\n[PROOFSTEP]\ntrans\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝³ : AddCommMonoid A\ninst✝² : AddCommMonoid B\ninst✝¹ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝ : AddCommMonoid M\ns : Finset ι\nf : ι → M\na : α\n⊢ single a (∑ b in s, f b) = ?m.275536\n[PROOFSTEP]\napply single_multiset_sum\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝³ : AddCommMonoid A\ninst✝² : AddCommMonoid B\ninst✝¹ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝ : AddCommMonoid M\ns : Finset ι\nf : ι → M\na : α\n⊢ Multiset.sum (Multiset.map (single a) (Multiset.map (fun b => f b) s.val)) = ∑ b in s, single a (f b)\n[PROOFSTEP]\nrw [Multiset.map_map]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝³ : AddCommMonoid A\ninst✝² : AddCommMonoid B\ninst✝¹ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝ : AddCommMonoid M\ns : Finset ι\nf : ι → M\na : α\n⊢ Multiset.sum (Multiset.map (single a ∘ fun b => f b) s.val) = ∑ b in s, single a (f b)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : DecidableEq β\ninst✝¹ : Zero M\ninst✝ : AddCommMonoid N\nf : α →₀ M\ng : α → M → β →₀ N\n⊢ (sum f g).support ⊆ Finset.biUnion f.support fun a => (g a (↑f a)).support\n[PROOFSTEP]\nhave : ∀ c, (f.sum fun a b => g a b c) ≠ 0 → ∃ a, f a ≠ 0 ∧ ¬(g a (f a)) c = 0 := fun a₁ h =>\n  let ⟨a, ha, ne⟩ := Finset.exists_ne_zero_of_sum_ne_zero h\n  ⟨a, mem_support_iff.mp ha, ne⟩\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : DecidableEq β\ninst✝¹ : Zero M\ninst✝ : AddCommMonoid N\nf : α →₀ M\ng : α → M → β →₀ N\nthis : ∀ (c : β), (sum f fun a b => ↑(g a b) c) ≠ 0 → ∃ a, ↑f a ≠ 0 ∧ ¬↑(g a (↑f a)) c = 0\n⊢ (sum f g).support ⊆ Finset.biUnion f.support fun a => (g a (↑f a)).support\n[PROOFSTEP]\nsimpa only [Finset.subset_iff, mem_support_iff, Finset.mem_biUnion, sum_apply, exists_prop]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : DecidableEq β\ninst✝ : AddCommMonoid M\ns : Finset α\nf : α → β →₀ M\n⊢ (Finset.sum s f).support ⊆ Finset.biUnion s fun x => (f x).support\n[PROOFSTEP]\nrw [← Finset.sup_eq_biUnion]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : DecidableEq β\ninst✝ : AddCommMonoid M\ns : Finset α\nf : α → β →₀ M\n⊢ (Finset.sum s f).support ⊆ sup s fun x => (f x).support\n[PROOFSTEP]\ninduction' s using Finset.cons_induction_on with a s ha ih\n[GOAL]\ncase h₁\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : DecidableEq β\ninst✝ : AddCommMonoid M\nf : α → β →₀ M\n⊢ (Finset.sum ∅ f).support ⊆ sup ∅ fun x => (f x).support\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : DecidableEq β\ninst✝ : AddCommMonoid M\nf : α → β →₀ M\na : α\ns : Finset α\nha : ¬a ∈ s\nih : (Finset.sum s f).support ⊆ sup s fun x => (f x).support\n⊢ (Finset.sum (cons a s ha) f).support ⊆ sup (cons a s ha) fun x => (f x).support\n[PROOFSTEP]\nrw [Finset.sum_cons, Finset.sup_cons]\n[GOAL]\ncase h₂\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : DecidableEq β\ninst✝ : AddCommMonoid M\nf : α → β →₀ M\na : α\ns : Finset α\nha : ¬a ∈ s\nih : (Finset.sum s f).support ⊆ sup s fun x => (f x).support\n⊢ (f a + ∑ x in s, f x).support ⊆ (f a).support ⊔ sup s fun x => (f x).support\n[PROOFSTEP]\nexact support_add.trans (Finset.union_subset_union (Finset.Subset.refl _) ih)\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : DecidableEq α\ninst✝¹ : AddZeroClass M\ninst✝ : CommMonoid N\nf g : α →₀ M\nh : α → M → N\nh_zero : ∀ (a : α), a ∈ f.support ∪ g.support → h a 0 = 1\nh_add : ∀ (a : α), a ∈ f.support ∪ g.support → ∀ (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ * h a b₂\n⊢ prod (f + g) h = prod f h * prod g h\n[PROOFSTEP]\nrw [Finsupp.prod_of_support_subset f (subset_union_left _ g.support) h h_zero,\n  Finsupp.prod_of_support_subset g (subset_union_right f.support _) h h_zero, ← Finset.prod_mul_distrib,\n  Finsupp.prod_of_support_subset (f + g) Finsupp.support_add h h_zero]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : DecidableEq α\ninst✝¹ : AddZeroClass M\ninst✝ : CommMonoid N\nf g : α →₀ M\nh : α → M → N\nh_zero : ∀ (a : α), a ∈ f.support ∪ g.support → h a 0 = 1\nh_add : ∀ (a : α), a ∈ f.support ∪ g.support → ∀ (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ * h a b₂\n⊢ ∏ x in f.support ∪ g.support, h x (↑(f + g) x) = ∏ x in f.support ∪ g.support, h x (↑f x) * h x (↑g x)\n[PROOFSTEP]\nexact Finset.prod_congr rfl fun x hx => by apply h_add x hx\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx✝ : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : DecidableEq α\ninst✝¹ : AddZeroClass M\ninst✝ : CommMonoid N\nf g : α →₀ M\nh : α → M → N\nh_zero : ∀ (a : α), a ∈ f.support ∪ g.support → h a 0 = 1\nh_add : ∀ (a : α), a ∈ f.support ∪ g.support → ∀ (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ * h a b₂\nx : α\nhx : x ∈ f.support ∪ g.support\n⊢ h x (↑(f + g) x) = h x (↑f x) * h x (↑g x)\n[PROOFSTEP]\napply h_add x hx\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddZeroClass M\ninst✝ : CommMonoid N\nf g : α →₀ M\nh : α → M → N\nh_zero : ∀ (a : α), h a 0 = 1\nh_add : ∀ (a : α) (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ * h a b₂\n⊢ prod (f + g) h = prod f h * prod g h\n[PROOFSTEP]\nclassical exact prod_add_index (fun a _ => h_zero a) fun a _ => h_add a\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddZeroClass M\ninst✝ : CommMonoid N\nf g : α →₀ M\nh : α → M → N\nh_zero : ∀ (a : α), h a 0 = 1\nh_add : ∀ (a : α) (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ * h a b₂\n⊢ prod (f + g) h = prod f h * prod g h\n[PROOFSTEP]\nexact prod_add_index (fun a _ => h_zero a) fun a _ => h_add a\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddZeroClass M\ninst✝ : AddCommMonoid N\nF : α → M →+ N\n⊢ (fun F x => AddMonoidHom.comp F (singleAddHom x))\n      ((fun F =>\n          {\n            toZeroHom :=\n              { toFun := fun f => sum f fun x => ↑(F x), map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n            map_add' :=\n              (_ :\n                ∀ (x x_1 : α →₀ M),\n                  (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n        F) =\n    F\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddZeroClass M\ninst✝ : AddCommMonoid N\nF : α → M →+ N\nx✝¹ : α\nx✝ : M\n⊢ ↑((fun F x => AddMonoidHom.comp F (singleAddHom x))\n          ((fun F =>\n              {\n                toZeroHom :=\n                  { toFun := fun f => sum f fun x => ↑(F x),\n                    map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                map_add' :=\n                  (_ :\n                    ∀ (x x_1 : α →₀ M),\n                      (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n            F)\n          x✝¹)\n      x✝ =\n    ↑(F x✝¹) x✝\n[PROOFSTEP]\nsimp [singleAddHom]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddZeroClass M\ninst✝ : AddCommMonoid N\nF : (α →₀ M) →+ N\n⊢ (fun F =>\n        {\n          toZeroHom :=\n            { toFun := fun f => sum f fun x => ↑(F x), map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n          map_add' :=\n            (_ :\n              ∀ (x x_1 : α →₀ M),\n                (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n      ((fun F x => AddMonoidHom.comp F (singleAddHom x)) F) =\n    F\n[PROOFSTEP]\napply Finsupp.addHom_ext'\n[GOAL]\ncase H\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddZeroClass M\ninst✝ : AddCommMonoid N\nF : (α →₀ M) →+ N\n⊢ ∀ (x : α),\n    AddMonoidHom.comp\n        ((fun F =>\n            {\n              toZeroHom :=\n                { toFun := fun f => sum f fun x => ↑(F x),\n                  map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n              map_add' :=\n                (_ :\n                  ∀ (x x_1 : α →₀ M),\n                    (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n          ((fun F x => AddMonoidHom.comp F (singleAddHom x)) F))\n        (singleAddHom x) =\n      AddMonoidHom.comp F (singleAddHom x)\n[PROOFSTEP]\nsimp [singleAddHom, AddMonoidHom.comp, Function.comp]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG✝ : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddZeroClass M\ninst✝ : AddCommMonoid N\nF G : α → M →+ N\n⊢ Equiv.toFun\n      {\n        toFun := fun F =>\n          {\n            toZeroHom :=\n              { toFun := fun f => sum f fun x => ↑(F x), map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n            map_add' :=\n              (_ :\n                ∀ (x x_1 : α →₀ M),\n                  (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) },\n        invFun := fun F x => AddMonoidHom.comp F (singleAddHom x),\n        left_inv :=\n          (_ :\n            ∀ (F : α → M →+ N),\n              (fun F x => AddMonoidHom.comp F (singleAddHom x))\n                  ((fun F =>\n                      {\n                        toZeroHom :=\n                          { toFun := fun f => sum f fun x => ↑(F x),\n                            map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                        map_add' :=\n                          (_ :\n                            ∀ (x x_1 : α →₀ M),\n                              (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n                    F) =\n                F),\n        right_inv :=\n          (_ :\n            ∀ (F : (α →₀ M) →+ N),\n              (fun F =>\n                    {\n                      toZeroHom :=\n                        { toFun := fun f => sum f fun x => ↑(F x),\n                          map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                      map_add' :=\n                        (_ :\n                          ∀ (x x_1 : α →₀ M),\n                            (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n                  ((fun F x => AddMonoidHom.comp F (singleAddHom x)) F) =\n                F) }\n      (F + G) =\n    Equiv.toFun\n        {\n          toFun := fun F =>\n            {\n              toZeroHom :=\n                { toFun := fun f => sum f fun x => ↑(F x),\n                  map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n              map_add' :=\n                (_ :\n                  ∀ (x x_1 : α →₀ M),\n                    (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) },\n          invFun := fun F x => AddMonoidHom.comp F (singleAddHom x),\n          left_inv :=\n            (_ :\n              ∀ (F : α → M →+ N),\n                (fun F x => AddMonoidHom.comp F (singleAddHom x))\n                    ((fun F =>\n                        {\n                          toZeroHom :=\n                            { toFun := fun f => sum f fun x => ↑(F x),\n                              map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                          map_add' :=\n                            (_ :\n                              ∀ (x x_1 : α →₀ M),\n                                (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n                      F) =\n                  F),\n          right_inv :=\n            (_ :\n              ∀ (F : (α →₀ M) →+ N),\n                (fun F =>\n                      {\n                        toZeroHom :=\n                          { toFun := fun f => sum f fun x => ↑(F x),\n                            map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                        map_add' :=\n                          (_ :\n                            ∀ (x x_1 : α →₀ M),\n                              (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n                    ((fun F x => AddMonoidHom.comp F (singleAddHom x)) F) =\n                  F) }\n        F +\n      Equiv.toFun\n        {\n          toFun := fun F =>\n            {\n              toZeroHom :=\n                { toFun := fun f => sum f fun x => ↑(F x),\n                  map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n              map_add' :=\n                (_ :\n                  ∀ (x x_1 : α →₀ M),\n                    (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) },\n          invFun := fun F x => AddMonoidHom.comp F (singleAddHom x),\n          left_inv :=\n            (_ :\n              ∀ (F : α → M →+ N),\n                (fun F x => AddMonoidHom.comp F (singleAddHom x))\n                    ((fun F =>\n                        {\n                          toZeroHom :=\n                            { toFun := fun f => sum f fun x => ↑(F x),\n                              map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                          map_add' :=\n                            (_ :\n                              ∀ (x x_1 : α →₀ M),\n                                (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n                      F) =\n                  F),\n          right_inv :=\n            (_ :\n              ∀ (F : (α →₀ M) →+ N),\n                (fun F =>\n                      {\n                        toZeroHom :=\n                          { toFun := fun f => sum f fun x => ↑(F x),\n                            map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                        map_add' :=\n                          (_ :\n                            ∀ (x x_1 : α →₀ M),\n                              (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n                    ((fun F x => AddMonoidHom.comp F (singleAddHom x)) F) =\n                  F) }\n        G\n[PROOFSTEP]\next x\n[GOAL]\ncase H.h\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx✝¹ : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG✝ : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddZeroClass M\ninst✝ : AddCommMonoid N\nF G : α → M →+ N\nx : α\nx✝ : M\n⊢ ↑(AddMonoidHom.comp\n          (Equiv.toFun\n            {\n              toFun := fun F =>\n                {\n                  toZeroHom :=\n                    { toFun := fun f => sum f fun x => ↑(F x),\n                      map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                  map_add' :=\n                    (_ :\n                      ∀ (x x_1 : α →₀ M),\n                        (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) },\n              invFun := fun F x => AddMonoidHom.comp F (singleAddHom x),\n              left_inv :=\n                (_ :\n                  ∀ (F : α → M →+ N),\n                    (fun F x => AddMonoidHom.comp F (singleAddHom x))\n                        ((fun F =>\n                            {\n                              toZeroHom :=\n                                { toFun := fun f => sum f fun x => ↑(F x),\n                                  map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (x x_1 : α →₀ M),\n                                    (sum (x + x_1) fun a => ↑(F a)) =\n                                      (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n                          F) =\n                      F),\n              right_inv :=\n                (_ :\n                  ∀ (F : (α →₀ M) →+ N),\n                    (fun F =>\n                          {\n                            toZeroHom :=\n                              { toFun := fun f => sum f fun x => ↑(F x),\n                                map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                            map_add' :=\n                              (_ :\n                                ∀ (x x_1 : α →₀ M),\n                                  (sum (x + x_1) fun a => ↑(F a)) =\n                                    (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n                        ((fun F x => AddMonoidHom.comp F (singleAddHom x)) F) =\n                      F) }\n            (F + G))\n          (singleAddHom x))\n      x✝ =\n    ↑(AddMonoidHom.comp\n          (Equiv.toFun\n              {\n                toFun := fun F =>\n                  {\n                    toZeroHom :=\n                      { toFun := fun f => sum f fun x => ↑(F x),\n                        map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                    map_add' :=\n                      (_ :\n                        ∀ (x x_1 : α →₀ M),\n                          (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) },\n                invFun := fun F x => AddMonoidHom.comp F (singleAddHom x),\n                left_inv :=\n                  (_ :\n                    ∀ (F : α → M →+ N),\n                      (fun F x => AddMonoidHom.comp F (singleAddHom x))\n                          ((fun F =>\n                              {\n                                toZeroHom :=\n                                  { toFun := fun f => sum f fun x => ↑(F x),\n                                    map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x x_1 : α →₀ M),\n                                      (sum (x + x_1) fun a => ↑(F a)) =\n                                        (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n                            F) =\n                        F),\n                right_inv :=\n                  (_ :\n                    ∀ (F : (α →₀ M) →+ N),\n                      (fun F =>\n                            {\n                              toZeroHom :=\n                                { toFun := fun f => sum f fun x => ↑(F x),\n                                  map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (x x_1 : α →₀ M),\n                                    (sum (x + x_1) fun a => ↑(F a)) =\n                                      (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n                          ((fun F x => AddMonoidHom.comp F (singleAddHom x)) F) =\n                        F) }\n              F +\n            Equiv.toFun\n              {\n                toFun := fun F =>\n                  {\n                    toZeroHom :=\n                      { toFun := fun f => sum f fun x => ↑(F x),\n                        map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                    map_add' :=\n                      (_ :\n                        ∀ (x x_1 : α →₀ M),\n                          (sum (x + x_1) fun a => ↑(F a)) = (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) },\n                invFun := fun F x => AddMonoidHom.comp F (singleAddHom x),\n                left_inv :=\n                  (_ :\n                    ∀ (F : α → M →+ N),\n                      (fun F x => AddMonoidHom.comp F (singleAddHom x))\n                          ((fun F =>\n                              {\n                                toZeroHom :=\n                                  { toFun := fun f => sum f fun x => ↑(F x),\n                                    map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x x_1 : α →₀ M),\n                                      (sum (x + x_1) fun a => ↑(F a)) =\n                                        (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n                            F) =\n                        F),\n                right_inv :=\n                  (_ :\n                    ∀ (F : (α →₀ M) →+ N),\n                      (fun F =>\n                            {\n                              toZeroHom :=\n                                { toFun := fun f => sum f fun x => ↑(F x),\n                                  map_zero' := (_ : ∑ x in ∅, (fun x => ↑(F x)) x (↑0 x) = 0) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (x x_1 : α →₀ M),\n                                    (sum (x + x_1) fun a => ↑(F a)) =\n                                      (sum x fun a => ↑(F a)) + sum x_1 fun a => ↑(F a)) })\n                          ((fun F x => AddMonoidHom.comp F (singleAddHom x)) F) =\n                        F) }\n              G)\n          (singleAddHom x))\n      x✝\n[PROOFSTEP]\nexact sum_add\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni✝ : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : Fintype α\ni : α\nm : M\n⊢ ∑ j : α, ↑(single i m) j = m\n[PROOFSTEP]\nclassical rw [single, coe_mk, Finset.sum_pi_single']\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni✝ : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : Fintype α\ni : α\nm : M\n⊢ ∑ j : α, ↑(single i m) j = m\n[PROOFSTEP]\nrw [single, coe_mk, Finset.sum_pi_single']\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni✝ : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : Fintype α\ni : α\nm : M\n⊢ (if i ∈ univ then m else 0) = m\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni✝ : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : Fintype α\ni : α\nm : M\n⊢ ∑ j : α, ↑(single j m) i = m\n[PROOFSTEP]\nsimp_rw [single, coe_mk]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni✝ : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : Fintype α\ni : α\nm : M\n⊢ ∑ x : α, Pi.single x m i = m\n[PROOFSTEP]\nclassical rw [Finset.sum_pi_single]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni✝ : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : Fintype α\ni : α\nm : M\n⊢ ∑ x : α, Pi.single x m i = m\n[PROOFSTEP]\nrw [Finset.sum_pi_single]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni✝ : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : Fintype α\ni : α\nm : M\n⊢ (if i ∈ univ then m else 0) = m\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : AddCommMonoid B\ninst✝³ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝² : AddCommMonoid M\ninst✝¹ : AddCommMonoid N\ninst✝ : AddCommMonoid P\ng : N →+ P\nf : α → M →+ N\na : α\n⊢ ↑(AddEquiv.symm liftAddHom) (AddMonoidHom.comp g (↑liftAddHom f)) a = AddMonoidHom.comp g (f a)\n[PROOFSTEP]\nrw [liftAddHom_symm_apply, AddMonoidHom.comp_assoc, liftAddHom_comp_single]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : Zero M\ninst✝ : CommMonoid N\nv : α →₀ M\nf : α ↪ β\ng : β → M → N\n⊢ prod (embDomain f v) g = prod v fun a b => g (↑f a) b\n[PROOFSTEP]\nrw [prod, prod, support_embDomain, Finset.prod_map]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : Zero M\ninst✝ : CommMonoid N\nv : α →₀ M\nf : α ↪ β\ng : β → M → N\n⊢ ∏ x in v.support, g (↑f x) (↑(embDomain f v) (↑f x)) = ∏ a in v.support, g (↑f a) (↑v a)\n[PROOFSTEP]\nsimp_rw [embDomain_apply]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝¹ : Finset α\nf : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : CommMonoid N\ns✝ : Finset ι\ng : ι → α →₀ M\nh : α → M → N\nh_zero : ∀ (a : α), h a 0 = 1\nh_add : ∀ (a : α) (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ * h a b₂\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : ∏ i in s, prod (g i) h = prod (∑ i in s, g i) h\n⊢ ∏ i in cons a s has, prod (g i) h = prod (∑ i in cons a s has, g i) h\n[PROOFSTEP]\nrw [prod_cons, ih, sum_cons, prod_add_index' h_zero h_add]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : AddCommMonoid N\nf : Multiset (α →₀ M)\nh : α → M → N\nh₀ : ∀ (a : α), h a 0 = 0\nh₁ : ∀ (a : α) (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ + h a b₂\na : α →₀ M\ns : Multiset (α →₀ M)\nih : sum (Multiset.sum s) h = Multiset.sum (Multiset.map (fun g => sum g h) s)\n⊢ sum (Multiset.sum (a ::ₘ s)) h = Multiset.sum (Multiset.map (fun g => sum g h) (a ::ₘ s))\n[PROOFSTEP]\nrw [Multiset.sum_cons, Multiset.map_cons, Multiset.sum_cons, sum_add_index' h₀ h₁, ih]\n[GOAL]\nα✝ : Type u_1\nι✝ : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι✝ → A → C\nh0 : ∀ (i : ι✝), t i 0 = 0\nh1 : ∀ (i : ι✝) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α✝\nf : α✝ → ι✝ →₀ A\ni : ι✝\ng✝ : ι✝ →₀ A\nk : ι✝ → A → γ → B\nx : γ\nβ : Type u_7\nM✝ : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\nα : Type u_16\nι : Type u_17\nM : Type u_18\ninst✝¹ : DecidableEq α\ninst✝ : AddCommMonoid M\ng : ι → α →₀ M\ns : Finset ι\nh : ∀ (i₁ i₂ : ι), i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support\n⊢ (∑ i in s, g i).support = Finset.biUnion s fun i => (g i).support\n[PROOFSTEP]\nclassical\n  -- Porting note: apply Finset.induction_on s was not working; refine does.\nrefine Finset.induction_on s ?_ ?_\n· simp\n· intro i s hi\n  simp only [hi, sum_insert, not_false_iff, biUnion_insert]\n  intro hs\n  rw [Finsupp.support_add_eq, hs]\n  rw [hs, Finset.disjoint_biUnion_right]\n  intro j hj\n  refine' h _ _ (ne_of_mem_of_not_mem hj hi).symm\n[GOAL]\nα✝ : Type u_1\nι✝ : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι✝ → A → C\nh0 : ∀ (i : ι✝), t i 0 = 0\nh1 : ∀ (i : ι✝) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α✝\nf : α✝ → ι✝ →₀ A\ni : ι✝\ng✝ : ι✝ →₀ A\nk : ι✝ → A → γ → B\nx : γ\nβ : Type u_7\nM✝ : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\nα : Type u_16\nι : Type u_17\nM : Type u_18\ninst✝¹ : DecidableEq α\ninst✝ : AddCommMonoid M\ng : ι → α →₀ M\ns : Finset ι\nh : ∀ (i₁ i₂ : ι), i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support\n⊢ (∑ i in s, g i).support = Finset.biUnion s fun i => (g i).support\n[PROOFSTEP]\nrefine Finset.induction_on s ?_ ?_\n[GOAL]\ncase refine_1\nα✝ : Type u_1\nι✝ : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι✝ → A → C\nh0 : ∀ (i : ι✝), t i 0 = 0\nh1 : ∀ (i : ι✝) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α✝\nf : α✝ → ι✝ →₀ A\ni : ι✝\ng✝ : ι✝ →₀ A\nk : ι✝ → A → γ → B\nx : γ\nβ : Type u_7\nM✝ : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\nα : Type u_16\nι : Type u_17\nM : Type u_18\ninst✝¹ : DecidableEq α\ninst✝ : AddCommMonoid M\ng : ι → α →₀ M\ns : Finset ι\nh : ∀ (i₁ i₂ : ι), i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support\n⊢ (∑ i in ∅, g i).support = Finset.biUnion ∅ fun i => (g i).support\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_2\nα✝ : Type u_1\nι✝ : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι✝ → A → C\nh0 : ∀ (i : ι✝), t i 0 = 0\nh1 : ∀ (i : ι✝) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α✝\nf : α✝ → ι✝ →₀ A\ni : ι✝\ng✝ : ι✝ →₀ A\nk : ι✝ → A → γ → B\nx : γ\nβ : Type u_7\nM✝ : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\nα : Type u_16\nι : Type u_17\nM : Type u_18\ninst✝¹ : DecidableEq α\ninst✝ : AddCommMonoid M\ng : ι → α →₀ M\ns : Finset ι\nh : ∀ (i₁ i₂ : ι), i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support\n⊢ ∀ ⦃a : ι⦄ {s : Finset ι},\n    ¬a ∈ s →\n      ((∑ i in s, g i).support = Finset.biUnion s fun i => (g i).support) →\n        (∑ i in insert a s, g i).support = Finset.biUnion (insert a s) fun i => (g i).support\n[PROOFSTEP]\nintro i s hi\n[GOAL]\ncase refine_2\nα✝ : Type u_1\nι✝ : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι✝ → A → C\nh0 : ∀ (i : ι✝), t i 0 = 0\nh1 : ∀ (i : ι✝) (x y : A), t i (x + y) = t i x + t i y\ns✝¹ : Finset α✝\nf : α✝ → ι✝ →₀ A\ni✝ : ι✝\ng✝ : ι✝ →₀ A\nk : ι✝ → A → γ → B\nx : γ\nβ : Type u_7\nM✝ : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\nα : Type u_16\nι : Type u_17\nM : Type u_18\ninst✝¹ : DecidableEq α\ninst✝ : AddCommMonoid M\ng : ι → α →₀ M\ns✝ : Finset ι\nh : ∀ (i₁ i₂ : ι), i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support\ni : ι\ns : Finset ι\nhi : ¬i ∈ s\n⊢ ((∑ i in s, g i).support = Finset.biUnion s fun i => (g i).support) →\n    (∑ i in insert i s, g i).support = Finset.biUnion (insert i s) fun i => (g i).support\n[PROOFSTEP]\nsimp only [hi, sum_insert, not_false_iff, biUnion_insert]\n[GOAL]\ncase refine_2\nα✝ : Type u_1\nι✝ : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι✝ → A → C\nh0 : ∀ (i : ι✝), t i 0 = 0\nh1 : ∀ (i : ι✝) (x y : A), t i (x + y) = t i x + t i y\ns✝¹ : Finset α✝\nf : α✝ → ι✝ →₀ A\ni✝ : ι✝\ng✝ : ι✝ →₀ A\nk : ι✝ → A → γ → B\nx : γ\nβ : Type u_7\nM✝ : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\nα : Type u_16\nι : Type u_17\nM : Type u_18\ninst✝¹ : DecidableEq α\ninst✝ : AddCommMonoid M\ng : ι → α →₀ M\ns✝ : Finset ι\nh : ∀ (i₁ i₂ : ι), i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support\ni : ι\ns : Finset ι\nhi : ¬i ∈ s\n⊢ ((∑ i in s, g i).support = Finset.biUnion s fun i => (g i).support) →\n    (g i + ∑ i in s, g i).support = (g i).support ∪ Finset.biUnion s fun i => (g i).support\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase refine_2\nα✝ : Type u_1\nι✝ : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι✝ → A → C\nh0 : ∀ (i : ι✝), t i 0 = 0\nh1 : ∀ (i : ι✝) (x y : A), t i (x + y) = t i x + t i y\ns✝¹ : Finset α✝\nf : α✝ → ι✝ →₀ A\ni✝ : ι✝\ng✝ : ι✝ →₀ A\nk : ι✝ → A → γ → B\nx : γ\nβ : Type u_7\nM✝ : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\nα : Type u_16\nι : Type u_17\nM : Type u_18\ninst✝¹ : DecidableEq α\ninst✝ : AddCommMonoid M\ng : ι → α →₀ M\ns✝ : Finset ι\nh : ∀ (i₁ i₂ : ι), i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support\ni : ι\ns : Finset ι\nhi : ¬i ∈ s\nhs : (∑ i in s, g i).support = Finset.biUnion s fun i => (g i).support\n⊢ (g i + ∑ i in s, g i).support = (g i).support ∪ Finset.biUnion s fun i => (g i).support\n[PROOFSTEP]\nrw [Finsupp.support_add_eq, hs]\n[GOAL]\ncase refine_2\nα✝ : Type u_1\nι✝ : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι✝ → A → C\nh0 : ∀ (i : ι✝), t i 0 = 0\nh1 : ∀ (i : ι✝) (x y : A), t i (x + y) = t i x + t i y\ns✝¹ : Finset α✝\nf : α✝ → ι✝ →₀ A\ni✝ : ι✝\ng✝ : ι✝ →₀ A\nk : ι✝ → A → γ → B\nx : γ\nβ : Type u_7\nM✝ : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\nα : Type u_16\nι : Type u_17\nM : Type u_18\ninst✝¹ : DecidableEq α\ninst✝ : AddCommMonoid M\ng : ι → α →₀ M\ns✝ : Finset ι\nh : ∀ (i₁ i₂ : ι), i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support\ni : ι\ns : Finset ι\nhi : ¬i ∈ s\nhs : (∑ i in s, g i).support = Finset.biUnion s fun i => (g i).support\n⊢ Disjoint (g i).support (∑ i in s, g i).support\n[PROOFSTEP]\nrw [hs, Finset.disjoint_biUnion_right]\n[GOAL]\ncase refine_2\nα✝ : Type u_1\nι✝ : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι✝ → A → C\nh0 : ∀ (i : ι✝), t i 0 = 0\nh1 : ∀ (i : ι✝) (x y : A), t i (x + y) = t i x + t i y\ns✝¹ : Finset α✝\nf : α✝ → ι✝ →₀ A\ni✝ : ι✝\ng✝ : ι✝ →₀ A\nk : ι✝ → A → γ → B\nx : γ\nβ : Type u_7\nM✝ : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\nα : Type u_16\nι : Type u_17\nM : Type u_18\ninst✝¹ : DecidableEq α\ninst✝ : AddCommMonoid M\ng : ι → α →₀ M\ns✝ : Finset ι\nh : ∀ (i₁ i₂ : ι), i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support\ni : ι\ns : Finset ι\nhi : ¬i ∈ s\nhs : (∑ i in s, g i).support = Finset.biUnion s fun i => (g i).support\n⊢ ∀ (i_1 : ι), i_1 ∈ s → Disjoint (g i).support (g i_1).support\n[PROOFSTEP]\nintro j hj\n[GOAL]\ncase refine_2\nα✝ : Type u_1\nι✝ : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι✝ → A → C\nh0 : ∀ (i : ι✝), t i 0 = 0\nh1 : ∀ (i : ι✝) (x y : A), t i (x + y) = t i x + t i y\ns✝¹ : Finset α✝\nf : α✝ → ι✝ →₀ A\ni✝ : ι✝\ng✝ : ι✝ →₀ A\nk : ι✝ → A → γ → B\nx : γ\nβ : Type u_7\nM✝ : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\nα : Type u_16\nι : Type u_17\nM : Type u_18\ninst✝¹ : DecidableEq α\ninst✝ : AddCommMonoid M\ng : ι → α →₀ M\ns✝ : Finset ι\nh : ∀ (i₁ i₂ : ι), i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support\ni : ι\ns : Finset ι\nhi : ¬i ∈ s\nhs : (∑ i in s, g i).support = Finset.biUnion s fun i => (g i).support\nj : ι\nhj : j ∈ s\n⊢ Disjoint (g i).support (g j).support\n[PROOFSTEP]\nrefine' h _ _ (ne_of_mem_of_not_mem hj hi).symm\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ✝ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\nf1 f2 : α →₀ M\nhd : Disjoint f1.support f2.support\nβ : Type u_16\ninst✝ : CommMonoid β\ng : α → M → β\n⊢ prod (f1 + f2) g = prod f1 g * prod f2 g\n[PROOFSTEP]\nhave : ∀ {f1 f2 : α →₀ M}, Disjoint f1.support f2.support → (∏ x in f1.support, g x (f1 x + f2 x)) = f1.prod g :=\n  fun hd => Finset.prod_congr rfl fun x hx => by simp only [not_mem_support_iff.mp (disjoint_left.mp hd hx), add_zero]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx✝ : γ\nβ✝ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\nf1 f2 : α →₀ M\nhd✝ : Disjoint f1.support f2.support\nβ : Type u_16\ninst✝ : CommMonoid β\ng : α → M → β\nf1✝ f2✝ : α →₀ M\nhd : Disjoint f1✝.support f2✝.support\nx : α\nhx : x ∈ f1✝.support\n⊢ g x (↑f1✝ x + ↑f2✝ x) = g x (↑f1✝ x)\n[PROOFSTEP]\nsimp only [not_mem_support_iff.mp (disjoint_left.mp hd hx), add_zero]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ✝ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\nf1 f2 : α →₀ M\nhd : Disjoint f1.support f2.support\nβ : Type u_16\ninst✝ : CommMonoid β\ng : α → M → β\nthis : ∀ {f1 f2 : α →₀ M}, Disjoint f1.support f2.support → ∏ x in f1.support, g x (↑f1 x + ↑f2 x) = prod f1 g\n⊢ prod (f1 + f2) g = prod f1 g * prod f2 g\n[PROOFSTEP]\nclassical simp_rw [← this hd, ← this hd.symm, add_comm (f2 _), Finsupp.prod, support_add_eq hd, prod_union hd,\n  add_apply]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng✝ : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ✝ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\nf1 f2 : α →₀ M\nhd : Disjoint f1.support f2.support\nβ : Type u_16\ninst✝ : CommMonoid β\ng : α → M → β\nthis : ∀ {f1 f2 : α →₀ M}, Disjoint f1.support f2.support → ∏ x in f1.support, g x (↑f1 x + ↑f2 x) = prod f1 g\n⊢ prod (f1 + f2) g = prod f1 g * prod f2 g\n[PROOFSTEP]\nsimp_rw [← this hd, ← this hd.symm, add_comm (f2 _), Finsupp.prod, support_add_eq hd, prod_union hd, add_apply]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1✝ : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : CommMonoid N\nf1 f2 : α →₀ M\ng1 g2 : α → M → N\nh1 : f1.support ⊆ f2.support\nh2 : ∀ (a : α), a ∈ f1.support → g1 a (↑f1 a) ∣ g2 a (↑f2 a)\n⊢ prod f1 g1 ∣ prod f2 g2\n[PROOFSTEP]\nclassical\nsimp only [Finsupp.prod, Finsupp.prod_mul]\nrw [← sdiff_union_of_subset h1, prod_union sdiff_disjoint]\napply dvd_mul_of_dvd_right\napply prod_dvd_prod_of_dvd\nexact h2\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1✝ : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : CommMonoid N\nf1 f2 : α →₀ M\ng1 g2 : α → M → N\nh1 : f1.support ⊆ f2.support\nh2 : ∀ (a : α), a ∈ f1.support → g1 a (↑f1 a) ∣ g2 a (↑f2 a)\n⊢ prod f1 g1 ∣ prod f2 g2\n[PROOFSTEP]\nsimp only [Finsupp.prod, Finsupp.prod_mul]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1✝ : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : CommMonoid N\nf1 f2 : α →₀ M\ng1 g2 : α → M → N\nh1 : f1.support ⊆ f2.support\nh2 : ∀ (a : α), a ∈ f1.support → g1 a (↑f1 a) ∣ g2 a (↑f2 a)\n⊢ ∏ x in f1.support, g1 x (↑f1 x) ∣ ∏ x in f2.support, g2 x (↑f2 x)\n[PROOFSTEP]\nrw [← sdiff_union_of_subset h1, prod_union sdiff_disjoint]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1✝ : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : CommMonoid N\nf1 f2 : α →₀ M\ng1 g2 : α → M → N\nh1 : f1.support ⊆ f2.support\nh2 : ∀ (a : α), a ∈ f1.support → g1 a (↑f1 a) ∣ g2 a (↑f2 a)\n⊢ ∏ x in f1.support, g1 x (↑f1 x) ∣ (∏ x in f2.support \\ f1.support, g2 x (↑f2 x)) * ∏ x in f1.support, g2 x (↑f2 x)\n[PROOFSTEP]\napply dvd_mul_of_dvd_right\n[GOAL]\ncase h\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1✝ : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : CommMonoid N\nf1 f2 : α →₀ M\ng1 g2 : α → M → N\nh1 : f1.support ⊆ f2.support\nh2 : ∀ (a : α), a ∈ f1.support → g1 a (↑f1 a) ∣ g2 a (↑f2 a)\n⊢ ∏ x in f1.support, g1 x (↑f1 x) ∣ ∏ x in f1.support, g2 x (↑f2 x)\n[PROOFSTEP]\napply prod_dvd_prod_of_dvd\n[GOAL]\ncase h.h\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1✝ : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : AddCommMonoid M\ninst✝ : CommMonoid N\nf1 f2 : α →₀ M\ng1 g2 : α → M → N\nh1 : f1.support ⊆ f2.support\nh2 : ∀ (a : α), a ∈ f1.support → g1 a (↑f1 a) ∣ g2 a (↑f2 a)\n⊢ ∀ (a : α), a ∈ f1.support → g1 a (↑f1 a) ∣ g2 a (↑f2 a)\n[PROOFSTEP]\nexact h2\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝³ : AddCommMonoid A\ninst✝² : AddCommMonoid B\ninst✝¹ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝ : AddCommMonoid M\ns : Finset α\nf : (a : α) → a ∈ s → M\n⊢ indicator s f = ∑ x in attach s, single (↑x) (f ↑x (_ : ↑x ∈ s))\n[PROOFSTEP]\nrw [← sum_single (indicator s f), sum, sum_subset (support_indicator_subset _ _), ← sum_attach]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝³ : AddCommMonoid A\ninst✝² : AddCommMonoid B\ninst✝¹ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝ : AddCommMonoid M\ns : Finset α\nf : (a : α) → a ∈ s → M\n⊢ ∑ x in attach s, single (↑x) (↑(indicator s f) ↑x) = ∑ x in attach s, single (↑x) (f ↑x (_ : ↑x ∈ s))\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl (fun _ _ => _)\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝³ : AddCommMonoid A\ninst✝² : AddCommMonoid B\ninst✝¹ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝ : AddCommMonoid M\ns : Finset α\nf : (a : α) → a ∈ s → M\nx✝¹ : { x // x ∈ s }\nx✝ : x✝¹ ∈ attach s\n⊢ single (↑x✝¹) (↑(indicator s f) ↑x✝¹) = single (↑x✝¹) (f ↑x✝¹ (_ : ↑x✝¹ ∈ s))\n[PROOFSTEP]\nrw [indicator_of_mem]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝³ : AddCommMonoid A\ninst✝² : AddCommMonoid B\ninst✝¹ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝ : AddCommMonoid M\ns : Finset α\nf : (a : α) → a ∈ s → M\n⊢ ∀ (x : α), x ∈ s → ¬x ∈ (indicator s f).support → single x (↑(indicator s f) x) = 0\n[PROOFSTEP]\nintro i _ hi\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝³ : AddCommMonoid A\ninst✝² : AddCommMonoid B\ninst✝¹ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni✝ : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝ : AddCommMonoid M\ns : Finset α\nf : (a : α) → a ∈ s → M\ni : α\na✝ : i ∈ s\nhi : ¬i ∈ (indicator s f).support\n⊢ single i (↑(indicator s f) i) = 0\n[PROOFSTEP]\nrw [not_mem_support_iff.mp hi, single_zero]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : Zero M\ninst✝ : CommMonoid N\ns : Finset α\nf : (a : α) → a ∈ s → M\nh : α → M → N\nh_zero : ∀ (a : α), a ∈ s → h a 0 = 1\n⊢ prod (indicator s f) h = ∏ x in attach s, h (↑x) (f ↑x (_ : ↑x ∈ s))\n[PROOFSTEP]\nrw [prod_of_support_subset _ (support_indicator_subset _ _) h h_zero, ← prod_attach]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : Zero M\ninst✝ : CommMonoid N\ns : Finset α\nf : (a : α) → a ∈ s → M\nh : α → M → N\nh_zero : ∀ (a : α), a ∈ s → h a 0 = 1\n⊢ ∏ x in attach s, h (↑x) (↑(indicator s f) ↑x) = ∏ x in attach s, h (↑x) (f ↑x (_ : ↑x ∈ s))\n[PROOFSTEP]\nrefine' Finset.prod_congr rfl (fun _ _ => _)\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : Zero M\ninst✝ : CommMonoid N\ns : Finset α\nf : (a : α) → a ∈ s → M\nh : α → M → N\nh_zero : ∀ (a : α), a ∈ s → h a 0 = 1\nx✝¹ : { x // x ∈ s }\nx✝ : x✝¹ ∈ attach s\n⊢ h (↑x✝¹) (↑(indicator s f) ↑x✝¹) = h (↑x✝¹) (f ↑x✝¹ (_ : ↑x✝¹ ∈ s))\n[PROOFSTEP]\nrw [indicator_of_mem]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\na : α\ns : Finset α\nhas : ¬a ∈ s\nih : sum (∑ x in s, f x) t = ∑ x in s, sum (f x) t\n⊢ sum (∑ x in insert a s, f x) t = ∑ x in insert a s, sum (f x) t\n[PROOFSTEP]\nsimp_rw [Finset.sum_insert has, Finsupp.sum_add_index' h0 h1, ih]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NonUnitalNonAssocSemiring S\nb : S\ns : α →₀ R\nf : α → R → S\n⊢ sum s f * b = sum s fun a c => f a c * b\n[PROOFSTEP]\nsimp only [Finsupp.sum, Finset.sum_mul]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝⁴ : AddCommMonoid A\ninst✝³ : AddCommMonoid B\ninst✝² : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns✝ : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NonUnitalNonAssocSemiring S\nb : S\ns : α →₀ R\nf : α → R → S\n⊢ b * sum s f = sum s fun a c => b * f a c\n[PROOFSTEP]\nsimp only [Finsupp.sum, Finset.mul_sum]\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH✝ : Type u_13\nR : Type u_14\nS : Type u_15\nf : ℕ →₀ ℕ\nhf : ¬0 ∈ f.support\na : ℕ\nha : a ∈ f.support\nH : a = 0\n⊢ False\n[PROOFSTEP]\nsubst H\n[GOAL]\nα : Type u_1\nι : Type u_2\nγ : Type u_3\nA : Type u_4\nB : Type u_5\nC : Type u_6\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : AddCommMonoid C\nt : ι → A → C\nh0 : ∀ (i : ι), t i 0 = 0\nh1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y\ns : Finset α\nf✝ : α → ι →₀ A\ni : ι\ng : ι →₀ A\nk : ι → A → γ → B\nx : γ\nβ : Type u_7\nM : Type u_8\nM' : Type u_9\nN : Type u_10\nP : Type u_11\nG : Type u_12\nH : Type u_13\nR : Type u_14\nS : Type u_15\nf : ℕ →₀ ℕ\nhf : ¬0 ∈ f.support\nha : 0 ∈ f.support\n⊢ False\n[PROOFSTEP]\nexact hf ha\n", "meta": {"mathlib_filename": "Mathlib.Algebra.BigOperators.Finsupp", "llama_tokens": 42515, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.658417500561683, "lm_q2_score": 0.546738151984614, "lm_q1q2_score": 0.3599819674914231}}
{"text": "[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₁\nf : J → I\n⊢ (j : J) → Category.{?u.5215, u₁} ((C ∘ f) j)\n[PROOFSTEP]\ndsimp\n[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₁\nf : J → I\n⊢ (j : J) → Category.{?u.5215, u₁} (C (f j))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₁\ng : J → I\n⊢ (j : J) → Category.{?u.19534, u₁} (C (g j))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₁\nK : Type w₂\nf : K → J\ng : J → I\nX Y : (i : I) → C i\nf' : X ⟶ Y\n⊢ (comap C g ⋙ comap (C ∘ g) f).map f' ≫ (fun X b => 𝟙 (X (g (f b)))) Y =\n    (fun X b => 𝟙 (X (g (f b)))) X ≫ (comap C (g ∘ f)).map f'\n[PROOFSTEP]\nsimp only [comap, Function.comp]\n[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₁\nK : Type w₂\nf : K → J\ng : J → I\nX Y : (i : I) → C i\nf' : X ⟶ Y\n⊢ ((Functor.mk { obj := fun f i => f (g i), map := fun {X Y} α i => α (g i) } ⋙\n            Functor.mk { obj := fun f_1 i => f_1 (f i), map := fun {X Y} α i => α (f i) }).map\n        f' ≫\n      fun b => 𝟙 (Y (g (f b)))) =\n    (fun b => 𝟙 (X (g (f b)))) ≫ fun i => f' (g (f i))\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₁\nK : Type w₂\nf : K → J\ng : J → I\nX Y : (i : I) → C i\nf' : X ⟶ Y\nx✝ : K\n⊢ ((Functor.mk { obj := fun f i => f (g i), map := fun {X Y} α i => α (g i) } ⋙\n              Functor.mk { obj := fun f_1 i => f_1 (f i), map := fun {X Y} α i => α (f i) }).map\n          f' ≫\n        fun b => 𝟙 (Y (g (f b))))\n      x✝ =\n    ((fun b => 𝟙 (X (g (f b)))) ≫ fun i => f' (g (f i))) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₁\nK : Type w₂\nf : K → J\ng : J → I\nX Y : (i : I) → C i\nf' : X ⟶ Y\n⊢ (comap C (g ∘ f)).map f' ≫ (fun X b => 𝟙 (X (g (f b)))) Y =\n    (fun X b => 𝟙 (X (g (f b)))) X ≫ (comap C g ⋙ comap (C ∘ g) f).map f'\n[PROOFSTEP]\nsimp only [comap, Function.comp]\n[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₁\nK : Type w₂\nf : K → J\ng : J → I\nX Y : (i : I) → C i\nf' : X ⟶ Y\n⊢ ((fun i => f' (g (f i))) ≫ fun b => 𝟙 (Y (g (f b)))) =\n    (fun b => 𝟙 (X (g (f b)))) ≫\n      (Functor.mk { obj := fun f i => f (g i), map := fun {X Y} α i => α (g i) } ⋙\n            Functor.mk { obj := fun f_1 i => f_1 (f i), map := fun {X Y} α i => α (f i) }).map\n        f'\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₁\nK : Type w₂\nf : K → J\ng : J → I\nX Y : (i : I) → C i\nf' : X ⟶ Y\nx✝ : K\n⊢ ((fun i => f' (g (f i))) ≫ fun b => 𝟙 (Y (g (f b)))) x✝ =\n    ((fun b => 𝟙 (X (g (f b)))) ≫\n        (Functor.mk { obj := fun f i => f (g i), map := fun {X Y} α i => α (g i) } ⋙\n              Functor.mk { obj := fun f_1 i => f_1 (f i), map := fun {X Y} α i => α (f i) }).map\n          f')\n      x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₁\nK : Type w₂\nh : J → I\nj : J\n⊢ ∀ {X Y : (i : I) → C i} (f : X ⟶ Y),\n    (comap C h ⋙ eval (C ∘ h) j).map f ≫ ((fun f => Iso.refl ((comap C h ⋙ eval (C ∘ h) j).obj f)) Y).hom =\n      ((fun f => Iso.refl ((comap C h ⋙ eval (C ∘ h) j).obj f)) X).hom ≫ (eval C (h j)).map f\n[PROOFSTEP]\nsimp only [Iso.refl]\n[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₁\nK : Type w₂\nh : J → I\nj : J\n⊢ ∀ {X Y : (i : I) → C i} (f : X ⟶ Y),\n    (comap C h ⋙ eval (C ∘ h) j).map f ≫ 𝟙 ((comap C h ⋙ eval (C ∘ h) j).obj Y) =\n      𝟙 ((comap C h ⋙ eval (C ∘ h) j).obj X) ≫ (eval C (h j)).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₀\nD : J → Type u₁\ninst✝ : (j : J) → Category.{v₁, u₁} (D j)\ni : I\n⊢ Category.{v₁, u₁} (Sum.elim C D (Sum.inl i))\n[PROOFSTEP]\ndsimp\n[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₀\nD : J → Type u₁\ninst✝ : (j : J) → Category.{v₁, u₁} (D j)\ni : I\n⊢ Category.{v₁, u₁} (C i)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₀\nD : J → Type u₁\ninst✝ : (j : J) → Category.{v₁, u₁} (D j)\nj : J\n⊢ Category.{v₁, u₁} (Sum.elim C D (Sum.inr j))\n[PROOFSTEP]\ndsimp\n[GOAL]\nI : Type w₀\nJ✝ : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nJ : Type w₀\nD : J → Type u₁\ninst✝ : (j : J) → Category.{v₁, u₁} (D j)\nj : J\n⊢ Category.{v₁, u₁} (D j)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nX Y : (i : I) → C i\nf : X ≅ Y\ni : I\n⊢ f.hom i ≫ f.inv i = 𝟙 (X i)\n[PROOFSTEP]\nrw [← comp_apply, Iso.hom_inv_id, id_apply]\n[GOAL]\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\nX Y : (i : I) → C i\nf : X ≅ Y\ni : I\n⊢ f.inv i ≫ f.hom i = 𝟙 (Y i)\n[PROOFSTEP]\nrw [← comp_apply, Iso.inv_hom_id, id_apply]\n[GOAL]\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nx x' : (i : I) → C i\nh : x = x'\ni : I\n⊢ eqToHom h i = eqToHom (_ : x i = x' i)\n[PROOFSTEP]\nsubst h\n[GOAL]\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nx : (i : I) → C i\ni : I\n⊢ eqToHom (_ : x = x) i = eqToHom (_ : x i = x i)\n[PROOFSTEP]\nrfl\n[GOAL]\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf : (i : I) → A ⥤ C i\ni : I\n⊢ pi' f ⋙ Pi.eval C i = f i\n[PROOFSTEP]\napply Functor.ext\n[GOAL]\ncase h_map\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf : (i : I) → A ⥤ C i\ni : I\n⊢ autoParam\n    (∀ (X Y : A) (f_1 : X ⟶ Y),\n      (pi' f ⋙ Pi.eval C i).map f_1 =\n        eqToHom (_ : ?F.obj X = ?G.obj X) ≫ (f i).map f_1 ≫ eqToHom (_ : (f i).obj Y = (pi' f ⋙ Pi.eval C i).obj Y))\n    _auto✝\ncase h_obj\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf : (i : I) → A ⥤ C i\ni : I\n⊢ ∀ (X : A), (pi' f ⋙ Pi.eval C i).obj X = (f i).obj X\n[PROOFSTEP]\nintro _ _ _\n[GOAL]\ncase h_map\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf : (i : I) → A ⥤ C i\ni : I\nX✝ Y✝ : A\nf✝ : X✝ ⟶ Y✝\n⊢ (pi' f ⋙ Pi.eval C i).map f✝ =\n    eqToHom (_ : ?F.obj X✝ = ?G.obj X✝) ≫ (f i).map f✝ ≫ eqToHom (_ : (f i).obj Y✝ = (pi' f ⋙ Pi.eval C i).obj Y✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_obj\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf : (i : I) → A ⥤ C i\ni : I\n⊢ ∀ (X : A), (pi' f ⋙ Pi.eval C i).obj X = (f i).obj X\n[PROOFSTEP]\nintro _\n[GOAL]\ncase h_obj\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf : (i : I) → A ⥤ C i\ni : I\nX✝ : A\n⊢ (pi' f ⋙ Pi.eval C i).obj X✝ = (f i).obj X✝\n[PROOFSTEP]\nrfl\n[GOAL]\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nh : ∀ (i : I), f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\n⊢ f = f'\n[PROOFSTEP]\napply Functor.ext\n[GOAL]\ncase h_map\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nh : ∀ (i : I), f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\n⊢ autoParam\n    (∀ (X Y : A) (f_1 : X ⟶ Y),\n      f.map f_1 = eqToHom (_ : ?F.obj X = ?G.obj X) ≫ f'.map f_1 ≫ eqToHom (_ : f'.obj Y = f.obj Y))\n    _auto✝\ncase h_obj\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nh : ∀ (i : I), f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\n⊢ ∀ (X : A), f.obj X = f'.obj X\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase h_obj\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nh : ∀ (i : I), f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\n⊢ ∀ (X : A), f.obj X = f'.obj X\n[PROOFSTEP]\nintro X\n[GOAL]\ncase h_obj\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nh : ∀ (i : I), f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\nX : A\n⊢ f.obj X = f'.obj X\n[PROOFSTEP]\next i\n[GOAL]\ncase h_obj.h\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nh : ∀ (i : I), f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\nX : A\ni : I\n⊢ f.obj X i = f'.obj X i\n[PROOFSTEP]\nspecialize h i\n[GOAL]\ncase h_obj.h\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nX : A\ni : I\nh : f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\n⊢ f.obj X i = f'.obj X i\n[PROOFSTEP]\nhave := congr_obj h X\n[GOAL]\ncase h_obj.h\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nX : A\ni : I\nh : f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\nthis : (f ⋙ Pi.eval C i).obj X = (f' ⋙ Pi.eval C i).obj X\n⊢ f.obj X i = f'.obj X i\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase h_map\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nh : ∀ (i : I), f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\n⊢ autoParam\n    (∀ (X Y : A) (f_1 : X ⟶ Y),\n      f.map f_1 = eqToHom (_ : f.obj X = f'.obj X) ≫ f'.map f_1 ≫ eqToHom (_ : f'.obj Y = f.obj Y))\n    _auto✝\n[PROOFSTEP]\nintro X Y g\n[GOAL]\ncase h_map\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nh : ∀ (i : I), f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\nX Y : A\ng : X ⟶ Y\n⊢ f.map g = eqToHom (_ : f.obj X = f'.obj X) ≫ f'.map g ≫ eqToHom (_ : f'.obj Y = f.obj Y)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h_map\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nh : ∀ (i : I), f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\nX Y : A\ng : X ⟶ Y\n⊢ f.map g = eqToHom (_ : f.obj X = f'.obj X) ≫ f'.map g ≫ eqToHom (_ : f'.obj Y = f.obj Y)\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h_map.h\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nh : ∀ (i : I), f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\nX Y : A\ng : X ⟶ Y\ni : I\n⊢ f.map g i = (eqToHom (_ : f.obj X = f'.obj X) ≫ f'.map g ≫ eqToHom (_ : f'.obj Y = f.obj Y)) i\n[PROOFSTEP]\nspecialize h i\n[GOAL]\ncase h_map.h\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nh✝ : ∀ (i : I), f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\nX Y : A\ng : X ⟶ Y\ni : I\nh : f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\n⊢ f.map g i = (eqToHom (_ : f.obj X = f'.obj X) ≫ f'.map g ≫ eqToHom (_ : f'.obj Y = f.obj Y)) i\n[PROOFSTEP]\nhave := congr_hom h g\n[GOAL]\ncase h_map.h\nI : Type w₀\nJ : Type w₁\nC : I → Type u₁\ninst✝² : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (D i)\nA : Type u₁\ninst✝ : Category.{u₁, u₁} A\nf f' : A ⥤ ((i : I) → C i)\nh✝ : ∀ (i : I), f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\nX Y : A\ng : X ⟶ Y\ni : I\nh : f ⋙ Pi.eval C i = f' ⋙ Pi.eval C i\nthis :\n  (f ⋙ Pi.eval C i).map g =\n    eqToHom (_ : (f ⋙ Pi.eval C i).obj X = (f' ⋙ Pi.eval C i).obj X) ≫\n      (f' ⋙ Pi.eval C i).map g ≫ eqToHom (_ : (f' ⋙ Pi.eval C i).obj Y = (f ⋙ Pi.eval C i).obj Y)\n⊢ f.map g i = (eqToHom (_ : f.obj X = f'.obj X) ≫ f'.map g ≫ eqToHom (_ : f'.obj Y = f.obj Y)) i\n[PROOFSTEP]\nsimpa\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Pi.Basic", "llama_tokens": 7583, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.743167997235783, "lm_q2_score": 0.4843800842769843, "lm_q1q2_score": 0.3599757771330262}}
{"text": "[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝³ : SMul M α\ninst✝² : SMul M β\ninst✝¹ : SMul N α\ninst✝ : SMul N β\na : M\nb : α\nc : β\nx : α ⊕ β\n⊢ swap (a • x) = a • swap x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝³ : SMul M α\ninst✝² : SMul M β\ninst✝¹ : SMul N α\ninst✝ : SMul N β\na : M\nb : α\nc : β\nval✝ : α\n⊢ swap (a • inl val✝) = a • swap (inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝³ : SMul M α\ninst✝² : SMul M β\ninst✝¹ : SMul N α\ninst✝ : SMul N β\na : M\nb : α\nc val✝ : β\n⊢ swap (a • inr val✝) = a • swap (inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝⁶ : SMul M α\ninst✝⁵ : SMul M β\ninst✝⁴ : SMul N α\ninst✝³ : SMul N β\na✝ : M\nb✝ : α\nc : β\nx✝ : α ⊕ β\ninst✝² : SMul M N\ninst✝¹ : IsScalarTower M N α\ninst✝ : IsScalarTower M N β\na : M\nb : N\nx : α ⊕ β\n⊢ (a • b) • x = a • b • x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝⁶ : SMul M α\ninst✝⁵ : SMul M β\ninst✝⁴ : SMul N α\ninst✝³ : SMul N β\na✝ : M\nb✝ : α\nc : β\nx : α ⊕ β\ninst✝² : SMul M N\ninst✝¹ : IsScalarTower M N α\ninst✝ : IsScalarTower M N β\na : M\nb : N\nval✝ : α\n⊢ (a • b) • inl val✝ = a • b • inl val✝\ncase inr\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝⁶ : SMul M α\ninst✝⁵ : SMul M β\ninst✝⁴ : SMul N α\ninst✝³ : SMul N β\na✝ : M\nb✝ : α\nc : β\nx : α ⊕ β\ninst✝² : SMul M N\ninst✝¹ : IsScalarTower M N α\ninst✝ : IsScalarTower M N β\na : M\nb : N\nval✝ : β\n⊢ (a • b) • inr val✝ = a • b • inr val✝\n[PROOFSTEP]\nexacts [congr_arg inl (smul_assoc _ _ _), congr_arg inr (smul_assoc _ _ _)]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝⁵ : SMul M α\ninst✝⁴ : SMul M β\ninst✝³ : SMul N α\ninst✝² : SMul N β\na✝ : M\nb✝ : α\nc : β\nx✝ : α ⊕ β\ninst✝¹ : SMulCommClass M N α\ninst✝ : SMulCommClass M N β\na : M\nb : N\nx : α ⊕ β\n⊢ a • b • x = b • a • x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝⁵ : SMul M α\ninst✝⁴ : SMul M β\ninst✝³ : SMul N α\ninst✝² : SMul N β\na✝ : M\nb✝ : α\nc : β\nx : α ⊕ β\ninst✝¹ : SMulCommClass M N α\ninst✝ : SMulCommClass M N β\na : M\nb : N\nval✝ : α\n⊢ a • b • inl val✝ = b • a • inl val✝\ncase inr\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝⁵ : SMul M α\ninst✝⁴ : SMul M β\ninst✝³ : SMul N α\ninst✝² : SMul N β\na✝ : M\nb✝ : α\nc : β\nx : α ⊕ β\ninst✝¹ : SMulCommClass M N α\ninst✝ : SMulCommClass M N β\na : M\nb : N\nval✝ : β\n⊢ a • b • inr val✝ = b • a • inr val✝\n[PROOFSTEP]\nexacts [congr_arg inl (smul_comm _ _ _), congr_arg inr (smul_comm _ _ _)]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝⁷ : SMul M α\ninst✝⁶ : SMul M β\ninst✝⁵ : SMul N α\ninst✝⁴ : SMul N β\na✝ : M\nb : α\nc : β\nx✝ : α ⊕ β\ninst✝³ : SMul Mᵐᵒᵖ α\ninst✝² : SMul Mᵐᵒᵖ β\ninst✝¹ : IsCentralScalar M α\ninst✝ : IsCentralScalar M β\na : M\nx : α ⊕ β\n⊢ MulOpposite.op a • x = a • x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝⁷ : SMul M α\ninst✝⁶ : SMul M β\ninst✝⁵ : SMul N α\ninst✝⁴ : SMul N β\na✝ : M\nb : α\nc : β\nx : α ⊕ β\ninst✝³ : SMul Mᵐᵒᵖ α\ninst✝² : SMul Mᵐᵒᵖ β\ninst✝¹ : IsCentralScalar M α\ninst✝ : IsCentralScalar M β\na : M\nval✝ : α\n⊢ MulOpposite.op a • inl val✝ = a • inl val✝\ncase inr\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝⁷ : SMul M α\ninst✝⁶ : SMul M β\ninst✝⁵ : SMul N α\ninst✝⁴ : SMul N β\na✝ : M\nb : α\nc : β\nx : α ⊕ β\ninst✝³ : SMul Mᵐᵒᵖ α\ninst✝² : SMul Mᵐᵒᵖ β\ninst✝¹ : IsCentralScalar M α\ninst✝ : IsCentralScalar M β\na : M\nval✝ : β\n⊢ MulOpposite.op a • inr val✝ = a • inr val✝\n[PROOFSTEP]\nexacts [congr_arg inl (op_smul_eq_smul _ _), congr_arg inr (op_smul_eq_smul _ _)]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝⁴ : SMul M α\ninst✝³ : SMul M β\ninst✝² : SMul N α\ninst✝¹ : SMul N β\na✝ : M\nb : α\nc : β\nx : α ⊕ β\ninst✝ : FaithfulSMul M α\nm₁✝ m₂✝ : M\nh : ∀ (a : α ⊕ β), m₁✝ • a = m₂✝ • a\na : α\n⊢ m₁✝ • a = m₂✝ • a\n[PROOFSTEP]\ninjection h (inl a)\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\ninst✝⁴ : SMul M α\ninst✝³ : SMul M β\ninst✝² : SMul N α\ninst✝¹ : SMul N β\na : M\nb✝ : α\nc : β\nx : α ⊕ β\ninst✝ : FaithfulSMul M β\nm₁✝ m₂✝ : M\nh : ∀ (a : α ⊕ β), m₁✝ • a = m₂✝ • a\nb : β\n⊢ m₁✝ • b = m₂✝ • b\n[PROOFSTEP]\ninjection h (inr b)\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nm : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : MulAction M β\nx : α ⊕ β\n⊢ 1 • x = x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nm : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : MulAction M β\nval✝ : α\n⊢ 1 • inl val✝ = inl val✝\ncase inr\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nm : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : MulAction M β\nval✝ : β\n⊢ 1 • inr val✝ = inr val✝\n[PROOFSTEP]\nexacts [congr_arg inl (one_smul _ _), congr_arg inr (one_smul _ _)]\n[GOAL]\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nm : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : MulAction M β\na b : M\nx : α ⊕ β\n⊢ (a * b) • x = a • b • x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nm : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : MulAction M β\na b : M\nval✝ : α\n⊢ (a * b) • inl val✝ = a • b • inl val✝\ncase inr\nM : Type u_1\nN : Type u_2\nP : Type u_3\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nm : Monoid M\ninst✝¹ : MulAction M α\ninst✝ : MulAction M β\na b : M\nval✝ : β\n⊢ (a * b) • inr val✝ = a • b • inr val✝\n[PROOFSTEP]\nexacts [congr_arg inl (mul_smul _ _ _), congr_arg inr (mul_smul _ _ _)]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.GroupAction.Sum", "llama_tokens": 3571, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6825737344123242, "lm_q2_score": 0.5273165233795672, "lm_q1q2_score": 0.35993240858051484}}
{"text": "[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf✝ : β → γ\nα✝ β✝ : Type u\nf : Id (α✝ → β✝)\nx : Id α✝\n⊢ pure (Seq.seq f fun x_1 => x) = Seq.seq (pure f) fun x_1 => pure x\n[PROOFSTEP]\nsimp only [map_pure, seq_pure]\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf✝ : β → γ\nα✝ β✝ : Type u\nf : Id (α✝ → β✝)\nx : Id α✝\n⊢ pure (Seq.seq f fun x_1 => x) = pure (f x)\n[PROOFSTEP]\nrfl\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx✝ : t β\nx : t α\n⊢ map f <$> traverse g x = traverse (map f ∘ g) x\n[PROOFSTEP]\nrw [map_eq_traverse_id f]\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx✝ : t β\nx : t α\n⊢ traverse (pure ∘ f) <$> traverse g x = traverse (map f ∘ g) x\n[PROOFSTEP]\nrefine' (comp_traverse (pure ∘ f) g x).symm.trans _\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx✝ : t β\nx : t α\n⊢ traverse (Comp.mk ∘ map (pure ∘ f) ∘ g) x = traverse (map f ∘ g) x\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_4.h\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx✝ : t β\nx : t α\n⊢ Comp.instApplicativeComp = inst✝³\n[PROOFSTEP]\napply Comp.applicative_comp_id\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng✝ : α → F β\nh : β → G γ\nf✝ : β → γ\nx✝ : t β\nf : β → F γ\ng : α → β\nx : t α\n⊢ traverse f (g <$> x) = traverse (f ∘ g) x\n[PROOFSTEP]\nrw [@map_eq_traverse_id t _ _ _ _ g]\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng✝ : α → F β\nh : β → G γ\nf✝ : β → γ\nx✝ : t β\nf : β → F γ\ng : α → β\nx : t α\n⊢ traverse f (traverse (pure ∘ g) x) = traverse (f ∘ g) x\n[PROOFSTEP]\nrefine' (comp_traverse (G := Id) f (pure ∘ g) x).symm.trans _\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng✝ : α → F β\nh : β → G γ\nf✝ : β → γ\nx✝ : t β\nf : β → F γ\ng : α → β\nx : t α\n⊢ traverse (Comp.mk ∘ map f ∘ pure ∘ g) x = traverse (f ∘ g) x\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_4.h\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng✝ : α → F β\nh : β → G γ\nf✝ : β → γ\nx✝ : t β\nf : β → F γ\ng : α → β\nx : t α\n⊢ Comp.instApplicativeComp = inst✝³\n[PROOFSTEP]\napply Comp.applicative_id_comp\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx✝ : t β\nx : t α\n⊢ traverse pure x = pure x\n[PROOFSTEP]\nhave : traverse pure x = pure (traverse (m := Id) pure x) := (naturality (PureTransformation F) pure x).symm\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx✝ : t β\nx : t α\nthis : traverse pure x = pure (traverse pure x)\n⊢ traverse pure x = pure x\n[PROOFSTEP]\nrwa [id_traverse] at this \n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx✝ : t β\nx : t α\n⊢ sequence (pure <$> x) = pure x\n[PROOFSTEP]\nsimp [sequence, traverse_map, id_traverse]\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx✝ : t β\nx : t (F (G α))\n⊢ sequence (Comp.mk <$> x) = Comp.mk (sequence <$> sequence x)\n[PROOFSTEP]\nsimp [sequence, traverse_map]\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx✝ : t β\nx : t (F (G α))\n⊢ traverse Comp.mk x = Comp.mk (traverse id <$> traverse id x)\n[PROOFSTEP]\nrw [← comp_traverse]\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx✝ : t β\nx : t (F (G α))\n⊢ traverse Comp.mk x = traverse (Comp.mk ∘ map id ∘ id) x\n[PROOFSTEP]\nsimp [map_id]\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx✝ : t β\nη : ApplicativeTransformation F G\nx : t (F α)\n⊢ (fun {α} => ApplicativeTransformation.app η α) (sequence x) =\n    sequence ((fun {α} => ApplicativeTransformation.app η α) <$> x)\n[PROOFSTEP]\nsimp [sequence, naturality, traverse_map]\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx : t β\n⊢ traverse pure = pure\n[PROOFSTEP]\next\n[GOAL]\ncase h\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf : β → γ\nx : t β\nx✝ : t α\n⊢ traverse pure x✝ = pure x✝\n[PROOFSTEP]\nexact id_traverse _\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng✝ : α → F β\nh✝ : β → G γ\nf : β → γ\nx : t β\ng : α → F β\nh : β → G γ\n⊢ traverse (Comp.mk ∘ map h ∘ g) = Comp.mk ∘ map (traverse h) ∘ traverse g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng✝ : α → F β\nh✝ : β → G γ\nf : β → γ\nx : t β\ng : α → F β\nh : β → G γ\nx✝ : t α\n⊢ traverse (Comp.mk ∘ map h ∘ g) x✝ = (Comp.mk ∘ map (traverse h) ∘ traverse g) x✝\n[PROOFSTEP]\nexact comp_traverse _ _ _\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf✝ : β → γ\nx : t β\nf : β → γ\n⊢ traverse (pure ∘ f) = pure ∘ map f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf✝ : β → γ\nx : t β\nf : β → γ\nx✝ : t β\n⊢ traverse (pure ∘ f) x✝ = (pure ∘ map f) x✝\n[PROOFSTEP]\nexact traverse_eq_map_id _ _\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng✝ : α → F β\nh✝ : β → G γ\nf : β → γ\nx : t β\ng : α → β\nh : β → G γ\n⊢ traverse (h ∘ g) = traverse h ∘ map g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng✝ : α → F β\nh✝ : β → G γ\nf : β → γ\nx : t β\ng : α → β\nh : β → G γ\nx✝ : t α\n⊢ traverse (h ∘ g) x✝ = (traverse h ∘ map g) x✝\n[PROOFSTEP]\nrw [comp_apply, traverse_map]\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng✝ : α → F β\nh✝ : β → G γ\nf : β → γ\nx : t β\ng : α → G β\nh : β → γ\n⊢ traverse (map h ∘ g) = map (map h) ∘ traverse g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng✝ : α → F β\nh✝ : β → G γ\nf : β → γ\nx : t β\ng : α → G β\nh : β → γ\nx✝ : t α\n⊢ traverse (map h ∘ g) x✝ = (map (map h) ∘ traverse g) x✝\n[PROOFSTEP]\nrw [comp_apply, map_traverse]\n[GOAL]\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf✝ : β → γ\nx : t β\nη : ApplicativeTransformation F G\nf : α → F β\n⊢ traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) =\n    (fun {α} => ApplicativeTransformation.app η α) ∘ traverse f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nt : Type u → Type u\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\nF G : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : LawfulApplicative F\ninst✝¹ : Applicative G\ninst✝ : LawfulApplicative G\nα β γ : Type u\ng : α → F β\nh : β → G γ\nf✝ : β → γ\nx : t β\nη : ApplicativeTransformation F G\nf : α → F β\nx✝ : t α\n⊢ traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) x✝ =\n    ((fun {α} => ApplicativeTransformation.app η α) ∘ traverse f) x✝\n[PROOFSTEP]\nrw [comp_apply, naturality]\n", "meta": {"mathlib_filename": "Mathlib.Control.Traversable.Lemmas", "llama_tokens": 5678, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6150878414043814, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.35988860594207756}}
{"text": "[GOAL]\nι : Type u\nX : Type v\ninst✝⁴ : TopologicalSpace X\nE : Type u_1\ninst✝³ : AddCommMonoid E\ninst✝² : SMulWithZero ℝ E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set X\nf✝ f g : PartitionOfUnity ι X s\nh : f.toFun = g.toFun\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nι : Type u\nX : Type v\ninst✝⁴ : TopologicalSpace X\nE : Type u_1\ninst✝³ : AddCommMonoid E\ninst✝² : SMulWithZero ℝ E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set X\nf g : PartitionOfUnity ι X s\ntoFun✝ : ι → C(X, ℝ)\nlocallyFinite'✝ : LocallyFinite fun i => support ↑(toFun✝ i)\nnonneg'✝ : 0 ≤ toFun✝\nsum_eq_one'✝ : ∀ (x : X), x ∈ s → ∑ᶠ (i : ι), ↑(toFun✝ i) x = 1\nsum_le_one'✝ : ∀ (x : X), ∑ᶠ (i : ι), ↑(toFun✝ i) x ≤ 1\nh : (mk s toFun✝ locallyFinite'✝ nonneg'✝ sum_eq_one'✝ sum_le_one'✝).toFun = g.toFun\n⊢ mk s toFun✝ locallyFinite'✝ nonneg'✝ sum_eq_one'✝ sum_le_one'✝ = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nι : Type u\nX : Type v\ninst✝⁴ : TopologicalSpace X\nE : Type u_1\ninst✝³ : AddCommMonoid E\ninst✝² : SMulWithZero ℝ E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set X\nf : PartitionOfUnity ι X s\ntoFun✝¹ : ι → C(X, ℝ)\nlocallyFinite'✝¹ : LocallyFinite fun i => support ↑(toFun✝¹ i)\nnonneg'✝¹ : 0 ≤ toFun✝¹\nsum_eq_one'✝¹ : ∀ (x : X), x ∈ s → ∑ᶠ (i : ι), ↑(toFun✝¹ i) x = 1\nsum_le_one'✝¹ : ∀ (x : X), ∑ᶠ (i : ι), ↑(toFun✝¹ i) x ≤ 1\ntoFun✝ : ι → C(X, ℝ)\nlocallyFinite'✝ : LocallyFinite fun i => support ↑(toFun✝ i)\nnonneg'✝ : 0 ≤ toFun✝\nsum_eq_one'✝ : ∀ (x : X), x ∈ s → ∑ᶠ (i : ι), ↑(toFun✝ i) x = 1\nsum_le_one'✝ : ∀ (x : X), ∑ᶠ (i : ι), ↑(toFun✝ i) x ≤ 1\nh :\n  (mk s toFun✝¹ locallyFinite'✝¹ nonneg'✝¹ sum_eq_one'✝¹ sum_le_one'✝¹).toFun =\n    (mk s toFun✝ locallyFinite'✝ nonneg'✝ sum_eq_one'✝ sum_le_one'✝).toFun\n⊢ mk s toFun✝¹ locallyFinite'✝¹ nonneg'✝¹ sum_eq_one'✝¹ sum_le_one'✝¹ =\n    mk s toFun✝ locallyFinite'✝ nonneg'✝ sum_eq_one'✝ sum_le_one'✝\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u\nX : Type v\ninst✝⁴ : TopologicalSpace X\nE : Type u_1\ninst✝³ : AddCommMonoid E\ninst✝² : SMulWithZero ℝ E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set X\nf : PartitionOfUnity ι X s\nx : X\nhx : x ∈ s\n⊢ ∃ i, 0 < ↑(↑f i) x\n[PROOFSTEP]\nhave H := f.sum_eq_one hx\n[GOAL]\nι : Type u\nX : Type v\ninst✝⁴ : TopologicalSpace X\nE : Type u_1\ninst✝³ : AddCommMonoid E\ninst✝² : SMulWithZero ℝ E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set X\nf : PartitionOfUnity ι X s\nx : X\nhx : x ∈ s\nH : ∑ᶠ (i : ι), ↑(↑f i) x = 1\n⊢ ∃ i, 0 < ↑(↑f i) x\n[PROOFSTEP]\ncontrapose! H\n[GOAL]\nι : Type u\nX : Type v\ninst✝⁴ : TopologicalSpace X\nE : Type u_1\ninst✝³ : AddCommMonoid E\ninst✝² : SMulWithZero ℝ E\ninst✝¹ : TopologicalSpace E\ninst✝ : ContinuousSMul ℝ E\ns : Set X\nf : PartitionOfUnity ι X s\nx : X\nhx : x ∈ s\nH : ∀ (i : ι), ↑(↑f i) x ≤ 0\n⊢ ∑ᶠ (i : ι), ↑(↑f i) x ≠ 1\n[PROOFSTEP]\nsimpa only [fun i => (H i).antisymm (f.nonneg i x), finsum_zero] using zero_ne_one\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf✝ f g : BumpCovering ι X s\nh : f.toFun = g.toFun\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf g : BumpCovering ι X s\ntoFun✝ : ι → C(X, ℝ)\nlocallyFinite'✝ : LocallyFinite fun i => support ↑(toFun✝ i)\nnonneg'✝ : 0 ≤ toFun✝\nle_one'✝ : toFun✝ ≤ 1\neventuallyEq_one'✝ : ∀ (x : X), x ∈ s → ∃ i, ↑(toFun✝ i) =ᶠ[𝓝 x] 1\nh : (mk s toFun✝ locallyFinite'✝ nonneg'✝ le_one'✝ eventuallyEq_one'✝).toFun = g.toFun\n⊢ mk s toFun✝ locallyFinite'✝ nonneg'✝ le_one'✝ eventuallyEq_one'✝ = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ntoFun✝¹ : ι → C(X, ℝ)\nlocallyFinite'✝¹ : LocallyFinite fun i => support ↑(toFun✝¹ i)\nnonneg'✝¹ : 0 ≤ toFun✝¹\nle_one'✝¹ : toFun✝¹ ≤ 1\neventuallyEq_one'✝¹ : ∀ (x : X), x ∈ s → ∃ i, ↑(toFun✝¹ i) =ᶠ[𝓝 x] 1\ntoFun✝ : ι → C(X, ℝ)\nlocallyFinite'✝ : LocallyFinite fun i => support ↑(toFun✝ i)\nnonneg'✝ : 0 ≤ toFun✝\nle_one'✝ : toFun✝ ≤ 1\neventuallyEq_one'✝ : ∀ (x : X), x ∈ s → ∃ i, ↑(toFun✝ i) =ᶠ[𝓝 x] 1\nh :\n  (mk s toFun✝¹ locallyFinite'✝¹ nonneg'✝¹ le_one'✝¹ eventuallyEq_one'✝¹).toFun =\n    (mk s toFun✝ locallyFinite'✝ nonneg'✝ le_one'✝ eventuallyEq_one'✝).toFun\n⊢ mk s toFun✝¹ locallyFinite'✝¹ nonneg'✝¹ le_one'✝¹ eventuallyEq_one'✝¹ =\n    mk s toFun✝ locallyFinite'✝ nonneg'✝ le_one'✝ eventuallyEq_one'✝\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\ni : ι\ns : Set X\nx : X\n⊢ ∃ t, t ∈ 𝓝 x ∧ Set.Finite {i_1 | Set.Nonempty ((fun i_2 => support ↑(Pi.single i 1 i_2)) i_1 ∩ t)}\n[PROOFSTEP]\nrefine' ⟨univ, univ_mem, (finite_singleton i).subset _⟩\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\ni : ι\ns : Set X\nx : X\n⊢ {i_1 | Set.Nonempty ((fun i_2 => support ↑(Pi.single i 1 i_2)) i_1 ∩ univ)} ⊆ {i}\n[PROOFSTEP]\nrintro j ⟨x, hx, -⟩\n[GOAL]\ncase intro.intro\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\ni : ι\ns : Set X\nx✝ : X\nj : ι\nx : X\nhx : x ∈ (fun i_1 => support ↑(Pi.single i 1 i_1)) j\n⊢ j ∈ {i}\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase intro.intro\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\ni : ι\ns : Set X\nx✝ : X\nj : ι\nx : X\nhx : ¬j ∈ {i}\n⊢ ¬x ∈ support ↑(Pi.single i 1 j)\n[PROOFSTEP]\nrw [mem_singleton_iff] at hx \n[GOAL]\ncase intro.intro\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\ni : ι\ns : Set X\nx✝ : X\nj : ι\nx : X\nhx : ¬j = i\n⊢ ¬x ∈ support ↑(Pi.single i 1 j)\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\ni : ι\ns : Set X\nx : X\nx✝ : x ∈ s\n⊢ ↑(Pi.single i 1 i) =ᶠ[𝓝 x] 1\n[PROOFSTEP]\nrw [Pi.single_eq_same, ContinuousMap.coe_one]\n[GOAL]\nι : Type u\nX : Type v\ninst✝¹ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ninst✝ : NormalSpace X\np : (X → ℝ) → Prop\nh01 :\n  ∀ (s t : Set X),\n    IsClosed s → IsClosed t → Disjoint s t → ∃ f, p ↑f ∧ EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhf : LocallyFinite U\nhU : s ⊆ ⋃ (i : ι), U i\n⊢ ∃ f, (∀ (i : ι), p ↑(↑f i)) ∧ IsSubordinate f U\n[PROOFSTEP]\nrcases exists_subset_iUnion_closure_subset hs ho (fun x _ => hf.point_finite x) hU with ⟨V, hsV, hVo, hVU⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u\nX : Type v\ninst✝¹ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ninst✝ : NormalSpace X\np : (X → ℝ) → Prop\nh01 :\n  ∀ (s t : Set X),\n    IsClosed s → IsClosed t → Disjoint s t → ∃ f, p ↑f ∧ EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhf : LocallyFinite U\nhU : s ⊆ ⋃ (i : ι), U i\nV : ι → Set X\nhsV : s ⊆ iUnion V\nhVo : ∀ (i : ι), IsOpen (V i)\nhVU : ∀ (i : ι), closure (V i) ⊆ U i\n⊢ ∃ f, (∀ (i : ι), p ↑(↑f i)) ∧ IsSubordinate f U\n[PROOFSTEP]\nhave hVU' : ∀ i, V i ⊆ U i := fun i => Subset.trans subset_closure (hVU i)\n[GOAL]\ncase intro.intro.intro\nι : Type u\nX : Type v\ninst✝¹ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ninst✝ : NormalSpace X\np : (X → ℝ) → Prop\nh01 :\n  ∀ (s t : Set X),\n    IsClosed s → IsClosed t → Disjoint s t → ∃ f, p ↑f ∧ EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhf : LocallyFinite U\nhU : s ⊆ ⋃ (i : ι), U i\nV : ι → Set X\nhsV : s ⊆ iUnion V\nhVo : ∀ (i : ι), IsOpen (V i)\nhVU : ∀ (i : ι), closure (V i) ⊆ U i\nhVU' : ∀ (i : ι), V i ⊆ U i\n⊢ ∃ f, (∀ (i : ι), p ↑(↑f i)) ∧ IsSubordinate f U\n[PROOFSTEP]\nrcases exists_subset_iUnion_closure_subset hs hVo (fun x _ => (hf.subset hVU').point_finite x) hsV with\n  ⟨W, hsW, hWo, hWV⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nι : Type u\nX : Type v\ninst✝¹ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ninst✝ : NormalSpace X\np : (X → ℝ) → Prop\nh01 :\n  ∀ (s t : Set X),\n    IsClosed s → IsClosed t → Disjoint s t → ∃ f, p ↑f ∧ EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhf : LocallyFinite U\nhU : s ⊆ ⋃ (i : ι), U i\nV : ι → Set X\nhsV : s ⊆ iUnion V\nhVo : ∀ (i : ι), IsOpen (V i)\nhVU : ∀ (i : ι), closure (V i) ⊆ U i\nhVU' : ∀ (i : ι), V i ⊆ U i\nW : ι → Set X\nhsW : s ⊆ iUnion W\nhWo : ∀ (i : ι), IsOpen (W i)\nhWV : ∀ (i : ι), closure (W i) ⊆ V i\n⊢ ∃ f, (∀ (i : ι), p ↑(↑f i)) ∧ IsSubordinate f U\n[PROOFSTEP]\nchoose f hfp hf0 hf1 hf01 using fun i =>\n  h01 _ _ (isClosed_compl_iff.2 <| hVo i) isClosed_closure (disjoint_right.2 fun x hx => Classical.not_not.2 (hWV i hx))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nι : Type u\nX : Type v\ninst✝¹ : TopologicalSpace X\ns : Set X\nf✝ : BumpCovering ι X s\ninst✝ : NormalSpace X\np : (X → ℝ) → Prop\nh01 :\n  ∀ (s t : Set X),\n    IsClosed s → IsClosed t → Disjoint s t → ∃ f, p ↑f ∧ EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhf : LocallyFinite U\nhU : s ⊆ ⋃ (i : ι), U i\nV : ι → Set X\nhsV : s ⊆ iUnion V\nhVo : ∀ (i : ι), IsOpen (V i)\nhVU : ∀ (i : ι), closure (V i) ⊆ U i\nhVU' : ∀ (i : ι), V i ⊆ U i\nW : ι → Set X\nhsW : s ⊆ iUnion W\nhWo : ∀ (i : ι), IsOpen (W i)\nhWV : ∀ (i : ι), closure (W i) ⊆ V i\nf : ι → C(X, ℝ)\nhfp : ∀ (i : ι), p ↑(f i)\nhf0 : ∀ (i : ι), EqOn (↑(f i)) 0 (V i)ᶜ\nhf1 : ∀ (i : ι), EqOn (↑(f i)) 1 (closure (W i))\nhf01 : ∀ (i : ι) (x : X), ↑(f i) x ∈ Icc 0 1\n⊢ ∃ f, (∀ (i : ι), p ↑(↑f i)) ∧ IsSubordinate f U\n[PROOFSTEP]\nhave hsupp : ∀ i, support (f i) ⊆ V i := fun i => support_subset_iff'.2 (hf0 i)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nι : Type u\nX : Type v\ninst✝¹ : TopologicalSpace X\ns : Set X\nf✝ : BumpCovering ι X s\ninst✝ : NormalSpace X\np : (X → ℝ) → Prop\nh01 :\n  ∀ (s t : Set X),\n    IsClosed s → IsClosed t → Disjoint s t → ∃ f, p ↑f ∧ EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhf : LocallyFinite U\nhU : s ⊆ ⋃ (i : ι), U i\nV : ι → Set X\nhsV : s ⊆ iUnion V\nhVo : ∀ (i : ι), IsOpen (V i)\nhVU : ∀ (i : ι), closure (V i) ⊆ U i\nhVU' : ∀ (i : ι), V i ⊆ U i\nW : ι → Set X\nhsW : s ⊆ iUnion W\nhWo : ∀ (i : ι), IsOpen (W i)\nhWV : ∀ (i : ι), closure (W i) ⊆ V i\nf : ι → C(X, ℝ)\nhfp : ∀ (i : ι), p ↑(f i)\nhf0 : ∀ (i : ι), EqOn (↑(f i)) 0 (V i)ᶜ\nhf1 : ∀ (i : ι), EqOn (↑(f i)) 1 (closure (W i))\nhf01 : ∀ (i : ι) (x : X), ↑(f i) x ∈ Icc 0 1\nhsupp : ∀ (i : ι), support ↑(f i) ⊆ V i\n⊢ ∃ f, (∀ (i : ι), p ↑(↑f i)) ∧ IsSubordinate f U\n[PROOFSTEP]\nrefine'\n  ⟨⟨f, hf.subset fun i => Subset.trans (hsupp i) (hVU' i), fun i x => (hf01 i x).1, fun i x => (hf01 i x).2, fun x hx =>\n      _⟩,\n    hfp, fun i => Subset.trans (closure_mono (hsupp i)) (hVU i)⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nι : Type u\nX : Type v\ninst✝¹ : TopologicalSpace X\ns : Set X\nf✝ : BumpCovering ι X s\ninst✝ : NormalSpace X\np : (X → ℝ) → Prop\nh01 :\n  ∀ (s t : Set X),\n    IsClosed s → IsClosed t → Disjoint s t → ∃ f, p ↑f ∧ EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhf : LocallyFinite U\nhU : s ⊆ ⋃ (i : ι), U i\nV : ι → Set X\nhsV : s ⊆ iUnion V\nhVo : ∀ (i : ι), IsOpen (V i)\nhVU : ∀ (i : ι), closure (V i) ⊆ U i\nhVU' : ∀ (i : ι), V i ⊆ U i\nW : ι → Set X\nhsW : s ⊆ iUnion W\nhWo : ∀ (i : ι), IsOpen (W i)\nhWV : ∀ (i : ι), closure (W i) ⊆ V i\nf : ι → C(X, ℝ)\nhfp : ∀ (i : ι), p ↑(f i)\nhf0 : ∀ (i : ι), EqOn (↑(f i)) 0 (V i)ᶜ\nhf1 : ∀ (i : ι), EqOn (↑(f i)) 1 (closure (W i))\nhf01 : ∀ (i : ι) (x : X), ↑(f i) x ∈ Icc 0 1\nhsupp : ∀ (i : ι), support ↑(f i) ⊆ V i\nx : X\nhx : x ∈ s\n⊢ ∃ i, ↑(f i) =ᶠ[𝓝 x] 1\n[PROOFSTEP]\nrcases mem_iUnion.1 (hsW hx) with ⟨i, hi⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nι : Type u\nX : Type v\ninst✝¹ : TopologicalSpace X\ns : Set X\nf✝ : BumpCovering ι X s\ninst✝ : NormalSpace X\np : (X → ℝ) → Prop\nh01 :\n  ∀ (s t : Set X),\n    IsClosed s → IsClosed t → Disjoint s t → ∃ f, p ↑f ∧ EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhf : LocallyFinite U\nhU : s ⊆ ⋃ (i : ι), U i\nV : ι → Set X\nhsV : s ⊆ iUnion V\nhVo : ∀ (i : ι), IsOpen (V i)\nhVU : ∀ (i : ι), closure (V i) ⊆ U i\nhVU' : ∀ (i : ι), V i ⊆ U i\nW : ι → Set X\nhsW : s ⊆ iUnion W\nhWo : ∀ (i : ι), IsOpen (W i)\nhWV : ∀ (i : ι), closure (W i) ⊆ V i\nf : ι → C(X, ℝ)\nhfp : ∀ (i : ι), p ↑(f i)\nhf0 : ∀ (i : ι), EqOn (↑(f i)) 0 (V i)ᶜ\nhf1 : ∀ (i : ι), EqOn (↑(f i)) 1 (closure (W i))\nhf01 : ∀ (i : ι) (x : X), ↑(f i) x ∈ Icc 0 1\nhsupp : ∀ (i : ι), support ↑(f i) ⊆ V i\nx : X\nhx : x ∈ s\ni : ι\nhi : x ∈ W i\n⊢ ∃ i, ↑(f i) =ᶠ[𝓝 x] 1\n[PROOFSTEP]\nexact ⟨i, ((hf1 i).mono subset_closure).eventuallyEq_of_mem ((hWo i).mem_nhds hi)⟩\n[GOAL]\nι : Type u\nX : Type v\ninst✝² : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ninst✝¹ : NormalSpace X\ninst✝ : ParacompactSpace X\np : (X → ℝ) → Prop\nh01 :\n  ∀ (s t : Set X),\n    IsClosed s → IsClosed t → Disjoint s t → ∃ f, p ↑f ∧ EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhU : s ⊆ ⋃ (i : ι), U i\n⊢ ∃ f, (∀ (i : ι), p ↑(↑f i)) ∧ IsSubordinate f U\n[PROOFSTEP]\nrcases precise_refinement_set hs _ ho hU with ⟨V, hVo, hsV, hVf, hVU⟩\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u\nX : Type v\ninst✝² : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ninst✝¹ : NormalSpace X\ninst✝ : ParacompactSpace X\np : (X → ℝ) → Prop\nh01 :\n  ∀ (s t : Set X),\n    IsClosed s → IsClosed t → Disjoint s t → ∃ f, p ↑f ∧ EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhU : s ⊆ ⋃ (i : ι), U i\nV : ι → Set X\nhVo : ∀ (i : ι), IsOpen (V i)\nhsV : s ⊆ ⋃ (i : ι), V i\nhVf : LocallyFinite V\nhVU : ∀ (i : ι), V i ⊆ U i\n⊢ ∃ f, (∀ (i : ι), p ↑(↑f i)) ∧ IsSubordinate f U\n[PROOFSTEP]\nrcases exists_isSubordinate_of_locallyFinite_of_prop p h01 hs V hVo hVf hsV with ⟨f, hfp, hf⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nι : Type u\nX : Type v\ninst✝² : TopologicalSpace X\ns : Set X\nf✝ : BumpCovering ι X s\ninst✝¹ : NormalSpace X\ninst✝ : ParacompactSpace X\np : (X → ℝ) → Prop\nh01 :\n  ∀ (s t : Set X),\n    IsClosed s → IsClosed t → Disjoint s t → ∃ f, p ↑f ∧ EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhU : s ⊆ ⋃ (i : ι), U i\nV : ι → Set X\nhVo : ∀ (i : ι), IsOpen (V i)\nhsV : s ⊆ ⋃ (i : ι), V i\nhVf : LocallyFinite V\nhVU : ∀ (i : ι), V i ⊆ U i\nf : BumpCovering ι X s\nhfp : ∀ (i : ι), p ↑(↑f i)\nhf : IsSubordinate f V\n⊢ ∃ f, (∀ (i : ι), p ↑(↑f i)) ∧ IsSubordinate f U\n[PROOFSTEP]\nexact ⟨f, hfp, hf.mono hVU⟩\n[GOAL]\nι : Type u\nX : Type v\ninst✝² : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ninst✝¹ : NormalSpace X\ninst✝ : ParacompactSpace X\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhU : s ⊆ ⋃ (i : ι), U i\n⊢ ∃ f, IsSubordinate f U\n[PROOFSTEP]\nrcases precise_refinement_set hs _ ho hU with ⟨V, hVo, hsV, hVf, hVU⟩\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u\nX : Type v\ninst✝² : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ninst✝¹ : NormalSpace X\ninst✝ : ParacompactSpace X\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhU : s ⊆ ⋃ (i : ι), U i\nV : ι → Set X\nhVo : ∀ (i : ι), IsOpen (V i)\nhsV : s ⊆ ⋃ (i : ι), V i\nhVf : LocallyFinite V\nhVU : ∀ (i : ι), V i ⊆ U i\n⊢ ∃ f, IsSubordinate f U\n[PROOFSTEP]\nrcases exists_isSubordinate_of_locallyFinite hs V hVo hVf hsV with ⟨f, hf⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nX : Type v\ninst✝² : TopologicalSpace X\ns : Set X\nf✝ : BumpCovering ι X s\ninst✝¹ : NormalSpace X\ninst✝ : ParacompactSpace X\nhs : IsClosed s\nU : ι → Set X\nho : ∀ (i : ι), IsOpen (U i)\nhU : s ⊆ ⋃ (i : ι), U i\nV : ι → Set X\nhVo : ∀ (i : ι), IsOpen (V i)\nhsV : s ⊆ ⋃ (i : ι), V i\nhVf : LocallyFinite V\nhVU : ∀ (i : ι), V i ⊆ U i\nf : BumpCovering ι X s\nhf : IsSubordinate f V\n⊢ ∃ f, IsSubordinate f U\n[PROOFSTEP]\nexact ⟨f, hf.mono hVU⟩\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\nx : X\nh : ↑(↑f i) x = 0\n⊢ toPOUFun f i x = 0\n[PROOFSTEP]\nrw [toPOUFun, h, zero_mul]\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\nx : X\nt : Finset ι\nht : ∀ (j : ι), WellOrderingRel j i → ↑(↑f j) x ≠ 0 → j ∈ t\n⊢ toPOUFun f i x = ↑(↑f i) x * ∏ j in Finset.filter (fun j => WellOrderingRel j i) t, (1 - ↑(↑f j) x)\n[PROOFSTEP]\nrefine' congr_arg _ (finprod_cond_eq_prod_of_cond_iff _ fun {j} hj => _)\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\nx : X\nt : Finset ι\nht : ∀ (j : ι), WellOrderingRel j i → ↑(↑f j) x ≠ 0 → j ∈ t\nj : ι\nhj : 1 - ↑(↑f j) x ≠ 1\n⊢ WellOrderingRel j i ↔ j ∈ Finset.filter (fun j => WellOrderingRel j i) t\n[PROOFSTEP]\nrw [Ne.def, sub_eq_self] at hj \n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\nx : X\nt : Finset ι\nht : ∀ (j : ι), WellOrderingRel j i → ↑(↑f j) x ≠ 0 → j ∈ t\nj : ι\nhj : ¬↑(↑f j) x = 0\n⊢ WellOrderingRel j i ↔ j ∈ Finset.filter (fun j => WellOrderingRel j i) t\n[PROOFSTEP]\nrw [Finset.mem_filter, Iff.comm, and_iff_right_iff_imp]\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\nx : X\nt : Finset ι\nht : ∀ (j : ι), WellOrderingRel j i → ↑(↑f j) x ≠ 0 → j ∈ t\nj : ι\nhj : ¬↑(↑f j) x = 0\n⊢ WellOrderingRel j i → j ∈ t\n[PROOFSTEP]\nexact flip (ht j) hj\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\nx : X\n⊢ ∑ᶠ (i : ι), toPOUFun f i x = 1 - ∏ᶠ (i : ι), (1 - ↑(↑f i) x)\n[PROOFSTEP]\nset s := (f.point_finite x).toFinset\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\nx : X\ns : Finset ι := Finite.toFinset (_ : Set.Finite {i | ↑(↑f i) x ≠ 0})\n⊢ ∑ᶠ (i : ι), toPOUFun f i x = 1 - ∏ᶠ (i : ι), (1 - ↑(↑f i) x)\n[PROOFSTEP]\nhave hs : (s : Set ι) = {i | f i x ≠ 0} := Finite.coe_toFinset _\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\nx : X\ns : Finset ι := Finite.toFinset (_ : Set.Finite {i | ↑(↑f i) x ≠ 0})\nhs : ↑s = {i | ↑(↑f i) x ≠ 0}\n⊢ ∑ᶠ (i : ι), toPOUFun f i x = 1 - ∏ᶠ (i : ι), (1 - ↑(↑f i) x)\n[PROOFSTEP]\nhave A : (support fun i => toPOUFun f i x) ⊆ s := by\n  rw [hs]\n  exact fun i hi => f.support_toPOUFun_subset i hi\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\nx : X\ns : Finset ι := Finite.toFinset (_ : Set.Finite {i | ↑(↑f i) x ≠ 0})\nhs : ↑s = {i | ↑(↑f i) x ≠ 0}\n⊢ (support fun i => toPOUFun f i x) ⊆ ↑s\n[PROOFSTEP]\nrw [hs]\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\nx : X\ns : Finset ι := Finite.toFinset (_ : Set.Finite {i | ↑(↑f i) x ≠ 0})\nhs : ↑s = {i | ↑(↑f i) x ≠ 0}\n⊢ (support fun i => toPOUFun f i x) ⊆ {i | ↑(↑f i) x ≠ 0}\n[PROOFSTEP]\nexact fun i hi => f.support_toPOUFun_subset i hi\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\nx : X\ns : Finset ι := Finite.toFinset (_ : Set.Finite {i | ↑(↑f i) x ≠ 0})\nhs : ↑s = {i | ↑(↑f i) x ≠ 0}\nA : (support fun i => toPOUFun f i x) ⊆ ↑s\n⊢ ∑ᶠ (i : ι), toPOUFun f i x = 1 - ∏ᶠ (i : ι), (1 - ↑(↑f i) x)\n[PROOFSTEP]\nhave B : (mulSupport fun i => 1 - f i x) ⊆ s :=\n  by\n  rw [hs, mulSupport_one_sub]\n  exact fun i => id\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\nx : X\ns : Finset ι := Finite.toFinset (_ : Set.Finite {i | ↑(↑f i) x ≠ 0})\nhs : ↑s = {i | ↑(↑f i) x ≠ 0}\nA : (support fun i => toPOUFun f i x) ⊆ ↑s\n⊢ (mulSupport fun i => 1 - ↑(↑f i) x) ⊆ ↑s\n[PROOFSTEP]\nrw [hs, mulSupport_one_sub]\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\nx : X\ns : Finset ι := Finite.toFinset (_ : Set.Finite {i | ↑(↑f i) x ≠ 0})\nhs : ↑s = {i | ↑(↑f i) x ≠ 0}\nA : (support fun i => toPOUFun f i x) ⊆ ↑s\n⊢ (support fun i => ↑(↑f i) x) ⊆ {i | ↑(↑f i) x ≠ 0}\n[PROOFSTEP]\nexact fun i => id\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\nx : X\ns : Finset ι := Finite.toFinset (_ : Set.Finite {i | ↑(↑f i) x ≠ 0})\nhs : ↑s = {i | ↑(↑f i) x ≠ 0}\nA : (support fun i => toPOUFun f i x) ⊆ ↑s\nB : (mulSupport fun i => 1 - ↑(↑f i) x) ⊆ ↑s\n⊢ ∑ᶠ (i : ι), toPOUFun f i x = 1 - ∏ᶠ (i : ι), (1 - ↑(↑f i) x)\n[PROOFSTEP]\nletI : LinearOrder ι := linearOrderOfSTO WellOrderingRel\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\nx : X\ns : Finset ι := Finite.toFinset (_ : Set.Finite {i | ↑(↑f i) x ≠ 0})\nhs : ↑s = {i | ↑(↑f i) x ≠ 0}\nA : (support fun i => toPOUFun f i x) ⊆ ↑s\nB : (mulSupport fun i => 1 - ↑(↑f i) x) ⊆ ↑s\nthis : LinearOrder ι := linearOrderOfSTO WellOrderingRel\n⊢ ∑ᶠ (i : ι), toPOUFun f i x = 1 - ∏ᶠ (i : ι), (1 - ↑(↑f i) x)\n[PROOFSTEP]\nrw [finsum_eq_sum_of_support_subset _ A, finprod_eq_prod_of_mulSupport_subset _ B, Finset.prod_one_sub_ordered,\n  sub_sub_cancel]\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\nx : X\ns : Finset ι := Finite.toFinset (_ : Set.Finite {i | ↑(↑f i) x ≠ 0})\nhs : ↑s = {i | ↑(↑f i) x ≠ 0}\nA : (support fun i => toPOUFun f i x) ⊆ ↑s\nB : (mulSupport fun i => 1 - ↑(↑f i) x) ⊆ ↑s\nthis : LinearOrder ι := linearOrderOfSTO WellOrderingRel\n⊢ ∑ i in s, toPOUFun f i x = ∑ i in s, ↑(↑f i) x * ∏ j in Finset.filter (fun x => x < i) s, (1 - ↑(↑f j) x)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun i _ => _\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\nx : X\ns : Finset ι := Finite.toFinset (_ : Set.Finite {i | ↑(↑f i) x ≠ 0})\nhs : ↑s = {i | ↑(↑f i) x ≠ 0}\nA : (support fun i => toPOUFun f i x) ⊆ ↑s\nB : (mulSupport fun i => 1 - ↑(↑f i) x) ⊆ ↑s\nthis : LinearOrder ι := linearOrderOfSTO WellOrderingRel\ni : ι\nx✝ : i ∈ s\n⊢ toPOUFun f i x = ↑(↑f i) x * ∏ j in Finset.filter (fun x => x < i) s, (1 - ↑(↑f j) x)\n[PROOFSTEP]\nconvert f.toPOUFun_eq_mul_prod _ _ _ fun j _ hj => _\n[GOAL]\ncase convert_4\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns✝ : Set X\nf : BumpCovering ι X s✝\nx : X\ns : Finset ι := Finite.toFinset (_ : Set.Finite {i | ↑(↑f i) x ≠ 0})\nhs : ↑s = {i | ↑(↑f i) x ≠ 0}\nA : (support fun i => toPOUFun f i x) ⊆ ↑s\nB : (mulSupport fun i => 1 - ↑(↑f i) x) ⊆ ↑s\nthis : LinearOrder ι := linearOrderOfSTO WellOrderingRel\ni : ι\nx✝¹ : i ∈ s\nj : ι\nx✝ : WellOrderingRel j i\nhj : ↑(↑f j) x ≠ 0\n⊢ j ∈ s\n[PROOFSTEP]\nrwa [Finite.mem_toFinset]\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\nx : X\n⊢ ∃ t, toPOUFun f i =ᶠ[𝓝 x] ↑(↑f i) * ↑(∏ j in Finset.filter (fun j => WellOrderingRel j i) t, (1 - ↑f j))\n[PROOFSTEP]\nrcases f.locallyFinite x with ⟨U, hU, hf⟩\n[GOAL]\ncase intro.intro\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\nx : X\nU : Set X\nhU : U ∈ 𝓝 x\nhf : Set.Finite {i | Set.Nonempty ((fun i => support ↑(↑f i)) i ∩ U)}\n⊢ ∃ t, toPOUFun f i =ᶠ[𝓝 x] ↑(↑f i) * ↑(∏ j in Finset.filter (fun j => WellOrderingRel j i) t, (1 - ↑f j))\n[PROOFSTEP]\nuse hf.toFinset\n[GOAL]\ncase h\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\nx : X\nU : Set X\nhU : U ∈ 𝓝 x\nhf : Set.Finite {i | Set.Nonempty ((fun i => support ↑(↑f i)) i ∩ U)}\n⊢ toPOUFun f i =ᶠ[𝓝 x] ↑(↑f i) * ↑(∏ j in Finset.filter (fun j => WellOrderingRel j i) (Finite.toFinset hf), (1 - ↑f j))\n[PROOFSTEP]\nfilter_upwards [hU] with y hyU\n[GOAL]\ncase h\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\nx : X\nU : Set X\nhU : U ∈ 𝓝 x\nhf : Set.Finite {i | Set.Nonempty ((fun i => support ↑(↑f i)) i ∩ U)}\ny : X\nhyU : y ∈ U\n⊢ toPOUFun f i y = (↑(↑f i) * ↑(∏ j in Finset.filter (fun j => WellOrderingRel j i) (Finite.toFinset hf), (1 - ↑f j))) y\n[PROOFSTEP]\nsimp only [ContinuousMap.coe_prod, Pi.mul_apply, Finset.prod_apply]\n[GOAL]\ncase h\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\nx : X\nU : Set X\nhU : U ∈ 𝓝 x\nhf : Set.Finite {i | Set.Nonempty ((fun i => support ↑(↑f i)) i ∩ U)}\ny : X\nhyU : y ∈ U\n⊢ toPOUFun f i y = ↑(↑f i) y * ∏ c in Finset.filter (fun j => WellOrderingRel j i) (Finite.toFinset hf), ↑(1 - ↑f c) y\n[PROOFSTEP]\napply toPOUFun_eq_mul_prod\n[GOAL]\ncase h.ht\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\nx : X\nU : Set X\nhU : U ∈ 𝓝 x\nhf : Set.Finite {i | Set.Nonempty ((fun i => support ↑(↑f i)) i ∩ U)}\ny : X\nhyU : y ∈ U\n⊢ ∀ (j : ι), WellOrderingRel j i → ↑(↑f j) y ≠ 0 → j ∈ Finite.toFinset hf\n[PROOFSTEP]\nintro j _ hj\n[GOAL]\ncase h.ht\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\nx : X\nU : Set X\nhU : U ∈ 𝓝 x\nhf : Set.Finite {i | Set.Nonempty ((fun i => support ↑(↑f i)) i ∩ U)}\ny : X\nhyU : y ∈ U\nj : ι\na✝ : WellOrderingRel j i\nhj : ↑(↑f j) y ≠ 0\n⊢ j ∈ Finite.toFinset hf\n[PROOFSTEP]\nexact hf.mem_toFinset.2 ⟨y, ⟨hj, hyU⟩⟩\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\n⊢ Continuous (toPOUFun f i)\n[PROOFSTEP]\nrefine' (f i).continuous.mul <| continuous_finprod_cond (fun j _ => continuous_const.sub (f j).continuous) _\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\n⊢ LocallyFinite fun i => mulSupport fun x => 1 - ↑(↑f i) x\n[PROOFSTEP]\nsimp only [mulSupport_one_sub]\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\ni : ι\n⊢ LocallyFinite fun i => support fun x => ↑(↑f i) x\n[PROOFSTEP]\nexact f.locallyFinite\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\nx : X\nhx : x ∈ s\n⊢ ∑ᶠ (i : ι), ↑((fun i => ContinuousMap.mk (toPOUFun f i)) i) x = 1\n[PROOFSTEP]\nsimp only [ContinuousMap.coe_mk, sum_toPOUFun_eq, sub_eq_self]\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\nx : X\nhx : x ∈ s\n⊢ ∏ᶠ (i : ι), (1 - ↑(↑f i) x) = 0\n[PROOFSTEP]\napply finprod_eq_zero (fun i => 1 - f i x) (f.ind x hx)\n[GOAL]\ncase hx\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\nx : X\nhx : x ∈ s\n⊢ 1 - ↑(↑f (ind f x hx)) x = 0\n[PROOFSTEP]\nsimp only [f.ind_apply x hx, sub_self]\n[GOAL]\ncase hf\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\nx : X\nhx : x ∈ s\n⊢ Set.Finite (mulSupport fun i => 1 - ↑(↑f i) x)\n[PROOFSTEP]\nrw [mulSupport_one_sub]\n[GOAL]\ncase hf\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\nx : X\nhx : x ∈ s\n⊢ Set.Finite (support fun i => ↑(↑f i) x)\n[PROOFSTEP]\nexact f.point_finite x\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\nx : X\n⊢ ∑ᶠ (i : ι), ↑((fun i => ContinuousMap.mk (toPOUFun f i)) i) x ≤ 1\n[PROOFSTEP]\nsimp only [ContinuousMap.coe_mk, sum_toPOUFun_eq, sub_le_self_iff]\n[GOAL]\nι : Type u\nX : Type v\ninst✝ : TopologicalSpace X\ns : Set X\nf : BumpCovering ι X s\nx : X\n⊢ 0 ≤ ∏ᶠ (i : ι), (1 - ↑(↑f i) x)\n[PROOFSTEP]\nexact finprod_nonneg fun i => sub_nonneg.2 <| f.le_one i x\n", "meta": {"mathlib_filename": "Mathlib.Topology.PartitionOfUnity", "llama_tokens": 14672, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419831347361, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.35984227871767743}}
{"text": "[GOAL]\nα : Type u\nσ σ' : Type v\nM : εNFA α σ\nS : Set σ\nx : List α\ns✝ : σ\na : α\ns : σ\nhs : s ∈ εClosure M ∅\n⊢ False\n[PROOFSTEP]\ninduction hs\n[GOAL]\ncase base\nα : Type u\nσ σ' : Type v\nM : εNFA α σ\nS : Set σ\nx : List α\ns✝¹ : σ\na : α\ns s✝ : σ\na✝ : s✝ ∈ ∅\n⊢ False\n[PROOFSTEP]\nassumption\n[GOAL]\ncase step\nα : Type u\nσ σ' : Type v\nM : εNFA α σ\nS : Set σ\nx : List α\ns✝¹ : σ\na : α\ns s✝ t✝ : σ\na✝¹ : t✝ ∈ step M s✝ none\na✝ : εClosure M ∅ s✝\na_ih✝ : False\n⊢ False\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nσ σ' : Type v\nM : εNFA α σ\nS : Set σ\nx : List α\ns : σ\na : α\n⊢ s ∈ stepSet M S a ↔ ∃ t, t ∈ S ∧ s ∈ εClosure M (step M t (some a))\n[PROOFSTEP]\nsimp_rw [stepSet, mem_iUnion₂, exists_prop]\n[GOAL]\nα : Type u\nσ σ' : Type v\nM : εNFA α σ\nS : Set σ\nx : List α\ns : σ\na✝ a : α\n⊢ stepSet M ∅ a = ∅\n[PROOFSTEP]\nsimp_rw [stepSet, mem_empty_iff_false, iUnion_false, iUnion_empty]\n[GOAL]\nα : Type u\nσ σ' : Type v\nM : εNFA α σ\nS✝ : Set σ\nx✝ : List α\ns : σ\na✝ : α\nS : Set σ\nx : List α\na : α\n⊢ evalFrom M S (x ++ [a]) = stepSet M (evalFrom M S x) a\n[PROOFSTEP]\nrw [evalFrom, List.foldl_append, List.foldl_cons, List.foldl_nil]\n[GOAL]\nα : Type u\nσ σ' : Type v\nM : εNFA α σ\nS : Set σ\nx✝ : List α\ns : σ\na : α\nx : List α\n⊢ evalFrom M ∅ x = ∅\n[PROOFSTEP]\ninduction' x using List.reverseRecOn with x a ih\n[GOAL]\ncase H0\nα : Type u\nσ σ' : Type v\nM : εNFA α σ\nS : Set σ\nx : List α\ns : σ\na : α\n⊢ evalFrom M ∅ [] = ∅\n[PROOFSTEP]\nrw [evalFrom_nil, εClosure_empty]\n[GOAL]\ncase H1\nα : Type u\nσ σ' : Type v\nM : εNFA α σ\nS : Set σ\nx✝ : List α\ns : σ\na✝ : α\nx : List α\na : α\nih : evalFrom M ∅ x = ∅\n⊢ evalFrom M ∅ (x ++ [a]) = ∅\n[PROOFSTEP]\nrw [evalFrom_append_singleton, ih, stepSet_empty]\n[GOAL]\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS✝ : Set σ\nx : List α\ns : σ\na : α\nM : NFA α σ\nS : Set σ\n⊢ εNFA.εClosure (toεNFA M) S = S\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS✝ : Set σ\nx : List α\ns : σ\na✝ : α\nM : NFA α σ\nS : Set σ\na : σ\n⊢ a ∈ εNFA.εClosure (toεNFA M) S ↔ a ∈ S\n[PROOFSTEP]\nrefine' ⟨_, εNFA.εClosure.base _⟩\n[GOAL]\ncase h\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS✝ : Set σ\nx : List α\ns : σ\na✝ : α\nM : NFA α σ\nS : Set σ\na : σ\n⊢ a ∈ εNFA.εClosure (toεNFA M) S → a ∈ S\n[PROOFSTEP]\nrintro (⟨_, h⟩ | ⟨_, _, h, _⟩)\n[GOAL]\ncase h.base\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS✝ : Set σ\nx : List α\ns : σ\na✝ : α\nM : NFA α σ\nS : Set σ\na : σ\nh : a ∈ S\n⊢ a ∈ S\n[PROOFSTEP]\nexact h\n[GOAL]\ncase h.step\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS✝ : Set σ\nx : List α\ns : σ\na✝¹ : α\nM : NFA α σ\nS : Set σ\na s✝ : σ\na✝ : εNFA.εClosure (toεNFA M) S s✝\nh : a ∈ εNFA.step (toεNFA M) s✝ none\n⊢ a ∈ S\n[PROOFSTEP]\ncases h\n[GOAL]\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS : Set σ\nx : List α\ns : σ\na : α\nM : NFA α σ\nstart : Set σ\n⊢ εNFA.evalFrom (toεNFA M) start = evalFrom M start\n[PROOFSTEP]\nrw [evalFrom, εNFA.evalFrom, toεNFA_εClosure]\n[GOAL]\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS : Set σ\nx : List α\ns : σ\na : α\nM : NFA α σ\nstart : Set σ\n⊢ List.foldl (εNFA.stepSet (toεNFA M)) start = List.foldl (stepSet M) start\n[PROOFSTEP]\nsuffices εNFA.stepSet (toεNFA M) = stepSet M by rw [this]\n[GOAL]\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS : Set σ\nx : List α\ns : σ\na : α\nM : NFA α σ\nstart : Set σ\nthis : εNFA.stepSet (toεNFA M) = stepSet M\n⊢ List.foldl (εNFA.stepSet (toεNFA M)) start = List.foldl (stepSet M) start\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS : Set σ\nx : List α\ns : σ\na : α\nM : NFA α σ\nstart : Set σ\n⊢ εNFA.stepSet (toεNFA M) = stepSet M\n[PROOFSTEP]\next S s\n[GOAL]\ncase h.h.h\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS✝ : Set σ\nx : List α\ns✝ : σ\na : α\nM : NFA α σ\nstart S : Set σ\ns : α\nx✝ : σ\n⊢ x✝ ∈ εNFA.stepSet (toεNFA M) S s ↔ x✝ ∈ stepSet M S s\n[PROOFSTEP]\nsimp only [stepSet, εNFA.stepSet, exists_prop, Set.mem_iUnion]\n[GOAL]\ncase h.h.h\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS✝ : Set σ\nx : List α\ns✝ : σ\na : α\nM : NFA α σ\nstart S : Set σ\ns : α\nx✝ : σ\n⊢ (∃ i, i ∈ S ∧ x✝ ∈ εNFA.εClosure (toεNFA M) (εNFA.step (toεNFA M) i (some s))) ↔ ∃ i, i ∈ S ∧ x✝ ∈ step M i s\n[PROOFSTEP]\napply exists_congr\n[GOAL]\ncase h.h.h.h\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS✝ : Set σ\nx : List α\ns✝ : σ\na : α\nM : NFA α σ\nstart S : Set σ\ns : α\nx✝ : σ\n⊢ ∀ (a : σ), a ∈ S ∧ x✝ ∈ εNFA.εClosure (toεNFA M) (εNFA.step (toεNFA M) a (some s)) ↔ a ∈ S ∧ x✝ ∈ step M a s\n[PROOFSTEP]\nsimp only [and_congr_right_iff]\n[GOAL]\ncase h.h.h.h\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS✝ : Set σ\nx : List α\ns✝ : σ\na : α\nM : NFA α σ\nstart S : Set σ\ns : α\nx✝ : σ\n⊢ ∀ (a : σ), a ∈ S → (x✝ ∈ εNFA.εClosure (toεNFA M) (εNFA.step (toεNFA M) a (some s)) ↔ x✝ ∈ step M a s)\n[PROOFSTEP]\nintro _ _\n[GOAL]\ncase h.h.h.h\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS✝ : Set σ\nx : List α\ns✝ : σ\na : α\nM : NFA α σ\nstart S : Set σ\ns : α\nx✝ a✝¹ : σ\na✝ : a✝¹ ∈ S\n⊢ x✝ ∈ εNFA.εClosure (toεNFA M) (εNFA.step (toεNFA M) a✝¹ (some s)) ↔ x✝ ∈ step M a✝¹ s\n[PROOFSTEP]\nrw [M.toεNFA_εClosure]\n[GOAL]\ncase h.h.h.h\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS✝ : Set σ\nx : List α\ns✝ : σ\na : α\nM : NFA α σ\nstart S : Set σ\ns : α\nx✝ a✝¹ : σ\na✝ : a✝¹ ∈ S\n⊢ x✝ ∈ εNFA.step (toεNFA M) a✝¹ (some s) ↔ x✝ ∈ step M a✝¹ s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS : Set σ\nx : List α\ns : σ\na : α\nM : NFA α σ\n⊢ εNFA.accepts (toεNFA M) = accepts M\n[PROOFSTEP]\nrw [εNFA.accepts, εNFA.eval, toεNFA_evalFrom_match]\n[GOAL]\nα : Type u\nσ σ' : Type v\nM✝ : εNFA α σ\nS : Set σ\nx : List α\ns : σ\na : α\nM : NFA α σ\n⊢ {x | ∃ S, S ∈ (toεNFA M).accept ∧ S ∈ evalFrom M (toεNFA M).start x} = accepts M\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Computability.EpsilonNFA", "llama_tokens": 3320, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6187804478040617, "lm_q2_score": 0.5813030906443133, "lm_q1q2_score": 0.35969898673877326}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nsrc✝¹ : NormedAddCommGroup PUnit := normedAddCommGroup\nsrc✝ : CommRing PUnit := commRing\nx✝¹ x✝ : PUnit\n⊢ ‖x✝¹ * x✝‖ ≤ ‖x✝¹‖ * ‖x✝‖\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nα : Type u_5\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : One α\ninst✝ : NormOneClass α\n⊢ ‖0‖ ≠ ‖1‖\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : One α\ninst✝ : NormOneClass α\n⊢ ‖1‖ = 1\n[PROOFSTEP]\nsimp [ULift.norm_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : SeminormedAddCommGroup α\ninst✝⁴ : One α\ninst✝³ : NormOneClass α\ninst✝² : SeminormedAddCommGroup β\ninst✝¹ : One β\ninst✝ : NormOneClass β\n⊢ ‖1‖ = 1\n[PROOFSTEP]\nsimp [Prod.norm_def]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\nι : Type u_5\nα : ι → Type u_6\ninst✝⁴ : Nonempty ι\ninst✝³ : Fintype ι\ninst✝² : (i : ι) → SeminormedAddCommGroup (α i)\ninst✝¹ : (i : ι) → One (α i)\ninst✝ : ∀ (i : ι), NormOneClass (α i)\n⊢ ‖1‖ = 1\n[PROOFSTEP]\nsimp [Pi.norm_def]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\nι : Type u_5\nα : ι → Type u_6\ninst✝⁴ : Nonempty ι\ninst✝³ : Fintype ι\ninst✝² : (i : ι) → SeminormedAddCommGroup (α i)\ninst✝¹ : (i : ι) → One (α i)\ninst✝ : ∀ (i : ι), NormOneClass (α i)\n⊢ (Finset.sup Finset.univ fun b => 1) = 1\n[PROOFSTEP]\nexact Finset.sup_const Finset.univ_nonempty 1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\na b : α\n⊢ ‖a * b‖₊ ≤ ‖a‖₊ * ‖b‖₊\n[PROOFSTEP]\nsimpa only [← norm_toNNReal, ← Real.toNNReal_mul (norm_nonneg _)] using Real.toNNReal_mono (norm_mul_le _ _)\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : NonUnitalSeminormedRing α\nβ : Type u_5\ninst✝¹ : NormedRing β\ninst✝ : Nontrivial β\n⊢ ‖1‖ ≤ ‖1‖ * ‖1‖\n[PROOFSTEP]\nsimpa only [mul_one] using norm_mul_le (1 : β) 1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx y : α\n⊢ ‖↑(AddMonoidHom.mulRight x) y‖ ≤ ‖x‖ * ‖y‖\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx y : α\n⊢ ‖↑(AddMonoidHom.mulRight x) y‖ ≤ ‖y‖ * ‖x‖\n[PROOFSTEP]\nexact norm_mul_le y x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : NonUnitalSeminormedRing α\ninst✝ : NonUnitalSeminormedRing β\nsrc✝¹ : SeminormedAddCommGroup (α × β) := seminormedAddCommGroup\nsrc✝ : NonUnitalRing (α × β) := instNonUnitalRing\nx y : α × β\n⊢ max (‖x.fst‖ * ‖y.fst‖) (‖x.snd‖ * ‖y.snd‖) = max (‖x.fst‖ * ‖y.fst‖) (‖y.snd‖ * ‖x.snd‖)\n[PROOFSTEP]\nsimp [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : NonUnitalSeminormedRing α\ninst✝ : NonUnitalSeminormedRing β\nsrc✝¹ : SeminormedAddCommGroup (α × β) := seminormedAddCommGroup\nsrc✝ : NonUnitalRing (α × β) := instNonUnitalRing\nx y : α × β\n⊢ max (‖x.fst‖ * ‖y.fst‖) (‖y.snd‖ * ‖x.snd‖) ≤ max ‖x.fst‖ ‖x.snd‖ * max ‖y.snd‖ ‖y.fst‖\n[PROOFSTEP]\napply max_mul_mul_le_max_mul_max\n[GOAL]\ncase ha\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : NonUnitalSeminormedRing α\ninst✝ : NonUnitalSeminormedRing β\nsrc✝¹ : SeminormedAddCommGroup (α × β) := seminormedAddCommGroup\nsrc✝ : NonUnitalRing (α × β) := instNonUnitalRing\nx y : α × β\n⊢ 0 ≤ ‖x.fst‖\n[PROOFSTEP]\nsimp [norm_nonneg]\n[GOAL]\ncase hd\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : NonUnitalSeminormedRing α\ninst✝ : NonUnitalSeminormedRing β\nsrc✝¹ : SeminormedAddCommGroup (α × β) := seminormedAddCommGroup\nsrc✝ : NonUnitalRing (α × β) := instNonUnitalRing\nx y : α × β\n⊢ 0 ≤ ‖y.snd‖\n[PROOFSTEP]\nsimp [norm_nonneg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : NonUnitalSeminormedRing α\ninst✝ : NonUnitalSeminormedRing β\nsrc✝¹ : SeminormedAddCommGroup (α × β) := seminormedAddCommGroup\nsrc✝ : NonUnitalRing (α × β) := instNonUnitalRing\nx y : α × β\n⊢ max ‖x.fst‖ ‖x.snd‖ * max ‖y.snd‖ ‖y.fst‖ = max ‖x.fst‖ ‖x.snd‖ * max ‖y.fst‖ ‖y.snd‖\n[PROOFSTEP]\nsimp [max_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedRing α\n⊢ ‖↑0‖ ≤ ↑0 * ‖1‖\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedRing α\nn : ℕ\n⊢ ‖↑(n + 1)‖ ≤ ↑(n + 1) * ‖1‖\n[PROOFSTEP]\nrw [n.cast_succ, n.cast_succ, add_mul, one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedRing α\nn : ℕ\n⊢ ‖↑n + 1‖ ≤ ↑n * ‖1‖ + ‖1‖\n[PROOFSTEP]\nexact norm_add_le_of_le (Nat.norm_cast_le n) le_rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedRing α\na : α\nx✝ : [a] ≠ []\n⊢ ‖prod [a]‖ ≤ prod (map norm [a])\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedRing α\na b : α\nl : List α\nx✝ : a :: b :: l ≠ []\n⊢ ‖prod (a :: b :: l)‖ ≤ prod (map norm (a :: b :: l))\n[PROOFSTEP]\nrw [List.map_cons, List.prod_cons, @List.prod_cons _ _ _ ‖a‖]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedRing α\na b : α\nl : List α\nx✝ : a :: b :: l ≠ []\n⊢ ‖a * prod (b :: l)‖ ≤ ‖a‖ * prod (map norm (b :: l))\n[PROOFSTEP]\nrefine' le_trans (norm_mul_le _ _) (mul_le_mul_of_nonneg_left _ (norm_nonneg _))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedRing α\na b : α\nl : List α\nx✝ : a :: b :: l ≠ []\n⊢ ‖prod (b :: l)‖ ≤ prod (map norm (b :: l))\n[PROOFSTEP]\nexact List.norm_prod_le' (List.cons_ne_nil b l)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedRing α\nl : List α\nhl : l ≠ []\n⊢ prod (map norm l) = (fun a => ↑a) (prod (map nnnorm l))\n[PROOFSTEP]\nsimp [NNReal.coe_list_prod, List.map_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : SeminormedRing α\ninst✝ : NormOneClass α\n⊢ ‖prod []‖ ≤ prod (map norm [])\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : SeminormedRing α\ninst✝ : NormOneClass α\nl : List α\n⊢ prod (map norm l) = (fun a => ↑a) (prod (map nnnorm l))\n[PROOFSTEP]\nsimp [NNReal.coe_list_prod, List.map_map]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : SeminormedRing α✝\nα : Type u_5\ninst✝ : NormedCommRing α\ns : Finset ι\nhs : Finset.Nonempty s\nf : ι → α\n⊢ ‖∏ i in s, f i‖ ≤ ∏ i in s, ‖f i‖\n[PROOFSTEP]\nrcases s with ⟨⟨l⟩, hl⟩\n[GOAL]\ncase mk.mk\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : SeminormedRing α✝\nα : Type u_5\ninst✝ : NormedCommRing α\nf : ι → α\nval✝ : Multiset ι\nl : List ι\nhl : Multiset.Nodup (Quot.mk Setoid.r l)\nhs : Finset.Nonempty { val := Quot.mk Setoid.r l, nodup := hl }\n⊢ ‖∏ i in { val := Quot.mk Setoid.r l, nodup := hl }, f i‖ ≤ ∏ i in { val := Quot.mk Setoid.r l, nodup := hl }, ‖f i‖\n[PROOFSTEP]\nhave : l.map f ≠ [] := by simpa using hs\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : SeminormedRing α✝\nα : Type u_5\ninst✝ : NormedCommRing α\nf : ι → α\nval✝ : Multiset ι\nl : List ι\nhl : Multiset.Nodup (Quot.mk Setoid.r l)\nhs : Finset.Nonempty { val := Quot.mk Setoid.r l, nodup := hl }\n⊢ List.map f l ≠ []\n[PROOFSTEP]\nsimpa using hs\n[GOAL]\ncase mk.mk\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : SeminormedRing α✝\nα : Type u_5\ninst✝ : NormedCommRing α\nf : ι → α\nval✝ : Multiset ι\nl : List ι\nhl : Multiset.Nodup (Quot.mk Setoid.r l)\nhs : Finset.Nonempty { val := Quot.mk Setoid.r l, nodup := hl }\nthis : List.map f l ≠ []\n⊢ ‖∏ i in { val := Quot.mk Setoid.r l, nodup := hl }, f i‖ ≤ ∏ i in { val := Quot.mk Setoid.r l, nodup := hl }, ‖f i‖\n[PROOFSTEP]\nsimpa using List.norm_prod_le' this\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : SeminormedRing α✝\nα : Type u_5\ninst✝ : NormedCommRing α\ns : Finset ι\nhs : Finset.Nonempty s\nf : ι → α\n⊢ ∏ i in s, ‖f i‖ = (fun a => ↑a) (∏ i in s, ‖f i‖₊)\n[PROOFSTEP]\nsimp [NNReal.coe_prod]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : SeminormedRing α✝\nα : Type u_5\ninst✝¹ : NormedCommRing α\ninst✝ : NormOneClass α\ns : Finset ι\nf : ι → α\n⊢ ‖∏ i in s, f i‖ ≤ ∏ i in s, ‖f i‖\n[PROOFSTEP]\nrcases s with ⟨⟨l⟩, hl⟩\n[GOAL]\ncase mk.mk\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : SeminormedRing α✝\nα : Type u_5\ninst✝¹ : NormedCommRing α\ninst✝ : NormOneClass α\nf : ι → α\nval✝ : Multiset ι\nl : List ι\nhl : Multiset.Nodup (Quot.mk Setoid.r l)\n⊢ ‖∏ i in { val := Quot.mk Setoid.r l, nodup := hl }, f i‖ ≤ ∏ i in { val := Quot.mk Setoid.r l, nodup := hl }, ‖f i‖\n[PROOFSTEP]\nsimpa using (l.map f).norm_prod_le\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : SeminormedRing α✝\nα : Type u_5\ninst✝¹ : NormedCommRing α\ninst✝ : NormOneClass α\ns : Finset ι\nf : ι → α\n⊢ ∏ i in s, ‖f i‖ = (fun a => ↑a) (∏ i in s, ‖f i‖₊)\n[PROOFSTEP]\nsimp [NNReal.coe_prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedRing α\na : α\nx✝ : 0 < 1\n⊢ ‖a ^ 1‖₊ ≤ ‖a‖₊ ^ 1\n[PROOFSTEP]\nsimp only [pow_one, le_rfl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedRing α\na : α\nn : ℕ\nx✝ : 0 < n + 2\n⊢ ‖a ^ (n + 2)‖₊ ≤ ‖a‖₊ ^ (n + 2)\n[PROOFSTEP]\nsimpa only [pow_succ _ (n + 1)] using le_trans (nnnorm_mul_le _ _) (mul_le_mul_left' (nnnorm_pow_le' a n.succ_pos) _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : SeminormedRing α\ninst✝ : NormOneClass α\na : α\nn : ℕ\n⊢ ‖a ^ Nat.zero‖₊ ≤ ‖a‖₊ ^ Nat.zero\n[PROOFSTEP]\nsimp only [Nat.zero_eq, pow_zero, nnnorm_one, le_rfl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedRing α\na : α\nn : ℕ\nh : 0 < n\n⊢ ‖a ^ n‖ ≤ ‖a‖ ^ n\n[PROOFSTEP]\nsimpa only [NNReal.coe_pow, coe_nnnorm] using NNReal.coe_mono (nnnorm_pow_le' a h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : SeminormedRing α\ninst✝ : NormOneClass α\na : α\nn : ℕ\n⊢ ‖a ^ Nat.zero‖ ≤ ‖a‖ ^ Nat.zero\n[PROOFSTEP]\nsimp only [Nat.zero_eq, pow_zero, norm_one, le_rfl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\n⊢ Tendsto (fun e => ‖e.fst * e.snd - (fun p => p.fst * p.snd) x‖) (𝓝 x) (𝓝 0)\n[PROOFSTEP]\nhave : ∀ e : α × α, ‖e.1 * e.2 - x.1 * x.2‖ ≤ ‖e.1‖ * ‖e.2 - x.2‖ + ‖e.1 - x.1‖ * ‖x.2‖ :=\n  by\n  intro e\n  calc\n    ‖e.1 * e.2 - x.1 * x.2‖ ≤ ‖e.1 * (e.2 - x.2) + (e.1 - x.1) * x.2‖ := by\n      rw [_root_.mul_sub, _root_.sub_mul, sub_add_sub_cancel]\n        -- porting note: `ENNReal.{mul_sub, sub_mul}` should be protected\n    _ ≤ ‖e.1‖ * ‖e.2 - x.2‖ + ‖e.1 - x.1‖ * ‖x.2‖ := norm_add_le_of_le (norm_mul_le _ _) (norm_mul_le _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\n⊢ ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n[PROOFSTEP]\nintro e\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx e : α × α\n⊢ ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n[PROOFSTEP]\ncalc\n  ‖e.1 * e.2 - x.1 * x.2‖ ≤ ‖e.1 * (e.2 - x.2) + (e.1 - x.1) * x.2‖ := by\n    rw [_root_.mul_sub, _root_.sub_mul, sub_add_sub_cancel]\n      -- porting note: `ENNReal.{mul_sub, sub_mul}` should be protected\n  _ ≤ ‖e.1‖ * ‖e.2 - x.2‖ + ‖e.1 - x.1‖ * ‖x.2‖ := norm_add_le_of_le (norm_mul_le _ _) (norm_mul_le _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx e : α × α\n⊢ ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst * (e.snd - x.snd) + (e.fst - x.fst) * x.snd‖\n[PROOFSTEP]\nrw [_root_.mul_sub, _root_.sub_mul, sub_add_sub_cancel]\n  -- porting note: `ENNReal.{mul_sub, sub_mul}` should be protected\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\nthis : ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n⊢ Tendsto (fun e => ‖e.fst * e.snd - (fun p => p.fst * p.snd) x‖) (𝓝 x) (𝓝 0)\n[PROOFSTEP]\nrefine squeeze_zero (fun e => norm_nonneg _) this ?_\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\nthis : ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n⊢ Tendsto (fun t => ‖t.fst‖ * ‖t.snd - x.snd‖ + ‖t.fst - x.fst‖ * ‖x.snd‖) (𝓝 x) (𝓝 0)\n[PROOFSTEP]\nconvert\n  ((continuous_fst.tendsto x).norm.mul ((continuous_snd.tendsto x).sub tendsto_const_nhds).norm).add\n    (((continuous_fst.tendsto x).sub tendsto_const_nhds).norm.mul _)\n      -- Porting note: `show` used to select a goal to work on\n[GOAL]\ncase h.e'_5.h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\nthis : ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n⊢ 0 = ‖x.fst‖ * ‖x.snd - x.snd‖ + ‖x.fst - x.fst‖ * ?convert_4\ncase convert_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\nthis : ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n⊢ ℝ\ncase convert_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\nthis : ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n⊢ Tendsto (fun t => ‖x.snd‖) (𝓝 x) (𝓝 ?convert_4)\n[PROOFSTEP]\nrotate_right\n[GOAL]\ncase convert_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\nthis : ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n⊢ Tendsto (fun t => ‖x.snd‖) (𝓝 x) (𝓝 ?convert_4)\ncase h.e'_5.h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\nthis : ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n⊢ 0 = ‖x.fst‖ * ‖x.snd - x.snd‖ + ‖x.fst - x.fst‖ * ?convert_4\ncase convert_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\nthis : ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n⊢ ℝ\n[PROOFSTEP]\nshow Tendsto _ _ _\n[GOAL]\ncase convert_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\nthis : ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n⊢ Tendsto (fun t => ‖x.snd‖) (𝓝 x) (𝓝 ?convert_4)\ncase h.e'_5.h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\nthis : ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n⊢ 0 = ‖x.fst‖ * ‖x.snd - x.snd‖ + ‖x.fst - x.fst‖ * ?convert_4\ncase convert_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\nthis : ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n⊢ ℝ\n[PROOFSTEP]\nexact tendsto_const_nhds\n[GOAL]\ncase h.e'_5.h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NonUnitalSeminormedRing α\nx : α × α\nthis : ∀ (e : α × α), ‖e.fst * e.snd - x.fst * x.snd‖ ≤ ‖e.fst‖ * ‖e.snd - x.snd‖ + ‖e.fst - x.fst‖ * ‖x.snd‖\n⊢ 0 = ‖x.fst‖ * ‖x.snd - x.snd‖ + ‖x.fst - x.fst‖ * ‖x.snd‖\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\n⊢ ‖1‖ * ‖1‖ = ‖1‖ * 1\n[PROOFSTEP]\nrw [← norm_mul, mul_one, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\na : α\n⊢ ↑‖a⁻¹‖₊ = ↑‖a‖₊⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nz w : α\nhz : z ≠ 0\nhw : w ≠ 0\n⊢ dist z⁻¹ w⁻¹ = dist z w / (‖z‖ * ‖w‖)\n[PROOFSTEP]\nrw [dist_eq_norm, inv_sub_inv' hz hw, norm_mul, norm_mul, norm_inv, norm_inv, mul_comm ‖z‖⁻¹, mul_assoc, dist_eq_norm',\n  div_eq_mul_inv, mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nz w : α\nhz : z ≠ 0\nhw : w ≠ 0\n⊢ nndist z⁻¹ w⁻¹ = nndist z w / (‖z‖₊ * ‖w‖₊)\n[PROOFSTEP]\nrw [← NNReal.coe_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nz w : α\nhz : z ≠ 0\nhw : w ≠ 0\n⊢ ↑(nndist z⁻¹ w⁻¹) = ↑(nndist z w / (‖z‖₊ * ‖w‖₊))\n[PROOFSTEP]\nsimp [-NNReal.coe_eq, dist_inv_inv₀ hz hw]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\na : α\nha : a ≠ 0\n⊢ Tendsto ((fun x x_1 => x * x_1) a) (comap norm atTop) (comap norm atTop)\n[PROOFSTEP]\nsimpa only [tendsto_comap_iff, (· ∘ ·), norm_mul] using tendsto_const_nhds.mul_atTop (norm_pos_iff.2 ha) tendsto_comap\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\na : α\nha : a ≠ 0\n⊢ Tendsto (fun x => x * a) (comap norm atTop) (comap norm atTop)\n[PROOFSTEP]\nsimpa only [tendsto_comap_iff, (· ∘ ·), norm_mul] using tendsto_comap.atTop_mul (norm_pos_iff.2 ha) tendsto_const_nhds\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\n⊢ HasContinuousInv₀ α\n[PROOFSTEP]\nrefine' ⟨fun r r0 => tendsto_iff_norm_tendsto_zero.2 _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nr : α\nr0 : r ≠ 0\n⊢ Tendsto (fun e => ‖e⁻¹ - r⁻¹‖) (𝓝 r) (𝓝 0)\n[PROOFSTEP]\nhave r0' : 0 < ‖r‖ := norm_pos_iff.2 r0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nr : α\nr0 : r ≠ 0\nr0' : 0 < ‖r‖\n⊢ Tendsto (fun e => ‖e⁻¹ - r⁻¹‖) (𝓝 r) (𝓝 0)\n[PROOFSTEP]\nrcases exists_between r0' with ⟨ε, ε0, εr⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nr : α\nr0 : r ≠ 0\nr0' : 0 < ‖r‖\nε : ℝ\nε0 : 0 < ε\nεr : ε < ‖r‖\n⊢ Tendsto (fun e => ‖e⁻¹ - r⁻¹‖) (𝓝 r) (𝓝 0)\n[PROOFSTEP]\nhave : ∀ᶠ e in 𝓝 r, ‖e⁻¹ - r⁻¹‖ ≤ ‖r - e‖ / ‖r‖ / ε :=\n  by\n  filter_upwards [(isOpen_lt continuous_const continuous_norm).eventually_mem εr] with e he\n  have e0 : e ≠ 0 := norm_pos_iff.1 (ε0.trans he)\n  calc\n    ‖e⁻¹ - r⁻¹‖ = ‖r‖⁻¹ * ‖r - e‖ * ‖e‖⁻¹ := by\n      rw [← norm_inv, ← norm_inv, ← norm_mul, ← norm_mul, _root_.mul_sub, _root_.sub_mul, mul_assoc _ e,\n        inv_mul_cancel r0, mul_inv_cancel e0, one_mul, mul_one]\n        -- porting note: `ENNReal.{mul_sub, sub_mul}` should be `protected`\n    _ = ‖r - e‖ / ‖r‖ / ‖e‖ := by field_simp [mul_comm]\n    _ ≤ ‖r - e‖ / ‖r‖ / ε := by gcongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nr : α\nr0 : r ≠ 0\nr0' : 0 < ‖r‖\nε : ℝ\nε0 : 0 < ε\nεr : ε < ‖r‖\n⊢ ∀ᶠ (e : α) in 𝓝 r, ‖e⁻¹ - r⁻¹‖ ≤ ‖r - e‖ / ‖r‖ / ε\n[PROOFSTEP]\nfilter_upwards [(isOpen_lt continuous_const continuous_norm).eventually_mem εr] with e he\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nr : α\nr0 : r ≠ 0\nr0' : 0 < ‖r‖\nε : ℝ\nε0 : 0 < ε\nεr : ε < ‖r‖\ne : α\nhe : ε < ‖e‖\n⊢ ‖e⁻¹ - r⁻¹‖ ≤ ‖r - e‖ / ‖r‖ / ε\n[PROOFSTEP]\nhave e0 : e ≠ 0 := norm_pos_iff.1 (ε0.trans he)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nr : α\nr0 : r ≠ 0\nr0' : 0 < ‖r‖\nε : ℝ\nε0 : 0 < ε\nεr : ε < ‖r‖\ne : α\nhe : ε < ‖e‖\ne0 : e ≠ 0\n⊢ ‖e⁻¹ - r⁻¹‖ ≤ ‖r - e‖ / ‖r‖ / ε\n[PROOFSTEP]\ncalc\n  ‖e⁻¹ - r⁻¹‖ = ‖r‖⁻¹ * ‖r - e‖ * ‖e‖⁻¹ := by\n    rw [← norm_inv, ← norm_inv, ← norm_mul, ← norm_mul, _root_.mul_sub, _root_.sub_mul, mul_assoc _ e,\n      inv_mul_cancel r0, mul_inv_cancel e0, one_mul, mul_one]\n      -- porting note: `ENNReal.{mul_sub, sub_mul}` should be `protected`\n  _ = ‖r - e‖ / ‖r‖ / ‖e‖ := by field_simp [mul_comm]\n  _ ≤ ‖r - e‖ / ‖r‖ / ε := by gcongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nr : α\nr0 : r ≠ 0\nr0' : 0 < ‖r‖\nε : ℝ\nε0 : 0 < ε\nεr : ε < ‖r‖\ne : α\nhe : ε < ‖e‖\ne0 : e ≠ 0\n⊢ ‖e⁻¹ - r⁻¹‖ = ‖r‖⁻¹ * ‖r - e‖ * ‖e‖⁻¹\n[PROOFSTEP]\nrw [← norm_inv, ← norm_inv, ← norm_mul, ← norm_mul, _root_.mul_sub, _root_.sub_mul, mul_assoc _ e, inv_mul_cancel r0,\n  mul_inv_cancel e0, one_mul, mul_one]\n  -- porting note: `ENNReal.{mul_sub, sub_mul}` should be `protected`\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nr : α\nr0 : r ≠ 0\nr0' : 0 < ‖r‖\nε : ℝ\nε0 : 0 < ε\nεr : ε < ‖r‖\ne : α\nhe : ε < ‖e‖\ne0 : e ≠ 0\n⊢ ‖r‖⁻¹ * ‖r - e‖ * ‖e‖⁻¹ = ‖r - e‖ / ‖r‖ / ‖e‖\n[PROOFSTEP]\nfield_simp [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nr : α\nr0 : r ≠ 0\nr0' : 0 < ‖r‖\nε : ℝ\nε0 : 0 < ε\nεr : ε < ‖r‖\ne : α\nhe : ε < ‖e‖\ne0 : e ≠ 0\n⊢ ‖r - e‖ / ‖r‖ / ‖e‖ ≤ ‖r - e‖ / ‖r‖ / ε\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nr : α\nr0 : r ≠ 0\nr0' : 0 < ‖r‖\nε : ℝ\nε0 : 0 < ε\nεr : ε < ‖r‖\nthis : ∀ᶠ (e : α) in 𝓝 r, ‖e⁻¹ - r⁻¹‖ ≤ ‖r - e‖ / ‖r‖ / ε\n⊢ Tendsto (fun e => ‖e⁻¹ - r⁻¹‖) (𝓝 r) (𝓝 0)\n[PROOFSTEP]\nrefine' squeeze_zero' (eventually_of_forall fun _ => norm_nonneg _) this _\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nr : α\nr0 : r ≠ 0\nr0' : 0 < ‖r‖\nε : ℝ\nε0 : 0 < ε\nεr : ε < ‖r‖\nthis : ∀ᶠ (e : α) in 𝓝 r, ‖e⁻¹ - r⁻¹‖ ≤ ‖r - e‖ / ‖r‖ / ε\n⊢ Tendsto (fun t => ‖r - t‖ / ‖r‖ / ε) (𝓝 r) (𝓝 0)\n[PROOFSTEP]\nrefine' (((continuous_const.sub continuous_id).norm.div_const _).div_const _).tendsto' _ _ _\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NormedDivisionRing α\nr : α\nr0 : r ≠ 0\nr0' : 0 < ‖r‖\nε : ℝ\nε0 : 0 < ε\nεr : ε < ‖r‖\nthis : ∀ᶠ (e : α) in 𝓝 r, ‖e⁻¹ - r⁻¹‖ ≤ ‖r - e‖ / ‖r‖ / ε\n⊢ ‖r - id r‖ / ‖r‖ / ε = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : NormedDivisionRing α\ninst✝ : Monoid β\nφ : β →* α\nx : β\nk : ℕ+\nh : x ^ ↑k = 1\n⊢ ‖↑φ x‖ = 1\n[PROOFSTEP]\nrw [← pow_left_inj, ← norm_pow, ← map_pow, h, map_one, norm_one, one_pow]\n[GOAL]\ncase Hxpos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : NormedDivisionRing α\ninst✝ : Monoid β\nφ : β →* α\nx : β\nk : ℕ+\nh : x ^ ↑k = 1\n⊢ 0 ≤ ‖↑φ x‖\ncase Hypos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : NormedDivisionRing α\ninst✝ : Monoid β\nφ : β →* α\nx : β\nk : ℕ+\nh : x ^ ↑k = 1\n⊢ 0 ≤ 1\ncase Hnpos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : NormedDivisionRing α\ninst✝ : Monoid β\nφ : β →* α\nx : β\nk : ℕ+\nh : x ^ ↑k = 1\n⊢ 0 < ↑k\n[PROOFSTEP]\nexacts [norm_nonneg _, zero_le_one, k.pos]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NontriviallyNormedField α\nr : ℝ\nw : α\nhw : 1 < ‖w‖\nn : ℕ\nhn : r < ‖w‖ ^ n\n⊢ r < ‖w ^ n‖\n[PROOFSTEP]\nrwa [norm_pow]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NontriviallyNormedField α\nr : ℝ\nhr : 0 < r\nw : α\nhw : r⁻¹ < ‖w‖\n⊢ 0 < ‖w⁻¹‖ ∧ ‖w⁻¹‖ < r\n[PROOFSTEP]\nrwa [← Set.mem_Ioo, norm_inv, ← Set.mem_inv, Set.inv_Ioo_0_left hr]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NontriviallyNormedField α\nx : α\n⊢ NeBot (𝓝[{x}ᶜ] x)\n[PROOFSTEP]\nrw [← mem_closure_iff_nhdsWithin_neBot, Metric.mem_closure_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NontriviallyNormedField α\nx : α\n⊢ ∀ (ε : ℝ), ε > 0 → ∃ b, b ∈ {x}ᶜ ∧ dist x b < ε\n[PROOFSTEP]\nrintro ε ε0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NontriviallyNormedField α\nx : α\nε : ℝ\nε0 : ε > 0\n⊢ ∃ b, b ∈ {x}ᶜ ∧ dist x b < ε\n[PROOFSTEP]\nrcases exists_norm_lt α ε0 with ⟨b, hb0, hbε⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NontriviallyNormedField α\nx : α\nε : ℝ\nε0 : ε > 0\nb : α\nhb0 : 0 < ‖b‖\nhbε : ‖b‖ < ε\n⊢ ∃ b, b ∈ {x}ᶜ ∧ dist x b < ε\n[PROOFSTEP]\nrefine' ⟨x + b, mt (Set.mem_singleton_iff.trans add_right_eq_self).1 <| norm_pos_iff.1 hb0, _⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NontriviallyNormedField α\nx : α\nε : ℝ\nε0 : ε > 0\nb : α\nhb0 : 0 < ‖b‖\nhbε : ‖b‖ < ε\n⊢ dist x (x + b) < ε\n[PROOFSTEP]\nrwa [dist_comm, dist_eq_norm, add_sub_cancel']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : NontriviallyNormedField α\n⊢ NeBot (𝓝[{x | IsUnit x}] 0)\n[PROOFSTEP]\nsimpa only [isUnit_iff_ne_zero] using punctured_nhds_neBot (0 : α)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : DenselyNormedField α\nr₁ r₂ : ℝ≥0\nh : r₁ < r₂\n⊢ ∃ x, r₁ < ‖x‖₊ ∧ ‖x‖₊ < r₂\n[PROOFSTEP]\nexact_mod_cast exists_lt_norm_lt α r₁.prop h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : DenselyNormedField α\n⊢ ∀ (a₁ a₂ : ↑(Set.range norm)), a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂\n[PROOFSTEP]\nrintro ⟨-, x, rfl⟩ ⟨-, y, rfl⟩ hxy\n[GOAL]\ncase mk.intro.mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : DenselyNormedField α\nx y : α\nhxy : { val := ‖x‖, property := (_ : ∃ y, ‖y‖ = ‖x‖) } < { val := ‖y‖, property := (_ : ∃ y_1, ‖y_1‖ = ‖y‖) }\n⊢ ∃ a, { val := ‖x‖, property := (_ : ∃ y, ‖y‖ = ‖x‖) } < a ∧ a < { val := ‖y‖, property := (_ : ∃ y_1, ‖y_1‖ = ‖y‖) }\n[PROOFSTEP]\nlet ⟨z, h⟩ := exists_lt_norm_lt α (norm_nonneg _) hxy\n[GOAL]\ncase mk.intro.mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : DenselyNormedField α\nx y : α\nhxy : { val := ‖x‖, property := (_ : ∃ y, ‖y‖ = ‖x‖) } < { val := ‖y‖, property := (_ : ∃ y_1, ‖y_1‖ = ‖y‖) }\nz : α\nh : ‖x‖ < ‖z‖ ∧ ‖z‖ < ↑{ val := ‖y‖, property := (_ : ∃ y_1, ‖y_1‖ = ‖y‖) }\n⊢ ∃ a, { val := ‖x‖, property := (_ : ∃ y, ‖y‖ = ‖x‖) } < a ∧ a < { val := ‖y‖, property := (_ : ∃ y_1, ‖y_1‖ = ‖y‖) }\n[PROOFSTEP]\nexact ⟨⟨‖z‖, z, rfl⟩, h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : DenselyNormedField α\n⊢ ∀ (a₁ a₂ : ↑(Set.range nnnorm)), a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂\n[PROOFSTEP]\nrintro ⟨-, x, rfl⟩ ⟨-, y, rfl⟩ hxy\n[GOAL]\ncase mk.intro.mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : DenselyNormedField α\nx y : α\nhxy : { val := ‖x‖₊, property := (_ : ∃ y, ‖y‖₊ = ‖x‖₊) } < { val := ‖y‖₊, property := (_ : ∃ y_1, ‖y_1‖₊ = ‖y‖₊) }\n⊢ ∃ a,\n    { val := ‖x‖₊, property := (_ : ∃ y, ‖y‖₊ = ‖x‖₊) } < a ∧\n      a < { val := ‖y‖₊, property := (_ : ∃ y_1, ‖y_1‖₊ = ‖y‖₊) }\n[PROOFSTEP]\nlet ⟨z, h⟩ := exists_lt_nnnorm_lt α hxy\n[GOAL]\ncase mk.intro.mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : DenselyNormedField α\nx y : α\nhxy : { val := ‖x‖₊, property := (_ : ∃ y, ‖y‖₊ = ‖x‖₊) } < { val := ‖y‖₊, property := (_ : ∃ y_1, ‖y_1‖₊ = ‖y‖₊) }\nz : α\nh :\n  ↑{ val := ‖x‖₊, property := (_ : ∃ y, ‖y‖₊ = ‖x‖₊) } < ‖z‖₊ ∧\n    ‖z‖₊ < ↑{ val := ‖y‖₊, property := (_ : ∃ y_1, ‖y_1‖₊ = ‖y‖₊) }\n⊢ ∃ a,\n    { val := ‖x‖₊, property := (_ : ∃ y, ‖y‖₊ = ‖x‖₊) } < a ∧\n      a < { val := ‖y‖₊, property := (_ : ∃ y_1, ‖y_1‖₊ = ‖y‖₊) }\n[PROOFSTEP]\nexact ⟨⟨‖z‖₊, z, rfl⟩, h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nx✝¹ x✝ : ℝ\nh₀ : 0 ≤ x✝¹\nhr : x✝¹ < x✝\nx : ℝ\nh : x✝¹ < x ∧ x < x✝\n⊢ x✝¹ < ‖x‖ ∧ ‖x‖ < x✝\n[PROOFSTEP]\nrwa [Real.norm_eq_abs, abs_of_nonneg (h₀.trans h.1.le)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nx y : ℝ\nhx : 0 ≤ x\n⊢ toNNReal x * ‖y‖₊ = ‖x * y‖₊\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nx y : ℝ\nhx : 0 ≤ x\n⊢ ↑(toNNReal x * ‖y‖₊) = ↑‖x * y‖₊\n[PROOFSTEP]\nsimp only [NNReal.coe_mul, nnnorm_mul, coe_nnnorm, Real.toNNReal_of_nonneg, norm_of_nonneg, hx, coe_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nx y : ℝ\nhy : 0 ≤ y\n⊢ ‖x‖₊ * toNNReal y = ‖x * y‖₊\n[PROOFSTEP]\nrw [mul_comm, mul_comm x, toNNReal_mul_nnnorm x hy]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nx : ℝ≥0\n⊢ ‖↑x‖ = ↑x\n[PROOFSTEP]\nrw [Real.norm_eq_abs, x.abs_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedAddCommGroup α\na : α\n⊢ ‖‖a‖‖₊ = ‖a‖₊\n[PROOFSTEP]\nrw [Real.nnnorm_of_nonneg (norm_nonneg a)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝ : SeminormedAddCommGroup α\na : α\n⊢ { val := ‖a‖, property := (_ : 0 ≤ ‖a‖) } = ‖a‖₊\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Nonempty α\ninst✝¹ : SemilatticeSup α\nβ : Type u_5\ninst✝ : SeminormedAddCommGroup β\nf : α → β\nb : β\n⊢ (∀ (ib : ℝ), 0 < ib → ∃ ia, True ∧ ∀ (x : α), x ∈ Set.Ici ia → f x ∈ ball b ib) ↔\n    ∀ (ε : ℝ), 0 < ε → ∃ N, ∀ (n : α), N ≤ n → ‖f n - b‖ < ε\n[PROOFSTEP]\nsimp [dist_eq_norm]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Nonempty α\ninst✝² : SemilatticeSup α\ninst✝¹ : NoMaxOrder α\nβ : Type u_5\ninst✝ : SeminormedAddCommGroup β\nf : α → β\nb : β\n⊢ (∀ (ib : ℝ), 0 < ib → ∃ ia, True ∧ ∀ (x : α), x ∈ Set.Ioi ia → f x ∈ ball b ib) ↔\n    ∀ (ε : ℝ), 0 < ε → ∃ N, ∀ (n : α), N < n → ‖f n - b‖ < ε\n[PROOFSTEP]\nsimp [dist_eq_norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nsrc✝¹ : NormedAddCommGroup ℤ := normedAddCommGroup\nsrc✝ : Ring ℤ := instRingInt\nm n : ℤ\n⊢ ‖m * n‖ = ‖m‖ * ‖n‖\n[PROOFSTEP]\nsimp only [norm, Int.cast_mul, abs_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\n⊢ ‖1‖ = 1\n[PROOFSTEP]\nsimp [← Int.norm_cast_real]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nsrc✝¹ : NormedAddCommGroup ℚ := normedAddCommGroup\nsrc✝ : Field ℚ := field\nr₁ r₂ : ℚ\n⊢ ‖r₁ * r₂‖ = ‖r₁‖ * ‖r₂‖\n[PROOFSTEP]\nsimp only [norm, Rat.cast_mul, abs_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nr₁ r₂ : ℝ\nh₀ : 0 ≤ r₁\nhr : r₁ < r₂\nq : ℚ\nh : r₁ < ↑q ∧ ↑q < r₂\n⊢ r₁ < ‖q‖ ∧ ‖q‖ < r₂\n[PROOFSTEP]\nrwa [← Rat.norm_cast_real, Real.norm_eq_abs, abs_of_pos (h₀.trans_lt h.1)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nF : Type u_5\nR : Type u_6\nS : Type u_7\ninst✝² : NonUnitalRing R\ninst✝¹ : NonUnitalSeminormedRing S\ninst✝ : NonUnitalRingHomClass F R S\nf : F\nsrc✝¹ : SeminormedAddCommGroup R := SeminormedAddCommGroup.induced R S f\nsrc✝ : NonUnitalRing R := inst✝²\nx y : R\n⊢ ‖x * y‖ ≤ ‖x‖ * ‖y‖\n[PROOFSTEP]\nshow ‖f (x * y)‖ ≤ ‖f x‖ * ‖f y‖\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nF : Type u_5\nR : Type u_6\nS : Type u_7\ninst✝² : NonUnitalRing R\ninst✝¹ : NonUnitalSeminormedRing S\ninst✝ : NonUnitalRingHomClass F R S\nf : F\nsrc✝¹ : SeminormedAddCommGroup R := SeminormedAddCommGroup.induced R S f\nsrc✝ : NonUnitalRing R := inst✝²\nx y : R\n⊢ ‖↑f (x * y)‖ ≤ ‖↑f x‖ * ‖↑f y‖\n[PROOFSTEP]\nexact (map_mul f x y).symm ▸ norm_mul_le (f x) (f y)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nF : Type u_5\nR : Type u_6\nS : Type u_7\ninst✝² : DivisionRing R\ninst✝¹ : NormedDivisionRing S\ninst✝ : NonUnitalRingHomClass F R S\nf : F\nhf : Function.Injective ↑f\nsrc✝¹ : NormedAddCommGroup R := NormedAddCommGroup.induced R S f hf\nsrc✝ : DivisionRing R := inst✝²\nx y : R\n⊢ ‖x * y‖ = ‖x‖ * ‖y‖\n[PROOFSTEP]\nshow ‖f (x * y)‖ = ‖f x‖ * ‖f y‖\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nF : Type u_5\nR : Type u_6\nS : Type u_7\ninst✝² : DivisionRing R\ninst✝¹ : NormedDivisionRing S\ninst✝ : NonUnitalRingHomClass F R S\nf : F\nhf : Function.Injective ↑f\nsrc✝¹ : NormedAddCommGroup R := NormedAddCommGroup.induced R S f hf\nsrc✝ : DivisionRing R := inst✝²\nx y : R\n⊢ ‖↑f (x * y)‖ = ‖↑f x‖ * ‖↑f y‖\n[PROOFSTEP]\nexact (map_mul f x y).symm ▸ norm_mul (f x) (f y)\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Normed.Field.Basic", "llama_tokens": 17493, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442251064863697, "lm_q2_score": 0.5583269943353745, "lm_q1q2_score": 0.3596882673799213}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Zero α\ninst✝ : LE α\nf g : ι →₀ α\nh : (fun f => ↑f) f = (fun f => ↑f) g\ni : ι\n⊢ ↑f i = ↑g i\n[PROOFSTEP]\ndsimp at h \n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Zero α\ninst✝ : LE α\nf g : ι →₀ α\nh : ↑f = ↑g\ni : ι\n⊢ ↑f i = ↑g i\n[PROOFSTEP]\nrw [h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Zero α\ninst✝¹ : DecidableEq ι\ninst✝ : Lattice α\nf g : ι →₀ α\n⊢ (↑((f ⊓ g).support ∪ (f ⊔ g).support))ᶜ = (↑(f.support ∪ g.support))ᶜ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\ninst✝² : Zero α\ninst✝¹ : DecidableEq ι\ninst✝ : Lattice α\nf g : ι →₀ α\nx✝ : ι\n⊢ x✝ ∈ (↑((f ⊓ g).support ∪ (f ⊔ g).support))ᶜ ↔ x✝ ∈ (↑(f.support ∪ g.support))ᶜ\n[PROOFSTEP]\nsimp [inf_eq_and_sup_eq_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : CanonicallyOrderedAddMonoid α\n⊢ ∀ (a : ι →₀ α), ⊥ ≤ a\n[PROOFSTEP]\nsimp only [le_def, coe_zero, Pi.zero_apply, imp_true_iff, zero_le]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : CanonicallyOrderedAddMonoid α\nf g : ι →₀ α\n⊢ f + g = 0 ↔ f = 0 ∧ g = 0\n[PROOFSTEP]\nsimp [FunLike.ext_iff, forall_and]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : CanonicallyOrderedAddMonoid α\nf g : ι →₀ α\ns✝ : Finset ι\nhf : f.support ⊆ s✝\nh : ∀ (i : ι), i ∈ s✝ → ↑f i ≤ ↑g i\ns : ι\n⊢ ↑f s ≤ ↑g s\n[PROOFSTEP]\nclassical exact if H : s ∈ f.support then h s (hf H) else (not_mem_support_iff.1 H).symm ▸ zero_le (g s)\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : CanonicallyOrderedAddMonoid α\nf g : ι →₀ α\ns✝ : Finset ι\nhf : f.support ⊆ s✝\nh : ∀ (i : ι), i ∈ s✝ → ↑f i ≤ ↑g i\ns : ι\n⊢ ↑f s ≤ ↑g s\n[PROOFSTEP]\nexact if H : s ∈ f.support then h s (hf H) else (not_mem_support_iff.1 H).symm ▸ zero_le (g s)\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : CanonicallyOrderedAddMonoid α\ni : ι\nx : α\nf : ι →₀ α\n⊢ (∀ (i_1 : ι), i_1 ∈ {i} → ↑(single i x) i_1 ≤ ↑f i_1) ↔ x ≤ ↑f i\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nf g : ι →₀ α\ni : ι\na b : α\n⊢ single i (a - b) = single i a - single i b\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nf g : ι →₀ α\ni : ι\na b : α\nj : ι\n⊢ ↑(single i (a - b)) j = ↑(single i a - single i b) j\n[PROOFSTEP]\nobtain rfl | h := eq_or_ne i j\n[GOAL]\ncase h.inl\nι : Type u_1\nα : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nf g : ι →₀ α\ni : ι\na b : α\n⊢ ↑(single i (a - b)) i = ↑(single i a - single i b) i\n[PROOFSTEP]\nrw [tsub_apply, single_eq_same, single_eq_same, single_eq_same]\n[GOAL]\ncase h.inr\nι : Type u_1\nα : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nf g : ι →₀ α\ni : ι\na b : α\nj : ι\nh : i ≠ j\n⊢ ↑(single i (a - b)) j = ↑(single i a - single i b) j\n[PROOFSTEP]\nrw [tsub_apply, single_eq_of_ne h, single_eq_of_ne h, single_eq_of_ne h, tsub_self]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nf g : ι →₀ α\ni : ι\na b : α\nf1 f2 : ι →₀ α\n⊢ (f1 - f2).support ⊆ f1.support\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [subset_iff, tsub_eq_zero_iff_le, mem_support_iff, Ne.def, coe_tsub,\n  Pi.sub_apply, not_imp_not, zero_le, imp_true_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : CanonicallyOrderedAddMonoid α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\nf g : ι →₀ α\ni : ι\na b : α\ninst✝ : DecidableEq ι\nf1 f2 : ι →₀ α\n⊢ f1.support \\ f2.support ⊆ (f1 - f2).support\n[PROOFSTEP]\nsimp (config := { contextual := true }) [subset_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : CanonicallyLinearOrderedAddMonoid α\ninst✝ : DecidableEq ι\nf g : ι →₀ α\n⊢ (f ⊓ g).support = f.support ∩ g.support\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝¹ : CanonicallyLinearOrderedAddMonoid α\ninst✝ : DecidableEq ι\nf g : ι →₀ α\na✝ : ι\n⊢ a✝ ∈ (f ⊓ g).support ↔ a✝ ∈ f.support ∩ g.support\n[PROOFSTEP]\nsimp only [inf_apply, mem_support_iff, Ne.def, Finset.mem_union, Finset.mem_filter, Finset.mem_inter]\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝¹ : CanonicallyLinearOrderedAddMonoid α\ninst✝ : DecidableEq ι\nf g : ι →₀ α\na✝ : ι\n⊢ ¬↑f a✝ ⊓ ↑g a✝ = 0 ↔ ¬↑f a✝ = 0 ∧ ¬↑g a✝ = 0\n[PROOFSTEP]\nsimp only [inf_eq_min, ← nonpos_iff_eq_zero, min_le_iff, not_or]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : CanonicallyLinearOrderedAddMonoid α\ninst✝ : DecidableEq ι\nf g : ι →₀ α\n⊢ (f ⊔ g).support = f.support ∪ g.support\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝¹ : CanonicallyLinearOrderedAddMonoid α\ninst✝ : DecidableEq ι\nf g : ι →₀ α\na✝ : ι\n⊢ a✝ ∈ (f ⊔ g).support ↔ a✝ ∈ f.support ∪ g.support\n[PROOFSTEP]\nsimp only [Finset.mem_union, mem_support_iff, sup_apply, Ne.def, ← bot_eq_zero]\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝¹ : CanonicallyLinearOrderedAddMonoid α\ninst✝ : DecidableEq ι\nf g : ι →₀ α\na✝ : ι\n⊢ ¬↑f a✝ ⊔ ↑g a✝ = ⊥ ↔ ¬↑f a✝ = ⊥ ∨ ¬↑g a✝ = ⊥\n[PROOFSTEP]\nrw [_root_.sup_eq_bot_iff, not_and_or]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : CanonicallyLinearOrderedAddMonoid α\nf g : ι →₀ α\n⊢ Disjoint f g ↔ Disjoint f.support g.support\n[PROOFSTEP]\nclassical\nrw [disjoint_iff, disjoint_iff, Finsupp.bot_eq_zero, ← Finsupp.support_eq_empty, Finsupp.support_inf]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : CanonicallyLinearOrderedAddMonoid α\nf g : ι →₀ α\n⊢ Disjoint f g ↔ Disjoint f.support g.support\n[PROOFSTEP]\nrw [disjoint_iff, disjoint_iff, Finsupp.bot_eq_zero, ← Finsupp.support_eq_empty, Finsupp.support_inf]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : CanonicallyLinearOrderedAddMonoid α\nf g : ι →₀ α\n⊢ f.support ∩ g.support = ∅ ↔ f.support ⊓ g.support = ⊥\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Data.Finsupp.Order", "llama_tokens": 2983, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442251064863697, "lm_q2_score": 0.5583269943353744, "lm_q1q2_score": 0.35968826737992127}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ns : Set (α × β)\nf : Filter α\ng : Filter β\n⊢ s ∈ f ×ˢ g ↔ ∃ t₁, t₁ ∈ f ∧ ∃ t₂, t₂ ∈ g ∧ t₁ ×ˢ t₂ ⊆ s\n[PROOFSTEP]\nsimp only [SProd.sprod, Filter.prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ns : Set (α × β)\nf : Filter α\ng : Filter β\n⊢ s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁, t₁ ∈ f ∧ ∃ t₂, t₂ ∈ g ∧ prod t₁ t₂ ⊆ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ns : Set (α × β)\nf : Filter α\ng : Filter β\n⊢ s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁, t₁ ∈ f ∧ ∃ t₂, t₂ ∈ g ∧ prod t₁ t₂ ⊆ s\n[PROOFSTEP]\nrintro ⟨t₁, ⟨s₁, hs₁, hts₁⟩, t₂, ⟨s₂, hs₂, hts₂⟩, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\nt₁ : Set (α × β)\ns₁ : Set α\nhs₁ : s₁ ∈ f\nhts₁ : Prod.fst ⁻¹' s₁ ⊆ t₁\nt₂ : Set (α × β)\ns₂ : Set β\nhs₂ : s₂ ∈ g\nhts₂ : Prod.snd ⁻¹' s₂ ⊆ t₂\n⊢ ∃ t₁_1, t₁_1 ∈ f ∧ ∃ t₂_1, t₂_1 ∈ g ∧ prod t₁_1 t₂_1 ⊆ t₁ ∩ t₂\n[PROOFSTEP]\nexact ⟨s₁, hs₁, s₂, hs₂, fun p ⟨h, h'⟩ => ⟨hts₁ h, hts₂ h'⟩⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ns : Set (α × β)\nf : Filter α\ng : Filter β\n⊢ (∃ t₁, t₁ ∈ f ∧ ∃ t₂, t₂ ∈ g ∧ prod t₁ t₂ ⊆ s) → s ∈ comap Prod.fst f ⊓ comap Prod.snd g\n[PROOFSTEP]\nrintro ⟨t₁, ht₁, t₂, ht₂, h⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ns : Set (α × β)\nf : Filter α\ng : Filter β\nt₁ : Set α\nht₁ : t₁ ∈ f\nt₂ : Set β\nht₂ : t₂ ∈ g\nh : prod t₁ t₂ ⊆ s\n⊢ s ∈ comap Prod.fst f ⊓ comap Prod.snd g\n[PROOFSTEP]\nexact mem_inf_of_inter (preimage_mem_comap ht₁) (preimage_mem_comap ht₂) h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\ns : Set (α × β)\nt : Set β\n⊢ s ∈ f ×ˢ 𝓟 t ↔ {a | ∀ (b : β), b ∈ t → (a, b) ∈ s} ∈ f\n[PROOFSTEP]\nrw [← @exists_mem_subset_iff _ f, mem_prod_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\ns : Set (α × β)\nt : Set β\n⊢ (∃ t₁, t₁ ∈ f ∧ ∃ t₂, t₂ ∈ 𝓟 t ∧ t₁ ×ˢ t₂ ⊆ s) ↔ ∃ t_1, t_1 ∈ f ∧ t_1 ⊆ {a | ∀ (b : β), b ∈ t → (a, b) ∈ s}\n[PROOFSTEP]\nrefine' exists_congr fun u => Iff.rfl.and ⟨_, fun h => ⟨t, mem_principal_self t, _⟩⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\ns : Set (α × β)\nt : Set β\nu : Set α\n⊢ (∃ t₂, t₂ ∈ 𝓟 t ∧ u ×ˢ t₂ ⊆ s) → u ⊆ {a | ∀ (b : β), b ∈ t → (a, b) ∈ s}\n[PROOFSTEP]\nrintro ⟨v, v_in, hv⟩ a a_in b b_in\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\ns : Set (α × β)\nt : Set β\nu : Set α\nv : Set β\nv_in : v ∈ 𝓟 t\nhv : u ×ˢ v ⊆ s\na : α\na_in : a ∈ u\nb : β\nb_in : b ∈ t\n⊢ (a, b) ∈ s\n[PROOFSTEP]\nexact hv (mk_mem_prod a_in <| v_in b_in)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\ns : Set (α × β)\nt : Set β\nu : Set α\nh : u ⊆ {a | ∀ (b : β), b ∈ t → (a, b) ∈ s}\n⊢ u ×ˢ t ⊆ s\n[PROOFSTEP]\nrintro ⟨x, y⟩ ⟨hx, hy⟩\n[GOAL]\ncase refine'_2.mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\ns : Set (α × β)\nt : Set β\nu : Set α\nh : u ⊆ {a | ∀ (b : β), b ∈ t → (a, b) ∈ s}\nx : α\ny : β\nhx : (x, y).fst ∈ u\nhy : (x, y).snd ∈ t\n⊢ (x, y) ∈ s\n[PROOFSTEP]\nexact h hx y hy\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\ns : Set (α × β)\n⊢ s ∈ f ×ˢ ⊤ ↔ {a | ∀ (b : β), (a, b) ∈ s} ∈ f\n[PROOFSTEP]\nrw [← principal_univ, mem_prod_principal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\ns : Set (α × β)\n⊢ {a | ∀ (b : β), b ∈ univ → (a, b) ∈ s} ∈ f ↔ {a | ∀ (b : β), (a, b) ∈ s} ∈ f\n[PROOFSTEP]\nsimp only [mem_univ, forall_true_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf : Filter α\ng : Filter β\np : α × β → Prop\ns : Set β\n⊢ (∀ᶠ (x : α × β) in f ×ˢ 𝓟 s, p x) ↔ ∀ᶠ (x : α) in f, ∀ (y : β), y ∈ s → p (x, y)\n[PROOFSTEP]\nrw [eventually_iff, eventually_iff, mem_prod_principal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf : Filter α\ng : Filter β\np : α × β → Prop\ns : Set β\n⊢ {a | ∀ (b : β), b ∈ s → (a, b) ∈ {x | p x}} ∈ f ↔ {x | ∀ (y : β), y ∈ s → p (x, y)} ∈ f\n[PROOFSTEP]\nsimp only [mem_setOf_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : α → β × γ\nb : Filter β\nc : Filter γ\n⊢ comap f (b ×ˢ c) = comap (Prod.fst ∘ f) b ⊓ comap (Prod.snd ∘ f) c\n[PROOFSTEP]\nerw [comap_inf, Filter.comap_comap, Filter.comap_comap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\n⊢ f ×ˢ ⊤ = comap Prod.fst f\n[PROOFSTEP]\ndsimp only [SProd.sprod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\n⊢ Filter.prod f ⊤ = comap Prod.fst f\n[PROOFSTEP]\nrw [Filter.prod, comap_top, inf_top_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng✝ : Filter β\nf₁ f₂ : Filter α\ng : Filter β\n⊢ (f₁ ⊔ f₂) ×ˢ g = f₁ ×ˢ g ⊔ f₂ ×ˢ g\n[PROOFSTEP]\ndsimp only [SProd.sprod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng✝ : Filter β\nf₁ f₂ : Filter α\ng : Filter β\n⊢ Filter.prod (f₁ ⊔ f₂) g = Filter.prod f₁ g ⊔ Filter.prod f₂ g\n[PROOFSTEP]\nrw [Filter.prod, comap_sup, inf_sup_right, ← Filter.prod, ← Filter.prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\ng₁ g₂ : Filter β\n⊢ f ×ˢ (g₁ ⊔ g₂) = f ×ˢ g₁ ⊔ f ×ˢ g₂\n[PROOFSTEP]\ndsimp only [SProd.sprod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\ng₁ g₂ : Filter β\n⊢ Filter.prod f (g₁ ⊔ g₂) = Filter.prod f g₁ ⊔ Filter.prod f g₂\n[PROOFSTEP]\nrw [Filter.prod, comap_sup, inf_sup_left, ← Filter.prod, ← Filter.prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\np : α × β → Prop\nf : Filter α\ng : Filter β\n⊢ (∀ᶠ (x : α × β) in f ×ˢ g, p x) ↔\n    ∃ pa, (∀ᶠ (x : α) in f, pa x) ∧ ∃ pb, (∀ᶠ (y : β) in g, pb y) ∧ ∀ {x : α}, pa x → ∀ {y : β}, pb y → p (x, y)\n[PROOFSTEP]\nsimpa only [Set.prod_subset_iff] using @mem_prod_iff α β p f g\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\nla : Filter α\nlb : Filter β\np : α × β → Prop\nh : ∀ᶠ (x : α × β) in la ×ˢ lb, p x\n⊢ ∀ᶠ (x : α) in la, ∀ᶠ (y : β) in lb, p (x, y)\n[PROOFSTEP]\nrcases eventually_prod_iff.1 h with ⟨pa, ha, pb, hb, h⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\nla : Filter α\nlb : Filter β\np : α × β → Prop\nh✝ : ∀ᶠ (x : α × β) in la ×ˢ lb, p x\npa : α → Prop\nha : ∀ᶠ (x : α) in la, pa x\npb : β → Prop\nhb : ∀ᶠ (y : β) in lb, pb y\nh : ∀ {x : α}, pa x → ∀ {y : β}, pb y → p (x, y)\n⊢ ∀ᶠ (x : α) in la, ∀ᶠ (y : β) in lb, p (x, y)\n[PROOFSTEP]\nexact ha.mono fun a ha => hb.mono fun b hb => h ha hb\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\np : α × α → Prop\nh : ∀ᶠ (i : α × α) in f ×ˢ f, p i\n⊢ ∀ᶠ (i : α) in f, p (i, i)\n[PROOFSTEP]\nobtain ⟨t, ht, s, hs, hst⟩ := eventually_prod_iff.1 h\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\np : α × α → Prop\nh : ∀ᶠ (i : α × α) in f ×ˢ f, p i\nt : α → Prop\nht : ∀ᶠ (x : α) in f, t x\ns : α → Prop\nhs : ∀ᶠ (y : α) in f, s y\nhst : ∀ {x : α}, t x → ∀ {y : α}, s y → p (x, y)\n⊢ ∀ᶠ (i : α) in f, p (i, i)\n[PROOFSTEP]\napply (ht.and hs).mono fun x hx => hst hx.1 hx.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter γ\np : (α × α) × γ → Prop\n⊢ (∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x) → ∀ᶠ (x : α × γ) in f ×ˢ g, p ((x.fst, x.fst), x.snd)\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter γ\np : (α × α) × γ → Prop\nh : ∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x\n⊢ ∀ᶠ (x : α × γ) in f ×ˢ g, p ((x.fst, x.fst), x.snd)\n[PROOFSTEP]\nobtain ⟨t, ht, s, hs, hst⟩ := eventually_prod_iff.1 h\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter γ\np : (α × α) × γ → Prop\nh : ∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x\nt : α × α → Prop\nht : ∀ᶠ (x : α × α) in f ×ˢ f, t x\ns : γ → Prop\nhs : ∀ᶠ (y : γ) in g, s y\nhst : ∀ {x : α × α}, t x → ∀ {y : γ}, s y → p (x, y)\n⊢ ∀ᶠ (x : α × γ) in f ×ˢ g, p ((x.fst, x.fst), x.snd)\n[PROOFSTEP]\nrefine' (ht.diag_of_prod.prod_mk hs).mono fun x hx => by simp only [hst hx.1 hx.2, Prod.mk.eta]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter γ\np : (α × α) × γ → Prop\nh : ∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x\nt : α × α → Prop\nht : ∀ᶠ (x : α × α) in f ×ˢ f, t x\ns : γ → Prop\nhs : ∀ᶠ (y : γ) in g, s y\nhst : ∀ {x : α × α}, t x → ∀ {y : γ}, s y → p (x, y)\nx : α × γ\nhx : t (x.fst, x.fst) ∧ s x.snd\n⊢ p ((x.fst, x.fst), x.snd)\n[PROOFSTEP]\nsimp only [hst hx.1 hx.2, Prod.mk.eta]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter γ\np : α × γ × γ → Prop\n⊢ (∀ᶠ (x : α × γ × γ) in f ×ˢ g ×ˢ g, p x) → ∀ᶠ (x : α × γ) in f ×ˢ g, p (x.fst, x.snd, x.snd)\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter γ\np : α × γ × γ → Prop\nh : ∀ᶠ (x : α × γ × γ) in f ×ˢ g ×ˢ g, p x\n⊢ ∀ᶠ (x : α × γ) in f ×ˢ g, p (x.fst, x.snd, x.snd)\n[PROOFSTEP]\nobtain ⟨t, ht, s, hs, hst⟩ := eventually_prod_iff.1 h\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter γ\np : α × γ × γ → Prop\nh : ∀ᶠ (x : α × γ × γ) in f ×ˢ g ×ˢ g, p x\nt : α → Prop\nht : ∀ᶠ (x : α) in f, t x\ns : γ × γ → Prop\nhs : ∀ᶠ (y : γ × γ) in g ×ˢ g, s y\nhst : ∀ {x : α}, t x → ∀ {y : γ × γ}, s y → p (x, y)\n⊢ ∀ᶠ (x : α × γ) in f ×ˢ g, p (x.fst, x.snd, x.snd)\n[PROOFSTEP]\nrefine' (ht.prod_mk hs.diag_of_prod).mono fun x hx => by simp only [hst hx.1 hx.2, Prod.mk.eta]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter γ\np : α × γ × γ → Prop\nh : ∀ᶠ (x : α × γ × γ) in f ×ˢ g ×ˢ g, p x\nt : α → Prop\nht : ∀ᶠ (x : α) in f, t x\ns : γ × γ → Prop\nhs : ∀ᶠ (y : γ × γ) in g ×ˢ g, s y\nhst : ∀ {x : α}, t x → ∀ {y : γ × γ}, s y → p (x, y)\nx : α × γ\nhx : t x.fst ∧ s (x.snd, x.snd)\n⊢ p (x.fst, x.snd, x.snd)\n[PROOFSTEP]\nsimp only [hst hx.1 hx.2, Prod.mk.eta]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ninst✝ : Nonempty ι\nf : ι → Filter α\ng : Filter β\n⊢ (⨅ (i : ι), f i) ×ˢ g = ⨅ (i : ι), f i ×ˢ g\n[PROOFSTEP]\ndsimp only [SProd.sprod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ninst✝ : Nonempty ι\nf : ι → Filter α\ng : Filter β\n⊢ Filter.prod (⨅ (i : ι), f i) g = ⨅ (i : ι), Filter.prod (f i) g\n[PROOFSTEP]\nrw [Filter.prod, comap_iInf, iInf_inf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ninst✝ : Nonempty ι\nf : ι → Filter α\ng : Filter β\n⊢ ⨅ (x : ι), comap Prod.fst (f x) ⊓ comap Prod.snd g = ⨅ (i : ι), Filter.prod (f i) g\n[PROOFSTEP]\nsimp only [Filter.prod, eq_self_iff_true]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ninst✝ : Nonempty ι\nf : Filter α\ng : ι → Filter β\n⊢ f ×ˢ ⨅ (i : ι), g i = ⨅ (i : ι), f ×ˢ g i\n[PROOFSTEP]\ndsimp only [SProd.sprod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ninst✝ : Nonempty ι\nf : Filter α\ng : ι → Filter β\n⊢ Filter.prod f (⨅ (i : ι), g i) = ⨅ (i : ι), Filter.prod f (g i)\n[PROOFSTEP]\nrw [Filter.prod, comap_iInf, inf_iInf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ninst✝ : Nonempty ι\nf : Filter α\ng : ι → Filter β\n⊢ ⨅ (x : ι), comap Prod.fst f ⊓ comap Prod.snd (g x) = ⨅ (i : ι), Filter.prod f (g i)\n[PROOFSTEP]\nsimp only [Filter.prod, eq_self_iff_true]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\nα₁ : Type u\nα₂ : Type v\nβ₁ : Type w\nβ₂ : Type x\nf₁ : Filter α₁\nf₂ : Filter α₂\nm₁ : β₁ → α₁\nm₂ : β₂ → α₂\n⊢ comap m₁ f₁ ×ˢ comap m₂ f₂ = comap (fun p => (m₁ p.fst, m₂ p.snd)) (f₁ ×ˢ f₂)\n[PROOFSTEP]\nsimp only [SProd.sprod, Filter.prod, comap_comap, comap_inf, (· ∘ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\n⊢ f ×ˢ g = comap Prod.swap (g ×ˢ f)\n[PROOFSTEP]\nsimp only [SProd.sprod, Filter.prod, comap_comap, (· ∘ ·), inf_comm, Prod.swap, comap_inf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\n⊢ f ×ˢ g = map (fun p => (p.snd, p.fst)) (g ×ˢ f)\n[PROOFSTEP]\nrw [prod_comm', ← map_swap_eq_comap_swap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\n⊢ Prod.swap <$> (g ×ˢ f) = map (fun p => (p.snd, p.fst)) (g ×ˢ f)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ns : Set (α × β)\nf : Filter α\ng : Filter β\n⊢ s ∈ f ×ˢ g ↔ ∃ t, t ∈ f ∧ ∀ᶠ (y : β) in g, ∀ (x : α), x ∈ t → (x, y) ∈ s\n[PROOFSTEP]\nsimp only [mem_prod_iff, prod_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ns : Set (α × β)\nf : Filter α\ng : Filter β\n⊢ (∃ t₁, t₁ ∈ f ∧ ∃ t₂, t₂ ∈ g ∧ ∀ (x : α), x ∈ t₁ → ∀ (y : β), y ∈ t₂ → (x, y) ∈ s) ↔\n    ∃ t, t ∈ f ∧ ∀ᶠ (y : β) in g, ∀ (x : α), x ∈ t → (x, y) ∈ s\n[PROOFSTEP]\nrefine exists_congr fun _ => Iff.rfl.and <| Iff.trans ?_ exists_mem_subset_iff\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ns : Set (α × β)\nf : Filter α\ng : Filter β\nx✝ : Set α\n⊢ (∃ t₂, t₂ ∈ g ∧ ∀ (x : α), x ∈ x✝ → ∀ (y : β), y ∈ t₂ → (x, y) ∈ s) ↔\n    ∃ t, t ∈ g ∧ t ⊆ {x | (fun y => ∀ (x : α), x ∈ x✝ → (x, y) ∈ s) x}\n[PROOFSTEP]\nexact exists_congr fun _ => Iff.rfl.and forall₂_swap\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ns : Set (α × β)\nf : Filter α\ng : Filter β\n⊢ s ∈ f ×ˢ g ↔ ∃ t, t ∈ g ∧ ∀ᶠ (x : α) in f, ∀ (y : β), y ∈ t → (x, y) ∈ s\n[PROOFSTEP]\nrw [prod_comm, mem_map, mem_prod_iff_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\ns : Set (α × β)\nf : Filter α\ng : Filter β\n⊢ (∃ t, t ∈ g ∧ ∀ᶠ (y : α) in f, ∀ (x : β), x ∈ t → (x, y) ∈ (fun p => (p.snd, p.fst)) ⁻¹' s) ↔\n    ∃ t, t ∈ g ∧ ∀ᶠ (x : α) in f, ∀ (y : β), y ∈ t → (x, y) ∈ s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\ninst✝ : NeBot g\n⊢ map Prod.fst (f ×ˢ g) = f\n[PROOFSTEP]\next s\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\ninst✝ : NeBot g\ns : Set α\n⊢ s ∈ map Prod.fst (f ×ˢ g) ↔ s ∈ f\n[PROOFSTEP]\nsimp only [mem_map, mem_prod_iff_left, mem_preimage, eventually_const, ← subset_def, exists_mem_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\ninst✝ : NeBot f\n⊢ map Prod.snd (f ×ˢ g) = g\n[PROOFSTEP]\nrw [prod_comm, map_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\ninst✝ : NeBot f\n⊢ map (Prod.snd ∘ fun p => (p.snd, p.fst)) (g ×ˢ f) = g\n[PROOFSTEP]\napply map_fst_prod\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\nf₁ f₂ : Filter α\ng₁ g₂ : Filter β\ninst✝¹ : NeBot f₁\ninst✝ : NeBot g₁\n⊢ f₁ ×ˢ g₁ = f₂ ×ˢ g₂ ↔ f₁ = f₂ ∧ g₁ = g₂\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => h.1 ▸ h.2 ▸ rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\nf₁ f₂ : Filter α\ng₁ g₂ : Filter β\ninst✝¹ : NeBot f₁\ninst✝ : NeBot g₁\nh : f₁ ×ˢ g₁ = f₂ ×ˢ g₂\n⊢ f₁ = f₂ ∧ g₁ = g₂\n[PROOFSTEP]\nhave hle : f₁ ≤ f₂ ∧ g₁ ≤ g₂ := prod_le_prod.1 h.le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\nf₁ f₂ : Filter α\ng₁ g₂ : Filter β\ninst✝¹ : NeBot f₁\ninst✝ : NeBot g₁\nh : f₁ ×ˢ g₁ = f₂ ×ˢ g₂\nhle : f₁ ≤ f₂ ∧ g₁ ≤ g₂\n⊢ f₁ = f₂ ∧ g₁ = g₂\n[PROOFSTEP]\nhaveI := neBot_of_le hle.1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\nf₁ f₂ : Filter α\ng₁ g₂ : Filter β\ninst✝¹ : NeBot f₁\ninst✝ : NeBot g₁\nh : f₁ ×ˢ g₁ = f₂ ×ˢ g₂\nhle : f₁ ≤ f₂ ∧ g₁ ≤ g₂\nthis : NeBot f₂\n⊢ f₁ = f₂ ∧ g₁ = g₂\n[PROOFSTEP]\nhaveI := neBot_of_le hle.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\nf₁ f₂ : Filter α\ng₁ g₂ : Filter β\ninst✝¹ : NeBot f₁\ninst✝ : NeBot g₁\nh : f₁ ×ˢ g₁ = f₂ ×ˢ g₂\nhle : f₁ ≤ f₂ ∧ g₁ ≤ g₂\nthis✝ : NeBot f₂\nthis : NeBot g₂\n⊢ f₁ = f₂ ∧ g₁ = g₂\n[PROOFSTEP]\nexact ⟨hle.1.antisymm <| (prod_le_prod.1 h.ge).1, hle.2.antisymm <| (prod_le_prod.1 h.ge).2⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\np : α × β → Prop\n⊢ (∀ᶠ (x : α × β) in f ×ˢ g, p x) ↔ ∀ᶠ (y : β × α) in g ×ˢ f, p (Prod.swap y)\n[PROOFSTEP]\nrw [prod_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\np : α × β → Prop\n⊢ (∀ᶠ (x : α × β) in map (fun p => (p.snd, p.fst)) (g ×ˢ f), p x) ↔ ∀ᶠ (y : β × α) in g ×ˢ f, p (Prod.swap y)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\nh : Filter γ\n⊢ map (↑(Equiv.prodAssoc α β γ)) ((f ×ˢ g) ×ˢ h) = f ×ˢ g ×ˢ h\n[PROOFSTEP]\nsimp_rw [← comap_equiv_symm, SProd.sprod, Filter.prod, comap_inf, comap_comap, inf_assoc, (· ∘ ·),\n  Equiv.prodAssoc_symm_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\nh : Filter γ\n⊢ map (↑(Equiv.prodAssoc α β γ).symm) (f ×ˢ g ×ˢ h) = (f ×ˢ g) ×ˢ h\n[PROOFSTEP]\nsimp_rw [map_equiv_symm, SProd.sprod, Filter.prod, comap_inf, comap_comap, inf_assoc, Function.comp,\n  Equiv.prodAssoc_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\nh : Filter γ\nk : Filter δ\n⊢ map (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ((f ×ˢ g) ×ˢ h ×ˢ k) = (f ×ˢ h) ×ˢ g ×ˢ k\n[PROOFSTEP]\nsimp_rw [map_swap4_eq_comap, SProd.sprod, Filter.prod, comap_inf, comap_comap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\nh : Filter γ\nk : Filter δ\n⊢ comap ((Prod.fst ∘ Prod.fst) ∘ fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) f ⊓\n        comap ((Prod.snd ∘ Prod.fst) ∘ fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) g ⊓\n      (comap ((Prod.fst ∘ Prod.snd) ∘ fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) h ⊓\n        comap ((Prod.snd ∘ Prod.snd) ∘ fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) k) =\n    comap (Prod.fst ∘ Prod.fst) f ⊓ comap (Prod.snd ∘ Prod.fst) h ⊓\n      (comap (Prod.fst ∘ Prod.snd) g ⊓ comap (Prod.snd ∘ Prod.snd) k)\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf : Filter α\ng : Filter β\nα₁ : Type u\nα₂ : Type v\nβ₁ : Type w\nβ₂ : Type x\nf₁ : Filter α₁\nf₂ : Filter α₂\nm₁ : α₁ → β₁\nm₂ : α₂ → β₂\ns : Set (β₁ × β₂)\nhs : (fun p => (m₁ p.fst, m₂ p.snd)) ⁻¹' s ∈ f₁ ×ˢ f₂\ns₁ : Set α₁\nhs₁ : s₁ ∈ f₁\ns₂ : Set α₂\nhs₂ : s₂ ∈ f₂\nh : s₁ ×ˢ s₂ ⊆ (fun p => (m₁ p.fst, m₂ p.snd)) ⁻¹' s\n⊢ (m₁ '' s₁) ×ˢ (m₂ '' s₂) ⊆ s\n[PROOFSTEP]\nrwa [prod_image_image_eq, image_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : α → β\nF : Filter α\nG : Filter γ\n⊢ map f F ×ˢ G = map (Prod.map f id) (F ×ˢ G)\n[PROOFSTEP]\nrw [← prod_map_map_eq', map_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : β → γ\nF : Filter α\nG : Filter β\n⊢ F ×ˢ map f G = map (Prod.map id f) (F ×ˢ G)\n[PROOFSTEP]\nrw [← prod_map_map_eq', map_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ✝ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nδ : Type u_6\nf : α → γ\ng : β → δ\na : Filter α\nb : Filter β\nc : Filter γ\nd : Filter δ\nhf : Tendsto f a c\nhg : Tendsto g b d\n⊢ Tendsto (Prod.map f g) (a ×ˢ b) (c ×ˢ d)\n[PROOFSTEP]\nerw [Tendsto, ← prod_map_map_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ✝ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nδ : Type u_6\nf : α → γ\ng : β → δ\na : Filter α\nb : Filter β\nc : Filter γ\nd : Filter δ\nhf : Tendsto f a c\nhg : Tendsto g b d\n⊢ map f a ×ˢ map g b ≤ c ×ˢ d\n[PROOFSTEP]\nexact Filter.prod_mono hf hg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nm : α × β → γ\nf : Filter α\ng : Filter β\n⊢ map m (f ×ˢ g) = seq (map (fun a b => m (a, b)) f) g\n[PROOFSTEP]\nsimp [Filter.ext_iff, mem_prod_iff, mem_map_seq_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nm : α × β → γ\nf : Filter α\ng : Filter β\n⊢ ∀ (s : Set γ),\n    (∃ t₁, t₁ ∈ f ∧ ∃ t₂, t₂ ∈ g ∧ t₁ ×ˢ t₂ ⊆ m ⁻¹' s) ↔\n      ∃ t, t ∈ g ∧ ∃ x, x ∈ f ∧ ∀ (x_1 : α), x_1 ∈ x → ∀ (y : β), y ∈ t → m (x_1, y) ∈ s\n[PROOFSTEP]\nintro s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nm : α × β → γ\nf : Filter α\ng : Filter β\ns : Set γ\n⊢ (∃ t₁, t₁ ∈ f ∧ ∃ t₂, t₂ ∈ g ∧ t₁ ×ˢ t₂ ⊆ m ⁻¹' s) ↔\n    ∃ t, t ∈ g ∧ ∃ x, x ∈ f ∧ ∀ (x_1 : α), x_1 ∈ x → ∀ (y : β), y ∈ t → m (x_1, y) ∈ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nm : α × β → γ\nf : Filter α\ng : Filter β\ns : Set γ\n⊢ (∃ t₁, t₁ ∈ f ∧ ∃ t₂, t₂ ∈ g ∧ t₁ ×ˢ t₂ ⊆ m ⁻¹' s) →\n    ∃ t, t ∈ g ∧ ∃ x, x ∈ f ∧ ∀ (x_1 : α), x_1 ∈ x → ∀ (y : β), y ∈ t → m (x_1, y) ∈ s\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nm : α × β → γ\nf : Filter α\ng : Filter β\ns : Set γ\n⊢ (∃ t, t ∈ g ∧ ∃ x, x ∈ f ∧ ∀ (x_1 : α), x_1 ∈ x → ∀ (y : β), y ∈ t → m (x_1, y) ∈ s) →\n    ∃ t₁, t₁ ∈ f ∧ ∃ t₂, t₂ ∈ g ∧ t₁ ×ˢ t₂ ⊆ m ⁻¹' s\n[PROOFSTEP]\nexact fun ⟨t, ht, s, hs, h⟩ => ⟨s, hs, t, ht, fun x hx y hy => @h ⟨x, y⟩ ⟨hx, hy⟩⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nm : α × β → γ\nf : Filter α\ng : Filter β\ns : Set γ\n⊢ (∃ t, t ∈ g ∧ ∃ x, x ∈ f ∧ ∀ (x_1 : α), x_1 ∈ x → ∀ (y : β), y ∈ t → m (x_1, y) ∈ s) →\n    ∃ t₁, t₁ ∈ f ∧ ∃ t₂, t₂ ∈ g ∧ t₁ ×ˢ t₂ ⊆ m ⁻¹' s\n[PROOFSTEP]\nexact fun ⟨s, hs, t, ht, h⟩ => ⟨t, ht, s, hs, fun ⟨x, y⟩ ⟨hx, hy⟩ => h x hx y hy⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\n⊢ f ×ˢ g = seq (map Prod.mk f) g\n[PROOFSTEP]\nhave h := f.map_prod id g\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\nh : map id (f ×ˢ g) = seq (map (fun a b => id (a, b)) f) g\n⊢ f ×ˢ g = seq (map Prod.mk f) g\n[PROOFSTEP]\nrwa [map_id] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\nf₁ f₂ : Filter α\ng₁ g₂ : Filter β\n⊢ f₁ ×ˢ g₁ ⊓ f₂ ×ˢ g₂ = (f₁ ⊓ f₂) ×ˢ (g₁ ⊓ g₂)\n[PROOFSTEP]\nsimp only [SProd.sprod, Filter.prod, comap_inf, inf_comm, inf_assoc, inf_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng✝ : Filter β\nf₁ f₂ : Filter α\ng : Filter β\n⊢ (f₁ ⊓ f₂) ×ˢ g = f₁ ×ˢ g ⊓ f₂ ×ˢ g\n[PROOFSTEP]\nrw [prod_inf_prod, inf_idem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\ng₁ g₂ : Filter β\n⊢ f ×ˢ (g₁ ⊓ g₂) = f ×ˢ g₁ ⊓ f ×ˢ g₂\n[PROOFSTEP]\nrw [prod_inf_prod, inf_idem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf : Filter α\ng : Filter β\ns : Set α\nt : Set β\n⊢ 𝓟 s ×ˢ 𝓟 t = 𝓟 (s ×ˢ t)\n[PROOFSTEP]\nsimp only [SProd.sprod, Filter.prod, comap_principal, principal_eq_iff_eq, comap_principal, inf_principal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt✝ : Set β\nf : Filter α\ng : Filter β\ns : Set α\nt : Set β\n⊢ Prod.fst ⁻¹' s ∩ Prod.snd ⁻¹' t = prod s t\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\na : α\nf : Filter β\n⊢ pure a ×ˢ f = map (Prod.mk a) f\n[PROOFSTEP]\nrw [prod_eq, map_pure, pure_seq_eq_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : α → β → γ\na : α\nB : Filter β\n⊢ map (Function.uncurry f) (pure a ×ˢ B) = map (f a) B\n[PROOFSTEP]\nrw [Filter.pure_prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : α → β → γ\na : α\nB : Filter β\n⊢ map (Function.uncurry f) (map (Prod.mk a) B) = map (f a) B\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\nb : β\n⊢ f ×ˢ pure b = map (fun a => (a, b)) f\n[PROOFSTEP]\nrw [prod_eq, seq_pure, map_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : Filter α\nb : β\n⊢ map ((fun g => g b) ∘ Prod.mk) f = map (fun a => (a, b)) f\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf : Filter α\ng : Filter β\na : α\nb : β\n⊢ pure a ×ˢ pure b = pure (a, b)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\n⊢ f ×ˢ g = ⊥ ↔ f = ⊥ ∨ g = ⊥\n[PROOFSTEP]\nsimp_rw [← empty_mem_iff_bot, mem_prod_iff, subset_empty_iff, prod_eq_empty_iff, ← exists_prop, Subtype.exists',\n  exists_or, exists_const, Subtype.exists, exists_prop, exists_eq_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\n⊢ NeBot (f ×ˢ g) ↔ NeBot f ∧ NeBot g\n[PROOFSTEP]\nsimp only [neBot_iff, Ne, prod_eq_bot, not_or]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng : Filter β\nf : α × β → γ\nx : Filter α\ny : Filter β\nz : Filter γ\n⊢ Tendsto f (x ×ˢ y) z ↔\n    ∀ (W : Set γ), W ∈ z → ∃ U, U ∈ x ∧ ∃ V, V ∈ y ∧ ∀ (x : α) (y : β), x ∈ U → y ∈ V → f (x, y) ∈ W\n[PROOFSTEP]\nsimp only [tendsto_def, mem_prod_iff, prod_sub_preimage_iff, exists_prop, iff_self_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter (α × β)\ng : Filter α\ng' : Filter β\n⊢ f ≤ g ×ˢ g' ↔ Tendsto Prod.fst f g ∧ Tendsto Prod.snd f g'\n[PROOFSTEP]\ndsimp only [SProd.sprod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter (α × β)\ng : Filter α\ng' : Filter β\n⊢ f ≤ Filter.prod g g' ↔ Tendsto Prod.fst f g ∧ Tendsto Prod.snd f g'\n[PROOFSTEP]\nunfold Filter.prod\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter (α × β)\ng : Filter α\ng' : Filter β\n⊢ f ≤ comap Prod.fst g ⊓ comap Prod.snd g' ↔ Tendsto Prod.fst f g ∧ Tendsto Prod.snd f g'\n[PROOFSTEP]\nsimp only [le_inf_iff, ← map_le_iff_le_comap, Tendsto]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\ng' : Filter γ\ns : α → β × γ\n⊢ Tendsto s f (g ×ˢ g') ↔ Tendsto (fun n => (s n).fst) f g ∧ Tendsto (fun n => (s n).snd) f g'\n[PROOFSTEP]\ndsimp only [SProd.sprod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\ng' : Filter γ\ns : α → β × γ\n⊢ Tendsto s f (Filter.prod g g') ↔ Tendsto (fun n => (s n).fst) f g ∧ Tendsto (fun n => (s n).snd) f g'\n[PROOFSTEP]\nunfold Filter.prod\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\ns✝ : Set α\nt : Set β\nf✝ : Filter α\ng✝ : Filter β\nf : Filter α\ng : Filter β\ng' : Filter γ\ns : α → β × γ\n⊢ Tendsto s f (comap Prod.fst g ⊓ comap Prod.snd g') ↔\n    Tendsto (fun n => (s n).fst) f g ∧ Tendsto (fun n => (s n).snd) f g'\n[PROOFSTEP]\nsimp only [tendsto_inf, tendsto_comap_iff, (· ∘ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf✝ : Filter α\ng✝ : Filter β\ns : Set (α × β)\nf : Filter α\ng : Filter β\n⊢ s ∈ Filter.coprod f g ↔ (∃ t₁, t₁ ∈ f ∧ Prod.fst ⁻¹' t₁ ⊆ s) ∧ ∃ t₂, t₂ ∈ g ∧ Prod.snd ⁻¹' t₂ ⊆ s\n[PROOFSTEP]\nsimp [Filter.coprod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf : Filter α\ng l : Filter β\n⊢ Filter.coprod ⊥ l = comap Prod.snd l\n[PROOFSTEP]\nsimp [Filter.coprod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf : Filter α\ng : Filter β\nl : Filter α\n⊢ Filter.coprod l ⊥ = comap Prod.fst l\n[PROOFSTEP]\nsimp [Filter.coprod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf : Filter α\ng : Filter β\n⊢ Filter.coprod ⊥ ⊥ = ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf : Filter α\ng : Filter β\ns : Set (α × β)\nla : Filter α\nlb : Filter β\n⊢ sᶜ ∈ Filter.coprod la lb ↔ (Prod.fst '' s)ᶜ ∈ la ∧ (Prod.snd '' s)ᶜ ∈ lb\n[PROOFSTEP]\nsimp only [Filter.coprod, mem_sup, compl_mem_comap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf : Filter α\ng : Filter β\n⊢ NeBot (Filter.coprod f g) ↔ NeBot f ∧ Nonempty β ∨ Nonempty α ∧ NeBot g\n[PROOFSTEP]\nsimp [Filter.coprod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf : Filter α\ng : Filter β\ns : Set α\nt : Set β\n⊢ Filter.coprod (𝓟 s) (𝓟 t) = 𝓟 (sᶜ ×ˢ tᶜ)ᶜ\n[PROOFSTEP]\nrw [Filter.coprod, comap_principal, comap_principal, sup_principal, Set.prod_eq, compl_inter, preimage_compl,\n  preimage_compl, compl_compl, compl_compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf : Filter α\ng : Filter β\nα₁ : Type u\nα₂ : Type v\nβ₁ : Type w\nβ₂ : Type x\nf₁ : Filter α₁\nf₂ : Filter α₂\nm₁ : α₁ → β₁\nm₂ : α₂ → β₂\n⊢ map (Prod.map m₁ m₂) (Filter.coprod f₁ f₂) ≤ Filter.coprod (map m₁ f₁) (map m₂ f₂)\n[PROOFSTEP]\nintro s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf : Filter α\ng : Filter β\nα₁ : Type u\nα₂ : Type v\nβ₁ : Type w\nβ₂ : Type x\nf₁ : Filter α₁\nf₂ : Filter α₂\nm₁ : α₁ → β₁\nm₂ : α₂ → β₂\ns : Set (β₁ × β₂)\n⊢ s ∈ Filter.coprod (map m₁ f₁) (map m₂ f₂) → s ∈ map (Prod.map m₁ m₂) (Filter.coprod f₁ f₂)\n[PROOFSTEP]\nsimp only [mem_map, mem_coprod_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf : Filter α\ng : Filter β\nα₁ : Type u\nα₂ : Type v\nβ₁ : Type w\nβ₂ : Type x\nf₁ : Filter α₁\nf₂ : Filter α₂\nm₁ : α₁ → β₁\nm₂ : α₂ → β₂\ns : Set (β₁ × β₂)\n⊢ ((∃ t₁, m₁ ⁻¹' t₁ ∈ f₁ ∧ Prod.fst ⁻¹' t₁ ⊆ s) ∧ ∃ t₂, m₂ ⁻¹' t₂ ∈ f₂ ∧ Prod.snd ⁻¹' t₂ ⊆ s) →\n    (∃ t₁, t₁ ∈ f₁ ∧ Prod.fst ⁻¹' t₁ ⊆ Prod.map m₁ m₂ ⁻¹' s) ∧ ∃ t₂, t₂ ∈ f₂ ∧ Prod.snd ⁻¹' t₂ ⊆ Prod.map m₁ m₂ ⁻¹' s\n[PROOFSTEP]\nrintro ⟨⟨u₁, hu₁, h₁⟩, u₂, hu₂, h₂⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf : Filter α\ng : Filter β\nα₁ : Type u\nα₂ : Type v\nβ₁ : Type w\nβ₂ : Type x\nf₁ : Filter α₁\nf₂ : Filter α₂\nm₁ : α₁ → β₁\nm₂ : α₂ → β₂\ns : Set (β₁ × β₂)\nu₁ : Set β₁\nhu₁ : m₁ ⁻¹' u₁ ∈ f₁\nh₁ : Prod.fst ⁻¹' u₁ ⊆ s\nu₂ : Set β₂\nhu₂ : m₂ ⁻¹' u₂ ∈ f₂\nh₂ : Prod.snd ⁻¹' u₂ ⊆ s\n⊢ (∃ t₁, t₁ ∈ f₁ ∧ Prod.fst ⁻¹' t₁ ⊆ Prod.map m₁ m₂ ⁻¹' s) ∧ ∃ t₂, t₂ ∈ f₂ ∧ Prod.snd ⁻¹' t₂ ⊆ Prod.map m₁ m₂ ⁻¹' s\n[PROOFSTEP]\nrefine' ⟨⟨m₁ ⁻¹' u₁, hu₁, fun _ hx => h₁ _⟩, ⟨m₂ ⁻¹' u₂, hu₂, fun _ hx => h₂ _⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf : Filter α\ng : Filter β\nα₁ : Type u\nα₂ : Type v\nβ₁ : Type w\nβ₂ : Type x\nf₁ : Filter α₁\nf₂ : Filter α₂\nm₁ : α₁ → β₁\nm₂ : α₂ → β₂\ns : Set (β₁ × β₂)\nu₁ : Set β₁\nhu₁ : m₁ ⁻¹' u₁ ∈ f₁\nh₁ : Prod.fst ⁻¹' u₁ ⊆ s\nu₂ : Set β₂\nhu₂ : m₂ ⁻¹' u₂ ∈ f₂\nh₂ : Prod.snd ⁻¹' u₂ ⊆ s\nx✝ : α₁ × α₂\nhx : x✝ ∈ Prod.fst ⁻¹' (m₁ ⁻¹' u₁)\n⊢ Prod.map m₁ m₂ x✝ ∈ Prod.fst ⁻¹' u₁\n[PROOFSTEP]\nconvert hx\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι : Sort u_5\nf : Filter α\ng : Filter β\nα₁ : Type u\nα₂ : Type v\nβ₁ : Type w\nβ₂ : Type x\nf₁ : Filter α₁\nf₂ : Filter α₂\nm₁ : α₁ → β₁\nm₂ : α₂ → β₂\ns : Set (β₁ × β₂)\nu₁ : Set β₁\nhu₁ : m₁ ⁻¹' u₁ ∈ f₁\nh₁ : Prod.fst ⁻¹' u₁ ⊆ s\nu₂ : Set β₂\nhu₂ : m₂ ⁻¹' u₂ ∈ f₂\nh₂ : Prod.snd ⁻¹' u₂ ⊆ s\nx✝ : α₁ × α₂\nhx : x✝ ∈ Prod.snd ⁻¹' (m₂ ⁻¹' u₂)\n⊢ Prod.map m₁ m₂ x✝ ∈ Prod.snd ⁻¹' u₂\n[PROOFSTEP]\nconvert hx\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι✝ : Sort u_5\nf : Filter α✝\ng : Filter β✝\nα : Type u_6\nβ : Type u_7\nι : Type u_8\na : α\nb : β\ni : ι\n⊢ Filter.coprod (map (fun x => b) (𝓟 {a})) (map id (𝓟 {i})) = 𝓟 ({b} ×ˢ univ ∪ univ ×ˢ {i})\n[PROOFSTEP]\nsimp only [map_principal, Filter.coprod, comap_principal, sup_principal, image_singleton, image_id, prod_univ,\n  univ_prod, id]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι✝ : Sort u_5\nf : Filter α✝\ng : Filter β✝\nα : Type u_6\nβ : Type u_7\nι : Type u_8\na : α\nb : β\ni : ι\n⊢ map (Prod.map (fun x => b) id) (Filter.coprod (𝓟 {a}) (𝓟 {i})) = 𝓟 ({b} ×ˢ univ)\n[PROOFSTEP]\nrw [principal_coprod_principal, map_principal]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι✝ : Sort u_5\nf : Filter α✝\ng : Filter β✝\nα : Type u_6\nβ : Type u_7\nι : Type u_8\na : α\nb : β\ni : ι\n⊢ 𝓟 (Prod.map (fun x => b) id '' ({a}ᶜ ×ˢ {i}ᶜ)ᶜ) = 𝓟 ({b} ×ˢ univ)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_s\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι✝ : Sort u_5\nf : Filter α✝\ng : Filter β✝\nα : Type u_6\nβ : Type u_7\nι : Type u_8\na : α\nb : β\ni : ι\n⊢ Prod.map (fun x => b) id '' ({a}ᶜ ×ˢ {i}ᶜ)ᶜ = {b} ×ˢ univ\n[PROOFSTEP]\next ⟨b', i'⟩\n[GOAL]\ncase e_s.h.mk\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι✝ : Sort u_5\nf : Filter α✝\ng : Filter β✝\nα : Type u_6\nβ : Type u_7\nι : Type u_8\na : α\nb : β\ni : ι\nb' : β\ni' : ι\n⊢ (b', i') ∈ Prod.map (fun x => b) id '' ({a}ᶜ ×ˢ {i}ᶜ)ᶜ ↔ (b', i') ∈ {b} ×ˢ univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase e_s.h.mk.mp\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι✝ : Sort u_5\nf : Filter α✝\ng : Filter β✝\nα : Type u_6\nβ : Type u_7\nι : Type u_8\na : α\nb : β\ni : ι\nb' : β\ni' : ι\n⊢ (b', i') ∈ Prod.map (fun x => b) id '' ({a}ᶜ ×ˢ {i}ᶜ)ᶜ → (b', i') ∈ {b} ×ˢ univ\n[PROOFSTEP]\nrintro ⟨⟨a'', i''⟩, _, h₂, h₃⟩\n[GOAL]\ncase e_s.h.mk.mp.intro.mk.intro.refl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι✝ : Sort u_5\nf : Filter α✝\ng : Filter β✝\nα : Type u_6\nβ : Type u_7\nι : Type u_8\na : α\nb : β\ni : ι\na'' : α\ni'' : ι\nleft✝ : (a'', i'') ∈ ({a}ᶜ ×ˢ {i}ᶜ)ᶜ\n⊢ ((fun x => b) a'', id i'') ∈ {b} ×ˢ univ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_s.h.mk.mpr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι✝ : Sort u_5\nf : Filter α✝\ng : Filter β✝\nα : Type u_6\nβ : Type u_7\nι : Type u_8\na : α\nb : β\ni : ι\nb' : β\ni' : ι\n⊢ (b', i') ∈ {b} ×ˢ univ → (b', i') ∈ Prod.map (fun x => b) id '' ({a}ᶜ ×ˢ {i}ᶜ)ᶜ\n[PROOFSTEP]\nrintro ⟨h₁, _⟩\n[GOAL]\ncase e_s.h.mk.mpr.intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι✝ : Sort u_5\nf : Filter α✝\ng : Filter β✝\nα : Type u_6\nβ : Type u_7\nι : Type u_8\na : α\nb : β\ni : ι\nb' : β\ni' : ι\nh₁ : (b', i').fst ∈ {b}\nright✝ : (b', i').snd ∈ univ\n⊢ (b', i') ∈ Prod.map (fun x => b) id '' ({a}ᶜ ×ˢ {i}ᶜ)ᶜ\n[PROOFSTEP]\nuse(a, i')\n[GOAL]\ncase h\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nι✝ : Sort u_5\nf : Filter α✝\ng : Filter β✝\nα : Type u_6\nβ : Type u_7\nι : Type u_8\na : α\nb : β\ni : ι\nb' : β\ni' : ι\nh₁ : (b', i').fst ∈ {b}\nright✝ : (b', i').snd ∈ univ\n⊢ (a, i') ∈ ({a}ᶜ ×ˢ {i}ᶜ)ᶜ ∧ Prod.map (fun x => b) id (a, i') = (b', i')\n[PROOFSTEP]\nsimpa using h₁.symm\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.Prod", "llama_tokens": 22131, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6224593312018546, "lm_q2_score": 0.5774953651858118, "lm_q1q2_score": 0.3594673787857312}}
{"text": "[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\n⊢ ∀ (X : (C ⊕ D) ⊕ E),\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        (𝟙 X) =\n      𝟙\n        ({\n              obj := fun X =>\n                match X with\n                | inl (inl X) => inl X\n                | inl (inr X) => inr (inl X)\n                | inr X => inr (inr X),\n              map := fun {X Y} f =>\n                match X, Y, f with\n                | inl (inl val), inl (inl val_1), f => f\n                | inl (inr val), inl (inr val_1), f => f\n                | inr val, inr val_1, f => f }.obj\n          X)\n[PROOFSTEP]\nrintro ((_ | _) | _)\n[GOAL]\ncase inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝ : C\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (𝟙 (inl (inl val✝))) =\n    𝟙\n      ({\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.obj\n        (inl (inl val✝)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝ : D\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (𝟙 (inl (inr val✝))) =\n    𝟙\n      ({\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.obj\n        (inl (inr val✝)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝ : E\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (𝟙 (inr val✝)) =\n    𝟙\n      ({\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.obj\n        (inr val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\n⊢ ∀ {X Y Z : (C ⊕ D) ⊕ E} (f : X ⟶ Y) (g : Y ⟶ Z),\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        (f ≫ g) =\n      {\n              obj := fun X =>\n                match X with\n                | inl (inl X) => inl X\n                | inl (inr X) => inr (inl X)\n                | inr X => inr (inr X),\n              map := fun {X Y} f =>\n                match X, Y, f with\n                | inl (inl val), inl (inl val_1), f => f\n                | inl (inr val), inl (inr val_1), f => f\n                | inr val, inr val_1, f => f }.map\n          f ≫\n        {\n              obj := fun X =>\n                match X with\n                | inl (inl X) => inl X\n                | inl (inr X) => inr (inl X)\n                | inr X => inr (inr X),\n              map := fun {X Y} f =>\n                match X, Y, f with\n                | inl (inl val), inl (inl val_1), f => f\n                | inl (inr val), inl (inr val_1), f => f\n                | inr val, inr val_1, f => f }.map\n          g\n[PROOFSTEP]\nrintro ((_ | _) | _) ((_ | _) | _) ((_ | _) | _) f g\n[GOAL]\ncase inl.inl.inl.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : C\nf : inl (inl val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inl.inl.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : C\nf : inl (inl val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inl.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : C\nf : inl (inl val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inl.inl.inl.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : C\nf : inl (inl val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase inl.inl.inl.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : C\nval✝ : D\nf : inl (inl val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inl.inl.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : C\nval✝ : D\nf : inl (inl val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inl.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : C\nval✝ : D\nf : inl (inl val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inl.inl.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : C\nval✝ : E\nf : inl (inl val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inl.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : C\nval✝ : E\nf : inl (inl val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : C\nval✝ : E\nf : inl (inl val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inl.inl.inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : D\nval✝ : C\nf : inl (inl val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inl.inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : D\nval✝ : C\nf : inl (inl val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ val✝ : D\nf : inl (inl val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inl.inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ val✝ : D\nf : inl (inl val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : D\nval✝ : E\nf : inl (inl val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inl.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : D\nval✝ : E\nf : inl (inl val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : E\nval✝ : C\nf : inl (inl val✝²) ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : E\nval✝ : C\nf : inl (inl val✝²) ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : E\nval✝ : D\nf : inl (inl val✝²) ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : E\nval✝ : D\nf : inl (inl val✝²) ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ val✝ : E\nf : inl (inl val✝²) ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ val✝ : E\nf : inl (inl val✝²) ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inl.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ val✝ : C\nf : inl (inr val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inl.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ val✝ : C\nf : inl (inr val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inl.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : C\nval✝ : D\nf : inl (inr val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inl.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : C\nval✝ : D\nf : inl (inr val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : C\nval✝ : E\nf : inl (inr val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : C\nval✝ : E\nf : inl (inr val✝²) ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : D\nval✝ : C\nf : inl (inr val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : D\nval✝ : C\nf : inl (inr val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : D\nval✝ : C\nf : inl (inr val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inl.inr.inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : D\nf : inl (inr val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : D\nf : inl (inr val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : D\nf : inl (inr val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inl.inr.inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : D\nf : inl (inr val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase inl.inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : D\nval✝ : E\nf : inl (inr val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : D\nval✝ : E\nf : inl (inr val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : D\nval✝ : E\nf : inl (inr val✝²) ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inl.inr.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : E\nval✝ : C\nf : inl (inr val✝²) ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : E\nval✝ : C\nf : inl (inr val✝²) ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : E\nval✝ : D\nf : inl (inr val✝²) ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : E\nval✝ : D\nf : inl (inr val✝²) ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ val✝ : E\nf : inl (inr val✝²) ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ val✝ : E\nf : inl (inr val✝²) ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ val✝ : C\nf : inr val✝² ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ val✝ : C\nf : inr val✝² ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : C\nval✝ : D\nf : inr val✝² ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : C\nval✝ : D\nf : inr val✝² ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : C\nval✝ : E\nf : inr val✝² ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : C\nval✝ : E\nf : inr val✝² ⟶ inl (inl val✝¹)\ng : inl (inl val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : D\nval✝ : C\nf : inr val✝² ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : D\nval✝ : C\nf : inr val✝² ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ val✝ : D\nf : inr val✝² ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ val✝ : D\nf : inr val✝² ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : D\nval✝ : E\nf : inr val✝² ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : D\nval✝ : E\nf : inr val✝² ⟶ inl (inr val✝¹)\ng : inl (inr val✝¹) ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : E\nval✝ : C\nf : inr val✝² ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : E\nval✝ : C\nf : inr val✝² ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : E\nval✝ : C\nf : inr val✝² ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inr.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : E\nval✝ : D\nf : inr val✝² ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : E\nval✝ : D\nf : inr val✝² ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : E\nval✝ : D\nf : inr val✝² ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inl (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : E\nf : inr val✝² ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : E\nf : inr val✝² ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : E\nf : inr val✝² ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : E\nf : inr val✝² ⟶ inr val✝¹\ng : inr val✝¹ ⟶ inr val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl (inl X) => inl X\n            | inl (inr X) => inr (inl X)\n            | inr X => inr (inr X),\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl (inl val), inl (inl val_1), f => f\n            | inl (inr val), inl (inr val_1), f => f\n            | inr val, inr val_1, f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl (inl X) => inl X\n              | inl (inr X) => inr (inl X)\n              | inr X => inr (inr X),\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl (inl val), inl (inl val_1), f => f\n              | inl (inr val), inl (inr val_1), f => f\n              | inr val, inr val_1, f => f }.map\n        g\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\n⊢ ∀ (X : C ⊕ D ⊕ E),\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        (𝟙 X) =\n      𝟙\n        ({\n              obj := fun X =>\n                match X with\n                | inl X => inl (inl X)\n                | inr (inl X) => inl (inr X)\n                | inr (inr X) => inr X,\n              map := fun {X Y} f =>\n                match X, Y, f with\n                | inl val, inl val_1, f => f\n                | inr (inl val), inr (inl val_1), f => f\n                | inr (inr val), inr (inr val_1), f => f }.obj\n          X)\n[PROOFSTEP]\nrintro (_ | (_ | _))\n[GOAL]\ncase inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝ : C\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (𝟙 (inl val✝)) =\n    𝟙\n      ({\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.obj\n        (inl val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝ : D\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (𝟙 (inr (inl val✝))) =\n    𝟙\n      ({\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.obj\n        (inr (inl val✝)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝ : E\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (𝟙 (inr (inr val✝))) =\n    𝟙\n      ({\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.obj\n        (inr (inr val✝)))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\n⊢ ∀ {X Y Z : C ⊕ D ⊕ E} (f : X ⟶ Y) (g : Y ⟶ Z),\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        (f ≫ g) =\n      {\n              obj := fun X =>\n                match X with\n                | inl X => inl (inl X)\n                | inr (inl X) => inl (inr X)\n                | inr (inr X) => inr X,\n              map := fun {X Y} f =>\n                match X, Y, f with\n                | inl val, inl val_1, f => f\n                | inr (inl val), inr (inl val_1), f => f\n                | inr (inr val), inr (inr val_1), f => f }.map\n          f ≫\n        {\n              obj := fun X =>\n                match X with\n                | inl X => inl (inl X)\n                | inr (inl X) => inl (inr X)\n                | inr (inr X) => inr X,\n              map := fun {X Y} f =>\n                match X, Y, f with\n                | inl val, inl val_1, f => f\n                | inr (inl val), inr (inl val_1), f => f\n                | inr (inr val), inr (inr val_1), f => f }.map\n          g\n[PROOFSTEP]\nrintro (_ | (_ | _)) (_ | (_ | _)) (_ | (_ | _)) f g\n[GOAL]\ncase inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : C\nf : inl val✝² ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : C\nf : inl val✝² ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : C\nf : inl val✝² ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : C\nf : inl val✝² ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase inl.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : C\nval✝ : D\nf : inl val✝² ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : C\nval✝ : D\nf : inl val✝² ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : C\nval✝ : D\nf : inl val✝² ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inl.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : C\nval✝ : E\nf : inl val✝² ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : C\nval✝ : E\nf : inl val✝² ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : C\nval✝ : E\nf : inl val✝² ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : D\nval✝ : C\nf : inl val✝² ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : D\nval✝ : C\nf : inl val✝² ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ val✝ : D\nf : inl val✝² ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ val✝ : D\nf : inl val✝² ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : D\nval✝ : E\nf : inl val✝² ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : D\nval✝ : E\nf : inl val✝² ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : E\nval✝ : C\nf : inl val✝² ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : E\nval✝ : C\nf : inl val✝² ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : E\nval✝ : D\nf : inl val✝² ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ : E\nval✝ : D\nf : inl val✝² ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ val✝ : E\nf : inl val✝² ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inl.inr.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : C\nval✝¹ val✝ : E\nf : inl val✝² ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ val✝ : C\nf : inr (inl val✝²) ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ val✝ : C\nf : inr (inl val✝²) ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : C\nval✝ : D\nf : inr (inl val✝²) ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : C\nval✝ : D\nf : inr (inl val✝²) ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : C\nval✝ : E\nf : inr (inl val✝²) ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : C\nval✝ : E\nf : inr (inl val✝²) ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : D\nval✝ : C\nf : inr (inl val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : D\nval✝ : C\nf : inr (inl val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : D\nval✝ : C\nf : inr (inl val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inr.inl.inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : D\nf : inr (inl val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : D\nf : inr (inl val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : D\nf : inr (inl val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inr.inl.inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : D\nf : inr (inl val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase inr.inl.inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : D\nval✝ : E\nf : inr (inl val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : D\nval✝ : E\nf : inr (inl val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : D\nval✝ : E\nf : inr (inl val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inr.inl.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : E\nval✝ : C\nf : inr (inl val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : E\nval✝ : C\nf : inr (inl val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inr.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : E\nval✝ : D\nf : inr (inl val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inr.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ : E\nval✝ : D\nf : inr (inl val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inr.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ val✝ : E\nf : inr (inl val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inl.inr.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : D\nval✝¹ val✝ : E\nf : inr (inl val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ val✝ : C\nf : inr (inr val✝²) ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ val✝ : C\nf : inr (inr val✝²) ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : C\nval✝ : D\nf : inr (inr val✝²) ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : C\nval✝ : D\nf : inr (inr val✝²) ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : C\nval✝ : E\nf : inr (inr val✝²) ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : C\nval✝ : E\nf : inr (inr val✝²) ⟶ inl val✝¹\ng : inl val✝¹ ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : D\nval✝ : C\nf : inr (inr val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inr.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : D\nval✝ : C\nf : inr (inr val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ val✝ : D\nf : inr (inr val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inr.inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ val✝ : D\nf : inr (inr val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : D\nval✝ : E\nf : inr (inr val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inr.inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² : E\nval✝¹ : D\nval✝ : E\nf : inr (inr val✝²) ⟶ inr (inl val✝¹)\ng : inr (inl val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : E\nval✝ : C\nf : inr (inr val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inr.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : E\nval✝ : C\nf : inr (inr val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : E\nval✝ : C\nf : inr (inr val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inl val✝\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inr.inr.inr.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : E\nval✝ : D\nf : inr (inr val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inr.inr.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : E\nval✝ : D\nf : inr (inr val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inr.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ : E\nval✝ : D\nf : inr (inr val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inl val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inr.inr.inr.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : E\nf : inr (inr val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\nfirst\n| cases f\n| cases g\n| aesop_cat\n[GOAL]\ncase inr.inr.inr.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : E\nf : inr (inr val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inr.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : E\nf : inr (inr val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase inr.inr.inr.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝² val✝¹ val✝ : E\nf : inr (inr val✝²) ⟶ inr (inr val✝¹)\ng : inr (inr val✝¹) ⟶ inr (inr val✝)\n⊢ {\n          obj := fun X =>\n            match X with\n            | inl X => inl (inl X)\n            | inr (inl X) => inl (inr X)\n            | inr (inr X) => inr X,\n          map := fun {X Y} f =>\n            match X, Y, f with\n            | inl val, inl val_1, f => f\n            | inr (inl val), inr (inl val_1), f => f\n            | inr (inr val), inr (inr val_1), f => f }.map\n      (f ≫ g) =\n    {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        f ≫\n      {\n            obj := fun X =>\n              match X with\n              | inl X => inl (inl X)\n              | inr (inl X) => inl (inr X)\n              | inr (inr X) => inr X,\n            map := fun {X Y} f =>\n              match X, Y, f with\n              | inl val, inl val_1, f => f\n              | inr (inl val), inr (inl val_1), f => f\n              | inr (inr val), inr (inr val_1), f => f }.map\n        g\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nX : (C ⊕ D) ⊕ E\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X\n[PROOFSTEP]\nrcases X with ((_ | _) | _)\n[GOAL]\ncase inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝ : C\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).obj (inl (inl val✝)) = (associator C D E ⋙ inverseAssociator C D E).obj (inl (inl val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝ : D\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).obj (inl (inr val✝)) = (associator C D E ⋙ inverseAssociator C D E).obj (inl (inr val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝ : E\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).obj (inr val✝) = (associator C D E ⋙ inverseAssociator C D E).obj (inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\n⊢ ∀ {X Y : (C ⊕ D) ⊕ E} (f : X ⟶ Y),\n    (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n        ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X)) Y).hom =\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X)) X).hom ≫\n        (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\nrintro ((_ | _) | _) ((_ | _) | _) f\n[GOAL]\ncase inl.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : C\nf : inl (inl val✝¹) ⟶ inl (inl val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inl.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : C\nf : inl (inl val✝¹) ⟶ inl (inl val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : C\nf : inl (inl val✝¹) ⟶ inl (inl val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase inl.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : C\nval✝ : D\nf : inl (inl val✝¹) ⟶ inl (inr val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inl.inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : C\nval✝ : D\nf : inl (inl val✝¹) ⟶ inl (inr val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : C\nval✝ : E\nf : inl (inl val✝¹) ⟶ inr val✝\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝)).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inl.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : C\nval✝ : E\nf : inl (inl val✝¹) ⟶ inr val✝\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝)).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : D\nval✝ : C\nf : inl (inr val✝¹) ⟶ inl (inl val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inl.inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : D\nval✝ : C\nf : inl (inr val✝¹) ⟶ inl (inl val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : D\nf : inl (inr val✝¹) ⟶ inl (inr val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : D\nf : inl (inr val✝¹) ⟶ inl (inr val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : D\nf : inl (inr val✝¹) ⟶ inl (inr val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : D\nval✝ : E\nf : inl (inr val✝¹) ⟶ inr val✝\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝)).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : D\nval✝ : E\nf : inl (inr val✝¹) ⟶ inr val✝\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝)).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝¹))).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : E\nval✝ : C\nf : inr val✝¹ ⟶ inl (inl val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝¹)).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : E\nval✝ : C\nf : inr val✝¹ ⟶ inl (inl val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝¹)).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : E\nval✝ : D\nf : inr val✝¹ ⟶ inl (inr val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝¹)).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inr.inl.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : E\nval✝ : D\nf : inr val✝¹ ⟶ inl (inr val✝)\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inl (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝¹)).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : E\nf : inr val✝¹ ⟶ inr val✝\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝)).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝¹)).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : E\nf : inr val✝¹ ⟶ inr val✝\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝)).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝¹)).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : E\nf : inr val✝¹ ⟶ inr val✝\n⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫\n      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝)).hom =\n    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))\n          (inr val✝¹)).hom ≫\n      (associator C D E ⋙ inverseAssociator C D E).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nX : C ⊕ D ⊕ E\n⊢ (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X\n[PROOFSTEP]\nrcases X with (_ | (_ | _))\n[GOAL]\ncase inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝ : C\n⊢ (inverseAssociator C D E ⋙ associator C D E).obj (inl val✝) = (𝟭 (C ⊕ D ⊕ E)).obj (inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝ : D\n⊢ (inverseAssociator C D E ⋙ associator C D E).obj (inr (inl val✝)) = (𝟭 (C ⊕ D ⊕ E)).obj (inr (inl val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝ : E\n⊢ (inverseAssociator C D E ⋙ associator C D E).obj (inr (inr val✝)) = (𝟭 (C ⊕ D ⊕ E)).obj (inr (inr val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\n⊢ ∀ {X Y : C ⊕ D ⊕ E} (f : X ⟶ Y),\n    (inverseAssociator C D E ⋙ associator C D E).map f ≫\n        ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X)) Y).hom =\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X)) X).hom ≫\n        (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\nrintro (_ | (_ | _)) (_ | (_ | _)) f\n[GOAL]\ncase inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : C\nf : inl val✝¹ ⟶ inl val✝\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝)).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝¹)).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : C\nf : inl val✝¹ ⟶ inl val✝\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝)).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝¹)).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : C\nf : inl val✝¹ ⟶ inl val✝\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝)).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝¹)).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : C\nval✝ : D\nf : inl val✝¹ ⟶ inr (inl val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝¹)).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : C\nval✝ : D\nf : inl val✝¹ ⟶ inr (inl val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝¹)).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : C\nval✝ : E\nf : inl val✝¹ ⟶ inr (inr val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝¹)).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : C\nval✝ : E\nf : inl val✝¹ ⟶ inr (inr val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝¹)).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : D\nval✝ : C\nf : inr (inl val✝¹) ⟶ inl val✝\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝)).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inr.inl.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : D\nval✝ : C\nf : inr (inl val✝¹) ⟶ inl val✝\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝)).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : D\nf : inr (inl val✝¹) ⟶ inr (inl val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : D\nf : inr (inl val✝¹) ⟶ inr (inl val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inl.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : D\nf : inr (inl val✝¹) ⟶ inr (inl val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : D\nval✝ : E\nf : inr (inl val✝¹) ⟶ inr (inr val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inr.inl.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : D\nval✝ : E\nf : inr (inl val✝¹) ⟶ inr (inr val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : E\nval✝ : C\nf : inr (inr val✝¹) ⟶ inl val✝\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝)).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : E\nval✝ : C\nf : inr (inr val✝¹) ⟶ inl val✝\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inl val✝)).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : E\nval✝ : D\nf : inr (inr val✝¹) ⟶ inr (inl val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inr.inr.inr.inl\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ : E\nval✝ : D\nf : inr (inr val✝¹) ⟶ inr (inl val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inl val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : E\nf : inr (inr val✝¹) ⟶ inr (inr val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\nfirst\n| cases f\n| aesop_cat\n[GOAL]\ncase inr.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : E\nf : inr (inr val✝¹) ⟶ inr (inr val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase inr.inr.inr.inr\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\nval✝¹ val✝ : E\nf : inr (inr val✝¹) ⟶ inr (inr val✝)\n⊢ (inverseAssociator C D E ⋙ associator C D E).map f ≫\n      ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝))).hom =\n    ((fun X => eqToIso (_ : (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C ⊕ D ⊕ E)).obj X))\n          (inr (inr val✝¹))).hom ≫\n      (𝟭 (C ⊕ D ⊕ E)).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\n⊢ IsEquivalence (associativity C D E).functor\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u\ninst✝¹ : Category.{v, u} D\nE : Type u\ninst✝ : Category.{v, u} E\n⊢ IsEquivalence (associativity C D E).inverse\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sums.Associator", "llama_tokens": 99991, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.3593336255909144}}
{"text": "[GOAL]\nX : TopCat\nF : Presheaf (Type v) X\nU U' : (Opens ↑X)ᵒᵖ\nf : U ⟶ U'\n⊢ F.map f ≫\n      (fun U f =>\n          { val := fun x => germ F x f,\n            property :=\n              (_ :\n                PrelocalPredicate.pred (PrelocalPredicate.sheafify (Sheafify.isGerm F)).toPrelocalPredicate fun x =>\n                  germ F x f) })\n        U' =\n    (fun U f =>\n          { val := fun x => germ F x f,\n            property :=\n              (_ :\n                PrelocalPredicate.pred (PrelocalPredicate.sheafify (Sheafify.isGerm F)).toPrelocalPredicate fun x =>\n                  germ F x f) })\n        U ≫\n      (sheafify F).val.map f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nX : TopCat\nF : Presheaf (Type v) X\nU U' : (Opens ↑X)ᵒᵖ\nf : U ⟶ U'\nx : F.obj U\n⊢ (F.map f ≫\n        (fun U f =>\n            { val := fun x => germ F x f,\n              property :=\n                (_ :\n                  PrelocalPredicate.pred (PrelocalPredicate.sheafify (Sheafify.isGerm F)).toPrelocalPredicate fun x =>\n                    germ F x f) })\n          U')\n      x =\n    ((fun U f =>\n            { val := fun x => germ F x f,\n              property :=\n                (_ :\n                  PrelocalPredicate.pred (PrelocalPredicate.sheafify (Sheafify.isGerm F)).toPrelocalPredicate fun x =>\n                    germ F x f) })\n          U ≫\n        (sheafify F).val.map f)\n      x\n[PROOFSTEP]\napply Subtype.ext\n[GOAL]\ncase h.a\nX : TopCat\nF : Presheaf (Type v) X\nU U' : (Opens ↑X)ᵒᵖ\nf : U ⟶ U'\nx : F.obj U\n⊢ ↑((F.map f ≫\n          (fun U f =>\n              { val := fun x => germ F x f,\n                property :=\n                  (_ :\n                    PrelocalPredicate.pred (PrelocalPredicate.sheafify (Sheafify.isGerm F)).toPrelocalPredicate fun x =>\n                      germ F x f) })\n            U')\n        x) =\n    ↑(((fun U f =>\n              { val := fun x => germ F x f,\n                property :=\n                  (_ :\n                    PrelocalPredicate.pred (PrelocalPredicate.sheafify (Sheafify.isGerm F)).toPrelocalPredicate fun x =>\n                      germ F x f) })\n            U ≫\n          (sheafify F).val.map f)\n        x)\n[PROOFSTEP]\next ⟨u, m⟩\n[GOAL]\ncase h.a.h.mk\nX : TopCat\nF : Presheaf (Type v) X\nU U' : (Opens ↑X)ᵒᵖ\nf : U ⟶ U'\nx : F.obj U\nu : ↑X\nm : u ∈ U'.unop\n⊢ ↑((F.map f ≫\n            (fun U f =>\n                { val := fun x => germ F x f,\n                  property :=\n                    (_ :\n                      PrelocalPredicate.pred (PrelocalPredicate.sheafify (Sheafify.isGerm F)).toPrelocalPredicate\n                        fun x => germ F x f) })\n              U')\n          x)\n      { val := u, property := m } =\n    ↑(((fun U f =>\n                { val := fun x => germ F x f,\n                  property :=\n                    (_ :\n                      PrelocalPredicate.pred (PrelocalPredicate.sheafify (Sheafify.isGerm F)).toPrelocalPredicate\n                        fun x => germ F x f) })\n              U ≫\n            (sheafify F).val.map f)\n          x)\n      { val := u, property := m }\n[PROOFSTEP]\nexact germ_res_apply F f.unop ⟨u, m⟩ x\n[GOAL]\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\n⊢ Function.Surjective (stalkToFiber F x)\n[PROOFSTEP]\napply TopCat.stalkToFiber_surjective\n[GOAL]\ncase w\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\n⊢ ∀ (t : stalk F x), ∃ U f x_1, f { val := x, property := (_ : x ∈ U.obj) } = t\n[PROOFSTEP]\nintro t\n[GOAL]\ncase w\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nt : stalk F x\n⊢ ∃ U f x_1, f { val := x, property := (_ : x ∈ U.obj) } = t\n[PROOFSTEP]\nobtain ⟨U, m, s, rfl⟩ := F.germ_exist _ t\n[GOAL]\ncase w.intro.intro.intro\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU : Opens ↑X\nm : x ∈ U\ns : (forget (Type v)).obj (F.obj (op U))\n⊢ ∃ U_1 f x_1, f { val := x, property := (_ : x ∈ U_1.obj) } = ↑(germ F { val := x, property := m }) s\n[PROOFSTEP]\nuse⟨U, m⟩\n[GOAL]\ncase h\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU : Opens ↑X\nm : x ∈ U\ns : (forget (Type v)).obj (F.obj (op U))\n⊢ ∃ f x_1,\n    f { val := x, property := (_ : x ∈ { obj := U, property := m }.obj) } = ↑(germ F { val := x, property := m }) s\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase h.w\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU : Opens ↑X\nm : x ∈ U\ns : (forget (Type v)).obj (F.obj (op U))\n⊢ (y : { x_1 // x_1 ∈ { obj := U, property := m }.obj }) → stalk F ↑y\n[PROOFSTEP]\nexact fun y => F.germ y s\n[GOAL]\ncase h.h\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU : Opens ↑X\nm : x ∈ U\ns : (forget (Type v)).obj (F.obj (op U))\n⊢ ∃ x_1,\n    germ F { val := x, property := (_ : x ∈ { obj := U, property := m }.obj) } s =\n      ↑(germ F { val := x, property := m }) s\n[PROOFSTEP]\nexact ⟨PrelocalPredicate.sheafifyOf ⟨s, fun _ => rfl⟩, rfl⟩\n[GOAL]\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\n⊢ Function.Injective (stalkToFiber F x)\n[PROOFSTEP]\napply TopCat.stalkToFiber_injective\n[GOAL]\ncase w\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\n⊢ ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y),\n    PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU →\n      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → stalk F ↑y),\n        PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV →\n          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →\n            ∃ W iU iV,\n              ∀ (w : { x_4 // x_4 ∈ W.obj }),\n                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =\n                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nintro U V fU hU fV hV e\n[GOAL]\ncase w\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\ne : fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) }\n⊢ ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nrcases hU ⟨x, U.2⟩ with ⟨U', mU, iU, gU, wU⟩\n[GOAL]\ncase w.intro.intro.intro.intro\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\ne : fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) }\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\n⊢ ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nrcases hV ⟨x, V.2⟩ with ⟨V', mV, iV, gV, wV⟩\n[GOAL]\ncase w.intro.intro.intro.intro.intro.intro.intro.intro\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\ne : fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) }\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\n⊢ ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nhave wUx := wU ⟨x, mU⟩\n[GOAL]\ncase w.intro.intro.intro.intro.intro.intro.intro.intro\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\ne : fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) }\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nwUx :\n  (fun x_1 => fU ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑U.obj) }) x_1)) { val := x, property := mU } =\n    germ F { val := x, property := mU } gU\n⊢ ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\ndsimp at wUx \n[GOAL]\ncase w.intro.intro.intro.intro.intro.intro.intro.intro\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\ne : fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) }\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nwUx : fU { val := x, property := (_ : ↑{ val := x, property := mU } ∈ ↑U.obj) } = germ F { val := x, property := mU } gU\n⊢ ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nerw [wUx] at e \n[GOAL]\ncase w.intro.intro.intro.intro.intro.intro.intro.intro\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\ne : germ F { val := x, property := mU } gU = fV { val := x, property := (_ : x ∈ V.obj) }\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nwUx : fU { val := x, property := (_ : ↑{ val := x, property := mU } ∈ ↑U.obj) } = germ F { val := x, property := mU } gU\n⊢ ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nclear wUx\n[GOAL]\ncase w.intro.intro.intro.intro.intro.intro.intro.intro\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\ne : germ F { val := x, property := mU } gU = fV { val := x, property := (_ : x ∈ V.obj) }\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\n⊢ ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nhave wVx := wV ⟨x, mV⟩\n[GOAL]\ncase w.intro.intro.intro.intro.intro.intro.intro.intro\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\ne : germ F { val := x, property := mU } gU = fV { val := x, property := (_ : x ∈ V.obj) }\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nwVx :\n  (fun x_1 => fV ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑V.obj) }) x_1)) { val := x, property := mV } =\n    germ F { val := x, property := mV } gV\n⊢ ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\ndsimp at wVx \n[GOAL]\ncase w.intro.intro.intro.intro.intro.intro.intro.intro\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\ne : germ F { val := x, property := mU } gU = fV { val := x, property := (_ : x ∈ V.obj) }\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nwVx : fV { val := x, property := (_ : ↑{ val := x, property := mV } ∈ ↑V.obj) } = germ F { val := x, property := mV } gV\n⊢ ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nerw [wVx] at e \n[GOAL]\ncase w.intro.intro.intro.intro.intro.intro.intro.intro\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nwVx : fV { val := x, property := (_ : ↑{ val := x, property := mV } ∈ ↑V.obj) } = germ F { val := x, property := mV } gV\n⊢ ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nclear wVx\n[GOAL]\ncase w.intro.intro.intro.intro.intro.intro.intro.intro\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\n⊢ ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nrcases F.germ_eq x mU mV gU gV e with ⟨W, mW, iU', iV', (e' : F.map iU'.op gU = F.map iV'.op gV)⟩\n[GOAL]\ncase w.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nW : Opens ↑X\nmW : x ∈ W\niU' : W ⟶ U'\niV' : W ⟶ V'\ne' : F.map iU'.op gU = F.map iV'.op gV\n⊢ ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nuse⟨W ⊓ (U' ⊓ V'), ⟨mW, mU, mV⟩⟩\n[GOAL]\ncase h\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nW : Opens ↑X\nmW : x ∈ W\niU' : W ⟶ U'\niV' : W ⟶ V'\ne' : F.map iU'.op gU = F.map iV'.op gV\n⊢ ∃ iU iV,\n    ∀ (w : { x_1 // x_1 ∈ { obj := W ⊓ (U' ⊓ V'), property := (_ : x ∈ ↑W ∧ x ∈ ↑(U' ⊓ V')) }.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nrefine' ⟨_, _, _⟩\n[GOAL]\ncase h.refine'_1\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nW : Opens ↑X\nmW : x ∈ W\niU' : W ⟶ U'\niV' : W ⟶ V'\ne' : F.map iU'.op gU = F.map iV'.op gV\n⊢ { obj := W ⊓ (U' ⊓ V'), property := (_ : x ∈ ↑W ∧ x ∈ ↑(U' ⊓ V')) } ⟶ U\n[PROOFSTEP]\nchange W ⊓ (U' ⊓ V') ⟶ U.obj\n[GOAL]\ncase h.refine'_1\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nW : Opens ↑X\nmW : x ∈ W\niU' : W ⟶ U'\niV' : W ⟶ V'\ne' : F.map iU'.op gU = F.map iV'.op gV\n⊢ W ⊓ (U' ⊓ V') ⟶ U.obj\n[PROOFSTEP]\nexact Opens.infLERight _ _ ≫ Opens.infLELeft _ _ ≫ iU\n[GOAL]\ncase h.refine'_2\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nW : Opens ↑X\nmW : x ∈ W\niU' : W ⟶ U'\niV' : W ⟶ V'\ne' : F.map iU'.op gU = F.map iV'.op gV\n⊢ { obj := W ⊓ (U' ⊓ V'), property := (_ : x ∈ ↑W ∧ x ∈ ↑(U' ⊓ V')) } ⟶ V\n[PROOFSTEP]\nchange W ⊓ (U' ⊓ V') ⟶ V.obj\n[GOAL]\ncase h.refine'_2\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nW : Opens ↑X\nmW : x ∈ W\niU' : W ⟶ U'\niV' : W ⟶ V'\ne' : F.map iU'.op gU = F.map iV'.op gV\n⊢ W ⊓ (U' ⊓ V') ⟶ V.obj\n[PROOFSTEP]\nexact Opens.infLERight _ _ ≫ Opens.infLERight _ _ ≫ iV\n[GOAL]\ncase h.refine'_3\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nW : Opens ↑X\nmW : x ∈ W\niU' : W ⟶ U'\niV' : W ⟶ V'\ne' : F.map iU'.op gU = F.map iV'.op gV\n⊢ ∀ (w : { x_1 // x_1 ∈ { obj := W ⊓ (U' ⊓ V'), property := (_ : x ∈ ↑W ∧ x ∈ ↑(U' ⊓ V')) }.obj }),\n    fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n      fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nintro w\n[GOAL]\ncase h.refine'_3\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nwU :\n  ∀ (x_1 : { x // x ∈ U' }),\n    (fun x_2 => fU ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑U.obj) }) x_2)) x_1 = germ F x_1 gU\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nW : Opens ↑X\nmW : x ∈ W\niU' : W ⟶ U'\niV' : W ⟶ V'\ne' : F.map iU'.op gU = F.map iV'.op gV\nw : { x_1 // x_1 ∈ { obj := W ⊓ (U' ⊓ V'), property := (_ : x ∈ ↑W ∧ x ∈ ↑(U' ⊓ V')) }.obj }\n⊢ fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n    fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nspecialize wU ⟨w.1, w.2.2.1⟩\n[GOAL]\ncase h.refine'_3\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nwV :\n  ∀ (x_1 : { x // x ∈ V' }),\n    (fun x_2 => fV ((fun x_3 => { val := ↑x_3, property := (_ : ↑x_3 ∈ ↑V.obj) }) x_2)) x_1 = germ F x_1 gV\nW : Opens ↑X\nmW : x ∈ W\niU' : W ⟶ U'\niV' : W ⟶ V'\ne' : F.map iU'.op gU = F.map iV'.op gV\nw : { x_1 // x_1 ∈ { obj := W ⊓ (U' ⊓ V'), property := (_ : x ∈ ↑W ∧ x ∈ ↑(U' ⊓ V')) }.obj }\nwU :\n  (fun x_1 => fU ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑U.obj) }) x_1))\n      { val := ↑w, property := (_ : ↑w ∈ ↑U') } =\n    germ F { val := ↑w, property := (_ : ↑w ∈ ↑U') } gU\n⊢ fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n    fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\nspecialize wV ⟨w.1, w.2.2.2⟩\n[GOAL]\ncase h.refine'_3\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nW : Opens ↑X\nmW : x ∈ W\niU' : W ⟶ U'\niV' : W ⟶ V'\ne' : F.map iU'.op gU = F.map iV'.op gV\nw : { x_1 // x_1 ∈ { obj := W ⊓ (U' ⊓ V'), property := (_ : x ∈ ↑W ∧ x ∈ ↑(U' ⊓ V')) }.obj }\nwU :\n  (fun x_1 => fU ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑U.obj) }) x_1))\n      { val := ↑w, property := (_ : ↑w ∈ ↑U') } =\n    germ F { val := ↑w, property := (_ : ↑w ∈ ↑U') } gU\nwV :\n  (fun x_1 => fV ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑V.obj) }) x_1))\n      { val := ↑w, property := (_ : ↑w ∈ ↑V') } =\n    germ F { val := ↑w, property := (_ : ↑w ∈ ↑V') } gV\n⊢ fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.obj) }) w) =\n    fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.obj) }) w)\n[PROOFSTEP]\ndsimp at wU wV ⊢\n[GOAL]\ncase h.refine'_3\nX : TopCat\nF : Presheaf (Type v) X\nx : ↑X\nU V : OpenNhds x\nfU : (y : { x_1 // x_1 ∈ U.obj }) → stalk F ↑y\nhU : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fU\nfV : (y : { x_1 // x_1 ∈ V.obj }) → stalk F ↑y\nhV : PrelocalPredicate.pred (Sheafify.isLocallyGerm F).toPrelocalPredicate fV\nU' : Opens ↑X\nmU : ↑{ val := x, property := (_ : x ∈ U.obj) } ∈ U'\niU : U' ⟶ U.obj\ngU : F.obj (op U')\nV' : Opens ↑X\nmV : ↑{ val := x, property := (_ : x ∈ V.obj) } ∈ V'\niV : V' ⟶ V.obj\ngV : F.obj (op V')\ne : germ F { val := x, property := mU } gU = germ F { val := x, property := mV } gV\nW : Opens ↑X\nmW : x ∈ W\niU' : W ⟶ U'\niV' : W ⟶ V'\ne' : F.map iU'.op gU = F.map iV'.op gV\nw : { x_1 // x_1 ∈ { obj := W ⊓ (U' ⊓ V'), property := (_ : x ∈ ↑W ∧ x ∈ ↑(U' ⊓ V')) }.obj }\nwU :\n  fU { val := ↑w, property := (_ : ↑{ val := ↑w, property := (_ : ↑w ∈ ↑U') } ∈ ↑U.obj) } =\n    germ F { val := ↑w, property := (_ : ↑w ∈ ↑U') } gU\nwV :\n  fV { val := ↑w, property := (_ : ↑{ val := ↑w, property := (_ : ↑w ∈ ↑V') } ∈ ↑V.obj) } =\n    germ F { val := ↑w, property := (_ : ↑w ∈ ↑V') } gV\n⊢ fU { val := ↑w, property := (_ : ↑w ∈ ↑U.obj) } = fV { val := ↑w, property := (_ : ↑w ∈ ↑V.obj) }\n[PROOFSTEP]\nerw [wU, ← F.germ_res iU' ⟨w, w.2.1⟩, wV, ← F.germ_res iV' ⟨w, w.2.1⟩, CategoryTheory.types_comp_apply,\n  CategoryTheory.types_comp_apply, e']\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sheaves.Sheafify", "llama_tokens": 16241, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6477982315512489, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.3591849866487635}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMaxOrder α\nx✝ : α × β\na : α\nb : β\n⊢ ∃ b_1, (a, b) < b_1\n[PROOFSTEP]\nobtain ⟨c, h⟩ := exists_gt a\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMaxOrder α\nx✝ : α × β\na : α\nb : β\nc : α\nh : a < c\n⊢ ∃ b_1, (a, b) < b_1\n[PROOFSTEP]\nexact ⟨(c, b), Prod.mk_lt_mk_iff_left.2 h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMaxOrder β\nx✝ : α × β\na : α\nb : β\n⊢ ∃ b_1, (a, b) < b_1\n[PROOFSTEP]\nobtain ⟨c, h⟩ := exists_gt b\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMaxOrder β\nx✝ : α × β\na : α\nb c : β\nh : b < c\n⊢ ∃ b_1, (a, b) < b_1\n[PROOFSTEP]\nexact ⟨(a, c), Prod.mk_lt_mk_iff_right.2 h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMinOrder α\nx✝ : α × β\na : α\nb : β\n⊢ ∃ b_1, b_1 < (a, b)\n[PROOFSTEP]\nobtain ⟨c, h⟩ := exists_lt a\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMinOrder α\nx✝ : α × β\na : α\nb : β\nc : α\nh : c < a\n⊢ ∃ b_1, b_1 < (a, b)\n[PROOFSTEP]\nexact ⟨(c, b), Prod.mk_lt_mk_iff_left.2 h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMinOrder β\nx✝ : α × β\na : α\nb : β\n⊢ ∃ b_1, b_1 < (a, b)\n[PROOFSTEP]\nobtain ⟨c, h⟩ := exists_lt b\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMinOrder β\nx✝ : α × β\na : α\nb c : β\nh : c < b\n⊢ ∃ b_1, b_1 < (a, b)\n[PROOFSTEP]\nexact ⟨(a, c), Prod.mk_lt_mk_iff_right.2 h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u\nπ : ι → Type u_3\ninst✝² : Nonempty ι\ninst✝¹ : (i : ι) → Preorder (π i)\ninst✝ : ∀ (i : ι), NoMaxOrder (π i)\na : (i : ι) → π i\n⊢ ∃ b, a < b\n[PROOFSTEP]\nclassical\nobtain ⟨b, hb⟩ := exists_gt (a <| Classical.arbitrary _)\nexact ⟨_, lt_update_self_iff.2 hb⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u\nπ : ι → Type u_3\ninst✝² : Nonempty ι\ninst✝¹ : (i : ι) → Preorder (π i)\ninst✝ : ∀ (i : ι), NoMaxOrder (π i)\na : (i : ι) → π i\n⊢ ∃ b, a < b\n[PROOFSTEP]\nobtain ⟨b, hb⟩ := exists_gt (a <| Classical.arbitrary _)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u\nπ : ι → Type u_3\ninst✝² : Nonempty ι\ninst✝¹ : (i : ι) → Preorder (π i)\ninst✝ : ∀ (i : ι), NoMaxOrder (π i)\na : (i : ι) → π i\nb : π (Classical.arbitrary ι)\nhb : a (Classical.arbitrary ι) < b\n⊢ ∃ b, a < b\n[PROOFSTEP]\nexact ⟨_, lt_update_self_iff.2 hb⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u\nπ : ι → Type u_3\ninst✝² : Nonempty ι\ninst✝¹ : (i : ι) → Preorder (π i)\ninst✝ : ∀ (i : ι), NoMinOrder (π i)\na : (i : ι) → π i\n⊢ ∃ b, b < a\n[PROOFSTEP]\nclassical\nobtain ⟨b, hb⟩ := exists_lt (a <| Classical.arbitrary _)\nexact ⟨_, update_lt_self_iff.2 hb⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u\nπ : ι → Type u_3\ninst✝² : Nonempty ι\ninst✝¹ : (i : ι) → Preorder (π i)\ninst✝ : ∀ (i : ι), NoMinOrder (π i)\na : (i : ι) → π i\n⊢ ∃ b, b < a\n[PROOFSTEP]\nobtain ⟨b, hb⟩ := exists_lt (a <| Classical.arbitrary _)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u\nπ : ι → Type u_3\ninst✝² : Nonempty ι\ninst✝¹ : (i : ι) → Preorder (π i)\ninst✝ : ∀ (i : ι), NoMinOrder (π i)\na : (i : ι) → π i\nb : π (Classical.arbitrary ι)\nhb : b < a (Classical.arbitrary ι)\n⊢ ∃ b, b < a\n[PROOFSTEP]\nexact ⟨_, update_lt_self_iff.2 hb⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝¹ : LinearOrder α\ninst✝ : NoBotOrder α\na : α\n⊢ ∃ b, b < a\n[PROOFSTEP]\nsimpa [not_le] using exists_not_ge a\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝¹ : LinearOrder α\ninst✝ : NoTopOrder α\na : α\n⊢ ∃ b, a < b\n[PROOFSTEP]\nsimpa [not_le] using exists_not_le a\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Preorder α\na b : α\n⊢ ¬IsMin a ↔ ∃ b, b < a\n[PROOFSTEP]\nsimp [lt_iff_le_not_le, IsMin, not_forall, exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Preorder α\na b : α\n⊢ ¬IsMax a ↔ ∃ b, a < b\n[PROOFSTEP]\nsimp [lt_iff_le_not_le, IsMax, not_forall, exists_prop]\n", "meta": {"mathlib_filename": "Mathlib.Order.Max", "llama_tokens": 2223, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646140788307, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.3589724971929739}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ Injective fun f => f.toFun\n[PROOFSTEP]\nrintro ⟨f, hf⟩ ⟨g, hg⟩ h\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ↪r s\nhf : ∀ (a : α) (b : β), s b (↑f a) → ∃ a', ↑f a' = b\ng : r ↪r s\nhg : ∀ (a : α) (b : β), s b (↑g a) → ∃ a', ↑g a' = b\nh : (fun f => f.toFun) { toRelEmbedding := f, init' := hf } = (fun f => f.toFun) { toRelEmbedding := g, init' := hg }\n⊢ { toRelEmbedding := f, init' := hf } = { toRelEmbedding := g, init' := hg }\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase mk.mk.e_toRelEmbedding.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ↪r s\nhf : ∀ (a : α) (b : β), s b (↑f a) → ∃ a', ↑f a' = b\ng : r ↪r s\nhg : ∀ (a : α) (b : β), s b (↑g a) → ∃ a', ↑g a' = b\nh : (fun f => f.toFun) { toRelEmbedding := f, init' := hf } = (fun f => f.toFun) { toRelEmbedding := g, init' := hg }\nx : α\n⊢ ↑f x = ↑g x\n[PROOFSTEP]\nexact congr_fun h x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≼i s\na : α\nb : β\nh : s b (↑f a)\n⊢ ∃ a', ↑f a' = b ∧ r a' a\n[PROOFSTEP]\nrcases f.init h with ⟨a', rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≼i s\na a' : α\nh : s (↑f a') (↑f a)\n⊢ ∃ a'_1, ↑f a'_1 = ↑f a' ∧ r a'_1 a\n[PROOFSTEP]\nexact ⟨a', rfl, f.map_rel_iff.1 h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≼i s\ng : s ≼i t\na : α\nc : γ\nh : t c (↑(RelEmbedding.trans f.toRelEmbedding g.toRelEmbedding) a)\n⊢ ∃ a', ↑(RelEmbedding.trans f.toRelEmbedding g.toRelEmbedding) a' = c\n[PROOFSTEP]\nsimp at h ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≼i s\ng : s ≼i t\na : α\nc : γ\nh : t c (↑g (↑f a))\n⊢ ∃ a', ↑g (↑f a') = c\n[PROOFSTEP]\nrcases g.2 _ _ h with ⟨b, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≼i s\ng : s ≼i t\na : α\nb : β\nh : t (↑g.toRelEmbedding b) (↑g (↑f a))\n⊢ ∃ a', ↑g (↑f a') = ↑g.toRelEmbedding b\n[PROOFSTEP]\nhave h := g.map_rel_iff.1 h\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≼i s\ng : s ≼i t\na : α\nb : β\nh✝ : t (↑g.toRelEmbedding b) (↑g (↑f a))\nh : s b (↑f a)\n⊢ ∃ a', ↑g (↑f a') = ↑g.toRelEmbedding b\n[PROOFSTEP]\nrcases f.2 _ _ h with ⟨a', rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≼i s\ng : s ≼i t\na a' : α\nh✝ : t (↑g.toRelEmbedding (↑f.toRelEmbedding a')) (↑g (↑f a))\nh : s (↑f.toRelEmbedding a') (↑f a)\n⊢ ∃ a'_1, ↑g (↑f a'_1) = ↑g.toRelEmbedding (↑f.toRelEmbedding a')\n[PROOFSTEP]\nexact ⟨a', rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝² : IsTrichotomous β s\ninst✝¹ : IsIrrefl β s\ninst✝ : IsWellFounded α r\nf g : r ≼i s\n⊢ f = g\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝² : IsTrichotomous β s\ninst✝¹ : IsIrrefl β s\ninst✝ : IsWellFounded α r\nf g : r ≼i s\na : α\n⊢ ↑f a = ↑g a\n[PROOFSTEP]\nrefine' IsWellFounded.induction r a fun b IH => extensional_of_trichotomous_of_irrefl s fun x => _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝² : IsTrichotomous β s\ninst✝¹ : IsIrrefl β s\ninst✝ : IsWellFounded α r\nf g : r ≼i s\na b : α\nIH : ∀ (y : α), r y b → ↑f y = ↑g y\nx : β\n⊢ s x (↑f b) ↔ s x (↑g b)\n[PROOFSTEP]\nrw [f.init_iff, g.init_iff]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝² : IsTrichotomous β s\ninst✝¹ : IsIrrefl β s\ninst✝ : IsWellFounded α r\nf g : r ≼i s\na b : α\nIH : ∀ (y : α), r y b → ↑f y = ↑g y\nx : β\n⊢ (∃ a', ↑f a' = x ∧ r a' b) ↔ ∃ a', ↑g a' = x ∧ r a' b\n[PROOFSTEP]\nexact exists_congr fun x => and_congr_left fun hx => IH _ hx ▸ Iff.rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\na : r ≼i s\n⊢ ∀ (b : r ≼i s), a = b\n[PROOFSTEP]\nlet _ := a.isWellFounded\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\na : r ≼i s\nx✝ : IsWellFounded α r := RelEmbedding.isWellFounded a.toRelEmbedding\n⊢ ∀ (b : r ≼i s), a = b\n[PROOFSTEP]\nexact Subsingleton.elim a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf g : r ≼i s\na : α\n⊢ ↑f a = ↑g a\n[PROOFSTEP]\nrw [Subsingleton.elim f g]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ≼i s\nh : ¬∃ b, ∀ (x : β), s x b ↔ ∃ y, ↑f y = x\nb x : β\nx✝¹ : ∀ (y : β), s y x → Acc s y\nIH : ∀ (y : β), s y x → ∃ a, ↑f a = y\nhn : ∀ (x_1 : α), ¬↑f x_1 = x\ny : β\nx✝ : ∃ y_1, ↑f y_1 = y\na : α\ne : ↑f a = y\n⊢ s y x\n[PROOFSTEP]\nrw [← e]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ≼i s\nh : ¬∃ b, ∀ (x : β), s x b ↔ ∃ y, ↑f y = x\nb x : β\nx✝¹ : ∀ (y : β), s y x → Acc s y\nIH : ∀ (y : β), s y x → ∃ a, ↑f a = y\nhn : ∀ (x_1 : α), ¬↑f x_1 = x\ny : β\nx✝ : ∃ y_1, ↑f y_1 = y\na : α\ne : ↑f a = y\n⊢ s (↑f a) x\n[PROOFSTEP]\nexact (trichotomous _ _).resolve_right (not_or_of_not (hn a) fun hl => not_exists.2 hn (f.init hl))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\np : Set β\nf : r ≼i s\nH : ∀ (a : α), ↑f a ∈ p\na : α\nx✝ : ↑p\nb : β\nm : b ∈ p\nh : Subrel s p { val := b, property := m } (↑(RelEmbedding.codRestrict p f.toRelEmbedding H) a)\na' : α\ne : ↑f a' = ↑{ val := b, property := m }\n⊢ ↑(RelEmbedding.codRestrict p f.toRelEmbedding H) a' = { val := b, property := m }\n[PROOFSTEP]\nsubst e\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\np : Set β\nf : r ≼i s\nH : ∀ (a : α), ↑f a ∈ p\na : α\nx✝ : ↑p\na' : α\nm : ↑f a' ∈ p\nh : Subrel s p { val := ↑f a', property := m } (↑(RelEmbedding.codRestrict p f.toRelEmbedding H) a)\n⊢ ↑(RelEmbedding.codRestrict p f.toRelEmbedding H) a' = { val := ↑f a', property := m }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns✝ : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ns : β → β → Prop\na : α\nb : α ⊕ β\n⊢ Sum.Lex r s b\n      (↑{ toEmbedding := { toFun := Sum.inl, inj' := (_ : ∀ (x x_1 : α), Sum.inl x = Sum.inl x_1 → x = x_1) },\n            map_rel_iff' := (_ : ∀ {a b : α}, Sum.Lex r s (Sum.inl a) (Sum.inl b) ↔ r a b) }\n        a) →\n    ∃ a',\n      ↑{ toEmbedding := { toFun := Sum.inl, inj' := (_ : ∀ (x x_1 : α), Sum.inl x = Sum.inl x_1 → x = x_1) },\n              map_rel_iff' := (_ : ∀ {a b : α}, Sum.Lex r s (Sum.inl a) (Sum.inl b) ↔ r a b) }\n          a' =\n        b\n[PROOFSTEP]\ncases b <;> [exact fun _ => ⟨_, rfl⟩; exact False.elim ∘ Sum.lex_inr_inl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns✝ : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ns : β → β → Prop\na : α\nb : α ⊕ β\n⊢ Sum.Lex r s b\n      (↑{ toEmbedding := { toFun := Sum.inl, inj' := (_ : ∀ (x x_1 : α), Sum.inl x = Sum.inl x_1 → x = x_1) },\n            map_rel_iff' := (_ : ∀ {a b : α}, Sum.Lex r s (Sum.inl a) (Sum.inl b) ↔ r a b) }\n        a) →\n    ∃ a',\n      ↑{ toEmbedding := { toFun := Sum.inl, inj' := (_ : ∀ (x x_1 : α), Sum.inl x = Sum.inl x_1 → x = x_1) },\n              map_rel_iff' := (_ : ∀ {a b : α}, Sum.Lex r s (Sum.inl a) (Sum.inl b) ↔ r a b) }\n          a' =\n        b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns✝ : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ns : β → β → Prop\na val✝ : α\n⊢ Sum.Lex r s (Sum.inl val✝)\n      (↑{ toEmbedding := { toFun := Sum.inl, inj' := (_ : ∀ (x x_1 : α), Sum.inl x = Sum.inl x_1 → x = x_1) },\n            map_rel_iff' := (_ : ∀ {a b : α}, Sum.Lex r s (Sum.inl a) (Sum.inl b) ↔ r a b) }\n        a) →\n    ∃ a',\n      ↑{ toEmbedding := { toFun := Sum.inl, inj' := (_ : ∀ (x x_1 : α), Sum.inl x = Sum.inl x_1 → x = x_1) },\n              map_rel_iff' := (_ : ∀ {a b : α}, Sum.Lex r s (Sum.inl a) (Sum.inl b) ↔ r a b) }\n          a' =\n        Sum.inl val✝\n[PROOFSTEP]\nexact fun _ => ⟨_, rfl⟩\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns✝ : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ns : β → β → Prop\na : α\nval✝ : β\n⊢ Sum.Lex r s (Sum.inr val✝)\n      (↑{ toEmbedding := { toFun := Sum.inl, inj' := (_ : ∀ (x x_1 : α), Sum.inl x = Sum.inl x_1 → x = x_1) },\n            map_rel_iff' := (_ : ∀ {a b : α}, Sum.Lex r s (Sum.inl a) (Sum.inl b) ↔ r a b) }\n        a) →\n    ∃ a',\n      ↑{ toEmbedding := { toFun := Sum.inl, inj' := (_ : ∀ (x x_1 : α), Sum.inl x = Sum.inl x_1 → x = x_1) },\n              map_rel_iff' := (_ : ∀ {a b : α}, Sum.Lex r s (Sum.inl a) (Sum.inl b) ↔ r a b) }\n          a' =\n        Sum.inr val✝\n[PROOFSTEP]\nexact False.elim ∘ Sum.lex_inr_inl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≼i s\na : α\n⊢ Acc r a → Acc s (↑f a)\n[PROOFSTEP]\nrefine' fun h => Acc.recOn h fun a _ ha => Acc.intro _ fun b hb => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≼i s\na✝ : α\nh : Acc r a✝\na : α\nx✝ : ∀ (y : α), r y a → Acc r y\nha : ∀ (y : α), r y a → Acc s (↑f y)\nb : β\nhb : s b (↑f a)\n⊢ Acc s b\n[PROOFSTEP]\nobtain ⟨a', rfl⟩ := f.init hb\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≼i s\na✝ : α\nh : Acc r a✝\na : α\nx✝ : ∀ (y : α), r y a → Acc r y\nha : ∀ (y : α), r y a → Acc s (↑f y)\na' : α\nhb : s (↑f a') (↑f a)\n⊢ Acc s (↑f a')\n[PROOFSTEP]\nexact ha _ (f.map_rel_iff.mp hb)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nf : r ≺i r\n⊢ False\n[PROOFSTEP]\nhave h := f.lt_top f.top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nf : r ≺i r\nh : r (↑f.toRelEmbedding f.top) f.top\n⊢ False\n[PROOFSTEP]\nrw [show f f.top = f.top from InitialSeg.eq (↑f) (InitialSeg.refl r) f.top] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nf : r ≺i r\nh : r f.top f.top\n⊢ False\n[PROOFSTEP]\nexact _root_.irrefl _ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≺i s\ng : s ≼i t\na : γ\n⊢ t a (↑g f.top) ↔ ∃ a_1, ↑(RelEmbedding.trans f.toRelEmbedding g.toRelEmbedding) a_1 = a\n[PROOFSTEP]\nsimp only [g.init_iff, PrincipalSeg.down, exists_and_left.symm, exists_swap, RelEmbedding.trans_apply, exists_eq_right',\n  InitialSeg.coe_coe_fn]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≃r s\ng : s ≺i t\nc : γ\nx✝ : ∃ a, ↑g.toRelEmbedding a = c\nb : β\nh : ↑g.toRelEmbedding b = c\n⊢ ↑g.toRelEmbedding (↑f (↑(RelIso.symm f) b)) = c\n[PROOFSTEP]\nsimp only [h, RelIso.apply_symm_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≃r s\ng : s ≺i t\nc : γ\nthis : (∃ a, ↑g.toRelEmbedding a = c) ↔ ∃ a, ↑g.toRelEmbedding (↑f a) = c\n⊢ t c g.top ↔ ∃ a, ↑(RelEmbedding.trans (RelIso.toRelEmbedding f) g.toRelEmbedding) a = c\n[PROOFSTEP]\nsimpa [PrincipalSeg.down]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns✝ : β → β → Prop\nt✝ : γ → γ → Prop\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≺i s\ng : s ≃r t\n⊢ ∀ (b : γ), t b (↑g f.top) ↔ ∃ a, ↑(RelEmbedding.trans f.toRelEmbedding (RelIso.toRelEmbedding g)) a = b\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns✝ : β → β → Prop\nt✝ : γ → γ → Prop\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≺i s\ng : s ≃r t\nx : γ\n⊢ t x (↑g f.top) ↔ ∃ a, ↑(RelEmbedding.trans f.toRelEmbedding (RelIso.toRelEmbedding g)) a = x\n[PROOFSTEP]\nrw [← g.apply_symm_apply x, g.map_rel_iff, f.down', exists_congr]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns✝ : β → β → Prop\nt✝ : γ → γ → Prop\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≺i s\ng : s ≃r t\nx : γ\n⊢ ∀ (a : α),\n    ↑f.toRelEmbedding a = ↑(RelIso.symm g) x ↔\n      ↑(RelEmbedding.trans f.toRelEmbedding (RelIso.toRelEmbedding g)) a = ↑g (↑(RelIso.symm g) x)\n[PROOFSTEP]\nintro y\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns✝ : β → β → Prop\nt✝ : γ → γ → Prop\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nf : r ≺i s\ng : s ≃r t\nx : γ\ny : α\n⊢ ↑f.toRelEmbedding y = ↑(RelIso.symm g) x ↔\n    ↑(RelEmbedding.trans f.toRelEmbedding (RelIso.toRelEmbedding g)) y = ↑g (↑(RelIso.symm g) x)\n[PROOFSTEP]\nexact ⟨congr_arg g, fun h => g.toEquiv.bijective.1 h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf g : r ≺i s\n⊢ f = g\n[PROOFSTEP]\nhave ef : (f : α → β) = g := by\n  show ((f : r ≼i s) : α → β) = (g : r ≼i s)\n  rw [@Subsingleton.elim _ _ (f : r ≼i s) g]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf g : r ≺i s\n⊢ ↑f.toRelEmbedding = ↑g.toRelEmbedding\n[PROOFSTEP]\nshow ((f : r ≼i s) : α → β) = (g : r ≼i s)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf g : r ≺i s\n⊢ ↑{ toRelEmbedding := f.toRelEmbedding,\n        init' := (_ : ∀ (x : α) (x_1 : β), s x_1 (↑f.toRelEmbedding x) → ∃ a', ↑f.toRelEmbedding a' = x_1) } =\n    ↑{ toRelEmbedding := g.toRelEmbedding,\n        init' := (_ : ∀ (x : α) (x_1 : β), s x_1 (↑g.toRelEmbedding x) → ∃ a', ↑g.toRelEmbedding a' = x_1) }\n[PROOFSTEP]\nrw [@Subsingleton.elim _ _ (f : r ≼i s) g]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf g : r ≺i s\nef : ↑f.toRelEmbedding = ↑g.toRelEmbedding\n⊢ f = g\n[PROOFSTEP]\nhave et : f.top = g.top := by\n  refine' extensional_of_trichotomous_of_irrefl s fun x => _\n  simp only [PrincipalSeg.down, ef]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf g : r ≺i s\nef : ↑f.toRelEmbedding = ↑g.toRelEmbedding\n⊢ f.top = g.top\n[PROOFSTEP]\nrefine' extensional_of_trichotomous_of_irrefl s fun x => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf g : r ≺i s\nef : ↑f.toRelEmbedding = ↑g.toRelEmbedding\nx : β\n⊢ s x f.top ↔ s x g.top\n[PROOFSTEP]\nsimp only [PrincipalSeg.down, ef]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf g : r ≺i s\nef : ↑f.toRelEmbedding = ↑g.toRelEmbedding\net : f.top = g.top\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\ng : r ≺i s\ntoRelEmbedding✝ : r ↪r s\ntop✝ : β\ndown'✝ : ∀ (b : β), s b top✝ ↔ ∃ a, ↑toRelEmbedding✝ a = b\nef : ↑{ toRelEmbedding := toRelEmbedding✝, top := top✝, down' := down'✝ }.toRelEmbedding = ↑g.toRelEmbedding\net : { toRelEmbedding := toRelEmbedding✝, top := top✝, down' := down'✝ }.top = g.top\n⊢ { toRelEmbedding := toRelEmbedding✝, top := top✝, down' := down'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\ntoRelEmbedding✝¹ : r ↪r s\ntop✝¹ : β\ndown'✝¹ : ∀ (b : β), s b top✝¹ ↔ ∃ a, ↑toRelEmbedding✝¹ a = b\ntoRelEmbedding✝ : r ↪r s\ntop✝ : β\ndown'✝ : ∀ (b : β), s b top✝ ↔ ∃ a, ↑toRelEmbedding✝ a = b\nef :\n  ↑{ toRelEmbedding := toRelEmbedding✝¹, top := top✝¹, down' := down'✝¹ }.toRelEmbedding =\n    ↑{ toRelEmbedding := toRelEmbedding✝, top := top✝, down' := down'✝ }.toRelEmbedding\net :\n  { toRelEmbedding := toRelEmbedding✝¹, top := top✝¹, down' := down'✝¹ }.top =\n    { toRelEmbedding := toRelEmbedding✝, top := top✝, down' := down'✝ }.top\n⊢ { toRelEmbedding := toRelEmbedding✝¹, top := top✝¹, down' := down'✝¹ } =\n    { toRelEmbedding := toRelEmbedding✝, top := top✝, down' := down'✝ }\n[PROOFSTEP]\nhave := RelEmbedding.coe_fn_injective ef\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\ntoRelEmbedding✝¹ : r ↪r s\ntop✝¹ : β\ndown'✝¹ : ∀ (b : β), s b top✝¹ ↔ ∃ a, ↑toRelEmbedding✝¹ a = b\ntoRelEmbedding✝ : r ↪r s\ntop✝ : β\ndown'✝ : ∀ (b : β), s b top✝ ↔ ∃ a, ↑toRelEmbedding✝ a = b\nef :\n  ↑{ toRelEmbedding := toRelEmbedding✝¹, top := top✝¹, down' := down'✝¹ }.toRelEmbedding =\n    ↑{ toRelEmbedding := toRelEmbedding✝, top := top✝, down' := down'✝ }.toRelEmbedding\net :\n  { toRelEmbedding := toRelEmbedding✝¹, top := top✝¹, down' := down'✝¹ }.top =\n    { toRelEmbedding := toRelEmbedding✝, top := top✝, down' := down'✝ }.top\nthis :\n  { toRelEmbedding := toRelEmbedding✝¹, top := top✝¹, down' := down'✝¹ }.toRelEmbedding =\n    { toRelEmbedding := toRelEmbedding✝, top := top✝, down' := down'✝ }.toRelEmbedding\n⊢ { toRelEmbedding := toRelEmbedding✝¹, top := top✝¹, down' := down'✝¹ } =\n    { toRelEmbedding := toRelEmbedding✝, top := top✝, down' := down'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder γ t\ne : r ≃r s\nf : r ≺i t\ng : s ≺i t\n⊢ f.top = g.top\n[PROOFSTEP]\nrw [Subsingleton.elim f (PrincipalSeg.equivLT e g)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder γ t\ne : r ≃r s\nf : r ≺i t\ng : s ≺i t\n⊢ (equivLT e g).top = g.top\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns✝ : β → β → Prop\nt✝ : γ → γ → Prop\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder γ t\nf : r ≺i s\ng : s ≺i t\nh : r ≺i t\n⊢ t h.top g.top\n[PROOFSTEP]\nrw [Subsingleton.elim h (f.trans g)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns✝ : β → β → Prop\nt✝ : γ → γ → Prop\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder γ t\nf : r ≺i s\ng : s ≺i t\nh : r ≺i t\n⊢ t (PrincipalSeg.trans f g).top g.top\n[PROOFSTEP]\napply PrincipalSeg.lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsEmpty α\nb : β\nH : ∀ (b' : β), ¬s b' b\nsrc✝ : r ↪r s := RelEmbedding.ofIsEmpty r s\n⊢ ∀ (b_1 : β),\n    s b_1 b ↔\n      ∃ a,\n        ↑{ toEmbedding := src✝.toEmbedding,\n                map_rel_iff' := (_ : ∀ {a b : α}, s (↑src✝.toEmbedding a) (↑src✝.toEmbedding b) ↔ r a b) }\n            a =\n          b_1\n[PROOFSTEP]\nsimp [H]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsTrans β s\n⊢ WellFounded s ↔ ∀ (b : β), WellFounded (Subrel s {b' | s b' b})\n[PROOFSTEP]\nrefine'\n  ⟨fun wf b => ⟨fun b' => ((PrincipalSeg.ofElement _ b).acc b').mpr (wf.apply b')⟩, fun wf =>\n    ⟨fun b => Acc.intro _ fun b' hb' => _⟩⟩\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsTrans β s\nwf : ∀ (b : β), WellFounded (Subrel s {b' | s b' b})\nb b' : β\nhb' : s b' b\n⊢ Acc s b'\n[PROOFSTEP]\nlet f := PrincipalSeg.ofElement s b\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsTrans β s\nwf : ∀ (b : β), WellFounded (Subrel s {b' | s b' b})\nb b' : β\nhb' : s b' b\nf : Subrel s {b_1 | s b_1 b} ≺i s := PrincipalSeg.ofElement s b\n⊢ Acc s b'\n[PROOFSTEP]\nobtain ⟨b', rfl⟩ := f.down.mp ((PrincipalSeg.ofElement_top s b).symm ▸ hb' : s b' f.top)\n[GOAL]\ncase intro\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nβ : Type u_4\ns : β → β → Prop\ninst✝ : IsTrans β s\nwf : ∀ (b : β), WellFounded (Subrel s {b' | s b' b})\nb : β\nf : Subrel s {b_1 | s b_1 b} ≺i s := PrincipalSeg.ofElement s b\nb' : ↑{b_1 | s b_1 b}\nhb' : s (↑f.toRelEmbedding b') b\n⊢ Acc s (↑f.toRelEmbedding b')\n[PROOFSTEP]\nexact (f.acc b').mp ((wf b).apply b')\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ≼i s\n⊢ (r ≺i s) ⊕ (r ≃r s)\n[PROOFSTEP]\nby_cases h : Surjective f\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ≼i s\nh : Surjective ↑f\n⊢ (r ≺i s) ⊕ (r ≃r s)\n[PROOFSTEP]\nexact Sum.inr (RelIso.ofSurjective f h)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ≼i s\nh : ¬Surjective ↑f\n⊢ (r ≺i s) ⊕ (r ≃r s)\n[PROOFSTEP]\nhave h' : _ := (InitialSeg.eq_or_principal f).resolve_left h\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ≼i s\nh : ¬Surjective ↑f\nh' : ∃ b, ∀ (x : β), s x b ↔ ∃ y, ↑f y = x\n⊢ (r ≺i s) ⊕ (r ≃r s)\n[PROOFSTEP]\nexact Sum.inl ⟨f, Classical.choose h', Classical.choose_spec h'⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝¹ : IsWellOrder β s\ninst✝ : IsTrans γ t\nf : r ≼i s\ng : s ≺i t\na : α\n⊢ ↑(leLT f g).toRelEmbedding a = ↑g.toRelEmbedding (↑f a)\n[PROOFSTEP]\ndelta InitialSeg.leLT\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝¹ : IsWellOrder β s\ninst✝ : IsTrans γ t\nf : r ≼i s\ng : s ≺i t\na : α\n⊢ ↑(match ltOrEq f with\n          | Sum.inl f' => PrincipalSeg.trans f' g\n          | Sum.inr f' => PrincipalSeg.equivLT f' g).toRelEmbedding\n      a =\n    ↑g.toRelEmbedding (↑f a)\n[PROOFSTEP]\ncases' h : f.ltOrEq with f' f'\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝¹ : IsWellOrder β s\ninst✝ : IsTrans γ t\nf : r ≼i s\ng : s ≺i t\na : α\nf' : r ≺i s\nh : ltOrEq f = Sum.inl f'\n⊢ ↑(match Sum.inl f' with\n          | Sum.inl f' => PrincipalSeg.trans f' g\n          | Sum.inr f' => PrincipalSeg.equivLT f' g).toRelEmbedding\n      a =\n    ↑g.toRelEmbedding (↑f a)\n[PROOFSTEP]\nsimp only [PrincipalSeg.trans_apply, f.ltOrEq_apply_left]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝¹ : IsWellOrder β s\ninst✝ : IsTrans γ t\nf : r ≼i s\ng : s ≺i t\na : α\nf' : r ≃r s\nh : ltOrEq f = Sum.inr f'\n⊢ ↑(match Sum.inr f' with\n          | Sum.inl f' => PrincipalSeg.trans f' g\n          | Sum.inr f' => PrincipalSeg.equivLT f' g).toRelEmbedding\n      a =\n    ↑g.toRelEmbedding (↑f a)\n[PROOFSTEP]\nsimp only [PrincipalSeg.equivLT_apply, f.ltOrEq_apply_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na : α\nIH : (y : α) → r y a → { b // ¬s (↑f y) b }\n⊢ { b // ¬s (↑f a) b }\n[PROOFSTEP]\nlet S := {b | ∀ a h, s (IH a h).1 b}\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na : α\nIH : (y : α) → r y a → { b // ¬s (↑f y) b }\nS : Set β := {b | ∀ (a_1 : α) (h : r a_1 a), s (↑(IH a_1 h)) b}\n⊢ { b // ¬s (↑f a) b }\n[PROOFSTEP]\nhave : f a ∈ S := fun a' h =>\n  ((trichotomous _ _).resolve_left fun h' => (IH a' h).2 <| _root_.trans (f.map_rel_iff.2 h) h').resolve_left fun h' =>\n    (IH a' h).2 <| h' ▸ f.map_rel_iff.2 h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na : α\nIH : (y : α) → r y a → { b // ¬s (↑f y) b }\nS : Set β := {b | ∀ (a_1 : α) (h : r a_1 a), s (↑(IH a_1 h)) b}\nthis : ↑f a ∈ S\n⊢ { b // ¬s (↑f a) b }\n[PROOFSTEP]\nexact ⟨_, IsWellFounded.wf.not_lt_min _ ⟨_, this⟩ this⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na✝ a : α\n⊢ r a a✝ → s ↑(collapseF f a) ↑(collapseF f a✝)\n[PROOFSTEP]\nrevert a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na : α\n⊢ ∀ (a_1 : α), r a_1 a → s ↑(collapseF f a_1) ↑(collapseF f a)\n[PROOFSTEP]\nshow (collapseF f a).1 ∈ {b | ∀ (a') (_ : r a' a), s (collapseF f a').1 b}\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na : α\n⊢ ↑(collapseF f a) ∈ {b | ∀ (a' : α), r a' a → s (↑(collapseF f a')) b}\n[PROOFSTEP]\nunfold collapseF\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na : α\n⊢ ↑(WellFounded.fix (_ : WellFounded r)\n        (fun a IH =>\n          let S := {b | ∀ (a_1 : α) (h : r a_1 a), s (↑(IH a_1 h)) b};\n          let_fun this := (_ : ∀ (a' : α) (h : r a' a), s (↑(IH a' h)) (↑f a));\n          { val := WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S),\n            property := (_ : ¬s (↑f a) (WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S))) })\n        a) ∈\n    {b |\n      ∀ (a' : α),\n        r a' a →\n          s\n            (↑(WellFounded.fix (_ : WellFounded r)\n                (fun a IH =>\n                  let S := {b | ∀ (a_1 : α) (h : r a_1 a), s (↑(IH a_1 h)) b};\n                  let_fun this := (_ : ∀ (a' : α) (h : r a' a), s (↑(IH a' h)) (↑f a));\n                  { val := WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S),\n                    property := (_ : ¬s (↑f a) (WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S))) })\n                a'))\n            b}\n[PROOFSTEP]\nrw [WellFounded.fix_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na : α\n⊢ ↑(let S :=\n        {b |\n          ∀ (a_1 : α) (h : r a_1 a),\n            s\n              (↑((fun y x =>\n                    WellFounded.fix (_ : WellFounded r)\n                      (fun a IH =>\n                        let S := {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b};\n                        let_fun this := (_ : ∀ (a' : α) (h : r a' a), s (↑(IH a' h)) (↑f a));\n                        { val := WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S),\n                          property := (_ : ¬s (↑f a) (WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S))) })\n                      y)\n                  a_1 h))\n              b};\n      let_fun this :=\n        (_ :\n          ∀ (a' : α),\n            r a' a →\n              s\n                (↑(WellFounded.fix (_ : WellFounded r)\n                    (fun a IH =>\n                      let S := {b | ∀ (a_1 : α) (h : r a_1 a), s (↑(IH a_1 h)) b};\n                      let_fun this := (_ : ∀ (a' : α) (h : r a' a), s (↑(IH a' h)) (↑f a));\n                      { val := WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S),\n                        property := (_ : ¬s (↑f a) (WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S))) })\n                    a'))\n                (↑f a));\n      { val := WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S),\n        property := (_ : ¬s (↑f a) (WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S))) }) ∈\n    {b |\n      ∀ (a' : α),\n        r a' a →\n          s\n            (↑(WellFounded.fix (_ : WellFounded r)\n                (fun a IH =>\n                  let S := {b | ∀ (a_1 : α) (h : r a_1 a), s (↑(IH a_1 h)) b};\n                  let_fun this := (_ : ∀ (a' : α) (h : r a' a), s (↑(IH a' h)) (↑f a));\n                  { val := WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S),\n                    property := (_ : ¬s (↑f a) (WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S))) })\n                a'))\n            b}\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na : α\n⊢ WellFounded.min (_ : WellFounded s)\n      {b |\n        ∀ (a_1 : α),\n          r a_1 a →\n            s\n              (↑(WellFounded.fix (_ : WellFounded r)\n                  (fun a IH =>\n                    {\n                      val :=\n                        WellFounded.min (_ : WellFounded s) {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}\n                          (_ : ∃ x, x ∈ {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}),\n                      property :=\n                        (_ :\n                          ¬s (↑f a)\n                              (WellFounded.min (_ : WellFounded s) {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}\n                                (_ : ∃ x, x ∈ {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}))) })\n                  a_1))\n              b}\n      (_ :\n        ∃ x,\n          x ∈\n            {b |\n              ∀ (a_1 : α),\n                r a_1 a →\n                  s\n                    (↑(WellFounded.fix (_ : WellFounded r)\n                        (fun a IH =>\n                          {\n                            val :=\n                              WellFounded.min (_ : WellFounded s) {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}\n                                (_ : ∃ x, x ∈ {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}),\n                            property :=\n                              (_ :\n                                ¬s (↑f a)\n                                    (WellFounded.min (_ : WellFounded s)\n                                      {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}\n                                      (_ : ∃ x, x ∈ {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}))) })\n                        a_1))\n                    b}) ∈\n    {b |\n      ∀ (a' : α),\n        r a' a →\n          s\n            (↑(WellFounded.fix (_ : WellFounded r)\n                (fun a IH =>\n                  {\n                    val :=\n                      WellFounded.min (_ : WellFounded s) {b | ∀ (a_1 : α) (h : r a_1 a), s (↑(IH a_1 h)) b}\n                        (_ : ∃ x, x ∈ {b | ∀ (a_1 : α) (h : r a_1 a), s (↑(IH a_1 h)) b}),\n                    property :=\n                      (_ :\n                        ¬s (↑f a)\n                            (WellFounded.min (_ : WellFounded s) {b | ∀ (a_1 : α) (h : r a_1 a), s (↑(IH a_1 h)) b}\n                              (_ : ∃ x, x ∈ {b | ∀ (a_1 : α) (h : r a_1 a), s (↑(IH a_1 h)) b}))) })\n                a'))\n            b}\n[PROOFSTEP]\napply WellFounded.min_mem _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na : α\nb : β\nh : ∀ (a' : α), r a' a → s (↑(collapseF f a')) b\n⊢ ¬s b ↑(collapseF f a)\n[PROOFSTEP]\nunfold collapseF\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na : α\nb : β\nh : ∀ (a' : α), r a' a → s (↑(collapseF f a')) b\n⊢ ¬s b\n      ↑(WellFounded.fix (_ : WellFounded r)\n          (fun a IH =>\n            let S := {b | ∀ (a_1 : α) (h : r a_1 a), s (↑(IH a_1 h)) b};\n            let_fun this := (_ : ∀ (a' : α) (h : r a' a), s (↑(IH a' h)) (↑f a));\n            { val := WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S),\n              property := (_ : ¬s (↑f a) (WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S))) })\n          a)\n[PROOFSTEP]\nrw [WellFounded.fix_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na : α\nb : β\nh : ∀ (a' : α), r a' a → s (↑(collapseF f a')) b\n⊢ ¬s b\n      ↑(let S :=\n          {b |\n            ∀ (a_1 : α) (h : r a_1 a),\n              s\n                (↑((fun y x =>\n                      WellFounded.fix (_ : WellFounded r)\n                        (fun a IH =>\n                          let S := {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b};\n                          let_fun this := (_ : ∀ (a' : α) (h : r a' a), s (↑(IH a' h)) (↑f a));\n                          { val := WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S),\n                            property := (_ : ¬s (↑f a) (WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S))) })\n                        y)\n                    a_1 h))\n                b};\n        let_fun this :=\n          (_ :\n            ∀ (a' : α),\n              r a' a →\n                s\n                  (↑(WellFounded.fix (_ : WellFounded r)\n                      (fun a IH =>\n                        let S := {b | ∀ (a_1 : α) (h : r a_1 a), s (↑(IH a_1 h)) b};\n                        let_fun this := (_ : ∀ (a' : α) (h : r a' a), s (↑(IH a' h)) (↑f a));\n                        { val := WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S),\n                          property := (_ : ¬s (↑f a) (WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S))) })\n                      a'))\n                  (↑f a));\n        { val := WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S),\n          property := (_ : ¬s (↑f a) (WellFounded.min (_ : WellFounded s) S (_ : ∃ x, x ∈ S))) })\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\na : α\nb : β\nh : ∀ (a' : α), r a' a → s (↑(collapseF f a')) b\n⊢ ¬s b\n      (WellFounded.min (_ : WellFounded s)\n        {b |\n          ∀ (a_1 : α),\n            r a_1 a →\n              s\n                (↑(WellFounded.fix (_ : WellFounded r)\n                    (fun a IH =>\n                      {\n                        val :=\n                          WellFounded.min (_ : WellFounded s) {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}\n                            (_ : ∃ x, x ∈ {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}),\n                        property :=\n                          (_ :\n                            ¬s (↑f a)\n                                (WellFounded.min (_ : WellFounded s) {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}\n                                  (_ : ∃ x, x ∈ {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}))) })\n                    a_1))\n                b}\n        (_ :\n          ∃ x,\n            x ∈\n              {b |\n                ∀ (a_1 : α),\n                  r a_1 a →\n                    s\n                      (↑(WellFounded.fix (_ : WellFounded r)\n                          (fun a IH =>\n                            {\n                              val :=\n                                WellFounded.min (_ : WellFounded s) {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}\n                                  (_ : ∃ x, x ∈ {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}),\n                              property :=\n                                (_ :\n                                  ¬s (↑f a)\n                                      (WellFounded.min (_ : WellFounded s)\n                                        {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}\n                                        (_ : ∃ x, x ∈ {b | ∀ (a_2 : α) (h : r a_2 a), s (↑(IH a_2 h)) b}))) })\n                          a_1))\n                      b}))\n[PROOFSTEP]\nexact WellFounded.not_lt_min _ _ _ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\nthis : IsWellOrder α r\na✝ : α\nb✝ b : β\nx✝¹ : ∀ (y : β), s y b → Acc s y\nx✝ :\n  ∀ (y : β),\n    s y b →\n      ∀ (x : α),\n        s y\n            (↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b)))\n              x) →\n          ∃ a',\n            ↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b)))\n                a' =\n              y\na : α\nh : s b (↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b))) a)\n⊢ ∃ a', ↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b))) a' = b\n[PROOFSTEP]\nrcases(@IsWellFounded.wf _ r).has_min {a | ¬s (collapseF f a).1 b} ⟨_, asymm h⟩ with ⟨m, hm, hm'⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\nthis : IsWellOrder α r\na✝ : α\nb✝ b : β\nx✝¹ : ∀ (y : β), s y b → Acc s y\nx✝ :\n  ∀ (y : β),\n    s y b →\n      ∀ (x : α),\n        s y\n            (↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b)))\n              x) →\n          ∃ a',\n            ↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b)))\n                a' =\n              y\na : α\nh : s b (↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b))) a)\nm : α\nhm : m ∈ {a | ¬s (↑(collapseF f a)) b}\nhm' : ∀ (x : α), x ∈ {a | ¬s (↑(collapseF f a)) b} → ¬r x m\n⊢ ∃ a', ↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b))) a' = b\n[PROOFSTEP]\nrefine' ⟨m, ((@trichotomous _ s _ _ _).resolve_left hm).resolve_right (collapseF.not_lt f _ fun a' h' => _)⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\nthis : IsWellOrder α r\na✝ : α\nb✝ b : β\nx✝¹ : ∀ (y : β), s y b → Acc s y\nx✝ :\n  ∀ (y : β),\n    s y b →\n      ∀ (x : α),\n        s y\n            (↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b)))\n              x) →\n          ∃ a',\n            ↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b)))\n                a' =\n              y\na : α\nh : s b (↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b))) a)\nm : α\nhm : m ∈ {a | ¬s (↑(collapseF f a)) b}\nhm' : ∀ (x : α), x ∈ {a | ¬s (↑(collapseF f a)) b} → ¬r x m\na' : α\nh' : r a' m\n⊢ s (↑(collapseF f a')) b\n[PROOFSTEP]\nby_contra hn\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder β s\nf : r ↪r s\nthis : IsWellOrder α r\na✝ : α\nb✝ b : β\nx✝¹ : ∀ (y : β), s y b → Acc s y\nx✝ :\n  ∀ (y : β),\n    s y b →\n      ∀ (x : α),\n        s y\n            (↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b)))\n              x) →\n          ∃ a',\n            ↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b)))\n                a' =\n              y\na : α\nh : s b (↑(ofMonotone (fun a => ↑(collapseF f a)) (_ : ∀ (a b : α), r a b → s ↑(collapseF f a) ↑(collapseF f b))) a)\nm : α\nhm : m ∈ {a | ¬s (↑(collapseF f a)) b}\nhm' : ∀ (x : α), x ∈ {a | ¬s (↑(collapseF f a)) b} → ¬r x m\na' : α\nh' : r a' m\nhn : ¬s (↑(collapseF f a')) b\n⊢ False\n[PROOFSTEP]\nexact hm' _ hn h'\n", "meta": {"mathlib_filename": "Mathlib.Order.InitialSeg", "llama_tokens": 19777, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6757646010190476, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.35897249025549466}}
{"text": "[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\n⊢ HasIntegral I l (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n    (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y)\n[PROOFSTEP]\nrefine' HasIntegral.of_mul ‖y‖ fun ε ε0 => _\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ\nε0 : 0 < ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n              ‖y‖ * ε\n[PROOFSTEP]\nlift ε to ℝ≥0 using ε0.le\n[GOAL]\ncase intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ↑ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n              ‖y‖ * ↑ε\n[PROOFSTEP]\nrw [NNReal.coe_pos] at ε0 \n[GOAL]\ncase intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n              ‖y‖ * ↑ε\n[PROOFSTEP]\nhave A : μ (s ∩ Box.Icc I) ≠ ∞ := ((measure_mono <| Set.inter_subset_right _ _).trans_lt (I.measure_Icc_lt_top μ)).ne\n[GOAL]\ncase intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n              ‖y‖ * ↑ε\n[PROOFSTEP]\nhave B : μ (s ∩ I) ≠ ∞ := ((measure_mono <| Set.inter_subset_right _ _).trans_lt (I.measure_coe_lt_top μ)).ne\n[GOAL]\ncase intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n              ‖y‖ * ↑ε\n[PROOFSTEP]\nobtain ⟨F, hFs, hFc, hμF⟩ : ∃ F, F ⊆ s ∩ Box.Icc I ∧ IsClosed F ∧ μ ((s ∩ Box.Icc I) \\ F) < ε :=\n  (hs.inter I.measurableSet_Icc).exists_isClosed_diff_lt A (ENNReal.coe_pos.2 ε0).ne'\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n              ‖y‖ * ↑ε\n[PROOFSTEP]\nobtain ⟨U, hsU, hUo, hUt, hμU⟩ : ∃ U, s ∩ Box.Icc I ⊆ U ∧ IsOpen U ∧ μ U < ∞ ∧ μ (U \\ (s ∩ Box.Icc I)) < ε :=\n  (hs.inter I.measurableSet_Icc).exists_isOpen_diff_lt A (ENNReal.coe_pos.2 ε0).ne'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n              ‖y‖ * ↑ε\n[PROOFSTEP]\nhave : ∀ x ∈ s ∩ Box.Icc I, ∃ r : Ioi (0 : ℝ), closedBall x r ⊆ U := fun x hx =>\n  by\n  rcases nhds_basis_closedBall.mem_iff.1 (hUo.mem_nhds <| hsU hx) with ⟨r, hr₀, hr⟩\n  exact ⟨⟨r, hr₀⟩, hr⟩\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nx : ι → ℝ\nhx : x ∈ s ∩ ↑Box.Icc I\n⊢ ∃ r, closedBall x ↑r ⊆ U\n[PROOFSTEP]\nrcases nhds_basis_closedBall.mem_iff.1 (hUo.mem_nhds <| hsU hx) with ⟨r, hr₀, hr⟩\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nx : ι → ℝ\nhx : x ∈ s ∩ ↑Box.Icc I\nr : ℝ\nhr₀ : 0 < r\nhr : closedBall x r ⊆ U\n⊢ ∃ r, closedBall x ↑r ⊆ U\n[PROOFSTEP]\nexact ⟨⟨r, hr₀⟩, hr⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nthis : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → ∃ r, closedBall x ↑r ⊆ U\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n              ‖y‖ * ↑ε\n[PROOFSTEP]\nchoose! rs hrsU using this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n              ‖y‖ * ↑ε\n[PROOFSTEP]\nhave : ∀ x ∈ Box.Icc I \\ s, ∃ r : Ioi (0 : ℝ), closedBall x r ⊆ Fᶜ := fun x hx =>\n  by\n  obtain ⟨r, hr₀, hr⟩ := nhds_basis_closedBall.mem_iff.1 (hFc.isOpen_compl.mem_nhds fun hx' => hx.2 (hFs hx').1)\n  exact ⟨⟨r, hr₀⟩, hr⟩\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nx : ι → ℝ\nhx : x ∈ ↑Box.Icc I \\ s\n⊢ ∃ r, closedBall x ↑r ⊆ Fᶜ\n[PROOFSTEP]\nobtain ⟨r, hr₀, hr⟩ := nhds_basis_closedBall.mem_iff.1 (hFc.isOpen_compl.mem_nhds fun hx' => hx.2 (hFs hx').1)\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nx : ι → ℝ\nhx : x ∈ ↑Box.Icc I \\ s\nr : ℝ\nhr₀ : 0 < r\nhr : closedBall x r ⊆ Fᶜ\n⊢ ∃ r, closedBall x ↑r ⊆ Fᶜ\n[PROOFSTEP]\nexact ⟨⟨r, hr₀⟩, hr⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nthis : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → ∃ r, closedBall x ↑r ⊆ Fᶜ\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n              ‖y‖ * ↑ε\n[PROOFSTEP]\nchoose! rs' hrs'F using this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n              ‖y‖ * ↑ε\n[PROOFSTEP]\nset r : (ι → ℝ) → Ioi (0 : ℝ) := s.piecewise rs rs'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n              ‖y‖ * ↑ε\n[PROOFSTEP]\nrefine' ⟨fun _ => r, fun c => l.rCond_of_bRiemann_eq_false hl, fun c π hπ hπp => _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n      (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n    ‖y‖ * ↑ε\n[PROOFSTEP]\nrw [mul_comm]\n  /- Then the union of boxes `J ∈ π` such that `π.tag ∈ s` includes `F` and is included by `U`,\n      hence its measure is `ε`-close to the measure of `s`. -/\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n      (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n    ↑ε * ‖y‖\n[PROOFSTEP]\ndsimp [integralSum]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist (∑ J in π.boxes, ENNReal.toReal (↑↑μ ↑J) • indicator s (fun x => y) (TaggedPrepartition.tag π J))\n      (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤\n    ↑ε * ‖y‖\n[PROOFSTEP]\nsimp only [mem_closedBall, dist_eq_norm, ← indicator_const_smul_apply, sum_indicator_eq_sum_filter, ← sum_smul, ←\n  sub_smul, norm_smul, Real.norm_eq_abs, ← Prepartition.filter_boxes, ← Prepartition.measure_iUnion_toReal]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ |ENNReal.toReal\n            (↑↑μ (Prepartition.iUnion (Prepartition.filter π.toPrepartition fun i => TaggedPrepartition.tag π i ∈ s))) -\n          ENNReal.toReal (↑↑μ (s ∩ ↑I))| *\n      ‖y‖ ≤\n    ↑ε * ‖y‖\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_right _ (norm_nonneg y)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ |ENNReal.toReal\n          (↑↑μ (Prepartition.iUnion (Prepartition.filter π.toPrepartition fun i => TaggedPrepartition.tag π i ∈ s))) -\n        ENNReal.toReal (↑↑μ (s ∩ ↑I))| ≤\n    ↑ε\n[PROOFSTEP]\nset t := (π.filter (π.tag · ∈ s)).iUnion\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\n⊢ |ENNReal.toReal\n          (↑↑μ (Prepartition.iUnion (Prepartition.filter π.toPrepartition fun i => TaggedPrepartition.tag π i ∈ s))) -\n        ENNReal.toReal (↑↑μ (s ∩ ↑I))| ≤\n    ↑ε\n[PROOFSTEP]\nchange abs ((μ t).toReal - (μ (s ∩ I)).toReal) ≤ ε\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\n⊢ |ENNReal.toReal (↑↑μ t) - ENNReal.toReal (↑↑μ (s ∩ ↑I))| ≤ ↑ε\n[PROOFSTEP]\nhave htU : t ⊆ U ∩ I :=\n  by\n  simp only [TaggedPrepartition.iUnion_def, iUnion_subset_iff, TaggedPrepartition.mem_filter, and_imp]\n  refine' fun J hJ hJs x hx => ⟨hrsU _ ⟨hJs, π.tag_mem_Icc J⟩ _, π.le_of_mem' J hJ hx⟩\n  simpa only [s.piecewise_eq_of_mem _ _ hJs] using hπ.1 J hJ (Box.coe_subset_Icc hx)\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\n⊢ t ⊆ U ∩ ↑I\n[PROOFSTEP]\nsimp only [TaggedPrepartition.iUnion_def, iUnion_subset_iff, TaggedPrepartition.mem_filter, and_imp]\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\n⊢ ∀ (i : Box ι), i ∈ π → TaggedPrepartition.tag π i ∈ s → ↑i ⊆ U ∩ ↑I\n[PROOFSTEP]\nrefine' fun J hJ hJs x hx => ⟨hrsU _ ⟨hJs, π.tag_mem_Icc J⟩ _, π.le_of_mem' J hJ hx⟩\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nJ : Box ι\nhJ : J ∈ π\nhJs : TaggedPrepartition.tag π J ∈ s\nx : ι → ℝ\nhx : x ∈ ↑J\n⊢ x ∈ closedBall (TaggedPrepartition.tag π J) ↑(rs (TaggedPrepartition.tag π J))\n[PROOFSTEP]\nsimpa only [s.piecewise_eq_of_mem _ _ hJs] using hπ.1 J hJ (Box.coe_subset_Icc hx)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\n⊢ |ENNReal.toReal (↑↑μ t) - ENNReal.toReal (↑↑μ (s ∩ ↑I))| ≤ ↑ε\n[PROOFSTEP]\nrefine' abs_sub_le_iff.2 ⟨_, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\n⊢ ENNReal.toReal (↑↑μ t) - ENNReal.toReal (↑↑μ (s ∩ ↑I)) ≤ ↑ε\n[PROOFSTEP]\nrefine' (ENNReal.le_toReal_sub B).trans (ENNReal.toReal_le_coe_of_le_coe _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\n⊢ ↑↑μ t - ↑↑μ (s ∩ ↑I) ≤ ↑ε\n[PROOFSTEP]\nrefine' (tsub_le_tsub (measure_mono htU) le_rfl).trans (le_measure_diff.trans _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\n⊢ ↑↑μ ((U ∩ ↑I) \\ (s ∩ ↑I)) ≤ ↑ε\n[PROOFSTEP]\nrefine' (measure_mono fun x hx => _).trans hμU.le\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\nx : ι → ℝ\nhx : x ∈ (U ∩ ↑I) \\ (s ∩ ↑I)\n⊢ x ∈ U \\ (s ∩ ↑Box.Icc I)\n[PROOFSTEP]\nexact ⟨hx.1.1, fun hx' => hx.2 ⟨hx'.1, hx.1.2⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\n⊢ ENNReal.toReal (↑↑μ (s ∩ ↑I)) - ENNReal.toReal (↑↑μ t) ≤ ↑ε\n[PROOFSTEP]\nhave hμt : μ t ≠ ∞ := ((measure_mono (htU.trans (inter_subset_left _ _))).trans_lt hUt).ne\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\nhμt : ↑↑μ t ≠ ⊤\n⊢ ENNReal.toReal (↑↑μ (s ∩ ↑I)) - ENNReal.toReal (↑↑μ t) ≤ ↑ε\n[PROOFSTEP]\nrefine' (ENNReal.le_toReal_sub hμt).trans (ENNReal.toReal_le_coe_of_le_coe _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\nhμt : ↑↑μ t ≠ ⊤\n⊢ ↑↑μ (s ∩ ↑I) - ↑↑μ t ≤ ↑ε\n[PROOFSTEP]\nrefine' le_measure_diff.trans ((measure_mono _).trans hμF.le)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\nhμt : ↑↑μ t ≠ ⊤\n⊢ (s ∩ ↑I) \\ t ⊆ (s ∩ ↑Box.Icc I) \\ F\n[PROOFSTEP]\nrintro x ⟨⟨hxs, hxI⟩, hxt⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\nhμt : ↑↑μ t ≠ ⊤\nx : ι → ℝ\nhxt : ¬x ∈ t\nhxs : x ∈ s\nhxI : x ∈ ↑I\n⊢ x ∈ (s ∩ ↑Box.Icc I) \\ F\n[PROOFSTEP]\nrefine' ⟨⟨hxs, Box.coe_subset_Icc hxI⟩, fun hxF => hxt _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\nhμt : ↑↑μ t ≠ ⊤\nx : ι → ℝ\nhxt : ¬x ∈ t\nhxs : x ∈ s\nhxI : x ∈ ↑I\nhxF : x ∈ F\n⊢ x ∈ t\n[PROOFSTEP]\nsimp only [TaggedPrepartition.iUnion_def, TaggedPrepartition.mem_filter, Set.mem_iUnion, exists_prop]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\nhμt : ↑↑μ t ≠ ⊤\nx : ι → ℝ\nhxt : ¬x ∈ t\nhxs : x ∈ s\nhxI : x ∈ ↑I\nhxF : x ∈ F\n⊢ ∃ i, (i ∈ π ∧ TaggedPrepartition.tag π i ∈ s) ∧ x ∈ ↑i\n[PROOFSTEP]\nrcases hπp x hxI with ⟨J, hJπ, hxJ⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\nhμt : ↑↑μ t ≠ ⊤\nx : ι → ℝ\nhxt : ¬x ∈ t\nhxs : x ∈ s\nhxI : x ∈ ↑I\nhxF : x ∈ F\nJ : Box ι\nhJπ : J ∈ π.toPrepartition\nhxJ : x ∈ J\n⊢ ∃ i, (i ∈ π ∧ TaggedPrepartition.tag π i ∈ s) ∧ x ∈ ↑i\n[PROOFSTEP]\nrefine' ⟨J, ⟨hJπ, _⟩, hxJ⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\nhμt : ↑↑μ t ≠ ⊤\nx : ι → ℝ\nhxt : ¬x ∈ t\nhxs : x ∈ s\nhxI : x ∈ ↑I\nhxF : x ∈ F\nJ : Box ι\nhJπ : J ∈ π.toPrepartition\nhxJ : x ∈ J\n⊢ TaggedPrepartition.tag π J ∈ s\n[PROOFSTEP]\ncontrapose hxF\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\nhμt : ↑↑μ t ≠ ⊤\nx : ι → ℝ\nhxt : ¬x ∈ t\nhxs : x ∈ s\nhxI : x ∈ ↑I\nJ : Box ι\nhJπ : J ∈ π.toPrepartition\nhxJ : x ∈ J\nhxF : ¬TaggedPrepartition.tag π J ∈ s\n⊢ ¬x ∈ F\n[PROOFSTEP]\nrefine' hrs'F _ ⟨π.tag_mem_Icc J, hxF⟩ _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nhl : l.bRiemann = false\ns : Set (ι → ℝ)\nhs : MeasurableSet s\nI : Box ι\ny : E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nε : ℝ≥0\nε0 : 0 < ε\nA : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤\nB : ↑↑μ (s ∩ ↑I) ≠ ⊤\nF : Set (ι → ℝ)\nhFs : F ⊆ s ∩ ↑Box.Icc I\nhFc : IsClosed F\nhμF : ↑↑μ ((s ∩ ↑Box.Icc I) \\ F) < ↑ε\nU : Set (ι → ℝ)\nhsU : s ∩ ↑Box.Icc I ⊆ U\nhUo : IsOpen U\nhUt : ↑↑μ U < ⊤\nhμU : ↑↑μ (U \\ (s ∩ ↑Box.Icc I)) < ↑ε\nrs : (ι → ℝ) → ↑(Set.Ioi 0)\nhrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U\nrs' : (ι → ℝ) → ↑(Set.Ioi 0)\nhrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \\ s → closedBall x ↑(rs' x) ⊆ Fᶜ\nr : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nhπp : TaggedPrepartition.IsPartition π\nt : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)\nhtU : t ⊆ U ∩ ↑I\nhμt : ↑↑μ t ≠ ⊤\nx : ι → ℝ\nhxt : ¬x ∈ t\nhxs : x ∈ s\nhxI : x ∈ ↑I\nJ : Box ι\nhJπ : J ∈ π.toPrepartition\nhxJ : x ∈ J\nhxF : ¬TaggedPrepartition.tag π J ∈ s\n⊢ x ∈ closedBall (TaggedPrepartition.tag π J) ↑(rs' (TaggedPrepartition.tag π J))\n[PROOFSTEP]\nsimpa only [s.piecewise_eq_of_not_mem _ _ hxF] using hπ.1 J hJπ (Box.coe_subset_Icc hxJ)\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhf : f =ᵐ[Measure.restrict μ ↑I] 0\nhl : l.bRiemann = false\n⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) 0\n[PROOFSTEP]\nrefine' hasIntegral_iff.2 fun ε ε0 => _\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhf : f =ᵐ[Measure.restrict μ ↑I] 0\nhl : l.bRiemann = false\nε : ℝ\nε0 : ε > 0\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ε\n[PROOFSTEP]\nlift ε to ℝ≥0 using ε0.lt.le\n[GOAL]\ncase intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhf : f =ᵐ[Measure.restrict μ ↑I] 0\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : ↑ε > 0\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε\n[PROOFSTEP]\nrw [gt_iff_lt, NNReal.coe_pos] at ε0 \n[GOAL]\ncase intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhf : f =ᵐ[Measure.restrict μ ↑I] 0\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε\n[PROOFSTEP]\nrcases NNReal.exists_pos_sum_of_countable ε0.ne' ℕ with ⟨δ, δ0, c, hδc, hcε⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhf : f =ᵐ[Measure.restrict μ ↑I] 0\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε\n[PROOFSTEP]\nhaveI := Fact.mk (I.measure_coe_lt_top μ)\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhf : f =ᵐ[Measure.restrict μ ↑I] 0\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε\n[PROOFSTEP]\nchange μ.restrict I {x | f x ≠ 0} = 0 at hf \n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε\n[PROOFSTEP]\nset N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε\n[PROOFSTEP]\nhave N0 : ∀ {x}, N x = 0 ↔ f x = 0 := by simp\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\n⊢ ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε\n[PROOFSTEP]\nhave : ∀ n, ∃ U, N ⁻¹' { n } ⊆ U ∧ IsOpen U ∧ μ.restrict I U < δ n / n :=\n  by\n  refine' fun n => (N ⁻¹' { n }).exists_isOpen_lt_of_lt _ _\n  cases' n with n\n  · simpa [ENNReal.div_zero (ENNReal.coe_pos.2 (δ0 _)).ne'] using measure_lt_top (μ.restrict I) _\n  · refine' (measure_mono_null _ hf).le.trans_lt _\n    · exact fun x hxN hxf => n.succ_ne_zero ((Eq.symm hxN).trans <| N0.2 hxf)\n    · simp [(δ0 _).ne']\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\n⊢ ∀ (n : ℕ), ∃ U, N ⁻¹' {n} ⊆ U ∧ IsOpen U ∧ ↑↑(Measure.restrict μ ↑I) U < ↑(δ n) / ↑n\n[PROOFSTEP]\nrefine' fun n => (N ⁻¹' { n }).exists_isOpen_lt_of_lt _ _\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nn : ℕ\n⊢ ↑↑(Measure.restrict μ ↑I) (N ⁻¹' {n}) < ↑(δ n) / ↑n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\n⊢ ↑↑(Measure.restrict μ ↑I) (N ⁻¹' {Nat.zero}) < ↑(δ Nat.zero) / ↑Nat.zero\n[PROOFSTEP]\nsimpa [ENNReal.div_zero (ENNReal.coe_pos.2 (δ0 _)).ne'] using measure_lt_top (μ.restrict I) _\n[GOAL]\ncase succ\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nn : ℕ\n⊢ ↑↑(Measure.restrict μ ↑I) (N ⁻¹' {Nat.succ n}) < ↑(δ (Nat.succ n)) / ↑(Nat.succ n)\n[PROOFSTEP]\nrefine' (measure_mono_null _ hf).le.trans_lt _\n[GOAL]\ncase succ.refine'_1\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nn : ℕ\n⊢ N ⁻¹' {Nat.succ n} ⊆ {x | f x ≠ 0}\n[PROOFSTEP]\nexact fun x hxN hxf => n.succ_ne_zero ((Eq.symm hxN).trans <| N0.2 hxf)\n[GOAL]\ncase succ.refine'_2\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nn : ℕ\n⊢ 0 < ↑(δ (Nat.succ n)) / ↑(Nat.succ n)\n[PROOFSTEP]\nsimp [(δ0 _).ne']\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis✝ : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nthis : ∀ (n : ℕ), ∃ U, N ⁻¹' {n} ⊆ U ∧ IsOpen U ∧ ↑↑(Measure.restrict μ ↑I) U < ↑(δ n) / ↑n\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε\n[PROOFSTEP]\nchoose U hNU hUo hμU using this\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε\n[PROOFSTEP]\nhave : ∀ x, ∃ r : Ioi (0 : ℝ), closedBall x r ⊆ U (N x) := fun x =>\n  by\n  obtain ⟨r, hr₀, hr⟩ := nhds_basis_closedBall.mem_iff.1 ((hUo _).mem_nhds (hNU _ rfl))\n  exact ⟨⟨r, hr₀⟩, hr⟩\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nx : ι → ℝ\n⊢ ∃ r, closedBall x ↑r ⊆ U (N x)\n[PROOFSTEP]\nobtain ⟨r, hr₀, hr⟩ := nhds_basis_closedBall.mem_iff.1 ((hUo _).mem_nhds (hNU _ rfl))\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nx : ι → ℝ\nr : ℝ\nhr₀ : 0 < r\nhr : closedBall ?m.310267 r ⊆ U (N ?m.310267)\n⊢ ∃ r, closedBall x ↑r ⊆ U (N x)\n[PROOFSTEP]\nexact ⟨⟨r, hr₀⟩, hr⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis✝ : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nthis : ∀ (x : ι → ℝ), ∃ r, closedBall x ↑r ⊆ U (N x)\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε\n[PROOFSTEP]\nchoose r hrU using this\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε\n[PROOFSTEP]\nrefine' ⟨fun _ => r, fun c => l.rCond_of_bRiemann_eq_false hl, fun c π hπ _ => _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\n⊢ dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε\n[PROOFSTEP]\nrw [dist_eq_norm, sub_zero, ← integralSum_fiberwise fun J => N (π.tag J)]\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\n⊢ ‖∑ y in Finset.image (fun J => N (TaggedPrepartition.tag π J)) π.boxes,\n        integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n          (TaggedPrepartition.filter π fun x => N (TaggedPrepartition.tag π x) = y)‖ ≤\n    ↑ε\n[PROOFSTEP]\nrefine' le_trans _ (NNReal.coe_lt_coe.2 hcε).le\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\n⊢ ‖∑ y in Finset.image (fun J => N (TaggedPrepartition.tag π J)) π.boxes,\n        integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n          (TaggedPrepartition.filter π fun x => N (TaggedPrepartition.tag π x) = y)‖ ≤\n    ↑c✝\n[PROOFSTEP]\nrefine' (norm_sum_le_of_le _ _).trans (sum_le_hasSum _ (fun n _ => (δ n).2) (NNReal.hasSum_coe.2 hδc))\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\n⊢ ∀ (b : ℕ),\n    b ∈ Finset.image (fun J => N (TaggedPrepartition.tag π J)) π.boxes →\n      ‖integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n            (TaggedPrepartition.filter π fun x => N (TaggedPrepartition.tag π x) = b)‖ ≤\n        ↑(δ b)\n[PROOFSTEP]\nrintro n -\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\n⊢ ‖integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n        (TaggedPrepartition.filter π fun x => N (TaggedPrepartition.tag π x) = n)‖ ≤\n    ↑(δ n)\n[PROOFSTEP]\ndsimp [integralSum]\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\n⊢ ‖∑ J in (TaggedPrepartition.filter π fun x => ⌈‖f (TaggedPrepartition.tag π x)‖⌉₊ = n).toPrepartition.boxes,\n        ENNReal.toReal (↑↑μ ↑J) • f (TaggedPrepartition.tag π J)‖ ≤\n    ↑(δ n)\n[PROOFSTEP]\nhave : ∀ J ∈ π.filter fun J => N (π.tag J) = n, ‖(μ ↑J).toReal • f (π.tag J)‖ ≤ (μ J).toReal * n := fun J hJ ↦\n  by\n  rw [TaggedPrepartition.mem_filter] at hJ \n  rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg ENNReal.toReal_nonneg]\n  exact mul_le_mul_of_nonneg_left (hJ.2 ▸ Nat.le_ceil _) ENNReal.toReal_nonneg\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nJ : Box ι\nhJ : J ∈ TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n\n⊢ ‖ENNReal.toReal (↑↑μ ↑J) • f (TaggedPrepartition.tag π J)‖ ≤ ENNReal.toReal (↑↑μ ↑J) * ↑n\n[PROOFSTEP]\nrw [TaggedPrepartition.mem_filter] at hJ \n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nJ : Box ι\nhJ : J ∈ π ∧ N (TaggedPrepartition.tag π J) = n\n⊢ ‖ENNReal.toReal (↑↑μ ↑J) • f (TaggedPrepartition.tag π J)‖ ≤ ENNReal.toReal (↑↑μ ↑J) * ↑n\n[PROOFSTEP]\nrw [norm_smul, Real.norm_eq_abs, abs_of_nonneg ENNReal.toReal_nonneg]\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nJ : Box ι\nhJ : J ∈ π ∧ N (TaggedPrepartition.tag π J) = n\n⊢ ENNReal.toReal (↑↑μ ↑J) * ‖f (TaggedPrepartition.tag π J)‖ ≤ ENNReal.toReal (↑↑μ ↑J) * ↑n\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left (hJ.2 ▸ Nat.le_ceil _) ENNReal.toReal_nonneg\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis✝ : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nthis :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n) →\n      ‖ENNReal.toReal (↑↑μ ↑J) • f (TaggedPrepartition.tag π J)‖ ≤ ENNReal.toReal (↑↑μ ↑J) * ↑n\n⊢ ‖∑ J in (TaggedPrepartition.filter π fun x => ⌈‖f (TaggedPrepartition.tag π x)‖⌉₊ = n).toPrepartition.boxes,\n        ENNReal.toReal (↑↑μ ↑J) • f (TaggedPrepartition.tag π J)‖ ≤\n    ↑(δ n)\n[PROOFSTEP]\nrefine' (norm_sum_le_of_le _ this).trans _\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis✝ : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nthis :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n) →\n      ‖ENNReal.toReal (↑↑μ ↑J) • f (TaggedPrepartition.tag π J)‖ ≤ ENNReal.toReal (↑↑μ ↑J) * ↑n\n⊢ ∑ b in (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n).toPrepartition.boxes,\n      ENNReal.toReal (↑↑μ ↑b) * ↑n ≤\n    ↑(δ n)\n[PROOFSTEP]\nclear this\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\n⊢ ∑ b in (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n).toPrepartition.boxes,\n      ENNReal.toReal (↑↑μ ↑b) * ↑n ≤\n    ↑(δ n)\n[PROOFSTEP]\nrw [← sum_mul, ← Prepartition.measure_iUnion_toReal]\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\n⊢ ENNReal.toReal\n        (↑↑μ\n          (Prepartition.iUnion\n            (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n).toPrepartition)) *\n      ↑n ≤\n    ↑(δ n)\n[PROOFSTEP]\ngeneralize hm : μ (π.filter fun J => N (π.tag J) = n).iUnion = m\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nm : ℝ≥0∞\nhm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = m\n⊢ ENNReal.toReal m * ↑n ≤ ↑(δ n)\n[PROOFSTEP]\nhave : m < δ n / n := by\n  simp only [Measure.restrict_apply (hUo _).measurableSet] at hμU \n  refine' hm ▸ (measure_mono _).trans_lt (hμU _)\n  simp only [Set.subset_def, TaggedPrepartition.mem_iUnion, TaggedPrepartition.mem_filter]\n  rintro x ⟨J, ⟨hJ, rfl⟩, hx⟩\n  exact ⟨hrU _ (hπ.1 _ hJ (Box.coe_subset_Icc hx)), π.le_of_mem' J hJ hx⟩\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nm : ℝ≥0∞\nhm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = m\n⊢ m < ↑(δ n) / ↑n\n[PROOFSTEP]\nsimp only [Measure.restrict_apply (hUo _).measurableSet] at hμU \n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nm : ℝ≥0∞\nhm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = m\nhμU : ∀ (n : ℕ), ↑↑μ (U n ∩ ↑I) < ↑(δ n) / ↑n\n⊢ m < ↑(δ n) / ↑n\n[PROOFSTEP]\nrefine' hm ▸ (measure_mono _).trans_lt (hμU _)\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nm : ℝ≥0∞\nhm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = m\nhμU : ∀ (n : ℕ), ↑↑μ (U n ∩ ↑I) < ↑(δ n) / ↑n\n⊢ TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n) ⊆ U n ∩ ↑I\n[PROOFSTEP]\nsimp only [Set.subset_def, TaggedPrepartition.mem_iUnion, TaggedPrepartition.mem_filter]\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nm : ℝ≥0∞\nhm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = m\nhμU : ∀ (n : ℕ), ↑↑μ (U n ∩ ↑I) < ↑(δ n) / ↑n\n⊢ ∀ (x : ι → ℝ), (∃ J, (J ∈ π ∧ ⌈‖f (TaggedPrepartition.tag π J)‖⌉₊ = n) ∧ x ∈ J) → x ∈ U n ∩ ↑I\n[PROOFSTEP]\nrintro x ⟨J, ⟨hJ, rfl⟩, hx⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nm : ℝ≥0∞\nhμU : ∀ (n : ℕ), ↑↑μ (U n ∩ ↑I) < ↑(δ n) / ↑n\nx : ι → ℝ\nJ : Box ι\nhx : x ∈ J\nhJ : J ∈ π\nhm :\n  ↑↑μ\n      (TaggedPrepartition.iUnion\n        (TaggedPrepartition.filter π fun J_1 =>\n          N (TaggedPrepartition.tag π J_1) = ⌈‖f (TaggedPrepartition.tag π J)‖⌉₊)) =\n    m\n⊢ x ∈ U ⌈‖f (TaggedPrepartition.tag π J)‖⌉₊ ∩ ↑I\n[PROOFSTEP]\nexact ⟨hrU _ (hπ.1 _ hJ (Box.coe_subset_Icc hx)), π.le_of_mem' J hJ hx⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis✝ : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nm : ℝ≥0∞\nhm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = m\nthis : m < ↑(δ n) / ↑n\n⊢ ENNReal.toReal m * ↑n ≤ ↑(δ n)\n[PROOFSTEP]\nlift m to ℝ≥0 using ne_top_of_lt this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis✝ : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nm : ℝ≥0\nhm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = ↑m\nthis : ↑m < ↑(δ n) / ↑n\n⊢ ENNReal.toReal ↑m * ↑n ≤ ↑(δ n)\n[PROOFSTEP]\nrw [ENNReal.coe_toReal, ← NNReal.coe_nat_cast, ← NNReal.coe_mul, NNReal.coe_le_coe, ← ENNReal.coe_le_coe,\n  ENNReal.coe_mul, ENNReal.coe_nat, mul_comm]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhl : l.bRiemann = false\nε : ℝ≥0\nε0 : 0 < ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nthis✝ : Fact (↑↑μ ↑I < ⊤)\nhf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0\nN : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊\nN0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0\nU : ℕ → Set (ι → ℝ)\nhNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n\nhUo : ∀ (n : ℕ), IsOpen (U n)\nhμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n\nr : (ι → ℝ) → ↑(Set.Ioi 0)\nhrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π\nx✝ : TaggedPrepartition.IsPartition π\nn : ℕ\nm : ℝ≥0\nhm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = ↑m\nthis : ↑m < ↑(δ n) / ↑n\n⊢ ↑n * ↑m ≤ ↑(δ n)\n[PROOFSTEP]\nexact (mul_le_mul_left' this.le _).trans ENNReal.mul_div_le\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\ny : E\nf g : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhf : HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) y\nhfg : f =ᵐ[Measure.restrict μ ↑I] g\nhl : l.bRiemann = false\n⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) y\n[PROOFSTEP]\nhave : g - f =ᵐ[μ.restrict I] 0 := hfg.mono fun x hx => sub_eq_zero.2 hx.symm\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nl : IntegrationParams\nI : Box ι\ny : E\nf g : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nhf : HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) y\nhfg : f =ᵐ[Measure.restrict μ ↑I] g\nhl : l.bRiemann = false\nthis : g - f =ᵐ[Measure.restrict μ ↑I] 0\n⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) y\n[PROOFSTEP]\nsimpa using hf.add (HasIntegral.of_aeEq_zero this hl)\n[GOAL]\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nf : SimpleFunc (ι → ℝ) E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\n⊢ HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)\n[PROOFSTEP]\ninduction' f using MeasureTheory.SimpleFunc.induction with y s hs f g _ hfi hgi\n[GOAL]\ncase h_ind\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\ny : E\ns : Set (ι → ℝ)\nhs : MeasurableSet s\n⊢ HasIntegral I l (↑(piecewise s hs (const (ι → ℝ) y) (const (ι → ℝ) 0)))\n    (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n    (integral (Measure.restrict μ ↑I) (piecewise s hs (const (ι → ℝ) y) (const (ι → ℝ) 0)))\n[PROOFSTEP]\nsimpa only [Measure.restrict_apply hs, const_zero, integral_piecewise_zero, integral_const, Measure.restrict_apply,\n  MeasurableSet.univ, Set.univ_inter] using BoxIntegral.hasIntegralIndicatorConst l hl hs I y μ\n[GOAL]\ncase h_add\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nf g : SimpleFunc (ι → ℝ) E\na✝ : Disjoint (Function.support ↑f) (Function.support ↑g)\nhfi : HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)\nhgi : HasIntegral I l (↑g) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) g)\n⊢ HasIntegral I l (↑(f + g)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n    (integral (Measure.restrict μ ↑I) (f + g))\n[PROOFSTEP]\nborelize E\n[GOAL]\ncase h_add\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nf g : SimpleFunc (ι → ℝ) E\na✝ : Disjoint (Function.support ↑f) (Function.support ↑g)\nhfi : HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)\nhgi : HasIntegral I l (↑g) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) g)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ HasIntegral I l (↑(f + g)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n    (integral (Measure.restrict μ ↑I) (f + g))\n[PROOFSTEP]\nhaveI := Fact.mk (I.measure_coe_lt_top μ)\n[GOAL]\ncase h_add\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nf g : SimpleFunc (ι → ℝ) E\na✝ : Disjoint (Function.support ↑f) (Function.support ↑g)\nhfi : HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)\nhgi : HasIntegral I l (↑g) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) g)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : Fact (↑↑μ ↑I < ⊤)\n⊢ HasIntegral I l (↑(f + g)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n    (integral (Measure.restrict μ ↑I) (f + g))\n[PROOFSTEP]\nrw [integral_add]\n[GOAL]\ncase h_add\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nf g : SimpleFunc (ι → ℝ) E\na✝ : Disjoint (Function.support ↑f) (Function.support ↑g)\nhfi : HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)\nhgi : HasIntegral I l (↑g) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) g)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : Fact (↑↑μ ↑I < ⊤)\n⊢ HasIntegral I l (↑(f + g)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n    (integral (Measure.restrict μ ↑I) f + integral (Measure.restrict μ ↑I) g)\ncase h_add.hf\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nf g : SimpleFunc (ι → ℝ) E\na✝ : Disjoint (Function.support ↑f) (Function.support ↑g)\nhfi : HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)\nhgi : HasIntegral I l (↑g) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) g)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : Fact (↑↑μ ↑I < ⊤)\n⊢ Integrable ↑f\ncase h_add.hg\nι : Type u\nE : Type v\ninst✝³ : Fintype ι\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nf g : SimpleFunc (ι → ℝ) E\na✝ : Disjoint (Function.support ↑f) (Function.support ↑g)\nhfi : HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)\nhgi : HasIntegral I l (↑g) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) g)\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nthis : Fact (↑↑μ ↑I < ⊤)\n⊢ Integrable ↑g\n[PROOFSTEP]\nexacts [hfi.add hgi, integrable_iff.2 fun _ _ => measure_lt_top _ _, integrable_iff.2 fun _ _ => measure_lt_top _ _]\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nhf : IntegrableOn f ↑I\nl : IntegrationParams\nhl : l.bRiemann = false\n⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (x : ι → ℝ) in ↑I, f x ∂μ)\n[PROOFSTEP]\nborelize E\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nhf : IntegrableOn f ↑I\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (x : ι → ℝ) in ↑I, f x ∂μ)\n[PROOFSTEP]\nrcases hf.aestronglyMeasurable with ⟨g, hg, hfg⟩\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nhf : IntegrableOn f ↑I\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nhfg : f =ᵐ[Measure.restrict μ ↑I] g\n⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (x : ι → ℝ) in ↑I, f x ∂μ)\n[PROOFSTEP]\nhaveI : SeparableSpace (range g ∪ {0} : Set E) := hg.separableSpace_range_union_singleton\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nhf : IntegrableOn f ↑I\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nhfg : f =ᵐ[Measure.restrict μ ↑I] g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\n⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (x : ι → ℝ) in ↑I, f x ∂μ)\n[PROOFSTEP]\nrw [integral_congr_ae hfg]\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nhf : IntegrableOn f ↑I\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nhfg : f =ᵐ[Measure.restrict μ ↑I] g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\n⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)\n[PROOFSTEP]\nhave hgi : IntegrableOn g I μ := (integrable_congr hfg).1 hf\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nhf : IntegrableOn f ↑I\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nhfg : f =ᵐ[Measure.restrict μ ↑I] g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\n⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)\n[PROOFSTEP]\nrefine' BoxIntegral.HasIntegral.congr_ae _ hfg.symm hl\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : (ι → ℝ) → E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nhf : IntegrableOn f ↑I\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nhfg : f =ᵐ[Measure.restrict μ ↑I] g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\n⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)\n[PROOFSTEP]\nclear! f\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\n⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)\n[PROOFSTEP]\nset f : ℕ → SimpleFunc (ι → ℝ) E := SimpleFunc.approxOn g hg.measurable (range g ∪ {0}) 0 (by simp)\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\n⊢ 0 ∈ Set.range g ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\n⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)\n[PROOFSTEP]\nhave hfi : ∀ n, IntegrableOn (f n) I μ := SimpleFunc.integrable_approxOn_range hg.measurable hgi\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\n⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)\n[PROOFSTEP]\nhave hfi' := fun n => ((f n).hasBoxIntegral μ I l hl).integrable\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)\n[PROOFSTEP]\nhave hfg_mono : ∀ (x) {m n}, m ≤ n → ‖f n x - g x‖ ≤ ‖f m x - g x‖ :=\n  by\n  intro x m n hmn\n  rw [← dist_eq_norm, ← dist_eq_norm, dist_nndist, dist_nndist, NNReal.coe_le_coe, ← ENNReal.coe_le_coe, ← edist_nndist,\n    ← edist_nndist]\n  exact SimpleFunc.edist_approxOn_mono hg.measurable _ x hmn\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n⊢ ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\n[PROOFSTEP]\nintro x m n hmn\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nx : ι → ℝ\nm n : ℕ\nhmn : m ≤ n\n⊢ ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\n[PROOFSTEP]\nrw [← dist_eq_norm, ← dist_eq_norm, dist_nndist, dist_nndist, NNReal.coe_le_coe, ← ENNReal.coe_le_coe, ← edist_nndist, ←\n  edist_nndist]\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nx : ι → ℝ\nm n : ℕ\nhmn : m ≤ n\n⊢ edist (↑(f n) x) (g x) ≤ edist (↑(f m) x) (g x)\n[PROOFSTEP]\nexact SimpleFunc.edist_approxOn_mono hg.measurable _ x hmn\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\n⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)\n[PROOFSTEP]\nrefine' HasIntegral.of_mul ((μ I).toReal + 1 + 1) fun ε ε0 => _\n[GOAL]\ncase intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ\nε0 : 0 < ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ε\n[PROOFSTEP]\nlift ε to ℝ≥0 using ε0.le\n[GOAL]\ncase intro.intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ↑ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε\n[PROOFSTEP]\nrw [NNReal.coe_pos] at ε0 \n[GOAL]\ncase intro.intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε\n[PROOFSTEP]\nhave ε0' := ENNReal.coe_pos.2 ε0\n[GOAL]\ncase intro.intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε\n[PROOFSTEP]\nobtain ⟨N₀, hN₀⟩ : ∃ N : ℕ, ∫ x in I, ‖f N x - g x‖ ∂μ ≤ ε :=\n  by\n  have : Tendsto (fun n => ∫⁻ x in I, ‖f n x - g x‖₊ ∂μ) atTop (𝓝 0) :=\n    SimpleFunc.tendsto_approxOn_range_L1_nnnorm hg.measurable hgi\n  refine' (this.eventually (ge_mem_nhds ε0')).exists.imp fun N hN => _\n  exact integral_coe_le_of_lintegral_coe_le hN\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\n⊢ ∃ N, ∫ (x : ι → ℝ) in ↑I, ‖↑(f N) x - g x‖ ∂μ ≤ ↑ε\n[PROOFSTEP]\nhave : Tendsto (fun n => ∫⁻ x in I, ‖f n x - g x‖₊ ∂μ) atTop (𝓝 0) :=\n  SimpleFunc.tendsto_approxOn_range_L1_nnnorm hg.measurable hgi\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis✝ : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nthis : Tendsto (fun n => ∫⁻ (x : ι → ℝ) in ↑I, ↑‖↑(f n) x - g x‖₊ ∂μ) atTop (𝓝 0)\n⊢ ∃ N, ∫ (x : ι → ℝ) in ↑I, ‖↑(f N) x - g x‖ ∂μ ≤ ↑ε\n[PROOFSTEP]\nrefine' (this.eventually (ge_mem_nhds ε0')).exists.imp fun N hN => _\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis✝ : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nthis : Tendsto (fun n => ∫⁻ (x : ι → ℝ) in ↑I, ↑‖↑(f n) x - g x‖₊ ∂μ) atTop (𝓝 0)\nN : ℕ\nhN : ∫⁻ (x : ι → ℝ) in ↑I, ↑‖↑(f N) x - g x‖₊ ∂μ ≤ ↑ε\n⊢ ∫ (x : ι → ℝ) in ↑I, ‖↑(f N) x - g x‖ ∂μ ≤ ↑ε\n[PROOFSTEP]\nexact integral_coe_le_of_lintegral_coe_le hN\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε\n[PROOFSTEP]\nhave : ∀ x, ∃ N₁, N₀ ≤ N₁ ∧ dist (f N₁ x) (g x) ≤ ε := fun x ↦\n  by\n  have : Tendsto (f · x) atTop (𝓝 <| g x) := SimpleFunc.tendsto_approxOn hg.measurable _ (subset_closure (by simp))\n  exact ((eventually_ge_atTop N₀).and <| this <| closedBall_mem_nhds _ ε0).exists\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nx : ι → ℝ\n⊢ ∃ N₁, N₀ ≤ N₁ ∧ dist (↑(f N₁) x) (g x) ≤ ↑ε\n[PROOFSTEP]\nhave : Tendsto (f · x) atTop (𝓝 <| g x) := SimpleFunc.tendsto_approxOn hg.measurable _ (subset_closure (by simp))\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nx : ι → ℝ\n⊢ g x ∈ Set.range g ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis✝ : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nx : ι → ℝ\nthis : Tendsto (fun x_1 => ↑(f x_1) x) atTop (𝓝 (g x))\n⊢ ∃ N₁, N₀ ≤ N₁ ∧ dist (↑(f N₁) x) (g x) ≤ ↑ε\n[PROOFSTEP]\nexact ((eventually_ge_atTop N₀).and <| this <| closedBall_mem_nhds _ ε0).exists\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis✝ : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nthis : ∀ (x : ι → ℝ), ∃ N₁, N₀ ≤ N₁ ∧ dist (↑(f N₁) x) (g x) ≤ ↑ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε\n[PROOFSTEP]\nchoose Nx hNx hNxε using this\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε\n[PROOFSTEP]\nrcases NNReal.exists_pos_sum_of_countable ε0.ne' ℕ with\n  ⟨δ, δ0, c, hδc, hcε⟩\n    /- Since each simple function `fᵢ` is integrable, there exists `rᵢ : ℝⁿ → (0, ∞)` such that\n        the integral sum of `f` over any tagged prepartition is `δᵢ`-close to the sum of integrals\n        of `fᵢ` over the boxes of this prepartition. For each `x`, we choose `r (Nx x)` as the radius\n        at `x`. -/\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε\n[PROOFSTEP]\nset r : ℝ≥0 → (ι → ℝ) → Ioi (0 : ℝ) := fun c x => (hfi' <| Nx x).convergenceR (δ <| Nx x) c x\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nhδc : HasSum δ c\nhcε : c < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\n⊢ ∃ r,\n    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧\n      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),\n        IntegrationParams.MemBaseSet l I c (r c) π →\n          TaggedPrepartition.IsPartition π →\n            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε\n[PROOFSTEP]\nrefine'\n  ⟨r, fun c => l.rCond_of_bRiemann_eq_false hl, fun c π hπ hπp => _⟩\n    /- Now we prove the estimate in 3 \"jumps\": first we replace `g x` in the formula for the\n        integral sum by `f (Nx x)`; then we replace each `μ J • f (Nx (π.tag J)) (π.tag J)`\n        by the Bochner integral of `f (Nx (π.tag J)) x` over `J`, then we jump to the Bochner\n        integral of `g`. -/\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n    (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε\n[PROOFSTEP]\nrefine'\n  (dist_triangle4 _ (∑ J in π.boxes, (μ J).toReal • f (Nx <| π.tag J) (π.tag J))\n        (∑ J in π.boxes, ∫ x in J, f (Nx <| π.tag J) x ∂μ) _).trans\n    _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n          (∑ J in π.boxes,\n            ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J)) +\n        dist\n          (∑ J in π.boxes,\n            ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))\n          (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) +\n      dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)\n        (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n    (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε\n[PROOFSTEP]\nrw [add_mul, add_mul, one_mul]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n          (∑ J in π.boxes,\n            ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J)) +\n        dist\n          (∑ J in π.boxes,\n            ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))\n          (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) +\n      dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)\n        (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n    ENNReal.toReal (↑↑μ ↑I) * ↑ε + ↑ε + ↑ε\n[PROOFSTEP]\nrefine' add_le_add_three _ _ _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)\n      (∑ J in π.boxes, ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J)) ≤\n    ENNReal.toReal (↑↑μ ↑I) * ↑ε\n[PROOFSTEP]\nrw [← hπp.iUnion_eq, π.measure_iUnion_toReal, sum_mul, integralSum]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist (∑ J in π.boxes, ↑(↑(BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) J) (g (TaggedPrepartition.tag π J)))\n      (∑ J in π.boxes, ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J)) ≤\n    ∑ x in π.boxes, ENNReal.toReal (↑↑μ ↑x) * ↑ε\n[PROOFSTEP]\nrefine' dist_sum_sum_le_of_le _ fun J _ => _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nJ : Box ι\nx✝ : J ∈ π.boxes\n⊢ dist (↑(↑(BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) J) (g (TaggedPrepartition.tag π J)))\n      (ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J)) ≤\n    ENNReal.toReal (↑↑μ ↑J) * ↑ε\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nJ : Box ι\nx✝ : J ∈ π.boxes\n⊢ dist (ENNReal.toReal (↑↑μ ↑J) • g (TaggedPrepartition.tag π J))\n      (ENNReal.toReal (↑↑μ ↑J) •\n        ↑(SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\n              (Nx (TaggedPrepartition.tag π J)))\n          (TaggedPrepartition.tag π J)) ≤\n    ENNReal.toReal (↑↑μ ↑J) * ↑ε\n[PROOFSTEP]\nrw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs, abs_of_nonneg ENNReal.toReal_nonneg]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nJ : Box ι\nx✝ : J ∈ π.boxes\n⊢ ENNReal.toReal (↑↑μ ↑J) *\n      ‖g (TaggedPrepartition.tag π J) -\n          ↑(SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\n                (Nx (TaggedPrepartition.tag π J)))\n            (TaggedPrepartition.tag π J)‖ ≤\n    ENNReal.toReal (↑↑μ ↑J) * ↑ε\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left _ ENNReal.toReal_nonneg\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nJ : Box ι\nx✝ : J ∈ π.boxes\n⊢ ‖g (TaggedPrepartition.tag π J) -\n        ↑(SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\n              (Nx (TaggedPrepartition.tag π J)))\n          (TaggedPrepartition.tag π J)‖ ≤\n    ↑ε\n[PROOFSTEP]\nrw [← dist_eq_norm']\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nJ : Box ι\nx✝ : J ∈ π.boxes\n⊢ dist\n      (↑(SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\n            (Nx (TaggedPrepartition.tag π J)))\n        (TaggedPrepartition.tag π J))\n      (g (TaggedPrepartition.tag π J)) ≤\n    ↑ε\n[PROOFSTEP]\nexact hNxε _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist (∑ J in π.boxes, ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))\n      (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤\n    ↑ε\n[PROOFSTEP]\nrw [← π.sum_fiberwise fun J => Nx (π.tag J), ← π.sum_fiberwise fun J => Nx (π.tag J)]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist\n      (∑ y in Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes,\n        ∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = y).boxes,\n          ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))\n      (∑ y in Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes,\n        ∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = y).boxes,\n          ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤\n    ↑ε\n[PROOFSTEP]\nrefine' le_trans _ (NNReal.coe_lt_coe.2 hcε).le\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist\n      (∑ y in Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes,\n        ∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = y).boxes,\n          ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))\n      (∑ y in Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes,\n        ∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = y).boxes,\n          ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤\n    ↑c✝\n[PROOFSTEP]\nrefine' (dist_sum_sum_le_of_le _ fun n hn => _).trans (sum_le_hasSum _ (fun n _ => (δ n).2) (NNReal.hasSum_coe.2 hδc))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nn : ℕ\nhn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes\n⊢ dist\n      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,\n        ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))\n      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,\n        ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤\n    ↑(δ n)\n[PROOFSTEP]\nhave hNxn : ∀ J ∈ π.filter fun J => Nx (π.tag J) = n, Nx (π.tag J) = n := fun J hJ => (π.mem_filter.1 hJ).2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nn : ℕ\nhn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes\nhNxn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n\n⊢ dist\n      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,\n        ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))\n      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,\n        ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤\n    ↑(δ n)\n[PROOFSTEP]\nhave hrn : ∀ J ∈ π.filter fun J => Nx (π.tag J) = n, r c (π.tag J) = (hfi' n).convergenceR (δ n) c (π.tag J) :=\n  fun J hJ ↦ by\n  obtain rfl := hNxn J hJ\n  rfl\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nn : ℕ\nhn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes\nhNxn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n\nJ : Box ι\nhJ : J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n\n⊢ r c (TaggedPrepartition.tag π J) =\n    Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))\n      (↑(δ n)) c (TaggedPrepartition.tag π J)\n[PROOFSTEP]\nobtain rfl := hNxn J hJ\n[GOAL]\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nJ : Box ι\nhn : Nx (TaggedPrepartition.tag π J) ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes\nhNxn :\n  ∀ (J_1 : Box ι),\n    (J_1 ∈ TaggedPrepartition.filter π fun J_2 => Nx (TaggedPrepartition.tag π J_2) = Nx (TaggedPrepartition.tag π J)) →\n      Nx (TaggedPrepartition.tag π J_1) = Nx (TaggedPrepartition.tag π J)\nhJ : J ∈ TaggedPrepartition.filter π fun J_1 => Nx (TaggedPrepartition.tag π J_1) = Nx (TaggedPrepartition.tag π J)\n⊢ r c (TaggedPrepartition.tag π J) =\n    Integrable.convergenceR\n      (_ :\n        BoxIntegral.Integrable I l (↑(f (Nx (TaggedPrepartition.tag π J))))\n          (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))\n      (↑(δ (Nx (TaggedPrepartition.tag π J)))) c (TaggedPrepartition.tag π J)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nn : ℕ\nhn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes\nhNxn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n\nhrn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →\n      r c (TaggedPrepartition.tag π J) =\n        Integrable.convergenceR\n          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c\n          (TaggedPrepartition.tag π J)\n⊢ dist\n      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,\n        ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))\n      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,\n        ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤\n    ↑(δ n)\n[PROOFSTEP]\nhave : l.MemBaseSet I c ((hfi' n).convergenceR (δ n) c) (π.filter fun J => Nx (π.tag J) = n) :=\n  (hπ.filter _).mono' _ le_rfl le_rfl fun J hJ => (hrn J hJ).le\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis✝ : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nn : ℕ\nhn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes\nhNxn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n\nhrn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →\n      r c (TaggedPrepartition.tag π J) =\n        Integrable.convergenceR\n          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c\n          (TaggedPrepartition.tag π J)\nthis :\n  IntegrationParams.MemBaseSet l I c\n    (Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))\n      (↑(δ n)) c)\n    (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)\n⊢ dist\n      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,\n        ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))\n      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,\n        ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤\n    ↑(δ n)\n[PROOFSTEP]\nconvert (hfi' n).dist_integralSum_sum_integral_le_of_memBaseSet (δ0 _) this using 2\n[GOAL]\ncase h.e'_3.h.e'_3\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis✝ : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nn : ℕ\nhn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes\nhNxn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n\nhrn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →\n      r c (TaggedPrepartition.tag π J) =\n        Integrable.convergenceR\n          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c\n          (TaggedPrepartition.tag π J)\nthis :\n  IntegrationParams.MemBaseSet l I c\n    (Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))\n      (↑(δ n)) c)\n    (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)\n⊢ ∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,\n      ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J) =\n    integralSum (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n      (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)\n[PROOFSTEP]\nrefine' sum_congr rfl fun J hJ => _\n[GOAL]\ncase h.e'_3.h.e'_3\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis✝ : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nn : ℕ\nhn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes\nhNxn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n\nhrn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →\n      r c (TaggedPrepartition.tag π J) =\n        Integrable.convergenceR\n          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c\n          (TaggedPrepartition.tag π J)\nthis :\n  IntegrationParams.MemBaseSet l I c\n    (Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))\n      (↑(δ n)) c)\n    (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)\nJ : Box ι\nhJ : J ∈ (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n).toPrepartition.boxes\n⊢ ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J) =\n    ↑(↑(BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) J)\n      (↑(f n) (TaggedPrepartition.tag (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) J))\n[PROOFSTEP]\nsimp [hNxn J hJ]\n[GOAL]\ncase h.e'_3.h.e'_4\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis✝ : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nn : ℕ\nhn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes\nhNxn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n\nhrn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →\n      r c (TaggedPrepartition.tag π J) =\n        Integrable.convergenceR\n          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c\n          (TaggedPrepartition.tag π J)\nthis :\n  IntegrationParams.MemBaseSet l I c\n    (Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))\n      (↑(δ n)) c)\n    (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)\n⊢ ∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,\n      ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ =\n    ∑ J in (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n).toPrepartition.boxes,\n      BoxIntegral.integral J l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n[PROOFSTEP]\nrefine' sum_congr rfl fun J hJ => _\n[GOAL]\ncase h.e'_3.h.e'_4\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis✝ : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nn : ℕ\nhn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes\nhNxn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n\nhrn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →\n      r c (TaggedPrepartition.tag π J) =\n        Integrable.convergenceR\n          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c\n          (TaggedPrepartition.tag π J)\nthis :\n  IntegrationParams.MemBaseSet l I c\n    (Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))\n      (↑(δ n)) c)\n    (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)\nJ : Box ι\nhJ : J ∈ (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n).toPrepartition.boxes\n⊢ ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ =\n    BoxIntegral.integral J l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\n[PROOFSTEP]\nrw [← SimpleFunc.integral_eq_integral, SimpleFunc.box_integral_eq_integral _ _ _ _ hl, hNxn J hJ]\n[GOAL]\ncase h.e'_3.h.e'_4.hfi\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝² : MeasurableSpace E := borel E\nthis✝¹ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis✝ : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nn : ℕ\nhn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes\nhNxn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n\nhrn :\n  ∀ (J : Box ι),\n    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →\n      r c (TaggedPrepartition.tag π J) =\n        Integrable.convergenceR\n          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c\n          (TaggedPrepartition.tag π J)\nthis :\n  IntegrationParams.MemBaseSet l I c\n    (Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))\n      (↑(δ n)) c)\n    (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)\nJ : Box ι\nhJ : J ∈ (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n).toPrepartition.boxes\n⊢ Integrable ↑(f (Nx (TaggedPrepartition.tag π J)))\n[PROOFSTEP]\nexact (hfi _).mono_set (Prepartition.le_of_mem _ hJ)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)\n      (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n    ↑ε\n[PROOFSTEP]\nrefine' le_trans _ hN₀\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\n⊢ dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)\n      (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n    ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ\n[PROOFSTEP]\nhave hfi : ∀ (n), ∀ J ∈ π, IntegrableOn (f n) (↑J) μ := fun n J hJ => (hfi n).mono_set (π.le_of_mem' J hJ)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nhfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J\n⊢ dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)\n      (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n    ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ\n[PROOFSTEP]\nhave hgi : ∀ J ∈ π, IntegrableOn g (↑J) μ := fun J hJ => hgi.mono_set (π.le_of_mem' J hJ)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi✝ : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nhfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J\nhgi : ∀ (J : Box ι), J ∈ π → IntegrableOn g ↑J\n⊢ dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)\n      (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n    ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ\n[PROOFSTEP]\nhave hfgi : ∀ (n), ∀ J ∈ π, IntegrableOn (fun x => ‖f n x - g x‖) J μ := fun n J hJ =>\n  ((hfi n J hJ).sub (hgi J hJ)).norm\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi✝ : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nhfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J\nhgi : ∀ (J : Box ι), J ∈ π → IntegrableOn g ↑J\nhfgi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn (fun x => ‖↑(f n) x - g x‖) ↑J\n⊢ dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)\n      (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤\n    ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ\n[PROOFSTEP]\nrw [← hπp.iUnion_eq, Prepartition.iUnion_def',\n  integral_finset_biUnion π.boxes (fun J _ => J.measurableSet_coe) π.pairwiseDisjoint hgi,\n  integral_finset_biUnion π.boxes (fun J _ => J.measurableSet_coe) π.pairwiseDisjoint (hfgi _)]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi✝ : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nhfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J\nhgi : ∀ (J : Box ι), J ∈ π → IntegrableOn g ↑J\nhfgi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn (fun x => ‖↑(f n) x - g x‖) ↑J\n⊢ dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)\n      (∑ i in π.boxes, ∫ (x : ι → ℝ) in ↑i, g x ∂μ) ≤\n    ∑ i in π.boxes, ∫ (x : ι → ℝ) in ↑i, ‖↑(f N₀) x - g x‖ ∂μ\n[PROOFSTEP]\nrefine' dist_sum_sum_le_of_le _ fun J hJ => _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi✝ : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nhfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J\nhgi : ∀ (J : Box ι), J ∈ π → IntegrableOn g ↑J\nhfgi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn (fun x => ‖↑(f n) x - g x‖) ↑J\nJ : Box ι\nhJ : J ∈ π.boxes\n⊢ dist (∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) (∫ (x : ι → ℝ) in ↑J, g x ∂μ) ≤\n    ∫ (x : ι → ℝ) in ↑J, ‖↑(f N₀) x - g x‖ ∂μ\n[PROOFSTEP]\nrw [dist_eq_norm, ← integral_sub (hfi _ J hJ) (hgi J hJ)]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi✝ : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nhfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J\nhgi : ∀ (J : Box ι), J ∈ π → IntegrableOn g ↑J\nhfgi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn (fun x => ‖↑(f n) x - g x‖) ↑J\nJ : Box ι\nhJ : J ∈ π.boxes\n⊢ ‖∫ (a : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) a - g a ∂μ‖ ≤ ∫ (x : ι → ℝ) in ↑J, ‖↑(f N₀) x - g x‖ ∂μ\n[PROOFSTEP]\nrefine' norm_integral_le_of_norm_le (hfgi _ J hJ) (eventually_of_forall fun x => _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nι : Type u\nE : Type v\ninst✝⁴ : Fintype ι\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure (ι → ℝ)\ninst✝ : IsLocallyFiniteMeasure μ\nI : Box ι\nl : IntegrationParams\nhl : l.bRiemann = false\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\ng : (ι → ℝ) → E\nhg : StronglyMeasurable g\nthis : SeparableSpace ↑(Set.range g ∪ {0})\nhgi✝ : IntegrableOn g ↑I\nf : ℕ → SimpleFunc (ι → ℝ) E :=\n  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})\nhfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I\nhfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))\nhfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖\nε : ℝ≥0\nε0 : 0 < ε\nε0' : 0 < ↑ε\nN₀ : ℕ\nhN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε\nNx : (ι → ℝ) → ℕ\nhNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x\nhNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε\nδ : ℕ → ℝ≥0\nδ0 : ∀ (i : ℕ), 0 < δ i\nc✝ : ℝ≥0\nhδc : HasSum δ c✝\nhcε : c✝ < ε\nr : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=\n  fun c x =>\n    Integrable.convergenceR\n      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x\nc : ℝ≥0\nπ : TaggedPrepartition I\nhπ : IntegrationParams.MemBaseSet l I c (r c) π\nhπp : TaggedPrepartition.IsPartition π\nhfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J\nhgi : ∀ (J : Box ι), J ∈ π → IntegrableOn g ↑J\nhfgi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn (fun x => ‖↑(f n) x - g x‖) ↑J\nJ : Box ι\nhJ : J ∈ π.boxes\nx : ι → ℝ\n⊢ ‖↑(f (Nx (TaggedPrepartition.tag π J))) x - g x‖ ≤ ‖↑(f N₀) x - g x‖\n[PROOFSTEP]\nexact hfg_mono x (hNx (π.tag J))\n", "meta": {"mathlib_filename": "Mathlib.Analysis.BoxIntegral.Integrability", "llama_tokens": 103242, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583376458152, "lm_q2_score": 0.5156199157230157, "lm_q1q2_score": 0.3588499794036653}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nla lb : β\nhab : a ≠ b\nhf : ContinuousOn f (Ioo a b)\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\n⊢ ContinuousOn (extendFrom (Ioo a b) f) (Icc a b)\n[PROOFSTEP]\napply continuousOn_extendFrom\n[GOAL]\ncase hB\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nla lb : β\nhab : a ≠ b\nhf : ContinuousOn f (Ioo a b)\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\n⊢ Icc a b ⊆ closure (Ioo a b)\n[PROOFSTEP]\nrw [closure_Ioo hab]\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nla lb : β\nhab : a ≠ b\nhf : ContinuousOn f (Ioo a b)\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\n⊢ ∀ (x : α), x ∈ Icc a b → ∃ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)\n[PROOFSTEP]\nintro x x_in\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nla lb : β\nhab : a ≠ b\nhf : ContinuousOn f (Ioo a b)\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\nx : α\nx_in : x ∈ Icc a b\n⊢ ∃ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)\n[PROOFSTEP]\nrcases eq_endpoints_or_mem_Ioo_of_mem_Icc x_in with (rfl | rfl | h)\n[GOAL]\ncase hf.inl\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\nb : α\nla lb : β\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\nx : α\nhab : x ≠ b\nhf : ContinuousOn f (Ioo x b)\nha : Tendsto f (𝓝[Ioi x] x) (𝓝 la)\nx_in : x ∈ Icc x b\n⊢ ∃ y, Tendsto f (𝓝[Ioo x b] x) (𝓝 y)\n[PROOFSTEP]\nexact ⟨la, ha.mono_left <| nhdsWithin_mono _ Ioo_subset_Ioi_self⟩\n[GOAL]\ncase hf.inr.inl\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na : α\nla lb : β\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\nx : α\nhab : a ≠ x\nhf : ContinuousOn f (Ioo a x)\nhb : Tendsto f (𝓝[Iio x] x) (𝓝 lb)\nx_in : x ∈ Icc a x\n⊢ ∃ y, Tendsto f (𝓝[Ioo a x] x) (𝓝 y)\n[PROOFSTEP]\nexact ⟨lb, hb.mono_left <| nhdsWithin_mono _ Ioo_subset_Iio_self⟩\n[GOAL]\ncase hf.inr.inr\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nla lb : β\nhab : a ≠ b\nhf : ContinuousOn f (Ioo a b)\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\nx : α\nx_in : x ∈ Icc a b\nh : x ∈ Ioo a b\n⊢ ∃ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)\n[PROOFSTEP]\nexact ⟨f x, hf x h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nf : α → β\na b : α\nla : β\nhab : a < b\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\n⊢ extendFrom (Ioo a b) f a = la\n[PROOFSTEP]\napply extendFrom_eq\n[GOAL]\ncase hx\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nf : α → β\na b : α\nla : β\nhab : a < b\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\n⊢ a ∈ closure (Ioo a b)\n[PROOFSTEP]\nrw [closure_Ioo hab.ne]\n[GOAL]\ncase hx\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nf : α → β\na b : α\nla : β\nhab : a < b\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\n⊢ a ∈ Icc a b\n[PROOFSTEP]\nsimp only [le_of_lt hab, left_mem_Icc, right_mem_Icc]\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nf : α → β\na b : α\nla : β\nhab : a < b\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\n⊢ Tendsto f (𝓝[Ioo a b] a) (𝓝 la)\n[PROOFSTEP]\nsimpa [hab]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nf : α → β\na b : α\nlb : β\nhab : a < b\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\n⊢ extendFrom (Ioo a b) f b = lb\n[PROOFSTEP]\napply extendFrom_eq\n[GOAL]\ncase hx\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nf : α → β\na b : α\nlb : β\nhab : a < b\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\n⊢ b ∈ closure (Ioo a b)\n[PROOFSTEP]\nrw [closure_Ioo hab.ne]\n[GOAL]\ncase hx\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nf : α → β\na b : α\nlb : β\nhab : a < b\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\n⊢ b ∈ Icc a b\n[PROOFSTEP]\nsimp only [le_of_lt hab, left_mem_Icc, right_mem_Icc]\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nf : α → β\na b : α\nlb : β\nhab : a < b\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\n⊢ Tendsto f (𝓝[Ioo a b] b) (𝓝 lb)\n[PROOFSTEP]\nsimpa [hab]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nla : β\nhab : a < b\nhf : ContinuousOn f (Ioo a b)\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\n⊢ ContinuousOn (extendFrom (Ioo a b) f) (Ico a b)\n[PROOFSTEP]\napply continuousOn_extendFrom\n[GOAL]\ncase hB\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nla : β\nhab : a < b\nhf : ContinuousOn f (Ioo a b)\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\n⊢ Ico a b ⊆ closure (Ioo a b)\n[PROOFSTEP]\nrw [closure_Ioo hab.ne]\n[GOAL]\ncase hB\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nla : β\nhab : a < b\nhf : ContinuousOn f (Ioo a b)\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\n⊢ Ico a b ⊆ Icc a b\n[PROOFSTEP]\nexact Ico_subset_Icc_self\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nla : β\nhab : a < b\nhf : ContinuousOn f (Ioo a b)\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\n⊢ ∀ (x : α), x ∈ Ico a b → ∃ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)\n[PROOFSTEP]\nintro x x_in\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nla : β\nhab : a < b\nhf : ContinuousOn f (Ioo a b)\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\nx : α\nx_in : x ∈ Ico a b\n⊢ ∃ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)\n[PROOFSTEP]\nrcases eq_left_or_mem_Ioo_of_mem_Ico x_in with (rfl | h)\n[GOAL]\ncase hf.inl\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\nb : α\nla : β\nx : α\nhab : x < b\nhf : ContinuousOn f (Ioo x b)\nha : Tendsto f (𝓝[Ioi x] x) (𝓝 la)\nx_in : x ∈ Ico x b\n⊢ ∃ y, Tendsto f (𝓝[Ioo x b] x) (𝓝 y)\n[PROOFSTEP]\nuse la\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\nb : α\nla : β\nx : α\nhab : x < b\nhf : ContinuousOn f (Ioo x b)\nha : Tendsto f (𝓝[Ioi x] x) (𝓝 la)\nx_in : x ∈ Ico x b\n⊢ Tendsto f (𝓝[Ioo x b] x) (𝓝 la)\n[PROOFSTEP]\nsimpa [hab]\n[GOAL]\ncase hf.inr\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nla : β\nhab : a < b\nhf : ContinuousOn f (Ioo a b)\nha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)\nx : α\nx_in : x ∈ Ico a b\nh : x ∈ Ioo a b\n⊢ ∃ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)\n[PROOFSTEP]\nexact ⟨f x, hf x h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nlb : β\nhab : a < b\nhf : ContinuousOn f (Ioo a b)\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\n⊢ ContinuousOn (extendFrom (Ioo a b) f) (Ioc a b)\n[PROOFSTEP]\nhave := @continuousOn_Ico_extendFrom_Ioo αᵒᵈ _ _ _ _ _ _ _ f _ _ lb hab\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nlb : β\nhab : a < b\nhf : ContinuousOn f (Ioo a b)\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\nthis : ContinuousOn f (Ioo b a) → Tendsto f (𝓝[Ioi b] b) (𝓝 lb) → ContinuousOn (extendFrom (Ioo b a) f) (Ico b a)\n⊢ ContinuousOn (extendFrom (Ioo a b) f) (Ioc a b)\n[PROOFSTEP]\nerw [dual_Ico, dual_Ioi, dual_Ioo] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : LinearOrder α\ninst✝³ : DenselyOrdered α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : RegularSpace β\nf : α → β\na b : α\nlb : β\nhab : a < b\nhf : ContinuousOn f (Ioo a b)\nhb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)\nthis :\n  ContinuousOn f (↑OrderDual.ofDual ⁻¹' Ioo a b) →\n    Tendsto f (𝓝[↑OrderDual.ofDual ⁻¹' Iio b] b) (𝓝 lb) →\n      ContinuousOn (extendFrom (↑OrderDual.ofDual ⁻¹' Ioo a b) f) (↑OrderDual.ofDual ⁻¹' Ioc a b)\n⊢ ContinuousOn (extendFrom (Ioo a b) f) (Ioc a b)\n[PROOFSTEP]\nexact this hf hb\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Order.ExtendFrom", "llama_tokens": 5323, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6654105720171531, "lm_q2_score": 0.538983220687684, "lm_q1q2_score": 0.3586451331854393}}
{"text": "[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\n⊢ ∀ (K₁ K₂ : Compacts G), ↑K₁ ⊆ ↑K₂ → (fun x => 0) K₁ ≤ (fun x => 0) K₂\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\n⊢ ∀ (K₁ K₂ : Compacts G), Disjoint ↑K₁ ↑K₂ → (fun x => 0) (K₁ ⊔ K₂) = (fun x => 0) K₁ + (fun x => 0) K₂\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\n⊢ ∀ (K₁ K₂ : Compacts G), (fun x => 0) (K₁ ⊔ K₂) ≤ (fun x => 0) K₁ + (fun x => 0) K₂\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nK₁ K₂ : Compacts G\nh : ↑K₁ ⊆ ↑K₂\n⊢ (fun s => ↑(toFun μ s)) K₁ ≤ (fun s => ↑(toFun μ s)) K₂\n[PROOFSTEP]\nsimp [apply_eq_coe_toFun, μ.mono' _ _ h]\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nK₁ K₂ : Compacts G\nh : Disjoint ↑K₁ ↑K₂\n⊢ (fun s => ↑(toFun μ s)) (K₁ ⊔ K₂) = (fun s => ↑(toFun μ s)) K₁ + (fun s => ↑(toFun μ s)) K₂\n[PROOFSTEP]\nsimp [apply_eq_coe_toFun, μ.sup_disjoint' _ _ h]\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nK₁ K₂ : Compacts G\n⊢ (fun s => ↑(toFun μ s)) (K₁ ⊔ K₂) ≤ (fun s => ↑(toFun μ s)) K₁ + (fun s => ↑(toFun μ s)) K₂\n[PROOFSTEP]\nsimp only [apply_eq_coe_toFun]\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nK₁ K₂ : Compacts G\n⊢ ↑(toFun μ (K₁ ⊔ K₂)) ≤ ↑(toFun μ K₁) + ↑(toFun μ K₂)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nK₁ K₂ : Compacts G\n⊢ toFun μ (K₁ ⊔ K₂) ≤ toFun μ K₁ + toFun μ K₂\n[PROOFSTEP]\nexact μ.sup_le' _ _\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\n⊢ (fun s => ↑(toFun μ s)) ⊥ = 0\n[PROOFSTEP]\nhave := μ.sup_disjoint' ⊥ ⊥\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nthis : Disjoint ↑⊥ ↑⊥ → toFun μ (⊥ ⊔ ⊥) = toFun μ ⊥ + toFun μ ⊥\n⊢ (fun s => ↑(toFun μ s)) ⊥ = 0\n[PROOFSTEP]\nsimpa [apply_eq_coe_toFun] using this\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\n⊢ innerContent μ ⊥ = 0\n[PROOFSTEP]\nrefine' le_antisymm _ (zero_le _)\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\n⊢ innerContent μ ⊥ ≤ 0\n[PROOFSTEP]\nrw [← μ.empty]\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\n⊢ innerContent μ ⊥ ≤ (fun s => ↑(toFun μ s)) ⊥\n[PROOFSTEP]\nrefine' iSup₂_le fun K hK => _\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nK : Compacts G\nhK : ↑K ⊆ ↑⊥\n⊢ (fun s => ↑(toFun μ s)) K ≤ (fun s => ↑(toFun μ s)) ⊥\n[PROOFSTEP]\nhave : K = ⊥ := by\n  ext1\n  rw [subset_empty_iff.mp hK, Compacts.coe_bot]\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nK : Compacts G\nhK : ↑K ⊆ ↑⊥\n⊢ K = ⊥\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nK : Compacts G\nhK : ↑K ⊆ ↑⊥\n⊢ ↑K = ↑⊥\n[PROOFSTEP]\nrw [subset_empty_iff.mp hK, Compacts.coe_bot]\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nK : Compacts G\nhK : ↑K ⊆ ↑⊥\nthis : K = ⊥\n⊢ (fun s => ↑(toFun μ s)) K ≤ (fun s => ↑(toFun μ s)) ⊥\n[PROOFSTEP]\nrw [this]\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\n⊢ ∃ K, ↑K ⊆ ↑U ∧ innerContent μ U ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n[PROOFSTEP]\nhave h'ε := ENNReal.coe_ne_zero.2 hε\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\n⊢ ∃ K, ↑K ⊆ ↑U ∧ innerContent μ U ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n[PROOFSTEP]\ncases' le_or_lt (μ.innerContent U) ε with h h\n[GOAL]\ncase inl\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\nh : innerContent μ U ≤ ↑ε\n⊢ ∃ K, ↑K ⊆ ↑U ∧ innerContent μ U ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n[PROOFSTEP]\nexact ⟨⊥, empty_subset _, le_add_left h⟩\n[GOAL]\ncase inr\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\nh : ↑ε < innerContent μ U\n⊢ ∃ K, ↑K ⊆ ↑U ∧ innerContent μ U ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n[PROOFSTEP]\nhave h₂ := ENNReal.sub_lt_self hU h.ne_bot h'ε\n[GOAL]\ncase inr\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\nh : ↑ε < innerContent μ U\nh₂ : innerContent μ U - ↑ε < innerContent μ U\n⊢ ∃ K, ↑K ⊆ ↑U ∧ innerContent μ U ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n[PROOFSTEP]\nconv at h₂ => rhs; rw [innerContent]\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\nh : ↑ε < innerContent μ U\nh₂ : innerContent μ U - ↑ε < innerContent μ U\n| innerContent μ U - ↑ε < innerContent μ U\n[PROOFSTEP]\nrhs; rw [innerContent]\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\nh : ↑ε < innerContent μ U\nh₂ : innerContent μ U - ↑ε < innerContent μ U\n| innerContent μ U - ↑ε < innerContent μ U\n[PROOFSTEP]\nrhs; rw [innerContent]\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\nh : ↑ε < innerContent μ U\nh₂ : innerContent μ U - ↑ε < innerContent μ U\n| innerContent μ U - ↑ε < innerContent μ U\n[PROOFSTEP]\nrhs\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\nh : ↑ε < innerContent μ U\nh₂ : innerContent μ U - ↑ε < innerContent μ U\n| innerContent μ U\n[PROOFSTEP]\nrw [innerContent]\n[GOAL]\ncase inr\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\nh : ↑ε < innerContent μ U\nh₂ : innerContent μ U - ↑ε < ⨆ (K : Compacts G) (_ : ↑K ⊆ ↑U), (fun s => ↑(toFun μ s)) K\n⊢ ∃ K, ↑K ⊆ ↑U ∧ innerContent μ U ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n[PROOFSTEP]\nsimp only [lt_iSup_iff] at h₂ \n[GOAL]\ncase inr\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\nh : ↑ε < innerContent μ U\nh₂ : ∃ i i_1, innerContent μ U - ↑ε < ↑(toFun μ i)\n⊢ ∃ K, ↑K ⊆ ↑U ∧ innerContent μ U ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n[PROOFSTEP]\nrcases h₂ with ⟨U, h1U, h2U⟩\n[GOAL]\ncase inr.intro.intro\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU✝ : Opens G\nhU : innerContent μ U✝ ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\nh : ↑ε < innerContent μ U✝\nU : Compacts G\nh1U : ↑U ⊆ ↑U✝\nh2U : innerContent μ U✝ - ↑ε < ↑(toFun μ U)\n⊢ ∃ K, ↑K ⊆ ↑U✝ ∧ innerContent μ U✝ ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n[PROOFSTEP]\nrefine' ⟨U, h1U, _⟩\n[GOAL]\ncase inr.intro.intro\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU✝ : Opens G\nhU : innerContent μ U✝ ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\nh : ↑ε < innerContent μ U✝\nU : Compacts G\nh1U : ↑U ⊆ ↑U✝\nh2U : innerContent μ U✝ - ↑ε < ↑(toFun μ U)\n⊢ innerContent μ U✝ ≤ (fun s => ↑(toFun μ s)) U + ↑ε\n[PROOFSTEP]\nrw [← tsub_le_iff_right]\n[GOAL]\ncase inr.intro.intro\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nU✝ : Opens G\nhU : innerContent μ U✝ ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nh'ε : ↑ε ≠ 0\nh : ↑ε < innerContent μ U✝\nU : Compacts G\nh1U : ↑U ⊆ ↑U✝\nh2U : innerContent μ U✝ - ↑ε < ↑(toFun μ U)\n⊢ innerContent μ U✝ - ↑ε ≤ (fun s => ↑(toFun μ s)) U\n[PROOFSTEP]\nexact le_of_lt h2U\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\n⊢ innerContent μ (⨆ (i : ℕ), U i) ≤ ∑' (i : ℕ), innerContent μ (U i)\n[PROOFSTEP]\nhave h3 : ∀ (t : Finset ℕ) (K : ℕ → Compacts G), μ (t.sup K) ≤ t.sum fun i => μ (K i) :=\n  by\n  intro t K\n  refine' Finset.induction_on t _ _\n  · simp only [μ.empty, nonpos_iff_eq_zero, Finset.sum_empty, Finset.sup_empty]\n  · intro n s hn ih\n    rw [Finset.sup_insert, Finset.sum_insert hn]\n    exact le_trans (μ.sup_le _ _) (add_le_add_left ih _)\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\n⊢ ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\n[PROOFSTEP]\nintro t K\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nt : Finset ℕ\nK : ℕ → Compacts G\n⊢ (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\n[PROOFSTEP]\nrefine' Finset.induction_on t _ _\n[GOAL]\ncase refine'_1\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nt : Finset ℕ\nK : ℕ → Compacts G\n⊢ (fun s => ↑(toFun μ s)) (Finset.sup ∅ K) ≤ Finset.sum ∅ fun i => (fun s => ↑(toFun μ s)) (K i)\n[PROOFSTEP]\nsimp only [μ.empty, nonpos_iff_eq_zero, Finset.sum_empty, Finset.sup_empty]\n[GOAL]\ncase refine'_2\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nt : Finset ℕ\nK : ℕ → Compacts G\n⊢ ∀ ⦃a : ℕ⦄ {s : Finset ℕ},\n    ¬a ∈ s →\n      ((fun s => ↑(toFun μ s)) (Finset.sup s K) ≤ Finset.sum s fun i => (fun s => ↑(toFun μ s)) (K i)) →\n        (fun s => ↑(toFun μ s)) (Finset.sup (insert a s) K) ≤\n          Finset.sum (insert a s) fun i => (fun s => ↑(toFun μ s)) (K i)\n[PROOFSTEP]\nintro n s hn ih\n[GOAL]\ncase refine'_2\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nt : Finset ℕ\nK : ℕ → Compacts G\nn : ℕ\ns : Finset ℕ\nhn : ¬n ∈ s\nih : (fun s => ↑(toFun μ s)) (Finset.sup s K) ≤ Finset.sum s fun i => (fun s => ↑(toFun μ s)) (K i)\n⊢ (fun s => ↑(toFun μ s)) (Finset.sup (insert n s) K) ≤ Finset.sum (insert n s) fun i => (fun s => ↑(toFun μ s)) (K i)\n[PROOFSTEP]\nrw [Finset.sup_insert, Finset.sum_insert hn]\n[GOAL]\ncase refine'_2\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nt : Finset ℕ\nK : ℕ → Compacts G\nn : ℕ\ns : Finset ℕ\nhn : ¬n ∈ s\nih : (fun s => ↑(toFun μ s)) (Finset.sup s K) ≤ Finset.sum s fun i => (fun s => ↑(toFun μ s)) (K i)\n⊢ (fun s => ↑(toFun μ s)) (K n ⊔ Finset.sup s K) ≤\n    (fun s => ↑(toFun μ s)) (K n) + Finset.sum s fun x => (fun s => ↑(toFun μ s)) (K x)\n[PROOFSTEP]\nexact le_trans (μ.sup_le _ _) (add_le_add_left ih _)\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\n⊢ innerContent μ (⨆ (i : ℕ), U i) ≤ ∑' (i : ℕ), innerContent μ (U i)\n[PROOFSTEP]\nrefine' iSup₂_le fun K hK => _\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\n⊢ (fun s => ↑(toFun μ s)) K ≤ ∑' (i : ℕ), innerContent μ (U i)\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := K.isCompact.elim_finite_subcover _ (fun i => (U i).isOpen) (by rwa [← Opens.coe_iSup])\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\n⊢ ↑K ⊆ ⋃ (i : ℕ), ↑(U i)\n[PROOFSTEP]\nrwa [← Opens.coe_iSup]\n[GOAL]\ncase intro\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\nt : Finset ℕ\nht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)\n⊢ (fun s => ↑(toFun μ s)) K ≤ ∑' (i : ℕ), innerContent μ (U i)\n[PROOFSTEP]\nrcases K.isCompact.finite_compact_cover t (SetLike.coe ∘ U) (fun i _ => (U i).isOpen) ht with ⟨K', h1K', h2K', h3K'⟩\n[GOAL]\ncase intro.intro.intro.intro\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\nt : Finset ℕ\nht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)\nK' : ℕ → Set G\nh1K' : ∀ (i : ℕ), IsCompact (K' i)\nh2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i\nh3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i\n⊢ (fun s => ↑(toFun μ s)) K ≤ ∑' (i : ℕ), innerContent μ (U i)\n[PROOFSTEP]\nlet L : ℕ → Compacts G := fun n => ⟨K' n, h1K' n⟩\n[GOAL]\ncase intro.intro.intro.intro\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\nt : Finset ℕ\nht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)\nK' : ℕ → Set G\nh1K' : ∀ (i : ℕ), IsCompact (K' i)\nh2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i\nh3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i\nL : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }\n⊢ (fun s => ↑(toFun μ s)) K ≤ ∑' (i : ℕ), innerContent μ (U i)\n[PROOFSTEP]\nconvert le_trans (h3 t L) _\n[GOAL]\ncase h.e'_3.h.e'_1\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\nt : Finset ℕ\nht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)\nK' : ℕ → Set G\nh1K' : ∀ (i : ℕ), IsCompact (K' i)\nh2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i\nh3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i\nL : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }\n⊢ K = Finset.sup t L\n[PROOFSTEP]\next1\n[GOAL]\ncase h.e'_3.h.e'_1.h\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\nt : Finset ℕ\nht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)\nK' : ℕ → Set G\nh1K' : ∀ (i : ℕ), IsCompact (K' i)\nh2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i\nh3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i\nL : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }\n⊢ ↑K = ↑(Finset.sup t L)\n[PROOFSTEP]\nrw [Compacts.coe_finset_sup, Finset.sup_eq_iSup]\n[GOAL]\ncase h.e'_3.h.e'_1.h\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\nt : Finset ℕ\nht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)\nK' : ℕ → Set G\nh1K' : ∀ (i : ℕ), IsCompact (K' i)\nh2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i\nh3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i\nL : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }\n⊢ ↑K = ⨆ (a : ℕ) (_ : a ∈ t), ↑(L a)\n[PROOFSTEP]\nexact h3K'\n[GOAL]\ncase intro.intro.intro.intro.convert_2\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\nt : Finset ℕ\nht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)\nK' : ℕ → Set G\nh1K' : ∀ (i : ℕ), IsCompact (K' i)\nh2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i\nh3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i\nL : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }\n⊢ (Finset.sum t fun i => (fun s => ↑(toFun μ s)) (L i)) ≤ ∑' (i : ℕ), innerContent μ (U i)\n[PROOFSTEP]\nrefine' le_trans (Finset.sum_le_sum _) (ENNReal.sum_le_tsum t)\n[GOAL]\ncase intro.intro.intro.intro.convert_2\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\nt : Finset ℕ\nht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)\nK' : ℕ → Set G\nh1K' : ∀ (i : ℕ), IsCompact (K' i)\nh2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i\nh3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i\nL : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }\n⊢ ∀ (i : ℕ), i ∈ t → (fun s => ↑(toFun μ s)) (L i) ≤ innerContent μ (U i)\n[PROOFSTEP]\nintro i _\n[GOAL]\ncase intro.intro.intro.intro.convert_2\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\nt : Finset ℕ\nht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)\nK' : ℕ → Set G\nh1K' : ∀ (i : ℕ), IsCompact (K' i)\nh2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i\nh3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i\nL : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }\ni : ℕ\na✝ : i ∈ t\n⊢ (fun s => ↑(toFun μ s)) (L i) ≤ innerContent μ (U i)\n[PROOFSTEP]\nrefine' le_trans _ (le_iSup _ (L i))\n[GOAL]\ncase intro.intro.intro.intro.convert_2\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\nt : Finset ℕ\nht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)\nK' : ℕ → Set G\nh1K' : ∀ (i : ℕ), IsCompact (K' i)\nh2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i\nh3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i\nL : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }\ni : ℕ\na✝ : i ∈ t\n⊢ (fun s => ↑(toFun μ s)) (L i) ≤ ⨆ (_ : ↑(L i) ⊆ ↑(U i)), (fun s => ↑(toFun μ s)) (L i)\n[PROOFSTEP]\nrefine' le_trans _ (le_iSup _ (h2K' i))\n[GOAL]\ncase intro.intro.intro.intro.convert_2\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Opens G\nh3 :\n  ∀ (t : Finset ℕ) (K : ℕ → Compacts G),\n    (fun s => ↑(toFun μ s)) (Finset.sup t K) ≤ Finset.sum t fun i => (fun s => ↑(toFun μ s)) (K i)\nK : Compacts G\nhK : ↑K ⊆ ↑(⨆ (i : ℕ), U i)\nt : Finset ℕ\nht : ↑K ⊆ ⋃ (i : ℕ) (_ : i ∈ t), ↑(U i)\nK' : ℕ → Set G\nh1K' : ∀ (i : ℕ), IsCompact (K' i)\nh2K' : ∀ (i : ℕ), K' i ⊆ (SetLike.coe ∘ U) i\nh3K' : ↑K = ⋃ (i : ℕ) (_ : i ∈ t), K' i\nL : ℕ → Compacts G := fun n => { carrier := K' n, isCompact' := (_ : IsCompact (K' n)) }\ni : ℕ\na✝ : i ∈ t\n⊢ (fun s => ↑(toFun μ s)) (L i) ≤ (fun s => ↑(toFun μ s)) (L i)\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Set G\nhU : ∀ (i : ℕ), IsOpen (U i)\n⊢ innerContent μ { carrier := ⋃ (i : ℕ), U i, is_open' := (_ : IsOpen (⋃ (i : ℕ), U i)) } ≤\n    ∑' (i : ℕ), innerContent μ { carrier := U i, is_open' := (_ : IsOpen (U i)) }\n[PROOFSTEP]\nhave := μ.innerContent_iSup_nat fun i => ⟨U i, hU i⟩\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : ℕ → Set G\nhU : ∀ (i : ℕ), IsOpen (U i)\nthis :\n  innerContent μ (⨆ (i : ℕ), { carrier := U i, is_open' := (_ : IsOpen (U i)) }) ≤\n    ∑' (i : ℕ), innerContent μ { carrier := U i, is_open' := (_ : IsOpen (U i)) }\n⊢ innerContent μ { carrier := ⋃ (i : ℕ), U i, is_open' := (_ : IsOpen (⋃ (i : ℕ), U i)) } ≤\n    ∑' (i : ℕ), innerContent μ { carrier := U i, is_open' := (_ : IsOpen (U i)) }\n[PROOFSTEP]\nrwa [Opens.iSup_def] at this \n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nf : G ≃ₜ G\nh : ∀ ⦃K : Compacts G⦄, (fun s => ↑(toFun μ s)) (Compacts.map ↑f (_ : Continuous ↑f) K) = (fun s => ↑(toFun μ s)) K\nU : Opens G\n⊢ innerContent μ (↑(Opens.comap (Homeomorph.toContinuousMap f)) U) = innerContent μ U\n[PROOFSTEP]\nrefine' (Compacts.equiv f).surjective.iSup_congr _ fun K => iSup_congr_Prop image_subset_iff _\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nf : G ≃ₜ G\nh : ∀ ⦃K : Compacts G⦄, (fun s => ↑(toFun μ s)) (Compacts.map ↑f (_ : Continuous ↑f) K) = (fun s => ↑(toFun μ s)) K\nU : Opens G\nK : Compacts G\n⊢ ↑K ⊆ ↑(↑(Opens.comap (Homeomorph.toContinuousMap f)) U) →\n    (fun s => ↑(toFun μ s)) (↑(Compacts.equiv f) K) = (fun s => ↑(toFun μ s)) K\n[PROOFSTEP]\nintro hK\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nf : G ≃ₜ G\nh : ∀ ⦃K : Compacts G⦄, (fun s => ↑(toFun μ s)) (Compacts.map ↑f (_ : Continuous ↑f) K) = (fun s => ↑(toFun μ s)) K\nU : Opens G\nK : Compacts G\nhK : ↑K ⊆ ↑(↑(Opens.comap (Homeomorph.toContinuousMap f)) U)\n⊢ (fun s => ↑(toFun μ s)) (↑(Compacts.equiv f) K) = (fun s => ↑(toFun μ s)) K\n[PROOFSTEP]\nsimp only [Equiv.coe_fn_mk, Subtype.mk_eq_mk, Compacts.equiv]\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nf : G ≃ₜ G\nh : ∀ ⦃K : Compacts G⦄, (fun s => ↑(toFun μ s)) (Compacts.map ↑f (_ : Continuous ↑f) K) = (fun s => ↑(toFun μ s)) K\nU : Opens G\nK : Compacts G\nhK : ↑K ⊆ ↑(↑(Opens.comap (Homeomorph.toContinuousMap f)) U)\n⊢ ↑(toFun μ (Compacts.map ↑f (_ : Continuous ↑f) K)) = ↑(toFun μ K)\n[PROOFSTEP]\napply h\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\ng : G\nU : Opens G\n⊢ innerContent μ (↑(Opens.comap (Homeomorph.toContinuousMap (Homeomorph.mulLeft g))) U) = innerContent μ U\n[PROOFSTEP]\nconvert μ.innerContent_comap (Homeomorph.mulLeft g) (fun K => h g) U\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Opens G\nhU : Set.Nonempty ↑U\n⊢ 0 < innerContent μ U\n[PROOFSTEP]\nhave : (interior (U : Set G)).Nonempty\n[GOAL]\ncase this\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Opens G\nhU : Set.Nonempty ↑U\n⊢ Set.Nonempty (interior ↑U)\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Opens G\nhU : Set.Nonempty ↑U\nthis : Set.Nonempty (interior ↑U)\n⊢ 0 < innerContent μ U\n[PROOFSTEP]\nrwa [U.isOpen.interior_eq]\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Opens G\nhU : Set.Nonempty ↑U\nthis : Set.Nonempty (interior ↑U)\n⊢ 0 < innerContent μ U\n[PROOFSTEP]\nrcases compact_covered_by_mul_left_translates K.2 this with ⟨s, hs⟩\n[GOAL]\ncase intro\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Opens G\nhU : Set.Nonempty ↑U\nthis : Set.Nonempty (interior ↑U)\ns : Finset G\nhs : K.carrier ⊆ ⋃ (g : G) (_ : g ∈ s), (fun h => g * h) ⁻¹' ↑U\n⊢ 0 < innerContent μ U\n[PROOFSTEP]\nsuffices μ K ≤ s.card * μ.innerContent U by exact (ENNReal.mul_pos_iff.mp <| hK.bot_lt.trans_le this).2\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Opens G\nhU : Set.Nonempty ↑U\nthis✝ : Set.Nonempty (interior ↑U)\ns : Finset G\nhs : K.carrier ⊆ ⋃ (g : G) (_ : g ∈ s), (fun h => g * h) ⁻¹' ↑U\nthis : (fun s => ↑(toFun μ s)) K ≤ ↑(Finset.card s) * innerContent μ U\n⊢ 0 < innerContent μ U\n[PROOFSTEP]\nexact (ENNReal.mul_pos_iff.mp <| hK.bot_lt.trans_le this).2\n[GOAL]\ncase intro\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Opens G\nhU : Set.Nonempty ↑U\nthis : Set.Nonempty (interior ↑U)\ns : Finset G\nhs : K.carrier ⊆ ⋃ (g : G) (_ : g ∈ s), (fun h => g * h) ⁻¹' ↑U\n⊢ (fun s => ↑(toFun μ s)) K ≤ ↑(Finset.card s) * innerContent μ U\n[PROOFSTEP]\nhave : (K : Set G) ⊆ ↑(⨆ g ∈ s, Opens.comap (Homeomorph.mulLeft g).toContinuousMap U) := by\n  simpa only [Opens.iSup_def, Opens.coe_comap, Subtype.coe_mk]\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Opens G\nhU : Set.Nonempty ↑U\nthis : Set.Nonempty (interior ↑U)\ns : Finset G\nhs : K.carrier ⊆ ⋃ (g : G) (_ : g ∈ s), (fun h => g * h) ⁻¹' ↑U\n⊢ ↑K ⊆ ↑(⨆ (g : G) (_ : g ∈ s), ↑(Opens.comap (Homeomorph.toContinuousMap (Homeomorph.mulLeft g))) U)\n[PROOFSTEP]\nsimpa only [Opens.iSup_def, Opens.coe_comap, Subtype.coe_mk]\n[GOAL]\ncase intro\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Opens G\nhU : Set.Nonempty ↑U\nthis✝ : Set.Nonempty (interior ↑U)\ns : Finset G\nhs : K.carrier ⊆ ⋃ (g : G) (_ : g ∈ s), (fun h => g * h) ⁻¹' ↑U\nthis : ↑K ⊆ ↑(⨆ (g : G) (_ : g ∈ s), ↑(Opens.comap (Homeomorph.toContinuousMap (Homeomorph.mulLeft g))) U)\n⊢ (fun s => ↑(toFun μ s)) K ≤ ↑(Finset.card s) * innerContent μ U\n[PROOFSTEP]\nrefine' (μ.le_innerContent _ _ this).trans _\n[GOAL]\ncase intro\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Opens G\nhU : Set.Nonempty ↑U\nthis✝ : Set.Nonempty (interior ↑U)\ns : Finset G\nhs : K.carrier ⊆ ⋃ (g : G) (_ : g ∈ s), (fun h => g * h) ⁻¹' ↑U\nthis : ↑K ⊆ ↑(⨆ (g : G) (_ : g ∈ s), ↑(Opens.comap (Homeomorph.toContinuousMap (Homeomorph.mulLeft g))) U)\n⊢ innerContent μ (⨆ (g : G) (_ : g ∈ s), ↑(Opens.comap (Homeomorph.toContinuousMap (Homeomorph.mulLeft g))) U) ≤\n    ↑(Finset.card s) * innerContent μ U\n[PROOFSTEP]\nrefine' (rel_iSup_sum μ.innerContent μ.innerContent_bot (· ≤ ·) μ.innerContent_iSup_nat _ _).trans _\n[GOAL]\ncase intro\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Opens G\nhU : Set.Nonempty ↑U\nthis✝ : Set.Nonempty (interior ↑U)\ns : Finset G\nhs : K.carrier ⊆ ⋃ (g : G) (_ : g ∈ s), (fun h => g * h) ⁻¹' ↑U\nthis : ↑K ⊆ ↑(⨆ (g : G) (_ : g ∈ s), ↑(Opens.comap (Homeomorph.toContinuousMap (Homeomorph.mulLeft g))) U)\n⊢ (Finset.sum s fun d => innerContent μ (↑(Opens.comap (Homeomorph.toContinuousMap (Homeomorph.mulLeft d))) U)) ≤\n    ↑(Finset.card s) * innerContent μ U\n[PROOFSTEP]\nsimp only [μ.is_mul_left_invariant_innerContent h3, Finset.sum_const, nsmul_eq_mul, le_refl]\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nK : Compacts G\n⊢ (fun s => ↑(toFun μ s)) K ≤ ↑(Content.outerMeasure μ) ↑K\n[PROOFSTEP]\nrw [Content.outerMeasure, inducedOuterMeasure_eq_iInf]\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nK : Compacts G\n⊢ (fun s => ↑(toFun μ s)) K ≤\n    ⨅ (t : Set G) (ht : IsOpen t) (_ : ↑K ⊆ t), innerContent μ { carrier := t, is_open' := ht }\n[PROOFSTEP]\nexact le_iInf fun U => le_iInf fun hU => le_iInf <| μ.le_innerContent K ⟨U, hU⟩\n[GOAL]\ncase PU\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nK : Compacts G\n⊢ ∀ ⦃f : ℕ → Set G⦄, (∀ (i : ℕ), IsOpen (f i)) → IsOpen (⋃ (i : ℕ), f i)\n[PROOFSTEP]\nexact fun U hU => isOpen_iUnion hU\n[GOAL]\ncase msU\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nK : Compacts G\n⊢ ∀ ⦃f : ℕ → Set G⦄ (hm : ∀ (i : ℕ), IsOpen (f i)),\n    innerContent μ { carrier := ⋃ (i : ℕ), f i, is_open' := (_ : IsOpen (⋃ (i : ℕ), (fun i => f i) i)) } ≤\n      ∑' (i : ℕ), innerContent μ { carrier := f i, is_open' := (_ : IsOpen (f i)) }\n[PROOFSTEP]\nexact μ.innerContent_iUnion_nat\n[GOAL]\ncase m_mono\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nK : Compacts G\n⊢ ∀ ⦃s₁ s₂ : Set G⦄ (hs₁ : IsOpen s₁) (hs₂ : IsOpen s₂),\n    s₁ ⊆ s₂ → innerContent μ { carrier := s₁, is_open' := hs₁ } ≤ innerContent μ { carrier := s₂, is_open' := hs₂ }\n[PROOFSTEP]\nexact μ.innerContent_mono\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : Opens G\nhU : ↑(Content.outerMeasure μ) ↑U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\n⊢ ∃ K, ↑K ⊆ ↑U ∧ ↑(Content.outerMeasure μ) ↑U ≤ ↑(Content.outerMeasure μ) ↑K + ↑ε\n[PROOFSTEP]\nrw [μ.outerMeasure_opens] at hU ⊢\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\n⊢ ∃ K, ↑K ⊆ ↑U ∧ innerContent μ U ≤ ↑(Content.outerMeasure μ) ↑K + ↑ε\n[PROOFSTEP]\nrcases μ.innerContent_exists_compact hU hε with ⟨K, h1K, h2K⟩\n[GOAL]\ncase intro.intro\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nU : Opens G\nhU : innerContent μ U ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nK : Compacts G\nh1K : ↑K ⊆ ↑U\nh2K : innerContent μ U ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n⊢ ∃ K, ↑K ⊆ ↑U ∧ innerContent μ U ≤ ↑(Content.outerMeasure μ) ↑K + ↑ε\n[PROOFSTEP]\nexact ⟨K, h1K, le_trans h2K <| add_le_add_right (μ.le_outerMeasure_compacts K) _⟩\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nA : Set G\nhA : ↑(Content.outerMeasure μ) A ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\n⊢ ∃ U, A ⊆ ↑U ∧ ↑(Content.outerMeasure μ) ↑U ≤ ↑(Content.outerMeasure μ) A + ↑ε\n[PROOFSTEP]\nrcases inducedOuterMeasure_exists_set _ μ.innerContent_iUnion_nat μ.innerContent_mono hA (ENNReal.coe_ne_zero.2 hε) with\n  ⟨U, hU, h2U, h3U⟩\n[GOAL]\ncase intro.intro.intro\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nA : Set G\nhA : ↑(Content.outerMeasure μ) A ≠ ⊤\nε : ℝ≥0\nhε : ε ≠ 0\nU : Set G\nhU : IsOpen U\nh2U : A ⊆ U\nh3U :\n  ↑(inducedOuterMeasure (fun s₁ hs₁ => innerContent μ { carrier := s₁, is_open' := hs₁ }) (_ : IsOpen ∅)\n          (_ : innerContent μ ⊥ = 0))\n      U ≤\n    ↑(inducedOuterMeasure (fun s₁ hs₁ => innerContent μ { carrier := s₁, is_open' := hs₁ }) (_ : IsOpen ∅)\n            (_ : innerContent μ ⊥ = 0))\n        A +\n      ↑ε\n⊢ ∃ U, A ⊆ ↑U ∧ ↑(Content.outerMeasure μ) ↑U ≤ ↑(Content.outerMeasure μ) A + ↑ε\n[PROOFSTEP]\nexact ⟨⟨U, hU⟩, h2U, h3U⟩\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nf : G ≃ₜ G\nh : ∀ ⦃K : Compacts G⦄, (fun s => ↑(toFun μ s)) (Compacts.map ↑f (_ : Continuous ↑f) K) = (fun s => ↑(toFun μ s)) K\nA : Set G\n⊢ ↑(Content.outerMeasure μ) (↑f ⁻¹' A) = ↑(Content.outerMeasure μ) A\n[PROOFSTEP]\nrefine' inducedOuterMeasure_preimage _ μ.innerContent_iUnion_nat μ.innerContent_mono _ (fun _ => f.isOpen_preimage) _\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nf : G ≃ₜ G\nh : ∀ ⦃K : Compacts G⦄, (fun s => ↑(toFun μ s)) (Compacts.map ↑f (_ : Continuous ↑f) K) = (fun s => ↑(toFun μ s)) K\nA : Set G\n⊢ ∀ (s : Set G) (hs : IsOpen s),\n    innerContent μ { carrier := ↑f.toEquiv ⁻¹' s, is_open' := (_ : IsOpen (↑f.toEquiv ⁻¹' s)) } =\n      innerContent μ { carrier := s, is_open' := hs }\n[PROOFSTEP]\nintro s hs\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nf : G ≃ₜ G\nh : ∀ ⦃K : Compacts G⦄, (fun s => ↑(toFun μ s)) (Compacts.map ↑f (_ : Continuous ↑f) K) = (fun s => ↑(toFun μ s)) K\nA s : Set G\nhs : IsOpen s\n⊢ innerContent μ { carrier := ↑f.toEquiv ⁻¹' s, is_open' := (_ : IsOpen (↑f.toEquiv ⁻¹' s)) } =\n    innerContent μ { carrier := s, is_open' := hs }\n[PROOFSTEP]\nconvert μ.innerContent_comap f h ⟨s, hs⟩\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\ninst✝ : LocallyCompactSpace G\nK : Set G\nhK : IsCompact K\n⊢ ↑(Content.outerMeasure μ) K < ⊤\n[PROOFSTEP]\nrcases exists_compact_superset hK with ⟨F, h1F, h2F⟩\n[GOAL]\ncase intro.intro\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\ninst✝ : LocallyCompactSpace G\nK : Set G\nhK : IsCompact K\nF : Set G\nh1F : IsCompact F\nh2F : K ⊆ interior F\n⊢ ↑(Content.outerMeasure μ) K < ⊤\n[PROOFSTEP]\ncalc\n  μ.outerMeasure K ≤ μ.outerMeasure (interior F) := OuterMeasure.mono' _ h2F\n  _ ≤ μ ⟨F, h1F⟩ := by apply μ.outerMeasure_le ⟨interior F, isOpen_interior⟩ ⟨F, h1F⟩ interior_subset\n  _ < ⊤ := μ.lt_top _\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\ninst✝ : LocallyCompactSpace G\nK : Set G\nhK : IsCompact K\nF : Set G\nh1F : IsCompact F\nh2F : K ⊆ interior F\n⊢ ↑(Content.outerMeasure μ) (interior F) ≤ (fun s => ↑(toFun μ s)) { carrier := F, isCompact' := h1F }\n[PROOFSTEP]\napply μ.outerMeasure_le ⟨interior F, isOpen_interior⟩ ⟨F, h1F⟩ interior_subset\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\ng : G\nA : Set G\n⊢ ↑(Content.outerMeasure μ) ((fun x => g * x) ⁻¹' A) = ↑(Content.outerMeasure μ) A\n[PROOFSTEP]\nconvert μ.outerMeasure_preimage (Homeomorph.mulLeft g) (fun K => h g) A\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nA : Set G\n⊢ MeasurableSet A ↔\n    ∀ (U : Opens G),\n      ↑(Content.outerMeasure μ) (↑U ∩ A) + ↑(Content.outerMeasure μ) (↑U \\ A) ≤ ↑(Content.outerMeasure μ) ↑U\n[PROOFSTEP]\nrw [Opens.forall]\n[GOAL]\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nA : Set G\n⊢ MeasurableSet A ↔\n    ∀ (U : Set G) (hU : IsOpen U),\n      ↑(Content.outerMeasure μ) (↑{ carrier := U, is_open' := hU } ∩ A) +\n          ↑(Content.outerMeasure μ) (↑{ carrier := U, is_open' := hU } \\ A) ≤\n        ↑(Content.outerMeasure μ) ↑{ carrier := U, is_open' := hU }\n[PROOFSTEP]\napply inducedOuterMeasure_caratheodory\n[GOAL]\ncase msU\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nA : Set G\n⊢ ∀ ⦃f : ℕ → Set G⦄ (hm : ∀ (i : ℕ), IsOpen (f i)),\n    innerContent μ { carrier := ⋃ (i : ℕ), f i, is_open' := (_ : ?P (⋃ (i : ℕ), f i)) } ≤\n      ∑' (i : ℕ), innerContent μ { carrier := f i, is_open' := (_ : IsOpen (f i)) }\ncase m_mono\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nA : Set G\n⊢ ∀ ⦃s₁ s₂ : Set G⦄ (hs₁ : IsOpen s₁) (hs₂ : IsOpen s₂),\n    s₁ ⊆ s₂ → innerContent μ { carrier := s₁, is_open' := hs₁ } ≤ innerContent μ { carrier := s₂, is_open' := hs₂ }\ncase PU\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nA : Set G\n⊢ ∀ ⦃f : ℕ → Set G⦄, (∀ (i : ℕ), IsOpen (f i)) → IsOpen (⋃ (i : ℕ), f i)\n[PROOFSTEP]\napply innerContent_iUnion_nat\n[GOAL]\ncase m_mono\nG : Type w\ninst✝¹ : TopologicalSpace G\nμ : Content G\ninst✝ : T2Space G\nA : Set G\n⊢ ∀ ⦃s₁ s₂ : Set G⦄ (hs₁ : IsOpen s₁) (hs₂ : IsOpen s₂),\n    s₁ ⊆ s₂ → innerContent μ { carrier := s₁, is_open' := hs₁ } ≤ innerContent μ { carrier := s₂, is_open' := hs₂ }\n[PROOFSTEP]\napply innerContent_mono'\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Set G\nh1U : IsOpen U\nh2U : Set.Nonempty U\n⊢ 0 < ↑(Content.outerMeasure μ) U\n[PROOFSTEP]\nconvert μ.innerContent_pos_of_is_mul_left_invariant h3 K hK ⟨U, h1U⟩ h2U\n[GOAL]\ncase h.e'_4\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\ninst✝¹ : Group G\ninst✝ : TopologicalGroup G\nh3 :\n  ∀ (g : G) {K : Compacts G},\n    (fun s => ↑(toFun μ s)) (Compacts.map (fun b => g * b) (_ : Continuous fun b => g * b) K) =\n      (fun s => ↑(toFun μ s)) K\nK : Compacts G\nhK : (fun s => ↑(toFun μ s)) K ≠ 0\nU : Set G\nh1U : IsOpen U\nh2U : Set.Nonempty U\n⊢ ↑(Content.outerMeasure μ) U = innerContent μ { carrier := U, is_open' := h1U }\n[PROOFSTEP]\nexact μ.outerMeasure_opens ⟨U, h1U⟩\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\n⊢ S ≤ OuterMeasure.caratheodory (Content.outerMeasure μ)\n[PROOFSTEP]\nrw [@BorelSpace.measurable_eq G _ _]\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\n⊢ borel G ≤ OuterMeasure.caratheodory (Content.outerMeasure μ)\n[PROOFSTEP]\nrefine' MeasurableSpace.generateFrom_le _\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\n⊢ ∀ (t : Set G), t ∈ {s | IsOpen s} → MeasurableSet t\n[PROOFSTEP]\nintro U hU\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\n⊢ MeasurableSet U\n[PROOFSTEP]\nrw [μ.outerMeasure_caratheodory]\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\n⊢ ∀ (U_1 : Opens G),\n    ↑(Content.outerMeasure μ) (↑U_1 ∩ U) + ↑(Content.outerMeasure μ) (↑U_1 \\ U) ≤ ↑(Content.outerMeasure μ) ↑U_1\n[PROOFSTEP]\nintro U'\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\n⊢ ↑(Content.outerMeasure μ) (↑U' ∩ U) + ↑(Content.outerMeasure μ) (↑U' \\ U) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nrw [μ.outerMeasure_of_isOpen ((U' : Set G) ∩ U) (U'.isOpen.inter hU)]\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\n⊢ innerContent μ { carrier := ↑U' ∩ U, is_open' := (_ : IsOpen (↑U' ∩ U)) } + ↑(Content.outerMeasure μ) (↑U' \\ U) ≤\n    ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nsimp only [innerContent, iSup_subtype']\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\n⊢ (⨆ (x : { i // ↑i ⊆ ↑{ carrier := ↑U' ∩ U, is_open' := (_ : IsOpen (↑U' ∩ U)) } }), ↑(toFun μ ↑x)) +\n      ↑(Content.outerMeasure μ) (↑U' \\ U) ≤\n    ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nrw [Opens.coe_mk]\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\n⊢ (⨆ (x : { i // ↑i ⊆ ↑U' ∩ U }), ↑(toFun μ ↑x)) + ↑(Content.outerMeasure μ) (↑U' \\ U) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nhaveI : Nonempty { L : Compacts G // (L : Set G) ⊆ U' ∩ U } := ⟨⟨⊥, empty_subset _⟩⟩\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\n⊢ (⨆ (x : { i // ↑i ⊆ ↑U' ∩ U }), ↑(toFun μ ↑x)) + ↑(Content.outerMeasure μ) (↑U' \\ U) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nrw [ENNReal.iSup_add]\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\n⊢ ⨆ (b : { i // ↑i ⊆ ↑U' ∩ U }), ↑(toFun μ ↑b) + ↑(Content.outerMeasure μ) (↑U' \\ U) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nrefine' iSup_le _\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\n⊢ ∀ (i : { i // ↑i ⊆ ↑U' ∩ U }), ↑(toFun μ ↑i) + ↑(Content.outerMeasure μ) (↑U' \\ U) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nrintro ⟨L, hL⟩\n[GOAL]\ncase mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL : ↑L ⊆ ↑U' ∩ U\n⊢ ↑(toFun μ ↑{ val := L, property := hL }) + ↑(Content.outerMeasure μ) (↑U' \\ U) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nsimp only [subset_inter_iff] at hL \n[GOAL]\ncase mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\n⊢ ↑(toFun μ ↑{ val := L, property := hL✝ }) + ↑(Content.outerMeasure μ) (↑U' \\ U) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nhave : ↑U' \\ U ⊆ U' \\ L := diff_subset_diff_right hL.2\n[GOAL]\ncase mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis : ↑U' \\ U ⊆ ↑U' \\ ↑L\n⊢ ↑(toFun μ ↑{ val := L, property := hL✝ }) + ↑(Content.outerMeasure μ) (↑U' \\ U) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nrefine' le_trans (add_le_add_left (μ.outerMeasure.mono' this) _) _\n[GOAL]\ncase mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis : ↑U' \\ U ⊆ ↑U' \\ ↑L\n⊢ ↑(toFun μ ↑{ val := L, property := hL✝ }) + ↑(Content.outerMeasure μ) (↑U' \\ ↑L) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nrw [μ.outerMeasure_of_isOpen (↑U' \\ L) (IsOpen.sdiff U'.2 L.2.isClosed)]\n[GOAL]\ncase mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis : ↑U' \\ U ⊆ ↑U' \\ ↑L\n⊢ ↑(toFun μ ↑{ val := L, property := hL✝ }) +\n      innerContent μ { carrier := ↑U' \\ ↑L, is_open' := (_ : IsOpen (↑U' \\ ↑L)) } ≤\n    ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nsimp only [innerContent, iSup_subtype']\n[GOAL]\ncase mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis : ↑U' \\ U ⊆ ↑U' \\ ↑L\n⊢ ↑(toFun μ L) + ⨆ (x : { i // ↑i ⊆ ↑{ carrier := ↑U' \\ ↑L, is_open' := (_ : IsOpen (↑U' \\ ↑L)) } }), ↑(toFun μ ↑x) ≤\n    ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nrw [Opens.coe_mk]\n[GOAL]\ncase mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis : ↑U' \\ U ⊆ ↑U' \\ ↑L\n⊢ ↑(toFun μ L) + ⨆ (x : { i // ↑i ⊆ ↑U' \\ ↑L }), ↑(toFun μ ↑x) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nhaveI : Nonempty { M : Compacts G // (M : Set G) ⊆ ↑U' \\ L } := ⟨⟨⊥, empty_subset _⟩⟩\n[GOAL]\ncase mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝¹ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis✝ : ↑U' \\ U ⊆ ↑U' \\ ↑L\nthis : Nonempty { M // ↑M ⊆ ↑U' \\ ↑L }\n⊢ ↑(toFun μ L) + ⨆ (x : { i // ↑i ⊆ ↑U' \\ ↑L }), ↑(toFun μ ↑x) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nrw [ENNReal.add_iSup]\n[GOAL]\ncase mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝¹ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis✝ : ↑U' \\ U ⊆ ↑U' \\ ↑L\nthis : Nonempty { M // ↑M ⊆ ↑U' \\ ↑L }\n⊢ ⨆ (b : { i // ↑i ⊆ ↑U' \\ ↑L }), ↑(toFun μ L) + ↑(toFun μ ↑b) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nrefine' iSup_le _\n[GOAL]\ncase mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝¹ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis✝ : ↑U' \\ U ⊆ ↑U' \\ ↑L\nthis : Nonempty { M // ↑M ⊆ ↑U' \\ ↑L }\n⊢ ∀ (i : { i // ↑i ⊆ ↑U' \\ ↑L }), ↑(toFun μ L) + ↑(toFun μ ↑i) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nrintro ⟨M, hM⟩\n[GOAL]\ncase mk.mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝¹ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis✝ : ↑U' \\ U ⊆ ↑U' \\ ↑L\nthis : Nonempty { M // ↑M ⊆ ↑U' \\ ↑L }\nM : Compacts G\nhM : ↑M ⊆ ↑U' \\ ↑L\n⊢ ↑(toFun μ L) + ↑(toFun μ ↑{ val := M, property := hM }) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nsimp only [subset_diff] at hM \n[GOAL]\ncase mk.mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝¹ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis✝ : ↑U' \\ U ⊆ ↑U' \\ ↑L\nthis : Nonempty { M // ↑M ⊆ ↑U' \\ ↑L }\nM : Compacts G\nhM✝ : ↑M ⊆ ↑U' \\ ↑L\nhM : ↑M ⊆ ↑U' ∧ Disjoint ↑M ↑L\n⊢ ↑(toFun μ L) + ↑(toFun μ ↑{ val := M, property := hM✝ }) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nhave : (↑(L ⊔ M) : Set G) ⊆ U' := by simp only [union_subset_iff, Compacts.coe_sup, hM, hL, and_self_iff]\n[GOAL]\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝¹ : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis✝ : ↑U' \\ U ⊆ ↑U' \\ ↑L\nthis : Nonempty { M // ↑M ⊆ ↑U' \\ ↑L }\nM : Compacts G\nhM✝ : ↑M ⊆ ↑U' \\ ↑L\nhM : ↑M ⊆ ↑U' ∧ Disjoint ↑M ↑L\n⊢ ↑(L ⊔ M) ⊆ ↑U'\n[PROOFSTEP]\nsimp only [union_subset_iff, Compacts.coe_sup, hM, hL, and_self_iff]\n[GOAL]\ncase mk.mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝² : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis✝¹ : ↑U' \\ U ⊆ ↑U' \\ ↑L\nthis✝ : Nonempty { M // ↑M ⊆ ↑U' \\ ↑L }\nM : Compacts G\nhM✝ : ↑M ⊆ ↑U' \\ ↑L\nhM : ↑M ⊆ ↑U' ∧ Disjoint ↑M ↑L\nthis : ↑(L ⊔ M) ⊆ ↑U'\n⊢ ↑(toFun μ L) + ↑(toFun μ ↑{ val := M, property := hM✝ }) ≤ ↑(Content.outerMeasure μ) ↑U'\n[PROOFSTEP]\nrw [μ.outerMeasure_of_isOpen (↑U') U'.2]\n[GOAL]\ncase mk.mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝² : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis✝¹ : ↑U' \\ U ⊆ ↑U' \\ ↑L\nthis✝ : Nonempty { M // ↑M ⊆ ↑U' \\ ↑L }\nM : Compacts G\nhM✝ : ↑M ⊆ ↑U' \\ ↑L\nhM : ↑M ⊆ ↑U' ∧ Disjoint ↑M ↑L\nthis : ↑(L ⊔ M) ⊆ ↑U'\n⊢ ↑(toFun μ L) + ↑(toFun μ ↑{ val := M, property := hM✝ }) ≤\n    innerContent μ { carrier := ↑U', is_open' := (_ : IsOpen U'.carrier) }\n[PROOFSTEP]\nrefine' le_trans (ge_of_eq _) (μ.le_innerContent _ _ this)\n[GOAL]\ncase mk.mk\nG : Type w\ninst✝² : TopologicalSpace G\nμ : Content G\ninst✝¹ : T2Space G\nS : MeasurableSpace G\ninst✝ : BorelSpace G\nU : Set G\nhU : U ∈ {s | IsOpen s}\nU' : Opens G\nthis✝² : Nonempty { L // ↑L ⊆ ↑U' ∩ U }\nL : Compacts G\nhL✝ : ↑L ⊆ ↑U' ∩ U\nhL : ↑L ⊆ ↑U' ∧ ↑L ⊆ U\nthis✝¹ : ↑U' \\ U ⊆ ↑U' \\ ↑L\nthis✝ : Nonempty { M // ↑M ⊆ ↑U' \\ ↑L }\nM : Compacts G\nhM✝ : ↑M ⊆ ↑U' \\ ↑L\nhM : ↑M ⊆ ↑U' ∧ Disjoint ↑M ↑L\nthis : ↑(L ⊔ M) ⊆ ↑U'\n⊢ (fun s => ↑(toFun μ s)) (L ⊔ M) = ↑(toFun μ L) + ↑(toFun μ ↑{ val := M, property := hM✝ })\n[PROOFSTEP]\nexact μ.sup_disjoint _ _ hM.2.symm\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\n⊢ Measure.Regular (Content.measure μ)\n[PROOFSTEP]\nhave : μ.measure.OuterRegular := by\n  refine' ⟨fun A hA r (hr : _ < _) => _⟩\n  rw [μ.measure_apply hA, outerMeasure_eq_iInf] at hr \n  simp only [iInf_lt_iff] at hr \n  rcases hr with ⟨U, hUo, hAU, hr⟩\n  rw [← μ.outerMeasure_of_isOpen U hUo, ← μ.measure_apply hUo.measurableSet] at hr \n  exact ⟨U, hAU, hUo, hr⟩\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\n⊢ Measure.OuterRegular (Content.measure μ)\n[PROOFSTEP]\nrefine' ⟨fun A hA r (hr : _ < _) => _⟩\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nA : Set G\nhA : MeasurableSet A\nr : ℝ≥0∞\nhr : ↑↑(Content.measure μ) A < r\n⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑(Content.measure μ) U < r\n[PROOFSTEP]\nrw [μ.measure_apply hA, outerMeasure_eq_iInf] at hr \n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nA : Set G\nhA : MeasurableSet A\nr : ℝ≥0∞\nhr : ⨅ (U : Set G) (hU : IsOpen U) (_ : A ⊆ U), innerContent μ { carrier := U, is_open' := hU } < r\n⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑(Content.measure μ) U < r\n[PROOFSTEP]\nsimp only [iInf_lt_iff] at hr \n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nA : Set G\nhA : MeasurableSet A\nr : ℝ≥0∞\nhr : ∃ i h i_1, innerContent μ { carrier := i, is_open' := (_ : IsOpen i) } < r\n⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑(Content.measure μ) U < r\n[PROOFSTEP]\nrcases hr with ⟨U, hUo, hAU, hr⟩\n[GOAL]\ncase intro.intro.intro\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nA : Set G\nhA : MeasurableSet A\nr : ℝ≥0∞\nU : Set G\nhUo : IsOpen U\nhAU : A ⊆ U\nhr : innerContent μ { carrier := U, is_open' := (_ : IsOpen U) } < r\n⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑(Content.measure μ) U < r\n[PROOFSTEP]\nrw [← μ.outerMeasure_of_isOpen U hUo, ← μ.measure_apply hUo.measurableSet] at hr \n[GOAL]\ncase intro.intro.intro\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nA : Set G\nhA : MeasurableSet A\nr : ℝ≥0∞\nU : Set G\nhUo : IsOpen U\nhAU : A ⊆ U\nhr : ↑↑(Content.measure μ) U < r\n⊢ ∃ U, U ⊇ A ∧ IsOpen U ∧ ↑↑(Content.measure μ) U < r\n[PROOFSTEP]\nexact ⟨U, hAU, hUo, hr⟩\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nthis : Measure.OuterRegular (Content.measure μ)\n⊢ Measure.Regular (Content.measure μ)\n[PROOFSTEP]\nhave : IsFiniteMeasureOnCompacts μ.measure := by\n  refine' ⟨fun K hK => _⟩\n  rw [measure_apply _ hK.measurableSet]\n  exact μ.outerMeasure_lt_top_of_isCompact hK\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nthis : Measure.OuterRegular (Content.measure μ)\n⊢ IsFiniteMeasureOnCompacts (Content.measure μ)\n[PROOFSTEP]\nrefine' ⟨fun K hK => _⟩\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nthis : Measure.OuterRegular (Content.measure μ)\nK : Set G\nhK : IsCompact K\n⊢ ↑↑(Content.measure μ) K < ⊤\n[PROOFSTEP]\nrw [measure_apply _ hK.measurableSet]\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nthis : Measure.OuterRegular (Content.measure μ)\nK : Set G\nhK : IsCompact K\n⊢ ↑(Content.outerMeasure μ) K < ⊤\n[PROOFSTEP]\nexact μ.outerMeasure_lt_top_of_isCompact hK\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nthis✝ : Measure.OuterRegular (Content.measure μ)\nthis : IsFiniteMeasureOnCompacts (Content.measure μ)\n⊢ Measure.Regular (Content.measure μ)\n[PROOFSTEP]\nrefine' ⟨fun U hU r hr => _⟩\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nthis✝ : Measure.OuterRegular (Content.measure μ)\nthis : IsFiniteMeasureOnCompacts (Content.measure μ)\nU : Set G\nhU : IsOpen U\nr : ℝ≥0∞\nhr : r < ↑↑(Content.measure μ) U\n⊢ ∃ K, K ⊆ U ∧ IsCompact K ∧ r < ↑↑(Content.measure μ) K\n[PROOFSTEP]\nrw [measure_apply _ hU.measurableSet, μ.outerMeasure_of_isOpen U hU] at hr \n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nthis✝ : Measure.OuterRegular (Content.measure μ)\nthis : IsFiniteMeasureOnCompacts (Content.measure μ)\nU : Set G\nhU : IsOpen U\nr : ℝ≥0∞\nhr : r < innerContent μ { carrier := U, is_open' := hU }\n⊢ ∃ K, K ⊆ U ∧ IsCompact K ∧ r < ↑↑(Content.measure μ) K\n[PROOFSTEP]\nsimp only [innerContent, lt_iSup_iff] at hr \n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nthis✝ : Measure.OuterRegular (Content.measure μ)\nthis : IsFiniteMeasureOnCompacts (Content.measure μ)\nU : Set G\nhU : IsOpen U\nr : ℝ≥0∞\nhr : ∃ i i_1, r < ↑(toFun μ i)\n⊢ ∃ K, K ⊆ U ∧ IsCompact K ∧ r < ↑↑(Content.measure μ) K\n[PROOFSTEP]\nrcases hr with ⟨K, hKU, hr⟩\n[GOAL]\ncase intro.intro\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nthis✝ : Measure.OuterRegular (Content.measure μ)\nthis : IsFiniteMeasureOnCompacts (Content.measure μ)\nU : Set G\nhU : IsOpen U\nr : ℝ≥0∞\nK : Compacts G\nhKU : ↑K ⊆ ↑{ carrier := U, is_open' := hU }\nhr : r < ↑(toFun μ K)\n⊢ ∃ K, K ⊆ U ∧ IsCompact K ∧ r < ↑↑(Content.measure μ) K\n[PROOFSTEP]\nrefine' ⟨K, hKU, K.2, hr.trans_le _⟩\n[GOAL]\ncase intro.intro\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : T2Space G\nS : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : LocallyCompactSpace G\nthis✝ : Measure.OuterRegular (Content.measure μ)\nthis : IsFiniteMeasureOnCompacts (Content.measure μ)\nU : Set G\nhU : IsOpen U\nr : ℝ≥0∞\nK : Compacts G\nhKU : ↑K ⊆ ↑{ carrier := U, is_open' := hU }\nhr : r < ↑(toFun μ K)\n⊢ ↑(toFun μ K) ≤ ↑↑(Content.measure μ) ↑K\n[PROOFSTEP]\nexact (μ.le_outerMeasure_compacts K).trans (le_toMeasure_apply _ _ _)\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nH : ContentRegular μ\nK : Compacts G\nε : ℝ≥0\nhε : ε ≠ 0\n⊢ ∃ K', K.carrier ⊆ interior K'.carrier ∧ (fun s => ↑(toFun μ s)) K' ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n[PROOFSTEP]\nby_contra hc\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nH : ContentRegular μ\nK : Compacts G\nε : ℝ≥0\nhε : ε ≠ 0\nhc : ¬∃ K', K.carrier ⊆ interior K'.carrier ∧ (fun s => ↑(toFun μ s)) K' ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n⊢ False\n[PROOFSTEP]\nsimp only [not_exists, not_and, not_le] at hc \n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nH : ContentRegular μ\nK : Compacts G\nε : ℝ≥0\nhε : ε ≠ 0\nhc : ∀ (x : Compacts G), K.carrier ⊆ interior x.carrier → ↑(toFun μ K) + ↑ε < ↑(toFun μ x)\n⊢ False\n[PROOFSTEP]\nhave lower_bound_iInf :\n  μ K + ε ≤ ⨅ (K' : TopologicalSpace.Compacts G) (_ : (K : Set G) ⊆ interior (K' : Set G)), μ K' :=\n  le_iInf fun K' => le_iInf fun K'_hyp => le_of_lt (hc K' K'_hyp)\n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nH : ContentRegular μ\nK : Compacts G\nε : ℝ≥0\nhε : ε ≠ 0\nhc : ∀ (x : Compacts G), K.carrier ⊆ interior x.carrier → ↑(toFun μ K) + ↑ε < ↑(toFun μ x)\nlower_bound_iInf :\n  (fun s => ↑(toFun μ s)) K + ↑ε ≤ ⨅ (K' : Compacts G) (_ : ↑K ⊆ interior ↑K'), (fun s => ↑(toFun μ s)) K'\n⊢ False\n[PROOFSTEP]\nrw [← H] at lower_bound_iInf \n[GOAL]\nG : Type w\ninst✝ : TopologicalSpace G\nμ : Content G\nH : ContentRegular μ\nK : Compacts G\nε : ℝ≥0\nhε : ε ≠ 0\nhc : ∀ (x : Compacts G), K.carrier ⊆ interior x.carrier → ↑(toFun μ K) + ↑ε < ↑(toFun μ x)\nlower_bound_iInf : (fun s => ↑(toFun μ s)) K + ↑ε ≤ (fun s => ↑(toFun μ s)) K\n⊢ False\n[PROOFSTEP]\nexact\n  (lt_self_iff_false (μ K)).mp\n    (lt_of_le_of_lt' lower_bound_iInf (ENNReal.lt_add_right (ne_top_of_lt (μ.lt_top K)) (ENNReal.coe_ne_zero.mpr hε)))\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : MeasurableSpace G\ninst✝¹ : T2Space G\ninst✝ : BorelSpace G\nH : ContentRegular μ\nK : Compacts G\n⊢ ↑↑(Content.measure μ) ↑K = (fun s => ↑(toFun μ s)) K\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : MeasurableSpace G\ninst✝¹ : T2Space G\ninst✝ : BorelSpace G\nH : ContentRegular μ\nK : Compacts G\n⊢ ↑↑(Content.measure μ) ↑K ≤ (fun s => ↑(toFun μ s)) K\n[PROOFSTEP]\napply ENNReal.le_of_forall_pos_le_add\n[GOAL]\ncase refine'_1.h\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : MeasurableSpace G\ninst✝¹ : T2Space G\ninst✝ : BorelSpace G\nH : ContentRegular μ\nK : Compacts G\n⊢ ∀ (ε : ℝ≥0), 0 < ε → (fun s => ↑(toFun μ s)) K < ⊤ → ↑↑(Content.measure μ) ↑K ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n[PROOFSTEP]\nintro ε εpos _\n[GOAL]\ncase refine'_1.h\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : MeasurableSpace G\ninst✝¹ : T2Space G\ninst✝ : BorelSpace G\nH : ContentRegular μ\nK : Compacts G\nε : ℝ≥0\nεpos : 0 < ε\na✝ : (fun s => ↑(toFun μ s)) K < ⊤\n⊢ ↑↑(Content.measure μ) ↑K ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n[PROOFSTEP]\nobtain ⟨K', K'_hyp⟩ := contentRegular_exists_compact μ H K (ne_bot_of_gt εpos)\n[GOAL]\ncase refine'_1.h.intro\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : MeasurableSpace G\ninst✝¹ : T2Space G\ninst✝ : BorelSpace G\nH : ContentRegular μ\nK : Compacts G\nε : ℝ≥0\nεpos : 0 < ε\na✝ : (fun s => ↑(toFun μ s)) K < ⊤\nK' : Compacts G\nK'_hyp : K.carrier ⊆ interior K'.carrier ∧ (fun s => ↑(toFun μ s)) K' ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n⊢ ↑↑(Content.measure μ) ↑K ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n[PROOFSTEP]\ncalc\n  μ.measure ↑K ≤ μ.measure (interior ↑K') :=\n    by\n    rw [μ.measure_apply isOpen_interior.measurableSet, μ.measure_apply K.isCompact.measurableSet]\n    exact μ.outerMeasure.mono K'_hyp.left\n  _ ≤ μ K' := by\n    rw [μ.measure_apply (IsOpen.measurableSet isOpen_interior)]\n    exact μ.outerMeasure_interior_compacts K'\n  _ ≤ μ K + ε := K'_hyp.right\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : MeasurableSpace G\ninst✝¹ : T2Space G\ninst✝ : BorelSpace G\nH : ContentRegular μ\nK : Compacts G\nε : ℝ≥0\nεpos : 0 < ε\na✝ : (fun s => ↑(toFun μ s)) K < ⊤\nK' : Compacts G\nK'_hyp : K.carrier ⊆ interior K'.carrier ∧ (fun s => ↑(toFun μ s)) K' ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n⊢ ↑↑(Content.measure μ) ↑K ≤ ↑↑(Content.measure μ) (interior ↑K')\n[PROOFSTEP]\nrw [μ.measure_apply isOpen_interior.measurableSet, μ.measure_apply K.isCompact.measurableSet]\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : MeasurableSpace G\ninst✝¹ : T2Space G\ninst✝ : BorelSpace G\nH : ContentRegular μ\nK : Compacts G\nε : ℝ≥0\nεpos : 0 < ε\na✝ : (fun s => ↑(toFun μ s)) K < ⊤\nK' : Compacts G\nK'_hyp : K.carrier ⊆ interior K'.carrier ∧ (fun s => ↑(toFun μ s)) K' ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n⊢ ↑(Content.outerMeasure μ) ↑K ≤ ↑(Content.outerMeasure μ) (interior ↑K')\n[PROOFSTEP]\nexact μ.outerMeasure.mono K'_hyp.left\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : MeasurableSpace G\ninst✝¹ : T2Space G\ninst✝ : BorelSpace G\nH : ContentRegular μ\nK : Compacts G\nε : ℝ≥0\nεpos : 0 < ε\na✝ : (fun s => ↑(toFun μ s)) K < ⊤\nK' : Compacts G\nK'_hyp : K.carrier ⊆ interior K'.carrier ∧ (fun s => ↑(toFun μ s)) K' ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n⊢ ↑↑(Content.measure μ) (interior ↑K') ≤ (fun s => ↑(toFun μ s)) K'\n[PROOFSTEP]\nrw [μ.measure_apply (IsOpen.measurableSet isOpen_interior)]\n[GOAL]\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : MeasurableSpace G\ninst✝¹ : T2Space G\ninst✝ : BorelSpace G\nH : ContentRegular μ\nK : Compacts G\nε : ℝ≥0\nεpos : 0 < ε\na✝ : (fun s => ↑(toFun μ s)) K < ⊤\nK' : Compacts G\nK'_hyp : K.carrier ⊆ interior K'.carrier ∧ (fun s => ↑(toFun μ s)) K' ≤ (fun s => ↑(toFun μ s)) K + ↑ε\n⊢ ↑(Content.outerMeasure μ) (interior ↑K') ≤ (fun s => ↑(toFun μ s)) K'\n[PROOFSTEP]\nexact μ.outerMeasure_interior_compacts K'\n[GOAL]\ncase refine'_2\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : MeasurableSpace G\ninst✝¹ : T2Space G\ninst✝ : BorelSpace G\nH : ContentRegular μ\nK : Compacts G\n⊢ (fun s => ↑(toFun μ s)) K ≤ ↑↑(Content.measure μ) ↑K\n[PROOFSTEP]\nrw [μ.measure_apply (IsCompact.measurableSet K.isCompact)]\n[GOAL]\ncase refine'_2\nG : Type w\ninst✝³ : TopologicalSpace G\nμ : Content G\ninst✝² : MeasurableSpace G\ninst✝¹ : T2Space G\ninst✝ : BorelSpace G\nH : ContentRegular μ\nK : Compacts G\n⊢ (fun s => ↑(toFun μ s)) K ≤ ↑(Content.outerMeasure μ) ↑K\n[PROOFSTEP]\nexact μ.le_outerMeasure_compacts K\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.Content", "llama_tokens": 32180, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.665410558746814, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.35864512603294924}}
{"text": "[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf✝ f : R[X]\n⊢ support (eraseLead f) = Finset.erase (support f) (natDegree f)\n[PROOFSTEP]\nsimp only [eraseLead, support_erase]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\ni : ℕ\n⊢ coeff (eraseLead f) i = if i = natDegree f then 0 else coeff f i\n[PROOFSTEP]\nsimp only [eraseLead, coeff_erase]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\n⊢ coeff (eraseLead f) (natDegree f) = 0\n[PROOFSTEP]\nsimp [eraseLead_coeff]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\ni : ℕ\nhi : i ≠ natDegree f\n⊢ coeff (eraseLead f) i = coeff f i\n[PROOFSTEP]\nsimp [eraseLead_coeff, hi]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\n⊢ eraseLead 0 = 0\n[PROOFSTEP]\nsimp only [eraseLead, erase_zero]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf✝ f : R[X]\n⊢ eraseLead f + ↑C (leadingCoeff f) * X ^ natDegree f = f\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial, eraseLead_add_monomial_natDegree_leadingCoeff]\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nf✝ : R✝[X]\nR : Type u_2\ninst✝ : Ring R\nf : R[X]\n⊢ f - ↑C (leadingCoeff f) * X ^ natDegree f = eraseLead f\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial, self_sub_monomial_natDegree_leadingCoeff]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nf0 : 2 ≤ card (support f)\n⊢ eraseLead f ≠ 0\n[PROOFSTEP]\nrw [Ne, ← card_support_eq_zero, eraseLead_support]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nf0 : 2 ≤ card (support f)\n⊢ ¬card (Finset.erase (support f) (natDegree f)) = 0\n[PROOFSTEP]\nexact (zero_lt_one.trans_le <| (tsub_le_tsub_right f0 1).trans Finset.pred_card_le_card_erase).ne.symm\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\na : ℕ\nh : a ∈ support (eraseLead f)\n⊢ a < natDegree f\n[PROOFSTEP]\nrw [eraseLead_support, mem_erase] at h \n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\na : ℕ\nh : a ≠ natDegree f ∧ a ∈ support f\n⊢ a < natDegree f\n[PROOFSTEP]\nexact (le_natDegree_of_mem_supp a h.2).lt_of_ne h.1\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nh : f ≠ 0\n⊢ card (support (eraseLead f)) < card (support f)\n[PROOFSTEP]\nrw [eraseLead_support]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nh : f ≠ 0\n⊢ card (Finset.erase (support f) (natDegree f)) < card (support f)\n[PROOFSTEP]\nexact card_lt_card (erase_ssubset <| natDegree_mem_support_of_nonzero h)\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nc : ℕ\nfc : card (support f) = c\n⊢ card (support (eraseLead f)) = c - 1\n[PROOFSTEP]\nby_cases f0 : f = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nc : ℕ\nfc : card (support f) = c\nf0 : f = 0\n⊢ card (support (eraseLead f)) = c - 1\n[PROOFSTEP]\nrw [← fc, f0, eraseLead_zero, support_zero, card_empty]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nc : ℕ\nfc : card (support f) = c\nf0 : ¬f = 0\n⊢ card (support (eraseLead f)) = c - 1\n[PROOFSTEP]\nrw [eraseLead_support, card_erase_of_mem (natDegree_mem_support_of_nonzero f0), fc]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\ni : ℕ\nr : R\n⊢ eraseLead (↑(monomial i) r) = 0\n[PROOFSTEP]\nby_cases hr : r = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\ni : ℕ\nr : R\nhr : r = 0\n⊢ eraseLead (↑(monomial i) r) = 0\n[PROOFSTEP]\nsubst r\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\ni : ℕ\n⊢ eraseLead (↑(monomial i) 0) = 0\n[PROOFSTEP]\nsimp only [monomial_zero_right, eraseLead_zero]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\ni : ℕ\nr : R\nhr : ¬r = 0\n⊢ eraseLead (↑(monomial i) r) = 0\n[PROOFSTEP]\nrw [eraseLead, natDegree_monomial, if_neg hr, erase_monomial]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\n⊢ eraseLead (X ^ n) = 0\n[PROOFSTEP]\nrw [X_pow_eq_monomial, eraseLead_monomial]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nr : R\nn : ℕ\n⊢ eraseLead (↑C r * X ^ n) = 0\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial, eraseLead_monomial]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree q < natDegree p\n⊢ eraseLead (p + q) = eraseLead p + q\n[PROOFSTEP]\next n\n[GOAL]\ncase a\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree q < natDegree p\nn : ℕ\n⊢ coeff (eraseLead (p + q)) n = coeff (eraseLead p + q) n\n[PROOFSTEP]\nby_cases nd : n = p.natDegree\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree q < natDegree p\nn : ℕ\nnd : n = natDegree p\n⊢ coeff (eraseLead (p + q)) n = coeff (eraseLead p + q) n\n[PROOFSTEP]\nrw [nd, eraseLead_coeff, if_pos (natDegree_add_eq_left_of_natDegree_lt pq).symm]\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree q < natDegree p\nn : ℕ\nnd : n = natDegree p\n⊢ 0 = coeff (eraseLead p + q) (natDegree p)\n[PROOFSTEP]\nsimpa using (coeff_eq_zero_of_natDegree_lt pq).symm\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree q < natDegree p\nn : ℕ\nnd : ¬n = natDegree p\n⊢ coeff (eraseLead (p + q)) n = coeff (eraseLead p + q) n\n[PROOFSTEP]\nrw [eraseLead_coeff, coeff_add, coeff_add, eraseLead_coeff, if_neg, if_neg nd]\n[GOAL]\ncase neg.hnc\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree q < natDegree p\nn : ℕ\nnd : ¬n = natDegree p\n⊢ ¬n = natDegree (p + q)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase neg.hnc\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree q < natDegree p\nnd : ¬natDegree (p + q) = natDegree p\n⊢ False\n[PROOFSTEP]\nexact nd (natDegree_add_eq_left_of_natDegree_lt pq)\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree p < natDegree q\n⊢ eraseLead (p + q) = p + eraseLead q\n[PROOFSTEP]\next n\n[GOAL]\ncase a\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree p < natDegree q\nn : ℕ\n⊢ coeff (eraseLead (p + q)) n = coeff (p + eraseLead q) n\n[PROOFSTEP]\nby_cases nd : n = q.natDegree\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree p < natDegree q\nn : ℕ\nnd : n = natDegree q\n⊢ coeff (eraseLead (p + q)) n = coeff (p + eraseLead q) n\n[PROOFSTEP]\nrw [nd, eraseLead_coeff, if_pos (natDegree_add_eq_right_of_natDegree_lt pq).symm]\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree p < natDegree q\nn : ℕ\nnd : n = natDegree q\n⊢ 0 = coeff (p + eraseLead q) (natDegree q)\n[PROOFSTEP]\nsimpa using (coeff_eq_zero_of_natDegree_lt pq).symm\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree p < natDegree q\nn : ℕ\nnd : ¬n = natDegree q\n⊢ coeff (eraseLead (p + q)) n = coeff (p + eraseLead q) n\n[PROOFSTEP]\nrw [eraseLead_coeff, coeff_add, coeff_add, eraseLead_coeff, if_neg, if_neg nd]\n[GOAL]\ncase neg.hnc\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree p < natDegree q\nn : ℕ\nnd : ¬n = natDegree q\n⊢ ¬n = natDegree (p + q)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase neg.hnc\nR : Type u_1\ninst✝ : Semiring R\nf p q : R[X]\npq : natDegree p < natDegree q\nnd : ¬natDegree (p + q) = natDegree q\n⊢ False\n[PROOFSTEP]\nexact nd (natDegree_add_eq_right_of_natDegree_lt pq)\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf✝ f : R[X]\n⊢ natDegree (eraseLead f) < natDegree f ∨ eraseLead f = 0\n[PROOFSTEP]\nby_cases h : f.support.card ≤ 1\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : Semiring R\nf✝ f : R[X]\nh : card (support f) ≤ 1\n⊢ natDegree (eraseLead f) < natDegree f ∨ eraseLead f = 0\n[PROOFSTEP]\nright\n[GOAL]\ncase pos.h\nR : Type u_1\ninst✝ : Semiring R\nf✝ f : R[X]\nh : card (support f) ≤ 1\n⊢ eraseLead f = 0\n[PROOFSTEP]\nrw [← C_mul_X_pow_eq_self h]\n[GOAL]\ncase pos.h\nR : Type u_1\ninst✝ : Semiring R\nf✝ f : R[X]\nh : card (support f) ≤ 1\n⊢ eraseLead (↑C (leadingCoeff f) * X ^ natDegree f) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : Semiring R\nf✝ f : R[X]\nh : ¬card (support f) ≤ 1\n⊢ natDegree (eraseLead f) < natDegree f ∨ eraseLead f = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase neg.h\nR : Type u_1\ninst✝ : Semiring R\nf✝ f : R[X]\nh : ¬card (support f) ≤ 1\n⊢ natDegree (eraseLead f) < natDegree f\n[PROOFSTEP]\napply eraseLead_natDegree_lt (lt_of_not_ge h)\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf✝ f : R[X]\n⊢ natDegree (eraseLead f) ≤ natDegree f - 1\n[PROOFSTEP]\nrcases f.eraseLead_natDegree_lt_or_eraseLead_eq_zero with (h | h)\n[GOAL]\ncase inl\nR : Type u_1\ninst✝ : Semiring R\nf✝ f : R[X]\nh : natDegree (eraseLead f) < natDegree f\n⊢ natDegree (eraseLead f) ≤ natDegree f - 1\n[PROOFSTEP]\nexact Nat.le_pred_of_lt h\n[GOAL]\ncase inr\nR : Type u_1\ninst✝ : Semiring R\nf✝ f : R[X]\nh : eraseLead f = 0\n⊢ natDegree (eraseLead f) ≤ natDegree f - 1\n[PROOFSTEP]\nsimp only [h, natDegree_zero, zero_le]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\n⊢ ∀ (f : R[X]), natDegree f ≤ N → P f\n[PROOFSTEP]\nintro f df\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\n⊢ P f\n[PROOFSTEP]\ngeneralize hd : card f.support = c\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nc : ℕ\nhd : card (support f) = c\n⊢ P f\n[PROOFSTEP]\nrevert f\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nc : ℕ\n⊢ ∀ (f : R[X]), natDegree f ≤ N → card (support f) = c → P f\n[PROOFSTEP]\ninduction' c with c hc\n[GOAL]\ncase zero\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\n⊢ ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.zero → P f\n[PROOFSTEP]\nintro f _ f0\n[GOAL]\ncase zero\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf✝ : natDegree f ≤ N\nf0 : card (support f) = Nat.zero\n⊢ P f\n[PROOFSTEP]\nconvert P_0\n[GOAL]\ncase h.e'_1\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf✝ : natDegree f ≤ N\nf0 : card (support f) = Nat.zero\n⊢ f = 0\n[PROOFSTEP]\nsimpa [support_eq_empty, card_eq_zero] using f0\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nc : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = c → P f\n⊢ ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.succ c → P f\n[PROOFSTEP]\nintro f df f0\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nc : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = c → P f\nf : R[X]\ndf : natDegree f ≤ N\nf0 : card (support f) = Nat.succ c\n⊢ P f\n[PROOFSTEP]\nrw [← eraseLead_add_C_mul_X_pow f]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nc : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = c → P f\nf : R[X]\ndf : natDegree f ≤ N\nf0 : card (support f) = Nat.succ c\n⊢ P (eraseLead f + ↑C (leadingCoeff f) * X ^ natDegree f)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase succ.zero\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.zero → P f\nf0 : card (support f) = Nat.succ Nat.zero\n⊢ P (eraseLead f + ↑C (leadingCoeff f) * X ^ natDegree f)\n[PROOFSTEP]\nconvert P_C_mul_pow f.natDegree f.leadingCoeff ?_ df using 1\n[GOAL]\ncase h.e'_1\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.zero → P f\nf0 : card (support f) = Nat.succ Nat.zero\n⊢ eraseLead f + ↑C (leadingCoeff f) * X ^ natDegree f = ↑C (leadingCoeff f) * X ^ natDegree f\n[PROOFSTEP]\nconvert zero_add (C (leadingCoeff f) * X ^ f.natDegree)\n[GOAL]\ncase h.e'_2.h.e'_5\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.zero → P f\nf0 : card (support f) = Nat.succ Nat.zero\n⊢ eraseLead f = 0\n[PROOFSTEP]\nrw [← card_support_eq_zero, eraseLead_card_support f0]\n[GOAL]\ncase succ.zero\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.zero → P f\nf0 : card (support f) = Nat.succ Nat.zero\n⊢ leadingCoeff f ≠ 0\n[PROOFSTEP]\nrw [leadingCoeff_ne_zero, Ne.def, ← card_support_eq_zero, f0]\n[GOAL]\ncase succ.zero\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.zero → P f\nf0 : card (support f) = Nat.succ Nat.zero\n⊢ ¬Nat.succ Nat.zero = 0\n[PROOFSTEP]\nexact zero_ne_one.symm\n[GOAL]\ncase succ.succ\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nn✝ : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.succ n✝ → P f\nf0 : card (support f) = Nat.succ (Nat.succ n✝)\n⊢ P (eraseLead f + ↑C (leadingCoeff f) * X ^ natDegree f)\n[PROOFSTEP]\nrefine' P_C_add f.eraseLead _ _ _ _ _\n[GOAL]\ncase succ.succ.refine'_1\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nn✝ : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.succ n✝ → P f\nf0 : card (support f) = Nat.succ (Nat.succ n✝)\n⊢ natDegree (eraseLead f) < natDegree (↑C (leadingCoeff f) * X ^ natDegree f)\n[PROOFSTEP]\nrefine' (eraseLead_natDegree_lt _).trans_le (le_of_eq _)\n[GOAL]\ncase succ.succ.refine'_1.refine'_1\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nn✝ : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.succ n✝ → P f\nf0 : card (support f) = Nat.succ (Nat.succ n✝)\n⊢ 2 ≤ card (support f)\n[PROOFSTEP]\nexact (Nat.succ_le_succ (Nat.succ_le_succ (Nat.zero_le _))).trans f0.ge\n[GOAL]\ncase succ.succ.refine'_1.refine'_2\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nn✝ : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.succ n✝ → P f\nf0 : card (support f) = Nat.succ (Nat.succ n✝)\n⊢ natDegree f = natDegree (↑C (leadingCoeff f) * X ^ natDegree f)\n[PROOFSTEP]\nrw [natDegree_C_mul_X_pow _ _ (leadingCoeff_ne_zero.mpr _)]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nn✝ : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.succ n✝ → P f\nf0 : card (support f) = Nat.succ (Nat.succ n✝)\n⊢ f ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nn✝ : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.succ n✝ → P f\ndf : natDegree 0 ≤ N\nf0 : card (support 0) = Nat.succ (Nat.succ n✝)\n⊢ False\n[PROOFSTEP]\nsimp at f0 \n[GOAL]\ncase succ.succ.refine'_2\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nn✝ : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.succ n✝ → P f\nf0 : card (support f) = Nat.succ (Nat.succ n✝)\n⊢ natDegree (↑C (leadingCoeff f) * X ^ natDegree f) ≤ N\n[PROOFSTEP]\nexact (natDegree_C_mul_X_pow_le f.leadingCoeff f.natDegree).trans df\n[GOAL]\ncase succ.succ.refine'_3\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nn✝ : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.succ n✝ → P f\nf0 : card (support f) = Nat.succ (Nat.succ n✝)\n⊢ P (eraseLead f)\n[PROOFSTEP]\nexact hc _ (eraseLead_natDegree_le_aux.trans df) (eraseLead_card_support f0)\n[GOAL]\ncase succ.succ.refine'_4\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nn✝ : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.succ n✝ → P f\nf0 : card (support f) = Nat.succ (Nat.succ n✝)\n⊢ P (↑C (leadingCoeff f) * X ^ natDegree f)\n[PROOFSTEP]\nrefine' P_C_mul_pow _ _ _ df\n[GOAL]\ncase succ.succ.refine'_4\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nn✝ : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.succ n✝ → P f\nf0 : card (support f) = Nat.succ (Nat.succ n✝)\n⊢ leadingCoeff f ≠ 0\n[PROOFSTEP]\nrw [Ne.def, leadingCoeff_eq_zero, ← card_support_eq_zero, f0]\n[GOAL]\ncase succ.succ.refine'_4\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nP : R[X] → Prop\nN : ℕ\nP_0 : P 0\nP_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (↑C r * X ^ n)\nP_C_add : ∀ (f g : R[X]), natDegree f < natDegree g → natDegree g ≤ N → P f → P g → P (f + g)\nf : R[X]\ndf : natDegree f ≤ N\nn✝ : ℕ\nhc : ∀ (f : R[X]), natDegree f ≤ N → card (support f) = Nat.succ n✝ → P f\nf0 : card (support f) = Nat.succ (Nat.succ n✝)\n⊢ ¬Nat.succ (Nat.succ n✝) = 0\n[PROOFSTEP]\nexact Nat.succ_ne_zero _\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nf : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nk : ℕ\nfu : ℕ → ℕ\nfu0 : ∀ {n : ℕ}, n ≤ k → fu n = 0\nfc : ∀ {n m : ℕ}, k ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < k → ↑φ f = 0\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\n⊢ natDegree (↑φ p) = fu (natDegree p)\n[PROOFSTEP]\nrefine' induction_with_natDegree_le (fun p => (φ p).natDegree = fu p.natDegree) p.natDegree (by simp [fu0]) _ _ _ rfl.le\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nf : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nk : ℕ\nfu : ℕ → ℕ\nfu0 : ∀ {n : ℕ}, n ≤ k → fu n = 0\nfc : ∀ {n m : ℕ}, k ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < k → ↑φ f = 0\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\n⊢ (fun p => natDegree (↑φ p) = fu (natDegree p)) 0\n[PROOFSTEP]\nsimp [fu0]\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : Semiring R\nf : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nk : ℕ\nfu : ℕ → ℕ\nfu0 : ∀ {n : ℕ}, n ≤ k → fu n = 0\nfc : ∀ {n m : ℕ}, k ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < k → ↑φ f = 0\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\n⊢ ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ natDegree p → (fun p => natDegree (↑φ p) = fu (natDegree p)) (↑C r * X ^ n)\n[PROOFSTEP]\nintro n r r0 _\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : Semiring R\nf : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nk : ℕ\nfu : ℕ → ℕ\nfu0 : ∀ {n : ℕ}, n ≤ k → fu n = 0\nfc : ∀ {n m : ℕ}, k ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < k → ↑φ f = 0\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\nn : ℕ\nr : R\nr0 : r ≠ 0\na✝ : n ≤ natDegree p\n⊢ natDegree (↑φ (↑C r * X ^ n)) = fu (natDegree (↑C r * X ^ n))\n[PROOFSTEP]\nrw [natDegree_C_mul_X_pow _ _ r0, C_mul_X_pow_eq_monomial, φ_mon_nat _ _ r0]\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝² : Semiring R\nf : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nk : ℕ\nfu : ℕ → ℕ\nfu0 : ∀ {n : ℕ}, n ≤ k → fu n = 0\nfc : ∀ {n m : ℕ}, k ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < k → ↑φ f = 0\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\n⊢ ∀ (f g : R[X]),\n    natDegree f < natDegree g →\n      natDegree g ≤ natDegree p →\n        (fun p => natDegree (↑φ p) = fu (natDegree p)) f →\n          (fun p => natDegree (↑φ p) = fu (natDegree p)) g → (fun p => natDegree (↑φ p) = fu (natDegree p)) (f + g)\n[PROOFSTEP]\nintro f g fg _ fk gk\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝² : Semiring R\nf✝ : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nk : ℕ\nfu : ℕ → ℕ\nfu0 : ∀ {n : ℕ}, n ≤ k → fu n = 0\nfc : ∀ {n m : ℕ}, k ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < k → ↑φ f = 0\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\nf g : R[X]\nfg : natDegree f < natDegree g\na✝ : natDegree g ≤ natDegree p\nfk : natDegree (↑φ f) = fu (natDegree f)\ngk : natDegree (↑φ g) = fu (natDegree g)\n⊢ natDegree (↑φ (f + g)) = fu (natDegree (f + g))\n[PROOFSTEP]\nrw [natDegree_add_eq_right_of_natDegree_lt fg, _root_.map_add]\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝² : Semiring R\nf✝ : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nk : ℕ\nfu : ℕ → ℕ\nfu0 : ∀ {n : ℕ}, n ≤ k → fu n = 0\nfc : ∀ {n m : ℕ}, k ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < k → ↑φ f = 0\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\nf g : R[X]\nfg : natDegree f < natDegree g\na✝ : natDegree g ≤ natDegree p\nfk : natDegree (↑φ f) = fu (natDegree f)\ngk : natDegree (↑φ g) = fu (natDegree g)\n⊢ natDegree (↑φ f + ↑φ g) = fu (natDegree g)\n[PROOFSTEP]\nby_cases FG : k ≤ f.natDegree\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : Semiring R\nf✝ : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nk : ℕ\nfu : ℕ → ℕ\nfu0 : ∀ {n : ℕ}, n ≤ k → fu n = 0\nfc : ∀ {n m : ℕ}, k ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < k → ↑φ f = 0\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\nf g : R[X]\nfg : natDegree f < natDegree g\na✝ : natDegree g ≤ natDegree p\nfk : natDegree (↑φ f) = fu (natDegree f)\ngk : natDegree (↑φ g) = fu (natDegree g)\nFG : k ≤ natDegree f\n⊢ natDegree (↑φ f + ↑φ g) = fu (natDegree g)\n[PROOFSTEP]\nrw [natDegree_add_eq_right_of_natDegree_lt, gk]\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : Semiring R\nf✝ : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nk : ℕ\nfu : ℕ → ℕ\nfu0 : ∀ {n : ℕ}, n ≤ k → fu n = 0\nfc : ∀ {n m : ℕ}, k ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < k → ↑φ f = 0\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\nf g : R[X]\nfg : natDegree f < natDegree g\na✝ : natDegree g ≤ natDegree p\nfk : natDegree (↑φ f) = fu (natDegree f)\ngk : natDegree (↑φ g) = fu (natDegree g)\nFG : k ≤ natDegree f\n⊢ natDegree (↑φ f) < natDegree (↑φ g)\n[PROOFSTEP]\nrw [fk, gk]\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : Semiring R\nf✝ : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nk : ℕ\nfu : ℕ → ℕ\nfu0 : ∀ {n : ℕ}, n ≤ k → fu n = 0\nfc : ∀ {n m : ℕ}, k ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < k → ↑φ f = 0\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\nf g : R[X]\nfg : natDegree f < natDegree g\na✝ : natDegree g ≤ natDegree p\nfk : natDegree (↑φ f) = fu (natDegree f)\ngk : natDegree (↑φ g) = fu (natDegree g)\nFG : k ≤ natDegree f\n⊢ fu (natDegree f) < fu (natDegree g)\n[PROOFSTEP]\nexact fc FG fg\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : Semiring R\nf✝ : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nk : ℕ\nfu : ℕ → ℕ\nfu0 : ∀ {n : ℕ}, n ≤ k → fu n = 0\nfc : ∀ {n m : ℕ}, k ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < k → ↑φ f = 0\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\nf g : R[X]\nfg : natDegree f < natDegree g\na✝ : natDegree g ≤ natDegree p\nfk : natDegree (↑φ f) = fu (natDegree f)\ngk : natDegree (↑φ g) = fu (natDegree g)\nFG : ¬k ≤ natDegree f\n⊢ natDegree (↑φ f + ↑φ g) = fu (natDegree g)\n[PROOFSTEP]\ncases k\n[GOAL]\ncase neg.zero\nR : Type u_1\ninst✝² : Semiring R\nf✝ : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nfu : ℕ → ℕ\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\nf g : R[X]\nfg : natDegree f < natDegree g\na✝ : natDegree g ≤ natDegree p\nfk : natDegree (↑φ f) = fu (natDegree f)\ngk : natDegree (↑φ g) = fu (natDegree g)\nfu0 : ∀ {n : ℕ}, n ≤ Nat.zero → fu n = 0\nfc : ∀ {n m : ℕ}, Nat.zero ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < Nat.zero → ↑φ f = 0\nFG : ¬Nat.zero ≤ natDegree f\n⊢ natDegree (↑φ f + ↑φ g) = fu (natDegree g)\n[PROOFSTEP]\nexact (FG (Nat.zero_le _)).elim\n[GOAL]\ncase neg.succ\nR : Type u_1\ninst✝² : Semiring R\nf✝ : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nfu : ℕ → ℕ\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = fu n\nf g : R[X]\nfg : natDegree f < natDegree g\na✝ : natDegree g ≤ natDegree p\nfk : natDegree (↑φ f) = fu (natDegree f)\ngk : natDegree (↑φ g) = fu (natDegree g)\nn✝ : ℕ\nfu0 : ∀ {n : ℕ}, n ≤ Nat.succ n✝ → fu n = 0\nfc : ∀ {n m : ℕ}, Nat.succ n✝ ≤ n → n < m → fu n < fu m\nφ_k : ∀ {f : R[X]}, natDegree f < Nat.succ n✝ → ↑φ f = 0\nFG : ¬Nat.succ n✝ ≤ natDegree f\n⊢ natDegree (↑φ f + ↑φ g) = fu (natDegree g)\n[PROOFSTEP]\nrwa [φ_k (not_le.mp FG), zero_add]\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nf : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nk : ℕ\nφ_k : ∀ (f : R[X]), natDegree f < k → ↑φ f = 0\nφ_mon : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = n - k\n⊢ ∀ {n : ℕ}, n ≤ k → (fun j => j - k) n = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nf : R[X]\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring S\ninst✝ : AddMonoidHomClass F R[X] S[X]\nφ : F\np : R[X]\nφ_mon_nat : ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = n\n⊢ ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑φ (↑(monomial n) c)) = n - 0\n[PROOFSTEP]\nsimpa\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\nk : Fin n → ℕ\nx : Fin n → R\nhk : Function.Injective k\nhx : ∀ (i : Fin n), x i ≠ 0\n⊢ card (support (∑ i : Fin n, ↑C (x i) * X ^ k i)) = n\n[PROOFSTEP]\nsuffices (∑ i, C (x i) * X ^ k i).support = image k univ by rw [this, univ.card_image_of_injective hk, card_fin]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\nk : Fin n → ℕ\nx : Fin n → R\nhk : Function.Injective k\nhx : ∀ (i : Fin n), x i ≠ 0\nthis : support (∑ i : Fin n, ↑C (x i) * X ^ k i) = image k univ\n⊢ card (support (∑ i : Fin n, ↑C (x i) * X ^ k i)) = n\n[PROOFSTEP]\nrw [this, univ.card_image_of_injective hk, card_fin]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\nk : Fin n → ℕ\nx : Fin n → R\nhk : Function.Injective k\nhx : ∀ (i : Fin n), x i ≠ 0\n⊢ support (∑ i : Fin n, ↑C (x i) * X ^ k i) = image k univ\n[PROOFSTEP]\nsimp_rw [Finset.ext_iff, mem_support_iff, finset_sum_coeff, coeff_C_mul_X_pow, mem_image, mem_univ, true_and]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\nk : Fin n → ℕ\nx : Fin n → R\nhk : Function.Injective k\nhx : ∀ (i : Fin n), x i ≠ 0\n⊢ ∀ (a : ℕ), (∑ x_1 : Fin n, if a = k x_1 then x x_1 else 0) ≠ 0 ↔ ∃ a_1, k a_1 = a\n[PROOFSTEP]\nrefine' fun i => ⟨fun h => _, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\nk : Fin n → ℕ\nx : Fin n → R\nhk : Function.Injective k\nhx : ∀ (i : Fin n), x i ≠ 0\ni : ℕ\nh : (∑ x_1 : Fin n, if i = k x_1 then x x_1 else 0) ≠ 0\n⊢ ∃ a, k a = i\n[PROOFSTEP]\nobtain ⟨j, _, h⟩ := exists_ne_zero_of_sum_ne_zero h\n[GOAL]\ncase refine'_1.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\nk : Fin n → ℕ\nx : Fin n → R\nhk : Function.Injective k\nhx : ∀ (i : Fin n), x i ≠ 0\ni : ℕ\nh✝ : (∑ x_1 : Fin n, if i = k x_1 then x x_1 else 0) ≠ 0\nj : Fin n\nleft✝ : j ∈ univ\nh : (if i = k j then x j else 0) ≠ 0\n⊢ ∃ a, k a = i\n[PROOFSTEP]\nexact ⟨j, (ite_ne_right_iff.mp h).1.symm⟩\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\nk : Fin n → ℕ\nx : Fin n → R\nhk : Function.Injective k\nhx : ∀ (i : Fin n), x i ≠ 0\ni : ℕ\n⊢ (∃ a, k a = i) → (∑ x_1 : Fin n, if i = k x_1 then x x_1 else 0) ≠ 0\n[PROOFSTEP]\nrintro ⟨j, _, rfl⟩\n[GOAL]\ncase refine'_2.intro.refl\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\nk : Fin n → ℕ\nx : Fin n → R\nhk : Function.Injective k\nhx : ∀ (i : Fin n), x i ≠ 0\nj : Fin n\n⊢ (∑ x_1 : Fin n, if k j = k x_1 then x x_1 else 0) ≠ 0\n[PROOFSTEP]\nrw [sum_eq_single_of_mem j (mem_univ j), if_pos rfl]\n[GOAL]\ncase refine'_2.intro.refl\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\nk : Fin n → ℕ\nx : Fin n → R\nhk : Function.Injective k\nhx : ∀ (i : Fin n), x i ≠ 0\nj : Fin n\n⊢ x j ≠ 0\n[PROOFSTEP]\nexact hx j\n[GOAL]\ncase refine'_2.intro.refl\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\nk : Fin n → ℕ\nx : Fin n → R\nhk : Function.Injective k\nhx : ∀ (i : Fin n), x i ≠ 0\nj : Fin n\n⊢ ∀ (b : Fin n), b ∈ univ → b ≠ j → (if k j = k b then x b else 0) = 0\n[PROOFSTEP]\nexact fun m _ hmj => if_neg fun h => hmj.symm (hk h)\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\n⊢ card (support f) = n ↔ ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\n[PROOFSTEP]\nrefine' ⟨_, fun ⟨k, x, hk, hx, hf⟩ => hf.symm ▸ card_support_eq' k x hk.injective hx⟩\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nn : ℕ\n⊢ card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\n[PROOFSTEP]\ninduction' n with n hn generalizing f\n[GOAL]\ncase zero\nR : Type u_1\ninst✝ : Semiring R\nf✝ f : R[X]\n⊢ card (support f) = Nat.zero → ∃ k x hk hx, f = ∑ i : Fin Nat.zero, ↑C (x i) * X ^ k i\n[PROOFSTEP]\nexact fun hf => ⟨0, 0, fun x => x.elim0, fun x => x.elim0, card_support_eq_zero.mp hf⟩\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\n⊢ card (support f) = Nat.succ n → ∃ k x hk hx, f = ∑ i : Fin (Nat.succ n), ↑C (x i) * X ^ k i\n[PROOFSTEP]\nintro h\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\n⊢ ∃ k x hk hx, f = ∑ i : Fin (Nat.succ n), ↑C (x i) * X ^ k i\n[PROOFSTEP]\nobtain ⟨k, x, hk, hx, hf⟩ := hn (eraseLead_card_support' h)\n[GOAL]\ncase succ.intro.intro.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\n⊢ ∃ k x hk hx, f = ∑ i : Fin (Nat.succ n), ↑C (x i) * X ^ k i\n[PROOFSTEP]\nhave H : ¬∃ k : Fin n, Fin.castSucc k = Fin.last n :=\n  by\n  rintro ⟨i, hi⟩\n  exact i.castSucc_lt_last.ne hi\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\n⊢ ¬∃ k, Fin.castSucc k = Fin.last n\n[PROOFSTEP]\nrintro ⟨i, hi⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\ni : Fin n\nhi : Fin.castSucc i = Fin.last n\n⊢ False\n[PROOFSTEP]\nexact i.castSucc_lt_last.ne hi\n[GOAL]\ncase succ.intro.intro.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\n⊢ ∃ k x hk hx, f = ∑ i : Fin (Nat.succ n), ↑C (x i) * X ^ k i\n[PROOFSTEP]\nrefine'\n  ⟨Function.extend Fin.castSucc k fun _ => f.natDegree, Function.extend Fin.castSucc x fun _ => f.leadingCoeff, _, _, _⟩\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_1\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\n⊢ StrictMono (Function.extend Fin.castSucc k fun x => natDegree f)\n[PROOFSTEP]\nintro i j hij\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_1\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\ni j : Fin (Nat.succ n)\nhij : i < j\n⊢ Function.extend Fin.castSucc k (fun x => natDegree f) i < Function.extend Fin.castSucc k (fun x => natDegree f) j\n[PROOFSTEP]\nhave hi : i ∈ Set.range (Fin.castSucc : Fin n → Fin (n + 1)) :=\n  by\n  rw [Fin.range_castSucc, Set.mem_def]\n  exact lt_of_lt_of_le hij (Nat.lt_succ_iff.mp j.2)\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\ni j : Fin (Nat.succ n)\nhij : i < j\n⊢ i ∈ Set.range Fin.castSucc\n[PROOFSTEP]\nrw [Fin.range_castSucc, Set.mem_def]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\ni j : Fin (Nat.succ n)\nhij : i < j\n⊢ setOf (fun i => ↑i < n) i\n[PROOFSTEP]\nexact lt_of_lt_of_le hij (Nat.lt_succ_iff.mp j.2)\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_1\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\ni j : Fin (Nat.succ n)\nhij : i < j\nhi : i ∈ Set.range Fin.castSucc\n⊢ Function.extend Fin.castSucc k (fun x => natDegree f) i < Function.extend Fin.castSucc k (fun x => natDegree f) j\n[PROOFSTEP]\nobtain ⟨i, rfl⟩ := hi\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_1.intro\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\nj : Fin (Nat.succ n)\ni : Fin n\nhij : Fin.castSucc i < j\n⊢ Function.extend Fin.castSucc k (fun x => natDegree f) (Fin.castSucc i) <\n    Function.extend Fin.castSucc k (fun x => natDegree f) j\n[PROOFSTEP]\nrw [Fin.strictMono_castSucc.injective.extend_apply]\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_1.intro\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\nj : Fin (Nat.succ n)\ni : Fin n\nhij : Fin.castSucc i < j\n⊢ k i < Function.extend Fin.castSucc k (fun x => natDegree f) j\n[PROOFSTEP]\nby_cases hj : ∃ j₀, Fin.castSucc j₀ = j\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\nj : Fin (Nat.succ n)\ni : Fin n\nhij : Fin.castSucc i < j\nhj : ∃ j₀, Fin.castSucc j₀ = j\n⊢ k i < Function.extend Fin.castSucc k (fun x => natDegree f) j\n[PROOFSTEP]\nobtain ⟨j, rfl⟩ := hj\n[GOAL]\ncase pos.intro\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\ni j : Fin n\nhij : Fin.castSucc i < Fin.castSucc j\n⊢ k i < Function.extend Fin.castSucc k (fun x => natDegree f) (Fin.castSucc j)\n[PROOFSTEP]\nrwa [Fin.strictMono_castSucc.injective.extend_apply, hk.lt_iff_lt, ← Fin.castSucc_lt_castSucc_iff]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\nj : Fin (Nat.succ n)\ni : Fin n\nhij : Fin.castSucc i < j\nhj : ¬∃ j₀, Fin.castSucc j₀ = j\n⊢ k i < Function.extend Fin.castSucc k (fun x => natDegree f) j\n[PROOFSTEP]\nrw [Function.extend_apply' _ _ _ hj]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\nj : Fin (Nat.succ n)\ni : Fin n\nhij : Fin.castSucc i < j\nhj : ¬∃ j₀, Fin.castSucc j₀ = j\n⊢ k i < natDegree f\n[PROOFSTEP]\napply lt_natDegree_of_mem_eraseLead_support\n[GOAL]\ncase neg.h\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\nj : Fin (Nat.succ n)\ni : Fin n\nhij : Fin.castSucc i < j\nhj : ¬∃ j₀, Fin.castSucc j₀ = j\n⊢ k i ∈ support (eraseLead f)\n[PROOFSTEP]\nrw [mem_support_iff, hf, finset_sum_coeff]\n[GOAL]\ncase neg.h\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\nj : Fin (Nat.succ n)\ni : Fin n\nhij : Fin.castSucc i < j\nhj : ¬∃ j₀, Fin.castSucc j₀ = j\n⊢ ∑ b : Fin n, coeff (↑C (x b) * X ^ k b) (k i) ≠ 0\n[PROOFSTEP]\nrw [sum_eq_single, coeff_C_mul, coeff_X_pow_self, mul_one]\n[GOAL]\ncase neg.h\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\nj : Fin (Nat.succ n)\ni : Fin n\nhij : Fin.castSucc i < j\nhj : ¬∃ j₀, Fin.castSucc j₀ = j\n⊢ x i ≠ 0\n[PROOFSTEP]\nexact hx i\n[GOAL]\ncase neg.h.h₀\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\nj : Fin (Nat.succ n)\ni : Fin n\nhij : Fin.castSucc i < j\nhj : ¬∃ j₀, Fin.castSucc j₀ = j\n⊢ ∀ (b : Fin n), b ∈ univ → b ≠ i → coeff (↑C (x b) * X ^ k b) (k i) = 0\n[PROOFSTEP]\nintro j _ hji\n[GOAL]\ncase neg.h.h₀\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\nj✝ : Fin (Nat.succ n)\ni : Fin n\nhij : Fin.castSucc i < j✝\nhj : ¬∃ j₀, Fin.castSucc j₀ = j✝\nj : Fin n\na✝ : j ∈ univ\nhji : j ≠ i\n⊢ coeff (↑C (x j) * X ^ k j) (k i) = 0\n[PROOFSTEP]\nrw [coeff_C_mul, coeff_X_pow, if_neg (hk.injective.ne hji.symm), mul_zero]\n[GOAL]\ncase neg.h.h₁\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\nj : Fin (Nat.succ n)\ni : Fin n\nhij : Fin.castSucc i < j\nhj : ¬∃ j₀, Fin.castSucc j₀ = j\n⊢ ¬i ∈ univ → coeff (↑C (x i) * X ^ k i) (k i) = 0\n[PROOFSTEP]\nexact fun hi => (hi (mem_univ i)).elim\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_2\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\n⊢ ∀ (i : Fin (Nat.succ n)), Function.extend Fin.castSucc x (fun x => leadingCoeff f) i ≠ 0\n[PROOFSTEP]\nintro i\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_2\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\ni : Fin (Nat.succ n)\n⊢ Function.extend Fin.castSucc x (fun x => leadingCoeff f) i ≠ 0\n[PROOFSTEP]\nby_cases hi : ∃ i₀, Fin.castSucc i₀ = i\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\ni : Fin (Nat.succ n)\nhi : ∃ i₀, Fin.castSucc i₀ = i\n⊢ Function.extend Fin.castSucc x (fun x => leadingCoeff f) i ≠ 0\n[PROOFSTEP]\nobtain ⟨i, rfl⟩ := hi\n[GOAL]\ncase pos.intro\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\ni : Fin n\n⊢ Function.extend Fin.castSucc x (fun x => leadingCoeff f) (Fin.castSucc i) ≠ 0\n[PROOFSTEP]\nrw [Fin.strictMono_castSucc.injective.extend_apply]\n[GOAL]\ncase pos.intro\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\ni : Fin n\n⊢ x i ≠ 0\n[PROOFSTEP]\nexact hx i\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\ni : Fin (Nat.succ n)\nhi : ¬∃ i₀, Fin.castSucc i₀ = i\n⊢ Function.extend Fin.castSucc x (fun x => leadingCoeff f) i ≠ 0\n[PROOFSTEP]\nrw [Function.extend_apply' _ _ _ hi, Ne, leadingCoeff_eq_zero, ← card_support_eq_zero, h]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\ni : Fin (Nat.succ n)\nhi : ¬∃ i₀, Fin.castSucc i₀ = i\n⊢ ¬Nat.succ n = 0\n[PROOFSTEP]\nexact n.succ_ne_zero\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_3\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\n⊢ f =\n    ∑ i : Fin (Nat.succ n),\n      ↑C (Function.extend Fin.castSucc x (fun x => leadingCoeff f) i) *\n        X ^ Function.extend Fin.castSucc k (fun x => natDegree f) i\n[PROOFSTEP]\nrw [Fin.sum_univ_castSucc]\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_3\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\n⊢ f =\n    ∑ i : Fin n,\n        ↑C (Function.extend Fin.castSucc x (fun x => leadingCoeff f) (Fin.castSucc i)) *\n          X ^ Function.extend Fin.castSucc k (fun x => natDegree f) (Fin.castSucc i) +\n      ↑C (Function.extend Fin.castSucc x (fun x => leadingCoeff f) (Fin.last n)) *\n        X ^ Function.extend Fin.castSucc k (fun x => natDegree f) (Fin.last n)\n[PROOFSTEP]\nsimp only [Fin.strictMono_castSucc.injective.extend_apply]\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_3\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\n⊢ f =\n    ∑ x_1 : Fin n, ↑C (x x_1) * X ^ k x_1 +\n      ↑C (Function.extend Fin.castSucc x (fun x => leadingCoeff f) (Fin.last n)) *\n        X ^ Function.extend Fin.castSucc k (fun x => natDegree f) (Fin.last n)\n[PROOFSTEP]\nrw [← hf, Function.extend_apply', Function.extend_apply', eraseLead_add_C_mul_X_pow]\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_3.hb\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\n⊢ ¬∃ a, Fin.castSucc a = Fin.last n\ncase succ.intro.intro.intro.intro.refine'_3.hb\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\n⊢ ¬∃ a, Fin.castSucc a = Fin.last n\n[PROOFSTEP]\nall_goals exact H\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_3.hb\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\n⊢ ¬∃ a, Fin.castSucc a = Fin.last n\n[PROOFSTEP]\nexact H\n[GOAL]\ncase succ.intro.intro.intro.intro.refine'_3.hb\nR : Type u_1\ninst✝ : Semiring R\nf✝ : R[X]\nn : ℕ\nhn : ∀ {f : R[X]}, card (support f) = n → ∃ k x hk hx, f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nf : R[X]\nh : card (support f) = Nat.succ n\nk : Fin n → ℕ\nx : Fin n → R\nhk : StrictMono k\nhx : ∀ (i : Fin n), x i ≠ 0\nhf : eraseLead f = ∑ i : Fin n, ↑C (x i) * X ^ k i\nH : ¬∃ k, Fin.castSucc k = Fin.last n\n⊢ ¬∃ a, Fin.castSucc a = Fin.last n\n[PROOFSTEP]\nexact H\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\n⊢ card (support f) = 1 ↔ ∃ k x hx, f = ↑C x * X ^ k\n[PROOFSTEP]\nrefine' ⟨fun h => _, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nh : card (support f) = 1\n⊢ ∃ k x hx, f = ↑C x * X ^ k\n[PROOFSTEP]\nobtain ⟨k, x, _, hx, rfl⟩ := card_support_eq.mp h\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nk : Fin 1 → ℕ\nx : Fin 1 → R\nw✝ : StrictMono k\nhx : ∀ (i : Fin 1), x i ≠ 0\nh : card (support (∑ i : Fin 1, ↑C (x i) * X ^ k i)) = 1\n⊢ ∃ k_1 x_1 hx, ∑ i : Fin 1, ↑C (x i) * X ^ k i = ↑C x_1 * X ^ k_1\n[PROOFSTEP]\nexact ⟨k 0, x 0, hx 0, Fin.sum_univ_one _⟩\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\n⊢ (∃ k x hx, f = ↑C x * X ^ k) → card (support f) = 1\n[PROOFSTEP]\nrintro ⟨k, x, hx, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nk : ℕ\nx : R\nhx : x ≠ 0\n⊢ card (support (↑C x * X ^ k)) = 1\n[PROOFSTEP]\nrw [support_C_mul_X_pow k hx, card_singleton]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\n⊢ card (support f) = 2 ↔ ∃ k m hkm x y hx hy, f = ↑C x * X ^ k + ↑C y * X ^ m\n[PROOFSTEP]\nrefine' ⟨fun h => _, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nh : card (support f) = 2\n⊢ ∃ k m hkm x y hx hy, f = ↑C x * X ^ k + ↑C y * X ^ m\n[PROOFSTEP]\nobtain ⟨k, x, hk, hx, rfl⟩ := card_support_eq.mp h\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nk : Fin 2 → ℕ\nx : Fin 2 → R\nhk : StrictMono k\nhx : ∀ (i : Fin 2), x i ≠ 0\nh : card (support (∑ i : Fin 2, ↑C (x i) * X ^ k i)) = 2\n⊢ ∃ k_1 m hkm x_1 y hx hy, ∑ i : Fin 2, ↑C (x i) * X ^ k i = ↑C x_1 * X ^ k_1 + ↑C y * X ^ m\n[PROOFSTEP]\nrefine' ⟨k 0, k 1, hk Nat.zero_lt_one, x 0, x 1, hx 0, hx 1, _⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nk : Fin 2 → ℕ\nx : Fin 2 → R\nhk : StrictMono k\nhx : ∀ (i : Fin 2), x i ≠ 0\nh : card (support (∑ i : Fin 2, ↑C (x i) * X ^ k i)) = 2\n⊢ ∑ i : Fin 2, ↑C (x i) * X ^ k i = ↑C (x 0) * X ^ k 0 + ↑C (x 1) * X ^ k 1\n[PROOFSTEP]\nrw [Fin.sum_univ_castSucc, Fin.sum_univ_one]\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nk : Fin 2 → ℕ\nx : Fin 2 → R\nhk : StrictMono k\nhx : ∀ (i : Fin 2), x i ≠ 0\nh : card (support (∑ i : Fin 2, ↑C (x i) * X ^ k i)) = 2\n⊢ ↑C (x (Fin.castSucc 0)) * X ^ k (Fin.castSucc 0) + ↑C (x (Fin.last 1)) * X ^ k (Fin.last 1) =\n    ↑C (x 0) * X ^ k 0 + ↑C (x 1) * X ^ k 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\n⊢ (∃ k m hkm x y hx hy, f = ↑C x * X ^ k + ↑C y * X ^ m) → card (support f) = 2\n[PROOFSTEP]\nrintro ⟨k, m, hkm, x, y, hx, hy, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nk m : ℕ\nhkm : k < m\nx y : R\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ card (support (↑C x * X ^ k + ↑C y * X ^ m)) = 2\n[PROOFSTEP]\nexact card_support_binomial hkm.ne hx hy\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\n⊢ card (support f) = 3 ↔ ∃ k m n hkm hmn x y z hx hy hz, f = ↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n\n[PROOFSTEP]\nrefine' ⟨fun h => _, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\nh : card (support f) = 3\n⊢ ∃ k m n hkm hmn x y z hx hy hz, f = ↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n\n[PROOFSTEP]\nobtain ⟨k, x, hk, hx, rfl⟩ := card_support_eq.mp h\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nk : Fin 3 → ℕ\nx : Fin 3 → R\nhk : StrictMono k\nhx : ∀ (i : Fin 3), x i ≠ 0\nh : card (support (∑ i : Fin 3, ↑C (x i) * X ^ k i)) = 3\n⊢ ∃ k_1 m n hkm hmn x_1 y z hx hy hz, ∑ i : Fin 3, ↑C (x i) * X ^ k i = ↑C x_1 * X ^ k_1 + ↑C y * X ^ m + ↑C z * X ^ n\n[PROOFSTEP]\nrefine' ⟨k 0, k 1, k 2, hk Nat.zero_lt_one, hk (Nat.lt_succ_self 1), x 0, x 1, x 2, hx 0, hx 1, hx 2, _⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nk : Fin 3 → ℕ\nx : Fin 3 → R\nhk : StrictMono k\nhx : ∀ (i : Fin 3), x i ≠ 0\nh : card (support (∑ i : Fin 3, ↑C (x i) * X ^ k i)) = 3\n⊢ ∑ i : Fin 3, ↑C (x i) * X ^ k i = ↑C (x 0) * X ^ k 0 + ↑C (x 1) * X ^ k 1 + ↑C (x 2) * X ^ k 2\n[PROOFSTEP]\nrw [Fin.sum_univ_castSucc, Fin.sum_univ_castSucc, Fin.sum_univ_one]\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nk : Fin 3 → ℕ\nx : Fin 3 → R\nhk : StrictMono k\nhx : ∀ (i : Fin 3), x i ≠ 0\nh : card (support (∑ i : Fin 3, ↑C (x i) * X ^ k i)) = 3\n⊢ ↑C (x (Fin.castSucc (Fin.castSucc 0))) * X ^ k (Fin.castSucc (Fin.castSucc 0)) +\n        ↑C (x (Fin.castSucc (Fin.last 1))) * X ^ k (Fin.castSucc (Fin.last 1)) +\n      ↑C (x (Fin.last 2)) * X ^ k (Fin.last 2) =\n    ↑C (x 0) * X ^ k 0 + ↑C (x 1) * X ^ k 1 + ↑C (x 2) * X ^ k 2\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝ : Semiring R\nf : R[X]\n⊢ (∃ k m n hkm hmn x y z hx hy hz, f = ↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) → card (support f) = 3\n[PROOFSTEP]\nrintro ⟨k, m, n, hkm, hmn, x, y, z, hx, hy, hz, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nx y z : R\nhx : x ≠ 0\nhy : y ≠ 0\nhz : z ≠ 0\n⊢ card (support (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n)) = 3\n[PROOFSTEP]\nexact card_support_trinomial hkm hmn hx hy hz\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.EraseLead", "llama_tokens": 31130, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6513548646660542, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.3586407860623391}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\n⊢ ∃ u, card u * card t ≤ card (s * t) ∧ s ⊆ u * t / t\n[PROOFSTEP]\nhaveI : ∀ u, Decidable ((u : Set α).PairwiseDisjoint (· • t)) := fun u ↦ Classical.dec _\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\n⊢ ∃ u, card u * card t ≤ card (s * t) ∧ s ⊆ u * t / t\n[PROOFSTEP]\nset C := s.powerset.filter fun u ↦ u.toSet.PairwiseDisjoint (· • t)\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\n⊢ ∃ u, card u * card t ≤ card (s * t) ∧ s ⊆ u * t / t\n[PROOFSTEP]\nobtain ⟨u, hu, hCmax⟩ :=\n  C.exists_maximal\n    (filter_nonempty_iff.2 ⟨∅, empty_mem_powerset _, by rw [coe_empty]; exact Set.pairwiseDisjoint_empty⟩)\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\n⊢ Set.PairwiseDisjoint ↑∅ fun x => x • t\n[PROOFSTEP]\nrw [coe_empty]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\n⊢ Set.PairwiseDisjoint ∅ fun x => x • t\n[PROOFSTEP]\nexact Set.pairwiseDisjoint_empty\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ∈ C\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\n⊢ ∃ u, card u * card t ≤ card (s * t) ∧ s ⊆ u * t / t\n[PROOFSTEP]\nrw [mem_filter, mem_powerset] at hu \n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\n⊢ ∃ u, card u * card t ≤ card (s * t) ∧ s ⊆ u * t / t\n[PROOFSTEP]\nrefine'\n  ⟨u, (card_mul_iff.2 <| pairwiseDisjoint_smul_iff.1 hu.2).ge.trans (card_le_of_subset <| mul_subset_mul_right hu.1),\n    fun a ha ↦ _⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\n⊢ a ∈ u * t / t\n[PROOFSTEP]\nrw [mul_div_assoc]\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\n⊢ a ∈ u * (t / t)\n[PROOFSTEP]\nby_cases hau : a ∈ u\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\nhau : a ∈ u\n⊢ a ∈ u * (t / t)\n[PROOFSTEP]\nexact subset_mul_left _ ht.one_mem_div hau\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\nhau : ¬a ∈ u\n⊢ a ∈ u * (t / t)\n[PROOFSTEP]\nby_cases H : ∀ b ∈ u, Disjoint (a • t) (b • t)\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\nhau : ¬a ∈ u\nH : ∀ (b : α), b ∈ u → Disjoint (a • t) (b • t)\n⊢ a ∈ u * (t / t)\n[PROOFSTEP]\nrefine' (hCmax _ _ <| ssubset_insert hau).elim\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\nhau : ¬a ∈ u\nH : ∀ (b : α), b ∈ u → Disjoint (a • t) (b • t)\n⊢ insert a u ∈ C\n[PROOFSTEP]\nrw [mem_filter, mem_powerset, insert_subset_iff, coe_insert]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\nhau : ¬a ∈ u\nH : ∀ (b : α), b ∈ u → Disjoint (a • t) (b • t)\n⊢ (a ∈ s ∧ u ⊆ s) ∧ Set.PairwiseDisjoint (insert a ↑u) fun x => x • t\n[PROOFSTEP]\nexact ⟨⟨ha, hu.1⟩, hu.2.insert fun _ hb _ ↦ H _ hb⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\nhau : ¬a ∈ u\nH : ¬∀ (b : α), b ∈ u → Disjoint (a • t) (b • t)\n⊢ a ∈ u * (t / t)\n[PROOFSTEP]\npush_neg at H \n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\nhau : ¬a ∈ u\nH : ∃ b, b ∈ u ∧ ¬Disjoint (a • t) (b • t)\n⊢ a ∈ u * (t / t)\n[PROOFSTEP]\nsimp_rw [not_disjoint_iff, ← inv_smul_mem_iff] at H \n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\nhau : ¬a ∈ u\nH : ∃ b, b ∈ u ∧ ∃ a_1, a⁻¹ • a_1 ∈ t ∧ b⁻¹ • a_1 ∈ t\n⊢ a ∈ u * (t / t)\n[PROOFSTEP]\nobtain ⟨b, hb, c, hc₁, hc₂⟩ := H\n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\nhau : ¬a ∈ u\nb : α\nhb : b ∈ u\nc : α\nhc₁ : a⁻¹ • c ∈ t\nhc₂ : b⁻¹ • c ∈ t\n⊢ a ∈ u * (t / t)\n[PROOFSTEP]\nrefine' mem_mul.2 ⟨b, a / b, hb, _, by simp⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\nhau : ¬a ∈ u\nb : α\nhb : b ∈ u\nc : α\nhc₁ : a⁻¹ • c ∈ t\nhc₂ : b⁻¹ • c ∈ t\n⊢ b * (a / b) = a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\nhau : ¬a ∈ u\nb : α\nhb : b ∈ u\nc : α\nhc₁ : a⁻¹ • c ∈ t\nhc₂ : b⁻¹ • c ∈ t\n⊢ a / b ∈ t / t\n[PROOFSTEP]\nexact mem_div.2 ⟨_, _, hc₂, hc₁, by simp [div_eq_mul_inv a b, mul_comm]⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ns t : Finset α\nht : Finset.Nonempty t\nthis : (u : Set α) → Decidable (Set.PairwiseDisjoint u fun x => x • t)\nC : Finset (Finset α) := filter (fun u => Set.PairwiseDisjoint ↑u fun x => x • t) (powerset s)\nu : Finset α\nhu : u ⊆ s ∧ Set.PairwiseDisjoint ↑u fun x => x • t\nhCmax : ∀ (x : Finset α), x ∈ C → ¬u < x\na : α\nha : a ∈ s\nhau : ¬a ∈ u\nb : α\nhb : b ∈ u\nc : α\nhc₁ : a⁻¹ • c ∈ t\nhc₂ : b⁻¹ • c ∈ t\n⊢ b⁻¹ • c / a⁻¹ • c = a / b\n[PROOFSTEP]\nsimp [div_eq_mul_inv a b, mul_comm]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Additive.RuzsaCovering", "llama_tokens": 4845, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6513548511303338, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.35864077860947174}}
{"text": "[GOAL]\nn : ℕ\nα : TypeVec n\nβ : TypeVec n\nf g : α ⟹ β\n⊢ (∀ (i : Fin2 n), f i = g i) → f = g\n[PROOFSTEP]\nintro h\n[GOAL]\nn : ℕ\nα : TypeVec n\nβ : TypeVec n\nf g : α ⟹ β\nh : ∀ (i : Fin2 n), f i = g i\n⊢ f = g\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nn : ℕ\nα : TypeVec n\nβ : TypeVec n\nf g : α ⟹ β\nh : ∀ (i : Fin2 n), f i = g i\ni : Fin2 n\n⊢ f i = g i\n[PROOFSTEP]\napply h\n[GOAL]\nn : ℕ\nα : TypeVec (n + 1)\ni : Fin2 (n + 1)\n⊢ (drop α ::: last α) i = α i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase fz\nn : ℕ\nα : TypeVec (n + 1)\n⊢ (drop α ::: last α) Fin2.fz = α Fin2.fz\n[PROOFSTEP]\nrfl\n[GOAL]\ncase fs\nn : ℕ\nα : TypeVec (n + 1)\na✝ : Fin2 (Nat.add n 0)\n⊢ (drop α ::: last α) (Fin2.fs a✝) = α (Fin2.fs a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nC : TypeVec (n + 1) → Sort u\nH : (α : TypeVec n) → (β : Type ?u.25747) → C (α ::: β)\nγ : TypeVec (n + 1)\n⊢ C γ\n[PROOFSTEP]\nrw [← @append1_drop_last _ γ]\n[GOAL]\nn : ℕ\nC : TypeVec (n + 1) → Sort u\nH : (α : TypeVec n) → (β : Type ?u.25747) → C (α ::: β)\nγ : TypeVec (n + 1)\n⊢ C (drop γ ::: last γ)\n[PROOFSTEP]\napply H\n[GOAL]\nn : ℕ\nα : TypeVec 0\nβ : TypeVec 0\ni : Fin2 0\n⊢ α i → β i\n[PROOFSTEP]\napply Fin2.elim0 i\n[GOAL]\nn : ℕ\nα : TypeVec (n + 1)\nβ : TypeVec (n + 1)\nf g : α ⟹ β\nh₀ : dropFun f = dropFun g\nh₁ : lastFun f = lastFun g\n⊢ f = g\n[PROOFSTEP]\nrefine funext (fun x => ?_)\n[GOAL]\nn : ℕ\nα : TypeVec (n + 1)\nβ : TypeVec (n + 1)\nf g : α ⟹ β\nh₀ : dropFun f = dropFun g\nh₁ : lastFun f = lastFun g\nx : Fin2 (n + 1)\n⊢ f x = g x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase fz\nn : ℕ\nα : TypeVec (n + 1)\nβ : TypeVec (n + 1)\nf g : α ⟹ β\nh₀ : dropFun f = dropFun g\nh₁ : lastFun f = lastFun g\n⊢ f Fin2.fz = g Fin2.fz\n[PROOFSTEP]\napply h₁\n[GOAL]\ncase fs\nn : ℕ\nα : TypeVec (n + 1)\nβ : TypeVec (n + 1)\nf g : α ⟹ β\nh₀ : dropFun f = dropFun g\nh₁ : lastFun f = lastFun g\na✝ : Fin2 (Nat.add n 0)\n⊢ f (Fin2.fs a✝) = g (Fin2.fs a✝)\n[PROOFSTEP]\napply congr_fun h₀\n[GOAL]\nn : ℕ\nα : TypeVec (n + 1)\nα' : TypeVec (n + 1)\nf f' : drop α ⟹ drop α'\ng g' : last α → last α'\nH : splitFun f g = splitFun f' g'\n⊢ f = f' ∧ g = g'\n[PROOFSTEP]\nrw [← dropFun_splitFun f g, H, ← lastFun_splitFun f g, H]\n[GOAL]\nn : ℕ\nα : TypeVec (n + 1)\nα' : TypeVec (n + 1)\nf f' : drop α ⟹ drop α'\ng g' : last α → last α'\nH : splitFun f g = splitFun f' g'\n⊢ dropFun (splitFun f' g') = f' ∧ lastFun (splitFun f' g') = g'\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\nα₀ : TypeVec 0\nf₀ : α₀ ⟹ Fin2.elim0\nx : Fin2 0\n⊢ (nilFun ⊚ f₀) x = f₀ x\n[PROOFSTEP]\napply Fin2.elim0 x\n[GOAL]\nn : ℕ\na✝ b : TypeVec 0\na : Fin2 0\n⊢ a✝ a = b a\n[PROOFSTEP]\napply Fin2.elim0 a\n[GOAL]\nn : ℕ\nβ : TypeVec 0 → Sort u_1\nf : β Fin2.elim0\nv : TypeVec 0\n⊢ β Fin2.elim0 = β v\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nn : ℕ\nβ : TypeVec 0 → Sort u_1\nf : β Fin2.elim0\nv : TypeVec 0\n⊢ Fin2.elim0 = v\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase e_a.h\nn : ℕ\nβ : TypeVec 0 → Sort u_1\nf : β Fin2.elim0\nv : TypeVec 0\ni : Fin2 0\n⊢ Fin2.elim0 i = v i\n[PROOFSTEP]\ncases i\n[GOAL]\nn✝ n : ℕ\nβ : TypeVec (n + 1) → Sort u_1\nf : (t : Type ?u.47809) → (v : TypeVec n) → β (v ::: t)\nv : TypeVec (n + 1)\n⊢ β (drop v ::: last v) = β v\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nv : TypeVec 0\nv' : TypeVec 0\nfs : v ⟹ v'\n⊢ β v v' fs\n[PROOFSTEP]\nrefine' cast _ f\n[GOAL]\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nv : TypeVec 0\nv' : TypeVec 0\nfs : v ⟹ v'\n⊢ β Fin2.elim0 Fin2.elim0 nilFun = β v v' fs\n[PROOFSTEP]\nhave eq₁ : v = Fin2.elim0 := by funext i; contradiction\n[GOAL]\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nv : TypeVec 0\nv' : TypeVec 0\nfs : v ⟹ v'\n⊢ v = Fin2.elim0\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nv : TypeVec 0\nv' : TypeVec 0\nfs : v ⟹ v'\ni : Fin2 0\n⊢ v i = Fin2.elim0 i\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nv : TypeVec 0\nv' : TypeVec 0\nfs : v ⟹ v'\neq₁ : v = Fin2.elim0\n⊢ β Fin2.elim0 Fin2.elim0 nilFun = β v v' fs\n[PROOFSTEP]\nhave eq₂ : v' = Fin2.elim0 := by funext i; contradiction\n[GOAL]\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nv : TypeVec 0\nv' : TypeVec 0\nfs : v ⟹ v'\neq₁ : v = Fin2.elim0\n⊢ v' = Fin2.elim0\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nv : TypeVec 0\nv' : TypeVec 0\nfs : v ⟹ v'\neq₁ : v = Fin2.elim0\ni : Fin2 0\n⊢ v' i = Fin2.elim0 i\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nv : TypeVec 0\nv' : TypeVec 0\nfs : v ⟹ v'\neq₁ : v = Fin2.elim0\neq₂ : v' = Fin2.elim0\n⊢ β Fin2.elim0 Fin2.elim0 nilFun = β v v' fs\n[PROOFSTEP]\nhave eq₃ : fs = nilFun := by funext i; contradiction\n[GOAL]\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nv : TypeVec 0\nv' : TypeVec 0\nfs : v ⟹ v'\neq₁ : v = Fin2.elim0\neq₂ : v' = Fin2.elim0\n⊢ fs = nilFun\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nv : TypeVec 0\nv' : TypeVec 0\nfs : v ⟹ v'\neq₁ : v = Fin2.elim0\neq₂ : v' = Fin2.elim0\ni : Fin2 0\n⊢ fs i = nilFun i\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nv : TypeVec 0\nv' : TypeVec 0\nfs : v ⟹ v'\neq₁ : v = Fin2.elim0\neq₂ : v' = Fin2.elim0\neq₃ : fs = nilFun\n⊢ β Fin2.elim0 Fin2.elim0 nilFun = β v v' fs\n[PROOFSTEP]\ncases eq₁\n[GOAL]\ncase refl\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nv' : TypeVec 0\neq₂ : v' = Fin2.elim0\nfs : Fin2.elim0 ⟹ v'\neq₃ : fs = nilFun\n⊢ β Fin2.elim0 Fin2.elim0 nilFun = β Fin2.elim0 v' fs\n[PROOFSTEP]\ncases eq₂\n[GOAL]\ncase refl.refl\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\nfs : Fin2.elim0 ⟹ Fin2.elim0\neq₃ : fs = nilFun\n⊢ β Fin2.elim0 Fin2.elim0 nilFun = β Fin2.elim0 Fin2.elim0 fs\n[PROOFSTEP]\ncases eq₃\n[GOAL]\ncase refl.refl.refl\nn : ℕ\nβ : (v : TypeVec 0) → (v' : TypeVec 0) → v ⟹ v' → Sort u_1\nf : β Fin2.elim0 Fin2.elim0 nilFun\n⊢ β Fin2.elim0 Fin2.elim0 nilFun = β Fin2.elim0 Fin2.elim0 nilFun\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ n : ℕ\nβ : (v : TypeVec (n + 1)) → (v' : TypeVec (n + 1)) → v ⟹ v' → Sort u_1\nF :\n  (t : Type ?u.50165) →\n    (t' : Type ?u.50168) →\n      (f : t → t') → (v : TypeVec n) → (v' : TypeVec n) → (fs : v ⟹ v') → β (v ::: t) (v' ::: t') (fs ::: f)\n⊢ (v : TypeVec (n + 1)) → (v' : TypeVec (n + 1)) → (fs : v ⟹ v') → β v v' fs\n[PROOFSTEP]\nintro v v'\n[GOAL]\nn✝ n : ℕ\nβ : (v : TypeVec (n + 1)) → (v' : TypeVec (n + 1)) → v ⟹ v' → Sort u_1\nF :\n  (t : Type ?u.50165) →\n    (t' : Type ?u.50168) →\n      (f : t → t') → (v : TypeVec n) → (v' : TypeVec n) → (fs : v ⟹ v') → β (v ::: t) (v' ::: t') (fs ::: f)\nv : TypeVec (n + 1)\nv' : TypeVec (n + 1)\n⊢ (fs : v ⟹ v') → β v v' fs\n[PROOFSTEP]\nrw [← append1_drop_last v, ← append1_drop_last v']\n[GOAL]\nn✝ n : ℕ\nβ : (v : TypeVec (n + 1)) → (v' : TypeVec (n + 1)) → v ⟹ v' → Sort u_1\nF :\n  (t : Type ?u.50165) →\n    (t' : Type ?u.50168) →\n      (f : t → t') → (v : TypeVec n) → (v' : TypeVec n) → (fs : v ⟹ v') → β (v ::: t) (v' ::: t') (fs ::: f)\nv : TypeVec (n + 1)\nv' : TypeVec (n + 1)\n⊢ (fs : drop v ::: last v ⟹ drop v' ::: last v') → β (drop v ::: last v) (drop v' ::: last v') fs\n[PROOFSTEP]\nintro fs\n[GOAL]\nn✝ n : ℕ\nβ : (v : TypeVec (n + 1)) → (v' : TypeVec (n + 1)) → v ⟹ v' → Sort u_1\nF :\n  (t : Type ?u.50165) →\n    (t' : Type ?u.50168) →\n      (f : t → t') → (v : TypeVec n) → (v' : TypeVec n) → (fs : v ⟹ v') → β (v ::: t) (v' ::: t') (fs ::: f)\nv : TypeVec (n + 1)\nv' : TypeVec (n + 1)\nfs : drop v ::: last v ⟹ drop v' ::: last v'\n⊢ β (drop v ::: last v) (drop v' ::: last v') fs\n[PROOFSTEP]\nrw [← split_dropFun_lastFun fs]\n[GOAL]\nn✝ n : ℕ\nβ : (v : TypeVec (n + 1)) → (v' : TypeVec (n + 1)) → v ⟹ v' → Sort u_1\nF :\n  (t : Type ?u.50165) →\n    (t' : Type ?u.50168) →\n      (f : t → t') → (v : TypeVec n) → (v' : TypeVec n) → (fs : v ⟹ v') → β (v ::: t) (v' ::: t') (fs ::: f)\nv : TypeVec (n + 1)\nv' : TypeVec (n + 1)\nfs : drop v ::: last v ⟹ drop v' ::: last v'\n⊢ β (drop v ::: last v) (drop v' ::: last v') (splitFun (dropFun fs) (lastFun fs))\n[PROOFSTEP]\napply F\n[GOAL]\nn : ℕ\nβ : Fin2.elim0 ⟹ Fin2.elim0 → Sort u_1\nf : β nilFun\n⊢ (f : Fin2.elim0 ⟹ Fin2.elim0) → β f\n[PROOFSTEP]\nintro g\n[GOAL]\nn : ℕ\nβ : Fin2.elim0 ⟹ Fin2.elim0 → Sort u_1\nf : β nilFun\ng : Fin2.elim0 ⟹ Fin2.elim0\n⊢ β g\n[PROOFSTEP]\nhave : g = nilFun\n[GOAL]\ncase this\nn : ℕ\nβ : Fin2.elim0 ⟹ Fin2.elim0 → Sort u_1\nf : β nilFun\ng : Fin2.elim0 ⟹ Fin2.elim0\n⊢ g = nilFun\nn : ℕ β : Fin2.elim0 ⟹ Fin2.elim0 → Sort u_1 f : β nilFun g : Fin2.elim0 ⟹ Fin2.elim0 this : g = nilFun ⊢ β g\n[PROOFSTEP]\next ⟨⟩\n[GOAL]\nn : ℕ\nβ : Fin2.elim0 ⟹ Fin2.elim0 → Sort u_1\nf : β nilFun\ng : Fin2.elim0 ⟹ Fin2.elim0\nthis : g = nilFun\n⊢ β g\n[PROOFSTEP]\nrw [this]\n[GOAL]\nn : ℕ\nβ : Fin2.elim0 ⟹ Fin2.elim0 → Sort u_1\nf : β nilFun\ng : Fin2.elim0 ⟹ Fin2.elim0\nthis : g = nilFun\n⊢ β nilFun\n[PROOFSTEP]\nexact f\n[GOAL]\nn✝ n : ℕ\nt : Type u_1\nt' : Type u_2\nv : TypeVec n\nv' : TypeVec n\nβ : v ::: t ⟹ v' ::: t' → Sort u_3\nF : (f : t → t') → (fs : v ⟹ v') → β (fs ::: f)\n⊢ (fs : v ::: t ⟹ v' ::: t') → β fs\n[PROOFSTEP]\nintro fs\n[GOAL]\nn✝ n : ℕ\nt : Type u_1\nt' : Type u_2\nv : TypeVec n\nv' : TypeVec n\nβ : v ::: t ⟹ v' ::: t' → Sort u_3\nF : (f : t → t') → (fs : v ⟹ v') → β (fs ::: f)\nfs : v ::: t ⟹ v' ::: t'\n⊢ β fs\n[PROOFSTEP]\nrw [← split_dropFun_lastFun fs]\n[GOAL]\nn✝ n : ℕ\nt : Type u_1\nt' : Type u_2\nv : TypeVec n\nv' : TypeVec n\nβ : v ::: t ⟹ v' ::: t' → Sort u_3\nF : (f : t → t') → (fs : v ⟹ v') → β (fs ::: f)\nfs : v ::: t ⟹ v' ::: t'\n⊢ β (splitFun (dropFun fs) (lastFun fs))\n[PROOFSTEP]\napply F\n[GOAL]\nn✝ : ℕ\nβ : Type u_1\nγ : Type u_2\nx : γ\nn : ℕ\nα : TypeVec n\n⊢ TypeVec.const x (α ::: β) = (TypeVec.const x α ::: fun x_1 => x)\n[PROOFSTEP]\next i : 1\n[GOAL]\ncase a\nn✝ : ℕ\nβ : Type u_1\nγ : Type u_2\nx : γ\nn : ℕ\nα : TypeVec n\ni : Fin2 (n + 1)\n⊢ TypeVec.const x (α ::: β) i = (TypeVec.const x α ::: fun x_1 => x) i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase a.fz\nn✝ : ℕ\nβ : Type u_1\nγ : Type u_2\nx : γ\nn : ℕ\nα : TypeVec n\n⊢ TypeVec.const x (α ::: β) Fin2.fz = (TypeVec.const x α ::: fun x_1 => x) Fin2.fz\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.fs\nn✝ : ℕ\nβ : Type u_1\nγ : Type u_2\nx : γ\nn : ℕ\nα : TypeVec n\na✝ : Fin2 (Nat.add n 0)\n⊢ TypeVec.const x (α ::: β) (Fin2.fs a✝) = (TypeVec.const x α ::: fun x_1 => x) (Fin2.fs a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nα : TypeVec 0\nβ : TypeVec 0\nf : α ⟹ β\n⊢ f = nilFun\n[PROOFSTEP]\next x\n[GOAL]\ncase a.h\nn : ℕ\nα : TypeVec 0\nβ : TypeVec 0\nf : α ⟹ β\nx : Fin2 0\nx✝ : α x\n⊢ f x x✝ = nilFun x x✝\n[PROOFSTEP]\ncases x\n[GOAL]\nn : ℕ\nα : TypeVec 0\n⊢ id = nilFun\n[PROOFSTEP]\next x\n[GOAL]\ncase a.h\nn : ℕ\nα : TypeVec 0\nx : Fin2 0\nx✝ : α x\n⊢ id x x✝ = nilFun x x✝\n[PROOFSTEP]\ncases x\n[GOAL]\nn : ℕ\nβ : Type u_1\nx : β\nα : TypeVec 0\n⊢ TypeVec.const x α = nilFun\n[PROOFSTEP]\next i : 1\n[GOAL]\ncase a\nn : ℕ\nβ : Type u_1\nx : β\nα : TypeVec 0\ni : Fin2 0\n⊢ TypeVec.const x α i = nilFun i\n[PROOFSTEP]\ncases i\n[GOAL]\nn✝ : ℕ\nβ : Type u_1\nn : ℕ\nα : TypeVec n\n⊢ repeatEq (α ::: β) = splitFun (repeatEq α) (uncurry Eq)\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nn : ℕ\nβ : Type u_1\nα : TypeVec zero\n⊢ repeatEq (α ::: β) = splitFun (repeatEq α) (uncurry Eq)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nn : ℕ\nβ : Type u_1\nn✝ : ℕ\nn_ih✝ : ∀ (α : TypeVec n✝), repeatEq (α ::: β) = splitFun (repeatEq α) (uncurry Eq)\nα : TypeVec (succ n✝)\n⊢ repeatEq (α ::: β) = splitFun (repeatEq α) (uncurry Eq)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nα : TypeVec 0\n⊢ repeatEq α = nilFun\n[PROOFSTEP]\next i\n[GOAL]\ncase a.h\nn : ℕ\nα : TypeVec 0\ni : Fin2 0\nx✝ : (α ⊗ α) i\n⊢ repeatEq α i x✝ = nilFun i x✝\n[PROOFSTEP]\ncases i\n[GOAL]\nn : ℕ\nα : TypeVec n\ni : Fin2 n\nx : α i\np : Prop\n⊢ ofRepeat (TypeVec.const p α i x) ↔ p\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase fz\nn : ℕ\np : Prop\nn✝ : ℕ\nα : TypeVec (succ n✝)\nx : α Fin2.fz\n⊢ ofRepeat (TypeVec.const p α Fin2.fz x) ↔ p\ncase fs\nn : ℕ\np : Prop\nn✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α : TypeVec n✝} {x : α a✝}, ofRepeat (TypeVec.const p α a✝ x) ↔ p\nα : TypeVec (succ n✝)\nx : α (Fin2.fs a✝)\n⊢ ofRepeat (TypeVec.const p α (Fin2.fs a✝) x) ↔ p\n[PROOFSTEP]\ncase fz => rfl\n[GOAL]\nn : ℕ\np : Prop\nn✝ : ℕ\nα : TypeVec (succ n✝)\nx : α Fin2.fz\n⊢ ofRepeat (TypeVec.const p α Fin2.fz x) ↔ p\n[PROOFSTEP]\ncase fz => rfl\n[GOAL]\nn : ℕ\np : Prop\nn✝ : ℕ\nα : TypeVec (succ n✝)\nx : α Fin2.fz\n⊢ ofRepeat (TypeVec.const p α Fin2.fz x) ↔ p\n[PROOFSTEP]\nrfl\n[GOAL]\ncase fs\nn : ℕ\np : Prop\nn✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α : TypeVec n✝} {x : α a✝}, ofRepeat (TypeVec.const p α a✝ x) ↔ p\nα : TypeVec (succ n✝)\nx : α (Fin2.fs a✝)\n⊢ ofRepeat (TypeVec.const p α (Fin2.fs a✝) x) ↔ p\n[PROOFSTEP]\ncase fs _ ih => erw [TypeVec.const, @ih (drop α) x]\n[GOAL]\nn : ℕ\np : Prop\nn✝ : ℕ\na✝ : Fin2 n✝\nih : ∀ {α : TypeVec n✝} {x : α a✝}, ofRepeat (TypeVec.const p α a✝ x) ↔ p\nα : TypeVec (succ n✝)\nx : α (Fin2.fs a✝)\n⊢ ofRepeat (TypeVec.const p α (Fin2.fs a✝) x) ↔ p\n[PROOFSTEP]\ncase fs _ ih => erw [TypeVec.const, @ih (drop α) x]\n[GOAL]\nn : ℕ\np : Prop\nn✝ : ℕ\na✝ : Fin2 n✝\nih : ∀ {α : TypeVec n✝} {x : α a✝}, ofRepeat (TypeVec.const p α a✝ x) ↔ p\nα : TypeVec (succ n✝)\nx : α (Fin2.fs a✝)\n⊢ ofRepeat (TypeVec.const p α (Fin2.fs a✝) x) ↔ p\n[PROOFSTEP]\nerw [TypeVec.const, @ih (drop α) x]\n[GOAL]\nn : ℕ\nα β : TypeVec n\ni : Fin2 n\na : α i\nb : β i\n⊢ prod.fst i (prod.mk i a b) = a\n[PROOFSTEP]\ninduction' i with _ _ _ i_ih\n[GOAL]\ncase fz\nn : ℕ\nα✝ β✝ : TypeVec n\ni : Fin2 n\na✝ : α✝ i\nb✝ : β✝ i\nn✝ : ℕ\nα β : TypeVec (succ n✝)\na : α Fin2.fz\nb : β Fin2.fz\n⊢ prod.fst Fin2.fz (prod.mk Fin2.fz a b) = a\ncase fs\nn : ℕ\nα✝ β✝ : TypeVec n\ni : Fin2 n\na✝¹ : α✝ i\nb✝ : β✝ i\nn✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α β : TypeVec n✝} (a : α a✝) (b : β a✝), prod.fst a✝ (prod.mk a✝ a b) = a\nα β : TypeVec (succ n✝)\na : α (Fin2.fs a✝)\nb : β (Fin2.fs a✝)\n⊢ prod.fst (Fin2.fs a✝) (prod.mk (Fin2.fs a✝) a b) = a\n[PROOFSTEP]\nsimp_all only [prod.fst, prod.mk]\n[GOAL]\ncase fs\nn : ℕ\nα✝ β✝ : TypeVec n\ni : Fin2 n\na✝¹ : α✝ i\nb✝ : β✝ i\nn✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α β : TypeVec n✝} (a : α a✝) (b : β a✝), prod.fst a✝ (prod.mk a✝ a b) = a\nα β : TypeVec (succ n✝)\na : α (Fin2.fs a✝)\nb : β (Fin2.fs a✝)\n⊢ prod.fst (Fin2.fs a✝) (prod.mk (Fin2.fs a✝) a b) = a\n[PROOFSTEP]\napply i_ih\n[GOAL]\nn : ℕ\nα β : TypeVec n\ni : Fin2 n\na : α i\nb : β i\n⊢ prod.snd i (prod.mk i a b) = b\n[PROOFSTEP]\ninduction' i with _ _ _ i_ih\n[GOAL]\ncase fz\nn : ℕ\nα✝ β✝ : TypeVec n\ni : Fin2 n\na✝ : α✝ i\nb✝ : β✝ i\nn✝ : ℕ\nα β : TypeVec (succ n✝)\na : α Fin2.fz\nb : β Fin2.fz\n⊢ prod.snd Fin2.fz (prod.mk Fin2.fz a b) = b\ncase fs\nn : ℕ\nα✝ β✝ : TypeVec n\ni : Fin2 n\na✝¹ : α✝ i\nb✝ : β✝ i\nn✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α β : TypeVec n✝} (a : α a✝) (b : β a✝), prod.snd a✝ (prod.mk a✝ a b) = b\nα β : TypeVec (succ n✝)\na : α (Fin2.fs a✝)\nb : β (Fin2.fs a✝)\n⊢ prod.snd (Fin2.fs a✝) (prod.mk (Fin2.fs a✝) a b) = b\n[PROOFSTEP]\nsimp_all [prod.snd, prod.mk]\n[GOAL]\ncase fs\nn : ℕ\nα✝ β✝ : TypeVec n\ni : Fin2 n\na✝¹ : α✝ i\nb✝ : β✝ i\nn✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α β : TypeVec n✝} (a : α a✝) (b : β a✝), prod.snd a✝ (prod.mk a✝ a b) = b\nα β : TypeVec (succ n✝)\na : α (Fin2.fs a✝)\nb : β (Fin2.fs a✝)\n⊢ prod.snd (Fin2.fs a✝) (prod.mk (Fin2.fs a✝) a b) = b\n[PROOFSTEP]\napply i_ih\n[GOAL]\nn : ℕ\nα α' β β' : TypeVec n\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ prod.fst ⊚ (f ⊗' g) = f ⊚ prod.fst\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nn : ℕ\nα α' β β' : TypeVec n\nf : α ⟹ β\ng : α' ⟹ β'\ni : Fin2 n\n⊢ (prod.fst ⊚ (f ⊗' g)) i = (f ⊚ prod.fst) i\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase h.fz\nn n✝ : ℕ\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.fst ⊚ (f ⊗' g)) Fin2.fz = (f ⊚ prod.fst) Fin2.fz\ncase h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α α' β β' : TypeVec n✝} (f : α ⟹ β) (g : α' ⟹ β'), (prod.fst ⊚ (f ⊗' g)) a✝ = (f ⊚ prod.fst) a✝\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.fst ⊚ (f ⊗' g)) (Fin2.fs a✝) = (f ⊚ prod.fst) (Fin2.fs a✝)\n[PROOFSTEP]\ncase fz => rfl\n[GOAL]\nn n✝ : ℕ\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.fst ⊚ (f ⊗' g)) Fin2.fz = (f ⊚ prod.fst) Fin2.fz\n[PROOFSTEP]\ncase fz => rfl\n[GOAL]\nn n✝ : ℕ\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.fst ⊚ (f ⊗' g)) Fin2.fz = (f ⊚ prod.fst) Fin2.fz\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α α' β β' : TypeVec n✝} (f : α ⟹ β) (g : α' ⟹ β'), (prod.fst ⊚ (f ⊗' g)) a✝ = (f ⊚ prod.fst) a✝\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.fst ⊚ (f ⊗' g)) (Fin2.fs a✝) = (f ⊚ prod.fst) (Fin2.fs a✝)\n[PROOFSTEP]\ncase fs _ _ i_ih => apply i_ih\n[GOAL]\nn n✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α α' β β' : TypeVec n✝} (f : α ⟹ β) (g : α' ⟹ β'), (prod.fst ⊚ (f ⊗' g)) a✝ = (f ⊚ prod.fst) a✝\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.fst ⊚ (f ⊗' g)) (Fin2.fs a✝) = (f ⊚ prod.fst) (Fin2.fs a✝)\n[PROOFSTEP]\ncase fs _ _ i_ih => apply i_ih\n[GOAL]\nn n✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α α' β β' : TypeVec n✝} (f : α ⟹ β) (g : α' ⟹ β'), (prod.fst ⊚ (f ⊗' g)) a✝ = (f ⊚ prod.fst) a✝\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.fst ⊚ (f ⊗' g)) (Fin2.fs a✝) = (f ⊚ prod.fst) (Fin2.fs a✝)\n[PROOFSTEP]\napply i_ih\n[GOAL]\nn : ℕ\nα α' β β' : TypeVec n\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ prod.snd ⊚ (f ⊗' g) = g ⊚ prod.snd\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nn : ℕ\nα α' β β' : TypeVec n\nf : α ⟹ β\ng : α' ⟹ β'\ni : Fin2 n\n⊢ (prod.snd ⊚ (f ⊗' g)) i = (g ⊚ prod.snd) i\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase h.fz\nn n✝ : ℕ\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.snd ⊚ (f ⊗' g)) Fin2.fz = (g ⊚ prod.snd) Fin2.fz\ncase h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α α' β β' : TypeVec n✝} (f : α ⟹ β) (g : α' ⟹ β'), (prod.snd ⊚ (f ⊗' g)) a✝ = (g ⊚ prod.snd) a✝\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.snd ⊚ (f ⊗' g)) (Fin2.fs a✝) = (g ⊚ prod.snd) (Fin2.fs a✝)\n[PROOFSTEP]\ncase fz => rfl\n[GOAL]\nn n✝ : ℕ\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.snd ⊚ (f ⊗' g)) Fin2.fz = (g ⊚ prod.snd) Fin2.fz\n[PROOFSTEP]\ncase fz => rfl\n[GOAL]\nn n✝ : ℕ\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.snd ⊚ (f ⊗' g)) Fin2.fz = (g ⊚ prod.snd) Fin2.fz\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α α' β β' : TypeVec n✝} (f : α ⟹ β) (g : α' ⟹ β'), (prod.snd ⊚ (f ⊗' g)) a✝ = (g ⊚ prod.snd) a✝\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.snd ⊚ (f ⊗' g)) (Fin2.fs a✝) = (g ⊚ prod.snd) (Fin2.fs a✝)\n[PROOFSTEP]\ncase fs _ _ i_ih => apply i_ih\n[GOAL]\nn n✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α α' β β' : TypeVec n✝} (f : α ⟹ β) (g : α' ⟹ β'), (prod.snd ⊚ (f ⊗' g)) a✝ = (g ⊚ prod.snd) a✝\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.snd ⊚ (f ⊗' g)) (Fin2.fs a✝) = (g ⊚ prod.snd) (Fin2.fs a✝)\n[PROOFSTEP]\ncase fs _ _ i_ih => apply i_ih\n[GOAL]\nn n✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α α' β β' : TypeVec n✝} (f : α ⟹ β) (g : α' ⟹ β'), (prod.snd ⊚ (f ⊗' g)) a✝ = (g ⊚ prod.snd) a✝\nα α' β β' : TypeVec (succ n✝)\nf : α ⟹ β\ng : α' ⟹ β'\n⊢ (prod.snd ⊚ (f ⊗' g)) (Fin2.fs a✝) = (g ⊚ prod.snd) (Fin2.fs a✝)\n[PROOFSTEP]\napply i_ih\n[GOAL]\nn : ℕ\nα : TypeVec n\n⊢ prod.fst ⊚ prod.diag = id\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nn : ℕ\nα : TypeVec n\ni : Fin2 n\n⊢ (prod.fst ⊚ prod.diag) i = id i\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase h.fz\nn n✝ : ℕ\nα : TypeVec (succ n✝)\n⊢ (prod.fst ⊚ prod.diag) Fin2.fz = id Fin2.fz\ncase h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α : TypeVec n✝}, (prod.fst ⊚ prod.diag) a✝ = id a✝\nα : TypeVec (succ n✝)\n⊢ (prod.fst ⊚ prod.diag) (Fin2.fs a✝) = id (Fin2.fs a✝)\n[PROOFSTEP]\ncase fz => rfl\n[GOAL]\nn n✝ : ℕ\nα : TypeVec (succ n✝)\n⊢ (prod.fst ⊚ prod.diag) Fin2.fz = id Fin2.fz\n[PROOFSTEP]\ncase fz => rfl\n[GOAL]\nn n✝ : ℕ\nα : TypeVec (succ n✝)\n⊢ (prod.fst ⊚ prod.diag) Fin2.fz = id Fin2.fz\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α : TypeVec n✝}, (prod.fst ⊚ prod.diag) a✝ = id a✝\nα : TypeVec (succ n✝)\n⊢ (prod.fst ⊚ prod.diag) (Fin2.fs a✝) = id (Fin2.fs a✝)\n[PROOFSTEP]\ncase fs _ _ i_ih => apply i_ih\n[GOAL]\nn n✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α : TypeVec n✝}, (prod.fst ⊚ prod.diag) a✝ = id a✝\nα : TypeVec (succ n✝)\n⊢ (prod.fst ⊚ prod.diag) (Fin2.fs a✝) = id (Fin2.fs a✝)\n[PROOFSTEP]\ncase fs _ _ i_ih => apply i_ih\n[GOAL]\nn n✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α : TypeVec n✝}, (prod.fst ⊚ prod.diag) a✝ = id a✝\nα : TypeVec (succ n✝)\n⊢ (prod.fst ⊚ prod.diag) (Fin2.fs a✝) = id (Fin2.fs a✝)\n[PROOFSTEP]\napply i_ih\n[GOAL]\nn : ℕ\nα : TypeVec n\n⊢ prod.snd ⊚ prod.diag = id\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h\nn : ℕ\nα : TypeVec n\ni : Fin2 n\n⊢ (prod.snd ⊚ prod.diag) i = id i\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase h.fz\nn n✝ : ℕ\nα : TypeVec (succ n✝)\n⊢ (prod.snd ⊚ prod.diag) Fin2.fz = id Fin2.fz\ncase h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α : TypeVec n✝}, (prod.snd ⊚ prod.diag) a✝ = id a✝\nα : TypeVec (succ n✝)\n⊢ (prod.snd ⊚ prod.diag) (Fin2.fs a✝) = id (Fin2.fs a✝)\n[PROOFSTEP]\ncase fz => rfl\n[GOAL]\nn n✝ : ℕ\nα : TypeVec (succ n✝)\n⊢ (prod.snd ⊚ prod.diag) Fin2.fz = id Fin2.fz\n[PROOFSTEP]\ncase fz => rfl\n[GOAL]\nn n✝ : ℕ\nα : TypeVec (succ n✝)\n⊢ (prod.snd ⊚ prod.diag) Fin2.fz = id Fin2.fz\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α : TypeVec n✝}, (prod.snd ⊚ prod.diag) a✝ = id a✝\nα : TypeVec (succ n✝)\n⊢ (prod.snd ⊚ prod.diag) (Fin2.fs a✝) = id (Fin2.fs a✝)\n[PROOFSTEP]\ncase fs _ _ i_ih => apply i_ih\n[GOAL]\nn n✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α : TypeVec n✝}, (prod.snd ⊚ prod.diag) a✝ = id a✝\nα : TypeVec (succ n✝)\n⊢ (prod.snd ⊚ prod.diag) (Fin2.fs a✝) = id (Fin2.fs a✝)\n[PROOFSTEP]\ncase fs _ _ i_ih => apply i_ih\n[GOAL]\nn n✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α : TypeVec n✝}, (prod.snd ⊚ prod.diag) a✝ = id a✝\nα : TypeVec (succ n✝)\n⊢ (prod.snd ⊚ prod.diag) (Fin2.fs a✝) = id (Fin2.fs a✝)\n[PROOFSTEP]\napply i_ih\n[GOAL]\nn : ℕ\nα : TypeVec n\ni : Fin2 n\nx y : α i\n⊢ ofRepeat (repeatEq α i (prod.mk i x y)) ↔ x = y\n[PROOFSTEP]\ninduction' i with _ _ _ i_ih\n[GOAL]\ncase fz\nn : ℕ\nα✝ : TypeVec n\ni : Fin2 n\nx✝ y✝ : α✝ i\nn✝ : ℕ\nα : TypeVec (succ n✝)\nx y : α Fin2.fz\n⊢ ofRepeat (repeatEq α Fin2.fz (prod.mk Fin2.fz x y)) ↔ x = y\ncase fs\nn : ℕ\nα✝ : TypeVec n\ni : Fin2 n\nx✝ y✝ : α✝ i\nn✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α : TypeVec n✝} {x y : α a✝}, ofRepeat (repeatEq α a✝ (prod.mk a✝ x y)) ↔ x = y\nα : TypeVec (succ n✝)\nx y : α (Fin2.fs a✝)\n⊢ ofRepeat (repeatEq α (Fin2.fs a✝) (prod.mk (Fin2.fs a✝) x y)) ↔ x = y\n[PROOFSTEP]\nrfl\n[GOAL]\ncase fs\nn : ℕ\nα✝ : TypeVec n\ni : Fin2 n\nx✝ y✝ : α✝ i\nn✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α : TypeVec n✝} {x y : α a✝}, ofRepeat (repeatEq α a✝ (prod.mk a✝ x y)) ↔ x = y\nα : TypeVec (succ n✝)\nx y : α (Fin2.fs a✝)\n⊢ ofRepeat (repeatEq α (Fin2.fs a✝) (prod.mk (Fin2.fs a✝) x y)) ↔ x = y\n[PROOFSTEP]\nerw [repeatEq, i_ih]\n[GOAL]\nn✝¹ n : ℕ\nα✝ : TypeVec n\np✝ : α✝ ⊗ α✝ ⟹ repeat n Prop\nn✝ : ℕ\nα : TypeVec (succ n✝)\np : α ⊗ α ⟹ repeat (succ n✝) Prop\nx : (fun i => { x // ofRepeat (p i (prod.mk i x.fst x.snd)) }) Fin2.fz\n⊢ ofRepeat (p Fin2.fz (prod.mk Fin2.fz (↑x).fst (↑x).snd)) = p Fin2.fz ↑x\n[PROOFSTEP]\ncongr\n[GOAL]\nn✝¹ n : ℕ\nα✝ : TypeVec n\np✝ : α✝ ⊗ α✝ ⟹ repeat n Prop\nn✝ : ℕ\nα : TypeVec (succ n✝)\np : α ⊗ α ⟹ repeat (succ n✝) Prop\nx : Subtype_ p Fin2.fz\n⊢ p Fin2.fz ↑x = ofRepeat (p Fin2.fz (prod.mk Fin2.fz (↑x).fst (↑x).snd))\n[PROOFSTEP]\ncongr\n[GOAL]\nn : ℕ\nα : TypeVec 0\nps : α ⟹ repeat 0 Prop\n⊢ ∀ (x : Fin2 0), subtypeVal ps x = nilFun x\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\nn✝ n : ℕ\nα : TypeVec n\n⊢ subtypeVal (repeatEq α) ⊚ diagSub = prod.diag\n[PROOFSTEP]\next i x\n[GOAL]\ncase a.h\nn✝ n : ℕ\nα : TypeVec n\ni : Fin2 n\nx : α i\n⊢ (subtypeVal (repeatEq α) ⊚ diagSub) i x = prod.diag i x\n[PROOFSTEP]\ninduction' i with _ _ _ i_ih\n[GOAL]\ncase a.h.fz\nn✝¹ n : ℕ\nα✝ : TypeVec n\ni : Fin2 n\nx✝ : α✝ i\nn✝ : ℕ\nα : TypeVec (succ n✝)\nx : α Fin2.fz\n⊢ (subtypeVal (repeatEq α) ⊚ diagSub) Fin2.fz x = prod.diag Fin2.fz x\ncase a.h.fs\nn✝¹ n : ℕ\nα✝ : TypeVec n\ni : Fin2 n\nx✝ : α✝ i\nn✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α : TypeVec n✝} (x : α a✝), (subtypeVal (repeatEq α) ⊚ diagSub) a✝ x = prod.diag a✝ x\nα : TypeVec (succ n✝)\nx : α (Fin2.fs a✝)\n⊢ (subtypeVal (repeatEq α) ⊚ diagSub) (Fin2.fs a✝) x = prod.diag (Fin2.fs a✝) x\n[PROOFSTEP]\nsimp [prod.diag, diagSub, repeatEq, subtypeVal, comp]\n[GOAL]\ncase a.h.fs\nn✝¹ n : ℕ\nα✝ : TypeVec n\ni : Fin2 n\nx✝ : α✝ i\nn✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α : TypeVec n✝} (x : α a✝), (subtypeVal (repeatEq α) ⊚ diagSub) a✝ x = prod.diag a✝ x\nα : TypeVec (succ n✝)\nx : α (Fin2.fs a✝)\n⊢ (subtypeVal (repeatEq α) ⊚ diagSub) (Fin2.fs a✝) x = prod.diag (Fin2.fs a✝) x\n[PROOFSTEP]\napply @i_ih (drop α)\n[GOAL]\nn : ℕ\n⊢ ∀ {n : ℕ} {α β : TypeVec n}, (id ⊗' id) = id\n[PROOFSTEP]\nintros\n[GOAL]\nn n✝ : ℕ\nα✝ β✝ : TypeVec n✝\n⊢ (id ⊗' id) = id\n[PROOFSTEP]\next i a\n[GOAL]\ncase a.h\nn n✝ : ℕ\nα✝ β✝ : TypeVec n✝\ni : Fin2 n✝\na : (α✝ ⊗ β✝) i\n⊢ (id ⊗' id) i a = id i a\n[PROOFSTEP]\ninduction' i with _ _ _ i_ih\n[GOAL]\ncase a.h.fz\nn n✝¹ : ℕ\nα✝¹ β✝¹ : TypeVec n✝¹\ni : Fin2 n✝¹\na✝ : (α✝¹ ⊗ β✝¹) i\nn✝ : ℕ\nα✝ β✝ : TypeVec (succ n✝)\na : (α✝ ⊗ β✝) Fin2.fz\n⊢ (id ⊗' id) Fin2.fz a = id Fin2.fz a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase a.h.fz.mk\nn n✝¹ : ℕ\nα✝¹ β✝¹ : TypeVec n✝¹\ni : Fin2 n✝¹\na : (α✝¹ ⊗ β✝¹) i\nn✝ : ℕ\nα✝ β✝ : TypeVec (succ n✝)\nfst✝ : last α✝\nsnd✝ : last β✝\n⊢ (id ⊗' id) Fin2.fz (fst✝, snd✝) = id Fin2.fz (fst✝, snd✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.fs\nn n✝¹ : ℕ\nα✝¹ β✝¹ : TypeVec n✝¹\ni : Fin2 n✝¹\na✝¹ : (α✝¹ ⊗ β✝¹) i\nn✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α β : TypeVec n✝} (a : (α ⊗ β) a✝), (id ⊗' id) a✝ a = id a✝ a\nα✝ β✝ : TypeVec (succ n✝)\na : (α✝ ⊗ β✝) (Fin2.fs a✝)\n⊢ (id ⊗' id) (Fin2.fs a✝) a = id (Fin2.fs a✝) a\n[PROOFSTEP]\napply i_ih\n[GOAL]\nn✝ n : ℕ\nα α' β β' : TypeVec n\nφ φ' ψ ψ' : Type u\nf₀ : α ⟹ α'\ng₀ : β ⟹ β'\nf₁ : φ → φ'\ng₁ : ψ → ψ'\n⊢ (f₀ ⊗' g₀ ::: Prod.map f₁ g₁) = ((f₀ ::: f₁) ⊗' (g₀ ::: g₁))\n[PROOFSTEP]\next i a\n[GOAL]\ncase a.h\nn✝ n : ℕ\nα α' β β' : TypeVec n\nφ φ' ψ ψ' : Type u\nf₀ : α ⟹ α'\ng₀ : β ⟹ β'\nf₁ : φ → φ'\ng₁ : ψ → ψ'\ni : Fin2 (n + 1)\na : ((α ⊗ β) ::: (φ × ψ)) i\n⊢ (f₀ ⊗' g₀ ::: Prod.map f₁ g₁) i a = ((f₀ ::: f₁) ⊗' (g₀ ::: g₁)) i a\n[PROOFSTEP]\ncases i\n[GOAL]\ncase a.h.fz\nn✝ n : ℕ\nα α' β β' : TypeVec n\nφ φ' ψ ψ' : Type u\nf₀ : α ⟹ α'\ng₀ : β ⟹ β'\nf₁ : φ → φ'\ng₁ : ψ → ψ'\na : ((α ⊗ β) ::: (φ × ψ)) Fin2.fz\n⊢ (f₀ ⊗' g₀ ::: Prod.map f₁ g₁) Fin2.fz a = ((f₀ ::: f₁) ⊗' (g₀ ::: g₁)) Fin2.fz a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase a.h.fz.mk\nn✝ n : ℕ\nα α' β β' : TypeVec n\nφ φ' ψ ψ' : Type u\nf₀ : α ⟹ α'\ng₀ : β ⟹ β'\nf₁ : φ → φ'\ng₁ : ψ → ψ'\nfst✝ : φ\nsnd✝ : ψ\n⊢ (f₀ ⊗' g₀ ::: Prod.map f₁ g₁) Fin2.fz (fst✝, snd✝) = ((f₀ ::: f₁) ⊗' (g₀ ::: g₁)) Fin2.fz (fst✝, snd✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.fs\nn✝ n : ℕ\nα α' β β' : TypeVec n\nφ φ' ψ ψ' : Type u\nf₀ : α ⟹ α'\ng₀ : β ⟹ β'\nf₁ : φ → φ'\ng₁ : ψ → ψ'\na✝ : Fin2 (Nat.add n 0)\na : ((α ⊗ β) ::: (φ × ψ)) (Fin2.fs a✝)\n⊢ (f₀ ⊗' g₀ ::: Prod.map f₁ g₁) (Fin2.fs a✝) a = ((f₀ ::: f₁) ⊗' (g₀ ::: g₁)) (Fin2.fs a✝) a\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nα : TypeVec (n + 1)\n⊢ dropFun prod.diag = prod.diag\n[PROOFSTEP]\next i : 2\n[GOAL]\ncase a.h\nn : ℕ\nα : TypeVec (n + 1)\ni : Fin2 n\nx✝ : drop α i\n⊢ dropFun prod.diag i x✝ = prod.diag i x✝\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα : TypeVec (Nat.succ n✝ + 1)\nx✝ : drop α Fin2.fz\n⊢ dropFun prod.diag Fin2.fz x✝ = prod.diag Fin2.fz x✝\n[PROOFSTEP]\nsimp [dropFun, *]\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α : TypeVec (n✝ + 1)} (x : drop α a✝), dropFun prod.diag a✝ x = prod.diag a✝ x\nα : TypeVec (Nat.succ n✝ + 1)\nx✝ : drop α (Fin2.fs a✝)\n⊢ dropFun prod.diag (Fin2.fs a✝) x✝ = prod.diag (Fin2.fs a✝) x✝\n[PROOFSTEP]\nsimp [dropFun, *]\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα : TypeVec (Nat.succ n✝ + 1)\nx✝ : drop α Fin2.fz\n⊢ prod.diag (Fin2.fs Fin2.fz) x✝ = prod.diag Fin2.fz x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α : TypeVec (n✝ + 1)} (x : drop α a✝), dropFun prod.diag a✝ x = prod.diag a✝ x\nα : TypeVec (Nat.succ n✝ + 1)\nx✝ : drop α (Fin2.fs a✝)\n⊢ prod.diag (Fin2.fs (Fin2.fs a✝)) x✝ = prod.diag (Fin2.fs a✝) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nα : TypeVec (n + 1)\np : α ⟹ repeat (n + 1) Prop\n⊢ dropFun (toSubtype p) = toSubtype fun i x => p (Fin2.fs i) x\n[PROOFSTEP]\next i\n[GOAL]\ncase a.h\nn : ℕ\nα : TypeVec (n + 1)\np : α ⟹ repeat (n + 1) Prop\ni : Fin2 n\nx✝ : drop (fun i => { x // ofRepeat (p i x) }) i\n⊢ dropFun (toSubtype p) i x✝ = toSubtype (fun i x => p (Fin2.fs i) x) i x✝\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα : TypeVec (Nat.succ n✝ + 1)\np : α ⟹ repeat (Nat.succ n✝ + 1) Prop\nx✝ : drop (fun i => { x // ofRepeat (p i x) }) Fin2.fz\n⊢ dropFun (toSubtype p) Fin2.fz x✝ = toSubtype (fun i x => p (Fin2.fs i) x) Fin2.fz x✝\n[PROOFSTEP]\nsimp [dropFun, *]\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ :\n  ∀ {α : TypeVec (n✝ + 1)} (p : α ⟹ repeat (n✝ + 1) Prop) (x : drop (fun i => { x // ofRepeat (p i x) }) a✝),\n    dropFun (toSubtype p) a✝ x = toSubtype (fun i x => p (Fin2.fs i) x) a✝ x\nα : TypeVec (Nat.succ n✝ + 1)\np : α ⟹ repeat (Nat.succ n✝ + 1) Prop\nx✝ : drop (fun i => { x // ofRepeat (p i x) }) (Fin2.fs a✝)\n⊢ dropFun (toSubtype p) (Fin2.fs a✝) x✝ = toSubtype (fun i x => p (Fin2.fs i) x) (Fin2.fs a✝) x✝\n[PROOFSTEP]\nsimp [dropFun, *]\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα : TypeVec (Nat.succ n✝ + 1)\np : α ⟹ repeat (Nat.succ n✝ + 1) Prop\nx✝ : drop (fun i => { x // ofRepeat (p i x) }) Fin2.fz\n⊢ toSubtype p (Fin2.fs Fin2.fz) x✝ = toSubtype (fun i x => p (Fin2.fs i) x) Fin2.fz x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ :\n  ∀ {α : TypeVec (n✝ + 1)} (p : α ⟹ repeat (n✝ + 1) Prop) (x : drop (fun i => { x // ofRepeat (p i x) }) a✝),\n    dropFun (toSubtype p) a✝ x = toSubtype (fun i x => p (Fin2.fs i) x) a✝ x\nα : TypeVec (Nat.succ n✝ + 1)\np : α ⟹ repeat (Nat.succ n✝ + 1) Prop\nx✝ : drop (fun i => { x // ofRepeat (p i x) }) (Fin2.fs a✝)\n⊢ toSubtype p (Fin2.fs (Fin2.fs a✝)) x✝ = toSubtype (fun i x => p (Fin2.fs i) x) (Fin2.fs a✝) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nα : TypeVec (n + 1)\np : α ⟹ repeat (n + 1) Prop\n⊢ lastFun (toSubtype p) = _root_.id\n[PROOFSTEP]\next i : 2\n[GOAL]\ncase h\nn : ℕ\nα : TypeVec (n + 1)\np : α ⟹ repeat (n + 1) Prop\ni : last fun i => { x // ofRepeat (p i x) }\n⊢ lastFun (toSubtype p) i = _root_.id i\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase h.mk\nn : ℕ\nα : TypeVec (n + 1)\np : α ⟹ repeat (n + 1) Prop\nval✝ : α Fin2.fz\nproperty✝ : ofRepeat (p Fin2.fz val✝)\n⊢ lastFun (toSubtype p) { val := val✝, property := property✝ } = _root_.id { val := val✝, property := property✝ }\n[PROOFSTEP]\nsimp [dropFun, *]\n[GOAL]\ncase h.mk\nn : ℕ\nα : TypeVec (n + 1)\np : α ⟹ repeat (n + 1) Prop\nval✝ : α Fin2.fz\nproperty✝ : ofRepeat (p Fin2.fz val✝)\n⊢ lastFun (toSubtype p) { val := val✝, property := property✝ } = { val := val✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nα : TypeVec (n + 1)\np : α ⟹ repeat (n + 1) Prop\n⊢ dropFun (ofSubtype p) = ofSubtype (dropFun p)\n[PROOFSTEP]\next i : 2\n[GOAL]\ncase a.h\nn : ℕ\nα : TypeVec (n + 1)\np : α ⟹ repeat (n + 1) Prop\ni : Fin2 n\nx✝ : drop (Subtype_ p) i\n⊢ dropFun (ofSubtype p) i x✝ = ofSubtype (dropFun p) i x✝\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα : TypeVec (Nat.succ n✝ + 1)\np : α ⟹ repeat (Nat.succ n✝ + 1) Prop\nx✝ : drop (Subtype_ p) Fin2.fz\n⊢ dropFun (ofSubtype p) Fin2.fz x✝ = ofSubtype (dropFun p) Fin2.fz x✝\n[PROOFSTEP]\nsimp [dropFun, *]\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ :\n  ∀ {α : TypeVec (n✝ + 1)} (p : α ⟹ repeat (n✝ + 1) Prop) (x : drop (Subtype_ p) a✝),\n    dropFun (ofSubtype p) a✝ x = ofSubtype (dropFun p) a✝ x\nα : TypeVec (Nat.succ n✝ + 1)\np : α ⟹ repeat (Nat.succ n✝ + 1) Prop\nx✝ : drop (Subtype_ p) (Fin2.fs a✝)\n⊢ dropFun (ofSubtype p) (Fin2.fs a✝) x✝ = ofSubtype (dropFun p) (Fin2.fs a✝) x✝\n[PROOFSTEP]\nsimp [dropFun, *]\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα : TypeVec (Nat.succ n✝ + 1)\np : α ⟹ repeat (Nat.succ n✝ + 1) Prop\nx✝ : drop (Subtype_ p) Fin2.fz\n⊢ ofSubtype p (Fin2.fs Fin2.fz) x✝ = ofSubtype (fun i => p (Fin2.fs i)) Fin2.fz x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ :\n  ∀ {α : TypeVec (n✝ + 1)} (p : α ⟹ repeat (n✝ + 1) Prop) (x : drop (Subtype_ p) a✝),\n    dropFun (ofSubtype p) a✝ x = ofSubtype (dropFun p) a✝ x\nα : TypeVec (Nat.succ n✝ + 1)\np : α ⟹ repeat (Nat.succ n✝ + 1) Prop\nx✝ : drop (Subtype_ p) (Fin2.fs a✝)\n⊢ ofSubtype p (Fin2.fs (Fin2.fs a✝)) x✝ = ofSubtype (fun i => p (Fin2.fs i)) (Fin2.fs a✝) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nα : TypeVec (n + 1)\np : α ⟹ repeat (n + 1) Prop\n⊢ lastFun (ofSubtype p) = _root_.id\n[PROOFSTEP]\next i : 2\n[GOAL]\ncase h\nn : ℕ\nα : TypeVec (n + 1)\np : α ⟹ repeat (n + 1) Prop\ni : last (Subtype_ p)\n⊢ lastFun (ofSubtype p) i = _root_.id i\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase h.mk\nn : ℕ\nα : TypeVec (n + 1)\np : α ⟹ repeat (n + 1) Prop\nval✝ : α Fin2.fz\nproperty✝ : p Fin2.fz val✝\n⊢ lastFun (ofSubtype p) { val := val✝, property := property✝ } = _root_.id { val := val✝, property := property✝ }\n[PROOFSTEP]\nsimp [dropFun, *]\n[GOAL]\ncase h.mk\nn : ℕ\nα : TypeVec (n + 1)\np : α ⟹ repeat (n + 1) Prop\nval✝ : α Fin2.fz\nproperty✝ : p Fin2.fz val✝\n⊢ lastFun (ofSubtype p) { val := val✝, property := property✝ } = { val := val✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nα α' β β' : TypeVec (n + 1)\nf : α ⟹ β\nf' : α' ⟹ β'\n⊢ dropFun (f ⊗' f') = (dropFun f ⊗' dropFun f')\n[PROOFSTEP]\next i : 2\n[GOAL]\ncase a.h\nn : ℕ\nα α' β β' : TypeVec (n + 1)\nf : α ⟹ β\nf' : α' ⟹ β'\ni : Fin2 n\nx✝ : drop (α ⊗ α') i\n⊢ dropFun (f ⊗' f') i x✝ = (dropFun f ⊗' dropFun f') i x✝\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα α' β β' : TypeVec (Nat.succ n✝ + 1)\nf : α ⟹ β\nf' : α' ⟹ β'\nx✝ : drop (α ⊗ α') Fin2.fz\n⊢ dropFun (f ⊗' f') Fin2.fz x✝ = (dropFun f ⊗' dropFun f') Fin2.fz x✝\n[PROOFSTEP]\nsimp [dropFun, *]\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ :\n  ∀ {α α' β β' : TypeVec (n✝ + 1)} (f : α ⟹ β) (f' : α' ⟹ β') (x : drop (α ⊗ α') a✝),\n    dropFun (f ⊗' f') a✝ x = (dropFun f ⊗' dropFun f') a✝ x\nα α' β β' : TypeVec (Nat.succ n✝ + 1)\nf : α ⟹ β\nf' : α' ⟹ β'\nx✝ : drop (α ⊗ α') (Fin2.fs a✝)\n⊢ dropFun (f ⊗' f') (Fin2.fs a✝) x✝ = (dropFun f ⊗' dropFun f') (Fin2.fs a✝) x✝\n[PROOFSTEP]\nsimp [dropFun, *]\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα α' β β' : TypeVec (Nat.succ n✝ + 1)\nf : α ⟹ β\nf' : α' ⟹ β'\nx✝ : drop (α ⊗ α') Fin2.fz\n⊢ (f ⊗' f') (Fin2.fs Fin2.fz) x✝ = ((fun i => f (Fin2.fs i)) ⊗' fun i => f' (Fin2.fs i)) Fin2.fz x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ :\n  ∀ {α α' β β' : TypeVec (n✝ + 1)} (f : α ⟹ β) (f' : α' ⟹ β') (x : drop (α ⊗ α') a✝),\n    dropFun (f ⊗' f') a✝ x = (dropFun f ⊗' dropFun f') a✝ x\nα α' β β' : TypeVec (Nat.succ n✝ + 1)\nf : α ⟹ β\nf' : α' ⟹ β'\nx✝ : drop (α ⊗ α') (Fin2.fs a✝)\n⊢ (f ⊗' f') (Fin2.fs (Fin2.fs a✝)) x✝ = ((fun i => f (Fin2.fs i)) ⊗' fun i => f' (Fin2.fs i)) (Fin2.fs a✝) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nα α' β β' : TypeVec (n + 1)\nf : α ⟹ β\nf' : α' ⟹ β'\n⊢ lastFun (f ⊗' f') = Prod.map (lastFun f) (lastFun f')\n[PROOFSTEP]\next i : 1\n[GOAL]\ncase h\nn : ℕ\nα α' β β' : TypeVec (n + 1)\nf : α ⟹ β\nf' : α' ⟹ β'\ni : last (α ⊗ α')\n⊢ lastFun (f ⊗' f') i = Prod.map (lastFun f) (lastFun f') i\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase h.mk\nn : ℕ\nα α' β β' : TypeVec (n + 1)\nf : α ⟹ β\nf' : α' ⟹ β'\nfst✝ : last α\nsnd✝ : last α'\n⊢ lastFun (f ⊗' f') (fst✝, snd✝) = Prod.map (lastFun f) (lastFun f') (fst✝, snd✝)\n[PROOFSTEP]\nsimp [lastFun, *]\n[GOAL]\ncase h.mk\nn : ℕ\nα α' β β' : TypeVec (n + 1)\nf : α ⟹ β\nf' : α' ⟹ β'\nfst✝ : last α\nsnd✝ : last α'\n⊢ (f ⊗' f') Fin2.fz (fst✝, snd✝) = Prod.map (f Fin2.fz) (f' Fin2.fz) (fst✝, snd✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nα β : TypeVec n\n⊢ (id ⊗' id) = id\n[PROOFSTEP]\next i x : 2\n[GOAL]\ncase a.h\nn : ℕ\nα β : TypeVec n\ni : Fin2 n\nx : (α ⊗ β) i\n⊢ (id ⊗' id) i x = id i x\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα β : TypeVec (Nat.succ n✝)\nx : (α ⊗ β) Fin2.fz\n⊢ (id ⊗' id) Fin2.fz x = id Fin2.fz x\n[PROOFSTEP]\nsimp only [TypeVec.prod.map, *, dropFun_id]\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α β : TypeVec n✝} (x : (α ⊗ β) a✝), (id ⊗' id) a✝ x = id a✝ x\nα β : TypeVec (Nat.succ n✝)\nx : (α ⊗ β) (Fin2.fs a✝)\n⊢ (id ⊗' id) (Fin2.fs a✝) x = id (Fin2.fs a✝) x\n[PROOFSTEP]\nsimp only [TypeVec.prod.map, *, dropFun_id]\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα β : TypeVec (Nat.succ n✝)\nx : (α ⊗ β) Fin2.fz\n⊢ (id Fin2.fz x.fst, id Fin2.fz x.snd) = id Fin2.fz x\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α β : TypeVec n✝} (x : (α ⊗ β) a✝), (id ⊗' id) a✝ x = id a✝ x\nα β : TypeVec (Nat.succ n✝)\nx : (α ⊗ β) (Fin2.fs a✝)\n⊢ id a✝ x = id (Fin2.fs a✝) x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase a.h.fz.mk\nn n✝ : ℕ\nα β : TypeVec (Nat.succ n✝)\nfst✝ : last α\nsnd✝ : last β\n⊢ (id Fin2.fz (fst✝, snd✝).fst, id Fin2.fz (fst✝, snd✝).snd) = id Fin2.fz (fst✝, snd✝)\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α β : TypeVec n✝} (x : (α ⊗ β) a✝), (id ⊗' id) a✝ x = id a✝ x\nα β : TypeVec (Nat.succ n✝)\nx : (α ⊗ β) (Fin2.fs a✝)\n⊢ id a✝ x = id (Fin2.fs a✝) x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α β : TypeVec n✝} (x : (α ⊗ β) a✝), (id ⊗' id) a✝ x = id a✝ x\nα β : TypeVec (Nat.succ n✝)\nx : (α ⊗ β) (Fin2.fs a✝)\n⊢ id a✝ x = id (Fin2.fs a✝) x\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nα : TypeVec n\n⊢ subtypeVal (repeatEq α) ⊚ diagSub = prod.diag\n[PROOFSTEP]\next i x\n[GOAL]\ncase a.h\nn : ℕ\nα : TypeVec n\ni : Fin2 n\nx : α i\n⊢ (subtypeVal (repeatEq α) ⊚ diagSub) i x = prod.diag i x\n[PROOFSTEP]\ninduction' i with _ _ _ i_ih\n[GOAL]\ncase a.h.fz\nn : ℕ\nα✝ : TypeVec n\ni : Fin2 n\nx✝ : α✝ i\nn✝ : ℕ\nα : TypeVec (Nat.succ n✝)\nx : α Fin2.fz\n⊢ (subtypeVal (repeatEq α) ⊚ diagSub) Fin2.fz x = prod.diag Fin2.fz x\n[PROOFSTEP]\nsimp [comp, diagSub, subtypeVal, prod.diag]\n[GOAL]\ncase a.h.fs\nn : ℕ\nα✝ : TypeVec n\ni : Fin2 n\nx✝ : α✝ i\nn✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α : TypeVec n✝} (x : α a✝), (subtypeVal (repeatEq α) ⊚ diagSub) a✝ x = prod.diag a✝ x\nα : TypeVec (Nat.succ n✝)\nx : α (Fin2.fs a✝)\n⊢ (subtypeVal (repeatEq α) ⊚ diagSub) (Fin2.fs a✝) x = prod.diag (Fin2.fs a✝) x\n[PROOFSTEP]\nsimp [prod.diag]\n[GOAL]\ncase a.h.fs\nn : ℕ\nα✝ : TypeVec n\ni : Fin2 n\nx✝ : α✝ i\nn✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α : TypeVec n✝} (x : α a✝), (subtypeVal (repeatEq α) ⊚ diagSub) a✝ x = prod.diag a✝ x\nα : TypeVec (Nat.succ n✝)\nx : α (Fin2.fs a✝)\n⊢ (subtypeVal (repeatEq α) ⊚ diagSub) (Fin2.fs a✝) x = prod.diag a✝ x\n[PROOFSTEP]\nsimp [comp, diagSub, subtypeVal, prod.diag] at *\n[GOAL]\ncase a.h.fs\nn : ℕ\nα✝ : TypeVec n\ni : Fin2 n\nx✝ : α✝ i\nn✝ : ℕ\na✝ : Fin2 n✝\ni_ih : ∀ {α : TypeVec n✝} (x : α a✝), subtypeVal (repeatEq α) a✝ (diagSub a✝ x) = prod.diag a✝ x\nα : TypeVec (Nat.succ n✝)\nx : α (Fin2.fs a✝)\n⊢ subtypeVal (dropFun (repeatEq α)) a✝ (diagSub a✝ x) = prod.diag a✝ x\n[PROOFSTEP]\napply @i_ih (drop _)\n[GOAL]\nn : ℕ\nα : TypeVec n\np : α ⟹ repeat n Prop\n⊢ toSubtype p ⊚ ofSubtype p = id\n[PROOFSTEP]\next i x\n[GOAL]\ncase a.h\nn : ℕ\nα : TypeVec n\np : α ⟹ repeat n Prop\ni : Fin2 n\nx : Subtype_ p i\n⊢ (toSubtype p ⊚ ofSubtype p) i x = id i x\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα : TypeVec (Nat.succ n✝)\np : α ⟹ repeat (Nat.succ n✝) Prop\nx : Subtype_ p Fin2.fz\n⊢ (toSubtype p ⊚ ofSubtype p) Fin2.fz x = id Fin2.fz x\n[PROOFSTEP]\ndsimp only [id, toSubtype, comp, ofSubtype] at *\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α : TypeVec n✝} (p : α ⟹ repeat n✝ Prop) (x : Subtype_ p a✝), (toSubtype p ⊚ ofSubtype p) a✝ x = id a✝ x\nα : TypeVec (Nat.succ n✝)\np : α ⟹ repeat (Nat.succ n✝) Prop\nx : Subtype_ p (Fin2.fs a✝)\n⊢ (toSubtype p ⊚ ofSubtype p) (Fin2.fs a✝) x = id (Fin2.fs a✝) x\n[PROOFSTEP]\ndsimp only [id, toSubtype, comp, ofSubtype] at *\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α : TypeVec n✝} (p : α ⟹ repeat n✝ Prop) (x : Subtype_ p a✝), toSubtype p a✝ (ofSubtype p a✝ x) = x\nα : TypeVec (Nat.succ n✝)\np : α ⟹ repeat (Nat.succ n✝) Prop\nx : Subtype_ p (Fin2.fs a✝)\n⊢ toSubtype (dropFun p) a✝ (ofSubtype (dropFun p) a✝ x) = x\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nn : ℕ\nα : TypeVec n\np : α ⟹ repeat n Prop\n⊢ subtypeVal p ⊚ toSubtype p = fun x => Subtype.val\n[PROOFSTEP]\next i x\n[GOAL]\ncase a.h\nn : ℕ\nα : TypeVec n\np : α ⟹ repeat n Prop\ni : Fin2 n\nx : (fun i => { x // ofRepeat (p i x) }) i\n⊢ (subtypeVal p ⊚ toSubtype p) i x = ↑x\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα : TypeVec (Nat.succ n✝)\np : α ⟹ repeat (Nat.succ n✝) Prop\nx : { x // ofRepeat (p Fin2.fz x) }\n⊢ (subtypeVal p ⊚ toSubtype p) Fin2.fz x = ↑x\n[PROOFSTEP]\ndsimp only [toSubtype, comp, subtypeVal] at *\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ :\n  ∀ {α : TypeVec n✝} (p : α ⟹ repeat n✝ Prop) (x : (fun i => { x // ofRepeat (p i x) }) a✝),\n    (subtypeVal p ⊚ toSubtype p) a✝ x = ↑x\nα : TypeVec (Nat.succ n✝)\np : α ⟹ repeat (Nat.succ n✝) Prop\nx : { x // ofRepeat (p (Fin2.fs a✝) x) }\n⊢ (subtypeVal p ⊚ toSubtype p) (Fin2.fs a✝) x = ↑x\n[PROOFSTEP]\ndsimp only [toSubtype, comp, subtypeVal] at *\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ :\n  ∀ {α : TypeVec n✝} (p : α ⟹ repeat n✝ Prop) (x : { x // ofRepeat (p a✝ x) }), subtypeVal p a✝ (toSubtype p a✝ x) = ↑x\nα : TypeVec (Nat.succ n✝)\np : α ⟹ repeat (Nat.succ n✝) Prop\nx : { x // ofRepeat (p (Fin2.fs a✝) x) }\n⊢ subtypeVal (dropFun p) a✝ (toSubtype (dropFun p) a✝ x) = ↑x\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nn : ℕ\nα : TypeVec n\nβ : TypeVec n\np : α ⟹ repeat n Prop\nf : β ⟹ Subtype_ p\n⊢ toSubtype p ⊚ (ofSubtype fun i x => p i x) ⊚ f = f\n[PROOFSTEP]\nrw [← comp_assoc, toSubtype_of_subtype]\n[GOAL]\nn : ℕ\nα : TypeVec n\nβ : TypeVec n\np : α ⟹ repeat n Prop\nf : β ⟹ Subtype_ p\n⊢ id ⊚ f = f\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\nα : TypeVec n\nr : α ⊗ α ⟹ repeat n Prop\n⊢ toSubtype' r ⊚ ofSubtype' r = id\n[PROOFSTEP]\next i x\n[GOAL]\ncase a.h\nn : ℕ\nα : TypeVec n\nr : α ⊗ α ⟹ repeat n Prop\ni : Fin2 n\nx : Subtype_ r i\n⊢ (toSubtype' r ⊚ ofSubtype' r) i x = id i x\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα : TypeVec (Nat.succ n✝)\nr : α ⊗ α ⟹ repeat (Nat.succ n✝) Prop\nx : Subtype_ r Fin2.fz\n⊢ (toSubtype' r ⊚ ofSubtype' r) Fin2.fz x = id Fin2.fz x\n[PROOFSTEP]\ndsimp only [id, toSubtype', comp, ofSubtype'] at *\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ :\n  ∀ {α : TypeVec n✝} (r : α ⊗ α ⟹ repeat n✝ Prop) (x : Subtype_ r a✝), (toSubtype' r ⊚ ofSubtype' r) a✝ x = id a✝ x\nα : TypeVec (Nat.succ n✝)\nr : α ⊗ α ⟹ repeat (Nat.succ n✝) Prop\nx : Subtype_ r (Fin2.fs a✝)\n⊢ (toSubtype' r ⊚ ofSubtype' r) (Fin2.fs a✝) x = id (Fin2.fs a✝) x\n[PROOFSTEP]\ndsimp only [id, toSubtype', comp, ofSubtype'] at *\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα : TypeVec (Nat.succ n✝)\nr : α ⊗ α ⟹ repeat (Nat.succ n✝) Prop\nx : Subtype_ r Fin2.fz\n⊢ { val := ↑x,\n      property :=\n        (_ : r Fin2.fz ↑{ val := ↑x, property := (_ : ofRepeat (r Fin2.fz (prod.mk Fin2.fz (↑x).fst (↑x).snd))) }) } =\n    x\n[PROOFSTEP]\nsimp [Subtype.eta, *]\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ : ∀ {α : TypeVec n✝} (r : α ⊗ α ⟹ repeat n✝ Prop) (x : Subtype_ r a✝), toSubtype' r a✝ (ofSubtype' r a✝ x) = x\nα : TypeVec (Nat.succ n✝)\nr : α ⊗ α ⟹ repeat (Nat.succ n✝) Prop\nx : Subtype_ r (Fin2.fs a✝)\n⊢ toSubtype' (dropFun r) a✝ (ofSubtype' (dropFun r) a✝ x) = x\n[PROOFSTEP]\nsimp [Subtype.eta, *]\n[GOAL]\nn : ℕ\nα : TypeVec n\nr : α ⊗ α ⟹ repeat n Prop\n⊢ subtypeVal r ⊚ toSubtype' r = fun i x => prod.mk i (↑x).fst (↑x).snd\n[PROOFSTEP]\next i x\n[GOAL]\ncase a.h\nn : ℕ\nα : TypeVec n\nr : α ⊗ α ⟹ repeat n Prop\ni : Fin2 n\nx : (fun i => { x // ofRepeat (r i (prod.mk i x.fst x.snd)) }) i\n⊢ (subtypeVal r ⊚ toSubtype' r) i x = prod.mk i (↑x).fst (↑x).snd\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase a.h.fz\nn n✝ : ℕ\nα : TypeVec (Nat.succ n✝)\nr : α ⊗ α ⟹ repeat (Nat.succ n✝) Prop\nx : { x // ofRepeat (r Fin2.fz (prod.mk Fin2.fz x.fst x.snd)) }\n⊢ (subtypeVal r ⊚ toSubtype' r) Fin2.fz x = prod.mk Fin2.fz (↑x).fst (↑x).snd\n[PROOFSTEP]\ndsimp only [id, toSubtype', comp, subtypeVal, prod.mk] at *\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ :\n  ∀ {α : TypeVec n✝} (r : α ⊗ α ⟹ repeat n✝ Prop) (x : (fun i => { x // ofRepeat (r i (prod.mk i x.fst x.snd)) }) a✝),\n    (subtypeVal r ⊚ toSubtype' r) a✝ x = prod.mk a✝ (↑x).fst (↑x).snd\nα : TypeVec (Nat.succ n✝)\nr : α ⊗ α ⟹ repeat (Nat.succ n✝) Prop\nx : { x // ofRepeat (r (Fin2.fs a✝) (prod.mk (Fin2.fs a✝) x.fst x.snd)) }\n⊢ (subtypeVal r ⊚ toSubtype' r) (Fin2.fs a✝) x = prod.mk (Fin2.fs a✝) (↑x).fst (↑x).snd\n[PROOFSTEP]\ndsimp only [id, toSubtype', comp, subtypeVal, prod.mk] at *\n[GOAL]\ncase a.h.fs\nn n✝ : ℕ\na✝ : Fin2 n✝\na_ih✝ :\n  ∀ {α : TypeVec n✝} (r : α ⊗ α ⟹ repeat n✝ Prop) (x : { x // ofRepeat (r a✝ (prod.mk a✝ x.fst x.snd)) }),\n    subtypeVal r a✝ (toSubtype' r a✝ x) = prod.mk a✝ (↑x).fst (↑x).snd\nα : TypeVec (Nat.succ n✝)\nr : α ⊗ α ⟹ repeat (Nat.succ n✝) Prop\nx : { x // ofRepeat (r (Fin2.fs a✝) (prod.mk (Fin2.fs a✝) x.fst x.snd)) }\n⊢ subtypeVal (dropFun r) a✝ (toSubtype' (dropFun r) a✝ x) = prod.mk a✝ (↑x).fst (↑x).snd\n[PROOFSTEP]\nsimp [*]\n", "meta": {"mathlib_filename": "Mathlib.Data.TypeVec", "llama_tokens": 27175, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6791786861878392, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.35814214355407337}}
{"text": "[GOAL]\nx✝ x : PGame\nIHl : ∀ (i : LeftMoves x), Acc IsOption (moveLeft x i)\nIHr : ∀ (j : RightMoves x), Acc IsOption (moveRight x j)\ny : PGame\nh : IsOption y x\n⊢ Acc IsOption y\n[PROOFSTEP]\ninduction' h with _ i _ j\n[GOAL]\ncase moveLeft\nx✝¹ x : PGame\nIHl✝ : ∀ (i : LeftMoves x), Acc IsOption (moveLeft x i)\nIHr✝ : ∀ (j : RightMoves x), Acc IsOption (moveRight x j)\ny x✝ : PGame\ni : LeftMoves x✝\nIHl : ∀ (i : LeftMoves x✝), Acc IsOption (moveLeft x✝ i)\nIHr : ∀ (j : RightMoves x✝), Acc IsOption (moveRight x✝ j)\n⊢ Acc IsOption (moveLeft x✝ i)\n[PROOFSTEP]\nexact IHl i\n[GOAL]\ncase moveRight\nx✝¹ x : PGame\nIHl✝ : ∀ (i : LeftMoves x), Acc IsOption (moveLeft x i)\nIHr✝ : ∀ (j : RightMoves x), Acc IsOption (moveRight x j)\ny x✝ : PGame\nj : RightMoves x✝\nIHl : ∀ (i : LeftMoves x✝), Acc IsOption (moveLeft x✝ i)\nIHr : ∀ (j : RightMoves x✝), Acc IsOption (moveRight x✝ j)\n⊢ Acc IsOption (moveRight x✝ j)\n[PROOFSTEP]\nexact IHr j\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nj : RightMoves (mk xl xr xL xR)\n⊢ Subsequent (xR j) (mk xl xr xL xR)\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl : Type u_1\ni : xl\nxr : Type u_1\nxR : xr → PGame\nxL : xl → PGame\nj : RightMoves (xL i)\n⊢ Subsequent (PGame.moveRight (xL i) j) (mk xl xr xL xR)\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxr : Type u_1\ni : xr\nxl : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nj : RightMoves (xR i)\n⊢ Subsequent (PGame.moveRight (xR i) j) (mk xl xr xL xR)\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxl : Type u_1\ni : xl\nxr : Type u_1\nxR : xr → PGame\nxL : xl → PGame\nj : LeftMoves (xL i)\n⊢ Subsequent (PGame.moveLeft (xL i) j) (mk xl xr xL xR)\n[PROOFSTEP]\npgame_wf_tac\n[GOAL]\nxr : Type u_1\ni : xr\nxl : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nj : LeftMoves (xR i)\n⊢ Subsequent (PGame.moveLeft (xR i) j) (mk xl xr xL xR)\n[PROOFSTEP]\npgame_wf_tac\n  -- Porting note: linter claims these lemmas don't simplify?\n[GOAL]\nx y : PGame\n⊢ x ≤ y ↔ (∀ (i : LeftMoves x), moveLeft x i ⧏ y) ∧ ∀ (j : RightMoves y), x ⧏ moveRight y j\n[PROOFSTEP]\nunfold LE.le le\n[GOAL]\nx y : PGame\n⊢ {\n          le :=\n            Sym2.GameAdd.fix wf_isOption fun x y le =>\n              (∀ (i : LeftMoves x),\n                  ¬le y (moveLeft x i)\n                      (_ :\n                        Sym2.GameAdd IsOption (Quotient.mk (Sym2.Rel.setoid PGame) (y, moveLeft x i))\n                          (Quotient.mk (Sym2.Rel.setoid PGame) (x, y)))) ∧\n                ∀ (j : RightMoves y),\n                  ¬le (moveRight y j) x\n                      (_ :\n                        Sym2.GameAdd IsOption (Quotient.mk (Sym2.Rel.setoid PGame) (moveRight y j, x))\n                          (Quotient.mk (Sym2.Rel.setoid PGame) (x, y))) }.1\n      x y ↔\n    (∀ (i : LeftMoves x), moveLeft x i ⧏ y) ∧ ∀ (j : RightMoves y), x ⧏ moveRight y j\n[PROOFSTEP]\nsimp only\n[GOAL]\nx y : PGame\n⊢ Sym2.GameAdd.fix wf_isOption\n      (fun x y le =>\n        (∀ (i : LeftMoves x),\n            ¬le y (moveLeft x i)\n                (_ :\n                  Sym2.GameAdd IsOption (Quotient.mk (Sym2.Rel.setoid PGame) (y, moveLeft x i))\n                    (Quotient.mk (Sym2.Rel.setoid PGame) (x, y)))) ∧\n          ∀ (j : RightMoves y),\n            ¬le (moveRight y j) x\n                (_ :\n                  Sym2.GameAdd IsOption (Quotient.mk (Sym2.Rel.setoid PGame) (moveRight y j, x))\n                    (Quotient.mk (Sym2.Rel.setoid PGame) (x, y))))\n      x y ↔\n    (∀ (i : LeftMoves x), moveLeft x i ⧏ y) ∧ ∀ (j : RightMoves y), x ⧏ moveRight y j\n[PROOFSTEP]\nrw [Sym2.GameAdd.fix_eq]\n[GOAL]\nx y : PGame\n⊢ ((∀ (i : LeftMoves x),\n        ¬(fun a' b' x =>\n              Sym2.GameAdd.fix wf_isOption\n                (fun x y le =>\n                  (∀ (i : LeftMoves x),\n                      ¬le y (moveLeft x i)\n                          (_ :\n                            Sym2.GameAdd IsOption (Quotient.mk (Sym2.Rel.setoid PGame) (y, moveLeft x i))\n                              (Quotient.mk (Sym2.Rel.setoid PGame) (x, y)))) ∧\n                    ∀ (j : RightMoves y),\n                      ¬le (moveRight y j) x\n                          (_ :\n                            Sym2.GameAdd IsOption (Quotient.mk (Sym2.Rel.setoid PGame) (moveRight y j, x))\n                              (Quotient.mk (Sym2.Rel.setoid PGame) (x, y))))\n                a' b')\n            y (moveLeft x i)\n            (_ :\n              Sym2.GameAdd IsOption (Quotient.mk (Sym2.Rel.setoid PGame) (y, moveLeft x i))\n                (Quotient.mk (Sym2.Rel.setoid PGame) (x, y)))) ∧\n      ∀ (j : RightMoves y),\n        ¬(fun a' b' x =>\n              Sym2.GameAdd.fix wf_isOption\n                (fun x y le =>\n                  (∀ (i : LeftMoves x),\n                      ¬le y (moveLeft x i)\n                          (_ :\n                            Sym2.GameAdd IsOption (Quotient.mk (Sym2.Rel.setoid PGame) (y, moveLeft x i))\n                              (Quotient.mk (Sym2.Rel.setoid PGame) (x, y)))) ∧\n                    ∀ (j : RightMoves y),\n                      ¬le (moveRight y j) x\n                          (_ :\n                            Sym2.GameAdd IsOption (Quotient.mk (Sym2.Rel.setoid PGame) (moveRight y j, x))\n                              (Quotient.mk (Sym2.Rel.setoid PGame) (x, y))))\n                a' b')\n            (moveRight y j) x\n            (_ :\n              Sym2.GameAdd IsOption (Quotient.mk (Sym2.Rel.setoid PGame) (moveRight y j, x))\n                (Quotient.mk (Sym2.Rel.setoid PGame) (x, y)))) ↔\n    (∀ (i : LeftMoves x), moveLeft x i ⧏ y) ∧ ∀ (j : RightMoves y), x ⧏ moveRight y j\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : PGame\n⊢ x ⧏ y ↔ (∃ i, x ≤ moveLeft y i) ∨ ∃ j, moveRight x j ≤ y\n[PROOFSTEP]\nrw [Lf, le_iff_forall_lf, not_and_or]\n[GOAL]\nx y : PGame\n⊢ ((¬∀ (i : LeftMoves y), moveLeft y i ⧏ x) ∨ ¬∀ (j : RightMoves x), y ⧏ moveRight x j) ↔\n    (∃ i, x ≤ moveLeft y i) ∨ ∃ j, moveRight x j ≤ y\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : PGame\n⊢ x ≤ y ∨ y ⧏ x\n[PROOFSTEP]\nrw [← PGame.not_le]\n[GOAL]\nx y : PGame\n⊢ x ≤ y ∨ ¬x ≤ y\n[PROOFSTEP]\napply em\n[GOAL]\nsrc✝ : LE PGame := le\nx : PGame\n⊢ x ≤ x\n[PROOFSTEP]\ninduction' x with _ _ _ _ IHl IHr\n[GOAL]\ncase mk\nsrc✝ : LE PGame := le\nα✝ β✝ : Type ?u.34536\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\nIHl : ∀ (a : α✝), a✝¹ a ≤ a✝¹ a\nIHr : ∀ (a : β✝), a✝ a ≤ a✝ a\n⊢ mk α✝ β✝ a✝¹ a✝ ≤ mk α✝ β✝ a✝¹ a✝\n[PROOFSTEP]\nexact le_of_forall_lf (fun i => lf_of_le_moveLeft (IHl i)) fun i => lf_of_moveRight_le (IHr i)\n[GOAL]\nsrc✝ : LE PGame := le\n⊢ ∀ (a b c : PGame), a ≤ b → b ≤ c → a ≤ c\n[PROOFSTEP]\nsuffices : ∀ {x y z : PGame}, (x ≤ y → y ≤ z → x ≤ z) ∧ (y ≤ z → z ≤ x → y ≤ x) ∧ (z ≤ x → x ≤ y → z ≤ y)\n[GOAL]\nsrc✝ : LE PGame := le\nthis : ∀ {x y z : PGame}, (x ≤ y → y ≤ z → x ≤ z) ∧ (y ≤ z → z ≤ x → y ≤ x) ∧ (z ≤ x → x ≤ y → z ≤ y)\n⊢ ∀ (a b c : PGame), a ≤ b → b ≤ c → a ≤ c\ncase this\nsrc✝ : LE PGame := le\n⊢ ∀ {x y z : PGame}, (x ≤ y → y ≤ z → x ≤ z) ∧ (y ≤ z → z ≤ x → y ≤ x) ∧ (z ≤ x → x ≤ y → z ≤ y)\n[PROOFSTEP]\nexact fun x y z => this.1\n[GOAL]\ncase this\nsrc✝ : LE PGame := le\n⊢ ∀ {x y z : PGame}, (x ≤ y → y ≤ z → x ≤ z) ∧ (y ≤ z → z ≤ x → y ≤ x) ∧ (z ≤ x → x ≤ y → z ≤ y)\n[PROOFSTEP]\nintro x y z\n[GOAL]\ncase this\nsrc✝ : LE PGame := le\nx y z : PGame\n⊢ (x ≤ y → y ≤ z → x ≤ z) ∧ (y ≤ z → z ≤ x → y ≤ x) ∧ (z ≤ x → x ≤ y → z ≤ y)\n[PROOFSTEP]\ninduction' x with xl xr xL xR IHxl IHxr generalizing y z\n[GOAL]\ncase this.mk\nsrc✝ : LE PGame := le\ny✝ z✝ : PGame\nxl xr : Type ?u.34927\nxL : xl → PGame\nxR : xr → PGame\nIHxl :\n  ∀ (a : xl) {y z : PGame},\n    (xL a ≤ y → y ≤ z → xL a ≤ z) ∧ (y ≤ z → z ≤ xL a → y ≤ xL a) ∧ (z ≤ xL a → xL a ≤ y → z ≤ y)\nIHxr :\n  ∀ (a : xr) {y z : PGame},\n    (xR a ≤ y → y ≤ z → xR a ≤ z) ∧ (y ≤ z → z ≤ xR a → y ≤ xR a) ∧ (z ≤ xR a → xR a ≤ y → z ≤ y)\ny z : PGame\n⊢ (mk xl xr xL xR ≤ y → y ≤ z → mk xl xr xL xR ≤ z) ∧\n    (y ≤ z → z ≤ mk xl xr xL xR → y ≤ mk xl xr xL xR) ∧ (z ≤ mk xl xr xL xR → mk xl xr xL xR ≤ y → z ≤ y)\n[PROOFSTEP]\ninduction' y with yl yr yL yR IHyl IHyr generalizing z\n[GOAL]\ncase this.mk.mk\nsrc✝ : LE PGame := le\ny z✝¹ : PGame\nxl xr : Type ?u.34969\nxL : xl → PGame\nxR : xr → PGame\nIHxl :\n  ∀ (a : xl) {y z : PGame},\n    (xL a ≤ y → y ≤ z → xL a ≤ z) ∧ (y ≤ z → z ≤ xL a → y ≤ xL a) ∧ (z ≤ xL a → xL a ≤ y → z ≤ y)\nIHxr :\n  ∀ (a : xr) {y z : PGame},\n    (xR a ≤ y → y ≤ z → xR a ≤ z) ∧ (y ≤ z → z ≤ xR a → y ≤ xR a) ∧ (z ≤ xR a → xR a ≤ y → z ≤ y)\nz✝ : PGame\nyl yr : Type ?u.34969\nyL : yl → PGame\nyR : yr → PGame\nIHyl :\n  ∀ (a : yl) {z : PGame},\n    (mk xl xr xL xR ≤ yL a → yL a ≤ z → mk xl xr xL xR ≤ z) ∧\n      (yL a ≤ z → z ≤ mk xl xr xL xR → yL a ≤ mk xl xr xL xR) ∧ (z ≤ mk xl xr xL xR → mk xl xr xL xR ≤ yL a → z ≤ yL a)\nIHyr :\n  ∀ (a : yr) {z : PGame},\n    (mk xl xr xL xR ≤ yR a → yR a ≤ z → mk xl xr xL xR ≤ z) ∧\n      (yR a ≤ z → z ≤ mk xl xr xL xR → yR a ≤ mk xl xr xL xR) ∧ (z ≤ mk xl xr xL xR → mk xl xr xL xR ≤ yR a → z ≤ yR a)\nz : PGame\n⊢ (mk xl xr xL xR ≤ mk yl yr yL yR → mk yl yr yL yR ≤ z → mk xl xr xL xR ≤ z) ∧\n    (mk yl yr yL yR ≤ z → z ≤ mk xl xr xL xR → mk yl yr yL yR ≤ mk xl xr xL xR) ∧\n      (z ≤ mk xl xr xL xR → mk xl xr xL xR ≤ mk yl yr yL yR → z ≤ mk yl yr yL yR)\n[PROOFSTEP]\ninduction' z with zl zr zL zR IHzl IHzr\n[GOAL]\ncase this.mk.mk.mk\nsrc✝ : LE PGame := le\ny z✝ : PGame\nxl xr : Type ?u.35006\nxL : xl → PGame\nxR : xr → PGame\nIHxl :\n  ∀ (a : xl) {y z : PGame},\n    (xL a ≤ y → y ≤ z → xL a ≤ z) ∧ (y ≤ z → z ≤ xL a → y ≤ xL a) ∧ (z ≤ xL a → xL a ≤ y → z ≤ y)\nIHxr :\n  ∀ (a : xr) {y z : PGame},\n    (xR a ≤ y → y ≤ z → xR a ≤ z) ∧ (y ≤ z → z ≤ xR a → y ≤ xR a) ∧ (z ≤ xR a → xR a ≤ y → z ≤ y)\nz : PGame\nyl yr : Type ?u.35006\nyL : yl → PGame\nyR : yr → PGame\nIHyl :\n  ∀ (a : yl) {z : PGame},\n    (mk xl xr xL xR ≤ yL a → yL a ≤ z → mk xl xr xL xR ≤ z) ∧\n      (yL a ≤ z → z ≤ mk xl xr xL xR → yL a ≤ mk xl xr xL xR) ∧ (z ≤ mk xl xr xL xR → mk xl xr xL xR ≤ yL a → z ≤ yL a)\nIHyr :\n  ∀ (a : yr) {z : PGame},\n    (mk xl xr xL xR ≤ yR a → yR a ≤ z → mk xl xr xL xR ≤ z) ∧\n      (yR a ≤ z → z ≤ mk xl xr xL xR → yR a ≤ mk xl xr xL xR) ∧ (z ≤ mk xl xr xL xR → mk xl xr xL xR ≤ yR a → z ≤ yR a)\nzl zr : Type ?u.35006\nzL : zl → PGame\nzR : zr → PGame\nIHzl :\n  ∀ (a : zl),\n    (mk xl xr xL xR ≤ mk yl yr yL yR → mk yl yr yL yR ≤ zL a → mk xl xr xL xR ≤ zL a) ∧\n      (mk yl yr yL yR ≤ zL a → zL a ≤ mk xl xr xL xR → mk yl yr yL yR ≤ mk xl xr xL xR) ∧\n        (zL a ≤ mk xl xr xL xR → mk xl xr xL xR ≤ mk yl yr yL yR → zL a ≤ mk yl yr yL yR)\nIHzr :\n  ∀ (a : zr),\n    (mk xl xr xL xR ≤ mk yl yr yL yR → mk yl yr yL yR ≤ zR a → mk xl xr xL xR ≤ zR a) ∧\n      (mk yl yr yL yR ≤ zR a → zR a ≤ mk xl xr xL xR → mk yl yr yL yR ≤ mk xl xr xL xR) ∧\n        (zR a ≤ mk xl xr xL xR → mk xl xr xL xR ≤ mk yl yr yL yR → zR a ≤ mk yl yr yL yR)\n⊢ (mk xl xr xL xR ≤ mk yl yr yL yR → mk yl yr yL yR ≤ mk zl zr zL zR → mk xl xr xL xR ≤ mk zl zr zL zR) ∧\n    (mk yl yr yL yR ≤ mk zl zr zL zR → mk zl zr zL zR ≤ mk xl xr xL xR → mk yl yr yL yR ≤ mk xl xr xL xR) ∧\n      (mk zl zr zL zR ≤ mk xl xr xL xR → mk xl xr xL xR ≤ mk yl yr yL yR → mk zl zr zL zR ≤ mk yl yr yL yR)\n[PROOFSTEP]\nexact\n  ⟨le_trans_aux (fun {i} => (IHxl i).2.1) fun {j} => (IHzr j).2.2,\n    le_trans_aux (fun {i} => (IHyl i).2.2) fun {j} => (IHxr j).1,\n    le_trans_aux (fun {i} => (IHzl i).1) fun {j} => (IHyr j).2.1⟩\n[GOAL]\nx y z : PGame\nh₁ : x ≤ y\nh₂ : y ⧏ z\n⊢ x ⧏ z\n[PROOFSTEP]\nrw [← PGame.not_le] at h₂ ⊢\n[GOAL]\nx y z : PGame\nh₁ : x ≤ y\nh₂ : ¬z ≤ y\n⊢ ¬z ≤ x\n[PROOFSTEP]\nexact fun h₃ => h₂ (h₃.trans h₁)\n[GOAL]\nx y z : PGame\nh₁ : x ⧏ y\nh₂ : y ≤ z\n⊢ x ⧏ z\n[PROOFSTEP]\nrw [← PGame.not_le] at h₁ ⊢\n[GOAL]\nx y z : PGame\nh₁ : ¬y ≤ x\nh₂ : y ≤ z\n⊢ ¬z ≤ x\n[PROOFSTEP]\nexact fun h₃ => h₁ (h₂.trans h₃)\n[GOAL]\nx y : PGame\n⊢ x ≤ y ↔\n    (∀ (i : LeftMoves x), (∃ i', moveLeft x i ≤ moveLeft y i') ∨ ∃ j, moveRight (moveLeft x i) j ≤ y) ∧\n      ∀ (j : RightMoves y), (∃ i, x ≤ moveLeft (moveRight y j) i) ∨ ∃ j', moveRight x j' ≤ moveRight y j\n[PROOFSTEP]\nrw [le_iff_forall_lf]\n[GOAL]\nx y : PGame\n⊢ ((∀ (i : LeftMoves x), moveLeft x i ⧏ y) ∧ ∀ (j : RightMoves y), x ⧏ moveRight y j) ↔\n    (∀ (i : LeftMoves x), (∃ i', moveLeft x i ≤ moveLeft y i') ∨ ∃ j, moveRight (moveLeft x i) j ≤ y) ∧\n      ∀ (j : RightMoves y), (∃ i, x ≤ moveLeft (moveRight y j) i) ∨ ∃ j', moveRight x j' ≤ moveRight y j\n[PROOFSTEP]\nconv =>\n  lhs\n  simp only [lf_iff_exists_le]\n[GOAL]\nx y : PGame\n| ((∀ (i : LeftMoves x), moveLeft x i ⧏ y) ∧ ∀ (j : RightMoves y), x ⧏ moveRight y j) ↔\n    (∀ (i : LeftMoves x), (∃ i', moveLeft x i ≤ moveLeft y i') ∨ ∃ j, moveRight (moveLeft x i) j ≤ y) ∧\n      ∀ (j : RightMoves y), (∃ i, x ≤ moveLeft (moveRight y j) i) ∨ ∃ j', moveRight x j' ≤ moveRight y j\n[PROOFSTEP]\n  lhs\n  simp only [lf_iff_exists_le]\n[GOAL]\nx y : PGame\n| ((∀ (i : LeftMoves x), moveLeft x i ⧏ y) ∧ ∀ (j : RightMoves y), x ⧏ moveRight y j) ↔\n    (∀ (i : LeftMoves x), (∃ i', moveLeft x i ≤ moveLeft y i') ∨ ∃ j, moveRight (moveLeft x i) j ≤ y) ∧\n      ∀ (j : RightMoves y), (∃ i, x ≤ moveLeft (moveRight y j) i) ∨ ∃ j', moveRight x j' ≤ moveRight y j\n[PROOFSTEP]\n  lhs\n  simp only [lf_iff_exists_le]\n[GOAL]\nx y : PGame\n| ((∀ (i : LeftMoves x), moveLeft x i ⧏ y) ∧ ∀ (j : RightMoves y), x ⧏ moveRight y j) ↔\n    (∀ (i : LeftMoves x), (∃ i', moveLeft x i ≤ moveLeft y i') ∨ ∃ j, moveRight (moveLeft x i) j ≤ y) ∧\n      ∀ (j : RightMoves y), (∃ i, x ≤ moveLeft (moveRight y j) i) ∨ ∃ j', moveRight x j' ≤ moveRight y j\n[PROOFSTEP]\nlhs\n[GOAL]\nx y : PGame\n| (∀ (i : LeftMoves x), moveLeft x i ⧏ y) ∧ ∀ (j : RightMoves y), x ⧏ moveRight y j\n[PROOFSTEP]\nsimp only [lf_iff_exists_le]\n[GOAL]\nx y : PGame\n⊢ x ⧏ y ↔\n    (∃ i,\n        (∀ (i' : LeftMoves x), moveLeft x i' ⧏ moveLeft y i) ∧\n          ∀ (j : RightMoves (moveLeft y i)), x ⧏ moveRight (moveLeft y i) j) ∨\n      ∃ j,\n        (∀ (i : LeftMoves (moveRight x j)), moveLeft (moveRight x j) i ⧏ y) ∧\n          ∀ (j' : RightMoves y), moveRight x j ⧏ moveRight y j'\n[PROOFSTEP]\nrw [lf_iff_exists_le]\n[GOAL]\nx y : PGame\n⊢ ((∃ i, x ≤ moveLeft y i) ∨ ∃ j, moveRight x j ≤ y) ↔\n    (∃ i,\n        (∀ (i' : LeftMoves x), moveLeft x i' ⧏ moveLeft y i) ∧\n          ∀ (j : RightMoves (moveLeft y i)), x ⧏ moveRight (moveLeft y i) j) ∨\n      ∃ j,\n        (∀ (i : LeftMoves (moveRight x j)), moveLeft (moveRight x j) i ⧏ y) ∧\n          ∀ (j' : RightMoves y), moveRight x j ⧏ moveRight y j'\n[PROOFSTEP]\nconv =>\n  lhs\n  simp only [le_iff_forall_lf]\n[GOAL]\nx y : PGame\n| ((∃ i, x ≤ moveLeft y i) ∨ ∃ j, moveRight x j ≤ y) ↔\n    (∃ i,\n        (∀ (i' : LeftMoves x), moveLeft x i' ⧏ moveLeft y i) ∧\n          ∀ (j : RightMoves (moveLeft y i)), x ⧏ moveRight (moveLeft y i) j) ∨\n      ∃ j,\n        (∀ (i : LeftMoves (moveRight x j)), moveLeft (moveRight x j) i ⧏ y) ∧\n          ∀ (j' : RightMoves y), moveRight x j ⧏ moveRight y j'\n[PROOFSTEP]\n  lhs\n  simp only [le_iff_forall_lf]\n[GOAL]\nx y : PGame\n| ((∃ i, x ≤ moveLeft y i) ∨ ∃ j, moveRight x j ≤ y) ↔\n    (∃ i,\n        (∀ (i' : LeftMoves x), moveLeft x i' ⧏ moveLeft y i) ∧\n          ∀ (j : RightMoves (moveLeft y i)), x ⧏ moveRight (moveLeft y i) j) ∨\n      ∃ j,\n        (∀ (i : LeftMoves (moveRight x j)), moveLeft (moveRight x j) i ⧏ y) ∧\n          ∀ (j' : RightMoves y), moveRight x j ⧏ moveRight y j'\n[PROOFSTEP]\n  lhs\n  simp only [le_iff_forall_lf]\n[GOAL]\nx y : PGame\n| ((∃ i, x ≤ moveLeft y i) ∨ ∃ j, moveRight x j ≤ y) ↔\n    (∃ i,\n        (∀ (i' : LeftMoves x), moveLeft x i' ⧏ moveLeft y i) ∧\n          ∀ (j : RightMoves (moveLeft y i)), x ⧏ moveRight (moveLeft y i) j) ∨\n      ∃ j,\n        (∀ (i : LeftMoves (moveRight x j)), moveLeft (moveRight x j) i ⧏ y) ∧\n          ∀ (j' : RightMoves y), moveRight x j ⧏ moveRight y j'\n[PROOFSTEP]\nlhs\n[GOAL]\nx y : PGame\n| (∃ i, x ≤ moveLeft y i) ∨ ∃ j, moveRight x j ≤ y\n[PROOFSTEP]\nsimp only [le_iff_forall_lf]\n[GOAL]\nx : PGame\n⊢ 0 ≤ x ↔ ∀ (j : RightMoves x), 0 ⧏ moveRight x j\n[PROOFSTEP]\nrw [le_iff_forall_lf]\n[GOAL]\nx : PGame\n⊢ ((∀ (i : LeftMoves 0), moveLeft 0 i ⧏ x) ∧ ∀ (j : RightMoves x), 0 ⧏ moveRight x j) ↔\n    ∀ (j : RightMoves x), 0 ⧏ moveRight x j\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\n⊢ x ≤ 0 ↔ ∀ (i : LeftMoves x), moveLeft x i ⧏ 0\n[PROOFSTEP]\nrw [le_iff_forall_lf]\n[GOAL]\nx : PGame\n⊢ ((∀ (i : LeftMoves x), moveLeft x i ⧏ 0) ∧ ∀ (j : RightMoves 0), x ⧏ moveRight 0 j) ↔\n    ∀ (i : LeftMoves x), moveLeft x i ⧏ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\n⊢ 0 ⧏ x ↔ ∃ i, 0 ≤ moveLeft x i\n[PROOFSTEP]\nrw [lf_iff_exists_le]\n[GOAL]\nx : PGame\n⊢ ((∃ i, 0 ≤ moveLeft x i) ∨ ∃ j, moveRight 0 j ≤ x) ↔ ∃ i, 0 ≤ moveLeft x i\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\n⊢ x ⧏ 0 ↔ ∃ j, moveRight x j ≤ 0\n[PROOFSTEP]\nrw [lf_iff_exists_le]\n[GOAL]\nx : PGame\n⊢ ((∃ i, x ≤ moveLeft 0 i) ∨ ∃ j, moveRight x j ≤ 0) ↔ ∃ j, moveRight x j ≤ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\n⊢ 0 ≤ x ↔ ∀ (j : RightMoves x), ∃ i, 0 ≤ moveLeft (moveRight x j) i\n[PROOFSTEP]\nrw [le_def]\n[GOAL]\nx : PGame\n⊢ ((∀ (i : LeftMoves 0), (∃ i', moveLeft 0 i ≤ moveLeft x i') ∨ ∃ j, moveRight (moveLeft 0 i) j ≤ x) ∧\n      ∀ (j : RightMoves x), (∃ i, 0 ≤ moveLeft (moveRight x j) i) ∨ ∃ j', moveRight 0 j' ≤ moveRight x j) ↔\n    ∀ (j : RightMoves x), ∃ i, 0 ≤ moveLeft (moveRight x j) i\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\n⊢ x ≤ 0 ↔ ∀ (i : LeftMoves x), ∃ j, moveRight (moveLeft x i) j ≤ 0\n[PROOFSTEP]\nrw [le_def]\n[GOAL]\nx : PGame\n⊢ ((∀ (i : LeftMoves x), (∃ i', moveLeft x i ≤ moveLeft 0 i') ∨ ∃ j, moveRight (moveLeft x i) j ≤ 0) ∧\n      ∀ (j : RightMoves 0), (∃ i, x ≤ moveLeft (moveRight 0 j) i) ∨ ∃ j', moveRight x j' ≤ moveRight 0 j) ↔\n    ∀ (i : LeftMoves x), ∃ j, moveRight (moveLeft x i) j ≤ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\n⊢ 0 ⧏ x ↔ ∃ i, ∀ (j : RightMoves (moveLeft x i)), 0 ⧏ moveRight (moveLeft x i) j\n[PROOFSTEP]\nrw [lf_def]\n[GOAL]\nx : PGame\n⊢ ((∃ i,\n        (∀ (i' : LeftMoves 0), moveLeft 0 i' ⧏ moveLeft x i) ∧\n          ∀ (j : RightMoves (moveLeft x i)), 0 ⧏ moveRight (moveLeft x i) j) ∨\n      ∃ j,\n        (∀ (i : LeftMoves (moveRight 0 j)), moveLeft (moveRight 0 j) i ⧏ x) ∧\n          ∀ (j' : RightMoves x), moveRight 0 j ⧏ moveRight x j') ↔\n    ∃ i, ∀ (j : RightMoves (moveLeft x i)), 0 ⧏ moveRight (moveLeft x i) j\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\n⊢ x ⧏ 0 ↔ ∃ j, ∀ (i : LeftMoves (moveRight x j)), moveLeft (moveRight x j) i ⧏ 0\n[PROOFSTEP]\nrw [lf_def]\n[GOAL]\nx : PGame\n⊢ ((∃ i,\n        (∀ (i' : LeftMoves x), moveLeft x i' ⧏ moveLeft 0 i) ∧\n          ∀ (j : RightMoves (moveLeft 0 i)), x ⧏ moveRight (moveLeft 0 i) j) ∨\n      ∃ j,\n        (∀ (i : LeftMoves (moveRight x j)), moveLeft (moveRight x j) i ⧏ 0) ∧\n          ∀ (j' : RightMoves 0), moveRight x j ⧏ moveRight 0 j') ↔\n    ∃ j, ∀ (i : LeftMoves (moveRight x j)), moveLeft (moveRight x j) i ⧏ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : PGame\nh : x = y\n⊢ x ≈ y\n[PROOFSTEP]\nsubst h\n[GOAL]\nx : PGame\n⊢ x ≈ x\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : PGame\n⊢ x ⧏ y ∨ x ≈ y ∨ y ⧏ x\n[PROOFSTEP]\nby_cases h : x ⧏ y\n[GOAL]\ncase pos\nx y : PGame\nh : x ⧏ y\n⊢ x ⧏ y ∨ x ≈ y ∨ y ⧏ x\n[PROOFSTEP]\nexact Or.inl h\n[GOAL]\ncase neg\nx y : PGame\nh : ¬x ⧏ y\n⊢ x ⧏ y ∨ x ≈ y ∨ y ⧏ x\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.h\nx y : PGame\nh : ¬x ⧏ y\n⊢ x ≈ y ∨ y ⧏ x\n[PROOFSTEP]\ncases' lt_or_equiv_of_le (PGame.not_lf.1 h) with h' h'\n[GOAL]\ncase neg.h.inl\nx y : PGame\nh : ¬x ⧏ y\nh' : y < x\n⊢ x ≈ y ∨ y ⧏ x\n[PROOFSTEP]\nexact Or.inr h'.lf\n[GOAL]\ncase neg.h.inr\nx y : PGame\nh : ¬x ⧏ y\nh' : y ≈ x\n⊢ x ≈ y ∨ y ⧏ x\n[PROOFSTEP]\nexact Or.inl (Equiv.symm h')\n[GOAL]\nx y : PGame\nL : LeftMoves x ≃ LeftMoves y\nR : RightMoves x ≃ RightMoves y\nhl : ∀ (i : LeftMoves x), moveLeft x i ≈ moveLeft y (↑L i)\nhr : ∀ (j : RightMoves x), moveRight x j ≈ moveRight y (↑R j)\n⊢ x ≈ y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nx y : PGame\nL : LeftMoves x ≃ LeftMoves y\nR : RightMoves x ≃ RightMoves y\nhl : ∀ (i : LeftMoves x), moveLeft x i ≈ moveLeft y (↑L i)\nhr : ∀ (j : RightMoves x), moveRight x j ≈ moveRight y (↑R j)\n⊢ x ≤ y\n[PROOFSTEP]\nrw [le_def]\n[GOAL]\ncase right\nx y : PGame\nL : LeftMoves x ≃ LeftMoves y\nR : RightMoves x ≃ RightMoves y\nhl : ∀ (i : LeftMoves x), moveLeft x i ≈ moveLeft y (↑L i)\nhr : ∀ (j : RightMoves x), moveRight x j ≈ moveRight y (↑R j)\n⊢ y ≤ x\n[PROOFSTEP]\nrw [le_def]\n[GOAL]\ncase left\nx y : PGame\nL : LeftMoves x ≃ LeftMoves y\nR : RightMoves x ≃ RightMoves y\nhl : ∀ (i : LeftMoves x), moveLeft x i ≈ moveLeft y (↑L i)\nhr : ∀ (j : RightMoves x), moveRight x j ≈ moveRight y (↑R j)\n⊢ (∀ (i : LeftMoves x), (∃ i', moveLeft x i ≤ moveLeft y i') ∨ ∃ j, moveRight (moveLeft x i) j ≤ y) ∧\n    ∀ (j : RightMoves y), (∃ i, x ≤ moveLeft (moveRight y j) i) ∨ ∃ j', moveRight x j' ≤ moveRight y j\n[PROOFSTEP]\nexact ⟨fun i => Or.inl ⟨_, (hl i).1⟩, fun j => Or.inr ⟨_, by simpa using (hr (R.symm j)).1⟩⟩\n[GOAL]\nx y : PGame\nL : LeftMoves x ≃ LeftMoves y\nR : RightMoves x ≃ RightMoves y\nhl : ∀ (i : LeftMoves x), moveLeft x i ≈ moveLeft y (↑L i)\nhr : ∀ (j : RightMoves x), moveRight x j ≈ moveRight y (↑R j)\nj : RightMoves y\n⊢ moveRight x (?m.65380 j) ≤ moveRight y j\n[PROOFSTEP]\nsimpa using (hr (R.symm j)).1\n[GOAL]\ncase right\nx y : PGame\nL : LeftMoves x ≃ LeftMoves y\nR : RightMoves x ≃ RightMoves y\nhl : ∀ (i : LeftMoves x), moveLeft x i ≈ moveLeft y (↑L i)\nhr : ∀ (j : RightMoves x), moveRight x j ≈ moveRight y (↑R j)\n⊢ (∀ (i : LeftMoves y), (∃ i', moveLeft y i ≤ moveLeft x i') ∨ ∃ j, moveRight (moveLeft y i) j ≤ x) ∧\n    ∀ (j : RightMoves x), (∃ i, y ≤ moveLeft (moveRight x j) i) ∨ ∃ j', moveRight y j' ≤ moveRight x j\n[PROOFSTEP]\nexact ⟨fun i => Or.inl ⟨_, by simpa using (hl (L.symm i)).2⟩, fun j => Or.inr ⟨_, (hr j).2⟩⟩\n[GOAL]\nx y : PGame\nL : LeftMoves x ≃ LeftMoves y\nR : RightMoves x ≃ RightMoves y\nhl : ∀ (i : LeftMoves x), moveLeft x i ≈ moveLeft y (↑L i)\nhr : ∀ (j : RightMoves x), moveRight x j ≈ moveRight y (↑R j)\ni : LeftMoves y\n⊢ moveLeft y i ≤ moveLeft x (?m.66064 i)\n[PROOFSTEP]\nsimpa using (hl (L.symm i)).2\n[GOAL]\nx y : PGame\n⊢ x ⧏ y ↔ x < y ∨ x ‖ y\n[PROOFSTEP]\nsimp only [lt_iff_le_and_lf, Fuzzy, ← PGame.not_le]\n[GOAL]\nx y : PGame\n⊢ ¬y ≤ x ↔ x ≤ y ∧ ¬y ≤ x ∨ ¬y ≤ x ∧ ¬x ≤ y\n[PROOFSTEP]\ntauto\n[GOAL]\nx₁ y₁ x₂ y₂ : PGame\nhx : x₁ ≈ x₂\nhy : y₁ ≈ y₂\n⊢ x₁ ⧏ y₁ ∧ y₁ ⧏ x₁ ↔ x₂ ⧏ y₂ ∧ y₂ ⧏ x₂\n[PROOFSTEP]\nrw [lf_congr hx hy, lf_congr hy hx]\n[GOAL]\nx y : PGame\n⊢ x < y ∨ x ≈ y ∨ y < x ∨ x ‖ y\n[PROOFSTEP]\ncases' le_or_gf x y with h₁ h₁\n[GOAL]\ncase inl\nx y : PGame\nh₁ : x ≤ y\n⊢ x < y ∨ x ≈ y ∨ y < x ∨ x ‖ y\n[PROOFSTEP]\ncases' le_or_gf y x with h₂ h₂\n[GOAL]\ncase inr\nx y : PGame\nh₁ : y ⧏ x\n⊢ x < y ∨ x ≈ y ∨ y < x ∨ x ‖ y\n[PROOFSTEP]\ncases' le_or_gf y x with h₂ h₂\n[GOAL]\ncase inl.inl\nx y : PGame\nh₁ : x ≤ y\nh₂ : y ≤ x\n⊢ x < y ∨ x ≈ y ∨ y < x ∨ x ‖ y\n[PROOFSTEP]\nright\n[GOAL]\ncase inl.inl.h\nx y : PGame\nh₁ : x ≤ y\nh₂ : y ≤ x\n⊢ x ≈ y ∨ y < x ∨ x ‖ y\n[PROOFSTEP]\nleft\n[GOAL]\ncase inl.inl.h.h\nx y : PGame\nh₁ : x ≤ y\nh₂ : y ≤ x\n⊢ x ≈ y\n[PROOFSTEP]\nexact ⟨h₁, h₂⟩\n[GOAL]\ncase inl.inr\nx y : PGame\nh₁ : x ≤ y\nh₂ : x ⧏ y\n⊢ x < y ∨ x ≈ y ∨ y < x ∨ x ‖ y\n[PROOFSTEP]\nleft\n[GOAL]\ncase inl.inr.h\nx y : PGame\nh₁ : x ≤ y\nh₂ : x ⧏ y\n⊢ x < y\n[PROOFSTEP]\nexact ⟨h₁, h₂⟩\n[GOAL]\ncase inr.inl\nx y : PGame\nh₁ : y ⧏ x\nh₂ : y ≤ x\n⊢ x < y ∨ x ≈ y ∨ y < x ∨ x ‖ y\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inl.h\nx y : PGame\nh₁ : y ⧏ x\nh₂ : y ≤ x\n⊢ x ≈ y ∨ y < x ∨ x ‖ y\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inl.h.h\nx y : PGame\nh₁ : y ⧏ x\nh₂ : y ≤ x\n⊢ y < x ∨ x ‖ y\n[PROOFSTEP]\nleft\n[GOAL]\ncase inr.inl.h.h.h\nx y : PGame\nh₁ : y ⧏ x\nh₂ : y ≤ x\n⊢ y < x\n[PROOFSTEP]\nexact ⟨h₂, h₁⟩\n[GOAL]\ncase inr.inr\nx y : PGame\nh₁ : y ⧏ x\nh₂ : x ⧏ y\n⊢ x < y ∨ x ≈ y ∨ y < x ∨ x ‖ y\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inr.h\nx y : PGame\nh₁ : y ⧏ x\nh₂ : x ⧏ y\n⊢ x ≈ y ∨ y < x ∨ x ‖ y\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inr.h.h\nx y : PGame\nh₁ : y ⧏ x\nh₂ : x ⧏ y\n⊢ y < x ∨ x ‖ y\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inr.h.h.h\nx y : PGame\nh₁ : y ⧏ x\nh₂ : x ⧏ y\n⊢ x ‖ y\n[PROOFSTEP]\nexact ⟨h₂, h₁⟩\n[GOAL]\nx y : PGame\n⊢ x < y ∨ x ≈ y ∨ y ⧏ x\n[PROOFSTEP]\nrw [lf_iff_lt_or_fuzzy, Fuzzy.swap_iff]\n[GOAL]\nx y : PGame\n⊢ x < y ∨ x ≈ y ∨ y < x ∨ x ‖ y\n[PROOFSTEP]\nexact lt_or_equiv_or_gt_or_fuzzy x y\n[GOAL]\nx y : PGame\nL : LeftMoves y ≃ LeftMoves x\nR : RightMoves y ≃ RightMoves x\nhL : (i : LeftMoves y) → moveLeft x (↑L i) ≡r moveLeft y i\nhR : (j : RightMoves y) → moveRight x (↑R j) ≡r moveRight y j\ni : LeftMoves x\n⊢ moveLeft x i ≡r moveLeft y (↑L.symm i)\n[PROOFSTEP]\nsimpa using hL (L.symm i)\n[GOAL]\nx y : PGame\nL : LeftMoves y ≃ LeftMoves x\nR : RightMoves y ≃ RightMoves x\nhL : (i : LeftMoves y) → moveLeft x (↑L i) ≡r moveLeft y i\nhR : (j : RightMoves y) → moveRight x (↑R j) ≡r moveRight y j\nj : RightMoves x\n⊢ moveRight x j ≡r moveRight y (↑R.symm j)\n[PROOFSTEP]\nsimpa using hR (R.symm j)\n[GOAL]\nx y : PGame\nL : LeftMoves x ≃ LeftMoves y\nR : RightMoves x ≃ RightMoves y\nhL : (i : LeftMoves x) → PGame.moveLeft x i ≡r PGame.moveLeft y (↑L i)\nhR : (j : RightMoves x) → moveRight x j ≡r moveRight y (↑R j)\ni : LeftMoves y\n⊢ PGame.moveLeft x (↑(leftMovesEquiv (mk L R hL hR)).symm i) ≡r PGame.moveLeft y i\n[PROOFSTEP]\nsimpa using hL (L.symm i)\n[GOAL]\nx y : PGame\nL : LeftMoves x ≃ LeftMoves y\nR : RightMoves x ≃ RightMoves y\nhL : (i : LeftMoves x) → PGame.moveLeft x i ≡r PGame.moveLeft y (↑L i)\nhR : (j : RightMoves x) → PGame.moveRight x j ≡r PGame.moveRight y (↑R j)\ni : RightMoves y\n⊢ PGame.moveRight x (↑(rightMovesEquiv (mk L R hL hR)).symm i) ≡r PGame.moveRight y i\n[PROOFSTEP]\nsimpa using hR (R.symm i)\n[GOAL]\nx : PGame\nxl' xr' : Type u_1\nel : xl' ≃ LeftMoves x\ner : xr' ≃ RightMoves x\ni : LeftMoves x\n⊢ moveLeft (relabel el er) (↑el.symm i) = moveLeft x i\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\nxl' xr' : Type u_1\nel : xl' ≃ LeftMoves x\ner : xr' ≃ RightMoves x\nj : RightMoves x\n⊢ moveRight (relabel el er) (↑er.symm j) = moveRight x j\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\nxl' xr' : Type ?u.102898\nel : xl' ≃ LeftMoves x\ner : xr' ≃ RightMoves x\ni : LeftMoves (relabel el er)\n⊢ moveLeft x (↑el i) ≡r moveLeft (relabel el er) i\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\nxl' xr' : Type ?u.102898\nel : xl' ≃ LeftMoves x\ner : xr' ≃ RightMoves x\ni : LeftMoves (relabel el er)\n⊢ moveLeft x (↑el i) ≡r moveLeft x (↑el i)\n[PROOFSTEP]\nrfl\n[GOAL]\nx : PGame\nxl' xr' : Type ?u.102898\nel : xl' ≃ LeftMoves x\ner : xr' ≃ RightMoves x\nj : RightMoves (relabel el er)\n⊢ moveRight x (↑er j) ≡r moveRight (relabel el er) j\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\nxl' xr' : Type ?u.102898\nel : xl' ≃ LeftMoves x\ner : xr' ≃ RightMoves x\nj : RightMoves (relabel el er)\n⊢ moveRight x (↑er j) ≡r moveRight x (↑er j)\n[PROOFSTEP]\nrfl\n[GOAL]\nsrc✝ : Neg PGame := inferInstanceAs (Neg PGame)\nx : PGame\n⊢ - -x = x\n[PROOFSTEP]\ninduction' x with xl xr xL xR ihL ihR\n[GOAL]\ncase mk\nsrc✝ : Neg PGame := inferInstanceAs (Neg PGame)\nxl xr : Type ?u.103970\nxL : xl → PGame\nxR : xr → PGame\nihL : ∀ (a : xl), - -xL a = xL a\nihR : ∀ (a : xr), - -xR a = xR a\n⊢ - -mk xl xr xL xR = mk xl xr xL xR\n[PROOFSTEP]\nsimp_rw [neg_def, ihL, ihR]\n[GOAL]\nsrc✝¹ : Zero PGame := inferInstanceAs (Zero PGame)\nsrc✝ : Neg PGame := inferInstanceAs (Neg PGame)\n⊢ -0 = 0\n[PROOFSTEP]\ndsimp [Zero.zero, Neg.neg, neg]\n[GOAL]\nsrc✝¹ : Zero PGame := inferInstanceAs (Zero PGame)\nsrc✝ : Neg PGame := inferInstanceAs (Neg PGame)\n⊢ (mk PEmpty PEmpty (fun i => neg (PEmpty.elim i)) fun i => neg (PEmpty.elim i)) = 0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nsrc✝¹ : Zero PGame := inferInstanceAs (Zero PGame)\nsrc✝ : Neg PGame := inferInstanceAs (Neg PGame)\n⊢ (fun i => neg (PEmpty.elim i)) = PEmpty.elim\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase e_a\nsrc✝¹ : Zero PGame := inferInstanceAs (Zero PGame)\nsrc✝ : Neg PGame := inferInstanceAs (Neg PGame)\n⊢ (fun i => neg (PEmpty.elim i)) = PEmpty.elim\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase e_a.h\nsrc✝¹ : Zero PGame := inferInstanceAs (Zero PGame)\nsrc✝ : Neg PGame := inferInstanceAs (Neg PGame)\ni : PEmpty\n⊢ neg (PEmpty.elim i) = PEmpty.elim i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase e_a.h\nsrc✝¹ : Zero PGame := inferInstanceAs (Zero PGame)\nsrc✝ : Neg PGame := inferInstanceAs (Neg PGame)\ni : PEmpty\n⊢ neg (PEmpty.elim i) = PEmpty.elim i\n[PROOFSTEP]\ncases i\n[GOAL]\nL R : List PGame\n⊢ -ofLists L R = ofLists (List.map (fun x => -x) R) (List.map (fun x => -x) L)\n[PROOFSTEP]\nset_option linter.deprecated\n  false in\n  simp only [ofLists, neg_def, List.length_map, List.nthLe_map', eq_self_iff_true, true_and, mk.injEq]\n  constructor\n  all_goals\n    apply hfunext\n    · simp\n    · intro a a' ha\n      congr 2\n      have : ∀ {m n} (_ : m = n) {b : ULift (Fin m)} {c : ULift (Fin n)} (_ : HEq b c), (b.down : ℕ) = ↑c.down :=\n        by\n        rintro m n rfl b c\n        simp only [heq_eq_eq]\n        rintro rfl\n        rfl\n      exact this (List.length_map _ _).symm ha\n[GOAL]\nL R : List PGame\n⊢ -ofLists L R = ofLists (List.map (fun x => -x) R) (List.map (fun x => -x) L)\n[PROOFSTEP]\nsimp only [ofLists, neg_def, List.length_map, List.nthLe_map', eq_self_iff_true, true_and, mk.injEq]\n[GOAL]\nL R : List PGame\n⊢ (HEq (fun j => -List.nthLe R ↑j.down (_ : ↑j.down < List.length R)) fun i =>\n      -List.nthLe R ↑i.down (_ : ↑i.down < List.length R)) ∧\n    HEq (fun i => -List.nthLe L ↑i.down (_ : ↑i.down < List.length L)) fun j =>\n      -List.nthLe L ↑j.down (_ : ↑j.down < List.length L)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nL R : List PGame\n⊢ HEq (fun j => -List.nthLe R ↑j.down (_ : ↑j.down < List.length R)) fun i =>\n    -List.nthLe R ↑i.down (_ : ↑i.down < List.length R)\ncase right\nL R : List PGame\n⊢ HEq (fun i => -List.nthLe L ↑i.down (_ : ↑i.down < List.length L)) fun j =>\n    -List.nthLe L ↑j.down (_ : ↑j.down < List.length L)\n[PROOFSTEP]\nall_goals\n  apply hfunext\n  · simp\n  · intro a a' ha\n    congr 2\n    have : ∀ {m n} (_ : m = n) {b : ULift (Fin m)} {c : ULift (Fin n)} (_ : HEq b c), (b.down : ℕ) = ↑c.down :=\n      by\n      rintro m n rfl b c\n      simp only [heq_eq_eq]\n      rintro rfl\n      rfl\n    exact this (List.length_map _ _).symm ha\n[GOAL]\ncase left\nL R : List PGame\n⊢ HEq (fun j => -List.nthLe R ↑j.down (_ : ↑j.down < List.length R)) fun i =>\n    -List.nthLe R ↑i.down (_ : ↑i.down < List.length R)\n[PROOFSTEP]\napply hfunext\n[GOAL]\ncase left.hα\nL R : List PGame\n⊢ ULift (Fin (List.length R)) = ULift (Fin (List.length (List.map (fun x => -x) R)))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left.h\nL R : List PGame\n⊢ ∀ (a : ULift (Fin (List.length R))) (a' : ULift (Fin (List.length (List.map (fun x => -x) R)))),\n    HEq a a' →\n      HEq (-List.nthLe R ↑a.down (_ : ↑a.down < List.length R)) (-List.nthLe R ↑a'.down (_ : ↑a'.down < List.length R))\n[PROOFSTEP]\nintro a a' ha\n[GOAL]\ncase left.h\nL R : List PGame\na : ULift (Fin (List.length R))\na' : ULift (Fin (List.length (List.map (fun x => -x) R)))\nha : HEq a a'\n⊢ HEq (-List.nthLe R ↑a.down (_ : ↑a.down < List.length R)) (-List.nthLe R ↑a'.down (_ : ↑a'.down < List.length R))\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase left.h.h.e_a.e_n\nL R : List PGame\na : ULift (Fin (List.length R))\na' : ULift (Fin (List.length (List.map (fun x => -x) R)))\nha : HEq a a'\n⊢ ↑a.down = ↑a'.down\n[PROOFSTEP]\nhave : ∀ {m n} (_ : m = n) {b : ULift (Fin m)} {c : ULift (Fin n)} (_ : HEq b c), (b.down : ℕ) = ↑c.down :=\n  by\n  rintro m n rfl b c\n  simp only [heq_eq_eq]\n  rintro rfl\n  rfl\n[GOAL]\nL R : List PGame\na : ULift (Fin (List.length R))\na' : ULift (Fin (List.length (List.map (fun x => -x) R)))\nha : HEq a a'\n⊢ ∀ {m n : ℕ}, m = n → ∀ {b : ULift (Fin m)} {c : ULift (Fin n)}, HEq b c → ↑b.down = ↑c.down\n[PROOFSTEP]\nrintro m n rfl b c\n[GOAL]\nL R : List PGame\na : ULift (Fin (List.length R))\na' : ULift (Fin (List.length (List.map (fun x => -x) R)))\nha : HEq a a'\nm : ℕ\nb c : ULift (Fin m)\n⊢ HEq b c → ↑b.down = ↑c.down\n[PROOFSTEP]\nsimp only [heq_eq_eq]\n[GOAL]\nL R : List PGame\na : ULift (Fin (List.length R))\na' : ULift (Fin (List.length (List.map (fun x => -x) R)))\nha : HEq a a'\nm : ℕ\nb c : ULift (Fin m)\n⊢ b = c → ↑b.down = ↑c.down\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nL R : List PGame\na : ULift (Fin (List.length R))\na' : ULift (Fin (List.length (List.map (fun x => -x) R)))\nha : HEq a a'\nm : ℕ\nb : ULift (Fin m)\n⊢ ↑b.down = ↑b.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left.h.h.e_a.e_n\nL R : List PGame\na : ULift (Fin (List.length R))\na' : ULift (Fin (List.length (List.map (fun x => -x) R)))\nha : HEq a a'\nthis : ∀ {m n : ℕ}, m = n → ∀ {b : ULift (Fin m)} {c : ULift (Fin n)}, HEq b c → ↑b.down = ↑c.down\n⊢ ↑a.down = ↑a'.down\n[PROOFSTEP]\nexact this (List.length_map _ _).symm ha\n[GOAL]\ncase right\nL R : List PGame\n⊢ HEq (fun i => -List.nthLe L ↑i.down (_ : ↑i.down < List.length L)) fun j =>\n    -List.nthLe L ↑j.down (_ : ↑j.down < List.length L)\n[PROOFSTEP]\napply hfunext\n[GOAL]\ncase right.hα\nL R : List PGame\n⊢ ULift (Fin (List.length L)) = ULift (Fin (List.length (List.map (fun x => -x) L)))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right.h\nL R : List PGame\n⊢ ∀ (a : ULift (Fin (List.length L))) (a' : ULift (Fin (List.length (List.map (fun x => -x) L)))),\n    HEq a a' →\n      HEq (-List.nthLe L ↑a.down (_ : ↑a.down < List.length L)) (-List.nthLe L ↑a'.down (_ : ↑a'.down < List.length L))\n[PROOFSTEP]\nintro a a' ha\n[GOAL]\ncase right.h\nL R : List PGame\na : ULift (Fin (List.length L))\na' : ULift (Fin (List.length (List.map (fun x => -x) L)))\nha : HEq a a'\n⊢ HEq (-List.nthLe L ↑a.down (_ : ↑a.down < List.length L)) (-List.nthLe L ↑a'.down (_ : ↑a'.down < List.length L))\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase right.h.h.e_a.e_n\nL R : List PGame\na : ULift (Fin (List.length L))\na' : ULift (Fin (List.length (List.map (fun x => -x) L)))\nha : HEq a a'\n⊢ ↑a.down = ↑a'.down\n[PROOFSTEP]\nhave : ∀ {m n} (_ : m = n) {b : ULift (Fin m)} {c : ULift (Fin n)} (_ : HEq b c), (b.down : ℕ) = ↑c.down :=\n  by\n  rintro m n rfl b c\n  simp only [heq_eq_eq]\n  rintro rfl\n  rfl\n[GOAL]\nL R : List PGame\na : ULift (Fin (List.length L))\na' : ULift (Fin (List.length (List.map (fun x => -x) L)))\nha : HEq a a'\n⊢ ∀ {m n : ℕ}, m = n → ∀ {b : ULift (Fin m)} {c : ULift (Fin n)}, HEq b c → ↑b.down = ↑c.down\n[PROOFSTEP]\nrintro m n rfl b c\n[GOAL]\nL R : List PGame\na : ULift (Fin (List.length L))\na' : ULift (Fin (List.length (List.map (fun x => -x) L)))\nha : HEq a a'\nm : ℕ\nb c : ULift (Fin m)\n⊢ HEq b c → ↑b.down = ↑c.down\n[PROOFSTEP]\nsimp only [heq_eq_eq]\n[GOAL]\nL R : List PGame\na : ULift (Fin (List.length L))\na' : ULift (Fin (List.length (List.map (fun x => -x) L)))\nha : HEq a a'\nm : ℕ\nb c : ULift (Fin m)\n⊢ b = c → ↑b.down = ↑c.down\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nL R : List PGame\na : ULift (Fin (List.length L))\na' : ULift (Fin (List.length (List.map (fun x => -x) L)))\nha : HEq a a'\nm : ℕ\nb : ULift (Fin m)\n⊢ ↑b.down = ↑b.down\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right.h.h.e_a.e_n\nL R : List PGame\na : ULift (Fin (List.length L))\na' : ULift (Fin (List.length (List.map (fun x => -x) L)))\nha : HEq a a'\nthis : ∀ {m n : ℕ}, m = n → ∀ {b : ULift (Fin m)} {c : ULift (Fin n)}, HEq b c → ↑b.down = ↑c.down\n⊢ ↑a.down = ↑a'.down\n[PROOFSTEP]\nexact this (List.length_map _ _).symm ha\n[GOAL]\nx y : PGame\n⊢ IsOption x (-y) ↔ IsOption (-x) y\n[PROOFSTEP]\nrw [IsOption_iff, IsOption_iff, or_comm]\n[GOAL]\nx y : PGame\n⊢ ((∃ i, x = moveRight (-y) i) ∨ ∃ i, x = moveLeft (-y) i) ↔ (∃ i, -x = moveLeft y i) ∨ ∃ i, -x = moveRight y i\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk\nx : PGame\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ ((∃ i, x = moveRight (-mk α✝ β✝ a✝¹ a✝) i) ∨ ∃ i, x = moveLeft (-mk α✝ β✝ a✝¹ a✝) i) ↔\n    (∃ i, -x = moveLeft (mk α✝ β✝ a✝¹ a✝) i) ∨ ∃ i, -x = moveRight (mk α✝ β✝ a✝¹ a✝) i\n[PROOFSTEP]\napply or_congr\n[GOAL]\ncase mk.h₁\nx : PGame\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ (∃ i, x = moveRight (-mk α✝ β✝ a✝¹ a✝) i) ↔ ∃ i, -x = moveLeft (mk α✝ β✝ a✝¹ a✝) i\n[PROOFSTEP]\napply exists_congr\n[GOAL]\ncase mk.h₁.h\nx : PGame\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ ∀ (a : RightMoves (-mk α✝ β✝ a✝¹ a✝)), x = moveRight (-mk α✝ β✝ a✝¹ a✝) a ↔ -x = moveLeft (mk α✝ β✝ a✝¹ a✝) a\n[PROOFSTEP]\nintro\n[GOAL]\ncase mk.h₁.h\nx : PGame\nα✝ β✝ : Type u_1\na✝² : α✝ → PGame\na✝¹ : β✝ → PGame\na✝ : RightMoves (-mk α✝ β✝ a✝² a✝¹)\n⊢ x = moveRight (-mk α✝ β✝ a✝² a✝¹) a✝ ↔ -x = moveLeft (mk α✝ β✝ a✝² a✝¹) a✝\n[PROOFSTEP]\nrw [neg_eq_iff_eq_neg]\n[GOAL]\ncase mk.h₁.h\nx : PGame\nα✝ β✝ : Type u_1\na✝² : α✝ → PGame\na✝¹ : β✝ → PGame\na✝ : RightMoves (-mk α✝ β✝ a✝² a✝¹)\n⊢ x = moveRight (-mk α✝ β✝ a✝² a✝¹) a✝ ↔ x = -moveLeft (mk α✝ β✝ a✝² a✝¹) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.h₂\nx : PGame\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ (∃ i, x = moveLeft (-mk α✝ β✝ a✝¹ a✝) i) ↔ ∃ i, -x = moveRight (mk α✝ β✝ a✝¹ a✝) i\n[PROOFSTEP]\napply exists_congr\n[GOAL]\ncase mk.h₂.h\nx : PGame\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ ∀ (a : LeftMoves (-mk α✝ β✝ a✝¹ a✝)), x = moveLeft (-mk α✝ β✝ a✝¹ a✝) a ↔ -x = moveRight (mk α✝ β✝ a✝¹ a✝) a\n[PROOFSTEP]\nintro\n[GOAL]\ncase mk.h₂.h\nx : PGame\nα✝ β✝ : Type u_1\na✝² : α✝ → PGame\na✝¹ : β✝ → PGame\na✝ : LeftMoves (-mk α✝ β✝ a✝² a✝¹)\n⊢ x = moveLeft (-mk α✝ β✝ a✝² a✝¹) a✝ ↔ -x = moveRight (mk α✝ β✝ a✝² a✝¹) a✝\n[PROOFSTEP]\nrw [neg_eq_iff_eq_neg]\n[GOAL]\ncase mk.h₂.h\nx : PGame\nα✝ β✝ : Type u_1\na✝² : α✝ → PGame\na✝¹ : β✝ → PGame\na✝ : LeftMoves (-mk α✝ β✝ a✝² a✝¹)\n⊢ x = moveLeft (-mk α✝ β✝ a✝² a✝¹) a✝ ↔ x = -moveRight (mk α✝ β✝ a✝² a✝¹) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : PGame\n⊢ IsOption (-x) (-y) ↔ IsOption x y\n[PROOFSTEP]\nrw [isOption_neg, neg_neg]\n[GOAL]\nx : PGame\ni : RightMoves x\n⊢ moveLeft (-x) (↑toLeftMovesNeg i) = -moveRight x i\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ni : RightMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveLeft (-mk α✝ β✝ a✝¹ a✝) (↑toLeftMovesNeg i) = -moveRight (mk α✝ β✝ a✝¹ a✝) i\n[PROOFSTEP]\nrfl\n[GOAL]\nx : PGame\ni : LeftMoves (-x)\n⊢ moveLeft (-x) i = -moveRight x (↑toLeftMovesNeg.symm i)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ni : LeftMoves (-mk α✝ β✝ a✝¹ a✝)\n⊢ moveLeft (-mk α✝ β✝ a✝¹ a✝) i = -moveRight (mk α✝ β✝ a✝¹ a✝) (↑toLeftMovesNeg.symm i)\n[PROOFSTEP]\nrfl\n[GOAL]\nx : PGame\ni : LeftMoves x\n⊢ moveRight (-x) (↑toRightMovesNeg i) = -moveLeft x i\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ni : LeftMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveRight (-mk α✝ β✝ a✝¹ a✝) (↑toRightMovesNeg i) = -moveLeft (mk α✝ β✝ a✝¹ a✝) i\n[PROOFSTEP]\nrfl\n[GOAL]\nx : PGame\ni : RightMoves (-x)\n⊢ moveRight (-x) i = -moveLeft x (↑toRightMovesNeg.symm i)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ni : RightMoves (-mk α✝ β✝ a✝¹ a✝)\n⊢ moveRight (-mk α✝ β✝ a✝¹ a✝) i = -moveLeft (mk α✝ β✝ a✝¹ a✝) (↑toRightMovesNeg.symm i)\n[PROOFSTEP]\nrfl\n[GOAL]\nx : PGame\ni : RightMoves (-x)\n⊢ moveLeft x (↑toRightMovesNeg.symm i) = -moveRight (-x) i\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\ni : LeftMoves x\n⊢ moveLeft x i = -moveRight (-x) (↑toRightMovesNeg i)\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\ni : LeftMoves (-x)\n⊢ moveRight x (↑toLeftMovesNeg.symm i) = -moveLeft (-x) i\n[PROOFSTEP]\nsimp\n[GOAL]\nx : PGame\ni : RightMoves x\n⊢ moveRight x i = -moveLeft (-x) (↑toLeftMovesNeg i)\n[PROOFSTEP]\nsimp\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ (-mk yl yr yL yR ≤ -mk xl xr xL xR ↔ mk xl xr xL xR ≤ mk yl yr yL yR) ∧\n    (-mk yl yr yL yR ⧏ -mk xl xr xL xR ↔ mk xl xr xL xR ⧏ mk yl yr yL yR)\n[PROOFSTEP]\nsimp_rw [neg_def, mk_le_mk, mk_lf_mk, ← neg_def]\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ (((∀ (i : yr), -yR i ⧏ -mk xl xr (fun i => xL i) fun j => xR j) ∧\n        ∀ (j : xl), (-mk yl yr (fun i => yL i) fun j => yR j) ⧏ -xL j) ↔\n      (∀ (i : xl), xL i ⧏ mk yl yr yL yR) ∧ ∀ (j : yr), mk xl xr xL xR ⧏ yR j) ∧\n    (((∃ i, (-mk yl yr (fun i => yL i) fun j => yR j) ≤ -xR i) ∨ ∃ j, -yL j ≤ -mk xl xr (fun i => xL i) fun j => xR j) ↔\n      (∃ i, mk xl xr xL xR ≤ yL i) ∨ ∃ j, xR j ≤ mk yl yr yL yR)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ ((∀ (i : yr), -yR i ⧏ -mk xl xr (fun i => xL i) fun j => xR j) ∧\n      ∀ (j : xl), (-mk yl yr (fun i => yL i) fun j => yR j) ⧏ -xL j) ↔\n    (∀ (i : xl), xL i ⧏ mk yl yr yL yR) ∧ ∀ (j : yr), mk xl xr xL xR ⧏ yR j\n[PROOFSTEP]\nrw [and_comm]\n[GOAL]\ncase left\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ ((∀ (j : xl), (-mk yl yr (fun i => yL i) fun j => yR j) ⧏ -xL j) ∧\n      ∀ (i : yr), -yR i ⧏ -mk xl xr (fun i => xL i) fun j => xR j) ↔\n    (∀ (i : xl), xL i ⧏ mk yl yr yL yR) ∧ ∀ (j : yr), mk xl xr xL xR ⧏ yR j\n[PROOFSTEP]\napply and_congr\n[GOAL]\ncase left.h₁\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ (∀ (j : xl), (-mk yl yr (fun i => yL i) fun j => yR j) ⧏ -xL j) ↔ ∀ (i : xl), xL i ⧏ mk yl yr yL yR\n[PROOFSTEP]\nexact forall_congr' fun _ => neg_le_lf_neg_iff.2\n[GOAL]\ncase left.h₂\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ (∀ (i : yr), -yR i ⧏ -mk xl xr (fun i => xL i) fun j => xR j) ↔ ∀ (j : yr), mk xl xr xL xR ⧏ yR j\n[PROOFSTEP]\nexact forall_congr' fun _ => neg_le_lf_neg_iff.2\n[GOAL]\ncase right\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ ((∃ i, (-mk yl yr (fun i => yL i) fun j => yR j) ≤ -xR i) ∨ ∃ j, -yL j ≤ -mk xl xr (fun i => xL i) fun j => xR j) ↔\n    (∃ i, mk xl xr xL xR ≤ yL i) ∨ ∃ j, xR j ≤ mk yl yr yL yR\n[PROOFSTEP]\nrw [or_comm]\n[GOAL]\ncase right\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ ((∃ j, -yL j ≤ -mk xl xr (fun i => xL i) fun j => xR j) ∨ ∃ i, (-mk yl yr (fun i => yL i) fun j => yR j) ≤ -xR i) ↔\n    (∃ i, mk xl xr xL xR ≤ yL i) ∨ ∃ j, xR j ≤ mk yl yr yL yR\n[PROOFSTEP]\napply or_congr\n[GOAL]\ncase right.h₁\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ (∃ j, -yL j ≤ -mk xl xr (fun i => xL i) fun j => xR j) ↔ ∃ i, mk xl xr xL xR ≤ yL i\n[PROOFSTEP]\nexact exists_congr fun _ => neg_le_lf_neg_iff.1\n[GOAL]\ncase right.h₂\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ (∃ i, (-mk yl yr (fun i => yL i) fun j => yR j) ≤ -xR i) ↔ ∃ j, xR j ≤ mk yl yr yL yR\n[PROOFSTEP]\nexact exists_congr fun _ => neg_le_lf_neg_iff.1\n[GOAL]\nx y : PGame\n⊢ -y < -x ↔ x < y\n[PROOFSTEP]\nrw [lt_iff_le_and_lf, lt_iff_le_and_lf, neg_le_neg_iff, neg_lf_neg_iff]\n[GOAL]\nx y : PGame\n⊢ -x ≈ -y ↔ x ≈ y\n[PROOFSTEP]\nshow Equiv (-x) (-y) ↔ Equiv x y\n[GOAL]\nx y : PGame\n⊢ Equiv (-x) (-y) ↔ Equiv x y\n[PROOFSTEP]\nrw [Equiv, Equiv, neg_le_neg_iff, neg_le_neg_iff, and_comm]\n[GOAL]\nx y : PGame\n⊢ -x ‖ -y ↔ x ‖ y\n[PROOFSTEP]\nrw [Fuzzy, Fuzzy, neg_lf_neg_iff, neg_lf_neg_iff, and_comm]\n[GOAL]\nx y : PGame\n⊢ -y ≤ x ↔ -x ≤ y\n[PROOFSTEP]\nrw [← neg_neg x, neg_le_neg_iff, neg_neg]\n[GOAL]\nx y : PGame\n⊢ -y ⧏ x ↔ -x ⧏ y\n[PROOFSTEP]\nrw [← neg_neg x, neg_lf_neg_iff, neg_neg]\n[GOAL]\nx y : PGame\n⊢ -y < x ↔ -x < y\n[PROOFSTEP]\nrw [← neg_neg x, neg_lt_neg_iff, neg_neg]\n[GOAL]\nx y : PGame\n⊢ -x ≈ y ↔ x ≈ -y\n[PROOFSTEP]\nrw [← neg_neg y, neg_equiv_neg_iff, neg_neg]\n[GOAL]\nx y : PGame\n⊢ -x ‖ y ↔ x ‖ -y\n[PROOFSTEP]\nrw [← neg_neg y, neg_fuzzy_neg_iff, neg_neg]\n[GOAL]\nx y : PGame\n⊢ y ≤ -x ↔ x ≤ -y\n[PROOFSTEP]\nrw [← neg_neg x, neg_le_neg_iff, neg_neg]\n[GOAL]\nx y : PGame\n⊢ y ⧏ -x ↔ x ⧏ -y\n[PROOFSTEP]\nrw [← neg_neg x, neg_lf_neg_iff, neg_neg]\n[GOAL]\nx y : PGame\n⊢ y < -x ↔ x < -y\n[PROOFSTEP]\nrw [← neg_neg x, neg_lt_neg_iff, neg_neg]\n[GOAL]\nx : PGame\n⊢ -x ≤ 0 ↔ 0 ≤ x\n[PROOFSTEP]\nrw [neg_le_iff, neg_zero]\n[GOAL]\nx : PGame\n⊢ 0 ≤ -x ↔ x ≤ 0\n[PROOFSTEP]\nrw [le_neg_iff, neg_zero]\n[GOAL]\nx : PGame\n⊢ -x ⧏ 0 ↔ 0 ⧏ x\n[PROOFSTEP]\nrw [neg_lf_iff, neg_zero]\n[GOAL]\nx : PGame\n⊢ 0 ⧏ -x ↔ x ⧏ 0\n[PROOFSTEP]\nrw [lf_neg_iff, neg_zero]\n[GOAL]\nx : PGame\n⊢ -x < 0 ↔ 0 < x\n[PROOFSTEP]\nrw [neg_lt_iff, neg_zero]\n[GOAL]\nx : PGame\n⊢ 0 < -x ↔ x < 0\n[PROOFSTEP]\nrw [lt_neg_iff, neg_zero]\n[GOAL]\nx : PGame\n⊢ -x ≈ 0 ↔ x ≈ 0\n[PROOFSTEP]\nrw [neg_equiv_iff, neg_zero]\n[GOAL]\nx : PGame\n⊢ -x ‖ 0 ↔ x ‖ 0\n[PROOFSTEP]\nrw [neg_fuzzy_iff, neg_zero]\n[GOAL]\nx : PGame\n⊢ 0 ≈ -x ↔ 0 ≈ x\n[PROOFSTEP]\nrw [← neg_equiv_iff, neg_zero]\n[GOAL]\nx : PGame\n⊢ 0 ‖ -x ↔ 0 ‖ x\n[PROOFSTEP]\nrw [← neg_fuzzy_iff, neg_zero]\n[GOAL]\nx y : PGame\n⊢ PGame\n[PROOFSTEP]\ninduction' x with xl xr _ _ IHxl IHxr generalizing y\n[GOAL]\ncase mk\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\ny : PGame\n⊢ PGame\n[PROOFSTEP]\ninduction' y with yl yr yL yR IHyl IHyr\n[GOAL]\ncase mk.mk\ny : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\n⊢ PGame\n[PROOFSTEP]\nhave y := mk yl yr yL yR\n[GOAL]\ncase mk.mk\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\ny : PGame\n⊢ PGame\n[PROOFSTEP]\nrefine' ⟨Sum xl yl, Sum xr yr, Sum.rec _ _, Sum.rec _ _⟩\n[GOAL]\ncase mk.mk.refine'_1\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\ny : PGame\n⊢ xl → PGame\n[PROOFSTEP]\nexact fun i => IHxl i y\n[GOAL]\ncase mk.mk.refine'_2\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\ny : PGame\n⊢ yl → PGame\n[PROOFSTEP]\nexact IHyl\n[GOAL]\ncase mk.mk.refine'_3\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\ny : PGame\n⊢ xr → PGame\n[PROOFSTEP]\nexact fun i => IHxr i y\n[GOAL]\ncase mk.mk.refine'_4\ny✝ : PGame\nxl xr : Type u\na✝¹ : xl → PGame\na✝ : xr → PGame\nIHxl : xl → PGame → PGame\nIHxr : xr → PGame → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nIHyl : yl → PGame\nIHyr : yr → PGame\ny : PGame\n⊢ yr → PGame\n[PROOFSTEP]\nexact IHyr\n[GOAL]\nx y : PGame\ninst✝¹ : IsEmpty (LeftMoves x)\ninst✝ : IsEmpty (LeftMoves y)\n⊢ IsEmpty (LeftMoves (x + y))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\ny : PGame\ninst✝¹ : IsEmpty (LeftMoves y)\nα✝ β✝ : Type u\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ninst✝ : IsEmpty (LeftMoves (mk α✝ β✝ a✝¹ a✝))\n⊢ IsEmpty (LeftMoves (mk α✝ β✝ a✝¹ a✝ + y))\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nα✝¹ β✝¹ : Type u\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\ninst✝¹ : IsEmpty (LeftMoves (mk α✝¹ β✝¹ a✝³ a✝²))\nα✝ β✝ : Type u\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ninst✝ : IsEmpty (LeftMoves (mk α✝ β✝ a✝¹ a✝))\n⊢ IsEmpty (LeftMoves (mk α✝¹ β✝¹ a✝³ a✝² + mk α✝ β✝ a✝¹ a✝))\n[PROOFSTEP]\napply isEmpty_sum.2 ⟨_, _⟩\n[GOAL]\nα✝¹ β✝¹ : Type u\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\ninst✝¹ : IsEmpty (LeftMoves (mk α✝¹ β✝¹ a✝³ a✝²))\nα✝ β✝ : Type u\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ninst✝ : IsEmpty (LeftMoves (mk α✝ β✝ a✝¹ a✝))\n⊢ IsEmpty α✝¹\nα✝¹ β✝¹ : Type u\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\ninst✝¹ : IsEmpty (LeftMoves (mk α✝¹ β✝¹ a✝³ a✝²))\nα✝ β✝ : Type u\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ninst✝ : IsEmpty (LeftMoves (mk α✝ β✝ a✝¹ a✝))\n⊢ IsEmpty α✝\n[PROOFSTEP]\nassumption'\n[GOAL]\nx y : PGame\ninst✝¹ : IsEmpty (RightMoves x)\ninst✝ : IsEmpty (RightMoves y)\n⊢ IsEmpty (RightMoves (x + y))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\ny : PGame\ninst✝¹ : IsEmpty (RightMoves y)\nα✝ β✝ : Type u\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ninst✝ : IsEmpty (RightMoves (mk α✝ β✝ a✝¹ a✝))\n⊢ IsEmpty (RightMoves (mk α✝ β✝ a✝¹ a✝ + y))\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nα✝¹ β✝¹ : Type u\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\ninst✝¹ : IsEmpty (RightMoves (mk α✝¹ β✝¹ a✝³ a✝²))\nα✝ β✝ : Type u\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ninst✝ : IsEmpty (RightMoves (mk α✝ β✝ a✝¹ a✝))\n⊢ IsEmpty (RightMoves (mk α✝¹ β✝¹ a✝³ a✝² + mk α✝ β✝ a✝¹ a✝))\n[PROOFSTEP]\napply isEmpty_sum.2 ⟨_, _⟩\n[GOAL]\nα✝¹ β✝¹ : Type u\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\ninst✝¹ : IsEmpty (RightMoves (mk α✝¹ β✝¹ a✝³ a✝²))\nα✝ β✝ : Type u\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ninst✝ : IsEmpty (RightMoves (mk α✝ β✝ a✝¹ a✝))\n⊢ IsEmpty β✝¹\nα✝¹ β✝¹ : Type u\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\ninst✝¹ : IsEmpty (RightMoves (mk α✝¹ β✝¹ a✝³ a✝²))\nα✝ β✝ : Type u\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ninst✝ : IsEmpty (RightMoves (mk α✝ β✝ a✝¹ a✝))\n⊢ IsEmpty β✝\n[PROOFSTEP]\nassumption'\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ mk xl xr xL xR + 0 ≡r mk xl xr xL xR\n[PROOFSTEP]\nrefine' ⟨Equiv.sumEmpty xl PEmpty, Equiv.sumEmpty xr PEmpty, _, _⟩\n[GOAL]\ncase refine'_1\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ (i : LeftMoves (mk xl xr xL xR + 0)) →\n    moveLeft (mk xl xr xL xR + 0) i ≡r moveLeft (mk xl xr xL xR) (↑(Equiv.sumEmpty xl PEmpty) i)\n[PROOFSTEP]\nrintro (⟨i⟩ | ⟨⟨⟩⟩)\n[GOAL]\ncase refine'_2\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ (j : RightMoves (mk xl xr xL xR + 0)) →\n    moveRight (mk xl xr xL xR + 0) j ≡r moveRight (mk xl xr xL xR) (↑(Equiv.sumEmpty xr PEmpty) j)\n[PROOFSTEP]\nrintro (⟨i⟩ | ⟨⟨⟩⟩)\n[GOAL]\ncase refine'_1.inl\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ moveLeft (mk xl xr xL xR + 0) (Sum.inl i) ≡r moveLeft (mk xl xr xL xR) (↑(Equiv.sumEmpty xl PEmpty) (Sum.inl i))\n[PROOFSTEP]\napply addZeroRelabelling\n[GOAL]\ncase refine'_2.inl\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xr\n⊢ moveRight (mk xl xr xL xR + 0) (Sum.inl i) ≡r moveRight (mk xl xr xL xR) (↑(Equiv.sumEmpty xr PEmpty) (Sum.inl i))\n[PROOFSTEP]\napply addZeroRelabelling\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ 0 + mk xl xr xL xR ≡r mk xl xr xL xR\n[PROOFSTEP]\nrefine' ⟨Equiv.emptySum PEmpty xl, Equiv.emptySum PEmpty xr, _, _⟩\n[GOAL]\ncase refine'_1\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ (i : LeftMoves (0 + mk xl xr xL xR)) →\n    moveLeft (0 + mk xl xr xL xR) i ≡r moveLeft (mk xl xr xL xR) (↑(Equiv.emptySum PEmpty xl) i)\n[PROOFSTEP]\nrintro (⟨⟨⟩⟩ | ⟨i⟩)\n[GOAL]\ncase refine'_2\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\n⊢ (j : RightMoves (0 + mk xl xr xL xR)) →\n    moveRight (0 + mk xl xr xL xR) j ≡r moveRight (mk xl xr xL xR) (↑(Equiv.emptySum PEmpty xr) j)\n[PROOFSTEP]\nrintro (⟨⟨⟩⟩ | ⟨i⟩)\n[GOAL]\ncase refine'_1.inr\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ moveLeft (0 + mk xl xr xL xR) (Sum.inr i) ≡r moveLeft (mk xl xr xL xR) (↑(Equiv.emptySum PEmpty xl) (Sum.inr i))\n[PROOFSTEP]\napply zeroAddRelabelling\n[GOAL]\ncase refine'_2.inr\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\ni : xr\n⊢ moveRight (0 + mk xl xr xL xR) (Sum.inr i) ≡r moveRight (mk xl xr xL xR) (↑(Equiv.emptySum PEmpty xr) (Sum.inr i))\n[PROOFSTEP]\napply zeroAddRelabelling\n[GOAL]\nx y : PGame\ni : LeftMoves x\n⊢ moveLeft (x + y) (↑toLeftMovesAdd (Sum.inl i)) = moveLeft x i + y\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\ny : PGame\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ni : LeftMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveLeft (mk α✝ β✝ a✝¹ a✝ + y) (↑toLeftMovesAdd (Sum.inl i)) = moveLeft (mk α✝ β✝ a✝¹ a✝) i + y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nα✝¹ β✝¹ : Type u_1\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\ni : LeftMoves (mk α✝¹ β✝¹ a✝³ a✝²)\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ moveLeft (mk α✝¹ β✝¹ a✝³ a✝² + mk α✝ β✝ a✝¹ a✝) (↑toLeftMovesAdd (Sum.inl i)) =\n    moveLeft (mk α✝¹ β✝¹ a✝³ a✝²) i + mk α✝ β✝ a✝¹ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : PGame\ni : RightMoves x\n⊢ moveRight (x + y) (↑toRightMovesAdd (Sum.inl i)) = moveRight x i + y\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\ny : PGame\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ni : RightMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveRight (mk α✝ β✝ a✝¹ a✝ + y) (↑toRightMovesAdd (Sum.inl i)) = moveRight (mk α✝ β✝ a✝¹ a✝) i + y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nα✝¹ β✝¹ : Type u_1\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\ni : RightMoves (mk α✝¹ β✝¹ a✝³ a✝²)\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ moveRight (mk α✝¹ β✝¹ a✝³ a✝² + mk α✝ β✝ a✝¹ a✝) (↑toRightMovesAdd (Sum.inl i)) =\n    moveRight (mk α✝¹ β✝¹ a✝³ a✝²) i + mk α✝ β✝ a✝¹ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : PGame\ni : LeftMoves y\n⊢ moveLeft (x + y) (↑toLeftMovesAdd (Sum.inr i)) = x + moveLeft y i\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\ny : PGame\ni : LeftMoves y\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ moveLeft (mk α✝ β✝ a✝¹ a✝ + y) (↑toLeftMovesAdd (Sum.inr i)) = mk α✝ β✝ a✝¹ a✝ + moveLeft y i\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nα✝¹ β✝¹ : Type u_1\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ni : LeftMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveLeft (mk α✝¹ β✝¹ a✝³ a✝² + mk α✝ β✝ a✝¹ a✝) (↑toLeftMovesAdd (Sum.inr i)) =\n    mk α✝¹ β✝¹ a✝³ a✝² + moveLeft (mk α✝ β✝ a✝¹ a✝) i\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : PGame\ni : RightMoves y\n⊢ moveRight (x + y) (↑toRightMovesAdd (Sum.inr i)) = x + moveRight y i\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\ny : PGame\ni : RightMoves y\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\n⊢ moveRight (mk α✝ β✝ a✝¹ a✝ + y) (↑toRightMovesAdd (Sum.inr i)) = mk α✝ β✝ a✝¹ a✝ + moveRight y i\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nα✝¹ β✝¹ : Type u_1\na✝³ : α✝¹ → PGame\na✝² : β✝¹ → PGame\nα✝ β✝ : Type u_1\na✝¹ : α✝ → PGame\na✝ : β✝ → PGame\ni : RightMoves (mk α✝ β✝ a✝¹ a✝)\n⊢ moveRight (mk α✝¹ β✝¹ a✝³ a✝² + mk α✝ β✝ a✝¹ a✝) (↑toRightMovesAdd (Sum.inr i)) =\n    mk α✝¹ β✝¹ a✝³ a✝² + moveRight (mk α✝ β✝ a✝¹ a✝) i\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : PGame\nk : LeftMoves (x + y)\nP : LeftMoves (x + y) → Prop\nhl : ∀ (i : LeftMoves x), P (↑toLeftMovesAdd (Sum.inl i))\nhr : ∀ (i : LeftMoves y), P (↑toLeftMovesAdd (Sum.inr i))\n⊢ P k\n[PROOFSTEP]\nrw [← toLeftMovesAdd.apply_symm_apply k]\n[GOAL]\nx y : PGame\nk : LeftMoves (x + y)\nP : LeftMoves (x + y) → Prop\nhl : ∀ (i : LeftMoves x), P (↑toLeftMovesAdd (Sum.inl i))\nhr : ∀ (i : LeftMoves y), P (↑toLeftMovesAdd (Sum.inr i))\n⊢ P (↑toLeftMovesAdd (↑toLeftMovesAdd.symm k))\n[PROOFSTEP]\ncases' toLeftMovesAdd.symm k with i i\n[GOAL]\ncase inl\nx y : PGame\nk : LeftMoves (x + y)\nP : LeftMoves (x + y) → Prop\nhl : ∀ (i : LeftMoves x), P (↑toLeftMovesAdd (Sum.inl i))\nhr : ∀ (i : LeftMoves y), P (↑toLeftMovesAdd (Sum.inr i))\ni : LeftMoves x\n⊢ P (↑toLeftMovesAdd (Sum.inl i))\n[PROOFSTEP]\nexact hl i\n[GOAL]\ncase inr\nx y : PGame\nk : LeftMoves (x + y)\nP : LeftMoves (x + y) → Prop\nhl : ∀ (i : LeftMoves x), P (↑toLeftMovesAdd (Sum.inl i))\nhr : ∀ (i : LeftMoves y), P (↑toLeftMovesAdd (Sum.inr i))\ni : LeftMoves y\n⊢ P (↑toLeftMovesAdd (Sum.inr i))\n[PROOFSTEP]\nexact hr i\n[GOAL]\nx y : PGame\nk : RightMoves (x + y)\nP : RightMoves (x + y) → Prop\nhl : ∀ (j : RightMoves x), P (↑toRightMovesAdd (Sum.inl j))\nhr : ∀ (j : RightMoves y), P (↑toRightMovesAdd (Sum.inr j))\n⊢ P k\n[PROOFSTEP]\nrw [← toRightMovesAdd.apply_symm_apply k]\n[GOAL]\nx y : PGame\nk : RightMoves (x + y)\nP : RightMoves (x + y) → Prop\nhl : ∀ (j : RightMoves x), P (↑toRightMovesAdd (Sum.inl j))\nhr : ∀ (j : RightMoves y), P (↑toRightMovesAdd (Sum.inr j))\n⊢ P (↑toRightMovesAdd (↑toRightMovesAdd.symm k))\n[PROOFSTEP]\ncases' toRightMovesAdd.symm k with i i\n[GOAL]\ncase inl\nx y : PGame\nk : RightMoves (x + y)\nP : RightMoves (x + y) → Prop\nhl : ∀ (j : RightMoves x), P (↑toRightMovesAdd (Sum.inl j))\nhr : ∀ (j : RightMoves y), P (↑toRightMovesAdd (Sum.inr j))\ni : RightMoves x\n⊢ P (↑toRightMovesAdd (Sum.inl i))\n[PROOFSTEP]\nexact hl i\n[GOAL]\ncase inr\nx y : PGame\nk : RightMoves (x + y)\nP : RightMoves (x + y) → Prop\nhl : ∀ (j : RightMoves x), P (↑toRightMovesAdd (Sum.inl j))\nhr : ∀ (j : RightMoves y), P (↑toRightMovesAdd (Sum.inr j))\ni : RightMoves y\n⊢ P (↑toRightMovesAdd (Sum.inr i))\n[PROOFSTEP]\nexact hr i\n[GOAL]\nn : ℕ\n⊢ IsEmpty (RightMoves ↑(n + 1))\n[PROOFSTEP]\nhaveI := isEmpty_nat_rightMoves n\n[GOAL]\nn : ℕ\nthis : IsEmpty (RightMoves ↑n)\n⊢ IsEmpty (RightMoves ↑(n + 1))\n[PROOFSTEP]\nrw [PGame.nat_succ, rightMoves_add]\n[GOAL]\nn : ℕ\nthis : IsEmpty (RightMoves ↑n)\n⊢ IsEmpty (RightMoves ↑n ⊕ RightMoves 1)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nwl wr : Type u\nwL : wl → PGame\nwR : wr → PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\nL₁ : LeftMoves (PGame.mk wl wr wL wR) ≃ LeftMoves (PGame.mk xl xr xL xR)\nR₁ : RightMoves (PGame.mk wl wr wL wR) ≃ RightMoves (PGame.mk xl xr xL xR)\nhL₁ :\n  (i : LeftMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveLeft (PGame.mk wl wr wL wR) i ≡r PGame.moveLeft (PGame.mk xl xr xL xR) (↑L₁ i)\nhR₁ :\n  (j : RightMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveRight (PGame.mk wl wr wL wR) j ≡r PGame.moveRight (PGame.mk xl xr xL xR) (↑R₁ j)\nL₂ : LeftMoves (PGame.mk yl yr yL yR) ≃ LeftMoves (PGame.mk zl zr zL zR)\nR₂ : RightMoves (PGame.mk yl yr yL yR) ≃ RightMoves (PGame.mk zl zr zL zR)\nhL₂ :\n  (i : LeftMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveLeft (PGame.mk yl yr yL yR) i ≡r PGame.moveLeft (PGame.mk zl zr zL zR) (↑L₂ i)\nhR₂ :\n  (j : RightMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveRight (PGame.mk yl yr yL yR) j ≡r PGame.moveRight (PGame.mk zl zr zL zR) (↑R₂ j)\n⊢ PGame.mk wl wr wL wR + PGame.mk yl yr yL yR ≡r PGame.mk xl xr xL xR + PGame.mk zl zr zL zR\n[PROOFSTEP]\nlet Hwx : ⟨wl, wr, wL, wR⟩ ≡r ⟨xl, xr, xL, xR⟩ := ⟨L₁, R₁, hL₁, hR₁⟩\n[GOAL]\nwl wr : Type u\nwL : wl → PGame\nwR : wr → PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\nL₁ : LeftMoves (PGame.mk wl wr wL wR) ≃ LeftMoves (PGame.mk xl xr xL xR)\nR₁ : RightMoves (PGame.mk wl wr wL wR) ≃ RightMoves (PGame.mk xl xr xL xR)\nhL₁ :\n  (i : LeftMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveLeft (PGame.mk wl wr wL wR) i ≡r PGame.moveLeft (PGame.mk xl xr xL xR) (↑L₁ i)\nhR₁ :\n  (j : RightMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveRight (PGame.mk wl wr wL wR) j ≡r PGame.moveRight (PGame.mk xl xr xL xR) (↑R₁ j)\nL₂ : LeftMoves (PGame.mk yl yr yL yR) ≃ LeftMoves (PGame.mk zl zr zL zR)\nR₂ : RightMoves (PGame.mk yl yr yL yR) ≃ RightMoves (PGame.mk zl zr zL zR)\nhL₂ :\n  (i : LeftMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveLeft (PGame.mk yl yr yL yR) i ≡r PGame.moveLeft (PGame.mk zl zr zL zR) (↑L₂ i)\nhR₂ :\n  (j : RightMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveRight (PGame.mk yl yr yL yR) j ≡r PGame.moveRight (PGame.mk zl zr zL zR) (↑R₂ j)\nHwx : PGame.mk wl wr wL wR ≡r PGame.mk xl xr xL xR := mk L₁ R₁ hL₁ hR₁\n⊢ PGame.mk wl wr wL wR + PGame.mk yl yr yL yR ≡r PGame.mk xl xr xL xR + PGame.mk zl zr zL zR\n[PROOFSTEP]\nlet Hyz : ⟨yl, yr, yL, yR⟩ ≡r ⟨zl, zr, zL, zR⟩ := ⟨L₂, R₂, hL₂, hR₂⟩\n[GOAL]\nwl wr : Type u\nwL : wl → PGame\nwR : wr → PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\nL₁ : LeftMoves (PGame.mk wl wr wL wR) ≃ LeftMoves (PGame.mk xl xr xL xR)\nR₁ : RightMoves (PGame.mk wl wr wL wR) ≃ RightMoves (PGame.mk xl xr xL xR)\nhL₁ :\n  (i : LeftMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveLeft (PGame.mk wl wr wL wR) i ≡r PGame.moveLeft (PGame.mk xl xr xL xR) (↑L₁ i)\nhR₁ :\n  (j : RightMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveRight (PGame.mk wl wr wL wR) j ≡r PGame.moveRight (PGame.mk xl xr xL xR) (↑R₁ j)\nL₂ : LeftMoves (PGame.mk yl yr yL yR) ≃ LeftMoves (PGame.mk zl zr zL zR)\nR₂ : RightMoves (PGame.mk yl yr yL yR) ≃ RightMoves (PGame.mk zl zr zL zR)\nhL₂ :\n  (i : LeftMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveLeft (PGame.mk yl yr yL yR) i ≡r PGame.moveLeft (PGame.mk zl zr zL zR) (↑L₂ i)\nhR₂ :\n  (j : RightMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveRight (PGame.mk yl yr yL yR) j ≡r PGame.moveRight (PGame.mk zl zr zL zR) (↑R₂ j)\nHwx : PGame.mk wl wr wL wR ≡r PGame.mk xl xr xL xR := mk L₁ R₁ hL₁ hR₁\nHyz : PGame.mk yl yr yL yR ≡r PGame.mk zl zr zL zR := mk L₂ R₂ hL₂ hR₂\n⊢ PGame.mk wl wr wL wR + PGame.mk yl yr yL yR ≡r PGame.mk xl xr xL xR + PGame.mk zl zr zL zR\n[PROOFSTEP]\nrefine' ⟨Equiv.sumCongr L₁ L₂, Equiv.sumCongr R₁ R₂, _, _⟩\n[GOAL]\ncase refine'_1\nwl wr : Type u\nwL : wl → PGame\nwR : wr → PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\nL₁ : LeftMoves (PGame.mk wl wr wL wR) ≃ LeftMoves (PGame.mk xl xr xL xR)\nR₁ : RightMoves (PGame.mk wl wr wL wR) ≃ RightMoves (PGame.mk xl xr xL xR)\nhL₁ :\n  (i : LeftMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveLeft (PGame.mk wl wr wL wR) i ≡r PGame.moveLeft (PGame.mk xl xr xL xR) (↑L₁ i)\nhR₁ :\n  (j : RightMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveRight (PGame.mk wl wr wL wR) j ≡r PGame.moveRight (PGame.mk xl xr xL xR) (↑R₁ j)\nL₂ : LeftMoves (PGame.mk yl yr yL yR) ≃ LeftMoves (PGame.mk zl zr zL zR)\nR₂ : RightMoves (PGame.mk yl yr yL yR) ≃ RightMoves (PGame.mk zl zr zL zR)\nhL₂ :\n  (i : LeftMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveLeft (PGame.mk yl yr yL yR) i ≡r PGame.moveLeft (PGame.mk zl zr zL zR) (↑L₂ i)\nhR₂ :\n  (j : RightMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveRight (PGame.mk yl yr yL yR) j ≡r PGame.moveRight (PGame.mk zl zr zL zR) (↑R₂ j)\nHwx : PGame.mk wl wr wL wR ≡r PGame.mk xl xr xL xR := mk L₁ R₁ hL₁ hR₁\nHyz : PGame.mk yl yr yL yR ≡r PGame.mk zl zr zL zR := mk L₂ R₂ hL₂ hR₂\n⊢ (i : LeftMoves (PGame.mk wl wr wL wR + PGame.mk yl yr yL yR)) →\n    PGame.moveLeft (PGame.mk wl wr wL wR + PGame.mk yl yr yL yR) i ≡r\n      PGame.moveLeft (PGame.mk xl xr xL xR + PGame.mk zl zr zL zR) (↑(Equiv.sumCongr L₁ L₂) i)\n[PROOFSTEP]\nrintro (i | j)\n[GOAL]\ncase refine'_2\nwl wr : Type u\nwL : wl → PGame\nwR : wr → PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\nL₁ : LeftMoves (PGame.mk wl wr wL wR) ≃ LeftMoves (PGame.mk xl xr xL xR)\nR₁ : RightMoves (PGame.mk wl wr wL wR) ≃ RightMoves (PGame.mk xl xr xL xR)\nhL₁ :\n  (i : LeftMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveLeft (PGame.mk wl wr wL wR) i ≡r PGame.moveLeft (PGame.mk xl xr xL xR) (↑L₁ i)\nhR₁ :\n  (j : RightMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveRight (PGame.mk wl wr wL wR) j ≡r PGame.moveRight (PGame.mk xl xr xL xR) (↑R₁ j)\nL₂ : LeftMoves (PGame.mk yl yr yL yR) ≃ LeftMoves (PGame.mk zl zr zL zR)\nR₂ : RightMoves (PGame.mk yl yr yL yR) ≃ RightMoves (PGame.mk zl zr zL zR)\nhL₂ :\n  (i : LeftMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveLeft (PGame.mk yl yr yL yR) i ≡r PGame.moveLeft (PGame.mk zl zr zL zR) (↑L₂ i)\nhR₂ :\n  (j : RightMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveRight (PGame.mk yl yr yL yR) j ≡r PGame.moveRight (PGame.mk zl zr zL zR) (↑R₂ j)\nHwx : PGame.mk wl wr wL wR ≡r PGame.mk xl xr xL xR := mk L₁ R₁ hL₁ hR₁\nHyz : PGame.mk yl yr yL yR ≡r PGame.mk zl zr zL zR := mk L₂ R₂ hL₂ hR₂\n⊢ (j : RightMoves (PGame.mk wl wr wL wR + PGame.mk yl yr yL yR)) →\n    PGame.moveRight (PGame.mk wl wr wL wR + PGame.mk yl yr yL yR) j ≡r\n      PGame.moveRight (PGame.mk xl xr xL xR + PGame.mk zl zr zL zR) (↑(Equiv.sumCongr R₁ R₂) j)\n[PROOFSTEP]\nrintro (i | j)\n[GOAL]\ncase refine'_1.inl\nwl wr : Type u\nwL : wl → PGame\nwR : wr → PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\nL₁ : LeftMoves (PGame.mk wl wr wL wR) ≃ LeftMoves (PGame.mk xl xr xL xR)\nR₁ : RightMoves (PGame.mk wl wr wL wR) ≃ RightMoves (PGame.mk xl xr xL xR)\nhL₁ :\n  (i : LeftMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveLeft (PGame.mk wl wr wL wR) i ≡r PGame.moveLeft (PGame.mk xl xr xL xR) (↑L₁ i)\nhR₁ :\n  (j : RightMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveRight (PGame.mk wl wr wL wR) j ≡r PGame.moveRight (PGame.mk xl xr xL xR) (↑R₁ j)\nL₂ : LeftMoves (PGame.mk yl yr yL yR) ≃ LeftMoves (PGame.mk zl zr zL zR)\nR₂ : RightMoves (PGame.mk yl yr yL yR) ≃ RightMoves (PGame.mk zl zr zL zR)\nhL₂ :\n  (i : LeftMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveLeft (PGame.mk yl yr yL yR) i ≡r PGame.moveLeft (PGame.mk zl zr zL zR) (↑L₂ i)\nhR₂ :\n  (j : RightMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveRight (PGame.mk yl yr yL yR) j ≡r PGame.moveRight (PGame.mk zl zr zL zR) (↑R₂ j)\nHwx : PGame.mk wl wr wL wR ≡r PGame.mk xl xr xL xR := mk L₁ R₁ hL₁ hR₁\nHyz : PGame.mk yl yr yL yR ≡r PGame.mk zl zr zL zR := mk L₂ R₂ hL₂ hR₂\ni : wl\n⊢ PGame.moveLeft (PGame.mk wl wr wL wR + PGame.mk yl yr yL yR) (Sum.inl i) ≡r\n    PGame.moveLeft (PGame.mk xl xr xL xR + PGame.mk zl zr zL zR) (↑(Equiv.sumCongr L₁ L₂) (Sum.inl i))\n[PROOFSTEP]\nexact (hL₁ i).addCongr Hyz\n[GOAL]\ncase refine'_1.inr\nwl wr : Type u\nwL : wl → PGame\nwR : wr → PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\nL₁ : LeftMoves (PGame.mk wl wr wL wR) ≃ LeftMoves (PGame.mk xl xr xL xR)\nR₁ : RightMoves (PGame.mk wl wr wL wR) ≃ RightMoves (PGame.mk xl xr xL xR)\nhL₁ :\n  (i : LeftMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveLeft (PGame.mk wl wr wL wR) i ≡r PGame.moveLeft (PGame.mk xl xr xL xR) (↑L₁ i)\nhR₁ :\n  (j : RightMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveRight (PGame.mk wl wr wL wR) j ≡r PGame.moveRight (PGame.mk xl xr xL xR) (↑R₁ j)\nL₂ : LeftMoves (PGame.mk yl yr yL yR) ≃ LeftMoves (PGame.mk zl zr zL zR)\nR₂ : RightMoves (PGame.mk yl yr yL yR) ≃ RightMoves (PGame.mk zl zr zL zR)\nhL₂ :\n  (i : LeftMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveLeft (PGame.mk yl yr yL yR) i ≡r PGame.moveLeft (PGame.mk zl zr zL zR) (↑L₂ i)\nhR₂ :\n  (j : RightMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveRight (PGame.mk yl yr yL yR) j ≡r PGame.moveRight (PGame.mk zl zr zL zR) (↑R₂ j)\nHwx : PGame.mk wl wr wL wR ≡r PGame.mk xl xr xL xR := mk L₁ R₁ hL₁ hR₁\nHyz : PGame.mk yl yr yL yR ≡r PGame.mk zl zr zL zR := mk L₂ R₂ hL₂ hR₂\nj : yl\n⊢ PGame.moveLeft (PGame.mk wl wr wL wR + PGame.mk yl yr yL yR) (Sum.inr j) ≡r\n    PGame.moveLeft (PGame.mk xl xr xL xR + PGame.mk zl zr zL zR) (↑(Equiv.sumCongr L₁ L₂) (Sum.inr j))\n[PROOFSTEP]\nexact Hwx.addCongr (hL₂ j)\n[GOAL]\ncase refine'_2.inl\nwl wr : Type u\nwL : wl → PGame\nwR : wr → PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\nL₁ : LeftMoves (PGame.mk wl wr wL wR) ≃ LeftMoves (PGame.mk xl xr xL xR)\nR₁ : RightMoves (PGame.mk wl wr wL wR) ≃ RightMoves (PGame.mk xl xr xL xR)\nhL₁ :\n  (i : LeftMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveLeft (PGame.mk wl wr wL wR) i ≡r PGame.moveLeft (PGame.mk xl xr xL xR) (↑L₁ i)\nhR₁ :\n  (j : RightMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveRight (PGame.mk wl wr wL wR) j ≡r PGame.moveRight (PGame.mk xl xr xL xR) (↑R₁ j)\nL₂ : LeftMoves (PGame.mk yl yr yL yR) ≃ LeftMoves (PGame.mk zl zr zL zR)\nR₂ : RightMoves (PGame.mk yl yr yL yR) ≃ RightMoves (PGame.mk zl zr zL zR)\nhL₂ :\n  (i : LeftMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveLeft (PGame.mk yl yr yL yR) i ≡r PGame.moveLeft (PGame.mk zl zr zL zR) (↑L₂ i)\nhR₂ :\n  (j : RightMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveRight (PGame.mk yl yr yL yR) j ≡r PGame.moveRight (PGame.mk zl zr zL zR) (↑R₂ j)\nHwx : PGame.mk wl wr wL wR ≡r PGame.mk xl xr xL xR := mk L₁ R₁ hL₁ hR₁\nHyz : PGame.mk yl yr yL yR ≡r PGame.mk zl zr zL zR := mk L₂ R₂ hL₂ hR₂\ni : wr\n⊢ PGame.moveRight (PGame.mk wl wr wL wR + PGame.mk yl yr yL yR) (Sum.inl i) ≡r\n    PGame.moveRight (PGame.mk xl xr xL xR + PGame.mk zl zr zL zR) (↑(Equiv.sumCongr R₁ R₂) (Sum.inl i))\n[PROOFSTEP]\nexact (hR₁ i).addCongr Hyz\n[GOAL]\ncase refine'_2.inr\nwl wr : Type u\nwL : wl → PGame\nwR : wr → PGame\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\nL₁ : LeftMoves (PGame.mk wl wr wL wR) ≃ LeftMoves (PGame.mk xl xr xL xR)\nR₁ : RightMoves (PGame.mk wl wr wL wR) ≃ RightMoves (PGame.mk xl xr xL xR)\nhL₁ :\n  (i : LeftMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveLeft (PGame.mk wl wr wL wR) i ≡r PGame.moveLeft (PGame.mk xl xr xL xR) (↑L₁ i)\nhR₁ :\n  (j : RightMoves (PGame.mk wl wr wL wR)) →\n    PGame.moveRight (PGame.mk wl wr wL wR) j ≡r PGame.moveRight (PGame.mk xl xr xL xR) (↑R₁ j)\nL₂ : LeftMoves (PGame.mk yl yr yL yR) ≃ LeftMoves (PGame.mk zl zr zL zR)\nR₂ : RightMoves (PGame.mk yl yr yL yR) ≃ RightMoves (PGame.mk zl zr zL zR)\nhL₂ :\n  (i : LeftMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveLeft (PGame.mk yl yr yL yR) i ≡r PGame.moveLeft (PGame.mk zl zr zL zR) (↑L₂ i)\nhR₂ :\n  (j : RightMoves (PGame.mk yl yr yL yR)) →\n    PGame.moveRight (PGame.mk yl yr yL yR) j ≡r PGame.moveRight (PGame.mk zl zr zL zR) (↑R₂ j)\nHwx : PGame.mk wl wr wL wR ≡r PGame.mk xl xr xL xR := mk L₁ R₁ hL₁ hR₁\nHyz : PGame.mk yl yr yL yR ≡r PGame.mk zl zr zL zR := mk L₂ R₂ hL₂ hR₂\nj : yr\n⊢ PGame.moveRight (PGame.mk wl wr wL wR + PGame.mk yl yr yL yR) (Sum.inr j) ≡r\n    PGame.moveRight (PGame.mk xl xr xL xR + PGame.mk zl zr zL zR) (↑(Equiv.sumCongr R₁ R₂) (Sum.inr j))\n[PROOFSTEP]\nexact Hwx.addCongr (hR₂ j)\n[GOAL]\nx : PGame\n⊢ x + -0 = x + 0\n[PROOFSTEP]\nrw [neg_zero]\n[GOAL]\nxl xr : Type ?u.151060\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type ?u.151060\nyL : yl → PGame\nyR : yr → PGame\n⊢ -(mk xl xr xL xR + mk yl yr yL yR) ≡r -mk xl xr xL xR + -mk yl yr yL yR\n[PROOFSTEP]\nrefine' ⟨Equiv.refl _, Equiv.refl _, _, _⟩\n[GOAL]\ncase refine'_1\nxl xr : Type ?u.151060\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type ?u.151060\nyL : yl → PGame\nyR : yr → PGame\n⊢ (i : LeftMoves (-(mk xl xr xL xR + mk yl yr yL yR))) →\n    moveLeft (-(mk xl xr xL xR + mk yl yr yL yR)) i ≡r\n      moveLeft (-mk xl xr xL xR + -mk yl yr yL yR) (↑(Equiv.refl (LeftMoves (-(mk xl xr xL xR + mk yl yr yL yR)))) i)\ncase refine'_2\nxl xr : Type ?u.151060\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type ?u.151060\nyL : yl → PGame\nyR : yr → PGame\n⊢ (j : RightMoves (-(mk xl xr xL xR + mk yl yr yL yR))) →\n    moveRight (-(mk xl xr xL xR + mk yl yr yL yR)) j ≡r\n      moveRight (-mk xl xr xL xR + -mk yl yr yL yR) (↑(Equiv.refl (RightMoves (-(mk xl xr xL xR + mk yl yr yL yR)))) j)\n[PROOFSTEP]\nall_goals exact fun j => Sum.casesOn j (fun j => negAddRelabelling _ _) fun j => negAddRelabelling ⟨xl, xr, xL, xR⟩ _\n[GOAL]\ncase refine'_1\nxl xr : Type ?u.151060\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type ?u.151060\nyL : yl → PGame\nyR : yr → PGame\n⊢ (i : LeftMoves (-(mk xl xr xL xR + mk yl yr yL yR))) →\n    moveLeft (-(mk xl xr xL xR + mk yl yr yL yR)) i ≡r\n      moveLeft (-mk xl xr xL xR + -mk yl yr yL yR) (↑(Equiv.refl (LeftMoves (-(mk xl xr xL xR + mk yl yr yL yR)))) i)\n[PROOFSTEP]\nexact fun j => Sum.casesOn j (fun j => negAddRelabelling _ _) fun j => negAddRelabelling ⟨xl, xr, xL, xR⟩ _\n[GOAL]\ncase refine'_2\nxl xr : Type ?u.151807\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type ?u.151807\nyL : yl → PGame\nyR : yr → PGame\n⊢ (j : RightMoves (-(mk xl xr xL xR + mk yl yr yL yR))) →\n    moveRight (-(mk xl xr xL xR + mk yl yr yL yR)) j ≡r\n      moveRight (-mk xl xr xL xR + -mk yl yr yL yR) (↑(Equiv.refl (RightMoves (-(mk xl xr xL xR + mk yl yr yL yR)))) j)\n[PROOFSTEP]\nexact fun j => Sum.casesOn j (fun j => negAddRelabelling _ _) fun j => negAddRelabelling ⟨xl, xr, xL, xR⟩ _\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ mk xl xr xL xR + mk yl yr yL yR ≡r mk yl yr yL yR + mk xl xr xL xR\n[PROOFSTEP]\nrefine' ⟨Equiv.sumComm _ _, Equiv.sumComm _ _, _, _⟩\n[GOAL]\ncase refine'_1\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ (i : LeftMoves (mk xl xr xL xR + mk yl yr yL yR)) →\n    moveLeft (mk xl xr xL xR + mk yl yr yL yR) i ≡r\n      moveLeft (mk yl yr yL yR + mk xl xr xL xR) (↑(Equiv.sumComm xl yl) i)\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase refine'_2\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\n⊢ (j : RightMoves (mk xl xr xL xR + mk yl yr yL yR)) →\n    moveRight (mk xl xr xL xR + mk yl yr yL yR) j ≡r\n      moveRight (mk yl yr yL yR + mk xl xr xL xR) (↑(Equiv.sumComm xr yr) j)\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase refine'_1.inl\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nval✝ : xl\n⊢ moveLeft (mk xl xr xL xR + mk yl yr yL yR) (Sum.inl val✝) ≡r\n    moveLeft (mk yl yr yL yR + mk xl xr xL xR) (↑(Equiv.sumComm xl yl) (Sum.inl val✝))\n[PROOFSTEP]\ndsimp [leftMoves_add, rightMoves_add]\n[GOAL]\ncase refine'_1.inl\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nval✝ : xl\n⊢ xL val✝ + mk yl yr yL yR ≡r moveLeft (mk yl yr yL yR + mk xl xr xL xR) (↑(Equiv.sumComm xl yl) (Sum.inl val✝))\n[PROOFSTEP]\napply addCommRelabelling\n[GOAL]\ncase refine'_1.inr\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nval✝ : yl\n⊢ moveLeft (mk xl xr xL xR + mk yl yr yL yR) (Sum.inr val✝) ≡r\n    moveLeft (mk yl yr yL yR + mk xl xr xL xR) (↑(Equiv.sumComm xl yl) (Sum.inr val✝))\n[PROOFSTEP]\ndsimp [leftMoves_add, rightMoves_add]\n[GOAL]\ncase refine'_1.inr\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nval✝ : yl\n⊢ mk xl xr xL xR + yL val✝ ≡r moveLeft (mk yl yr yL yR + mk xl xr xL xR) (↑(Equiv.sumComm xl yl) (Sum.inr val✝))\n[PROOFSTEP]\napply addCommRelabelling\n[GOAL]\ncase refine'_2.inl\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nval✝ : xr\n⊢ moveRight (mk xl xr xL xR + mk yl yr yL yR) (Sum.inl val✝) ≡r\n    moveRight (mk yl yr yL yR + mk xl xr xL xR) (↑(Equiv.sumComm xr yr) (Sum.inl val✝))\n[PROOFSTEP]\ndsimp [leftMoves_add, rightMoves_add]\n[GOAL]\ncase refine'_2.inl\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nval✝ : xr\n⊢ xR val✝ + mk yl yr yL yR ≡r moveRight (mk yl yr yL yR + mk xl xr xL xR) (↑(Equiv.sumComm xr yr) (Sum.inl val✝))\n[PROOFSTEP]\napply addCommRelabelling\n[GOAL]\ncase refine'_2.inr\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nval✝ : yr\n⊢ moveRight (mk xl xr xL xR + mk yl yr yL yR) (Sum.inr val✝) ≡r\n    moveRight (mk yl yr yL yR + mk xl xr xL xR) (↑(Equiv.sumComm xr yr) (Sum.inr val✝))\n[PROOFSTEP]\ndsimp [leftMoves_add, rightMoves_add]\n[GOAL]\ncase refine'_2.inr\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nval✝ : yr\n⊢ mk xl xr xL xR + yR val✝ ≡r moveRight (mk yl yr yL yR + mk xl xr xL xR) (↑(Equiv.sumComm xr yr) (Sum.inr val✝))\n[PROOFSTEP]\napply addCommRelabelling\n[GOAL]\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\n⊢ mk xl xr xL xR + mk yl yr yL yR + mk zl zr zL zR ≡r mk xl xr xL xR + (mk yl yr yL yR + mk zl zr zL zR)\n[PROOFSTEP]\nrefine' ⟨Equiv.sumAssoc _ _ _, Equiv.sumAssoc _ _ _, _, _⟩\n[GOAL]\ncase refine'_1\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\n⊢ (i : LeftMoves (mk xl xr xL xR + mk yl yr yL yR + mk zl zr zL zR)) →\n    moveLeft (mk xl xr xL xR + mk yl yr yL yR + mk zl zr zL zR) i ≡r\n      moveLeft (mk xl xr xL xR + (mk yl yr yL yR + mk zl zr zL zR)) (↑(Equiv.sumAssoc xl yl zl) i)\n[PROOFSTEP]\nrintro (⟨i | i⟩ | i)\n[GOAL]\ncase refine'_1.inl.inl\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\ni : xl\n⊢ moveLeft (mk xl xr xL xR + mk yl yr yL yR + mk zl zr zL zR) (Sum.inl (Sum.inl i)) ≡r\n    moveLeft (mk xl xr xL xR + (mk yl yr yL yR + mk zl zr zL zR)) (↑(Equiv.sumAssoc xl yl zl) (Sum.inl (Sum.inl i)))\n[PROOFSTEP]\napply addAssocRelabelling\n[GOAL]\ncase refine'_1.inl.inr\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\ni : yl\n⊢ moveLeft (mk xl xr xL xR + mk yl yr yL yR + mk zl zr zL zR) (Sum.inl (Sum.inr i)) ≡r\n    moveLeft (mk xl xr xL xR + (mk yl yr yL yR + mk zl zr zL zR)) (↑(Equiv.sumAssoc xl yl zl) (Sum.inl (Sum.inr i)))\n[PROOFSTEP]\napply addAssocRelabelling ⟨xl, xr, xL, xR⟩ (yL i)\n[GOAL]\ncase refine'_1.inr\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\ni : zl\n⊢ moveLeft (mk xl xr xL xR + mk yl yr yL yR + mk zl zr zL zR) (Sum.inr i) ≡r\n    moveLeft (mk xl xr xL xR + (mk yl yr yL yR + mk zl zr zL zR)) (↑(Equiv.sumAssoc xl yl zl) (Sum.inr i))\n[PROOFSTEP]\napply addAssocRelabelling ⟨xl, xr, xL, xR⟩ ⟨yl, yr, yL, yR⟩ (zL i)\n[GOAL]\ncase refine'_2\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\n⊢ (j : RightMoves (mk xl xr xL xR + mk yl yr yL yR + mk zl zr zL zR)) →\n    moveRight (mk xl xr xL xR + mk yl yr yL yR + mk zl zr zL zR) j ≡r\n      moveRight (mk xl xr xL xR + (mk yl yr yL yR + mk zl zr zL zR)) (↑(Equiv.sumAssoc xr yr zr) j)\n[PROOFSTEP]\nrintro (⟨i | i⟩ | i)\n[GOAL]\ncase refine'_2.inl.inl\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\ni : xr\n⊢ moveRight (mk xl xr xL xR + mk yl yr yL yR + mk zl zr zL zR) (Sum.inl (Sum.inl i)) ≡r\n    moveRight (mk xl xr xL xR + (mk yl yr yL yR + mk zl zr zL zR)) (↑(Equiv.sumAssoc xr yr zr) (Sum.inl (Sum.inl i)))\n[PROOFSTEP]\napply addAssocRelabelling\n[GOAL]\ncase refine'_2.inl.inr\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\ni : yr\n⊢ moveRight (mk xl xr xL xR + mk yl yr yL yR + mk zl zr zL zR) (Sum.inl (Sum.inr i)) ≡r\n    moveRight (mk xl xr xL xR + (mk yl yr yL yR + mk zl zr zL zR)) (↑(Equiv.sumAssoc xr yr zr) (Sum.inl (Sum.inr i)))\n[PROOFSTEP]\napply addAssocRelabelling ⟨xl, xr, xL, xR⟩ (yR i)\n[GOAL]\ncase refine'_2.inr\nxl xr : Type u\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u\nzL : zl → PGame\nzR : zr → PGame\ni : zr\n⊢ moveRight (mk xl xr xL xR + mk yl yr yL yR + mk zl zr zL zR) (Sum.inr i) ≡r\n    moveRight (mk xl xr xL xR + (mk yl yr yL yR + mk zl zr zL zR)) (↑(Equiv.sumAssoc xr yr zr) (Sum.inr i))\n[PROOFSTEP]\napply addAssocRelabelling ⟨xl, xr, xL, xR⟩ ⟨yl, yr, yL, yR⟩ (zR i)\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\ni : LeftMoves (-mk xl xr xL xR + mk xl xr xL xR)\n⊢ ∃ j, moveRight (moveLeft (-mk xl xr xL xR + mk xl xr xL xR) i) j ≤ 0\n[PROOFSTEP]\ncases' i with i i\n[GOAL]\ncase inl\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\ni : xr\n⊢ ∃ j, moveRight (moveLeft (-mk xl xr xL xR + mk xl xr xL xR) (Sum.inl i)) j ≤ 0\n[PROOFSTEP]\nrefine' ⟨@toRightMovesAdd _ ⟨_, _, _, _⟩ (Sum.inr i), _⟩\n[GOAL]\ncase inl\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\ni : xr\n⊢ moveRight (moveLeft (-mk xl xr xL xR + mk xl xr xL xR) (Sum.inl i)) (↑toRightMovesAdd (Sum.inr i)) ≤ 0\n[PROOFSTEP]\nconvert @add_left_neg_le_zero (xR i)\n[GOAL]\ncase h.e'_3\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\ni : xr\n⊢ moveRight (moveLeft (-mk xl xr xL xR + mk xl xr xL xR) (Sum.inl i)) (↑toRightMovesAdd (Sum.inr i)) = -xR i + xR i\n[PROOFSTEP]\napply add_moveRight_inr\n[GOAL]\ncase inr\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ ∃ j, moveRight (moveLeft (-mk xl xr xL xR + mk xl xr xL xR) (Sum.inr i)) j ≤ 0\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase inr\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ ∃ j, moveRight ((mk xr xl (fun j => -xR j) fun i => -xL i) + xL i) j ≤ 0\n[PROOFSTEP]\nrefine' ⟨@toRightMovesAdd ⟨_, _, _, _⟩ _ (Sum.inl i), _⟩\n[GOAL]\ncase inr\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ moveRight ((mk xr xl (fun j => -xR j) fun i => -xL i) + xL i) (↑toRightMovesAdd (Sum.inl i)) ≤ 0\n[PROOFSTEP]\nconvert @add_left_neg_le_zero (xL i)\n[GOAL]\ncase h.e'_3\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\ni : xl\n⊢ moveRight ((mk xr xl (fun j => -xR j) fun i => -xL i) + xL i) (↑toRightMovesAdd (Sum.inl i)) = -xL i + xL i\n[PROOFSTEP]\napply add_moveRight_inl\n[GOAL]\nx : PGame\n⊢ 0 ≤ -x + x\n[PROOFSTEP]\nrw [← neg_le_neg_iff, neg_zero]\n[GOAL]\nx : PGame\n⊢ -(-x + x) ≤ 0\n[PROOFSTEP]\nexact neg_add_le.trans (add_left_neg_le_zero _)\n[GOAL]\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh : mk xl xr xL xR ≤ mk yl yr yL yR\n⊢ mk xl xr xL xR + mk zl zr zL zR ≤ mk yl yr yL yR + mk zl zr zL zR\n[PROOFSTEP]\nrefine' le_def.2 ⟨fun i => _, fun i => _⟩\n[GOAL]\ncase refine'_1\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh : mk xl xr xL xR ≤ mk yl yr yL yR\ni : LeftMoves (mk xl xr xL xR + mk zl zr zL zR)\n⊢ (∃ i', moveLeft (mk xl xr xL xR + mk zl zr zL zR) i ≤ moveLeft (mk yl yr yL yR + mk zl zr zL zR) i') ∨\n    ∃ j, moveRight (moveLeft (mk xl xr xL xR + mk zl zr zL zR) i) j ≤ mk yl yr yL yR + mk zl zr zL zR\n[PROOFSTEP]\ncases' i with i i\n[GOAL]\ncase refine'_2\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh : mk xl xr xL xR ≤ mk yl yr yL yR\ni : RightMoves (mk yl yr yL yR + mk zl zr zL zR)\n⊢ (∃ i_1, mk xl xr xL xR + mk zl zr zL zR ≤ moveLeft (moveRight (mk yl yr yL yR + mk zl zr zL zR) i) i_1) ∨\n    ∃ j', moveRight (mk xl xr xL xR + mk zl zr zL zR) j' ≤ moveRight (mk yl yr yL yR + mk zl zr zL zR) i\n[PROOFSTEP]\ncases' i with i i\n[GOAL]\ncase refine'_1.inl\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh : mk xl xr xL xR ≤ mk yl yr yL yR\ni : xl\n⊢ (∃ i', moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inl i) ≤ moveLeft (mk yl yr yL yR + mk zl zr zL zR) i') ∨\n    ∃ j, moveRight (moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inl i)) j ≤ mk yl yr yL yR + mk zl zr zL zR\n[PROOFSTEP]\nrw [le_def] at h \n[GOAL]\ncase refine'_1.inl\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh :\n  (∀ (i : LeftMoves (mk xl xr xL xR)),\n      (∃ i', moveLeft (mk xl xr xL xR) i ≤ moveLeft (mk yl yr yL yR) i') ∨\n        ∃ j, moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR) ∧\n    ∀ (j : RightMoves (mk yl yr yL yR)),\n      (∃ i, mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) j) i) ∨\n        ∃ j', moveRight (mk xl xr xL xR) j' ≤ moveRight (mk yl yr yL yR) j\ni : xl\n⊢ (∃ i', moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inl i) ≤ moveLeft (mk yl yr yL yR + mk zl zr zL zR) i') ∨\n    ∃ j, moveRight (moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inl i)) j ≤ mk yl yr yL yR + mk zl zr zL zR\n[PROOFSTEP]\ncases' h with h_left h_right\n[GOAL]\ncase refine'_1.inl.intro\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\ni : xl\nh_left :\n  ∀ (i : LeftMoves (mk xl xr xL xR)),\n    (∃ i', moveLeft (mk xl xr xL xR) i ≤ moveLeft (mk yl yr yL yR) i') ∨\n      ∃ j, moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR\nh_right :\n  ∀ (j : RightMoves (mk yl yr yL yR)),\n    (∃ i, mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) j) i) ∨\n      ∃ j', moveRight (mk xl xr xL xR) j' ≤ moveRight (mk yl yr yL yR) j\n⊢ (∃ i', moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inl i) ≤ moveLeft (mk yl yr yL yR + mk zl zr zL zR) i') ∨\n    ∃ j, moveRight (moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inl i)) j ≤ mk yl yr yL yR + mk zl zr zL zR\n[PROOFSTEP]\nrcases h_left i with (⟨i', ih⟩ | ⟨j, jh⟩)\n[GOAL]\ncase refine'_1.inl.intro.inl.intro\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\ni : xl\nh_left :\n  ∀ (i : LeftMoves (mk xl xr xL xR)),\n    (∃ i', moveLeft (mk xl xr xL xR) i ≤ moveLeft (mk yl yr yL yR) i') ∨\n      ∃ j, moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR\nh_right :\n  ∀ (j : RightMoves (mk yl yr yL yR)),\n    (∃ i, mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) j) i) ∨\n      ∃ j', moveRight (mk xl xr xL xR) j' ≤ moveRight (mk yl yr yL yR) j\ni' : LeftMoves (mk yl yr yL yR)\nih : moveLeft (mk xl xr xL xR) i ≤ moveLeft (mk yl yr yL yR) i'\n⊢ (∃ i', moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inl i) ≤ moveLeft (mk yl yr yL yR + mk zl zr zL zR) i') ∨\n    ∃ j, moveRight (moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inl i)) j ≤ mk yl yr yL yR + mk zl zr zL zR\n[PROOFSTEP]\nexact Or.inl ⟨toLeftMovesAdd (Sum.inl i'), add_le_add_right' ih⟩\n[GOAL]\ncase refine'_1.inl.intro.inr.intro\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\ni : xl\nh_left :\n  ∀ (i : LeftMoves (mk xl xr xL xR)),\n    (∃ i', moveLeft (mk xl xr xL xR) i ≤ moveLeft (mk yl yr yL yR) i') ∨\n      ∃ j, moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR\nh_right :\n  ∀ (j : RightMoves (mk yl yr yL yR)),\n    (∃ i, mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) j) i) ∨\n      ∃ j', moveRight (mk xl xr xL xR) j' ≤ moveRight (mk yl yr yL yR) j\nj : RightMoves (moveLeft (mk xl xr xL xR) i)\njh : moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR\n⊢ (∃ i', moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inl i) ≤ moveLeft (mk yl yr yL yR + mk zl zr zL zR) i') ∨\n    ∃ j, moveRight (moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inl i)) j ≤ mk yl yr yL yR + mk zl zr zL zR\n[PROOFSTEP]\nrefine' Or.inr ⟨toRightMovesAdd (Sum.inl j), _⟩\n[GOAL]\ncase refine'_1.inl.intro.inr.intro\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\ni : xl\nh_left :\n  ∀ (i : LeftMoves (mk xl xr xL xR)),\n    (∃ i', moveLeft (mk xl xr xL xR) i ≤ moveLeft (mk yl yr yL yR) i') ∨\n      ∃ j, moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR\nh_right :\n  ∀ (j : RightMoves (mk yl yr yL yR)),\n    (∃ i, mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) j) i) ∨\n      ∃ j', moveRight (mk xl xr xL xR) j' ≤ moveRight (mk yl yr yL yR) j\nj : RightMoves (moveLeft (mk xl xr xL xR) i)\njh : moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR\n⊢ moveRight (moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inl i)) (↑toRightMovesAdd (Sum.inl j)) ≤\n    mk yl yr yL yR + mk zl zr zL zR\n[PROOFSTEP]\nconvert add_le_add_right' jh\n[GOAL]\ncase h.e'_3\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\ni : xl\nh_left :\n  ∀ (i : LeftMoves (mk xl xr xL xR)),\n    (∃ i', moveLeft (mk xl xr xL xR) i ≤ moveLeft (mk yl yr yL yR) i') ∨\n      ∃ j, moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR\nh_right :\n  ∀ (j : RightMoves (mk yl yr yL yR)),\n    (∃ i, mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) j) i) ∨\n      ∃ j', moveRight (mk xl xr xL xR) j' ≤ moveRight (mk yl yr yL yR) j\nj : RightMoves (moveLeft (mk xl xr xL xR) i)\njh : moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR\n⊢ moveRight (moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inl i)) (↑toRightMovesAdd (Sum.inl j)) =\n    moveRight (moveLeft (mk xl xr xL xR) i) j + mk zl zr zL zR\n[PROOFSTEP]\napply add_moveRight_inl\n[GOAL]\ncase refine'_1.inr\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh : mk xl xr xL xR ≤ mk yl yr yL yR\ni : zl\n⊢ (∃ i', moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inr i) ≤ moveLeft (mk yl yr yL yR + mk zl zr zL zR) i') ∨\n    ∃ j, moveRight (moveLeft (mk xl xr xL xR + mk zl zr zL zR) (Sum.inr i)) j ≤ mk yl yr yL yR + mk zl zr zL zR\n[PROOFSTEP]\nexact Or.inl ⟨@toLeftMovesAdd _ ⟨_, _, _, _⟩ (Sum.inr i), add_le_add_right' h⟩\n[GOAL]\ncase refine'_2.inl\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh : mk xl xr xL xR ≤ mk yl yr yL yR\ni : yr\n⊢ (∃ i_1, mk xl xr xL xR + mk zl zr zL zR ≤ moveLeft (moveRight (mk yl yr yL yR + mk zl zr zL zR) (Sum.inl i)) i_1) ∨\n    ∃ j', moveRight (mk xl xr xL xR + mk zl zr zL zR) j' ≤ moveRight (mk yl yr yL yR + mk zl zr zL zR) (Sum.inl i)\n[PROOFSTEP]\nrw [le_def] at h \n[GOAL]\ncase refine'_2.inl\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh :\n  (∀ (i : LeftMoves (mk xl xr xL xR)),\n      (∃ i', moveLeft (mk xl xr xL xR) i ≤ moveLeft (mk yl yr yL yR) i') ∨\n        ∃ j, moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR) ∧\n    ∀ (j : RightMoves (mk yl yr yL yR)),\n      (∃ i, mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) j) i) ∨\n        ∃ j', moveRight (mk xl xr xL xR) j' ≤ moveRight (mk yl yr yL yR) j\ni : yr\n⊢ (∃ i_1, mk xl xr xL xR + mk zl zr zL zR ≤ moveLeft (moveRight (mk yl yr yL yR + mk zl zr zL zR) (Sum.inl i)) i_1) ∨\n    ∃ j', moveRight (mk xl xr xL xR + mk zl zr zL zR) j' ≤ moveRight (mk yl yr yL yR + mk zl zr zL zR) (Sum.inl i)\n[PROOFSTEP]\nrcases h.right i with (⟨i, ih⟩ | ⟨j', jh⟩)\n[GOAL]\ncase refine'_2.inl.inl.intro\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh :\n  (∀ (i : LeftMoves (mk xl xr xL xR)),\n      (∃ i', moveLeft (mk xl xr xL xR) i ≤ moveLeft (mk yl yr yL yR) i') ∨\n        ∃ j, moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR) ∧\n    ∀ (j : RightMoves (mk yl yr yL yR)),\n      (∃ i, mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) j) i) ∨\n        ∃ j', moveRight (mk xl xr xL xR) j' ≤ moveRight (mk yl yr yL yR) j\ni✝ : yr\ni : LeftMoves (moveRight (mk yl yr yL yR) i✝)\nih : mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) i✝) i\n⊢ (∃ i, mk xl xr xL xR + mk zl zr zL zR ≤ moveLeft (moveRight (mk yl yr yL yR + mk zl zr zL zR) (Sum.inl i✝)) i) ∨\n    ∃ j', moveRight (mk xl xr xL xR + mk zl zr zL zR) j' ≤ moveRight (mk yl yr yL yR + mk zl zr zL zR) (Sum.inl i✝)\n[PROOFSTEP]\nrefine' Or.inl ⟨toLeftMovesAdd (Sum.inl i), _⟩\n[GOAL]\ncase refine'_2.inl.inl.intro\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh :\n  (∀ (i : LeftMoves (mk xl xr xL xR)),\n      (∃ i', moveLeft (mk xl xr xL xR) i ≤ moveLeft (mk yl yr yL yR) i') ∨\n        ∃ j, moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR) ∧\n    ∀ (j : RightMoves (mk yl yr yL yR)),\n      (∃ i, mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) j) i) ∨\n        ∃ j', moveRight (mk xl xr xL xR) j' ≤ moveRight (mk yl yr yL yR) j\ni✝ : yr\ni : LeftMoves (moveRight (mk yl yr yL yR) i✝)\nih : mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) i✝) i\n⊢ mk xl xr xL xR + mk zl zr zL zR ≤\n    moveLeft (moveRight (mk yl yr yL yR + mk zl zr zL zR) (Sum.inl i✝)) (↑toLeftMovesAdd (Sum.inl i))\n[PROOFSTEP]\nconvert add_le_add_right' ih\n[GOAL]\ncase h.e'_4\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh :\n  (∀ (i : LeftMoves (mk xl xr xL xR)),\n      (∃ i', moveLeft (mk xl xr xL xR) i ≤ moveLeft (mk yl yr yL yR) i') ∨\n        ∃ j, moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR) ∧\n    ∀ (j : RightMoves (mk yl yr yL yR)),\n      (∃ i, mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) j) i) ∨\n        ∃ j', moveRight (mk xl xr xL xR) j' ≤ moveRight (mk yl yr yL yR) j\ni✝ : yr\ni : LeftMoves (moveRight (mk yl yr yL yR) i✝)\nih : mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) i✝) i\n⊢ moveLeft (moveRight (mk yl yr yL yR + mk zl zr zL zR) (Sum.inl i✝)) (↑toLeftMovesAdd (Sum.inl i)) =\n    moveLeft (moveRight (mk yl yr yL yR) i✝) i + mk zl zr zL zR\n[PROOFSTEP]\napply add_moveLeft_inl\n[GOAL]\ncase refine'_2.inl.inr.intro\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh :\n  (∀ (i : LeftMoves (mk xl xr xL xR)),\n      (∃ i', moveLeft (mk xl xr xL xR) i ≤ moveLeft (mk yl yr yL yR) i') ∨\n        ∃ j, moveRight (moveLeft (mk xl xr xL xR) i) j ≤ mk yl yr yL yR) ∧\n    ∀ (j : RightMoves (mk yl yr yL yR)),\n      (∃ i, mk xl xr xL xR ≤ moveLeft (moveRight (mk yl yr yL yR) j) i) ∨\n        ∃ j', moveRight (mk xl xr xL xR) j' ≤ moveRight (mk yl yr yL yR) j\ni : yr\nj' : RightMoves (mk xl xr xL xR)\njh : moveRight (mk xl xr xL xR) j' ≤ moveRight (mk yl yr yL yR) i\n⊢ (∃ i_1, mk xl xr xL xR + mk zl zr zL zR ≤ moveLeft (moveRight (mk yl yr yL yR + mk zl zr zL zR) (Sum.inl i)) i_1) ∨\n    ∃ j', moveRight (mk xl xr xL xR + mk zl zr zL zR) j' ≤ moveRight (mk yl yr yL yR + mk zl zr zL zR) (Sum.inl i)\n[PROOFSTEP]\nexact Or.inr ⟨toRightMovesAdd (Sum.inl j'), add_le_add_right' jh⟩\n[GOAL]\ncase refine'_2.inr\nxl xr : Type u_1\nxL : xl → PGame\nxR : xr → PGame\nyl yr : Type u_1\nyL : yl → PGame\nyR : yr → PGame\nzl zr : Type u_1\nzL : zl → PGame\nzR : zr → PGame\nh : mk xl xr xL xR ≤ mk yl yr yL yR\ni : zr\n⊢ (∃ i_1, mk xl xr xL xR + mk zl zr zL zR ≤ moveLeft (moveRight (mk yl yr yL yR + mk zl zr zL zR) (Sum.inr i)) i_1) ∨\n    ∃ j', moveRight (mk xl xr xL xR + mk zl zr zL zR) j' ≤ moveRight (mk yl yr yL yR + mk zl zr zL zR) (Sum.inr i)\n[PROOFSTEP]\nexact Or.inr ⟨@toRightMovesAdd _ ⟨_, _, _, _⟩ (Sum.inr i), add_le_add_right' h⟩\n[GOAL]\ny z : PGame\nh : y ⧏ z\nx : PGame\nthis : z + x ≤ y + x → z ≤ y\n⊢ y + x ⧏ z + x\n[PROOFSTEP]\nrw [← PGame.not_le] at h ⊢\n[GOAL]\ny z : PGame\nh : ¬z ≤ y\nx : PGame\nthis : z + x ≤ y + x → z ≤ y\n⊢ ¬z + x ≤ y + x\n[PROOFSTEP]\nexact mt this h\n[GOAL]\ny z : PGame\nh : y ⧏ z\nx : PGame\n⊢ x + y ⧏ x + z\n[PROOFSTEP]\nrw [lf_congr add_comm_equiv add_comm_equiv]\n[GOAL]\ny z : PGame\nh : y ⧏ z\nx : PGame\n⊢ y + x ⧏ z + x\n[PROOFSTEP]\napply add_lf_add_right h\n[GOAL]\n⊢ star ⧏ 0\n[PROOFSTEP]\nrw [lf_zero]\n[GOAL]\n⊢ ∃ j, ∀ (i : LeftMoves (moveRight star j)), moveLeft (moveRight star j) i ⧏ 0\n[PROOFSTEP]\nuse default\n[GOAL]\ncase h\n⊢ ∀ (i : LeftMoves (moveRight star default)), moveLeft (moveRight star default) i ⧏ 0\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\n⊢ 0 ⧏ star\n[PROOFSTEP]\nrw [zero_lf]\n[GOAL]\n⊢ ∃ i, ∀ (j : RightMoves (moveLeft star i)), 0 ⧏ moveRight (moveLeft star i) j\n[PROOFSTEP]\nuse default\n[GOAL]\ncase h\n⊢ ∀ (j : RightMoves (moveLeft star default)), 0 ⧏ moveRight (moveLeft star default) j\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\n⊢ -star = star\n[PROOFSTEP]\nsimp [star]\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Game.PGame", "llama_tokens": 51038, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6370308082623216, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.35812375074536373}}
{"text": "[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\nf g : ModularForm Γ k\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\ng : ModularForm Γ k\ntoSlashInvariantForm✝ : SlashInvariantForm Γ k\nholo'✝ : MDifferentiable 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ) ↑toSlashInvariantForm✝\nbdd_at_infty'✝ : ∀ (A : SL(2, ℤ)), IsBoundedAtImInfty (↑toSlashInvariantForm✝ ∣[k] A)\nh :\n  (fun f => f.toFun)\n      { toSlashInvariantForm := toSlashInvariantForm✝, holo' := holo'✝, bdd_at_infty' := bdd_at_infty'✝ } =\n    (fun f => f.toFun) g\n⊢ { toSlashInvariantForm := toSlashInvariantForm✝, holo' := holo'✝, bdd_at_infty' := bdd_at_infty'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\ntoSlashInvariantForm✝¹ : SlashInvariantForm Γ k\nholo'✝¹ : MDifferentiable 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ) ↑toSlashInvariantForm✝¹\nbdd_at_infty'✝¹ : ∀ (A : SL(2, ℤ)), IsBoundedAtImInfty (↑toSlashInvariantForm✝¹ ∣[k] A)\ntoSlashInvariantForm✝ : SlashInvariantForm Γ k\nholo'✝ : MDifferentiable 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ) ↑toSlashInvariantForm✝\nbdd_at_infty'✝ : ∀ (A : SL(2, ℤ)), IsBoundedAtImInfty (↑toSlashInvariantForm✝ ∣[k] A)\nh :\n  (fun f => f.toFun)\n      { toSlashInvariantForm := toSlashInvariantForm✝¹, holo' := holo'✝¹, bdd_at_infty' := bdd_at_infty'✝¹ } =\n    (fun f => f.toFun)\n      { toSlashInvariantForm := toSlashInvariantForm✝, holo' := holo'✝, bdd_at_infty' := bdd_at_infty'✝ }\n⊢ { toSlashInvariantForm := toSlashInvariantForm✝¹, holo' := holo'✝¹, bdd_at_infty' := bdd_at_infty'✝¹ } =\n    { toSlashInvariantForm := toSlashInvariantForm✝, holo' := holo'✝, bdd_at_infty' := bdd_at_infty'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_toSlashInvariantForm\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\ntoSlashInvariantForm✝¹ : SlashInvariantForm Γ k\nholo'✝¹ : MDifferentiable 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ) ↑toSlashInvariantForm✝¹\nbdd_at_infty'✝¹ : ∀ (A : SL(2, ℤ)), IsBoundedAtImInfty (↑toSlashInvariantForm✝¹ ∣[k] A)\ntoSlashInvariantForm✝ : SlashInvariantForm Γ k\nholo'✝ : MDifferentiable 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ) ↑toSlashInvariantForm✝\nbdd_at_infty'✝ : ∀ (A : SL(2, ℤ)), IsBoundedAtImInfty (↑toSlashInvariantForm✝ ∣[k] A)\nh :\n  (fun f => f.toFun)\n      { toSlashInvariantForm := toSlashInvariantForm✝¹, holo' := holo'✝¹, bdd_at_infty' := bdd_at_infty'✝¹ } =\n    (fun f => f.toFun)\n      { toSlashInvariantForm := toSlashInvariantForm✝, holo' := holo'✝, bdd_at_infty' := bdd_at_infty'✝ }\n⊢ toSlashInvariantForm✝¹ = toSlashInvariantForm✝\n[PROOFSTEP]\nexact FunLike.ext' h\n[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\nf g : CuspForm Γ k\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\ng : CuspForm Γ k\ntoSlashInvariantForm✝ : SlashInvariantForm Γ k\nholo'✝ : MDifferentiable 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ) ↑toSlashInvariantForm✝\nzero_at_infty'✝ : ∀ (A : SL(2, ℤ)), IsZeroAtImInfty (↑toSlashInvariantForm✝ ∣[k] A)\nh :\n  (fun f => f.toFun)\n      { toSlashInvariantForm := toSlashInvariantForm✝, holo' := holo'✝, zero_at_infty' := zero_at_infty'✝ } =\n    (fun f => f.toFun) g\n⊢ { toSlashInvariantForm := toSlashInvariantForm✝, holo' := holo'✝, zero_at_infty' := zero_at_infty'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\ntoSlashInvariantForm✝¹ : SlashInvariantForm Γ k\nholo'✝¹ : MDifferentiable 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ) ↑toSlashInvariantForm✝¹\nzero_at_infty'✝¹ : ∀ (A : SL(2, ℤ)), IsZeroAtImInfty (↑toSlashInvariantForm✝¹ ∣[k] A)\ntoSlashInvariantForm✝ : SlashInvariantForm Γ k\nholo'✝ : MDifferentiable 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ) ↑toSlashInvariantForm✝\nzero_at_infty'✝ : ∀ (A : SL(2, ℤ)), IsZeroAtImInfty (↑toSlashInvariantForm✝ ∣[k] A)\nh :\n  (fun f => f.toFun)\n      { toSlashInvariantForm := toSlashInvariantForm✝¹, holo' := holo'✝¹, zero_at_infty' := zero_at_infty'✝¹ } =\n    (fun f => f.toFun)\n      { toSlashInvariantForm := toSlashInvariantForm✝, holo' := holo'✝, zero_at_infty' := zero_at_infty'✝ }\n⊢ { toSlashInvariantForm := toSlashInvariantForm✝¹, holo' := holo'✝¹, zero_at_infty' := zero_at_infty'✝¹ } =\n    { toSlashInvariantForm := toSlashInvariantForm✝, holo' := holo'✝, zero_at_infty' := zero_at_infty'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_toSlashInvariantForm\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\ntoSlashInvariantForm✝¹ : SlashInvariantForm Γ k\nholo'✝¹ : MDifferentiable 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ) ↑toSlashInvariantForm✝¹\nzero_at_infty'✝¹ : ∀ (A : SL(2, ℤ)), IsZeroAtImInfty (↑toSlashInvariantForm✝¹ ∣[k] A)\ntoSlashInvariantForm✝ : SlashInvariantForm Γ k\nholo'✝ : MDifferentiable 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ) ↑toSlashInvariantForm✝\nzero_at_infty'✝ : ∀ (A : SL(2, ℤ)), IsZeroAtImInfty (↑toSlashInvariantForm✝ ∣[k] A)\nh :\n  (fun f => f.toFun)\n      { toSlashInvariantForm := toSlashInvariantForm✝¹, holo' := holo'✝¹, zero_at_infty' := zero_at_infty'✝¹ } =\n    (fun f => f.toFun)\n      { toSlashInvariantForm := toSlashInvariantForm✝, holo' := holo'✝, zero_at_infty' := zero_at_infty'✝ }\n⊢ toSlashInvariantForm✝¹ = toSlashInvariantForm✝\n[PROOFSTEP]\nexact FunLike.ext' h\n[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\nf g : ModularForm Γ k\nA : SL(2, ℤ)\n⊢ IsBoundedAtImInfty\n    (↑({ toFun := ↑f, slash_action_eq' := (_ : ∀ (γ : { x // x ∈ Γ }), ↑f ∣[k] γ = ↑f) } +\n          { toFun := ↑g, slash_action_eq' := (_ : ∀ (γ : { x // x ∈ Γ }), ↑g ∣[k] γ = ↑g) }) ∣[k]\n      A)\n[PROOFSTEP]\nsimpa using (f.bdd_at_infty' A).add (g.bdd_at_infty' A)\n[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\nA : SL(2, ℤ)\n⊢ IsBoundedAtImInfty (↑0 ∣[k] A)\n[PROOFSTEP]\nsimpa using zero_form_isBoundedAtImInfty\n[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\nα : Type u_2\ninst✝¹ : SMul α ℂ\ninst✝ : IsScalarTower α ℂ ℂ\nc : α\nf : ModularForm Γ k\n⊢ MDifferentiable 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ) ↑(c • f.toSlashInvariantForm)\n[PROOFSTEP]\nsimpa using f.holo'.const_smul (c • (1 : ℂ))\n[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\nα : Type u_2\ninst✝¹ : SMul α ℂ\ninst✝ : IsScalarTower α ℂ ℂ\nc : α\nf : ModularForm Γ k\nA : SL(2, ℤ)\n⊢ IsBoundedAtImInfty (↑(c • f.toSlashInvariantForm) ∣[k] A)\n[PROOFSTEP]\nsimpa using (f.bdd_at_infty' A).const_smul_left (c • (1 : ℂ))\n[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\nf : ModularForm Γ k\nA : SL(2, ℤ)\n⊢ IsBoundedAtImInfty (↑(-f.toSlashInvariantForm) ∣[k] A)\n[PROOFSTEP]\nsimpa using (f.bdd_at_infty' A).neg\n[GOAL]\nF : Type u_1\nΓ✝ : Subgroup SL(2, ℤ)\nk k_1 k_2 : ℤ\nΓ : Subgroup SL(2, ℤ)\nf : ModularForm Γ k_1\ng : ModularForm Γ k_2\nA : SL(2, ℤ)\n⊢ IsBoundedAtImInfty (↑(SlashInvariantForm.mul f.toSlashInvariantForm g.toSlashInvariantForm) ∣[k_1 + k_2] A)\n[PROOFSTEP]\nrw [SlashInvariantForm.coe_mul, mul_slash_SL2]\n[GOAL]\nF : Type u_1\nΓ✝ : Subgroup SL(2, ℤ)\nk k_1 k_2 : ℤ\nΓ : Subgroup SL(2, ℤ)\nf : ModularForm Γ k_1\ng : ModularForm Γ k_2\nA : SL(2, ℤ)\n⊢ IsBoundedAtImInfty (↑f.toSlashInvariantForm ∣[k_1] A * ↑g.toSlashInvariantForm ∣[k_2] A)\n[PROOFSTEP]\nexact (f.bdd_at_infty' A).mul (g.bdd_at_infty' A)\n[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\nA : SL(2, ℤ)\n⊢ IsBoundedAtImInfty (↑1 ∣[0] A)\n[PROOFSTEP]\nsimpa only [SlashInvariantForm.one_coe_eq_one, ModularForm.is_invariant_one] using\n  atImInfty.const_boundedAtFilter (1 : ℂ)\n[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\nf g : CuspForm Γ k\nA : SL(2, ℤ)\n⊢ IsZeroAtImInfty\n    (↑({ toFun := ↑f, slash_action_eq' := (_ : ∀ (γ : { x // x ∈ Γ }), ↑f ∣[k] γ = ↑f) } +\n          { toFun := ↑g, slash_action_eq' := (_ : ∀ (γ : { x // x ∈ Γ }), ↑g ∣[k] γ = ↑g) }) ∣[k]\n      A)\n[PROOFSTEP]\nsimpa using (f.zero_at_infty' A).add (g.zero_at_infty' A)\n[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\n⊢ ∀ (A : SL(2, ℤ)), IsZeroAtImInfty (↑0 ∣[k] A)\n[PROOFSTEP]\nsimpa using Filter.zero_zeroAtFilter _\n[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\nα : Type u_2\ninst✝¹ : SMul α ℂ\ninst✝ : IsScalarTower α ℂ ℂ\nc : α\nf : CuspForm Γ k\n⊢ MDifferentiable 𝓘(ℂ, ℂ) 𝓘(ℂ, ℂ) ↑(c • f.toSlashInvariantForm)\n[PROOFSTEP]\nsimpa using f.holo'.const_smul (c • (1 : ℂ))\n[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\nα : Type u_2\ninst✝¹ : SMul α ℂ\ninst✝ : IsScalarTower α ℂ ℂ\nc : α\nf : CuspForm Γ k\nA : SL(2, ℤ)\n⊢ IsZeroAtImInfty (↑(c • f.toSlashInvariantForm) ∣[k] A)\n[PROOFSTEP]\nsimpa using (f.zero_at_infty' A).smul (c • (1 : ℂ))\n[GOAL]\nF : Type u_1\nΓ : Subgroup SL(2, ℤ)\nk : ℤ\nf : CuspForm Γ k\nA : SL(2, ℤ)\n⊢ IsZeroAtImInfty (↑(-f.toSlashInvariantForm) ∣[k] A)\n[PROOFSTEP]\nsimpa using (f.zero_at_infty' A).neg\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.ModularForms.Basic", "llama_tokens": 4423, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802735722128, "lm_q2_score": 0.5350984286266116, "lm_q1q2_score": 0.35791678332782917}}
{"text": "[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝¹ : CommSemiring R\ninst✝ : DecidableEq σ\ni : σ\n⊢ pderiv i = mkDerivation R (Pi.single i 1)\n[PROOFSTEP]\nunfold pderiv\n[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝¹ : CommSemiring R\ninst✝ : DecidableEq σ\ni : σ\n⊢ mkDerivation R (Pi.single i 1) = mkDerivation R (Pi.single i 1)\n[PROOFSTEP]\ncongr!\n[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni : σ\n⊢ ↑(pderiv i) (↑(monomial s) a) = ↑(monomial (s - single i 1)) (a * ↑(↑s i))\n[PROOFSTEP]\nclassical\nsimp only [pderiv_def, mkDerivation_monomial, Finsupp.smul_sum, smul_eq_mul, ← smul_mul_assoc, ← (monomial _).map_smul]\nrefine' (Finset.sum_eq_single i (fun j _ hne => _) fun hi => _).trans _\n· simp [Pi.single_eq_of_ne hne]\n· rw [Finsupp.not_mem_support_iff] at hi ; simp [hi]\n· simp\n[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni : σ\n⊢ ↑(pderiv i) (↑(monomial s) a) = ↑(monomial (s - single i 1)) (a * ↑(↑s i))\n[PROOFSTEP]\nsimp only [pderiv_def, mkDerivation_monomial, Finsupp.smul_sum, smul_eq_mul, ← smul_mul_assoc, ← (monomial _).map_smul]\n[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni : σ\n⊢ (sum s fun a_1 b => ↑(monomial (s - single a_1 1)) (a * ↑b) * Pi.single i 1 a_1) =\n    ↑(monomial (s - single i 1)) (a * ↑(↑s i))\n[PROOFSTEP]\nrefine' (Finset.sum_eq_single i (fun j _ hne => _) fun hi => _).trans _\n[GOAL]\ncase refine'_1\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni j : σ\nx✝ : j ∈ s.support\nhne : j ≠ i\n⊢ (fun a_1 b => ↑(monomial (s - single a_1 1)) (a * ↑b) * Pi.single i 1 a_1) j (↑s j) = 0\n[PROOFSTEP]\nsimp [Pi.single_eq_of_ne hne]\n[GOAL]\ncase refine'_2\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni : σ\nhi : ¬i ∈ s.support\n⊢ (fun a_1 b => ↑(monomial (s - single a_1 1)) (a * ↑b) * Pi.single i 1 a_1) i (↑s i) = 0\n[PROOFSTEP]\nrw [Finsupp.not_mem_support_iff] at hi \n[GOAL]\ncase refine'_2\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni : σ\nhi : ↑s i = 0\n⊢ (fun a_1 b => ↑(monomial (s - single a_1 1)) (a * ↑b) * Pi.single i 1 a_1) i (↑s i) = 0\n[PROOFSTEP]\nsimp [hi]\n[GOAL]\ncase refine'_3\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni : σ\n⊢ (fun a_1 b => ↑(monomial (s - single a_1 1)) (a * ↑b) * Pi.single i 1 a_1) i (↑s i) =\n    ↑(monomial (s - single i 1)) (a * ↑(↑s i))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝¹ : CommSemiring R\ninst✝ : DecidableEq σ\ni j : σ\n⊢ ↑(pderiv i) (X j) = Pi.single i 1 j\n[PROOFSTEP]\nrw [pderiv_def, mkDerivation_X]\n[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni : σ\n⊢ ↑(pderiv i) (X i) = 1\n[PROOFSTEP]\nclassical simp\n[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni : σ\n⊢ ↑(pderiv i) (X i) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni j : σ\nh : j ≠ i\n⊢ ↑(pderiv i) (X j) = 0\n[PROOFSTEP]\nclassical simp [h]\n[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni j : σ\nh : j ≠ i\n⊢ ↑(pderiv i) (X j) = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni : σ\nn : ℕ\n⊢ ↑(pderiv i) (↑(monomial (single i n)) a) = ↑(monomial (single i (n - 1))) (a * ↑n)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\ni : σ\nf g : MvPolynomial σ R\n⊢ ↑(pderiv i) (f * g) = ↑(pderiv i) f * g + f * ↑(pderiv i) g\n[PROOFSTEP]\nsimp only [(pderiv i).leibniz f g, smul_eq_mul, mul_comm, add_comm]\n[GOAL]\nR : Type u\nσ : Type v\na a' a₁ a₂ : R\ns : σ →₀ ℕ\ninst✝ : CommSemiring R\nf : MvPolynomial σ R\ni : σ\n⊢ ↑(pderiv i) (↑C a * f) = ↑C a * ↑(pderiv i) f\n[PROOFSTEP]\nrw [C_mul', Derivation.map_smul, C_mul']\n", "meta": {"mathlib_filename": "Mathlib.Data.MvPolynomial.PDeriv", "llama_tokens": 2086, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802735722127, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.357916783327829}}
{"text": "[GOAL]\nα✝ : Sort ?u.774\nβ✝ : Sort ?u.777\nγ : Sort ?u.780\nf✝ : α✝ → β✝\nα α' : Sort u\nβ : α → Sort v\nβ' : α' → Sort v\nf : (a : α) → β a\nf' : (a : α') → β' a\nhα : α = α'\nh : ∀ (a : α) (a' : α'), HEq a a' → HEq (f a) (f' a')\n⊢ HEq f f'\n[PROOFSTEP]\nsubst hα\n[GOAL]\nα✝ : Sort ?u.774\nβ✝ : Sort ?u.777\nγ : Sort ?u.780\nf✝ : α✝ → β✝\nα : Sort u\nβ : α → Sort v\nf : (a : α) → β a\nβ' : α → Sort v\nf' : (a : α) → β' a\nh : ∀ (a a' : α), HEq a a' → HEq (f a) (f' a')\n⊢ HEq f f'\n[PROOFSTEP]\nhave : ∀ a, HEq (f a) (f' a) := λ a => h a a (HEq.refl a)\n[GOAL]\nα✝ : Sort ?u.774\nβ✝ : Sort ?u.777\nγ : Sort ?u.780\nf✝ : α✝ → β✝\nα : Sort u\nβ : α → Sort v\nf : (a : α) → β a\nβ' : α → Sort v\nf' : (a : α) → β' a\nh : ∀ (a a' : α), HEq a a' → HEq (f a) (f' a')\nthis : ∀ (a : α), HEq (f a) (f' a)\n⊢ HEq f f'\n[PROOFSTEP]\nhave : β = β' := by\n  funext a\n  exact type_eq_of_heq (this a)\n[GOAL]\nα✝ : Sort ?u.774\nβ✝ : Sort ?u.777\nγ : Sort ?u.780\nf✝ : α✝ → β✝\nα : Sort u\nβ : α → Sort v\nf : (a : α) → β a\nβ' : α → Sort v\nf' : (a : α) → β' a\nh : ∀ (a a' : α), HEq a a' → HEq (f a) (f' a')\nthis : ∀ (a : α), HEq (f a) (f' a)\n⊢ β = β'\n[PROOFSTEP]\nfunext a\n[GOAL]\ncase h\nα✝ : Sort ?u.774\nβ✝ : Sort ?u.777\nγ : Sort ?u.780\nf✝ : α✝ → β✝\nα : Sort u\nβ : α → Sort v\nf : (a : α) → β a\nβ' : α → Sort v\nf' : (a : α) → β' a\nh : ∀ (a a' : α), HEq a a' → HEq (f a) (f' a')\nthis : ∀ (a : α), HEq (f a) (f' a)\na : α\n⊢ β a = β' a\n[PROOFSTEP]\nexact type_eq_of_heq (this a)\n[GOAL]\nα✝ : Sort ?u.774\nβ✝ : Sort ?u.777\nγ : Sort ?u.780\nf✝ : α✝ → β✝\nα : Sort u\nβ : α → Sort v\nf : (a : α) → β a\nβ' : α → Sort v\nf' : (a : α) → β' a\nh : ∀ (a a' : α), HEq a a' → HEq (f a) (f' a')\nthis✝ : ∀ (a : α), HEq (f a) (f' a)\nthis : β = β'\n⊢ HEq f f'\n[PROOFSTEP]\nsubst this\n[GOAL]\nα✝ : Sort ?u.774\nβ✝ : Sort ?u.777\nγ : Sort ?u.780\nf✝ : α✝ → β✝\nα : Sort u\nβ : α → Sort v\nf f' : (a : α) → β a\nh : ∀ (a a' : α), HEq a a' → HEq (f a) (f' a')\nthis : ∀ (a : α), HEq (f a) (f' a)\n⊢ HEq f f'\n[PROOFSTEP]\napply heq_of_eq\n[GOAL]\ncase h\nα✝ : Sort ?u.774\nβ✝ : Sort ?u.777\nγ : Sort ?u.780\nf✝ : α✝ → β✝\nα : Sort u\nβ : α → Sort v\nf f' : (a : α) → β a\nh : ∀ (a a' : α), HEq a a' → HEq (f a) (f' a')\nthis : ∀ (a : α), HEq (f a) (f' a)\n⊢ f = f'\n[PROOFSTEP]\nfunext a\n[GOAL]\ncase h.h\nα✝ : Sort ?u.774\nβ✝ : Sort ?u.777\nγ : Sort ?u.780\nf✝ : α✝ → β✝\nα : Sort u\nβ : α → Sort v\nf f' : (a : α) → β a\nh : ∀ (a a' : α), HEq a a' → HEq (f a) (f' a')\nthis : ∀ (a : α), HEq (f a) (f' a)\na : α\n⊢ f a = f' a\n[PROOFSTEP]\nexact eq_of_heq (this a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Sort ?u.1351\nf : α → β\ninst✝³ : BEq α\ninst✝² : LawfulBEq α\ninst✝¹ : BEq β\ninst✝ : LawfulBEq β\nI : Injective f\na b : α\n⊢ (f a == f b) = (a == b)\n[PROOFSTEP]\nby_cases h : a == b\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Sort ?u.1351\nf : α → β\ninst✝³ : BEq α\ninst✝² : LawfulBEq α\ninst✝¹ : BEq β\ninst✝ : LawfulBEq β\nI : Injective f\na b : α\nh : (a == b) = true\n⊢ (f a == f b) = (a == b)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Sort ?u.1351\nf : α → β\ninst✝³ : BEq α\ninst✝² : LawfulBEq α\ninst✝¹ : BEq β\ninst✝ : LawfulBEq β\nI : Injective f\na b : α\nh : ¬(a == b) = true\n⊢ (f a == f b) = (a == b)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Sort ?u.1351\nf : α → β\ninst✝³ : BEq α\ninst✝² : LawfulBEq α\ninst✝¹ : BEq β\ninst✝ : LawfulBEq β\nI : Injective f\na b : α\nh : (a == b) = true\n⊢ f a = f b\n[PROOFSTEP]\nsimpa [I.eq_iff] using h\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Sort ?u.1351\nf : α → β\ninst✝³ : BEq α\ninst✝² : LawfulBEq α\ninst✝¹ : BEq β\ninst✝ : LawfulBEq β\nI : Injective f\na b : α\nh : ¬(a == b) = true\n⊢ ¬f a = f b\n[PROOFSTEP]\nsimpa [I.eq_iff] using h\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\n⊢ Injective fun x => if h : p x then f { val := x, property := h } else f' { val := x, property := h }\n[PROOFSTEP]\nintros x₁ x₂ h\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\nx₁ x₂ : α\nh :\n  (fun x => if h : p x then f { val := x, property := h } else f' { val := x, property := h }) x₁ =\n    (fun x => if h : p x then f { val := x, property := h } else f' { val := x, property := h }) x₂\n⊢ x₁ = x₂\n[PROOFSTEP]\ndsimp only at h \n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\nx₁ x₂ : α\nh :\n  (if h : p x₁ then f { val := x₁, property := h } else f' { val := x₁, property := h }) =\n    if h : p x₂ then f { val := x₂, property := h } else f' { val := x₂, property := h }\n⊢ x₁ = x₂\n[PROOFSTEP]\nby_cases h₁ : p x₁\n[GOAL]\ncase pos\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\nx₁ x₂ : α\nh :\n  (if h : p x₁ then f { val := x₁, property := h } else f' { val := x₁, property := h }) =\n    if h : p x₂ then f { val := x₂, property := h } else f' { val := x₂, property := h }\nh₁ : p x₁\n⊢ x₁ = x₂\n[PROOFSTEP]\nby_cases h₂ : p x₂\n[GOAL]\ncase neg\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\nx₁ x₂ : α\nh :\n  (if h : p x₁ then f { val := x₁, property := h } else f' { val := x₁, property := h }) =\n    if h : p x₂ then f { val := x₂, property := h } else f' { val := x₂, property := h }\nh₁ : ¬p x₁\n⊢ x₁ = x₂\n[PROOFSTEP]\nby_cases h₂ : p x₂\n[GOAL]\ncase pos\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\nx₁ x₂ : α\nh :\n  (if h : p x₁ then f { val := x₁, property := h } else f' { val := x₁, property := h }) =\n    if h : p x₂ then f { val := x₂, property := h } else f' { val := x₂, property := h }\nh₁ : p x₁\nh₂ : p x₂\n⊢ x₁ = x₂\n[PROOFSTEP]\nrw [dif_pos h₁, dif_pos h₂] at h \n[GOAL]\ncase pos\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\nx₁ x₂ : α\nh₁ : p x₁\nh₂ : p x₂\nh : f { val := x₁, property := h₁ } = f { val := x₂, property := h₂ }\n⊢ x₁ = x₂\n[PROOFSTEP]\ninjection (hf h)\n[GOAL]\ncase neg\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\nx₁ x₂ : α\nh :\n  (if h : p x₁ then f { val := x₁, property := h } else f' { val := x₁, property := h }) =\n    if h : p x₂ then f { val := x₂, property := h } else f' { val := x₂, property := h }\nh₁ : p x₁\nh₂ : ¬p x₂\n⊢ x₁ = x₂\n[PROOFSTEP]\nrw [dif_pos h₁, dif_neg h₂] at h \n[GOAL]\ncase neg\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\nx₁ x₂ : α\nh₁ : p x₁\nh₂ : ¬p x₂\nh : f { val := x₁, property := h₁ } = f' { val := x₂, property := h₂ }\n⊢ x₁ = x₂\n[PROOFSTEP]\nexact (im_disj h).elim\n[GOAL]\ncase pos\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\nx₁ x₂ : α\nh :\n  (if h : p x₁ then f { val := x₁, property := h } else f' { val := x₁, property := h }) =\n    if h : p x₂ then f { val := x₂, property := h } else f' { val := x₂, property := h }\nh₁ : ¬p x₁\nh₂ : p x₂\n⊢ x₁ = x₂\n[PROOFSTEP]\nrw [dif_neg h₁, dif_pos h₂] at h \n[GOAL]\ncase pos\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\nx₁ x₂ : α\nh₁ : ¬p x₁\nh₂ : p x₂\nh : f' { val := x₁, property := h₁ } = f { val := x₂, property := h₂ }\n⊢ x₁ = x₂\n[PROOFSTEP]\nexact (im_disj h.symm).elim\n[GOAL]\ncase neg\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\nx₁ x₂ : α\nh :\n  (if h : p x₁ then f { val := x₁, property := h } else f' { val := x₁, property := h }) =\n    if h : p x₂ then f { val := x₂, property := h } else f' { val := x₂, property := h }\nh₁ : ¬p x₁\nh₂ : ¬p x₂\n⊢ x₁ = x₂\n[PROOFSTEP]\nrw [dif_neg h₁, dif_neg h₂] at h \n[GOAL]\ncase neg\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.3653\nf✝ : α → β\np : α → Prop\ninst✝ : DecidablePred p\nf : { a // p a } → β\nf' : { a // ¬p a } → β\nhf : Injective f\nhf' : Injective f'\nim_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬p x'}, f { val := x, property := hx } ≠ f' { val := x', property := hx' }\nx₁ x₂ : α\nh₁ : ¬p x₁\nh₂ : ¬p x₂\nh : f' { val := x₁, property := h₁ } = f' { val := x₂, property := h₂ }\n⊢ x₁ = x₂\n[PROOFSTEP]\ninjection (hf' h)\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.6624\nf : α → β\nh : ∀ (g₁ g₂ : β → Prop), g₁ ∘ f = g₂ ∘ f → g₁ = g₂\n⊢ Surjective f\n[PROOFSTEP]\nspecialize h (fun y ↦ ∃ x, f x = y) (fun _ ↦ True) (funext fun x ↦ eq_true ⟨_, rfl⟩)\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.6624\nf : α → β\nh : (fun y => ∃ x, f x = y) = fun x => True\n⊢ Surjective f\n[PROOFSTEP]\nintro y\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.6624\nf : α → β\nh : (fun y => ∃ x, f x = y) = fun x => True\ny : β\n⊢ ∃ a, f a = y\n[PROOFSTEP]\nrw [congr_fun h y]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.6624\nf : α → β\nh : (fun y => ∃ x, f x = y) = fun x => True\ny : β\n⊢ True\n[PROOFSTEP]\ntrivial\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.7150\nf✝ f : α → β\nhf : Bijective f\np : β → Prop\nx✝ : ∃! y, p y\ny : β\nhpy : (fun y => p y) y\nhy : ∀ (y_1 : β), (fun y => p y) y_1 → y_1 = y\nx : α\nhx : f x = y\n⊢ (fun x => p (f x)) x\n[PROOFSTEP]\nsimpa [hx]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.7150\nf✝ f : α → β\nhf : Bijective f\np : β → Prop\nx✝ : ∃! x, p (f x)\nx : α\nhpx : (fun x => p (f x)) x\nhx : ∀ (y : α), (fun x => p (f x)) y → y = x\ny : β\nhy : (fun y => p y) y\nz : α\nhz : f z = y\n⊢ (fun x => p (f x)) z\n[PROOFSTEP]\nsimpa [hz]\n[GOAL]\nα✝ : Sort ?u.8686\nβ : Sort ?u.8689\nγ : Sort ?u.8692\nf✝ : α✝ → β\nα : Type u\nf : α → Type (max u v)\n⊢ ¬Surjective f\n[PROOFSTEP]\nintro hf\n[GOAL]\nα✝ : Sort ?u.8686\nβ : Sort ?u.8689\nγ : Sort ?u.8692\nf✝ : α✝ → β\nα : Type u\nf : α → Type (max u v)\nhf : Surjective f\n⊢ False\n[PROOFSTEP]\nlet T : Type max u v := Sigma f\n[GOAL]\nα✝ : Sort ?u.8686\nβ : Sort ?u.8689\nγ : Sort ?u.8692\nf✝ : α✝ → β\nα : Type u\nf : α → Type (max u v)\nhf : Surjective f\nT : Type (max u v) := Sigma f\n⊢ False\n[PROOFSTEP]\ncases' hf (Set T) with U hU\n[GOAL]\ncase intro\nα✝ : Sort ?u.8686\nβ : Sort ?u.8689\nγ : Sort ?u.8692\nf✝ : α✝ → β\nα : Type u\nf : α → Type (max u v)\nhf : Surjective f\nT : Type (max u v) := Sigma f\nU : α\nhU : f U = Set T\n⊢ False\n[PROOFSTEP]\nlet g : Set T → T := fun s ↦ ⟨U, cast hU.symm s⟩\n[GOAL]\ncase intro\nα✝ : Sort ?u.8686\nβ : Sort ?u.8689\nγ : Sort ?u.8692\nf✝ : α✝ → β\nα : Type u\nf : α → Type (max u v)\nhf : Surjective f\nT : Type (max u v) := Sigma f\nU : α\nhU : f U = Set T\ng : Set T → T := fun s => { fst := U, snd := cast (_ : Set T = f U) s }\n⊢ False\n[PROOFSTEP]\nhave hg : Injective g := by\n  intro s t h\n  suffices cast hU (g s).2 = cast hU (g t).2\n    by\n    simp only [cast_cast, cast_eq] at this \n    assumption\n  · congr\n[GOAL]\nα✝ : Sort ?u.8686\nβ : Sort ?u.8689\nγ : Sort ?u.8692\nf✝ : α✝ → β\nα : Type u\nf : α → Type (max u v)\nhf : Surjective f\nT : Type (max u v) := Sigma f\nU : α\nhU : f U = Set T\ng : Set T → T := fun s => { fst := U, snd := cast (_ : Set T = f U) s }\n⊢ Injective g\n[PROOFSTEP]\nintro s t h\n[GOAL]\nα✝ : Sort ?u.8686\nβ : Sort ?u.8689\nγ : Sort ?u.8692\nf✝ : α✝ → β\nα : Type u\nf : α → Type (max u v)\nhf : Surjective f\nT : Type (max u v) := Sigma f\nU : α\nhU : f U = Set T\ng : Set T → T := fun s => { fst := U, snd := cast (_ : Set T = f U) s }\ns t : Set T\nh : g s = g t\n⊢ s = t\n[PROOFSTEP]\nsuffices cast hU (g s).2 = cast hU (g t).2\n  by\n  simp only [cast_cast, cast_eq] at this \n  assumption\n[GOAL]\nα✝ : Sort ?u.8686\nβ : Sort ?u.8689\nγ : Sort ?u.8692\nf✝ : α✝ → β\nα : Type u\nf : α → Type (max u v)\nhf : Surjective f\nT : Type (max u v) := Sigma f\nU : α\nhU : f U = Set T\ng : Set T → T := fun s => { fst := U, snd := cast (_ : Set T = f U) s }\ns t : Set T\nh : g s = g t\nthis : cast hU (g s).snd = cast hU (g t).snd\n⊢ s = t\n[PROOFSTEP]\nsimp only [cast_cast, cast_eq] at this \n[GOAL]\nα✝ : Sort ?u.8686\nβ : Sort ?u.8689\nγ : Sort ?u.8692\nf✝ : α✝ → β\nα : Type u\nf : α → Type (max u v)\nhf : Surjective f\nT : Type (max u v) := Sigma f\nU : α\nhU : f U = Set T\ng : Set T → T := fun s => { fst := U, snd := cast (_ : Set T = f U) s }\ns t : Set T\nh : g s = g t\nthis : s = t\n⊢ s = t\n[PROOFSTEP]\nassumption\n[GOAL]\nα✝ : Sort ?u.8686\nβ : Sort ?u.8689\nγ : Sort ?u.8692\nf✝ : α✝ → β\nα : Type u\nf : α → Type (max u v)\nhf : Surjective f\nT : Type (max u v) := Sigma f\nU : α\nhU : f U = Set T\ng : Set T → T := fun s => { fst := U, snd := cast (_ : Set T = f U) s }\ns t : Set T\nh : g s = g t\n⊢ cast hU (g s).snd = cast hU (g t).snd\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro\nα✝ : Sort ?u.8686\nβ : Sort ?u.8689\nγ : Sort ?u.8692\nf✝ : α✝ → β\nα : Type u\nf : α → Type (max u v)\nhf : Surjective f\nT : Type (max u v) := Sigma f\nU : α\nhU : f U = Set T\ng : Set T → T := fun s => { fst := U, snd := cast (_ : Set T = f U) s }\nhg : Injective g\n⊢ False\n[PROOFSTEP]\nexact cantor_injective g hg\n[GOAL]\nα : Sort u_2\nβ : Sort u_1\nγ : Sort u_3\nf✝ f : α → β\ng : β → α\nh : β → γ\ni : γ → β\nhf : LeftInverse f g\nhh : LeftInverse h i\na : γ\n⊢ h (f (g (i a))) = a\n[PROOFSTEP]\nrw [hf (i a), hh a]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.11227\nf✝ f : α → β\ng₁ g₂ : β → α\nh₁ : LeftInverse g₁ f\nh₂ : RightInverse g₂ f\n⊢ g₁ = g₁ ∘ f ∘ g₂\n[PROOFSTEP]\nrw [h₂.comp_eq_id, comp.right_id]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort ?u.11227\nf✝ f : α → β\ng₁ g₂ : β → α\nh₁ : LeftInverse g₁ f\nh₂ : RightInverse g₂ f\n⊢ g₁ ∘ f ∘ g₂ = g₂\n[PROOFSTEP]\nrw [← comp.assoc, h₁.comp_eq_id, comp.left_id]\n[GOAL]\nα✝ : Sort ?u.11659\nβ✝ : Sort ?u.11662\nγ : Sort ?u.11665\nf✝ : α✝ → β✝\nα : Type u_1\nβ : Sort u_2\nf : α → β\nI : Injective f\na : α\nb : β\nh : partialInv f b = some a\nhpi : partialInv f b = if h : ∃ a, f a = b then some (Classical.choose h) else none\nh' : ∃ a, f a = b\n⊢ f a = b\n[PROOFSTEP]\nrw [hpi, dif_pos h'] at h \n[GOAL]\nα✝ : Sort ?u.11659\nβ✝ : Sort ?u.11662\nγ : Sort ?u.11665\nf✝ : α✝ → β✝\nα : Type u_1\nβ : Sort u_2\nf : α → β\nI : Injective f\na : α\nb : β\nhpi : partialInv f b = if h : ∃ a, f a = b then some (Classical.choose h) else none\nh' : ∃ a, f a = b\nh : some (Classical.choose h') = some a\n⊢ f a = b\n[PROOFSTEP]\ninjection h with h\n[GOAL]\nα✝ : Sort ?u.11659\nβ✝ : Sort ?u.11662\nγ : Sort ?u.11665\nf✝ : α✝ → β✝\nα : Type u_1\nβ : Sort u_2\nf : α → β\nI : Injective f\na : α\nb : β\nhpi : partialInv f b = if h : ∃ a, f a = b then some (Classical.choose h) else none\nh' : ∃ a, f a = b\nh : Classical.choose h' = a\n⊢ f a = b\n[PROOFSTEP]\nsubst h\n[GOAL]\nα✝ : Sort ?u.11659\nβ✝ : Sort ?u.11662\nγ : Sort ?u.11665\nf✝ : α✝ → β✝\nα : Type u_1\nβ : Sort u_2\nf : α → β\nI : Injective f\nb : β\nhpi : partialInv f b = if h : ∃ a, f a = b then some (Classical.choose h) else none\nh' : ∃ a, f a = b\n⊢ f (Classical.choose h') = b\n[PROOFSTEP]\napply Classical.choose_spec h'\n[GOAL]\nα✝ : Sort ?u.11659\nβ✝ : Sort ?u.11662\nγ : Sort ?u.11665\nf✝ : α✝ → β✝\nα : Type u_1\nβ : Sort u_2\nf : α → β\nI : Injective f\na : α\nb : β\nh : partialInv f b = some a\nhpi : partialInv f b = if h : ∃ a, f a = b then some (Classical.choose h) else none\nh' : ¬∃ a, f a = b\n⊢ f a = b\n[PROOFSTEP]\nrw [hpi, dif_neg h'] at h \n[GOAL]\nα✝ : Sort ?u.11659\nβ✝ : Sort ?u.11662\nγ : Sort ?u.11665\nf✝ : α✝ → β✝\nα : Type u_1\nβ : Sort u_2\nf : α → β\nI : Injective f\na : α\nb : β\nh : none = some a\nhpi : partialInv f b = if h : ∃ a, f a = b then some (Classical.choose h) else none\nh' : ¬∃ a, f a = b\n⊢ f a = b\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\ninst✝ : Nonempty α\nf : α → β\na : α\nb : β\nh : ∃ a, f a = b\n⊢ f (invFun f b) = b\n[PROOFSTEP]\nsimp only [invFun, dif_pos h, h.choose_spec]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\ninst✝ : Nonempty α\nf : α → β\na : α\nb✝ : β\ng : β → α\nhf : Injective f\nhg : RightInverse g f\nb : β\n⊢ f (invFun f b) = f (g b)\n[PROOFSTEP]\nrw [hg b]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\ninst✝ : Nonempty α\nf : α → β\na : α\nb✝ : β\ng : β → α\nhf : Injective f\nhg : RightInverse g f\nb : β\n⊢ f (invFun f b) = b\n[PROOFSTEP]\nexact invFun_eq ⟨g b, hg b⟩\n[GOAL]\nα : Sort u\nβ✝ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf✝ g : (a : α) → β✝ a\na✝ : α\nb✝ : β✝ a✝\nβ : Sort u_1\nf : α → β\na' : α\nb : β\na : α\n⊢ update f a' b a = if a = a' then b else f a\n[PROOFSTEP]\nhave h2 : (h : a = a') → Eq.rec (motive := λ _ _ => β) b h.symm = b :=\n  by\n  intro h\n  rw [eq_rec_constant]\n[GOAL]\nα : Sort u\nβ✝ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf✝ g : (a : α) → β✝ a\na✝ : α\nb✝ : β✝ a✝\nβ : Sort u_1\nf : α → β\na' : α\nb : β\na : α\n⊢ ∀ (h : a = a'), (_ : a' = a) ▸ b = b\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Sort u\nβ✝ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf✝ g : (a : α) → β✝ a\na✝ : α\nb✝ : β✝ a✝\nβ : Sort u_1\nf : α → β\na' : α\nb : β\na : α\nh : a = a'\n⊢ (_ : a' = a) ▸ b = b\n[PROOFSTEP]\nrw [eq_rec_constant]\n[GOAL]\nα : Sort u\nβ✝ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf✝ g : (a : α) → β✝ a\na✝ : α\nb✝ : β✝ a✝\nβ : Sort u_1\nf : α → β\na' : α\nb : β\na : α\nh2 : ∀ (h : a = a'), (_ : a' = a) ▸ b = b\n⊢ update f a' b a = if a = a' then b else f a\n[PROOFSTEP]\nhave h3 : (λ h : a = a' => Eq.rec (motive := λ _ _ => β) b h.symm) = (λ _ : a = a' => b) := funext h2\n[GOAL]\nα : Sort u\nβ✝ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf✝ g : (a : α) → β✝ a\na✝ : α\nb✝ : β✝ a✝\nβ : Sort u_1\nf : α → β\na' : α\nb : β\na : α\nh2 : ∀ (h : a = a'), (_ : a' = a) ▸ b = b\nh3 : (fun h => (_ : a' = a) ▸ b) = fun x => b\n⊢ update f a' b a = if a = a' then b else f a\n[PROOFSTEP]\nlet f := λ x => dite (a = a') x (λ (_ : ¬a = a') => (f a))\n[GOAL]\nα : Sort u\nβ✝ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf✝¹ g : (a : α) → β✝ a\na✝ : α\nb✝ : β✝ a✝\nβ : Sort u_1\nf✝ : α → β\na' : α\nb : β\na : α\nh2 : ∀ (h : a = a'), (_ : a' = a) ▸ b = b\nh3 : (fun h => (_ : a' = a) ▸ b) = fun x => b\nf : (a = a' → β) → β := fun x => dite (a = a') x fun x => f✝ a\n⊢ update f✝ a' b a = if a = a' then b else f✝ a\n[PROOFSTEP]\nexact congrArg f h3\n[GOAL]\nα : Sort u\nβ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf✝ g : (a : α) → β a\na : α\nb : β a\nf : (a : α) → β a\na' : α\nv v' : β a'\nh : update f a' v = update f a' v'\n⊢ v = v'\n[PROOFSTEP]\nhave := congr_fun h a'\n[GOAL]\nα : Sort u\nβ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf✝ g : (a : α) → β a\na : α\nb : β a\nf : (a : α) → β a\na' : α\nv v' : β a'\nh : update f a' v = update f a' v'\nthis : update f a' v a' = update f a' v' a'\n⊢ v = v'\n[PROOFSTEP]\nrwa [update_same, update_same] at this \n[GOAL]\nα : Sort u\nβ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf✝ g : (a : α) → β a\na✝ : α\nb✝ : β a✝\nf : (a : α) → β a\na : α\nb : β a\np : (a : α) → β a → Prop\n⊢ (∀ (x : α), p x (update f a b x)) ↔ p a b ∧ ∀ (x : α), x ≠ a → p x (f x)\n[PROOFSTEP]\nrw [← and_forall_ne a, update_same]\n[GOAL]\nα : Sort u\nβ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf✝ g : (a : α) → β a\na✝ : α\nb✝ : β a✝\nf : (a : α) → β a\na : α\nb : β a\np : (a : α) → β a → Prop\n⊢ (p a b ∧ ∀ (b_1 : α), b_1 ≠ a → p b_1 (update f a b b_1)) ↔ p a b ∧ ∀ (x : α), x ≠ a → p x (f x)\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nα : Sort u\nβ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf✝ g : (a : α) → β a\na✝ : α\nb✝ : β a✝\nf : (a : α) → β a\na : α\nb : β a\np : (a : α) → β a → Prop\n⊢ (∃ x, p x (update f a b x)) ↔ p a b ∨ ∃ x x_1, p x (f x)\n[PROOFSTEP]\nrw [← not_forall_not, forall_update_iff f fun a b ↦ ¬p a b]\n[GOAL]\nα : Sort u\nβ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf✝ g : (a : α) → β a\na✝ : α\nb✝ : β a✝\nf : (a : α) → β a\na : α\nb : β a\np : (a : α) → β a → Prop\n⊢ ¬(¬p a b ∧ ∀ (x : α), x ≠ a → ¬p x (f x)) ↔ p a b ∨ ∃ x x_1, p x (f x)\n[PROOFSTEP]\nsimp [-not_and, not_and_or]\n[GOAL]\nα : Sort u\nβ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf g : (a : α) → β a\na : α\nb : β a\n⊢ update f a b = f ↔ b = f a\n[PROOFSTEP]\nsimp [update_eq_iff]\n[GOAL]\nα : Sort u\nβ : α → Sort v\nα' : Sort w\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq α'\nf g : (a : α) → β a\na : α\nb : β a\n⊢ f = update f a b ↔ f a = b\n[PROOFSTEP]\nsimp [eq_update_iff]\n[GOAL]\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g✝ : (a : α✝) → β✝ a\na : α✝\nb : β✝ a\nι : Sort u_1\ninst✝ : DecidableEq ι\nα : ι → Sort u_2\nβ : ι → Sort u_3\nf : (i : ι) → α i → β i\ng : (i : ι) → α i\ni : ι\nv : α i\nj : ι\n⊢ f j (update g i v j) = update (fun k => f k (g k)) i (f i v) j\n[PROOFSTEP]\nby_cases h : j = i\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g✝ : (a : α✝) → β✝ a\na : α✝\nb : β✝ a\nι : Sort u_1\ninst✝ : DecidableEq ι\nα : ι → Sort u_2\nβ : ι → Sort u_3\nf : (i : ι) → α i → β i\ng : (i : ι) → α i\ni : ι\nv : α i\nj : ι\nh : j = i\n⊢ f j (update g i v j) = update (fun k => f k (g k)) i (f i v) j\n[PROOFSTEP]\nsubst j\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g✝ : (a : α✝) → β✝ a\na : α✝\nb : β✝ a\nι : Sort u_1\ninst✝ : DecidableEq ι\nα : ι → Sort u_2\nβ : ι → Sort u_3\nf : (i : ι) → α i → β i\ng : (i : ι) → α i\ni : ι\nv : α i\n⊢ f i (update g i v i) = update (fun k => f k (g k)) i (f i v) i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g✝ : (a : α✝) → β✝ a\na : α✝\nb : β✝ a\nι : Sort u_1\ninst✝ : DecidableEq ι\nα : ι → Sort u_2\nβ : ι → Sort u_3\nf : (i : ι) → α i → β i\ng : (i : ι) → α i\ni : ι\nv : α i\nj : ι\nh : ¬j = i\n⊢ f j (update g i v j) = update (fun k => f k (g k)) i (f i v) j\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g✝ : (a : α✝) → β✝ a\na : α✝\nb : β✝ a\nι : Sort u_1\ninst✝ : DecidableEq ι\nα : ι → Sort u_2\nβ : ι → Sort u_3\nγ : ι → Sort u_4\nf : (i : ι) → α i → β i → γ i\ng : (i : ι) → α i\nh : (i : ι) → β i\ni : ι\nv : α i\nw : β i\nj : ι\n⊢ f j (update g i v j) (update h i w j) = update (fun k => f k (g k) (h k)) i (f i v w) j\n[PROOFSTEP]\nby_cases h : j = i\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g✝ : (a : α✝) → β✝ a\na : α✝\nb : β✝ a\nι : Sort u_1\ninst✝ : DecidableEq ι\nα : ι → Sort u_2\nβ : ι → Sort u_3\nγ : ι → Sort u_4\nf : (i : ι) → α i → β i → γ i\ng : (i : ι) → α i\nh✝ : (i : ι) → β i\ni : ι\nv : α i\nw : β i\nj : ι\nh : j = i\n⊢ f j (update g i v j) (update h✝ i w j) = update (fun k => f k (g k) (h✝ k)) i (f i v w) j\n[PROOFSTEP]\nsubst j\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g✝ : (a : α✝) → β✝ a\na : α✝\nb : β✝ a\nι : Sort u_1\ninst✝ : DecidableEq ι\nα : ι → Sort u_2\nβ : ι → Sort u_3\nγ : ι → Sort u_4\nf : (i : ι) → α i → β i → γ i\ng : (i : ι) → α i\nh : (i : ι) → β i\ni : ι\nv : α i\nw : β i\n⊢ f i (update g i v i) (update h i w i) = update (fun k => f k (g k) (h k)) i (f i v w) i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g✝ : (a : α✝) → β✝ a\na : α✝\nb : β✝ a\nι : Sort u_1\ninst✝ : DecidableEq ι\nα : ι → Sort u_2\nβ : ι → Sort u_3\nγ : ι → Sort u_4\nf : (i : ι) → α i → β i → γ i\ng : (i : ι) → α i\nh✝ : (i : ι) → β i\ni : ι\nv : α i\nw : β i\nj : ι\nh : ¬j = i\n⊢ f j (update g i v j) (update h✝ i w j) = update (fun k => f k (g k) (h✝ k)) i (f i v w) j\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na b : α\nh : a ≠ b\nv : β a\nw : β b\nf : (a : α) → β a\n⊢ update (update f a v) b w = update (update f b w) a v\n[PROOFSTEP]\nfunext c\n[GOAL]\ncase h\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na b : α\nh : a ≠ b\nv : β a\nw : β b\nf : (a : α) → β a\nc : α\n⊢ update (update f a v) b w c = update (update f b w) a v c\n[PROOFSTEP]\nsimp only [update]\n[GOAL]\ncase h\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na b : α\nh : a ≠ b\nv : β a\nw : β b\nf : (a : α) → β a\nc : α\n⊢ (if h : c = b then (_ : b = c) ▸ w else if h : c = a then (_ : a = c) ▸ v else f c) =\n    if h : c = a then (_ : a = c) ▸ v else if h : c = b then (_ : b = c) ▸ w else f c\n[PROOFSTEP]\nby_cases h₁ : c = b\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na b : α\nh : a ≠ b\nv : β a\nw : β b\nf : (a : α) → β a\nc : α\nh₁ : c = b\n⊢ (if h : c = b then (_ : b = c) ▸ w else if h : c = a then (_ : a = c) ▸ v else f c) =\n    if h : c = a then (_ : a = c) ▸ v else if h : c = b then (_ : b = c) ▸ w else f c\n[PROOFSTEP]\nby_cases h₂ : c = a\n[GOAL]\ncase neg\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na b : α\nh : a ≠ b\nv : β a\nw : β b\nf : (a : α) → β a\nc : α\nh₁ : ¬c = b\n⊢ (if h : c = b then (_ : b = c) ▸ w else if h : c = a then (_ : a = c) ▸ v else f c) =\n    if h : c = a then (_ : a = c) ▸ v else if h : c = b then (_ : b = c) ▸ w else f c\n[PROOFSTEP]\nby_cases h₂ : c = a\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na b : α\nh : a ≠ b\nv : β a\nw : β b\nf : (a : α) → β a\nc : α\nh₁ : c = b\nh₂ : c = a\n⊢ (if h : c = b then (_ : b = c) ▸ w else if h : c = a then (_ : a = c) ▸ v else f c) =\n    if h : c = a then (_ : a = c) ▸ v else if h : c = b then (_ : b = c) ▸ w else f c\n[PROOFSTEP]\nrw [dif_pos h₁, dif_pos h₂]\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na b : α\nh : a ≠ b\nv : β a\nw : β b\nf : (a : α) → β a\nc : α\nh₁ : c = b\nh₂ : c = a\n⊢ (_ : b = c) ▸ w = (_ : a = c) ▸ v\n[PROOFSTEP]\ncases h (h₂.symm.trans h₁)\n[GOAL]\ncase neg\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na b : α\nh : a ≠ b\nv : β a\nw : β b\nf : (a : α) → β a\nc : α\nh₁ : c = b\nh₂ : ¬c = a\n⊢ (if h : c = b then (_ : b = c) ▸ w else if h : c = a then (_ : a = c) ▸ v else f c) =\n    if h : c = a then (_ : a = c) ▸ v else if h : c = b then (_ : b = c) ▸ w else f c\n[PROOFSTEP]\nrw [dif_pos h₁, dif_pos h₁, dif_neg h₂]\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na b : α\nh : a ≠ b\nv : β a\nw : β b\nf : (a : α) → β a\nc : α\nh₁ : ¬c = b\nh₂ : c = a\n⊢ (if h : c = b then (_ : b = c) ▸ w else if h : c = a then (_ : a = c) ▸ v else f c) =\n    if h : c = a then (_ : a = c) ▸ v else if h : c = b then (_ : b = c) ▸ w else f c\n[PROOFSTEP]\nrw [dif_neg h₁, dif_neg h₁, dif_pos h₂]\n[GOAL]\ncase neg\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na b : α\nh : a ≠ b\nv : β a\nw : β b\nf : (a : α) → β a\nc : α\nh₁ : ¬c = b\nh₂ : ¬c = a\n⊢ (if h : c = b then (_ : b = c) ▸ w else if h : c = a then (_ : a = c) ▸ v else f c) =\n    if h : c = a then (_ : a = c) ▸ v else if h : c = b then (_ : b = c) ▸ w else f c\n[PROOFSTEP]\nrw [dif_neg h₁, dif_neg h₁, dif_neg h₂]\n[GOAL]\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na : α\nv w : β a\nf : (a : α) → β a\n⊢ update (update f a v) a w = update f a w\n[PROOFSTEP]\nfunext b\n[GOAL]\ncase h\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na : α\nv w : β a\nf : (a : α) → β a\nb : α\n⊢ update (update f a v) a w b = update f a w b\n[PROOFSTEP]\nby_cases h : b = a\n[GOAL]\ncase pos\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na : α\nv w : β a\nf : (a : α) → β a\nb : α\nh : b = a\n⊢ update (update f a v) a w b = update f a w b\n[PROOFSTEP]\nsimp [update, h]\n[GOAL]\ncase neg\nα✝ : Sort u\nβ✝ : α✝ → Sort v\nα' : Sort w\ninst✝² : DecidableEq α✝\ninst✝¹ : DecidableEq α'\nf✝ g : (a : α✝) → β✝ a\na✝ : α✝\nb✝ : β✝ a✝\nα : Sort u_2\ninst✝ : DecidableEq α\nβ : α → Sort u_1\na : α\nv w : β a\nf : (a : α) → β a\nb : α\nh : ¬b = a\n⊢ update (update f a v) a w b = update f a w b\n[PROOFSTEP]\nsimp [update, h]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf✝ f : α → β\ng : α → γ\ne' : β → γ\nb : β\ninst✝ : Decidable (∃ a, f a = b)\n⊢ extend f g e' b = if h : ∃ a, f a = b then g (Classical.choose h) else e' b\n[PROOFSTEP]\nunfold extend\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf✝ f : α → β\ng : α → γ\ne' : β → γ\nb : β\ninst✝ : Decidable (∃ a, f a = b)\n⊢ (if h : ∃ a, f a = b then g (Classical.choose h) else e' b) =\n    if h : ∃ a, f a = b then g (Classical.choose h) else e' b\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\ng : α → γ\nhf : FactorsThrough g f\ne' : β → γ\na : α\n⊢ extend f g e' (f a) = g a\n[PROOFSTEP]\nsimp only [extend_def, dif_pos, exists_apply_eq_apply]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\ng : α → γ\nhf : FactorsThrough g f\ne' : β → γ\na : α\n⊢ g (Classical.choose (_ : ∃ a_1, f a_1 = f a)) = g a\n[PROOFSTEP]\nexact hf (Classical.choose_spec (exists_apply_eq_apply f a))\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\ng : α → γ\ne' : β → γ\nb : β\nhb : ¬∃ a, f a = b\n⊢ extend f g e' b = e' b\n[PROOFSTEP]\nsimp [Function.extend_def, hb]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\ng : α → γ\ninst✝ : Nonempty γ\nhf : FactorsThrough g f\nx : α\n⊢ g x = (extend f g (const β (Classical.arbitrary γ)) ∘ f) x\n[PROOFSTEP]\nsimp only [comp_apply, hf.extend_apply]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\ng : α → γ\ninst✝ : Nonempty γ\nh : ∃ e, g = e ∘ f\nx✝¹ x✝ : α\nhf : f x✝¹ = f x✝\n⊢ g x✝¹ = g x✝\n[PROOFSTEP]\nrw [Classical.choose_spec h, comp_apply, comp_apply, hf]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\nb : β\n⊢ F (extend f g e' b) = extend f (F ∘ g) (F ∘ e') b\n[PROOFSTEP]\nby_cases hb : ∃ a, f a = b\n[GOAL]\ncase pos\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\nb : β\nhb : ∃ a, f a = b\n⊢ F (extend f g e' b) = extend f (F ∘ g) (F ∘ e') b\ncase neg\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\nb : β\nhb : ¬∃ a, f a = b\n⊢ F (extend f g e' b) = extend f (F ∘ g) (F ∘ e') b\n[PROOFSTEP]\ncase pos =>\n  rcases hb with ⟨a, ha⟩\n  subst b\n  rw [hf.extend_apply, FactorsThrough.extend_apply, comp]\n  case intro.hf =>\n    intro a b h\n    simp only [comp_apply]\n    apply congr_arg\n    exact hf h\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\nb : β\nhb : ∃ a, f a = b\n⊢ F (extend f g e' b) = extend f (F ∘ g) (F ∘ e') b\n[PROOFSTEP]\ncase pos =>\n  rcases hb with ⟨a, ha⟩\n  subst b\n  rw [hf.extend_apply, FactorsThrough.extend_apply, comp]\n  case intro.hf =>\n    intro a b h\n    simp only [comp_apply]\n    apply congr_arg\n    exact hf h\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\nb : β\nhb : ∃ a, f a = b\n⊢ F (extend f g e' b) = extend f (F ∘ g) (F ∘ e') b\n[PROOFSTEP]\nrcases hb with ⟨a, ha⟩\n[GOAL]\ncase intro\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\nb : β\na : α\nha : f a = b\n⊢ F (extend f g e' b) = extend f (F ∘ g) (F ∘ e') b\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase intro\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\na : α\n⊢ F (extend f g e' (f a)) = extend f (F ∘ g) (F ∘ e') (f a)\n[PROOFSTEP]\nrw [hf.extend_apply, FactorsThrough.extend_apply, comp]\n[GOAL]\ncase intro.hf\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\na : α\n⊢ FactorsThrough (F ∘ g) f\n[PROOFSTEP]\ncase intro.hf =>\n  intro a b h\n  simp only [comp_apply]\n  apply congr_arg\n  exact hf h\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\na : α\n⊢ FactorsThrough (F ∘ g) f\n[PROOFSTEP]\ncase intro.hf =>\n  intro a b h\n  simp only [comp_apply]\n  apply congr_arg\n  exact hf h\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\na : α\n⊢ FactorsThrough (F ∘ g) f\n[PROOFSTEP]\nintro a b h\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\na✝ a b : α\nh : f a = f b\n⊢ (F ∘ g) a = (F ∘ g) b\n[PROOFSTEP]\nsimp only [comp_apply]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\na✝ a b : α\nh : f a = f b\n⊢ F (g a) = F (g b)\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\na✝ a b : α\nh : f a = f b\n⊢ g a = g b\n[PROOFSTEP]\nexact hf h\n[GOAL]\ncase neg\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\nb : β\nhb : ¬∃ a, f a = b\n⊢ F (extend f g e' b) = extend f (F ∘ g) (F ∘ e') b\n[PROOFSTEP]\ncase neg => rw [extend_apply' _ _ _ hb, extend_apply' _ _ _ hb, comp]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\nb : β\nhb : ¬∃ a, f a = b\n⊢ F (extend f g e' b) = extend f (F ∘ g) (F ∘ e') b\n[PROOFSTEP]\ncase neg => rw [extend_apply' _ _ _ hb, extend_apply' _ _ _ hb, comp]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nδ : Sort u_4\ng : α → γ\nhf : FactorsThrough g f\nF : γ → δ\ne' : β → γ\nb : β\nhb : ¬∃ a, f a = b\n⊢ F (extend f g e' b) = extend f (F ∘ g) (F ∘ e') b\n[PROOFSTEP]\nrw [extend_apply' _ _ _ hb, extend_apply' _ _ _ hb, comp]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nhf : Injective f\ne' : β → γ\n⊢ Injective fun g => extend f g e'\n[PROOFSTEP]\nintro g₁ g₂ hg\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nhf : Injective f\ne' : β → γ\ng₁ g₂ : α → γ\nhg : (fun g => extend f g e') g₁ = (fun g => extend f g e') g₂\n⊢ g₁ = g₂\n[PROOFSTEP]\nrefine' funext fun x ↦ _\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nhf : Injective f\ne' : β → γ\ng₁ g₂ : α → γ\nhg : (fun g => extend f g e') g₁ = (fun g => extend f g e') g₂\nx : α\n⊢ g₁ x = g₂ x\n[PROOFSTEP]\nhave H := congr_fun hg (f x)\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nhf : Injective f\ne' : β → γ\ng₁ g₂ : α → γ\nhg : (fun g => extend f g e') g₁ = (fun g => extend f g e') g₂\nx : α\nH : (fun g => extend f g e') g₁ (f x) = (fun g => extend f g e') g₂ (f x)\n⊢ g₁ x = g₂ x\n[PROOFSTEP]\nsimp only [hf.extend_apply] at H \n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nhf : Injective f\ne' : β → γ\ng₁ g₂ : α → γ\nhg : (fun g => extend f g e') g₁ = (fun g => extend f g e') g₂\nx : α\nH : g₁ x = g₂ x\n⊢ g₁ x = g₂ x\n[PROOFSTEP]\nexact H\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nf : α → β\nhf : Bijective f\ng : α → γ\n⊢ (fun g => g ∘ f) (g ∘ surjInv (_ : Surjective f)) = g\n[PROOFSTEP]\nsimp only [comp.assoc g _ f, (leftInverse_surjInv hf).comp_eq_id, comp.right_id]\n[GOAL]\nα : Sort u\nf : α → α\nh : Involutive f\nP : Prop\ninst✝ : Decidable P\nx : α\n⊢ f (if P then x else f x) = if ¬P then x else f x\n[PROOFSTEP]\nrw [apply_ite f, h, ite_not]\n[GOAL]\np : Prop\nα : Sort u_1\ninst✝ : Nonempty α\nP : α → Prop\nf : p → α\na : p\nh : P (f a)\n⊢ P (sometimes f)\n[PROOFSTEP]\nrwa [sometimes_eq]\n[GOAL]\nα β : Sort u_1\nh : α = β\n⊢ Bijective (Eq.mp h)\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nα : Sort u_1\n⊢ Bijective (Eq.mp (_ : α = α))\n[PROOFSTEP]\nrefine ⟨fun _ _ ↦ id, fun x ↦ ⟨x, rfl⟩⟩\n[GOAL]\nα β : Sort u_1\nh : α = β\n⊢ Bijective (Eq.mpr h)\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nα : Sort u_1\n⊢ Bijective (Eq.mpr (_ : α = α))\n[PROOFSTEP]\nrefine ⟨fun _ _ ↦ id, fun x ↦ ⟨x, rfl⟩⟩\n[GOAL]\nα β : Sort u_1\nh : α = β\n⊢ Bijective (cast h)\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nα : Sort u_1\n⊢ Bijective (cast (_ : α = α))\n[PROOFSTEP]\nrefine ⟨fun _ _ ↦ id, fun x ↦ ⟨x, rfl⟩⟩\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : β → Sort v\nf : α → β\ng : β → α\nh : LeftInverse g f\nC : (a : α) → γ (f a)\na : α\n⊢ HEq (C (g (f a))) (C a)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : β → Sort v\nf : α → β\ng : β → α\nh : LeftInverse g f\nC : (a : α) → γ (f a)\na : α\n⊢ cast (_ : γ (f (g (f a))) = γ (f a)) (C (g (f a))) = C a\n[PROOFSTEP]\nrw [cast_eq_iff_heq, h]\n", "meta": {"mathlib_filename": "Mathlib.Logic.Function.Basic", "llama_tokens": 22154, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802603710086, "lm_q2_score": 0.5350984286266116, "lm_q1q2_score": 0.3579167762638855}}
{"text": "[GOAL]\nι : Type u_1\nc : ComplexShape ι\n⊢ symm (symm c) = c\n[PROOFSTEP]\next\n[GOAL]\ncase Rel.h.h.a\nι : Type u_1\nc : ComplexShape ι\nx✝¹ x✝ : ι\n⊢ Rel (symm (symm c)) x✝¹ x✝ ↔ Rel c x✝¹ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nc₁ c₂ : ComplexShape ι\ni✝ j✝ j'✝ : ι\nw : Relation.Comp c₁.Rel c₂.Rel i✝ j✝\nw' : Relation.Comp c₁.Rel c₂.Rel i✝ j'✝\n⊢ j✝ = j'✝\n[PROOFSTEP]\nobtain ⟨k, w₁, w₂⟩ := w\n[GOAL]\ncase intro.intro\nι : Type u_1\nc₁ c₂ : ComplexShape ι\ni✝ j✝ j'✝ : ι\nw' : Relation.Comp c₁.Rel c₂.Rel i✝ j'✝\nk : ι\nw₁ : Rel c₁ i✝ k\nw₂ : Rel c₂ k j✝\n⊢ j✝ = j'✝\n[PROOFSTEP]\nobtain ⟨k', w₁', w₂'⟩ := w'\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nc₁ c₂ : ComplexShape ι\ni✝ j✝ j'✝ k : ι\nw₁ : Rel c₁ i✝ k\nw₂ : Rel c₂ k j✝\nk' : ι\nw₁' : Rel c₁ i✝ k'\nw₂' : Rel c₂ k' j'✝\n⊢ j✝ = j'✝\n[PROOFSTEP]\nrw [c₁.next_eq w₁ w₁'] at w₂ \n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nc₁ c₂ : ComplexShape ι\ni✝ j✝ j'✝ k : ι\nw₁ : Rel c₁ i✝ k\nk' : ι\nw₂ : Rel c₂ k' j✝\nw₁' : Rel c₁ i✝ k'\nw₂' : Rel c₂ k' j'✝\n⊢ j✝ = j'✝\n[PROOFSTEP]\nexact c₂.next_eq w₂ w₂'\n[GOAL]\nι : Type u_1\nc₁ c₂ : ComplexShape ι\ni✝ i'✝ j✝ : ι\nw : Relation.Comp c₁.Rel c₂.Rel i✝ j✝\nw' : Relation.Comp c₁.Rel c₂.Rel i'✝ j✝\n⊢ i✝ = i'✝\n[PROOFSTEP]\nobtain ⟨k, w₁, w₂⟩ := w\n[GOAL]\ncase intro.intro\nι : Type u_1\nc₁ c₂ : ComplexShape ι\ni✝ i'✝ j✝ : ι\nw' : Relation.Comp c₁.Rel c₂.Rel i'✝ j✝\nk : ι\nw₁ : Rel c₁ i✝ k\nw₂ : Rel c₂ k j✝\n⊢ i✝ = i'✝\n[PROOFSTEP]\nobtain ⟨k', w₁', w₂'⟩ := w'\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nc₁ c₂ : ComplexShape ι\ni✝ i'✝ j✝ k : ι\nw₁ : Rel c₁ i✝ k\nw₂ : Rel c₂ k j✝\nk' : ι\nw₁' : Rel c₁ i'✝ k'\nw₂' : Rel c₂ k' j✝\n⊢ i✝ = i'✝\n[PROOFSTEP]\nrw [c₂.prev_eq w₂ w₂'] at w₁ \n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nc₁ c₂ : ComplexShape ι\ni✝ i'✝ j✝ k : ι\nw₂ : Rel c₂ k j✝\nk' : ι\nw₁ : Rel c₁ i✝ k'\nw₁' : Rel c₁ i'✝ k'\nw₂' : Rel c₂ k' j✝\n⊢ i✝ = i'✝\n[PROOFSTEP]\nexact c₁.prev_eq w₁ w₁'\n[GOAL]\nι : Type u_1\nc : ComplexShape ι\ni : ι\n⊢ Subsingleton { j // Rel c i j }\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nι : Type u_1\nc : ComplexShape ι\ni : ι\n⊢ ∀ (a b : { j // Rel c i j }), a = b\n[PROOFSTEP]\nrintro ⟨j, rij⟩ ⟨k, rik⟩\n[GOAL]\ncase allEq.mk.mk\nι : Type u_1\nc : ComplexShape ι\ni j : ι\nrij : Rel c i j\nk : ι\nrik : Rel c i k\n⊢ { val := j, property := rij } = { val := k, property := rik }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase allEq.mk.mk.e_val\nι : Type u_1\nc : ComplexShape ι\ni j : ι\nrij : Rel c i j\nk : ι\nrik : Rel c i k\n⊢ j = k\n[PROOFSTEP]\nexact c.next_eq rij rik\n[GOAL]\nι : Type u_1\nc : ComplexShape ι\nj : ι\n⊢ Subsingleton { i // Rel c i j }\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nι : Type u_1\nc : ComplexShape ι\nj : ι\n⊢ ∀ (a b : { i // Rel c i j }), a = b\n[PROOFSTEP]\nrintro ⟨i, rik⟩ ⟨j, rjk⟩\n[GOAL]\ncase allEq.mk.mk\nι : Type u_1\nc : ComplexShape ι\nj✝ i : ι\nrik : Rel c i j✝\nj : ι\nrjk : Rel c j j✝\n⊢ { val := i, property := rik } = { val := j, property := rjk }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase allEq.mk.mk.e_val\nι : Type u_1\nc : ComplexShape ι\nj✝ i : ι\nrik : Rel c i j✝\nj : ι\nrjk : Rel c j j✝\n⊢ i = j\n[PROOFSTEP]\nexact c.prev_eq rik rjk\n[GOAL]\nι : Type u_1\nc : ComplexShape ι\ni j : ι\nh : Rel c i j\n⊢ next c i = j\n[PROOFSTEP]\napply c.next_eq _ h\n[GOAL]\nι : Type u_1\nc : ComplexShape ι\ni j : ι\nh : Rel c i j\n⊢ Rel c i (next c i)\n[PROOFSTEP]\nrw [next]\n[GOAL]\nι : Type u_1\nc : ComplexShape ι\ni j : ι\nh : Rel c i j\n⊢ Rel c i (if h : ∃ j, Rel c i j then Exists.choose h else i)\n[PROOFSTEP]\nrw [dif_pos]\n[GOAL]\nι : Type u_1\nc : ComplexShape ι\ni j : ι\nh : Rel c i j\n⊢ Rel c i (Exists.choose ?hc)\ncase hc ι : Type u_1 c : ComplexShape ι i j : ι h : Rel c i j ⊢ ∃ j, Rel c i j\n[PROOFSTEP]\nexact Exists.choose_spec ⟨j, h⟩\n[GOAL]\nι : Type u_1\nc : ComplexShape ι\ni j : ι\nh : Rel c i j\n⊢ prev c j = i\n[PROOFSTEP]\napply c.prev_eq _ h\n[GOAL]\nι : Type u_1\nc : ComplexShape ι\ni j : ι\nh : Rel c i j\n⊢ Rel c (prev c j) j\n[PROOFSTEP]\nrw [prev, dif_pos]\n[GOAL]\nι : Type u_1\nc : ComplexShape ι\ni j : ι\nh : Rel c i j\n⊢ Rel c (Exists.choose ?hc) j\ncase hc ι : Type u_1 c : ComplexShape ι i j : ι h : Rel c i j ⊢ ∃ i, Rel c i j\n[PROOFSTEP]\nexact Exists.choose_spec (⟨i, h⟩ : ∃ k, c.Rel k j)\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Homology.ComplexShape", "llama_tokens": 2308, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802471698041, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.3579167691999417}}
{"text": "[GOAL]\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\n⊢ OneHom.toFun (↑src✝) 0 = 0\n[PROOFSTEP]\nconvert f.lift_eq (P := Γ) _ 0\n[GOAL]\ncase h.e'_2.h.e'_1\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\n⊢ 0 = ↑(Submonoid.LocalizationMap.toMap f) 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\n⊢ 0 = ↑↑v.toMonoidWithZeroHom 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\nx y : B\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := { toFun := src✝.toFun, map_zero' := (_ : OneHom.toFun (↑src✝) 0 = 0) },\n          map_one' := (_ : OneHom.toFun (↑src✝) 1 = 1),\n          map_mul' :=\n            (_ : ∀ (x y : B), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n      (x + y) ≤\n    max\n      (ZeroHom.toFun\n        (↑{ toZeroHom := { toFun := src✝.toFun, map_zero' := (_ : OneHom.toFun (↑src✝) 0 = 0) },\n            map_one' := (_ : OneHom.toFun (↑src✝) 1 = 1),\n            map_mul' :=\n              (_ : ∀ (x y : B), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n        x)\n      (ZeroHom.toFun\n        (↑{ toZeroHom := { toFun := src✝.toFun, map_zero' := (_ : OneHom.toFun (↑src✝) 0 = 0) },\n            map_one' := (_ : OneHom.toFun (↑src✝) 1 = 1),\n            map_mul' :=\n              (_ : ∀ (x y : B), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n        y)\n[PROOFSTEP]\nobtain ⟨a, b, s, rfl, rfl⟩ : ∃ (a b : A) (s : S), f.mk' a s = x ∧ f.mk' b s = y :=\n  by\n  obtain ⟨a, s, rfl⟩ := f.mk'_surjective x\n  obtain ⟨b, t, rfl⟩ := f.mk'_surjective y\n  use a * t, b * s, s * t\n  constructor <;>\n    · rw [f.mk'_eq_iff_eq, Submonoid.coe_mul]\n      ring_nf\n[GOAL]\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\nx y : B\n⊢ ∃ a b s, Submonoid.LocalizationMap.mk' f a s = x ∧ Submonoid.LocalizationMap.mk' f b s = y\n[PROOFSTEP]\nobtain ⟨a, s, rfl⟩ := f.mk'_surjective x\n[GOAL]\ncase intro.intro\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\ny : B\na : A\ns : { x // x ∈ S }\n⊢ ∃ a_1 b s_1,\n    Submonoid.LocalizationMap.mk' f a_1 s_1 = Submonoid.LocalizationMap.mk' f a s ∧\n      Submonoid.LocalizationMap.mk' f b s_1 = y\n[PROOFSTEP]\nobtain ⟨b, t, rfl⟩ := f.mk'_surjective y\n[GOAL]\ncase intro.intro.intro.intro\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na : A\ns : { x // x ∈ S }\nb : A\nt : { x // x ∈ S }\n⊢ ∃ a_1 b_1 s_1,\n    Submonoid.LocalizationMap.mk' f a_1 s_1 = Submonoid.LocalizationMap.mk' f a s ∧\n      Submonoid.LocalizationMap.mk' f b_1 s_1 = Submonoid.LocalizationMap.mk' f b t\n[PROOFSTEP]\nuse a * t, b * s, s * t\n[GOAL]\ncase h\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na : A\ns : { x // x ∈ S }\nb : A\nt : { x // x ∈ S }\n⊢ Submonoid.LocalizationMap.mk' f (a * ↑t) (s * t) = Submonoid.LocalizationMap.mk' f a s ∧\n    Submonoid.LocalizationMap.mk' f (b * ↑s) (s * t) = Submonoid.LocalizationMap.mk' f b t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na : A\ns : { x // x ∈ S }\nb : A\nt : { x // x ∈ S }\n⊢ Submonoid.LocalizationMap.mk' f (a * ↑t) (s * t) = Submonoid.LocalizationMap.mk' f a s\n[PROOFSTEP]\nrw [f.mk'_eq_iff_eq, Submonoid.coe_mul]\n[GOAL]\ncase h.left\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na : A\ns : { x // x ∈ S }\nb : A\nt : { x // x ∈ S }\n⊢ ↑(Submonoid.LocalizationMap.toMap f) (↑s * (a * ↑t)) = ↑(Submonoid.LocalizationMap.toMap f) (↑s * ↑t * a)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase h.right\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na : A\ns : { x // x ∈ S }\nb : A\nt : { x // x ∈ S }\n⊢ Submonoid.LocalizationMap.mk' f (b * ↑s) (s * t) = Submonoid.LocalizationMap.mk' f b t\n[PROOFSTEP]\nrw [f.mk'_eq_iff_eq, Submonoid.coe_mul]\n[GOAL]\ncase h.right\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na : A\ns : { x // x ∈ S }\nb : A\nt : { x // x ∈ S }\n⊢ ↑(Submonoid.LocalizationMap.toMap f) (↑t * (b * ↑s)) = ↑(Submonoid.LocalizationMap.toMap f) (↑s * ↑t * b)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase intro.intro.intro.intro\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na b : A\ns : { x // x ∈ S }\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := { toFun := src✝.toFun, map_zero' := (_ : OneHom.toFun (↑src✝) 0 = 0) },\n          map_one' := (_ : OneHom.toFun (↑src✝) 1 = 1),\n          map_mul' :=\n            (_ : ∀ (x y : B), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n      (Submonoid.LocalizationMap.mk' f a s + Submonoid.LocalizationMap.mk' f b s) ≤\n    max\n      (ZeroHom.toFun\n        (↑{ toZeroHom := { toFun := src✝.toFun, map_zero' := (_ : OneHom.toFun (↑src✝) 0 = 0) },\n            map_one' := (_ : OneHom.toFun (↑src✝) 1 = 1),\n            map_mul' :=\n              (_ : ∀ (x y : B), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n        (Submonoid.LocalizationMap.mk' f a s))\n      (ZeroHom.toFun\n        (↑{ toZeroHom := { toFun := src✝.toFun, map_zero' := (_ : OneHom.toFun (↑src✝) 0 = 0) },\n            map_one' := (_ : OneHom.toFun (↑src✝) 1 = 1),\n            map_mul' :=\n              (_ : ∀ (x y : B), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n        (Submonoid.LocalizationMap.mk' f b s))\n[PROOFSTEP]\nconvert_to f.lift h (f.mk' (a + b) s) ≤ max (f.lift h _) (f.lift h _)\n[GOAL]\ncase h.e'_3\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na b : A\ns : { x // x ∈ S }\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := { toFun := src✝.toFun, map_zero' := (_ : OneHom.toFun (↑src✝) 0 = 0) },\n          map_one' := (_ : OneHom.toFun (↑src✝) 1 = 1),\n          map_mul' :=\n            (_ : ∀ (x y : B), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n      (Submonoid.LocalizationMap.mk' f a s + Submonoid.LocalizationMap.mk' f b s) =\n    ↑(Submonoid.LocalizationMap.lift f h) (Submonoid.LocalizationMap.mk' f (a + b) s)\n[PROOFSTEP]\nrefine' congr_arg (f.lift h) (IsLocalization.eq_mk'_iff_mul_eq.2 _)\n[GOAL]\ncase h.e'_3\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na b : A\ns : { x // x ∈ S }\n⊢ (Submonoid.LocalizationMap.mk' f a s + Submonoid.LocalizationMap.mk' f b s) * ↑(algebraMap A B) ↑s =\n    ↑(algebraMap A B) (a + b)\n[PROOFSTEP]\nrw [add_mul, _root_.map_add]\n[GOAL]\ncase h.e'_3\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na b : A\ns : { x // x ∈ S }\n⊢ Submonoid.LocalizationMap.mk' f a s * ↑(algebraMap A B) ↑s +\n      Submonoid.LocalizationMap.mk' f b s * ↑(algebraMap A B) ↑s =\n    ↑(algebraMap A B) a + ↑(algebraMap A B) b\n[PROOFSTEP]\niterate 2 erw [IsLocalization.mk'_spec]\n[GOAL]\ncase h.e'_3\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na b : A\ns : { x // x ∈ S }\n⊢ Submonoid.LocalizationMap.mk' f a s * ↑(algebraMap A B) ↑s +\n      Submonoid.LocalizationMap.mk' f b s * ↑(algebraMap A B) ↑s =\n    ↑(algebraMap A B) a + ↑(algebraMap A B) b\n[PROOFSTEP]\nerw [IsLocalization.mk'_spec]\n[GOAL]\ncase h.e'_3\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na b : A\ns : { x // x ∈ S }\n⊢ ↑(algebraMap A B) a + Submonoid.LocalizationMap.mk' f b s * ↑(algebraMap A B) ↑s =\n    ↑(algebraMap A B) a + ↑(algebraMap A B) b\n[PROOFSTEP]\nerw [IsLocalization.mk'_spec]\n[GOAL]\ncase intro.intro.intro.intro.convert_3\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na b : A\ns : { x // x ∈ S }\n⊢ ↑(Submonoid.LocalizationMap.lift f h) (Submonoid.LocalizationMap.mk' f (a + b) s) ≤\n    max (↑(Submonoid.LocalizationMap.lift f h) (Submonoid.LocalizationMap.mk' f a s))\n      (↑(Submonoid.LocalizationMap.lift f h) (Submonoid.LocalizationMap.mk' f b s))\n[PROOFSTEP]\niterate 3 rw [f.lift_mk']\n[GOAL]\ncase intro.intro.intro.intro.convert_3\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na b : A\ns : { x // x ∈ S }\n⊢ ↑(Submonoid.LocalizationMap.lift f h) (Submonoid.LocalizationMap.mk' f (a + b) s) ≤\n    max (↑(Submonoid.LocalizationMap.lift f h) (Submonoid.LocalizationMap.mk' f a s))\n      (↑(Submonoid.LocalizationMap.lift f h) (Submonoid.LocalizationMap.mk' f b s))\n[PROOFSTEP]\nrw [f.lift_mk']\n[GOAL]\ncase intro.intro.intro.intro.convert_3\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na b : A\ns : { x // x ∈ S }\n⊢ ↑↑v.toMonoidWithZeroHom (a + b) * ↑(↑(IsUnit.liftRight (MonoidHom.restrict (↑v.toMonoidWithZeroHom) S) h) s)⁻¹ ≤\n    max (↑(Submonoid.LocalizationMap.lift f h) (Submonoid.LocalizationMap.mk' f a s))\n      (↑(Submonoid.LocalizationMap.lift f h) (Submonoid.LocalizationMap.mk' f b s))\n[PROOFSTEP]\nrw [f.lift_mk']\n[GOAL]\ncase intro.intro.intro.intro.convert_3\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na b : A\ns : { x // x ∈ S }\n⊢ ↑↑v.toMonoidWithZeroHom (a + b) * ↑(↑(IsUnit.liftRight (MonoidHom.restrict (↑v.toMonoidWithZeroHom) S) h) s)⁻¹ ≤\n    max (↑↑v.toMonoidWithZeroHom a * ↑(↑(IsUnit.liftRight (MonoidHom.restrict (↑v.toMonoidWithZeroHom) S) h) s)⁻¹)\n      (↑(Submonoid.LocalizationMap.lift f h) (Submonoid.LocalizationMap.mk' f b s))\n[PROOFSTEP]\nrw [f.lift_mk']\n[GOAL]\ncase intro.intro.intro.intro.convert_3\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na b : A\ns : { x // x ∈ S }\n⊢ ↑↑v.toMonoidWithZeroHom (a + b) * ↑(↑(IsUnit.liftRight (MonoidHom.restrict (↑v.toMonoidWithZeroHom) S) h) s)⁻¹ ≤\n    max (↑↑v.toMonoidWithZeroHom a * ↑(↑(IsUnit.liftRight (MonoidHom.restrict (↑v.toMonoidWithZeroHom) S) h) s)⁻¹)\n      (↑↑v.toMonoidWithZeroHom b * ↑(↑(IsUnit.liftRight (MonoidHom.restrict (↑v.toMonoidWithZeroHom) S) h) s)⁻¹)\n[PROOFSTEP]\nrw [max_mul_mul_right]\n[GOAL]\ncase intro.intro.intro.intro.convert_3\nA : Type u_1\ninst✝⁴ : CommRing A\nΓ : Type u_2\ninst✝³ : LinearOrderedCommGroupWithZero Γ\nv : Valuation A Γ\nS : Submonoid A\nhS : S ≤ Ideal.primeCompl (supp v)\nB : Type u_3\ninst✝² : CommRing B\ninst✝¹ : Algebra A B\ninst✝ : IsLocalization S B\nf : Submonoid.LocalizationMap S B := IsLocalization.toLocalizationMap S B\nh : ∀ (s : { x // x ∈ S }), IsUnit (↑↑v.toMonoidWithZeroHom ↑s) := fun s => Iff.mpr isUnit_iff_ne_zero (hS s.property)\nsrc✝ : B →* Γ := Submonoid.LocalizationMap.lift f h\na b : A\ns : { x // x ∈ S }\n⊢ ↑↑v.toMonoidWithZeroHom (a + b) * ↑(↑(IsUnit.liftRight (MonoidHom.restrict (↑v.toMonoidWithZeroHom) S) h) s)⁻¹ ≤\n    max (↑↑v.toMonoidWithZeroHom a) (↑↑v.toMonoidWithZeroHom b) *\n      ↑(↑(IsUnit.liftRight (MonoidHom.restrict (↑v.toMonoidWithZeroHom) S) h) s)⁻¹\n[PROOFSTEP]\napply mul_le_mul_right' (v.map_add a b)\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Valuation.ExtendToLocalization", "llama_tokens": 9521, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7154239957834734, "lm_q2_score": 0.5, "lm_q1q2_score": 0.3577119978917367}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\n⊢ Memℒp (↑↑(condexpIndSMul hm hs hμs x)) 1\n[PROOFSTEP]\nrw [memℒp_one_iff_integrable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\n⊢ Integrable ↑↑(condexpIndSMul hm hs hμs x)\n[PROOFSTEP]\napply integrable_condexpIndSMul\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx y : G\n⊢ condexpIndL1Fin hm hs hμs (x + y) = condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm hs hμs y\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx y : G\n⊢ ↑↑(condexpIndL1Fin hm hs hμs (x + y)) =ᵐ[μ] ↑↑(condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm hs hμs y)\n[PROOFSTEP]\nrefine' (Memℒp.coeFn_toLp q).trans _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx y : G\n⊢ ↑↑(condexpIndSMul hm hs hμs (x + y)) =ᵐ[μ] ↑↑(condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm hs hμs y)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (Lp.coeFn_add _ _).symm\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx y : G\n⊢ ↑↑(condexpIndSMul hm hs hμs (x + y)) =ᵐ[μ] ↑↑(condexpIndL1Fin hm hs hμs x) + ↑↑(condexpIndL1Fin hm hs hμs y)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (EventuallyEq.add (Memℒp.coeFn_toLp q).symm (Memℒp.coeFn_toLp q).symm)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx y : G\n⊢ ↑↑(condexpIndSMul hm hs hμs (x + y)) =ᵐ[μ] fun x_1 =>\n    ↑↑(condexpIndSMul hm hs hμs x) x_1 + ↑↑(condexpIndSMul hm hs hμs y) x_1\n[PROOFSTEP]\nrw [condexpIndSMul_add]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx y : G\n⊢ ↑↑(condexpIndSMul hm hs hμs x + condexpIndSMul hm hs hμs y) =ᵐ[μ] fun x_1 =>\n    ↑↑(condexpIndSMul hm hs hμs x) x_1 + ↑↑(condexpIndSMul hm hs hμs y) x_1\n[PROOFSTEP]\nrefine' (Lp.coeFn_add _ _).trans (eventually_of_forall fun a => _)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx y : G\na : α\n⊢ (↑↑(condexpIndSMul hm hs hμs x) + ↑↑(condexpIndSMul hm hs hμs y)) a =\n    (fun x_1 => ↑↑(condexpIndSMul hm hs hμs x) x_1 + ↑↑(condexpIndSMul hm hs hμs y) x_1) a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : ℝ\nx : G\n⊢ condexpIndL1Fin hm hs hμs (c • x) = c • condexpIndL1Fin hm hs hμs x\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : ℝ\nx : G\n⊢ ↑↑(condexpIndL1Fin hm hs hμs (c • x)) =ᵐ[μ] ↑↑(c • condexpIndL1Fin hm hs hμs x)\n[PROOFSTEP]\nrefine' (Memℒp.coeFn_toLp q).trans _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : ℝ\nx : G\n⊢ ↑↑(condexpIndSMul hm hs hμs (c • x)) =ᵐ[μ] ↑↑(c • condexpIndL1Fin hm hs hμs x)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (Lp.coeFn_smul _ _).symm\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : ℝ\nx : G\n⊢ ↑↑(condexpIndSMul hm hs hμs (c • x)) =ᵐ[μ] c • ↑↑(condexpIndL1Fin hm hs hμs x)\n[PROOFSTEP]\nrw [condexpIndSMul_smul hs hμs c x]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : ℝ\nx : G\n⊢ ↑↑(c • condexpIndSMul hm hs hμs x) =ᵐ[μ] c • ↑↑(condexpIndL1Fin hm hs hμs x)\n[PROOFSTEP]\nrefine' (Lp.coeFn_smul _ _).trans _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : ℝ\nx : G\n⊢ c • ↑↑(condexpIndSMul hm hs hμs x) =ᵐ[μ] c • ↑↑(condexpIndL1Fin hm hs hμs x)\n[PROOFSTEP]\nrefine' (condexpIndL1Fin_ae_eq_condexpIndSMul hm hs hμs x).mono fun y hy => _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : ℝ\nx : G\ny : α\nhy : ↑↑(condexpIndL1Fin hm hs hμs x) y = ↑↑(condexpIndSMul hm hs hμs x) y\n⊢ (c • ↑↑(condexpIndSMul hm hs hμs x)) y = (c • ↑↑(condexpIndL1Fin hm hs hμs x)) y\n[PROOFSTEP]\nrw [Pi.smul_apply, Pi.smul_apply, hy]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : 𝕜\nx : F\n⊢ condexpIndL1Fin hm hs hμs (c • x) = c • condexpIndL1Fin hm hs hμs x\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : 𝕜\nx : F\n⊢ ↑↑(condexpIndL1Fin hm hs hμs (c • x)) =ᵐ[μ] ↑↑(c • condexpIndL1Fin hm hs hμs x)\n[PROOFSTEP]\nrefine' (Memℒp.coeFn_toLp q).trans _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : 𝕜\nx : F\n⊢ ↑↑(condexpIndSMul hm hs hμs (c • x)) =ᵐ[μ] ↑↑(c • condexpIndL1Fin hm hs hμs x)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (Lp.coeFn_smul _ _).symm\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : 𝕜\nx : F\n⊢ ↑↑(condexpIndSMul hm hs hμs (c • x)) =ᵐ[μ] c • ↑↑(condexpIndL1Fin hm hs hμs x)\n[PROOFSTEP]\nrw [condexpIndSMul_smul' hs hμs c x]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : 𝕜\nx : F\n⊢ ↑↑(c • condexpIndSMul hm hs hμs x) =ᵐ[μ] c • ↑↑(condexpIndL1Fin hm hs hμs x)\n[PROOFSTEP]\nrefine' (Lp.coeFn_smul _ _).trans _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : 𝕜\nx : F\n⊢ c • ↑↑(condexpIndSMul hm hs hμs x) =ᵐ[μ] c • ↑↑(condexpIndL1Fin hm hs hμs x)\n[PROOFSTEP]\nrefine' (condexpIndL1Fin_ae_eq_condexpIndSMul hm hs hμs x).mono fun y hy => _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : 𝕜\nx : F\ny : α\nhy : ↑↑(condexpIndL1Fin hm hs hμs x) y = ↑↑(condexpIndSMul hm hs hμs x) y\n⊢ (c • ↑↑(condexpIndSMul hm hs hμs x)) y = (c • ↑↑(condexpIndL1Fin hm hs hμs x)) y\n[PROOFSTEP]\nrw [Pi.smul_apply, Pi.smul_apply, hy]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\n⊢ ‖condexpIndL1Fin hm hs hμs x‖ ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\n[PROOFSTEP]\nhave : 0 ≤ ∫ a : α, ‖condexpIndL1Fin hm hs hμs x a‖ ∂μ := integral_nonneg fun a => norm_nonneg _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nthis : 0 ≤ ∫ (a : α), ‖↑↑(condexpIndL1Fin hm hs hμs x) a‖ ∂μ\n⊢ ‖condexpIndL1Fin hm hs hμs x‖ ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\n[PROOFSTEP]\nrw [L1.norm_eq_integral_norm, ← ENNReal.toReal_ofReal (norm_nonneg x), ← ENNReal.toReal_mul, ←\n  ENNReal.toReal_ofReal this,\n  ENNReal.toReal_le_toReal ENNReal.ofReal_ne_top (ENNReal.mul_ne_top hμs ENNReal.ofReal_ne_top),\n  ofReal_integral_norm_eq_lintegral_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nthis : 0 ≤ ∫ (a : α), ‖↑↑(condexpIndL1Fin hm hs hμs x) a‖ ∂μ\n⊢ ∫⁻ (x_1 : α), ↑‖↑↑(condexpIndL1Fin hm hs hμs x) x_1‖₊ ∂μ ≤ ↑↑μ s * ENNReal.ofReal ‖x‖\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nthis : 0 ≤ ∫ (a : α), ‖↑↑(condexpIndL1Fin hm hs hμs x) a‖ ∂μ\n⊢ Integrable fun a => ↑↑(condexpIndL1Fin hm hs hμs x) a\n[PROOFSTEP]\nswap\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nthis : 0 ≤ ∫ (a : α), ‖↑↑(condexpIndL1Fin hm hs hμs x) a‖ ∂μ\n⊢ Integrable fun a => ↑↑(condexpIndL1Fin hm hs hμs x) a\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nthis : 0 ≤ ∫ (a : α), ‖↑↑(condexpIndL1Fin hm hs hμs x) a‖ ∂μ\n⊢ Memℒp (fun a => ↑↑(condexpIndL1Fin hm hs hμs x) a) 1\n[PROOFSTEP]\nexact Lp.memℒp _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nthis : 0 ≤ ∫ (a : α), ‖↑↑(condexpIndL1Fin hm hs hμs x) a‖ ∂μ\n⊢ ∫⁻ (x_1 : α), ↑‖↑↑(condexpIndL1Fin hm hs hμs x) x_1‖₊ ∂μ ≤ ↑↑μ s * ENNReal.ofReal ‖x‖\n[PROOFSTEP]\nhave h_eq : ∫⁻ a, ‖condexpIndL1Fin hm hs hμs x a‖₊ ∂μ = ∫⁻ a, ‖condexpIndSMul hm hs hμs x a‖₊ ∂μ :=\n  by\n  refine' lintegral_congr_ae _\n  refine' (condexpIndL1Fin_ae_eq_condexpIndSMul hm hs hμs x).mono fun z hz => _\n  dsimp only\n  rw [hz]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nthis : 0 ≤ ∫ (a : α), ‖↑↑(condexpIndL1Fin hm hs hμs x) a‖ ∂μ\n⊢ ∫⁻ (a : α), ↑‖↑↑(condexpIndL1Fin hm hs hμs x) a‖₊ ∂μ = ∫⁻ (a : α), ↑‖↑↑(condexpIndSMul hm hs hμs x) a‖₊ ∂μ\n[PROOFSTEP]\nrefine' lintegral_congr_ae _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nthis : 0 ≤ ∫ (a : α), ‖↑↑(condexpIndL1Fin hm hs hμs x) a‖ ∂μ\n⊢ (fun a => ↑‖↑↑(condexpIndL1Fin hm hs hμs x) a‖₊) =ᵐ[μ] fun a => ↑‖↑↑(condexpIndSMul hm hs hμs x) a‖₊\n[PROOFSTEP]\nrefine' (condexpIndL1Fin_ae_eq_condexpIndSMul hm hs hμs x).mono fun z hz => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nthis : 0 ≤ ∫ (a : α), ‖↑↑(condexpIndL1Fin hm hs hμs x) a‖ ∂μ\nz : α\nhz : ↑↑(condexpIndL1Fin hm hs hμs x) z = ↑↑(condexpIndSMul hm hs hμs x) z\n⊢ (fun a => ↑‖↑↑(condexpIndL1Fin hm hs hμs x) a‖₊) z = (fun a => ↑‖↑↑(condexpIndSMul hm hs hμs x) a‖₊) z\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nthis : 0 ≤ ∫ (a : α), ‖↑↑(condexpIndL1Fin hm hs hμs x) a‖ ∂μ\nz : α\nhz : ↑↑(condexpIndL1Fin hm hs hμs x) z = ↑↑(condexpIndSMul hm hs hμs x) z\n⊢ ↑‖↑↑(condexpIndL1Fin hm hs hμs x) z‖₊ = ↑‖↑↑(condexpIndSMul hm hs hμs x) z‖₊\n[PROOFSTEP]\nrw [hz]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nthis : 0 ≤ ∫ (a : α), ‖↑↑(condexpIndL1Fin hm hs hμs x) a‖ ∂μ\nh_eq : ∫⁻ (a : α), ↑‖↑↑(condexpIndL1Fin hm hs hμs x) a‖₊ ∂μ = ∫⁻ (a : α), ↑‖↑↑(condexpIndSMul hm hs hμs x) a‖₊ ∂μ\n⊢ ∫⁻ (x_1 : α), ↑‖↑↑(condexpIndL1Fin hm hs hμs x) x_1‖₊ ∂μ ≤ ↑↑μ s * ENNReal.ofReal ‖x‖\n[PROOFSTEP]\nrw [h_eq, ofReal_norm_eq_coe_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nthis : 0 ≤ ∫ (a : α), ‖↑↑(condexpIndL1Fin hm hs hμs x) a‖ ∂μ\nh_eq : ∫⁻ (a : α), ↑‖↑↑(condexpIndL1Fin hm hs hμs x) a‖₊ ∂μ = ∫⁻ (a : α), ↑‖↑↑(condexpIndSMul hm hs hμs x) a‖₊ ∂μ\n⊢ ∫⁻ (a : α), ↑‖↑↑(condexpIndSMul hm hs hμs x) a‖₊ ∂μ ≤ ↑↑μ s * ↑‖x‖₊\n[PROOFSTEP]\nexact lintegral_nnnorm_condexpIndSMul_le hm hs hμs x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\n⊢ condexpIndL1Fin hm (_ : MeasurableSet (s ∪ t)) (_ : ↑↑μ (s ∪ t) ≠ ⊤) x =\n    condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm ht hμt x\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\n⊢ ↑↑(condexpIndL1Fin hm (_ : MeasurableSet (s ∪ t)) (_ : ↑↑μ (s ∪ t) ≠ ⊤) x) =ᵐ[μ]\n    ↑↑(condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm ht hμt x)\n[PROOFSTEP]\nhave hμst := ((measure_union_le s t).trans_lt (lt_top_iff_ne_top.mpr (ENNReal.add_ne_top.mpr ⟨hμs, hμt⟩))).ne\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\n⊢ ↑↑(condexpIndL1Fin hm (_ : MeasurableSet (s ∪ t)) (_ : ↑↑μ (s ∪ t) ≠ ⊤) x) =ᵐ[μ]\n    ↑↑(condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm ht hμt x)\n[PROOFSTEP]\nrefine' (condexpIndL1Fin_ae_eq_condexpIndSMul hm (hs.union ht) hμst x).trans _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\n⊢ ↑↑(condexpIndSMul hm (_ : MeasurableSet (s ∪ t)) hμst x) =ᵐ[μ]\n    ↑↑(condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm ht hμt x)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (Lp.coeFn_add _ _).symm\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\n⊢ ↑↑(condexpIndSMul hm (_ : MeasurableSet (s ∪ t)) hμst x) =ᵐ[μ]\n    ↑↑(condexpIndL1Fin hm hs hμs x) + ↑↑(condexpIndL1Fin hm ht hμt x)\n[PROOFSTEP]\nhave hs_eq := condexpIndL1Fin_ae_eq_condexpIndSMul hm hs hμs x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\nhs_eq : ↑↑(condexpIndL1Fin hm hs hμs x) =ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\n⊢ ↑↑(condexpIndSMul hm (_ : MeasurableSet (s ∪ t)) hμst x) =ᵐ[μ]\n    ↑↑(condexpIndL1Fin hm hs hμs x) + ↑↑(condexpIndL1Fin hm ht hμt x)\n[PROOFSTEP]\nhave ht_eq := condexpIndL1Fin_ae_eq_condexpIndSMul hm ht hμt x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\nhs_eq : ↑↑(condexpIndL1Fin hm hs hμs x) =ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\nht_eq : ↑↑(condexpIndL1Fin hm ht hμt x) =ᵐ[μ] ↑↑(condexpIndSMul hm ht hμt x)\n⊢ ↑↑(condexpIndSMul hm (_ : MeasurableSet (s ∪ t)) hμst x) =ᵐ[μ]\n    ↑↑(condexpIndL1Fin hm hs hμs x) + ↑↑(condexpIndL1Fin hm ht hμt x)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (EventuallyEq.add hs_eq.symm ht_eq.symm)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\nhs_eq : ↑↑(condexpIndL1Fin hm hs hμs x) =ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\nht_eq : ↑↑(condexpIndL1Fin hm ht hμt x) =ᵐ[μ] ↑↑(condexpIndSMul hm ht hμt x)\n⊢ ↑↑(condexpIndSMul hm (_ : MeasurableSet (s ∪ t)) hμst x) =ᵐ[μ] fun x_1 =>\n    ↑↑(condexpIndSMul hm hs hμs x) x_1 + ↑↑(condexpIndSMul hm ht hμt x) x_1\n[PROOFSTEP]\nrw [condexpIndSMul]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\nhs_eq : ↑↑(condexpIndL1Fin hm hs hμs x) =ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\nht_eq : ↑↑(condexpIndL1Fin hm ht hμt x) =ᵐ[μ] ↑↑(condexpIndSMul hm ht hμt x)\n⊢ ↑↑(↑(compLpL 2 μ (toSpanSingleton ℝ x))\n          ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 (_ : MeasurableSet (s ∪ t)) hμst 1))) =ᵐ[μ]\n    fun x_1 => ↑↑(condexpIndSMul hm hs hμs x) x_1 + ↑↑(condexpIndSMul hm ht hμt x) x_1\n[PROOFSTEP]\nrw [indicatorConstLp_disjoint_union hs ht hμs hμt hst (1 : ℝ)]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\nhs_eq : ↑↑(condexpIndL1Fin hm hs hμs x) =ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\nht_eq : ↑↑(condexpIndL1Fin hm ht hμt x) =ᵐ[μ] ↑↑(condexpIndSMul hm ht hμt x)\n⊢ ↑↑(↑(compLpL 2 μ (toSpanSingleton ℝ x))\n          ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1 + indicatorConstLp 2 ht hμt 1))) =ᵐ[μ]\n    fun x_1 => ↑↑(condexpIndSMul hm hs hμs x) x_1 + ↑↑(condexpIndSMul hm ht hμt x) x_1\n[PROOFSTEP]\nrw [(condexpL2 ℝ ℝ hm).map_add]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\nhs_eq : ↑↑(condexpIndL1Fin hm hs hμs x) =ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\nht_eq : ↑↑(condexpIndL1Fin hm ht hμt x) =ᵐ[μ] ↑↑(condexpIndSMul hm ht hμt x)\n⊢ ↑↑(↑(compLpL 2 μ (toSpanSingleton ℝ x))\n          ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1) +\n              ↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 ht hμt 1))) =ᵐ[μ]\n    fun x_1 => ↑↑(condexpIndSMul hm hs hμs x) x_1 + ↑↑(condexpIndSMul hm ht hμt x) x_1\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\nhs_eq : ↑↑(condexpIndL1Fin hm hs hμs x) =ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\nht_eq : ↑↑(condexpIndL1Fin hm ht hμt x) =ᵐ[μ] ↑↑(condexpIndSMul hm ht hμt x)\n⊢ ↑↑(↑(compLpL 2 μ (toSpanSingleton ℝ x))\n          (↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) +\n            ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 ht hμt 1)))) =ᵐ[μ]\n    fun x_1 => ↑↑(condexpIndSMul hm hs hμs x) x_1 + ↑↑(condexpIndSMul hm ht hμt x) x_1\n[PROOFSTEP]\nrw [((toSpanSingleton ℝ x).compLpL 2 μ).map_add]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\nhs_eq : ↑↑(condexpIndL1Fin hm hs hμs x) =ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\nht_eq : ↑↑(condexpIndL1Fin hm ht hμt x) =ᵐ[μ] ↑↑(condexpIndSMul hm ht hμt x)\n⊢ ↑↑(↑(compLpL 2 μ (toSpanSingleton ℝ x)) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) +\n          ↑(compLpL 2 μ (toSpanSingleton ℝ x)) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 ht hμt 1))) =ᵐ[μ]\n    fun x_1 => ↑↑(condexpIndSMul hm hs hμs x) x_1 + ↑↑(condexpIndSMul hm ht hμt x) x_1\n[PROOFSTEP]\nrefine' (Lp.coeFn_add _ _).trans _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\nhs_eq : ↑↑(condexpIndL1Fin hm hs hμs x) =ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\nht_eq : ↑↑(condexpIndL1Fin hm ht hμt x) =ᵐ[μ] ↑↑(condexpIndSMul hm ht hμt x)\n⊢ ↑↑(↑(compLpL 2 μ (toSpanSingleton ℝ x)) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) +\n      ↑↑(↑(compLpL 2 μ (toSpanSingleton ℝ x)) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 ht hμt 1))) =ᵐ[μ]\n    fun x_1 => ↑↑(condexpIndSMul hm hs hμs x) x_1 + ↑↑(condexpIndSMul hm ht hμt x) x_1\n[PROOFSTEP]\nrefine' eventually_of_forall fun y => _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\nhs_eq : ↑↑(condexpIndL1Fin hm hs hμs x) =ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\nht_eq : ↑↑(condexpIndL1Fin hm ht hμt x) =ᵐ[μ] ↑↑(condexpIndSMul hm ht hμt x)\ny : α\n⊢ (↑↑(↑(compLpL 2 μ (toSpanSingleton ℝ x)) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) +\n        ↑↑(↑(compLpL 2 μ (toSpanSingleton ℝ x)) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 ht hμt 1))))\n      y =\n    (fun x_1 => ↑↑(condexpIndSMul hm hs hμs x) x_1 + ↑↑(condexpIndSMul hm ht hμt x) x_1) y\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\n⊢ condexpIndL1 hm μ s x = condexpIndL1Fin hm hs hμs x\n[PROOFSTEP]\nsimp only [condexpIndL1, And.intro hs hμs, dif_pos, Ne.def, not_false_iff, and_self_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhμs : ↑↑μ s = ⊤\nx : G\n⊢ condexpIndL1 hm μ s x = 0\n[PROOFSTEP]\nsimp only [condexpIndL1, hμs, eq_self_iff_true, not_true, Ne.def, dif_neg, not_false_iff, and_false_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : ¬MeasurableSet s\nx : G\n⊢ condexpIndL1 hm μ s x = 0\n[PROOFSTEP]\nsimp only [condexpIndL1, hs, dif_neg, not_false_iff, false_and_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx y : G\n⊢ condexpIndL1 hm μ s (x + y) = condexpIndL1 hm μ s x + condexpIndL1 hm μ s y\n[PROOFSTEP]\nby_cases hs : MeasurableSet s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx y : G\nhs : MeasurableSet s\n⊢ condexpIndL1 hm μ s (x + y) = condexpIndL1 hm μ s x + condexpIndL1 hm μ s y\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx y : G\nhs : ¬MeasurableSet s\n⊢ condexpIndL1 hm μ s (x + y) = condexpIndL1 hm μ s x + condexpIndL1 hm μ s y\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx y : G\nhs : ¬MeasurableSet s\n⊢ condexpIndL1 hm μ s (x + y) = condexpIndL1 hm μ s x + condexpIndL1 hm μ s y\n[PROOFSTEP]\nsimp_rw [condexpIndL1_of_not_measurableSet hs]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx y : G\nhs : ¬MeasurableSet s\n⊢ 0 = 0 + 0\n[PROOFSTEP]\nrw [zero_add]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx y : G\nhs : MeasurableSet s\n⊢ condexpIndL1 hm μ s (x + y) = condexpIndL1 hm μ s x + condexpIndL1 hm μ s y\n[PROOFSTEP]\nby_cases hμs : μ s = ∞\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx y : G\nhs : MeasurableSet s\nhμs : ↑↑μ s = ⊤\n⊢ condexpIndL1 hm μ s (x + y) = condexpIndL1 hm μ s x + condexpIndL1 hm μ s y\n[PROOFSTEP]\nsimp_rw [condexpIndL1_of_measure_eq_top hμs]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx y : G\nhs : MeasurableSet s\nhμs : ↑↑μ s = ⊤\n⊢ 0 = 0 + 0\n[PROOFSTEP]\nrw [zero_add]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx y : G\nhs : MeasurableSet s\nhμs : ¬↑↑μ s = ⊤\n⊢ condexpIndL1 hm μ s (x + y) = condexpIndL1 hm μ s x + condexpIndL1 hm μ s y\n[PROOFSTEP]\nsimp_rw [condexpIndL1_of_measurableSet_of_measure_ne_top hs hμs]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx y : G\nhs : MeasurableSet s\nhμs : ¬↑↑μ s = ⊤\n⊢ condexpIndL1Fin hm hs hμs (x + y) = condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm hs hμs y\n[PROOFSTEP]\nexact condexpIndL1Fin_add hs hμs x y\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nc : ℝ\nx : G\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\n[PROOFSTEP]\nby_cases hs : MeasurableSet s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nc : ℝ\nx : G\nhs : MeasurableSet s\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nc : ℝ\nx : G\nhs : ¬MeasurableSet s\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nc : ℝ\nx : G\nhs : ¬MeasurableSet s\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\n[PROOFSTEP]\nsimp_rw [condexpIndL1_of_not_measurableSet hs]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nc : ℝ\nx : G\nhs : ¬MeasurableSet s\n⊢ 0 = c • 0\n[PROOFSTEP]\nrw [smul_zero]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nc : ℝ\nx : G\nhs : MeasurableSet s\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\n[PROOFSTEP]\nby_cases hμs : μ s = ∞\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nc : ℝ\nx : G\nhs : MeasurableSet s\nhμs : ↑↑μ s = ⊤\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\n[PROOFSTEP]\nsimp_rw [condexpIndL1_of_measure_eq_top hμs]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nc : ℝ\nx : G\nhs : MeasurableSet s\nhμs : ↑↑μ s = ⊤\n⊢ 0 = c • 0\n[PROOFSTEP]\nrw [smul_zero]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nc : ℝ\nx : G\nhs : MeasurableSet s\nhμs : ¬↑↑μ s = ⊤\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\n[PROOFSTEP]\nsimp_rw [condexpIndL1_of_measurableSet_of_measure_ne_top hs hμs]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nc : ℝ\nx : G\nhs : MeasurableSet s\nhμs : ¬↑↑μ s = ⊤\n⊢ condexpIndL1Fin hm hs hμs (c • x) = c • condexpIndL1Fin hm hs hμs x\n[PROOFSTEP]\nexact condexpIndL1Fin_smul hs hμs c x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nc : 𝕜\nx : F\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\n[PROOFSTEP]\nby_cases hs : MeasurableSet s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nc : 𝕜\nx : F\nhs : MeasurableSet s\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nc : 𝕜\nx : F\nhs : ¬MeasurableSet s\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nc : 𝕜\nx : F\nhs : ¬MeasurableSet s\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\n[PROOFSTEP]\nsimp_rw [condexpIndL1_of_not_measurableSet hs]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nc : 𝕜\nx : F\nhs : ¬MeasurableSet s\n⊢ 0 = c • 0\n[PROOFSTEP]\nrw [smul_zero]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nc : 𝕜\nx : F\nhs : MeasurableSet s\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\n[PROOFSTEP]\nby_cases hμs : μ s = ∞\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nc : 𝕜\nx : F\nhs : MeasurableSet s\nhμs : ↑↑μ s = ⊤\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\n[PROOFSTEP]\nsimp_rw [condexpIndL1_of_measure_eq_top hμs]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nc : 𝕜\nx : F\nhs : MeasurableSet s\nhμs : ↑↑μ s = ⊤\n⊢ 0 = c • 0\n[PROOFSTEP]\nrw [smul_zero]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nc : 𝕜\nx : F\nhs : MeasurableSet s\nhμs : ¬↑↑μ s = ⊤\n⊢ condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x\n[PROOFSTEP]\nsimp_rw [condexpIndL1_of_measurableSet_of_measure_ne_top hs hμs]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup F'\ninst✝¹⁰ : NormedSpace 𝕜 F'\ninst✝⁹ : NormedSpace ℝ F'\ninst✝⁸ : CompleteSpace F'\ninst✝⁷ : NormedAddCommGroup G\ninst✝⁶ : NormedAddCommGroup G'\ninst✝⁵ : NormedSpace ℝ G'\ninst✝⁴ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝³ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝² : SigmaFinite (Measure.trim μ hm)\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nc : 𝕜\nx : F\nhs : MeasurableSet s\nhμs : ¬↑↑μ s = ⊤\n⊢ condexpIndL1Fin hm hs hμs (c • x) = c • condexpIndL1Fin hm hs hμs x\n[PROOFSTEP]\nexact condexpIndL1Fin_smul' hs hμs c x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\n⊢ ‖condexpIndL1 hm μ s x‖ ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\n[PROOFSTEP]\nby_cases hs : MeasurableSet s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\nhs : MeasurableSet s\n⊢ ‖condexpIndL1 hm μ s x‖ ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\nhs : ¬MeasurableSet s\n⊢ ‖condexpIndL1 hm μ s x‖ ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\nhs : ¬MeasurableSet s\n⊢ ‖condexpIndL1 hm μ s x‖ ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\n[PROOFSTEP]\nsimp_rw [condexpIndL1_of_not_measurableSet hs]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\nhs : ¬MeasurableSet s\n⊢ ‖0‖ ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\n[PROOFSTEP]\nrw [Lp.norm_zero]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\nhs : ¬MeasurableSet s\n⊢ 0 ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\n[PROOFSTEP]\nexact mul_nonneg ENNReal.toReal_nonneg (norm_nonneg _)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\nhs : MeasurableSet s\n⊢ ‖condexpIndL1 hm μ s x‖ ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\n[PROOFSTEP]\nby_cases hμs : μ s = ∞\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\nhs : MeasurableSet s\nhμs : ↑↑μ s = ⊤\n⊢ ‖condexpIndL1 hm μ s x‖ ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\n[PROOFSTEP]\nrw [condexpIndL1_of_measure_eq_top hμs x, Lp.norm_zero]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\nhs : MeasurableSet s\nhμs : ↑↑μ s = ⊤\n⊢ 0 ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\n[PROOFSTEP]\nexact mul_nonneg ENNReal.toReal_nonneg (norm_nonneg _)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\nhs : MeasurableSet s\nhμs : ¬↑↑μ s = ⊤\n⊢ ‖condexpIndL1 hm μ s x‖ ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\n[PROOFSTEP]\nrw [condexpIndL1_of_measurableSet_of_measure_ne_top hs hμs x]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\nhs : MeasurableSet s\nhμs : ¬↑↑μ s = ⊤\n⊢ ‖condexpIndL1Fin hm hs hμs x‖ ≤ ENNReal.toReal (↑↑μ s) * ‖x‖\n[PROOFSTEP]\nexact norm_condexpIndL1Fin_le hs hμs x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\n⊢ condexpIndL1 hm μ (s ∪ t) x = condexpIndL1 hm μ s x + condexpIndL1 hm μ t x\n[PROOFSTEP]\nhave hμst : μ (s ∪ t) ≠ ∞ :=\n  ((measure_union_le s t).trans_lt (lt_top_iff_ne_top.mpr (ENNReal.add_ne_top.mpr ⟨hμs, hμt⟩))).ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\n⊢ condexpIndL1 hm μ (s ∪ t) x = condexpIndL1 hm μ s x + condexpIndL1 hm μ t x\n[PROOFSTEP]\nrw [condexpIndL1_of_measurableSet_of_measure_ne_top hs hμs x, condexpIndL1_of_measurableSet_of_measure_ne_top ht hμt x,\n  condexpIndL1_of_measurableSet_of_measure_ne_top (hs.union ht) hμst x]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\nhμst : ↑↑μ (s ∪ t) ≠ ⊤\n⊢ condexpIndL1Fin hm (_ : MeasurableSet (s ∪ t)) hμst x = condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm ht hμt x\n[PROOFSTEP]\nexact condexpIndL1Fin_disjoint_union hs ht hμs hμt hst x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\n⊢ ↑↑(↑(condexpInd G hm μ s) x) =ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (condexpIndL1Fin_ae_eq_condexpIndSMul hm hs hμs x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\n⊢ ↑↑(↑(condexpInd G hm μ s) x) =ᵐ[μ] ↑↑(condexpIndL1Fin hm hs hμs x)\n[PROOFSTEP]\nsimp [condexpInd, condexpIndL1, hs, hμs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\n⊢ ↑↑(condexpIndL1Fin hm (_ : MeasurableSet s) (_ : ↑↑μ s ≠ ⊤) x) =ᵐ[μ] ↑↑(condexpIndL1Fin hm hs hμs x)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\n⊢ condexpInd G hm μ ∅ = 0\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\n⊢ ↑(condexpInd G hm μ ∅) x = ↑0 x\n[PROOFSTEP]\next1\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\n⊢ ↑↑(↑(condexpInd G hm μ ∅) x) =ᵐ[μ] ↑↑(↑0 x)\n[PROOFSTEP]\nrefine' (condexpInd_ae_eq_condexpIndSMul hm MeasurableSet.empty (by simp) x).trans _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\n⊢ ↑↑μ ∅ ≠ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\n⊢ ↑↑(condexpIndSMul hm (_ : MeasurableSet ∅) (_ : ↑↑μ ∅ ≠ ⊤) x) =ᵐ[μ] ↑↑(↑0 x)\n[PROOFSTEP]\nrw [condexpIndSMul_empty]\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\n⊢ ↑↑0 =ᵐ[μ] ↑↑(↑0 x)\n[PROOFSTEP]\nrefine' (Lp.coeFn_zero G 2 μ).trans _\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\n⊢ 0 =ᵐ[μ] ↑↑(↑0 x)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (Lp.coeFn_zero G 1 μ).symm\n[GOAL]\ncase h.h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nx : G\n⊢ 0 =ᵐ[μ] 0\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\n⊢ condexpInd G hm μ (s ∪ t) = condexpInd G hm μ s + condexpInd G hm μ t\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\n⊢ ↑(condexpInd G hm μ (s ∪ t)) x = ↑(condexpInd G hm μ s + condexpInd G hm μ t) x\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nhst : s ∩ t = ∅\nx : G\n⊢ ↑(condexpInd G hm μ (s ∪ t)) x = (↑(condexpInd G hm μ s) + ↑(condexpInd G hm μ t)) x\n[PROOFSTEP]\nexact condexpInd_disjoint_union_apply hs ht hμs hμt hst x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : G\n⊢ ↑(condexpInd G hm μ s) c = indicatorConstLp 1 (_ : MeasurableSet s) hμs c\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : G\n⊢ ↑↑(↑(condexpInd G hm μ s) c) =ᵐ[μ] ↑↑(indicatorConstLp 1 (_ : MeasurableSet s) hμs c)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ indicatorConstLp_coeFn.symm\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : G\n⊢ ↑↑(↑(condexpInd G hm μ s) c) =ᵐ[μ] Set.indicator s fun x => c\n[PROOFSTEP]\nrefine' (condexpInd_ae_eq_condexpIndSMul hm (hm s hs) hμs c).trans _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : G\n⊢ ↑↑(condexpIndSMul hm (_ : MeasurableSet s) hμs c) =ᵐ[μ] Set.indicator s fun x => c\n[PROOFSTEP]\nrefine' (condexpIndSMul_ae_eq_smul hm (hm s hs) hμs c).trans _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : G\n⊢ (fun a => ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 (_ : MeasurableSet s) hμs 1)) a • c) =ᵐ[μ]\n    Set.indicator s fun x => c\n[PROOFSTEP]\nrw [lpMeas_coe, condexpL2_indicator_of_measurable hm hs hμs (1 : ℝ)]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : G\n⊢ (fun a => ↑↑(indicatorConstLp 2 (_ : MeasurableSet s) hμs 1) a • c) =ᵐ[μ] Set.indicator s fun x => c\n[PROOFSTEP]\nrefine' (@indicatorConstLp_coeFn α _ _ 2 μ _ s (hm s hs) hμs (1 : ℝ)).mono fun x hx => _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : G\nx : α\nhx : ↑↑(indicatorConstLp 2 (_ : MeasurableSet s) hμs 1) x = Set.indicator s (fun x => 1) x\n⊢ (fun a => ↑↑(indicatorConstLp 2 (_ : MeasurableSet s) hμs 1) a • c) x = Set.indicator s (fun x => c) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : G\nx : α\nhx : ↑↑(indicatorConstLp 2 (_ : MeasurableSet s) hμs 1) x = Set.indicator s (fun x => 1) x\n⊢ ↑↑(indicatorConstLp 2 (_ : MeasurableSet s) hμs 1) x • c = Set.indicator s (fun x => c) x\n[PROOFSTEP]\nrw [hx]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : G\nx : α\nhx : ↑↑(indicatorConstLp 2 (_ : MeasurableSet s) hμs 1) x = Set.indicator s (fun x => 1) x\n⊢ Set.indicator s (fun x => 1) x • c = Set.indicator s (fun x => c) x\n[PROOFSTEP]\nby_cases hx_mem : x ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : G\nx : α\nhx : ↑↑(indicatorConstLp 2 (_ : MeasurableSet s) hμs 1) x = Set.indicator s (fun x => 1) x\nhx_mem : x ∈ s\n⊢ Set.indicator s (fun x => 1) x • c = Set.indicator s (fun x => c) x\n[PROOFSTEP]\nsimp [hx_mem]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜 F'\ninst✝⁷ : NormedSpace ℝ F'\ninst✝⁶ : CompleteSpace F'\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace ℝ G'\ninst✝² : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝¹ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : G\nx : α\nhx : ↑↑(indicatorConstLp 2 (_ : MeasurableSet s) hμs 1) x = Set.indicator s (fun x => 1) x\nhx_mem : ¬x ∈ s\n⊢ Set.indicator s (fun x => 1) x • c = Set.indicator s (fun x => c) x\n[PROOFSTEP]\nsimp [hx_mem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁵ : IsROrC 𝕜\ninst✝¹⁴ : NormedAddCommGroup F\ninst✝¹³ : NormedSpace 𝕜 F\ninst✝¹² : NormedAddCommGroup F'\ninst✝¹¹ : NormedSpace 𝕜 F'\ninst✝¹⁰ : NormedSpace ℝ F'\ninst✝⁹ : CompleteSpace F'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝⁴ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝³ : SigmaFinite (Measure.trim μ hm)\nE : Type u_8\ninst✝² : NormedLatticeAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : OrderedSMul ℝ E\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E\nhx : 0 ≤ x\n⊢ 0 ≤ ↑(condexpInd E hm μ s) x\n[PROOFSTEP]\nrw [← coeFn_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁵ : IsROrC 𝕜\ninst✝¹⁴ : NormedAddCommGroup F\ninst✝¹³ : NormedSpace 𝕜 F\ninst✝¹² : NormedAddCommGroup F'\ninst✝¹¹ : NormedSpace 𝕜 F'\ninst✝¹⁰ : NormedSpace ℝ F'\ninst✝⁹ : CompleteSpace F'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝⁴ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝³ : SigmaFinite (Measure.trim μ hm)\nE : Type u_8\ninst✝² : NormedLatticeAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : OrderedSMul ℝ E\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E\nhx : 0 ≤ x\n⊢ ↑↑0 ≤ᵐ[μ] ↑↑(↑(condexpInd E hm μ s) x)\n[PROOFSTEP]\nrefine' EventuallyLE.trans_eq _ (condexpInd_ae_eq_condexpIndSMul hm hs hμs x).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁵ : IsROrC 𝕜\ninst✝¹⁴ : NormedAddCommGroup F\ninst✝¹³ : NormedSpace 𝕜 F\ninst✝¹² : NormedAddCommGroup F'\ninst✝¹¹ : NormedSpace 𝕜 F'\ninst✝¹⁰ : NormedSpace ℝ F'\ninst✝⁹ : CompleteSpace F'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝⁴ : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝³ : SigmaFinite (Measure.trim μ hm)\nE : Type u_8\ninst✝² : NormedLatticeAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : OrderedSMul ℝ E\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E\nhx : 0 ≤ x\n⊢ ↑↑0 ≤ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\n[PROOFSTEP]\nexact (coeFn_zero E 1 μ).trans_le (condexpIndSMul_nonneg hs hμs x hx)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nc : 𝕜\nf : { x // x ∈ Lp F' 1 }\n⊢ ↑(condexpL1Clm F' hm μ) (c • f) = c • ↑(condexpL1Clm F' hm μ) f\n[PROOFSTEP]\nrefine' L1.setToL1_smul (dominatedFinMeasAdditive_condexpInd F' hm μ) _ c f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nc : 𝕜\nf : { x // x ∈ Lp F' 1 }\n⊢ ∀ (c : 𝕜) (s : Set α) (x : F'), ↑(condexpInd F' hm μ s) (c • x) = c • ↑(condexpInd F' hm μ s) x\n[PROOFSTEP]\nexact fun c s x => condexpInd_smul' c x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F'\n⊢ ↑(condexpL1Clm F' hm μ) ↑(simpleFunc.indicatorConst 1 hs hμs x) = ↑(condexpInd F' hm μ s) x\n[PROOFSTEP]\nrw [Lp.simpleFunc.coe_indicatorConst]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F'\n⊢ ↑(condexpL1Clm F' hm μ) (indicatorConstLp 1 hs hμs x) = ↑(condexpInd F' hm μ s) x\n[PROOFSTEP]\nexact condexpL1Clm_indicatorConstLp hs hμs x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nrefine'\n  @Lp.induction _ _ _ _ _ _ _ ENNReal.one_ne_top\n    (fun f : α →₁[μ] F' => ∫ x in s, condexpL1Clm F' hm μ f x ∂μ = ∫ x in s, f x ∂μ) _ _ (isClosed_eq _ _) f\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∀ (c : F') {s_1 : Set α} (hs : MeasurableSet s_1) (hμs : ↑↑μ s_1 < ⊤),\n    (fun f => ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ)\n      ↑(simpleFunc.indicatorConst 1 hs (_ : ↑↑μ s_1 ≠ ⊤) c)\n[PROOFSTEP]\nintro x t ht hμt\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F'\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t < ⊤\n⊢ ∫ (x_1 : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) ↑(simpleFunc.indicatorConst 1 ht (_ : ↑↑μ t ≠ ⊤) x)) x_1 ∂μ =\n    ∫ (x_1 : α) in s, ↑↑↑(simpleFunc.indicatorConst 1 ht (_ : ↑↑μ t ≠ ⊤) x) x_1 ∂μ\n[PROOFSTEP]\nsimp_rw [condexpL1Clm_indicatorConst ht hμt.ne x]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F'\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t < ⊤\n⊢ ∫ (x_1 : α) in s, ↑↑(↑(condexpInd F' hm μ t) x) x_1 ∂μ =\n    ∫ (x_1 : α) in s, ↑↑↑(simpleFunc.indicatorConst 1 ht (_ : ↑↑μ t ≠ ⊤) x) x_1 ∂μ\n[PROOFSTEP]\nrw [Lp.simpleFunc.coe_indicatorConst, set_integral_indicatorConstLp (hm _ hs)]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : F'\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t < ⊤\n⊢ ∫ (x_1 : α) in s, ↑↑(↑(condexpInd F' hm μ t) x) x_1 ∂μ = ENNReal.toReal (↑↑μ (t ∩ s)) • x\n[PROOFSTEP]\nexact set_integral_condexpInd hs ht hμs hμt.ne x\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∀ ⦃f g : α → F'⦄ (hf : Memℒp f 1) (hg : Memℒp g 1),\n    Disjoint (Function.support f) (Function.support g) →\n      (fun f => ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ) (Memℒp.toLp f hf) →\n        (fun f => ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ) (Memℒp.toLp g hg) →\n          (fun f => ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ)\n            (Memℒp.toLp f hf + Memℒp.toLp g hg)\n[PROOFSTEP]\nintro f g hf_Lp hg_Lp _ hf hg\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝¹ g✝ : α → F'\ns : Set α\nf✝ : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf g : α → F'\nhf_Lp : Memℒp f 1\nhg_Lp : Memℒp g 1\na✝ : Disjoint (Function.support f) (Function.support g)\nhf : ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf_Lp)) x ∂μ = ∫ (x : α) in s, ↑↑(Memℒp.toLp f hf_Lp) x ∂μ\nhg : ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg_Lp)) x ∂μ = ∫ (x : α) in s, ↑↑(Memℒp.toLp g hg_Lp) x ∂μ\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf_Lp + Memℒp.toLp g hg_Lp)) x ∂μ =\n    ∫ (x : α) in s, ↑↑(Memℒp.toLp f hf_Lp + Memℒp.toLp g hg_Lp) x ∂μ\n[PROOFSTEP]\nsimp_rw [(condexpL1Clm F' hm μ).map_add]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝¹ g✝ : α → F'\ns : Set α\nf✝ : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf g : α → F'\nhf_Lp : Memℒp f 1\nhg_Lp : Memℒp g 1\na✝ : Disjoint (Function.support f) (Function.support g)\nhf : ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf_Lp)) x ∂μ = ∫ (x : α) in s, ↑↑(Memℒp.toLp f hf_Lp) x ∂μ\nhg : ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg_Lp)) x ∂μ = ∫ (x : α) in s, ↑↑(Memℒp.toLp g hg_Lp) x ∂μ\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf_Lp) + ↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg_Lp)) x ∂μ =\n    ∫ (x : α) in s, ↑↑(Memℒp.toLp f hf_Lp + Memℒp.toLp g hg_Lp) x ∂μ\n[PROOFSTEP]\nrw [set_integral_congr_ae (hm s hs)\n    ((Lp.coeFn_add (condexpL1Clm F' hm μ (hf_Lp.toLp f)) (condexpL1Clm F' hm μ (hg_Lp.toLp g))).mono fun x hx _ => hx)]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝¹ g✝ : α → F'\ns : Set α\nf✝ : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf g : α → F'\nhf_Lp : Memℒp f 1\nhg_Lp : Memℒp g 1\na✝ : Disjoint (Function.support f) (Function.support g)\nhf : ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf_Lp)) x ∂μ = ∫ (x : α) in s, ↑↑(Memℒp.toLp f hf_Lp) x ∂μ\nhg : ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg_Lp)) x ∂μ = ∫ (x : α) in s, ↑↑(Memℒp.toLp g hg_Lp) x ∂μ\n⊢ ∫ (x : α) in s,\n      (↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf_Lp)) + ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg_Lp))) x ∂μ =\n    ∫ (x : α) in s, ↑↑(Memℒp.toLp f hf_Lp + Memℒp.toLp g hg_Lp) x ∂μ\n[PROOFSTEP]\nrw [set_integral_congr_ae (hm s hs) ((Lp.coeFn_add (hf_Lp.toLp f) (hg_Lp.toLp g)).mono fun x hx _ => hx)]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝¹ g✝ : α → F'\ns : Set α\nf✝ : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf g : α → F'\nhf_Lp : Memℒp f 1\nhg_Lp : Memℒp g 1\na✝ : Disjoint (Function.support f) (Function.support g)\nhf : ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf_Lp)) x ∂μ = ∫ (x : α) in s, ↑↑(Memℒp.toLp f hf_Lp) x ∂μ\nhg : ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg_Lp)) x ∂μ = ∫ (x : α) in s, ↑↑(Memℒp.toLp g hg_Lp) x ∂μ\n⊢ ∫ (x : α) in s,\n      (↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf_Lp)) + ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg_Lp))) x ∂μ =\n    ∫ (x : α) in s, (↑↑(Memℒp.toLp f hf_Lp) + ↑↑(Memℒp.toLp g hg_Lp)) x ∂μ\n[PROOFSTEP]\nsimp_rw [Pi.add_apply]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝¹ g✝ : α → F'\ns : Set α\nf✝ : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf g : α → F'\nhf_Lp : Memℒp f 1\nhg_Lp : Memℒp g 1\na✝ : Disjoint (Function.support f) (Function.support g)\nhf : ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf_Lp)) x ∂μ = ∫ (x : α) in s, ↑↑(Memℒp.toLp f hf_Lp) x ∂μ\nhg : ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg_Lp)) x ∂μ = ∫ (x : α) in s, ↑↑(Memℒp.toLp g hg_Lp) x ∂μ\n⊢ ∫ (x : α) in s,\n      ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf_Lp)) x + ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg_Lp)) x ∂μ =\n    ∫ (x : α) in s, ↑↑(Memℒp.toLp f hf_Lp) x + ↑↑(Memℒp.toLp g hg_Lp) x ∂μ\n[PROOFSTEP]\nrw [integral_add (L1.integrable_coeFn _).integrableOn (L1.integrable_coeFn _).integrableOn,\n  integral_add (L1.integrable_coeFn _).integrableOn (L1.integrable_coeFn _).integrableOn, hf, hg]\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ Continuous fun f => ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ\n[PROOFSTEP]\nexact (continuous_set_integral s).comp (condexpL1Clm F' hm μ).continuous\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ Continuous fun f => ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nexact continuous_set_integral s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nlet S := spanningSets (μ.trim hm)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nhave hS_meas : ∀ i, MeasurableSet[m] (S i) := measurable_spanningSets (μ.trim hm)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nhave hS_meas0 : ∀ i, MeasurableSet (S i) := fun i => hm _ (hS_meas i)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nhave hs_eq : s = ⋃ i, S i ∩ s := by\n  simp_rw [Set.inter_comm]\n  rw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\n⊢ s = ⋃ (i : ℕ), S i ∩ s\n[PROOFSTEP]\nsimp_rw [Set.inter_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\n⊢ s = ⋃ (i : ℕ), s ∩ spanningSets (Measure.trim μ hm) i\n[PROOFSTEP]\nrw [← Set.inter_iUnion, iUnion_spanningSets (μ.trim hm), Set.inter_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nhave hS_finite : ∀ i, μ (S i ∩ s) < ∞ :=\n  by\n  refine' fun i => (measure_mono (Set.inter_subset_left _ _)).trans_lt _\n  have hS_finite_trim := measure_spanningSets_lt_top (μ.trim hm) i\n  rwa [trim_measurableSet_eq hm (hS_meas i)] at hS_finite_trim \n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\n⊢ ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\n[PROOFSTEP]\nrefine' fun i => (measure_mono (Set.inter_subset_left _ _)).trans_lt _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\ni : ℕ\n⊢ ↑↑μ (S i) < ⊤\n[PROOFSTEP]\nhave hS_finite_trim := measure_spanningSets_lt_top (μ.trim hm) i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\ni : ℕ\nhS_finite_trim : ↑↑(Measure.trim μ hm) (spanningSets (Measure.trim μ hm) i) < ⊤\n⊢ ↑↑μ (S i) < ⊤\n[PROOFSTEP]\nrwa [trim_measurableSet_eq hm (hS_meas i)] at hS_finite_trim \n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nhave h_mono : Monotone fun i => S i ∩ s := by\n  intro i j hij x\n  simp_rw [Set.mem_inter_iff]\n  exact fun h => ⟨monotone_spanningSets (μ.trim hm) hij h.1, h.2⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\n⊢ Monotone fun i => S i ∩ s\n[PROOFSTEP]\nintro i j hij x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\ni j : ℕ\nhij : i ≤ j\nx : α\n⊢ x ∈ (fun i => S i ∩ s) i → x ∈ (fun i => S i ∩ s) j\n[PROOFSTEP]\nsimp_rw [Set.mem_inter_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\ni j : ℕ\nhij : i ≤ j\nx : α\n⊢ x ∈ spanningSets (Measure.trim μ hm) i ∧ x ∈ s → x ∈ spanningSets (Measure.trim μ hm) j ∧ x ∈ s\n[PROOFSTEP]\nexact fun h => ⟨monotone_spanningSets (μ.trim hm) hij h.1, h.2⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\nh_mono : Monotone fun i => S i ∩ s\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nhave h_eq_forall : (fun i => ∫ x in S i ∩ s, condexpL1Clm F' hm μ f x ∂μ) = fun i => ∫ x in S i ∩ s, f x ∂μ :=\n  funext fun i =>\n    set_integral_condexpL1Clm_of_measure_ne_top f (@MeasurableSet.inter α m _ _ (hS_meas i) hs) (hS_finite i).ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\nh_mono : Monotone fun i => S i ∩ s\nh_eq_forall :\n  (fun i => ∫ (x : α) in S i ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ) = fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nhave h_right : Tendsto (fun i => ∫ x in S i ∩ s, f x ∂μ) atTop (𝓝 (∫ x in s, f x ∂μ)) :=\n  by\n  have h :=\n    tendsto_set_integral_of_monotone (fun i => (hS_meas0 i).inter (hm s hs)) h_mono (L1.integrable_coeFn f).integrableOn\n  rwa [← hs_eq] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\nh_mono : Monotone fun i => S i ∩ s\nh_eq_forall :\n  (fun i => ∫ (x : α) in S i ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ) = fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ\n⊢ Tendsto (fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ) atTop (𝓝 (∫ (x : α) in s, ↑↑f x ∂μ))\n[PROOFSTEP]\nhave h :=\n  tendsto_set_integral_of_monotone (fun i => (hS_meas0 i).inter (hm s hs)) h_mono (L1.integrable_coeFn f).integrableOn\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\nh_mono : Monotone fun i => S i ∩ s\nh_eq_forall :\n  (fun i => ∫ (x : α) in S i ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ) = fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ\nh : Tendsto (fun i => ∫ (a : α) in S i ∩ s, ↑↑f a ∂μ) atTop (𝓝 (∫ (a : α) in ⋃ (n : ℕ), S n ∩ s, ↑↑f a ∂μ))\n⊢ Tendsto (fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ) atTop (𝓝 (∫ (x : α) in s, ↑↑f x ∂μ))\n[PROOFSTEP]\nrwa [← hs_eq] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\nh_mono : Monotone fun i => S i ∩ s\nh_eq_forall :\n  (fun i => ∫ (x : α) in S i ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ) = fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ\nh_right : Tendsto (fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ) atTop (𝓝 (∫ (x : α) in s, ↑↑f x ∂μ))\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nhave h_left :\n  Tendsto (fun i => ∫ x in S i ∩ s, condexpL1Clm F' hm μ f x ∂μ) atTop (𝓝 (∫ x in s, condexpL1Clm F' hm μ f x ∂μ)) :=\n  by\n  have h :=\n    tendsto_set_integral_of_monotone (fun i => (hS_meas0 i).inter (hm s hs)) h_mono\n      (L1.integrable_coeFn (condexpL1Clm F' hm μ f)).integrableOn\n  rwa [← hs_eq] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\nh_mono : Monotone fun i => S i ∩ s\nh_eq_forall :\n  (fun i => ∫ (x : α) in S i ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ) = fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ\nh_right : Tendsto (fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ) atTop (𝓝 (∫ (x : α) in s, ↑↑f x ∂μ))\n⊢ Tendsto (fun i => ∫ (x : α) in S i ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ) atTop\n    (𝓝 (∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ))\n[PROOFSTEP]\nhave h :=\n  tendsto_set_integral_of_monotone (fun i => (hS_meas0 i).inter (hm s hs)) h_mono\n    (L1.integrable_coeFn (condexpL1Clm F' hm μ f)).integrableOn\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\nh_mono : Monotone fun i => S i ∩ s\nh_eq_forall :\n  (fun i => ∫ (x : α) in S i ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ) = fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ\nh_right : Tendsto (fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ) atTop (𝓝 (∫ (x : α) in s, ↑↑f x ∂μ))\nh :\n  Tendsto (fun i => ∫ (a : α) in S i ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) a ∂μ) atTop\n    (𝓝 (∫ (a : α) in ⋃ (n : ℕ), S n ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) a ∂μ))\n⊢ Tendsto (fun i => ∫ (x : α) in S i ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ) atTop\n    (𝓝 (∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ))\n[PROOFSTEP]\nrwa [← hs_eq] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\nh_mono : Monotone fun i => S i ∩ s\nh_eq_forall :\n  (fun i => ∫ (x : α) in S i ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ) = fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ\nh_right : Tendsto (fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ) atTop (𝓝 (∫ (x : α) in s, ↑↑f x ∂μ))\nh_left :\n  Tendsto (fun i => ∫ (x : α) in S i ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ) atTop\n    (𝓝 (∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ))\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nrw [h_eq_forall] at h_left \n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nhs : MeasurableSet s\nS : ℕ → Set α := spanningSets (Measure.trim μ hm)\nhS_meas : ∀ (i : ℕ), MeasurableSet (S i)\nhS_meas0 : ∀ (i : ℕ), MeasurableSet (S i)\nhs_eq : s = ⋃ (i : ℕ), S i ∩ s\nhS_finite : ∀ (i : ℕ), ↑↑μ (S i ∩ s) < ⊤\nh_mono : Monotone fun i => S i ∩ s\nh_eq_forall :\n  (fun i => ∫ (x : α) in S i ∩ s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ) = fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ\nh_right : Tendsto (fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ) atTop (𝓝 (∫ (x : α) in s, ↑↑f x ∂μ))\nh_left :\n  Tendsto (fun i => ∫ (x : α) in S i ∩ s, ↑↑f x ∂μ) atTop (𝓝 (∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ))\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nexact tendsto_nhds_unique h_left h_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\n⊢ AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) f)) μ\n[PROOFSTEP]\nrefine'\n  @Lp.induction _ _ _ _ _ _ _ ENNReal.one_ne_top\n    (fun f : α →₁[μ] F' => AEStronglyMeasurable' m (condexpL1Clm F' hm μ f) μ) _ _ _ f\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\n⊢ ∀ (c : F') {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤),\n    (fun f => AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) f)) μ)\n      ↑(simpleFunc.indicatorConst 1 hs (_ : ↑↑μ s ≠ ⊤) c)\n[PROOFSTEP]\nintro c s hs hμs\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns✝ : Set α\nf : { x // x ∈ Lp F' 1 }\nc : F'\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) ↑(simpleFunc.indicatorConst 1 hs (_ : ↑↑μ s ≠ ⊤) c))) μ\n[PROOFSTEP]\nrw [condexpL1Clm_indicatorConst hs hμs.ne c]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns✝ : Set α\nf : { x // x ∈ Lp F' 1 }\nc : F'\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ AEStronglyMeasurable' m (↑↑(↑(condexpInd F' hm μ s) c)) μ\n[PROOFSTEP]\nexact aestronglyMeasurable'_condexpInd hs hμs.ne c\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\n⊢ ∀ ⦃f g : α → F'⦄ (hf : Memℒp f 1) (hg : Memℒp g 1),\n    Disjoint (Function.support f) (Function.support g) →\n      (fun f => AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) f)) μ) (Memℒp.toLp f hf) →\n        (fun f => AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) f)) μ) (Memℒp.toLp g hg) →\n          (fun f => AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) f)) μ) (Memℒp.toLp f hf + Memℒp.toLp g hg)\n[PROOFSTEP]\nintro f g hf hg _ hfm hgm\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝¹ g✝ : α → F'\ns : Set α\nf✝ : { x // x ∈ Lp F' 1 }\nf g : α → F'\nhf : Memℒp f 1\nhg : Memℒp g 1\na✝ : Disjoint (Function.support f) (Function.support g)\nhfm : AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf))) μ\nhgm : AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg))) μ\n⊢ AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf + Memℒp.toLp g hg))) μ\n[PROOFSTEP]\nrw [(condexpL1Clm F' hm μ).map_add]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝¹ g✝ : α → F'\ns : Set α\nf✝ : { x // x ∈ Lp F' 1 }\nf g : α → F'\nhf : Memℒp f 1\nhg : Memℒp g 1\na✝ : Disjoint (Function.support f) (Function.support g)\nhfm : AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf))) μ\nhgm : AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg))) μ\n⊢ AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf) + ↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg))) μ\n[PROOFSTEP]\nrefine' AEStronglyMeasurable'.congr _ (coeFn_add _ _).symm\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝¹ g✝ : α → F'\ns : Set α\nf✝ : { x // x ∈ Lp F' 1 }\nf g : α → F'\nhf : Memℒp f 1\nhg : Memℒp g 1\na✝ : Disjoint (Function.support f) (Function.support g)\nhfm : AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf))) μ\nhgm : AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg))) μ\n⊢ AEStronglyMeasurable' m\n    (↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp f hf)) + ↑↑(↑(condexpL1Clm F' hm μ) (Memℒp.toLp g hg))) μ\n[PROOFSTEP]\nexact AEStronglyMeasurable'.add hfm hgm\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\n⊢ IsClosed {f | (fun f => AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) f)) μ) f}\n[PROOFSTEP]\nhave :\n  {f : Lp F' 1 μ | AEStronglyMeasurable' m (condexpL1Clm F' hm μ f) μ} =\n    condexpL1Clm F' hm μ ⁻¹' {f | AEStronglyMeasurable' m f μ} :=\n  by rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\n⊢ {f | AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) f)) μ} =\n    ↑(condexpL1Clm F' hm μ) ⁻¹' {f | AEStronglyMeasurable' m (↑↑f) μ}\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nthis :\n  {f | AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) f)) μ} =\n    ↑(condexpL1Clm F' hm μ) ⁻¹' {f | AEStronglyMeasurable' m (↑↑f) μ}\n⊢ IsClosed {f | (fun f => AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) f)) μ) f}\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nthis :\n  {f | AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) f)) μ} =\n    ↑(condexpL1Clm F' hm μ) ⁻¹' {f | AEStronglyMeasurable' m (↑↑f) μ}\n⊢ IsClosed (↑(condexpL1Clm F' hm μ) ⁻¹' {f | AEStronglyMeasurable' m (↑↑f) μ})\n[PROOFSTEP]\nrefine' IsClosed.preimage (condexpL1Clm F' hm μ).continuous _\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ Lp F' 1 }\nthis :\n  {f | AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) f)) μ} =\n    ↑(condexpL1Clm F' hm μ) ⁻¹' {f | AEStronglyMeasurable' m (↑↑f) μ}\n⊢ IsClosed {f | AEStronglyMeasurable' m (↑↑f) μ}\n[PROOFSTEP]\nexact isClosed_aeStronglyMeasurable' hm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\n⊢ ↑(condexpL1Clm F' hm μ) ↑f = ↑f\n[PROOFSTEP]\nlet g := lpMeasToLpTrimLie F' ℝ 1 μ hm f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\n⊢ ↑(condexpL1Clm F' hm μ) ↑f = ↑f\n[PROOFSTEP]\nhave hfg : f = (lpMeasToLpTrimLie F' ℝ 1 μ hm).symm g := by simp only [LinearIsometryEquiv.symm_apply_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\n⊢ f = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g\n[PROOFSTEP]\nsimp only [LinearIsometryEquiv.symm_apply_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\nhfg : f = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g\n⊢ ↑(condexpL1Clm F' hm μ) ↑f = ↑f\n[PROOFSTEP]\nrw [hfg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\nhfg : f = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g\n⊢ ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g) =\n    ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g)\n[PROOFSTEP]\nrefine'\n  @Lp.induction α F' m _ 1 (μ.trim hm) _ ENNReal.coe_ne_top\n    (fun g : α →₁[μ.trim hm] F' =>\n      condexpL1Clm F' hm μ ((lpMeasToLpTrimLie F' ℝ 1 μ hm).symm g : α →₁[μ] F') =\n        ↑((lpMeasToLpTrimLie F' ℝ 1 μ hm).symm g))\n    _ _ _ g\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\nhfg : f = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g\n⊢ ∀ (c : F') {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑(Measure.trim μ hm) s < ⊤),\n    (fun g =>\n        ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g) =\n          ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g))\n      ↑(simpleFunc.indicatorConst 1 hs (_ : ↑↑(Measure.trim μ hm) s ≠ ⊤) c)\n[PROOFSTEP]\nintro c s hs hμs\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns✝ : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\nhfg : f = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g\nc : F'\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑(Measure.trim μ hm) s < ⊤\n⊢ ↑(condexpL1Clm F' hm μ)\n      ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm))\n          ↑(simpleFunc.indicatorConst 1 hs (_ : ↑↑(Measure.trim μ hm) s ≠ ⊤) c)) =\n    ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm))\n        ↑(simpleFunc.indicatorConst 1 hs (_ : ↑↑(Measure.trim μ hm) s ≠ ⊤) c))\n[PROOFSTEP]\nrw [@Lp.simpleFunc.coe_indicatorConst _ _ m, lpMeasToLpTrimLie_symm_indicator hs hμs.ne c,\n  condexpL1Clm_indicatorConstLp]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns✝ : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\nhfg : f = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g\nc : F'\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑(Measure.trim μ hm) s < ⊤\n⊢ ↑(condexpInd F' hm μ s) c = indicatorConstLp 1 (_ : MeasurableSet s) (_ : ↑↑μ s ≠ ⊤) c\n[PROOFSTEP]\nexact condexpInd_of_measurable hs ((le_trim hm).trans_lt hμs).ne c\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\nhfg : f = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g\n⊢ ∀ ⦃f g : α → F'⦄ (hf : Memℒp f 1) (hg : Memℒp g 1),\n    Disjoint (Function.support f) (Function.support g) →\n      (fun g =>\n            ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g) =\n              ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g))\n          (Memℒp.toLp f hf) →\n        (fun g =>\n              ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g) =\n                ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g))\n            (Memℒp.toLp g hg) →\n          (fun g =>\n              ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g) =\n                ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g))\n            (Memℒp.toLp f hf + Memℒp.toLp g hg)\n[PROOFSTEP]\nintro f g hf hg _ hf_eq hg_eq\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝¹ g✝¹ : α → F'\ns : Set α\nf✝ : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng✝ : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f✝\nhfg : f✝ = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g✝\nf g : α → F'\nhf : Memℒp f 1\nhg : Memℒp g 1\na✝ : Disjoint (Function.support f) (Function.support g)\nhf_eq :\n  ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp f hf)) =\n    ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp f hf))\nhg_eq :\n  ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp g hg)) =\n    ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp g hg))\n⊢ ↑(condexpL1Clm F' hm μ)\n      ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp f hf + Memℒp.toLp g hg)) =\n    ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp f hf + Memℒp.toLp g hg))\n[PROOFSTEP]\nrw [LinearIsometryEquiv.map_add]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝¹ g✝¹ : α → F'\ns : Set α\nf✝ : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng✝ : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f✝\nhfg : f✝ = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g✝\nf g : α → F'\nhf : Memℒp f 1\nhg : Memℒp g 1\na✝ : Disjoint (Function.support f) (Function.support g)\nhf_eq :\n  ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp f hf)) =\n    ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp f hf))\nhg_eq :\n  ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp g hg)) =\n    ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp g hg))\n⊢ ↑(condexpL1Clm F' hm μ)\n      ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp f hf) +\n          ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp g hg)) =\n    ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp f hf) +\n        ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp g hg))\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝¹ g✝¹ : α → F'\ns : Set α\nf✝ : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng✝ : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f✝\nhfg : f✝ = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g✝\nf g : α → F'\nhf : Memℒp f 1\nhg : Memℒp g 1\na✝ : Disjoint (Function.support f) (Function.support g)\nhf_eq :\n  ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp f hf)) =\n    ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp f hf))\nhg_eq :\n  ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp g hg)) =\n    ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp g hg))\n⊢ ↑(condexpL1Clm F' hm μ)\n      (↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp f hf)) +\n        ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp g hg))) =\n    ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp f hf)) +\n      ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) (Memℒp.toLp g hg))\n[PROOFSTEP]\nrw [map_add, hf_eq, hg_eq]\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\nhfg : f = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g\n⊢ IsClosed\n    {f |\n      (fun g =>\n          ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g) =\n            ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g))\n        f}\n[PROOFSTEP]\nrefine' isClosed_eq _ _\n[GOAL]\ncase refine'_3.refine'_1\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\nhfg : f = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g\n⊢ Continuous fun f => ↑(condexpL1Clm F' hm μ) ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) f)\n[PROOFSTEP]\nrefine' (condexpL1Clm F' hm μ).continuous.comp (continuous_induced_dom.comp _)\n[GOAL]\ncase refine'_3.refine'_1\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\nhfg : f = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g\n⊢ Continuous fun f => ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) f\n[PROOFSTEP]\nexact LinearIsometryEquiv.continuous _\n[GOAL]\ncase refine'_3.refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\nhfg : f = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g\n⊢ Continuous fun f => ↑(↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) f)\n[PROOFSTEP]\nrefine' continuous_induced_dom.comp _\n[GOAL]\ncase refine'_3.refine'_2\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nf : { x // x ∈ lpMeas F' ℝ m 1 μ }\ng : { x // x ∈ Lp F' 1 } := ↑(lpMeasToLpTrimLie F' ℝ 1 μ hm) f\nhfg : f = ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) g\n⊢ Continuous fun f => ↑(LinearIsometryEquiv.symm (lpMeasToLpTrimLie F' ℝ 1 μ hm)) f\n[PROOFSTEP]\nexact LinearIsometryEquiv.continuous _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : α → F'\n⊢ AEStronglyMeasurable' m (↑↑(condexpL1 hm μ f)) μ\n[PROOFSTEP]\nby_cases hf : Integrable f μ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : α → F'\nhf : Integrable f\n⊢ AEStronglyMeasurable' m (↑↑(condexpL1 hm μ f)) μ\n[PROOFSTEP]\nrw [condexpL1_eq hf]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : α → F'\nhf : Integrable f\n⊢ AEStronglyMeasurable' m (↑↑(↑(condexpL1Clm F' hm μ) (Integrable.toL1 f hf))) μ\n[PROOFSTEP]\nexact aestronglyMeasurable'_condexpL1Clm _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : α → F'\nhf : ¬Integrable f\n⊢ AEStronglyMeasurable' m (↑↑(condexpL1 hm μ f)) μ\n[PROOFSTEP]\nrw [condexpL1_undef hf]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : α → F'\nhf : ¬Integrable f\n⊢ AEStronglyMeasurable' m (↑↑0) μ\n[PROOFSTEP]\nrefine AEStronglyMeasurable'.congr ?_ (coeFn_zero _ _ _).symm\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nf : α → F'\nhf : ¬Integrable f\n⊢ AEStronglyMeasurable' m 0 μ\n[PROOFSTEP]\nexact StronglyMeasurable.aeStronglyMeasurable' (@stronglyMeasurable_zero _ _ m _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\ns : Set α\nhf : Integrable f\nhs : MeasurableSet s\n⊢ ∫ (x : α) in s, ↑↑(condexpL1 hm μ f) x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nsimp_rw [condexpL1_eq hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\ns : Set α\nhf : Integrable f\nhs : MeasurableSet s\n⊢ ∫ (x : α) in s, ↑↑(↑(condexpL1Clm F' hm μ) (Integrable.toL1 f hf)) x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nrw [set_integral_condexpL1Clm (hf.toL1 f) hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\ns : Set α\nhf : Integrable f\nhs : MeasurableSet s\n⊢ ∫ (x : α) in s, ↑↑(Integrable.toL1 f hf) x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nexact set_integral_congr_ae (hm s hs) (hf.coeFn_toL1.mono fun x hx _ => hx)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nc : 𝕜\nf : α → F'\n⊢ condexpL1 hm μ (c • f) = c • condexpL1 hm μ f\n[PROOFSTEP]\nrefine' setToFun_smul _ _ c f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf✝ g : α → F'\ns : Set α\nc : 𝕜\nf : α → F'\n⊢ ∀ (c : 𝕜) (s : Set α) (x : F'), ↑(condexpInd F' hm μ s) (c • x) = c • ↑(condexpInd F' hm μ s) x\n[PROOFSTEP]\nexact fun c _ x => condexpInd_smul' c x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\ns : Set α\nhfm : AEStronglyMeasurable' m f μ\nhfi : Integrable f\n⊢ ↑↑(condexpL1 hm μ f) =ᵐ[μ] f\n[PROOFSTEP]\nrw [condexpL1_eq hfi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\ns : Set α\nhfm : AEStronglyMeasurable' m f μ\nhfi : Integrable f\n⊢ ↑↑(↑(condexpL1Clm F' hm μ) (Integrable.toL1 f hfi)) =ᵐ[μ] f\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (Integrable.coeFn_toL1 hfi)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\ns : Set α\nhfm : AEStronglyMeasurable' m f μ\nhfi : Integrable f\n⊢ ↑↑(↑(condexpL1Clm F' hm μ) (Integrable.toL1 f hfi)) =ᵐ[μ] ↑↑(Integrable.toL1 f hfi)\n[PROOFSTEP]\nrw [condexpL1Clm_of_aestronglyMeasurable']\n[GOAL]\ncase hfm\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup F'\ninst✝⁷ : NormedSpace 𝕜 F'\ninst✝⁶ : NormedSpace ℝ F'\ninst✝⁵ : CompleteSpace F'\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedAddCommGroup G'\ninst✝² : NormedSpace ℝ G'\ninst✝¹ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nf g : α → F'\ns : Set α\nhfm : AEStronglyMeasurable' m f μ\nhfi : Integrable f\n⊢ AEStronglyMeasurable' m (↑↑(Integrable.toL1 f hfi)) μ\n[PROOFSTEP]\nexact AEStronglyMeasurable'.congr hfm (Integrable.coeFn_toL1 hfi).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁵ : IsROrC 𝕜\ninst✝¹⁴ : NormedAddCommGroup F\ninst✝¹³ : NormedSpace 𝕜 F\ninst✝¹² : NormedAddCommGroup F'\ninst✝¹¹ : NormedSpace 𝕜 F'\ninst✝¹⁰ : NormedSpace ℝ F'\ninst✝⁹ : CompleteSpace F'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝⁴ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nE : Type u_8\ninst✝³ : NormedLatticeAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : OrderedSMul ℝ E\nf g : α → E\nhf : Integrable f\nhg : Integrable g\nhfg : f ≤ᵐ[μ] g\n⊢ ↑↑(condexpL1 hm μ f) ≤ᵐ[μ] ↑↑(condexpL1 hm μ g)\n[PROOFSTEP]\nrw [coeFn_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁵ : IsROrC 𝕜\ninst✝¹⁴ : NormedAddCommGroup F\ninst✝¹³ : NormedSpace 𝕜 F\ninst✝¹² : NormedAddCommGroup F'\ninst✝¹¹ : NormedSpace 𝕜 F'\ninst✝¹⁰ : NormedSpace ℝ F'\ninst✝⁹ : CompleteSpace F'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝⁴ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nE : Type u_8\ninst✝³ : NormedLatticeAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : OrderedSMul ℝ E\nf g : α → E\nhf : Integrable f\nhg : Integrable g\nhfg : f ≤ᵐ[μ] g\n⊢ condexpL1 hm μ f ≤ condexpL1 hm μ g\n[PROOFSTEP]\nhave h_nonneg : ∀ s, MeasurableSet s → μ s < ∞ → ∀ x : E, 0 ≤ x → 0 ≤ condexpInd E hm μ s x := fun s hs hμs x hx =>\n  condexpInd_nonneg hs hμs.ne x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nF : Type u_3\nF' : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁵ : IsROrC 𝕜\ninst✝¹⁴ : NormedAddCommGroup F\ninst✝¹³ : NormedSpace 𝕜 F\ninst✝¹² : NormedAddCommGroup F'\ninst✝¹¹ : NormedSpace 𝕜 F'\ninst✝¹⁰ : NormedSpace ℝ F'\ninst✝⁹ : CompleteSpace F'\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\ninst✝⁴ : SigmaFinite (Measure.trim μ hm)\nf✝ g✝ : α → F'\ns : Set α\nE : Type u_8\ninst✝³ : NormedLatticeAddCommGroup E\ninst✝² : CompleteSpace E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : OrderedSMul ℝ E\nf g : α → E\nhf : Integrable f\nhg : Integrable g\nhfg : f ≤ᵐ[μ] g\nh_nonneg : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∀ (x : E), 0 ≤ x → 0 ≤ ↑(condexpInd E hm μ s) x\n⊢ condexpL1 hm μ f ≤ condexpL1 hm μ g\n[PROOFSTEP]\nexact setToFun_mono (dominatedFinMeasAdditive_condexpInd E hm μ) h_nonneg hf hg hfg\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.ConditionalExpectation.CondexpL1", "llama_tokens": 95890, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191337850933, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.35727911653749217}}
{"text": "[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nx y : (j : J) × ↑(F.obj j)\nh : Types.FilteredColimit.Rel (F ⋙ forget GroupCat) x y\n⊢ colimitInvAux F x = colimitInvAux F y\n[PROOFSTEP]\napply G.mk_eq\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nx y : (j : J) × ↑(F.obj j)\nh : Types.FilteredColimit.Rel (F ⋙ forget GroupCat) x y\n⊢ ∃ k f g, ↑(F.map f) { fst := x.fst, snd := x.snd⁻¹ }.snd = ↑(F.map g) { fst := y.fst, snd := y.snd⁻¹ }.snd\n[PROOFSTEP]\nobtain ⟨k, f, g, hfg⟩ := h\n[GOAL]\ncase h.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nx y : (j : J) × ↑(F.obj j)\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nhfg : (F ⋙ forget GroupCat).map f x.snd = (F ⋙ forget GroupCat).map g y.snd\n⊢ ∃ k f g, ↑(F.map f) { fst := x.fst, snd := x.snd⁻¹ }.snd = ↑(F.map g) { fst := y.fst, snd := y.snd⁻¹ }.snd\n[PROOFSTEP]\nuse k, f, g\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nx y : (j : J) × ↑(F.obj j)\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nhfg : (F ⋙ forget GroupCat).map f x.snd = (F ⋙ forget GroupCat).map g y.snd\n⊢ ↑(F.map f) { fst := x.fst, snd := x.snd⁻¹ }.snd = ↑(F.map g) { fst := y.fst, snd := y.snd⁻¹ }.snd\n[PROOFSTEP]\nrw [MonoidHom.map_inv, MonoidHom.map_inv, inv_inj]\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nx y : (j : J) × ↑(F.obj j)\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nhfg : (F ⋙ forget GroupCat).map f x.snd = (F ⋙ forget GroupCat).map g y.snd\n⊢ ↑(F.map f) x.snd = ↑(F.map g) y.snd\n[PROOFSTEP]\nexact hfg\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nx : ↑(G F)\n⊢ ↑(G F)\n[PROOFSTEP]\nrefine' Quot.lift (colimitInvAux.{v, u} F) _ x\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nx : ↑(G F)\n⊢ ∀ (a b : (j : J) × ↑(F.obj j)),\n    Types.Quot.Rel ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat) a b → colimitInvAux F a = colimitInvAux F b\n[PROOFSTEP]\nintro x y h\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nx✝ : ↑(G F)\nx y : (j : J) × ↑(F.obj j)\nh : Types.Quot.Rel ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat) x y\n⊢ colimitInvAux F x = colimitInvAux F y\n[PROOFSTEP]\napply colimitInvAux_eq_of_rel\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nx✝ : ↑(G F)\nx y : (j : J) × ↑(F.obj j)\nh : Types.Quot.Rel ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat) x y\n⊢ Types.FilteredColimit.Rel (F ⋙ forget GroupCat) x y\n[PROOFSTEP]\napply Types.FilteredColimit.rel_of_quot_rel\n[GOAL]\ncase h.a\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nx✝ : ↑(G F)\nx y : (j : J) × ↑(F.obj j)\nh : Types.Quot.Rel ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat) x y\n⊢ Types.Quot.Rel (F ⋙ forget GroupCat) x y\n[PROOFSTEP]\nexact h\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nsrc✝¹ : Inv ↑(G F) := colimitInv F\nsrc✝ : Monoid ↑(G F) := (G F).str\nx : ↑(G F)\n⊢ x⁻¹ * x = 1\n[PROOFSTEP]\nrefine Quot.inductionOn x ?_\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nsrc✝¹ : Inv ↑(G F) := colimitInv F\nsrc✝ : Monoid ↑(G F) := (G F).str\nx : ↑(G F)\n⊢ ∀ (a : (j : J) × ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat).obj j),\n    (Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat)) a)⁻¹ *\n        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat)) a =\n      1\n[PROOFSTEP]\nclear x\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nsrc✝¹ : Inv ↑(G F) := colimitInv F\nsrc✝ : Monoid ↑(G F) := (G F).str\n⊢ ∀ (a : (j : J) × ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat).obj j),\n    (Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat)) a)⁻¹ *\n        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat)) a =\n      1\n[PROOFSTEP]\nintro x\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nsrc✝¹ : Inv ↑(G F) := colimitInv F\nsrc✝ : Monoid ↑(G F) := (G F).str\nx : (j : J) × ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat).obj j\n⊢ (Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat)) x)⁻¹ *\n      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat)) x =\n    1\n[PROOFSTEP]\ncases' x with j x\n[GOAL]\ncase mk\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nsrc✝¹ : Inv ↑(G F) := colimitInv F\nsrc✝ : Monoid ↑(G F) := (G F).str\nj : J\nx : ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat).obj j\n⊢ (Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat)) { fst := j, snd := x })⁻¹ *\n      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat)) { fst := j, snd := x } =\n    1\n[PROOFSTEP]\nerw [colimit_inv_mk_eq, colimit_mul_mk_eq (F ⋙ forget₂ GroupCat MonCat.{max v u}) ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j),\n  colimit_one_eq (F ⋙ forget₂ GroupCat MonCat.{max v u}) j]\n[GOAL]\ncase mk\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nsrc✝¹ : Inv ↑(G F) := colimitInv F\nsrc✝ : Monoid ↑(G F) := (G F).str\nj : J\nx : ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat).obj j\n⊢ MonCat.FilteredColimits.M.mk (F ⋙ forget₂ GroupCat MonCat)\n      { fst := j,\n        snd :=\n          ↑((F ⋙ forget₂ GroupCat MonCat).map (𝟙 j)) { fst := j, snd := { fst := j, snd := x }.snd⁻¹ }.snd *\n            ↑((F ⋙ forget₂ GroupCat MonCat).map (𝟙 j)) { fst := j, snd := x }.snd } =\n    MonCat.FilteredColimits.M.mk (F ⋙ forget₂ GroupCat MonCat) { fst := j, snd := 1 }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ GroupCat\nsrc✝¹ : Inv ↑(G F) := colimitInv F\nsrc✝ : Monoid ↑(G F) := (G F).str\nj : J\nx : ((F ⋙ forget₂ GroupCat MonCat) ⋙ forget MonCat).obj j\n⊢ MonCat.FilteredColimits.M.mk (F ⋙ forget₂ GroupCat MonCat)\n      { fst := j,\n        snd := ↑((forget₂ GroupCat MonCat).map (F.map (𝟙 j))) x⁻¹ * ↑((forget₂ GroupCat MonCat).map (F.map (𝟙 j))) x } =\n    MonCat.FilteredColimits.M.mk (F ⋙ forget₂ GroupCat MonCat) { fst := j, snd := 1 }\n[PROOFSTEP]\nerw [CategoryTheory.Functor.map_id, mul_left_inv]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.GroupCat.FilteredColimits", "llama_tokens": 3107, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6825737214979746, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.3572729754812351}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : SecondCountableTopology α\n⊢ SecondCountableTopology α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : SecondCountableTopology β\n⊢ SecondCountableTopology β\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nα : Type u_5\nβ : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Subsingleton β\nf : α → β\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nlet f_sf : α →ₛ β := ⟨f, fun x => ?_, Set.Subsingleton.finite Set.subsingleton_of_subsingleton⟩\n[GOAL]\ncase refine_2\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nα : Type u_5\nβ : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Subsingleton β\nf : α → β\nf_sf : α →ₛ β :=\n  { toFun := f, measurableSet_fiber' := (_ : ∀ (x : β), MeasurableSet (f ⁻¹' {x})),\n    finite_range' := (_ : Set.Finite (range f)) }\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nexact ⟨fun _ => f_sf, fun x => tendsto_const_nhds⟩\n[GOAL]\ncase refine_1\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nα : Type u_5\nβ : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Subsingleton β\nf : α → β\nx : β\n⊢ MeasurableSet (f ⁻¹' {x})\n[PROOFSTEP]\nhave h_univ : f ⁻¹' { x } = Set.univ := by\n  ext1 y\n  simp\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nα : Type u_5\nβ : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Subsingleton β\nf : α → β\nx : β\n⊢ f ⁻¹' {x} = univ\n[PROOFSTEP]\next1 y\n[GOAL]\ncase h\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nα : Type u_5\nβ : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Subsingleton β\nf : α → β\nx : β\ny : α\n⊢ y ∈ f ⁻¹' {x} ↔ y ∈ univ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_1\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nα : Type u_5\nβ : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Subsingleton β\nf : α → β\nx : β\nh_univ : f ⁻¹' {x} = univ\n⊢ MeasurableSet (f ⁻¹' {x})\n[PROOFSTEP]\nrw [h_univ]\n[GOAL]\ncase refine_1\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nα : Type u_5\nβ : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Subsingleton β\nf : α → β\nx : β\nh_univ : f ⁻¹' {x} = univ\n⊢ MeasurableSet univ\n[PROOFSTEP]\nexact MeasurableSet.univ\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nα : Type u_5\nβ : Type u_6\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\nhf : ∀ (x y : α), f x = f y\n⊢ StronglyMeasurable f\n[PROOFSTEP]\ncases' isEmpty_or_nonempty α with _ h\n[GOAL]\ncase inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nα : Type u_5\nβ : Type u_6\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\nhf : ∀ (x y : α), f x = f y\nh✝ : IsEmpty α\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nexact stronglyMeasurable_of_isEmpty f\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nα : Type u_5\nβ : Type u_6\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\nhf : ∀ (x y : α), f x = f y\nh : Nonempty α\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nconvert stronglyMeasurable_const (β := β) using 1\n[GOAL]\ncase h.e'_5\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nα : Type u_5\nβ : Type u_6\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\nhf : ∀ (x y : α), f x = f y\nh : Nonempty α\n⊢ f = fun x => ?inr.convert_3\ncase inr.convert_3\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nα : Type u_5\nβ : Type u_6\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\nhf : ∀ (x y : α), f x = f y\nh : Nonempty α\n⊢ β\n[PROOFSTEP]\nexact funext fun x => hf x h.some\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nα : Type u_5\nβ : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Subsingleton α\nf : α → β\nx y : α\n⊢ f x = f y\n[PROOFSTEP]\nrw [Subsingleton.elim x y]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\n⊢ Tendsto (fun n => ↑(approxBounded hf c n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nhave h_tendsto := hf.tendsto_approx x\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\n⊢ Tendsto (fun n => ↑(approxBounded hf c n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nsimp only [StronglyMeasurable.approxBounded, SimpleFunc.coe_map, Function.comp_apply]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\n⊢ Tendsto (fun n => min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖) • ↑(StronglyMeasurable.approx hf n) x) atTop\n    (𝓝 (f x))\n[PROOFSTEP]\nby_cases hfx0 : ‖f x‖ = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\nhfx0 : ‖f x‖ = 0\n⊢ Tendsto (fun n => min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖) • ↑(StronglyMeasurable.approx hf n) x) atTop\n    (𝓝 (f x))\n[PROOFSTEP]\nrw [norm_eq_zero] at hfx0 \n[GOAL]\ncase pos\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\nhfx0 : f x = 0\n⊢ Tendsto (fun n => min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖) • ↑(StronglyMeasurable.approx hf n) x) atTop\n    (𝓝 (f x))\n[PROOFSTEP]\nrw [hfx0] at h_tendsto ⊢\n[GOAL]\ncase pos\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 0)\nhfx0 : f x = 0\n⊢ Tendsto (fun n => min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖) • ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 0)\n[PROOFSTEP]\nhave h_tendsto_norm : Tendsto (fun n => ‖hf.approx n x‖) atTop (𝓝 0) :=\n  by\n  convert h_tendsto.norm\n  rw [norm_zero]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 0)\nhfx0 : f x = 0\n⊢ Tendsto (fun n => ‖↑(StronglyMeasurable.approx hf n) x‖) atTop (𝓝 0)\n[PROOFSTEP]\nconvert h_tendsto.norm\n[GOAL]\ncase h.e'_5.h.e'_3\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 0)\nhfx0 : f x = 0\n⊢ 0 = ‖0‖\n[PROOFSTEP]\nrw [norm_zero]\n[GOAL]\ncase pos\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 0)\nhfx0 : f x = 0\nh_tendsto_norm : Tendsto (fun n => ‖↑(StronglyMeasurable.approx hf n) x‖) atTop (𝓝 0)\n⊢ Tendsto (fun n => min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖) • ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 0)\n[PROOFSTEP]\nrefine' squeeze_zero_norm (fun n => _) h_tendsto_norm\n[GOAL]\ncase pos\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 0)\nhfx0 : f x = 0\nh_tendsto_norm : Tendsto (fun n => ‖↑(StronglyMeasurable.approx hf n) x‖) atTop (𝓝 0)\nn : ℕ\n⊢ ‖min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖) • ↑(StronglyMeasurable.approx hf n) x‖ ≤\n    ‖↑(StronglyMeasurable.approx hf n) x‖\n[PROOFSTEP]\ncalc\n  ‖min 1 (c / ‖hf.approx n x‖) • hf.approx n x‖ = ‖min 1 (c / ‖hf.approx n x‖)‖ * ‖hf.approx n x‖ := norm_smul _ _\n  _ ≤ ‖(1 : ℝ)‖ * ‖hf.approx n x‖ :=\n    by\n    refine' mul_le_mul_of_nonneg_right _ (norm_nonneg _)\n    rw [norm_one, Real.norm_of_nonneg]\n    · exact min_le_left _ _\n    · exact le_min zero_le_one (div_nonneg ((norm_nonneg _).trans hfx) (norm_nonneg _))\n  _ = ‖hf.approx n x‖ := by rw [norm_one, one_mul]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 0)\nhfx0 : f x = 0\nh_tendsto_norm : Tendsto (fun n => ‖↑(StronglyMeasurable.approx hf n) x‖) atTop (𝓝 0)\nn : ℕ\n⊢ ‖min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖)‖ * ‖↑(StronglyMeasurable.approx hf n) x‖ ≤\n    ‖1‖ * ‖↑(StronglyMeasurable.approx hf n) x‖\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_right _ (norm_nonneg _)\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 0)\nhfx0 : f x = 0\nh_tendsto_norm : Tendsto (fun n => ‖↑(StronglyMeasurable.approx hf n) x‖) atTop (𝓝 0)\nn : ℕ\n⊢ ‖min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖)‖ ≤ ‖1‖\n[PROOFSTEP]\nrw [norm_one, Real.norm_of_nonneg]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 0)\nhfx0 : f x = 0\nh_tendsto_norm : Tendsto (fun n => ‖↑(StronglyMeasurable.approx hf n) x‖) atTop (𝓝 0)\nn : ℕ\n⊢ min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖) ≤ 1\n[PROOFSTEP]\nexact min_le_left _ _\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 0)\nhfx0 : f x = 0\nh_tendsto_norm : Tendsto (fun n => ‖↑(StronglyMeasurable.approx hf n) x‖) atTop (𝓝 0)\nn : ℕ\n⊢ 0 ≤ min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖)\n[PROOFSTEP]\nexact le_min zero_le_one (div_nonneg ((norm_nonneg _).trans hfx) (norm_nonneg _))\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 0)\nhfx0 : f x = 0\nh_tendsto_norm : Tendsto (fun n => ‖↑(StronglyMeasurable.approx hf n) x‖) atTop (𝓝 0)\nn : ℕ\n⊢ ‖1‖ * ‖↑(StronglyMeasurable.approx hf n) x‖ = ‖↑(StronglyMeasurable.approx hf n) x‖\n[PROOFSTEP]\nrw [norm_one, one_mul]\n[GOAL]\ncase neg\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\nhfx0 : ¬‖f x‖ = 0\n⊢ Tendsto (fun n => min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖) • ↑(StronglyMeasurable.approx hf n) x) atTop\n    (𝓝 (f x))\n[PROOFSTEP]\nrw [← one_smul ℝ (f x)]\n[GOAL]\ncase neg\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\nhfx0 : ¬‖f x‖ = 0\n⊢ Tendsto (fun n => min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖) • ↑(StronglyMeasurable.approx hf n) x) atTop\n    (𝓝 (1 • f x))\n[PROOFSTEP]\nrefine' Tendsto.smul _ h_tendsto\n[GOAL]\ncase neg\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\nhfx0 : ¬‖f x‖ = 0\n⊢ Tendsto (fun n => min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖)) atTop (𝓝 1)\n[PROOFSTEP]\nhave : min 1 (c / ‖f x‖) = 1 :=\n  by\n  rw [min_eq_left_iff, one_le_div (lt_of_le_of_ne (norm_nonneg _) (Ne.symm hfx0))]\n  exact hfx\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\nhfx0 : ¬‖f x‖ = 0\n⊢ min 1 (c / ‖f x‖) = 1\n[PROOFSTEP]\nrw [min_eq_left_iff, one_le_div (lt_of_le_of_ne (norm_nonneg _) (Ne.symm hfx0))]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\nhfx0 : ¬‖f x‖ = 0\n⊢ ‖f x‖ ≤ c\n[PROOFSTEP]\nexact hfx\n[GOAL]\ncase neg\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\nhfx0 : ¬‖f x‖ = 0\nthis : min 1 (c / ‖f x‖) = 1\n⊢ Tendsto (fun n => min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖)) atTop (𝓝 1)\n[PROOFSTEP]\nnth_rw 2 [this.symm]\n[GOAL]\ncase neg\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\nhfx0 : ¬‖f x‖ = 0\nthis : min 1 (c / ‖f x‖) = 1\n⊢ Tendsto (fun n => min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖)) atTop (𝓝 (min 1 (c / ‖f x‖)))\n[PROOFSTEP]\nrefine' Tendsto.min tendsto_const_nhds _\n[GOAL]\ncase neg\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nhf : StronglyMeasurable f\nc : ℝ\nx : α\nhfx : ‖f x‖ ≤ c\nh_tendsto : Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\nhfx0 : ¬‖f x‖ = 0\nthis : min 1 (c / ‖f x‖) = 1\n⊢ Tendsto (fun n => c / ‖↑(StronglyMeasurable.approx hf n) x‖) atTop (𝓝 (c / ‖f x‖))\n[PROOFSTEP]\nrefine' Tendsto.div tendsto_const_nhds h_tendsto.norm hfx0\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm m0 : MeasurableSpace α\nμ : Measure α\nhf : StronglyMeasurable f\nc : ℝ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\n⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun n => ↑(approxBounded hf c n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nfilter_upwards [hf_bound] with x hfx using tendsto_approxBounded_of_norm_le hf hfx\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nc : ℝ\nhf : StronglyMeasurable f\nhc : 0 ≤ c\nn : ℕ\nx : α\n⊢ ‖↑(approxBounded hf c n) x‖ ≤ c\n[PROOFSTEP]\nsimp only [StronglyMeasurable.approxBounded, SimpleFunc.coe_map, Function.comp_apply]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nc : ℝ\nhf : StronglyMeasurable f\nhc : 0 ≤ c\nn : ℕ\nx : α\n⊢ ‖min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖) • ↑(StronglyMeasurable.approx hf n) x‖ ≤ c\n[PROOFSTEP]\nrefine' (norm_smul_le _ _).trans _\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nc : ℝ\nhf : StronglyMeasurable f\nhc : 0 ≤ c\nn : ℕ\nx : α\n⊢ ‖min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖)‖ * ‖↑(StronglyMeasurable.approx hf n) x‖ ≤ c\n[PROOFSTEP]\nby_cases h0 : ‖hf.approx n x‖ = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nc : ℝ\nhf : StronglyMeasurable f\nhc : 0 ≤ c\nn : ℕ\nx : α\nh0 : ‖↑(StronglyMeasurable.approx hf n) x‖ = 0\n⊢ ‖min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖)‖ * ‖↑(StronglyMeasurable.approx hf n) x‖ ≤ c\n[PROOFSTEP]\nsimp only [h0, _root_.div_zero, min_eq_right, zero_le_one, norm_zero, mul_zero]\n[GOAL]\ncase pos\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nc : ℝ\nhf : StronglyMeasurable f\nhc : 0 ≤ c\nn : ℕ\nx : α\nh0 : ‖↑(StronglyMeasurable.approx hf n) x‖ = 0\n⊢ 0 ≤ c\n[PROOFSTEP]\nexact hc\n[GOAL]\ncase neg\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nc : ℝ\nhf : StronglyMeasurable f\nhc : 0 ≤ c\nn : ℕ\nx : α\nh0 : ¬‖↑(StronglyMeasurable.approx hf n) x‖ = 0\n⊢ ‖min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖)‖ * ‖↑(StronglyMeasurable.approx hf n) x‖ ≤ c\n[PROOFSTEP]\ncases' le_total ‖hf.approx n x‖ c with h h\n[GOAL]\ncase neg.inl\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nc : ℝ\nhf : StronglyMeasurable f\nhc : 0 ≤ c\nn : ℕ\nx : α\nh0 : ¬‖↑(StronglyMeasurable.approx hf n) x‖ = 0\nh : ‖↑(StronglyMeasurable.approx hf n) x‖ ≤ c\n⊢ ‖min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖)‖ * ‖↑(StronglyMeasurable.approx hf n) x‖ ≤ c\n[PROOFSTEP]\nrw [min_eq_left _]\n[GOAL]\ncase neg.inl\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nc : ℝ\nhf : StronglyMeasurable f\nhc : 0 ≤ c\nn : ℕ\nx : α\nh0 : ¬‖↑(StronglyMeasurable.approx hf n) x‖ = 0\nh : ‖↑(StronglyMeasurable.approx hf n) x‖ ≤ c\n⊢ ‖1‖ * ‖↑(StronglyMeasurable.approx hf n) x‖ ≤ c\n[PROOFSTEP]\nsimpa only [norm_one, one_mul] using h\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nc : ℝ\nhf : StronglyMeasurable f\nhc : 0 ≤ c\nn : ℕ\nx : α\nh0 : ¬‖↑(StronglyMeasurable.approx hf n) x‖ = 0\nh : ‖↑(StronglyMeasurable.approx hf n) x‖ ≤ c\n⊢ 1 ≤ c / ‖↑(StronglyMeasurable.approx hf n) x‖\n[PROOFSTEP]\nrwa [one_le_div (lt_of_le_of_ne (norm_nonneg _) (Ne.symm h0))]\n[GOAL]\ncase neg.inr\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nc : ℝ\nhf : StronglyMeasurable f\nhc : 0 ≤ c\nn : ℕ\nx : α\nh0 : ¬‖↑(StronglyMeasurable.approx hf n) x‖ = 0\nh : c ≤ ‖↑(StronglyMeasurable.approx hf n) x‖\n⊢ ‖min 1 (c / ‖↑(StronglyMeasurable.approx hf n) x‖)‖ * ‖↑(StronglyMeasurable.approx hf n) x‖ ≤ c\n[PROOFSTEP]\nrw [min_eq_right _]\n[GOAL]\ncase neg.inr\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nc : ℝ\nhf : StronglyMeasurable f\nhc : 0 ≤ c\nn : ℕ\nx : α\nh0 : ¬‖↑(StronglyMeasurable.approx hf n) x‖ = 0\nh : c ≤ ‖↑(StronglyMeasurable.approx hf n) x‖\n⊢ ‖c / ‖↑(StronglyMeasurable.approx hf n) x‖‖ * ‖↑(StronglyMeasurable.approx hf n) x‖ ≤ c\n[PROOFSTEP]\nrw [norm_div, norm_norm, mul_comm, mul_div, div_eq_mul_inv, mul_comm, ← mul_assoc, inv_mul_cancel h0, one_mul,\n  Real.norm_of_nonneg hc]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β✝\ninst✝² : TopologicalSpace β✝\nβ : Type u_5\nf : α → β\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : NormedSpace ℝ β\nm : MeasurableSpace α\nc : ℝ\nhf : StronglyMeasurable f\nhc : 0 ≤ c\nn : ℕ\nx : α\nh0 : ¬‖↑(StronglyMeasurable.approx hf n) x‖ = 0\nh : c ≤ ‖↑(StronglyMeasurable.approx hf n) x‖\n⊢ c / ‖↑(StronglyMeasurable.approx hf n) x‖ ≤ 1\n[PROOFSTEP]\nrwa [div_le_one (lt_of_le_of_ne (norm_nonneg _) (Ne.symm h0))]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\n⊢ StronglyMeasurable f ↔ ∃ c, f = fun x => c\n[PROOFSTEP]\ncases' isEmpty_or_nonempty α with hα hα\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : IsEmpty α\n⊢ StronglyMeasurable f ↔ ∃ c, f = fun x => c\n[PROOFSTEP]\nsimp only [@Subsingleton.stronglyMeasurable' _ _ ⊥ _ _ f, eq_iff_true_of_subsingleton, exists_const]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\n⊢ StronglyMeasurable f ↔ ∃ c, f = fun x => c\n[PROOFSTEP]\nrefine' ⟨fun hf => _, fun hf_eq => _⟩\n[GOAL]\ncase inr.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\n⊢ ∃ c, f = fun x => c\n[PROOFSTEP]\nrefine' ⟨f hα.some, _⟩\n[GOAL]\ncase inr.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\n⊢ f = fun x => f (Nonempty.some hα)\n[PROOFSTEP]\nlet fs := hf.approx\n[GOAL]\ncase inr.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\nfs : ℕ → α →ₛ β := StronglyMeasurable.approx hf\n⊢ f = fun x => f (Nonempty.some hα)\n[PROOFSTEP]\nhave h_fs_tendsto : ∀ x, Tendsto (fun n => fs n x) atTop (𝓝 (f x)) := hf.tendsto_approx\n[GOAL]\ncase inr.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\nfs : ℕ → α →ₛ β := StronglyMeasurable.approx hf\nh_fs_tendsto : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n⊢ f = fun x => f (Nonempty.some hα)\n[PROOFSTEP]\nhave : ∀ n, ∃ c, ∀ x, fs n x = c := fun n => SimpleFunc.simpleFunc_bot (fs n)\n[GOAL]\ncase inr.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\nfs : ℕ → α →ₛ β := StronglyMeasurable.approx hf\nh_fs_tendsto : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nthis : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c\n⊢ f = fun x => f (Nonempty.some hα)\n[PROOFSTEP]\nlet cs n := (this n).choose\n[GOAL]\ncase inr.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\nfs : ℕ → α →ₛ β := StronglyMeasurable.approx hf\nh_fs_tendsto : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nthis : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c\ncs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)\n⊢ f = fun x => f (Nonempty.some hα)\n[PROOFSTEP]\nhave h_cs_eq : ∀ n, ⇑(fs n) = fun _ => cs n := fun n => funext (this n).choose_spec\n[GOAL]\ncase inr.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\nfs : ℕ → α →ₛ β := StronglyMeasurable.approx hf\nh_fs_tendsto : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nthis : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c\ncs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)\nh_cs_eq : ∀ (n : ℕ), ↑(fs n) = fun x => cs n\n⊢ f = fun x => f (Nonempty.some hα)\n[PROOFSTEP]\nconv at h_fs_tendsto => enter [x, 1, n]; rw [h_cs_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\nfs : ℕ → α →ₛ β := StronglyMeasurable.approx hf\nh_fs_tendsto : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nthis : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c\ncs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)\nh_cs_eq : ∀ (n : ℕ), ↑(fs n) = fun x => cs n\n| ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nenter [x, 1, n]; rw [h_cs_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\nfs : ℕ → α →ₛ β := StronglyMeasurable.approx hf\nh_fs_tendsto : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nthis : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c\ncs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)\nh_cs_eq : ∀ (n : ℕ), ↑(fs n) = fun x => cs n\n| ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nenter [x, 1, n]; rw [h_cs_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\nfs : ℕ → α →ₛ β := StronglyMeasurable.approx hf\nh_fs_tendsto : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nthis : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c\ncs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)\nh_cs_eq : ∀ (n : ℕ), ↑(fs n) = fun x => cs n\n| ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nenter [x, 1, n]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\nfs : ℕ → α →ₛ β := StronglyMeasurable.approx hf\nh_fs_tendsto : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nthis : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c\ncs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)\nh_cs_eq : ∀ (n : ℕ), ↑(fs n) = fun x => cs n\nx : α\nn : ℕ\n| ↑(fs n) x\n[PROOFSTEP]\nrw [h_cs_eq]\n[GOAL]\ncase inr.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\nfs : ℕ → α →ₛ β := StronglyMeasurable.approx hf\nthis : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c\ncs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)\nh_fs_tendsto : ∀ (x : α), Tendsto (fun n => (fun x => cs n) x) atTop (𝓝 (f x))\nh_cs_eq : ∀ (n : ℕ), ↑(fs n) = fun x => cs n\n⊢ f = fun x => f (Nonempty.some hα)\n[PROOFSTEP]\nhave h_tendsto : Tendsto cs atTop (𝓝 (f hα.some)) := h_fs_tendsto hα.some\n[GOAL]\ncase inr.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\nfs : ℕ → α →ₛ β := StronglyMeasurable.approx hf\nthis : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c\ncs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)\nh_fs_tendsto : ∀ (x : α), Tendsto (fun n => (fun x => cs n) x) atTop (𝓝 (f x))\nh_cs_eq : ∀ (n : ℕ), ↑(fs n) = fun x => cs n\nh_tendsto : Tendsto cs atTop (𝓝 (f (Nonempty.some hα)))\n⊢ f = fun x => f (Nonempty.some hα)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase inr.refine'_1.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf : StronglyMeasurable f\nfs : ℕ → α →ₛ β := StronglyMeasurable.approx hf\nthis : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c\ncs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)\nh_fs_tendsto : ∀ (x : α), Tendsto (fun n => (fun x => cs n) x) atTop (𝓝 (f x))\nh_cs_eq : ∀ (n : ℕ), ↑(fs n) = fun x => cs n\nh_tendsto : Tendsto cs atTop (𝓝 (f (Nonempty.some hα)))\nx : α\n⊢ f x = f (Nonempty.some hα)\n[PROOFSTEP]\nexact tendsto_nhds_unique (h_fs_tendsto x) h_tendsto\n[GOAL]\ncase inr.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nhf_eq : ∃ c, f = fun x => c\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := hf_eq\n[GOAL]\ncase inr.refine'_2.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\ng : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Nonempty β\ninst✝ : T2Space β\nhα : Nonempty α\nc : β\n⊢ StronglyMeasurable fun x => c\n[PROOFSTEP]\nexact stronglyMeasurable_const\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ : SigmaFinite (Measure.restrict μ t)\n⊢ FinStronglyMeasurable f μ\n[PROOFSTEP]\nhaveI : SigmaFinite (μ.restrict t) := htμ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\n⊢ FinStronglyMeasurable f μ\n[PROOFSTEP]\nlet S := spanningSets (μ.restrict t)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\n⊢ FinStronglyMeasurable f μ\n[PROOFSTEP]\nhave hS_meas : ∀ n, MeasurableSet (S n) := measurable_spanningSets (μ.restrict t)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\n⊢ FinStronglyMeasurable f μ\n[PROOFSTEP]\nlet f_approx := hf_meas.approx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\n⊢ FinStronglyMeasurable f μ\n[PROOFSTEP]\nlet fs n := SimpleFunc.restrict (f_approx n) (S n ∩ t)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\n⊢ FinStronglyMeasurable f μ\n[PROOFSTEP]\nhave h_fs_t_compl : ∀ n, ∀ x, x ∉ t → fs n x = 0 := by\n  intro n x hxt\n  rw [SimpleFunc.restrict_apply _ ((hS_meas n).inter ht)]\n  refine' Set.indicator_of_not_mem _ _\n  simp [hxt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\n⊢ ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\n[PROOFSTEP]\nintro n x hxt\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nn : ℕ\nx : α\nhxt : ¬x ∈ t\n⊢ ↑(fs n) x = 0\n[PROOFSTEP]\nrw [SimpleFunc.restrict_apply _ ((hS_meas n).inter ht)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nn : ℕ\nx : α\nhxt : ¬x ∈ t\n⊢ indicator (S n ∩ t) (↑(f_approx n)) x = 0\n[PROOFSTEP]\nrefine' Set.indicator_of_not_mem _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nn : ℕ\nx : α\nhxt : ¬x ∈ t\n⊢ ¬x ∈ S n ∩ t\n[PROOFSTEP]\nsimp [hxt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\n⊢ FinStronglyMeasurable f μ\n[PROOFSTEP]\nrefine' ⟨fs, _, fun x => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\n⊢ ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\n[PROOFSTEP]\nsimp_rw [SimpleFunc.support_eq]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\n⊢ ∀ (n : ℕ),\n    ↑↑μ\n        (⋃ (y : β) (_ :\n          y ∈\n            Finset.filter (fun y => y ≠ 0)\n              (SimpleFunc.range\n                (SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n)\n                  (spanningSets (Measure.restrict μ t) n ∩ t)))),\n          ↑(SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t)) ⁻¹'\n            {y}) <\n      ⊤\n[PROOFSTEP]\nrefine' fun n => (measure_biUnion_finset_le _ _).trans_lt _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nn : ℕ\n⊢ ∑ p in\n      Finset.filter (fun y => y ≠ 0)\n        (SimpleFunc.range\n          (SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t))),\n      ↑↑μ\n        (↑(SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t)) ⁻¹'\n          {p}) <\n    ⊤\n[PROOFSTEP]\nrefine' ENNReal.sum_lt_top_iff.mpr fun y hy => _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nn : ℕ\ny : β\nhy :\n  y ∈\n    Finset.filter (fun y => y ≠ 0)\n      (SimpleFunc.range\n        (SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t)))\n⊢ ↑↑μ\n      (↑(SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t)) ⁻¹'\n        {y}) <\n    ⊤\n[PROOFSTEP]\nrw [SimpleFunc.restrict_preimage_singleton _ ((hS_meas n).inter ht)]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nn : ℕ\ny : β\nhy :\n  y ∈\n    Finset.filter (fun y => y ≠ 0)\n      (SimpleFunc.range\n        (SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t)))\n⊢ ↑↑μ (S n ∩ t ∩ ↑(StronglyMeasurable.approx hf_meas n) ⁻¹' {y}) < ⊤\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nn : ℕ\ny : β\nhy :\n  y ∈\n    Finset.filter (fun y => y ≠ 0)\n      (SimpleFunc.range\n        (SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t)))\n⊢ y ≠ 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nn : ℕ\ny : β\nhy :\n  y ∈\n    Finset.filter (fun y => y ≠ 0)\n      (SimpleFunc.range\n        (SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t)))\n⊢ y ≠ 0\n[PROOFSTEP]\nletI : (y : β) → Decidable (y = 0) := fun y => Classical.propDecidable _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this✝ : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nn : ℕ\ny : β\nhy :\n  y ∈\n    Finset.filter (fun y => y ≠ 0)\n      (SimpleFunc.range\n        (SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t)))\nthis : (y : β) → Decidable (y = 0) := fun y => Classical.propDecidable (y = 0)\n⊢ y ≠ 0\n[PROOFSTEP]\nrw [Finset.mem_filter] at hy \n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this✝ : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nn : ℕ\ny : β\nhy :\n  y ∈\n      SimpleFunc.range\n        (SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t)) ∧\n    y ≠ 0\nthis : (y : β) → Decidable (y = 0) := fun y => Classical.propDecidable (y = 0)\n⊢ y ≠ 0\n[PROOFSTEP]\nexact hy.2\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nn : ℕ\ny : β\nhy :\n  y ∈\n    Finset.filter (fun y => y ≠ 0)\n      (SimpleFunc.range\n        (SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t)))\n⊢ ↑↑μ (S n ∩ t ∩ ↑(StronglyMeasurable.approx hf_meas n) ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nrefine' (measure_mono (Set.inter_subset_left _ _)).trans_lt _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nn : ℕ\ny : β\nhy :\n  y ∈\n    Finset.filter (fun y => y ≠ 0)\n      (SimpleFunc.range\n        (SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t)))\n⊢ ↑↑μ (S n ∩ t) < ⊤\n[PROOFSTEP]\nhave h_lt_top := measure_spanningSets_lt_top (μ.restrict t) n\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nn : ℕ\ny : β\nhy :\n  y ∈\n    Finset.filter (fun y => y ≠ 0)\n      (SimpleFunc.range\n        (SimpleFunc.restrict (StronglyMeasurable.approx hf_meas n) (spanningSets (Measure.restrict μ t) n ∩ t)))\nh_lt_top : ↑↑(Measure.restrict μ t) (spanningSets (Measure.restrict μ t) n) < ⊤\n⊢ ↑↑μ (S n ∩ t) < ⊤\n[PROOFSTEP]\nrwa [Measure.restrict_apply' ht] at h_lt_top \n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\n⊢ Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nby_cases hxt : x ∈ t\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\n⊢ Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : ¬x ∈ t\n⊢ Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : ¬x ∈ t\n⊢ Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nrw [funext fun n => h_fs_t_compl n x hxt, hft_zero x hxt]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : ¬x ∈ t\n⊢ Tendsto (fun n => 0) atTop (𝓝 0)\n[PROOFSTEP]\nexact tendsto_const_nhds\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\n⊢ Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nhave h : Tendsto (fun n => (f_approx n) x) atTop (𝓝 (f x)) := hf_meas.tendsto_approx x\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : Tendsto (fun n => ↑(f_approx n) x) atTop (𝓝 (f x))\n⊢ Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nobtain ⟨n₁, hn₁⟩ : ∃ n, ∀ m, n ≤ m → fs m x = f_approx m x :=\n  by\n  obtain ⟨n, hn⟩ : ∃ n, ∀ m, n ≤ m → x ∈ S m ∩ t :=\n    by\n    rsuffices ⟨n, hn⟩ : ∃ n, ∀ m, n ≤ m → x ∈ S m\n    · exact ⟨n, fun m hnm => Set.mem_inter (hn m hnm) hxt⟩\n    rsuffices ⟨n, hn⟩ : ∃ n, x ∈ S n\n    · exact ⟨n, fun m hnm => monotone_spanningSets (μ.restrict t) hnm hn⟩\n    rw [← Set.mem_iUnion, iUnion_spanningSets (μ.restrict t)]\n    trivial\n  refine' ⟨n, fun m hnm => _⟩\n  simp_rw [SimpleFunc.restrict_apply _ ((hS_meas m).inter ht), Set.indicator_of_mem (hn m hnm)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : Tendsto (fun n => ↑(f_approx n) x) atTop (𝓝 (f x))\n⊢ ∃ n, ∀ (m_1 : ℕ), n ≤ m_1 → ↑(fs m_1) x = ↑(f_approx m_1) x\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n, ∀ m, n ≤ m → x ∈ S m ∩ t :=\n  by\n  rsuffices ⟨n, hn⟩ : ∃ n, ∀ m, n ≤ m → x ∈ S m\n  · exact ⟨n, fun m hnm => Set.mem_inter (hn m hnm) hxt⟩\n  rsuffices ⟨n, hn⟩ : ∃ n, x ∈ S n\n  · exact ⟨n, fun m hnm => monotone_spanningSets (μ.restrict t) hnm hn⟩\n  rw [← Set.mem_iUnion, iUnion_spanningSets (μ.restrict t)]\n  trivial\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : Tendsto (fun n => ↑(f_approx n) x) atTop (𝓝 (f x))\n⊢ ∃ n, ∀ (m : ℕ), n ≤ m → x ∈ S m ∩ t\n[PROOFSTEP]\nrsuffices ⟨n, hn⟩ : ∃ n, ∀ m, n ≤ m → x ∈ S m\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : Tendsto (fun n => ↑(f_approx n) x) atTop (𝓝 (f x))\nn : ℕ\nhn : ∀ (m : ℕ), n ≤ m → x ∈ S m\n⊢ ∃ n, ∀ (m : ℕ), n ≤ m → x ∈ S m ∩ t\n[PROOFSTEP]\nexact ⟨n, fun m hnm => Set.mem_inter (hn m hnm) hxt⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : Tendsto (fun n => ↑(f_approx n) x) atTop (𝓝 (f x))\n⊢ ∃ n, ∀ (m : ℕ), n ≤ m → x ∈ S m\n[PROOFSTEP]\nrsuffices ⟨n, hn⟩ : ∃ n, x ∈ S n\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : Tendsto (fun n => ↑(f_approx n) x) atTop (𝓝 (f x))\nn : ℕ\nhn : x ∈ S n\n⊢ ∃ n, ∀ (m : ℕ), n ≤ m → x ∈ S m\n[PROOFSTEP]\nexact ⟨n, fun m hnm => monotone_spanningSets (μ.restrict t) hnm hn⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : Tendsto (fun n => ↑(f_approx n) x) atTop (𝓝 (f x))\n⊢ ∃ n, x ∈ S n\n[PROOFSTEP]\nrw [← Set.mem_iUnion, iUnion_spanningSets (μ.restrict t)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : Tendsto (fun n => ↑(f_approx n) x) atTop (𝓝 (f x))\n⊢ x ∈ univ\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : Tendsto (fun n => ↑(f_approx n) x) atTop (𝓝 (f x))\nn : ℕ\nhn : ∀ (m : ℕ), n ≤ m → x ∈ S m ∩ t\n⊢ ∃ n, ∀ (m_1 : ℕ), n ≤ m_1 → ↑(fs m_1) x = ↑(f_approx m_1) x\n[PROOFSTEP]\nrefine' ⟨n, fun m hnm => _⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm✝ : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : Tendsto (fun n => ↑(f_approx n) x) atTop (𝓝 (f x))\nn : ℕ\nhn : ∀ (m : ℕ), n ≤ m → x ∈ S m ∩ t\nm : ℕ\nhnm : n ≤ m\n⊢ ↑(fs m) x = ↑(f_approx m) x\n[PROOFSTEP]\nsimp_rw [SimpleFunc.restrict_apply _ ((hS_meas m).inter ht), Set.indicator_of_mem (hn m hnm)]\n[GOAL]\ncase pos.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : Tendsto (fun n => ↑(f_approx n) x) atTop (𝓝 (f x))\nn₁ : ℕ\nhn₁ : ∀ (m_1 : ℕ), n₁ ≤ m_1 → ↑(fs m_1) x = ↑(f_approx m_1) x\n⊢ Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nrw [tendsto_atTop'] at h ⊢\n[GOAL]\ncase pos.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : ∀ (s : Set β), s ∈ 𝓝 (f x) → ∃ a, ∀ (b : ℕ), b ≥ a → ↑(f_approx b) x ∈ s\nn₁ : ℕ\nhn₁ : ∀ (m_1 : ℕ), n₁ ≤ m_1 → ↑(fs m_1) x = ↑(f_approx m_1) x\n⊢ ∀ (s : Set β), s ∈ 𝓝 (f x) → ∃ a, ∀ (b : ℕ), b ≥ a → ↑(fs b) x ∈ s\n[PROOFSTEP]\nintro s hs\n[GOAL]\ncase pos.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : ∀ (s : Set β), s ∈ 𝓝 (f x) → ∃ a, ∀ (b : ℕ), b ≥ a → ↑(f_approx b) x ∈ s\nn₁ : ℕ\nhn₁ : ∀ (m_1 : ℕ), n₁ ≤ m_1 → ↑(fs m_1) x = ↑(f_approx m_1) x\ns : Set β\nhs : s ∈ 𝓝 (f x)\n⊢ ∃ a, ∀ (b : ℕ), b ≥ a → ↑(fs b) x ∈ s\n[PROOFSTEP]\nobtain ⟨n₂, hn₂⟩ := h s hs\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : ∀ (s : Set β), s ∈ 𝓝 (f x) → ∃ a, ∀ (b : ℕ), b ≥ a → ↑(f_approx b) x ∈ s\nn₁ : ℕ\nhn₁ : ∀ (m_1 : ℕ), n₁ ≤ m_1 → ↑(fs m_1) x = ↑(f_approx m_1) x\ns : Set β\nhs : s ∈ 𝓝 (f x)\nn₂ : ℕ\nhn₂ : ∀ (b : ℕ), b ≥ n₂ → ↑(f_approx b) x ∈ s\n⊢ ∃ a, ∀ (b : ℕ), b ≥ a → ↑(fs b) x ∈ s\n[PROOFSTEP]\nrefine' ⟨max n₁ n₂, fun m hm => _⟩\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm✝ : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : ∀ (s : Set β), s ∈ 𝓝 (f x) → ∃ a, ∀ (b : ℕ), b ≥ a → ↑(f_approx b) x ∈ s\nn₁ : ℕ\nhn₁ : ∀ (m : ℕ), n₁ ≤ m → ↑(fs m) x = ↑(f_approx m) x\ns : Set β\nhs : s ∈ 𝓝 (f x)\nn₂ : ℕ\nhn₂ : ∀ (b : ℕ), b ≥ n₂ → ↑(f_approx b) x ∈ s\nm : ℕ\nhm : m ≥ max n₁ n₂\n⊢ ↑(fs m) x ∈ s\n[PROOFSTEP]\nrw [hn₁ m ((le_max_left _ _).trans hm.le)]\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\nm✝ : MeasurableSpace α\nμ : Measure α\nhf_meas : StronglyMeasurable f\nt : Set α\nht : MeasurableSet t\nhft_zero : ∀ (x : α), x ∈ tᶜ → f x = 0\nhtμ this : SigmaFinite (Measure.restrict μ t)\nS : ℕ → Set α := spanningSets (Measure.restrict μ t)\nhS_meas : ∀ (n : ℕ), MeasurableSet (S n)\nf_approx : ℕ → α →ₛ β := StronglyMeasurable.approx hf_meas\nfs : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (f_approx n) (S n ∩ t)\nh_fs_t_compl : ∀ (n : ℕ) (x : α), ¬x ∈ t → ↑(fs n) x = 0\nx : α\nhxt : x ∈ t\nh : ∀ (s : Set β), s ∈ 𝓝 (f x) → ∃ a, ∀ (b : ℕ), b ≥ a → ↑(f_approx b) x ∈ s\nn₁ : ℕ\nhn₁ : ∀ (m : ℕ), n₁ ≤ m → ↑(fs m) x = ↑(f_approx m) x\ns : Set β\nhs : s ∈ 𝓝 (f x)\nn₂ : ℕ\nhn₂ : ∀ (b : ℕ), b ≥ n₂ → ↑(f_approx b) x ∈ s\nm : ℕ\nhm : m ≥ max n₁ n₂\n⊢ ↑(f_approx m) x ∈ s\n[PROOFSTEP]\nexact hn₂ m ((le_max_right _ _).trans hm.le)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Zero β\nm0 : MeasurableSpace α\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite μ\n⊢ ∀ (x : α), x ∈ univᶜ → f x = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : Zero β\nm0 : MeasurableSpace α\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite μ\n⊢ SigmaFinite (Measure.restrict μ univ)\n[PROOFSTEP]\nrwa [Measure.restrict_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝² : One β\ninst✝¹ : TopologicalSpace β\ninst✝ : MetrizableSpace β\nhf : StronglyMeasurable f\n⊢ MeasurableSet (mulSupport f)\n[PROOFSTEP]\nborelize β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝² : One β\ninst✝¹ : TopologicalSpace β\ninst✝ : MetrizableSpace β\nhf : StronglyMeasurable f\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ MeasurableSet (mulSupport f)\n[PROOFSTEP]\nexact measurableSet_mulSupport hf.measurable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm m' : MeasurableSpace α\ninst✝ : TopologicalSpace β\nhf : StronglyMeasurable f\nh_mono : m' ≤ m\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nlet f_approx : ℕ → @SimpleFunc α m β := fun n =>\n  @SimpleFunc.mk α m β (hf.approx n) (fun x => h_mono _ (SimpleFunc.measurableSet_fiber' _ x))\n    (SimpleFunc.finite_range (hf.approx n))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm m' : MeasurableSpace α\ninst✝ : TopologicalSpace β\nhf : StronglyMeasurable f\nh_mono : m' ≤ m\nf_approx : ℕ → α →ₛ β :=\n  fun n =>\n    { toFun := ↑(StronglyMeasurable.approx hf n),\n      measurableSet_fiber' := (_ : ∀ (x : β), MeasurableSet (↑(StronglyMeasurable.approx hf n) ⁻¹' {x})),\n      finite_range' := (_ : Set.Finite (range ↑(StronglyMeasurable.approx hf n))) }\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nexact ⟨f_approx, hf.tendsto_approx⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α → β\ng : α → γ\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\n⊢ StronglyMeasurable fun x => (f x, g x)\n[PROOFSTEP]\nrefine' ⟨fun n => SimpleFunc.pair (hf.approx n) (hg.approx n), fun x => _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α → β\ng : α → γ\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nx : α\n⊢ Tendsto (fun n => ↑((fun n => SimpleFunc.pair (StronglyMeasurable.approx hf n) (StronglyMeasurable.approx hg n)) n) x)\n    atTop (𝓝 ((fun x => (f x, g x)) x))\n[PROOFSTEP]\nrw [nhds_prod_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : α → β\ng : α → γ\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nx : α\n⊢ Tendsto (fun n => ↑((fun n => SimpleFunc.pair (StronglyMeasurable.approx hf n) (StronglyMeasurable.approx hg n)) n) x)\n    atTop (𝓝 (f x) ×ˢ 𝓝 (g x))\n[PROOFSTEP]\nexact Tendsto.prod_mk (hf.tendsto_approx x) (hg.tendsto_approx x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹⁰ : Countable ι\nf g : α → β\nM : Type u_5\nG : Type u_6\nG₀ : Type u_7\ninst✝⁹ : TopologicalSpace β\ninst✝⁸ : Monoid M\ninst✝⁷ : MulAction M β\ninst✝⁶ : ContinuousConstSMul M β\ninst✝⁵ : Group G\ninst✝⁴ : MulAction G β\ninst✝³ : ContinuousConstSMul G β\ninst✝² : GroupWithZero G₀\ninst✝¹ : MulAction G₀ β\ninst✝ : ContinuousConstSMul G₀ β\nm : MeasurableSpace α\nc : G\nh : StronglyMeasurable fun x => c • f x\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nsimpa only [inv_smul_smul] using h.const_smul' c⁻¹\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\nM : Type u_5\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nm : MeasurableSpace α\nl : List (α → M)\nhl : ∀ (f : α → M), f ∈ l → StronglyMeasurable f\n⊢ StronglyMeasurable (List.prod l)\n[PROOFSTEP]\ninduction' l with f l ihl\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\nM : Type u_5\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nm : MeasurableSpace α\nl : List (α → M)\nhl✝ : ∀ (f : α → M), f ∈ l → StronglyMeasurable f\nhl : ∀ (f : α → M), f ∈ [] → StronglyMeasurable f\n⊢ StronglyMeasurable (List.prod [])\n[PROOFSTEP]\nexact stronglyMeasurable_one\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β\nM : Type u_5\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nm : MeasurableSpace α\nl✝ : List (α → M)\nhl✝ : ∀ (f : α → M), f ∈ l✝ → StronglyMeasurable f\nf : α → M\nl : List (α → M)\nihl : (∀ (f : α → M), f ∈ l → StronglyMeasurable f) → StronglyMeasurable (List.prod l)\nhl : ∀ (f_1 : α → M), f_1 ∈ f :: l → StronglyMeasurable f_1\n⊢ StronglyMeasurable (List.prod (f :: l))\n[PROOFSTEP]\nrw [List.forall_mem_cons] at hl \n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β\nM : Type u_5\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nm : MeasurableSpace α\nl✝ : List (α → M)\nhl✝ : ∀ (f : α → M), f ∈ l✝ → StronglyMeasurable f\nf : α → M\nl : List (α → M)\nihl : (∀ (f : α → M), f ∈ l → StronglyMeasurable f) → StronglyMeasurable (List.prod l)\nhl : StronglyMeasurable f ∧ ∀ (x : α → M), x ∈ l → StronglyMeasurable x\n⊢ StronglyMeasurable (List.prod (f :: l))\n[PROOFSTEP]\nrw [List.prod_cons]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf✝ g : α → β\nM : Type u_5\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nm : MeasurableSpace α\nl✝ : List (α → M)\nhl✝ : ∀ (f : α → M), f ∈ l✝ → StronglyMeasurable f\nf : α → M\nl : List (α → M)\nihl : (∀ (f : α → M), f ∈ l → StronglyMeasurable f) → StronglyMeasurable (List.prod l)\nhl : StronglyMeasurable f ∧ ∀ (x : α → M), x ∈ l → StronglyMeasurable x\n⊢ StronglyMeasurable (f * List.prod l)\n[PROOFSTEP]\nexact hl.1.mul (ihl hl.2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\nM : Type u_5\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nm : MeasurableSpace α\nl : List (α → M)\nhl : ∀ (f : α → M), f ∈ l → StronglyMeasurable f\n⊢ StronglyMeasurable fun x => List.prod (List.map (fun f => f x) l)\n[PROOFSTEP]\nsimpa only [← Pi.list_prod_apply] using l.stronglyMeasurable_prod' hl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\nM : Type u_5\ninst✝² : CommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nm : MeasurableSpace α\nl : Multiset (α → M)\nhl : ∀ (f : α → M), f ∈ l → StronglyMeasurable f\n⊢ StronglyMeasurable (Multiset.prod l)\n[PROOFSTEP]\nrcases l with ⟨l⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\nM : Type u_5\ninst✝² : CommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nm : MeasurableSpace α\nl✝ : Multiset (α → M)\nl : List (α → M)\nhl : ∀ (f : α → M), f ∈ Quot.mk Setoid.r l → StronglyMeasurable f\n⊢ StronglyMeasurable (Multiset.prod (Quot.mk Setoid.r l))\n[PROOFSTEP]\nsimpa using l.stronglyMeasurable_prod' (by simpa using hl)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\nM : Type u_5\ninst✝² : CommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nm : MeasurableSpace α\nl✝ : Multiset (α → M)\nl : List (α → M)\nhl : ∀ (f : α → M), f ∈ Quot.mk Setoid.r l → StronglyMeasurable f\n⊢ ∀ (f : α → M), f ∈ l → StronglyMeasurable f\n[PROOFSTEP]\nsimpa using hl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nf g : α → β\nM : Type u_5\ninst✝² : CommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nm : MeasurableSpace α\ns : Multiset (α → M)\nhs : ∀ (f : α → M), f ∈ s → StronglyMeasurable f\n⊢ StronglyMeasurable fun x => Multiset.prod (Multiset.map (fun f => f x) s)\n[PROOFSTEP]\nsimpa only [← Pi.multiset_prod_apply] using s.stronglyMeasurable_prod' hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝³ : Countable ι✝\nf✝ g : α → β\nM : Type u_5\ninst✝² : CommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nm : MeasurableSpace α\nι : Type u_6\nf : ι → α → M\ns : Finset ι\nhf : ∀ (i : ι), i ∈ s → StronglyMeasurable (f i)\n⊢ StronglyMeasurable fun a => ∏ i in s, f i a\n[PROOFSTEP]\nsimpa only [← Finset.prod_apply] using s.stronglyMeasurable_prod' hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nhf : StronglyMeasurable f\n⊢ IsSeparable (range f)\n[PROOFSTEP]\nhave : IsSeparable (closure (⋃ n, range (hf.approx n))) :=\n  (isSeparable_iUnion fun n => (SimpleFunc.finite_range (hf.approx n)).isSeparable).closure\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nhf : StronglyMeasurable f\nthis : IsSeparable (closure (⋃ (n : ℕ), range ↑(StronglyMeasurable.approx hf n)))\n⊢ IsSeparable (range f)\n[PROOFSTEP]\napply this.mono\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nhf : StronglyMeasurable f\nthis : IsSeparable (closure (⋃ (n : ℕ), range ↑(StronglyMeasurable.approx hf n)))\n⊢ range f ⊆ closure (⋃ (n : ℕ), range ↑(StronglyMeasurable.approx hf n))\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nhf : StronglyMeasurable f\nthis : IsSeparable (closure (⋃ (n : ℕ), range ↑(StronglyMeasurable.approx hf n)))\nx : α\n⊢ f x ∈ closure (⋃ (n : ℕ), range ↑(StronglyMeasurable.approx hf n))\n[PROOFSTEP]\napply mem_closure_of_tendsto (hf.tendsto_approx x)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nhf : StronglyMeasurable f\nthis : IsSeparable (closure (⋃ (n : ℕ), range ↑(StronglyMeasurable.approx hf n)))\nx : α\n⊢ ∀ᶠ (x_1 : ℕ) in atTop, ↑(StronglyMeasurable.approx hf x_1) x ∈ ⋃ (n : ℕ), range ↑(StronglyMeasurable.approx hf n)\n[PROOFSTEP]\nrefine eventually_of_forall fun n => ?_\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nhf : StronglyMeasurable f\nthis : IsSeparable (closure (⋃ (n : ℕ), range ↑(StronglyMeasurable.approx hf n)))\nx : α\nn : ℕ\n⊢ ↑(StronglyMeasurable.approx hf n) x ∈ ⋃ (n : ℕ), range ↑(StronglyMeasurable.approx hf n)\n[PROOFSTEP]\napply mem_iUnion_of_mem n\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nhf : StronglyMeasurable f\nthis : IsSeparable (closure (⋃ (n : ℕ), range ↑(StronglyMeasurable.approx hf n)))\nx : α\nn : ℕ\n⊢ ↑(StronglyMeasurable.approx hf n) x ∈ range ↑(StronglyMeasurable.approx hf n)\n[PROOFSTEP]\nexact mem_range_self _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf g : α → β\nmα : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : SecondCountableTopology β\ninst✝ : OpensMeasurableSpace β\nhf : Measurable f\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nletI := pseudoMetrizableSpacePseudoMetric β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf g : α → β\nmα : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : SecondCountableTopology β\ninst✝ : OpensMeasurableSpace β\nhf : Measurable f\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nrcases isEmpty_or_nonempty β with ⟨⟩\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf g : α → β\nmα : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : SecondCountableTopology β\ninst✝ : OpensMeasurableSpace β\nhf : Measurable f\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\nh✝ : IsEmpty β\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nskip\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf g : α → β\nmα : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : SecondCountableTopology β\ninst✝ : OpensMeasurableSpace β\nhf : Measurable f\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\nh✝ : Nonempty β\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nskip\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf g : α → β\nmα : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : SecondCountableTopology β\ninst✝ : OpensMeasurableSpace β\nhf : Measurable f\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\nh✝ : IsEmpty β\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nexact Subsingleton.stronglyMeasurable f\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf g : α → β\nmα : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : SecondCountableTopology β\ninst✝ : OpensMeasurableSpace β\nhf : Measurable f\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\nh✝ : Nonempty β\n⊢ StronglyMeasurable f\n[PROOFSTEP]\ninhabit β\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf g : α → β\nmα : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : SecondCountableTopology β\ninst✝ : OpensMeasurableSpace β\nhf : Measurable f\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\nh✝ : Nonempty β\ninhabited_h : Inhabited β\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nexact\n  ⟨SimpleFunc.approxOn f hf Set.univ default (Set.mem_univ _), fun x =>\n    SimpleFunc.tendsto_approxOn hf (Set.mem_univ _) (by rw [closure_univ]; simp)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf g : α → β\nmα : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : SecondCountableTopology β\ninst✝ : OpensMeasurableSpace β\nhf : Measurable f\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\nh✝ : Nonempty β\ninhabited_h : Inhabited β\nx : α\n⊢ f x ∈ closure univ\n[PROOFSTEP]\nrw [closure_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf g : α → β\nmα : MeasurableSpace α\ninst✝⁴ : MeasurableSpace β\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : SecondCountableTopology β\ninst✝ : OpensMeasurableSpace β\nhf : Measurable f\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\nh✝ : Nonempty β\ninhabited_h : Inhabited β\nx : α\n⊢ f x ∈ univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\n⊢ StronglyMeasurable f ↔ Measurable f ∧ IsSeparable (range f)\n[PROOFSTEP]\nrefine' ⟨fun H => ⟨H.measurable, H.isSeparable_range⟩, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\n⊢ Measurable f ∧ IsSeparable (range f) → StronglyMeasurable f\n[PROOFSTEP]\nrintro ⟨H, H'⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nletI := pseudoMetrizableSpacePseudoMetric β\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nlet g := codRestrict f (closure (range f)) fun x => subset_closure (mem_range_self x)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nhave fg : f = ((↑) : closure (range f) → β) ∘ g := by\n  ext x\n  rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\n⊢ f = Subtype.val ∘ g\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nx : α\n⊢ f x = (Subtype.val ∘ g) x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nfg : f = Subtype.val ∘ g\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nhave T : MeasurableEmbedding ((↑) : closure (range f) → β) :=\n  by\n  apply ClosedEmbedding.measurableEmbedding\n  exact closedEmbedding_subtype_val isClosed_closure\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nfg : f = Subtype.val ∘ g\n⊢ MeasurableEmbedding Subtype.val\n[PROOFSTEP]\napply ClosedEmbedding.measurableEmbedding\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nfg : f = Subtype.val ∘ g\n⊢ ClosedEmbedding Subtype.val\n[PROOFSTEP]\nexact closedEmbedding_subtype_val isClosed_closure\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nfg : f = Subtype.val ∘ g\nT : MeasurableEmbedding Subtype.val\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nhave g_meas : Measurable g := by\n  rw [fg] at H \n  exact T.measurable_comp_iff.1 H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nfg : f = Subtype.val ∘ g\nT : MeasurableEmbedding Subtype.val\n⊢ Measurable g\n[PROOFSTEP]\nrw [fg] at H \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nH : Measurable (Subtype.val ∘ g)\nfg : f = Subtype.val ∘ g\nT : MeasurableEmbedding Subtype.val\n⊢ Measurable g\n[PROOFSTEP]\nexact T.measurable_comp_iff.1 H\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nfg : f = Subtype.val ∘ g\nT : MeasurableEmbedding Subtype.val\ng_meas : Measurable g\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nhave : SecondCountableTopology (closure (range f)) :=\n  by\n  suffices SeparableSpace (closure (range f)) by exact UniformSpace.secondCountable_of_separable _\n  exact (IsSeparable.closure H').separableSpace\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nfg : f = Subtype.val ∘ g\nT : MeasurableEmbedding Subtype.val\ng_meas : Measurable g\n⊢ SecondCountableTopology ↑(closure (range f))\n[PROOFSTEP]\nsuffices SeparableSpace (closure (range f)) by exact UniformSpace.secondCountable_of_separable _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nfg : f = Subtype.val ∘ g\nT : MeasurableEmbedding Subtype.val\ng_meas : Measurable g\nthis : SeparableSpace ↑(closure (range f))\n⊢ SecondCountableTopology ↑(closure (range f))\n[PROOFSTEP]\nexact UniformSpace.secondCountable_of_separable _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nfg : f = Subtype.val ∘ g\nT : MeasurableEmbedding Subtype.val\ng_meas : Measurable g\n⊢ SeparableSpace ↑(closure (range f))\n[PROOFSTEP]\nexact (IsSeparable.closure H').separableSpace\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nfg : f = Subtype.val ∘ g\nT : MeasurableEmbedding Subtype.val\ng_meas : Measurable g\nthis : SecondCountableTopology ↑(closure (range f))\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nhave g_smeas : StronglyMeasurable g := Measurable.stronglyMeasurable g_meas\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nfg : f = Subtype.val ∘ g\nT : MeasurableEmbedding Subtype.val\ng_meas : Measurable g\nthis : SecondCountableTopology ↑(closure (range f))\ng_smeas : StronglyMeasurable g\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nrw [fg]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : Measurable f\nH' : IsSeparable (range f)\nthis✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\ng : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))\nfg : f = Subtype.val ∘ g\nT : MeasurableEmbedding Subtype.val\ng_meas : Measurable g\nthis : SecondCountableTopology ↑(closure (range f))\ng_smeas : StronglyMeasurable g\n⊢ StronglyMeasurable (Subtype.val ∘ g)\n[PROOFSTEP]\nexact continuous_subtype_val.comp_stronglyMeasurable g_smeas\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf✝ g : α → β\ninst✝⁴ : MeasurableSpace α\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nh : SecondCountableTopologyEither α β\nf : α → β\nhf : Continuous f\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nborelize β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf✝ g : α → β\ninst✝⁴ : MeasurableSpace α\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nh : SecondCountableTopologyEither α β\nf : α → β\nhf : Continuous f\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ StronglyMeasurable f\n[PROOFSTEP]\ncases h.out\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf✝ g : α → β\ninst✝⁴ : MeasurableSpace α\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nh : SecondCountableTopologyEither α β\nf : α → β\nhf : Continuous f\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh✝ : SecondCountableTopology α\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nrw [stronglyMeasurable_iff_measurable_separable]\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf✝ g : α → β\ninst✝⁴ : MeasurableSpace α\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nh : SecondCountableTopologyEither α β\nf : α → β\nhf : Continuous f\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh✝ : SecondCountableTopology α\n⊢ Measurable f ∧ IsSeparable (range f)\n[PROOFSTEP]\nrefine' ⟨hf.measurable, _⟩\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf✝ g : α → β\ninst✝⁴ : MeasurableSpace α\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nh : SecondCountableTopologyEither α β\nf : α → β\nhf : Continuous f\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh✝ : SecondCountableTopology α\n⊢ IsSeparable (range f)\n[PROOFSTEP]\nrw [← image_univ]\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf✝ g : α → β\ninst✝⁴ : MeasurableSpace α\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nh : SecondCountableTopologyEither α β\nf : α → β\nhf : Continuous f\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh✝ : SecondCountableTopology α\n⊢ IsSeparable (f '' univ)\n[PROOFSTEP]\nexact (isSeparable_of_separableSpace univ).image hf\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nf✝ g : α → β\ninst✝⁴ : MeasurableSpace α\ninst✝³ : TopologicalSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PseudoMetrizableSpace β\nh : SecondCountableTopologyEither α β\nf : α → β\nhf : Continuous f\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh✝ : SecondCountableTopology β\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nexact hf.measurable.stronglyMeasurable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁸ : Countable ι\nf✝ g : α → β\ninst✝⁷ : MeasurableSpace α\ninst✝⁶ : TopologicalSpace α\ninst✝⁵ : OpensMeasurableSpace α\ninst✝⁴ : MeasurableSpace β\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : BorelSpace β\ninst✝ : Zero β\nf : α → β\nhf : Continuous f\nh'f : HasCompactSupport f\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nletI : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁸ : Countable ι\nf✝ g : α → β\ninst✝⁷ : MeasurableSpace α\ninst✝⁶ : TopologicalSpace α\ninst✝⁵ : OpensMeasurableSpace α\ninst✝⁴ : MeasurableSpace β\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : BorelSpace β\ninst✝ : Zero β\nf : α → β\nhf : Continuous f\nh'f : HasCompactSupport f\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nrw [stronglyMeasurable_iff_measurable_separable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁸ : Countable ι\nf✝ g : α → β\ninst✝⁷ : MeasurableSpace α\ninst✝⁶ : TopologicalSpace α\ninst✝⁵ : OpensMeasurableSpace α\ninst✝⁴ : MeasurableSpace β\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : BorelSpace β\ninst✝ : Zero β\nf : α → β\nhf : Continuous f\nh'f : HasCompactSupport f\nthis : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β\n⊢ Measurable f ∧ IsSeparable (range f)\n[PROOFSTEP]\nrefine ⟨hf.measurable, IsCompact.isSeparable (s := range f) (h'f.isCompact_range hf)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\n⊢ (StronglyMeasurable fun x => g (f x)) ↔ StronglyMeasurable f\n[PROOFSTEP]\nletI := pseudoMetrizableSpacePseudoMetric γ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\n⊢ (StronglyMeasurable fun x => g (f x)) ↔ StronglyMeasurable f\n[PROOFSTEP]\nborelize β γ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\n⊢ (StronglyMeasurable fun x => g (f x)) ↔ StronglyMeasurable f\n[PROOFSTEP]\nrefine'\n  ⟨fun H => stronglyMeasurable_iff_measurable_separable.2 ⟨_, _⟩, fun H => hg.continuous.comp_stronglyMeasurable H⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : StronglyMeasurable fun x => g (f x)\n⊢ Measurable f\n[PROOFSTEP]\nlet G : β → range g := codRestrict g (range g) mem_range_self\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : StronglyMeasurable fun x => g (f x)\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\n⊢ Measurable f\n[PROOFSTEP]\nhave hG : ClosedEmbedding G :=\n  { hg.codRestrict _ _ with\n    closed_range := by\n      convert isClosed_univ (α := ↥(range g))\n      apply eq_univ_of_forall\n      rintro ⟨-, ⟨x, rfl⟩⟩\n      exact mem_range_self x }\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : StronglyMeasurable fun x => g (f x)\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\nsrc✝ : _root_.Embedding (codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)) :=\n  Embedding.codRestrict hg (range g) mem_range_self\n⊢ IsClosed (range G)\n[PROOFSTEP]\nconvert isClosed_univ (α := ↥(range g))\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : StronglyMeasurable fun x => g (f x)\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\nsrc✝ : _root_.Embedding (codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)) :=\n  Embedding.codRestrict hg (range g) mem_range_self\n⊢ range G = univ\n[PROOFSTEP]\napply eq_univ_of_forall\n[GOAL]\ncase h.e'_3.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : StronglyMeasurable fun x => g (f x)\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\nsrc✝ : _root_.Embedding (codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)) :=\n  Embedding.codRestrict hg (range g) mem_range_self\n⊢ ∀ (x : ↑(range g)), x ∈ range G\n[PROOFSTEP]\nrintro ⟨-, ⟨x, rfl⟩⟩\n[GOAL]\ncase h.e'_3.a.mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : StronglyMeasurable fun x => g (f x)\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\nsrc✝ : _root_.Embedding (codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)) :=\n  Embedding.codRestrict hg (range g) mem_range_self\nx : β\n⊢ { val := g x, property := (_ : ∃ y, g y = g x) } ∈ range G\n[PROOFSTEP]\nexact mem_range_self x\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : StronglyMeasurable fun x => g (f x)\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\nhG : ClosedEmbedding G\n⊢ Measurable f\n[PROOFSTEP]\nhave : Measurable (G ∘ f) := Measurable.subtype_mk H.measurable\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis✝⁴ : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : StronglyMeasurable fun x => g (f x)\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\nhG : ClosedEmbedding G\nthis : Measurable (G ∘ f)\n⊢ Measurable f\n[PROOFSTEP]\nexact hG.measurableEmbedding.measurable_comp_iff.1 this\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : StronglyMeasurable fun x => g (f x)\n⊢ IsSeparable (range f)\n[PROOFSTEP]\nhave : IsSeparable (g ⁻¹' range (g ∘ f)) := hg.isSeparable_preimage H.isSeparable_range\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis✝⁴ : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : StronglyMeasurable fun x => g (f x)\nthis : IsSeparable (g ⁻¹' range (g ∘ f))\n⊢ IsSeparable (range f)\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis✝⁴ : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : StronglyMeasurable fun x => g (f x)\nthis : IsSeparable (g ⁻¹' range (g ∘ f))\n⊢ range f = g ⁻¹' range (g ∘ f)\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis✝⁴ : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : StronglyMeasurable fun x => g (f x)\nthis : IsSeparable (g ⁻¹' range (g ∘ f))\nx : β\n⊢ x ∈ range f ↔ x ∈ g ⁻¹' range (g ∘ f)\n[PROOFSTEP]\nsimp [hg.inj.eq_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁴ : Countable ι✝\nf✝ g✝ : α → β\nι : Type u_5\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nlim : Tendsto f u (𝓝 g)\n⊢ StronglyMeasurable g\n[PROOFSTEP]\nborelize β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁴ : Countable ι✝\nf✝ g✝ : α → β\nι : Type u_5\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nlim : Tendsto f u (𝓝 g)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ StronglyMeasurable g\n[PROOFSTEP]\nrefine' stronglyMeasurable_iff_measurable_separable.2 ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁴ : Countable ι✝\nf✝ g✝ : α → β\nι : Type u_5\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nlim : Tendsto f u (𝓝 g)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ Measurable g\n[PROOFSTEP]\nexact measurable_of_tendsto_metrizable' u (fun i => (hf i).measurable) lim\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁴ : Countable ι✝\nf✝ g✝ : α → β\nι : Type u_5\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nlim : Tendsto f u (𝓝 g)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ IsSeparable (range g)\n[PROOFSTEP]\nrcases u.exists_seq_tendsto with ⟨v, hv⟩\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁴ : Countable ι✝\nf✝ g✝ : α → β\nι : Type u_5\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nlim : Tendsto f u (𝓝 g)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\n⊢ IsSeparable (range g)\n[PROOFSTEP]\nhave : IsSeparable (closure (⋃ i, range (f (v i)))) :=\n  (isSeparable_iUnion fun i => (hf (v i)).isSeparable_range).closure\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁴ : Countable ι✝\nf✝ g✝ : α → β\nι : Type u_5\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nlim : Tendsto f u (𝓝 g)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nthis : IsSeparable (closure (⋃ (i : ℕ), range (f (v i))))\n⊢ IsSeparable (range g)\n[PROOFSTEP]\napply this.mono\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁴ : Countable ι✝\nf✝ g✝ : α → β\nι : Type u_5\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nlim : Tendsto f u (𝓝 g)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nthis : IsSeparable (closure (⋃ (i : ℕ), range (f (v i))))\n⊢ range g ⊆ closure (⋃ (i : ℕ), range (f (v i)))\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁴ : Countable ι✝\nf✝ g✝ : α → β\nι : Type u_5\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nlim : Tendsto f u (𝓝 g)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nthis : IsSeparable (closure (⋃ (i : ℕ), range (f (v i))))\nx : α\n⊢ g x ∈ closure (⋃ (i : ℕ), range (f (v i)))\n[PROOFSTEP]\nrw [tendsto_pi_nhds] at lim \n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁴ : Countable ι✝\nf✝ g✝ : α → β\nι : Type u_5\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nlim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nthis : IsSeparable (closure (⋃ (i : ℕ), range (f (v i))))\nx : α\n⊢ g x ∈ closure (⋃ (i : ℕ), range (f (v i)))\n[PROOFSTEP]\napply mem_closure_of_tendsto ((lim x).comp hv)\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁴ : Countable ι✝\nf✝ g✝ : α → β\nι : Type u_5\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nlim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nthis : IsSeparable (closure (⋃ (i : ℕ), range (f (v i))))\nx : α\n⊢ ∀ᶠ (x_1 : ℕ) in atTop, ((fun i => f i x) ∘ v) x_1 ∈ ⋃ (i : ℕ), range (f (v i))\n[PROOFSTEP]\nrefine eventually_of_forall fun n => ?_\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁴ : Countable ι✝\nf✝ g✝ : α → β\nι : Type u_5\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nlim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nthis : IsSeparable (closure (⋃ (i : ℕ), range (f (v i))))\nx : α\nn : ℕ\n⊢ ((fun i => f i x) ∘ v) n ∈ ⋃ (i : ℕ), range (f (v i))\n[PROOFSTEP]\napply mem_iUnion_of_mem n\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁴ : Countable ι✝\nf✝ g✝ : α → β\nι : Type u_5\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), StronglyMeasurable (f i)\nlim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nthis : IsSeparable (closure (⋃ (i : ℕ), range (f (v i))))\nx : α\nn : ℕ\n⊢ ((fun i => f i x) ∘ v) n ∈ range (f (v n))\n[PROOFSTEP]\nexact mem_range_self _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\ns : Set α\nx✝ : DecidablePred fun x => x ∈ s\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\n⊢ StronglyMeasurable (piecewise s f g)\n[PROOFSTEP]\nrefine' ⟨fun n => SimpleFunc.piecewise s hs (hf.approx n) (hg.approx n), fun x => _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\ns : Set α\nx✝ : DecidablePred fun x => x ∈ s\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nx : α\n⊢ Tendsto\n    (fun n =>\n      ↑((fun n => SimpleFunc.piecewise s hs (StronglyMeasurable.approx hf n) (StronglyMeasurable.approx hg n)) n) x)\n    atTop (𝓝 (piecewise s f g x))\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\ns : Set α\nx✝ : DecidablePred fun x => x ∈ s\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nx : α\nhx : x ∈ s\n⊢ Tendsto\n    (fun n =>\n      ↑((fun n => SimpleFunc.piecewise s hs (StronglyMeasurable.approx hf n) (StronglyMeasurable.approx hg n)) n) x)\n    atTop (𝓝 (piecewise s f g x))\n[PROOFSTEP]\nsimpa [@Set.piecewise_eq_of_mem _ _ _ _ _ (fun _ => Classical.propDecidable _) _ hx, hx] using hf.tendsto_approx x\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\ns : Set α\nx✝ : DecidablePred fun x => x ∈ s\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nx : α\nhx : ¬x ∈ s\n⊢ Tendsto\n    (fun n =>\n      ↑((fun n => SimpleFunc.piecewise s hs (StronglyMeasurable.approx hf n) (StronglyMeasurable.approx hg n)) n) x)\n    atTop (𝓝 (piecewise s f g x))\n[PROOFSTEP]\nsimpa [@Set.piecewise_eq_of_not_mem _ _ _ _ _ (fun _ => Classical.propDecidable _) _ hx, hx] using hg.tendsto_approx x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nclassical\nlet f : ℕ → α →ₛ β := fun n =>\n  { toFun := fun x => if hx : x ∈ s then hc.approx n ⟨x, hx⟩ else hd.approx n ⟨x, by simpa [hx] using h (mem_univ x)⟩\n    measurableSet_fiber' := by\n      intro x\n      convert\n        (hs.subtype_image ((hc.approx n).measurableSet_fiber x)).union\n          ((ht.subtype_image ((hd.approx n).measurableSet_fiber x)).diff hs)\n      ext1 y\n      simp only [mem_union, mem_preimage, mem_singleton_iff, mem_image, SetCoe.exists, Subtype.coe_mk, exists_and_right,\n        exists_eq_right, mem_diff]\n      by_cases hy : y ∈ s\n      · rw [dif_pos hy]\n        simp only [hy, exists_true_left, not_true, and_false_iff, or_false_iff]\n      · rw [dif_neg hy]\n        have A : y ∈ t := by simpa [hy] using h (mem_univ y)\n        simp only [A, hy, false_or_iff, IsEmpty.exists_iff, not_false_iff, and_true_iff, exists_true_left]\n    finite_range' := by\n      apply ((hc.approx n).finite_range.union (hd.approx n).finite_range).subset\n      rintro - ⟨y, rfl⟩\n      dsimp\n      by_cases hy : y ∈ s\n      · left\n        rw [dif_pos hy]\n        exact mem_range_self _\n      · right\n        rw [dif_neg hy]\n        exact mem_range_self _ }\nrefine' ⟨f, fun y => _⟩\nby_cases hy : y ∈ s\n· convert hc.tendsto_approx ⟨y, hy⟩ using 1\n  ext1 n\n  simp only [dif_pos hy, SimpleFunc.apply_mk]\n· have A : y ∈ t := by simpa [hy] using h (mem_univ y)\n  convert hd.tendsto_approx ⟨y, A⟩ using 1\n  ext1 n\n  simp only [dif_neg hy, SimpleFunc.apply_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nlet f : ℕ → α →ₛ β := fun n =>\n  { toFun := fun x => if hx : x ∈ s then hc.approx n ⟨x, hx⟩ else hd.approx n ⟨x, by simpa [hx] using h (mem_univ x)⟩\n    measurableSet_fiber' := by\n      intro x\n      convert\n        (hs.subtype_image ((hc.approx n).measurableSet_fiber x)).union\n          ((ht.subtype_image ((hd.approx n).measurableSet_fiber x)).diff hs)\n      ext1 y\n      simp only [mem_union, mem_preimage, mem_singleton_iff, mem_image, SetCoe.exists, Subtype.coe_mk, exists_and_right,\n        exists_eq_right, mem_diff]\n      by_cases hy : y ∈ s\n      · rw [dif_pos hy]\n        simp only [hy, exists_true_left, not_true, and_false_iff, or_false_iff]\n      · rw [dif_neg hy]\n        have A : y ∈ t := by simpa [hy] using h (mem_univ y)\n        simp only [A, hy, false_or_iff, IsEmpty.exists_iff, not_false_iff, and_true_iff, exists_true_left]\n    finite_range' := by\n      apply ((hc.approx n).finite_range.union (hd.approx n).finite_range).subset\n      rintro - ⟨y, rfl⟩\n      dsimp\n      by_cases hy : y ∈ s\n      · left\n        rw [dif_pos hy]\n        exact mem_range_self _\n      · right\n        rw [dif_neg hy]\n        exact mem_range_self _ }\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\nx : α\nhx : ¬x ∈ s\n⊢ x ∈ t\n[PROOFSTEP]\nsimpa [hx] using h (mem_univ x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\n⊢ ∀ (x : β),\n    MeasurableSet\n      ((fun x =>\n          if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n          else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n        {x})\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\nx : β\n⊢ MeasurableSet\n    ((fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n      {x})\n[PROOFSTEP]\nconvert\n  (hs.subtype_image ((hc.approx n).measurableSet_fiber x)).union\n    ((ht.subtype_image ((hd.approx n).measurableSet_fiber x)).diff hs)\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\nx : β\n⊢ (fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n      {x} =\n    Subtype.val '' (↑(StronglyMeasurable.approx hc n) ⁻¹' {x}) ∪\n      Subtype.val '' (↑(StronglyMeasurable.approx hd n) ⁻¹' {x}) \\ s\n[PROOFSTEP]\next1 y\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\nx : β\ny : α\n⊢ y ∈\n      (fun x =>\n          if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n          else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n        {x} ↔\n    y ∈\n      Subtype.val '' (↑(StronglyMeasurable.approx hc n) ⁻¹' {x}) ∪\n        Subtype.val '' (↑(StronglyMeasurable.approx hd n) ⁻¹' {x}) \\ s\n[PROOFSTEP]\nsimp only [mem_union, mem_preimage, mem_singleton_iff, mem_image, SetCoe.exists, Subtype.coe_mk, exists_and_right,\n  exists_eq_right, mem_diff]\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\nx : β\ny : α\n⊢ (if hx : y ∈ s then ↑(StronglyMeasurable.approx hc n) { val := y, property := hx }\n      else ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) }) =\n      x ↔\n    (∃ x_1, ↑(StronglyMeasurable.approx hc n) { val := y, property := (_ : y ∈ s) } = x) ∨\n      (∃ x_1, ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) } = x) ∧ ¬y ∈ s\n[PROOFSTEP]\nby_cases hy : y ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\nx : β\ny : α\nhy : y ∈ s\n⊢ (if hx : y ∈ s then ↑(StronglyMeasurable.approx hc n) { val := y, property := hx }\n      else ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) }) =\n      x ↔\n    (∃ x_1, ↑(StronglyMeasurable.approx hc n) { val := y, property := (_ : y ∈ s) } = x) ∨\n      (∃ x_1, ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) } = x) ∧ ¬y ∈ s\n[PROOFSTEP]\nrw [dif_pos hy]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\nx : β\ny : α\nhy : y ∈ s\n⊢ ↑(StronglyMeasurable.approx hc n) { val := y, property := hy } = x ↔\n    (∃ x_1, ↑(StronglyMeasurable.approx hc n) { val := y, property := (_ : y ∈ s) } = x) ∨\n      (∃ x_1, ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) } = x) ∧ ¬y ∈ s\n[PROOFSTEP]\nsimp only [hy, exists_true_left, not_true, and_false_iff, or_false_iff]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\nx : β\ny : α\nhy : ¬y ∈ s\n⊢ (if hx : y ∈ s then ↑(StronglyMeasurable.approx hc n) { val := y, property := hx }\n      else ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) }) =\n      x ↔\n    (∃ x_1, ↑(StronglyMeasurable.approx hc n) { val := y, property := (_ : y ∈ s) } = x) ∨\n      (∃ x_1, ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) } = x) ∧ ¬y ∈ s\n[PROOFSTEP]\nrw [dif_neg hy]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\nx : β\ny : α\nhy : ¬y ∈ s\n⊢ ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) } = x ↔\n    (∃ x_1, ↑(StronglyMeasurable.approx hc n) { val := y, property := (_ : y ∈ s) } = x) ∨\n      (∃ x_1, ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) } = x) ∧ ¬y ∈ s\n[PROOFSTEP]\nhave A : y ∈ t := by simpa [hy] using h (mem_univ y)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\nx : β\ny : α\nhy : ¬y ∈ s\n⊢ y ∈ t\n[PROOFSTEP]\nsimpa [hy] using h (mem_univ y)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\nx : β\ny : α\nhy : ¬y ∈ s\nA : y ∈ t\n⊢ ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) } = x ↔\n    (∃ x_1, ↑(StronglyMeasurable.approx hc n) { val := y, property := (_ : y ∈ s) } = x) ∨\n      (∃ x_1, ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) } = x) ∧ ¬y ∈ s\n[PROOFSTEP]\nsimp only [A, hy, false_or_iff, IsEmpty.exists_iff, not_false_iff, and_true_iff, exists_true_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\n⊢ Set.Finite\n    (range fun x =>\n      if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n      else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) })\n[PROOFSTEP]\napply ((hc.approx n).finite_range.union (hd.approx n).finite_range).subset\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\n⊢ (range fun x =>\n      if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n      else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⊆\n    range ↑(StronglyMeasurable.approx hc n) ∪ range ↑(StronglyMeasurable.approx hd n)\n[PROOFSTEP]\nrintro - ⟨y, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\ny : α\n⊢ (fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) })\n      y ∈\n    range ↑(StronglyMeasurable.approx hc n) ∪ range ↑(StronglyMeasurable.approx hd n)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\ny : α\n⊢ (if hx : y ∈ s then ↑(StronglyMeasurable.approx hc n) { val := y, property := hx }\n    else ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) }) ∈\n    range ↑(StronglyMeasurable.approx hc n) ∪ range ↑(StronglyMeasurable.approx hd n)\n[PROOFSTEP]\nby_cases hy : y ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\ny : α\nhy : y ∈ s\n⊢ (if hx : y ∈ s then ↑(StronglyMeasurable.approx hc n) { val := y, property := hx }\n    else ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) }) ∈\n    range ↑(StronglyMeasurable.approx hc n) ∪ range ↑(StronglyMeasurable.approx hd n)\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\ny : α\nhy : y ∈ s\n⊢ (if hx : y ∈ s then ↑(StronglyMeasurable.approx hc n) { val := y, property := hx }\n    else ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) }) ∈\n    range ↑(StronglyMeasurable.approx hc n)\n[PROOFSTEP]\nrw [dif_pos hy]\n[GOAL]\ncase pos.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\ny : α\nhy : y ∈ s\n⊢ ↑(StronglyMeasurable.approx hc n) { val := y, property := hy } ∈ range ↑(StronglyMeasurable.approx hc n)\n[PROOFSTEP]\nexact mem_range_self _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\ny : α\nhy : ¬y ∈ s\n⊢ (if hx : y ∈ s then ↑(StronglyMeasurable.approx hc n) { val := y, property := hx }\n    else ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) }) ∈\n    range ↑(StronglyMeasurable.approx hc n) ∪ range ↑(StronglyMeasurable.approx hd n)\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\ny : α\nhy : ¬y ∈ s\n⊢ (if hx : y ∈ s then ↑(StronglyMeasurable.approx hc n) { val := y, property := hx }\n    else ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) }) ∈\n    range ↑(StronglyMeasurable.approx hd n)\n[PROOFSTEP]\nrw [dif_neg hy]\n[GOAL]\ncase neg.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f ↑a\nhd : StronglyMeasurable fun a => f ↑a\nn : ℕ\ny : α\nhy : ¬y ∈ s\n⊢ ↑(StronglyMeasurable.approx hd n) { val := y, property := (_ : y ∈ t) } ∈ range ↑(StronglyMeasurable.approx hd n)\n[PROOFSTEP]\nexact mem_range_self _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝¹ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf✝ : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f✝ ↑a\nhd : StronglyMeasurable fun a => f✝ ↑a\nf : ℕ → α →ₛ β :=\n  fun n =>\n    {\n      toFun := fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) },\n      measurableSet_fiber' :=\n        (_ :\n          ∀ (x : β),\n            MeasurableSet\n              ((fun x =>\n                  if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n                  else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n                {x})),\n      finite_range' :=\n        (_ :\n          Set.Finite\n            (range fun x =>\n              if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n              else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) })) }\n⊢ StronglyMeasurable f✝\n[PROOFSTEP]\nrefine' ⟨f, fun y => _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝¹ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf✝ : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f✝ ↑a\nhd : StronglyMeasurable fun a => f✝ ↑a\nf : ℕ → α →ₛ β :=\n  fun n =>\n    {\n      toFun := fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) },\n      measurableSet_fiber' :=\n        (_ :\n          ∀ (x : β),\n            MeasurableSet\n              ((fun x =>\n                  if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n                  else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n                {x})),\n      finite_range' :=\n        (_ :\n          Set.Finite\n            (range fun x =>\n              if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n              else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) })) }\ny : α\n⊢ Tendsto (fun n => ↑(f n) y) atTop (𝓝 (f✝ y))\n[PROOFSTEP]\nby_cases hy : y ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝¹ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf✝ : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f✝ ↑a\nhd : StronglyMeasurable fun a => f✝ ↑a\nf : ℕ → α →ₛ β :=\n  fun n =>\n    {\n      toFun := fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) },\n      measurableSet_fiber' :=\n        (_ :\n          ∀ (x : β),\n            MeasurableSet\n              ((fun x =>\n                  if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n                  else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n                {x})),\n      finite_range' :=\n        (_ :\n          Set.Finite\n            (range fun x =>\n              if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n              else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) })) }\ny : α\nhy : y ∈ s\n⊢ Tendsto (fun n => ↑(f n) y) atTop (𝓝 (f✝ y))\n[PROOFSTEP]\nconvert hc.tendsto_approx ⟨y, hy⟩ using 1\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝¹ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf✝ : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f✝ ↑a\nhd : StronglyMeasurable fun a => f✝ ↑a\nf : ℕ → α →ₛ β :=\n  fun n =>\n    {\n      toFun := fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) },\n      measurableSet_fiber' :=\n        (_ :\n          ∀ (x : β),\n            MeasurableSet\n              ((fun x =>\n                  if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n                  else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n                {x})),\n      finite_range' :=\n        (_ :\n          Set.Finite\n            (range fun x =>\n              if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n              else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) })) }\ny : α\nhy : y ∈ s\n⊢ (fun n => ↑(f n) y) = fun n => ↑(StronglyMeasurable.approx hc n) { val := y, property := hy }\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝¹ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf✝ : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f✝ ↑a\nhd : StronglyMeasurable fun a => f✝ ↑a\nf : ℕ → α →ₛ β :=\n  fun n =>\n    {\n      toFun := fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) },\n      measurableSet_fiber' :=\n        (_ :\n          ∀ (x : β),\n            MeasurableSet\n              ((fun x =>\n                  if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n                  else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n                {x})),\n      finite_range' :=\n        (_ :\n          Set.Finite\n            (range fun x =>\n              if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n              else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) })) }\ny : α\nhy : y ∈ s\nn : ℕ\n⊢ ↑(f n) y = ↑(StronglyMeasurable.approx hc n) { val := y, property := hy }\n[PROOFSTEP]\nsimp only [dif_pos hy, SimpleFunc.apply_mk]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝¹ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf✝ : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f✝ ↑a\nhd : StronglyMeasurable fun a => f✝ ↑a\nf : ℕ → α →ₛ β :=\n  fun n =>\n    {\n      toFun := fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) },\n      measurableSet_fiber' :=\n        (_ :\n          ∀ (x : β),\n            MeasurableSet\n              ((fun x =>\n                  if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n                  else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n                {x})),\n      finite_range' :=\n        (_ :\n          Set.Finite\n            (range fun x =>\n              if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n              else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) })) }\ny : α\nhy : ¬y ∈ s\n⊢ Tendsto (fun n => ↑(f n) y) atTop (𝓝 (f✝ y))\n[PROOFSTEP]\nhave A : y ∈ t := by simpa [hy] using h (mem_univ y)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝¹ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf✝ : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f✝ ↑a\nhd : StronglyMeasurable fun a => f✝ ↑a\nf : ℕ → α →ₛ β :=\n  fun n =>\n    {\n      toFun := fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) },\n      measurableSet_fiber' :=\n        (_ :\n          ∀ (x : β),\n            MeasurableSet\n              ((fun x =>\n                  if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n                  else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n                {x})),\n      finite_range' :=\n        (_ :\n          Set.Finite\n            (range fun x =>\n              if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n              else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) })) }\ny : α\nhy : ¬y ∈ s\n⊢ y ∈ t\n[PROOFSTEP]\nsimpa [hy] using h (mem_univ y)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝¹ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf✝ : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f✝ ↑a\nhd : StronglyMeasurable fun a => f✝ ↑a\nf : ℕ → α →ₛ β :=\n  fun n =>\n    {\n      toFun := fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) },\n      measurableSet_fiber' :=\n        (_ :\n          ∀ (x : β),\n            MeasurableSet\n              ((fun x =>\n                  if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n                  else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n                {x})),\n      finite_range' :=\n        (_ :\n          Set.Finite\n            (range fun x =>\n              if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n              else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) })) }\ny : α\nhy : ¬y ∈ s\nA : y ∈ t\n⊢ Tendsto (fun n => ↑(f n) y) atTop (𝓝 (f✝ y))\n[PROOFSTEP]\nconvert hd.tendsto_approx ⟨y, A⟩ using 1\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝¹ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf✝ : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f✝ ↑a\nhd : StronglyMeasurable fun a => f✝ ↑a\nf : ℕ → α →ₛ β :=\n  fun n =>\n    {\n      toFun := fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) },\n      measurableSet_fiber' :=\n        (_ :\n          ∀ (x : β),\n            MeasurableSet\n              ((fun x =>\n                  if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n                  else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n                {x})),\n      finite_range' :=\n        (_ :\n          Set.Finite\n            (range fun x =>\n              if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n              else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) })) }\ny : α\nhy : ¬y ∈ s\nA : y ∈ t\n⊢ (fun n => ↑(f n) y) = fun n => ↑(StronglyMeasurable.approx hd n) { val := y, property := A }\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝¹ g : α → β\nm : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf✝ : α → β\ns t : Set α\nhs : MeasurableSet s\nht : MeasurableSet t\nh : univ ⊆ s ∪ t\nhc : StronglyMeasurable fun a => f✝ ↑a\nhd : StronglyMeasurable fun a => f✝ ↑a\nf : ℕ → α →ₛ β :=\n  fun n =>\n    {\n      toFun := fun x =>\n        if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n        else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) },\n      measurableSet_fiber' :=\n        (_ :\n          ∀ (x : β),\n            MeasurableSet\n              ((fun x =>\n                  if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n                  else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) }) ⁻¹'\n                {x})),\n      finite_range' :=\n        (_ :\n          Set.Finite\n            (range fun x =>\n              if hx : x ∈ s then ↑(StronglyMeasurable.approx hc n) { val := x, property := hx }\n              else ↑(StronglyMeasurable.approx hd n) { val := x, property := (_ : x ∈ t) })) }\ny : α\nhy : ¬y ∈ s\nA : y ∈ t\nn : ℕ\n⊢ ↑(f n) y = ↑(StronglyMeasurable.approx hd n) { val := y, property := A }\n[PROOFSTEP]\nsimp only [dif_neg hy, SimpleFunc.apply_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g✝ f : α → β\ng : α → γ\ng' : γ → β\nmα : MeasurableSpace α\nmγ : MeasurableSpace γ\ninst✝ : TopologicalSpace β\nhg : MeasurableEmbedding g\nhf : StronglyMeasurable f\nhg' : StronglyMeasurable g'\n⊢ StronglyMeasurable (Function.extend g f g')\n[PROOFSTEP]\nrefine' ⟨fun n => SimpleFunc.extend (hf.approx n) g hg (hg'.approx n), _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g✝ f : α → β\ng : α → γ\ng' : γ → β\nmα : MeasurableSpace α\nmγ : MeasurableSpace γ\ninst✝ : TopologicalSpace β\nhg : MeasurableEmbedding g\nhf : StronglyMeasurable f\nhg' : StronglyMeasurable g'\n⊢ ∀ (x : γ),\n    Tendsto\n      (fun n =>\n        ↑((fun n => SimpleFunc.extend (StronglyMeasurable.approx hf n) g hg (StronglyMeasurable.approx hg' n)) n) x)\n      atTop (𝓝 (Function.extend g f g' x))\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g✝ f : α → β\ng : α → γ\ng' : γ → β\nmα : MeasurableSpace α\nmγ : MeasurableSpace γ\ninst✝ : TopologicalSpace β\nhg : MeasurableEmbedding g\nhf : StronglyMeasurable f\nhg' : StronglyMeasurable g'\nx : γ\n⊢ Tendsto\n    (fun n =>\n      ↑((fun n => SimpleFunc.extend (StronglyMeasurable.approx hf n) g hg (StronglyMeasurable.approx hg' n)) n) x)\n    atTop (𝓝 (Function.extend g f g' x))\n[PROOFSTEP]\nby_cases hx : ∃ y, g y = x\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g✝ f : α → β\ng : α → γ\ng' : γ → β\nmα : MeasurableSpace α\nmγ : MeasurableSpace γ\ninst✝ : TopologicalSpace β\nhg : MeasurableEmbedding g\nhf : StronglyMeasurable f\nhg' : StronglyMeasurable g'\nx : γ\nhx : ∃ y, g y = x\n⊢ Tendsto\n    (fun n =>\n      ↑((fun n => SimpleFunc.extend (StronglyMeasurable.approx hf n) g hg (StronglyMeasurable.approx hg' n)) n) x)\n    atTop (𝓝 (Function.extend g f g' x))\n[PROOFSTEP]\nrcases hx with ⟨y, rfl⟩\n[GOAL]\ncase pos.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g✝ f : α → β\ng : α → γ\ng' : γ → β\nmα : MeasurableSpace α\nmγ : MeasurableSpace γ\ninst✝ : TopologicalSpace β\nhg : MeasurableEmbedding g\nhf : StronglyMeasurable f\nhg' : StronglyMeasurable g'\ny : α\n⊢ Tendsto\n    (fun n =>\n      ↑((fun n => SimpleFunc.extend (StronglyMeasurable.approx hf n) g hg (StronglyMeasurable.approx hg' n)) n) (g y))\n    atTop (𝓝 (Function.extend g f g' (g y)))\n[PROOFSTEP]\nsimpa only [SimpleFunc.extend_apply, hg.injective, Injective.extend_apply] using hf.tendsto_approx y\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : Countable ι\nf✝ g✝ f : α → β\ng : α → γ\ng' : γ → β\nmα : MeasurableSpace α\nmγ : MeasurableSpace γ\ninst✝ : TopologicalSpace β\nhg : MeasurableEmbedding g\nhf : StronglyMeasurable f\nhg' : StronglyMeasurable g'\nx : γ\nhx : ¬∃ y, g y = x\n⊢ Tendsto\n    (fun n =>\n      ↑((fun n => SimpleFunc.extend (StronglyMeasurable.approx hf n) g hg (StronglyMeasurable.approx hg' n)) n) x)\n    atTop (𝓝 (Function.extend g f g' x))\n[PROOFSTEP]\nsimpa only [hx, SimpleFunc.extend_apply', not_false_iff, extend_apply'] using hg'.tendsto_approx x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\nE : Type u_5\ninst✝¹ : TopologicalSpace E\ninst✝ : MetrizableSpace E\nf g : α → E\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\n⊢ MeasurableSet {x | f x = g x}\n[PROOFSTEP]\nborelize (E × E)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\nE : Type u_5\ninst✝¹ : TopologicalSpace E\ninst✝ : MetrizableSpace E\nf g : α → E\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nthis✝¹ : MeasurableSpace (E × E) := borel (E × E)\nthis✝ : BorelSpace (E × E)\n⊢ MeasurableSet {x | f x = g x}\n[PROOFSTEP]\nexact (hf.prod_mk hg).measurable isClosed_diagonal.measurableSet\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : LinearOrder β\ninst✝¹ : OrderClosedTopology β\ninst✝ : PseudoMetrizableSpace β\nf g : α → β\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\n⊢ MeasurableSet {a | f a < g a}\n[PROOFSTEP]\nborelize (β × β)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : LinearOrder β\ninst✝¹ : OrderClosedTopology β\ninst✝ : PseudoMetrizableSpace β\nf g : α → β\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nthis✝¹ : MeasurableSpace (β × β) := borel (β × β)\nthis✝ : BorelSpace (β × β)\n⊢ MeasurableSet {a | f a < g a}\n[PROOFSTEP]\nexact (hf.prod_mk hg).measurable isOpen_lt_prod.measurableSet\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : Preorder β\ninst✝¹ : OrderClosedTopology β\ninst✝ : PseudoMetrizableSpace β\nf g : α → β\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\n⊢ MeasurableSet {a | f a ≤ g a}\n[PROOFSTEP]\nborelize (β × β)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nf✝ g✝ : α → β\nm : MeasurableSpace α\ninst✝³ : TopologicalSpace β\ninst✝² : Preorder β\ninst✝¹ : OrderClosedTopology β\ninst✝ : PseudoMetrizableSpace β\nf g : α → β\nhf : StronglyMeasurable f\nhg : StronglyMeasurable g\nthis✝¹ : MeasurableSpace (β × β) := borel (β × β)\nthis✝ : BorelSpace (β × β)\n⊢ MeasurableSet {a | f a ≤ g a}\n[PROOFSTEP]\nexact (hf.prod_mk hg).measurable isClosed_le_prod.measurableSet\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\n⊢ ∃ fs, (∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))) ∧ ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(fs n) x = 0\n[PROOFSTEP]\nlet g_seq_s : ℕ → @SimpleFunc α m β := fun n => (hf.approx n).restrict s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\ng_seq_s : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (StronglyMeasurable.approx hf n) s\n⊢ ∃ fs, (∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))) ∧ ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(fs n) x = 0\n[PROOFSTEP]\nhave hg_eq : ∀ x ∈ s, ∀ n, g_seq_s n x = hf.approx n x :=\n  by\n  intro x hx n\n  rw [SimpleFunc.coe_restrict _ hs, Set.indicator_of_mem hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\ng_seq_s : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (StronglyMeasurable.approx hf n) s\n⊢ ∀ (x : α), x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(StronglyMeasurable.approx hf n) x\n[PROOFSTEP]\nintro x hx n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\ng_seq_s : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (StronglyMeasurable.approx hf n) s\nx : α\nhx : x ∈ s\nn : ℕ\n⊢ ↑(g_seq_s n) x = ↑(StronglyMeasurable.approx hf n) x\n[PROOFSTEP]\nrw [SimpleFunc.coe_restrict _ hs, Set.indicator_of_mem hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\ng_seq_s : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (StronglyMeasurable.approx hf n) s\nhg_eq : ∀ (x : α), x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(StronglyMeasurable.approx hf n) x\n⊢ ∃ fs, (∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))) ∧ ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(fs n) x = 0\n[PROOFSTEP]\nhave hg_zero : ∀ (x) (_ : x ∉ s), ∀ n, g_seq_s n x = 0 :=\n  by\n  intro x hx n\n  rw [SimpleFunc.coe_restrict _ hs, Set.indicator_of_not_mem hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\ng_seq_s : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (StronglyMeasurable.approx hf n) s\nhg_eq : ∀ (x : α), x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(StronglyMeasurable.approx hf n) x\n⊢ ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\n[PROOFSTEP]\nintro x hx n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\ng_seq_s : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (StronglyMeasurable.approx hf n) s\nhg_eq : ∀ (x : α), x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(StronglyMeasurable.approx hf n) x\nx : α\nhx : ¬x ∈ s\nn : ℕ\n⊢ ↑(g_seq_s n) x = 0\n[PROOFSTEP]\nrw [SimpleFunc.coe_restrict _ hs, Set.indicator_of_not_mem hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\ng_seq_s : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (StronglyMeasurable.approx hf n) s\nhg_eq : ∀ (x : α), x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(StronglyMeasurable.approx hf n) x\nhg_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\n⊢ ∃ fs, (∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))) ∧ ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(fs n) x = 0\n[PROOFSTEP]\nrefine' ⟨g_seq_s, fun x => _, hg_zero⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\ng_seq_s : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (StronglyMeasurable.approx hf n) s\nhg_eq : ∀ (x : α), x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(StronglyMeasurable.approx hf n) x\nhg_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nx : α\n⊢ Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\ng_seq_s : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (StronglyMeasurable.approx hf n) s\nhg_eq : ∀ (x : α), x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(StronglyMeasurable.approx hf n) x\nhg_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nx : α\nhx : x ∈ s\n⊢ Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nsimp_rw [hg_eq x hx]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\ng_seq_s : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (StronglyMeasurable.approx hf n) s\nhg_eq : ∀ (x : α), x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(StronglyMeasurable.approx hf n) x\nhg_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nx : α\nhx : x ∈ s\n⊢ Tendsto (fun n => ↑(StronglyMeasurable.approx hf n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nexact hf.tendsto_approx x\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\ng_seq_s : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (StronglyMeasurable.approx hf n) s\nhg_eq : ∀ (x : α), x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(StronglyMeasurable.approx hf n) x\nhg_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nx : α\nhx : ¬x ∈ s\n⊢ Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\n[PROOFSTEP]\nsimp_rw [hg_zero x hx, hf_zero x hx]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α → β\nm : MeasurableSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : Zero β\ns : Set α\nf : α → β\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\ng_seq_s : ℕ → α →ₛ β := fun n => SimpleFunc.restrict (StronglyMeasurable.approx hf n) s\nhg_eq : ∀ (x : α), x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = ↑(StronglyMeasurable.approx hf n) x\nhg_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nx : α\nhx : ¬x ∈ s\n⊢ Tendsto (fun n => 0) atTop (𝓝 0)\n[PROOFSTEP]\nexact tendsto_const_nhds\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nhave hs_m₂ : MeasurableSet[m₂] s := by\n  rw [← Set.inter_univ s]\n  refine' hs Set.univ _\n  rwa [Set.inter_univ]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\n⊢ MeasurableSet s\n[PROOFSTEP]\nrw [← Set.inter_univ s]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\n⊢ MeasurableSet (s ∩ univ)\n[PROOFSTEP]\nrefine' hs Set.univ _\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\n⊢ MeasurableSet (s ∩ univ)\n[PROOFSTEP]\nrwa [Set.inter_univ]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nobtain ⟨g_seq_s, hg_seq_tendsto, hg_seq_zero⟩ := stronglyMeasurable_in_set hs_m hf hf_zero\n[GOAL]\ncase intro.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nlet g_seq_s₂ : ℕ → @SimpleFunc α m₂ E := fun n =>\n  { toFun := g_seq_s n\n    measurableSet_fiber' := fun x =>\n      by\n      rw [← Set.inter_univ (g_seq_s n ⁻¹' { x }), ← Set.union_compl_self s, Set.inter_union_distrib_left,\n        Set.inter_comm (g_seq_s n ⁻¹' { x })]\n      refine' MeasurableSet.union (hs _ (hs_m.inter _)) _\n      · exact @SimpleFunc.measurableSet_fiber _ _ m _ _\n      by_cases hx : x = 0\n      · suffices g_seq_s n ⁻¹' { x } ∩ sᶜ = sᶜ by\n          rw [this]\n          exact hs_m₂.compl\n        ext1 y\n        rw [hx, Set.mem_inter_iff, Set.mem_preimage, Set.mem_singleton_iff]\n        exact ⟨fun h => h.2, fun h => ⟨hg_seq_zero y h n, h⟩⟩\n      · suffices g_seq_s n ⁻¹' { x } ∩ sᶜ = ∅ by\n          rw [this]\n          exact MeasurableSet.empty\n        ext1 y\n        simp only [mem_inter_iff, mem_preimage, mem_singleton_iff, mem_compl_iff, mem_empty_iff_false, iff_false_iff,\n          not_and, not_not_mem]\n        refine' Function.mtr fun hys => _\n        rw [hg_seq_zero y hys n]\n        exact Ne.symm hx\n    finite_range' := @SimpleFunc.finite_range _ _ m (g_seq_s n) }\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\n⊢ MeasurableSet (↑(g_seq_s n) ⁻¹' {x})\n[PROOFSTEP]\nrw [← Set.inter_univ (g_seq_s n ⁻¹' { x }), ← Set.union_compl_self s, Set.inter_union_distrib_left,\n  Set.inter_comm (g_seq_s n ⁻¹' { x })]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\n⊢ MeasurableSet (s ∩ ↑(g_seq_s n) ⁻¹' {x} ∪ ↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ)\n[PROOFSTEP]\nrefine' MeasurableSet.union (hs _ (hs_m.inter _)) _\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\n⊢ MeasurableSet (↑(g_seq_s n) ⁻¹' {x})\n[PROOFSTEP]\nexact @SimpleFunc.measurableSet_fiber _ _ m _ _\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\n⊢ MeasurableSet (↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : x = 0\n⊢ MeasurableSet (↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ)\n[PROOFSTEP]\nsuffices g_seq_s n ⁻¹' { x } ∩ sᶜ = sᶜ by\n  rw [this]\n  exact hs_m₂.compl\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : x = 0\nthis : ↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ = sᶜ\n⊢ MeasurableSet (↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : x = 0\nthis : ↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ = sᶜ\n⊢ MeasurableSet sᶜ\n[PROOFSTEP]\nexact hs_m₂.compl\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : x = 0\n⊢ ↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ = sᶜ\n[PROOFSTEP]\next1 y\n[GOAL]\ncase pos.h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : x = 0\ny : α\n⊢ y ∈ ↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ ↔ y ∈ sᶜ\n[PROOFSTEP]\nrw [hx, Set.mem_inter_iff, Set.mem_preimage, Set.mem_singleton_iff]\n[GOAL]\ncase pos.h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : x = 0\ny : α\n⊢ ↑(g_seq_s n) y = 0 ∧ y ∈ sᶜ ↔ y ∈ sᶜ\n[PROOFSTEP]\nexact ⟨fun h => h.2, fun h => ⟨hg_seq_zero y h n, h⟩⟩\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : ¬x = 0\n⊢ MeasurableSet (↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ)\n[PROOFSTEP]\nsuffices g_seq_s n ⁻¹' { x } ∩ sᶜ = ∅ by\n  rw [this]\n  exact MeasurableSet.empty\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : ¬x = 0\nthis : ↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ = ∅\n⊢ MeasurableSet (↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : ¬x = 0\nthis : ↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ = ∅\n⊢ MeasurableSet ∅\n[PROOFSTEP]\nexact MeasurableSet.empty\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : ¬x = 0\n⊢ ↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ = ∅\n[PROOFSTEP]\next1 y\n[GOAL]\ncase neg.h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : ¬x = 0\ny : α\n⊢ y ∈ ↑(g_seq_s n) ⁻¹' {x} ∩ sᶜ ↔ y ∈ ∅\n[PROOFSTEP]\nsimp only [mem_inter_iff, mem_preimage, mem_singleton_iff, mem_compl_iff, mem_empty_iff_false, iff_false_iff, not_and,\n  not_not_mem]\n[GOAL]\ncase neg.h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : ¬x = 0\ny : α\n⊢ ↑(g_seq_s n) y = x → y ∈ s\n[PROOFSTEP]\nrefine' Function.mtr fun hys => _\n[GOAL]\ncase neg.h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : ¬x = 0\ny : α\nhys : ¬y ∈ s\n⊢ ¬↑(g_seq_s n) y = x\n[PROOFSTEP]\nrw [hg_seq_zero y hys n]\n[GOAL]\ncase neg.h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\nn : ℕ\nx : E\nhx : ¬x = 0\ny : α\nhys : ¬y ∈ s\n⊢ ¬0 = x\n[PROOFSTEP]\nexact Ne.symm hx\n[GOAL]\ncase intro.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf✝ g : α✝ → β\nα : Type u_5\nE : Type u_6\nm m₂ : MeasurableSpace α\ninst✝¹ : TopologicalSpace E\ninst✝ : Zero E\ns : Set α\nf : α → E\nhs_m : MeasurableSet s\nhs : ∀ (t : Set α), MeasurableSet (s ∩ t) → MeasurableSet (s ∩ t)\nhf : StronglyMeasurable f\nhf_zero : ∀ (x : α), ¬x ∈ s → f x = 0\nhs_m₂ : MeasurableSet s\ng_seq_s : ℕ → α →ₛ E\nhg_seq_tendsto : ∀ (x : α), Tendsto (fun n => ↑(g_seq_s n) x) atTop (𝓝 (f x))\nhg_seq_zero : ∀ (x : α), ¬x ∈ s → ∀ (n : ℕ), ↑(g_seq_s n) x = 0\ng_seq_s₂ : ℕ → α →ₛ E :=\n  fun n =>\n    { toFun := ↑(g_seq_s n), measurableSet_fiber' := (_ : ∀ (x : E), MeasurableSet (↑(g_seq_s n) ⁻¹' {x})),\n      finite_range' := (_ : Set.Finite (range ↑(g_seq_s n))) }\n⊢ StronglyMeasurable f\n[PROOFSTEP]\nexact ⟨g_seq_s₂, hg_seq_tendsto⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\n⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ ⋃ (i : ℕ), s i = univ\n[PROOFSTEP]\nlet sigma_finite_sets := spanningSets (μ.trim hm)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\n⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ ⋃ (i : ℕ), s i = univ\n[PROOFSTEP]\nlet norm_sets := fun n : ℕ => {x | ‖f x‖ ≤ n}\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\n⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ ⋃ (i : ℕ), s i = univ\n[PROOFSTEP]\nhave norm_sets_spanning : ⋃ n, norm_sets n = Set.univ :=\n  by\n  ext1 x\n  simp only [Set.mem_iUnion, Set.mem_setOf_eq, Set.mem_univ, iff_true_iff]\n  exact ⟨⌈‖f x‖⌉₊, Nat.le_ceil ‖f x‖⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\n⊢ ⋃ (n : ℕ), norm_sets n = univ\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nx : α\n⊢ x ∈ ⋃ (n : ℕ), norm_sets n ↔ x ∈ univ\n[PROOFSTEP]\nsimp only [Set.mem_iUnion, Set.mem_setOf_eq, Set.mem_univ, iff_true_iff]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nx : α\n⊢ ∃ i, ‖f x‖ ≤ ↑i\n[PROOFSTEP]\nexact ⟨⌈‖f x‖⌉₊, Nat.le_ceil ‖f x‖⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\n⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ ⋃ (i : ℕ), s i = univ\n[PROOFSTEP]\nlet sets n := sigma_finite_sets n ∩ norm_sets n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\n⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ ⋃ (i : ℕ), s i = univ\n[PROOFSTEP]\nhave h_meas : ∀ n, MeasurableSet[m] (sets n) :=\n  by\n  refine' fun n => MeasurableSet.inter _ _\n  · exact measurable_spanningSets (μ.trim hm) n\n  · exact hf.norm.measurableSet_le stronglyMeasurable_const\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\n⊢ ∀ (n : ℕ), MeasurableSet (sets n)\n[PROOFSTEP]\nrefine' fun n => MeasurableSet.inter _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nn : ℕ\n⊢ MeasurableSet (sigma_finite_sets n)\n[PROOFSTEP]\nexact measurable_spanningSets (μ.trim hm) n\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nn : ℕ\n⊢ MeasurableSet (norm_sets n)\n[PROOFSTEP]\nexact hf.norm.measurableSet_le stronglyMeasurable_const\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nh_meas : ∀ (n : ℕ), MeasurableSet (sets n)\n⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ ⋃ (i : ℕ), s i = univ\n[PROOFSTEP]\nhave h_finite : ∀ n, μ (sets n) < ∞ :=\n  by\n  refine' fun n => (measure_mono (Set.inter_subset_left _ _)).trans_lt _\n  exact (le_trim hm).trans_lt (measure_spanningSets_lt_top (μ.trim hm) n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nh_meas : ∀ (n : ℕ), MeasurableSet (sets n)\n⊢ ∀ (n : ℕ), ↑↑μ (sets n) < ⊤\n[PROOFSTEP]\nrefine' fun n => (measure_mono (Set.inter_subset_left _ _)).trans_lt _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nh_meas : ∀ (n : ℕ), MeasurableSet (sets n)\nn : ℕ\n⊢ ↑↑μ (sigma_finite_sets n) < ⊤\n[PROOFSTEP]\nexact (le_trim hm).trans_lt (measure_spanningSets_lt_top (μ.trim hm) n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nh_meas : ∀ (n : ℕ), MeasurableSet (sets n)\nh_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤\n⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ ⋃ (i : ℕ), s i = univ\n[PROOFSTEP]\nrefine' ⟨sets, fun n => ⟨h_meas n, h_finite n, _⟩, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nh_meas : ∀ (n : ℕ), MeasurableSet (sets n)\nh_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤\nn : ℕ\n⊢ ∀ (x : α), x ∈ sets n → ‖f x‖ ≤ ↑n\n[PROOFSTEP]\nexact fun x hx => hx.2\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nh_meas : ∀ (n : ℕ), MeasurableSet (sets n)\nh_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤\n⊢ ⋃ (i : ℕ), sets i = univ\n[PROOFSTEP]\nhave : ⋃ i, sigma_finite_sets i ∩ norm_sets i = (⋃ i, sigma_finite_sets i) ∩ ⋃ i, norm_sets i :=\n  by\n  refine' Set.iUnion_inter_of_monotone (monotone_spanningSets (μ.trim hm)) fun i j hij x => _\n  simp only [Set.mem_setOf_eq]\n  refine' fun hif => hif.trans _\n  exact_mod_cast hij\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nh_meas : ∀ (n : ℕ), MeasurableSet (sets n)\nh_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤\n⊢ ⋃ (i : ℕ), sigma_finite_sets i ∩ norm_sets i = (⋃ (i : ℕ), sigma_finite_sets i) ∩ ⋃ (i : ℕ), norm_sets i\n[PROOFSTEP]\nrefine' Set.iUnion_inter_of_monotone (monotone_spanningSets (μ.trim hm)) fun i j hij x => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nh_meas : ∀ (n : ℕ), MeasurableSet (sets n)\nh_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤\ni j : ℕ\nhij : i ≤ j\nx : α\n⊢ x ∈ norm_sets i → x ∈ norm_sets j\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nh_meas : ∀ (n : ℕ), MeasurableSet (sets n)\nh_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤\ni j : ℕ\nhij : i ≤ j\nx : α\n⊢ ‖f x‖ ≤ ↑i → ‖f x‖ ≤ ↑j\n[PROOFSTEP]\nrefine' fun hif => hif.trans _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nh_meas : ∀ (n : ℕ), MeasurableSet (sets n)\nh_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤\ni j : ℕ\nhij : i ≤ j\nx : α\nhif : ‖f x‖ ≤ ↑i\n⊢ ↑i ≤ ↑j\n[PROOFSTEP]\nexact_mod_cast hij\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nf g : α → β\ninst✝¹ : SeminormedAddCommGroup β\nm m0 : MeasurableSpace α\nhm : m ≤ m0\nhf : StronglyMeasurable f\nμ : Measure α\ninst✝ : SigmaFinite (trim μ hm)\nsigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)\nnorm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}\nnorm_sets_spanning : ⋃ (n : ℕ), norm_sets n = univ\nsets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n\nh_meas : ∀ (n : ℕ), MeasurableSet (sets n)\nh_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤\nthis : ⋃ (i : ℕ), sigma_finite_sets i ∩ norm_sets i = (⋃ (i : ℕ), sigma_finite_sets i) ∩ ⋃ (i : ℕ), norm_sets i\n⊢ ⋃ (i : ℕ), sets i = univ\n[PROOFSTEP]\nrw [this, norm_sets_spanning, iUnion_spanningSets (μ.trim hm), Set.inter_univ]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nα : Type u_5\nβ : Type u_6\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : Zero β\ninst✝ : TopologicalSpace β\n⊢ ∀ (n : ℕ), ↑↑μ (support ↑(OfNat.ofNat 0 n)) < ⊤\n[PROOFSTEP]\nsimp only [Pi.zero_apply, SimpleFunc.coe_zero, support_zero', measure_empty, WithTop.zero_lt_top, forall_const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nhf : FinStronglyMeasurable f μ\n⊢ ∃ t, MeasurableSet t ∧ (∀ (x : α), x ∈ tᶜ → f x = 0) ∧ SigmaFinite (Measure.restrict μ t)\n[PROOFSTEP]\nrcases hf with ⟨fs, hT_lt_top, h_approx⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\n⊢ ∃ t, MeasurableSet t ∧ (∀ (x : α), x ∈ tᶜ → f x = 0) ∧ SigmaFinite (Measure.restrict μ t)\n[PROOFSTEP]\nlet T n := support (fs n)\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\n⊢ ∃ t, MeasurableSet t ∧ (∀ (x : α), x ∈ tᶜ → f x = 0) ∧ SigmaFinite (Measure.restrict μ t)\n[PROOFSTEP]\nhave hT_meas : ∀ n, MeasurableSet (T n) := fun n => SimpleFunc.measurableSet_support (fs n)\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\n⊢ ∃ t, MeasurableSet t ∧ (∀ (x : α), x ∈ tᶜ → f x = 0) ∧ SigmaFinite (Measure.restrict μ t)\n[PROOFSTEP]\nlet t := ⋃ n, T n\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\n⊢ ∃ t, MeasurableSet t ∧ (∀ (x : α), x ∈ tᶜ → f x = 0) ∧ SigmaFinite (Measure.restrict μ t)\n[PROOFSTEP]\nrefine' ⟨t, MeasurableSet.iUnion hT_meas, _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\n⊢ ∀ (x : α), x ∈ tᶜ → f x = 0\n[PROOFSTEP]\nhave h_fs_zero : ∀ n, ∀ x ∈ tᶜ, fs n x = 0 := by\n  intro n x hxt\n  rw [Set.mem_compl_iff, Set.mem_iUnion, not_exists] at hxt \n  simpa using hxt n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\n⊢ ∀ (n : ℕ) (x : α), x ∈ tᶜ → ↑(fs n) x = 0\n[PROOFSTEP]\nintro n x hxt\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\nn : ℕ\nx : α\nhxt : x ∈ tᶜ\n⊢ ↑(fs n) x = 0\n[PROOFSTEP]\nrw [Set.mem_compl_iff, Set.mem_iUnion, not_exists] at hxt \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\nn : ℕ\nx : α\nhxt : ∀ (x_1 : ℕ), ¬x ∈ T x_1\n⊢ ↑(fs n) x = 0\n[PROOFSTEP]\nsimpa using hxt n\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\nh_fs_zero : ∀ (n : ℕ) (x : α), x ∈ tᶜ → ↑(fs n) x = 0\n⊢ ∀ (x : α), x ∈ tᶜ → f x = 0\n[PROOFSTEP]\nrefine' fun x hxt => tendsto_nhds_unique (h_approx x) _\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\nh_fs_zero : ∀ (n : ℕ) (x : α), x ∈ tᶜ → ↑(fs n) x = 0\nx : α\nhxt : x ∈ tᶜ\n⊢ Tendsto (fun n => ↑(fs n) x) atTop (𝓝 0)\n[PROOFSTEP]\nrw [funext fun n => h_fs_zero n x hxt]\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\nh_fs_zero : ∀ (n : ℕ) (x : α), x ∈ tᶜ → ↑(fs n) x = 0\nx : α\nhxt : x ∈ tᶜ\n⊢ Tendsto (fun n => 0) atTop (𝓝 0)\n[PROOFSTEP]\nexact tendsto_const_nhds\n[GOAL]\ncase intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\n⊢ SigmaFinite (Measure.restrict μ t)\n[PROOFSTEP]\nrefine' ⟨⟨⟨fun n => tᶜ ∪ T n, fun _ => trivial, fun n => _, _⟩⟩⟩\n[GOAL]\ncase intro.intro.refine'_2.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\nn : ℕ\n⊢ ↑↑(Measure.restrict μ t) ((fun n => tᶜ ∪ T n) n) < ⊤\n[PROOFSTEP]\nrw [Measure.restrict_apply' (MeasurableSet.iUnion hT_meas), Set.union_inter_distrib_right, Set.compl_inter_self t,\n  Set.empty_union]\n[GOAL]\ncase intro.intro.refine'_2.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\nn : ℕ\n⊢ ↑↑μ (T n ∩ ⋃ (b : ℕ), T b) < ⊤\n[PROOFSTEP]\nexact (measure_mono (Set.inter_subset_left _ _)).trans_lt (hT_lt_top n)\n[GOAL]\ncase intro.intro.refine'_2.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\n⊢ ⋃ (i : ℕ), (fun n => tᶜ ∪ T n) i = univ\n[PROOFSTEP]\nrw [← Set.union_iUnion tᶜ T]\n[GOAL]\ncase intro.intro.refine'_2.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : Zero β\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space β\nfs : ℕ → α →ₛ β\nhT_lt_top : ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤\nh_approx : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))\nT : ℕ → Set α := fun n => support ↑(fs n)\nhT_meas : ∀ (n : ℕ), MeasurableSet (T n)\nt : Set α := ⋃ (n : ℕ), T n\n⊢ tᶜ ∪ ⋃ (i : ℕ), T i = univ\n[PROOFSTEP]\nexact Set.compl_union_self _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : MonoidWithZero β\ninst✝ : ContinuousMul β\nhf : FinStronglyMeasurable f μ\nhg : FinStronglyMeasurable g μ\n⊢ FinStronglyMeasurable (f * g) μ\n[PROOFSTEP]\nrefine' ⟨fun n => hf.approx n * hg.approx n, _, fun x => (hf.tendsto_approx x).mul (hg.tendsto_approx x)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : MonoidWithZero β\ninst✝ : ContinuousMul β\nhf : FinStronglyMeasurable f μ\nhg : FinStronglyMeasurable g μ\n⊢ ∀ (n : ℕ), ↑↑μ (support ↑((fun n => FinStronglyMeasurable.approx hf n * FinStronglyMeasurable.approx hg n) n)) < ⊤\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : MonoidWithZero β\ninst✝ : ContinuousMul β\nhf : FinStronglyMeasurable f μ\nhg : FinStronglyMeasurable g μ\nn : ℕ\n⊢ ↑↑μ (support ↑((fun n => FinStronglyMeasurable.approx hf n * FinStronglyMeasurable.approx hg n) n)) < ⊤\n[PROOFSTEP]\nexact (measure_mono (support_mul_subset_left _ _)).trans_lt (hf.fin_support_approx n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : AddGroup β\ninst✝ : TopologicalAddGroup β\nhf : FinStronglyMeasurable f μ\n⊢ FinStronglyMeasurable (-f) μ\n[PROOFSTEP]\nrefine' ⟨fun n => -hf.approx n, fun n => _, fun x => (hf.tendsto_approx x).neg⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : AddGroup β\ninst✝ : TopologicalAddGroup β\nhf : FinStronglyMeasurable f μ\nn : ℕ\n⊢ ↑↑μ (support ↑((fun n => -FinStronglyMeasurable.approx hf n) n)) < ⊤\n[PROOFSTEP]\nsuffices μ (Function.support fun x => -(hf.approx n) x) < ∞ by convert this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : AddGroup β\ninst✝ : TopologicalAddGroup β\nhf : FinStronglyMeasurable f μ\nn : ℕ\nthis : ↑↑μ (support fun x => -↑(FinStronglyMeasurable.approx hf n) x) < ⊤\n⊢ ↑↑μ (support ↑((fun n => -FinStronglyMeasurable.approx hf n) n)) < ⊤\n[PROOFSTEP]\nconvert this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : AddGroup β\ninst✝ : TopologicalAddGroup β\nhf : FinStronglyMeasurable f μ\nn : ℕ\n⊢ ↑↑μ (support fun x => -↑(FinStronglyMeasurable.approx hf n) x) < ⊤\n[PROOFSTEP]\nrw [Function.support_neg (hf.approx n)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝² : TopologicalSpace β\ninst✝¹ : AddGroup β\ninst✝ : TopologicalAddGroup β\nhf : FinStronglyMeasurable f μ\nn : ℕ\n⊢ ↑↑μ (support ↑(FinStronglyMeasurable.approx hf n)) < ⊤\n[PROOFSTEP]\nexact hf.fin_support_approx n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁶ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝⁵ : TopologicalSpace β\n𝕜 : Type u_5\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : AddMonoid β\ninst✝² : Monoid 𝕜\ninst✝¹ : DistribMulAction 𝕜 β\ninst✝ : ContinuousSMul 𝕜 β\nhf : FinStronglyMeasurable f μ\nc : 𝕜\n⊢ FinStronglyMeasurable (c • f) μ\n[PROOFSTEP]\nrefine' ⟨fun n => c • hf.approx n, fun n => _, fun x => (hf.tendsto_approx x).const_smul c⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁶ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝⁵ : TopologicalSpace β\n𝕜 : Type u_5\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : AddMonoid β\ninst✝² : Monoid 𝕜\ninst✝¹ : DistribMulAction 𝕜 β\ninst✝ : ContinuousSMul 𝕜 β\nhf : FinStronglyMeasurable f μ\nc : 𝕜\nn : ℕ\n⊢ ↑↑μ (support ↑((fun n => c • FinStronglyMeasurable.approx hf n) n)) < ⊤\n[PROOFSTEP]\nrw [SimpleFunc.coe_smul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁶ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝⁵ : TopologicalSpace β\n𝕜 : Type u_5\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : AddMonoid β\ninst✝² : Monoid 𝕜\ninst✝¹ : DistribMulAction 𝕜 β\ninst✝ : ContinuousSMul 𝕜 β\nhf : FinStronglyMeasurable f μ\nc : 𝕜\nn : ℕ\n⊢ ↑↑μ (support (c • ↑(FinStronglyMeasurable.approx hf n))) < ⊤\n[PROOFSTEP]\nrefine' (measure_mono (support_smul_subset_right c _)).trans_lt (hf.fin_support_approx n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝³ : TopologicalSpace β\ninst✝² : Zero β\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nhf : FinStronglyMeasurable f μ\nhg : FinStronglyMeasurable g μ\n⊢ FinStronglyMeasurable (f ⊔ g) μ\n[PROOFSTEP]\nrefine'\n  ⟨fun n => hf.approx n ⊔ hg.approx n, fun n => _, fun x => (hf.tendsto_approx x).sup_right_nhds (hg.tendsto_approx x)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝³ : TopologicalSpace β\ninst✝² : Zero β\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nhf : FinStronglyMeasurable f μ\nhg : FinStronglyMeasurable g μ\nn : ℕ\n⊢ ↑↑μ (support ↑((fun n => FinStronglyMeasurable.approx hf n ⊔ FinStronglyMeasurable.approx hg n) n)) < ⊤\n[PROOFSTEP]\nrefine' (measure_mono (support_sup _ _)).trans_lt _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝³ : TopologicalSpace β\ninst✝² : Zero β\ninst✝¹ : SemilatticeSup β\ninst✝ : ContinuousSup β\nhf : FinStronglyMeasurable f μ\nhg : FinStronglyMeasurable g μ\nn : ℕ\n⊢ ↑↑μ\n      ((support fun x => ↑(FinStronglyMeasurable.approx hf n) x) ∪\n        support fun x => ↑(FinStronglyMeasurable.approx hg n) x) <\n    ⊤\n[PROOFSTEP]\nexact measure_union_lt_top_iff.mpr ⟨hf.fin_support_approx n, hg.fin_support_approx n⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝³ : TopologicalSpace β\ninst✝² : Zero β\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nhf : FinStronglyMeasurable f μ\nhg : FinStronglyMeasurable g μ\n⊢ FinStronglyMeasurable (f ⊓ g) μ\n[PROOFSTEP]\nrefine'\n  ⟨fun n => hf.approx n ⊓ hg.approx n, fun n => _, fun x => (hf.tendsto_approx x).inf_right_nhds (hg.tendsto_approx x)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝³ : TopologicalSpace β\ninst✝² : Zero β\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nhf : FinStronglyMeasurable f μ\nhg : FinStronglyMeasurable g μ\nn : ℕ\n⊢ ↑↑μ (support ↑((fun n => FinStronglyMeasurable.approx hf n ⊓ FinStronglyMeasurable.approx hg n) n)) < ⊤\n[PROOFSTEP]\nrefine' (measure_mono (support_inf _ _)).trans_lt _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm0 : MeasurableSpace α\nμ : Measure α\nf g : α → β\ninst✝³ : TopologicalSpace β\ninst✝² : Zero β\ninst✝¹ : SemilatticeInf β\ninst✝ : ContinuousInf β\nhf : FinStronglyMeasurable f μ\nhg : FinStronglyMeasurable g μ\nn : ℕ\n⊢ ↑↑μ\n      ((support fun x => ↑(FinStronglyMeasurable.approx hf n) x) ∪\n        support fun x => ↑(FinStronglyMeasurable.approx hg n) x) <\n    ⊤\n[PROOFSTEP]\nexact measure_union_lt_top_iff.mpr ⟨hf.fin_support_approx n, hg.fin_support_approx n⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\ninst✝¹ : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\n⊢ AEStronglyMeasurable f 0\n[PROOFSTEP]\nnontriviality α\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\ninst✝¹ : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\n✝ : Nontrivial α\n⊢ AEStronglyMeasurable f 0\n[PROOFSTEP]\ninhabit α\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\ninst✝¹ : MeasurableSpace α\ninst✝ : TopologicalSpace β\nf : α → β\n✝ : Nontrivial α\ninhabited_h : Inhabited α\n⊢ AEStronglyMeasurable f 0\n[PROOFSTEP]\nexact ⟨fun _ => f default, stronglyMeasurable_const, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\nM : Type u_5\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nl : List (α → M)\nhl : ∀ (f : α → M), f ∈ l → AEStronglyMeasurable f μ\n⊢ AEStronglyMeasurable (List.prod l) μ\n[PROOFSTEP]\ninduction' l with f l ihl\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\nM : Type u_5\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nl : List (α → M)\nhl✝ : ∀ (f : α → M), f ∈ l → AEStronglyMeasurable f μ\nhl : ∀ (f : α → M), f ∈ [] → AEStronglyMeasurable f μ\n⊢ AEStronglyMeasurable (List.prod []) μ\n[PROOFSTEP]\nexact aestronglyMeasurable_one\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g : α → β\nM : Type u_5\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nl✝ : List (α → M)\nhl✝ : ∀ (f : α → M), f ∈ l✝ → AEStronglyMeasurable f μ\nf : α → M\nl : List (α → M)\nihl : (∀ (f : α → M), f ∈ l → AEStronglyMeasurable f μ) → AEStronglyMeasurable (List.prod l) μ\nhl : ∀ (f_1 : α → M), f_1 ∈ f :: l → AEStronglyMeasurable f_1 μ\n⊢ AEStronglyMeasurable (List.prod (f :: l)) μ\n[PROOFSTEP]\nrw [List.forall_mem_cons] at hl \n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g : α → β\nM : Type u_5\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nl✝ : List (α → M)\nhl✝ : ∀ (f : α → M), f ∈ l✝ → AEStronglyMeasurable f μ\nf : α → M\nl : List (α → M)\nihl : (∀ (f : α → M), f ∈ l → AEStronglyMeasurable f μ) → AEStronglyMeasurable (List.prod l) μ\nhl : AEStronglyMeasurable f μ ∧ ∀ (x : α → M), x ∈ l → AEStronglyMeasurable x μ\n⊢ AEStronglyMeasurable (List.prod (f :: l)) μ\n[PROOFSTEP]\nrw [List.prod_cons]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g : α → β\nM : Type u_5\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nl✝ : List (α → M)\nhl✝ : ∀ (f : α → M), f ∈ l✝ → AEStronglyMeasurable f μ\nf : α → M\nl : List (α → M)\nihl : (∀ (f : α → M), f ∈ l → AEStronglyMeasurable f μ) → AEStronglyMeasurable (List.prod l) μ\nhl : AEStronglyMeasurable f μ ∧ ∀ (x : α → M), x ∈ l → AEStronglyMeasurable x μ\n⊢ AEStronglyMeasurable (f * List.prod l) μ\n[PROOFSTEP]\nexact hl.1.mul (ihl hl.2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\nM : Type u_5\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nl : List (α → M)\nhl : ∀ (f : α → M), f ∈ l → AEStronglyMeasurable f μ\n⊢ AEStronglyMeasurable (fun x => List.prod (List.map (fun f => f x) l)) μ\n[PROOFSTEP]\nsimpa only [← Pi.list_prod_apply] using l.aestronglyMeasurable_prod' hl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\nM : Type u_5\ninst✝² : CommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nl : Multiset (α → M)\nhl : ∀ (f : α → M), f ∈ l → AEStronglyMeasurable f μ\n⊢ AEStronglyMeasurable (Multiset.prod l) μ\n[PROOFSTEP]\nrcases l with ⟨l⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\nM : Type u_5\ninst✝² : CommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nl✝ : Multiset (α → M)\nl : List (α → M)\nhl : ∀ (f : α → M), f ∈ Quot.mk Setoid.r l → AEStronglyMeasurable f μ\n⊢ AEStronglyMeasurable (Multiset.prod (Quot.mk Setoid.r l)) μ\n[PROOFSTEP]\nsimpa using l.aestronglyMeasurable_prod' (by simpa using hl)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\nM : Type u_5\ninst✝² : CommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nl✝ : Multiset (α → M)\nl : List (α → M)\nhl : ∀ (f : α → M), f ∈ Quot.mk Setoid.r l → AEStronglyMeasurable f μ\n⊢ ∀ (f : α → M), f ∈ l → AEStronglyMeasurable f μ\n[PROOFSTEP]\nsimpa using hl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\nM : Type u_5\ninst✝² : CommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\ns : Multiset (α → M)\nhs : ∀ (f : α → M), f ∈ s → AEStronglyMeasurable f μ\n⊢ AEStronglyMeasurable (fun x => Multiset.prod (Multiset.map (fun f => f x) s)) μ\n[PROOFSTEP]\nsimpa only [← Pi.multiset_prod_apply] using s.aestronglyMeasurable_prod' hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g : α → β\nM : Type u_5\ninst✝² : CommMonoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nι : Type u_6\nf : ι → α → M\ns : Finset ι\nhf : ∀ (i : ι), i ∈ s → AEStronglyMeasurable (f i) μ\n⊢ AEStronglyMeasurable (fun a => ∏ i in s, f i a) μ\n[PROOFSTEP]\nsimpa only [← Finset.prod_apply] using s.aestronglyMeasurable_prod' hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\n⊢ AEStronglyMeasurable (indicator s f) μ ↔ AEStronglyMeasurable f (Measure.restrict μ s)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\n⊢ AEStronglyMeasurable (indicator s f) μ → AEStronglyMeasurable f (Measure.restrict μ s)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\nh : AEStronglyMeasurable (indicator s f) μ\n⊢ AEStronglyMeasurable f (Measure.restrict μ s)\n[PROOFSTEP]\nexact (h.mono_measure Measure.restrict_le_self).congr (indicator_ae_eq_restrict hs)\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\n⊢ AEStronglyMeasurable f (Measure.restrict μ s) → AEStronglyMeasurable (indicator s f) μ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\nh : AEStronglyMeasurable f (Measure.restrict μ s)\n⊢ AEStronglyMeasurable (indicator s f) μ\n[PROOFSTEP]\nrefine' ⟨indicator s (h.mk f), h.stronglyMeasurable_mk.indicator hs, _⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\nh : AEStronglyMeasurable f (Measure.restrict μ s)\n⊢ indicator s f =ᶠ[ae μ] indicator s (AEStronglyMeasurable.mk f h)\n[PROOFSTEP]\nhave A : s.indicator f =ᵐ[μ.restrict s] s.indicator (h.mk f) :=\n  (indicator_ae_eq_restrict hs).trans (h.ae_eq_mk.trans <| (indicator_ae_eq_restrict hs).symm)\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\nh : AEStronglyMeasurable f (Measure.restrict μ s)\nA : indicator s f =ᶠ[ae (Measure.restrict μ s)] indicator s (AEStronglyMeasurable.mk f h)\n⊢ indicator s f =ᶠ[ae μ] indicator s (AEStronglyMeasurable.mk f h)\n[PROOFSTEP]\nhave B : s.indicator f =ᵐ[μ.restrict sᶜ] s.indicator (h.mk f) :=\n  (indicator_ae_eq_restrict_compl hs).trans (indicator_ae_eq_restrict_compl hs).symm\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : Zero β\ns : Set α\nhs : MeasurableSet s\nh : AEStronglyMeasurable f (Measure.restrict μ s)\nA : indicator s f =ᶠ[ae (Measure.restrict μ s)] indicator s (AEStronglyMeasurable.mk f h)\nB : indicator s f =ᶠ[ae (Measure.restrict μ sᶜ)] indicator s (AEStronglyMeasurable.mk f h)\n⊢ indicator s f =ᶠ[ae μ] indicator s (AEStronglyMeasurable.mk f h)\n[PROOFSTEP]\nexact ae_of_ae_restrict_of_ae_restrict_compl _ A B\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : TopologicalSpace E\ninst✝ : MetrizableSpace E\nf g : α → E\nhf : AEStronglyMeasurable f μ\nhg : AEStronglyMeasurable g μ\n⊢ NullMeasurableSet {x | f x = g x}\n[PROOFSTEP]\napply (hf.stronglyMeasurable_mk.measurableSet_eq_fun hg.stronglyMeasurable_mk).nullMeasurableSet.congr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : TopologicalSpace E\ninst✝ : MetrizableSpace E\nf g : α → E\nhf : AEStronglyMeasurable f μ\nhg : AEStronglyMeasurable g μ\n⊢ {x | AEStronglyMeasurable.mk f hf x = AEStronglyMeasurable.mk g hg x} =ᶠ[ae μ] {x | f x = g x}\n[PROOFSTEP]\nfilter_upwards [hf.ae_eq_mk, hg.ae_eq_mk] with x hfx hgx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : TopologicalSpace E\ninst✝ : MetrizableSpace E\nf g : α → E\nhf : AEStronglyMeasurable f μ\nhg : AEStronglyMeasurable g μ\nx : α\nhfx : f x = AEStronglyMeasurable.mk f hf x\nhgx : g x = AEStronglyMeasurable.mk g hg x\n⊢ setOf (fun x => AEStronglyMeasurable.mk f hf x = AEStronglyMeasurable.mk g hg x) x = setOf (fun x => f x = g x) x\n[PROOFSTEP]\nchange (hf.mk f x = hg.mk g x) = (f x = g x)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : TopologicalSpace E\ninst✝ : MetrizableSpace E\nf g : α → E\nhf : AEStronglyMeasurable f μ\nhg : AEStronglyMeasurable g μ\nx : α\nhfx : f x = AEStronglyMeasurable.mk f hf x\nhgx : g x = AEStronglyMeasurable.mk g hg x\n⊢ (AEStronglyMeasurable.mk f hf x = AEStronglyMeasurable.mk g hg x) = (f x = g x)\n[PROOFSTEP]\nsimp only [hfx, hgx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝² : LinearOrder β\ninst✝¹ : OrderClosedTopology β\ninst✝ : PseudoMetrizableSpace β\nf g : α → β\nhf : AEStronglyMeasurable f μ\nhg : AEStronglyMeasurable g μ\n⊢ NullMeasurableSet {a | f a < g a}\n[PROOFSTEP]\napply (hf.stronglyMeasurable_mk.measurableSet_lt hg.stronglyMeasurable_mk).nullMeasurableSet.congr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝² : LinearOrder β\ninst✝¹ : OrderClosedTopology β\ninst✝ : PseudoMetrizableSpace β\nf g : α → β\nhf : AEStronglyMeasurable f μ\nhg : AEStronglyMeasurable g μ\n⊢ {a | AEStronglyMeasurable.mk f hf a < AEStronglyMeasurable.mk g hg a} =ᶠ[ae μ] {a | f a < g a}\n[PROOFSTEP]\nfilter_upwards [hf.ae_eq_mk, hg.ae_eq_mk] with x hfx hgx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝² : LinearOrder β\ninst✝¹ : OrderClosedTopology β\ninst✝ : PseudoMetrizableSpace β\nf g : α → β\nhf : AEStronglyMeasurable f μ\nhg : AEStronglyMeasurable g μ\nx : α\nhfx : f x = AEStronglyMeasurable.mk f hf x\nhgx : g x = AEStronglyMeasurable.mk g hg x\n⊢ setOf (fun a => AEStronglyMeasurable.mk f hf a < AEStronglyMeasurable.mk g hg a) x = setOf (fun a => f a < g a) x\n[PROOFSTEP]\nchange (hf.mk f x < hg.mk g x) = (f x < g x)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝² : LinearOrder β\ninst✝¹ : OrderClosedTopology β\ninst✝ : PseudoMetrizableSpace β\nf g : α → β\nhf : AEStronglyMeasurable f μ\nhg : AEStronglyMeasurable g μ\nx : α\nhfx : f x = AEStronglyMeasurable.mk f hf x\nhgx : g x = AEStronglyMeasurable.mk g hg x\n⊢ (AEStronglyMeasurable.mk f hf x < AEStronglyMeasurable.mk g hg x) = (f x < g x)\n[PROOFSTEP]\nsimp only [hfx, hgx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝² : Preorder β\ninst✝¹ : OrderClosedTopology β\ninst✝ : PseudoMetrizableSpace β\nf g : α → β\nhf : AEStronglyMeasurable f μ\nhg : AEStronglyMeasurable g μ\n⊢ NullMeasurableSet {a | f a ≤ g a}\n[PROOFSTEP]\napply (hf.stronglyMeasurable_mk.measurableSet_le hg.stronglyMeasurable_mk).nullMeasurableSet.congr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝² : Preorder β\ninst✝¹ : OrderClosedTopology β\ninst✝ : PseudoMetrizableSpace β\nf g : α → β\nhf : AEStronglyMeasurable f μ\nhg : AEStronglyMeasurable g μ\n⊢ {a | AEStronglyMeasurable.mk f hf a ≤ AEStronglyMeasurable.mk g hg a} =ᶠ[ae μ] {a | f a ≤ g a}\n[PROOFSTEP]\nfilter_upwards [hf.ae_eq_mk, hg.ae_eq_mk] with x hfx hgx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝² : Preorder β\ninst✝¹ : OrderClosedTopology β\ninst✝ : PseudoMetrizableSpace β\nf g : α → β\nhf : AEStronglyMeasurable f μ\nhg : AEStronglyMeasurable g μ\nx : α\nhfx : f x = AEStronglyMeasurable.mk f hf x\nhgx : g x = AEStronglyMeasurable.mk g hg x\n⊢ setOf (fun a => AEStronglyMeasurable.mk f hf a ≤ AEStronglyMeasurable.mk g hg a) x = setOf (fun a => f a ≤ g a) x\n[PROOFSTEP]\nchange (hf.mk f x ≤ hg.mk g x) = (f x ≤ g x)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝² : Preorder β\ninst✝¹ : OrderClosedTopology β\ninst✝ : PseudoMetrizableSpace β\nf g : α → β\nhf : AEStronglyMeasurable f μ\nhg : AEStronglyMeasurable g μ\nx : α\nhfx : f x = AEStronglyMeasurable.mk f hf x\nhgx : g x = AEStronglyMeasurable.mk g hg x\n⊢ (AEStronglyMeasurable.mk f hf x ≤ AEStronglyMeasurable.mk g hg x) = (f x ≤ g x)\n[PROOFSTEP]\nsimp only [hfx, hgx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf g : α → β\nhf : AEStronglyMeasurable f μ\n⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, f x ∈ t\n[PROOFSTEP]\nrefine' ⟨range (hf.mk f), hf.stronglyMeasurable_mk.isSeparable_range, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf g : α → β\nhf : AEStronglyMeasurable f μ\n⊢ ∀ᵐ (x : α) ∂μ, f x ∈ range (AEStronglyMeasurable.mk f hf)\n[PROOFSTEP]\nfilter_upwards [hf.ae_eq_mk] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf g : α → β\nhf : AEStronglyMeasurable f μ\nx : α\nhx : f x = AEStronglyMeasurable.mk f hf x\n⊢ f x ∈ range (AEStronglyMeasurable.mk f hf)\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\n⊢ AEStronglyMeasurable f μ ↔ AEMeasurable f ∧ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, f x ∈ t\n[PROOFSTEP]\nrefine' ⟨fun H => ⟨H.aemeasurable, H.isSeparable_ae_range⟩, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\n⊢ (AEMeasurable f ∧ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, f x ∈ t) → AEStronglyMeasurable f μ\n[PROOFSTEP]\nrintro ⟨H, ⟨t, t_sep, ht⟩⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : AEMeasurable f\nt : Set β\nt_sep : IsSeparable t\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\n⊢ AEStronglyMeasurable f μ\n[PROOFSTEP]\nrcases eq_empty_or_nonempty t with (rfl | h₀)\n[GOAL]\ncase intro.intro.intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : AEMeasurable f\nt_sep : IsSeparable ∅\nht : ∀ᵐ (x : α) ∂μ, f x ∈ ∅\n⊢ AEStronglyMeasurable f μ\n[PROOFSTEP]\nsimp only [mem_empty_iff_false, eventually_false_iff_eq_bot, ae_eq_bot] at ht \n[GOAL]\ncase intro.intro.intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : AEMeasurable f\nt_sep : IsSeparable ∅\nht : μ = 0\n⊢ AEStronglyMeasurable f μ\n[PROOFSTEP]\nrw [ht]\n[GOAL]\ncase intro.intro.intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : AEMeasurable f\nt_sep : IsSeparable ∅\nht : μ = 0\n⊢ AEStronglyMeasurable f 0\n[PROOFSTEP]\nexact aestronglyMeasurable_zero_measure f\n[GOAL]\ncase intro.intro.intro.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g : α → β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : AEMeasurable f\nt : Set β\nt_sep : IsSeparable t\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\n⊢ AEStronglyMeasurable f μ\n[PROOFSTEP]\nobtain ⟨g, g_meas, gt, fg⟩ : ∃ g : α → β, Measurable g ∧ range g ⊆ t ∧ f =ᵐ[μ] g := H.exists_ae_eq_range_subset ht h₀\n[GOAL]\ncase intro.intro.intro.inr.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g✝ : α → β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : AEMeasurable f\nt : Set β\nt_sep : IsSeparable t\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ng : α → β\ng_meas : Measurable g\ngt : range g ⊆ t\nfg : f =ᶠ[ae μ] g\n⊢ AEStronglyMeasurable f μ\n[PROOFSTEP]\nrefine' ⟨g, _, fg⟩\n[GOAL]\ncase intro.intro.intro.inr.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf g✝ : α → β\ninst✝² : PseudoMetrizableSpace β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nH : AEMeasurable f\nt : Set β\nt_sep : IsSeparable t\nht : ∀ᵐ (x : α) ∂μ, f x ∈ t\nh₀ : Set.Nonempty t\ng : α → β\ng_meas : Measurable g\ngt : range g ⊆ t\nfg : f =ᶠ[ae μ] g\n⊢ StronglyMeasurable g\n[PROOFSTEP]\nexact stronglyMeasurable_iff_measurable_separable.2 ⟨g_meas, t_sep.mono gt⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nm : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ✝\nf✝ g✝ : α → β\nγ : Type u_5\nmγ : MeasurableSpace γ\nmα : MeasurableSpace α\nf : γ → α\nμ : Measure γ\nhf : MeasurableEmbedding f\ng : α → β\n⊢ AEStronglyMeasurable g (Measure.map f μ) ↔ AEStronglyMeasurable (g ∘ f) μ\n[PROOFSTEP]\nrefine' ⟨fun H => H.comp_measurable hf.measurable, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nm : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ✝\nf✝ g✝ : α → β\nγ : Type u_5\nmγ : MeasurableSpace γ\nmα : MeasurableSpace α\nf : γ → α\nμ : Measure γ\nhf : MeasurableEmbedding f\ng : α → β\n⊢ AEStronglyMeasurable (g ∘ f) μ → AEStronglyMeasurable g (Measure.map f μ)\n[PROOFSTEP]\nrintro ⟨g₁, hgm₁, heq⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nm : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ✝\nf✝ g✝ : α → β\nγ : Type u_5\nmγ : MeasurableSpace γ\nmα : MeasurableSpace α\nf : γ → α\nμ : Measure γ\nhf : MeasurableEmbedding f\ng : α → β\ng₁ : γ → β\nhgm₁ : StronglyMeasurable g₁\nheq : g ∘ f =ᶠ[ae μ] g₁\n⊢ AEStronglyMeasurable g (Measure.map f μ)\n[PROOFSTEP]\nrcases hf.exists_stronglyMeasurable_extend hgm₁ fun x => ⟨g x⟩ with ⟨g₂, hgm₂, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ✝ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nm : MeasurableSpace α\nμ✝ : Measure α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ✝\nf✝ g✝ : α → β\nγ : Type u_5\nmγ : MeasurableSpace γ\nmα : MeasurableSpace α\nf : γ → α\nμ : Measure γ\nhf : MeasurableEmbedding f\ng g₂ : α → β\nhgm₂ : StronglyMeasurable g₂\nhgm₁ : StronglyMeasurable (g₂ ∘ f)\nheq : g ∘ f =ᶠ[ae μ] g₂ ∘ f\n⊢ AEStronglyMeasurable g (Measure.map f μ)\n[PROOFSTEP]\nexact ⟨g₂, hgm₂, hf.ae_map_iff.2 heq⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\n⊢ AEStronglyMeasurable (fun x => g (f x)) μ ↔ AEStronglyMeasurable f μ\n[PROOFSTEP]\nletI := pseudoMetrizableSpacePseudoMetric γ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\n⊢ AEStronglyMeasurable (fun x => g (f x)) μ ↔ AEStronglyMeasurable f μ\n[PROOFSTEP]\nborelize β γ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\n⊢ AEStronglyMeasurable (fun x => g (f x)) μ ↔ AEStronglyMeasurable f μ\n[PROOFSTEP]\nrefine'\n  ⟨fun H => aestronglyMeasurable_iff_aemeasurable_separable.2 ⟨_, _⟩, fun H =>\n    hg.continuous.comp_aestronglyMeasurable H⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : AEStronglyMeasurable (fun x => g (f x)) μ\n⊢ AEMeasurable f\n[PROOFSTEP]\nlet G : β → range g := codRestrict g (range g) mem_range_self\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : AEStronglyMeasurable (fun x => g (f x)) μ\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave hG : ClosedEmbedding G :=\n  { hg.codRestrict _ _ with\n    closed_range := by\n      convert isClosed_univ (α := ↥(range g))\n      apply eq_univ_of_forall\n      rintro ⟨-, ⟨x, rfl⟩⟩\n      exact mem_range_self x }\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : AEStronglyMeasurable (fun x => g (f x)) μ\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\nsrc✝ : _root_.Embedding (codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)) :=\n  Embedding.codRestrict hg (range g) mem_range_self\n⊢ IsClosed (range G)\n[PROOFSTEP]\nconvert isClosed_univ (α := ↥(range g))\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : AEStronglyMeasurable (fun x => g (f x)) μ\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\nsrc✝ : _root_.Embedding (codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)) :=\n  Embedding.codRestrict hg (range g) mem_range_self\n⊢ range G = univ\n[PROOFSTEP]\napply eq_univ_of_forall\n[GOAL]\ncase h.e'_3.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : AEStronglyMeasurable (fun x => g (f x)) μ\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\nsrc✝ : _root_.Embedding (codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)) :=\n  Embedding.codRestrict hg (range g) mem_range_self\n⊢ ∀ (x : ↑(range g)), x ∈ range G\n[PROOFSTEP]\nrintro ⟨-, ⟨x, rfl⟩⟩\n[GOAL]\ncase h.e'_3.a.mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : AEStronglyMeasurable (fun x => g (f x)) μ\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\nsrc✝ : _root_.Embedding (codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)) :=\n  Embedding.codRestrict hg (range g) mem_range_self\nx : β\n⊢ { val := g x, property := (_ : ∃ y, g y = g x) } ∈ range G\n[PROOFSTEP]\nexact mem_range_self x\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : AEStronglyMeasurable (fun x => g (f x)) μ\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\nhG : ClosedEmbedding G\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave : AEMeasurable (G ∘ f) μ := AEMeasurable.subtype_mk H.aemeasurable\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis✝⁴ : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : AEStronglyMeasurable (fun x => g (f x)) μ\nG : β → ↑(range g) := codRestrict g (range g) (_ : ∀ (i : β), g i ∈ range fun x => g x)\nhG : ClosedEmbedding G\nthis : AEMeasurable (G ∘ f)\n⊢ AEMeasurable f\n[PROOFSTEP]\nexact hG.measurableEmbedding.aemeasurable_comp_iff.1 this\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : AEStronglyMeasurable (fun x => g (f x)) μ\n⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, f x ∈ t\n[PROOFSTEP]\nrcases(aestronglyMeasurable_iff_aemeasurable_separable.1 H).2 with ⟨t, ht, h't⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : PseudoMetrizableSpace γ\ng : β → γ\nf : α → β\nhg : _root_.Embedding g\nthis : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ\nthis✝³ : MeasurableSpace β := borel β\nthis✝² : BorelSpace β\nthis✝¹ : MeasurableSpace γ := borel γ\nthis✝ : BorelSpace γ\nH : AEStronglyMeasurable (fun x => g (f x)) μ\nt : Set γ\nht : IsSeparable t\nh't : ∀ᵐ (x : α) ∂μ, g (f x) ∈ t\n⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, f x ∈ t\n[PROOFSTEP]\nexact ⟨g ⁻¹' t, hg.isSeparable_preimage ht, h't⟩\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹ : TopologicalSpace β✝\ninst✝ : TopologicalSpace γ\nf✝ g✝ : α → β✝\nβ : Type u_5\nf : α → β\nmα : MeasurableSpace α\nμa : Measure α\nmβ : MeasurableSpace β\nμb : Measure β\nhf : MeasurePreserving f\nh₂ : MeasurableEmbedding f\ng : β → γ\n⊢ AEStronglyMeasurable (g ∘ f) μa ↔ AEStronglyMeasurable g μb\n[PROOFSTEP]\nrw [← hf.map_eq, h₂.aestronglyMeasurable_map_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\nι : Type u_5\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nlim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))\n⊢ AEStronglyMeasurable g μ\n[PROOFSTEP]\nborelize β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\nι : Type u_5\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nlim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ AEStronglyMeasurable g μ\n[PROOFSTEP]\nrefine' aestronglyMeasurable_iff_aemeasurable_separable.2 ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\nι : Type u_5\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nlim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ AEMeasurable g\n[PROOFSTEP]\nexact aemeasurable_of_tendsto_metrizable_ae _ (fun n => (hf n).aemeasurable) lim\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\nι : Type u_5\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nlim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, g x ∈ t\n[PROOFSTEP]\nrcases u.exists_seq_tendsto with ⟨v, hv⟩\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\nι : Type u_5\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nlim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\n⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, g x ∈ t\n[PROOFSTEP]\nhave : ∀ n : ℕ, ∃ t : Set β, IsSeparable t ∧ f (v n) ⁻¹' t ∈ μ.ae := fun n =>\n  (aestronglyMeasurable_iff_aemeasurable_separable.1 (hf (v n))).2\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\nι : Type u_5\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nlim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nthis : ∀ (n : ℕ), ∃ t, IsSeparable t ∧ f (v n) ⁻¹' t ∈ ae μ\n⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, g x ∈ t\n[PROOFSTEP]\nchoose t t_sep ht using this\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\nι : Type u_5\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nlim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nt : ℕ → Set β\nt_sep : ∀ (n : ℕ), IsSeparable (t n)\nht : ∀ (n : ℕ), f (v n) ⁻¹' t n ∈ ae μ\n⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, g x ∈ t\n[PROOFSTEP]\nrefine' ⟨closure (⋃ i, t i), (isSeparable_iUnion fun i => t_sep i).closure, _⟩\n[GOAL]\ncase refine'_2.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\nι : Type u_5\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nlim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nt : ℕ → Set β\nt_sep : ∀ (n : ℕ), IsSeparable (t n)\nht : ∀ (n : ℕ), f (v n) ⁻¹' t n ∈ ae μ\n⊢ ∀ᵐ (x : α) ∂μ, g x ∈ closure (⋃ (i : ℕ), t i)\n[PROOFSTEP]\nfilter_upwards [ae_all_iff.2 ht, lim] with x hx h'x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\nι : Type u_5\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nlim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nt : ℕ → Set β\nt_sep : ∀ (n : ℕ), IsSeparable (t n)\nht : ∀ (n : ℕ), f (v n) ⁻¹' t n ∈ ae μ\nx : α\nhx : ∀ (i : ℕ), f (v i) x ∈ t i\nh'x : Tendsto (fun n => f n x) u (𝓝 (g x))\n⊢ g x ∈ closure (⋃ (i : ℕ), t i)\n[PROOFSTEP]\napply mem_closure_of_tendsto (h'x.comp hv)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\nι : Type u_5\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nlim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nt : ℕ → Set β\nt_sep : ∀ (n : ℕ), IsSeparable (t n)\nht : ∀ (n : ℕ), f (v n) ⁻¹' t n ∈ ae μ\nx : α\nhx : ∀ (i : ℕ), f (v i) x ∈ t i\nh'x : Tendsto (fun n => f n x) u (𝓝 (g x))\n⊢ ∀ᶠ (x_1 : ℕ) in atTop, ((fun n => f n x) ∘ v) x_1 ∈ ⋃ (i : ℕ), t i\n[PROOFSTEP]\nrefine eventually_of_forall fun n => ?_\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\nι : Type u_5\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nlim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nt : ℕ → Set β\nt_sep : ∀ (n : ℕ), IsSeparable (t n)\nht : ∀ (n : ℕ), f (v n) ⁻¹' t n ∈ ae μ\nx : α\nhx : ∀ (i : ℕ), f (v i) x ∈ t i\nh'x : Tendsto (fun n => f n x) u (𝓝 (g x))\nn : ℕ\n⊢ ((fun n => f n x) ∘ v) n ∈ ⋃ (i : ℕ), t i\n[PROOFSTEP]\napply mem_iUnion_of_mem n\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁵ : Countable ι✝\nm : MeasurableSpace α\nμ : Measure α\ninst✝⁴ : TopologicalSpace β\ninst✝³ : TopologicalSpace γ\nf✝ g✝ : α → β\nι : Type u_5\ninst✝² : PseudoMetrizableSpace β\nu : Filter ι\ninst✝¹ : NeBot u\ninst✝ : IsCountablyGenerated u\nf : ι → α → β\ng : α → β\nhf : ∀ (i : ι), AEStronglyMeasurable (f i) μ\nlim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nv : ℕ → ι\nhv : Tendsto v atTop u\nt : ℕ → Set β\nt_sep : ∀ (n : ℕ), IsSeparable (t n)\nht : ∀ (n : ℕ), f (v n) ⁻¹' t n ∈ ae μ\nx : α\nhx : ∀ (i : ℕ), f (v i) x ∈ t i\nh'x : Tendsto (fun n => f n x) u (𝓝 (g x))\nn : ℕ\n⊢ ((fun n => f n x) ∘ v) n ∈ t n\n[PROOFSTEP]\nexact hx n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf✝ g : α → β\ninst✝ : PseudoMetrizableSpace β\nf : ℕ → α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nh_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\n⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n[PROOFSTEP]\nborelize β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf✝ g : α → β\ninst✝ : PseudoMetrizableSpace β\nf : ℕ → α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nh_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n[PROOFSTEP]\nobtain ⟨g, _, hg⟩ : ∃ (g : α → β) (_ : Measurable g), ∀ᵐ x ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x)) :=\n  measurable_limit_of_tendsto_metrizable_ae (fun n => (hf n).aemeasurable) h_ae_tendsto\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝ : PseudoMetrizableSpace β\nf : ℕ → α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nh_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\ng : α → β\nw✝ : Measurable g\nhg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\n⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n[PROOFSTEP]\nhave Hg : AEStronglyMeasurable g μ := aestronglyMeasurable_of_tendsto_ae _ hf hg\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝ : PseudoMetrizableSpace β\nf : ℕ → α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nh_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\ng : α → β\nw✝ : Measurable g\nhg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nHg : AEStronglyMeasurable g μ\n⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))\n[PROOFSTEP]\nrefine' ⟨Hg.mk g, Hg.stronglyMeasurable_mk, _⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝ : PseudoMetrizableSpace β\nf : ℕ → α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nh_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\ng : α → β\nw✝ : Measurable g\nhg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nHg : AEStronglyMeasurable g μ\n⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (AEStronglyMeasurable.mk g Hg x))\n[PROOFSTEP]\nfilter_upwards [hg, Hg.ae_eq_mk] with x hx h'x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf✝ g✝ : α → β\ninst✝ : PseudoMetrizableSpace β\nf : ℕ → α → β\nhf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ\nh_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) atTop (𝓝 l)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\ng : α → β\nw✝ : Measurable g\nhg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))\nHg : AEStronglyMeasurable g μ\nx : α\nhx : Tendsto (fun n => f n x) atTop (𝓝 (g x))\nh'x : g x = AEStronglyMeasurable.mk g Hg x\n⊢ Tendsto (fun n => f n x) atTop (𝓝 (AEStronglyMeasurable.mk g Hg x))\n[PROOFSTEP]\nrwa [h'x] at hx \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm✝ : MeasurableSpace α\nμ✝ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : PseudoMetrizableSpace β\nm : MeasurableSpace α\nμ : ι → Measure α\nh : ∀ (i : ι), AEStronglyMeasurable f (μ i)\n⊢ AEStronglyMeasurable f (sum μ)\n[PROOFSTEP]\nborelize β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm✝ : MeasurableSpace α\nμ✝ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : PseudoMetrizableSpace β\nm : MeasurableSpace α\nμ : ι → Measure α\nh : ∀ (i : ι), AEStronglyMeasurable f (μ i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ AEStronglyMeasurable f (sum μ)\n[PROOFSTEP]\nrefine' aestronglyMeasurable_iff_aemeasurable_separable.2 ⟨AEMeasurable.sum_measure fun i => (h i).aemeasurable, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm✝ : MeasurableSpace α\nμ✝ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : PseudoMetrizableSpace β\nm : MeasurableSpace α\nμ : ι → Measure α\nh : ∀ (i : ι), AEStronglyMeasurable f (μ i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂sum μ, f x ∈ t\n[PROOFSTEP]\nhave A : ∀ i : ι, ∃ t : Set β, IsSeparable t ∧ f ⁻¹' t ∈ (μ i).ae := fun i =>\n  (aestronglyMeasurable_iff_aemeasurable_separable.1 (h i)).2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm✝ : MeasurableSpace α\nμ✝ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : PseudoMetrizableSpace β\nm : MeasurableSpace α\nμ : ι → Measure α\nh : ∀ (i : ι), AEStronglyMeasurable f (μ i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nA : ∀ (i : ι), ∃ t, IsSeparable t ∧ f ⁻¹' t ∈ ae (μ i)\n⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂sum μ, f x ∈ t\n[PROOFSTEP]\nchoose t t_sep ht using A\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm✝ : MeasurableSpace α\nμ✝ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : PseudoMetrizableSpace β\nm : MeasurableSpace α\nμ : ι → Measure α\nh : ∀ (i : ι), AEStronglyMeasurable f (μ i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt : ι → Set β\nt_sep : ∀ (i : ι), IsSeparable (t i)\nht : ∀ (i : ι), f ⁻¹' t i ∈ ae (μ i)\n⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂sum μ, f x ∈ t\n[PROOFSTEP]\nrefine' ⟨⋃ i, t i, isSeparable_iUnion t_sep, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm✝ : MeasurableSpace α\nμ✝ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : PseudoMetrizableSpace β\nm : MeasurableSpace α\nμ : ι → Measure α\nh : ∀ (i : ι), AEStronglyMeasurable f (μ i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt : ι → Set β\nt_sep : ∀ (i : ι), IsSeparable (t i)\nht : ∀ (i : ι), f ⁻¹' t i ∈ ae (μ i)\n⊢ ∀ᵐ (x : α) ∂sum μ, f x ∈ ⋃ (i : ι), t i\n[PROOFSTEP]\nsimp only [Measure.ae_sum_eq, mem_iUnion, eventually_iSup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm✝ : MeasurableSpace α\nμ✝ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : PseudoMetrizableSpace β\nm : MeasurableSpace α\nμ : ι → Measure α\nh : ∀ (i : ι), AEStronglyMeasurable f (μ i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt : ι → Set β\nt_sep : ∀ (i : ι), IsSeparable (t i)\nht : ∀ (i : ι), f ⁻¹' t i ∈ ae (μ i)\n⊢ ∀ (b : ι), ∀ᵐ (x : α) ∂μ b, ∃ i, f x ∈ t i\n[PROOFSTEP]\nintro i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm✝ : MeasurableSpace α\nμ✝ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : PseudoMetrizableSpace β\nm : MeasurableSpace α\nμ : ι → Measure α\nh : ∀ (i : ι), AEStronglyMeasurable f (μ i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt : ι → Set β\nt_sep : ∀ (i : ι), IsSeparable (t i)\nht : ∀ (i : ι), f ⁻¹' t i ∈ ae (μ i)\ni : ι\n⊢ ∀ᵐ (x : α) ∂μ i, ∃ i, f x ∈ t i\n[PROOFSTEP]\nfilter_upwards [ht i] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm✝ : MeasurableSpace α\nμ✝ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : PseudoMetrizableSpace β\nm : MeasurableSpace α\nμ : ι → Measure α\nh : ∀ (i : ι), AEStronglyMeasurable f (μ i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt : ι → Set β\nt_sep : ∀ (i : ι), IsSeparable (t i)\nht : ∀ (i : ι), f ⁻¹' t i ∈ ae (μ i)\ni : ι\nx : α\nhx : x ∈ f ⁻¹' t i\n⊢ ∃ i, f x ∈ t i\n[PROOFSTEP]\nexact ⟨i, hx⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : PseudoMetrizableSpace β\nν : Measure α\n⊢ AEStronglyMeasurable f (μ + ν) ↔ AEStronglyMeasurable f μ ∧ AEStronglyMeasurable f ν\n[PROOFSTEP]\nrw [← sum_cond, aestronglyMeasurable_sum_measure_iff, Bool.forall_bool, and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : PseudoMetrizableSpace β\nν : Measure α\n⊢ AEStronglyMeasurable f (bif true then μ else ν) ∧ AEStronglyMeasurable f (bif false then μ else ν) ↔\n    AEStronglyMeasurable f μ ∧ AEStronglyMeasurable f ν\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\nf g : α → β\ninst✝ : PseudoMetrizableSpace β\ns t : Set α\n⊢ AEStronglyMeasurable f (Measure.restrict μ (s ∪ t)) ↔\n    AEStronglyMeasurable f (Measure.restrict μ s) ∧ AEStronglyMeasurable f (Measure.restrict μ t)\n[PROOFSTEP]\nsimp only [union_eq_iUnion, aestronglyMeasurable_iUnion_iff, Bool.forall_bool, cond, and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g : α → β\ninst✝¹ : LinearOrder α\ninst✝ : PseudoMetrizableSpace β\nf : α → β\na b : α\n⊢ AEStronglyMeasurable f (Measure.restrict μ (Ι a b)) ↔\n    AEStronglyMeasurable f (Measure.restrict μ (Ioc a b)) ∧ AEStronglyMeasurable f (Measure.restrict μ (Ioc b a))\n[PROOFSTEP]\nrw [uIoc_eq_union, aestronglyMeasurable_union_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹¹ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝¹⁰ : TopologicalSpace β\ninst✝⁹ : TopologicalSpace γ\nf g : α → β\nM : Type u_5\nG : Type u_6\nG₀ : Type u_7\ninst✝⁸ : Monoid M\ninst✝⁷ : MulAction M β\ninst✝⁶ : ContinuousConstSMul M β\ninst✝⁵ : Group G\ninst✝⁴ : MulAction G β\ninst✝³ : ContinuousConstSMul G β\ninst✝² : GroupWithZero G₀\ninst✝¹ : MulAction G₀ β\ninst✝ : ContinuousConstSMul G₀ β\nc : G\nh : AEStronglyMeasurable (fun x => c • f x) μ\n⊢ AEStronglyMeasurable f μ\n[PROOFSTEP]\nsimpa only [inv_smul_smul] using h.const_smul' c⁻¹\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\n⊢ AEStronglyMeasurable g (withDensity μ fun x => ↑(f x)) ↔ AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\n⊢ AEStronglyMeasurable g (withDensity μ fun x => ↑(f x)) → AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n[PROOFSTEP]\nrintro ⟨g', g'meas, hg'⟩\n[GOAL]\ncase mp.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : g =ᶠ[ae (withDensity μ fun x => ↑(f x))] g'\n⊢ AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n[PROOFSTEP]\nhave A : MeasurableSet {x : α | f x ≠ 0} := (hf (measurableSet_singleton 0)).compl\n[GOAL]\ncase mp.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : g =ᶠ[ae (withDensity μ fun x => ↑(f x))] g'\nA : MeasurableSet {x | f x ≠ 0}\n⊢ AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n[PROOFSTEP]\nrefine' ⟨fun x => (f x : ℝ) • g' x, hf.coe_nnreal_real.stronglyMeasurable.smul g'meas, _⟩\n[GOAL]\ncase mp.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : g =ᶠ[ae (withDensity μ fun x => ↑(f x))] g'\nA : MeasurableSet {x | f x ≠ 0}\n⊢ (fun x => ↑(f x) • g x) =ᶠ[ae μ] fun x => ↑(f x) • g' x\n[PROOFSTEP]\napply @ae_of_ae_restrict_of_ae_restrict_compl _ _ _ {x | f x ≠ 0}\n[GOAL]\ncase mp.intro.intro.ht\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : g =ᶠ[ae (withDensity μ fun x => ↑(f x))] g'\nA : MeasurableSet {x | f x ≠ 0}\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ {x | f x ≠ 0}, (fun x => ↑(f x) • g x) x = (fun x => ↑(f x) • g' x) x\n[PROOFSTEP]\nrw [EventuallyEq, ae_withDensity_iff hf.coe_nnreal_ennreal] at hg' \n[GOAL]\ncase mp.intro.intro.ht\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : ∀ᵐ (x : α) ∂μ, ↑(f x) ≠ 0 → g x = g' x\nA : MeasurableSet {x | f x ≠ 0}\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ {x | f x ≠ 0}, (fun x => ↑(f x) • g x) x = (fun x => ↑(f x) • g' x) x\n[PROOFSTEP]\nrw [ae_restrict_iff' A]\n[GOAL]\ncase mp.intro.intro.ht\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : ∀ᵐ (x : α) ∂μ, ↑(f x) ≠ 0 → g x = g' x\nA : MeasurableSet {x | f x ≠ 0}\n⊢ ∀ᵐ (x : α) ∂μ, x ∈ {x | f x ≠ 0} → (fun x => ↑(f x) • g x) x = (fun x => ↑(f x) • g' x) x\n[PROOFSTEP]\nfilter_upwards [hg'] with a ha h'a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : ∀ᵐ (x : α) ∂μ, ↑(f x) ≠ 0 → g x = g' x\nA : MeasurableSet {x | f x ≠ 0}\na : α\nha : ↑(f a) ≠ 0 → g a = g' a\nh'a : f a ≠ 0\n⊢ ↑(f a) • g a = ↑(f a) • g' a\n[PROOFSTEP]\nhave : (f a : ℝ≥0∞) ≠ 0 := by simpa only [Ne.def, ENNReal.coe_eq_zero] using h'a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : ∀ᵐ (x : α) ∂μ, ↑(f x) ≠ 0 → g x = g' x\nA : MeasurableSet {x | f x ≠ 0}\na : α\nha : ↑(f a) ≠ 0 → g a = g' a\nh'a : f a ≠ 0\n⊢ ↑(f a) ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, ENNReal.coe_eq_zero] using h'a\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : ∀ᵐ (x : α) ∂μ, ↑(f x) ≠ 0 → g x = g' x\nA : MeasurableSet {x | f x ≠ 0}\na : α\nha : ↑(f a) ≠ 0 → g a = g' a\nh'a : f a ≠ 0\nthis : ↑(f a) ≠ 0\n⊢ ↑(f a) • g a = ↑(f a) • g' a\n[PROOFSTEP]\nrw [ha this]\n[GOAL]\ncase mp.intro.intro.htc\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : g =ᶠ[ae (withDensity μ fun x => ↑(f x))] g'\nA : MeasurableSet {x | f x ≠ 0}\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ {x | f x ≠ 0}ᶜ, (fun x => ↑(f x) • g x) x = (fun x => ↑(f x) • g' x) x\n[PROOFSTEP]\nfilter_upwards [ae_restrict_mem A.compl] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : g =ᶠ[ae (withDensity μ fun x => ↑(f x))] g'\nA : MeasurableSet {x | f x ≠ 0}\nx : α\nhx : x ∈ {x | f x ≠ 0}ᶜ\n⊢ ↑(f x) • g x = ↑(f x) • g' x\n[PROOFSTEP]\nsimp only [Classical.not_not, mem_setOf_eq, mem_compl_iff] at hx \n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : g =ᶠ[ae (withDensity μ fun x => ↑(f x))] g'\nA : MeasurableSet {x | f x ≠ 0}\nx : α\nhx : f x = 0\n⊢ ↑(f x) • g x = ↑(f x) • g' x\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\n⊢ AEStronglyMeasurable (fun x => ↑(f x) • g x) μ → AEStronglyMeasurable g (withDensity μ fun x => ↑(f x))\n[PROOFSTEP]\nrintro ⟨g', g'meas, hg'⟩\n[GOAL]\ncase mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : (fun x => ↑(f x) • g x) =ᶠ[ae μ] g'\n⊢ AEStronglyMeasurable g (withDensity μ fun x => ↑(f x))\n[PROOFSTEP]\nrefine' ⟨fun x => (f x : ℝ)⁻¹ • g' x, hf.coe_nnreal_real.inv.stronglyMeasurable.smul g'meas, _⟩\n[GOAL]\ncase mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : (fun x => ↑(f x) • g x) =ᶠ[ae μ] g'\n⊢ g =ᶠ[ae (withDensity μ fun x => ↑(f x))] fun x => (↑(f x))⁻¹ • g' x\n[PROOFSTEP]\nrw [EventuallyEq, ae_withDensity_iff hf.coe_nnreal_ennreal]\n[GOAL]\ncase mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : (fun x => ↑(f x) • g x) =ᶠ[ae μ] g'\n⊢ ∀ᵐ (x : α) ∂μ, ↑(f x) ≠ 0 → g x = (↑(f x))⁻¹ • g' x\n[PROOFSTEP]\nfilter_upwards [hg'] with x hx h'x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : (fun x => ↑(f x) • g x) =ᶠ[ae μ] g'\nx : α\nhx : ↑(f x) • g x = g' x\nh'x : ↑(f x) ≠ 0\n⊢ g x = (↑(f x))⁻¹ • g' x\n[PROOFSTEP]\nrw [← hx, smul_smul, _root_.inv_mul_cancel, one_smul]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : (fun x => ↑(f x) • g x) =ᶠ[ae μ] g'\nx : α\nhx : ↑(f x) • g x = g' x\nh'x : ↑(f x) ≠ 0\n⊢ ↑(f x) ≠ 0\n[PROOFSTEP]\nsimp only [Ne.def, ENNReal.coe_eq_zero] at h'x \n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁴ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝³ : TopologicalSpace β\ninst✝² : TopologicalSpace γ\nf✝ g✝ : α → β\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng g' : α → E\ng'meas : StronglyMeasurable g'\nhg' : (fun x => ↑(f x) • g x) =ᶠ[ae μ] g'\nx : α\nhx : ↑(f x) • g x = g' x\nh'x : ¬f x = 0\n⊢ ↑(f x) ≠ 0\n[PROOFSTEP]\nsimpa only [NNReal.coe_eq_zero, Ne.def] using h'x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\nf g : α → β\ninst✝¹ : Zero β\ninst✝ : T2Space β\nhf : AEFinStronglyMeasurable f μ\n⊢ ∃ t, MeasurableSet t ∧ f =ᶠ[ae (Measure.restrict μ tᶜ)] 0 ∧ SigmaFinite (Measure.restrict μ t)\n[PROOFSTEP]\nrcases hf with ⟨g, hg, hfg⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\nf g✝ : α → β\ninst✝¹ : Zero β\ninst✝ : T2Space β\ng : α → β\nhg : FinStronglyMeasurable g μ\nhfg : f =ᶠ[ae μ] g\n⊢ ∃ t, MeasurableSet t ∧ f =ᶠ[ae (Measure.restrict μ tᶜ)] 0 ∧ SigmaFinite (Measure.restrict μ t)\n[PROOFSTEP]\nobtain ⟨t, ht, hgt_zero, htμ⟩ := hg.exists_set_sigmaFinite\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\nf g✝ : α → β\ninst✝¹ : Zero β\ninst✝ : T2Space β\ng : α → β\nhg : FinStronglyMeasurable g μ\nhfg : f =ᶠ[ae μ] g\nt : Set α\nht : MeasurableSet t\nhgt_zero : ∀ (x : α), x ∈ tᶜ → g x = 0\nhtμ : SigmaFinite (Measure.restrict μ t)\n⊢ ∃ t, MeasurableSet t ∧ f =ᶠ[ae (Measure.restrict μ tᶜ)] 0 ∧ SigmaFinite (Measure.restrict μ t)\n[PROOFSTEP]\nrefine' ⟨t, ht, _, htμ⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\nf g✝ : α → β\ninst✝¹ : Zero β\ninst✝ : T2Space β\ng : α → β\nhg : FinStronglyMeasurable g μ\nhfg : f =ᶠ[ae μ] g\nt : Set α\nht : MeasurableSet t\nhgt_zero : ∀ (x : α), x ∈ tᶜ → g x = 0\nhtμ : SigmaFinite (Measure.restrict μ t)\n⊢ f =ᶠ[ae (Measure.restrict μ tᶜ)] 0\n[PROOFSTEP]\nrefine' EventuallyEq.trans (ae_restrict_of_ae hfg) _\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\nf g✝ : α → β\ninst✝¹ : Zero β\ninst✝ : T2Space β\ng : α → β\nhg : FinStronglyMeasurable g μ\nhfg : f =ᶠ[ae μ] g\nt : Set α\nht : MeasurableSet t\nhgt_zero : ∀ (x : α), x ∈ tᶜ → g x = 0\nhtμ : SigmaFinite (Measure.restrict μ t)\n⊢ (fun x => g x) =ᶠ[ae (Measure.restrict μ tᶜ)] 0\n[PROOFSTEP]\nrw [EventuallyEq, ae_restrict_iff' ht.compl]\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : Countable ι\nm : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace β\nf g✝ : α → β\ninst✝¹ : Zero β\ninst✝ : T2Space β\ng : α → β\nhg : FinStronglyMeasurable g μ\nhfg : f =ᶠ[ae μ] g\nt : Set α\nht : MeasurableSet t\nhgt_zero : ∀ (x : α), x ∈ tᶜ → g x = 0\nhtμ : SigmaFinite (Measure.restrict μ t)\n⊢ ∀ᵐ (x : α) ∂μ, x ∈ tᶜ → g x = OfNat.ofNat 0 x\n[PROOFSTEP]\nexact eventually_of_forall hgt_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝⁵ : Countable ι\nG : Type u_5\np : ℝ≥0∞\nm m0 : MeasurableSpace α\nμ✝ : Measure α\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : MeasurableSpace G\ninst✝² : BorelSpace G\ninst✝¹ : SecondCountableTopology G\nf : α → G\n_m0 : MeasurableSpace α\nμ : Measure α\ninst✝ : SigmaFinite μ\n⊢ AEFinStronglyMeasurable f μ ↔ AEMeasurable f\n[PROOFSTEP]\nsimp_rw [AEFinStronglyMeasurable, AEMeasurable, finStronglyMeasurable_iff_measurable]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\n⊢ Measurable (uncurry u)\n[PROOFSTEP]\nobtain ⟨t_sf, ht_sf⟩ : ∃ t : ℕ → SimpleFunc ι ι, ∀ j x, Tendsto (fun n => u (t n j) x) atTop (𝓝 <| u j x) :=\n  by\n  have h_str_meas : StronglyMeasurable (id : ι → ι) := stronglyMeasurable_id\n  refine' ⟨h_str_meas.approx, fun j x => _⟩\n  exact ((hu_cont x).tendsto j).comp (h_str_meas.tendsto_approx j)\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\n⊢ ∃ t, ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t n) j) x) atTop (𝓝 (u j x))\n[PROOFSTEP]\nhave h_str_meas : StronglyMeasurable (id : ι → ι) := stronglyMeasurable_id\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nh_str_meas : StronglyMeasurable id\n⊢ ∃ t, ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t n) j) x) atTop (𝓝 (u j x))\n[PROOFSTEP]\nrefine' ⟨h_str_meas.approx, fun j x => _⟩\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nh_str_meas : StronglyMeasurable id\nj : ι\nx : α\n⊢ Tendsto (fun n => u (↑(StronglyMeasurable.approx h_str_meas n) j) x) atTop (𝓝 (u j x))\n[PROOFSTEP]\nexact ((hu_cont x).tendsto j).comp (h_str_meas.tendsto_approx j)\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\n⊢ Measurable (uncurry u)\n[PROOFSTEP]\nlet U (n : ℕ) (p : ι × α) := u (t_sf n p.fst) p.snd\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\n⊢ Measurable (uncurry u)\n[PROOFSTEP]\nhave h_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd) :=\n  by\n  rw [tendsto_pi_nhds]\n  exact fun p => ht_sf p.fst p.snd\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\n⊢ Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\n[PROOFSTEP]\nrw [tendsto_pi_nhds]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\n⊢ ∀ (x : ι × α), Tendsto (fun i => U i x) atTop (𝓝 (u x.fst x.snd))\n[PROOFSTEP]\nexact fun p => ht_sf p.fst p.snd\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\n⊢ Measurable (uncurry u)\n[PROOFSTEP]\nrefine' measurable_of_tendsto_metrizable (fun n => _) h_tendsto\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\n⊢ Measurable (U n)\n[PROOFSTEP]\nhave h_meas : Measurable fun p : (t_sf n).range × α => u (↑p.fst) p.snd :=\n  by\n  have :\n    (fun p : ↥(t_sf n).range × α => u (↑p.fst) p.snd) = (fun p : α × (t_sf n).range => u (↑p.snd) p.fst) ∘ Prod.swap :=\n    rfl\n  rw [this, @measurable_swap_iff α (↥(t_sf n).range) β m]\n  exact measurable_from_prod_countable fun j => h j\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\n⊢ Measurable fun p => u (↑p.fst) p.snd\n[PROOFSTEP]\nhave :\n  (fun p : ↥(t_sf n).range × α => u (↑p.fst) p.snd) = (fun p : α × (t_sf n).range => u (↑p.snd) p.fst) ∘ Prod.swap :=\n  rfl\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nthis : (fun p => u (↑p.fst) p.snd) = (fun p => u (↑p.snd) p.fst) ∘ Prod.swap\n⊢ Measurable fun p => u (↑p.fst) p.snd\n[PROOFSTEP]\nrw [this, @measurable_swap_iff α (↥(t_sf n).range) β m]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nthis : (fun p => u (↑p.fst) p.snd) = (fun p => u (↑p.snd) p.fst) ∘ Prod.swap\n⊢ Measurable fun p => u (↑p.snd) p.fst\n[PROOFSTEP]\nexact measurable_from_prod_countable fun j => h j\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nh_meas : Measurable fun p => u (↑p.fst) p.snd\n⊢ Measurable (U n)\n[PROOFSTEP]\nhave :\n  (fun p : ι × α => u (t_sf n p.fst) p.snd) =\n    (fun p : ↥(t_sf n).range × α => u p.fst p.snd) ∘ fun p : ι × α =>\n      (⟨t_sf n p.fst, SimpleFunc.mem_range_self _ _⟩, p.snd) :=\n  rfl\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nh_meas : Measurable fun p => u (↑p.fst) p.snd\nthis :\n  (fun p => u (↑(t_sf n) p.fst) p.snd) =\n    (fun p => u (↑p.fst) p.snd) ∘ fun p =>\n      ({ val := ↑(t_sf n) p.fst, property := (_ : ↑(t_sf n) p.fst ∈ SimpleFunc.range (t_sf n)) }, p.snd)\n⊢ Measurable (U n)\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nh_meas : Measurable fun p => u (↑p.fst) p.snd\nthis :\n  (fun p => u (↑(t_sf n) p.fst) p.snd) =\n    (fun p => u (↑p.fst) p.snd) ∘ fun p =>\n      ({ val := ↑(t_sf n) p.fst, property := (_ : ↑(t_sf n) p.fst ∈ SimpleFunc.range (t_sf n)) }, p.snd)\n⊢ Measurable\n    ((fun p => u (↑p.fst) p.snd) ∘ fun p =>\n      ({ val := ↑(t_sf n) p.fst, property := (_ : ↑(t_sf n) p.fst ∈ SimpleFunc.range (t_sf n)) }, p.snd))\n[PROOFSTEP]\nrefine' h_meas.comp (Measurable.prod_mk _ measurable_snd)\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\nmβ : MeasurableSpace β\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : BorelSpace β\nm : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), Measurable (u i)\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nh_meas : Measurable fun p => u (↑p.fst) p.snd\nthis :\n  (fun p => u (↑(t_sf n) p.fst) p.snd) =\n    (fun p => u (↑p.fst) p.snd) ∘ fun p =>\n      ({ val := ↑(t_sf n) p.fst, property := (_ : ↑(t_sf n) p.fst ∈ SimpleFunc.range (t_sf n)) }, p.snd)\n⊢ Measurable fun p => { val := ↑(t_sf n) p.fst, property := (_ : ↑(t_sf n) p.fst ∈ SimpleFunc.range (t_sf n)) }\n[PROOFSTEP]\nexact ((t_sf n).measurable.comp measurable_fst).subtype_mk\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\n⊢ StronglyMeasurable (uncurry u)\n[PROOFSTEP]\nborelize β\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ StronglyMeasurable (uncurry u)\n[PROOFSTEP]\nobtain ⟨t_sf, ht_sf⟩ : ∃ t : ℕ → SimpleFunc ι ι, ∀ j x, Tendsto (fun n => u (t n j) x) atTop (𝓝 <| u j x) :=\n  by\n  have h_str_meas : StronglyMeasurable (id : ι → ι) := stronglyMeasurable_id\n  refine' ⟨h_str_meas.approx, fun j x => _⟩\n  exact ((hu_cont x).tendsto j).comp (h_str_meas.tendsto_approx j)\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\n⊢ ∃ t, ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t n) j) x) atTop (𝓝 (u j x))\n[PROOFSTEP]\nhave h_str_meas : StronglyMeasurable (id : ι → ι) := stronglyMeasurable_id\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh_str_meas : StronglyMeasurable id\n⊢ ∃ t, ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t n) j) x) atTop (𝓝 (u j x))\n[PROOFSTEP]\nrefine' ⟨h_str_meas.approx, fun j x => _⟩\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nh_str_meas : StronglyMeasurable id\nj : ι\nx : α\n⊢ Tendsto (fun n => u (↑(StronglyMeasurable.approx h_str_meas n) j) x) atTop (𝓝 (u j x))\n[PROOFSTEP]\nexact ((hu_cont x).tendsto j).comp (h_str_meas.tendsto_approx j)\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\n⊢ StronglyMeasurable (uncurry u)\n[PROOFSTEP]\nlet U (n : ℕ) (p : ι × α) := u (t_sf n p.fst) p.snd\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\n⊢ StronglyMeasurable (uncurry u)\n[PROOFSTEP]\nhave h_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd) :=\n  by\n  rw [tendsto_pi_nhds]\n  exact fun p => ht_sf p.fst p.snd\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\n⊢ Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\n[PROOFSTEP]\nrw [tendsto_pi_nhds]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\n⊢ ∀ (x : ι × α), Tendsto (fun i => U i x) atTop (𝓝 (u x.fst x.snd))\n[PROOFSTEP]\nexact fun p => ht_sf p.fst p.snd\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\n⊢ StronglyMeasurable (uncurry u)\n[PROOFSTEP]\nrefine' stronglyMeasurable_of_tendsto _ (fun n => _) h_tendsto\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\n⊢ StronglyMeasurable (U n)\n[PROOFSTEP]\nhave h_str_meas : StronglyMeasurable fun p : (t_sf n).range × α => u (↑p.fst) p.snd :=\n  by\n  refine' stronglyMeasurable_iff_measurable_separable.2 ⟨_, _⟩\n  · have :\n      (fun p : ↥(t_sf n).range × α => u (↑p.fst) p.snd) =\n        (fun p : α × (t_sf n).range => u (↑p.snd) p.fst) ∘ Prod.swap :=\n      rfl\n    rw [this, measurable_swap_iff]\n    exact measurable_from_prod_countable fun j => (h j).measurable\n  · have : IsSeparable (⋃ i : (t_sf n).range, range (u i)) := isSeparable_iUnion fun i => (h i).isSeparable_range\n    apply this.mono\n    rintro _ ⟨⟨i, x⟩, rfl⟩\n    simp only [mem_iUnion, mem_range]\n    exact ⟨i, x, rfl⟩\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\n⊢ StronglyMeasurable fun p => u (↑p.fst) p.snd\n[PROOFSTEP]\nrefine' stronglyMeasurable_iff_measurable_separable.2 ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\n⊢ Measurable fun p => u (↑p.fst) p.snd\n[PROOFSTEP]\nhave :\n  (fun p : ↥(t_sf n).range × α => u (↑p.fst) p.snd) = (fun p : α × (t_sf n).range => u (↑p.snd) p.fst) ∘ Prod.swap :=\n  rfl\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nthis : (fun p => u (↑p.fst) p.snd) = (fun p => u (↑p.snd) p.fst) ∘ Prod.swap\n⊢ Measurable fun p => u (↑p.fst) p.snd\n[PROOFSTEP]\nrw [this, measurable_swap_iff]\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nthis : (fun p => u (↑p.fst) p.snd) = (fun p => u (↑p.snd) p.fst) ∘ Prod.swap\n⊢ Measurable fun p => u (↑p.snd) p.fst\n[PROOFSTEP]\nexact measurable_from_prod_countable fun j => (h j).measurable\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\n⊢ IsSeparable (range fun p => u (↑p.fst) p.snd)\n[PROOFSTEP]\nhave : IsSeparable (⋃ i : (t_sf n).range, range (u i)) := isSeparable_iUnion fun i => (h i).isSeparable_range\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nthis : IsSeparable (⋃ (i : { x // x ∈ SimpleFunc.range (t_sf n) }), range (u ↑i))\n⊢ IsSeparable (range fun p => u (↑p.fst) p.snd)\n[PROOFSTEP]\napply this.mono\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nthis : IsSeparable (⋃ (i : { x // x ∈ SimpleFunc.range (t_sf n) }), range (u ↑i))\n⊢ (range fun p => u (↑p.fst) p.snd) ⊆ ⋃ (i : { x // x ∈ SimpleFunc.range (t_sf n) }), range (u ↑i)\n[PROOFSTEP]\nrintro _ ⟨⟨i, x⟩, rfl⟩\n[GOAL]\ncase refine'_2.intro.mk\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nthis : IsSeparable (⋃ (i : { x // x ∈ SimpleFunc.range (t_sf n) }), range (u ↑i))\ni : { x // x ∈ SimpleFunc.range (t_sf n) }\nx : α\n⊢ (fun p => u (↑p.fst) p.snd) (i, x) ∈ ⋃ (i : { x // x ∈ SimpleFunc.range (t_sf n) }), range (u ↑i)\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_range]\n[GOAL]\ncase refine'_2.intro.mk\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nthis : IsSeparable (⋃ (i : { x // x ∈ SimpleFunc.range (t_sf n) }), range (u ↑i))\ni : { x // x ∈ SimpleFunc.range (t_sf n) }\nx : α\n⊢ ∃ i_1 y, u (↑i_1) y = u (↑i) x\n[PROOFSTEP]\nexact ⟨i, x, rfl⟩\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nh_str_meas : StronglyMeasurable fun p => u (↑p.fst) p.snd\n⊢ StronglyMeasurable (U n)\n[PROOFSTEP]\nhave :\n  (fun p : ι × α => u (t_sf n p.fst) p.snd) =\n    (fun p : ↥(t_sf n).range × α => u p.fst p.snd) ∘ fun p : ι × α =>\n      (⟨t_sf n p.fst, SimpleFunc.mem_range_self _ _⟩, p.snd) :=\n  rfl\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nh_str_meas : StronglyMeasurable fun p => u (↑p.fst) p.snd\nthis :\n  (fun p => u (↑(t_sf n) p.fst) p.snd) =\n    (fun p => u (↑p.fst) p.snd) ∘ fun p =>\n      ({ val := ↑(t_sf n) p.fst, property := (_ : ↑(t_sf n) p.fst ∈ SimpleFunc.range (t_sf n)) }, p.snd)\n⊢ StronglyMeasurable (U n)\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nh_str_meas : StronglyMeasurable fun p => u (↑p.fst) p.snd\nthis :\n  (fun p => u (↑(t_sf n) p.fst) p.snd) =\n    (fun p => u (↑p.fst) p.snd) ∘ fun p =>\n      ({ val := ↑(t_sf n) p.fst, property := (_ : ↑(t_sf n) p.fst ∈ SimpleFunc.range (t_sf n)) }, p.snd)\n⊢ StronglyMeasurable\n    ((fun p => u (↑p.fst) p.snd) ∘ fun p =>\n      ({ val := ↑(t_sf n) p.fst, property := (_ : ↑(t_sf n) p.fst ∈ SimpleFunc.range (t_sf n)) }, p.snd))\n[PROOFSTEP]\nrefine' h_str_meas.comp_measurable (Measurable.prod_mk _ measurable_snd)\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\ninst✝⁸ : Countable ι✝\nα : Type u_5\nβ : Type u_6\nι : Type u_7\ninst✝⁷ : TopologicalSpace ι\ninst✝⁶ : MetrizableSpace ι\ninst✝⁵ : MeasurableSpace ι\ninst✝⁴ : SecondCountableTopology ι\ninst✝³ : OpensMeasurableSpace ι\ninst✝² : TopologicalSpace β\ninst✝¹ : PseudoMetrizableSpace β\ninst✝ : MeasurableSpace α\nu : ι → α → β\nhu_cont : ∀ (x : α), Continuous fun i => u i x\nh : ∀ (i : ι), StronglyMeasurable (u i)\nthis✝¹ : MeasurableSpace β := borel β\nthis✝ : BorelSpace β\nt_sf : ℕ → ι →ₛ ι\nht_sf : ∀ (j : ι) (x : α), Tendsto (fun n => u (↑(t_sf n) j) x) atTop (𝓝 (u j x))\nU : ℕ → ι × α → β := fun n p => u (↑(t_sf n) p.fst) p.snd\nh_tendsto : Tendsto U atTop (𝓝 fun p => u p.fst p.snd)\nn : ℕ\nh_str_meas : StronglyMeasurable fun p => u (↑p.fst) p.snd\nthis :\n  (fun p => u (↑(t_sf n) p.fst) p.snd) =\n    (fun p => u (↑p.fst) p.snd) ∘ fun p =>\n      ({ val := ↑(t_sf n) p.fst, property := (_ : ↑(t_sf n) p.fst ∈ SimpleFunc.range (t_sf n)) }, p.snd)\n⊢ Measurable fun p => { val := ↑(t_sf n) p.fst, property := (_ : ↑(t_sf n) p.fst ∈ SimpleFunc.range (t_sf n)) }\n[PROOFSTEP]\nexact ((t_sf n).measurable.comp measurable_fst).subtype_mk\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic", "llama_tokens": 158692, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442251064863698, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.35720379433267824}}
{"text": "[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y : Kleisli T\nf : X ⟶ Y\n⊢ 𝟙 X ≫ f = f\n[PROOFSTEP]\ndsimp\n  -- Porting note: unfold comp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y : Kleisli T\nf : X ⟶ Y\n⊢ NatTrans.app (Monad.η T) X ≫ T.map f ≫ NatTrans.app (Monad.μ T) Y = f\n[PROOFSTEP]\nrw [← T.η.naturality_assoc f, T.left_unit]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y : Kleisli T\nf : X ⟶ Y\n⊢ (𝟭 C).map f ≫ 𝟙 (T.obj Y) = f\n[PROOFSTEP]\napply Category.comp_id\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nW✝ X✝ Y✝ Z✝ : Kleisli T\nf : W✝ ⟶ X✝\ng : X✝ ⟶ Y✝\nh : Y✝ ⟶ Z✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nsimp only [Functor.map_comp, Category.assoc, Monad.assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nW✝ X✝ Y✝ Z✝ : Kleisli T\nf : W✝ ⟶ X✝\ng : X✝ ⟶ Y✝\nh : Y✝ ⟶ Z✝\n⊢ f ≫ T.map g ≫ NatTrans.app (Monad.μ T) Y✝ ≫ T.map h ≫ NatTrans.app (Monad.μ T) Z✝ =\n    f ≫ T.map g ≫ T.map (T.map h) ≫ NatTrans.app (Monad.μ T) (T.obj Z✝) ≫ NatTrans.app (Monad.μ T) Z✝\n[PROOFSTEP]\nerw [T.μ.naturality_assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ { obj := fun X => X, map := fun {X Y} f => f ≫ NatTrans.app (Monad.η T) Y }.map (f ≫ g) =\n    { obj := fun X => X, map := fun {X Y} f => f ≫ NatTrans.app (Monad.η T) Y }.map f ≫\n      { obj := fun X => X, map := fun {X Y} f => f ≫ NatTrans.app (Monad.η T) Y }.map g\n[PROOFSTEP]\nchange _ = (f ≫ (Monad.η T).app Y) ≫ T.map (g ≫ (Monad.η T).app Z) ≫ T.μ.app Z\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ { obj := fun X => X, map := fun {X Y} f => f ≫ NatTrans.app (Monad.η T) Y }.map (f ≫ g) =\n    (f ≫ NatTrans.app (Monad.η T) Y) ≫ T.map (g ≫ NatTrans.app (Monad.η T) Z) ≫ NatTrans.app (Monad.μ T) Z\n[PROOFSTEP]\nsimp [← T.η.naturality g]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y Z : Kleisli T\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ { obj := fun X => T.obj X, map := fun {x Y} f => T.map f ≫ NatTrans.app (Monad.μ T) Y }.map (f ≫ g) =\n    { obj := fun X => T.obj X, map := fun {x Y} f => T.map f ≫ NatTrans.app (Monad.μ T) Y }.map f ≫\n      { obj := fun X => T.obj X, map := fun {x Y} f => T.map f ≫ NatTrans.app (Monad.μ T) Y }.map g\n[PROOFSTEP]\nchange T.map (f ≫ T.map g ≫ T.μ.app Z) ≫ T.μ.app Z = _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y Z : Kleisli T\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ T.map (f ≫ T.map g ≫ NatTrans.app (Monad.μ T) Z) ≫ NatTrans.app (Monad.μ T) Z =\n    { obj := fun X => T.obj X, map := fun {x Y} f => T.map f ≫ NatTrans.app (Monad.μ T) Y }.map f ≫\n      { obj := fun X => T.obj X, map := fun {x Y} f => T.map f ≫ NatTrans.app (Monad.μ T) Y }.map g\n[PROOFSTEP]\nsimp only [Functor.map_comp, Category.assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y Z : Kleisli T\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ T.map f ≫ T.map (T.map g) ≫ T.map (NatTrans.app (Monad.μ T) Z) ≫ NatTrans.app (Monad.μ T) Z =\n    T.map f ≫ NatTrans.app (Monad.μ T) Y ≫ T.map g ≫ NatTrans.app (Monad.μ T) Z\n[PROOFSTEP]\nerw [← T.μ.naturality_assoc g, T.assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y Z : Kleisli T\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ T.map f ≫ T.map (T.map g) ≫ NatTrans.app (Monad.μ T) (T.obj Z) ≫ NatTrans.app (Monad.μ T) Z =\n    T.map f ≫ (T.toFunctor ⋙ T.toFunctor).map g ≫ NatTrans.app (Monad.μ T) (T.obj Z) ≫ NatTrans.app (Monad.μ T) Z\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y : C\nZ : Kleisli T\nf : X ⟶ Y\ng : Y ⟶ (fromKleisli T).obj Z\n⊢ ↑((fun X Y => Equiv.refl (X ⟶ T.obj Y)) X Z).symm (f ≫ g) =\n    (toKleisli T).map f ≫ ↑((fun X Y => Equiv.refl (X ⟶ T.obj Y)) Y Z).symm g\n[PROOFSTEP]\nchange f ≫ g = (f ≫ T.η.app Y) ≫ T.map g ≫ T.μ.app Z\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y : C\nZ : Kleisli T\nf : X ⟶ Y\ng : Y ⟶ (fromKleisli T).obj Z\n⊢ f ≫ g = (f ≫ NatTrans.app (Monad.η T) Y) ≫ T.map g ≫ NatTrans.app (Monad.μ T) Z\n[PROOFSTEP]\nrw [Category.assoc, ← T.η.naturality_assoc g, Functor.id_map]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y : C\nZ : Kleisli T\nf : X ⟶ Y\ng : Y ⟶ (fromKleisli T).obj Z\n⊢ f ≫ g = f ≫ g ≫ NatTrans.app (Monad.η T) ((fromKleisli T).obj Z) ≫ NatTrans.app (Monad.μ T) Z\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nT : Monad C\nX Y : C\nZ : Kleisli T\nf : X ⟶ Y\ng : Y ⟶ (fromKleisli T).obj Z\n⊢ f ≫ g = f ≫ g ≫ NatTrans.app (Monad.η T) (T.obj Z) ≫ NatTrans.app (Monad.μ T) Z\n[PROOFSTEP]\nsimp [Monad.left_unit]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX✝ Y✝ : Cokleisli U\nf : X✝ ⟶ Y✝\n⊢ 𝟙 X✝ ≫ f = f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX✝ Y✝ : Cokleisli U\nf : X✝ ⟶ Y✝\n⊢ NatTrans.app (Comonad.δ U) X✝ ≫ U.map (NatTrans.app (Comonad.ε U) X✝) ≫ f = f\n[PROOFSTEP]\nrw [U.right_counit_assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX Y Z W : Cokleisli U\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Z ⟶ W\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\nchange\n  U.δ.app X ≫ U.map (U.δ.app X ≫ U.map f ≫ g) ≫ h =\n    U.δ.app X ≫\n      U.map f ≫\n        (U.δ.app Y ≫ U.map g ≫ h)\n          -- Porting note: something was broken here and was easier just to redo from scratch\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX Y Z W : Cokleisli U\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Z ⟶ W\n⊢ NatTrans.app (Comonad.δ U) X ≫ U.map (NatTrans.app (Comonad.δ U) X ≫ U.map f ≫ g) ≫ h =\n    NatTrans.app (Comonad.δ U) X ≫ U.map f ≫ NatTrans.app (Comonad.δ U) Y ≫ U.map g ≫ h\n[PROOFSTEP]\nsimp only [Functor.map_comp, ← Category.assoc, eq_whisker]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX Y Z W : Cokleisli U\nf : X ⟶ Y\ng : Y ⟶ Z\nh : Z ⟶ W\n⊢ (((NatTrans.app (Comonad.δ U) X ≫ U.map (NatTrans.app (Comonad.δ U) X)) ≫ U.map (U.map f)) ≫ U.map g) ≫ h =\n    (((NatTrans.app (Comonad.δ U) X ≫ U.map f) ≫ NatTrans.app (Comonad.δ U) Y) ≫ U.map g) ≫ h\n[PROOFSTEP]\nsimp only [Category.assoc, U.δ.naturality, Functor.comp_map, U.coassoc_assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX Y x✝ : C\nf : X ⟶ Y\ng : Y ⟶ x✝\n⊢ { obj := fun X => X, map := fun {X x} f => NatTrans.app (Comonad.ε U) X ≫ f }.map (f ≫ g) =\n    { obj := fun X => X, map := fun {X x} f => NatTrans.app (Comonad.ε U) X ≫ f }.map f ≫\n      { obj := fun X => X, map := fun {X x} f => NatTrans.app (Comonad.ε U) X ≫ f }.map g\n[PROOFSTEP]\nchange U.ε.app X ≫ f ≫ g = U.δ.app X ≫ U.map (U.ε.app X ≫ f) ≫ U.ε.app Y ≫ g\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX Y x✝ : C\nf : X ⟶ Y\ng : Y ⟶ x✝\n⊢ NatTrans.app (Comonad.ε U) X ≫ f ≫ g =\n    NatTrans.app (Comonad.δ U) X ≫ U.map (NatTrans.app (Comonad.ε U) X ≫ f) ≫ NatTrans.app (Comonad.ε U) Y ≫ g\n[PROOFSTEP]\nsimp [← U.ε.naturality g]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX Y x✝ : Cokleisli U\nf : X ⟶ Y\ng : Y ⟶ x✝\n⊢ { obj := fun X => U.obj X, map := fun {X x} f => NatTrans.app (Comonad.δ U) X ≫ U.map f }.map (f ≫ g) =\n    { obj := fun X => U.obj X, map := fun {X x} f => NatTrans.app (Comonad.δ U) X ≫ U.map f }.map f ≫\n      { obj := fun X => U.obj X, map := fun {X x} f => NatTrans.app (Comonad.δ U) X ≫ U.map f }.map g\n[PROOFSTEP]\nchange U.δ.app X ≫ U.map (U.δ.app X ≫ U.map f ≫ g) = (U.δ.app X ≫ U.map f) ≫ (U.δ.app Y ≫ U.map g)\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX Y x✝ : Cokleisli U\nf : X ⟶ Y\ng : Y ⟶ x✝\n⊢ NatTrans.app (Comonad.δ U) X ≫ U.map (NatTrans.app (Comonad.δ U) X ≫ U.map f ≫ g) =\n    (NatTrans.app (Comonad.δ U) X ≫ U.map f) ≫ NatTrans.app (Comonad.δ U) Y ≫ U.map g\n[PROOFSTEP]\nsimp only [Functor.map_comp, ← Category.assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX Y x✝ : Cokleisli U\nf : X ⟶ Y\ng : Y ⟶ x✝\n⊢ ((NatTrans.app (Comonad.δ U) X ≫ U.map (NatTrans.app (Comonad.δ U) X)) ≫ U.map (U.map f)) ≫ U.map g =\n    ((NatTrans.app (Comonad.δ U) X ≫ U.map f) ≫ NatTrans.app (Comonad.δ U) Y) ≫ U.map g\n[PROOFSTEP]\nrw [Comonad.coassoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX Y x✝ : Cokleisli U\nf : X ⟶ Y\ng : Y ⟶ x✝\n⊢ ((NatTrans.app (Comonad.δ U) X ≫ NatTrans.app (Comonad.δ U) (U.obj X)) ≫ U.map (U.map f)) ≫ U.map g =\n    ((NatTrans.app (Comonad.δ U) X ≫ U.map f) ≫ NatTrans.app (Comonad.δ U) Y) ≫ U.map g\n[PROOFSTEP]\nsimp only [Category.assoc, NatTrans.naturality, Functor.comp_map]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX : Cokleisli U\nY x✝ : C\nf : (fromCokleisli U).obj X ⟶ Y\ng : Y ⟶ x✝\n⊢ ↑((fun X Y => Equiv.refl (U.obj X ⟶ Y)) X x✝) (f ≫ g) =\n    ↑((fun X Y => Equiv.refl (U.obj X ⟶ Y)) X Y) f ≫ (toCokleisli U).map g\n[PROOFSTEP]\nchange f ≫ g = U.δ.app X ≫ U.map f ≫ U.ε.app Y ≫ g\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX : Cokleisli U\nY x✝ : C\nf : (fromCokleisli U).obj X ⟶ Y\ng : Y ⟶ x✝\n⊢ f ≫ g = NatTrans.app (Comonad.δ U) X ≫ U.map f ≫ NatTrans.app (Comonad.ε U) Y ≫ g\n[PROOFSTEP]\nerw [← Category.assoc (U.map f), U.ε.naturality]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX : Cokleisli U\nY x✝ : C\nf : (fromCokleisli U).obj X ⟶ Y\ng : Y ⟶ x✝\n⊢ f ≫ g = NatTrans.app (Comonad.δ U) X ≫ (NatTrans.app (Comonad.ε U) ((fromCokleisli U).obj X) ≫ (𝟭 C).map f) ≫ g\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : Comonad C\nX : Cokleisli U\nY x✝ : C\nf : (fromCokleisli U).obj X ⟶ Y\ng : Y ⟶ x✝\n⊢ f ≫ g = NatTrans.app (Comonad.δ U) X ≫ (NatTrans.app (Comonad.ε U) (U.obj X) ≫ f) ≫ g\n[PROOFSTEP]\nsimp only [← Category.assoc, Comonad.left_counit, Category.id_comp]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monad.Kleisli", "llama_tokens": 5032, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419958239132, "lm_q2_score": 0.5156199157230157, "lm_q1q2_score": 0.3571400075129475}}
{"text": "[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\n⊢ FinitePresentation R A → FiniteType R A\n[PROOFSTEP]\nrintro ⟨n, f, hf⟩\n[GOAL]\ncase intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ FiniteType R A\n[PROOFSTEP]\napply FiniteType.iff_quotient_mvPolynomial''.2\n[GOAL]\ncase intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ ∃ n f, Surjective ↑f\n[PROOFSTEP]\nexact ⟨n, f, hf.1⟩\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherianRing R\n⊢ FiniteType R A ↔ FinitePresentation R A\n[PROOFSTEP]\nrefine' ⟨fun h => _, Algebra.FiniteType.of_finitePresentation⟩\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherianRing R\nh : FiniteType R A\n⊢ FinitePresentation R A\n[PROOFSTEP]\nobtain ⟨n, f, hf⟩ := Algebra.FiniteType.iff_quotient_mvPolynomial''.1 h\n[GOAL]\ncase intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherianRing R\nh : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\n⊢ FinitePresentation R A\n[PROOFSTEP]\nrefine' ⟨n, f, hf, _⟩\n[GOAL]\ncase intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherianRing R\nh : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nhave hnoet : IsNoetherianRing (MvPolynomial (Fin n) R) := by\n  infer_instance\n    -- Porting note: rewrote code to help typeclass inference\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherianRing R\nh : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\n⊢ IsNoetherianRing (MvPolynomial (Fin n) R)\n[PROOFSTEP]\ninfer_instance\n  -- Porting note: rewrote code to help typeclass inference\n[GOAL]\ncase intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherianRing R\nh : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nhnoet : IsNoetherianRing (MvPolynomial (Fin n) R)\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nrw [isNoetherianRing_iff] at hnoet \n[GOAL]\ncase intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherianRing R\nh : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nhnoet : IsNoetherian (MvPolynomial (Fin n) R) (MvPolynomial (Fin n) R)\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nletI : Module (MvPolynomial (Fin n) R) (MvPolynomial (Fin n) R) := Semiring.toModule\n[GOAL]\ncase intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherianRing R\nh : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nhnoet : IsNoetherian (MvPolynomial (Fin n) R) (MvPolynomial (Fin n) R)\nthis : Module (MvPolynomial (Fin n) R) (MvPolynomial (Fin n) R) := Semiring.toModule\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nhave := hnoet.noetherian (RingHom.ker f.toRingHom)\n[GOAL]\ncase intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherianRing R\nh : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nhnoet : IsNoetherian (MvPolynomial (Fin n) R) (MvPolynomial (Fin n) R)\nthis✝ : Module (MvPolynomial (Fin n) R) (MvPolynomial (Fin n) R) := Semiring.toModule\nthis : Submodule.FG (RingHom.ker ↑f)\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nconvert this\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nhfp : FinitePresentation R A\ne : A ≃ₐ[R] B\n⊢ FinitePresentation R B\n[PROOFSTEP]\nobtain ⟨n, f, hf⟩ := hfp\n[GOAL]\ncase intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ FinitePresentation R B\n[PROOFSTEP]\nuse n, AlgHom.comp (↑e) f\n[GOAL]\ncase h\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ Surjective ↑(AlgHom.comp (↑e) f) ∧ Ideal.FG (RingHom.ker ↑(AlgHom.comp (↑e) f))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ Surjective ↑(AlgHom.comp (↑e) f)\n[PROOFSTEP]\nrw [AlgHom.coe_comp]\n[GOAL]\ncase h.left\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ Surjective (↑↑e ∘ ↑f)\n[PROOFSTEP]\nexact Function.Surjective.comp e.surjective hf.1\n[GOAL]\ncase h.right\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ Ideal.FG (RingHom.ker ↑(AlgHom.comp (↑e) f))\n[PROOFSTEP]\nsuffices hker : (RingHom.ker (AlgHom.comp (e : A →ₐ[R] B) f).toRingHom) = RingHom.ker f.toRingHom\n[GOAL]\ncase h.right\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\nhker : RingHom.ker ↑(AlgHom.comp (↑e) f) = RingHom.ker ↑f\n⊢ Ideal.FG (RingHom.ker ↑(AlgHom.comp (↑e) f))\n[PROOFSTEP]\nrw [hker]\n[GOAL]\ncase h.right\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\nhker : RingHom.ker ↑(AlgHom.comp (↑e) f) = RingHom.ker ↑f\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nexact hf.2\n[GOAL]\ncase hker\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ RingHom.ker ↑(AlgHom.comp (↑e) f) = RingHom.ker ↑f\n[PROOFSTEP]\nhave hco : (AlgHom.comp (e : A →ₐ[R] B) f).toRingHom = RingHom.comp (e.toRingEquiv : A ≃+* B) f.toRingHom :=\n  by\n  have h : (AlgHom.comp (e : A →ₐ[R] B) f).toRingHom = e.toAlgHom.toRingHom.comp f.toRingHom := rfl\n  have h1 : ↑e.toRingEquiv = e.toAlgHom.toRingHom := rfl\n  rw [h, h1]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ ↑(AlgHom.comp (↑e) f) = RingHom.comp ↑(AlgEquiv.toRingEquiv e) ↑f\n[PROOFSTEP]\nhave h : (AlgHom.comp (e : A →ₐ[R] B) f).toRingHom = e.toAlgHom.toRingHom.comp f.toRingHom := rfl\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\nh : ↑(AlgHom.comp (↑e) f) = RingHom.comp ↑↑e ↑f\n⊢ ↑(AlgHom.comp (↑e) f) = RingHom.comp ↑(AlgEquiv.toRingEquiv e) ↑f\n[PROOFSTEP]\nhave h1 : ↑e.toRingEquiv = e.toAlgHom.toRingHom := rfl\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\nh : ↑(AlgHom.comp (↑e) f) = RingHom.comp ↑↑e ↑f\nh1 : ↑(AlgEquiv.toRingEquiv e) = ↑↑e\n⊢ ↑(AlgHom.comp (↑e) f) = RingHom.comp ↑(AlgEquiv.toRingEquiv e) ↑f\n[PROOFSTEP]\nrw [h, h1]\n[GOAL]\ncase hker\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\ne : A ≃ₐ[R] B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\nhco : ↑(AlgHom.comp (↑e) f) = RingHom.comp ↑(AlgEquiv.toRingEquiv e) ↑f\n⊢ RingHom.ker ↑(AlgHom.comp (↑e) f) = RingHom.ker ↑f\n[PROOFSTEP]\nrw [RingHom.ker_eq_comap_bot, hco, ← Ideal.comap_comap, ← RingHom.ker_eq_comap_bot,\n  RingHom.ker_coe_equiv (AlgEquiv.toRingEquiv e), RingHom.ker_eq_comap_bot]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nι : Type u_2\ninst✝ : Finite ι\n⊢ FinitePresentation R (MvPolynomial ι R)\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nι : Type u_2\ninst✝ : Finite ι\nval✝ : Fintype ι\n⊢ FinitePresentation R (MvPolynomial ι R)\n[PROOFSTEP]\nlet eqv := (MvPolynomial.renameEquiv R <| Fintype.equivFin ι).symm\n[GOAL]\ncase intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nι : Type u_2\ninst✝ : Finite ι\nval✝ : Fintype ι\neqv : MvPolynomial (Fin (Fintype.card ι)) R ≃ₐ[R] MvPolynomial ι R :=\n  AlgEquiv.symm (MvPolynomial.renameEquiv R (Fintype.equivFin ι))\n⊢ FinitePresentation R (MvPolynomial ι R)\n[PROOFSTEP]\nexact\n  ⟨Fintype.card ι, eqv, eqv.surjective, ((RingHom.injective_iff_ker_eq_bot _).1 eqv.injective).symm ▸ Submodule.fg_bot⟩\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nI : Ideal A\nh : Ideal.FG I\nhfp : FinitePresentation R A\n⊢ FinitePresentation R (A ⧸ I)\n[PROOFSTEP]\nobtain ⟨n, f, hf⟩ := hfp\n[GOAL]\ncase intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nI : Ideal A\nh : Ideal.FG I\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ FinitePresentation R (A ⧸ I)\n[PROOFSTEP]\nrefine' ⟨n, (Ideal.Quotient.mkₐ R I).comp f, _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nI : Ideal A\nh : Ideal.FG I\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ Surjective ↑(AlgHom.comp (Ideal.Quotient.mkₐ R I) f)\n[PROOFSTEP]\nexact (Ideal.Quotient.mkₐ_surjective R I).comp hf.1\n[GOAL]\ncase intro.intro.refine'_2\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nI : Ideal A\nh : Ideal.FG I\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ Ideal.FG (RingHom.ker ↑(AlgHom.comp (Ideal.Quotient.mkₐ R I) f))\n[PROOFSTEP]\nrefine' Ideal.fg_ker_comp _ _ hf.2 _ hf.1\n[GOAL]\ncase intro.intro.refine'_2\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nI : Ideal A\nh : Ideal.FG I\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ Ideal.FG (RingHom.ker ↑(Ideal.Quotient.mkₐ R I))\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\n⊢ FinitePresentation R A ↔ ∃ n I x, Ideal.FG I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\n⊢ FinitePresentation R A → ∃ n I x, Ideal.FG I\n[PROOFSTEP]\nrintro ⟨n, f, hf⟩\n[GOAL]\ncase mp.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ ∃ n I x, Ideal.FG I\n[PROOFSTEP]\nexact ⟨n, RingHom.ker f.toRingHom, Ideal.quotientKerAlgEquivOfSurjective hf.1, hf.2⟩\n[GOAL]\ncase mpr\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\n⊢ (∃ n I x, Ideal.FG I) → FinitePresentation R A\n[PROOFSTEP]\nrintro ⟨n, I, e, hfg⟩\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nI : Ideal (MvPolynomial (Fin n) R)\ne : (MvPolynomial (Fin n) R ⧸ I) ≃ₐ[R] A\nhfg : Ideal.FG I\n⊢ FinitePresentation R A\n[PROOFSTEP]\nexact equiv ((FinitePresentation.mvPolynomial R _).quotient hfg) e\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\n⊢ FinitePresentation R A ↔ ∃ ι x f, Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\n⊢ FinitePresentation R A → ∃ ι x f, Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nrintro ⟨n, f, hfs, hfk⟩\n[GOAL]\ncase mp.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhfs : Surjective ↑f\nhfk : Ideal.FG (RingHom.ker ↑f)\n⊢ ∃ ι x f, Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nset ulift_var := MvPolynomial.renameEquiv R Equiv.ulift\n[GOAL]\ncase mp.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhfs : Surjective ↑f\nhfk : Ideal.FG (RingHom.ker ↑f)\nulift_var : MvPolynomial (ULift ?m.48050) R ≃ₐ[R] MvPolynomial ?m.48050 R := MvPolynomial.renameEquiv R Equiv.ulift\n⊢ ∃ ι x f, Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nrefine'\n  ⟨ULift (Fin n), inferInstance, f.comp ulift_var.toAlgHom, hfs.comp ulift_var.surjective,\n    Ideal.fg_ker_comp _ _ _ hfk ulift_var.surjective⟩\n[GOAL]\ncase mp.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhfs : Surjective ↑f\nhfk : Ideal.FG (RingHom.ker ↑f)\nulift_var : MvPolynomial (ULift (Fin n)) R ≃ₐ[R] MvPolynomial (Fin n) R := MvPolynomial.renameEquiv R Equiv.ulift\n⊢ Ideal.FG (RingHom.ker ↑↑ulift_var)\n[PROOFSTEP]\nerw [RingHom.ker_coe_equiv ulift_var.toRingEquiv]\n[GOAL]\ncase mp.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhfs : Surjective ↑f\nhfk : Ideal.FG (RingHom.ker ↑f)\nulift_var : MvPolynomial (ULift (Fin n)) R ≃ₐ[R] MvPolynomial (Fin n) R := MvPolynomial.renameEquiv R Equiv.ulift\n⊢ Ideal.FG ⊥\n[PROOFSTEP]\nexact Submodule.fg_bot\n[GOAL]\ncase mpr\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\n⊢ (∃ ι x f, Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)) → FinitePresentation R A\n[PROOFSTEP]\nrintro ⟨ι, hfintype, f, hf⟩\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nι : Type u_1\nhfintype : Fintype ι\nf : MvPolynomial ι R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n⊢ FinitePresentation R A\n[PROOFSTEP]\nhave equiv := MvPolynomial.renameEquiv R (Fintype.equivFin ι)\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nι : Type u_1\nhfintype : Fintype ι\nf : MvPolynomial ι R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\nequiv : MvPolynomial ι R ≃ₐ[R] MvPolynomial (Fin (Fintype.card ι)) R\n⊢ FinitePresentation R A\n[PROOFSTEP]\nrefine'\n  ⟨Fintype.card ι, f.comp equiv.symm, hf.1.comp (AlgEquiv.symm equiv).surjective,\n    Ideal.fg_ker_comp _ f _ hf.2 equiv.symm.surjective⟩\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nι : Type u_1\nhfintype : Fintype ι\nf : MvPolynomial ι R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\nequiv : MvPolynomial ι R ≃ₐ[R] MvPolynomial (Fin (Fintype.card ι)) R\n⊢ Ideal.FG (RingHom.ker ↑↑(AlgEquiv.symm equiv))\n[PROOFSTEP]\nerw [RingHom.ker_coe_equiv equiv.symm.toRingEquiv]\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nι : Type u_1\nhfintype : Fintype ι\nf : MvPolynomial ι R →ₐ[R] A\nhf : Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\nequiv : MvPolynomial ι R ≃ₐ[R] MvPolynomial (Fin (Fintype.card ι)) R\n⊢ Ideal.FG ⊥\n[PROOFSTEP]\nexact Submodule.fg_bot\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nhfp : FinitePresentation R A\nι : Type v\ninst✝ : Finite ι\n⊢ FinitePresentation R (MvPolynomial ι A)\n[PROOFSTEP]\nrw [iff_quotient_mvPolynomial'] at hfp ⊢\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nhfp : ∃ ι x f, Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\nι : Type v\ninst✝ : Finite ι\n⊢ ∃ ι_1 x f, Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nclassical\n  -- Porting note : use the same universe level\nobtain ⟨(ι' : Type v), _, f, hf_surj, hf_ker⟩ := hfp\nlet g := (MvPolynomial.mapAlgHom f).comp (MvPolynomial.sumAlgEquiv R ι ι').toAlgHom\ncases nonempty_fintype (Sum ι ι')\nrefine\n  ⟨Sum ι ι', by infer_instance, g, (MvPolynomial.map_surjective f.toRingHom hf_surj).comp (AlgEquiv.surjective _),\n    Ideal.fg_ker_comp _ _ ?_ ?_ (AlgEquiv.surjective _)⟩\n· erw [RingHom.ker_coe_equiv (MvPolynomial.sumAlgEquiv R ι ι').toRingEquiv]\n  exact Submodule.fg_bot\n· rw [AlgHom.toRingHom_eq_coe, MvPolynomial.mapAlgHom_coe_ringHom, MvPolynomial.ker_map]\n  exact hf_ker.map MvPolynomial.C\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nhfp : ∃ ι x f, Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\nι : Type v\ninst✝ : Finite ι\n⊢ ∃ ι_1 x f, Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nobtain ⟨(ι' : Type v), _, f, hf_surj, hf_ker⟩ := hfp\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nι : Type v\ninst✝ : Finite ι\nι' : Type v\nw✝ : Fintype ι'\nf : MvPolynomial ι' R →ₐ[R] A\nhf_surj : Surjective ↑f\nhf_ker : Ideal.FG (RingHom.ker ↑f)\n⊢ ∃ ι_1 x f, Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nlet g := (MvPolynomial.mapAlgHom f).comp (MvPolynomial.sumAlgEquiv R ι ι').toAlgHom\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nι : Type v\ninst✝ : Finite ι\nι' : Type v\nw✝ : Fintype ι'\nf : MvPolynomial ι' R →ₐ[R] A\nhf_surj : Surjective ↑f\nhf_ker : Ideal.FG (RingHom.ker ↑f)\ng : MvPolynomial (ι ⊕ ι') R →ₐ[R] MvPolynomial ι A :=\n  AlgHom.comp (MvPolynomial.mapAlgHom f) ↑(MvPolynomial.sumAlgEquiv R ι ι')\n⊢ ∃ ι_1 x f, Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\ncases nonempty_fintype (Sum ι ι')\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nι : Type v\ninst✝ : Finite ι\nι' : Type v\nw✝ : Fintype ι'\nf : MvPolynomial ι' R →ₐ[R] A\nhf_surj : Surjective ↑f\nhf_ker : Ideal.FG (RingHom.ker ↑f)\ng : MvPolynomial (ι ⊕ ι') R →ₐ[R] MvPolynomial ι A :=\n  AlgHom.comp (MvPolynomial.mapAlgHom f) ↑(MvPolynomial.sumAlgEquiv R ι ι')\nval✝ : Fintype (ι ⊕ ι')\n⊢ ∃ ι_1 x f, Surjective ↑f ∧ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nrefine\n  ⟨Sum ι ι', by infer_instance, g, (MvPolynomial.map_surjective f.toRingHom hf_surj).comp (AlgEquiv.surjective _),\n    Ideal.fg_ker_comp _ _ ?_ ?_ (AlgEquiv.surjective _)⟩\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nι : Type v\ninst✝ : Finite ι\nι' : Type v\nw✝ : Fintype ι'\nf : MvPolynomial ι' R →ₐ[R] A\nhf_surj : Surjective ↑f\nhf_ker : Ideal.FG (RingHom.ker ↑f)\ng : MvPolynomial (ι ⊕ ι') R →ₐ[R] MvPolynomial ι A :=\n  AlgHom.comp (MvPolynomial.mapAlgHom f) ↑(MvPolynomial.sumAlgEquiv R ι ι')\nval✝ : Fintype (ι ⊕ ι')\n⊢ Fintype (ι ⊕ ι')\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_1\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nι : Type v\ninst✝ : Finite ι\nι' : Type v\nw✝ : Fintype ι'\nf : MvPolynomial ι' R →ₐ[R] A\nhf_surj : Surjective ↑f\nhf_ker : Ideal.FG (RingHom.ker ↑f)\ng : MvPolynomial (ι ⊕ ι') R →ₐ[R] MvPolynomial ι A :=\n  AlgHom.comp (MvPolynomial.mapAlgHom f) ↑(MvPolynomial.sumAlgEquiv R ι ι')\nval✝ : Fintype (ι ⊕ ι')\n⊢ Ideal.FG (RingHom.ker ↑↑(MvPolynomial.sumAlgEquiv R ι ι'))\n[PROOFSTEP]\nerw [RingHom.ker_coe_equiv (MvPolynomial.sumAlgEquiv R ι ι').toRingEquiv]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_1\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nι : Type v\ninst✝ : Finite ι\nι' : Type v\nw✝ : Fintype ι'\nf : MvPolynomial ι' R →ₐ[R] A\nhf_surj : Surjective ↑f\nhf_ker : Ideal.FG (RingHom.ker ↑f)\ng : MvPolynomial (ι ⊕ ι') R →ₐ[R] MvPolynomial ι A :=\n  AlgHom.comp (MvPolynomial.mapAlgHom f) ↑(MvPolynomial.sumAlgEquiv R ι ι')\nval✝ : Fintype (ι ⊕ ι')\n⊢ Ideal.FG ⊥\n[PROOFSTEP]\nexact Submodule.fg_bot\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_2\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nι : Type v\ninst✝ : Finite ι\nι' : Type v\nw✝ : Fintype ι'\nf : MvPolynomial ι' R →ₐ[R] A\nhf_surj : Surjective ↑f\nhf_ker : Ideal.FG (RingHom.ker ↑f)\ng : MvPolynomial (ι ⊕ ι') R →ₐ[R] MvPolynomial ι A :=\n  AlgHom.comp (MvPolynomial.mapAlgHom f) ↑(MvPolynomial.sumAlgEquiv R ι ι')\nval✝ : Fintype (ι ⊕ ι')\n⊢ Ideal.FG (RingHom.ker ↑(MvPolynomial.mapAlgHom f))\n[PROOFSTEP]\nrw [AlgHom.toRingHom_eq_coe, MvPolynomial.mapAlgHom_coe_ringHom, MvPolynomial.ker_map]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine_2\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : CommRing B\ninst✝¹ : Algebra R B\nι : Type v\ninst✝ : Finite ι\nι' : Type v\nw✝ : Fintype ι'\nf : MvPolynomial ι' R →ₐ[R] A\nhf_surj : Surjective ↑f\nhf_ker : Ideal.FG (RingHom.ker ↑f)\ng : MvPolynomial (ι ⊕ ι') R →ₐ[R] MvPolynomial ι A :=\n  AlgHom.comp (MvPolynomial.mapAlgHom f) ↑(MvPolynomial.sumAlgEquiv R ι ι')\nval✝ : Fintype (ι ⊕ ι')\n⊢ Ideal.FG (Ideal.map MvPolynomial.C (RingHom.ker ↑f))\n[PROOFSTEP]\nexact hf_ker.map MvPolynomial.C\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhfpA : FinitePresentation R A\nhfpB : FinitePresentation A B\n⊢ FinitePresentation R B\n[PROOFSTEP]\nobtain ⟨n, I, e, hfg⟩ := iff.1 hfpB\n[GOAL]\ncase intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhfpA : FinitePresentation R A\nhfpB : FinitePresentation A B\nn : ℕ\nI : Ideal (MvPolynomial (Fin n) A)\ne : (MvPolynomial (Fin n) A ⧸ I) ≃ₐ[A] B\nhfg : Ideal.FG I\n⊢ FinitePresentation R B\n[PROOFSTEP]\nexact equiv ((mvPolynomial_of_finitePresentation hfpA _).quotient hfg) (e.restrictScalars R)\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRB : FinitePresentation R B\nhRA : FiniteType R A\n⊢ FinitePresentation A B\n[PROOFSTEP]\nclassical\nobtain ⟨n, f, hf, s, hs⟩ := hRB\nletI RX := MvPolynomial (Fin n) R\nletI AX := MvPolynomial (Fin n) A\nrefine' ⟨n, MvPolynomial.aeval (f ∘ X), _, _⟩\n· rw [← Algebra.range_top_iff_surjective, ← Algebra.adjoin_range_eq_range_aeval, Set.range_comp f MvPolynomial.X,\n    eq_top_iff, ← @adjoin_adjoin_of_tower R A B, adjoin_image, adjoin_range_X, Algebra.map_top,\n    (Algebra.range_top_iff_surjective _).mpr hf]\n  exact fun {x} => subset_adjoin ⟨⟩\n· obtain ⟨t, ht⟩ := hRA.out\n  have := fun i : t => hf (algebraMap A B i)\n  choose t' ht' using this\n  have ht'' : Algebra.adjoin R (algebraMap A AX '' t ∪ Set.range (X : _ → AX)) = ⊤ :=\n    by\n    rw [adjoin_union_eq_adjoin_adjoin, ←\n      Subalgebra.restrictScalars_top R (A := AX) (S := { x // x ∈ adjoin R ((algebraMap A AX) '' t) })]\n    refine congrArg (Subalgebra.restrictScalars R) ?_\n    congr 1\n    rw [adjoin_algebraMap, ht]\n    apply Subalgebra.restrictScalars_injective R\n    rw [← adjoin_restrictScalars, adjoin_range_X, Subalgebra.restrictScalars_top, Subalgebra.restrictScalars_top]\n  letI g : t → AX := fun x => MvPolynomial.C (x : A) - map (algebraMap R A) (t' x)\n  refine' ⟨s.image (map (algebraMap R A)) ∪ t.attach.image g, _⟩\n  rw [Finset.coe_union, Finset.coe_image, Finset.coe_image, Finset.attach_eq_univ, Finset.coe_univ, Set.image_univ]\n  let s₀ := (MvPolynomial.map (algebraMap R A)) '' s ∪ Set.range g\n  let I := RingHom.ker (MvPolynomial.aeval (R := A) (f ∘ MvPolynomial.X))\n  change Ideal.span s₀ = I\n  have leI :\n    Ideal.span ((MvPolynomial.map (algebraMap R A)) '' s ∪ Set.range g) ≤\n      RingHom.ker (MvPolynomial.aeval (R := A) (f ∘ MvPolynomial.X)) :=\n    by\n    rw [Ideal.span_le]\n    rintro _ (⟨x, hx, rfl⟩ | ⟨⟨x, hx⟩, rfl⟩) <;> erw [RingHom.mem_ker]\n    · rw [MvPolynomial.aeval_map_algebraMap (R := R) (A := A), ← aeval_unique]\n      have := Ideal.subset_span hx\n      rwa [hs] at this \n    ·\n      rw [map_sub, MvPolynomial.aeval_map_algebraMap, ← aeval_unique, MvPolynomial.aeval_C, ht', Subtype.coe_mk,\n        sub_self]\n  apply leI.antisymm\n  intro x hx\n  rw [RingHom.mem_ker] at hx \n  let s₀ := (MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\n  change x ∈ Ideal.span s₀\n  have : x ∈ (MvPolynomial.map (algebraMap R A) : _ →+* AX).range.toAddSubmonoid ⊔ (Ideal.span s₀).toAddSubmonoid :=\n    by\n    have : x ∈ (⊤ : Subalgebra R AX) := trivial\n    rw [← ht''] at this \n    refine adjoin_induction this ?_ ?_ ?_ ?_\n    · rintro _ (⟨x, hx, rfl⟩ | ⟨i, rfl⟩)\n      · rw [algebraMap_eq, ← sub_add_cancel (MvPolynomial.C x) (map (algebraMap R A) (t' ⟨x, hx⟩)), add_comm]\n        apply AddSubmonoid.add_mem_sup\n        · exact Set.mem_range_self _\n        · apply Ideal.subset_span\n          apply Set.mem_union_right\n          exact Set.mem_range_self _\n      · apply AddSubmonoid.mem_sup_left\n        exact ⟨X i, map_X _ _⟩\n    · intro r\n      apply AddSubmonoid.mem_sup_left\n      exact ⟨C r, map_C _ _⟩\n    · intro _ _ h₁ h₂\n      exact add_mem h₁ h₂\n    · intro x₁ x₂ h₁ h₂\n      obtain ⟨_, ⟨p₁, rfl⟩, q₁, hq₁, rfl⟩ := AddSubmonoid.mem_sup.mp h₁\n      obtain ⟨_, ⟨p₂, rfl⟩, q₂, hq₂, rfl⟩ := AddSubmonoid.mem_sup.mp h₂\n      rw [add_mul, mul_add, add_assoc, ← map_mul]\n      apply AddSubmonoid.add_mem_sup\n      · exact Set.mem_range_self _\n      · refine' add_mem (Ideal.mul_mem_left _ _ hq₂) (Ideal.mul_mem_right _ _ hq₁)\n  obtain ⟨_, ⟨p, rfl⟩, q, hq, rfl⟩ := AddSubmonoid.mem_sup.mp this\n  rw [map_add, aeval_map_algebraMap, ← aeval_unique, show MvPolynomial.aeval (f ∘ X) q = 0 from leI hq, add_zero] at hx \n  suffices Ideal.span (s : Set RX) ≤ (Ideal.span s₀).comap (MvPolynomial.map <| algebraMap R A)\n    by\n    refine' add_mem _ hq\n    rw [hs] at this \n    exact this hx\n  rw [Ideal.span_le]\n  intro x hx\n  apply Ideal.subset_span\n  apply Set.mem_union_left\n  exact Set.mem_image_of_mem _ hx\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRB : FinitePresentation R B\nhRA : FiniteType R A\n⊢ FinitePresentation A B\n[PROOFSTEP]\nobtain ⟨n, f, hf, s, hs⟩ := hRB\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\n⊢ FinitePresentation A B\n[PROOFSTEP]\nletI RX := MvPolynomial (Fin n) R\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\n⊢ FinitePresentation A B\n[PROOFSTEP]\nletI AX := MvPolynomial (Fin n) A\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\n⊢ FinitePresentation A B\n[PROOFSTEP]\nrefine' ⟨n, MvPolynomial.aeval (f ∘ X), _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\n⊢ Surjective ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n[PROOFSTEP]\nrw [← Algebra.range_top_iff_surjective, ← Algebra.adjoin_range_eq_range_aeval, Set.range_comp f MvPolynomial.X,\n  eq_top_iff, ← @adjoin_adjoin_of_tower R A B, adjoin_image, adjoin_range_X, Algebra.map_top,\n  (Algebra.range_top_iff_surjective _).mpr hf]\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\n⊢ ∀ (x : B), x ∈ adjoin A ↑⊤\n[PROOFSTEP]\nexact fun {x} => subset_adjoin ⟨⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\n⊢ Ideal.FG (RingHom.ker ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)))\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := hRA.out\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\n⊢ Ideal.FG (RingHom.ker ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)))\n[PROOFSTEP]\nhave := fun i : t => hf (algebraMap A B i)\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nthis : ∀ (i : { x // x ∈ t }), ∃ a, ↑f a = ↑(algebraMap A B) ↑i\n⊢ Ideal.FG (RingHom.ker ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)))\n[PROOFSTEP]\nchoose t' ht' using this\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\n⊢ Ideal.FG (RingHom.ker ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)))\n[PROOFSTEP]\nhave ht'' : Algebra.adjoin R (algebraMap A AX '' t ∪ Set.range (X : _ → AX)) = ⊤ :=\n  by\n  rw [adjoin_union_eq_adjoin_adjoin, ←\n    Subalgebra.restrictScalars_top R (A := AX) (S := { x // x ∈ adjoin R ((algebraMap A AX) '' t) })]\n  refine congrArg (Subalgebra.restrictScalars R) ?_\n  congr 1\n  rw [adjoin_algebraMap, ht]\n  apply Subalgebra.restrictScalars_injective R\n  rw [← adjoin_restrictScalars, adjoin_range_X, Subalgebra.restrictScalars_top, Subalgebra.restrictScalars_top]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\n⊢ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\n[PROOFSTEP]\nrw [adjoin_union_eq_adjoin_adjoin, ←\n  Subalgebra.restrictScalars_top R (A := AX) (S := { x // x ∈ adjoin R ((algebraMap A AX) '' t) })]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\n⊢ Subalgebra.restrictScalars R (adjoin { x // x ∈ adjoin R (↑(algebraMap A AX) '' ↑t) } (Set.range MvPolynomial.X)) =\n    Subalgebra.restrictScalars R ⊤\n[PROOFSTEP]\nrefine congrArg (Subalgebra.restrictScalars R) ?_\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\n⊢ adjoin { x // x ∈ adjoin R (↑(algebraMap A AX) '' ↑t) } (Set.range MvPolynomial.X) = ⊤\n[PROOFSTEP]\ncongr 1\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\n⊢ adjoin { x // x ∈ adjoin R (↑(algebraMap A AX) '' ↑t) } (Set.range MvPolynomial.X) = ⊤\n[PROOFSTEP]\nrw [adjoin_algebraMap, ht]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\n⊢ adjoin { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom R A AX) ⊤ } (Set.range MvPolynomial.X) = ⊤\n[PROOFSTEP]\napply Subalgebra.restrictScalars_injective R\n[GOAL]\ncase a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\n⊢ Subalgebra.restrictScalars R\n      (adjoin { x // x ∈ Subalgebra.map (IsScalarTower.toAlgHom R A AX) ⊤ } (Set.range MvPolynomial.X)) =\n    Subalgebra.restrictScalars R ⊤\n[PROOFSTEP]\nrw [← adjoin_restrictScalars, adjoin_range_X, Subalgebra.restrictScalars_top, Subalgebra.restrictScalars_top]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\n⊢ Ideal.FG (RingHom.ker ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)))\n[PROOFSTEP]\nletI g : t → AX := fun x => MvPolynomial.C (x : A) - map (algebraMap R A) (t' x)\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\n⊢ Ideal.FG (RingHom.ker ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)))\n[PROOFSTEP]\nrefine' ⟨s.image (map (algebraMap R A)) ∪ t.attach.image g, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\n⊢ Ideal.span ↑(Finset.image (↑(MvPolynomial.map (algebraMap R A))) s ∪ Finset.image g (Finset.attach t)) =\n    RingHom.ker ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n[PROOFSTEP]\nrw [Finset.coe_union, Finset.coe_image, Finset.coe_image, Finset.attach_eq_univ, Finset.coe_univ, Set.image_univ]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\n⊢ Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) =\n    RingHom.ker ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n[PROOFSTEP]\nlet s₀ := (MvPolynomial.map (algebraMap R A)) '' s ∪ Set.range g\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\n⊢ Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) =\n    RingHom.ker ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n[PROOFSTEP]\nlet I := RingHom.ker (MvPolynomial.aeval (R := A) (f ∘ MvPolynomial.X))\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n⊢ Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) =\n    RingHom.ker ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n[PROOFSTEP]\nchange Ideal.span s₀ = I\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n⊢ Ideal.span s₀ = I\n[PROOFSTEP]\nhave leI :\n  Ideal.span ((MvPolynomial.map (algebraMap R A)) '' s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (R := A) (f ∘ MvPolynomial.X)) :=\n  by\n  rw [Ideal.span_le]\n  rintro _ (⟨x, hx, rfl⟩ | ⟨⟨x, hx⟩, rfl⟩) <;> erw [RingHom.mem_ker]\n  · rw [MvPolynomial.aeval_map_algebraMap (R := R) (A := A), ← aeval_unique]\n    have := Ideal.subset_span hx\n    rwa [hs] at this \n  · rw [map_sub, MvPolynomial.aeval_map_algebraMap, ← aeval_unique, MvPolynomial.aeval_C, ht', Subtype.coe_mk, sub_self]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n⊢ Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n[PROOFSTEP]\nrw [Ideal.span_le]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n⊢ ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g ⊆ ↑(RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X)))\n[PROOFSTEP]\nrintro _ (⟨x, hx, rfl⟩ | ⟨⟨x, hx⟩, rfl⟩)\n[GOAL]\ncase inl.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) R\nhx : x ∈ ↑s\n⊢ ↑(MvPolynomial.map (algebraMap R A)) x ∈ ↑(RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X)))\n[PROOFSTEP]\nerw [RingHom.mem_ker]\n[GOAL]\ncase inr.intro.mk\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : A\nhx : x ∈ t\n⊢ g { val := x, property := hx } ∈ ↑(RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X)))\n[PROOFSTEP]\nerw [RingHom.mem_ker]\n[GOAL]\ncase inl.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) R\nhx : x ∈ ↑s\n⊢ ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) (↑(MvPolynomial.map (algebraMap R A)) x) = 0\n[PROOFSTEP]\nrw [MvPolynomial.aeval_map_algebraMap (R := R) (A := A), ← aeval_unique]\n[GOAL]\ncase inl.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) R\nhx : x ∈ ↑s\n⊢ ↑f x = 0\n[PROOFSTEP]\nhave := Ideal.subset_span hx\n[GOAL]\ncase inl.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) R\nhx : x ∈ ↑s\nthis : x ∈ ↑(Ideal.span ↑s)\n⊢ ↑f x = 0\n[PROOFSTEP]\nrwa [hs] at this \n[GOAL]\ncase inr.intro.mk\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : A\nhx : x ∈ t\n⊢ ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) (g { val := x, property := hx }) = 0\n[PROOFSTEP]\nrw [map_sub, MvPolynomial.aeval_map_algebraMap, ← aeval_unique, MvPolynomial.aeval_C, ht', Subtype.coe_mk, sub_self]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n⊢ Ideal.span s₀ = I\n[PROOFSTEP]\napply leI.antisymm\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n⊢ RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) ≤\n    Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : x ∈ RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\n⊢ x ∈ Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g)\n[PROOFSTEP]\nrw [RingHom.mem_ker] at hx \n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\n⊢ x ∈ Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g)\n[PROOFSTEP]\nlet s₀ := (MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\n⊢ x ∈ Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g)\n[PROOFSTEP]\nchange x ∈ Ideal.span s₀\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\n⊢ x ∈ Ideal.span s₀\n[PROOFSTEP]\nhave : x ∈ (MvPolynomial.map (algebraMap R A) : _ →+* AX).range.toAddSubmonoid ⊔ (Ideal.span s₀).toAddSubmonoid :=\n  by\n  have : x ∈ (⊤ : Subalgebra R AX) := trivial\n  rw [← ht''] at this \n  refine adjoin_induction this ?_ ?_ ?_ ?_\n  · rintro _ (⟨x, hx, rfl⟩ | ⟨i, rfl⟩)\n    · rw [algebraMap_eq, ← sub_add_cancel (MvPolynomial.C x) (map (algebraMap R A) (t' ⟨x, hx⟩)), add_comm]\n      apply AddSubmonoid.add_mem_sup\n      · exact Set.mem_range_self _\n      · apply Ideal.subset_span\n        apply Set.mem_union_right\n        exact Set.mem_range_self _\n    · apply AddSubmonoid.mem_sup_left\n      exact ⟨X i, map_X _ _⟩\n  · intro r\n    apply AddSubmonoid.mem_sup_left\n    exact ⟨C r, map_C _ _⟩\n  · intro _ _ h₁ h₂\n    exact add_mem h₁ h₂\n  · intro x₁ x₂ h₁ h₂\n    obtain ⟨_, ⟨p₁, rfl⟩, q₁, hq₁, rfl⟩ := AddSubmonoid.mem_sup.mp h₁\n    obtain ⟨_, ⟨p₂, rfl⟩, q₂, hq₂, rfl⟩ := AddSubmonoid.mem_sup.mp h₂\n    rw [add_mul, mul_add, add_assoc, ← map_mul]\n    apply AddSubmonoid.add_mem_sup\n    · exact Set.mem_range_self _\n    · refine' add_mem (Ideal.mul_mem_left _ _ hq₂) (Ideal.mul_mem_right _ _ hq₁)\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\n⊢ x ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nhave : x ∈ (⊤ : Subalgebra R AX) := trivial\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ ⊤\n⊢ x ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nrw [← ht''] at this \n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\n⊢ x ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nrefine adjoin_induction this ?_ ?_ ?_ ?_\n[GOAL]\ncase refine_1\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\n⊢ ∀ (x : MvPolynomial (Fin n) A),\n    x ∈ ↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X →\n      x ∈\n        Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n          (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nrintro _ (⟨x, hx, rfl⟩ | ⟨i, rfl⟩)\n[GOAL]\ncase refine_1.inl.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx✝ : MvPolynomial (Fin n) A\nhx✝ : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x✝ = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x✝ ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\nx : A\nhx : x ∈ ↑t\n⊢ ↑(algebraMap A AX) x ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nrw [algebraMap_eq, ← sub_add_cancel (MvPolynomial.C x) (map (algebraMap R A) (t' ⟨x, hx⟩)), add_comm]\n[GOAL]\ncase refine_1.inl.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx✝ : MvPolynomial (Fin n) A\nhx✝ : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x✝ = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x✝ ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\nx : A\nhx : x ∈ ↑t\n⊢ ↑(MvPolynomial.map (algebraMap R A)) (t' { val := x, property := hx }) +\n      (↑MvPolynomial.C x - ↑(MvPolynomial.map (algebraMap R A)) (t' { val := x, property := hx })) ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\napply AddSubmonoid.add_mem_sup\n[GOAL]\ncase refine_1.inl.intro.intro.hx\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx✝ : MvPolynomial (Fin n) A\nhx✝ : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x✝ = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x✝ ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\nx : A\nhx : x ∈ ↑t\n⊢ ↑(MvPolynomial.map (algebraMap R A)) (t' { val := x, property := hx }) ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring\n[PROOFSTEP]\nexact Set.mem_range_self _\n[GOAL]\ncase refine_1.inl.intro.intro.hy\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx✝ : MvPolynomial (Fin n) A\nhx✝ : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x✝ = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x✝ ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\nx : A\nhx : x ∈ ↑t\n⊢ ↑MvPolynomial.C x - ↑(MvPolynomial.map (algebraMap R A)) (t' { val := x, property := hx }) ∈\n    (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\napply Ideal.subset_span\n[GOAL]\ncase refine_1.inl.intro.intro.hy.a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx✝ : MvPolynomial (Fin n) A\nhx✝ : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x✝ = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x✝ ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\nx : A\nhx : x ∈ ↑t\n⊢ ↑MvPolynomial.C x - ↑(MvPolynomial.map (algebraMap R A)) (t' { val := x, property := hx }) ∈ s₀\n[PROOFSTEP]\napply Set.mem_union_right\n[GOAL]\ncase refine_1.inl.intro.intro.hy.a.a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx✝ : MvPolynomial (Fin n) A\nhx✝ : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x✝ = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x✝ ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\nx : A\nhx : x ∈ ↑t\n⊢ ↑MvPolynomial.C x - ↑(MvPolynomial.map (algebraMap R A)) (t' { val := x, property := hx }) ∈ Set.range g\n[PROOFSTEP]\nexact Set.mem_range_self _\n[GOAL]\ncase refine_1.inr.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\ni : Fin n\n⊢ MvPolynomial.X i ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\napply AddSubmonoid.mem_sup_left\n[GOAL]\ncase refine_1.inr.intro.a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\ni : Fin n\n⊢ MvPolynomial.X i ∈ Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring\n[PROOFSTEP]\nexact ⟨X i, map_X _ _⟩\n[GOAL]\ncase refine_2\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\n⊢ ∀ (r : R),\n    ↑(algebraMap R (MvPolynomial (Fin n) A)) r ∈\n      Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n        (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nintro r\n[GOAL]\ncase refine_2\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\nr : R\n⊢ ↑(algebraMap R (MvPolynomial (Fin n) A)) r ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\napply AddSubmonoid.mem_sup_left\n[GOAL]\ncase refine_2.a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\nr : R\n⊢ ↑(algebraMap R (MvPolynomial (Fin n) A)) r ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring\n[PROOFSTEP]\nexact ⟨C r, map_C _ _⟩\n[GOAL]\ncase refine_3\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\n⊢ ∀ (x y : MvPolynomial (Fin n) A),\n    x ∈\n        Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n          (Ideal.span s₀).toAddSubmonoid →\n      y ∈\n          Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n            (Ideal.span s₀).toAddSubmonoid →\n        x + y ∈\n          Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n            (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nintro _ _ h₁ h₂\n[GOAL]\ncase refine_3\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\nx✝ y✝ : MvPolynomial (Fin n) A\nh₁ :\n  x✝ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\nh₂ :\n  y✝ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n⊢ x✝ + y✝ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nexact add_mem h₁ h₂\n[GOAL]\ncase refine_4\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\n⊢ ∀ (x y : MvPolynomial (Fin n) A),\n    x ∈\n        Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n          (Ideal.span s₀).toAddSubmonoid →\n      y ∈\n          Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n            (Ideal.span s₀).toAddSubmonoid →\n        x * y ∈\n          Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n            (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nintro x₁ x₂ h₁ h₂\n[GOAL]\ncase refine_4\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\nx₁ x₂ : MvPolynomial (Fin n) A\nh₁ :\n  x₁ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\nh₂ :\n  x₂ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n⊢ x₁ * x₂ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nobtain ⟨_, ⟨p₁, rfl⟩, q₁, hq₁, rfl⟩ := AddSubmonoid.mem_sup.mp h₁\n[GOAL]\ncase refine_4.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\nx₂ : MvPolynomial (Fin n) A\nh₂ :\n  x₂ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\np₁ : MvPolynomial (Fin n) R\nq₁ : MvPolynomial (Fin n) A\nhq₁ : q₁ ∈ (Ideal.span s₀).toAddSubmonoid\nh₁ :\n  ↑(MvPolynomial.map (algebraMap R A)) p₁ + q₁ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n⊢ (↑(MvPolynomial.map (algebraMap R A)) p₁ + q₁) * x₂ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nobtain ⟨_, ⟨p₂, rfl⟩, q₂, hq₂, rfl⟩ := AddSubmonoid.mem_sup.mp h₂\n[GOAL]\ncase refine_4.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\np₁ : MvPolynomial (Fin n) R\nq₁ : MvPolynomial (Fin n) A\nhq₁ : q₁ ∈ (Ideal.span s₀).toAddSubmonoid\nh₁ :\n  ↑(MvPolynomial.map (algebraMap R A)) p₁ + q₁ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\np₂ : MvPolynomial (Fin n) R\nq₂ : MvPolynomial (Fin n) A\nhq₂ : q₂ ∈ (Ideal.span s₀).toAddSubmonoid\nh₂ :\n  ↑(MvPolynomial.map (algebraMap R A)) p₂ + q₂ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n⊢ (↑(MvPolynomial.map (algebraMap R A)) p₁ + q₁) * (↑(MvPolynomial.map (algebraMap R A)) p₂ + q₂) ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nrw [add_mul, mul_add, add_assoc, ← map_mul]\n[GOAL]\ncase refine_4.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\np₁ : MvPolynomial (Fin n) R\nq₁ : MvPolynomial (Fin n) A\nhq₁ : q₁ ∈ (Ideal.span s₀).toAddSubmonoid\nh₁ :\n  ↑(MvPolynomial.map (algebraMap R A)) p₁ + q₁ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\np₂ : MvPolynomial (Fin n) R\nq₂ : MvPolynomial (Fin n) A\nhq₂ : q₂ ∈ (Ideal.span s₀).toAddSubmonoid\nh₂ :\n  ↑(MvPolynomial.map (algebraMap R A)) p₂ + q₂ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n⊢ ↑(MvPolynomial.map (algebraMap R A)) (p₁ * p₂) +\n      (↑(MvPolynomial.map (algebraMap R A)) p₁ * q₂ + q₁ * (↑(MvPolynomial.map (algebraMap R A)) p₂ + q₂)) ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\napply AddSubmonoid.add_mem_sup\n[GOAL]\ncase refine_4.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.hx\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\np₁ : MvPolynomial (Fin n) R\nq₁ : MvPolynomial (Fin n) A\nhq₁ : q₁ ∈ (Ideal.span s₀).toAddSubmonoid\nh₁ :\n  ↑(MvPolynomial.map (algebraMap R A)) p₁ + q₁ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\np₂ : MvPolynomial (Fin n) R\nq₂ : MvPolynomial (Fin n) A\nhq₂ : q₂ ∈ (Ideal.span s₀).toAddSubmonoid\nh₂ :\n  ↑(MvPolynomial.map (algebraMap R A)) p₂ + q₂ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n⊢ ↑(MvPolynomial.map (algebraMap R A)) (p₁ * p₂) ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring\n[PROOFSTEP]\nexact Set.mem_range_self _\n[GOAL]\ncase refine_4.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.hy\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis : x ∈ adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X)\np₁ : MvPolynomial (Fin n) R\nq₁ : MvPolynomial (Fin n) A\nhq₁ : q₁ ∈ (Ideal.span s₀).toAddSubmonoid\nh₁ :\n  ↑(MvPolynomial.map (algebraMap R A)) p₁ + q₁ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\np₂ : MvPolynomial (Fin n) R\nq₂ : MvPolynomial (Fin n) A\nhq₂ : q₂ ∈ (Ideal.span s₀).toAddSubmonoid\nh₂ :\n  ↑(MvPolynomial.map (algebraMap R A)) p₂ + q₂ ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n⊢ ↑(MvPolynomial.map (algebraMap R A)) p₁ * q₂ + q₁ * (↑(MvPolynomial.map (algebraMap R A)) p₂ + q₂) ∈\n    (Ideal.span s₀).toAddSubmonoid\n[PROOFSTEP]\nrefine' add_mem (Ideal.mul_mem_left _ _ hq₂) (Ideal.mul_mem_right _ _ hq₁)\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nx : MvPolynomial (Fin n) A\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) x = 0\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nthis :\n  x ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n⊢ x ∈ Ideal.span s₀\n[PROOFSTEP]\nobtain ⟨_, ⟨p, rfl⟩, q, hq, rfl⟩ := AddSubmonoid.mem_sup.mp this\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\np : MvPolynomial (Fin n) R\nq : MvPolynomial (Fin n) A\nhq : q ∈ (Ideal.span s₀).toAddSubmonoid\nhx : ↑(MvPolynomial.aeval (↑f ∘ MvPolynomial.X)) (↑(MvPolynomial.map (algebraMap R A)) p + q) = 0\nthis :\n  ↑(MvPolynomial.map (algebraMap R A)) p + q ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n⊢ ↑(MvPolynomial.map (algebraMap R A)) p + q ∈ Ideal.span s₀\n[PROOFSTEP]\nrw [map_add, aeval_map_algebraMap, ← aeval_unique, show MvPolynomial.aeval (f ∘ X) q = 0 from leI hq, add_zero] at hx \n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\np : MvPolynomial (Fin n) R\nq : MvPolynomial (Fin n) A\nhq : q ∈ (Ideal.span s₀).toAddSubmonoid\nhx : ↑f p = 0\nthis :\n  ↑(MvPolynomial.map (algebraMap R A)) p + q ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n⊢ ↑(MvPolynomial.map (algebraMap R A)) p + q ∈ Ideal.span s₀\n[PROOFSTEP]\nsuffices Ideal.span (s : Set RX) ≤ (Ideal.span s₀).comap (MvPolynomial.map <| algebraMap R A)\n  by\n  refine' add_mem _ hq\n  rw [hs] at this \n  exact this hx\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\np : MvPolynomial (Fin n) R\nq : MvPolynomial (Fin n) A\nhq : q ∈ (Ideal.span s₀).toAddSubmonoid\nhx : ↑f p = 0\nthis✝ :\n  ↑(MvPolynomial.map (algebraMap R A)) p + q ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\nthis : Ideal.span ↑s ≤ Ideal.comap (MvPolynomial.map (algebraMap R A)) (Ideal.span s₀)\n⊢ ↑(MvPolynomial.map (algebraMap R A)) p + q ∈ Ideal.span s₀\n[PROOFSTEP]\nrefine' add_mem _ hq\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\np : MvPolynomial (Fin n) R\nq : MvPolynomial (Fin n) A\nhq : q ∈ (Ideal.span s₀).toAddSubmonoid\nhx : ↑f p = 0\nthis✝ :\n  ↑(MvPolynomial.map (algebraMap R A)) p + q ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\nthis : Ideal.span ↑s ≤ Ideal.comap (MvPolynomial.map (algebraMap R A)) (Ideal.span s₀)\n⊢ ↑(MvPolynomial.map (algebraMap R A)) p ∈ Ideal.span s₀\n[PROOFSTEP]\nrw [hs] at this \n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\np : MvPolynomial (Fin n) R\nq : MvPolynomial (Fin n) A\nhq : q ∈ (Ideal.span s₀).toAddSubmonoid\nhx : ↑f p = 0\nthis✝ :\n  ↑(MvPolynomial.map (algebraMap R A)) p + q ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\nthis : RingHom.ker ↑f ≤ Ideal.comap (MvPolynomial.map (algebraMap R A)) (Ideal.span s₀)\n⊢ ↑(MvPolynomial.map (algebraMap R A)) p ∈ Ideal.span s₀\n[PROOFSTEP]\nexact this hx\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\np : MvPolynomial (Fin n) R\nq : MvPolynomial (Fin n) A\nhq : q ∈ (Ideal.span s₀).toAddSubmonoid\nhx : ↑f p = 0\nthis :\n  ↑(MvPolynomial.map (algebraMap R A)) p + q ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n⊢ Ideal.span ↑s ≤ Ideal.comap (MvPolynomial.map (algebraMap R A)) (Ideal.span s₀)\n[PROOFSTEP]\nrw [Ideal.span_le]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\np : MvPolynomial (Fin n) R\nq : MvPolynomial (Fin n) A\nhq : q ∈ (Ideal.span s₀).toAddSubmonoid\nhx : ↑f p = 0\nthis :\n  ↑(MvPolynomial.map (algebraMap R A)) p + q ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\n⊢ ↑s ⊆ ↑(Ideal.comap (MvPolynomial.map (algebraMap R A)) (Ideal.span s₀))\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\np : MvPolynomial (Fin n) R\nq : MvPolynomial (Fin n) A\nhq : q ∈ (Ideal.span s₀).toAddSubmonoid\nhx✝ : ↑f p = 0\nthis :\n  ↑(MvPolynomial.map (algebraMap R A)) p + q ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\nx : MvPolynomial (Fin n) R\nhx : x ∈ ↑s\n⊢ x ∈ ↑(Ideal.comap (MvPolynomial.map (algebraMap R A)) (Ideal.span s₀))\n[PROOFSTEP]\napply Ideal.subset_span\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro.a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\np : MvPolynomial (Fin n) R\nq : MvPolynomial (Fin n) A\nhq : q ∈ (Ideal.span s₀).toAddSubmonoid\nhx✝ : ↑f p = 0\nthis :\n  ↑(MvPolynomial.map (algebraMap R A)) p + q ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\nx : MvPolynomial (Fin n) R\nhx : x ∈ ↑s\n⊢ ↑(MvPolynomial.map (algebraMap R A)) x ∈ s₀\n[PROOFSTEP]\napply Set.mem_union_left\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro.a.a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : Algebra R A\ninst✝³ : CommRing B\ninst✝² : Algebra R B\ninst✝¹ : Algebra A B\ninst✝ : IsScalarTower R A B\nhRA : FiniteType R A\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] B\nhf : Surjective ↑f\ns : Finset (MvPolynomial (Fin n) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f\nRX : Type w₁ := MvPolynomial (Fin n) R\nAX : Type w₂ := MvPolynomial (Fin n) A\nt : Finset A\nht : adjoin R ↑t = ⊤\nt' : { x // x ∈ t } → MvPolynomial (Fin n) R\nht' : ∀ (i : { x // x ∈ t }), ↑f (t' i) = ↑(algebraMap A B) ↑i\nht'' : adjoin R (↑(algebraMap A AX) '' ↑t ∪ Set.range MvPolynomial.X) = ⊤\ng : { x // x ∈ t } → AX := fun x => ↑MvPolynomial.C ↑x - ↑(MvPolynomial.map (algebraMap R A)) (t' x)\ns₀✝ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\nI : Ideal (MvPolynomial (Fin n) A) := RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\nleI :\n  Ideal.span (↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g) ≤\n    RingHom.ker (MvPolynomial.aeval (↑f ∘ MvPolynomial.X))\ns₀ : Set (MvPolynomial (Fin n) A) := ↑(MvPolynomial.map (algebraMap R A)) '' ↑s ∪ Set.range g\np : MvPolynomial (Fin n) R\nq : MvPolynomial (Fin n) A\nhq : q ∈ (Ideal.span s₀).toAddSubmonoid\nhx✝ : ↑f p = 0\nthis :\n  ↑(MvPolynomial.map (algebraMap R A)) p + q ∈\n    Subsemiring.toAddSubmonoid (RingHom.range (MvPolynomial.map (algebraMap R A))).toSubsemiring ⊔\n      (Ideal.span s₀).toAddSubmonoid\nx : MvPolynomial (Fin n) R\nhx : x ∈ ↑s\n⊢ ↑(MvPolynomial.map (algebraMap R A)) x ∈ ↑(MvPolynomial.map (algebraMap R A)) '' ↑s\n[PROOFSTEP]\nexact Set.mem_image_of_mem _ hx\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nhfp : FinitePresentation R A\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nclassical\nobtain ⟨m, f', hf', s, hs⟩ := hfp\nlet RXn := MvPolynomial (Fin n) R\nlet RXm := MvPolynomial (Fin m) R\nhave := fun i : Fin n => hf' (f <| X i)\nchoose g hg using this\nhave := fun i : Fin m => hf (f' <| X i)\nchoose h hh using this\nlet aeval_h : RXm →ₐ[R] RXn := aeval h\nlet g' : Fin n → RXn := fun i => X i - aeval_h (g i)\nrefine' ⟨Finset.univ.image g' ∪ s.image aeval_h, _⟩\nsimp only [Finset.coe_image, Finset.coe_union, Finset.coe_univ, Set.image_univ]\nhave hh' : ∀ x, f (aeval_h x) = f' x := by\n  intro x\n  rw [← f.coe_toRingHom, map_aeval]\n  simp_rw [AlgHom.coe_toRingHom, hh]\n  rw [AlgHom.comp_algebraMap, ← aeval_eq_eval₂Hom,\n    -- Porting note: added line below← funext fun i => Function.comp_apply (f := ↑f') (g := MvPolynomial.X), ←\n    aeval_unique]\nlet s' := Set.range g' ∪ aeval_h '' s\nhave leI : Ideal.span s' ≤ RingHom.ker f.toRingHom :=\n  by\n  rw [Ideal.span_le]\n  rintro _ (⟨i, rfl⟩ | ⟨x, hx, rfl⟩)\n  · change f (g' i) = 0\n    rw [map_sub, ← hg, hh', sub_self]\n  · change f (aeval_h x) = 0\n    rw [hh']\n    change x ∈ RingHom.ker f'.toRingHom\n    rw [← hs]\n    exact Ideal.subset_span hx\napply leI.antisymm\nintro x hx\nhave : x ∈ aeval_h.range.toAddSubmonoid ⊔ (Ideal.span s').toAddSubmonoid :=\n  by\n  have : x ∈ adjoin R (Set.range X : Set RXn) := by\n    rw [adjoin_range_X]\n    trivial\n  refine adjoin_induction this ?_ ?_ ?_ ?_\n  · rintro _ ⟨i, rfl⟩\n    rw [← sub_add_cancel (X i) (aeval h (g i)), add_comm]\n    apply AddSubmonoid.add_mem_sup\n    · exact Set.mem_range_self _\n    · apply Submodule.subset_span\n      apply Set.mem_union_left\n      exact Set.mem_range_self _\n  · intro r\n    apply AddSubmonoid.mem_sup_left\n    exact ⟨C r, aeval_C _ _⟩\n  · intro _ _ h₁ h₂\n    exact add_mem h₁ h₂\n  · intro p₁ p₂ h₁ h₂\n    obtain ⟨_, ⟨x₁, rfl⟩, y₁, hy₁, rfl⟩ := AddSubmonoid.mem_sup.mp h₁\n    obtain ⟨_, ⟨x₂, rfl⟩, y₂, hy₂, rfl⟩ := AddSubmonoid.mem_sup.mp h₂\n    rw [mul_add, add_mul, add_assoc, ← map_mul]\n    apply AddSubmonoid.add_mem_sup\n    · exact Set.mem_range_self _\n    · exact add_mem (Ideal.mul_mem_right _ _ hy₁) (Ideal.mul_mem_left _ _ hy₂)\nobtain ⟨_, ⟨x, rfl⟩, y, hy, rfl⟩ := AddSubmonoid.mem_sup.mp this\nrefine' add_mem _ hy\nsimp only [RingHom.mem_ker, AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom, map_add, show f y = 0 from leI hy, add_zero,\n  hh'] at hx \nsuffices Ideal.span (s : Set RXm) ≤ (Ideal.span s').comap aeval_h\n  by\n  apply this\n  rwa [hs]\nrw [Ideal.span_le]\nintro x hx\napply Submodule.subset_span\napply Set.mem_union_right\nexact Set.mem_image_of_mem _ hx\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nhfp : FinitePresentation R A\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nobtain ⟨m, f', hf', s, hs⟩ := hfp\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nlet RXn := MvPolynomial (Fin n) R\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nlet RXm := MvPolynomial (Fin m) R\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nhave := fun i : Fin n => hf' (f <| X i)\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\nthis : ∀ (i : Fin n), ∃ a, ↑f' a = ↑f (MvPolynomial.X i)\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nchoose g hg using this\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nhave := fun i : Fin m => hf (f' <| X i)\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nthis : ∀ (i : Fin m), ∃ a, ↑f a = ↑f' (MvPolynomial.X i)\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nchoose h hh using this\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nlet aeval_h : RXm →ₐ[R] RXn := aeval h\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nlet g' : Fin n → RXn := fun i => X i - aeval_h (g i)\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nrefine' ⟨Finset.univ.image g' ∪ s.image aeval_h, _⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\n⊢ Ideal.span ↑(Finset.image g' Finset.univ ∪ Finset.image (↑aeval_h) s) = RingHom.ker ↑f\n[PROOFSTEP]\nsimp only [Finset.coe_image, Finset.coe_union, Finset.coe_univ, Set.image_univ]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\n⊢ Ideal.span ((Set.range fun i => MvPolynomial.X i - ↑(MvPolynomial.aeval h) (g i)) ∪ ↑(MvPolynomial.aeval h) '' ↑s) =\n    RingHom.ker ↑f\n[PROOFSTEP]\nhave hh' : ∀ x, f (aeval_h x) = f' x := by\n  intro x\n  rw [← f.coe_toRingHom, map_aeval]\n  simp_rw [AlgHom.coe_toRingHom, hh]\n  rw [AlgHom.comp_algebraMap, ← aeval_eq_eval₂Hom,\n    -- Porting note: added line below← funext fun i => Function.comp_apply (f := ↑f') (g := MvPolynomial.X), ←\n    aeval_unique]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\n⊢ ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nx : RXm\n⊢ ↑f (↑aeval_h x) = ↑f' x\n[PROOFSTEP]\nrw [← f.coe_toRingHom, map_aeval]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nx : RXm\n⊢ ↑(eval₂Hom (RingHom.comp (↑f) (algebraMap R (MvPolynomial (Fin n) R))) fun i => ↑↑f (h i)) x = ↑f' x\n[PROOFSTEP]\nsimp_rw [AlgHom.coe_toRingHom, hh]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nx : RXm\n⊢ ↑(eval₂Hom (RingHom.comp (↑f) (algebraMap R (MvPolynomial (Fin n) R))) fun i => ↑f' (MvPolynomial.X i)) x = ↑f' x\n[PROOFSTEP]\nrw [AlgHom.comp_algebraMap, ← aeval_eq_eval₂Hom,\n  -- Porting note: added line below← funext fun i => Function.comp_apply (f := ↑f') (g := MvPolynomial.X), ←\n  aeval_unique]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\n⊢ Ideal.span ((Set.range fun i => MvPolynomial.X i - ↑(MvPolynomial.aeval h) (g i)) ∪ ↑(MvPolynomial.aeval h) '' ↑s) =\n    RingHom.ker ↑f\n[PROOFSTEP]\nlet s' := Set.range g' ∪ aeval_h '' s\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\n⊢ Ideal.span ((Set.range fun i => MvPolynomial.X i - ↑(MvPolynomial.aeval h) (g i)) ∪ ↑(MvPolynomial.aeval h) '' ↑s) =\n    RingHom.ker ↑f\n[PROOFSTEP]\nhave leI : Ideal.span s' ≤ RingHom.ker f.toRingHom :=\n  by\n  rw [Ideal.span_le]\n  rintro _ (⟨i, rfl⟩ | ⟨x, hx, rfl⟩)\n  · change f (g' i) = 0\n    rw [map_sub, ← hg, hh', sub_self]\n  · change f (aeval_h x) = 0\n    rw [hh']\n    change x ∈ RingHom.ker f'.toRingHom\n    rw [← hs]\n    exact Ideal.subset_span hx\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\n⊢ Ideal.span s' ≤ RingHom.ker ↑f\n[PROOFSTEP]\nrw [Ideal.span_le]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\n⊢ s' ⊆ ↑(RingHom.ker ↑f)\n[PROOFSTEP]\nrintro _ (⟨i, rfl⟩ | ⟨x, hx, rfl⟩)\n[GOAL]\ncase inl.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\ni : Fin n\n⊢ g' i ∈ ↑(RingHom.ker ↑f)\n[PROOFSTEP]\nchange f (g' i) = 0\n[GOAL]\ncase inl.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\ni : Fin n\n⊢ ↑f (g' i) = 0\n[PROOFSTEP]\nrw [map_sub, ← hg, hh', sub_self]\n[GOAL]\ncase inr.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nx : RXm\nhx : x ∈ ↑s\n⊢ ↑aeval_h x ∈ ↑(RingHom.ker ↑f)\n[PROOFSTEP]\nchange f (aeval_h x) = 0\n[GOAL]\ncase inr.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nx : RXm\nhx : x ∈ ↑s\n⊢ ↑f (↑aeval_h x) = 0\n[PROOFSTEP]\nrw [hh']\n[GOAL]\ncase inr.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nx : RXm\nhx : x ∈ ↑s\n⊢ ↑f' x = 0\n[PROOFSTEP]\nchange x ∈ RingHom.ker f'.toRingHom\n[GOAL]\ncase inr.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nx : RXm\nhx : x ∈ ↑s\n⊢ x ∈ RingHom.ker ↑f'\n[PROOFSTEP]\nrw [← hs]\n[GOAL]\ncase inr.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nx : RXm\nhx : x ∈ ↑s\n⊢ x ∈ Ideal.span ↑s\n[PROOFSTEP]\nexact Ideal.subset_span hx\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\n⊢ Ideal.span ((Set.range fun i => MvPolynomial.X i - ↑(MvPolynomial.aeval h) (g i)) ∪ ↑(MvPolynomial.aeval h) '' ↑s) =\n    RingHom.ker ↑f\n[PROOFSTEP]\napply leI.antisymm\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\n⊢ RingHom.ker ↑f ≤ Ideal.span s'\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\n⊢ x ∈ Ideal.span s'\n[PROOFSTEP]\nhave : x ∈ aeval_h.range.toAddSubmonoid ⊔ (Ideal.span s').toAddSubmonoid :=\n  by\n  have : x ∈ adjoin R (Set.range X : Set RXn) := by\n    rw [adjoin_range_X]\n    trivial\n  refine adjoin_induction this ?_ ?_ ?_ ?_\n  · rintro _ ⟨i, rfl⟩\n    rw [← sub_add_cancel (X i) (aeval h (g i)), add_comm]\n    apply AddSubmonoid.add_mem_sup\n    · exact Set.mem_range_self _\n    · apply Submodule.subset_span\n      apply Set.mem_union_left\n      exact Set.mem_range_self _\n  · intro r\n    apply AddSubmonoid.mem_sup_left\n    exact ⟨C r, aeval_C _ _⟩\n  · intro _ _ h₁ h₂\n    exact add_mem h₁ h₂\n  · intro p₁ p₂ h₁ h₂\n    obtain ⟨_, ⟨x₁, rfl⟩, y₁, hy₁, rfl⟩ := AddSubmonoid.mem_sup.mp h₁\n    obtain ⟨_, ⟨x₂, rfl⟩, y₂, hy₂, rfl⟩ := AddSubmonoid.mem_sup.mp h₂\n    rw [mul_add, add_mul, add_assoc, ← map_mul]\n    apply AddSubmonoid.add_mem_sup\n    · exact Set.mem_range_self _\n    · exact add_mem (Ideal.mul_mem_right _ _ hy₁) (Ideal.mul_mem_left _ _ hy₂)\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\n⊢ x ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\nhave : x ∈ adjoin R (Set.range X : Set RXn) := by\n  rw [adjoin_range_X]\n  trivial\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\n⊢ x ∈ adjoin R (Set.range MvPolynomial.X)\n[PROOFSTEP]\nrw [adjoin_range_X]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\n⊢ x ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\n⊢ x ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\nrefine adjoin_induction this ?_ ?_ ?_ ?_\n[GOAL]\ncase refine_1\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\n⊢ ∀ (x : RXn),\n    x ∈ Set.range MvPolynomial.X → x ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\nrintro _ ⟨i, rfl⟩\n[GOAL]\ncase refine_1.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\ni : Fin n\n⊢ MvPolynomial.X i ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\nrw [← sub_add_cancel (X i) (aeval h (g i)), add_comm]\n[GOAL]\ncase refine_1.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\ni : Fin n\n⊢ ↑(MvPolynomial.aeval h) (g i) + (MvPolynomial.X i - ↑(MvPolynomial.aeval h) (g i)) ∈\n    Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\napply AddSubmonoid.add_mem_sup\n[GOAL]\ncase refine_1.intro.hx\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\ni : Fin n\n⊢ ↑(MvPolynomial.aeval h) (g i) ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h)\n[PROOFSTEP]\nexact Set.mem_range_self _\n[GOAL]\ncase refine_1.intro.hy\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\ni : Fin n\n⊢ MvPolynomial.X i - ↑(MvPolynomial.aeval h) (g i) ∈ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\napply Submodule.subset_span\n[GOAL]\ncase refine_1.intro.hy.a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\ni : Fin n\n⊢ MvPolynomial.X i - ↑(MvPolynomial.aeval h) (g i) ∈ s'\n[PROOFSTEP]\napply Set.mem_union_left\n[GOAL]\ncase refine_1.intro.hy.a.a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\ni : Fin n\n⊢ MvPolynomial.X i - ↑(MvPolynomial.aeval h) (g i) ∈ Set.range g'\n[PROOFSTEP]\nexact Set.mem_range_self _\n[GOAL]\ncase refine_2\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\n⊢ ∀ (r : R), ↑(algebraMap R RXn) r ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\nintro r\n[GOAL]\ncase refine_2\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\nr : R\n⊢ ↑(algebraMap R RXn) r ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\napply AddSubmonoid.mem_sup_left\n[GOAL]\ncase refine_2.a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\nr : R\n⊢ ↑(algebraMap R RXn) r ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h)\n[PROOFSTEP]\nexact ⟨C r, aeval_C _ _⟩\n[GOAL]\ncase refine_3\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\n⊢ ∀ (x y : RXn),\n    x ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid →\n      y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid →\n        x + y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\nintro _ _ h₁ h₂\n[GOAL]\ncase refine_3\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\nx✝ y✝ : RXn\nh₁ : x✝ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nh₂ : y✝ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n⊢ x✝ + y✝ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\nexact add_mem h₁ h₂\n[GOAL]\ncase refine_4\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\n⊢ ∀ (x y : RXn),\n    x ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid →\n      y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid →\n        x * y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\nintro p₁ p₂ h₁ h₂\n[GOAL]\ncase refine_4\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\np₁ p₂ : RXn\nh₁ : p₁ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nh₂ : p₂ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n⊢ p₁ * p₂ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\nobtain ⟨_, ⟨x₁, rfl⟩, y₁, hy₁, rfl⟩ := AddSubmonoid.mem_sup.mp h₁\n[GOAL]\ncase refine_4.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\np₂ : RXn\nh₂ : p₂ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nx₁ : RXm\ny₁ : RXn\nhy₁ : y₁ ∈ (Ideal.span s').toAddSubmonoid\nh₁ : ↑↑aeval_h x₁ + y₁ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n⊢ (↑↑aeval_h x₁ + y₁) * p₂ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\nobtain ⟨_, ⟨x₂, rfl⟩, y₂, hy₂, rfl⟩ := AddSubmonoid.mem_sup.mp h₂\n[GOAL]\ncase refine_4.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\nx₁ : RXm\ny₁ : RXn\nhy₁ : y₁ ∈ (Ideal.span s').toAddSubmonoid\nh₁ : ↑↑aeval_h x₁ + y₁ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nx₂ : RXm\ny₂ : RXn\nhy₂ : y₂ ∈ (Ideal.span s').toAddSubmonoid\nh₂ : ↑↑aeval_h x₂ + y₂ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n⊢ (↑↑aeval_h x₁ + y₁) * (↑↑aeval_h x₂ + y₂) ∈\n    Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\nrw [mul_add, add_mul, add_assoc, ← map_mul]\n[GOAL]\ncase refine_4.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\nx₁ : RXm\ny₁ : RXn\nhy₁ : y₁ ∈ (Ideal.span s').toAddSubmonoid\nh₁ : ↑↑aeval_h x₁ + y₁ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nx₂ : RXm\ny₂ : RXn\nhy₂ : y₂ ∈ (Ideal.span s').toAddSubmonoid\nh₂ : ↑↑aeval_h x₂ + y₂ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n⊢ ↑↑aeval_h (x₁ * x₂) + (y₁ * ↑↑aeval_h x₂ + (↑↑aeval_h x₁ + y₁) * y₂) ∈\n    Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\napply AddSubmonoid.add_mem_sup\n[GOAL]\ncase refine_4.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.hx\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\nx₁ : RXm\ny₁ : RXn\nhy₁ : y₁ ∈ (Ideal.span s').toAddSubmonoid\nh₁ : ↑↑aeval_h x₁ + y₁ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nx₂ : RXm\ny₂ : RXn\nhy₂ : y₂ ∈ (Ideal.span s').toAddSubmonoid\nh₂ : ↑↑aeval_h x₂ + y₂ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n⊢ ↑↑aeval_h (x₁ * x₂) ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h)\n[PROOFSTEP]\nexact Set.mem_range_self _\n[GOAL]\ncase refine_4.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.hy\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ adjoin R (Set.range MvPolynomial.X)\nx₁ : RXm\ny₁ : RXn\nhy₁ : y₁ ∈ (Ideal.span s').toAddSubmonoid\nh₁ : ↑↑aeval_h x₁ + y₁ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nx₂ : RXm\ny₂ : RXn\nhy₂ : y₂ ∈ (Ideal.span s').toAddSubmonoid\nh₂ : ↑↑aeval_h x₂ + y₂ ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n⊢ y₁ * ↑↑aeval_h x₂ + (↑↑aeval_h x₁ + y₁) * y₂ ∈ (Ideal.span s').toAddSubmonoid\n[PROOFSTEP]\nexact add_mem (Ideal.mul_mem_right _ _ hy₁) (Ideal.mul_mem_left _ _ hy₂)\n[GOAL]\ncase intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXn\nhx : x ∈ RingHom.ker ↑f\nthis : x ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n⊢ x ∈ Ideal.span s'\n[PROOFSTEP]\nobtain ⟨_, ⟨x, rfl⟩, y, hy, rfl⟩ := AddSubmonoid.mem_sup.mp this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXm\ny : RXn\nhy : y ∈ (Ideal.span s').toAddSubmonoid\nhx : ↑↑aeval_h x + y ∈ RingHom.ker ↑f\nthis : ↑↑aeval_h x + y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n⊢ ↑↑aeval_h x + y ∈ Ideal.span s'\n[PROOFSTEP]\nrefine' add_mem _ hy\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXm\ny : RXn\nhy : y ∈ (Ideal.span s').toAddSubmonoid\nhx : ↑↑aeval_h x + y ∈ RingHom.ker ↑f\nthis : ↑↑aeval_h x + y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\n⊢ ↑↑aeval_h x ∈ Ideal.span s'\n[PROOFSTEP]\nsimp only [RingHom.mem_ker, AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom, map_add, show f y = 0 from leI hy, add_zero,\n  hh'] at hx \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXm\ny : RXn\nhy : y ∈ (Ideal.span s').toAddSubmonoid\nthis : ↑↑aeval_h x + y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nhx : ↑f' x = 0\n⊢ ↑↑aeval_h x ∈ Ideal.span s'\n[PROOFSTEP]\nsuffices Ideal.span (s : Set RXm) ≤ (Ideal.span s').comap aeval_h\n  by\n  apply this\n  rwa [hs]\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXm\ny : RXn\nhy : y ∈ (Ideal.span s').toAddSubmonoid\nthis✝ : ↑↑aeval_h x + y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nhx : ↑f' x = 0\nthis : Ideal.span ↑s ≤ Ideal.comap aeval_h (Ideal.span s')\n⊢ ↑↑aeval_h x ∈ Ideal.span s'\n[PROOFSTEP]\napply this\n[GOAL]\ncase a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXm\ny : RXn\nhy : y ∈ (Ideal.span s').toAddSubmonoid\nthis✝ : ↑↑aeval_h x + y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nhx : ↑f' x = 0\nthis : Ideal.span ↑s ≤ Ideal.comap aeval_h (Ideal.span s')\n⊢ x ∈ Ideal.span ↑s\n[PROOFSTEP]\nrwa [hs]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXm\ny : RXn\nhy : y ∈ (Ideal.span s').toAddSubmonoid\nthis : ↑↑aeval_h x + y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nhx : ↑f' x = 0\n⊢ Ideal.span ↑s ≤ Ideal.comap aeval_h (Ideal.span s')\n[PROOFSTEP]\nrw [Ideal.span_le]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx : RXm\ny : RXn\nhy : y ∈ (Ideal.span s').toAddSubmonoid\nthis : ↑↑aeval_h x + y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nhx : ↑f' x = 0\n⊢ ↑s ⊆ ↑(Ideal.comap aeval_h (Ideal.span s'))\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx✝ : RXm\ny : RXn\nhy : y ∈ (Ideal.span s').toAddSubmonoid\nthis : ↑↑aeval_h x✝ + y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nhx✝ : ↑f' x✝ = 0\nx : MvPolynomial (Fin m) R\nhx : x ∈ ↑s\n⊢ x ∈ ↑(Ideal.comap aeval_h (Ideal.span s'))\n[PROOFSTEP]\napply Submodule.subset_span\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx✝ : RXm\ny : RXn\nhy : y ∈ (Ideal.span s').toAddSubmonoid\nthis : ↑↑aeval_h x✝ + y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nhx✝ : ↑f' x✝ = 0\nx : MvPolynomial (Fin m) R\nhx : x ∈ ↑s\n⊢ ↑aeval_h x ∈ s'\n[PROOFSTEP]\napply Set.mem_union_right\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.a.a\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nn : ℕ\nf : MvPolynomial (Fin n) R →ₐ[R] A\nhf : Surjective ↑f\nm : ℕ\nf' : MvPolynomial (Fin m) R →ₐ[R] A\nhf' : Surjective ↑f'\ns : Finset (MvPolynomial (Fin m) R)\nhs : Ideal.span ↑s = RingHom.ker ↑f'\nRXn : Type w₁ := MvPolynomial (Fin n) R\nRXm : Type w₁ := MvPolynomial (Fin m) R\ng : Fin n → MvPolynomial (Fin m) R\nhg : ∀ (i : Fin n), ↑f' (g i) = ↑f (MvPolynomial.X i)\nh : Fin m → MvPolynomial (Fin n) R\nhh : ∀ (i : Fin m), ↑f (h i) = ↑f' (MvPolynomial.X i)\naeval_h : RXm →ₐ[R] RXn := MvPolynomial.aeval h\ng' : Fin n → RXn := fun i => MvPolynomial.X i - ↑aeval_h (g i)\nhh' : ∀ (x : RXm), ↑f (↑aeval_h x) = ↑f' x\ns' : Set RXn := Set.range g' ∪ ↑aeval_h '' ↑s\nleI : Ideal.span s' ≤ RingHom.ker ↑f\nx✝ : RXm\ny : RXn\nhy : y ∈ (Ideal.span s').toAddSubmonoid\nthis : ↑↑aeval_h x✝ + y ∈ Subalgebra.toAddSubmonoid (AlgHom.range aeval_h) ⊔ (Ideal.span s').toAddSubmonoid\nhx✝ : ↑f' x✝ = 0\nx : MvPolynomial (Fin m) R\nhx : x ∈ ↑s\n⊢ ↑aeval_h x ∈ ↑aeval_h '' ↑s\n[PROOFSTEP]\nexact Set.mem_image_of_mem _ hx\n[GOAL]\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nhf : Surjective ↑f\nhRA : FinitePresentation R A\nhRB : FinitePresentation R B\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nobtain ⟨n, g, hg, _⟩ := hRA\n[GOAL]\ncase intro.intro.intro\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nhf : Surjective ↑f\nhRB : FinitePresentation R B\nn : ℕ\ng : MvPolynomial (Fin n) R →ₐ[R] A\nhg : Surjective ↑g\nright✝ : Ideal.FG (RingHom.ker ↑g)\n⊢ Ideal.FG (RingHom.ker ↑f)\n[PROOFSTEP]\nconvert (ker_fg_of_mvPolynomial (f.comp g) (hf.comp hg) hRB).map g.toRingHom\n[GOAL]\ncase h.e'_3\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nhf : Surjective ↑f\nhRB : FinitePresentation R B\nn : ℕ\ng : MvPolynomial (Fin n) R →ₐ[R] A\nhg : Surjective ↑g\nright✝ : Ideal.FG (RingHom.ker ↑g)\n⊢ RingHom.ker ↑f = Ideal.map (↑g) (RingHom.ker ↑(AlgHom.comp f g))\n[PROOFSTEP]\nsimp_rw [RingHom.ker_eq_comap_bot, AlgHom.toRingHom_eq_coe, AlgHom.comp_toRingHom]\n[GOAL]\ncase h.e'_3\nR : Type w₁\nA : Type w₂\nB : Type w₃\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : CommRing B\ninst✝ : Algebra R B\nf : A →ₐ[R] B\nhf : Surjective ↑f\nhRB : FinitePresentation R B\nn : ℕ\ng : MvPolynomial (Fin n) R →ₐ[R] A\nhg : Surjective ↑g\nright✝ : Ideal.FG (RingHom.ker ↑g)\n⊢ Ideal.comap ↑f ⊥ = Ideal.map (↑g) (Ideal.comap (RingHom.comp ↑f ↑g) ⊥)\n[PROOFSTEP]\nrw [← Ideal.comap_comap, Ideal.map_comap_of_surjective (g : MvPolynomial (Fin n) R →+* A) hg]\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : CommRing A\ninst✝¹ : CommRing B\ninst✝ : CommRing C\nf : A →+* B\nhf : Surjective ↑f\nhker : Ideal.FG (ker f)\n⊢ FinitePresentation f\n[PROOFSTEP]\nrw [← f.comp_id]\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : CommRing A\ninst✝¹ : CommRing B\ninst✝ : CommRing C\nf : A →+* B\nhf : Surjective ↑f\nhker : Ideal.FG (ker f)\n⊢ FinitePresentation (comp f (RingHom.id A))\n[PROOFSTEP]\nexact (id A).comp_surjective hf hker\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : CommRing A\ninst✝¹ : CommRing B\ninst✝ : CommRing C\ng : B →+* C\nf : A →+* B\nhg : FinitePresentation g\nhf : FinitePresentation f\nins1 : Algebra A B := toAlgebra f\nins2 : Algebra B C := toAlgebra g\nins3 : Algebra A C := toAlgebra (RingHom.comp g f)\na : A\nb : B\nc : C\n⊢ (a • b) • c = a • b • c\n[PROOFSTEP]\nsimp [Algebra.smul_def, mul_assoc]\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : CommRing A\ninst✝¹ : CommRing B\ninst✝ : CommRing C\ng : B →+* C\nf : A →+* B\nhg : FinitePresentation g\nhf : FinitePresentation f\nins1 : Algebra A B := toAlgebra f\nins2 : Algebra B C := toAlgebra g\nins3 : Algebra A C := toAlgebra (RingHom.comp g f)\na : A\nb : B\nc : C\n⊢ ↑(algebraMap B C) (↑(algebraMap A B) a) * (↑(algebraMap B C) b * c) = ↑(algebraMap A C) a * (↑(algebraMap B C) b * c)\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : CommRing A\ninst✝¹ : CommRing B\ninst✝ : CommRing C\nf : A →+* B\ng : B →+* C\nhg : FinitePresentation (RingHom.comp g f)\nhf : FiniteType f\nins1 : Algebra A B := toAlgebra f\nins2 : Algebra B C := toAlgebra g\nins3 : Algebra A C := toAlgebra (RingHom.comp g f)\na : A\nb : B\nc : C\n⊢ (a • b) • c = a • b • c\n[PROOFSTEP]\nsimp [Algebra.smul_def, mul_assoc]\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : CommRing A\ninst✝¹ : CommRing B\ninst✝ : CommRing C\nf : A →+* B\ng : B →+* C\nhg : FinitePresentation (RingHom.comp g f)\nhf : FiniteType f\nins1 : Algebra A B := toAlgebra f\nins2 : Algebra B C := toAlgebra g\nins3 : Algebra A C := toAlgebra (RingHom.comp g f)\na : A\nb : B\nc : C\n⊢ ↑(algebraMap B C) (↑(algebraMap A B) a) * (↑(algebraMap B C) b * c) = ↑(algebraMap A C) a * (↑(algebraMap B C) b * c)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nC : Type u_4\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : CommRing C\ninst✝² : Algebra R A\ninst✝¹ : Algebra R B\ninst✝ : Algebra R C\nf : A →ₐ[R] B\nhf : Surjective ↑f\nhker : Ideal.FG (RingHom.ker ↑f)\n⊢ FinitePresentation f\n[PROOFSTEP]\nconvert RingHom.FinitePresentation.of_surjective f hf hker\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.FinitePresentation", "llama_tokens": 99536, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6926419831347361, "lm_q2_score": 0.5156199157230157, "lm_q1q2_score": 0.3571400009701551}}
{"text": "[GOAL]\nR : Type u_1\ninst✝ : CommRing R\np : ℕ\nhn : Fact (Nat.Prime p)\n⊢ eval 1 (cyclotomic p R) = ↑p\n[PROOFSTEP]\nsimp only [cyclotomic_prime, eval_X, one_pow, Finset.sum_const, eval_pow, eval_finset_sum, Finset.card_range,\n  smul_one_eq_coe]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : Semiring S\nf : R →+* S\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ eval₂ f 1 (cyclotomic p R) = ↑p\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\np k : ℕ\nhn : Fact (Nat.Prime p)\n⊢ eval 1 (cyclotomic (p ^ (k + 1)) R) = ↑p\n[PROOFSTEP]\nsimp only [cyclotomic_prime_pow_eq_geom_sum hn.out, eval_X, one_pow, Finset.sum_const, eval_pow, eval_finset_sum,\n  Finset.card_range, smul_one_eq_coe]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : Semiring S\nf : R →+* S\np k : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ eval₂ f 1 (cyclotomic (p ^ (k + 1)) R) = ↑p\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\n⊢ 0 < eval (-1) (cyclotomic n R)\n[PROOFSTEP]\nhaveI := NeZero.of_gt hn\n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis : NeZero n\n⊢ 0 < eval (-1) (cyclotomic n R)\n[PROOFSTEP]\nrw [← map_cyclotomic_int, ← Int.cast_one, ← Int.cast_neg, eval_int_cast_map, Int.coe_castRingHom, Int.cast_pos]\n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis : NeZero n\n⊢ 0 < eval (↑(-1)) (cyclotomic n ℤ)\n[PROOFSTEP]\nsuffices 0 < eval (↑(-1 : ℤ)) (cyclotomic n ℝ)\n  by\n  rw [← map_cyclotomic_int n ℝ, eval_int_cast_map, Int.coe_castRingHom] at this \n  simpa only [Int.cast_pos] using this\n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis✝ : NeZero n\nthis : 0 < eval (↑(-1)) (cyclotomic n ℝ)\n⊢ 0 < eval (↑(-1)) (cyclotomic n ℤ)\n[PROOFSTEP]\nrw [← map_cyclotomic_int n ℝ, eval_int_cast_map, Int.coe_castRingHom] at this \n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis✝ : NeZero n\nthis : 0 < (fun x => ↑x) (eval (↑(-1)) (cyclotomic n ℤ))\n⊢ 0 < eval (↑(-1)) (cyclotomic n ℤ)\n[PROOFSTEP]\nsimpa only [Int.cast_pos] using this\n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis : NeZero n\n⊢ 0 < eval (↑(-1)) (cyclotomic n ℝ)\n[PROOFSTEP]\nsimp only [Int.cast_one, Int.cast_neg]\n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis : NeZero n\n⊢ 0 < eval (-1) (cyclotomic n ℝ)\n[PROOFSTEP]\nhave h0 := cyclotomic_coeff_zero ℝ hn.le\n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis : NeZero n\nh0 : coeff (cyclotomic n ℝ) 0 = 1\n⊢ 0 < eval (-1) (cyclotomic n ℝ)\n[PROOFSTEP]\nrw [coeff_zero_eq_eval_zero] at h0 \n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis : NeZero n\nh0 : eval 0 (cyclotomic n ℝ) = 1\n⊢ 0 < eval (-1) (cyclotomic n ℝ)\n[PROOFSTEP]\nby_contra' hx\n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis : NeZero n\nh0 : eval 0 (cyclotomic n ℝ) = 1\nhx : eval (-1) (cyclotomic n ℝ) ≤ 0\n⊢ False\n[PROOFSTEP]\nhave := intermediate_value_univ (-1) 0 (cyclotomic n ℝ).continuous\n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis✝ : NeZero n\nh0 : eval 0 (cyclotomic n ℝ) = 1\nhx : eval (-1) (cyclotomic n ℝ) ≤ 0\nthis : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)\n⊢ False\n[PROOFSTEP]\nobtain ⟨y, hy : IsRoot _ y⟩ := this (show (0 : ℝ) ∈ Set.Icc _ _ by simpa [h0] using hx)\n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis✝ : NeZero n\nh0 : eval 0 (cyclotomic n ℝ) = 1\nhx : eval (-1) (cyclotomic n ℝ) ≤ 0\nthis : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)\n⊢ 0 ∈ Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ))\n[PROOFSTEP]\nsimpa [h0] using hx\n[GOAL]\ncase intro\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis✝ : NeZero n\nh0 : eval 0 (cyclotomic n ℝ) = 1\nhx : eval (-1) (cyclotomic n ℝ) ≤ 0\nthis : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)\ny : ℝ\nhy : IsRoot (cyclotomic n ℝ) y\n⊢ False\n[PROOFSTEP]\nrw [@isRoot_cyclotomic_iff] at hy \n[GOAL]\ncase intro\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis✝ : NeZero n\nh0 : eval 0 (cyclotomic n ℝ) = 1\nhx : eval (-1) (cyclotomic n ℝ) ≤ 0\nthis : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)\ny : ℝ\nhy : IsPrimitiveRoot y n\n⊢ False\n[PROOFSTEP]\nrw [hy.eq_orderOf] at hn \n[GOAL]\ncase intro\nn : ℕ\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nthis✝ : NeZero n\nh0 : eval 0 (cyclotomic n ℝ) = 1\nhx : eval (-1) (cyclotomic n ℝ) ≤ 0\nthis : Set.Icc (eval (-1) (cyclotomic n ℝ)) (eval 0 (cyclotomic n ℝ)) ⊆ Set.range fun x => eval x (cyclotomic n ℝ)\ny : ℝ\nhn : 2 < orderOf y\nhy : IsPrimitiveRoot y n\n⊢ False\n[PROOFSTEP]\nexact hn.not_le LinearOrderedRing.orderOf_le_two\n[GOAL]\nn : ℕ\nhn : 2 < n\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\n⊢ 0 < eval x (cyclotomic n R)\n[PROOFSTEP]\ninduction' n using Nat.strong_induction_on with n ih\n[GOAL]\ncase h\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\n⊢ 0 < eval x (cyclotomic n R)\n[PROOFSTEP]\nhave hn' : 0 < n := pos_of_gt hn\n[GOAL]\ncase h\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\n⊢ 0 < eval x (cyclotomic n R)\n[PROOFSTEP]\nhave hn'' : 1 < n := one_lt_two.trans hn\n[GOAL]\ncase h\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\n⊢ 0 < eval x (cyclotomic n R)\n[PROOFSTEP]\nhave := prod_cyclotomic_eq_geom_sum hn' R\n[GOAL]\ncase h\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis : ∏ i in Finset.erase (divisors n) 1, cyclotomic i R = ∑ i in range n, X ^ i\n⊢ 0 < eval x (cyclotomic n R)\n[PROOFSTEP]\napply_fun eval x at this \n[GOAL]\ncase h\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis : eval x (∏ i in Finset.erase (divisors n) 1, cyclotomic i R) = eval x (∑ i in range n, X ^ i)\n⊢ 0 < eval x (cyclotomic n R)\n[PROOFSTEP]\nrw [← cons_self_properDivisors hn'.ne', Finset.erase_cons_of_ne _ hn''.ne', Finset.prod_cons, eval_mul,\n  eval_geom_sum] at this \n[GOAL]\ncase h\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\n⊢ 0 < eval x (cyclotomic n R)\n[PROOFSTEP]\nrcases lt_trichotomy 0 (∑ i in Finset.range n, x ^ i) with (h | h | h)\n[GOAL]\ncase h.inl\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : 0 < ∑ i in range n, x ^ i\n⊢ 0 < eval x (cyclotomic n R)\n[PROOFSTEP]\napply pos_of_mul_pos_left\n[GOAL]\ncase h.inl.h\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : 0 < ∑ i in range n, x ^ i\n⊢ 0 < eval x (cyclotomic n R) * ?h.inl.b\n[PROOFSTEP]\nrwa [this]\n[GOAL]\ncase h.inl.hb\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : 0 < ∑ i in range n, x ^ i\n⊢ 0 ≤ eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R)\n[PROOFSTEP]\nrw [eval_prod]\n[GOAL]\ncase h.inl.hb\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : 0 < ∑ i in range n, x ^ i\n⊢ 0 ≤ ∏ j in Finset.erase (properDivisors n) 1, eval x (cyclotomic j R)\n[PROOFSTEP]\nrefine' Finset.prod_nonneg fun i hi => _\n[GOAL]\ncase h.inl.hb\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : 0 < ∑ i in range n, x ^ i\ni : ℕ\nhi : i ∈ Finset.erase (properDivisors n) 1\n⊢ 0 ≤ eval x (cyclotomic i R)\n[PROOFSTEP]\nsimp only [Finset.mem_erase, mem_properDivisors] at hi \n[GOAL]\ncase h.inl.hb\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : 0 < ∑ i in range n, x ^ i\ni : ℕ\nhi : i ≠ 1 ∧ i ∣ n ∧ i < n\n⊢ 0 ≤ eval x (cyclotomic i R)\n[PROOFSTEP]\nrw [geom_sum_pos_iff hn'.ne'] at h \n[GOAL]\ncase h.inl.hb\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Odd n ∨ 0 < x + 1\ni : ℕ\nhi : i ≠ 1 ∧ i ∣ n ∧ i < n\n⊢ 0 ≤ eval x (cyclotomic i R)\n[PROOFSTEP]\ncases' h with hk hx\n[GOAL]\ncase h.inl.hb.inl\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\ni : ℕ\nhi : i ≠ 1 ∧ i ∣ n ∧ i < n\nhk : Odd n\n⊢ 0 ≤ eval x (cyclotomic i R)\n[PROOFSTEP]\nrefine' (ih _ hi.2.2 (Nat.two_lt_of_ne _ hi.1 _)).le\n[GOAL]\ncase h.inl.hb.inl.refine'_1\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\ni : ℕ\nhi : i ≠ 1 ∧ i ∣ n ∧ i < n\nhk : Odd n\n⊢ i ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase h.inl.hb.inl.refine'_2\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\ni : ℕ\nhi : i ≠ 1 ∧ i ∣ n ∧ i < n\nhk : Odd n\n⊢ i ≠ 2\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase h.inl.hb.inl.refine'_1\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nhk : Odd n\nhi : 0 ≠ 1 ∧ 0 ∣ n ∧ 0 < n\n⊢ False\n[PROOFSTEP]\nexact hn'.ne' (zero_dvd_iff.mp hi.2.1)\n[GOAL]\ncase h.inl.hb.inl.refine'_2\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nhk : Odd n\nhi : 2 ≠ 1 ∧ 2 ∣ n ∧ 2 < n\n⊢ False\n[PROOFSTEP]\nexact even_iff_not_odd.mp (even_iff_two_dvd.mpr hi.2.1) hk\n[GOAL]\ncase h.inl.hb.inr\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\ni : ℕ\nhi : i ≠ 1 ∧ i ∣ n ∧ i < n\nhx : 0 < x + 1\n⊢ 0 ≤ eval x (cyclotomic i R)\n[PROOFSTEP]\nrcases eq_or_ne i 2 with (rfl | hk)\n[GOAL]\ncase h.inl.hb.inr.inl\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nhx : 0 < x + 1\nhi : 2 ≠ 1 ∧ 2 ∣ n ∧ 2 < n\n⊢ 0 ≤ eval x (cyclotomic 2 R)\n[PROOFSTEP]\nsimpa only [eval_X, eval_one, cyclotomic_two, eval_add] using hx.le\n[GOAL]\ncase h.inl.hb.inr.inr\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\ni : ℕ\nhi : i ≠ 1 ∧ i ∣ n ∧ i < n\nhx : 0 < x + 1\nhk : i ≠ 2\n⊢ 0 ≤ eval x (cyclotomic i R)\n[PROOFSTEP]\nrefine' (ih _ hi.2.2 (Nat.two_lt_of_ne _ hi.1 hk)).le\n[GOAL]\ncase h.inl.hb.inr.inr\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\ni : ℕ\nhi : i ≠ 1 ∧ i ∣ n ∧ i < n\nhx : 0 < x + 1\nhk : i ≠ 2\n⊢ i ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase h.inl.hb.inr.inr\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nhx : 0 < x + 1\nhi : 0 ≠ 1 ∧ 0 ∣ n ∧ 0 < n\nhk : 0 ≠ 2\n⊢ False\n[PROOFSTEP]\nexact hn'.ne' <| zero_dvd_iff.mp hi.2.1\n[GOAL]\ncase h.inr.inl\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : 0 = ∑ i in range n, x ^ i\n⊢ 0 < eval x (cyclotomic n R)\n[PROOFSTEP]\nrw [eq_comm, geom_sum_eq_zero_iff_neg_one hn'.ne'] at h \n[GOAL]\ncase h.inr.inl\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : x = -1 ∧ Even n\n⊢ 0 < eval x (cyclotomic n R)\n[PROOFSTEP]\nexact h.1.symm ▸ cyclotomic_neg_one_pos hn\n[GOAL]\ncase h.inr.inr\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : ∑ i in range n, x ^ i < 0\n⊢ 0 < eval x (cyclotomic n R)\n[PROOFSTEP]\napply pos_of_mul_neg_left\n[GOAL]\ncase h.inr.inr.h\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : ∑ i in range n, x ^ i < 0\n⊢ eval x (cyclotomic n R) * ?h.inr.inr.b < 0\n[PROOFSTEP]\nrwa [this]\n[GOAL]\ncase h.inr.inr.hb\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : ∑ i in range n, x ^ i < 0\n⊢ eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) ≤ 0\n[PROOFSTEP]\nrw [geom_sum_neg_iff hn'.ne'] at h \n[GOAL]\ncase h.inr.inr.hb\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\n⊢ eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) ≤ 0\n[PROOFSTEP]\nhave h2 : 2 ∈ n.properDivisors.erase 1 :=\n  by\n  rw [Finset.mem_erase, mem_properDivisors]\n  exact ⟨by decide, even_iff_two_dvd.mp h.1, hn⟩\n[GOAL]\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\n⊢ 2 ∈ Finset.erase (properDivisors n) 1\n[PROOFSTEP]\nrw [Finset.mem_erase, mem_properDivisors]\n[GOAL]\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\n⊢ 2 ≠ 1 ∧ 2 ∣ n ∧ 2 < n\n[PROOFSTEP]\nexact ⟨by decide, even_iff_two_dvd.mp h.1, hn⟩\n[GOAL]\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\n⊢ 2 ≠ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase h.inr.inr.hb\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\nh2 : 2 ∈ Finset.erase (properDivisors n) 1\n⊢ eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) ≤ 0\n[PROOFSTEP]\nrw [eval_prod, ← Finset.prod_erase_mul _ _ h2]\n[GOAL]\ncase h.inr.inr.hb\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\nh2 : 2 ∈ Finset.erase (properDivisors n) 1\n⊢ (∏ x_1 in Finset.erase (Finset.erase (properDivisors n) 1) 2, eval x (cyclotomic x_1 R)) * eval x (cyclotomic 2 R) ≤ 0\n[PROOFSTEP]\napply mul_nonpos_of_nonneg_of_nonpos\n[GOAL]\ncase h.inr.inr.hb.ha\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\nh2 : 2 ∈ Finset.erase (properDivisors n) 1\n⊢ 0 ≤ ∏ x_1 in Finset.erase (Finset.erase (properDivisors n) 1) 2, eval x (cyclotomic x_1 R)\n[PROOFSTEP]\nrefine' Finset.prod_nonneg fun i hi => le_of_lt _\n[GOAL]\ncase h.inr.inr.hb.ha\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\nh2 : 2 ∈ Finset.erase (properDivisors n) 1\ni : ℕ\nhi : i ∈ Finset.erase (Finset.erase (properDivisors n) 1) 2\n⊢ 0 < eval x (cyclotomic i R)\n[PROOFSTEP]\nsimp only [Finset.mem_erase, mem_properDivisors] at hi \n[GOAL]\ncase h.inr.inr.hb.ha\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\nh2 : 2 ∈ Finset.erase (properDivisors n) 1\ni : ℕ\nhi : i ≠ 2 ∧ i ≠ 1 ∧ i ∣ n ∧ i < n\n⊢ 0 < eval x (cyclotomic i R)\n[PROOFSTEP]\nrefine' ih _ hi.2.2.2 (Nat.two_lt_of_ne _ hi.2.1 hi.1)\n[GOAL]\ncase h.inr.inr.hb.ha\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\nh2 : 2 ∈ Finset.erase (properDivisors n) 1\ni : ℕ\nhi : i ≠ 2 ∧ i ≠ 1 ∧ i ∣ n ∧ i < n\n⊢ i ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase h.inr.inr.hb.ha\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\nh2 : 2 ∈ Finset.erase (properDivisors n) 1\nhi : 0 ≠ 2 ∧ 0 ≠ 1 ∧ 0 ∣ n ∧ 0 < n\n⊢ False\n[PROOFSTEP]\nrw [zero_dvd_iff] at hi \n[GOAL]\ncase h.inr.inr.hb.ha\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\nh2 : 2 ∈ Finset.erase (properDivisors n) 1\nhi : 0 ≠ 2 ∧ 0 ≠ 1 ∧ n = 0 ∧ 0 < n\n⊢ False\n[PROOFSTEP]\nexact hn'.ne' hi.2.2.1\n[GOAL]\ncase h.inr.inr.hb.hb\nn✝ : ℕ\nhn✝ : 2 < n✝\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nih : ∀ (m : ℕ), m < n → 2 < m → 0 < eval x (cyclotomic m R)\nhn : 2 < n\nhn' : 0 < n\nhn'' : 1 < n\nthis :\n  eval x (cyclotomic n R) * eval x (∏ x in Finset.erase (properDivisors n) 1, cyclotomic x R) = ∑ i in range n, x ^ i\nh : Even n ∧ x + 1 < 0\nh2 : 2 ∈ Finset.erase (properDivisors n) 1\n⊢ eval x (cyclotomic 2 R) ≤ 0\n[PROOFSTEP]\nsimpa only [eval_X, eval_one, cyclotomic_two, eval_add] using h.right.le\n[GOAL]\nn : ℕ\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\n⊢ (1 < x → 0 < eval x (cyclotomic n R)) ∧ (1 ≤ x → 0 ≤ eval x (cyclotomic n R))\n[PROOFSTEP]\nrcases n with (_ | _ | _ | n)\n[GOAL]\ncase zero\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\n⊢ (1 < x → 0 < eval x (cyclotomic Nat.zero R)) ∧ (1 ≤ x → 0 ≤ eval x (cyclotomic Nat.zero R))\n[PROOFSTEP]\nsimp [cyclotomic_zero, cyclotomic_one, cyclotomic_two, succ_eq_add_one, eval_X, eval_one, eval_add, eval_sub,\n  sub_nonneg, sub_pos, zero_lt_one, zero_le_one, imp_true_iff, imp_self, and_self_iff]\n[GOAL]\ncase succ.zero\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\n⊢ (1 < x → 0 < eval x (cyclotomic (succ Nat.zero) R)) ∧ (1 ≤ x → 0 ≤ eval x (cyclotomic (succ Nat.zero) R))\n[PROOFSTEP]\nsimp [cyclotomic_zero, cyclotomic_one, cyclotomic_two, succ_eq_add_one, eval_X, eval_one, eval_add, eval_sub,\n  sub_nonneg, sub_pos, zero_lt_one, zero_le_one, imp_true_iff, imp_self, and_self_iff]\n[GOAL]\ncase succ.succ.zero\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\n⊢ (1 < x → 0 < eval x (cyclotomic (succ (succ Nat.zero)) R)) ∧\n    (1 ≤ x → 0 ≤ eval x (cyclotomic (succ (succ Nat.zero)) R))\n[PROOFSTEP]\nsimp [cyclotomic_zero, cyclotomic_one, cyclotomic_two, succ_eq_add_one, eval_X, eval_one, eval_add, eval_sub,\n  sub_nonneg, sub_pos, zero_lt_one, zero_le_one, imp_true_iff, imp_self, and_self_iff]\n[GOAL]\ncase succ.succ.succ\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\n⊢ (1 < x → 0 < eval x (cyclotomic (succ (succ (succ n))) R)) ∧\n    (1 ≤ x → 0 ≤ eval x (cyclotomic (succ (succ (succ n))) R))\n[PROOFSTEP]\nsimp [cyclotomic_zero, cyclotomic_one, cyclotomic_two, succ_eq_add_one, eval_X, eval_one, eval_add, eval_sub,\n  sub_nonneg, sub_pos, zero_lt_one, zero_le_one, imp_true_iff, imp_self, and_self_iff]\n[GOAL]\ncase succ.succ.zero\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\n⊢ (1 < x → 0 < eval x (cyclotomic (1 + 1) R)) ∧ (1 ≤ x → 0 ≤ eval x (cyclotomic (1 + 1) R))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.succ.zero.left\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\n⊢ 1 < x → 0 < eval x (cyclotomic (1 + 1) R)\n[PROOFSTEP]\nintro\n[GOAL]\ncase succ.succ.zero.right\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\n⊢ 1 ≤ x → 0 ≤ eval x (cyclotomic (1 + 1) R)\n[PROOFSTEP]\nintro\n[GOAL]\ncase succ.succ.zero.left\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\na✝ : 1 < x\n⊢ 0 < eval x (cyclotomic (1 + 1) R)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase succ.succ.zero.right\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\na✝ : 1 ≤ x\n⊢ 0 ≤ eval x (cyclotomic (1 + 1) R)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase succ.succ.zero.left\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\na✝ : 1 < x\n⊢ 0 < x + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase succ.succ.zero.right\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\na✝ : 1 ≤ x\n⊢ 0 ≤ x + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase succ.succ.succ\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\n⊢ (1 < x → 0 < eval x (cyclotomic (n + 2 + 1) R)) ∧ (1 ≤ x → 0 ≤ eval x (cyclotomic (n + 2 + 1) R))\n[PROOFSTEP]\nhave : 2 < n + 3 := by linarith\n[GOAL]\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\n⊢ 2 < n + 3\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase succ.succ.succ\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nthis : 2 < n + 3\n⊢ (1 < x → 0 < eval x (cyclotomic (n + 2 + 1) R)) ∧ (1 ≤ x → 0 ≤ eval x (cyclotomic (n + 2 + 1) R))\n[PROOFSTEP]\nconstructor <;> intro <;> [skip; apply le_of_lt]\n[GOAL]\ncase succ.succ.succ\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nthis : 2 < n + 3\n⊢ (1 < x → 0 < eval x (cyclotomic (n + 2 + 1) R)) ∧ (1 ≤ x → 0 ≤ eval x (cyclotomic (n + 2 + 1) R))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.succ.succ.left\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nthis : 2 < n + 3\n⊢ 1 < x → 0 < eval x (cyclotomic (n + 2 + 1) R)\n[PROOFSTEP]\nintro\n[GOAL]\ncase succ.succ.succ.right\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nthis : 2 < n + 3\n⊢ 1 ≤ x → 0 ≤ eval x (cyclotomic (n + 2 + 1) R)\n[PROOFSTEP]\nintro\n[GOAL]\ncase succ.succ.succ.left\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nthis : 2 < n + 3\na✝ : 1 < x\n⊢ 0 < eval x (cyclotomic (n + 2 + 1) R)\n[PROOFSTEP]\nskip\n[GOAL]\ncase succ.succ.succ.right\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nthis : 2 < n + 3\na✝ : 1 ≤ x\n⊢ 0 ≤ eval x (cyclotomic (n + 2 + 1) R)\n[PROOFSTEP]\napply le_of_lt\n[GOAL]\ncase succ.succ.succ.left\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nthis : 2 < n + 3\na✝ : 1 < x\n⊢ 0 < eval x (cyclotomic (n + 2 + 1) R)\n[PROOFSTEP]\napply cyclotomic_pos this\n[GOAL]\ncase succ.succ.succ.right.a\nR : Type u_1\ninst✝ : LinearOrderedCommRing R\nx : R\nn : ℕ\nthis : 2 < n + 3\na✝ : 1 ≤ x\n⊢ 0 < eval x (cyclotomic (n + 2 + 1) R)\n[PROOFSTEP]\napply cyclotomic_pos this\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\n⊢ eval 1 (cyclotomic n R) = 1\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hn')\n[GOAL]\ncase inl\nR : Type u_1\ninst✝ : Ring R\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ 0\n⊢ eval 1 (cyclotomic 0 R) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\n⊢ eval 1 (cyclotomic n R) = 1\n[PROOFSTEP]\nhave hn : 1 < n := one_lt_iff_ne_zero_and_ne_one.mpr ⟨hn'.ne', (h Nat.prime_two 0).symm⟩\n[GOAL]\ncase inr\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\n⊢ eval 1 (cyclotomic n R) = 1\n[PROOFSTEP]\nrsuffices h | h : eval 1 (cyclotomic n ℤ) = 1 ∨ eval 1 (cyclotomic n ℤ) = -1\n[GOAL]\ncase inr.inl\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh✝ : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\nh : eval 1 (cyclotomic n ℤ) = 1\n⊢ eval 1 (cyclotomic n R) = 1\n[PROOFSTEP]\nhave := eval_int_cast_map (Int.castRingHom R) (cyclotomic n ℤ) 1\n[GOAL]\ncase inr.inl\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh✝ : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\nh : eval 1 (cyclotomic n ℤ) = 1\nthis : eval (↑1) (map (Int.castRingHom R) (cyclotomic n ℤ)) = ↑(Int.castRingHom R) (eval (↑1) (cyclotomic n ℤ))\n⊢ eval 1 (cyclotomic n R) = 1\n[PROOFSTEP]\nsimpa only [map_cyclotomic, Int.cast_one, h, eq_intCast] using this\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh✝ : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\nh : eval 1 (cyclotomic n ℤ) = -1\n⊢ eval 1 (cyclotomic n R) = 1\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase inr.inr.h\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh✝ : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\nh : eval 1 (cyclotomic n ℤ) = -1\n⊢ False\n[PROOFSTEP]\nlinarith [cyclotomic_nonneg n (le_refl (1 : ℤ))]\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\n⊢ eval 1 (cyclotomic n ℤ) = 1 ∨ eval 1 (cyclotomic n ℤ) = -1\n[PROOFSTEP]\nrw [← Int.natAbs_eq_natAbs_iff, Int.natAbs_one, Nat.eq_one_iff_not_exists_prime_dvd]\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\n⊢ ∀ (p : ℕ), Nat.Prime p → ¬p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\n[PROOFSTEP]\nintro p hp hpe\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\n⊢ False\n[PROOFSTEP]\nhaveI := Fact.mk hp\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis : Fact (Nat.Prime p)\n⊢ False\n[PROOFSTEP]\nhave := prod_cyclotomic_eq_geom_sum hn' ℤ\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis : ∏ i in Finset.erase (divisors n) 1, cyclotomic i ℤ = ∑ i in range n, X ^ i\n⊢ False\n[PROOFSTEP]\napply_fun eval 1 at this \n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis : eval 1 (∏ i in Finset.erase (divisors n) 1, cyclotomic i ℤ) = eval 1 (∑ i in range n, X ^ i)\n⊢ False\n[PROOFSTEP]\nrw [eval_geom_sum, one_geom_sum, eval_prod, eq_comm, ←\n  Finset.prod_sdiff <| @range_pow_padicValNat_subset_divisors' p _ _, Finset.prod_image] at this \n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in range (padicValNat p n), eval 1 (cyclotomic (p ^ (x + 1)) ℤ)\n⊢ False\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in image (fun t => p ^ (t + 1)) (range (padicValNat p n)), eval 1 (cyclotomic x ℤ)\n⊢ ∀ (x : ℕ), x ∈ range (padicValNat p n) → ∀ (y : ℕ), y ∈ range (padicValNat p n) → p ^ (x + 1) = p ^ (y + 1) → x = y\n[PROOFSTEP]\nsimp_rw [eval_one_cyclotomic_prime_pow, Finset.prod_const, Finset.card_range, mul_comm] at this \n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    ↑p ^ padicValNat p n *\n      ∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)\n⊢ False\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in image (fun t => p ^ (t + 1)) (range (padicValNat p n)), eval 1 (cyclotomic x ℤ)\n⊢ ∀ (x : ℕ), x ∈ range (padicValNat p n) → ∀ (y : ℕ), y ∈ range (padicValNat p n) → p ^ (x + 1) = p ^ (y + 1) → x = y\n[PROOFSTEP]\nrw [← Finset.prod_sdiff <| show { n } ⊆ _ from _] at this \n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    ↑p ^ padicValNat p n *\n      ((∏ x in (Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n))) \\ {n},\n          eval 1 (cyclotomic x ℤ)) *\n        ∏ x in {n}, eval 1 (cyclotomic x ℤ))\n⊢ False\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    ↑p ^ padicValNat p n *\n      ∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)\n⊢ {n} ⊆ Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n))\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in image (fun t => p ^ (t + 1)) (range (padicValNat p n)), eval 1 (cyclotomic x ℤ)\n⊢ ∀ (x : ℕ), x ∈ range (padicValNat p n) → ∀ (y : ℕ), y ∈ range (padicValNat p n) → p ^ (x + 1) = p ^ (y + 1) → x = y\n[PROOFSTEP]\nswap\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    ↑p ^ padicValNat p n *\n      ∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)\n⊢ {n} ⊆ Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n))\n[PROOFSTEP]\nsimp only [singleton_subset_iff, mem_sdiff, mem_erase, Ne.def, mem_divisors, dvd_refl, true_and_iff, mem_image,\n  mem_range, exists_prop, not_exists, not_and]\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    ↑p ^ padicValNat p n *\n      ∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)\n⊢ (¬n = 1 ∧ ¬n = 0) ∧ ∀ (x : ℕ), x < padicValNat p n → ¬p ^ (x + 1) = n\n[PROOFSTEP]\nexact ⟨⟨hn.ne', hn'.ne'⟩, fun t _ => h hp _⟩\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    ↑p ^ padicValNat p n *\n      ((∏ x in (Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n))) \\ {n},\n          eval 1 (cyclotomic x ℤ)) *\n        ∏ x in {n}, eval 1 (cyclotomic x ℤ))\n⊢ False\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in image (fun t => p ^ (t + 1)) (range (padicValNat p n)), eval 1 (cyclotomic x ℤ)\n⊢ ∀ (x : ℕ), x ∈ range (padicValNat p n) → ∀ (y : ℕ), y ∈ range (padicValNat p n) → p ^ (x + 1) = p ^ (y + 1) → x = y\n[PROOFSTEP]\nrw [← Int.natAbs_ofNat p, Int.natAbs_dvd_natAbs] at hpe \n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : ↑p ∣ eval 1 (cyclotomic n ℤ)\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    ↑p ^ padicValNat p n *\n      ((∏ x in (Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n))) \\ {n},\n          eval 1 (cyclotomic x ℤ)) *\n        ∏ x in {n}, eval 1 (cyclotomic x ℤ))\n⊢ False\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in image (fun t => p ^ (t + 1)) (range (padicValNat p n)), eval 1 (cyclotomic x ℤ)\n⊢ ∀ (x : ℕ), x ∈ range (padicValNat p n) → ∀ (y : ℕ), y ∈ range (padicValNat p n) → p ^ (x + 1) = p ^ (y + 1) → x = y\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := hpe\n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    ↑p ^ padicValNat p n *\n      ((∏ x in (Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n))) \\ {n},\n          eval 1 (cyclotomic x ℤ)) *\n        ∏ x in {n}, eval 1 (cyclotomic x ℤ))\nt : ℤ\nht : eval 1 (cyclotomic n ℤ) = ↑p * t\n⊢ False\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in image (fun t => p ^ (t + 1)) (range (padicValNat p n)), eval 1 (cyclotomic x ℤ)\n⊢ ∀ (x : ℕ), x ∈ range (padicValNat p n) → ∀ (y : ℕ), y ∈ range (padicValNat p n) → p ^ (x + 1) = p ^ (y + 1) → x = y\n[PROOFSTEP]\nrw [Finset.prod_singleton, ht, mul_left_comm, mul_comm, ← mul_assoc, mul_assoc] at this \n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nthis✝ : Fact (Nat.Prime p)\nt : ℤ\nthis :\n  ↑n =\n    ↑p ^ padicValNat p n * ↑p *\n      (t *\n        ∏ x in (Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n))) \\ {n},\n          eval 1 (cyclotomic x ℤ))\nht : eval 1 (cyclotomic n ℤ) = ↑p * t\n⊢ False\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in image (fun t => p ^ (t + 1)) (range (padicValNat p n)), eval 1 (cyclotomic x ℤ)\n⊢ ∀ (x : ℕ), x ∈ range (padicValNat p n) → ∀ (y : ℕ), y ∈ range (padicValNat p n) → p ^ (x + 1) = p ^ (y + 1) → x = y\n[PROOFSTEP]\nhave : (p : ℤ) ^ padicValNat p n * p ∣ n := ⟨_, this⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nthis✝¹ : Fact (Nat.Prime p)\nt : ℤ\nthis✝ :\n  ↑n =\n    ↑p ^ padicValNat p n * ↑p *\n      (t *\n        ∏ x in (Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n))) \\ {n},\n          eval 1 (cyclotomic x ℤ))\nht : eval 1 (cyclotomic n ℤ) = ↑p * t\nthis : ↑p ^ padicValNat p n * ↑p ∣ ↑n\n⊢ False\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in image (fun t => p ^ (t + 1)) (range (padicValNat p n)), eval 1 (cyclotomic x ℤ)\n⊢ ∀ (x : ℕ), x ∈ range (padicValNat p n) → ∀ (y : ℕ), y ∈ range (padicValNat p n) → p ^ (x + 1) = p ^ (y + 1) → x = y\n[PROOFSTEP]\nsimp only [← _root_.pow_succ', ← Int.natAbs_dvd_natAbs, Int.natAbs_ofNat, Int.natAbs_pow] at this \n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nthis✝¹ : Fact (Nat.Prime p)\nt : ℤ\nthis✝ :\n  ↑n =\n    ↑p ^ padicValNat p n * ↑p *\n      (t *\n        ∏ x in (Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n))) \\ {n},\n          eval 1 (cyclotomic x ℤ))\nht : eval 1 (cyclotomic n ℤ) = ↑p * t\nthis : p ^ (padicValNat p n + 1) ∣ n\n⊢ False\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in image (fun t => p ^ (t + 1)) (range (padicValNat p n)), eval 1 (cyclotomic x ℤ)\n⊢ ∀ (x : ℕ), x ∈ range (padicValNat p n) → ∀ (y : ℕ), y ∈ range (padicValNat p n) → p ^ (x + 1) = p ^ (y + 1) → x = y\n[PROOFSTEP]\nexact pow_succ_padicValNat_not_dvd hn'.ne' this\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in image (fun t => p ^ (t + 1)) (range (padicValNat p n)), eval 1 (cyclotomic x ℤ)\n⊢ ∀ (x : ℕ), x ∈ range (padicValNat p n) → ∀ (y : ℕ), y ∈ range (padicValNat p n) → p ^ (x + 1) = p ^ (y + 1) → x = y\n[PROOFSTEP]\nrintro x - y - hxy\n[GOAL]\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in image (fun t => p ^ (t + 1)) (range (padicValNat p n)), eval 1 (cyclotomic x ℤ)\nx y : ℕ\nhxy : p ^ (x + 1) = p ^ (y + 1)\n⊢ x = y\n[PROOFSTEP]\napply Nat.succ_injective\n[GOAL]\ncase a\nR : Type u_1\ninst✝ : Ring R\nn : ℕ\nh : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n\nhn' : n > 0\nhn : 1 < n\np : ℕ\nhp : Nat.Prime p\nhpe : p ∣ Int.natAbs (eval 1 (cyclotomic n ℤ))\nthis✝ : Fact (Nat.Prime p)\nthis :\n  ↑n =\n    (∏ x in Finset.erase (divisors n) 1 \\ image (fun t => p ^ (t + 1)) (range (padicValNat p n)),\n        eval 1 (cyclotomic x ℤ)) *\n      ∏ x in image (fun t => p ^ (t + 1)) (range (padicValNat p n)), eval 1 (cyclotomic x ℤ)\nx y : ℕ\nhxy : p ^ (x + 1) = p ^ (y + 1)\n⊢ succ x = succ y\n[PROOFSTEP]\nexact Nat.pow_right_injective hp.two_le hxy\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\n⊢ (q - 1) ^ φ n < eval q (cyclotomic n ℝ)\n[PROOFSTEP]\nhave hn : 0 < n := pos_of_gt hn'\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\n⊢ (q - 1) ^ φ n < eval q (cyclotomic n ℝ)\n[PROOFSTEP]\nhave hq := zero_lt_one.trans hq'\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\n⊢ (q - 1) ^ φ n < eval q (cyclotomic n ℝ)\n[PROOFSTEP]\nhave hfor : ∀ ζ' ∈ primitiveRoots n ℂ, q - 1 ≤ ‖↑q - ζ'‖ :=\n  by\n  intro ζ' hζ'\n  rw [mem_primitiveRoots hn] at hζ' \n  convert norm_sub_norm_le (↑q) ζ'\n  · rw [Complex.norm_real, Real.norm_of_nonneg hq.le]\n  · rw [hζ'.norm'_eq_one hn.ne']\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\n⊢ ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\n[PROOFSTEP]\nintro ζ' hζ'\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nζ' : ℂ\nhζ' : ζ' ∈ primitiveRoots n ℂ\n⊢ q - 1 ≤ ‖↑q - ζ'‖\n[PROOFSTEP]\nrw [mem_primitiveRoots hn] at hζ' \n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nζ' : ℂ\nhζ' : IsPrimitiveRoot ζ' n\n⊢ q - 1 ≤ ‖↑q - ζ'‖\n[PROOFSTEP]\nconvert norm_sub_norm_le (↑q) ζ'\n[GOAL]\ncase h.e'_3.h.e'_5\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nζ' : ℂ\nhζ' : IsPrimitiveRoot ζ' n\n⊢ q = ‖↑q‖\n[PROOFSTEP]\nrw [Complex.norm_real, Real.norm_of_nonneg hq.le]\n[GOAL]\ncase h.e'_3.h.e'_6\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nζ' : ℂ\nhζ' : IsPrimitiveRoot ζ' n\n⊢ 1 = ‖ζ'‖\n[PROOFSTEP]\nrw [hζ'.norm'_eq_one hn.ne']\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\n⊢ (q - 1) ^ φ n < eval q (cyclotomic n ℝ)\n[PROOFSTEP]\nlet ζ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\n⊢ (q - 1) ^ φ n < eval q (cyclotomic n ℝ)\n[PROOFSTEP]\nhave hζ : IsPrimitiveRoot ζ n := Complex.isPrimitiveRoot_exp n hn.ne'\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ (q - 1) ^ φ n < eval q (cyclotomic n ℝ)\n[PROOFSTEP]\nhave hex : ∃ ζ' ∈ primitiveRoots n ℂ, q - 1 < ‖↑q - ζ'‖ :=\n  by\n  refine' ⟨ζ, (mem_primitiveRoots hn).mpr hζ, _⟩\n  suffices ¬SameRay ℝ (q : ℂ) ζ by\n    convert lt_norm_sub_of_not_sameRay this <;>\n      simp only [hζ.norm'_eq_one hn.ne', Real.norm_of_nonneg hq.le, Complex.norm_real]\n  rw [Complex.sameRay_iff]\n  push_neg\n  refine' ⟨by exact_mod_cast hq.ne', hζ.ne_zero hn.ne', _⟩\n  rw [Complex.arg_ofReal_of_nonneg hq.le, Ne.def, eq_comm, hζ.arg_eq_zero_iff hn.ne']\n  clear_value ζ\n  rintro rfl\n  linarith [hζ.unique IsPrimitiveRoot.one]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\n[PROOFSTEP]\nrefine' ⟨ζ, (mem_primitiveRoots hn).mpr hζ, _⟩\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ q - 1 < ‖↑q - ζ‖\n[PROOFSTEP]\nsuffices ¬SameRay ℝ (q : ℂ) ζ by\n  convert lt_norm_sub_of_not_sameRay this <;>\n    simp only [hζ.norm'_eq_one hn.ne', Real.norm_of_nonneg hq.le, Complex.norm_real]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nthis : ¬SameRay ℝ (↑q) ζ\n⊢ q - 1 < ‖↑q - ζ‖\n[PROOFSTEP]\nconvert lt_norm_sub_of_not_sameRay this\n[GOAL]\ncase h.e'_3.h.e'_5\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nthis : ¬SameRay ℝ (↑q) ζ\n⊢ q = ‖↑q‖\n[PROOFSTEP]\nsimp only [hζ.norm'_eq_one hn.ne', Real.norm_of_nonneg hq.le, Complex.norm_real]\n[GOAL]\ncase h.e'_3.h.e'_6\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nthis : ¬SameRay ℝ (↑q) ζ\n⊢ 1 = ‖ζ‖\n[PROOFSTEP]\nsimp only [hζ.norm'_eq_one hn.ne', Real.norm_of_nonneg hq.le, Complex.norm_real]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ¬SameRay ℝ (↑q) ζ\n[PROOFSTEP]\nrw [Complex.sameRay_iff]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ¬(↑q = 0 ∨ ζ = 0 ∨ Complex.arg ↑q = Complex.arg ζ)\n[PROOFSTEP]\npush_neg\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ↑q ≠ 0 ∧\n    Complex.exp (2 * ↑Real.pi * Complex.I / ↑n) ≠ 0 ∧\n      Complex.arg ↑q ≠ Complex.arg (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n))\n[PROOFSTEP]\nrefine' ⟨by exact_mod_cast hq.ne', hζ.ne_zero hn.ne', _⟩\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ↑q ≠ 0\n[PROOFSTEP]\nexact_mod_cast hq.ne'\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ Complex.arg ↑q ≠ Complex.arg (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n))\n[PROOFSTEP]\nrw [Complex.arg_ofReal_of_nonneg hq.le, Ne.def, eq_comm, hζ.arg_eq_zero_iff hn.ne']\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ¬ζ = 1\n[PROOFSTEP]\nclear_value ζ\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ\nhζ : IsPrimitiveRoot ζ n\n⊢ ¬ζ = 1\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nhζ : IsPrimitiveRoot 1 n\n⊢ False\n[PROOFSTEP]\nlinarith [hζ.unique IsPrimitiveRoot.one]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\n⊢ (q - 1) ^ φ n < eval q (cyclotomic n ℝ)\n[PROOFSTEP]\nhave : ¬eval (↑q) (cyclotomic n ℂ) = 0 :=\n  by\n  erw [cyclotomic.eval_apply q n (algebraMap ℝ ℂ)]\n  simpa only [Complex.coe_algebraMap, Complex.ofReal_eq_zero] using (cyclotomic_pos' n hq').ne'\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\n⊢ ¬eval (↑q) (cyclotomic n ℂ) = 0\n[PROOFSTEP]\nerw [cyclotomic.eval_apply q n (algebraMap ℝ ℂ)]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\n⊢ ¬↑(algebraMap ℝ ℂ) (eval q (cyclotomic n ℝ)) = 0\n[PROOFSTEP]\nsimpa only [Complex.coe_algebraMap, Complex.ofReal_eq_zero] using (cyclotomic_pos' n hq').ne'\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ (q - 1) ^ φ n < eval q (cyclotomic n ℝ)\n[PROOFSTEP]\nsuffices\n  Units.mk0 (Real.toNNReal (q - 1)) (by simp [hq']) ^ totient n < Units.mk0 ‖(cyclotomic n ℂ).eval ↑q‖₊ (by simp [this])\n  by\n  simp only [← Units.val_lt_val, Units.val_pow_eq_pow_val, Units.val_mk0, ← NNReal.coe_lt_coe, hq'.le,\n    Real.toNNReal_lt_toNNReal_iff_of_nonneg, coe_nnnorm, Complex.norm_eq_abs, NNReal.coe_pow, Real.coe_toNNReal',\n    max_eq_left, sub_nonneg] at this \n  convert this\n  erw [cyclotomic.eval_apply q n (algebraMap ℝ ℂ), eq_comm]\n  simp only [cyclotomic_nonneg n hq'.le, Complex.coe_algebraMap, Complex.abs_ofReal, abs_eq_self]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ Real.toNNReal (q - 1) ≠ 0\n[PROOFSTEP]\nsimp [hq']\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ‖eval (↑q) (cyclotomic n ℂ)‖₊ ≠ 0\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis✝ : ¬eval (↑q) (cyclotomic n ℂ) = 0\nthis :\n  Units.mk0 (Real.toNNReal (q - 1)) (_ : ¬Real.toNNReal (q - 1) = 0) ^ φ n <\n    Units.mk0 ‖eval (↑q) (cyclotomic n ℂ)‖₊ (_ : ¬‖eval (↑q) (cyclotomic n ℂ)‖₊ = 0)\n⊢ (q - 1) ^ φ n < eval q (cyclotomic n ℝ)\n[PROOFSTEP]\nsimp only [← Units.val_lt_val, Units.val_pow_eq_pow_val, Units.val_mk0, ← NNReal.coe_lt_coe, hq'.le,\n  Real.toNNReal_lt_toNNReal_iff_of_nonneg, coe_nnnorm, Complex.norm_eq_abs, NNReal.coe_pow, Real.coe_toNNReal',\n  max_eq_left, sub_nonneg] at this \n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis✝ : ¬eval (↑q) (cyclotomic n ℂ) = 0\nthis : (q - 1) ^ φ n < ↑Complex.abs (eval (↑q) (cyclotomic n ℂ))\n⊢ (q - 1) ^ φ n < eval q (cyclotomic n ℝ)\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_4\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis✝ : ¬eval (↑q) (cyclotomic n ℂ) = 0\nthis : (q - 1) ^ φ n < ↑Complex.abs (eval (↑q) (cyclotomic n ℂ))\n⊢ eval q (cyclotomic n ℝ) = ↑Complex.abs (eval (↑q) (cyclotomic n ℂ))\n[PROOFSTEP]\nerw [cyclotomic.eval_apply q n (algebraMap ℝ ℂ), eq_comm]\n[GOAL]\ncase h.e'_4\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis✝ : ¬eval (↑q) (cyclotomic n ℂ) = 0\nthis : (q - 1) ^ φ n < ↑Complex.abs (eval (↑q) (cyclotomic n ℂ))\n⊢ ↑Complex.abs (↑(algebraMap ℝ ℂ) (eval q (cyclotomic n ℝ))) = eval q (cyclotomic n ℝ)\n[PROOFSTEP]\nsimp only [cyclotomic_nonneg n hq'.le, Complex.coe_algebraMap, Complex.abs_ofReal, abs_eq_self]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ Units.mk0 (Real.toNNReal (q - 1)) (_ : ¬Real.toNNReal (q - 1) = 0) ^ φ n <\n    Units.mk0 ‖eval (↑q) (cyclotomic n ℂ)‖₊ (_ : ¬‖eval (↑q) (cyclotomic n ℂ)‖₊ = 0)\n[PROOFSTEP]\nsimp only [cyclotomic_eq_prod_X_sub_primitiveRoots hζ, eval_prod, eval_C, eval_X, eval_sub, nnnorm_prod, Units.mk0_prod]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ Units.mk0 (Real.toNNReal (q - 1)) (_ : ¬Real.toNNReal (q - 1) = 0) ^ φ n <\n    ∏ b in attach (primitiveRoots n ℂ), Units.mk0 ‖↑q - ↑b‖₊ (_ : ‖↑q - ↑b‖₊ = 0 → False)\n[PROOFSTEP]\nconvert Finset.prod_lt_prod' (M := NNRealˣ) _ _\n[GOAL]\ncase h.e'_3\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ Units.mk0 (Real.toNNReal (q - 1)) (_ : ¬Real.toNNReal (q - 1) = 0) ^ φ n =\n    ∏ i in attach (primitiveRoots n ℂ), ?convert_2 i\ncase convert_2\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ { x // x ∈ primitiveRoots n ℂ } → NNRealˣ\ncase convert_5\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∀ (i : { x // x ∈ primitiveRoots n ℂ }),\n    i ∈ attach (primitiveRoots n ℂ) → ?convert_2 i ≤ Units.mk0 ‖↑q - ↑i‖₊ (_ : ‖↑q - ↑i‖₊ = 0 → False)\ncase convert_6\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∃ i, i ∈ attach (primitiveRoots n ℂ) ∧ ?convert_2 i < Units.mk0 ‖↑q - ↑i‖₊ (_ : ‖↑q - ↑i‖₊ = 0 → False)\n[PROOFSTEP]\nswap\n[GOAL]\ncase convert_2\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ { x // x ∈ primitiveRoots n ℂ } → NNRealˣ\n[PROOFSTEP]\nexact fun _ => Units.mk0 (Real.toNNReal (q - 1)) (by simp [hq'])\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\nx✝ : { x // x ∈ primitiveRoots n ℂ }\n⊢ Real.toNNReal (q - 1) ≠ 0\n[PROOFSTEP]\nsimp [hq']\n[GOAL]\ncase h.e'_3\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ Units.mk0 (Real.toNNReal (q - 1)) (_ : ¬Real.toNNReal (q - 1) = 0) ^ φ n =\n    ∏ i in attach (primitiveRoots n ℂ), Units.mk0 (Real.toNNReal (q - 1)) (_ : ¬Real.toNNReal (q - 1) = 0)\n[PROOFSTEP]\nsimp only [Complex.card_primitiveRoots, prod_const, card_attach]\n[GOAL]\ncase convert_5\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∀ (i : { x // x ∈ primitiveRoots n ℂ }),\n    i ∈ attach (primitiveRoots n ℂ) →\n      Units.mk0 (Real.toNNReal (q - 1)) (_ : ¬Real.toNNReal (q - 1) = 0) ≤\n        Units.mk0 ‖↑q - ↑i‖₊ (_ : ‖↑q - ↑i‖₊ = 0 → False)\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, Finset.mem_attach, forall_true_left, Subtype.forall, ← Units.val_le_val, ← NNReal.coe_le_coe,\n  Complex.abs.nonneg, hq'.le, Units.val_mk0, Real.coe_toNNReal', coe_nnnorm, Complex.norm_eq_abs, max_le_iff,\n  tsub_le_iff_right]\n[GOAL]\ncase convert_5\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∀ (a : ℂ), a ∈ primitiveRoots n ℂ → q ≤ ↑Complex.abs (↑q - a) + 1 ∧ True\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase convert_5\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\nx : ℂ\nhx : x ∈ primitiveRoots n ℂ\n⊢ q ≤ ↑Complex.abs (↑q - x) + 1 ∧ True\n[PROOFSTEP]\nsimpa only [and_true_iff, tsub_le_iff_right] using hfor x hx\n[GOAL]\ncase convert_6\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∃ i,\n    i ∈ attach (primitiveRoots n ℂ) ∧\n      Units.mk0 (Real.toNNReal (q - 1)) (_ : ¬Real.toNNReal (q - 1) = 0) <\n        Units.mk0 ‖↑q - ↑i‖₊ (_ : ‖↑q - ↑i‖₊ = 0 → False)\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, Finset.mem_attach, exists_true_left, Subtype.exists, ← NNReal.coe_lt_coe, ← Units.val_lt_val,\n  Units.val_mk0 _, coe_nnnorm]\n[GOAL]\ncase convert_6\nn : ℕ\nq : ℝ\nhn' : 2 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → q - 1 ≤ ‖↑q - ζ'‖\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ q - 1 < ‖↑q - ζ'‖\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∃ a h, True ∧ ↑(Real.toNNReal (q - 1)) < ‖↑q - a‖\n[PROOFSTEP]\nsimpa [hq'.le, Real.coe_toNNReal', max_eq_left, sub_nonneg] using hex\n[GOAL]\nq : ℝ\nhq' : 1 < q\n⊢ (q - 1) ^ φ 0 ≤ eval q (cyclotomic 0 ℝ)\n[PROOFSTEP]\nsimp only [totient_zero, _root_.pow_zero, cyclotomic_zero, eval_one, le_refl]\n[GOAL]\nq : ℝ\nhq' : 1 < q\n⊢ (q - 1) ^ φ 1 ≤ eval q (cyclotomic 1 ℝ)\n[PROOFSTEP]\nsimp only [totient_one, pow_one, cyclotomic_one, eval_sub, eval_X, eval_one, le_refl]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\n⊢ eval q (cyclotomic n ℝ) < (q + 1) ^ φ n\n[PROOFSTEP]\nhave hn : 0 < n := pos_of_gt hn'\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\n⊢ eval q (cyclotomic n ℝ) < (q + 1) ^ φ n\n[PROOFSTEP]\nhave hq := zero_lt_one.trans hq'\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\n⊢ eval q (cyclotomic n ℝ) < (q + 1) ^ φ n\n[PROOFSTEP]\nhave hfor : ∀ ζ' ∈ primitiveRoots n ℂ, ‖↑q - ζ'‖ ≤ q + 1 :=\n  by\n  intro ζ' hζ'\n  rw [mem_primitiveRoots hn] at hζ' \n  convert norm_sub_le (↑q) ζ'\n  · rw [Complex.norm_real, Real.norm_of_nonneg (zero_le_one.trans_lt hq').le]\n  · rw [hζ'.norm'_eq_one hn.ne']\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\n⊢ ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\n[PROOFSTEP]\nintro ζ' hζ'\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nζ' : ℂ\nhζ' : ζ' ∈ primitiveRoots n ℂ\n⊢ ‖↑q - ζ'‖ ≤ q + 1\n[PROOFSTEP]\nrw [mem_primitiveRoots hn] at hζ' \n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nζ' : ℂ\nhζ' : IsPrimitiveRoot ζ' n\n⊢ ‖↑q - ζ'‖ ≤ q + 1\n[PROOFSTEP]\nconvert norm_sub_le (↑q) ζ'\n[GOAL]\ncase h.e'_4.h.e'_5\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nζ' : ℂ\nhζ' : IsPrimitiveRoot ζ' n\n⊢ q = ‖↑q‖\n[PROOFSTEP]\nrw [Complex.norm_real, Real.norm_of_nonneg (zero_le_one.trans_lt hq').le]\n[GOAL]\ncase h.e'_4.h.e'_6\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nζ' : ℂ\nhζ' : IsPrimitiveRoot ζ' n\n⊢ 1 = ‖ζ'‖\n[PROOFSTEP]\nrw [hζ'.norm'_eq_one hn.ne']\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\n⊢ eval q (cyclotomic n ℝ) < (q + 1) ^ φ n\n[PROOFSTEP]\nlet ζ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\n⊢ eval q (cyclotomic n ℝ) < (q + 1) ^ φ n\n[PROOFSTEP]\nhave hζ : IsPrimitiveRoot ζ n := Complex.isPrimitiveRoot_exp n hn.ne'\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ eval q (cyclotomic n ℝ) < (q + 1) ^ φ n\n[PROOFSTEP]\nhave hex : ∃ ζ' ∈ primitiveRoots n ℂ, ‖↑q - ζ'‖ < q + 1 :=\n  by\n  refine' ⟨ζ, (mem_primitiveRoots hn).mpr hζ, _⟩\n  suffices ¬SameRay ℝ (q : ℂ) (-ζ) by\n    convert norm_add_lt_of_not_sameRay this using 2\n    · rw [Complex.norm_eq_abs, Complex.abs_ofReal]\n      symm\n      exact abs_eq_self.mpr hq.le\n    · simp [abs_of_pos hq, hζ.norm'_eq_one hn.ne', -Complex.norm_eq_abs]\n  rw [Complex.sameRay_iff]\n  push_neg\n  refine' ⟨by exact_mod_cast hq.ne', neg_ne_zero.mpr <| hζ.ne_zero hn.ne', _⟩\n  rw [Complex.arg_ofReal_of_nonneg hq.le, Ne.def, eq_comm]\n  intro h\n  rw [Complex.arg_eq_zero_iff, Complex.neg_re, neg_nonneg, Complex.neg_im, neg_eq_zero] at h \n  have hζ₀ : ζ ≠ 0 := by\n    clear_value ζ\n    rintro rfl\n    exact hn.ne' (hζ.unique IsPrimitiveRoot.zero)\n  have : ζ.re < 0 ∧ ζ.im = 0 := ⟨h.1.lt_of_ne ?_, h.2⟩\n  rw [← Complex.arg_eq_pi_iff, hζ.arg_eq_pi_iff hn.ne'] at this \n  rw [this] at hζ \n  linarith [hζ.unique <| IsPrimitiveRoot.neg_one 0 two_ne_zero.symm]\n  · contrapose! hζ₀\n    ext <;> simp [hζ₀, h.2]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\n[PROOFSTEP]\nrefine' ⟨ζ, (mem_primitiveRoots hn).mpr hζ, _⟩\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ‖↑q - ζ‖ < q + 1\n[PROOFSTEP]\nsuffices ¬SameRay ℝ (q : ℂ) (-ζ) by\n  convert norm_add_lt_of_not_sameRay this using 2\n  · rw [Complex.norm_eq_abs, Complex.abs_ofReal]\n    symm\n    exact abs_eq_self.mpr hq.le\n  · simp [abs_of_pos hq, hζ.norm'_eq_one hn.ne', -Complex.norm_eq_abs]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nthis : ¬SameRay ℝ (↑q) (-ζ)\n⊢ ‖↑q - ζ‖ < q + 1\n[PROOFSTEP]\nconvert norm_add_lt_of_not_sameRay this using 2\n[GOAL]\ncase h.e'_4.h.e'_5\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nthis : ¬SameRay ℝ (↑q) (-ζ)\n⊢ q = ‖↑q‖\n[PROOFSTEP]\nrw [Complex.norm_eq_abs, Complex.abs_ofReal]\n[GOAL]\ncase h.e'_4.h.e'_5\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nthis : ¬SameRay ℝ (↑q) (-ζ)\n⊢ q = |q|\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_4.h.e'_5\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nthis : ¬SameRay ℝ (↑q) (-ζ)\n⊢ |q| = q\n[PROOFSTEP]\nexact abs_eq_self.mpr hq.le\n[GOAL]\ncase h.e'_4.h.e'_6\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nthis : ¬SameRay ℝ (↑q) (-ζ)\n⊢ 1 = ‖-ζ‖\n[PROOFSTEP]\nsimp [abs_of_pos hq, hζ.norm'_eq_one hn.ne', -Complex.norm_eq_abs]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ¬SameRay ℝ (↑q) (-ζ)\n[PROOFSTEP]\nrw [Complex.sameRay_iff]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ¬(↑q = 0 ∨ -ζ = 0 ∨ Complex.arg ↑q = Complex.arg (-ζ))\n[PROOFSTEP]\npush_neg\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ↑q ≠ 0 ∧\n    -Complex.exp (2 * ↑Real.pi * Complex.I / ↑n) ≠ 0 ∧\n      Complex.arg ↑q ≠ Complex.arg (-Complex.exp (2 * ↑Real.pi * Complex.I / ↑n))\n[PROOFSTEP]\nrefine' ⟨by exact_mod_cast hq.ne', neg_ne_zero.mpr <| hζ.ne_zero hn.ne', _⟩\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ↑q ≠ 0\n[PROOFSTEP]\nexact_mod_cast hq.ne'\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ Complex.arg ↑q ≠ Complex.arg (-Complex.exp (2 * ↑Real.pi * Complex.I / ↑n))\n[PROOFSTEP]\nrw [Complex.arg_ofReal_of_nonneg hq.le, Ne.def, eq_comm]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\n⊢ ¬Complex.arg (-Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)) = 0\n[PROOFSTEP]\nintro h\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : Complex.arg (-Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)) = 0\n⊢ False\n[PROOFSTEP]\nrw [Complex.arg_eq_zero_iff, Complex.neg_re, neg_nonneg, Complex.neg_im, neg_eq_zero] at h \n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\n⊢ False\n[PROOFSTEP]\nhave hζ₀ : ζ ≠ 0 := by\n  clear_value ζ\n  rintro rfl\n  exact hn.ne' (hζ.unique IsPrimitiveRoot.zero)\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\n⊢ ζ ≠ 0\n[PROOFSTEP]\nclear_value ζ\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nζ : ℂ\nhζ : IsPrimitiveRoot ζ n\n⊢ ζ ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nhζ : IsPrimitiveRoot 0 n\n⊢ False\n[PROOFSTEP]\nexact hn.ne' (hζ.unique IsPrimitiveRoot.zero)\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nhζ₀ : ζ ≠ 0\n⊢ False\n[PROOFSTEP]\nhave : ζ.re < 0 ∧ ζ.im = 0 := ⟨h.1.lt_of_ne ?_, h.2⟩\n[GOAL]\ncase refine_2\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nhζ₀ : ζ ≠ 0\nthis : ζ.re < 0 ∧ ζ.im = 0\n⊢ False\ncase refine_1\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nhζ₀ : ζ ≠ 0\n⊢ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≠ 0\n[PROOFSTEP]\nrw [← Complex.arg_eq_pi_iff, hζ.arg_eq_pi_iff hn.ne'] at this \n[GOAL]\ncase refine_2\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nhζ₀ : ζ ≠ 0\nthis : ζ = -1\n⊢ False\ncase refine_1\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nhζ₀ : ζ ≠ 0\n⊢ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≠ 0\n[PROOFSTEP]\nrw [this] at hζ \n[GOAL]\ncase refine_2\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot (-1) n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nhζ₀ : ζ ≠ 0\nthis : ζ = -1\n⊢ False\ncase refine_1\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nhζ₀ : ζ ≠ 0\n⊢ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≠ 0\n[PROOFSTEP]\nlinarith [hζ.unique <| IsPrimitiveRoot.neg_one 0 two_ne_zero.symm]\n[GOAL]\ncase refine_1\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nhζ₀ : ζ ≠ 0\n⊢ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≠ 0\n[PROOFSTEP]\ncontrapose! hζ₀\n[GOAL]\ncase refine_1\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nhζ₀ : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re = 0\n⊢ Complex.exp (2 * ↑Real.pi * Complex.I / ↑n) = 0\n[PROOFSTEP]\next\n[GOAL]\ncase refine_1.a\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nhζ₀ : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re = 0\n⊢ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re = 0.re\n[PROOFSTEP]\nsimp [hζ₀, h.2]\n[GOAL]\ncase refine_1.a\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nh : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re ≤ 0 ∧ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0\nhζ₀ : (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).re = 0\n⊢ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)).im = 0.im\n[PROOFSTEP]\nsimp [hζ₀, h.2]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\n⊢ eval q (cyclotomic n ℝ) < (q + 1) ^ φ n\n[PROOFSTEP]\nhave : ¬eval (↑q) (cyclotomic n ℂ) = 0 :=\n  by\n  erw [cyclotomic.eval_apply q n (algebraMap ℝ ℂ)]\n  simp only [Complex.coe_algebraMap, Complex.ofReal_eq_zero]\n  exact (cyclotomic_pos' n hq').ne.symm\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\n⊢ ¬eval (↑q) (cyclotomic n ℂ) = 0\n[PROOFSTEP]\nerw [cyclotomic.eval_apply q n (algebraMap ℝ ℂ)]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\n⊢ ¬↑(algebraMap ℝ ℂ) (eval q (cyclotomic n ℝ)) = 0\n[PROOFSTEP]\nsimp only [Complex.coe_algebraMap, Complex.ofReal_eq_zero]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\n⊢ ¬eval q (cyclotomic n ℝ) = 0\n[PROOFSTEP]\nexact (cyclotomic_pos' n hq').ne.symm\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ eval q (cyclotomic n ℝ) < (q + 1) ^ φ n\n[PROOFSTEP]\nsuffices\n  Units.mk0 ‖(cyclotomic n ℂ).eval ↑q‖₊ (by simp [this]) <\n    Units.mk0 (Real.toNNReal (q + 1)) (by simp; linarith) ^ totient n\n  by\n  simp only [← Units.val_lt_val, Units.val_pow_eq_pow_val, Units.val_mk0, ← NNReal.coe_lt_coe, hq'.le,\n    Real.toNNReal_lt_toNNReal_iff_of_nonneg, coe_nnnorm, Complex.norm_eq_abs, NNReal.coe_pow, Real.coe_toNNReal',\n    max_eq_left, sub_nonneg] at this \n  convert this using 2\n  · erw [cyclotomic.eval_apply q n (algebraMap ℝ ℂ), eq_comm]\n    simp [cyclotomic_nonneg n hq'.le]\n  rw [eq_comm, max_eq_left_iff]\n  linarith\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ‖eval (↑q) (cyclotomic n ℂ)‖₊ ≠ 0\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ Real.toNNReal (q + 1) ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ 0 < q + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis✝ : ¬eval (↑q) (cyclotomic n ℂ) = 0\nthis :\n  Units.mk0 ‖eval (↑q) (cyclotomic n ℂ)‖₊ (_ : ¬‖eval (↑q) (cyclotomic n ℂ)‖₊ = 0) <\n    Units.mk0 (Real.toNNReal (q + 1)) (_ : Real.toNNReal (q + 1) ≠ 0) ^ φ n\n⊢ eval q (cyclotomic n ℝ) < (q + 1) ^ φ n\n[PROOFSTEP]\nsimp only [← Units.val_lt_val, Units.val_pow_eq_pow_val, Units.val_mk0, ← NNReal.coe_lt_coe, hq'.le,\n  Real.toNNReal_lt_toNNReal_iff_of_nonneg, coe_nnnorm, Complex.norm_eq_abs, NNReal.coe_pow, Real.coe_toNNReal',\n  max_eq_left, sub_nonneg] at this \n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis✝ : ¬eval (↑q) (cyclotomic n ℂ) = 0\nthis : ↑Complex.abs (eval (↑q) (cyclotomic n ℂ)) < max (q + 1) 0 ^ φ n\n⊢ eval q (cyclotomic n ℝ) < (q + 1) ^ φ n\n[PROOFSTEP]\nconvert this using 2\n[GOAL]\ncase h.e'_3\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis✝ : ¬eval (↑q) (cyclotomic n ℂ) = 0\nthis : ↑Complex.abs (eval (↑q) (cyclotomic n ℂ)) < max (q + 1) 0 ^ φ n\n⊢ eval q (cyclotomic n ℝ) = ↑Complex.abs (eval (↑q) (cyclotomic n ℂ))\n[PROOFSTEP]\nerw [cyclotomic.eval_apply q n (algebraMap ℝ ℂ), eq_comm]\n[GOAL]\ncase h.e'_3\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis✝ : ¬eval (↑q) (cyclotomic n ℂ) = 0\nthis : ↑Complex.abs (eval (↑q) (cyclotomic n ℂ)) < max (q + 1) 0 ^ φ n\n⊢ ↑Complex.abs (↑(algebraMap ℝ ℂ) (eval q (cyclotomic n ℝ))) = eval q (cyclotomic n ℝ)\n[PROOFSTEP]\nsimp [cyclotomic_nonneg n hq'.le]\n[GOAL]\ncase h.e'_4.h.e'_5\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis✝ : ¬eval (↑q) (cyclotomic n ℂ) = 0\nthis : ↑Complex.abs (eval (↑q) (cyclotomic n ℂ)) < max (q + 1) 0 ^ φ n\n⊢ q + 1 = max (q + 1) 0\n[PROOFSTEP]\nrw [eq_comm, max_eq_left_iff]\n[GOAL]\ncase h.e'_4.h.e'_5\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis✝ : ¬eval (↑q) (cyclotomic n ℂ) = 0\nthis : ↑Complex.abs (eval (↑q) (cyclotomic n ℂ)) < max (q + 1) 0 ^ φ n\n⊢ 0 ≤ q + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ Units.mk0 ‖eval (↑q) (cyclotomic n ℂ)‖₊ (_ : ¬‖eval (↑q) (cyclotomic n ℂ)‖₊ = 0) <\n    Units.mk0 (Real.toNNReal (q + 1)) (_ : Real.toNNReal (q + 1) ≠ 0) ^ φ n\n[PROOFSTEP]\nsimp only [cyclotomic_eq_prod_X_sub_primitiveRoots hζ, eval_prod, eval_C, eval_X, eval_sub, nnnorm_prod, Units.mk0_prod]\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∏ b in attach (primitiveRoots n ℂ), Units.mk0 ‖↑q - ↑b‖₊ (_ : ‖↑q - ↑b‖₊ = 0 → False) <\n    Units.mk0 (Real.toNNReal (q + 1)) (_ : Real.toNNReal (q + 1) ≠ 0) ^ φ n\n[PROOFSTEP]\nconvert Finset.prod_lt_prod' (M := NNRealˣ) _ _\n[GOAL]\ncase h.e'_4\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ Units.mk0 (Real.toNNReal (q + 1)) (_ : Real.toNNReal (q + 1) ≠ 0) ^ φ n =\n    ∏ i in attach (primitiveRoots n ℂ), ?convert_3 i\ncase convert_3\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ { x // x ∈ primitiveRoots n ℂ } → NNRealˣ\ncase convert_5\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∀ (i : { x // x ∈ primitiveRoots n ℂ }),\n    i ∈ attach (primitiveRoots n ℂ) → Units.mk0 ‖↑q - ↑i‖₊ (_ : ‖↑q - ↑i‖₊ = 0 → False) ≤ ?convert_3 i\ncase convert_6\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∃ i, i ∈ attach (primitiveRoots n ℂ) ∧ Units.mk0 ‖↑q - ↑i‖₊ (_ : ‖↑q - ↑i‖₊ = 0 → False) < ?convert_3 i\n[PROOFSTEP]\nswap\n[GOAL]\ncase convert_3\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ { x // x ∈ primitiveRoots n ℂ } → NNRealˣ\n[PROOFSTEP]\nexact fun _ => Units.mk0 (Real.toNNReal (q + 1)) (by simp; linarith only [hq'])\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\nx✝ : { x // x ∈ primitiveRoots n ℂ }\n⊢ Real.toNNReal (q + 1) ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\nx✝ : { x // x ∈ primitiveRoots n ℂ }\n⊢ 0 < q + 1\n[PROOFSTEP]\nlinarith only [hq']\n[GOAL]\ncase h.e'_4\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ Units.mk0 (Real.toNNReal (q + 1)) (_ : Real.toNNReal (q + 1) ≠ 0) ^ φ n =\n    ∏ i in attach (primitiveRoots n ℂ), Units.mk0 (Real.toNNReal (q + 1)) (_ : Real.toNNReal (q + 1) ≠ 0)\n[PROOFSTEP]\nsimp [Complex.card_primitiveRoots]\n[GOAL]\ncase convert_5\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∀ (i : { x // x ∈ primitiveRoots n ℂ }),\n    i ∈ attach (primitiveRoots n ℂ) →\n      Units.mk0 ‖↑q - ↑i‖₊ (_ : ‖↑q - ↑i‖₊ = 0 → False) ≤\n        Units.mk0 (Real.toNNReal (q + 1)) (_ : Real.toNNReal (q + 1) ≠ 0)\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, Finset.mem_attach, forall_true_left, Subtype.forall, ← Units.val_le_val, ← NNReal.coe_le_coe,\n  Complex.abs.nonneg, hq'.le, Units.val_mk0, Real.coe_toNNReal, coe_nnnorm, Complex.norm_eq_abs, max_le_iff]\n[GOAL]\ncase convert_5\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∀ (a : ℂ), a ∈ primitiveRoots n ℂ → ↑Complex.abs (↑q - a) ≤ ↑(Real.toNNReal (q + 1))\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase convert_5\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\nx : ℂ\nhx : x ∈ primitiveRoots n ℂ\n⊢ ↑Complex.abs (↑q - x) ≤ ↑(Real.toNNReal (q + 1))\n[PROOFSTEP]\nhave : Complex.abs _ ≤ _ := hfor x hx\n[GOAL]\ncase convert_5\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis✝ : ¬eval (↑q) (cyclotomic n ℂ) = 0\nx : ℂ\nhx : x ∈ primitiveRoots n ℂ\nthis : ↑Complex.abs (↑q - x) ≤ q + 1\n⊢ ↑Complex.abs (↑q - x) ≤ ↑(Real.toNNReal (q + 1))\n[PROOFSTEP]\nsimp [this]\n[GOAL]\ncase convert_6\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∃ i,\n    i ∈ attach (primitiveRoots n ℂ) ∧\n      Units.mk0 ‖↑q - ↑i‖₊ (_ : ‖↑q - ↑i‖₊ = 0 → False) <\n        Units.mk0 (Real.toNNReal (q + 1)) (_ : Real.toNNReal (q + 1) ≠ 0)\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, Finset.mem_attach, exists_true_left, Subtype.exists, ← NNReal.coe_lt_coe, ← Units.val_lt_val,\n  Units.val_mk0 _, coe_nnnorm]\n[GOAL]\ncase convert_6\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ : IsPrimitiveRoot ζ n\nhex : ∃ ζ', ζ' ∈ primitiveRoots n ℂ ∧ ‖↑q - ζ'‖ < q + 1\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\n⊢ ∃ a h, True ∧ ‖↑q - a‖ < ↑(Real.toNNReal (q + 1))\n[PROOFSTEP]\nobtain ⟨ζ, hζ, hhζ : Complex.abs _ < _⟩ := hex\n[GOAL]\ncase convert_6.intro.intro\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ✝ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ✝ : IsPrimitiveRoot ζ✝ n\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\nζ : ℂ\nhζ : ζ ∈ primitiveRoots n ℂ\nhhζ : ↑Complex.abs (↑q - ζ) < q + 1\n⊢ ∃ a h, True ∧ ‖↑q - a‖ < ↑(Real.toNNReal (q + 1))\n[PROOFSTEP]\nexact ⟨ζ, hζ, by simp [hhζ]⟩\n[GOAL]\nn : ℕ\nq : ℝ\nhn' : 3 ≤ n\nhq' : 1 < q\nhn : 0 < n\nhq : 0 < q\nhfor : ∀ (ζ' : ℂ), ζ' ∈ primitiveRoots n ℂ → ‖↑q - ζ'‖ ≤ q + 1\nζ✝ : ℂ := Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)\nhζ✝ : IsPrimitiveRoot ζ✝ n\nthis : ¬eval (↑q) (cyclotomic n ℂ) = 0\nζ : ℂ\nhζ : ζ ∈ primitiveRoots n ℂ\nhhζ : ↑Complex.abs (↑q - ζ) < q + 1\n⊢ True ∧ ‖↑q - ζ‖ < ↑(Real.toNNReal (q + 1))\n[PROOFSTEP]\nsimp [hhζ]\n[GOAL]\nq : ℝ\nhq' : 1 < q\n⊢ eval q (cyclotomic 0 ℝ) ≤ (q + 1) ^ φ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nq : ℝ\nhq' : 1 < q\n⊢ eval q (cyclotomic 1 ℝ) ≤ (q + 1) ^ φ 1\n[PROOFSTEP]\nsimp [add_assoc, add_nonneg, zero_le_one]\n[GOAL]\nq : ℝ\nhq' : 1 < q\n⊢ eval q (cyclotomic 2 ℝ) ≤ (q + 1) ^ φ 2\n[PROOFSTEP]\nsimp\n[GOAL]\nn q : ℕ\nhn' : 1 < n\nhq : q ≠ 1\n⊢ (q - 1) ^ φ n < Int.natAbs (eval (↑q) (cyclotomic n ℤ))\n[PROOFSTEP]\nrcases hq.lt_or_lt.imp_left Nat.lt_one_iff.mp with (rfl | hq')\n[GOAL]\ncase inl\nn : ℕ\nhn' : 1 < n\nhq : 0 ≠ 1\n⊢ (0 - 1) ^ φ n < Int.natAbs (eval (↑0) (cyclotomic n ℤ))\n[PROOFSTEP]\nrw [zero_tsub, zero_pow (Nat.totient_pos (pos_of_gt hn')), pos_iff_ne_zero, Int.natAbs_ne_zero, Nat.cast_zero, ←\n  coeff_zero_eq_eval_zero, cyclotomic_coeff_zero _ hn']\n[GOAL]\ncase inl\nn : ℕ\nhn' : 1 < n\nhq : 0 ≠ 1\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\ncase inr\nn q : ℕ\nhn' : 1 < n\nhq : q ≠ 1\nhq' : 1 < q\n⊢ (q - 1) ^ φ n < Int.natAbs (eval (↑q) (cyclotomic n ℤ))\n[PROOFSTEP]\nrw [← @Nat.cast_lt ℝ, Nat.cast_pow, Nat.cast_sub hq'.le, Nat.cast_one, Int.cast_natAbs]\n[GOAL]\ncase inr\nn q : ℕ\nhn' : 1 < n\nhq : q ≠ 1\nhq' : 1 < q\n⊢ (↑q - 1) ^ φ n < ↑|eval (↑q) (cyclotomic n ℤ)|\n[PROOFSTEP]\nrefine' (sub_one_pow_totient_lt_cyclotomic_eval hn' (Nat.one_lt_cast.2 hq')).trans_le _\n[GOAL]\ncase inr\nn q : ℕ\nhn' : 1 < n\nhq : q ≠ 1\nhq' : 1 < q\n⊢ eval (↑q) (cyclotomic n ℝ) ≤ ↑|eval (↑q) (cyclotomic n ℤ)|\n[PROOFSTEP]\nconvert (cyclotomic.eval_apply (q : ℤ) n (algebraMap ℤ ℝ)).trans_le (le_abs_self _)\n[GOAL]\ncase h.e'_4\nn q : ℕ\nhn' : 1 < n\nhq : q ≠ 1\nhq' : 1 < q\n⊢ ↑|eval (↑q) (cyclotomic n ℤ)| = |↑(algebraMap ℤ ℝ) (eval (↑q) (cyclotomic n ℤ))|\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.Cyclotomic.Eval", "llama_tokens": 52884, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6224593171945417, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.35709146979214124}}
{"text": "[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf g : X ⟶ Y\nw : f = g\nZ : C\nh : Y ⟶ Z\n⊢ f ≫ h = g ≫ h\n[PROOFSTEP]\nrw [w]\n", "meta": {"mathlib_filename": "Mathlib.Tactic.CategoryTheory.Reassoc", "llama_tokens": 83, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.743167997235783, "lm_q2_score": 0.48047867804790706, "lm_q1q2_score": 0.35707637687935967}}
{"text": "[GOAL]\nx : ℝ\n⊢ Irrational x ↔ ∀ (a b : ℤ), x ≠ ↑a / ↑b\n[PROOFSTEP]\nsimp only [Irrational, Rat.forall, cast_mk, not_exists, Set.mem_range, cast_coe_int, cast_div, eq_comm]\n[GOAL]\nr : ℝ\ntr : Transcendental ℚ r\n⊢ Irrational r\n[PROOFSTEP]\nrintro ⟨a, rfl⟩\n[GOAL]\ncase intro\na : ℚ\ntr : Transcendental ℚ ↑a\n⊢ False\n[PROOFSTEP]\nexact tr (isAlgebraic_algebraMap a)\n[GOAL]\nx : ℝ\nn : ℕ\nm : ℤ\nhxr : x ^ n = ↑m\nhv : ¬∃ y, x = ↑y\nhnpos : 0 < n\n⊢ Irrational x\n[PROOFSTEP]\nrintro ⟨⟨N, D, P, C⟩, rfl⟩\n[GOAL]\ncase intro.mk'\nn : ℕ\nm : ℤ\nhnpos : 0 < n\nN : ℤ\nD : ℕ\nP : D ≠ 0\nC : Nat.coprime (Int.natAbs N) D\nhxr : ↑(mk' N D) ^ n = ↑m\nhv : ¬∃ y, ↑(mk' N D) = ↑y\n⊢ False\n[PROOFSTEP]\nrw [← cast_pow] at hxr \n[GOAL]\ncase intro.mk'\nn : ℕ\nm : ℤ\nhnpos : 0 < n\nN : ℤ\nD : ℕ\nP : D ≠ 0\nC : Nat.coprime (Int.natAbs N) D\nhxr : ↑(mk' N D ^ n) = ↑m\nhv : ¬∃ y, ↑(mk' N D) = ↑y\n⊢ False\n[PROOFSTEP]\nhave c1 : ((D : ℤ) : ℝ) ≠ 0 := by\n  rw [Int.cast_ne_zero, Int.coe_nat_ne_zero]\n  exact P\n[GOAL]\nn : ℕ\nm : ℤ\nhnpos : 0 < n\nN : ℤ\nD : ℕ\nP : D ≠ 0\nC : Nat.coprime (Int.natAbs N) D\nhxr : ↑(mk' N D ^ n) = ↑m\nhv : ¬∃ y, ↑(mk' N D) = ↑y\n⊢ ↑↑D ≠ 0\n[PROOFSTEP]\nrw [Int.cast_ne_zero, Int.coe_nat_ne_zero]\n[GOAL]\nn : ℕ\nm : ℤ\nhnpos : 0 < n\nN : ℤ\nD : ℕ\nP : D ≠ 0\nC : Nat.coprime (Int.natAbs N) D\nhxr : ↑(mk' N D ^ n) = ↑m\nhv : ¬∃ y, ↑(mk' N D) = ↑y\n⊢ D ≠ 0\n[PROOFSTEP]\nexact P\n[GOAL]\ncase intro.mk'\nn : ℕ\nm : ℤ\nhnpos : 0 < n\nN : ℤ\nD : ℕ\nP : D ≠ 0\nC : Nat.coprime (Int.natAbs N) D\nhxr : ↑(mk' N D ^ n) = ↑m\nhv : ¬∃ y, ↑(mk' N D) = ↑y\nc1 : ↑↑D ≠ 0\n⊢ False\n[PROOFSTEP]\nhave c2 : ((D : ℤ) : ℝ) ^ n ≠ 0 := pow_ne_zero _ c1\n[GOAL]\ncase intro.mk'\nn : ℕ\nm : ℤ\nhnpos : 0 < n\nN : ℤ\nD : ℕ\nP : D ≠ 0\nC : Nat.coprime (Int.natAbs N) D\nhxr : ↑(mk' N D ^ n) = ↑m\nhv : ¬∃ y, ↑(mk' N D) = ↑y\nc1 : ↑↑D ≠ 0\nc2 : ↑↑D ^ n ≠ 0\n⊢ False\n[PROOFSTEP]\nrw [num_den', cast_pow, cast_mk, div_pow, div_eq_iff_mul_eq c2, ← Int.cast_pow, ← Int.cast_pow, ← Int.cast_mul,\n  Int.cast_inj] at hxr \n[GOAL]\ncase intro.mk'\nn : ℕ\nm : ℤ\nhnpos : 0 < n\nN : ℤ\nD : ℕ\nP : D ≠ 0\nC : Nat.coprime (Int.natAbs N) D\nhxr : m * ↑D ^ n = N ^ n\nhv : ¬∃ y, ↑(mk' N D) = ↑y\nc1 : ↑↑D ≠ 0\nc2 : ↑↑D ^ n ≠ 0\n⊢ False\n[PROOFSTEP]\nhave hdivn : (D : ℤ) ^ n ∣ N ^ n := Dvd.intro_left m hxr\n[GOAL]\ncase intro.mk'\nn : ℕ\nm : ℤ\nhnpos : 0 < n\nN : ℤ\nD : ℕ\nP : D ≠ 0\nC : Nat.coprime (Int.natAbs N) D\nhxr : m * ↑D ^ n = N ^ n\nhv : ¬∃ y, ↑(mk' N D) = ↑y\nc1 : ↑↑D ≠ 0\nc2 : ↑↑D ^ n ≠ 0\nhdivn : ↑D ^ n ∣ N ^ n\n⊢ False\n[PROOFSTEP]\nrw [← Int.dvd_natAbs, ← Int.coe_nat_pow, Int.coe_nat_dvd, Int.natAbs_pow, Nat.pow_dvd_pow_iff hnpos] at hdivn \n[GOAL]\ncase intro.mk'\nn : ℕ\nm : ℤ\nhnpos : 0 < n\nN : ℤ\nD : ℕ\nP : D ≠ 0\nC : Nat.coprime (Int.natAbs N) D\nhxr : m * ↑D ^ n = N ^ n\nhv : ¬∃ y, ↑(mk' N D) = ↑y\nc1 : ↑↑D ≠ 0\nc2 : ↑↑D ^ n ≠ 0\nhdivn : D ∣ Int.natAbs N\n⊢ False\n[PROOFSTEP]\nobtain rfl : D = 1 := by rw [← Nat.gcd_eq_right hdivn, C.gcd_eq_one]\n[GOAL]\nn : ℕ\nm : ℤ\nhnpos : 0 < n\nN : ℤ\nD : ℕ\nP : D ≠ 0\nC : Nat.coprime (Int.natAbs N) D\nhxr : m * ↑D ^ n = N ^ n\nhv : ¬∃ y, ↑(mk' N D) = ↑y\nc1 : ↑↑D ≠ 0\nc2 : ↑↑D ^ n ≠ 0\nhdivn : D ∣ Int.natAbs N\n⊢ D = 1\n[PROOFSTEP]\nrw [← Nat.gcd_eq_right hdivn, C.gcd_eq_one]\n[GOAL]\ncase intro.mk'\nn : ℕ\nm : ℤ\nhnpos : 0 < n\nN : ℤ\nP : 1 ≠ 0\nC : Nat.coprime (Int.natAbs N) 1\nhxr : m * ↑1 ^ n = N ^ n\nhv : ¬∃ y, ↑(mk' N 1) = ↑y\nc1 : ↑↑1 ≠ 0\nc2 : ↑↑1 ^ n ≠ 0\nhdivn : 1 ∣ Int.natAbs N\n⊢ False\n[PROOFSTEP]\nrefine' hv ⟨N, _⟩\n[GOAL]\ncase intro.mk'\nn : ℕ\nm : ℤ\nhnpos : 0 < n\nN : ℤ\nP : 1 ≠ 0\nC : Nat.coprime (Int.natAbs N) 1\nhxr : m * ↑1 ^ n = N ^ n\nhv : ¬∃ y, ↑(mk' N 1) = ↑y\nc1 : ↑↑1 ≠ 0\nc2 : ↑↑1 ^ n ≠ 0\nhdivn : 1 ∣ Int.natAbs N\n⊢ ↑(mk' N 1) = ↑N\n[PROOFSTEP]\nrw [num_den', Int.ofNat_one, divInt_one, cast_coe_int]\n[GOAL]\nx : ℝ\nn : ℕ\nm : ℤ\nhm : m ≠ 0\np : ℕ\nhp : Fact (Nat.Prime p)\nhxr : x ^ n = ↑m\nhv : Part.get (multiplicity (↑p) m) (_ : multiplicity.Finite (↑p) m) % n ≠ 0\n⊢ Irrational x\n[PROOFSTEP]\nrcases Nat.eq_zero_or_pos n with (rfl | hnpos)\n[GOAL]\ncase inl\nx : ℝ\nm : ℤ\nhm : m ≠ 0\np : ℕ\nhp : Fact (Nat.Prime p)\nhxr : x ^ 0 = ↑m\nhv : Part.get (multiplicity (↑p) m) (_ : multiplicity.Finite (↑p) m) % 0 ≠ 0\n⊢ Irrational x\n[PROOFSTEP]\nrw [eq_comm, pow_zero, ← Int.cast_one, Int.cast_inj] at hxr \n[GOAL]\ncase inl\nx : ℝ\nm : ℤ\nhm : m ≠ 0\np : ℕ\nhp : Fact (Nat.Prime p)\nhxr : m = 1\nhv : Part.get (multiplicity (↑p) m) (_ : multiplicity.Finite (↑p) m) % 0 ≠ 0\n⊢ Irrational x\n[PROOFSTEP]\nsimp [hxr, multiplicity.one_right (mt isUnit_iff_dvd_one.1 (mt Int.coe_nat_dvd.1 hp.1.not_dvd_one)), Nat.zero_mod] at hv \n[GOAL]\ncase inr\nx : ℝ\nn : ℕ\nm : ℤ\nhm : m ≠ 0\np : ℕ\nhp : Fact (Nat.Prime p)\nhxr : x ^ n = ↑m\nhv : Part.get (multiplicity (↑p) m) (_ : multiplicity.Finite (↑p) m) % n ≠ 0\nhnpos : n > 0\n⊢ Irrational x\n[PROOFSTEP]\nrefine' irrational_nrt_of_notint_nrt _ _ hxr _ hnpos\n[GOAL]\ncase inr\nx : ℝ\nn : ℕ\nm : ℤ\nhm : m ≠ 0\np : ℕ\nhp : Fact (Nat.Prime p)\nhxr : x ^ n = ↑m\nhv : Part.get (multiplicity (↑p) m) (_ : multiplicity.Finite (↑p) m) % n ≠ 0\nhnpos : n > 0\n⊢ ¬∃ y, x = ↑y\n[PROOFSTEP]\nrintro ⟨y, rfl⟩\n[GOAL]\ncase inr.intro\nn : ℕ\nm : ℤ\nhm : m ≠ 0\np : ℕ\nhp : Fact (Nat.Prime p)\nhv : Part.get (multiplicity (↑p) m) (_ : multiplicity.Finite (↑p) m) % n ≠ 0\nhnpos : n > 0\ny : ℤ\nhxr : ↑y ^ n = ↑m\n⊢ False\n[PROOFSTEP]\nrw [← Int.cast_pow, Int.cast_inj] at hxr \n[GOAL]\ncase inr.intro\nn : ℕ\nm : ℤ\nhm : m ≠ 0\np : ℕ\nhp : Fact (Nat.Prime p)\nhv : Part.get (multiplicity (↑p) m) (_ : multiplicity.Finite (↑p) m) % n ≠ 0\nhnpos : n > 0\ny : ℤ\nhxr : y ^ n = m\n⊢ False\n[PROOFSTEP]\nsubst m\n[GOAL]\ncase inr.intro\nn p : ℕ\nhp : Fact (Nat.Prime p)\nhnpos : n > 0\ny : ℤ\nhm : y ^ n ≠ 0\nhv : Part.get (multiplicity (↑p) (y ^ n)) (_ : multiplicity.Finite (↑p) (y ^ n)) % n ≠ 0\n⊢ False\n[PROOFSTEP]\nhave : y ≠ 0 := by\n  rintro rfl\n  rw [zero_pow hnpos] at hm \n  exact hm rfl\n[GOAL]\nn p : ℕ\nhp : Fact (Nat.Prime p)\nhnpos : n > 0\ny : ℤ\nhm : y ^ n ≠ 0\nhv : Part.get (multiplicity (↑p) (y ^ n)) (_ : multiplicity.Finite (↑p) (y ^ n)) % n ≠ 0\n⊢ y ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nn p : ℕ\nhp : Fact (Nat.Prime p)\nhnpos : n > 0\nhm : 0 ^ n ≠ 0\nhv : Part.get (multiplicity (↑p) (0 ^ n)) (_ : multiplicity.Finite (↑p) (0 ^ n)) % n ≠ 0\n⊢ False\n[PROOFSTEP]\nrw [zero_pow hnpos] at hm \n[GOAL]\nn p : ℕ\nhp : Fact (Nat.Prime p)\nhnpos : n > 0\nhm✝ : 0 ^ n ≠ 0\nhm : 0 ≠ 0\nhv : Part.get (multiplicity (↑p) (0 ^ n)) (_ : multiplicity.Finite (↑p) (0 ^ n)) % n ≠ 0\n⊢ False\n[PROOFSTEP]\nexact hm rfl\n[GOAL]\ncase inr.intro\nn p : ℕ\nhp : Fact (Nat.Prime p)\nhnpos : n > 0\ny : ℤ\nhm : y ^ n ≠ 0\nhv : Part.get (multiplicity (↑p) (y ^ n)) (_ : multiplicity.Finite (↑p) (y ^ n)) % n ≠ 0\nthis : y ≠ 0\n⊢ False\n[PROOFSTEP]\nerw [multiplicity.pow' (Nat.prime_iff_prime_int.1 hp.1) (finite_int_iff.2 ⟨hp.1.ne_one, this⟩), Nat.mul_mod_right] at hv \n[GOAL]\ncase inr.intro\nn p : ℕ\nhp : Fact (Nat.Prime p)\nhnpos : n > 0\ny : ℤ\nhm : y ^ n ≠ 0\nthis : y ≠ 0\nhv : 0 ≠ 0\n⊢ False\n[PROOFSTEP]\nexact hv rfl\n[GOAL]\nm : ℤ\nhm : 0 < m\np : ℕ\nhp : Fact (Nat.Prime p)\nHpv : Part.get (multiplicity (↑p) m) (_ : multiplicity.Finite (↑p) m) % 2 = 1\n⊢ Part.get (multiplicity (↑p) m) (_ : multiplicity.Finite (↑p) m) % 2 ≠ 0\n[PROOFSTEP]\nrw [Hpv]\n[GOAL]\nm : ℤ\nhm : 0 < m\np : ℕ\nhp : Fact (Nat.Prime p)\nHpv : Part.get (multiplicity (↑p) m) (_ : multiplicity.Finite (↑p) m) % 2 = 1\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\np : ℕ\nhp : Prime p\n⊢ Part.get (multiplicity ↑p ↑p) (_ : multiplicity.Finite ↑p ↑p) % 2 = 1\n[PROOFSTEP]\nsimp [multiplicity.multiplicity_self (mt isUnit_iff_dvd_one.1 (mt Int.coe_nat_dvd.1 hp.not_dvd_one))]\n[GOAL]\n⊢ Irrational (Real.sqrt 2)\n[PROOFSTEP]\nsimpa using Nat.prime_two.irrational_sqrt\n[GOAL]\nq : ℚ\nH1 : Rat.sqrt q * Rat.sqrt q = q\n⊢ ↑(Rat.sqrt q) = Real.sqrt ↑q\n[PROOFSTEP]\nrw [← H1, cast_mul, sqrt_mul_self (cast_nonneg.2 <| Rat.sqrt_nonneg q), sqrt_eq, abs_of_nonneg (Rat.sqrt_nonneg q)]\n[GOAL]\nq : ℚ\nH1 : ¬Rat.sqrt q * Rat.sqrt q = q\nH2 : 0 ≤ q\nx✝ : Real.sqrt ↑q ∈ Set.range Rat.cast\nr : ℚ\nhr : ↑r = Real.sqrt ↑q\n⊢ r * r = q\n[PROOFSTEP]\nrwa [eq_comm, sqrt_eq_iff_mul_self_eq (cast_nonneg.2 H2), ← cast_mul, Rat.cast_inj] at hr \n[GOAL]\nq : ℚ\nH1 : ¬Rat.sqrt q * Rat.sqrt q = q\nH2 : 0 ≤ q\nx✝ : Real.sqrt ↑q ∈ Set.range Rat.cast\nr : ℚ\nhr : Real.sqrt ↑q = ↑r\n⊢ 0 ≤ ↑r\n[PROOFSTEP]\nrw [← hr]\n[GOAL]\nq : ℚ\nH1 : ¬Rat.sqrt q * Rat.sqrt q = q\nH2 : 0 ≤ q\nx✝ : Real.sqrt ↑q ∈ Set.range Rat.cast\nr : ℚ\nhr : Real.sqrt ↑q = ↑r\n⊢ 0 ≤ Real.sqrt ↑q\n[PROOFSTEP]\nexact Real.sqrt_nonneg _\n[GOAL]\nq : ℚ\nH1 : ¬Rat.sqrt q * Rat.sqrt q = q\nH2 : ¬0 ≤ q\n⊢ ↑0 = Real.sqrt ↑q\n[PROOFSTEP]\nrw [cast_zero]\n[GOAL]\nq : ℚ\nH1 : ¬Rat.sqrt q * Rat.sqrt q = q\nH2 : ¬0 ≤ q\n⊢ 0 = Real.sqrt ↑q\n[PROOFSTEP]\nexact (sqrt_eq_zero_of_nonpos (Rat.cast_nonpos.2 <| le_of_not_le H2)).symm\n[GOAL]\nx : ℝ\nh : Irrational x\nm : ℤ\n⊢ x ≠ ↑m\n[PROOFSTEP]\nrw [← Rat.cast_coe_int]\n[GOAL]\nx : ℝ\nh : Irrational x\nm : ℤ\n⊢ x ≠ ↑↑m\n[PROOFSTEP]\nexact h.ne_rat _\n[GOAL]\nx : ℝ\nh : Irrational x\n⊢ x ≠ 0\n[PROOFSTEP]\nexact_mod_cast h.ne_nat 0\n[GOAL]\nx : ℝ\nh : Irrational x\n⊢ x ≠ 1\n[PROOFSTEP]\nsimpa only [Nat.cast_one] using h.ne_nat 1\n[GOAL]\nq : ℚ\nx y : ℝ\n⊢ Irrational (x + y) → Irrational x ∨ Irrational y\n[PROOFSTEP]\ndelta Irrational\n[GOAL]\nq : ℚ\nx y : ℝ\n⊢ ¬x + y ∈ Set.range Rat.cast → ¬x ∈ Set.range Rat.cast ∨ ¬y ∈ Set.range Rat.cast\n[PROOFSTEP]\ncontrapose!\n[GOAL]\nq : ℚ\nx y : ℝ\n⊢ x ∈ Set.range Rat.cast ∧ y ∈ Set.range Rat.cast → x + y ∈ Set.range Rat.cast\n[PROOFSTEP]\nrintro ⟨⟨rx, rfl⟩, ⟨ry, rfl⟩⟩\n[GOAL]\ncase intro.intro.intro\nq rx ry : ℚ\n⊢ ↑rx + ↑ry ∈ Set.range Rat.cast\n[PROOFSTEP]\nexact ⟨rx + ry, cast_add rx ry⟩\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\n⊢ Irrational (↑(-q) + (↑q + x))\n[PROOFSTEP]\nrwa [cast_neg, neg_add_cancel_left]\n[GOAL]\nq : ℚ\nx y : ℝ\nm : ℤ\nh : Irrational (↑m + x)\n⊢ Irrational x\n[PROOFSTEP]\nrw [← cast_coe_int] at h \n[GOAL]\nq : ℚ\nx y : ℝ\nm : ℤ\nh : Irrational (↑↑m + x)\n⊢ Irrational x\n[PROOFSTEP]\nexact h.of_rat_add m\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\nm : ℤ\n⊢ Irrational (↑m + x)\n[PROOFSTEP]\nrw [← cast_coe_int]\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\nm : ℤ\n⊢ Irrational (↑↑m + x)\n[PROOFSTEP]\nexact h.rat_add m\n[GOAL]\nq✝ : ℚ\nx y : ℝ\nh : Irrational (-x)\nx✝ : x ∈ Set.range Rat.cast\nq : ℚ\nhx : ↑q = x\n⊢ ↑(-q) = -x\n[PROOFSTEP]\nrw [cast_neg, hx]\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\n⊢ Irrational (- -x)\n[PROOFSTEP]\nrwa [neg_neg]\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\n⊢ Irrational (x - ↑q)\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg, cast_neg] using h.add_rat (-q)\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\n⊢ Irrational (↑q - x)\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using h.neg.rat_add q\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational (x - ↑q)\n⊢ Irrational (x + ↑(-q))\n[PROOFSTEP]\nsimpa only [cast_neg, sub_eq_add_neg] using h\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational (↑q - x)\n⊢ Irrational (↑q + -x)\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using h\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\nm : ℤ\n⊢ Irrational (x - ↑m)\n[PROOFSTEP]\nsimpa only [Rat.cast_coe_int] using h.sub_rat m\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\nm : ℤ\n⊢ Irrational (↑m - x)\n[PROOFSTEP]\nsimpa only [Rat.cast_coe_int] using h.rat_sub m\n[GOAL]\nq : ℚ\nx y : ℝ\nm : ℤ\nh : Irrational (x - ↑m)\n⊢ Irrational (x - ↑↑m)\n[PROOFSTEP]\nrwa [Rat.cast_coe_int]\n[GOAL]\nq : ℚ\nx y : ℝ\nm : ℤ\nh : Irrational (↑m - x)\n⊢ Irrational (↑↑m - x)\n[PROOFSTEP]\nrwa [Rat.cast_coe_int]\n[GOAL]\nq : ℚ\nx y : ℝ\n⊢ Irrational (x * y) → Irrational x ∨ Irrational y\n[PROOFSTEP]\ndelta Irrational\n[GOAL]\nq : ℚ\nx y : ℝ\n⊢ ¬x * y ∈ Set.range Rat.cast → ¬x ∈ Set.range Rat.cast ∨ ¬y ∈ Set.range Rat.cast\n[PROOFSTEP]\ncontrapose!\n[GOAL]\nq : ℚ\nx y : ℝ\n⊢ x ∈ Set.range Rat.cast ∧ y ∈ Set.range Rat.cast → x * y ∈ Set.range Rat.cast\n[PROOFSTEP]\nrintro ⟨⟨rx, rfl⟩, ⟨ry, rfl⟩⟩\n[GOAL]\ncase intro.intro.intro\nq rx ry : ℚ\n⊢ ↑rx * ↑ry ∈ Set.range Rat.cast\n[PROOFSTEP]\nexact ⟨rx * ry, cast_mul rx ry⟩\n[GOAL]\nq✝ : ℚ\nx y : ℝ\nh : Irrational x\nq : ℚ\nhq : q ≠ 0\n⊢ Irrational (x * ↑q * ↑q⁻¹)\n[PROOFSTEP]\nrwa [mul_assoc, ← cast_mul, mul_inv_cancel hq, cast_one, mul_one]\n[GOAL]\nq : ℚ\nx y : ℝ\nm : ℤ\nh : Irrational (x * ↑m)\n⊢ Irrational (x * ↑↑m)\n[PROOFSTEP]\nrwa [cast_coe_int]\n[GOAL]\nq : ℚ\nx y : ℝ\nm : ℤ\nh : Irrational (↑m * x)\n⊢ Irrational (↑↑m * x)\n[PROOFSTEP]\nrwa [cast_coe_int]\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\nm : ℤ\nhm : m ≠ 0\n⊢ Irrational (x * ↑m)\n[PROOFSTEP]\nrw [← cast_coe_int]\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\nm : ℤ\nhm : m ≠ 0\n⊢ Irrational (x * ↑↑m)\n[PROOFSTEP]\nrefine' h.mul_rat _\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\nm : ℤ\nhm : m ≠ 0\n⊢ ↑m ≠ 0\n[PROOFSTEP]\nrwa [Int.cast_ne_zero]\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\n⊢ Irrational x⁻¹⁻¹\n[PROOFSTEP]\nrwa [inv_inv]\n[GOAL]\nq✝ : ℚ\nx y : ℝ\nh : Irrational x\nq : ℚ\nhq : q ≠ 0\n⊢ Irrational (x / ↑q)\n[PROOFSTEP]\nrw [div_eq_mul_inv, ← cast_inv]\n[GOAL]\nq✝ : ℚ\nx y : ℝ\nh : Irrational x\nq : ℚ\nhq : q ≠ 0\n⊢ Irrational (x * ↑q⁻¹)\n[PROOFSTEP]\nexact h.mul_rat (inv_ne_zero hq)\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\nm : ℤ\nhm : m ≠ 0\n⊢ Irrational (x / ↑m)\n[PROOFSTEP]\nrw [← cast_coe_int]\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\nm : ℤ\nhm : m ≠ 0\n⊢ Irrational (x / ↑↑m)\n[PROOFSTEP]\nrefine' h.div_rat _\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\nm : ℤ\nhm : m ≠ 0\n⊢ ↑m ≠ 0\n[PROOFSTEP]\nrwa [Int.cast_ne_zero]\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational x\nm : ℕ\nhm : m ≠ 0\n⊢ ↑m ≠ 0\n[PROOFSTEP]\nrwa [Int.coe_nat_ne_zero]\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational (1 / x)\n⊢ Irrational (↑1 / x)\n[PROOFSTEP]\nrwa [cast_one]\n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational (x ^ 0)\n⊢ Irrational x\n[PROOFSTEP]\nrw [pow_zero] at h \n[GOAL]\nq : ℚ\nx y : ℝ\nh : Irrational 1\n⊢ Irrational x\n[PROOFSTEP]\nexact (h ⟨1, cast_one⟩).elim\n[GOAL]\nq : ℚ\nx y : ℝ\nn : ℕ\nh : Irrational (x ^ (n + 1))\n⊢ Irrational x\n[PROOFSTEP]\nrw [pow_succ] at h \n[GOAL]\nq : ℚ\nx y : ℝ\nn : ℕ\nh : Irrational (x * x ^ n)\n⊢ Irrational x\n[PROOFSTEP]\nexact h.mul_cases.elim id (of_pow n)\n[GOAL]\nq : ℚ\nx y : ℝ\nn : ℕ\nh : Irrational (x ^ ↑n)\n⊢ Irrational x\n[PROOFSTEP]\nrw [zpow_ofNat] at h \n[GOAL]\nq : ℚ\nx y : ℝ\nn : ℕ\nh : Irrational (x ^ n)\n⊢ Irrational x\n[PROOFSTEP]\nexact h.of_pow _\n[GOAL]\nq : ℚ\nx y : ℝ\nn : ℕ\nh : Irrational (x ^ -[n+1])\n⊢ Irrational x\n[PROOFSTEP]\nrw [zpow_negSucc] at h \n[GOAL]\nq : ℚ\nx y : ℝ\nn : ℕ\nh : Irrational (x ^ (n + 1))⁻¹\n⊢ Irrational x\n[PROOFSTEP]\nexact h.of_inv.of_pow _\n[GOAL]\nx : ℝ\np : ℤ[X]\nhx : Irrational x\np_nonzero : p ≠ 0\nx_is_root : ↑(aeval x) p = 0\n⊢ 1 < natDegree p\n[PROOFSTEP]\nby_contra rid\n[GOAL]\nx : ℝ\np : ℤ[X]\nhx : Irrational x\np_nonzero : p ≠ 0\nx_is_root : ↑(aeval x) p = 0\nrid : ¬1 < natDegree p\n⊢ False\n[PROOFSTEP]\nrcases exists_eq_X_add_C_of_natDegree_le_one (not_lt.1 rid) with ⟨a, b, rfl⟩\n[GOAL]\ncase intro.intro\nx : ℝ\nhx : Irrational x\na b : ℤ\np_nonzero : ↑C a * X + ↑C b ≠ 0\nx_is_root : ↑(aeval x) (↑C a * X + ↑C b) = 0\nrid : ¬1 < natDegree (↑C a * X + ↑C b)\n⊢ False\n[PROOFSTEP]\nclear rid\n[GOAL]\ncase intro.intro\nx : ℝ\nhx : Irrational x\na b : ℤ\np_nonzero : ↑C a * X + ↑C b ≠ 0\nx_is_root : ↑(aeval x) (↑C a * X + ↑C b) = 0\n⊢ False\n[PROOFSTEP]\nhave : (a : ℝ) * x = -b := by simpa [eq_neg_iff_add_eq_zero] using x_is_root\n[GOAL]\nx : ℝ\nhx : Irrational x\na b : ℤ\np_nonzero : ↑C a * X + ↑C b ≠ 0\nx_is_root : ↑(aeval x) (↑C a * X + ↑C b) = 0\n⊢ ↑a * x = -↑b\n[PROOFSTEP]\nsimpa [eq_neg_iff_add_eq_zero] using x_is_root\n[GOAL]\ncase intro.intro\nx : ℝ\nhx : Irrational x\na b : ℤ\np_nonzero : ↑C a * X + ↑C b ≠ 0\nx_is_root : ↑(aeval x) (↑C a * X + ↑C b) = 0\nthis : ↑a * x = -↑b\n⊢ False\n[PROOFSTEP]\nrcases em (a = 0) with (rfl | ha)\n[GOAL]\ncase intro.intro.inl\nx : ℝ\nhx : Irrational x\nb : ℤ\np_nonzero : ↑C 0 * X + ↑C b ≠ 0\nx_is_root : ↑(aeval x) (↑C 0 * X + ↑C b) = 0\nthis : ↑0 * x = -↑b\n⊢ False\n[PROOFSTEP]\nobtain rfl : b = 0 := by simpa\n[GOAL]\nx : ℝ\nhx : Irrational x\nb : ℤ\np_nonzero : ↑C 0 * X + ↑C b ≠ 0\nx_is_root : ↑(aeval x) (↑C 0 * X + ↑C b) = 0\nthis : ↑0 * x = -↑b\n⊢ b = 0\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase intro.intro.inl\nx : ℝ\nhx : Irrational x\np_nonzero : ↑C 0 * X + ↑C 0 ≠ 0\nx_is_root : ↑(aeval x) (↑C 0 * X + ↑C 0) = 0\nthis : ↑0 * x = -↑0\n⊢ False\n[PROOFSTEP]\nsimp at p_nonzero \n[GOAL]\ncase intro.intro.inr\nx : ℝ\nhx : Irrational x\na b : ℤ\np_nonzero : ↑C a * X + ↑C b ≠ 0\nx_is_root : ↑(aeval x) (↑C a * X + ↑C b) = 0\nthis : ↑a * x = -↑b\nha : ¬a = 0\n⊢ False\n[PROOFSTEP]\nrw [mul_comm, ← eq_div_iff_mul_eq, eq_comm] at this \n[GOAL]\ncase intro.intro.inr\nx : ℝ\nhx : Irrational x\na b : ℤ\np_nonzero : ↑C a * X + ↑C b ≠ 0\nx_is_root : ↑(aeval x) (↑C a * X + ↑C b) = 0\nthis : -↑b / ↑a = x\nha : ¬a = 0\n⊢ False\ncase intro.intro.inr\nx : ℝ\nhx : Irrational x\na b : ℤ\np_nonzero : ↑C a * X + ↑C b ≠ 0\nx_is_root : ↑(aeval x) (↑C a * X + ↑C b) = 0\nthis : x * ↑a = -↑b\nha : ¬a = 0\n⊢ ↑a ≠ 0\n[PROOFSTEP]\nrefine' hx ⟨-b / a, _⟩\n[GOAL]\ncase intro.intro.inr\nx : ℝ\nhx : Irrational x\na b : ℤ\np_nonzero : ↑C a * X + ↑C b ≠ 0\nx_is_root : ↑(aeval x) (↑C a * X + ↑C b) = 0\nthis : -↑b / ↑a = x\nha : ¬a = 0\n⊢ ↑(-↑b / ↑a) = x\ncase intro.intro.inr\nx : ℝ\nhx : Irrational x\na b : ℤ\np_nonzero : ↑C a * X + ↑C b ≠ 0\nx_is_root : ↑(aeval x) (↑C a * X + ↑C b) = 0\nthis : x * ↑a = -↑b\nha : ¬a = 0\n⊢ ↑a ≠ 0\n[PROOFSTEP]\nassumption_mod_cast\n[GOAL]\ncase intro.intro.inr\nx : ℝ\nhx : Irrational x\na b : ℤ\np_nonzero : ↑C a * X + ↑C b ≠ 0\nx_is_root : ↑(aeval x) (↑C a * X + ↑C b) = 0\nthis : x * ↑a = -↑b\nha : ¬a = 0\n⊢ ↑a ≠ 0\n[PROOFSTEP]\nassumption_mod_cast\n[GOAL]\nq : ℚ\nm : ℤ\nn : ℕ\nx : ℝ\n⊢ Irrational (x * ↑q) ↔ q ≠ 0 ∧ Irrational x\n[PROOFSTEP]\nrw [mul_comm, irrational_rat_mul_iff]\n[GOAL]\nq : ℚ\nm : ℤ\nn : ℕ\nx : ℝ\n⊢ Irrational (↑m * x) ↔ m ≠ 0 ∧ Irrational x\n[PROOFSTEP]\nrw [← cast_coe_int, irrational_rat_mul_iff, Int.cast_ne_zero]\n[GOAL]\nq : ℚ\nm : ℤ\nn : ℕ\nx : ℝ\n⊢ Irrational (x * ↑m) ↔ m ≠ 0 ∧ Irrational x\n[PROOFSTEP]\nrw [← cast_coe_int, irrational_mul_rat_iff, Int.cast_ne_zero]\n[GOAL]\nq : ℚ\nm : ℤ\nn : ℕ\nx : ℝ\n⊢ Irrational (↑n * x) ↔ n ≠ 0 ∧ Irrational x\n[PROOFSTEP]\nrw [← cast_coe_nat, irrational_rat_mul_iff, Nat.cast_ne_zero]\n[GOAL]\nq : ℚ\nm : ℤ\nn : ℕ\nx : ℝ\n⊢ Irrational (x * ↑n) ↔ n ≠ 0 ∧ Irrational x\n[PROOFSTEP]\nrw [← cast_coe_nat, irrational_mul_rat_iff, Nat.cast_ne_zero]\n[GOAL]\nq : ℚ\nm : ℤ\nn : ℕ\nx : ℝ\n⊢ Irrational (↑q / x) ↔ q ≠ 0 ∧ Irrational x\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nq : ℚ\nm : ℤ\nn : ℕ\nx : ℝ\n⊢ Irrational (x / ↑q) ↔ q ≠ 0 ∧ Irrational x\n[PROOFSTEP]\nrw [div_eq_mul_inv, ← cast_inv, irrational_mul_rat_iff, Ne.def, inv_eq_zero]\n[GOAL]\nq : ℚ\nm : ℤ\nn : ℕ\nx : ℝ\n⊢ Irrational (↑m / x) ↔ m ≠ 0 ∧ Irrational x\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nq : ℚ\nm : ℤ\nn : ℕ\nx : ℝ\n⊢ Irrational (x / ↑m) ↔ m ≠ 0 ∧ Irrational x\n[PROOFSTEP]\nrw [← cast_coe_int, irrational_div_rat_iff, Int.cast_ne_zero]\n[GOAL]\nq : ℚ\nm : ℤ\nn : ℕ\nx : ℝ\n⊢ Irrational (↑n / x) ↔ n ≠ 0 ∧ Irrational x\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nq : ℚ\nm : ℤ\nn : ℕ\nx : ℝ\n⊢ Irrational (x / ↑n) ↔ n ≠ 0 ∧ Irrational x\n[PROOFSTEP]\nrw [← cast_coe_nat, irrational_div_rat_iff, Nat.cast_ne_zero]\n", "meta": {"mathlib_filename": "Mathlib.Data.Real.Irrational", "llama_tokens": 10591, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7025300449389326, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.35675309183259263}}
{"text": "[GOAL]\nV : Type v\ninst✝⁴ : Category.{w, v} V\ninst✝³ : MonoidalCategory V\nC : Type u₁\ninst✝² : EnrichedCategory V C\nW : Type v\ninst✝¹ : Category.{w, v} W\ninst✝ : MonoidalCategory W\nF : LaxMonoidalFunctor V W\nX Y : TransportEnrichment F C\n⊢ (λ_ ((fun X Y => F.obj (EnrichedCategory.Hom X Y)) X Y)).inv ≫\n      ((fun X => F.ε ≫ F.map (eId V X)) X ⊗ 𝟙 ((fun X Y => F.obj (EnrichedCategory.Hom X Y)) X Y)) ≫\n        (fun X Y Z =>\n            LaxMonoidalFunctor.μ F (EnrichedCategory.Hom X Y) (EnrichedCategory.Hom Y Z) ≫ F.map (eComp V X Y Z))\n          X X Y =\n    𝟙 ((fun X Y => F.obj (EnrichedCategory.Hom X Y)) X Y)\n[PROOFSTEP]\nrw [comp_tensor_id, Category.assoc, ← F.toFunctor.map_id, F.μ_natural_assoc, F.toFunctor.map_id,\n  F.left_unitality_inv_assoc, ← F.toFunctor.map_comp, ← F.toFunctor.map_comp, e_id_comp, F.toFunctor.map_id]\n[GOAL]\nV : Type v\ninst✝⁴ : Category.{w, v} V\ninst✝³ : MonoidalCategory V\nC : Type u₁\ninst✝² : EnrichedCategory V C\nW : Type v\ninst✝¹ : Category.{w, v} W\ninst✝ : MonoidalCategory W\nF : LaxMonoidalFunctor V W\nX Y : TransportEnrichment F C\n⊢ (ρ_ ((fun X Y => F.obj (EnrichedCategory.Hom X Y)) X Y)).inv ≫\n      (𝟙 ((fun X Y => F.obj (EnrichedCategory.Hom X Y)) X Y) ⊗ (fun X => F.ε ≫ F.map (eId V X)) Y) ≫\n        (fun X Y Z =>\n            LaxMonoidalFunctor.μ F (EnrichedCategory.Hom X Y) (EnrichedCategory.Hom Y Z) ≫ F.map (eComp V X Y Z))\n          X Y Y =\n    𝟙 ((fun X Y => F.obj (EnrichedCategory.Hom X Y)) X Y)\n[PROOFSTEP]\nrw [id_tensor_comp, Category.assoc, ← F.toFunctor.map_id, F.μ_natural_assoc, F.toFunctor.map_id,\n  F.right_unitality_inv_assoc, ← F.toFunctor.map_comp, ← F.toFunctor.map_comp, e_comp_id, F.toFunctor.map_id]\n[GOAL]\nV : Type v\ninst✝⁴ : Category.{w, v} V\ninst✝³ : MonoidalCategory V\nC : Type u₁\ninst✝² : EnrichedCategory V C\nW : Type v\ninst✝¹ : Category.{w, v} W\ninst✝ : MonoidalCategory W\nF : LaxMonoidalFunctor V W\nP Q R S : TransportEnrichment F C\n⊢ (α_ ((fun X Y => F.obj (EnrichedCategory.Hom X Y)) P Q) ((fun X Y => F.obj (EnrichedCategory.Hom X Y)) Q R)\n          ((fun X Y => F.obj (EnrichedCategory.Hom X Y)) R S)).inv ≫\n      ((fun X Y Z =>\n              LaxMonoidalFunctor.μ F (EnrichedCategory.Hom X Y) (EnrichedCategory.Hom Y Z) ≫ F.map (eComp V X Y Z))\n            P Q R ⊗\n          𝟙 ((fun X Y => F.obj (EnrichedCategory.Hom X Y)) R S)) ≫\n        (fun X Y Z =>\n            LaxMonoidalFunctor.μ F (EnrichedCategory.Hom X Y) (EnrichedCategory.Hom Y Z) ≫ F.map (eComp V X Y Z))\n          P R S =\n    (𝟙 ((fun X Y => F.obj (EnrichedCategory.Hom X Y)) P Q) ⊗\n        (fun X Y Z =>\n            LaxMonoidalFunctor.μ F (EnrichedCategory.Hom X Y) (EnrichedCategory.Hom Y Z) ≫ F.map (eComp V X Y Z))\n          Q R S) ≫\n      (fun X Y Z =>\n          LaxMonoidalFunctor.μ F (EnrichedCategory.Hom X Y) (EnrichedCategory.Hom Y Z) ≫ F.map (eComp V X Y Z))\n        P Q S\n[PROOFSTEP]\nrw [comp_tensor_id, Category.assoc, ← F.toFunctor.map_id, F.μ_natural_assoc, F.toFunctor.map_id, ←\n  F.associativity_inv_assoc, ← F.toFunctor.map_comp, ← F.toFunctor.map_comp, e_assoc, id_tensor_comp, Category.assoc, ←\n  F.toFunctor.map_id, F.μ_natural_assoc, F.toFunctor.map_comp]\n[GOAL]\nV : Type v\ninst✝² : Category.{w, v} V\ninst✝¹ : MonoidalCategory V\nC✝ : Type u₁\ninst✝ : EnrichedCategory V C✝\nC : Type u₁\n𝒞 : Category.{v, u₁} C\nX Y : C\n⊢ (λ_ (X ⟶ Y)).inv ≫ ((fun X x => 𝟙 X) X ⊗ 𝟙 (X ⟶ Y)) ≫ (fun X Y Z p => p.fst ≫ p.snd) X X Y = 𝟙 (X ⟶ Y)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nV : Type v\ninst✝² : Category.{w, v} V\ninst✝¹ : MonoidalCategory V\nC✝ : Type u₁\ninst✝ : EnrichedCategory V C✝\nC : Type u₁\n𝒞 : Category.{v, u₁} C\nX Y : C\na✝ : X ⟶ Y\n⊢ ((λ_ (X ⟶ Y)).inv ≫ ((fun X x => 𝟙 X) X ⊗ 𝟙 (X ⟶ Y)) ≫ (fun X Y Z p => p.fst ≫ p.snd) X X Y) a✝ = 𝟙 (X ⟶ Y) a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type v\ninst✝² : Category.{w, v} V\ninst✝¹ : MonoidalCategory V\nC✝ : Type u₁\ninst✝ : EnrichedCategory V C✝\nC : Type u₁\n𝒞 : Category.{v, u₁} C\nX Y : C\n⊢ (ρ_ (X ⟶ Y)).inv ≫ (𝟙 (X ⟶ Y) ⊗ (fun X x => 𝟙 X) Y) ≫ (fun X Y Z p => p.fst ≫ p.snd) X Y Y = 𝟙 (X ⟶ Y)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nV : Type v\ninst✝² : Category.{w, v} V\ninst✝¹ : MonoidalCategory V\nC✝ : Type u₁\ninst✝ : EnrichedCategory V C✝\nC : Type u₁\n𝒞 : Category.{v, u₁} C\nX Y : C\na✝ : X ⟶ Y\n⊢ ((ρ_ (X ⟶ Y)).inv ≫ (𝟙 (X ⟶ Y) ⊗ (fun X x => 𝟙 X) Y) ≫ (fun X Y Z p => p.fst ≫ p.snd) X Y Y) a✝ = 𝟙 (X ⟶ Y) a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type v\ninst✝² : Category.{w, v} V\ninst✝¹ : MonoidalCategory V\nC✝ : Type u₁\ninst✝ : EnrichedCategory V C✝\nC : Type u₁\n𝒞 : Category.{v, u₁} C\nW X Y Z : C\n⊢ (α_ (W ⟶ X) (X ⟶ Y) (Y ⟶ Z)).inv ≫\n      ((fun X Y Z p => p.fst ≫ p.snd) W X Y ⊗ 𝟙 (Y ⟶ Z)) ≫ (fun X Y Z p => p.fst ≫ p.snd) W Y Z =\n    (𝟙 (W ⟶ X) ⊗ (fun X Y Z p => p.fst ≫ p.snd) X Y Z) ≫ (fun X Y Z p => p.fst ≫ p.snd) W X Z\n[PROOFSTEP]\next ⟨f, g, h⟩\n[GOAL]\ncase h.mk.mk\nV : Type v\ninst✝² : Category.{w, v} V\ninst✝¹ : MonoidalCategory V\nC✝ : Type u₁\ninst✝ : EnrichedCategory V C✝\nC : Type u₁\n𝒞 : Category.{v, u₁} C\nW X Y Z : C\nf : W ⟶ X\ng : X ⟶ Y\nh : Y ⟶ Z\n⊢ ((α_ (W ⟶ X) (X ⟶ Y) (Y ⟶ Z)).inv ≫\n        ((fun X Y Z p => p.fst ≫ p.snd) W X Y ⊗ 𝟙 (Y ⟶ Z)) ≫ (fun X Y Z p => p.fst ≫ p.snd) W Y Z)\n      (f, g, h) =\n    ((𝟙 (W ⟶ X) ⊗ (fun X Y Z p => p.fst ≫ p.snd) X Y Z) ≫ (fun X Y Z p => p.fst ≫ p.snd) W X Z) (f, g, h)\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type v\ninst✝⁵ : Category.{w, v} V\ninst✝⁴ : MonoidalCategory V\nC : Type u₁\ninst✝³ : EnrichedCategory V C\nW : Type (v + 1)\ninst✝² : Category.{v, v + 1} W\ninst✝¹ : MonoidalCategory W\ninst✝ : EnrichedCategory W C\n⊢ Category.{?u.96214, u₁} (ForgetEnrichment W C)\n[PROOFSTEP]\nlet I : EnrichedCategory (Type v) (TransportEnrichment (coyonedaTensorUnit W) C) := inferInstance\n[GOAL]\nV : Type v\ninst✝⁵ : Category.{w, v} V\ninst✝⁴ : MonoidalCategory V\nC : Type u₁\ninst✝³ : EnrichedCategory V C\nW : Type (v + 1)\ninst✝² : Category.{v, v + 1} W\ninst✝¹ : MonoidalCategory W\ninst✝ : EnrichedCategory W C\nI : EnrichedCategory (Type v) (TransportEnrichment (coyonedaTensorUnit W) C) := inferInstance\n⊢ Category.{?u.96214, u₁} (ForgetEnrichment W C)\n[PROOFSTEP]\nexact enrichedCategoryTypeEquivCategory C I\n[GOAL]\nV : Type v\ninst✝⁶ : Category.{w, v} V\ninst✝⁵ : MonoidalCategory V\nC✝ : Type u₁\ninst✝⁴ : EnrichedCategory V C✝\nW : Type (v + 1)\ninst✝³ : Category.{v, v + 1} W\ninst✝² : MonoidalCategory W\nC : Type u₁\nD : Type u₂\ninst✝¹ : EnrichedCategory W C\ninst✝ : EnrichedCategory W D\nF : EnrichedFunctor W C D\nX✝ Y✝ Z✝ : ForgetEnrichment W C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun X => ForgetEnrichment.of W (obj F (ForgetEnrichment.to W X)),\n          map := fun {X Y} f =>\n            ForgetEnrichment.homOf W\n              (ForgetEnrichment.homTo W f ≫ map F (ForgetEnrichment.to W X) (ForgetEnrichment.to W Y)) }.map\n      (f ≫ g) =\n    { obj := fun X => ForgetEnrichment.of W (obj F (ForgetEnrichment.to W X)),\n            map := fun {X Y} f =>\n              ForgetEnrichment.homOf W\n                (ForgetEnrichment.homTo W f ≫ map F (ForgetEnrichment.to W X) (ForgetEnrichment.to W Y)) }.map\n        f ≫\n      { obj := fun X => ForgetEnrichment.of W (obj F (ForgetEnrichment.to W X)),\n            map := fun {X Y} f =>\n              ForgetEnrichment.homOf W\n                (ForgetEnrichment.homTo W f ≫ map F (ForgetEnrichment.to W X) (ForgetEnrichment.to W Y)) }.map\n        g\n[PROOFSTEP]\ndsimp\n[GOAL]\nV : Type v\ninst✝⁶ : Category.{w, v} V\ninst✝⁵ : MonoidalCategory V\nC✝ : Type u₁\ninst✝⁴ : EnrichedCategory V C✝\nW : Type (v + 1)\ninst✝³ : Category.{v, v + 1} W\ninst✝² : MonoidalCategory W\nC : Type u₁\nD : Type u₂\ninst✝¹ : EnrichedCategory W C\ninst✝ : EnrichedCategory W D\nF : EnrichedFunctor W C D\nX✝ Y✝ Z✝ : ForgetEnrichment W C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ ForgetEnrichment.homOf W\n      ((((λ_ (𝟙_ W)).inv ≫ (ForgetEnrichment.homTo W f ⊗ ForgetEnrichment.homTo W g)) ≫\n          eComp W (ForgetEnrichment.to W X✝) (ForgetEnrichment.to W Y✝) (ForgetEnrichment.to W Z✝)) ≫\n        map F (ForgetEnrichment.to W X✝) (ForgetEnrichment.to W Z✝)) =\n    ForgetEnrichment.homOf W\n        (ForgetEnrichment.homTo W f ≫ map F (ForgetEnrichment.to W X✝) (ForgetEnrichment.to W Y✝)) ≫\n      ForgetEnrichment.homOf W\n        (ForgetEnrichment.homTo W g ≫ map F (ForgetEnrichment.to W Y✝) (ForgetEnrichment.to W Z✝))\n[PROOFSTEP]\napply_fun ForgetEnrichment.homTo W\n[GOAL]\nV : Type v\ninst✝⁶ : Category.{w, v} V\ninst✝⁵ : MonoidalCategory V\nC✝ : Type u₁\ninst✝⁴ : EnrichedCategory V C✝\nW : Type (v + 1)\ninst✝³ : Category.{v, v + 1} W\ninst✝² : MonoidalCategory W\nC : Type u₁\nD : Type u₂\ninst✝¹ : EnrichedCategory W C\ninst✝ : EnrichedCategory W D\nF : EnrichedFunctor W C D\nX✝ Y✝ Z✝ : ForgetEnrichment W C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ ForgetEnrichment.homTo W\n      (ForgetEnrichment.homOf W\n        ((((λ_ (𝟙_ W)).inv ≫ (ForgetEnrichment.homTo W f ⊗ ForgetEnrichment.homTo W g)) ≫\n            eComp W (ForgetEnrichment.to W X✝) (ForgetEnrichment.to W Y✝) (ForgetEnrichment.to W Z✝)) ≫\n          map F (ForgetEnrichment.to W X✝) (ForgetEnrichment.to W Z✝))) =\n    ForgetEnrichment.homTo W\n      (ForgetEnrichment.homOf W\n          (ForgetEnrichment.homTo W f ≫ map F (ForgetEnrichment.to W X✝) (ForgetEnrichment.to W Y✝)) ≫\n        ForgetEnrichment.homOf W\n          (ForgetEnrichment.homTo W g ≫ map F (ForgetEnrichment.to W Y✝) (ForgetEnrichment.to W Z✝)))\n[PROOFSTEP]\nsimp only [Iso.cancel_iso_inv_left, Category.assoc, tensor_comp, ForgetEnrichment.homTo_homOf, EnrichedFunctor.map_comp,\n  forgetEnrichment_comp]\n[GOAL]\nV : Type v\ninst✝⁶ : Category.{w, v} V\ninst✝⁵ : MonoidalCategory V\nC✝ : Type u₁\ninst✝⁴ : EnrichedCategory V C✝\nW : Type (v + 1)\ninst✝³ : Category.{v, v + 1} W\ninst✝² : MonoidalCategory W\nC : Type u₁\nD : Type u₂\ninst✝¹ : EnrichedCategory W C\ninst✝ : EnrichedCategory W D\nF : EnrichedFunctor W C D\nX✝ Y✝ Z✝ : ForgetEnrichment W C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ (ForgetEnrichment.homTo W f ⊗ ForgetEnrichment.homTo W g) ≫\n      (map F (ForgetEnrichment.to W X✝) (ForgetEnrichment.to W Y✝) ⊗\n          map F (ForgetEnrichment.to W Y✝) (ForgetEnrichment.to W Z✝)) ≫\n        eComp W (obj F (ForgetEnrichment.to W X✝)) (obj F (ForgetEnrichment.to W Y✝))\n          (obj F (ForgetEnrichment.to W Z✝)) =\n    (ForgetEnrichment.homTo W f ⊗ ForgetEnrichment.homTo W g) ≫\n      (map F (ForgetEnrichment.to W X✝) (ForgetEnrichment.to W Y✝) ⊗\n          map F (ForgetEnrichment.to W Y✝) (ForgetEnrichment.to W Z✝)) ≫\n        eComp W (ForgetEnrichment.to W (ForgetEnrichment.of W (obj F (ForgetEnrichment.to W X✝))))\n          (ForgetEnrichment.to W (ForgetEnrichment.of W (obj F (ForgetEnrichment.to W Y✝))))\n          (ForgetEnrichment.to W (ForgetEnrichment.of W (obj F (ForgetEnrichment.to W Z✝))))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inj\nV : Type v\ninst✝⁶ : Category.{w, v} V\ninst✝⁵ : MonoidalCategory V\nC✝ : Type u₁\ninst✝⁴ : EnrichedCategory V C✝\nW : Type (v + 1)\ninst✝³ : Category.{v, v + 1} W\ninst✝² : MonoidalCategory W\nC : Type u₁\nD : Type u₂\ninst✝¹ : EnrichedCategory W C\ninst✝ : EnrichedCategory W D\nF : EnrichedFunctor W C D\nX✝ Y✝ Z✝ : ForgetEnrichment W C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ Function.Injective (ForgetEnrichment.homTo W)\n[PROOFSTEP]\nintro f g w\n[GOAL]\ncase inj\nV : Type v\ninst✝⁶ : Category.{w, v} V\ninst✝⁵ : MonoidalCategory V\nC✝ : Type u₁\ninst✝⁴ : EnrichedCategory V C✝\nW : Type (v + 1)\ninst✝³ : Category.{v, v + 1} W\ninst✝² : MonoidalCategory W\nC : Type u₁\nD : Type u₂\ninst✝¹ : EnrichedCategory W C\ninst✝ : EnrichedCategory W D\nF : EnrichedFunctor W C D\nX✝ Y✝ Z✝ : ForgetEnrichment W C\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nf g :\n  ForgetEnrichment.of W (obj F (ForgetEnrichment.to W X✝)) ⟶ ForgetEnrichment.of W (obj F (ForgetEnrichment.to W Z✝))\nw : ForgetEnrichment.homTo W f = ForgetEnrichment.homTo W g\n⊢ f = g\n[PROOFSTEP]\napply_fun ForgetEnrichment.homOf W at w \n[GOAL]\ncase inj\nV : Type v\ninst✝⁶ : Category.{w, v} V\ninst✝⁵ : MonoidalCategory V\nC✝ : Type u₁\ninst✝⁴ : EnrichedCategory V C✝\nW : Type (v + 1)\ninst✝³ : Category.{v, v + 1} W\ninst✝² : MonoidalCategory W\nC : Type u₁\nD : Type u₂\ninst✝¹ : EnrichedCategory W C\ninst✝ : EnrichedCategory W D\nF : EnrichedFunctor W C D\nX✝ Y✝ Z✝ : ForgetEnrichment W C\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\nf g :\n  ForgetEnrichment.of W (obj F (ForgetEnrichment.to W X✝)) ⟶ ForgetEnrichment.of W (obj F (ForgetEnrichment.to W Z✝))\nw : ForgetEnrichment.homOf W (ForgetEnrichment.homTo W f) = ForgetEnrichment.homOf W (ForgetEnrichment.homTo W g)\n⊢ f = g\n[PROOFSTEP]\nsimpa using w\n[GOAL]\nV : Type v\ninst✝⁴ : Category.{w, v} V\ninst✝³ : MonoidalCategory V\nC : Type u₁\ninst✝² : EnrichedCategory V C\nD : Type u₂\ninst✝¹ : EnrichedCategory V D\ninst✝ : BraidedCategory V\nF G : EnrichedFunctor V C D\nX✝ Y✝ : Vᵒᵖ\nf : X✝ ⟶ Y✝\nσ : (fun A => GradedNatTrans ((Center.ofBraided V).toLaxMonoidalFunctor.toFunctor.obj A.unop) F G) X✝\nX Y : C\n⊢ (HalfBraiding.β ((Center.ofBraided V).toLaxMonoidalFunctor.toFunctor.obj Y✝.unop).snd\n          (EnrichedCategory.Hom X Y)).hom ≫\n      (EnrichedFunctor.map F X Y ⊗ (fun X => f.unop ≫ GradedNatTrans.app σ X) Y) ≫\n        eComp V (EnrichedFunctor.obj F X) (EnrichedFunctor.obj F Y) (EnrichedFunctor.obj G Y) =\n    ((fun X => f.unop ≫ GradedNatTrans.app σ X) X ⊗ EnrichedFunctor.map G X Y) ≫\n      eComp V (EnrichedFunctor.obj F X) (EnrichedFunctor.obj G X) (EnrichedFunctor.obj G Y)\n[PROOFSTEP]\nhave p := σ.naturality X Y\n[GOAL]\nV : Type v\ninst✝⁴ : Category.{w, v} V\ninst✝³ : MonoidalCategory V\nC : Type u₁\ninst✝² : EnrichedCategory V C\nD : Type u₂\ninst✝¹ : EnrichedCategory V D\ninst✝ : BraidedCategory V\nF G : EnrichedFunctor V C D\nX✝ Y✝ : Vᵒᵖ\nf : X✝ ⟶ Y✝\nσ : (fun A => GradedNatTrans ((Center.ofBraided V).toLaxMonoidalFunctor.toFunctor.obj A.unop) F G) X✝\nX Y : C\np :\n  (HalfBraiding.β ((Center.ofBraided V).toLaxMonoidalFunctor.toFunctor.obj X✝.unop).snd\n          (EnrichedCategory.Hom X Y)).hom ≫\n      (EnrichedFunctor.map F X Y ⊗ GradedNatTrans.app σ Y) ≫\n        eComp V (EnrichedFunctor.obj F X) (EnrichedFunctor.obj F Y) (EnrichedFunctor.obj G Y) =\n    (GradedNatTrans.app σ X ⊗ EnrichedFunctor.map G X Y) ≫\n      eComp V (EnrichedFunctor.obj F X) (EnrichedFunctor.obj G X) (EnrichedFunctor.obj G Y)\n⊢ (HalfBraiding.β ((Center.ofBraided V).toLaxMonoidalFunctor.toFunctor.obj Y✝.unop).snd\n          (EnrichedCategory.Hom X Y)).hom ≫\n      (EnrichedFunctor.map F X Y ⊗ (fun X => f.unop ≫ GradedNatTrans.app σ X) Y) ≫\n        eComp V (EnrichedFunctor.obj F X) (EnrichedFunctor.obj F Y) (EnrichedFunctor.obj G Y) =\n    ((fun X => f.unop ≫ GradedNatTrans.app σ X) X ⊗ EnrichedFunctor.map G X Y) ≫\n      eComp V (EnrichedFunctor.obj F X) (EnrichedFunctor.obj G X) (EnrichedFunctor.obj G Y)\n[PROOFSTEP]\ndsimp at p ⊢\n[GOAL]\nV : Type v\ninst✝⁴ : Category.{w, v} V\ninst✝³ : MonoidalCategory V\nC : Type u₁\ninst✝² : EnrichedCategory V C\nD : Type u₂\ninst✝¹ : EnrichedCategory V D\ninst✝ : BraidedCategory V\nF G : EnrichedFunctor V C D\nX✝ Y✝ : Vᵒᵖ\nf : X✝ ⟶ Y✝\nσ : (fun A => GradedNatTrans ((Center.ofBraided V).toLaxMonoidalFunctor.toFunctor.obj A.unop) F G) X✝\nX Y : C\np :\n  (β_ X✝.unop (EnrichedCategory.Hom X Y)).hom ≫\n      (EnrichedFunctor.map F X Y ⊗ GradedNatTrans.app σ Y) ≫\n        eComp V (EnrichedFunctor.obj F X) (EnrichedFunctor.obj F Y) (EnrichedFunctor.obj G Y) =\n    (GradedNatTrans.app σ X ⊗ EnrichedFunctor.map G X Y) ≫\n      eComp V (EnrichedFunctor.obj F X) (EnrichedFunctor.obj G X) (EnrichedFunctor.obj G Y)\n⊢ (β_ Y✝.unop (EnrichedCategory.Hom X Y)).hom ≫\n      (EnrichedFunctor.map F X Y ⊗ f.unop ≫ GradedNatTrans.app σ Y) ≫\n        eComp V (EnrichedFunctor.obj F X) (EnrichedFunctor.obj F Y) (EnrichedFunctor.obj G Y) =\n    (f.unop ≫ GradedNatTrans.app σ X ⊗ EnrichedFunctor.map G X Y) ≫\n      eComp V (EnrichedFunctor.obj F X) (EnrichedFunctor.obj G X) (EnrichedFunctor.obj G Y)\n[PROOFSTEP]\nrw [← id_tensor_comp_tensor_id (f.unop ≫ σ.app Y) _, id_tensor_comp, Category.assoc, Category.assoc, ←\n  braiding_naturality_assoc, id_tensor_comp_tensor_id_assoc, p, ← tensor_comp_assoc, Category.id_comp]\n[GOAL]\nV : Type v\ninst✝² : Category.{w, v} V\ninst✝¹ : MonoidalCategory V\nC✝ : Type u₁\ninst✝ : EnrichedCategory V C✝\nC : Type u₁\n𝒞 : EnrichedCategory (Type v) C\nD : Type u₂\n𝒟 : EnrichedCategory (Type v) D\nF : C ⥤ D\nX : C\n⊢ eId (Type v) X ≫ (fun X Y f => F.map f) X X = eId (Type v) ((fun X => F.obj X) X)\n[PROOFSTEP]\next ⟨⟩\n[GOAL]\ncase h.unit\nV : Type v\ninst✝² : Category.{w, v} V\ninst✝¹ : MonoidalCategory V\nC✝ : Type u₁\ninst✝ : EnrichedCategory V C✝\nC : Type u₁\n𝒞 : EnrichedCategory (Type v) C\nD : Type u₂\n𝒟 : EnrichedCategory (Type v) D\nF : C ⥤ D\nX : C\n⊢ (eId (Type v) X ≫ (fun X Y f => F.map f) X X) PUnit.unit = eId (Type v) ((fun X => F.obj X) X) PUnit.unit\n[PROOFSTEP]\nexact F.map_id X\n[GOAL]\nV : Type v\ninst✝² : Category.{w, v} V\ninst✝¹ : MonoidalCategory V\nC✝ : Type u₁\ninst✝ : EnrichedCategory V C✝\nC : Type u₁\n𝒞 : EnrichedCategory (Type v) C\nD : Type u₂\n𝒟 : EnrichedCategory (Type v) D\nF : C ⥤ D\nX Y Z : C\n⊢ eComp (Type v) X Y Z ≫ (fun X Y f => F.map f) X Z =\n    ((fun X Y f => F.map f) X Y ⊗ (fun X Y f => F.map f) Y Z) ≫\n      eComp (Type v) ((fun X => F.obj X) X) ((fun X => F.obj X) Y) ((fun X => F.obj X) Z)\n[PROOFSTEP]\next ⟨f, g⟩\n[GOAL]\ncase h.mk\nV : Type v\ninst✝² : Category.{w, v} V\ninst✝¹ : MonoidalCategory V\nC✝ : Type u₁\ninst✝ : EnrichedCategory V C✝\nC : Type u₁\n𝒞 : EnrichedCategory (Type v) C\nD : Type u₂\n𝒟 : EnrichedCategory (Type v) D\nF : C ⥤ D\nX Y Z : C\nf : EnrichedCategory.Hom X Y\ng : EnrichedCategory.Hom Y Z\n⊢ (eComp (Type v) X Y Z ≫ (fun X Y f => F.map f) X Z) (f, g) =\n    (((fun X Y f => F.map f) X Y ⊗ (fun X Y f => F.map f) Y Z) ≫\n        eComp (Type v) ((fun X => F.obj X) X) ((fun X => F.obj X) Y) ((fun X => F.obj X) Z))\n      (f, g)\n[PROOFSTEP]\nexact F.map_comp f g\n[GOAL]\nV : Type v\ninst✝⁴ : Category.{w, v} V\ninst✝³ : MonoidalCategory V\nC✝ : Type u₁\ninst✝² : EnrichedCategory V C✝\nC : Type v\ninst✝¹ : EnrichedCategory (Type v) C\nD : Type v\ninst✝ : EnrichedCategory (Type v) D\nF G : EnrichedFunctor (Type v) C D\nα : Type vᵒᵖ\nσ : (yoneda.obj (↑enrichedFunctorTypeEquivFunctor F ⟶ ↑enrichedFunctorTypeEquivFunctor G)).obj α\nX Y : C\n⊢ (HalfBraiding.β ((Center.ofBraided (Type v)).toLaxMonoidalFunctor.toFunctor.obj α.unop).snd\n          (EnrichedCategory.Hom X Y)).hom ≫\n      (EnrichedFunctor.map F X Y ⊗ (fun X x => NatTrans.app (σ x) X) Y) ≫\n        eComp (Type v) (EnrichedFunctor.obj F X) (EnrichedFunctor.obj F Y) (EnrichedFunctor.obj G Y) =\n    ((fun X x => NatTrans.app (σ x) X) X ⊗ EnrichedFunctor.map G X Y) ≫\n      eComp (Type v) (EnrichedFunctor.obj F X) (EnrichedFunctor.obj G X) (EnrichedFunctor.obj G Y)\n[PROOFSTEP]\next ⟨x, f⟩\n[GOAL]\ncase h.mk\nV : Type v\ninst✝⁴ : Category.{w, v} V\ninst✝³ : MonoidalCategory V\nC✝ : Type u₁\ninst✝² : EnrichedCategory V C✝\nC : Type v\ninst✝¹ : EnrichedCategory (Type v) C\nD : Type v\ninst✝ : EnrichedCategory (Type v) D\nF G : EnrichedFunctor (Type v) C D\nα : Type vᵒᵖ\nσ : (yoneda.obj (↑enrichedFunctorTypeEquivFunctor F ⟶ ↑enrichedFunctorTypeEquivFunctor G)).obj α\nX Y : C\nx : ((Center.ofBraided (Type v)).toLaxMonoidalFunctor.toFunctor.obj α.unop).fst\nf : EnrichedCategory.Hom X Y\n⊢ ((HalfBraiding.β ((Center.ofBraided (Type v)).toLaxMonoidalFunctor.toFunctor.obj α.unop).snd\n            (EnrichedCategory.Hom X Y)).hom ≫\n        (EnrichedFunctor.map F X Y ⊗ (fun X x => NatTrans.app (σ x) X) Y) ≫\n          eComp (Type v) (EnrichedFunctor.obj F X) (EnrichedFunctor.obj F Y) (EnrichedFunctor.obj G Y))\n      (x, f) =\n    (((fun X x => NatTrans.app (σ x) X) X ⊗ EnrichedFunctor.map G X Y) ≫\n        eComp (Type v) (EnrichedFunctor.obj F X) (EnrichedFunctor.obj G X) (EnrichedFunctor.obj G Y))\n      (x, f)\n[PROOFSTEP]\nexact (σ x).naturality f\n[GOAL]\nV : Type v\ninst✝⁴ : Category.{w, v} V\ninst✝³ : MonoidalCategory V\nC✝ : Type u₁\ninst✝² : EnrichedCategory V C✝\nC : Type v\ninst✝¹ : EnrichedCategory (Type v) C\nD : Type v\ninst✝ : EnrichedCategory (Type v) D\nF G : EnrichedFunctor (Type v) C D\n⊢ ∀ {X Y : Type vᵒᵖ} (f : X ⟶ Y),\n    (enrichedNatTransYoneda F G).map f ≫\n        ((fun α =>\n              Iso.mk (fun σ x => NatTrans.mk fun X => GradedNatTrans.app σ X x) fun σ =>\n                { app := fun X x => NatTrans.app (σ x) X,\n                  naturality :=\n                    (_ :\n                      ∀ (X Y : C),\n                        (HalfBraiding.β ((Center.ofBraided (Type v)).toLaxMonoidalFunctor.toFunctor.obj α.unop).snd\n                                (EnrichedCategory.Hom X Y)).hom ≫\n                            (EnrichedFunctor.map F X Y ⊗ (fun X x => NatTrans.app (σ x) X) Y) ≫\n                              eComp (Type v) (EnrichedFunctor.obj F X) (EnrichedFunctor.obj F Y)\n                                (EnrichedFunctor.obj G Y) =\n                          ((fun X x => NatTrans.app (σ x) X) X ⊗ EnrichedFunctor.map G X Y) ≫\n                            eComp (Type v) (EnrichedFunctor.obj F X) (EnrichedFunctor.obj G X)\n                              (EnrichedFunctor.obj G Y)) })\n            Y).hom =\n      ((fun α =>\n              Iso.mk (fun σ x => NatTrans.mk fun X => GradedNatTrans.app σ X x) fun σ =>\n                { app := fun X x => NatTrans.app (σ x) X,\n                  naturality :=\n                    (_ :\n                      ∀ (X Y : C),\n                        (HalfBraiding.β ((Center.ofBraided (Type v)).toLaxMonoidalFunctor.toFunctor.obj α.unop).snd\n                                (EnrichedCategory.Hom X Y)).hom ≫\n                            (EnrichedFunctor.map F X Y ⊗ (fun X x => NatTrans.app (σ x) X) Y) ≫\n                              eComp (Type v) (EnrichedFunctor.obj F X) (EnrichedFunctor.obj F Y)\n                                (EnrichedFunctor.obj G Y) =\n                          ((fun X x => NatTrans.app (σ x) X) X ⊗ EnrichedFunctor.map G X Y) ≫\n                            eComp (Type v) (EnrichedFunctor.obj F X) (EnrichedFunctor.obj G X)\n                              (EnrichedFunctor.obj G Y)) })\n            X).hom ≫\n        (yoneda.obj (↑enrichedFunctorTypeEquivFunctor F ⟶ ↑enrichedFunctorTypeEquivFunctor G)).map f\n[PROOFSTEP]\naesop_cat\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Enriched.Basic", "llama_tokens": 10102, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7606506418255927, "lm_q2_score": 0.46879062662624377, "lm_q1q2_score": 0.3565858910250741}}
{"text": "[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nx✝ d₂ : D\nf : x✝ ⟶ d₂\n⊢ ∀ ⦃X Y : C⦄ (f_1 : X ⟶ Y),\n    ((fun d =>\n                Functor.mk\n                  { obj := fun t => ∐ fun x => d,\n                    map := fun {X Y} f => Sigma.desc fun g => Sigma.ι (fun x => d) (g ≫ f) })\n              x✝).map\n          f_1 ≫\n        (fun e => Sigma.desc fun h => f ≫ Sigma.ι (fun x => d₂) h) Y =\n      (fun e => Sigma.desc fun h => f ≫ Sigma.ι (fun x => d₂) h) X ≫\n        ((fun d =>\n                Functor.mk\n                  { obj := fun t => ∐ fun x => d,\n                    map := fun {X Y} f => Sigma.desc fun g => Sigma.ι (fun x => d) (g ≫ f) })\n              d₂).map\n          f_1\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nx✝ d₂ : D\nf : x✝ ⟶ d₂\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\n⊢ ((fun d =>\n              Functor.mk\n                { obj := fun t => ∐ fun x => d,\n                  map := fun {X Y} f => Sigma.desc fun g => Sigma.ι (fun x => d) (g ≫ f) })\n            x✝).map\n        f✝ ≫\n      (fun e => Sigma.desc fun h => f ≫ Sigma.ι (fun x => d₂) h) Y✝ =\n    (fun e => Sigma.desc fun h => f ≫ Sigma.ι (fun x => d₂) h) X✝ ≫\n      ((fun d =>\n              Functor.mk\n                { obj := fun t => ∐ fun x => d,\n                  map := fun {X Y} f => Sigma.desc fun g => Sigma.ι (fun x => d) (g ≫ f) })\n            d₂).map\n        f✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nx✝ d₂ : D\nf : x✝ ⟶ d₂\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\n⊢ ((Sigma.desc fun g => Sigma.ι (fun x => x✝) (g ≫ f✝)) ≫ Sigma.desc fun h => f ≫ Sigma.ι (fun x => d₂) h) =\n    (Sigma.desc fun h => f ≫ Sigma.ι (fun x => d₂) h) ≫ Sigma.desc fun g => Sigma.ι (fun x => d₂) (g ≫ f✝)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nx✝ d₂ : D\nf : x✝ ⟶ d₂\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\nb✝ : c ⟶ X✝\n⊢ (Sigma.ι (fun x => x✝) b✝ ≫\n      (Sigma.desc fun g => Sigma.ι (fun x => x✝) (g ≫ f✝)) ≫ Sigma.desc fun h => f ≫ Sigma.ι (fun x => d₂) h) =\n    Sigma.ι (fun x => x✝) b✝ ≫\n      (Sigma.desc fun h => f ≫ Sigma.ι (fun x => d₂) h) ≫ Sigma.desc fun g => Sigma.ι (fun x => d₂) (g ≫ f✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nd : D\nF : C ⥤ D\nf : d ⟶ ((evaluation C D).obj c).obj F\n⊢ ∀ ⦃X Y : C⦄ (f_1 : X ⟶ Y),\n    ((evaluationLeftAdjoint D c).obj d).map f_1 ≫ (fun e => Sigma.desc fun h => f ≫ F.map h) Y =\n      (fun e => Sigma.desc fun h => f ≫ F.map h) X ≫ F.map f_1\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nd : D\nF : C ⥤ D\nf : d ⟶ ((evaluation C D).obj c).obj F\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\n⊢ ((evaluationLeftAdjoint D c).obj d).map f✝ ≫ (fun e => Sigma.desc fun h => f ≫ F.map h) Y✝ =\n    (fun e => Sigma.desc fun h => f ≫ F.map h) X✝ ≫ F.map f✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nd : D\nF : C ⥤ D\nf : d ⟶ ((evaluation C D).obj c).obj F\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\n⊢ ((Sigma.desc fun g => Sigma.ι (fun x => d) (g ≫ f✝)) ≫ Sigma.desc fun h => f ≫ F.map h) =\n    (Sigma.desc fun h => f ≫ F.map h) ≫ F.map f✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nd : D\nF : C ⥤ D\nf : d ⟶ ((evaluation C D).obj c).obj F\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\nb✝ : c ⟶ X✝\n⊢ (Sigma.ι (fun x => d) b✝ ≫ (Sigma.desc fun g => Sigma.ι (fun x => d) (g ≫ f✝)) ≫ Sigma.desc fun h => f ≫ F.map h) =\n    Sigma.ι (fun x => d) b✝ ≫ (Sigma.desc fun h => f ≫ F.map h) ≫ F.map f✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nd : D\nF : C ⥤ D\n⊢ Function.LeftInverse (fun f => NatTrans.mk fun e => Sigma.desc fun h => f ≫ F.map h) fun f =>\n    Sigma.ι (fun x => d) (𝟙 c) ≫ NatTrans.app f c\n[PROOFSTEP]\nintro f\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nd : D\nF : C ⥤ D\nf : (evaluationLeftAdjoint D c).obj d ⟶ F\n⊢ (fun f => NatTrans.mk fun e => Sigma.desc fun h => f ≫ F.map h)\n      ((fun f => Sigma.ι (fun x => d) (𝟙 c) ≫ NatTrans.app f c) f) =\n    f\n[PROOFSTEP]\next x\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nd : D\nF : C ⥤ D\nf : (evaluationLeftAdjoint D c).obj d ⟶ F\nx : C\n⊢ NatTrans.app\n      ((fun f => NatTrans.mk fun e => Sigma.desc fun h => f ≫ F.map h)\n        ((fun f => Sigma.ι (fun x => d) (𝟙 c) ≫ NatTrans.app f c) f))\n      x =\n    NatTrans.app f x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nd : D\nF : C ⥤ D\nf : (evaluationLeftAdjoint D c).obj d ⟶ F\nx : C\n⊢ (Sigma.desc fun h => (Sigma.ι (fun x => d) (𝟙 c) ≫ NatTrans.app f c) ≫ F.map h) = NatTrans.app f x\n[PROOFSTEP]\next g\n[GOAL]\ncase w.h.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nd : D\nF : C ⥤ D\nf : (evaluationLeftAdjoint D c).obj d ⟶ F\nx : C\ng : c ⟶ x\n⊢ (Sigma.ι (fun x => d) g ≫ Sigma.desc fun h => (Sigma.ι (fun x => d) (𝟙 c) ≫ NatTrans.app f c) ≫ F.map h) =\n    Sigma.ι (fun x => d) g ≫ NatTrans.app f x\n[PROOFSTEP]\nsimp only [colimit.ι_desc, Cofan.mk_ι_app, Category.assoc, ← f.naturality, evaluationLeftAdjoint_obj_map,\n  colimit.ι_desc_assoc, Discrete.functor_obj, Cofan.mk_pt, Discrete.natTrans_app, Category.id_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nd : D\nF : C ⥤ D\nf : d ⟶ ((evaluation C D).obj c).obj F\n⊢ (fun f => Sigma.ι (fun x => d) (𝟙 c) ≫ NatTrans.app f c)\n      ((fun f => NatTrans.mk fun e => Sigma.desc fun h => f ≫ F.map h) f) =\n    f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nc : C\nd : D\nF : C ⥤ D\nf : d ⟶ ((evaluation C D).obj c).obj F\n⊢ (Sigma.ι (fun x => d) (𝟙 c) ≫ Sigma.desc fun h => f ≫ F.map h) = f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nF G : C ⥤ D\nη : F ⟶ G\n⊢ Mono η ↔ ∀ (c : C), Mono (app η c)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nF G : C ⥤ D\nη : F ⟶ G\n⊢ Mono η → ∀ (c : C), Mono (app η c)\n[PROOFSTEP]\nintro h c\n[GOAL]\ncase mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nF G : C ⥤ D\nη : F ⟶ G\nh : Mono η\nc : C\n⊢ Mono (app η c)\n[PROOFSTEP]\nexact (inferInstance : Mono (((evaluation _ _).obj c).map η))\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nF G : C ⥤ D\nη : F ⟶ G\n⊢ (∀ (c : C), Mono (app η c)) → Mono η\n[PROOFSTEP]\nintro _\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasCoproductsOfShape (a ⟶ b) D\nF G : C ⥤ D\nη : F ⟶ G\na✝ : ∀ (c : C), Mono (app η c)\n⊢ Mono η\n[PROOFSTEP]\napply NatTrans.mono_of_mono_app\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nX✝ Y✝ : D\nf : X✝ ⟶ Y✝\n⊢ ∀ ⦃X Y : C⦄ (f_1 : X ⟶ Y),\n    ((fun d =>\n                Functor.mk\n                  { obj := fun t => ∏ fun x => d, map := fun {X Y} f => Pi.lift fun g => Pi.π (fun x => d) (f ≫ g) })\n              X✝).map\n          f_1 ≫\n        (fun t => Pi.lift fun g => Pi.π (fun x => X✝) g ≫ f) Y =\n      (fun t => Pi.lift fun g => Pi.π (fun x => X✝) g ≫ f) X ≫\n        ((fun d =>\n                Functor.mk\n                  { obj := fun t => ∏ fun x => d, map := fun {X Y} f => Pi.lift fun g => Pi.π (fun x => d) (f ≫ g) })\n              Y✝).map\n          f_1\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nX✝¹ Y✝¹ : D\nf : X✝¹ ⟶ Y✝¹\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\n⊢ ((fun d =>\n              Functor.mk\n                { obj := fun t => ∏ fun x => d, map := fun {X Y} f => Pi.lift fun g => Pi.π (fun x => d) (f ≫ g) })\n            X✝¹).map\n        f✝ ≫\n      (fun t => Pi.lift fun g => Pi.π (fun x => X✝¹) g ≫ f) Y✝ =\n    (fun t => Pi.lift fun g => Pi.π (fun x => X✝¹) g ≫ f) X✝ ≫\n      ((fun d =>\n              Functor.mk\n                { obj := fun t => ∏ fun x => d, map := fun {X Y} f => Pi.lift fun g => Pi.π (fun x => d) (f ≫ g) })\n            Y✝¹).map\n        f✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nX✝¹ Y✝¹ : D\nf : X✝¹ ⟶ Y✝¹\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\n⊢ ((Pi.lift fun g => Pi.π (fun x => X✝¹) (f✝ ≫ g)) ≫ Pi.lift fun g => Pi.π (fun x => X✝¹) g ≫ f) =\n    (Pi.lift fun g => Pi.π (fun x => X✝¹) g ≫ f) ≫ Pi.lift fun g => Pi.π (fun x => Y✝¹) (f✝ ≫ g)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nX✝¹ Y✝¹ : D\nf : X✝¹ ⟶ Y✝¹\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\nb✝ : Y✝ ⟶ c\n⊢ ((Pi.lift fun g => Pi.π (fun x => X✝¹) (f✝ ≫ g)) ≫ Pi.lift fun g => Pi.π (fun x => X✝¹) g ≫ f) ≫\n      Pi.π (fun x => Y✝¹) b✝ =\n    ((Pi.lift fun g => Pi.π (fun x => X✝¹) g ≫ f) ≫ Pi.lift fun g => Pi.π (fun x => Y✝¹) (f✝ ≫ g)) ≫\n      Pi.π (fun x => Y✝¹) b✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nF : C ⥤ D\nd : D\nf : ((evaluation C D).obj c).obj F ⟶ d\n⊢ ∀ ⦃X Y : C⦄ (f_1 : X ⟶ Y),\n    F.map f_1 ≫ (fun t => Pi.lift fun g => F.map g ≫ f) Y =\n      (fun t => Pi.lift fun g => F.map g ≫ f) X ≫ ((evaluationRightAdjoint D c).obj d).map f_1\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nF : C ⥤ D\nd : D\nf : ((evaluation C D).obj c).obj F ⟶ d\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\n⊢ F.map f✝ ≫ (fun t => Pi.lift fun g => F.map g ≫ f) Y✝ =\n    (fun t => Pi.lift fun g => F.map g ≫ f) X✝ ≫ ((evaluationRightAdjoint D c).obj d).map f✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nF : C ⥤ D\nd : D\nf : ((evaluation C D).obj c).obj F ⟶ d\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\n⊢ (F.map f✝ ≫ Pi.lift fun g => F.map g ≫ f) =\n    (Pi.lift fun g => F.map g ≫ f) ≫ Pi.lift fun g => Pi.π (fun x => d) (f✝ ≫ g)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nF : C ⥤ D\nd : D\nf : ((evaluation C D).obj c).obj F ⟶ d\nX✝ Y✝ : C\nf✝ : X✝ ⟶ Y✝\nb✝ : Y✝ ⟶ c\n⊢ (F.map f✝ ≫ Pi.lift fun g => F.map g ≫ f) ≫ Pi.π (fun x => d) b✝ =\n    ((Pi.lift fun g => F.map g ≫ f) ≫ Pi.lift fun g => Pi.π (fun x => d) (f✝ ≫ g)) ≫ Pi.π (fun x => d) b✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nF : C ⥤ D\nd : D\nf : ((evaluation C D).obj c).obj F ⟶ d\n⊢ (fun f => NatTrans.app f c ≫ Pi.π (fun x => d) (𝟙 c))\n      ((fun f => NatTrans.mk fun t => Pi.lift fun g => F.map g ≫ f) f) =\n    f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nF : C ⥤ D\nd : D\nf : ((evaluation C D).obj c).obj F ⟶ d\n⊢ (Pi.lift fun g => F.map g ≫ f) ≫ Pi.π (fun x => d) (𝟙 c) = f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nF : C ⥤ D\nd : D\n⊢ Function.RightInverse (fun f => NatTrans.app f c ≫ Pi.π (fun x => d) (𝟙 c)) fun f =>\n    NatTrans.mk fun t => Pi.lift fun g => F.map g ≫ f\n[PROOFSTEP]\nintro f\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nF : C ⥤ D\nd : D\nf : F ⟶ (evaluationRightAdjoint D c).obj d\n⊢ (fun f => NatTrans.mk fun t => Pi.lift fun g => F.map g ≫ f)\n      ((fun f => NatTrans.app f c ≫ Pi.π (fun x => d) (𝟙 c)) f) =\n    f\n[PROOFSTEP]\next x\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nF : C ⥤ D\nd : D\nf : F ⟶ (evaluationRightAdjoint D c).obj d\nx : C\n⊢ NatTrans.app\n      ((fun f => NatTrans.mk fun t => Pi.lift fun g => F.map g ≫ f)\n        ((fun f => NatTrans.app f c ≫ Pi.π (fun x => d) (𝟙 c)) f))\n      x =\n    NatTrans.app f x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nF : C ⥤ D\nd : D\nf : F ⟶ (evaluationRightAdjoint D c).obj d\nx : C\n⊢ (Pi.lift fun g => F.map g ≫ NatTrans.app f c ≫ Pi.π (fun x => d) (𝟙 c)) = NatTrans.app f x\n[PROOFSTEP]\next g\n[GOAL]\ncase w.h.h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nc : C\nF : C ⥤ D\nd : D\nf : F ⟶ (evaluationRightAdjoint D c).obj d\nx : C\ng : x ⟶ c\n⊢ (Pi.lift fun g => F.map g ≫ NatTrans.app f c ≫ Pi.π (fun x => d) (𝟙 c)) ≫ Pi.π (fun x => d) g =\n    NatTrans.app f x ≫ Pi.π (fun x => d) g\n[PROOFSTEP]\nsimp only [Discrete.functor_obj, NatTrans.naturality_assoc, evaluationRightAdjoint_obj_obj,\n  evaluationRightAdjoint_obj_map, limit.lift_π, Fan.mk_pt, Fan.mk_π_app, Discrete.natTrans_app, Category.comp_id]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nF G : C ⥤ D\nη : F ⟶ G\n⊢ Epi η ↔ ∀ (c : C), Epi (app η c)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nF G : C ⥤ D\nη : F ⟶ G\n⊢ Epi η → ∀ (c : C), Epi (app η c)\n[PROOFSTEP]\nintro h c\n[GOAL]\ncase mp\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nF G : C ⥤ D\nη : F ⟶ G\nh : Epi η\nc : C\n⊢ Epi (app η c)\n[PROOFSTEP]\nexact (inferInstance : Epi (((evaluation _ _).obj c).map η))\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nF G : C ⥤ D\nη : F ⟶ G\n⊢ (∀ (c : C), Epi (app η c)) → Epi η\n[PROOFSTEP]\nintros\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D\nF G : C ⥤ D\nη : F ⟶ G\na✝ : ∀ (c : C), Epi (app η c)\n⊢ Epi η\n[PROOFSTEP]\napply NatTrans.epi_of_epi_app\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Adjunction.Evaluation", "llama_tokens": 8519, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6859494550081926, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.35636536765817395}}
{"text": "[GOAL]\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\n⊢ fst f g ≫ f = snd f g ≫ g\n[PROOFSTEP]\next ⟨_, h⟩\n[GOAL]\ncase w.mk\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\nval✝ : ↑X.toCompHaus.toTop × ↑Y.toCompHaus.toTop\nh : val✝ ∈ {xy | ↑f xy.fst = ↑g xy.snd}\n⊢ ↑(fst f g ≫ f) { val := val✝, property := h } = ↑(snd f g ≫ g) { val := val✝, property := h }\n[PROOFSTEP]\nexact h\n[GOAL]\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\nZ : Profinite\na : Z ⟶ X\nb : Z ⟶ Y\nw : a ≫ f = b ≫ g\nz : ↑Z.toCompHaus.toTop\n⊢ (↑a z, ↑b z) ∈ {xy | ↑f xy.fst = ↑g xy.snd}\n[PROOFSTEP]\napply_fun (· z) at w \n[GOAL]\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\nZ : Profinite\na : Z ⟶ X\nb : Z ⟶ Y\nz : ↑Z.toCompHaus.toTop\nw : ↑(a ≫ f) z = ↑(b ≫ g) z\n⊢ (↑a z, ↑b z) ∈ {xy | ↑f xy.fst = ↑g xy.snd}\n[PROOFSTEP]\nexact w\n[GOAL]\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\nZ : Profinite\na : Z ⟶ X\nb : Z ⟶ Y\nw : a ≫ f = b ≫ g\n⊢ Continuous fun z => { val := (↑a z, ↑b z), property := (_ : ↑(a ≫ f) z = ↑(b ≫ g) z) }\n[PROOFSTEP]\napply Continuous.subtype_mk\n[GOAL]\ncase h\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\nZ : Profinite\na : Z ⟶ X\nb : Z ⟶ Y\nw : a ≫ f = b ≫ g\n⊢ Continuous fun x => (↑a x, ↑b x)\n[PROOFSTEP]\nrw [continuous_prod_mk]\n[GOAL]\ncase h\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\nZ : Profinite\na : Z ⟶ X\nb : Z ⟶ Y\nw : a ≫ f = b ≫ g\n⊢ (Continuous fun x => ↑a x) ∧ Continuous fun x => ↑b x\n[PROOFSTEP]\nexact ⟨a.continuous, b.continuous⟩\n[GOAL]\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\nZ : Profinite\na b : Z ⟶ pullback f g\nhfst : a ≫ fst f g = b ≫ fst f g\nhsnd : a ≫ snd f g = b ≫ snd f g\n⊢ a = b\n[PROOFSTEP]\next z\n[GOAL]\ncase w\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\nZ : Profinite\na b : Z ⟶ pullback f g\nhfst : a ≫ fst f g = b ≫ fst f g\nhsnd : a ≫ snd f g = b ≫ snd f g\nz : (forget Profinite).obj Z\n⊢ ↑a z = ↑b z\n[PROOFSTEP]\napply_fun (· z) at hfst hsnd \n[GOAL]\ncase w\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\nZ : Profinite\na b : Z ⟶ pullback f g\nz : (forget Profinite).obj Z\nhfst : ↑(a ≫ fst f g) z = ↑(b ≫ fst f g) z\nhsnd : ↑(a ≫ snd f g) z = ↑(b ≫ snd f g) z\n⊢ ↑a z = ↑b z\n[PROOFSTEP]\napply Subtype.ext\n[GOAL]\ncase w.a\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\nZ : Profinite\na b : Z ⟶ pullback f g\nz : (forget Profinite).obj Z\nhfst : ↑(a ≫ fst f g) z = ↑(b ≫ fst f g) z\nhsnd : ↑(a ≫ snd f g) z = ↑(b ≫ snd f g) z\n⊢ ↑(↑a z) = ↑(↑b z)\n[PROOFSTEP]\napply Prod.ext\n[GOAL]\ncase w.a.h₁\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\nZ : Profinite\na b : Z ⟶ pullback f g\nz : (forget Profinite).obj Z\nhfst : ↑(a ≫ fst f g) z = ↑(b ≫ fst f g) z\nhsnd : ↑(a ≫ snd f g) z = ↑(b ≫ snd f g) z\n⊢ (↑(↑a z)).fst = (↑(↑b z)).fst\n[PROOFSTEP]\nexact hfst\n[GOAL]\ncase w.a.h₂\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\nZ : Profinite\na b : Z ⟶ pullback f g\nz : (forget Profinite).obj Z\nhfst : ↑(a ≫ fst f g) z = ↑(b ≫ fst f g) z\nhsnd : ↑(a ≫ snd f g) z = ↑(b ≫ snd f g) z\n⊢ (↑(↑a z)).snd = (↑(↑b z)).snd\n[PROOFSTEP]\nexact hsnd\n[GOAL]\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\n⊢ pullback.fst f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.fst\n[PROOFSTEP]\ndsimp [pullbackIsoPullback]\n[GOAL]\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\n⊢ pullback.fst f g =\n    (Limits.IsLimit.conePointUniqueUpToIso (pullback.isLimit f g) (Limits.limit.isLimit (Limits.cospan f g))).hom ≫\n      Limits.pullback.fst\n[PROOFSTEP]\nsimp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_π]\n[GOAL]\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\n⊢ pullback.snd f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.snd\n[PROOFSTEP]\ndsimp [pullbackIsoPullback]\n[GOAL]\nX Y B : Profinite\nf : X ⟶ B\ng : Y ⟶ B\n⊢ pullback.snd f g =\n    (Limits.IsLimit.conePointUniqueUpToIso (pullback.isLimit f g) (Limits.limit.isLimit (Limits.cospan f g))).hom ≫\n      Limits.pullback.snd\n[PROOFSTEP]\nsimp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_π]\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\nB : Profinite\ne : (a : α) → X a ⟶ B\n⊢ Continuous fun x =>\n    match x with\n    | { fst := a, snd := x } => ↑(e a) x\n[PROOFSTEP]\napply continuous_sigma\n[GOAL]\ncase hf\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\nB : Profinite\ne : (a : α) → X a ⟶ B\n⊢ ∀ (i : α),\n    Continuous fun a =>\n      match { fst := i, snd := a } with\n      | { fst := a, snd := x } => ↑(e a) x\n[PROOFSTEP]\nintro a\n[GOAL]\ncase hf\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\nB : Profinite\ne : (a : α) → X a ⟶ B\na : α\n⊢ Continuous fun a_1 =>\n    match { fst := a, snd := a_1 } with\n    | { fst := a, snd := x } => ↑(e a) x\n[PROOFSTEP]\nexact (e a).continuous\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\nB : Profinite\nf g : finiteCoproduct X ⟶ B\nh : ∀ (a : α), ι X a ≫ f = ι X a ≫ g\n⊢ f = g\n[PROOFSTEP]\next ⟨a, x⟩\n[GOAL]\ncase w.mk\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\nB : Profinite\nf g : finiteCoproduct X ⟶ B\nh : ∀ (a : α), ι X a ≫ f = ι X a ≫ g\na : α\nx : ↑(X a).toCompHaus.toTop\n⊢ ↑f { fst := a, snd := x } = ↑g { fst := a, snd := x }\n[PROOFSTEP]\nspecialize h a\n[GOAL]\ncase w.mk\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\nB : Profinite\nf g : finiteCoproduct X ⟶ B\na : α\nx : ↑(X a).toCompHaus.toTop\nh : ι X a ≫ f = ι X a ≫ g\n⊢ ↑f { fst := a, snd := x } = ↑g { fst := a, snd := x }\n[PROOFSTEP]\napply_fun (· x) at h \n[GOAL]\ncase w.mk\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\nB : Profinite\nf g : finiteCoproduct X ⟶ B\na : α\nx : ↑(X a).toCompHaus.toTop\nh : ↑(ι X a ≫ f) x = ↑(ι X a ≫ g) x\n⊢ ↑f { fst := a, snd := x } = ↑g { fst := a, snd := x }\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\ns : Limits.Cocone (Discrete.functor X)\nm : (cocone X).pt ⟶ s.pt\nhm : ∀ (j : Discrete α), NatTrans.app (cocone X).ι j ≫ m = NatTrans.app s.ι j\na : α\n⊢ ι (fun a => X a) a ≫ m = ι (fun a => X a) a ≫ (fun s => desc (fun a => X a) fun a => NatTrans.app s.ι { as := a }) s\n[PROOFSTEP]\nspecialize hm ⟨a⟩\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\ns : Limits.Cocone (Discrete.functor X)\nm : (cocone X).pt ⟶ s.pt\na : α\nhm : NatTrans.app (cocone X).ι { as := a } ≫ m = NatTrans.app s.ι { as := a }\n⊢ ι (fun a => X a) a ≫ m = ι (fun a => X a) a ≫ (fun s => desc (fun a => X a) fun a => NatTrans.app s.ι { as := a }) s\n[PROOFSTEP]\next t\n[GOAL]\ncase w\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\ns : Limits.Cocone (Discrete.functor X)\nm : (cocone X).pt ⟶ s.pt\na : α\nhm : NatTrans.app (cocone X).ι { as := a } ≫ m = NatTrans.app s.ι { as := a }\nt : (forget Profinite).obj (X a)\n⊢ ↑(ι (fun a => X a) a ≫ m) t =\n    ↑(ι (fun a => X a) a ≫ (fun s => desc (fun a => X a) fun a => NatTrans.app s.ι { as := a }) s) t\n[PROOFSTEP]\napply_fun (· t) at hm \n[GOAL]\ncase w\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\ns : Limits.Cocone (Discrete.functor X)\nm : (cocone X).pt ⟶ s.pt\na : α\nt : (forget Profinite).obj (X a)\nhm : ↑(NatTrans.app (cocone X).ι { as := a } ≫ m) t = ↑(NatTrans.app s.ι { as := a }) t\n⊢ ↑(ι (fun a => X a) a ≫ m) t =\n    ↑(ι (fun a => X a) a ≫ (fun s => desc (fun a => X a) fun a => NatTrans.app s.ι { as := a }) s) t\n[PROOFSTEP]\nexact hm\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\na : α\n⊢ Limits.Sigma.ι X a ≫ (coproductIsoCoproduct X).inv = finiteCoproduct.ι X a\n[PROOFSTEP]\nsimp only [coproductIsoCoproduct, Limits.colimit.comp_coconePointUniqueUpToIso_inv, finiteCoproduct.cocone_pt,\n  finiteCoproduct.cocone_ι, Discrete.natTrans_app]\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\na : α\n⊢ Function.Injective ↑(ι X a)\n[PROOFSTEP]\nintro x y hxy\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\na : α\nx y : (forget Profinite).obj (X a)\nhxy : ↑(ι X a) x = ↑(ι X a) y\n⊢ x = y\n[PROOFSTEP]\nexact eq_of_heq (Sigma.ext_iff.mp hxy).2\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\nB : Profinite\nπ : (a : α) → X a ⟶ B\na : α\n⊢ ∀ (x : (forget Profinite).obj (X a)), ↑(desc X π) (↑(ι X a) x) = ↑(π a) x\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\nB : Profinite\nπ : (a : α) → X a ⟶ B\na : α\nx : (forget Profinite).obj (X a)\n⊢ ↑(desc X π) (↑(ι X a) x) = ↑(π a) x\n[PROOFSTEP]\nchange (ι X a ≫ desc X π) _ = _\n[GOAL]\nα : Type\ninst✝ : Fintype α\nX : α → Profinite\nB : Profinite\nπ : (a : α) → X a ⟶ B\na : α\nx : (forget Profinite).obj (X a)\n⊢ ↑(ι X a ≫ desc X π) x = ↑(π a) x\n[PROOFSTEP]\nsimp only [ι_desc]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.Profinite.Limits", "llama_tokens": 4201, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583250334527, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.35613343110171636}}
{"text": "[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nnth_fr_eq_zero : ifp_n.fr = 0\n⊢ IntFractPair.stream v (n + 1) = none\n[PROOFSTEP]\ncases' ifp_n with _ fr\n[GOAL]\ncase mk\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nb✝ : ℤ\nfr : K\nstream_nth_eq : IntFractPair.stream v n = some { b := b✝, fr := fr }\nnth_fr_eq_zero : { b := b✝, fr := fr }.fr = 0\n⊢ IntFractPair.stream v (n + 1) = none\n[PROOFSTEP]\nchange fr = 0 at nth_fr_eq_zero \n[GOAL]\ncase mk\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nb✝ : ℤ\nfr : K\nstream_nth_eq : IntFractPair.stream v n = some { b := b✝, fr := fr }\nnth_fr_eq_zero : fr = 0\n⊢ IntFractPair.stream v (n + 1) = none\n[PROOFSTEP]\nsimp [IntFractPair.stream, stream_nth_eq, nth_fr_eq_zero]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\n⊢ IntFractPair.stream v (n + 1) = none ↔\n    IntFractPair.stream v n = none ∨ ∃ ifp, IntFractPair.stream v n = some ifp ∧ ifp.fr = 0\n[PROOFSTEP]\nrw [IntFractPair.stream]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\n⊢ (Option.bind (IntFractPair.stream v n) fun ap_n => if ap_n.fr = 0 then none else some (IntFractPair.of ap_n.fr⁻¹)) =\n      none ↔\n    IntFractPair.stream v n = none ∨ ∃ ifp, IntFractPair.stream v n = some ifp ∧ ifp.fr = 0\n[PROOFSTEP]\ncases IntFractPair.stream v n\n[GOAL]\ncase none\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\n⊢ (Option.bind none fun ap_n => if ap_n.fr = 0 then none else some (IntFractPair.of ap_n.fr⁻¹)) = none ↔\n    none = none ∨ ∃ ifp, none = some ifp ∧ ifp.fr = 0\n[PROOFSTEP]\nsimp [imp_false]\n[GOAL]\ncase some\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nval✝ : IntFractPair K\n⊢ (Option.bind (some val✝) fun ap_n => if ap_n.fr = 0 then none else some (IntFractPair.of ap_n.fr⁻¹)) = none ↔\n    some val✝ = none ∨ ∃ ifp, some val✝ = some ifp ∧ ifp.fr = 0\n[PROOFSTEP]\nsimp [imp_false]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nifp_succ_n : IntFractPair K\n⊢ IntFractPair.stream v (n + 1) = some ifp_succ_n ↔\n    ∃ ifp_n, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr ≠ 0 ∧ IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n\n[PROOFSTEP]\nsimp [IntFractPair.stream, ite_eq_iff]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\na : ℤ\nn : ℕ\n⊢ IntFractPair.stream (↑a) (n + 1) = none\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\na : ℤ\n⊢ IntFractPair.stream (↑a) (Nat.zero + 1) = none\n[PROOFSTEP]\nrefine' IntFractPair.stream_eq_none_of_fr_eq_zero (IntFractPair.stream_zero (a : K)) _\n[GOAL]\ncase zero\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\na : ℤ\n⊢ (IntFractPair.of ↑a).fr = 0\n[PROOFSTEP]\nsimp only [IntFractPair.of, Int.fract_intCast]\n[GOAL]\ncase succ\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\na : ℤ\nn : ℕ\nih : IntFractPair.stream (↑a) (n + 1) = none\n⊢ IntFractPair.stream (↑a) (Nat.succ n + 1) = none\n[PROOFSTEP]\nexact IntFractPair.succ_nth_stream_eq_none_iff.mpr (Or.inl ih)\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nifp_succ_n : IntFractPair K\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\nsucc_nth_fr_eq_zero : ifp_succ_n.fr = 0\n⊢ ∃ ifp_n, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr⁻¹ = ↑⌊ifp_n.fr⁻¹⌋\n[PROOFSTEP]\nrcases succ_nth_stream_eq_some_iff.mp stream_succ_nth_eq with ⟨ifp_n, seq_nth_eq, _, rfl⟩\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nifp_n : IntFractPair K\nseq_nth_eq : IntFractPair.stream v n = some ifp_n\nleft✝ : ifp_n.fr ≠ 0\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)\nsucc_nth_fr_eq_zero : (IntFractPair.of ifp_n.fr⁻¹).fr = 0\n⊢ ∃ ifp_n, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr⁻¹ = ↑⌊ifp_n.fr⁻¹⌋\n[PROOFSTEP]\nrefine' ⟨ifp_n, seq_nth_eq, _⟩\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nifp_n : IntFractPair K\nseq_nth_eq : IntFractPair.stream v n = some ifp_n\nleft✝ : ifp_n.fr ≠ 0\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)\nsucc_nth_fr_eq_zero : (IntFractPair.of ifp_n.fr⁻¹).fr = 0\n⊢ ifp_n.fr⁻¹ = ↑⌊ifp_n.fr⁻¹⌋\n[PROOFSTEP]\nsimpa only [IntFractPair.of, Int.fract, sub_eq_zero] using succ_nth_fr_eq_zero\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\nh : Int.fract v ≠ 0\nn : ℕ\n⊢ IntFractPair.stream v (n + 1) = IntFractPair.stream (Int.fract v)⁻¹ n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nh : Int.fract v ≠ 0\n⊢ IntFractPair.stream v (Nat.zero + 1) = IntFractPair.stream (Int.fract v)⁻¹ Nat.zero\n[PROOFSTEP]\nhave H : (IntFractPair.of v).fr = Int.fract v := rfl\n[GOAL]\ncase zero\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nh : Int.fract v ≠ 0\nH : (IntFractPair.of v).fr = Int.fract v\n⊢ IntFractPair.stream v (Nat.zero + 1) = IntFractPair.stream (Int.fract v)⁻¹ Nat.zero\n[PROOFSTEP]\nrw [stream_zero, stream_succ_of_some (stream_zero v) (ne_of_eq_of_ne H h), H]\n[GOAL]\ncase succ\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\nh : Int.fract v ≠ 0\nn : ℕ\nih : IntFractPair.stream v (n + 1) = IntFractPair.stream (Int.fract v)⁻¹ n\n⊢ IntFractPair.stream v (Nat.succ n + 1) = IntFractPair.stream (Int.fract v)⁻¹ (Nat.succ n)\n[PROOFSTEP]\ncases' eq_or_ne (IntFractPair.stream (Int.fract v)⁻¹ n) none with hnone hsome\n[GOAL]\ncase succ.inl\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\nh : Int.fract v ≠ 0\nn : ℕ\nih : IntFractPair.stream v (n + 1) = IntFractPair.stream (Int.fract v)⁻¹ n\nhnone : IntFractPair.stream (Int.fract v)⁻¹ n = none\n⊢ IntFractPair.stream v (Nat.succ n + 1) = IntFractPair.stream (Int.fract v)⁻¹ (Nat.succ n)\n[PROOFSTEP]\nrw [hnone] at ih \n[GOAL]\ncase succ.inl\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\nh : Int.fract v ≠ 0\nn : ℕ\nih : IntFractPair.stream v (n + 1) = none\nhnone : IntFractPair.stream (Int.fract v)⁻¹ n = none\n⊢ IntFractPair.stream v (Nat.succ n + 1) = IntFractPair.stream (Int.fract v)⁻¹ (Nat.succ n)\n[PROOFSTEP]\nrw [succ_nth_stream_eq_none_iff.mpr (Or.inl hnone), succ_nth_stream_eq_none_iff.mpr (Or.inl ih)]\n[GOAL]\ncase succ.inr\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\nh : Int.fract v ≠ 0\nn : ℕ\nih : IntFractPair.stream v (n + 1) = IntFractPair.stream (Int.fract v)⁻¹ n\nhsome : IntFractPair.stream (Int.fract v)⁻¹ n ≠ none\n⊢ IntFractPair.stream v (Nat.succ n + 1) = IntFractPair.stream (Int.fract v)⁻¹ (Nat.succ n)\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := Option.ne_none_iff_exists'.mp hsome\n[GOAL]\ncase succ.inr.intro\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\nh : Int.fract v ≠ 0\nn : ℕ\nih : IntFractPair.stream v (n + 1) = IntFractPair.stream (Int.fract v)⁻¹ n\nhsome : IntFractPair.stream (Int.fract v)⁻¹ n ≠ none\np : IntFractPair K\nhp : IntFractPair.stream (Int.fract v)⁻¹ n = some p\n⊢ IntFractPair.stream v (Nat.succ n + 1) = IntFractPair.stream (Int.fract v)⁻¹ (Nat.succ n)\n[PROOFSTEP]\nrw [hp] at ih \n[GOAL]\ncase succ.inr.intro\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\nh : Int.fract v ≠ 0\nn : ℕ\nhsome : IntFractPair.stream (Int.fract v)⁻¹ n ≠ none\np : IntFractPair K\nih : IntFractPair.stream v (n + 1) = some p\nhp : IntFractPair.stream (Int.fract v)⁻¹ n = some p\n⊢ IntFractPair.stream v (Nat.succ n + 1) = IntFractPair.stream (Int.fract v)⁻¹ (Nat.succ n)\n[PROOFSTEP]\ncases' eq_or_ne p.fr 0 with hz hnz\n[GOAL]\ncase succ.inr.intro.inl\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\nh : Int.fract v ≠ 0\nn : ℕ\nhsome : IntFractPair.stream (Int.fract v)⁻¹ n ≠ none\np : IntFractPair K\nih : IntFractPair.stream v (n + 1) = some p\nhp : IntFractPair.stream (Int.fract v)⁻¹ n = some p\nhz : p.fr = 0\n⊢ IntFractPair.stream v (Nat.succ n + 1) = IntFractPair.stream (Int.fract v)⁻¹ (Nat.succ n)\n[PROOFSTEP]\nrw [stream_eq_none_of_fr_eq_zero hp hz, stream_eq_none_of_fr_eq_zero ih hz]\n[GOAL]\ncase succ.inr.intro.inr\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\nh : Int.fract v ≠ 0\nn : ℕ\nhsome : IntFractPair.stream (Int.fract v)⁻¹ n ≠ none\np : IntFractPair K\nih : IntFractPair.stream v (n + 1) = some p\nhp : IntFractPair.stream (Int.fract v)⁻¹ n = some p\nhnz : p.fr ≠ 0\n⊢ IntFractPair.stream v (Nat.succ n + 1) = IntFractPair.stream (Int.fract v)⁻¹ (Nat.succ n)\n[PROOFSTEP]\nrw [stream_succ_of_some hp hnz, stream_succ_of_some ih hnz]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\n⊢ (of v).h = ↑(IntFractPair.seq1 v).fst.b\n[PROOFSTEP]\ncases aux_seq_eq : IntFractPair.seq1 v\n[GOAL]\ncase mk\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nfst✝ : IntFractPair K\nsnd✝ : Stream'.Seq (IntFractPair K)\naux_seq_eq : IntFractPair.seq1 v = (fst✝, snd✝)\n⊢ (of v).h = ↑(fst✝, snd✝).fst.b\n[PROOFSTEP]\nsimp [of, aux_seq_eq]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\n⊢ (of v).h = ↑⌊v⌋\n[PROOFSTEP]\nsimp [of_h_eq_intFractPair_seq1_fst_b, IntFractPair.of]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\n⊢ TerminatedAt (of v) n ↔ IntFractPair.stream v (n + 1) = none\n[PROOFSTEP]\nrw [of_terminatedAt_iff_intFractPair_seq1_terminatedAt, Stream'.Seq.TerminatedAt,\n  IntFractPair.get?_seq1_eq_succ_get?_stream]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\ngp_n : Pair K\ns_nth_eq : Stream'.Seq.get? (of v).s n = some gp_n\n⊢ ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ ↑ifp.b = gp_n.b\n[PROOFSTEP]\nobtain ⟨ifp, stream_succ_nth_eq, gp_n_eq⟩ :\n  ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ Pair.mk 1 (ifp.b : K) = gp_n :=\n  by\n  unfold of IntFractPair.seq1 at s_nth_eq \n  simpa [Stream'.Seq.get?_tail, Stream'.Seq.map_get?] using s_nth_eq\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\ngp_n : Pair K\ns_nth_eq : Stream'.Seq.get? (of v).s n = some gp_n\n⊢ ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ { a := 1, b := ↑ifp.b } = gp_n\n[PROOFSTEP]\nunfold of IntFractPair.seq1 at s_nth_eq \n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\ngp_n : Pair K\ns_nth_eq :\n  Stream'.Seq.get?\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 := ↑h.b, s := Stream'.Seq.map (fun p => { a := 1, b := ↑p.b }) s }).s\n      n =\n    some gp_n\n⊢ ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ { a := 1, b := ↑ifp.b } = gp_n\n[PROOFSTEP]\nsimpa [Stream'.Seq.get?_tail, Stream'.Seq.map_get?] using s_nth_eq\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\ngp_n : Pair K\ns_nth_eq : Stream'.Seq.get? (of v).s n = some gp_n\nifp : IntFractPair K\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp\ngp_n_eq : { a := 1, b := ↑ifp.b } = gp_n\n⊢ ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ ↑ifp.b = gp_n.b\n[PROOFSTEP]\ncases gp_n_eq\n[GOAL]\ncase intro.intro.refl\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nifp : IntFractPair K\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp\ns_nth_eq : Stream'.Seq.get? (of v).s n = some { a := 1, b := ↑ifp.b }\n⊢ ∃ ifp_1, IntFractPair.stream v (n + 1) = some ifp_1 ∧ ↑ifp_1.b = { a := 1, b := ↑ifp.b }.b\n[PROOFSTEP]\nsimp_all only [Option.some.injEq, exists_eq_left']\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nifp_succ_n : IntFractPair K\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\n⊢ Stream'.Seq.get? (of v).s n = some { a := 1, b := ↑ifp_succ_n.b }\n[PROOFSTEP]\nunfold of IntFractPair.seq1\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nifp_succ_n : IntFractPair K\nstream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n\n⊢ Stream'.Seq.get?\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 := ↑h.b, s := Stream'.Seq.map (fun p => { a := 1, b := ↑p.b }) s }).s\n      n =\n    some { a := 1, b := ↑ifp_succ_n.b }\n[PROOFSTEP]\nsimp [Stream'.Seq.map_tail, Stream'.Seq.get?_tail, Stream'.Seq.map_get?, stream_succ_nth_eq]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nifp_n : IntFractPair K\nstream_nth_eq : IntFractPair.stream v n = some ifp_n\nnth_fr_ne_zero : ifp_n.fr ≠ 0\n⊢ IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹)\n[PROOFSTEP]\ncases ifp_n\n[GOAL]\ncase mk\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nb✝ : ℤ\nfr✝ : K\nstream_nth_eq : IntFractPair.stream v n = some { b := b✝, fr := fr✝ }\nnth_fr_ne_zero : { b := b✝, fr := fr✝ }.fr ≠ 0\n⊢ IntFractPair.stream v (n + 1) = some (IntFractPair.of { b := b✝, fr := fr✝ }.fr⁻¹)\n[PROOFSTEP]\nsimp [IntFractPair.stream, stream_nth_eq, nth_fr_ne_zero]\n[GOAL]\ncase mk\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nb✝ : ℤ\nfr✝ : K\nstream_nth_eq : IntFractPair.stream v n = some { b := b✝, fr := fr✝ }\nnth_fr_ne_zero : { b := b✝, fr := fr✝ }.fr ≠ 0\n⊢ fr✝ = 0 → False\n[PROOFSTEP]\nintro\n[GOAL]\ncase mk\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nb✝ : ℤ\nfr✝ : K\nstream_nth_eq : IntFractPair.stream v n = some { b := b✝, fr := fr✝ }\nnth_fr_ne_zero : { b := b✝, fr := fr✝ }.fr ≠ 0\na✝ : fr✝ = 0\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv✝ : K\nn : ℕ\nv : K\n⊢ Stream'.Seq.get? (of v).s 0 = Option.bind (IntFractPair.stream v 1) (some ∘ fun p => { a := 1, b := ↑p.b })\n[PROOFSTEP]\nrw [of, IntFractPair.seq1]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv✝ : K\nn : ℕ\nv : K\n⊢ Stream'.Seq.get?\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 := ↑h.b, s := Stream'.Seq.map (fun p => { a := 1, b := ↑p.b }) s }).s\n      0 =\n    Option.bind (IntFractPair.stream v 1) (some ∘ fun p => { a := 1, b := ↑p.b })\n[PROOFSTEP]\nsimp only [of, Stream'.Seq.map_tail, Stream'.Seq.map, Stream'.Seq.tail, Stream'.Seq.head, Stream'.Seq.get?, Stream'.map]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv✝ : K\nn : ℕ\nv : K\n⊢ Option.map (fun p => { a := 1, b := ↑p.b }) (Stream'.nth (Stream'.tail (IntFractPair.stream v)) 0) =\n    Option.bind (IntFractPair.stream v 1) (some ∘ fun p => { a := 1, b := ↑p.b })\n[PROOFSTEP]\nrw [← Stream'.nth_succ, Stream'.nth, Option.map]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv✝ : K\nn : ℕ\nv : K\n⊢ (match IntFractPair.stream v (Nat.succ 0) with\n    | some x => some { a := 1, b := ↑x.b }\n    | none => none) =\n    Option.bind (IntFractPair.stream v 1) (some ∘ fun p => { a := 1, b := ↑p.b })\n[PROOFSTEP]\nsplit\n[GOAL]\ncase h_1\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv✝ : K\nn : ℕ\nv : K\nx✝¹ : Option (IntFractPair K)\nx✝ : IntFractPair K\nheq✝ : IntFractPair.stream v (Nat.succ 0) = some x✝\n⊢ some { a := 1, b := ↑x✝.b } = Option.bind (IntFractPair.stream v 1) (some ∘ fun p => { a := 1, b := ↑p.b })\n[PROOFSTEP]\nsimp_all only [Option.some_bind, Option.none_bind, Function.comp_apply]\n[GOAL]\ncase h_2\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv✝ : K\nn : ℕ\nv : K\nx✝ : Option (IntFractPair K)\nheq✝ : IntFractPair.stream v (Nat.succ 0) = none\n⊢ none = Option.bind (IntFractPair.stream v 1) (some ∘ fun p => { a := 1, b := ↑p.b })\n[PROOFSTEP]\nsimp_all only [Option.some_bind, Option.none_bind, Function.comp_apply]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nh : fract v ≠ 0\n⊢ Stream'.Seq.head (of v).s = some { a := 1, b := ↑⌊(fract v)⁻¹⌋ }\n[PROOFSTEP]\nchange (of v).s.get? 0 = _\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nh : fract v ≠ 0\n⊢ Stream'.Seq.get? (of v).s 0 = some { a := 1, b := ↑⌊(fract v)⁻¹⌋ }\n[PROOFSTEP]\nrw [of_s_head_aux, stream_succ_of_some (stream_zero v) h, Option.bind]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nh : fract v ≠ 0\n⊢ (match some (IntFractPair.of (IntFractPair.of v).fr⁻¹), some ∘ fun p => { a := 1, b := ↑p.b } with\n    | none, x => none\n    | some a, b => b a) =\n    some { a := 1, b := ↑⌊(fract v)⁻¹⌋ }\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\na : ℤ\n⊢ ∀ (n : ℕ), Stream'.Seq.get? (of ↑a).s n = none\n[PROOFSTEP]\nintro n\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\na : ℤ\nn : ℕ\n⊢ Stream'.Seq.get? (of ↑a).s n = none\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\na : ℤ\n⊢ Stream'.Seq.get? (of ↑a).s Nat.zero = none\n[PROOFSTEP]\nrw [of_s_head_aux, stream_succ_of_int, Option.bind]\n[GOAL]\ncase succ\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\na : ℤ\nn : ℕ\nih : Stream'.Seq.get? (of ↑a).s n = none\n⊢ Stream'.Seq.get? (of ↑a).s (Nat.succ n) = none\n[PROOFSTEP]\nexact (of (a : K)).s.prop ih\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ n : ℕ\n⊢ Stream'.Seq.get? (of v).s (n + 1) = Stream'.Seq.get? (of (fract v)⁻¹).s n\n[PROOFSTEP]\ncases' eq_or_ne (fract v) 0 with h h\n[GOAL]\ncase inl\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ n : ℕ\nh : fract v = 0\n⊢ Stream'.Seq.get? (of v).s (n + 1) = Stream'.Seq.get? (of (fract v)⁻¹).s n\n[PROOFSTEP]\nobtain ⟨a, rfl⟩ : ∃ a : ℤ, v = a := ⟨⌊v⌋, eq_of_sub_eq_zero h⟩\n[GOAL]\ncase inl.intro\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn✝ n : ℕ\na : ℤ\nh : fract ↑a = 0\n⊢ Stream'.Seq.get? (of ↑a).s (n + 1) = Stream'.Seq.get? (of (fract ↑a)⁻¹).s n\n[PROOFSTEP]\nrw [fract_intCast, inv_zero, of_s_of_int, ← cast_zero, of_s_of_int, Stream'.Seq.get?_nil, Stream'.Seq.get?_nil]\n[GOAL]\ncase inr\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ n : ℕ\nh : fract v ≠ 0\n⊢ Stream'.Seq.get? (of v).s (n + 1) = Stream'.Seq.get? (of (fract v)⁻¹).s n\n[PROOFSTEP]\ncases' eq_or_ne ((of (fract v)⁻¹).s.get? n) none with h₁ h₁\n[GOAL]\ncase inr.inl\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ n : ℕ\nh : fract v ≠ 0\nh₁ : Stream'.Seq.get? (of (fract v)⁻¹).s n = none\n⊢ Stream'.Seq.get? (of v).s (n + 1) = Stream'.Seq.get? (of (fract v)⁻¹).s n\n[PROOFSTEP]\nrwa [h₁, ← terminatedAt_iff_s_none, of_terminatedAt_n_iff_succ_nth_intFractPair_stream_eq_none, stream_succ h, ←\n  of_terminatedAt_n_iff_succ_nth_intFractPair_stream_eq_none, terminatedAt_iff_s_none]\n[GOAL]\ncase inr.inr\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ n : ℕ\nh : fract v ≠ 0\nh₁ : Stream'.Seq.get? (of (fract v)⁻¹).s n ≠ none\n⊢ Stream'.Seq.get? (of v).s (n + 1) = Stream'.Seq.get? (of (fract v)⁻¹).s n\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := Option.ne_none_iff_exists'.mp h₁\n[GOAL]\ncase inr.inr.intro\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ n : ℕ\nh : fract v ≠ 0\nh₁ : Stream'.Seq.get? (of (fract v)⁻¹).s n ≠ none\np : Pair K\nhp : Stream'.Seq.get? (of (fract v)⁻¹).s n = some p\n⊢ Stream'.Seq.get? (of v).s (n + 1) = Stream'.Seq.get? (of (fract v)⁻¹).s n\n[PROOFSTEP]\nobtain ⟨p', hp'₁, _⟩ := exists_succ_get?_stream_of_gcf_of_get?_eq_some hp\n[GOAL]\ncase inr.inr.intro.intro.intro\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ n : ℕ\nh : fract v ≠ 0\nh₁ : Stream'.Seq.get? (of (fract v)⁻¹).s n ≠ none\np : Pair K\nhp : Stream'.Seq.get? (of (fract v)⁻¹).s n = some p\np' : IntFractPair K\nhp'₁ : IntFractPair.stream (fract v)⁻¹ (n + 1) = some p'\nright✝ : ↑p'.b = p.b\n⊢ Stream'.Seq.get? (of v).s (n + 1) = Stream'.Seq.get? (of (fract v)⁻¹).s n\n[PROOFSTEP]\nhave Hp := get?_of_eq_some_of_succ_get?_intFractPair_stream hp'₁\n[GOAL]\ncase inr.inr.intro.intro.intro\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ n : ℕ\nh : fract v ≠ 0\nh₁ : Stream'.Seq.get? (of (fract v)⁻¹).s n ≠ none\np : Pair K\nhp : Stream'.Seq.get? (of (fract v)⁻¹).s n = some p\np' : IntFractPair K\nhp'₁ : IntFractPair.stream (fract v)⁻¹ (n + 1) = some p'\nright✝ : ↑p'.b = p.b\nHp : Stream'.Seq.get? (of (fract v)⁻¹).s n = some { a := 1, b := ↑p'.b }\n⊢ Stream'.Seq.get? (of v).s (n + 1) = Stream'.Seq.get? (of (fract v)⁻¹).s n\n[PROOFSTEP]\nrw [← stream_succ h] at hp'₁ \n[GOAL]\ncase inr.inr.intro.intro.intro\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ n : ℕ\nh : fract v ≠ 0\nh₁ : Stream'.Seq.get? (of (fract v)⁻¹).s n ≠ none\np : Pair K\nhp : Stream'.Seq.get? (of (fract v)⁻¹).s n = some p\np' : IntFractPair K\nhp'₁ : IntFractPair.stream v (n + 1 + 1) = some p'\nright✝ : ↑p'.b = p.b\nHp : Stream'.Seq.get? (of (fract v)⁻¹).s n = some { a := 1, b := ↑p'.b }\n⊢ Stream'.Seq.get? (of v).s (n + 1) = Stream'.Seq.get? (of (fract v)⁻¹).s n\n[PROOFSTEP]\nrw [Hp, get?_of_eq_some_of_succ_get?_intFractPair_stream hp'₁]\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\na : ℤ\n⊢ convergents' (of ↑a) n = ↑a\n[PROOFSTEP]\ninduction' n with n\n[GOAL]\ncase zero\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\na : ℤ\n⊢ convergents' (of ↑a) Nat.zero = ↑a\n[PROOFSTEP]\nsimp only [zeroth_convergent'_eq_h, of_h_eq_floor, floor_intCast, Nat.zero_eq]\n[GOAL]\ncase succ\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\na : ℤ\nn : ℕ\nn_ih✝ : convergents' (of ↑a) n = ↑a\n⊢ convergents' (of ↑a) (Nat.succ n) = ↑a\n[PROOFSTEP]\nrw [convergents', of_h_eq_floor, floor_intCast, add_right_eq_self]\n[GOAL]\ncase succ\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn✝ : ℕ\na : ℤ\nn : ℕ\nn_ih✝ : convergents' (of ↑a) n = ↑a\n⊢ convergents'Aux (of ↑a).s (Nat.succ n) = 0\n[PROOFSTEP]\nexact convergents'Aux_succ_none ((of_s_of_int K a).symm ▸ Stream'.Seq.get?_nil 0) _\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\n⊢ convergents' (of v) (n + 1) = ↑⌊v⌋ + 1 / convergents' (of (fract v)⁻¹) n\n[PROOFSTEP]\ncases' eq_or_ne (fract v) 0 with h h\n[GOAL]\ncase inl\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nh : fract v = 0\n⊢ convergents' (of v) (n + 1) = ↑⌊v⌋ + 1 / convergents' (of (fract v)⁻¹) n\n[PROOFSTEP]\nobtain ⟨a, rfl⟩ : ∃ a : ℤ, v = a := ⟨⌊v⌋, eq_of_sub_eq_zero h⟩\n[GOAL]\ncase inl.intro\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nn : ℕ\na : ℤ\nh : fract ↑a = 0\n⊢ convergents' (of ↑a) (n + 1) = ↑⌊↑a⌋ + 1 / convergents' (of (fract ↑a)⁻¹) n\n[PROOFSTEP]\nrw [convergents'_of_int, fract_intCast, inv_zero, ← cast_zero, convergents'_of_int, cast_zero, div_zero, add_zero,\n  floor_intCast]\n[GOAL]\ncase inr\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nh : fract v ≠ 0\n⊢ convergents' (of v) (n + 1) = ↑⌊v⌋ + 1 / convergents' (of (fract v)⁻¹) n\n[PROOFSTEP]\nrw [convergents', of_h_eq_floor, add_right_inj, convergents'Aux_succ_some (of_s_head h)]\n[GOAL]\ncase inr\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nh : fract v ≠ 0\n⊢ { a := 1, b := ↑⌊(fract v)⁻¹⌋ }.a /\n      ({ a := 1, b := ↑⌊(fract v)⁻¹⌋ }.b + convergents'Aux (Stream'.Seq.tail (of v).s) n) =\n    1 / convergents' (of (fract v)⁻¹) n\n[PROOFSTEP]\nexact congr_arg ((· / ·) 1) (by rw [convergents', of_h_eq_floor, add_right_inj, of_s_tail])\n[GOAL]\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : FloorRing K\nv : K\nn : ℕ\nh : fract v ≠ 0\n⊢ { a := 1, b := ↑⌊(fract v)⁻¹⌋ }.b + convergents'Aux (Stream'.Seq.tail (of v).s) n = convergents' (of (fract v)⁻¹) n\n[PROOFSTEP]\nrw [convergents', of_h_eq_floor, add_right_inj, of_s_tail]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.ContinuedFractions.Computation.Translations", "llama_tokens": 12235, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6959583250334526, "lm_q2_score": 0.5117166047041652, "lm_q1q2_score": 0.3561334311017162}}
{"text": "[GOAL]\np : Prop\n⊢ TFAE [p]\n[PROOFSTEP]\nsimp [TFAE, -eq_iff_iff]\n[GOAL]\na b : Prop\nl : List Prop\nh : b ∈ l\nH : TFAE (a :: l)\n⊢ a ∈ a :: l\n[PROOFSTEP]\nsimp\n[GOAL]\na b : Prop\nl : List Prop\nh : b ∈ l\n⊢ (a ↔ b) ∧ TFAE l → TFAE (a :: l)\n[PROOFSTEP]\nrintro ⟨ab, H⟩ p (_ | ⟨_, hp⟩) q (_ | ⟨_, hq⟩)\n[GOAL]\ncase intro.head.head\na b : Prop\nl : List Prop\nh : b ∈ l\nab : a ↔ b\nH : TFAE l\n⊢ a ↔ a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.head.tail\na b : Prop\nl : List Prop\nh : b ∈ l\nab : a ↔ b\nH : TFAE l\nq : Prop\nhq : Mem q l\n⊢ a ↔ q\n[PROOFSTEP]\nexact ab.trans (H _ h _ hq)\n[GOAL]\ncase intro.tail.head\na b : Prop\nl : List Prop\nh : b ∈ l\nab : a ↔ b\nH : TFAE l\np : Prop\nhp : Mem p l\n⊢ p ↔ a\n[PROOFSTEP]\nexact (ab.trans (H _ h _ hp)).symm\n[GOAL]\ncase intro.tail.tail\na b : Prop\nl : List Prop\nh : b ∈ l\nab : a ↔ b\nH : TFAE l\np : Prop\nhp : Mem p l\nq : Prop\nhq : Mem q l\n⊢ p ↔ q\n[PROOFSTEP]\nexact H _ hp _ hq\n[GOAL]\na b : Prop\nl : List Prop\n⊢ Chain (fun x x_1 => x → x_1) a (b :: l) → (ilast' b l → a) → TFAE (a :: b :: l)\n[PROOFSTEP]\ninduction' l with c l IH generalizing a b\n[GOAL]\ncase nil\na✝ b✝ a b : Prop\n⊢ Chain (fun x x_1 => x → x_1) a [b] → (ilast' b [] → a) → TFAE [a, b]\n[PROOFSTEP]\nsimp only [tfae_cons_cons, tfae_singleton, and_true_iff, chain_cons, Chain.nil] at *\n[GOAL]\ncase cons\na✝ b✝ c : Prop\nl : List Prop\nIH : ∀ {a b : Prop}, Chain (fun x x_1 => x → x_1) a (b :: l) → (ilast' b l → a) → TFAE (a :: b :: l)\na b : Prop\n⊢ Chain (fun x x_1 => x → x_1) a (b :: c :: l) → (ilast' b (c :: l) → a) → TFAE (a :: b :: c :: l)\n[PROOFSTEP]\nsimp only [tfae_cons_cons, tfae_singleton, and_true_iff, chain_cons, Chain.nil] at *\n[GOAL]\ncase nil\na✝ b✝ a b : Prop\n⊢ (a → b) → (ilast' b [] → a) → (a ↔ b)\n[PROOFSTEP]\nintro a b\n[GOAL]\ncase nil\na✝¹ b✝¹ a✝ b✝ : Prop\na : a✝ → b✝\nb : ilast' b✝ [] → a✝\n⊢ a✝ ↔ b✝\n[PROOFSTEP]\nexact Iff.intro a b\n[GOAL]\ncase cons\na✝ b✝ c : Prop\nl : List Prop\na b : Prop\nIH : ∀ {a b : Prop}, (a → b) ∧ Chain (fun x x_1 => x → x_1) b l → (ilast' b l → a) → (a ↔ b) ∧ TFAE (b :: l)\n⊢ (a → b) ∧ (b → c) ∧ Chain (fun x x_1 => x → x_1) c l → (ilast' b (c :: l) → a) → (a ↔ b) ∧ (b ↔ c) ∧ TFAE (c :: l)\n[PROOFSTEP]\nrintro ⟨ab, ⟨bc, ch⟩⟩ la\n[GOAL]\ncase cons.intro.intro\na✝ b✝ c : Prop\nl : List Prop\na b : Prop\nIH : ∀ {a b : Prop}, (a → b) ∧ Chain (fun x x_1 => x → x_1) b l → (ilast' b l → a) → (a ↔ b) ∧ TFAE (b :: l)\nab : a → b\nbc : b → c\nch : Chain (fun x x_1 => x → x_1) c l\nla : ilast' b (c :: l) → a\n⊢ (a ↔ b) ∧ (b ↔ c) ∧ TFAE (c :: l)\n[PROOFSTEP]\nhave := IH ⟨bc, ch⟩ (ab ∘ la)\n[GOAL]\ncase cons.intro.intro\na✝ b✝ c : Prop\nl : List Prop\na b : Prop\nIH : ∀ {a b : Prop}, (a → b) ∧ Chain (fun x x_1 => x → x_1) b l → (ilast' b l → a) → (a ↔ b) ∧ TFAE (b :: l)\nab : a → b\nbc : b → c\nch : Chain (fun x x_1 => x → x_1) c l\nla : ilast' b (c :: l) → a\nthis : (b ↔ c) ∧ TFAE (c :: l)\n⊢ (a ↔ b) ∧ (b ↔ c) ∧ TFAE (c :: l)\n[PROOFSTEP]\nexact ⟨⟨ab, la ∘ (this.2 c (Mem.head _) _ (ilast'_mem _ _)).1 ∘ bc⟩, this⟩\n[GOAL]\nα : Type u_1\nl : List (α → Prop)\nH : ∀ (a : α), TFAE (map (fun p => p a) l)\n⊢ TFAE (map (fun p => ∀ (a : α), p a) l)\n[PROOFSTEP]\nsimp_rw [TFAE, List.forall_mem_map_iff]\n[GOAL]\nα : Type u_1\nl : List (α → Prop)\nH : ∀ (a : α), TFAE (map (fun p => p a) l)\n⊢ ∀ (j : α → Prop), j ∈ l → ∀ (j_1 : α → Prop), j_1 ∈ l → ((∀ (a : α), j a) ↔ ∀ (a : α), j_1 a)\n[PROOFSTEP]\nintros p₁ hp₁ p₂ hp₂\n[GOAL]\nα : Type u_1\nl : List (α → Prop)\nH : ∀ (a : α), TFAE (map (fun p => p a) l)\np₁ : α → Prop\nhp₁ : p₁ ∈ l\np₂ : α → Prop\nhp₂ : p₂ ∈ l\n⊢ (∀ (a : α), p₁ a) ↔ ∀ (a : α), p₂ a\n[PROOFSTEP]\nexact forall_congr' fun a ↦ H a (p₁ a) (mem_map_of_mem (fun p ↦ p a) hp₁) (p₂ a) (mem_map_of_mem (fun p ↦ p a) hp₂)\n[GOAL]\nα : Type u_1\nl : List (α → Prop)\nH : ∀ (a : α), TFAE (map (fun p => p a) l)\n⊢ TFAE (map (fun p => ∃ a, p a) l)\n[PROOFSTEP]\nsimp_rw [TFAE, List.forall_mem_map_iff]\n[GOAL]\nα : Type u_1\nl : List (α → Prop)\nH : ∀ (a : α), TFAE (map (fun p => p a) l)\n⊢ ∀ (j : α → Prop), j ∈ l → ∀ (j_1 : α → Prop), j_1 ∈ l → ((∃ a, j a) ↔ ∃ a, j_1 a)\n[PROOFSTEP]\nintros p₁ hp₁ p₂ hp₂\n[GOAL]\nα : Type u_1\nl : List (α → Prop)\nH : ∀ (a : α), TFAE (map (fun p => p a) l)\np₁ : α → Prop\nhp₁ : p₁ ∈ l\np₂ : α → Prop\nhp₂ : p₂ ∈ l\n⊢ (∃ a, p₁ a) ↔ ∃ a, p₂ a\n[PROOFSTEP]\nexact exists_congr fun a ↦ H a (p₁ a) (mem_map_of_mem (fun p ↦ p a) hp₁) (p₂ a) (mem_map_of_mem (fun p ↦ p a) hp₂)\n", "meta": {"mathlib_filename": "Mathlib.Data.List.TFAE", "llama_tokens": 2369, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6513548646660543, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.35612055499370676}}
{"text": "[GOAL]\nα : Type u_1\nl l₁ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl₂ : List α\n⊢ [] <+ []\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na : α\nl₁ l₂ t : List α\ns : t <+ l₁\ne : t ++ l₂ = l₁ ∪ l₂\nh : a ∈ l₁ ∪ l₂\n⊢ t ++ l₂ = a :: l₁ ∪ l₂\n[PROOFSTEP]\nsimp only [e, cons_union, insert_of_mem h]\n[GOAL]\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na : α\nl₁ l₂ t : List α\ns : t <+ l₁\ne : t ++ l₂ = l₁ ∪ l₂\nh : ¬a ∈ l₁ ∪ l₂\n⊢ a :: t ++ l₂ = a :: l₁ ∪ l₂\n[PROOFSTEP]\nsimp only [cons_append, cons_union, e, insert_of_not_mem h]\n[GOAL]\nα : Type u_1\nl l₁ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\n⊢ (∀ (x : α), x ∈ l₁ ∪ l₂ → p x) ↔ (∀ (x : α), x ∈ l₁ → p x) ∧ ∀ (x : α), x ∈ l₂ → p x\n[PROOFSTEP]\nsimp only [mem_union_iff, or_imp, forall_and]\n[GOAL]\nα : Type u_1\nl l₁✝ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl₁ : List α\nh : a ∈ l₂\n⊢ (a :: l₁) ∩ l₂ = a :: l₁ ∩ l₂\n[PROOFSTEP]\nsimp only [Inter.inter, List.inter, filter_cons_of_pos, h]\n[GOAL]\nα : Type u_1\nl l₁✝ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl₁ : List α\nh : ¬a ∈ l₂\n⊢ (a :: l₁) ∩ l₂ = l₁ ∩ l₂\n[PROOFSTEP]\nsimp only [Inter.inter, List.inter, filter_cons_of_neg, h]\n[GOAL]\nα : Type u_1\nl l₁ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nh : a ∈ l₁ ∩ l₂\n⊢ a ∈ l₂\n[PROOFSTEP]\nsimpa using of_mem_filter h\n[GOAL]\nα : Type u_1\nl l₁ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nh₁ : a ∈ l₁\nh₂ : a ∈ l₂\n⊢ decide (a ∈ l₂) = true\n[PROOFSTEP]\nsimpa using h₂\n[GOAL]\nα : Type u_1\nl l₁ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\n⊢ l₁ ∩ l₂ = [] ↔ Disjoint l₁ l₂\n[PROOFSTEP]\nsimp only [eq_nil_iff_forall_not_mem, mem_inter_iff, not_and]\n[GOAL]\nα : Type u_1\nl l₁ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\n⊢ (∀ (a : α), a ∈ l₁ → ¬a ∈ l₂) ↔ Disjoint l₁ l₂\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nl l₁ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nxs ys : List α\n⊢ List.inter xs (reverse ys) = List.inter xs ys\n[PROOFSTEP]\nsimp only [List.inter, mem_reverse]\n[GOAL]\nα : Type u_1\nl✝ l₁ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl : List α\n⊢ List.bagInter [] l = []\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nα : Type u_1\nl l₁ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\n⊢ List.bagInter [] [] = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nl l₁ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nhead✝ : α\ntail✝ : List α\n⊢ List.bagInter [] (head✝ :: tail✝) = []\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nl✝ l₁ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl : List α\n⊢ List.bagInter l [] = []\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nα : Type u_1\nl l₁ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\n⊢ List.bagInter [] [] = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nl l₁ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nhead✝ : α\ntail✝ : List α\n⊢ List.bagInter (head✝ :: tail✝) [] = []\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nl l₁✝ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl₁ : List α\nh : a ∈ l₂\n⊢ List.bagInter (a :: l₁) l₂ = a :: List.bagInter l₁ (List.erase l₂ a)\n[PROOFSTEP]\ncases l₂\n[GOAL]\ncase nil\nα : Type u_1\nl l₁✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl₁ : List α\nh : a ∈ []\n⊢ List.bagInter (a :: l₁) [] = a :: List.bagInter l₁ (List.erase [] a)\n[PROOFSTEP]\nexact if_pos h\n[GOAL]\ncase cons\nα : Type u_1\nl l₁✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl₁ : List α\nhead✝ : α\ntail✝ : List α\nh : a ∈ head✝ :: tail✝\n⊢ List.bagInter (a :: l₁) (head✝ :: tail✝) = a :: List.bagInter l₁ (List.erase (head✝ :: tail✝) a)\n[PROOFSTEP]\nsimp only [List.bagInter, if_pos (elem_eq_true_of_mem h)]\n[GOAL]\nα : Type u_1\nl l₁✝ l₂ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl₁ : List α\nh : ¬a ∈ l₂\n⊢ List.bagInter (a :: l₁) l₂ = List.bagInter l₁ l₂\n[PROOFSTEP]\ncases l₂\n[GOAL]\ncase nil\nα : Type u_1\nl l₁✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl₁ : List α\nh : ¬a ∈ []\n⊢ List.bagInter (a :: l₁) [] = List.bagInter l₁ []\n[PROOFSTEP]\nsimp only [bagInter_nil]\n[GOAL]\ncase cons\nα : Type u_1\nl l₁✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl₁ : List α\nhead✝ : α\ntail✝ : List α\nh : ¬a ∈ head✝ :: tail✝\n⊢ List.bagInter (a :: l₁) (head✝ :: tail✝) = List.bagInter l₁ (head✝ :: tail✝)\n[PROOFSTEP]\nsimp only [erase_of_not_mem h, List.bagInter, if_neg (mt mem_of_elem_eq_true h)]\n[GOAL]\nα : Type u_1\nl l₁ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na : α\nl₂ : List α\n⊢ a ∈ List.bagInter [] l₂ ↔ a ∈ [] ∧ a ∈ l₂\n[PROOFSTEP]\nsimp only [nil_bagInter, not_mem_nil, false_and_iff]\n[GOAL]\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\n⊢ a ∈ List.bagInter (b :: l₁) l₂ ↔ a ∈ b :: l₁ ∧ a ∈ l₂\n[PROOFSTEP]\nby_cases h : b ∈ l₂\n[GOAL]\ncase pos\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : b ∈ l₂\n⊢ a ∈ List.bagInter (b :: l₁) l₂ ↔ a ∈ b :: l₁ ∧ a ∈ l₂\n[PROOFSTEP]\nrw [cons_bagInter_of_pos _ h, mem_cons, mem_cons, mem_bagInter]\n[GOAL]\ncase pos\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : b ∈ l₂\n⊢ a = b ∨ a ∈ l₁ ∧ a ∈ List.erase l₂ b ↔ (a = b ∨ a ∈ l₁) ∧ a ∈ l₂\n[PROOFSTEP]\nby_cases ba : a = b\n[GOAL]\ncase pos\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : b ∈ l₂\nba : a = b\n⊢ a = b ∨ a ∈ l₁ ∧ a ∈ List.erase l₂ b ↔ (a = b ∨ a ∈ l₁) ∧ a ∈ l₂\n[PROOFSTEP]\nsimp only [ba, h, eq_self_iff_true, true_or_iff, true_and_iff]\n[GOAL]\ncase neg\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : b ∈ l₂\nba : ¬a = b\n⊢ a = b ∨ a ∈ l₁ ∧ a ∈ List.erase l₂ b ↔ (a = b ∨ a ∈ l₁) ∧ a ∈ l₂\n[PROOFSTEP]\nsimp only [mem_erase_of_ne ba, ba, false_or_iff]\n[GOAL]\ncase neg\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : ¬b ∈ l₂\n⊢ a ∈ List.bagInter (b :: l₁) l₂ ↔ a ∈ b :: l₁ ∧ a ∈ l₂\n[PROOFSTEP]\nrw [cons_bagInter_of_neg _ h, mem_bagInter, mem_cons, or_and_right]\n[GOAL]\ncase neg\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : ¬b ∈ l₂\n⊢ a ∈ l₁ ∧ a ∈ l₂ ↔ a = b ∧ a ∈ l₂ ∨ a ∈ l₁ ∧ a ∈ l₂\n[PROOFSTEP]\nsymm\n[GOAL]\ncase neg\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : ¬b ∈ l₂\n⊢ a = b ∧ a ∈ l₂ ∨ a ∈ l₁ ∧ a ∈ l₂ ↔ a ∈ l₁ ∧ a ∈ l₂\n[PROOFSTEP]\napply or_iff_right_of_imp\n[GOAL]\ncase neg.ha\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nh : ¬b ∈ l₂\n⊢ a = b ∧ a ∈ l₂ → a ∈ l₁ ∧ a ∈ l₂\n[PROOFSTEP]\nrintro ⟨rfl, h'⟩\n[GOAL]\ncase neg.ha.intro\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List α\nh' : a ∈ l₂\nh : ¬a ∈ l₂\n⊢ a ∈ l₁ ∧ a ∈ l₂\n[PROOFSTEP]\nexact h.elim h'\n[GOAL]\nα : Type u_1\nl l₁ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na : α\nl₂ : List α\n⊢ count a (List.bagInter [] l₂) = min (count a []) (count a l₂)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl l₁✝ l₂ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na : α\nl₁ : List α\n⊢ count a (List.bagInter l₁ []) = min (count a l₁) (count a [])\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\n⊢ count a (List.bagInter (b :: l₁) l₂) = min (count a (b :: l₁)) (count a l₂)\n[PROOFSTEP]\nby_cases hb : b ∈ l₂\n[GOAL]\ncase pos\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nhb : b ∈ l₂\n⊢ count a (List.bagInter (b :: l₁) l₂) = min (count a (b :: l₁)) (count a l₂)\n[PROOFSTEP]\nrw [cons_bagInter_of_pos _ hb, count_cons', count_cons', count_bagInter, count_erase, ← min_add_add_right]\n[GOAL]\ncase pos\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nhb : b ∈ l₂\n⊢ min (count a l₁ + if a = b then 1 else 0) ((count a l₂ - if a = b then 1 else 0) + if a = b then 1 else 0) =\n    min (count a l₁ + if a = b then 1 else 0) (count a l₂)\n[PROOFSTEP]\nby_cases ab : a = b\n[GOAL]\ncase pos\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nhb : b ∈ l₂\nab : a = b\n⊢ min (count a l₁ + if a = b then 1 else 0) ((count a l₂ - if a = b then 1 else 0) + if a = b then 1 else 0) =\n    min (count a l₁ + if a = b then 1 else 0) (count a l₂)\n[PROOFSTEP]\nrw [if_pos ab, @tsub_add_cancel_of_le]\n[GOAL]\ncase pos.h\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nhb : b ∈ l₂\nab : a = b\n⊢ 1 ≤ count a l₂\n[PROOFSTEP]\nrwa [succ_le_iff, count_pos, ab]\n[GOAL]\ncase neg\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nhb : b ∈ l₂\nab : ¬a = b\n⊢ min (count a l₁ + if a = b then 1 else 0) ((count a l₂ - if a = b then 1 else 0) + if a = b then 1 else 0) =\n    min (count a l₁ + if a = b then 1 else 0) (count a l₂)\n[PROOFSTEP]\nrw [if_neg ab, tsub_zero, add_zero, add_zero]\n[GOAL]\ncase neg\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nhb : ¬b ∈ l₂\n⊢ count a (List.bagInter (b :: l₁) l₂) = min (count a (b :: l₁)) (count a l₂)\n[PROOFSTEP]\nrw [cons_bagInter_of_neg _ hb, count_bagInter]\n[GOAL]\ncase neg\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nhb : ¬b ∈ l₂\n⊢ min (count a l₁) (count a l₂) = min (count a (b :: l₁)) (count a l₂)\n[PROOFSTEP]\nby_cases ab : a = b\n[GOAL]\ncase pos\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nhb : ¬b ∈ l₂\nab : a = b\n⊢ min (count a l₁) (count a l₂) = min (count a (b :: l₁)) (count a l₂)\n[PROOFSTEP]\nrw [← ab] at hb \n[GOAL]\ncase pos\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nhb : ¬a ∈ l₂\nab : a = b\n⊢ min (count a l₁) (count a l₂) = min (count a (b :: l₁)) (count a l₂)\n[PROOFSTEP]\nrw [count_eq_zero.2 hb, min_zero, min_zero]\n[GOAL]\ncase neg\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na✝ : α\ninst✝ : DecidableEq α\na b : α\nl₁ l₂ : List α\nhb : ¬b ∈ l₂\nab : ¬a = b\n⊢ min (count a l₁) (count a l₂) = min (count a (b :: l₁)) (count a l₂)\n[PROOFSTEP]\nrw [count_cons_of_ne ab]\n[GOAL]\nα : Type u_1\nl l₁ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl₂ : List α\n⊢ List.bagInter [] l₂ <+ []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nb : α\nl₁ l₂ : List α\n⊢ List.bagInter (b :: l₁) l₂ <+ b :: l₁\n[PROOFSTEP]\nby_cases h : b ∈ l₂\n[GOAL]\ncase pos\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nb : α\nl₁ l₂ : List α\nh : b ∈ l₂\n⊢ List.bagInter (b :: l₁) l₂ <+ b :: l₁\n[PROOFSTEP]\nsimp only [h, cons_bagInter_of_pos, cons_bagInter_of_neg, not_false_iff]\n[GOAL]\ncase neg\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nb : α\nl₁ l₂ : List α\nh : ¬b ∈ l₂\n⊢ List.bagInter (b :: l₁) l₂ <+ b :: l₁\n[PROOFSTEP]\nsimp only [h, cons_bagInter_of_pos, cons_bagInter_of_neg, not_false_iff]\n[GOAL]\ncase pos\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nb : α\nl₁ l₂ : List α\nh : b ∈ l₂\n⊢ b :: List.bagInter l₁ (List.erase l₂ b) <+ b :: l₁\n[PROOFSTEP]\nexact (bagInter_sublist_left _ _).cons_cons _\n[GOAL]\ncase neg\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nb : α\nl₁ l₂ : List α\nh : ¬b ∈ l₂\n⊢ List.bagInter l₁ l₂ <+ b :: l₁\n[PROOFSTEP]\napply sublist_cons_of_sublist\n[GOAL]\ncase neg.a\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nb : α\nl₁ l₂ : List α\nh : ¬b ∈ l₂\n⊢ List.bagInter l₁ l₂ <+ l₁\n[PROOFSTEP]\napply bagInter_sublist_left\n[GOAL]\nα : Type u_1\nl l₁ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nl₂ : List α\n⊢ List.bagInter [] l₂ = [] ↔ [] ∩ l₂ = []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nb : α\nl₁ l₂ : List α\n⊢ List.bagInter (b :: l₁) l₂ = [] ↔ (b :: l₁) ∩ l₂ = []\n[PROOFSTEP]\nby_cases h : b ∈ l₂\n[GOAL]\ncase pos\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nb : α\nl₁ l₂ : List α\nh : b ∈ l₂\n⊢ List.bagInter (b :: l₁) l₂ = [] ↔ (b :: l₁) ∩ l₂ = []\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nb : α\nl₁ l₂ : List α\nh : ¬b ∈ l₂\n⊢ List.bagInter (b :: l₁) l₂ = [] ↔ (b :: l₁) ∩ l₂ = []\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nl l₁✝ l₂✝ : List α\np : α → Prop\na : α\ninst✝ : DecidableEq α\nb : α\nl₁ l₂ : List α\nh : ¬b ∈ l₂\n⊢ List.bagInter l₁ l₂ = [] ↔ l₁ ∩ l₂ = []\n[PROOFSTEP]\nexact bagInter_nil_iff_inter_nil l₁ l₂\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Lattice", "llama_tokens": 6867, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5926666143433998, "lm_q2_score": 0.600188359260205, "lm_q1q2_score": 0.3557116028510658}}
{"text": "[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\n⊢ ContDiffOn ℝ ⊤ (stereoToFun v) {x | ↑(↑(innerSL ℝ) v) x ≠ 1}\n[PROOFSTEP]\nrefine' ContDiffOn.smul _ (orthogonalProjection (ℝ ∙ v)ᗮ).contDiff.contDiffOn\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\n⊢ ContDiffOn ℝ ⊤ (fun x => 2 / (1 - ↑(↑(innerSL ℝ) v) x)) {x | ↑(↑(innerSL ℝ) v) x ≠ 1}\n[PROOFSTEP]\nrefine' contDiff_const.contDiffOn.div _ _\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\n⊢ ContDiffOn ℝ ⊤ (fun x => 1 - ↑(↑(innerSL ℝ) v) x) {x | ↑(↑(innerSL ℝ) v) x ≠ 1}\n[PROOFSTEP]\nexact (contDiff_const.sub (innerSL ℝ v).contDiff).contDiffOn\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\n⊢ ∀ (x : E), x ∈ {x | ↑(↑(innerSL ℝ) v) x ≠ 1} → 1 - ↑(↑(innerSL ℝ) v) x ≠ 0\n[PROOFSTEP]\nintro x h h'\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv x : E\nh : x ∈ {x | ↑(↑(innerSL ℝ) v) x ≠ 1}\nh' : 1 - ↑(↑(innerSL ℝ) v) x = 0\n⊢ False\n[PROOFSTEP]\nexact h (sub_eq_zero.mp h').symm\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : E\nhw : w ∈ (Submodule.span ℝ {v})ᗮ\n⊢ stereoInvFunAux v w ∈ sphere 0 1\n[PROOFSTEP]\nhave h₁ : (0 : ℝ) < ‖w‖ ^ 2 + 4 := by positivity\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : E\nhw : w ∈ (Submodule.span ℝ {v})ᗮ\n⊢ 0 < ‖w‖ ^ 2 + 4\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : E\nhw : w ∈ (Submodule.span ℝ {v})ᗮ\nh₁ : 0 < ‖w‖ ^ 2 + 4\n⊢ stereoInvFunAux v w ∈ sphere 0 1\n[PROOFSTEP]\nsuffices : ‖(4 : ℝ) • w + (‖w‖ ^ 2 - 4) • v‖ = ‖w‖ ^ 2 + 4\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : E\nhw : w ∈ (Submodule.span ℝ {v})ᗮ\nh₁ : 0 < ‖w‖ ^ 2 + 4\nthis : ‖4 • w + (‖w‖ ^ 2 - 4) • v‖ = ‖w‖ ^ 2 + 4\n⊢ stereoInvFunAux v w ∈ sphere 0 1\n[PROOFSTEP]\nsimp only [mem_sphere_zero_iff_norm, norm_smul, Real.norm_eq_abs, abs_inv, this, abs_of_pos h₁, stereoInvFunAux_apply,\n  inv_mul_cancel h₁.ne']\n[GOAL]\ncase this\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : E\nhw : w ∈ (Submodule.span ℝ {v})ᗮ\nh₁ : 0 < ‖w‖ ^ 2 + 4\n⊢ ‖4 • w + (‖w‖ ^ 2 - 4) • v‖ = ‖w‖ ^ 2 + 4\n[PROOFSTEP]\nsuffices : ‖(4 : ℝ) • w + (‖w‖ ^ 2 - 4) • v‖ ^ 2 = (‖w‖ ^ 2 + 4) ^ 2\n[GOAL]\ncase this\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : E\nhw : w ∈ (Submodule.span ℝ {v})ᗮ\nh₁ : 0 < ‖w‖ ^ 2 + 4\nthis : ‖4 • w + (‖w‖ ^ 2 - 4) • v‖ ^ 2 = (‖w‖ ^ 2 + 4) ^ 2\n⊢ ‖4 • w + (‖w‖ ^ 2 - 4) • v‖ = ‖w‖ ^ 2 + 4\n[PROOFSTEP]\nsimpa [sq_eq_sq_iff_abs_eq_abs, abs_of_pos h₁] using this\n[GOAL]\ncase this\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : E\nhw : w ∈ (Submodule.span ℝ {v})ᗮ\nh₁ : 0 < ‖w‖ ^ 2 + 4\n⊢ ‖4 • w + (‖w‖ ^ 2 - 4) • v‖ ^ 2 = (‖w‖ ^ 2 + 4) ^ 2\n[PROOFSTEP]\nrw [Submodule.mem_orthogonal_singleton_iff_inner_left] at hw \n[GOAL]\ncase this\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : E\nhw : inner w v = 0\nh₁ : 0 < ‖w‖ ^ 2 + 4\n⊢ ‖4 • w + (‖w‖ ^ 2 - 4) • v‖ ^ 2 = (‖w‖ ^ 2 + 4) ^ 2\n[PROOFSTEP]\nsimp [norm_add_sq_real, norm_smul, inner_smul_left, inner_smul_right, hw, mul_pow, Real.norm_eq_abs, hv]\n[GOAL]\ncase this\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : E\nhw : inner w v = 0\nh₁ : 0 < ‖w‖ ^ 2 + 4\n⊢ 4 ^ 2 * ‖w‖ ^ 2 + (‖w‖ ^ 2 - 4) ^ 2 = (‖w‖ ^ 2 + 4) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\n⊢ HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0\n[PROOFSTEP]\nhave h₀ : HasFDerivAt (fun w : E => ‖w‖ ^ 2) (0 : E →L[ℝ] ℝ) 0 :=\n  by\n  convert (hasStrictFDerivAt_norm_sq (0 : E)).hasFDerivAt\n  simp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\n⊢ HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0\n[PROOFSTEP]\nconvert (hasStrictFDerivAt_norm_sq (0 : E)).hasFDerivAt\n[GOAL]\ncase h.e'_10\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\n⊢ 0 = 2 • ↑(innerSL ℝ) 0\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nh₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0\n⊢ HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0\n[PROOFSTEP]\nhave h₁ : HasFDerivAt (fun w : E => (‖w‖ ^ 2 + 4)⁻¹) (0 : E →L[ℝ] ℝ) 0 := by\n  convert (hasFDerivAt_inv _).comp _ (h₀.add (hasFDerivAt_const 4 0)) <;> simp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nh₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0\n⊢ HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0\n[PROOFSTEP]\nconvert (hasFDerivAt_inv _).comp _ (h₀.add (hasFDerivAt_const 4 0))\n[GOAL]\ncase h.e'_10.h.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nh₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0\ne_7✝ : Real.normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup\nhe✝ : InnerProductSpace.toNormedSpace = NormedField.toNormedSpace\n⊢ 0 = ContinuousLinearMap.comp (ContinuousLinearMap.smulRight 1 (-((‖0‖ ^ 2 + 4) ^ 2)⁻¹)) (0 + 0)\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nh₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0\n⊢ ‖0‖ ^ 2 + 4 ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nh₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0\nh₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0\n⊢ HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0\n[PROOFSTEP]\nhave h₂ : HasFDerivAt (fun w => (4 : ℝ) • w + (‖w‖ ^ 2 - 4) • v) ((4 : ℝ) • ContinuousLinearMap.id ℝ E) 0\n[GOAL]\ncase h₂\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nh₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0\nh₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0\n⊢ HasFDerivAt (fun w => 4 • w + (‖w‖ ^ 2 - 4) • v) (4 • ContinuousLinearMap.id ℝ E) 0\n[PROOFSTEP]\nconvert\n  ((hasFDerivAt_const (4 : ℝ) 0).smul (hasFDerivAt_id 0)).add\n    ((h₀.sub (hasFDerivAt_const (4 : ℝ) 0)).smul (hasFDerivAt_const v 0)) using\n  1\n[GOAL]\ncase h.e'_10\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nh₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0\nh₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0\n⊢ 4 • ContinuousLinearMap.id ℝ E =\n    4 • ContinuousLinearMap.id ℝ E + ContinuousLinearMap.smulRight 0 (id 0) +\n      ((‖0‖ ^ 2 - 4) • 0 + ContinuousLinearMap.smulRight (0 - 0) v)\n[PROOFSTEP]\next w\n[GOAL]\ncase h.e'_10.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nh₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0\nh₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0\nw : E\n⊢ ↑(4 • ContinuousLinearMap.id ℝ E) w =\n    ↑(4 • ContinuousLinearMap.id ℝ E + ContinuousLinearMap.smulRight 0 (id 0) +\n          ((‖0‖ ^ 2 - 4) • 0 + ContinuousLinearMap.smulRight (0 - 0) v))\n      w\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nh₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0\nh₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0\nh₂ : HasFDerivAt (fun w => 4 • w + (‖w‖ ^ 2 - 4) • v) (4 • ContinuousLinearMap.id ℝ E) 0\n⊢ HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0\n[PROOFSTEP]\nconvert h₁.smul h₂ using 1\n[GOAL]\ncase h.e'_10\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nh₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0\nh₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0\nh₂ : HasFDerivAt (fun w => 4 • w + (‖w‖ ^ 2 - 4) • v) (4 • ContinuousLinearMap.id ℝ E) 0\n⊢ ContinuousLinearMap.id ℝ E =\n    (‖0‖ ^ 2 + 4)⁻¹ • 4 • ContinuousLinearMap.id ℝ E + ContinuousLinearMap.smulRight 0 (4 • 0 + (‖0‖ ^ 2 - 4) • v)\n[PROOFSTEP]\next w\n[GOAL]\ncase h.e'_10.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nh₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0\nh₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0\nh₂ : HasFDerivAt (fun w => 4 • w + (‖w‖ ^ 2 - 4) • v) (4 • ContinuousLinearMap.id ℝ E) 0\nw : E\n⊢ ↑(ContinuousLinearMap.id ℝ E) w =\n    ↑((‖0‖ ^ 2 + 4)⁻¹ • 4 • ContinuousLinearMap.id ℝ E + ContinuousLinearMap.smulRight 0 (4 • 0 + (‖0‖ ^ 2 - 4) • v)) w\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\n⊢ HasFDerivAt (stereoInvFunAux v ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {v})ᗮ) 0\n[PROOFSTEP]\nhave : HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) ((ℝ ∙ v)ᗮ.subtypeL 0) :=\n  hasFDerivAt_stereoInvFunAux v\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nthis : HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) (↑(Submodule.subtypeL (Submodule.span ℝ {v})ᗮ) 0)\n⊢ HasFDerivAt (stereoInvFunAux v ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {v})ᗮ) 0\n[PROOFSTEP]\nconvert this.comp (0 : (ℝ ∙ v)ᗮ) (by apply ContinuousLinearMap.hasFDerivAt)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ v : E\nthis : HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) (↑(Submodule.subtypeL (Submodule.span ℝ {v})ᗮ) 0)\n⊢ HasFDerivAt ↑(Submodule.subtypeL (Submodule.span ℝ {v})ᗮ) ?m.163288 0\n[PROOFSTEP]\napply ContinuousLinearMap.hasFDerivAt\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\n⊢ ContDiff ℝ ⊤ (stereoInvFunAux v)\n[PROOFSTEP]\nhave h₀ : ContDiff ℝ ⊤ fun w : E => ‖w‖ ^ 2 := contDiff_norm_sq ℝ\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nh₀ : ContDiff ℝ ⊤ fun w => ‖w‖ ^ 2\n⊢ ContDiff ℝ ⊤ (stereoInvFunAux v)\n[PROOFSTEP]\nhave h₁ : ContDiff ℝ ⊤ fun w : E => (‖w‖ ^ 2 + 4)⁻¹ :=\n  by\n  refine' (h₀.add contDiff_const).inv _\n  intro x\n  nlinarith\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nh₀ : ContDiff ℝ ⊤ fun w => ‖w‖ ^ 2\n⊢ ContDiff ℝ ⊤ fun w => (‖w‖ ^ 2 + 4)⁻¹\n[PROOFSTEP]\nrefine' (h₀.add contDiff_const).inv _\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nh₀ : ContDiff ℝ ⊤ fun w => ‖w‖ ^ 2\n⊢ ∀ (x : E), ‖x‖ ^ 2 + 4 ≠ 0\n[PROOFSTEP]\nintro x\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nh₀ : ContDiff ℝ ⊤ fun w => ‖w‖ ^ 2\nx : E\n⊢ ‖x‖ ^ 2 + 4 ≠ 0\n[PROOFSTEP]\nnlinarith\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nh₀ : ContDiff ℝ ⊤ fun w => ‖w‖ ^ 2\nh₁ : ContDiff ℝ ⊤ fun w => (‖w‖ ^ 2 + 4)⁻¹\n⊢ ContDiff ℝ ⊤ (stereoInvFunAux v)\n[PROOFSTEP]\nhave h₂ : ContDiff ℝ ⊤ fun w => (4 : ℝ) • w + (‖w‖ ^ 2 - 4) • v :=\n  by\n  refine' (contDiff_const.smul contDiff_id).add _\n  refine' (h₀.sub contDiff_const).smul contDiff_const\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nh₀ : ContDiff ℝ ⊤ fun w => ‖w‖ ^ 2\nh₁ : ContDiff ℝ ⊤ fun w => (‖w‖ ^ 2 + 4)⁻¹\n⊢ ContDiff ℝ ⊤ fun w => 4 • w + (‖w‖ ^ 2 - 4) • v\n[PROOFSTEP]\nrefine' (contDiff_const.smul contDiff_id).add _\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nh₀ : ContDiff ℝ ⊤ fun w => ‖w‖ ^ 2\nh₁ : ContDiff ℝ ⊤ fun w => (‖w‖ ^ 2 + 4)⁻¹\n⊢ ContDiff ℝ ⊤ fun w => (‖w‖ ^ 2 - 4) • v\n[PROOFSTEP]\nrefine' (h₀.sub contDiff_const).smul contDiff_const\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nh₀ : ContDiff ℝ ⊤ fun w => ‖w‖ ^ 2\nh₁ : ContDiff ℝ ⊤ fun w => (‖w‖ ^ 2 + 4)⁻¹\nh₂ : ContDiff ℝ ⊤ fun w => 4 • w + (‖w‖ ^ 2 - 4) • v\n⊢ ContDiff ℝ ⊤ (stereoInvFunAux v)\n[PROOFSTEP]\nexact h₁.smul h₂\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\n⊢ v ∈ sphere 0 1\n[PROOFSTEP]\nsimp [hv]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\n⊢ stereoInvFun hv w ≠ { val := v, property := (_ : v ∈ sphere 0 1) }\n[PROOFSTEP]\nrefine' Subtype.ne_of_val_ne _\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\n⊢ ↑(stereoInvFun hv w) ≠ ↑{ val := v, property := (_ : v ∈ sphere 0 1) }\n[PROOFSTEP]\nrw [← inner_lt_one_iff_real_of_norm_one _ hv]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\n⊢ inner (↑(stereoInvFun hv w)) v < 1\n[PROOFSTEP]\nhave hw : ⟪v, w⟫_ℝ = 0 := Submodule.mem_orthogonal_singleton_iff_inner_right.mp w.2\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhw : inner v ↑w = 0\n⊢ inner (↑(stereoInvFun hv w)) v < 1\n[PROOFSTEP]\nhave hw' : (‖(w : E)‖ ^ 2 + 4)⁻¹ * (‖(w : E)‖ ^ 2 - 4) < 1 :=\n  by\n  refine' (inv_mul_lt_iff' _).mpr _\n  · nlinarith\n  linarith\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhw : inner v ↑w = 0\n⊢ (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - 4) < 1\n[PROOFSTEP]\nrefine' (inv_mul_lt_iff' _).mpr _\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhw : inner v ↑w = 0\n⊢ 0 < ‖↑w‖ ^ 2 + 4\n[PROOFSTEP]\nnlinarith\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhw : inner v ↑w = 0\n⊢ ‖↑w‖ ^ 2 - 4 < 1 * (‖↑w‖ ^ 2 + 4)\n[PROOFSTEP]\nlinarith\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhw : inner v ↑w = 0\nhw' : (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - 4) < 1\n⊢ inner (↑(stereoInvFun hv w)) v < 1\n[PROOFSTEP]\nsimpa [real_inner_comm, inner_add_right, inner_smul_right, real_inner_self_eq_norm_mul_norm, hw, hv] using hw'\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\n⊢ ‖↑(stereoInvFun hv w)‖ = 1\n[PROOFSTEP]\nsimpa using stereoInvFunAux_mem hv w.2\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\n⊢ stereoInvFun hv (stereoToFun v ↑x) = x\n[PROOFSTEP]\next\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\n⊢ ↑(stereoInvFun hv (stereoToFun v ↑x)) = ↑x\n[PROOFSTEP]\nsimp only [stereoToFun_apply, stereoInvFun_apply, smul_add]\n  -- name two frequently-occuring quantities and write down their basic properties\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\n⊢ (‖(2 / (1 - ↑(↑(innerSL ℝ) v) ↑x)) • ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x‖ ^ 2 + 4)⁻¹ •\n        ↑(4 • (2 / (1 - ↑(↑(innerSL ℝ) v) ↑x)) • ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x) +\n      (‖(2 / (1 - ↑(↑(innerSL ℝ) v) ↑x)) • ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x‖ ^ 2 + 4)⁻¹ •\n        (‖(2 / (1 - ↑(↑(innerSL ℝ) v) ↑x)) • ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x‖ ^ 2 - 4) • v =\n    ↑x\n[PROOFSTEP]\nset a : ℝ := innerSL _ v x\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\n⊢ (‖(2 / (1 - a)) • ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x‖ ^ 2 + 4)⁻¹ •\n        ↑(4 • (2 / (1 - a)) • ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x) +\n      (‖(2 / (1 - a)) • ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x‖ ^ 2 + 4)⁻¹ •\n        (‖(2 / (1 - a)) • ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x‖ ^ 2 - 4) • v =\n    ↑x\n[PROOFSTEP]\nset y := orthogonalProjection (ℝ ∙ v)ᗮ x\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\n⊢ (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • ↑(4 • (2 / (1 - a)) • y) +\n      (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • (‖(2 / (1 - a)) • y‖ ^ 2 - 4) • v =\n    ↑x\n[PROOFSTEP]\nhave split : ↑x = a • v + ↑y :=\n  by\n  convert (orthogonalProjection_add_orthogonalProjection_orthogonal (ℝ ∙ v) x).symm\n  exact (orthogonalProjection_unit_singleton ℝ hv x).symm\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\n⊢ ↑x = a • v + ↑y\n[PROOFSTEP]\nconvert (orthogonalProjection_add_orthogonalProjection_orthogonal (ℝ ∙ v) x).symm\n[GOAL]\ncase h.e'_3.h.e'_5\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\n⊢ a • v = ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) ↑x)\n[PROOFSTEP]\nexact (orthogonalProjection_unit_singleton ℝ hv x).symm\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\n⊢ (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • ↑(4 • (2 / (1 - a)) • y) +\n      (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • (‖(2 / (1 - a)) • y‖ ^ 2 - 4) • v =\n    ↑x\n[PROOFSTEP]\nhave hvy : ⟪v, y⟫_ℝ = 0 := Submodule.mem_orthogonal_singleton_iff_inner_right.mp y.2\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\n⊢ (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • ↑(4 • (2 / (1 - a)) • y) +\n      (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • (‖(2 / (1 - a)) • y‖ ^ 2 - 4) • v =\n    ↑x\n[PROOFSTEP]\nhave pythag : 1 = a ^ 2 + ‖y‖ ^ 2 :=\n  by\n  have hvy' : ⟪a • v, y⟫_ℝ = 0 := by simp only [inner_smul_left, hvy, mul_zero]\n  convert norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero _ _ hvy' using 2\n    -- Porting note: was simp [← split] but wasn't finding `norm_eq_of_mem_sphere`\n  · simp only [norm_eq_of_mem_sphere, Nat.cast_one, mul_one, ← split]\n  · simp [norm_smul, hv, ← sq, sq_abs]\n  ·\n    exact\n      sq\n        _\n          -- Porting note : added to work around cancel_denoms and nlinarith failures\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\n⊢ ↑1 = a ^ 2 + ‖y‖ ^ 2\n[PROOFSTEP]\nhave hvy' : ⟪a • v, y⟫_ℝ = 0 := by simp only [inner_smul_left, hvy, mul_zero]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\n⊢ inner (a • v) ↑y = 0\n[PROOFSTEP]\nsimp only [inner_smul_left, hvy, mul_zero]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\nhvy' : inner (a • v) ↑y = 0\n⊢ ↑1 = a ^ 2 + ‖y‖ ^ 2\n[PROOFSTEP]\nconvert norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero _ _ hvy' using 2\n  -- Porting note: was simp [← split] but wasn't finding `norm_eq_of_mem_sphere`\n[GOAL]\ncase h.e'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\nhvy' : inner (a • v) ↑y = 0\n⊢ ↑1 = ‖a • v + ↑y‖ * ‖a • v + ↑y‖\n[PROOFSTEP]\nsimp only [norm_eq_of_mem_sphere, Nat.cast_one, mul_one, ← split]\n[GOAL]\ncase h.e'_3.h.e'_5\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\nhvy' : inner (a • v) ↑y = 0\n⊢ a ^ 2 = ‖a • v‖ * ‖a • v‖\n[PROOFSTEP]\nsimp [norm_smul, hv, ← sq, sq_abs]\n[GOAL]\ncase h.e'_3.h.e'_6\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\nhvy' : inner (a • v) ↑y = 0\n⊢ ‖y‖ ^ 2 = ‖↑y‖ * ‖↑y‖\n[PROOFSTEP]\nexact\n  sq\n    _\n      -- Porting note : added to work around cancel_denoms and nlinarith failures\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\n⊢ (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • ↑(4 • (2 / (1 - a)) • y) +\n      (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • (‖(2 / (1 - a)) • y‖ ^ 2 - 4) • v =\n    ↑x\n[PROOFSTEP]\nhave duh : ‖y.val‖ ^ 2 = 1 - a ^ 2 := by rw [← Submodule.coe_norm, pythag];\n  ring\n    -- two facts which will be helpful for clearing denominators in the main calculation\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\n⊢ ‖↑y‖ ^ 2 = ↑1 - a ^ 2\n[PROOFSTEP]\nrw [← Submodule.coe_norm, pythag]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\n⊢ ‖y‖ ^ 2 = a ^ 2 + ‖y‖ ^ 2 - a ^ 2\n[PROOFSTEP]\nring\n  -- two facts which will be helpful for clearing denominators in the main calculation\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\n⊢ (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • ↑(4 • (2 / (1 - a)) • y) +\n      (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • (‖(2 / (1 - a)) • y‖ ^ 2 - 4) • v =\n    ↑x\n[PROOFSTEP]\nhave ha : 1 - a ≠ 0 :=\n  by\n  have : a < 1 := (inner_lt_one_iff_real_of_norm_one hv (by simp)).mpr hx.symm\n  linarith\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\n⊢ 1 - a ≠ 0\n[PROOFSTEP]\nhave : a < 1 := (inner_lt_one_iff_real_of_norm_one hv (by simp)).mpr hx.symm\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\n⊢ ‖↑x‖ = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : a < 1\n⊢ 1 - a ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\n⊢ (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • ↑(4 • (2 / (1 - a)) • y) +\n      (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • (‖(2 / (1 - a)) • y‖ ^ 2 - 4) • v =\n    ↑x\n[PROOFSTEP]\nhave : 2 ^ 2 * ‖y‖ ^ 2 + 4 * (1 - a) ^ 2 ≠ 0 := by\n  refine' ne_of_gt _\n  have : (0 : ℝ) < (1 - a) ^ 2 := sq_pos_of_ne_zero (1 - a) ha\n  change 0 < 4 * _ + 4 * _\n  nlinarith\n    -- the core of the problem is these two algebraic identities:\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\n⊢ ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\n[PROOFSTEP]\nrefine' ne_of_gt _\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\n⊢ 0 < ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2\n[PROOFSTEP]\nhave : (0 : ℝ) < (1 - a) ^ 2 := sq_pos_of_ne_zero (1 - a) ha\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : 0 < (1 - a) ^ 2\n⊢ 0 < ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2\n[PROOFSTEP]\nchange 0 < 4 * _ + 4 * _\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : 0 < (1 - a) ^ 2\n⊢ 0 < 4 * ‖y‖ ^ 2 + 4 * (1 - a) ^ 2\n[PROOFSTEP]\nnlinarith\n  -- the core of the problem is these two algebraic identities:\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\n⊢ (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • ↑(4 • (2 / (1 - a)) • y) +\n      (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • (‖(2 / (1 - a)) • y‖ ^ 2 - 4) • v =\n    ↑x\n[PROOFSTEP]\nhave h₁ : (2 ^ 2 / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1 := by\n  -- Porting note: used to be `field_simp; simp only [Submodule.coe_norm] at *; nlinarith`\n      -- but cancel_denoms does not seem to be working and\n      -- nlinarith cannot close the goal even if it did\n      -- clear_value because field_simp does zeta-reduction (by design?) and is annoying\n  clear_value a y\n  field_simp\n  rw [div_eq_iff, duh]\n  · ring\n  · apply mul_ne_zero_iff.mpr ⟨?_, ha⟩\n    convert this using 2; rw [Submodule.coe_norm]; ring\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\n⊢ (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n[PROOFSTEP]\nclear_value a y\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\n⊢ (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n[PROOFSTEP]\nfield_simp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\n⊢ (1 - a) ^ 2 * 4 * 2 / ((2 ^ 2 * ‖↑y‖ ^ 2 + 4 * (1 - a) ^ 2) * (1 - a)) = 1\n[PROOFSTEP]\nrw [div_eq_iff, duh]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\n⊢ (1 - a) ^ 2 * 4 * 2 = 1 * ((2 ^ 2 * (↑1 - a ^ 2) + 4 * (1 - a) ^ 2) * (1 - a))\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\n⊢ (2 ^ 2 * ‖↑y‖ ^ 2 + 4 * (1 - a) ^ 2) * (1 - a) ≠ 0\n[PROOFSTEP]\napply mul_ne_zero_iff.mpr ⟨?_, ha⟩\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\n⊢ 2 ^ 2 * ‖↑y‖ ^ 2 + 4 * (1 - a) ^ 2 ≠ 0\n[PROOFSTEP]\nconvert this using 2\n[GOAL]\ncase h.e'_2.h.e'_5\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\n⊢ 2 ^ 2 * ‖↑y‖ ^ 2 = ↑(2 ^ 2) * ‖y‖ ^ 2\n[PROOFSTEP]\nrw [Submodule.coe_norm]\n[GOAL]\ncase h.e'_2.h.e'_5\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\n⊢ 2 ^ 2 * ‖↑y‖ ^ 2 = ↑(2 ^ 2) * ‖↑y‖ ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n⊢ (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • ↑(4 • (2 / (1 - a)) • y) +\n      (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • (‖(2 / (1 - a)) • y‖ ^ 2 - 4) • v =\n    ↑x\n[PROOFSTEP]\nhave h₂ : (2 ^ 2 / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * (2 ^ 2 / (1 - a) ^ 2 * ‖y‖ ^ 2 - 4) = a := by\n  -- Porting note: field_simp is not behaving as in ml3\n      -- see porting note above; previous proof used trans and was comparably complicated\n  clear_value a y\n  field_simp\n  rw [div_eq_iff, duh]\n  ring_nf\n    -- Porting note: shouldn't repeat myself but getting the coercion right is annoying\n  apply mul_ne_zero_iff.mpr ⟨?_, ?_⟩\n  · convert this using 2; rw [Submodule.coe_norm]; ring\n  · apply pow_ne_zero _ ha\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n⊢ (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 - 4) = a\n[PROOFSTEP]\nclear_value a y\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n⊢ (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 - 4) = a\n[PROOFSTEP]\nfield_simp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n⊢ (1 - a) ^ 2 * (2 ^ 2 * ‖↑y‖ ^ 2 - (1 - a) ^ 2 * 4) / ((2 ^ 2 * ‖↑y‖ ^ 2 + 4 * (1 - a) ^ 2) * (1 - a) ^ 2) = a\n[PROOFSTEP]\nrw [div_eq_iff, duh]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n⊢ (1 - a) ^ 2 * (2 ^ 2 * (↑1 - a ^ 2) - (1 - a) ^ 2 * 4) = a * ((2 ^ 2 * (↑1 - a ^ 2) + 4 * (1 - a) ^ 2) * (1 - a) ^ 2)\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n⊢ (2 ^ 2 * ‖↑y‖ ^ 2 + 4 * (1 - a) ^ 2) * (1 - a) ^ 2 ≠ 0\n[PROOFSTEP]\nring_nf\n  -- Porting note: shouldn't repeat myself but getting the coercion right is annoying\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n⊢ (2 ^ 2 * ‖↑y‖ ^ 2 + 4 * (1 - a) ^ 2) * (1 - a) ^ 2 ≠ 0\n[PROOFSTEP]\napply mul_ne_zero_iff.mpr ⟨?_, ?_⟩\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n⊢ 2 ^ 2 * ‖↑y‖ ^ 2 + 4 * (1 - a) ^ 2 ≠ 0\n[PROOFSTEP]\nconvert this using 2\n[GOAL]\ncase h.e'_2.h.e'_5\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n⊢ 2 ^ 2 * ‖↑y‖ ^ 2 = ↑(2 ^ 2) * ‖y‖ ^ 2\n[PROOFSTEP]\nrw [Submodule.coe_norm]\n[GOAL]\ncase h.e'_2.h.e'_5\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n⊢ 2 ^ 2 * ‖↑y‖ ^ 2 = ↑(2 ^ 2) * ‖↑y‖ ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nhvy : inner v ↑y = 0\na : ℝ\nha : 1 - a ≠ 0\nsplit : ↑x = a • v + ↑y\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\n⊢ (1 - a) ^ 2 ≠ 0\n[PROOFSTEP]\napply pow_ne_zero _ ha\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\nh₂ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 - 4) = a\n⊢ (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • ↑(4 • (2 / (1 - a)) • y) +\n      (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • (‖(2 / (1 - a)) • y‖ ^ 2 - 4) • v =\n    ↑x\n[PROOFSTEP]\nconvert congr_arg₂ Add.add (congr_arg (fun t => t • (y : E)) h₁) (congr_arg (fun t => t • v) h₂) using 1\n[GOAL]\ncase h.e'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\nh₂ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 - 4) = a\n⊢ (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • ↑(4 • (2 / (1 - a)) • y) +\n      (‖(2 / (1 - a)) • y‖ ^ 2 + 4)⁻¹ • (‖(2 / (1 - a)) • y‖ ^ 2 - 4) • v =\n    Add.add ((fun t => t • ↑y) ((↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a))))\n      ((fun t => t • v) ((↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 - 4)))\n[PROOFSTEP]\nsimp [inner_add_right, inner_smul_right, hvy, real_inner_self_eq_norm_mul_norm, hv, mul_smul, mul_pow, Real.norm_eq_abs,\n  sq_abs, norm_smul]\n  -- Porting note: used to be simp only [split, add_comm] but get maxRec errors\n[GOAL]\ncase h.e'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\nh₂ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 - 4) = a\n⊢ (2 ^ 2 / (1 - inner v ↑x) ^ 2 * ‖↑x - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) ↑x)‖ ^ 2 + 4)⁻¹ •\n        4 • (2 / (1 - inner v ↑x)) • (↑x - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) ↑x)) +\n      (2 ^ 2 / (1 - inner v ↑x) ^ 2 * ‖↑x - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) ↑x)‖ ^ 2 + 4)⁻¹ •\n        (2 ^ 2 / (1 - inner v ↑x) ^ 2 * ‖↑x - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) ↑x)‖ ^ 2 - 4) • v =\n    Add.add\n      ((2 ^ 2 / (1 - inner v ↑x) ^ 2 * ‖↑x - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) ↑x)‖ ^ 2 + 4)⁻¹ •\n        4 • (2 / (1 - inner v ↑x)) • (↑x - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) ↑x)))\n      ((2 ^ 2 / (1 - inner v ↑x) ^ 2 * ‖↑x - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) ↑x)‖ ^ 2 + 4)⁻¹ •\n        (2 ^ 2 / (1 - inner v ↑x) ^ 2 * ‖↑x - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) ↑x)‖ ^ 2 - 4) • v)\n[PROOFSTEP]\nrw [split, add_comm]\n[GOAL]\ncase h.e'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\nh₂ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 - 4) = a\n⊢ (2 ^ 2 / (1 - inner v (a • v + ↑y)) ^ 2 *\n              ‖a • v + ↑y - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) (a • v + ↑y))‖ ^ 2 +\n            4)⁻¹ •\n        (2 ^ 2 / (1 - inner v (a • v + ↑y)) ^ 2 *\n              ‖a • v + ↑y - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) (a • v + ↑y))‖ ^ 2 -\n            4) •\n          v +\n      (2 ^ 2 / (1 - inner v (a • v + ↑y)) ^ 2 *\n              ‖a • v + ↑y - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) (a • v + ↑y))‖ ^ 2 +\n            4)⁻¹ •\n        4 •\n          (2 / (1 - inner v (a • v + ↑y))) •\n            (a • v + ↑y - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) (a • v + ↑y))) =\n    Add.add\n      ((2 ^ 2 / (1 - inner v (a • v + ↑y)) ^ 2 *\n              ‖a • v + ↑y - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) (a • v + ↑y))‖ ^ 2 +\n            4)⁻¹ •\n        4 •\n          (2 / (1 - inner v (a • v + ↑y))) •\n            (a • v + ↑y - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) (a • v + ↑y))))\n      ((2 ^ 2 / (1 - inner v (a • v + ↑y)) ^ 2 *\n              ‖a • v + ↑y - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) (a • v + ↑y))‖ ^ 2 +\n            4)⁻¹ •\n        (2 ^ 2 / (1 - inner v (a • v + ↑y)) ^ 2 *\n              ‖a • v + ↑y - ↑(↑(orthogonalProjection (Submodule.span ℝ {v})) (a • v + ↑y))‖ ^ 2 -\n            4) •\n          v)\n[PROOFSTEP]\nac_rfl\n  -- Porting note: this branch did not exit in ml3\n[GOAL]\ncase h.e'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\nh₂ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 - 4) = a\n⊢ ↑x = Add.add ((fun t => t • ↑y) 1) ((fun t => t • v) a)\n[PROOFSTEP]\nrw [split, add_comm]\n[GOAL]\ncase h.e'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\nh₂ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 - 4) = a\n⊢ ↑y + a • v = Add.add ((fun t => t • ↑y) 1) ((fun t => t • v) a)\n[PROOFSTEP]\ncongr!\n[GOAL]\ncase h.e'_3.h.e'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\nh₂ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 - 4) = a\n⊢ ↑y = (fun t => t • ↑y) 1\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_3.h.e'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : ↑x ≠ v\na : ℝ := ↑(↑(innerSL ℝ) v) ↑x\ny : { x // x ∈ (Submodule.span ℝ {v})ᗮ } := ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x\nsplit : ↑x = a • v + ↑y\nhvy : inner v ↑y = 0\npythag : ↑1 = a ^ 2 + ‖y‖ ^ 2\nduh : ‖↑y‖ ^ 2 = ↑1 - a ^ 2\nha : 1 - a ≠ 0\nthis : ↑(2 ^ 2) * ‖y‖ ^ 2 + ↑4 * (1 - a) ^ 2 ≠ 0\nh₁ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * 4 * (2 / (1 - a)) = 1\nh₂ : (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 + 4)⁻¹ * (↑(2 ^ 2) / (1 - a) ^ 2 * ‖y‖ ^ 2 - 4) = a\n⊢ ↑(↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x) = 1 • ↑(↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x)\n[PROOFSTEP]\nrw [one_smul]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\n⊢ stereoToFun v ↑(stereoInvFun hv w) = w\n[PROOFSTEP]\nhave : 2 / (1 - (‖(w : E)‖ ^ 2 + 4)⁻¹ * (‖(w : E)‖ ^ 2 - 4)) * (‖(w : E)‖ ^ 2 + 4)⁻¹ * 4 = 1 :=\n  by\n  have : ‖(w : E)‖ ^ 2 + 4 ≠ 0 := by nlinarith\n  have : (4 : ℝ) + 4 ≠ 0 := by nlinarith\n  field_simp\n  ring\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\n⊢ ↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4 = 1\n[PROOFSTEP]\nhave : ‖(w : E)‖ ^ 2 + 4 ≠ 0 := by nlinarith\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\n⊢ ‖↑w‖ ^ 2 + 4 ≠ 0\n[PROOFSTEP]\nnlinarith\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nthis : ‖↑w‖ ^ 2 + 4 ≠ 0\n⊢ ↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4 = 1\n[PROOFSTEP]\nhave : (4 : ℝ) + 4 ≠ 0 := by nlinarith\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nthis : ‖↑w‖ ^ 2 + 4 ≠ 0\n⊢ 4 + 4 ≠ 0\n[PROOFSTEP]\nnlinarith\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nthis✝ : ‖↑w‖ ^ 2 + 4 ≠ 0\nthis : 4 + 4 ≠ 0\n⊢ ↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4 = 1\n[PROOFSTEP]\nfield_simp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nthis✝ : ‖↑w‖ ^ 2 + 4 ≠ 0\nthis : 4 + 4 ≠ 0\n⊢ 2 * (‖↑w‖ ^ 2 + 4) * 4 = (4 + 4) * (‖↑w‖ ^ 2 + 4)\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nthis : ↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4 = 1\n⊢ stereoToFun v ↑(stereoInvFun hv w) = w\n[PROOFSTEP]\nconvert congr_arg (· • w) this\n[GOAL]\ncase h.e'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nthis : ↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4 = 1\n⊢ stereoToFun v ↑(stereoInvFun hv w) = (↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4) • w\n[PROOFSTEP]\nhave h₁ : orthogonalProjection (ℝ ∙ v)ᗮ v = 0 := orthogonalProjection_orthogonalComplement_singleton_eq_zero v\n[GOAL]\ncase h.e'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nthis : ↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4 = 1\nh₁ : ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) v = 0\n⊢ stereoToFun v ↑(stereoInvFun hv w) = (↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4) • w\n[PROOFSTEP]\nhave h₃ : inner v w = (0 : ℝ) :=\n  Submodule.mem_orthogonal_singleton_iff_inner_right.mp\n    w.2\n      -- Porting note: was innerSL _ and now just inner\n[GOAL]\ncase h.e'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nthis : ↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4 = 1\nh₁ : ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) v = 0\nh₃ : inner v ↑w = 0\n⊢ stereoToFun v ↑(stereoInvFun hv w) = (↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4) • w\n[PROOFSTEP]\nhave h₄ : inner v v = (1 : ℝ) := by simp [real_inner_self_eq_norm_mul_norm, hv]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nthis : ↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4 = 1\nh₁ : ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) v = 0\nh₃ : inner v ↑w = 0\n⊢ inner v v = 1\n[PROOFSTEP]\nsimp [real_inner_self_eq_norm_mul_norm, hv]\n[GOAL]\ncase h.e'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nthis : ↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4 = 1\nh₁ : ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) v = 0\nh₃ : inner v ↑w = 0\nh₄ : inner v v = 1\n⊢ stereoToFun v ↑(stereoInvFun hv w) = (↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4) • w\n[PROOFSTEP]\nsimp [h₁, h₃, h₄, ContinuousLinearMap.map_add, ContinuousLinearMap.map_smul, mul_smul]\n[GOAL]\ncase h.e'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : { x // x ∈ (Submodule.span ℝ {v})ᗮ }\nthis : ↑2 / (↑1 - (‖↑w‖ ^ 2 + 4)⁻¹ * (‖↑w‖ ^ 2 - ↑4)) * (‖↑w‖ ^ 2 + 4)⁻¹ * 4 = 1\n⊢ w = 1 • w\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\n⊢ v ∈ sphere 0 1\n[PROOFSTEP]\nsimp [hv]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\n⊢ ∀ ⦃x : ↑(sphere 0 1)⦄, x ∈ {{ val := v, property := ?m.709780 }}ᶜ → (stereoToFun v ∘ Subtype.val) x ∈ Set.univ\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhx : x ∈ {{ val := v, property := ?m.709780 }}ᶜ\nh : ↑x = v\n⊢ x ∈ {{ val := v, property := ?m.709780 }}\n[PROOFSTEP]\nrw [← h] at hv \n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv✝ : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhv : ‖↑x‖ = 1\nhx : x ∈ {{ val := v, property := ?m.709780 }}ᶜ\nh : ↑x = v\n⊢ x ∈ {{ val := v, property := ?m.709780 }}\n[PROOFSTEP]\napply Subtype.ext\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv✝ : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhv : ‖↑x‖ = 1\nhx : x ∈ {{ val := v, property := ?m.709780 }}ᶜ\nh : ↑x = v\n⊢ ↑x = ↑{ val := v, property := ?m.709780 }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv✝ : ‖v‖ = 1\nx : ↑(sphere 0 1)\nhv : ‖↑x‖ = 1\nhx : x ∈ {{ val := v, property := ?m.709780 }}ᶜ\nh : ↑x = v\n⊢ ↑x = v\n[PROOFSTEP]\nexact h\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : ↑(sphere 0 1)\nh :\n  w ∈\n    { toFun := stereoToFun v ∘ Subtype.val, invFun := stereoInvFun hv, source := {{ val := v, property := ?m.709780 }}ᶜ,\n        target := Set.univ,\n        map_source' :=\n          (_ :\n            ∀ (a : ↑(sphere 0 1)),\n              a ∈ {{ val := v, property := ?m.709780 }}ᶜ →\n                (2 / (1 - inner v ↑a)) • ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑a ∈ Set.univ),\n        map_target' :=\n          (_ :\n            ∀ {w : { x // x ∈ (Submodule.span ℝ {v})ᗮ }},\n              w ∈ Set.univ → stereoInvFun hv w ∈ {{ val := v, property := ?m.709780 }} → False),\n        left_inv' :=\n          (_ :\n            ∀ (x : ↑(sphere 0 1)), x ∈ {{ val := v, property := ?m.709780 }}ᶜ → stereoInvFun hv (stereoToFun v ↑x) = x),\n        right_inv' :=\n          (_ :\n            ∀ (w : { x // x ∈ (Submodule.span ℝ {v})ᗮ }),\n              w ∈ Set.univ → stereoToFun v ↑(stereoInvFun hv w) = w) }.source\n⊢ ↑w ∈ {x | ↑(↑(innerSL ℝ) v) x ≠ 1}\n[PROOFSTEP]\ndsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : ↑(sphere 0 1)\nh :\n  w ∈\n    { toFun := stereoToFun v ∘ Subtype.val, invFun := stereoInvFun hv, source := {{ val := v, property := ?m.709780 }}ᶜ,\n        target := Set.univ,\n        map_source' :=\n          (_ :\n            ∀ (a : ↑(sphere 0 1)),\n              a ∈ {{ val := v, property := ?m.709780 }}ᶜ →\n                (2 / (1 - inner v ↑a)) • ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑a ∈ Set.univ),\n        map_target' :=\n          (_ :\n            ∀ {w : { x // x ∈ (Submodule.span ℝ {v})ᗮ }},\n              w ∈ Set.univ → stereoInvFun hv w ∈ {{ val := v, property := ?m.709780 }} → False),\n        left_inv' :=\n          (_ :\n            ∀ (x : ↑(sphere 0 1)), x ∈ {{ val := v, property := ?m.709780 }}ᶜ → stereoInvFun hv (stereoToFun v ↑x) = x),\n        right_inv' :=\n          (_ :\n            ∀ (w : { x // x ∈ (Submodule.span ℝ {v})ᗮ }),\n              w ∈ Set.univ → stereoToFun v ↑(stereoInvFun hv w) = w) }.source\n⊢ ¬inner v ↑w = 1\n[PROOFSTEP]\nexact h ∘ Subtype.ext ∘ Eq.symm ∘ (inner_eq_one_iff_of_norm_one hv (by simp)).mp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\nw : ↑(sphere 0 1)\nh :\n  w ∈\n    { toFun := stereoToFun v ∘ Subtype.val, invFun := stereoInvFun hv, source := {{ val := v, property := ?m.709780 }}ᶜ,\n        target := Set.univ,\n        map_source' :=\n          (_ :\n            ∀ (a : ↑(sphere 0 1)),\n              a ∈ {{ val := v, property := ?m.709780 }}ᶜ →\n                (2 / (1 - inner v ↑a)) • ↑(orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑a ∈ Set.univ),\n        map_target' :=\n          (_ :\n            ∀ {w : { x // x ∈ (Submodule.span ℝ {v})ᗮ }},\n              w ∈ Set.univ → stereoInvFun hv w ∈ {{ val := v, property := ?m.709780 }} → False),\n        left_inv' :=\n          (_ :\n            ∀ (x : ↑(sphere 0 1)), x ∈ {{ val := v, property := ?m.709780 }}ᶜ → stereoInvFun hv (stereoToFun v ↑x) = x),\n        right_inv' :=\n          (_ :\n            ∀ (w : { x // x ∈ (Submodule.span ℝ {v})ᗮ }),\n              w ∈ Set.univ → stereoToFun v ↑(stereoInvFun hv w) = w) }.source\n⊢ ‖↑w‖ = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv : E\nhv : ‖v‖ = 1\n⊢ v ∈ sphere 0 1\n[PROOFSTEP]\nsimp [hv]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ : E\nv : ↑(sphere 0 1)\n⊢ ↑(stereographic (_ : ‖↑v‖ = 1)) (-v) = 0\n[PROOFSTEP]\nsimp [stereographic_apply, orthogonalProjection_orthogonalComplement_singleton_eq_zero]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ : E\nv : ↑(sphere 0 1)\n⊢ ↑(stereographic (_ : ‖↑(-v)‖ = 1)) v = 0\n[PROOFSTEP]\nconvert stereographic_apply_neg (-v)\n[GOAL]\ncase h.e'_2.h.e'_6\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ : E\nv : ↑(sphere 0 1)\n⊢ v = - -v\n[PROOFSTEP]\next1\n[GOAL]\ncase h.e'_2.h.e'_6.a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nv✝ : E\nv : ↑(sphere 0 1)\n⊢ ↑v = ↑(- -v)\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\n⊢ (stereographic' n v).toLocalEquiv.source = {v}ᶜ\n[PROOFSTEP]\nsimp [stereographic']\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\n⊢ (stereographic' n v).toLocalEquiv.target = Set.univ\n[PROOFSTEP]\nsimp [stereographic']\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\n⊢ v ∈ ((fun v => stereographic' n (-v)) v).source\n[PROOFSTEP]\nsimpa using ne_neg_of_mem_unit_sphere ℝ v\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nu v : ↑(sphere 0 1)\n⊢ u = v ↔ inner ↑u ↑v = 1\n[PROOFSTEP]\nsimp [Subtype.ext_iff, inner_eq_one_iff_of_norm_one]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nx : EuclideanSpace ℝ (Fin n)\n⊢ ↑(↑(LocalHomeomorph.symm (stereographic' n v)) x) =\n    let U := (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr;\n    (‖↑(↑(LinearIsometryEquiv.symm U) x)‖ ^ 2 + 4)⁻¹ • 4 • ↑(↑(LinearIsometryEquiv.symm U) x) +\n      (‖↑(↑(LinearIsometryEquiv.symm U) x)‖ ^ 2 + 4)⁻¹ • (‖↑(↑(LinearIsometryEquiv.symm U) x)‖ ^ 2 - 4) • ↑v\n[PROOFSTEP]\nsimp [real_inner_comm, stereographic, stereographic', ← Submodule.coe_norm]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\n⊢ ∀ (e e' : LocalHomeomorph (↑(sphere 0 1)) (EuclideanSpace ℝ (Fin n))),\n    e ∈ atlas (EuclideanSpace ℝ (Fin n)) ↑(sphere 0 1) →\n      e' ∈ atlas (EuclideanSpace ℝ (Fin n)) ↑(sphere 0 1) →\n        ContDiffOn ℝ ⊤\n          (↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ∘\n            ↑(LocalHomeomorph.symm e ≫ₕ e') ∘ ↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))))\n          (↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ⁻¹'\n              (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source ∩\n            Set.range ↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)))\n[PROOFSTEP]\nrintro _ _ ⟨v, rfl⟩ ⟨v', rfl⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv v' : ↑(sphere 0 1)\n⊢ ContDiffOn ℝ ⊤\n    (↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ∘\n      ↑(LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v') ∘\n        ↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))))\n    (↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ⁻¹'\n        (LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v').toLocalEquiv.source ∩\n      Set.range ↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)))\n[PROOFSTEP]\nlet U :=\n  (\n      -- Removed type ascription, and this helped for some reason with timeout issues?OrthonormalBasis.fromOrthogonalSpanSingleton\n      (𝕜 := ℝ) n (ne_zero_of_mem_unit_sphere v)).repr\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv v' : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑v})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr\n⊢ ContDiffOn ℝ ⊤\n    (↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ∘\n      ↑(LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v') ∘\n        ↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))))\n    (↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ⁻¹'\n        (LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v').toLocalEquiv.source ∩\n      Set.range ↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)))\n[PROOFSTEP]\nlet U' :=\n  (\n      -- Removed type ascription, and this helped for some reason with timeout issues?OrthonormalBasis.fromOrthogonalSpanSingleton\n      (𝕜 := ℝ) n (ne_zero_of_mem_unit_sphere v')).repr\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv v' : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑v})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr\nU' : { x // x ∈ (Submodule.span ℝ {↑v'})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v' ≠ 0)).repr\n⊢ ContDiffOn ℝ ⊤\n    (↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ∘\n      ↑(LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v') ∘\n        ↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))))\n    (↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ⁻¹'\n        (LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v').toLocalEquiv.source ∩\n      Set.range ↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)))\n[PROOFSTEP]\nhave := findim (E := E) n\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv v' : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑v})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr\nU' : { x // x ∈ (Submodule.span ℝ {↑v'})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v' ≠ 0)).repr\nthis : FiniteDimensional ℝ E\n⊢ ContDiffOn ℝ ⊤\n    (↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ∘\n      ↑(LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v') ∘\n        ↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))))\n    (↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ⁻¹'\n        (LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v').toLocalEquiv.source ∩\n      Set.range ↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)))\n[PROOFSTEP]\nhave H₁ := U'.contDiff.comp_contDiffOn contDiffOn_stereoToFun\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv v' : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑v})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr\nU' : { x // x ∈ (Submodule.span ℝ {↑v'})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v' ≠ 0)).repr\nthis : FiniteDimensional ℝ E\nH₁ : ContDiffOn ℝ ⊤ (↑U' ∘ stereoToFun ↑v') {x | ↑(↑(innerSL ℝ) ↑v') x ≠ 1}\n⊢ ContDiffOn ℝ ⊤\n    (↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ∘\n      ↑(LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v') ∘\n        ↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))))\n    (↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ⁻¹'\n        (LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v').toLocalEquiv.source ∩\n      Set.range ↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)))\n[PROOFSTEP]\nhave H₂ := (contDiff_stereoInvFunAux (v := v.val) |>.comp (ℝ ∙ (v : E))ᗮ.subtypeL.contDiff).comp U.symm.contDiff\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv v' : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑v})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr\nU' : { x // x ∈ (Submodule.span ℝ {↑v'})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v' ≠ 0)).repr\nthis : FiniteDimensional ℝ E\nH₁ : ContDiffOn ℝ ⊤ (↑U' ∘ stereoToFun ↑v') {x | ↑(↑(innerSL ℝ) ↑v') x ≠ 1}\nH₂ :\n  ContDiff ℝ ⊤ ((stereoInvFunAux ↑v ∘ ↑(Submodule.subtypeL (Submodule.span ℝ {↑v})ᗮ)) ∘ ↑(LinearIsometryEquiv.symm U))\n⊢ ContDiffOn ℝ ⊤\n    (↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ∘\n      ↑(LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v') ∘\n        ↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))))\n    (↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ⁻¹'\n        (LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v').toLocalEquiv.source ∩\n      Set.range ↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)))\n[PROOFSTEP]\nconvert H₁.comp' (H₂.contDiffOn : ContDiffOn ℝ ⊤ _ Set.univ) using 1\n  -- -- squeezed from `ext, simp [sphere_ext_iff, stereographic'_symm_apply, real_inner_comm]`\n[GOAL]\ncase h.e'_11\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv v' : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑v})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr\nU' : { x // x ∈ (Submodule.span ℝ {↑v'})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v' ≠ 0)).repr\nthis : FiniteDimensional ℝ E\nH₁ : ContDiffOn ℝ ⊤ (↑U' ∘ stereoToFun ↑v') {x | ↑(↑(innerSL ℝ) ↑v') x ≠ 1}\nH₂ :\n  ContDiff ℝ ⊤ ((stereoInvFunAux ↑v ∘ ↑(Submodule.subtypeL (Submodule.span ℝ {↑v})ᗮ)) ∘ ↑(LinearIsometryEquiv.symm U))\n⊢ ↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ⁻¹'\n        (LocalHomeomorph.symm (stereographic' n v) ≫ₕ stereographic' n v').toLocalEquiv.source ∩\n      Set.range ↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)) =\n    Set.univ ∩\n      (stereoInvFunAux ↑v ∘ ↑(Submodule.subtypeL (Submodule.span ℝ {↑v})ᗮ)) ∘ ↑(LinearIsometryEquiv.symm U) ⁻¹'\n        {x | ↑(↑(innerSL ℝ) ↑v') x ≠ 1}\n[PROOFSTEP]\nsimp only [LocalHomeomorph.trans_toLocalEquiv, LocalHomeomorph.symm_toLocalEquiv, LocalEquiv.trans_source,\n  LocalEquiv.symm_source, stereographic'_target, stereographic'_source]\n[GOAL]\ncase h.e'_11\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv v' : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑v})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr\nU' : { x // x ∈ (Submodule.span ℝ {↑v'})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v' ≠ 0)).repr\nthis : FiniteDimensional ℝ E\nH₁ : ContDiffOn ℝ ⊤ (↑U' ∘ stereoToFun ↑v') {x | ↑(↑(innerSL ℝ) ↑v') x ≠ 1}\nH₂ :\n  ContDiff ℝ ⊤ ((stereoInvFunAux ↑v ∘ ↑(Submodule.subtypeL (Submodule.span ℝ {↑v})ᗮ)) ∘ ↑(LinearIsometryEquiv.symm U))\n⊢ ↑(ModelWithCorners.symm 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ⁻¹'\n        (Set.univ ∩ ↑(LocalEquiv.symm (stereographic' n v).toLocalEquiv) ⁻¹' {v'}ᶜ) ∩\n      Set.range ↑𝓘(ℝ, EuclideanSpace ℝ (Fin n)) =\n    Set.univ ∩\n      (stereoInvFunAux ↑v ∘ ↑(Submodule.subtypeL (Submodule.span ℝ {↑v})ᗮ)) ∘\n          ↑(LinearIsometryEquiv.symm (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr) ⁻¹'\n        {x | ↑(↑(innerSL ℝ) ↑v') x ≠ 1}\n[PROOFSTEP]\nsimp only [modelWithCornersSelf_coe, modelWithCornersSelf_coe_symm, Set.preimage_id, Set.range_id, Set.inter_univ,\n  Set.univ_inter, Set.compl_singleton_eq, Set.preimage_setOf_eq]\n[GOAL]\ncase h.e'_11\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv v' : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑v})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr\nU' : { x // x ∈ (Submodule.span ℝ {↑v'})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v' ≠ 0)).repr\nthis : FiniteDimensional ℝ E\nH₁ : ContDiffOn ℝ ⊤ (↑U' ∘ stereoToFun ↑v') {x | ↑(↑(innerSL ℝ) ↑v') x ≠ 1}\nH₂ :\n  ContDiff ℝ ⊤ ((stereoInvFunAux ↑v ∘ ↑(Submodule.subtypeL (Submodule.span ℝ {↑v})ᗮ)) ∘ ↑(LinearIsometryEquiv.symm U))\n⊢ {a | ↑(LocalEquiv.symm (stereographic' n v).toLocalEquiv) (id a) ≠ v'} =\n    {a |\n      ↑(↑(innerSL ℝ) ↑v')\n          (((stereoInvFunAux ↑v ∘ ↑(Submodule.subtypeL (Submodule.span ℝ {↑v})ᗮ)) ∘\n              ↑(LinearIsometryEquiv.symm (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr))\n            a) ≠\n        1}\n[PROOFSTEP]\nsimp only [id.def, comp_apply, Submodule.subtypeL_apply, LocalHomeomorph.coe_coe_symm, innerSL_apply, Ne.def,\n  sphere_ext_iff, real_inner_comm (v' : E)]\n[GOAL]\ncase h.e'_11\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv v' : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑v})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr\nU' : { x // x ∈ (Submodule.span ℝ {↑v'})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v' ≠ 0)).repr\nthis : FiniteDimensional ℝ E\nH₁ : ContDiffOn ℝ ⊤ (↑U' ∘ stereoToFun ↑v') {x | ↑(↑(innerSL ℝ) ↑v') x ≠ 1}\nH₂ :\n  ContDiff ℝ ⊤ ((stereoInvFunAux ↑v ∘ ↑(Submodule.subtypeL (Submodule.span ℝ {↑v})ᗮ)) ∘ ↑(LinearIsometryEquiv.symm U))\n⊢ {a | ¬inner ↑v' ↑(↑(LocalHomeomorph.symm (stereographic' n v)) a) = 1} =\n    {a |\n      ¬inner (↑v')\n            (stereoInvFunAux ↑v\n              ↑(↑(LinearIsometryEquiv.symm (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑v ≠ 0)).repr) a)) =\n          1}\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\n⊢ ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, E) ⊤ Subtype.val\n[PROOFSTEP]\nhave := smoothMfldWithCorners (E := E) (n := n)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nthis : SmoothManifoldWithCorners 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ↑(sphere 0 1)\n⊢ ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, E) ⊤ Subtype.val\n[PROOFSTEP]\nrw [contMDiff_iff]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nthis : SmoothManifoldWithCorners 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ↑(sphere 0 1)\n⊢ Continuous Subtype.val ∧\n    ∀ (x : { x // x ∈ sphere 0 1 }) (y : E),\n      ContDiffOn ℝ ⊤\n        (↑(extChartAt 𝓘(ℝ, E) y) ∘ Subtype.val ∘ ↑(LocalEquiv.symm (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) x)))\n        ((extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) x).target ∩\n          ↑(LocalEquiv.symm (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) x)) ⁻¹'\n            (Subtype.val ⁻¹' (extChartAt 𝓘(ℝ, E) y).source))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nthis : SmoothManifoldWithCorners 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ↑(sphere 0 1)\n⊢ Continuous Subtype.val\n[PROOFSTEP]\nexact continuous_subtype_val\n[GOAL]\ncase right\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nthis : SmoothManifoldWithCorners 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ↑(sphere 0 1)\n⊢ ∀ (x : { x // x ∈ sphere 0 1 }) (y : E),\n    ContDiffOn ℝ ⊤\n      (↑(extChartAt 𝓘(ℝ, E) y) ∘ Subtype.val ∘ ↑(LocalEquiv.symm (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) x)))\n      ((extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) x).target ∩\n        ↑(LocalEquiv.symm (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) x)) ⁻¹'\n          (Subtype.val ⁻¹' (extChartAt 𝓘(ℝ, E) y).source))\n[PROOFSTEP]\nintro v _\n[GOAL]\ncase right\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nthis : SmoothManifoldWithCorners 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ↑(sphere 0 1)\nv : { x // x ∈ sphere 0 1 }\ny✝ : E\n⊢ ContDiffOn ℝ ⊤\n    (↑(extChartAt 𝓘(ℝ, E) y✝) ∘ Subtype.val ∘ ↑(LocalEquiv.symm (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v)))\n    ((extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v).target ∩\n      ↑(LocalEquiv.symm (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v)) ⁻¹'\n        (Subtype.val ⁻¹' (extChartAt 𝓘(ℝ, E) y✝).source))\n[PROOFSTEP]\nlet U : _ ≃ₗᵢ[ℝ] _ :=\n  (\n      -- Again, partially removing type ascription...OrthonormalBasis.fromOrthogonalSpanSingleton n\n      (ne_zero_of_mem_unit_sphere (-v))).repr\n[GOAL]\ncase right\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nthis : SmoothManifoldWithCorners 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ↑(sphere 0 1)\nv : { x // x ∈ sphere 0 1 }\ny✝ : E\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\n⊢ ContDiffOn ℝ ⊤\n    (↑(extChartAt 𝓘(ℝ, E) y✝) ∘ Subtype.val ∘ ↑(LocalEquiv.symm (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v)))\n    ((extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v).target ∩\n      ↑(LocalEquiv.symm (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v)) ⁻¹'\n        (Subtype.val ⁻¹' (extChartAt 𝓘(ℝ, E) y✝).source))\n[PROOFSTEP]\nexact ((contDiff_stereoInvFunAux.comp (ℝ ∙ (-v : E))ᗮ.subtypeL.contDiff).comp U.symm.contDiff).contDiffOn\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\n⊢ ContMDiff I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) m (Set.codRestrict (fun x => f x) (sphere 0 1) hf')\n[PROOFSTEP]\nrw [contMDiff_iff_target]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\n⊢ Continuous (Set.codRestrict (fun x => f x) (sphere 0 1) hf') ∧\n    ∀ (y : ↑(sphere 0 1)),\n      ContMDiffOn I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) m\n        (↑(extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) y) ∘ Set.codRestrict (fun x => f x) (sphere 0 1) hf')\n        (Set.codRestrict (fun x => f x) (sphere 0 1) hf' ⁻¹' (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) y).source)\n[PROOFSTEP]\nrefine' ⟨continuous_induced_rng.2 hf.continuous, _⟩\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\n⊢ ∀ (y : ↑(sphere 0 1)),\n    ContMDiffOn I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) m\n      (↑(extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) y) ∘ Set.codRestrict (fun x => f x) (sphere 0 1) hf')\n      (Set.codRestrict (fun x => f x) (sphere 0 1) hf' ⁻¹' (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) y).source)\n[PROOFSTEP]\nintro v\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\n⊢ ContMDiffOn I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) m\n    (↑(extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v) ∘ Set.codRestrict (fun x => f x) (sphere 0 1) hf')\n    (Set.codRestrict (fun x => f x) (sphere 0 1) hf' ⁻¹' (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v).source)\n[PROOFSTEP]\nlet U : _ ≃ₗᵢ[ℝ] _ :=\n  (\n      -- Again, partially removing type ascription... Weird that this helps!OrthonormalBasis.fromOrthogonalSpanSingleton\n      n (ne_zero_of_mem_unit_sphere (-v))).repr\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\n⊢ ContMDiffOn I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) m\n    (↑(extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v) ∘ Set.codRestrict (fun x => f x) (sphere 0 1) hf')\n    (Set.codRestrict (fun x => f x) (sphere 0 1) hf' ⁻¹' (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v).source)\n[PROOFSTEP]\nhave h : ContDiffOn ℝ ⊤ _ Set.univ := U.contDiff.contDiffOn\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nh : ContDiffOn ℝ ⊤ (↑U) Set.univ\n⊢ ContMDiffOn I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) m\n    (↑(extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v) ∘ Set.codRestrict (fun x => f x) (sphere 0 1) hf')\n    (Set.codRestrict (fun x => f x) (sphere 0 1) hf' ⁻¹' (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v).source)\n[PROOFSTEP]\nhave H₁ := (h.comp' contDiffOn_stereoToFun).contMDiffOn\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nh : ContDiffOn ℝ ⊤ (↑U) Set.univ\nH₁ :\n  ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ⊤ (↑U ∘ stereoToFun ↑(-v))\n    ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\n⊢ ContMDiffOn I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) m\n    (↑(extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v) ∘ Set.codRestrict (fun x => f x) (sphere 0 1) hf')\n    (Set.codRestrict (fun x => f x) (sphere 0 1) hf' ⁻¹' (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v).source)\n[PROOFSTEP]\nhave H₂ : ContMDiffOn _ _ _ _ Set.univ := hf.contMDiffOn\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nh : ContDiffOn ℝ ⊤ (↑U) Set.univ\nH₁ :\n  ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ⊤ (↑U ∘ stereoToFun ↑(-v))\n    ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\nH₂ : ContMDiffOn I 𝓘(ℝ, E) m f Set.univ\n⊢ ContMDiffOn I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) m\n    (↑(extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v) ∘ Set.codRestrict (fun x => f x) (sphere 0 1) hf')\n    (Set.codRestrict (fun x => f x) (sphere 0 1) hf' ⁻¹' (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v).source)\n[PROOFSTEP]\nconvert (H₁.of_le le_top).comp' H₂ using 1\n[GOAL]\ncase h.e'_23\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nh : ContDiffOn ℝ ⊤ (↑U) Set.univ\nH₁ :\n  ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ⊤ (↑U ∘ stereoToFun ↑(-v))\n    ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\nH₂ : ContMDiffOn I 𝓘(ℝ, E) m f Set.univ\n⊢ Set.codRestrict (fun x => f x) (sphere 0 1) hf' ⁻¹' (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v).source =\n    Set.univ ∩ f ⁻¹' ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_23.h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nh : ContDiffOn ℝ ⊤ (↑U) Set.univ\nH₁ :\n  ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ⊤ (↑U ∘ stereoToFun ↑(-v))\n    ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\nH₂ : ContMDiffOn I 𝓘(ℝ, E) m f Set.univ\nx : M\n⊢ x ∈ Set.codRestrict (fun x => f x) (sphere 0 1) hf' ⁻¹' (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v).source ↔\n    x ∈ Set.univ ∩ f ⁻¹' ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\n[PROOFSTEP]\nhave hfxv : f x = -↑v ↔ ⟪f x, -↑v⟫_ℝ = 1 :=\n  by\n  have hfx : ‖f x‖ = 1 := by simpa using hf' x\n  rw [inner_eq_one_iff_of_norm_one hfx]\n  exact\n    norm_eq_of_mem_sphere\n      (-v)\n        -- Porting note: unfold more\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nh : ContDiffOn ℝ ⊤ (↑U) Set.univ\nH₁ :\n  ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ⊤ (↑U ∘ stereoToFun ↑(-v))\n    ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\nH₂ : ContMDiffOn I 𝓘(ℝ, E) m f Set.univ\nx : M\n⊢ f x = -↑v ↔ inner (f x) (-↑v) = 1\n[PROOFSTEP]\nhave hfx : ‖f x‖ = 1 := by simpa using hf' x\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nh : ContDiffOn ℝ ⊤ (↑U) Set.univ\nH₁ :\n  ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ⊤ (↑U ∘ stereoToFun ↑(-v))\n    ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\nH₂ : ContMDiffOn I 𝓘(ℝ, E) m f Set.univ\nx : M\n⊢ ‖f x‖ = 1\n[PROOFSTEP]\nsimpa using hf' x\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nh : ContDiffOn ℝ ⊤ (↑U) Set.univ\nH₁ :\n  ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ⊤ (↑U ∘ stereoToFun ↑(-v))\n    ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\nH₂ : ContMDiffOn I 𝓘(ℝ, E) m f Set.univ\nx : M\nhfx : ‖f x‖ = 1\n⊢ f x = -↑v ↔ inner (f x) (-↑v) = 1\n[PROOFSTEP]\nrw [inner_eq_one_iff_of_norm_one hfx]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nh : ContDiffOn ℝ ⊤ (↑U) Set.univ\nH₁ :\n  ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ⊤ (↑U ∘ stereoToFun ↑(-v))\n    ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\nH₂ : ContMDiffOn I 𝓘(ℝ, E) m f Set.univ\nx : M\nhfx : ‖f x‖ = 1\n⊢ ‖-↑v‖ = 1\n[PROOFSTEP]\nexact\n  norm_eq_of_mem_sphere\n    (-v)\n      -- Porting note: unfold more\n[GOAL]\ncase h.e'_23.h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nh : ContDiffOn ℝ ⊤ (↑U) Set.univ\nH₁ :\n  ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ⊤ (↑U ∘ stereoToFun ↑(-v))\n    ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\nH₂ : ContMDiffOn I 𝓘(ℝ, E) m f Set.univ\nx : M\nhfxv : f x = -↑v ↔ inner (f x) (-↑v) = 1\n⊢ x ∈ Set.codRestrict (fun x => f x) (sphere 0 1) hf' ⁻¹' (extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v).source ↔\n    x ∈ Set.univ ∩ f ⁻¹' ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\n[PROOFSTEP]\ndsimp [chartAt, Set.codRestrict, ChartedSpace.chartAt]\n[GOAL]\ncase h.e'_23.h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nm : ℕ∞\nf : M → E\nhf : ContMDiff I 𝓘(ℝ, E) m f\nhf' : ∀ (x : M), f x ∈ sphere 0 1\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nh : ContDiffOn ℝ ⊤ (↑U) Set.univ\nH₁ :\n  ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ⊤ (↑U ∘ stereoToFun ↑(-v))\n    ({x | ↑(↑(innerSL ℝ) ↑(-v)) x ≠ 1} ∩ stereoToFun ↑(-v) ⁻¹' Set.univ)\nH₂ : ContMDiffOn I 𝓘(ℝ, E) m f Set.univ\nx : M\nhfxv : f x = -↑v ↔ inner (f x) (-↑v) = 1\n⊢ x ∈\n      (fun x => { val := f x, property := (_ : f x ∈ sphere 0 1) }) ⁻¹' (stereographic' n (-v)).toLocalEquiv.source ∩\n        Set.univ ↔\n    x ∈ Set.univ ∩ ({a | ¬inner (-↑v) (f a) = 1} ∩ Set.univ)\n[PROOFSTEP]\nsimp [not_iff_not, Subtype.ext_iff, hfxv, real_inner_comm]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\n⊢ ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ⊤ fun x => -x\n[PROOFSTEP]\napply ContMDiff.codRestrict_sphere\n[GOAL]\ncase hf\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\n⊢ ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, E) ⊤ fun x => -↑x\n[PROOFSTEP]\napply contDiff_neg.contMDiff.comp _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\n⊢ ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, E) ⊤ fun x => ↑x\n[PROOFSTEP]\nexact contMDiff_coe_sphere\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\n⊢ LinearMap.range (mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, E) Subtype.val v) = (Submodule.span ℝ {↑v})ᗮ\n[PROOFSTEP]\nrw [((contMDiff_coe_sphere v).mdifferentiableAt le_top).mfderiv]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\n⊢ LinearMap.range\n      (fderivWithin ℝ (writtenInExtChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, E) v Subtype.val)\n        (Set.range ↑𝓘(ℝ, EuclideanSpace ℝ (Fin n))) (↑(extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v) v)) =\n    (Submodule.span ℝ {↑v})ᗮ\n[PROOFSTEP]\ndsimp [chartAt]\n  -- rw [LinearIsometryEquiv.toHomeomorph_symm]\n    -- rw [←LinearIsometryEquiv.coe_toHomeomorph]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\n⊢ LinearMap.range\n      (fderivWithin ℝ (↑(ChartedSpace.chartAt ↑v) ∘ Subtype.val ∘ ↑(LocalHomeomorph.symm (ChartedSpace.chartAt v)))\n        (Set.range id) (↑(ChartedSpace.chartAt v) v)) =\n    (Submodule.span ℝ {↑v})ᗮ\n[PROOFSTEP]\nsimp only [chartAt, stereographic_neg_apply, fderivWithin_univ, LinearIsometryEquiv.toHomeomorph_symm,\n  LinearIsometryEquiv.coe_toHomeomorph, LinearIsometryEquiv.map_zero, mfld_simps]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\n⊢ LinearMap.range\n      (fderiv ℝ (Subtype.val ∘ ↑(LocalHomeomorph.symm (ChartedSpace.chartAt v))) (↑(ChartedSpace.chartAt v) v)) =\n    (Submodule.span ℝ {↑v})ᗮ\n[PROOFSTEP]\nlet U := (OrthonormalBasis.fromOrthogonalSpanSingleton (𝕜 := ℝ) n (ne_zero_of_mem_unit_sphere (-v))).repr\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\n⊢ LinearMap.range\n      (fderiv ℝ (Subtype.val ∘ ↑(LocalHomeomorph.symm (ChartedSpace.chartAt v))) (↑(ChartedSpace.chartAt v) v)) =\n    (Submodule.span ℝ {↑v})ᗮ\n[PROOFSTEP]\nsuffices : LinearMap.range (fderiv ℝ ((stereoInvFunAux (-v : E) ∘ (↑)) ∘ U.symm) 0) = (ℝ ∙ (v : E))ᗮ\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  LinearMap.range (fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0) =\n    (Submodule.span ℝ {↑v})ᗮ\n⊢ LinearMap.range\n      (fderiv ℝ (Subtype.val ∘ ↑(LocalHomeomorph.symm (ChartedSpace.chartAt v))) (↑(ChartedSpace.chartAt v) v)) =\n    (Submodule.span ℝ {↑v})ᗮ\n[PROOFSTEP]\nconvert this using 3\n[GOAL]\ncase h.e'_2.h.h.e'_15.h.h.e'_10\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  LinearMap.range (fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0) =\n    (Submodule.span ℝ {↑v})ᗮ\ne_1✝ : Submodule ℝ (TangentSpace 𝓘(ℝ, E) ↑v) = Submodule ℝ E\ne_12✝ :\n  (TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v →L[ℝ] TangentSpace 𝓘(ℝ, E) ↑v) = (EuclideanSpace ℝ (Fin n) →L[ℝ] E)\n⊢ ↑(ChartedSpace.chartAt v) v = 0\n[PROOFSTEP]\nshow stereographic' n (-v) v = 0\n[GOAL]\ncase h.e'_2.h.h.e'_15.h.h.e'_10\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  LinearMap.range (fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0) =\n    (Submodule.span ℝ {↑v})ᗮ\ne_1✝ : Submodule ℝ (TangentSpace 𝓘(ℝ, E) ↑v) = Submodule ℝ E\ne_12✝ :\n  (TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v →L[ℝ] TangentSpace 𝓘(ℝ, E) ↑v) = (EuclideanSpace ℝ (Fin n) →L[ℝ] E)\n⊢ ↑(stereographic' n (-v)) v = 0\n[PROOFSTEP]\ndsimp [stereographic']\n[GOAL]\ncase h.e'_2.h.h.e'_15.h.h.e'_10\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  LinearMap.range (fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0) =\n    (Submodule.span ℝ {↑v})ᗮ\ne_1✝ : Submodule ℝ (TangentSpace 𝓘(ℝ, E) ↑v) = Submodule ℝ E\ne_12✝ :\n  (TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v →L[ℝ] TangentSpace 𝓘(ℝ, E) ↑v) = (EuclideanSpace ℝ (Fin n) →L[ℝ] E)\n⊢ ↑(OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr (↑(stereographic (_ : ‖↑(-v)‖ = 1)) v) = 0\n[PROOFSTEP]\nsimp only [AddEquivClass.map_eq_zero_iff]\n[GOAL]\ncase h.e'_2.h.h.e'_15.h.h.e'_10\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  LinearMap.range (fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0) =\n    (Submodule.span ℝ {↑v})ᗮ\ne_1✝ : Submodule ℝ (TangentSpace 𝓘(ℝ, E) ↑v) = Submodule ℝ E\ne_12✝ :\n  (TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v →L[ℝ] TangentSpace 𝓘(ℝ, E) ↑v) = (EuclideanSpace ℝ (Fin n) →L[ℝ] E)\n⊢ ↑(stereographic (_ : ‖↑(-v)‖ = 1)) v = 0\n[PROOFSTEP]\napply stereographic_neg_apply\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\n⊢ LinearMap.range (fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0) =\n    (Submodule.span ℝ {↑v})ᗮ\n[PROOFSTEP]\nhave :\n  HasFDerivAt (stereoInvFunAux (-v : E) ∘ (Subtype.val : (ℝ ∙ (↑(-v) : E))ᗮ → E)) (ℝ ∙ (↑(-v) : E))ᗮ.subtypeL\n    (U.symm 0) :=\n  by\n  convert hasFDerivAt_stereoInvFunAux_comp_coe (-v : E)\n  simp\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\n⊢ HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n[PROOFSTEP]\nconvert hasFDerivAt_stereoInvFunAux_comp_coe (-v : E)\n[GOAL]\ncase h.e'_11.h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\ne_3✝ : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } = { x // x ∈ ↑(Submodule.span ℝ {-↑v})ᗮ }\n⊢ ↑(LinearIsometryEquiv.symm U) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ LinearMap.range (fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0) =\n    (Submodule.span ℝ {↑v})ᗮ\n[PROOFSTEP]\nconvert congrArg LinearMap.range (this.comp 0 U.symm.toContinuousLinearEquiv.hasFDerivAt).fderiv\n[GOAL]\ncase h.e'_3\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ (Submodule.span ℝ {↑v})ᗮ =\n    LinearMap.range\n      (ContinuousLinearMap.comp (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n        ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm U)))\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_3\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ LinearMap.range\n      (ContinuousLinearMap.comp (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n        ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm U))) =\n    (Submodule.span ℝ {↑v})ᗮ\n[PROOFSTEP]\nconvert (U.symm : EuclideanSpace ℝ (Fin n) ≃ₗᵢ[ℝ] (ℝ ∙ (↑(-v) : E))ᗮ).range_comp (ℝ ∙ (↑(-v) : E))ᗮ.subtype using 1\n[GOAL]\ncase h.e'_3\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ (Submodule.span ℝ {↑v})ᗮ = LinearMap.range (Submodule.subtype (Submodule.span ℝ {↑(-v)})ᗮ)\n[PROOFSTEP]\nsimp only [Submodule.range_subtype, coe_neg_sphere]\n[GOAL]\ncase h.e'_3\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ (Submodule.span ℝ {↑v})ᗮ = (Submodule.span ℝ {-↑v})ᗮ\n[PROOFSTEP]\ncongr 1\n  -- we must show `submodule.span ℝ {v} = submodule.span ℝ {-v}`\n[GOAL]\ncase h.e'_3.e_K\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ Submodule.span ℝ {↑v} = Submodule.span ℝ {-↑v}\n[PROOFSTEP]\napply Submodule.span_eq_span\n[GOAL]\ncase h.e'_3.e_K.hs\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ {↑v} ⊆ ↑(Submodule.span ℝ {-↑v})\n[PROOFSTEP]\nsimp only [Set.singleton_subset_iff, SetLike.mem_coe]\n[GOAL]\ncase h.e'_3.e_K.hs\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ ↑v ∈ Submodule.span ℝ {-↑v}\n[PROOFSTEP]\nrw [← Submodule.neg_mem_iff]\n[GOAL]\ncase h.e'_3.e_K.hs\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ -↑v ∈ Submodule.span ℝ {-↑v}\n[PROOFSTEP]\nexact Submodule.mem_span_singleton_self (-v : E)\n[GOAL]\ncase h.e'_3.e_K.ht\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ {-↑v} ⊆ ↑(Submodule.span ℝ {↑v})\n[PROOFSTEP]\nsimp only [Set.singleton_subset_iff, SetLike.mem_coe]\n[GOAL]\ncase h.e'_3.e_K.ht\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ -↑v ∈ Submodule.span ℝ {↑v}\n[PROOFSTEP]\nrw [Submodule.neg_mem_iff]\n[GOAL]\ncase h.e'_3.e_K.ht\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ ↑v ∈ Submodule.span ℝ {↑v}\n[PROOFSTEP]\nexact Submodule.mem_span_singleton_self (v : E)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\n⊢ Injective ↑(mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, E) Subtype.val v)\n[PROOFSTEP]\nrw [((contMDiff_coe_sphere v).mdifferentiableAt le_top).mfderiv]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\n⊢ Injective\n    ↑(fderivWithin ℝ (writtenInExtChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, E) v Subtype.val)\n        (Set.range ↑𝓘(ℝ, EuclideanSpace ℝ (Fin n))) (↑(extChartAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v) v))\n[PROOFSTEP]\nsimp only [chartAt, stereographic', stereographic_neg_apply, fderivWithin_univ, LinearIsometryEquiv.toHomeomorph_symm,\n  LinearIsometryEquiv.coe_toHomeomorph, LinearIsometryEquiv.map_zero, mfld_simps]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\n⊢ Injective ↑(fderiv ℝ (Subtype.val ∘ ↑(LocalHomeomorph.symm (ChartedSpace.chartAt v))) (↑(ChartedSpace.chartAt v) v))\n[PROOFSTEP]\nlet U := (OrthonormalBasis.fromOrthogonalSpanSingleton (𝕜 := ℝ) n (ne_zero_of_mem_unit_sphere (-v))).repr\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\n⊢ Injective ↑(fderiv ℝ (Subtype.val ∘ ↑(LocalHomeomorph.symm (ChartedSpace.chartAt v))) (↑(ChartedSpace.chartAt v) v))\n[PROOFSTEP]\nsuffices : Injective (fderiv ℝ ((stereoInvFunAux (-v : E) ∘ (↑)) ∘ U.symm) 0)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis : Injective ↑(fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0)\n⊢ Injective ↑(fderiv ℝ (Subtype.val ∘ ↑(LocalHomeomorph.symm (ChartedSpace.chartAt v))) (↑(ChartedSpace.chartAt v) v))\n[PROOFSTEP]\nconvert this using 3\n[GOAL]\ncase h.e'_3.h.h.e'_5.h.h.e'_10\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis : Injective ↑(fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0)\ne_1✝¹ : TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v = EuclideanSpace ℝ (Fin n)\ne_2✝ : TangentSpace 𝓘(ℝ, E) ↑v = E\ne_1✝ :\n  (TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v →L[ℝ] TangentSpace 𝓘(ℝ, E) ↑v) = (EuclideanSpace ℝ (Fin n) →L[ℝ] E)\n⊢ ↑(ChartedSpace.chartAt v) v = 0\n[PROOFSTEP]\nshow stereographic' n (-v) v = 0\n[GOAL]\ncase h.e'_3.h.h.e'_5.h.h.e'_10\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis : Injective ↑(fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0)\ne_1✝¹ : TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v = EuclideanSpace ℝ (Fin n)\ne_2✝ : TangentSpace 𝓘(ℝ, E) ↑v = E\ne_1✝ :\n  (TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v →L[ℝ] TangentSpace 𝓘(ℝ, E) ↑v) = (EuclideanSpace ℝ (Fin n) →L[ℝ] E)\n⊢ ↑(stereographic' n (-v)) v = 0\n[PROOFSTEP]\ndsimp [stereographic']\n[GOAL]\ncase h.e'_3.h.h.e'_5.h.h.e'_10\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis : Injective ↑(fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0)\ne_1✝¹ : TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v = EuclideanSpace ℝ (Fin n)\ne_2✝ : TangentSpace 𝓘(ℝ, E) ↑v = E\ne_1✝ :\n  (TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v →L[ℝ] TangentSpace 𝓘(ℝ, E) ↑v) = (EuclideanSpace ℝ (Fin n) →L[ℝ] E)\n⊢ ↑(OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr (↑(stereographic (_ : ‖↑(-v)‖ = 1)) v) = 0\n[PROOFSTEP]\nsimp only [AddEquivClass.map_eq_zero_iff]\n[GOAL]\ncase h.e'_3.h.h.e'_5.h.h.e'_10\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis : Injective ↑(fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0)\ne_1✝¹ : TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v = EuclideanSpace ℝ (Fin n)\ne_2✝ : TangentSpace 𝓘(ℝ, E) ↑v = E\ne_1✝ :\n  (TangentSpace 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) v →L[ℝ] TangentSpace 𝓘(ℝ, E) ↑v) = (EuclideanSpace ℝ (Fin n) →L[ℝ] E)\n⊢ ↑(stereographic (_ : ‖↑(-v)‖ = 1)) v = 0\n[PROOFSTEP]\napply stereographic_neg_apply\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\n⊢ Injective ↑(fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0)\n[PROOFSTEP]\nhave :\n  HasFDerivAt (stereoInvFunAux (-v : E) ∘ (Subtype.val : (ℝ ∙ (↑(-v) : E))ᗮ → E)) (ℝ ∙ (↑(-v) : E))ᗮ.subtypeL\n    (U.symm 0) :=\n  by\n  convert hasFDerivAt_stereoInvFunAux_comp_coe (-v : E)\n  simp\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\n⊢ HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n[PROOFSTEP]\nconvert hasFDerivAt_stereoInvFunAux_comp_coe (-v : E)\n[GOAL]\ncase h.e'_11.h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\ne_3✝ : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } = { x // x ∈ ↑(Submodule.span ℝ {-↑v})ᗮ }\n⊢ ↑(LinearIsometryEquiv.symm U) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\n⊢ Injective ↑(fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0)\n[PROOFSTEP]\nhave := congr_arg FunLike.coe <| (this.comp 0 U.symm.toContinuousLinearEquiv.hasFDerivAt).fderiv\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis✝ :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\nthis :\n  ↑(fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0) =\n    ↑(ContinuousLinearMap.comp (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n        ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm U)))\n⊢ Injective ↑(fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0)\n[PROOFSTEP]\nrefine Eq.subst this.symm ?_\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis✝ :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\nthis :\n  ↑(fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0) =\n    ↑(ContinuousLinearMap.comp (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n        ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm U)))\n⊢ Injective\n    ↑(ContinuousLinearMap.comp (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n        ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm U)))\n[PROOFSTEP]\nrw [ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe]\n[GOAL]\ncase this\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\nH : Type u_3\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ F H\nM : Type u_4\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\nn : ℕ\ninst✝ : Fact (finrank ℝ E = n + 1)\nv : ↑(sphere 0 1)\nU : { x // x ∈ (Submodule.span ℝ {↑(-v)})ᗮ } ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=\n  (OrthonormalBasis.fromOrthogonalSpanSingleton n (_ : ↑(-v) ≠ 0)).repr\nthis✝ :\n  HasFDerivAt (stereoInvFunAux (-↑v) ∘ Subtype.val) (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n    (↑(LinearIsometryEquiv.symm U) 0)\nthis :\n  ↑(fderiv ℝ ((stereoInvFunAux (-↑v) ∘ Subtype.val) ∘ ↑(LinearIsometryEquiv.symm U)) 0) =\n    ↑(ContinuousLinearMap.comp (Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ)\n        ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm U)))\n⊢ Injective\n    (↑(Submodule.subtypeL (Submodule.span ℝ {↑(-v)})ᗮ) ∘\n      ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm U)))\n[PROOFSTEP]\nsimpa using Subtype.coe_injective\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\n⊢ Smooth (ModelWithCorners.prod 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)))\n    𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) fun p => p.fst * p.snd\n[PROOFSTEP]\napply ContMDiff.codRestrict_sphere\n[GOAL]\ncase hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\n⊢ ContMDiff (ModelWithCorners.prod 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) 𝓘(ℝ, EuclideanSpace ℝ (Fin 1))) 𝓘(ℝ, ℂ) ⊤ fun p =>\n    ↑p.fst * ↑p.snd\n[PROOFSTEP]\nlet c : circle → ℂ := (↑)\n[GOAL]\ncase hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : { x // x ∈ circle } → ℂ := Subtype.val\n⊢ ContMDiff (ModelWithCorners.prod 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) 𝓘(ℝ, EuclideanSpace ℝ (Fin 1))) 𝓘(ℝ, ℂ) ⊤ fun p =>\n    ↑p.fst * ↑p.snd\n[PROOFSTEP]\nhave h₂ : ContMDiff (𝓘(ℝ, ℂ).prod 𝓘(ℝ, ℂ)) 𝓘(ℝ, ℂ) ∞ fun z : ℂ × ℂ => z.fst * z.snd :=\n  by\n  rw [contMDiff_iff]\n  exact\n    ⟨continuous_mul, fun x y => contDiff_mul.contDiffOn⟩\n      -- Porting note: needed to fill in first 3 arguments or could not figure out typeclasses\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : { x // x ∈ circle } → ℂ := Subtype.val\n⊢ ContMDiff (ModelWithCorners.prod 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ)) 𝓘(ℝ, ℂ) ⊤ fun z => z.fst * z.snd\n[PROOFSTEP]\nrw [contMDiff_iff]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : { x // x ∈ circle } → ℂ := Subtype.val\n⊢ (Continuous fun z => z.fst * z.snd) ∧\n    ∀ (x : ℂ × ℂ) (y : ℂ),\n      ContDiffOn ℝ ⊤\n        (↑(extChartAt 𝓘(ℝ, ℂ) y) ∘\n          (fun z => z.fst * z.snd) ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ)) x)))\n        ((extChartAt (ModelWithCorners.prod 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ)) x).target ∩\n          ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ)) x)) ⁻¹'\n            ((fun z => z.fst * z.snd) ⁻¹' (extChartAt 𝓘(ℝ, ℂ) y).source))\n[PROOFSTEP]\nexact\n  ⟨continuous_mul, fun x y => contDiff_mul.contDiffOn⟩\n    -- Porting note: needed to fill in first 3 arguments or could not figure out typeclasses\n[GOAL]\ncase hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : { x // x ∈ circle } → ℂ := Subtype.val\nh₂ : ContMDiff (ModelWithCorners.prod 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ)) 𝓘(ℝ, ℂ) ⊤ fun z => z.fst * z.snd\n⊢ ContMDiff (ModelWithCorners.prod 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) 𝓘(ℝ, EuclideanSpace ℝ (Fin 1))) 𝓘(ℝ, ℂ) ⊤ fun p =>\n    ↑p.fst * ↑p.snd\n[PROOFSTEP]\nsuffices h₁ : ContMDiff ((𝓡 1).prod (𝓡 1)) (𝓘(ℝ, ℂ).prod 𝓘(ℝ, ℂ)) ⊤ (Prod.map c c)\n[GOAL]\ncase hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : { x // x ∈ circle } → ℂ := Subtype.val\nh₂ : ContMDiff (ModelWithCorners.prod 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ)) 𝓘(ℝ, ℂ) ⊤ fun z => z.fst * z.snd\nh₁ :\n  ContMDiff (ModelWithCorners.prod 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)))\n    (ModelWithCorners.prod 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ)) ⊤ (Prod.map c c)\n⊢ ContMDiff (ModelWithCorners.prod 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) 𝓘(ℝ, EuclideanSpace ℝ (Fin 1))) 𝓘(ℝ, ℂ) ⊤ fun p =>\n    ↑p.fst * ↑p.snd\n[PROOFSTEP]\napply h₂.comp h₁\n[GOAL]\ncase h₁\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : { x // x ∈ circle } → ℂ := Subtype.val\nh₂ : ContMDiff (ModelWithCorners.prod 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ)) 𝓘(ℝ, ℂ) ⊤ fun z => z.fst * z.snd\n⊢ ContMDiff (ModelWithCorners.prod 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)))\n    (ModelWithCorners.prod 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ)) ⊤ (Prod.map c c)\n[PROOFSTEP]\napply ContMDiff.prod_map\n[GOAL]\ncase h₁.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : { x // x ∈ circle } → ℂ := Subtype.val\nh₂ : ContMDiff (ModelWithCorners.prod 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ)) 𝓘(ℝ, ℂ) ⊤ fun z => z.fst * z.snd\n⊢ ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) 𝓘(ℝ, ℂ) ⊤ c\n[PROOFSTEP]\nexact contMDiff_coe_sphere\n[GOAL]\ncase h₁.hg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : { x // x ∈ circle } → ℂ := Subtype.val\nh₂ : ContMDiff (ModelWithCorners.prod 𝓘(ℝ, ℂ) 𝓘(ℝ, ℂ)) 𝓘(ℝ, ℂ) ⊤ fun z => z.fst * z.snd\n⊢ ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) 𝓘(ℝ, ℂ) ⊤ c\n[PROOFSTEP]\nexact contMDiff_coe_sphere\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\n⊢ Smooth 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) fun a => a⁻¹\n[PROOFSTEP]\napply ContMDiff.codRestrict_sphere\n[GOAL]\ncase hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\n⊢ ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) 𝓘(ℝ, ℂ) ⊤ fun a => (↑a)⁻¹\n[PROOFSTEP]\nsimp only [← coe_inv_circle, coe_inv_circle_eq_conj]\n[GOAL]\ncase hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\n⊢ ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) 𝓘(ℝ, ℂ) ⊤ fun a => ↑(starRingEnd ℂ) ↑a\n[PROOFSTEP]\nexact Complex.conjCle.contDiff.contMDiff.comp contMDiff_coe_sphere\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Manifold.Instances.Sphere", "llama_tokens": 69208, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6001883592602049, "lm_q2_score": 0.5926665999540698, "lm_q1q2_score": 0.35571159421475734}}
{"text": "[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\nv : V\n⊢ Set.Finite (SimpleGraph.singletonSubgraph G v).verts\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\nu v : V\ne : Adj G u v\n⊢ Set.Finite (subgraphOfAdj G e).verts\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\nu v : V\ne : Adj G u v\n⊢ singletonFinsubgraph u ≤ finsubgraphOfAdj e\n[PROOFSTEP]\nsimp [singletonFinsubgraph, finsubgraphOfAdj]\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\nu v : V\ne : Adj G u v\n⊢ singletonFinsubgraph v ≤ finsubgraphOfAdj e\n[PROOFSTEP]\nsimp [singletonFinsubgraph, finsubgraphOfAdj]\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\nG' G'' : Finsubgraph G\nh : G'' ≤ G'\nf : G' →fg F\n⊢ G'' →fg F\n[PROOFSTEP]\nrefine' ⟨fun ⟨v, hv⟩ => f.toFun ⟨v, h.1 hv⟩, _⟩\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\nG' G'' : Finsubgraph G\nh : G'' ≤ G'\nf : G' →fg F\n⊢ ∀ {a b : ↑(↑G'').verts},\n    Adj (Subgraph.coe ↑G'') a b →\n      Adj F\n        ((fun x =>\n            match x with\n            | { val := v, property := hv } => RelHom.toFun f { val := v, property := (_ : v ∈ (↑G').verts) })\n          a)\n        ((fun x =>\n            match x with\n            | { val := v, property := hv } => RelHom.toFun f { val := v, property := (_ : v ∈ (↑G').verts) })\n          b)\n[PROOFSTEP]\nrintro ⟨u, hu⟩ ⟨v, hv⟩ huv\n[GOAL]\ncase mk.mk\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\nG' G'' : Finsubgraph G\nh : G'' ≤ G'\nf : G' →fg F\nu : V\nhu : u ∈ (↑G'').verts\nv : V\nhv : v ∈ (↑G'').verts\nhuv : Adj (Subgraph.coe ↑G'') { val := u, property := hu } { val := v, property := hv }\n⊢ Adj F\n    ((fun x =>\n        match x with\n        | { val := v, property := hv } => RelHom.toFun f { val := v, property := (_ : v ∈ (↑G').verts) })\n      { val := u, property := hu })\n    ((fun x =>\n        match x with\n        | { val := v, property := hv } => RelHom.toFun f { val := v, property := (_ : v ∈ (↑G').verts) })\n      { val := v, property := hv })\n[PROOFSTEP]\nexact f.map_rel' (h.2 huv)\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\n⊢ Nonempty (G →g F)\n[PROOFSTEP]\ncases nonempty_fintype W\n[GOAL]\ncase intro\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\n⊢ Nonempty (G →g F)\n[PROOFSTEP]\nhaveI : ∀ G' : G.Finsubgraphᵒᵖ, Nonempty ((finsubgraphHomFunctor G F).obj G') := fun G' => ⟨h G'.unop G'.unop.property⟩\n[GOAL]\ncase intro\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\n⊢ Nonempty (G →g F)\n[PROOFSTEP]\nhaveI : ∀ G' : G.Finsubgraphᵒᵖ, Fintype ((finsubgraphHomFunctor G F).obj G') :=\n  by\n  intro G'\n  haveI : Fintype (G'.unop.val.verts : Type u) := G'.unop.property.fintype\n  haveI : Fintype (↥G'.unop.val.verts → W) := by classical exact Pi.fintype\n  exact Fintype.ofInjective (fun f => f.toFun) RelHom.coe_fn_injective\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\n⊢ (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\n[PROOFSTEP]\nintro G'\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nG' : (Finsubgraph G)ᵒᵖ\n⊢ Fintype ((finsubgraphHomFunctor G F).obj G')\n[PROOFSTEP]\nhaveI : Fintype (G'.unop.val.verts : Type u) := G'.unop.property.fintype\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nG' : (Finsubgraph G)ᵒᵖ\nthis : Fintype ↑(↑G'.unop).verts\n⊢ Fintype ((finsubgraphHomFunctor G F).obj G')\n[PROOFSTEP]\nhaveI : Fintype (↥G'.unop.val.verts → W) := by classical exact Pi.fintype\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nG' : (Finsubgraph G)ᵒᵖ\nthis : Fintype ↑(↑G'.unop).verts\n⊢ Fintype (↑(↑G'.unop).verts → W)\n[PROOFSTEP]\nclassical exact Pi.fintype\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nG' : (Finsubgraph G)ᵒᵖ\nthis : Fintype ↑(↑G'.unop).verts\n⊢ Fintype (↑(↑G'.unop).verts → W)\n[PROOFSTEP]\nexact Pi.fintype\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝¹ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nG' : (Finsubgraph G)ᵒᵖ\nthis✝ : Fintype ↑(↑G'.unop).verts\nthis : Fintype (↑(↑G'.unop).verts → W)\n⊢ Fintype ((finsubgraphHomFunctor G F).obj G')\n[PROOFSTEP]\nexact Fintype.ofInjective (fun f => f.toFun) RelHom.coe_fn_injective\n[GOAL]\ncase intro\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nthis : (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\n⊢ Nonempty (G →g F)\n[PROOFSTEP]\nobtain ⟨u, hu⟩ := nonempty_sections_of_finite_inverse_system (finsubgraphHomFunctor G F)\n[GOAL]\ncase intro.intro\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nthis : (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\nu : (j : (Finsubgraph G)ᵒᵖ) → (finsubgraphHomFunctor G F).obj j\nhu : u ∈ Functor.sections (finsubgraphHomFunctor G F)\n⊢ Nonempty (G →g F)\n[PROOFSTEP]\nrefine' ⟨⟨fun v => _, _⟩⟩\n[GOAL]\ncase intro.intro.refine'_1\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nthis : (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\nu : (j : (Finsubgraph G)ᵒᵖ) → (finsubgraphHomFunctor G F).obj j\nhu : u ∈ Functor.sections (finsubgraphHomFunctor G F)\nv : V\n⊢ W\n[PROOFSTEP]\nexact\n  (u (Opposite.op (singletonFinsubgraph v))).toFun\n    ⟨v, by\n      unfold singletonFinsubgraph\n      simp⟩\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nthis : (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\nu : (j : (Finsubgraph G)ᵒᵖ) → (finsubgraphHomFunctor G F).obj j\nhu : u ∈ Functor.sections (finsubgraphHomFunctor G F)\nv : V\n⊢ v ∈ (↑(Opposite.op (singletonFinsubgraph v)).unop).verts\n[PROOFSTEP]\nunfold singletonFinsubgraph\n[GOAL]\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nthis : (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\nu : (j : (Finsubgraph G)ᵒᵖ) → (finsubgraphHomFunctor G F).obj j\nhu : u ∈ Functor.sections (finsubgraphHomFunctor G F)\nv : V\n⊢ v ∈ (↑(Opposite.op { val := SimpleGraph.singletonSubgraph G v, property := (_ : Set.Finite {v}) }).unop).verts\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.refine'_2\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nthis : (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\nu : (j : (Finsubgraph G)ᵒᵖ) → (finsubgraphHomFunctor G F).obj j\nhu : u ∈ Functor.sections (finsubgraphHomFunctor G F)\n⊢ ∀ {a b : V},\n    Adj G a b →\n      Adj F\n        ((fun v =>\n            RelHom.toFun (u (Opposite.op (singletonFinsubgraph v)))\n              { val := v, property := (_ : v ∈ (↑(Opposite.op (singletonFinsubgraph v)).unop).verts) })\n          a)\n        ((fun v =>\n            RelHom.toFun (u (Opposite.op (singletonFinsubgraph v)))\n              { val := v, property := (_ : v ∈ (↑(Opposite.op (singletonFinsubgraph v)).unop).verts) })\n          b)\n[PROOFSTEP]\nintro v v' e\n[GOAL]\ncase intro.intro.refine'_2\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nthis : (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\nu : (j : (Finsubgraph G)ᵒᵖ) → (finsubgraphHomFunctor G F).obj j\nhu : u ∈ Functor.sections (finsubgraphHomFunctor G F)\nv v' : V\ne : Adj G v v'\n⊢ Adj F\n    ((fun v =>\n        RelHom.toFun (u (Opposite.op (singletonFinsubgraph v)))\n          { val := v, property := (_ : v ∈ (↑(Opposite.op (singletonFinsubgraph v)).unop).verts) })\n      v)\n    ((fun v =>\n        RelHom.toFun (u (Opposite.op (singletonFinsubgraph v)))\n          { val := v, property := (_ : v ∈ (↑(Opposite.op (singletonFinsubgraph v)).unop).verts) })\n      v')\n[PROOFSTEP]\nsimp only\n  /- The homomorphism for each edge's singleton subgraph agrees with those for its source and\n          target vertices. -/\n[GOAL]\ncase intro.intro.refine'_2\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nthis : (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\nu : (j : (Finsubgraph G)ᵒᵖ) → (finsubgraphHomFunctor G F).obj j\nhu : u ∈ Functor.sections (finsubgraphHomFunctor G F)\nv v' : V\ne : Adj G v v'\n⊢ Adj F\n    (RelHom.toFun (u (Opposite.op (singletonFinsubgraph v)))\n      { val := v, property := (_ : v ∈ (↑(Opposite.op (singletonFinsubgraph v)).unop).verts) })\n    (RelHom.toFun (u (Opposite.op (singletonFinsubgraph v')))\n      { val := v', property := (_ : v' ∈ (↑(Opposite.op (singletonFinsubgraph v')).unop).verts) })\n[PROOFSTEP]\nhave hv : Opposite.op (finsubgraphOfAdj e) ⟶ Opposite.op (singletonFinsubgraph v) :=\n  Quiver.Hom.op (CategoryTheory.homOfLE singletonFinsubgraph_le_adj_left)\n[GOAL]\ncase intro.intro.refine'_2\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nthis : (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\nu : (j : (Finsubgraph G)ᵒᵖ) → (finsubgraphHomFunctor G F).obj j\nhu : u ∈ Functor.sections (finsubgraphHomFunctor G F)\nv v' : V\ne : Adj G v v'\nhv : Opposite.op (finsubgraphOfAdj e) ⟶ Opposite.op (singletonFinsubgraph v)\n⊢ Adj F\n    (RelHom.toFun (u (Opposite.op (singletonFinsubgraph v)))\n      { val := v, property := (_ : v ∈ (↑(Opposite.op (singletonFinsubgraph v)).unop).verts) })\n    (RelHom.toFun (u (Opposite.op (singletonFinsubgraph v')))\n      { val := v', property := (_ : v' ∈ (↑(Opposite.op (singletonFinsubgraph v')).unop).verts) })\n[PROOFSTEP]\nhave hv' : Opposite.op (finsubgraphOfAdj e) ⟶ Opposite.op (singletonFinsubgraph v') :=\n  Quiver.Hom.op (CategoryTheory.homOfLE singletonFinsubgraph_le_adj_right)\n[GOAL]\ncase intro.intro.refine'_2\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nthis : (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\nu : (j : (Finsubgraph G)ᵒᵖ) → (finsubgraphHomFunctor G F).obj j\nhu : u ∈ Functor.sections (finsubgraphHomFunctor G F)\nv v' : V\ne : Adj G v v'\nhv : Opposite.op (finsubgraphOfAdj e) ⟶ Opposite.op (singletonFinsubgraph v)\nhv' : Opposite.op (finsubgraphOfAdj e) ⟶ Opposite.op (singletonFinsubgraph v')\n⊢ Adj F\n    (RelHom.toFun (u (Opposite.op (singletonFinsubgraph v)))\n      { val := v, property := (_ : v ∈ (↑(Opposite.op (singletonFinsubgraph v)).unop).verts) })\n    (RelHom.toFun (u (Opposite.op (singletonFinsubgraph v')))\n      { val := v', property := (_ : v' ∈ (↑(Opposite.op (singletonFinsubgraph v')).unop).verts) })\n[PROOFSTEP]\nrw [← hu hv, ← hu hv']\n  -- porting note: was `apply Hom.map_adj`\n[GOAL]\ncase intro.intro.refine'_2\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nthis : (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\nu : (j : (Finsubgraph G)ᵒᵖ) → (finsubgraphHomFunctor G F).obj j\nhu : u ∈ Functor.sections (finsubgraphHomFunctor G F)\nv v' : V\ne : Adj G v v'\nhv : Opposite.op (finsubgraphOfAdj e) ⟶ Opposite.op (singletonFinsubgraph v)\nhv' : Opposite.op (finsubgraphOfAdj e) ⟶ Opposite.op (singletonFinsubgraph v')\n⊢ Adj F\n    (RelHom.toFun ((finsubgraphHomFunctor G F).map hv (u (Opposite.op (finsubgraphOfAdj e))))\n      { val := v, property := (_ : v ∈ (↑(Opposite.op (singletonFinsubgraph v)).unop).verts) })\n    (RelHom.toFun ((finsubgraphHomFunctor G F).map hv' (u (Opposite.op (finsubgraphOfAdj e))))\n      { val := v', property := (_ : v' ∈ (↑(Opposite.op (singletonFinsubgraph v')).unop).verts) })\n[PROOFSTEP]\nrefine'\n  Hom.map_adj (u (Opposite.op (finsubgraphOfAdj e)))\n    _\n      -- `v` and `v'` are definitionally adjacent in `finsubgraphOfAdj e`\n[GOAL]\ncase intro.intro.refine'_2\nV : Type u\nW : Type v\nG : SimpleGraph V\nF : SimpleGraph W\ninst✝ : Finite W\nh : (G' : Subgraph G) → Set.Finite G'.verts → Subgraph.coe G' →g F\nval✝ : Fintype W\nthis✝ : ∀ (G' : (Finsubgraph G)ᵒᵖ), Nonempty ((finsubgraphHomFunctor G F).obj G')\nthis : (G' : (Finsubgraph G)ᵒᵖ) → Fintype ((finsubgraphHomFunctor G F).obj G')\nu : (j : (Finsubgraph G)ᵒᵖ) → (finsubgraphHomFunctor G F).obj j\nhu : u ∈ Functor.sections (finsubgraphHomFunctor G F)\nv v' : V\ne : Adj G v v'\nhv : Opposite.op (finsubgraphOfAdj e) ⟶ Opposite.op (singletonFinsubgraph v)\nhv' : Opposite.op (finsubgraphOfAdj e) ⟶ Opposite.op (singletonFinsubgraph v')\n⊢ Adj (Subgraph.coe ↑(Opposite.op (finsubgraphOfAdj e)).unop)\n    { val := v, property := (_ : v ∈ (↑(Opposite.op (finsubgraphOfAdj e)).unop).verts) }\n    { val := v', property := (_ : v' ∈ (↑(Opposite.op (finsubgraphOfAdj e)).unop).verts) }\n[PROOFSTEP]\nsimp [finsubgraphOfAdj]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SimpleGraph.Finsubgraph", "llama_tokens": 7129, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.588889130767832, "lm_q2_score": 0.6039318337259583, "lm_q1q2_score": 0.35564889260590243}}
{"text": "[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\n⊢ ∀ (s : Cone (Discrete.functor α)) (m : s.pt ⟶ (piFan α).pt),\n    (∀ (j : Discrete ι), m ≫ NatTrans.app (piFan α).π j = NatTrans.app s.π j) →\n      m = (fun S => ContinuousMap.mk fun s i => ↑(NatTrans.app S.π { as := i }) s) s\n[PROOFSTEP]\nintro S m h\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\nS : Cone (Discrete.functor α)\nm : S.pt ⟶ (piFan α).pt\nh : ∀ (j : Discrete ι), m ≫ NatTrans.app (piFan α).π j = NatTrans.app S.π j\n⊢ m = (fun S => ContinuousMap.mk fun s i => ↑(NatTrans.app S.π { as := i }) s) S\n[PROOFSTEP]\napply ContinuousMap.ext\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\nS : Cone (Discrete.functor α)\nm : S.pt ⟶ (piFan α).pt\nh : ∀ (j : Discrete ι), m ≫ NatTrans.app (piFan α).π j = NatTrans.app S.π j\n⊢ ∀ (a : ↑S.pt), ↑m a = ↑((fun S => ContinuousMap.mk fun s i => ↑(NatTrans.app S.π { as := i }) s) S) a\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\nS : Cone (Discrete.functor α)\nm : S.pt ⟶ (piFan α).pt\nh : ∀ (j : Discrete ι), m ≫ NatTrans.app (piFan α).π j = NatTrans.app S.π j\nx : ↑S.pt\n⊢ ↑m x = ↑((fun S => ContinuousMap.mk fun s i => ↑(NatTrans.app S.π { as := i }) s) S) x\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase h.h\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\nS : Cone (Discrete.functor α)\nm : S.pt ⟶ (piFan α).pt\nh : ∀ (j : Discrete ι), m ≫ NatTrans.app (piFan α).π j = NatTrans.app S.π j\nx : ↑S.pt\ni : ι\n⊢ ↑m x i = ↑((fun S => ContinuousMap.mk fun s i => ↑(NatTrans.app S.π { as := i }) s) S) x i\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.h\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\nS : Cone (Discrete.functor α)\nm : S.pt ⟶ (piFan α).pt\nh : ∀ (j : Discrete ι), m ≫ NatTrans.app (piFan α).π j = NatTrans.app S.π j\nx : ↑S.pt\ni : ι\n⊢ ↑m x i = ↑(ContinuousMap.mk fun s i => ↑(NatTrans.app S.π { as := i }) s) x i\n[PROOFSTEP]\nrw [ContinuousMap.coe_mk, ← h ⟨i⟩]\n[GOAL]\ncase h.h\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\nS : Cone (Discrete.functor α)\nm : S.pt ⟶ (piFan α).pt\nh : ∀ (j : Discrete ι), m ≫ NatTrans.app (piFan α).π j = NatTrans.app S.π j\nx : ↑S.pt\ni : ι\n⊢ ↑m x i = ↑(m ≫ NatTrans.app (piFan α).π { as := i }) x\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\ni : ι\n⊢ (piIsoPi α).inv ≫ Pi.π α i = piπ α i\n[PROOFSTEP]\nsimp [piIsoPi]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\ni : ι\nx : ↑(∏ α)\n⊢ ↑(piIsoPi α).hom x i = ↑(Pi.π α i) x\n[PROOFSTEP]\nhave := piIsoPi_inv_π α i\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\ni : ι\nx : ↑(∏ α)\nthis : (piIsoPi α).inv ≫ Pi.π α i = piπ α i\n⊢ ↑(piIsoPi α).hom x i = ↑(Pi.π α i) x\n[PROOFSTEP]\nrw [Iso.inv_comp_eq] at this \n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\ni : ι\nx : ↑(∏ α)\nthis : Pi.π α i = (piIsoPi α).hom ≫ piπ α i\n⊢ ↑(piIsoPi α).hom x i = ↑(Pi.π α i) x\n[PROOFSTEP]\nexact ConcreteCategory.congr_hom this x\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\ni : ι\n⊢ α i ⟶ of ((i : ι) × ↑(α i))\n[PROOFSTEP]\nrefine ContinuousMap.mk ?_ ?_\n[GOAL]\ncase refine_1\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\ni : ι\n⊢ ↑(α i) → ↑(of ((i : ι) × ↑(α i)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine_1\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\ni : ι\n⊢ ↑(α i) → (i : ι) × ↑(α i)\n[PROOFSTEP]\napply Sigma.mk i\n[GOAL]\ncase refine_2\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\ni : ι\n⊢ Continuous (id (Sigma.mk i))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine_2\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\ni : ι\n⊢ Continuous (Sigma.mk i)\n[PROOFSTEP]\ncontinuity\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nβ : ι → TopCatMax\ns : Cocone (Discrete.functor β)\nj : Discrete ι\n⊢ NatTrans.app (sigmaCofan β).ι j ≫ (fun S => ContinuousMap.mk fun s => ↑(NatTrans.app S.ι { as := s.fst }) s.snd) s =\n    NatTrans.app s.ι j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase mk\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nβ : ι → TopCatMax\ns : Cocone (Discrete.functor β)\nas✝ : ι\n⊢ NatTrans.app (sigmaCofan β).ι { as := as✝ } ≫\n      (fun S => ContinuousMap.mk fun s => ↑(NatTrans.app S.ι { as := s.fst }) s.snd) s =\n    NatTrans.app s.ι { as := as✝ }\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nβ : ι → TopCatMax\n⊢ ∀ (s : Cocone (Discrete.functor β)) (m : (sigmaCofan β).pt ⟶ s.pt),\n    (∀ (j : Discrete ι), NatTrans.app (sigmaCofan β).ι j ≫ m = NatTrans.app s.ι j) →\n      m = (fun S => ContinuousMap.mk fun s => ↑(NatTrans.app S.ι { as := s.fst }) s.snd) s\n[PROOFSTEP]\nintro S m h\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nβ : ι → TopCatMax\nS : Cocone (Discrete.functor β)\nm : (sigmaCofan β).pt ⟶ S.pt\nh : ∀ (j : Discrete ι), NatTrans.app (sigmaCofan β).ι j ≫ m = NatTrans.app S.ι j\n⊢ m = (fun S => ContinuousMap.mk fun s => ↑(NatTrans.app S.ι { as := s.fst }) s.snd) S\n[PROOFSTEP]\next ⟨i, x⟩\n[GOAL]\ncase w.mk\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nβ : ι → TopCatMax\nS : Cocone (Discrete.functor β)\nm : (sigmaCofan β).pt ⟶ S.pt\nh : ∀ (j : Discrete ι), NatTrans.app (sigmaCofan β).ι j ≫ m = NatTrans.app S.ι j\ni : ι\nx : ↑(β i)\n⊢ ↑m { fst := i, snd := x } =\n    ↑((fun S => ContinuousMap.mk fun s => ↑(NatTrans.app S.ι { as := s.fst }) s.snd) S) { fst := i, snd := x }\n[PROOFSTEP]\nsimp only [comp_app, hom_apply, ← h ⟨i⟩]\n[GOAL]\ncase w.mk\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nβ : ι → TopCatMax\nS : Cocone (Discrete.functor β)\nm : (sigmaCofan β).pt ⟶ S.pt\nh : ∀ (j : Discrete ι), NatTrans.app (sigmaCofan β).ι j ≫ m = NatTrans.app S.ι j\ni : ι\nx : ↑(β i)\n⊢ ContinuousMap.toFun m { fst := i, snd := x } = ContinuousMap.toFun (NatTrans.app (sigmaCofan β).ι { as := i } ≫ m) x\n[PROOFSTEP]\ncongr\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\ni : ι\n⊢ Sigma.ι α i ≫ (sigmaIsoSigma α).hom = sigmaι α i\n[PROOFSTEP]\nsimp [sigmaIsoSigma]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nι : Type v\nα : ι → TopCatMax\ni : ι\nx : ↑(α i)\n⊢ ↑(sigmaIsoSigma α).inv { fst := i, snd := x } = ↑(Sigma.ι α i) x\n[PROOFSTEP]\nrw [← sigmaIsoSigma_hom_ι_apply, ← comp_app, ← comp_app, Category.assoc, Iso.hom_inv_id, Category.comp_id]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\n⊢ C.pt.str = ⨅ (j : J), induced (↑(NatTrans.app C.π j)) (F.obj j).str\n[PROOFSTEP]\nlet homeo := homeoOfIso (hC.conePointUniqueUpToIso (limitConeInfiIsLimit F))\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nhomeo : ↑C.pt ≃ₜ ↑(limitConeInfi F).pt := homeoOfIso (IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F))\n⊢ C.pt.str = ⨅ (j : J), induced (↑(NatTrans.app C.π j)) (F.obj j).str\n[PROOFSTEP]\nrefine' homeo.inducing.induced.trans _\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nhomeo : ↑C.pt ≃ₜ ↑(limitConeInfi F).pt := homeoOfIso (IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F))\n⊢ induced (↑homeo) (topologicalSpace_coe (limitConeInfi F).pt) =\n    ⨅ (j : J), induced (↑(NatTrans.app C.π j)) (F.obj j).str\n[PROOFSTEP]\nchange induced homeo (⨅ j : J, _) = _\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nhomeo : ↑C.pt ≃ₜ ↑(limitConeInfi F).pt := homeoOfIso (IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F))\n⊢ induced (↑homeo) (⨅ (j : J), induced (NatTrans.app (Types.limitCone (F ⋙ forget TopCat)).π j) (F.obj j).str) =\n    ⨅ (j : J), induced (↑(NatTrans.app C.π j)) (F.obj j).str\n[PROOFSTEP]\nsimp [induced_iInf, induced_compose]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nhomeo : ↑C.pt ≃ₜ ↑(limitConeInfi F).pt := homeoOfIso (IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F))\n⊢ ⨅ (i : J),\n      induced\n        (NatTrans.app (Types.limitCone (F ⋙ forget TopCat)).π i ∘\n          ↑(homeoOfIso (IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F))))\n        (F.obj i).str =\n    ⨅ (j : J), induced (↑(NatTrans.app C.π j)) (F.obj j).str\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ Continuous Prod.fst\n[PROOFSTEP]\ncontinuity\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ Continuous Prod.snd\n[PROOFSTEP]\ncontinuity\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ ∀ (s : Cone (pair X Y)) (j : Discrete WalkingPair),\n    (fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) s ≫\n        NatTrans.app (prodBinaryFan X Y).π j =\n      NatTrans.app s.π j\n[PROOFSTEP]\nrintro S (_ | _)\n[GOAL]\ncase mk.left\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\n⊢ (fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) S ≫\n      NatTrans.app (prodBinaryFan X Y).π { as := WalkingPair.left } =\n    NatTrans.app S.π { as := WalkingPair.left }\n[PROOFSTEP]\n{dsimp; ext; rfl\n}\n[GOAL]\ncase mk.left\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\n⊢ (fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) S ≫\n      NatTrans.app (prodBinaryFan X Y).π { as := WalkingPair.left } =\n    NatTrans.app S.π { as := WalkingPair.left }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.left\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\n⊢ (ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) ≫ BinaryFan.fst (prodBinaryFan X Y) =\n    BinaryFan.fst S\n[PROOFSTEP]\next\n[GOAL]\ncase mk.left.w\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\nx✝ : (forget TopCat).obj S.pt\n⊢ ↑((ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) ≫ BinaryFan.fst (prodBinaryFan X Y)) x✝ =\n    ↑(BinaryFan.fst S) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.right\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\n⊢ (fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) S ≫\n      NatTrans.app (prodBinaryFan X Y).π { as := WalkingPair.right } =\n    NatTrans.app S.π { as := WalkingPair.right }\n[PROOFSTEP]\n{dsimp; ext; rfl\n}\n[GOAL]\ncase mk.right\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\n⊢ (fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) S ≫\n      NatTrans.app (prodBinaryFan X Y).π { as := WalkingPair.right } =\n    NatTrans.app S.π { as := WalkingPair.right }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.right\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\n⊢ (ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) ≫ BinaryFan.snd (prodBinaryFan X Y) =\n    BinaryFan.snd S\n[PROOFSTEP]\next\n[GOAL]\ncase mk.right.w\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\nx✝ : (forget TopCat).obj S.pt\n⊢ ↑((ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) ≫ BinaryFan.snd (prodBinaryFan X Y)) x✝ =\n    ↑(BinaryFan.snd S) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ ∀ (s : Cone (pair X Y)) (m : s.pt ⟶ (prodBinaryFan X Y).pt),\n    (∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (prodBinaryFan X Y).π j = NatTrans.app s.π j) →\n      m = (fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) s\n[PROOFSTEP]\nintro S m h\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\nm : S.pt ⟶ (prodBinaryFan X Y).pt\nh : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (prodBinaryFan X Y).π j = NatTrans.app S.π j\n⊢ m = (fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) S\n[PROOFSTEP]\nrefine' ContinuousMap.ext (fun (x : ↥(S.pt)) => Prod.ext _ _)\n[GOAL]\ncase refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\nm : S.pt ⟶ (prodBinaryFan X Y).pt\nh : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (prodBinaryFan X Y).π j = NatTrans.app S.π j\nx : ↑S.pt\n⊢ (↑m x).fst = (↑((fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) S) x).fst\n[PROOFSTEP]\nspecialize h ⟨WalkingPair.left⟩\n[GOAL]\ncase refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\nm : S.pt ⟶ (prodBinaryFan X Y).pt\nx : ↑S.pt\nh : m ≫ NatTrans.app (prodBinaryFan X Y).π { as := WalkingPair.left } = NatTrans.app S.π { as := WalkingPair.left }\n⊢ (↑m x).fst = (↑((fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) S) x).fst\n[PROOFSTEP]\napply_fun fun e => e x at h \n[GOAL]\ncase refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\nm : S.pt ⟶ (prodBinaryFan X Y).pt\nx : ↑S.pt\nh :\n  ↑(m ≫ NatTrans.app (prodBinaryFan X Y).π { as := WalkingPair.left }) x =\n    ↑(NatTrans.app S.π { as := WalkingPair.left }) x\n⊢ (↑m x).fst = (↑((fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) S) x).fst\n[PROOFSTEP]\nexact h\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\nm : S.pt ⟶ (prodBinaryFan X Y).pt\nh : ∀ (j : Discrete WalkingPair), m ≫ NatTrans.app (prodBinaryFan X Y).π j = NatTrans.app S.π j\nx : ↑S.pt\n⊢ (↑m x).snd = (↑((fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) S) x).snd\n[PROOFSTEP]\nspecialize h ⟨WalkingPair.right⟩\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\nm : S.pt ⟶ (prodBinaryFan X Y).pt\nx : ↑S.pt\nh : m ≫ NatTrans.app (prodBinaryFan X Y).π { as := WalkingPair.right } = NatTrans.app S.π { as := WalkingPair.right }\n⊢ (↑m x).snd = (↑((fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) S) x).snd\n[PROOFSTEP]\napply_fun fun e => e x at h \n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nS : Cone (pair X Y)\nm : S.pt ⟶ (prodBinaryFan X Y).pt\nx : ↑S.pt\nh :\n  ↑(m ≫ NatTrans.app (prodBinaryFan X Y).π { as := WalkingPair.right }) x =\n    ↑(NatTrans.app S.π { as := WalkingPair.right }) x\n⊢ (↑m x).snd = (↑((fun S => ContinuousMap.mk fun s => (↑(BinaryFan.fst S) s, ↑(BinaryFan.snd S) s)) S) x).snd\n[PROOFSTEP]\nexact h\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ (prodIsoProd X Y).hom ≫ prodFst = prod.fst\n[PROOFSTEP]\nsimp [← Iso.eq_inv_comp, prodIsoProd]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ prodFst = BinaryFan.fst (prodBinaryFan X Y)\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ (prodIsoProd X Y).hom ≫ prodSnd = prod.snd\n[PROOFSTEP]\nsimp [← Iso.eq_inv_comp, prodIsoProd]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ prodSnd = BinaryFan.snd (prodBinaryFan X Y)\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nx : ↑(X ⨯ Y)\n⊢ ↑(prodIsoProd X Y).hom x = (↑prod.fst x, ↑prod.snd x)\n[PROOFSTEP]\napply Prod.ext\n[GOAL]\ncase h₁\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nx : ↑(X ⨯ Y)\n⊢ (↑(prodIsoProd X Y).hom x).fst = (↑prod.fst x, ↑prod.snd x).fst\n[PROOFSTEP]\nexact ConcreteCategory.congr_hom (prodIsoProd_hom_fst X Y) x\n[GOAL]\ncase h₂\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nx : ↑(X ⨯ Y)\n⊢ (↑(prodIsoProd X Y).hom x).snd = (↑prod.fst x, ↑prod.snd x).snd\n[PROOFSTEP]\nexact ConcreteCategory.congr_hom (prodIsoProd_hom_snd X Y) x\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ (prodIsoProd X Y).inv ≫ prod.fst = prodFst\n[PROOFSTEP]\nsimp [Iso.inv_comp_eq]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ (prodIsoProd X Y).inv ≫ prod.snd = prodSnd\n[PROOFSTEP]\nsimp [Iso.inv_comp_eq]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ (X ⨯ Y).str = induced (↑prod.fst) X.str ⊓ induced (↑prod.snd) Y.str\n[PROOFSTEP]\nlet homeo := homeoOfIso (prodIsoProd X Y)\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nhomeo : ↑(X ⨯ Y) ≃ₜ ↑(of (↑X × ↑Y)) := homeoOfIso (prodIsoProd X Y)\n⊢ (X ⨯ Y).str = induced (↑prod.fst) X.str ⊓ induced (↑prod.snd) Y.str\n[PROOFSTEP]\nrefine' homeo.inducing.induced.trans _\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nhomeo : ↑(X ⨯ Y) ≃ₜ ↑(of (↑X × ↑Y)) := homeoOfIso (prodIsoProd X Y)\n⊢ induced (↑homeo) (topologicalSpace_coe (of (↑X × ↑Y))) = induced (↑prod.fst) X.str ⊓ induced (↑prod.snd) Y.str\n[PROOFSTEP]\nchange induced homeo (_ ⊓ _) = _\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nhomeo : ↑(X ⨯ Y) ≃ₜ ↑(of (↑X × ↑Y)) := homeoOfIso (prodIsoProd X Y)\n⊢ induced (↑homeo) (induced Prod.fst (topologicalSpace_coe X) ⊓ induced Prod.snd (topologicalSpace_coe Y)) =\n    induced (↑prod.fst) X.str ⊓ induced (↑prod.snd) Y.str\n[PROOFSTEP]\nsimp [induced_compose]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nhomeo : ↑(X ⨯ Y) ≃ₜ ↑(of (↑X × ↑Y)) := homeoOfIso (prodIsoProd X Y)\n⊢ induced (Prod.fst ∘ ↑(homeoOfIso (prodIsoProd X Y))) (topologicalSpace_coe X) ⊓\n      induced (Prod.snd ∘ ↑(homeoOfIso (prodIsoProd X Y))) (topologicalSpace_coe Y) =\n    induced (↑prod.fst) X.str ⊓ induced (↑prod.snd) Y.str\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ Set.range ↑(prod.map f g) = ↑prod.fst ⁻¹' Set.range ↑f ∩ ↑prod.snd ⁻¹' Set.range ↑g\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\n⊢ x ∈ Set.range ↑(prod.map f g) ↔ x ∈ ↑prod.fst ⁻¹' Set.range ↑f ∩ ↑prod.snd ⁻¹' Set.range ↑g\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\n⊢ x ∈ Set.range ↑(prod.map f g) → x ∈ ↑prod.fst ⁻¹' Set.range ↑f ∩ ↑prod.snd ⁻¹' Set.range ↑g\n[PROOFSTEP]\nrintro ⟨y, rfl⟩\n[GOAL]\ncase h.mp.intro\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\ny : (forget TopCat).obj (W ⨯ X)\n⊢ ↑(prod.map f g) y ∈ ↑prod.fst ⁻¹' Set.range ↑f ∩ ↑prod.snd ⁻¹' Set.range ↑g\n[PROOFSTEP]\nsimp only [Set.mem_preimage, Set.mem_range, Set.mem_inter_iff, ← comp_apply]\n[GOAL]\ncase h.mp.intro\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\ny : (forget TopCat).obj (W ⨯ X)\n⊢ (∃ y_1, ↑f y_1 = ↑(prod.map f g ≫ prod.fst) y) ∧ ∃ y_1, ↑g y_1 = ↑(prod.map f g ≫ prod.snd) y\n[PROOFSTEP]\nsimp only [Limits.prod.map_fst, Limits.prod.map_snd, exists_apply_eq_apply, comp_apply, and_self_iff]\n[GOAL]\ncase h.mpr\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\n⊢ x ∈ ↑prod.fst ⁻¹' Set.range ↑f ∩ ↑prod.snd ⁻¹' Set.range ↑g → x ∈ Set.range ↑(prod.map f g)\n[PROOFSTEP]\nrintro ⟨⟨x₁, hx₁⟩, ⟨x₂, hx₂⟩⟩\n[GOAL]\ncase h.mpr.intro.intro.intro\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\nx₁ : (forget TopCat).obj W\nhx₁ : ↑f x₁ = ↑prod.fst x\nx₂ : (forget TopCat).obj X\nhx₂ : ↑g x₂ = ↑prod.snd x\n⊢ x ∈ Set.range ↑(prod.map f g)\n[PROOFSTEP]\nuse(prodIsoProd W X).inv (x₁, x₂)\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\nx₁ : (forget TopCat).obj W\nhx₁ : ↑f x₁ = ↑prod.fst x\nx₂ : (forget TopCat).obj X\nhx₂ : ↑g x₂ = ↑prod.snd x\n⊢ ↑(prod.map f g) (↑(prodIsoProd W X).inv (x₁, x₂)) = x\n[PROOFSTEP]\napply Concrete.limit_ext\n[GOAL]\ncase h.a\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\nx₁ : (forget TopCat).obj W\nhx₁ : ↑f x₁ = ↑prod.fst x\nx₂ : (forget TopCat).obj X\nhx₂ : ↑g x₂ = ↑prod.snd x\n⊢ ∀ (j : Discrete WalkingPair),\n    ↑(limit.π (pair Y Z) j) (↑(prod.map f g) (↑(prodIsoProd W X).inv (x₁, x₂))) = ↑(limit.π (pair Y Z) j) x\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\ncase h.a.mk.left\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\nx₁ : (forget TopCat).obj W\nhx₁ : ↑f x₁ = ↑prod.fst x\nx₂ : (forget TopCat).obj X\nhx₂ : ↑g x₂ = ↑prod.snd x\n⊢ ↑(limit.π (pair Y Z) { as := WalkingPair.left }) (↑(prod.map f g) (↑(prodIsoProd W X).inv (x₁, x₂))) =\n    ↑(limit.π (pair Y Z) { as := WalkingPair.left }) x\n[PROOFSTEP]\nsimp only [← comp_apply, Category.assoc]\n[GOAL]\ncase h.a.mk.left\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\nx₁ : (forget TopCat).obj W\nhx₁ : ↑f x₁ = ↑prod.fst x\nx₂ : (forget TopCat).obj X\nhx₂ : ↑g x₂ = ↑prod.snd x\n⊢ ↑((prodIsoProd W X).inv ≫ prod.map f g ≫ limit.π (pair Y Z) { as := WalkingPair.left }) (x₁, x₂) =\n    ↑(limit.π (pair Y Z) { as := WalkingPair.left }) x\n[PROOFSTEP]\nerw [Limits.prod.map_fst]\n[GOAL]\ncase h.a.mk.left\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\nx₁ : (forget TopCat).obj W\nhx₁ : ↑f x₁ = ↑prod.fst x\nx₂ : (forget TopCat).obj X\nhx₂ : ↑g x₂ = ↑prod.snd x\n⊢ ↑((prodIsoProd W X).inv ≫ prod.fst ≫ f) (x₁, x₂) = ↑(limit.π (pair Y Z) { as := WalkingPair.left }) x\n[PROOFSTEP]\nrw [TopCat.prodIsoProd_inv_fst_assoc, TopCat.comp_app]\n[GOAL]\ncase h.a.mk.left\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\nx₁ : (forget TopCat).obj W\nhx₁ : ↑f x₁ = ↑prod.fst x\nx₂ : (forget TopCat).obj X\nhx₂ : ↑g x₂ = ↑prod.snd x\n⊢ ↑f (↑prodFst (x₁, x₂)) = ↑(limit.π (pair Y Z) { as := WalkingPair.left }) x\n[PROOFSTEP]\nexact hx₁\n[GOAL]\ncase h.a.mk.right\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\nx₁ : (forget TopCat).obj W\nhx₁ : ↑f x₁ = ↑prod.fst x\nx₂ : (forget TopCat).obj X\nhx₂ : ↑g x₂ = ↑prod.snd x\n⊢ ↑(limit.π (pair Y Z) { as := WalkingPair.right }) (↑(prod.map f g) (↑(prodIsoProd W X).inv (x₁, x₂))) =\n    ↑(limit.π (pair Y Z) { as := WalkingPair.right }) x\n[PROOFSTEP]\nsimp only [← comp_apply, Category.assoc]\n[GOAL]\ncase h.a.mk.right\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\nx₁ : (forget TopCat).obj W\nhx₁ : ↑f x₁ = ↑prod.fst x\nx₂ : (forget TopCat).obj X\nhx₂ : ↑g x₂ = ↑prod.snd x\n⊢ ↑((prodIsoProd W X).inv ≫ prod.map f g ≫ limit.π (pair Y Z) { as := WalkingPair.right }) (x₁, x₂) =\n    ↑(limit.π (pair Y Z) { as := WalkingPair.right }) x\n[PROOFSTEP]\nerw [Limits.prod.map_snd]\n[GOAL]\ncase h.a.mk.right\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\nx₁ : (forget TopCat).obj W\nhx₁ : ↑f x₁ = ↑prod.fst x\nx₂ : (forget TopCat).obj X\nhx₂ : ↑g x₂ = ↑prod.snd x\n⊢ ↑((prodIsoProd W X).inv ≫ prod.snd ≫ g) (x₁, x₂) = ↑(limit.π (pair Y Z) { as := WalkingPair.right }) x\n[PROOFSTEP]\nrw [TopCat.prodIsoProd_inv_snd_assoc, TopCat.comp_app]\n[GOAL]\ncase h.a.mk.right\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ Y\ng : X ⟶ Z\nx : (forget TopCat).obj (Y ⨯ Z)\nx₁ : (forget TopCat).obj W\nhx₁ : ↑f x₁ = ↑prod.fst x\nx₂ : (forget TopCat).obj X\nhx₂ : ↑g x₂ = ↑prod.snd x\n⊢ ↑g (↑prodSnd (x₁, x₂)) = ↑(limit.π (pair Y Z) { as := WalkingPair.right }) x\n[PROOFSTEP]\nexact hx₂\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ X\ng : Y ⟶ Z\nhf : Inducing ↑f\nhg : Inducing ↑g\n⊢ Inducing ↑(prod.map f g)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase induced\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ X\ng : Y ⟶ Z\nhf : Inducing ↑f\nhg : Inducing ↑g\n⊢ topologicalSpace_forget (W ⨯ Y) = induced (↑(prod.map f g)) (topologicalSpace_forget (X ⨯ Z))\n[PROOFSTEP]\nsimp only [prod_topology, induced_compose, ← coe_comp, Limits.prod.map_fst, Limits.prod.map_snd, induced_inf]\n[GOAL]\ncase induced\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ X\ng : Y ⟶ Z\nhf : Inducing ↑f\nhg : Inducing ↑g\n⊢ induced (↑prod.fst) W.str ⊓ induced (↑prod.snd) Y.str =\n    induced (↑(prod.fst ≫ f)) X.str ⊓ induced (↑(prod.snd ≫ g)) Z.str\n[PROOFSTEP]\nsimp only [coe_comp]\n[GOAL]\ncase induced\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ X\ng : Y ⟶ Z\nhf : Inducing ↑f\nhg : Inducing ↑g\n⊢ induced (↑prod.fst) W.str ⊓ induced (↑prod.snd) Y.str =\n    induced (↑f ∘ ↑prod.fst) X.str ⊓ induced (↑g ∘ ↑prod.snd) Z.str\n[PROOFSTEP]\nrw [← @induced_compose _ _ _ _ _ f, ← @induced_compose _ _ _ _ _ g, ← hf.induced, ← hg.induced]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ X\ng : Y ⟶ Z\nhf : Embedding ↑f\nhg : Embedding ↑g\n⊢ Function.Injective ↑(prod.map f g)\n[PROOFSTEP]\nhaveI := (TopCat.mono_iff_injective _).mpr hf.inj\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ X\ng : Y ⟶ Z\nhf : Embedding ↑f\nhg : Embedding ↑g\nthis : Mono f\n⊢ Function.Injective ↑(prod.map f g)\n[PROOFSTEP]\nhaveI := (TopCat.mono_iff_injective _).mpr hg.inj\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nW X Y Z : TopCat\nf : W ⟶ X\ng : Y ⟶ Z\nhf : Embedding ↑f\nhg : Embedding ↑g\nthis✝ : Mono f\nthis : Mono g\n⊢ Function.Injective ↑(prod.map f g)\n[PROOFSTEP]\nexact (TopCat.mono_iff_injective _).mp inferInstance\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ Continuous Sum.inl\n[PROOFSTEP]\ncontinuity\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ Continuous Sum.inr\n[PROOFSTEP]\ncontinuity\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ IsColimit (TopCat.binaryCofan X Y)\n[PROOFSTEP]\nrefine' Limits.BinaryCofan.isColimitMk (fun s => { toFun := Sum.elim s.inl s.inr, continuous_toFun := _ }) _ _ _\n[GOAL]\ncase refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\ns : BinaryCofan X Y\n⊢ Continuous (Sum.elim ↑(BinaryCofan.inl s) ↑(BinaryCofan.inr s))\n[PROOFSTEP]\napply Continuous.sum_elim (BinaryCofan.inl s).continuous_toFun (BinaryCofan.inr s).continuous_toFun\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ ∀ (s : BinaryCofan X Y),\n    ContinuousMap.mk Sum.inl ≫ (fun s => ContinuousMap.mk (Sum.elim ↑(BinaryCofan.inl s) ↑(BinaryCofan.inr s))) s =\n      BinaryCofan.inl s\n[PROOFSTEP]\nintro s\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\ns : BinaryCofan X Y\n⊢ ContinuousMap.mk Sum.inl ≫ (fun s => ContinuousMap.mk (Sum.elim ↑(BinaryCofan.inl s) ↑(BinaryCofan.inr s))) s =\n    BinaryCofan.inl s\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_2.w\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\ns : BinaryCofan X Y\nx✝ : (forget TopCat).obj X\n⊢ ↑(ContinuousMap.mk Sum.inl ≫ (fun s => ContinuousMap.mk (Sum.elim ↑(BinaryCofan.inl s) ↑(BinaryCofan.inr s))) s) x✝ =\n    ↑(BinaryCofan.inl s) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ ∀ (s : BinaryCofan X Y),\n    ContinuousMap.mk Sum.inr ≫ (fun s => ContinuousMap.mk (Sum.elim ↑(BinaryCofan.inl s) ↑(BinaryCofan.inr s))) s =\n      BinaryCofan.inr s\n[PROOFSTEP]\nintro s\n[GOAL]\ncase refine'_3\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\ns : BinaryCofan X Y\n⊢ ContinuousMap.mk Sum.inr ≫ (fun s => ContinuousMap.mk (Sum.elim ↑(BinaryCofan.inl s) ↑(BinaryCofan.inr s))) s =\n    BinaryCofan.inr s\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_3.w\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\ns : BinaryCofan X Y\nx✝ : (forget TopCat).obj Y\n⊢ ↑(ContinuousMap.mk Sum.inr ≫ (fun s => ContinuousMap.mk (Sum.elim ↑(BinaryCofan.inl s) ↑(BinaryCofan.inr s))) s) x✝ =\n    ↑(BinaryCofan.inr s) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\n⊢ ∀ (s : BinaryCofan X Y) (m : of (↑X ⊕ ↑Y) ⟶ s.pt),\n    ContinuousMap.mk Sum.inl ≫ m = BinaryCofan.inl s →\n      ContinuousMap.mk Sum.inr ≫ m = BinaryCofan.inr s →\n        m = (fun s => ContinuousMap.mk (Sum.elim ↑(BinaryCofan.inl s) ↑(BinaryCofan.inr s))) s\n[PROOFSTEP]\nintro s m h₁ h₂\n[GOAL]\ncase refine'_4\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\ns : BinaryCofan X Y\nm : of (↑X ⊕ ↑Y) ⟶ s.pt\nh₁ : ContinuousMap.mk Sum.inl ≫ m = BinaryCofan.inl s\nh₂ : ContinuousMap.mk Sum.inr ≫ m = BinaryCofan.inr s\n⊢ m = (fun s => ContinuousMap.mk (Sum.elim ↑(BinaryCofan.inl s) ↑(BinaryCofan.inr s))) s\n[PROOFSTEP]\next (x | x)\n[GOAL]\ncase refine'_4.w.inl\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\ns : BinaryCofan X Y\nm : of (↑X ⊕ ↑Y) ⟶ s.pt\nh₁ : ContinuousMap.mk Sum.inl ≫ m = BinaryCofan.inl s\nh₂ : ContinuousMap.mk Sum.inr ≫ m = BinaryCofan.inr s\nx : ↑X\n⊢ ↑m (Sum.inl x) = ↑((fun s => ContinuousMap.mk (Sum.elim ↑(BinaryCofan.inl s) ↑(BinaryCofan.inr s))) s) (Sum.inl x)\ncase refine'_4.w.inr\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\ns : BinaryCofan X Y\nm : of (↑X ⊕ ↑Y) ⟶ s.pt\nh₁ : ContinuousMap.mk Sum.inl ≫ m = BinaryCofan.inl s\nh₂ : ContinuousMap.mk Sum.inr ≫ m = BinaryCofan.inr s\nx : ↑Y\n⊢ ↑m (Sum.inr x) = ↑((fun s => ContinuousMap.mk (Sum.elim ↑(BinaryCofan.inl s) ↑(BinaryCofan.inr s))) s) (Sum.inr x)\n[PROOFSTEP]\nexacts [(ConcreteCategory.congr_hom h₁ x : _), (ConcreteCategory.congr_hom h₂ x : _)]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\n⊢ Nonempty (IsColimit c) ↔\n    OpenEmbedding ↑(BinaryCofan.inl c) ∧\n      OpenEmbedding ↑(BinaryCofan.inr c) ∧ IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\n[PROOFSTEP]\nclassical\nconstructor\n· rintro ⟨h⟩\n  rw [← show _ = c.inl from h.comp_coconePointUniqueUpToIso_inv (binaryCofanIsColimit X Y) ⟨WalkingPair.left⟩, ←\n    show _ = c.inr from h.comp_coconePointUniqueUpToIso_inv (binaryCofanIsColimit X Y) ⟨WalkingPair.right⟩]\n  dsimp\n  refine'\n    ⟨(homeoOfIso <| h.coconePointUniqueUpToIso (binaryCofanIsColimit X Y)).symm.openEmbedding.comp openEmbedding_inl,\n      (homeoOfIso <| h.coconePointUniqueUpToIso (binaryCofanIsColimit X Y)).symm.openEmbedding.comp openEmbedding_inr,\n      _⟩\n  erw [Set.range_comp, ← eq_compl_iff_isCompl, coe_comp, coe_comp, Set.range_comp _ Sum.inr, ←\n    Set.image_compl_eq (homeoOfIso <| h.coconePointUniqueUpToIso (binaryCofanIsColimit X Y)).symm.bijective,\n    Set.compl_range_inr, Set.image_comp]\n  aesop\n· rintro ⟨h₁, h₂, h₃⟩\n  have : ∀ x, x ∈ Set.range c.inl ∨ x ∈ Set.range c.inr :=\n    by\n    rw [eq_compl_iff_isCompl.mpr h₃.symm]\n    exact fun _ => or_not\n  refine' ⟨BinaryCofan.IsColimit.mk _ _ _ _ _⟩\n  · intro T f g\n    refine' ContinuousMap.mk _ _\n    ·\n      exact fun x =>\n        if h : x ∈ Set.range c.inl then f ((Equiv.ofInjective _ h₁.inj).symm ⟨x, h⟩)\n        else g ((Equiv.ofInjective _ h₂.inj).symm ⟨x, (this x).resolve_left h⟩)\n    rw [continuous_iff_continuousAt]\n    intro x\n    by_cases x ∈ Set.range c.inl\n    · revert h x\n      apply (IsOpen.continuousOn_iff _).mp\n      · rw [continuousOn_iff_continuous_restrict]\n        convert_to Continuous (f ∘ (Homeomorph.ofEmbedding _ h₁.toEmbedding).symm)\n        · ext ⟨x, hx⟩\n          exact dif_pos hx\n        apply Continuous.comp\n        · exact f.continuous_toFun\n        · continuity\n      · exact h₁.open_range\n    · revert h x\n      apply (IsOpen.continuousOn_iff _).mp\n      · rw [continuousOn_iff_continuous_restrict]\n        have : ∀ a, a ∉ Set.range c.inl → a ∈ Set.range c.inr :=\n          by\n          rintro a (h : a ∈ (Set.range c.inl)ᶜ)\n          rwa [eq_compl_iff_isCompl.mpr h₃.symm]\n        convert_to Continuous (g ∘ (Homeomorph.ofEmbedding _ h₂.toEmbedding).symm ∘ Subtype.map _ this)\n        · ext ⟨x, hx⟩\n          exact dif_neg hx\n        apply Continuous.comp\n        · exact g.continuous_toFun\n        · apply Continuous.comp\n          · continuity\n          · rw [embedding_subtype_val.toInducing.continuous_iff]\n            exact continuous_subtype_val\n      · change IsOpen (Set.range c.inl)ᶜ\n        rw [← eq_compl_iff_isCompl.mpr h₃.symm]\n        exact h₂.open_range\n  · intro T f g\n    ext x\n    refine' (dif_pos _).trans _\n    · exact ⟨x, rfl⟩\n    · dsimp; conv_lhs => erw [Equiv.ofInjective_symm_apply]\n  · intro T f g\n    ext x\n    refine' (dif_neg _).trans _\n    · rintro ⟨y, e⟩\n      have : c.inr x ∈ Set.range c.inl ⊓ Set.range c.inr := ⟨⟨_, e⟩, ⟨_, rfl⟩⟩\n      rwa [disjoint_iff.mp h₃.1] at this \n    · exact congr_arg g (Equiv.ofInjective_symm_apply _ _)\n  · rintro T _ _ m rfl rfl\n    ext x\n    change m x = dite _ _ _\n    split_ifs <;> exact congr_arg _ (Equiv.apply_ofInjective_symm _ ⟨_, _⟩).symm\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\n⊢ Nonempty (IsColimit c) ↔\n    OpenEmbedding ↑(BinaryCofan.inl c) ∧\n      OpenEmbedding ↑(BinaryCofan.inr c) ∧ IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\n⊢ Nonempty (IsColimit c) →\n    OpenEmbedding ↑(BinaryCofan.inl c) ∧\n      OpenEmbedding ↑(BinaryCofan.inr c) ∧ IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\n[PROOFSTEP]\nrintro ⟨h⟩\n[GOAL]\ncase mp.intro\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh : IsColimit c\n⊢ OpenEmbedding ↑(BinaryCofan.inl c) ∧\n    OpenEmbedding ↑(BinaryCofan.inr c) ∧ IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\n[PROOFSTEP]\nrw [← show _ = c.inl from h.comp_coconePointUniqueUpToIso_inv (binaryCofanIsColimit X Y) ⟨WalkingPair.left⟩, ←\n  show _ = c.inr from h.comp_coconePointUniqueUpToIso_inv (binaryCofanIsColimit X Y) ⟨WalkingPair.right⟩]\n[GOAL]\ncase mp.intro\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh : IsColimit c\n⊢ OpenEmbedding\n      ↑(NatTrans.app (TopCat.binaryCofan X Y).ι { as := WalkingPair.left } ≫\n          (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv) ∧\n    OpenEmbedding\n        ↑(NatTrans.app (TopCat.binaryCofan X Y).ι { as := WalkingPair.right } ≫\n            (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv) ∧\n      IsCompl\n        (Set.range\n          ↑(NatTrans.app (TopCat.binaryCofan X Y).ι { as := WalkingPair.left } ≫\n              (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv))\n        (Set.range\n          ↑(NatTrans.app (TopCat.binaryCofan X Y).ι { as := WalkingPair.right } ≫\n              (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mp.intro\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh : IsColimit c\n⊢ OpenEmbedding\n      ↑(BinaryCofan.inl (TopCat.binaryCofan X Y) ≫\n          (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv) ∧\n    OpenEmbedding\n        ↑(BinaryCofan.inr (TopCat.binaryCofan X Y) ≫\n            (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv) ∧\n      IsCompl\n        (Set.range\n          ↑(BinaryCofan.inl (TopCat.binaryCofan X Y) ≫\n              (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv))\n        (Set.range\n          ↑(BinaryCofan.inr (TopCat.binaryCofan X Y) ≫\n              (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv))\n[PROOFSTEP]\nrefine'\n  ⟨(homeoOfIso <| h.coconePointUniqueUpToIso (binaryCofanIsColimit X Y)).symm.openEmbedding.comp openEmbedding_inl,\n    (homeoOfIso <| h.coconePointUniqueUpToIso (binaryCofanIsColimit X Y)).symm.openEmbedding.comp openEmbedding_inr, _⟩\n[GOAL]\ncase mp.intro\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh : IsColimit c\n⊢ IsCompl\n    (Set.range\n      ↑(BinaryCofan.inl (TopCat.binaryCofan X Y) ≫\n          (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv))\n    (Set.range\n      ↑(BinaryCofan.inr (TopCat.binaryCofan X Y) ≫\n          (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv))\n[PROOFSTEP]\nerw [Set.range_comp, ← eq_compl_iff_isCompl, coe_comp, coe_comp, Set.range_comp _ Sum.inr, ←\n  Set.image_compl_eq (homeoOfIso <| h.coconePointUniqueUpToIso (binaryCofanIsColimit X Y)).symm.bijective,\n  Set.compl_range_inr, Set.image_comp]\n[GOAL]\ncase mp.intro\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh : IsColimit c\n⊢ ↑(IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv ''\n      (↑(BinaryCofan.inl (TopCat.binaryCofan X Y)) '' Set.range fun x => x) =\n    ↑(Homeomorph.symm (homeoOfIso (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)))) ''\n      Set.range Sum.inl\n[PROOFSTEP]\naesop\n[GOAL]\ncase mpr\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\n⊢ OpenEmbedding ↑(BinaryCofan.inl c) ∧\n      OpenEmbedding ↑(BinaryCofan.inr c) ∧ IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c)) →\n    Nonempty (IsColimit c)\n[PROOFSTEP]\nrintro ⟨h₁, h₂, h₃⟩\n[GOAL]\ncase mpr.intro.intro\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\n⊢ Nonempty (IsColimit c)\n[PROOFSTEP]\nhave : ∀ x, x ∈ Set.range c.inl ∨ x ∈ Set.range c.inr :=\n  by\n  rw [eq_compl_iff_isCompl.mpr h₃.symm]\n  exact fun _ => or_not\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\n⊢ ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\n[PROOFSTEP]\nrw [eq_compl_iff_isCompl.mpr h₃.symm]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\n⊢ ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ (Set.range ↑(BinaryCofan.inl c))ᶜ\n[PROOFSTEP]\nexact fun _ => or_not\n[GOAL]\ncase mpr.intro.intro\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\n⊢ Nonempty (IsColimit c)\n[PROOFSTEP]\nrefine' ⟨BinaryCofan.IsColimit.mk _ _ _ _ _⟩\n[GOAL]\ncase mpr.intro.intro.refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\n⊢ {T : TopCat} → (X ⟶ T) → (Y ⟶ T) → (c.pt ⟶ T)\n[PROOFSTEP]\nintro T f g\n[GOAL]\ncase mpr.intro.intro.refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ c.pt ⟶ T\n[PROOFSTEP]\nrefine' ContinuousMap.mk _ _\n[GOAL]\ncase mpr.intro.intro.refine'_1.refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ ↑c.pt → ↑T\n[PROOFSTEP]\nexact fun x =>\n  if h : x ∈ Set.range c.inl then f ((Equiv.ofInjective _ h₁.inj).symm ⟨x, h⟩)\n  else g ((Equiv.ofInjective _ h₂.inj).symm ⟨x, (this x).resolve_left h⟩)\n[GOAL]\ncase mpr.intro.intro.refine'_1.refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ Continuous fun x =>\n    if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n      ↑f\n        (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n          { val := x, property := h })\n    else\n      ↑g\n        (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n          { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) })\n[PROOFSTEP]\nrw [continuous_iff_continuousAt]\n[GOAL]\ncase mpr.intro.intro.refine'_1.refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ ∀ (x : ↑c.pt),\n    ContinuousAt\n      (fun x =>\n        if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n          ↑f\n            (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n              { val := x, property := h })\n        else\n          ↑g\n            (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n              { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n      x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase mpr.intro.intro.refine'_1.refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : ↑c.pt\n⊢ ContinuousAt\n    (fun x =>\n      if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n        ↑f\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h })\n      else\n        ↑g\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n    x\n[PROOFSTEP]\nby_cases x ∈ Set.range c.inl\n[GOAL]\ncase mpr.intro.intro.refine'_1.refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : ↑c.pt\n⊢ ContinuousAt\n    (fun x =>\n      if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n        ↑f\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h })\n      else\n        ↑g\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n    x\n[PROOFSTEP]\nby_cases x ∈ Set.range c.inl\n[GOAL]\ncase pos\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : ↑c.pt\nh : x ∈ Set.range ↑(BinaryCofan.inl c)\n⊢ ContinuousAt\n    (fun x =>\n      if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n        ↑f\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h })\n      else\n        ↑g\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n    x\n[PROOFSTEP]\nrevert h x\n[GOAL]\ncase pos\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ ∀ (x : ↑c.pt),\n    x ∈ Set.range ↑(BinaryCofan.inl c) →\n      ContinuousAt\n        (fun x =>\n          if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n            ↑f\n              (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n                { val := x, property := h })\n          else\n            ↑g\n              (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n                { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n        x\n[PROOFSTEP]\napply (IsOpen.continuousOn_iff _).mp\n[GOAL]\ncase pos\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ ContinuousOn\n    (fun x =>\n      if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n        ↑f\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h })\n      else\n        ↑g\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n    (Set.range ↑(BinaryCofan.inl c))\n[PROOFSTEP]\nrw [continuousOn_iff_continuous_restrict]\n[GOAL]\ncase pos\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ Continuous\n    (Set.restrict (Set.range ↑(BinaryCofan.inl c)) fun x =>\n      if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n        ↑f\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h })\n      else\n        ↑g\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n[PROOFSTEP]\nconvert_to Continuous (f ∘ (Homeomorph.ofEmbedding _ h₁.toEmbedding).symm)\n[GOAL]\ncase h.e'_5.h\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\ne_2✝ : ↑T = (forget TopCat).obj T\n⊢ (Set.restrict (Set.range ↑(BinaryCofan.inl c)) fun x =>\n      if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n        ↑f\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h })\n      else\n        ↑g\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) })) =\n    ↑f ∘ ↑(Homeomorph.symm (Homeomorph.ofEmbedding ↑(BinaryCofan.inl c) (_ : Embedding ↑(BinaryCofan.inl c))))\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase h.e'_5.h.h.mk\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\ne_2✝ : ↑T = (forget TopCat).obj T\nx : ↑c.pt\nhx : x ∈ Set.range ↑(BinaryCofan.inl c)\n⊢ Set.restrict (Set.range ↑(BinaryCofan.inl c))\n      (fun x =>\n        if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n          ↑f\n            (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n              { val := x, property := h })\n        else\n          ↑g\n            (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n              { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n      { val := x, property := hx } =\n    (↑f ∘ ↑(Homeomorph.symm (Homeomorph.ofEmbedding ↑(BinaryCofan.inl c) (_ : Embedding ↑(BinaryCofan.inl c)))))\n      { val := x, property := hx }\n[PROOFSTEP]\nexact dif_pos hx\n[GOAL]\ncase pos\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ Continuous\n    (↑f ∘ ↑(Homeomorph.symm (Homeomorph.ofEmbedding ↑(BinaryCofan.inl c) (_ : Embedding ↑(BinaryCofan.inl c)))))\n[PROOFSTEP]\napply Continuous.comp\n[GOAL]\ncase pos.hg\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ Continuous ↑f\n[PROOFSTEP]\nexact f.continuous_toFun\n[GOAL]\ncase pos.hf\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ Continuous ↑(Homeomorph.symm (Homeomorph.ofEmbedding ↑(BinaryCofan.inl c) (_ : Embedding ↑(BinaryCofan.inl c))))\n[PROOFSTEP]\ncontinuity\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ IsOpen (Set.range ↑(BinaryCofan.inl c))\n[PROOFSTEP]\nexact h₁.open_range\n[GOAL]\ncase neg\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : ↑c.pt\nh : ¬x ∈ Set.range ↑(BinaryCofan.inl c)\n⊢ ContinuousAt\n    (fun x =>\n      if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n        ↑f\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h })\n      else\n        ↑g\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n    x\n[PROOFSTEP]\nrevert h x\n[GOAL]\ncase neg\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ ∀ (x : ↑c.pt),\n    ¬x ∈ Set.range ↑(BinaryCofan.inl c) →\n      ContinuousAt\n        (fun x =>\n          if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n            ↑f\n              (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n                { val := x, property := h })\n          else\n            ↑g\n              (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n                { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n        x\n[PROOFSTEP]\napply (IsOpen.continuousOn_iff _).mp\n[GOAL]\ncase neg\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ ContinuousOn\n    (fun x =>\n      if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n        ↑f\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h })\n      else\n        ↑g\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n    fun a => a ∈ Set.range ↑(BinaryCofan.inl c) → False\n[PROOFSTEP]\nrw [continuousOn_iff_continuous_restrict]\n[GOAL]\ncase neg\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ Continuous\n    (Set.restrict (fun a => a ∈ Set.range ↑(BinaryCofan.inl c) → False) fun x =>\n      if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n        ↑f\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h })\n      else\n        ↑g\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n[PROOFSTEP]\nhave : ∀ a, a ∉ Set.range c.inl → a ∈ Set.range c.inr :=\n  by\n  rintro a (h : a ∈ (Set.range c.inl)ᶜ)\n  rwa [eq_compl_iff_isCompl.mpr h₃.symm]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    ¬a ∈ Set.range ↑(BinaryCofan.inl c) → a ∈ Set.range ↑(BinaryCofan.inr c)\n[PROOFSTEP]\nrintro a (h : a ∈ (Set.range c.inl)ᶜ)\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\na : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })\nh : a ∈ (Set.range ↑(BinaryCofan.inl c))ᶜ\n⊢ a ∈ Set.range ↑(BinaryCofan.inr c)\n[PROOFSTEP]\nrwa [eq_compl_iff_isCompl.mpr h₃.symm]\n[GOAL]\ncase neg\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis✝ :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nthis :\n  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    ¬a ∈ Set.range ↑(BinaryCofan.inl c) → a ∈ Set.range ↑(BinaryCofan.inr c)\n⊢ Continuous\n    (Set.restrict (fun a => a ∈ Set.range ↑(BinaryCofan.inl c) → False) fun x =>\n      if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n        ↑f\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h })\n      else\n        ↑g\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n[PROOFSTEP]\nconvert_to Continuous (g ∘ (Homeomorph.ofEmbedding _ h₂.toEmbedding).symm ∘ Subtype.map _ this)\n[GOAL]\ncase h.e'_5.h\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis✝ :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nthis :\n  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    ¬a ∈ Set.range ↑(BinaryCofan.inl c) → a ∈ Set.range ↑(BinaryCofan.inr c)\ne_1✝ : (↑fun a => a ∈ Set.range ↑(BinaryCofan.inl c) → False) = { a // ¬a ∈ Set.range ↑(BinaryCofan.inl c) }\ne_2✝ : ↑T = (forget TopCat).obj T\n⊢ (Set.restrict (fun a => a ∈ Set.range ↑(BinaryCofan.inl c) → False) fun x =>\n      if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n        ↑f\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h })\n      else\n        ↑g\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) })) =\n    ↑g ∘\n      ↑(Homeomorph.symm (Homeomorph.ofEmbedding ↑(BinaryCofan.inr c) (_ : Embedding ↑(BinaryCofan.inr c)))) ∘\n        Subtype.map (fun a => a) this\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase h.e'_5.h.h.mk\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis✝ :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nthis :\n  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    ¬a ∈ Set.range ↑(BinaryCofan.inl c) → a ∈ Set.range ↑(BinaryCofan.inr c)\ne_1✝ : (↑fun a => a ∈ Set.range ↑(BinaryCofan.inl c) → False) = { a // ¬a ∈ Set.range ↑(BinaryCofan.inl c) }\ne_2✝ : ↑T = (forget TopCat).obj T\nx : ↑c.pt\nhx : x ∈ fun a => a ∈ Set.range ↑(BinaryCofan.inl c) → False\n⊢ Set.restrict (fun a => a ∈ Set.range ↑(BinaryCofan.inl c) → False)\n      (fun x =>\n        if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n          ↑f\n            (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n              { val := x, property := h })\n        else\n          ↑g\n            (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n              { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n      { val := x, property := hx } =\n    (↑g ∘\n        ↑(Homeomorph.symm (Homeomorph.ofEmbedding ↑(BinaryCofan.inr c) (_ : Embedding ↑(BinaryCofan.inr c)))) ∘\n          Subtype.map (fun a => a) this)\n      { val := x, property := hx }\n[PROOFSTEP]\nexact dif_neg hx\n[GOAL]\ncase neg\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis✝ :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nthis :\n  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    ¬a ∈ Set.range ↑(BinaryCofan.inl c) → a ∈ Set.range ↑(BinaryCofan.inr c)\n⊢ Continuous\n    (↑g ∘\n      ↑(Homeomorph.symm (Homeomorph.ofEmbedding ↑(BinaryCofan.inr c) (_ : Embedding ↑(BinaryCofan.inr c)))) ∘\n        Subtype.map (fun a => a) this)\n[PROOFSTEP]\napply Continuous.comp\n[GOAL]\ncase neg.hg\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis✝ :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nthis :\n  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    ¬a ∈ Set.range ↑(BinaryCofan.inl c) → a ∈ Set.range ↑(BinaryCofan.inr c)\n⊢ Continuous ↑g\n[PROOFSTEP]\nexact g.continuous_toFun\n[GOAL]\ncase neg.hf\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis✝ :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nthis :\n  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    ¬a ∈ Set.range ↑(BinaryCofan.inl c) → a ∈ Set.range ↑(BinaryCofan.inr c)\n⊢ Continuous\n    (↑(Homeomorph.symm (Homeomorph.ofEmbedding ↑(BinaryCofan.inr c) (_ : Embedding ↑(BinaryCofan.inr c)))) ∘\n      Subtype.map (fun a => a) this)\n[PROOFSTEP]\napply Continuous.comp\n[GOAL]\ncase neg.hf.hg\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis✝ :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nthis :\n  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    ¬a ∈ Set.range ↑(BinaryCofan.inl c) → a ∈ Set.range ↑(BinaryCofan.inr c)\n⊢ Continuous ↑(Homeomorph.symm (Homeomorph.ofEmbedding ↑(BinaryCofan.inr c) (_ : Embedding ↑(BinaryCofan.inr c))))\n[PROOFSTEP]\ncontinuity\n[GOAL]\ncase neg.hf.hf\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis✝ :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nthis :\n  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    ¬a ∈ Set.range ↑(BinaryCofan.inl c) → a ∈ Set.range ↑(BinaryCofan.inr c)\n⊢ Continuous (Subtype.map (fun a => a) this)\n[PROOFSTEP]\nrw [embedding_subtype_val.toInducing.continuous_iff]\n[GOAL]\ncase neg.hf.hf\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis✝ :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nthis :\n  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    ¬a ∈ Set.range ↑(BinaryCofan.inl c) → a ∈ Set.range ↑(BinaryCofan.inr c)\n⊢ Continuous (Subtype.val ∘ Subtype.map (fun a => a) this)\n[PROOFSTEP]\nexact continuous_subtype_val\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ IsOpen fun a => a ∈ Set.range ↑(BinaryCofan.inl c) → False\n[PROOFSTEP]\nchange IsOpen (Set.range c.inl)ᶜ\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ IsOpen (Set.range ↑(BinaryCofan.inl c))ᶜ\n[PROOFSTEP]\nrw [← eq_compl_iff_isCompl.mpr h₃.symm]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ IsOpen (Set.range ↑(BinaryCofan.inr c))\n[PROOFSTEP]\nexact h₂.open_range\n[GOAL]\ncase mpr.intro.intro.refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\n⊢ ∀ {T : TopCat} (f : X ⟶ T) (g : Y ⟶ T),\n    (BinaryCofan.inl c ≫\n        ContinuousMap.mk fun x =>\n          if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n            ↑f\n              (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n                { val := x, property := h })\n          else\n            ↑g\n              (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n                { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) })) =\n      f\n[PROOFSTEP]\nintro T f g\n[GOAL]\ncase mpr.intro.intro.refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ (BinaryCofan.inl c ≫\n      ContinuousMap.mk fun x =>\n        if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n          ↑f\n            (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n              { val := x, property := h })\n        else\n          ↑g\n            (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n              { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) })) =\n    f\n[PROOFSTEP]\next x\n[GOAL]\ncase mpr.intro.intro.refine'_2.w\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })\n⊢ ↑(BinaryCofan.inl c ≫\n          ContinuousMap.mk fun x =>\n            if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n              ↑f\n                (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n                  { val := x, property := h })\n            else\n              ↑g\n                (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n                  { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n      x =\n    ↑f x\n[PROOFSTEP]\nrefine' (dif_pos _).trans _\n[GOAL]\ncase mpr.intro.intro.refine'_2.w.refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })\n⊢ ↑(BinaryCofan.inl c) x ∈ Set.range ↑(BinaryCofan.inl c)\n[PROOFSTEP]\nexact ⟨x, rfl⟩\n[GOAL]\ncase mpr.intro.intro.refine'_2.w.refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })\n⊢ (fun h =>\n        ↑f\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := ↑(BinaryCofan.inl c) x, property := h }))\n      (_ : ∃ y, ↑(BinaryCofan.inl c) y = ↑(BinaryCofan.inl c) x) =\n    ↑f x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mpr.intro.intro.refine'_2.w.refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })\n⊢ ↑f\n      (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n        { val := ↑(BinaryCofan.inl c) x, property := (_ : ∃ y, ↑(BinaryCofan.inl c) y = ↑(BinaryCofan.inl c) x) }) =\n    ↑f x\n[PROOFSTEP]\nconv_lhs => erw [Equiv.ofInjective_symm_apply]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })\n| ↑f\n    (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n      { val := ↑(BinaryCofan.inl c) x, property := (_ : ∃ y, ↑(BinaryCofan.inl c) y = ↑(BinaryCofan.inl c) x) })\n[PROOFSTEP]\nerw [Equiv.ofInjective_symm_apply]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })\n| ↑f\n    (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n      { val := ↑(BinaryCofan.inl c) x, property := (_ : ∃ y, ↑(BinaryCofan.inl c) y = ↑(BinaryCofan.inl c) x) })\n[PROOFSTEP]\nerw [Equiv.ofInjective_symm_apply]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })\n| ↑f\n    (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n      { val := ↑(BinaryCofan.inl c) x, property := (_ : ∃ y, ↑(BinaryCofan.inl c) y = ↑(BinaryCofan.inl c) x) })\n[PROOFSTEP]\nerw [Equiv.ofInjective_symm_apply]\n[GOAL]\ncase mpr.intro.intro.refine'_3\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\n⊢ ∀ {T : TopCat} (f : X ⟶ T) (g : Y ⟶ T),\n    (BinaryCofan.inr c ≫\n        ContinuousMap.mk fun x =>\n          if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n            ↑f\n              (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n                { val := x, property := h })\n          else\n            ↑g\n              (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n                { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) })) =\n      g\n[PROOFSTEP]\nintro T f g\n[GOAL]\ncase mpr.intro.intro.refine'_3\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\n⊢ (BinaryCofan.inr c ≫\n      ContinuousMap.mk fun x =>\n        if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n          ↑f\n            (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n              { val := x, property := h })\n        else\n          ↑g\n            (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n              { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) })) =\n    g\n[PROOFSTEP]\next x\n[GOAL]\ncase mpr.intro.intro.refine'_3.w\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })\n⊢ ↑(BinaryCofan.inr c ≫\n          ContinuousMap.mk fun x =>\n            if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n              ↑f\n                (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n                  { val := x, property := h })\n            else\n              ↑g\n                (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n                  { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n      x =\n    ↑g x\n[PROOFSTEP]\nrefine' (dif_neg _).trans _\n[GOAL]\ncase mpr.intro.intro.refine'_3.w.refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })\n⊢ ¬↑(BinaryCofan.inr c) x ∈ Set.range ↑(BinaryCofan.inl c)\n[PROOFSTEP]\nrintro ⟨y, e⟩\n[GOAL]\ncase mpr.intro.intro.refine'_3.w.refine'_1.intro\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })\ny : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })\ne : ↑(BinaryCofan.inl c) y = ↑(BinaryCofan.inr c) x\n⊢ False\n[PROOFSTEP]\nhave : c.inr x ∈ Set.range c.inl ⊓ Set.range c.inr := ⟨⟨_, e⟩, ⟨_, rfl⟩⟩\n[GOAL]\ncase mpr.intro.intro.refine'_3.w.refine'_1.intro\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis✝ :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })\ny : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })\ne : ↑(BinaryCofan.inl c) y = ↑(BinaryCofan.inr c) x\nthis : ↑(BinaryCofan.inr c) x ∈ Set.range ↑(BinaryCofan.inl c) ⊓ Set.range ↑(BinaryCofan.inr c)\n⊢ False\n[PROOFSTEP]\nrwa [disjoint_iff.mp h₃.1] at this \n[GOAL]\ncase mpr.intro.intro.refine'_3.w.refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nf : X ⟶ T\ng : Y ⟶ T\nx : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })\n⊢ (fun h =>\n        ↑g\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := ↑(BinaryCofan.inr c) x,\n              property := (_ : ↑(BinaryCofan.inr c) x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n      (_ : ↑(BinaryCofan.inr c) x ∈ Set.range ↑(BinaryCofan.inl c) → False) =\n    ↑g x\n[PROOFSTEP]\nexact congr_arg g (Equiv.ofInjective_symm_apply _ _)\n[GOAL]\ncase mpr.intro.intro.refine'_4\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\n⊢ ∀ {T : TopCat} (f : X ⟶ T) (g : Y ⟶ T) (m : c.pt ⟶ T),\n    BinaryCofan.inl c ≫ m = f →\n      BinaryCofan.inr c ≫ m = g →\n        m =\n          ContinuousMap.mk fun x =>\n            if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n              ↑f\n                (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n                  { val := x, property := h })\n            else\n              ↑g\n                (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n                  { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) })\n[PROOFSTEP]\nrintro T _ _ m rfl rfl\n[GOAL]\ncase mpr.intro.intro.refine'_4\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nm : c.pt ⟶ T\n⊢ m =\n    ContinuousMap.mk fun x =>\n      if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n        ↑(BinaryCofan.inl c ≫ m)\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h })\n      else\n        ↑(BinaryCofan.inr c ≫ m)\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) })\n[PROOFSTEP]\next x\n[GOAL]\ncase mpr.intro.intro.refine'_4.w\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nm : c.pt ⟶ T\nx : (forget TopCat).obj c.pt\n⊢ ↑m x =\n    ↑(ContinuousMap.mk fun x =>\n          if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n            ↑(BinaryCofan.inl c ≫ m)\n              (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n                { val := x, property := h })\n          else\n            ↑(BinaryCofan.inr c ≫ m)\n              (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n                { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n      x\n[PROOFSTEP]\nchange m x = dite _ _ _\n[GOAL]\ncase mpr.intro.intro.refine'_4.w\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nm : c.pt ⟶ T\nx : (forget TopCat).obj c.pt\n⊢ ↑m x =\n    if h : x ∈ Set.range ↑(BinaryCofan.inl c) then\n      (fun h =>\n          ↑(BinaryCofan.inl c ≫ m)\n            (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n              { val := x, property := h }))\n        h\n    else\n      (fun h =>\n          ↑(BinaryCofan.inr c ≫ m)\n            (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n              { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n        h\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nm : c.pt ⟶ T\nx : (forget TopCat).obj c.pt\nh✝ : x ∈ Set.range ↑(BinaryCofan.inl c)\n⊢ ↑m x =\n    (fun h =>\n        ↑(BinaryCofan.inl c ≫ m)\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inl c) (_ : Function.Injective ↑(BinaryCofan.inl c))).symm\n            { val := x, property := h }))\n      h✝\n[PROOFSTEP]\nexact congr_arg _ (Equiv.apply_ofInjective_symm _ ⟨_, _⟩).symm\n[GOAL]\ncase neg\nJ : Type v\ninst✝ : SmallCategory J\nX Y : TopCat\nc : BinaryCofan X Y\nh₁ : OpenEmbedding ↑(BinaryCofan.inl c)\nh₂ : OpenEmbedding ↑(BinaryCofan.inr c)\nh₃ : IsCompl (Set.range ↑(BinaryCofan.inl c)) (Set.range ↑(BinaryCofan.inr c))\nthis :\n  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),\n    x ∈ Set.range ↑(BinaryCofan.inl c) ∨ x ∈ Set.range ↑(BinaryCofan.inr c)\nT : TopCat\nm : c.pt ⟶ T\nx : (forget TopCat).obj c.pt\nh✝ : ¬x ∈ Set.range ↑(BinaryCofan.inl c)\n⊢ ↑m x =\n    (fun h =>\n        ↑(BinaryCofan.inr c ≫ m)\n          (↑(Equiv.ofInjective ↑(BinaryCofan.inr c) (_ : Function.Injective ↑(BinaryCofan.inr c))).symm\n            { val := x, property := (_ : x ∈ Set.range ↑(BinaryCofan.inr c)) }))\n      h✝\n[PROOFSTEP]\nexact congr_arg _ (Equiv.apply_ofInjective_symm _ ⟨_, _⟩).symm\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.TopCat.Limits.Products", "llama_tokens": 41207, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.603931819468636, "lm_q2_score": 0.588889130767832, "lm_q1q2_score": 0.3556488842099203}}
{"text": "[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne f g : A₁ ≃ₐ[R] A₂\nh₁ : (fun f => f.toFun) f = (fun f => f.toFun) g\nh₂ : (fun f => f.invFun) f = (fun f => f.invFun) g\n⊢ f = g\n[PROOFSTEP]\nobtain ⟨⟨f, _⟩, _⟩ := f\n[GOAL]\ncase mk.mk\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne g : A₁ ≃ₐ[R] A₂\nf : A₁ → A₂\ninvFun✝ : A₂ → A₁\nleft_inv✝ : Function.LeftInverse invFun✝ f\nright_inv✝ : Function.RightInverse invFun✝ f\nmap_mul'✝ :\n  ∀ (x y : A₁),\n    Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } (x * y) =\n      Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } x *\n        Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } y\nmap_add'✝ :\n  ∀ (x y : A₁),\n    Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } (x + y) =\n      Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } x +\n        Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } y\ncommutes'✝ :\n  ∀ (r : R),\n    Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n        (↑(algebraMap R A₁) r) =\n      ↑(algebraMap R A₂) r\nh₁ :\n  (fun f => f.toFun)\n      { toEquiv := { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        map_mul' := map_mul'✝, map_add' := map_add'✝, commutes' := commutes'✝ } =\n    (fun f => f.toFun) g\nh₂ :\n  (fun f => f.invFun)\n      { toEquiv := { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        map_mul' := map_mul'✝, map_add' := map_add'✝, commutes' := commutes'✝ } =\n    (fun f => f.invFun) g\n⊢ { toEquiv := { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }, map_mul' := map_mul'✝,\n      map_add' := map_add'✝, commutes' := commutes'✝ } =\n    g\n[PROOFSTEP]\nobtain ⟨⟨g, _⟩, _⟩ := g\n[GOAL]\ncase mk.mk.mk.mk\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\nf : A₁ → A₂\ninvFun✝¹ : A₂ → A₁\nleft_inv✝¹ : Function.LeftInverse invFun✝¹ f\nright_inv✝¹ : Function.RightInverse invFun✝¹ f\nmap_mul'✝¹ :\n  ∀ (x y : A₁),\n    Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } (x * y) =\n      Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } x *\n        Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } y\nmap_add'✝¹ :\n  ∀ (x y : A₁),\n    Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } (x + y) =\n      Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } x +\n        Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } y\ncommutes'✝¹ :\n  ∀ (r : R),\n    Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ }\n        (↑(algebraMap R A₁) r) =\n      ↑(algebraMap R A₂) r\ng : A₁ → A₂\ninvFun✝ : A₂ → A₁\nleft_inv✝ : Function.LeftInverse invFun✝ g\nright_inv✝ : Function.RightInverse invFun✝ g\nmap_mul'✝ :\n  ∀ (x y : A₁),\n    Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } (x * y) =\n      Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } x *\n        Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } y\nmap_add'✝ :\n  ∀ (x y : A₁),\n    Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } (x + y) =\n      Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } x +\n        Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } y\ncommutes'✝ :\n  ∀ (r : R),\n    Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n        (↑(algebraMap R A₁) r) =\n      ↑(algebraMap R A₂) r\nh₁ :\n  (fun f => f.toFun)\n      { toEquiv := { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ },\n        map_mul' := map_mul'✝¹, map_add' := map_add'✝¹, commutes' := commutes'✝¹ } =\n    (fun f => f.toFun)\n      { toEquiv := { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        map_mul' := map_mul'✝, map_add' := map_add'✝, commutes' := commutes'✝ }\nh₂ :\n  (fun f => f.invFun)\n      { toEquiv := { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ },\n        map_mul' := map_mul'✝¹, map_add' := map_add'✝¹, commutes' := commutes'✝¹ } =\n    (fun f => f.invFun)\n      { toEquiv := { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        map_mul' := map_mul'✝, map_add' := map_add'✝, commutes' := commutes'✝ }\n⊢ { toEquiv := { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ },\n      map_mul' := map_mul'✝¹, map_add' := map_add'✝¹, commutes' := commutes'✝¹ } =\n    { toEquiv := { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n      map_mul' := map_mul'✝, map_add' := map_add'✝, commutes' := commutes'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne f g : A₁ ≃ₐ[R] A₂\nh₁ : (fun f => f.toFun) f = (fun f => f.toFun) g\nh₂ : (fun f => f.invFun) f = (fun f => f.invFun) g\n⊢ f = g\n[PROOFSTEP]\nobtain ⟨⟨f, _⟩, _⟩ := f\n[GOAL]\ncase mk.mk\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne g : A₁ ≃ₐ[R] A₂\nf : A₁ → A₂\ninvFun✝ : A₂ → A₁\nleft_inv✝ : Function.LeftInverse invFun✝ f\nright_inv✝ : Function.RightInverse invFun✝ f\nmap_mul'✝ :\n  ∀ (x y : A₁),\n    Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } (x * y) =\n      Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } x *\n        Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } y\nmap_add'✝ :\n  ∀ (x y : A₁),\n    Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } (x + y) =\n      Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } x +\n        Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } y\ncommutes'✝ :\n  ∀ (r : R),\n    Equiv.toFun { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n        (↑(algebraMap R A₁) r) =\n      ↑(algebraMap R A₂) r\nh₁ :\n  (fun f => f.toFun)\n      { toEquiv := { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        map_mul' := map_mul'✝, map_add' := map_add'✝, commutes' := commutes'✝ } =\n    (fun f => f.toFun) g\nh₂ :\n  (fun f => f.invFun)\n      { toEquiv := { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        map_mul' := map_mul'✝, map_add' := map_add'✝, commutes' := commutes'✝ } =\n    (fun f => f.invFun) g\n⊢ { toEquiv := { toFun := f, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }, map_mul' := map_mul'✝,\n      map_add' := map_add'✝, commutes' := commutes'✝ } =\n    g\n[PROOFSTEP]\nobtain ⟨⟨g, _⟩, _⟩ := g\n[GOAL]\ncase mk.mk.mk.mk\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\nf : A₁ → A₂\ninvFun✝¹ : A₂ → A₁\nleft_inv✝¹ : Function.LeftInverse invFun✝¹ f\nright_inv✝¹ : Function.RightInverse invFun✝¹ f\nmap_mul'✝¹ :\n  ∀ (x y : A₁),\n    Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } (x * y) =\n      Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } x *\n        Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } y\nmap_add'✝¹ :\n  ∀ (x y : A₁),\n    Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } (x + y) =\n      Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } x +\n        Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } y\ncommutes'✝¹ :\n  ∀ (r : R),\n    Equiv.toFun { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ }\n        (↑(algebraMap R A₁) r) =\n      ↑(algebraMap R A₂) r\ng : A₁ → A₂\ninvFun✝ : A₂ → A₁\nleft_inv✝ : Function.LeftInverse invFun✝ g\nright_inv✝ : Function.RightInverse invFun✝ g\nmap_mul'✝ :\n  ∀ (x y : A₁),\n    Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } (x * y) =\n      Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } x *\n        Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } y\nmap_add'✝ :\n  ∀ (x y : A₁),\n    Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } (x + y) =\n      Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } x +\n        Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } y\ncommutes'✝ :\n  ∀ (r : R),\n    Equiv.toFun { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n        (↑(algebraMap R A₁) r) =\n      ↑(algebraMap R A₂) r\nh₁ :\n  (fun f => f.toFun)\n      { toEquiv := { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ },\n        map_mul' := map_mul'✝¹, map_add' := map_add'✝¹, commutes' := commutes'✝¹ } =\n    (fun f => f.toFun)\n      { toEquiv := { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        map_mul' := map_mul'✝, map_add' := map_add'✝, commutes' := commutes'✝ }\nh₂ :\n  (fun f => f.invFun)\n      { toEquiv := { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ },\n        map_mul' := map_mul'✝¹, map_add' := map_add'✝¹, commutes' := commutes'✝¹ } =\n    (fun f => f.invFun)\n      { toEquiv := { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n        map_mul' := map_mul'✝, map_add' := map_add'✝, commutes' := commutes'✝ }\n⊢ { toEquiv := { toFun := f, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ },\n      map_mul' := map_mul'✝¹, map_add' := map_add'✝¹, commutes' := commutes'✝¹ } =\n    { toEquiv := { toFun := g, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ },\n      map_mul' := map_mul'✝, map_add' := map_add'✝, commutes' := commutes'✝ }\n[PROOFSTEP]\ncongr\n  -- Porting note: the default simps projection was `e.toEquiv.toFun`, it should be `FunLike.coe`\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\nr : R\nx : A₁\n⊢ ↑e (r • x) = r • ↑e x\n[PROOFSTEP]\nsimp only [Algebra.smul_def, map_mul, commutes]\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\nsrc✝ : A₂ ≃+* A₁ := RingEquiv.symm (toRingEquiv e)\nr : R\n⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R A₂) r) = ↑(algebraMap R A₁) r\n[PROOFSTEP]\nrw [← e.toRingEquiv.symm_apply_apply (algebraMap R A₁ r)]\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\nsrc✝ : A₂ ≃+* A₁ := RingEquiv.symm (toRingEquiv e)\nr : R\n⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R A₂) r) =\n    ↑(RingEquiv.symm (toRingEquiv e)) (↑(toRingEquiv e) (↑(algebraMap R A₁) r))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\nsrc✝ : A₂ ≃+* A₁ := RingEquiv.symm (toRingEquiv e)\nr : R\n⊢ ↑(algebraMap R A₂) r = ↑(toRingEquiv e) (↑(algebraMap R A₁) r)\n[PROOFSTEP]\nchange _ = e _\n[GOAL]\ncase e_a\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\nsrc✝ : A₂ ≃+* A₁ := RingEquiv.symm (toRingEquiv e)\nr : R\n⊢ ↑(algebraMap R A₂) r = ↑e (↑(algebraMap R A₁) r)\n[PROOFSTEP]\nrw [e.commutes]\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\n⊢ symm (symm e) = e\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\na✝ : A₁\n⊢ ↑(symm (symm e)) a✝ = ↑e a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne e₁ : A₁ ≃ₐ[R] A₂\ne₂ : A₂ ≃ₐ[R] A₃\nsrc✝ : A₁ ≃+* A₃ := RingEquiv.trans (toRingEquiv e₁) (toRingEquiv e₂)\nr : R\n⊢ Equiv.toFun e₂.toEquiv (Equiv.toFun e₁.toEquiv (↑(algebraMap R A₁) r)) = ↑(algebraMap R A₃) r\n[PROOFSTEP]\nrw [e₁.commutes', e₂.commutes']\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\n⊢ AlgHom.comp ↑e ↑(symm e) = AlgHom.id R A₂\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\nx✝ : A₂\n⊢ ↑(AlgHom.comp ↑e ↑(symm e)) x✝ = ↑(AlgHom.id R A₂) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\n⊢ AlgHom.comp ↑(symm e) ↑e = AlgHom.id R A₁\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\nx✝ : A₁\n⊢ ↑(AlgHom.comp ↑(symm e) ↑e) x✝ = ↑(AlgHom.id R A₁) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\ne₁ : A₁ ≃ₐ[R] A₁'\ne₂ : A₂ ≃ₐ[R] A₂'\nf : A₁ →ₐ[R] A₂\n⊢ (fun f => AlgHom.comp (AlgHom.comp (↑(symm e₂)) f) ↑e₁) ((fun f => AlgHom.comp (AlgHom.comp (↑e₂) f) ↑(symm e₁)) f) =\n    f\n[PROOFSTEP]\nsimp only [AlgHom.comp_assoc, toAlgHom_eq_coe, symm_comp]\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\ne₁ : A₁ ≃ₐ[R] A₁'\ne₂ : A₂ ≃ₐ[R] A₂'\nf : A₁ →ₐ[R] A₂\n⊢ AlgHom.comp (↑(symm e₂)) (AlgHom.comp (↑e₂) (AlgHom.comp f (AlgHom.id R A₁))) = f\n[PROOFSTEP]\nsimp only [← AlgHom.comp_assoc, symm_comp, AlgHom.id_comp, AlgHom.comp_id]\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\ne₁ : A₁ ≃ₐ[R] A₁'\ne₂ : A₂ ≃ₐ[R] A₂'\nf : A₁' →ₐ[R] A₂'\n⊢ (fun f => AlgHom.comp (AlgHom.comp (↑e₂) f) ↑(symm e₁)) ((fun f => AlgHom.comp (AlgHom.comp (↑(symm e₂)) f) ↑e₁) f) =\n    f\n[PROOFSTEP]\nsimp only [AlgHom.comp_assoc, toAlgHom_eq_coe, comp_symm]\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\ne₁ : A₁ ≃ₐ[R] A₁'\ne₂ : A₂ ≃ₐ[R] A₂'\nf : A₁' →ₐ[R] A₂'\n⊢ AlgHom.comp (↑e₂) (AlgHom.comp (↑(symm e₂)) (AlgHom.comp f (AlgHom.id R A₁'))) = f\n[PROOFSTEP]\nsimp only [← AlgHom.comp_assoc, comp_symm, AlgHom.id_comp, AlgHom.comp_id]\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\ne₁ : A₁ ≃ₐ[R] A₁'\ne₂ : A₂ ≃ₐ[R] A₂'\ne₃ : A₃ ≃ₐ[R] A₃'\nf : A₁ →ₐ[R] A₂\ng : A₂ →ₐ[R] A₃\n⊢ ↑(arrowCongr e₁ e₃) (AlgHom.comp g f) = AlgHom.comp (↑(arrowCongr e₂ e₃) g) (↑(arrowCongr e₁ e₂) f)\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\ne₁ : A₁ ≃ₐ[R] A₁'\ne₂ : A₂ ≃ₐ[R] A₂'\ne₃ : A₃ ≃ₐ[R] A₃'\nf : A₁ →ₐ[R] A₂\ng : A₂ →ₐ[R] A₃\nx✝ : A₁'\n⊢ ↑(↑(arrowCongr e₁ e₃) (AlgHom.comp g f)) x✝ = ↑(AlgHom.comp (↑(arrowCongr e₂ e₃) g) (↑(arrowCongr e₁ e₂) f)) x✝\n[PROOFSTEP]\nsimp only [arrowCongr, Equiv.coe_fn_mk, AlgHom.comp_apply]\n[GOAL]\ncase H\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\ne₁ : A₁ ≃ₐ[R] A₁'\ne₂ : A₂ ≃ₐ[R] A₂'\ne₃ : A₃ ≃ₐ[R] A₃'\nf : A₁ →ₐ[R] A₂\ng : A₂ →ₐ[R] A₃\nx✝ : A₁'\n⊢ ↑↑e₃ (↑g (↑f (↑↑(symm e₁) x✝))) = ↑↑e₃ (↑g (↑↑(symm e₂) (↑↑e₂ (↑f (↑↑(symm e₁) x✝)))))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase H.h.e_6.h.h.e_6.h\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\ne₁ : A₁ ≃ₐ[R] A₁'\ne₂ : A₂ ≃ₐ[R] A₂'\ne₃ : A₃ ≃ₐ[R] A₃'\nf : A₁ →ₐ[R] A₂\ng : A₂ →ₐ[R] A₃\nx✝ : A₁'\n⊢ ↑f (↑↑(symm e₁) x✝) = ↑↑(symm e₂) (↑↑e₂ (↑f (↑↑(symm e₁) x✝)))\n[PROOFSTEP]\nexact (e₂.symm_apply_apply _).symm\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\n⊢ arrowCongr refl refl = Equiv.refl (A₁ →ₐ[R] A₂)\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\nx✝¹ : A₁ →ₐ[R] A₂\nx✝ : A₁\n⊢ ↑(↑(arrowCongr refl refl) x✝¹) x✝ = ↑(↑(Equiv.refl (A₁ →ₐ[R] A₂)) x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne e₁ : A₁ ≃ₐ[R] A₂\ne₁' : A₁' ≃ₐ[R] A₂'\ne₂ : A₂ ≃ₐ[R] A₃\ne₂' : A₂' ≃ₐ[R] A₃'\n⊢ arrowCongr (trans e₁ e₂) (trans e₁' e₂') = (arrowCongr e₁ e₁').trans (arrowCongr e₂ e₂')\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne e₁ : A₁ ≃ₐ[R] A₂\ne₁' : A₁' ≃ₐ[R] A₂'\ne₂ : A₂ ≃ₐ[R] A₃\ne₂' : A₂' ≃ₐ[R] A₃'\nx✝¹ : A₁ →ₐ[R] A₁'\nx✝ : A₃\n⊢ ↑(↑(arrowCongr (trans e₁ e₂) (trans e₁' e₂')) x✝¹) x✝ = ↑(↑((arrowCongr e₁ e₁').trans (arrowCongr e₂ e₂')) x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\ne₁ : A₁ ≃ₐ[R] A₁'\ne₂ : A₂ ≃ₐ[R] A₂'\n⊢ (arrowCongr e₁ e₂).symm = arrowCongr (symm e₁) (symm e₂)\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\ne₁ : A₁ ≃ₐ[R] A₁'\ne₂ : A₂ ≃ₐ[R] A₂'\nx✝¹ : A₁' →ₐ[R] A₂'\nx✝ : A₁\n⊢ ↑(↑(arrowCongr e₁ e₂).symm x✝¹) x✝ = ↑(↑(arrowCongr (symm e₁) (symm e₂)) x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\ne' : A₁' ≃ₐ[R] A₂'\nψ : A₁ ≃ₐ[R] A₁'\n⊢ (fun ψ => trans e (trans ψ (symm e'))) ((fun ψ => trans (symm e) (trans ψ e')) ψ) = ψ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\ne' : A₁' ≃ₐ[R] A₂'\nψ : A₁ ≃ₐ[R] A₁'\na✝ : A₁\n⊢ ↑((fun ψ => trans e (trans ψ (symm e'))) ((fun ψ => trans (symm e) (trans ψ e')) ψ)) a✝ = ↑ψ a✝\n[PROOFSTEP]\nsimp_rw [trans_apply, symm_apply_apply]\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\ne' : A₁' ≃ₐ[R] A₂'\nψ : A₂ ≃ₐ[R] A₂'\n⊢ (fun ψ => trans (symm e) (trans ψ e')) ((fun ψ => trans e (trans ψ (symm e'))) ψ) = ψ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\ne' : A₁' ≃ₐ[R] A₂'\nψ : A₂ ≃ₐ[R] A₂'\na✝ : A₂\n⊢ ↑((fun ψ => trans (symm e) (trans ψ e')) ((fun ψ => trans e (trans ψ (symm e'))) ψ)) a✝ = ↑ψ a✝\n[PROOFSTEP]\nsimp_rw [trans_apply, apply_symm_apply]\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\n⊢ equivCongr refl refl = Equiv.refl (A₁ ≃ₐ[R] A₁')\n[PROOFSTEP]\next\n[GOAL]\ncase H.h\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\nx✝ : A₁ ≃ₐ[R] A₁'\na✝ : A₁\n⊢ ↑(↑(equivCongr refl refl) x✝) a✝ = ↑(↑(Equiv.refl (A₁ ≃ₐ[R] A₁')) x✝) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\nl : A₁ ≃ₗ[R] A₂\nmap_mul✝ : ∀ (x y : A₁), ↑l (x * y) = ↑l x * ↑l y\ncommutes✝ : ∀ (r : R), ↑l (↑(algebraMap R A₁) r) = ↑(algebraMap R A₂) r\nmap_mul : ∀ (x y : A₁), ↑(toLinearEquiv e) (x * y) = ↑(toLinearEquiv e) x * ↑(toLinearEquiv e) y\ncommutes : ∀ (r : R), ↑(toLinearEquiv e) (↑(algebraMap R A₁) r) = ↑(algebraMap R A₂) r\n⊢ ofLinearEquiv (toLinearEquiv e) map_mul commutes = e\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\nl : A₁ ≃ₗ[R] A₂\nmap_mul✝ : ∀ (x y : A₁), ↑l (x * y) = ↑l x * ↑l y\ncommutes✝ : ∀ (r : R), ↑l (↑(algebraMap R A₁) r) = ↑(algebraMap R A₂) r\nmap_mul : ∀ (x y : A₁), ↑(toLinearEquiv e) (x * y) = ↑(toLinearEquiv e) x * ↑(toLinearEquiv e) y\ncommutes : ∀ (r : R), ↑(toLinearEquiv e) (↑(algebraMap R A₁) r) = ↑(algebraMap R A₂) r\na✝ : A₁\n⊢ ↑(ofLinearEquiv (toLinearEquiv e) map_mul commutes) a✝ = ↑e a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\nl : A₁ ≃ₗ[R] A₂\nmap_mul : ∀ (x y : A₁), ↑l (x * y) = ↑l x * ↑l y\ncommutes : ∀ (r : R), ↑l (↑(algebraMap R A₁) r) = ↑(algebraMap R A₂) r\n⊢ toLinearEquiv (ofLinearEquiv l map_mul commutes) = l\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\nl : A₁ ≃ₗ[R] A₂\nmap_mul : ∀ (x y : A₁), ↑l (x * y) = ↑l x * ↑l y\ncommutes : ∀ (r : R), ↑l (↑(algebraMap R A₁) r) = ↑(algebraMap R A₂) r\nx✝ : A₁\n⊢ ↑(toLinearEquiv (ofLinearEquiv l map_mul commutes)) x✝ = ↑l x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne ϕ : A₁ ≃ₐ[R] A₂\nsrc✝ : (A₁ ≃ₐ[R] A₁) ≃ A₂ ≃ₐ[R] A₂ := equivCongr ϕ ϕ\nψ χ : A₁ ≃ₐ[R] A₁\n⊢ Equiv.toFun\n      { toFun := fun ψ => trans (symm ϕ) (trans ψ ϕ), invFun := fun ψ => trans ϕ (trans ψ (symm ϕ)),\n        left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      (ψ * χ) =\n    Equiv.toFun\n        { toFun := fun ψ => trans (symm ϕ) (trans ψ ϕ), invFun := fun ψ => trans ϕ (trans ψ (symm ϕ)),\n          left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        ψ *\n      Equiv.toFun\n        { toFun := fun ψ => trans (symm ϕ) (trans ψ ϕ), invFun := fun ψ => trans ϕ (trans ψ (symm ϕ)),\n          left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        χ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne ϕ : A₁ ≃ₐ[R] A₂\nsrc✝ : (A₁ ≃ₐ[R] A₁) ≃ A₂ ≃ₐ[R] A₂ := equivCongr ϕ ϕ\nψ χ : A₁ ≃ₐ[R] A₁\na✝ : A₂\n⊢ ↑(Equiv.toFun\n          { toFun := fun ψ => trans (symm ϕ) (trans ψ ϕ), invFun := fun ψ => trans ϕ (trans ψ (symm ϕ)),\n            left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n          (ψ * χ))\n      a✝ =\n    ↑(Equiv.toFun\n            { toFun := fun ψ => trans (symm ϕ) (trans ψ ϕ), invFun := fun ψ => trans ϕ (trans ψ (symm ϕ)),\n              left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n              right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n            ψ *\n          Equiv.toFun\n            { toFun := fun ψ => trans (symm ϕ) (trans ψ ϕ), invFun := fun ψ => trans ϕ (trans ψ (symm ϕ)),\n              left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n              right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n            χ)\n      a✝\n[PROOFSTEP]\nsimp only [mul_apply, trans_apply, symm_apply_apply]\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\n⊢ autCongr refl = MulEquiv.refl (A₁ ≃ₐ[R] A₁)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne : A₁ ≃ₐ[R] A₂\nx✝ : A₁ ≃ₐ[R] A₁\na✝ : A₁\n⊢ ↑(↑(autCongr refl) x✝) a✝ = ↑(↑(MulEquiv.refl (A₁ ≃ₐ[R] A₁)) x✝) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type uR\nA₁ : Type uA₁\nA₂ : Type uA₂\nA₃ : Type uA₃\nA₁' : Type uA₁'\nA₂' : Type uA₂'\nA₃' : Type uA₃'\ninst✝¹² : CommSemiring R\ninst✝¹¹ : Semiring A₁\ninst✝¹⁰ : Semiring A₂\ninst✝⁹ : Semiring A₃\ninst✝⁸ : Semiring A₁'\ninst✝⁷ : Semiring A₂'\ninst✝⁶ : Semiring A₃'\ninst✝⁵ : Algebra R A₁\ninst✝⁴ : Algebra R A₂\ninst✝³ : Algebra R A₃\ninst✝² : Algebra R A₁'\ninst✝¹ : Algebra R A₂'\ninst✝ : Algebra R A₃'\ne✝ e : A₁ ≃ₐ[R] A₂\ny : R\nx : A₁\nh : ↑(algebraMap R A₂) y = ↑e x\n⊢ ↑(algebraMap R A₁) y = x\n[PROOFSTEP]\nsimpa using e.symm.toAlgHom.algebraMap_eq_apply h\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Algebra.Equiv", "llama_tokens": 21066, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7461389930307512, "lm_q2_score": 0.47657965106367595, "lm_q1q2_score": 0.35559466094359793}}
{"text": "[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nα : E\nhα : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\n⊢ Fintype.card ({ x // x ∈ F⟮α⟯ } ≃ₐ[F] { x // x ∈ F⟮α⟯ }) = finrank F { x // x ∈ F⟮α⟯ }\n[PROOFSTEP]\nletI : Fintype (F⟮α⟯ →ₐ[F] F⟮α⟯) := IntermediateField.fintypeOfAlgHomAdjoinIntegral F hα\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nα : E\nhα : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\nthis : Fintype ({ x // x ∈ F⟮α⟯ } →ₐ[F] { x // x ∈ F⟮α⟯ }) := IntermediateField.fintypeOfAlgHomAdjoinIntegral F hα\n⊢ Fintype.card ({ x // x ∈ F⟮α⟯ } ≃ₐ[F] { x // x ∈ F⟮α⟯ }) = finrank F { x // x ∈ F⟮α⟯ }\n[PROOFSTEP]\nrw [IntermediateField.adjoin.finrank hα]\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nα : E\nhα : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\nthis : Fintype ({ x // x ∈ F⟮α⟯ } →ₐ[F] { x // x ∈ F⟮α⟯ }) := IntermediateField.fintypeOfAlgHomAdjoinIntegral F hα\n⊢ Fintype.card ({ x // x ∈ F⟮α⟯ } ≃ₐ[F] { x // x ∈ F⟮α⟯ }) = Polynomial.natDegree (minpoly F α)\n[PROOFSTEP]\nrw [← IntermediateField.card_algHom_adjoin_integral F hα h_sep h_splits]\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nα : E\nhα : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\nthis : Fintype ({ x // x ∈ F⟮α⟯ } →ₐ[F] { x // x ∈ F⟮α⟯ }) := IntermediateField.fintypeOfAlgHomAdjoinIntegral F hα\n⊢ Fintype.card ({ x // x ∈ F⟮α⟯ } ≃ₐ[F] { x // x ∈ F⟮α⟯ }) = Fintype.card ({ x // x ∈ F⟮α⟯ } →ₐ[F] { x // x ∈ F⟮α⟯ })\n[PROOFSTEP]\nexact Fintype.card_congr (algEquivEquivAlgHom F F⟮α⟯)\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\n⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E\n[PROOFSTEP]\ncases' Field.exists_primitive_element F E with α hα\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\n⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E\n[PROOFSTEP]\nlet iso : F⟮α⟯ ≃ₐ[F] E :=\n  { toFun := fun e => e.val\n    invFun := fun e => ⟨e, by rw [hα]; exact IntermediateField.mem_top⟩\n    left_inv := fun _ => by ext; rfl\n    right_inv := fun _ => rfl\n    map_mul' := fun _ _ => rfl\n    map_add' := fun _ _ => rfl\n    commutes' := fun _ => rfl }\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\ne : E\n⊢ e ∈ F⟮α⟯\n[PROOFSTEP]\nrw [hα]\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\ne : E\n⊢ e ∈ ⊤\n[PROOFSTEP]\nexact IntermediateField.mem_top\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\nx✝ : { x // x ∈ F⟮α⟯ }\n⊢ (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x✝) = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\nx✝ : { x // x ∈ F⟮α⟯ }\n⊢ ↑((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x✝)) = ↑x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\n⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E\n[PROOFSTEP]\nhave H : IsIntegral F α := IsGalois.integral F α\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\n⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E\n[PROOFSTEP]\nhave h_sep : (minpoly F α).Separable := IsGalois.separable F α\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\n⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E\n[PROOFSTEP]\nhave h_splits : (minpoly F α).Splits (algebraMap F E) := IsGalois.splits F α\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F E) (minpoly F α)\n⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E\n[PROOFSTEP]\nreplace h_splits : Polynomial.Splits (algebraMap F F⟮α⟯) (minpoly F α)\n[GOAL]\ncase h_splits\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F E) (minpoly F α)\n⊢ Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\n[PROOFSTEP]\nsimpa using Polynomial.splits_comp_of_splits (algebraMap F E) iso.symm.toAlgHom.toRingHom h_splits\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\n⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E\n[PROOFSTEP]\nrw [← LinearEquiv.finrank_eq iso.toLinearEquiv]\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\n⊢ Fintype.card (E ≃ₐ[F] E) = finrank F { x // x ∈ F⟮α⟯ }\n[PROOFSTEP]\nrw [← IntermediateField.AdjoinSimple.card_aut_eq_finrank F E H h_sep h_splits]\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\n⊢ Fintype.card (E ≃ₐ[F] E) = Fintype.card ({ x // x ∈ F⟮α⟯ } ≃ₐ[F] { x // x ∈ F⟮α⟯ })\n[PROOFSTEP]\napply Fintype.card_congr\n[GOAL]\ncase intro.f\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\n⊢ (E ≃ₐ[F] E) ≃ { x // x ∈ F⟮α⟯ } ≃ₐ[F] { x // x ∈ F⟮α⟯ }\n[PROOFSTEP]\napply Equiv.mk (fun ϕ => iso.trans (ϕ.trans iso.symm)) fun ϕ => iso.symm.trans (ϕ.trans iso)\n[GOAL]\ncase intro.f.left_inv\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\n⊢ Function.LeftInverse (fun ϕ => AlgEquiv.trans (AlgEquiv.symm iso) (AlgEquiv.trans ϕ iso)) fun ϕ =>\n    AlgEquiv.trans iso (AlgEquiv.trans ϕ (AlgEquiv.symm iso))\n[PROOFSTEP]\nintro ϕ\n[GOAL]\ncase intro.f.left_inv\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\nϕ : E ≃ₐ[F] E\n⊢ (fun ϕ => AlgEquiv.trans (AlgEquiv.symm iso) (AlgEquiv.trans ϕ iso))\n      ((fun ϕ => AlgEquiv.trans iso (AlgEquiv.trans ϕ (AlgEquiv.symm iso))) ϕ) =\n    ϕ\n[PROOFSTEP]\next1\n[GOAL]\ncase intro.f.left_inv.h\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\nϕ : E ≃ₐ[F] E\na✝ : E\n⊢ ↑((fun ϕ => AlgEquiv.trans (AlgEquiv.symm iso) (AlgEquiv.trans ϕ iso))\n          ((fun ϕ => AlgEquiv.trans iso (AlgEquiv.trans ϕ (AlgEquiv.symm iso))) ϕ))\n      a✝ =\n    ↑ϕ a✝\n[PROOFSTEP]\nsimp only [trans_apply, apply_symm_apply]\n[GOAL]\ncase intro.f.right_inv\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\n⊢ Function.RightInverse (fun ϕ => AlgEquiv.trans (AlgEquiv.symm iso) (AlgEquiv.trans ϕ iso)) fun ϕ =>\n    AlgEquiv.trans iso (AlgEquiv.trans ϕ (AlgEquiv.symm iso))\n[PROOFSTEP]\nintro ϕ\n[GOAL]\ncase intro.f.right_inv\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\nϕ : { x // x ∈ F⟮α⟯ } ≃ₐ[F] { x // x ∈ F⟮α⟯ }\n⊢ (fun ϕ => AlgEquiv.trans iso (AlgEquiv.trans ϕ (AlgEquiv.symm iso)))\n      ((fun ϕ => AlgEquiv.trans (AlgEquiv.symm iso) (AlgEquiv.trans ϕ iso)) ϕ) =\n    ϕ\n[PROOFSTEP]\next1\n[GOAL]\ncase intro.f.right_inv.h\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nhα : F⟮α⟯ = ⊤\niso : { x // x ∈ F⟮α⟯ } ≃ₐ[F] E :=\n  {\n    toEquiv :=\n      { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n        left_inv :=\n          (_ : ∀ (x : { x // x ∈ F⟮α⟯ }), (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n        right_inv :=\n          (_ :\n            ∀ (x : E),\n              (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x * x_1)),\n    map_add' :=\n      (_ :\n        ∀ (x x_1 : { x // x ∈ F⟮α⟯ }),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (x + x_1)),\n    commutes' :=\n      (_ :\n        ∀ (x : F),\n          Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x) =\n            Equiv.toFun\n              { toFun := fun e => ↑e, invFun := fun e => { val := e, property := (_ : e ∈ F⟮α⟯) },\n                left_inv :=\n                  (_ :\n                    ∀ (x : { x // x ∈ F⟮α⟯ }),\n                      (fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) ((fun e => ↑e) x) = x),\n                right_inv :=\n                  (_ :\n                    ∀ (x : E),\n                      (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x) =\n                        (fun e => ↑e) ((fun e => { val := e, property := (_ : e ∈ F⟮α⟯) }) x)) }\n              (↑(algebraMap F { x // x ∈ F⟮α⟯ }) x)) }\nH : IsIntegral F α\nh_sep : Polynomial.Separable (minpoly F α)\nh_splits : Polynomial.Splits (algebraMap F { x // x ∈ F⟮α⟯ }) (minpoly F α)\nϕ : { x // x ∈ F⟮α⟯ } ≃ₐ[F] { x // x ∈ F⟮α⟯ }\na✝ : { x // x ∈ F⟮α⟯ }\n⊢ ↑((fun ϕ => AlgEquiv.trans iso (AlgEquiv.trans ϕ (AlgEquiv.symm iso)))\n          ((fun ϕ => AlgEquiv.trans (AlgEquiv.symm iso) (AlgEquiv.trans ϕ iso)) ϕ))\n      a✝ =\n    ↑ϕ a✝\n[PROOFSTEP]\nsimp only [trans_apply, symm_apply_apply]\n[GOAL]\nF : Type u_1\nK : Type u_2\nE : Type u_3\ninst✝⁸ : Field F\ninst✝⁷ : Field K\ninst✝⁶ : Field E\nE' : Type u_4\ninst✝⁵ : Field E'\ninst✝⁴ : Algebra F E'\ninst✝³ : Algebra F K\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\n⊢ IsGalois { x // x ∈ ⊥ } E ↔ IsGalois F E\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u_1\nK : Type u_2\nE : Type u_3\ninst✝⁸ : Field F\ninst✝⁷ : Field K\ninst✝⁶ : Field E\nE' : Type u_4\ninst✝⁵ : Field E'\ninst✝⁴ : Algebra F E'\ninst✝³ : Algebra F K\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\n⊢ IsGalois { x // x ∈ ⊥ } E → IsGalois F E\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nF : Type u_1\nK : Type u_2\nE : Type u_3\ninst✝⁸ : Field F\ninst✝⁷ : Field K\ninst✝⁶ : Field E\nE' : Type u_4\ninst✝⁵ : Field E'\ninst✝⁴ : Algebra F E'\ninst✝³ : Algebra F K\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : IsGalois { x // x ∈ ⊥ } E\n⊢ IsGalois F E\n[PROOFSTEP]\nexact IsGalois.tower_top_of_isGalois (⊥ : IntermediateField F E) F E\n[GOAL]\ncase mpr\nF : Type u_1\nK : Type u_2\nE : Type u_3\ninst✝⁸ : Field F\ninst✝⁷ : Field K\ninst✝⁶ : Field E\nE' : Type u_4\ninst✝⁵ : Field E'\ninst✝⁴ : Algebra F E'\ninst✝³ : Algebra F K\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\n⊢ IsGalois F E → IsGalois { x // x ∈ ⊥ } E\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nF : Type u_1\nK : Type u_2\nE : Type u_3\ninst✝⁸ : Field F\ninst✝⁷ : Field K\ninst✝⁶ : Field E\nE' : Type u_4\ninst✝⁵ : Field E'\ninst✝⁴ : Algebra F E'\ninst✝³ : Algebra F K\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : IsGalois F E\n⊢ IsGalois { x // x ∈ ⊥ } E\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\nE : Type u_2\ninst✝⁴ : Field E\ninst✝³ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\nM : Type u_3\ninst✝² : Monoid M\ninst✝¹ : MulSemiringAction M E\ninst✝ : SMulCommClass M F E\nsrc✝ : Subfield E := subfield M E\na : F\ng : M\n⊢ g • ↑(algebraMap F E) a = ↑(algebraMap F E) a\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one, smul_comm, smul_one]\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\nx✝ : { x // x ∈ fixingSubgroup K }\n⊢ (fun ϕ =>\n        { val := AlgEquiv.restrictScalars F ϕ,\n          property :=\n            (_ : ∀ (r : { x // x ∈ K }), ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n      ((fun ϕ =>\n          let src := toRingEquiv ↑ϕ;\n          { toEquiv := src.toEquiv,\n            map_mul' :=\n              (_ :\n                ∀ (x y : E), Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n            map_add' :=\n              (_ :\n                ∀ (x y : E), Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n            commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n        x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\nx✝ : { x // x ∈ fixingSubgroup K }\na✝ : E\n⊢ ↑↑((fun ϕ =>\n              { val := AlgEquiv.restrictScalars F ϕ,\n                property :=\n                  (_ :\n                    ∀ (r : { x // x ∈ K }), ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n            ((fun ϕ =>\n                let src := toRingEquiv ↑ϕ;\n                { toEquiv := src.toEquiv,\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : E),\n                        Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : E),\n                        Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                  commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n              x✝))\n      a✝ =\n    ↑↑x✝ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\nx✝ : E ≃ₐ[{ x // x ∈ K }] E\n⊢ (fun ϕ =>\n        let src := toRingEquiv ↑ϕ;\n        { toEquiv := src.toEquiv,\n          map_mul' :=\n            (_ : ∀ (x y : E), Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n          map_add' :=\n            (_ : ∀ (x y : E), Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n          commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n      ((fun ϕ =>\n          { val := AlgEquiv.restrictScalars F ϕ,\n            property :=\n              (_ : ∀ (r : { x // x ∈ K }), ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n        x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\nx✝ : E ≃ₐ[{ x // x ∈ K }] E\na✝ : E\n⊢ ↑((fun ϕ =>\n            let src := toRingEquiv ↑ϕ;\n            { toEquiv := src.toEquiv,\n              map_mul' :=\n                (_ :\n                  ∀ (x y : E), Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n              map_add' :=\n                (_ :\n                  ∀ (x y : E), Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n              commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n          ((fun ϕ =>\n              { val := AlgEquiv.restrictScalars F ϕ,\n                property :=\n                  (_ :\n                    ∀ (r : { x // x ∈ K }), ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n            x✝))\n      a✝ =\n    ↑x✝ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\nx✝¹ x✝ : { x // x ∈ fixingSubgroup K }\n⊢ Equiv.toFun\n      {\n        toFun := fun ϕ =>\n          let src := toRingEquiv ↑ϕ;\n          { toEquiv := src.toEquiv,\n            map_mul' :=\n              (_ :\n                ∀ (x y : E), Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n            map_add' :=\n              (_ :\n                ∀ (x y : E), Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n            commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) },\n        invFun := fun ϕ =>\n          { val := AlgEquiv.restrictScalars F ϕ,\n            property :=\n              (_ : ∀ (r : { x // x ∈ K }), ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) },\n        left_inv :=\n          (_ :\n            ∀ (x : { x // x ∈ fixingSubgroup K }),\n              (fun ϕ =>\n                    { val := AlgEquiv.restrictScalars F ϕ,\n                      property :=\n                        (_ :\n                          ∀ (r : { x // x ∈ K }),\n                            ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n                  ((fun ϕ =>\n                      let src := toRingEquiv ↑ϕ;\n                      { toEquiv := src.toEquiv,\n                        map_mul' :=\n                          (_ :\n                            ∀ (x y : E),\n                              Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : E),\n                              Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                        commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n                    x) =\n                x),\n        right_inv :=\n          (_ :\n            ∀ (x : E ≃ₐ[{ x // x ∈ K }] E),\n              (fun ϕ =>\n                    let src := toRingEquiv ↑ϕ;\n                    { toEquiv := src.toEquiv,\n                      map_mul' :=\n                        (_ :\n                          ∀ (x y : E),\n                            Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : E),\n                            Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                      commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n                  ((fun ϕ =>\n                      { val := AlgEquiv.restrictScalars F ϕ,\n                        property :=\n                          (_ :\n                            ∀ (r : { x // x ∈ K }),\n                              ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n                    x) =\n                x) }\n      (x✝¹ * x✝) =\n    Equiv.toFun\n        {\n          toFun := fun ϕ =>\n            let src := toRingEquiv ↑ϕ;\n            { toEquiv := src.toEquiv,\n              map_mul' :=\n                (_ :\n                  ∀ (x y : E), Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n              map_add' :=\n                (_ :\n                  ∀ (x y : E), Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n              commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) },\n          invFun := fun ϕ =>\n            { val := AlgEquiv.restrictScalars F ϕ,\n              property :=\n                (_ :\n                  ∀ (r : { x // x ∈ K }), ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) },\n          left_inv :=\n            (_ :\n              ∀ (x : { x // x ∈ fixingSubgroup K }),\n                (fun ϕ =>\n                      { val := AlgEquiv.restrictScalars F ϕ,\n                        property :=\n                          (_ :\n                            ∀ (r : { x // x ∈ K }),\n                              ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n                    ((fun ϕ =>\n                        let src := toRingEquiv ↑ϕ;\n                        { toEquiv := src.toEquiv,\n                          map_mul' :=\n                            (_ :\n                              ∀ (x y : E),\n                                Equiv.toFun src.toEquiv (x * y) =\n                                  Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : E),\n                                Equiv.toFun src.toEquiv (x + y) =\n                                  Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                          commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : E ≃ₐ[{ x // x ∈ K }] E),\n                (fun ϕ =>\n                      let src := toRingEquiv ↑ϕ;\n                      { toEquiv := src.toEquiv,\n                        map_mul' :=\n                          (_ :\n                            ∀ (x y : E),\n                              Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : E),\n                              Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                        commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n                    ((fun ϕ =>\n                        { val := AlgEquiv.restrictScalars F ϕ,\n                          property :=\n                            (_ :\n                              ∀ (r : { x // x ∈ K }),\n                                ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n                      x) =\n                  x) }\n        x✝¹ *\n      Equiv.toFun\n        {\n          toFun := fun ϕ =>\n            let src := toRingEquiv ↑ϕ;\n            { toEquiv := src.toEquiv,\n              map_mul' :=\n                (_ :\n                  ∀ (x y : E), Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n              map_add' :=\n                (_ :\n                  ∀ (x y : E), Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n              commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) },\n          invFun := fun ϕ =>\n            { val := AlgEquiv.restrictScalars F ϕ,\n              property :=\n                (_ :\n                  ∀ (r : { x // x ∈ K }), ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) },\n          left_inv :=\n            (_ :\n              ∀ (x : { x // x ∈ fixingSubgroup K }),\n                (fun ϕ =>\n                      { val := AlgEquiv.restrictScalars F ϕ,\n                        property :=\n                          (_ :\n                            ∀ (r : { x // x ∈ K }),\n                              ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n                    ((fun ϕ =>\n                        let src := toRingEquiv ↑ϕ;\n                        { toEquiv := src.toEquiv,\n                          map_mul' :=\n                            (_ :\n                              ∀ (x y : E),\n                                Equiv.toFun src.toEquiv (x * y) =\n                                  Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : E),\n                                Equiv.toFun src.toEquiv (x + y) =\n                                  Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                          commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : E ≃ₐ[{ x // x ∈ K }] E),\n                (fun ϕ =>\n                      let src := toRingEquiv ↑ϕ;\n                      { toEquiv := src.toEquiv,\n                        map_mul' :=\n                          (_ :\n                            ∀ (x y : E),\n                              Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : E),\n                              Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                        commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n                    ((fun ϕ =>\n                        { val := AlgEquiv.restrictScalars F ϕ,\n                          property :=\n                            (_ :\n                              ∀ (r : { x // x ∈ K }),\n                                ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n                      x) =\n                  x) }\n        x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\nx✝¹ x✝ : { x // x ∈ fixingSubgroup K }\na✝ : E\n⊢ ↑(Equiv.toFun\n          {\n            toFun := fun ϕ =>\n              let src := toRingEquiv ↑ϕ;\n              { toEquiv := src.toEquiv,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : E),\n                      Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : E),\n                      Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) },\n            invFun := fun ϕ =>\n              { val := AlgEquiv.restrictScalars F ϕ,\n                property :=\n                  (_ :\n                    ∀ (r : { x // x ∈ K }), ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) },\n            left_inv :=\n              (_ :\n                ∀ (x : { x // x ∈ fixingSubgroup K }),\n                  (fun ϕ =>\n                        { val := AlgEquiv.restrictScalars F ϕ,\n                          property :=\n                            (_ :\n                              ∀ (r : { x // x ∈ K }),\n                                ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n                      ((fun ϕ =>\n                          let src := toRingEquiv ↑ϕ;\n                          { toEquiv := src.toEquiv,\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : E),\n                                  Equiv.toFun src.toEquiv (x * y) =\n                                    Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : E),\n                                  Equiv.toFun src.toEquiv (x + y) =\n                                    Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                            commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n                        x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : E ≃ₐ[{ x // x ∈ K }] E),\n                  (fun ϕ =>\n                        let src := toRingEquiv ↑ϕ;\n                        { toEquiv := src.toEquiv,\n                          map_mul' :=\n                            (_ :\n                              ∀ (x y : E),\n                                Equiv.toFun src.toEquiv (x * y) =\n                                  Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : E),\n                                Equiv.toFun src.toEquiv (x + y) =\n                                  Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                          commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n                      ((fun ϕ =>\n                          { val := AlgEquiv.restrictScalars F ϕ,\n                            property :=\n                              (_ :\n                                ∀ (r : { x // x ∈ K }),\n                                  ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n                        x) =\n                    x) }\n          (x✝¹ * x✝))\n      a✝ =\n    ↑(Equiv.toFun\n            {\n              toFun := fun ϕ =>\n                let src := toRingEquiv ↑ϕ;\n                { toEquiv := src.toEquiv,\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : E),\n                        Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : E),\n                        Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                  commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) },\n              invFun := fun ϕ =>\n                { val := AlgEquiv.restrictScalars F ϕ,\n                  property :=\n                    (_ :\n                      ∀ (r : { x // x ∈ K }),\n                        ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) },\n              left_inv :=\n                (_ :\n                  ∀ (x : { x // x ∈ fixingSubgroup K }),\n                    (fun ϕ =>\n                          { val := AlgEquiv.restrictScalars F ϕ,\n                            property :=\n                              (_ :\n                                ∀ (r : { x // x ∈ K }),\n                                  ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n                        ((fun ϕ =>\n                            let src := toRingEquiv ↑ϕ;\n                            { toEquiv := src.toEquiv,\n                              map_mul' :=\n                                (_ :\n                                  ∀ (x y : E),\n                                    Equiv.toFun src.toEquiv (x * y) =\n                                      Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : E),\n                                    Equiv.toFun src.toEquiv (x + y) =\n                                      Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                              commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n                          x) =\n                      x),\n              right_inv :=\n                (_ :\n                  ∀ (x : E ≃ₐ[{ x // x ∈ K }] E),\n                    (fun ϕ =>\n                          let src := toRingEquiv ↑ϕ;\n                          { toEquiv := src.toEquiv,\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : E),\n                                  Equiv.toFun src.toEquiv (x * y) =\n                                    Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : E),\n                                  Equiv.toFun src.toEquiv (x + y) =\n                                    Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                            commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n                        ((fun ϕ =>\n                            { val := AlgEquiv.restrictScalars F ϕ,\n                              property :=\n                                (_ :\n                                  ∀ (r : { x // x ∈ K }),\n                                    ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n                          x) =\n                      x) }\n            x✝¹ *\n          Equiv.toFun\n            {\n              toFun := fun ϕ =>\n                let src := toRingEquiv ↑ϕ;\n                { toEquiv := src.toEquiv,\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : E),\n                        Equiv.toFun src.toEquiv (x * y) = Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : E),\n                        Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                  commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) },\n              invFun := fun ϕ =>\n                { val := AlgEquiv.restrictScalars F ϕ,\n                  property :=\n                    (_ :\n                      ∀ (r : { x // x ∈ K }),\n                        ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) },\n              left_inv :=\n                (_ :\n                  ∀ (x : { x // x ∈ fixingSubgroup K }),\n                    (fun ϕ =>\n                          { val := AlgEquiv.restrictScalars F ϕ,\n                            property :=\n                              (_ :\n                                ∀ (r : { x // x ∈ K }),\n                                  ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n                        ((fun ϕ =>\n                            let src := toRingEquiv ↑ϕ;\n                            { toEquiv := src.toEquiv,\n                              map_mul' :=\n                                (_ :\n                                  ∀ (x y : E),\n                                    Equiv.toFun src.toEquiv (x * y) =\n                                      Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : E),\n                                    Equiv.toFun src.toEquiv (x + y) =\n                                      Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                              commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n                          x) =\n                      x),\n              right_inv :=\n                (_ :\n                  ∀ (x : E ≃ₐ[{ x // x ∈ K }] E),\n                    (fun ϕ =>\n                          let src := toRingEquiv ↑ϕ;\n                          { toEquiv := src.toEquiv,\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : E),\n                                  Equiv.toFun src.toEquiv (x * y) =\n                                    Equiv.toFun src.toEquiv x * Equiv.toFun src.toEquiv y),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : E),\n                                  Equiv.toFun src.toEquiv (x + y) =\n                                    Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y),\n                            commutes' := (_ : ↑ϕ ∈ ↑(fixingSubgroup K)) })\n                        ((fun ϕ =>\n                            { val := AlgEquiv.restrictScalars F ϕ,\n                              property :=\n                                (_ :\n                                  ∀ (r : { x // x ∈ K }),\n                                    ↑ϕ (↑(algebraMap { x // x ∈ K } E) r) = ↑(algebraMap { x // x ∈ K } E) r) })\n                          x) =\n                      x) }\n            x✝)\n      a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\n⊢ fixingSubgroup (fixedField H) = H\n[PROOFSTEP]\nhave H_le : H ≤ fixingSubgroup (fixedField H) := (le_iff_le _ _).mp le_rfl\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nH_le : H ≤ fixingSubgroup (fixedField H)\n⊢ fixingSubgroup (fixedField H) = H\n[PROOFSTEP]\nclassical\nsuffices Fintype.card H = Fintype.card (fixingSubgroup (fixedField H)) by\n  exact\n    SetLike.coe_injective\n      (Set.eq_of_inclusion_surjective\n          ((Fintype.bijective_iff_injective_and_card (Set.inclusion H_le)).mpr\n              ⟨Set.inclusion_injective H_le, this⟩).2).symm\napply Fintype.card_congr\nrefine' (FixedPoints.toAlgHomEquiv H E).trans _\nrefine' (algEquivEquivAlgHom (fixedField H) E).toEquiv.symm.trans _\nexact (fixingSubgroupEquiv (fixedField H)).toEquiv.symm\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nH_le : H ≤ fixingSubgroup (fixedField H)\n⊢ fixingSubgroup (fixedField H) = H\n[PROOFSTEP]\nsuffices Fintype.card H = Fintype.card (fixingSubgroup (fixedField H)) by\n  exact\n    SetLike.coe_injective\n      (Set.eq_of_inclusion_surjective\n          ((Fintype.bijective_iff_injective_and_card (Set.inclusion H_le)).mpr\n              ⟨Set.inclusion_injective H_le, this⟩).2).symm\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nH_le : H ≤ fixingSubgroup (fixedField H)\nthis : Fintype.card { x // x ∈ H } = Fintype.card { x // x ∈ fixingSubgroup (fixedField H) }\n⊢ fixingSubgroup (fixedField H) = H\n[PROOFSTEP]\nexact\n  SetLike.coe_injective\n    (Set.eq_of_inclusion_surjective\n        ((Fintype.bijective_iff_injective_and_card (Set.inclusion H_le)).mpr\n            ⟨Set.inclusion_injective H_le, this⟩).2).symm\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nH_le : H ≤ fixingSubgroup (fixedField H)\n⊢ Fintype.card { x // x ∈ H } = Fintype.card { x // x ∈ fixingSubgroup (fixedField H) }\n[PROOFSTEP]\napply Fintype.card_congr\n[GOAL]\ncase f\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nH_le : H ≤ fixingSubgroup (fixedField H)\n⊢ { x // x ∈ H } ≃ { x // x ∈ fixingSubgroup (fixedField H) }\n[PROOFSTEP]\nrefine' (FixedPoints.toAlgHomEquiv H E).trans _\n[GOAL]\ncase f\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nH_le : H ≤ fixingSubgroup (fixedField H)\n⊢ (E →ₐ[{ x // x ∈ FixedPoints.subfield { x // x ∈ H } E }] E) ≃ { x // x ∈ fixingSubgroup (fixedField H) }\n[PROOFSTEP]\nrefine' (algEquivEquivAlgHom (fixedField H) E).toEquiv.symm.trans _\n[GOAL]\ncase f\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nH_le : H ≤ fixingSubgroup (fixedField H)\n⊢ (E ≃ₐ[{ x // x ∈ fixedField H }] E) ≃ { x // x ∈ fixingSubgroup (fixedField H) }\n[PROOFSTEP]\nexact (fixingSubgroupEquiv (fixedField H)).toEquiv.symm\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\nx : { x // x ∈ K }\ny : { x // x ∈ fixedField (fixingSubgroup K) }\nϕ : { x // x ∈ fixingSubgroup K }\n⊢ ϕ • (↑x * ↑y) = ↑x * ↑y\n[PROOFSTEP]\nrw [smul_mul', show ϕ • (x : E) = ↑x from ϕ.2 x, show ϕ • (y : E) = ↑y from y.2 ϕ]\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nh : IsGalois F E\n⊢ IntermediateField.fixedField (IntermediateField.fixingSubgroup K) = K\n[PROOFSTEP]\nhave K_le : K ≤ IntermediateField.fixedField (IntermediateField.fixingSubgroup K) :=\n  (IntermediateField.le_iff_le _ _).mpr le_rfl\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nh : IsGalois F E\nK_le : K ≤ IntermediateField.fixedField (IntermediateField.fixingSubgroup K)\n⊢ IntermediateField.fixedField (IntermediateField.fixingSubgroup K) = K\n[PROOFSTEP]\nsuffices finrank K E = finrank (IntermediateField.fixedField (IntermediateField.fixingSubgroup K)) E by\n  exact (IntermediateField.eq_of_le_of_finrank_eq' K_le this).symm\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nh : IsGalois F E\nK_le : K ≤ IntermediateField.fixedField (IntermediateField.fixingSubgroup K)\nthis :\n  finrank { x // x ∈ K } E = finrank { x // x ∈ IntermediateField.fixedField (IntermediateField.fixingSubgroup K) } E\n⊢ IntermediateField.fixedField (IntermediateField.fixingSubgroup K) = K\n[PROOFSTEP]\nexact (IntermediateField.eq_of_le_of_finrank_eq' K_le this).symm\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nh : IsGalois F E\nK_le : K ≤ IntermediateField.fixedField (IntermediateField.fixingSubgroup K)\n⊢ finrank { x // x ∈ K } E = finrank { x // x ∈ IntermediateField.fixedField (IntermediateField.fixingSubgroup K) } E\n[PROOFSTEP]\nclassical\nrw [IntermediateField.finrank_fixedField_eq_card, Fintype.card_congr (IntermediateField.fixingSubgroupEquiv K).toEquiv]\nexact (card_aut_eq_finrank K E).symm\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nh : IsGalois F E\nK_le : K ≤ IntermediateField.fixedField (IntermediateField.fixingSubgroup K)\n⊢ finrank { x // x ∈ K } E = finrank { x // x ∈ IntermediateField.fixedField (IntermediateField.fixingSubgroup K) } E\n[PROOFSTEP]\nrw [IntermediateField.finrank_fixedField_eq_card, Fintype.card_congr (IntermediateField.fixingSubgroupEquiv K).toEquiv]\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝ : FiniteDimensional F E\nh : IsGalois F E\nK_le : K ≤ IntermediateField.fixedField (IntermediateField.fixingSubgroup K)\n⊢ finrank { x // x ∈ K } E = Fintype.card (E ≃ₐ[{ x // x ∈ K }] E)\n[PROOFSTEP]\nexact (card_aut_eq_finrank K E).symm\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\nE : Type u_2\ninst✝⁴ : Field E\ninst✝³ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝² : DecidablePred fun x => x ∈ IntermediateField.fixingSubgroup K\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\n⊢ Fintype.card { x // x ∈ IntermediateField.fixingSubgroup K } = finrank { x // x ∈ K } E\n[PROOFSTEP]\nconv_rhs => rw [← fixedField_fixingSubgroup K, IntermediateField.finrank_fixedField_eq_card]\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\nE : Type u_2\ninst✝⁴ : Field E\ninst✝³ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝² : DecidablePred fun x => x ∈ IntermediateField.fixingSubgroup K\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\n| finrank { x // x ∈ K } E\n[PROOFSTEP]\nrw [← fixedField_fixingSubgroup K, IntermediateField.finrank_fixedField_eq_card]\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\nE : Type u_2\ninst✝⁴ : Field E\ninst✝³ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝² : DecidablePred fun x => x ∈ IntermediateField.fixingSubgroup K\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\n| finrank { x // x ∈ K } E\n[PROOFSTEP]\nrw [← fixedField_fixingSubgroup K, IntermediateField.finrank_fixedField_eq_card]\n[GOAL]\nF : Type u_1\ninst✝⁵ : Field F\nE : Type u_2\ninst✝⁴ : Field E\ninst✝³ : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK : IntermediateField F E\ninst✝² : DecidablePred fun x => x ∈ IntermediateField.fixingSubgroup K\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\n| finrank { x // x ∈ K } E\n[PROOFSTEP]\nrw [← fixedField_fixingSubgroup K, IntermediateField.finrank_fixedField_eq_card]\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK✝ : IntermediateField F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nK L : IntermediateField F E\n⊢ ↑{ toFun := IntermediateField.fixingSubgroup, invFun := IntermediateField.fixedField,\n            left_inv :=\n              (_ :\n                ∀ (K : IntermediateField F E), IntermediateField.fixedField (IntermediateField.fixingSubgroup K) = K),\n            right_inv :=\n              (_ :\n                ∀ (H : (Subgroup (E ≃ₐ[F] E))ᵒᵈ),\n                  IntermediateField.fixingSubgroup (IntermediateField.fixedField H) = H) }\n        K ≤\n      ↑{ toFun := IntermediateField.fixingSubgroup, invFun := IntermediateField.fixedField,\n            left_inv :=\n              (_ :\n                ∀ (K : IntermediateField F E), IntermediateField.fixedField (IntermediateField.fixingSubgroup K) = K),\n            right_inv :=\n              (_ :\n                ∀ (H : (Subgroup (E ≃ₐ[F] E))ᵒᵈ),\n                  IntermediateField.fixingSubgroup (IntermediateField.fixedField H) = H) }\n        L ↔\n    K ≤ L\n[PROOFSTEP]\nrw [← fixedField_fixingSubgroup L, IntermediateField.le_iff_le, fixedField_fixingSubgroup L]\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\nH : Subgroup (E ≃ₐ[F] E)\nK✝ : IntermediateField F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nK L : IntermediateField F E\n⊢ ↑{ toFun := IntermediateField.fixingSubgroup, invFun := IntermediateField.fixedField,\n            left_inv :=\n              (_ :\n                ∀ (K : IntermediateField F E), IntermediateField.fixedField (IntermediateField.fixingSubgroup K) = K),\n            right_inv :=\n              (_ :\n                ∀ (H : (Subgroup (E ≃ₐ[F] E))ᵒᵈ),\n                  IntermediateField.fixingSubgroup (IntermediateField.fixedField H) = H) }\n        K ≤\n      ↑{ toFun := IntermediateField.fixingSubgroup, invFun := IntermediateField.fixedField,\n            left_inv :=\n              (_ :\n                ∀ (K : IntermediateField F E), IntermediateField.fixedField (IntermediateField.fixingSubgroup K) = K),\n            right_inv :=\n              (_ :\n                ∀ (H : (Subgroup (E ≃ₐ[F] E))ᵒᵈ),\n                  IntermediateField.fixingSubgroup (IntermediateField.fixedField H) = H) }\n        L ↔\n    IntermediateField.fixingSubgroup L ≤ IntermediateField.fixingSubgroup K\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\n⊢ ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p\n[PROOFSTEP]\ncases' Field.exists_primitive_element F E with α h1\n[GOAL]\ncase intro\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nh1 : F⟮α⟯ = ⊤\n⊢ ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p\n[PROOFSTEP]\nuse minpoly F α, separable F α, IsGalois.splits F α\n[GOAL]\ncase adjoin_rootSet'\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nh1 : F⟮α⟯ = ⊤\n⊢ Algebra.adjoin F (Polynomial.rootSet (minpoly F α) E) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff, ← IntermediateField.top_toSubalgebra, ← h1]\n[GOAL]\ncase adjoin_rootSet'\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nh1 : F⟮α⟯ = ⊤\n⊢ F⟮α⟯.toSubalgebra ≤ Algebra.adjoin F (Polynomial.rootSet (minpoly F α) E)\n[PROOFSTEP]\nrw [IntermediateField.adjoin_simple_toSubalgebra_of_integral (integral F α)]\n[GOAL]\ncase adjoin_rootSet'\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nh1 : F⟮α⟯ = ⊤\n⊢ Algebra.adjoin F {α} ≤ Algebra.adjoin F (Polynomial.rootSet (minpoly F α) E)\n[PROOFSTEP]\napply Algebra.adjoin_mono\n[GOAL]\ncase adjoin_rootSet'.H\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nh1 : F⟮α⟯ = ⊤\n⊢ {α} ⊆ Polynomial.rootSet (minpoly F α) E\n[PROOFSTEP]\nrw [Set.singleton_subset_iff, Polynomial.mem_rootSet]\n[GOAL]\ncase adjoin_rootSet'.H\nF : Type u_1\ninst✝⁴ : Field F\nE : Type u_2\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : FiniteDimensional F E\ninst✝ : IsGalois F E\nα : E\nh1 : F⟮α⟯ = ⊤\n⊢ minpoly F α ≠ 0 ∧ ↑(Polynomial.aeval α) (minpoly F α) = 0\n[PROOFSTEP]\nexact ⟨minpoly.ne_zero (integral F α), minpoly.aeval _ _⟩\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nh : IntermediateField.fixedField ⊤ = ⊥\n⊢ IsGalois F E\n[PROOFSTEP]\nrw [← isGalois_iff_isGalois_bot, ← h]\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nh : IntermediateField.fixedField ⊤ = ⊥\n⊢ IsGalois { x // x ∈ IntermediateField.fixedField ⊤ } E\n[PROOFSTEP]\nclassical exact IsGalois.of_fixed_field E (⊤ : Subgroup (E ≃ₐ[F] E))\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nh : IntermediateField.fixedField ⊤ = ⊥\n⊢ IsGalois { x // x ∈ IntermediateField.fixedField ⊤ } E\n[PROOFSTEP]\nexact IsGalois.of_fixed_field E (⊤ : Subgroup (E ≃ₐ[F] E))\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nh : Fintype.card (E ≃ₐ[F] E) = finrank F E\n⊢ IsGalois F E\n[PROOFSTEP]\napply of_fixedField_eq_bot\n[GOAL]\ncase h\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nh : Fintype.card (E ≃ₐ[F] E) = finrank F E\n⊢ IntermediateField.fixedField ⊤ = ⊥\n[PROOFSTEP]\nhave p : 0 < finrank (IntermediateField.fixedField (⊤ : Subgroup (E ≃ₐ[F] E))) E := finrank_pos\n[GOAL]\ncase h\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nh : Fintype.card (E ≃ₐ[F] E) = finrank F E\np : 0 < finrank { x // x ∈ IntermediateField.fixedField ⊤ } E\n⊢ IntermediateField.fixedField ⊤ = ⊥\n[PROOFSTEP]\nclassical\nrw [← IntermediateField.finrank_eq_one_iff, ← mul_left_inj' (ne_of_lt p).symm, finrank_mul_finrank, ← h, one_mul,\n  IntermediateField.finrank_fixedField_eq_card]\napply Fintype.card_congr\nexact\n  { toFun := fun g => ⟨g, Subgroup.mem_top g⟩\n    invFun := (↑)\n    left_inv := fun g => rfl\n    right_inv := fun _ => by ext; rfl }\n[GOAL]\ncase h\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nh : Fintype.card (E ≃ₐ[F] E) = finrank F E\np : 0 < finrank { x // x ∈ IntermediateField.fixedField ⊤ } E\n⊢ IntermediateField.fixedField ⊤ = ⊥\n[PROOFSTEP]\nrw [← IntermediateField.finrank_eq_one_iff, ← mul_left_inj' (ne_of_lt p).symm, finrank_mul_finrank, ← h, one_mul,\n  IntermediateField.finrank_fixedField_eq_card]\n[GOAL]\ncase h\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nh : Fintype.card (E ≃ₐ[F] E) = finrank F E\np : 0 < finrank { x // x ∈ IntermediateField.fixedField ⊤ } E\n⊢ Fintype.card (E ≃ₐ[F] E) = Fintype.card { x // x ∈ ⊤ }\n[PROOFSTEP]\napply Fintype.card_congr\n[GOAL]\ncase h.f\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nh : Fintype.card (E ≃ₐ[F] E) = finrank F E\np : 0 < finrank { x // x ∈ IntermediateField.fixedField ⊤ } E\n⊢ (E ≃ₐ[F] E) ≃ { x // x ∈ ⊤ }\n[PROOFSTEP]\nexact\n  { toFun := fun g => ⟨g, Subgroup.mem_top g⟩\n    invFun := (↑)\n    left_inv := fun g => rfl\n    right_inv := fun _ => by ext; rfl }\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nh : Fintype.card (E ≃ₐ[F] E) = finrank F E\np : 0 < finrank { x // x ∈ IntermediateField.fixedField ⊤ } E\nx✝ : { x // x ∈ ⊤ }\n⊢ (fun g => { val := g, property := (_ : g ∈ ⊤) }) ↑x✝ = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\ninst✝ : FiniteDimensional F E\nh : Fintype.card (E ≃ₐ[F] E) = finrank F E\np : 0 < finrank { x // x ∈ IntermediateField.fixedField ⊤ } E\nx✝ : { x // x ∈ ⊤ }\na✝ : E\n⊢ ↑↑((fun g => { val := g, property := (_ : g ∈ ⊤) }) ↑x✝) a✝ = ↑↑x✝ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\n⊢ Fintype.card ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) =\n    Fintype.card (K →ₐ[F] E) * finrank K { x_1 // x_1 ∈ K⟮x⟯ }\n[PROOFSTEP]\nhave h : IsIntegral K x := isIntegral_of_isScalarTower (isIntegral_of_noetherian (IsNoetherian.iff_fg.2 hFE) x)\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\n⊢ Fintype.card ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) =\n    Fintype.card (K →ₐ[F] E) * finrank K { x_1 // x_1 ∈ K⟮x⟯ }\n[PROOFSTEP]\nhave h1 : p ≠ 0 := fun hp => by\n  rw [hp, Polynomial.map_zero, Polynomial.roots_zero] at hx \n  exact Multiset.not_mem_zero x hx\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp✝ : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nhp : p = 0\n⊢ False\n[PROOFSTEP]\nrw [hp, Polynomial.map_zero, Polynomial.roots_zero] at hx \n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp✝ : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ 0\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nhp : p = 0\n⊢ False\n[PROOFSTEP]\nexact Multiset.not_mem_zero x hx\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\n⊢ Fintype.card ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) =\n    Fintype.card (K →ₐ[F] E) * finrank K { x_1 // x_1 ∈ K⟮x⟯ }\n[PROOFSTEP]\nhave h2 : minpoly K x ∣ p.map (algebraMap F K) := by\n  apply minpoly.dvd\n  rw [Polynomial.aeval_def, Polynomial.eval₂_map, ← Polynomial.eval_map, ← IsScalarTower.algebraMap_eq]\n  exact (Polynomial.mem_roots (Polynomial.map_ne_zero h1)).mp hx\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\n⊢ minpoly K x ∣ Polynomial.map (algebraMap F K) p\n[PROOFSTEP]\napply minpoly.dvd\n[GOAL]\ncase hp\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\n⊢ ↑(Polynomial.aeval x) (Polynomial.map (algebraMap F K) p) = 0\n[PROOFSTEP]\nrw [Polynomial.aeval_def, Polynomial.eval₂_map, ← Polynomial.eval_map, ← IsScalarTower.algebraMap_eq]\n[GOAL]\ncase hp\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\n⊢ Polynomial.eval x (Polynomial.map (algebraMap F E) p) = 0\n[PROOFSTEP]\nexact (Polynomial.mem_roots (Polynomial.map_ne_zero h1)).mp hx\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\n⊢ Fintype.card ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) =\n    Fintype.card (K →ₐ[F] E) * finrank K { x_1 // x_1 ∈ K⟮x⟯ }\n[PROOFSTEP]\nlet key_equiv : (K⟮x⟯.restrictScalars F →ₐ[F] E) ≃ Σ f : K →ₐ[F] E, @AlgHom K K⟮x⟯ E _ _ _ _ (RingHom.toAlgebra f) :=\n  by\n  change (K⟮x⟯ →ₐ[F] E) ≃ Σ f : K →ₐ[F] E, _\n  exact algHomEquivSigma\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\n⊢ ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n    (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\n[PROOFSTEP]\nchange (K⟮x⟯ →ₐ[F] E) ≃ Σ f : K →ₐ[F] E, _\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\n⊢ ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[F] E) ≃ (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\n[PROOFSTEP]\nexact algHomEquivSigma\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\nkey_equiv : ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n  (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) :=\n  let_fun this := algHomEquivSigma;\n  this\n⊢ Fintype.card ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) =\n    Fintype.card (K →ₐ[F] E) * finrank K { x_1 // x_1 ∈ K⟮x⟯ }\n[PROOFSTEP]\nhaveI : ∀ f : K →ₐ[F] E, Fintype (@AlgHom K K⟮x⟯ E _ _ _ _ (RingHom.toAlgebra f)) := fun f =>\n  by\n  have := Fintype.ofEquiv _ key_equiv\n  apply Fintype.ofInjective (Sigma.mk f) fun _ _ H => eq_of_heq (Sigma.ext_iff.mp H).2\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\nkey_equiv : ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n  (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) :=\n  let_fun this := algHomEquivSigma;\n  this\nf : K →ₐ[F] E\n⊢ Fintype ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\n[PROOFSTEP]\nhave := Fintype.ofEquiv _ key_equiv\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\nkey_equiv : ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n  (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) :=\n  let_fun this := algHomEquivSigma;\n  this\nf : K →ₐ[F] E\nthis : Fintype ((f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E))\n⊢ Fintype ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\n[PROOFSTEP]\napply Fintype.ofInjective (Sigma.mk f) fun _ _ H => eq_of_heq (Sigma.ext_iff.mp H).2\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\nkey_equiv : ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n  (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) :=\n  let_fun this := algHomEquivSigma;\n  this\nthis : (f : K →ₐ[F] E) → Fintype ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\n⊢ Fintype.card ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) =\n    Fintype.card (K →ₐ[F] E) * finrank K { x_1 // x_1 ∈ K⟮x⟯ }\n[PROOFSTEP]\nrw [Fintype.card_congr key_equiv, Fintype.card_sigma, IntermediateField.adjoin.finrank h]\n[GOAL]\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\nkey_equiv : ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n  (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) :=\n  let_fun this := algHomEquivSigma;\n  this\nthis : (f : K →ₐ[F] E) → Fintype ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\n⊢ (Finset.sum Finset.univ fun a => Fintype.card ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)) =\n    Fintype.card (K →ₐ[F] E) * Polynomial.natDegree (minpoly K x)\n[PROOFSTEP]\napply Finset.sum_const_nat\n[GOAL]\ncase h₁\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\nkey_equiv : ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n  (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) :=\n  let_fun this := algHomEquivSigma;\n  this\nthis : (f : K →ₐ[F] E) → Fintype ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\n⊢ ∀ (x_1 : K →ₐ[F] E),\n    x_1 ∈ Finset.univ → Fintype.card ({ x_2 // x_2 ∈ K⟮x⟯ } →ₐ[K] E) = Polynomial.natDegree (minpoly K x)\n[PROOFSTEP]\nintro f _\n[GOAL]\ncase h₁\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\nkey_equiv : ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n  (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) :=\n  let_fun this := algHomEquivSigma;\n  this\nthis : (f : K →ₐ[F] E) → Fintype ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\nf : K →ₐ[F] E\na✝ : f ∈ Finset.univ\n⊢ Fintype.card ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) = Polynomial.natDegree (minpoly K x)\n[PROOFSTEP]\nrw [← @IntermediateField.card_algHom_adjoin_integral K _ E _ _ x E _ (RingHom.toAlgebra f) h]\n[GOAL]\ncase h₁\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\nkey_equiv : ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n  (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) :=\n  let_fun this := algHomEquivSigma;\n  this\nthis : (f : K →ₐ[F] E) → Fintype ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\nf : K →ₐ[F] E\na✝ : f ∈ Finset.univ\n⊢ Fintype.card ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) = Fintype.card ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\n[PROOFSTEP]\ncongr!\n[GOAL]\ncase h₁.h_sep\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\nkey_equiv : ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n  (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) :=\n  let_fun this := algHomEquivSigma;\n  this\nthis : (f : K →ₐ[F] E) → Fintype ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\nf : K →ₐ[F] E\na✝ : f ∈ Finset.univ\n⊢ Polynomial.Separable (minpoly K x)\n[PROOFSTEP]\nexact Polynomial.Separable.of_dvd ((Polynomial.separable_map (algebraMap F K)).mpr hp) h2\n[GOAL]\ncase h₁.h_splits\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\nkey_equiv : ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n  (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) :=\n  let_fun this := algHomEquivSigma;\n  this\nthis : (f : K →ₐ[F] E) → Fintype ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\nf : K →ₐ[F] E\na✝ : f ∈ Finset.univ\n⊢ Polynomial.Splits (algebraMap K E) (minpoly K x)\n[PROOFSTEP]\nrefine' Polynomial.splits_of_splits_of_dvd _ (Polynomial.map_ne_zero h1) _ h2\n[GOAL]\ncase h₁.h_splits\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\nkey_equiv : ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n  (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) :=\n  let_fun this := algHomEquivSigma;\n  this\nthis : (f : K →ₐ[F] E) → Fintype ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\nf : K →ₐ[F] E\na✝ : f ∈ Finset.univ\n⊢ Polynomial.Splits (algebraMap K E) (Polynomial.map (algebraMap F K) p)\n[PROOFSTEP]\nrw [Polynomial.splits_map_iff, ← @IsScalarTower.algebraMap_eq _ _ _ _ _ _ _ (_) _ _]\n[GOAL]\ncase h₁.h_splits\nF : Type u_1\ninst✝⁸ : Field F\nE : Type u_2\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\np : F[X]\nhFE : FiniteDimensional F E\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nK : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\ninst✝³ : Algebra K E\ninst✝² : IsScalarTower F K E\nx : E\nhx : x ∈ Polynomial.roots (Polynomial.map (algebraMap F E) p)\ninst✝¹ : Fintype (K →ₐ[F] E)\ninst✝ : Fintype ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E)\nh : IsIntegral K x\nh1 : p ≠ 0\nh2 : minpoly K x ∣ Polynomial.map (algebraMap F K) p\nkey_equiv : ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F K⟮x⟯ } →ₐ[F] E) ≃\n  (f : K →ₐ[F] E) × ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E) :=\n  let_fun this := algHomEquivSigma;\n  this\nthis : (f : K →ₐ[F] E) → Fintype ({ x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E)\nf : K →ₐ[F] E\na✝ : f ∈ Finset.univ\n⊢ Polynomial.Splits (algebraMap F E) p\n[PROOFSTEP]\nexact sp.splits\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\n⊢ IsGalois F E\n[PROOFSTEP]\nhaveI hFE : FiniteDimensional F E := Polynomial.IsSplittingField.finiteDimensional E p\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\n⊢ IsGalois F E\n[PROOFSTEP]\nletI := Classical.decEq E\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\n⊢ IsGalois F E\n[PROOFSTEP]\nlet s := (p.map (algebraMap F E)).roots.toFinset\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\n⊢ IsGalois F E\n[PROOFSTEP]\nhave adjoin_root : IntermediateField.adjoin F (s : Set E) = ⊤ :=\n  by\n  apply IntermediateField.toSubalgebra_injective\n  rw [IntermediateField.top_toSubalgebra, ← top_le_iff, ← sp.adjoin_rootSet]\n  apply IntermediateField.algebra_adjoin_le_adjoin\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\n⊢ IntermediateField.adjoin F ↑s = ⊤\n[PROOFSTEP]\napply IntermediateField.toSubalgebra_injective\n[GOAL]\ncase h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\n⊢ (IntermediateField.adjoin F ↑s).toSubalgebra = ⊤.toSubalgebra\n[PROOFSTEP]\nrw [IntermediateField.top_toSubalgebra, ← top_le_iff, ← sp.adjoin_rootSet]\n[GOAL]\ncase h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\n⊢ Algebra.adjoin F (Polynomial.rootSet p E) ≤ (IntermediateField.adjoin F ↑s).toSubalgebra\n[PROOFSTEP]\napply IntermediateField.algebra_adjoin_le_adjoin\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\n⊢ IsGalois F E\n[PROOFSTEP]\nlet P : IntermediateField F E → Prop := fun K => Fintype.card (K →ₐ[F] E) = finrank F K\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\n⊢ IsGalois F E\n[PROOFSTEP]\nsuffices P (IntermediateField.adjoin F ↑s) by\n  rw [adjoin_root] at this \n  apply of_card_aut_eq_finrank\n  rw [← Eq.trans this (LinearEquiv.finrank_eq IntermediateField.topEquiv.toLinearEquiv)]\n  exact\n    Fintype.card_congr\n      ((algEquivEquivAlgHom F E).toEquiv.trans (IntermediateField.topEquiv.symm.arrowCongr AlgEquiv.refl))\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis✝ : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nthis : P (IntermediateField.adjoin F ↑s)\n⊢ IsGalois F E\n[PROOFSTEP]\nrw [adjoin_root] at this \n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis✝ : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nthis : P ⊤\n⊢ IsGalois F E\n[PROOFSTEP]\napply of_card_aut_eq_finrank\n[GOAL]\ncase h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis✝ : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nthis : P ⊤\n⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E\n[PROOFSTEP]\nrw [← Eq.trans this (LinearEquiv.finrank_eq IntermediateField.topEquiv.toLinearEquiv)]\n[GOAL]\ncase h\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis✝ : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nthis : P ⊤\n⊢ Fintype.card (E ≃ₐ[F] E) = Fintype.card ({ x // x ∈ ⊤ } →ₐ[F] E)\n[PROOFSTEP]\nexact\n  Fintype.card_congr\n    ((algEquivEquivAlgHom F E).toEquiv.trans (IntermediateField.topEquiv.symm.arrowCongr AlgEquiv.refl))\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\n⊢ P (IntermediateField.adjoin F ↑s)\n[PROOFSTEP]\napply IntermediateField.induction_on_adjoin_finset s P\n[GOAL]\ncase base\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\n⊢ P ⊥\n[PROOFSTEP]\nhave key := IntermediateField.card_algHom_adjoin_integral F (K := E) (show IsIntegral F (0 : E) from isIntegral_zero)\n[GOAL]\ncase base\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nkey :\n  Polynomial.Separable (minpoly F 0) →\n    Polynomial.Splits (algebraMap F E) (minpoly F 0) →\n      Fintype.card ({ x // x ∈ F⟮0⟯ } →ₐ[F] E) = Polynomial.natDegree (minpoly F 0)\n⊢ P ⊥\n[PROOFSTEP]\nrw [minpoly.zero, Polynomial.natDegree_X] at key \n[GOAL]\ncase base\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nkey :\n  Polynomial.Separable Polynomial.X →\n    Polynomial.Splits (algebraMap F E) Polynomial.X → Fintype.card ({ x // x ∈ F⟮0⟯ } →ₐ[F] E) = 1\n⊢ P ⊥\n[PROOFSTEP]\nspecialize key Polynomial.separable_X (Polynomial.splits_X (algebraMap F E))\n[GOAL]\ncase base\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nkey : Fintype.card ({ x // x ∈ F⟮0⟯ } →ₐ[F] E) = 1\n⊢ P ⊥\n[PROOFSTEP]\nrw [← @Subalgebra.finrank_bot F E _ _ _, ← IntermediateField.bot_toSubalgebra] at key \n[GOAL]\ncase base\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nkey : Fintype.card ({ x // x ∈ F⟮0⟯ } →ₐ[F] E) = finrank F { x // x ∈ ⊥.toSubalgebra }\n⊢ P ⊥\n[PROOFSTEP]\nrefine' Eq.trans _ key\n[GOAL]\ncase base\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nkey : Fintype.card ({ x // x ∈ F⟮0⟯ } →ₐ[F] E) = finrank F { x // x ∈ ⊥.toSubalgebra }\n⊢ Fintype.card ({ x // x ∈ ⊥ } →ₐ[F] E) = Fintype.card ({ x // x ∈ F⟮0⟯ } →ₐ[F] E)\n[PROOFSTEP]\napply @Fintype.card_congr _ _ _ (_) _\n[GOAL]\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nkey : Fintype.card ({ x // x ∈ F⟮0⟯ } →ₐ[F] E) = finrank F { x // x ∈ ⊥.toSubalgebra }\n⊢ ({ x // x ∈ ⊥ } →ₐ[F] E) ≃ ({ x // x ∈ F⟮0⟯ } →ₐ[F] E)\n[PROOFSTEP]\nrw [IntermediateField.adjoin_zero]\n[GOAL]\ncase ih\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\n⊢ ∀ (K : IntermediateField F E) (x : E), x ∈ s → P K → P (IntermediateField.restrictScalars F { x // x ∈ K }⟮x⟯)\n[PROOFSTEP]\nintro K x hx hK\n[GOAL]\ncase ih\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑s = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nK : IntermediateField F E\nx : E\nhx : x ∈ s\nhK : P K\n⊢ P (IntermediateField.restrictScalars F { x // x ∈ K }⟮x⟯)\n[PROOFSTEP]\nsimp only at *\n  -- Porting note: need to specify two implicit arguments of `finrank_mul_finrank`\n[GOAL]\ncase ih\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑(Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))) = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nK : IntermediateField F E\nx : E\nhx : x ∈ Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nhK : Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\n⊢ Fintype.card ({ x_1 // x_1 ∈ IntermediateField.restrictScalars F { x // x ∈ K }⟮x⟯ } →ₐ[F] E) =\n    finrank F { x_1 // x_1 ∈ IntermediateField.restrictScalars F { x // x ∈ K }⟮x⟯ }\n[PROOFSTEP]\nrw [of_separable_splitting_field_aux hp K (Multiset.mem_toFinset.mp hx), hK,\n  @finrank_mul_finrank _ _ _ _ _ _ _ K⟮x⟯.module _ K⟮x⟯.isScalarTower _]\n[GOAL]\ncase ih\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑(Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))) = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nK : IntermediateField F E\nx : E\nhx : x ∈ Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nhK : Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\n⊢ finrank F { x_1 // x_1 ∈ { x // x ∈ K }⟮x⟯ } =\n    finrank F { x_1 // x_1 ∈ IntermediateField.restrictScalars F { x // x ∈ K }⟮x⟯ }\n[PROOFSTEP]\nsymm\n[GOAL]\ncase ih\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑(Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))) = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nK : IntermediateField F E\nx : E\nhx : x ∈ Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nhK : Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\n⊢ finrank F { x_1 // x_1 ∈ IntermediateField.restrictScalars F { x // x ∈ K }⟮x⟯ } =\n    finrank F { x_1 // x_1 ∈ { x // x ∈ K }⟮x⟯ }\n[PROOFSTEP]\nrefine' LinearEquiv.finrank_eq _\n[GOAL]\ncase ih\nF : Type u_1\ninst✝² : Field F\nE : Type u_2\ninst✝¹ : Field E\ninst✝ : Algebra F E\np : F[X]\nsp : Polynomial.IsSplittingField F E p\nhp : Polynomial.Separable p\nhFE : FiniteDimensional F E\nthis : DecidableEq E := Classical.decEq E\ns : Finset E := Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nadjoin_root : IntermediateField.adjoin F ↑(Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))) = ⊤\nP : IntermediateField F E → Prop := fun K => Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\nK : IntermediateField F E\nx : E\nhx : x ∈ Multiset.toFinset (Polynomial.roots (Polynomial.map (algebraMap F E) p))\nhK : Fintype.card ({ x // x ∈ K } →ₐ[F] E) = finrank F { x // x ∈ K }\n⊢ { x_1 // x_1 ∈ IntermediateField.restrictScalars F { x // x ∈ K }⟮x⟯ } ≃ₗ[F] { x_1 // x_1 ∈ { x // x ∈ K }⟮x⟯ }\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\n⊢ List.TFAE\n    [IsGalois F E, IntermediateField.fixedField ⊤ = ⊥, Fintype.card (E ≃ₐ[F] E) = finrank F E,\n      ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p]\n[PROOFSTEP]\ntfae_have 1 → 2\n[GOAL]\ncase tfae_1_to_2\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\n⊢ IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\n[PROOFSTEP]\nexact fun h => OrderIso.map_bot (@intermediateFieldEquivSubgroup F _ E _ _ _ h).symm\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\n⊢ List.TFAE\n    [IsGalois F E, IntermediateField.fixedField ⊤ = ⊥, Fintype.card (E ≃ₐ[F] E) = finrank F E,\n      ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p]\n[PROOFSTEP]\ntfae_have 1 → 3\n[GOAL]\ncase tfae_1_to_3\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\n⊢ IsGalois F E → Fintype.card (E ≃ₐ[F] E) = finrank F E\n[PROOFSTEP]\nintro\n[GOAL]\ncase tfae_1_to_3\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\n✝ : IsGalois F E\n⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E\n[PROOFSTEP]\nexact card_aut_eq_finrank F E\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\ntfae_1_to_3 : IsGalois F E → Fintype.card (E ≃ₐ[F] E) = finrank F E\n⊢ List.TFAE\n    [IsGalois F E, IntermediateField.fixedField ⊤ = ⊥, Fintype.card (E ≃ₐ[F] E) = finrank F E,\n      ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p]\n[PROOFSTEP]\ntfae_have 1 → 4\n[GOAL]\ncase tfae_1_to_4\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\ntfae_1_to_3 : IsGalois F E → Fintype.card (E ≃ₐ[F] E) = finrank F E\n⊢ IsGalois F E → ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p\n[PROOFSTEP]\nintro\n[GOAL]\ncase tfae_1_to_4\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\ntfae_1_to_3 : IsGalois F E → Fintype.card (E ≃ₐ[F] E) = finrank F E\n✝ : IsGalois F E\n⊢ ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p\n[PROOFSTEP]\nexact is_separable_splitting_field F E\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\ntfae_1_to_3 : IsGalois F E → Fintype.card (E ≃ₐ[F] E) = finrank F E\ntfae_1_to_4 : IsGalois F E → ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p\n⊢ List.TFAE\n    [IsGalois F E, IntermediateField.fixedField ⊤ = ⊥, Fintype.card (E ≃ₐ[F] E) = finrank F E,\n      ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p]\n[PROOFSTEP]\ntfae_have 2 → 1\n[GOAL]\ncase tfae_2_to_1\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\ntfae_1_to_3 : IsGalois F E → Fintype.card (E ≃ₐ[F] E) = finrank F E\ntfae_1_to_4 : IsGalois F E → ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p\n⊢ IntermediateField.fixedField ⊤ = ⊥ → IsGalois F E\n[PROOFSTEP]\nexact of_fixedField_eq_bot F E\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\ntfae_1_to_3 : IsGalois F E → Fintype.card (E ≃ₐ[F] E) = finrank F E\ntfae_1_to_4 : IsGalois F E → ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p\ntfae_2_to_1 : IntermediateField.fixedField ⊤ = ⊥ → IsGalois F E\n⊢ List.TFAE\n    [IsGalois F E, IntermediateField.fixedField ⊤ = ⊥, Fintype.card (E ≃ₐ[F] E) = finrank F E,\n      ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p]\n[PROOFSTEP]\ntfae_have 3 → 1\n[GOAL]\ncase tfae_3_to_1\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\ntfae_1_to_3 : IsGalois F E → Fintype.card (E ≃ₐ[F] E) = finrank F E\ntfae_1_to_4 : IsGalois F E → ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p\ntfae_2_to_1 : IntermediateField.fixedField ⊤ = ⊥ → IsGalois F E\n⊢ Fintype.card (E ≃ₐ[F] E) = finrank F E → IsGalois F E\n[PROOFSTEP]\nexact of_card_aut_eq_finrank F E\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\ntfae_1_to_3 : IsGalois F E → Fintype.card (E ≃ₐ[F] E) = finrank F E\ntfae_1_to_4 : IsGalois F E → ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p\ntfae_2_to_1 : IntermediateField.fixedField ⊤ = ⊥ → IsGalois F E\ntfae_3_to_1 : Fintype.card (E ≃ₐ[F] E) = finrank F E → IsGalois F E\n⊢ List.TFAE\n    [IsGalois F E, IntermediateField.fixedField ⊤ = ⊥, Fintype.card (E ≃ₐ[F] E) = finrank F E,\n      ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p]\n[PROOFSTEP]\ntfae_have 4 → 1\n[GOAL]\ncase tfae_4_to_1\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\ntfae_1_to_3 : IsGalois F E → Fintype.card (E ≃ₐ[F] E) = finrank F E\ntfae_1_to_4 : IsGalois F E → ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p\ntfae_2_to_1 : IntermediateField.fixedField ⊤ = ⊥ → IsGalois F E\ntfae_3_to_1 : Fintype.card (E ≃ₐ[F] E) = finrank F E → IsGalois F E\n⊢ (∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p) → IsGalois F E\n[PROOFSTEP]\nrintro ⟨h, hp1, _⟩\n[GOAL]\ncase tfae_4_to_1.intro.intro\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\ntfae_1_to_3 : IsGalois F E → Fintype.card (E ≃ₐ[F] E) = finrank F E\ntfae_1_to_4 : IsGalois F E → ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p\ntfae_2_to_1 : IntermediateField.fixedField ⊤ = ⊥ → IsGalois F E\ntfae_3_to_1 : Fintype.card (E ≃ₐ[F] E) = finrank F E → IsGalois F E\nh : F[X]\nhp1 : Polynomial.Separable h\nright✝ : Polynomial.IsSplittingField F E h\n⊢ IsGalois F E\n[PROOFSTEP]\nexact of_separable_splitting_field hp1\n[GOAL]\nF : Type u_1\ninst✝³ : Field F\nE : Type u_2\ninst✝² : Field E\ninst✝¹ : Algebra F E\np : F[X]\ninst✝ : FiniteDimensional F E\ntfae_1_to_2 : IsGalois F E → IntermediateField.fixedField ⊤ = ⊥\ntfae_1_to_3 : IsGalois F E → Fintype.card (E ≃ₐ[F] E) = finrank F E\ntfae_1_to_4 : IsGalois F E → ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p\ntfae_2_to_1 : IntermediateField.fixedField ⊤ = ⊥ → IsGalois F E\ntfae_3_to_1 : Fintype.card (E ≃ₐ[F] E) = finrank F E → IsGalois F E\ntfae_4_to_1 : (∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p) → IsGalois F E\n⊢ List.TFAE\n    [IsGalois F E, IntermediateField.fixedField ⊤ = ⊥, Fintype.card (E ≃ₐ[F] E) = finrank F E,\n      ∃ p, Polynomial.Separable p ∧ Polynomial.IsSplittingField F E p]\n[PROOFSTEP]\ntfae_finish\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.Galois", "llama_tokens": 69721, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7461389817407017, "lm_q2_score": 0.47657965106367595, "lm_q1q2_score": 0.3555946555629901}}
{"text": "[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nhd : ∀ᶠ (z : ℂ) in 𝓝[{c}ᶜ] c, DifferentiableAt ℂ f z\nhc : ContinuousAt f c\n⊢ AnalyticAt ℂ f c\n[PROOFSTEP]\nrcases(nhdsWithin_hasBasis nhds_basis_closedBall _).mem_iff.1 hd with ⟨R, hR0, hRs⟩\n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nhd : ∀ᶠ (z : ℂ) in 𝓝[{c}ᶜ] c, DifferentiableAt ℂ f z\nhc : ContinuousAt f c\nR : ℝ\nhR0 : 0 < R\nhRs : closedBall c R ∩ {c}ᶜ ⊆ {x | (fun z => DifferentiableAt ℂ f z) x}\n⊢ AnalyticAt ℂ f c\n[PROOFSTEP]\nlift R to ℝ≥0 using hR0.le\n[GOAL]\ncase intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nhd : ∀ᶠ (z : ℂ) in 𝓝[{c}ᶜ] c, DifferentiableAt ℂ f z\nhc : ContinuousAt f c\nR : ℝ≥0\nhR0 : 0 < ↑R\nhRs : closedBall c ↑R ∩ {c}ᶜ ⊆ {x | (fun z => DifferentiableAt ℂ f z) x}\n⊢ AnalyticAt ℂ f c\n[PROOFSTEP]\nreplace hc : ContinuousOn f (closedBall c R)\n[GOAL]\ncase hc\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nhd : ∀ᶠ (z : ℂ) in 𝓝[{c}ᶜ] c, DifferentiableAt ℂ f z\nhc : ContinuousAt f c\nR : ℝ≥0\nhR0 : 0 < ↑R\nhRs : closedBall c ↑R ∩ {c}ᶜ ⊆ {x | (fun z => DifferentiableAt ℂ f z) x}\n⊢ ContinuousOn f (closedBall c ↑R)\n[PROOFSTEP]\nrefine' fun z hz => ContinuousAt.continuousWithinAt _\n[GOAL]\ncase hc\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nhd : ∀ᶠ (z : ℂ) in 𝓝[{c}ᶜ] c, DifferentiableAt ℂ f z\nhc : ContinuousAt f c\nR : ℝ≥0\nhR0 : 0 < ↑R\nhRs : closedBall c ↑R ∩ {c}ᶜ ⊆ {x | (fun z => DifferentiableAt ℂ f z) x}\nz : ℂ\nhz : z ∈ closedBall c ↑R\n⊢ ContinuousAt f z\n[PROOFSTEP]\nrcases eq_or_ne z c with (rfl | hne)\n[GOAL]\ncase hc.inl\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nR : ℝ≥0\nhR0 : 0 < ↑R\nz : ℂ\nhd : ∀ᶠ (z : ℂ) in 𝓝[{z}ᶜ] z, DifferentiableAt ℂ f z\nhc : ContinuousAt f z\nhRs : closedBall z ↑R ∩ {z}ᶜ ⊆ {x | (fun z => DifferentiableAt ℂ f z) x}\nhz : z ∈ closedBall z ↑R\n⊢ ContinuousAt f z\ncase hc.inr\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nhd : ∀ᶠ (z : ℂ) in 𝓝[{c}ᶜ] c, DifferentiableAt ℂ f z\nhc : ContinuousAt f c\nR : ℝ≥0\nhR0 : 0 < ↑R\nhRs : closedBall c ↑R ∩ {c}ᶜ ⊆ {x | (fun z => DifferentiableAt ℂ f z) x}\nz : ℂ\nhz : z ∈ closedBall c ↑R\nhne : z ≠ c\n⊢ ContinuousAt f z\n[PROOFSTEP]\nexacts [hc, (hRs ⟨hz, hne⟩).continuousAt]\n[GOAL]\ncase intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nhd : ∀ᶠ (z : ℂ) in 𝓝[{c}ᶜ] c, DifferentiableAt ℂ f z\nR : ℝ≥0\nhR0 : 0 < ↑R\nhRs : closedBall c ↑R ∩ {c}ᶜ ⊆ {x | (fun z => DifferentiableAt ℂ f z) x}\nhc : ContinuousOn f (closedBall c ↑R)\n⊢ AnalyticAt ℂ f c\n[PROOFSTEP]\nexact\n  (hasFPowerSeriesOnBall_of_differentiable_off_countable (countable_singleton c) hc\n      (fun z hz => hRs (diff_subset_diff_left ball_subset_closedBall hz)) hR0).analyticAt\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhs : s ∈ 𝓝 c\n⊢ DifferentiableOn ℂ f (s \\ {c}) ∧ ContinuousAt f c ↔ DifferentiableOn ℂ f s\n[PROOFSTEP]\nrefine' ⟨_, fun hd => ⟨hd.mono (diff_subset _ _), (hd.differentiableAt hs).continuousAt⟩⟩\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhs : s ∈ 𝓝 c\n⊢ DifferentiableOn ℂ f (s \\ {c}) ∧ ContinuousAt f c → DifferentiableOn ℂ f s\n[PROOFSTEP]\nrintro ⟨hd, hc⟩ x hx\n[GOAL]\ncase intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhs : s ∈ 𝓝 c\nhd : DifferentiableOn ℂ f (s \\ {c})\nhc : ContinuousAt f c\nx : ℂ\nhx : x ∈ s\n⊢ DifferentiableWithinAt ℂ f s x\n[PROOFSTEP]\nrcases eq_or_ne x c with (rfl | hne)\n[GOAL]\ncase intro.inl\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nx : ℂ\nhx : x ∈ s\nhs : s ∈ 𝓝 x\nhd : DifferentiableOn ℂ f (s \\ {x})\nhc : ContinuousAt f x\n⊢ DifferentiableWithinAt ℂ f s x\n[PROOFSTEP]\nrefine' (analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt _ hc).differentiableAt.differentiableWithinAt\n[GOAL]\ncase intro.inl\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nx : ℂ\nhx : x ∈ s\nhs : s ∈ 𝓝 x\nhd : DifferentiableOn ℂ f (s \\ {x})\nhc : ContinuousAt f x\n⊢ ∀ᶠ (z : ℂ) in 𝓝[{x}ᶜ] x, DifferentiableAt ℂ f z\n[PROOFSTEP]\nrefine' eventually_nhdsWithin_iff.2 ((eventually_mem_nhds.2 hs).mono fun z hz hzx => _)\n[GOAL]\ncase intro.inl\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nx : ℂ\nhx : x ∈ s\nhs : s ∈ 𝓝 x\nhd : DifferentiableOn ℂ f (s \\ {x})\nhc : ContinuousAt f x\nz : ℂ\nhz : s ∈ 𝓝 z\nhzx : z ∈ {x}ᶜ\n⊢ DifferentiableAt ℂ f z\n[PROOFSTEP]\nexact hd.differentiableAt (inter_mem hz (isOpen_ne.mem_nhds hzx))\n[GOAL]\ncase intro.inr\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhs : s ∈ 𝓝 c\nhd : DifferentiableOn ℂ f (s \\ {c})\nhc : ContinuousAt f c\nx : ℂ\nhx : x ∈ s\nhne : x ≠ c\n⊢ DifferentiableWithinAt ℂ f s x\n[PROOFSTEP]\nsimpa only [DifferentiableWithinAt, HasFDerivWithinAt, hne.nhdsWithin_diff_singleton] using hd x ⟨hx, hne⟩\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhc : s ∈ 𝓝 c\nhd : DifferentiableOn ℂ f (s \\ {c})\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\n⊢ DifferentiableOn ℂ (update f c (limUnder (𝓝[{c}ᶜ] c) f)) s\n[PROOFSTEP]\nset F : ℂ → E := fun z => (z - c) • f z\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhc : s ∈ 𝓝 c\nhd : DifferentiableOn ℂ f (s \\ {c})\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\nF : ℂ → E := fun z => (z - c) • f z\n⊢ DifferentiableOn ℂ (update f c (limUnder (𝓝[{c}ᶜ] c) f)) s\n[PROOFSTEP]\nsuffices DifferentiableOn ℂ F (s \\ { c }) ∧ ContinuousAt F c\n  by\n  rw [differentiableOn_compl_singleton_and_continuousAt_iff hc, ← differentiableOn_dslope hc, dslope_sub_smul] at this \n  have hc : Tendsto f (𝓝[≠] c) (𝓝 (deriv F c)) := continuousAt_update_same.mp (this.continuousOn.continuousAt hc)\n  rwa [hc.limUnder_eq]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhc : s ∈ 𝓝 c\nhd : DifferentiableOn ℂ f (s \\ {c})\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\nF : ℂ → E := fun z => (z - c) • f z\nthis : DifferentiableOn ℂ F (s \\ {c}) ∧ ContinuousAt F c\n⊢ DifferentiableOn ℂ (update f c (limUnder (𝓝[{c}ᶜ] c) f)) s\n[PROOFSTEP]\nrw [differentiableOn_compl_singleton_and_continuousAt_iff hc, ← differentiableOn_dslope hc, dslope_sub_smul] at this \n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhc : s ∈ 𝓝 c\nhd : DifferentiableOn ℂ f (s \\ {c})\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\nF : ℂ → E := fun z => (z - c) • f z\nthis✝ : DifferentiableOn ℂ (dslope F c) s\nthis : DifferentiableOn ℂ (update (fun z => f z) c (deriv (fun x => (x - c) • f x) c)) s\n⊢ DifferentiableOn ℂ (update f c (limUnder (𝓝[{c}ᶜ] c) f)) s\n[PROOFSTEP]\nhave hc : Tendsto f (𝓝[≠] c) (𝓝 (deriv F c)) := continuousAt_update_same.mp (this.continuousOn.continuousAt hc)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhc✝ : s ∈ 𝓝 c\nhd : DifferentiableOn ℂ f (s \\ {c})\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\nF : ℂ → E := fun z => (z - c) • f z\nthis✝ : DifferentiableOn ℂ (dslope F c) s\nthis : DifferentiableOn ℂ (update (fun z => f z) c (deriv (fun x => (x - c) • f x) c)) s\nhc : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 (deriv F c))\n⊢ DifferentiableOn ℂ (update f c (limUnder (𝓝[{c}ᶜ] c) f)) s\n[PROOFSTEP]\nrwa [hc.limUnder_eq]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhc : s ∈ 𝓝 c\nhd : DifferentiableOn ℂ f (s \\ {c})\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\nF : ℂ → E := fun z => (z - c) • f z\n⊢ DifferentiableOn ℂ F (s \\ {c}) ∧ ContinuousAt F c\n[PROOFSTEP]\nrefine' ⟨(differentiableOn_id.sub_const _).smul hd, _⟩\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhc : s ∈ 𝓝 c\nhd : DifferentiableOn ℂ f (s \\ {c})\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\nF : ℂ → E := fun z => (z - c) • f z\n⊢ ContinuousAt F c\n[PROOFSTEP]\nrw [← continuousWithinAt_compl_self]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhc : s ∈ 𝓝 c\nhd : DifferentiableOn ℂ f (s \\ {c})\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\nF : ℂ → E := fun z => (z - c) • f z\n⊢ ContinuousWithinAt F {c}ᶜ c\n[PROOFSTEP]\nhave H := ho.tendsto_inv_smul_nhds_zero\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhc : s ∈ 𝓝 c\nhd : DifferentiableOn ℂ f (s \\ {c})\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\nF : ℂ → E := fun z => (z - c) • f z\nH : Tendsto (fun x => (x - c)⁻¹⁻¹ • (f x - f c)) (𝓝[{c}ᶜ] c) (𝓝 0)\n⊢ ContinuousWithinAt F {c}ᶜ c\n[PROOFSTEP]\nhave H' : Tendsto (fun z => (z - c) • f c) (𝓝[≠] c) (𝓝 (F c)) :=\n  (continuousWithinAt_id.tendsto.sub tendsto_const_nhds).smul tendsto_const_nhds\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\ns : Set ℂ\nc : ℂ\nhc : s ∈ 𝓝 c\nhd : DifferentiableOn ℂ f (s \\ {c})\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\nF : ℂ → E := fun z => (z - c) • f z\nH : Tendsto (fun x => (x - c)⁻¹⁻¹ • (f x - f c)) (𝓝[{c}ᶜ] c) (𝓝 0)\nH' : Tendsto (fun z => (z - c) • f c) (𝓝[{c}ᶜ] c) (𝓝 (F c))\n⊢ ContinuousWithinAt F {c}ᶜ c\n[PROOFSTEP]\nsimpa [← smul_add, ContinuousWithinAt] using H.add H'\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nhd : ∀ᶠ (z : ℂ) in 𝓝[{c}ᶜ] c, DifferentiableAt ℂ f z\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\n⊢ Tendsto f (𝓝[{c}ᶜ] c) (𝓝 (limUnder (𝓝[{c}ᶜ] c) f))\n[PROOFSTEP]\nrw [eventually_nhdsWithin_iff] at hd \n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nhd : ∀ᶠ (x : ℂ) in 𝓝 c, x ∈ {c}ᶜ → DifferentiableAt ℂ f x\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\n⊢ Tendsto f (𝓝[{c}ᶜ] c) (𝓝 (limUnder (𝓝[{c}ᶜ] c) f))\n[PROOFSTEP]\nhave : DifferentiableOn ℂ f ({z | z ≠ c → DifferentiableAt ℂ f z} \\ { c }) := fun z hz =>\n  (hz.1 hz.2).differentiableWithinAt\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nhd : ∀ᶠ (x : ℂ) in 𝓝 c, x ∈ {c}ᶜ → DifferentiableAt ℂ f x\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\nthis : DifferentiableOn ℂ f ({z | z ≠ c → DifferentiableAt ℂ f z} \\ {c})\n⊢ Tendsto f (𝓝[{c}ᶜ] c) (𝓝 (limUnder (𝓝[{c}ᶜ] c) f))\n[PROOFSTEP]\nhave H := differentiableOn_update_limUnder_of_isLittleO hd this ho\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nhd : ∀ᶠ (x : ℂ) in 𝓝 c, x ∈ {c}ᶜ → DifferentiableAt ℂ f x\nho : (fun z => f z - f c) =o[𝓝[{c}ᶜ] c] fun z => (z - c)⁻¹\nthis : DifferentiableOn ℂ f ({z | z ≠ c → DifferentiableAt ℂ f z} \\ {c})\nH : DifferentiableOn ℂ (update f c (limUnder (𝓝[{c}ᶜ] c) f)) {x | (fun x => x ∈ {c}ᶜ → DifferentiableAt ℂ f x) x}\n⊢ Tendsto f (𝓝[{c}ᶜ] c) (𝓝 (limUnder (𝓝[{c}ᶜ] c) f))\n[PROOFSTEP]\nexact continuousAt_update_same.1 (H.differentiableAt hd).continuousAt\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • f z) = deriv f w₀\n[PROOFSTEP]\nhave hf' : DifferentiableOn ℂ (dslope f w₀) U :=\n  (differentiableOn_dslope (hU.mem_nhds ((ball_subset_closedBall.trans hc) hw₀))).mpr hf\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • f z) = deriv f w₀\n[PROOFSTEP]\nhave h0 := (hf'.diffContOnCl_ball hc).two_pi_i_inv_smul_circleIntegral_sub_inv_smul hw₀\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • f z) = deriv f w₀\n[PROOFSTEP]\nrw [← dslope_same, ← h0]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • f z) =\n    (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\n⊢ (∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • f z) = ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z\n[PROOFSTEP]\ntrans ∮ z in C(c, R), ((z - w₀) ^ 2)⁻¹ • (f z - f w₀)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\n⊢ (∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • f z) = ∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • (f z - f w₀)\n[PROOFSTEP]\nhave h1 : ContinuousOn (fun z : ℂ => ((z - w₀) ^ 2)⁻¹) (sphere c R) :=\n  by\n  refine' ((continuous_id'.sub continuous_const).pow 2).continuousOn.inv₀ fun w hw h => _\n  exact sphere_disjoint_ball.ne_of_mem hw hw₀ (sub_eq_zero.mp (sq_eq_zero_iff.mp h))\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\n⊢ ContinuousOn (fun z => ((z - w₀) ^ 2)⁻¹) (sphere c R)\n[PROOFSTEP]\nrefine' ((continuous_id'.sub continuous_const).pow 2).continuousOn.inv₀ fun w hw h => _\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\nw : ℂ\nhw : w ∈ sphere c R\nh : (w - w₀) ^ 2 = 0\n⊢ False\n[PROOFSTEP]\nexact sphere_disjoint_ball.ne_of_mem hw hw₀ (sub_eq_zero.mp (sq_eq_zero_iff.mp h))\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\nh1 : ContinuousOn (fun z => ((z - w₀) ^ 2)⁻¹) (sphere c R)\n⊢ (∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • f z) = ∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • (f z - f w₀)\n[PROOFSTEP]\nhave h2 : CircleIntegrable (fun z : ℂ => ((z - w₀) ^ 2)⁻¹ • f z) c R :=\n  by\n  refine' ContinuousOn.circleIntegrable (pos_of_mem_ball hw₀).le _\n  exact h1.smul (hf.continuousOn.mono (sphere_subset_closedBall.trans hc))\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\nh1 : ContinuousOn (fun z => ((z - w₀) ^ 2)⁻¹) (sphere c R)\n⊢ CircleIntegrable (fun z => ((z - w₀) ^ 2)⁻¹ • f z) c R\n[PROOFSTEP]\nrefine' ContinuousOn.circleIntegrable (pos_of_mem_ball hw₀).le _\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\nh1 : ContinuousOn (fun z => ((z - w₀) ^ 2)⁻¹) (sphere c R)\n⊢ ContinuousOn (fun z => ((z - w₀) ^ 2)⁻¹ • f z) (sphere c R)\n[PROOFSTEP]\nexact h1.smul (hf.continuousOn.mono (sphere_subset_closedBall.trans hc))\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\nh1 : ContinuousOn (fun z => ((z - w₀) ^ 2)⁻¹) (sphere c R)\nh2 : CircleIntegrable (fun z => ((z - w₀) ^ 2)⁻¹ • f z) c R\n⊢ (∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • f z) = ∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • (f z - f w₀)\n[PROOFSTEP]\nhave h3 : CircleIntegrable (fun z : ℂ => ((z - w₀) ^ 2)⁻¹ • f w₀) c R :=\n  ContinuousOn.circleIntegrable (pos_of_mem_ball hw₀).le (h1.smul continuousOn_const)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\nh1 : ContinuousOn (fun z => ((z - w₀) ^ 2)⁻¹) (sphere c R)\nh2 : CircleIntegrable (fun z => ((z - w₀) ^ 2)⁻¹ • f z) c R\nh3 : CircleIntegrable (fun z => ((z - w₀) ^ 2)⁻¹ • f w₀) c R\n⊢ (∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • f z) = ∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • (f z - f w₀)\n[PROOFSTEP]\nhave h4 : (∮ z : ℂ in C(c, R), ((z - w₀) ^ 2)⁻¹) = 0 := by\n  simpa using circleIntegral.integral_sub_zpow_of_ne (by decide : (-2 : ℤ) ≠ -1) c w₀ R\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\nh1 : ContinuousOn (fun z => ((z - w₀) ^ 2)⁻¹) (sphere c R)\nh2 : CircleIntegrable (fun z => ((z - w₀) ^ 2)⁻¹ • f z) c R\nh3 : CircleIntegrable (fun z => ((z - w₀) ^ 2)⁻¹ • f w₀) c R\n⊢ (∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹) = 0\n[PROOFSTEP]\nsimpa using circleIntegral.integral_sub_zpow_of_ne (by decide : (-2 : ℤ) ≠ -1) c w₀ R\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\nh1 : ContinuousOn (fun z => ((z - w₀) ^ 2)⁻¹) (sphere c R)\nh2 : CircleIntegrable (fun z => ((z - w₀) ^ 2)⁻¹ • f z) c R\nh3 : CircleIntegrable (fun z => ((z - w₀) ^ 2)⁻¹ • f w₀) c R\n⊢ -2 ≠ -1\n[PROOFSTEP]\ndecide\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\nh1 : ContinuousOn (fun z => ((z - w₀) ^ 2)⁻¹) (sphere c R)\nh2 : CircleIntegrable (fun z => ((z - w₀) ^ 2)⁻¹ • f z) c R\nh3 : CircleIntegrable (fun z => ((z - w₀) ^ 2)⁻¹ • f w₀) c R\nh4 : (∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹) = 0\n⊢ (∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • f z) = ∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • (f z - f w₀)\n[PROOFSTEP]\nsimp only [smul_sub, circleIntegral.integral_sub h2 h3, h4, circleIntegral.integral_smul_const, zero_smul, sub_zero]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\n⊢ (∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • (f z - f w₀)) = ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z\n[PROOFSTEP]\nrefine' circleIntegral.integral_congr (pos_of_mem_ball hw₀).le fun z hz => _\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nU : Set ℂ\nhU : IsOpen U\nc w₀ : ℂ\nR : ℝ\nf : ℂ → E\nhc : closedBall c R ⊆ U\nhf : DifferentiableOn ℂ f U\nhw₀ : w₀ ∈ ball c R\nhf' : DifferentiableOn ℂ (dslope f w₀) U\nh0 : ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w₀)⁻¹ • dslope f w₀ z) = dslope f w₀ w₀\nz : ℂ\nhz : z ∈ sphere c R\n⊢ ((z - w₀) ^ 2)⁻¹ • (f z - f w₀) = (z - w₀)⁻¹ • dslope f w₀ z\n[PROOFSTEP]\nsimp only [dslope_of_ne, Metric.sphere_disjoint_ball.ne_of_mem hz hw₀, slope, ← smul_assoc, sq, mul_inv, Ne.def,\n  not_false_iff, vsub_eq_sub, Algebra.id.smul_eq_mul]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.RemovableSingularity", "llama_tokens": 12127, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6548947290421275, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.35551830274017754}}
{"text": "[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\n⊢ g ∈ lifts (algebraMap { x // x ∈ integralClosure R K } K)\n[PROOFSTEP]\nhave :=\n  mem_lift_of_splits_of_roots_mem_range (integralClosure R g.SplittingField)\n    ((splits_id_iff_splits _).2 <| SplittingField.splits g) (hg.map _) fun a ha =>\n    (SetLike.ext_iff.mp (integralClosure R g.SplittingField).range_algebraMap _).mpr <| roots_mem_integralClosure hf ?_\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\nthis :\n  map (algebraMap K (SplittingField g)) g ∈\n    lifts (algebraMap { x // x ∈ integralClosure R (SplittingField g) } (SplittingField g))\n⊢ g ∈ lifts (algebraMap { x // x ∈ integralClosure R K } K)\n[PROOFSTEP]\nrw [lifts_iff_coeff_lifts, ← RingHom.coe_range, Subalgebra.range_algebraMap] at this \n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\nthis :\n  ∀ (n : ℕ),\n    coeff (map (algebraMap K (SplittingField g)) g) n ∈ ↑(Subalgebra.toSubring (integralClosure R (SplittingField g)))\n⊢ g ∈ lifts (algebraMap { x // x ∈ integralClosure R K } K)\n[PROOFSTEP]\nrefine' (lifts_iff_coeff_lifts _).2 fun n => _\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\nthis :\n  ∀ (n : ℕ),\n    coeff (map (algebraMap K (SplittingField g)) g) n ∈ ↑(Subalgebra.toSubring (integralClosure R (SplittingField g)))\nn : ℕ\n⊢ coeff g n ∈ Set.range ↑(algebraMap { x // x ∈ integralClosure R K } K)\n[PROOFSTEP]\nrw [← RingHom.coe_range, Subalgebra.range_algebraMap]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\nthis :\n  ∀ (n : ℕ),\n    coeff (map (algebraMap K (SplittingField g)) g) n ∈ ↑(Subalgebra.toSubring (integralClosure R (SplittingField g)))\nn : ℕ\n⊢ coeff g n ∈ ↑(Subalgebra.toSubring (integralClosure R K))\n[PROOFSTEP]\nobtain ⟨p, hp, he⟩ := SetLike.mem_coe.mp (this n)\n[GOAL]\ncase refine_2.intro.intro\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\nthis :\n  ∀ (n : ℕ),\n    coeff (map (algebraMap K (SplittingField g)) g) n ∈ ↑(Subalgebra.toSubring (integralClosure R (SplittingField g)))\nn : ℕ\np : R[X]\nhp : Monic p\nhe : eval₂ (algebraMap R (SplittingField g)) (coeff (map (algebraMap K (SplittingField g)) g) n) p = 0\n⊢ coeff g n ∈ ↑(Subalgebra.toSubring (integralClosure R K))\n[PROOFSTEP]\nuse p, hp\n[GOAL]\ncase right\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\nthis :\n  ∀ (n : ℕ),\n    coeff (map (algebraMap K (SplittingField g)) g) n ∈ ↑(Subalgebra.toSubring (integralClosure R (SplittingField g)))\nn : ℕ\np : R[X]\nhp : Monic p\nhe : eval₂ (algebraMap R (SplittingField g)) (coeff (map (algebraMap K (SplittingField g)) g) n) p = 0\n⊢ eval₂ (algebraMap R K) (coeff g n) p = 0\n[PROOFSTEP]\nrw [IsScalarTower.algebraMap_eq R K, coeff_map, ← eval₂_map, eval₂_at_apply] at he \n[GOAL]\ncase right\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\nthis :\n  ∀ (n : ℕ),\n    coeff (map (algebraMap K (SplittingField g)) g) n ∈ ↑(Subalgebra.toSubring (integralClosure R (SplittingField g)))\nn : ℕ\np : R[X]\nhp : Monic p\nhe : ↑(algebraMap K (SplittingField g)) (eval (coeff g n) (map (algebraMap R K) p)) = 0\n⊢ eval₂ (algebraMap R K) (coeff g n) p = 0\n[PROOFSTEP]\nrw [eval₂_eq_eval_map]\n[GOAL]\ncase right\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\nthis :\n  ∀ (n : ℕ),\n    coeff (map (algebraMap K (SplittingField g)) g) n ∈ ↑(Subalgebra.toSubring (integralClosure R (SplittingField g)))\nn : ℕ\np : R[X]\nhp : Monic p\nhe : ↑(algebraMap K (SplittingField g)) (eval (coeff g n) (map (algebraMap R K) p)) = 0\n⊢ eval (coeff g n) (map (algebraMap R K) p) = 0\n[PROOFSTEP]\napply (injective_iff_map_eq_zero _).1 _ _ he\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\nthis :\n  ∀ (n : ℕ),\n    coeff (map (algebraMap K (SplittingField g)) g) n ∈ ↑(Subalgebra.toSubring (integralClosure R (SplittingField g)))\nn : ℕ\np : R[X]\nhp : Monic p\nhe : ↑(algebraMap K (SplittingField g)) (eval (coeff g n) (map (algebraMap R K) p)) = 0\n⊢ Function.Injective ↑(algebraMap K (SplittingField g))\n[PROOFSTEP]\napply RingHom.injective\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\na : SplittingField g\nha : a ∈ roots (map (algebraMap K (SplittingField g)) g)\n⊢ a ∈ roots (map (algebraMap R (SplittingField g)) f)\n[PROOFSTEP]\nrw [IsScalarTower.algebraMap_eq R K _, ← map_map]\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\na : SplittingField g\nha : a ∈ roots (map (algebraMap K (SplittingField g)) g)\n⊢ a ∈ roots (map (algebraMap K (SplittingField g)) (map (algebraMap R K) f))\n[PROOFSTEP]\nrefine' Multiset.mem_of_le (roots.le_of_dvd ((hf.map _).map _).ne_zero _) ha\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝² : CommRing R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : Monic g\nhd : g ∣ map (algebraMap R K) f\na : SplittingField g\nha : a ∈ roots (map (algebraMap K (SplittingField g)) g)\n⊢ map (algebraMap K (SplittingField g)) g ∣ map (algebraMap K (SplittingField g)) (map (algebraMap R K) f)\n[PROOFSTEP]\nexact map_dvd (algebraMap K g.SplittingField) hd\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\n⊢ ∃ g', map (algebraMap R K) g' * ↑C (leadingCoeff g) = g\n[PROOFSTEP]\nhave g_ne_0 : g ≠ 0 := ne_zero_of_dvd_ne_zero (Monic.ne_zero <| hf.map (algebraMap R K)) hg\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\n⊢ ∃ g', map (algebraMap R K) g' * ↑C (leadingCoeff g) = g\n[PROOFSTEP]\nsuffices lem : ∃ g' : R[X], g'.map (algebraMap R K) = g * C g.leadingCoeff⁻¹\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\nlem : ∃ g', map (algebraMap R K) g' = g * ↑C (leadingCoeff g)⁻¹\n⊢ ∃ g', map (algebraMap R K) g' * ↑C (leadingCoeff g) = g\n[PROOFSTEP]\nobtain ⟨g', hg'⟩ := lem\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng' : R[X]\nhg' : map (algebraMap R K) g' = g * ↑C (leadingCoeff g)⁻¹\n⊢ ∃ g', map (algebraMap R K) g' * ↑C (leadingCoeff g) = g\n[PROOFSTEP]\nuse g'\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng' : R[X]\nhg' : map (algebraMap R K) g' = g * ↑C (leadingCoeff g)⁻¹\n⊢ map (algebraMap R K) g' * ↑C (leadingCoeff g) = g\n[PROOFSTEP]\nrw [hg', mul_assoc, ← C_mul, inv_mul_cancel (leadingCoeff_ne_zero.mpr g_ne_0), C_1, mul_one]\n[GOAL]\ncase lem\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\n⊢ ∃ g', map (algebraMap R K) g' = g * ↑C (leadingCoeff g)⁻¹\n[PROOFSTEP]\nhave g_mul_dvd : g * C g.leadingCoeff⁻¹ ∣ f.map (algebraMap R K) :=\n  by\n  rwa [Associated.dvd_iff_dvd_left (show Associated (g * C g.leadingCoeff⁻¹) g from _)]\n  rw [associated_mul_isUnit_left_iff]\n  exact isUnit_C.mpr (inv_ne_zero <| leadingCoeff_ne_zero.mpr g_ne_0).isUnit\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\n⊢ g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\n[PROOFSTEP]\nrwa [Associated.dvd_iff_dvd_left (show Associated (g * C g.leadingCoeff⁻¹) g from _)]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\n⊢ Associated (g * ↑C (leadingCoeff g)⁻¹) g\n[PROOFSTEP]\nrw [associated_mul_isUnit_left_iff]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\n⊢ IsUnit (↑C (leadingCoeff g)⁻¹)\n[PROOFSTEP]\nexact isUnit_C.mpr (inv_ne_zero <| leadingCoeff_ne_zero.mpr g_ne_0).isUnit\n[GOAL]\ncase lem\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\n⊢ ∃ g', map (algebraMap R K) g' = g * ↑C (leadingCoeff g)⁻¹\n[PROOFSTEP]\nlet algeq :=\n  (Subalgebra.equivOfEq _ _ <| integralClosure_eq_bot R _).trans\n    (Algebra.botEquivOfInjective <| IsFractionRing.injective R <| K)\n[GOAL]\ncase lem\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\nalgeq : { x // x ∈ integralClosure R K } ≃ₐ[R] R :=\n  AlgEquiv.trans (Subalgebra.equivOfEq (integralClosure R K) ⊥ (_ : integralClosure R K = ⊥))\n    (Algebra.botEquivOfInjective (_ : Function.Injective ↑(algebraMap R K)))\n⊢ ∃ g', map (algebraMap R K) g' = g * ↑C (leadingCoeff g)⁻¹\n[PROOFSTEP]\nhave : (algebraMap R _).comp algeq.toAlgHom.toRingHom = (integralClosure R _).toSubring.subtype := by ext x;\n  conv_rhs => rw [← algeq.symm_apply_apply x]; rfl\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\nalgeq : { x // x ∈ integralClosure R K } ≃ₐ[R] R :=\n  AlgEquiv.trans (Subalgebra.equivOfEq (integralClosure R K) ⊥ (_ : integralClosure R K = ⊥))\n    (Algebra.botEquivOfInjective (_ : Function.Injective ↑(algebraMap R K)))\n⊢ RingHom.comp (algebraMap R K) ↑↑algeq = Subring.subtype (Subalgebra.toSubring (integralClosure R K))\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\nalgeq : { x // x ∈ integralClosure R K } ≃ₐ[R] R :=\n  AlgEquiv.trans (Subalgebra.equivOfEq (integralClosure R K) ⊥ (_ : integralClosure R K = ⊥))\n    (Algebra.botEquivOfInjective (_ : Function.Injective ↑(algebraMap R K)))\nx : { x // x ∈ integralClosure R K }\n⊢ ↑(RingHom.comp (algebraMap R K) ↑↑algeq) x = ↑(Subring.subtype (Subalgebra.toSubring (integralClosure R K))) x\n[PROOFSTEP]\nconv_rhs => rw [← algeq.symm_apply_apply x]; rfl\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\nalgeq : { x // x ∈ integralClosure R K } ≃ₐ[R] R :=\n  AlgEquiv.trans (Subalgebra.equivOfEq (integralClosure R K) ⊥ (_ : integralClosure R K = ⊥))\n    (Algebra.botEquivOfInjective (_ : Function.Injective ↑(algebraMap R K)))\nx : { x // x ∈ integralClosure R K }\n| ↑(Subring.subtype (Subalgebra.toSubring (integralClosure R K))) x\n[PROOFSTEP]\nrw [← algeq.symm_apply_apply x]; rfl\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\nalgeq : { x // x ∈ integralClosure R K } ≃ₐ[R] R :=\n  AlgEquiv.trans (Subalgebra.equivOfEq (integralClosure R K) ⊥ (_ : integralClosure R K = ⊥))\n    (Algebra.botEquivOfInjective (_ : Function.Injective ↑(algebraMap R K)))\nx : { x // x ∈ integralClosure R K }\n| ↑(Subring.subtype (Subalgebra.toSubring (integralClosure R K))) x\n[PROOFSTEP]\nrw [← algeq.symm_apply_apply x]; rfl\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\nalgeq : { x // x ∈ integralClosure R K } ≃ₐ[R] R :=\n  AlgEquiv.trans (Subalgebra.equivOfEq (integralClosure R K) ⊥ (_ : integralClosure R K = ⊥))\n    (Algebra.botEquivOfInjective (_ : Function.Injective ↑(algebraMap R K)))\nx : { x // x ∈ integralClosure R K }\n| ↑(Subring.subtype (Subalgebra.toSubring (integralClosure R K))) x\n[PROOFSTEP]\nrw [← algeq.symm_apply_apply x]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\nalgeq : { x // x ∈ integralClosure R K } ≃ₐ[R] R :=\n  AlgEquiv.trans (Subalgebra.equivOfEq (integralClosure R K) ⊥ (_ : integralClosure R K = ⊥))\n    (Algebra.botEquivOfInjective (_ : Function.Injective ↑(algebraMap R K)))\nx : { x // x ∈ integralClosure R K }\n| ↑(Subring.subtype (Subalgebra.toSubring (integralClosure R K))) (↑(AlgEquiv.symm algeq) (↑algeq x))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase lem\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\nalgeq : { x // x ∈ integralClosure R K } ≃ₐ[R] R :=\n  AlgEquiv.trans (Subalgebra.equivOfEq (integralClosure R K) ⊥ (_ : integralClosure R K = ⊥))\n    (Algebra.botEquivOfInjective (_ : Function.Injective ↑(algebraMap R K)))\nthis : RingHom.comp (algebraMap R K) ↑↑algeq = Subring.subtype (Subalgebra.toSubring (integralClosure R K))\n⊢ ∃ g', map (algebraMap R K) g' = g * ↑C (leadingCoeff g)⁻¹\n[PROOFSTEP]\nhave H :=\n  (mem_lifts _).1 (integralClosure.mem_lifts_of_monic_of_dvd_map K hf (monic_mul_leadingCoeff_inv g_ne_0) g_mul_dvd)\n[GOAL]\ncase lem\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\nalgeq : { x // x ∈ integralClosure R K } ≃ₐ[R] R :=\n  AlgEquiv.trans (Subalgebra.equivOfEq (integralClosure R K) ⊥ (_ : integralClosure R K = ⊥))\n    (Algebra.botEquivOfInjective (_ : Function.Injective ↑(algebraMap R K)))\nthis : RingHom.comp (algebraMap R K) ↑↑algeq = Subring.subtype (Subalgebra.toSubring (integralClosure R K))\nH : ∃ q, map (algebraMap { x // x ∈ integralClosure R K } K) q = g * ↑C (leadingCoeff g)⁻¹\n⊢ ∃ g', map (algebraMap R K) g' = g * ↑C (leadingCoeff g)⁻¹\n[PROOFSTEP]\nrefine' ⟨map algeq.toAlgHom.toRingHom _, _⟩\n[GOAL]\ncase lem.refine'_1\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\nalgeq : { x // x ∈ integralClosure R K } ≃ₐ[R] R :=\n  AlgEquiv.trans (Subalgebra.equivOfEq (integralClosure R K) ⊥ (_ : integralClosure R K = ⊥))\n    (Algebra.botEquivOfInjective (_ : Function.Injective ↑(algebraMap R K)))\nthis : RingHom.comp (algebraMap R K) ↑↑algeq = Subring.subtype (Subalgebra.toSubring (integralClosure R K))\nH : ∃ q, map (algebraMap { x // x ∈ integralClosure R K } K) q = g * ↑C (leadingCoeff g)⁻¹\n⊢ { x // x ∈ integralClosure R K }[X]\n[PROOFSTEP]\nuse! Classical.choose H\n[GOAL]\ncase lem.refine'_2\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\nalgeq : { x // x ∈ integralClosure R K } ≃ₐ[R] R :=\n  AlgEquiv.trans (Subalgebra.equivOfEq (integralClosure R K) ⊥ (_ : integralClosure R K = ⊥))\n    (Algebra.botEquivOfInjective (_ : Function.Injective ↑(algebraMap R K)))\nthis : RingHom.comp (algebraMap R K) ↑↑algeq = Subring.subtype (Subalgebra.toSubring (integralClosure R K))\nH : ∃ q, map (algebraMap { x // x ∈ integralClosure R K } K) q = g * ↑C (leadingCoeff g)⁻¹\n⊢ map (algebraMap R K) (map (↑↑algeq) (Classical.choose H)) = g * ↑C (leadingCoeff g)⁻¹\n[PROOFSTEP]\nrw [map_map, this]\n[GOAL]\ncase lem.refine'_2\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsDomain R\ninst✝¹ : IsFractionRing R K\ninst✝ : IsIntegrallyClosed R\nf : R[X]\nhf : Monic f\ng : K[X]\nhg : g ∣ map (algebraMap R K) f\ng_ne_0 : g ≠ 0\ng_mul_dvd : g * ↑C (leadingCoeff g)⁻¹ ∣ map (algebraMap R K) f\nalgeq : { x // x ∈ integralClosure R K } ≃ₐ[R] R :=\n  AlgEquiv.trans (Subalgebra.equivOfEq (integralClosure R K) ⊥ (_ : integralClosure R K = ⊥))\n    (Algebra.botEquivOfInjective (_ : Function.Injective ↑(algebraMap R K)))\nthis : RingHom.comp (algebraMap R K) ↑↑algeq = Subring.subtype (Subalgebra.toSubring (integralClosure R K))\nH : ∃ q, map (algebraMap { x // x ∈ integralClosure R K } K) q = g * ↑C (leadingCoeff g)⁻¹\n⊢ map (Subring.subtype (Subalgebra.toSubring (integralClosure R K))) (Classical.choose H) = g * ↑C (leadingCoeff g)⁻¹\n[PROOFSTEP]\nexact Classical.choose_spec H\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\n⊢ IsUnit f ↔ IsUnit (map φ f)\n[PROOFSTEP]\nrefine' ⟨(mapRingHom φ).isUnit_map, fun h => _⟩\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\nh : IsUnit (map φ f)\n⊢ IsUnit f\n[PROOFSTEP]\nrcases isUnit_iff.1 h with ⟨_, ⟨u, rfl⟩, hu⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\nh : IsUnit (map φ f)\nu : Sˣ\nhu : ↑C ↑u = map φ f\n⊢ IsUnit f\n[PROOFSTEP]\nhave hdeg := degree_C u.ne_zero\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\nh : IsUnit (map φ f)\nu : Sˣ\nhu : ↑C ↑u = map φ f\nhdeg : degree (↑C ↑u) = 0\n⊢ IsUnit f\n[PROOFSTEP]\nrw [hu, degree_map_eq_of_injective hinj] at hdeg \n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\nh : IsUnit (map φ f)\nu : Sˣ\nhu : ↑C ↑u = map φ f\nhdeg : degree f = 0\n⊢ IsUnit f\n[PROOFSTEP]\nrw [eq_C_of_degree_eq_zero hdeg] at hf ⊢\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive (↑C (coeff f 0))\nh : IsUnit (map φ f)\nu : Sˣ\nhu : ↑C ↑u = map φ f\nhdeg : degree f = 0\n⊢ IsUnit (↑C (coeff f 0))\n[PROOFSTEP]\nexact isUnit_C.mpr (isPrimitive_iff_isUnit_of_C_dvd.mp hf (f.coeff 0) dvd_rfl)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\nh_irr : Irreducible (map φ f)\n⊢ Irreducible f\n[PROOFSTEP]\nrefine'\n  ⟨fun h => h_irr.not_unit (IsUnit.map (mapRingHom φ) h), fun a b h =>\n    (h_irr.isUnit_or_isUnit <| by rw [h, Polynomial.map_mul]).imp _ _⟩\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\nh_irr : Irreducible (map φ f)\na b : R[X]\nh : f = a * b\n⊢ map φ f = ?m.200623 a b h * ?m.200624 a b h\n[PROOFSTEP]\nrw [h, Polynomial.map_mul]\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\nh_irr : Irreducible (map φ f)\na b : R[X]\nh : f = a * b\n⊢ IsUnit (map φ a) → IsUnit a\ncase refine'_2\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\nh_irr : Irreducible (map φ f)\na b : R[X]\nh : f = a * b\n⊢ IsUnit (map φ b) → IsUnit b\n[PROOFSTEP]\nall_goals apply ((isPrimitive_of_dvd hf _).isUnit_iff_isUnit_map_of_injective hinj).mpr\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\nh_irr : Irreducible (map φ f)\na b : R[X]\nh : f = a * b\n⊢ IsUnit (map φ a) → IsUnit a\n[PROOFSTEP]\napply ((isPrimitive_of_dvd hf _).isUnit_iff_isUnit_map_of_injective hinj).mpr\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\nh_irr : Irreducible (map φ f)\na b : R[X]\nh : f = a * b\n⊢ IsUnit (map φ b) → IsUnit b\n[PROOFSTEP]\napply ((isPrimitive_of_dvd hf _).isUnit_iff_isUnit_map_of_injective hinj).mpr\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\nh_irr : Irreducible (map φ f)\na b : R[X]\nh : f = a * b\n⊢ a ∣ f\nR : Type u_1\ninst✝² : CommRing R\nS : Type u_2\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhinj : Function.Injective ↑φ\nf : R[X]\nhf : IsPrimitive f\nh_irr : Irreducible (map φ f)\na b : R[X]\nh : f = a * b\n⊢ b ∣ f\n[PROOFSTEP]\nexacts [Dvd.intro _ h.symm, Dvd.intro_left _ h.symm]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\n⊢ Irreducible p ↔ Irreducible (Polynomial.map (algebraMap R K) p)\n[PROOFSTEP]\nrefine'\n  ⟨fun hp =>\n    irreducible_iff.mpr\n      ⟨hp.not_unit.imp h.isPrimitive.isUnit_iff_isUnit_map.mpr, fun a b H => or_iff_not_imp_left.mpr fun hₐ => _⟩,\n    fun hp => h.isPrimitive.irreducible_of_irreducible_map_of_injective (IsFractionRing.injective R K) hp⟩\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nH : Polynomial.map (algebraMap R K) p = a * b\nhₐ : ¬IsUnit a\n⊢ IsUnit b\n[PROOFSTEP]\nobtain ⟨a', ha⟩ := eq_map_mul_C_of_dvd K h (dvd_of_mul_right_eq b H.symm)\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nH : Polynomial.map (algebraMap R K) p = a * b\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\n⊢ IsUnit b\n[PROOFSTEP]\nobtain ⟨b', hb⟩ := eq_map_mul_C_of_dvd K h (dvd_of_mul_left_eq a H.symm)\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nH : Polynomial.map (algebraMap R K) p = a * b\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\nb' : R[X]\nhb : Polynomial.map (algebraMap R K) b' * ↑C (Polynomial.leadingCoeff b) = b\n⊢ IsUnit b\n[PROOFSTEP]\nhave : a.leadingCoeff * b.leadingCoeff = 1 := by\n  rw [← leadingCoeff_mul, ← H, Monic.leadingCoeff (h.map <| algebraMap R K)]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nH : Polynomial.map (algebraMap R K) p = a * b\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\nb' : R[X]\nhb : Polynomial.map (algebraMap R K) b' * ↑C (Polynomial.leadingCoeff b) = b\n⊢ Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n[PROOFSTEP]\nrw [← leadingCoeff_mul, ← H, Monic.leadingCoeff (h.map <| algebraMap R K)]\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nH : Polynomial.map (algebraMap R K) p = a * b\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\nb' : R[X]\nhb : Polynomial.map (algebraMap R K) b' * ↑C (Polynomial.leadingCoeff b) = b\nthis : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ IsUnit b\n[PROOFSTEP]\nrw [← ha, ← hb, mul_comm _ (C b.leadingCoeff), mul_assoc, ← mul_assoc (C a.leadingCoeff), ← C_mul, this, C_1, one_mul, ←\n  Polynomial.map_mul] at H \n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\nb' : R[X]\nH : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) (a' * b')\nhb : Polynomial.map (algebraMap R K) b' * ↑C (Polynomial.leadingCoeff b) = b\nthis : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ IsUnit b\n[PROOFSTEP]\nrw [← hb, ← Polynomial.coe_mapRingHom]\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\nb' : R[X]\nH : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) (a' * b')\nhb : Polynomial.map (algebraMap R K) b' * ↑C (Polynomial.leadingCoeff b) = b\nthis : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ IsUnit (↑(mapRingHom (algebraMap R K)) b' * ↑C (Polynomial.leadingCoeff b))\n[PROOFSTEP]\nrefine'\n  IsUnit.mul (IsUnit.map _ (Or.resolve_left (hp.isUnit_or_isUnit _) (show ¬IsUnit a' from _)))\n    (isUnit_iff_exists_inv'.mpr (Exists.intro (C a.leadingCoeff) <| by rw [← C_mul, this, C_1]))\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\nb' : R[X]\nH : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) (a' * b')\nhb : Polynomial.map (algebraMap R K) b' * ↑C (Polynomial.leadingCoeff b) = b\nthis : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ ↑C (Polynomial.leadingCoeff a) * ↑C (Polynomial.leadingCoeff b) = 1\n[PROOFSTEP]\nrw [← C_mul, this, C_1]\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\nb' : R[X]\nH : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) (a' * b')\nhb : Polynomial.map (algebraMap R K) b' * ↑C (Polynomial.leadingCoeff b) = b\nthis : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ p = a' * b'\n[PROOFSTEP]\nexact Polynomial.map_injective _ (IsFractionRing.injective R K) H\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\nb' : R[X]\nH : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) (a' * b')\nhb : Polynomial.map (algebraMap R K) b' * ↑C (Polynomial.leadingCoeff b) = b\nthis : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ ¬IsUnit a'\n[PROOFSTEP]\nby_contra h_contra\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\nb' : R[X]\nH : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) (a' * b')\nhb : Polynomial.map (algebraMap R K) b' * ↑C (Polynomial.leadingCoeff b) = b\nthis : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\nh_contra : IsUnit a'\n⊢ False\n[PROOFSTEP]\nrefine' hₐ _\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\nb' : R[X]\nH : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) (a' * b')\nhb : Polynomial.map (algebraMap R K) b' * ↑C (Polynomial.leadingCoeff b) = b\nthis : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\nh_contra : IsUnit a'\n⊢ IsUnit a\n[PROOFSTEP]\nrw [← ha, ← Polynomial.coe_mapRingHom]\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\nb' : R[X]\nH : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) (a' * b')\nhb : Polynomial.map (algebraMap R K) b' * ↑C (Polynomial.leadingCoeff b) = b\nthis : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\nh_contra : IsUnit a'\n⊢ IsUnit (↑(mapRingHom (algebraMap R K)) a' * ↑C (Polynomial.leadingCoeff a))\n[PROOFSTEP]\nexact\n  IsUnit.mul (IsUnit.map _ h_contra)\n    (isUnit_iff_exists_inv.mpr (Exists.intro (C b.leadingCoeff) <| by rw [← C_mul, this, C_1]))\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np : R[X]\nh : Monic p\nhp : Irreducible p\na b : K[X]\nhₐ : ¬IsUnit a\na' : R[X]\nha : Polynomial.map (algebraMap R K) a' * ↑C (Polynomial.leadingCoeff a) = a\nb' : R[X]\nH : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) (a' * b')\nhb : Polynomial.map (algebraMap R K) b' * ↑C (Polynomial.leadingCoeff b) = b\nthis : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\nh_contra : IsUnit a'\n⊢ ↑C (Polynomial.leadingCoeff a) * ↑C (Polynomial.leadingCoeff b) = 1\n[PROOFSTEP]\nrw [← C_mul, this, C_1]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nK : Type u_2\ninst✝³ : Field K\ninst✝² : Algebra R K\ninst✝¹ : IsFractionRing R K\ninst✝ : IsDomain R\n⊢ IsIntegrallyClosed R ↔ ∀ (p : R[X]), Monic p → (Irreducible p ↔ Irreducible (map (algebraMap R K) p))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁴ : CommRing R\nK : Type u_2\ninst✝³ : Field K\ninst✝² : Algebra R K\ninst✝¹ : IsFractionRing R K\ninst✝ : IsDomain R\n⊢ IsIntegrallyClosed R → ∀ (p : R[X]), Monic p → (Irreducible p ↔ Irreducible (map (algebraMap R K) p))\n[PROOFSTEP]\nintro hR p hp\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁴ : CommRing R\nK : Type u_2\ninst✝³ : Field K\ninst✝² : Algebra R K\ninst✝¹ : IsFractionRing R K\ninst✝ : IsDomain R\nhR : IsIntegrallyClosed R\np : R[X]\nhp : Monic p\n⊢ Irreducible p ↔ Irreducible (map (algebraMap R K) p)\n[PROOFSTEP]\nexact Monic.irreducible_iff_irreducible_map_fraction_map hp\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁴ : CommRing R\nK : Type u_2\ninst✝³ : Field K\ninst✝² : Algebra R K\ninst✝¹ : IsFractionRing R K\ninst✝ : IsDomain R\n⊢ (∀ (p : R[X]), Monic p → (Irreducible p ↔ Irreducible (map (algebraMap R K) p))) → IsIntegrallyClosed R\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁴ : CommRing R\nK : Type u_2\ninst✝³ : Field K\ninst✝² : Algebra R K\ninst✝¹ : IsFractionRing R K\ninst✝ : IsDomain R\nH : ∀ (p : R[X]), Monic p → (Irreducible p ↔ Irreducible (map (algebraMap R K) p))\n⊢ IsIntegrallyClosed R\n[PROOFSTEP]\nrefine' (isIntegrallyClosed_iff K).mpr fun {x} hx => RingHom.mem_range.mp <| minpoly.mem_range_of_degree_eq_one R x _\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁴ : CommRing R\nK : Type u_2\ninst✝³ : Field K\ninst✝² : Algebra R K\ninst✝¹ : IsFractionRing R K\ninst✝ : IsDomain R\nH : ∀ (p : R[X]), Monic p → (Irreducible p ↔ Irreducible (map (algebraMap R K) p))\nx : K\nhx : IsIntegral R x\n⊢ degree (minpoly R x) = 1\n[PROOFSTEP]\nrw [← Monic.degree_map (minpoly.monic hx) (algebraMap R K)]\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁴ : CommRing R\nK : Type u_2\ninst✝³ : Field K\ninst✝² : Algebra R K\ninst✝¹ : IsFractionRing R K\ninst✝ : IsDomain R\nH : ∀ (p : R[X]), Monic p → (Irreducible p ↔ Irreducible (map (algebraMap R K) p))\nx : K\nhx : IsIntegral R x\n⊢ degree (map (algebraMap R K) (minpoly R x)) = 1\n[PROOFSTEP]\napply degree_eq_one_of_irreducible_of_root ((H _ <| minpoly.monic hx).mp (minpoly.irreducible hx))\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁴ : CommRing R\nK : Type u_2\ninst✝³ : Field K\ninst✝² : Algebra R K\ninst✝¹ : IsFractionRing R K\ninst✝ : IsDomain R\nH : ∀ (p : R[X]), Monic p → (Irreducible p ↔ Irreducible (map (algebraMap R K) p))\nx : K\nhx : IsIntegral R x\n⊢ IsRoot (map (algebraMap R K) (minpoly R x)) ?m.306193\nR : Type u_1\ninst✝⁴ : CommRing R\nK : Type u_2\ninst✝³ : Field K\ninst✝² : Algebra R K\ninst✝¹ : IsFractionRing R K\ninst✝ : IsDomain R\nH : ∀ (p : R[X]), Monic p → (Irreducible p ↔ Irreducible (map (algebraMap R K) p))\nx : K\nhx : IsIntegral R x\n⊢ K\n[PROOFSTEP]\nrw [IsRoot, eval_map, ← aeval_def, minpoly.aeval R x]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np q : R[X]\nhp : Monic p\nhq : Monic q\nh : Polynomial.map (algebraMap R K) q ∣ Polynomial.map (algebraMap R K) p\n⊢ q ∣ p\n[PROOFSTEP]\nobtain ⟨r, hr⟩ := h\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np q : R[X]\nhp : Monic p\nhq : Monic q\nr : K[X]\nhr : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) q * r\n⊢ q ∣ p\n[PROOFSTEP]\nobtain ⟨d', hr'⟩ := IsIntegrallyClosed.eq_map_mul_C_of_dvd K hp (dvd_of_mul_left_eq _ hr.symm)\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np q : R[X]\nhp : Monic p\nhq : Monic q\nr : K[X]\nhr : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) q * r\nd' : R[X]\nhr' : Polynomial.map (algebraMap R K) d' * ↑C (Polynomial.leadingCoeff r) = r\n⊢ q ∣ p\n[PROOFSTEP]\nrw [Monic.leadingCoeff, C_1, mul_one] at hr' \n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np q : R[X]\nhp : Monic p\nhq : Monic q\nr : K[X]\nhr : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) q * r\nd' : R[X]\nhr' : Polynomial.map (algebraMap R K) d' = r\n⊢ q ∣ p\ncase intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np q : R[X]\nhp : Monic p\nhq : Monic q\nr : K[X]\nhr : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) q * r\nd' : R[X]\nhr' : Polynomial.map (algebraMap R K) d' * ↑C (Polynomial.leadingCoeff r) = r\n⊢ Monic r\n[PROOFSTEP]\nrw [← hr', ← Polynomial.map_mul] at hr \n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np q : R[X]\nhp : Monic p\nhq : Monic q\nr : K[X]\nd' : R[X]\nhr : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) (q * d')\nhr' : Polynomial.map (algebraMap R K) d' = r\n⊢ q ∣ p\ncase intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np q : R[X]\nhp : Monic p\nhq : Monic q\nr : K[X]\nhr : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) q * r\nd' : R[X]\nhr' : Polynomial.map (algebraMap R K) d' * ↑C (Polynomial.leadingCoeff r) = r\n⊢ Monic r\n[PROOFSTEP]\nexact dvd_of_mul_right_eq _ (Polynomial.map_injective _ (IsFractionRing.injective R K) hr.symm)\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np q : R[X]\nhp : Monic p\nhq : Monic q\nr : K[X]\nhr : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) q * r\nd' : R[X]\nhr' : Polynomial.map (algebraMap R K) d' * ↑C (Polynomial.leadingCoeff r) = r\n⊢ Monic r\n[PROOFSTEP]\nexact Monic.of_mul_monic_left (hq.map (algebraMap R K)) (by simpa [← hr] using hp.map _)\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : IsIntegrallyClosed R\np q : R[X]\nhp : Monic p\nhq : Monic q\nr : K[X]\nhr : Polynomial.map (algebraMap R K) p = Polynomial.map (algebraMap R K) q * r\nd' : R[X]\nhr' : Polynomial.map (algebraMap R K) d' * ↑C (Polynomial.leadingCoeff r) = r\n⊢ Monic (Polynomial.map (algebraMap R K) q * r)\n[PROOFSTEP]\nsimpa [← hr] using hp.map _\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\n⊢ IsUnit p\n[PROOFSTEP]\nrcases isUnit_iff.1 h with ⟨_, ⟨u, rfl⟩, hu⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\nu : Rˣ\nhu : ↑C ↑u = primPart (integerNormalization R⁰ p)\n⊢ IsUnit p\n[PROOFSTEP]\nobtain ⟨⟨c, c0⟩, hc⟩ := integerNormalization_map_to_map R⁰ p\n[GOAL]\ncase intro.intro.intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\nu : Rˣ\nhu : ↑C ↑u = primPart (integerNormalization R⁰ p)\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ p) = ↑{ val := c, property := c0 } • p\n⊢ IsUnit p\n[PROOFSTEP]\nrw [Subtype.coe_mk, Algebra.smul_def, algebraMap_apply] at hc \n[GOAL]\ncase intro.intro.intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\nu : Rˣ\nhu : ↑C ↑u = primPart (integerNormalization R⁰ p)\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ p) = ↑C (↑(algebraMap R K) c) * p\n⊢ IsUnit p\n[PROOFSTEP]\napply isUnit_of_mul_isUnit_right\n[GOAL]\ncase intro.intro.intro.intro.mk.hu\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\nu : Rˣ\nhu : ↑C ↑u = primPart (integerNormalization R⁰ p)\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ p) = ↑C (↑(algebraMap R K) c) * p\n⊢ IsUnit (?intro.intro.intro.intro.mk.x * p)\ncase intro.intro.intro.intro.mk.x\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\nu : Rˣ\nhu : ↑C ↑u = primPart (integerNormalization R⁰ p)\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ p) = ↑C (↑(algebraMap R K) c) * p\n⊢ K[X]\n[PROOFSTEP]\nrw [← hc, (integerNormalization R⁰ p).eq_C_content_mul_primPart, ← hu, ← RingHom.map_mul, isUnit_iff]\n[GOAL]\ncase intro.intro.intro.intro.mk.hu\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\nu : Rˣ\nhu : ↑C ↑u = primPart (integerNormalization R⁰ p)\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ p) = ↑C (↑(algebraMap R K) c) * p\n⊢ ∃ r, IsUnit r ∧ ↑C r = map (algebraMap R K) (↑C (content (integerNormalization R⁰ p) * ↑u))\n[PROOFSTEP]\nrefine' ⟨algebraMap R K ((integerNormalization R⁰ p).content * ↑u), isUnit_iff_ne_zero.2 fun con => _, by simp⟩\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\nu : Rˣ\nhu : ↑C ↑u = primPart (integerNormalization R⁰ p)\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ p) = ↑C (↑(algebraMap R K) c) * p\n⊢ ↑C (↑(algebraMap R K) (content (integerNormalization R⁰ p) * ↑u)) =\n    map (algebraMap R K) (↑C (content (integerNormalization R⁰ p) * ↑u))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.intro.mk.hu\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\nu : Rˣ\nhu : ↑C ↑u = primPart (integerNormalization R⁰ p)\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ p) = ↑C (↑(algebraMap R K) c) * p\ncon : ↑(algebraMap R K) (content (integerNormalization R⁰ p) * ↑u) = 0\n⊢ False\n[PROOFSTEP]\nreplace con := (injective_iff_map_eq_zero (algebraMap R K)).1 (IsFractionRing.injective _ _) _ con\n[GOAL]\ncase intro.intro.intro.intro.mk.hu\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\nu : Rˣ\nhu : ↑C ↑u = primPart (integerNormalization R⁰ p)\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ p) = ↑C (↑(algebraMap R K) c) * p\ncon : content (integerNormalization R⁰ p) * ↑u = 0\n⊢ False\n[PROOFSTEP]\nrw [mul_eq_zero, content_eq_zero_iff, IsFractionRing.integerNormalization_eq_zero_iff] at con \n[GOAL]\ncase intro.intro.intro.intro.mk.hu\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\nu : Rˣ\nhu : ↑C ↑u = primPart (integerNormalization R⁰ p)\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ p) = ↑C (↑(algebraMap R K) c) * p\ncon : p = 0 ∨ ↑u = 0\n⊢ False\n[PROOFSTEP]\nrcases con with (con | con)\n[GOAL]\ncase intro.intro.intro.intro.mk.hu.inl\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\nu : Rˣ\nhu : ↑C ↑u = primPart (integerNormalization R⁰ p)\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ p) = ↑C (↑(algebraMap R K) c) * p\ncon : p = 0\n⊢ False\n[PROOFSTEP]\napply h0 con\n[GOAL]\ncase intro.intro.intro.intro.mk.hu.inr\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : K[X]\nh0 : p ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ p))\nu : Rˣ\nhu : ↑C ↑u = primPart (integerNormalization R⁰ p)\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ p) = ↑C (↑(algebraMap R K) c) * p\ncon : ↑u = 0\n⊢ False\n[PROOFSTEP]\napply Units.ne_zero _ con\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\n⊢ Irreducible p ↔ Irreducible (map (algebraMap R K) p)\n[PROOFSTEP]\nrefine'\n  ⟨fun hi => ⟨fun h => hi.not_unit (hp.isUnit_iff_isUnit_map.2 h), fun a b hab => _⟩,\n    hp.irreducible_of_irreducible_map_of_injective (IsFractionRing.injective R K)⟩\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nobtain ⟨⟨c, c0⟩, hc⟩ := integerNormalization_map_to_map R⁰ a\n[GOAL]\ncase intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑{ val := c, property := c0 } • a\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nobtain ⟨⟨d, d0⟩, hd⟩ := integerNormalization_map_to_map R⁰ b\n[GOAL]\ncase intro.mk.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑{ val := c, property := c0 } • a\nd : R\nd0 : d ∈ R⁰\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑{ val := d, property := d0 } • b\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nrw [Algebra.smul_def, algebraMap_apply, Subtype.coe_mk] at hc hd \n[GOAL]\ncase intro.mk.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ∈ R⁰\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ∈ R⁰\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nrw [mem_nonZeroDivisors_iff_ne_zero] at c0 d0 \n[GOAL]\ncase intro.mk.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nhave hcd0 : c * d ≠ 0 := mul_ne_zero c0 d0\n[GOAL]\ncase intro.mk.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : c * d ≠ 0\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nrw [Ne.def, ← C_eq_zero] at hcd0 \n[GOAL]\ncase intro.mk.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nhave h1 : C c * C d * p = integerNormalization R⁰ a * integerNormalization R⁰ b :=\n  by\n  apply map_injective (algebraMap R K) (IsFractionRing.injective _ _) _\n  rw [Polynomial.map_mul, Polynomial.map_mul, Polynomial.map_mul, hc, hd, map_C, map_C, hab]\n  ring\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\n⊢ ↑C c * ↑C d * p = integerNormalization R⁰ a * integerNormalization R⁰ b\n[PROOFSTEP]\napply map_injective (algebraMap R K) (IsFractionRing.injective _ _) _\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\n⊢ map (algebraMap R K) (↑C c * ↑C d * p) = map (algebraMap R K) (integerNormalization R⁰ a * integerNormalization R⁰ b)\n[PROOFSTEP]\nrw [Polynomial.map_mul, Polynomial.map_mul, Polynomial.map_mul, hc, hd, map_C, map_C, hab]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\n⊢ ↑C (↑(algebraMap R K) c) * ↑C (↑(algebraMap R K) d) * (a * b) =\n    ↑C (↑(algebraMap R K) c) * a * (↑C (↑(algebraMap R K) d) * b)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.mk.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nh1 : ↑C c * ↑C d * p = integerNormalization R⁰ a * integerNormalization R⁰ b\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nobtain ⟨u, hu⟩ : Associated (c * d) (content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)) := by\n  rw [← dvd_dvd_iff_associated, ← normalize_eq_normalize_iff, normalize.map_mul, normalize.map_mul, normalize_content,\n    normalize_content, ← mul_one (normalize c * normalize d), ← hp.content_eq_one, ← content_C, ← content_C, ←\n    content_mul, ← content_mul, ← content_mul, h1]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nh1 : ↑C c * ↑C d * p = integerNormalization R⁰ a * integerNormalization R⁰ b\n⊢ Associated (c * d) (content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b))\n[PROOFSTEP]\nrw [← dvd_dvd_iff_associated, ← normalize_eq_normalize_iff, normalize.map_mul, normalize.map_mul, normalize_content,\n  normalize_content, ← mul_one (normalize c * normalize d), ← hp.content_eq_one, ← content_C, ← content_C, ←\n  content_mul, ← content_mul, ← content_mul, h1]\n[GOAL]\ncase intro.mk.intro.mk.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nh1 : ↑C c * ↑C d * p = integerNormalization R⁰ a * integerNormalization R⁰ b\nu : Rˣ\nhu : c * d * ↑u = content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nrw [← RingHom.map_mul, eq_comm, (integerNormalization R⁰ a).eq_C_content_mul_primPart,\n  (integerNormalization R⁰ b).eq_C_content_mul_primPart, mul_assoc, mul_comm _ (C _ * _), ← mul_assoc, ← mul_assoc, ←\n  RingHom.map_mul, ← hu, RingHom.map_mul, mul_assoc, mul_assoc, ← mul_assoc (C (u : R))] at h1 \n[GOAL]\ncase intro.mk.intro.mk.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nu : Rˣ\nh1 : ↑C (c * d) * (↑C ↑u * primPart (integerNormalization R⁰ b) * primPart (integerNormalization R⁰ a)) = ↑C (c * d) * p\nhu : c * d * ↑u = content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nhave h0 : a ≠ 0 ∧ b ≠ 0 := by\n  classical\n  rw [Ne.def, Ne.def, ← not_or, ← mul_eq_zero, ← hab]\n  intro con\n  apply hp.ne_zero (map_injective (algebraMap R K) (IsFractionRing.injective _ _) _)\n  simp [con]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nu : Rˣ\nh1 : ↑C (c * d) * (↑C ↑u * primPart (integerNormalization R⁰ b) * primPart (integerNormalization R⁰ a)) = ↑C (c * d) * p\nhu : c * d * ↑u = content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)\n⊢ a ≠ 0 ∧ b ≠ 0\n[PROOFSTEP]\nclassical\nrw [Ne.def, Ne.def, ← not_or, ← mul_eq_zero, ← hab]\nintro con\napply hp.ne_zero (map_injective (algebraMap R K) (IsFractionRing.injective _ _) _)\nsimp [con]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nu : Rˣ\nh1 : ↑C (c * d) * (↑C ↑u * primPart (integerNormalization R⁰ b) * primPart (integerNormalization R⁰ a)) = ↑C (c * d) * p\nhu : c * d * ↑u = content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)\n⊢ a ≠ 0 ∧ b ≠ 0\n[PROOFSTEP]\nrw [Ne.def, Ne.def, ← not_or, ← mul_eq_zero, ← hab]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nu : Rˣ\nh1 : ↑C (c * d) * (↑C ↑u * primPart (integerNormalization R⁰ b) * primPart (integerNormalization R⁰ a)) = ↑C (c * d) * p\nhu : c * d * ↑u = content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)\n⊢ ¬map (algebraMap R K) p = 0\n[PROOFSTEP]\nintro con\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nu : Rˣ\nh1 : ↑C (c * d) * (↑C ↑u * primPart (integerNormalization R⁰ b) * primPart (integerNormalization R⁰ a)) = ↑C (c * d) * p\nhu : c * d * ↑u = content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)\ncon : map (algebraMap R K) p = 0\n⊢ False\n[PROOFSTEP]\napply hp.ne_zero (map_injective (algebraMap R K) (IsFractionRing.injective _ _) _)\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nu : Rˣ\nh1 : ↑C (c * d) * (↑C ↑u * primPart (integerNormalization R⁰ b) * primPart (integerNormalization R⁰ a)) = ↑C (c * d) * p\nhu : c * d * ↑u = content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)\ncon : map (algebraMap R K) p = 0\n⊢ map (algebraMap R K) p = map (algebraMap R K) 0\n[PROOFSTEP]\nsimp [con]\n[GOAL]\ncase intro.mk.intro.mk.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nu : Rˣ\nh1 : ↑C (c * d) * (↑C ↑u * primPart (integerNormalization R⁰ b) * primPart (integerNormalization R⁰ a)) = ↑C (c * d) * p\nhu : c * d * ↑u = content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)\nh0 : a ≠ 0 ∧ b ≠ 0\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nrcases hi.isUnit_or_isUnit (mul_left_cancel₀ hcd0 h1).symm with (h | h)\n[GOAL]\ncase intro.mk.intro.mk.intro.inl\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nu : Rˣ\nh1 : ↑C (c * d) * (↑C ↑u * primPart (integerNormalization R⁰ b) * primPart (integerNormalization R⁰ a)) = ↑C (c * d) * p\nhu : c * d * ↑u = content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)\nh0 : a ≠ 0 ∧ b ≠ 0\nh : IsUnit (↑C ↑u * primPart (integerNormalization R⁰ b))\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nright\n[GOAL]\ncase intro.mk.intro.mk.intro.inl.h\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nu : Rˣ\nh1 : ↑C (c * d) * (↑C ↑u * primPart (integerNormalization R⁰ b) * primPart (integerNormalization R⁰ a)) = ↑C (c * d) * p\nhu : c * d * ↑u = content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)\nh0 : a ≠ 0 ∧ b ≠ 0\nh : IsUnit (↑C ↑u * primPart (integerNormalization R⁰ b))\n⊢ IsUnit b\n[PROOFSTEP]\napply isUnit_or_eq_zero_of_isUnit_integerNormalization_primPart h0.2 (isUnit_of_mul_isUnit_right h)\n[GOAL]\ncase intro.mk.intro.mk.intro.inr\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nu : Rˣ\nh1 : ↑C (c * d) * (↑C ↑u * primPart (integerNormalization R⁰ b) * primPart (integerNormalization R⁰ a)) = ↑C (c * d) * p\nhu : c * d * ↑u = content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)\nh0 : a ≠ 0 ∧ b ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ a))\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nleft\n[GOAL]\ncase intro.mk.intro.mk.intro.inr.h\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np : R[X]\nhp : IsPrimitive p\nhi : Irreducible p\na b : K[X]\nhab : map (algebraMap R K) p = a * b\nc : R\nc0 : c ≠ 0\nhc : map (algebraMap R K) (integerNormalization R⁰ a) = ↑C (↑(algebraMap R K) c) * a\nd : R\nd0 : d ≠ 0\nhd : map (algebraMap R K) (integerNormalization R⁰ b) = ↑C (↑(algebraMap R K) d) * b\nhcd0 : ¬↑C (c * d) = 0\nu : Rˣ\nh1 : ↑C (c * d) * (↑C ↑u * primPart (integerNormalization R⁰ b) * primPart (integerNormalization R⁰ a)) = ↑C (c * d) * p\nhu : c * d * ↑u = content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)\nh0 : a ≠ 0 ∧ b ≠ 0\nh : IsUnit (primPart (integerNormalization R⁰ a))\n⊢ IsUnit a\n[PROOFSTEP]\napply isUnit_or_eq_zero_of_isUnit_integerNormalization_primPart h0.1 h\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nh_dvd : map (algebraMap R K) p ∣ map (algebraMap R K) q\n⊢ p ∣ q\n[PROOFSTEP]\nrcases h_dvd with ⟨r, hr⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\n⊢ p ∣ q\n[PROOFSTEP]\nobtain ⟨⟨s, s0⟩, hs⟩ := integerNormalization_map_to_map R⁰ r\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑{ val := s, property := s0 } • r\n⊢ p ∣ q\n[PROOFSTEP]\nrw [Subtype.coe_mk, Algebra.smul_def, algebraMap_apply] at hs \n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\n⊢ p ∣ q\n[PROOFSTEP]\nhave h : p ∣ q * C s := by\n  use integerNormalization R⁰ r\n  apply map_injective (algebraMap R K) (IsFractionRing.injective _ _)\n  rw [Polynomial.map_mul, Polynomial.map_mul, hs, hr, mul_assoc, mul_comm r]\n  simp\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\n⊢ p ∣ q * ↑C s\n[PROOFSTEP]\nuse integerNormalization R⁰ r\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\n⊢ q * ↑C s = p * integerNormalization R⁰ r\n[PROOFSTEP]\napply map_injective (algebraMap R K) (IsFractionRing.injective _ _)\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\n⊢ map (algebraMap R K) (q * ↑C s) = map (algebraMap R K) (p * integerNormalization R⁰ r)\n[PROOFSTEP]\nrw [Polynomial.map_mul, Polynomial.map_mul, hs, hr, mul_assoc, mul_comm r]\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\n⊢ map (algebraMap R K) p * (map (algebraMap R K) (↑C s) * r) = map (algebraMap R K) p * (↑C (↑(algebraMap R K) s) * r)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * ↑C s\n⊢ p ∣ q\n[PROOFSTEP]\nrw [← hp.dvd_primPart_iff_dvd, primPart_mul, hq.primPart_eq, Associated.dvd_iff_dvd_right] at h \n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh✝ : p ∣ q * primPart (↑C s)\nh : p ∣ ?m.732534\n⊢ p ∣ q\n[PROOFSTEP]\nexact h\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * primPart (↑C s)\n⊢ Associated (q * primPart (↑C s)) q\n[PROOFSTEP]\nsymm\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * primPart (↑C s)\n⊢ Associated q (q * primPart (↑C s))\n[PROOFSTEP]\nrcases isUnit_primPart_C s with ⟨u, hu⟩\n[GOAL]\ncase intro.intro.mk.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * primPart (↑C s)\nu : R[X]ˣ\nhu : ↑u = primPart (↑C s)\n⊢ Associated q (q * primPart (↑C s))\n[PROOFSTEP]\nuse u\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * primPart (↑C s)\nu : R[X]ˣ\nhu : ↑u = primPart (↑C s)\n⊢ q * ↑u = q * primPart (↑C s)\n[PROOFSTEP]\nrw [hu]\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ primPart (q * ↑C s)\n⊢ q * ↑C s ≠ 0\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * ↑C s\n⊢ q * ↑C s ≠ 0\n[PROOFSTEP]\niterate 2 \n  apply mul_ne_zero hq.ne_zero\n  rw [Ne.def, C_eq_zero]\n  contrapose! s0\n  simp [s0, mem_nonZeroDivisors_iff_ne_zero]\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ primPart (q * ↑C s)\n⊢ q * ↑C s ≠ 0\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * ↑C s\n⊢ q * ↑C s ≠ 0\n[PROOFSTEP]\napply mul_ne_zero hq.ne_zero\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ primPart (q * ↑C s)\n⊢ ↑C s ≠ 0\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * ↑C s\n⊢ q * ↑C s ≠ 0\n[PROOFSTEP]\nrw [Ne.def, C_eq_zero]\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ primPart (q * ↑C s)\n⊢ ¬s = 0\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * ↑C s\n⊢ q * ↑C s ≠ 0\n[PROOFSTEP]\ncontrapose! s0\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ primPart (q * ↑C s)\ns0 : s = 0\n⊢ ¬s ∈ R⁰\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * ↑C s\n⊢ q * ↑C s ≠ 0\n[PROOFSTEP]\nsimp [s0, mem_nonZeroDivisors_iff_ne_zero]\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * ↑C s\n⊢ q * ↑C s ≠ 0\n[PROOFSTEP]\napply mul_ne_zero hq.ne_zero\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * ↑C s\n⊢ ↑C s ≠ 0\n[PROOFSTEP]\nrw [Ne.def, C_eq_zero]\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\ns0 : s ∈ R⁰\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * ↑C s\n⊢ ¬s = 0\n[PROOFSTEP]\ncontrapose! s0\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nK : Type u_2\ninst✝⁴ : Field K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : IsDomain R\ninst✝ : NormalizedGCDMonoid R\np q : R[X]\nhp : IsPrimitive p\nhq : IsPrimitive q\nr : K[X]\nhr : map (algebraMap R K) q = map (algebraMap R K) p * r\ns : R\nhs : map (algebraMap R K) (integerNormalization R⁰ r) = ↑C (↑(algebraMap R K) s) * r\nh : p ∣ q * ↑C s\ns0 : s = 0\n⊢ ¬s ∈ R⁰\n[PROOFSTEP]\nsimp [s0, mem_nonZeroDivisors_iff_ne_zero]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.GaussLemma", "llama_tokens": 37952, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7279754489059774, "lm_q2_score": 0.4882833952958347, "lm_q1q2_score": 0.3554583238838201}}
{"text": "[GOAL]\nR : Type u_1\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\np : R[X]\n⊢ Continuous fun x => eval x p\n[PROOFSTEP]\ncontinuity\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\np : R[X]\nX : Set R\n⊢ Continuous ↑(toContinuousMap p)\n[PROOFSTEP]\ncontinuity\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\np : R[X]\nX : Set R\n⊢ Continuous fun x => ↑x\n[PROOFSTEP]\ncontinuity\n[GOAL]\nR : Type u_1\nα : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ng : R[X]\nf : C(α, R)\nx : α\n⊢ ↑(↑(aeval f) g) x = eval (↑f x) g\n[PROOFSTEP]\nrefine' Polynomial.induction_on' g _ _\n[GOAL]\ncase refine'_1\nR : Type u_1\nα : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ng : R[X]\nf : C(α, R)\nx : α\n⊢ ∀ (p q : R[X]),\n    ↑(↑(aeval f) p) x = eval (↑f x) p →\n      ↑(↑(aeval f) q) x = eval (↑f x) q → ↑(↑(aeval f) (p + q)) x = eval (↑f x) (p + q)\n[PROOFSTEP]\nintro p q hp hq\n[GOAL]\ncase refine'_1\nR : Type u_1\nα : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ng : R[X]\nf : C(α, R)\nx : α\np q : R[X]\nhp : ↑(↑(aeval f) p) x = eval (↑f x) p\nhq : ↑(↑(aeval f) q) x = eval (↑f x) q\n⊢ ↑(↑(aeval f) (p + q)) x = eval (↑f x) (p + q)\n[PROOFSTEP]\nsimp [hp, hq]\n[GOAL]\ncase refine'_2\nR : Type u_1\nα : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ng : R[X]\nf : C(α, R)\nx : α\n⊢ ∀ (n : ℕ) (a : R), ↑(↑(aeval f) (↑(monomial n) a)) x = eval (↑f x) (↑(monomial n) a)\n[PROOFSTEP]\nintro n a\n[GOAL]\ncase refine'_2\nR : Type u_1\nα : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ng : R[X]\nf : C(α, R)\nx : α\nn : ℕ\na : R\n⊢ ↑(↑(aeval f) (↑(monomial n) a)) x = eval (↑f x) (↑(monomial n) a)\n[PROOFSTEP]\nsimp [Pi.pow_apply]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\n⊢ (fun p => toContinuousMap p) 1 = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na✝ : R\n⊢ ↑((fun p => toContinuousMap p) 1) a✝ = ↑1 a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nx✝¹ x✝ : R[X]\n⊢ OneHom.toFun { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n      (x✝¹ * x✝) =\n    OneHom.toFun { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) } x✝¹ *\n      OneHom.toFun { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) } x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nx✝¹ x✝ : R[X]\na✝ : R\n⊢ ↑(OneHom.toFun { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n          (x✝¹ * x✝))\n      a✝ =\n    ↑(OneHom.toFun { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) } x✝¹ *\n          OneHom.toFun { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) } x✝)\n      a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x x_1 : R[X]),\n                OneHom.toFun\n                    { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                    (x * x_1) =\n                  OneHom.toFun\n                      { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) } x *\n                    OneHom.toFun\n                      { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                      x_1) })\n      0 =\n    0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na✝ : R\n⊢ ↑(OneHom.toFun\n          (↑{ toOneHom := { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x x_1 : R[X]),\n                    OneHom.toFun\n                        { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                        (x * x_1) =\n                      OneHom.toFun\n                          { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                          x *\n                        OneHom.toFun\n                          { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                          x_1) })\n          0)\n      a✝ =\n    ↑0 a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nx✝¹ x✝ : R[X]\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x x_1 : R[X]),\n                OneHom.toFun\n                    { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                    (x * x_1) =\n                  OneHom.toFun\n                      { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) } x *\n                    OneHom.toFun\n                      { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                      x_1) })\n      (x✝¹ + x✝) =\n    OneHom.toFun\n        (↑{ toOneHom := { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x x_1 : R[X]),\n                  OneHom.toFun\n                      { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                      (x * x_1) =\n                    OneHom.toFun\n                        { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                        x_1) })\n        x✝¹ +\n      OneHom.toFun\n        (↑{ toOneHom := { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x x_1 : R[X]),\n                  OneHom.toFun\n                      { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                      (x * x_1) =\n                    OneHom.toFun\n                        { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                        x_1) })\n        x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nx✝¹ x✝ : R[X]\na✝ : R\n⊢ ↑(OneHom.toFun\n          (↑{ toOneHom := { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x x_1 : R[X]),\n                    OneHom.toFun\n                        { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                        (x * x_1) =\n                      OneHom.toFun\n                          { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                          x *\n                        OneHom.toFun\n                          { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                          x_1) })\n          (x✝¹ + x✝))\n      a✝ =\n    ↑(OneHom.toFun\n            (↑{\n                toOneHom :=\n                  { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x x_1 : R[X]),\n                      OneHom.toFun\n                          { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                          (x * x_1) =\n                        OneHom.toFun\n                            { toFun := fun p => toContinuousMap p,\n                              map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                            x *\n                          OneHom.toFun\n                            { toFun := fun p => toContinuousMap p,\n                              map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                            x_1) })\n            x✝¹ +\n          OneHom.toFun\n            (↑{\n                toOneHom :=\n                  { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x x_1 : R[X]),\n                      OneHom.toFun\n                          { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                          (x * x_1) =\n                        OneHom.toFun\n                            { toFun := fun p => toContinuousMap p,\n                              map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                            x *\n                          OneHom.toFun\n                            { toFun := fun p => toContinuousMap p,\n                              map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                            x_1) })\n            x✝)\n      a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nx✝ : R\n⊢ OneHom.toFun\n      (↑↑{\n            toMonoidHom :=\n              {\n                toOneHom :=\n                  { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x x_1 : R[X]),\n                      OneHom.toFun\n                          { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                          (x * x_1) =\n                        OneHom.toFun\n                            { toFun := fun p => toContinuousMap p,\n                              map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                            x *\n                          OneHom.toFun\n                            { toFun := fun p => toContinuousMap p,\n                              map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                            x_1) },\n            map_zero' :=\n              (_ :\n                OneHom.toFun\n                    (↑{\n                        toOneHom :=\n                          { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (x x_1 : R[X]),\n                              OneHom.toFun\n                                  { toFun := fun p => toContinuousMap p,\n                                    map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                  (x * x_1) =\n                                OneHom.toFun\n                                    { toFun := fun p => toContinuousMap p,\n                                      map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                    x *\n                                  OneHom.toFun\n                                    { toFun := fun p => toContinuousMap p,\n                                      map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                    x_1) })\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (x x_1 : R[X]),\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun p => toContinuousMap p,\n                              map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (x x_2 : R[X]),\n                                OneHom.toFun\n                                    { toFun := fun p => toContinuousMap p,\n                                      map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                    (x * x_2) =\n                                  OneHom.toFun\n                                      { toFun := fun p => toContinuousMap p,\n                                        map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                      x *\n                                    OneHom.toFun\n                                      { toFun := fun p => toContinuousMap p,\n                                        map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                      x_2) })\n                      (x + x_1) =\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p => toContinuousMap p,\n                                map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x x_2 : R[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p => toContinuousMap p,\n                                        map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                      (x * x_2) =\n                                    OneHom.toFun\n                                        { toFun := fun p => toContinuousMap p,\n                                          map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        { toFun := fun p => toContinuousMap p,\n                                          map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                        x_2) })\n                        x +\n                      OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p => toContinuousMap p,\n                                map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x x_2 : R[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p => toContinuousMap p,\n                                        map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                      (x * x_2) =\n                                    OneHom.toFun\n                                        { toFun := fun p => toContinuousMap p,\n                                          map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        { toFun := fun p => toContinuousMap p,\n                                          map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                        x_2) })\n                        x_1) })\n      (↑(algebraMap R R[X]) x✝) =\n    ↑(algebraMap R C(R, R)) x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nx✝ a✝ : R\n⊢ ↑(OneHom.toFun\n          (↑↑{\n                toMonoidHom :=\n                  {\n                    toOneHom :=\n                      { toFun := fun p => toContinuousMap p, map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n                    map_mul' :=\n                      (_ :\n                        ∀ (x x_1 : R[X]),\n                          OneHom.toFun\n                              { toFun := fun p => toContinuousMap p,\n                                map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                              (x * x_1) =\n                            OneHom.toFun\n                                { toFun := fun p => toContinuousMap p,\n                                  map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                x *\n                              OneHom.toFun\n                                { toFun := fun p => toContinuousMap p,\n                                  map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                x_1) },\n                map_zero' :=\n                  (_ :\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p => toContinuousMap p,\n                                map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x x_1 : R[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p => toContinuousMap p,\n                                        map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                      (x * x_1) =\n                                    OneHom.toFun\n                                        { toFun := fun p => toContinuousMap p,\n                                          map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        { toFun := fun p => toContinuousMap p,\n                                          map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                        x_1) })\n                        0 =\n                      0),\n                map_add' :=\n                  (_ :\n                    ∀ (x x_1 : R[X]),\n                      OneHom.toFun\n                          (↑{\n                              toOneHom :=\n                                { toFun := fun p => toContinuousMap p,\n                                  map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (x x_2 : R[X]),\n                                    OneHom.toFun\n                                        { toFun := fun p => toContinuousMap p,\n                                          map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                        (x * x_2) =\n                                      OneHom.toFun\n                                          { toFun := fun p => toContinuousMap p,\n                                            map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                          x *\n                                        OneHom.toFun\n                                          { toFun := fun p => toContinuousMap p,\n                                            map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                          x_2) })\n                          (x + x_1) =\n                        OneHom.toFun\n                            (↑{\n                                toOneHom :=\n                                  { toFun := fun p => toContinuousMap p,\n                                    map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (x x_2 : R[X]),\n                                      OneHom.toFun\n                                          { toFun := fun p => toContinuousMap p,\n                                            map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                          (x * x_2) =\n                                        OneHom.toFun\n                                            { toFun := fun p => toContinuousMap p,\n                                              map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                            x *\n                                          OneHom.toFun\n                                            { toFun := fun p => toContinuousMap p,\n                                              map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                            x_2) })\n                            x +\n                          OneHom.toFun\n                            (↑{\n                                toOneHom :=\n                                  { toFun := fun p => toContinuousMap p,\n                                    map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (x x_2 : R[X]),\n                                      OneHom.toFun\n                                          { toFun := fun p => toContinuousMap p,\n                                            map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                          (x * x_2) =\n                                        OneHom.toFun\n                                            { toFun := fun p => toContinuousMap p,\n                                              map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                            x *\n                                          OneHom.toFun\n                                            { toFun := fun p => toContinuousMap p,\n                                              map_one' := (_ : (fun p => toContinuousMap p) 1 = 1) }\n                                            x_2) })\n                            x_1) })\n          (↑(algebraMap R R[X]) x✝))\n      a✝ =\n    ↑(↑(algebraMap R C(R, R)) x✝) a✝\n[PROOFSTEP]\nsimp [Algebra.algebraMap_eq_smul_one]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\n⊢ (fun p => toContinuousMapOn p X) 1 = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\na✝ : ↑X\n⊢ ↑((fun p => toContinuousMapOn p X) 1) a✝ = ↑1 a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\nx✝¹ x✝ : R[X]\n⊢ OneHom.toFun { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n      (x✝¹ * x✝) =\n    OneHom.toFun { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n        x✝¹ *\n      OneHom.toFun { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n        x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\nx✝¹ x✝ : R[X]\na✝ : ↑X\n⊢ ↑(OneHom.toFun { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n          (x✝¹ * x✝))\n      a✝ =\n    ↑(OneHom.toFun { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n            x✝¹ *\n          OneHom.toFun\n            { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) } x✝)\n      a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x x_1 : R[X]),\n                OneHom.toFun\n                    { toFun := fun p => toContinuousMapOn p X,\n                      map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                    (x * x_1) =\n                  OneHom.toFun\n                      { toFun := fun p => toContinuousMapOn p X,\n                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := fun p => toContinuousMapOn p X,\n                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                      x_1) })\n      0 =\n    0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\na✝ : ↑X\n⊢ ↑(OneHom.toFun\n          (↑{\n              toOneHom :=\n                { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x x_1 : R[X]),\n                    OneHom.toFun\n                        { toFun := fun p => toContinuousMapOn p X,\n                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                        (x * x_1) =\n                      OneHom.toFun\n                          { toFun := fun p => toContinuousMapOn p X,\n                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                          x *\n                        OneHom.toFun\n                          { toFun := fun p => toContinuousMapOn p X,\n                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                          x_1) })\n          0)\n      a✝ =\n    ↑0 a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\nx✝¹ x✝ : R[X]\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x x_1 : R[X]),\n                OneHom.toFun\n                    { toFun := fun p => toContinuousMapOn p X,\n                      map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                    (x * x_1) =\n                  OneHom.toFun\n                      { toFun := fun p => toContinuousMapOn p X,\n                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := fun p => toContinuousMapOn p X,\n                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                      x_1) })\n      (x✝¹ + x✝) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x x_1 : R[X]),\n                  OneHom.toFun\n                      { toFun := fun p => toContinuousMapOn p X,\n                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                      (x * x_1) =\n                    OneHom.toFun\n                        { toFun := fun p => toContinuousMapOn p X,\n                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := fun p => toContinuousMapOn p X,\n                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                        x_1) })\n        x✝¹ +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x x_1 : R[X]),\n                  OneHom.toFun\n                      { toFun := fun p => toContinuousMapOn p X,\n                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                      (x * x_1) =\n                    OneHom.toFun\n                        { toFun := fun p => toContinuousMapOn p X,\n                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := fun p => toContinuousMapOn p X,\n                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                        x_1) })\n        x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\nx✝¹ x✝ : R[X]\na✝ : ↑X\n⊢ ↑(OneHom.toFun\n          (↑{\n              toOneHom :=\n                { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x x_1 : R[X]),\n                    OneHom.toFun\n                        { toFun := fun p => toContinuousMapOn p X,\n                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                        (x * x_1) =\n                      OneHom.toFun\n                          { toFun := fun p => toContinuousMapOn p X,\n                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                          x *\n                        OneHom.toFun\n                          { toFun := fun p => toContinuousMapOn p X,\n                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                          x_1) })\n          (x✝¹ + x✝))\n      a✝ =\n    ↑(OneHom.toFun\n            (↑{\n                toOneHom :=\n                  { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x x_1 : R[X]),\n                      OneHom.toFun\n                          { toFun := fun p => toContinuousMapOn p X,\n                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                          (x * x_1) =\n                        OneHom.toFun\n                            { toFun := fun p => toContinuousMapOn p X,\n                              map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                            x *\n                          OneHom.toFun\n                            { toFun := fun p => toContinuousMapOn p X,\n                              map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                            x_1) })\n            x✝¹ +\n          OneHom.toFun\n            (↑{\n                toOneHom :=\n                  { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x x_1 : R[X]),\n                      OneHom.toFun\n                          { toFun := fun p => toContinuousMapOn p X,\n                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                          (x * x_1) =\n                        OneHom.toFun\n                            { toFun := fun p => toContinuousMapOn p X,\n                              map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                            x *\n                          OneHom.toFun\n                            { toFun := fun p => toContinuousMapOn p X,\n                              map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                            x_1) })\n            x✝)\n      a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\nx✝ : R\n⊢ OneHom.toFun\n      (↑↑{\n            toMonoidHom :=\n              {\n                toOneHom :=\n                  { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x x_1 : R[X]),\n                      OneHom.toFun\n                          { toFun := fun p => toContinuousMapOn p X,\n                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                          (x * x_1) =\n                        OneHom.toFun\n                            { toFun := fun p => toContinuousMapOn p X,\n                              map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                            x *\n                          OneHom.toFun\n                            { toFun := fun p => toContinuousMapOn p X,\n                              map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                            x_1) },\n            map_zero' :=\n              (_ :\n                OneHom.toFun\n                    (↑{\n                        toOneHom :=\n                          { toFun := fun p => toContinuousMapOn p X,\n                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (x x_1 : R[X]),\n                              OneHom.toFun\n                                  { toFun := fun p => toContinuousMapOn p X,\n                                    map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                  (x * x_1) =\n                                OneHom.toFun\n                                    { toFun := fun p => toContinuousMapOn p X,\n                                      map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                    x *\n                                  OneHom.toFun\n                                    { toFun := fun p => toContinuousMapOn p X,\n                                      map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                    x_1) })\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (x x_1 : R[X]),\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun p => toContinuousMapOn p X,\n                              map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (x x_2 : R[X]),\n                                OneHom.toFun\n                                    { toFun := fun p => toContinuousMapOn p X,\n                                      map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                    (x * x_2) =\n                                  OneHom.toFun\n                                      { toFun := fun p => toContinuousMapOn p X,\n                                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                      x *\n                                    OneHom.toFun\n                                      { toFun := fun p => toContinuousMapOn p X,\n                                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                      x_2) })\n                      (x + x_1) =\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p => toContinuousMapOn p X,\n                                map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x x_2 : R[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p => toContinuousMapOn p X,\n                                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                      (x * x_2) =\n                                    OneHom.toFun\n                                        { toFun := fun p => toContinuousMapOn p X,\n                                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        { toFun := fun p => toContinuousMapOn p X,\n                                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                        x_2) })\n                        x +\n                      OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p => toContinuousMapOn p X,\n                                map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x x_2 : R[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p => toContinuousMapOn p X,\n                                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                      (x * x_2) =\n                                    OneHom.toFun\n                                        { toFun := fun p => toContinuousMapOn p X,\n                                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        { toFun := fun p => toContinuousMapOn p X,\n                                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                        x_2) })\n                        x_1) })\n      (↑(algebraMap R R[X]) x✝) =\n    ↑(algebraMap R C(↑X, R)) x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\nx✝ : R\na✝ : ↑X\n⊢ ↑(OneHom.toFun\n          (↑↑{\n                toMonoidHom :=\n                  {\n                    toOneHom :=\n                      { toFun := fun p => toContinuousMapOn p X,\n                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n                    map_mul' :=\n                      (_ :\n                        ∀ (x x_1 : R[X]),\n                          OneHom.toFun\n                              { toFun := fun p => toContinuousMapOn p X,\n                                map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                              (x * x_1) =\n                            OneHom.toFun\n                                { toFun := fun p => toContinuousMapOn p X,\n                                  map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                x *\n                              OneHom.toFun\n                                { toFun := fun p => toContinuousMapOn p X,\n                                  map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                x_1) },\n                map_zero' :=\n                  (_ :\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun p => toContinuousMapOn p X,\n                                map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x x_1 : R[X]),\n                                  OneHom.toFun\n                                      { toFun := fun p => toContinuousMapOn p X,\n                                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                      (x * x_1) =\n                                    OneHom.toFun\n                                        { toFun := fun p => toContinuousMapOn p X,\n                                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        { toFun := fun p => toContinuousMapOn p X,\n                                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                        x_1) })\n                        0 =\n                      0),\n                map_add' :=\n                  (_ :\n                    ∀ (x x_1 : R[X]),\n                      OneHom.toFun\n                          (↑{\n                              toOneHom :=\n                                { toFun := fun p => toContinuousMapOn p X,\n                                  map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n                              map_mul' :=\n                                (_ :\n                                  ∀ (x x_2 : R[X]),\n                                    OneHom.toFun\n                                        { toFun := fun p => toContinuousMapOn p X,\n                                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                        (x * x_2) =\n                                      OneHom.toFun\n                                          { toFun := fun p => toContinuousMapOn p X,\n                                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                          x *\n                                        OneHom.toFun\n                                          { toFun := fun p => toContinuousMapOn p X,\n                                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                          x_2) })\n                          (x + x_1) =\n                        OneHom.toFun\n                            (↑{\n                                toOneHom :=\n                                  { toFun := fun p => toContinuousMapOn p X,\n                                    map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (x x_2 : R[X]),\n                                      OneHom.toFun\n                                          { toFun := fun p => toContinuousMapOn p X,\n                                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                          (x * x_2) =\n                                        OneHom.toFun\n                                            { toFun := fun p => toContinuousMapOn p X,\n                                              map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                            x *\n                                          OneHom.toFun\n                                            { toFun := fun p => toContinuousMapOn p X,\n                                              map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                            x_2) })\n                            x +\n                          OneHom.toFun\n                            (↑{\n                                toOneHom :=\n                                  { toFun := fun p => toContinuousMapOn p X,\n                                    map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },\n                                map_mul' :=\n                                  (_ :\n                                    ∀ (x x_2 : R[X]),\n                                      OneHom.toFun\n                                          { toFun := fun p => toContinuousMapOn p X,\n                                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                          (x * x_2) =\n                                        OneHom.toFun\n                                            { toFun := fun p => toContinuousMapOn p X,\n                                              map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                            x *\n                                          OneHom.toFun\n                                            { toFun := fun p => toContinuousMapOn p X,\n                                              map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }\n                                            x_2) })\n                            x_1) })\n          (↑(algebraMap R R[X]) x✝))\n      a✝ =\n    ↑(↑(algebraMap R C(↑X, R)) x✝) a✝\n[PROOFSTEP]\nsimp [Algebra.algebraMap_eq_smul_one]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\n⊢ ↑(polynomialFunctions X) = Set.range ↑(toContinuousMapOnAlgHom X)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\nx✝ : C(↑X, R)\n⊢ x✝ ∈ ↑(polynomialFunctions X) ↔ x✝ ∈ Set.range ↑(toContinuousMapOnAlgHom X)\n[PROOFSTEP]\nsimp [polynomialFunctions]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\nx y : ↑X\nh : x ≠ y\n⊢ ∃ f, f ∈ (fun f => ↑f) '' ↑(polynomialFunctions X) ∧ f x ≠ f y\n[PROOFSTEP]\nrefine' ⟨_, ⟨⟨_, ⟨⟨Polynomial.X, ⟨Algebra.mem_top, rfl⟩⟩, rfl⟩⟩, _⟩⟩\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\nx y : ↑X\nh : x ≠ y\n⊢ (fun f => ↑f) (↑↑(toContinuousMapOnAlgHom X) Polynomial.X) x ≠\n    (fun f => ↑f) (↑↑(toContinuousMapOnAlgHom X) Polynomial.X) y\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\nx y : ↑X\nh : x ≠ y\n⊢ ¬eval (↑x) Polynomial.X = eval (↑y) Polynomial.X\n[PROOFSTEP]\nsimp only [Polynomial.eval_X]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\nX : Set R\nx y : ↑X\nh : x ≠ y\n⊢ ¬↑x = ↑y\n[PROOFSTEP]\nexact fun h' => h (Subtype.ext h')\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\n⊢ Subalgebra.comap (compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h))))\n      (polynomialFunctions I) =\n    polynomialFunctions (Set.Icc a b)\n[PROOFSTEP]\next f\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\n⊢ f ∈\n      Subalgebra.comap (compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h))))\n        (polynomialFunctions I) ↔\n    f ∈ polynomialFunctions (Set.Icc a b)\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\n⊢ f ∈\n      Subalgebra.comap (compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h))))\n        (polynomialFunctions I) →\n    f ∈ polynomialFunctions (Set.Icc a b)\n[PROOFSTEP]\nrintro ⟨p, ⟨-, w⟩⟩\n[GOAL]\ncase h.mp.intro.intro\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\n⊢ f ∈ polynomialFunctions (Set.Icc a b)\n[PROOFSTEP]\nrw [FunLike.ext_iff] at w \n[GOAL]\ncase h.mp.intro.intro\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw :\n  ∀ (x : ↑I),\n    ↑(↑↑(toContinuousMapOnAlgHom I) p) x =\n      ↑(↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f) x\n⊢ f ∈ polynomialFunctions (Set.Icc a b)\n[PROOFSTEP]\ndsimp at w \n[GOAL]\ncase h.mp.intro.intro\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\n⊢ f ∈ polynomialFunctions (Set.Icc a b)\n[PROOFSTEP]\nlet q := p.comp ((b - a)⁻¹ • Polynomial.X + Polynomial.C (-a * (b - a)⁻¹))\n[GOAL]\ncase h.mp.intro.intro\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\n⊢ f ∈ polynomialFunctions (Set.Icc a b)\n[PROOFSTEP]\nrefine' ⟨q, ⟨_, _⟩⟩\n[GOAL]\ncase h.mp.intro.intro.refine'_1\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\n⊢ q ∈ ↑⊤.toSubsemiring\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mp.intro.intro.refine'_2\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\n⊢ ↑↑(toContinuousMapOnAlgHom (Set.Icc a b)) q = f\n[PROOFSTEP]\next x\n[GOAL]\ncase h.mp.intro.intro.refine'_2.h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\n⊢ ↑(↑↑(toContinuousMapOnAlgHom (Set.Icc a b)) q) x = ↑f x\n[PROOFSTEP]\nsimp only [neg_mul, RingHom.map_neg, RingHom.map_mul, AlgHom.coe_toRingHom, Polynomial.eval_X, Polynomial.eval_neg,\n  Polynomial.eval_C, Polynomial.eval_smul, smul_eq_mul, Polynomial.eval_mul, Polynomial.eval_add,\n  Polynomial.coe_aeval_eq_eval, Polynomial.eval_comp, Polynomial.toContinuousMapOnAlgHom_apply,\n  Polynomial.toContinuousMapOn_apply, Polynomial.toContinuousMap_apply]\n[GOAL]\ncase h.mp.intro.intro.refine'_2.h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\n⊢ Polynomial.eval ((b - a)⁻¹ * ↑x + -(a * (b - a)⁻¹)) p = ↑f x\n[PROOFSTEP]\nconvert w ⟨_, _⟩\n[GOAL]\ncase h.e'_3.h.e'_6\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\n⊢ x =\n    ↑(Homeomorph.symm (iccHomeoI a b h))\n      { val := (b - a)⁻¹ * ↑x + -(a * (b - a)⁻¹), property := ?h.mp.intro.intro.refine'_2.h.convert_2 }\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_3.h.e'_6.a\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\n⊢ ↑x =\n    ↑(↑(Homeomorph.symm (iccHomeoI a b h))\n        { val := (b - a)⁻¹ * ↑x + -(a * (b - a)⁻¹), property := ?h.mp.intro.intro.refine'_2.h.convert_2 })\n[PROOFSTEP]\nsimp only [iccHomeoI_symm_apply_coe, Subtype.coe_mk]\n[GOAL]\ncase h.e'_3.h.e'_6.a\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\n⊢ ↑x = (b - a) * ((b - a)⁻¹ * ↑x + -(a * (b - a)⁻¹)) + a\n[PROOFSTEP]\nreplace h : b - a ≠ 0 := sub_ne_zero_of_ne h.ne.symm\n[GOAL]\ncase h.e'_3.h.e'_6.a\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh✝ : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h✝)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h✝)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\nh : b - a ≠ 0\n⊢ ↑x = (b - a) * ((b - a)⁻¹ * ↑x + -(a * (b - a)⁻¹)) + a\n[PROOFSTEP]\nsimp only [mul_add]\n[GOAL]\ncase h.e'_3.h.e'_6.a\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh✝ : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h✝)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h✝)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\nh : b - a ≠ 0\n⊢ ↑x = (b - a) * ((b - a)⁻¹ * ↑x) + (b - a) * -(a * (b - a)⁻¹) + a\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.e'_3.h.e'_6.a\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh✝ : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h✝)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h✝)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\nh : b - a ≠ 0\n⊢ ↑x * (b - a) = (b - a) * ↑x + -((b - a) * a) + a * (b - a)\n[PROOFSTEP]\nring\n[GOAL]\ncase h.mp.intro.intro.refine'_2.h.convert_2\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\n⊢ (b - a)⁻¹ * ↑x + -(a * (b - a)⁻¹) ∈ I\n[PROOFSTEP]\nchange _ + _ ∈ I\n[GOAL]\ncase h.mp.intro.intro.refine'_2.h.convert_2\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\n⊢ (b - a)⁻¹ * ↑x + -(a * (b - a)⁻¹) ∈ I\n[PROOFSTEP]\nrw [mul_comm (b - a)⁻¹, ← neg_mul, ← add_mul, ← sub_eq_add_neg]\n[GOAL]\ncase h.mp.intro.intro.refine'_2.h.convert_2\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\n⊢ (↑x - a) * (b - a)⁻¹ ∈ I\n[PROOFSTEP]\nhave w₁ : 0 < (b - a)⁻¹ := inv_pos.mpr (sub_pos.mpr h)\n[GOAL]\ncase h.mp.intro.intro.refine'_2.h.convert_2\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\nw₁ : 0 < (b - a)⁻¹\n⊢ (↑x - a) * (b - a)⁻¹ ∈ I\n[PROOFSTEP]\nhave w₂ : 0 ≤ (x : ℝ) - a := sub_nonneg.mpr x.2.1\n[GOAL]\ncase h.mp.intro.intro.refine'_2.h.convert_2\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\nw₁ : 0 < (b - a)⁻¹\nw₂ : 0 ≤ ↑x - a\n⊢ (↑x - a) * (b - a)⁻¹ ∈ I\n[PROOFSTEP]\nhave w₃ : (x : ℝ) - a ≤ b - a := sub_le_sub_right x.2.2 a\n[GOAL]\ncase h.mp.intro.intro.refine'_2.h.convert_2\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\nw₁ : 0 < (b - a)⁻¹\nw₂ : 0 ≤ ↑x - a\nw₃ : ↑x - a ≤ b - a\n⊢ (↑x - a) * (b - a)⁻¹ ∈ I\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase h.mp.intro.intro.refine'_2.h.convert_2.left\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\nw₁ : 0 < (b - a)⁻¹\nw₂ : 0 ≤ ↑x - a\nw₃ : ↑x - a ≤ b - a\n⊢ 0 ≤ (↑x - a) * (b - a)⁻¹\n[PROOFSTEP]\nexact mul_nonneg w₂ (le_of_lt w₁)\n[GOAL]\ncase h.mp.intro.intro.refine'_2.h.convert_2.right\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\nw₁ : 0 < (b - a)⁻¹\nw₂ : 0 ≤ ↑x - a\nw₃ : ↑x - a ≤ b - a\n⊢ (↑x - a) * (b - a)⁻¹ ≤ 1\n[PROOFSTEP]\nrw [← div_eq_mul_inv, div_le_one (sub_pos.mpr h)]\n[GOAL]\ncase h.mp.intro.intro.refine'_2.h.convert_2.right\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\np : ℝ[X]\nw✝ :\n  ↑↑(toContinuousMapOnAlgHom I) p =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h)))) f\nw : ∀ (x : ↑I), Polynomial.eval (↑x) p = ↑f (↑(Homeomorph.symm (iccHomeoI a b h)) x)\nq : ℝ[X] := Polynomial.comp p ((b - a)⁻¹ • X + ↑Polynomial.C (-a * (b - a)⁻¹))\nx : ↑(Set.Icc a b)\nw₁ : 0 < (b - a)⁻¹\nw₂ : 0 ≤ ↑x - a\nw₃ : ↑x - a ≤ b - a\n⊢ ↑x - a ≤ b - a\n[PROOFSTEP]\nexact w₃\n[GOAL]\ncase h.mpr\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\nf : C(↑(Set.Icc a b), ℝ)\n⊢ f ∈ polynomialFunctions (Set.Icc a b) →\n    f ∈\n      Subalgebra.comap (compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h))))\n        (polynomialFunctions I)\n[PROOFSTEP]\nrintro ⟨p, ⟨-, rfl⟩⟩\n[GOAL]\ncase h.mpr.intro.intro\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\np : ℝ[X]\n⊢ ↑↑(toContinuousMapOnAlgHom (Set.Icc a b)) p ∈\n    Subalgebra.comap (compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h))))\n      (polynomialFunctions I)\n[PROOFSTEP]\nlet q := p.comp ((b - a) • Polynomial.X + Polynomial.C a)\n[GOAL]\ncase h.mpr.intro.intro\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\np : ℝ[X]\nq : ℝ[X] := Polynomial.comp p ((b - a) • X + ↑Polynomial.C a)\n⊢ ↑↑(toContinuousMapOnAlgHom (Set.Icc a b)) p ∈\n    Subalgebra.comap (compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h))))\n      (polynomialFunctions I)\n[PROOFSTEP]\nrefine' ⟨q, ⟨_, _⟩⟩\n[GOAL]\ncase h.mpr.intro.intro.refine'_1\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\np : ℝ[X]\nq : ℝ[X] := Polynomial.comp p ((b - a) • X + ↑Polynomial.C a)\n⊢ q ∈ ↑⊤.toSubsemiring\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mpr.intro.intro.refine'_2\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\np : ℝ[X]\nq : ℝ[X] := Polynomial.comp p ((b - a) • X + ↑Polynomial.C a)\n⊢ ↑↑(toContinuousMapOnAlgHom I) q =\n    ↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h))))\n      (↑↑(toContinuousMapOnAlgHom (Set.Icc a b)) p)\n[PROOFSTEP]\next x\n[GOAL]\ncase h.mpr.intro.intro.refine'_2.h\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\na b : ℝ\nh : a < b\np : ℝ[X]\nq : ℝ[X] := Polynomial.comp p ((b - a) • X + ↑Polynomial.C a)\nx : ↑I\n⊢ ↑(↑↑(toContinuousMapOnAlgHom I) q) x =\n    ↑(↑↑(compRightAlgHom ℝ ℝ (Homeomorph.toContinuousMap (Homeomorph.symm (iccHomeoI a b h))))\n          (↑↑(toContinuousMapOnAlgHom (Set.Icc a b)) p))\n      x\n[PROOFSTEP]\nsimp [mul_comm]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set R\n⊢ polynomialFunctions s = Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n[PROOFSTEP]\nrefine le_antisymm ?_ (Algebra.adjoin_le fun _ h => ⟨X, trivial, (Set.mem_singleton_iff.1 h).symm⟩)\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set R\n⊢ polynomialFunctions s ≤ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n[PROOFSTEP]\nrintro - ⟨p, -, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set R\np : R[X]\n⊢ ↑↑(toContinuousMapOnAlgHom s) p ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n[PROOFSTEP]\nrw [AlgHom.coe_toRingHom]\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set R\np : R[X]\n⊢ ↑(toContinuousMapOnAlgHom s) p ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n[PROOFSTEP]\nrefine p.induction_on (fun r => ?_) (fun f g hf hg => ?_) fun n r hn => ?_\n[GOAL]\ncase intro.intro.refine_1\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set R\np : R[X]\nr : R\n⊢ ↑(toContinuousMapOnAlgHom s) (↑Polynomial.C r) ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n[PROOFSTEP]\nrw [Polynomial.C_eq_algebraMap, AlgHomClass.commutes]\n[GOAL]\ncase intro.intro.refine_1\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set R\np : R[X]\nr : R\n⊢ ↑(algebraMap R C(↑s, R)) r ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n[PROOFSTEP]\nexact Subalgebra.algebraMap_mem _ r\n[GOAL]\ncase intro.intro.refine_2\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set R\np f g : R[X]\nhf : ↑(toContinuousMapOnAlgHom s) f ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\nhg : ↑(toContinuousMapOnAlgHom s) g ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n⊢ ↑(toContinuousMapOnAlgHom s) (f + g) ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n[PROOFSTEP]\nrw [map_add]\n[GOAL]\ncase intro.intro.refine_2\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set R\np f g : R[X]\nhf : ↑(toContinuousMapOnAlgHom s) f ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\nhg : ↑(toContinuousMapOnAlgHom s) g ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n⊢ ↑(toContinuousMapOnAlgHom s) f + ↑(toContinuousMapOnAlgHom s) g ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n[PROOFSTEP]\nexact add_mem hf hg\n[GOAL]\ncase intro.intro.refine_3\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set R\np : R[X]\nn : ℕ\nr : R\nhn : ↑(toContinuousMapOnAlgHom s) (↑Polynomial.C r * X ^ n) ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n⊢ ↑(toContinuousMapOnAlgHom s) (↑Polynomial.C r * X ^ (n + 1)) ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n[PROOFSTEP]\nrw [pow_succ', ← mul_assoc, map_mul]\n[GOAL]\ncase intro.intro.refine_3\nR : Type u_1\ninst✝² : CommSemiring R\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSemiring R\ns : Set R\np : R[X]\nn : ℕ\nr : R\nhn : ↑(toContinuousMapOnAlgHom s) (↑Polynomial.C r * X ^ n) ∈ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n⊢ ↑(toContinuousMapOnAlgHom s) (↑Polynomial.C r * X ^ n) * ↑(toContinuousMapOnAlgHom s) X ∈\n    Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X}\n[PROOFSTEP]\nexact mul_mem hn (Algebra.subset_adjoin <| Set.mem_singleton _)\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\ninst✝³ : TopologicalSpace R\ninst✝² : TopologicalSemiring R\nA : Type u_2\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ns : Set R\nφ ψ : C(↑s, R) →ₐ[R] A\nh : ↑φ (↑(toContinuousMapOnAlgHom s) X) = ↑ψ (↑(toContinuousMapOnAlgHom s) X)\n⊢ polynomialFunctions s ≤ AlgHom.equalizer φ ψ\n[PROOFSTEP]\nrw [polynomialFunctions.eq_adjoin_X s]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\ninst✝³ : TopologicalSpace R\ninst✝² : TopologicalSemiring R\nA : Type u_2\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ns : Set R\nφ ψ : C(↑s, R) →ₐ[R] A\nh : ↑φ (↑(toContinuousMapOnAlgHom s) X) = ↑ψ (↑(toContinuousMapOnAlgHom s) X)\n⊢ Algebra.adjoin R {↑(toContinuousMapOnAlgHom s) X} ≤ AlgHom.equalizer φ ψ\n[PROOFSTEP]\nexact φ.adjoin_le_equalizer ψ fun x hx => (Set.mem_singleton_iff.1 hx).symm ▸ h\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\ninst✝³ : TopologicalSpace R\ninst✝² : TopologicalSemiring R\ninst✝¹ : StarRing R\ninst✝ : ContinuousStar R\ns : Set R\n⊢ Subalgebra.starClosure (polynomialFunctions s) = adjoin R {↑(toContinuousMapOnAlgHom s) X}\n[PROOFSTEP]\nrw [polynomialFunctions.eq_adjoin_X s, adjoin_eq_starClosure_adjoin]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommSemiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nA : Type u_2\ninst✝⁴ : StarRing R\ninst✝³ : ContinuousStar R\ninst✝² : Semiring A\ninst✝¹ : StarRing A\ninst✝ : Algebra R A\ns : Set R\nφ ψ : C(↑s, R) →⋆ₐ[R] A\nh : ↑φ (↑(toContinuousMapOnAlgHom s) X) = ↑ψ (↑(toContinuousMapOnAlgHom s) X)\n⊢ Subalgebra.starClosure (polynomialFunctions s) ≤ StarAlgHom.equalizer φ ψ\n[PROOFSTEP]\nrw [polynomialFunctions.starClosure_eq_adjoin_X s]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommSemiring R\ninst✝⁶ : TopologicalSpace R\ninst✝⁵ : TopologicalSemiring R\nA : Type u_2\ninst✝⁴ : StarRing R\ninst✝³ : ContinuousStar R\ninst✝² : Semiring A\ninst✝¹ : StarRing A\ninst✝ : Algebra R A\ns : Set R\nφ ψ : C(↑s, R) →⋆ₐ[R] A\nh : ↑φ (↑(toContinuousMapOnAlgHom s) X) = ↑ψ (↑(toContinuousMapOnAlgHom s) X)\n⊢ adjoin R {↑(toContinuousMapOnAlgHom s) X} ≤ StarAlgHom.equalizer φ ψ\n[PROOFSTEP]\nexact StarAlgHom.adjoin_le_equalizer φ ψ fun x hx => (Set.mem_singleton_iff.1 hx).symm ▸ h\n", "meta": {"mathlib_filename": "Mathlib.Topology.ContinuousFunction.Polynomial", "llama_tokens": 26381, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.689305616785446, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.35541970403431294}}
{"text": "[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx y : M\n⊢ (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n    (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n      (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y\n[PROOFSTEP]\nrw [← AlgHom.map_add]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx y : M\n⊢ (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n    ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R x + FreeAlgebra.ι R y)\n[PROOFSTEP]\nexact RingQuot.mkAlgHom_rel R Rel.add\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nr : R\nx : M\n⊢ AddHom.toFun\n      { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n        map_add' :=\n          (_ :\n            ∀ (x y : M),\n              (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                  (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) }\n      (r • x) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n          map_add' :=\n            (_ :\n              ∀ (x y : M),\n                (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                  (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                    (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) }\n        x\n[PROOFSTEP]\nrw [← AlgHom.map_smul]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nr : R\nx : M\n⊢ AddHom.toFun\n      { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n        map_add' :=\n          (_ :\n            ∀ (x y : M),\n              (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                  (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) }\n      (r • x) =\n    ↑(RingQuot.mkAlgHom R (Rel R M)) (↑(RingHom.id R) r • FreeAlgebra.ι R x)\n[PROOFSTEP]\nexact RingQuot.mkAlgHom_rel R Rel.smul\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\n⊢ ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m) = ↑(ι R) m\n[PROOFSTEP]\nrw [ι]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\n⊢ ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m) =\n    ↑{\n          toAddHom :=\n            { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n              map_add' :=\n                (_ :\n                  ∀ (x y : M),\n                    (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                      (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                        (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : M),\n                AddHom.toFun\n                    { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : M),\n                            (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                              (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                                (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) }\n                    (r • x) =\n                  ↑(RingHom.id R) r •\n                    AddHom.toFun\n                      { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : M),\n                              (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                                (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                                  (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) }\n                      x) }\n      m\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\nx y : FreeAlgebra R M\nh : Rel R M x y\n⊢ ↑(↑(FreeAlgebra.lift R) ↑f) x = ↑(↑(FreeAlgebra.lift R) ↑f) y\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase add\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\nx y : FreeAlgebra R M\na✝ b✝ : M\n⊢ ↑(↑(FreeAlgebra.lift R) ↑f) (FreeAlgebra.ι R (a✝ + b✝)) =\n    ↑(↑(FreeAlgebra.lift R) ↑f) (FreeAlgebra.ι R a✝ + FreeAlgebra.ι R b✝)\n[PROOFSTEP]\nsimp only [Algebra.smul_def, FreeAlgebra.lift_ι_apply, LinearMap.map_smulₛₗ, RingHom.id_apply, map_mul, AlgHom.commutes,\n  map_add]\n[GOAL]\ncase smul\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\nx y : FreeAlgebra R M\nr✝ : R\na✝ : M\n⊢ ↑(↑(FreeAlgebra.lift R) ↑f) (FreeAlgebra.ι R (r✝ • a✝)) =\n    ↑(↑(FreeAlgebra.lift R) ↑f) (↑(algebraMap R (FreeAlgebra R M)) r✝ * FreeAlgebra.ι R a✝)\n[PROOFSTEP]\nsimp only [Algebra.smul_def, FreeAlgebra.lift_ι_apply, LinearMap.map_smulₛₗ, RingHom.id_apply, map_mul, AlgHom.commutes,\n  map_add]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\n⊢ (fun F => LinearMap.comp (AlgHom.toLinearMap F) (ι R))\n      ((↑(RingQuot.liftAlgHom R) ∘ fun f =>\n          { val := ↑(FreeAlgebra.lift R) ↑f,\n            property :=\n              (_ :\n                ∀ (x y : FreeAlgebra R M),\n                  Rel R M x y → ↑(↑(FreeAlgebra.lift R) ↑f) x = ↑(↑(FreeAlgebra.lift R) ↑f) y) })\n        f) =\n    f\n[PROOFSTEP]\nrw [ι]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\n⊢ (fun F =>\n        LinearMap.comp (AlgHom.toLinearMap F)\n          {\n            toAddHom :=\n              { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : M),\n                      (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                        (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                          (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : M),\n                  AddHom.toFun\n                      { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : M),\n                              (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                                (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                                  (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) }\n                      (r • x) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : M),\n                                (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                                  (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                                    (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) }\n                        x) })\n      ((↑(RingQuot.liftAlgHom R) ∘ fun f =>\n          { val := ↑(FreeAlgebra.lift R) ↑f,\n            property :=\n              (_ :\n                ∀ (x y : FreeAlgebra R M),\n                  Rel R M x y → ↑(↑(FreeAlgebra.lift R) ↑f) x = ↑(↑(FreeAlgebra.lift R) ↑f) y) })\n        f) =\n    f\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\nx : M\n⊢ ↑((fun F =>\n            LinearMap.comp (AlgHom.toLinearMap F)\n              {\n                toAddHom :=\n                  { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : M),\n                          (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                            (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                              (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (x : M),\n                      AddHom.toFun\n                          { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : M),\n                                  (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                                    (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                                      (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) }\n                          (r • x) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : M),\n                                    (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                                      (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                                        (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) }\n                            x) })\n          ((↑(RingQuot.liftAlgHom R) ∘ fun f =>\n              { val := ↑(FreeAlgebra.lift R) ↑f,\n                property :=\n                  (_ :\n                    ∀ (x y : FreeAlgebra R M),\n                      Rel R M x y → ↑(↑(FreeAlgebra.lift R) ↑f) x = ↑(↑(FreeAlgebra.lift R) ↑f) y) })\n            f))\n      x =\n    ↑f x\n[PROOFSTEP]\nexact (RingQuot.liftAlgHom_mkAlgHom_apply _ _ _ _).trans (FreeAlgebra.lift_ι_apply f x)\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nF : TensorAlgebra R M →ₐ[R] A\nx : M\n⊢ (↑(AlgHom.comp\n            ((↑(RingQuot.liftAlgHom R) ∘ fun f =>\n                { val := ↑(FreeAlgebra.lift R) ↑f,\n                  property :=\n                    (_ :\n                      ∀ (x y : FreeAlgebra R M),\n                        Rel R M x y → ↑(↑(FreeAlgebra.lift R) ↑f) x = ↑(↑(FreeAlgebra.lift R) ↑f) y) })\n              ((fun F => LinearMap.comp (AlgHom.toLinearMap F) (ι R)) F))\n            (RingQuot.mkAlgHom R (Rel R M))) ∘\n        FreeAlgebra.ι R)\n      x =\n    (↑(AlgHom.comp F (RingQuot.mkAlgHom R (Rel R M))) ∘ FreeAlgebra.ι R) x\n[PROOFSTEP]\nrw [ι]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nF : TensorAlgebra R M →ₐ[R] A\nx : M\n⊢ (↑(AlgHom.comp\n            ((↑(RingQuot.liftAlgHom R) ∘ fun f =>\n                { val := ↑(FreeAlgebra.lift R) ↑f,\n                  property :=\n                    (_ :\n                      ∀ (x y : FreeAlgebra R M),\n                        Rel R M x y → ↑(↑(FreeAlgebra.lift R) ↑f) x = ↑(↑(FreeAlgebra.lift R) ↑f) y) })\n              ((fun F =>\n                  LinearMap.comp (AlgHom.toLinearMap F)\n                    {\n                      toAddHom :=\n                        { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : M),\n                                (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                                  (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                                    (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) },\n                      map_smul' :=\n                        (_ :\n                          ∀ (r : R) (x : M),\n                            AddHom.toFun\n                                { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (x y : M),\n                                        (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                                          (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                                            (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) }\n                                (r • x) =\n                              ↑(RingHom.id R) r •\n                                AddHom.toFun\n                                  { toFun := fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m),\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (x y : M),\n                                          (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) (x + y) =\n                                            (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) x +\n                                              (fun m => ↑(RingQuot.mkAlgHom R (Rel R M)) (FreeAlgebra.ι R m)) y) }\n                                  x) })\n                F))\n            (RingQuot.mkAlgHom R (Rel R M))) ∘\n        FreeAlgebra.ι R)\n      x =\n    (↑(AlgHom.comp F (RingQuot.mkAlgHom R (Rel R M))) ∘ FreeAlgebra.ι R) x\n[PROOFSTEP]\nexact (RingQuot.liftAlgHom_mkAlgHom_apply _ _ _ _).trans (FreeAlgebra.lift_ι_apply _ _)\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\n⊢ LinearMap.comp (AlgHom.toLinearMap (↑(lift R) f)) (ι R) = f\n[PROOFSTEP]\nconvert (lift R).symm_apply_apply f\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\nx : M\n⊢ ↑(↑(lift R) f) (↑(ι R) x) = ↑f x\n[PROOFSTEP]\nconv_rhs => rw [← ι_comp_lift f]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\nx : M\n| ↑f x\n[PROOFSTEP]\nrw [← ι_comp_lift f]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\nx : M\n| ↑f x\n[PROOFSTEP]\nrw [← ι_comp_lift f]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\nx : M\n| ↑f x\n[PROOFSTEP]\nrw [← ι_comp_lift f]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\ng : TensorAlgebra R M →ₐ[R] A\n⊢ LinearMap.comp (AlgHom.toLinearMap g) (ι R) = f ↔ g = ↑(lift R) f\n[PROOFSTEP]\nrw [← (lift R).symm_apply_eq]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf : M →ₗ[R] A\ng : TensorAlgebra R M →ₐ[R] A\n⊢ LinearMap.comp (AlgHom.toLinearMap g) (ι R) = f ↔ ↑(lift R).symm g = f\n[PROOFSTEP]\nsimp only [lift, Equiv.coe_fn_symm_mk]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ng : TensorAlgebra R M →ₐ[R] A\n⊢ ↑(lift R) (LinearMap.comp (AlgHom.toLinearMap g) (ι R)) = g\n[PROOFSTEP]\nrw [← lift_symm_apply]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ng : TensorAlgebra R M →ₐ[R] A\n⊢ ↑(lift R) (↑(lift R).symm g) = g\n[PROOFSTEP]\nexact (lift R).apply_symm_apply g\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf g : TensorAlgebra R M →ₐ[R] A\nw : LinearMap.comp (AlgHom.toLinearMap f) (ι R) = LinearMap.comp (AlgHom.toLinearMap g) (ι R)\n⊢ f = g\n[PROOFSTEP]\nrw [← lift_symm_apply, ← lift_symm_apply] at w \n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Type u_2\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nf g : TensorAlgebra R M →ₐ[R] A\nw : ↑(lift R).symm f = ↑(lift R).symm g\n⊢ f = g\n[PROOFSTEP]\nexact (lift R).symm.injective w\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nC : TensorAlgebra R M → Prop\nh_grade0 : ∀ (r : R), C (↑(algebraMap R (TensorAlgebra R M)) r)\nh_grade1 : ∀ (x : M), C (↑(ι R) x)\nh_mul : ∀ (a b : TensorAlgebra R M), C a → C b → C (a * b)\nh_add : ∀ (a b : TensorAlgebra R M), C a → C b → C (a + b)\na : TensorAlgebra R M\n⊢ C a\n[PROOFSTEP]\nlet s : Subalgebra R (TensorAlgebra R M) :=\n  { carrier := C\n    mul_mem' := @h_mul\n    add_mem' := @h_add\n    algebraMap_mem' := h_grade0 }\n    -- porting note: Added `h`. `h` is needed for `of`.\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nC : TensorAlgebra R M → Prop\nh_grade0 : ∀ (r : R), C (↑(algebraMap R (TensorAlgebra R M)) r)\nh_grade1 : ∀ (x : M), C (↑(ι R) x)\nh_mul : ∀ (a b : TensorAlgebra R M), C a → C b → C (a * b)\nh_add : ∀ (a b : TensorAlgebra R M), C a → C b → C (a + b)\na : TensorAlgebra R M\ns : Subalgebra R (TensorAlgebra R M) :=\n  {\n    toSubsemiring :=\n      { toSubmonoid := { toSubsemigroup := { carrier := C, mul_mem' := h_mul }, one_mem' := (_ : 1 ∈ C) },\n        add_mem' := h_add, zero_mem' := (_ : 0 ∈ C) },\n    algebraMap_mem' := h_grade0 }\n⊢ C a\n[PROOFSTEP]\nlet h : AddCommMonoid s := inferInstanceAs (AddCommMonoid (Subalgebra.toSubmodule s))\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nC : TensorAlgebra R M → Prop\nh_grade0 : ∀ (r : R), C (↑(algebraMap R (TensorAlgebra R M)) r)\nh_grade1 : ∀ (x : M), C (↑(ι R) x)\nh_mul : ∀ (a b : TensorAlgebra R M), C a → C b → C (a * b)\nh_add : ∀ (a b : TensorAlgebra R M), C a → C b → C (a + b)\na : TensorAlgebra R M\ns : Subalgebra R (TensorAlgebra R M) :=\n  {\n    toSubsemiring :=\n      { toSubmonoid := { toSubsemigroup := { carrier := C, mul_mem' := h_mul }, one_mem' := (_ : 1 ∈ C) },\n        add_mem' := h_add, zero_mem' := (_ : 0 ∈ C) },\n    algebraMap_mem' := h_grade0 }\nh : AddCommMonoid { x // x ∈ s } := inferInstanceAs (AddCommMonoid { x // x ∈ ↑Subalgebra.toSubmodule s })\n⊢ C a\n[PROOFSTEP]\nlet of : M →ₗ[R] s := (ι R).codRestrict (Subalgebra.toSubmodule s) h_grade1\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nC : TensorAlgebra R M → Prop\nh_grade0 : ∀ (r : R), C (↑(algebraMap R (TensorAlgebra R M)) r)\nh_grade1 : ∀ (x : M), C (↑(ι R) x)\nh_mul : ∀ (a b : TensorAlgebra R M), C a → C b → C (a * b)\nh_add : ∀ (a b : TensorAlgebra R M), C a → C b → C (a + b)\na : TensorAlgebra R M\ns : Subalgebra R (TensorAlgebra R M) :=\n  {\n    toSubsemiring :=\n      { toSubmonoid := { toSubsemigroup := { carrier := C, mul_mem' := h_mul }, one_mem' := (_ : 1 ∈ C) },\n        add_mem' := h_add, zero_mem' := (_ : 0 ∈ C) },\n    algebraMap_mem' := h_grade0 }\nh : AddCommMonoid { x // x ∈ s } := inferInstanceAs (AddCommMonoid { x // x ∈ ↑Subalgebra.toSubmodule s })\nof : M →ₗ[R] { x // x ∈ s } := LinearMap.codRestrict (↑Subalgebra.toSubmodule s) (ι R) h_grade1\n⊢ C a\n[PROOFSTEP]\nhave of_id : AlgHom.id R (TensorAlgebra R M) = s.val.comp (lift R of) :=\n  by\n  ext\n  simp\n  erw [LinearMap.codRestrict_apply]\n    -- finding a proof is finding an element of the subalgebra\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nC : TensorAlgebra R M → Prop\nh_grade0 : ∀ (r : R), C (↑(algebraMap R (TensorAlgebra R M)) r)\nh_grade1 : ∀ (x : M), C (↑(ι R) x)\nh_mul : ∀ (a b : TensorAlgebra R M), C a → C b → C (a * b)\nh_add : ∀ (a b : TensorAlgebra R M), C a → C b → C (a + b)\na : TensorAlgebra R M\ns : Subalgebra R (TensorAlgebra R M) :=\n  {\n    toSubsemiring :=\n      { toSubmonoid := { toSubsemigroup := { carrier := C, mul_mem' := h_mul }, one_mem' := (_ : 1 ∈ C) },\n        add_mem' := h_add, zero_mem' := (_ : 0 ∈ C) },\n    algebraMap_mem' := h_grade0 }\nh : AddCommMonoid { x // x ∈ s } := inferInstanceAs (AddCommMonoid { x // x ∈ ↑Subalgebra.toSubmodule s })\nof : M →ₗ[R] { x // x ∈ s } := LinearMap.codRestrict (↑Subalgebra.toSubmodule s) (ι R) h_grade1\n⊢ AlgHom.id R (TensorAlgebra R M) = AlgHom.comp (Subalgebra.val s) (↑(lift R) of)\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nC : TensorAlgebra R M → Prop\nh_grade0 : ∀ (r : R), C (↑(algebraMap R (TensorAlgebra R M)) r)\nh_grade1 : ∀ (x : M), C (↑(ι R) x)\nh_mul : ∀ (a b : TensorAlgebra R M), C a → C b → C (a * b)\nh_add : ∀ (a b : TensorAlgebra R M), C a → C b → C (a + b)\na : TensorAlgebra R M\ns : Subalgebra R (TensorAlgebra R M) :=\n  {\n    toSubsemiring :=\n      { toSubmonoid := { toSubsemigroup := { carrier := C, mul_mem' := h_mul }, one_mem' := (_ : 1 ∈ C) },\n        add_mem' := h_add, zero_mem' := (_ : 0 ∈ C) },\n    algebraMap_mem' := h_grade0 }\nh : AddCommMonoid { x // x ∈ s } := inferInstanceAs (AddCommMonoid { x // x ∈ ↑Subalgebra.toSubmodule s })\nof : M →ₗ[R] { x // x ∈ s } := LinearMap.codRestrict (↑Subalgebra.toSubmodule s) (ι R) h_grade1\nx✝ : M\n⊢ ↑(LinearMap.comp (AlgHom.toLinearMap (AlgHom.id R (TensorAlgebra R M))) (ι R)) x✝ =\n    ↑(LinearMap.comp (AlgHom.toLinearMap (AlgHom.comp (Subalgebra.val s) (↑(lift R) of))) (ι R)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase w.h\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nC : TensorAlgebra R M → Prop\nh_grade0 : ∀ (r : R), C (↑(algebraMap R (TensorAlgebra R M)) r)\nh_grade1 : ∀ (x : M), C (↑(ι R) x)\nh_mul : ∀ (a b : TensorAlgebra R M), C a → C b → C (a * b)\nh_add : ∀ (a b : TensorAlgebra R M), C a → C b → C (a + b)\na : TensorAlgebra R M\ns : Subalgebra R (TensorAlgebra R M) :=\n  {\n    toSubsemiring :=\n      { toSubmonoid := { toSubsemigroup := { carrier := C, mul_mem' := h_mul }, one_mem' := (_ : 1 ∈ C) },\n        add_mem' := h_add, zero_mem' := (_ : 0 ∈ C) },\n    algebraMap_mem' := h_grade0 }\nh : AddCommMonoid { x // x ∈ s } := inferInstanceAs (AddCommMonoid { x // x ∈ ↑Subalgebra.toSubmodule s })\nof : M →ₗ[R] { x // x ∈ s } := LinearMap.codRestrict (↑Subalgebra.toSubmodule s) (ι R) h_grade1\nx✝ : M\n⊢ ↑(ι R) x✝ = ↑(↑(LinearMap.codRestrict (↑Subalgebra.toSubmodule s) (ι R) h_grade1) x✝)\n[PROOFSTEP]\nerw [LinearMap.codRestrict_apply]\n  -- finding a proof is finding an element of the subalgebra\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nC : TensorAlgebra R M → Prop\nh_grade0 : ∀ (r : R), C (↑(algebraMap R (TensorAlgebra R M)) r)\nh_grade1 : ∀ (x : M), C (↑(ι R) x)\nh_mul : ∀ (a b : TensorAlgebra R M), C a → C b → C (a * b)\nh_add : ∀ (a b : TensorAlgebra R M), C a → C b → C (a + b)\na : TensorAlgebra R M\ns : Subalgebra R (TensorAlgebra R M) :=\n  {\n    toSubsemiring :=\n      { toSubmonoid := { toSubsemigroup := { carrier := C, mul_mem' := h_mul }, one_mem' := (_ : 1 ∈ C) },\n        add_mem' := h_add, zero_mem' := (_ : 0 ∈ C) },\n    algebraMap_mem' := h_grade0 }\nh : AddCommMonoid { x // x ∈ s } := inferInstanceAs (AddCommMonoid { x // x ∈ ↑Subalgebra.toSubmodule s })\nof : M →ₗ[R] { x // x ∈ s } := LinearMap.codRestrict (↑Subalgebra.toSubmodule s) (ι R) h_grade1\nof_id : AlgHom.id R (TensorAlgebra R M) = AlgHom.comp (Subalgebra.val s) (↑(lift R) of)\n⊢ C a\n[PROOFSTEP]\nrw [← AlgHom.id_apply (R := R) a, of_id]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nC : TensorAlgebra R M → Prop\nh_grade0 : ∀ (r : R), C (↑(algebraMap R (TensorAlgebra R M)) r)\nh_grade1 : ∀ (x : M), C (↑(ι R) x)\nh_mul : ∀ (a b : TensorAlgebra R M), C a → C b → C (a * b)\nh_add : ∀ (a b : TensorAlgebra R M), C a → C b → C (a + b)\na : TensorAlgebra R M\ns : Subalgebra R (TensorAlgebra R M) :=\n  {\n    toSubsemiring :=\n      { toSubmonoid := { toSubsemigroup := { carrier := C, mul_mem' := h_mul }, one_mem' := (_ : 1 ∈ C) },\n        add_mem' := h_add, zero_mem' := (_ : 0 ∈ C) },\n    algebraMap_mem' := h_grade0 }\nh : AddCommMonoid { x // x ∈ s } := inferInstanceAs (AddCommMonoid { x // x ∈ ↑Subalgebra.toSubmodule s })\nof : M →ₗ[R] { x // x ∈ s } := LinearMap.codRestrict (↑Subalgebra.toSubmodule s) (ι R) h_grade1\nof_id : AlgHom.id R (TensorAlgebra R M) = AlgHom.comp (Subalgebra.val s) (↑(lift R) of)\n⊢ C (↑(AlgHom.comp (Subalgebra.val s) (↑(lift R) of)) a)\n[PROOFSTEP]\nexact Subtype.prop (lift R of a)\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : R\n⊢ ↑algebraMapInv (↑(algebraMap R (TensorAlgebra R M)) x) = x\n[PROOFSTEP]\nsimp [algebraMapInv]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ TensorAlgebra R M →ₗ[R] M\n[PROOFSTEP]\nletI : Module Rᵐᵒᵖ M := Module.compHom _ ((RingHom.id R).fromOpposite mul_comm)\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nthis : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\n⊢ TensorAlgebra R M →ₗ[R] M\n[PROOFSTEP]\nhaveI : IsCentralScalar R M := ⟨fun r m => rfl⟩\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nthis✝ : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\nthis : IsCentralScalar R M\n⊢ TensorAlgebra R M →ₗ[R] M\n[PROOFSTEP]\nexact (TrivSqZeroExt.sndHom R M).comp toTrivSqZeroExt.toLinearMap\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : M\n⊢ ↑ιInv (↑(ι R) x) = x\n[PROOFSTEP]\nsimp [ιInv, (AlgHom.toLinearMap_apply), toTrivSqZeroExt_ι _]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : M\n⊢ ↑(ι R) x = 0 ↔ x = 0\n[PROOFSTEP]\nrw [← ι_inj R x 0, LinearMap.map_zero]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : M\nr : R\n⊢ ↑(ι R) x = ↑(algebraMap R (TensorAlgebra R M)) r ↔ x = 0 ∧ r = 0\n[PROOFSTEP]\nrefine' ⟨fun h => _, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : M\nr : R\nh : ↑(ι R) x = ↑(algebraMap R (TensorAlgebra R M)) r\n⊢ x = 0 ∧ r = 0\n[PROOFSTEP]\nletI : Module Rᵐᵒᵖ M := Module.compHom _ ((RingHom.id R).fromOpposite mul_comm)\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : M\nr : R\nh : ↑(ι R) x = ↑(algebraMap R (TensorAlgebra R M)) r\nthis : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\n⊢ x = 0 ∧ r = 0\n[PROOFSTEP]\nhaveI : IsCentralScalar R M := ⟨fun r m => rfl⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : M\nr : R\nh : ↑(ι R) x = ↑(algebraMap R (TensorAlgebra R M)) r\nthis✝ : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\nthis : IsCentralScalar R M\n⊢ x = 0 ∧ r = 0\n[PROOFSTEP]\nhave hf0 : toTrivSqZeroExt (ι R x) = (0, x) := lift_ι_apply _ _\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : M\nr : R\nh : ↑(ι R) x = ↑(algebraMap R (TensorAlgebra R M)) r\nthis✝ : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\nthis : IsCentralScalar R M\nhf0 : ↑toTrivSqZeroExt (↑(ι R) x) = (0, x)\n⊢ x = 0 ∧ r = 0\n[PROOFSTEP]\nrw [h, AlgHom.commutes] at hf0 \n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : M\nr : R\nh : ↑(ι R) x = ↑(algebraMap R (TensorAlgebra R M)) r\nthis✝ : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\nthis : IsCentralScalar R M\nhf0 : ↑(algebraMap R (TrivSqZeroExt R M)) r = (0, x)\n⊢ x = 0 ∧ r = 0\n[PROOFSTEP]\nhave : r = 0 ∧ 0 = x := Prod.ext_iff.1 hf0\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : M\nr : R\nh : ↑(ι R) x = ↑(algebraMap R (TensorAlgebra R M)) r\nthis✝¹ : Module Rᵐᵒᵖ M := Module.compHom M (RingHom.fromOpposite (RingHom.id R) (_ : ∀ (a b : R), a * b = b * a))\nthis✝ : IsCentralScalar R M\nhf0 : ↑(algebraMap R (TrivSqZeroExt R M)) r = (0, x)\nthis : r = 0 ∧ 0 = x\n⊢ x = 0 ∧ r = 0\n[PROOFSTEP]\nexact this.symm.imp_left Eq.symm\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : M\nr : R\n⊢ x = 0 ∧ r = 0 → ↑(ι R) x = ↑(algebraMap R (TensorAlgebra R M)) r\n[PROOFSTEP]\nrintro ⟨rfl, rfl⟩\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ ↑(ι R) 0 = ↑(algebraMap R (TensorAlgebra R M)) 0\n[PROOFSTEP]\nrw [LinearMap.map_zero, RingHom.map_zero]\n[GOAL]\nR : Type u_1\ninst✝³ : CommSemiring R\nM : Type u_2\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : Nontrivial R\nx : M\n⊢ ↑(ι R) x ≠ 1\n[PROOFSTEP]\nrw [← (algebraMap R (TensorAlgebra R M)).map_one, Ne.def, ι_eq_algebraMap_iff]\n[GOAL]\nR : Type u_1\ninst✝³ : CommSemiring R\nM : Type u_2\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : Nontrivial R\nx : M\n⊢ ¬(x = 0 ∧ 1 = 0)\n[PROOFSTEP]\nexact one_ne_zero ∘ And.right\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ Disjoint (LinearMap.range (ι R)) 1\n[PROOFSTEP]\nrw [Submodule.disjoint_def]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ ∀ (x : TensorAlgebra R M), x ∈ LinearMap.range (ι R) → x ∈ 1 → x = 0\n[PROOFSTEP]\nrintro _ ⟨x, hx⟩ ⟨r, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : M\nr : R\nhx : ↑(ι R) x = ↑(Algebra.linearMap R (TensorAlgebra R M)) r\n⊢ ↑(Algebra.linearMap R (TensorAlgebra R M)) r = 0\n[PROOFSTEP]\nrw [Algebra.linearMap_apply, ι_eq_algebraMap_iff] at hx \n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : M\nr : R\nhx : x = 0 ∧ r = 0\n⊢ ↑(Algebra.linearMap R (TensorAlgebra R M)) r = 0\n[PROOFSTEP]\nrw [hx.2, map_zero]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nM : Type u_2\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\n⊢ ↑toTensor (ι R m) = ↑(TensorAlgebra.ι R) m\n[PROOFSTEP]\nsimp [toTensor]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.TensorAlgebra.Basic", "llama_tokens": 14221, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7217432062975979, "lm_q2_score": 0.49218813572079556, "lm_q1q2_score": 0.35523344317676425}}
{"text": "[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ni : ι\n⊢ ↑(piOpensIsoSectionsFamily F U) sf i = Pi.π (fun i => F.obj (op (U i))) i sf\n[PROOFSTEP]\nsimp [piOpensIsoSectionsFamily]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\n⊢ IsCompatible F U (↑(piOpensIsoSectionsFamily F U) sf) ↔ leftRes F U sf = rightRes F U sf\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\n⊢ IsCompatible F U (↑(piOpensIsoSectionsFamily F U) sf) → leftRes F U sf = rightRes F U sf\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\n⊢ leftRes F U sf = rightRes F U sf → IsCompatible F U (↑(piOpensIsoSectionsFamily F U) sf)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\nh : IsCompatible F U (↑(piOpensIsoSectionsFamily F U) sf)\n⊢ leftRes F U sf = rightRes F U sf\n[PROOFSTEP]\nrefine Types.limit_ext _ _ _ fun ⟨i, j⟩ => ?_\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\nh : IsCompatible F U (↑(piOpensIsoSectionsFamily F U) sf)\nx✝ : Discrete (ι × ι)\ni j : ι\n⊢ limit.π (Discrete.functor fun p => F.obj (op (U p.fst ⊓ U p.snd))) { as := (i, j) } (leftRes F U sf) =\n    limit.π (Discrete.functor fun p => F.obj (op (U p.fst ⊓ U p.snd))) { as := (i, j) } (rightRes F U sf)\n[PROOFSTEP]\nrw [leftRes, Types.Limit.lift_π_apply, Fan.mk_π_app, rightRes, Types.Limit.lift_π_apply, Fan.mk_π_app]\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\nh : IsCompatible F U (↑(piOpensIsoSectionsFamily F U) sf)\nx✝ : Discrete (ι × ι)\ni j : ι\n⊢ (Pi.π (fun i => F.obj (op (U i))) { as := (i, j) }.as.fst ≫\n        F.map (infLELeft (U { as := (i, j) }.as.fst) (U { as := (i, j) }.as.snd)).op)\n      sf =\n    (Pi.π (fun i => F.obj (op (U i))) { as := (i, j) }.as.snd ≫\n        F.map (infLERight (U { as := (i, j) }.as.fst) (U { as := (i, j) }.as.snd)).op)\n      sf\n[PROOFSTEP]\nsimpa using h i j\n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\nh : leftRes F U sf = rightRes F U sf\n⊢ IsCompatible F U (↑(piOpensIsoSectionsFamily F U) sf)\n[PROOFSTEP]\nintro i j\n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\nh : leftRes F U sf = rightRes F U sf\ni j : ι\n⊢ ↑(F.map (infLELeft (U i) (U j)).op) (↑(piOpensIsoSectionsFamily F U) sf i) =\n    ↑(F.map (infLERight (U i) (U j)).op) (↑(piOpensIsoSectionsFamily F U) sf j)\n[PROOFSTEP]\nconvert congr_arg (Limits.Pi.π (fun p : ι × ι => F.obj (op (U p.1 ⊓ U p.2))) (i, j)) h\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\nh : leftRes F U sf = rightRes F U sf\ni j : ι\ne_1✝ :\n  (fun x => (forget (Type u)).obj (F.obj (op (U i ⊓ U j)))) (↑(piOpensIsoSectionsFamily F U) sf i) =\n    F.obj (op (U (i, j).fst ⊓ U (i, j).snd))\n⊢ ↑(F.map (infLELeft (U i) (U j)).op) (↑(piOpensIsoSectionsFamily F U) sf i) =\n    Pi.π (fun p => F.obj (op (U p.fst ⊓ U p.snd))) (i, j) (leftRes F U sf)\n[PROOFSTEP]\nrw [leftRes, Types.pi_lift_π_apply, piOpensIsoSectionsFamily_apply]\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\nh : leftRes F U sf = rightRes F U sf\ni j : ι\ne_1✝ :\n  (fun x => (forget (Type u)).obj (F.obj (op (U i ⊓ U j)))) (↑(piOpensIsoSectionsFamily F U) sf i) =\n    F.obj (op (U (i, j).fst ⊓ U (i, j).snd))\n⊢ ↑(F.map (infLELeft (U i) (U j)).op) (Pi.π (fun i => F.obj (op (U i))) i sf) =\n    (Pi.π (fun i => F.obj (op (U i))) (i, j).fst ≫ F.map (infLELeft (U (i, j).fst) (U (i, j).snd)).op) sf\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\nh : leftRes F U sf = rightRes F U sf\ni j : ι\ne_1✝ :\n  (fun x => (forget (Type u)).obj (F.obj (op (U i ⊓ U j)))) (↑(piOpensIsoSectionsFamily F U) sf i) =\n    F.obj (op (U (i, j).fst ⊓ U (i, j).snd))\n⊢ ↑(F.map (infLERight (U i) (U j)).op) (↑(piOpensIsoSectionsFamily F U) sf j) =\n    Pi.π (fun p => F.obj (op (U p.fst ⊓ U p.snd))) (i, j) (rightRes F U sf)\n[PROOFSTEP]\nrw [rightRes, Types.pi_lift_π_apply]\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\nh : leftRes F U sf = rightRes F U sf\ni j : ι\ne_1✝ :\n  (fun x => (forget (Type u)).obj (F.obj (op (U i ⊓ U j)))) (↑(piOpensIsoSectionsFamily F U) sf i) =\n    F.obj (op (U (i, j).fst ⊓ U (i, j).snd))\n⊢ ↑(F.map (infLERight (U i) (U j)).op) (↑(piOpensIsoSectionsFamily F U) sf j) =\n    (Pi.π (fun i => F.obj (op (U i))) (i, j).snd ≫ F.map (infLERight (U (i, j).fst) (U (i, j).snd)).op) sf\n[PROOFSTEP]\nsimp only [piOpensIsoSectionsFamily_apply]\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\nh : leftRes F U sf = rightRes F U sf\ni j : ι\ne_1✝ :\n  (fun x => (forget (Type u)).obj (F.obj (op (U i ⊓ U j)))) (↑(piOpensIsoSectionsFamily F U) sf i) =\n    F.obj (op (U (i, j).fst ⊓ U (i, j).snd))\n⊢ ↑(F.map (infLERight (U i) (U j)).op) (Pi.π (fun i => F.obj (op (U i))) j sf) =\n    (Pi.π (fun i => F.obj (op (U i))) j ≫ F.map (infLERight (U i) (U j)).op) sf\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ns : F.obj (op (iSup U))\n⊢ IsGluing F U (↑(piOpensIsoSectionsFamily F U) sf) s ↔ res F U s = sf\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ns : F.obj (op (iSup U))\n⊢ IsGluing F U (↑(piOpensIsoSectionsFamily F U) sf) s → res F U s = sf\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ns : F.obj (op (iSup U))\n⊢ res F U s = sf → IsGluing F U (↑(piOpensIsoSectionsFamily F U) sf) s\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ns : F.obj (op (iSup U))\nh : IsGluing F U (↑(piOpensIsoSectionsFamily F U) sf) s\n⊢ res F U s = sf\n[PROOFSTEP]\nrefine Types.limit_ext _ _ _ fun ⟨i⟩ => ?_\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ns : F.obj (op (iSup U))\nh : IsGluing F U (↑(piOpensIsoSectionsFamily F U) sf) s\nx✝ : Discrete ι\ni : ι\n⊢ limit.π (Discrete.functor fun i => F.obj (op (U i))) { as := i } (res F U s) =\n    limit.π (Discrete.functor fun i => F.obj (op (U i))) { as := i } sf\n[PROOFSTEP]\nrw [res, Types.Limit.lift_π_apply, Fan.mk_π_app]\n[GOAL]\ncase mp\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ns : F.obj (op (iSup U))\nh : IsGluing F U (↑(piOpensIsoSectionsFamily F U) sf) s\nx✝ : Discrete ι\ni : ι\n⊢ F.map (leSupr U { as := i }.as).op s = limit.π (Discrete.functor fun i => F.obj (op (U i))) { as := i } sf\n[PROOFSTEP]\nsimpa using h i\n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ns : F.obj (op (iSup U))\nh : res F U s = sf\n⊢ IsGluing F U (↑(piOpensIsoSectionsFamily F U) sf) s\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mpr\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ns : F.obj (op (iSup U))\nh : res F U s = sf\ni : ι\n⊢ ↑(F.map (leSupr U i).op) s = ↑(piOpensIsoSectionsFamily F U) sf i\n[PROOFSTEP]\nconvert congr_arg (Limits.Pi.π (fun i : ι => F.obj (op (U i))) i) h\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ns : F.obj (op (iSup U))\nh : res F U s = sf\ni : ι\ne_1✝ : (fun x => (forget (Type u)).obj (F.obj (op (U i)))) s = F.obj (op (U i))\n⊢ ↑(F.map (leSupr U i).op) s = Pi.π (fun i => F.obj (op (U i))) i (res F U s)\ncase h.e'_3.h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ns : F.obj (op (iSup U))\nh : res F U s = sf\ni : ι\ne_1✝ : (fun x => (forget (Type u)).obj (F.obj (op (U i)))) s = F.obj (op (U i))\n⊢ ↑(piOpensIsoSectionsFamily F U) sf i = Pi.π (fun i => F.obj (op (U i))) i sf\n[PROOFSTEP]\nrw [res, Types.pi_lift_π_apply]\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ns : F.obj (op (iSup U))\nh : res F U s = sf\ni : ι\ne_1✝ : (fun x => (forget (Type u)).obj (F.obj (op (U i)))) s = F.obj (op (U i))\n⊢ ↑(F.map (leSupr U i).op) s = F.map (leSupr U i).op s\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nsf : piOpens F U\ns : F.obj (op (iSup U))\nh : res F U s = sf\ni : ι\ne_1✝ : (fun x => (forget (Type u)).obj (F.obj (op (U i)))) s = F.obj (op (U i))\n⊢ ↑(piOpensIsoSectionsFamily F U) sf i = Pi.π (fun i => F.obj (op (U i))) i sf\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\n⊢ IsSheaf F\n[PROOFSTEP]\nrw [isSheaf_iff_isSheafEqualizerProducts]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\n⊢ IsSheafEqualizerProducts F\n[PROOFSTEP]\nintro ι U\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\n⊢ Nonempty (IsLimit (fork F U))\n[PROOFSTEP]\nrefine' ⟨Fork.IsLimit.mk' _ _⟩\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\n⊢ (s : Fork (leftRes F U) (rightRes F U)) →\n    { l //\n      l ≫ Fork.ι (fork F U) = Fork.ι s ∧\n        ∀\n          {m :\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n              ((Functor.const WalkingParallelPair).obj (fork F U).pt).obj WalkingParallelPair.zero},\n          m ≫ Fork.ι (fork F U) = Fork.ι s → m = l }\n[PROOFSTEP]\nintro s\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\n⊢ { l //\n    l ≫ Fork.ι (fork F U) = Fork.ι s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n            ((Functor.const WalkingParallelPair).obj (fork F U).pt).obj WalkingParallelPair.zero},\n        m ≫ Fork.ι (fork F U) = Fork.ι s → m = l }\n[PROOFSTEP]\nhave h_compatible : ∀ x : s.pt, F.IsCompatible U (piOpensIsoSectionsFamily F U (s.ι x)) :=\n  by\n  intro x\n  rw [compatible_iff_leftRes_eq_rightRes]\n  convert congr_fun s.condition x\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\n⊢ ∀ (x : s.pt), IsCompatible F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x))\n[PROOFSTEP]\nintro x\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\nx : s.pt\n⊢ IsCompatible F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x))\n[PROOFSTEP]\nrw [compatible_iff_leftRes_eq_rightRes]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\nx : s.pt\n⊢ leftRes F U (Fork.ι s x) = rightRes F U (Fork.ι s x)\n[PROOFSTEP]\nconvert congr_fun s.condition x\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\nh_compatible : ∀ (x : s.pt), IsCompatible F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x))\n⊢ { l //\n    l ≫ Fork.ι (fork F U) = Fork.ι s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n            ((Functor.const WalkingParallelPair).obj (fork F U).pt).obj WalkingParallelPair.zero},\n        m ≫ Fork.ι (fork F U) = Fork.ι s → m = l }\n[PROOFSTEP]\nchoose m m_spec m_uniq using fun x : s.pt => Fsh U (piOpensIsoSectionsFamily F U (s.ι x)) (h_compatible x)\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\nh_compatible : ∀ (x : s.pt), IsCompatible F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x))\nm : s.pt → (forget (Type u)).obj (F.obj (op (iSup U)))\nm_spec : ∀ (x : s.pt), (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) (m x)\nm_uniq :\n  ∀ (x : s.pt) (y : (forget (Type u)).obj (F.obj (op (iSup U)))),\n    (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) y → y = m x\n⊢ { l //\n    l ≫ Fork.ι (fork F U) = Fork.ι s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n            ((Functor.const WalkingParallelPair).obj (fork F U).pt).obj WalkingParallelPair.zero},\n        m ≫ Fork.ι (fork F U) = Fork.ι s → m = l }\n[PROOFSTEP]\nrefine' ⟨m, _, _⟩\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\nh_compatible : ∀ (x : s.pt), IsCompatible F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x))\nm : s.pt → (forget (Type u)).obj (F.obj (op (iSup U)))\nm_spec : ∀ (x : s.pt), (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) (m x)\nm_uniq :\n  ∀ (x : s.pt) (y : (forget (Type u)).obj (F.obj (op (iSup U)))),\n    (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) y → y = m x\n⊢ m ≫ Fork.ι (fork F U) = Fork.ι s\n[PROOFSTEP]\nrefine limit.hom_ext fun ⟨i⟩ => funext fun x => ?_\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\nh_compatible : ∀ (x : s.pt), IsCompatible F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x))\nm : s.pt → (forget (Type u)).obj (F.obj (op (iSup U)))\nm_spec : ∀ (x : s.pt), (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) (m x)\nm_uniq :\n  ∀ (x : s.pt) (y : (forget (Type u)).obj (F.obj (op (iSup U)))),\n    (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) y → y = m x\nx✝ : Discrete ι\ni : ι\nx : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero\n⊢ ((m ≫ Fork.ι (fork F U)) ≫ limit.π (Discrete.functor fun i => F.obj (op (U i))) { as := i }) x =\n    (Fork.ι s ≫ limit.π (Discrete.functor fun i => F.obj (op (U i))) { as := i }) x\n[PROOFSTEP]\nsimp [res]\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\nh_compatible : ∀ (x : s.pt), IsCompatible F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x))\nm : s.pt → (forget (Type u)).obj (F.obj (op (iSup U)))\nm_spec : ∀ (x : s.pt), (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) (m x)\nm_uniq :\n  ∀ (x : s.pt) (y : (forget (Type u)).obj (F.obj (op (iSup U)))),\n    (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) y → y = m x\nx✝ : Discrete ι\ni : ι\nx : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero\n⊢ F.map (leSupr U i).op (m x) = limit.π (Discrete.functor fun i => F.obj (op (U i))) { as := i } (Fork.ι s x)\n[PROOFSTEP]\nsimpa using m_spec x i\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\nh_compatible : ∀ (x : s.pt), IsCompatible F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x))\nm : s.pt → (forget (Type u)).obj (F.obj (op (iSup U)))\nm_spec : ∀ (x : s.pt), (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) (m x)\nm_uniq :\n  ∀ (x : s.pt) (y : (forget (Type u)).obj (F.obj (op (iSup U)))),\n    (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) y → y = m x\n⊢ ∀\n    {m_1 :\n      ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n        ((Functor.const WalkingParallelPair).obj (fork F U).pt).obj WalkingParallelPair.zero},\n    m_1 ≫ Fork.ι (fork F U) = Fork.ι s → m_1 = m\n[PROOFSTEP]\nintro l hl\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\nh_compatible : ∀ (x : s.pt), IsCompatible F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x))\nm : s.pt → (forget (Type u)).obj (F.obj (op (iSup U)))\nm_spec : ∀ (x : s.pt), (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) (m x)\nm_uniq :\n  ∀ (x : s.pt) (y : (forget (Type u)).obj (F.obj (op (iSup U)))),\n    (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) y → y = m x\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (fork F U).pt).obj WalkingParallelPair.zero\nhl : l ≫ Fork.ι (fork F U) = Fork.ι s\n⊢ l = m\n[PROOFSTEP]\next x\n[GOAL]\ncase refine'_2.h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\nh_compatible : ∀ (x : s.pt), IsCompatible F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x))\nm : s.pt → (forget (Type u)).obj (F.obj (op (iSup U)))\nm_spec : ∀ (x : s.pt), (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) (m x)\nm_uniq :\n  ∀ (x : s.pt) (y : (forget (Type u)).obj (F.obj (op (iSup U)))),\n    (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) y → y = m x\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (fork F U).pt).obj WalkingParallelPair.zero\nhl : l ≫ Fork.ι (fork F U) = Fork.ι s\nx : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero\n⊢ l x = m x\n[PROOFSTEP]\napply m_uniq\n[GOAL]\ncase refine'_2.h.a\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\nh_compatible : ∀ (x : s.pt), IsCompatible F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x))\nm : s.pt → (forget (Type u)).obj (F.obj (op (iSup U)))\nm_spec : ∀ (x : s.pt), (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) (m x)\nm_uniq :\n  ∀ (x : s.pt) (y : (forget (Type u)).obj (F.obj (op (iSup U)))),\n    (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) y → y = m x\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (fork F U).pt).obj WalkingParallelPair.zero\nhl : l ≫ Fork.ι (fork F U) = Fork.ι s\nx : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero\n⊢ IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) (l x)\n[PROOFSTEP]\nrw [isGluing_iff_eq_res]\n[GOAL]\ncase refine'_2.h.a\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheafUniqueGluing F\nι : Type x\nU : ι → Opens ↑X\ns : Fork (leftRes F U) (rightRes F U)\nh_compatible : ∀ (x : s.pt), IsCompatible F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x))\nm : s.pt → (forget (Type u)).obj (F.obj (op (iSup U)))\nm_spec : ∀ (x : s.pt), (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) (m x)\nm_uniq :\n  ∀ (x : s.pt) (y : (forget (Type u)).obj (F.obj (op (iSup U)))),\n    (fun s_1 => IsGluing F U (↑(piOpensIsoSectionsFamily F U) (Fork.ι s x)) s_1) y → y = m x\nl :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (fork F U).pt).obj WalkingParallelPair.zero\nhl : l ≫ Fork.ι (fork F U) = Fork.ι s\nx : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero\n⊢ res F U (l x) = Fork.ι s x\n[PROOFSTEP]\nexact congr_fun hl x\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh : IsSheaf F\n⊢ IsSheafUniqueGluing F\n[PROOFSTEP]\nrw [isSheaf_iff_isSheafEqualizerProducts] at Fsh \n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι : Type x\nU : ι → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\n⊢ IsSheafUniqueGluing F\n[PROOFSTEP]\nintro ι U sf hsf\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\n⊢ ∃! s, IsGluing F U sf s\n[PROOFSTEP]\nlet sf' := (piOpensIsoSectionsFamily F U).symm sf\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\n⊢ ∃! s, IsGluing F U sf s\n[PROOFSTEP]\nhave hsf' : leftRes F U sf' = rightRes F U sf' := by\n  rwa [← compatible_iff_leftRes_eq_rightRes F U sf', Equiv.apply_symm_apply]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\n⊢ leftRes F U sf' = rightRes F U sf'\n[PROOFSTEP]\nrwa [← compatible_iff_leftRes_eq_rightRes F U sf', Equiv.apply_symm_apply]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\nhsf' : leftRes F U sf' = rightRes F U sf'\n⊢ ∃! s, IsGluing F U sf s\n[PROOFSTEP]\nchoose s s_spec s_uniq using Types.unique_of_type_equalizer _ _ (Fsh U).some sf' hsf'\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\nhsf' : leftRes F U sf' = rightRes F U sf'\ns : F.obj (op (iSup U))\ns_spec : res F U s = sf'\ns_uniq : ∀ (y : F.obj (op (iSup U))), (fun x => res F U x = sf') y → y = s\n⊢ ∃! s, IsGluing F U sf s\n[PROOFSTEP]\nuse s\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\nhsf' : leftRes F U sf' = rightRes F U sf'\ns : F.obj (op (iSup U))\ns_spec : res F U s = sf'\ns_uniq : ∀ (y : F.obj (op (iSup U))), (fun x => res F U x = sf') y → y = s\n⊢ (fun s => IsGluing F U sf s) s ∧\n    ∀ (y : (forget (Type u)).obj (F.obj (op (iSup U)))), (fun s => IsGluing F U sf s) y → y = s\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\nhsf' : leftRes F U sf' = rightRes F U sf'\ns : F.obj (op (iSup U))\ns_spec : res F U s = sf'\ns_uniq : ∀ (y : F.obj (op (iSup U))), (fun x => res F U x = sf') y → y = s\n⊢ IsGluing F U sf s ∧ ∀ (y : (forget (Type u)).obj (F.obj (op (iSup U)))), IsGluing F U sf y → y = s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\nhsf' : leftRes F U sf' = rightRes F U sf'\ns : F.obj (op (iSup U))\ns_spec : res F U s = sf'\ns_uniq : ∀ (y : F.obj (op (iSup U))), (fun x => res F U x = sf') y → y = s\n⊢ IsGluing F U sf s\n[PROOFSTEP]\nconvert (isGluing_iff_eq_res F U sf' _).mpr s_spec\n[GOAL]\ncase h.e'_8\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\nhsf' : leftRes F U sf' = rightRes F U sf'\ns : F.obj (op (iSup U))\ns_spec : res F U s = sf'\ns_uniq : ∀ (y : F.obj (op (iSup U))), (fun x => res F U x = sf') y → y = s\n⊢ sf = ↑(piOpensIsoSectionsFamily F U) sf'\n[PROOFSTEP]\nsimp only [Equiv.apply_symm_apply]\n[GOAL]\ncase h.right\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\nhsf' : leftRes F U sf' = rightRes F U sf'\ns : F.obj (op (iSup U))\ns_spec : res F U s = sf'\ns_uniq : ∀ (y : F.obj (op (iSup U))), (fun x => res F U x = sf') y → y = s\n⊢ ∀ (y : (forget (Type u)).obj (F.obj (op (iSup U)))), IsGluing F U sf y → y = s\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase h.right\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\nhsf' : leftRes F U sf' = rightRes F U sf'\ns : F.obj (op (iSup U))\ns_spec : res F U s = sf'\ns_uniq : ∀ (y : F.obj (op (iSup U))), (fun x => res F U x = sf') y → y = s\ny : (forget (Type u)).obj (F.obj (op (iSup U)))\nhy : IsGluing F U sf y\n⊢ y = s\n[PROOFSTEP]\napply s_uniq\n[GOAL]\ncase h.right.a\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\nhsf' : leftRes F U sf' = rightRes F U sf'\ns : F.obj (op (iSup U))\ns_spec : res F U s = sf'\ns_uniq : ∀ (y : F.obj (op (iSup U))), (fun x => res F U x = sf') y → y = s\ny : (forget (Type u)).obj (F.obj (op (iSup U)))\nhy : IsGluing F U sf y\n⊢ res F U y = sf'\n[PROOFSTEP]\nrw [← isGluing_iff_eq_res F U]\n[GOAL]\ncase h.right.a\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\nhsf' : leftRes F U sf' = rightRes F U sf'\ns : F.obj (op (iSup U))\ns_spec : res F U s = sf'\ns_uniq : ∀ (y : F.obj (op (iSup U))), (fun x => res F U x = sf') y → y = s\ny : (forget (Type u)).obj (F.obj (op (iSup U)))\nhy : IsGluing F U sf y\n⊢ IsGluing F U (↑(piOpensIsoSectionsFamily F U) sf') y\n[PROOFSTEP]\nconvert hy\n[GOAL]\ncase h.e'_8\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : ConcreteCategory C\nX : TopCat\nF : Presheaf (Type u) X\nι✝ : Type x\nU✝ : ι✝ → Opens ↑X\ninst✝ : UnivLE.{x, u}\nFsh✝ : IsSheaf F\nFsh : IsSheafEqualizerProducts F\nι : Type x\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type u)).obj (F.obj (op (U i)))\nhsf : IsCompatible F U sf\nsf' : (fun x => piOpens F U) sf := ↑(piOpensIsoSectionsFamily F U).symm sf\nhsf' : leftRes F U sf' = rightRes F U sf'\ns : F.obj (op (iSup U))\ns_spec : res F U s = sf'\ns_uniq : ∀ (y : F.obj (op (iSup U))), (fun x => res F U x = sf') y → y = s\ny : (forget (Type u)).obj (F.obj (op (iSup U)))\nhy : IsGluing F U sf y\n⊢ ↑(piOpensIsoSectionsFamily F U) sf' = sf\n[PROOFSTEP]\nsimp only [Equiv.apply_symm_apply]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i)))\nh : IsCompatible F.val U sf\n⊢ ∃! s, ∀ (i : ι), ↑(F.val.map (iUV i).op) s = sf i\n[PROOFSTEP]\nhave V_eq_supr_U : V = iSup U := le_antisymm hcover (iSup_le fun i => (iUV i).le)\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i)))\nh : IsCompatible F.val U sf\nV_eq_supr_U : V = iSup U\n⊢ ∃! s, ∀ (i : ι), ↑(F.val.map (iUV i).op) s = sf i\n[PROOFSTEP]\nobtain ⟨gl, gl_spec, gl_uniq⟩ := F.existsUnique_gluing U sf h\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i)))\nh : IsCompatible F.val U sf\nV_eq_supr_U : V = iSup U\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_spec : IsGluing F.val U sf gl\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\n⊢ ∃! s, ∀ (i : ι), ↑(F.val.map (iUV i).op) s = sf i\n[PROOFSTEP]\nrefine' ⟨F.1.map (eqToHom V_eq_supr_U).op gl, _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i)))\nh : IsCompatible F.val U sf\nV_eq_supr_U : V = iSup U\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_spec : IsGluing F.val U sf gl\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\n⊢ (fun s => ∀ (i : ι), ↑(F.val.map (iUV i).op) s = sf i) (↑(F.val.map (eqToHom V_eq_supr_U).op) gl)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase intro.intro.refine'_1\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i)))\nh : IsCompatible F.val U sf\nV_eq_supr_U : V = iSup U\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_spec : IsGluing F.val U sf gl\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\ni : ι\n⊢ ↑(F.val.map (iUV i).op) (↑(F.val.map (eqToHom V_eq_supr_U).op) gl) = sf i\n[PROOFSTEP]\nrw [← comp_apply, ← F.1.map_comp]\n[GOAL]\ncase intro.intro.refine'_1\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i)))\nh : IsCompatible F.val U sf\nV_eq_supr_U : V = iSup U\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_spec : IsGluing F.val U sf gl\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\ni : ι\n⊢ ↑(F.val.map ((eqToHom V_eq_supr_U).op ≫ (iUV i).op)) gl = sf i\n[PROOFSTEP]\nexact gl_spec i\n[GOAL]\ncase intro.intro.refine'_2\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i)))\nh : IsCompatible F.val U sf\nV_eq_supr_U : V = iSup U\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_spec : IsGluing F.val U sf gl\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\n⊢ ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op V))),\n    (fun s => ∀ (i : ι), ↑(F.val.map (iUV i).op) s = sf i) y → y = ↑(F.val.map (eqToHom V_eq_supr_U).op) gl\n[PROOFSTEP]\nintro gl' gl'_spec\n[GOAL]\ncase intro.intro.refine'_2\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i)))\nh : IsCompatible F.val U sf\nV_eq_supr_U : V = iSup U\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_spec : IsGluing F.val U sf gl\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\ngl' : (CategoryTheory.forget C).obj (F.val.obj (op V))\ngl'_spec : ∀ (i : ι), ↑(F.val.map (iUV i).op) gl' = sf i\n⊢ gl' = ↑(F.val.map (eqToHom V_eq_supr_U).op) gl\n[PROOFSTEP]\nconvert congr_arg _ (gl_uniq (F.1.map (eqToHom V_eq_supr_U.symm).op gl') fun i => _)\n[GOAL]\ncase h.e'_2\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i)))\nh : IsCompatible F.val U sf\nV_eq_supr_U : V = iSup U\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_spec : IsGluing F.val U sf gl\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\ngl' : (CategoryTheory.forget C).obj (F.val.obj (op V))\ngl'_spec : ∀ (i : ι), ↑(F.val.map (iUV i).op) gl' = sf i\n⊢ gl' = ↑(F.val.map (eqToHom V_eq_supr_U).op) (↑(F.val.map (eqToHom (_ : iSup U = V)).op) gl')\n[PROOFSTEP]\nrw [← comp_apply, ← F.1.map_comp]\n[GOAL]\ncase intro.intro.refine'_2.convert_3\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i)))\nh : IsCompatible F.val U sf\nV_eq_supr_U : V = iSup U\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_spec : IsGluing F.val U sf gl\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\ngl' : (CategoryTheory.forget C).obj (F.val.obj (op V))\ngl'_spec : ∀ (i : ι), ↑(F.val.map (iUV i).op) gl' = sf i\ni : ι\n⊢ ↑(F.val.map (leSupr U i).op) (↑(F.val.map (eqToHom (_ : iSup U = V)).op) gl') = sf i\n[PROOFSTEP]\nrw [← comp_apply, ← F.1.map_comp]\n[GOAL]\ncase h.e'_2\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i)))\nh : IsCompatible F.val U sf\nV_eq_supr_U : V = iSup U\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_spec : IsGluing F.val U sf gl\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\ngl' : (CategoryTheory.forget C).obj (F.val.obj (op V))\ngl'_spec : ∀ (i : ι), ↑(F.val.map (iUV i).op) gl' = sf i\n⊢ gl' = ↑(F.val.map ((eqToHom (_ : iSup U = V)).op ≫ (eqToHom V_eq_supr_U).op)) gl'\n[PROOFSTEP]\nrw [eqToHom_op, eqToHom_op, eqToHom_trans, eqToHom_refl, F.1.map_id, id_apply]\n[GOAL]\ncase intro.intro.refine'_2.convert_3\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i)))\nh : IsCompatible F.val U sf\nV_eq_supr_U : V = iSup U\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_spec : IsGluing F.val U sf gl\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\ngl' : (CategoryTheory.forget C).obj (F.val.obj (op V))\ngl'_spec : ∀ (i : ι), ↑(F.val.map (iUV i).op) gl' = sf i\ni : ι\n⊢ ↑(F.val.map ((eqToHom (_ : iSup U = V)).op ≫ (leSupr U i).op)) gl' = sf i\n[PROOFSTEP]\nconvert gl'_spec i\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\n⊢ s = t\n[PROOFSTEP]\nlet sf : ∀ i : ι, F.1.obj (op (U i)) := fun i => F.1.map (Opens.leSupr U i).op s\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\n⊢ s = t\n[PROOFSTEP]\nhave sf_compatible : IsCompatible _ U sf := by\n  intro i j\n  simp_rw [← comp_apply, ← F.1.map_comp]\n  rfl\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\n⊢ IsCompatible F.val U sf\n[PROOFSTEP]\nintro i j\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\ni j : ι\n⊢ ↑(F.val.map (infLELeft (U i) (U j)).op) (sf i) = ↑(F.val.map (infLERight (U i) (U j)).op) (sf j)\n[PROOFSTEP]\nsimp_rw [← comp_apply, ← F.1.map_comp]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\ni j : ι\n⊢ ↑(F.val.map ((leSupr U i).op ≫ (infLELeft (U i) (U j)).op)) s =\n    ↑(F.val.map ((leSupr U j).op ≫ (infLERight (U i) (U j)).op)) s\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\nsf_compatible : IsCompatible F.val U sf\n⊢ s = t\n[PROOFSTEP]\nobtain ⟨gl, -, gl_uniq⟩ := F.existsUnique_gluing U sf sf_compatible\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\nsf_compatible : IsCompatible F.val U sf\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\n⊢ s = t\n[PROOFSTEP]\ntrans gl\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\nsf_compatible : IsCompatible F.val U sf\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\n⊢ s = gl\n[PROOFSTEP]\napply gl_uniq\n[GOAL]\ncase a\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\nsf_compatible : IsCompatible F.val U sf\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\n⊢ IsGluing F.val U sf s\n[PROOFSTEP]\nintro i\n[GOAL]\ncase a\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\nsf_compatible : IsCompatible F.val U sf\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\ni : ι\n⊢ ↑(F.val.map (leSupr U i).op) s = sf i\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\nsf_compatible : IsCompatible F.val U sf\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\n⊢ gl = t\n[PROOFSTEP]\nsymm\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\nsf_compatible : IsCompatible F.val U sf\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\n⊢ t = gl\n[PROOFSTEP]\napply gl_uniq\n[GOAL]\ncase a\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\nsf_compatible : IsCompatible F.val U sf\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\n⊢ IsGluing F.val U sf t\n[PROOFSTEP]\nintro i\n[GOAL]\ncase a\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\ns t : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\nh : ∀ (i : ι), ↑(F.val.map (leSupr U i).op) s = ↑(F.val.map (leSupr U i).op) t\nsf : (i : ι) → (CategoryTheory.forget C).obj (F.val.obj (op (U i))) := fun i => ↑(F.val.map (leSupr U i).op) s\nsf_compatible : IsCompatible F.val U sf\ngl : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))\ngl_uniq : ∀ (y : (CategoryTheory.forget C).obj (F.val.obj (op (iSup U)))), (fun s => IsGluing F.val U sf s) y → y = gl\ni : ι\n⊢ ↑(F.val.map (leSupr U i).op) t = sf i\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh : ∀ (i : ι), ↑(F.val.map (iUV i).op) s = ↑(F.val.map (iUV i).op) t\n⊢ s = t\n[PROOFSTEP]\nhave V_eq_supr_U : V = iSup U := le_antisymm hcover (iSup_le fun i => (iUV i).le)\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh : ∀ (i : ι), ↑(F.val.map (iUV i).op) s = ↑(F.val.map (iUV i).op) t\nV_eq_supr_U : V = iSup U\n⊢ s = t\n[PROOFSTEP]\nsuffices F.1.map (eqToHom V_eq_supr_U.symm).op s = F.1.map (eqToHom V_eq_supr_U.symm).op t by\n  convert congr_arg (F.1.map (eqToHom V_eq_supr_U).op) this <;>\n    rw [← comp_apply, ← F.1.map_comp, eqToHom_op, eqToHom_op, eqToHom_trans, eqToHom_refl, F.1.map_id, id_apply]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh : ∀ (i : ι), ↑(F.val.map (iUV i).op) s = ↑(F.val.map (iUV i).op) t\nV_eq_supr_U : V = iSup U\nthis : ↑(F.val.map (eqToHom (_ : iSup U = V)).op) s = ↑(F.val.map (eqToHom (_ : iSup U = V)).op) t\n⊢ s = t\n[PROOFSTEP]\nconvert congr_arg (F.1.map (eqToHom V_eq_supr_U).op) this\n[GOAL]\ncase h.e'_2\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh : ∀ (i : ι), ↑(F.val.map (iUV i).op) s = ↑(F.val.map (iUV i).op) t\nV_eq_supr_U : V = iSup U\nthis : ↑(F.val.map (eqToHom (_ : iSup U = V)).op) s = ↑(F.val.map (eqToHom (_ : iSup U = V)).op) t\n⊢ s = ↑(F.val.map (eqToHom V_eq_supr_U).op) (↑(F.val.map (eqToHom (_ : iSup U = V)).op) s)\n[PROOFSTEP]\nrw [← comp_apply, ← F.1.map_comp, eqToHom_op, eqToHom_op, eqToHom_trans, eqToHom_refl, F.1.map_id, id_apply]\n[GOAL]\ncase h.e'_3\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh : ∀ (i : ι), ↑(F.val.map (iUV i).op) s = ↑(F.val.map (iUV i).op) t\nV_eq_supr_U : V = iSup U\nthis : ↑(F.val.map (eqToHom (_ : iSup U = V)).op) s = ↑(F.val.map (eqToHom (_ : iSup U = V)).op) t\n⊢ t = ↑(F.val.map (eqToHom V_eq_supr_U).op) (↑(F.val.map (eqToHom (_ : iSup U = V)).op) t)\n[PROOFSTEP]\nrw [← comp_apply, ← F.1.map_comp, eqToHom_op, eqToHom_op, eqToHom_trans, eqToHom_refl, F.1.map_id, id_apply]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh : ∀ (i : ι), ↑(F.val.map (iUV i).op) s = ↑(F.val.map (iUV i).op) t\nV_eq_supr_U : V = iSup U\n⊢ ↑(F.val.map (eqToHom (_ : iSup U = V)).op) s = ↑(F.val.map (eqToHom (_ : iSup U = V)).op) t\n[PROOFSTEP]\napply eq_of_locally_eq\n[GOAL]\ncase h\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh : ∀ (i : ι), ↑(F.val.map (iUV i).op) s = ↑(F.val.map (iUV i).op) t\nV_eq_supr_U : V = iSup U\n⊢ ∀ (i : ι),\n    ↑(F.val.map (leSupr U i).op) (↑(F.val.map (eqToHom (_ : iSup U = V)).op) s) =\n      ↑(F.val.map (leSupr U i).op) (↑(F.val.map (eqToHom (_ : iSup U = V)).op) t)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh : ∀ (i : ι), ↑(F.val.map (iUV i).op) s = ↑(F.val.map (iUV i).op) t\nV_eq_supr_U : V = iSup U\ni : ι\n⊢ ↑(F.val.map (leSupr U i).op) (↑(F.val.map (eqToHom (_ : iSup U = V)).op) s) =\n    ↑(F.val.map (leSupr U i).op) (↑(F.val.map (eqToHom (_ : iSup U = V)).op) t)\n[PROOFSTEP]\nrw [← comp_apply, ← comp_apply, ← F.1.map_comp]\n[GOAL]\ncase h\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nV : Opens ↑X\niUV : (i : ι) → U i ⟶ V\nhcover : V ≤ iSup U\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh : ∀ (i : ι), ↑(F.val.map (iUV i).op) s = ↑(F.val.map (iUV i).op) t\nV_eq_supr_U : V = iSup U\ni : ι\n⊢ ↑(F.val.map ((eqToHom (_ : iSup U = V)).op ≫ (leSupr U i).op)) s =\n    ↑(F.val.map ((eqToHom (_ : iSup U = V)).op ≫ (leSupr U i).op)) t\n[PROOFSTEP]\nconvert h i\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ s = t\n[PROOFSTEP]\nclassical\nfapply F.eq_of_locally_eq' fun t : ULift Bool => if t.1 then U₁ else U₂\n· exact fun i => if h : i.1 then eqToHom (if_pos h) ≫ i₁ else eqToHom (if_neg h) ≫ i₂\n· refine' le_trans hcover _\n  rw [sup_le_iff]\n  constructor\n  · convert le_iSup (fun t : ULift Bool => if t.1 then U₁ else U₂) (ULift.up True)\n  · convert le_iSup (fun t : ULift Bool => if t.1 then U₁ else U₂) (ULift.up False)\n· rintro ⟨_ | _⟩\n  any_goals exact h₁\n  any_goals exact h₂\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ s = t\n[PROOFSTEP]\nfapply F.eq_of_locally_eq' fun t : ULift Bool => if t.1 then U₁ else U₂\n[GOAL]\ncase iUV\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ (i : ULift Bool) → (if i.down = true then U₁ else U₂) ⟶ V\n[PROOFSTEP]\nexact fun i => if h : i.1 then eqToHom (if_pos h) ≫ i₁ else eqToHom (if_neg h) ≫ i₂\n[GOAL]\ncase hcover\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ V ≤ ⨆ (t : ULift Bool), if t.down = true then U₁ else U₂\n[PROOFSTEP]\nrefine' le_trans hcover _\n[GOAL]\ncase hcover\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ U₁ ⊔ U₂ ≤ ⨆ (t : ULift Bool), if t.down = true then U₁ else U₂\n[PROOFSTEP]\nrw [sup_le_iff]\n[GOAL]\ncase hcover\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ (U₁ ≤ ⨆ (t : ULift Bool), if t.down = true then U₁ else U₂) ∧\n    U₂ ≤ ⨆ (t : ULift Bool), if t.down = true then U₁ else U₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase hcover.left\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ U₁ ≤ ⨆ (t : ULift Bool), if t.down = true then U₁ else U₂\n[PROOFSTEP]\nconvert le_iSup (fun t : ULift Bool => if t.1 then U₁ else U₂) (ULift.up True)\n[GOAL]\ncase hcover.right\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ U₂ ≤ ⨆ (t : ULift Bool), if t.down = true then U₁ else U₂\n[PROOFSTEP]\nconvert le_iSup (fun t : ULift Bool => if t.1 then U₁ else U₂) (ULift.up False)\n[GOAL]\ncase h\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ ∀ (i : ULift Bool),\n    ↑(F.val.map\n            (if h : i.down = true then eqToHom (_ : (if i.down = true then U₁ else U₂) = U₁) ≫ i₁\n              else eqToHom (_ : (if i.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n        s =\n      ↑(F.val.map\n            (if h : i.down = true then eqToHom (_ : (if i.down = true then U₁ else U₂) = U₁) ≫ i₁\n              else eqToHom (_ : (if i.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n        t\n[PROOFSTEP]\nrintro ⟨_ | _⟩\n[GOAL]\ncase h.up.false\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ ↑(F.val.map\n          (if h : { down := false }.down = true then\n              eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₁) ≫ i₁\n            else eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n      s =\n    ↑(F.val.map\n          (if h : { down := false }.down = true then\n              eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₁) ≫ i₁\n            else eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n      t\ncase h.up.true\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ ↑(F.val.map\n          (if h : { down := true }.down = true then\n              eqToHom (_ : (if { down := true }.down = true then U₁ else U₂) = U₁) ≫ i₁\n            else eqToHom (_ : (if { down := true }.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n      s =\n    ↑(F.val.map\n          (if h : { down := true }.down = true then\n              eqToHom (_ : (if { down := true }.down = true then U₁ else U₂) = U₁) ≫ i₁\n            else eqToHom (_ : (if { down := true }.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n      t\n[PROOFSTEP]\nany_goals exact h₁\n[GOAL]\ncase h.up.false\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ ↑(F.val.map\n          (if h : { down := false }.down = true then\n              eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₁) ≫ i₁\n            else eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n      s =\n    ↑(F.val.map\n          (if h : { down := false }.down = true then\n              eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₁) ≫ i₁\n            else eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n      t\n[PROOFSTEP]\nexact h₁\n[GOAL]\ncase h.up.true\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ ↑(F.val.map\n          (if h : { down := true }.down = true then\n              eqToHom (_ : (if { down := true }.down = true then U₁ else U₂) = U₁) ≫ i₁\n            else eqToHom (_ : (if { down := true }.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n      s =\n    ↑(F.val.map\n          (if h : { down := true }.down = true then\n              eqToHom (_ : (if { down := true }.down = true then U₁ else U₂) = U₁) ≫ i₁\n            else eqToHom (_ : (if { down := true }.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n      t\n[PROOFSTEP]\nexact h₁\n[GOAL]\ncase h.up.false\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ ↑(F.val.map\n          (if h : { down := false }.down = true then\n              eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₁) ≫ i₁\n            else eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n      s =\n    ↑(F.val.map\n          (if h : { down := false }.down = true then\n              eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₁) ≫ i₁\n            else eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n      t\n[PROOFSTEP]\nany_goals exact h₂\n[GOAL]\ncase h.up.false\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : ConcreteCategory C\ninst✝² : HasLimits C\ninst✝¹ : ReflectsIsomorphisms ConcreteCategory.forget\ninst✝ : PreservesLimits ConcreteCategory.forget\nX : TopCat\nF : Sheaf C X\nι : Type v\nU : ι → Opens ↑X\nU₁ U₂ V : Opens ↑X\ni₁ : U₁ ⟶ V\ni₂ : U₂ ⟶ V\nhcover : V ≤ U₁ ⊔ U₂\ns t : (CategoryTheory.forget C).obj (F.val.obj (op V))\nh₁ : ↑(F.val.map i₁.op) s = ↑(F.val.map i₁.op) t\nh₂ : ↑(F.val.map i₂.op) s = ↑(F.val.map i₂.op) t\n⊢ ↑(F.val.map\n          (if h : { down := false }.down = true then\n              eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₁) ≫ i₁\n            else eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n      s =\n    ↑(F.val.map\n          (if h : { down := false }.down = true then\n              eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₁) ≫ i₁\n            else eqToHom (_ : (if { down := false }.down = true then U₁ else U₂) = U₂) ≫ i₂).op)\n      t\n[PROOFSTEP]\nexact h₂\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sheaves.SheafCondition.UniqueGluing", "llama_tokens": 34936, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.640635854839898, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.35521366030339907}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nf : Z ⟶ Y\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\n⊢ HomologicalComplex.Hom.f J.ι 0 ≫ descFZero f I J ≫ HomologicalComplex.d I.cocomplex 0 1 = 0\n[PROOFSTEP]\nsimp [← Category.assoc, descFZero]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nf : Z ⟶ Y\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\n⊢ HomologicalComplex.d J.cocomplex 0 1 ≫ descFOne f I J = descFZero f I J ≫ HomologicalComplex.d I.cocomplex 0 1\n[PROOFSTEP]\nsimp [descFZero, descFOne]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\nn : ℕ\ng : HomologicalComplex.X J.cocomplex n ⟶ HomologicalComplex.X I.cocomplex n\ng' : HomologicalComplex.X J.cocomplex (n + 1) ⟶ HomologicalComplex.X I.cocomplex (n + 1)\nw : HomologicalComplex.d J.cocomplex n (n + 1) ≫ g' = g ≫ HomologicalComplex.d I.cocomplex n (n + 1)\n⊢ HomologicalComplex.d J.cocomplex n (n + 1) ≫ g' ≫ HomologicalComplex.d I.cocomplex (n + 1) (n + 2) = 0\n[PROOFSTEP]\nsimp [← Category.assoc, w]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\nn : ℕ\ng : HomologicalComplex.X J.cocomplex n ⟶ HomologicalComplex.X I.cocomplex n\ng' : HomologicalComplex.X J.cocomplex (n + 1) ⟶ HomologicalComplex.X I.cocomplex (n + 1)\nw : HomologicalComplex.d J.cocomplex n (n + 1) ≫ g' = g ≫ HomologicalComplex.d I.cocomplex n (n + 1)\n⊢ HomologicalComplex.d J.cocomplex (n + 1) (n + 2) ≫\n      Exact.desc (g' ≫ HomologicalComplex.d I.cocomplex (n + 1) (n + 2)) (HomologicalComplex.d J.cocomplex n (n + 1))\n        (HomologicalComplex.d J.cocomplex (n + 1) (n + 2))\n        (_ :\n          Exact (HomologicalComplex.d J.cocomplex (n + 1) (n + 2)).op (HomologicalComplex.d J.cocomplex n (n + 1)).op)\n        (_ : HomologicalComplex.d J.cocomplex n (n + 1) ≫ g' ≫ HomologicalComplex.d I.cocomplex (n + 1) (n + 2) = 0) =\n    g' ≫ HomologicalComplex.d I.cocomplex (n + 1) (n + 2)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nf : Z ⟶ Y\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\n⊢ J.ι ≫ desc f I J = (CochainComplex.single₀ C).map f ≫ I.ι\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nf : Z ⟶ Y\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\n⊢ HomologicalComplex.Hom.f (J.ι ≫ desc f I J) 0 = HomologicalComplex.Hom.f ((CochainComplex.single₀ C).map f ≫ I.ι) 0\n[PROOFSTEP]\nsimp [desc, descFOne, descFZero]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\nf : I.cocomplex ⟶ J.cocomplex\ncomm : I.ι ≫ f = 0\n⊢ HomologicalComplex.d I.cocomplex 0 1 ≫\n      (HomologicalComplex.Hom.f f 1 - descHomotopyZeroZero f comm ≫ HomologicalComplex.d J.cocomplex 0 1) =\n    0\n[PROOFSTEP]\nsimp [descHomotopyZeroZero, ← Category.assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\nf : I.cocomplex ⟶ J.cocomplex\nn : ℕ\ng : HomologicalComplex.X I.cocomplex (n + 1) ⟶ HomologicalComplex.X J.cocomplex n\ng' : HomologicalComplex.X I.cocomplex (n + 2) ⟶ HomologicalComplex.X J.cocomplex (n + 1)\nw :\n  HomologicalComplex.Hom.f f (n + 1) =\n    HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫ g' + g ≫ HomologicalComplex.d J.cocomplex n (n + 1)\n⊢ HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫\n      (HomologicalComplex.Hom.f f (n + 2) - g' ≫ HomologicalComplex.d J.cocomplex (n + 1) (n + 2)) =\n    0\n[PROOFSTEP]\nsimp [Preadditive.comp_sub, ← Category.assoc, Preadditive.sub_comp,\n  show I.cocomplex.d (n + 1) (n + 2) ≫ g' = f.f (n + 1) - g ≫ J.cocomplex.d n (n + 1)\n    by\n    rw [w]\n    simp only [add_sub_cancel]]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\nf : I.cocomplex ⟶ J.cocomplex\nn : ℕ\ng : HomologicalComplex.X I.cocomplex (n + 1) ⟶ HomologicalComplex.X J.cocomplex n\ng' : HomologicalComplex.X I.cocomplex (n + 2) ⟶ HomologicalComplex.X J.cocomplex (n + 1)\nw :\n  HomologicalComplex.Hom.f f (n + 1) =\n    HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫ g' + g ≫ HomologicalComplex.d J.cocomplex n (n + 1)\n⊢ HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫ g' =\n    HomologicalComplex.Hom.f f (n + 1) - g ≫ HomologicalComplex.d J.cocomplex n (n + 1)\n[PROOFSTEP]\nrw [w]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\nf : I.cocomplex ⟶ J.cocomplex\nn : ℕ\ng : HomologicalComplex.X I.cocomplex (n + 1) ⟶ HomologicalComplex.X J.cocomplex n\ng' : HomologicalComplex.X I.cocomplex (n + 2) ⟶ HomologicalComplex.X J.cocomplex (n + 1)\nw :\n  HomologicalComplex.Hom.f f (n + 1) =\n    HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫ g' + g ≫ HomologicalComplex.d J.cocomplex n (n + 1)\n⊢ HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫ g' =\n    HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫ g' + g ≫ HomologicalComplex.d J.cocomplex n (n + 1) -\n      g ≫ HomologicalComplex.d J.cocomplex n (n + 1)\n[PROOFSTEP]\nsimp only [add_sub_cancel]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\nf : I.cocomplex ⟶ J.cocomplex\ncomm : I.ι ≫ f = 0\n⊢ HomologicalComplex.Hom.f f 0 = HomologicalComplex.d I.cocomplex 0 1 ≫ descHomotopyZeroZero f comm\n[PROOFSTEP]\nsimp [descHomotopyZeroZero]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\nf : I.cocomplex ⟶ J.cocomplex\ncomm : I.ι ≫ f = 0\n⊢ HomologicalComplex.Hom.f f 1 =\n    descHomotopyZeroZero f comm ≫ HomologicalComplex.d J.cocomplex 0 1 +\n      HomologicalComplex.d I.cocomplex 1 2 ≫ descHomotopyZeroOne f comm\n[PROOFSTEP]\nsimp [descHomotopyZeroOne]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\nf : I.cocomplex ⟶ J.cocomplex\ncomm : I.ι ≫ f = 0\nn : ℕ\nx✝ :\n  (f_1 : HomologicalComplex.X I.cocomplex (n + 1) ⟶ HomologicalComplex.X J.cocomplex n) ×'\n    (f' : HomologicalComplex.X I.cocomplex (n + 2) ⟶ HomologicalComplex.X J.cocomplex (n + 1)) ×'\n      HomologicalComplex.Hom.f f (n + 1) =\n        f_1 ≫ HomologicalComplex.d J.cocomplex n (n + 1) + HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫ f'\ng : HomologicalComplex.X I.cocomplex (n + 1) ⟶ HomologicalComplex.X J.cocomplex n\ng' : HomologicalComplex.X I.cocomplex (n + 2) ⟶ HomologicalComplex.X J.cocomplex (n + 1)\nw :\n  HomologicalComplex.Hom.f f (n + 1) =\n    g ≫ HomologicalComplex.d J.cocomplex n (n + 1) + HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫ g'\n⊢ HomologicalComplex.Hom.f f (n + 1) =\n    HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫ g' + g ≫ HomologicalComplex.d J.cocomplex n (n + 1)\n[PROOFSTEP]\nsimp only [w, add_comm]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\nf : I.cocomplex ⟶ J.cocomplex\ncomm : I.ι ≫ f = 0\nn : ℕ\nx✝ :\n  (f_1 : HomologicalComplex.X I.cocomplex (n + 1) ⟶ HomologicalComplex.X J.cocomplex n) ×'\n    (f' : HomologicalComplex.X I.cocomplex (n + 2) ⟶ HomologicalComplex.X J.cocomplex (n + 1)) ×'\n      HomologicalComplex.Hom.f f (n + 1) =\n        f_1 ≫ HomologicalComplex.d J.cocomplex n (n + 1) + HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫ f'\ng : HomologicalComplex.X I.cocomplex (n + 1) ⟶ HomologicalComplex.X J.cocomplex n\ng' : HomologicalComplex.X I.cocomplex (n + 2) ⟶ HomologicalComplex.X J.cocomplex (n + 1)\nw :\n  HomologicalComplex.Hom.f f (n + 1) =\n    g ≫ HomologicalComplex.d J.cocomplex n (n + 1) + HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫ g'\n⊢ HomologicalComplex.Hom.f f (n + 2) =\n    { fst := g, snd := { fst := g', snd := w } }.snd.fst ≫ HomologicalComplex.d J.cocomplex (n + 1) (n + 2) +\n      HomologicalComplex.d I.cocomplex (n + 2) (n + 3) ≫\n        descHomotopyZeroSucc f n g g'\n          (_ :\n            HomologicalComplex.Hom.f f (n + 1) =\n              HomologicalComplex.d I.cocomplex (n + 1) (n + 2) ≫ g' + g ≫ HomologicalComplex.d J.cocomplex n (n + 1))\n[PROOFSTEP]\nsimp [descHomotopyZeroSucc, w]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nY Z : C\nf : Y ⟶ Z\nI : InjectiveResolution Y\nJ : InjectiveResolution Z\ng h : I.cocomplex ⟶ J.cocomplex\ng_comm : I.ι ≫ g = (CochainComplex.single₀ C).map f ≫ J.ι\nh_comm : I.ι ≫ h = (CochainComplex.single₀ C).map f ≫ J.ι\n⊢ I.ι ≫ (g - h) = 0\n[PROOFSTEP]\nsimp [g_comm, h_comm]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nI : InjectiveResolution X\n⊢ Homotopy (desc (𝟙 X) I I) (𝟙 I.cocomplex)\n[PROOFSTEP]\napply descHomotopy (𝟙 X)\n[GOAL]\ncase g_comm\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nI : InjectiveResolution X\n⊢ I.ι ≫ desc (𝟙 X) I I = (CochainComplex.single₀ C).map (𝟙 X) ≫ I.ι\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_comm\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nI : InjectiveResolution X\n⊢ I.ι ≫ 𝟙 I.cocomplex = (CochainComplex.single₀ C).map (𝟙 X) ≫ I.ι\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nI : InjectiveResolution X\nJ : InjectiveResolution Y\nK : InjectiveResolution Z\n⊢ Homotopy (desc (f ≫ g) K I) (desc f J I ≫ desc g K J)\n[PROOFSTEP]\napply descHomotopy (f ≫ g)\n[GOAL]\ncase g_comm\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nI : InjectiveResolution X\nJ : InjectiveResolution Y\nK : InjectiveResolution Z\n⊢ I.ι ≫ desc (f ≫ g) K I = (CochainComplex.single₀ C).map (f ≫ g) ≫ K.ι\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_comm\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nI : InjectiveResolution X\nJ : InjectiveResolution Y\nK : InjectiveResolution Z\n⊢ I.ι ≫ desc f J I ≫ desc g K J = (CochainComplex.single₀ C).map (f ≫ g) ≫ K.ι\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nI J : InjectiveResolution X\n⊢ Homotopy (desc (𝟙 X ≫ 𝟙 X) I I) (𝟙 I.cocomplex)\n[PROOFSTEP]\nsimpa [Category.id_comp] using descIdHomotopy _ _\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nI J : InjectiveResolution X\n⊢ Homotopy (desc (𝟙 X ≫ 𝟙 X) J J) (𝟙 J.cocomplex)\n[PROOFSTEP]\nsimpa [Category.id_comp] using descIdHomotopy _ _\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nI J : InjectiveResolution X\n⊢ I.ι ≫ (homotopyEquiv I J).hom = J.ι\n[PROOFSTEP]\nsimp [homotopyEquiv]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Abelian C\nX : C\nI J : InjectiveResolution X\n⊢ J.ι ≫ (homotopyEquiv I J).inv = I.ι\n[PROOFSTEP]\nsimp [homotopyEquiv]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : HasInjectiveResolutions C\nX : C\n⊢ { obj := fun X => (HomotopyCategory.quotient C (ComplexShape.up ℕ)).obj (injectiveResolution X),\n          map := fun {X Y} f => (HomotopyCategory.quotient C (ComplexShape.up ℕ)).map (injectiveResolution.desc f) }.map\n      (𝟙 X) =\n    𝟙\n      ({ obj := fun X => (HomotopyCategory.quotient C (ComplexShape.up ℕ)).obj (injectiveResolution X),\n            map := fun {X Y} f =>\n              (HomotopyCategory.quotient C (ComplexShape.up ℕ)).map (injectiveResolution.desc f) }.obj\n        X)\n[PROOFSTEP]\nrw [← (HomotopyCategory.quotient _ _).map_id]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : HasInjectiveResolutions C\nX : C\n⊢ { obj := fun X => (HomotopyCategory.quotient C (ComplexShape.up ℕ)).obj (injectiveResolution X),\n          map := fun {X Y} f => (HomotopyCategory.quotient C (ComplexShape.up ℕ)).map (injectiveResolution.desc f) }.map\n      (𝟙 X) =\n    (HomotopyCategory.quotient C (ComplexShape.up ℕ)).map (𝟙 (injectiveResolution X))\n[PROOFSTEP]\napply HomotopyCategory.eq_of_homotopy\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : HasInjectiveResolutions C\nX : C\n⊢ Homotopy (injectiveResolution.desc (𝟙 X)) (𝟙 (injectiveResolution X))\n[PROOFSTEP]\napply InjectiveResolution.descIdHomotopy\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : HasInjectiveResolutions C\nX✝ Y✝ Z✝ : C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun X => (HomotopyCategory.quotient C (ComplexShape.up ℕ)).obj (injectiveResolution X),\n          map := fun {X Y} f => (HomotopyCategory.quotient C (ComplexShape.up ℕ)).map (injectiveResolution.desc f) }.map\n      (f ≫ g) =\n    { obj := fun X => (HomotopyCategory.quotient C (ComplexShape.up ℕ)).obj (injectiveResolution X),\n            map := fun {X Y} f =>\n              (HomotopyCategory.quotient C (ComplexShape.up ℕ)).map (injectiveResolution.desc f) }.map\n        f ≫\n      { obj := fun X => (HomotopyCategory.quotient C (ComplexShape.up ℕ)).obj (injectiveResolution X),\n            map := fun {X Y} f =>\n              (HomotopyCategory.quotient C (ComplexShape.up ℕ)).map (injectiveResolution.desc f) }.map\n        g\n[PROOFSTEP]\nrw [← (HomotopyCategory.quotient _ _).map_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : HasInjectiveResolutions C\nX✝ Y✝ Z✝ : C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun X => (HomotopyCategory.quotient C (ComplexShape.up ℕ)).obj (injectiveResolution X),\n          map := fun {X Y} f => (HomotopyCategory.quotient C (ComplexShape.up ℕ)).map (injectiveResolution.desc f) }.map\n      (f ≫ g) =\n    (HomotopyCategory.quotient C (ComplexShape.up ℕ)).map (injectiveResolution.desc f ≫ injectiveResolution.desc g)\n[PROOFSTEP]\napply HomotopyCategory.eq_of_homotopy\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : HasInjectiveResolutions C\nX✝ Y✝ Z✝ : C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ Homotopy (injectiveResolution.desc (f ≫ g)) (injectiveResolution.desc f ≫ injectiveResolution.desc g)\n[PROOFSTEP]\napply InjectiveResolution.descCompHomotopy\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nX Y : C\nf : X ⟶ Y\n⊢ f ≫ d f = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nX Y : C\nf : X ⟶ Y\n⊢ (kernel.ι (d f) ≫ cokernel.π f) ≫ ι (cokernel f) = 0\n[PROOFSTEP]\nrw [Category.assoc, kernel.condition]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\n⊢ Injective.ι Z ≫ HomologicalComplex.d (ofCocomplex Z) 0 1 =\n    HomologicalComplex.d ((CochainComplex.single₀ C).obj Z) 0 1 ≫ 0\n[PROOFSTEP]\nsimp only [ofCocomplex_d, eq_self_iff_true, eqToHom_refl, Category.comp_id, dite_eq_ite, if_true, comp_zero]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\n⊢ Injective.ι Z ≫\n      (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))\n          (d (d (Injective.ι Z)))\n          (_ :\n            { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫\n                {\n                      fst :=\n                        syzygies\n                          { fst := under Z,\n                                snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                      snd :=\n                        {\n                          fst :=\n                            d\n                              { fst := under Z,\n                                    snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                          snd :=\n                            (_ :\n                              { fst := under Z,\n                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫\n                                  d\n                                    { fst := under Z,\n                                          snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =\n                                0) } }.snd.fst =\n              0)\n          (fun t =>\n            { fst := syzygies t.snd.snd.snd.snd.fst,\n              snd :=\n                { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })\n          0).d₀ =\n    0\n[PROOFSTEP]\nexact (exact_f_d (Injective.ι Z)).w\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\nn : ℕ\n⊢ Exact (HomologicalComplex.d (ofCocomplex Z) 0 (0 + 1)) (HomologicalComplex.d (ofCocomplex Z) (0 + 1) (0 + 2))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\nn : ℕ\n⊢ Exact\n    (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))\n        (d (d (Injective.ι Z)))\n        (_ :\n          { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫\n              {\n                    fst :=\n                      syzygies\n                        { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                    snd :=\n                      {\n                        fst :=\n                          d\n                            { fst := under Z,\n                                  snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                        snd :=\n                          (_ :\n                            { fst := under Z,\n                                      snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫\n                                d\n                                  { fst := under Z,\n                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =\n                              0) } }.snd.fst =\n            0)\n        (fun t =>\n          { fst := syzygies t.snd.snd.snd.snd.fst,\n            snd :=\n              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })\n        0).d₀\n    (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))\n        (d (d (Injective.ι Z)))\n        (_ :\n          { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫\n              {\n                    fst :=\n                      syzygies\n                        { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                    snd :=\n                      {\n                        fst :=\n                          d\n                            { fst := under Z,\n                                  snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                        snd :=\n                          (_ :\n                            { fst := under Z,\n                                      snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫\n                                d\n                                  { fst := under Z,\n                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =\n                              0) } }.snd.fst =\n            0)\n        (fun t =>\n          { fst := syzygies t.snd.snd.snd.snd.fst,\n            snd :=\n              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })\n        (0 + 1)).d₀\n[PROOFSTEP]\napply exact_f_d\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\nn m : ℕ\n⊢ Exact (HomologicalComplex.d (ofCocomplex Z) (m + 1) (m + 1 + 1))\n    (HomologicalComplex.d (ofCocomplex Z) (m + 1 + 1) (m + 1 + 2))\n[PROOFSTEP]\nsimp only [ofCocomplex_X, ComplexShape.up_Rel, not_true, ofCocomplex_d, eqToHom_refl, Category.comp_id, dite_eq_ite,\n  ite_true]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\nn m : ℕ\n⊢ Exact\n    (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))\n        (d (d (Injective.ι Z)))\n        (_ :\n          { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫\n              {\n                    fst :=\n                      syzygies\n                        { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                    snd :=\n                      {\n                        fst :=\n                          d\n                            { fst := under Z,\n                                  snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                        snd :=\n                          (_ :\n                            { fst := under Z,\n                                      snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫\n                                d\n                                  { fst := under Z,\n                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =\n                              0) } }.snd.fst =\n            0)\n        (fun t =>\n          { fst := syzygies t.snd.snd.snd.snd.fst,\n            snd :=\n              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })\n        (m + 1)).d₀\n    (if m + 1 + 1 + 1 = m + 1 + 2 then\n      (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))\n          (d (d (Injective.ι Z)))\n          (_ :\n            { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫\n                {\n                      fst :=\n                        syzygies\n                          { fst := under Z,\n                                snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                      snd :=\n                        {\n                          fst :=\n                            d\n                              { fst := under Z,\n                                    snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                          snd :=\n                            (_ :\n                              { fst := under Z,\n                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫\n                                  d\n                                    { fst := under Z,\n                                          snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =\n                                0) } }.snd.fst =\n              0)\n          (fun t =>\n            { fst := syzygies t.snd.snd.snd.snd.fst,\n              snd :=\n                { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })\n          (m + 1 + 1)).d₀\n    else 0)\n[PROOFSTEP]\nerw [if_pos (c := m + 1 + 1 + 1 = m + 2 + 1) rfl]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\nn m : ℕ\n⊢ Exact\n    (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))\n        (d (d (Injective.ι Z)))\n        (_ :\n          { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫\n              {\n                    fst :=\n                      syzygies\n                        { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                    snd :=\n                      {\n                        fst :=\n                          d\n                            { fst := under Z,\n                                  snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                        snd :=\n                          (_ :\n                            { fst := under Z,\n                                      snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫\n                                d\n                                  { fst := under Z,\n                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =\n                              0) } }.snd.fst =\n            0)\n        (fun t =>\n          { fst := syzygies t.snd.snd.snd.snd.fst,\n            snd :=\n              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })\n        (m + 1)).d₀\n    (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))\n        (d (d (Injective.ι Z)))\n        (_ :\n          { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫\n              {\n                    fst :=\n                      syzygies\n                        { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                    snd :=\n                      {\n                        fst :=\n                          d\n                            { fst := under Z,\n                                  snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,\n                        snd :=\n                          (_ :\n                            { fst := under Z,\n                                      snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫\n                                d\n                                  { fst := under Z,\n                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =\n                              0) } }.snd.fst =\n            0)\n        (fun t =>\n          { fst := syzygies t.snd.snd.snd.snd.fst,\n            snd :=\n              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })\n        (m + 1 + 1)).d₀\n[PROOFSTEP]\napply exact_f_d\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\nn : ℕ\nx✝ :\n  (f : HomologicalComplex.X ((CochainComplex.single₀ C).obj Z) n ⟶ HomologicalComplex.X (ofCocomplex Z) n) ×'\n    (f' :\n      HomologicalComplex.X ((CochainComplex.single₀ C).obj Z) (n + 1) ⟶ HomologicalComplex.X (ofCocomplex Z) (n + 1)) ×'\n      f ≫ HomologicalComplex.d (ofCocomplex Z) n (n + 1) =\n        HomologicalComplex.d ((CochainComplex.single₀ C).obj Z) n (n + 1) ≫ f'\n⊢ (f'' :\n    HomologicalComplex.X ((CochainComplex.single₀ C).obj Z) (n + 2) ⟶ HomologicalComplex.X (ofCocomplex Z) (n + 2)) ×'\n    x✝.snd.fst ≫ HomologicalComplex.d (ofCocomplex Z) (n + 1) (n + 2) =\n      HomologicalComplex.d ((CochainComplex.single₀ C).obj Z) (n + 1) (n + 2) ≫ f''\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase snd\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\nn : ℕ\nx✝ :\n  (f : HomologicalComplex.X ((CochainComplex.single₀ C).obj Z) n ⟶ HomologicalComplex.X (ofCocomplex Z) n) ×'\n    (f' :\n      HomologicalComplex.X ((CochainComplex.single₀ C).obj Z) (n + 1) ⟶ HomologicalComplex.X (ofCocomplex Z) (n + 1)) ×'\n      f ≫ HomologicalComplex.d (ofCocomplex Z) n (n + 1) =\n        HomologicalComplex.d ((CochainComplex.single₀ C).obj Z) n (n + 1) ≫ f'\n⊢ x✝.snd.fst ≫ HomologicalComplex.d (ofCocomplex Z) (n + 1) (n + 2) =\n    HomologicalComplex.d ((CochainComplex.single₀ C).obj Z) (n + 1) (n + 2) ≫ 0\n[PROOFSTEP]\napply HasZeroObject.from_zero_ext\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\n⊢ ∀ (n : ℕ), Injective (HomologicalComplex.X (ofCocomplex Z) n)\n[PROOFSTEP]\nrintro (_ | _ | _ | n)\n[GOAL]\ncase zero\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\n⊢ Injective (HomologicalComplex.X (ofCocomplex Z) Nat.zero)\n[PROOFSTEP]\napply Injective.injective_under\n[GOAL]\ncase succ.zero\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\n⊢ Injective (HomologicalComplex.X (ofCocomplex Z) (Nat.succ Nat.zero))\n[PROOFSTEP]\napply Injective.injective_under\n[GOAL]\ncase succ.succ.zero\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\n⊢ Injective (HomologicalComplex.X (ofCocomplex Z) (Nat.succ (Nat.succ Nat.zero)))\n[PROOFSTEP]\napply Injective.injective_under\n[GOAL]\ncase succ.succ.succ\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\nn : ℕ\n⊢ Injective (HomologicalComplex.X (ofCocomplex Z) (Nat.succ (Nat.succ (Nat.succ n))))\n[PROOFSTEP]\napply Injective.injective_under\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Abelian C\ninst✝ : EnoughInjectives C\nZ : C\n⊢ Exact\n    (HomologicalComplex.Hom.f\n      (CochainComplex.mkHom ((CochainComplex.single₀ C).obj Z) (ofCocomplex Z) (Injective.ι Z) 0\n        (_ :\n          Injective.ι Z ≫ HomologicalComplex.d (ofCocomplex Z) 0 1 =\n            HomologicalComplex.d ((CochainComplex.single₀ C).obj Z) 0 1 ≫ 0)\n        fun n x =>\n        { fst := 0,\n          snd :=\n            (_ :\n              x.snd.fst ≫ HomologicalComplex.d (ofCocomplex Z) (n + 1) (n + 2) =\n                HomologicalComplex.d ((CochainComplex.single₀ C).obj Z) (n + 1) (n + 2) ≫ 0) })\n      0)\n    (HomologicalComplex.d (ofCocomplex Z) 0 1)\n[PROOFSTEP]\nsimpa using exact_f_d (Injective.ι Z)\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Abelian.InjectiveResolution", "llama_tokens": 12256, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7154239957834733, "lm_q2_score": 0.4960938294709195, "lm_q1q2_score": 0.35491742976361024}}
{"text": "[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\n⊢ ∃ G, Injective G ∧ IsCoseparator G\n[PROOFSTEP]\nhaveI : WellPowered C := wellPowered_of_isDetector G hG.isDetector\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\nthis : WellPowered C\n⊢ ∃ G, Injective G ∧ IsCoseparator G\n[PROOFSTEP]\nhaveI : HasProductsOfShape (Subobject (op G)) C := hasProductsOfShape_of_small _ _\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\nthis✝ : WellPowered C\nthis : HasProductsOfShape (Subobject (op G)) C\n⊢ ∃ G, Injective G ∧ IsCoseparator G\n[PROOFSTEP]\nlet T : C := Injective.under (piObj fun P : Subobject (op G) => unop P)\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\nthis✝ : WellPowered C\nthis : HasProductsOfShape (Subobject (op G)) C\nT : C := Injective.under (∏ fun P => (Subobject.underlying.obj P).unop)\n⊢ ∃ G, Injective G ∧ IsCoseparator G\n[PROOFSTEP]\nrefine' ⟨T, inferInstance, (Preadditive.isCoseparator_iff _).2 fun X Y f hf => _⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\nthis✝ : WellPowered C\nthis : HasProductsOfShape (Subobject (op G)) C\nT : C := Injective.under (∏ fun P => (Subobject.underlying.obj P).unop)\nX Y : C\nf : X ⟶ Y\nhf : ∀ (h : Y ⟶ T), f ≫ h = 0\n⊢ f = 0\n[PROOFSTEP]\nrefine' (Preadditive.isSeparator_iff _).1 hG _ fun h => _\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\nthis✝ : WellPowered C\nthis : HasProductsOfShape (Subobject (op G)) C\nT : C := Injective.under (∏ fun P => (Subobject.underlying.obj P).unop)\nX Y : C\nf : X ⟶ Y\nhf : ∀ (h : Y ⟶ T), f ≫ h = 0\nh : G ⟶ X\n⊢ h ≫ f = 0\n[PROOFSTEP]\nsuffices hh : factorThruImage (h ≫ f) = 0\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\nthis✝ : WellPowered C\nthis : HasProductsOfShape (Subobject (op G)) C\nT : C := Injective.under (∏ fun P => (Subobject.underlying.obj P).unop)\nX Y : C\nf : X ⟶ Y\nhf : ∀ (h : Y ⟶ T), f ≫ h = 0\nh : G ⟶ X\nhh : factorThruImage (h ≫ f) = 0\n⊢ h ≫ f = 0\n[PROOFSTEP]\nrw [← Limits.image.fac (h ≫ f), hh, zero_comp]\n[GOAL]\ncase hh\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\nthis✝ : WellPowered C\nthis : HasProductsOfShape (Subobject (op G)) C\nT : C := Injective.under (∏ fun P => (Subobject.underlying.obj P).unop)\nX Y : C\nf : X ⟶ Y\nhf : ∀ (h : Y ⟶ T), f ≫ h = 0\nh : G ⟶ X\n⊢ factorThruImage (h ≫ f) = 0\n[PROOFSTEP]\nlet R := Subobject.mk (factorThruImage (h ≫ f)).op\n[GOAL]\ncase hh\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\nthis✝ : WellPowered C\nthis : HasProductsOfShape (Subobject (op G)) C\nT : C := Injective.under (∏ fun P => (Subobject.underlying.obj P).unop)\nX Y : C\nf : X ⟶ Y\nhf : ∀ (h : Y ⟶ T), f ≫ h = 0\nh : G ⟶ X\nR : Subobject (op G) := Subobject.mk (factorThruImage (h ≫ f)).op\n⊢ factorThruImage (h ≫ f) = 0\n[PROOFSTEP]\nlet q₁ : image (h ≫ f) ⟶ unop R := (Subobject.underlyingIso (factorThruImage (h ≫ f)).op).unop.hom\n[GOAL]\ncase hh\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\nthis✝ : WellPowered C\nthis : HasProductsOfShape (Subobject (op G)) C\nT : C := Injective.under (∏ fun P => (Subobject.underlying.obj P).unop)\nX Y : C\nf : X ⟶ Y\nhf : ∀ (h : Y ⟶ T), f ≫ h = 0\nh : G ⟶ X\nR : Subobject (op G) := Subobject.mk (factorThruImage (h ≫ f)).op\nq₁ : image (h ≫ f) ⟶ (Subobject.underlying.obj R).unop :=\n  (Iso.unop (Subobject.underlyingIso (factorThruImage (h ≫ f)).op)).hom\n⊢ factorThruImage (h ≫ f) = 0\n[PROOFSTEP]\nlet q₂ : unop (R : Cᵒᵖ) ⟶ piObj fun P : Subobject (op G) => unop P :=\n  section_ (Pi.π (fun P : Subobject (op G) => (unop P : C)) R)\n[GOAL]\ncase hh\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\nthis✝ : WellPowered C\nthis : HasProductsOfShape (Subobject (op G)) C\nT : C := Injective.under (∏ fun P => (Subobject.underlying.obj P).unop)\nX Y : C\nf : X ⟶ Y\nhf : ∀ (h : Y ⟶ T), f ≫ h = 0\nh : G ⟶ X\nR : Subobject (op G) := Subobject.mk (factorThruImage (h ≫ f)).op\nq₁ : image (h ≫ f) ⟶ (Subobject.underlying.obj R).unop :=\n  (Iso.unop (Subobject.underlyingIso (factorThruImage (h ≫ f)).op)).hom\nq₂ : (Subobject.underlying.obj R).unop ⟶ ∏ fun P => (Subobject.underlying.obj P).unop :=\n  section_ (Pi.π (fun P => (Subobject.underlying.obj P).unop) R)\n⊢ factorThruImage (h ≫ f) = 0\n[PROOFSTEP]\nlet q : image (h ≫ f) ⟶ T := q₁ ≫ q₂ ≫ Injective.ι _\n[GOAL]\ncase hh\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\nthis✝ : WellPowered C\nthis : HasProductsOfShape (Subobject (op G)) C\nT : C := Injective.under (∏ fun P => (Subobject.underlying.obj P).unop)\nX Y : C\nf : X ⟶ Y\nhf : ∀ (h : Y ⟶ T), f ≫ h = 0\nh : G ⟶ X\nR : Subobject (op G) := Subobject.mk (factorThruImage (h ≫ f)).op\nq₁ : image (h ≫ f) ⟶ (Subobject.underlying.obj R).unop :=\n  (Iso.unop (Subobject.underlyingIso (factorThruImage (h ≫ f)).op)).hom\nq₂ : (Subobject.underlying.obj R).unop ⟶ ∏ fun P => (Subobject.underlying.obj P).unop :=\n  section_ (Pi.π (fun P => (Subobject.underlying.obj P).unop) R)\nq : image (h ≫ f) ⟶ T := q₁ ≫ q₂ ≫ Injective.ι (∏ fun P => (Subobject.underlying.obj P).unop)\n⊢ factorThruImage (h ≫ f) = 0\n[PROOFSTEP]\nexact\n  zero_of_comp_mono q\n    (by\n      rw [← Injective.comp_factorThru q (Limits.image.ι (h ≫ f)), Limits.image.fac_assoc, Category.assoc, hf,\n        comp_zero])\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasLimits C\ninst✝ : EnoughInjectives C\nG : C\nhG : IsSeparator G\nthis✝ : WellPowered C\nthis : HasProductsOfShape (Subobject (op G)) C\nT : C := Injective.under (∏ fun P => (Subobject.underlying.obj P).unop)\nX Y : C\nf : X ⟶ Y\nhf : ∀ (h : Y ⟶ T), f ≫ h = 0\nh : G ⟶ X\nR : Subobject (op G) := Subobject.mk (factorThruImage (h ≫ f)).op\nq₁ : image (h ≫ f) ⟶ (Subobject.underlying.obj R).unop :=\n  (Iso.unop (Subobject.underlyingIso (factorThruImage (h ≫ f)).op)).hom\nq₂ : (Subobject.underlying.obj R).unop ⟶ ∏ fun P => (Subobject.underlying.obj P).unop :=\n  section_ (Pi.π (fun P => (Subobject.underlying.obj P).unop) R)\nq : image (h ≫ f) ⟶ T := q₁ ≫ q₂ ≫ Injective.ι (∏ fun P => (Subobject.underlying.obj P).unop)\n⊢ factorThruImage (h ≫ f) ≫ q = 0\n[PROOFSTEP]\nrw [← Injective.comp_factorThru q (Limits.image.ι (h ≫ f)), Limits.image.fac_assoc, Category.assoc, hf, comp_zero]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasColimits C\ninst✝ : EnoughProjectives C\nG : C\nhG : IsCoseparator G\n⊢ ∃ G, Projective G ∧ IsSeparator G\n[PROOFSTEP]\nobtain ⟨T, hT₁, hT₂⟩ := has_injective_coseparator (op G) ((isSeparator_op_iff _).2 hG)\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Abelian C\ninst✝¹ : HasColimits C\ninst✝ : EnoughProjectives C\nG : C\nhG : IsCoseparator G\nT : Cᵒᵖ\nhT₁ : Injective T\nhT₂ : IsCoseparator T\n⊢ ∃ G, Projective G ∧ IsSeparator G\n[PROOFSTEP]\nexact ⟨unop T, inferInstance, (isSeparator_unop_iff _).2 hT₂⟩\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Abelian.Generator", "llama_tokens": 3526, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.658417500561683, "lm_q2_score": 0.538983220687684, "lm_q1q2_score": 0.3548759850098709}}
{"text": "[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nterminated_at_succ_n : Stream'.Seq.TerminatedAt s (n + 1)\n⊢ squashSeq s n = s\n[PROOFSTEP]\nchange s.get? (n + 1) = none at terminated_at_succ_n \n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nterminated_at_succ_n : Stream'.Seq.get? s (n + 1) = none\n⊢ squashSeq s n = s\n[PROOFSTEP]\ncases s_nth_eq : s.get? n\n[GOAL]\ncase none\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nterminated_at_succ_n : Stream'.Seq.get? s (n + 1) = none\ns_nth_eq : Stream'.Seq.get? s n = none\n⊢ squashSeq s n = s\n[PROOFSTEP]\nsimp only [*, squashSeq]\n[GOAL]\ncase some\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nterminated_at_succ_n : Stream'.Seq.get? s (n + 1) = none\nval✝ : Pair K\ns_nth_eq : Stream'.Seq.get? s n = some val✝\n⊢ squashSeq s n = s\n[PROOFSTEP]\nsimp only [*, squashSeq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_n gp_succ_n : Pair K\ns_nth_eq : Stream'.Seq.get? s n = some gp_n\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\n⊢ Stream'.Seq.get? (squashSeq s n) n = some { a := gp_n.a, b := gp_n.b + gp_succ_n.a / gp_succ_n.b }\n[PROOFSTEP]\nsimp [*, squashSeq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\n⊢ Stream'.Seq.get? (squashSeq s n) m = Stream'.Seq.get? s m\n[PROOFSTEP]\ncases s_succ_nth_eq : s.get? (n + 1)\n[GOAL]\ncase none\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = none\n⊢ Stream'.Seq.get? (squashSeq s n) m = Stream'.Seq.get? s m\ncase some\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\nval✝ : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some val✝\n⊢ Stream'.Seq.get? (squashSeq s n) m = Stream'.Seq.get? s m\n[PROOFSTEP]\ncase none => rw [squashSeq_eq_self_of_terminated s_succ_nth_eq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = none\n⊢ Stream'.Seq.get? (squashSeq s n) m = Stream'.Seq.get? s m\n[PROOFSTEP]\ncase none => rw [squashSeq_eq_self_of_terminated s_succ_nth_eq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = none\n⊢ Stream'.Seq.get? (squashSeq s n) m = Stream'.Seq.get? s m\n[PROOFSTEP]\nrw [squashSeq_eq_self_of_terminated s_succ_nth_eq]\n[GOAL]\ncase some\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\nval✝ : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some val✝\n⊢ Stream'.Seq.get? (squashSeq s n) m = Stream'.Seq.get? s m\n[PROOFSTEP]\ncase some =>\n  obtain ⟨gp_n, s_nth_eq⟩ : ∃ gp_n, s.get? n = some gp_n\n  exact s.ge_stable n.le_succ s_succ_nth_eq\n  obtain ⟨gp_m, s_mth_eq⟩ : ∃ gp_m, s.get? m = some gp_m\n  exact s.ge_stable (le_of_lt m_lt_n) s_nth_eq\n  simp [*, squashSeq, m_lt_n.ne]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\nval✝ : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some val✝\n⊢ Stream'.Seq.get? (squashSeq s n) m = Stream'.Seq.get? s m\n[PROOFSTEP]\ncase some =>\n  obtain ⟨gp_n, s_nth_eq⟩ : ∃ gp_n, s.get? n = some gp_n\n  exact s.ge_stable n.le_succ s_succ_nth_eq\n  obtain ⟨gp_m, s_mth_eq⟩ : ∃ gp_m, s.get? m = some gp_m\n  exact s.ge_stable (le_of_lt m_lt_n) s_nth_eq\n  simp [*, squashSeq, m_lt_n.ne]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\nval✝ : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some val✝\n⊢ Stream'.Seq.get? (squashSeq s n) m = Stream'.Seq.get? s m\n[PROOFSTEP]\nobtain ⟨gp_n, s_nth_eq⟩ : ∃ gp_n, s.get? n = some gp_n\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\nval✝ : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some val✝\n⊢ ∃ gp_n, Stream'.Seq.get? s n = some gp_n\ncase intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\nval✝ : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some val✝\ngp_n : Pair K\ns_nth_eq : Stream'.Seq.get? s n = some gp_n\n⊢ Stream'.Seq.get? (squashSeq s n) m = Stream'.Seq.get? s m\n[PROOFSTEP]\nexact s.ge_stable n.le_succ s_succ_nth_eq\n[GOAL]\ncase intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\nval✝ : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some val✝\ngp_n : Pair K\ns_nth_eq : Stream'.Seq.get? s n = some gp_n\n⊢ Stream'.Seq.get? (squashSeq s n) m = Stream'.Seq.get? s m\n[PROOFSTEP]\nobtain ⟨gp_m, s_mth_eq⟩ : ∃ gp_m, s.get? m = some gp_m\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\nval✝ : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some val✝\ngp_n : Pair K\ns_nth_eq : Stream'.Seq.get? s n = some gp_n\n⊢ ∃ gp_m, Stream'.Seq.get? s m = some gp_m\ncase intro.intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\nval✝ : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some val✝\ngp_n : Pair K\ns_nth_eq : Stream'.Seq.get? s n = some gp_n\ngp_m : Pair K\ns_mth_eq : Stream'.Seq.get? s m = some gp_m\n⊢ Stream'.Seq.get? (squashSeq s n) m = Stream'.Seq.get? s m\n[PROOFSTEP]\nexact s.ge_stable (le_of_lt m_lt_n) s_nth_eq\n[GOAL]\ncase intro.intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\nval✝ : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some val✝\ngp_n : Pair K\ns_nth_eq : Stream'.Seq.get? s n = some gp_n\ngp_m : Pair K\ns_mth_eq : Stream'.Seq.get? s m = some gp_m\n⊢ Stream'.Seq.get? (squashSeq s n) m = Stream'.Seq.get? s m\n[PROOFSTEP]\nsimp [*, squashSeq, m_lt_n.ne]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\n⊢ Stream'.Seq.tail (squashSeq s (n + 1)) = squashSeq (Stream'.Seq.tail s) n\n[PROOFSTEP]\ncases' s_succ_succ_nth_eq : s.get? (n + 2) with gp_succ_succ_n\n[GOAL]\ncase none\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = none\n⊢ Stream'.Seq.tail (squashSeq s (n + 1)) = squashSeq (Stream'.Seq.tail s) n\ncase some\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\n⊢ Stream'.Seq.tail (squashSeq s (n + 1)) = squashSeq (Stream'.Seq.tail s) n\n[PROOFSTEP]\ncase none =>\n  cases s_succ_nth_eq : s.get? (n + 1) <;>\n    simp only [squashSeq, Stream'.Seq.get?_tail, s_succ_nth_eq, s_succ_succ_nth_eq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = none\n⊢ Stream'.Seq.tail (squashSeq s (n + 1)) = squashSeq (Stream'.Seq.tail s) n\n[PROOFSTEP]\ncase none =>\n  cases s_succ_nth_eq : s.get? (n + 1) <;>\n    simp only [squashSeq, Stream'.Seq.get?_tail, s_succ_nth_eq, s_succ_succ_nth_eq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = none\n⊢ Stream'.Seq.tail (squashSeq s (n + 1)) = squashSeq (Stream'.Seq.tail s) n\n[PROOFSTEP]\ncases s_succ_nth_eq : s.get? (n + 1)\n[GOAL]\ncase none\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = none\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = none\n⊢ Stream'.Seq.tail (squashSeq s (n + 1)) = squashSeq (Stream'.Seq.tail s) n\n[PROOFSTEP]\nsimp only [squashSeq, Stream'.Seq.get?_tail, s_succ_nth_eq, s_succ_succ_nth_eq]\n[GOAL]\ncase some\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = none\nval✝ : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some val✝\n⊢ Stream'.Seq.tail (squashSeq s (n + 1)) = squashSeq (Stream'.Seq.tail s) n\n[PROOFSTEP]\nsimp only [squashSeq, Stream'.Seq.get?_tail, s_succ_nth_eq, s_succ_succ_nth_eq]\n[GOAL]\ncase some\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\n⊢ Stream'.Seq.tail (squashSeq s (n + 1)) = squashSeq (Stream'.Seq.tail s) n\n[PROOFSTEP]\ncase some =>\n  obtain ⟨gp_succ_n, s_succ_nth_eq⟩ : ∃ gp_succ_n, s.get? (n + 1) = some gp_succ_n;\n  exact s.ge_stable (n + 1).le_succ s_succ_succ_nth_eq\n  ext1 m\n  cases' Decidable.em (m = n) with m_eq_n m_ne_n\n  · simp [*, squashSeq]\n  · have : s.tail.get? m = s.get? (m + 1) := s.get?_tail m\n    cases s_succ_mth_eq : s.get? (m + 1)\n    all_goals have _ := this.trans s_succ_mth_eq\n    · simp only [*, squashSeq, Stream'.Seq.get?_tail, Stream'.Seq.get?_zipWith, Option.map₂_none_right]\n    · simp [*, squashSeq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\n⊢ Stream'.Seq.tail (squashSeq s (n + 1)) = squashSeq (Stream'.Seq.tail s) n\n[PROOFSTEP]\ncase some =>\n  obtain ⟨gp_succ_n, s_succ_nth_eq⟩ : ∃ gp_succ_n, s.get? (n + 1) = some gp_succ_n;\n  exact s.ge_stable (n + 1).le_succ s_succ_succ_nth_eq\n  ext1 m\n  cases' Decidable.em (m = n) with m_eq_n m_ne_n\n  · simp [*, squashSeq]\n  · have : s.tail.get? m = s.get? (m + 1) := s.get?_tail m\n    cases s_succ_mth_eq : s.get? (m + 1)\n    all_goals have _ := this.trans s_succ_mth_eq\n    · simp only [*, squashSeq, Stream'.Seq.get?_tail, Stream'.Seq.get?_zipWith, Option.map₂_none_right]\n    · simp [*, squashSeq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\n⊢ Stream'.Seq.tail (squashSeq s (n + 1)) = squashSeq (Stream'.Seq.tail s) n\n[PROOFSTEP]\nobtain ⟨gp_succ_n, s_succ_nth_eq⟩ : ∃ gp_succ_n, s.get? (n + 1) = some gp_succ_n\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\n⊢ ∃ gp_succ_n, Stream'.Seq.get? s (n + 1) = some gp_succ_n\ncase intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\n⊢ Stream'.Seq.tail (squashSeq s (n + 1)) = squashSeq (Stream'.Seq.tail s) n\n[PROOFSTEP]\nexact s.ge_stable (n + 1).le_succ s_succ_succ_nth_eq\n[GOAL]\ncase intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\n⊢ Stream'.Seq.tail (squashSeq s (n + 1)) = squashSeq (Stream'.Seq.tail s) n\n[PROOFSTEP]\next1 m\n[GOAL]\ncase intro.h\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\nm : ℕ\n⊢ Stream'.Seq.get? (Stream'.Seq.tail (squashSeq s (n + 1))) m = Stream'.Seq.get? (squashSeq (Stream'.Seq.tail s) n) m\n[PROOFSTEP]\ncases' Decidable.em (m = n) with m_eq_n m_ne_n\n[GOAL]\ncase intro.h.inl\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\nm : ℕ\nm_eq_n : m = n\n⊢ Stream'.Seq.get? (Stream'.Seq.tail (squashSeq s (n + 1))) m = Stream'.Seq.get? (squashSeq (Stream'.Seq.tail s) n) m\n[PROOFSTEP]\nsimp [*, squashSeq]\n[GOAL]\ncase intro.h.inr\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\nm : ℕ\nm_ne_n : ¬m = n\n⊢ Stream'.Seq.get? (Stream'.Seq.tail (squashSeq s (n + 1))) m = Stream'.Seq.get? (squashSeq (Stream'.Seq.tail s) n) m\n[PROOFSTEP]\nhave : s.tail.get? m = s.get? (m + 1) := s.get?_tail m\n[GOAL]\ncase intro.h.inr\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\nm : ℕ\nm_ne_n : ¬m = n\nthis : Stream'.Seq.get? (Stream'.Seq.tail s) m = Stream'.Seq.get? s (m + 1)\n⊢ Stream'.Seq.get? (Stream'.Seq.tail (squashSeq s (n + 1))) m = Stream'.Seq.get? (squashSeq (Stream'.Seq.tail s) n) m\n[PROOFSTEP]\ncases s_succ_mth_eq : s.get? (m + 1)\n[GOAL]\ncase intro.h.inr.none\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\nm : ℕ\nm_ne_n : ¬m = n\nthis : Stream'.Seq.get? (Stream'.Seq.tail s) m = Stream'.Seq.get? s (m + 1)\ns_succ_mth_eq : Stream'.Seq.get? s (m + 1) = none\n⊢ Stream'.Seq.get? (Stream'.Seq.tail (squashSeq s (n + 1))) m = Stream'.Seq.get? (squashSeq (Stream'.Seq.tail s) n) m\ncase intro.h.inr.some\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\nm : ℕ\nm_ne_n : ¬m = n\nthis : Stream'.Seq.get? (Stream'.Seq.tail s) m = Stream'.Seq.get? s (m + 1)\nval✝ : Pair K\ns_succ_mth_eq : Stream'.Seq.get? s (m + 1) = some val✝\n⊢ Stream'.Seq.get? (Stream'.Seq.tail (squashSeq s (n + 1))) m = Stream'.Seq.get? (squashSeq (Stream'.Seq.tail s) n) m\n[PROOFSTEP]\nall_goals have _ := this.trans s_succ_mth_eq\n[GOAL]\ncase intro.h.inr.none\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\nm : ℕ\nm_ne_n : ¬m = n\nthis : Stream'.Seq.get? (Stream'.Seq.tail s) m = Stream'.Seq.get? s (m + 1)\ns_succ_mth_eq : Stream'.Seq.get? s (m + 1) = none\n⊢ Stream'.Seq.get? (Stream'.Seq.tail (squashSeq s (n + 1))) m = Stream'.Seq.get? (squashSeq (Stream'.Seq.tail s) n) m\n[PROOFSTEP]\nhave _ := this.trans s_succ_mth_eq\n[GOAL]\ncase intro.h.inr.some\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\nm : ℕ\nm_ne_n : ¬m = n\nthis : Stream'.Seq.get? (Stream'.Seq.tail s) m = Stream'.Seq.get? s (m + 1)\nval✝ : Pair K\ns_succ_mth_eq : Stream'.Seq.get? s (m + 1) = some val✝\n⊢ Stream'.Seq.get? (Stream'.Seq.tail (squashSeq s (n + 1))) m = Stream'.Seq.get? (squashSeq (Stream'.Seq.tail s) n) m\n[PROOFSTEP]\nhave _ := this.trans s_succ_mth_eq\n[GOAL]\ncase intro.h.inr.none\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\nm : ℕ\nm_ne_n : ¬m = n\nthis : Stream'.Seq.get? (Stream'.Seq.tail s) m = Stream'.Seq.get? s (m + 1)\ns_succ_mth_eq : Stream'.Seq.get? s (m + 1) = none\nx✝ : Stream'.Seq.get? (Stream'.Seq.tail s) m = none\n⊢ Stream'.Seq.get? (Stream'.Seq.tail (squashSeq s (n + 1))) m = Stream'.Seq.get? (squashSeq (Stream'.Seq.tail s) n) m\n[PROOFSTEP]\nsimp only [*, squashSeq, Stream'.Seq.get?_tail, Stream'.Seq.get?_zipWith, Option.map₂_none_right]\n[GOAL]\ncase intro.h.inr.some\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_succ_n : Pair K\ns_succ_succ_nth_eq : Stream'.Seq.get? s (n + 2) = some gp_succ_succ_n\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\nm : ℕ\nm_ne_n : ¬m = n\nthis : Stream'.Seq.get? (Stream'.Seq.tail s) m = Stream'.Seq.get? s (m + 1)\nval✝ : Pair K\ns_succ_mth_eq : Stream'.Seq.get? s (m + 1) = some val✝\nx✝ : Stream'.Seq.get? (Stream'.Seq.tail s) m = some val✝\n⊢ Stream'.Seq.get? (Stream'.Seq.tail (squashSeq s (n + 1))) m = Stream'.Seq.get? (squashSeq (Stream'.Seq.tail s) n) m\n[PROOFSTEP]\nsimp [*, squashSeq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\n⊢ convergents'Aux s (n + 2) = convergents'Aux (squashSeq s n) (n + 1)\n[PROOFSTEP]\ncases' s_succ_nth_eq : s.get? <| n + 1 with gp_succ_n\n[GOAL]\ncase none\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = none\n⊢ convergents'Aux s (n + 2) = convergents'Aux (squashSeq s n) (n + 1)\ncase some\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\n⊢ convergents'Aux s (n + 2) = convergents'Aux (squashSeq s n) (n + 1)\n[PROOFSTEP]\ncase none => rw [squashSeq_eq_self_of_terminated s_succ_nth_eq, convergents'Aux_stable_step_of_terminated s_succ_nth_eq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = none\n⊢ convergents'Aux s (n + 2) = convergents'Aux (squashSeq s n) (n + 1)\n[PROOFSTEP]\ncase none => rw [squashSeq_eq_self_of_terminated s_succ_nth_eq, convergents'Aux_stable_step_of_terminated s_succ_nth_eq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = none\n⊢ convergents'Aux s (n + 2) = convergents'Aux (squashSeq s n) (n + 1)\n[PROOFSTEP]\nrw [squashSeq_eq_self_of_terminated s_succ_nth_eq, convergents'Aux_stable_step_of_terminated s_succ_nth_eq]\n[GOAL]\ncase some\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\n⊢ convergents'Aux s (n + 2) = convergents'Aux (squashSeq s n) (n + 1)\n[PROOFSTEP]\ncase some =>\n  induction' n with m IH generalizing s gp_succ_n\n  case zero =>\n    obtain ⟨gp_head, s_head_eq⟩ : ∃ gp_head, s.head = some gp_head\n    exact s.ge_stable zero_le_one s_succ_nth_eq\n    have : (squashSeq s 0).head = some ⟨gp_head.a, gp_head.b + gp_succ_n.a / gp_succ_n.b⟩ :=\n      squashSeq_nth_of_not_terminated s_head_eq s_succ_nth_eq\n    simp_all [convergents'Aux, Stream'.Seq.head, Stream'.Seq.get?_tail]\n  case succ =>\n    obtain ⟨gp_head, s_head_eq⟩ : ∃ gp_head, s.head = some gp_head\n    exact s.ge_stable (m + 2).zero_le s_succ_nth_eq\n    suffices gp_head.a / (gp_head.b + convergents'Aux s.tail (m + 2)) = convergents'Aux (squashSeq s (m + 1)) (m + 2) by\n      simpa only [convergents'Aux, s_head_eq]\n    have : convergents'Aux s.tail (m + 2) = convergents'Aux (squashSeq s.tail m) (m + 1) :=\n      by\n      refine' IH gp_succ_n _\n      simpa [Stream'.Seq.get?_tail] using s_succ_nth_eq\n    have : (squashSeq s (m + 1)).head = some gp_head := (squashSeq_nth_of_lt m.succ_pos).trans s_head_eq\n    simp_all [convergents'Aux, squashSeq_succ_n_tail_eq_squashSeq_tail_n]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\n⊢ convergents'Aux s (n + 2) = convergents'Aux (squashSeq s n) (n + 1)\n[PROOFSTEP]\ncase some =>\n  induction' n with m IH generalizing s gp_succ_n\n  case zero =>\n    obtain ⟨gp_head, s_head_eq⟩ : ∃ gp_head, s.head = some gp_head\n    exact s.ge_stable zero_le_one s_succ_nth_eq\n    have : (squashSeq s 0).head = some ⟨gp_head.a, gp_head.b + gp_succ_n.a / gp_succ_n.b⟩ :=\n      squashSeq_nth_of_not_terminated s_head_eq s_succ_nth_eq\n    simp_all [convergents'Aux, Stream'.Seq.head, Stream'.Seq.get?_tail]\n  case succ =>\n    obtain ⟨gp_head, s_head_eq⟩ : ∃ gp_head, s.head = some gp_head\n    exact s.ge_stable (m + 2).zero_le s_succ_nth_eq\n    suffices gp_head.a / (gp_head.b + convergents'Aux s.tail (m + 2)) = convergents'Aux (squashSeq s (m + 1)) (m + 2) by\n      simpa only [convergents'Aux, s_head_eq]\n    have : convergents'Aux s.tail (m + 2) = convergents'Aux (squashSeq s.tail m) (m + 1) :=\n      by\n      refine' IH gp_succ_n _\n      simpa [Stream'.Seq.get?_tail] using s_succ_nth_eq\n    have : (squashSeq s (m + 1)).head = some gp_head := (squashSeq_nth_of_lt m.succ_pos).trans s_head_eq\n    simp_all [convergents'Aux, squashSeq_succ_n_tail_eq_squashSeq_tail_n]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (n + 1) = some gp_succ_n\n⊢ convergents'Aux s (n + 2) = convergents'Aux (squashSeq s n) (n + 1)\n[PROOFSTEP]\ninduction' n with m IH generalizing s gp_succ_n\n[GOAL]\ncase zero\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.zero + 1) = some gp_succ_n\n⊢ convergents'Aux s (Nat.zero + 2) = convergents'Aux (squashSeq s Nat.zero) (Nat.zero + 1)\ncase succ\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\n⊢ convergents'Aux s (Nat.succ m + 2) = convergents'Aux (squashSeq s (Nat.succ m)) (Nat.succ m + 1)\n[PROOFSTEP]\ncase zero =>\n  obtain ⟨gp_head, s_head_eq⟩ : ∃ gp_head, s.head = some gp_head\n  exact s.ge_stable zero_le_one s_succ_nth_eq\n  have : (squashSeq s 0).head = some ⟨gp_head.a, gp_head.b + gp_succ_n.a / gp_succ_n.b⟩ :=\n    squashSeq_nth_of_not_terminated s_head_eq s_succ_nth_eq\n  simp_all [convergents'Aux, Stream'.Seq.head, Stream'.Seq.get?_tail]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.zero + 1) = some gp_succ_n\n⊢ convergents'Aux s (Nat.zero + 2) = convergents'Aux (squashSeq s Nat.zero) (Nat.zero + 1)\n[PROOFSTEP]\ncase zero =>\n  obtain ⟨gp_head, s_head_eq⟩ : ∃ gp_head, s.head = some gp_head\n  exact s.ge_stable zero_le_one s_succ_nth_eq\n  have : (squashSeq s 0).head = some ⟨gp_head.a, gp_head.b + gp_succ_n.a / gp_succ_n.b⟩ :=\n    squashSeq_nth_of_not_terminated s_head_eq s_succ_nth_eq\n  simp_all [convergents'Aux, Stream'.Seq.head, Stream'.Seq.get?_tail]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.zero + 1) = some gp_succ_n\n⊢ convergents'Aux s (Nat.zero + 2) = convergents'Aux (squashSeq s Nat.zero) (Nat.zero + 1)\n[PROOFSTEP]\nobtain ⟨gp_head, s_head_eq⟩ : ∃ gp_head, s.head = some gp_head\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.zero + 1) = some gp_succ_n\n⊢ ∃ gp_head, Stream'.Seq.head s = some gp_head\ncase intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.zero + 1) = some gp_succ_n\ngp_head : Pair K\ns_head_eq : Stream'.Seq.head s = some gp_head\n⊢ convergents'Aux s (Nat.zero + 2) = convergents'Aux (squashSeq s Nat.zero) (Nat.zero + 1)\n[PROOFSTEP]\nexact s.ge_stable zero_le_one s_succ_nth_eq\n[GOAL]\ncase intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.zero + 1) = some gp_succ_n\ngp_head : Pair K\ns_head_eq : Stream'.Seq.head s = some gp_head\n⊢ convergents'Aux s (Nat.zero + 2) = convergents'Aux (squashSeq s Nat.zero) (Nat.zero + 1)\n[PROOFSTEP]\nhave : (squashSeq s 0).head = some ⟨gp_head.a, gp_head.b + gp_succ_n.a / gp_succ_n.b⟩ :=\n  squashSeq_nth_of_not_terminated s_head_eq s_succ_nth_eq\n[GOAL]\ncase intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.zero + 1) = some gp_succ_n\ngp_head : Pair K\ns_head_eq : Stream'.Seq.head s = some gp_head\nthis : Stream'.Seq.head (squashSeq s 0) = some { a := gp_head.a, b := gp_head.b + gp_succ_n.a / gp_succ_n.b }\n⊢ convergents'Aux s (Nat.zero + 2) = convergents'Aux (squashSeq s Nat.zero) (Nat.zero + 1)\n[PROOFSTEP]\nsimp_all [convergents'Aux, Stream'.Seq.head, Stream'.Seq.get?_tail]\n[GOAL]\ncase succ\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\n⊢ convergents'Aux s (Nat.succ m + 2) = convergents'Aux (squashSeq s (Nat.succ m)) (Nat.succ m + 1)\n[PROOFSTEP]\ncase succ =>\n  obtain ⟨gp_head, s_head_eq⟩ : ∃ gp_head, s.head = some gp_head\n  exact s.ge_stable (m + 2).zero_le s_succ_nth_eq\n  suffices gp_head.a / (gp_head.b + convergents'Aux s.tail (m + 2)) = convergents'Aux (squashSeq s (m + 1)) (m + 2) by\n    simpa only [convergents'Aux, s_head_eq]\n  have : convergents'Aux s.tail (m + 2) = convergents'Aux (squashSeq s.tail m) (m + 1) :=\n    by\n    refine' IH gp_succ_n _\n    simpa [Stream'.Seq.get?_tail] using s_succ_nth_eq\n  have : (squashSeq s (m + 1)).head = some gp_head := (squashSeq_nth_of_lt m.succ_pos).trans s_head_eq\n  simp_all [convergents'Aux, squashSeq_succ_n_tail_eq_squashSeq_tail_n]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\n⊢ convergents'Aux s (Nat.succ m + 2) = convergents'Aux (squashSeq s (Nat.succ m)) (Nat.succ m + 1)\n[PROOFSTEP]\ncase succ =>\n  obtain ⟨gp_head, s_head_eq⟩ : ∃ gp_head, s.head = some gp_head\n  exact s.ge_stable (m + 2).zero_le s_succ_nth_eq\n  suffices gp_head.a / (gp_head.b + convergents'Aux s.tail (m + 2)) = convergents'Aux (squashSeq s (m + 1)) (m + 2) by\n    simpa only [convergents'Aux, s_head_eq]\n  have : convergents'Aux s.tail (m + 2) = convergents'Aux (squashSeq s.tail m) (m + 1) :=\n    by\n    refine' IH gp_succ_n _\n    simpa [Stream'.Seq.get?_tail] using s_succ_nth_eq\n  have : (squashSeq s (m + 1)).head = some gp_head := (squashSeq_nth_of_lt m.succ_pos).trans s_head_eq\n  simp_all [convergents'Aux, squashSeq_succ_n_tail_eq_squashSeq_tail_n]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\n⊢ convergents'Aux s (Nat.succ m + 2) = convergents'Aux (squashSeq s (Nat.succ m)) (Nat.succ m + 1)\n[PROOFSTEP]\nobtain ⟨gp_head, s_head_eq⟩ : ∃ gp_head, s.head = some gp_head\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\n⊢ ∃ gp_head, Stream'.Seq.head s = some gp_head\ncase intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\ngp_head : Pair K\ns_head_eq : Stream'.Seq.head s = some gp_head\n⊢ convergents'Aux s (Nat.succ m + 2) = convergents'Aux (squashSeq s (Nat.succ m)) (Nat.succ m + 1)\n[PROOFSTEP]\nexact s.ge_stable (m + 2).zero_le s_succ_nth_eq\n[GOAL]\ncase intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\ngp_head : Pair K\ns_head_eq : Stream'.Seq.head s = some gp_head\n⊢ convergents'Aux s (Nat.succ m + 2) = convergents'Aux (squashSeq s (Nat.succ m)) (Nat.succ m + 1)\n[PROOFSTEP]\nsuffices gp_head.a / (gp_head.b + convergents'Aux s.tail (m + 2)) = convergents'Aux (squashSeq s (m + 1)) (m + 2) by\n  simpa only [convergents'Aux, s_head_eq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\ngp_head : Pair K\ns_head_eq : Stream'.Seq.head s = some gp_head\nthis :\n  gp_head.a / (gp_head.b + convergents'Aux (Stream'.Seq.tail s) (m + 2)) = convergents'Aux (squashSeq s (m + 1)) (m + 2)\n⊢ convergents'Aux s (Nat.succ m + 2) = convergents'Aux (squashSeq s (Nat.succ m)) (Nat.succ m + 1)\n[PROOFSTEP]\nsimpa only [convergents'Aux, s_head_eq]\n[GOAL]\ncase intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\ngp_head : Pair K\ns_head_eq : Stream'.Seq.head s = some gp_head\n⊢ gp_head.a / (gp_head.b + convergents'Aux (Stream'.Seq.tail s) (m + 2)) = convergents'Aux (squashSeq s (m + 1)) (m + 2)\n[PROOFSTEP]\nhave : convergents'Aux s.tail (m + 2) = convergents'Aux (squashSeq s.tail m) (m + 1) :=\n  by\n  refine' IH gp_succ_n _\n  simpa [Stream'.Seq.get?_tail] using s_succ_nth_eq\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\ngp_head : Pair K\ns_head_eq : Stream'.Seq.head s = some gp_head\n⊢ convergents'Aux (Stream'.Seq.tail s) (m + 2) = convergents'Aux (squashSeq (Stream'.Seq.tail s) m) (m + 1)\n[PROOFSTEP]\nrefine' IH gp_succ_n _\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\ngp_head : Pair K\ns_head_eq : Stream'.Seq.head s = some gp_head\n⊢ Stream'.Seq.get? (Stream'.Seq.tail s) (m + 1) = some gp_succ_n\n[PROOFSTEP]\nsimpa [Stream'.Seq.get?_tail] using s_succ_nth_eq\n[GOAL]\ncase intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\ngp_head : Pair K\ns_head_eq : Stream'.Seq.head s = some gp_head\nthis : convergents'Aux (Stream'.Seq.tail s) (m + 2) = convergents'Aux (squashSeq (Stream'.Seq.tail s) m) (m + 1)\n⊢ gp_head.a / (gp_head.b + convergents'Aux (Stream'.Seq.tail s) (m + 2)) = convergents'Aux (squashSeq s (m + 1)) (m + 2)\n[PROOFSTEP]\nhave : (squashSeq s (m + 1)).head = some gp_head := (squashSeq_nth_of_lt m.succ_pos).trans s_head_eq\n[GOAL]\ncase intro\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns✝ : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ngp_succ_n✝ : Pair K\ns_succ_nth_eq✝ : Stream'.Seq.get? s✝ (n + 1) = some gp_succ_n✝\nm : ℕ\nIH :\n  ∀ {s : Stream'.Seq (Pair K)} (gp_succ_n : Pair K),\n    Stream'.Seq.get? s (m + 1) = some gp_succ_n → convergents'Aux s (m + 2) = convergents'Aux (squashSeq s m) (m + 1)\ns : Stream'.Seq (Pair K)\ngp_succ_n : Pair K\ns_succ_nth_eq : Stream'.Seq.get? s (Nat.succ m + 1) = some gp_succ_n\ngp_head : Pair K\ns_head_eq : Stream'.Seq.head s = some gp_head\nthis✝ : convergents'Aux (Stream'.Seq.tail s) (m + 2) = convergents'Aux (squashSeq (Stream'.Seq.tail s) m) (m + 1)\nthis : Stream'.Seq.head (squashSeq s (m + 1)) = some gp_head\n⊢ gp_head.a / (gp_head.b + convergents'Aux (Stream'.Seq.tail s) (m + 2)) = convergents'Aux (squashSeq s (m + 1)) (m + 2)\n[PROOFSTEP]\nsimp_all [convergents'Aux, squashSeq_succ_n_tail_eq_squashSeq_tail_n]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nterminated_at_n : TerminatedAt g n\n⊢ squashGCF g n = g\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nterminated_at_n : TerminatedAt g Nat.zero\n⊢ squashGCF g Nat.zero = g\ncase succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn✝ : ℕ\nterminated_at_n : TerminatedAt g (Nat.succ n✝)\n⊢ squashGCF g (Nat.succ n✝) = g\n[PROOFSTEP]\ncase zero =>\n  change g.s.get? 0 = none at terminated_at_n \n  simp only [convergents', squashGCF, convergents'Aux, terminated_at_n]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nterminated_at_n : TerminatedAt g Nat.zero\n⊢ squashGCF g Nat.zero = g\n[PROOFSTEP]\ncase zero =>\n  change g.s.get? 0 = none at terminated_at_n \n  simp only [convergents', squashGCF, convergents'Aux, terminated_at_n]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nterminated_at_n : TerminatedAt g Nat.zero\n⊢ squashGCF g Nat.zero = g\n[PROOFSTEP]\nchange g.s.get? 0 = none at terminated_at_n \n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nterminated_at_n : Stream'.Seq.get? g.s 0 = none\n⊢ squashGCF g Nat.zero = g\n[PROOFSTEP]\nsimp only [convergents', squashGCF, convergents'Aux, terminated_at_n]\n[GOAL]\ncase succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn✝ : ℕ\nterminated_at_n : TerminatedAt g (Nat.succ n✝)\n⊢ squashGCF g (Nat.succ n✝) = g\n[PROOFSTEP]\ncase succ =>\n  cases g\n  simp only [squashGCF, mk.injEq, true_and]\n  exact squashSeq_eq_self_of_terminated terminated_at_n\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn✝ : ℕ\nterminated_at_n : TerminatedAt g (Nat.succ n✝)\n⊢ squashGCF g (Nat.succ n✝) = g\n[PROOFSTEP]\ncase succ =>\n  cases g\n  simp only [squashGCF, mk.injEq, true_and]\n  exact squashSeq_eq_self_of_terminated terminated_at_n\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn✝ : ℕ\nterminated_at_n : TerminatedAt g (Nat.succ n✝)\n⊢ squashGCF g (Nat.succ n✝) = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk\nK : Type u_1\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn✝ : ℕ\nh✝ : K\ns✝ : Stream'.Seq (Pair K)\nterminated_at_n : TerminatedAt { h := h✝, s := s✝ } (Nat.succ n✝)\n⊢ squashGCF { h := h✝, s := s✝ } (Nat.succ n✝) = { h := h✝, s := s✝ }\n[PROOFSTEP]\nsimp only [squashGCF, mk.injEq, true_and]\n[GOAL]\ncase mk\nK : Type u_1\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn✝ : ℕ\nh✝ : K\ns✝ : Stream'.Seq (Pair K)\nterminated_at_n : TerminatedAt { h := h✝, s := s✝ } (Nat.succ n✝)\n⊢ squashSeq s✝ n✝ = s✝\n[PROOFSTEP]\nexact squashSeq_eq_self_of_terminated terminated_at_n\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nm_lt_n : m < n\n⊢ Stream'.Seq.get? (squashGCF g (n + 1)).s m = Stream'.Seq.get? g.s m\n[PROOFSTEP]\nsimp only [squashGCF, squashSeq_nth_of_lt m_lt_n, Nat.add_eq, add_zero]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\n⊢ convergents' g (n + 1) = convergents' (squashGCF g n) n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\n⊢ convergents' g (Nat.zero + 1) = convergents' (squashGCF g Nat.zero) Nat.zero\ncase succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn✝ : ℕ\n⊢ convergents' g (Nat.succ n✝ + 1) = convergents' (squashGCF g (Nat.succ n✝)) (Nat.succ n✝)\n[PROOFSTEP]\ncase zero =>\n  cases g_s_head_eq : g.s.get? 0 <;> simp [g_s_head_eq, squashGCF, convergents', convergents'Aux, Stream'.Seq.head]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\n⊢ convergents' g (Nat.zero + 1) = convergents' (squashGCF g Nat.zero) Nat.zero\n[PROOFSTEP]\ncase zero =>\n  cases g_s_head_eq : g.s.get? 0 <;> simp [g_s_head_eq, squashGCF, convergents', convergents'Aux, Stream'.Seq.head]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\n⊢ convergents' g (Nat.zero + 1) = convergents' (squashGCF g Nat.zero) Nat.zero\n[PROOFSTEP]\ncases g_s_head_eq : g.s.get? 0\n[GOAL]\ncase none\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\ng_s_head_eq : Stream'.Seq.get? g.s 0 = none\n⊢ convergents' g (Nat.zero + 1) = convergents' (squashGCF g Nat.zero) Nat.zero\n[PROOFSTEP]\nsimp [g_s_head_eq, squashGCF, convergents', convergents'Aux, Stream'.Seq.head]\n[GOAL]\ncase some\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nval✝ : Pair K\ng_s_head_eq : Stream'.Seq.get? g.s 0 = some val✝\n⊢ convergents' g (Nat.zero + 1) = convergents' (squashGCF g Nat.zero) Nat.zero\n[PROOFSTEP]\nsimp [g_s_head_eq, squashGCF, convergents', convergents'Aux, Stream'.Seq.head]\n[GOAL]\ncase succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn✝ : ℕ\n⊢ convergents' g (Nat.succ n✝ + 1) = convergents' (squashGCF g (Nat.succ n✝)) (Nat.succ n✝)\n[PROOFSTEP]\ncase succ => simp only [succ_succ_nth_convergent'_aux_eq_succ_nth_convergent'_aux_squashSeq, convergents', squashGCF]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn✝ : ℕ\n⊢ convergents' g (Nat.succ n✝ + 1) = convergents' (squashGCF g (Nat.succ n✝)) (Nat.succ n✝)\n[PROOFSTEP]\ncase succ => simp only [succ_succ_nth_convergent'_aux_eq_succ_nth_convergent'_aux_squashSeq, convergents', squashGCF]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn✝ : ℕ\n⊢ convergents' g (Nat.succ n✝ + 1) = convergents' (squashGCF g (Nat.succ n✝)) (Nat.succ n✝)\n[PROOFSTEP]\nsimp only [succ_succ_nth_convergent'_aux_eq_succ_nth_convergent'_aux_squashSeq, convergents', squashGCF]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\n⊢ ∀ (n_1 : ℕ),\n    (∀ (m : ℕ), m < n_1 → m ≤ n → continuantsAux g m = continuantsAux (squashGCF g n) m) →\n      n_1 ≤ n → continuantsAux g n_1 = continuantsAux (squashGCF g n) n_1\n[PROOFSTEP]\nclear m\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\n⊢ ∀ (n_1 : ℕ),\n    (∀ (m : ℕ), m < n_1 → m ≤ n → continuantsAux g m = continuantsAux (squashGCF g n) m) →\n      n_1 ≤ n → continuantsAux g n_1 = continuantsAux (squashGCF g n) n_1\n[PROOFSTEP]\nintro m IH m_le_n\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm : ℕ\nIH : ∀ (m_1 : ℕ), m_1 < m → m_1 ≤ n → continuantsAux g m_1 = continuantsAux (squashGCF g n) m_1\nm_le_n : m ≤ n\n⊢ continuantsAux g m = continuantsAux (squashGCF g n) m\n[PROOFSTEP]\ncases' m with m'\n[GOAL]\ncase zero\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nIH : ∀ (m : ℕ), m < Nat.zero → m ≤ n → continuantsAux g m = continuantsAux (squashGCF g n) m\nm_le_n : Nat.zero ≤ n\n⊢ continuantsAux g Nat.zero = continuantsAux (squashGCF g n) Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm' : ℕ\nIH : ∀ (m : ℕ), m < Nat.succ m' → m ≤ n → continuantsAux g m = continuantsAux (squashGCF g n) m\nm_le_n : Nat.succ m' ≤ n\n⊢ continuantsAux g (Nat.succ m') = continuantsAux (squashGCF g n) (Nat.succ m')\n[PROOFSTEP]\ncases' n with n'\n[GOAL]\ncase succ.zero\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm' : ℕ\nIH : ∀ (m : ℕ), m < Nat.succ m' → m ≤ Nat.zero → continuantsAux g m = continuantsAux (squashGCF g Nat.zero) m\nm_le_n : Nat.succ m' ≤ Nat.zero\n⊢ continuantsAux g (Nat.succ m') = continuantsAux (squashGCF g Nat.zero) (Nat.succ m')\n[PROOFSTEP]\nexact (m'.not_succ_le_zero m_le_n).elim\n[GOAL]\ncase succ.succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nm' n' : ℕ\nIH : ∀ (m : ℕ), m < Nat.succ m' → m ≤ Nat.succ n' → continuantsAux g m = continuantsAux (squashGCF g (Nat.succ n')) m\nm_le_n : Nat.succ m' ≤ Nat.succ n'\n⊢ continuantsAux g (Nat.succ m') = continuantsAux (squashGCF g (Nat.succ n')) (Nat.succ m')\n[PROOFSTEP]\ncases' m' with m''\n[GOAL]\ncase succ.succ.zero\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn' : ℕ\nIH :\n  ∀ (m : ℕ), m < Nat.succ Nat.zero → m ≤ Nat.succ n' → continuantsAux g m = continuantsAux (squashGCF g (Nat.succ n')) m\nm_le_n : Nat.succ Nat.zero ≤ Nat.succ n'\n⊢ continuantsAux g (Nat.succ Nat.zero) = continuantsAux (squashGCF g (Nat.succ n')) (Nat.succ Nat.zero)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn' m'' : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < Nat.succ (Nat.succ m'') → m ≤ Nat.succ n' → continuantsAux g m = continuantsAux (squashGCF g (Nat.succ n')) m\nm_le_n : Nat.succ (Nat.succ m'') ≤ Nat.succ n'\n⊢ continuantsAux g (Nat.succ (Nat.succ m'')) = continuantsAux (squashGCF g (Nat.succ n')) (Nat.succ (Nat.succ m''))\n[PROOFSTEP]\nhave m'_lt_n : m'' + 1 < n' + 1 := m_le_n\n[GOAL]\ncase succ.succ.succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn' m'' : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < Nat.succ (Nat.succ m'') → m ≤ Nat.succ n' → continuantsAux g m = continuantsAux (squashGCF g (Nat.succ n')) m\nm_le_n : Nat.succ (Nat.succ m'') ≤ Nat.succ n'\nm'_lt_n : m'' + 1 < n' + 1\n⊢ continuantsAux g (Nat.succ (Nat.succ m'')) = continuantsAux (squashGCF g (Nat.succ n')) (Nat.succ (Nat.succ m''))\n[PROOFSTEP]\nhave succ_m''th_conts_aux_eq := IH (m'' + 1) (lt_add_one (m'' + 1)) m'_lt_n.le\n[GOAL]\ncase succ.succ.succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn' m'' : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < Nat.succ (Nat.succ m'') → m ≤ Nat.succ n' → continuantsAux g m = continuantsAux (squashGCF g (Nat.succ n')) m\nm_le_n : Nat.succ (Nat.succ m'') ≤ Nat.succ n'\nm'_lt_n : m'' + 1 < n' + 1\nsucc_m''th_conts_aux_eq : continuantsAux g (m'' + 1) = continuantsAux (squashGCF g (Nat.succ n')) (m'' + 1)\n⊢ continuantsAux g (Nat.succ (Nat.succ m'')) = continuantsAux (squashGCF g (Nat.succ n')) (Nat.succ (Nat.succ m''))\n[PROOFSTEP]\nhave : m'' < m'' + 2 := lt_add_of_pos_right m'' zero_lt_two\n[GOAL]\ncase succ.succ.succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn' m'' : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < Nat.succ (Nat.succ m'') → m ≤ Nat.succ n' → continuantsAux g m = continuantsAux (squashGCF g (Nat.succ n')) m\nm_le_n : Nat.succ (Nat.succ m'') ≤ Nat.succ n'\nm'_lt_n : m'' + 1 < n' + 1\nsucc_m''th_conts_aux_eq : continuantsAux g (m'' + 1) = continuantsAux (squashGCF g (Nat.succ n')) (m'' + 1)\nthis : m'' < m'' + 2\n⊢ continuantsAux g (Nat.succ (Nat.succ m'')) = continuantsAux (squashGCF g (Nat.succ n')) (Nat.succ (Nat.succ m''))\n[PROOFSTEP]\nhave m''th_conts_aux_eq := IH m'' this (le_trans this.le m_le_n)\n[GOAL]\ncase succ.succ.succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn' m'' : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < Nat.succ (Nat.succ m'') → m ≤ Nat.succ n' → continuantsAux g m = continuantsAux (squashGCF g (Nat.succ n')) m\nm_le_n : Nat.succ (Nat.succ m'') ≤ Nat.succ n'\nm'_lt_n : m'' + 1 < n' + 1\nsucc_m''th_conts_aux_eq : continuantsAux g (m'' + 1) = continuantsAux (squashGCF g (Nat.succ n')) (m'' + 1)\nthis : m'' < m'' + 2\nm''th_conts_aux_eq : continuantsAux g m'' = continuantsAux (squashGCF g (Nat.succ n')) m''\n⊢ continuantsAux g (Nat.succ (Nat.succ m'')) = continuantsAux (squashGCF g (Nat.succ n')) (Nat.succ (Nat.succ m''))\n[PROOFSTEP]\nhave : (squashGCF g (n' + 1)).s.get? m'' = g.s.get? m'' := squashGCF_nth_of_lt (Nat.succ_lt_succ_iff.mp m'_lt_n)\n[GOAL]\ncase succ.succ.succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : DivisionRing K\nn' m'' : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < Nat.succ (Nat.succ m'') → m ≤ Nat.succ n' → continuantsAux g m = continuantsAux (squashGCF g (Nat.succ n')) m\nm_le_n : Nat.succ (Nat.succ m'') ≤ Nat.succ n'\nm'_lt_n : m'' + 1 < n' + 1\nsucc_m''th_conts_aux_eq : continuantsAux g (m'' + 1) = continuantsAux (squashGCF g (Nat.succ n')) (m'' + 1)\nthis✝ : m'' < m'' + 2\nm''th_conts_aux_eq : continuantsAux g m'' = continuantsAux (squashGCF g (Nat.succ n')) m''\nthis : Stream'.Seq.get? (squashGCF g (n' + 1)).s m'' = Stream'.Seq.get? g.s m''\n⊢ continuantsAux g (Nat.succ (Nat.succ m'')) = continuantsAux (squashGCF g (Nat.succ n')) (Nat.succ (Nat.succ m''))\n[PROOFSTEP]\nsimp [continuantsAux, succ_m''th_conts_aux_eq, m''th_conts_aux_eq, this]\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) n = some b → b ≠ 0\n⊢ convergents g (n + 1) = convergents (squashGCF g n) n\n[PROOFSTEP]\ncases' Decidable.em (g.TerminatedAt n) with terminated_at_n not_terminated_at_n\n[GOAL]\ncase inl\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) n = some b → b ≠ 0\nterminated_at_n : TerminatedAt g n\n⊢ convergents g (n + 1) = convergents (squashGCF g n) n\n[PROOFSTEP]\nhave : squashGCF g n = g := squashGCF_eq_self_of_terminated terminated_at_n\n[GOAL]\ncase inl\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) n = some b → b ≠ 0\nterminated_at_n : TerminatedAt g n\nthis : squashGCF g n = g\n⊢ convergents g (n + 1) = convergents (squashGCF g n) n\n[PROOFSTEP]\nsimp only [this, convergents_stable_of_terminated n.le_succ terminated_at_n]\n[GOAL]\ncase inr\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) n = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g n\n⊢ convergents g (n + 1) = convergents (squashGCF g n) n\n[PROOFSTEP]\nobtain ⟨⟨a, b⟩, s_nth_eq⟩ : ∃ gp_n, g.s.get? n = some gp_n\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) n = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g n\n⊢ ∃ gp_n, Stream'.Seq.get? g.s n = some gp_n\ncase inr.intro.mk\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) n = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g n\na b : K\ns_nth_eq : Stream'.Seq.get? g.s n = some { a := a, b := b }\n⊢ convergents g (n + 1) = convergents (squashGCF g n) n\n[PROOFSTEP]\nexact Option.ne_none_iff_exists'.mp not_terminated_at_n\n[GOAL]\ncase inr.intro.mk\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) n = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g n\na b : K\ns_nth_eq : Stream'.Seq.get? g.s n = some { a := a, b := b }\n⊢ convergents g (n + 1) = convergents (squashGCF g n) n\n[PROOFSTEP]\nhave b_ne_zero : b ≠ 0 := nth_part_denom_ne_zero (part_denom_eq_s_b s_nth_eq)\n[GOAL]\ncase inr.intro.mk\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) n = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g n\na b : K\ns_nth_eq : Stream'.Seq.get? g.s n = some { a := a, b := b }\nb_ne_zero : b ≠ 0\n⊢ convergents g (n + 1) = convergents (squashGCF g n) n\n[PROOFSTEP]\ncases' n with n'\n[GOAL]\ncase inr.intro.mk.zero\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) Nat.zero = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g Nat.zero\ns_nth_eq : Stream'.Seq.get? g.s Nat.zero = some { a := a, b := b }\n⊢ convergents g (Nat.zero + 1) = convergents (squashGCF g Nat.zero) Nat.zero\ncase inr.intro.mk.succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\ncase\n  zero =>\n  suffices (b * g.h + a) / b = g.h + a / b by\n    simpa [squashGCF, s_nth_eq, convergent_eq_conts_a_div_conts_b,\n      continuants_recurrenceAux s_nth_eq zeroth_continuant_aux_eq_one_zero first_continuant_aux_eq_h_one]\n  calc\n    (b * g.h + a) / b = b * g.h / b + a / b := by\n      ring\n        -- requires `Field`, not `DivisionRing`\n    _ = g.h + a / b := by rw [mul_div_cancel_left _ b_ne_zero]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) Nat.zero = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g Nat.zero\ns_nth_eq : Stream'.Seq.get? g.s Nat.zero = some { a := a, b := b }\n⊢ convergents g (Nat.zero + 1) = convergents (squashGCF g Nat.zero) Nat.zero\n[PROOFSTEP]\ncase\n  zero =>\n  suffices (b * g.h + a) / b = g.h + a / b by\n    simpa [squashGCF, s_nth_eq, convergent_eq_conts_a_div_conts_b,\n      continuants_recurrenceAux s_nth_eq zeroth_continuant_aux_eq_one_zero first_continuant_aux_eq_h_one]\n  calc\n    (b * g.h + a) / b = b * g.h / b + a / b := by\n      ring\n        -- requires `Field`, not `DivisionRing`\n    _ = g.h + a / b := by rw [mul_div_cancel_left _ b_ne_zero]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) Nat.zero = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g Nat.zero\ns_nth_eq : Stream'.Seq.get? g.s Nat.zero = some { a := a, b := b }\n⊢ convergents g (Nat.zero + 1) = convergents (squashGCF g Nat.zero) Nat.zero\n[PROOFSTEP]\nsuffices (b * g.h + a) / b = g.h + a / b by\n  simpa [squashGCF, s_nth_eq, convergent_eq_conts_a_div_conts_b,\n    continuants_recurrenceAux s_nth_eq zeroth_continuant_aux_eq_one_zero first_continuant_aux_eq_h_one]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) Nat.zero = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g Nat.zero\ns_nth_eq : Stream'.Seq.get? g.s Nat.zero = some { a := a, b := b }\nthis : (b * g.h + a) / b = g.h + a / b\n⊢ convergents g (Nat.zero + 1) = convergents (squashGCF g Nat.zero) Nat.zero\n[PROOFSTEP]\nsimpa [squashGCF, s_nth_eq, convergent_eq_conts_a_div_conts_b,\n  continuants_recurrenceAux s_nth_eq zeroth_continuant_aux_eq_one_zero first_continuant_aux_eq_h_one]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) Nat.zero = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g Nat.zero\ns_nth_eq : Stream'.Seq.get? g.s Nat.zero = some { a := a, b := b }\n⊢ (b * g.h + a) / b = g.h + a / b\n[PROOFSTEP]\ncalc\n  (b * g.h + a) / b = b * g.h / b + a / b := by\n    ring\n      -- requires `Field`, not `DivisionRing`\n  _ = g.h + a / b := by rw [mul_div_cancel_left _ b_ne_zero]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) Nat.zero = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g Nat.zero\ns_nth_eq : Stream'.Seq.get? g.s Nat.zero = some { a := a, b := b }\n⊢ (b * g.h + a) / b = b * g.h / b + a / b\n[PROOFSTEP]\nring\n  -- requires `Field`, not `DivisionRing`\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) Nat.zero = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g Nat.zero\ns_nth_eq : Stream'.Seq.get? g.s Nat.zero = some { a := a, b := b }\n⊢ b * g.h / b + a / b = g.h + a / b\n[PROOFSTEP]\nrw [mul_div_cancel_left _ b_ne_zero]\n[GOAL]\ncase inr.intro.mk.succ\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\ncase\n  succ =>\n  obtain ⟨⟨pa, pb⟩, s_n'th_eq⟩ : ∃ gp_n', g.s.get? n' = some gp_n' := g.s.ge_stable n'.le_succ s_nth_eq\n  let g' := squashGCF g (n' + 1)\n  set pred_conts := g.continuantsAux (n' + 1) with succ_n'th_conts_aux_eq\n  set ppred_conts := g.continuantsAux n' with n'th_conts_aux_eq\n  let pA := pred_conts.a\n  let pB := pred_conts.b\n  let ppA := ppred_conts.a\n  let ppB := ppred_conts.b\n  set pred_conts' := g'.continuantsAux (n' + 1) with succ_n'th_conts_aux_eq'\n  set ppred_conts' := g'.continuantsAux n' with n'th_conts_aux_eq'\n  let pA' := pred_conts'.a\n  let pB' := pred_conts'.b\n  let ppA' := ppred_conts'.a\n  let ppB' := ppred_conts'.b\n  have : g'.convergents (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB') :=\n    by\n    have : g'.s.get? n' = some ⟨pa, pb + a / b⟩ := squashSeq_nth_of_not_terminated s_n'th_eq s_nth_eq\n    rw [convergent_eq_conts_a_div_conts_b,\n      continuants_recurrenceAux this n'th_conts_aux_eq'.symm succ_n'th_conts_aux_eq'.symm]\n  rw [this]\n    -- then compute the convergent of the original gcf by recursively unfolding the continuants\n          -- computation twice\n  have : g.convergents (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB) := by\n    -- use the recurrence once\n    have : g.continuantsAux (n' + 2) = ⟨pb * pA + pa * ppA, pb * pB + pa * ppB⟩ :=\n      continuantsAux_recurrence s_n'th_eq n'th_conts_aux_eq.symm succ_n'th_conts_aux_eq.symm\n    rw [convergent_eq_conts_a_div_conts_b, continuants_recurrenceAux s_nth_eq succ_n'th_conts_aux_eq.symm this]\n  rw [this]\n  suffices\n    ((pb + a / b) * pA + pa * ppA) / ((pb + a / b) * pB + pa * ppB) =\n      (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n    by\n    obtain ⟨eq1, eq2, eq3, eq4⟩ : pA' = pA ∧ pB' = pB ∧ ppA' = ppA ∧ ppB' = ppB := by\n      simp [*, (continuantsAux_eq_continuantsAux_squashGCF_of_le <| le_refl <| n' + 1).symm,\n        (continuantsAux_eq_continuantsAux_squashGCF_of_le n'.le_succ).symm]\n    symm\n    simpa only [eq1, eq2, eq3, eq4, mul_div_cancel _ b_ne_zero]\n  field_simp\n  congr 1 <;> ring\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\ncase\n  succ =>\n  obtain ⟨⟨pa, pb⟩, s_n'th_eq⟩ : ∃ gp_n', g.s.get? n' = some gp_n' := g.s.ge_stable n'.le_succ s_nth_eq\n  let g' := squashGCF g (n' + 1)\n  set pred_conts := g.continuantsAux (n' + 1) with succ_n'th_conts_aux_eq\n  set ppred_conts := g.continuantsAux n' with n'th_conts_aux_eq\n  let pA := pred_conts.a\n  let pB := pred_conts.b\n  let ppA := ppred_conts.a\n  let ppB := ppred_conts.b\n  set pred_conts' := g'.continuantsAux (n' + 1) with succ_n'th_conts_aux_eq'\n  set ppred_conts' := g'.continuantsAux n' with n'th_conts_aux_eq'\n  let pA' := pred_conts'.a\n  let pB' := pred_conts'.b\n  let ppA' := ppred_conts'.a\n  let ppB' := ppred_conts'.b\n  have : g'.convergents (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB') :=\n    by\n    have : g'.s.get? n' = some ⟨pa, pb + a / b⟩ := squashSeq_nth_of_not_terminated s_n'th_eq s_nth_eq\n    rw [convergent_eq_conts_a_div_conts_b,\n      continuants_recurrenceAux this n'th_conts_aux_eq'.symm succ_n'th_conts_aux_eq'.symm]\n  rw [this]\n    -- then compute the convergent of the original gcf by recursively unfolding the continuants\n          -- computation twice\n  have : g.convergents (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB) := by\n    -- use the recurrence once\n    have : g.continuantsAux (n' + 2) = ⟨pb * pA + pa * ppA, pb * pB + pa * ppB⟩ :=\n      continuantsAux_recurrence s_n'th_eq n'th_conts_aux_eq.symm succ_n'th_conts_aux_eq.symm\n    rw [convergent_eq_conts_a_div_conts_b, continuants_recurrenceAux s_nth_eq succ_n'th_conts_aux_eq.symm this]\n  rw [this]\n  suffices\n    ((pb + a / b) * pA + pa * ppA) / ((pb + a / b) * pB + pa * ppB) =\n      (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n    by\n    obtain ⟨eq1, eq2, eq3, eq4⟩ : pA' = pA ∧ pB' = pB ∧ ppA' = ppA ∧ ppB' = ppB := by\n      simp [*, (continuantsAux_eq_continuantsAux_squashGCF_of_le <| le_refl <| n' + 1).symm,\n        (continuantsAux_eq_continuantsAux_squashGCF_of_le n'.le_succ).symm]\n    symm\n    simpa only [eq1, eq2, eq3, eq4, mul_div_cancel _ b_ne_zero]\n  field_simp\n  congr 1 <;> ring\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nobtain ⟨⟨pa, pb⟩, s_n'th_eq⟩ : ∃ gp_n', g.s.get? n' = some gp_n' := g.s.ge_stable n'.le_succ s_nth_eq\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nlet g' := squashGCF g (n' + 1)\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nset pred_conts := g.continuantsAux (n' + 1) with succ_n'th_conts_aux_eq\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nset ppred_conts := g.continuantsAux n' with n'th_conts_aux_eq\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nlet pA := pred_conts.a\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nlet pB := pred_conts.b\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nlet ppA := ppred_conts.a\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nlet ppB := ppred_conts.b\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nset pred_conts' := g'.continuantsAux (n' + 1) with succ_n'th_conts_aux_eq'\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nset ppred_conts' := g'.continuantsAux n' with n'th_conts_aux_eq'\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nlet pA' := pred_conts'.a\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nlet pB' := pred_conts'.b\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nlet ppA' := ppred_conts'.a\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nlet ppB' := ppred_conts'.b\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nhave : g'.convergents (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB') :=\n  by\n  have : g'.s.get? n' = some ⟨pa, pb + a / b⟩ := squashSeq_nth_of_not_terminated s_n'th_eq s_nth_eq\n  rw [convergent_eq_conts_a_div_conts_b,\n    continuants_recurrenceAux this n'th_conts_aux_eq'.symm succ_n'th_conts_aux_eq'.symm]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\n⊢ convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\n[PROOFSTEP]\nhave : g'.s.get? n' = some ⟨pa, pb + a / b⟩ := squashSeq_nth_of_not_terminated s_n'th_eq s_nth_eq\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis : Stream'.Seq.get? g'.s n' = some { a := pa, b := pb + a / b }\n⊢ convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\n[PROOFSTEP]\nrw [convergent_eq_conts_a_div_conts_b,\n  continuants_recurrenceAux this n'th_conts_aux_eq'.symm succ_n'th_conts_aux_eq'.symm]\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\n⊢ convergents g (Nat.succ n' + 1) = convergents (squashGCF g (Nat.succ n')) (Nat.succ n')\n[PROOFSTEP]\nrw [this]\n  -- then compute the convergent of the original gcf by recursively unfolding the continuants\n        -- computation twice\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\n⊢ convergents g (Nat.succ n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\n[PROOFSTEP]\nhave : g.convergents (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB) := by\n  -- use the recurrence once\n  have : g.continuantsAux (n' + 2) = ⟨pb * pA + pa * ppA, pb * pB + pa * ppB⟩ :=\n    continuantsAux_recurrence s_n'th_eq n'th_conts_aux_eq.symm succ_n'th_conts_aux_eq.symm\n  rw [convergent_eq_conts_a_div_conts_b, continuants_recurrenceAux s_nth_eq succ_n'th_conts_aux_eq.symm this]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\n⊢ convergents g (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n[PROOFSTEP]\nhave : g.continuantsAux (n' + 2) = ⟨pb * pA + pa * ppA, pb * pB + pa * ppB⟩ :=\n  continuantsAux_recurrence s_n'th_eq n'th_conts_aux_eq.symm succ_n'th_conts_aux_eq.symm\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis✝ : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\nthis : continuantsAux g (n' + 2) = { a := pb * pA + pa * ppA, b := pb * pB + pa * ppB }\n⊢ convergents g (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n[PROOFSTEP]\nrw [convergent_eq_conts_a_div_conts_b, continuants_recurrenceAux s_nth_eq succ_n'th_conts_aux_eq.symm this]\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis✝ : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\nthis : convergents g (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n⊢ convergents g (Nat.succ n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis✝ : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\nthis : convergents g (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n⊢ (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB) =\n    ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\n[PROOFSTEP]\nsuffices\n  ((pb + a / b) * pA + pa * ppA) / ((pb + a / b) * pB + pa * ppB) =\n    (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n  by\n  obtain ⟨eq1, eq2, eq3, eq4⟩ : pA' = pA ∧ pB' = pB ∧ ppA' = ppA ∧ ppB' = ppB := by\n    simp [*, (continuantsAux_eq_continuantsAux_squashGCF_of_le <| le_refl <| n' + 1).symm,\n      (continuantsAux_eq_continuantsAux_squashGCF_of_le n'.le_succ).symm]\n  symm\n  simpa only [eq1, eq2, eq3, eq4, mul_div_cancel _ b_ne_zero]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis✝¹ : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\nthis✝ : convergents g (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\nthis :\n  ((pb + a / b) * pA + pa * ppA) / ((pb + a / b) * pB + pa * ppB) =\n    (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n⊢ (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB) =\n    ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\n[PROOFSTEP]\nobtain ⟨eq1, eq2, eq3, eq4⟩ : pA' = pA ∧ pB' = pB ∧ ppA' = ppA ∧ ppB' = ppB := by\n  simp [*, (continuantsAux_eq_continuantsAux_squashGCF_of_le <| le_refl <| n' + 1).symm,\n    (continuantsAux_eq_continuantsAux_squashGCF_of_le n'.le_succ).symm]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis✝¹ : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\nthis✝ : convergents g (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\nthis :\n  ((pb + a / b) * pA + pa * ppA) / ((pb + a / b) * pB + pa * ppB) =\n    (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n⊢ pA' = pA ∧ pB' = pB ∧ ppA' = ppA ∧ ppB' = ppB\n[PROOFSTEP]\nsimp [*, (continuantsAux_eq_continuantsAux_squashGCF_of_le <| le_refl <| n' + 1).symm,\n  (continuantsAux_eq_continuantsAux_squashGCF_of_le n'.le_succ).symm]\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis✝¹ : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\nthis✝ : convergents g (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\nthis :\n  ((pb + a / b) * pA + pa * ppA) / ((pb + a / b) * pB + pa * ppB) =\n    (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\neq1 : pA' = pA\neq2 : pB' = pB\neq3 : ppA' = ppA\neq4 : ppB' = ppB\n⊢ (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB) =\n    ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\n[PROOFSTEP]\nsymm\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis✝¹ : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\nthis✝ : convergents g (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\nthis :\n  ((pb + a / b) * pA + pa * ppA) / ((pb + a / b) * pB + pa * ppB) =\n    (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\neq1 : pA' = pA\neq2 : pB' = pB\neq3 : ppA' = ppA\neq4 : ppB' = ppB\n⊢ ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB') =\n    (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n[PROOFSTEP]\nsimpa only [eq1, eq2, eq3, eq4, mul_div_cancel _ b_ne_zero]\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis✝ : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\nthis : convergents g (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n⊢ ((pb + a / b) * pA + pa * ppA) / ((pb + a / b) * pB + pa * ppB) =\n    (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase intro.mk\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis✝ : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\nthis : convergents g (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n⊢ ((pb * b + a) * (continuantsAux g (n' + 1)).a + pa * (continuantsAux g n').a * b) /\n      ((pb * b + a) * (continuantsAux g (n' + 1)).b + pa * (continuantsAux g n').b * b) =\n    (b * (pb * (continuantsAux g (n' + 1)).a + pa * (continuantsAux g n').a) + a * (continuantsAux g (n' + 1)).a) /\n      (b * (pb * (continuantsAux g (n' + 1)).b + pa * (continuantsAux g n').b) + a * (continuantsAux g (n' + 1)).b)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase intro.mk.e_a\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis✝ : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\nthis : convergents g (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n⊢ (pb * b + a) * (continuantsAux g (n' + 1)).a + pa * (continuantsAux g n').a * b =\n    b * (pb * (continuantsAux g (n' + 1)).a + pa * (continuantsAux g n').a) + a * (continuantsAux g (n' + 1)).a\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.mk.e_a\nK : Type u_1\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : Field K\na b : K\nb_ne_zero : b ≠ 0\nn' : ℕ\nnth_part_denom_ne_zero : ∀ {b : K}, Stream'.Seq.get? (partialDenominators g) (Nat.succ n') = some b → b ≠ 0\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n')\ns_nth_eq : Stream'.Seq.get? g.s (Nat.succ n') = some { a := a, b := b }\npa pb : K\ns_n'th_eq : Stream'.Seq.get? g.s n' = some { a := pa, b := pb }\ng' : GeneralizedContinuedFraction K := squashGCF g (n' + 1)\npred_conts : Pair K := continuantsAux g (n' + 1)\nsucc_n'th_conts_aux_eq : pred_conts = continuantsAux g (n' + 1)\nppred_conts : Pair K := continuantsAux g n'\nn'th_conts_aux_eq : ppred_conts = continuantsAux g n'\npA : K := pred_conts.a\npB : K := pred_conts.b\nppA : K := ppred_conts.a\nppB : K := ppred_conts.b\npred_conts' : Pair K := continuantsAux g' (n' + 1)\nsucc_n'th_conts_aux_eq' : pred_conts' = continuantsAux g' (n' + 1)\nppred_conts' : Pair K := continuantsAux g' n'\nn'th_conts_aux_eq' : ppred_conts' = continuantsAux g' n'\npA' : K := pred_conts'.a\npB' : K := pred_conts'.b\nppA' : K := ppred_conts'.a\nppB' : K := ppred_conts'.b\nthis✝ : convergents g' (n' + 1) = ((pb + a / b) * pA' + pa * ppA') / ((pb + a / b) * pB' + pa * ppB')\nthis : convergents g (n' + 2) = (b * (pb * pA + pa * ppA) + a * pA) / (b * (pb * pB + pa * ppB) + a * pB)\n⊢ (pb * b + a) * (continuantsAux g (n' + 1)).b + pa * (continuantsAux g n').b * b =\n    b * (pb * (continuantsAux g (n' + 1)).b + pa * (continuantsAux g n').b) + a * (continuantsAux g (n' + 1)).b\n[PROOFSTEP]\nring\n[GOAL]\nK : Type u_1\nn : ℕ\ng : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\n⊢ convergents g n = convergents' g n\n[PROOFSTEP]\ninduction' n with n IH generalizing g\n[GOAL]\ncase zero\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.zero → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\n⊢ convergents g Nat.zero = convergents' g Nat.zero\ncase succ\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\n⊢ convergents g (Nat.succ n) = convergents' g (Nat.succ n)\n[PROOFSTEP]\ncase zero => simp\n[GOAL]\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.zero → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\n⊢ convergents g Nat.zero = convergents' g Nat.zero\n[PROOFSTEP]\ncase zero => simp\n[GOAL]\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.zero → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\n⊢ convergents g Nat.zero = convergents' g Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\n⊢ convergents g (Nat.succ n) = convergents' g (Nat.succ n)\n[PROOFSTEP]\ncase succ =>\n  let g' := squashGCF g n\n  suffices g.convergents (n + 1) = g'.convergents' n by rwa [succ_nth_convergent'_eq_squashGCF_nth_convergent']\n  cases' Decidable.em (TerminatedAt g n) with terminated_at_n not_terminated_at_n\n  · have g'_eq_g : g' = g := squashGCF_eq_self_of_terminated terminated_at_n\n    rw [convergents_stable_of_terminated n.le_succ terminated_at_n, g'_eq_g, IH _]\n    intro _ _ m_lt_n s_mth_eq\n    exact s_pos (Nat.lt.step m_lt_n) s_mth_eq\n  · suffices g.convergents (n + 1) = g'.convergents n by\n      -- invoke the IH for the squashed gcf\n      rwa [← IH]\n      intro gp' m m_lt_n s_mth_eq'\n      cases' m_lt_n with n succ_m_lt_n\n      ·\n        -- the difficult case at the squashed position: we first obtain the values from\n                  -- the sequence\n        obtain ⟨gp_succ_m, s_succ_mth_eq⟩ : ∃ gp_succ_m, g.s.get? (m + 1) = some gp_succ_m\n        exact Option.ne_none_iff_exists'.mp not_terminated_at_n\n        obtain ⟨gp_m, mth_s_eq⟩ : ∃ gp_m, g.s.get? m = some gp_m\n        exact g.s.ge_stable m.le_succ s_succ_mth_eq\n        suffices 0 < gp_m.a ∧ 0 < gp_m.b + gp_succ_m.a / gp_succ_m.b\n          by\n          have ot : g'.s.get? m = some ⟨gp_m.a, gp_m.b + gp_succ_m.a / gp_succ_m.b⟩ :=\n            squashSeq_nth_of_not_terminated mth_s_eq s_succ_mth_eq\n          have : gp' = ⟨gp_m.a, gp_m.b + gp_succ_m.a / gp_succ_m.b⟩ := by simp_all only [Option.some.injEq]\n          rwa [this]\n        have m_lt_n : m < m.succ := Nat.lt_succ_self m\n        refine' ⟨(s_pos (Nat.lt.step m_lt_n) mth_s_eq).left, _⟩\n        refine' add_pos (s_pos (Nat.lt.step m_lt_n) mth_s_eq).right _\n        have : 0 < gp_succ_m.a ∧ 0 < gp_succ_m.b := s_pos (lt_add_one <| m + 1) s_succ_mth_eq\n        exact div_pos this.left this.right\n      ·\n        -- the easy case: before the squashed position, nothing changes\n        refine' s_pos (Nat.lt.step <| Nat.lt.step succ_m_lt_n) _\n        exact Eq.trans (squashGCF_nth_of_lt succ_m_lt_n).symm s_mth_eq'\n    have : ∀ ⦃b⦄, g.partialDenominators.get? n = some b → b ≠ 0 :=\n      by\n      intro b nth_part_denom_eq\n      obtain ⟨gp, s_nth_eq, ⟨refl⟩⟩ : ∃ gp, g.s.get? n = some gp ∧ gp.b = b\n      exact exists_s_b_of_part_denom nth_part_denom_eq\n      exact (ne_of_lt (s_pos (lt_add_one n) s_nth_eq).right).symm\n    exact succ_nth_convergent_eq_squashGCF_nth_convergent @this\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\n⊢ convergents g (Nat.succ n) = convergents' g (Nat.succ n)\n[PROOFSTEP]\ncase succ =>\n  let g' := squashGCF g n\n  suffices g.convergents (n + 1) = g'.convergents' n by rwa [succ_nth_convergent'_eq_squashGCF_nth_convergent']\n  cases' Decidable.em (TerminatedAt g n) with terminated_at_n not_terminated_at_n\n  · have g'_eq_g : g' = g := squashGCF_eq_self_of_terminated terminated_at_n\n    rw [convergents_stable_of_terminated n.le_succ terminated_at_n, g'_eq_g, IH _]\n    intro _ _ m_lt_n s_mth_eq\n    exact s_pos (Nat.lt.step m_lt_n) s_mth_eq\n  · suffices g.convergents (n + 1) = g'.convergents n by\n      -- invoke the IH for the squashed gcf\n      rwa [← IH]\n      intro gp' m m_lt_n s_mth_eq'\n      cases' m_lt_n with n succ_m_lt_n\n      ·\n        -- the difficult case at the squashed position: we first obtain the values from\n                  -- the sequence\n        obtain ⟨gp_succ_m, s_succ_mth_eq⟩ : ∃ gp_succ_m, g.s.get? (m + 1) = some gp_succ_m\n        exact Option.ne_none_iff_exists'.mp not_terminated_at_n\n        obtain ⟨gp_m, mth_s_eq⟩ : ∃ gp_m, g.s.get? m = some gp_m\n        exact g.s.ge_stable m.le_succ s_succ_mth_eq\n        suffices 0 < gp_m.a ∧ 0 < gp_m.b + gp_succ_m.a / gp_succ_m.b\n          by\n          have ot : g'.s.get? m = some ⟨gp_m.a, gp_m.b + gp_succ_m.a / gp_succ_m.b⟩ :=\n            squashSeq_nth_of_not_terminated mth_s_eq s_succ_mth_eq\n          have : gp' = ⟨gp_m.a, gp_m.b + gp_succ_m.a / gp_succ_m.b⟩ := by simp_all only [Option.some.injEq]\n          rwa [this]\n        have m_lt_n : m < m.succ := Nat.lt_succ_self m\n        refine' ⟨(s_pos (Nat.lt.step m_lt_n) mth_s_eq).left, _⟩\n        refine' add_pos (s_pos (Nat.lt.step m_lt_n) mth_s_eq).right _\n        have : 0 < gp_succ_m.a ∧ 0 < gp_succ_m.b := s_pos (lt_add_one <| m + 1) s_succ_mth_eq\n        exact div_pos this.left this.right\n      ·\n        -- the easy case: before the squashed position, nothing changes\n        refine' s_pos (Nat.lt.step <| Nat.lt.step succ_m_lt_n) _\n        exact Eq.trans (squashGCF_nth_of_lt succ_m_lt_n).symm s_mth_eq'\n    have : ∀ ⦃b⦄, g.partialDenominators.get? n = some b → b ≠ 0 :=\n      by\n      intro b nth_part_denom_eq\n      obtain ⟨gp, s_nth_eq, ⟨refl⟩⟩ : ∃ gp, g.s.get? n = some gp ∧ gp.b = b\n      exact exists_s_b_of_part_denom nth_part_denom_eq\n      exact (ne_of_lt (s_pos (lt_add_one n) s_nth_eq).right).symm\n    exact succ_nth_convergent_eq_squashGCF_nth_convergent @this\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\n⊢ convergents g (Nat.succ n) = convergents' g (Nat.succ n)\n[PROOFSTEP]\nlet g' := squashGCF g n\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\n⊢ convergents g (Nat.succ n) = convergents' g (Nat.succ n)\n[PROOFSTEP]\nsuffices g.convergents (n + 1) = g'.convergents' n by rwa [succ_nth_convergent'_eq_squashGCF_nth_convergent']\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nthis : convergents g (n + 1) = convergents' g' n\n⊢ convergents g (Nat.succ n) = convergents' g (Nat.succ n)\n[PROOFSTEP]\nrwa [succ_nth_convergent'_eq_squashGCF_nth_convergent']\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\n⊢ convergents g (n + 1) = convergents' g' n\n[PROOFSTEP]\ncases' Decidable.em (TerminatedAt g n) with terminated_at_n not_terminated_at_n\n[GOAL]\ncase inl\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nterminated_at_n : TerminatedAt g n\n⊢ convergents g (n + 1) = convergents' g' n\n[PROOFSTEP]\nhave g'_eq_g : g' = g := squashGCF_eq_self_of_terminated terminated_at_n\n[GOAL]\ncase inl\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nterminated_at_n : TerminatedAt g n\ng'_eq_g : g' = g\n⊢ convergents g (n + 1) = convergents' g' n\n[PROOFSTEP]\nrw [convergents_stable_of_terminated n.le_succ terminated_at_n, g'_eq_g, IH _]\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nterminated_at_n : TerminatedAt g n\ng'_eq_g : g' = g\n⊢ ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\n[PROOFSTEP]\nintro _ _ m_lt_n s_mth_eq\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nterminated_at_n : TerminatedAt g n\ng'_eq_g : g' = g\ngp✝ : Pair K\nm✝ : ℕ\nm_lt_n : m✝ < n\ns_mth_eq : Stream'.Seq.get? g.s m✝ = some gp✝\n⊢ 0 < gp✝.a ∧ 0 < gp✝.b\n[PROOFSTEP]\nexact s_pos (Nat.lt.step m_lt_n) s_mth_eq\n[GOAL]\ncase inr\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nnot_terminated_at_n : ¬TerminatedAt g n\n⊢ convergents g (n + 1) = convergents' g' n\n[PROOFSTEP]\nsuffices g.convergents (n + 1) = g'.convergents n by\n  -- invoke the IH for the squashed gcf\n  rwa [← IH]\n  intro gp' m m_lt_n s_mth_eq'\n  cases' m_lt_n with n succ_m_lt_n\n  ·\n    -- the difficult case at the squashed position: we first obtain the values from\n              -- the sequence\n    obtain ⟨gp_succ_m, s_succ_mth_eq⟩ : ∃ gp_succ_m, g.s.get? (m + 1) = some gp_succ_m\n    exact Option.ne_none_iff_exists'.mp not_terminated_at_n\n    obtain ⟨gp_m, mth_s_eq⟩ : ∃ gp_m, g.s.get? m = some gp_m\n    exact g.s.ge_stable m.le_succ s_succ_mth_eq\n    suffices 0 < gp_m.a ∧ 0 < gp_m.b + gp_succ_m.a / gp_succ_m.b\n      by\n      have ot : g'.s.get? m = some ⟨gp_m.a, gp_m.b + gp_succ_m.a / gp_succ_m.b⟩ :=\n        squashSeq_nth_of_not_terminated mth_s_eq s_succ_mth_eq\n      have : gp' = ⟨gp_m.a, gp_m.b + gp_succ_m.a / gp_succ_m.b⟩ := by simp_all only [Option.some.injEq]\n      rwa [this]\n    have m_lt_n : m < m.succ := Nat.lt_succ_self m\n    refine' ⟨(s_pos (Nat.lt.step m_lt_n) mth_s_eq).left, _⟩\n    refine' add_pos (s_pos (Nat.lt.step m_lt_n) mth_s_eq).right _\n    have : 0 < gp_succ_m.a ∧ 0 < gp_succ_m.b := s_pos (lt_add_one <| m + 1) s_succ_mth_eq\n    exact div_pos this.left this.right\n  ·\n    -- the easy case: before the squashed position, nothing changes\n    refine' s_pos (Nat.lt.step <| Nat.lt.step succ_m_lt_n) _\n    exact Eq.trans (squashGCF_nth_of_lt succ_m_lt_n).symm s_mth_eq'\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nnot_terminated_at_n : ¬TerminatedAt g n\nthis : convergents g (n + 1) = convergents g' n\n⊢ convergents g (n + 1) = convergents' g' n\n[PROOFSTEP]\nrwa [← IH]\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nnot_terminated_at_n : ¬TerminatedAt g n\nthis : convergents g (n + 1) = convergents g' n\n⊢ ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g'.s m = some gp → 0 < gp.a ∧ 0 < gp.b\n[PROOFSTEP]\nintro gp' m m_lt_n s_mth_eq'\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nnot_terminated_at_n : ¬TerminatedAt g n\nthis : convergents g (n + 1) = convergents g' n\ngp' : Pair K\nm : ℕ\nm_lt_n : m < n\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\n⊢ 0 < gp'.a ∧ 0 < gp'.b\n[PROOFSTEP]\ncases' m_lt_n with n succ_m_lt_n\n[GOAL]\ncase refl\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\n⊢ 0 < gp'.a ∧ 0 < gp'.b\n[PROOFSTEP]\nobtain ⟨gp_succ_m, s_succ_mth_eq⟩ : ∃ gp_succ_m, g.s.get? (m + 1) = some gp_succ_m\n[GOAL]\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\n⊢ ∃ gp_succ_m, Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\ncase refl.intro\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\n⊢ 0 < gp'.a ∧ 0 < gp'.b\n[PROOFSTEP]\nexact Option.ne_none_iff_exists'.mp not_terminated_at_n\n[GOAL]\ncase refl.intro\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\n⊢ 0 < gp'.a ∧ 0 < gp'.b\n[PROOFSTEP]\nobtain ⟨gp_m, mth_s_eq⟩ : ∃ gp_m, g.s.get? m = some gp_m\n[GOAL]\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\n⊢ ∃ gp_m, Stream'.Seq.get? g.s m = some gp_m\ncase refl.intro.intro\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\ngp_m : Pair K\nmth_s_eq : Stream'.Seq.get? g.s m = some gp_m\n⊢ 0 < gp'.a ∧ 0 < gp'.b\n[PROOFSTEP]\nexact g.s.ge_stable m.le_succ s_succ_mth_eq\n[GOAL]\ncase refl.intro.intro\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\ngp_m : Pair K\nmth_s_eq : Stream'.Seq.get? g.s m = some gp_m\n⊢ 0 < gp'.a ∧ 0 < gp'.b\n[PROOFSTEP]\nsuffices 0 < gp_m.a ∧ 0 < gp_m.b + gp_succ_m.a / gp_succ_m.b\n  by\n  have ot : g'.s.get? m = some ⟨gp_m.a, gp_m.b + gp_succ_m.a / gp_succ_m.b⟩ :=\n    squashSeq_nth_of_not_terminated mth_s_eq s_succ_mth_eq\n  have : gp' = ⟨gp_m.a, gp_m.b + gp_succ_m.a / gp_succ_m.b⟩ := by simp_all only [Option.some.injEq]\n  rwa [this]\n[GOAL]\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis✝ : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\ngp_m : Pair K\nmth_s_eq : Stream'.Seq.get? g.s m = some gp_m\nthis : 0 < gp_m.a ∧ 0 < gp_m.b + gp_succ_m.a / gp_succ_m.b\n⊢ 0 < gp'.a ∧ 0 < gp'.b\n[PROOFSTEP]\nhave ot : g'.s.get? m = some ⟨gp_m.a, gp_m.b + gp_succ_m.a / gp_succ_m.b⟩ :=\n  squashSeq_nth_of_not_terminated mth_s_eq s_succ_mth_eq\n[GOAL]\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis✝ : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\ngp_m : Pair K\nmth_s_eq : Stream'.Seq.get? g.s m = some gp_m\nthis : 0 < gp_m.a ∧ 0 < gp_m.b + gp_succ_m.a / gp_succ_m.b\not : Stream'.Seq.get? g'.s m = some { a := gp_m.a, b := gp_m.b + gp_succ_m.a / gp_succ_m.b }\n⊢ 0 < gp'.a ∧ 0 < gp'.b\n[PROOFSTEP]\nhave : gp' = ⟨gp_m.a, gp_m.b + gp_succ_m.a / gp_succ_m.b⟩ := by simp_all only [Option.some.injEq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis✝ : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\ngp_m : Pair K\nmth_s_eq : Stream'.Seq.get? g.s m = some gp_m\nthis : 0 < gp_m.a ∧ 0 < gp_m.b + gp_succ_m.a / gp_succ_m.b\not : Stream'.Seq.get? g'.s m = some { a := gp_m.a, b := gp_m.b + gp_succ_m.a / gp_succ_m.b }\n⊢ gp' = { a := gp_m.a, b := gp_m.b + gp_succ_m.a / gp_succ_m.b }\n[PROOFSTEP]\nsimp_all only [Option.some.injEq]\n[GOAL]\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis✝¹ : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\ngp_m : Pair K\nmth_s_eq : Stream'.Seq.get? g.s m = some gp_m\nthis✝ : 0 < gp_m.a ∧ 0 < gp_m.b + gp_succ_m.a / gp_succ_m.b\not : Stream'.Seq.get? g'.s m = some { a := gp_m.a, b := gp_m.b + gp_succ_m.a / gp_succ_m.b }\nthis : gp' = { a := gp_m.a, b := gp_m.b + gp_succ_m.a / gp_succ_m.b }\n⊢ 0 < gp'.a ∧ 0 < gp'.b\n[PROOFSTEP]\nrwa [this]\n[GOAL]\ncase refl.intro.intro\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\ngp_m : Pair K\nmth_s_eq : Stream'.Seq.get? g.s m = some gp_m\n⊢ 0 < gp_m.a ∧ 0 < gp_m.b + gp_succ_m.a / gp_succ_m.b\n[PROOFSTEP]\nhave m_lt_n : m < m.succ := Nat.lt_succ_self m\n[GOAL]\ncase refl.intro.intro\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\ngp_m : Pair K\nmth_s_eq : Stream'.Seq.get? g.s m = some gp_m\nm_lt_n : m < Nat.succ m\n⊢ 0 < gp_m.a ∧ 0 < gp_m.b + gp_succ_m.a / gp_succ_m.b\n[PROOFSTEP]\nrefine' ⟨(s_pos (Nat.lt.step m_lt_n) mth_s_eq).left, _⟩\n[GOAL]\ncase refl.intro.intro\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\ngp_m : Pair K\nmth_s_eq : Stream'.Seq.get? g.s m = some gp_m\nm_lt_n : m < Nat.succ m\n⊢ 0 < gp_m.b + gp_succ_m.a / gp_succ_m.b\n[PROOFSTEP]\nrefine' add_pos (s_pos (Nat.lt.step m_lt_n) mth_s_eq).right _\n[GOAL]\ncase refl.intro.intro\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\ngp_m : Pair K\nmth_s_eq : Stream'.Seq.get? g.s m = some gp_m\nm_lt_n : m < Nat.succ m\n⊢ 0 < gp_succ_m.a / gp_succ_m.b\n[PROOFSTEP]\nhave : 0 < gp_succ_m.a ∧ 0 < gp_succ_m.b := s_pos (lt_add_one <| m + 1) s_succ_mth_eq\n[GOAL]\ncase refl.intro.intro\nK : Type u_1\nn : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ m → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ m) = convergents' g (Nat.succ m)\ns_pos :\n  ∀ {gp : Pair K} {m_1 : ℕ}, m_1 < Nat.succ (Nat.succ m) → Stream'.Seq.get? g.s m_1 = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ m)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ m)\nthis✝ : convergents g (Nat.succ m + 1) = convergents g' (Nat.succ m)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\ngp_succ_m : Pair K\ns_succ_mth_eq : Stream'.Seq.get? g.s (m + 1) = some gp_succ_m\ngp_m : Pair K\nmth_s_eq : Stream'.Seq.get? g.s m = some gp_m\nm_lt_n : m < Nat.succ m\nthis : 0 < gp_succ_m.a ∧ 0 < gp_succ_m.b\n⊢ 0 < gp_succ_m.a / gp_succ_m.b\n[PROOFSTEP]\nexact div_pos this.left this.right\n[GOAL]\ncase step\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm n : ℕ\nsucc_m_lt_n : Nat.le (Nat.succ m) n\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ n) = convergents' g (Nat.succ n)\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ (Nat.succ n) → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ n)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n)\nthis : convergents g (Nat.succ n + 1) = convergents g' (Nat.succ n)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\n⊢ 0 < gp'.a ∧ 0 < gp'.b\n[PROOFSTEP]\nrefine' s_pos (Nat.lt.step <| Nat.lt.step succ_m_lt_n) _\n[GOAL]\ncase step\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng : GeneralizedContinuedFraction K\ngp' : Pair K\nm n : ℕ\nsucc_m_lt_n : Nat.le (Nat.succ m) n\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g (Nat.succ n) = convergents' g (Nat.succ n)\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ (Nat.succ n) → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g (Nat.succ n)\nnot_terminated_at_n : ¬TerminatedAt g (Nat.succ n)\nthis : convergents g (Nat.succ n + 1) = convergents g' (Nat.succ n)\ns_mth_eq' : Stream'.Seq.get? g'.s m = some gp'\n⊢ Stream'.Seq.get? g.s m = some gp'\n[PROOFSTEP]\nexact Eq.trans (squashGCF_nth_of_lt succ_m_lt_n).symm s_mth_eq'\n[GOAL]\ncase inr\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nnot_terminated_at_n : ¬TerminatedAt g n\n⊢ convergents g (n + 1) = convergents g' n\n[PROOFSTEP]\nhave : ∀ ⦃b⦄, g.partialDenominators.get? n = some b → b ≠ 0 :=\n  by\n  intro b nth_part_denom_eq\n  obtain ⟨gp, s_nth_eq, ⟨refl⟩⟩ : ∃ gp, g.s.get? n = some gp ∧ gp.b = b\n  exact exists_s_b_of_part_denom nth_part_denom_eq\n  exact (ne_of_lt (s_pos (lt_add_one n) s_nth_eq).right).symm\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nnot_terminated_at_n : ¬TerminatedAt g n\n⊢ ∀ ⦃b : K⦄, Stream'.Seq.get? (partialDenominators g) n = some b → b ≠ 0\n[PROOFSTEP]\nintro b nth_part_denom_eq\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nnot_terminated_at_n : ¬TerminatedAt g n\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators g) n = some b\n⊢ b ≠ 0\n[PROOFSTEP]\nobtain ⟨gp, s_nth_eq, ⟨refl⟩⟩ : ∃ gp, g.s.get? n = some gp ∧ gp.b = b\n[GOAL]\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nnot_terminated_at_n : ¬TerminatedAt g n\nb : K\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators g) n = some b\n⊢ ∃ gp, Stream'.Seq.get? g.s n = some gp ∧ gp.b = b\ncase intro.intro.refl\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators g) n = some gp.b\n⊢ gp.b ≠ 0\n[PROOFSTEP]\nexact exists_s_b_of_part_denom nth_part_denom_eq\n[GOAL]\ncase intro.intro.refl\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nnot_terminated_at_n : ¬TerminatedAt g n\ngp : Pair K\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators g) n = some gp.b\n⊢ gp.b ≠ 0\n[PROOFSTEP]\nexact (ne_of_lt (s_pos (lt_add_one n) s_nth_eq).right).symm\n[GOAL]\ncase inr\nK : Type u_1\nn✝ : ℕ\ng✝ : GeneralizedContinuedFraction K\ns : Stream'.Seq (Pair K)\ninst✝ : LinearOrderedField K\ns_pos✝ : ∀ {gp : Pair K} {m : ℕ}, m < n✝ → Stream'.Seq.get? g✝.s m = some gp → 0 < gp.a ∧ 0 < gp.b\nn : ℕ\nIH :\n  ∀ {g : GeneralizedContinuedFraction K},\n    (∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b) →\n      convergents g n = convergents' g n\ng : GeneralizedContinuedFraction K\ns_pos : ∀ {gp : Pair K} {m : ℕ}, m < Nat.succ n → Stream'.Seq.get? g.s m = some gp → 0 < gp.a ∧ 0 < gp.b\ng' : GeneralizedContinuedFraction K := squashGCF g n\nnot_terminated_at_n : ¬TerminatedAt g n\nthis : ∀ ⦃b : K⦄, Stream'.Seq.get? (partialDenominators g) n = some b → b ≠ 0\n⊢ convergents g (n + 1) = convergents g' n\n[PROOFSTEP]\nexact succ_nth_convergent_eq_squashGCF_nth_convergent @this\n[GOAL]\nK : Type u_1\nn : ℕ\ninst✝ : LinearOrderedField K\nc : ContinuedFraction K\n⊢ convergents ↑↑c = convergents' ↑↑c\n[PROOFSTEP]\next n\n[GOAL]\ncase a\nK : Type u_1\nn✝ : ℕ\ninst✝ : LinearOrderedField K\nc : ContinuedFraction K\nn : ℕ\n⊢ Stream'.nth (convergents ↑↑c) n = Stream'.nth (convergents' ↑↑c) n\n[PROOFSTEP]\napply convergents_eq_convergents'\n[GOAL]\ncase a.s_pos\nK : Type u_1\nn✝ : ℕ\ninst✝ : LinearOrderedField K\nc : ContinuedFraction K\nn : ℕ\n⊢ ∀ {gp : Pair K} {m : ℕ}, m < n → Stream'.Seq.get? (↑↑c).s m = some gp → 0 < gp.a ∧ 0 < gp.b\n[PROOFSTEP]\nintro gp m _ s_nth_eq\n[GOAL]\ncase a.s_pos\nK : Type u_1\nn✝ : ℕ\ninst✝ : LinearOrderedField K\nc : ContinuedFraction K\nn : ℕ\ngp : Pair K\nm : ℕ\na✝ : m < n\ns_nth_eq : Stream'.Seq.get? (↑↑c).s m = some gp\n⊢ 0 < gp.a ∧ 0 < gp.b\n[PROOFSTEP]\nexact\n  ⟨zero_lt_one.trans_le ((c : SimpleContinuedFraction K).property m gp.a (part_num_eq_s_a s_nth_eq)).symm.le,\n    c.property m gp.b <| part_denom_eq_s_b s_nth_eq⟩\n", "meta": {"mathlib_filename": "Mathlib.Algebra.ContinuedFractions.ConvergentsEquiv", "llama_tokens": 73833, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6442251201477016, "lm_q2_score": 0.5506073655352403, "lm_q1q2_score": 0.3547150962161496}}
{"text": "[GOAL]\nS : Type u_1\nR : Type u_2\ninst✝² : AddMonoidWithOne R\ninst✝¹ : SetLike S R\ns : S\ninst✝ : AddSubmonoidWithOneClass S R\nn : ℕ\n⊢ ↑n ∈ s\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nS : Type u_1\nR : Type u_2\ninst✝² : AddMonoidWithOne R\ninst✝¹ : SetLike S R\ns : S\ninst✝ : AddSubmonoidWithOneClass S R\n⊢ ↑Nat.zero ∈ s\n[PROOFSTEP]\nsimp [zero_mem, add_mem, one_mem, *]\n[GOAL]\ncase succ\nS : Type u_1\nR : Type u_2\ninst✝² : AddMonoidWithOne R\ninst✝¹ : SetLike S R\ns : S\ninst✝ : AddSubmonoidWithOneClass S R\nn✝ : ℕ\nn_ih✝ : ↑n✝ ∈ s\n⊢ ↑(Nat.succ n✝) ∈ s\n[PROOFSTEP]\nsimp [zero_mem, add_mem, one_mem, *]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝¹ : NonAssocSemiring R\nM : Submonoid R\ninst✝ : SetLike S R\nhSR : SubsemiringClass S R\ns : S\nn : ℕ\n⊢ ↑n ∈ s\n[PROOFSTEP]\nrw [← nsmul_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝¹ : NonAssocSemiring R\nM : Submonoid R\ninst✝ : SetLike S R\nhSR : SubsemiringClass S R\ns : S\nn : ℕ\n⊢ n • 1 ∈ s\n[PROOFSTEP]\nexact nsmul_mem (one_mem _) _\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝⁴ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝³ : SetLike S R✝\nhSR : SubsemiringClass S R✝\ns : S\nR : Type u_1\ninst✝² : Semiring R\ninst✝¹ : SetLike S R\ninst✝ : SubsemiringClass S R\nx : { x // x ∈ s }\nn : ℕ\n⊢ ↑(x ^ n) = ↑x ^ n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝⁴ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝³ : SetLike S R✝\nhSR : SubsemiringClass S R✝\ns : S\nR : Type u_1\ninst✝² : Semiring R\ninst✝¹ : SetLike S R\ninst✝ : SubsemiringClass S R\nx : { x // x ∈ s }\n⊢ ↑(x ^ Nat.zero) = ↑x ^ Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝⁴ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝³ : SetLike S R✝\nhSR : SubsemiringClass S R✝\ns : S\nR : Type u_1\ninst✝² : Semiring R\ninst✝¹ : SetLike S R\ninst✝ : SubsemiringClass S R\nx : { x // x ∈ s }\nn : ℕ\nih : ↑(x ^ n) = ↑x ^ n\n⊢ ↑(x ^ Nat.succ n) = ↑x ^ Nat.succ n\n[PROOFSTEP]\nsimp [pow_succ, ih]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\np q : Subsemiring R\nh : (fun s => s.carrier) p = (fun s => s.carrier) q\n⊢ p = q\n[PROOFSTEP]\ncases p\n[GOAL]\ncase mk\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\nq : Subsemiring R\ntoSubmonoid✝ : Submonoid R\nadd_mem'✝ : ∀ {a b : R}, a ∈ toSubmonoid✝.carrier → b ∈ toSubmonoid✝.carrier → a + b ∈ toSubmonoid✝.carrier\nzero_mem'✝ : 0 ∈ toSubmonoid✝.carrier\nh :\n  (fun s => s.carrier) { toSubmonoid := toSubmonoid✝, add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ } =\n    (fun s => s.carrier) q\n⊢ { toSubmonoid := toSubmonoid✝, add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ } = q\n[PROOFSTEP]\ncases q\n[GOAL]\ncase mk.mk\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ntoSubmonoid✝¹ : Submonoid R\nadd_mem'✝¹ : ∀ {a b : R}, a ∈ toSubmonoid✝¹.carrier → b ∈ toSubmonoid✝¹.carrier → a + b ∈ toSubmonoid✝¹.carrier\nzero_mem'✝¹ : 0 ∈ toSubmonoid✝¹.carrier\ntoSubmonoid✝ : Submonoid R\nadd_mem'✝ : ∀ {a b : R}, a ∈ toSubmonoid✝.carrier → b ∈ toSubmonoid✝.carrier → a + b ∈ toSubmonoid✝.carrier\nzero_mem'✝ : 0 ∈ toSubmonoid✝.carrier\nh :\n  (fun s => s.carrier) { toSubmonoid := toSubmonoid✝¹, add_mem' := add_mem'✝¹, zero_mem' := zero_mem'✝¹ } =\n    (fun s => s.carrier) { toSubmonoid := toSubmonoid✝, add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ }\n⊢ { toSubmonoid := toSubmonoid✝¹, add_mem' := add_mem'✝¹, zero_mem' := zero_mem'✝¹ } =\n    { toSubmonoid := toSubmonoid✝, add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_toSubmonoid\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ntoSubmonoid✝¹ : Submonoid R\nadd_mem'✝¹ : ∀ {a b : R}, a ∈ toSubmonoid✝¹.carrier → b ∈ toSubmonoid✝¹.carrier → a + b ∈ toSubmonoid✝¹.carrier\nzero_mem'✝¹ : 0 ∈ toSubmonoid✝¹.carrier\ntoSubmonoid✝ : Submonoid R\nadd_mem'✝ : ∀ {a b : R}, a ∈ toSubmonoid✝.carrier → b ∈ toSubmonoid✝.carrier → a + b ∈ toSubmonoid✝.carrier\nzero_mem'✝ : 0 ∈ toSubmonoid✝.carrier\nh :\n  (fun s => s.carrier) { toSubmonoid := toSubmonoid✝¹, add_mem' := add_mem'✝¹, zero_mem' := zero_mem'✝¹ } =\n    (fun s => s.carrier) { toSubmonoid := toSubmonoid✝, add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ }\n⊢ toSubmonoid✝¹ = toSubmonoid✝\n[PROOFSTEP]\nexact SetLike.coe_injective' h\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\nsm : Submonoid R\nhm : ↑sm = s\nsa : AddSubmonoid R\nha : ↑sa = s\nx y : R\n⊢ x ∈ s → y ∈ s → x * y ∈ s\n[PROOFSTEP]\nsimpa only [← hm] using sm.mul_mem\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\nsm : Submonoid R\nhm : ↑sm = s\nsa : AddSubmonoid R\nha : ↑sa = s\n⊢ 1 ∈ { carrier := s, mul_mem' := (_ : ∀ {x y : R}, x ∈ s → y ∈ s → x * y ∈ s) }.carrier\n[PROOFSTEP]\nexact hm ▸ sm.one_mem\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\nsm : Submonoid R\nhm : ↑sm = s\nsa : AddSubmonoid R\nha : ↑sa = s\nx y : R\n⊢ x ∈\n      { toSubsemigroup := { carrier := s, mul_mem' := (_ : ∀ {x y : R}, x ∈ s → y ∈ s → x * y ∈ s) },\n            one_mem' :=\n              (_ :\n                1 ∈\n                  { carrier := s,\n                      mul_mem' := (_ : ∀ {x y : R}, x ∈ s → y ∈ s → x * y ∈ s) }.carrier) }.toSubsemigroup.carrier →\n    y ∈\n        { toSubsemigroup := { carrier := s, mul_mem' := (_ : ∀ {x y : R}, x ∈ s → y ∈ s → x * y ∈ s) },\n              one_mem' :=\n                (_ :\n                  1 ∈\n                    { carrier := s,\n                        mul_mem' := (_ : ∀ {x y : R}, x ∈ s → y ∈ s → x * y ∈ s) }.carrier) }.toSubsemigroup.carrier →\n      x + y ∈\n        { toSubsemigroup := { carrier := s, mul_mem' := (_ : ∀ {x y : R}, x ∈ s → y ∈ s → x * y ∈ s) },\n              one_mem' :=\n                (_ :\n                  1 ∈\n                    { carrier := s,\n                        mul_mem' := (_ : ∀ {x y : R}, x ∈ s → y ∈ s → x * y ∈ s) }.carrier) }.toSubsemigroup.carrier\n[PROOFSTEP]\nsimpa only [← ha] using sa.add_mem\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\nsm : Submonoid R\nhm : ↑sm = s\nsa : AddSubmonoid R\nha : ↑sa = s\n⊢ 0 ∈\n    { toSubsemigroup := { carrier := s, mul_mem' := (_ : ∀ {x y : R}, x ∈ s → y ∈ s → x * y ∈ s) },\n          one_mem' :=\n            (_ :\n              1 ∈\n                { carrier := s,\n                    mul_mem' := (_ : ∀ {x y : R}, x ∈ s → y ∈ s → x * y ∈ s) }.carrier) }.toSubsemigroup.carrier\n[PROOFSTEP]\nexact ha ▸ sa.zero_mem\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\ns✝ : Subsemiring R✝\nR : Type u_1\ninst✝ : Semiring R\ns : Subsemiring R\nx : { x // x ∈ s }\nn : ℕ\n⊢ ↑(x ^ n) = ↑x ^ n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\ns✝ : Subsemiring R✝\nR : Type u_1\ninst✝ : Semiring R\ns : Subsemiring R\nx : { x // x ∈ s }\n⊢ ↑(x ^ Nat.zero) = ↑x ^ Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\ns✝ : Subsemiring R✝\nR : Type u_1\ninst✝ : Semiring R\ns : Subsemiring R\nx : { x // x ∈ s }\nn : ℕ\nih : ↑(x ^ n) = ↑x ^ n\n⊢ ↑(x ^ Nat.succ n) = ↑x ^ Nat.succ n\n[PROOFSTEP]\nsimp [pow_succ, ih]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns✝ : Subsemiring R\nf : R →+* S\ns : Subsemiring R\ny : S\n⊢ y ∈ map f s ↔ ∃ x, x ∈ s ∧ ↑f x = y\n[PROOFSTEP]\nconvert Set.mem_image_iff_bex (f := f) (s := s.carrier) (y := y) using 1\n[GOAL]\ncase h.e'_2.a\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns✝ : Subsemiring R\nf : R →+* S\ns : Subsemiring R\ny : S\n⊢ (∃ x, x ∈ s ∧ ↑f x = y) ↔ ∃ x x_1, ↑f x = y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ng : S →+* T\nf✝ f : R →+* S\n⊢ rangeS f = Subsemiring.map f ⊤\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ng : S →+* T\nf✝ f : R →+* S\nx✝ : S\n⊢ x✝ ∈ rangeS f ↔ x✝ ∈ Subsemiring.map f ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ng : S →+* T\nf : R →+* S\n⊢ Subsemiring.map g (rangeS f) = rangeS (comp g f)\n[PROOFSTEP]\nsimpa only [rangeS_eq_map] using (⊤ : Subsemiring R).map_map g f\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set (Subsemiring R)\n⊢ ↑(⨅ (t : Subsemiring R) (_ : t ∈ s), t.toSubmonoid) = ⋂ (t : Subsemiring R) (_ : t ∈ s), ↑t\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set (Subsemiring R)\n⊢ ↑(⨅ (t : Subsemiring R) (_ : t ∈ s), toAddSubmonoid t) = ⋂ (t : Subsemiring R) (_ : t ∈ s), ↑t\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\nf : R ≃+* S\nK : Subsemiring R\nx : S\n⊢ x ∈ map (↑f) K ↔ ↑(RingEquiv.symm f) x ∈ K\n[PROOFSTEP]\nconvert @Set.mem_image_equiv _ _ (↑K) f.toEquiv x using 1\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\n⊢ subsemiringClosure M = Subsemiring.closure ↑M\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\nx✝ : R\n⊢ x✝ ∈ subsemiringClosure M ↔ x✝ ∈ Subsemiring.closure ↑M\n[PROOFSTEP]\nrefine' ⟨fun hx => _, fun hx => (Subsemiring.mem_closure.mp hx) M.subsemiringClosure fun s sM => _⟩\n[GOAL]\ncase h.refine'_1\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\nx✝ : R\nhx : x✝ ∈ subsemiringClosure M\n⊢ x✝ ∈ Subsemiring.closure ↑M\n[PROOFSTEP]\nrintro - ⟨H1, rfl⟩\n[GOAL]\ncase h.refine'_2\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\nx✝ : R\nhx : x✝ ∈ Subsemiring.closure ↑M\ns : R\nsM : s ∈ ↑M\n⊢ s ∈ ↑(subsemiringClosure M)\n[PROOFSTEP]\nrintro - ⟨H1, rfl⟩\n[GOAL]\ncase h.refine'_1.intro\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\nx✝ : R\nhx : x✝ ∈ subsemiringClosure M\nH1 : Subsemiring R\n⊢ x✝ ∈ (fun t => ⋂ (_ : t ∈ {S | ↑M ⊆ ↑S}), ↑t) H1\n[PROOFSTEP]\nrintro - ⟨H2, rfl⟩\n[GOAL]\ncase h.refine'_2.intro\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\nx✝ : R\nhx : x✝ ∈ Subsemiring.closure ↑M\ns : R\nsM : s ∈ ↑M\nH1 : AddSubmonoid R\n⊢ s ∈ (fun t => ⋂ (_ : t ∈ {S | ↑M ⊆ ↑S}), ↑t) H1\n[PROOFSTEP]\nrintro - ⟨H2, rfl⟩\n[GOAL]\ncase h.refine'_1.intro.intro\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\nx✝ : R\nhx : x✝ ∈ subsemiringClosure M\nH1 : Subsemiring R\nH2 : H1 ∈ {S | ↑M ⊆ ↑S}\n⊢ x✝ ∈ (fun h => ↑H1) H2\n[PROOFSTEP]\nexact AddSubmonoid.mem_closure.mp hx H1.toAddSubmonoid H2\n[GOAL]\ncase h.refine'_2.intro.intro\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\nx✝ : R\nhx : x✝ ∈ Subsemiring.closure ↑M\ns : R\nsM : s ∈ ↑M\nH1 : AddSubmonoid R\nH2 : H1 ∈ {S | ↑M ⊆ ↑S}\n⊢ s ∈ (fun h => ↑H1) H2\n[PROOFSTEP]\nexact H2 sM\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\n⊢ ↑(closure s) = ↑(AddSubmonoid.closure ↑(Submonoid.closure s))\n[PROOFSTEP]\nsimp [← Submonoid.subsemiringClosure_toAddSubmonoid, Submonoid.subsemiringClosure_eq_closure]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\n⊢ closure ↑(AddSubmonoid.closure s) = closure s\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\nx : R\n⊢ x ∈ closure ↑(AddSubmonoid.closure s) ↔ x ∈ closure s\n[PROOFSTEP]\nrefine' ⟨fun hx => _, fun hx => closure_mono AddSubmonoid.subset_closure hx⟩\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\nx : R\nhx : x ∈ closure ↑(AddSubmonoid.closure s)\n⊢ x ∈ closure s\n[PROOFSTEP]\nrintro - ⟨H, rfl⟩\n[GOAL]\ncase h.intro\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\nx : R\nhx : x ∈ closure ↑(AddSubmonoid.closure s)\nH : Subsemiring R\n⊢ x ∈ (fun t => ⋂ (_ : t ∈ {S | s ⊆ ↑S}), ↑t) H\n[PROOFSTEP]\nrintro - ⟨J, rfl⟩\n[GOAL]\ncase h.intro.intro\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\nx : R\nhx : x ∈ closure ↑(AddSubmonoid.closure s)\nH : Subsemiring R\nJ : H ∈ {S | s ⊆ ↑S}\n⊢ x ∈ (fun h => ↑H) J\n[PROOFSTEP]\nrefine' (AddSubmonoid.mem_closure.mp (mem_closure_iff.mp hx)) H.toAddSubmonoid fun y hy => _\n[GOAL]\ncase h.intro.intro\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\nx : R\nhx : x ∈ closure ↑(AddSubmonoid.closure s)\nH : Subsemiring R\nJ : H ∈ {S | s ⊆ ↑S}\ny : R\nhy : y ∈ ↑(Submonoid.closure ↑(AddSubmonoid.closure s))\n⊢ y ∈ ↑(toAddSubmonoid H)\n[PROOFSTEP]\nrefine' (Submonoid.mem_closure.mp hy) H.toSubmonoid fun z hz => _\n[GOAL]\ncase h.intro.intro\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\nx : R\nhx : x ∈ closure ↑(AddSubmonoid.closure s)\nH : Subsemiring R\nJ : H ∈ {S | s ⊆ ↑S}\ny : R\nhy : y ∈ ↑(Submonoid.closure ↑(AddSubmonoid.closure s))\nz : R\nhz : z ∈ ↑(AddSubmonoid.closure s)\n⊢ z ∈ ↑H.toSubmonoid\n[PROOFSTEP]\nexact (AddSubmonoid.mem_closure.mp hz) H.toAddSubmonoid fun w hw => J hw\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\np : (x : R) → x ∈ closure s → Prop\nHs : ∀ (x : R) (h : x ∈ s), p x (_ : x ∈ ↑(closure s))\nH0 : p 0 (_ : 0 ∈ closure s)\nH1 : p 1 (_ : 1 ∈ closure s)\nHadd : ∀ (x : R) (hx : x ∈ closure s) (y : R) (hy : y ∈ closure s), p x hx → p y hy → p (x + y) (_ : x + y ∈ closure s)\nHmul : ∀ (x : R) (hx : x ∈ closure s) (y : R) (hy : y ∈ closure s), p x hx → p y hy → p (x * y) (_ : x * y ∈ closure s)\na : R\nha : a ∈ closure s\n⊢ p a ha\n[PROOFSTEP]\nrefine' Exists.elim _ fun (ha : a ∈ closure s) (hc : p a ha) => hc\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\np : (x : R) → x ∈ closure s → Prop\nHs : ∀ (x : R) (h : x ∈ s), p x (_ : x ∈ ↑(closure s))\nH0 : p 0 (_ : 0 ∈ closure s)\nH1 : p 1 (_ : 1 ∈ closure s)\nHadd : ∀ (x : R) (hx : x ∈ closure s) (y : R) (hy : y ∈ closure s), p x hx → p y hy → p (x + y) (_ : x + y ∈ closure s)\nHmul : ∀ (x : R) (hx : x ∈ closure s) (y : R) (hy : y ∈ closure s), p x hx → p y hy → p (x * y) (_ : x * y ∈ closure s)\na : R\nha : a ∈ closure s\n⊢ ∃ x, p a x\n[PROOFSTEP]\nrefine' closure_induction ha (fun m hm => ⟨subset_closure hm, Hs m hm⟩) ⟨zero_mem _, H0⟩ ⟨one_mem _, H1⟩ ?_ ?_\n[GOAL]\ncase refine'_1\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\np : (x : R) → x ∈ closure s → Prop\nHs : ∀ (x : R) (h : x ∈ s), p x (_ : x ∈ ↑(closure s))\nH0 : p 0 (_ : 0 ∈ closure s)\nH1 : p 1 (_ : 1 ∈ closure s)\nHadd : ∀ (x : R) (hx : x ∈ closure s) (y : R) (hy : y ∈ closure s), p x hx → p y hy → p (x + y) (_ : x + y ∈ closure s)\nHmul : ∀ (x : R) (hx : x ∈ closure s) (y : R) (hy : y ∈ closure s), p x hx → p y hy → p (x * y) (_ : x * y ∈ closure s)\na : R\nha : a ∈ closure s\n⊢ ∀ (x y : R), (∃ x_1, p x x_1) → (∃ x, p y x) → ∃ x_1, p (x + y) x_1\n[PROOFSTEP]\nexact (fun x y hx hy => hx.elim fun hx' hx => hy.elim fun hy' hy => ⟨add_mem hx' hy', Hadd _ _ _ _ hx hy⟩)\n[GOAL]\ncase refine'_2\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Set R\np : (x : R) → x ∈ closure s → Prop\nHs : ∀ (x : R) (h : x ∈ s), p x (_ : x ∈ ↑(closure s))\nH0 : p 0 (_ : 0 ∈ closure s)\nH1 : p 1 (_ : 1 ∈ closure s)\nHadd : ∀ (x : R) (hx : x ∈ closure s) (y : R) (hy : y ∈ closure s), p x hx → p y hy → p (x + y) (_ : x + y ∈ closure s)\nHmul : ∀ (x : R) (hx : x ∈ closure s) (y : R) (hy : y ∈ closure s), p x hx → p y hy → p (x * y) (_ : x * y ∈ closure s)\na : R\nha : a ∈ closure s\n⊢ ∀ (x y : R), (∃ x_1, p x x_1) → (∃ x, p y x) → ∃ x_1, p (x * y) x_1\n[PROOFSTEP]\nexact (fun x y hx hy => hx.elim fun hx' hx => hy.elim fun hy' hy => ⟨mul_mem hx' hy', Hmul _ _ _ _ hx hy⟩)\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR : Type u_1\ninst✝ : Semiring R\ns : Set R\nx : R\n⊢ x ∈ closure s ↔ ∃ L, (∀ (t : List R), t ∈ L → ∀ (y : R), y ∈ t → y ∈ s) ∧ List.sum (List.map List.prod L) = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR : Type u_1\ninst✝ : Semiring R\ns : Set R\nx : R\n⊢ x ∈ closure s → ∃ L, (∀ (t : List R), t ∈ L → ∀ (y : R), y ∈ t → y ∈ s) ∧ List.sum (List.map List.prod L) = x\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase mp\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR : Type u_1\ninst✝ : Semiring R\ns : Set R\nx : R\nhx : x ∈ closure s\n⊢ ∃ L, (∀ (t : List R), t ∈ L → ∀ (y : R), y ∈ t → y ∈ s) ∧ List.sum (List.map List.prod L) = x\n[PROOFSTEP]\nlet p : R → Prop := fun x =>\n  ∃ (L : List (List R)), (∀ (t : List R), t ∈ L → ∀ (y : R), y ∈ t → y ∈ s) ∧ (List.map List.prod L).sum = x\n[GOAL]\ncase mp\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR : Type u_1\ninst✝ : Semiring R\ns : Set R\nx : R\nhx : x ∈ closure s\np : R → Prop := fun x => ∃ L, (∀ (t : List R), t ∈ L → ∀ (y : R), y ∈ t → y ∈ s) ∧ List.sum (List.map List.prod L) = x\n⊢ ∃ L, (∀ (t : List R), t ∈ L → ∀ (y : R), y ∈ t → y ∈ s) ∧ List.sum (List.map List.prod L) = x\n[PROOFSTEP]\nexact\n  AddSubmonoid.closure_induction (p := p) (mem_closure_iff.1 hx)\n    (fun x hx =>\n      suffices ∃ t : List R, (∀ y ∈ t, y ∈ s) ∧ t.prod = x from\n        let ⟨t, ht1, ht2⟩ := this\n        ⟨[t], List.forall_mem_singleton.2 ht1, by rw [List.map_singleton, List.sum_singleton, ht2]⟩\n      Submonoid.closure_induction hx (fun x hx => ⟨[x], List.forall_mem_singleton.2 hx, one_mul x⟩)\n        ⟨[], List.forall_mem_nil _, rfl⟩ fun x y ⟨t, ht1, ht2⟩ ⟨u, hu1, hu2⟩ =>\n        ⟨t ++ u, List.forall_mem_append.2 ⟨ht1, hu1⟩, by rw [List.prod_append, ht2, hu2]⟩)\n    ⟨[], List.forall_mem_nil _, rfl⟩ fun x y ⟨L, HL1, HL2⟩ ⟨M, HM1, HM2⟩ =>\n    ⟨L ++ M, List.forall_mem_append.2 ⟨HL1, HM1⟩, by rw [List.map_append, List.sum_append, HL2, HM2]⟩\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR : Type u_1\ninst✝ : Semiring R\ns : Set R\nx✝³ : R\nhx✝ : x✝³ ∈ closure s\np : R → Prop := fun x => ∃ L, (∀ (t : List R), t ∈ L → ∀ (y : R), y ∈ t → y ∈ s) ∧ List.sum (List.map List.prod L) = x\nx✝² : R\nhx : x✝² ∈ ↑(Submonoid.closure s)\nx y : R\nx✝¹ : ∃ t, (∀ (y : R), y ∈ t → y ∈ s) ∧ List.prod t = x\nx✝ : ∃ t, (∀ (y : R), y ∈ t → y ∈ s) ∧ List.prod t = y\nt : List R\nht1 : ∀ (y : R), y ∈ t → y ∈ s\nht2 : List.prod t = x\nu : List R\nhu1 : ∀ (y : R), y ∈ u → y ∈ s\nhu2 : List.prod u = y\n⊢ List.prod (t ++ u) = x * y\n[PROOFSTEP]\nrw [List.prod_append, ht2, hu2]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR : Type u_1\ninst✝ : Semiring R\ns : Set R\nx✝ : R\nhx✝ : x✝ ∈ closure s\np : R → Prop := fun x => ∃ L, (∀ (t : List R), t ∈ L → ∀ (y : R), y ∈ t → y ∈ s) ∧ List.sum (List.map List.prod L) = x\nx : R\nhx : x ∈ ↑(Submonoid.closure s)\nthis : ∃ t, (∀ (y : R), y ∈ t → y ∈ s) ∧ List.prod t = x\nt : List R\nht1 : ∀ (y : R), y ∈ t → y ∈ s\nht2 : List.prod t = x\n⊢ List.sum (List.map List.prod [t]) = x\n[PROOFSTEP]\nrw [List.map_singleton, List.sum_singleton, ht2]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R✝\nM✝ : Submonoid R✝\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR : Type u_1\ninst✝ : Semiring R\ns : Set R\nx✝² : R\nhx : x✝² ∈ closure s\np : R → Prop := fun x => ∃ L, (∀ (t : List R), t ∈ L → ∀ (y : R), y ∈ t → y ∈ s) ∧ List.sum (List.map List.prod L) = x\nx y : R\nx✝¹ : p x\nx✝ : p y\nL : List (List R)\nHL1 : ∀ (t : List R), t ∈ L → ∀ (y : R), y ∈ t → y ∈ s\nHL2 : List.sum (List.map List.prod L) = x\nM : List (List R)\nHM1 : ∀ (t : List R), t ∈ M → ∀ (y : R), y ∈ t → y ∈ s\nHM2 : List.sum (List.map List.prod M) = y\n⊢ List.sum (List.map List.prod (L ++ M)) = x + y\n[PROOFSTEP]\nrw [List.map_append, List.sum_append, HL2, HM2]\n[GOAL]\ncase mpr\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR : Type u_1\ninst✝ : Semiring R\ns : Set R\nx : R\n⊢ (∃ L, (∀ (t : List R), t ∈ L → ∀ (y : R), y ∈ t → y ∈ s) ∧ List.sum (List.map List.prod L) = x) → x ∈ closure s\n[PROOFSTEP]\nrintro ⟨L, HL1, HL2⟩\n[GOAL]\ncase mpr.intro.intro\nR✝ : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R✝\nM : Submonoid R✝\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR : Type u_1\ninst✝ : Semiring R\ns : Set R\nx : R\nL : List (List R)\nHL1 : ∀ (t : List R), t ∈ L → ∀ (y : R), y ∈ t → y ∈ s\nHL2 : List.sum (List.map List.prod L) = x\n⊢ x ∈ closure s\n[PROOFSTEP]\nexact\n  HL2 ▸\n    list_sum_mem fun r hr =>\n      let ⟨t, ht1, ht2⟩ := List.mem_map.1 hr\n      ht2 ▸ list_prod_mem _ fun y hy => subset_closure <| HL1 t ht1 y hy\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Subsemiring R\nx : R × S\n⊢ x ∈ prod s ⊤ ↔ x ∈ comap (RingHom.fst R S) s\n[PROOFSTEP]\nsimp [mem_prod, MonoidHom.coe_fst]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns : Subsemiring S\nx : R × S\n⊢ x ∈ prod ⊤ s ↔ x ∈ comap (RingHom.snd R S) s\n[PROOFSTEP]\nsimp [mem_prod, MonoidHom.coe_snd]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S✝\ninst✝ : NonAssocSemiring T\nι : Sort u_1\nhι : Nonempty ι\nS : ι → Subsemiring R\nhS : Directed (fun x x_1 => x ≤ x_1) S\nx : R\n⊢ x ∈ ⨆ (i : ι), S i ↔ ∃ i, x ∈ S i\n[PROOFSTEP]\nrefine' ⟨_, fun ⟨i, hi⟩ => (SetLike.le_def.1 <| le_iSup S i) hi⟩\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S✝\ninst✝ : NonAssocSemiring T\nι : Sort u_1\nhι : Nonempty ι\nS : ι → Subsemiring R\nhS : Directed (fun x x_1 => x ≤ x_1) S\nx : R\n⊢ x ∈ ⨆ (i : ι), S i → ∃ i, x ∈ S i\n[PROOFSTEP]\nlet U : Subsemiring R :=\n  Subsemiring.mk' (⋃ i, (S i : Set R)) (⨆ i, (S i).toSubmonoid)\n    (Submonoid.coe_iSup_of_directed <| hS.mono_comp _ fun _ _ => id) (⨆ i, (S i).toAddSubmonoid)\n    (AddSubmonoid.coe_iSup_of_directed <| hS.mono_comp _ fun _ _ => id)\n      -- Porting note: gave the hypothesis an explicit name because `@this` doesn't work\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S✝\ninst✝ : NonAssocSemiring T\nι : Sort u_1\nhι : Nonempty ι\nS : ι → Subsemiring R\nhS : Directed (fun x x_1 => x ≤ x_1) S\nx : R\nU : Subsemiring R :=\n  Subsemiring.mk' (⋃ (i : ι), ↑(S i)) (⨆ (i : ι), (S i).toSubmonoid)\n    (_ : ↑(⨆ (i : ι), (S i).toSubmonoid) = ⋃ (i : ι), ↑(S i).toSubmonoid) (⨆ (i : ι), toAddSubmonoid (S i))\n    (_ : ↑(⨆ (i : ι), toAddSubmonoid (S i)) = ⋃ (i : ι), ↑(toAddSubmonoid (S i)))\n⊢ x ∈ ⨆ (i : ι), S i → ∃ i, x ∈ S i\n[PROOFSTEP]\nsuffices h : ⨆ i, S i ≤ U by simpa using @h x\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S✝\ninst✝ : NonAssocSemiring T\nι : Sort u_1\nhι : Nonempty ι\nS : ι → Subsemiring R\nhS : Directed (fun x x_1 => x ≤ x_1) S\nx : R\nU : Subsemiring R :=\n  Subsemiring.mk' (⋃ (i : ι), ↑(S i)) (⨆ (i : ι), (S i).toSubmonoid)\n    (_ : ↑(⨆ (i : ι), (S i).toSubmonoid) = ⋃ (i : ι), ↑(S i).toSubmonoid) (⨆ (i : ι), toAddSubmonoid (S i))\n    (_ : ↑(⨆ (i : ι), toAddSubmonoid (S i)) = ⋃ (i : ι), ↑(toAddSubmonoid (S i)))\nh : ⨆ (i : ι), S i ≤ U\n⊢ x ∈ ⨆ (i : ι), S i → ∃ i, x ∈ S i\n[PROOFSTEP]\nsimpa using @h x\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S✝\ninst✝ : NonAssocSemiring T\nι : Sort u_1\nhι : Nonempty ι\nS : ι → Subsemiring R\nhS : Directed (fun x x_1 => x ≤ x_1) S\nx : R\nU : Subsemiring R :=\n  Subsemiring.mk' (⋃ (i : ι), ↑(S i)) (⨆ (i : ι), (S i).toSubmonoid)\n    (_ : ↑(⨆ (i : ι), (S i).toSubmonoid) = ⋃ (i : ι), ↑(S i).toSubmonoid) (⨆ (i : ι), toAddSubmonoid (S i))\n    (_ : ↑(⨆ (i : ι), toAddSubmonoid (S i)) = ⋃ (i : ι), ↑(toAddSubmonoid (S i)))\n⊢ ⨆ (i : ι), S i ≤ U\n[PROOFSTEP]\nexact iSup_le fun i x hx => Set.mem_iUnion.2 ⟨i, hx⟩\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S✝\ninst✝ : NonAssocSemiring T\nι : Sort u_1\nhι : Nonempty ι\nS : ι → Subsemiring R\nhS : Directed (fun x x_1 => x ≤ x_1) S\nx : R\n⊢ x ∈ ↑(⨆ (i : ι), S i) ↔ x ∈ ⋃ (i : ι), ↑(S i)\n[PROOFSTEP]\nsimp [mem_iSup_of_directed hS]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S✝\ninst✝ : NonAssocSemiring T\nS : Set (Subsemiring R)\nSne : Set.Nonempty S\nhS : DirectedOn (fun x x_1 => x ≤ x_1) S\nx : R\n⊢ x ∈ sSup S ↔ ∃ s, s ∈ S ∧ x ∈ s\n[PROOFSTEP]\nhaveI : Nonempty S := Sne.to_subtype\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S✝\ninst✝ : NonAssocSemiring T\nS : Set (Subsemiring R)\nSne : Set.Nonempty S\nhS : DirectedOn (fun x x_1 => x ≤ x_1) S\nx : R\nthis : Nonempty ↑S\n⊢ x ∈ sSup S ↔ ∃ s, s ∈ S ∧ x ∈ s\n[PROOFSTEP]\nsimp only [sSup_eq_iSup', mem_iSup_of_directed hS.directed_val, SetCoe.exists, Subtype.coe_mk, exists_prop]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S✝\ninst✝ : NonAssocSemiring T\nS : Set (Subsemiring R)\nSne : Set.Nonempty S\nhS : DirectedOn (fun x x_1 => x ≤ x_1) S\nx : R\n⊢ x ∈ ↑(sSup S) ↔ x ∈ ⋃ (s : Subsemiring R) (_ : s ∈ S), ↑s\n[PROOFSTEP]\nsimp [mem_sSup_of_directedOn Sne hS]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝⁷ : NonAssocSemiring R\nM : Submonoid R\ninst✝⁶ : NonAssocSemiring S\ninst✝⁵ inst✝⁴ : NonAssocSemiring T\ns : Subsemiring R\nσR : Type u_1\nσS : Type u_2\ninst✝³ : SetLike σR R\ninst✝² : SetLike σS S\ninst✝¹ : SubsemiringClass σR R\ninst✝ : SubsemiringClass σS S\nf : R →+* S\n⊢ ↑(rangeS f) = ↑⊤ ↔ Set.range ↑f = Set.univ\n[PROOFSTEP]\nrw [coe_rangeS, coe_top]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝² : NonAssocSemiring R\nM : Submonoid R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\ns t : Subsemiring R\ng : S → R\nf : R →+* S\nh : Function.LeftInverse g ↑f\nsrc✝ : R →+* { x // x ∈ RingHom.rangeS f } := RingHom.rangeSRestrict f\nx : { x // x ∈ RingHom.rangeS f }\nx' : R\nhx' : ↑f x' = ↑x\n⊢ ↑f (g ↑x) = ↑x\n[PROOFSTEP]\nrw [← hx', h x']\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R\nM : Submonoid R\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR' : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Semiring R'\ns : Set R'\nhcomm : ∀ (a : R'), a ∈ s → ∀ (b : R'), b ∈ s → a * b = b * a\nsrc✝ : Semiring { x // x ∈ closure s } := toSemiring (closure s)\nx y : { x // x ∈ closure s }\n⊢ x * y = y * x\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R\nM : Submonoid R\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR' : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Semiring R'\ns : Set R'\nhcomm : ∀ (a : R'), a ∈ s → ∀ (b : R'), b ∈ s → a * b = b * a\nsrc✝ : Semiring { x // x ∈ closure s } := toSemiring (closure s)\nx y : { x // x ∈ closure s }\n⊢ ↑(x * y) = ↑(y * x)\n[PROOFSTEP]\nsimp only [Subsemiring.coe_mul]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R\nM : Submonoid R\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR' : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Semiring R'\ns : Set R'\nhcomm : ∀ (a : R'), a ∈ s → ∀ (b : R'), b ∈ s → a * b = b * a\nsrc✝ : Semiring { x // x ∈ closure s } := toSemiring (closure s)\nx y : { x // x ∈ closure s }\n⊢ ↑x * ↑y = ↑y * ↑x\n[PROOFSTEP]\nrefine'\n  closure_induction₂ x.prop y.prop hcomm (fun x => by simp only [zero_mul, mul_zero])\n    (fun x => by simp only [zero_mul, mul_zero]) (fun x => by simp only [one_mul, mul_one])\n    (fun x => by simp only [one_mul, mul_one]) (fun x y z h₁ h₂ => by simp only [add_mul, mul_add, h₁, h₂])\n    (fun x y z h₁ h₂ => by simp only [add_mul, mul_add, h₁, h₂])\n    (fun x y z h₁ h₂ => by rw [mul_assoc, h₂, ← mul_assoc, h₁, mul_assoc]) fun x y z h₁ h₂ => by\n    rw [← mul_assoc, h₁, mul_assoc, h₂, ← mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R\nM : Submonoid R\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR' : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Semiring R'\ns : Set R'\nhcomm : ∀ (a : R'), a ∈ s → ∀ (b : R'), b ∈ s → a * b = b * a\nsrc✝ : Semiring { x // x ∈ closure s } := toSemiring (closure s)\nx✝ y : { x // x ∈ closure s }\nx : R'\n⊢ 0 * x = x * 0\n[PROOFSTEP]\nsimp only [zero_mul, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R\nM : Submonoid R\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR' : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Semiring R'\ns : Set R'\nhcomm : ∀ (a : R'), a ∈ s → ∀ (b : R'), b ∈ s → a * b = b * a\nsrc✝ : Semiring { x // x ∈ closure s } := toSemiring (closure s)\nx✝ y : { x // x ∈ closure s }\nx : R'\n⊢ x * 0 = 0 * x\n[PROOFSTEP]\nsimp only [zero_mul, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R\nM : Submonoid R\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR' : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Semiring R'\ns : Set R'\nhcomm : ∀ (a : R'), a ∈ s → ∀ (b : R'), b ∈ s → a * b = b * a\nsrc✝ : Semiring { x // x ∈ closure s } := toSemiring (closure s)\nx✝ y : { x // x ∈ closure s }\nx : R'\n⊢ 1 * x = x * 1\n[PROOFSTEP]\nsimp only [one_mul, mul_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R\nM : Submonoid R\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR' : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Semiring R'\ns : Set R'\nhcomm : ∀ (a : R'), a ∈ s → ∀ (b : R'), b ∈ s → a * b = b * a\nsrc✝ : Semiring { x // x ∈ closure s } := toSemiring (closure s)\nx✝ y : { x // x ∈ closure s }\nx : R'\n⊢ x * 1 = 1 * x\n[PROOFSTEP]\nsimp only [one_mul, mul_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R\nM : Submonoid R\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR' : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Semiring R'\ns : Set R'\nhcomm : ∀ (a : R'), a ∈ s → ∀ (b : R'), b ∈ s → a * b = b * a\nsrc✝ : Semiring { x // x ∈ closure s } := toSemiring (closure s)\nx✝ y✝ : { x // x ∈ closure s }\nx y z : R'\nh₁ : x * z = z * x\nh₂ : y * z = z * y\n⊢ (x + y) * z = z * (x + y)\n[PROOFSTEP]\nsimp only [add_mul, mul_add, h₁, h₂]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R\nM : Submonoid R\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR' : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Semiring R'\ns : Set R'\nhcomm : ∀ (a : R'), a ∈ s → ∀ (b : R'), b ∈ s → a * b = b * a\nsrc✝ : Semiring { x // x ∈ closure s } := toSemiring (closure s)\nx✝ y✝ : { x // x ∈ closure s }\nx y z : R'\nh₁ : x * y = y * x\nh₂ : x * z = z * x\n⊢ x * (y + z) = (y + z) * x\n[PROOFSTEP]\nsimp only [add_mul, mul_add, h₁, h₂]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R\nM : Submonoid R\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR' : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Semiring R'\ns : Set R'\nhcomm : ∀ (a : R'), a ∈ s → ∀ (b : R'), b ∈ s → a * b = b * a\nsrc✝ : Semiring { x // x ∈ closure s } := toSemiring (closure s)\nx✝ y✝ : { x // x ∈ closure s }\nx y z : R'\nh₁ : x * z = z * x\nh₂ : y * z = z * y\n⊢ x * y * z = z * (x * y)\n[PROOFSTEP]\nrw [mul_assoc, h₂, ← mul_assoc, h₁, mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\ninst✝³ : NonAssocSemiring R\nM : Submonoid R\ninst✝² : NonAssocSemiring S\ninst✝¹ : NonAssocSemiring T\nR' : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : Semiring R'\ns : Set R'\nhcomm : ∀ (a : R'), a ∈ s → ∀ (b : R'), b ∈ s → a * b = b * a\nsrc✝ : Semiring { x // x ∈ closure s } := toSemiring (closure s)\nx✝ y✝ : { x // x ∈ closure s }\nx y z : R'\nh₁ : x * y = y * x\nh₂ : x * z = z * x\n⊢ x * (y * z) = y * z * x\n[PROOFSTEP]\nrw [← mul_assoc, h₁, mul_assoc, h₂, ← mul_assoc]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Subsemiring.Basic", "llama_tokens": 17478, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6224593452091672, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.3547101082649641}}
{"text": "[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝³ : Field F\ninst✝² : Field K\ninst✝¹ : Algebra F K\nh : Normal F K\ninst✝ : FiniteDimensional F K\n⊢ ∃ p, IsSplittingField F K p\n[PROOFSTEP]\nlet s := Basis.ofVectorSpace F K\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝³ : Field F\ninst✝² : Field K\ninst✝¹ : Algebra F K\nh : Normal F K\ninst✝ : FiniteDimensional F K\ns : Basis (↑(Basis.ofVectorSpaceIndex F K)) F K := Basis.ofVectorSpace F K\n⊢ ∃ p, IsSplittingField F K p\n[PROOFSTEP]\nrefine' ⟨∏ x, minpoly F (s x), splits_prod _ fun x _ => h.splits (s x), Subalgebra.toSubmodule.injective _⟩\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝³ : Field F\ninst✝² : Field K\ninst✝¹ : Algebra F K\nh : Normal F K\ninst✝ : FiniteDimensional F K\ns : Basis (↑(Basis.ofVectorSpaceIndex F K)) F K := Basis.ofVectorSpace F K\n⊢ ↑Subalgebra.toSubmodule (Algebra.adjoin F (rootSet (∏ x : ↑(Basis.ofVectorSpaceIndex F K), minpoly F (↑s x)) K)) =\n    ↑Subalgebra.toSubmodule ⊤\n[PROOFSTEP]\nrw [Algebra.top_toSubmodule, eq_top_iff, ← s.span_eq, Submodule.span_le, Set.range_subset_iff]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝³ : Field F\ninst✝² : Field K\ninst✝¹ : Algebra F K\nh : Normal F K\ninst✝ : FiniteDimensional F K\ns : Basis (↑(Basis.ofVectorSpaceIndex F K)) F K := Basis.ofVectorSpace F K\n⊢ ∀ (y : ↑(Basis.ofVectorSpaceIndex F K)),\n    ↑s y ∈\n      ↑(↑Subalgebra.toSubmodule\n          (Algebra.adjoin F (rootSet (∏ x : ↑(Basis.ofVectorSpaceIndex F K), minpoly F (↑s x)) K)))\n[PROOFSTEP]\nrefine' fun x =>\n  Algebra.subset_adjoin\n    (Multiset.mem_toFinset.mpr <|\n      (mem_roots <| mt (Polynomial.map_eq_zero <| algebraMap F K).1 <| Finset.prod_ne_zero_iff.2 fun x _ => _).2 _)\n[GOAL]\ncase refine'_1\nF : Type u_1\nK : Type u_2\ninst✝³ : Field F\ninst✝² : Field K\ninst✝¹ : Algebra F K\nh : Normal F K\ninst✝ : FiniteDimensional F K\ns : Basis (↑(Basis.ofVectorSpaceIndex F K)) F K := Basis.ofVectorSpace F K\nx✝¹ x : ↑(Basis.ofVectorSpaceIndex F K)\nx✝ : x ∈ Finset.univ\n⊢ minpoly F (↑s x) ≠ 0\n[PROOFSTEP]\nexact minpoly.ne_zero (h.isIntegral (s x))\n[GOAL]\ncase refine'_2\nF : Type u_1\nK : Type u_2\ninst✝³ : Field F\ninst✝² : Field K\ninst✝¹ : Algebra F K\nh : Normal F K\ninst✝ : FiniteDimensional F K\ns : Basis (↑(Basis.ofVectorSpaceIndex F K)) F K := Basis.ofVectorSpace F K\nx : ↑(Basis.ofVectorSpaceIndex F K)\n⊢ IsRoot (map (algebraMap F K) (∏ x : ↑(Basis.ofVectorSpaceIndex F K), minpoly F (↑s x))) (↑s x)\n[PROOFSTEP]\nrw [IsRoot.def, eval_map, ← aeval_def, AlgHom.map_prod]\n[GOAL]\ncase refine'_2\nF : Type u_1\nK : Type u_2\ninst✝³ : Field F\ninst✝² : Field K\ninst✝¹ : Algebra F K\nh : Normal F K\ninst✝ : FiniteDimensional F K\ns : Basis (↑(Basis.ofVectorSpaceIndex F K)) F K := Basis.ofVectorSpace F K\nx : ↑(Basis.ofVectorSpaceIndex F K)\n⊢ ∏ x_1 : ↑(Basis.ofVectorSpaceIndex F K), ↑(aeval (↑s x)) (minpoly F (↑s x_1)) = 0\n[PROOFSTEP]\nexact Finset.prod_eq_zero (Finset.mem_univ _) (minpoly.aeval _ _)\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\nE : Type u_3\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : Normal F E\nx : E\n⊢ IsIntegral K x ∧ Splits (algebraMap K E) (minpoly K x)\n[PROOFSTEP]\ncases' h.out x with hx hhx\n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\nE : Type u_3\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : Normal F E\nx : E\nhx : IsIntegral F x\nhhx : Splits (algebraMap F E) (minpoly F x)\n⊢ IsIntegral K x ∧ Splits (algebraMap K E) (minpoly K x)\n[PROOFSTEP]\nrw [algebraMap_eq F K E] at hhx \n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\nE : Type u_3\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : Normal F E\nx : E\nhx : IsIntegral F x\nhhx : Splits (RingHom.comp (algebraMap K E) (algebraMap F K)) (minpoly F x)\n⊢ IsIntegral K x ∧ Splits (algebraMap K E) (minpoly K x)\n[PROOFSTEP]\nexact\n  ⟨isIntegral_of_isScalarTower hx,\n    Polynomial.splits_of_splits_of_dvd (algebraMap K E) (Polynomial.map_ne_zero (minpoly.ne_zero hx))\n      ((Polynomial.splits_map_iff (algebraMap F K) (algebraMap K E)).mpr hhx) (minpoly.dvd_map_of_isScalarTower F K x)⟩\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\nE : Type u_3\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : Normal F E\nϕ : E →ₐ[F] K\nx : K\n⊢ ∃ a, ↑ϕ a = x\n[PROOFSTEP]\nletI : Algebra E K := ϕ.toRingHom.toAlgebra\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\nE : Type u_3\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : Normal F E\nϕ : E →ₐ[F] K\nx : K\nthis : Algebra E K := RingHom.toAlgebra ↑ϕ\n⊢ ∃ a, ↑ϕ a = x\n[PROOFSTEP]\nobtain ⟨h1, h2⟩ := h.out (algebraMap K E x)\n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\nE : Type u_3\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : Normal F E\nϕ : E →ₐ[F] K\nx : K\nthis : Algebra E K := RingHom.toAlgebra ↑ϕ\nh1 : IsIntegral F (↑(algebraMap K E) x)\nh2 : Splits (algebraMap F E) (minpoly F (↑(algebraMap K E) x))\n⊢ ∃ a, ↑ϕ a = x\n[PROOFSTEP]\ncases'\n  minpoly.mem_range_of_degree_eq_one E x\n    (h2.def.resolve_left (minpoly.ne_zero h1)\n      (minpoly.irreducible (isIntegral_of_isScalarTower ((isIntegral_algebraMap_iff (algebraMap K E).injective).mp h1)))\n      (minpoly.dvd E x\n        ((algebraMap K E).injective\n          (by\n            rw [RingHom.map_zero, aeval_map_algebraMap, ← aeval_algebraMap_apply]\n            exact minpoly.aeval F (algebraMap K E x))))) with\n  y hy\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\nE : Type u_3\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : Normal F E\nϕ : E →ₐ[F] K\nx : K\nthis : Algebra E K := RingHom.toAlgebra ↑ϕ\nh1 : IsIntegral F (↑(algebraMap K E) x)\nh2 : Splits (algebraMap F E) (minpoly F (↑(algebraMap K E) x))\n⊢ ↑(algebraMap K E) (↑(aeval x) (map (algebraMap F E) (minpoly F (↑(algebraMap K E) x)))) = ↑(algebraMap K E) 0\n[PROOFSTEP]\nrw [RingHom.map_zero, aeval_map_algebraMap, ← aeval_algebraMap_apply]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\nE : Type u_3\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : Normal F E\nϕ : E →ₐ[F] K\nx : K\nthis : Algebra E K := RingHom.toAlgebra ↑ϕ\nh1 : IsIntegral F (↑(algebraMap K E) x)\nh2 : Splits (algebraMap F E) (minpoly F (↑(algebraMap K E) x))\n⊢ ↑(aeval (↑(algebraMap K E) x)) (minpoly F (↑(algebraMap K E) x)) = 0\n[PROOFSTEP]\nexact minpoly.aeval F (algebraMap K E x)\n[GOAL]\ncase intro.intro\nF : Type u_1\nK : Type u_2\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Algebra F K\nE : Type u_3\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : Normal F E\nϕ : E →ₐ[F] K\nx : K\nthis : Algebra E K := RingHom.toAlgebra ↑ϕ\nh1 : IsIntegral F (↑(algebraMap K E) x)\nh2 : Splits (algebraMap F E) (minpoly F (↑(algebraMap K E) x))\ny : E\nhy : ↑(algebraMap E K) y = x\n⊢ ∃ a, ↑ϕ a = x\n[PROOFSTEP]\nexact ⟨y, hy⟩\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nh : Normal F E\nf : E ≃ₐ[F] E'\nx : E'\n⊢ IsIntegral F x ∧ Splits (algebraMap F E') (minpoly F x)\n[PROOFSTEP]\ncases' h.out (f.symm x) with hx hhx\n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nh : Normal F E\nf : E ≃ₐ[F] E'\nx : E'\nhx : IsIntegral F (↑(AlgEquiv.symm f) x)\nhhx : Splits (algebraMap F E) (minpoly F (↑(AlgEquiv.symm f) x))\n⊢ IsIntegral F x ∧ Splits (algebraMap F E') (minpoly F x)\n[PROOFSTEP]\nhave H := map_isIntegral f.toAlgHom hx\n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nh : Normal F E\nf : E ≃ₐ[F] E'\nx : E'\nhx : IsIntegral F (↑(AlgEquiv.symm f) x)\nhhx : Splits (algebraMap F E) (minpoly F (↑(AlgEquiv.symm f) x))\nH : IsIntegral F (↑↑f (↑(AlgEquiv.symm f) x))\n⊢ IsIntegral F x ∧ Splits (algebraMap F E') (minpoly F x)\n[PROOFSTEP]\nsimp [AlgEquiv.toAlgHom_eq_coe] at H \n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nh : Normal F E\nf : E ≃ₐ[F] E'\nx : E'\nhx : IsIntegral F (↑(AlgEquiv.symm f) x)\nhhx : Splits (algebraMap F E) (minpoly F (↑(AlgEquiv.symm f) x))\nH : IsIntegral F x\n⊢ IsIntegral F x ∧ Splits (algebraMap F E') (minpoly F x)\n[PROOFSTEP]\nuse H\n[GOAL]\ncase right\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nh : Normal F E\nf : E ≃ₐ[F] E'\nx : E'\nhx : IsIntegral F (↑(AlgEquiv.symm f) x)\nhhx : Splits (algebraMap F E) (minpoly F (↑(AlgEquiv.symm f) x))\nH : IsIntegral F x\n⊢ Splits (algebraMap F E') (minpoly F x)\n[PROOFSTEP]\napply Polynomial.splits_of_splits_of_dvd (algebraMap F E') (minpoly.ne_zero hx)\n[GOAL]\ncase right.hf\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nh : Normal F E\nf : E ≃ₐ[F] E'\nx : E'\nhx : IsIntegral F (↑(AlgEquiv.symm f) x)\nhhx : Splits (algebraMap F E) (minpoly F (↑(AlgEquiv.symm f) x))\nH : IsIntegral F x\n⊢ Splits (algebraMap F E') (minpoly F (↑(AlgEquiv.symm f) x))\n[PROOFSTEP]\nrw [← AlgHom.comp_algebraMap f.toAlgHom]\n[GOAL]\ncase right.hf\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nh : Normal F E\nf : E ≃ₐ[F] E'\nx : E'\nhx : IsIntegral F (↑(AlgEquiv.symm f) x)\nhhx : Splits (algebraMap F E) (minpoly F (↑(AlgEquiv.symm f) x))\nH : IsIntegral F x\n⊢ Splits (RingHom.comp (↑↑f) (algebraMap F E)) (minpoly F (↑(AlgEquiv.symm f) x))\n[PROOFSTEP]\nexact Polynomial.splits_comp_of_splits (algebraMap F E) f.toAlgHom.toRingHom hhx\n[GOAL]\ncase right.hgf\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nh : Normal F E\nf : E ≃ₐ[F] E'\nx : E'\nhx : IsIntegral F (↑(AlgEquiv.symm f) x)\nhhx : Splits (algebraMap F E) (minpoly F (↑(AlgEquiv.symm f) x))\nH : IsIntegral F x\n⊢ minpoly F x ∣ minpoly F (↑(AlgEquiv.symm f) x)\n[PROOFSTEP]\napply minpoly.dvd _ _\n[GOAL]\ncase right.hgf\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nh : Normal F E\nf : E ≃ₐ[F] E'\nx : E'\nhx : IsIntegral F (↑(AlgEquiv.symm f) x)\nhhx : Splits (algebraMap F E) (minpoly F (↑(AlgEquiv.symm f) x))\nH : IsIntegral F x\n⊢ ↑(aeval x) (minpoly F (↑(AlgEquiv.symm f) x)) = 0\n[PROOFSTEP]\nrw [← AddEquiv.map_eq_zero_iff f.symm.toAddEquiv]\n[GOAL]\ncase right.hgf\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nh : Normal F E\nf : E ≃ₐ[F] E'\nx : E'\nhx : IsIntegral F (↑(AlgEquiv.symm f) x)\nhhx : Splits (algebraMap F E) (minpoly F (↑(AlgEquiv.symm f) x))\nH : IsIntegral F x\n⊢ ↑(AlgEquiv.toAddEquiv (AlgEquiv.symm f)) (↑(aeval x) (minpoly F (↑(AlgEquiv.symm f) x))) = 0\n[PROOFSTEP]\nexact Eq.trans (Polynomial.aeval_algHom_apply f.symm.toAlgHom x (minpoly F (f.symm x))).symm (minpoly.aeval _ _)\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\n⊢ Normal F E\n[PROOFSTEP]\nrcases eq_or_ne p 0 with (rfl | hp)\n[GOAL]\ncase inl\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nhFEp : IsSplittingField F E 0\n⊢ Normal F E\n[PROOFSTEP]\nhave := hFEp.adjoin_rootSet\n[GOAL]\ncase inl\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nhFEp : IsSplittingField F E 0\nthis : Algebra.adjoin F (rootSet 0 E) = ⊤\n⊢ Normal F E\n[PROOFSTEP]\nsimp only [rootSet_zero, Algebra.adjoin_empty] at this \n[GOAL]\ncase inl\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\nhFEp : IsSplittingField F E 0\nthis : ⊥ = ⊤\n⊢ Normal F E\n[PROOFSTEP]\nexact Normal.of_algEquiv (AlgEquiv.ofBijective (Algebra.ofId F E) (Algebra.bijective_algebraMap_iff.2 this.symm))\n[GOAL]\ncase inr\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\n⊢ Normal F E\n[PROOFSTEP]\nrefine' normal_iff.2 fun x => _\n[GOAL]\ncase inr\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\n⊢ IsIntegral F x ∧ Splits (algebraMap F E) (minpoly F x)\n[PROOFSTEP]\nhave hFE : FiniteDimensional F E := IsSplittingField.finiteDimensional E p\n[GOAL]\ncase inr\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\n⊢ IsIntegral F x ∧ Splits (algebraMap F E) (minpoly F x)\n[PROOFSTEP]\nhave Hx : IsIntegral F x := isIntegral_of_noetherian (IsNoetherian.iff_fg.2 hFE) x\n[GOAL]\ncase inr\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\n⊢ IsIntegral F x ∧ Splits (algebraMap F E) (minpoly F x)\n[PROOFSTEP]\nrefine' ⟨Hx, Or.inr _⟩\n[GOAL]\ncase inr\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\n⊢ ∀ {g : E[X]}, Irreducible g → g ∣ map (algebraMap F E) (minpoly F x) → degree g = 1\n[PROOFSTEP]\nrintro q q_irred ⟨r, hr⟩\n[GOAL]\ncase inr.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\n⊢ degree q = 1\n[PROOFSTEP]\nlet D := AdjoinRoot q\n[GOAL]\ncase inr.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\n⊢ degree q = 1\n[PROOFSTEP]\nhaveI := Fact.mk q_irred\n[GOAL]\ncase inr.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis : Fact (Irreducible q)\n⊢ degree q = 1\n[PROOFSTEP]\nlet pbED := AdjoinRoot.powerBasis q_irred.ne_zero\n[GOAL]\ncase inr.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\n⊢ degree q = 1\n[PROOFSTEP]\nhaveI : FiniteDimensional E D := PowerBasis.finiteDimensional pbED\n[GOAL]\ncase inr.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis : FiniteDimensional E D\n⊢ degree q = 1\n[PROOFSTEP]\nhave finrankED : FiniteDimensional.finrank E D = q.natDegree := by\n  rw [PowerBasis.finrank pbED, AdjoinRoot.powerBasis_dim]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis : FiniteDimensional E D\n⊢ FiniteDimensional.finrank E D = natDegree q\n[PROOFSTEP]\nrw [PowerBasis.finrank pbED, AdjoinRoot.powerBasis_dim]\n[GOAL]\ncase inr.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\n⊢ degree q = 1\n[PROOFSTEP]\nhaveI : FiniteDimensional F D := FiniteDimensional.trans F E D\n[GOAL]\ncase inr.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝¹ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis : FiniteDimensional F D\n⊢ degree q = 1\n[PROOFSTEP]\nrsuffices ⟨ϕ⟩ :\n  Nonempty\n    (D →ₐ[F] E)\n      --Porting note: the `change` was `rw [← WithBot.coe_one]`\n[GOAL]\ncase inr.intro.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝¹ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis : FiniteDimensional F D\nϕ : D →ₐ[F] E\n⊢ degree q = 1\n[PROOFSTEP]\nchange degree q = ↑(1 : ℕ)\n[GOAL]\ncase inr.intro.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝¹ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis : FiniteDimensional F D\nϕ : D →ₐ[F] E\n⊢ degree q = ↑1\n[PROOFSTEP]\nrw [degree_eq_iff_natDegree_eq q_irred.ne_zero, ← finrankED]\n[GOAL]\ncase inr.intro.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝¹ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis : FiniteDimensional F D\nϕ : D →ₐ[F] E\n⊢ FiniteDimensional.finrank E D = 1\n[PROOFSTEP]\nhave nat_lemma : ∀ a b c : ℕ, a * b = c → c ≤ a → 0 < c → b = 1 :=\n  by\n  intro a b c h1 h2 h3\n  nlinarith\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝¹ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis : FiniteDimensional F D\nϕ : D →ₐ[F] E\n⊢ ∀ (a b c : ℕ), a * b = c → c ≤ a → 0 < c → b = 1\n[PROOFSTEP]\nintro a b c h1 h2 h3\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝¹ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis : FiniteDimensional F D\nϕ : D →ₐ[F] E\na b c : ℕ\nh1 : a * b = c\nh2 : c ≤ a\nh3 : 0 < c\n⊢ b = 1\n[PROOFSTEP]\nnlinarith\n[GOAL]\ncase inr.intro.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝¹ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis : FiniteDimensional F D\nϕ : D →ₐ[F] E\nnat_lemma : ∀ (a b c : ℕ), a * b = c → c ≤ a → 0 < c → b = 1\n⊢ FiniteDimensional.finrank E D = 1\n[PROOFSTEP]\nexact\n  nat_lemma _ _ _ (FiniteDimensional.finrank_mul_finrank F E D)\n    (LinearMap.finrank_le_finrank_of_injective (show Function.Injective ϕ.toLinearMap from ϕ.toRingHom.injective))\n    FiniteDimensional.finrank_pos\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝¹ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis : FiniteDimensional F D\n⊢ Nonempty (D →ₐ[F] E)\n[PROOFSTEP]\nlet C := AdjoinRoot (minpoly F x)\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝¹ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\n⊢ Nonempty (D →ₐ[F] E)\n[PROOFSTEP]\nhaveI Hx_irred :=\n  Fact.mk\n    (minpoly.irreducible Hx)\n      -- Porting note: `heval` added since now Lean wants the proof explicitly in several places.\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝¹ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\n⊢ Nonempty (D →ₐ[F] E)\n[PROOFSTEP]\nhave heval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0 := by\n  rw [algebraMap_eq F E D, ← eval₂_map, hr, AdjoinRoot.algebraMap_eq, eval₂_mul, AdjoinRoot.eval₂_root, zero_mul]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝¹ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\n⊢ eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\n[PROOFSTEP]\nrw [algebraMap_eq F E D, ← eval₂_map, hr, AdjoinRoot.algebraMap_eq, eval₂_mul, AdjoinRoot.eval₂_root, zero_mul]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝¹ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\n⊢ Nonempty (D →ₐ[F] E)\n[PROOFSTEP]\nletI : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝² : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝¹ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\n⊢ Nonempty (D →ₐ[F] E)\n[PROOFSTEP]\nletI : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (minpoly.aeval F x))\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝³ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝² : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝¹ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\n⊢ Nonempty (D →ₐ[F] E)\n[PROOFSTEP]\nhaveI : IsScalarTower F C D := of_algebraMap_eq fun y => (AdjoinRoot.lift_of heval).symm\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁴ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝³ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝² : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝¹ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis : IsScalarTower F C D\n⊢ Nonempty (D →ₐ[F] E)\n[PROOFSTEP]\nhaveI : IsScalarTower F C E :=\n  by\n  refine' of_algebraMap_eq fun y => (AdjoinRoot.lift_of _).symm\n  rw [← aeval_def, minpoly.aeval]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁴ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝³ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝² : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝¹ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis : IsScalarTower F C D\n⊢ IsScalarTower F C E\n[PROOFSTEP]\nrefine' of_algebraMap_eq fun y => (AdjoinRoot.lift_of _).symm\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁴ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝³ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝² : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝¹ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis : IsScalarTower F C D\ny : F\n⊢ eval₂ (algebraMap F E) x (minpoly F x) = 0\n[PROOFSTEP]\nrw [← aeval_def, minpoly.aeval]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁵ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁴ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝³ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝² : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝¹ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝ : IsScalarTower F C D\nthis : IsScalarTower F C E\n⊢ Nonempty (D →ₐ[F] E)\n[PROOFSTEP]\nsuffices Nonempty (D →ₐ[C] E) by exact Nonempty.map (AlgHom.restrictScalars F) this\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁶ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁵ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝⁴ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝³ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝² : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝¹ : IsScalarTower F C D\nthis✝ : IsScalarTower F C E\nthis : Nonempty (D →ₐ[C] E)\n⊢ Nonempty (D →ₐ[F] E)\n[PROOFSTEP]\nexact Nonempty.map (AlgHom.restrictScalars F) this\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁵ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁴ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝³ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝² : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝¹ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝ : IsScalarTower F C D\nthis : IsScalarTower F C E\n⊢ Nonempty (D →ₐ[C] E)\n[PROOFSTEP]\nlet S : Set D := ((p.map (algebraMap F E)).roots.map (algebraMap E D)).toFinset\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁵ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁴ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝³ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝² : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝¹ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝ : IsScalarTower F C D\nthis : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\n⊢ Nonempty (D →ₐ[C] E)\n[PROOFSTEP]\nsuffices ⊤ ≤ IntermediateField.adjoin C S\n  by\n  refine' IntermediateField.algHom_mk_adjoin_splits' (top_le_iff.mp this) fun y hy => _\n  rcases Multiset.mem_map.mp (Multiset.mem_toFinset.mp hy) with ⟨z, hz1, hz2⟩\n  have Hz : IsIntegral F z := isIntegral_of_noetherian (IsNoetherian.iff_fg.2 hFE) z\n  use show IsIntegral C y from isIntegral_of_noetherian (IsNoetherian.iff_fg.2 (FiniteDimensional.right F C D)) y\n  apply splits_of_splits_of_dvd (algebraMap C E) (map_ne_zero (minpoly.ne_zero Hz))\n  · rw [splits_map_iff, ← algebraMap_eq F C E]\n    exact\n      splits_of_splits_of_dvd _ hp hFEp.splits\n        (minpoly.dvd F z (Eq.trans (eval₂_eq_eval_map _) ((mem_roots (map_ne_zero hp)).mp hz1)))\n  · apply minpoly.dvd\n    rw [← hz2, aeval_def, eval₂_map, ← algebraMap_eq F C D, algebraMap_eq F E D, ← hom_eval₂, ← aeval_def,\n      minpoly.aeval F z, RingHom.map_zero]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁶ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁵ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝⁴ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝³ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝² : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝¹ : IsScalarTower F C D\nthis✝ : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\nthis : ⊤ ≤ IntermediateField.adjoin C S\n⊢ Nonempty (D →ₐ[C] E)\n[PROOFSTEP]\nrefine' IntermediateField.algHom_mk_adjoin_splits' (top_le_iff.mp this) fun y hy => _\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁶ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁵ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝⁴ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝³ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝² : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝¹ : IsScalarTower F C D\nthis✝ : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\nthis : ⊤ ≤ IntermediateField.adjoin C S\ny : D\nhy : y ∈ S\n⊢ IsIntegral C y ∧ Splits (algebraMap C E) (minpoly C y)\n[PROOFSTEP]\nrcases Multiset.mem_map.mp (Multiset.mem_toFinset.mp hy) with ⟨z, hz1, hz2⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁶ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁵ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝⁴ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝³ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝² : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝¹ : IsScalarTower F C D\nthis✝ : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\nthis : ⊤ ≤ IntermediateField.adjoin C S\ny : D\nhy : y ∈ S\nz : E\nhz1 : z ∈ roots (map (algebraMap F E) p)\nhz2 : ↑(algebraMap E D) z = y\n⊢ IsIntegral C y ∧ Splits (algebraMap C E) (minpoly C y)\n[PROOFSTEP]\nhave Hz : IsIntegral F z := isIntegral_of_noetherian (IsNoetherian.iff_fg.2 hFE) z\n[GOAL]\ncase intro.intro\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁶ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁵ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝⁴ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝³ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝² : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝¹ : IsScalarTower F C D\nthis✝ : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\nthis : ⊤ ≤ IntermediateField.adjoin C S\ny : D\nhy : y ∈ S\nz : E\nhz1 : z ∈ roots (map (algebraMap F E) p)\nhz2 : ↑(algebraMap E D) z = y\nHz : IsIntegral F z\n⊢ IsIntegral C y ∧ Splits (algebraMap C E) (minpoly C y)\n[PROOFSTEP]\nuse show IsIntegral C y from isIntegral_of_noetherian (IsNoetherian.iff_fg.2 (FiniteDimensional.right F C D)) y\n[GOAL]\ncase right\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁶ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁵ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝⁴ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝³ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝² : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝¹ : IsScalarTower F C D\nthis✝ : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\nthis : ⊤ ≤ IntermediateField.adjoin C S\ny : D\nhy : y ∈ S\nz : E\nhz1 : z ∈ roots (map (algebraMap F E) p)\nhz2 : ↑(algebraMap E D) z = y\nHz : IsIntegral F z\n⊢ Splits (algebraMap C E) (minpoly C y)\n[PROOFSTEP]\napply splits_of_splits_of_dvd (algebraMap C E) (map_ne_zero (minpoly.ne_zero Hz))\n[GOAL]\ncase right.hf\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁶ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁵ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝⁴ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝³ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝² : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝¹ : IsScalarTower F C D\nthis✝ : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\nthis : ⊤ ≤ IntermediateField.adjoin C S\ny : D\nhy : y ∈ S\nz : E\nhz1 : z ∈ roots (map (algebraMap F E) p)\nhz2 : ↑(algebraMap E D) z = y\nHz : IsIntegral F z\n⊢ Splits (algebraMap C E) (map ?m.184453 (minpoly F z))\n[PROOFSTEP]\nrw [splits_map_iff, ← algebraMap_eq F C E]\n[GOAL]\ncase right.hf\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁶ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁵ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝⁴ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝³ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝² : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝¹ : IsScalarTower F C D\nthis✝ : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\nthis : ⊤ ≤ IntermediateField.adjoin C S\ny : D\nhy : y ∈ S\nz : E\nhz1 : z ∈ roots (map (algebraMap F E) p)\nhz2 : ↑(algebraMap E D) z = y\nHz : IsIntegral F z\n⊢ Splits (algebraMap F E) (minpoly F z)\n[PROOFSTEP]\nexact\n  splits_of_splits_of_dvd _ hp hFEp.splits\n    (minpoly.dvd F z (Eq.trans (eval₂_eq_eval_map _) ((mem_roots (map_ne_zero hp)).mp hz1)))\n[GOAL]\ncase right.hgf\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁶ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁵ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝⁴ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝³ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝² : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝¹ : IsScalarTower F C D\nthis✝ : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\nthis : ⊤ ≤ IntermediateField.adjoin C S\ny : D\nhy : y ∈ S\nz : E\nhz1 : z ∈ roots (map (algebraMap F E) p)\nhz2 : ↑(algebraMap E D) z = y\nHz : IsIntegral F z\n⊢ minpoly C y ∣ map (algebraMap F C) (minpoly F z)\n[PROOFSTEP]\napply minpoly.dvd\n[GOAL]\ncase right.hgf.hp\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁶ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁵ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝⁴ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝³ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝² : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝¹ : IsScalarTower F C D\nthis✝ : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\nthis : ⊤ ≤ IntermediateField.adjoin C S\ny : D\nhy : y ∈ S\nz : E\nhz1 : z ∈ roots (map (algebraMap F E) p)\nhz2 : ↑(algebraMap E D) z = y\nHz : IsIntegral F z\n⊢ ↑(aeval y) (map (algebraMap F C) (minpoly F z)) = 0\n[PROOFSTEP]\nrw [← hz2, aeval_def, eval₂_map, ← algebraMap_eq F C D, algebraMap_eq F E D, ← hom_eval₂, ← aeval_def,\n  minpoly.aeval F z, RingHom.map_zero]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁵ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁴ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝³ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝² : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝¹ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝ : IsScalarTower F C D\nthis : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\n⊢ ⊤ ≤ IntermediateField.adjoin C S\n[PROOFSTEP]\nrw [← IntermediateField.toSubalgebra_le_toSubalgebra, IntermediateField.top_toSubalgebra]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁵ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁴ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝³ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝² : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝¹ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝ : IsScalarTower F C D\nthis : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\n⊢ ⊤ ≤ (IntermediateField.adjoin C S).toSubalgebra\n[PROOFSTEP]\napply ge_trans (IntermediateField.algebra_adjoin_le_adjoin C S)\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁵ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁴ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝³ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝² : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝¹ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝ : IsScalarTower F C D\nthis : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\n⊢ Algebra.adjoin C S ≥ ⊤\n[PROOFSTEP]\nsuffices (Algebra.adjoin C S).restrictScalars F = (Algebra.adjoin E {AdjoinRoot.root q}).restrictScalars F\n  by\n  rw [AdjoinRoot.adjoinRoot_eq_top, Subalgebra.restrictScalars_top, ← @Subalgebra.restrictScalars_top F C] at this \n  exact\n    top_le_iff.mpr\n      (Subalgebra.restrictScalars_injective F this)\n        /- Porting note: the `change` was `dsimp only [S]`. This is the step that requires increasing\n        `maxHeartbeats`. Using `set S ... with hS` doesn't work. -/\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁶ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁵ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝⁴ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝³ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝² : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝¹ : IsScalarTower F C D\nthis✝ : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\nthis :\n  Subalgebra.restrictScalars F (Algebra.adjoin C S) =\n    Subalgebra.restrictScalars F (Algebra.adjoin E {AdjoinRoot.root q})\n⊢ Algebra.adjoin C S ≥ ⊤\n[PROOFSTEP]\nrw [AdjoinRoot.adjoinRoot_eq_top, Subalgebra.restrictScalars_top, ← @Subalgebra.restrictScalars_top F C] at this \n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁶ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁵ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝⁴ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝³ : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝² : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝¹ : IsScalarTower F C D\nthis✝ : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\nthis : Subalgebra.restrictScalars F (Algebra.adjoin C S) = Subalgebra.restrictScalars F ⊤\n⊢ Algebra.adjoin C S ≥ ⊤\n[PROOFSTEP]\nexact\n  top_le_iff.mpr\n    (Subalgebra.restrictScalars_injective F this)\n      /- Porting note: the `change` was `dsimp only [S]`. This is the step that requires increasing\n      `maxHeartbeats`. Using `set S ... with hS` doesn't work. -/\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁵ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁴ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝³ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝² : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝¹ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝ : IsScalarTower F C D\nthis : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\n⊢ Subalgebra.restrictScalars F (Algebra.adjoin C S) =\n    Subalgebra.restrictScalars F (Algebra.adjoin E {AdjoinRoot.root q})\n[PROOFSTEP]\nchange\n  Subalgebra.restrictScalars F\n      (Algebra.adjoin C (((p.map (algebraMap F E)).roots.map (algebraMap E D)).toFinset : Set D)) =\n    _\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁵ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁴ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝³ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝² : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝¹ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝ : IsScalarTower F C D\nthis : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\n⊢ Subalgebra.restrictScalars F\n      (Algebra.adjoin C ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))) =\n    Subalgebra.restrictScalars F (Algebra.adjoin E {AdjoinRoot.root q})\n[PROOFSTEP]\nrw [← Finset.image_toFinset, Finset.coe_image]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁵ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁴ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝³ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝² : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝¹ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝ : IsScalarTower F C D\nthis : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\n⊢ Subalgebra.restrictScalars F\n      (Algebra.adjoin C (↑(algebraMap E D) '' ↑(Multiset.toFinset (roots (map (algebraMap F E) p))))) =\n    Subalgebra.restrictScalars F (Algebra.adjoin E {AdjoinRoot.root q})\n[PROOFSTEP]\napply Eq.trans (Algebra.adjoin_res_eq_adjoin_res F E C D hFEp.adjoin_rootSet AdjoinRoot.adjoinRoot_eq_top)\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹¹ : Field F\ninst✝¹⁰ : Field K\ninst✝⁹ : Algebra F K\nE : Type u_3\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra K E\ninst✝⁵ : IsScalarTower F K E\nE' : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Field E\ninst✝² : Algebra F E\ninst✝¹ : Field E'\ninst✝ : Algebra F E'\np : F[X]\nhFEp : IsSplittingField F E p\nhp : p ≠ 0\nx : E\nhFE : FiniteDimensional F E\nHx : IsIntegral F x\nq : E[X]\nq_irred : Irreducible q\nr : E[X]\nhr : map (algebraMap F E) (minpoly F x) = q * r\nD : Type u_3 := AdjoinRoot q\nthis✝⁵ : Fact (Irreducible q)\npbED : PowerBasis E (AdjoinRoot q) := AdjoinRoot.powerBasis (_ : q ≠ 0)\nthis✝⁴ : FiniteDimensional E D\nfinrankED : FiniteDimensional.finrank E D = natDegree q\nthis✝³ : FiniteDimensional F D\nC : Type u_1 := AdjoinRoot (minpoly F x)\nHx_irred : Fact (Irreducible (minpoly F x))\nheval : eval₂ (algebraMap F D) (AdjoinRoot.root q) (minpoly F x) = 0\nthis✝² : Algebra C D := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F D) (AdjoinRoot.root q) heval)\nthis✝¹ : Algebra C E := RingHom.toAlgebra (AdjoinRoot.lift (algebraMap F E) x (_ : ↑(aeval x) (minpoly F x) = 0))\nthis✝ : IsScalarTower F C D\nthis : IsScalarTower F C E\nS : Set D := ↑(Multiset.toFinset (Multiset.map (↑(algebraMap E D)) (roots (map (algebraMap F E) p))))\n⊢ Subalgebra.restrictScalars F (Algebra.adjoin E (↑(algebraMap C D) '' {AdjoinRoot.root (minpoly F x)})) =\n    Subalgebra.restrictScalars F (Algebra.adjoin E {AdjoinRoot.root q})\n[PROOFSTEP]\nrw [Set.image_singleton, RingHom.algebraMap_toAlgebra, AdjoinRoot.lift_root]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\n⊢ Normal F { x // x ∈ ⨆ (i : ι), t i }\n[PROOFSTEP]\nrefine' ⟨isAlgebraic_iSup fun i => (h i).1, fun x => _⟩\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\n⊢ Splits (algebraMap F { x // x ∈ ⨆ (i : ι), t i }) (minpoly F x)\n[PROOFSTEP]\nobtain ⟨s, hx⟩ := exists_finset_of_mem_supr'' (fun i => (h i).1) x.2\n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\n⊢ Splits (algebraMap F { x // x ∈ ⨆ (i : ι), t i }) (minpoly F x)\n[PROOFSTEP]\nlet E : IntermediateField F K := ⨆ i ∈ s, adjoin F ((minpoly F (i.2 : _)).rootSet K)\n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\n⊢ Splits (algebraMap F { x // x ∈ ⨆ (i : ι), t i }) (minpoly F x)\n[PROOFSTEP]\nhave hF : Normal F E :=\n  by\n  haveI : IsSplittingField F E (∏ i in s, minpoly F i.snd) :=\n    by\n    refine' isSplittingField_iSup _ fun i _ => adjoin_rootSet_isSplittingField _\n    · exact Finset.prod_ne_zero_iff.mpr fun i _ => minpoly.ne_zero ((h i.1).isIntegral i.2)\n    · exact Polynomial.splits_comp_of_splits _ (algebraMap (t i.1) K) ((h i.1).splits i.2)\n  apply Normal.of_isSplittingField (∏ i in s, minpoly F i.2)\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\n⊢ Normal F { x // x ∈ E }\n[PROOFSTEP]\nhaveI : IsSplittingField F E (∏ i in s, minpoly F i.snd) :=\n  by\n  refine' isSplittingField_iSup _ fun i _ => adjoin_rootSet_isSplittingField _\n  · exact Finset.prod_ne_zero_iff.mpr fun i _ => minpoly.ne_zero ((h i.1).isIntegral i.2)\n  · exact Polynomial.splits_comp_of_splits _ (algebraMap (t i.1) K) ((h i.1).splits i.2)\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\n⊢ IsSplittingField F { x // x ∈ E } (∏ i in s, minpoly F i.snd)\n[PROOFSTEP]\nrefine' isSplittingField_iSup _ fun i _ => adjoin_rootSet_isSplittingField _\n[GOAL]\ncase refine'_1\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\n⊢ ∏ i in s, minpoly F i.snd ≠ 0\n[PROOFSTEP]\nexact Finset.prod_ne_zero_iff.mpr fun i _ => minpoly.ne_zero ((h i.1).isIntegral i.2)\n[GOAL]\ncase refine'_2\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\ni : (i : ι) × { x // x ∈ t i }\nx✝ : i ∈ s\n⊢ Splits (algebraMap F K) (minpoly F i.snd)\n[PROOFSTEP]\nexact Polynomial.splits_comp_of_splits _ (algebraMap (t i.1) K) ((h i.1).splits i.2)\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nthis : IsSplittingField F { x // x ∈ E } (∏ i in s, minpoly F i.snd)\n⊢ Normal F { x // x ∈ E }\n[PROOFSTEP]\napply Normal.of_isSplittingField (∏ i in s, minpoly F i.2)\n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nhF : Normal F { x // x ∈ E }\n⊢ Splits (algebraMap F { x // x ∈ ⨆ (i : ι), t i }) (minpoly F x)\n[PROOFSTEP]\nhave hE : E ≤ ⨆ i, t i := by\n  refine' iSup_le fun i => iSup_le fun _ => le_iSup_of_le i.1 _\n  rw [adjoin_le_iff, ← image_rootSet ((h i.1).splits i.2) (t i.1).val]\n  exact fun _ ⟨a, _, h⟩ => h ▸ a.2\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nhF : Normal F { x // x ∈ E }\n⊢ E ≤ ⨆ (i : ι), t i\n[PROOFSTEP]\nrefine' iSup_le fun i => iSup_le fun _ => le_iSup_of_le i.1 _\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nhF : Normal F { x // x ∈ E }\ni : (i : ι) × { x // x ∈ t i }\nx✝ : i ∈ s\n⊢ adjoin F (rootSet (minpoly F i.snd) K) ≤ t i.fst\n[PROOFSTEP]\nrw [adjoin_le_iff, ← image_rootSet ((h i.1).splits i.2) (t i.1).val]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nhF : Normal F { x // x ∈ E }\ni : (i : ι) × { x // x ∈ t i }\nx✝ : i ∈ s\n⊢ ↑(val (t i.fst)) '' rootSet (minpoly F i.snd) { x // x ∈ t i.fst } ≤ ↑(t i.fst)\n[PROOFSTEP]\nexact fun _ ⟨a, _, h⟩ => h ▸ a.2\n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nhF : Normal F { x // x ∈ E }\nhE : E ≤ ⨆ (i : ι), t i\n⊢ Splits (algebraMap F { x // x ∈ ⨆ (i : ι), t i }) (minpoly F x)\n[PROOFSTEP]\nhave := hF.splits ⟨x, hx⟩\n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nhF : Normal F { x // x ∈ E }\nhE : E ≤ ⨆ (i : ι), t i\nthis : Splits (algebraMap F { x // x ∈ E }) (minpoly F { val := ↑x, property := hx })\n⊢ Splits (algebraMap F { x // x ∈ ⨆ (i : ι), t i }) (minpoly F x)\n[PROOFSTEP]\nrw [minpoly_eq, Subtype.coe_mk, ← minpoly_eq] at this \n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\ninst✝² : Field F\ninst✝¹ : Field K\ninst✝ : Algebra F K\nι : Type u_3\nt : ι → IntermediateField F K\nh : ∀ (i : ι), Normal F { x // x ∈ t i }\nx : { x // x ∈ ⨆ (i : ι), t i }\ns : Finset ((i : ι) × { x // x ∈ t i })\nhx : ↑x ∈ ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nE : IntermediateField F K := ⨆ (i : (i : ι) × { x // x ∈ t i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) K)\nhF : Normal F { x // x ∈ E }\nhE : E ≤ ⨆ (i : ι), t i\nthis : Splits (algebraMap F { x // x ∈ E }) (minpoly F x)\n⊢ Splits (algebraMap F { x // x ∈ ⨆ (i : ι), t i }) (minpoly F x)\n[PROOFSTEP]\nexact Polynomial.splits_comp_of_splits _ (inclusion hE).toRingHom this\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Algebra F K\nE E' : IntermediateField F K\ninst✝¹ : Normal F { x // x ∈ E }\ninst✝ : Normal F { x // x ∈ E' }\n⊢ ∀ (i : Bool), Normal F { x // x ∈ Bool.rec E' E i }\n[PROOFSTEP]\nintro i\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Algebra F K\nE E' : IntermediateField F K\ninst✝¹ : Normal F { x // x ∈ E }\ninst✝ : Normal F { x // x ∈ E' }\ni : Bool\n⊢ Normal F { x // x ∈ Bool.rec E' E i }\n[PROOFSTEP]\ncases i\n[GOAL]\ncase false\nF : Type u_1\nK : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Algebra F K\nE E' : IntermediateField F K\ninst✝¹ : Normal F { x // x ∈ E }\ninst✝ : Normal F { x // x ∈ E' }\n⊢ Normal F { x // x ∈ Bool.rec E' E false }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase true\nF : Type u_1\nK : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Algebra F K\nE E' : IntermediateField F K\ninst✝¹ : Normal F { x // x ∈ E }\ninst✝ : Normal F { x // x ∈ E' }\n⊢ Normal F { x // x ∈ Bool.rec E' E true }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁷ : Field F\ninst✝¹⁶ : Field K\ninst✝¹⁵ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁴ : Field F\ninst✝¹³ : Field K₁\ninst✝¹² : Field K₂\ninst✝¹¹ : Field K₃\ninst✝¹⁰ : Algebra F K₁\ninst✝⁹ : Algebra F K₂\ninst✝⁸ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\ninst✝⁵ : Algebra E K₁\ninst✝⁴ : Algebra E K₂\ninst✝³ : Algebra E K₃\ninst✝² : IsScalarTower F E K₁\ninst✝¹ : IsScalarTower F E K₂\ninst✝ : IsScalarTower F E K₃\nh : Normal F E\nx : { x // x ∈ AlgHom.range (toAlgHom F E K₁) }\n⊢ ↑ϕ ↑x ∈ AlgHom.range (toAlgHom F E K₂)\n[PROOFSTEP]\nsuffices (toAlgHom F E K₁).range.map ϕ ≤ _ by exact this ⟨x, Subtype.mem x, rfl⟩\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁷ : Field F\ninst✝¹⁶ : Field K\ninst✝¹⁵ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁴ : Field F\ninst✝¹³ : Field K₁\ninst✝¹² : Field K₂\ninst✝¹¹ : Field K₃\ninst✝¹⁰ : Algebra F K₁\ninst✝⁹ : Algebra F K₂\ninst✝⁸ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\ninst✝⁵ : Algebra E K₁\ninst✝⁴ : Algebra E K₂\ninst✝³ : Algebra E K₃\ninst✝² : IsScalarTower F E K₁\ninst✝¹ : IsScalarTower F E K₂\ninst✝ : IsScalarTower F E K₃\nh : Normal F E\nx : { x // x ∈ AlgHom.range (toAlgHom F E K₁) }\nthis : Subalgebra.map ϕ (AlgHom.range (toAlgHom F E K₁)) ≤ ?m.259090\n⊢ ↑ϕ ↑x ∈ AlgHom.range (toAlgHom F E K₂)\n[PROOFSTEP]\nexact this ⟨x, Subtype.mem x, rfl⟩\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁷ : Field F\ninst✝¹⁶ : Field K\ninst✝¹⁵ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁴ : Field F\ninst✝¹³ : Field K₁\ninst✝¹² : Field K₂\ninst✝¹¹ : Field K₃\ninst✝¹⁰ : Algebra F K₁\ninst✝⁹ : Algebra F K₂\ninst✝⁸ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\ninst✝⁵ : Algebra E K₁\ninst✝⁴ : Algebra E K₂\ninst✝³ : Algebra E K₃\ninst✝² : IsScalarTower F E K₁\ninst✝¹ : IsScalarTower F E K₂\ninst✝ : IsScalarTower F E K₃\nh : Normal F E\nx : { x // x ∈ AlgHom.range (toAlgHom F E K₁) }\n⊢ Subalgebra.map ϕ (AlgHom.range (toAlgHom F E K₁)) ≤ AlgHom.range (toAlgHom F E K₂)\n[PROOFSTEP]\nrintro x ⟨y, ⟨z, hy⟩, hx⟩\n[GOAL]\ncase intro.intro.intro\nF : Type u_1\nK : Type u_2\ninst✝¹⁷ : Field F\ninst✝¹⁶ : Field K\ninst✝¹⁵ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁴ : Field F\ninst✝¹³ : Field K₁\ninst✝¹² : Field K₂\ninst✝¹¹ : Field K₃\ninst✝¹⁰ : Algebra F K₁\ninst✝⁹ : Algebra F K₂\ninst✝⁸ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\ninst✝⁵ : Algebra E K₁\ninst✝⁴ : Algebra E K₂\ninst✝³ : Algebra E K₃\ninst✝² : IsScalarTower F E K₁\ninst✝¹ : IsScalarTower F E K₂\ninst✝ : IsScalarTower F E K₃\nh : Normal F E\nx✝ : { x // x ∈ AlgHom.range (toAlgHom F E K₁) }\nx : K₂\ny : K₁\nhx : ↑↑ϕ y = x\nz : E\nhy : ↑↑(toAlgHom F E K₁) z = y\n⊢ x ∈ AlgHom.range (toAlgHom F E K₂)\n[PROOFSTEP]\nrw [← hx, ← hy]\n[GOAL]\ncase intro.intro.intro\nF : Type u_1\nK : Type u_2\ninst✝¹⁷ : Field F\ninst✝¹⁶ : Field K\ninst✝¹⁵ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁴ : Field F\ninst✝¹³ : Field K₁\ninst✝¹² : Field K₂\ninst✝¹¹ : Field K₃\ninst✝¹⁰ : Algebra F K₁\ninst✝⁹ : Algebra F K₂\ninst✝⁸ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\ninst✝⁵ : Algebra E K₁\ninst✝⁴ : Algebra E K₂\ninst✝³ : Algebra E K₃\ninst✝² : IsScalarTower F E K₁\ninst✝¹ : IsScalarTower F E K₂\ninst✝ : IsScalarTower F E K₃\nh : Normal F E\nx✝ : { x // x ∈ AlgHom.range (toAlgHom F E K₁) }\nx : K₂\ny : K₁\nhx : ↑↑ϕ y = x\nz : E\nhy : ↑↑(toAlgHom F E K₁) z = y\n⊢ ↑↑ϕ (↑↑(toAlgHom F E K₁) z) ∈ AlgHom.range (toAlgHom F E K₂)\n[PROOFSTEP]\napply minpoly.mem_range_of_degree_eq_one E\n[GOAL]\ncase intro.intro.intro.hx\nF : Type u_1\nK : Type u_2\ninst✝¹⁷ : Field F\ninst✝¹⁶ : Field K\ninst✝¹⁵ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁴ : Field F\ninst✝¹³ : Field K₁\ninst✝¹² : Field K₂\ninst✝¹¹ : Field K₃\ninst✝¹⁰ : Algebra F K₁\ninst✝⁹ : Algebra F K₂\ninst✝⁸ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\ninst✝⁵ : Algebra E K₁\ninst✝⁴ : Algebra E K₂\ninst✝³ : Algebra E K₃\ninst✝² : IsScalarTower F E K₁\ninst✝¹ : IsScalarTower F E K₂\ninst✝ : IsScalarTower F E K₃\nh : Normal F E\nx✝ : { x // x ∈ AlgHom.range (toAlgHom F E K₁) }\nx : K₂\ny : K₁\nhx : ↑↑ϕ y = x\nz : E\nhy : ↑↑(toAlgHom F E K₁) z = y\n⊢ degree (minpoly E (↑↑ϕ (↑↑(toAlgHom F E K₁) z))) = 1\n[PROOFSTEP]\nrefine'\n  Or.resolve_left (h.splits z).def (minpoly.ne_zero (h.isIntegral z)) (minpoly.irreducible _)\n    (minpoly.dvd E _ (by simp [aeval_algHom_apply]))\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁷ : Field F\ninst✝¹⁶ : Field K\ninst✝¹⁵ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁴ : Field F\ninst✝¹³ : Field K₁\ninst✝¹² : Field K₂\ninst✝¹¹ : Field K₃\ninst✝¹⁰ : Algebra F K₁\ninst✝⁹ : Algebra F K₂\ninst✝⁸ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\ninst✝⁵ : Algebra E K₁\ninst✝⁴ : Algebra E K₂\ninst✝³ : Algebra E K₃\ninst✝² : IsScalarTower F E K₁\ninst✝¹ : IsScalarTower F E K₂\ninst✝ : IsScalarTower F E K₃\nh : Normal F E\nx✝ : { x // x ∈ AlgHom.range (toAlgHom F E K₁) }\nx : K₂\ny : K₁\nhx : ↑↑ϕ y = x\nz : E\nhy : ↑↑(toAlgHom F E K₁) z = y\n⊢ ↑(aeval (↑↑ϕ (↑↑(toAlgHom F E K₁) z))) (map (algebraMap F E) (minpoly F z)) = 0\n[PROOFSTEP]\nsimp [aeval_algHom_apply]\n[GOAL]\ncase intro.intro.intro.hx\nF : Type u_1\nK : Type u_2\ninst✝¹⁷ : Field F\ninst✝¹⁶ : Field K\ninst✝¹⁵ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁴ : Field F\ninst✝¹³ : Field K₁\ninst✝¹² : Field K₂\ninst✝¹¹ : Field K₃\ninst✝¹⁰ : Algebra F K₁\ninst✝⁹ : Algebra F K₂\ninst✝⁸ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\ninst✝⁵ : Algebra E K₁\ninst✝⁴ : Algebra E K₂\ninst✝³ : Algebra E K₃\ninst✝² : IsScalarTower F E K₁\ninst✝¹ : IsScalarTower F E K₂\ninst✝ : IsScalarTower F E K₃\nh : Normal F E\nx✝ : { x // x ∈ AlgHom.range (toAlgHom F E K₁) }\nx : K₂\ny : K₁\nhx : ↑↑ϕ y = x\nz : E\nhy : ↑↑(toAlgHom F E K₁) z = y\n⊢ IsIntegral E (↑↑ϕ (↑↑(toAlgHom F E K₁) z))\n[PROOFSTEP]\nsimp only [AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom]\n[GOAL]\ncase intro.intro.intro.hx\nF : Type u_1\nK : Type u_2\ninst✝¹⁷ : Field F\ninst✝¹⁶ : Field K\ninst✝¹⁵ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁴ : Field F\ninst✝¹³ : Field K₁\ninst✝¹² : Field K₂\ninst✝¹¹ : Field K₃\ninst✝¹⁰ : Algebra F K₁\ninst✝⁹ : Algebra F K₂\ninst✝⁸ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\ninst✝⁵ : Algebra E K₁\ninst✝⁴ : Algebra E K₂\ninst✝³ : Algebra E K₃\ninst✝² : IsScalarTower F E K₁\ninst✝¹ : IsScalarTower F E K₂\ninst✝ : IsScalarTower F E K₃\nh : Normal F E\nx✝ : { x // x ∈ AlgHom.range (toAlgHom F E K₁) }\nx : K₂\ny : K₁\nhx : ↑↑ϕ y = x\nz : E\nhy : ↑↑(toAlgHom F E K₁) z = y\n⊢ IsIntegral E (↑ϕ (↑(toAlgHom F E K₁) z))\n[PROOFSTEP]\nsuffices IsIntegral F _ by exact isIntegral_of_isScalarTower this\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁷ : Field F\ninst✝¹⁶ : Field K\ninst✝¹⁵ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁴ : Field F\ninst✝¹³ : Field K₁\ninst✝¹² : Field K₂\ninst✝¹¹ : Field K₃\ninst✝¹⁰ : Algebra F K₁\ninst✝⁹ : Algebra F K₂\ninst✝⁸ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\ninst✝⁵ : Algebra E K₁\ninst✝⁴ : Algebra E K₂\ninst✝³ : Algebra E K₃\ninst✝² : IsScalarTower F E K₁\ninst✝¹ : IsScalarTower F E K₂\ninst✝ : IsScalarTower F E K₃\nh : Normal F E\nx✝ : { x // x ∈ AlgHom.range (toAlgHom F E K₁) }\nx : K₂\ny : K₁\nhx : ↑↑ϕ y = x\nz : E\nhy : ↑↑(toAlgHom F E K₁) z = y\nthis : IsIntegral F ?m.268983\n⊢ IsIntegral E (↑ϕ (↑(toAlgHom F E K₁) z))\n[PROOFSTEP]\nexact isIntegral_of_isScalarTower this\n[GOAL]\ncase intro.intro.intro.hx\nF : Type u_1\nK : Type u_2\ninst✝¹⁷ : Field F\ninst✝¹⁶ : Field K\ninst✝¹⁵ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁴ : Field F\ninst✝¹³ : Field K₁\ninst✝¹² : Field K₂\ninst✝¹¹ : Field K₃\ninst✝¹⁰ : Algebra F K₁\ninst✝⁹ : Algebra F K₂\ninst✝⁸ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F E\ninst✝⁵ : Algebra E K₁\ninst✝⁴ : Algebra E K₂\ninst✝³ : Algebra E K₃\ninst✝² : IsScalarTower F E K₁\ninst✝¹ : IsScalarTower F E K₂\ninst✝ : IsScalarTower F E K₃\nh : Normal F E\nx✝ : { x // x ∈ AlgHom.range (toAlgHom F E K₁) }\nx : K₂\ny : K₁\nhx : ↑↑ϕ y = x\nz : E\nhy : ↑↑(toAlgHom F E K₁) z = y\n⊢ IsIntegral F (↑ϕ (↑(toAlgHom F E K₁) z))\n[PROOFSTEP]\nexact map_isIntegral ϕ (map_isIntegral (toAlgHom F E K₁) (h.isIntegral z))\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁸ : Field F\ninst✝¹⁷ : Field K\ninst✝¹⁶ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁵ : Field F\ninst✝¹⁴ : Field K₁\ninst✝¹³ : Field K₂\ninst✝¹² : Field K₃\ninst✝¹¹ : Algebra F K₁\ninst✝¹⁰ : Algebra F K₂\ninst✝⁹ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra E K₁\ninst✝⁵ : Algebra E K₂\ninst✝⁴ : Algebra E K₃\ninst✝³ : IsScalarTower F E K₁\ninst✝² : IsScalarTower F E K₂\ninst✝¹ : IsScalarTower F E K₃\ninst✝ : Normal F E\nx✝ : E\n⊢ ↑(algebraMap E K₃) (↑(comp (restrictNormal ψ E) (restrictNormal ϕ E)) x✝) =\n    ↑(algebraMap E K₃) (↑(restrictNormal (comp ψ ϕ) E) x✝)\n[PROOFSTEP]\nsimp only [AlgHom.comp_apply, AlgHom.restrictNormal_commutes]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁹ : Field F\ninst✝¹⁸ : Field K\ninst✝¹⁷ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁶ : Field F\ninst✝¹⁵ : Field K₁\ninst✝¹⁴ : Field K₂\ninst✝¹³ : Field K₃\ninst✝¹² : Algebra F K₁\ninst✝¹¹ : Algebra F K₂\ninst✝¹⁰ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE✝ : Type u_6\ninst✝⁹ : Field E✝\ninst✝⁸ : Algebra F E✝\ninst✝⁷ : Algebra E✝ K₁\ninst✝⁶ : Algebra E✝ K₂\ninst✝⁵ : Algebra E✝ K₃\ninst✝⁴ : IsScalarTower F E✝ K₁\ninst✝³ : IsScalarTower F E✝ K₂\ninst✝² : IsScalarTower F E✝ K₃\ninst✝¹ : Algebra F K\nE : IntermediateField F K\ninst✝ : Normal F { x // x ∈ E }\nf : { x // x ∈ E } →ₐ[F] K\n⊢ fieldRange f = E\n[PROOFSTEP]\nletI : Algebra E E := Algebra.id E\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁹ : Field F\ninst✝¹⁸ : Field K\ninst✝¹⁷ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁶ : Field F\ninst✝¹⁵ : Field K₁\ninst✝¹⁴ : Field K₂\ninst✝¹³ : Field K₃\ninst✝¹² : Algebra F K₁\ninst✝¹¹ : Algebra F K₂\ninst✝¹⁰ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE✝ : Type u_6\ninst✝⁹ : Field E✝\ninst✝⁸ : Algebra F E✝\ninst✝⁷ : Algebra E✝ K₁\ninst✝⁶ : Algebra E✝ K₂\ninst✝⁵ : Algebra E✝ K₃\ninst✝⁴ : IsScalarTower F E✝ K₁\ninst✝³ : IsScalarTower F E✝ K₂\ninst✝² : IsScalarTower F E✝ K₃\ninst✝¹ : Algebra F K\nE : IntermediateField F K\ninst✝ : Normal F { x // x ∈ E }\nf : { x // x ∈ E } →ₐ[F] K\nthis : Algebra { x // x ∈ E } { x // x ∈ E } := Algebra.id { x // x ∈ E }\n⊢ fieldRange f = E\n[PROOFSTEP]\nlet g := f.restrictNormal' E\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁹ : Field F\ninst✝¹⁸ : Field K\ninst✝¹⁷ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁶ : Field F\ninst✝¹⁵ : Field K₁\ninst✝¹⁴ : Field K₂\ninst✝¹³ : Field K₃\ninst✝¹² : Algebra F K₁\ninst✝¹¹ : Algebra F K₂\ninst✝¹⁰ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE✝ : Type u_6\ninst✝⁹ : Field E✝\ninst✝⁸ : Algebra F E✝\ninst✝⁷ : Algebra E✝ K₁\ninst✝⁶ : Algebra E✝ K₂\ninst✝⁵ : Algebra E✝ K₃\ninst✝⁴ : IsScalarTower F E✝ K₁\ninst✝³ : IsScalarTower F E✝ K₂\ninst✝² : IsScalarTower F E✝ K₃\ninst✝¹ : Algebra F K\nE : IntermediateField F K\ninst✝ : Normal F { x // x ∈ E }\nf : { x // x ∈ E } →ₐ[F] K\nthis : Algebra { x // x ∈ E } { x // x ∈ E } := Algebra.id { x // x ∈ E }\ng : { x // x ∈ E } ≃ₐ[F] { x // x ∈ E } := restrictNormal' f { x // x ∈ E }\n⊢ fieldRange f = E\n[PROOFSTEP]\nrw [← show E.val.comp ↑g = f from FunLike.ext_iff.mpr (f.restrictNormal_commutes E), ←\n  IntermediateField.AlgHom.map_fieldRange, IntermediateField.AlgEquiv.fieldRange_eq_top g, ←\n  IntermediateField.AlgHom.fieldRange_eq_map, IntermediateField.fieldRange_val]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁸ : Field F\ninst✝¹⁷ : Field K\ninst✝¹⁶ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁵ : Field F\ninst✝¹⁴ : Field K₁\ninst✝¹³ : Field K₂\ninst✝¹² : Field K₃\ninst✝¹¹ : Algebra F K₁\ninst✝¹⁰ : Algebra F K₂\ninst✝⁹ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra E K₁\ninst✝⁵ : Algebra E K₂\ninst✝⁴ : Algebra E K₃\ninst✝³ : IsScalarTower F E K₁\ninst✝² : IsScalarTower F E K₂\ninst✝¹ : IsScalarTower F E K₃\ninst✝ : Normal F E\nx✝ : E\n⊢ ↑(algebraMap E K₃) (↑(restrictNormal (trans χ ω) E) x✝) =\n    ↑(algebraMap E K₃) (↑(trans (restrictNormal χ E) (restrictNormal ω E)) x✝)\n[PROOFSTEP]\nsimp only [AlgEquiv.trans_apply, AlgEquiv.restrictNormal_commutes]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁸ : Field F\ninst✝¹⁷ : Field K\ninst✝¹⁶ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁵ : Field F\ninst✝¹⁴ : Field K₁\ninst✝¹³ : Field K₂\ninst✝¹² : Field K₃\ninst✝¹¹ : Algebra F K₁\ninst✝¹⁰ : Algebra F K₂\ninst✝⁹ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra E K₁\ninst✝⁵ : Algebra E K₂\ninst✝⁴ : Algebra E K₃\ninst✝³ : IsScalarTower F E K₁\ninst✝² : IsScalarTower F E K₂\ninst✝¹ : IsScalarTower F E K₃\ninst✝ : Normal F E\nσ : E →ₐ[F] K₁\n⊢ (fun σ => AlgHom.comp (toAlgHom F E K₁) ↑σ) ((fun σ => AlgHom.restrictNormal' σ E) σ) = σ\n[PROOFSTEP]\next\n[GOAL]\ncase H\nF : Type u_1\nK : Type u_2\ninst✝¹⁸ : Field F\ninst✝¹⁷ : Field K\ninst✝¹⁶ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁵ : Field F\ninst✝¹⁴ : Field K₁\ninst✝¹³ : Field K₂\ninst✝¹² : Field K₃\ninst✝¹¹ : Algebra F K₁\ninst✝¹⁰ : Algebra F K₂\ninst✝⁹ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra E K₁\ninst✝⁵ : Algebra E K₂\ninst✝⁴ : Algebra E K₃\ninst✝³ : IsScalarTower F E K₁\ninst✝² : IsScalarTower F E K₂\ninst✝¹ : IsScalarTower F E K₃\ninst✝ : Normal F E\nσ : E →ₐ[F] K₁\nx✝ : E\n⊢ ↑((fun σ => AlgHom.comp (toAlgHom F E K₁) ↑σ) ((fun σ => AlgHom.restrictNormal' σ E) σ)) x✝ = ↑σ x✝\n[PROOFSTEP]\nsimp [AlgHom.restrictNormal']\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁸ : Field F\ninst✝¹⁷ : Field K\ninst✝¹⁶ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁵ : Field F\ninst✝¹⁴ : Field K₁\ninst✝¹³ : Field K₂\ninst✝¹² : Field K₃\ninst✝¹¹ : Algebra F K₁\ninst✝¹⁰ : Algebra F K₂\ninst✝⁹ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra E K₁\ninst✝⁵ : Algebra E K₂\ninst✝⁴ : Algebra E K₃\ninst✝³ : IsScalarTower F E K₁\ninst✝² : IsScalarTower F E K₂\ninst✝¹ : IsScalarTower F E K₃\ninst✝ : Normal F E\nσ : E ≃ₐ[F] E\n⊢ (fun σ => AlgHom.restrictNormal' σ E) ((fun σ => AlgHom.comp (toAlgHom F E K₁) ↑σ) σ) = σ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nK : Type u_2\ninst✝¹⁸ : Field F\ninst✝¹⁷ : Field K\ninst✝¹⁶ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁵ : Field F\ninst✝¹⁴ : Field K₁\ninst✝¹³ : Field K₂\ninst✝¹² : Field K₃\ninst✝¹¹ : Algebra F K₁\ninst✝¹⁰ : Algebra F K₂\ninst✝⁹ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra E K₁\ninst✝⁵ : Algebra E K₂\ninst✝⁴ : Algebra E K₃\ninst✝³ : IsScalarTower F E K₁\ninst✝² : IsScalarTower F E K₂\ninst✝¹ : IsScalarTower F E K₃\ninst✝ : Normal F E\nσ : E ≃ₐ[F] E\na✝ : E\n⊢ ↑((fun σ => AlgHom.restrictNormal' σ E) ((fun σ => AlgHom.comp (toAlgHom F E K₁) ↑σ) σ)) a✝ = ↑σ a✝\n[PROOFSTEP]\nsimp only [AlgHom.restrictNormal', AlgEquiv.toAlgHom_eq_coe, AlgEquiv.coe_ofBijective]\n[GOAL]\ncase h\nF : Type u_1\nK : Type u_2\ninst✝¹⁸ : Field F\ninst✝¹⁷ : Field K\ninst✝¹⁶ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁵ : Field F\ninst✝¹⁴ : Field K₁\ninst✝¹³ : Field K₂\ninst✝¹² : Field K₃\ninst✝¹¹ : Algebra F K₁\ninst✝¹⁰ : Algebra F K₂\ninst✝⁹ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra E K₁\ninst✝⁵ : Algebra E K₂\ninst✝⁴ : Algebra E K₃\ninst✝³ : IsScalarTower F E K₁\ninst✝² : IsScalarTower F E K₂\ninst✝¹ : IsScalarTower F E K₃\ninst✝ : Normal F E\nσ : E ≃ₐ[F] E\na✝ : E\n⊢ ↑(AlgHom.restrictNormal (AlgHom.comp (toAlgHom F E K₁) ↑σ) E) a✝ = ↑σ a✝\n[PROOFSTEP]\napply NoZeroSMulDivisors.algebraMap_injective E K₁\n[GOAL]\ncase h.a\nF : Type u_1\nK : Type u_2\ninst✝¹⁸ : Field F\ninst✝¹⁷ : Field K\ninst✝¹⁶ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁵ : Field F\ninst✝¹⁴ : Field K₁\ninst✝¹³ : Field K₂\ninst✝¹² : Field K₃\ninst✝¹¹ : Algebra F K₁\ninst✝¹⁰ : Algebra F K₂\ninst✝⁹ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra E K₁\ninst✝⁵ : Algebra E K₂\ninst✝⁴ : Algebra E K₃\ninst✝³ : IsScalarTower F E K₁\ninst✝² : IsScalarTower F E K₂\ninst✝¹ : IsScalarTower F E K₃\ninst✝ : Normal F E\nσ : E ≃ₐ[F] E\na✝ : E\n⊢ ↑(algebraMap E K₁) (↑(AlgHom.restrictNormal (AlgHom.comp (toAlgHom F E K₁) ↑σ) E) a✝) = ↑(algebraMap E K₁) (↑σ a✝)\n[PROOFSTEP]\nrw [AlgHom.restrictNormal_commutes]\n[GOAL]\ncase h.a\nF : Type u_1\nK : Type u_2\ninst✝¹⁸ : Field F\ninst✝¹⁷ : Field K\ninst✝¹⁶ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹⁵ : Field F\ninst✝¹⁴ : Field K₁\ninst✝¹³ : Field K₂\ninst✝¹² : Field K₃\ninst✝¹¹ : Algebra F K₁\ninst✝¹⁰ : Algebra F K₂\ninst✝⁹ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁸ : Field E\ninst✝⁷ : Algebra F E\ninst✝⁶ : Algebra E K₁\ninst✝⁵ : Algebra E K₂\ninst✝⁴ : Algebra E K₃\ninst✝³ : IsScalarTower F E K₁\ninst✝² : IsScalarTower F E K₂\ninst✝¹ : IsScalarTower F E K₃\ninst✝ : Normal F E\nσ : E ≃ₐ[F] E\na✝ : E\n⊢ ↑(AlgHom.comp (toAlgHom F E K₁) ↑σ) (↑(algebraMap E E) a✝) = ↑(algebraMap E K₁) (↑σ a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁵ : Field F\ninst✝¹⁴ : Field K\ninst✝¹³ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹² : Field F\ninst✝¹¹ : Field K₁\ninst✝¹⁰ : Field K₂\ninst✝⁹ : Field K₃\ninst✝⁸ : Algebra F K₁\ninst✝⁷ : Algebra F K₂\ninst✝⁶ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁵ : Field E\ninst✝⁴ : Algebra F E\ninst✝³ : Algebra K₁ E\ninst✝² : Algebra K₂ E\ninst✝¹ : IsScalarTower F K₁ E\ninst✝ : IsScalarTower F K₂ E\nh : Normal F E\nx : E\nx✝ : x ∈ Set.univ\n⊢ Splits (algebraMap K₁ E) (map (algebraMap F K₁) (minpoly F x))\n[PROOFSTEP]\nrw [splits_map_iff, ← @IsScalarTower.algebraMap_eq _ _ _ _ _ _ (_) (_) (_)]\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁵ : Field F\ninst✝¹⁴ : Field K\ninst✝¹³ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹² : Field F\ninst✝¹¹ : Field K₁\ninst✝¹⁰ : Field K₂\ninst✝⁹ : Field K₃\ninst✝⁸ : Algebra F K₁\ninst✝⁷ : Algebra F K₂\ninst✝⁶ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁵ : Field E\ninst✝⁴ : Algebra F E\ninst✝³ : Algebra K₁ E\ninst✝² : Algebra K₂ E\ninst✝¹ : IsScalarTower F K₁ E\ninst✝ : IsScalarTower F K₂ E\nh : Normal F E\nx : E\nx✝ : x ∈ Set.univ\n⊢ Splits (algebraMap F E) (minpoly F x)\n[PROOFSTEP]\nexact (h.out x).2\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁶ : Field F\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹³ : Field F\ninst✝¹² : Field K₁\ninst✝¹¹ : Field K₂\ninst✝¹⁰ : Field K₃\ninst✝⁹ : Algebra F K₁\ninst✝⁸ : Algebra F K₂\ninst✝⁷ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁶ : Field E\ninst✝⁵ : Algebra F E\ninst✝⁴ : Algebra K₁ E\ninst✝³ : Algebra K₂ E\ninst✝² : IsScalarTower F K₁ E\ninst✝¹ : IsScalarTower F K₂ E\ninst✝ : Normal F K₁\nh1 : IsSolvable (K₁ ≃ₐ[F] K₁)\nh2 : IsSolvable (E ≃ₐ[K₁] E)\n⊢ IsSolvable (E ≃ₐ[F] E)\n[PROOFSTEP]\nlet f : (E ≃ₐ[K₁] E) →* E ≃ₐ[F] E :=\n  { toFun := fun ϕ =>\n      AlgEquiv.ofAlgHom (ϕ.toAlgHom.restrictScalars F) (ϕ.symm.toAlgHom.restrictScalars F)\n        (AlgHom.ext fun x => ϕ.apply_symm_apply x) (AlgHom.ext fun x => ϕ.symm_apply_apply x)\n    map_one' := AlgEquiv.ext fun _ => rfl\n    map_mul' := fun _ _ => AlgEquiv.ext fun _ => rfl }\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁶ : Field F\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹³ : Field F\ninst✝¹² : Field K₁\ninst✝¹¹ : Field K₂\ninst✝¹⁰ : Field K₃\ninst✝⁹ : Algebra F K₁\ninst✝⁸ : Algebra F K₂\ninst✝⁷ : Algebra F K₃\nϕ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁶ : Field E\ninst✝⁵ : Algebra F E\ninst✝⁴ : Algebra K₁ E\ninst✝³ : Algebra K₂ E\ninst✝² : IsScalarTower F K₁ E\ninst✝¹ : IsScalarTower F K₂ E\ninst✝ : Normal F K₁\nh1 : IsSolvable (K₁ ≃ₐ[F] K₁)\nh2 : IsSolvable (E ≃ₐ[K₁] E)\nf : (E ≃ₐ[K₁] E) →* E ≃ₐ[F] E :=\n  {\n    toOneHom :=\n      {\n        toFun := fun ϕ =>\n          AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n            (_ :\n              AlgHom.comp (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) = AlgHom.id F E)\n            (_ :\n              AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) (AlgHom.restrictScalars F ↑ϕ) = AlgHom.id F E),\n        map_one' :=\n          (_ :\n            (fun ϕ =>\n                  AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                    (_ :\n                      AlgHom.comp (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                        AlgHom.id F E)\n                    (_ :\n                      AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) (AlgHom.restrictScalars F ↑ϕ) =\n                        AlgHom.id F E))\n                1 =\n              1) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : E ≃ₐ[K₁] E),\n          OneHom.toFun\n              {\n                toFun := fun ϕ =>\n                  AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                    (_ :\n                      AlgHom.comp (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                        AlgHom.id F E)\n                    (_ :\n                      AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) (AlgHom.restrictScalars F ↑ϕ) =\n                        AlgHom.id F E),\n                map_one' :=\n                  (_ :\n                    (fun ϕ =>\n                          AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                            (_ :\n                              AlgHom.comp (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                                AlgHom.id F E)\n                            (_ :\n                              AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) (AlgHom.restrictScalars F ↑ϕ) =\n                                AlgHom.id F E))\n                        1 =\n                      1) }\n              (x * x_1) =\n            OneHom.toFun\n                {\n                  toFun := fun ϕ =>\n                    AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                      (_ :\n                        AlgHom.comp (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                          AlgHom.id F E)\n                      (_ :\n                        AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) (AlgHom.restrictScalars F ↑ϕ) =\n                          AlgHom.id F E),\n                  map_one' :=\n                    (_ :\n                      (fun ϕ =>\n                            AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ)\n                              (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                              (_ :\n                                AlgHom.comp (AlgHom.restrictScalars F ↑ϕ)\n                                    (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                                  AlgHom.id F E)\n                              (_ :\n                                AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                                    (AlgHom.restrictScalars F ↑ϕ) =\n                                  AlgHom.id F E))\n                          1 =\n                        1) }\n                x *\n              OneHom.toFun\n                {\n                  toFun := fun ϕ =>\n                    AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                      (_ :\n                        AlgHom.comp (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                          AlgHom.id F E)\n                      (_ :\n                        AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) (AlgHom.restrictScalars F ↑ϕ) =\n                          AlgHom.id F E),\n                  map_one' :=\n                    (_ :\n                      (fun ϕ =>\n                            AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ)\n                              (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                              (_ :\n                                AlgHom.comp (AlgHom.restrictScalars F ↑ϕ)\n                                    (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                                  AlgHom.id F E)\n                              (_ :\n                                AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                                    (AlgHom.restrictScalars F ↑ϕ) =\n                                  AlgHom.id F E))\n                          1 =\n                        1) }\n                x_1) }\n⊢ IsSolvable (E ≃ₐ[F] E)\n[PROOFSTEP]\nrefine'\n  solvable_of_ker_le_range f (AlgEquiv.restrictNormalHom K₁) fun ϕ hϕ =>\n    ⟨{ ϕ with commutes' := fun x => _ }, AlgEquiv.ext fun _ => rfl⟩\n[GOAL]\nF : Type u_1\nK : Type u_2\ninst✝¹⁶ : Field F\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Algebra F K\nK₁ : Type u_3\nK₂ : Type u_4\nK₃ : Type u_5\ninst✝¹³ : Field F\ninst✝¹² : Field K₁\ninst✝¹¹ : Field K₂\ninst✝¹⁰ : Field K₃\ninst✝⁹ : Algebra F K₁\ninst✝⁸ : Algebra F K₂\ninst✝⁷ : Algebra F K₃\nϕ✝ : K₁ →ₐ[F] K₂\nχ : K₁ ≃ₐ[F] K₂\nψ : K₂ →ₐ[F] K₃\nω : K₂ ≃ₐ[F] K₃\nE : Type u_6\ninst✝⁶ : Field E\ninst✝⁵ : Algebra F E\ninst✝⁴ : Algebra K₁ E\ninst✝³ : Algebra K₂ E\ninst✝² : IsScalarTower F K₁ E\ninst✝¹ : IsScalarTower F K₂ E\ninst✝ : Normal F K₁\nh1 : IsSolvable (K₁ ≃ₐ[F] K₁)\nh2 : IsSolvable (E ≃ₐ[K₁] E)\nf : (E ≃ₐ[K₁] E) →* E ≃ₐ[F] E :=\n  {\n    toOneHom :=\n      {\n        toFun := fun ϕ =>\n          AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n            (_ :\n              AlgHom.comp (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) = AlgHom.id F E)\n            (_ :\n              AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) (AlgHom.restrictScalars F ↑ϕ) = AlgHom.id F E),\n        map_one' :=\n          (_ :\n            (fun ϕ =>\n                  AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                    (_ :\n                      AlgHom.comp (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                        AlgHom.id F E)\n                    (_ :\n                      AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) (AlgHom.restrictScalars F ↑ϕ) =\n                        AlgHom.id F E))\n                1 =\n              1) },\n    map_mul' :=\n      (_ :\n        ∀ (x x_1 : E ≃ₐ[K₁] E),\n          OneHom.toFun\n              {\n                toFun := fun ϕ =>\n                  AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                    (_ :\n                      AlgHom.comp (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                        AlgHom.id F E)\n                    (_ :\n                      AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) (AlgHom.restrictScalars F ↑ϕ) =\n                        AlgHom.id F E),\n                map_one' :=\n                  (_ :\n                    (fun ϕ =>\n                          AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                            (_ :\n                              AlgHom.comp (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                                AlgHom.id F E)\n                            (_ :\n                              AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) (AlgHom.restrictScalars F ↑ϕ) =\n                                AlgHom.id F E))\n                        1 =\n                      1) }\n              (x * x_1) =\n            OneHom.toFun\n                {\n                  toFun := fun ϕ =>\n                    AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                      (_ :\n                        AlgHom.comp (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                          AlgHom.id F E)\n                      (_ :\n                        AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) (AlgHom.restrictScalars F ↑ϕ) =\n                          AlgHom.id F E),\n                  map_one' :=\n                    (_ :\n                      (fun ϕ =>\n                            AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ)\n                              (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                              (_ :\n                                AlgHom.comp (AlgHom.restrictScalars F ↑ϕ)\n                                    (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                                  AlgHom.id F E)\n                              (_ :\n                                AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                                    (AlgHom.restrictScalars F ↑ϕ) =\n                                  AlgHom.id F E))\n                          1 =\n                        1) }\n                x *\n              OneHom.toFun\n                {\n                  toFun := fun ϕ =>\n                    AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                      (_ :\n                        AlgHom.comp (AlgHom.restrictScalars F ↑ϕ) (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                          AlgHom.id F E)\n                      (_ :\n                        AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) (AlgHom.restrictScalars F ↑ϕ) =\n                          AlgHom.id F E),\n                  map_one' :=\n                    (_ :\n                      (fun ϕ =>\n                            AlgEquiv.ofAlgHom (AlgHom.restrictScalars F ↑ϕ)\n                              (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                              (_ :\n                                AlgHom.comp (AlgHom.restrictScalars F ↑ϕ)\n                                    (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ)) =\n                                  AlgHom.id F E)\n                              (_ :\n                                AlgHom.comp (AlgHom.restrictScalars F ↑(AlgEquiv.symm ϕ))\n                                    (AlgHom.restrictScalars F ↑ϕ) =\n                                  AlgHom.id F E))\n                          1 =\n                        1) }\n                x_1) }\nϕ : E ≃ₐ[F] E\nhϕ : ϕ ∈ MonoidHom.ker (AlgEquiv.restrictNormalHom K₁)\nx : K₁\n⊢ Equiv.toFun ϕ.toEquiv (↑(algebraMap K₁ E) x) = ↑(algebraMap K₁ E) x\n[PROOFSTEP]\nexact Eq.trans (ϕ.restrictNormal_commutes K₁ x).symm (congr_arg _ (AlgEquiv.ext_iff.mp hϕ x))\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.Normal", "llama_tokens": 55946, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7090191460821871, "lm_q2_score": 0.5, "lm_q1q2_score": 0.35450957304109354}}
{"text": "[GOAL]\nR : Type u\ninst✝⁵ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝⁴ : (i : ι) → AddCommMonoid (M i)\ninst✝³ : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\ninst✝ : Fintype ι\nsrc✝ : (Π₀ (i : ι), M i) ≃ ((i : ι) → M i) := DFinsupp.equivFunOnFintype\nf g : ⨁ (i : ι), M i\n⊢ ↑(f + g) = ↑f + ↑g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\ninst✝⁵ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝⁴ : (i : ι) → AddCommMonoid (M i)\ninst✝³ : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\ninst✝ : Fintype ι\nsrc✝ : (Π₀ (i : ι), M i) ≃ ((i : ι) → M i) := DFinsupp.equivFunOnFintype\nf g : ⨁ (i : ι), M i\nx✝ : ι\n⊢ ↑(f + g) x✝ = (↑f + ↑g) x✝\n[PROOFSTEP]\nrw [add_apply, Pi.add_apply]\n[GOAL]\nR : Type u\ninst✝⁵ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝⁴ : (i : ι) → AddCommMonoid (M i)\ninst✝³ : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\ninst✝ : Fintype ι\nsrc✝ : (Π₀ (i : ι), M i) ≃ ((i : ι) → M i) := DFinsupp.equivFunOnFintype\nc : R\nf : ⨁ (i : ι), M i\n⊢ AddHom.toFun { toFun := FunLike.coe, map_add' := (_ : ∀ (f g : ⨁ (i : ι), M i), ↑(f + g) = ↑f + ↑g) } (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun { toFun := FunLike.coe, map_add' := (_ : ∀ (f g : ⨁ (i : ι), M i), ↑(f + g) = ↑f + ↑g) } f\n[PROOFSTEP]\nsimp_rw [RingHom.id_apply]\n[GOAL]\nR : Type u\ninst✝⁵ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝⁴ : (i : ι) → AddCommMonoid (M i)\ninst✝³ : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\ninst✝ : Fintype ι\nsrc✝ : (Π₀ (i : ι), M i) ≃ ((i : ι) → M i) := DFinsupp.equivFunOnFintype\nc : R\nf : ⨁ (i : ι), M i\n⊢ ↑(c • f) = c • ↑f\n[PROOFSTEP]\nrw [DFinsupp.coe_smul]\n[GOAL]\nR : Type u\ninst✝⁶ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝⁵ : (i : ι) → AddCommMonoid (M i)\ninst✝⁴ : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ni : ι\nm : M i\n⊢ ↑(linearEquivFunOnFintype R ι M) (↑(lof R ι M i) m) = Pi.single i m\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nR : Type u\ninst✝⁶ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝⁵ : (i : ι) → AddCommMonoid (M i)\ninst✝⁴ : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ni : ι\nm : M i\na : ι\n⊢ ↑(linearEquivFunOnFintype R ι M) (↑(lof R ι M i) m) a = Pi.single i m a\n[PROOFSTEP]\nchange (DFinsupp.equivFunOnFintype (lof R ι M i m)) a = _\n[GOAL]\ncase h\nR : Type u\ninst✝⁶ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝⁵ : (i : ι) → AddCommMonoid (M i)\ninst✝⁴ : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ni : ι\nm : M i\na : ι\n⊢ ↑DFinsupp.equivFunOnFintype (↑(lof R ι M i) m) a = Pi.single i m a\n[PROOFSTEP]\nconvert _root_.congr_fun (DFinsupp.equivFunOnFintype_single i m) a\n[GOAL]\nR : Type u\ninst✝⁶ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝⁵ : (i : ι) → AddCommMonoid (M i)\ninst✝⁴ : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ni : ι\nm : M i\n⊢ ↑(LinearEquiv.symm (linearEquivFunOnFintype R ι M)) (Pi.single i m) = ↑(lof R ι M i) m\n[PROOFSTEP]\nchange (DFinsupp.equivFunOnFintype.symm (Pi.single i m)) = _\n[GOAL]\nR : Type u\ninst✝⁶ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝⁵ : (i : ι) → AddCommMonoid (M i)\ninst✝⁴ : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ni : ι\nm : M i\n⊢ ↑DFinsupp.equivFunOnFintype.symm (Pi.single i m) = ↑(lof R ι M i) m\n[PROOFSTEP]\nrw [DFinsupp.equivFunOnFintype_symm_single i m]\n[GOAL]\nR : Type u\ninst✝⁶ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝⁵ : (i : ι) → AddCommMonoid (M i)\ninst✝⁴ : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ni : ι\nm : M i\n⊢ DFinsupp.single i m = ↑(lof R ι M i) m\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝⁵ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝⁴ : (i : ι) → AddCommMonoid (M i)\ninst✝³ : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\ninst✝ : Fintype ι\nf : ⨁ (i : ι), M i\n⊢ ↑(LinearEquiv.symm (linearEquivFunOnFintype R ι M)) ↑f = f\n[PROOFSTEP]\nsimp [linearEquivFunOnFintype]\n[GOAL]\nR : Type u\ninst✝⁴ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝³ : (i : ι) → AddCommMonoid (M i)\ninst✝² : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝¹ : AddCommMonoid N\ninst✝ : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\nf g : ⨁ (i : ι), M i\nh : f = g\nx✝ : ι\n⊢ ↑(component R ι M x✝) f = ↑(component R ι M x✝) g\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u\ninst✝⁶ : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : ι → Type w\ninst✝⁵ : (i : ι) → AddCommMonoid (M i)\ninst✝⁴ : (i : ι) → Module R (M i)\nN : Type u₁\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\nφ : (i : ι) → M i →ₗ[R] N\nψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N\nα : ι → Type u_1\nδ : (i : ι) → α i → Type w\ninst✝¹ : (i : ι) → (j : α i) → AddCommMonoid (δ i j)\ninst✝ : (i : ι) → (j : α i) → Module R (δ i j)\nsrc✝ : (⨁ (i : (_i : ι) × α _i), δ i.fst i.snd) →+ ⨁ (i : ι) (j : α i), δ i j := sigmaCurry\nr : R\n⊢ ∀ (x : ⨁ (i : (i : ι) × α i), δ i.fst i.snd),\n    AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : ⨁ (i : (_i : ι) × α _i), δ i.fst i.snd),\n                ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := src✝.toFun,\n            map_add' :=\n              (_ :\n                ∀ (x y : ⨁ (i : (_i : ι) × α _i), δ i.fst i.snd),\n                  ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n          x\n[PROOFSTEP]\nconvert DFinsupp.sigmaCurry_smul (δ := δ) r\n[GOAL]\nR : Type u\ninst✝² : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nA : ι → Submodule R M\nh : IsInternal A\n⊢ iSup A = ⊤\n[PROOFSTEP]\nrw [Submodule.iSup_eq_range_dfinsupp_lsum, LinearMap.range_eq_top]\n[GOAL]\nR : Type u\ninst✝² : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nA : ι → Submodule R M\nh : IsInternal A\n⊢ Function.Surjective ↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (A i))\n[PROOFSTEP]\nexact Function.Bijective.surjective h\n[GOAL]\nR : Type u\ninst✝² : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nA : ι → Submodule R M\nh : IsInternal A\nα : ι → Type u_2\nv : (i : ι) → Basis (α i) R { x // x ∈ A i }\n⊢ ↑(collectedBasis h v) = fun a => ↑(↑(v a.fst) a.snd)\n[PROOFSTEP]\nfunext a\n[GOAL]\ncase h\nR : Type u\ninst✝² : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nA : ι → Submodule R M\nh : IsInternal A\nα : ι → Type u_2\nv : (i : ι) → Basis (α i) R { x // x ∈ A i }\na : (i : ι) × α i\n⊢ ↑(collectedBasis h v) a = ↑(↑(v a.fst) a.snd)\n[PROOFSTEP]\nsimp only [IsInternal.collectedBasis, coeLinearMap, Basis.coe_ofRepr, LinearEquiv.trans_symm, LinearEquiv.symm_symm,\n  LinearEquiv.trans_apply, sigmaFinsuppLequivDFinsupp_apply, sigmaFinsuppEquivDFinsupp_single,\n  LinearEquiv.ofBijective_apply, sigmaFinsuppAddEquivDFinsupp_apply]\n[GOAL]\ncase h\nR : Type u\ninst✝² : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nA : ι → Submodule R M\nh : IsInternal A\nα : ι → Type u_2\nv : (i : ι) → Basis (α i) R { x // x ∈ A i }\na : (i : ι) × α i\n⊢ ↑(toModule R ι M fun i => Submodule.subtype (A i))\n      (↑(LinearEquiv.symm (DFinsupp.mapRange.linearEquiv fun i => (v i).repr))\n        (DFinsupp.single a.fst (Finsupp.single a.snd 1))) =\n    ↑(↑(v a.fst) a.snd)\n[PROOFSTEP]\nrw [DFinsupp.mapRange.linearEquiv_symm]\n[GOAL]\ncase h\nR : Type u\ninst✝² : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nA : ι → Submodule R M\nh : IsInternal A\nα : ι → Type u_2\nv : (i : ι) → Basis (α i) R { x // x ∈ A i }\na : (i : ι) × α i\n⊢ ↑(toModule R ι M fun i => Submodule.subtype (A i))\n      (↑(DFinsupp.mapRange.linearEquiv fun i => LinearEquiv.symm (v i).repr)\n        (DFinsupp.single a.fst (Finsupp.single a.snd 1))) =\n    ↑(↑(v a.fst) a.snd)\n[PROOFSTEP]\nerw [DFinsupp.mapRange.linearEquiv_apply]\n[GOAL]\ncase h\nR : Type u\ninst✝² : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nA : ι → Submodule R M\nh : IsInternal A\nα : ι → Type u_2\nv : (i : ι) → Basis (α i) R { x // x ∈ A i }\na : (i : ι) × α i\n⊢ ↑(toModule R ι M fun i => Submodule.subtype (A i))\n      (DFinsupp.mapRange (fun i x => ↑(LinearEquiv.symm (v i).repr) x)\n        (_ : ∀ (i : ι), ↑(LinearEquiv.symm (v i).repr) 0 = 0) (DFinsupp.single a.fst (Finsupp.single a.snd 1))) =\n    ↑(↑(v a.fst) a.snd)\n[PROOFSTEP]\nsimp only [DFinsupp.mapRange_single, Basis.repr_symm_apply, Finsupp.total_single, one_smul, toModule]\n[GOAL]\ncase h\nR : Type u\ninst✝² : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nA : ι → Submodule R M\nh : IsInternal A\nα : ι → Type u_2\nv : (i : ι) → Basis (α i) R { x // x ∈ A i }\na : (i : ι) × α i\n⊢ ↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (A i)) (DFinsupp.single a.fst (↑(v a.fst) a.snd)) =\n    ↑(↑(v a.fst) a.snd)\n[PROOFSTEP]\nerw [DFinsupp.lsum_single]\n[GOAL]\ncase h\nR : Type u\ninst✝² : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nA : ι → Submodule R M\nh : IsInternal A\nα : ι → Type u_2\nv : (i : ι) → Basis (α i) R { x // x ∈ A i }\na : (i : ι) × α i\n⊢ ↑(Submodule.subtype (A a.fst)) (↑(v a.fst) a.snd) = ↑(↑(v a.fst) a.snd)\n[PROOFSTEP]\nsimp only [Submodule.coeSubtype]\n[GOAL]\nR : Type u\ninst✝² : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nA : ι → Submodule R M\nh : IsInternal A\nα : ι → Type u_2\nv : (i : ι) → Basis (α i) R { x // x ∈ A i }\na : (i : ι) × α i\n⊢ ↑(collectedBasis h v) a ∈ A a.fst\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\ninst✝² : Semiring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nA✝ A : ι → Submodule R M\ni j : ι\nhij : i ≠ j\nh : Set.univ = {i, j}\nhi : IsInternal A\n⊢ iSup A = A i ⊔ A j\n[PROOFSTEP]\nrw [← sSup_pair, iSup, ← Set.image_univ, h, Set.image_insert_eq, Set.image_singleton]\n[GOAL]\nR : Type u\ninst✝² : Ring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nA : ι → Submodule R M\ni j : ι\nhij : i ≠ j\nh : Set.univ = {i, j}\n⊢ IsInternal A ↔ IsCompl (A i) (A j)\n[PROOFSTEP]\nhave : ∀ k, k = i ∨ k = j := fun k ↦ by simpa using Set.ext_iff.mp h k\n[GOAL]\nR : Type u\ninst✝² : Ring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nA : ι → Submodule R M\ni j : ι\nhij : i ≠ j\nh : Set.univ = {i, j}\nk : ι\n⊢ k = i ∨ k = j\n[PROOFSTEP]\nsimpa using Set.ext_iff.mp h k\n[GOAL]\nR : Type u\ninst✝² : Ring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nA : ι → Submodule R M\ni j : ι\nhij : i ≠ j\nh : Set.univ = {i, j}\nthis : ∀ (k : ι), k = i ∨ k = j\n⊢ IsInternal A ↔ IsCompl (A i) (A j)\n[PROOFSTEP]\nrw [isInternal_submodule_iff_independent_and_iSup_eq_top, iSup, ← Set.image_univ, h, Set.image_insert_eq,\n  Set.image_singleton, sSup_pair, CompleteLattice.independent_pair hij this]\n[GOAL]\nR : Type u\ninst✝² : Ring R\nι : Type v\ndec_ι : DecidableEq ι\nM : Type u_1\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nA : ι → Submodule R M\ni j : ι\nhij : i ≠ j\nh : Set.univ = {i, j}\nthis : ∀ (k : ι), k = i ∨ k = j\n⊢ Disjoint (A i) (A j) ∧ A i ⊔ A j = ⊤ ↔ IsCompl (A i) (A j)\n[PROOFSTEP]\nexact ⟨fun ⟨hd, ht⟩ ↦ ⟨hd, codisjoint_iff.mpr ht⟩, fun ⟨hd, ht⟩ ↦ ⟨hd, ht.eq_top⟩⟩\n", "meta": {"mathlib_filename": "Mathlib.Algebra.DirectSum.Module", "llama_tokens": 6819, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7090191337850933, "lm_q2_score": 0.5, "lm_q1q2_score": 0.35450956689254665}}
{"text": "[GOAL]\nC : Type u\ninst✝⁶ : Category.{v₁, u} C\nD : Type u₂\ninst✝⁵ : Category.{u, u₂} D\nE : Type u\ninst✝⁴ : Category.{v₂, u} E\ninst✝³ : HasBinaryProducts D\ninst✝² : HasColimits D\ninst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)\nF : C ⥤ D\nJ : Type u\ninst✝ : Category.{u, u} J\nK : J ⥤ C ⥤ D\nc : Cocone K\nt : IsColimit c\n⊢ IsColimit ((prod.functor.obj F).mapCocone c)\n[PROOFSTEP]\napply evaluationJointlyReflectsColimits _ fun {k} => ?_\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v₁, u} C\nD : Type u₂\ninst✝⁵ : Category.{u, u₂} D\nE : Type u\ninst✝⁴ : Category.{v₂, u} E\ninst✝³ : HasBinaryProducts D\ninst✝² : HasColimits D\ninst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)\nF : C ⥤ D\nJ : Type u\ninst✝ : Category.{u, u} J\nK : J ⥤ C ⥤ D\nc : Cocone K\nt : IsColimit c\nk : C\n⊢ IsColimit (((evaluation C D).obj k).mapCocone ((prod.functor.obj F).mapCocone c))\n[PROOFSTEP]\nchange IsColimit ((prod.functor.obj F ⋙ (evaluation _ _).obj k).mapCocone c)\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v₁, u} C\nD : Type u₂\ninst✝⁵ : Category.{u, u₂} D\nE : Type u\ninst✝⁴ : Category.{v₂, u} E\ninst✝³ : HasBinaryProducts D\ninst✝² : HasColimits D\ninst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)\nF : C ⥤ D\nJ : Type u\ninst✝ : Category.{u, u} J\nK : J ⥤ C ⥤ D\nc : Cocone K\nt : IsColimit c\nk : C\n⊢ IsColimit ((prod.functor.obj F ⋙ (evaluation C D).obj k).mapCocone c)\n[PROOFSTEP]\nlet this := isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v₁, u} C\nD : Type u₂\ninst✝⁵ : Category.{u, u₂} D\nE : Type u\ninst✝⁴ : Category.{v₂, u} E\ninst✝³ : HasBinaryProducts D\ninst✝² : HasColimits D\ninst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)\nF : C ⥤ D\nJ : Type u\ninst✝ : Category.{u, u} J\nK : J ⥤ C ⥤ D\nc : Cocone K\nt : IsColimit c\nk : C\nthis : IsColimit (((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).mapCocone c) :=\n  isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t\n⊢ IsColimit ((prod.functor.obj F ⋙ (evaluation C D).obj k).mapCocone c)\n[PROOFSTEP]\napply IsColimit.mapCoconeEquiv _ this\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v₁, u} C\nD : Type u₂\ninst✝⁵ : Category.{u, u₂} D\nE : Type u\ninst✝⁴ : Category.{v₂, u} E\ninst✝³ : HasBinaryProducts D\ninst✝² : HasColimits D\ninst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)\nF : C ⥤ D\nJ : Type u\ninst✝ : Category.{u, u} J\nK : J ⥤ C ⥤ D\nc : Cocone K\nt : IsColimit c\nk : C\nthis : IsColimit (((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).mapCocone c) :=\n  isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t\n⊢ (evaluation C D).obj k ⋙ prod.functor.obj (F.obj k) ≅ prod.functor.obj F ⋙ (evaluation C D).obj k\n[PROOFSTEP]\napply (NatIso.ofComponents _ _).symm\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v₁, u} C\nD : Type u₂\ninst✝⁵ : Category.{u, u₂} D\nE : Type u\ninst✝⁴ : Category.{v₂, u} E\ninst✝³ : HasBinaryProducts D\ninst✝² : HasColimits D\ninst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)\nF : C ⥤ D\nJ : Type u\ninst✝ : Category.{u, u} J\nK : J ⥤ C ⥤ D\nc : Cocone K\nt : IsColimit c\nk : C\nthis : IsColimit (((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).mapCocone c) :=\n  isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t\n⊢ (X : C ⥤ D) →\n    (prod.functor.obj F ⋙ (evaluation C D).obj k).obj X ≅ ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).obj X\n[PROOFSTEP]\nintro G\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v₁, u} C\nD : Type u₂\ninst✝⁵ : Category.{u, u₂} D\nE : Type u\ninst✝⁴ : Category.{v₂, u} E\ninst✝³ : HasBinaryProducts D\ninst✝² : HasColimits D\ninst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)\nF : C ⥤ D\nJ : Type u\ninst✝ : Category.{u, u} J\nK : J ⥤ C ⥤ D\nc : Cocone K\nt : IsColimit c\nk : C\nthis : IsColimit (((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).mapCocone c) :=\n  isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t\nG : C ⥤ D\n⊢ (prod.functor.obj F ⋙ (evaluation C D).obj k).obj G ≅ ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).obj G\n[PROOFSTEP]\napply asIso (prodComparison ((evaluation C D).obj k) F G)\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v₁, u} C\nD : Type u₂\ninst✝⁵ : Category.{u, u₂} D\nE : Type u\ninst✝⁴ : Category.{v₂, u} E\ninst✝³ : HasBinaryProducts D\ninst✝² : HasColimits D\ninst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)\nF : C ⥤ D\nJ : Type u\ninst✝ : Category.{u, u} J\nK : J ⥤ C ⥤ D\nc : Cocone K\nt : IsColimit c\nk : C\nthis : IsColimit (((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).mapCocone c) :=\n  isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t\n⊢ ∀ {X Y : C ⥤ D} (f : X ⟶ Y),\n    (prod.functor.obj F ⋙ (evaluation C D).obj k).map f ≫ (asIso (prodComparison ((evaluation C D).obj k) F Y)).hom =\n      (asIso (prodComparison ((evaluation C D).obj k) F X)).hom ≫\n        ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).map f\n[PROOFSTEP]\nintro G G'\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v₁, u} C\nD : Type u₂\ninst✝⁵ : Category.{u, u₂} D\nE : Type u\ninst✝⁴ : Category.{v₂, u} E\ninst✝³ : HasBinaryProducts D\ninst✝² : HasColimits D\ninst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)\nF : C ⥤ D\nJ : Type u\ninst✝ : Category.{u, u} J\nK : J ⥤ C ⥤ D\nc : Cocone K\nt : IsColimit c\nk : C\nthis : IsColimit (((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).mapCocone c) :=\n  isColimitOfPreserves ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)) t\nG G' : C ⥤ D\n⊢ ∀ (f : G ⟶ G'),\n    (prod.functor.obj F ⋙ (evaluation C D).obj k).map f ≫ (asIso (prodComparison ((evaluation C D).obj k) F G')).hom =\n      (asIso (prodComparison ((evaluation C D).obj k) F G)).hom ≫\n        ((evaluation C D).obj k ⋙ prod.functor.obj (F.obj k)).map f\n[PROOFSTEP]\napply prodComparison_natural ((evaluation C D).obj k) (𝟙 F)\n[GOAL]\nC : Type u\ninst✝³ : Category.{v₁, u} C\nD : Type u₂\ninst✝² : Category.{u, u₂} D\nE : Type u\ninst✝¹ : Category.{v₂, u} E\ninst✝ : HasLimits D\nF : C ⥤ E\nJ : Type u\nhJ : Category.{u, u} J\nK : J ⥤ E ⥤ D\nc : Cone K\nhc : IsLimit c\n⊢ IsLimit (((whiskeringLeft C E D).obj F).mapCone c)\n[PROOFSTEP]\napply evaluationJointlyReflectsLimits\n[GOAL]\ncase t\nC : Type u\ninst✝³ : Category.{v₁, u} C\nD : Type u₂\ninst✝² : Category.{u, u₂} D\nE : Type u\ninst✝¹ : Category.{v₂, u} E\ninst✝ : HasLimits D\nF : C ⥤ E\nJ : Type u\nhJ : Category.{u, u} J\nK : J ⥤ E ⥤ D\nc : Cone K\nhc : IsLimit c\n⊢ (k : C) → IsLimit (((evaluation C D).obj k).mapCone (((whiskeringLeft C E D).obj F).mapCone c))\n[PROOFSTEP]\nintro Y\n[GOAL]\ncase t\nC : Type u\ninst✝³ : Category.{v₁, u} C\nD : Type u₂\ninst✝² : Category.{u, u₂} D\nE : Type u\ninst✝¹ : Category.{v₂, u} E\ninst✝ : HasLimits D\nF : C ⥤ E\nJ : Type u\nhJ : Category.{u, u} J\nK : J ⥤ E ⥤ D\nc : Cone K\nhc : IsLimit c\nY : C\n⊢ IsLimit (((evaluation C D).obj Y).mapCone (((whiskeringLeft C E D).obj F).mapCone c))\n[PROOFSTEP]\nchange IsLimit (((evaluation E D).obj (F.obj Y)).mapCone c)\n[GOAL]\ncase t\nC : Type u\ninst✝³ : Category.{v₁, u} C\nD : Type u₂\ninst✝² : Category.{u, u₂} D\nE : Type u\ninst✝¹ : Category.{v₂, u} E\ninst✝ : HasLimits D\nF : C ⥤ E\nJ : Type u\nhJ : Category.{u, u} J\nK : J ⥤ E ⥤ D\nc : Cone K\nhc : IsLimit c\nY : C\n⊢ IsLimit (((evaluation E D).obj (F.obj Y)).mapCone c)\n[PROOFSTEP]\nexact PreservesLimit.preserves hc\n[GOAL]\nC✝ : Type u\ninst✝⁸ : Category.{v₁, u} C✝\nD✝ : Type u₂\ninst✝⁷ : Category.{u, u₂} D✝\nE✝ : Type u\ninst✝⁶ : Category.{v₂, u} E✝\nC : Type u\ninst✝⁵ : Category.{?u.25923, u} C\nD : Type u_1\ninst✝⁴ : Category.{u, u_1} D\nE : Type u_2\ninst✝³ : Category.{u, u_2} E\nJ : Type u\ninst✝² : SmallCategory J\ninst✝¹ : HasLimitsOfShape J D\nF : D ⥤ E\ninst✝ : PreservesLimitsOfShape J F\nK : J ⥤ C ⥤ D\nc : Cone K\nhc : IsLimit c\n⊢ IsLimit (((whiskeringRight C D E).obj F).mapCone c)\n[PROOFSTEP]\napply evaluationJointlyReflectsLimits _ (fun k => ?_)\n[GOAL]\nC✝ : Type u\ninst✝⁸ : Category.{v₁, u} C✝\nD✝ : Type u₂\ninst✝⁷ : Category.{u, u₂} D✝\nE✝ : Type u\ninst✝⁶ : Category.{v₂, u} E✝\nC : Type u\ninst✝⁵ : Category.{?u.25923, u} C\nD : Type u_1\ninst✝⁴ : Category.{u, u_1} D\nE : Type u_2\ninst✝³ : Category.{u, u_2} E\nJ : Type u\ninst✝² : SmallCategory J\ninst✝¹ : HasLimitsOfShape J D\nF : D ⥤ E\ninst✝ : PreservesLimitsOfShape J F\nK : J ⥤ C ⥤ D\nc : Cone K\nhc : IsLimit c\nk : C\n⊢ IsLimit (((evaluation C E).obj k).mapCone (((whiskeringRight C D E).obj F).mapCone c))\n[PROOFSTEP]\nchange IsLimit (((evaluation _ _).obj k ⋙ F).mapCone c)\n[GOAL]\nC✝ : Type u\ninst✝⁸ : Category.{v₁, u} C✝\nD✝ : Type u₂\ninst✝⁷ : Category.{u, u₂} D✝\nE✝ : Type u\ninst✝⁶ : Category.{v₂, u} E✝\nC : Type u\ninst✝⁵ : Category.{?u.25923, u} C\nD : Type u_1\ninst✝⁴ : Category.{u, u_1} D\nE : Type u_2\ninst✝³ : Category.{u, u_2} E\nJ : Type u\ninst✝² : SmallCategory J\ninst✝¹ : HasLimitsOfShape J D\nF : D ⥤ E\ninst✝ : PreservesLimitsOfShape J F\nK : J ⥤ C ⥤ D\nc : Cone K\nhc : IsLimit c\nk : C\n⊢ IsLimit (((evaluation C D).obj k ⋙ F).mapCone c)\n[PROOFSTEP]\nexact PreservesLimit.preserves hc\n[GOAL]\nC✝ : Type u\ninst✝⁶ : Category.{v₁, u} C✝\nD✝ : Type u₂\ninst✝⁵ : Category.{u, u₂} D✝\nE : Type u\ninst✝⁴ : Category.{v₂, u} E\nC D : Type u\ninst✝³ : SmallCategory C\ninst✝² : SmallCategory D\nF : C ⥤ D\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : PreservesLimitsOfShape J (lan F.op)\n⊢ PreservesLimitsOfShape J F\n[PROOFSTEP]\napply @preservesLimitsOfShapeOfReflectsOfPreserves _ _ _ _ _ _ _ _ F yoneda ?_\n[GOAL]\nC✝ : Type u\ninst✝⁶ : Category.{v₁, u} C✝\nD✝ : Type u₂\ninst✝⁵ : Category.{u, u₂} D✝\nE : Type u\ninst✝⁴ : Category.{v₂, u} E\nC D : Type u\ninst✝³ : SmallCategory C\ninst✝² : SmallCategory D\nF : C ⥤ D\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : PreservesLimitsOfShape J (lan F.op)\n⊢ PreservesLimitsOfShape J (F ⋙ yoneda)\n[PROOFSTEP]\nexact preservesLimitsOfShapeOfNatIso (compYonedaIsoYonedaCompLan F).symm\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Preserves.FunctorCategory", "llama_tokens": 4756, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228891883799, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.3541938978766888}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nl : List α\nL : List (List α)\n⊢ join ↑(List.map ofList (l :: L)) = ↑(List.join (l :: L))\n[PROOFSTEP]\nsimp only [join, List.map, coe_sum, List.sum_cons, List.join, ← coe_add, ← coe_join L]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\nS : Multiset (Multiset α)\n⊢ a ∈ join 0 ↔ ∃ s, s ∈ 0 ∧ a ∈ s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\nS : Multiset (Multiset α)\n⊢ ∀ ⦃a_1 : Multiset α⦄ {s : Multiset (Multiset α)},\n    (a ∈ join s ↔ ∃ s_1, s_1 ∈ s ∧ a ∈ s_1) → (a ∈ join (a_1 ::ₘ s) ↔ ∃ s_1, s_1 ∈ a_1 ::ₘ s ∧ a ∈ s_1)\n[PROOFSTEP]\nsimp (config := { contextual := true }) [or_and_right, exists_or]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nS : Multiset (Multiset α)\n⊢ ↑card (join 0) = sum (map (↑card) 0)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nS : Multiset (Multiset α)\n⊢ ∀ ⦃a : Multiset α⦄ {s : Multiset (Multiset α)},\n    ↑card (join s) = sum (map (↑card) s) → ↑card (join (a ::ₘ s)) = sum (map (↑card) (a ::ₘ s))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nr : α → β → Prop\ns : Multiset (Multiset α)\nt : Multiset (Multiset β)\nh : Rel (Rel r) s t\n⊢ Rel r (join s) (join t)\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nr : α → β → Prop\ns : Multiset (Multiset α)\nt : Multiset (Multiset β)\n⊢ Rel r (join 0) (join 0)\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nr : α → β → Prop\ns : Multiset (Multiset α)\nt : Multiset (Multiset β)\na✝² : Multiset α\nb✝ : Multiset β\nas✝ : Multiset (Multiset α)\nbs✝ : Multiset (Multiset β)\na✝¹ : Rel r a✝² b✝\na✝ : Rel (Rel r) as✝ bs✝\na_ih✝ : Rel r (join as✝) (join bs✝)\n⊢ Rel r (join (a✝² ::ₘ as✝)) (join (b✝ ::ₘ bs✝))\n[PROOFSTEP]\ncase zero => simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nr : α → β → Prop\ns : Multiset (Multiset α)\nt : Multiset (Multiset β)\n⊢ Rel r (join 0) (join 0)\n[PROOFSTEP]\ncase zero => simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nr : α → β → Prop\ns : Multiset (Multiset α)\nt : Multiset (Multiset β)\n⊢ Rel r (join 0) (join 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nr : α → β → Prop\ns : Multiset (Multiset α)\nt : Multiset (Multiset β)\na✝² : Multiset α\nb✝ : Multiset β\nas✝ : Multiset (Multiset α)\nbs✝ : Multiset (Multiset β)\na✝¹ : Rel r a✝² b✝\na✝ : Rel (Rel r) as✝ bs✝\na_ih✝ : Rel r (join as✝) (join bs✝)\n⊢ Rel r (join (a✝² ::ₘ as✝)) (join (b✝ ::ₘ bs✝))\n[PROOFSTEP]\ncase cons a b s t hab hst ih => simpa using hab.add ih\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nr : α → β → Prop\ns✝ : Multiset (Multiset α)\nt✝ : Multiset (Multiset β)\na : Multiset α\nb : Multiset β\ns : Multiset (Multiset α)\nt : Multiset (Multiset β)\nhab : Rel r a b\nhst : Rel (Rel r) s t\nih : Rel r (join s) (join t)\n⊢ Rel r (join (a ::ₘ s)) (join (b ::ₘ t))\n[PROOFSTEP]\ncase cons a b s t hab hst ih => simpa using hab.add ih\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nr : α → β → Prop\ns✝ : Multiset (Multiset α)\nt✝ : Multiset (Multiset β)\na : Multiset α\nb : Multiset β\ns : Multiset (Multiset α)\nt : Multiset (Multiset β)\nhab : Rel r a b\nhst : Rel (Rel r) s t\nih : Rel r (join s) (join t)\n⊢ Rel r (join (a ::ₘ s)) (join (b ::ₘ t))\n[PROOFSTEP]\nsimpa using hab.add ih\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nl : List α\nf : α → List β\n⊢ (bind ↑l fun a => ↑(f a)) = ↑(List.bind l f)\n[PROOFSTEP]\nrw [List.bind, ← coe_join, List.map_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nl : List α\nf : α → List β\n⊢ (bind ↑l fun a => ↑(f a)) = join ↑(List.map (ofList ∘ f) l)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf g : α → Multiset β\n⊢ bind (a ::ₘ s) f = f a + bind s f\n[PROOFSTEP]\nsimp [bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf g : α → Multiset β\n⊢ bind {a} f = f a\n[PROOFSTEP]\nsimp [bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf g : α → Multiset β\n⊢ bind (s + t) f = bind s f + bind t f\n[PROOFSTEP]\nsimp [bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf g : α → Multiset β\n⊢ (bind s fun x => 0) = 0\n[PROOFSTEP]\nsimp [bind, join, nsmul_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf g : α → Multiset β\n⊢ (bind s fun a => f a + g a) = bind s f + bind s g\n[PROOFSTEP]\nsimp [bind, join]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g✝ : α → Multiset β\nf : α → β\ng : α → Multiset β\n⊢ (bind 0 fun a => f a ::ₘ g a) = map f 0 + bind 0 g\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g✝ : α → Multiset β\nf : α → β\ng : α → Multiset β\n⊢ ∀ ⦃a : α⦄ {s : Multiset α},\n    (bind s fun a => f a ::ₘ g a) = map f s + bind s g →\n      (bind (a ::ₘ s) fun a => f a ::ₘ g a) = map f (a ::ₘ s) + bind (a ::ₘ s) g\n[PROOFSTEP]\nsimp (config := { contextual := true }) [add_comm, add_left_comm, add_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nf : α → β\n⊢ (bind 0 fun x => {f x}) = map f 0\n[PROOFSTEP]\nrw [zero_bind, map_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nf : α → β\n⊢ ∀ ⦃a : α⦄ {s : Multiset α}, (bind s fun x => {f x}) = map f s → (bind (a ::ₘ s) fun x => {f x}) = map f (a ::ₘ s)\n[PROOFSTEP]\nsimp [singleton_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns✝ t : Multiset α\nf✝ g : α → Multiset β\nb : β\ns : Multiset α\nf : α → Multiset β\n⊢ b ∈ bind s f ↔ ∃ a, a ∈ s ∧ b ∈ f a\n[PROOFSTEP]\nsimp [bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf g : α → Multiset β\n⊢ ↑card (bind s f) = sum (map (↑card ∘ f) s)\n[PROOFSTEP]\nsimp [bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g✝ f g : α → Multiset β\nm : Multiset α\n⊢ (∀ (a : α), a ∈ m → f a = g a) → bind m f = bind m g\n[PROOFSTEP]\nsimp (config := { contextual := true }) [bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nβ' : Type u_2\nm : Multiset α\nf : α → Multiset β\nf' : α → Multiset β'\nh : β = β'\nhf : ∀ (a : α), a ∈ m → HEq (f a) (f' a)\n⊢ HEq (bind m f) (bind m f')\n[PROOFSTEP]\nsubst h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nm : Multiset α\nf f' : α → Multiset β\nhf : ∀ (a : α), a ∈ m → HEq (f a) (f' a)\n⊢ HEq (bind m f) (bind m f')\n[PROOFSTEP]\nsimp only [heq_eq_eq] at hf \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nm : Multiset α\nf f' : α → Multiset β\nhf : ∀ (a : α), a ∈ m → f a = f' a\n⊢ HEq (bind m f) (bind m f')\n[PROOFSTEP]\nsimp [bind_congr hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nm : Multiset α\nn : α → Multiset β\nf : β → γ\n⊢ map f (bind 0 n) = bind 0 fun a => map f (n a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nm : Multiset α\nn : α → Multiset β\nf : β → γ\n⊢ ∀ ⦃a : α⦄ {s : Multiset α},\n    (map f (bind s n) = bind s fun a => map f (n a)) → map f (bind (a ::ₘ s) n) = bind (a ::ₘ s) fun a => map f (n a)\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nm : Multiset α\nn : β → Multiset γ\nf : α → β\n⊢ bind (map f 0) n = bind 0 fun a => n (f a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nm : Multiset α\nn : β → Multiset γ\nf : α → β\n⊢ ∀ ⦃a : α⦄ {s : Multiset α},\n    (bind (map f s) n = bind s fun a => n (f a)) → bind (map f (a ::ₘ s)) n = bind (a ::ₘ s) fun a => n (f a)\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns✝ t : Multiset α\nf✝ g✝ : α → Multiset β\ns : Multiset α\nf : α → Multiset β\ng : β → Multiset γ\n⊢ bind (bind 0 f) g = bind 0 fun a => bind (f a) g\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns✝ t : Multiset α\nf✝ g✝ : α → Multiset β\ns : Multiset α\nf : α → Multiset β\ng : β → Multiset γ\n⊢ ∀ ⦃a : α⦄ {s : Multiset α},\n    (bind (bind s f) g = bind s fun a => bind (f a) g) →\n      bind (bind (a ::ₘ s) f) g = bind (a ::ₘ s) fun a => bind (f a) g\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nm : Multiset α\nn : Multiset β\nf : α → β → Multiset γ\n⊢ (bind 0 fun a => bind n fun b => f a b) = bind n fun b => bind 0 fun a => f a b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nm : Multiset α\nn : Multiset β\nf : α → β → Multiset γ\n⊢ ∀ ⦃a : α⦄ {s : Multiset α},\n    ((bind s fun a => bind n fun b => f a b) = bind n fun b => bind s fun a => f a b) →\n      (bind (a ::ₘ s) fun a => bind n fun b => f a b) = bind n fun b => bind (a ::ₘ s) fun a => f a b\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nm : Multiset α\nn : Multiset β\nf : α → β → γ\n⊢ (bind 0 fun a => map (fun b => f a b) n) = bind n fun b => map (fun a => f a b) 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns t : Multiset α\nf✝ g : α → Multiset β\nm : Multiset α\nn : Multiset β\nf : α → β → γ\n⊢ ∀ ⦃a : α⦄ {s : Multiset α},\n    ((bind s fun a => map (fun b => f a b) n) = bind n fun b => map (fun a => f a b) s) →\n      (bind (a ::ₘ s) fun a => map (fun b => f a b) n) = bind n fun b => map (fun a => f a b) (a ::ₘ s)\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns✝ t✝ : Multiset α\nf g : α → Multiset β\ninst✝ : CommMonoid β\ns : Multiset α\nt : α → Multiset β\n⊢ prod (bind 0 t) = prod (map (fun a => prod (t a)) 0)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na✝ : α\ns✝¹ t✝ : Multiset α\nf g : α → Multiset β\ninst✝ : CommMonoid β\ns✝ : Multiset α\nt : α → Multiset β\na : α\ns : Multiset α\nih : prod (bind s t) = prod (map (fun a => prod (t a)) s)\n⊢ prod (bind (a ::ₘ s) t) = prod (map (fun a => prod (t a)) (a ::ₘ s))\n[PROOFSTEP]\nsimp [ih, cons_bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns✝ t✝ : Multiset α\nf✝ g✝ : α → Multiset β\nr : α → β → Prop\np : γ → δ → Prop\ns : Multiset α\nt : Multiset β\nf : α → Multiset γ\ng : β → Multiset δ\nh : (r ⇒ Rel p) f g\nhst : Rel r s t\n⊢ Rel p (bind s f) (bind t g)\n[PROOFSTEP]\napply rel_join\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns✝ t✝ : Multiset α\nf✝ g✝ : α → Multiset β\nr : α → β → Prop\np : γ → δ → Prop\ns : Multiset α\nt : Multiset β\nf : α → Multiset γ\ng : β → Multiset δ\nh : (r ⇒ Rel p) f g\nhst : Rel r s t\n⊢ Rel (Rel p) (map f s) (map g t)\n[PROOFSTEP]\nrw [rel_map]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\ns✝ t✝ : Multiset α\nf✝ g✝ : α → Multiset β\nr : α → β → Prop\np : γ → δ → Prop\ns : Multiset α\nt : Multiset β\nf : α → Multiset γ\ng : β → Multiset δ\nh : (r ⇒ Rel p) f g\nhst : Rel r s t\n⊢ Rel (fun a b => Rel p (f a) (g b)) s t\n[PROOFSTEP]\nexact hst.mono fun a _ b _ hr => h hr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na✝ : α\ns t : Multiset α\nf✝ g : α → Multiset β\ninst✝ : DecidableEq α\nm : Multiset β\nf : β → Multiset α\na : α\n⊢ count a (sum (map f 0)) = sum (map (fun b => count a (f b)) 0)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na✝ : α\ns t : Multiset α\nf✝ g : α → Multiset β\ninst✝ : DecidableEq α\nm : Multiset β\nf : β → Multiset α\na : α\n⊢ ∀ ⦃a_1 : β⦄ {s : Multiset β},\n    count a (sum (map f s)) = sum (map (fun b => count a (f b)) s) →\n      count a (sum (map f (a_1 ::ₘ s))) = sum (map (fun b => count a (f b)) (a_1 ::ₘ s))\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α✝\ns t : Multiset α✝\nf✝ g : α✝ → Multiset β✝\nα : Type u_5\nβ : Type u_6\nf : α → Multiset β\nS : Multiset α\nx : α\nhx : x ∈ S\n⊢ f x ≤ bind S f\n[PROOFSTEP]\nclassical\nrw [le_iff_count]\nintro a\nrw [count_bind]\napply le_sum_of_mem\nrw [mem_map]\nexact ⟨x, hx, rfl⟩\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α✝\ns t : Multiset α✝\nf✝ g : α✝ → Multiset β✝\nα : Type u_5\nβ : Type u_6\nf : α → Multiset β\nS : Multiset α\nx : α\nhx : x ∈ S\n⊢ f x ≤ bind S f\n[PROOFSTEP]\nrw [le_iff_count]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α✝\ns t : Multiset α✝\nf✝ g : α✝ → Multiset β✝\nα : Type u_5\nβ : Type u_6\nf : α → Multiset β\nS : Multiset α\nx : α\nhx : x ∈ S\n⊢ ∀ (a : β), count a (f x) ≤ count a (bind S f)\n[PROOFSTEP]\nintro a\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\na✝ : α✝\ns t : Multiset α✝\nf✝ g : α✝ → Multiset β✝\nα : Type u_5\nβ : Type u_6\nf : α → Multiset β\nS : Multiset α\nx : α\nhx : x ∈ S\na : β\n⊢ count a (f x) ≤ count a (bind S f)\n[PROOFSTEP]\nrw [count_bind]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\na✝ : α✝\ns t : Multiset α✝\nf✝ g : α✝ → Multiset β✝\nα : Type u_5\nβ : Type u_6\nf : α → Multiset β\nS : Multiset α\nx : α\nhx : x ∈ S\na : β\n⊢ count a (f x) ≤ sum (map (fun b => count a (f b)) S)\n[PROOFSTEP]\napply le_sum_of_mem\n[GOAL]\ncase h\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\na✝ : α✝\ns t : Multiset α✝\nf✝ g : α✝ → Multiset β✝\nα : Type u_5\nβ : Type u_6\nf : α → Multiset β\nS : Multiset α\nx : α\nhx : x ∈ S\na : β\n⊢ count a (f x) ∈ map (fun b => count a (f b)) S\n[PROOFSTEP]\nrw [mem_map]\n[GOAL]\ncase h\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\na✝ : α✝\ns t : Multiset α✝\nf✝ g : α✝ → Multiset β✝\nα : Type u_5\nβ : Type u_6\nf : α → Multiset β\nS : Multiset α\nx : α\nhx : x ∈ S\na : β\n⊢ ∃ a_1, a_1 ∈ S ∧ count a (f a_1) = count a (f x)\n[PROOFSTEP]\nexact ⟨x, hx, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\nb : β\ns : Multiset α\nt : Multiset β\nl₁ : List α\nl₂ : List β\n⊢ ↑l₁ ×ˢ ↑l₂ = ↑(l₁ ×ˢ l₂)\n[PROOFSTEP]\ndsimp only [SProd.sprod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\nb : β\ns : Multiset α\nt : Multiset β\nl₁ : List α\nl₂ : List β\n⊢ product ↑l₁ ↑l₂ = ↑(List.product l₁ l₂)\n[PROOFSTEP]\nrw [product, List.product, ← coe_bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\nb : β\ns : Multiset α\nt : Multiset β\nl₁ : List α\nl₂ : List β\n⊢ (bind ↑l₁ fun a => map (Prod.mk a) ↑l₂) = bind ↑l₁ fun a => ↑(List.map (Prod.mk a) l₂)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\nb : β\ns : Multiset α\nt : Multiset β\n⊢ (a ::ₘ s) ×ˢ t = map (Prod.mk a) t + s ×ˢ t\n[PROOFSTEP]\nsimp [SProd.sprod, product]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\nb : β\ns : Multiset α\nt : Multiset β\n⊢ s ×ˢ 0 = 0\n[PROOFSTEP]\nsimp [SProd.sprod, product]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\nb : β\ns : Multiset α\nt : Multiset β\n⊢ s ×ˢ (b ::ₘ t) = map (fun a => (a, b)) s + s ×ˢ t\n[PROOFSTEP]\nsimp [SProd.sprod, product]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\nb : β\ns : Multiset α\nt : Multiset β\n⊢ {a} ×ˢ {b} = {(a, b)}\n[PROOFSTEP]\nsimp only [SProd.sprod, product, bind_singleton, map_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\nb : β\ns✝ : Multiset α\nt✝ : Multiset β\ns t : Multiset α\nu : Multiset β\n⊢ (s + t) ×ˢ u = s ×ˢ u + t ×ˢ u\n[PROOFSTEP]\nsimp [SProd.sprod, product]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na✝ : α\nb : β\ns✝¹ : Multiset α\nt✝ : Multiset β\ns✝ : Multiset α\na : α\ns : Multiset α\nIH : ∀ (t u : Multiset β), s ×ˢ (t + u) = s ×ˢ t + s ×ˢ u\nt u : Multiset β\n⊢ (a ::ₘ s) ×ˢ (t + u) = (a ::ₘ s) ×ˢ t + (a ::ₘ s) ×ˢ u\n[PROOFSTEP]\nrw [cons_product, IH]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na✝ : α\nb : β\ns✝¹ : Multiset α\nt✝ : Multiset β\ns✝ : Multiset α\na : α\ns : Multiset α\nIH : ∀ (t u : Multiset β), s ×ˢ (t + u) = s ×ˢ t + s ×ˢ u\nt u : Multiset β\n⊢ map (Prod.mk a) (t + u) + (s ×ˢ t + s ×ˢ u) = (a ::ₘ s) ×ˢ t + (a ::ₘ s) ×ˢ u\n[PROOFSTEP]\nsimp [add_comm, add_left_comm, add_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na✝ : α\nb✝ : β\ns✝ : Multiset α\nt✝ : Multiset β\ns : Multiset α\nt : Multiset β\na : α\nb : β\n⊢ (a, b) ∈ product s t ↔ (a, b).fst ∈ s ∧ (a, b).snd ∈ t\n[PROOFSTEP]\nsimp [product, and_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\na : α\nb : β\ns : Multiset α\nt : Multiset β\n⊢ ↑card (s ×ˢ t) = ↑card s * ↑card t\n[PROOFSTEP]\nsimp [SProd.sprod, product]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nσ : α → Type u_5\na : α\ns : Multiset α\nt : (a : α) → Multiset (σ a)\nl₁ : List α\nl₂ : (a : α) → List (σ a)\n⊢ (Multiset.sigma ↑l₁ fun a => ↑(l₂ a)) = ↑(List.sigma l₁ l₂)\n[PROOFSTEP]\nrw [Multiset.sigma, List.sigma, ← coe_bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nσ : α → Type u_5\na : α\ns : Multiset α\nt : (a : α) → Multiset (σ a)\nl₁ : List α\nl₂ : (a : α) → List (σ a)\n⊢ (bind ↑l₁ fun a => map (Sigma.mk a) ↑(l₂ a)) = bind ↑l₁ fun a => ↑(List.map (Sigma.mk a) (l₂ a))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nσ : α → Type u_5\na : α\ns : Multiset α\nt : (a : α) → Multiset (σ a)\n⊢ Multiset.sigma (a ::ₘ s) t = map (Sigma.mk a) (t a) + Multiset.sigma s t\n[PROOFSTEP]\nsimp [Multiset.sigma]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nσ : α → Type u_5\na : α\ns✝ : Multiset α\nt✝ : (a : α) → Multiset (σ a)\ns t : Multiset α\nu : (a : α) → Multiset (σ a)\n⊢ Multiset.sigma (s + t) u = Multiset.sigma s u + Multiset.sigma t u\n[PROOFSTEP]\nsimp [Multiset.sigma]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nσ : α → Type u_5\na✝ : α\ns✝ : Multiset α\nt✝ : (a : α) → Multiset (σ a)\na : α\ns : Multiset α\nIH : ∀ (t u : (a : α) → Multiset (σ a)), (Multiset.sigma s fun a => t a + u a) = Multiset.sigma s t + Multiset.sigma s u\nt u : (a : α) → Multiset (σ a)\n⊢ (Multiset.sigma (a ::ₘ s) fun a => t a + u a) = Multiset.sigma (a ::ₘ s) t + Multiset.sigma (a ::ₘ s) u\n[PROOFSTEP]\nrw [cons_sigma, IH]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nσ : α → Type u_5\na✝ : α\ns✝ : Multiset α\nt✝ : (a : α) → Multiset (σ a)\na : α\ns : Multiset α\nIH : ∀ (t u : (a : α) → Multiset (σ a)), (Multiset.sigma s fun a => t a + u a) = Multiset.sigma s t + Multiset.sigma s u\nt u : (a : α) → Multiset (σ a)\n⊢ map (Sigma.mk a) (t a + u a) + ((Multiset.sigma s fun a => t a) + Multiset.sigma s fun a => u a) =\n    Multiset.sigma (a ::ₘ s) t + Multiset.sigma (a ::ₘ s) u\n[PROOFSTEP]\nsimp [add_comm, add_left_comm, add_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nσ : α → Type u_5\na✝ : α\ns✝ : Multiset α\nt✝ : (a : α) → Multiset (σ a)\ns : Multiset α\nt : (a : α) → Multiset (σ a)\na : α\nb : σ a\n⊢ { fst := a, snd := b } ∈ Multiset.sigma s t ↔\n    { fst := a, snd := b }.fst ∈ s ∧ { fst := a, snd := b }.snd ∈ t { fst := a, snd := b }.fst\n[PROOFSTEP]\nsimp [Multiset.sigma, and_assoc, and_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nσ : α → Type u_5\na : α\ns : Multiset α\nt : (a : α) → Multiset (σ a)\n⊢ ↑card (Multiset.sigma s t) = sum (map (fun a => ↑card (t a)) s)\n[PROOFSTEP]\nsimp [Multiset.sigma, (· ∘ ·)]\n", "meta": {"mathlib_filename": "Mathlib.Data.Multiset.Bind", "llama_tokens": 10672, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.35419389073933955}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List α\nf : α → β\n⊢ range (map f) = {l | ∀ (x : β), x ∈ l → x ∈ range f}\n[PROOFSTEP]\nrefine' antisymm (range_subset_iff.2 fun l => forall_mem_map_iff.2 fun y _ => mem_range_self _) fun l hl => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl✝ : List α\nf : α → β\nl : List β\nhl : l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}\n⊢ l ∈ range (map f)\n[PROOFSTEP]\ninduction' l with a l ihl\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nl✝ : List α\nf : α → β\nl : List β\nhl✝ : l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}\nhl : [] ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}\n⊢ [] ∈ range (map f)\n[PROOFSTEP]\nexact ⟨[], rfl⟩\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nl✝¹ : List α\nf : α → β\nl✝ : List β\nhl✝ : l✝ ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}\na : β\nl : List β\nihl : l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f} → l ∈ range (map f)\nhl : a :: l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}\n⊢ a :: l ∈ range (map f)\n[PROOFSTEP]\nrcases ihl fun x hx => hl x <| subset_cons _ _ hx with ⟨l, rfl⟩\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nl✝¹ : List α\nf : α → β\nl✝ : List β\nhl✝ : l✝ ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}\na : β\nl : List α\nihl : map f l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f} → map f l ∈ range (map f)\nhl : a :: map f l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}\n⊢ a :: map f l ∈ range (map f)\n[PROOFSTEP]\nrcases hl a (mem_cons_self _ _) with ⟨a, rfl⟩\n[GOAL]\ncase cons.intro.intro\nα : Type u_1\nβ : Type u_2\nl✝¹ : List α\nf : α → β\nl✝ : List β\nhl✝ : l✝ ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}\nl : List α\nihl : map f l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f} → map f l ∈ range (map f)\na : α\nhl : f a :: map f l ∈ {l | ∀ (x : β), x ∈ l → x ∈ range f}\n⊢ f a :: map f l ∈ range (map f)\n[PROOFSTEP]\nexact ⟨a :: l, map_cons _ _ _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List α\ns : Set α\n⊢ range (map Subtype.val) = {l | ∀ (x : α), x ∈ l → x ∈ s}\n[PROOFSTEP]\nrw [range_list_map, Subtype.range_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List α\n⊢ (range fun k => nthLe l ↑k (_ : ↑k < length l)) = {x | x ∈ l}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nl : List α\nx : α\n⊢ (x ∈ range fun k => nthLe l ↑k (_ : ↑k < length l)) ↔ x ∈ {x | x ∈ l}\n[PROOFSTEP]\nrw [mem_setOf_eq, mem_iff_get]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nl : List α\nx : α\n⊢ (x ∈ range fun k => nthLe l ↑k (_ : ↑k < length l)) ↔ ∃ n, List.get l n = x\n[PROOFSTEP]\nexact ⟨fun ⟨⟨n, h₁⟩, h₂⟩ => ⟨⟨n, h₁⟩, h₂⟩, fun ⟨⟨n, h₁⟩, h₂⟩ => ⟨⟨n, h₁⟩, h₂⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List α\n⊢ range (get? l) = insert none (some '' {x | x ∈ l})\n[PROOFSTEP]\nrw [← range_list_nthLe, ← range_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List α\n⊢ range (get? l) = insert none (range (some ∘ fun k => nthLe l ↑k (_ : ↑k < length l)))\n[PROOFSTEP]\nrefine' (range_subset_iff.2 fun n => _).antisymm (insert_subset_iff.2 ⟨_, _⟩)\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nl : List α\nn : ℕ\n⊢ get? l n ∈ insert none (range (some ∘ fun k => nthLe l ↑k (_ : ↑k < length l)))\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nl : List α\n⊢ none ∈ range (get? l)\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nl : List α\n⊢ range (some ∘ fun k => nthLe l ↑k (_ : ↑k < length l)) ⊆ range (get? l)\n[PROOFSTEP]\nexacts [(le_or_lt l.length n).imp get?_eq_none.2 (fun hlt => ⟨⟨_, hlt⟩, (get?_eq_get hlt).symm⟩),\n  ⟨_, get?_eq_none.2 le_rfl⟩, range_subset_iff.2 <| fun k => ⟨_, get?_eq_get _⟩]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List α\nd : α\n⊢ (range fun n => getD l n d) = (fun o => Option.getD o d) '' range (get? l)\n[PROOFSTEP]\nsimp only [← range_comp, (· ∘ ·), getD_eq_getD_get?]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List α\nd : α\n⊢ (fun o => Option.getD o d) '' range (get? l) = insert d {x | x ∈ l}\n[PROOFSTEP]\nsimp only [range_list_get?, image_insert_eq, Option.getD, image_image, image_id']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl✝ : List α\nc : β → α\np : α → Prop\ninst✝ : CanLift α β c p\nl : List α\nH : ∀ (x : α), x ∈ l → p x\n⊢ ∃ y, map c y = l\n[PROOFSTEP]\nrw [← Set.mem_range, Set.range_list_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl✝ : List α\nc : β → α\np : α → Prop\ninst✝ : CanLift α β c p\nl : List α\nH : ∀ (x : α), x ∈ l → p x\n⊢ l ∈ {l | ∀ (x : α), x ∈ l → x ∈ Set.range c}\n[PROOFSTEP]\nexact fun a ha => CanLift.prf a (H a ha)\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.List", "llama_tokens": 2208, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5964331319177487, "lm_q2_score": 0.5926665999540698, "lm_q1q2_score": 0.3534859963936493}}
{"text": "[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n⊢ spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖\n[PROOFSTEP]\nrcases subsingleton_or_nontrivial A with ⟨⟩\n[GOAL]\ncase inl\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh✝ : Subsingleton A\n⊢ spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖\n[PROOFSTEP]\nsimp only [spectrum.of_subsingleton, Set.empty_subset]\n[GOAL]\ncase inr\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh✝ : Nontrivial A\n⊢ spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖\n[PROOFSTEP]\nset a' : elementalStarAlgebra ℂ a := ⟨a, self_mem ℂ a⟩\n[GOAL]\ncase inr\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\n⊢ spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖\n[PROOFSTEP]\nrefine' (spectrum.subset_starSubalgebra (star a' * a')).trans _\n[GOAL]\ncase inr\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\n⊢ spectrum ℂ (star a' * a') ⊆ Set.Icc 0 ↑‖star a * a‖\n[PROOFSTEP]\nrw [← spectrum.gelfandTransform_eq (star a' * a'), ContinuousMap.spectrum_eq_range]\n[GOAL]\ncase inr\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\n⊢ Set.range ↑(↑(gelfandTransform ℂ { x // x ∈ elementalStarAlgebra ℂ a }) (star a' * a')) ⊆ Set.Icc 0 ↑‖star a * a‖\n[PROOFSTEP]\nrintro - ⟨φ, rfl⟩\n[GOAL]\ncase inr.intro\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nφ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })\n⊢ ↑(↑(gelfandTransform ℂ { x // x ∈ elementalStarAlgebra ℂ a }) (star a' * a')) φ ∈ Set.Icc 0 ↑‖star a * a‖\n[PROOFSTEP]\nrw [gelfandTransform_apply_apply ℂ _ (star a' * a') φ, map_mul φ, map_star φ]\n[GOAL]\ncase inr.intro\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nφ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })\n⊢ star (↑φ a') * ↑φ a' ∈ Set.Icc 0 ↑‖star a * a‖\n[PROOFSTEP]\nrw [Complex.eq_coe_norm_of_nonneg (star_mul_self_nonneg _), ← map_star, ← map_mul]\n[GOAL]\ncase inr.intro\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nφ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })\n⊢ ↑‖↑φ (star a' * a')‖ ∈ Set.Icc 0 ↑‖star a * a‖\n[PROOFSTEP]\nexact ⟨Complex.zero_le_real.2 (norm_nonneg _), Complex.real_le_real.2 (AlgHom.norm_apply_le_self φ (star a' * a'))⟩\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh : IsUnit a\n⊢ IsUnit { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\n[PROOFSTEP]\nnontriviality A\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh : IsUnit a\n✝ : Nontrivial A\n⊢ IsUnit { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\n[PROOFSTEP]\nset a' : elementalStarAlgebra ℂ a := ⟨a, self_mem ℂ a⟩\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh : IsUnit a\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\n⊢ IsUnit a'\n[PROOFSTEP]\nsuffices : IsUnit (star a' * a')\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh : IsUnit a\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nthis : IsUnit (star a' * a')\n⊢ IsUnit a'\ncase this\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh : IsUnit a\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\n⊢ IsUnit (star a' * a')\n[PROOFSTEP]\nexact (IsUnit.mul_iff.1 this).2\n[GOAL]\ncase this\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nh : IsUnit a\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\n⊢ IsUnit (star a' * a')\n[PROOFSTEP]\nreplace h :=\n  (show Commute (star a) a from star_comm_self' a).isUnit_mul_iff.2\n    ⟨h.star, h⟩\n      /- Since `a` is invertible, `‖star a * a‖ ≠ 0`, so `‖star a * a‖ • 1` is invertible in\n          `elementalStarAlgebra ℂ a`, and so it suffices to show that the distance between this unit and\n          `star a * a` is less than `‖star a * a‖`. -/\n[GOAL]\ncase this\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\n⊢ IsUnit (star a' * a')\n[PROOFSTEP]\nhave h₁ : (‖star a * a‖ : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr (norm_ne_zero_iff.mpr h.ne_zero)\n[GOAL]\ncase this\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\n⊢ IsUnit (star a' * a')\n[PROOFSTEP]\nset u : Units (elementalStarAlgebra ℂ a) :=\n  Units.map (algebraMap ℂ (elementalStarAlgebra ℂ a)).toMonoidHom (Units.mk0 _ h₁)\n[GOAL]\ncase this\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\n⊢ IsUnit (star a' * a')\n[PROOFSTEP]\nrefine' ⟨u.ofNearby _ _, rfl⟩\n[GOAL]\ncase this\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\n⊢ ‖star a' * a' - ↑u‖ < ‖↑u⁻¹‖⁻¹\n[PROOFSTEP]\nsimp only [Units.coe_map, Units.val_inv_eq_inv_val, RingHom.toMonoidHom_eq_coe, Units.val_mk0, Units.coe_map_inv,\n  MonoidHom.coe_coe, norm_algebraMap', norm_inv, Complex.norm_eq_abs, Complex.abs_ofReal, abs_norm, inv_inv]\n  --RingHom.coe_monoidHom,\n      -- Complex.abs_ofReal, map_inv₀,\n    --rw [norm_algebraMap', inv_inv, Complex.norm_eq_abs, abs_norm]I-\n    /- Since `a` is invertible, by `spectrum_star_mul_self_of_isStarNormal`, the spectrum (in `A`)\n      of `star a * a` is contained in the half-open interval `(0, ‖star a * a‖]`. Therefore, by basic\n      spectral mapping properties, the spectrum of `‖star a * a‖ • 1 - star a * a` is contained in\n      `[0, ‖star a * a‖)`. -/\n[GOAL]\ncase this\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\n⊢ ‖star { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } *\n          { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } -\n        ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a }) ↑‖star a * a‖‖ <\n    ‖star a * a‖\n[PROOFSTEP]\nhave h₂ : ∀ z ∈ spectrum ℂ (algebraMap ℂ A ‖star a * a‖ - star a * a), ‖z‖₊ < ‖star a * a‖₊ :=\n  by\n  intro z hz\n  rw [← spectrum.singleton_sub_eq, Set.singleton_sub] at hz \n  have h₃ : z ∈ Set.Icc (0 : ℂ) ‖star a * a‖ :=\n    by\n    replace hz := Set.image_subset _ (spectrum_star_mul_self_of_isStarNormal a) hz\n    rwa [Set.image_const_sub_Icc, sub_self, sub_zero] at hz \n  refine' lt_of_le_of_ne (Complex.real_le_real.1 <| Complex.eq_coe_norm_of_nonneg h₃.1 ▸ h₃.2) _\n  · intro hz'\n    replace hz' := congr_arg (fun x : ℝ≥0 => ((x : ℝ) : ℂ)) hz'\n    simp only [coe_nnnorm] at hz' \n    rw [← Complex.eq_coe_norm_of_nonneg h₃.1] at hz' \n    obtain ⟨w, hw₁, hw₂⟩ := hz\n    refine' (spectrum.zero_not_mem_iff ℂ).mpr h _\n    rw [hz', sub_eq_self] at hw₂ \n    rwa [hw₂] at hw₁ \n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\n⊢ ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊\n[PROOFSTEP]\nintro z hz\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nhz : z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a)\n⊢ ‖z‖₊ < ‖star a * a‖₊\n[PROOFSTEP]\nrw [← spectrum.singleton_sub_eq, Set.singleton_sub] at hz \n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nhz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)\n⊢ ‖z‖₊ < ‖star a * a‖₊\n[PROOFSTEP]\nhave h₃ : z ∈ Set.Icc (0 : ℂ) ‖star a * a‖ :=\n  by\n  replace hz := Set.image_subset _ (spectrum_star_mul_self_of_isStarNormal a) hz\n  rwa [Set.image_const_sub_Icc, sub_self, sub_zero] at hz \n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nhz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)\n⊢ z ∈ Set.Icc 0 ↑‖star a * a‖\n[PROOFSTEP]\nreplace hz := Set.image_subset _ (spectrum_star_mul_self_of_isStarNormal a) hz\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nhz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' Set.Icc 0 ↑‖star a * a‖\n⊢ z ∈ Set.Icc 0 ↑‖star a * a‖\n[PROOFSTEP]\nrwa [Set.image_const_sub_Icc, sub_self, sub_zero] at hz \n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nhz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)\nh₃ : z ∈ Set.Icc 0 ↑‖star a * a‖\n⊢ ‖z‖₊ < ‖star a * a‖₊\n[PROOFSTEP]\nrefine' lt_of_le_of_ne (Complex.real_le_real.1 <| Complex.eq_coe_norm_of_nonneg h₃.1 ▸ h₃.2) _\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nhz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)\nh₃ : z ∈ Set.Icc 0 ↑‖star a * a‖\n⊢ ‖z‖₊ ≠ ‖star a * a‖₊\n[PROOFSTEP]\nintro hz'\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nhz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)\nh₃ : z ∈ Set.Icc 0 ↑‖star a * a‖\nhz' : ‖z‖₊ = ‖star a * a‖₊\n⊢ False\n[PROOFSTEP]\nreplace hz' := congr_arg (fun x : ℝ≥0 => ((x : ℝ) : ℂ)) hz'\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nhz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)\nh₃ : z ∈ Set.Icc 0 ↑‖star a * a‖\nhz' : (fun x => ↑↑x) ‖z‖₊ = (fun x => ↑↑x) ‖star a * a‖₊\n⊢ False\n[PROOFSTEP]\nsimp only [coe_nnnorm] at hz' \n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nhz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)\nh₃ : z ∈ Set.Icc 0 ↑‖star a * a‖\nhz' : ↑‖z‖ = ↑‖star a * a‖\n⊢ False\n[PROOFSTEP]\nrw [← Complex.eq_coe_norm_of_nonneg h₃.1] at hz' \n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nhz : z ∈ (fun x x_1 => x - x_1) ↑‖star a * a‖ '' spectrum ℂ (star a * a)\nh₃ : z ∈ Set.Icc 0 ↑‖star a * a‖\nhz' : z = ↑‖star a * a‖\n⊢ False\n[PROOFSTEP]\nobtain ⟨w, hw₁, hw₂⟩ := hz\n[GOAL]\ncase intro.intro\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nh₃ : z ∈ Set.Icc 0 ↑‖star a * a‖\nhz' : z = ↑‖star a * a‖\nw : ℂ\nhw₁ : w ∈ spectrum ℂ (star a * a)\nhw₂ : (fun x x_1 => x - x_1) (↑‖star a * a‖) w = z\n⊢ False\n[PROOFSTEP]\nrefine' (spectrum.zero_not_mem_iff ℂ).mpr h _\n[GOAL]\ncase intro.intro\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nh₃ : z ∈ Set.Icc 0 ↑‖star a * a‖\nhz' : z = ↑‖star a * a‖\nw : ℂ\nhw₁ : w ∈ spectrum ℂ (star a * a)\nhw₂ : (fun x x_1 => x - x_1) (↑‖star a * a‖) w = z\n⊢ 0 ∈ spectrum ℂ (star a * a)\n[PROOFSTEP]\nrw [hz', sub_eq_self] at hw₂ \n[GOAL]\ncase intro.intro\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nz : ℂ\nh₃ : z ∈ Set.Icc 0 ↑‖star a * a‖\nhz' : z = ↑‖star a * a‖\nw : ℂ\nhw₁ : w ∈ spectrum ℂ (star a * a)\nhw₂ : w = 0\n⊢ 0 ∈ spectrum ℂ (star a * a)\n[PROOFSTEP]\nrwa [hw₂] at hw₁ \n[GOAL]\ncase this\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nh₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊\n⊢ ‖star { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } *\n          { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } -\n        ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a }) ↑‖star a * a‖‖ <\n    ‖star a * a‖\n[PROOFSTEP]\nexact\n  ENNReal.coe_lt_coe.1\n    (calc\n      (‖star a' * a' - algebraMap ℂ _ ‖star a * a‖‖₊ : ℝ≥0∞) = ‖algebraMap ℂ A ‖star a * a‖ - star a * a‖₊ := by\n        rw [← nnnorm_neg, neg_sub]; rfl\n      _ = spectralRadius ℂ (algebraMap ℂ A ‖star a * a‖ - star a * a) :=\n        by\n        refine' (IsSelfAdjoint.spectralRadius_eq_nnnorm _).symm\n        rw [IsSelfAdjoint, star_sub, star_mul, star_star, ← algebraMap_star_comm]\n        congr!\n        exact IsROrC.conj_ofReal _\n      _ < ‖star a * a‖₊ := spectrum.spectralRadius_lt_of_forall_lt _ h₂)\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nh₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊\n⊢ ↑‖star a' * a' - ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a }) ↑‖star a * a‖‖₊ =\n    ↑‖↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a‖₊\n[PROOFSTEP]\nrw [← nnnorm_neg, neg_sub]\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nh₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊\n⊢ ↑‖↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a }) ↑‖star a * a‖ - star a' * a'‖₊ =\n    ↑‖↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a‖₊\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nh₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊\n⊢ ↑‖↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a‖₊ = spectralRadius ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a)\n[PROOFSTEP]\nrefine' (IsSelfAdjoint.spectralRadius_eq_nnnorm _).symm\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nh₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊\n⊢ IsSelfAdjoint (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a)\n[PROOFSTEP]\nrw [IsSelfAdjoint, star_sub, star_mul, star_star, ← algebraMap_star_comm]\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nh₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊\n⊢ ↑(algebraMap ℂ A) (star ↑‖star a * a‖) - star a * a = ↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a\n[PROOFSTEP]\ncongr!\n[GOAL]\ncase h.e'_5.h.e'_6\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n✝ : Nontrivial A\na' : { x // x ∈ elementalStarAlgebra ℂ a } := { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\nh : IsUnit (star a * a)\nh₁ : ↑‖star a * a‖ ≠ 0\nu : { x // x ∈ elementalStarAlgebra ℂ a }ˣ :=\n  ↑(Units.map ↑(algebraMap ℂ { x // x ∈ elementalStarAlgebra ℂ a })) (Units.mk0 (↑‖star a * a‖) h₁)\nh₂ : ∀ (z : ℂ), z ∈ spectrum ℂ (↑(algebraMap ℂ A) ↑‖star a * a‖ - star a * a) → ‖z‖₊ < ‖star a * a‖₊\n⊢ star ↑‖star a * a‖ = ↑‖star a * a‖\n[PROOFSTEP]\nexact IsROrC.conj_ofReal _\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : A\nh : IsUnit x\nhxS : x ∈ S\n⊢ ↑(IsUnit.unit h)⁻¹ ∈ S\n[PROOFSTEP]\nhave hx := h.star.mul h\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : A\nh : IsUnit x\nhxS : x ∈ S\nhx : IsUnit (star x * x)\n⊢ ↑(IsUnit.unit h)⁻¹ ∈ S\n[PROOFSTEP]\nsuffices this : (↑hx.unit⁻¹ : A) ∈ S\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : A\nh : IsUnit x\nhxS : x ∈ S\nhx : IsUnit (star x * x)\nthis : ↑(IsUnit.unit hx)⁻¹ ∈ S\n⊢ ↑(IsUnit.unit h)⁻¹ ∈ S\n[PROOFSTEP]\nrw [← one_mul (↑h.unit⁻¹ : A), ← hx.unit.inv_mul, mul_assoc, IsUnit.unit_spec, mul_assoc, h.mul_val_inv, mul_one]\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : A\nh : IsUnit x\nhxS : x ∈ S\nhx : IsUnit (star x * x)\nthis : ↑(IsUnit.unit hx)⁻¹ ∈ S\n⊢ ↑(IsUnit.unit hx)⁻¹ * star x ∈ S\n[PROOFSTEP]\nexact mul_mem this (star_mem hxS)\n[GOAL]\ncase this\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : A\nh : IsUnit x\nhxS : x ∈ S\nhx : IsUnit (star x * x)\n⊢ ↑(IsUnit.unit hx)⁻¹ ∈ S\n[PROOFSTEP]\nrefine' le_of_isClosed_of_mem ℂ hS (mul_mem (star_mem hxS) hxS) _\n[GOAL]\ncase this\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : A\nh : IsUnit x\nhxS : x ∈ S\nhx : IsUnit (star x * x)\n⊢ ↑(IsUnit.unit hx)⁻¹ ∈ elementalStarAlgebra ℂ (star x * x)\n[PROOFSTEP]\nhaveI := (IsSelfAdjoint.star_mul_self x).isStarNormal\n[GOAL]\ncase this\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : A\nh : IsUnit x\nhxS : x ∈ S\nhx : IsUnit (star x * x)\nthis : IsStarNormal (star x * x)\n⊢ ↑(IsUnit.unit hx)⁻¹ ∈ elementalStarAlgebra ℂ (star x * x)\n[PROOFSTEP]\nhave hx' := elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal hx\n[GOAL]\ncase this\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : A\nh : IsUnit x\nhxS : x ∈ S\nhx : IsUnit (star x * x)\nthis : IsStarNormal (star x * x)\nhx' : IsUnit { val := star x * x, property := (_ : star x * x ∈ elementalStarAlgebra ℂ (star x * x)) }\n⊢ ↑(IsUnit.unit hx)⁻¹ ∈ elementalStarAlgebra ℂ (star x * x)\n[PROOFSTEP]\nconvert (↑hx'.unit⁻¹ : elementalStarAlgebra ℂ (star x * x)).prop using 1\n[GOAL]\ncase h.e'_4\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : A\nh : IsUnit x\nhxS : x ∈ S\nhx : IsUnit (star x * x)\nthis : IsStarNormal (star x * x)\nhx' : IsUnit { val := star x * x, property := (_ : star x * x ∈ elementalStarAlgebra ℂ (star x * x)) }\n⊢ ↑(IsUnit.unit hx)⁻¹ = ↑↑(IsUnit.unit hx')⁻¹\n[PROOFSTEP]\nrefine left_inv_eq_right_inv hx.unit.inv_mul ?_\n[GOAL]\ncase h.e'_4\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : A\nh : IsUnit x\nhxS : x ∈ S\nhx : IsUnit (star x * x)\nthis : IsStarNormal (star x * x)\nhx' : IsUnit { val := star x * x, property := (_ : star x * x ∈ elementalStarAlgebra ℂ (star x * x)) }\n⊢ ↑(IsUnit.unit hx) * ↑↑(IsUnit.unit hx')⁻¹ = 1\n[PROOFSTEP]\nexact (congr_arg ((↑) : _ → A) hx'.unit.mul_inv)\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : { x // x ∈ S }\n⊢ IsUnit ↑x ↔ IsUnit x\n[PROOFSTEP]\nrefine'\n  ⟨fun hx => ⟨⟨x, ⟨(↑hx.unit⁻¹ : A), StarSubalgebra.isUnit_coe_inv_mem hS hx x.prop⟩, _, _⟩, rfl⟩, fun hx =>\n    hx.map S.subtype⟩\n[GOAL]\ncase refine'_1\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : { x // x ∈ S }\nhx : IsUnit ↑x\n⊢ x * { val := ↑(IsUnit.unit hx)⁻¹, property := (_ : ↑(IsUnit.unit hx)⁻¹ ∈ S) } = 1\ncase refine'_2\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS✝ S : StarSubalgebra ℂ A\nhS : IsClosed ↑S\nx : { x // x ∈ S }\nhx : IsUnit ↑x\n⊢ { val := ↑(IsUnit.unit hx)⁻¹, property := (_ : ↑(IsUnit.unit hx)⁻¹ ∈ S) } * x = 1\n[PROOFSTEP]\nexacts [Subtype.coe_injective hx.mul_val_inv, Subtype.coe_injective hx.val_inv_mul]\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nx : A\nφ : ↑(characterSpace ℂ { x_1 // x_1 ∈ elementalStarAlgebra ℂ x })\n⊢ ↑φ { val := x, property := (_ : x ∈ elementalStarAlgebra ℂ x) } ∈ spectrum ℂ x\n[PROOFSTEP]\nsimpa only [StarSubalgebra.spectrum_eq (elementalStarAlgebra.isClosed ℂ x) ⟨x, self_mem ℂ x⟩] using\n  AlgHom.apply_mem_spectrum φ ⟨x, self_mem ℂ x⟩\n[GOAL]\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n⊢ Function.Bijective (characterSpaceToSpectrum a)\n[PROOFSTEP]\nrefine' ⟨fun φ ψ h => starAlgHomClass_ext ℂ _ _ _, _⟩\n[GOAL]\ncase refine'_1\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nφ ψ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })\nh : characterSpaceToSpectrum a φ = characterSpaceToSpectrum a ψ\n⊢ Continuous ↑φ\n[PROOFSTEP]\nexact (map_continuous φ)\n[GOAL]\ncase refine'_2\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nφ ψ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })\nh : characterSpaceToSpectrum a φ = characterSpaceToSpectrum a ψ\n⊢ Continuous ↑ψ\n[PROOFSTEP]\nexact (map_continuous ψ)\n[GOAL]\ncase refine'_3\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nφ ψ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })\nh : characterSpaceToSpectrum a φ = characterSpaceToSpectrum a ψ\n⊢ ↑φ { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } =\n    ↑ψ { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\n[PROOFSTEP]\nsimpa only [elementalStarAlgebra.characterSpaceToSpectrum, Subtype.mk_eq_mk, ContinuousMap.coe_mk] using h\n[GOAL]\ncase refine'_4\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\n⊢ Function.Surjective (characterSpaceToSpectrum a)\n[PROOFSTEP]\nrintro ⟨z, hz⟩\n[GOAL]\ncase refine'_4.mk\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nz : ℂ\nhz : z ∈ spectrum ℂ a\n⊢ ∃ a_1, characterSpaceToSpectrum a a_1 = { val := z, property := hz }\n[PROOFSTEP]\nhave hz' := (StarSubalgebra.spectrum_eq (elementalStarAlgebra.isClosed ℂ a) ⟨a, self_mem ℂ a⟩).symm.subst hz\n[GOAL]\ncase refine'_4.mk\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nz : ℂ\nhz : z ∈ spectrum ℂ a\nhz' : z ∈ spectrum ℂ { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }\n⊢ ∃ a_1, characterSpaceToSpectrum a a_1 = { val := z, property := hz }\n[PROOFSTEP]\nrw [CharacterSpace.mem_spectrum_iff_exists] at hz' \n[GOAL]\ncase refine'_4.mk\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nz : ℂ\nhz : z ∈ spectrum ℂ a\nhz' : ∃ f, ↑f { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } = z\n⊢ ∃ a_1, characterSpaceToSpectrum a a_1 = { val := z, property := hz }\n[PROOFSTEP]\nobtain ⟨φ, rfl⟩ := hz'\n[GOAL]\ncase refine'_4.mk.intro\nA : Type u_1\ninst✝⁶ : NormedRing A\ninst✝⁵ : NormedAlgebra ℂ A\ninst✝⁴ : StarRing A\ninst✝³ : CstarRing A\ninst✝² : StarModule ℂ A\ninst✝¹ : CompleteSpace A\na : A\ninst✝ : IsStarNormal a\nS : StarSubalgebra ℂ A\nφ : ↑(characterSpace ℂ { x // x ∈ elementalStarAlgebra ℂ a })\nhz : ↑φ { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) } ∈ spectrum ℂ a\n⊢ ∃ a_1,\n    characterSpaceToSpectrum a a_1 =\n      { val := ↑φ { val := a, property := (_ : a ∈ elementalStarAlgebra ℂ a) }, property := hz }\n[PROOFSTEP]\nexact ⟨φ, rfl⟩\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.Star.ContinuousFunctionalCalculus", "llama_tokens": 18479, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.665410558746814, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.3534723259481761}}
{"text": "[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np q : R[X]\ninst✝ : Semiring S\nhq : Monic q\np₁ p₂ : R[X]\nh : q ∣ p₁ - p₂\n⊢ p₁ %ₘ q = p₂ %ₘ q\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np q : R[X]\ninst✝ : Semiring S\nhq : Monic q\np₁ p₂ : R[X]\nh : q ∣ p₁ - p₂\n✝ : Nontrivial R\n⊢ p₁ %ₘ q = p₂ %ₘ q\n[PROOFSTEP]\nobtain ⟨f, sub_eq⟩ := h\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np q : R[X]\ninst✝ : Semiring S\nhq : Monic q\np₁ p₂ : R[X]\n✝ : Nontrivial R\nf : R[X]\nsub_eq : p₁ - p₂ = q * f\n⊢ p₁ %ₘ q = p₂ %ₘ q\n[PROOFSTEP]\nrefine' (div_modByMonic_unique (p₂ /ₘ q + f) _ hq ⟨_, degree_modByMonic_lt _ hq⟩).2\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np q : R[X]\ninst✝ : Semiring S\nhq : Monic q\np₁ p₂ : R[X]\n✝ : Nontrivial R\nf : R[X]\nsub_eq : p₁ - p₂ = q * f\n⊢ p₂ %ₘ q + q * (p₂ /ₘ q + f) = p₁\n[PROOFSTEP]\nrw [sub_eq_iff_eq_add.mp sub_eq, mul_add, ← add_assoc, modByMonic_add_div _ hq, add_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np q : R[X]\ninst✝ : Semiring S\np₁ p₂ : R[X]\n⊢ (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q\n[PROOFSTEP]\nby_cases hq : q.Monic\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np q : R[X]\ninst✝ : Semiring S\np₁ p₂ : R[X]\nhq : Monic q\n⊢ (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q\n[PROOFSTEP]\ncases' subsingleton_or_nontrivial R with hR hR\n[GOAL]\ncase pos.inl\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np q : R[X]\ninst✝ : Semiring S\np₁ p₂ : R[X]\nhq : Monic q\nhR : Subsingleton R\n⊢ (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\ncase pos.inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np q : R[X]\ninst✝ : Semiring S\np₁ p₂ : R[X]\nhq : Monic q\nhR : Nontrivial R\n⊢ (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q\n[PROOFSTEP]\nexact\n  (div_modByMonic_unique (p₁ /ₘ q + p₂ /ₘ q) _ hq\n      ⟨by\n        rw [mul_add, add_left_comm, add_assoc, modByMonic_add_div _ hq, ← add_assoc, add_comm (q * _),\n          modByMonic_add_div _ hq],\n        (degree_add_le _ _).trans_lt (max_lt (degree_modByMonic_lt _ hq) (degree_modByMonic_lt _ hq))⟩).2\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np q : R[X]\ninst✝ : Semiring S\np₁ p₂ : R[X]\nhq : Monic q\nhR : Nontrivial R\n⊢ p₁ %ₘ q + p₂ %ₘ q + q * (p₁ /ₘ q + p₂ /ₘ q) = p₁ + p₂\n[PROOFSTEP]\nrw [mul_add, add_left_comm, add_assoc, modByMonic_add_div _ hq, ← add_assoc, add_comm (q * _), modByMonic_add_div _ hq]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np q : R[X]\ninst✝ : Semiring S\np₁ p₂ : R[X]\nhq : ¬Monic q\n⊢ (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q\n[PROOFSTEP]\nsimp_rw [modByMonic_eq_of_not_monic _ hq]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np✝ q : R[X]\ninst✝ : Semiring S\nc : R\np : R[X]\n⊢ c • p %ₘ q = c • (p %ₘ q)\n[PROOFSTEP]\nby_cases hq : q.Monic\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np✝ q : R[X]\ninst✝ : Semiring S\nc : R\np : R[X]\nhq : Monic q\n⊢ c • p %ₘ q = c • (p %ₘ q)\n[PROOFSTEP]\ncases' subsingleton_or_nontrivial R with hR hR\n[GOAL]\ncase pos.inl\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np✝ q : R[X]\ninst✝ : Semiring S\nc : R\np : R[X]\nhq : Monic q\nhR : Subsingleton R\n⊢ c • p %ₘ q = c • (p %ₘ q)\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\ncase pos.inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np✝ q : R[X]\ninst✝ : Semiring S\nc : R\np : R[X]\nhq : Monic q\nhR : Nontrivial R\n⊢ c • p %ₘ q = c • (p %ₘ q)\n[PROOFSTEP]\nexact\n  (div_modByMonic_unique (c • (p /ₘ q)) (c • (p %ₘ q)) hq\n      ⟨by rw [mul_smul_comm, ← smul_add, modByMonic_add_div p hq],\n        (degree_smul_le _ _).trans_lt (degree_modByMonic_lt _ hq)⟩).2\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np✝ q : R[X]\ninst✝ : Semiring S\nc : R\np : R[X]\nhq : Monic q\nhR : Nontrivial R\n⊢ c • (p %ₘ q) + q * c • (p /ₘ q) = c • p\n[PROOFSTEP]\nrw [mul_smul_comm, ← smul_add, modByMonic_add_div p hq]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\np✝ q : R[X]\ninst✝ : Semiring S\nc : R\np : R[X]\nhq : ¬Monic q\n⊢ c • p %ₘ q = c • (p %ₘ q)\n[PROOFSTEP]\nsimp_rw [modByMonic_eq_of_not_monic _ hq]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\np✝ q✝ : R[X]\ninst✝¹ : Ring S\ninst✝ : Algebra R S\np q : R[X]\nhq : Monic q\nx : S\nhx : ↑(aeval x) q = 0\n⊢ ↑(aeval x) (p %ₘ q) = ↑(aeval x) p\n[PROOFSTEP]\nrw [modByMonic_eq_sub_mul_div p hq, _root_.map_sub, _root_.map_mul, hx, zero_mul, sub_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q a✝ b✝ : R[X]\nh : a✝ * b✝ = 0\n⊢ a✝ = 0 ∨ b✝ = 0\n[PROOFSTEP]\nrw [← leadingCoeff_eq_zero, ← leadingCoeff_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q a✝ b✝ : R[X]\nh : a✝ * b✝ = 0\n⊢ leadingCoeff a✝ = 0 ∨ leadingCoeff b✝ = 0\n[PROOFSTEP]\nrefine' eq_zero_or_eq_zero_of_mul_eq_zero _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q a✝ b✝ : R[X]\nh : a✝ * b✝ = 0\n⊢ leadingCoeff a✝ * leadingCoeff b✝ = 0\n[PROOFSTEP]\nrw [← leadingCoeff_zero, ← leadingCoeff_mul, h]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ natDegree (p * q) = natDegree p + natDegree q\n[PROOFSTEP]\nrw [← WithBot.coe_eq_coe, ← Nat.cast_withBot, ← degree_eq_natDegree (mul_ne_zero hp hq), WithBot.coe_add, ←\n  Nat.cast_withBot, ← degree_eq_natDegree hp, ← Nat.cast_withBot, ← degree_eq_natDegree hq, degree_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\n⊢ trailingDegree (p * q) = trailingDegree p + trailingDegree q\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : p = 0\n⊢ trailingDegree (p * q) = trailingDegree p + trailingDegree q\n[PROOFSTEP]\nrw [hp, zero_mul, trailingDegree_zero, top_add]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : ¬p = 0\n⊢ trailingDegree (p * q) = trailingDegree p + trailingDegree q\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : ¬p = 0\nhq : q = 0\n⊢ trailingDegree (p * q) = trailingDegree p + trailingDegree q\n[PROOFSTEP]\nrw [hq, mul_zero, trailingDegree_zero, add_top]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : ¬p = 0\nhq : ¬q = 0\n⊢ trailingDegree (p * q) = trailingDegree p + trailingDegree q\n[PROOFSTEP]\nrw [trailingDegree_eq_natTrailingDegree hp, trailingDegree_eq_natTrailingDegree hq,\n  trailingDegree_eq_natTrailingDegree (mul_ne_zero hp hq), natTrailingDegree_mul hp hq]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : ¬p = 0\nhq : ¬q = 0\n⊢ ↑(natTrailingDegree p + natTrailingDegree q) = ↑(natTrailingDegree p) + ↑(natTrailingDegree q)\n[PROOFSTEP]\napply WithTop.coe_add\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q p : R[X]\nn : ℕ\n⊢ natDegree (p ^ n) = n * natDegree p\n[PROOFSTEP]\nclassical exact\n  if hp0 : p = 0 then if hn0 : n = 0 then by simp [hp0, hn0] else by rw [hp0, zero_pow (Nat.pos_of_ne_zero hn0)]; simp\n  else natDegree_pow' (by rw [← leadingCoeff_pow, Ne.def, leadingCoeff_eq_zero]; exact pow_ne_zero _ hp0)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q p : R[X]\nn : ℕ\n⊢ natDegree (p ^ n) = n * natDegree p\n[PROOFSTEP]\nexact\n  if hp0 : p = 0 then if hn0 : n = 0 then by simp [hp0, hn0] else by rw [hp0, zero_pow (Nat.pos_of_ne_zero hn0)]; simp\n  else natDegree_pow' (by rw [← leadingCoeff_pow, Ne.def, leadingCoeff_eq_zero]; exact pow_ne_zero _ hp0)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q p : R[X]\nn : ℕ\nhp0 : p = 0\nhn0 : n = 0\n⊢ natDegree (p ^ n) = n * natDegree p\n[PROOFSTEP]\nsimp [hp0, hn0]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q p : R[X]\nn : ℕ\nhp0 : p = 0\nhn0 : ¬n = 0\n⊢ natDegree (p ^ n) = n * natDegree p\n[PROOFSTEP]\nrw [hp0, zero_pow (Nat.pos_of_ne_zero hn0)]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q p : R[X]\nn : ℕ\nhp0 : p = 0\nhn0 : ¬n = 0\n⊢ natDegree 0 = n * natDegree 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q p : R[X]\nn : ℕ\nhp0 : ¬p = 0\n⊢ leadingCoeff p ^ n ≠ 0\n[PROOFSTEP]\nrw [← leadingCoeff_pow, Ne.def, leadingCoeff_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q p : R[X]\nn : ℕ\nhp0 : ¬p = 0\n⊢ ¬p ^ n = 0\n[PROOFSTEP]\nexact pow_ne_zero _ hp0\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q p : R[X]\nhq : q ≠ 0\n⊢ degree p ≤ degree (p * q)\n[PROOFSTEP]\nclassical exact\n  if hp : p = 0 then by simp only [hp, zero_mul, le_refl]\n  else by rw [degree_mul, degree_eq_natDegree hp, degree_eq_natDegree hq];\n    exact WithBot.coe_le_coe.2 (Nat.le_add_right _ _)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q p : R[X]\nhq : q ≠ 0\n⊢ degree p ≤ degree (p * q)\n[PROOFSTEP]\nexact\n  if hp : p = 0 then by simp only [hp, zero_mul, le_refl]\n  else by rw [degree_mul, degree_eq_natDegree hp, degree_eq_natDegree hq];\n    exact WithBot.coe_le_coe.2 (Nat.le_add_right _ _)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q p : R[X]\nhq : q ≠ 0\nhp : p = 0\n⊢ degree p ≤ degree (p * q)\n[PROOFSTEP]\nsimp only [hp, zero_mul, le_refl]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q p : R[X]\nhq : q ≠ 0\nhp : ¬p = 0\n⊢ degree p ≤ degree (p * q)\n[PROOFSTEP]\nrw [degree_mul, degree_eq_natDegree hp, degree_eq_natDegree hq]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q p : R[X]\nhq : q ≠ 0\nhp : ¬p = 0\n⊢ ↑(natDegree p) ≤ ↑(natDegree p) + ↑(natDegree q)\n[PROOFSTEP]\nexact WithBot.coe_le_coe.2 (Nat.le_add_right _ _)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh1 : p ∣ q\nh2 : q ≠ 0\n⊢ natDegree p ≤ natDegree q\n[PROOFSTEP]\nrcases h1 with ⟨q, rfl⟩\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh2 : p * q ≠ 0\n⊢ natDegree p ≤ natDegree (p * q)\n[PROOFSTEP]\nrw [mul_ne_zero_iff] at h2 \n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh2 : p ≠ 0 ∧ q ≠ 0\n⊢ natDegree p ≤ natDegree (p * q)\n[PROOFSTEP]\nrw [natDegree_mul h2.1 h2.2]\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh2 : p ≠ 0 ∧ q ≠ 0\n⊢ natDegree p ≤ natDegree p + natDegree q\n[PROOFSTEP]\nexact Nat.le_add_right _ _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh1 : p ∣ q\nh2 : q ≠ 0\n⊢ degree p ≤ degree q\n[PROOFSTEP]\nrcases h1 with ⟨q, rfl⟩\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh2 : p * q ≠ 0\n⊢ degree p ≤ degree (p * q)\n[PROOFSTEP]\nrw [mul_ne_zero_iff] at h2 \n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh2 : p ≠ 0 ∧ q ≠ 0\n⊢ degree p ≤ degree (p * q)\n[PROOFSTEP]\nexact degree_le_mul_left p h2.2\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh₁ : p ∣ q\nh₂ : degree q < degree p\n⊢ q = 0\n[PROOFSTEP]\nby_contra hc\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh₁ : p ∣ q\nh₂ : degree q < degree p\nhc : ¬q = 0\n⊢ False\n[PROOFSTEP]\nexact (lt_iff_not_ge _ _).mp h₂ (degree_le_of_dvd h₁ hc)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh₁ : p ∣ q\nh₂ : natDegree q < natDegree p\n⊢ q = 0\n[PROOFSTEP]\nby_contra hc\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh₁ : p ∣ q\nh₂ : natDegree q < natDegree p\nhc : ¬q = 0\n⊢ False\n[PROOFSTEP]\nexact (lt_iff_not_ge _ _).mp h₂ (natDegree_le_of_dvd h₁ hc)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh0 : q ≠ 0\nhl : degree q < degree p\n⊢ ¬p ∣ q\n[PROOFSTEP]\nby_contra hcontra\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh0 : q ≠ 0\nhl : degree q < degree p\nhcontra : p ∣ q\n⊢ False\n[PROOFSTEP]\nexact h0 (eq_zero_of_dvd_of_degree_lt hcontra hl)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh0 : q ≠ 0\nhl : natDegree q < natDegree p\n⊢ ¬p ∣ q\n[PROOFSTEP]\nby_contra hcontra\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np✝ q✝ p q : R[X]\nh0 : q ≠ 0\nhl : natDegree q < natDegree p\nhcontra : p ∣ q\n⊢ False\n[PROOFSTEP]\nexact h0 (eq_zero_of_dvd_of_natDegree_lt hcontra hl)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q p₁ p₂ q₁ q₂ : R[X]\nhp₁ : p₁ ≠ 0\nhq₁ : q₁ ≠ 0\nhp₂ : p₂ ≠ 0\nhq₂ : q₂ ≠ 0\nh_eq : p₁ * q₂ = p₂ * q₁\n⊢ ↑(natDegree p₁) - ↑(natDegree q₁) = ↑(natDegree p₂) - ↑(natDegree q₂)\n[PROOFSTEP]\nrw [sub_eq_sub_iff_add_eq_add]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q p₁ p₂ q₁ q₂ : R[X]\nhp₁ : p₁ ≠ 0\nhq₁ : q₁ ≠ 0\nhp₂ : p₂ ≠ 0\nhq₂ : q₂ ≠ 0\nh_eq : p₁ * q₂ = p₂ * q₁\n⊢ ↑(natDegree p₁) + ↑(natDegree q₂) = ↑(natDegree p₂) + ↑(natDegree q₁)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q p₁ p₂ q₁ q₂ : R[X]\nhp₁ : p₁ ≠ 0\nhq₁ : q₁ ≠ 0\nhp₂ : p₂ ≠ 0\nhq₂ : q₂ ≠ 0\nh_eq : p₁ * q₂ = p₂ * q₁\n⊢ natDegree p₁ + natDegree q₂ = natDegree p₂ + natDegree q₁\n[PROOFSTEP]\nrw [← natDegree_mul hp₁ hq₂, ← natDegree_mul hp₂ hq₁, h_eq]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nh : IsUnit p\n⊢ natDegree p = 0\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nh : IsUnit p\n✝ : Nontrivial R\n⊢ natDegree p = 0\n[PROOFSTEP]\nobtain ⟨q, hq⟩ := h.exists_right_inv\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q✝ : R[X]\nh : IsUnit p\n✝ : Nontrivial R\nq : R[X]\nhq : p * q = 1\n⊢ natDegree p = 0\n[PROOFSTEP]\nhave := natDegree_mul (left_ne_zero_of_mul_eq_one hq) (right_ne_zero_of_mul_eq_one hq)\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q✝ : R[X]\nh : IsUnit p\n✝ : Nontrivial R\nq : R[X]\nhq : p * q = 1\nthis : natDegree (p * q) = natDegree p + natDegree q\n⊢ natDegree p = 0\n[PROOFSTEP]\nrw [hq, natDegree_one, eq_comm, add_eq_zero_iff] at this \n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\np q✝ : R[X]\nh : IsUnit p\n✝ : Nontrivial R\nq : R[X]\nhq : p * q = 1\nthis : natDegree p = 0 ∧ natDegree q = 0\n⊢ natDegree p = 0\n[PROOFSTEP]\nexact this.1\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\nhp1 : p ≠ 1\n⊢ Irreducible p ↔ ∀ (f g : R[X]), Monic f → Monic g → f * g = p → f = 1 ∨ g = 1\n[PROOFSTEP]\nrefine'\n  ⟨fun h f g hf hg hp => (h.2 f g hp.symm).imp hf.eq_one_of_isUnit hg.eq_one_of_isUnit, fun h =>\n    ⟨hp1 ∘ hp.eq_one_of_isUnit, fun f g hfg =>\n      (h (g * C f.leadingCoeff) (f * C g.leadingCoeff) _ _ _).symm.imp (isUnit_of_mul_eq_one f _)\n        (isUnit_of_mul_eq_one g _)⟩⟩\n[GOAL]\ncase refine'_1\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\nhp1 : p ≠ 1\nh : ∀ (f g : R[X]), Monic f → Monic g → f * g = p → f = 1 ∨ g = 1\nf g : R[X]\nhfg : p = f * g\n⊢ Monic (g * ↑C (leadingCoeff f))\n[PROOFSTEP]\nrwa [Monic, leadingCoeff_mul, leadingCoeff_C, ← leadingCoeff_mul, mul_comm, ← hfg, ← Monic]\n[GOAL]\ncase refine'_2\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\nhp1 : p ≠ 1\nh : ∀ (f g : R[X]), Monic f → Monic g → f * g = p → f = 1 ∨ g = 1\nf g : R[X]\nhfg : p = f * g\n⊢ Monic (f * ↑C (leadingCoeff g))\n[PROOFSTEP]\nrwa [Monic, leadingCoeff_mul, leadingCoeff_C, ← leadingCoeff_mul, ← hfg, ← Monic]\n[GOAL]\ncase refine'_3\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\nhp1 : p ≠ 1\nh : ∀ (f g : R[X]), Monic f → Monic g → f * g = p → f = 1 ∨ g = 1\nf g : R[X]\nhfg : p = f * g\n⊢ g * ↑C (leadingCoeff f) * (f * ↑C (leadingCoeff g)) = p\n[PROOFSTEP]\nrw [mul_mul_mul_comm, ← C_mul, ← leadingCoeff_mul, ← hfg, hp.leadingCoeff, C_1, mul_one, mul_comm, ← hfg]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\n⊢ Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), Monic f → Monic g → f * g = p → natDegree f = 0 ∨ natDegree g = 0\n[PROOFSTEP]\nby_cases hp1 : p = 1\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\nhp1 : p = 1\n⊢ Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), Monic f → Monic g → f * g = p → natDegree f = 0 ∨ natDegree g = 0\n[PROOFSTEP]\nsimp [hp1]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\nhp1 : ¬p = 1\n⊢ Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), Monic f → Monic g → f * g = p → natDegree f = 0 ∨ natDegree g = 0\n[PROOFSTEP]\nrw [irreducible_of_monic hp hp1, and_iff_right hp1]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\nhp1 : ¬p = 1\n⊢ (∀ (f g : R[X]), Monic f → Monic g → f * g = p → f = 1 ∨ g = 1) ↔\n    ∀ (f g : R[X]), Monic f → Monic g → f * g = p → natDegree f = 0 ∨ natDegree g = 0\n[PROOFSTEP]\nrefine' forall₄_congr fun a b ha hb => _\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\nhp1 : ¬p = 1\na b : R[X]\nha : Monic a\nhb : Monic b\n⊢ a * b = p → a = 1 ∨ b = 1 ↔ a * b = p → natDegree a = 0 ∨ natDegree b = 0\n[PROOFSTEP]\nrw [ha.natDegree_eq_zero_iff_eq_one, hb.natDegree_eq_zero_iff_eq_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\n⊢ Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), Monic f → Monic g → f * g = p → ¬natDegree g ∈ Ioc 0 (natDegree p / 2)\n[PROOFSTEP]\nsimp_rw [hp.irreducible_iff_natDegree, mem_Ioc, Nat.le_div_iff_mul_le zero_lt_two, mul_two]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\n⊢ (p ≠ 1 ∧ ∀ (f g : R[X]), Monic f → Monic g → f * g = p → natDegree f = 0 ∨ natDegree g = 0) ↔\n    p ≠ 1 ∧ ∀ (f g : R[X]), Monic f → Monic g → f * g = p → ¬(0 < natDegree g ∧ natDegree g + natDegree g ≤ natDegree p)\n[PROOFSTEP]\napply and_congr_right'\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\n⊢ (∀ (f g : R[X]), Monic f → Monic g → f * g = p → natDegree f = 0 ∨ natDegree g = 0) ↔\n    ∀ (f g : R[X]), Monic f → Monic g → f * g = p → ¬(0 < natDegree g ∧ natDegree g + natDegree g ≤ natDegree p)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\n⊢ (∀ (f g : R[X]), Monic f → Monic g → f * g = p → natDegree f = 0 ∨ natDegree g = 0) →\n    ∀ (f g : R[X]), Monic f → Monic g → f * g = p → ¬(0 < natDegree g ∧ natDegree g + natDegree g ≤ natDegree p)\n[PROOFSTEP]\nintro h f g hf hg he\n[GOAL]\ncase h.mpr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\n⊢ (∀ (f g : R[X]), Monic f → Monic g → f * g = p → ¬(0 < natDegree g ∧ natDegree g + natDegree g ≤ natDegree p)) →\n    ∀ (f g : R[X]), Monic f → Monic g → f * g = p → natDegree f = 0 ∨ natDegree g = 0\n[PROOFSTEP]\nintro h f g hf hg he\n[GOAL]\ncase h.mp\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\nh : ∀ (f g : R[X]), Monic f → Monic g → f * g = p → natDegree f = 0 ∨ natDegree g = 0\nf g : R[X]\nhf : Monic f\nhg : Monic g\nhe : f * g = p\n⊢ ¬(0 < natDegree g ∧ natDegree g + natDegree g ≤ natDegree p)\n[PROOFSTEP]\nsubst he\n[GOAL]\ncase h.mpr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhp : Monic p\nh : ∀ (f g : R[X]), Monic f → Monic g → f * g = p → ¬(0 < natDegree g ∧ natDegree g + natDegree g ≤ natDegree p)\nf g : R[X]\nhf : Monic f\nhg : Monic g\nhe : f * g = p\n⊢ natDegree f = 0 ∨ natDegree g = 0\n[PROOFSTEP]\nsubst he\n[GOAL]\ncase h.mp\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq f g : R[X]\nhf : Monic f\nhg : Monic g\nhp : Monic (f * g)\nh : ∀ (f_1 g_1 : R[X]), Monic f_1 → Monic g_1 → f_1 * g_1 = f * g → natDegree f_1 = 0 ∨ natDegree g_1 = 0\n⊢ ¬(0 < natDegree g ∧ natDegree g + natDegree g ≤ natDegree (f * g))\n[PROOFSTEP]\nrw [hf.natDegree_mul hg, add_le_add_iff_right]\n[GOAL]\ncase h.mp\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq f g : R[X]\nhf : Monic f\nhg : Monic g\nhp : Monic (f * g)\nh : ∀ (f_1 g_1 : R[X]), Monic f_1 → Monic g_1 → f_1 * g_1 = f * g → natDegree f_1 = 0 ∨ natDegree g_1 = 0\n⊢ ¬(0 < natDegree g ∧ natDegree g ≤ natDegree f)\n[PROOFSTEP]\nexact fun ha => (h f g hf hg rfl).elim (ha.1.trans_le ha.2).ne' ha.1.ne'\n[GOAL]\ncase h.mpr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq f g : R[X]\nhf : Monic f\nhg : Monic g\nhp : Monic (f * g)\nh :\n  ∀ (f_1 g_1 : R[X]),\n    Monic f_1 → Monic g_1 → f_1 * g_1 = f * g → ¬(0 < natDegree g_1 ∧ natDegree g_1 + natDegree g_1 ≤ natDegree (f * g))\n⊢ natDegree f = 0 ∨ natDegree g = 0\n[PROOFSTEP]\nsimp_rw [hf.natDegree_mul hg, pos_iff_ne_zero] at h \n[GOAL]\ncase h.mpr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq f g : R[X]\nhf : Monic f\nhg : Monic g\nhp : Monic (f * g)\nh :\n  ∀ (f_1 g_1 : R[X]),\n    Monic f_1 →\n      Monic g_1 → f_1 * g_1 = f * g → ¬(natDegree g_1 ≠ 0 ∧ natDegree g_1 + natDegree g_1 ≤ natDegree f + natDegree g)\n⊢ natDegree f = 0 ∨ natDegree g = 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase h.mpr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq f g : R[X]\nhf : Monic f\nhg : Monic g\nhp : Monic (f * g)\nh : natDegree f ≠ 0 ∧ natDegree g ≠ 0\n⊢ ∃ f_1 g_1,\n    Monic f_1 ∧\n      Monic g_1 ∧ f_1 * g_1 = f * g ∧ natDegree g_1 ≠ 0 ∧ natDegree g_1 + natDegree g_1 ≤ natDegree f + natDegree g\n[PROOFSTEP]\nobtain hl | hl := le_total f.natDegree g.natDegree\n[GOAL]\ncase h.mpr.inl\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq f g : R[X]\nhf : Monic f\nhg : Monic g\nhp : Monic (f * g)\nh : natDegree f ≠ 0 ∧ natDegree g ≠ 0\nhl : natDegree f ≤ natDegree g\n⊢ ∃ f_1 g_1,\n    Monic f_1 ∧\n      Monic g_1 ∧ f_1 * g_1 = f * g ∧ natDegree g_1 ≠ 0 ∧ natDegree g_1 + natDegree g_1 ≤ natDegree f + natDegree g\n[PROOFSTEP]\nexact ⟨g, f, hg, hf, mul_comm g f, h.1, add_le_add_left hl _⟩\n[GOAL]\ncase h.mpr.inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq f g : R[X]\nhf : Monic f\nhg : Monic g\nhp : Monic (f * g)\nh : natDegree f ≠ 0 ∧ natDegree g ≠ 0\nhl : natDegree g ≤ natDegree f\n⊢ ∃ f_1 g_1,\n    Monic f_1 ∧\n      Monic g_1 ∧ f_1 * g_1 = f * g ∧ natDegree g_1 ≠ 0 ∧ natDegree g_1 + natDegree g_1 ≤ natDegree f + natDegree g\n[PROOFSTEP]\nexact ⟨f, g, hf, hg, rfl, h.2, add_le_add_right hl _⟩\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\n⊢ ¬Irreducible p ↔ ∃ c₁ c₂, coeff p 0 = c₁ * c₂ ∧ coeff p 1 = c₁ + c₂\n[PROOFSTEP]\ncases subsingleton_or_nontrivial R\n[GOAL]\ncase inl\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Subsingleton R\n⊢ ¬Irreducible p ↔ ∃ c₁ c₂, coeff p 0 = c₁ * c₂ ∧ coeff p 1 = c₁ + c₂\n[PROOFSTEP]\nsimp [natDegree_of_subsingleton] at hnd \n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\n⊢ ¬Irreducible p ↔ ∃ c₁ c₂, coeff p 0 = c₁ * c₂ ∧ coeff p 1 = c₁ + c₂\n[PROOFSTEP]\nrw [hm.irreducible_iff_natDegree', and_iff_right, hnd]\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\n⊢ (¬∀ (f g : R[X]), Monic f → Monic g → f * g = p → ¬natDegree g ∈ Ioc 0 (2 / 2)) ↔\n    ∃ c₁ c₂, coeff p 0 = c₁ * c₂ ∧ coeff p 1 = c₁ + c₂\ncase inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\n⊢ p ≠ 1\n[PROOFSTEP]\npush_neg\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\n⊢ (∃ f g, Monic f ∧ Monic g ∧ f * g = p ∧ natDegree g ∈ Ioc 0 (2 / 2)) ↔\n    ∃ c₁ c₂, coeff p 0 = c₁ * c₂ ∧ coeff p 1 = c₁ + c₂\ncase inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\n⊢ p ≠ 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase inr.mp\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\n⊢ (∃ f g, Monic f ∧ Monic g ∧ f * g = p ∧ natDegree g ∈ Ioc 0 (2 / 2)) →\n    ∃ c₁ c₂, coeff p 0 = c₁ * c₂ ∧ coeff p 1 = c₁ + c₂\n[PROOFSTEP]\nrintro ⟨a, b, ha, hb, rfl, hdb⟩\n[GOAL]\ncase inr.mp.intro.intro.intro.intro.intro\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq : R[X]\nh✝ : Nontrivial R\na b : R[X]\nha : Monic a\nhb : Monic b\nhdb : natDegree b ∈ Ioc 0 (2 / 2)\nhm : Monic (a * b)\nhnd : natDegree (a * b) = 2\n⊢ ∃ c₁ c₂, coeff (a * b) 0 = c₁ * c₂ ∧ coeff (a * b) 1 = c₁ + c₂\n[PROOFSTEP]\nsimp only [zero_lt_two, Nat.div_self, ge_iff_le, Nat.Ioc_succ_singleton, zero_add, mem_singleton] at hdb \n[GOAL]\ncase inr.mp.intro.intro.intro.intro.intro\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq : R[X]\nh✝ : Nontrivial R\na b : R[X]\nha : Monic a\nhb : Monic b\nhm : Monic (a * b)\nhnd : natDegree (a * b) = 2\nhdb : natDegree b = 1\n⊢ ∃ c₁ c₂, coeff (a * b) 0 = c₁ * c₂ ∧ coeff (a * b) 1 = c₁ + c₂\n[PROOFSTEP]\nhave hda := hnd\n[GOAL]\ncase inr.mp.intro.intro.intro.intro.intro\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq : R[X]\nh✝ : Nontrivial R\na b : R[X]\nha : Monic a\nhb : Monic b\nhm : Monic (a * b)\nhnd : natDegree (a * b) = 2\nhdb : natDegree b = 1\nhda : natDegree (a * b) = 2\n⊢ ∃ c₁ c₂, coeff (a * b) 0 = c₁ * c₂ ∧ coeff (a * b) 1 = c₁ + c₂\n[PROOFSTEP]\nrw [ha.natDegree_mul hb, hdb] at hda \n[GOAL]\ncase inr.mp.intro.intro.intro.intro.intro\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq : R[X]\nh✝ : Nontrivial R\na b : R[X]\nha : Monic a\nhb : Monic b\nhm : Monic (a * b)\nhnd : natDegree (a * b) = 2\nhdb : natDegree b = 1\nhda : natDegree a + 1 = 2\n⊢ ∃ c₁ c₂, coeff (a * b) 0 = c₁ * c₂ ∧ coeff (a * b) 1 = c₁ + c₂\n[PROOFSTEP]\nuse a.coeff 0, b.coeff 0, mul_coeff_zero a b\n[GOAL]\ncase right\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq : R[X]\nh✝ : Nontrivial R\na b : R[X]\nha : Monic a\nhb : Monic b\nhm : Monic (a * b)\nhnd : natDegree (a * b) = 2\nhdb : natDegree b = 1\nhda : natDegree a + 1 = 2\n⊢ coeff (a * b) 1 = coeff a 0 + coeff b 0\n[PROOFSTEP]\nsimpa only [nextCoeff, hnd, add_right_cancel hda, hdb] using ha.nextCoeff_mul hb\n[GOAL]\ncase inr.mpr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\n⊢ (∃ c₁ c₂, coeff p 0 = c₁ * c₂ ∧ coeff p 1 = c₁ + c₂) →\n    ∃ f g, Monic f ∧ Monic g ∧ f * g = p ∧ natDegree g ∈ Ioc 0 (2 / 2)\n[PROOFSTEP]\nrintro ⟨c₁, c₂, hmul, hadd⟩\n[GOAL]\ncase inr.mpr.intro.intro.intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\nc₁ c₂ : R\nhmul : coeff p 0 = c₁ * c₂\nhadd : coeff p 1 = c₁ + c₂\n⊢ ∃ f g, Monic f ∧ Monic g ∧ f * g = p ∧ natDegree g ∈ Ioc 0 (2 / 2)\n[PROOFSTEP]\nrefine ⟨X + C c₁, X + C c₂, monic_X_add_C _, monic_X_add_C _, ?_, ?_⟩\n[GOAL]\ncase inr.mpr.intro.intro.intro.refine_1\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\nc₁ c₂ : R\nhmul : coeff p 0 = c₁ * c₂\nhadd : coeff p 1 = c₁ + c₂\n⊢ (X + ↑C c₁) * (X + ↑C c₂) = p\n[PROOFSTEP]\nrw [p.as_sum_range_C_mul_X_pow, hnd, Finset.sum_range_succ, Finset.sum_range_succ, Finset.sum_range_one, ← hnd,\n  hm.coeff_natDegree, hnd, hmul, hadd, C_mul, C_add, C_1]\n[GOAL]\ncase inr.mpr.intro.intro.intro.refine_1\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\nc₁ c₂ : R\nhmul : coeff p 0 = c₁ * c₂\nhadd : coeff p 1 = c₁ + c₂\n⊢ (X + ↑C c₁) * (X + ↑C c₂) = ↑C c₁ * ↑C c₂ * X ^ 0 + (↑C c₁ + ↑C c₂) * X ^ 1 + 1 * X ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase inr.mpr.intro.intro.intro.refine_2\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\nc₁ c₂ : R\nhmul : coeff p 0 = c₁ * c₂\nhadd : coeff p 1 = c₁ + c₂\n⊢ natDegree (X + ↑C c₂) ∈ Ioc 0 (2 / 2)\n[PROOFSTEP]\nrw [mem_Ioc, natDegree_X_add_C _]\n[GOAL]\ncase inr.mpr.intro.intro.intro.refine_2\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\nc₁ c₂ : R\nhmul : coeff p 0 = c₁ * c₂\nhadd : coeff p 1 = c₁ + c₂\n⊢ 0 < 1 ∧ 1 ≤ 2 / 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\nhm : Monic p\nhnd : natDegree p = 2\nh✝ : Nontrivial R\n⊢ p ≠ 1\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nq : R[X]\nh✝ : Nontrivial R\nhm : Monic 1\nhnd : natDegree 1 = 2\n⊢ False\n[PROOFSTEP]\nsimp [natDegree_one] at hnd \n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\np q : R[X]\n⊢ IsRoot (p * q) a ↔ IsRoot p a ∨ IsRoot q a\n[PROOFSTEP]\nsimp_rw [IsRoot, eval_mul, mul_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝ : CommRing R\np : R[X]\np0 : p ≠ 0\na : R\nn : ℕ\n⊢ n ≤ rootMultiplicity a p ↔ (X - ↑C a) ^ n ∣ p\n[PROOFSTEP]\nclassical\nrw [rootMultiplicity_eq_nat_find_of_nonzero p0, Nat.le_find_iff]\nsimp_rw [Classical.not_not]\nrefine ⟨fun h => ?_, fun h m hm => (pow_dvd_pow _ hm).trans h⟩\ncases' n with n;\n· rw [pow_zero]\n  apply one_dvd;\n· exact h n n.lt_succ_self\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝ : CommRing R\np : R[X]\np0 : p ≠ 0\na : R\nn : ℕ\n⊢ n ≤ rootMultiplicity a p ↔ (X - ↑C a) ^ n ∣ p\n[PROOFSTEP]\nrw [rootMultiplicity_eq_nat_find_of_nonzero p0, Nat.le_find_iff]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝ : CommRing R\np : R[X]\np0 : p ≠ 0\na : R\nn : ℕ\n⊢ (∀ (m : ℕ), m < n → ¬¬(X - ↑C a) ^ (m + 1) ∣ p) ↔ (X - ↑C a) ^ n ∣ p\n[PROOFSTEP]\nsimp_rw [Classical.not_not]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝ : CommRing R\np : R[X]\np0 : p ≠ 0\na : R\nn : ℕ\n⊢ (∀ (m : ℕ), m < n → (X - ↑C a) ^ (m + 1) ∣ p) ↔ (X - ↑C a) ^ n ∣ p\n[PROOFSTEP]\nrefine ⟨fun h => ?_, fun h m hm => (pow_dvd_pow _ hm).trans h⟩\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝ : CommRing R\np : R[X]\np0 : p ≠ 0\na : R\nn : ℕ\nh : ∀ (m : ℕ), m < n → (X - ↑C a) ^ (m + 1) ∣ p\n⊢ (X - ↑C a) ^ n ∣ p\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝ : CommRing R\np : R[X]\np0 : p ≠ 0\na : R\nh : ∀ (m : ℕ), m < Nat.zero → (X - ↑C a) ^ (m + 1) ∣ p\n⊢ (X - ↑C a) ^ Nat.zero ∣ p\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝ : CommRing R\np : R[X]\np0 : p ≠ 0\na : R\nh : ∀ (m : ℕ), m < Nat.zero → (X - ↑C a) ^ (m + 1) ∣ p\n⊢ 1 ∣ p\n[PROOFSTEP]\napply one_dvd\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝ : CommRing R\np : R[X]\np0 : p ≠ 0\na : R\nn : ℕ\nh : ∀ (m : ℕ), m < Nat.succ n → (X - ↑C a) ^ (m + 1) ∣ p\n⊢ (X - ↑C a) ^ Nat.succ n ∣ p\n[PROOFSTEP]\nexact h n n.lt_succ_self\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝ : CommRing R\np : R[X]\np0 : p ≠ 0\na : R\nn : ℕ\n⊢ rootMultiplicity a p ≤ n ↔ ¬(X - ↑C a) ^ (n + 1) ∣ p\n[PROOFSTEP]\nrw [← (le_rootMultiplicity_iff p0).not, not_le, Nat.lt_add_one_iff]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝ : CommRing R\np : R[X]\np0 : p ≠ 0\na : R\n⊢ ¬(X - ↑C a) ^ (rootMultiplicity a p + 1) ∣ p\n[PROOFSTEP]\nrw [← rootMultiplicity_le_iff p0]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝ : CommRing R\np q : R[X]\na : R\nhzero : p + q ≠ 0\n⊢ min (rootMultiplicity a p) (rootMultiplicity a q) ≤ rootMultiplicity a (p + q)\n[PROOFSTEP]\nrw [le_rootMultiplicity_iff hzero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝ : CommRing R\np q : R[X]\na : R\nhzero : p + q ≠ 0\n⊢ (X - ↑C a) ^ min (rootMultiplicity a p) (rootMultiplicity a q) ∣ p + q\n[PROOFSTEP]\nhave hdivp : (X - C a) ^ rootMultiplicity a p ∣ p := pow_rootMultiplicity_dvd p a\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝ : CommRing R\np q : R[X]\na : R\nhzero : p + q ≠ 0\nhdivp : (X - ↑C a) ^ rootMultiplicity a p ∣ p\n⊢ (X - ↑C a) ^ min (rootMultiplicity a p) (rootMultiplicity a q) ∣ p + q\n[PROOFSTEP]\nhave hdivq : (X - C a) ^ rootMultiplicity a q ∣ q := pow_rootMultiplicity_dvd q a\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝ : CommRing R\np q : R[X]\na : R\nhzero : p + q ≠ 0\nhdivp : (X - ↑C a) ^ rootMultiplicity a p ∣ p\nhdivq : (X - ↑C a) ^ rootMultiplicity a q ∣ q\n⊢ (X - ↑C a) ^ min (rootMultiplicity a p) (rootMultiplicity a q) ∣ p + q\n[PROOFSTEP]\nexact min_pow_dvd_add hdivp hdivq\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nr : R\nx✝¹ x✝ : R[X]\n⊢ X - ↑C r ∣ x✝¹ * x✝ → X - ↑C r ∣ x✝¹ ∨ X - ↑C r ∣ x✝\n[PROOFSTEP]\nsimp_rw [dvd_iff_isRoot, IsRoot.def, eval_mul, mul_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nr : R\nx✝¹ x✝ : R[X]\n⊢ eval r x✝¹ = 0 ∨ eval r x✝ = 0 → eval r x✝¹ = 0 ∨ eval r x✝ = 0\n[PROOFSTEP]\nexact id\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\n⊢ Prime X\n[PROOFSTEP]\nconvert prime_X_sub_C (0 : R)\n[GOAL]\ncase h.e'_3\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\n⊢ X = X - ↑C 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp1 : degree p = 1\nhm : Monic p\n⊢ p = X - ↑C (-coeff p 0)\n[PROOFSTEP]\nsimpa [hm.leadingCoeff] using eq_X_add_C_of_degree_eq_one hp1\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp : Monic p\nhq : Monic q\nhpq : Associated p q\n⊢ p = q\n[PROOFSTEP]\nobtain ⟨u, hu⟩ := hpq\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp : Monic p\nhq : Monic q\nu : R[X]ˣ\nhu : p * ↑u = q\n⊢ p = q\n[PROOFSTEP]\nunfold Monic at hp hq \n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp : leadingCoeff p = 1\nhq : leadingCoeff q = 1\nu : R[X]ˣ\nhu : p * ↑u = q\n⊢ p = q\n[PROOFSTEP]\nrw [eq_C_of_degree_le_zero (degree_coe_units _).le] at hu \n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp : leadingCoeff p = 1\nhq : leadingCoeff q = 1\nu : R[X]ˣ\nhu : p * ↑C (coeff (↑u) 0) = q\n⊢ p = q\n[PROOFSTEP]\nrw [← hu, leadingCoeff_mul, hp, one_mul, leadingCoeff_C] at hq \n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp : leadingCoeff p = 1\nu : R[X]ˣ\nhq : coeff (↑u) 0 = 1\nhu : p * ↑C (coeff (↑u) 0) = q\n⊢ p = q\n[PROOFSTEP]\nrwa [hq, C_1, mul_one] at hu \n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nx : R\nhpq : p * q ≠ 0\n⊢ rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q\n[PROOFSTEP]\nclassical\nhave hp : p ≠ 0 := left_ne_zero_of_mul hpq\nhave hq : q ≠ 0 := right_ne_zero_of_mul hpq\nrw [rootMultiplicity_eq_multiplicity (p * q), dif_neg hpq, rootMultiplicity_eq_multiplicity p, dif_neg hp,\n  rootMultiplicity_eq_multiplicity q, dif_neg hq, multiplicity.mul' (prime_X_sub_C x)]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nx : R\nhpq : p * q ≠ 0\n⊢ rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q\n[PROOFSTEP]\nhave hp : p ≠ 0 := left_ne_zero_of_mul hpq\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nx : R\nhpq : p * q ≠ 0\nhp : p ≠ 0\n⊢ rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q\n[PROOFSTEP]\nhave hq : q ≠ 0 := right_ne_zero_of_mul hpq\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nx : R\nhpq : p * q ≠ 0\nhp : p ≠ 0\nhq : q ≠ 0\n⊢ rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q\n[PROOFSTEP]\nrw [rootMultiplicity_eq_multiplicity (p * q), dif_neg hpq, rootMultiplicity_eq_multiplicity p, dif_neg hp,\n  rootMultiplicity_eq_multiplicity q, dif_neg hq, multiplicity.mul' (prime_X_sub_C x)]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nx : R\n⊢ rootMultiplicity x (X - ↑C x) = 1\n[PROOFSTEP]\nclassical rw [rootMultiplicity_eq_multiplicity, dif_neg (X_sub_C_ne_zero x), multiplicity.get_multiplicity_self]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nx : R\n⊢ rootMultiplicity x (X - ↑C x) = 1\n[PROOFSTEP]\nrw [rootMultiplicity_eq_multiplicity, dif_neg (X_sub_C_ne_zero x), multiplicity.get_multiplicity_self]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np q : R[X]\ninst✝ : DecidableEq R\nx y : R\n⊢ rootMultiplicity x (X - ↑C y) = if x = y then 1 else 0\n[PROOFSTEP]\nsplit_ifs with hxy\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np q : R[X]\ninst✝ : DecidableEq R\nx y : R\nhxy : x = y\n⊢ rootMultiplicity x (X - ↑C y) = 1\n[PROOFSTEP]\nrw [hxy]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np q : R[X]\ninst✝ : DecidableEq R\nx y : R\nhxy : x = y\n⊢ rootMultiplicity y (X - ↑C y) = 1\n[PROOFSTEP]\nexact rootMultiplicity_X_sub_C_self\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np q : R[X]\ninst✝ : DecidableEq R\nx y : R\nhxy : ¬x = y\n⊢ rootMultiplicity x (X - ↑C y) = 0\n[PROOFSTEP]\nexact rootMultiplicity_eq_zero (mt root_X_sub_C.mp (Ne.symm hxy))\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\na : R\nn : ℕ\n⊢ rootMultiplicity a ((X - ↑C a) ^ n) = n\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\na : R\n⊢ rootMultiplicity a ((X - ↑C a) ^ Nat.zero) = Nat.zero\n[PROOFSTEP]\nrefine' rootMultiplicity_eq_zero _\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\na : R\n⊢ ¬IsRoot ((X - ↑C a) ^ Nat.zero) a\n[PROOFSTEP]\nsimp only [eval_one, IsRoot.def, not_false_iff, one_ne_zero, pow_zero, Nat.zero_eq]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\na : R\nn : ℕ\nhn : rootMultiplicity a ((X - ↑C a) ^ n) = n\n⊢ rootMultiplicity a ((X - ↑C a) ^ Nat.succ n) = Nat.succ n\n[PROOFSTEP]\nhave hzero := pow_ne_zero n.succ (X_sub_C_ne_zero a)\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\na : R\nn : ℕ\nhn : rootMultiplicity a ((X - ↑C a) ^ n) = n\nhzero : (X - ↑C a) ^ Nat.succ n ≠ 0\n⊢ rootMultiplicity a ((X - ↑C a) ^ Nat.succ n) = Nat.succ n\n[PROOFSTEP]\nrw [pow_succ (X - C a) n] at hzero ⊢\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\na : R\nn : ℕ\nhn : rootMultiplicity a ((X - ↑C a) ^ n) = n\nhzero : (X - ↑C a) * (X - ↑C a) ^ n ≠ 0\n⊢ rootMultiplicity a ((X - ↑C a) * (X - ↑C a) ^ n) = Nat.succ n\n[PROOFSTEP]\nsimp only [rootMultiplicity_mul hzero, rootMultiplicity_X_sub_C_self, hn, Nat.one_add]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh✝ : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nh : p /ₘ (X - ↑C x) = 0\n⊢ False\n[PROOFSTEP]\nrw [← mul_divByMonic_eq_iff_isRoot.2 hx, h, mul_zero] at hp \n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nthis : Decidable (∃ x, IsRoot p x)\nh✝ : ∃ x, IsRoot p x\nx : R\nhp : 0 ≠ 0\nhx : IsRoot p x\nhpd : 0 < degree p\nh : p /ₘ (X - ↑C x) = 0\n⊢ False\n[PROOFSTEP]\nexact hp rfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\n⊢ 0 < 1\n[PROOFSTEP]\ndecide\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\n⊢ degree (X - ↑C x) ≤ degree p\n[PROOFSTEP]\nrw [degree_X_sub_C, degree_eq_natDegree hp]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\n⊢ 1 ≤ ↑(natDegree p)\n[PROOFSTEP]\nrw [degree_eq_natDegree hp] at hpd \n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < ↑(natDegree p)\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\n⊢ 1 ≤ ↑(natDegree p)\n[PROOFSTEP]\nexact WithBot.coe_le_coe.2 (WithBot.coe_lt_coe.1 hpd)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\n⊢ ↑(↑Multiset.card (x ::ₘ t)) = ↑(↑Multiset.card t) + 1\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\n⊢ ↑Multiset.card (x ::ₘ t) = Add.add (↑(↑Multiset.card t)) 1\n[PROOFSTEP]\nexact_mod_cast Multiset.card_cons _ _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\n⊢ ↑(↑Multiset.card t) + 1 ≤ degree p\n[PROOFSTEP]\nrw [← degree_add_divByMonic (monic_X_sub_C x) hdeg, degree_X_sub_C, add_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\n⊢ 1 + ↑(↑Multiset.card t) ≤ 1 + degree (p /ₘ (X - ↑C x))\n[PROOFSTEP]\nexact add_le_add (le_refl (1 : WithBot ℕ)) htd\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\n⊢ ∀ (a : R), count a (x ::ₘ t) = rootMultiplicity a p\n[PROOFSTEP]\nchange ∀ (a : R), count a (x ::ₘ t) = rootMultiplicity a p\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\n⊢ ∀ (a : R), count a (x ::ₘ t) = rootMultiplicity a p\n[PROOFSTEP]\nintro a\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\na : R\n⊢ count a (x ::ₘ t) = rootMultiplicity a p\n[PROOFSTEP]\nconv_rhs => rw [← mul_divByMonic_eq_iff_isRoot.mpr hx]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\na : R\n| rootMultiplicity a p\n[PROOFSTEP]\nrw [← mul_divByMonic_eq_iff_isRoot.mpr hx]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\na : R\n| rootMultiplicity a p\n[PROOFSTEP]\nrw [← mul_divByMonic_eq_iff_isRoot.mpr hx]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\na : R\n| rootMultiplicity a p\n[PROOFSTEP]\nrw [← mul_divByMonic_eq_iff_isRoot.mpr hx]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\na : R\n⊢ count a (x ::ₘ t) = rootMultiplicity a ((X - ↑C x) * (p /ₘ (X - ↑C x)))\n[PROOFSTEP]\nrw [rootMultiplicity_mul (mul_ne_zero (X_sub_C_ne_zero x) hdiv0), rootMultiplicity_X_sub_C, ← htr a]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\na : R\n⊢ count a (x ::ₘ t) = (if a = x then 1 else 0) + count a t\n[PROOFSTEP]\nsplit_ifs with ha\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\na : R\nha : a = x\n⊢ count a (x ::ₘ t) = 1 + count a t\n[PROOFSTEP]\nrw [ha, count_cons_self, add_comm]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\nt : Multiset R\nhtd : ↑(↑Multiset.card t) ≤ degree (p /ₘ (X - ↑C x))\nhtr : ∀ (a : R), count a t = rootMultiplicity a (p /ₘ (X - ↑C x))\nhdeg : degree (X - ↑C x) ≤ degree p\nhdiv0 : p /ₘ (X - ↑C x) ≠ 0\na : R\nha : ¬a = x\n⊢ count a (x ::ₘ t) = 0 + count a t\n[PROOFSTEP]\nrw [count_cons_of_ne ha, zero_add]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ¬∃ x, IsRoot p x\n⊢ ∀ (a : R), count a 0 = rootMultiplicity a p\n[PROOFSTEP]\nintro a\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p ≠ 0\nthis : Decidable (∃ x, IsRoot p x)\nh : ¬∃ x, IsRoot p x\na : R\n⊢ count a 0 = rootMultiplicity a p\n[PROOFSTEP]\nrw [count_zero, rootMultiplicity_eq_zero (not_exists.mp h a)]\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DecidableEq R\n_x✝ : (x : R[X]) ×' x ≠ 0\na✝¹ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y _x✝ →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\nx✝² : R[X]\nx✝¹ : x✝² ≠ 0\na✝ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y\n        { fst := x✝², snd := x✝¹ } →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\np : R[X]\nhp : p ≠ 0\nx✝ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y\n        { fst := p, snd := hp } →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\n⊢ (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1\n    { fst := p /ₘ (X - ↑C x), snd := hd0 } { fst := p, snd := hp }\n[PROOFSTEP]\n{ simp_wf\n  apply WithBot.coe_lt_coe.mp\n  simp only [degree_eq_natDegree hp, degree_eq_natDegree hd0, ← Nat.cast_withBot] at wf ; assumption\n}\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DecidableEq R\n_x✝ : (x : R[X]) ×' x ≠ 0\na✝¹ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y _x✝ →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\nx✝² : R[X]\nx✝¹ : x✝² ≠ 0\na✝ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y\n        { fst := x✝², snd := x✝¹ } →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\np : R[X]\nhp : p ≠ 0\nx✝ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y\n        { fst := p, snd := hp } →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\n⊢ (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1\n    { fst := p /ₘ (X - ↑C x), snd := hd0 } { fst := p, snd := hp }\n[PROOFSTEP]\nsimp_wf\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DecidableEq R\n_x✝ : (x : R[X]) ×' x ≠ 0\na✝¹ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y _x✝ →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\nx✝² : R[X]\nx✝¹ : x✝² ≠ 0\na✝ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y\n        { fst := x✝², snd := x✝¹ } →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\np : R[X]\nhp : p ≠ 0\nx✝ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y\n        { fst := p, snd := hp } →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\n⊢ natDegree (p /ₘ (X - ↑C x)) < natDegree p\n[PROOFSTEP]\napply WithBot.coe_lt_coe.mp\n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DecidableEq R\n_x✝ : (x : R[X]) ×' x ≠ 0\na✝¹ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y _x✝ →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\nx✝² : R[X]\nx✝¹ : x✝² ≠ 0\na✝ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y\n        { fst := x✝², snd := x✝¹ } →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\np : R[X]\nhp : p ≠ 0\nx✝ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y\n        { fst := p, snd := hp } →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : degree (p /ₘ (X - ↑C x)) < degree p\n⊢ ↑(natDegree (p /ₘ (X - ↑C x))) < ↑(natDegree p)\n[PROOFSTEP]\nsimp only [degree_eq_natDegree hp, degree_eq_natDegree hd0, ← Nat.cast_withBot] at wf \n[GOAL]\nR : Type u\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DecidableEq R\n_x✝ : (x : R[X]) ×' x ≠ 0\na✝¹ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y _x✝ →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\nx✝² : R[X]\nx✝¹ : x✝² ≠ 0\na✝ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y\n        { fst := x✝², snd := x✝¹ } →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\np : R[X]\nhp : p ≠ 0\nx✝ :\n  ∀ (y : (x : R[X]) ×' x ≠ 0),\n    (invImage (fun a => PSigma.casesOn a fun p snd => natDegree p) instWellFoundedRelation).1 y\n        { fst := p, snd := hp } →\n      ∃ s, ↑(↑Multiset.card s) ≤ degree y.1 ∧ ∀ (a : R), count a s = rootMultiplicity a y.1\nh : ∃ x, IsRoot p x\nx : R\nhx : IsRoot p x\nhpd : 0 < degree p\nhd0 : p /ₘ (X - ↑C x) ≠ 0\nwf : ↑(natDegree (p /ₘ (X - ↑C x))) < ↑(natDegree p)\n⊢ ↑(natDegree (p /ₘ (X - ↑C x))) < ↑(natDegree p)\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\np✝ q : R[X]\ninst✝¹ : DecidableEq R\np : R[X]\ninst✝ : Decidable (p = 0)\n⊢ roots p =\n    if h : p = 0 then ∅\n    else Classical.choose (_ : ∃ s, ↑(↑Multiset.card s) ≤ degree p ∧ ∀ (a : R), count a s = rootMultiplicity a p)\n[PROOFSTEP]\nrename_i iR ip0\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q : R[X]\niR : DecidableEq R\np : R[X]\nip0 : Decidable (p = 0)\n⊢ roots p =\n    if h : p = 0 then ∅\n    else Classical.choose (_ : ∃ s, ↑(↑Multiset.card s) ≤ degree p ∧ ∀ (a : R), count a s = rootMultiplicity a p)\n[PROOFSTEP]\nobtain rfl := Subsingleton.elim iR (Classical.decEq R)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nip0 : Decidable (p = 0)\n⊢ roots p =\n    if h : p = 0 then ∅\n    else Classical.choose (_ : ∃ s, ↑(↑Multiset.card s) ≤ degree p ∧ ∀ (a : R), count a s = rootMultiplicity a p)\n[PROOFSTEP]\nobtain rfl := Subsingleton.elim ip0 (Classical.dec (p = 0))\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\n⊢ roots p =\n    if h : p = 0 then ∅\n    else Classical.choose (_ : ∃ s, ↑(↑Multiset.card s) ≤ degree p ∧ ∀ (a : R), count a s = rootMultiplicity a p)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp0 : p ≠ 0\n⊢ ↑(↑Multiset.card (roots p)) ≤ degree p\n[PROOFSTEP]\nclassical\nunfold roots\nrw [dif_neg hp0]\nexact (Classical.choose_spec (exists_multiset_roots hp0)).1\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp0 : p ≠ 0\n⊢ ↑(↑Multiset.card (roots p)) ≤ degree p\n[PROOFSTEP]\nunfold roots\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp0 : p ≠ 0\n⊢ ↑(↑Multiset.card\n        (if h : p = 0 then ∅\n        else\n          Classical.choose (_ : ∃ s, ↑(↑Multiset.card s) ≤ degree p ∧ ∀ (a : R), count a s = rootMultiplicity a p))) ≤\n    degree p\n[PROOFSTEP]\nrw [dif_neg hp0]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp0 : p ≠ 0\n⊢ ↑(↑Multiset.card\n        (Classical.choose (_ : ∃ s, ↑(↑Multiset.card s) ≤ degree p ∧ ∀ (a : R), count a s = rootMultiplicity a p))) ≤\n    degree p\n[PROOFSTEP]\nexact (Classical.choose_spec (exists_multiset_roots hp0)).1\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\n⊢ ↑Multiset.card (roots p) ≤ natDegree p\n[PROOFSTEP]\nby_cases hp0 : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nhp0 : p = 0\n⊢ ↑Multiset.card (roots p) ≤ natDegree p\n[PROOFSTEP]\nsimp [hp0]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nhp0 : ¬p = 0\n⊢ ↑Multiset.card (roots p) ≤ natDegree p\n[PROOFSTEP]\nexact WithBot.coe_le_coe.1 (le_trans (card_roots hp0) (le_of_eq <| degree_eq_natDegree hp0))\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\na : R\nhp0 : 0 < degree p\n⊢ degree (p - ↑C a) = degree p\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← C_neg]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\na : R\nhp0 : 0 < degree p\n⊢ degree (p + ↑C (-a)) = degree p\n[PROOFSTEP]\nexact degree_add_C hp0\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\na : R\nhp0 : 0 < degree p\nh : p = 0\n⊢ False\n[PROOFSTEP]\nsimp_all [lt_irrefl]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\n⊢ count a (roots p) = rootMultiplicity a p\n[PROOFSTEP]\nclassical\nby_cases hp : p = 0\n· simp [hp]\nrw [roots_def, dif_neg hp]\nexact (Classical.choose_spec (exists_multiset_roots hp)).2 a\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\n⊢ count a (roots p) = rootMultiplicity a p\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : p = 0\n⊢ count a (roots p) = rootMultiplicity a p\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : ¬p = 0\n⊢ count a (roots p) = rootMultiplicity a p\n[PROOFSTEP]\nrw [roots_def, dif_neg hp]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : DecidableEq R\np : R[X]\nhp : ¬p = 0\n⊢ count a (Classical.choose (_ : ∃ s, ↑(↑Multiset.card s) ≤ degree p ∧ ∀ (a : R), count a s = rootMultiplicity a p)) =\n    rootMultiplicity a p\n[PROOFSTEP]\nexact (Classical.choose_spec (exists_multiset_roots hp)).2 a\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\n⊢ a ∈ roots p ↔ p ≠ 0 ∧ IsRoot p a\n[PROOFSTEP]\nclassical rw [← count_pos, count_roots p, rootMultiplicity_pos']\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\n⊢ a ∈ roots p ↔ p ≠ 0 ∧ IsRoot p a\n[PROOFSTEP]\nrw [← count_pos, count_roots p, rootMultiplicity_pos']\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nx : R\nw : p ≠ 0\n⊢ x ∈ roots p ↔ ↑(aeval x) p = 0\n[PROOFSTEP]\nrw [mem_roots w, IsRoot.def, aeval_def, eval₂_eq_eval_map]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nx : R\nw : p ≠ 0\n⊢ eval x p = 0 ↔ eval x (map (algebraMap R R) p) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nhp : p ≠ 0\n⊢ Set.Finite {x | IsRoot p x}\n[PROOFSTEP]\nclassical simpa only [← Finset.setOf_mem, Multiset.mem_toFinset, mem_roots hp] using p.roots.toFinset.finite_toSet\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nhp : p ≠ 0\n⊢ Set.Finite {x | IsRoot p x}\n[PROOFSTEP]\nsimpa only [← Finset.setOf_mem, Multiset.mem_toFinset, mem_roots hp] using p.roots.toFinset.finite_toSet\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nh : Set.Infinite {x | eval x p = eval x q}\n⊢ p = q\n[PROOFSTEP]\nrw [← sub_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nh : Set.Infinite {x | eval x p = eval x q}\n⊢ p - q = 0\n[PROOFSTEP]\napply eq_zero_of_infinite_isRoot\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nh : Set.Infinite {x | eval x p = eval x q}\n⊢ Set.Infinite {x | IsRoot (p - q) x}\n[PROOFSTEP]\nsimpa only [IsRoot, eval_sub, sub_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhpq : p * q ≠ 0\n⊢ roots (p * q) = roots p + roots q\n[PROOFSTEP]\nclassical exact\n  Multiset.ext.mpr fun r => by rw [count_add, count_roots, count_roots, count_roots, rootMultiplicity_mul hpq]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhpq : p * q ≠ 0\n⊢ roots (p * q) = roots p + roots q\n[PROOFSTEP]\nexact Multiset.ext.mpr fun r => by rw [count_add, count_roots, count_roots, count_roots, rootMultiplicity_mul hpq]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhpq : p * q ≠ 0\nr : R\n⊢ count r (roots (p * q)) = count r (roots p + roots q)\n[PROOFSTEP]\nrw [count_add, count_roots, count_roots, count_roots, rootMultiplicity_mul hpq]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh : q ≠ 0\n⊢ p ∣ q → roots p ≤ roots q\n[PROOFSTEP]\nrintro ⟨k, rfl⟩\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np k : R[X]\nh : p * k ≠ 0\n⊢ roots p ≤ roots (p * k)\n[PROOFSTEP]\nexact Multiset.le_iff_exists_add.mpr ⟨k.roots, roots_mul h⟩\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\na x : R\n⊢ x ∈ roots (p - ↑C a) ↔ p ≠ ↑C a ∧ eval x p = a\n[PROOFSTEP]\nrw [mem_roots', IsRoot.def, sub_ne_zero, eval_sub, sub_eq_zero, eval_C]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nr : R\n⊢ roots (X - ↑C r) = {r}\n[PROOFSTEP]\nclassical\next s\nrw [count_roots, rootMultiplicity_X_sub_C, count_singleton]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nr : R\n⊢ roots (X - ↑C r) = {r}\n[PROOFSTEP]\next s\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nr s : R\n⊢ count s (roots (X - ↑C r)) = count s {r}\n[PROOFSTEP]\nrw [count_roots, rootMultiplicity_X_sub_C, count_singleton]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\n⊢ roots X = {0}\n[PROOFSTEP]\nrw [← roots_X_sub_C, C_0, sub_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nx : R\n⊢ roots (↑C x) = 0\n[PROOFSTEP]\nclassical exact\n  if H : x = 0 then by rw [H, C_0, roots_zero]\n  else Multiset.ext.mpr fun r => (by rw [count_roots, count_zero, rootMultiplicity_eq_zero (not_isRoot_C _ _ H)])\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nx : R\n⊢ roots (↑C x) = 0\n[PROOFSTEP]\nexact\n  if H : x = 0 then by rw [H, C_0, roots_zero]\n  else Multiset.ext.mpr fun r => (by rw [count_roots, count_zero, rootMultiplicity_eq_zero (not_isRoot_C _ _ H)])\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nx : R\nH : x = 0\n⊢ roots (↑C x) = 0\n[PROOFSTEP]\nrw [H, C_0, roots_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nx : R\nH : ¬x = 0\nr : R\n⊢ count r (roots (↑C x)) = count r 0\n[PROOFSTEP]\nrw [count_roots, count_zero, rootMultiplicity_eq_zero (not_isRoot_C _ _ H)]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nha : a ≠ 0\n⊢ roots (↑C a * p) = roots p\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nha : a ≠ 0\nhp : p = 0\n⊢ roots (↑C a * p) = roots p\n[PROOFSTEP]\nsimp only [roots_mul, *, Ne.def, mul_eq_zero, C_eq_zero, or_self_iff, not_false_iff, roots_C, zero_add, mul_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nha : a ≠ 0\nhp : ¬p = 0\n⊢ roots (↑C a * p) = roots p\n[PROOFSTEP]\nsimp only [roots_mul, *, Ne.def, mul_eq_zero, C_eq_zero, or_self_iff, not_false_iff, roots_C, zero_add, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nha : a ≠ 0\n⊢ roots (a • p) = roots p\n[PROOFSTEP]\nrw [smul_eq_C_mul, roots_C_mul _ ha]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nL : List R[X]\nhd : R[X]\ntl : List R[X]\nih : ¬0 ∈ tl → roots (List.prod tl) = Multiset.bind (↑tl) roots\nH : ¬0 ∈ hd :: tl\n⊢ roots (List.prod (hd :: tl)) = Multiset.bind (↑(hd :: tl)) roots\n[PROOFSTEP]\nrw [List.mem_cons, not_or] at H \n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nL : List R[X]\nhd : R[X]\ntl : List R[X]\nih : ¬0 ∈ tl → roots (List.prod tl) = Multiset.bind (↑tl) roots\nH : ¬0 = hd ∧ ¬0 ∈ tl\n⊢ roots (List.prod (hd :: tl)) = Multiset.bind (↑(hd :: tl)) roots\n[PROOFSTEP]\nrw [List.prod_cons, roots_mul (mul_ne_zero (Ne.symm H.1) <| List.prod_ne_zero H.2), ← Multiset.cons_coe,\n  Multiset.cons_bind, ih H.2]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nm : Multiset R[X]\n⊢ ¬0 ∈ m → roots (prod m) = Multiset.bind m roots\n[PROOFSTEP]\nrcases m with ⟨L⟩\n[GOAL]\ncase mk\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nm : Multiset R[X]\nL : List R[X]\n⊢ ¬0 ∈ Quot.mk Setoid.r L → roots (prod (Quot.mk Setoid.r L)) = Multiset.bind (Quot.mk Setoid.r L) roots\n[PROOFSTEP]\nsimpa only [Multiset.coe_prod, quot_mk_to_coe''] using roots_list_prod L\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nι : Type u_1\nf : ι → R[X]\ns : Finset ι\n⊢ Finset.prod s f ≠ 0 → roots (Finset.prod s f) = Multiset.bind s.val fun i => roots (f i)\n[PROOFSTEP]\nrcases s with ⟨m, hm⟩\n[GOAL]\ncase mk\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nι : Type u_1\nf : ι → R[X]\nm : Multiset ι\nhm : Nodup m\n⊢ Finset.prod { val := m, nodup := hm } f ≠ 0 →\n    roots (Finset.prod { val := m, nodup := hm } f) = Multiset.bind { val := m, nodup := hm }.val fun i => roots (f i)\n[PROOFSTEP]\nsimpa [Multiset.prod_eq_zero_iff, Multiset.bind_map] using roots_multiset_prod (m.map f)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nn : ℕ\n⊢ roots (p ^ n) = n • roots p\n[PROOFSTEP]\ninduction' n with n ihn\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\n⊢ roots (p ^ Nat.zero) = Nat.zero • roots p\n[PROOFSTEP]\nrw [pow_zero, roots_one, Nat.zero_eq, zero_smul, empty_eq_zero]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nn : ℕ\nihn : roots (p ^ n) = n • roots p\n⊢ roots (p ^ Nat.succ n) = Nat.succ n • roots p\n[PROOFSTEP]\nrcases eq_or_ne p 0 with (rfl | hp)\n[GOAL]\ncase succ.inl\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\nihn : roots (0 ^ n) = n • roots 0\n⊢ roots (0 ^ Nat.succ n) = Nat.succ n • roots 0\n[PROOFSTEP]\nrw [zero_pow n.succ_pos, roots_zero, smul_zero]\n[GOAL]\ncase succ.inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nn : ℕ\nihn : roots (p ^ n) = n • roots p\nhp : p ≠ 0\n⊢ roots (p ^ Nat.succ n) = Nat.succ n • roots p\n[PROOFSTEP]\nrw [pow_succ', roots_mul (mul_ne_zero (pow_ne_zero _ hp) hp), ihn, Nat.succ_eq_add_one, add_smul, one_smul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\n⊢ roots (X ^ n) = n • {0}\n[PROOFSTEP]\nrw [roots_pow, roots_X]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nha : a ≠ 0\nn : ℕ\n⊢ roots (↑C a * X ^ n) = n • {0}\n[PROOFSTEP]\nrw [roots_C_mul _ ha, roots_X_pow]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nha : a ≠ 0\nn : ℕ\n⊢ roots (↑(monomial n) a) = n • {0}\n[PROOFSTEP]\nrw [← C_mul_X_pow_eq_monomial, roots_C_mul_X_pow ha]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Finset R\n⊢ roots (Finset.prod s fun a => X - ↑C a) = s.val\n[PROOFSTEP]\napply (roots_prod (fun a => X - C a) s ?_).trans\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Finset R\n⊢ (Multiset.bind s.val fun i => roots (X - ↑C i)) = s.val\n[PROOFSTEP]\nsimp_rw [roots_X_sub_C]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Finset R\n⊢ (Multiset.bind s.val fun i => {i}) = s.val\n[PROOFSTEP]\nrw [Multiset.bind_singleton, Multiset.map_id']\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Finset R\n⊢ (Finset.prod s fun a => X - ↑C a) ≠ 0\n[PROOFSTEP]\nrefine prod_ne_zero_iff.mpr (fun a _ => X_sub_C_ne_zero a)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Multiset R\n⊢ roots (prod (Multiset.map (fun a => X - ↑C a) s)) = s\n[PROOFSTEP]\nrw [roots_multiset_prod, Multiset.bind_map]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Multiset R\n⊢ (Multiset.bind s fun a => roots (X - ↑C a)) = s\n[PROOFSTEP]\nsimp_rw [roots_X_sub_C]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Multiset R\n⊢ (Multiset.bind s fun a => {a}) = s\n[PROOFSTEP]\nrw [Multiset.bind_singleton, Multiset.map_id']\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Multiset R\n⊢ ¬0 ∈ Multiset.map (fun a => X - ↑C a) s\n[PROOFSTEP]\nrw [Multiset.mem_map]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Multiset R\n⊢ ¬∃ a, a ∈ s ∧ X - ↑C a = 0\n[PROOFSTEP]\nrintro ⟨a, -, h⟩\n[GOAL]\ncase a.intro.intro\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Multiset R\na : R\nh : X - ↑C a = 0\n⊢ False\n[PROOFSTEP]\nexact X_sub_C_ne_zero a h\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Multiset R\n⊢ natDegree (prod (Multiset.map (fun a => X - ↑C a) s)) = ↑Multiset.card s\n[PROOFSTEP]\nrw [natDegree_multiset_prod_of_monic, Multiset.map_map]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Multiset R\n⊢ Multiset.sum (Multiset.map (natDegree ∘ fun a => X - ↑C a) s) = ↑Multiset.card s\n[PROOFSTEP]\nsimp only [(· ∘ ·), natDegree_X_sub_C, Multiset.map_const', Multiset.sum_replicate, smul_eq_mul, mul_one]\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\ns : Multiset R\n⊢ ∀ (f : R[X]), f ∈ Multiset.map (fun a => X - ↑C a) s → Monic f\n[PROOFSTEP]\nexact Multiset.forall_mem_map_iff.2 fun a _ => monic_X_sub_C a\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\nhn : 0 < n\na x : R\n⊢ x ∈ nthRoots n a ↔ x ^ n = a\n[PROOFSTEP]\nrw [nthRoots, mem_roots (X_pow_sub_C_ne_zero hn a), IsRoot.def, eval_sub, eval_C, eval_pow, eval_X, sub_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nr : R\n⊢ nthRoots 0 r = 0\n[PROOFSTEP]\nsimp only [empty_eq_zero, pow_zero, nthRoots, ← C_1, ← C_sub, roots_C]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\na : R\n⊢ ↑Multiset.card (nthRoots n a) ≤ n\n[PROOFSTEP]\nclassical exact\n  (if hn : n = 0 then\n    if h : (X : R[X]) ^ n - C a = 0 then by\n      simp [Nat.zero_le, nthRoots, roots, h, dif_pos rfl, empty_eq_zero, Multiset.card_zero]\n    else\n      WithBot.coe_le_coe.1\n        (le_trans (card_roots h)\n          (by\n            rw [hn, pow_zero, ← C_1, ← RingHom.map_sub]\n            exact degree_C_le))\n  else by\n    rw [← WithBot.coe_le_coe]\n    simp only [← Nat.cast_withBot]\n    rw [← degree_X_pow_sub_C (Nat.pos_of_ne_zero hn) a]\n    exact card_roots (X_pow_sub_C_ne_zero (Nat.pos_of_ne_zero hn) a))\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\na : R\n⊢ ↑Multiset.card (nthRoots n a) ≤ n\n[PROOFSTEP]\nexact\n  (if hn : n = 0 then\n    if h : (X : R[X]) ^ n - C a = 0 then by\n      simp [Nat.zero_le, nthRoots, roots, h, dif_pos rfl, empty_eq_zero, Multiset.card_zero]\n    else\n      WithBot.coe_le_coe.1\n        (le_trans (card_roots h)\n          (by\n            rw [hn, pow_zero, ← C_1, ← RingHom.map_sub]\n            exact degree_C_le))\n  else by\n    rw [← WithBot.coe_le_coe]\n    simp only [← Nat.cast_withBot]\n    rw [← degree_X_pow_sub_C (Nat.pos_of_ne_zero hn) a]\n    exact card_roots (X_pow_sub_C_ne_zero (Nat.pos_of_ne_zero hn) a))\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\na : R\nhn : n = 0\nh : X ^ n - ↑C a = 0\n⊢ ↑Multiset.card (nthRoots n a) ≤ n\n[PROOFSTEP]\nsimp [Nat.zero_le, nthRoots, roots, h, dif_pos rfl, empty_eq_zero, Multiset.card_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\na : R\nhn : n = 0\nh : ¬X ^ n - ↑C a = 0\n⊢ degree (X ^ n - ↑C a) ≤ ↑n\n[PROOFSTEP]\nrw [hn, pow_zero, ← C_1, ← RingHom.map_sub]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\na : R\nhn : n = 0\nh : ¬X ^ n - ↑C a = 0\n⊢ degree (↑C (1 - a)) ≤ ↑0\n[PROOFSTEP]\nexact degree_C_le\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\na : R\nhn : ¬n = 0\n⊢ ↑Multiset.card (nthRoots n a) ≤ n\n[PROOFSTEP]\nrw [← WithBot.coe_le_coe]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\na : R\nhn : ¬n = 0\n⊢ ↑(↑Multiset.card (nthRoots n a)) ≤ ↑n\n[PROOFSTEP]\nsimp only [← Nat.cast_withBot]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\na : R\nhn : ¬n = 0\n⊢ ↑(↑Multiset.card (nthRoots n a)) ≤ ↑n\n[PROOFSTEP]\nrw [← degree_X_pow_sub_C (Nat.pos_of_ne_zero hn) a]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\na : R\nhn : ¬n = 0\n⊢ ↑(↑Multiset.card (nthRoots n a)) ≤ degree (X ^ n - ↑C a)\n[PROOFSTEP]\nexact card_roots (X_pow_sub_C_ne_zero (Nat.pos_of_ne_zero hn) a)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nr : R\n⊢ nthRoots 2 r = 0 ↔ ¬IsSquare r\n[PROOFSTEP]\nsimp_rw [isSquare_iff_exists_sq, eq_zero_iff_forall_not_mem, mem_nthRoots (by norm_num : 0 < 2), ← not_exists, eq_comm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nr : R\n⊢ 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn✝ : ℕ\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\np q : R✝[X]\nn : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DecidableEq R\n⊢ nthRootsFinset n R = toFinset (nthRoots n 1)\n[PROOFSTEP]\nunfold nthRootsFinset\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn✝ : ℕ\ninst✝⁴ : CommRing R✝\ninst✝³ : IsDomain R✝\np q : R✝[X]\nn : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : DecidableEq R\n⊢ toFinset (nthRoots n 1) = toFinset (nthRoots n 1)\n[PROOFSTEP]\nconvert rfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\nh : 0 < n\nx : R\n⊢ x ∈ nthRootsFinset n R ↔ x ^ n = 1\n[PROOFSTEP]\nclassical rw [nthRootsFinset_def, mem_toFinset, mem_nthRoots h]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn✝ : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nn : ℕ\nh : 0 < n\nx : R\n⊢ x ∈ nthRootsFinset n R ↔ x ^ n = 1\n[PROOFSTEP]\nrw [nthRootsFinset_def, mem_toFinset, mem_nthRoots h]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\n⊢ nthRootsFinset 0 R = ∅\n[PROOFSTEP]\nclassical simp [nthRootsFinset_def]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\n⊢ nthRootsFinset 0 R = ∅\n[PROOFSTEP]\nsimp [nthRootsFinset_def]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp : Monic p\nhq : Monic q\nh : natDegree q ≠ 0\n⊢ Monic (Polynomial.comp p q)\n[PROOFSTEP]\nrw [Monic.def, leadingCoeff_comp h, Monic.def.1 hp, Monic.def.1 hq, one_pow, one_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp : Monic p\nr : R\n⊢ Monic (Polynomial.comp p (X + ↑C r))\n[PROOFSTEP]\nrefine' hp.comp (monic_X_add_C _) fun ha => _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp : Monic p\nr : R\nha : natDegree (X + ↑C r) = 0\n⊢ False\n[PROOFSTEP]\nrw [natDegree_X_add_C] at ha \n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp : Monic p\nr : R\nha : 1 = 0\n⊢ False\n[PROOFSTEP]\nexact one_ne_zero ha\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp : Monic p\nr : R\n⊢ Monic (Polynomial.comp p (X - ↑C r))\n[PROOFSTEP]\nsimpa using hp.comp_X_add_C (-r)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q : R[X]\nc : R[X]ˣ\np : R[X]\n⊢ coeff (↑c) 0 • p = ↑c * p\n[PROOFSTEP]\nrw [← Polynomial.C_mul', ← Polynomial.eq_C_of_degree_eq_zero (degree_coe_units c)]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\n⊢ comp p q = 0 ↔ p = 0 ∨ eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\n⊢ comp p q = 0 → p = 0 ∨ eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh : comp p q = 0\n⊢ p = 0 ∨ eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0)\n[PROOFSTEP]\nhave key : p.natDegree = 0 ∨ q.natDegree = 0 := by rw [← mul_eq_zero, ← natDegree_comp, h, natDegree_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh : comp p q = 0\n⊢ natDegree p = 0 ∨ natDegree q = 0\n[PROOFSTEP]\nrw [← mul_eq_zero, ← natDegree_comp, h, natDegree_zero]\n[GOAL]\ncase mp\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh : comp p q = 0\nkey : natDegree p = 0 ∨ natDegree q = 0\n⊢ p = 0 ∨ eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0)\n[PROOFSTEP]\nreplace key := Or.imp eq_C_of_natDegree_eq_zero eq_C_of_natDegree_eq_zero key\n[GOAL]\ncase mp\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh : comp p q = 0\nkey : p = ↑C (coeff p 0) ∨ q = ↑C (coeff q 0)\n⊢ p = 0 ∨ eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0)\n[PROOFSTEP]\ncases' key with key key\n[GOAL]\ncase mp.inl\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh : comp p q = 0\nkey : p = ↑C (coeff p 0)\n⊢ p = 0 ∨ eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0)\n[PROOFSTEP]\nrw [key, C_comp] at h \n[GOAL]\ncase mp.inl\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh : ↑C (coeff p 0) = 0\nkey : p = ↑C (coeff p 0)\n⊢ p = 0 ∨ eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0)\n[PROOFSTEP]\nexact Or.inl (key.trans h)\n[GOAL]\ncase mp.inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh : comp p q = 0\nkey : q = ↑C (coeff q 0)\n⊢ p = 0 ∨ eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0)\n[PROOFSTEP]\nrw [key, comp_C, C_eq_zero] at h \n[GOAL]\ncase mp.inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh : eval (coeff q 0) p = 0\nkey : q = ↑C (coeff q 0)\n⊢ p = 0 ∨ eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0)\n[PROOFSTEP]\nexact Or.inr ⟨h, key⟩\n[GOAL]\ncase mpr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\n⊢ p = 0 ∨ eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0) → comp p q = 0\n[PROOFSTEP]\nexact fun h => Or.rec (fun h => by rw [h, zero_comp]) (fun h => by rw [h.2, comp_C, h.1, C_0]) h\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh✝ : p = 0 ∨ eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0)\nh : p = 0\n⊢ comp p q = 0\n[PROOFSTEP]\nrw [h, zero_comp]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh✝ : p = 0 ∨ eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0)\nh : eval (coeff q 0) p = 0 ∧ q = ↑C (coeff q 0)\n⊢ comp p q = 0\n[PROOFSTEP]\nrw [h.2, comp_C, h.1, C_0]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : Infinite R\np : R[X]\nh : ∀ (x : R), eval x p = 0\n⊢ p = 0\n[PROOFSTEP]\nclassical\nby_contra hp\nrefine @Fintype.false R _ ?_\nexact ⟨p.roots.toFinset, fun x => Multiset.mem_toFinset.mpr ((mem_roots hp).mpr (h _))⟩\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : Infinite R\np : R[X]\nh : ∀ (x : R), eval x p = 0\n⊢ p = 0\n[PROOFSTEP]\nby_contra hp\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : Infinite R\np : R[X]\nh : ∀ (x : R), eval x p = 0\nhp : ¬p = 0\n⊢ False\n[PROOFSTEP]\nrefine @Fintype.false R _ ?_\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q : R[X]\ninst✝ : Infinite R\np : R[X]\nh : ∀ (x : R), eval x p = 0\nhp : ¬p = 0\n⊢ Fintype R\n[PROOFSTEP]\nexact ⟨p.roots.toFinset, fun x => Multiset.mem_toFinset.mpr ((mem_roots hp).mpr (h _))⟩\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q✝ : R[X]\ninst✝ : Infinite R\np q : R[X]\next : ∀ (r : R), eval r p = eval r q\n⊢ p = q\n[PROOFSTEP]\nrw [← sub_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q✝ : R[X]\ninst✝ : Infinite R\np q : R[X]\next : ∀ (r : R), eval r p = eval r q\n⊢ p - q = 0\n[PROOFSTEP]\napply zero_of_eval_zero\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q✝ : R[X]\ninst✝ : Infinite R\np q : R[X]\next : ∀ (r : R), eval r p = eval r q\n⊢ ∀ (x : R), eval x (p - q) = 0\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q✝ : R[X]\ninst✝ : Infinite R\np q : R[X]\next : ∀ (r : R), eval r p = eval r q\nx : R\n⊢ eval x (p - q) = 0\n[PROOFSTEP]\nrw [eval_sub, sub_eq_zero, ext]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝⁶ : CommRing R\ninst✝⁵ : IsDomain R\np✝ q : R[X]\ninst✝⁴ : CommRing T\np : T[X]\nS : Type u_1\ninst✝³ : CommRing S\ninst✝² : IsDomain S\ninst✝¹ : Algebra T S\ninst✝ : DecidableEq S\n⊢ rootSet p S = ↑(toFinset (roots (map (algebraMap T S) p)))\n[PROOFSTEP]\nrw [rootSet]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝⁶ : CommRing R\ninst✝⁵ : IsDomain R\np✝ q : R[X]\ninst✝⁴ : CommRing T\np : T[X]\nS : Type u_1\ninst✝³ : CommRing S\ninst✝² : IsDomain S\ninst✝¹ : Algebra T S\ninst✝ : DecidableEq S\n⊢ ↑(toFinset (roots (map (algebraMap T S) p))) = ↑(toFinset (roots (map (algebraMap T S) p)))\n[PROOFSTEP]\nconvert rfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\np q : R[X]\ninst✝³ : CommRing T\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra T S\na : T\n⊢ rootSet (↑C a) S = ∅\n[PROOFSTEP]\nclassical rw [rootSet_def, map_C, roots_C, Multiset.toFinset_zero, Finset.coe_empty]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\np q : R[X]\ninst✝³ : CommRing T\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra T S\na : T\n⊢ rootSet (↑C a) S = ∅\n[PROOFSTEP]\nrw [rootSet_def, map_C, roots_C, Multiset.toFinset_zero, Finset.coe_empty]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\np q : R[X]\ninst✝³ : CommRing T\nS : Type u_1\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra T S\n⊢ rootSet 0 S = ∅\n[PROOFSTEP]\nrw [← C_0, rootSet_C]\n[GOAL]\nR✝ : Type u\nS✝ : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝⁶ : CommRing R✝\ninst✝⁵ : IsDomain R✝\np q : R✝[X]\ninst✝⁴ : CommRing T\nR : Type u_1\nS : Type u_2\ninst✝³ : Semiring R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : DecidableEq S\nm : R →+* S\nd : ℕ\nU : Set R\nh : Set.Finite U\n⊢ Set.Finite fun f => natDegree f ≤ d ∧ ∀ (i : ℕ), coeff f i ∈ U\n[PROOFSTEP]\nlet π : R[X] → Fin (d + 1) → R := fun f i => f.coeff i\n[GOAL]\nR✝ : Type u\nS✝ : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝⁶ : CommRing R✝\ninst✝⁵ : IsDomain R✝\np q : R✝[X]\ninst✝⁴ : CommRing T\nR : Type u_1\nS : Type u_2\ninst✝³ : Semiring R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : DecidableEq S\nm : R →+* S\nd : ℕ\nU : Set R\nh : Set.Finite U\nπ : R[X] → Fin (d + 1) → R := fun f i => coeff f ↑i\n⊢ Set.Finite fun f => natDegree f ≤ d ∧ ∀ (i : ℕ), coeff f i ∈ U\n[PROOFSTEP]\nrefine' ((Set.Finite.pi fun _ => h).subset <| _).of_finite_image (_ : Set.InjOn π _)\n[GOAL]\ncase refine'_1\nR✝ : Type u\nS✝ : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝⁶ : CommRing R✝\ninst✝⁵ : IsDomain R✝\np q : R✝[X]\ninst✝⁴ : CommRing T\nR : Type u_1\nS : Type u_2\ninst✝³ : Semiring R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : DecidableEq S\nm : R →+* S\nd : ℕ\nU : Set R\nh : Set.Finite U\nπ : R[X] → Fin (d + 1) → R := fun f i => coeff f ↑i\n⊢ (π '' fun f => natDegree f ≤ d ∧ ∀ (i : ℕ), coeff f i ∈ U) ⊆ Set.pi Set.univ fun x => U\n[PROOFSTEP]\nexact Set.image_subset_iff.2 fun f hf i _ => hf.2 i\n[GOAL]\ncase refine'_2\nR✝ : Type u\nS✝ : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝⁶ : CommRing R✝\ninst✝⁵ : IsDomain R✝\np q : R✝[X]\ninst✝⁴ : CommRing T\nR : Type u_1\nS : Type u_2\ninst✝³ : Semiring R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : DecidableEq S\nm : R →+* S\nd : ℕ\nU : Set R\nh : Set.Finite U\nπ : R[X] → Fin (d + 1) → R := fun f i => coeff f ↑i\n⊢ Set.InjOn π fun f => natDegree f ≤ d ∧ ∀ (i : ℕ), coeff f i ∈ U\n[PROOFSTEP]\nrefine' fun x hx y hy hxy => (ext_iff_natDegree_le hx.1 hy.1).2 fun i hi => _\n[GOAL]\ncase refine'_2\nR✝ : Type u\nS✝ : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝⁶ : CommRing R✝\ninst✝⁵ : IsDomain R✝\np q : R✝[X]\ninst✝⁴ : CommRing T\nR : Type u_1\nS : Type u_2\ninst✝³ : Semiring R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : DecidableEq S\nm : R →+* S\nd : ℕ\nU : Set R\nh : Set.Finite U\nπ : R[X] → Fin (d + 1) → R := fun f i => coeff f ↑i\nx : R[X]\nhx : x ∈ fun f => natDegree f ≤ d ∧ ∀ (i : ℕ), coeff f i ∈ U\ny : R[X]\nhy : y ∈ fun f => natDegree f ≤ d ∧ ∀ (i : ℕ), coeff f i ∈ U\nhxy : π x = π y\ni : ℕ\nhi : i ≤ d\n⊢ coeff x i = coeff y i\n[PROOFSTEP]\nexact id congr_fun hxy ⟨i, Nat.lt_succ_of_le hi⟩\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\np✝ q : R[X]\ninst✝³ : CommRing T\np : T[X]\nS : Type u_1\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra T S\na : S\n⊢ a ∈ rootSet p S ↔ map (algebraMap T S) p ≠ 0 ∧ ↑(aeval a) p = 0\n[PROOFSTEP]\nclassical rw [rootSet_def, Finset.mem_coe, mem_toFinset, mem_roots', IsRoot.def, ← eval₂_eq_eval_map, aeval_def]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\np✝ q : R[X]\ninst✝³ : CommRing T\np : T[X]\nS : Type u_1\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra T S\na : S\n⊢ a ∈ rootSet p S ↔ map (algebraMap T S) p ≠ 0 ∧ ↑(aeval a) p = 0\n[PROOFSTEP]\nrw [rootSet_def, Finset.mem_coe, mem_toFinset, mem_roots', IsRoot.def, ← eval₂_eq_eval_map, aeval_def]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝⁶ : CommRing R\ninst✝⁵ : IsDomain R\np✝ q : R[X]\ninst✝⁴ : CommRing T\np : T[X]\nS : Type u_1\ninst✝³ : CommRing S\ninst✝² : IsDomain S\ninst✝¹ : Algebra T S\ninst✝ : NoZeroSMulDivisors T S\na : S\n⊢ a ∈ rootSet p S ↔ p ≠ 0 ∧ ↑(aeval a) p = 0\n[PROOFSTEP]\nrw [mem_rootSet', (map_injective _ (NoZeroSMulDivisors.algebraMap_injective T S)).ne_iff' (Polynomial.map_zero _)]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝⁸ : CommRing R\ninst✝⁷ : IsDomain R\np✝ q : R[X]\ninst✝⁶ : CommRing T\np : T[X]\nS : Type u_1\nS' : Type u_2\ninst✝⁵ : CommRing S\ninst✝⁴ : IsDomain S\ninst✝³ : Algebra T S\ninst✝² : CommRing S'\ninst✝¹ : IsDomain S'\ninst✝ : Algebra T S'\nhp : map (algebraMap T S') p = 0 → map (algebraMap T S) p = 0\nf : S →ₐ[T] S'\nx : S\nhx : x ∈ rootSet p S\n⊢ ↑f x ∈ rootSet p S'\n[PROOFSTEP]\nrw [mem_rootSet'] at hx ⊢\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝⁸ : CommRing R\ninst✝⁷ : IsDomain R\np✝ q : R[X]\ninst✝⁶ : CommRing T\np : T[X]\nS : Type u_1\nS' : Type u_2\ninst✝⁵ : CommRing S\ninst✝⁴ : IsDomain S\ninst✝³ : Algebra T S\ninst✝² : CommRing S'\ninst✝¹ : IsDomain S'\ninst✝ : Algebra T S'\nhp : map (algebraMap T S') p = 0 → map (algebraMap T S) p = 0\nf : S →ₐ[T] S'\nx : S\nhx : map (algebraMap T S) p ≠ 0 ∧ ↑(aeval x) p = 0\n⊢ map (algebraMap T S') p ≠ 0 ∧ ↑(aeval (↑f x)) p = 0\n[PROOFSTEP]\nrw [aeval_algHom, AlgHom.comp_apply, hx.2, _root_.map_zero]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝⁸ : CommRing R\ninst✝⁷ : IsDomain R\np✝ q : R[X]\ninst✝⁶ : CommRing T\np : T[X]\nS : Type u_1\nS' : Type u_2\ninst✝⁵ : CommRing S\ninst✝⁴ : IsDomain S\ninst✝³ : Algebra T S\ninst✝² : CommRing S'\ninst✝¹ : IsDomain S'\ninst✝ : Algebra T S'\nhp : map (algebraMap T S') p = 0 → map (algebraMap T S) p = 0\nf : S →ₐ[T] S'\nx : S\nhx : map (algebraMap T S) p ≠ 0 ∧ ↑(aeval x) p = 0\n⊢ map (algebraMap T S') p ≠ 0 ∧ 0 = 0\n[PROOFSTEP]\nexact ⟨mt hp hx.1, rfl⟩\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\np✝ q : R[X]\ninst✝³ : CommRing T\np : T[X]\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra T S\na : S\nh : a ∈ rootSet p S\nhf : p = 0\n⊢ False\n[PROOFSTEP]\nrwa [hf, rootSet_zero] at h \n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝⁹ : CommRing R\ninst✝⁸ : IsDomain R\np✝ q : R[X]\ninst✝⁷ : CommRing T\np : T[X]\nS : Type u_1\nS' : Type u_2\ninst✝⁶ : CommRing S\ninst✝⁵ : IsDomain S\ninst✝⁴ : Algebra T S\ninst✝³ : CommRing S'\ninst✝² : IsDomain S'\ninst✝¹ : Algebra T S'\ninst✝ : NoZeroSMulDivisors T S'\nf : S →ₐ[T] S'\n⊢ Set.MapsTo (↑f) (rootSet p S) (rootSet p S')\n[PROOFSTEP]\nrefine' rootSet_maps_to' (fun h₀ => _) f\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝⁹ : CommRing R\ninst✝⁸ : IsDomain R\np✝ q : R[X]\ninst✝⁷ : CommRing T\np : T[X]\nS : Type u_1\nS' : Type u_2\ninst✝⁶ : CommRing S\ninst✝⁵ : IsDomain S\ninst✝⁴ : Algebra T S\ninst✝³ : CommRing S'\ninst✝² : IsDomain S'\ninst✝¹ : Algebra T S'\ninst✝ : NoZeroSMulDivisors T S'\nf : S →ₐ[T] S'\nh₀ : map (algebraMap T S') p = 0\n⊢ map (algebraMap T S) p = 0\n[PROOFSTEP]\nobtain rfl : p = 0 := map_injective _ (NoZeroSMulDivisors.algebraMap_injective T S') (by rwa [Polynomial.map_zero])\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝⁹ : CommRing R\ninst✝⁸ : IsDomain R\np✝ q : R[X]\ninst✝⁷ : CommRing T\np : T[X]\nS : Type u_1\nS' : Type u_2\ninst✝⁶ : CommRing S\ninst✝⁵ : IsDomain S\ninst✝⁴ : Algebra T S\ninst✝³ : CommRing S'\ninst✝² : IsDomain S'\ninst✝¹ : Algebra T S'\ninst✝ : NoZeroSMulDivisors T S'\nf : S →ₐ[T] S'\nh₀ : map (algebraMap T S') p = 0\n⊢ map (algebraMap T S') p = map (algebraMap T S') 0\n[PROOFSTEP]\nrwa [Polynomial.map_zero]\n[GOAL]\nR : Type u\nS✝ : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝⁹ : CommRing R\ninst✝⁸ : IsDomain R\np q : R[X]\ninst✝⁷ : CommRing T\nS : Type u_1\nS' : Type u_2\ninst✝⁶ : CommRing S\ninst✝⁵ : IsDomain S\ninst✝⁴ : Algebra T S\ninst✝³ : CommRing S'\ninst✝² : IsDomain S'\ninst✝¹ : Algebra T S'\ninst✝ : NoZeroSMulDivisors T S'\nf : S →ₐ[T] S'\nh₀ : map (algebraMap T S') 0 = 0\n⊢ map (algebraMap T S) 0 = 0\n[PROOFSTEP]\nexact Polynomial.map_zero _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nu : R[X]ˣ\n⊢ coeff (↑u) 0 ≠ 0\n[PROOFSTEP]\nconv in 0 => rw [← natDegree_coe_units u]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nu : R[X]ˣ\n| 0\n[PROOFSTEP]\nrw [← natDegree_coe_units u]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nu : R[X]ˣ\n| 0\n[PROOFSTEP]\nrw [← natDegree_coe_units u]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nu : R[X]ˣ\n| 0\n[PROOFSTEP]\nrw [← natDegree_coe_units u]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nu : R[X]ˣ\n⊢ coeff (↑u) (natDegree ↑u) ≠ 0\n[PROOFSTEP]\nrw [← leadingCoeff, Ne.def, leadingCoeff_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nu : R[X]ˣ\n⊢ ¬↑u = 0\n[PROOFSTEP]\nexact Units.ne_zero _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh : Associated p q\n⊢ degree p = degree q\n[PROOFSTEP]\nlet ⟨u, hu⟩ := h\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nh : Associated p q\nu : R[X]ˣ\nhu : p * ↑u = q\n⊢ degree p = degree q\n[PROOFSTEP]\nsimp [hu.symm]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhi : Irreducible p\nx : R\nhx : IsRoot p x\ng : R[X]\nhg : p = (X - ↑C x) * g\nthis : IsUnit (X - ↑C x) ∨ IsUnit g\nh : IsUnit (X - ↑C x)\n⊢ degree p = 1\n[PROOFSTEP]\nhave h₁ : degree (X - C x) = 1 := degree_X_sub_C x\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhi : Irreducible p\nx : R\nhx : IsRoot p x\ng : R[X]\nhg : p = (X - ↑C x) * g\nthis : IsUnit (X - ↑C x) ∨ IsUnit g\nh : IsUnit (X - ↑C x)\nh₁ : degree (X - ↑C x) = 1\n⊢ degree p = 1\n[PROOFSTEP]\nhave h₂ : degree (X - C x) = 0 := degree_eq_zero_of_isUnit h\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhi : Irreducible p\nx : R\nhx : IsRoot p x\ng : R[X]\nhg : p = (X - ↑C x) * g\nthis : IsUnit (X - ↑C x) ∨ IsUnit g\nh : IsUnit (X - ↑C x)\nh₁ : degree (X - ↑C x) = 1\nh₂ : degree (X - ↑C x) = 0\n⊢ degree p = 1\n[PROOFSTEP]\nrw [h₁] at h₂ \n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhi : Irreducible p\nx : R\nhx : IsRoot p x\ng : R[X]\nhg : p = (X - ↑C x) * g\nthis : IsUnit (X - ↑C x) ∨ IsUnit g\nh : IsUnit (X - ↑C x)\nh₁ : degree (X - ↑C x) = 1\nh₂ : 1 = 0\n⊢ degree p = 1\n[PROOFSTEP]\nexact absurd h₂ (by decide)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhi : Irreducible p\nx : R\nhx : IsRoot p x\ng : R[X]\nhg : p = (X - ↑C x) * g\nthis : IsUnit (X - ↑C x) ∨ IsUnit g\nh : IsUnit (X - ↑C x)\nh₁ : degree (X - ↑C x) = 1\nh₂ : 1 = 0\n⊢ ¬1 = 0\n[PROOFSTEP]\ndecide\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhi : Irreducible p\nx : R\nhx : IsRoot p x\ng : R[X]\nhg : p = (X - ↑C x) * g\nthis : IsUnit (X - ↑C x) ∨ IsUnit g\nhgu : IsUnit g\n⊢ degree p = 1\n[PROOFSTEP]\nrw [hg, degree_mul, degree_X_sub_C, degree_eq_zero_of_isUnit hgu, add_zero]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u\ninst✝ : CommRing R\np q : R[X]\nhmonic : Monic q\nhdegree : degree q ≤ degree p\n⊢ leadingCoeff (p /ₘ q) = leadingCoeff p\n[PROOFSTEP]\nnontriviality\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u\ninst✝ : CommRing R\np q : R[X]\nhmonic : Monic q\nhdegree : degree q ≤ degree p\n✝ : Nontrivial R\n⊢ leadingCoeff (p /ₘ q) = leadingCoeff p\n[PROOFSTEP]\nhave h : q.leadingCoeff * (p /ₘ q).leadingCoeff ≠ 0 := by\n  simpa [divByMonic_eq_zero_iff hmonic, hmonic.leadingCoeff, Nat.WithBot.one_le_iff_zero_lt] using hdegree\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u\ninst✝ : CommRing R\np q : R[X]\nhmonic : Monic q\nhdegree : degree q ≤ degree p\n✝ : Nontrivial R\n⊢ leadingCoeff q * leadingCoeff (p /ₘ q) ≠ 0\n[PROOFSTEP]\nsimpa [divByMonic_eq_zero_iff hmonic, hmonic.leadingCoeff, Nat.WithBot.one_le_iff_zero_lt] using hdegree\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u\ninst✝ : CommRing R\np q : R[X]\nhmonic : Monic q\nhdegree : degree q ≤ degree p\n✝ : Nontrivial R\nh : leadingCoeff q * leadingCoeff (p /ₘ q) ≠ 0\n⊢ leadingCoeff (p /ₘ q) = leadingCoeff p\n[PROOFSTEP]\nnth_rw 2 [← modByMonic_add_div p hmonic]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u\ninst✝ : CommRing R\np q : R[X]\nhmonic : Monic q\nhdegree : degree q ≤ degree p\n✝ : Nontrivial R\nh : leadingCoeff q * leadingCoeff (p /ₘ q) ≠ 0\n⊢ leadingCoeff (p /ₘ q) = leadingCoeff (p %ₘ q + q * (p /ₘ q))\n[PROOFSTEP]\nrw [leadingCoeff_add_of_degree_lt, leadingCoeff_monic_mul hmonic]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u\ninst✝ : CommRing R\np q : R[X]\nhmonic : Monic q\nhdegree : degree q ≤ degree p\n✝ : Nontrivial R\nh : leadingCoeff q * leadingCoeff (p /ₘ q) ≠ 0\n⊢ degree (p %ₘ q) < degree (q * (p /ₘ q))\n[PROOFSTEP]\nrw [degree_mul' h, degree_add_divByMonic hmonic hdegree]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u\ninst✝ : CommRing R\np q : R[X]\nhmonic : Monic q\nhdegree : degree q ≤ degree p\n✝ : Nontrivial R\nh : leadingCoeff q * leadingCoeff (p /ₘ q) ≠ 0\n⊢ degree (p %ₘ q) < degree p\n[PROOFSTEP]\nexact (degree_modByMonic_lt p hmonic).trans_le hdegree\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nhp : degree p ≠ 0\na : R\n⊢ leadingCoeff (p /ₘ (X - ↑C a)) = leadingCoeff p\n[PROOFSTEP]\nnontriviality\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q p : R[X]\nhp : degree p ≠ 0\na : R\ninst✝ : Nontrivial R\n⊢ leadingCoeff (p /ₘ (X - ↑C a)) = leadingCoeff p\n[PROOFSTEP]\ncases' hp.lt_or_lt with hd hd\n[GOAL]\ncase inl\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q p : R[X]\nhp : degree p ≠ 0\na : R\ninst✝ : Nontrivial R\nhd : degree p < 0\n⊢ leadingCoeff (p /ₘ (X - ↑C a)) = leadingCoeff p\n[PROOFSTEP]\nrw [degree_eq_bot.mp <| (Nat.WithBot.lt_zero_iff _).mp hd, zero_divByMonic]\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q p : R[X]\nhp : degree p ≠ 0\na : R\ninst✝ : Nontrivial R\nhd : 0 < degree p\n⊢ leadingCoeff (p /ₘ (X - ↑C a)) = leadingCoeff p\n[PROOFSTEP]\nrefine' leadingCoeff_divByMonic_of_monic (monic_X_sub_C a) _\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np✝ q p : R[X]\nhp : degree p ≠ 0\na : R\ninst✝ : Nontrivial R\nhd : 0 < degree p\n⊢ degree (X - ↑C a) ≤ degree p\n[PROOFSTEP]\nrwa [degree_X_sub_C, Nat.WithBot.one_le_iff_zero_lt]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nhdiv : p ∣ q\nhdeg : natDegree q ≤ natDegree p\n⊢ q = ↑C (leadingCoeff q) * p\n[PROOFSTEP]\nobtain ⟨r, hr⟩ := hdiv\n[GOAL]\ncase intro\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nhdeg : natDegree q ≤ natDegree p\nr : R[X]\nhr : q = p * r\n⊢ q = ↑C (leadingCoeff q) * p\n[PROOFSTEP]\nobtain rfl | hq := eq_or_ne q 0\n[GOAL]\ncase intro.inl\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np : R[X]\nhp : Monic p\nr : R[X]\nhdeg : natDegree 0 ≤ natDegree p\nhr : 0 = p * r\n⊢ 0 = ↑C (leadingCoeff 0) * p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.inr\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nhdeg : natDegree q ≤ natDegree p\nr : R[X]\nhr : q = p * r\nhq : q ≠ 0\n⊢ q = ↑C (leadingCoeff q) * p\n[PROOFSTEP]\nhave rzero : r ≠ 0 := fun h => by simp [h, hq] at hr \n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nhdeg : natDegree q ≤ natDegree p\nr : R[X]\nhr : q = p * r\nhq : q ≠ 0\nh : r = 0\n⊢ False\n[PROOFSTEP]\nsimp [h, hq] at hr \n[GOAL]\ncase intro.inr\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nhdeg : natDegree q ≤ natDegree p\nr : R[X]\nhr : q = p * r\nhq : q ≠ 0\nrzero : r ≠ 0\n⊢ q = ↑C (leadingCoeff q) * p\n[PROOFSTEP]\nrw [hr, natDegree_mul'] at hdeg \n[GOAL]\ncase intro.inr\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nr : R[X]\nhdeg : natDegree p + natDegree r ≤ natDegree p\nhr : q = p * r\nhq : q ≠ 0\nrzero : r ≠ 0\n⊢ q = ↑C (leadingCoeff q) * p\ncase intro.inr\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nr : R[X]\nhdeg : natDegree (p * r) ≤ natDegree p\nhr : q = p * r\nhq : q ≠ 0\nrzero : r ≠ 0\n⊢ leadingCoeff p * leadingCoeff r ≠ 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase intro.inr\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nr : R[X]\nhdeg : natDegree (p * r) ≤ natDegree p\nhr : q = p * r\nhq : q ≠ 0\nrzero : r ≠ 0\n⊢ leadingCoeff p * leadingCoeff r ≠ 0\n[PROOFSTEP]\nrw [hp.leadingCoeff, one_mul, leadingCoeff_ne_zero]\n[GOAL]\ncase intro.inr\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nr : R[X]\nhdeg : natDegree (p * r) ≤ natDegree p\nhr : q = p * r\nhq : q ≠ 0\nrzero : r ≠ 0\n⊢ r ≠ 0\n[PROOFSTEP]\nexact rzero\n[GOAL]\ncase intro.inr\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nr : R[X]\nhdeg : natDegree p + natDegree r ≤ natDegree p\nhr : q = p * r\nhq : q ≠ 0\nrzero : r ≠ 0\n⊢ q = ↑C (leadingCoeff q) * p\n[PROOFSTEP]\nrw [mul_comm, @eq_C_of_natDegree_eq_zero _ _ r] at hr \n[GOAL]\ncase intro.inr\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nr : R[X]\nhdeg : natDegree p + natDegree r ≤ natDegree p\nhr : q = ↑C (coeff r 0) * p\nhq : q ≠ 0\nrzero : r ≠ 0\n⊢ q = ↑C (leadingCoeff q) * p\n[PROOFSTEP]\nconvert hr\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_6\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nr : R[X]\nhdeg : natDegree p + natDegree r ≤ natDegree p\nhr : q = ↑C (coeff r 0) * p\nhq : q ≠ 0\nrzero : r ≠ 0\n⊢ leadingCoeff q = coeff r 0\n[PROOFSTEP]\nconvert leadingCoeff_C (coeff r 0) using 1\n[GOAL]\ncase h.e'_2\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nr : R[X]\nhdeg : natDegree p + natDegree r ≤ natDegree p\nhr : q = ↑C (coeff r 0) * p\nhq : q ≠ 0\nrzero : r ≠ 0\n⊢ leadingCoeff q = leadingCoeff (↑C (coeff r 0))\n[PROOFSTEP]\nrw [hr, leadingCoeff_mul_monic hp]\n[GOAL]\ncase intro.inr\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nr : R[X]\nhdeg : natDegree p + natDegree r ≤ natDegree p\nhr : q = r * p\nhq : q ≠ 0\nrzero : r ≠ 0\n⊢ natDegree r = 0\n[PROOFSTEP]\nexact (add_right_inj _).1 (le_antisymm hdeg <| Nat.le.intro rfl)\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nhq : Monic q\nhdiv : p ∣ q\nhdeg : natDegree q ≤ natDegree p\n⊢ q = p\n[PROOFSTEP]\nconvert eq_leadingCoeff_mul_of_monic_of_dvd_of_natDegree_le hp hdiv hdeg\n[GOAL]\ncase h.e'_3\nR✝ : Type u\nS : Type v\nT : Type w\na b : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np✝ q✝ : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\np q : R[X]\nhp : Monic p\nhq : Monic q\nhdiv : p ∣ q\nhdeg : natDegree q ≤ natDegree p\n⊢ p = ↑C (leadingCoeff q) * p\n[PROOFSTEP]\nrw [hq.leadingCoeff, C_1, one_mul]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na✝ b✝ : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np q : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\na b : R\nh : IsUnit (a - b)\n⊢ -↑C ↑(IsUnit.unit h)⁻¹ * (X - ↑C a) + ↑C ↑(IsUnit.unit h)⁻¹ * (X - ↑C b) = 1\n[PROOFSTEP]\nrw [neg_mul_comm, ← left_distrib, neg_add_eq_sub, sub_sub_sub_cancel_left, ← C_sub, ← C_mul]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na✝ b✝ : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np q : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\na b : R\nh : IsUnit (a - b)\n⊢ ↑C (↑(IsUnit.unit h)⁻¹ * (a - b)) = 1\n[PROOFSTEP]\nrw [← C_1]\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\na✝ b✝ : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np q : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\na b : R\nh : IsUnit (a - b)\n⊢ ↑C (↑(IsUnit.unit h)⁻¹ * (a - b)) = ↑C 1\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_6.h\nR✝ : Type u\nS : Type v\nT : Type w\na✝ b✝ : R✝\nn : ℕ\ninst✝² : CommRing R✝\ninst✝¹ : IsDomain R✝\np q : R✝[X]\nR : Type u_1\ninst✝ : CommRing R\na b : R\nh : IsUnit (a - b)\n⊢ ↑(IsUnit.unit h)⁻¹ * (a - b) = 1\n[PROOFSTEP]\nexact h.val_inv_mul\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\np q : R[X]\ninst✝ : DecidableEq R\n⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) =\n    Finset.prod (Multiset.toFinset (roots p)) fun a => (X - ↑C a) ^ rootMultiplicity a p\n[PROOFSTEP]\nsimp only [count_roots, Finset.prod_multiset_map_count]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\n⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) ∣ p\n[PROOFSTEP]\nclassical\nrw [← map_dvd_map _ (IsFractionRing.injective R <| FractionRing R) monic_prod_multiset_X_sub_C]\nrw [prod_multiset_root_eq_finset_root, Polynomial.map_prod]\nrefine' Finset.prod_dvd_of_coprime (fun a _ b _ h => _) fun a _ => _\n· simp_rw [Polynomial.map_pow, Polynomial.map_sub, map_C, map_X]\n  exact (pairwise_coprime_X_sub_C (IsFractionRing.injective R <| FractionRing R) h).pow\n· exact Polynomial.map_dvd _ (pow_rootMultiplicity_dvd p a)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\n⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) ∣ p\n[PROOFSTEP]\nrw [← map_dvd_map _ (IsFractionRing.injective R <| FractionRing R) monic_prod_multiset_X_sub_C]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\n⊢ map (algebraMap R (FractionRing R)) (Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p))) ∣\n    map (algebraMap R (FractionRing R)) p\n[PROOFSTEP]\nrw [prod_multiset_root_eq_finset_root, Polynomial.map_prod]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\n⊢ (Finset.prod (Multiset.toFinset (roots p)) fun i =>\n      map (algebraMap R (FractionRing R)) ((X - ↑C i) ^ rootMultiplicity i p)) ∣\n    map (algebraMap R (FractionRing R)) p\n[PROOFSTEP]\nrefine' Finset.prod_dvd_of_coprime (fun a _ b _ h => _) fun a _ => _\n[GOAL]\ncase refine'_1\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\na : R\nx✝¹ : a ∈ ↑(Multiset.toFinset (roots p))\nb : R\nx✝ : b ∈ ↑(Multiset.toFinset (roots p))\nh : a ≠ b\n⊢ (IsCoprime on fun i => map (algebraMap R (FractionRing R)) ((X - ↑C i) ^ rootMultiplicity i p)) a b\n[PROOFSTEP]\nsimp_rw [Polynomial.map_pow, Polynomial.map_sub, map_C, map_X]\n[GOAL]\ncase refine'_1\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\na : R\nx✝¹ : a ∈ ↑(Multiset.toFinset (roots p))\nb : R\nx✝ : b ∈ ↑(Multiset.toFinset (roots p))\nh : a ≠ b\n⊢ (IsCoprime on fun i => (X - ↑C (↑(algebraMap R (FractionRing R)) i)) ^ rootMultiplicity i p) a b\n[PROOFSTEP]\nexact (pairwise_coprime_X_sub_C (IsFractionRing.injective R <| FractionRing R) h).pow\n[GOAL]\ncase refine'_2\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\na : R\nx✝ : a ∈ Multiset.toFinset (roots p)\n⊢ map (algebraMap R (FractionRing R)) ((X - ↑C a) ^ rootMultiplicity a p) ∣ map (algebraMap R (FractionRing R)) p\n[PROOFSTEP]\nexact Polynomial.map_dvd _ (pow_rootMultiplicity_dvd p a)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nhp : p ≠ 0\ns : Multiset R\n⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) s) ∣ p ↔ s ≤ roots p\n[PROOFSTEP]\nclassical exact\n  ⟨fun h =>\n    Multiset.le_iff_count.2 fun r =>\n      by\n      rw [count_roots, le_rootMultiplicity_iff hp, ← Multiset.prod_replicate, ← Multiset.map_replicate fun a => X - C a,\n        ← Multiset.filter_eq]\n      exact (Multiset.prod_dvd_prod_of_le <| Multiset.map_le_map <| s.filter_le _).trans h,\n    fun h => (Multiset.prod_dvd_prod_of_le <| Multiset.map_le_map h).trans p.prod_multiset_X_sub_C_dvd⟩\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nhp : p ≠ 0\ns : Multiset R\n⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) s) ∣ p ↔ s ≤ roots p\n[PROOFSTEP]\nexact\n  ⟨fun h =>\n    Multiset.le_iff_count.2 fun r =>\n      by\n      rw [count_roots, le_rootMultiplicity_iff hp, ← Multiset.prod_replicate, ← Multiset.map_replicate fun a => X - C a,\n        ← Multiset.filter_eq]\n      exact (Multiset.prod_dvd_prod_of_le <| Multiset.map_le_map <| s.filter_le _).trans h,\n    fun h => (Multiset.prod_dvd_prod_of_le <| Multiset.map_le_map h).trans p.prod_multiset_X_sub_C_dvd⟩\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nhp : p ≠ 0\ns : Multiset R\nh : Multiset.prod (Multiset.map (fun a => X - ↑C a) s) ∣ p\nr : R\n⊢ Multiset.count r s ≤ Multiset.count r (roots p)\n[PROOFSTEP]\nrw [count_roots, le_rootMultiplicity_iff hp, ← Multiset.prod_replicate, ← Multiset.map_replicate fun a => X - C a, ←\n  Multiset.filter_eq]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nhp : p ≠ 0\ns : Multiset R\nh : Multiset.prod (Multiset.map (fun a => X - ↑C a) s) ∣ p\nr : R\n⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (Multiset.filter (Eq r) s)) ∣ p\n[PROOFSTEP]\nexact (Multiset.prod_dvd_prod_of_le <| Multiset.map_le_map <| s.filter_le _).trans h\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\n⊢ ∃ q,\n    Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q = p ∧\n      ↑Multiset.card (roots p) + natDegree q = natDegree p ∧ roots q = 0\n[PROOFSTEP]\nobtain ⟨q, he⟩ := p.prod_multiset_X_sub_C_dvd\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhe : p = Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q\n⊢ ∃ q,\n    Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q = p ∧\n      ↑Multiset.card (roots p) + natDegree q = natDegree p ∧ roots q = 0\n[PROOFSTEP]\nuse q, he.symm\n[GOAL]\ncase right\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhe : p = Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q\n⊢ ↑Multiset.card (roots p) + natDegree q = natDegree p ∧ roots q = 0\n[PROOFSTEP]\nobtain rfl | hq := eq_or_ne q 0\n[GOAL]\ncase right.inl\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nhe : p = Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * 0\n⊢ ↑Multiset.card (roots p) + natDegree 0 = natDegree p ∧ roots 0 = 0\n[PROOFSTEP]\nrw [mul_zero] at he \n[GOAL]\ncase right.inl\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q p : R[X]\nhe : p = 0\n⊢ ↑Multiset.card (roots p) + natDegree 0 = natDegree p ∧ roots 0 = 0\n[PROOFSTEP]\nsubst he\n[GOAL]\ncase right.inl\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\n⊢ ↑Multiset.card (roots 0) + natDegree 0 = natDegree 0 ∧ roots 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right.inr\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhe : p = Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q\nhq : q ≠ 0\n⊢ ↑Multiset.card (roots p) + natDegree q = natDegree p ∧ roots q = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase right.inr.left\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhe : p = Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q\nhq : q ≠ 0\n⊢ ↑Multiset.card (roots p) + natDegree q = natDegree p\n[PROOFSTEP]\nconv_rhs => rw [he]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhe : p = Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q\nhq : q ≠ 0\n| natDegree p\n[PROOFSTEP]\nrw [he]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhe : p = Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q\nhq : q ≠ 0\n| natDegree p\n[PROOFSTEP]\nrw [he]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhe : p = Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q\nhq : q ≠ 0\n| natDegree p\n[PROOFSTEP]\nrw [he]\n[GOAL]\ncase right.inr.left\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhe : p = Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q\nhq : q ≠ 0\n⊢ ↑Multiset.card (roots p) + natDegree q = natDegree (Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q)\n[PROOFSTEP]\nrw [monic_prod_multiset_X_sub_C.natDegree_mul' hq, natDegree_multiset_prod_X_sub_C_eq_card]\n[GOAL]\ncase right.inr.right\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhe : p = Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q\nhq : q ≠ 0\n⊢ roots q = 0\n[PROOFSTEP]\nreplace he := congr_arg roots he.symm\n[GOAL]\ncase right.inr.right\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhq : q ≠ 0\nhe : roots (Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q) = roots p\n⊢ roots q = 0\n[PROOFSTEP]\nrw [roots_mul, roots_multiset_prod_X_sub_C] at he \n[GOAL]\ncase right.inr.right\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhq : q ≠ 0\nhe : roots p + roots q = roots p\n⊢ roots q = 0\ncase right.inr.right\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np✝ q✝ p q : R[X]\nhq : q ≠ 0\nhe : roots (Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q) = roots p\n⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) * q ≠ 0\n[PROOFSTEP]\nexacts [add_right_eq_self.1 he, mul_ne_zero monic_prod_multiset_X_sub_C.ne_zero hq]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp : Monic p\nhroots : ↑Multiset.card (roots p) = natDegree p\n⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) = p\n[PROOFSTEP]\nconvert C_leadingCoeff_mul_prod_multiset_X_sub_C hroots\n[GOAL]\ncase h.e'_2\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np q : R[X]\nhp : Monic p\nhroots : ↑Multiset.card (roots p) = natDegree p\n⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) =\n    ↑C (leadingCoeff p) * Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p))\n[PROOFSTEP]\nrw [hp.leadingCoeff, C_1, one_mul]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝¹ : CommRing A\ninst✝ : CommRing B\np : A[X]\nf : A →+* B\nhmap : map f p ≠ 0\na : A\n⊢ rootMultiplicity a p ≤ rootMultiplicity (↑f a) (map f p)\n[PROOFSTEP]\nrw [le_rootMultiplicity_iff hmap]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝¹ : CommRing A\ninst✝ : CommRing B\np : A[X]\nf : A →+* B\nhmap : map f p ≠ 0\na : A\n⊢ (X - ↑C (↑f a)) ^ rootMultiplicity a p ∣ map f p\n[PROOFSTEP]\nrefine' _root_.trans _ ((mapRingHom f).map_dvd (pow_rootMultiplicity_dvd p a))\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝¹ : CommRing A\ninst✝ : CommRing B\np : A[X]\nf : A →+* B\nhmap : map f p ≠ 0\na : A\n⊢ (X - ↑C (↑f a)) ^ rootMultiplicity a p ∣ ↑(mapRingHom f) ((X - ↑C a) ^ rootMultiplicity a p)\n[PROOFSTEP]\nrw [map_pow, map_sub, coe_mapRingHom, map_X, map_C]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝¹ : CommRing A\ninst✝ : CommRing B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\na : A\n⊢ rootMultiplicity a p = rootMultiplicity (↑f a) (map f p)\n[PROOFSTEP]\nby_cases hp0 : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝¹ : CommRing A\ninst✝ : CommRing B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\na : A\nhp0 : p = 0\n⊢ rootMultiplicity a p = rootMultiplicity (↑f a) (map f p)\n[PROOFSTEP]\nsimp only [hp0, rootMultiplicity_zero, Polynomial.map_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝¹ : CommRing A\ninst✝ : CommRing B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\na : A\nhp0 : ¬p = 0\n⊢ rootMultiplicity a p = rootMultiplicity (↑f a) (map f p)\n[PROOFSTEP]\napply le_antisymm (le_rootMultiplicity_map ((Polynomial.map_ne_zero_iff hf).mpr hp0) a)\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝¹ : CommRing A\ninst✝ : CommRing B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\na : A\nhp0 : ¬p = 0\n⊢ rootMultiplicity (↑f a) (map f p) ≤ rootMultiplicity a p\n[PROOFSTEP]\nrw [le_rootMultiplicity_iff hp0, ← map_dvd_map f hf ((monic_X_sub_C a).pow _), Polynomial.map_pow, Polynomial.map_sub,\n  map_X, map_C]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na✝ b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝¹ : CommRing A\ninst✝ : CommRing B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\na : A\nhp0 : ¬p = 0\n⊢ (X - ↑C (↑f a)) ^ rootMultiplicity (↑f a) (map f p) ∣ map f p\n[PROOFSTEP]\napply pow_rootMultiplicity_dvd\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : DecidableEq B\np : A[X]\nf : A →+* B\nhmap : map f p ≠ 0\nb : B\n⊢ Multiset.count b (Multiset.map (↑f) (roots p)) ≤ rootMultiplicity b (map f p)\n[PROOFSTEP]\nrw [le_rootMultiplicity_iff hmap, ← Multiset.prod_replicate, ← Multiset.map_replicate fun a => X - C a]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : DecidableEq B\np : A[X]\nf : A →+* B\nhmap : map f p ≠ 0\nb : B\n⊢ Multiset.prod\n      (Multiset.map (fun a => X - ↑C a) (Multiset.replicate (Multiset.count b (Multiset.map (↑f) (roots p))) b)) ∣\n    map f p\n[PROOFSTEP]\nrw [← Multiset.filter_eq]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : DecidableEq B\np : A[X]\nf : A →+* B\nhmap : map f p ≠ 0\nb : B\n⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (Multiset.filter (Eq b) (Multiset.map (↑f) (roots p)))) ∣ map f p\n[PROOFSTEP]\nrefine (Multiset.prod_dvd_prod_of_le <| Multiset.map_le_map <| Multiset.filter_le (Eq b) _).trans ?_\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : DecidableEq B\np : A[X]\nf : A →+* B\nhmap : map f p ≠ 0\nb : B\n⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (Multiset.map (↑f) (roots p))) ∣ map f p\n[PROOFSTEP]\nconvert Polynomial.map_dvd f p.prod_multiset_X_sub_C_dvd\n[GOAL]\ncase h.e'_3\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : DecidableEq B\np : A[X]\nf : A →+* B\nhmap : map f p ≠ 0\nb : B\n⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (Multiset.map (↑f) (roots p))) =\n    map f (Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)))\n[PROOFSTEP]\nsimp only [Polynomial.map_multiset_prod, Multiset.map_map]\n[GOAL]\ncase h.e'_3\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : DecidableEq B\np : A[X]\nf : A →+* B\nhmap : map f p ≠ 0\nb : B\n⊢ Multiset.prod (Multiset.map ((fun x => X - ↑C x) ∘ fun x => ↑f x) (roots p)) =\n    Multiset.prod (Multiset.map (map f ∘ fun x => X - ↑C x) (roots p))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_3.e_a.e_f\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : DecidableEq B\np : A[X]\nf : A →+* B\nhmap : map f p ≠ 0\nb : B\n⊢ ((fun x => X - ↑C x) ∘ fun x => ↑f x) = map f ∘ fun x => X - ↑C x\n[PROOFSTEP]\next1\n[GOAL]\ncase h.e'_3.e_a.e_f.h\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : DecidableEq B\np : A[X]\nf : A →+* B\nhmap : map f p ≠ 0\nb : B\nx✝ : A\n⊢ ((fun x => X - ↑C x) ∘ fun x => ↑f x) x✝ = (map f ∘ fun x => X - ↑C x) x✝\n[PROOFSTEP]\nsimp only [Function.comp_apply, Polynomial.map_sub, map_X, map_C]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : DecidableEq B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\nb : B\n⊢ Multiset.count b (Multiset.map (↑f) (roots p)) ≤ rootMultiplicity b (map f p)\n[PROOFSTEP]\nby_cases hp0 : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : DecidableEq B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\nb : B\nhp0 : p = 0\n⊢ Multiset.count b (Multiset.map (↑f) (roots p)) ≤ rootMultiplicity b (map f p)\n[PROOFSTEP]\nsimp only [hp0, roots_zero, Multiset.map_zero, Multiset.count_zero, Polynomial.map_zero, rootMultiplicity_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : DecidableEq B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\nb : B\nhp0 : ¬p = 0\n⊢ Multiset.count b (Multiset.map (↑f) (roots p)) ≤ rootMultiplicity b (map f p)\n[PROOFSTEP]\nexact count_map_roots ((Polynomial.map_ne_zero_iff hf).mpr hp0) b\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nh : map f p ≠ 0\n⊢ Multiset.map (↑f) (roots p) ≤ roots (map f p)\n[PROOFSTEP]\nclassical exact\n  Multiset.le_iff_count.2 fun b => by\n    rw [count_roots]\n    apply count_map_roots h\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nh : map f p ≠ 0\n⊢ Multiset.map (↑f) (roots p) ≤ roots (map f p)\n[PROOFSTEP]\nexact\n  Multiset.le_iff_count.2 fun b => by\n    rw [count_roots]\n    apply count_map_roots h\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nh : map f p ≠ 0\nb : B\n⊢ Multiset.count b (Multiset.map (↑f) (roots p)) ≤ Multiset.count b (roots (map f p))\n[PROOFSTEP]\nrw [count_roots]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b✝ : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nh : map f p ≠ 0\nb : B\n⊢ Multiset.count b (Multiset.map (↑f) (roots p)) ≤ rootMultiplicity b (map f p)\n[PROOFSTEP]\napply count_map_roots h\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\n⊢ Multiset.map (↑f) (roots p) ≤ roots (map f p)\n[PROOFSTEP]\nby_cases hp0 : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\nhp0 : p = 0\n⊢ Multiset.map (↑f) (roots p) ≤ roots (map f p)\n[PROOFSTEP]\nsimp only [hp0, roots_zero, Multiset.map_zero, Polynomial.map_zero]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\nhp0 : p = 0\n⊢ 0 ≤ 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\nhp0 : ¬p = 0\n⊢ Multiset.map (↑f) (roots p) ≤ roots (map f p)\n[PROOFSTEP]\nexact map_roots_le ((Polynomial.map_ne_zero_iff hf).mpr hp0)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nh : map f p ≠ 0\n⊢ ↑Multiset.card (roots p) ≤ ↑Multiset.card (roots (map f p))\n[PROOFSTEP]\nrw [← p.roots.card_map f]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nh : map f p ≠ 0\n⊢ ↑Multiset.card (Multiset.map (↑f) (roots p)) ≤ ↑Multiset.card (roots (map f p))\n[PROOFSTEP]\nexact Multiset.card_le_of_le (map_roots_le h)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\n⊢ ↑Multiset.card (roots p) ≤ ↑Multiset.card (roots (map f p))\n[PROOFSTEP]\nby_cases hp0 : p = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\nhp0 : p = 0\n⊢ ↑Multiset.card (roots p) ≤ ↑Multiset.card (roots (map f p))\n[PROOFSTEP]\nsimp only [hp0, roots_zero, Polynomial.map_zero, Multiset.card_zero]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\nhp0 : p = 0\n⊢ 0 ≤ 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\nhp0 : ¬p = 0\n⊢ ↑Multiset.card (roots p) ≤ ↑Multiset.card (roots (map f p))\n[PROOFSTEP]\nexact card_roots_le_map ((Polynomial.map_ne_zero_iff hf).mpr hp0)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\nhroots : ↑Multiset.card (roots p) = natDegree p\n⊢ Multiset.map (↑f) (roots p) = roots (map f p)\n[PROOFSTEP]\napply Multiset.eq_of_le_of_card_le (map_roots_le_of_injective p hf)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\nA : Type u_1\nB : Type u_2\ninst✝³ : CommRing A\ninst✝² : CommRing B\ninst✝¹ : IsDomain A\ninst✝ : IsDomain B\np : A[X]\nf : A →+* B\nhf : Function.Injective ↑f\nhroots : ↑Multiset.card (roots p) = natDegree p\n⊢ ↑Multiset.card (roots (map f p)) ≤ ↑Multiset.card (Multiset.map (↑f) (roots p))\n[PROOFSTEP]\nsimpa only [Multiset.card_map, hroots] using (card_roots' _).trans (natDegree_map_le f p)\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\n⊢ IsUnit f\n[PROOFSTEP]\nhave dz := degree_eq_zero_of_isUnit H\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree (map φ f) = 0\n⊢ IsUnit f\n[PROOFSTEP]\nrw [degree_map_eq_of_leadingCoeff_ne_zero] at dz \n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree f = 0\n⊢ IsUnit f\n[PROOFSTEP]\nrw [eq_C_of_degree_eq_zero dz]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree f = 0\n⊢ IsUnit (↑C (coeff f 0))\n[PROOFSTEP]\nrefine' IsUnit.map C _\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree f = 0\n⊢ IsUnit (coeff f 0)\n[PROOFSTEP]\nconvert hf\n[GOAL]\ncase h.e'_3\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree f = 0\n⊢ coeff f 0 = leadingCoeff f\n[PROOFSTEP]\nchange coeff f 0 = coeff f (natDegree f)\n[GOAL]\ncase h.e'_3\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree f = 0\n⊢ coeff f 0 = coeff f (natDegree f)\n[PROOFSTEP]\nrw [(degree_eq_iff_natDegree_eq _).1 dz]\n[GOAL]\ncase h.e'_3\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree f = 0\n⊢ coeff f 0 = coeff f Zero.zero\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree f = 0\n⊢ f ≠ 0\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree f = 0\n⊢ f ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nhf : IsUnit (leadingCoeff 0)\nH : IsUnit (map φ 0)\ndz : degree 0 = 0\n⊢ False\n[PROOFSTEP]\nsimp at H \n[GOAL]\ncase hf\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree (map φ f) = 0\n⊢ ↑φ (leadingCoeff f) ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase hf\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree (map φ f) = 0\nh : ↑φ (leadingCoeff f) = 0\n⊢ False\n[PROOFSTEP]\nhave u : IsUnit (φ f.leadingCoeff) := IsUnit.map φ hf\n[GOAL]\ncase hf\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree (map φ f) = 0\nh : ↑φ (leadingCoeff f) = 0\nu : IsUnit (↑φ (leadingCoeff f))\n⊢ False\n[PROOFSTEP]\nrw [h] at u \n[GOAL]\ncase hf\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝² : Semiring R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nhf : IsUnit (leadingCoeff f)\nH : IsUnit (map φ f)\ndz : degree (map φ f) = 0\nh : ↑φ (leadingCoeff f) = 0\nu : IsUnit 0\n⊢ False\n[PROOFSTEP]\nsimp at u \n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na b : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Monic f\nh_irr : Irreducible (Polynomial.map φ f)\n⊢ Irreducible f\n[PROOFSTEP]\nrefine' ⟨h_irr.not_unit ∘ IsUnit.map (mapRingHom φ), fun a b h => _⟩\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Monic f\nh_irr : Irreducible (Polynomial.map φ f)\na b : R[X]\nh : f = a * b\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\ndsimp [Monic] at h_mon \n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Polynomial.leadingCoeff f = 1\nh_irr : Irreducible (Polynomial.map φ f)\na b : R[X]\nh : f = a * b\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nhave q := (leadingCoeff_mul a b).symm\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Polynomial.leadingCoeff f = 1\nh_irr : Irreducible (Polynomial.map φ f)\na b : R[X]\nh : f = a * b\nq : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = Polynomial.leadingCoeff (a * b)\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nrw [← h, h_mon] at q \n[GOAL]\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Polynomial.leadingCoeff f = 1\nh_irr : Irreducible (Polynomial.map φ f)\na b : R[X]\nh : f = a * b\nq : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ IsUnit a ∨ IsUnit b\n[PROOFSTEP]\nrefine' (h_irr.isUnit_or_isUnit <| (congr_arg (Polynomial.map φ) h).trans (Polynomial.map_mul φ)).imp _ _\n[GOAL]\ncase refine'_1\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Polynomial.leadingCoeff f = 1\nh_irr : Irreducible (Polynomial.map φ f)\na b : R[X]\nh : f = a * b\nq : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ IsUnit (Polynomial.map φ a) → IsUnit a\n[PROOFSTEP]\napply isUnit_of_isUnit_leadingCoeff_of_isUnit_map\n[GOAL]\ncase refine'_2\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Polynomial.leadingCoeff f = 1\nh_irr : Irreducible (Polynomial.map φ f)\na b : R[X]\nh : f = a * b\nq : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ IsUnit (Polynomial.map φ b) → IsUnit b\n[PROOFSTEP]\napply isUnit_of_isUnit_leadingCoeff_of_isUnit_map\n[GOAL]\ncase refine'_1.hf\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Polynomial.leadingCoeff f = 1\nh_irr : Irreducible (Polynomial.map φ f)\na b : R[X]\nh : f = a * b\nq : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ IsUnit (Polynomial.leadingCoeff a)\n[PROOFSTEP]\napply isUnit_of_mul_eq_one\n[GOAL]\ncase refine'_2.hf\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Polynomial.leadingCoeff f = 1\nh_irr : Irreducible (Polynomial.map φ f)\na b : R[X]\nh : f = a * b\nq : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ IsUnit (Polynomial.leadingCoeff b)\n[PROOFSTEP]\napply isUnit_of_mul_eq_one\n[GOAL]\ncase refine'_1.hf.h\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Polynomial.leadingCoeff f = 1\nh_irr : Irreducible (Polynomial.map φ f)\na b : R[X]\nh : f = a * b\nq : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ Polynomial.leadingCoeff a * ?refine'_1.hf.b = 1\n[PROOFSTEP]\nexact q\n[GOAL]\ncase refine'_2.hf.h\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Polynomial.leadingCoeff f = 1\nh_irr : Irreducible (Polynomial.map φ f)\na b : R[X]\nh : f = a * b\nq : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ Polynomial.leadingCoeff b * ?refine'_2.hf.b = 1\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase refine'_2.hf.h\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Polynomial.leadingCoeff f = 1\nh_irr : Irreducible (Polynomial.map φ f)\na b : R[X]\nh : f = a * b\nq : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ ?refine'_2.hf.h.b * Polynomial.leadingCoeff b = 1\ncase refine'_2.hf.h.b\nR : Type u\nS : Type v\nT : Type w\na✝ b✝ : R\nn : ℕ\ninst✝³ : CommRing R\ninst✝² : IsDomain R\ninst✝¹ : CommRing S\ninst✝ : IsDomain S\nφ : R →+* S\nf : R[X]\nh_mon : Polynomial.leadingCoeff f = 1\nh_irr : Irreducible (Polynomial.map φ f)\na b : R[X]\nh : f = a * b\nq : Polynomial.leadingCoeff a * Polynomial.leadingCoeff b = 1\n⊢ R\n[PROOFSTEP]\nexact q\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.RingDivision", "llama_tokens": 78575, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.665410558746814, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.3534723259481761}}
{"text": "[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\n⊢ HasFDerivWithinAt f f' (closure s) x\n[PROOFSTEP]\nclassical\n  -- one can assume without loss of generality that `x` belongs to the closure of `s`, as the\n      -- statement is empty otherwise\nby_cases hx : x ∉ closure s\n· rw [← closure_closure] at hx ; exact hasFDerivWithinAt_of_not_mem_closure hx\npush_neg at hx \nrw [HasFDerivWithinAt, HasFDerivAtFilter, Asymptotics.isLittleO_iff]\n  /- One needs to show that `‖f y - f x - f' (y - x)‖ ≤ ε ‖y - x‖` for `y` close to `x` in\n        `closure s`, where `ε` is an arbitrary positive constant. By continuity of the functions, it\n        suffices to prove this for nearby points inside `s`. In a neighborhood of `x`, the derivative\n        of `f` is arbitrarily close to `f'` by assumption. The mean value inequality completes the\n        proof. -/\nintro ε ε_pos\nobtain ⟨δ, δ_pos, hδ⟩ : ∃ δ > 0, ∀ y ∈ s, dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε := by\n  simpa [dist_zero_right] using tendsto_nhdsWithin_nhds.1 h ε ε_pos\nset B := ball x δ\nsuffices : ∀ y ∈ B ∩ closure s, ‖f y - f x - (f' y - f' x)‖ ≤ ε * ‖y - x‖\nexact mem_nhdsWithin_iff.2 ⟨δ, δ_pos, fun y hy => by simpa using this y hy⟩\nsuffices ∀ p : E × E, p ∈ closure ((B ∩ s) ×ˢ (B ∩ s)) → ‖f p.2 - f p.1 - (f' p.2 - f' p.1)‖ ≤ ε * ‖p.2 - p.1‖\n  by\n  rw [closure_prod_eq] at this \n  intro y y_in\n  apply this ⟨x, y⟩\n  have : B ∩ closure s ⊆ closure (B ∩ s) := isOpen_ball.inter_closure\n  exact ⟨this ⟨mem_ball_self δ_pos, hx⟩, this y_in⟩\nhave key : ∀ p : E × E, p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.2 - f p.1 - (f' p.2 - f' p.1)‖ ≤ ε * ‖p.2 - p.1‖ :=\n  by\n  rintro ⟨u, v⟩ ⟨u_in, v_in⟩\n  have conv : Convex ℝ (B ∩ s) := (convex_ball _ _).inter s_conv\n  have diff : DifferentiableOn ℝ f (B ∩ s) := f_diff.mono (inter_subset_right _ _)\n  have bound : ∀ z ∈ B ∩ s, ‖fderivWithin ℝ f (B ∩ s) z - f'‖ ≤ ε :=\n    by\n    intro z z_in\n    have h := hδ z\n    have : fderivWithin ℝ f (B ∩ s) z = fderiv ℝ f z :=\n      by\n      have op : IsOpen (B ∩ s) := isOpen_ball.inter s_open\n      rw [DifferentiableAt.fderivWithin _ (op.uniqueDiffOn z z_in)]\n      exact (diff z z_in).differentiableAt (IsOpen.mem_nhds op z_in)\n    rw [← this] at h \n    exact (le_of_lt (h z_in.2 z_in.1))\n  simpa using conv.norm_image_sub_le_of_norm_fderivWithin_le' diff bound u_in v_in\nrintro ⟨u, v⟩ uv_in\nrefine' ContinuousWithinAt.closure_le uv_in _ _ key\nhave f_cont' : ∀ y ∈ closure s, ContinuousWithinAt (f - ⇑f') s y :=\n  by\n  intro y y_in\n  exact Tendsto.sub (f_cont y y_in) f'.cont.continuousWithinAt\nall_goals\n  -- common start for both continuity proofs\n  have : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s := by mono <;> exact inter_subset_right _ _\n  obtain ⟨u_in, v_in⟩ : u ∈ closure s ∧ v ∈ closure s := by simpa [closure_prod_eq] using closure_mono this uv_in\n  apply ContinuousWithinAt.mono _ this\n  simp only [ContinuousWithinAt]\nrw [nhdsWithin_prod_eq]\n· have : ∀ u v, f v - f u - (f' v - f' u) = f v - f' v - (f u - f' u) := by intros; abel\n  simp only [this]\n  exact\n    Tendsto.comp continuous_norm.continuousAt\n      ((Tendsto.comp (f_cont' v v_in) tendsto_snd).sub <| Tendsto.comp (f_cont' u u_in) tendsto_fst)\n· apply tendsto_nhdsWithin_of_tendsto_nhds\n  rw [nhds_prod_eq]\n  exact tendsto_const_nhds.mul (Tendsto.comp continuous_norm.continuousAt <| tendsto_snd.sub tendsto_fst)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\n⊢ HasFDerivWithinAt f f' (closure s) x\n[PROOFSTEP]\nby_cases hx : x ∉ closure s\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : ¬x ∈ closure s\n⊢ HasFDerivWithinAt f f' (closure s) x\n[PROOFSTEP]\nrw [← closure_closure] at hx \n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : ¬x ∈ closure (closure s)\n⊢ HasFDerivWithinAt f f' (closure s) x\n[PROOFSTEP]\nexact hasFDerivWithinAt_of_not_mem_closure hx\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : ¬¬x ∈ closure s\n⊢ HasFDerivWithinAt f f' (closure s) x\n[PROOFSTEP]\npush_neg at hx \n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\n⊢ HasFDerivWithinAt f f' (closure s) x\n[PROOFSTEP]\nrw [HasFDerivWithinAt, HasFDerivAtFilter, Asymptotics.isLittleO_iff]\n  /- One needs to show that `‖f y - f x - f' (y - x)‖ ≤ ε ‖y - x‖` for `y` close to `x` in\n        `closure s`, where `ε` is an arbitrary positive constant. By continuity of the functions, it\n        suffices to prove this for nearby points inside `s`. In a neighborhood of `x`, the derivative\n        of `f` is arbitrarily close to `f'` by assumption. The mean value inequality completes the\n        proof. -/\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\n⊢ ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[closure s] x, ‖f x_1 - f x - ↑f' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\n[PROOFSTEP]\nintro ε ε_pos\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\n⊢ ∀ᶠ (x_1 : E) in 𝓝[closure s] x, ‖f x_1 - f x - ↑f' (x_1 - x)‖ ≤ ε * ‖x_1 - x‖\n[PROOFSTEP]\nobtain ⟨δ, δ_pos, hδ⟩ : ∃ δ > 0, ∀ y ∈ s, dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε := by\n  simpa [dist_zero_right] using tendsto_nhdsWithin_nhds.1 h ε ε_pos\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\n⊢ ∃ δ, δ > 0 ∧ ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\n[PROOFSTEP]\nsimpa [dist_zero_right] using tendsto_nhdsWithin_nhds.1 h ε ε_pos\n[GOAL]\ncase neg.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\n⊢ ∀ᶠ (x_1 : E) in 𝓝[closure s] x, ‖f x_1 - f x - ↑f' (x_1 - x)‖ ≤ ε * ‖x_1 - x‖\n[PROOFSTEP]\nset B := ball x δ\n[GOAL]\ncase neg.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\n⊢ ∀ᶠ (x_1 : E) in 𝓝[closure s] x, ‖f x_1 - f x - ↑f' (x_1 - x)‖ ≤ ε * ‖x_1 - x‖\n[PROOFSTEP]\nsuffices : ∀ y ∈ B ∩ closure s, ‖f y - f x - (f' y - f' x)‖ ≤ ε * ‖y - x‖\n[GOAL]\ncase neg.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nthis : ∀ (y : E), y ∈ B ∩ closure s → ‖f y - f x - (↑f' y - ↑f' x)‖ ≤ ε * ‖y - x‖\n⊢ ∀ᶠ (x_1 : E) in 𝓝[closure s] x, ‖f x_1 - f x - ↑f' (x_1 - x)‖ ≤ ε * ‖x_1 - x‖\ncase this\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\n⊢ ∀ (y : E), y ∈ B ∩ closure s → ‖f y - f x - (↑f' y - ↑f' x)‖ ≤ ε * ‖y - x‖\n[PROOFSTEP]\nexact mem_nhdsWithin_iff.2 ⟨δ, δ_pos, fun y hy => by simpa using this y hy⟩\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nthis : ∀ (y : E), y ∈ B ∩ closure s → ‖f y - f x - (↑f' y - ↑f' x)‖ ≤ ε * ‖y - x‖\ny : E\nhy : y ∈ ball x δ ∩ closure s\n⊢ y ∈ {x_1 | (fun x_2 => ‖f x_2 - f x - ↑f' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\n[PROOFSTEP]\nsimpa using this y hy\n[GOAL]\ncase this\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\n⊢ ∀ (y : E), y ∈ B ∩ closure s → ‖f y - f x - (↑f' y - ↑f' x)‖ ≤ ε * ‖y - x‖\n[PROOFSTEP]\nsuffices ∀ p : E × E, p ∈ closure ((B ∩ s) ×ˢ (B ∩ s)) → ‖f p.2 - f p.1 - (f' p.2 - f' p.1)‖ ≤ ε * ‖p.2 - p.1‖\n  by\n  rw [closure_prod_eq] at this \n  intro y y_in\n  apply this ⟨x, y⟩\n  have : B ∩ closure s ⊆ closure (B ∩ s) := isOpen_ball.inter_closure\n  exact ⟨this ⟨mem_ball_self δ_pos, hx⟩, this y_in⟩\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nthis :\n  ∀ (p : E × E), p ∈ closure ((B ∩ s) ×ˢ (B ∩ s)) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\n⊢ ∀ (y : E), y ∈ B ∩ closure s → ‖f y - f x - (↑f' y - ↑f' x)‖ ≤ ε * ‖y - x‖\n[PROOFSTEP]\nrw [closure_prod_eq] at this \n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nthis :\n  ∀ (p : E × E),\n    p ∈ closure (B ∩ s) ×ˢ closure (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\n⊢ ∀ (y : E), y ∈ B ∩ closure s → ‖f y - f x - (↑f' y - ↑f' x)‖ ≤ ε * ‖y - x‖\n[PROOFSTEP]\nintro y y_in\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nthis :\n  ∀ (p : E × E),\n    p ∈ closure (B ∩ s) ×ˢ closure (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\ny : E\ny_in : y ∈ B ∩ closure s\n⊢ ‖f y - f x - (↑f' y - ↑f' x)‖ ≤ ε * ‖y - x‖\n[PROOFSTEP]\napply this ⟨x, y⟩\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nthis :\n  ∀ (p : E × E),\n    p ∈ closure (B ∩ s) ×ˢ closure (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\ny : E\ny_in : y ∈ B ∩ closure s\n⊢ (x, y) ∈ closure (B ∩ s) ×ˢ closure (B ∩ s)\n[PROOFSTEP]\nhave : B ∩ closure s ⊆ closure (B ∩ s) := isOpen_ball.inter_closure\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nthis✝ :\n  ∀ (p : E × E),\n    p ∈ closure (B ∩ s) ×ˢ closure (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\ny : E\ny_in : y ∈ B ∩ closure s\nthis : B ∩ closure s ⊆ closure (B ∩ s)\n⊢ (x, y) ∈ closure (B ∩ s) ×ˢ closure (B ∩ s)\n[PROOFSTEP]\nexact ⟨this ⟨mem_ball_self δ_pos, hx⟩, this y_in⟩\n[GOAL]\ncase this\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\n⊢ ∀ (p : E × E), p ∈ closure ((B ∩ s) ×ˢ (B ∩ s)) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\n[PROOFSTEP]\nhave key : ∀ p : E × E, p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.2 - f p.1 - (f' p.2 - f' p.1)‖ ≤ ε * ‖p.2 - p.1‖ :=\n  by\n  rintro ⟨u, v⟩ ⟨u_in, v_in⟩\n  have conv : Convex ℝ (B ∩ s) := (convex_ball _ _).inter s_conv\n  have diff : DifferentiableOn ℝ f (B ∩ s) := f_diff.mono (inter_subset_right _ _)\n  have bound : ∀ z ∈ B ∩ s, ‖fderivWithin ℝ f (B ∩ s) z - f'‖ ≤ ε :=\n    by\n    intro z z_in\n    have h := hδ z\n    have : fderivWithin ℝ f (B ∩ s) z = fderiv ℝ f z :=\n      by\n      have op : IsOpen (B ∩ s) := isOpen_ball.inter s_open\n      rw [DifferentiableAt.fderivWithin _ (op.uniqueDiffOn z z_in)]\n      exact (diff z z_in).differentiableAt (IsOpen.mem_nhds op z_in)\n    rw [← this] at h \n    exact (le_of_lt (h z_in.2 z_in.1))\n  simpa using conv.norm_image_sub_le_of_norm_fderivWithin_le' diff bound u_in v_in\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\n⊢ ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\n[PROOFSTEP]\nrintro ⟨u, v⟩ ⟨u_in, v_in⟩\n[GOAL]\ncase mk.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nu v : E\nu_in : (u, v).fst ∈ B ∩ s\nv_in : (u, v).snd ∈ B ∩ s\n⊢ ‖f (u, v).snd - f (u, v).fst - (↑f' (u, v).snd - ↑f' (u, v).fst)‖ ≤ ε * ‖(u, v).snd - (u, v).fst‖\n[PROOFSTEP]\nhave conv : Convex ℝ (B ∩ s) := (convex_ball _ _).inter s_conv\n[GOAL]\ncase mk.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nu v : E\nu_in : (u, v).fst ∈ B ∩ s\nv_in : (u, v).snd ∈ B ∩ s\nconv : Convex ℝ (B ∩ s)\n⊢ ‖f (u, v).snd - f (u, v).fst - (↑f' (u, v).snd - ↑f' (u, v).fst)‖ ≤ ε * ‖(u, v).snd - (u, v).fst‖\n[PROOFSTEP]\nhave diff : DifferentiableOn ℝ f (B ∩ s) := f_diff.mono (inter_subset_right _ _)\n[GOAL]\ncase mk.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nu v : E\nu_in : (u, v).fst ∈ B ∩ s\nv_in : (u, v).snd ∈ B ∩ s\nconv : Convex ℝ (B ∩ s)\ndiff : DifferentiableOn ℝ f (B ∩ s)\n⊢ ‖f (u, v).snd - f (u, v).fst - (↑f' (u, v).snd - ↑f' (u, v).fst)‖ ≤ ε * ‖(u, v).snd - (u, v).fst‖\n[PROOFSTEP]\nhave bound : ∀ z ∈ B ∩ s, ‖fderivWithin ℝ f (B ∩ s) z - f'‖ ≤ ε :=\n  by\n  intro z z_in\n  have h := hδ z\n  have : fderivWithin ℝ f (B ∩ s) z = fderiv ℝ f z :=\n    by\n    have op : IsOpen (B ∩ s) := isOpen_ball.inter s_open\n    rw [DifferentiableAt.fderivWithin _ (op.uniqueDiffOn z z_in)]\n    exact (diff z z_in).differentiableAt (IsOpen.mem_nhds op z_in)\n  rw [← this] at h \n  exact (le_of_lt (h z_in.2 z_in.1))\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nu v : E\nu_in : (u, v).fst ∈ B ∩ s\nv_in : (u, v).snd ∈ B ∩ s\nconv : Convex ℝ (B ∩ s)\ndiff : DifferentiableOn ℝ f (B ∩ s)\n⊢ ∀ (z : E), z ∈ B ∩ s → ‖fderivWithin ℝ f (B ∩ s) z - f'‖ ≤ ε\n[PROOFSTEP]\nintro z z_in\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nu v : E\nu_in : (u, v).fst ∈ B ∩ s\nv_in : (u, v).snd ∈ B ∩ s\nconv : Convex ℝ (B ∩ s)\ndiff : DifferentiableOn ℝ f (B ∩ s)\nz : E\nz_in : z ∈ B ∩ s\n⊢ ‖fderivWithin ℝ f (B ∩ s) z - f'‖ ≤ ε\n[PROOFSTEP]\nhave h := hδ z\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh✝ : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nu v : E\nu_in : (u, v).fst ∈ B ∩ s\nv_in : (u, v).snd ∈ B ∩ s\nconv : Convex ℝ (B ∩ s)\ndiff : DifferentiableOn ℝ f (B ∩ s)\nz : E\nz_in : z ∈ B ∩ s\nh : z ∈ s → dist z x < δ → ‖fderiv ℝ f z - f'‖ < ε\n⊢ ‖fderivWithin ℝ f (B ∩ s) z - f'‖ ≤ ε\n[PROOFSTEP]\nhave : fderivWithin ℝ f (B ∩ s) z = fderiv ℝ f z :=\n  by\n  have op : IsOpen (B ∩ s) := isOpen_ball.inter s_open\n  rw [DifferentiableAt.fderivWithin _ (op.uniqueDiffOn z z_in)]\n  exact (diff z z_in).differentiableAt (IsOpen.mem_nhds op z_in)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh✝ : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nu v : E\nu_in : (u, v).fst ∈ B ∩ s\nv_in : (u, v).snd ∈ B ∩ s\nconv : Convex ℝ (B ∩ s)\ndiff : DifferentiableOn ℝ f (B ∩ s)\nz : E\nz_in : z ∈ B ∩ s\nh : z ∈ s → dist z x < δ → ‖fderiv ℝ f z - f'‖ < ε\n⊢ fderivWithin ℝ f (B ∩ s) z = fderiv ℝ f z\n[PROOFSTEP]\nhave op : IsOpen (B ∩ s) := isOpen_ball.inter s_open\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh✝ : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nu v : E\nu_in : (u, v).fst ∈ B ∩ s\nv_in : (u, v).snd ∈ B ∩ s\nconv : Convex ℝ (B ∩ s)\ndiff : DifferentiableOn ℝ f (B ∩ s)\nz : E\nz_in : z ∈ B ∩ s\nh : z ∈ s → dist z x < δ → ‖fderiv ℝ f z - f'‖ < ε\nop : IsOpen (B ∩ s)\n⊢ fderivWithin ℝ f (B ∩ s) z = fderiv ℝ f z\n[PROOFSTEP]\nrw [DifferentiableAt.fderivWithin _ (op.uniqueDiffOn z z_in)]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh✝ : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nu v : E\nu_in : (u, v).fst ∈ B ∩ s\nv_in : (u, v).snd ∈ B ∩ s\nconv : Convex ℝ (B ∩ s)\ndiff : DifferentiableOn ℝ f (B ∩ s)\nz : E\nz_in : z ∈ B ∩ s\nh : z ∈ s → dist z x < δ → ‖fderiv ℝ f z - f'‖ < ε\nop : IsOpen (B ∩ s)\n⊢ DifferentiableAt ℝ f z\n[PROOFSTEP]\nexact (diff z z_in).differentiableAt (IsOpen.mem_nhds op z_in)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh✝ : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nu v : E\nu_in : (u, v).fst ∈ B ∩ s\nv_in : (u, v).snd ∈ B ∩ s\nconv : Convex ℝ (B ∩ s)\ndiff : DifferentiableOn ℝ f (B ∩ s)\nz : E\nz_in : z ∈ B ∩ s\nh : z ∈ s → dist z x < δ → ‖fderiv ℝ f z - f'‖ < ε\nthis : fderivWithin ℝ f (B ∩ s) z = fderiv ℝ f z\n⊢ ‖fderivWithin ℝ f (B ∩ s) z - f'‖ ≤ ε\n[PROOFSTEP]\nrw [← this] at h \n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh✝ : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nu v : E\nu_in : (u, v).fst ∈ B ∩ s\nv_in : (u, v).snd ∈ B ∩ s\nconv : Convex ℝ (B ∩ s)\ndiff : DifferentiableOn ℝ f (B ∩ s)\nz : E\nz_in : z ∈ B ∩ s\nh : z ∈ s → dist z x < δ → ‖fderivWithin ℝ f (B ∩ s) z - f'‖ < ε\nthis : fderivWithin ℝ f (B ∩ s) z = fderiv ℝ f z\n⊢ ‖fderivWithin ℝ f (B ∩ s) z - f'‖ ≤ ε\n[PROOFSTEP]\nexact (le_of_lt (h z_in.2 z_in.1))\n[GOAL]\ncase mk.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nu v : E\nu_in : (u, v).fst ∈ B ∩ s\nv_in : (u, v).snd ∈ B ∩ s\nconv : Convex ℝ (B ∩ s)\ndiff : DifferentiableOn ℝ f (B ∩ s)\nbound : ∀ (z : E), z ∈ B ∩ s → ‖fderivWithin ℝ f (B ∩ s) z - f'‖ ≤ ε\n⊢ ‖f (u, v).snd - f (u, v).fst - (↑f' (u, v).snd - ↑f' (u, v).fst)‖ ≤ ε * ‖(u, v).snd - (u, v).fst‖\n[PROOFSTEP]\nsimpa using conv.norm_image_sub_le_of_norm_fderivWithin_le' diff bound u_in v_in\n[GOAL]\ncase this\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\n⊢ ∀ (p : E × E), p ∈ closure ((B ∩ s) ×ˢ (B ∩ s)) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\n[PROOFSTEP]\nrintro ⟨u, v⟩ uv_in\n[GOAL]\ncase this.mk\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\n⊢ ‖f (u, v).snd - f (u, v).fst - (↑f' (u, v).snd - ↑f' (u, v).fst)‖ ≤ ε * ‖(u, v).snd - (u, v).fst‖\n[PROOFSTEP]\nrefine' ContinuousWithinAt.closure_le uv_in _ _ key\n[GOAL]\ncase this.mk.refine'_1\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\n⊢ ContinuousWithinAt (fun y => ‖f y.snd - f y.fst - (↑f' y.snd - ↑f' y.fst)‖) ((B ∩ s) ×ˢ (B ∩ s)) (u, v)\ncase this.mk.refine'_2\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\n⊢ ContinuousWithinAt (fun y => ε * ‖y.snd - y.fst‖) ((B ∩ s) ×ˢ (B ∩ s)) (u, v)\n[PROOFSTEP]\nhave f_cont' : ∀ y ∈ closure s, ContinuousWithinAt (f - ⇑f') s y :=\n  by\n  intro y y_in\n  exact Tendsto.sub (f_cont y y_in) f'.cont.continuousWithinAt\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\n⊢ ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\n[PROOFSTEP]\nintro y y_in\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\ny : E\ny_in : y ∈ closure s\n⊢ ContinuousWithinAt (f - ↑f') s y\n[PROOFSTEP]\nexact Tendsto.sub (f_cont y y_in) f'.cont.continuousWithinAt\n[GOAL]\ncase this.mk.refine'_1\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\n⊢ ContinuousWithinAt (fun y => ‖f y.snd - f y.fst - (↑f' y.snd - ↑f' y.fst)‖) ((B ∩ s) ×ˢ (B ∩ s)) (u, v)\ncase this.mk.refine'_2\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\n⊢ ContinuousWithinAt (fun y => ε * ‖y.snd - y.fst‖) ((B ∩ s) ×ˢ (B ∩ s)) (u, v)\n[PROOFSTEP]\nall_goals\n  -- common start for both continuity proofs\n  have : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s := by mono <;> exact inter_subset_right _ _\n  obtain ⟨u_in, v_in⟩ : u ∈ closure s ∧ v ∈ closure s := by simpa [closure_prod_eq] using closure_mono this uv_in\n  apply ContinuousWithinAt.mono _ this\n  simp only [ContinuousWithinAt]\n[GOAL]\ncase this.mk.refine'_1\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\n⊢ ContinuousWithinAt (fun y => ‖f y.snd - f y.fst - (↑f' y.snd - ↑f' y.fst)‖) ((B ∩ s) ×ˢ (B ∩ s)) (u, v)\n[PROOFSTEP]\nhave : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s := by mono <;> exact inter_subset_right _ _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\n⊢ (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\n[PROOFSTEP]\nmono\n[GOAL]\ncase hs\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\n⊢ B ∩ s ⊆ s\n[PROOFSTEP]\nexact inter_subset_right _ _\n[GOAL]\ncase ht\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\n⊢ B ∩ s ⊆ s\n[PROOFSTEP]\nexact inter_subset_right _ _\n[GOAL]\ncase this.mk.refine'_1\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\n⊢ ContinuousWithinAt (fun y => ‖f y.snd - f y.fst - (↑f' y.snd - ↑f' y.fst)‖) ((B ∩ s) ×ˢ (B ∩ s)) (u, v)\n[PROOFSTEP]\nobtain ⟨u_in, v_in⟩ : u ∈ closure s ∧ v ∈ closure s := by simpa [closure_prod_eq] using closure_mono this uv_in\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\n⊢ u ∈ closure s ∧ v ∈ closure s\n[PROOFSTEP]\nsimpa [closure_prod_eq] using closure_mono this uv_in\n[GOAL]\ncase this.mk.refine'_1.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\n⊢ ContinuousWithinAt (fun y => ‖f y.snd - f y.fst - (↑f' y.snd - ↑f' y.fst)‖) ((B ∩ s) ×ˢ (B ∩ s)) (u, v)\n[PROOFSTEP]\napply ContinuousWithinAt.mono _ this\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\n⊢ ContinuousWithinAt (fun y => ‖f y.snd - f y.fst - (↑f' y.snd - ↑f' y.fst)‖) (s ×ˢ s) (u, v)\n[PROOFSTEP]\nsimp only [ContinuousWithinAt]\n[GOAL]\ncase this.mk.refine'_2\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\n⊢ ContinuousWithinAt (fun y => ε * ‖y.snd - y.fst‖) ((B ∩ s) ×ˢ (B ∩ s)) (u, v)\n[PROOFSTEP]\nhave : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s := by mono <;> exact inter_subset_right _ _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\n⊢ (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\n[PROOFSTEP]\nmono\n[GOAL]\ncase hs\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\n⊢ B ∩ s ⊆ s\n[PROOFSTEP]\nexact inter_subset_right _ _\n[GOAL]\ncase ht\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\n⊢ B ∩ s ⊆ s\n[PROOFSTEP]\nexact inter_subset_right _ _\n[GOAL]\ncase this.mk.refine'_2\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\n⊢ ContinuousWithinAt (fun y => ε * ‖y.snd - y.fst‖) ((B ∩ s) ×ˢ (B ∩ s)) (u, v)\n[PROOFSTEP]\nobtain ⟨u_in, v_in⟩ : u ∈ closure s ∧ v ∈ closure s := by simpa [closure_prod_eq] using closure_mono this uv_in\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\n⊢ u ∈ closure s ∧ v ∈ closure s\n[PROOFSTEP]\nsimpa [closure_prod_eq] using closure_mono this uv_in\n[GOAL]\ncase this.mk.refine'_2.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\n⊢ ContinuousWithinAt (fun y => ε * ‖y.snd - y.fst‖) ((B ∩ s) ×ˢ (B ∩ s)) (u, v)\n[PROOFSTEP]\napply ContinuousWithinAt.mono _ this\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\n⊢ ContinuousWithinAt (fun y => ε * ‖y.snd - y.fst‖) (s ×ˢ s) (u, v)\n[PROOFSTEP]\nsimp only [ContinuousWithinAt]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\n⊢ Tendsto (fun y => ‖f y.snd - f y.fst - (↑f' y.snd - ↑f' y.fst)‖) (𝓝[s ×ˢ s] (u, v)) (𝓝 ‖f v - f u - (↑f' v - ↑f' u)‖)\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\n⊢ Tendsto (fun y => ε * ‖y.snd - y.fst‖) (𝓝[s ×ˢ s] (u, v)) (𝓝 (ε * ‖v - u‖))\n[PROOFSTEP]\nrw [nhdsWithin_prod_eq]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\n⊢ Tendsto (fun y => ‖f y.snd - f y.fst - (↑f' y.snd - ↑f' y.fst)‖) (𝓝[s] u ×ˢ 𝓝[s] v) (𝓝 ‖f v - f u - (↑f' v - ↑f' u)‖)\n[PROOFSTEP]\nhave : ∀ u v, f v - f u - (f' v - f' u) = f v - f' v - (f u - f' u) := by intros; abel\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\n⊢ ∀ (u v : E), f v - f u - (↑f' v - ↑f' u) = f v - ↑f' v - (f u - ↑f' u)\n[PROOFSTEP]\nintros\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\nu✝ v✝ : E\n⊢ f v✝ - f u✝ - (↑f' v✝ - ↑f' u✝) = f v✝ - ↑f' v✝ - (f u✝ - ↑f' u✝)\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\nu✝ v✝ : E\n⊢ f v✝ - f u✝ - (↑f' v✝ - ↑f' u✝) = f v✝ - ↑f' v✝ - (f u✝ - ↑f' u✝)\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\nthis✝ : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\nthis : ∀ (u v : E), f v - f u - (↑f' v - ↑f' u) = f v - ↑f' v - (f u - ↑f' u)\n⊢ Tendsto (fun y => ‖f y.snd - f y.fst - (↑f' y.snd - ↑f' y.fst)‖) (𝓝[s] u ×ˢ 𝓝[s] v) (𝓝 ‖f v - f u - (↑f' v - ↑f' u)‖)\n[PROOFSTEP]\nsimp only [this]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nf_cont' : ∀ (y : E), y ∈ closure s → ContinuousWithinAt (f - ↑f') s y\nthis✝ : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\nthis : ∀ (u v : E), f v - f u - (↑f' v - ↑f' u) = f v - ↑f' v - (f u - ↑f' u)\n⊢ Tendsto (fun y => ‖f y.snd - ↑f' y.snd - (f y.fst - ↑f' y.fst)‖) (𝓝[s] u ×ˢ 𝓝[s] v) (𝓝 ‖f v - ↑f' v - (f u - ↑f' u)‖)\n[PROOFSTEP]\nexact\n  Tendsto.comp continuous_norm.continuousAt\n    ((Tendsto.comp (f_cont' v v_in) tendsto_snd).sub <| Tendsto.comp (f_cont' u u_in) tendsto_fst)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\n⊢ Tendsto (fun y => ε * ‖y.snd - y.fst‖) (𝓝[s ×ˢ s] (u, v)) (𝓝 (ε * ‖v - u‖))\n[PROOFSTEP]\napply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase h\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\n⊢ Tendsto (fun y => ε * ‖y.snd - y.fst‖) (𝓝 (u, v)) (𝓝 (ε * ‖v - u‖))\n[PROOFSTEP]\nrw [nhds_prod_eq]\n[GOAL]\ncase h\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\ns : Set E\nx : E\nf' : E →L[ℝ] F\nf_diff : DifferentiableOn ℝ f s\ns_conv : Convex ℝ s\ns_open : IsOpen s\nf_cont : ∀ (y : E), y ∈ closure s → ContinuousWithinAt f s y\nh : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')\nhx : x ∈ closure s\nε : ℝ\nε_pos : 0 < ε\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (y : E), y ∈ s → dist y x < δ → ‖fderiv ℝ f y - f'‖ < ε\nB : Set E := ball x δ\nkey : ∀ (p : E × E), p ∈ (B ∩ s) ×ˢ (B ∩ s) → ‖f p.snd - f p.fst - (↑f' p.snd - ↑f' p.fst)‖ ≤ ε * ‖p.snd - p.fst‖\nu v : E\nuv_in : (u, v) ∈ closure ((B ∩ s) ×ˢ (B ∩ s))\nthis : (B ∩ s) ×ˢ (B ∩ s) ⊆ s ×ˢ s\nu_in : u ∈ closure s\nv_in : v ∈ closure s\n⊢ Tendsto (fun y => ε * ‖y.snd - y.fst‖) (𝓝 u ×ˢ 𝓝 v) (𝓝 (ε * ‖v - u‖))\n[PROOFSTEP]\nexact tendsto_const_nhds.mul (Tendsto.comp continuous_norm.continuousAt <| tendsto_snd.sub tendsto_fst)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\n⊢ HasDerivWithinAt f e (Ici a) a\n[PROOFSTEP]\nobtain ⟨b, ab : a < b, sab : Ioc a b ⊆ s⟩ := mem_nhdsWithin_Ioi_iff_exists_Ioc_subset.1 hs\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\n⊢ HasDerivWithinAt f e (Ici a) a\n[PROOFSTEP]\nlet t := Ioo a b\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\n⊢ HasDerivWithinAt f e (Ici a) a\n[PROOFSTEP]\nhave ts : t ⊆ s := Subset.trans Ioo_subset_Ioc_self sab\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\n⊢ HasDerivWithinAt f e (Ici a) a\n[PROOFSTEP]\nhave t_diff : DifferentiableOn ℝ f t := f_diff.mono ts\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\n⊢ HasDerivWithinAt f e (Ici a) a\n[PROOFSTEP]\nhave t_conv : Convex ℝ t := convex_Ioo a b\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\n⊢ HasDerivWithinAt f e (Ici a) a\n[PROOFSTEP]\nhave t_open : IsOpen t := isOpen_Ioo\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\n⊢ HasDerivWithinAt f e (Ici a) a\n[PROOFSTEP]\nhave t_closure : closure t = Icc a b := closure_Ioo ab.ne\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\n⊢ HasDerivWithinAt f e (Ici a) a\n[PROOFSTEP]\nhave t_cont : ∀ y ∈ closure t, ContinuousWithinAt f t y :=\n  by\n  rw [t_closure]\n  intro y hy\n  by_cases h : y = a\n  · rw [h]; exact f_lim.mono ts\n  · have : y ∈ s := sab ⟨lt_of_le_of_ne hy.1 (Ne.symm h), hy.2⟩\n    exact (f_diff.continuousOn y this).mono ts\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\n⊢ ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\n[PROOFSTEP]\nrw [t_closure]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\n⊢ ∀ (y : ℝ), y ∈ Icc a b → ContinuousWithinAt f t y\n[PROOFSTEP]\nintro y hy\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\ny : ℝ\nhy : y ∈ Icc a b\n⊢ ContinuousWithinAt f t y\n[PROOFSTEP]\nby_cases h : y = a\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\ny : ℝ\nhy : y ∈ Icc a b\nh : y = a\n⊢ ContinuousWithinAt f t y\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\ny : ℝ\nhy : y ∈ Icc a b\nh : y = a\n⊢ ContinuousWithinAt f t a\n[PROOFSTEP]\nexact f_lim.mono ts\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\ny : ℝ\nhy : y ∈ Icc a b\nh : ¬y = a\n⊢ ContinuousWithinAt f t y\n[PROOFSTEP]\nhave : y ∈ s := sab ⟨lt_of_le_of_ne hy.1 (Ne.symm h), hy.2⟩\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\ny : ℝ\nhy : y ∈ Icc a b\nh : ¬y = a\nthis : y ∈ s\n⊢ ContinuousWithinAt f t y\n[PROOFSTEP]\nexact (f_diff.continuousOn y this).mono ts\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\n⊢ HasDerivWithinAt f e (Ici a) a\n[PROOFSTEP]\nhave t_diff' : Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e)) :=\n  by\n  simp only [deriv_fderiv.symm]\n  exact\n    Tendsto.comp (isBoundedBilinearMap_smulRight : IsBoundedBilinearMap ℝ _).continuous_right.continuousAt\n      (tendsto_nhdsWithin_mono_left Ioo_subset_Ioi_self f_lim')\n        -- now we can apply `has_fderiv_at_boundary_of_differentiable`\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\n⊢ Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e))\n[PROOFSTEP]\nsimp only [deriv_fderiv.symm]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\n⊢ Tendsto (fun x => smulRight 1 (deriv f x)) (𝓝[Ioo a b] a) (𝓝 (smulRight 1 e))\n[PROOFSTEP]\nexact\n  Tendsto.comp (isBoundedBilinearMap_smulRight : IsBoundedBilinearMap ℝ _).continuous_right.continuousAt\n    (tendsto_nhdsWithin_mono_left Ioo_subset_Ioi_self f_lim')\n      -- now we can apply `has_fderiv_at_boundary_of_differentiable`\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\nt_diff' : Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e))\n⊢ HasDerivWithinAt f e (Ici a) a\n[PROOFSTEP]\nhave : HasDerivWithinAt f e (Icc a b) a :=\n  by\n  rw [hasDerivWithinAt_iff_hasFDerivWithinAt, ← t_closure]\n  exact has_fderiv_at_boundary_of_tendsto_fderiv t_diff t_conv t_open t_cont t_diff'\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\nt_diff' : Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e))\n⊢ HasDerivWithinAt f e (Icc a b) a\n[PROOFSTEP]\nrw [hasDerivWithinAt_iff_hasFDerivWithinAt, ← t_closure]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\nt_diff' : Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e))\n⊢ HasFDerivWithinAt f (smulRight 1 e) (closure t) a\n[PROOFSTEP]\nexact has_fderiv_at_boundary_of_tendsto_fderiv t_diff t_conv t_open t_cont t_diff'\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Ioi a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Ioi a] a) (𝓝 e)\nb : ℝ\nab : a < b\nsab : Ioc a b ⊆ s\nt : Set ℝ := Ioo a b\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc a b\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\nt_diff' : Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e))\nthis : HasDerivWithinAt f e (Icc a b) a\n⊢ HasDerivWithinAt f e (Ici a) a\n[PROOFSTEP]\nexact this.nhdsWithin (Icc_mem_nhdsWithin_Ici <| left_mem_Ico.2 ab)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\n⊢ HasDerivWithinAt f e (Iic a) a\n[PROOFSTEP]\nobtain ⟨b, ba, sab⟩ : ∃ b ∈ Iio a, Ico b a ⊆ s := mem_nhdsWithin_Iio_iff_exists_Ico_subset.1 hs\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\n⊢ HasDerivWithinAt f e (Iic a) a\n[PROOFSTEP]\nlet t := Ioo b a\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\n⊢ HasDerivWithinAt f e (Iic a) a\n[PROOFSTEP]\nhave ts : t ⊆ s := Subset.trans Ioo_subset_Ico_self sab\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\n⊢ HasDerivWithinAt f e (Iic a) a\n[PROOFSTEP]\nhave t_diff : DifferentiableOn ℝ f t := f_diff.mono ts\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\n⊢ HasDerivWithinAt f e (Iic a) a\n[PROOFSTEP]\nhave t_conv : Convex ℝ t := convex_Ioo b a\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\n⊢ HasDerivWithinAt f e (Iic a) a\n[PROOFSTEP]\nhave t_open : IsOpen t := isOpen_Ioo\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\n⊢ HasDerivWithinAt f e (Iic a) a\n[PROOFSTEP]\nhave t_closure : closure t = Icc b a := closure_Ioo (ne_of_lt ba)\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\n⊢ HasDerivWithinAt f e (Iic a) a\n[PROOFSTEP]\nhave t_cont : ∀ y ∈ closure t, ContinuousWithinAt f t y :=\n  by\n  rw [t_closure]\n  intro y hy\n  by_cases h : y = a\n  · rw [h]; exact f_lim.mono ts\n  · have : y ∈ s := sab ⟨hy.1, lt_of_le_of_ne hy.2 h⟩\n    exact (f_diff.continuousOn y this).mono ts\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\n⊢ ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\n[PROOFSTEP]\nrw [t_closure]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\n⊢ ∀ (y : ℝ), y ∈ Icc b a → ContinuousWithinAt f t y\n[PROOFSTEP]\nintro y hy\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\ny : ℝ\nhy : y ∈ Icc b a\n⊢ ContinuousWithinAt f t y\n[PROOFSTEP]\nby_cases h : y = a\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\ny : ℝ\nhy : y ∈ Icc b a\nh : y = a\n⊢ ContinuousWithinAt f t y\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\ny : ℝ\nhy : y ∈ Icc b a\nh : y = a\n⊢ ContinuousWithinAt f t a\n[PROOFSTEP]\nexact f_lim.mono ts\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\ny : ℝ\nhy : y ∈ Icc b a\nh : ¬y = a\n⊢ ContinuousWithinAt f t y\n[PROOFSTEP]\nhave : y ∈ s := sab ⟨hy.1, lt_of_le_of_ne hy.2 h⟩\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\ny : ℝ\nhy : y ∈ Icc b a\nh : ¬y = a\nthis : y ∈ s\n⊢ ContinuousWithinAt f t y\n[PROOFSTEP]\nexact (f_diff.continuousOn y this).mono ts\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\n⊢ HasDerivWithinAt f e (Iic a) a\n[PROOFSTEP]\nhave t_diff' : Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e)) :=\n  by\n  simp only [deriv_fderiv.symm]\n  exact\n    Tendsto.comp (isBoundedBilinearMap_smulRight : IsBoundedBilinearMap ℝ _).continuous_right.continuousAt\n      (tendsto_nhdsWithin_mono_left Ioo_subset_Iio_self f_lim')\n        -- now we can apply `has_fderiv_at_boundary_of_differentiable`\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\n⊢ Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e))\n[PROOFSTEP]\nsimp only [deriv_fderiv.symm]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\n⊢ Tendsto (fun x => smulRight 1 (deriv f x)) (𝓝[Ioo b a] a) (𝓝 (smulRight 1 e))\n[PROOFSTEP]\nexact\n  Tendsto.comp (isBoundedBilinearMap_smulRight : IsBoundedBilinearMap ℝ _).continuous_right.continuousAt\n    (tendsto_nhdsWithin_mono_left Ioo_subset_Iio_self f_lim')\n      -- now we can apply `has_fderiv_at_boundary_of_differentiable`\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\nt_diff' : Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e))\n⊢ HasDerivWithinAt f e (Iic a) a\n[PROOFSTEP]\nhave : HasDerivWithinAt f e (Icc b a) a :=\n  by\n  rw [hasDerivWithinAt_iff_hasFDerivWithinAt, ← t_closure]\n  exact has_fderiv_at_boundary_of_tendsto_fderiv t_diff t_conv t_open t_cont t_diff'\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\nt_diff' : Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e))\n⊢ HasDerivWithinAt f e (Icc b a) a\n[PROOFSTEP]\nrw [hasDerivWithinAt_iff_hasFDerivWithinAt, ← t_closure]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\nt_diff' : Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e))\n⊢ HasFDerivWithinAt f (smulRight 1 e) (closure t) a\n[PROOFSTEP]\nexact has_fderiv_at_boundary_of_tendsto_fderiv t_diff t_conv t_open t_cont t_diff'\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set ℝ\ne : E\na : ℝ\nf : ℝ → E\nf_diff : DifferentiableOn ℝ f s\nf_lim : ContinuousWithinAt f s a\nhs : s ∈ 𝓝[Iio a] a\nf_lim' : Tendsto (fun x => deriv f x) (𝓝[Iio a] a) (𝓝 e)\nb : ℝ\nba : b ∈ Iio a\nsab : Ico b a ⊆ s\nt : Set ℝ := Ioo b a\nts : t ⊆ s\nt_diff : DifferentiableOn ℝ f t\nt_conv : Convex ℝ t\nt_open : IsOpen t\nt_closure : closure t = Icc b a\nt_cont : ∀ (y : ℝ), y ∈ closure t → ContinuousWithinAt f t y\nt_diff' : Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e))\nthis : HasDerivWithinAt f e (Icc b a) a\n⊢ HasDerivWithinAt f e (Iic a) a\n[PROOFSTEP]\nexact this.nhdsWithin (Icc_mem_nhdsWithin_Iic <| right_mem_Ioc.2 ba)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\n⊢ HasDerivAt f (g x) x\n[PROOFSTEP]\nhave A : HasDerivWithinAt f (g x) (Ici x) x :=\n  by\n  have diff : DifferentiableOn ℝ f (Ioi x) := fun y hy =>\n    (f_diff y (ne_of_gt hy)).differentiableAt.differentiableWithinAt\n  apply has_deriv_at_interval_left_endpoint_of_tendsto_deriv diff hf.continuousWithinAt self_mem_nhdsWithin\n  have : Tendsto g (𝓝[>] x) (𝓝 (g x)) := tendsto_inf_left hg\n  apply this.congr' _\n  apply mem_of_superset self_mem_nhdsWithin fun y hy => _\n  intros y hy\n  exact (f_diff y (ne_of_gt hy)).deriv.symm\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\n⊢ HasDerivWithinAt f (g x) (Ici x) x\n[PROOFSTEP]\nhave diff : DifferentiableOn ℝ f (Ioi x) := fun y hy => (f_diff y (ne_of_gt hy)).differentiableAt.differentiableWithinAt\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\ndiff : DifferentiableOn ℝ f (Ioi x)\n⊢ HasDerivWithinAt f (g x) (Ici x) x\n[PROOFSTEP]\napply has_deriv_at_interval_left_endpoint_of_tendsto_deriv diff hf.continuousWithinAt self_mem_nhdsWithin\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\ndiff : DifferentiableOn ℝ f (Ioi x)\n⊢ Tendsto (fun x => deriv f x) (𝓝[Ioi x] x) (𝓝 (g x))\n[PROOFSTEP]\nhave : Tendsto g (𝓝[>] x) (𝓝 (g x)) := tendsto_inf_left hg\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\ndiff : DifferentiableOn ℝ f (Ioi x)\nthis : Tendsto g (𝓝[Ioi x] x) (𝓝 (g x))\n⊢ Tendsto (fun x => deriv f x) (𝓝[Ioi x] x) (𝓝 (g x))\n[PROOFSTEP]\napply this.congr' _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\ndiff : DifferentiableOn ℝ f (Ioi x)\nthis : Tendsto g (𝓝[Ioi x] x) (𝓝 (g x))\n⊢ g =ᶠ[𝓝[Ioi x] x] fun x => deriv f x\n[PROOFSTEP]\napply mem_of_superset self_mem_nhdsWithin fun y hy => _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\ndiff : DifferentiableOn ℝ f (Ioi x)\nthis : Tendsto g (𝓝[Ioi x] x) (𝓝 (g x))\n⊢ ∀ (y : ℝ), y ∈ Ioi x → y ∈ {x | (fun x => g x = (fun x => deriv f x) x) x}\n[PROOFSTEP]\nintros y hy\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\ndiff : DifferentiableOn ℝ f (Ioi x)\nthis : Tendsto g (𝓝[Ioi x] x) (𝓝 (g x))\ny : ℝ\nhy : y ∈ Ioi x\n⊢ y ∈ {x | (fun x => g x = (fun x => deriv f x) x) x}\n[PROOFSTEP]\nexact (f_diff y (ne_of_gt hy)).deriv.symm\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\nA : HasDerivWithinAt f (g x) (Ici x) x\n⊢ HasDerivAt f (g x) x\n[PROOFSTEP]\nhave B : HasDerivWithinAt f (g x) (Iic x) x :=\n  by\n  have diff : DifferentiableOn ℝ f (Iio x) := fun y hy =>\n    (f_diff y (ne_of_lt hy)).differentiableAt.differentiableWithinAt\n  apply has_deriv_at_interval_right_endpoint_of_tendsto_deriv diff hf.continuousWithinAt self_mem_nhdsWithin\n  have : Tendsto g (𝓝[<] x) (𝓝 (g x)) := tendsto_inf_left hg\n  apply this.congr' _\n  apply mem_of_superset self_mem_nhdsWithin fun y hy => _\n  intros y hy\n  exact (f_diff y (ne_of_lt hy)).deriv.symm\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\nA : HasDerivWithinAt f (g x) (Ici x) x\n⊢ HasDerivWithinAt f (g x) (Iic x) x\n[PROOFSTEP]\nhave diff : DifferentiableOn ℝ f (Iio x) := fun y hy => (f_diff y (ne_of_lt hy)).differentiableAt.differentiableWithinAt\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\nA : HasDerivWithinAt f (g x) (Ici x) x\ndiff : DifferentiableOn ℝ f (Iio x)\n⊢ HasDerivWithinAt f (g x) (Iic x) x\n[PROOFSTEP]\napply has_deriv_at_interval_right_endpoint_of_tendsto_deriv diff hf.continuousWithinAt self_mem_nhdsWithin\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\nA : HasDerivWithinAt f (g x) (Ici x) x\ndiff : DifferentiableOn ℝ f (Iio x)\n⊢ Tendsto (fun x => deriv f x) (𝓝[Iio x] x) (𝓝 (g x))\n[PROOFSTEP]\nhave : Tendsto g (𝓝[<] x) (𝓝 (g x)) := tendsto_inf_left hg\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\nA : HasDerivWithinAt f (g x) (Ici x) x\ndiff : DifferentiableOn ℝ f (Iio x)\nthis : Tendsto g (𝓝[Iio x] x) (𝓝 (g x))\n⊢ Tendsto (fun x => deriv f x) (𝓝[Iio x] x) (𝓝 (g x))\n[PROOFSTEP]\napply this.congr' _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\nA : HasDerivWithinAt f (g x) (Ici x) x\ndiff : DifferentiableOn ℝ f (Iio x)\nthis : Tendsto g (𝓝[Iio x] x) (𝓝 (g x))\n⊢ g =ᶠ[𝓝[Iio x] x] fun x => deriv f x\n[PROOFSTEP]\napply mem_of_superset self_mem_nhdsWithin fun y hy => _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\nA : HasDerivWithinAt f (g x) (Ici x) x\ndiff : DifferentiableOn ℝ f (Iio x)\nthis : Tendsto g (𝓝[Iio x] x) (𝓝 (g x))\n⊢ ∀ (y : ℝ), y ∈ Iio x → y ∈ {x | (fun x => g x = (fun x => deriv f x) x) x}\n[PROOFSTEP]\nintros y hy\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\nA : HasDerivWithinAt f (g x) (Ici x) x\ndiff : DifferentiableOn ℝ f (Iio x)\nthis : Tendsto g (𝓝[Iio x] x) (𝓝 (g x))\ny : ℝ\nhy : y ∈ Iio x\n⊢ y ∈ {x | (fun x => g x = (fun x => deriv f x) x) x}\n[PROOFSTEP]\nexact (f_diff y (ne_of_lt hy)).deriv.symm\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\nA : HasDerivWithinAt f (g x) (Ici x) x\nB : HasDerivWithinAt f (g x) (Iic x) x\n⊢ HasDerivAt f (g x) x\n[PROOFSTEP]\nsimpa using B.union A\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\ny : ℝ\n⊢ HasDerivAt f (g y) y\n[PROOFSTEP]\nrcases eq_or_ne y x with (rfl | hne)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\ny : ℝ\nf_diff : ∀ (y_1 : ℝ), y_1 ≠ y → HasDerivAt f (g y_1) y_1\nhf : ContinuousAt f y\nhg : ContinuousAt g y\n⊢ HasDerivAt f (g y) y\n[PROOFSTEP]\nexact hasDerivAt_of_hasDerivAt_of_ne f_diff hf hg\n[GOAL]\ncase inr\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : ℝ → E\nx : ℝ\nf_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y\nhf : ContinuousAt f x\nhg : ContinuousAt g x\ny : ℝ\nhne : y ≠ x\n⊢ HasDerivAt f (g y) y\n[PROOFSTEP]\nexact f_diff y hne\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.FDeriv.Extend", "llama_tokens": 51779, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.6959583376458152, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.35341590090057745}}
{"text": "[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : X ⟶ Y\nhf : NormalMono (F.map f)\n⊢ F.map (f ≫ Full.preimage (NormalMono.g ≫ (Functor.objObjPreimageIso F (NormalMono.Z (F.map f))).inv)) = F.map 0\n[PROOFSTEP]\nhave reassoc' {W : D} (h : hf.Z ⟶ W) : F.map f ≫ hf.g ≫ h = 0 ≫ h := by rw [← Category.assoc, eq_whisker hf.w]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : X ⟶ Y\nhf : NormalMono (F.map f)\nW : D\nh : NormalMono.Z (F.map f) ⟶ W\n⊢ F.map f ≫ NormalMono.g ≫ h = 0 ≫ h\n[PROOFSTEP]\nrw [← Category.assoc, eq_whisker hf.w]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : X ⟶ Y\nhf : NormalMono (F.map f)\nreassoc' : ∀ {W : D} (h : NormalMono.Z (F.map f) ⟶ W), F.map f ≫ NormalMono.g ≫ h = 0 ≫ h\n⊢ F.map (f ≫ Full.preimage (NormalMono.g ≫ (Functor.objObjPreimageIso F (NormalMono.Z (F.map f))).inv)) = F.map 0\n[PROOFSTEP]\nsimp [reassoc']\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : X ⟶ Y\nhf : NormalMono (F.map f)\n⊢ F.map (Full.preimage (NormalMono.g ≫ (Functor.objObjPreimageIso F (NormalMono.Z (F.map f))).inv)) ≫\n      (Functor.objObjPreimageIso F (NormalMono.Z (F.map f))).hom =\n    NormalMono.g\n[PROOFSTEP]\nsimp only [Full.witness, Category.assoc, Iso.inv_hom_id, Category.comp_id]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : X ⟶ Y\nhf : NormalMono (F.map f)\n⊢ KernelFork.ofι\n      (Fork.ι (KernelFork.ofι (F.map f) (_ : F.map f ≫ NormalMono.g = 0)) ≫\n        𝟙 ((parallelPair NormalMono.g 0).obj WalkingParallelPair.zero))\n      (_ :\n        (Fork.ι (KernelFork.ofι (F.map f) (_ : F.map f ≫ NormalMono.g = 0)) ≫\n              𝟙 ((parallelPair NormalMono.g 0).obj WalkingParallelPair.zero)) ≫\n            F.map (Full.preimage (NormalMono.g ≫ (Functor.objObjPreimageIso F (NormalMono.Z (F.map f))).inv)) =\n          0) ≅\n    (Cones.postcomposeEquivalence (compNatIso F)).functor.obj\n      (F.mapCone\n        (KernelFork.ofι f\n          (_ : f ≫ Full.preimage (NormalMono.g ≫ (Functor.objObjPreimageIso F (NormalMono.Z (F.map f))).inv) = 0)))\n[PROOFSTEP]\napply Iso.symm\n[GOAL]\ncase I\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : X ⟶ Y\nhf : NormalMono (F.map f)\n⊢ (Cones.postcomposeEquivalence (compNatIso F)).functor.obj\n      (F.mapCone\n        (KernelFork.ofι f\n          (_ : f ≫ Full.preimage (NormalMono.g ≫ (Functor.objObjPreimageIso F (NormalMono.Z (F.map f))).inv) = 0))) ≅\n    KernelFork.ofι\n      (Fork.ι (KernelFork.ofι (F.map f) (_ : F.map f ≫ NormalMono.g = 0)) ≫\n        𝟙 ((parallelPair NormalMono.g 0).obj WalkingParallelPair.zero))\n      (_ :\n        (Fork.ι (KernelFork.ofι (F.map f) (_ : F.map f ≫ NormalMono.g = 0)) ≫\n              𝟙 ((parallelPair NormalMono.g 0).obj WalkingParallelPair.zero)) ≫\n            F.map (Full.preimage (NormalMono.g ≫ (Functor.objObjPreimageIso F (NormalMono.Z (F.map f))).inv)) =\n          0)\n[PROOFSTEP]\napply isoOfι\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nf : X ⟶ Y\nI : NormalMono f\n⊢ f ≫ g = f ≫ 0\n[PROOFSTEP]\nsimpa using I.w\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nP Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhn : NormalMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\n⊢ g ≫ k ≫ NormalMono.g = 0\n[PROOFSTEP]\nhave reassoc' {W : C} (h' : S ⟶ W) : f ≫ h ≫ h' = g ≫ k ≫ h' := by simp only [← Category.assoc, eq_whisker comm]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nP Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhn : NormalMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\nW : C\nh' : S ⟶ W\n⊢ f ≫ h ≫ h' = g ≫ k ≫ h'\n[PROOFSTEP]\nsimp only [← Category.assoc, eq_whisker comm]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nP Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhn : NormalMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\nreassoc' : ∀ {W : C} (h' : S ⟶ W), f ≫ h ≫ h' = g ≫ k ≫ h'\n⊢ g ≫ k ≫ NormalMono.g = 0\n[PROOFSTEP]\nrw [← reassoc', hn.w, HasZeroMorphisms.comp_zero]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nP Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhn : NormalMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\n⊢ IsLimit (KernelFork.ofι g (_ : g ≫ k ≫ NormalMono.g = 0))\n[PROOFSTEP]\nletI gr := regularOfIsPullbackSndOfRegular comm t\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nP Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhn : NormalMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ngr : RegularMono g := regularOfIsPullbackSndOfRegular comm t\n⊢ IsLimit (KernelFork.ofι g (_ : g ≫ k ≫ NormalMono.g = 0))\n[PROOFSTEP]\nhave q := (HasZeroMorphisms.comp_zero k hn.Z).symm\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nP Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\nhn : NormalMono h\ncomm : f ≫ h = g ≫ k\nt : IsLimit (PullbackCone.mk f g comm)\ngr : RegularMono g := regularOfIsPullbackSndOfRegular comm t\nq : 0 = k ≫ 0\n⊢ IsLimit (KernelFork.ofι g (_ : g ≫ k ≫ NormalMono.g = 0))\n[PROOFSTEP]\nconvert gr.isLimit\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y : C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : NormalMonoCategory C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nx✝ : Mono f\n⊢ RegularMono f\n[PROOFSTEP]\nhaveI := normalMonoOfMono f\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y : C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : NormalMonoCategory C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nx✝ : Mono f\nthis : NormalMono f\n⊢ RegularMono f\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : X ⟶ Y\nhf : NormalEpi (F.map f)\n⊢ F.map (Full.preimage ((Functor.objObjPreimageIso F (NormalEpi.W (F.map f))).hom ≫ NormalEpi.g) ≫ f) = F.map 0\n[PROOFSTEP]\nsimp [hf.w]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : X ⟶ Y\nhf : NormalEpi (F.map f)\n⊢ (Functor.objObjPreimageIso F (NormalEpi.W (F.map f))).symm.hom ≫\n      F.map (Full.preimage ((Functor.objObjPreimageIso F (NormalEpi.W (F.map f))).hom ≫ NormalEpi.g)) =\n    NormalEpi.g\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : X ⟶ Y\nhf : NormalEpi (F.map f)\n⊢ CokernelCofork.ofπ\n      (𝟙 ((parallelPair NormalEpi.g 0).obj WalkingParallelPair.one) ≫\n        Cofork.π (CokernelCofork.ofπ (F.map f) (_ : NormalEpi.g ≫ F.map f = 0)))\n      (_ :\n        F.map (Full.preimage ((Functor.objObjPreimageIso F (NormalEpi.W (F.map f))).hom ≫ NormalEpi.g)) ≫\n            𝟙 ((parallelPair NormalEpi.g 0).obj WalkingParallelPair.one) ≫\n              Cofork.π (CokernelCofork.ofπ (F.map f) (_ : NormalEpi.g ≫ F.map f = 0)) =\n          0) ≅\n    (Cocones.precomposeEquivalence (compNatIso F).symm).functor.obj\n      (F.mapCocone\n        (CokernelCofork.ofπ f\n          (_ : Full.preimage ((Functor.objObjPreimageIso F (NormalEpi.W (F.map f))).hom ≫ NormalEpi.g) ≫ f = 0)))\n[PROOFSTEP]\napply Iso.symm\n[GOAL]\ncase I\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝³ : HasZeroMorphisms C\nD : Type u₂\ninst✝² : Category.{v₁, u₂} D\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : IsEquivalence F\nX Y : C\nf : X ⟶ Y\nhf : NormalEpi (F.map f)\n⊢ (Cocones.precomposeEquivalence (compNatIso F).symm).functor.obj\n      (F.mapCocone\n        (CokernelCofork.ofπ f\n          (_ : Full.preimage ((Functor.objObjPreimageIso F (NormalEpi.W (F.map f))).hom ≫ NormalEpi.g) ≫ f = 0))) ≅\n    CokernelCofork.ofπ\n      (𝟙 ((parallelPair NormalEpi.g 0).obj WalkingParallelPair.one) ≫\n        Cofork.π (CokernelCofork.ofπ (F.map f) (_ : NormalEpi.g ≫ F.map f = 0)))\n      (_ :\n        F.map (Full.preimage ((Functor.objObjPreimageIso F (NormalEpi.W (F.map f))).hom ≫ NormalEpi.g)) ≫\n            𝟙 ((parallelPair NormalEpi.g 0).obj WalkingParallelPair.one) ≫\n              Cofork.π (CokernelCofork.ofπ (F.map f) (_ : NormalEpi.g ≫ F.map f = 0)) =\n          0)\n[PROOFSTEP]\napply isoOfπ\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nf : X ⟶ Y\nI : NormalEpi f\n⊢ g ≫ f = 0 ≫ f\n[PROOFSTEP]\nsimpa using I.w\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nP Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngn : NormalEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\n⊢ (NormalEpi.g ≫ f) ≫ h = 0\n[PROOFSTEP]\nhave reassoc' {W : C} (h' : R ⟶ W) : gn.g ≫ g ≫ h' = 0 ≫ h' := by rw [← Category.assoc, eq_whisker gn.w]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nP Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngn : NormalEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\nW : C\nh' : R ⟶ W\n⊢ NormalEpi.g ≫ g ≫ h' = 0 ≫ h'\n[PROOFSTEP]\nrw [← Category.assoc, eq_whisker gn.w]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nP Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngn : NormalEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\nreassoc' : ∀ {W : C} (h' : R ⟶ W), NormalEpi.g ≫ g ≫ h' = 0 ≫ h'\n⊢ (NormalEpi.g ≫ f) ≫ h = 0\n[PROOFSTEP]\nrw [Category.assoc, comm, reassoc', zero_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nP Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngn : NormalEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\n⊢ IsColimit (CokernelCofork.ofπ h (_ : (NormalEpi.g ≫ f) ≫ h = 0))\n[PROOFSTEP]\nletI hn := regularOfIsPushoutSndOfRegular comm t\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nP Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngn : NormalEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\nhn : RegularEpi h := regularOfIsPushoutSndOfRegular comm t\n⊢ IsColimit (CokernelCofork.ofπ h (_ : (NormalEpi.g ≫ f) ≫ h = 0))\n[PROOFSTEP]\nhave q := (@zero_comp _ _ _ gn.W _ _ f).symm\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\ninst✝ : HasZeroMorphisms C\nP Q R S : C\nf : P ⟶ Q\ng : P ⟶ R\nh : Q ⟶ S\nk : R ⟶ S\ngn : NormalEpi g\ncomm : f ≫ h = g ≫ k\nt : IsColimit (PushoutCocone.mk h k comm)\nhn : RegularEpi h := regularOfIsPushoutSndOfRegular comm t\nq : 0 = 0 ≫ f\n⊢ IsColimit (CokernelCofork.ofπ h (_ : (NormalEpi.g ≫ f) ≫ h = 0))\n[PROOFSTEP]\nconvert hn.isColimit\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝ : HasZeroMorphisms C\nX Y : Cᵒᵖ\nf : X ⟶ Y\nm : NormalMono f.unop\n⊢ ∀ {Z' : Cᵒᵖ} (g' : X ⟶ Z') (eq' : NormalMono.g.op ≫ g' = 0) (m_1 : Y ⟶ Z'),\n    f ≫ m_1 = g' →\n      m_1 =\n        (fun {Z'} g' w' =>\n            (↑(KernelFork.IsLimit.lift' NormalMono.isLimit g'.unop\n                  (_ : { unop := g'.unop ≫ NormalMono.g }.unop = { unop := 0 }.unop))).op)\n          g' eq'\n[PROOFSTEP]\nrintro Z' g' w' m' rfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝ : HasZeroMorphisms C\nX Y : Cᵒᵖ\nf : X ⟶ Y\nm : NormalMono f.unop\nZ' : Cᵒᵖ\nm' : Y ⟶ Z'\nw' : NormalMono.g.op ≫ f ≫ m' = 0\n⊢ m' =\n    (fun {Z'} g' w' =>\n        (↑(KernelFork.IsLimit.lift' NormalMono.isLimit g'.unop\n              (_ : { unop := g'.unop ≫ NormalMono.g }.unop = { unop := 0 }.unop))).op)\n      (f ≫ m') w'\n[PROOFSTEP]\napply Quiver.Hom.unop_inj\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝ : HasZeroMorphisms C\nX Y : Cᵒᵖ\nf : X ⟶ Y\nm : NormalMono f.unop\nZ' : Cᵒᵖ\nm' : Y ⟶ Z'\nw' : NormalMono.g.op ≫ f ≫ m' = 0\n⊢ m'.unop =\n    ((fun {Z'} g' w' =>\n          (↑(KernelFork.IsLimit.lift' NormalMono.isLimit g'.unop\n                (_ : { unop := g'.unop ≫ NormalMono.g }.unop = { unop := 0 }.unop))).op)\n        (f ≫ m') w').unop\n[PROOFSTEP]\napply m.isLimit.uniq (KernelFork.ofι (m'.unop ≫ f.unop) _) m'.unop\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝ : HasZeroMorphisms C\nX Y : Cᵒᵖ\nf : X ⟶ Y\nm : NormalMono f.unop\nZ' : Cᵒᵖ\nm' : Y ⟶ Z'\nw' : NormalMono.g.op ≫ f ≫ m' = 0\n⊢ ∀ (j : WalkingParallelPair),\n    m'.unop ≫ NatTrans.app (KernelFork.ofι f.unop (_ : f.unop ≫ NormalMono.g = 0)).π j =\n      NatTrans.app\n        (KernelFork.ofι (m'.unop ≫ f.unop) (_ : { unop := (f ≫ m').unop ≫ NormalMono.g }.unop = { unop := 0 }.unop)).π j\n[PROOFSTEP]\nrintro (⟨⟩ | ⟨⟩)\n[GOAL]\ncase a.zero\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝ : HasZeroMorphisms C\nX Y : Cᵒᵖ\nf : X ⟶ Y\nm : NormalMono f.unop\nZ' : Cᵒᵖ\nm' : Y ⟶ Z'\nw' : NormalMono.g.op ≫ f ≫ m' = 0\n⊢ m'.unop ≫ NatTrans.app (KernelFork.ofι f.unop (_ : f.unop ≫ NormalMono.g = 0)).π WalkingParallelPair.zero =\n    NatTrans.app\n      (KernelFork.ofι (m'.unop ≫ f.unop) (_ : { unop := (f ≫ m').unop ≫ NormalMono.g }.unop = { unop := 0 }.unop)).π\n      WalkingParallelPair.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.one\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝ : HasZeroMorphisms C\nX Y : Cᵒᵖ\nf : X ⟶ Y\nm : NormalMono f.unop\nZ' : Cᵒᵖ\nm' : Y ⟶ Z'\nw' : NormalMono.g.op ≫ f ≫ m' = 0\n⊢ m'.unop ≫ NatTrans.app (KernelFork.ofι f.unop (_ : f.unop ≫ NormalMono.g = 0)).π WalkingParallelPair.one =\n    NatTrans.app\n      (KernelFork.ofι (m'.unop ≫ f.unop) (_ : { unop := (f ≫ m').unop ≫ NormalMono.g }.unop = { unop := 0 }.unop)).π\n      WalkingParallelPair.one\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝ : HasZeroMorphisms C\nX Y : Cᵒᵖ\nf : X ⟶ Y\nm : NormalEpi f.unop\n⊢ ∀ {W' : Cᵒᵖ} (g' : W' ⟶ Y) (eq' : g' ≫ NormalEpi.g.op = 0) (m_1 : W' ⟶ X),\n    m_1 ≫ f = g' →\n      m_1 =\n        (fun {W'} g' w' =>\n            (↑(CokernelCofork.IsColimit.desc' NormalEpi.isColimit g'.unop\n                  (_ : { unop := NormalEpi.g ≫ g'.unop }.unop = { unop := 0 }.unop))).op)\n          g' eq'\n[PROOFSTEP]\nrintro Z' g' w' m' rfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝ : HasZeroMorphisms C\nX Y : Cᵒᵖ\nf : X ⟶ Y\nm : NormalEpi f.unop\nZ' : Cᵒᵖ\nm' : Z' ⟶ X\nw' : (m' ≫ f) ≫ NormalEpi.g.op = 0\n⊢ m' =\n    (fun {W'} g' w' =>\n        (↑(CokernelCofork.IsColimit.desc' NormalEpi.isColimit g'.unop\n              (_ : { unop := NormalEpi.g ≫ g'.unop }.unop = { unop := 0 }.unop))).op)\n      (m' ≫ f) w'\n[PROOFSTEP]\napply Quiver.Hom.unop_inj\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝ : HasZeroMorphisms C\nX Y : Cᵒᵖ\nf : X ⟶ Y\nm : NormalEpi f.unop\nZ' : Cᵒᵖ\nm' : Z' ⟶ X\nw' : (m' ≫ f) ≫ NormalEpi.g.op = 0\n⊢ m'.unop =\n    ((fun {W'} g' w' =>\n          (↑(CokernelCofork.IsColimit.desc' NormalEpi.isColimit g'.unop\n                (_ : { unop := NormalEpi.g ≫ g'.unop }.unop = { unop := 0 }.unop))).op)\n        (m' ≫ f) w').unop\n[PROOFSTEP]\napply m.isColimit.uniq (CokernelCofork.ofπ (f.unop ≫ m'.unop) _) m'.unop\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝ : HasZeroMorphisms C\nX Y : Cᵒᵖ\nf : X ⟶ Y\nm : NormalEpi f.unop\nZ' : Cᵒᵖ\nm' : Z' ⟶ X\nw' : (m' ≫ f) ≫ NormalEpi.g.op = 0\n⊢ ∀ (j : WalkingParallelPair),\n    NatTrans.app (CokernelCofork.ofπ f.unop (_ : NormalEpi.g ≫ f.unop = 0)).ι j ≫ m'.unop =\n      NatTrans.app\n        (CokernelCofork.ofπ (f.unop ≫ m'.unop)\n            (_ : { unop := NormalEpi.g ≫ (m' ≫ f).unop }.unop = { unop := 0 }.unop)).ι\n        j\n[PROOFSTEP]\nrintro (⟨⟩ | ⟨⟩)\n[GOAL]\ncase a.zero\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝ : HasZeroMorphisms C\nX Y : Cᵒᵖ\nf : X ⟶ Y\nm : NormalEpi f.unop\nZ' : Cᵒᵖ\nm' : Z' ⟶ X\nw' : (m' ≫ f) ≫ NormalEpi.g.op = 0\n⊢ NatTrans.app (CokernelCofork.ofπ f.unop (_ : NormalEpi.g ≫ f.unop = 0)).ι WalkingParallelPair.zero ≫ m'.unop =\n    NatTrans.app\n      (CokernelCofork.ofπ (f.unop ≫ m'.unop) (_ : { unop := NormalEpi.g ≫ (m' ≫ f).unop }.unop = { unop := 0 }.unop)).ι\n      WalkingParallelPair.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.one\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX✝ Y✝ : C\ninst✝ : HasZeroMorphisms C\nX Y : Cᵒᵖ\nf : X ⟶ Y\nm : NormalEpi f.unop\nZ' : Cᵒᵖ\nm' : Z' ⟶ X\nw' : (m' ≫ f) ≫ NormalEpi.g.op = 0\n⊢ NatTrans.app (CokernelCofork.ofπ f.unop (_ : NormalEpi.g ≫ f.unop = 0)).ι WalkingParallelPair.one ≫ m'.unop =\n    NatTrans.app\n      (CokernelCofork.ofπ (f.unop ≫ m'.unop) (_ : { unop := NormalEpi.g ≫ (m' ≫ f).unop }.unop = { unop := 0 }.unop)).ι\n      WalkingParallelPair.one\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y : C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : NormalEpiCategory C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nx✝ : Epi f\n⊢ RegularEpi f\n[PROOFSTEP]\nhaveI := normalEpiOfEpi f\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nX Y : C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : NormalEpiCategory C\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nx✝ : Epi f\nthis : NormalEpi f\n⊢ RegularEpi f\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.NormalMono.Basic", "llama_tokens": 9141, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6039318337259584, "lm_q2_score": 0.5851011542032312, "lm_q1q2_score": 0.3533612129731321}}
{"text": "[GOAL]\nα : Type u_1\nG : Type u_2\nι : Type u_3\ninst✝² : Group G\n𝔖 : Set (Set α)\ninst✝¹ : UniformSpace G\ninst✝ : UniformGroup G\np : ι → Prop\nb : ι → Set G\nh : HasBasis (𝓝 1) p b\n⊢ HasBasis (𝓝 1) p fun i => {f | ∀ (x : α), f x ∈ b i}\n[PROOFSTEP]\nhave := h.comap fun p : G × G => p.2 / p.1\n[GOAL]\nα : Type u_1\nG : Type u_2\nι : Type u_3\ninst✝² : Group G\n𝔖 : Set (Set α)\ninst✝¹ : UniformSpace G\ninst✝ : UniformGroup G\np : ι → Prop\nb : ι → Set G\nh : HasBasis (𝓝 1) p b\nthis : HasBasis (comap (fun p => p.snd / p.fst) (𝓝 1)) p fun i => (fun p => p.snd / p.fst) ⁻¹' b i\n⊢ HasBasis (𝓝 1) p fun i => {f | ∀ (x : α), f x ∈ b i}\n[PROOFSTEP]\nrw [← uniformity_eq_comap_nhds_one] at this \n[GOAL]\nα : Type u_1\nG : Type u_2\nι : Type u_3\ninst✝² : Group G\n𝔖 : Set (Set α)\ninst✝¹ : UniformSpace G\ninst✝ : UniformGroup G\np : ι → Prop\nb : ι → Set G\nh : HasBasis (𝓝 1) p b\nthis : HasBasis (uniformity G) p fun i => (fun p => p.snd / p.fst) ⁻¹' b i\n⊢ HasBasis (𝓝 1) p fun i => {f | ∀ (x : α), f x ∈ b i}\n[PROOFSTEP]\nconvert UniformFun.hasBasis_nhds_of_basis α _ (1 : α →ᵤ G) this\n[GOAL]\ncase h.e'_5.h.h.e'_2.h.a\nα : Type u_1\nG : Type u_2\nι : Type u_3\ninst✝² : Group G\n𝔖 : Set (Set α)\ninst✝¹ : UniformSpace G\ninst✝ : UniformGroup G\np : ι → Prop\nb : ι → Set G\nh : HasBasis (𝓝 1) p b\nthis : HasBasis (uniformity G) p fun i => (fun p => p.snd / p.fst) ⁻¹' b i\nx✝¹ : ι\nx✝ : α →ᵤ G\n⊢ (∀ (x : α), x✝ x ∈ b x✝¹) ↔ (1, x✝) ∈ UniformFun.gen α G ((fun p => p.snd / p.fst) ⁻¹' b x✝¹)\n[PROOFSTEP]\nsimp [UniformFun.gen]\n[GOAL]\nα : Type u_1\nG : Type u_2\nι : Type u_3\ninst✝² : Group G\n𝔖✝ : Set (Set α)\ninst✝¹ : UniformSpace G\ninst✝ : UniformGroup G\n𝔖 : Set (Set α)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\np : ι → Prop\nb : ι → Set G\nh : HasBasis (𝓝 1) p b\n⊢ HasBasis (𝓝 1) (fun Si => Si.fst ∈ 𝔖 ∧ p Si.snd) fun Si => {f | ∀ (x : α), x ∈ Si.fst → f x ∈ b Si.snd}\n[PROOFSTEP]\nhave := h.comap fun p : G × G => p.1 / p.2\n[GOAL]\nα : Type u_1\nG : Type u_2\nι : Type u_3\ninst✝² : Group G\n𝔖✝ : Set (Set α)\ninst✝¹ : UniformSpace G\ninst✝ : UniformGroup G\n𝔖 : Set (Set α)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\np : ι → Prop\nb : ι → Set G\nh : HasBasis (𝓝 1) p b\nthis : HasBasis (comap (fun p => p.fst / p.snd) (𝓝 1)) p fun i => (fun p => p.fst / p.snd) ⁻¹' b i\n⊢ HasBasis (𝓝 1) (fun Si => Si.fst ∈ 𝔖 ∧ p Si.snd) fun Si => {f | ∀ (x : α), x ∈ Si.fst → f x ∈ b Si.snd}\n[PROOFSTEP]\nrw [← uniformity_eq_comap_nhds_one_swapped] at this \n[GOAL]\nα : Type u_1\nG : Type u_2\nι : Type u_3\ninst✝² : Group G\n𝔖✝ : Set (Set α)\ninst✝¹ : UniformSpace G\ninst✝ : UniformGroup G\n𝔖 : Set (Set α)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\np : ι → Prop\nb : ι → Set G\nh : HasBasis (𝓝 1) p b\nthis : HasBasis (uniformity G) p fun i => (fun p => p.fst / p.snd) ⁻¹' b i\n⊢ HasBasis (𝓝 1) (fun Si => Si.fst ∈ 𝔖 ∧ p Si.snd) fun Si => {f | ∀ (x : α), x ∈ Si.fst → f x ∈ b Si.snd}\n[PROOFSTEP]\nconvert UniformOnFun.hasBasis_nhds_of_basis α _ 𝔖 (1 : α →ᵤ[𝔖] G) h𝔖₁ h𝔖₂ this\n[GOAL]\ncase h.e'_5.h.h.e'_2.h.a\nα : Type u_1\nG : Type u_2\nι : Type u_3\ninst✝² : Group G\n𝔖✝ : Set (Set α)\ninst✝¹ : UniformSpace G\ninst✝ : UniformGroup G\n𝔖 : Set (Set α)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\np : ι → Prop\nb : ι → Set G\nh : HasBasis (𝓝 1) p b\nthis : HasBasis (uniformity G) p fun i => (fun p => p.fst / p.snd) ⁻¹' b i\nx✝¹ : Set α × ι\nx✝ : α →ᵤ[𝔖] G\n⊢ (∀ (x : α), x ∈ x✝¹.fst → x✝ x ∈ b x✝¹.snd) ↔\n    (x✝, 1) ∈ UniformOnFun.gen 𝔖 x✝¹.fst ((fun p => p.fst / p.snd) ⁻¹' b x✝¹.snd)\n[PROOFSTEP]\nsimp [UniformOnFun.gen]\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\n⊢ ContinuousSMul 𝕜 H\n[PROOFSTEP]\nhave : TopologicalAddGroup H := by\n  rw [hφ.induced]\n  exact topologicalAddGroup_induced φ\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\n⊢ TopologicalAddGroup H\n[PROOFSTEP]\nrw [hφ.induced]\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\n⊢ TopologicalAddGroup H\n[PROOFSTEP]\nexact topologicalAddGroup_induced φ\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis : TopologicalAddGroup H\n⊢ ContinuousSMul 𝕜 H\n[PROOFSTEP]\nhave : (𝓝 0 : Filter H).HasBasis _ _ := by\n  rw [hφ.induced, nhds_induced, map_zero]\n  exact (UniformOnFun.hasBasis_nhds_zero 𝔖 h𝔖₁ h𝔖₂).comap φ\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis : TopologicalAddGroup H\n⊢ HasBasis (𝓝 0) ?m.88528 ?m.88529\n[PROOFSTEP]\nrw [hφ.induced, nhds_induced, map_zero]\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis : TopologicalAddGroup H\n⊢ HasBasis (comap (↑φ) (𝓝 0)) ?m.88528 ?m.88529\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis : TopologicalAddGroup H\n⊢ Sort ?u.88519\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis : TopologicalAddGroup H\n⊢ ?m.88527 → Prop\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis : TopologicalAddGroup H\n⊢ ?m.88527 → Set H\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis : TopologicalAddGroup H\n⊢ Sort ?u.88519\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis : TopologicalAddGroup H\n⊢ ?m.88527 → Prop\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis : TopologicalAddGroup H\n⊢ ?m.88527 → Set H\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis : TopologicalAddGroup H\n⊢ Sort ?u.88519\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis : TopologicalAddGroup H\n⊢ ?m.88527 → Prop\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis : TopologicalAddGroup H\n⊢ ?m.88527 → Set H\n[PROOFSTEP]\nexact (UniformOnFun.hasBasis_nhds_zero 𝔖 h𝔖₁ h𝔖₂).comap φ\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\n⊢ ContinuousSMul 𝕜 H\n[PROOFSTEP]\nrefine' ContinuousSMul.of_basis_zero this _ _ _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\n⊢ ∀ {i : Set α × Set E},\n    i.fst ∈ 𝔖 ∧ i.snd ∈ 𝓝 0 →\n      ∃ V,\n        V ∈ 𝓝 0 ∧\n          ∃ j x, V • ↑φ ⁻¹' {f | ∀ (x : α), x ∈ j.fst → f x ∈ j.snd} ⊆ ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\n[PROOFSTEP]\nrintro ⟨S, V⟩ ⟨hS, hV⟩\n[GOAL]\ncase refine'_1.mk.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\n⊢ ∃ V_1,\n    V_1 ∈ 𝓝 0 ∧\n      ∃ j x,\n        V_1 • ↑φ ⁻¹' {f | ∀ (x : α), x ∈ j.fst → f x ∈ j.snd} ⊆\n          ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd}\n[PROOFSTEP]\nhave : Tendsto (fun kx : 𝕜 × E => kx.1 • kx.2) (𝓝 (0, 0)) (𝓝 <| (0 : 𝕜) • (0 : E)) :=\n  continuous_smul.tendsto (0 : 𝕜 × E)\n[GOAL]\ncase refine'_1.mk.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝¹ : TopologicalAddGroup H\nthis✝ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis : Tendsto (fun kx => kx.fst • kx.snd) (𝓝 (0, 0)) (𝓝 (0 • 0))\n⊢ ∃ V_1,\n    V_1 ∈ 𝓝 0 ∧\n      ∃ j x,\n        V_1 • ↑φ ⁻¹' {f | ∀ (x : α), x ∈ j.fst → f x ∈ j.snd} ⊆\n          ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd}\n[PROOFSTEP]\nrw [zero_smul, nhds_prod_eq] at this \n[GOAL]\ncase refine'_1.mk.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝¹ : TopologicalAddGroup H\nthis✝ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis : Tendsto (fun kx => kx.fst • kx.snd) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)\n⊢ ∃ V_1,\n    V_1 ∈ 𝓝 0 ∧\n      ∃ j x,\n        V_1 • ↑φ ⁻¹' {f | ∀ (x : α), x ∈ j.fst → f x ∈ j.snd} ⊆\n          ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd}\n[PROOFSTEP]\nhave := this hV\n[GOAL]\ncase refine'_1.mk.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝² : TopologicalAddGroup H\nthis✝¹ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis✝ : Tendsto (fun kx => kx.fst • kx.snd) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)\nthis : (S, V).snd ∈ map (fun kx => kx.fst • kx.snd) (𝓝 0 ×ˢ 𝓝 0)\n⊢ ∃ V_1,\n    V_1 ∈ 𝓝 0 ∧\n      ∃ j x,\n        V_1 • ↑φ ⁻¹' {f | ∀ (x : α), x ∈ j.fst → f x ∈ j.snd} ⊆\n          ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd}\n[PROOFSTEP]\nrw [mem_map, mem_prod_iff] at this \n[GOAL]\ncase refine'_1.mk.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝² : TopologicalAddGroup H\nthis✝¹ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis✝ : Tendsto (fun kx => kx.fst • kx.snd) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)\nthis : ∃ t₁, t₁ ∈ 𝓝 0 ∧ ∃ t₂, t₂ ∈ 𝓝 0 ∧ t₁ ×ˢ t₂ ⊆ (fun kx => kx.fst • kx.snd) ⁻¹' (S, V).snd\n⊢ ∃ V_1,\n    V_1 ∈ 𝓝 0 ∧\n      ∃ j x,\n        V_1 • ↑φ ⁻¹' {f | ∀ (x : α), x ∈ j.fst → f x ∈ j.snd} ⊆\n          ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd}\n[PROOFSTEP]\nrcases this with ⟨U, hU, W, hW, hUW⟩\n[GOAL]\ncase refine'_1.mk.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝¹ : TopologicalAddGroup H\nthis✝ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis : Tendsto (fun kx => kx.fst • kx.snd) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)\nU : Set 𝕜\nhU : U ∈ 𝓝 0\nW : Set E\nhW : W ∈ 𝓝 0\nhUW : U ×ˢ W ⊆ (fun kx => kx.fst • kx.snd) ⁻¹' (S, V).snd\n⊢ ∃ V_1,\n    V_1 ∈ 𝓝 0 ∧\n      ∃ j x,\n        V_1 • ↑φ ⁻¹' {f | ∀ (x : α), x ∈ j.fst → f x ∈ j.snd} ⊆\n          ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd}\n[PROOFSTEP]\nrefine' ⟨U, hU, ⟨S, W⟩, ⟨hS, hW⟩, _⟩\n[GOAL]\ncase refine'_1.mk.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝¹ : TopologicalAddGroup H\nthis✝ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis : Tendsto (fun kx => kx.fst • kx.snd) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)\nU : Set 𝕜\nhU : U ∈ 𝓝 0\nW : Set E\nhW : W ∈ 𝓝 0\nhUW : U ×ˢ W ⊆ (fun kx => kx.fst • kx.snd) ⁻¹' (S, V).snd\n⊢ U • ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, W).fst → f x ∈ (S, W).snd} ⊆\n    ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd}\n[PROOFSTEP]\nrw [Set.smul_subset_iff]\n[GOAL]\ncase refine'_1.mk.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝¹ : TopologicalAddGroup H\nthis✝ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis : Tendsto (fun kx => kx.fst • kx.snd) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)\nU : Set 𝕜\nhU : U ∈ 𝓝 0\nW : Set E\nhW : W ∈ 𝓝 0\nhUW : U ×ˢ W ⊆ (fun kx => kx.fst • kx.snd) ⁻¹' (S, V).snd\n⊢ ∀ (a : 𝕜),\n    a ∈ U →\n      ∀ (b : H),\n        b ∈ ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, W).fst → f x ∈ (S, W).snd} →\n          a • b ∈ ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd}\n[PROOFSTEP]\nintro a ha u hu x hx\n[GOAL]\ncase refine'_1.mk.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝¹ : TopologicalAddGroup H\nthis✝ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis : Tendsto (fun kx => kx.fst • kx.snd) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)\nU : Set 𝕜\nhU : U ∈ 𝓝 0\nW : Set E\nhW : W ∈ 𝓝 0\nhUW : U ×ˢ W ⊆ (fun kx => kx.fst • kx.snd) ⁻¹' (S, V).snd\na : 𝕜\nha : a ∈ U\nu : H\nhu : u ∈ ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, W).fst → f x ∈ (S, W).snd}\nx : α\nhx : x ∈ (S, V).fst\n⊢ ↑φ (a • u) x ∈ (S, V).snd\n[PROOFSTEP]\nrw [SMulHomClass.map_smul]\n[GOAL]\ncase refine'_1.mk.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝¹ : TopologicalAddGroup H\nthis✝ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis : Tendsto (fun kx => kx.fst • kx.snd) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)\nU : Set 𝕜\nhU : U ∈ 𝓝 0\nW : Set E\nhW : W ∈ 𝓝 0\nhUW : U ×ˢ W ⊆ (fun kx => kx.fst • kx.snd) ⁻¹' (S, V).snd\na : 𝕜\nha : a ∈ U\nu : H\nhu : u ∈ ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, W).fst → f x ∈ (S, W).snd}\nx : α\nhx : x ∈ (S, V).fst\n⊢ (a • ↑φ u) x ∈ (S, V).snd\n[PROOFSTEP]\nexact hUW (⟨ha, hu x hx⟩ : (a, φ u x) ∈ U ×ˢ W)\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\n⊢ ∀ (x₀ : 𝕜) {i : Set α × Set E},\n    i.fst ∈ 𝔖 ∧ i.snd ∈ 𝓝 0 →\n      ∃ j x,\n        ↑φ ⁻¹' {f | ∀ (x : α), x ∈ j.fst → f x ∈ j.snd} ⊆\n          (fun x => x₀ • x) ⁻¹' (↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd})\n[PROOFSTEP]\nrintro a ⟨S, V⟩ ⟨hS, hV⟩\n[GOAL]\ncase refine'_2.mk.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\na : 𝕜\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\n⊢ ∃ j x,\n    ↑φ ⁻¹' {f | ∀ (x : α), x ∈ j.fst → f x ∈ j.snd} ⊆\n      (fun x => a • x) ⁻¹' (↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd})\n[PROOFSTEP]\nhave : Tendsto (fun x : E => a • x) (𝓝 0) (𝓝 <| a • (0 : E)) := tendsto_id.const_smul a\n[GOAL]\ncase refine'_2.mk.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝¹ : TopologicalAddGroup H\nthis✝ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\na : 𝕜\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis : Tendsto (fun x => a • x) (𝓝 0) (𝓝 (a • 0))\n⊢ ∃ j x,\n    ↑φ ⁻¹' {f | ∀ (x : α), x ∈ j.fst → f x ∈ j.snd} ⊆\n      (fun x => a • x) ⁻¹' (↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd})\n[PROOFSTEP]\nrw [smul_zero] at this \n[GOAL]\ncase refine'_2.mk.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝¹ : TopologicalAddGroup H\nthis✝ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\na : 𝕜\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis : Tendsto (fun x => a • x) (𝓝 0) (𝓝 0)\n⊢ ∃ j x,\n    ↑φ ⁻¹' {f | ∀ (x : α), x ∈ j.fst → f x ∈ j.snd} ⊆\n      (fun x => a • x) ⁻¹' (↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd})\n[PROOFSTEP]\nrefine' ⟨⟨S, (a • ·) ⁻¹' V⟩, ⟨hS, this hV⟩, fun f hf x hx => _⟩\n[GOAL]\ncase refine'_2.mk.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝¹ : TopologicalAddGroup H\nthis✝ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\na : 𝕜\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis : Tendsto (fun x => a • x) (𝓝 0) (𝓝 0)\nf : H\nhf : f ∈ ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, (fun x => a • x) ⁻¹' V).fst → f x ∈ (S, (fun x => a • x) ⁻¹' V).snd}\nx : α\nhx : x ∈ (S, V).fst\n⊢ ↑φ ((fun x => a • x) f) x ∈ (S, V).snd\n[PROOFSTEP]\nrw [SMulHomClass.map_smul]\n[GOAL]\ncase refine'_2.mk.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝¹ : TopologicalAddGroup H\nthis✝ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\na : 𝕜\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nthis : Tendsto (fun x => a • x) (𝓝 0) (𝓝 0)\nf : H\nhf : f ∈ ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, (fun x => a • x) ⁻¹' V).fst → f x ∈ (S, (fun x => a • x) ⁻¹' V).snd}\nx : α\nhx : x ∈ (S, V).fst\n⊢ (a • ↑φ f) x ∈ (S, V).snd\n[PROOFSTEP]\nexact hf x hx\n[GOAL]\ncase refine'_3\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\n⊢ ∀ (m₀ : H) {i : Set α × Set E},\n    i.fst ∈ 𝔖 ∧ i.snd ∈ 𝓝 0 → ∀ᶠ (x : 𝕜) in 𝓝 0, x • m₀ ∈ ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\n[PROOFSTEP]\nrintro u ⟨S, V⟩ ⟨hS, hV⟩\n[GOAL]\ncase refine'_3.mk.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\n⊢ ∀ᶠ (x : 𝕜) in 𝓝 0, x • u ∈ ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd}\n[PROOFSTEP]\nrcases h u S hS hV with ⟨r, hrpos, hr⟩\n[GOAL]\ncase refine'_3.mk.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\n⊢ ∀ᶠ (x : 𝕜) in 𝓝 0, x • u ∈ ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd}\n[PROOFSTEP]\nrw [Metric.eventually_nhds_iff_ball]\n[GOAL]\ncase refine'_3.mk.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\n⊢ ∃ ε, ε > 0 ∧ ∀ (y : 𝕜), y ∈ Metric.ball 0 ε → y • u ∈ ↑φ ⁻¹' {f | ∀ (x : α), x ∈ (S, V).fst → f x ∈ (S, V).snd}\n[PROOFSTEP]\nrefine' ⟨r⁻¹, inv_pos.mpr hrpos, fun a ha x hx => _⟩\n[GOAL]\ncase refine'_3.mk.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\na : 𝕜\nha : a ∈ Metric.ball 0 r⁻¹\nx : α\nhx : x ∈ (S, V).fst\n⊢ ↑φ (a • u) x ∈ (S, V).snd\n[PROOFSTEP]\nby_cases ha0 : a = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\na : 𝕜\nha : a ∈ Metric.ball 0 r⁻¹\nx : α\nhx : x ∈ (S, V).fst\nha0 : a = 0\n⊢ ↑φ (a • u) x ∈ (S, V).snd\n[PROOFSTEP]\nrw [ha0]\n[GOAL]\ncase pos\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\na : 𝕜\nha : a ∈ Metric.ball 0 r⁻¹\nx : α\nhx : x ∈ (S, V).fst\nha0 : a = 0\n⊢ ↑φ (0 • u) x ∈ (S, V).snd\n[PROOFSTEP]\nsimpa using mem_of_mem_nhds hV\n[GOAL]\ncase neg\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\na : 𝕜\nha : a ∈ Metric.ball 0 r⁻¹\nx : α\nhx : x ∈ (S, V).fst\nha0 : ¬a = 0\n⊢ ↑φ (a • u) x ∈ (S, V).snd\n[PROOFSTEP]\nrw [mem_ball_zero_iff] at ha \n[GOAL]\ncase neg\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\na : 𝕜\nha : ‖a‖ < r⁻¹\nx : α\nhx : x ∈ (S, V).fst\nha0 : ¬a = 0\n⊢ ↑φ (a • u) x ∈ (S, V).snd\n[PROOFSTEP]\nrw [SMulHomClass.map_smul, Pi.smul_apply]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\na : 𝕜\nha : ‖a‖ < r⁻¹\nx : α\nhx : x ∈ (S, V).fst\nha0 : ¬a = 0\n⊢ a • ↑φ u x ∈ (S, V).snd\n[PROOFSTEP]\nhave : φ u x ∈ a⁻¹ • V := by\n  have ha0 : 0 < ‖a‖ := norm_pos_iff.mpr ha0\n  refine' (hr a⁻¹ _) (Set.mem_image_of_mem (φ u) hx)\n  rw [norm_inv, le_inv hrpos ha0]\n  exact ha.le\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\na : 𝕜\nha : ‖a‖ < r⁻¹\nx : α\nhx : x ∈ (S, V).fst\nha0 : ¬a = 0\n⊢ ↑φ u x ∈ a⁻¹ • V\n[PROOFSTEP]\nhave ha0 : 0 < ‖a‖ := norm_pos_iff.mpr ha0\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\na : 𝕜\nha : ‖a‖ < r⁻¹\nx : α\nhx : x ∈ (S, V).fst\nha0✝ : ¬a = 0\nha0 : 0 < ‖a‖\n⊢ ↑φ u x ∈ a⁻¹ • V\n[PROOFSTEP]\nrefine' (hr a⁻¹ _) (Set.mem_image_of_mem (φ u) hx)\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\na : 𝕜\nha : ‖a‖ < r⁻¹\nx : α\nhx : x ∈ (S, V).fst\nha0✝ : ¬a = 0\nha0 : 0 < ‖a‖\n⊢ r ≤ ‖a⁻¹‖\n[PROOFSTEP]\nrw [norm_inv, le_inv hrpos ha0]\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝ : TopologicalAddGroup H\nthis : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\na : 𝕜\nha : ‖a‖ < r⁻¹\nx : α\nhx : x ∈ (S, V).fst\nha0✝ : ¬a = 0\nha0 : 0 < ‖a‖\n⊢ ‖a‖ ≤ r⁻¹\n[PROOFSTEP]\nexact ha.le\n[GOAL]\ncase neg\n𝕜 : Type u_1\nα : Type u_2\nE : Type u_3\nH : Type u_4\nhom : Type u_5\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : AddCommGroup H\ninst✝⁷ : Module 𝕜 H\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : Module 𝕜 E\ninst✝⁴ : TopologicalSpace H\ninst✝³ : UniformSpace E\ninst✝² : UniformAddGroup E\ninst✝¹ : ContinuousSMul 𝕜 E\n𝔖 : Set (Set α)\ninst✝ : LinearMapClass hom 𝕜 H (α →ᵤ[𝔖] E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nφ : hom\nhφ : Inducing ↑φ\nh : ∀ (u : H) (s : Set α), s ∈ 𝔖 → Bornology.IsVonNBounded 𝕜 (↑φ u '' s)\nthis✝¹ : TopologicalAddGroup H\nthis✝ : HasBasis (𝓝 0) (fun SV => SV.fst ∈ 𝔖 ∧ SV.snd ∈ 𝓝 0) fun i => ↑φ ⁻¹' {f | ∀ (x : α), x ∈ i.fst → f x ∈ i.snd}\nu : H\nS : Set α\nV : Set E\nhS : (S, V).fst ∈ 𝔖\nhV : (S, V).snd ∈ 𝓝 0\nr : ℝ\nhrpos : 0 < r\nhr : ∀ (a : 𝕜), r ≤ ‖a‖ → ↑φ u '' S ⊆ a • (S, V).snd\na : 𝕜\nha : ‖a‖ < r⁻¹\nx : α\nhx : x ∈ (S, V).fst\nha0 : ¬a = 0\nthis : ↑φ u x ∈ a⁻¹ • V\n⊢ a • ↑φ u x ∈ (S, V).snd\n[PROOFSTEP]\nrwa [Set.mem_inv_smul_set_iff₀ ha0] at this \n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.UniformConvergence", "llama_tokens": 26293, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7122321720225278, "lm_q2_score": 0.4960938294709195, "lm_q1q2_score": 0.3533339856910465}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : GeneralizedBooleanAlgebra α\nu v : α\n⊢ Set.InjOn (fun x => (x ⊔ u) \\ v) {x | Disjoint u x ∧ v ≤ x}\n[PROOFSTEP]\nrintro a ha b hb hab\n[GOAL]\nα : Type u_1\ninst✝ : GeneralizedBooleanAlgebra α\nu v a : α\nha : a ∈ {x | Disjoint u x ∧ v ≤ x}\nb : α\nhb : b ∈ {x | Disjoint u x ∧ v ≤ x}\nhab : (fun x => (x ⊔ u) \\ v) a = (fun x => (x ⊔ u) \\ v) b\n⊢ a = b\n[PROOFSTEP]\nhave h : ((a ⊔ u) \\ v) \\ u ⊔ v = ((b ⊔ u) \\ v) \\ u ⊔ v :=\n  by\n  dsimp at hab \n  rw [hab]\n[GOAL]\nα : Type u_1\ninst✝ : GeneralizedBooleanAlgebra α\nu v a : α\nha : a ∈ {x | Disjoint u x ∧ v ≤ x}\nb : α\nhb : b ∈ {x | Disjoint u x ∧ v ≤ x}\nhab : (fun x => (x ⊔ u) \\ v) a = (fun x => (x ⊔ u) \\ v) b\n⊢ ((a ⊔ u) \\ v) \\ u ⊔ v = ((b ⊔ u) \\ v) \\ u ⊔ v\n[PROOFSTEP]\ndsimp at hab \n[GOAL]\nα : Type u_1\ninst✝ : GeneralizedBooleanAlgebra α\nu v a : α\nha : a ∈ {x | Disjoint u x ∧ v ≤ x}\nb : α\nhb : b ∈ {x | Disjoint u x ∧ v ≤ x}\nhab : (a ⊔ u) \\ v = (b ⊔ u) \\ v\n⊢ ((a ⊔ u) \\ v) \\ u ⊔ v = ((b ⊔ u) \\ v) \\ u ⊔ v\n[PROOFSTEP]\nrw [hab]\n[GOAL]\nα : Type u_1\ninst✝ : GeneralizedBooleanAlgebra α\nu v a : α\nha : a ∈ {x | Disjoint u x ∧ v ≤ x}\nb : α\nhb : b ∈ {x | Disjoint u x ∧ v ≤ x}\nhab : (fun x => (x ⊔ u) \\ v) a = (fun x => (x ⊔ u) \\ v) b\nh : ((a ⊔ u) \\ v) \\ u ⊔ v = ((b ⊔ u) \\ v) \\ u ⊔ v\n⊢ a = b\n[PROOFSTEP]\nrwa [sdiff_sdiff_comm, ha.1.symm.sup_sdiff_cancel_right, sdiff_sdiff_comm, hb.1.symm.sup_sdiff_cancel_right,\n  sdiff_sup_cancel ha.2, sdiff_sup_cancel hb.2] at h \n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nhva : Disjoint v a\nhua : u ≤ a\n⊢ compress u v ((a ⊔ v) \\ u) = a\n[PROOFSTEP]\nrw [compress_of_disjoint_of_le disjoint_sdiff_self_right (le_sdiff.2 ⟨(le_sup_right : v ≤ a ⊔ v), hva.mono_right hua⟩),\n  sdiff_sup_cancel (le_sup_of_le_left hua), hva.symm.sup_sdiff_cancel_right]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\n⊢ a ∈ 𝓒 u v s ↔ a ∈ s ∧ compress u v a ∈ s ∨ ¬a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = a\n[PROOFSTEP]\nsimp [compression, mem_union, mem_filter, mem_image, and_comm]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v a✝ b u a : α\n⊢ compress u u a = a\n[PROOFSTEP]\nunfold compress\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v a✝ b u a : α\n⊢ (if Disjoint u a ∧ u ≤ a then (a ⊔ u) \\ u else a) = a\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v a✝ b u a : α\nh✝ : Disjoint u a ∧ u ≤ a\n⊢ (a ⊔ u) \\ u = a\n[PROOFSTEP]\nexact ‹Disjoint u a ∧ u ≤ a›.1.symm.sup_sdiff_cancel_right\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v a✝ b u a : α\nh✝ : ¬(Disjoint u a ∧ u ≤ a)\n⊢ a = a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v a b u : α\ns : Finset α\n⊢ 𝓒 u u s = s\n[PROOFSTEP]\nunfold compression\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v a b u : α\ns : Finset α\n⊢ filter (fun a => compress u u a ∈ s) s ∪ filter (fun a => ¬a ∈ s) (image (compress u u) s) = s\n[PROOFSTEP]\nconvert union_empty s\n[GOAL]\ncase h.e'_2.h.e'_3\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v a b u : α\ns : Finset α\n⊢ filter (fun a => compress u u a ∈ s) s = s\n[PROOFSTEP]\next a\n[GOAL]\ncase h.e'_2.h.e'_3.a\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v a✝ b u : α\ns : Finset α\na : α\n⊢ a ∈ filter (fun a => compress u u a ∈ s) s ↔ a ∈ s\n[PROOFSTEP]\nsimp [mem_filter, compress_self, and_self_iff]\n[GOAL]\ncase h.e'_2.h.e'_4\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v a b u : α\ns : Finset α\n⊢ filter (fun a => ¬a ∈ s) (image (compress u u) s) = ∅\n[PROOFSTEP]\nrefine' eq_empty_of_forall_not_mem fun a ha => _\n[GOAL]\ncase h.e'_2.h.e'_4\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v a✝ b u : α\ns : Finset α\na : α\nha : a ∈ filter (fun a => ¬a ∈ s) (image (compress u u) s)\n⊢ False\n[PROOFSTEP]\nsimp_rw [mem_filter, mem_image, compress_self] at ha \n[GOAL]\ncase h.e'_2.h.e'_4\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v a✝ b u : α\ns : Finset α\na : α\nha : (∃ a_1, a_1 ∈ s ∧ a_1 = a) ∧ ¬a ∈ s\n⊢ False\n[PROOFSTEP]\nobtain ⟨⟨b, hb, rfl⟩, hb'⟩ := ha\n[GOAL]\ncase h.e'_2.h.e'_4.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v a b✝ u : α\ns : Finset α\nb : α\nhb : b ∈ s\nhb' : ¬b ∈ s\n⊢ False\n[PROOFSTEP]\nexact hb' hb\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a✝ b✝ a b : α\n⊢ compress (a \\ b) (b \\ a) b = a\n[PROOFSTEP]\nrefine' (compress_of_disjoint_of_le disjoint_sdiff_self_left sdiff_le).trans _\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a✝ b✝ a b : α\n⊢ (b ⊔ a \\ b) \\ (b \\ a) = a\n[PROOFSTEP]\nrw [sup_sdiff_self_right, sup_sdiff, disjoint_sdiff_self_right.sdiff_eq_left, sup_eq_right]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a✝ b✝ a b : α\n⊢ b \\ (b \\ a) ≤ a\n[PROOFSTEP]\nexact sdiff_sdiff_le\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v✝ a✝ b u v a : α\n⊢ compress u v (compress u v a) = compress u v a\n[PROOFSTEP]\nunfold compress\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v✝ a✝ b u v a : α\n⊢ (if\n        Disjoint u (if Disjoint u a ∧ v ≤ a then (a ⊔ u) \\ v else a) ∧\n          v ≤ if Disjoint u a ∧ v ≤ a then (a ⊔ u) \\ v else a then\n      ((if Disjoint u a ∧ v ≤ a then (a ⊔ u) \\ v else a) ⊔ u) \\ v\n    else if Disjoint u a ∧ v ≤ a then (a ⊔ u) \\ v else a) =\n    if Disjoint u a ∧ v ≤ a then (a ⊔ u) \\ v else a\n[PROOFSTEP]\nsplit_ifs with h h'\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v✝ a✝ b u v a : α\nh : Disjoint u a ∧ v ≤ a\nh' : Disjoint u ((a ⊔ u) \\ v) ∧ v ≤ (a ⊔ u) \\ v\n⊢ ((a ⊔ u) \\ v ⊔ u) \\ v = (a ⊔ u) \\ v\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v✝ a✝ b u v a : α\nh : Disjoint u a ∧ v ≤ a\nh' : Disjoint u ((a ⊔ u) \\ v) ∧ v ≤ (a ⊔ u) \\ v\n⊢ ((a ⊔ u) \\ v ⊔ u) \\ v = (a ⊔ u) \\ v\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v✝ a✝ b u v a : α\nh : Disjoint u a ∧ v ≤ a\nh' : ¬(Disjoint u ((a ⊔ u) \\ v) ∧ v ≤ (a ⊔ u) \\ v)\n⊢ (a ⊔ u) \\ v = (a ⊔ u) \\ v\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v✝ a✝ b u v a : α\nh : Disjoint u a ∧ v ≤ a\nh' : ¬(Disjoint u ((a ⊔ u) \\ v) ∧ v ≤ (a ⊔ u) \\ v)\n⊢ (a ⊔ u) \\ v = (a ⊔ u) \\ v\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v✝ a✝ b u v a : α\nh : ¬(Disjoint u a ∧ v ≤ a)\n⊢ a = a\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v✝ a✝ b u v a : α\nh : ¬(Disjoint u a ∧ v ≤ a)\n⊢ a = a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu✝ v✝ a✝ b u v a : α\nh : Disjoint u a ∧ v ≤ a\nh' : Disjoint u ((a ⊔ u) \\ v) ∧ v ≤ (a ⊔ u) \\ v\n⊢ ((a ⊔ u) \\ v ⊔ u) \\ v = (a ⊔ u) \\ v\n[PROOFSTEP]\nrw [le_sdiff_iff.1 h'.2, sdiff_bot, sdiff_bot, sup_assoc, sup_idem]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : a ∈ s\n⊢ compress u v a ∈ 𝓒 u v s\n[PROOFSTEP]\nrw [mem_compression]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : a ∈ s\n⊢ compress u v a ∈ s ∧ compress u v (compress u v a) ∈ s ∨\n    ¬compress u v a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = compress u v a\n[PROOFSTEP]\nby_cases h : compress u v a ∈ s\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : a ∈ s\nh : compress u v a ∈ s\n⊢ compress u v a ∈ s ∧ compress u v (compress u v a) ∈ s ∨\n    ¬compress u v a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = compress u v a\n[PROOFSTEP]\nrw [compress_idem]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : a ∈ s\nh : compress u v a ∈ s\n⊢ compress u v a ∈ s ∧ compress u v a ∈ s ∨ ¬compress u v a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = compress u v a\n[PROOFSTEP]\nexact Or.inl ⟨h, h⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : a ∈ s\nh : ¬compress u v a ∈ s\n⊢ compress u v a ∈ s ∧ compress u v (compress u v a) ∈ s ∨\n    ¬compress u v a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = compress u v a\n[PROOFSTEP]\nexact Or.inr ⟨h, a, ha, rfl⟩\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : a ∈ 𝓒 u v s\n⊢ compress u v a ∈ 𝓒 u v s\n[PROOFSTEP]\nrw [mem_compression] at ha ⊢\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : a ∈ s ∧ compress u v a ∈ s ∨ ¬a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = a\n⊢ compress u v a ∈ s ∧ compress u v (compress u v a) ∈ s ∨\n    ¬compress u v a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = compress u v a\n[PROOFSTEP]\nsimp only [compress_idem, exists_prop]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : a ∈ s ∧ compress u v a ∈ s ∨ ¬a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = a\n⊢ compress u v a ∈ s ∧ compress u v a ∈ s ∨ ¬compress u v a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = compress u v a\n[PROOFSTEP]\nobtain ⟨_, ha⟩ | ⟨_, b, hb, rfl⟩ := ha\n[GOAL]\ncase inl.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nleft✝ : a ∈ s\nha : compress u v a ∈ s\n⊢ compress u v a ∈ s ∧ compress u v a ∈ s ∨ ¬compress u v a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = compress u v a\n[PROOFSTEP]\nexact Or.inl ⟨ha, ha⟩\n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nleft✝ : ¬compress u v b ∈ s\n⊢ compress u v (compress u v b) ∈ s ∧ compress u v (compress u v b) ∈ s ∨\n    ¬compress u v (compress u v b) ∈ s ∧ ∃ b_1, b_1 ∈ s ∧ compress u v b_1 = compress u v (compress u v b)\n[PROOFSTEP]\nexact Or.inr ⟨by rwa [compress_idem], b, hb, (compress_idem _ _ _).symm⟩\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nleft✝ : ¬compress u v b ∈ s\n⊢ ¬compress u v (compress u v b) ∈ s\n[PROOFSTEP]\nrwa [compress_idem]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\n⊢ 𝓒 u v (𝓒 u v s) = 𝓒 u v s\n[PROOFSTEP]\nhave h : filter (fun a => compress u v a ∉ 𝓒 u v s) (𝓒 u v s) = ∅ :=\n  filter_false_of_mem fun a ha h => h <| compress_mem_compression_of_mem_compression ha\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\nh : filter (fun a => ¬compress u v a ∈ 𝓒 u v s) (𝓒 u v s) = ∅\n⊢ 𝓒 u v (𝓒 u v s) = 𝓒 u v s\n[PROOFSTEP]\nrw [compression, image_filter]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\nh : filter (fun a => ¬compress u v a ∈ 𝓒 u v s) (𝓒 u v s) = ∅\n⊢ filter (fun a => compress u v a ∈ 𝓒 u v s) (𝓒 u v s) ∪\n      image (compress u v) (filter ((fun a => ¬a ∈ 𝓒 u v s) ∘ compress u v) (𝓒 u v s)) =\n    𝓒 u v s\n[PROOFSTEP]\nsimp_rw [Function.comp]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\nh : filter (fun a => ¬compress u v a ∈ 𝓒 u v s) (𝓒 u v s) = ∅\n⊢ filter (fun a => compress u v a ∈ 𝓒 u v s) (𝓒 u v s) ∪\n      image (compress u v) (filter (fun x => ¬compress u v x ∈ 𝓒 u v s) (𝓒 u v s)) =\n    𝓒 u v s\n[PROOFSTEP]\nrw [h, image_empty, ← h]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\nh : filter (fun a => ¬compress u v a ∈ 𝓒 u v s) (𝓒 u v s) = ∅\n⊢ filter (fun a => compress u v a ∈ 𝓒 u v s) (𝓒 u v s) ∪ filter (fun a => ¬compress u v a ∈ 𝓒 u v s) (𝓒 u v s) = 𝓒 u v s\n[PROOFSTEP]\nexact filter_union_filter_neg_eq _ (compression u v s)\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\n⊢ card (𝓒 u v s) = card s\n[PROOFSTEP]\nrw [compression, card_disjoint_union (compress_disjoint _ _), image_filter, card_image_of_injOn, ← card_disjoint_union]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\n⊢ card (filter (fun a => compress u v a ∈ s) s ∪ filter ((fun a => ¬a ∈ s) ∘ compress u v) s) = card s\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\n⊢ Disjoint (filter (fun a => compress u v a ∈ s) s) (filter ((fun a => ¬a ∈ s) ∘ compress u v) s)\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\n⊢ Set.InjOn (compress u v) ↑(filter ((fun a => ¬a ∈ s) ∘ compress u v) s)\n[PROOFSTEP]\nsimp_rw [Function.comp]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\n⊢ card (filter (fun a => compress u v a ∈ s) s ∪ filter (fun x => ¬compress u v x ∈ s) s) = card s\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\n⊢ Disjoint (filter (fun a => compress u v a ∈ s) s) (filter ((fun a => ¬a ∈ s) ∘ compress u v) s)\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\n⊢ Set.InjOn (compress u v) ↑(filter ((fun a => ¬a ∈ s) ∘ compress u v) s)\n[PROOFSTEP]\nrw [filter_union_filter_neg_eq]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\n⊢ Disjoint (filter (fun a => compress u v a ∈ s) s) (filter ((fun a => ¬a ∈ s) ∘ compress u v) s)\n[PROOFSTEP]\nrw [disjoint_iff_inter_eq_empty]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\n⊢ filter (fun a => compress u v a ∈ s) s ∩ filter ((fun a => ¬a ∈ s) ∘ compress u v) s = ∅\n[PROOFSTEP]\nexact filter_inter_filter_neg_eq _ _ _\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a b u v : α\ns : Finset α\n⊢ Set.InjOn (compress u v) ↑(filter ((fun a => ¬a ∈ s) ∘ compress u v) s)\n[PROOFSTEP]\nintro a ha b hb hab\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a✝ b✝ u v : α\ns : Finset α\na : α\nha : a ∈ ↑(filter ((fun a => ¬a ∈ s) ∘ compress u v) s)\nb : α\nhb : b ∈ ↑(filter ((fun a => ¬a ∈ s) ∘ compress u v) s)\nhab : compress u v a = compress u v b\n⊢ a = b\n[PROOFSTEP]\nrw [mem_coe, mem_filter, Function.comp_apply] at ha hb \n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a✝ b✝ u v : α\ns : Finset α\na : α\nha : a ∈ s ∧ ¬compress u v a ∈ s\nb : α\nhb : b ∈ s ∧ ¬compress u v b ∈ s\nhab : compress u v a = compress u v b\n⊢ a = b\n[PROOFSTEP]\nrw [compress] at ha hab \n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a✝ b✝ u v : α\ns : Finset α\na : α\nha : a ∈ s ∧ ¬(if Disjoint u a ∧ v ≤ a then (a ⊔ u) \\ v else a) ∈ s\nb : α\nhb : b ∈ s ∧ ¬compress u v b ∈ s\nhab : (if Disjoint u a ∧ v ≤ a then (a ⊔ u) \\ v else a) = compress u v b\n⊢ a = b\n[PROOFSTEP]\nsplit_ifs at ha hab  with has\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a✝ b✝ u v : α\ns : Finset α\na b : α\nhb : b ∈ s ∧ ¬compress u v b ∈ s\nhas : Disjoint u a ∧ v ≤ a\nha : a ∈ s ∧ ¬(a ⊔ u) \\ v ∈ s\nhab : (a ⊔ u) \\ v = compress u v b\n⊢ a = b\n[PROOFSTEP]\nrw [compress] at hb hab \n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a✝ b✝ u v : α\ns : Finset α\na b : α\nhb : b ∈ s ∧ ¬(if Disjoint u b ∧ v ≤ b then (b ⊔ u) \\ v else b) ∈ s\nhas : Disjoint u a ∧ v ≤ a\nha : a ∈ s ∧ ¬(a ⊔ u) \\ v ∈ s\nhab : (a ⊔ u) \\ v = if Disjoint u b ∧ v ≤ b then (b ⊔ u) \\ v else b\n⊢ a = b\n[PROOFSTEP]\nsplit_ifs at hb hab  with hbs\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a✝ b✝ u v : α\ns : Finset α\na b : α\nhas : Disjoint u a ∧ v ≤ a\nha : a ∈ s ∧ ¬(a ⊔ u) \\ v ∈ s\nhbs : Disjoint u b ∧ v ≤ b\nhb : b ∈ s ∧ ¬(b ⊔ u) \\ v ∈ s\nhab : (a ⊔ u) \\ v = (b ⊔ u) \\ v\n⊢ a = b\n[PROOFSTEP]\nexact sup_sdiff_injOn u v has hbs hab\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a✝ b✝ u v : α\ns : Finset α\na b : α\nhas : Disjoint u a ∧ v ≤ a\nha : a ∈ s ∧ ¬(a ⊔ u) \\ v ∈ s\nhbs : ¬(Disjoint u b ∧ v ≤ b)\nhb : b ∈ s ∧ ¬b ∈ s\nhab : (a ⊔ u) \\ v = b\n⊢ a = b\n[PROOFSTEP]\nexact (hb.2 hb.1).elim\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns✝ : Finset α\nu✝ v✝ a✝ b✝ u v : α\ns : Finset α\na b : α\nhb : b ∈ s ∧ ¬compress u v b ∈ s\nhas : ¬(Disjoint u a ∧ v ≤ a)\nha : a ∈ s ∧ ¬a ∈ s\nhab : a = compress u v b\n⊢ a = b\n[PROOFSTEP]\nexact (ha.2 ha.1).elim\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nh : a ∈ 𝓒 u v s\nha : ¬a ∈ s\n⊢ u ≤ a\n[PROOFSTEP]\nrw [mem_compression] at h \n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nh : a ∈ s ∧ compress u v a ∈ s ∨ ¬a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = a\nha : ¬a ∈ s\n⊢ u ≤ a\n[PROOFSTEP]\nobtain h | ⟨-, b, hb, hba⟩ := h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : ¬a ∈ s\nh : a ∈ s ∧ compress u v a ∈ s\n⊢ u ≤ a\n[PROOFSTEP]\ncases ha h.1\n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nhba : compress u v b = a\n⊢ u ≤ a\n[PROOFSTEP]\nunfold compress at hba \n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nhba : (if Disjoint u b ∧ v ≤ b then (b ⊔ u) \\ v else b) = a\n⊢ u ≤ a\n[PROOFSTEP]\nsplit_ifs at hba  with h\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nh : Disjoint u b ∧ v ≤ b\nhba : (b ⊔ u) \\ v = a\n⊢ u ≤ a\n[PROOFSTEP]\nrw [← hba, le_sdiff]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nh : Disjoint u b ∧ v ≤ b\nhba : (b ⊔ u) \\ v = a\n⊢ u ≤ b ⊔ u ∧ Disjoint u v\n[PROOFSTEP]\nexact ⟨le_sup_right, h.1.mono_right h.2⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nh : ¬(Disjoint u b ∧ v ≤ b)\nhba : b = a\n⊢ u ≤ a\n[PROOFSTEP]\ncases ne_of_mem_of_not_mem hb ha hba\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nh : a ∈ 𝓒 u v s\nha : ¬a ∈ s\n⊢ Disjoint v a\n[PROOFSTEP]\nrw [mem_compression] at h \n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nh : a ∈ s ∧ compress u v a ∈ s ∨ ¬a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = a\nha : ¬a ∈ s\n⊢ Disjoint v a\n[PROOFSTEP]\nobtain h | ⟨-, b, hb, hba⟩ := h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : ¬a ∈ s\nh : a ∈ s ∧ compress u v a ∈ s\n⊢ Disjoint v a\n[PROOFSTEP]\ncases ha h.1\n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nhba : compress u v b = a\n⊢ Disjoint v a\n[PROOFSTEP]\nunfold compress at hba \n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nhba : (if Disjoint u b ∧ v ≤ b then (b ⊔ u) \\ v else b) = a\n⊢ Disjoint v a\n[PROOFSTEP]\nsplit_ifs at hba \n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nh✝ : Disjoint u b ∧ v ≤ b\nhba : (b ⊔ u) \\ v = a\n⊢ Disjoint v a\n[PROOFSTEP]\nrw [← hba]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nh✝ : Disjoint u b ∧ v ≤ b\nhba : (b ⊔ u) \\ v = a\n⊢ Disjoint v ((b ⊔ u) \\ v)\n[PROOFSTEP]\nexact disjoint_sdiff_self_right\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nh✝ : ¬(Disjoint u b ∧ v ≤ b)\nhba : b = a\n⊢ Disjoint v a\n[PROOFSTEP]\ncases ne_of_mem_of_not_mem hb ha hba\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nh : a ∈ 𝓒 u v s\nha : ¬a ∈ s\n⊢ (a ⊔ v) \\ u ∈ s\n[PROOFSTEP]\nrw [mem_compression] at h \n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nh : a ∈ s ∧ compress u v a ∈ s ∨ ¬a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = a\nha : ¬a ∈ s\n⊢ (a ⊔ v) \\ u ∈ s\n[PROOFSTEP]\nobtain h | ⟨-, b, hb, hba⟩ := h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : ¬a ∈ s\nh : a ∈ s ∧ compress u v a ∈ s\n⊢ (a ⊔ v) \\ u ∈ s\n[PROOFSTEP]\ncases ha h.1\n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nhba : compress u v b = a\n⊢ (a ⊔ v) \\ u ∈ s\n[PROOFSTEP]\nunfold compress at hba \n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nhba : (if Disjoint u b ∧ v ≤ b then (b ⊔ u) \\ v else b) = a\n⊢ (a ⊔ v) \\ u ∈ s\n[PROOFSTEP]\nsplit_ifs at hba  with h\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nh : Disjoint u b ∧ v ≤ b\nhba : (b ⊔ u) \\ v = a\n⊢ (a ⊔ v) \\ u ∈ s\n[PROOFSTEP]\nrwa [← hba, sdiff_sup_cancel (le_sup_of_le_left h.2), sup_sdiff_right_self, h.1.symm.sdiff_eq_left]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nha : ¬a ∈ s\nb : α\nhb : b ∈ s\nh : ¬(Disjoint u b ∧ v ≤ b)\nhba : b = a\n⊢ (a ⊔ v) \\ u ∈ s\n[PROOFSTEP]\ncases ne_of_mem_of_not_mem hb ha hba\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : a ∈ 𝓒 u v s\nhva : v ≤ a\nhua : Disjoint u a\n⊢ (a ⊔ u) \\ v ∈ s\n[PROOFSTEP]\nrw [mem_compression, compress_of_disjoint_of_le hua hva] at ha \n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : a ∈ s ∧ (a ⊔ u) \\ v ∈ s ∨ ¬a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = a\nhva : v ≤ a\nhua : Disjoint u a\n⊢ (a ⊔ u) \\ v ∈ s\n[PROOFSTEP]\nobtain ⟨_, ha⟩ | ⟨_, b, hb, rfl⟩ := ha\n[GOAL]\ncase inl.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nhva : v ≤ a\nhua : Disjoint u a\nleft✝ : a ∈ s\nha : (a ⊔ u) \\ v ∈ s\n⊢ (a ⊔ u) \\ v ∈ s\n[PROOFSTEP]\nexact ha\n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nhva : v ≤ compress u v b\nhua : Disjoint u (compress u v b)\nleft✝ : ¬compress u v b ∈ s\n⊢ (compress u v b ⊔ u) \\ v ∈ s\n[PROOFSTEP]\nhave hu : u = ⊥ :=\n  by\n  suffices Disjoint u (u \\ v) by rwa [(hua.mono_right hva).sdiff_eq_left, disjoint_self] at this \n  refine' hua.mono_right _\n  rw [← compress_idem, compress_of_disjoint_of_le hua hva]\n  exact sdiff_le_sdiff_right le_sup_right\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nhva : v ≤ compress u v b\nhua : Disjoint u (compress u v b)\nleft✝ : ¬compress u v b ∈ s\n⊢ u = ⊥\n[PROOFSTEP]\nsuffices Disjoint u (u \\ v) by rwa [(hua.mono_right hva).sdiff_eq_left, disjoint_self] at this \n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nhva : v ≤ compress u v b\nhua : Disjoint u (compress u v b)\nleft✝ : ¬compress u v b ∈ s\nthis : Disjoint u (u \\ v)\n⊢ u = ⊥\n[PROOFSTEP]\nrwa [(hua.mono_right hva).sdiff_eq_left, disjoint_self] at this \n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nhva : v ≤ compress u v b\nhua : Disjoint u (compress u v b)\nleft✝ : ¬compress u v b ∈ s\n⊢ Disjoint u (u \\ v)\n[PROOFSTEP]\nrefine' hua.mono_right _\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nhva : v ≤ compress u v b\nhua : Disjoint u (compress u v b)\nleft✝ : ¬compress u v b ∈ s\n⊢ u \\ v ≤ compress u v b\n[PROOFSTEP]\nrw [← compress_idem, compress_of_disjoint_of_le hua hva]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nhva : v ≤ compress u v b\nhua : Disjoint u (compress u v b)\nleft✝ : ¬compress u v b ∈ s\n⊢ u \\ v ≤ (compress u v b ⊔ u) \\ v\n[PROOFSTEP]\nexact sdiff_le_sdiff_right le_sup_right\n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nhva : v ≤ compress u v b\nhua : Disjoint u (compress u v b)\nleft✝ : ¬compress u v b ∈ s\nhu : u = ⊥\n⊢ (compress u v b ⊔ u) \\ v ∈ s\n[PROOFSTEP]\nhave hv : v = ⊥ := by\n  rw [← disjoint_self]\n  apply Disjoint.mono_right hva\n  rw [← compress_idem, compress_of_disjoint_of_le hua hva]\n  exact disjoint_sdiff_self_right\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nhva : v ≤ compress u v b\nhua : Disjoint u (compress u v b)\nleft✝ : ¬compress u v b ∈ s\nhu : u = ⊥\n⊢ v = ⊥\n[PROOFSTEP]\nrw [← disjoint_self]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nhva : v ≤ compress u v b\nhua : Disjoint u (compress u v b)\nleft✝ : ¬compress u v b ∈ s\nhu : u = ⊥\n⊢ Disjoint v v\n[PROOFSTEP]\napply Disjoint.mono_right hva\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nhva : v ≤ compress u v b\nhua : Disjoint u (compress u v b)\nleft✝ : ¬compress u v b ∈ s\nhu : u = ⊥\n⊢ Disjoint v (compress u v b)\n[PROOFSTEP]\nrw [← compress_idem, compress_of_disjoint_of_le hua hva]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nhva : v ≤ compress u v b\nhua : Disjoint u (compress u v b)\nleft✝ : ¬compress u v b ∈ s\nhu : u = ⊥\n⊢ Disjoint v ((compress u v b ⊔ u) \\ v)\n[PROOFSTEP]\nexact disjoint_sdiff_self_right\n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v b✝ b : α\nhb : b ∈ s\nhva : v ≤ compress u v b\nhua : Disjoint u (compress u v b)\nleft✝ : ¬compress u v b ∈ s\nhu : u = ⊥\nhv : v = ⊥\n⊢ (compress u v b ⊔ u) \\ v ∈ s\n[PROOFSTEP]\nrwa [hu, hv, compress_self, sup_bot_eq, sdiff_bot]\n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : a ∈ 𝓒 u v s\nhva : v ≤ a\nhvu : v = ⊥ → u = ⊥\n⊢ a ∈ s\n[PROOFSTEP]\nrw [mem_compression] at ha \n[GOAL]\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nha : a ∈ s ∧ compress u v a ∈ s ∨ ¬a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = a\nhva : v ≤ a\nhvu : v = ⊥ → u = ⊥\n⊢ a ∈ s\n[PROOFSTEP]\nobtain ha | ⟨_, b, hb, h⟩ := ha\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b : α\nhva : v ≤ a\nhvu : v = ⊥ → u = ⊥\nha : a ∈ s ∧ compress u v a ∈ s\n⊢ a ∈ s\n[PROOFSTEP]\nexact ha.1\n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nhva : v ≤ a\nhvu : v = ⊥ → u = ⊥\nleft✝ : ¬a ∈ s\nb : α\nhb : b ∈ s\nh : compress u v b = a\n⊢ a ∈ s\n[PROOFSTEP]\nunfold compress at h \n[GOAL]\ncase inr.intro.intro.intro\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nhva : v ≤ a\nhvu : v = ⊥ → u = ⊥\nleft✝ : ¬a ∈ s\nb : α\nhb : b ∈ s\nh : (if Disjoint u b ∧ v ≤ b then (b ⊔ u) \\ v else b) = a\n⊢ a ∈ s\n[PROOFSTEP]\nsplit_ifs at h \n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nhva : v ≤ a\nhvu : v = ⊥ → u = ⊥\nleft✝ : ¬a ∈ s\nb : α\nhb : b ∈ s\nh✝ : Disjoint u b ∧ v ≤ b\nh : (b ⊔ u) \\ v = a\n⊢ a ∈ s\n[PROOFSTEP]\nrw [← h, le_sdiff_iff] at hva \n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nhvu : v = ⊥ → u = ⊥\nleft✝ : ¬a ∈ s\nb : α\nhva : v = ⊥\nhb : b ∈ s\nh✝ : Disjoint u b ∧ v ≤ b\nh : (b ⊔ u) \\ v = a\n⊢ a ∈ s\n[PROOFSTEP]\nrwa [← h, hvu hva, hva, sup_bot_eq, sdiff_bot]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : GeneralizedBooleanAlgebra α\ninst✝¹ : DecidableRel Disjoint\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\ns : Finset α\nu v a b✝ : α\nhva : v ≤ a\nhvu : v = ⊥ → u = ⊥\nleft✝ : ¬a ∈ s\nb : α\nhb : b ∈ s\nh✝ : ¬(Disjoint u b ∧ v ≤ b)\nh : b = a\n⊢ a ∈ s\n[PROOFSTEP]\nrwa [← h]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu v a✝ : Finset α\nhuv : card u = card v\na : Finset α\n⊢ card (compress u v a) = card a\n[PROOFSTEP]\nunfold compress\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu v a✝ : Finset α\nhuv : card u = card v\na : Finset α\n⊢ card (if Disjoint u a ∧ v ≤ a then (a ⊔ u) \\ v else a) = card a\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu v a✝ : Finset α\nhuv : card u = card v\na : Finset α\nh : Disjoint u a ∧ v ≤ a\n⊢ card ((a ⊔ u) \\ v) = card a\n[PROOFSTEP]\nrw [card_sdiff (h.2.trans le_sup_left), sup_eq_union, card_disjoint_union h.1.symm, huv, add_tsub_cancel_right]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu v a✝ : Finset α\nhuv : card u = card v\na : Finset α\nh : ¬(Disjoint u a ∧ v ≤ a)\n⊢ card a = card a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu v a : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n⊢ v = ∅ → u = ∅\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu a : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ ∅ ∧ IsCompressed (erase u x) (erase ∅ y) 𝒜\n⊢ u = ∅\n[PROOFSTEP]\nrefine' eq_empty_of_forall_not_mem fun a ha => _\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu a✝ : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ ∅ ∧ IsCompressed (erase u x) (erase ∅ y) 𝒜\na : α\nha : a ∈ u\n⊢ False\n[PROOFSTEP]\nobtain ⟨_, ⟨⟩, -⟩ := huv a ha\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n⊢ ∂ (𝓒 u v 𝒜) ⊆ 𝓒 u v (∂ 𝒜)\n[PROOFSTEP]\nset 𝒜' := 𝓒 u v 𝒜\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\n⊢ ∂ 𝒜' ⊆ 𝓒 u v (∂ 𝒜)\n[PROOFSTEP]\nsuffices H : ∀ s ∈ ∂ 𝒜', s ∉ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ (s ∪ v) \\ u ∉ ∂ 𝒜'\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n⊢ ∂ 𝒜' ⊆ 𝓒 u v (∂ 𝒜)\n[PROOFSTEP]\nrintro s hs'\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\n⊢ s ∈ 𝓒 u v (∂ 𝒜)\n[PROOFSTEP]\nrw [mem_compression]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\n⊢ s ∈ ∂ 𝒜 ∧ compress u v s ∈ ∂ 𝒜 ∨ ¬s ∈ ∂ 𝒜 ∧ ∃ b, b ∈ ∂ 𝒜 ∧ compress u v b = s\n[PROOFSTEP]\nby_cases hs : s ∈ 𝒜.shadow\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\nhs : s ∈ ∂ 𝒜\n⊢ s ∈ ∂ 𝒜 ∧ compress u v s ∈ ∂ 𝒜 ∨ ¬s ∈ ∂ 𝒜 ∧ ∃ b, b ∈ ∂ 𝒜 ∧ compress u v b = s\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\nhs : ¬s ∈ ∂ 𝒜\n⊢ s ∈ ∂ 𝒜 ∧ compress u v s ∈ ∂ 𝒜 ∨ ¬s ∈ ∂ 𝒜 ∧ ∃ b, b ∈ ∂ 𝒜 ∧ compress u v b = s\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\nhs : ¬s ∈ ∂ 𝒜\n⊢ s ∈ ∂ 𝒜 ∧ compress u v s ∈ ∂ 𝒜 ∨ ¬s ∈ ∂ 𝒜 ∧ ∃ b, b ∈ ∂ 𝒜 ∧ compress u v b = s\n[PROOFSTEP]\nobtain ⟨hus, hvs, h, _⟩ := H _ hs' hs\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\nhs : ¬s ∈ ∂ 𝒜\nhus : u ⊆ s\nhvs : Disjoint v s\nh : (s ∪ v) \\ u ∈ ∂ 𝒜\nright✝ : ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n⊢ s ∈ ∂ 𝒜 ∧ compress u v s ∈ ∂ 𝒜 ∨ ¬s ∈ ∂ 𝒜 ∧ ∃ b, b ∈ ∂ 𝒜 ∧ compress u v b = s\n[PROOFSTEP]\nexact Or.inr ⟨hs, _, h, compress_of_disjoint_of_le' hvs hus⟩\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\nhs : s ∈ ∂ 𝒜\n⊢ s ∈ ∂ 𝒜 ∧ compress u v s ∈ ∂ 𝒜 ∨ ¬s ∈ ∂ 𝒜 ∧ ∃ b, b ∈ ∂ 𝒜 ∧ compress u v b = s\n[PROOFSTEP]\nrefine' Or.inl ⟨hs, _⟩\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\nhs : s ∈ ∂ 𝒜\n⊢ compress u v s ∈ ∂ 𝒜\n[PROOFSTEP]\nrw [compress]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\nhs : s ∈ ∂ 𝒜\n⊢ (if Disjoint u s ∧ v ≤ s then (s ⊔ u) \\ v else s) ∈ ∂ 𝒜\n[PROOFSTEP]\nsplit_ifs with huvs\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\nhs : s ∈ ∂ 𝒜\nhuvs : Disjoint u s ∧ v ≤ s\n⊢ (s ⊔ u) \\ v ∈ ∂ 𝒜\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\nhs : s ∈ ∂ 𝒜\nhuvs : ¬(Disjoint u s ∧ v ≤ s)\n⊢ s ∈ ∂ 𝒜\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\nhs : s ∈ ∂ 𝒜\nhuvs : ¬(Disjoint u s ∧ v ≤ s)\n⊢ s ∈ ∂ 𝒜\n[PROOFSTEP]\nexact hs\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : s ∈ ∂ 𝒜'\nhs : s ∈ ∂ 𝒜\nhuvs : Disjoint u s ∧ v ≤ s\n⊢ (s ⊔ u) \\ v ∈ ∂ 𝒜\n[PROOFSTEP]\nrw [mem_shadow_iff] at hs' \n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\ns : Finset α\nhs' : ∃ t, t ∈ 𝒜' ∧ ∃ a, a ∈ t ∧ erase t a = s\nhs : s ∈ ∂ 𝒜\nhuvs : Disjoint u s ∧ v ≤ s\n⊢ (s ⊔ u) \\ v ∈ ∂ 𝒜\n[PROOFSTEP]\nobtain ⟨t, Ht, a, hat, rfl⟩ := hs'\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\n⊢ (erase t a ⊔ u) \\ v ∈ ∂ 𝒜\n[PROOFSTEP]\nhave hav : a ∉ v := not_mem_mono huvs.2 (not_mem_erase a t)\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\nhav : ¬a ∈ v\n⊢ (erase t a ⊔ u) \\ v ∈ ∂ 𝒜\n[PROOFSTEP]\nhave hvt : v ≤ t := huvs.2.trans (erase_subset _ t)\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\nhav : ¬a ∈ v\nhvt : v ≤ t\n⊢ (erase t a ⊔ u) \\ v ∈ ∂ 𝒜\n[PROOFSTEP]\nhave ht : t ∈ 𝒜 := mem_of_mem_compression Ht hvt (aux huv)\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\nhav : ¬a ∈ v\nhvt : v ≤ t\nht : t ∈ 𝒜\n⊢ (erase t a ⊔ u) \\ v ∈ ∂ 𝒜\n[PROOFSTEP]\nby_cases hau : a ∈ u\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\nhav : ¬a ∈ v\nhvt : v ≤ t\nht : t ∈ 𝒜\nhau : a ∈ u\n⊢ (erase t a ⊔ u) \\ v ∈ ∂ 𝒜\n[PROOFSTEP]\nobtain ⟨b, hbv, Hcomp⟩ := huv a hau\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\nhav : ¬a ∈ v\nhvt : v ≤ t\nht : t ∈ 𝒜\nhau : a ∈ u\nb : α\nhbv : b ∈ v\nHcomp : IsCompressed (erase u a) (erase v b) 𝒜\n⊢ (erase t a ⊔ u) \\ v ∈ ∂ 𝒜\n[PROOFSTEP]\nrefine' mem_shadow_iff_insert_mem.2 ⟨b, not_mem_sdiff_of_mem_right hbv, _⟩\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\nhav : ¬a ∈ v\nhvt : v ≤ t\nht : t ∈ 𝒜\nhau : a ∈ u\nb : α\nhbv : b ∈ v\nHcomp : IsCompressed (erase u a) (erase v b) 𝒜\n⊢ insert b ((erase t a ⊔ u) \\ v) ∈ 𝒜\n[PROOFSTEP]\nrw [← Hcomp.eq] at ht \n[GOAL]\ncase pos.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\nhav : ¬a ∈ v\nhvt : v ≤ t\nhau : a ∈ u\nb : α\nht : t ∈ 𝓒 (erase u a) (erase v b) 𝒜\nhbv : b ∈ v\nHcomp : IsCompressed (erase u a) (erase v b) 𝒜\n⊢ insert b ((erase t a ⊔ u) \\ v) ∈ 𝒜\n[PROOFSTEP]\nhave hsb := sup_sdiff_mem_of_mem_compression ht ((erase_subset _ _).trans hvt) (disjoint_erase_comm.2 huvs.1)\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\nhav : ¬a ∈ v\nhvt : v ≤ t\nhau : a ∈ u\nb : α\nht : t ∈ 𝓒 (erase u a) (erase v b) 𝒜\nhbv : b ∈ v\nHcomp : IsCompressed (erase u a) (erase v b) 𝒜\nhsb : (t ⊔ erase u a) \\ erase v b ∈ 𝒜\n⊢ insert b ((erase t a ⊔ u) \\ v) ∈ 𝒜\n[PROOFSTEP]\nrwa [sup_eq_union, sdiff_erase (mem_union_left _ <| hvt hbv), union_erase_of_mem hat, ← erase_union_of_mem hau] at hsb \n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\nhav : ¬a ∈ v\nhvt : v ≤ t\nht : t ∈ 𝒜\nhau : ¬a ∈ u\n⊢ (erase t a ⊔ u) \\ v ∈ ∂ 𝒜\n[PROOFSTEP]\nrefine'\n  mem_shadow_iff.2 ⟨(t ⊔ u) \\ v, sup_sdiff_mem_of_mem_compression Ht hvt <| disjoint_of_erase_right hau huvs.1, a, _, _⟩\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\nhav : ¬a ∈ v\nhvt : v ≤ t\nht : t ∈ 𝒜\nhau : ¬a ∈ u\n⊢ a ∈ (t ⊔ u) \\ v\n[PROOFSTEP]\nrw [sup_eq_union, mem_sdiff, mem_union]\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\nhav : ¬a ∈ v\nhvt : v ≤ t\nht : t ∈ 𝒜\nhau : ¬a ∈ u\n⊢ (a ∈ t ∨ a ∈ u) ∧ ¬a ∈ v\n[PROOFSTEP]\nexact ⟨Or.inl hat, hav⟩\n[GOAL]\ncase neg.refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a✝ u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\nH : ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\nt : Finset α\nHt : t ∈ 𝒜'\na : α\nhat : a ∈ t\nhs : erase t a ∈ ∂ 𝒜\nhuvs : Disjoint u (erase t a) ∧ v ≤ erase t a\nhav : ¬a ∈ v\nhvt : v ≤ t\nht : t ∈ 𝒜\nhau : ¬a ∈ u\n⊢ erase ((t ⊔ u) \\ v) a = (erase t a ⊔ u) \\ v\n[PROOFSTEP]\nrw [← erase_sdiff_comm, sup_eq_union, erase_union_distrib, erase_eq_of_not_mem hau]\n[GOAL]\ncase H\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\n⊢ ∀ (s : Finset α), s ∈ ∂ 𝒜' → ¬s ∈ ∂ 𝒜 → u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nintro s hs𝒜' hs𝒜\n[GOAL]\ncase H\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\n⊢ u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nhave m : ∀ y, y ∉ s → insert y s ∉ 𝒜 := fun y h a => hs𝒜 (mem_shadow_iff_insert_mem.2 ⟨y, h, a⟩)\n[GOAL]\ncase H\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\n⊢ u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nobtain ⟨x, _, _⟩ := mem_shadow_iff_insert_mem.1 hs𝒜'\n[GOAL]\ncase H.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\n⊢ u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nhave hus : u ⊆ insert x s := le_of_mem_compression_of_not_mem ‹_ ∈ 𝒜'› (m _ ‹x ∉ s›)\n[GOAL]\ncase H.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\n⊢ u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nhave hvs : Disjoint v (insert x s) := disjoint_of_mem_compression_of_not_mem ‹_› (m _ ‹x ∉ s›)\n[GOAL]\ncase H.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\n⊢ u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nhave : (insert x s ∪ v) \\ u ∈ 𝒜 := sup_sdiff_mem_of_mem_compression_of_not_mem ‹_› (m _ ‹x ∉ s›)\n[GOAL]\ncase H.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis : (insert x s ∪ v) \\ u ∈ 𝒜\n⊢ u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nhave hsv : Disjoint s v := hvs.symm.mono_left (subset_insert _ _)\n[GOAL]\ncase H.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\n⊢ u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nhave hvu : Disjoint v u := disjoint_of_subset_right hus hvs\n[GOAL]\ncase H.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\n⊢ u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nhave hxv : x ∉ v := disjoint_right.1 hvs (mem_insert_self _ _)\n[GOAL]\ncase H.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\n⊢ u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nhave : v \\ u = v := ‹Disjoint v u›.sdiff_eq_left\n[GOAL]\ncase H.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis : v \\ u = v\n⊢ u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nhave : x ∉ u := by\n  intro hxu\n  obtain ⟨y, hyv, hxy⟩ := huv x hxu\n  apply\n    m y\n      (disjoint_right.1 hsv hyv)\n        -- and we will use this `y` to contradict `m`, so we would like to show `insert y s ∈ 𝒜`.\n            -- We do this by showing the below\n  have : ((insert x s ∪ v) \\ u ∪ erase u x) \\ erase v y ∈ 𝒜 :=\n    by\n    refine'\n      sup_sdiff_mem_of_mem_compression (by rwa [hxy.eq]) _ (disjoint_of_subset_left (erase_subset _ _) disjoint_sdiff)\n    rw [union_sdiff_distrib, ‹v \\ u = v›]\n    exact\n      (erase_subset _ _).trans\n        (subset_union_right _ _)\n          -- and then arguing that it's the same\n  convert this using 1\n  rw [sdiff_union_erase_cancel (hus.trans <| subset_union_left _ _) ‹x ∈ u›, erase_union_distrib, erase_insert ‹x ∉ s›,\n    erase_eq_of_not_mem ‹x ∉ v›, sdiff_erase (mem_union_right _ hyv), union_sdiff_cancel_right hsv]\n    -- Now that this is done, it's immediate that `u ⊆ s`\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis : v \\ u = v\n⊢ ¬x ∈ u\n[PROOFSTEP]\nintro hxu\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis : v \\ u = v\nhxu : x ∈ u\n⊢ False\n[PROOFSTEP]\nobtain ⟨y, hyv, hxy⟩ := huv x hxu\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis : v \\ u = v\nhxu : x ∈ u\ny : α\nhyv : y ∈ v\nhxy : IsCompressed (erase u x) (erase v y) 𝒜\n⊢ False\n[PROOFSTEP]\napply\n  m y\n    (disjoint_right.1 hsv hyv)\n      -- and we will use this `y` to contradict `m`, so we would like to show `insert y s ∈ 𝒜`.\n          -- We do this by showing the below\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis : v \\ u = v\nhxu : x ∈ u\ny : α\nhyv : y ∈ v\nhxy : IsCompressed (erase u x) (erase v y) 𝒜\n⊢ insert y s ∈ 𝒜\n[PROOFSTEP]\nhave : ((insert x s ∪ v) \\ u ∪ erase u x) \\ erase v y ∈ 𝒜 :=\n  by\n  refine'\n    sup_sdiff_mem_of_mem_compression (by rwa [hxy.eq]) _ (disjoint_of_subset_left (erase_subset _ _) disjoint_sdiff)\n  rw [union_sdiff_distrib, ‹v \\ u = v›]\n  exact\n    (erase_subset _ _).trans\n      (subset_union_right _ _)\n        -- and then arguing that it's the same\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis : v \\ u = v\nhxu : x ∈ u\ny : α\nhyv : y ∈ v\nhxy : IsCompressed (erase u x) (erase v y) 𝒜\n⊢ ((insert x s ∪ v) \\ u ∪ erase u x) \\ erase v y ∈ 𝒜\n[PROOFSTEP]\nrefine' sup_sdiff_mem_of_mem_compression (by rwa [hxy.eq]) _ (disjoint_of_subset_left (erase_subset _ _) disjoint_sdiff)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis : v \\ u = v\nhxu : x ∈ u\ny : α\nhyv : y ∈ v\nhxy : IsCompressed (erase u x) (erase v y) 𝒜\n⊢ (insert x s ∪ v) \\ u ∈ 𝓒 (erase u x) (erase v y) 𝒜\n[PROOFSTEP]\nrwa [hxy.eq]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis : v \\ u = v\nhxu : x ∈ u\ny : α\nhyv : y ∈ v\nhxy : IsCompressed (erase u x) (erase v y) 𝒜\n⊢ erase v y ≤ (insert x s ∪ v) \\ u\n[PROOFSTEP]\nrw [union_sdiff_distrib, ‹v \\ u = v›]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis : v \\ u = v\nhxu : x ∈ u\ny : α\nhyv : y ∈ v\nhxy : IsCompressed (erase u x) (erase v y) 𝒜\n⊢ erase v y ≤ insert x s \\ u ∪ v\n[PROOFSTEP]\nexact\n  (erase_subset _ _).trans\n    (subset_union_right _ _)\n      -- and then arguing that it's the same\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝¹ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝ : v \\ u = v\nhxu : x ∈ u\ny : α\nhyv : y ∈ v\nhxy : IsCompressed (erase u x) (erase v y) 𝒜\nthis : ((insert x s ∪ v) \\ u ∪ erase u x) \\ erase v y ∈ 𝒜\n⊢ insert y s ∈ 𝒜\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_4\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝¹ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝ : v \\ u = v\nhxu : x ∈ u\ny : α\nhyv : y ∈ v\nhxy : IsCompressed (erase u x) (erase v y) 𝒜\nthis : ((insert x s ∪ v) \\ u ∪ erase u x) \\ erase v y ∈ 𝒜\n⊢ insert y s = ((insert x s ∪ v) \\ u ∪ erase u x) \\ erase v y\n[PROOFSTEP]\nrw [sdiff_union_erase_cancel (hus.trans <| subset_union_left _ _) ‹x ∈ u›, erase_union_distrib, erase_insert ‹x ∉ s›,\n  erase_eq_of_not_mem ‹x ∉ v›, sdiff_erase (mem_union_right _ hyv), union_sdiff_cancel_right hsv]\n  -- Now that this is done, it's immediate that `u ⊆ s`\n[GOAL]\ncase H.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝¹ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝ : v \\ u = v\nthis : ¬x ∈ u\n⊢ u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nhave hus : u ⊆ s := by\n  rwa [← erase_eq_of_not_mem ‹x ∉ u›, ← subset_insert_iff]\n    -- and we already had that `v` and `s` are disjoint,\n      -- so it only remains to get `(s ∪ v) \\ u ∈ ∂ 𝒜 \\ ∂ 𝒜'`\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝¹ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝ : v \\ u = v\nthis : ¬x ∈ u\n⊢ u ⊆ s\n[PROOFSTEP]\nrwa [← erase_eq_of_not_mem ‹x ∉ u›, ← subset_insert_iff]\n  -- and we already had that `v` and `s` are disjoint,\n    -- so it only remains to get `(s ∪ v) \\ u ∈ ∂ 𝒜 \\ ∂ 𝒜'`\n[GOAL]\ncase H.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝¹ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝ : v \\ u = v\nthis : ¬x ∈ u\nhus : u ⊆ s\n⊢ u ⊆ s ∧ Disjoint v s ∧ (s ∪ v) \\ u ∈ ∂ 𝒜 ∧ ¬(s ∪ v) \\ u ∈ ∂ 𝒜'\n[PROOFSTEP]\nsimp_rw [mem_shadow_iff_insert_mem]\n[GOAL]\ncase H.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝¹ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝ : v \\ u = v\nthis : ¬x ∈ u\nhus : u ⊆ s\n⊢ u ⊆ s ∧ Disjoint v s ∧ (∃ a x, insert a ((s ∪ v) \\ u) ∈ 𝒜) ∧ ¬∃ a x, insert a ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\n[PROOFSTEP]\nrefine'\n  ⟨hus, hsv.symm, ⟨x, _, _⟩, _⟩\n    -- `(s ∪ v) \\ u ∈ ∂ 𝒜` is pretty direct:\n[GOAL]\ncase H.intro.intro.refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝¹ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝ : v \\ u = v\nthis : ¬x ∈ u\nhus : u ⊆ s\n⊢ ¬x ∈ (s ∪ v) \\ u\n[PROOFSTEP]\nexact not_mem_sdiff_of_not_mem_left (not_mem_union.2 ⟨‹x ∉ s›, ‹x ∉ v›⟩)\n[GOAL]\ncase H.intro.intro.refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝¹ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝ : v \\ u = v\nthis : ¬x ∈ u\nhus : u ⊆ s\n⊢ insert x ((s ∪ v) \\ u) ∈ 𝒜\n[PROOFSTEP]\nrwa [← insert_sdiff_of_not_mem _ ‹x ∉ u›, ← insert_union]\n  -- For (s ∪ v) \\ u ∉ ∂ 𝒜', we split up based on w ∈ u\n[GOAL]\ncase H.intro.intro.refine'_3\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝¹ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝ : v \\ u = v\nthis : ¬x ∈ u\nhus : u ⊆ s\n⊢ ¬∃ a x, insert a ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\n[PROOFSTEP]\nrintro ⟨w, hwB, hw𝒜'⟩\n[GOAL]\ncase H.intro.intro.refine'_3.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝¹ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝ : v \\ u = v\nthis : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\n⊢ False\n[PROOFSTEP]\nhave : v ⊆ insert w ((s ∪ v) \\ u) := (subset_sdiff.2 ⟨subset_union_right _ _, hvu⟩).trans (subset_insert _ _)\n[GOAL]\ncase H.intro.intro.refine'_3.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝² : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝¹ : v \\ u = v\nthis✝ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis : v ⊆ insert w ((s ∪ v) \\ u)\n⊢ False\n[PROOFSTEP]\nby_cases hwu : w ∈ u\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝² : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝¹ : v \\ u = v\nthis✝ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : w ∈ u\n⊢ False\n[PROOFSTEP]\nobtain ⟨z, hz, hxy⟩ := huv w hwu\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝² : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝¹ : v \\ u = v\nthis✝ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : w ∈ u\nz : α\nhz : z ∈ v\nhxy : IsCompressed (erase u w) (erase v z) 𝒜\n⊢ False\n[PROOFSTEP]\napply m z (disjoint_right.1 hsv hz)\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝² : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝¹ : v \\ u = v\nthis✝ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : w ∈ u\nz : α\nhz : z ∈ v\nhxy : IsCompressed (erase u w) (erase v z) 𝒜\n⊢ insert z s ∈ 𝒜\n[PROOFSTEP]\nhave : insert w ((s ∪ v) \\ u) ∈ 𝒜 := mem_of_mem_compression hw𝒜' ‹_› (aux huv)\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝³ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝² : v \\ u = v\nthis✝¹ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis✝ : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : w ∈ u\nz : α\nhz : z ∈ v\nhxy : IsCompressed (erase u w) (erase v z) 𝒜\nthis : insert w ((s ∪ v) \\ u) ∈ 𝒜\n⊢ insert z s ∈ 𝒜\n[PROOFSTEP]\nhave : (insert w ((s ∪ v) \\ u) ∪ erase u w) \\ erase v z ∈ 𝒜 :=\n  by\n  refine' sup_sdiff_mem_of_mem_compression (by rwa [hxy.eq]) ((erase_subset _ _).trans ‹_›) _\n  rw [← sdiff_erase (mem_union_left _ <| hus hwu)]\n  exact disjoint_sdiff\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝³ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝² : v \\ u = v\nthis✝¹ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis✝ : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : w ∈ u\nz : α\nhz : z ∈ v\nhxy : IsCompressed (erase u w) (erase v z) 𝒜\nthis : insert w ((s ∪ v) \\ u) ∈ 𝒜\n⊢ (insert w ((s ∪ v) \\ u) ∪ erase u w) \\ erase v z ∈ 𝒜\n[PROOFSTEP]\nrefine' sup_sdiff_mem_of_mem_compression (by rwa [hxy.eq]) ((erase_subset _ _).trans ‹_›) _\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝³ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝² : v \\ u = v\nthis✝¹ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis✝ : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : w ∈ u\nz : α\nhz : z ∈ v\nhxy : IsCompressed (erase u w) (erase v z) 𝒜\nthis : insert w ((s ∪ v) \\ u) ∈ 𝒜\n⊢ insert w ((s ∪ v) \\ u) ∈ 𝓒 (erase u w) (erase v z) 𝒜\n[PROOFSTEP]\nrwa [hxy.eq]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝³ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝² : v \\ u = v\nthis✝¹ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis✝ : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : w ∈ u\nz : α\nhz : z ∈ v\nhxy : IsCompressed (erase u w) (erase v z) 𝒜\nthis : insert w ((s ∪ v) \\ u) ∈ 𝒜\n⊢ Disjoint (erase u w) (insert w ((s ∪ v) \\ u))\n[PROOFSTEP]\nrw [← sdiff_erase (mem_union_left _ <| hus hwu)]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝³ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝² : v \\ u = v\nthis✝¹ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis✝ : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : w ∈ u\nz : α\nhz : z ∈ v\nhxy : IsCompressed (erase u w) (erase v z) 𝒜\nthis : insert w ((s ∪ v) \\ u) ∈ 𝒜\n⊢ Disjoint (erase u w) ((s ∪ v) \\ erase u w)\n[PROOFSTEP]\nexact disjoint_sdiff\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝⁴ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝³ : v \\ u = v\nthis✝² : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis✝¹ : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : w ∈ u\nz : α\nhz : z ∈ v\nhxy : IsCompressed (erase u w) (erase v z) 𝒜\nthis✝ : insert w ((s ∪ v) \\ u) ∈ 𝒜\nthis : (insert w ((s ∪ v) \\ u) ∪ erase u w) \\ erase v z ∈ 𝒜\n⊢ insert z s ∈ 𝒜\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_4\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝⁴ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝³ : v \\ u = v\nthis✝² : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis✝¹ : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : w ∈ u\nz : α\nhz : z ∈ v\nhxy : IsCompressed (erase u w) (erase v z) 𝒜\nthis✝ : insert w ((s ∪ v) \\ u) ∈ 𝒜\nthis : (insert w ((s ∪ v) \\ u) ∪ erase u w) \\ erase v z ∈ 𝒜\n⊢ insert z s = (insert w ((s ∪ v) \\ u) ∪ erase u w) \\ erase v z\n[PROOFSTEP]\nrw [insert_union_comm, insert_erase ‹w ∈ u›, sdiff_union_of_subset (hus.trans $ subset_union_left _ _),\n  sdiff_erase (mem_union_right _ ‹z ∈ v›), union_sdiff_cancel_right hsv]\n  -- If `w ∉ u`, we contradict `m` again\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝² : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝¹ : v \\ u = v\nthis✝ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : ¬w ∈ (s ∪ v) \\ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : ¬w ∈ u\n⊢ False\n[PROOFSTEP]\nrw [mem_sdiff, ← not_imp, Classical.not_not] at hwB \n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝² : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝¹ : v \\ u = v\nthis✝ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : w ∈ s ∪ v → w ∈ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : ¬w ∈ u\n⊢ False\n[PROOFSTEP]\napply m w (hwu ∘ hwB ∘ mem_union_left _)\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝² : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝¹ : v \\ u = v\nthis✝ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : w ∈ s ∪ v → w ∈ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : ¬w ∈ u\n⊢ insert w s ∈ 𝒜\n[PROOFSTEP]\nhave : (insert w ((s ∪ v) \\ u) ∪ u) \\ v ∈ 𝒜 :=\n  sup_sdiff_mem_of_mem_compression ‹insert w ((s ∪ v) \\ u) ∈ 𝒜'› ‹_› (disjoint_insert_right.2 ⟨‹_›, disjoint_sdiff⟩)\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝³ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝² : v \\ u = v\nthis✝¹ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : w ∈ s ∪ v → w ∈ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis✝ : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : ¬w ∈ u\nthis : (insert w ((s ∪ v) \\ u) ∪ u) \\ v ∈ 𝒜\n⊢ insert w s ∈ 𝒜\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_4\nα : Type u_1\ninst✝ : DecidableEq α\n𝒜 : Finset (Finset α)\nu✝ v✝ a u v : Finset α\nhuv : ∀ (x : α), x ∈ u → ∃ y, y ∈ v ∧ IsCompressed (erase u x) (erase v y) 𝒜\n𝒜' : Finset (Finset α) := 𝓒 u v 𝒜\ns : Finset α\nhs𝒜' : s ∈ ∂ 𝒜'\nhs𝒜 : ¬s ∈ ∂ 𝒜\nm : ∀ (y : α), ¬y ∈ s → ¬insert y s ∈ 𝒜\nx : α\nw✝ : ¬x ∈ s\nh✝ : insert x s ∈ 𝒜'\nhus✝ : u ⊆ insert x s\nhvs : Disjoint v (insert x s)\nthis✝³ : (insert x s ∪ v) \\ u ∈ 𝒜\nhsv : Disjoint s v\nhvu : Disjoint v u\nhxv : ¬x ∈ v\nthis✝² : v \\ u = v\nthis✝¹ : ¬x ∈ u\nhus : u ⊆ s\nw : α\nhwB : w ∈ s ∪ v → w ∈ u\nhw𝒜' : insert w ((s ∪ v) \\ u) ∈ 𝓒 u v 𝒜\nthis✝ : v ⊆ insert w ((s ∪ v) \\ u)\nhwu : ¬w ∈ u\nthis : (insert w ((s ∪ v) \\ u) ∪ u) \\ v ∈ 𝒜\n⊢ insert w s = (insert w ((s ∪ v) \\ u) ∪ u) \\ v\n[PROOFSTEP]\nrw [insert_union, sdiff_union_of_subset (hus.trans <| subset_union_left _ _),\n  insert_sdiff_of_not_mem _ (hwu ∘ hwB ∘ mem_union_right _), union_sdiff_cancel_right hsv]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SetFamily.Compression.UV", "llama_tokens": 49532, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6076631698328916, "lm_q2_score": 0.5813030906443133, "lm_q1q2_score": 0.35323647869458014}}
{"text": "[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR θ : ℝ\n⊢ circleMap c R (θ + 2 * π) = circleMap c R θ\n[PROOFSTEP]\nsimp [circleMap, add_mul, exp_periodic _]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR θ : ℝ\n⊢ circleMap c R θ - c = circleMap 0 R θ\n[PROOFSTEP]\nsimp [circleMap]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nR θ : ℝ\n⊢ ↑Complex.abs (circleMap 0 R θ) = |R|\n[PROOFSTEP]\nsimp [circleMap]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR θ : ℝ\n⊢ circleMap c R θ ∈ sphere c |R|\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nhR : 0 ≤ R\nθ : ℝ\n⊢ circleMap c R θ ∈ sphere c R\n[PROOFSTEP]\nsimpa only [_root_.abs_of_nonneg hR] using circleMap_mem_sphere' c R θ\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR θ : ℝ\n⊢ ¬circleMap c R θ ∈ ball c R\n[PROOFSTEP]\nsimp [dist_eq, le_abs_self]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\n⊢ range (circleMap c R) = c +ᵥ R • range fun θ => exp (↑θ * I)\n[PROOFSTEP]\nsimp only [← image_vadd, ← image_smul, ← range_comp, vadd_eq_add, circleMap, (· ∘ ·), real_smul]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\n⊢ (c +ᵥ R • range fun θ => exp (↑θ * I)) = sphere c |R|\n[PROOFSTEP]\nrw [Complex.range_exp_mul_I, smul_sphere R 0 zero_le_one]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\n⊢ c +ᵥ sphere (R • 0) (‖R‖ * 1) = sphere c |R|\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\n⊢ circleMap c R '' Ioc 0 (2 * π) = sphere c |R|\n[PROOFSTEP]\nrw [← range_circleMap, ← (periodic_circleMap c R).image_Ioc Real.two_pi_pos 0, zero_add]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR θ : ℝ\n⊢ circleMap c R θ = c ↔ R = 0\n[PROOFSTEP]\nsimp [circleMap, exp_ne_zero]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR θ : ℝ\n⊢ HasDerivAt (circleMap c R) (circleMap 0 R θ * I) θ\n[PROOFSTEP]\nsimpa only [mul_assoc, one_mul, ofRealClm_apply, circleMap, ofReal_one, zero_add] using\n  (((ofRealClm.hasDerivAt (x := θ)).mul_const I).cexp.const_mul (R : ℂ)).const_add c\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR θ : ℝ\n⊢ deriv (circleMap c R) θ = 0 ↔ R = 0\n[PROOFSTEP]\nsimp [I_ne_zero]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR θ : ℝ\n⊢ ↑‖deriv (circleMap c R) θ‖₊ ≤ ↑(↑Real.nnabs R)\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nR : ℝ\nz w : ℂ\nhw : w ∈ ball z R\n⊢ Continuous fun θ => (circleMap z R θ - w)⁻¹\n[PROOFSTEP]\nhave : ∀ θ, circleMap z R θ - w ≠ 0 := by\n  simp_rw [sub_ne_zero]\n  exact fun θ => circleMap_ne_mem_ball hw θ\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nR : ℝ\nz w : ℂ\nhw : w ∈ ball z R\n⊢ ∀ (θ : ℝ), circleMap z R θ - w ≠ 0\n[PROOFSTEP]\nsimp_rw [sub_ne_zero]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nR : ℝ\nz w : ℂ\nhw : w ∈ ball z R\n⊢ ∀ (θ : ℝ), circleMap z R θ ≠ w\n[PROOFSTEP]\nexact fun θ => circleMap_ne_mem_ball hw θ\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nR : ℝ\nz w : ℂ\nhw : w ∈ ball z R\nthis : ∀ (θ : ℝ), circleMap z R θ - w ≠ 0\n⊢ Continuous fun θ => (circleMap z R θ - w)⁻¹\n[PROOFSTEP]\nexact Continuous.inv₀ (by continuity) this\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nR : ℝ\nz w : ℂ\nhw : w ∈ ball z R\nthis : ∀ (θ : ℝ), circleMap z R θ - w ≠ 0\n⊢ Continuous fun θ => circleMap z R θ - w\n[PROOFSTEP]\ncontinuity\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\nf g : ℂ → E\nc : ℂ\nR : ℝ\ninst✝ : NormedSpace ℂ E\nhf : CircleIntegrable f c R\n⊢ IntervalIntegrable (fun θ => deriv (circleMap c R) θ • f (circleMap c R θ)) volume 0 (2 * π)\n[PROOFSTEP]\nsimp only [CircleIntegrable, deriv_circleMap, intervalIntegrable_iff] at *\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\nf g : ℂ → E\nc : ℂ\nR : ℝ\ninst✝ : NormedSpace ℂ E\nhf : IntegrableOn (fun θ => f (circleMap c R θ)) (Ι 0 (2 * π))\n⊢ IntegrableOn (fun θ => (circleMap 0 R θ * I) • f (circleMap c R θ)) (Ι 0 (2 * π))\n[PROOFSTEP]\nrefine' (hf.norm.const_mul |R|).mono' _ _\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\nf g : ℂ → E\nc : ℂ\nR : ℝ\ninst✝ : NormedSpace ℂ E\nhf : IntegrableOn (fun θ => f (circleMap c R θ)) (Ι 0 (2 * π))\n⊢ AEStronglyMeasurable (fun θ => (circleMap 0 R θ * I) • f (circleMap c R θ)) (Measure.restrict volume (Ι 0 (2 * π)))\n[PROOFSTEP]\nexact ((continuous_circleMap _ _).aestronglyMeasurable.mul_const I).smul hf.aestronglyMeasurable\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\nf g : ℂ → E\nc : ℂ\nR : ℝ\ninst✝ : NormedSpace ℂ E\nhf : IntegrableOn (fun θ => f (circleMap c R θ)) (Ι 0 (2 * π))\n⊢ ∀ᵐ (a : ℝ) ∂Measure.restrict volume (Ι 0 (2 * π)),\n    ‖(circleMap 0 R a * I) • f (circleMap c R a)‖ ≤ |R| * ‖f (circleMap c R a)‖\n[PROOFSTEP]\nsimp [norm_smul]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf : ℂ → E\nc : ℂ\n⊢ CircleIntegrable f c 0\n[PROOFSTEP]\nsimp [CircleIntegrable]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → E\nc : ℂ\nR : ℝ\n⊢ CircleIntegrable f c R ↔ IntervalIntegrable (fun θ => deriv (circleMap c R) θ • f (circleMap c R θ)) volume 0 (2 * π)\n[PROOFSTEP]\nby_cases h₀ : R = 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → E\nc : ℂ\nR : ℝ\nh₀ : R = 0\n⊢ CircleIntegrable f c R ↔ IntervalIntegrable (fun θ => deriv (circleMap c R) θ • f (circleMap c R θ)) volume 0 (2 * π)\n[PROOFSTEP]\nsimp [h₀, const]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → E\nc : ℂ\nR : ℝ\nh₀ : ¬R = 0\n⊢ CircleIntegrable f c R ↔ IntervalIntegrable (fun θ => deriv (circleMap c R) θ • f (circleMap c R θ)) volume 0 (2 * π)\n[PROOFSTEP]\nrefine' ⟨fun h => h.out, fun h => _⟩\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → E\nc : ℂ\nR : ℝ\nh₀ : ¬R = 0\nh : IntervalIntegrable (fun θ => deriv (circleMap c R) θ • f (circleMap c R θ)) volume 0 (2 * π)\n⊢ CircleIntegrable f c R\n[PROOFSTEP]\nsimp only [CircleIntegrable, intervalIntegrable_iff, deriv_circleMap] at h ⊢\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → E\nc : ℂ\nR : ℝ\nh₀ : ¬R = 0\nh : IntegrableOn (fun θ => (circleMap 0 R θ * I) • f (circleMap c R θ)) (Ι 0 (2 * π))\n⊢ IntegrableOn (fun θ => f (circleMap c R θ)) (Ι 0 (2 * π))\n[PROOFSTEP]\nrefine' (h.norm.const_mul |R|⁻¹).mono' _ _\n[GOAL]\ncase neg.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → E\nc : ℂ\nR : ℝ\nh₀ : ¬R = 0\nh : IntegrableOn (fun θ => (circleMap 0 R θ * I) • f (circleMap c R θ)) (Ι 0 (2 * π))\n⊢ AEStronglyMeasurable (fun θ => f (circleMap c R θ)) (Measure.restrict volume (Ι 0 (2 * π)))\n[PROOFSTEP]\nhave H : ∀ {θ}, circleMap 0 R θ * I ≠ 0 := fun {θ} => by simp [h₀, I_ne_zero]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → E\nc : ℂ\nR : ℝ\nh₀ : ¬R = 0\nh : IntegrableOn (fun θ => (circleMap 0 R θ * I) • f (circleMap c R θ)) (Ι 0 (2 * π))\nθ : ℝ\n⊢ circleMap 0 R θ * I ≠ 0\n[PROOFSTEP]\nsimp [h₀, I_ne_zero]\n[GOAL]\ncase neg.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → E\nc : ℂ\nR : ℝ\nh₀ : ¬R = 0\nh : IntegrableOn (fun θ => (circleMap 0 R θ * I) • f (circleMap c R θ)) (Ι 0 (2 * π))\nH : ∀ {θ : ℝ}, circleMap 0 R θ * I ≠ 0\n⊢ AEStronglyMeasurable (fun θ => f (circleMap c R θ)) (Measure.restrict volume (Ι 0 (2 * π)))\n[PROOFSTEP]\nsimpa only [inv_smul_smul₀ H] using\n  ((continuous_circleMap 0 R).aestronglyMeasurable.mul_const I).aemeasurable.inv.aestronglyMeasurable.smul\n    h.aestronglyMeasurable\n[GOAL]\ncase neg.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℂ → E\nc : ℂ\nR : ℝ\nh₀ : ¬R = 0\nh : IntegrableOn (fun θ => (circleMap 0 R θ * I) • f (circleMap c R θ)) (Ι 0 (2 * π))\n⊢ ∀ᵐ (a : ℝ) ∂Measure.restrict volume (Ι 0 (2 * π)),\n    ‖f (circleMap c R a)‖ ≤ |R|⁻¹ * ‖(circleMap 0 R a * I) • f (circleMap c R a)‖\n[PROOFSTEP]\nsimp [norm_smul, h₀]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc w : ℂ\nR : ℝ\nn : ℤ\n⊢ CircleIntegrable (fun z => (z - w) ^ n) c R ↔ R = 0 ∨ 0 ≤ n ∨ ¬w ∈ sphere c |R|\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc w : ℂ\nR : ℝ\nn : ℤ\n⊢ CircleIntegrable (fun z => (z - w) ^ n) c R → R = 0 ∨ 0 ≤ n ∨ ¬w ∈ sphere c |R|\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc w : ℂ\nR : ℝ\nn : ℤ\nh : CircleIntegrable (fun z => (z - w) ^ n) c R\n⊢ R = 0 ∨ 0 ≤ n ∨ ¬w ∈ sphere c |R|\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase mp\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc w : ℂ\nR : ℝ\nn : ℤ\nh : R ≠ 0 ∧ n < 0 ∧ w ∈ sphere c |R|\n⊢ ¬CircleIntegrable (fun z => (z - w) ^ n) c R\n[PROOFSTEP]\nrcases h with ⟨hR, hn, hw⟩\n[GOAL]\ncase mp.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc w : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nhw : w ∈ sphere c |R|\n⊢ ¬CircleIntegrable (fun z => (z - w) ^ n) c R\n[PROOFSTEP]\nsimp only [circleIntegrable_iff R, deriv_circleMap]\n[GOAL]\ncase mp.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc w : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nhw : w ∈ sphere c |R|\n⊢ ¬IntervalIntegrable (fun θ => (circleMap 0 R θ * I) • (circleMap c R θ - w) ^ n) volume 0 (2 * π)\n[PROOFSTEP]\nrw [← image_circleMap_Ioc] at hw \n[GOAL]\ncase mp.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc w : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nhw : w ∈ circleMap c R '' Ioc 0 (2 * π)\n⊢ ¬IntervalIntegrable (fun θ => (circleMap 0 R θ * I) • (circleMap c R θ - w) ^ n) volume 0 (2 * π)\n[PROOFSTEP]\nrcases hw with ⟨θ, hθ, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ Ioc 0 (2 * π)\n⊢ ¬IntervalIntegrable (fun θ_1 => (circleMap 0 R θ_1 * I) • (circleMap c R θ_1 - circleMap c R θ) ^ n) volume 0 (2 * π)\n[PROOFSTEP]\nreplace hθ : θ ∈ [[0, 2 * π]]\n[GOAL]\ncase hθ\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ Ioc 0 (2 * π)\n⊢ θ ∈ [[0, 2 * π]]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\n⊢ ¬IntervalIntegrable (fun θ_1 => (circleMap 0 R θ_1 * I) • (circleMap c R θ_1 - circleMap c R θ) ^ n) volume 0 (2 * π)\n[PROOFSTEP]\nexact Icc_subset_uIcc (Ioc_subset_Icc_self hθ)\n[GOAL]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\n⊢ ¬IntervalIntegrable (fun θ_1 => (circleMap 0 R θ_1 * I) • (circleMap c R θ_1 - circleMap c R θ) ^ n) volume 0 (2 * π)\n[PROOFSTEP]\nrefine' not_intervalIntegrable_of_sub_inv_isBigO_punctured _ Real.two_pi_pos.ne hθ\n[GOAL]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\n⊢ (fun x => (x - θ)⁻¹) =O[𝓝[{θ}ᶜ] θ] fun θ_1 => (circleMap 0 R θ_1 * I) • (circleMap c R θ_1 - circleMap c R θ) ^ n\n[PROOFSTEP]\nset f : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\n[GOAL]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\n⊢ (fun x => (x - θ)⁻¹) =O[𝓝[{θ}ᶜ] θ] fun θ_1 => (circleMap 0 R θ_1 * I) • (circleMap c R θ_1 - circleMap c R θ) ^ n\n[PROOFSTEP]\nhave : ∀ᶠ θ' in 𝓝[≠] θ, f θ' ∈ ball (0 : ℂ) 1 \\ {0} :=\n  by\n  suffices : ∀ᶠ z in 𝓝[≠] circleMap c R θ, z - circleMap c R θ ∈ ball (0 : ℂ) 1 \\ {0}\n  exact\n    ((differentiable_circleMap c R θ).hasDerivAt.tendsto_punctured_nhds (deriv_circleMap_ne_zero hR)).eventually this\n  filter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds (ball_mem_nhds _ zero_lt_one)]\n  simp_all [dist_eq, sub_eq_zero]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\n⊢ ∀ᶠ (θ' : ℝ) in 𝓝[{θ}ᶜ] θ, f θ' ∈ ball 0 1 \\ {0}\n[PROOFSTEP]\nsuffices : ∀ᶠ z in 𝓝[≠] circleMap c R θ, z - circleMap c R θ ∈ ball (0 : ℂ) 1 \\ {0}\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\nthis : ∀ᶠ (z : ℂ) in 𝓝[{circleMap c R θ}ᶜ] circleMap c R θ, z - circleMap c R θ ∈ ball 0 1 \\ {0}\n⊢ ∀ᶠ (θ' : ℝ) in 𝓝[{θ}ᶜ] θ, f θ' ∈ ball 0 1 \\ {0}\ncase this\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\n⊢ ∀ᶠ (z : ℂ) in 𝓝[{circleMap c R θ}ᶜ] circleMap c R θ, z - circleMap c R θ ∈ ball 0 1 \\ {0}\n[PROOFSTEP]\nexact ((differentiable_circleMap c R θ).hasDerivAt.tendsto_punctured_nhds (deriv_circleMap_ne_zero hR)).eventually this\n[GOAL]\ncase this\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\n⊢ ∀ᶠ (z : ℂ) in 𝓝[{circleMap c R θ}ᶜ] circleMap c R θ, z - circleMap c R θ ∈ ball 0 1 \\ {0}\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds (ball_mem_nhds _ zero_lt_one)]\n[GOAL]\ncase h\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\n⊢ ∀ (a : ℂ), a ∈ {circleMap c R θ}ᶜ → a ∈ ball (circleMap c R θ) 1 → a - circleMap c R θ ∈ ball 0 1 \\ {0}\n[PROOFSTEP]\nsimp_all [dist_eq, sub_eq_zero]\n[GOAL]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\nthis : ∀ᶠ (θ' : ℝ) in 𝓝[{θ}ᶜ] θ, f θ' ∈ ball 0 1 \\ {0}\n⊢ (fun x => (x - θ)⁻¹) =O[𝓝[{θ}ᶜ] θ] fun θ_1 => (circleMap 0 R θ_1 * I) • (circleMap c R θ_1 - circleMap c R θ) ^ n\n[PROOFSTEP]\nrefine'\n  (((hasDerivAt_circleMap c R θ).isBigO_sub.mono inf_le_left).inv_rev (this.mono fun θ' h₁ h₂ => absurd h₂ h₁.2)).trans\n    _\n[GOAL]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\nthis : ∀ᶠ (θ' : ℝ) in 𝓝[{θ}ᶜ] θ, f θ' ∈ ball 0 1 \\ {0}\n⊢ (fun x => (circleMap c R x - circleMap c R θ)⁻¹) =O[𝓝 θ ⊓ 𝓟 {θ}ᶜ] fun θ_1 =>\n    (circleMap 0 R θ_1 * I) • (circleMap c R θ_1 - circleMap c R θ) ^ n\n[PROOFSTEP]\nrefine' IsBigO.of_bound |R|⁻¹ (this.mono fun θ' hθ' => _)\n[GOAL]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\nthis : ∀ᶠ (θ' : ℝ) in 𝓝[{θ}ᶜ] θ, f θ' ∈ ball 0 1 \\ {0}\nθ' : ℝ\nhθ' : f θ' ∈ ball 0 1 \\ {0}\n⊢ ‖(circleMap c R θ' - circleMap c R θ)⁻¹‖ ≤ |R|⁻¹ * ‖(circleMap 0 R θ' * I) • (circleMap c R θ' - circleMap c R θ) ^ n‖\n[PROOFSTEP]\nset x := abs (f θ')\n[GOAL]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\nthis : ∀ᶠ (θ' : ℝ) in 𝓝[{θ}ᶜ] θ, f θ' ∈ ball 0 1 \\ {0}\nθ' : ℝ\nhθ' : f θ' ∈ ball 0 1 \\ {0}\nx : ℝ := ↑Complex.abs (f θ')\n⊢ ‖(circleMap c R θ' - circleMap c R θ)⁻¹‖ ≤ |R|⁻¹ * ‖(circleMap 0 R θ' * I) • (circleMap c R θ' - circleMap c R θ) ^ n‖\n[PROOFSTEP]\nsuffices x⁻¹ ≤ x ^ n by\n  simpa only [inv_mul_cancel_left₀, abs_eq_zero.not.2 hR, norm_eq_abs, map_inv₀, Algebra.id.smul_eq_mul, map_mul,\n    abs_circleMap_zero, abs_I, mul_one, abs_zpow, Ne.def, not_false_iff] using this\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\nthis✝ : ∀ᶠ (θ' : ℝ) in 𝓝[{θ}ᶜ] θ, f θ' ∈ ball 0 1 \\ {0}\nθ' : ℝ\nhθ' : f θ' ∈ ball 0 1 \\ {0}\nx : ℝ := ↑Complex.abs (f θ')\nthis : x⁻¹ ≤ x ^ n\n⊢ ‖(circleMap c R θ' - circleMap c R θ)⁻¹‖ ≤ |R|⁻¹ * ‖(circleMap 0 R θ' * I) • (circleMap c R θ' - circleMap c R θ) ^ n‖\n[PROOFSTEP]\nsimpa only [inv_mul_cancel_left₀, abs_eq_zero.not.2 hR, norm_eq_abs, map_inv₀, Algebra.id.smul_eq_mul, map_mul,\n  abs_circleMap_zero, abs_I, mul_one, abs_zpow, Ne.def, not_false_iff] using this\n[GOAL]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\nthis : ∀ᶠ (θ' : ℝ) in 𝓝[{θ}ᶜ] θ, f θ' ∈ ball 0 1 \\ {0}\nθ' : ℝ\nhθ' : f θ' ∈ ball 0 1 \\ {0}\nx : ℝ := ↑Complex.abs (f θ')\n⊢ x⁻¹ ≤ x ^ n\n[PROOFSTEP]\nhave : x ∈ Ioo (0 : ℝ) 1 := by simpa [and_comm] using hθ'\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\nthis : ∀ᶠ (θ' : ℝ) in 𝓝[{θ}ᶜ] θ, f θ' ∈ ball 0 1 \\ {0}\nθ' : ℝ\nhθ' : f θ' ∈ ball 0 1 \\ {0}\nx : ℝ := ↑Complex.abs (f θ')\n⊢ x ∈ Ioo 0 1\n[PROOFSTEP]\nsimpa [and_comm] using hθ'\n[GOAL]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\nthis✝ : ∀ᶠ (θ' : ℝ) in 𝓝[{θ}ᶜ] θ, f θ' ∈ ball 0 1 \\ {0}\nθ' : ℝ\nhθ' : f θ' ∈ ball 0 1 \\ {0}\nx : ℝ := ↑Complex.abs (f θ')\nthis : x ∈ Ioo 0 1\n⊢ x⁻¹ ≤ x ^ n\n[PROOFSTEP]\nrw [← zpow_neg_one]\n[GOAL]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\nthis✝ : ∀ᶠ (θ' : ℝ) in 𝓝[{θ}ᶜ] θ, f θ' ∈ ball 0 1 \\ {0}\nθ' : ℝ\nhθ' : f θ' ∈ ball 0 1 \\ {0}\nx : ℝ := ↑Complex.abs (f θ')\nthis : x ∈ Ioo 0 1\n⊢ x ^ (-1) ≤ x ^ n\n[PROOFSTEP]\nrefine' (zpow_strictAnti this.1 this.2).le_iff_le.2 (Int.lt_add_one_iff.1 _)\n[GOAL]\ncase mp.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : ℂ\nR : ℝ\nn : ℤ\nhR : R ≠ 0\nhn : n < 0\nθ : ℝ\nhθ : θ ∈ [[0, 2 * π]]\nf : ℝ → ℂ := fun θ' => circleMap c R θ' - circleMap c R θ\nthis✝ : ∀ᶠ (θ' : ℝ) in 𝓝[{θ}ᶜ] θ, f θ' ∈ ball 0 1 \\ {0}\nθ' : ℝ\nhθ' : f θ' ∈ ball 0 1 \\ {0}\nx : ℝ := ↑Complex.abs (f θ')\nthis : x ∈ Ioo 0 1\n⊢ n < -1 + 1\n[PROOFSTEP]\nexact hn\n[GOAL]\ncase mpr\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc w : ℂ\nR : ℝ\nn : ℤ\n⊢ R = 0 ∨ 0 ≤ n ∨ ¬w ∈ sphere c |R| → CircleIntegrable (fun z => (z - w) ^ n) c R\n[PROOFSTEP]\nrintro (rfl | H)\n[GOAL]\ncase mpr.inl\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc w : ℂ\nn : ℤ\n⊢ CircleIntegrable (fun z => (z - w) ^ n) c 0\ncase mpr.inr\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc w : ℂ\nR : ℝ\nn : ℤ\nH : 0 ≤ n ∨ ¬w ∈ sphere c |R|\n⊢ CircleIntegrable (fun z => (z - w) ^ n) c R\n[PROOFSTEP]\nexacts [circleIntegrable_zero_radius,\n  ((continuousOn_id.sub continuousOn_const).zpow₀ _ fun z hz =>\n      H.symm.imp_left fun (hw : w ∉ sphere c |R|) => sub_ne_zero.2 <| ne_of_mem_of_not_mem hz hw).circleIntegrable']\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc w : ℂ\nR : ℝ\n⊢ CircleIntegrable (fun z => (z - w)⁻¹) c R ↔ R = 0 ∨ ¬w ∈ sphere c |R|\n[PROOFSTEP]\nsimp only [← zpow_neg_one, circleIntegrable_sub_zpow_iff]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc w : ℂ\nR : ℝ\n⊢ R = 0 ∨ False ∨ ¬w ∈ sphere c |R| ↔ R = 0 ∨ ¬w ∈ sphere c |R|\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\n⊢ (∮ (z : ℂ) in C(c, R), f z) = ∫ (θ : ℝ) in Icc 0 (2 * π), deriv (circleMap c R) θ • f (circleMap c R θ)\n[PROOFSTEP]\nrw [circleIntegral, intervalIntegral.integral_of_le Real.two_pi_pos.le, Measure.restrict_congr_set Ioc_ae_eq_Icc]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\n⊢ (∮ (z : ℂ) in C(c, 0), f z) = 0\n[PROOFSTEP]\nsimp [circleIntegral, const]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf g : ℂ → E\nc : ℂ\nR : ℝ\nhR : 0 ≤ R\nh : EqOn f g (sphere c R)\nθ : ℝ\nx✝ : θ ∈ [[0, 2 * π]]\n⊢ deriv (circleMap c R) θ • (fun z => f z) (circleMap c R θ) =\n    deriv (circleMap c R) θ • (fun z => g z) (circleMap c R θ)\n[PROOFSTEP]\nsimp only [h (circleMap_mem_sphere _ hR _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc w : ℂ\nR : ℝ\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • (z - w) • f z) = ∮ (z : ℂ) in C(c, R), f z\n[PROOFSTEP]\nrcases eq_or_ne R 0 with (rfl | hR)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc w : ℂ\n⊢ (∮ (z : ℂ) in C(c, 0), (z - w)⁻¹ • (z - w) • f z) = ∮ (z : ℂ) in C(c, 0), f z\n[PROOFSTEP]\nsimp only [integral_radius_zero]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc w : ℂ\nR : ℝ\nhR : R ≠ 0\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • (z - w) • f z) = ∮ (z : ℂ) in C(c, R), f z\n[PROOFSTEP]\nhave : (circleMap c R ⁻¹' { w }).Countable := (countable_singleton _).preimage_circleMap c hR\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc w : ℂ\nR : ℝ\nhR : R ≠ 0\nthis : Set.Countable (circleMap c R ⁻¹' {w})\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • (z - w) • f z) = ∮ (z : ℂ) in C(c, R), f z\n[PROOFSTEP]\nrefine' intervalIntegral.integral_congr_ae ((this.ae_not_mem _).mono fun θ hθ _' => _)\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc w : ℂ\nR : ℝ\nhR : R ≠ 0\nthis : Set.Countable (circleMap c R ⁻¹' {w})\nθ : ℝ\nhθ : ¬θ ∈ circleMap c R ⁻¹' {w}\n_' : θ ∈ Ι 0 (2 * π)\n⊢ deriv (circleMap c R) θ • (fun z => (z - w)⁻¹ • (z - w) • f z) (circleMap c R θ) =\n    deriv (circleMap c R) θ • (fun z => f z) (circleMap c R θ)\n[PROOFSTEP]\nchange circleMap c R θ ≠ w at hθ \n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc w : ℂ\nR : ℝ\nhR : R ≠ 0\nthis : Set.Countable (circleMap c R ⁻¹' {w})\nθ : ℝ\n_' : θ ∈ Ι 0 (2 * π)\nhθ : circleMap c R θ ≠ w\n⊢ deriv (circleMap c R) θ • (fun z => (z - w)⁻¹ • (z - w) • f z) (circleMap c R θ) =\n    deriv (circleMap c R) θ • (fun z => f z) (circleMap c R θ)\n[PROOFSTEP]\nsimp only [inv_smul_smul₀ (sub_ne_zero.2 <| hθ)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf g : ℂ → E\nc : ℂ\nR : ℝ\nhf : CircleIntegrable f c R\nhg : CircleIntegrable g c R\n⊢ (∮ (z : ℂ) in C(c, R), f z - g z) = (∮ (z : ℂ) in C(c, R), f z) - ∮ (z : ℂ) in C(c, R), g z\n[PROOFSTEP]\nsimp only [circleIntegral, smul_sub, intervalIntegral.integral_sub hf.out hg.out]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhf : ∀ (z : ℂ), z ∈ sphere c |R| → ‖f z‖ ≤ C\nθ : ℝ\nx✝ : θ ∈ Ι 0 (2 * π)\n⊢ ‖deriv (circleMap c R) θ • f (circleMap c R θ)‖ = |R| * ‖f (circleMap c R θ)‖\n[PROOFSTEP]\nsimp [norm_smul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhf : ∀ (z : ℂ), z ∈ sphere c |R| → ‖f z‖ ≤ C\n⊢ |R| * C * |2 * π - 0| = 2 * π * |R| * C\n[PROOFSTEP]\nrw [sub_zero, _root_.abs_of_pos Real.two_pi_pos]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhf : ∀ (z : ℂ), z ∈ sphere c |R| → ‖f z‖ ≤ C\n⊢ |R| * C * (2 * π) = 2 * π * |R| * C\n[PROOFSTEP]\nac_rfl\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 ≤ R\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nthis : |R| = R\n⊢ ∀ (z : ℂ), z ∈ sphere c |R| → ‖f z‖ ≤ C\n[PROOFSTEP]\nrwa [this]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 ≤ R\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nthis : |R| = R\n⊢ 2 * π * |R| * C = 2 * π * R * C\n[PROOFSTEP]\nrw [this]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 ≤ R\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\n⊢ ‖(2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), f z‖ ≤ R * C\n[PROOFSTEP]\nhave : ‖(2 * π * I : ℂ)⁻¹‖ = (2 * π)⁻¹ := by simp [Real.pi_pos.le]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 ≤ R\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\n⊢ ‖(2 * ↑π * I)⁻¹‖ = (2 * π)⁻¹\n[PROOFSTEP]\nsimp [Real.pi_pos.le]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 ≤ R\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nthis : ‖(2 * ↑π * I)⁻¹‖ = (2 * π)⁻¹\n⊢ ‖(2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), f z‖ ≤ R * C\n[PROOFSTEP]\nrw [norm_smul, this, ← div_eq_inv_mul, div_le_iff Real.two_pi_pos, mul_comm (R * C), ← mul_assoc]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 ≤ R\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nthis : ‖(2 * ↑π * I)⁻¹‖ = (2 * π)⁻¹\n⊢ ‖∮ (z : ℂ) in C(c, R), f z‖ ≤ 2 * π * R * C\n[PROOFSTEP]\nexact norm_integral_le_of_norm_le_const hR hf\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 < R\nhc : ContinuousOn f (sphere c R)\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nhlt : ∃ z, z ∈ sphere c R ∧ ‖f z‖ < C\n⊢ ‖∮ (z : ℂ) in C(c, R), f z‖ < 2 * π * R * C\n[PROOFSTEP]\nrw [← _root_.abs_of_pos hR, ← image_circleMap_Ioc] at hlt \n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 < R\nhc : ContinuousOn f (sphere c R)\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nhlt : ∃ z, z ∈ circleMap c R '' Ioc 0 (2 * π) ∧ ‖f z‖ < C\n⊢ ‖∮ (z : ℂ) in C(c, R), f z‖ < 2 * π * R * C\n[PROOFSTEP]\nrcases hlt with ⟨_, ⟨θ₀, hmem, rfl⟩, hlt⟩\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 < R\nhc : ContinuousOn f (sphere c R)\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nθ₀ : ℝ\nhmem : θ₀ ∈ Ioc 0 (2 * π)\nhlt : ‖f (circleMap c R θ₀)‖ < C\n⊢ ‖∮ (z : ℂ) in C(c, R), f z‖ < 2 * π * R * C\n[PROOFSTEP]\ncalc\n  ‖∮ z in C(c, R), f z‖ ≤ ∫ θ in (0)..2 * π, ‖deriv (circleMap c R) θ • f (circleMap c R θ)‖ :=\n    intervalIntegral.norm_integral_le_integral_norm Real.two_pi_pos.le\n  _ < ∫ _ in (0)..2 * π, R * C :=\n    by\n    simp only [norm_smul, deriv_circleMap, norm_eq_abs, map_mul, abs_I, mul_one, abs_circleMap_zero, abs_of_pos hR]\n    refine'\n      intervalIntegral.integral_lt_integral_of_continuousOn_of_le_of_exists_lt Real.two_pi_pos _ continuousOn_const\n        (fun θ _ => _) ⟨θ₀, Ioc_subset_Icc_self hmem, _⟩\n    ·\n      exact\n        continuousOn_const.mul\n          (hc.comp (continuous_circleMap _ _).continuousOn fun θ _ => circleMap_mem_sphere _ hR.le _).norm\n    · exact mul_le_mul_of_nonneg_left (hf _ <| circleMap_mem_sphere _ hR.le _) hR.le\n    · exact (mul_lt_mul_left hR).2 hlt\n  _ = 2 * π * R * C := by simp [mul_assoc]; ring\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 < R\nhc : ContinuousOn f (sphere c R)\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nθ₀ : ℝ\nhmem : θ₀ ∈ Ioc 0 (2 * π)\nhlt : ‖f (circleMap c R θ₀)‖ < C\n⊢ ∫ (θ : ℝ) in 0 ..2 * π, ‖deriv (circleMap c R) θ • f (circleMap c R θ)‖ < ∫ (x : ℝ) in 0 ..2 * π, R * C\n[PROOFSTEP]\nsimp only [norm_smul, deriv_circleMap, norm_eq_abs, map_mul, abs_I, mul_one, abs_circleMap_zero, abs_of_pos hR]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 < R\nhc : ContinuousOn f (sphere c R)\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nθ₀ : ℝ\nhmem : θ₀ ∈ Ioc 0 (2 * π)\nhlt : ‖f (circleMap c R θ₀)‖ < C\n⊢ ∫ (θ : ℝ) in 0 ..2 * π, R * ‖f (circleMap c R θ)‖ < ∫ (x : ℝ) in 0 ..2 * π, R * C\n[PROOFSTEP]\nrefine'\n  intervalIntegral.integral_lt_integral_of_continuousOn_of_le_of_exists_lt Real.two_pi_pos _ continuousOn_const\n    (fun θ _ => _) ⟨θ₀, Ioc_subset_Icc_self hmem, _⟩\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 < R\nhc : ContinuousOn f (sphere c R)\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nθ₀ : ℝ\nhmem : θ₀ ∈ Ioc 0 (2 * π)\nhlt : ‖f (circleMap c R θ₀)‖ < C\n⊢ ContinuousOn (fun θ => R * ‖f (circleMap c R θ)‖) (Icc 0 (2 * π))\n[PROOFSTEP]\nexact\n  continuousOn_const.mul\n    (hc.comp (continuous_circleMap _ _).continuousOn fun θ _ => circleMap_mem_sphere _ hR.le _).norm\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 < R\nhc : ContinuousOn f (sphere c R)\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nθ₀ : ℝ\nhmem : θ₀ ∈ Ioc 0 (2 * π)\nhlt : ‖f (circleMap c R θ₀)‖ < C\nθ : ℝ\nx✝ : θ ∈ Ioc 0 (2 * π)\n⊢ R * ‖f (circleMap c R θ)‖ ≤ R * C\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left (hf _ <| circleMap_mem_sphere _ hR.le _) hR.le\n[GOAL]\ncase refine'_3\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 < R\nhc : ContinuousOn f (sphere c R)\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nθ₀ : ℝ\nhmem : θ₀ ∈ Ioc 0 (2 * π)\nhlt : ‖f (circleMap c R θ₀)‖ < C\n⊢ R * ‖f (circleMap c R θ₀)‖ < R * C\n[PROOFSTEP]\nexact (mul_lt_mul_left hR).2 hlt\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 < R\nhc : ContinuousOn f (sphere c R)\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nθ₀ : ℝ\nhmem : θ₀ ∈ Ioc 0 (2 * π)\nhlt : ‖f (circleMap c R θ₀)‖ < C\n⊢ ∫ (x : ℝ) in 0 ..2 * π, R * C = 2 * π * R * C\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR C : ℝ\nhR : 0 < R\nhc : ContinuousOn f (sphere c R)\nhf : ∀ (z : ℂ), z ∈ sphere c R → ‖f z‖ ≤ C\nθ₀ : ℝ\nhmem : θ₀ ∈ Ioc 0 (2 * π)\nhlt : ‖f (circleMap c R θ₀)‖ < C\n⊢ R * (2 * (π * C)) = 2 * (π * (R * C))\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℂ E\ninst✝³ : CompleteSpace E\n𝕜 : Type u_2\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : SMulCommClass 𝕜 ℂ E\na : 𝕜\nf : ℂ → E\nc : ℂ\nR : ℝ\n⊢ (∮ (z : ℂ) in C(c, R), a • f z) = a • ∮ (z : ℂ) in C(c, R), f z\n[PROOFSTEP]\nsimp only [circleIntegral, ← smul_comm a (_ : ℂ) (_ : E), intervalIntegral.integral_smul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → ℂ\na : E\nc : ℂ\nR : ℝ\n⊢ (∮ (z : ℂ) in C(c, R), f z • a) = (∮ (z : ℂ) in C(c, R), f z) • a\n[PROOFSTEP]\nsimp only [circleIntegral, intervalIntegral.integral_smul_const, ← smul_assoc]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nhR : R ≠ 0\n⊢ (∮ (z : ℂ) in C(c, R), (z - c)⁻¹) = 2 * ↑π * I\n[PROOFSTEP]\nsimp [circleIntegral, ← div_eq_mul_inv, mul_div_cancel_left _ (circleMap_ne_center hR),\n  -- porting note: `simp` didn't need a hint to apply `integral_const` hereintervalIntegral.integral_const I]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf f' : ℂ → E\nc : ℂ\nR : ℝ\nh : ∀ (z : ℂ), z ∈ sphere c |R| → HasDerivWithinAt f (f' z) (sphere c |R|) z\n⊢ (∮ (z : ℂ) in C(c, R), f' z) = 0\n[PROOFSTEP]\nby_cases hi : CircleIntegrable f' c R\n[GOAL]\ncase pos\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf f' : ℂ → E\nc : ℂ\nR : ℝ\nh : ∀ (z : ℂ), z ∈ sphere c |R| → HasDerivWithinAt f (f' z) (sphere c |R|) z\nhi : CircleIntegrable f' c R\n⊢ (∮ (z : ℂ) in C(c, R), f' z) = 0\n[PROOFSTEP]\nrw [← sub_eq_zero.2 ((periodic_circleMap c R).comp f).eq]\n[GOAL]\ncase pos\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf f' : ℂ → E\nc : ℂ\nR : ℝ\nh : ∀ (z : ℂ), z ∈ sphere c |R| → HasDerivWithinAt f (f' z) (sphere c |R|) z\nhi : CircleIntegrable f' c R\n⊢ (∮ (z : ℂ) in C(c, R), f' z) = (f ∘ circleMap c R) (2 * π) - (f ∘ circleMap c R) 0\n[PROOFSTEP]\nrefine' intervalIntegral.integral_eq_sub_of_hasDerivAt (fun θ _ => _) hi.out\n[GOAL]\ncase pos\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf f' : ℂ → E\nc : ℂ\nR : ℝ\nh : ∀ (z : ℂ), z ∈ sphere c |R| → HasDerivWithinAt f (f' z) (sphere c |R|) z\nhi : CircleIntegrable f' c R\nθ : ℝ\nx✝ : θ ∈ [[0, 2 * π]]\n⊢ HasDerivAt (f ∘ circleMap c R) (deriv (circleMap c R) θ • (fun z => f' z) (circleMap c R θ)) θ\n[PROOFSTEP]\nexact\n  (h _ (circleMap_mem_sphere' _ _ _)).scomp_hasDerivAt θ (differentiable_circleMap _ _ _).hasDerivAt\n    (circleMap_mem_sphere' _ _)\n[GOAL]\ncase neg\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf f' : ℂ → E\nc : ℂ\nR : ℝ\nh : ∀ (z : ℂ), z ∈ sphere c |R| → HasDerivWithinAt f (f' z) (sphere c |R|) z\nhi : ¬CircleIntegrable f' c R\n⊢ (∮ (z : ℂ) in C(c, R), f' z) = 0\n[PROOFSTEP]\nexact integral_undef hi\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nc w : ℂ\nR : ℝ\nhn : n < 0\nhw : w ∈ sphere c |R|\n⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0\n[PROOFSTEP]\nrcases eq_or_ne R 0 with (rfl | h0)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nc w : ℂ\nhn : n < 0\nhw : w ∈ sphere c |0|\n⊢ (∮ (z : ℂ) in C(c, 0), (z - w) ^ n) = 0\n[PROOFSTEP]\napply integral_radius_zero\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nc w : ℂ\nR : ℝ\nhn : n < 0\nhw : w ∈ sphere c |R|\nh0 : R ≠ 0\n⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0\n[PROOFSTEP]\napply integral_undef\n[GOAL]\ncase inr.hf\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nc w : ℂ\nR : ℝ\nhn : n < 0\nhw : w ∈ sphere c |R|\nh0 : R ≠ 0\n⊢ ¬CircleIntegrable (fun z => (z - w) ^ n) c R\n[PROOFSTEP]\nsimpa [circleIntegrable_sub_zpow_iff, *, not_or]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn : n ≠ -1\nc w : ℂ\nR : ℝ\n⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0\n[PROOFSTEP]\nrcases em (w ∈ sphere c |R| ∧ n < -1) with (⟨hw, hn⟩ | H)\n[GOAL]\ncase inl.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn✝ : n ≠ -1\nc w : ℂ\nR : ℝ\nhw : w ∈ sphere c |R|\nhn : n < -1\n⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0\n[PROOFSTEP]\nexact integral_sub_zpow_of_undef (hn.trans (by decide)) hw\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn✝ : n ≠ -1\nc w : ℂ\nR : ℝ\nhw : w ∈ sphere c |R|\nhn : n < -1\n⊢ -1 < 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn : n ≠ -1\nc w : ℂ\nR : ℝ\nH : ¬(w ∈ sphere c |R| ∧ n < -1)\n⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0\n[PROOFSTEP]\npush_neg at H \n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn : n ≠ -1\nc w : ℂ\nR : ℝ\nH : w ∈ sphere c |R| → -1 ≤ n\n⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0\n[PROOFSTEP]\nhave hd : ∀ z, z ≠ w ∨ -1 ≤ n → HasDerivAt (fun z => (z - w) ^ (n + 1) / (n + 1)) ((z - w) ^ n) z :=\n  by\n  intro z hne\n  convert ((hasDerivAt_zpow (n + 1) _ (hne.imp _ _)).comp z ((hasDerivAt_id z).sub_const w)).div_const _ using 1\n  · have hn' : (n + 1 : ℂ) ≠ 0 := by rwa [Ne, ← eq_neg_iff_add_eq_zero, ← Int.cast_one, ← Int.cast_neg, Int.cast_inj]\n    simp [mul_assoc, mul_div_cancel_left _ hn']\n  exacts [sub_ne_zero.2, neg_le_iff_add_nonneg.1]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn : n ≠ -1\nc w : ℂ\nR : ℝ\nH : w ∈ sphere c |R| → -1 ≤ n\n⊢ ∀ (z : ℂ), z ≠ w ∨ -1 ≤ n → HasDerivAt (fun z => (z - w) ^ (n + 1) / (↑n + 1)) ((z - w) ^ n) z\n[PROOFSTEP]\nintro z hne\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn : n ≠ -1\nc w : ℂ\nR : ℝ\nH : w ∈ sphere c |R| → -1 ≤ n\nz : ℂ\nhne : z ≠ w ∨ -1 ≤ n\n⊢ HasDerivAt (fun z => (z - w) ^ (n + 1) / (↑n + 1)) ((z - w) ^ n) z\n[PROOFSTEP]\nconvert ((hasDerivAt_zpow (n + 1) _ (hne.imp _ _)).comp z ((hasDerivAt_id z).sub_const w)).div_const _ using 1\n[GOAL]\ncase h.e'_7\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn : n ≠ -1\nc w : ℂ\nR : ℝ\nH : w ∈ sphere c |R| → -1 ≤ n\nz : ℂ\nhne : z ≠ w ∨ -1 ≤ n\n⊢ (z - w) ^ n = ↑(n + 1) * (id z - w) ^ (n + 1 - 1) * 1 / (↑n + 1)\n[PROOFSTEP]\nhave hn' : (n + 1 : ℂ) ≠ 0 := by rwa [Ne, ← eq_neg_iff_add_eq_zero, ← Int.cast_one, ← Int.cast_neg, Int.cast_inj]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn : n ≠ -1\nc w : ℂ\nR : ℝ\nH : w ∈ sphere c |R| → -1 ≤ n\nz : ℂ\nhne : z ≠ w ∨ -1 ≤ n\n⊢ ↑n + 1 ≠ 0\n[PROOFSTEP]\nrwa [Ne, ← eq_neg_iff_add_eq_zero, ← Int.cast_one, ← Int.cast_neg, Int.cast_inj]\n[GOAL]\ncase h.e'_7\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn : n ≠ -1\nc w : ℂ\nR : ℝ\nH : w ∈ sphere c |R| → -1 ≤ n\nz : ℂ\nhne : z ≠ w ∨ -1 ≤ n\nhn' : ↑n + 1 ≠ 0\n⊢ (z - w) ^ n = ↑(n + 1) * (id z - w) ^ (n + 1 - 1) * 1 / (↑n + 1)\n[PROOFSTEP]\nsimp [mul_assoc, mul_div_cancel_left _ hn']\n[GOAL]\ncase convert_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn : n ≠ -1\nc w : ℂ\nR : ℝ\nH : w ∈ sphere c |R| → -1 ≤ n\nz : ℂ\nhne : z ≠ w ∨ -1 ≤ n\n⊢ z ≠ w → id z - w ≠ 0\ncase convert_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn : n ≠ -1\nc w : ℂ\nR : ℝ\nH : w ∈ sphere c |R| → -1 ≤ n\nz : ℂ\nhne : z ≠ w ∨ -1 ≤ n\n⊢ -1 ≤ n → 0 ≤ n + 1\n[PROOFSTEP]\nexacts [sub_ne_zero.2, neg_le_iff_add_nonneg.1]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn : n ≠ -1\nc w : ℂ\nR : ℝ\nH : w ∈ sphere c |R| → -1 ≤ n\nhd : ∀ (z : ℂ), z ≠ w ∨ -1 ≤ n → HasDerivAt (fun z => (z - w) ^ (n + 1) / (↑n + 1)) ((z - w) ^ n) z\n⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0\n[PROOFSTEP]\nrefine' integral_eq_zero_of_hasDerivWithinAt' fun z hz => (hd z _).hasDerivWithinAt\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nn : ℤ\nhn : n ≠ -1\nc w : ℂ\nR : ℝ\nH : w ∈ sphere c |R| → -1 ≤ n\nhd : ∀ (z : ℂ), z ≠ w ∨ -1 ≤ n → HasDerivAt (fun z => (z - w) ^ (n + 1) / (↑n + 1)) ((z - w) ^ n) z\nz : ℂ\nhz : z ∈ sphere c |R|\n⊢ z ≠ w ∨ -1 ≤ n\n[PROOFSTEP]\nexact (ne_or_eq z w).imp_right fun (h : z = w) => H <| h ▸ hz\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nn : ℕ\nw : ℂ\n⊢ (↑(cauchyPowerSeries f c R n) fun x => w) = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (w / (z - c)) ^ n • (z - c)⁻¹ • f z\n[PROOFSTEP]\nsimp only [cauchyPowerSeries, ContinuousMultilinearMap.mkPiField_apply, Fin.prod_const, div_eq_mul_inv, mul_pow,\n  mul_smul, circleIntegral.integral_smul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nn : ℕ\nw : ℂ\n⊢ (w ^ n • (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - c)⁻¹ ^ n • (z - c)⁻¹ • f z) =\n    (2 * ↑π * I)⁻¹ • w ^ n • ∮ (z : ℂ) in C(c, R), (z - c)⁻¹ ^ n • (z - c)⁻¹ • f z\n[PROOFSTEP]\nrw [← smul_comm (w ^ n)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nn : ℕ\n⊢ ‖cauchyPowerSeries f c R n‖ = (2 * π)⁻¹ * ‖∮ (z : ℂ) in C(c, R), (z - c)⁻¹ ^ n • (z - c)⁻¹ • f z‖\n[PROOFSTEP]\nsimp [cauchyPowerSeries, norm_smul, Real.pi_pos.le]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nn : ℕ\n⊢ 0 ≤ (2 * π)⁻¹\n[PROOFSTEP]\nsimp [Real.pi_pos.le]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nn : ℕ\n⊢ (2 * π)⁻¹ *\n      ∫ (θ : ℝ) in 0 ..2 * π,\n        ‖deriv (circleMap c R) θ • (circleMap c R θ - c)⁻¹ ^ n • (circleMap c R θ - c)⁻¹ • f (circleMap c R θ)‖ =\n    (2 * π)⁻¹ * (|R|⁻¹ ^ n * (|R| * (|R|⁻¹ * ∫ (x : ℝ) in 0 ..2 * π, ‖f (circleMap c R x)‖)))\n[PROOFSTEP]\nsimp [norm_smul, mul_left_comm |R|]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nn : ℕ\n⊢ (2 * π)⁻¹ * (|R|⁻¹ ^ n * (|R| * (|R|⁻¹ * ∫ (x : ℝ) in 0 ..2 * π, ‖f (circleMap c R x)‖))) ≤\n    ((2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c R θ)‖) * |R|⁻¹ ^ n\n[PROOFSTEP]\nrcases eq_or_ne R 0 with (rfl | hR)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nn : ℕ\n⊢ (2 * π)⁻¹ * (|0|⁻¹ ^ n * (|0| * (|0|⁻¹ * ∫ (x : ℝ) in 0 ..2 * π, ‖f (circleMap c 0 x)‖))) ≤\n    ((2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c 0 θ)‖) * |0|⁻¹ ^ n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase inl.zero\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\n⊢ (2 * π)⁻¹ * (|0|⁻¹ ^ Nat.zero * (|0| * (|0|⁻¹ * ∫ (x : ℝ) in 0 ..2 * π, ‖f (circleMap c 0 x)‖))) ≤\n    ((2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c 0 θ)‖) * |0|⁻¹ ^ Nat.zero\n[PROOFSTEP]\nsimp [-mul_inv_rev]\n[GOAL]\ncase inl.succ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nn✝ : ℕ\n⊢ (2 * π)⁻¹ * (|0|⁻¹ ^ Nat.succ n✝ * (|0| * (|0|⁻¹ * ∫ (x : ℝ) in 0 ..2 * π, ‖f (circleMap c 0 x)‖))) ≤\n    ((2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c 0 θ)‖) * |0|⁻¹ ^ Nat.succ n✝\n[PROOFSTEP]\nsimp [-mul_inv_rev]\n[GOAL]\ncase inl.zero\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\n⊢ 0 ≤ (2 * π)⁻¹ * (2 * π * ‖f c‖)\n[PROOFSTEP]\nrw [← mul_assoc, inv_mul_cancel (Real.two_pi_pos.ne.symm), one_mul]\n[GOAL]\ncase inl.zero\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\n⊢ 0 ≤ ‖f c‖\n[PROOFSTEP]\napply norm_nonneg\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nn : ℕ\nhR : R ≠ 0\n⊢ (2 * π)⁻¹ * (|R|⁻¹ ^ n * (|R| * (|R|⁻¹ * ∫ (x : ℝ) in 0 ..2 * π, ‖f (circleMap c R x)‖))) ≤\n    ((2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c R θ)‖) * |R|⁻¹ ^ n\n[PROOFSTEP]\nrw [mul_inv_cancel_left₀, mul_assoc, mul_comm (|R|⁻¹ ^ n)]\n[GOAL]\ncase inr.h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nn : ℕ\nhR : R ≠ 0\n⊢ |R| ≠ 0\n[PROOFSTEP]\nrwa [Ne.def, _root_.abs_eq_zero]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\n⊢ ↑R ≤ FormalMultilinearSeries.radius (cauchyPowerSeries f c ↑R)\n[PROOFSTEP]\nrefine'\n  (cauchyPowerSeries f c R).le_radius_of_bound ((2 * π)⁻¹ * ∫ θ : ℝ in (0)..2 * π, ‖f (circleMap c R θ)‖) fun n => _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\nn : ℕ\n⊢ ‖cauchyPowerSeries f c (↑R) n‖ * ↑R ^ n ≤ (2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖\n[PROOFSTEP]\nrefine' (mul_le_mul_of_nonneg_right (norm_cauchyPowerSeries_le _ _ _ _) (pow_nonneg R.coe_nonneg _)).trans _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\nn : ℕ\n⊢ ((2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖) * |↑R|⁻¹ ^ n * ↑R ^ n ≤\n    (2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖\n[PROOFSTEP]\nrw [_root_.abs_of_nonneg R.coe_nonneg]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\nn : ℕ\n⊢ ((2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖) * (↑R)⁻¹ ^ n * ↑R ^ n ≤\n    (2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖\n[PROOFSTEP]\ncases' eq_or_ne (R ^ n : ℝ) 0 with hR hR\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\nn : ℕ\nhR : ↑(R ^ n) = 0\n⊢ ((2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖) * (↑R)⁻¹ ^ n * ↑R ^ n ≤\n    (2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖\n[PROOFSTEP]\nrw_mod_cast [hR, mul_zero]\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\nn : ℕ\nhR : R ^ n = 0\n⊢ 0 ≤ (2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖\n[PROOFSTEP]\nexact\n  mul_nonneg (inv_nonneg.2 Real.two_pi_pos.le)\n    (intervalIntegral.integral_nonneg Real.two_pi_pos.le fun _ _ => norm_nonneg _)\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\nn : ℕ\nhR : ↑(R ^ n) ≠ 0\n⊢ ((2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖) * (↑R)⁻¹ ^ n * ↑R ^ n ≤\n    (2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖\n[PROOFSTEP]\nrw [inv_pow]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\nn : ℕ\nhR : ↑(R ^ n) ≠ 0\n⊢ ((2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖) * (↑R ^ n)⁻¹ * ↑R ^ n ≤\n    (2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖\n[PROOFSTEP]\nhave : (R : ℝ) ^ n ≠ 0 := by norm_cast at hR ⊢\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\nn : ℕ\nhR : ↑(R ^ n) ≠ 0\n⊢ ↑R ^ n ≠ 0\n[PROOFSTEP]\nnorm_cast at hR ⊢\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\nn : ℕ\nhR : ↑(R ^ n) ≠ 0\nthis : ↑R ^ n ≠ 0\n⊢ ((2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖) * (↑R ^ n)⁻¹ * ↑R ^ n ≤\n    (2 * π)⁻¹ * ∫ (θ : ℝ) in 0 ..2 * π, ‖f (circleMap c (↑R) θ)‖\n[PROOFSTEP]\nrw [inv_mul_cancel_right₀ this]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\n⊢ HasSum (fun n => ∮ (z : ℂ) in C(c, R), (w / (z - c)) ^ n • (z - c)⁻¹ • f z)\n    (∮ (z : ℂ) in C(c, R), (z - (c + w))⁻¹ • f z)\n[PROOFSTEP]\nhave hR : 0 < R := (Complex.abs.nonneg w).trans_lt hw\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\n⊢ HasSum (fun n => ∮ (z : ℂ) in C(c, R), (w / (z - c)) ^ n • (z - c)⁻¹ • f z)\n    (∮ (z : ℂ) in C(c, R), (z - (c + w))⁻¹ • f z)\n[PROOFSTEP]\nhave hwR : abs w / R ∈ Ico (0 : ℝ) 1 := ⟨div_nonneg (Complex.abs.nonneg w) hR.le, (div_lt_one hR).2 hw⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\n⊢ HasSum (fun n => ∮ (z : ℂ) in C(c, R), (w / (z - c)) ^ n • (z - c)⁻¹ • f z)\n    (∮ (z : ℂ) in C(c, R), (z - (c + w))⁻¹ • f z)\n[PROOFSTEP]\nrefine'\n  intervalIntegral.hasSum_integral_of_dominated_convergence (fun n θ => ‖f (circleMap c R θ)‖ * (abs w / R) ^ n)\n    (fun n => _) (fun n => _) _ _ _\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nn : ℕ\n⊢ AEStronglyMeasurable\n    (fun θ => deriv (circleMap c R) θ • (fun z => (w / (z - c)) ^ n • (z - c)⁻¹ • f z) (circleMap c R θ))\n    (Measure.restrict volume (Ι 0 (2 * π)))\n[PROOFSTEP]\nsimp only [deriv_circleMap]\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nn : ℕ\n⊢ AEStronglyMeasurable\n    (fun θ => (circleMap 0 R θ * I) • (w / (circleMap c R θ - c)) ^ n • (circleMap c R θ - c)⁻¹ • f (circleMap c R θ))\n    (Measure.restrict volume (Ι 0 (2 * π)))\n[PROOFSTEP]\napply_rules [AEStronglyMeasurable.smul, hf.def.1]\n[GOAL]\ncase refine'_1.hf\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nn : ℕ\n⊢ AEStronglyMeasurable (fun x => circleMap 0 R x * I) (Measure.restrict volume (Ι 0 (2 * π)))\n[PROOFSTEP]\napply Measurable.aestronglyMeasurable\n[GOAL]\ncase refine'_1.hg.hf\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nn : ℕ\n⊢ AEStronglyMeasurable (fun x => (w / (circleMap c R x - c)) ^ n) (Measure.restrict volume (Ι 0 (2 * π)))\n[PROOFSTEP]\napply Measurable.aestronglyMeasurable\n[GOAL]\ncase refine'_1.hg.hg.hf\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nn : ℕ\n⊢ AEStronglyMeasurable (fun x => (circleMap c R x - c)⁻¹) (Measure.restrict volume (Ι 0 (2 * π)))\n[PROOFSTEP]\napply Measurable.aestronglyMeasurable\n[GOAL]\ncase refine'_1.hf.hf\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nn : ℕ\n⊢ Measurable fun x => circleMap 0 R x * I\n[PROOFSTEP]\nexact (measurable_circleMap 0 R).mul_const I\n[GOAL]\ncase refine'_1.hg.hf.hf\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nn : ℕ\n⊢ Measurable fun x => (w / (circleMap c R x - c)) ^ n\n[PROOFSTEP]\nexact (((measurable_circleMap c R).sub measurable_const).const_div w).pow measurable_const\n[GOAL]\ncase refine'_1.hg.hg.hf.hf\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nn : ℕ\n⊢ Measurable fun x => (circleMap c R x - c)⁻¹\n[PROOFSTEP]\nexact ((measurable_circleMap c R).sub measurable_const).inv\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nn : ℕ\n⊢ ∀ᵐ (t : ℝ),\n    t ∈ Ι 0 (2 * π) →\n      ‖deriv (circleMap c R) t • (fun z => (w / (z - c)) ^ n • (z - c)⁻¹ • f z) (circleMap c R t)‖ ≤\n        (fun n θ => ‖f (circleMap c R θ)‖ * (↑Complex.abs w / R) ^ n) n t\n[PROOFSTEP]\nsimp [norm_smul, abs_of_pos hR, mul_left_comm R, inv_mul_cancel_left₀ hR.ne', mul_comm ‖_‖]\n[GOAL]\ncase refine'_3\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\n⊢ ∀ᵐ (t : ℝ), t ∈ Ι 0 (2 * π) → Summable fun n => (fun n θ => ‖f (circleMap c R θ)‖ * (↑Complex.abs w / R) ^ n) n t\n[PROOFSTEP]\nexact eventually_of_forall fun _ _ => (summable_geometric_of_lt_1 hwR.1 hwR.2).mul_left _\n[GOAL]\ncase refine'_4\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\n⊢ IntervalIntegrable (fun t => ∑' (n : ℕ), (fun n θ => ‖f (circleMap c R θ)‖ * (↑Complex.abs w / R) ^ n) n t) volume 0\n    (2 * π)\n[PROOFSTEP]\nsimpa only [tsum_mul_left, tsum_geometric_of_lt_1 hwR.1 hwR.2] using hf.norm.mul_continuousOn continuousOn_const\n[GOAL]\ncase refine'_5\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\n⊢ ∀ᵐ (t : ℝ),\n    t ∈ Ι 0 (2 * π) →\n      HasSum (fun n => deriv (circleMap c R) t • (fun z => (w / (z - c)) ^ n • (z - c)⁻¹ • f z) (circleMap c R t))\n        (deriv (circleMap c R) t • (fun z => (z - (c + w))⁻¹ • f z) (circleMap c R t))\n[PROOFSTEP]\nrefine' eventually_of_forall fun θ _ => HasSum.const_smul _ _\n[GOAL]\ncase refine'_5\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nθ : ℝ\nx✝ : θ ∈ Ι 0 (2 * π)\n⊢ HasSum (fun n => (fun z => (w / (z - c)) ^ n • (z - c)⁻¹ • f z) (circleMap c R θ))\n    ((fun z => (z - (c + w))⁻¹ • f z) (circleMap c R θ))\n[PROOFSTEP]\nsimp only [smul_smul]\n[GOAL]\ncase refine'_5\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nθ : ℝ\nx✝ : θ ∈ Ι 0 (2 * π)\n⊢ HasSum (fun n => ((w / (circleMap c R θ - c)) ^ n * (circleMap c R θ - c)⁻¹) • f (circleMap c R θ))\n    ((circleMap c R θ - (c + w))⁻¹ • f (circleMap c R θ))\n[PROOFSTEP]\nrefine' HasSum.smul_const _ _\n[GOAL]\ncase refine'_5\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nθ : ℝ\nx✝ : θ ∈ Ι 0 (2 * π)\n⊢ HasSum (fun n => (w / (circleMap c R θ - c)) ^ n * (circleMap c R θ - c)⁻¹) (circleMap c R θ - (c + w))⁻¹\n[PROOFSTEP]\nhave : ‖w / (circleMap c R θ - c)‖ < 1 := by simpa [abs_of_pos hR] using hwR.2\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nθ : ℝ\nx✝ : θ ∈ Ι 0 (2 * π)\n⊢ ‖w / (circleMap c R θ - c)‖ < 1\n[PROOFSTEP]\nsimpa [abs_of_pos hR] using hwR.2\n[GOAL]\ncase refine'_5\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nθ : ℝ\nx✝ : θ ∈ Ι 0 (2 * π)\nthis : ‖w / (circleMap c R θ - c)‖ < 1\n⊢ HasSum (fun n => (w / (circleMap c R θ - c)) ^ n * (circleMap c R θ - c)⁻¹) (circleMap c R θ - (c + w))⁻¹\n[PROOFSTEP]\nconvert (hasSum_geometric_of_norm_lt_1 this).mul_right _ using 1\n[GOAL]\ncase h.e'_6\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\nhR : 0 < R\nhwR : ↑Complex.abs w / R ∈ Ico 0 1\nθ : ℝ\nx✝ : θ ∈ Ι 0 (2 * π)\nthis : ‖w / (circleMap c R θ - c)‖ < 1\n⊢ (circleMap c R θ - (c + w))⁻¹ = (1 - w / (circleMap c R θ - c))⁻¹ * (circleMap c R θ - c)⁻¹\n[PROOFSTEP]\nsimp [← sub_sub, ← mul_inv, sub_mul, div_mul_cancel _ (circleMap_ne_center hR.ne')]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\n⊢ HasSum (fun n => ↑(cauchyPowerSeries f c R n) fun x => w)\n    ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - (c + w))⁻¹ • f z)\n[PROOFSTEP]\nsimp only [cauchyPowerSeries_apply]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ\nw : ℂ\nhf : CircleIntegrable f c R\nhw : ↑Complex.abs w < R\n⊢ HasSum (fun n => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (w / (z - c)) ^ n • (z - c)⁻¹ • f z)\n    ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - (c + w))⁻¹ • f z)\n[PROOFSTEP]\nexact (hasSum_two_pi_I_cauchyPowerSeries_integral hf hw).const_smul _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\nhf : CircleIntegrable f c ↑R\nhR : 0 < R\ny✝ : ℂ\nhy : y✝ ∈ EMetric.ball 0 ↑R\n⊢ HasSum (fun n => ↑(cauchyPowerSeries f c (↑R) n) fun x => y✝)\n    ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - (c + y✝))⁻¹ • f z)\n[PROOFSTEP]\nrefine' hasSum_cauchyPowerSeries_integral hf _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\nhf : CircleIntegrable f c ↑R\nhR : 0 < R\ny✝ : ℂ\nhy : y✝ ∈ EMetric.ball 0 ↑R\n⊢ ↑Complex.abs y✝ < ↑R\n[PROOFSTEP]\nrw [← norm_eq_abs, ← coe_nnnorm, NNReal.coe_lt_coe, ← ENNReal.coe_lt_coe]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\nR : ℝ≥0\nhf : CircleIntegrable f c ↑R\nhR : 0 < R\ny✝ : ℂ\nhy : y✝ ∈ EMetric.ball 0 ↑R\n⊢ ↑‖y✝‖₊ < ↑R\n[PROOFSTEP]\nexact mem_emetric_ball_zero_iff.1 hy\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹) = 2 * ↑π * I\n[PROOFSTEP]\nhave hR : 0 < R := dist_nonneg.trans_lt hw\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹) = 2 * ↑π * I\n[PROOFSTEP]\nsuffices H : HasSum (fun n : ℕ => ∮ z in C(c, R), ((w - c) / (z - c)) ^ n * (z - c)⁻¹) (2 * π * I)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\nH : HasSum (fun n => ∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ n * (z - c)⁻¹) (2 * ↑π * I)\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹) = 2 * ↑π * I\n[PROOFSTEP]\nhave A : CircleIntegrable (fun _ => (1 : ℂ)) c R := continuousOn_const.circleIntegrable'\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\nH : HasSum (fun n => ∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ n * (z - c)⁻¹) (2 * ↑π * I)\nA : CircleIntegrable (fun x => 1) c R\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹) = 2 * ↑π * I\n[PROOFSTEP]\nrefine' (H.unique _).symm\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\nH : HasSum (fun n => ∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ n * (z - c)⁻¹) (2 * ↑π * I)\nA : CircleIntegrable (fun x => 1) c R\n⊢ HasSum (fun n => ∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ n * (z - c)⁻¹) (∮ (z : ℂ) in C(c, R), (z - w)⁻¹)\n[PROOFSTEP]\nsimpa only [smul_eq_mul, mul_one, add_sub_cancel'_right] using hasSum_two_pi_I_cauchyPowerSeries_integral A hw\n[GOAL]\ncase H\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\n⊢ HasSum (fun n => ∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ n * (z - c)⁻¹) (2 * ↑π * I)\n[PROOFSTEP]\nhave H : ∀ n : ℕ, n ≠ 0 → (∮ z in C(c, R), (z - c) ^ (-n - 1 : ℤ)) = 0 := by\n  refine' fun n hn => integral_sub_zpow_of_ne _ _ _ _; simpa\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\n⊢ ∀ (n : ℕ), n ≠ 0 → (∮ (z : ℂ) in C(c, R), (z - c) ^ (-↑n - 1)) = 0\n[PROOFSTEP]\nrefine' fun n hn => integral_sub_zpow_of_ne _ _ _ _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\nn : ℕ\nhn : n ≠ 0\n⊢ -↑n - 1 ≠ -1\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase H\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\nH : ∀ (n : ℕ), n ≠ 0 → (∮ (z : ℂ) in C(c, R), (z - c) ^ (-↑n - 1)) = 0\n⊢ HasSum (fun n => ∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ n * (z - c)⁻¹) (2 * ↑π * I)\n[PROOFSTEP]\nhave : (∮ z in C(c, R), ((w - c) / (z - c)) ^ 0 * (z - c)⁻¹) = 2 * π * I := by simp [hR.ne']\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\nH : ∀ (n : ℕ), n ≠ 0 → (∮ (z : ℂ) in C(c, R), (z - c) ^ (-↑n - 1)) = 0\n⊢ (∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ 0 * (z - c)⁻¹) = 2 * ↑π * I\n[PROOFSTEP]\nsimp [hR.ne']\n[GOAL]\ncase H\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\nH : ∀ (n : ℕ), n ≠ 0 → (∮ (z : ℂ) in C(c, R), (z - c) ^ (-↑n - 1)) = 0\nthis : (∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ 0 * (z - c)⁻¹) = 2 * ↑π * I\n⊢ HasSum (fun n => ∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ n * (z - c)⁻¹) (2 * ↑π * I)\n[PROOFSTEP]\nrefine' this ▸ hasSum_single _ fun n hn => _\n[GOAL]\ncase H\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\nH : ∀ (n : ℕ), n ≠ 0 → (∮ (z : ℂ) in C(c, R), (z - c) ^ (-↑n - 1)) = 0\nthis : (∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ 0 * (z - c)⁻¹) = 2 * ↑π * I\nn : ℕ\nhn : n ≠ 0\n⊢ (∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ n * (z - c)⁻¹) = 0\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, mul_pow, integral_const_mul, mul_assoc]\n[GOAL]\ncase H\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\nH : ∀ (n : ℕ), n ≠ 0 → (∮ (z : ℂ) in C(c, R), (z - c) ^ (-↑n - 1)) = 0\nthis : (∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ 0 * (z - c)⁻¹) = 2 * ↑π * I\nn : ℕ\nhn : n ≠ 0\n⊢ ((w - c) ^ n * ∮ (z : ℂ) in C(c, R), (z - c)⁻¹ ^ n * (z - c)⁻¹) = 0\n[PROOFSTEP]\nrw [(integral_congr hR.le fun z hz => _).trans (H n hn), mul_zero]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\nH : ∀ (n : ℕ), n ≠ 0 → (∮ (z : ℂ) in C(c, R), (z - c) ^ (-↑n - 1)) = 0\nthis : (∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ 0 * (z - c)⁻¹) = 2 * ↑π * I\nn : ℕ\nhn : n ≠ 0\n⊢ ∀ (z : ℂ), z ∈ sphere c R → (z - c)⁻¹ ^ n * (z - c)⁻¹ = (z - c) ^ (-↑n - 1)\n[PROOFSTEP]\nintro z _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nR : ℝ\nhw : w ∈ ball c R\nhR : 0 < R\nH : ∀ (n : ℕ), n ≠ 0 → (∮ (z : ℂ) in C(c, R), (z - c) ^ (-↑n - 1)) = 0\nthis : (∮ (z : ℂ) in C(c, R), ((w - c) / (z - c)) ^ 0 * (z - c)⁻¹) = 2 * ↑π * I\nn : ℕ\nhn : n ≠ 0\nz : ℂ\nhz✝ : z ∈ sphere c R\n⊢ (z - c)⁻¹ ^ n * (z - c)⁻¹ = (z - c) ^ (-↑n - 1)\n[PROOFSTEP]\nrw [← pow_succ', ← zpow_ofNat, inv_zpow, ← zpow_neg, Int.ofNat_succ, neg_add, sub_eq_add_neg _ (1 : ℤ)]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Integral.CircleIntegral", "llama_tokens": 34418, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6370307944803832, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.3532147608096485}}
{"text": "[GOAL]\n⊢ ∀ (x y : ZMod 4),\n    OneHom.toFun\n        { toFun := ![0, 1, 0, -1], map_one' := (_ : Matrix.vecCons 0 ![1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, -1] 1) }\n        (x * y) =\n      OneHom.toFun\n          { toFun := ![0, 1, 0, -1], map_one' := (_ : Matrix.vecCons 0 ![1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, -1] 1) }\n          x *\n        OneHom.toFun\n          { toFun := ![0, 1, 0, -1], map_one' := (_ : Matrix.vecCons 0 ![1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, -1] 1) }\n          y\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a : ZMod 4),\n    ¬IsUnit a →\n      OneHom.toFun\n          (↑{\n              toOneHom :=\n                { toFun := ![0, 1, 0, -1],\n                  map_one' := (_ : Matrix.vecCons 0 ![1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, -1] 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : ZMod 4),\n                    OneHom.toFun\n                        { toFun := ![0, 1, 0, -1],\n                          map_one' := (_ : Matrix.vecCons 0 ![1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, -1] 1) }\n                        (x * y) =\n                      OneHom.toFun\n                          { toFun := ![0, 1, 0, -1],\n                            map_one' := (_ : Matrix.vecCons 0 ![1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, -1] 1) }\n                          x *\n                        OneHom.toFun\n                          { toFun := ![0, 1, 0, -1],\n                            map_one' := (_ : Matrix.vecCons 0 ![1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, -1] 1) }\n                          y) })\n          a =\n        0\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ MulChar.IsQuadratic χ₄\n[PROOFSTEP]\nintro a\n[GOAL]\na : ZMod 4\n⊢ ↑χ₄ a = 0 ∨ ↑χ₄ a = 1 ∨ ↑χ₄ a = -1\n[PROOFSTEP]\nfin_cases a\n[GOAL]\ncase head\n⊢ ↑χ₄ { val := 0, isLt := (_ : 0 < 3 + 1) } = 0 ∨\n    ↑χ₄ { val := 0, isLt := (_ : 0 < 3 + 1) } = 1 ∨ ↑χ₄ { val := 0, isLt := (_ : 0 < 3 + 1) } = -1\ncase tail.head\n⊢ ↑χ₄ { val := 1, isLt := (_ : (fun a => a < 3 + 1) 1) } = 0 ∨\n    ↑χ₄ { val := 1, isLt := (_ : (fun a => a < 3 + 1) 1) } = 1 ∨\n      ↑χ₄ { val := 1, isLt := (_ : (fun a => a < 3 + 1) 1) } = -1\ncase tail.tail.head\n⊢ ↑χ₄ { val := 2, isLt := (_ : (fun a => (fun a => a < 3 + 1) a) 2) } = 0 ∨\n    ↑χ₄ { val := 2, isLt := (_ : (fun a => (fun a => a < 3 + 1) a) 2) } = 1 ∨\n      ↑χ₄ { val := 2, isLt := (_ : (fun a => (fun a => a < 3 + 1) a) 2) } = -1\ncase tail.tail.tail.head\n⊢ ↑χ₄ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 3 + 1) a) a) 3) } = 0 ∨\n    ↑χ₄ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 3 + 1) a) a) 3) } = 1 ∨\n      ↑χ₄ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 3 + 1) a) a) 3) } = -1\n[PROOFSTEP]\nall_goals decide\n[GOAL]\ncase head\n⊢ ↑χ₄ { val := 0, isLt := (_ : 0 < 3 + 1) } = 0 ∨\n    ↑χ₄ { val := 0, isLt := (_ : 0 < 3 + 1) } = 1 ∨ ↑χ₄ { val := 0, isLt := (_ : 0 < 3 + 1) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.head\n⊢ ↑χ₄ { val := 1, isLt := (_ : (fun a => a < 3 + 1) 1) } = 0 ∨\n    ↑χ₄ { val := 1, isLt := (_ : (fun a => a < 3 + 1) 1) } = 1 ∨\n      ↑χ₄ { val := 1, isLt := (_ : (fun a => a < 3 + 1) 1) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.head\n⊢ ↑χ₄ { val := 2, isLt := (_ : (fun a => (fun a => a < 3 + 1) a) 2) } = 0 ∨\n    ↑χ₄ { val := 2, isLt := (_ : (fun a => (fun a => a < 3 + 1) a) 2) } = 1 ∨\n      ↑χ₄ { val := 2, isLt := (_ : (fun a => (fun a => a < 3 + 1) a) 2) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.head\n⊢ ↑χ₄ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 3 + 1) a) a) 3) } = 0 ∨\n    ↑χ₄ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 3 + 1) a) a) 3) } = 1 ∨\n      ↑χ₄ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 3 + 1) a) a) 3) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℕ\n⊢ ↑χ₄ ↑n = ↑χ₄ ↑(n % 4)\n[PROOFSTEP]\nrw [← ZMod.nat_cast_mod n 4]\n[GOAL]\nn : ℤ\n⊢ ↑χ₄ ↑n = ↑χ₄ ↑(n % 4)\n[PROOFSTEP]\nrw [← ZMod.int_cast_mod n 4]\n[GOAL]\nn : ℤ\n⊢ ↑χ₄ ↑(n % ↑4) = ↑χ₄ ↑(n % 4)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn : ℤ\n⊢ ↑χ₄ ↑n = if n % 2 = 0 then 0 else if n % 4 = 1 then 1 else -1\n[PROOFSTEP]\nhave help : ∀ m : ℤ, 0 ≤ m → m < 4 → χ₄ m = if m % 2 = 0 then 0 else if m = 1 then 1 else -1 := by decide\n[GOAL]\nn : ℤ\n⊢ ∀ (m : ℤ), 0 ≤ m → m < 4 → ↑χ₄ ↑m = if m % 2 = 0 then 0 else if m = 1 then 1 else -1\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 4 → ↑χ₄ ↑m = if m % 2 = 0 then 0 else if m = 1 then 1 else -1\n⊢ ↑χ₄ ↑n = if n % 2 = 0 then 0 else if n % 4 = 1 then 1 else -1\n[PROOFSTEP]\nrw [← Int.emod_emod_of_dvd n (by norm_num : (2 : ℤ) ∣ 4), ← ZMod.int_cast_mod n 4]\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 4 → ↑χ₄ ↑m = if m % 2 = 0 then 0 else if m = 1 then 1 else -1\n⊢ 2 ∣ 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 4 → ↑χ₄ ↑m = if m % 2 = 0 then 0 else if m = 1 then 1 else -1\n⊢ ↑χ₄ ↑(n % ↑4) = if n % 4 % 2 = 0 then 0 else if n % 4 = 1 then 1 else -1\n[PROOFSTEP]\nexact help (n % 4) (Int.emod_nonneg n (by norm_num)) (Int.emod_lt n (by norm_num))\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 4 → ↑χ₄ ↑m = if m % 2 = 0 then 0 else if m = 1 then 1 else -1\n⊢ 4 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 4 → ↑χ₄ ↑m = if m % 2 = 0 then 0 else if m = 1 then 1 else -1\n⊢ 4 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\n⊢ ↑χ₄ ↑n = if n % 2 = 0 then 0 else if n % 4 = 1 then 1 else -1\n[PROOFSTEP]\nexact_mod_cast χ₄_int_eq_if_mod_four n\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n⊢ ↑χ₄ ↑n = (-1) ^ (n / 2)\n[PROOFSTEP]\nrw [χ₄_nat_eq_if_mod_four]\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n⊢ (if n % 2 = 0 then 0 else if n % 4 = 1 then 1 else -1) = (-1) ^ (n / 2)\n[PROOFSTEP]\nsimp only [hn, Nat.one_ne_zero, if_false]\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n⊢ (if n % 4 = 1 then 1 else -1) = (-1) ^ (n / 2)\n[PROOFSTEP]\nconv_rhs =>\n  -- Porting note: was `nth_rw`\n  arg 2; rw [← Nat.div_add_mod n 4]\n  enter [1, 1, 1]; rw [(by norm_num : 4 = 2 * 2)]\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n| (-1) ^ (n / 2)\n[PROOFSTEP]\n  arg 2; rw [← Nat.div_add_mod n 4]\n  enter [1, 1, 1]; rw [(by norm_num : 4 = 2 * 2)]\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n| (-1) ^ (n / 2)\n[PROOFSTEP]\n  arg 2; rw [← Nat.div_add_mod n 4]\n  enter [1, 1, 1]; rw [(by norm_num : 4 = 2 * 2)]\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n| (-1) ^ (n / 2)\n[PROOFSTEP]\narg 2\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n| n / 2\n[PROOFSTEP]\nrw [← Nat.div_add_mod n 4]\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n| (4 * (n / 4) + n % 4) / 2\n[PROOFSTEP]\nenter [1, 1, 1]\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n| 4\n[PROOFSTEP]\nrw [(by norm_num : 4 = 2 * 2)]\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n⊢ 4 = 2 * 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n⊢ (if n % 4 = 1 then 1 else -1) = (-1) ^ ((2 * 2 * (n / 4) + n % 4) / 2)\n[PROOFSTEP]\nrw [mul_assoc, add_comm, Nat.add_mul_div_left _ _ (by norm_num : 0 < 2), pow_add, pow_mul, neg_one_sq, one_pow, mul_one]\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n⊢ 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n⊢ (if n % 4 = 1 then 1 else -1) = (-1) ^ (n % 4 / 2)\n[PROOFSTEP]\nhave help : ∀ m : ℕ, m < 4 → m % 2 = 1 → ite (m = 1) (1 : ℤ) (-1) = (-1) ^ (m / 2) := by decide\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\n⊢ ∀ (m : ℕ), m < 4 → m % 2 = 1 → (if m = 1 then 1 else -1) = (-1) ^ (m / 2)\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\nhelp : ∀ (m : ℕ), m < 4 → m % 2 = 1 → (if m = 1 then 1 else -1) = (-1) ^ (m / 2)\n⊢ (if n % 4 = 1 then 1 else -1) = (-1) ^ (n % 4 / 2)\n[PROOFSTEP]\nexact help (n % 4) (Nat.mod_lt n (by norm_num)) ((Nat.mod_mod_of_dvd n (by norm_num : 2 ∣ 4)).trans hn)\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\nhelp : ∀ (m : ℕ), m < 4 → m % 2 = 1 → (if m = 1 then 1 else -1) = (-1) ^ (m / 2)\n⊢ 4 > 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\nhn : n % 2 = 1\nhelp : ∀ (m : ℕ), m < 4 → m % 2 = 1 → (if m = 1 then 1 else -1) = (-1) ^ (m / 2)\n⊢ 2 ∣ 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\nhn : n % 4 = 1\n⊢ ↑χ₄ ↑n = 1\n[PROOFSTEP]\nrw [χ₄_nat_mod_four, hn]\n[GOAL]\nn : ℕ\nhn : n % 4 = 1\n⊢ ↑χ₄ ↑1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nhn : n % 4 = 3\n⊢ ↑χ₄ ↑n = -1\n[PROOFSTEP]\nrw [χ₄_nat_mod_four, hn]\n[GOAL]\nn : ℕ\nhn : n % 4 = 3\n⊢ ↑χ₄ ↑3 = -1\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℤ\nhn : n % 4 = 1\n⊢ ↑χ₄ ↑n = 1\n[PROOFSTEP]\nrw [χ₄_int_mod_four, hn]\n[GOAL]\nn : ℤ\nhn : n % 4 = 1\n⊢ ↑χ₄ ↑1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℤ\nhn : n % 4 = 3\n⊢ ↑χ₄ ↑n = -1\n[PROOFSTEP]\nrw [χ₄_int_mod_four, hn]\n[GOAL]\nn : ℤ\nhn : n % 4 = 3\n⊢ ↑χ₄ ↑3 = -1\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nhn : n % 4 = 1\n⊢ (-1) ^ (n / 2) = 1\n[PROOFSTEP]\nrw [← χ₄_eq_neg_one_pow (Nat.odd_of_mod_four_eq_one hn), ← nat_cast_mod, hn]\n[GOAL]\nn : ℕ\nhn : n % 4 = 1\n⊢ ↑χ₄ ↑1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nhn : n % 4 = 3\n⊢ (-1) ^ (n / 2) = -1\n[PROOFSTEP]\nrw [← χ₄_eq_neg_one_pow (Nat.odd_of_mod_four_eq_three hn), ← nat_cast_mod, hn]\n[GOAL]\nn : ℕ\nhn : n % 4 = 3\n⊢ ↑χ₄ ↑3 = -1\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ∀ (x y : ZMod 8),\n    OneHom.toFun\n        { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],\n          map_one' := (_ : Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 = Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) }\n        (x * y) =\n      OneHom.toFun\n          { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],\n            map_one' :=\n              (_ : Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 = Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) }\n          x *\n        OneHom.toFun\n          { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],\n            map_one' :=\n              (_ : Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 = Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) }\n          y\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a : ZMod 8),\n    ¬IsUnit a →\n      OneHom.toFun\n          (↑{\n              toOneHom :=\n                { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],\n                  map_one' :=\n                    (_ : Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 = Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : ZMod 8),\n                    OneHom.toFun\n                        { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],\n                          map_one' :=\n                            (_ :\n                              Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 =\n                                Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) }\n                        (x * y) =\n                      OneHom.toFun\n                          { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],\n                            map_one' :=\n                              (_ :\n                                Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 =\n                                  Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) }\n                          x *\n                        OneHom.toFun\n                          { toFun := ![0, 1, 0, -1, 0, -1, 0, 1],\n                            map_one' :=\n                              (_ :\n                                Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1 =\n                                  Matrix.vecCons 0 ![1, 0, -1, 0, -1, 0, 1] 1) }\n                          y) })\n          a =\n        0\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ MulChar.IsQuadratic χ₈\n[PROOFSTEP]\nintro a\n[GOAL]\na : ZMod 8\n⊢ ↑χ₈ a = 0 ∨ ↑χ₈ a = 1 ∨ ↑χ₈ a = -1\n[PROOFSTEP]\nfin_cases a\n[GOAL]\ncase head\n⊢ ↑χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) } = 0 ∨\n    ↑χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) } = 1 ∨ ↑χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) } = -1\ncase tail.head\n⊢ ↑χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 0 ∨\n    ↑χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 1 ∨\n      ↑χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = -1\ncase tail.tail.head\n⊢ ↑χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 0 ∨\n    ↑χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 1 ∨\n      ↑χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = -1\ncase tail.tail.tail.head\n⊢ ↑χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 0 ∨\n    ↑χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 1 ∨\n      ↑χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = -1\ncase tail.tail.tail.tail.head\n⊢ ↑χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 0 ∨\n    ↑χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 1 ∨\n      ↑χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = -1\ncase tail.tail.tail.tail.tail.head\n⊢ ↑χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 0 ∨\n    ↑χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 1 ∨\n      ↑χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = -1\ncase tail.tail.tail.tail.tail.tail.head\n⊢ ↑χ₈\n        { val := 6,\n          isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n      0 ∨\n    ↑χ₈\n          { val := 6,\n            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n        1 ∨\n      ↑χ₈\n          { val := 6,\n            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n        -1\ncase tail.tail.tail.tail.tail.tail.tail.head\n⊢ ↑χ₈\n        { val := 7,\n          isLt :=\n            (_ :\n              (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a) 7) } =\n      0 ∨\n    ↑χ₈\n          { val := 7,\n            isLt :=\n              (_ :\n                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)\n                  7) } =\n        1 ∨\n      ↑χ₈\n          { val := 7,\n            isLt :=\n              (_ :\n                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)\n                  7) } =\n        -1\n[PROOFSTEP]\nall_goals decide\n[GOAL]\ncase head\n⊢ ↑χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) } = 0 ∨\n    ↑χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) } = 1 ∨ ↑χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.head\n⊢ ↑χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 0 ∨\n    ↑χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 1 ∨\n      ↑χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.head\n⊢ ↑χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 0 ∨\n    ↑χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 1 ∨\n      ↑χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.head\n⊢ ↑χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 0 ∨\n    ↑χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 1 ∨\n      ↑χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.tail.head\n⊢ ↑χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 0 ∨\n    ↑χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 1 ∨\n      ↑χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.tail.tail.head\n⊢ ↑χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 0 ∨\n    ↑χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 1 ∨\n      ↑χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.tail.tail.tail.head\n⊢ ↑χ₈\n        { val := 6,\n          isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n      0 ∨\n    ↑χ₈\n          { val := 6,\n            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n        1 ∨\n      ↑χ₈\n          { val := 6,\n            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n        -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.tail.tail.tail.tail.head\n⊢ ↑χ₈\n        { val := 7,\n          isLt :=\n            (_ :\n              (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a) 7) } =\n      0 ∨\n    ↑χ₈\n          { val := 7,\n            isLt :=\n              (_ :\n                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)\n                  7) } =\n        1 ∨\n      ↑χ₈\n          { val := 7,\n            isLt :=\n              (_ :\n                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)\n                  7) } =\n        -1\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℕ\n⊢ ↑χ₈ ↑n = ↑χ₈ ↑(n % 8)\n[PROOFSTEP]\nrw [← ZMod.nat_cast_mod n 8]\n[GOAL]\nn : ℤ\n⊢ ↑χ₈ ↑n = ↑χ₈ ↑(n % 8)\n[PROOFSTEP]\nrw [← ZMod.int_cast_mod n 8]\n[GOAL]\nn : ℤ\n⊢ ↑χ₈ ↑(n % ↑8) = ↑χ₈ ↑(n % 8)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn : ℤ\n⊢ ↑χ₈ ↑n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1\n[PROOFSTEP]\nhave help : ∀ m : ℤ, 0 ≤ m → m < 8 → χ₈ m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1 := by decide\n[GOAL]\nn : ℤ\n⊢ ∀ (m : ℤ), 0 ≤ m → m < 8 → ↑χ₈ ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 8 → ↑χ₈ ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1\n⊢ ↑χ₈ ↑n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1\n[PROOFSTEP]\nrw [← Int.emod_emod_of_dvd n (by norm_num : (2 : ℤ) ∣ 8), ← ZMod.int_cast_mod n 8]\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 8 → ↑χ₈ ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1\n⊢ 2 ∣ 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 8 → ↑χ₈ ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1\n⊢ ↑χ₈ ↑(n % ↑8) = if n % 8 % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1\n[PROOFSTEP]\nexact help (n % 8) (Int.emod_nonneg n (by norm_num)) (Int.emod_lt n (by norm_num))\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 8 → ↑χ₈ ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1\n⊢ 8 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 8 → ↑χ₈ ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 7 then 1 else -1\n⊢ 8 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\n⊢ ↑χ₈ ↑n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1\n[PROOFSTEP]\nexact_mod_cast χ₈_int_eq_if_mod_eight n\n[GOAL]\n⊢ ∀ (x y : ZMod 8),\n    OneHom.toFun\n        { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],\n          map_one' := (_ : Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) }\n        (x * y) =\n      OneHom.toFun\n          { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],\n            map_one' :=\n              (_ : Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) }\n          x *\n        OneHom.toFun\n          { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],\n            map_one' :=\n              (_ : Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) }\n          y\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a : ZMod 8),\n    ¬IsUnit a →\n      OneHom.toFun\n          (↑{\n              toOneHom :=\n                { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],\n                  map_one' :=\n                    (_ : Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : ZMod 8),\n                    OneHom.toFun\n                        { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],\n                          map_one' :=\n                            (_ :\n                              Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 =\n                                Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) }\n                        (x * y) =\n                      OneHom.toFun\n                          { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],\n                            map_one' :=\n                              (_ :\n                                Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 =\n                                  Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) }\n                          x *\n                        OneHom.toFun\n                          { toFun := ![0, 1, 0, 1, 0, -1, 0, -1],\n                            map_one' :=\n                              (_ :\n                                Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1 =\n                                  Matrix.vecCons 0 ![1, 0, 1, 0, -1, 0, -1] 1) }\n                          y) })\n          a =\n        0\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ MulChar.IsQuadratic χ₈'\n[PROOFSTEP]\nintro a\n[GOAL]\na : ZMod 8\n⊢ ↑χ₈' a = 0 ∨ ↑χ₈' a = 1 ∨ ↑χ₈' a = -1\n[PROOFSTEP]\nfin_cases a\n[GOAL]\ncase head\n⊢ ↑χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } = 0 ∨\n    ↑χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } = 1 ∨ ↑χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } = -1\ncase tail.head\n⊢ ↑χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 0 ∨\n    ↑χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 1 ∨\n      ↑χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = -1\ncase tail.tail.head\n⊢ ↑χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 0 ∨\n    ↑χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 1 ∨\n      ↑χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = -1\ncase tail.tail.tail.head\n⊢ ↑χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 0 ∨\n    ↑χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 1 ∨\n      ↑χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = -1\ncase tail.tail.tail.tail.head\n⊢ ↑χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 0 ∨\n    ↑χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 1 ∨\n      ↑χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = -1\ncase tail.tail.tail.tail.tail.head\n⊢ ↑χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 0 ∨\n    ↑χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 1 ∨\n      ↑χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = -1\ncase tail.tail.tail.tail.tail.tail.head\n⊢ ↑χ₈'\n        { val := 6,\n          isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n      0 ∨\n    ↑χ₈'\n          { val := 6,\n            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n        1 ∨\n      ↑χ₈'\n          { val := 6,\n            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n        -1\ncase tail.tail.tail.tail.tail.tail.tail.head\n⊢ ↑χ₈'\n        { val := 7,\n          isLt :=\n            (_ :\n              (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a) 7) } =\n      0 ∨\n    ↑χ₈'\n          { val := 7,\n            isLt :=\n              (_ :\n                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)\n                  7) } =\n        1 ∨\n      ↑χ₈'\n          { val := 7,\n            isLt :=\n              (_ :\n                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)\n                  7) } =\n        -1\n[PROOFSTEP]\nall_goals decide\n[GOAL]\ncase head\n⊢ ↑χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } = 0 ∨\n    ↑χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } = 1 ∨ ↑χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.head\n⊢ ↑χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 0 ∨\n    ↑χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = 1 ∨\n      ↑χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.head\n⊢ ↑χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 0 ∨\n    ↑χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = 1 ∨\n      ↑χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.head\n⊢ ↑χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 0 ∨\n    ↑χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = 1 ∨\n      ↑χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.tail.head\n⊢ ↑χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 0 ∨\n    ↑χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = 1 ∨\n      ↑χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.tail.tail.head\n⊢ ↑χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 0 ∨\n    ↑χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = 1 ∨\n      ↑χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } = -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.tail.tail.tail.head\n⊢ ↑χ₈'\n        { val := 6,\n          isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n      0 ∨\n    ↑χ₈'\n          { val := 6,\n            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n        1 ∨\n      ↑χ₈'\n          { val := 6,\n            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n        -1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.tail.tail.tail.tail.head\n⊢ ↑χ₈'\n        { val := 7,\n          isLt :=\n            (_ :\n              (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a) 7) } =\n      0 ∨\n    ↑χ₈'\n          { val := 7,\n            isLt :=\n              (_ :\n                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)\n                  7) } =\n        1 ∨\n      ↑χ₈'\n          { val := 7,\n            isLt :=\n              (_ :\n                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)\n                  7) } =\n        -1\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℤ\n⊢ ↑χ₈' ↑n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 3 then 1 else -1\n[PROOFSTEP]\nhave help : ∀ m : ℤ, 0 ≤ m → m < 8 → χ₈' m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 3 then 1 else -1 := by decide\n[GOAL]\nn : ℤ\n⊢ ∀ (m : ℤ), 0 ≤ m → m < 8 → ↑χ₈' ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 3 then 1 else -1\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 8 → ↑χ₈' ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 3 then 1 else -1\n⊢ ↑χ₈' ↑n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 3 then 1 else -1\n[PROOFSTEP]\nrw [← Int.emod_emod_of_dvd n (by norm_num : (2 : ℤ) ∣ 8), ← ZMod.int_cast_mod n 8]\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 8 → ↑χ₈' ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 3 then 1 else -1\n⊢ 2 ∣ 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 8 → ↑χ₈' ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 3 then 1 else -1\n⊢ ↑χ₈' ↑(n % ↑8) = if n % 8 % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 3 then 1 else -1\n[PROOFSTEP]\nexact help (n % 8) (Int.emod_nonneg n (by norm_num)) (Int.emod_lt n (by norm_num))\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 8 → ↑χ₈' ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 3 then 1 else -1\n⊢ 8 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℤ\nhelp : ∀ (m : ℤ), 0 ≤ m → m < 8 → ↑χ₈' ↑m = if m % 2 = 0 then 0 else if m = 1 ∨ m = 3 then 1 else -1\n⊢ 8 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\n⊢ ↑χ₈' ↑n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 3 then 1 else -1\n[PROOFSTEP]\nexact_mod_cast χ₈'_int_eq_if_mod_eight n\n[GOAL]\na : ZMod 8\n⊢ ↑χ₈' a = ↑χ₄ ↑a * ↑χ₈ a\n[PROOFSTEP]\nfin_cases a\n[GOAL]\ncase head\n⊢ ↑χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } =\n    ↑χ₄ ↑{ val := 0, isLt := (_ : 0 < 7 + 1) } * ↑χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) }\ncase tail.head\n⊢ ↑χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } =\n    ↑χ₄ ↑{ val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } * ↑χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) }\ncase tail.tail.head\n⊢ ↑χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } =\n    ↑χ₄ ↑{ val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } *\n      ↑χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) }\ncase tail.tail.tail.head\n⊢ ↑χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } =\n    ↑χ₄ ↑{ val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } *\n      ↑χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) }\ncase tail.tail.tail.tail.head\n⊢ ↑χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } =\n    ↑χ₄ ↑{ val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } *\n      ↑χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) }\ncase tail.tail.tail.tail.tail.head\n⊢ ↑χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } =\n    ↑χ₄ ↑{ val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } *\n      ↑χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) }\ncase tail.tail.tail.tail.tail.tail.head\n⊢ ↑χ₈'\n      { val := 6,\n        isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n    ↑χ₄\n        ↑{ val := 6,\n            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } *\n      ↑χ₈\n        { val := 6,\n          isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) }\ncase tail.tail.tail.tail.tail.tail.tail.head\n⊢ ↑χ₈'\n      { val := 7,\n        isLt :=\n          (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a) 7) } =\n    ↑χ₄\n        ↑{ val := 7,\n            isLt :=\n              (_ :\n                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)\n                  7) } *\n      ↑χ₈\n        { val := 7,\n          isLt :=\n            (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a) 7) }\n[PROOFSTEP]\nall_goals decide\n[GOAL]\ncase head\n⊢ ↑χ₈' { val := 0, isLt := (_ : 0 < 7 + 1) } =\n    ↑χ₄ ↑{ val := 0, isLt := (_ : 0 < 7 + 1) } * ↑χ₈ { val := 0, isLt := (_ : 0 < 7 + 1) }\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.head\n⊢ ↑χ₈' { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } =\n    ↑χ₄ ↑{ val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) } * ↑χ₈ { val := 1, isLt := (_ : (fun a => a < 7 + 1) 1) }\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.head\n⊢ ↑χ₈' { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } =\n    ↑χ₄ ↑{ val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) } *\n      ↑χ₈ { val := 2, isLt := (_ : (fun a => (fun a => a < 7 + 1) a) 2) }\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.head\n⊢ ↑χ₈' { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } =\n    ↑χ₄ ↑{ val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) } *\n      ↑χ₈ { val := 3, isLt := (_ : (fun a => (fun a => (fun a => a < 7 + 1) a) a) 3) }\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.tail.head\n⊢ ↑χ₈' { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } =\n    ↑χ₄ ↑{ val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) } *\n      ↑χ₈ { val := 4, isLt := (_ : (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) 4) }\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.tail.tail.head\n⊢ ↑χ₈' { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } =\n    ↑χ₄ ↑{ val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) } *\n      ↑χ₈ { val := 5, isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) 5) }\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.tail.tail.tail.head\n⊢ ↑χ₈'\n      { val := 6,\n        isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } =\n    ↑χ₄\n        ↑{ val := 6,\n            isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) } *\n      ↑χ₈\n        { val := 6,\n          isLt := (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) 6) }\n[PROOFSTEP]\ndecide\n[GOAL]\ncase tail.tail.tail.tail.tail.tail.tail.head\n⊢ ↑χ₈'\n      { val := 7,\n        isLt :=\n          (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a) 7) } =\n    ↑χ₄\n        ↑{ val := 7,\n            isLt :=\n              (_ :\n                (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a)\n                  7) } *\n      ↑χ₈\n        { val := 7,\n          isLt :=\n            (_ : (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => (fun a => a < 7 + 1) a) a) a) a) a) a) 7) }\n[PROOFSTEP]\ndecide\n[GOAL]\na : ℤ\n⊢ ↑χ₈' ↑a = ↑χ₄ ↑a * ↑χ₈ ↑a\n[PROOFSTEP]\nrw [← @cast_int_cast 8 (ZMod 4) _ 4 _ (by norm_num) a]\n[GOAL]\na : ℤ\n⊢ 4 ∣ 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\na : ℤ\n⊢ ↑χ₈' ↑a = ↑χ₄ ↑↑a * ↑χ₈ ↑a\n[PROOFSTEP]\nexact χ₈'_eq_χ₄_mul_χ₈ a\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.LegendreSymbol.ZModChar", "llama_tokens": 17702, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7853085808877581, "lm_q2_score": 0.44939263446475963, "lm_q1q2_score": 0.3529118920329314}}
{"text": "[GOAL]\nG : Type u_1\ninst✝² : Group G\ninst✝¹ : IsFreeGroup G\nH : Type u_2\ninst✝ : Group H\nf : FreeGroup (Generators G) →* H\n⊢ (fun f => MonoidHom.comp f (MulEquiv.toMonoidHom (MulEquiv G)))\n      ((fun f => MonoidHom.comp f (MulEquiv.toMonoidHom (MulEquiv.symm (MulEquiv G)))) f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nG : Type u_1\ninst✝² : Group G\ninst✝¹ : IsFreeGroup G\nH : Type u_2\ninst✝ : Group H\nf : FreeGroup (Generators G) →* H\na✝ : Generators G\n⊢ ↑((fun f => MonoidHom.comp f (MulEquiv.toMonoidHom (MulEquiv G)))\n          ((fun f => MonoidHom.comp f (MulEquiv.toMonoidHom (MulEquiv.symm (MulEquiv G)))) f))\n      (FreeGroup.of a✝) =\n    ↑f (FreeGroup.of a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\ninst✝² : Group G\ninst✝¹ : IsFreeGroup G\nH : Type u_2\ninst✝ : Group H\nf : G →* H\n⊢ (fun f => MonoidHom.comp f (MulEquiv.toMonoidHom (MulEquiv.symm (MulEquiv G))))\n      ((fun f => MonoidHom.comp f (MulEquiv.toMonoidHom (MulEquiv G))) f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nG : Type u_1\ninst✝² : Group G\ninst✝¹ : IsFreeGroup G\nH : Type u_2\ninst✝ : Group H\nf : G →* H\nx✝ : G\n⊢ ↑((fun f => MonoidHom.comp f (MulEquiv.toMonoidHom (MulEquiv.symm (MulEquiv G))))\n          ((fun f => MonoidHom.comp f (MulEquiv.toMonoidHom (MulEquiv G))) f))\n      x✝ =\n    ↑f x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\ninst✝² : Group G\ninst✝¹ : IsFreeGroup G\nH : Type u_2\ninst✝ : Group H\nf : Generators G → H\n⊢ ∃! F, ∀ (a : Generators G), ↑F (of a) = f a\n[PROOFSTEP]\nsimpa only [Function.funext_iff] using lift.symm.bijective.existsUnique f\n[GOAL]\nG✝ : Type u_1\ninst✝³ : Group G✝\ninst✝² : IsFreeGroup G✝\nH : Type u_2\ninst✝¹ : Group H\nG : Type u\ninst✝ : Group G\nX : Type u\nof : X → G\nlift : {H : Type u} → [inst : Group H] → (X → H) ≃ (G →* H)\nlift_of : ∀ {H : Type u} [inst : Group H] (f : X → H) (a : X), ↑(↑lift f) (of a) = f a\n⊢ MonoidHom.comp (↑lift FreeGroup.of) (↑FreeGroup.lift of) = MonoidHom.id (FreeGroup X)\n[PROOFSTEP]\napply FreeGroup.ext_hom\n[GOAL]\ncase h\nG✝ : Type u_1\ninst✝³ : Group G✝\ninst✝² : IsFreeGroup G✝\nH : Type u_2\ninst✝¹ : Group H\nG : Type u\ninst✝ : Group G\nX : Type u\nof : X → G\nlift : {H : Type u} → [inst : Group H] → (X → H) ≃ (G →* H)\nlift_of : ∀ {H : Type u} [inst : Group H] (f : X → H) (a : X), ↑(↑lift f) (of a) = f a\n⊢ ∀ (a : X),\n    ↑(MonoidHom.comp (↑lift FreeGroup.of) (↑FreeGroup.lift of)) (FreeGroup.of a) =\n      ↑(MonoidHom.id (FreeGroup X)) (FreeGroup.of a)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nG✝ : Type u_1\ninst✝³ : Group G✝\ninst✝² : IsFreeGroup G✝\nH : Type u_2\ninst✝¹ : Group H\nG : Type u\ninst✝ : Group G\nX : Type u\nof : X → G\nlift : {H : Type u} → [inst : Group H] → (X → H) ≃ (G →* H)\nlift_of : ∀ {H : Type u} [inst : Group H] (f : X → H) (a : X), ↑(↑lift f) (of a) = f a\nx : X\n⊢ ↑(MonoidHom.comp (↑lift FreeGroup.of) (↑FreeGroup.lift of)) (FreeGroup.of x) =\n    ↑(MonoidHom.id (FreeGroup X)) (FreeGroup.of x)\n[PROOFSTEP]\nsimp only [MonoidHom.coe_comp, Function.comp_apply, MonoidHom.id_apply, FreeGroup.lift.of, lift_of]\n[GOAL]\nG✝ : Type u_1\ninst✝³ : Group G✝\ninst✝² : IsFreeGroup G✝\nH : Type u_2\ninst✝¹ : Group H\nG : Type u\ninst✝ : Group G\nX : Type u\nof : X → G\nlift : {H : Type u} → [inst : Group H] → (X → H) ≃ (G →* H)\nlift_of : ∀ {H : Type u} [inst : Group H] (f : X → H) (a : X), ↑(↑lift f) (of a) = f a\n⊢ MonoidHom.comp (↑FreeGroup.lift of) (↑lift FreeGroup.of) = MonoidHom.id G\n[PROOFSTEP]\nlet lift_symm_of : ∀ {H : Type u} [Group H], ∀ (f : G →* H) (a), lift.symm f a = f (of a) := by intro H _ f a;\n  simp [← lift_of (lift.symm f)]\n[GOAL]\nG✝ : Type u_1\ninst✝³ : Group G✝\ninst✝² : IsFreeGroup G✝\nH : Type u_2\ninst✝¹ : Group H\nG : Type u\ninst✝ : Group G\nX : Type u\nof : X → G\nlift : {H : Type u} → [inst : Group H] → (X → H) ≃ (G →* H)\nlift_of : ∀ {H : Type u} [inst : Group H] (f : X → H) (a : X), ↑(↑lift f) (of a) = f a\n⊢ ∀ {H : Type u} [inst : Group H] (f : G →* H) (a : X), ↑lift.symm f a = ↑f (of a)\n[PROOFSTEP]\nintro H _ f a\n[GOAL]\nG✝ : Type u_1\ninst✝⁴ : Group G✝\ninst✝³ : IsFreeGroup G✝\nH✝ : Type u_2\ninst✝² : Group H✝\nG : Type u\ninst✝¹ : Group G\nX : Type u\nof : X → G\nlift : {H : Type u} → [inst : Group H] → (X → H) ≃ (G →* H)\nlift_of : ∀ {H : Type u} [inst : Group H] (f : X → H) (a : X), ↑(↑lift f) (of a) = f a\nH : Type u\ninst✝ : Group H\nf : G →* H\na : X\n⊢ ↑lift.symm f a = ↑f (of a)\n[PROOFSTEP]\nsimp [← lift_of (lift.symm f)]\n[GOAL]\nG✝ : Type u_1\ninst✝³ : Group G✝\ninst✝² : IsFreeGroup G✝\nH : Type u_2\ninst✝¹ : Group H\nG : Type u\ninst✝ : Group G\nX : Type u\nof : X → G\nlift : {H : Type u} → [inst : Group H] → (X → H) ≃ (G →* H)\nlift_of : ∀ {H : Type u} [inst : Group H] (f : X → H) (a : X), ↑(↑lift f) (of a) = f a\nlift_symm_of : ∀ {H : Type u} [inst : Group H] (f : G →* H) (a : X), ↑lift.symm f a = ↑f (of a) :=\n  fun {H} [Group H] f a =>\n    of_eq_true\n      (Eq.trans\n        (congrFun\n          (congrArg Eq\n            (Eq.trans ((fun a => Eq.symm (lift_of (↑lift.symm f) a)) a)\n              (congrFun (congrArg FunLike.coe (Equiv.apply_symm_apply lift f)) (of a))))\n          (↑f (of a)))\n        (eq_self (↑f (of a))))\n⊢ MonoidHom.comp (↑FreeGroup.lift of) (↑lift FreeGroup.of) = MonoidHom.id G\n[PROOFSTEP]\napply lift.symm.injective\n[GOAL]\ncase a\nG✝ : Type u_1\ninst✝³ : Group G✝\ninst✝² : IsFreeGroup G✝\nH : Type u_2\ninst✝¹ : Group H\nG : Type u\ninst✝ : Group G\nX : Type u\nof : X → G\nlift : {H : Type u} → [inst : Group H] → (X → H) ≃ (G →* H)\nlift_of : ∀ {H : Type u} [inst : Group H] (f : X → H) (a : X), ↑(↑lift f) (of a) = f a\nlift_symm_of : ∀ {H : Type u} [inst : Group H] (f : G →* H) (a : X), ↑lift.symm f a = ↑f (of a) :=\n  fun {H} [Group H] f a =>\n    of_eq_true\n      (Eq.trans\n        (congrFun\n          (congrArg Eq\n            (Eq.trans ((fun a => Eq.symm (lift_of (↑lift.symm f) a)) a)\n              (congrFun (congrArg FunLike.coe (Equiv.apply_symm_apply lift f)) (of a))))\n          (↑f (of a)))\n        (eq_self (↑f (of a))))\n⊢ ↑lift.symm (MonoidHom.comp (↑FreeGroup.lift of) (↑lift FreeGroup.of)) = ↑lift.symm (MonoidHom.id G)\n[PROOFSTEP]\next x\n[GOAL]\ncase a.h\nG✝ : Type u_1\ninst✝³ : Group G✝\ninst✝² : IsFreeGroup G✝\nH : Type u_2\ninst✝¹ : Group H\nG : Type u\ninst✝ : Group G\nX : Type u\nof : X → G\nlift : {H : Type u} → [inst : Group H] → (X → H) ≃ (G →* H)\nlift_of : ∀ {H : Type u} [inst : Group H] (f : X → H) (a : X), ↑(↑lift f) (of a) = f a\nlift_symm_of : ∀ {H : Type u} [inst : Group H] (f : G →* H) (a : X), ↑lift.symm f a = ↑f (of a) :=\n  fun {H} [Group H] f a =>\n    of_eq_true\n      (Eq.trans\n        (congrFun\n          (congrArg Eq\n            (Eq.trans ((fun a => Eq.symm (lift_of (↑lift.symm f) a)) a)\n              (congrFun (congrArg FunLike.coe (Equiv.apply_symm_apply lift f)) (of a))))\n          (↑f (of a)))\n        (eq_self (↑f (of a))))\nx : X\n⊢ ↑lift.symm (MonoidHom.comp (↑FreeGroup.lift of) (↑lift FreeGroup.of)) x = ↑lift.symm (MonoidHom.id G) x\n[PROOFSTEP]\nsimp only [MonoidHom.coe_comp, Function.comp_apply, MonoidHom.id_apply, FreeGroup.lift.of, lift_of, lift_symm_of]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.IsFreeGroup", "llama_tokens": 3413, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6150878414043814, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.35286261330026736}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\n⊢ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ\n[PROOFSTEP]\nsimp only [edist_eq_coe_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\n⊢ ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ\n[PROOFSTEP]\nsimp only [ofReal_norm_eq_coe_nnnorm, edist_eq_coe_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g h : α → β\nhf : AEStronglyMeasurable f μ\nhh : AEStronglyMeasurable h μ\n⊢ ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) ∂μ + ∫⁻ (a : α), edist (g a) (h a) ∂μ\n[PROOFSTEP]\nrw [← lintegral_add_left' (hf.edist hh)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g h : α → β\nhf : AEStronglyMeasurable f μ\nhh : AEStronglyMeasurable h μ\n⊢ ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) + edist (g a) (h a) ∂μ\n[PROOFSTEP]\nrefine' lintegral_mono fun a => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g h : α → β\nhf : AEStronglyMeasurable f μ\nhh : AEStronglyMeasurable h μ\na : α\n⊢ edist (f a) (g a) ≤ edist (f a) (h a) + edist (g a) (h a)\n[PROOFSTEP]\napply edist_triangle_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\n⊢ ∫⁻ (x : α), ↑‖0‖₊ ∂μ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\n⊢ ∫⁻ (a : α), ↑‖(-f) a‖₊ ∂μ = ∫⁻ (a : α), ↑‖f a‖₊ ∂μ\n[PROOFSTEP]\nsimp only [Pi.neg_apply, nnnorm_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\n⊢ HasFiniteIntegral f ↔ ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ < ⊤\n[PROOFSTEP]\nsimp only [HasFiniteIntegral, ofReal_norm_eq_coe_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\n⊢ HasFiniteIntegral f ↔ ∫⁻ (a : α), edist (f a) 0 ∂μ < ⊤\n[PROOFSTEP]\nsimp only [hasFiniteIntegral_iff_norm, edist_dist, dist_zero_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ\nh : 0 ≤ᵐ[μ] f\n⊢ HasFiniteIntegral f ↔ ∫⁻ (a : α), ENNReal.ofReal (f a) ∂μ < ⊤\n[PROOFSTEP]\nrw [HasFiniteIntegral, lintegral_nnnorm_eq_of_ae_nonneg h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0\n⊢ (HasFiniteIntegral fun x => ↑(f x)) ↔ ∫⁻ (a : α), ↑(f a) ∂μ < ⊤\n[PROOFSTEP]\nsimp [hasFiniteIntegral_iff_norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\ng : α → γ\nhg : HasFiniteIntegral g\nh : ∀ᵐ (a : α) ∂μ, ‖f a‖ ≤ ‖g a‖\n⊢ HasFiniteIntegral f\n[PROOFSTEP]\nsimp only [hasFiniteIntegral_iff_norm] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\ng : α → γ\nh : ∀ᵐ (a : α) ∂μ, ‖f a‖ ≤ ‖g a‖\nhg : ∫⁻ (a : α), ENNReal.ofReal ‖g a‖ ∂μ < ⊤\n⊢ ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ < ⊤\n[PROOFSTEP]\ncalc\n  (∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ) ≤ ∫⁻ a : α, ENNReal.ofReal ‖g a‖ ∂μ :=\n    lintegral_mono_ae (h.mono fun a h => ofReal_le_ofReal h)\n  _ < ∞ := hg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nc : β\n⊢ (HasFiniteIntegral fun x => c) ↔ c = 0 ∨ ↑↑μ univ < ⊤\n[PROOFSTEP]\nsimp [HasFiniteIntegral, lintegral_const, lt_top_iff_ne_top, ENNReal.mul_eq_top, or_iff_not_imp_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhμ : HasFiniteIntegral f\nhν : HasFiniteIntegral f\n⊢ HasFiniteIntegral f\n[PROOFSTEP]\nsimp only [HasFiniteIntegral, lintegral_add_measure] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhμ : ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\nhν : ∫⁻ (a : α), ↑‖f a‖₊ ∂ν < ⊤\n⊢ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ + ∫⁻ (a : α), ↑‖f a‖₊ ∂ν < ⊤\n[PROOFSTEP]\nexact add_lt_top.2 ⟨hμ, hν⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nh : HasFiniteIntegral f\nc : ℝ≥0∞\nhc : c ≠ ⊤\n⊢ HasFiniteIntegral f\n[PROOFSTEP]\nsimp only [HasFiniteIntegral, lintegral_smul_measure] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh : ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\n⊢ c * ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\n[PROOFSTEP]\nexact mul_lt_top hc h.ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm✝ : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nm : MeasurableSpace α\nf : α → β\n⊢ HasFiniteIntegral f\n[PROOFSTEP]\nsimp only [HasFiniteIntegral, lintegral_zero_measure, WithTop.zero_lt_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\n⊢ HasFiniteIntegral fun x => 0\n[PROOFSTEP]\nsimp [HasFiniteIntegral]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhfi : HasFiniteIntegral f\n⊢ HasFiniteIntegral (-f)\n[PROOFSTEP]\nsimpa [HasFiniteIntegral] using hfi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhfi : HasFiniteIntegral f\n⊢ HasFiniteIntegral fun a => ‖f a‖\n[PROOFSTEP]\nhave eq : (fun a => (nnnorm ‖f a‖ : ℝ≥0∞)) = fun a => (‖f a‖₊ : ℝ≥0∞) :=\n  by\n  funext\n  rw [nnnorm_norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhfi : HasFiniteIntegral f\n⊢ (fun a => ↑‖‖f a‖‖₊) = fun a => ↑‖f a‖₊\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhfi : HasFiniteIntegral f\nx✝ : α\n⊢ ↑‖‖f x✝‖‖₊ = ↑‖f x✝‖₊\n[PROOFSTEP]\nrw [nnnorm_norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhfi : HasFiniteIntegral f\neq : (fun a => ↑‖‖f a‖‖₊) = fun a => ↑‖f a‖₊\n⊢ HasFiniteIntegral fun a => ‖f a‖\n[PROOFSTEP]\nrwa [HasFiniteIntegral, eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∫⁻ (x : α), f x ∂μ ≠ ⊤\n⊢ HasFiniteIntegral fun x => ENNReal.toReal (f x)\n[PROOFSTEP]\nhave : ∀ x, (‖(f x).toReal‖₊ : ℝ≥0∞) = ENNReal.some ⟨(f x).toReal, ENNReal.toReal_nonneg⟩ :=\n  by\n  intro x\n  rw [Real.nnnorm_of_nonneg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∫⁻ (x : α), f x ∂μ ≠ ⊤\n⊢ ∀ (x : α), ↑‖ENNReal.toReal (f x)‖₊ = ↑{ val := ENNReal.toReal (f x), property := (_ : 0 ≤ ENNReal.toReal (f x)) }\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∫⁻ (x : α), f x ∂μ ≠ ⊤\nx : α\n⊢ ↑‖ENNReal.toReal (f x)‖₊ = ↑{ val := ENNReal.toReal (f x), property := (_ : 0 ≤ ENNReal.toReal (f x)) }\n[PROOFSTEP]\nrw [Real.nnnorm_of_nonneg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∫⁻ (x : α), f x ∂μ ≠ ⊤\nthis :\n  ∀ (x : α), ↑‖ENNReal.toReal (f x)‖₊ = ↑{ val := ENNReal.toReal (f x), property := (_ : 0 ≤ ENNReal.toReal (f x)) }\n⊢ HasFiniteIntegral fun x => ENNReal.toReal (f x)\n[PROOFSTEP]\nsimp_rw [HasFiniteIntegral, this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∫⁻ (x : α), f x ∂μ ≠ ⊤\nthis :\n  ∀ (x : α), ↑‖ENNReal.toReal (f x)‖₊ = ↑{ val := ENNReal.toReal (f x), property := (_ : 0 ≤ ENNReal.toReal (f x)) }\n⊢ ∫⁻ (a : α), ↑{ val := ENNReal.toReal (f a), property := (_ : 0 ≤ ENNReal.toReal (f a)) } ∂μ < ⊤\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (lintegral_mono fun x => _) (lt_top_iff_ne_top.2 hf)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∫⁻ (x : α), f x ∂μ ≠ ⊤\nthis :\n  ∀ (x : α), ↑‖ENNReal.toReal (f x)‖₊ = ↑{ val := ENNReal.toReal (f x), property := (_ : 0 ≤ ENNReal.toReal (f x)) }\nx : α\n⊢ ↑{ val := ENNReal.toReal (f x), property := (_ : 0 ≤ ENNReal.toReal (f x)) } ≤ f x\n[PROOFSTEP]\nby_cases hfx : f x = ∞\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∫⁻ (x : α), f x ∂μ ≠ ⊤\nthis :\n  ∀ (x : α), ↑‖ENNReal.toReal (f x)‖₊ = ↑{ val := ENNReal.toReal (f x), property := (_ : 0 ≤ ENNReal.toReal (f x)) }\nx : α\nhfx : f x = ⊤\n⊢ ↑{ val := ENNReal.toReal (f x), property := (_ : 0 ≤ ENNReal.toReal (f x)) } ≤ f x\n[PROOFSTEP]\nsimp [hfx]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∫⁻ (x : α), f x ∂μ ≠ ⊤\nthis :\n  ∀ (x : α), ↑‖ENNReal.toReal (f x)‖₊ = ↑{ val := ENNReal.toReal (f x), property := (_ : 0 ≤ ENNReal.toReal (f x)) }\nx : α\nhfx : ¬f x = ⊤\n⊢ ↑{ val := ENNReal.toReal (f x), property := (_ : 0 ≤ ENNReal.toReal (f x)) } ≤ f x\n[PROOFSTEP]\nlift f x to ℝ≥0 using hfx with fx h\n[GOAL]\ncase neg.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∫⁻ (x : α), f x ∂μ ≠ ⊤\nthis :\n  ∀ (x : α), ↑‖ENNReal.toReal (f x)‖₊ = ↑{ val := ENNReal.toReal (f x), property := (_ : 0 ≤ ENNReal.toReal (f x)) }\nx : α\nfx : ℝ≥0\nh : ↑fx = f x\n⊢ ↑{ val := ENNReal.toReal ↑fx, property := (_ : (fun r => 0 ≤ r) (ENNReal.toReal ↑fx)) } ≤ ↑fx\n[PROOFSTEP]\nsimp [← h]\n[GOAL]\ncase neg.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∫⁻ (x : α), f x ∂μ ≠ ⊤\nthis :\n  ∀ (x : α), ↑‖ENNReal.toReal (f x)‖₊ = ↑{ val := ENNReal.toReal (f x), property := (_ : 0 ≤ ENNReal.toReal (f x)) }\nx : α\nfx : ℝ≥0\nh : ↑fx = f x\n⊢ { val := ↑fx, property := (_ : (fun r => 0 ≤ r) ↑fx) } ≤ fx\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ\nhfi : HasFiniteIntegral f\n⊢ IsFiniteMeasure (Measure.withDensity μ fun x => ENNReal.ofReal (f x))\n[PROOFSTEP]\nrefine' isFiniteMeasure_withDensity ((lintegral_mono fun x => _).trans_lt hfi).ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ\nhfi : HasFiniteIntegral f\nx : α\n⊢ ENNReal.ofReal (f x) ≤ ↑‖f x‖₊\n[PROOFSTEP]\nexact Real.ofReal_le_ennnorm (f x)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\n⊢ ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n[PROOFSTEP]\nhave F_le_bound := all_ae_ofReal_F_le_bound h_bound\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nF_le_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\n⊢ ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n[PROOFSTEP]\nrw [← ae_all_iff] at F_le_bound \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nF_le_bound : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ENNReal.ofReal ‖F i a‖ ≤ ENNReal.ofReal (bound a)\n⊢ ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n[PROOFSTEP]\napply F_le_bound.mp ((all_ae_tendsto_ofReal_norm h_lim).mono _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nF_le_bound : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ENNReal.ofReal ‖F i a‖ ≤ ENNReal.ofReal (bound a)\n⊢ ∀ (x : α),\n    Tendsto (fun n => ENNReal.ofReal ‖F n x‖) atTop (𝓝 (ENNReal.ofReal ‖f x‖)) →\n      (∀ (i : ℕ), ENNReal.ofReal ‖F i x‖ ≤ ENNReal.ofReal (bound x)) → ENNReal.ofReal ‖f x‖ ≤ ENNReal.ofReal (bound x)\n[PROOFSTEP]\nintro a tendsto_norm F_le_bound\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nF_le_bound✝ : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), ENNReal.ofReal ‖F i a‖ ≤ ENNReal.ofReal (bound a)\na : α\ntendsto_norm : Tendsto (fun n => ENNReal.ofReal ‖F n a‖) atTop (𝓝 (ENNReal.ofReal ‖f a‖))\nF_le_bound : ∀ (i : ℕ), ENNReal.ofReal ‖F i a‖ ≤ ENNReal.ofReal (bound a)\n⊢ ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n[PROOFSTEP]\nexact le_of_tendsto' tendsto_norm F_le_bound\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\n⊢ HasFiniteIntegral f\n[PROOFSTEP]\nrw [hasFiniteIntegral_iff_norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\n⊢ ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ < ⊤\n[PROOFSTEP]\ncalc\n  (∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ) ≤ ∫⁻ a, ENNReal.ofReal (bound a) ∂μ :=\n    lintegral_mono_ae <| all_ae_ofReal_f_le_bound h_bound h_lim\n  _ < ∞ := by\n    rw [← hasFiniteIntegral_iff_ofReal]\n    · exact bound_hasFiniteIntegral\n    exact (h_bound 0).mono fun a h => le_trans (norm_nonneg _) h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\n⊢ ∫⁻ (a : α), ENNReal.ofReal (bound a) ∂μ < ⊤\n[PROOFSTEP]\nrw [← hasFiniteIntegral_iff_ofReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\n⊢ HasFiniteIntegral fun a => bound a\n[PROOFSTEP]\nexact bound_hasFiniteIntegral\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\n⊢ 0 ≤ᵐ[μ] fun a => bound a\n[PROOFSTEP]\nexact (h_bound 0).mono fun a h => le_trans (norm_nonneg _) h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\n⊢ Tendsto (fun n => ∫⁻ (a : α), ENNReal.ofReal ‖F n a - f a‖ ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave f_measurable : AEStronglyMeasurable f μ := aestronglyMeasurable_of_tendsto_ae _ F_measurable h_lim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\n⊢ Tendsto (fun n => ∫⁻ (a : α), ENNReal.ofReal ‖F n a - f a‖ ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nlet b a :=\n  2 *\n    ENNReal.ofReal\n      (bound a)\n        /- `‖F n a‖ ≤ bound a` and `F n a --> f a` implies `‖f a‖ ≤ bound a`, and thus by the\n            triangle inequality, have `‖F n a - f a‖ ≤ 2 * (bound a)`. -/\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\n⊢ Tendsto (fun n => ∫⁻ (a : α), ENNReal.ofReal ‖F n a - f a‖ ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave hb : ∀ n, ∀ᵐ a ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a :=\n  by\n  intro n\n  filter_upwards [all_ae_ofReal_F_le_bound h_bound n, all_ae_ofReal_f_le_bound h_bound h_lim] with a h₁ h₂\n  calc\n    ENNReal.ofReal ‖F n a - f a‖ ≤ ENNReal.ofReal ‖F n a‖ + ENNReal.ofReal ‖f a‖ :=\n      by\n      rw [← ENNReal.ofReal_add]\n      apply ofReal_le_ofReal\n      · {apply norm_sub_le\n      };\n      · {exact norm_nonneg _\n      };\n      · {exact norm_nonneg _\n      }\n    _ ≤ ENNReal.ofReal (bound a) + ENNReal.ofReal (bound a) := (add_le_add h₁ h₂)\n    _ = b a := by\n      rw [← two_mul]\n        -- On the other hand, `F n a --> f a` implies that `‖F n a - f a‖ --> 0`\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\n⊢ ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\n⊢ ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\n[PROOFSTEP]\nfilter_upwards [all_ae_ofReal_F_le_bound h_bound n, all_ae_ofReal_f_le_bound h_bound h_lim] with a h₁ h₂\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\na : α\nh₁ : ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\nh₂ : ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n⊢ ENNReal.ofReal ‖F n a - f a‖ ≤ 2 * ENNReal.ofReal (bound a)\n[PROOFSTEP]\ncalc\n  ENNReal.ofReal ‖F n a - f a‖ ≤ ENNReal.ofReal ‖F n a‖ + ENNReal.ofReal ‖f a‖ :=\n    by\n    rw [← ENNReal.ofReal_add]\n    apply ofReal_le_ofReal\n    · {apply norm_sub_le\n    };\n    · {exact norm_nonneg _\n    };\n    · {exact norm_nonneg _\n    }\n  _ ≤ ENNReal.ofReal (bound a) + ENNReal.ofReal (bound a) := (add_le_add h₁ h₂)\n  _ = b a := by\n    rw [← two_mul]\n      -- On the other hand, `F n a --> f a` implies that `‖F n a - f a‖ --> 0`\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\na : α\nh₁ : ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\nh₂ : ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n⊢ ENNReal.ofReal ‖F n a - f a‖ ≤ ENNReal.ofReal ‖F n a‖ + ENNReal.ofReal ‖f a‖\n[PROOFSTEP]\nrw [← ENNReal.ofReal_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\na : α\nh₁ : ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\nh₂ : ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n⊢ ENNReal.ofReal ‖F n a - f a‖ ≤ ENNReal.ofReal (‖F n a‖ + ‖f a‖)\ncase hp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\na : α\nh₁ : ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\nh₂ : ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n⊢ 0 ≤ ‖F n a‖\ncase hq\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\na : α\nh₁ : ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\nh₂ : ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n⊢ 0 ≤ ‖f a‖\n[PROOFSTEP]\napply ofReal_le_ofReal\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\na : α\nh₁ : ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\nh₂ : ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n⊢ ‖F n a - f a‖ ≤ ‖F n a‖ + ‖f a‖\n[PROOFSTEP]\n{apply norm_sub_le\n}\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\na : α\nh₁ : ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\nh₂ : ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n⊢ ‖F n a - f a‖ ≤ ‖F n a‖ + ‖f a‖\n[PROOFSTEP]\napply norm_sub_le\n[GOAL]\ncase hp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\na : α\nh₁ : ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\nh₂ : ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n⊢ 0 ≤ ‖F n a‖\n[PROOFSTEP]\n{exact norm_nonneg _\n}\n[GOAL]\ncase hp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\na : α\nh₁ : ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\nh₂ : ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n⊢ 0 ≤ ‖F n a‖\n[PROOFSTEP]\nexact norm_nonneg _\n[GOAL]\ncase hq\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\na : α\nh₁ : ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\nh₂ : ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n⊢ 0 ≤ ‖f a‖\n[PROOFSTEP]\n{exact norm_nonneg _\n}\n[GOAL]\ncase hq\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\na : α\nh₁ : ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\nh₂ : ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n⊢ 0 ≤ ‖f a‖\n[PROOFSTEP]\nexact norm_nonneg _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nn : ℕ\na : α\nh₁ : ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)\nh₂ : ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)\n⊢ ENNReal.ofReal (bound a) + ENNReal.ofReal (bound a) = b a\n[PROOFSTEP]\nrw [← two_mul]\n  -- On the other hand, `F n a --> f a` implies that `‖F n a - f a‖ --> 0`\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\n⊢ Tendsto (fun n => ∫⁻ (a : α), ENNReal.ofReal ‖F n a - f a‖ ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave h : ∀ᵐ a ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0) :=\n  by\n  rw [← ENNReal.ofReal_zero]\n  refine' h_lim.mono fun a h => (continuous_ofReal.tendsto _).comp _\n  rwa [← tendsto_iff_norm_tendsto_zero]\n    /- Therefore, by the dominated convergence theorem for nonnegative integration, have\n        ` ∫ ‖f a - F n a‖ --> 0 ` -/\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\n⊢ ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0)\n[PROOFSTEP]\nrw [← ENNReal.ofReal_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\n⊢ ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 (ENNReal.ofReal 0))\n[PROOFSTEP]\nrefine' h_lim.mono fun a h => (continuous_ofReal.tendsto _).comp _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\na : α\nh : Tendsto (fun n => F n a) atTop (𝓝 (f a))\n⊢ Tendsto (fun n => ‖F n a - f a‖) atTop (𝓝 0)\n[PROOFSTEP]\nrwa [← tendsto_iff_norm_tendsto_zero]\n  /- Therefore, by the dominated convergence theorem for nonnegative integration, have\n      ` ∫ ‖f a - F n a‖ --> 0 ` -/\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\nh : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0)\n⊢ Tendsto (fun n => ∫⁻ (a : α), ENNReal.ofReal ‖F n a - f a‖ ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nsuffices h : Tendsto (fun n => ∫⁻ a, ENNReal.ofReal ‖F n a - f a‖ ∂μ) atTop (𝓝 (∫⁻ _ : α, 0 ∂μ))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\nh✝ : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0)\nh : Tendsto (fun n => ∫⁻ (a : α), ENNReal.ofReal ‖F n a - f a‖ ∂μ) atTop (𝓝 (∫⁻ (x : α), 0 ∂μ))\n⊢ Tendsto (fun n => ∫⁻ (a : α), ENNReal.ofReal ‖F n a - f a‖ ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nrwa [lintegral_zero] at h \n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\nh : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0)\n⊢ Tendsto (fun n => ∫⁻ (a : α), ENNReal.ofReal ‖F n a - f a‖ ∂μ) atTop (𝓝 (∫⁻ (x : α), 0 ∂μ))\n[PROOFSTEP]\nrefine'\n  tendsto_lintegral_of_dominated_convergence' _ _ hb _\n    _\n      -- Show `λa, ‖f a - F n a‖` is almost everywhere measurable for all `n`\n[GOAL]\ncase h.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\nh : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0)\n⊢ ∀ (n : ℕ), AEMeasurable fun a => ENNReal.ofReal ‖F n a - f a‖\n[PROOFSTEP]\nexact fun n => measurable_ofReal.comp_aemeasurable ((F_measurable n).sub f_measurable).norm.aemeasurable\n[GOAL]\ncase h.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\nh : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0)\n⊢ ∫⁻ (a : α), b a ∂μ ≠ ⊤\n[PROOFSTEP]\nrw [hasFiniteIntegral_iff_ofReal] at bound_hasFiniteIntegral \n[GOAL]\ncase h.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : ∫⁻ (a : α), ENNReal.ofReal (bound a) ∂μ < ⊤\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\nh : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0)\n⊢ ∫⁻ (a : α), b a ∂μ ≠ ⊤\n[PROOFSTEP]\ncalc\n  ∫⁻ a, b a ∂μ = 2 * ∫⁻ a, ENNReal.ofReal (bound a) ∂μ :=\n    by\n    rw [lintegral_const_mul']\n    exact coe_ne_top\n  _ ≠ ∞ := mul_ne_top coe_ne_top bound_hasFiniteIntegral.ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : ∫⁻ (a : α), ENNReal.ofReal (bound a) ∂μ < ⊤\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\nh : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0)\n⊢ ∫⁻ (a : α), b a ∂μ = 2 * ∫⁻ (a : α), ENNReal.ofReal (bound a) ∂μ\n[PROOFSTEP]\nrw [lintegral_const_mul']\n[GOAL]\ncase hr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : ∫⁻ (a : α), ENNReal.ofReal (bound a) ∂μ < ⊤\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\nh : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0)\n⊢ 2 ≠ ⊤\n[PROOFSTEP]\nexact coe_ne_top\n[GOAL]\ncase h.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\nh : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0)\n⊢ 0 ≤ᵐ[μ] bound\n[PROOFSTEP]\nfilter_upwards [h_bound 0] with _ h using le_trans (norm_nonneg _) h\n[GOAL]\ncase h.refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nF✝ : ℕ → α → β\nf✝ : α → β\nbound✝ : α → ℝ\nF : ℕ → α → β\nf : α → β\nbound : α → ℝ\nF_measurable : ∀ (n : ℕ), AEStronglyMeasurable (F n) μ\nbound_hasFiniteIntegral : HasFiniteIntegral bound\nh_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a\nh_lim : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))\nf_measurable : AEStronglyMeasurable f μ\nb : α → ℝ≥0∞ := fun a => 2 * ENNReal.ofReal (bound a)\nhb : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a - f a‖ ≤ b a\nh : ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0)\n⊢ ∀ᵐ (a : α) ∂μ, Tendsto (fun n => ENNReal.ofReal ‖F n a - f a‖) atTop (𝓝 0)\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ\nhf : HasFiniteIntegral f\nx : α\n⊢ ‖max (f x) 0‖ ≤ ‖f x‖\n[PROOFSTEP]\nsimp [abs_le, le_abs_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ\nhf : HasFiniteIntegral f\nx : α\n⊢ ‖min (f x) 0‖ ≤ ‖f x‖\n[PROOFSTEP]\nsimp [abs_le, neg_le, neg_le_abs_self, abs_eq_max_neg, le_total]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedAddCommGroup 𝕜\ninst✝¹ : SMulZeroClass 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nc : 𝕜\nf : α → β\n⊢ HasFiniteIntegral f → HasFiniteIntegral (c • f)\n[PROOFSTEP]\nsimp only [HasFiniteIntegral]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedAddCommGroup 𝕜\ninst✝¹ : SMulZeroClass 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nc : 𝕜\nf : α → β\n⊢ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤ → ∫⁻ (a : α), ↑‖(c • f) a‖₊ ∂μ < ⊤\n[PROOFSTEP]\nintro hfi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedAddCommGroup 𝕜\ninst✝¹ : SMulZeroClass 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nc : 𝕜\nf : α → β\nhfi : ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\n⊢ ∫⁻ (a : α), ↑‖(c • f) a‖₊ ∂μ < ⊤\n[PROOFSTEP]\ncalc\n  (∫⁻ a : α, ‖c • f a‖₊ ∂μ) ≤ ∫⁻ a : α, ‖c‖₊ * ‖f a‖₊ ∂μ :=\n    by\n    refine' lintegral_mono _\n    intro i\n    exact_mod_cast (nnnorm_smul_le c (f i))\n  _ < ∞ := by\n    rw [lintegral_const_mul']\n    exacts [mul_lt_top coe_ne_top hfi.ne, coe_ne_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedAddCommGroup 𝕜\ninst✝¹ : SMulZeroClass 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nc : 𝕜\nf : α → β\nhfi : ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\n⊢ ∫⁻ (a : α), ↑‖c • f a‖₊ ∂μ ≤ ∫⁻ (a : α), ↑‖c‖₊ * ↑‖f a‖₊ ∂μ\n[PROOFSTEP]\nrefine' lintegral_mono _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedAddCommGroup 𝕜\ninst✝¹ : SMulZeroClass 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nc : 𝕜\nf : α → β\nhfi : ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\n⊢ (fun a => ↑‖c • f a‖₊) ≤ fun a => ↑‖c‖₊ * ↑‖f a‖₊\n[PROOFSTEP]\nintro i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedAddCommGroup 𝕜\ninst✝¹ : SMulZeroClass 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nc : 𝕜\nf : α → β\nhfi : ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\ni : α\n⊢ (fun a => ↑‖c • f a‖₊) i ≤ (fun a => ↑‖c‖₊ * ↑‖f a‖₊) i\n[PROOFSTEP]\nexact_mod_cast (nnnorm_smul_le c (f i))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedAddCommGroup 𝕜\ninst✝¹ : SMulZeroClass 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nc : 𝕜\nf : α → β\nhfi : ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\n⊢ ∫⁻ (a : α), ↑‖c‖₊ * ↑‖f a‖₊ ∂μ < ⊤\n[PROOFSTEP]\nrw [lintegral_const_mul']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedAddCommGroup 𝕜\ninst✝¹ : SMulZeroClass 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nc : 𝕜\nf : α → β\nhfi : ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\n⊢ ↑‖c‖₊ * ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\ncase hr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedAddCommGroup 𝕜\ninst✝¹ : SMulZeroClass 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nc : 𝕜\nf : α → β\nhfi : ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\n⊢ ↑‖c‖₊ ≠ ⊤\n[PROOFSTEP]\nexacts [mul_lt_top coe_ne_top hfi.ne, coe_ne_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : MulActionWithZero 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nc : 𝕜\nhc : IsUnit c\nf : α → β\n⊢ HasFiniteIntegral (c • f) ↔ HasFiniteIntegral f\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := hc\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : MulActionWithZero 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → β\nc : 𝕜ˣ\n⊢ HasFiniteIntegral (↑c • f) ↔ HasFiniteIntegral f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : MulActionWithZero 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → β\nc : 𝕜ˣ\n⊢ HasFiniteIntegral (↑c • f) → HasFiniteIntegral f\n[PROOFSTEP]\nintro h\n[GOAL]\ncase intro.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : MulActionWithZero 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → β\nc : 𝕜ˣ\nh : HasFiniteIntegral (↑c • f)\n⊢ HasFiniteIntegral f\n[PROOFSTEP]\nsimpa only [smul_smul, Units.inv_mul, one_smul] using h.smul ((c⁻¹ : 𝕜ˣ) : 𝕜)\n[GOAL]\ncase intro.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : MulActionWithZero 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → β\nc : 𝕜ˣ\n⊢ HasFiniteIntegral f → HasFiniteIntegral (↑c • f)\n[PROOFSTEP]\nexact HasFiniteIntegral.smul _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\n⊢ Memℒp f 1 ↔ Integrable f\n[PROOFSTEP]\nsimp_rw [Integrable, HasFiniteIntegral, Memℒp, snorm_one_eq_lintegral_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nc : β\n⊢ (Integrable fun x => c) ↔ c = 0 ∨ ↑↑μ univ < ⊤\n[PROOFSTEP]\nhave : AEStronglyMeasurable (fun _ : α => c) μ := aestronglyMeasurable_const\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nc : β\nthis : AEStronglyMeasurable (fun x => c) μ\n⊢ (Integrable fun x => c) ↔ c = 0 ∨ ↑↑μ univ < ⊤\n[PROOFSTEP]\nrw [Integrable, and_iff_right this, hasFiniteIntegral_const_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\np : ℝ≥0∞\nhf : Memℒp f p\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\n⊢ Integrable fun x => ‖f x‖ ^ ENNReal.toReal p\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\np : ℝ≥0∞\nhf : Memℒp f p\nhp_ne_zero : p ≠ 0\nhp_ne_top : p ≠ ⊤\n⊢ Memℒp (fun x => ‖f x‖ ^ ENNReal.toReal p) 1\n[PROOFSTEP]\nexact hf.norm_rpow hp_ne_zero hp_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\ninst✝ : IsFiniteMeasure μ\nf : α → β\np : ℝ≥0∞\nhf : Memℒp f p\n⊢ Integrable fun x => ‖f x‖ ^ ENNReal.toReal p\n[PROOFSTEP]\nby_cases h_zero : p = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\ninst✝ : IsFiniteMeasure μ\nf : α → β\np : ℝ≥0∞\nhf : Memℒp f p\nh_zero : p = 0\n⊢ Integrable fun x => ‖f x‖ ^ ENNReal.toReal p\n[PROOFSTEP]\nsimp [h_zero, integrable_const]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\ninst✝ : IsFiniteMeasure μ\nf : α → β\np : ℝ≥0∞\nhf : Memℒp f p\nh_zero : ¬p = 0\n⊢ Integrable fun x => ‖f x‖ ^ ENNReal.toReal p\n[PROOFSTEP]\nby_cases h_top : p = ∞\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\ninst✝ : IsFiniteMeasure μ\nf : α → β\np : ℝ≥0∞\nhf : Memℒp f p\nh_zero : ¬p = 0\nh_top : p = ⊤\n⊢ Integrable fun x => ‖f x‖ ^ ENNReal.toReal p\n[PROOFSTEP]\nsimp [h_top, integrable_const]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\ninst✝ : IsFiniteMeasure μ\nf : α → β\np : ℝ≥0∞\nhf : Memℒp f p\nh_zero : ¬p = 0\nh_top : ¬p = ⊤\n⊢ Integrable fun x => ‖f x‖ ^ ENNReal.toReal p\n[PROOFSTEP]\nexact hf.integrable_norm_rpow h_zero h_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nμ' : Measure α\nc : ℝ≥0∞\nhc : c ≠ ⊤\nhμ'_le : μ' ≤ c • μ\nf : α → β\nhf : Integrable f\n⊢ Integrable f\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at hf ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nμ' : Measure α\nc : ℝ≥0∞\nhc : c ≠ ⊤\nhμ'_le : μ' ≤ c • μ\nf : α → β\nhf : Memℒp f 1\n⊢ Memℒp f 1\n[PROOFSTEP]\nexact hf.of_measure_le_smul c hc hμ'_le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhμ : Integrable f\nhν : Integrable f\n⊢ Integrable f\n[PROOFSTEP]\nsimp_rw [← memℒp_one_iff_integrable] at hμ hν ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhμ : Memℒp f 1\nhν : Memℒp f 1\n⊢ Memℒp f 1\n[PROOFSTEP]\nrefine' ⟨hμ.aestronglyMeasurable.add_measure hν.aestronglyMeasurable, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhμ : Memℒp f 1\nhν : Memℒp f 1\n⊢ snorm f 1 (μ + ν) < ⊤\n[PROOFSTEP]\nrw [snorm_one_add_measure, ENNReal.add_lt_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhμ : Memℒp f 1\nhν : Memℒp f 1\n⊢ snorm f 1 μ < ⊤ ∧ snorm f 1 ν < ⊤\n[PROOFSTEP]\nexact ⟨hμ.snorm_lt_top, hν.snorm_lt_top⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nh : Integrable f\n⊢ Integrable f\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at h ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nh : Memℒp f 1\n⊢ Memℒp f 1\n[PROOFSTEP]\nexact h.left_of_add_measure\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nh : Integrable f\n⊢ Integrable f\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at h ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nh : Memℒp f 1\n⊢ Memℒp f 1\n[PROOFSTEP]\nexact h.right_of_add_measure\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm✝ : MeasurableSpace α\nμ✝ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nι : Type u_5\nm : MeasurableSpace α\nf : α → β\nμ : ι → Measure α\ns : Finset ι\n⊢ Integrable f ↔ ∀ (i : ι), i ∈ s → Integrable f\n[PROOFSTEP]\ninduction s using Finset.induction_on\n[GOAL]\ncase empty\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm✝ : MeasurableSpace α\nμ✝ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nι : Type u_5\nm : MeasurableSpace α\nf : α → β\nμ : ι → Measure α\n⊢ Integrable f ↔ ∀ (i : ι), i ∈ ∅ → Integrable f\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase insert\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm✝ : MeasurableSpace α\nμ✝ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nι : Type u_5\nm : MeasurableSpace α\nf : α → β\nμ : ι → Measure α\na✝² : ι\ns✝ : Finset ι\na✝¹ : ¬a✝² ∈ s✝\na✝ : Integrable f ↔ ∀ (i : ι), i ∈ s✝ → Integrable f\n⊢ Integrable f ↔ ∀ (i : ι), i ∈ insert a✝² s✝ → Integrable f\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nh : Integrable f\nc : ℝ≥0∞\nhc : c ≠ ⊤\n⊢ Integrable f\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at h ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nh : Memℒp f 1\nc : ℝ≥0∞\nhc : c ≠ ⊤\n⊢ Memℒp f 1\n[PROOFSTEP]\nexact h.smul_measure hc\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nc : ℝ≥0∞\nh₁ : c ≠ 0\nh₂ : c ≠ ⊤\nh : Integrable f\n⊢ Integrable f\n[PROOFSTEP]\nsimpa only [smul_smul, ENNReal.inv_mul_cancel h₁ h₂, one_smul] using h.smul_measure (ENNReal.inv_ne_top.2 h₁)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nc : ℝ≥0∞\nh₁ : c ≠ 0\nh₂ : c ≠ ⊤\n⊢ c⁻¹ ≠ 0\n[PROOFSTEP]\nsimpa using h₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nc : ℝ≥0∞\nh₁ : c ≠ 0\nh₂ : c ≠ ⊤\n⊢ c⁻¹ ≠ ⊤\n[PROOFSTEP]\nsimpa using h₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nh : Integrable f\n⊢ Integrable f\n[PROOFSTEP]\nrcases eq_or_ne μ 0 with (rfl | hne)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nh : Integrable f\n⊢ Integrable f\n[PROOFSTEP]\nrwa [smul_zero]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nh : Integrable f\nhne : μ ≠ 0\n⊢ Integrable f\n[PROOFSTEP]\napply h.smul_measure\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nh : Integrable f\nhne : μ ≠ 0\n⊢ (↑↑μ univ)⁻¹ ≠ ⊤\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\ninst✝ : IsFiniteMeasure μ\nf : α → β\nh : μ = 0\n⊢ Integrable f ↔ Integrable f\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → δ\ng : δ → β\nhg : AEStronglyMeasurable g (Measure.map f μ)\nhf : AEMeasurable f\n⊢ Integrable g ↔ Integrable (g ∘ f)\n[PROOFSTEP]\nsimp_rw [← memℒp_one_iff_integrable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → δ\ng : δ → β\nhg : AEStronglyMeasurable g (Measure.map f μ)\nhf : AEMeasurable f\n⊢ Memℒp g 1 ↔ Memℒp (g ∘ f) 1\n[PROOFSTEP]\nexact memℒp_map_measure_iff hg hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → δ\nhf : MeasurableEmbedding f\ng : δ → β\n⊢ Integrable g ↔ Integrable (g ∘ f)\n[PROOFSTEP]\nsimp_rw [← memℒp_one_iff_integrable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → δ\nhf : MeasurableEmbedding f\ng : δ → β\n⊢ Memℒp g 1 ↔ Memℒp (g ∘ f) 1\n[PROOFSTEP]\nexact hf.memℒp_map_measure_iff\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α ≃ᵐ δ\ng : δ → β\n⊢ Integrable g ↔ Integrable (g ∘ ↑f)\n[PROOFSTEP]\nsimp_rw [← memℒp_one_iff_integrable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α ≃ᵐ δ\ng : δ → β\n⊢ Memℒp g 1 ↔ Memℒp (g ∘ ↑f) 1\n[PROOFSTEP]\nexact f.memℒp_map_measure_iff\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν✝ : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nν : Measure δ\ng : δ → β\nf : α → δ\nhf : MeasurePreserving f\nhg : AEStronglyMeasurable g ν\n⊢ Integrable (g ∘ f) ↔ Integrable g\n[PROOFSTEP]\nrw [← hf.map_eq] at hg ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν✝ : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nν : Measure δ\ng : δ → β\nf : α → δ\nhf : MeasurePreserving f\nhg : AEStronglyMeasurable g (Measure.map f μ)\n⊢ Integrable (g ∘ f) ↔ Integrable g\n[PROOFSTEP]\nexact (integrable_map_measure hg hf.measurable.aemeasurable).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : α → β\nhf : Integrable f\nhg : Integrable g\n⊢ ∫⁻ (a : α), edist (f a) (OfNat.ofNat 0 a) ∂μ < ⊤ ∧ ∫⁻ (a : α), edist (g a) (OfNat.ofNat 0 a) ∂μ < ⊤\n[PROOFSTEP]\nsimp_rw [Pi.zero_apply, ← hasFiniteIntegral_iff_edist]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : α → β\nhf : Integrable f\nhg : Integrable g\n⊢ (HasFiniteIntegral fun a => f a) ∧ HasFiniteIntegral fun a => g a\n[PROOFSTEP]\nexact ⟨hf.hasFiniteIntegral, hg.hasFiniteIntegral⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\n⊢ Integrable fun x => 0\n[PROOFSTEP]\nsimp [Integrable, aestronglyMeasurable_const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : α → β\nhf : Integrable f\nhg : Integrable g\na : α\n⊢ ↑‖f a + g a‖₊ ≤ ↑‖f a‖₊ + ↑‖g a‖₊\n[PROOFSTEP]\nexact_mod_cast nnnorm_add_le _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nι : Type u_5\ns : Finset ι\nf : ι → α → β\nhf : ∀ (i : ι), i ∈ s → Integrable (f i)\n⊢ Integrable fun a => ∑ i in s, f i a\n[PROOFSTEP]\nsimpa only [← Finset.sum_apply] using integrable_finset_sum' s hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : α → β\nhf : Integrable f\nhg : Integrable g\n⊢ Integrable (f - g)\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β✝\ninst✝¹ : NormedAddCommGroup γ\nβ : Type u_5\ninst✝ : NormedLatticeAddCommGroup β\nf g : α → β\nhf : Integrable f\nhg : Integrable g\n⊢ Integrable (f ⊓ g)\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at hf hg ⊢\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β✝\ninst✝¹ : NormedAddCommGroup γ\nβ : Type u_5\ninst✝ : NormedLatticeAddCommGroup β\nf g : α → β\nhf : Memℒp f 1\nhg : Memℒp g 1\n⊢ Memℒp (f ⊓ g) 1\n[PROOFSTEP]\nexact hf.inf hg\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β✝\ninst✝¹ : NormedAddCommGroup γ\nβ : Type u_5\ninst✝ : NormedLatticeAddCommGroup β\nf g : α → β\nhf : Integrable f\nhg : Integrable g\n⊢ Integrable (f ⊔ g)\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at hf hg ⊢\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β✝\ninst✝¹ : NormedAddCommGroup γ\nβ : Type u_5\ninst✝ : NormedLatticeAddCommGroup β\nf g : α → β\nhf : Memℒp f 1\nhg : Memℒp g 1\n⊢ Memℒp (f ⊔ g) 1\n[PROOFSTEP]\nexact hf.sup hg\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β✝\ninst✝¹ : NormedAddCommGroup γ\nβ : Type u_5\ninst✝ : NormedLatticeAddCommGroup β\nf : α → β\nhf : Integrable f\n⊢ Integrable fun a => |f a|\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at hf ⊢\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β✝\ninst✝¹ : NormedAddCommGroup γ\nβ : Type u_5\ninst✝ : NormedLatticeAddCommGroup β\nf : α → β\nhf : Memℒp f 1\n⊢ Memℒp (fun a => |f a|) 1\n[PROOFSTEP]\nexact hf.abs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhfbdd : ∃ C, ∀ (x : α), ‖f x‖ ≤ C\n⊢ Integrable fun x => f x * g x\n[PROOFSTEP]\ncases' isEmpty_or_nonempty α with hα hα\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhfbdd : ∃ C, ∀ (x : α), ‖f x‖ ≤ C\nhα : IsEmpty α\n⊢ Integrable fun x => f x * g x\n[PROOFSTEP]\nrw [μ.eq_zero_of_isEmpty]\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhfbdd : ∃ C, ∀ (x : α), ‖f x‖ ≤ C\nhα : IsEmpty α\n⊢ Integrable fun x => f x * g x\n[PROOFSTEP]\nexact integrable_zero_measure\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhfbdd : ∃ C, ∀ (x : α), ‖f x‖ ≤ C\nhα : Nonempty α\n⊢ Integrable fun x => f x * g x\n[PROOFSTEP]\nrefine' ⟨hm.mul hint.1, _⟩\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhfbdd : ∃ C, ∀ (x : α), ‖f x‖ ≤ C\nhα : Nonempty α\n⊢ HasFiniteIntegral fun x => f x * g x\n[PROOFSTEP]\nobtain ⟨C, hC⟩ := hfbdd\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhα : Nonempty α\nC : ℝ\nhC : ∀ (x : α), ‖f x‖ ≤ C\n⊢ HasFiniteIntegral fun x => f x * g x\n[PROOFSTEP]\nhave hCnonneg : 0 ≤ C := le_trans (norm_nonneg _) (hC hα.some)\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhα : Nonempty α\nC : ℝ\nhC : ∀ (x : α), ‖f x‖ ≤ C\nhCnonneg : 0 ≤ C\n⊢ HasFiniteIntegral fun x => f x * g x\n[PROOFSTEP]\nhave : (fun x => ‖f x * g x‖₊) ≤ fun x => ⟨C, hCnonneg⟩ * ‖g x‖₊ :=\n  by\n  intro x\n  simp only [nnnorm_mul]\n  exact mul_le_mul_of_nonneg_right (hC x) (zero_le _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhα : Nonempty α\nC : ℝ\nhC : ∀ (x : α), ‖f x‖ ≤ C\nhCnonneg : 0 ≤ C\n⊢ (fun x => ‖f x * g x‖₊) ≤ fun x => { val := C, property := hCnonneg } * ‖g x‖₊\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhα : Nonempty α\nC : ℝ\nhC : ∀ (x : α), ‖f x‖ ≤ C\nhCnonneg : 0 ≤ C\nx : α\n⊢ (fun x => ‖f x * g x‖₊) x ≤ (fun x => { val := C, property := hCnonneg } * ‖g x‖₊) x\n[PROOFSTEP]\nsimp only [nnnorm_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhα : Nonempty α\nC : ℝ\nhC : ∀ (x : α), ‖f x‖ ≤ C\nhCnonneg : 0 ≤ C\nx : α\n⊢ ‖f x‖₊ * ‖g x‖₊ ≤ { val := C, property := hCnonneg } * ‖g x‖₊\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right (hC x) (zero_le _)\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhα : Nonempty α\nC : ℝ\nhC : ∀ (x : α), ‖f x‖ ≤ C\nhCnonneg : 0 ≤ C\nthis : (fun x => ‖f x * g x‖₊) ≤ fun x => { val := C, property := hCnonneg } * ‖g x‖₊\n⊢ HasFiniteIntegral fun x => f x * g x\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (lintegral_mono_nnreal this) _\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhα : Nonempty α\nC : ℝ\nhC : ∀ (x : α), ‖f x‖ ≤ C\nhCnonneg : 0 ≤ C\nthis : (fun x => ‖f x * g x‖₊) ≤ fun x => { val := C, property := hCnonneg } * ‖g x‖₊\n⊢ ∫⁻ (a : α), ↑({ val := C, property := hCnonneg } * ‖g a‖₊) ∂μ < ⊤\n[PROOFSTEP]\nsimp only [ENNReal.coe_mul]\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhα : Nonempty α\nC : ℝ\nhC : ∀ (x : α), ‖f x‖ ≤ C\nhCnonneg : 0 ≤ C\nthis : (fun x => ‖f x * g x‖₊) ≤ fun x => { val := C, property := hCnonneg } * ‖g x‖₊\n⊢ ∫⁻ (a : α), ↑{ val := C, property := hCnonneg } * ↑‖g a‖₊ ∂μ < ⊤\n[PROOFSTEP]\nrw [lintegral_const_mul' _ _ ENNReal.coe_ne_top]\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nF : Type u_5\ninst✝ : NormedDivisionRing F\nf g : α → F\nhint : Integrable g\nhm : AEStronglyMeasurable f μ\nhα : Nonempty α\nC : ℝ\nhC : ∀ (x : α), ‖f x‖ ≤ C\nhCnonneg : 0 ≤ C\nthis : (fun x => ‖f x * g x‖₊) ≤ fun x => { val := C, property := hCnonneg } * ‖g x‖₊\n⊢ ↑{ val := C, property := hCnonneg } * ∫⁻ (a : α), ↑‖g a‖₊ ∂μ < ⊤\n[PROOFSTEP]\nexact ENNReal.mul_lt_top ENNReal.coe_ne_top (ne_of_lt hint.2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 β\nf : α → β\nhf : Integrable f\ng : α → 𝕜\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\n⊢ Integrable fun x => g x • f x\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 β\nf : α → β\nhf : Memℒp f 1\ng : α → 𝕜\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\n⊢ Memℒp (fun x => g x • f x) 1\n[PROOFSTEP]\nrefine' ⟨g_ae_strongly_measurable.smul hf.1, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 β\nf : α → β\nhf : Memℒp f 1\ng : α → 𝕜\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\n⊢ snorm (fun x => g x • f x) 1 μ < ⊤\n[PROOFSTEP]\nhave h : (1 : ℝ≥0∞) / 1 = 1 / ∞ + 1 / 1 := by norm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 β\nf : α → β\nhf : Memℒp f 1\ng : α → 𝕜\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\n⊢ 1 / 1 = 1 / ⊤ + 1 / 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 β\nf : α → β\nhf : Memℒp f 1\ng : α → 𝕜\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\nh : 1 / 1 = 1 / ⊤ + 1 / 1\n⊢ snorm (fun x => g x • f x) 1 μ < ⊤\n[PROOFSTEP]\nhave hg' : snorm g ∞ μ ≠ ∞ := by rwa [snorm_exponent_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 β\nf : α → β\nhf : Memℒp f 1\ng : α → 𝕜\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\nh : 1 / 1 = 1 / ⊤ + 1 / 1\n⊢ snorm g ⊤ μ ≠ ⊤\n[PROOFSTEP]\nrwa [snorm_exponent_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝¹ : NormedField 𝕜\ninst✝ : NormedSpace 𝕜 β\nf : α → β\nhf : Memℒp f 1\ng : α → 𝕜\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\nh : 1 / 1 = 1 / ⊤ + 1 / 1\nhg' : snorm g ⊤ μ ≠ ⊤\n⊢ snorm (fun x => g x • f x) 1 μ < ⊤\n[PROOFSTEP]\ncalc\n  snorm (fun x : α => g x • f x) 1 μ ≤ _ := MeasureTheory.snorm_smul_le_mul_snorm hf.1 g_ae_strongly_measurable h\n  _ < ∞ := ENNReal.mul_lt_top hg' hf.2.ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → 𝕜\nhf : Integrable f\ng : α → β\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\n⊢ Integrable fun x => f x • g x\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → 𝕜\nhf : Memℒp f 1\ng : α → β\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\n⊢ Memℒp (fun x => f x • g x) 1\n[PROOFSTEP]\nrefine' ⟨hf.1.smul g_ae_strongly_measurable, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → 𝕜\nhf : Memℒp f 1\ng : α → β\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\n⊢ snorm (fun x => f x • g x) 1 μ < ⊤\n[PROOFSTEP]\nhave h : (1 : ℝ≥0∞) / 1 = 1 / 1 + 1 / ∞ := by norm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → 𝕜\nhf : Memℒp f 1\ng : α → β\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\n⊢ 1 / 1 = 1 / 1 + 1 / ⊤\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → 𝕜\nhf : Memℒp f 1\ng : α → β\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\nh : 1 / 1 = 1 / 1 + 1 / ⊤\n⊢ snorm (fun x => f x • g x) 1 μ < ⊤\n[PROOFSTEP]\nhave hg' : snorm g ∞ μ ≠ ∞ := by rwa [snorm_exponent_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → 𝕜\nhf : Memℒp f 1\ng : α → β\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\nh : 1 / 1 = 1 / 1 + 1 / ⊤\n⊢ snorm g ⊤ μ ≠ ⊤\n[PROOFSTEP]\nrwa [snorm_exponent_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → 𝕜\nhf : Memℒp f 1\ng : α → β\ng_ae_strongly_measurable : AEStronglyMeasurable g μ\ness_sup_g : essSup (fun x => ↑‖g x‖₊) μ ≠ ⊤\nh : 1 / 1 = 1 / 1 + 1 / ⊤\nhg' : snorm g ⊤ μ ≠ ⊤\n⊢ snorm (fun x => f x • g x) 1 μ < ⊤\n[PROOFSTEP]\ncalc\n  snorm (fun x : α => f x • g x) 1 μ ≤ _ := MeasureTheory.snorm_smul_le_mul_snorm g_ae_strongly_measurable hf.1 h\n  _ < ∞ := ENNReal.mul_lt_top hf.2.ne hg'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : AEStronglyMeasurable f μ\n⊢ (Integrable fun a => ‖f a‖) ↔ Integrable f\n[PROOFSTEP]\nsimp_rw [Integrable, and_iff_right hf, and_iff_right hf.norm, hasFiniteIntegral_norm_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf₀ f₁ : α → β\ng : α → ℝ\nhf₁_m : AEStronglyMeasurable f₁ μ\nhf₀_i : Integrable f₀\nhg_i : Integrable g\nh : ∀ᵐ (a : α) ∂μ, ‖f₀ a - f₁ a‖ ≤ g a\n⊢ ∀ᵐ (a : α) ∂μ, ‖f₁ a‖ ≤ ‖f₀ a‖ + g a\n[PROOFSTEP]\napply h.mono\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf₀ f₁ : α → β\ng : α → ℝ\nhf₁_m : AEStronglyMeasurable f₁ μ\nhf₀_i : Integrable f₀\nhg_i : Integrable g\nh : ∀ᵐ (a : α) ∂μ, ‖f₀ a - f₁ a‖ ≤ g a\n⊢ ∀ (x : α), ‖f₀ x - f₁ x‖ ≤ g x → ‖f₁ x‖ ≤ ‖f₀ x‖ + g x\n[PROOFSTEP]\nintro a ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf₀ f₁ : α → β\ng : α → ℝ\nhf₁_m : AEStronglyMeasurable f₁ μ\nhf₀_i : Integrable f₀\nhg_i : Integrable g\nh : ∀ᵐ (a : α) ∂μ, ‖f₀ a - f₁ a‖ ≤ g a\na : α\nha : ‖f₀ a - f₁ a‖ ≤ g a\n⊢ ‖f₁ a‖ ≤ ‖f₀ a‖ + g a\n[PROOFSTEP]\ncalc\n  ‖f₁ a‖ ≤ ‖f₀ a‖ + ‖f₀ a - f₁ a‖ := norm_le_insert _ _\n  _ ≤ ‖f₀ a‖ + g a := add_le_add_left ha _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : Integrable f\nε : ℝ\nhε : 0 < ε\n⊢ ↑↑μ {x | ε ≤ ‖f x‖} < ⊤\n[PROOFSTEP]\nrw [show {x | ε ≤ ‖f x‖} = {x | ENNReal.ofReal ε ≤ ‖f x‖₊} by\n    simp only [ENNReal.ofReal, Real.toNNReal_le_iff_le_coe, ENNReal.coe_le_coe, coe_nnnorm]]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : Integrable f\nε : ℝ\nhε : 0 < ε\n⊢ {x | ε ≤ ‖f x‖} = {x | ENNReal.ofReal ε ≤ ↑‖f x‖₊}\n[PROOFSTEP]\nsimp only [ENNReal.ofReal, Real.toNNReal_le_iff_le_coe, ENNReal.coe_le_coe, coe_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : Integrable f\nε : ℝ\nhε : 0 < ε\n⊢ ↑↑μ {x | ENNReal.ofReal ε ≤ ↑‖f x‖₊} < ⊤\n[PROOFSTEP]\nrefine' (meas_ge_le_mul_pow_snorm μ one_ne_zero ENNReal.one_ne_top hf.1 _).trans_lt _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : Integrable f\nε : ℝ\nhε : 0 < ε\n⊢ ENNReal.ofReal ε ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, ENNReal.ofReal_eq_zero, not_le] using hε\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : Integrable f\nε : ℝ\nhε : 0 < ε\n⊢ (ENNReal.ofReal ε)⁻¹ ^ ENNReal.toReal 1 * snorm f 1 μ ^ ENNReal.toReal 1 < ⊤\n[PROOFSTEP]\napply ENNReal.mul_lt_top\n[GOAL]\ncase refine'_2.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : Integrable f\nε : ℝ\nhε : 0 < ε\n⊢ (ENNReal.ofReal ε)⁻¹ ^ ENNReal.toReal 1 ≠ ⊤\n[PROOFSTEP]\nsimpa only [ENNReal.one_toReal, ENNReal.rpow_one, Ne.def, ENNReal.inv_eq_top, ENNReal.ofReal_eq_zero, not_le] using hε\n[GOAL]\ncase refine'_2.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : Integrable f\nε : ℝ\nhε : 0 < ε\n⊢ snorm f 1 μ ^ ENNReal.toReal 1 ≠ ⊤\n[PROOFSTEP]\nsimpa only [ENNReal.one_toReal, ENNReal.rpow_one] using (memℒp_one_iff_integrable.2 hf).snorm_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nK K' : ℝ≥0\nf : α → β\ng : β → γ\nhg : LipschitzWith K g\nhg' : AntilipschitzWith K' g\ng0 : g 0 = 0\n⊢ Integrable (g ∘ f) ↔ Integrable f\n[PROOFSTEP]\nsimp [← memℒp_one_iff_integrable, hg.memℒp_comp_iff_of_antilipschitz hg' g0]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ\nhf : Integrable f\n⊢ Integrable fun x => ↑(Real.toNNReal (f x))\n[PROOFSTEP]\nrefine' ⟨hf.aestronglyMeasurable.aemeasurable.real_toNNReal.coe_nnreal_real.aestronglyMeasurable, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ\nhf : Integrable f\n⊢ HasFiniteIntegral fun x => ↑(Real.toNNReal (f x))\n[PROOFSTEP]\nrw [hasFiniteIntegral_iff_norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ\nhf : Integrable f\n⊢ ∫⁻ (a : α), ENNReal.ofReal ‖↑(Real.toNNReal (f a))‖ ∂μ < ⊤\n[PROOFSTEP]\nrefine' lt_of_le_of_lt _ ((hasFiniteIntegral_iff_norm _).1 hf.hasFiniteIntegral)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ\nhf : Integrable f\n⊢ ∫⁻ (a : α), ENNReal.ofReal ‖↑(Real.toNNReal (f a))‖ ∂μ ≤ ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ\n[PROOFSTEP]\napply lintegral_mono\n[GOAL]\ncase hfg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ\nhf : Integrable f\n⊢ (fun a => ENNReal.ofReal ‖↑(Real.toNNReal (f a))‖) ≤ fun a => ENNReal.ofReal ‖f a‖\n[PROOFSTEP]\nintro x\n[GOAL]\ncase hfg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ\nhf : Integrable f\nx : α\n⊢ (fun a => ENNReal.ofReal ‖↑(Real.toNNReal (f a))‖) x ≤ (fun a => ENNReal.ofReal ‖f a‖) x\n[PROOFSTEP]\nsimp [ENNReal.ofReal_le_ofReal, abs_le, le_abs_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∀ᵐ (x : α) ∂μ, f x < ⊤\n⊢ (fun x => ENNReal.ofReal (ENNReal.toReal (f x))) =ᵐ[μ] f\n[PROOFSTEP]\nfilter_upwards [hf]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∀ᵐ (x : α) ∂μ, f x < ⊤\n⊢ ∀ (a : α), f a < ⊤ → ENNReal.ofReal (ENNReal.toReal (f a)) = f a\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∀ᵐ (x : α) ∂μ, f x < ⊤\nx : α\nhx : f x < ⊤\n⊢ ENNReal.ofReal (ENNReal.toReal (f x)) = f x\n[PROOFSTEP]\nsimp only [hx.ne, ofReal_toReal, Ne.def, not_false_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∀ᵐ (x : α) ∂μ, f x < ⊤\n⊢ (fun x => ↑(ENNReal.toNNReal (f x))) =ᵐ[μ] f\n[PROOFSTEP]\nfilter_upwards [hf]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∀ᵐ (x : α) ∂μ, f x < ⊤\n⊢ ∀ (a : α), f a < ⊤ → ↑(ENNReal.toNNReal (f a)) = f a\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : ∀ᵐ (x : α) ∂μ, f x < ⊤\nx : α\nhx : f x < ⊤\n⊢ ↑(ENNReal.toNNReal (f x)) = f x\n[PROOFSTEP]\nsimp only [hx.ne, Ne.def, not_false_iff, coe_toNNReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\n⊢ Integrable g ↔ Integrable fun x => ↑(f x) • g x\n[PROOFSTEP]\nby_cases H : AEStronglyMeasurable (fun x : α => (f x : ℝ) • g x) μ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\nH : AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n⊢ Integrable g ↔ Integrable fun x => ↑(f x) • g x\n[PROOFSTEP]\nsimp only [Integrable, aestronglyMeasurable_withDensity_iff hf, HasFiniteIntegral, H, true_and_iff]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\nH : AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n⊢ (∫⁻ (a : α), ↑‖g a‖₊ ∂Measure.withDensity μ fun x => ↑(f x)) < ⊤ ↔ ∫⁻ (a : α), ↑‖↑(f a) • g a‖₊ ∂μ < ⊤\n[PROOFSTEP]\nrw [lintegral_withDensity_eq_lintegral_mul₀' hf.coe_nnreal_ennreal.aemeasurable]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\nH : AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n⊢ ∫⁻ (a : α), ((fun x => ↑(f x)) * fun a => ↑‖g a‖₊) a ∂μ < ⊤ ↔ ∫⁻ (a : α), ↑‖↑(f a) • g a‖₊ ∂μ < ⊤\n[PROOFSTEP]\nrw [iff_iff_eq]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\nH : AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n⊢ (∫⁻ (a : α), ((fun x => ↑(f x)) * fun a => ↑‖g a‖₊) a ∂μ < ⊤) = (∫⁻ (a : α), ↑‖↑(f a) • g a‖₊ ∂μ < ⊤)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase pos.e_a.e_f\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\nH : AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n⊢ (fun a => ((fun x => ↑(f x)) * fun a => ↑‖g a‖₊) a) = fun a => ↑‖↑(f a) • g a‖₊\n[PROOFSTEP]\next1 x\n[GOAL]\ncase pos.e_a.e_f.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\nH : AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\nx : α\n⊢ ((fun x => ↑(f x)) * fun a => ↑‖g a‖₊) x = ↑‖↑(f x) • g x‖₊\n[PROOFSTEP]\nsimp only [nnnorm_smul, NNReal.nnnorm_eq, coe_mul, Pi.mul_apply]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\nH : AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n⊢ AEMeasurable fun a => ↑‖g a‖₊\n[PROOFSTEP]\nrw [aemeasurable_withDensity_ennreal_iff hf]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\nH : AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n⊢ AEMeasurable fun x => ↑(f x) * ↑‖g x‖₊\n[PROOFSTEP]\nconvert H.ennnorm using 1\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\nH : AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n⊢ (fun x => ↑(f x) * ↑‖g x‖₊) = fun a => ↑‖↑(f a) • g a‖₊\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\nH : AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\nx : α\n⊢ ↑(f x) * ↑‖g x‖₊ = ↑‖↑(f x) • g x‖₊\n[PROOFSTEP]\nsimp only [nnnorm_smul, NNReal.nnnorm_eq, coe_mul]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : Measurable f\ng : α → E\nH : ¬AEStronglyMeasurable (fun x => ↑(f x) • g x) μ\n⊢ Integrable g ↔ Integrable fun x => ↑(f x) • g x\n[PROOFSTEP]\nsimp only [Integrable, aestronglyMeasurable_withDensity_iff hf, H, false_and_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0∞\nhf : Measurable f\nhflt : ∀ᵐ (x : α) ∂μ, f x < ⊤\ng : α → E\n⊢ Integrable g ↔ Integrable fun x => ENNReal.toReal (f x) • g x\n[PROOFSTEP]\nrw [← withDensity_congr_ae (coe_toNNReal_ae_eq hflt), integrable_withDensity_iff_integrable_smul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0∞\nhf : Measurable f\nhflt : ∀ᵐ (x : α) ∂μ, f x < ⊤\ng : α → E\n⊢ (Integrable fun x => ENNReal.toNNReal (f x) • g x) ↔ Integrable fun x => ENNReal.toReal (f x) • g x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0∞\nhf : Measurable f\nhflt : ∀ᵐ (x : α) ∂μ, f x < ⊤\ng : α → E\n⊢ Measurable fun x => ENNReal.toNNReal (f x)\n[PROOFSTEP]\nexact hf.ennreal_toNNReal\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\n⊢ Integrable g ↔ Integrable g\n[PROOFSTEP]\nsuffices (fun x => (f x : ℝ≥0∞)) =ᵐ[μ] (fun x => (hf.mk f x : ℝ≥0)) by rw [withDensity_congr_ae this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\nthis : (fun x => ↑(f x)) =ᵐ[μ] fun x => ↑(AEMeasurable.mk f hf x)\n⊢ Integrable g ↔ Integrable g\n[PROOFSTEP]\nrw [withDensity_congr_ae this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\n⊢ (fun x => ↑(f x)) =ᵐ[μ] fun x => ↑(AEMeasurable.mk f hf x)\n[PROOFSTEP]\nfilter_upwards [hf.ae_eq_mk] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\nx : α\nhx : f x = AEMeasurable.mk f hf x\n⊢ ↑(f x) = ↑(AEMeasurable.mk f hf x)\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\n⊢ (Integrable fun x => ↑(AEMeasurable.mk f hf x) • g x) ↔ Integrable fun x => ↑(f x) • g x\n[PROOFSTEP]\napply integrable_congr\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\n⊢ (fun x => ↑(AEMeasurable.mk f hf x) • g x) =ᵐ[μ] fun x => ↑(f x) • g x\n[PROOFSTEP]\nfilter_upwards [hf.ae_eq_mk] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\nx : α\nhx : f x = AEMeasurable.mk f hf x\n⊢ ↑(AEMeasurable.mk f hf x) • g x = ↑(f x) • g x\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : Measurable f\nhflt : ∀ᵐ (x : α) ∂μ, f x < ⊤\ng : α → ℝ\n⊢ Integrable g ↔ Integrable fun x => g x * ENNReal.toReal (f x)\n[PROOFSTEP]\nhave : (fun x => g x * (f x).toReal) = fun x => (f x).toReal • g x := by simp [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : Measurable f\nhflt : ∀ᵐ (x : α) ∂μ, f x < ⊤\ng : α → ℝ\n⊢ (fun x => g x * ENNReal.toReal (f x)) = fun x => ENNReal.toReal (f x) • g x\n[PROOFSTEP]\nsimp [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : Measurable f\nhflt : ∀ᵐ (x : α) ∂μ, f x < ⊤\ng : α → ℝ\nthis : (fun x => g x * ENNReal.toReal (f x)) = fun x => ENNReal.toReal (f x) • g x\n⊢ Integrable g ↔ Integrable fun x => g x * ENNReal.toReal (f x)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhf : Measurable f\nhflt : ∀ᵐ (x : α) ∂μ, f x < ⊤\ng : α → ℝ\nthis : (fun x => g x * ENNReal.toReal (f x)) = fun x => ENNReal.toReal (f x) • g x\n⊢ Integrable g ↔ Integrable fun x => ENNReal.toReal (f x) • g x\n[PROOFSTEP]\nexact integrable_withDensity_iff_integrable_smul' hf hflt\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\n⊢ ∀ (x y : { x // x ∈ Lp E 1 }),\n    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (x + y) =\n      (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x +\n        (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) y\n[PROOFSTEP]\nintro u v\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu v : { x // x ∈ Lp E 1 }\n⊢ (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =\n    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n      (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu v : { x // x ∈ Lp E 1 }\n⊢ ↑↑((fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v)) =ᵐ[μ]\n    ↑↑((fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n          (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v)\n[PROOFSTEP]\nfilter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp, (memℒ1_smul_of_L1_withDensity f_meas v).coeFn_toLp,\n  (memℒ1_smul_of_L1_withDensity f_meas (u + v)).coeFn_toLp,\n  Lp.coeFn_add ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _) ((memℒ1_smul_of_L1_withDensity f_meas v).toLp _),\n  (ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_add u v)]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu v : { x // x ∈ Lp E 1 }\n⊢ ∀ (a : α),\n    ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) a = f a • ↑↑u a →\n      ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)) a = f a • ↑↑v a →\n        ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) a = f a • ↑↑(u + v) a →\n          ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +\n                      Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))\n                a =\n              (↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) +\n                  ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)))\n                a →\n            (↑(f a) ≠ 0 → ↑↑(u + v) a = (↑↑u + ↑↑v) a) →\n              ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) a =\n                ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +\n                        Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))\n                  a\n[PROOFSTEP]\nintro x hu hv huv h' h''\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu v : { x // x ∈ Lp E 1 }\nx : α\nhu : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\nhv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)) x = f x • ↑↑v x\nhuv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) x = f x • ↑↑(u + v) x\nh' :\n  ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +\n            Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))\n      x =\n    (↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) +\n        ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)))\n      x\nh'' : ↑(f x) ≠ 0 → ↑↑(u + v) x = (↑↑u + ↑↑v) x\n⊢ ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) x =\n    ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +\n            Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))\n      x\n[PROOFSTEP]\nrw [huv, h', Pi.add_apply, hu, hv]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu v : { x // x ∈ Lp E 1 }\nx : α\nhu : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\nhv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)) x = f x • ↑↑v x\nhuv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) x = f x • ↑↑(u + v) x\nh' :\n  ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +\n            Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))\n      x =\n    (↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) +\n        ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)))\n      x\nh'' : ↑(f x) ≠ 0 → ↑↑(u + v) x = (↑↑u + ↑↑v) x\n⊢ f x • ↑↑(u + v) x = f x • ↑↑u x + f x • ↑↑v x\n[PROOFSTEP]\nrcases eq_or_ne (f x) 0 with (hx | hx)\n[GOAL]\ncase h.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu v : { x // x ∈ Lp E 1 }\nx : α\nhu : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\nhv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)) x = f x • ↑↑v x\nhuv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) x = f x • ↑↑(u + v) x\nh' :\n  ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +\n            Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))\n      x =\n    (↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) +\n        ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)))\n      x\nh'' : ↑(f x) ≠ 0 → ↑↑(u + v) x = (↑↑u + ↑↑v) x\nhx : f x = 0\n⊢ f x • ↑↑(u + v) x = f x • ↑↑u x + f x • ↑↑v x\n[PROOFSTEP]\nsimp only [hx, zero_smul, add_zero]\n[GOAL]\ncase h.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu v : { x // x ∈ Lp E 1 }\nx : α\nhu : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\nhv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)) x = f x • ↑↑v x\nhuv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) x = f x • ↑↑(u + v) x\nh' :\n  ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +\n            Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))\n      x =\n    (↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) +\n        ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)))\n      x\nh'' : ↑(f x) ≠ 0 → ↑↑(u + v) x = (↑↑u + ↑↑v) x\nhx : f x ≠ 0\n⊢ f x • ↑↑(u + v) x = f x • ↑↑u x + f x • ↑↑v x\n[PROOFSTEP]\nrw [h'' _, Pi.add_apply, smul_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu v : { x // x ∈ Lp E 1 }\nx : α\nhu : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\nhv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)) x = f x • ↑↑v x\nhuv : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(u + v) x) (_ : Memℒp (fun x => f x • ↑↑(u + v) x) 1)) x = f x • ↑↑(u + v) x\nh' :\n  ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1) +\n            Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1))\n      x =\n    (↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) +\n        ↑↑(Memℒp.toLp (fun x => f x • ↑↑v x) (_ : Memℒp (fun x => f x • ↑↑v x) 1)))\n      x\nh'' : ↑(f x) ≠ 0 → ↑↑(u + v) x = (↑↑u + ↑↑v) x\nhx : f x ≠ 0\n⊢ ↑(f x) ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, ENNReal.coe_eq_zero] using hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\n⊢ ∀ (r : ℝ) (x : { x // x ∈ Lp E 1 }),\n    AddHom.toFun\n        { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),\n          map_add' :=\n            (_ :\n              ∀ (u v : { x // x ∈ Lp E 1 }),\n                (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =\n                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }\n        (r • x) =\n      ↑(RingHom.id ℝ) r •\n        AddHom.toFun\n          { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),\n            map_add' :=\n              (_ :\n                ∀ (u v : { x // x ∈ Lp E 1 }),\n                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =\n                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n                      (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }\n          x\n[PROOFSTEP]\nintro r u\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nr : ℝ\nu : { x // x ∈ Lp E 1 }\n⊢ AddHom.toFun\n      { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),\n        map_add' :=\n          (_ :\n            ∀ (u v : { x // x ∈ Lp E 1 }),\n              (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =\n                (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }\n      (r • u) =\n    ↑(RingHom.id ℝ) r •\n      AddHom.toFun\n        { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),\n          map_add' :=\n            (_ :\n              ∀ (u v : { x // x ∈ Lp E 1 }),\n                (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =\n                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }\n        u\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nr : ℝ\nu : { x // x ∈ Lp E 1 }\n⊢ ↑↑(AddHom.toFun\n          { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),\n            map_add' :=\n              (_ :\n                ∀ (u v : { x // x ∈ Lp E 1 }),\n                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =\n                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n                      (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }\n          (r • u)) =ᵐ[μ]\n    ↑↑(↑(RingHom.id ℝ) r •\n          AddHom.toFun\n            { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),\n              map_add' :=\n                (_ :\n                  ∀ (u v : { x // x ∈ Lp E 1 }),\n                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =\n                      (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n                        (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }\n            u)\n[PROOFSTEP]\nfilter_upwards [(ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 (Lp.coeFn_smul r u),\n  (memℒ1_smul_of_L1_withDensity f_meas (r • u)).coeFn_toLp,\n  Lp.coeFn_smul r ((memℒ1_smul_of_L1_withDensity f_meas u).toLp _), (memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nr : ℝ\nu : { x // x ∈ Lp E 1 }\n⊢ ∀ (a : α),\n    (↑(f a) ≠ 0 → ↑↑(r • u) a = (r • ↑↑u) a) →\n      ↑↑(Memℒp.toLp (fun x => f x • ↑↑(r • u) x) (_ : Memℒp (fun x => f x • ↑↑(r • u) x) 1)) a = f a • ↑↑(r • u) a →\n        ↑↑(r • Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) a =\n            (r • ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))) a →\n          ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) a = f a • ↑↑u a →\n            ↑↑(Memℒp.toLp (fun x => f x • ↑↑(r • u) x) (_ : Memℒp (fun x => f x • ↑↑(r • u) x) 1)) a =\n              ↑↑(↑(RingHom.id ℝ) r • Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) a\n[PROOFSTEP]\nintro x h h' h'' h'''\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nr : ℝ\nu : { x // x ∈ Lp E 1 }\nx : α\nh : ↑(f x) ≠ 0 → ↑↑(r • u) x = (r • ↑↑u) x\nh' : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(r • u) x) (_ : Memℒp (fun x => f x • ↑↑(r • u) x) 1)) x = f x • ↑↑(r • u) x\nh'' :\n  ↑↑(r • Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x =\n    (r • ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))) x\nh''' : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\n⊢ ↑↑(Memℒp.toLp (fun x => f x • ↑↑(r • u) x) (_ : Memℒp (fun x => f x • ↑↑(r • u) x) 1)) x =\n    ↑↑(↑(RingHom.id ℝ) r • Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x\n[PROOFSTEP]\nrw [RingHom.id_apply, h', h'', Pi.smul_apply, h''']\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nr : ℝ\nu : { x // x ∈ Lp E 1 }\nx : α\nh : ↑(f x) ≠ 0 → ↑↑(r • u) x = (r • ↑↑u) x\nh' : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(r • u) x) (_ : Memℒp (fun x => f x • ↑↑(r • u) x) 1)) x = f x • ↑↑(r • u) x\nh'' :\n  ↑↑(r • Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x =\n    (r • ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))) x\nh''' : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\n⊢ f x • ↑↑(r • u) x = r • f x • ↑↑u x\n[PROOFSTEP]\nrcases eq_or_ne (f x) 0 with (hx | hx)\n[GOAL]\ncase h.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nr : ℝ\nu : { x // x ∈ Lp E 1 }\nx : α\nh : ↑(f x) ≠ 0 → ↑↑(r • u) x = (r • ↑↑u) x\nh' : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(r • u) x) (_ : Memℒp (fun x => f x • ↑↑(r • u) x) 1)) x = f x • ↑↑(r • u) x\nh'' :\n  ↑↑(r • Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x =\n    (r • ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))) x\nh''' : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\nhx : f x = 0\n⊢ f x • ↑↑(r • u) x = r • f x • ↑↑u x\n[PROOFSTEP]\nsimp only [hx, zero_smul, smul_zero]\n[GOAL]\ncase h.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nr : ℝ\nu : { x // x ∈ Lp E 1 }\nx : α\nh : ↑(f x) ≠ 0 → ↑↑(r • u) x = (r • ↑↑u) x\nh' : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(r • u) x) (_ : Memℒp (fun x => f x • ↑↑(r • u) x) 1)) x = f x • ↑↑(r • u) x\nh'' :\n  ↑↑(r • Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x =\n    (r • ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))) x\nh''' : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\nhx : f x ≠ 0\n⊢ f x • ↑↑(r • u) x = r • f x • ↑↑u x\n[PROOFSTEP]\nrw [h _, smul_comm, Pi.smul_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nr : ℝ\nu : { x // x ∈ Lp E 1 }\nx : α\nh : ↑(f x) ≠ 0 → ↑↑(r • u) x = (r • ↑↑u) x\nh' : ↑↑(Memℒp.toLp (fun x => f x • ↑↑(r • u) x) (_ : Memℒp (fun x => f x • ↑↑(r • u) x) 1)) x = f x • ↑↑(r • u) x\nh'' :\n  ↑↑(r • Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x =\n    (r • ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))) x\nh''' : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\nhx : f x ≠ 0\n⊢ ↑(f x) ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, ENNReal.coe_eq_zero] using hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\n⊢ ∀ (x : { x // x ∈ Lp E 1 }),\n    ‖↑{\n              toAddHom :=\n                { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),\n                  map_add' :=\n                    (_ :\n                      ∀ (u v : { x // x ∈ Lp E 1 }),\n                        (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =\n                          (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n                            (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : ℝ) (u : { x // x ∈ Lp E 1 }),\n                    AddHom.toFun\n                        { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),\n                          map_add' :=\n                            (_ :\n                              ∀ (u v : { x // x ∈ Lp E 1 }),\n                                (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))\n                                    (u + v) =\n                                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n                                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))\n                                      v) }\n                        (r • u) =\n                      ↑(RingHom.id ℝ) r •\n                        AddHom.toFun\n                          { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),\n                            map_add' :=\n                              (_ :\n                                ∀ (u v : { x // x ∈ Lp E 1 }),\n                                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))\n                                      (u + v) =\n                                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))\n                                        u +\n                                      (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))\n                                        v) }\n                          u) }\n          x‖ =\n      ‖x‖\n[PROOFSTEP]\nintro u\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu : { x // x ∈ Lp E 1 }\n⊢ ‖↑{\n            toAddHom :=\n              { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),\n                map_add' :=\n                  (_ :\n                    ∀ (u v : { x // x ∈ Lp E 1 }),\n                      (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) (u + v) =\n                        (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n                          (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) },\n            map_smul' :=\n              (_ :\n                ∀ (r : ℝ) (u : { x // x ∈ Lp E 1 }),\n                  AddHom.toFun\n                      { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),\n                        map_add' :=\n                          (_ :\n                            ∀ (u v : { x // x ∈ Lp E 1 }),\n                              (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))\n                                  (u + v) =\n                                (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n                                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) v) }\n                      (r • u) =\n                    ↑(RingHom.id ℝ) r •\n                      AddHom.toFun\n                        { toFun := fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1),\n                          map_add' :=\n                            (_ :\n                              ∀ (u v : { x // x ∈ Lp E 1 }),\n                                (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))\n                                    (u + v) =\n                                  (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) u +\n                                    (fun u => Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1))\n                                      v) }\n                        u) }\n        u‖ =\n    ‖u‖\n[PROOFSTEP]\nsimp only [snorm, LinearMap.coe_mk, AddHom.coe_mk (M := Lp E 1 (μ.withDensity fun x => f x)) (N := Lp E 1 μ),\n  Lp.norm_toLp, one_ne_zero, ENNReal.one_ne_top, ENNReal.one_toReal, if_false, snorm', ENNReal.rpow_one, _root_.div_one,\n  Lp.norm_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu : { x // x ∈ Lp E 1 }\n⊢ ENNReal.toReal (∫⁻ (a : α), ↑‖↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) a‖₊ ∂μ) =\n    ENNReal.toReal (∫⁻ (a : α), ↑‖↑↑u a‖₊ ∂Measure.withDensity μ fun x => ↑(f x))\n[PROOFSTEP]\nrw [lintegral_withDensity_eq_lintegral_mul_non_measurable _ f_meas.coe_nnreal_ennreal\n    (Filter.eventually_of_forall fun x => ENNReal.coe_lt_top)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu : { x // x ∈ Lp E 1 }\n⊢ ENNReal.toReal (∫⁻ (a : α), ↑‖↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) a‖₊ ∂μ) =\n    ENNReal.toReal (∫⁻ (a : α), ((fun x => ↑(f x)) * fun a => ↑‖↑↑u a‖₊) a ∂μ)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu : { x // x ∈ Lp E 1 }\n⊢ ∫⁻ (a : α), ↑‖↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) a‖₊ ∂μ =\n    ∫⁻ (a : α), ((fun x => ↑(f x)) * fun a => ↑‖↑↑u a‖₊) a ∂μ\n[PROOFSTEP]\napply lintegral_congr_ae\n[GOAL]\ncase e_a.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu : { x // x ∈ Lp E 1 }\n⊢ (fun a => ↑‖↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) a‖₊) =ᵐ[μ] fun a =>\n    ((fun x => ↑(f x)) * fun a => ↑‖↑↑u a‖₊) a\n[PROOFSTEP]\nfilter_upwards [(memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu : { x // x ∈ Lp E 1 }\nx : α\nhx : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\n⊢ ↑‖↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x‖₊ =\n    ((fun x => ↑(f x)) * fun a => ↑‖↑↑u a‖₊) x\n[PROOFSTEP]\nrw [hx, Pi.mul_apply]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu : { x // x ∈ Lp E 1 }\nx : α\nhx : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\n⊢ ↑‖f x • ↑↑u x‖₊ = ↑(f x) * ↑‖↑↑u x‖₊\n[PROOFSTEP]\nchange (‖(f x : ℝ) • u x‖₊ : ℝ≥0∞) = (f x : ℝ≥0∞) * (‖u x‖₊ : ℝ≥0∞)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℝ E\nf : α → ℝ≥0\nf_meas : Measurable f\nu : { x // x ∈ Lp E 1 }\nx : α\nhx : ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x = f x • ↑↑u x\n⊢ ↑‖↑(f x) • ↑↑u x‖₊ = ↑(f x) * ↑‖↑↑u x‖₊\n[PROOFSTEP]\nsimp only [nnnorm_smul, NNReal.nnnorm_eq, ENNReal.coe_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhfm : AEMeasurable f\nhfi : ∫⁻ (x : α), f x ∂μ ≠ ⊤\n⊢ Memℒp (fun x => ENNReal.toReal (f x)) 1\n[PROOFSTEP]\nrw [Memℒp, snorm_one_eq_lintegral_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → ℝ≥0∞\nhfm : AEMeasurable f\nhfi : ∫⁻ (x : α), f x ∂μ ≠ ⊤\n⊢ AEStronglyMeasurable (fun x => ENNReal.toReal (f x)) μ ∧ ∫⁻ (x : α), ↑‖ENNReal.toReal (f x)‖₊ ∂μ < ⊤\n[PROOFSTEP]\nexact ⟨(AEMeasurable.ennreal_toReal hfm).aestronglyMeasurable, hasFiniteIntegral_toReal_of_lintegral_ne_top hfi⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → β\nφ : α → 𝕜\nhf : Integrable f\nhφ : Memℒp φ ⊤\n⊢ Integrable (φ • f)\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at hf ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → β\nφ : α → 𝕜\nhf : Memℒp f 1\nhφ : Memℒp φ ⊤\n⊢ Memℒp (φ • f) 1\n[PROOFSTEP]\nexact Memℒp.smul_of_top_right hf hφ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → β\nφ : α → 𝕜\nhφ : Integrable φ\nhf : Memℒp f ⊤\n⊢ Integrable (φ • f)\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at hφ ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁵ : MeasurableSpace δ\ninst✝⁴ : NormedAddCommGroup β\ninst✝³ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 β\ninst✝ : BoundedSMul 𝕜 β\nf : α → β\nφ : α → 𝕜\nhφ : Memℒp φ 1\nhf : Memℒp f ⊤\n⊢ Memℒp (φ • f) 1\n[PROOFSTEP]\nexact Memℒp.smul_of_top_left hf hφ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁶ : MeasurableSpace δ\ninst✝⁵ : NormedAddCommGroup β\ninst✝⁴ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : CompleteSpace 𝕜\nE : Type u_6\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\nhc : c ≠ 0\n⊢ (Integrable fun x => f x • c) ↔ Integrable f\n[PROOFSTEP]\nsimp_rw [Integrable, aestronglyMeasurable_smul_const_iff (f := f) hc, and_congr_right_iff, HasFiniteIntegral,\n  nnnorm_smul, ENNReal.coe_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁶ : MeasurableSpace δ\ninst✝⁵ : NormedAddCommGroup β\ninst✝⁴ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : CompleteSpace 𝕜\nE : Type u_6\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\nhc : c ≠ 0\n⊢ AEStronglyMeasurable f μ → (∫⁻ (a : α), ↑‖f a‖₊ * ↑‖c‖₊ ∂μ < ⊤ ↔ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤)\n[PROOFSTEP]\nintro _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁶ : MeasurableSpace δ\ninst✝⁵ : NormedAddCommGroup β\ninst✝⁴ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : CompleteSpace 𝕜\nE : Type u_6\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\nhc : c ≠ 0\na✝ : AEStronglyMeasurable f μ\n⊢ ∫⁻ (a : α), ↑‖f a‖₊ * ↑‖c‖₊ ∂μ < ⊤ ↔ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\n[PROOFSTEP]\nrw [lintegral_mul_const' _ _ ENNReal.coe_ne_top, ENNReal.mul_lt_top_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁶ : MeasurableSpace δ\ninst✝⁵ : NormedAddCommGroup β\ninst✝⁴ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : CompleteSpace 𝕜\nE : Type u_6\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\nhc : c ≠ 0\na✝ : AEStronglyMeasurable f μ\n⊢ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤ ∧ ↑‖c‖₊ < ⊤ ∨ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ = 0 ∨ ↑‖c‖₊ = 0 ↔ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\n[PROOFSTEP]\nhave : ∀ x : ℝ≥0∞, x = 0 → x < ∞ := by simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁶ : MeasurableSpace δ\ninst✝⁵ : NormedAddCommGroup β\ninst✝⁴ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : CompleteSpace 𝕜\nE : Type u_6\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\nhc : c ≠ 0\na✝ : AEStronglyMeasurable f μ\n⊢ ∀ (x : ℝ≥0∞), x = 0 → x < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁶ : MeasurableSpace δ\ninst✝⁵ : NormedAddCommGroup β\ninst✝⁴ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝³ : NontriviallyNormedField 𝕜\ninst✝² : CompleteSpace 𝕜\nE : Type u_6\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\nhc : c ≠ 0\na✝ : AEStronglyMeasurable f μ\nthis : ∀ (x : ℝ≥0∞), x = 0 → x < ⊤\n⊢ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤ ∧ ↑‖c‖₊ < ⊤ ∨ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ = 0 ∨ ↑‖c‖₊ = 0 ↔ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ < ⊤\n[PROOFSTEP]\nsimp [hc, or_iff_left_of_imp (this _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : NormedRing 𝕜\nf✝ f g : α → 𝕜\nc : ℝ\nhg : Integrable g\nhf : AEStronglyMeasurable f μ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\n⊢ Integrable fun x => f x * g x\n[PROOFSTEP]\nrefine' Integrable.mono' (hg.norm.smul c) (hf.mul hg.1) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : NormedRing 𝕜\nf✝ f g : α → 𝕜\nc : ℝ\nhg : Integrable g\nhf : AEStronglyMeasurable f μ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\n⊢ ∀ᵐ (a : α) ∂μ, ‖f a * g a‖ ≤ (c • fun a => ‖g a‖) a\n[PROOFSTEP]\nfilter_upwards [hf_bound] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : NormedRing 𝕜\nf✝ f g : α → 𝕜\nc : ℝ\nhg : Integrable g\nhf : AEStronglyMeasurable f μ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nx : α\nhx : ‖f x‖ ≤ c\n⊢ ‖f x * g x‖ ≤ (c • fun a => ‖g a‖) x\n[PROOFSTEP]\nrw [Pi.smul_apply, smul_eq_mul]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : NormedRing 𝕜\nf✝ f g : α → 𝕜\nc : ℝ\nhg : Integrable g\nhf : AEStronglyMeasurable f μ\nhf_bound : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c\nx : α\nhx : ‖f x‖ ≤ c\n⊢ ‖f x * g x‖ ≤ c * ‖g x‖\n[PROOFSTEP]\nexact (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right hx (norm_nonneg _))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : NormedDivisionRing 𝕜\nf✝ f : α → 𝕜\nh : Integrable f\nc : 𝕜\n⊢ Integrable fun x => f x / c\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, h.mul_const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : IsROrC 𝕜\nf✝ : α → 𝕜\nf : α → ℝ\nhf : Integrable f\n⊢ Integrable fun x => ↑(f x)\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at hf ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : IsROrC 𝕜\nf✝ : α → 𝕜\nf : α → ℝ\nhf : Memℒp f 1\n⊢ Memℒp (fun x => ↑(f x)) 1\n[PROOFSTEP]\nexact hf.ofReal\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : IsROrC 𝕜\nf : α → 𝕜\n⊢ ((Integrable fun x => ↑IsROrC.re (f x)) ∧ Integrable fun x => ↑IsROrC.im (f x)) ↔ Integrable f\n[PROOFSTEP]\nsimp_rw [← memℒp_one_iff_integrable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : IsROrC 𝕜\nf : α → 𝕜\n⊢ Memℒp (fun x => ↑IsROrC.re (f x)) 1 ∧ Memℒp (fun x => ↑IsROrC.im (f x)) 1 ↔ Memℒp f 1\n[PROOFSTEP]\nexact memℒp_re_im_iff\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : IsROrC 𝕜\nf : α → 𝕜\nhf : Integrable f\n⊢ Integrable fun x => ↑IsROrC.re (f x)\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at hf ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : IsROrC 𝕜\nf : α → 𝕜\nhf : Memℒp f 1\n⊢ Memℒp (fun x => ↑IsROrC.re (f x)) 1\n[PROOFSTEP]\nexact hf.re\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : IsROrC 𝕜\nf : α → 𝕜\nhf : Integrable f\n⊢ Integrable fun x => ↑IsROrC.im (f x)\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at hf ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\n𝕜 : Type u_5\ninst✝ : IsROrC 𝕜\nf : α → 𝕜\nhf : Memℒp f 1\n⊢ Memℒp (fun x => ↑IsROrC.im (f x)) 1\n[PROOFSTEP]\nexact hf.im\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nH : Type u_5\ninst✝ : NormedAddCommGroup H\nm0 : MeasurableSpace α\nμ' : Measure α\nf : α → H\nhm : m ≤ m0\nhf_int : Integrable f\nhf : StronglyMeasurable f\n⊢ Integrable f\n[PROOFSTEP]\nrefine' ⟨hf.aestronglyMeasurable, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nH : Type u_5\ninst✝ : NormedAddCommGroup H\nm0 : MeasurableSpace α\nμ' : Measure α\nf : α → H\nhm : m ≤ m0\nhf_int : Integrable f\nhf : StronglyMeasurable f\n⊢ HasFiniteIntegral f\n[PROOFSTEP]\nrw [HasFiniteIntegral, lintegral_trim hm _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nH : Type u_5\ninst✝ : NormedAddCommGroup H\nm0 : MeasurableSpace α\nμ' : Measure α\nf : α → H\nhm : m ≤ m0\nhf_int : Integrable f\nhf : StronglyMeasurable f\n⊢ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ' < ⊤\n[PROOFSTEP]\nexact hf_int.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nH : Type u_5\ninst✝ : NormedAddCommGroup H\nm0 : MeasurableSpace α\nμ' : Measure α\nf : α → H\nhm : m ≤ m0\nhf_int : Integrable f\nhf : StronglyMeasurable f\n⊢ Measurable fun a => ↑‖f a‖₊\n[PROOFSTEP]\nexact @StronglyMeasurable.ennnorm _ m _ _ f hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nH : Type u_5\ninst✝ : NormedAddCommGroup H\nm0 : MeasurableSpace α\nμ' : Measure α\nf : α → H\nhm : m ≤ m0\nhf_int : Integrable f\n⊢ Integrable f\n[PROOFSTEP]\nobtain ⟨hf_meas_ae, hf⟩ := hf_int\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nH : Type u_5\ninst✝ : NormedAddCommGroup H\nm0 : MeasurableSpace α\nμ' : Measure α\nf : α → H\nhm : m ≤ m0\nhf_meas_ae : AEStronglyMeasurable f (Measure.trim μ' hm)\nhf : HasFiniteIntegral f\n⊢ Integrable f\n[PROOFSTEP]\nrefine' ⟨aestronglyMeasurable_of_aestronglyMeasurable_trim hm hf_meas_ae, _⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nH : Type u_5\ninst✝ : NormedAddCommGroup H\nm0 : MeasurableSpace α\nμ' : Measure α\nf : α → H\nhm : m ≤ m0\nhf_meas_ae : AEStronglyMeasurable f (Measure.trim μ' hm)\nhf : HasFiniteIntegral f\n⊢ HasFiniteIntegral f\n[PROOFSTEP]\nrw [HasFiniteIntegral] at hf ⊢\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nH : Type u_5\ninst✝ : NormedAddCommGroup H\nm0 : MeasurableSpace α\nμ' : Measure α\nf : α → H\nhm : m ≤ m0\nhf_meas_ae : AEStronglyMeasurable f (Measure.trim μ' hm)\nhf : ∫⁻ (a : α), ↑‖f a‖₊ ∂Measure.trim μ' hm < ⊤\n⊢ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ' < ⊤\n[PROOFSTEP]\nrwa [lintegral_trim_ae hm _] at hf \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝³ : MeasurableSpace δ\ninst✝² : NormedAddCommGroup β\ninst✝¹ : NormedAddCommGroup γ\nH : Type u_5\ninst✝ : NormedAddCommGroup H\nm0 : MeasurableSpace α\nμ' : Measure α\nf : α → H\nhm : m ≤ m0\nhf_meas_ae : AEStronglyMeasurable f (Measure.trim μ' hm)\nhf : ∫⁻ (a : α), ↑‖f a‖₊ ∂Measure.trim μ' hm < ⊤\n⊢ AEMeasurable fun a => ↑‖f a‖₊\n[PROOFSTEP]\nexact AEStronglyMeasurable.ennnorm hf_meas_ae\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝⁴ : MeasurableSpace δ\ninst✝³ : NormedAddCommGroup β\ninst✝² : NormedAddCommGroup γ\nE : Type u_5\nm0 : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : SigmaFinite μ\nC : ℝ≥0∞\nhC : C < ⊤\nf : α → E\nhf_meas : AEStronglyMeasurable f μ\nhf : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≠ ⊤ → ∫⁻ (x : α) in s, ↑‖f x‖₊ ∂μ ≤ C\n⊢ SigmaFinite (Measure.trim μ (_ : m ≤ m))\n[PROOFSTEP]\nrwa [@trim_eq_self _ m]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : AEStronglyMeasurable f μ\n⊢ Integrable (mk f hf) ↔ MeasureTheory.Integrable f\n[PROOFSTEP]\nsimp [Integrable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : AEStronglyMeasurable f μ\n⊢ MeasureTheory.Integrable ↑(mk f hf) ↔ MeasureTheory.Integrable f\n[PROOFSTEP]\napply integrable_congr\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : AEStronglyMeasurable f μ\n⊢ ↑(mk f hf) =ᵐ[μ] f\n[PROOFSTEP]\nexact coeFn_mk f hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α →ₘ[μ] β\n⊢ MeasureTheory.Integrable ↑f ↔ Integrable f\n[PROOFSTEP]\nrw [← integrable_mk, mk_coeFn]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α →ₘ[μ] β\n⊢ Integrable f ↔ f ∈ Lp β 1\n[PROOFSTEP]\nrw [← integrable_coeFn, ← memℒp_one_iff_integrable, Lp.mem_Lp_iff_memℒp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : α →ₘ[μ] β\n⊢ Integrable f → Integrable g → Integrable (f + g)\n[PROOFSTEP]\nrefine' induction_on₂ f g fun f hf g hg hfi hgi => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf✝ g✝ : α →ₘ[μ] β\nf : α → β\nhf : AEStronglyMeasurable f μ\ng : α → β\nhg : AEStronglyMeasurable g μ\nhfi : Integrable (mk f hf)\nhgi : Integrable (mk g hg)\n⊢ Integrable (mk f hf + mk g hg)\n[PROOFSTEP]\nsimp only [integrable_mk, mk_add_mk] at hfi hgi ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf✝ g✝ : α →ₘ[μ] β\nf : α → β\nhf : AEStronglyMeasurable f μ\ng : α → β\nhg : AEStronglyMeasurable g μ\nhfi : MeasureTheory.Integrable f\nhgi : MeasureTheory.Integrable g\n⊢ MeasureTheory.Integrable (f + g)\n[PROOFSTEP]\nexact hfi.add hgi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : { x // x ∈ Lp β 1 }\n⊢ Integrable ↑↑f\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : { x // x ∈ Lp β 1 }\n⊢ Memℒp (↑↑f) 1\n[PROOFSTEP]\nexact Lp.memℒp f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\n⊢ edist f g = ∫⁻ (a : α), edist (↑↑f a) (↑↑g a) ∂μ\n[PROOFSTEP]\nsimp [Lp.edist_def, snorm, snorm']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\n⊢ ∫⁻ (a : α), ↑‖↑↑f a - ↑↑g a‖₊ ∂μ = ∫⁻ (a : α), edist (↑↑f a) (↑↑g a) ∂μ\n[PROOFSTEP]\nsimp [edist_eq_coe_nnnorm_sub]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\n⊢ dist f g = ENNReal.toReal (∫⁻ (a : α), edist (↑↑f a) (↑↑g a) ∂μ)\n[PROOFSTEP]\nsimp [Lp.dist_def, snorm, snorm']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\n⊢ ENNReal.toReal (∫⁻ (a : α), ↑‖↑↑f a - ↑↑g a‖₊ ∂μ) = ENNReal.toReal (∫⁻ (a : α), edist (↑↑f a) (↑↑g a) ∂μ)\n[PROOFSTEP]\nsimp [edist_eq_coe_nnnorm_sub]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : { x // x ∈ Lp β 1 }\n⊢ ‖f‖ = ENNReal.toReal (∫⁻ (a : α), ↑‖↑↑f a‖₊ ∂μ)\n[PROOFSTEP]\nsimp [Lp.norm_def, snorm, snorm']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\n⊢ ‖f - g‖ = ENNReal.toReal (∫⁻ (x : α), ↑‖↑↑f x - ↑↑g x‖₊ ∂μ)\n[PROOFSTEP]\nrw [norm_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\n⊢ ENNReal.toReal (∫⁻ (a : α), ↑‖↑↑(f - g) a‖₊ ∂μ) = ENNReal.toReal (∫⁻ (x : α), ↑‖↑↑f x - ↑↑g x‖₊ ∂μ)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\n⊢ ∫⁻ (a : α), ↑‖↑↑(f - g) a‖₊ ∂μ = ∫⁻ (x : α), ↑‖↑↑f x - ↑↑g x‖₊ ∂μ\n[PROOFSTEP]\nrw [lintegral_congr_ae]\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\n⊢ (fun a => ↑‖↑↑(f - g) a‖₊) =ᵐ[μ] fun a => ↑‖↑↑f a - ↑↑g a‖₊\n[PROOFSTEP]\nfilter_upwards [Lp.coeFn_sub f g] with _ ha\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\na✝ : α\nha : ↑↑(f - g) a✝ = (↑↑f - ↑↑g) a✝\n⊢ ↑‖↑↑(f - g) a✝‖₊ = ↑‖↑↑f a✝ - ↑↑g a✝‖₊\n[PROOFSTEP]\nsimp only [ha, Pi.sub_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : { x // x ∈ Lp β 1 }\n⊢ ENNReal.ofReal ‖f‖ = ∫⁻ (x : α), ↑‖↑↑f x‖₊ ∂μ\n[PROOFSTEP]\nrw [norm_def, ENNReal.ofReal_toReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : { x // x ∈ Lp β 1 }\n⊢ ∫⁻ (a : α), ↑‖↑↑f a‖₊ ∂μ ≠ ⊤\n[PROOFSTEP]\nexact ne_of_lt (hasFiniteIntegral_coeFn f)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\n⊢ ENNReal.ofReal ‖f - g‖ = ∫⁻ (x : α), ↑‖↑↑f x - ↑↑g x‖₊ ∂μ\n[PROOFSTEP]\nsimp_rw [ofReal_norm_eq_lintegral, ← edist_eq_coe_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\n⊢ ∫⁻ (x : α), edist (↑↑(f - g) x) 0 ∂μ = ∫⁻ (x : α), edist (↑↑f x - ↑↑g x) 0 ∂μ\n[PROOFSTEP]\napply lintegral_congr_ae\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\n⊢ (fun a => edist (↑↑(f - g) a) 0) =ᵐ[μ] fun a => edist (↑↑f a - ↑↑g a) 0\n[PROOFSTEP]\nfilter_upwards [Lp.coeFn_sub f g] with _ ha\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : { x // x ∈ Lp β 1 }\na✝ : α\nha : ↑↑(f - g) a✝ = (↑↑f - ↑↑g) a✝\n⊢ edist (↑↑(f - g) a✝) 0 = edist (↑↑f a✝ - ↑↑g a✝) 0\n[PROOFSTEP]\nsimp only [ha, Pi.sub_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : { x // x ∈ Lp β 1 }\nhf : Integrable ↑↑f\n⊢ toL1 (↑↑f) hf = f\n[PROOFSTEP]\nsimp [Integrable.toL1]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : Integrable f\n⊢ ‖toL1 f hf‖ = ENNReal.toReal (∫⁻ (a : α), edist (f a) 0 ∂μ)\n[PROOFSTEP]\nsimp [toL1, snorm, snorm']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : Integrable f\n⊢ ENNReal.toReal (∫⁻ (a : α), ↑‖f a‖₊ ∂μ) = ENNReal.toReal (∫⁻ (a : α), edist (f a) 0 ∂μ)\n[PROOFSTEP]\nsimp [edist_eq_coe_nnnorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : Integrable f\n⊢ ‖toL1 f hf‖ = ENNReal.toReal (∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ)\n[PROOFSTEP]\nrw [norm_toL1, lintegral_norm_eq_lintegral_edist]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : α → β\nhf : Integrable f\nhg : Integrable g\n⊢ edist (toL1 f hf) (toL1 g hg) = ∫⁻ (a : α), edist (f a) (g a) ∂μ\n[PROOFSTEP]\nsimp [Integrable.toL1, snorm, snorm']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf g : α → β\nhf : Integrable f\nhg : Integrable g\n⊢ ∫⁻ (a : α), ↑‖f a - g a‖₊ ∂μ = ∫⁻ (a : α), edist (f a) (g a) ∂μ\n[PROOFSTEP]\nsimp [edist_eq_coe_nnnorm_sub]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : Integrable f\n⊢ edist (toL1 f hf) 0 = ∫⁻ (a : α), edist (f a) 0 ∂μ\n[PROOFSTEP]\nsimp [Integrable.toL1, snorm, snorm']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nm : MeasurableSpace α\nμ ν : Measure α\ninst✝² : MeasurableSpace δ\ninst✝¹ : NormedAddCommGroup β\ninst✝ : NormedAddCommGroup γ\nf : α → β\nhf : Integrable f\n⊢ ∫⁻ (a : α), ↑‖f a‖₊ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ\n[PROOFSTEP]\nsimp [edist_eq_coe_nnnorm]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.L1Space", "llama_tokens": 83967, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6406358548398982, "lm_q2_score": 0.5506073655352404, "lm_q1q2_score": 0.352738820300813}}
{"text": "[GOAL]\nα β : BddLatCat\ne : ↑α.toLat ≃o ↑β.toLat\n⊢ ((let src :=\n        { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n          map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) };\n      {\n        toLatticeHom :=\n          {\n            toSupHom :=\n              { toFun := ↑e,\n                map_sup' :=\n                  (_ :\n                    ∀ (a b : ↑α.toLat),\n                      SupHom.toFun\n                          { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                              map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                          (a ⊔ b) =\n                        SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                            a ⊔\n                          SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                            b) },\n            map_inf' :=\n              (_ :\n                ∀ (a b : ↑α.toLat),\n                  SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n        map_top' := (_ : ↑e ⊤ = ⊤), map_bot' := (_ : ↑e ⊥ = ⊥) }) ≫\n      let src :=\n        {\n          toSupHom :=\n            { toFun := ↑(OrderIso.symm e),\n              map_sup' :=\n                (_ : ∀ (a b : ↑β.toLat), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n          map_inf' :=\n            (_ : ∀ (a b : ↑β.toLat), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) };\n      {\n        toLatticeHom :=\n          {\n            toSupHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_sup' :=\n                  (_ :\n                    ∀ (a b : ↑β.toLat),\n                      SupHom.toFun\n                          {\n                              toSupHom :=\n                                { toFun := ↑(OrderIso.symm e),\n                                  map_sup' :=\n                                    (_ :\n                                      ∀ (a b : ↑β.toLat),\n                                        ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                              map_inf' :=\n                                (_ :\n                                  ∀ (a b : ↑β.toLat),\n                                    ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                          (a ⊔ b) =\n                        SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑(OrderIso.symm e),\n                                    map_sup' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toLat),\n                                          ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                map_inf' :=\n                                  (_ :\n                                    ∀ (a b : ↑β.toLat),\n                                      ↑(OrderIso.symm e) (a ⊓ b) =\n                                        ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                            a ⊔\n                          SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑(OrderIso.symm e),\n                                    map_sup' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toLat),\n                                          ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                map_inf' :=\n                                  (_ :\n                                    ∀ (a b : ↑β.toLat),\n                                      ↑(OrderIso.symm e) (a ⊓ b) =\n                                        ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                            b) },\n            map_inf' :=\n              (_ :\n                ∀ (a b : ↑β.toLat),\n                  SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n        map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤), map_bot' := (_ : ↑(OrderIso.symm e) ⊥ = ⊥) }) =\n    𝟙 α\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : BddLatCat\ne : ↑α.toLat ≃o ↑β.toLat\nx✝ : (forget BddLatCat).obj α\n⊢ ↑((let src :=\n            { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n              map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) };\n          {\n            toLatticeHom :=\n              {\n                toSupHom :=\n                  { toFun := ↑e,\n                    map_sup' :=\n                      (_ :\n                        ∀ (a b : ↑α.toLat),\n                          SupHom.toFun\n                              {\n                                  toSupHom :=\n                                    { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                  map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                              (a ⊔ b) =\n                            SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                    map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                                a ⊔\n                              SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                    map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                                b) },\n                map_inf' :=\n                  (_ :\n                    ∀ (a b : ↑α.toLat),\n                      SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n            map_top' := (_ : ↑e ⊤ = ⊤), map_bot' := (_ : ↑e ⊥ = ⊥) }) ≫\n          let src :=\n            {\n              toSupHom :=\n                { toFun := ↑(OrderIso.symm e),\n                  map_sup' :=\n                    (_ :\n                      ∀ (a b : ↑β.toLat), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n              map_inf' :=\n                (_ : ∀ (a b : ↑β.toLat), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) };\n          {\n            toLatticeHom :=\n              {\n                toSupHom :=\n                  { toFun := ↑(OrderIso.symm e),\n                    map_sup' :=\n                      (_ :\n                        ∀ (a b : ↑β.toLat),\n                          SupHom.toFun\n                              {\n                                  toSupHom :=\n                                    { toFun := ↑(OrderIso.symm e),\n                                      map_sup' :=\n                                        (_ :\n                                          ∀ (a b : ↑β.toLat),\n                                            ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                  map_inf' :=\n                                    (_ :\n                                      ∀ (a b : ↑β.toLat),\n                                        ↑(OrderIso.symm e) (a ⊓ b) =\n                                          ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                              (a ⊔ b) =\n                            SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑(OrderIso.symm e),\n                                        map_sup' :=\n                                          (_ :\n                                            ∀ (a b : ↑β.toLat),\n                                              ↑(OrderIso.symm e) (a ⊔ b) =\n                                                ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                    map_inf' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toLat),\n                                          ↑(OrderIso.symm e) (a ⊓ b) =\n                                            ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                                a ⊔\n                              SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑(OrderIso.symm e),\n                                        map_sup' :=\n                                          (_ :\n                                            ∀ (a b : ↑β.toLat),\n                                              ↑(OrderIso.symm e) (a ⊔ b) =\n                                                ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                    map_inf' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toLat),\n                                          ↑(OrderIso.symm e) (a ⊓ b) =\n                                            ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                                b) },\n                map_inf' :=\n                  (_ :\n                    ∀ (a b : ↑β.toLat),\n                      SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n            map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤), map_bot' := (_ : ↑(OrderIso.symm e) ⊥ = ⊥) })\n      x✝ =\n    ↑(𝟙 α) x✝\n[PROOFSTEP]\nexact e.symm_apply_apply _\n[GOAL]\nα β : BddLatCat\ne : ↑α.toLat ≃o ↑β.toLat\n⊢ ((let src :=\n        {\n          toSupHom :=\n            { toFun := ↑(OrderIso.symm e),\n              map_sup' :=\n                (_ : ∀ (a b : ↑β.toLat), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n          map_inf' :=\n            (_ : ∀ (a b : ↑β.toLat), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) };\n      {\n        toLatticeHom :=\n          {\n            toSupHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_sup' :=\n                  (_ :\n                    ∀ (a b : ↑β.toLat),\n                      SupHom.toFun\n                          {\n                              toSupHom :=\n                                { toFun := ↑(OrderIso.symm e),\n                                  map_sup' :=\n                                    (_ :\n                                      ∀ (a b : ↑β.toLat),\n                                        ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                              map_inf' :=\n                                (_ :\n                                  ∀ (a b : ↑β.toLat),\n                                    ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                          (a ⊔ b) =\n                        SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑(OrderIso.symm e),\n                                    map_sup' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toLat),\n                                          ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                map_inf' :=\n                                  (_ :\n                                    ∀ (a b : ↑β.toLat),\n                                      ↑(OrderIso.symm e) (a ⊓ b) =\n                                        ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                            a ⊔\n                          SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑(OrderIso.symm e),\n                                    map_sup' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toLat),\n                                          ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                map_inf' :=\n                                  (_ :\n                                    ∀ (a b : ↑β.toLat),\n                                      ↑(OrderIso.symm e) (a ⊓ b) =\n                                        ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                            b) },\n            map_inf' :=\n              (_ :\n                ∀ (a b : ↑β.toLat),\n                  SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n        map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤), map_bot' := (_ : ↑(OrderIso.symm e) ⊥ = ⊥) }) ≫\n      let src :=\n        { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n          map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) };\n      {\n        toLatticeHom :=\n          {\n            toSupHom :=\n              { toFun := ↑e,\n                map_sup' :=\n                  (_ :\n                    ∀ (a b : ↑α.toLat),\n                      SupHom.toFun\n                          { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                              map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                          (a ⊔ b) =\n                        SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                            a ⊔\n                          SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                            b) },\n            map_inf' :=\n              (_ :\n                ∀ (a b : ↑α.toLat),\n                  SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n        map_top' := (_ : ↑e ⊤ = ⊤), map_bot' := (_ : ↑e ⊥ = ⊥) }) =\n    𝟙 β\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : BddLatCat\ne : ↑α.toLat ≃o ↑β.toLat\nx✝ : (forget BddLatCat).obj β\n⊢ ↑((let src :=\n            {\n              toSupHom :=\n                { toFun := ↑(OrderIso.symm e),\n                  map_sup' :=\n                    (_ :\n                      ∀ (a b : ↑β.toLat), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n              map_inf' :=\n                (_ : ∀ (a b : ↑β.toLat), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) };\n          {\n            toLatticeHom :=\n              {\n                toSupHom :=\n                  { toFun := ↑(OrderIso.symm e),\n                    map_sup' :=\n                      (_ :\n                        ∀ (a b : ↑β.toLat),\n                          SupHom.toFun\n                              {\n                                  toSupHom :=\n                                    { toFun := ↑(OrderIso.symm e),\n                                      map_sup' :=\n                                        (_ :\n                                          ∀ (a b : ↑β.toLat),\n                                            ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                  map_inf' :=\n                                    (_ :\n                                      ∀ (a b : ↑β.toLat),\n                                        ↑(OrderIso.symm e) (a ⊓ b) =\n                                          ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                              (a ⊔ b) =\n                            SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑(OrderIso.symm e),\n                                        map_sup' :=\n                                          (_ :\n                                            ∀ (a b : ↑β.toLat),\n                                              ↑(OrderIso.symm e) (a ⊔ b) =\n                                                ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                    map_inf' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toLat),\n                                          ↑(OrderIso.symm e) (a ⊓ b) =\n                                            ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                                a ⊔\n                              SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑(OrderIso.symm e),\n                                        map_sup' :=\n                                          (_ :\n                                            ∀ (a b : ↑β.toLat),\n                                              ↑(OrderIso.symm e) (a ⊔ b) =\n                                                ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                    map_inf' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toLat),\n                                          ↑(OrderIso.symm e) (a ⊓ b) =\n                                            ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                                b) },\n                map_inf' :=\n                  (_ :\n                    ∀ (a b : ↑β.toLat),\n                      SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n            map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤), map_bot' := (_ : ↑(OrderIso.symm e) ⊥ = ⊥) }) ≫\n          let src :=\n            { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n              map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) };\n          {\n            toLatticeHom :=\n              {\n                toSupHom :=\n                  { toFun := ↑e,\n                    map_sup' :=\n                      (_ :\n                        ∀ (a b : ↑α.toLat),\n                          SupHom.toFun\n                              {\n                                  toSupHom :=\n                                    { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                  map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                              (a ⊔ b) =\n                            SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                    map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                                a ⊔\n                              SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                    map_inf' := (_ : ∀ (a b : ↑α.toLat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                                b) },\n                map_inf' :=\n                  (_ :\n                    ∀ (a b : ↑α.toLat),\n                      SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n            map_top' := (_ : ↑e ⊤ = ⊤), map_bot' := (_ : ↑e ⊥ = ⊥) })\n      x✝ =\n    ↑(𝟙 β) x✝\n[PROOFSTEP]\nexact e.apply_symm_apply _\n[GOAL]\nX : LatCat\nY : BddLatCat\nf : latToBddLatCat.obj X ⟶ Y\na b : ↑X\n⊢ (some ∘ some) (a ⊔ b) = (some ∘ some) a ⊔ (some ∘ some) b\n[PROOFSTEP]\nrfl\n[GOAL]\nX : LatCat\nY : BddLatCat\nf : latToBddLatCat.obj X ⟶ Y\na b : ↑X\n⊢ (some ∘ some) (a ⊓ b) = (some ∘ some) a ⊓ (some ∘ some) b\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Order.Category.BddLatCat", "llama_tokens": 7495, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.8056321983146848, "lm_q2_score": 0.43782349911420193, "lm_q1q2_score": 0.35272470806520195}}
{"text": "[GOAL]\nR : Type u_1\ninst✝³ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝² : CommSemiring S\ninst✝¹ : Algebra R S\nP✝ : Type u_3\ninst✝ : CommSemiring P✝\nP : Ideal R\nhp : IsPrime P\n⊢ 1 ∈ { carrier := (↑P)ᶜ, mul_mem' := (_ : ∀ {x y : R}, x ∈ (↑P)ᶜ → y ∈ (↑P)ᶜ → x * y ∈ ↑P → False) }.carrier\n[PROOFSTEP]\nconvert P.ne_top_iff_one.1 hp.1\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nhze : 0 = 1\n⊢ False\n[PROOFSTEP]\nrw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze \n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nhze : ↑(algebraMap R S) 0 = ↑(algebraMap R S) 1\n⊢ False\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nhze : ↑(algebraMap R S) 0 = ↑(algebraMap R S) 1\nt : { x // x ∈ Ideal.primeCompl P }\nht : ↑t * 0 = ↑t * 1\n⊢ False\n[PROOFSTEP]\nhave htz : (t : R) = 0 := by simpa using ht.symm\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nhze : ↑(algebraMap R S) 0 = ↑(algebraMap R S) 1\nt : { x // x ∈ Ideal.primeCompl P }\nht : ↑t * 0 = ↑t * 1\n⊢ ↑t = 0\n[PROOFSTEP]\nsimpa using ht.symm\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nhze : ↑(algebraMap R S) 0 = ↑(algebraMap R S) 1\nt : { x // x ∈ Ideal.primeCompl P }\nht : ↑t * 0 = ↑t * 1\nhtz : ↑t = 0\n⊢ False\n[PROOFSTEP]\nexact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P)\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis : _root_.Nontrivial S := Nontrivial S P\n⊢ ∀ (a b : S), a ∈ nonunits S → b ∈ nonunits S → a + b ∈ nonunits S\n[PROOFSTEP]\nintro x y hx hy hu\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhx : x ∈ nonunits S\nhy : y ∈ nonunits S\nhu : IsUnit (x + y)\n⊢ False\n[PROOFSTEP]\ncases' isUnit_iff_exists_inv.1 hu with z hxyz\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhx : x ∈ nonunits S\nhy : y ∈ nonunits S\nhu : IsUnit (x + y)\nz : S\nhxyz : (x + y) * z = 1\n⊢ False\n[PROOFSTEP]\nhave : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} =>\n  not_imp_comm.1 fun nr =>\n    isUnit_iff_exists_inv.2\n      ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhx : x ∈ nonunits S\nhy : y ∈ nonunits S\nhu : IsUnit (x + y)\nz : S\nhxyz : (x + y) * z = 1\nthis : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\n⊢ False\n[PROOFSTEP]\nrcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhx : x ∈ nonunits S\nhy : y ∈ nonunits S\nhu : IsUnit (x + y)\nz : S\nhxyz : (x + y) * z = 1\nthis : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\nrx : R\nsx : { x // x ∈ Ideal.primeCompl P }\nhrx : mk' S rx sx = x\n⊢ False\n[PROOFSTEP]\nrcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhx : x ∈ nonunits S\nhy : y ∈ nonunits S\nhu : IsUnit (x + y)\nz : S\nhxyz : (x + y) * z = 1\nthis : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\nrx : R\nsx : { x // x ∈ Ideal.primeCompl P }\nhrx : mk' S rx sx = x\nry : R\nsy : { x // x ∈ Ideal.primeCompl P }\nhry : mk' S ry sy = y\n⊢ False\n[PROOFSTEP]\nrcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhx : x ∈ nonunits S\nhy : y ∈ nonunits S\nhu : IsUnit (x + y)\nz : S\nhxyz : (x + y) * z = 1\nthis : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\nrx : R\nsx : { x // x ∈ Ideal.primeCompl P }\nhrx : mk' S rx sx = x\nry : R\nsy : { x // x ∈ Ideal.primeCompl P }\nhry : mk' S ry sy = y\nrz : R\nsz : { x // x ∈ Ideal.primeCompl P }\nhrz : mk' S rz sz = z\n⊢ False\n[PROOFSTEP]\nrw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhx : x ∈ nonunits S\nhy : y ∈ nonunits S\nhu : IsUnit (x + y)\nz : S\nthis : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\nrx : R\nsx : { x // x ∈ Ideal.primeCompl P }\nhrx : mk' S rx sx = x\nry : R\nsy : { x // x ∈ Ideal.primeCompl P }\nhry : mk' S ry sy = y\nrz : R\nsz : { x // x ∈ Ideal.primeCompl P }\nhxyz :\n  mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) }\nhrz : mk' S rz sz = z\n⊢ False\n[PROOFSTEP]\nrw [← hrx] at hx \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhy : y ∈ nonunits S\nhu : IsUnit (x + y)\nz : S\nthis : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\nrx : R\nsx : { x // x ∈ Ideal.primeCompl P }\nhx : mk' S rx sx ∈ nonunits S\nhrx : mk' S rx sx = x\nry : R\nsy : { x // x ∈ Ideal.primeCompl P }\nhry : mk' S ry sy = y\nrz : R\nsz : { x // x ∈ Ideal.primeCompl P }\nhxyz :\n  mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) }\nhrz : mk' S rz sz = z\n⊢ False\n[PROOFSTEP]\nrw [← hry] at hy \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhu : IsUnit (x + y)\nz : S\nthis : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\nrx : R\nsx : { x // x ∈ Ideal.primeCompl P }\nhx : mk' S rx sx ∈ nonunits S\nhrx : mk' S rx sx = x\nry : R\nsy : { x // x ∈ Ideal.primeCompl P }\nhy : mk' S ry sy ∈ nonunits S\nhry : mk' S ry sy = y\nrz : R\nsz : { x // x ∈ Ideal.primeCompl P }\nhxyz :\n  mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) }\nhrz : mk' S rz sz = z\n⊢ False\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhu : IsUnit (x + y)\nz : S\nthis : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\nrx : R\nsx : { x // x ∈ Ideal.primeCompl P }\nhx : mk' S rx sx ∈ nonunits S\nhrx : mk' S rx sx = x\nry : R\nsy : { x // x ∈ Ideal.primeCompl P }\nhy : mk' S ry sy ∈ nonunits S\nhry : mk' S ry sy = y\nrz : R\nsz : { x // x ∈ Ideal.primeCompl P }\nhxyz :\n  mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) }\nhrz : mk' S rz sz = z\nt : { x // x ∈ Ideal.primeCompl P }\nht :\n  ↑t * (↑{ val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) } * ((rx * ↑sy + ry * ↑sx) * rz)) =\n    ↑t * (↑(sx * sy * sz) * 1)\n⊢ False\n[PROOFSTEP]\nsimp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhu : IsUnit (x + y)\nz : S\nthis : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\nrx : R\nsx : { x // x ∈ Ideal.primeCompl P }\nhx : mk' S rx sx ∈ nonunits S\nhrx : mk' S rx sx = x\nry : R\nsy : { x // x ∈ Ideal.primeCompl P }\nhy : mk' S ry sy ∈ nonunits S\nhry : mk' S ry sy = y\nrz : R\nsz : { x // x ∈ Ideal.primeCompl P }\nhxyz :\n  mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) }\nhrz : mk' S rz sz = z\nt : { x // x ∈ Ideal.primeCompl P }\nht : ↑t * ((rx * ↑sy + ry * ↑sx) * rz) = ↑t * (↑sx * ↑sy * ↑sz)\n⊢ False\n[PROOFSTEP]\nsuffices : (t : R) * (sx * sy * sz) ∈ P\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝¹ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhu : IsUnit (x + y)\nz : S\nthis✝ : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\nrx : R\nsx : { x // x ∈ Ideal.primeCompl P }\nhx : mk' S rx sx ∈ nonunits S\nhrx : mk' S rx sx = x\nry : R\nsy : { x // x ∈ Ideal.primeCompl P }\nhy : mk' S ry sy ∈ nonunits S\nhry : mk' S ry sy = y\nrz : R\nsz : { x // x ∈ Ideal.primeCompl P }\nhxyz :\n  mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) }\nhrz : mk' S rz sz = z\nt : { x // x ∈ Ideal.primeCompl P }\nht : ↑t * ((rx * ↑sy + ry * ↑sx) * rz) = ↑t * (↑sx * ↑sy * ↑sz)\nthis : ↑t * (↑sx * ↑sy * ↑sz) ∈ P\n⊢ False\ncase this\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhu : IsUnit (x + y)\nz : S\nthis : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\nrx : R\nsx : { x // x ∈ Ideal.primeCompl P }\nhx : mk' S rx sx ∈ nonunits S\nhrx : mk' S rx sx = x\nry : R\nsy : { x // x ∈ Ideal.primeCompl P }\nhy : mk' S ry sy ∈ nonunits S\nhry : mk' S ry sy = y\nrz : R\nsz : { x // x ∈ Ideal.primeCompl P }\nhxyz :\n  mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) }\nhrz : mk' S rz sz = z\nt : { x // x ∈ Ideal.primeCompl P }\nht : ↑t * ((rx * ↑sy + ry * ↑sx) * rz) = ↑t * (↑sx * ↑sy * ↑sz)\n⊢ ↑t * (↑sx * ↑sy * ↑sz) ∈ P\n[PROOFSTEP]\nexact\n  not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2\n    (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2)\n[GOAL]\ncase this\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhu : IsUnit (x + y)\nz : S\nthis : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\nrx : R\nsx : { x // x ∈ Ideal.primeCompl P }\nhx : mk' S rx sx ∈ nonunits S\nhrx : mk' S rx sx = x\nry : R\nsy : { x // x ∈ Ideal.primeCompl P }\nhy : mk' S ry sy ∈ nonunits S\nhry : mk' S ry sy = y\nrz : R\nsz : { x // x ∈ Ideal.primeCompl P }\nhxyz :\n  mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) }\nhrz : mk' S rz sz = z\nt : { x // x ∈ Ideal.primeCompl P }\nht : ↑t * ((rx * ↑sy + ry * ↑sx) * rz) = ↑t * (↑sx * ↑sy * ↑sz)\n⊢ ↑t * (↑sx * ↑sy * ↑sz) ∈ P\n[PROOFSTEP]\nrw [← ht]\n[GOAL]\ncase this\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommSemiring S\ninst✝² : Algebra R S\nP✝ : Type u_3\ninst✝¹ : CommSemiring P✝\nP : Ideal R\nhp : Ideal.IsPrime P\ninst✝ : IsLocalization.AtPrime S P\nthis✝ : _root_.Nontrivial S := Nontrivial S P\nx y : S\nhu : IsUnit (x + y)\nz : S\nthis : ∀ {r : R} {s : { x // x ∈ Ideal.primeCompl P }}, mk' S r s ∈ nonunits S → r ∈ P\nrx : R\nsx : { x // x ∈ Ideal.primeCompl P }\nhx : mk' S rx sx ∈ nonunits S\nhrx : mk' S rx sx = x\nry : R\nsy : { x // x ∈ Ideal.primeCompl P }\nhy : mk' S ry sy ∈ nonunits S\nhry : mk' S ry sy = y\nrz : R\nsz : { x // x ∈ Ideal.primeCompl P }\nhxyz :\n  mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) }\nhrz : mk' S rz sz = z\nt : { x // x ∈ Ideal.primeCompl P }\nht : ↑t * ((rx * ↑sy + ry * ↑sx) * rz) = ↑t * (↑sx * ↑sy * ↑sz)\n⊢ ↑t * ((rx * ↑sy + ry * ↑sx) * rz) ∈ P\n[PROOFSTEP]\nexact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra R S\nP : Type u_3\ninst✝³ : CommSemiring P\nA : Type u_4\ninst✝² : CommRing A\ninst✝¹ : IsDomain A\nI : Ideal R\nhI : Ideal.IsPrime I\ninst✝ : IsLocalization.AtPrime S I\nx : R\nh : optParam (LocalRing S) (_ : LocalRing S)\n⊢ ¬↑(algebraMap R S) x ∈ LocalRing.maximalIdeal S ↔ ¬x ∈ I\n[PROOFSTEP]\nsimpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra R S\nP : Type u_3\ninst✝³ : CommSemiring P\nA : Type u_4\ninst✝² : CommRing A\ninst✝¹ : IsDomain A\nI : Ideal R\nhI : Ideal.IsPrime I\ninst✝ : IsLocalization.AtPrime S I\nh : optParam (LocalRing S) (_ : LocalRing S)\nx : R\n⊢ x ∈ Ideal.comap (algebraMap R S) (LocalRing.maximalIdeal S) ↔ x ∈ I\n[PROOFSTEP]\nsimpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝⁵ : CommSemiring S\ninst✝⁴ : Algebra R S\nP : Type u_3\ninst✝³ : CommSemiring P\nA : Type u_4\ninst✝² : CommRing A\ninst✝¹ : IsDomain A\nI : Ideal R\nhI : Ideal.IsPrime I\ninst✝ : IsLocalization.AtPrime S I\nx : R\ny : { x // x ∈ Ideal.primeCompl I }\nh : optParam (LocalRing S) (_ : LocalRing S)\n⊢ ¬mk' S x y ∈ LocalRing.maximalIdeal S ↔ ¬x ∈ I\n[PROOFSTEP]\nsimpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_mk'_iff S I x y\n[GOAL]\nR : Type u_1\ninst✝³ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝² : CommSemiring S\ninst✝¹ : Algebra R S\nP : Type u_3\ninst✝ : CommSemiring P\nI : Ideal R\nhI : Ideal.IsPrime I\n⊢ Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization (Ideal.primeCompl I))\n[PROOFSTEP]\nconvert\n  congr_arg\n    (Ideal.map (algebraMap R (Localization.AtPrime I)))\n      -- Porting Note : `algebraMap R ...` can not be solve by unification\n    (AtPrime.comap_maximalIdeal (hI := hI)).symm\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝³ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝² : CommSemiring S\ninst✝¹ : Algebra R S\nP : Type u_3\ninst✝ : CommSemiring P\nI : Ideal R\nhI : Ideal.IsPrime I\n⊢ LocalRing.maximalIdeal (Localization (Ideal.primeCompl I)) =\n    Ideal.map (algebraMap R (Localization.AtPrime I))\n      (Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization (Ideal.primeCompl I))))\n[PROOFSTEP]\nrw [map_comap I.primeCompl]\n[GOAL]\nR : Type u_1\ninst✝³ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝² : CommSemiring S\ninst✝¹ : Algebra R S\nP : Type u_3\ninst✝ : CommSemiring P\nI : Ideal R\nhI : Ideal.IsPrime I\nJ : Ideal P\nhJ : Ideal.IsPrime J\nf : R →+* P\nh : Ideal.primeCompl I ≤ Submonoid.comap f (Ideal.primeCompl J)\nx : R\nhx : x ∈ Ideal.comap f J\n⊢ x ∈ I\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\nR : Type u_1\ninst✝³ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝² : CommSemiring S\ninst✝¹ : Algebra R S\nP : Type u_3\ninst✝ : CommSemiring P\nI : Ideal R\nhI : Ideal.IsPrime I\nJ : Ideal P\nhJ : Ideal.IsPrime J\nf : R →+* P\nh : Ideal.primeCompl I ≤ Submonoid.comap f (Ideal.primeCompl J)\nx : R\nhx : ¬x ∈ I\n⊢ ¬x ∈ Ideal.comap f J\n[PROOFSTEP]\nexact h hx\n[GOAL]\nR : Type u_1\ninst✝³ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝² : CommSemiring S\ninst✝¹ : Algebra R S\nP : Type u_3\ninst✝ : CommSemiring P\nI : Ideal R\nhI : Ideal.IsPrime I\nJ : Ideal P\nhJ : Ideal.IsPrime J\nf : R →+* P\nhIJ : I = Ideal.comap f J\nx : Localization.AtPrime I\nhx : IsUnit (↑(localRingHom I J f hIJ) x)\n⊢ IsUnit x\n[PROOFSTEP]\nrcases IsLocalization.mk'_surjective I.primeCompl x with ⟨r, s, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝³ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝² : CommSemiring S\ninst✝¹ : Algebra R S\nP : Type u_3\ninst✝ : CommSemiring P\nI : Ideal R\nhI : Ideal.IsPrime I\nJ : Ideal P\nhJ : Ideal.IsPrime J\nf : R →+* P\nhIJ : I = Ideal.comap f J\nr : R\ns : { x // x ∈ Ideal.primeCompl I }\nhx : IsUnit (↑(localRingHom I J f hIJ) (mk' (Localization.AtPrime I) r s))\n⊢ IsUnit (mk' (Localization.AtPrime I) r s)\n[PROOFSTEP]\nrw [localRingHom_mk'] at hx \n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝³ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝² : CommSemiring S\ninst✝¹ : Algebra R S\nP : Type u_3\ninst✝ : CommSemiring P\nI : Ideal R\nhI : Ideal.IsPrime I\nJ : Ideal P\nhJ : Ideal.IsPrime J\nf : R →+* P\nhIJ : I = Ideal.comap f J\nr : R\ns : { x // x ∈ Ideal.primeCompl I }\nhx :\n  IsUnit\n    (mk' (Localization.AtPrime J) (↑f r)\n      { val := ↑f ↑s, property := (_ : ↑s ∈ Submonoid.comap f (Ideal.primeCompl J)) })\n⊢ IsUnit (mk' (Localization.AtPrime I) r s)\n[PROOFSTEP]\nrw [AtPrime.isUnit_mk'_iff] at hx ⊢\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝³ : CommSemiring R\nM : Submonoid R\nS : Type u_2\ninst✝² : CommSemiring S\ninst✝¹ : Algebra R S\nP : Type u_3\ninst✝ : CommSemiring P\nI : Ideal R\nhI : Ideal.IsPrime I\nJ : Ideal P\nhJ : Ideal.IsPrime J\nf : R →+* P\nhIJ : I = Ideal.comap f J\nr : R\ns : { x // x ∈ Ideal.primeCompl I }\nhx : ↑f r ∈ Ideal.primeCompl J\n⊢ r ∈ Ideal.primeCompl I\n[PROOFSTEP]\nexact fun hr => hx ((SetLike.ext_iff.mp hIJ r).mp hr)\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS✝ : Type u_2\ninst✝³ : CommSemiring S✝\ninst✝² : Algebra R S✝\nP : Type u_3\ninst✝¹ : CommSemiring P\nI : Ideal R\nhI : Ideal.IsPrime I\nS : Type u_4\ninst✝ : CommSemiring S\nJ : Ideal S\nhJ : Ideal.IsPrime J\nK : Ideal P\nhK : Ideal.IsPrime K\nf : R →+* S\nhIJ : I = Ideal.comap f J\ng : S →+* P\nhJK : J = Ideal.comap g K\n⊢ I = Ideal.comap (RingHom.comp g f) K\n[PROOFSTEP]\nrw [hIJ, hJK, Ideal.comap_comap f g]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nM : Submonoid R\nS✝ : Type u_2\ninst✝³ : CommSemiring S✝\ninst✝² : Algebra R S✝\nP : Type u_3\ninst✝¹ : CommSemiring P\nI : Ideal R\nhI : Ideal.IsPrime I\nS : Type u_4\ninst✝ : CommSemiring S\nJ : Ideal S\nhJ : Ideal.IsPrime J\nK : Ideal P\nhK : Ideal.IsPrime K\nf : R →+* S\nhIJ : I = Ideal.comap f J\ng : S →+* P\nhJK : J = Ideal.comap g K\nr : R\n⊢ ↑(RingHom.comp (localRingHom J K g hJK) (localRingHom I J f hIJ)) (↑(algebraMap R (Localization.AtPrime I)) r) =\n    ↑(algebraMap ((fun x => P) r) (Localization.AtPrime K)) (↑(RingHom.comp g f) r)\n[PROOFSTEP]\nsimp only [Function.comp_apply, RingHom.coe_comp, localRingHom_to_map]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Localization.AtPrime", "llama_tokens": 10648, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6688802603710086, "lm_q2_score": 0.5273165233795672, "lm_q1q2_score": 0.35271161345605995}}
{"text": "[GOAL]\nα : Type u_1\na b : ℕ\nh₁ : delta * a < b\nh₂ : delta * b < a\n⊢ 0 < delta\n[PROOFSTEP]\ndecide\n[GOAL]\nα : Type u_1\na b : ℕ\nh₁ : delta * a < b\nh₂ : delta * b < a\n⊢ a ≤ delta * (delta * a)\n[PROOFSTEP]\nsimpa [mul_assoc] using Nat.mul_le_mul_right a (by decide : 1 ≤ delta * delta)\n[GOAL]\nα : Type u_1\na b : ℕ\nh₁ : delta * a < b\nh₂ : delta * b < a\n⊢ 1 ≤ delta * delta\n[PROOFSTEP]\ndecide\n[GOAL]\nα : Type u_1\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\nh : Sized (node s l x r)\n⊢ node s l x r = Ordnode.node' l x r\n[PROOFSTEP]\nrw [h.1]\n[GOAL]\nα : Type u_1\nt : Ordnode α\nhl : Sized t\nC : Ordnode α → Prop\nH0 : C nil\nH1 : ∀ (l : Ordnode α) (x : α) (r : Ordnode α), C l → C r → C (Ordnode.node' l x r)\n⊢ C t\n[PROOFSTEP]\ninduction t with\n| nil => exact H0\n| node _ _ _ _ t_ih_l t_ih_r =>\n  rw [hl.eq_node']\n  exact H1 _ _ _ (t_ih_l hl.2.1) (t_ih_r hl.2.2)\n[GOAL]\nα : Type u_1\nt : Ordnode α\nhl : Sized t\nC : Ordnode α → Prop\nH0 : C nil\nH1 : ∀ (l : Ordnode α) (x : α) (r : Ordnode α), C l → C r → C (Ordnode.node' l x r)\n⊢ C t\n[PROOFSTEP]\ninduction t with\n| nil => exact H0\n| node _ _ _ _ t_ih_l t_ih_r =>\n  rw [hl.eq_node']\n  exact H1 _ _ _ (t_ih_l hl.2.1) (t_ih_r hl.2.2)\n[GOAL]\ncase nil\nα : Type u_1\nC : Ordnode α → Prop\nH0 : C nil\nH1 : ∀ (l : Ordnode α) (x : α) (r : Ordnode α), C l → C r → C (Ordnode.node' l x r)\nhl : Sized nil\n⊢ C nil\n[PROOFSTEP]\n\n| nil => exact H0\n[GOAL]\ncase nil\nα : Type u_1\nC : Ordnode α → Prop\nH0 : C nil\nH1 : ∀ (l : Ordnode α) (x : α) (r : Ordnode α), C l → C r → C (Ordnode.node' l x r)\nhl : Sized nil\n⊢ C nil\n[PROOFSTEP]\nexact H0\n[GOAL]\ncase node\nα : Type u_1\nC : Ordnode α → Prop\nH0 : C nil\nH1 : ∀ (l : Ordnode α) (x : α) (r : Ordnode α), C l → C r → C (Ordnode.node' l x r)\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nt_ih_l : Sized l✝ → C l✝\nt_ih_r : Sized r✝ → C r✝\nhl : Sized (node size✝ l✝ x✝ r✝)\n⊢ C (node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\n\n| node _ _ _ _ t_ih_l t_ih_r =>\n  rw [hl.eq_node']\n  exact H1 _ _ _ (t_ih_l hl.2.1) (t_ih_r hl.2.2)\n[GOAL]\ncase node\nα : Type u_1\nC : Ordnode α → Prop\nH0 : C nil\nH1 : ∀ (l : Ordnode α) (x : α) (r : Ordnode α), C l → C r → C (Ordnode.node' l x r)\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nt_ih_l : Sized l✝ → C l✝\nt_ih_r : Sized r✝ → C r✝\nhl : Sized (node size✝ l✝ x✝ r✝)\n⊢ C (node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\nrw [hl.eq_node']\n[GOAL]\ncase node\nα : Type u_1\nC : Ordnode α → Prop\nH0 : C nil\nH1 : ∀ (l : Ordnode α) (x : α) (r : Ordnode α), C l → C r → C (Ordnode.node' l x r)\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nt_ih_l : Sized l✝ → C l✝\nt_ih_r : Sized r✝ → C r✝\nhl : Sized (node size✝ l✝ x✝ r✝)\n⊢ C (Ordnode.node' l✝ x✝ r✝)\n[PROOFSTEP]\nexact H1 _ _ _ (t_ih_l hl.2.1) (t_ih_r hl.2.2)\n[GOAL]\nα : Type u_1\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\nh₁ : s = size l + size r + 1\nh₂ : Sized l\nh₃ : Sized r\n⊢ size (node s l x r) = realSize (node s l x r)\n[PROOFSTEP]\nrw [size, h₁, size_eq_realSize h₂, size_eq_realSize h₃]\n[GOAL]\nα : Type u_1\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\nh₁ : s = size l + size r + 1\nh₂ : Sized l\nh₃ : Sized r\n⊢ realSize l + realSize r + 1 = realSize (node (realSize l + realSize r + 1) l x r)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nt : Ordnode α\nht : Sized t\n⊢ size t = 0 ↔ t = nil\n[PROOFSTEP]\ncases t <;> [simp; simp [ht.1]]\n[GOAL]\nα : Type u_1\nt : Ordnode α\nht : Sized t\n⊢ size t = 0 ↔ t = nil\n[PROOFSTEP]\ncases t\n[GOAL]\ncase nil\nα : Type u_1\nht : Sized nil\n⊢ size nil = 0 ↔ nil = nil\n[PROOFSTEP]\nsimp\n[GOAL]\ncase node\nα : Type u_1\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nht : Sized (node size✝ l✝ x✝ r✝)\n⊢ size (node size✝ l✝ x✝ r✝) = 0 ↔ node size✝ l✝ x✝ r✝ = nil\n[PROOFSTEP]\nsimp [ht.1]\n[GOAL]\nα : Type u_1\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\nh : Sized (node s l x r)\n⊢ 0 < s\n[PROOFSTEP]\nrw [h.1]\n[GOAL]\nα : Type u_1\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\nh : Sized (node s l x r)\n⊢ 0 < size l + size r + 1\n[PROOFSTEP]\napply Nat.le_add_left\n[GOAL]\nα : Type u_1\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ dual (dual (node s l x r)) = node s l x r\n[PROOFSTEP]\nrw [dual, dual, dual_dual l, dual_dual r]\n[GOAL]\nα : Type u_1\nt : Ordnode α\n⊢ size (dual t) = size t\n[PROOFSTEP]\ncases t\n[GOAL]\ncase nil\nα : Type u_1\n⊢ size (dual nil) = size nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase node\nα : Type u_1\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ size (dual (node size✝ l✝ x✝ r✝)) = size (node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\n⊢ Decidable (Balanced nil)\n[PROOFSTEP]\nunfold Balanced\n[GOAL]\nα : Type u_1\n⊢ Decidable True\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nsize✝ : ℕ\nl : Ordnode α\nx✝ : α\nr : Ordnode α\n⊢ Decidable (Balanced (node size✝ l x✝ r))\n[PROOFSTEP]\nunfold Balanced\n[GOAL]\nα : Type u_1\nsize✝ : ℕ\nl : Ordnode α\nx✝ : α\nr : Ordnode α\n⊢ Decidable (BalancedSz (size l) (size r) ∧ Balanced l ∧ Balanced r)\n[PROOFSTEP]\nhaveI := Balanced.dec l\n[GOAL]\nα : Type u_1\nsize✝ : ℕ\nl : Ordnode α\nx✝ : α\nr : Ordnode α\nthis : Decidable (Balanced l)\n⊢ Decidable (BalancedSz (size l) (size r) ∧ Balanced l ∧ Balanced r)\n[PROOFSTEP]\nhaveI := Balanced.dec r\n[GOAL]\nα : Type u_1\nsize✝ : ℕ\nl : Ordnode α\nx✝ : α\nr : Ordnode α\nthis✝ : Decidable (Balanced l)\nthis : Decidable (Balanced r)\n⊢ Decidable (BalancedSz (size l) (size r) ∧ Balanced l ∧ Balanced r)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nl r : ℕ\n⊢ l + r ≤ 1 → r + l ≤ 1\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u_1\nl r : ℕ\n⊢ r + l ≤ 1 → r + l ≤ 1\n[PROOFSTEP]\nexact id\n[GOAL]\nα : Type u_1\nl : ℕ\n⊢ BalancedSz l 0 ↔ l ≤ 1\n[PROOFSTEP]\nsimp (config := { contextual := true }) [BalancedSz]\n[GOAL]\nα : Type u_1\nl r₁ r₂ : ℕ\nh₁ : r₁ ≤ r₂\nh₂ : l + r₂ ≤ 1 ∨ r₂ ≤ delta * l\nH : BalancedSz l r₁\n⊢ BalancedSz l r₂\n[PROOFSTEP]\nrefine' or_iff_not_imp_left.2 fun h => _\n[GOAL]\nα : Type u_1\nl r₁ r₂ : ℕ\nh₁ : r₁ ≤ r₂\nh₂ : l + r₂ ≤ 1 ∨ r₂ ≤ delta * l\nH : BalancedSz l r₁\nh : ¬l + r₂ ≤ 1\n⊢ l ≤ delta * r₂ ∧ r₂ ≤ delta * l\n[PROOFSTEP]\nrefine' ⟨_, h₂.resolve_left h⟩\n[GOAL]\nα : Type u_1\nl r₁ r₂ : ℕ\nh₁ : r₁ ≤ r₂\nh₂ : l + r₂ ≤ 1 ∨ r₂ ≤ delta * l\nH : BalancedSz l r₁\nh : ¬l + r₂ ≤ 1\n⊢ l ≤ delta * r₂\n[PROOFSTEP]\ncases H with\n| inl H =>\n  cases r₂\n  · cases h (le_trans (Nat.add_le_add_left (Nat.zero_le _) _) H)\n  · exact le_trans (le_trans (Nat.le_add_right _ _) H) (Nat.le_add_left 1 _)\n| inr H => exact le_trans H.1 (Nat.mul_le_mul_left _ h₁)\n[GOAL]\nα : Type u_1\nl r₁ r₂ : ℕ\nh₁ : r₁ ≤ r₂\nh₂ : l + r₂ ≤ 1 ∨ r₂ ≤ delta * l\nH : BalancedSz l r₁\nh : ¬l + r₂ ≤ 1\n⊢ l ≤ delta * r₂\n[PROOFSTEP]\ncases H with\n| inl H =>\n  cases r₂\n  · cases h (le_trans (Nat.add_le_add_left (Nat.zero_le _) _) H)\n  · exact le_trans (le_trans (Nat.le_add_right _ _) H) (Nat.le_add_left 1 _)\n| inr H => exact le_trans H.1 (Nat.mul_le_mul_left _ h₁)\n[GOAL]\ncase inl\nα : Type u_1\nl r₁ r₂ : ℕ\nh₁ : r₁ ≤ r₂\nh₂ : l + r₂ ≤ 1 ∨ r₂ ≤ delta * l\nh : ¬l + r₂ ≤ 1\nH : l + r₁ ≤ 1\n⊢ l ≤ delta * r₂\n[PROOFSTEP]\n\n| inl H =>\n  cases r₂\n  · cases h (le_trans (Nat.add_le_add_left (Nat.zero_le _) _) H)\n  · exact le_trans (le_trans (Nat.le_add_right _ _) H) (Nat.le_add_left 1 _)\n[GOAL]\ncase inl\nα : Type u_1\nl r₁ r₂ : ℕ\nh₁ : r₁ ≤ r₂\nh₂ : l + r₂ ≤ 1 ∨ r₂ ≤ delta * l\nh : ¬l + r₂ ≤ 1\nH : l + r₁ ≤ 1\n⊢ l ≤ delta * r₂\n[PROOFSTEP]\ncases r₂\n[GOAL]\ncase inl.zero\nα : Type u_1\nl r₁ : ℕ\nH : l + r₁ ≤ 1\nh₁ : r₁ ≤ Nat.zero\nh₂ : l + Nat.zero ≤ 1 ∨ Nat.zero ≤ delta * l\nh : ¬l + Nat.zero ≤ 1\n⊢ l ≤ delta * Nat.zero\n[PROOFSTEP]\ncases h (le_trans (Nat.add_le_add_left (Nat.zero_le _) _) H)\n[GOAL]\ncase inl.succ\nα : Type u_1\nl r₁ : ℕ\nH : l + r₁ ≤ 1\nn✝ : ℕ\nh₁ : r₁ ≤ Nat.succ n✝\nh₂ : l + Nat.succ n✝ ≤ 1 ∨ Nat.succ n✝ ≤ delta * l\nh : ¬l + Nat.succ n✝ ≤ 1\n⊢ l ≤ delta * Nat.succ n✝\n[PROOFSTEP]\nexact le_trans (le_trans (Nat.le_add_right _ _) H) (Nat.le_add_left 1 _)\n[GOAL]\ncase inr\nα : Type u_1\nl r₁ r₂ : ℕ\nh₁ : r₁ ≤ r₂\nh₂ : l + r₂ ≤ 1 ∨ r₂ ≤ delta * l\nh : ¬l + r₂ ≤ 1\nH : l ≤ delta * r₁ ∧ r₁ ≤ delta * l\n⊢ l ≤ delta * r₂\n[PROOFSTEP]\n\n| inr H => exact le_trans H.1 (Nat.mul_le_mul_left _ h₁)\n[GOAL]\ncase inr\nα : Type u_1\nl r₁ r₂ : ℕ\nh₁ : r₁ ≤ r₂\nh₂ : l + r₂ ≤ 1 ∨ r₂ ≤ delta * l\nh : ¬l + r₂ ≤ 1\nH : l ≤ delta * r₁ ∧ r₁ ≤ delta * l\n⊢ l ≤ delta * r₂\n[PROOFSTEP]\nexact le_trans H.1 (Nat.mul_le_mul_left _ h₁)\n[GOAL]\nα : Type u_1\nsize✝ : ℕ\nl : Ordnode α\nx✝ : α\nr : Ordnode α\nb : BalancedSz (size l) (size r)\nbl : Balanced l\nbr : Balanced r\n⊢ BalancedSz (size (Ordnode.dual r)) (size (Ordnode.dual l))\n[PROOFSTEP]\nrw [size_dual, size_dual]\n[GOAL]\nα : Type u_1\nsize✝ : ℕ\nl : Ordnode α\nx✝ : α\nr : Ordnode α\nb : BalancedSz (size l) (size r)\nbl : Balanced l\nbr : Balanced r\n⊢ BalancedSz (size r) (size l)\n[PROOFSTEP]\nexact b.symm\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ dual (node' l x r) = node' (dual r) x (dual l)\n[PROOFSTEP]\nsimp [node', add_comm]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\n⊢ dual (node3L l x m y r) = node3R (dual r) y (dual m) x (dual l)\n[PROOFSTEP]\nsimp [node3L, node3R, dual_node', add_comm]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\n⊢ dual (node3R l x m y r) = node3L (dual r) y (dual m) x (dual l)\n[PROOFSTEP]\nsimp [node3L, node3R, dual_node', add_comm]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\n⊢ dual (node4L l x m y r) = node4R (dual r) y (dual m) x (dual l)\n[PROOFSTEP]\ncases m\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\n⊢ dual (node4L l x nil y r) = node4R (dual r) y (dual nil) x (dual l)\n[PROOFSTEP]\nsimp [node4L, node4R, node3R, dual_node3L, dual_node', add_comm]\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ dual (node4L l x (node size✝ l✝ x✝ r✝) y r) = node4R (dual r) y (dual (node size✝ l✝ x✝ r✝)) x (dual l)\n[PROOFSTEP]\nsimp [node4L, node4R, node3R, dual_node3L, dual_node', add_comm]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\n⊢ dual (node4R l x m y r) = node4L (dual r) y (dual m) x (dual l)\n[PROOFSTEP]\ncases m\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\n⊢ dual (node4R l x nil y r) = node4L (dual r) y (dual nil) x (dual l)\n[PROOFSTEP]\nsimp [node4L, node4R, node3L, dual_node3R, dual_node', add_comm]\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ dual (node4R l x (node size✝ l✝ x✝ r✝) y r) = node4L (dual r) y (dual (node size✝ l✝ x✝ r✝)) x (dual l)\n[PROOFSTEP]\nsimp [node4L, node4R, node3L, dual_node3R, dual_node', add_comm]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ dual (rotateL l x r) = rotateR (dual r) x (dual l)\n[PROOFSTEP]\ncases r\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx : α\n⊢ dual (rotateL l x nil) = rotateR (dual nil) x (dual l)\n[PROOFSTEP]\nsimp [rotateL, rotateR, dual_node']\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ dual (rotateL l x (node size✝ l✝ x✝ r✝)) = rotateR (dual (node size✝ l✝ x✝ r✝)) x (dual l)\n[PROOFSTEP]\nsimp [rotateL, rotateR, dual_node']\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ dual (if size l✝ < ratio * size r✝ then node3L l x l✝ x✝ r✝ else node4L l x l✝ x✝ r✝) =\n    if size l✝ < ratio * size r✝ then node3R (dual r✝) x✝ (dual l✝) x (dual l)\n    else node4R (dual r✝) x✝ (dual l✝) x (dual l)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nh✝ : size l✝ < ratio * size r✝\n⊢ dual (node3L l x l✝ x✝ r✝) = node3R (dual r✝) x✝ (dual l✝) x (dual l)\n[PROOFSTEP]\nsimp [dual_node3L, dual_node4L, node3R, add_comm]\n[GOAL]\ncase neg\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nh✝ : ¬size l✝ < ratio * size r✝\n⊢ dual (node4L l x l✝ x✝ r✝) = node4R (dual r✝) x✝ (dual l✝) x (dual l)\n[PROOFSTEP]\nsimp [dual_node3L, dual_node4L, node3R, add_comm]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ dual (rotateR l x r) = rotateL (dual r) x (dual l)\n[PROOFSTEP]\nrw [← dual_dual (rotateL _ _ _), dual_rotateL, dual_dual, dual_dual]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ dual (balance' l x r) = balance' (dual r) x (dual l)\n[PROOFSTEP]\nsimp [balance', add_comm]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ dual\n      (if size l + size r ≤ 1 then node' l x r\n      else\n        if delta * size l < size r then rotateL l x r\n        else if delta * size r < size l then rotateR l x r else node' l x r) =\n    if size l + size r ≤ 1 then node' (dual r) x (dual l)\n    else\n      if delta * size r < size l then rotateL (dual r) x (dual l)\n      else if delta * size l < size r then rotateR (dual r) x (dual l) else node' (dual r) x (dual l)\n[PROOFSTEP]\nsplit_ifs with h h_1 h_2\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nh : size l + size r ≤ 1\n⊢ dual (node' l x r) = node' (dual r) x (dual l)\n[PROOFSTEP]\nsimp [dual_node', dual_rotateL, dual_rotateR, add_comm]\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nh : ¬size l + size r ≤ 1\nh_1 : delta * size l < size r\nh_2 : delta * size r < size l\n⊢ dual (rotateL l x r) = rotateL (dual r) x (dual l)\n[PROOFSTEP]\nsimp [dual_node', dual_rotateL, dual_rotateR, add_comm]\n[GOAL]\ncase neg\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nh : ¬size l + size r ≤ 1\nh_1 : delta * size l < size r\nh_2 : ¬delta * size r < size l\n⊢ dual (rotateL l x r) = rotateR (dual r) x (dual l)\n[PROOFSTEP]\nsimp [dual_node', dual_rotateL, dual_rotateR, add_comm]\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nh : ¬size l + size r ≤ 1\nh_1 : ¬delta * size l < size r\nh✝ : delta * size r < size l\n⊢ dual (rotateR l x r) = rotateL (dual r) x (dual l)\n[PROOFSTEP]\nsimp [dual_node', dual_rotateL, dual_rotateR, add_comm]\n[GOAL]\ncase neg\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nh : ¬size l + size r ≤ 1\nh_1 : ¬delta * size l < size r\nh✝ : ¬delta * size r < size l\n⊢ dual (node' l x r) = node' (dual r) x (dual l)\n[PROOFSTEP]\nsimp [dual_node', dual_rotateL, dual_rotateR, add_comm]\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nh : ¬size l + size r ≤ 1\nh_1 : delta * size l < size r\nh_2 : delta * size r < size l\n⊢ rotateR (dual r) x (dual l) = rotateL (dual r) x (dual l)\n[PROOFSTEP]\ncases delta_lt_false h_1 h_2\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ dual (balanceL l x r) = balanceR (dual r) x (dual l)\n[PROOFSTEP]\nunfold balanceL balanceR\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id r = t → Ordnode α) (id r)\n        (fun h =>\n          (_ : nil = id r) ▸\n            Ordnode.casesOn (motive := fun t => id l = t → Ordnode α) (id l)\n              (fun h => (_ : nil = id l) ▸ Ordnode.singleton x)\n              (fun ls ll lx lr h =>\n                (_ : node ls ll lx lr = id l) ▸\n                  Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                    (fun h =>\n                      (_ : nil = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => lr = t → Ordnode α) lr\n                          (fun h => (_ : nil = lr) ▸ node 2 l x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr) ▸ node 3 (Ordnode.singleton lx) lrx (Ordnode.singleton x))\n                          (_ : lr = lr))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                          (fun h => (_ : nil = id lr) ▸ node 3 ll lx (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr) ▸\n                              if lrs < ratio * lls then node (ls + 1) ll lx (node (lrs + 1) lr x nil)\n                              else\n                                node (ls + 1) (node (lls + size lrl + 1) ll lx lrl) lrx (node (size lrr + 1) lrr x nil))\n                          (_ : id lr = id lr))\n                    (_ : id ll = id ll))\n              (_ : id l = id l))\n        (fun rs l_1 x_1 r_1 h =>\n          (_ : node rs l_1 x_1 r_1 = id r) ▸\n            Ordnode.casesOn (motive := fun t => id l = t → Ordnode α) (id l)\n              (fun h => (_ : nil = id l) ▸ node (rs + 1) nil x r)\n              (fun ls ll lx lr h =>\n                (_ : node ls ll lx lr = id l) ▸\n                  if ls > delta * rs then\n                    Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                      (fun h => (_ : nil = id ll) ▸ nil)\n                      (fun lls l x_2 r_2 h =>\n                        (_ : node lls l x_2 r_2 = id ll) ▸\n                          Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                            (fun h => (_ : nil = id lr) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr) ▸\n                                if lrs < ratio * lls then node (ls + rs + 1) ll lx (node (rs + lrs + 1) lr x r)\n                                else\n                                  node (ls + rs + 1) (node (lls + size lrl + 1) ll lx lrl) lrx\n                                    (node (size lrr + rs + 1) lrr x r))\n                            (_ : id lr = id lr))\n                      (_ : id ll = id ll)\n                  else node (ls + rs + 1) l x r)\n              (_ : id l = id l))\n        (_ : id r = id r)) =\n    Ordnode.casesOn (motive := fun t => id (dual r) = t → Ordnode α) (id (dual r))\n      (fun h =>\n        (_ : nil = id (dual r)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual l) = t → Ordnode α) (id (dual l))\n            (fun h => (_ : nil = id (dual l)) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual l)) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h => (_ : nil = rl) ▸ node 2 nil x (dual l))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ : id (dual l) = id (dual l)))\n      (fun ls l_1 x_1 r_1 h =>\n        (_ : node ls l_1 x_1 r_1 = id (dual r)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual l) = t → Ordnode α) (id (dual l))\n            (fun h => (_ : nil = id (dual l)) ▸ node (ls + 1) (dual r) x nil)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual l)) ▸\n                if rs > delta * ls then\n                  Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr) (fun h => (_ : nil = id rr) ▸ nil)\n                    (fun rrs l x_2 r_2 h =>\n                      (_ : node rrs l x_2 r_2 = id rr) ▸\n                        Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                          (fun h => (_ : nil = id rl) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl) ▸\n                              if rls < ratio * rrs then node (ls + rs + 1) (node (ls + rls + 1) (dual r) x rl) rx rr\n                              else\n                                node (ls + rs + 1) (node (ls + size rll + 1) (dual r) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx rr))\n                          (_ : id rl = id rl))\n                    (_ : id rr = id rr)\n                else node (ls + rs + 1) (dual r) x (dual l))\n            (_ : id (dual l) = id (dual l)))\n      (_ : id (dual r) = id (dual r))\n[PROOFSTEP]\ncases' r with rs rl rx rr\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx : α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n        (fun h =>\n          (_ : nil = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id l = t → Ordnode α) (id l)\n              (fun h => (_ : nil = id l) ▸ Ordnode.singleton x)\n              (fun ls ll lx lr h =>\n                (_ : node ls ll lx lr = id l) ▸\n                  Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                    (fun h =>\n                      (_ : nil = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => lr = t → Ordnode α) lr\n                          (fun h => (_ : nil = lr) ▸ node 2 l x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr) ▸ node 3 (Ordnode.singleton lx) lrx (Ordnode.singleton x))\n                          (_ : lr = lr))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                          (fun h => (_ : nil = id lr) ▸ node 3 ll lx (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr) ▸\n                              if lrs < ratio * lls then node (ls + 1) ll lx (node (lrs + 1) lr x nil)\n                              else\n                                node (ls + 1) (node (lls + size lrl + 1) ll lx lrl) lrx (node (size lrr + 1) lrr x nil))\n                          (_ : id lr = id lr))\n                    (_ : id ll = id ll))\n              (_ : id l = id l))\n        (fun rs l_1 x_1 r h =>\n          (_ : node rs l_1 x_1 r = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id l = t → Ordnode α) (id l)\n              (fun h => (_ : nil = id l) ▸ node (rs + 1) nil x nil)\n              (fun ls ll lx lr h =>\n                (_ : node ls ll lx lr = id l) ▸\n                  if ls > delta * rs then\n                    Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                      (fun h => (_ : nil = id ll) ▸ nil)\n                      (fun lls l x_2 r h =>\n                        (_ : node lls l x_2 r = id ll) ▸\n                          Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                            (fun h => (_ : nil = id lr) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr) ▸\n                                if lrs < ratio * lls then node (ls + rs + 1) ll lx (node (rs + lrs + 1) lr x nil)\n                                else\n                                  node (ls + rs + 1) (node (lls + size lrl + 1) ll lx lrl) lrx\n                                    (node (size lrr + rs + 1) lrr x nil))\n                            (_ : id lr = id lr))\n                      (_ : id ll = id ll)\n                  else node (ls + rs + 1) l x nil)\n              (_ : id l = id l))\n        (_ : id nil = id nil)) =\n    Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n      (fun h =>\n        (_ : nil = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual l) = t → Ordnode α) (id (dual l))\n            (fun h => (_ : nil = id (dual l)) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual l)) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h => (_ : nil = rl) ▸ node 2 nil x (dual l))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ : id (dual l) = id (dual l)))\n      (fun ls l_1 x_1 r h =>\n        (_ : node ls l_1 x_1 r = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual l) = t → Ordnode α) (id (dual l))\n            (fun h => (_ : nil = id (dual l)) ▸ node (ls + 1) (dual nil) x nil)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual l)) ▸\n                if rs > delta * ls then\n                  Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr) (fun h => (_ : nil = id rr) ▸ nil)\n                    (fun rrs l x_2 r h =>\n                      (_ : node rrs l x_2 r = id rr) ▸\n                        Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                          (fun h => (_ : nil = id rl) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl) ▸\n                              if rls < ratio * rrs then node (ls + rs + 1) (node (ls + rls + 1) (dual nil) x rl) rx rr\n                              else\n                                node (ls + rs + 1) (node (ls + size rll + 1) (dual nil) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx rr))\n                          (_ : id rl = id rl))\n                    (_ : id rr = id rr)\n                else node (ls + rs + 1) (dual nil) x (dual l))\n            (_ : id (dual l) = id (dual l)))\n      (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\ncases' l with ls ll lx lr\n[GOAL]\ncase nil.nil\nα : Type u_1\nx : α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n        (fun h =>\n          (_ : nil = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n              (fun h => (_ : nil = id nil) ▸ Ordnode.singleton x)\n              (fun ls ll lx lr h =>\n                (_ : node ls ll lx lr = id nil) ▸\n                  Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                    (fun h =>\n                      (_ : nil = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => lr = t → Ordnode α) lr\n                          (fun h => (_ : nil = lr) ▸ node 2 nil x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr) ▸ node 3 (Ordnode.singleton lx) lrx (Ordnode.singleton x))\n                          (_ : lr = lr))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                          (fun h => (_ : nil = id lr) ▸ node 3 ll lx (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr) ▸\n                              if lrs < ratio * lls then node (ls + 1) ll lx (node (lrs + 1) lr x nil)\n                              else\n                                node (ls + 1) (node (lls + size lrl + 1) ll lx lrl) lrx (node (size lrr + 1) lrr x nil))\n                          (_ : id lr = id lr))\n                    (_ : id ll = id ll))\n              (_ : id nil = id nil))\n        (fun rs l x_1 r h =>\n          (_ : node rs l x_1 r = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n              (fun h => (_ : nil = id nil) ▸ node (rs + 1) nil x nil)\n              (fun ls ll lx lr h =>\n                (_ : node ls ll lx lr = id nil) ▸\n                  if ls > delta * rs then\n                    Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                      (fun h => (_ : nil = id ll) ▸ nil)\n                      (fun lls l x_2 r h =>\n                        (_ : node lls l x_2 r = id ll) ▸\n                          Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                            (fun h => (_ : nil = id lr) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr) ▸\n                                if lrs < ratio * lls then node (ls + rs + 1) ll lx (node (rs + lrs + 1) lr x nil)\n                                else\n                                  node (ls + rs + 1) (node (lls + size lrl + 1) ll lx lrl) lrx\n                                    (node (size lrr + rs + 1) lrr x nil))\n                            (_ : id lr = id lr))\n                      (_ : id ll = id ll)\n                  else node (ls + rs + 1) nil x nil)\n              (_ : id nil = id nil))\n        (_ : id nil = id nil)) =\n    Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n      (fun h =>\n        (_ : nil = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n            (fun h => (_ : nil = id (dual nil)) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual nil)) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h => (_ : nil = rl) ▸ node 2 nil x (dual nil))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ : id (dual nil) = id (dual nil)))\n      (fun ls l x_1 r h =>\n        (_ : node ls l x_1 r = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n            (fun h => (_ : nil = id (dual nil)) ▸ node (ls + 1) (dual nil) x nil)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual nil)) ▸\n                if rs > delta * ls then\n                  Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr) (fun h => (_ : nil = id rr) ▸ nil)\n                    (fun rrs l x_2 r h =>\n                      (_ : node rrs l x_2 r = id rr) ▸\n                        Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                          (fun h => (_ : nil = id rl) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl) ▸\n                              if rls < ratio * rrs then node (ls + rs + 1) (node (ls + rls + 1) (dual nil) x rl) rx rr\n                              else\n                                node (ls + rs + 1) (node (ls + size rll + 1) (dual nil) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx rr))\n                          (_ : id rl = id rl))\n                    (_ : id rr = id rr)\n                else node (ls + rs + 1) (dual nil) x (dual nil))\n            (_ : id (dual nil) = id (dual nil)))\n      (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase nil.node\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n        (fun h =>\n          (_ : nil = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls ll lx lr) = t → Ordnode α) (id (node ls ll lx lr))\n              (fun h => (_ : nil = id (node ls ll lx lr)) ▸ Ordnode.singleton x)\n              (fun ls_1 ll_1 lx_1 lr_1 h =>\n                (_ : node ls_1 ll_1 lx_1 lr_1 = id (node ls ll lx lr)) ▸\n                  Ordnode.casesOn (motive := fun t => id ll_1 = t → Ordnode α) (id ll_1)\n                    (fun h =>\n                      (_ : nil = id ll_1) ▸\n                        Ordnode.casesOn (motive := fun t => lr_1 = t → Ordnode α) lr_1\n                          (fun h => (_ : nil = lr_1) ▸ node 2 (node ls ll lx lr) x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr_1) ▸ node 3 (Ordnode.singleton lx_1) lrx (Ordnode.singleton x))\n                          (_ : lr_1 = lr_1))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll_1) ▸\n                        Ordnode.casesOn (motive := fun t => id lr_1 = t → Ordnode α) (id lr_1)\n                          (fun h => (_ : nil = id lr_1) ▸ node 3 ll_1 lx_1 (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr_1) ▸\n                              if lrs < ratio * lls then node (ls_1 + 1) ll_1 lx_1 (node (lrs + 1) lr_1 x nil)\n                              else\n                                node (ls_1 + 1) (node (lls + size lrl + 1) ll_1 lx_1 lrl) lrx\n                                  (node (size lrr + 1) lrr x nil))\n                          (_ : id lr_1 = id lr_1))\n                    (_ : id ll_1 = id ll_1))\n              (_ : id (node ls ll lx lr) = id (node ls ll lx lr)))\n        (fun rs l x_1 r h =>\n          (_ : node rs l x_1 r = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls ll lx lr) = t → Ordnode α) (id (node ls ll lx lr))\n              (fun h => (_ : nil = id (node ls ll lx lr)) ▸ node (rs + 1) nil x nil)\n              (fun ls_1 ll_1 lx_1 lr_1 h =>\n                (_ : node ls_1 ll_1 lx_1 lr_1 = id (node ls ll lx lr)) ▸\n                  if ls_1 > delta * rs then\n                    Ordnode.casesOn (motive := fun t => id ll_1 = t → Ordnode α) (id ll_1)\n                      (fun h => (_ : nil = id ll_1) ▸ nil)\n                      (fun lls l x_2 r h =>\n                        (_ : node lls l x_2 r = id ll_1) ▸\n                          Ordnode.casesOn (motive := fun t => id lr_1 = t → Ordnode α) (id lr_1)\n                            (fun h => (_ : nil = id lr_1) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr_1) ▸\n                                if lrs < ratio * lls then\n                                  node (ls_1 + rs + 1) ll_1 lx_1 (node (rs + lrs + 1) lr_1 x nil)\n                                else\n                                  node (ls_1 + rs + 1) (node (lls + size lrl + 1) ll_1 lx_1 lrl) lrx\n                                    (node (size lrr + rs + 1) lrr x nil))\n                            (_ : id lr_1 = id lr_1))\n                      (_ : id ll_1 = id ll_1)\n                  else node (ls_1 + rs + 1) (node ls ll lx lr) x nil)\n              (_ : id (node ls ll lx lr) = id (node ls ll lx lr)))\n        (_ : id nil = id nil)) =\n    Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n      (fun h =>\n        (_ : nil = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls ll lx lr)) = t → Ordnode α)\n            (id (dual (node ls ll lx lr))) (fun h => (_ : nil = id (dual (node ls ll lx lr))) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls ll lx lr))) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h => (_ : nil = rl) ▸ node 2 nil x (dual (node ls ll lx lr)))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ : id (dual (node ls ll lx lr)) = id (dual (node ls ll lx lr))))\n      (fun ls_1 l x_1 r h =>\n        (_ : node ls_1 l x_1 r = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls ll lx lr)) = t → Ordnode α)\n            (id (dual (node ls ll lx lr)))\n            (fun h => (_ : nil = id (dual (node ls ll lx lr))) ▸ node (ls_1 + 1) (dual nil) x nil)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls ll lx lr))) ▸\n                if rs > delta * ls_1 then\n                  Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr) (fun h => (_ : nil = id rr) ▸ nil)\n                    (fun rrs l x_2 r h =>\n                      (_ : node rrs l x_2 r = id rr) ▸\n                        Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                          (fun h => (_ : nil = id rl) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl) ▸\n                              if rls < ratio * rrs then\n                                node (ls_1 + rs + 1) (node (ls_1 + rls + 1) (dual nil) x rl) rx rr\n                              else\n                                node (ls_1 + rs + 1) (node (ls_1 + size rll + 1) (dual nil) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx rr))\n                          (_ : id rl = id rl))\n                    (_ : id rr = id rr)\n                else node (ls_1 + rs + 1) (dual nil) x (dual (node ls ll lx lr)))\n            (_ : id (dual (node ls ll lx lr)) = id (dual (node ls ll lx lr))))\n      (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\ncases' ll with lls lll llx llr\n[GOAL]\ncase nil.node.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlr : Ordnode α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n        (fun h =>\n          (_ : nil = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls nil lx lr) = t → Ordnode α) (id (node ls nil lx lr))\n              (fun h => (_ : nil = id (node ls nil lx lr)) ▸ Ordnode.singleton x)\n              (fun ls_1 ll lx_1 lr_1 h =>\n                (_ : node ls_1 ll lx_1 lr_1 = id (node ls nil lx lr)) ▸\n                  Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                    (fun h =>\n                      (_ : nil = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => lr_1 = t → Ordnode α) lr_1\n                          (fun h => (_ : nil = lr_1) ▸ node 2 (node ls nil lx lr) x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr_1) ▸ node 3 (Ordnode.singleton lx_1) lrx (Ordnode.singleton x))\n                          (_ : lr_1 = lr_1))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => id lr_1 = t → Ordnode α) (id lr_1)\n                          (fun h => (_ : nil = id lr_1) ▸ node 3 ll lx_1 (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr_1) ▸\n                              if lrs < ratio * lls then node (ls_1 + 1) ll lx_1 (node (lrs + 1) lr_1 x nil)\n                              else\n                                node (ls_1 + 1) (node (lls + size lrl + 1) ll lx_1 lrl) lrx\n                                  (node (size lrr + 1) lrr x nil))\n                          (_ : id lr_1 = id lr_1))\n                    (_ : id ll = id ll))\n              (_ : id (node ls nil lx lr) = id (node ls nil lx lr)))\n        (fun rs l x_1 r h =>\n          (_ : node rs l x_1 r = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls nil lx lr) = t → Ordnode α) (id (node ls nil lx lr))\n              (fun h => (_ : nil = id (node ls nil lx lr)) ▸ node (rs + 1) nil x nil)\n              (fun ls_1 ll lx_1 lr_1 h =>\n                (_ : node ls_1 ll lx_1 lr_1 = id (node ls nil lx lr)) ▸\n                  if ls_1 > delta * rs then\n                    Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                      (fun h => (_ : nil = id ll) ▸ nil)\n                      (fun lls l x_2 r h =>\n                        (_ : node lls l x_2 r = id ll) ▸\n                          Ordnode.casesOn (motive := fun t => id lr_1 = t → Ordnode α) (id lr_1)\n                            (fun h => (_ : nil = id lr_1) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr_1) ▸\n                                if lrs < ratio * lls then node (ls_1 + rs + 1) ll lx_1 (node (rs + lrs + 1) lr_1 x nil)\n                                else\n                                  node (ls_1 + rs + 1) (node (lls + size lrl + 1) ll lx_1 lrl) lrx\n                                    (node (size lrr + rs + 1) lrr x nil))\n                            (_ : id lr_1 = id lr_1))\n                      (_ : id ll = id ll)\n                  else node (ls_1 + rs + 1) (node ls nil lx lr) x nil)\n              (_ : id (node ls nil lx lr) = id (node ls nil lx lr)))\n        (_ : id nil = id nil)) =\n    Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n      (fun h =>\n        (_ : nil = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls nil lx lr)) = t → Ordnode α)\n            (id (dual (node ls nil lx lr))) (fun h => (_ : nil = id (dual (node ls nil lx lr))) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls nil lx lr))) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h => (_ : nil = rl) ▸ node 2 nil x (dual (node ls nil lx lr)))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ : id (dual (node ls nil lx lr)) = id (dual (node ls nil lx lr))))\n      (fun ls_1 l x_1 r h =>\n        (_ : node ls_1 l x_1 r = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls nil lx lr)) = t → Ordnode α)\n            (id (dual (node ls nil lx lr)))\n            (fun h => (_ : nil = id (dual (node ls nil lx lr))) ▸ node (ls_1 + 1) (dual nil) x nil)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls nil lx lr))) ▸\n                if rs > delta * ls_1 then\n                  Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr) (fun h => (_ : nil = id rr) ▸ nil)\n                    (fun rrs l x_2 r h =>\n                      (_ : node rrs l x_2 r = id rr) ▸\n                        Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                          (fun h => (_ : nil = id rl) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl) ▸\n                              if rls < ratio * rrs then\n                                node (ls_1 + rs + 1) (node (ls_1 + rls + 1) (dual nil) x rl) rx rr\n                              else\n                                node (ls_1 + rs + 1) (node (ls_1 + size rll + 1) (dual nil) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx rr))\n                          (_ : id rl = id rl))\n                    (_ : id rr = id rr)\n                else node (ls_1 + rs + 1) (dual nil) x (dual (node ls nil lx lr)))\n            (_ : id (dual (node ls nil lx lr)) = id (dual (node ls nil lx lr))))\n      (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\ncases' lr with lrs lrl lrx lrr\n[GOAL]\ncase nil.node.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlr : Ordnode α\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n        (fun h =>\n          (_ : nil = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls (node lls lll llx llr) lx lr) = t → Ordnode α)\n              (id (node ls (node lls lll llx llr) lx lr))\n              (fun h => (_ : nil = id (node ls (node lls lll llx llr) lx lr)) ▸ Ordnode.singleton x)\n              (fun ls_1 ll lx_1 lr_1 h =>\n                (_ : node ls_1 ll lx_1 lr_1 = id (node ls (node lls lll llx llr) lx lr)) ▸\n                  Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                    (fun h =>\n                      (_ : nil = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => lr_1 = t → Ordnode α) lr_1\n                          (fun h => (_ : nil = lr_1) ▸ node 2 (node ls (node lls lll llx llr) lx lr) x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr_1) ▸ node 3 (Ordnode.singleton lx_1) lrx (Ordnode.singleton x))\n                          (_ : lr_1 = lr_1))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => id lr_1 = t → Ordnode α) (id lr_1)\n                          (fun h => (_ : nil = id lr_1) ▸ node 3 ll lx_1 (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr_1) ▸\n                              if lrs < ratio * lls then node (ls_1 + 1) ll lx_1 (node (lrs + 1) lr_1 x nil)\n                              else\n                                node (ls_1 + 1) (node (lls + size lrl + 1) ll lx_1 lrl) lrx\n                                  (node (size lrr + 1) lrr x nil))\n                          (_ : id lr_1 = id lr_1))\n                    (_ : id ll = id ll))\n              (_ : id (node ls (node lls lll llx llr) lx lr) = id (node ls (node lls lll llx llr) lx lr)))\n        (fun rs l x_1 r h =>\n          (_ : node rs l x_1 r = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls (node lls lll llx llr) lx lr) = t → Ordnode α)\n              (id (node ls (node lls lll llx llr) lx lr))\n              (fun h => (_ : nil = id (node ls (node lls lll llx llr) lx lr)) ▸ node (rs + 1) nil x nil)\n              (fun ls_1 ll lx_1 lr_1 h =>\n                (_ : node ls_1 ll lx_1 lr_1 = id (node ls (node lls lll llx llr) lx lr)) ▸\n                  if ls_1 > delta * rs then\n                    Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                      (fun h => (_ : nil = id ll) ▸ nil)\n                      (fun lls l x_2 r h =>\n                        (_ : node lls l x_2 r = id ll) ▸\n                          Ordnode.casesOn (motive := fun t => id lr_1 = t → Ordnode α) (id lr_1)\n                            (fun h => (_ : nil = id lr_1) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr_1) ▸\n                                if lrs < ratio * lls then node (ls_1 + rs + 1) ll lx_1 (node (rs + lrs + 1) lr_1 x nil)\n                                else\n                                  node (ls_1 + rs + 1) (node (lls + size lrl + 1) ll lx_1 lrl) lrx\n                                    (node (size lrr + rs + 1) lrr x nil))\n                            (_ : id lr_1 = id lr_1))\n                      (_ : id ll = id ll)\n                  else node (ls_1 + rs + 1) (node ls (node lls lll llx llr) lx lr) x nil)\n              (_ : id (node ls (node lls lll llx llr) lx lr) = id (node ls (node lls lll llx llr) lx lr)))\n        (_ : id nil = id nil)) =\n    Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n      (fun h =>\n        (_ : nil = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls (node lls lll llx llr) lx lr)) = t → Ordnode α)\n            (id (dual (node ls (node lls lll llx llr) lx lr)))\n            (fun h => (_ : nil = id (dual (node ls (node lls lll llx llr) lx lr))) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls (node lls lll llx llr) lx lr))) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h => (_ : nil = rl) ▸ node 2 nil x (dual (node ls (node lls lll llx llr) lx lr)))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ : id (dual (node ls (node lls lll llx llr) lx lr)) = id (dual (node ls (node lls lll llx llr) lx lr))))\n      (fun ls_1 l x_1 r h =>\n        (_ : node ls_1 l x_1 r = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls (node lls lll llx llr) lx lr)) = t → Ordnode α)\n            (id (dual (node ls (node lls lll llx llr) lx lr)))\n            (fun h => (_ : nil = id (dual (node ls (node lls lll llx llr) lx lr))) ▸ node (ls_1 + 1) (dual nil) x nil)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls (node lls lll llx llr) lx lr))) ▸\n                if rs > delta * ls_1 then\n                  Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr) (fun h => (_ : nil = id rr) ▸ nil)\n                    (fun rrs l x_2 r h =>\n                      (_ : node rrs l x_2 r = id rr) ▸\n                        Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                          (fun h => (_ : nil = id rl) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl) ▸\n                              if rls < ratio * rrs then\n                                node (ls_1 + rs + 1) (node (ls_1 + rls + 1) (dual nil) x rl) rx rr\n                              else\n                                node (ls_1 + rs + 1) (node (ls_1 + size rll + 1) (dual nil) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx rr))\n                          (_ : id rl = id rl))\n                    (_ : id rr = id rr)\n                else node (ls_1 + rs + 1) (dual nil) x (dual (node ls (node lls lll llx llr) lx lr)))\n            (_ : id (dual (node ls (node lls lll llx llr) lx lr)) = id (dual (node ls (node lls lll llx llr) lx lr))))\n      (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\ncases' lr with lrs lrl lrx lrr\n[GOAL]\ncase nil.node.nil.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n        (fun h =>\n          (_ : nil = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls nil lx nil) = t → Ordnode α) (id (node ls nil lx nil))\n              (fun h => (_ : nil = id (node ls nil lx nil)) ▸ Ordnode.singleton x)\n              (fun ls_1 ll lx_1 lr h =>\n                (_ : node ls_1 ll lx_1 lr = id (node ls nil lx nil)) ▸\n                  Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                    (fun h =>\n                      (_ : nil = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => lr = t → Ordnode α) lr\n                          (fun h => (_ : nil = lr) ▸ node 2 (node ls nil lx nil) x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr) ▸ node 3 (Ordnode.singleton lx_1) lrx (Ordnode.singleton x))\n                          (_ : lr = lr))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                          (fun h => (_ : nil = id lr) ▸ node 3 ll lx_1 (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr) ▸\n                              if lrs < ratio * lls then node (ls_1 + 1) ll lx_1 (node (lrs + 1) lr x nil)\n                              else\n                                node (ls_1 + 1) (node (lls + size lrl + 1) ll lx_1 lrl) lrx\n                                  (node (size lrr + 1) lrr x nil))\n                          (_ : id lr = id lr))\n                    (_ : id ll = id ll))\n              (_ : id (node ls nil lx nil) = id (node ls nil lx nil)))\n        (fun rs l x_1 r h =>\n          (_ : node rs l x_1 r = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls nil lx nil) = t → Ordnode α) (id (node ls nil lx nil))\n              (fun h => (_ : nil = id (node ls nil lx nil)) ▸ node (rs + 1) nil x nil)\n              (fun ls_1 ll lx_1 lr h =>\n                (_ : node ls_1 ll lx_1 lr = id (node ls nil lx nil)) ▸\n                  if ls_1 > delta * rs then\n                    Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                      (fun h => (_ : nil = id ll) ▸ nil)\n                      (fun lls l x_2 r h =>\n                        (_ : node lls l x_2 r = id ll) ▸\n                          Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                            (fun h => (_ : nil = id lr) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr) ▸\n                                if lrs < ratio * lls then node (ls_1 + rs + 1) ll lx_1 (node (rs + lrs + 1) lr x nil)\n                                else\n                                  node (ls_1 + rs + 1) (node (lls + size lrl + 1) ll lx_1 lrl) lrx\n                                    (node (size lrr + rs + 1) lrr x nil))\n                            (_ : id lr = id lr))\n                      (_ : id ll = id ll)\n                  else node (ls_1 + rs + 1) (node ls nil lx nil) x nil)\n              (_ : id (node ls nil lx nil) = id (node ls nil lx nil)))\n        (_ : id nil = id nil)) =\n    Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n      (fun h =>\n        (_ : nil = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls nil lx nil)) = t → Ordnode α)\n            (id (dual (node ls nil lx nil))) (fun h => (_ : nil = id (dual (node ls nil lx nil))) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls nil lx nil))) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h => (_ : nil = rl) ▸ node 2 nil x (dual (node ls nil lx nil)))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ : id (dual (node ls nil lx nil)) = id (dual (node ls nil lx nil))))\n      (fun ls_1 l x_1 r h =>\n        (_ : node ls_1 l x_1 r = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls nil lx nil)) = t → Ordnode α)\n            (id (dual (node ls nil lx nil)))\n            (fun h => (_ : nil = id (dual (node ls nil lx nil))) ▸ node (ls_1 + 1) (dual nil) x nil)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls nil lx nil))) ▸\n                if rs > delta * ls_1 then\n                  Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr) (fun h => (_ : nil = id rr) ▸ nil)\n                    (fun rrs l x_2 r h =>\n                      (_ : node rrs l x_2 r = id rr) ▸\n                        Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                          (fun h => (_ : nil = id rl) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl) ▸\n                              if rls < ratio * rrs then\n                                node (ls_1 + rs + 1) (node (ls_1 + rls + 1) (dual nil) x rl) rx rr\n                              else\n                                node (ls_1 + rs + 1) (node (ls_1 + size rll + 1) (dual nil) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx rr))\n                          (_ : id rl = id rl))\n                    (_ : id rr = id rr)\n                else node (ls_1 + rs + 1) (dual nil) x (dual (node ls nil lx nil)))\n            (_ : id (dual (node ls nil lx nil)) = id (dual (node ls nil lx nil))))\n      (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\ndsimp only [dual, id]\n[GOAL]\ncase nil.node.nil.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n        (fun h =>\n          (_ : nil = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls nil lx (node lrs lrl lrx lrr)) = t → Ordnode α)\n              (id (node ls nil lx (node lrs lrl lrx lrr)))\n              (fun h => (_ : nil = id (node ls nil lx (node lrs lrl lrx lrr))) ▸ Ordnode.singleton x)\n              (fun ls_1 ll lx_1 lr h =>\n                (_ : node ls_1 ll lx_1 lr = id (node ls nil lx (node lrs lrl lrx lrr))) ▸\n                  Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                    (fun h =>\n                      (_ : nil = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => lr = t → Ordnode α) lr\n                          (fun h => (_ : nil = lr) ▸ node 2 (node ls nil lx (node lrs lrl lrx lrr)) x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr) ▸ node 3 (Ordnode.singleton lx_1) lrx (Ordnode.singleton x))\n                          (_ : lr = lr))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                          (fun h => (_ : nil = id lr) ▸ node 3 ll lx_1 (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr) ▸\n                              if lrs < ratio * lls then node (ls_1 + 1) ll lx_1 (node (lrs + 1) lr x nil)\n                              else\n                                node (ls_1 + 1) (node (lls + size lrl + 1) ll lx_1 lrl) lrx\n                                  (node (size lrr + 1) lrr x nil))\n                          (_ : id lr = id lr))\n                    (_ : id ll = id ll))\n              (_ : id (node ls nil lx (node lrs lrl lrx lrr)) = id (node ls nil lx (node lrs lrl lrx lrr))))\n        (fun rs l x_1 r h =>\n          (_ : node rs l x_1 r = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls nil lx (node lrs lrl lrx lrr)) = t → Ordnode α)\n              (id (node ls nil lx (node lrs lrl lrx lrr)))\n              (fun h => (_ : nil = id (node ls nil lx (node lrs lrl lrx lrr))) ▸ node (rs + 1) nil x nil)\n              (fun ls_1 ll lx_1 lr h =>\n                (_ : node ls_1 ll lx_1 lr = id (node ls nil lx (node lrs lrl lrx lrr))) ▸\n                  if ls_1 > delta * rs then\n                    Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                      (fun h => (_ : nil = id ll) ▸ nil)\n                      (fun lls l x_2 r h =>\n                        (_ : node lls l x_2 r = id ll) ▸\n                          Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                            (fun h => (_ : nil = id lr) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr) ▸\n                                if lrs < ratio * lls then node (ls_1 + rs + 1) ll lx_1 (node (rs + lrs + 1) lr x nil)\n                                else\n                                  node (ls_1 + rs + 1) (node (lls + size lrl + 1) ll lx_1 lrl) lrx\n                                    (node (size lrr + rs + 1) lrr x nil))\n                            (_ : id lr = id lr))\n                      (_ : id ll = id ll)\n                  else node (ls_1 + rs + 1) (node ls nil lx (node lrs lrl lrx lrr)) x nil)\n              (_ : id (node ls nil lx (node lrs lrl lrx lrr)) = id (node ls nil lx (node lrs lrl lrx lrr))))\n        (_ : id nil = id nil)) =\n    Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n      (fun h =>\n        (_ : nil = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls nil lx (node lrs lrl lrx lrr))) = t → Ordnode α)\n            (id (dual (node ls nil lx (node lrs lrl lrx lrr))))\n            (fun h => (_ : nil = id (dual (node ls nil lx (node lrs lrl lrx lrr)))) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls nil lx (node lrs lrl lrx lrr)))) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h => (_ : nil = rl) ▸ node 2 nil x (dual (node ls nil lx (node lrs lrl lrx lrr))))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ : id (dual (node ls nil lx (node lrs lrl lrx lrr))) = id (dual (node ls nil lx (node lrs lrl lrx lrr)))))\n      (fun ls_1 l x_1 r h =>\n        (_ : node ls_1 l x_1 r = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls nil lx (node lrs lrl lrx lrr))) = t → Ordnode α)\n            (id (dual (node ls nil lx (node lrs lrl lrx lrr))))\n            (fun h => (_ : nil = id (dual (node ls nil lx (node lrs lrl lrx lrr)))) ▸ node (ls_1 + 1) (dual nil) x nil)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls nil lx (node lrs lrl lrx lrr)))) ▸\n                if rs > delta * ls_1 then\n                  Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr) (fun h => (_ : nil = id rr) ▸ nil)\n                    (fun rrs l x_2 r h =>\n                      (_ : node rrs l x_2 r = id rr) ▸\n                        Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                          (fun h => (_ : nil = id rl) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl) ▸\n                              if rls < ratio * rrs then\n                                node (ls_1 + rs + 1) (node (ls_1 + rls + 1) (dual nil) x rl) rx rr\n                              else\n                                node (ls_1 + rs + 1) (node (ls_1 + size rll + 1) (dual nil) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx rr))\n                          (_ : id rl = id rl))\n                    (_ : id rr = id rr)\n                else node (ls_1 + rs + 1) (dual nil) x (dual (node ls nil lx (node lrs lrl lrx lrr))))\n            (_ : id (dual (node ls nil lx (node lrs lrl lrx lrr))) = id (dual (node ls nil lx (node lrs lrl lrx lrr)))))\n      (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\ndsimp only [dual, id]\n[GOAL]\ncase nil.node.node.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n        (fun h =>\n          (_ : nil = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls (node lls lll llx llr) lx nil) = t → Ordnode α)\n              (id (node ls (node lls lll llx llr) lx nil))\n              (fun h => (_ : nil = id (node ls (node lls lll llx llr) lx nil)) ▸ Ordnode.singleton x)\n              (fun ls_1 ll lx_1 lr h =>\n                (_ : node ls_1 ll lx_1 lr = id (node ls (node lls lll llx llr) lx nil)) ▸\n                  Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                    (fun h =>\n                      (_ : nil = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => lr = t → Ordnode α) lr\n                          (fun h => (_ : nil = lr) ▸ node 2 (node ls (node lls lll llx llr) lx nil) x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr) ▸ node 3 (Ordnode.singleton lx_1) lrx (Ordnode.singleton x))\n                          (_ : lr = lr))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                          (fun h => (_ : nil = id lr) ▸ node 3 ll lx_1 (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr) ▸\n                              if lrs < ratio * lls then node (ls_1 + 1) ll lx_1 (node (lrs + 1) lr x nil)\n                              else\n                                node (ls_1 + 1) (node (lls + size lrl + 1) ll lx_1 lrl) lrx\n                                  (node (size lrr + 1) lrr x nil))\n                          (_ : id lr = id lr))\n                    (_ : id ll = id ll))\n              (_ : id (node ls (node lls lll llx llr) lx nil) = id (node ls (node lls lll llx llr) lx nil)))\n        (fun rs l x_1 r h =>\n          (_ : node rs l x_1 r = id nil) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls (node lls lll llx llr) lx nil) = t → Ordnode α)\n              (id (node ls (node lls lll llx llr) lx nil))\n              (fun h => (_ : nil = id (node ls (node lls lll llx llr) lx nil)) ▸ node (rs + 1) nil x nil)\n              (fun ls_1 ll lx_1 lr h =>\n                (_ : node ls_1 ll lx_1 lr = id (node ls (node lls lll llx llr) lx nil)) ▸\n                  if ls_1 > delta * rs then\n                    Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                      (fun h => (_ : nil = id ll) ▸ nil)\n                      (fun lls l x_2 r h =>\n                        (_ : node lls l x_2 r = id ll) ▸\n                          Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                            (fun h => (_ : nil = id lr) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr) ▸\n                                if lrs < ratio * lls then node (ls_1 + rs + 1) ll lx_1 (node (rs + lrs + 1) lr x nil)\n                                else\n                                  node (ls_1 + rs + 1) (node (lls + size lrl + 1) ll lx_1 lrl) lrx\n                                    (node (size lrr + rs + 1) lrr x nil))\n                            (_ : id lr = id lr))\n                      (_ : id ll = id ll)\n                  else node (ls_1 + rs + 1) (node ls (node lls lll llx llr) lx nil) x nil)\n              (_ : id (node ls (node lls lll llx llr) lx nil) = id (node ls (node lls lll llx llr) lx nil)))\n        (_ : id nil = id nil)) =\n    Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n      (fun h =>\n        (_ : nil = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls (node lls lll llx llr) lx nil)) = t → Ordnode α)\n            (id (dual (node ls (node lls lll llx llr) lx nil)))\n            (fun h => (_ : nil = id (dual (node ls (node lls lll llx llr) lx nil))) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls (node lls lll llx llr) lx nil))) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h => (_ : nil = rl) ▸ node 2 nil x (dual (node ls (node lls lll llx llr) lx nil)))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ : id (dual (node ls (node lls lll llx llr) lx nil)) = id (dual (node ls (node lls lll llx llr) lx nil))))\n      (fun ls_1 l x_1 r h =>\n        (_ : node ls_1 l x_1 r = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls (node lls lll llx llr) lx nil)) = t → Ordnode α)\n            (id (dual (node ls (node lls lll llx llr) lx nil)))\n            (fun h => (_ : nil = id (dual (node ls (node lls lll llx llr) lx nil))) ▸ node (ls_1 + 1) (dual nil) x nil)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls (node lls lll llx llr) lx nil))) ▸\n                if rs > delta * ls_1 then\n                  Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr) (fun h => (_ : nil = id rr) ▸ nil)\n                    (fun rrs l x_2 r h =>\n                      (_ : node rrs l x_2 r = id rr) ▸\n                        Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                          (fun h => (_ : nil = id rl) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl) ▸\n                              if rls < ratio * rrs then\n                                node (ls_1 + rs + 1) (node (ls_1 + rls + 1) (dual nil) x rl) rx rr\n                              else\n                                node (ls_1 + rs + 1) (node (ls_1 + size rll + 1) (dual nil) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx rr))\n                          (_ : id rl = id rl))\n                    (_ : id rr = id rr)\n                else node (ls_1 + rs + 1) (dual nil) x (dual (node ls (node lls lll llx llr) lx nil)))\n            (_ : id (dual (node ls (node lls lll llx llr) lx nil)) = id (dual (node ls (node lls lll llx llr) lx nil))))\n      (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\ndsimp only [dual, id]\n[GOAL]\ncase nil.node.node.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n        (fun h =>\n          (_ : nil = id nil) ▸\n            Ordnode.casesOn (motive := fun t =>\n              id (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)) = t → Ordnode α)\n              (id (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)))\n              (fun h => (_ : nil = id (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))) ▸ Ordnode.singleton x)\n              (fun ls_1 ll lx_1 lr h =>\n                (_ : node ls_1 ll lx_1 lr = id (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))) ▸\n                  Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                    (fun h =>\n                      (_ : nil = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => lr = t → Ordnode α) lr\n                          (fun h =>\n                            (_ : nil = lr) ▸ node 2 (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr) ▸ node 3 (Ordnode.singleton lx_1) lrx (Ordnode.singleton x))\n                          (_ : lr = lr))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                          (fun h => (_ : nil = id lr) ▸ node 3 ll lx_1 (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr) ▸\n                              if lrs < ratio * lls then node (ls_1 + 1) ll lx_1 (node (lrs + 1) lr x nil)\n                              else\n                                node (ls_1 + 1) (node (lls + size lrl + 1) ll lx_1 lrl) lrx\n                                  (node (size lrr + 1) lrr x nil))\n                          (_ : id lr = id lr))\n                    (_ : id ll = id ll))\n              (_ :\n                id (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)) =\n                  id (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))))\n        (fun rs l x_1 r h =>\n          (_ : node rs l x_1 r = id nil) ▸\n            Ordnode.casesOn (motive := fun t =>\n              id (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)) = t → Ordnode α)\n              (id (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)))\n              (fun h =>\n                (_ : nil = id (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))) ▸ node (rs + 1) nil x nil)\n              (fun ls_1 ll lx_1 lr h =>\n                (_ : node ls_1 ll lx_1 lr = id (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))) ▸\n                  if ls_1 > delta * rs then\n                    Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                      (fun h => (_ : nil = id ll) ▸ nil)\n                      (fun lls l x_2 r h =>\n                        (_ : node lls l x_2 r = id ll) ▸\n                          Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                            (fun h => (_ : nil = id lr) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr) ▸\n                                if lrs < ratio * lls then node (ls_1 + rs + 1) ll lx_1 (node (rs + lrs + 1) lr x nil)\n                                else\n                                  node (ls_1 + rs + 1) (node (lls + size lrl + 1) ll lx_1 lrl) lrx\n                                    (node (size lrr + rs + 1) lrr x nil))\n                            (_ : id lr = id lr))\n                      (_ : id ll = id ll)\n                  else node (ls_1 + rs + 1) (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x nil)\n              (_ :\n                id (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)) =\n                  id (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))))\n        (_ : id nil = id nil)) =\n    Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n      (fun h =>\n        (_ : nil = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t =>\n            id (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))) = t → Ordnode α)\n            (id (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))))\n            (fun h =>\n              (_ : nil = id (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)))) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)))) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h =>\n                          (_ : nil = rl) ▸\n                            node 2 nil x (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ :\n              id (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))) =\n                id (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)))))\n      (fun ls_1 l x_1 r h =>\n        (_ : node ls_1 l x_1 r = id (dual nil)) ▸\n          Ordnode.casesOn (motive := fun t =>\n            id (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))) = t → Ordnode α)\n            (id (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))))\n            (fun h =>\n              (_ : nil = id (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)))) ▸\n                node (ls_1 + 1) (dual nil) x nil)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)))) ▸\n                if rs > delta * ls_1 then\n                  Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr) (fun h => (_ : nil = id rr) ▸ nil)\n                    (fun rrs l x_2 r h =>\n                      (_ : node rrs l x_2 r = id rr) ▸\n                        Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                          (fun h => (_ : nil = id rl) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl) ▸\n                              if rls < ratio * rrs then\n                                node (ls_1 + rs + 1) (node (ls_1 + rls + 1) (dual nil) x rl) rx rr\n                              else\n                                node (ls_1 + rs + 1) (node (ls_1 + size rll + 1) (dual nil) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx rr))\n                          (_ : id rl = id rl))\n                    (_ : id rr = id rr)\n                else\n                  node (ls_1 + rs + 1) (dual nil) x (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))))\n            (_ :\n              id (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))) =\n                id (dual (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)))))\n      (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\ndsimp only [dual, id]\n[GOAL]\ncase nil.node.nil.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ node 3 (node 1 nil x nil) lrx (node 1 nil lx nil) = node 3 (Ordnode.singleton x) lrx (Ordnode.singleton lx)\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase nil.node.nil.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ node 3 (node 1 nil x nil) lrx (node 1 nil lx nil) = node 3 (Ordnode.singleton x) lrx (Ordnode.singleton lx)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase nil.node.node.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\n⊢ node 3 (node 1 nil x nil) lx (node lls (dual llr) llx (dual lll)) =\n    node 3 (Ordnode.singleton x) lx (node lls (dual llr) llx (dual lll))\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase nil.node.node.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\n⊢ node 3 (node 1 nil x nil) lx (node lls (dual llr) llx (dual lll)) =\n    node 3 (Ordnode.singleton x) lx (node lls (dual llr) llx (dual lll))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase nil.node.node.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ dual\n      (if lrs < ratio * lls then node (ls + 1) (node lls lll llx llr) lx (node (lrs + 1) (node lrs lrl lrx lrr) x nil)\n      else\n        node (ls + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx (node (size lrr + 1) lrr x nil)) =\n    if lrs < ratio * lls then\n      node (ls + 1) (node (lrs + 1) nil x (node lrs (dual lrr) lrx (dual lrl))) lx (node lls (dual llr) llx (dual lll))\n    else\n      node (ls + 1) (node (size (dual lrr) + 1) nil x (dual lrr)) lrx\n        (node (size (dual lrl) + lls + 1) (dual lrl) lx (node lls (dual llr) llx (dual lll)))\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase nil.node.node.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ dual\n      (if lrs < ratio * lls then node (ls + 1) (node lls lll llx llr) lx (node (lrs + 1) (node lrs lrl lrx lrr) x nil)\n      else\n        node (ls + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx (node (size lrr + 1) lrr x nil)) =\n    if lrs < ratio * lls then\n      node (ls + 1) (node (lrs + 1) nil x (node lrs (dual lrr) lrx (dual lrl))) lx (node lls (dual llr) llx (dual lll))\n    else\n      node (ls + 1) (node (size (dual lrr) + 1) nil x (dual lrr)) lrx\n        (node (size (dual lrl) + lls + 1) (dual lrl) lx (node lls (dual llr) llx (dual lll)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase nil.node.node.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ dual\n      (if lrs < ratio * lls then node (ls + 1) (node lls lll llx llr) lx (node (lrs + 1) (node lrs lrl lrx lrr) x nil)\n      else\n        node (ls + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx (node (size lrr + 1) lrr x nil)) =\n    if lrs < ratio * lls then\n      node (ls + 1) (node (lrs + 1) nil x (node lrs (dual lrr) lrx (dual lrl))) lx (node lls (dual llr) llx (dual lll))\n    else\n      node (ls + 1) (node (size (dual lrr) + 1) nil x (dual lrr)) lrx\n        (node (size (dual lrl) + lls + 1) (dual lrl) lx (node lls (dual llr) llx (dual lll)))\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nh : lrs < ratio * lls\n⊢ dual (node (ls + 1) (node lls lll llx llr) lx (node (lrs + 1) (node lrs lrl lrx lrr) x nil)) =\n    node (ls + 1) (node (lrs + 1) nil x (node lrs (dual lrr) lrx (dual lrl))) lx (node lls (dual llr) llx (dual lll))\n[PROOFSTEP]\nrepeat simp [h, add_comm]\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nh : lrs < ratio * lls\n⊢ dual (node (ls + 1) (node lls lll llx llr) lx (node (lrs + 1) (node lrs lrl lrx lrr) x nil)) =\n    node (ls + 1) (node (lrs + 1) nil x (node lrs (dual lrr) lrx (dual lrl))) lx (node lls (dual llr) llx (dual lll))\n[PROOFSTEP]\nsimp [h, add_comm]\n[GOAL]\n\n[PROOFSTEP]\nsimp [h, add_comm]\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nh : ¬lrs < ratio * lls\n⊢ dual (node (ls + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx (node (size lrr + 1) lrr x nil)) =\n    node (ls + 1) (node (size (dual lrr) + 1) nil x (dual lrr)) lrx\n      (node (size (dual lrl) + lls + 1) (dual lrl) lx (node lls (dual llr) llx (dual lll)))\n[PROOFSTEP]\nrepeat simp [h, add_comm]\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nh : ¬lrs < ratio * lls\n⊢ dual (node (ls + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx (node (size lrr + 1) lrr x nil)) =\n    node (ls + 1) (node (size (dual lrr) + 1) nil x (dual lrr)) lrx\n      (node (size (dual lrl) + lls + 1) (dual lrl) lx (node lls (dual llr) llx (dual lll)))\n[PROOFSTEP]\nsimp [h, add_comm]\n[GOAL]\n\n[PROOFSTEP]\nsimp [h, add_comm]\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id (node rs rl rx rr) = t → Ordnode α) (id (node rs rl rx rr))\n        (fun h =>\n          (_ : nil = id (node rs rl rx rr)) ▸\n            Ordnode.casesOn (motive := fun t => id l = t → Ordnode α) (id l)\n              (fun h => (_ : nil = id l) ▸ Ordnode.singleton x)\n              (fun ls ll lx lr h =>\n                (_ : node ls ll lx lr = id l) ▸\n                  Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                    (fun h =>\n                      (_ : nil = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => lr = t → Ordnode α) lr\n                          (fun h => (_ : nil = lr) ▸ node 2 l x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr) ▸ node 3 (Ordnode.singleton lx) lrx (Ordnode.singleton x))\n                          (_ : lr = lr))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                          (fun h => (_ : nil = id lr) ▸ node 3 ll lx (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr) ▸\n                              if lrs < ratio * lls then node (ls + 1) ll lx (node (lrs + 1) lr x nil)\n                              else\n                                node (ls + 1) (node (lls + size lrl + 1) ll lx lrl) lrx (node (size lrr + 1) lrr x nil))\n                          (_ : id lr = id lr))\n                    (_ : id ll = id ll))\n              (_ : id l = id l))\n        (fun rs_1 l_1 x_1 r h =>\n          (_ : node rs_1 l_1 x_1 r = id (node rs rl rx rr)) ▸\n            Ordnode.casesOn (motive := fun t => id l = t → Ordnode α) (id l)\n              (fun h => (_ : nil = id l) ▸ node (rs_1 + 1) nil x (node rs rl rx rr))\n              (fun ls ll lx lr h =>\n                (_ : node ls ll lx lr = id l) ▸\n                  if ls > delta * rs_1 then\n                    Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                      (fun h => (_ : nil = id ll) ▸ nil)\n                      (fun lls l x_2 r h =>\n                        (_ : node lls l x_2 r = id ll) ▸\n                          Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                            (fun h => (_ : nil = id lr) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr) ▸\n                                if lrs < ratio * lls then\n                                  node (ls + rs_1 + 1) ll lx (node (rs_1 + lrs + 1) lr x (node rs rl rx rr))\n                                else\n                                  node (ls + rs_1 + 1) (node (lls + size lrl + 1) ll lx lrl) lrx\n                                    (node (size lrr + rs_1 + 1) lrr x (node rs rl rx rr)))\n                            (_ : id lr = id lr))\n                      (_ : id ll = id ll)\n                  else node (ls + rs_1 + 1) l x (node rs rl rx rr))\n              (_ : id l = id l))\n        (_ : id (node rs rl rx rr) = id (node rs rl rx rr))) =\n    Ordnode.casesOn (motive := fun t => id (dual (node rs rl rx rr)) = t → Ordnode α) (id (dual (node rs rl rx rr)))\n      (fun h =>\n        (_ : nil = id (dual (node rs rl rx rr))) ▸\n          Ordnode.casesOn (motive := fun t => id (dual l) = t → Ordnode α) (id (dual l))\n            (fun h => (_ : nil = id (dual l)) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual l)) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h => (_ : nil = rl) ▸ node 2 nil x (dual l))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ : id (dual l) = id (dual l)))\n      (fun ls l_1 x_1 r h =>\n        (_ : node ls l_1 x_1 r = id (dual (node rs rl rx rr))) ▸\n          Ordnode.casesOn (motive := fun t => id (dual l) = t → Ordnode α) (id (dual l))\n            (fun h => (_ : nil = id (dual l)) ▸ node (ls + 1) (dual (node rs rl rx rr)) x nil)\n            (fun rs_1 rl_1 rx_1 rr_1 h =>\n              (_ : node rs_1 rl_1 rx_1 rr_1 = id (dual l)) ▸\n                if rs_1 > delta * ls then\n                  Ordnode.casesOn (motive := fun t => id rr_1 = t → Ordnode α) (id rr_1)\n                    (fun h => (_ : nil = id rr_1) ▸ nil)\n                    (fun rrs l x_2 r h =>\n                      (_ : node rrs l x_2 r = id rr_1) ▸\n                        Ordnode.casesOn (motive := fun t => id rl_1 = t → Ordnode α) (id rl_1)\n                          (fun h => (_ : nil = id rl_1) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl_1) ▸\n                              if rls < ratio * rrs then\n                                node (ls + rs_1 + 1) (node (ls + rls + 1) (dual (node rs rl rx rr)) x rl_1) rx_1 rr_1\n                              else\n                                node (ls + rs_1 + 1) (node (ls + size rll + 1) (dual (node rs rl rx rr)) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx_1 rr_1))\n                          (_ : id rl_1 = id rl_1))\n                    (_ : id rr_1 = id rr_1)\n                else node (ls + rs_1 + 1) (dual (node rs rl rx rr)) x (dual l))\n            (_ : id (dual l) = id (dual l)))\n      (_ : id (dual (node rs rl rx rr)) = id (dual (node rs rl rx rr)))\n[PROOFSTEP]\ncases' l with ls ll lx lr\n[GOAL]\ncase node.nil\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id (node rs rl rx rr) = t → Ordnode α) (id (node rs rl rx rr))\n        (fun h =>\n          (_ : nil = id (node rs rl rx rr)) ▸\n            Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n              (fun h => (_ : nil = id nil) ▸ Ordnode.singleton x)\n              (fun ls ll lx lr h =>\n                (_ : node ls ll lx lr = id nil) ▸\n                  Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                    (fun h =>\n                      (_ : nil = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => lr = t → Ordnode α) lr\n                          (fun h => (_ : nil = lr) ▸ node 2 nil x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr) ▸ node 3 (Ordnode.singleton lx) lrx (Ordnode.singleton x))\n                          (_ : lr = lr))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll) ▸\n                        Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                          (fun h => (_ : nil = id lr) ▸ node 3 ll lx (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr) ▸\n                              if lrs < ratio * lls then node (ls + 1) ll lx (node (lrs + 1) lr x nil)\n                              else\n                                node (ls + 1) (node (lls + size lrl + 1) ll lx lrl) lrx (node (size lrr + 1) lrr x nil))\n                          (_ : id lr = id lr))\n                    (_ : id ll = id ll))\n              (_ : id nil = id nil))\n        (fun rs_1 l x_1 r h =>\n          (_ : node rs_1 l x_1 r = id (node rs rl rx rr)) ▸\n            Ordnode.casesOn (motive := fun t => id nil = t → Ordnode α) (id nil)\n              (fun h => (_ : nil = id nil) ▸ node (rs_1 + 1) nil x (node rs rl rx rr))\n              (fun ls ll lx lr h =>\n                (_ : node ls ll lx lr = id nil) ▸\n                  if ls > delta * rs_1 then\n                    Ordnode.casesOn (motive := fun t => id ll = t → Ordnode α) (id ll)\n                      (fun h => (_ : nil = id ll) ▸ nil)\n                      (fun lls l x_2 r h =>\n                        (_ : node lls l x_2 r = id ll) ▸\n                          Ordnode.casesOn (motive := fun t => id lr = t → Ordnode α) (id lr)\n                            (fun h => (_ : nil = id lr) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr) ▸\n                                if lrs < ratio * lls then\n                                  node (ls + rs_1 + 1) ll lx (node (rs_1 + lrs + 1) lr x (node rs rl rx rr))\n                                else\n                                  node (ls + rs_1 + 1) (node (lls + size lrl + 1) ll lx lrl) lrx\n                                    (node (size lrr + rs_1 + 1) lrr x (node rs rl rx rr)))\n                            (_ : id lr = id lr))\n                      (_ : id ll = id ll)\n                  else node (ls + rs_1 + 1) nil x (node rs rl rx rr))\n              (_ : id nil = id nil))\n        (_ : id (node rs rl rx rr) = id (node rs rl rx rr))) =\n    Ordnode.casesOn (motive := fun t => id (dual (node rs rl rx rr)) = t → Ordnode α) (id (dual (node rs rl rx rr)))\n      (fun h =>\n        (_ : nil = id (dual (node rs rl rx rr))) ▸\n          Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n            (fun h => (_ : nil = id (dual nil)) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual nil)) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h => (_ : nil = rl) ▸ node 2 nil x (dual nil))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ : id (dual nil) = id (dual nil)))\n      (fun ls l x_1 r h =>\n        (_ : node ls l x_1 r = id (dual (node rs rl rx rr))) ▸\n          Ordnode.casesOn (motive := fun t => id (dual nil) = t → Ordnode α) (id (dual nil))\n            (fun h => (_ : nil = id (dual nil)) ▸ node (ls + 1) (dual (node rs rl rx rr)) x nil)\n            (fun rs_1 rl_1 rx_1 rr_1 h =>\n              (_ : node rs_1 rl_1 rx_1 rr_1 = id (dual nil)) ▸\n                if rs_1 > delta * ls then\n                  Ordnode.casesOn (motive := fun t => id rr_1 = t → Ordnode α) (id rr_1)\n                    (fun h => (_ : nil = id rr_1) ▸ nil)\n                    (fun rrs l x_2 r h =>\n                      (_ : node rrs l x_2 r = id rr_1) ▸\n                        Ordnode.casesOn (motive := fun t => id rl_1 = t → Ordnode α) (id rl_1)\n                          (fun h => (_ : nil = id rl_1) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl_1) ▸\n                              if rls < ratio * rrs then\n                                node (ls + rs_1 + 1) (node (ls + rls + 1) (dual (node rs rl rx rr)) x rl_1) rx_1 rr_1\n                              else\n                                node (ls + rs_1 + 1) (node (ls + size rll + 1) (dual (node rs rl rx rr)) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx_1 rr_1))\n                          (_ : id rl_1 = id rl_1))\n                    (_ : id rr_1 = id rr_1)\n                else node (ls + rs_1 + 1) (dual (node rs rl rx rr)) x (dual nil))\n            (_ : id (dual nil) = id (dual nil)))\n      (_ : id (dual (node rs rl rx rr)) = id (dual (node rs rl rx rr)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase node.node\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\n⊢ dual\n      (Ordnode.casesOn (motive := fun t => id (node rs rl rx rr) = t → Ordnode α) (id (node rs rl rx rr))\n        (fun h =>\n          (_ : nil = id (node rs rl rx rr)) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls ll lx lr) = t → Ordnode α) (id (node ls ll lx lr))\n              (fun h => (_ : nil = id (node ls ll lx lr)) ▸ Ordnode.singleton x)\n              (fun ls_1 ll_1 lx_1 lr_1 h =>\n                (_ : node ls_1 ll_1 lx_1 lr_1 = id (node ls ll lx lr)) ▸\n                  Ordnode.casesOn (motive := fun t => id ll_1 = t → Ordnode α) (id ll_1)\n                    (fun h =>\n                      (_ : nil = id ll_1) ▸\n                        Ordnode.casesOn (motive := fun t => lr_1 = t → Ordnode α) lr_1\n                          (fun h => (_ : nil = lr_1) ▸ node 2 (node ls ll lx lr) x nil)\n                          (fun size l lrx r h =>\n                            (_ : node size l lrx r = lr_1) ▸ node 3 (Ordnode.singleton lx_1) lrx (Ordnode.singleton x))\n                          (_ : lr_1 = lr_1))\n                    (fun lls l x_1 r h =>\n                      (_ : node lls l x_1 r = id ll_1) ▸\n                        Ordnode.casesOn (motive := fun t => id lr_1 = t → Ordnode α) (id lr_1)\n                          (fun h => (_ : nil = id lr_1) ▸ node 3 ll_1 lx_1 (Ordnode.singleton x))\n                          (fun lrs lrl lrx lrr h =>\n                            (_ : node lrs lrl lrx lrr = id lr_1) ▸\n                              if lrs < ratio * lls then node (ls_1 + 1) ll_1 lx_1 (node (lrs + 1) lr_1 x nil)\n                              else\n                                node (ls_1 + 1) (node (lls + size lrl + 1) ll_1 lx_1 lrl) lrx\n                                  (node (size lrr + 1) lrr x nil))\n                          (_ : id lr_1 = id lr_1))\n                    (_ : id ll_1 = id ll_1))\n              (_ : id (node ls ll lx lr) = id (node ls ll lx lr)))\n        (fun rs_1 l x_1 r h =>\n          (_ : node rs_1 l x_1 r = id (node rs rl rx rr)) ▸\n            Ordnode.casesOn (motive := fun t => id (node ls ll lx lr) = t → Ordnode α) (id (node ls ll lx lr))\n              (fun h => (_ : nil = id (node ls ll lx lr)) ▸ node (rs_1 + 1) nil x (node rs rl rx rr))\n              (fun ls_1 ll_1 lx_1 lr_1 h =>\n                (_ : node ls_1 ll_1 lx_1 lr_1 = id (node ls ll lx lr)) ▸\n                  if ls_1 > delta * rs_1 then\n                    Ordnode.casesOn (motive := fun t => id ll_1 = t → Ordnode α) (id ll_1)\n                      (fun h => (_ : nil = id ll_1) ▸ nil)\n                      (fun lls l x_2 r h =>\n                        (_ : node lls l x_2 r = id ll_1) ▸\n                          Ordnode.casesOn (motive := fun t => id lr_1 = t → Ordnode α) (id lr_1)\n                            (fun h => (_ : nil = id lr_1) ▸ nil)\n                            (fun lrs lrl lrx lrr h =>\n                              (_ : node lrs lrl lrx lrr = id lr_1) ▸\n                                if lrs < ratio * lls then\n                                  node (ls_1 + rs_1 + 1) ll_1 lx_1 (node (rs_1 + lrs + 1) lr_1 x (node rs rl rx rr))\n                                else\n                                  node (ls_1 + rs_1 + 1) (node (lls + size lrl + 1) ll_1 lx_1 lrl) lrx\n                                    (node (size lrr + rs_1 + 1) lrr x (node rs rl rx rr)))\n                            (_ : id lr_1 = id lr_1))\n                      (_ : id ll_1 = id ll_1)\n                  else node (ls_1 + rs_1 + 1) (node ls ll lx lr) x (node rs rl rx rr))\n              (_ : id (node ls ll lx lr) = id (node ls ll lx lr)))\n        (_ : id (node rs rl rx rr) = id (node rs rl rx rr))) =\n    Ordnode.casesOn (motive := fun t => id (dual (node rs rl rx rr)) = t → Ordnode α) (id (dual (node rs rl rx rr)))\n      (fun h =>\n        (_ : nil = id (dual (node rs rl rx rr))) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls ll lx lr)) = t → Ordnode α)\n            (id (dual (node ls ll lx lr))) (fun h => (_ : nil = id (dual (node ls ll lx lr))) ▸ Ordnode.singleton x)\n            (fun rs rl rx rr h =>\n              (_ : node rs rl rx rr = id (dual (node ls ll lx lr))) ▸\n                Ordnode.casesOn (motive := fun t => id rr = t → Ordnode α) (id rr)\n                  (fun h =>\n                    (_ : nil = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => rl = t → Ordnode α) rl\n                        (fun h => (_ : nil = rl) ▸ node 2 nil x (dual (node ls ll lx lr)))\n                        (fun size l rlx r h =>\n                          (_ : node size l rlx r = rl) ▸ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx))\n                        (_ : rl = rl))\n                  (fun rrs l x_1 r h =>\n                    (_ : node rrs l x_1 r = id rr) ▸\n                      Ordnode.casesOn (motive := fun t => id rl = t → Ordnode α) (id rl)\n                        (fun h => (_ : nil = id rl) ▸ node 3 (Ordnode.singleton x) rx rr)\n                        (fun rls rll rlx rlr h =>\n                          (_ : node rls rll rlx rlr = id rl) ▸\n                            if rls < ratio * rrs then node (rs + 1) (node (rls + 1) nil x rl) rx rr\n                            else\n                              node (rs + 1) (node (size rll + 1) nil x rll) rlx (node (size rlr + rrs + 1) rlr rx rr))\n                        (_ : id rl = id rl))\n                  (_ : id rr = id rr))\n            (_ : id (dual (node ls ll lx lr)) = id (dual (node ls ll lx lr))))\n      (fun ls_1 l x_1 r h =>\n        (_ : node ls_1 l x_1 r = id (dual (node rs rl rx rr))) ▸\n          Ordnode.casesOn (motive := fun t => id (dual (node ls ll lx lr)) = t → Ordnode α)\n            (id (dual (node ls ll lx lr)))\n            (fun h => (_ : nil = id (dual (node ls ll lx lr))) ▸ node (ls_1 + 1) (dual (node rs rl rx rr)) x nil)\n            (fun rs_1 rl_1 rx_1 rr_1 h =>\n              (_ : node rs_1 rl_1 rx_1 rr_1 = id (dual (node ls ll lx lr))) ▸\n                if rs_1 > delta * ls_1 then\n                  Ordnode.casesOn (motive := fun t => id rr_1 = t → Ordnode α) (id rr_1)\n                    (fun h => (_ : nil = id rr_1) ▸ nil)\n                    (fun rrs l x_2 r h =>\n                      (_ : node rrs l x_2 r = id rr_1) ▸\n                        Ordnode.casesOn (motive := fun t => id rl_1 = t → Ordnode α) (id rl_1)\n                          (fun h => (_ : nil = id rl_1) ▸ nil)\n                          (fun rls rll rlx rlr h =>\n                            (_ : node rls rll rlx rlr = id rl_1) ▸\n                              if rls < ratio * rrs then\n                                node (ls_1 + rs_1 + 1) (node (ls_1 + rls + 1) (dual (node rs rl rx rr)) x rl_1) rx_1\n                                  rr_1\n                              else\n                                node (ls_1 + rs_1 + 1) (node (ls_1 + size rll + 1) (dual (node rs rl rx rr)) x rll) rlx\n                                  (node (size rlr + rrs + 1) rlr rx_1 rr_1))\n                          (_ : id rl_1 = id rl_1))\n                    (_ : id rr_1 = id rr_1)\n                else node (ls_1 + rs_1 + 1) (dual (node rs rl rx rr)) x (dual (node ls ll lx lr)))\n            (_ : id (dual (node ls ll lx lr)) = id (dual (node ls ll lx lr))))\n      (_ : id (dual (node rs rl rx rr)) = id (dual (node rs rl rx rr)))\n[PROOFSTEP]\ndsimp only [dual, id]\n[GOAL]\ncase node.node\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\n⊢ dual\n      (if ls > delta * rs then\n        rec (motive := fun t => ll = t → Ordnode α) (fun h => (_ : nil = id ll) ▸ nil)\n          (fun size l x_1 r l_ih r_ih h =>\n            (_ : node size l x_1 r = id ll) ▸\n              rec (motive := fun t => lr = t → Ordnode α) (fun h => (_ : nil = id lr) ▸ nil)\n                (fun size_1 l x_2 r l_ih r_ih h =>\n                  (_ : node size_1 l x_2 r = id lr) ▸\n                    if size_1 < ratio * size then\n                      node (ls + rs + 1) ll lx (node (rs + size_1 + 1) lr x (node rs rl rx rr))\n                    else\n                      node (ls + rs + 1) (node (size + Ordnode.size l + 1) ll lx l) x_2\n                        (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n                lr (_ : id lr = id lr))\n          ll (_ : id ll = id ll)\n      else node (ls + rs + 1) (node ls ll lx lr) x (node rs rl rx rr)) =\n    if ls > delta * rs then\n      rec (motive := fun t => dual ll = t → Ordnode α) (fun h => (_ : nil = id (dual ll)) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id (dual ll)) ▸\n            rec (motive := fun t => dual lr = t → Ordnode α) (fun h => (_ : nil = id (dual lr)) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id (dual lr)) ▸\n                  if size_1 < ratio * size then\n                    node (rs + ls + 1) (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual lr)) lx\n                      (dual ll)\n                  else\n                    node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                      (node (Ordnode.size r + size + 1) r lx (dual ll)))\n              (dual lr) (_ : id (dual lr) = id (dual lr)))\n        (dual ll) (_ : id (dual ll) = id (dual ll))\n    else node (rs + ls + 1) (node rs (dual rr) rx (dual rl)) x (node ls (dual lr) lx (dual ll))\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nh✝ : ls > delta * rs\n⊢ dual\n      (rec (motive := fun t => ll = t → Ordnode α) (fun h => (_ : nil = id ll) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id ll) ▸\n            rec (motive := fun t => lr = t → Ordnode α) (fun h => (_ : nil = id lr) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id lr) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) ll lx (node (rs + size_1 + 1) lr x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) ll lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              lr (_ : id lr = id lr))\n        ll (_ : id ll = id ll)) =\n    rec (motive := fun t => dual ll = t → Ordnode α) (fun h => (_ : nil = id (dual ll)) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual ll)) ▸\n          rec (motive := fun t => dual lr = t → Ordnode α) (fun h => (_ : nil = id (dual lr)) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual lr)) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1) (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual lr)) lx (dual ll)\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual ll)))\n            (dual lr) (_ : id (dual lr) = id (dual lr)))\n      (dual ll) (_ : id (dual ll) = id (dual ll))\ncase neg\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nh✝ : ¬ls > delta * rs\n⊢ dual (node (ls + rs + 1) (node ls ll lx lr) x (node rs rl rx rr)) =\n    node (rs + ls + 1) (node rs (dual rr) rx (dual rl)) x (node ls (dual lr) lx (dual ll))\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nh✝ : ¬ls > delta * rs\n⊢ dual (node (ls + rs + 1) (node ls ll lx lr) x (node rs rl rx rr)) =\n    node (rs + ls + 1) (node rs (dual rr) rx (dual rl)) x (node ls (dual lr) lx (dual ll))\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nh✝ : ls > delta * rs\n⊢ dual\n      (rec (motive := fun t => ll = t → Ordnode α) (fun h => (_ : nil = id ll) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id ll) ▸\n            rec (motive := fun t => lr = t → Ordnode α) (fun h => (_ : nil = id lr) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id lr) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) ll lx (node (rs + size_1 + 1) lr x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) ll lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              lr (_ : id lr = id lr))\n        ll (_ : id ll = id ll)) =\n    rec (motive := fun t => dual ll = t → Ordnode α) (fun h => (_ : nil = id (dual ll)) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual ll)) ▸\n          rec (motive := fun t => dual lr = t → Ordnode α) (fun h => (_ : nil = id (dual lr)) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual lr)) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1) (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual lr)) lx (dual ll)\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual ll)))\n            (dual lr) (_ : id (dual lr) = id (dual lr)))\n      (dual ll) (_ : id (dual ll) = id (dual ll))\n[PROOFSTEP]\ncases' ll with lls lll llx llr\n[GOAL]\ncase pos.nil\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nlr : Ordnode α\nh✝ : ls > delta * rs\n⊢ dual\n      (rec (motive := fun t => nil = t → Ordnode α) (fun h => (_ : nil = id nil) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id nil) ▸\n            rec (motive := fun t => lr = t → Ordnode α) (fun h => (_ : nil = id lr) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id lr) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) nil lx (node (rs + size_1 + 1) lr x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) nil lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              lr (_ : id lr = id lr))\n        nil (_ : id nil = id nil)) =\n    rec (motive := fun t => dual nil = t → Ordnode α) (fun h => (_ : nil = id (dual nil)) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual nil)) ▸\n          rec (motive := fun t => dual lr = t → Ordnode α) (fun h => (_ : nil = id (dual lr)) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual lr)) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1) (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual lr)) lx (dual nil)\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual nil)))\n            (dual lr) (_ : id (dual lr) = id (dual lr)))\n      (dual nil) (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\ncases' lr with lrs lrl lrx lrr\n[GOAL]\ncase pos.node\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nlr : Ordnode α\nh✝ : ls > delta * rs\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\n⊢ dual\n      (rec (motive := fun t => node lls lll llx llr = t → Ordnode α)\n        (fun h => (_ : nil = id (node lls lll llx llr)) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id (node lls lll llx llr)) ▸\n            rec (motive := fun t => lr = t → Ordnode α) (fun h => (_ : nil = id lr) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id lr) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) (node lls lll llx llr) lx (node (rs + size_1 + 1) lr x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) (node lls lll llx llr) lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              lr (_ : id lr = id lr))\n        (node lls lll llx llr) (_ : id (node lls lll llx llr) = id (node lls lll llx llr))) =\n    rec (motive := fun t => dual (node lls lll llx llr) = t → Ordnode α)\n      (fun h => (_ : nil = id (dual (node lls lll llx llr))) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual (node lls lll llx llr))) ▸\n          rec (motive := fun t => dual lr = t → Ordnode α) (fun h => (_ : nil = id (dual lr)) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual lr)) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1) (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual lr)) lx\n                    (dual (node lls lll llx llr))\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual (node lls lll llx llr))))\n            (dual lr) (_ : id (dual lr) = id (dual lr)))\n      (dual (node lls lll llx llr)) (_ : id (dual (node lls lll llx llr)) = id (dual (node lls lll llx llr)))\n[PROOFSTEP]\ncases' lr with lrs lrl lrx lrr\n[GOAL]\ncase pos.nil.nil\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nh✝ : ls > delta * rs\n⊢ dual\n      (rec (motive := fun t => nil = t → Ordnode α) (fun h => (_ : nil = id nil) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id nil) ▸\n            rec (motive := fun t => nil = t → Ordnode α) (fun h => (_ : nil = id nil) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id nil) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) nil lx (node (rs + size_1 + 1) nil x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) nil lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              nil (_ : id nil = id nil))\n        nil (_ : id nil = id nil)) =\n    rec (motive := fun t => dual nil = t → Ordnode α) (fun h => (_ : nil = id (dual nil)) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual nil)) ▸\n          rec (motive := fun t => dual nil = t → Ordnode α) (fun h => (_ : nil = id (dual nil)) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual nil)) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1) (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual nil)) lx\n                    (dual nil)\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual nil)))\n            (dual nil) (_ : id (dual nil) = id (dual nil)))\n      (dual nil) (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos.nil.nil\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nh✝ : ls > delta * rs\n⊢ dual\n      (rec (motive := fun t => nil = t → Ordnode α) (fun h => (_ : nil = id nil) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id nil) ▸\n            rec (motive := fun t => nil = t → Ordnode α) (fun h => (_ : nil = id nil) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id nil) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) nil lx (node (rs + size_1 + 1) nil x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) nil lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              nil (_ : id nil = id nil))\n        nil (_ : id nil = id nil)) =\n    rec (motive := fun t => dual nil = t → Ordnode α) (fun h => (_ : nil = id (dual nil)) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual nil)) ▸\n          rec (motive := fun t => dual nil = t → Ordnode α) (fun h => (_ : nil = id (dual nil)) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual nil)) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1) (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual nil)) lx\n                    (dual nil)\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual nil)))\n            (dual nil) (_ : id (dual nil) = id (dual nil)))\n      (dual nil) (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos.nil.node\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nh✝ : ls > delta * rs\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ dual\n      (rec (motive := fun t => nil = t → Ordnode α) (fun h => (_ : nil = id nil) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id nil) ▸\n            rec (motive := fun t => node lrs lrl lrx lrr = t → Ordnode α)\n              (fun h => (_ : nil = id (node lrs lrl lrx lrr)) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id (node lrs lrl lrx lrr)) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) nil lx (node (rs + size_1 + 1) (node lrs lrl lrx lrr) x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) nil lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              (node lrs lrl lrx lrr) (_ : id (node lrs lrl lrx lrr) = id (node lrs lrl lrx lrr)))\n        nil (_ : id nil = id nil)) =\n    rec (motive := fun t => dual nil = t → Ordnode α) (fun h => (_ : nil = id (dual nil)) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual nil)) ▸\n          rec (motive := fun t => dual (node lrs lrl lrx lrr) = t → Ordnode α)\n            (fun h => (_ : nil = id (dual (node lrs lrl lrx lrr))) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual (node lrs lrl lrx lrr))) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1)\n                    (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual (node lrs lrl lrx lrr))) lx\n                    (dual nil)\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual nil)))\n            (dual (node lrs lrl lrx lrr)) (_ : id (dual (node lrs lrl lrx lrr)) = id (dual (node lrs lrl lrx lrr))))\n      (dual nil) (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos.nil.node\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nh✝ : ls > delta * rs\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ dual\n      (rec (motive := fun t => nil = t → Ordnode α) (fun h => (_ : nil = id nil) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id nil) ▸\n            rec (motive := fun t => node lrs lrl lrx lrr = t → Ordnode α)\n              (fun h => (_ : nil = id (node lrs lrl lrx lrr)) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id (node lrs lrl lrx lrr)) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) nil lx (node (rs + size_1 + 1) (node lrs lrl lrx lrr) x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) nil lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              (node lrs lrl lrx lrr) (_ : id (node lrs lrl lrx lrr) = id (node lrs lrl lrx lrr)))\n        nil (_ : id nil = id nil)) =\n    rec (motive := fun t => dual nil = t → Ordnode α) (fun h => (_ : nil = id (dual nil)) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual nil)) ▸\n          rec (motive := fun t => dual (node lrs lrl lrx lrr) = t → Ordnode α)\n            (fun h => (_ : nil = id (dual (node lrs lrl lrx lrr))) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual (node lrs lrl lrx lrr))) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1)\n                    (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual (node lrs lrl lrx lrr))) lx\n                    (dual nil)\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual nil)))\n            (dual (node lrs lrl lrx lrr)) (_ : id (dual (node lrs lrl lrx lrr)) = id (dual (node lrs lrl lrx lrr))))\n      (dual nil) (_ : id (dual nil) = id (dual nil))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos.node.nil\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nh✝ : ls > delta * rs\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\n⊢ dual\n      (rec (motive := fun t => node lls lll llx llr = t → Ordnode α)\n        (fun h => (_ : nil = id (node lls lll llx llr)) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id (node lls lll llx llr)) ▸\n            rec (motive := fun t => nil = t → Ordnode α) (fun h => (_ : nil = id nil) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id nil) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) (node lls lll llx llr) lx (node (rs + size_1 + 1) nil x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) (node lls lll llx llr) lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              nil (_ : id nil = id nil))\n        (node lls lll llx llr) (_ : id (node lls lll llx llr) = id (node lls lll llx llr))) =\n    rec (motive := fun t => dual (node lls lll llx llr) = t → Ordnode α)\n      (fun h => (_ : nil = id (dual (node lls lll llx llr))) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual (node lls lll llx llr))) ▸\n          rec (motive := fun t => dual nil = t → Ordnode α) (fun h => (_ : nil = id (dual nil)) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual nil)) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1) (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual nil)) lx\n                    (dual (node lls lll llx llr))\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual (node lls lll llx llr))))\n            (dual nil) (_ : id (dual nil) = id (dual nil)))\n      (dual (node lls lll llx llr)) (_ : id (dual (node lls lll llx llr)) = id (dual (node lls lll llx llr)))\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos.node.nil\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nh✝ : ls > delta * rs\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\n⊢ dual\n      (rec (motive := fun t => node lls lll llx llr = t → Ordnode α)\n        (fun h => (_ : nil = id (node lls lll llx llr)) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id (node lls lll llx llr)) ▸\n            rec (motive := fun t => nil = t → Ordnode α) (fun h => (_ : nil = id nil) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id nil) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) (node lls lll llx llr) lx (node (rs + size_1 + 1) nil x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) (node lls lll llx llr) lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              nil (_ : id nil = id nil))\n        (node lls lll llx llr) (_ : id (node lls lll llx llr) = id (node lls lll llx llr))) =\n    rec (motive := fun t => dual (node lls lll llx llr) = t → Ordnode α)\n      (fun h => (_ : nil = id (dual (node lls lll llx llr))) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual (node lls lll llx llr))) ▸\n          rec (motive := fun t => dual nil = t → Ordnode α) (fun h => (_ : nil = id (dual nil)) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual nil)) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1) (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual nil)) lx\n                    (dual (node lls lll llx llr))\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual (node lls lll llx llr))))\n            (dual nil) (_ : id (dual nil) = id (dual nil)))\n      (dual (node lls lll llx llr)) (_ : id (dual (node lls lll llx llr)) = id (dual (node lls lll llx llr)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos.node.node\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nh✝ : ls > delta * rs\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ dual\n      (rec (motive := fun t => node lls lll llx llr = t → Ordnode α)\n        (fun h => (_ : nil = id (node lls lll llx llr)) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id (node lls lll llx llr)) ▸\n            rec (motive := fun t => node lrs lrl lrx lrr = t → Ordnode α)\n              (fun h => (_ : nil = id (node lrs lrl lrx lrr)) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id (node lrs lrl lrx lrr)) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) (node lls lll llx llr) lx\n                      (node (rs + size_1 + 1) (node lrs lrl lrx lrr) x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) (node lls lll llx llr) lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              (node lrs lrl lrx lrr) (_ : id (node lrs lrl lrx lrr) = id (node lrs lrl lrx lrr)))\n        (node lls lll llx llr) (_ : id (node lls lll llx llr) = id (node lls lll llx llr))) =\n    rec (motive := fun t => dual (node lls lll llx llr) = t → Ordnode α)\n      (fun h => (_ : nil = id (dual (node lls lll llx llr))) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual (node lls lll llx llr))) ▸\n          rec (motive := fun t => dual (node lrs lrl lrx lrr) = t → Ordnode α)\n            (fun h => (_ : nil = id (dual (node lrs lrl lrx lrr))) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual (node lrs lrl lrx lrr))) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1)\n                    (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual (node lrs lrl lrx lrr))) lx\n                    (dual (node lls lll llx llr))\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual (node lls lll llx llr))))\n            (dual (node lrs lrl lrx lrr)) (_ : id (dual (node lrs lrl lrx lrr)) = id (dual (node lrs lrl lrx lrr))))\n      (dual (node lls lll llx llr)) (_ : id (dual (node lls lll llx llr)) = id (dual (node lls lll llx llr)))\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos.node.node\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nh✝ : ls > delta * rs\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ dual\n      (rec (motive := fun t => node lls lll llx llr = t → Ordnode α)\n        (fun h => (_ : nil = id (node lls lll llx llr)) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id (node lls lll llx llr)) ▸\n            rec (motive := fun t => node lrs lrl lrx lrr = t → Ordnode α)\n              (fun h => (_ : nil = id (node lrs lrl lrx lrr)) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id (node lrs lrl lrx lrr)) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) (node lls lll llx llr) lx\n                      (node (rs + size_1 + 1) (node lrs lrl lrx lrr) x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) (node lls lll llx llr) lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              (node lrs lrl lrx lrr) (_ : id (node lrs lrl lrx lrr) = id (node lrs lrl lrx lrr)))\n        (node lls lll llx llr) (_ : id (node lls lll llx llr) = id (node lls lll llx llr))) =\n    rec (motive := fun t => dual (node lls lll llx llr) = t → Ordnode α)\n      (fun h => (_ : nil = id (dual (node lls lll llx llr))) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual (node lls lll llx llr))) ▸\n          rec (motive := fun t => dual (node lrs lrl lrx lrr) = t → Ordnode α)\n            (fun h => (_ : nil = id (dual (node lrs lrl lrx lrr))) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual (node lrs lrl lrx lrr))) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1)\n                    (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual (node lrs lrl lrx lrr))) lx\n                    (dual (node lls lll llx llr))\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual (node lls lll llx llr))))\n            (dual (node lrs lrl lrx lrr)) (_ : id (dual (node lrs lrl lrx lrr)) = id (dual (node lrs lrl lrx lrr))))\n      (dual (node lls lll llx llr)) (_ : id (dual (node lls lll llx llr)) = id (dual (node lls lll llx llr)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos.node.node\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nh✝ : ls > delta * rs\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ dual\n      (rec (motive := fun t => node lls lll llx llr = t → Ordnode α)\n        (fun h => (_ : nil = id (node lls lll llx llr)) ▸ nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          (_ : node size l x_1 r = id (node lls lll llx llr)) ▸\n            rec (motive := fun t => node lrs lrl lrx lrr = t → Ordnode α)\n              (fun h => (_ : nil = id (node lrs lrl lrx lrr)) ▸ nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                (_ : node size_1 l x_2 r = id (node lrs lrl lrx lrr)) ▸\n                  if size_1 < ratio * size then\n                    node (ls + rs + 1) (node lls lll llx llr) lx\n                      (node (rs + size_1 + 1) (node lrs lrl lrx lrr) x (node rs rl rx rr))\n                  else\n                    node (ls + rs + 1) (node (size + Ordnode.size l + 1) (node lls lll llx llr) lx l) x_2\n                      (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              (node lrs lrl lrx lrr) (_ : id (node lrs lrl lrx lrr) = id (node lrs lrl lrx lrr)))\n        (node lls lll llx llr) (_ : id (node lls lll llx llr) = id (node lls lll llx llr))) =\n    rec (motive := fun t => dual (node lls lll llx llr) = t → Ordnode α)\n      (fun h => (_ : nil = id (dual (node lls lll llx llr))) ▸ nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        (_ : node size l x_1 r = id (dual (node lls lll llx llr))) ▸\n          rec (motive := fun t => dual (node lrs lrl lrx lrr) = t → Ordnode α)\n            (fun h => (_ : nil = id (dual (node lrs lrl lrx lrr))) ▸ nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              (_ : node size_1 l x_2 r = id (dual (node lrs lrl lrx lrr))) ▸\n                if size_1 < ratio * size then\n                  node (rs + ls + 1)\n                    (node (rs + size_1 + 1) (node rs (dual rr) rx (dual rl)) x (dual (node lrs lrl lrx lrr))) lx\n                    (dual (node lls lll llx llr))\n                else\n                  node (rs + ls + 1) (node (rs + Ordnode.size l + 1) (node rs (dual rr) rx (dual rl)) x l) x_2\n                    (node (Ordnode.size r + size + 1) r lx (dual (node lls lll llx llr))))\n            (dual (node lrs lrl lrx lrr)) (_ : id (dual (node lrs lrl lrx lrr)) = id (dual (node lrs lrl lrx lrr))))\n      (dual (node lls lll llx llr)) (_ : id (dual (node lls lll llx llr)) = id (dual (node lls lll llx llr)))\n[PROOFSTEP]\ndsimp only [dual, id]\n[GOAL]\ncase pos.node.node\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nh✝ : ls > delta * rs\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\n⊢ dual\n      (if lrs < ratio * lls then\n        node (ls + rs + 1) (node lls lll llx llr) lx (node (rs + lrs + 1) (node lrs lrl lrx lrr) x (node rs rl rx rr))\n      else\n        node (ls + rs + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx\n          (node (size lrr + rs + 1) lrr x (node rs rl rx rr))) =\n    if lrs < ratio * lls then\n      node (rs + ls + 1) (node (rs + lrs + 1) (node rs (dual rr) rx (dual rl)) x (node lrs (dual lrr) lrx (dual lrl)))\n        lx (node lls (dual llr) llx (dual lll))\n    else\n      node (rs + ls + 1) (node (rs + size (dual lrr) + 1) (node rs (dual rr) rx (dual rl)) x (dual lrr)) lrx\n        (node (size (dual lrl) + lls + 1) (dual lrl) lx (node lls (dual llr) llx (dual lll)))\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nh✝ : ls > delta * rs\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nh : lrs < ratio * lls\n⊢ dual\n      (node (ls + rs + 1) (node lls lll llx llr) lx (node (rs + lrs + 1) (node lrs lrl lrx lrr) x (node rs rl rx rr))) =\n    node (rs + ls + 1) (node (rs + lrs + 1) (node rs (dual rr) rx (dual rl)) x (node lrs (dual lrr) lrx (dual lrl))) lx\n      (node lls (dual llr) llx (dual lll))\n[PROOFSTEP]\nsimp [h, add_comm]\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nls : ℕ\nlx : α\nh✝ : ls > delta * rs\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nh : ¬lrs < ratio * lls\n⊢ dual\n      (node (ls + rs + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx\n        (node (size lrr + rs + 1) lrr x (node rs rl rx rr))) =\n    node (rs + ls + 1) (node (rs + size (dual lrr) + 1) (node rs (dual rr) rx (dual rl)) x (dual lrr)) lrx\n      (node (size (dual lrl) + lls + 1) (dual lrl) lx (node lls (dual llr) llx (dual lll)))\n[PROOFSTEP]\nsimp [h, add_comm]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ dual (balanceR l x r) = balanceL (dual r) x (dual l)\n[PROOFSTEP]\nrw [← dual_dual (balanceL _ _ _), dual_balanceL, dual_dual, dual_dual]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\nhl : Sized l\nhm : Sized m\nhr : Sized r\n⊢ Sized (Ordnode.node4L l x m y r)\n[PROOFSTEP]\ncases m <;> [exact (hl.node' hm).node' hr; exact (hl.node' hm.2.1).node' (hm.2.2.node' hr)]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\nhl : Sized l\nhm : Sized m\nhr : Sized r\n⊢ Sized (Ordnode.node4L l x m y r)\n[PROOFSTEP]\ncases m\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\nhm : Sized nil\n⊢ Sized (Ordnode.node4L l x nil y r)\n[PROOFSTEP]\nexact (hl.node' hm).node' hr\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\n⊢ Sized (Ordnode.node4L l x (node size✝ l✝ x✝ r✝) y r)\n[PROOFSTEP]\nexact (hl.node' hm.2.1).node' (hm.2.2.node' hr)\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\n⊢ size (node3L l x m y r) = size l + size m + size r + 2\n[PROOFSTEP]\ndsimp [node3L, node', size]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\n⊢ (((match l with\n            | nil => 0\n            | node sz l x r => sz) +\n            match m with\n            | nil => 0\n            | node sz l x r => sz) +\n          1 +\n        match r with\n        | nil => 0\n        | node sz l x r => sz) +\n      1 =\n    (((match l with\n          | nil => 0\n          | node sz l x r => sz) +\n          match m with\n          | nil => 0\n          | node sz l x r => sz) +\n        match r with\n        | nil => 0\n        | node sz l x r => sz) +\n      2\n[PROOFSTEP]\nrw [add_right_comm _ 1]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\n⊢ size (node3R l x m y r) = size l + size m + size r + 2\n[PROOFSTEP]\ndsimp [node3R, node', size]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\n⊢ (match l with\n        | nil => 0\n        | node sz l x r => sz) +\n        (((match m with\n            | nil => 0\n            | node sz l x r => sz) +\n            match r with\n            | nil => 0\n            | node sz l x r => sz) +\n          1) +\n      1 =\n    (((match l with\n          | nil => 0\n          | node sz l x r => sz) +\n          match m with\n          | nil => 0\n          | node sz l x r => sz) +\n        match r with\n        | nil => 0\n        | node sz l x r => sz) +\n      2\n[PROOFSTEP]\nrw [← add_assoc, ← add_assoc]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\nhm : Sized m\n⊢ size (node4L l x m y r) = size l + size m + size r + 2\n[PROOFSTEP]\ncases m <;> simp [node4L, node3L, node'] <;> [skip; simp [size, hm.1]]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\nhm : Sized m\n⊢ size (node4L l x m y r) = size l + size m + size r + 2\n[PROOFSTEP]\ncases m\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\nhm : Sized nil\n⊢ size (node4L l x nil y r) = size l + size nil + size r + 2\n[PROOFSTEP]\nsimp [node4L, node3L, node']\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\n⊢ size (node4L l x (node size✝ l✝ x✝ r✝) y r) = size l + size (node size✝ l✝ x✝ r✝) + size r + 2\n[PROOFSTEP]\nsimp [node4L, node3L, node']\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\nhm : Sized nil\n⊢ size l + 1 + size r = size l + size r + 1\n[PROOFSTEP]\nskip\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\n⊢ size l + size l✝ + 1 + (size r✝ + size r + 1) = size l + size✝ + size r + 1\n[PROOFSTEP]\nsimp [size, hm.1]\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\nhm : Sized nil\n⊢ size l + 1 + size r = size l + size r + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\nhm : Sized nil\n⊢ size l + 1 + size r = size l + size r + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\n⊢ size l + size l✝ + 1 + (size r✝ + size r + 1) = size l + (size l✝ + size r✝ + 1) + size r + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx y : α\nr : Ordnode α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\n⊢ size l + size l✝ + 1 + (size r✝ + size r + 1) = size l + (size l✝ + size r✝ + 1) + size r + 1\n[PROOFSTEP]\nabel\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx✝ : α\nr : Ordnode α\nsl : Sized l\nsr : Sized r\n⊢ size l + size r + 1 = size (Ordnode.dual r) + size (Ordnode.dual l) + 1\n[PROOFSTEP]\nsimp [size_dual, add_comm]\n[GOAL]\nα : Type u_1\nt : Ordnode α\nh : Sized (Ordnode.dual t)\n⊢ Sized t\n[PROOFSTEP]\nrw [← dual_dual t]\n[GOAL]\nα : Type u_1\nt : Ordnode α\nh : Sized (Ordnode.dual t)\n⊢ Sized (Ordnode.dual (Ordnode.dual t))\n[PROOFSTEP]\nexact h.dual\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\n⊢ Sized (Ordnode.rotateL l x r)\n[PROOFSTEP]\ncases r\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx : α\nhl : Sized l\nhr : Sized nil\n⊢ Sized (Ordnode.rotateL l x nil)\n[PROOFSTEP]\nexact hl.node' hr\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx : α\nhl : Sized l\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhr : Sized (node size✝ l✝ x✝ r✝)\n⊢ Sized (Ordnode.rotateL l x (node size✝ l✝ x✝ r✝))\n[PROOFSTEP]\nrw [rotateL]\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx : α\nhl : Sized l\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhr : Sized (node size✝ l✝ x✝ r✝)\n⊢ Sized (if size l✝ < ratio * size r✝ then Ordnode.node3L l x l✝ x✝ r✝ else Ordnode.node4L l x l✝ x✝ r✝)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nhl : Sized l\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhr : Sized (node size✝ l✝ x✝ r✝)\nh✝ : size l✝ < ratio * size r✝\n⊢ Sized (Ordnode.node3L l x l✝ x✝ r✝)\n[PROOFSTEP]\nexact hl.node3L hr.2.1 hr.2.2\n[GOAL]\ncase neg\nα : Type u_1\nl : Ordnode α\nx : α\nhl : Sized l\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhr : Sized (node size✝ l✝ x✝ r✝)\nh✝ : ¬size l✝ < ratio * size r✝\n⊢ Sized (Ordnode.node4L l x l✝ x✝ r✝)\n[PROOFSTEP]\nexact hl.node4L hr.2.1 hr.2.2\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\n⊢ Sized (Ordnode.dual (Ordnode.rotateR l x r))\n[PROOFSTEP]\nrw [dual_rotateR]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\n⊢ Sized (Ordnode.rotateL (Ordnode.dual r) x (Ordnode.dual l))\n[PROOFSTEP]\nexact hr.dual.rotateL hl.dual\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhm : Sized r\n⊢ size (Ordnode.rotateL l x r) = size l + size r + 1\n[PROOFSTEP]\ncases r\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx : α\nhm : Sized nil\n⊢ size (Ordnode.rotateL l x nil) = size l + size nil + 1\n[PROOFSTEP]\nsimp [Ordnode.rotateL]\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\n⊢ size (Ordnode.rotateL l x (node size✝ l✝ x✝ r✝)) = size l + size (node size✝ l✝ x✝ r✝) + 1\n[PROOFSTEP]\nsimp [Ordnode.rotateL]\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\n⊢ size (if size l✝ < ratio * size r✝ then Ordnode.node3L l x l✝ x✝ r✝ else Ordnode.node4L l x l✝ x✝ r✝) =\n    size l + size✝ + 1\n[PROOFSTEP]\nsimp [size, hm.1]\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\n⊢ size (if size l✝ < ratio * size r✝ then Ordnode.node3L l x l✝ x✝ r✝ else Ordnode.node4L l x l✝ x✝ r✝) =\n    size l + (size l✝ + size r✝ + 1) + 1\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\nh✝ : size l✝ < ratio * size r✝\n⊢ size (Ordnode.node3L l x l✝ x✝ r✝) = size l + (size l✝ + size r✝ + 1) + 1\n[PROOFSTEP]\nsimp [node3L_size, node4L_size hm.2.1]\n[GOAL]\ncase neg\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\nh✝ : ¬size l✝ < ratio * size r✝\n⊢ size (Ordnode.node4L l x l✝ x✝ r✝) = size l + (size l✝ + size r✝ + 1) + 1\n[PROOFSTEP]\nsimp [node3L_size, node4L_size hm.2.1]\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\nh✝ : size l✝ < ratio * size r✝\n⊢ size l + size l✝ + size r✝ + 1 = size l + (size l✝ + size r✝ + 1)\n[PROOFSTEP]\nabel\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\nh✝ : size l✝ < ratio * size r✝\n⊢ size l + size l✝ + size r✝ + 1 = size l + (size l✝ + size r✝ + 1)\n[PROOFSTEP]\nabel\n[GOAL]\ncase neg\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\nh✝ : ¬size l✝ < ratio * size r✝\n⊢ size l + size l✝ + size r✝ + 1 = size l + (size l✝ + size r✝ + 1)\n[PROOFSTEP]\nabel\n[GOAL]\ncase neg\nα : Type u_1\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nhm : Sized (node size✝ l✝ x✝ r✝)\nh✝ : ¬size l✝ < ratio * size r✝\n⊢ size l + size l✝ + size r✝ + 1 = size l + (size l✝ + size r✝ + 1)\n[PROOFSTEP]\nabel\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\n⊢ size (Ordnode.rotateR l x r) = size l + size r + 1\n[PROOFSTEP]\nrw [← size_dual, dual_rotateR, hl.dual.rotateL_size, size_dual, size_dual, add_comm (size l)]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\n⊢ Sized (Ordnode.balance' l x r)\n[PROOFSTEP]\nunfold balance'\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\n⊢ Sized\n    (if size l + size r ≤ 1 then Ordnode.node' l x r\n    else\n      if size r > delta * size l then Ordnode.rotateL l x r\n      else if size l > delta * size r then Ordnode.rotateR l x r else Ordnode.node' l x r)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\nh✝ : size l + size r ≤ 1\n⊢ Sized (Ordnode.node' l x r)\n[PROOFSTEP]\nexact hl.node' hr\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\nh✝¹ : ¬size l + size r ≤ 1\nh✝ : size r > delta * size l\n⊢ Sized (Ordnode.rotateL l x r)\n[PROOFSTEP]\nexact hl.rotateL hr\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\nh✝² : ¬size l + size r ≤ 1\nh✝¹ : ¬size r > delta * size l\nh✝ : size l > delta * size r\n⊢ Sized (Ordnode.rotateR l x r)\n[PROOFSTEP]\nexact hl.rotateR hr\n[GOAL]\ncase neg\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\nh✝² : ¬size l + size r ≤ 1\nh✝¹ : ¬size r > delta * size l\nh✝ : ¬size l > delta * size r\n⊢ Sized (Ordnode.node' l x r)\n[PROOFSTEP]\nexact hl.node' hr\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\n⊢ size (balance' l x r) = size l + size r + 1\n[PROOFSTEP]\nunfold balance'\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\n⊢ size\n      (if size l + size r ≤ 1 then node' l x r\n      else\n        if size r > delta * size l then rotateL l x r\n        else if size l > delta * size r then rotateR l x r else node' l x r) =\n    size l + size r + 1\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\nh✝ : size l + size r ≤ 1\n⊢ size (node' l x r) = size l + size r + 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\nh✝¹ : ¬size l + size r ≤ 1\nh✝ : size r > delta * size l\n⊢ size (rotateL l x r) = size l + size r + 1\n[PROOFSTEP]\nexact hr.rotateL_size\n[GOAL]\ncase pos\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\nh✝² : ¬size l + size r ≤ 1\nh✝¹ : ¬size r > delta * size l\nh✝ : size l > delta * size r\n⊢ size (rotateR l x r) = size l + size r + 1\n[PROOFSTEP]\nexact hl.rotateR_size\n[GOAL]\ncase neg\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Sized l\nhr : Sized r\nh✝² : ¬size l + size r ≤ 1\nh✝¹ : ¬size r > delta * size l\nh✝ : ¬size l > delta * size r\n⊢ size (node' l x r) = size l + size r + 1\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nP : α → Prop\nx : α\n⊢ Any P {x} → P x\n[PROOFSTEP]\nrintro (⟨⟨⟩⟩ | h | ⟨⟨⟩⟩)\n[GOAL]\ncase inr.inl\nα : Type u_1\nP : α → Prop\nx : α\nh : P x\n⊢ P x\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u_1\nP : α → Prop\n⊢ ∀ (x : α), Emem x nil → P x\n[PROOFSTEP]\nrintro _ ⟨⟩\n[GOAL]\nα : Type u_1\nP : α → Prop\nsize✝ : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ All P (node size✝ l x r) ↔ ∀ (x_1 : α), Emem x_1 (node size✝ l x r) → P x_1\n[PROOFSTEP]\nsimp [All, Emem, all_iff_forall, Any, or_imp, forall_and]\n[GOAL]\nα : Type u_1\nP : α → Prop\n⊢ Any P nil → ∃ x, Emem x nil ∧ P x\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\nα : Type u_1\nP : α → Prop\n⊢ (∃ x, Emem x nil ∧ P x) → Any P nil\n[PROOFSTEP]\nrintro ⟨_, ⟨⟩, _⟩\n[GOAL]\nα : Type u_1\nP : α → Prop\nsize✝ : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ Any P (node size✝ l x r) ↔ ∃ x_1, Emem x_1 (node size✝ l x r) ∧ P x_1\n[PROOFSTEP]\nsimp only [Emem]\n[GOAL]\nα : Type u_1\nP : α → Prop\nsize✝ : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ Any P (node size✝ l x r) ↔ ∃ x_1, Any (Eq x_1) (node size✝ l x r) ∧ P x_1\n[PROOFSTEP]\nsimp [Any, any_iff_exists, or_and_right, exists_or]\n[GOAL]\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\n⊢ All P (node3L l x m y r) ↔ All P l ∧ P x ∧ All P m ∧ P y ∧ All P r\n[PROOFSTEP]\nsimp [node3L, all_node', and_assoc]\n[GOAL]\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\n⊢ All P (node4L l x m y r) ↔ All P l ∧ P x ∧ All P m ∧ P y ∧ All P r\n[PROOFSTEP]\ncases m\n[GOAL]\ncase nil\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx y : α\nr : Ordnode α\n⊢ All P (node4L l x nil y r) ↔ All P l ∧ P x ∧ All P nil ∧ P y ∧ All P r\n[PROOFSTEP]\nsimp [node4L, all_node', All, all_node3L, and_assoc]\n[GOAL]\ncase node\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx y : α\nr : Ordnode α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ All P (node4L l x (node size✝ l✝ x✝ r✝) y r) ↔ All P l ∧ P x ∧ All P (node size✝ l✝ x✝ r✝) ∧ P y ∧ All P r\n[PROOFSTEP]\nsimp [node4L, all_node', All, all_node3L, and_assoc]\n[GOAL]\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\n⊢ All P (node4R l x m y r) ↔ All P l ∧ P x ∧ All P m ∧ P y ∧ All P r\n[PROOFSTEP]\ncases m\n[GOAL]\ncase nil\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx y : α\nr : Ordnode α\n⊢ All P (node4R l x nil y r) ↔ All P l ∧ P x ∧ All P nil ∧ P y ∧ All P r\n[PROOFSTEP]\nsimp [node4R, all_node', All, all_node3R, and_assoc]\n[GOAL]\ncase node\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx y : α\nr : Ordnode α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ All P (node4R l x (node size✝ l✝ x✝ r✝) y r) ↔ All P l ∧ P x ∧ All P (node size✝ l✝ x✝ r✝) ∧ P y ∧ All P r\n[PROOFSTEP]\nsimp [node4R, all_node', All, all_node3R, and_assoc]\n[GOAL]\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ All P (rotateL l x r) ↔ All P l ∧ P x ∧ All P r\n[PROOFSTEP]\ncases r\n[GOAL]\ncase nil\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\n⊢ All P (rotateL l x nil) ↔ All P l ∧ P x ∧ All P nil\n[PROOFSTEP]\nsimp [rotateL, all_node']\n[GOAL]\ncase node\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ All P (rotateL l x (node size✝ l✝ x✝ r✝)) ↔ All P l ∧ P x ∧ All P (node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\nsimp [rotateL, all_node']\n[GOAL]\ncase node\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ All P (if size l✝ < ratio * size r✝ then node3L l x l✝ x✝ r✝ else node4L l x l✝ x✝ r✝) ↔\n    All P l ∧ P x ∧ All P (node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nh✝ : size l✝ < ratio * size r✝\n⊢ All P (node3L l x l✝ x✝ r✝) ↔ All P l ∧ P x ∧ All P (node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\nsimp [all_node3L, all_node4L, All, and_assoc]\n[GOAL]\ncase neg\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nh✝ : ¬size l✝ < ratio * size r✝\n⊢ All P (node4L l x l✝ x✝ r✝) ↔ All P l ∧ P x ∧ All P (node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\nsimp [all_node3L, all_node4L, All, and_assoc]\n[GOAL]\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ All P (rotateR l x r) ↔ All P l ∧ P x ∧ All P r\n[PROOFSTEP]\nrw [← all_dual, dual_rotateR, all_rotateL]\n[GOAL]\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ All P (dual r) ∧ P x ∧ All P (dual l) ↔ All P l ∧ P x ∧ All P r\n[PROOFSTEP]\nsimp [all_dual, and_comm, and_left_comm, and_assoc]\n[GOAL]\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ All P (balance' l x r) ↔ All P l ∧ P x ∧ All P r\n[PROOFSTEP]\nrw [balance']\n[GOAL]\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ All P\n      (if size l + size r ≤ 1 then node' l x r\n      else\n        if size r > delta * size l then rotateL l x r\n        else if size l > delta * size r then rotateR l x r else node' l x r) ↔\n    All P l ∧ P x ∧ All P r\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nr : Ordnode α\nh✝ : size l + size r ≤ 1\n⊢ All P (node' l x r) ↔ All P l ∧ P x ∧ All P r\n[PROOFSTEP]\nsimp [all_node', all_rotateL, all_rotateR]\n[GOAL]\ncase pos\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nr : Ordnode α\nh✝¹ : ¬size l + size r ≤ 1\nh✝ : size r > delta * size l\n⊢ All P (rotateL l x r) ↔ All P l ∧ P x ∧ All P r\n[PROOFSTEP]\nsimp [all_node', all_rotateL, all_rotateR]\n[GOAL]\ncase pos\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nr : Ordnode α\nh✝² : ¬size l + size r ≤ 1\nh✝¹ : ¬size r > delta * size l\nh✝ : size l > delta * size r\n⊢ All P (rotateR l x r) ↔ All P l ∧ P x ∧ All P r\n[PROOFSTEP]\nsimp [all_node', all_rotateL, all_rotateR]\n[GOAL]\ncase neg\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nr : Ordnode α\nh✝² : ¬size l + size r ≤ 1\nh✝¹ : ¬size r > delta * size l\nh✝ : ¬size l > delta * size r\n⊢ All P (node' l x r) ↔ All P l ∧ P x ∧ All P r\n[PROOFSTEP]\nsimp [all_node', all_rotateL, all_rotateR]\n[GOAL]\nα : Type u_1\nsize✝ : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\nr' : List α\n⊢ foldr List.cons (node size✝ l x r) r' = toList (node size✝ l x r) ++ r'\n[PROOFSTEP]\nrw [foldr, foldr_cons_eq_toList l, foldr_cons_eq_toList r, ← List.cons_append, ← List.append_assoc, ←\n  foldr_cons_eq_toList l]\n[GOAL]\nα : Type u_1\nsize✝ : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\nr' : List α\n⊢ foldr List.cons l (x :: toList r) ++ r' = toList (node size✝ l x r) ++ r'\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ toList (node s l x r) = toList l ++ x :: toList r\n[PROOFSTEP]\nrw [toList, foldr, foldr_cons_eq_toList]\n[GOAL]\nα : Type u_1\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\n⊢ toList l ++ x :: foldr List.cons r [] = toList l ++ x :: toList r\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nx : α\nt : Ordnode α\n⊢ Emem x t ↔ x ∈ toList t\n[PROOFSTEP]\nunfold Emem\n[GOAL]\nα : Type u_1\nx : α\nt : Ordnode α\n⊢ Any (Eq x) t ↔ x ∈ toList t\n[PROOFSTEP]\ninduction t\n[GOAL]\ncase nil\nα : Type u_1\nx : α\n⊢ Any (Eq x) nil ↔ x ∈ toList nil\n[PROOFSTEP]\nsimp [Any, *, or_assoc]\n[GOAL]\ncase node\nα : Type u_1\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nl_ih✝ : Any (Eq x) l✝ ↔ x ∈ toList l✝\nr_ih✝ : Any (Eq x) r✝ ↔ x ∈ toList r✝\n⊢ Any (Eq x) (node size✝ l✝ x✝ r✝) ↔ x ∈ toList (node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\nsimp [Any, *, or_assoc]\n[GOAL]\nα : Type u_1\nsize✝ : ℕ\nl : Ordnode α\nx✝ : α\nr : Ordnode α\n⊢ List.length (toList (node size✝ l x✝ r)) = realSize (node size✝ l x✝ r)\n[PROOFSTEP]\nrw [toList_node, List.length_append, List.length_cons, length_toList' l, length_toList' r]\n[GOAL]\nα : Type u_1\nsize✝ : ℕ\nl : Ordnode α\nx✝ : α\nr : Ordnode α\n⊢ realSize l + Nat.succ (realSize r) = realSize (node size✝ l x✝ r)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nt : Ordnode α\nh : Sized t\n⊢ List.length (toList t) = size t\n[PROOFSTEP]\nrw [length_toList', size_eq_realSize h]\n[GOAL]\nα : Type u_1\nt₁ t₂ : Ordnode α\nh₁ : Sized t₁\nh₂ : Sized t₂\nh : toList t₁ = toList t₂\n⊢ size t₁ = size t₂\n[PROOFSTEP]\nrw [← length_toList h₁, h, length_toList h₂]\n[GOAL]\nα : Type u_1\ninst✝¹ : LE α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nt : Ordnode α\nh : Sized t\nh_mem : x ∈ t\n⊢ 0 < size t\n[PROOFSTEP]\ncases t\n[GOAL]\ncase nil\nα : Type u_1\ninst✝¹ : LE α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nh : Sized nil\nh_mem : x ∈ nil\n⊢ 0 < size nil\n[PROOFSTEP]\n{contradiction\n}\n[GOAL]\ncase nil\nα : Type u_1\ninst✝¹ : LE α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nh : Sized nil\nh_mem : x ∈ nil\n⊢ 0 < size nil\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : LE α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nh : Sized (node size✝ l✝ x✝ r✝)\nh_mem : x ∈ node size✝ l✝ x✝ r✝\n⊢ 0 < size (node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\n{simp [h.1]\n}\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : LE α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nh : Sized (node size✝ l✝ x✝ r✝)\nh_mem : x ∈ node size✝ l✝ x✝ r✝\n⊢ 0 < size (node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\nsimp [h.1]\n[GOAL]\nα : Type u_1\nt : Ordnode α\nx : α\n⊢ findMax' x (dual t) = findMin' t x\n[PROOFSTEP]\nrw [← findMin'_dual, dual_dual]\n[GOAL]\nα : Type u_1\nt : Ordnode α\n⊢ findMax (dual t) = findMin t\n[PROOFSTEP]\nrw [← findMin_dual, dual_dual]\n[GOAL]\nα : Type u_1\nsize✝ sz : ℕ\nl' : Ordnode α\ny : α\nr' : Ordnode α\nx : α\nr : Ordnode α\n⊢ dual (eraseMin (node size✝ (node sz l' y r') x r)) = eraseMax (dual (node size✝ (node sz l' y r') x r))\n[PROOFSTEP]\nrw [eraseMin, dual_balanceR, dual_eraseMin (node sz l' y r'), dual, dual, dual, eraseMax]\n[GOAL]\nα : Type u_1\nt : Ordnode α\n⊢ dual (eraseMax t) = eraseMin (dual t)\n[PROOFSTEP]\nrw [← dual_dual (eraseMin _), dual_eraseMin, dual_dual]\n[GOAL]\nα : Type u_1\nx✝ ls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nx : α\nr : Ordnode α\n⊢ splitMin' (node ls ll lx lr) x r = (findMin' (node ls ll lx lr) x, eraseMin (node x✝ (node ls ll lx lr) x r))\n[PROOFSTEP]\nrw [splitMin', splitMin_eq ls ll lx lr, findMin', eraseMin]\n[GOAL]\nα : Type u_1\nx✝ : ℕ\nl : Ordnode α\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\n⊢ splitMax' l x (node ls ll lx lr) = (eraseMax (node x✝ l x (node ls ll lx lr)), findMax' x (node ls ll lx lr))\n[PROOFSTEP]\nrw [splitMax', splitMax_eq ls ll lx lr, findMax', eraseMax]\n[GOAL]\nα : Type u_1\nt : Ordnode α\n⊢ merge t nil = t\n[PROOFSTEP]\ncases t\n[GOAL]\ncase nil\nα : Type u_1\n⊢ merge nil nil = nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase node\nα : Type u_1\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\n⊢ merge (node size✝ l✝ x✝ r✝) nil = node size✝ l✝ x✝ r✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\n⊢ dual (Ordnode.insert x (node size✝ l y r)) = Ordnode.insert x (dual (node size✝ l y r))\n[PROOFSTEP]\nhave : @cmpLE αᵒᵈ _ _ x y = cmpLE y x := rfl\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\nthis : cmpLE x y = cmpLE y x\n⊢ dual (Ordnode.insert x (node size✝ l y r)) = Ordnode.insert x (dual (node size✝ l y r))\n[PROOFSTEP]\nrw [Ordnode.insert, dual, Ordnode.insert, this, ← cmpLE_swap x y]\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\nthis : cmpLE x y = cmpLE y x\n⊢ dual\n      (match cmpLE x y with\n      | Ordering.lt => balanceL (Ordnode.insert x l) y r\n      | Ordering.eq => node size✝ l x r\n      | Ordering.gt => balanceR l y (Ordnode.insert x r)) =\n    match Ordering.swap (cmpLE x y) with\n    | Ordering.lt => balanceL (Ordnode.insert x (dual r)) y (dual l)\n    | Ordering.eq => node size✝ (dual r) x (dual l)\n    | Ordering.gt => balanceR (dual r) y (Ordnode.insert x (dual l))\n[PROOFSTEP]\ncases cmpLE x y\n[GOAL]\ncase lt\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\nthis : cmpLE x y = cmpLE y x\n⊢ dual\n      (match Ordering.lt with\n      | Ordering.lt => balanceL (Ordnode.insert x l) y r\n      | Ordering.eq => node size✝ l x r\n      | Ordering.gt => balanceR l y (Ordnode.insert x r)) =\n    match Ordering.swap Ordering.lt with\n    | Ordering.lt => balanceL (Ordnode.insert x (dual r)) y (dual l)\n    | Ordering.eq => node size✝ (dual r) x (dual l)\n    | Ordering.gt => balanceR (dual r) y (Ordnode.insert x (dual l))\n[PROOFSTEP]\nsimp [Ordering.swap, Ordnode.insert, dual_balanceL, dual_balanceR, dual_insert]\n[GOAL]\ncase eq\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\nthis : cmpLE x y = cmpLE y x\n⊢ dual\n      (match Ordering.eq with\n      | Ordering.lt => balanceL (Ordnode.insert x l) y r\n      | Ordering.eq => node size✝ l x r\n      | Ordering.gt => balanceR l y (Ordnode.insert x r)) =\n    match Ordering.swap Ordering.eq with\n    | Ordering.lt => balanceL (Ordnode.insert x (dual r)) y (dual l)\n    | Ordering.eq => node size✝ (dual r) x (dual l)\n    | Ordering.gt => balanceR (dual r) y (Ordnode.insert x (dual l))\n[PROOFSTEP]\nsimp [Ordering.swap, Ordnode.insert, dual_balanceL, dual_balanceR, dual_insert]\n[GOAL]\ncase gt\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\nthis : cmpLE x y = cmpLE y x\n⊢ dual\n      (match Ordering.gt with\n      | Ordering.lt => balanceL (Ordnode.insert x l) y r\n      | Ordering.eq => node size✝ l x r\n      | Ordering.gt => balanceR l y (Ordnode.insert x r)) =\n    match Ordering.swap Ordering.gt with\n    | Ordering.lt => balanceL (Ordnode.insert x (dual r)) y (dual l)\n    | Ordering.eq => node size✝ (dual r) x (dual l)\n    | Ordering.gt => balanceR (dual r) y (Ordnode.insert x (dual l))\n[PROOFSTEP]\nsimp [Ordering.swap, Ordnode.insert, dual_balanceL, dual_balanceR, dual_insert]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\n⊢ balance l x r = balance' l x r\n[PROOFSTEP]\ncases' l with ls ll lx lr\n[GOAL]\ncase nil\nα : Type u_1\nx : α\nr : Ordnode α\nhr : Balanced r\nsr : Sized r\nhl : Balanced nil\nsl : Sized nil\n⊢ balance nil x r = balance' nil x r\n[PROOFSTEP]\ncases' r with rs rl rx rr\n[GOAL]\ncase nil.nil\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nhr : Balanced nil\nsr : Sized nil\n⊢ balance nil x nil = balance' nil x nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase nil.node\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\n⊢ balance nil x (node rs rl rx rr) = balance' nil x (node rs rl rx rr)\n[PROOFSTEP]\nrw [sr.eq_node'] at hr ⊢\n[GOAL]\ncase nil.node\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node' rl rx rr)\nsr : Sized (node rs rl rx rr)\n⊢ balance nil x (node' rl rx rr) = balance' nil x (node' rl rx rr)\n[PROOFSTEP]\ncases' rl with rls rll rlx rlr\n[GOAL]\ncase nil.node.nil\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrr : Ordnode α\nhr : Balanced (node' nil rx rr)\nsr : Sized (node rs nil rx rr)\n⊢ balance nil x (node' nil rx rr) = balance' nil x (node' nil rx rr)\n[PROOFSTEP]\ncases' rr with rrs rrl rrx rrr\n[GOAL]\ncase nil.node.node\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrr : Ordnode α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx rr)\nsr : Sized (node rs (node rls rll rlx rlr) rx rr)\n⊢ balance nil x (node' (node rls rll rlx rlr) rx rr) = balance' nil x (node' (node rls rll rlx rlr) rx rr)\n[PROOFSTEP]\ncases' rr with rrs rrl rrx rrr\n[GOAL]\ncase nil.node.nil.nil\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nhr : Balanced (node' nil rx nil)\nsr : Sized (node rs nil rx nil)\n⊢ balance nil x (node' nil rx nil) = balance' nil x (node' nil rx nil)\n[PROOFSTEP]\ndsimp [balance, balance']\n[GOAL]\ncase nil.node.nil.node\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' nil rx (node rrs rrl rrx rrr))\nsr : Sized (node rs nil rx (node rrs rrl rrx rrr))\n⊢ balance nil x (node' nil rx (node rrs rrl rrx rrr)) = balance' nil x (node' nil rx (node rrs rrl rrx rrr))\n[PROOFSTEP]\ndsimp [balance, balance']\n[GOAL]\ncase nil.node.node.nil\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx nil)\nsr : Sized (node rs (node rls rll rlx rlr) rx nil)\n⊢ balance nil x (node' (node rls rll rlx rlr) rx nil) = balance' nil x (node' (node rls rll rlx rlr) rx nil)\n[PROOFSTEP]\ndsimp [balance, balance']\n[GOAL]\ncase nil.node.node.node\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n⊢ balance nil x (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr)) =\n    balance' nil x (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n[PROOFSTEP]\ndsimp [balance, balance']\n[GOAL]\ncase nil.node.nil.nil\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nhr : Balanced (node' nil rx nil)\nsr : Sized (node rs nil rx nil)\n⊢ node 2 nil x (node' nil rx nil) =\n    if 0 + (0 + 1) ≤ 1 then node' nil x (node' nil rx nil)\n    else\n      if 0 + 1 > 0 then rotateL nil x (node' nil rx nil)\n      else if 0 > delta * (0 + 1) then rotateR nil x (node' nil rx nil) else node' nil x (node' nil rx nil)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase nil.node.nil.node\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' nil rx (node rrs rrl rrx rrr))\nsr : Sized (node rs nil rx (node rrs rrl rrx rrr))\n⊢ node 3 (Ordnode.singleton x) rx (node rrs rrl rrx rrr) =\n    if 0 + (0 + rrs + 1) ≤ 1 then node' nil x (node' nil rx (node rrs rrl rrx rrr))\n    else\n      if 0 + rrs + 1 > 0 then rotateL nil x (node' nil rx (node rrs rrl rrx rrr))\n      else\n        if 0 > delta * (0 + rrs + 1) then rotateR nil x (node' nil rx (node rrs rrl rrx rrr))\n        else node' nil x (node' nil rx (node rrs rrl rrx rrr))\n[PROOFSTEP]\nhave : size rrl = 0 ∧ size rrr = 0 := by\n  have := balancedSz_zero.1 hr.1.symm\n  rwa [size, sr.2.2.1, Nat.succ_le_succ_iff, le_zero_iff, add_eq_zero_iff] at this \n[GOAL]\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' nil rx (node rrs rrl rrx rrr))\nsr : Sized (node rs nil rx (node rrs rrl rrx rrr))\n⊢ size rrl = 0 ∧ size rrr = 0\n[PROOFSTEP]\nhave := balancedSz_zero.1 hr.1.symm\n[GOAL]\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' nil rx (node rrs rrl rrx rrr))\nsr : Sized (node rs nil rx (node rrs rrl rrx rrr))\nthis : size (node rrs rrl rrx rrr) ≤ 1\n⊢ size rrl = 0 ∧ size rrr = 0\n[PROOFSTEP]\nrwa [size, sr.2.2.1, Nat.succ_le_succ_iff, le_zero_iff, add_eq_zero_iff] at this \n[GOAL]\ncase nil.node.nil.node\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' nil rx (node rrs rrl rrx rrr))\nsr : Sized (node rs nil rx (node rrs rrl rrx rrr))\nthis : size rrl = 0 ∧ size rrr = 0\n⊢ node 3 (Ordnode.singleton x) rx (node rrs rrl rrx rrr) =\n    if 0 + (0 + rrs + 1) ≤ 1 then node' nil x (node' nil rx (node rrs rrl rrx rrr))\n    else\n      if 0 + rrs + 1 > 0 then rotateL nil x (node' nil rx (node rrs rrl rrx rrr))\n      else\n        if 0 > delta * (0 + rrs + 1) then rotateR nil x (node' nil rx (node rrs rrl rrx rrr))\n        else node' nil x (node' nil rx (node rrs rrl rrx rrr))\n[PROOFSTEP]\ncases sr.2.2.2.1.size_eq_zero.1 this.1\n[GOAL]\ncase nil.node.nil.node.refl\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrrs : ℕ\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' nil rx (node rrs nil rrx rrr))\nsr : Sized (node rs nil rx (node rrs nil rrx rrr))\nthis : size nil = 0 ∧ size rrr = 0\n⊢ node 3 (Ordnode.singleton x) rx (node rrs nil rrx rrr) =\n    if 0 + (0 + rrs + 1) ≤ 1 then node' nil x (node' nil rx (node rrs nil rrx rrr))\n    else\n      if 0 + rrs + 1 > 0 then rotateL nil x (node' nil rx (node rrs nil rrx rrr))\n      else\n        if 0 > delta * (0 + rrs + 1) then rotateR nil x (node' nil rx (node rrs nil rrx rrr))\n        else node' nil x (node' nil rx (node rrs nil rrx rrr))\n[PROOFSTEP]\ncases sr.2.2.2.2.size_eq_zero.1 this.2\n[GOAL]\ncase nil.node.nil.node.refl.refl\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrrs : ℕ\nrrx : α\nhr : Balanced (node' nil rx (node rrs nil rrx nil))\nsr : Sized (node rs nil rx (node rrs nil rrx nil))\nthis : size nil = 0 ∧ size nil = 0\n⊢ node 3 (Ordnode.singleton x) rx (node rrs nil rrx nil) =\n    if 0 + (0 + rrs + 1) ≤ 1 then node' nil x (node' nil rx (node rrs nil rrx nil))\n    else\n      if 0 + rrs + 1 > 0 then rotateL nil x (node' nil rx (node rrs nil rrx nil))\n      else\n        if 0 > delta * (0 + rrs + 1) then rotateR nil x (node' nil rx (node rrs nil rrx nil))\n        else node' nil x (node' nil rx (node rrs nil rrx nil))\n[PROOFSTEP]\nobtain rfl : rrs = 1 := sr.2.2.1\n[GOAL]\ncase nil.node.nil.node.refl.refl\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rrx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' nil rx (node 1 nil rrx nil))\nsr : Sized (node rs nil rx (node 1 nil rrx nil))\n⊢ node 3 (Ordnode.singleton x) rx (node 1 nil rrx nil) =\n    if 0 + (0 + 1 + 1) ≤ 1 then node' nil x (node' nil rx (node 1 nil rrx nil))\n    else\n      if 0 + 1 + 1 > 0 then rotateL nil x (node' nil rx (node 1 nil rrx nil))\n      else\n        if 0 > delta * (0 + 1 + 1) then rotateR nil x (node' nil rx (node 1 nil rrx nil))\n        else node' nil x (node' nil rx (node 1 nil rrx nil))\n[PROOFSTEP]\nrw [if_neg, if_pos, rotateL, if_pos]\n[GOAL]\ncase nil.node.nil.node.refl.refl\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rrx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' nil rx (node 1 nil rrx nil))\nsr : Sized (node rs nil rx (node 1 nil rrx nil))\n⊢ node 3 (Ordnode.singleton x) rx (node 1 nil rrx nil) = node3L nil x nil rx (node 1 nil rrx nil)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase nil.node.nil.node.refl.refl.hc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rrx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' nil rx (node 1 nil rrx nil))\nsr : Sized (node rs nil rx (node 1 nil rrx nil))\n⊢ size nil < ratio * size (node 1 nil rrx nil)\ncase nil.node.nil.node.refl.refl.hc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rrx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' nil rx (node 1 nil rrx nil))\nsr : Sized (node rs nil rx (node 1 nil rrx nil))\n⊢ 0 + 1 + 1 > 0\ncase nil.node.nil.node.refl.refl.hnc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rrx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' nil rx (node 1 nil rrx nil))\nsr : Sized (node rs nil rx (node 1 nil rrx nil))\n⊢ ¬0 + (0 + 1 + 1) ≤ 1\n[PROOFSTEP]\nall_goals dsimp only [size]; decide\n[GOAL]\ncase nil.node.nil.node.refl.refl.hc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rrx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' nil rx (node 1 nil rrx nil))\nsr : Sized (node rs nil rx (node 1 nil rrx nil))\n⊢ size nil < ratio * size (node 1 nil rrx nil)\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase nil.node.nil.node.refl.refl.hc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rrx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' nil rx (node 1 nil rrx nil))\nsr : Sized (node rs nil rx (node 1 nil rrx nil))\n⊢ 0 < ratio * 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase nil.node.nil.node.refl.refl.hc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rrx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' nil rx (node 1 nil rrx nil))\nsr : Sized (node rs nil rx (node 1 nil rrx nil))\n⊢ 0 + 1 + 1 > 0\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase nil.node.nil.node.refl.refl.hc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rrx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' nil rx (node 1 nil rrx nil))\nsr : Sized (node rs nil rx (node 1 nil rrx nil))\n⊢ 0 + 1 + 1 > 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase nil.node.nil.node.refl.refl.hnc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rrx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' nil rx (node 1 nil rrx nil))\nsr : Sized (node rs nil rx (node 1 nil rrx nil))\n⊢ ¬0 + (0 + 1 + 1) ≤ 1\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase nil.node.nil.node.refl.refl.hnc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rrx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' nil rx (node 1 nil rrx nil))\nsr : Sized (node rs nil rx (node 1 nil rrx nil))\n⊢ ¬0 + (0 + 1 + 1) ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase nil.node.node.nil\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx nil)\nsr : Sized (node rs (node rls rll rlx rlr) rx nil)\n⊢ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx) =\n    if 0 + (rls + 1) ≤ 1 then node' nil x (node' (node rls rll rlx rlr) rx nil)\n    else\n      if rls + 1 > 0 then rotateL nil x (node' (node rls rll rlx rlr) rx nil)\n      else\n        if 0 > delta * (rls + 1) then rotateR nil x (node' (node rls rll rlx rlr) rx nil)\n        else node' nil x (node' (node rls rll rlx rlr) rx nil)\n[PROOFSTEP]\nhave : size rll = 0 ∧ size rlr = 0 := by\n  have := balancedSz_zero.1 hr.1\n  rwa [size, sr.2.1.1, Nat.succ_le_succ_iff, le_zero_iff, add_eq_zero_iff] at this \n[GOAL]\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx nil)\nsr : Sized (node rs (node rls rll rlx rlr) rx nil)\n⊢ size rll = 0 ∧ size rlr = 0\n[PROOFSTEP]\nhave := balancedSz_zero.1 hr.1\n[GOAL]\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx nil)\nsr : Sized (node rs (node rls rll rlx rlr) rx nil)\nthis : size (node rls rll rlx rlr) ≤ 1\n⊢ size rll = 0 ∧ size rlr = 0\n[PROOFSTEP]\nrwa [size, sr.2.1.1, Nat.succ_le_succ_iff, le_zero_iff, add_eq_zero_iff] at this \n[GOAL]\ncase nil.node.node.nil\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx nil)\nsr : Sized (node rs (node rls rll rlx rlr) rx nil)\nthis : size rll = 0 ∧ size rlr = 0\n⊢ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx) =\n    if 0 + (rls + 1) ≤ 1 then node' nil x (node' (node rls rll rlx rlr) rx nil)\n    else\n      if rls + 1 > 0 then rotateL nil x (node' (node rls rll rlx rlr) rx nil)\n      else\n        if 0 > delta * (rls + 1) then rotateR nil x (node' (node rls rll rlx rlr) rx nil)\n        else node' nil x (node' (node rls rll rlx rlr) rx nil)\n[PROOFSTEP]\ncases sr.2.1.2.1.size_eq_zero.1 this.1\n[GOAL]\ncase nil.node.node.nil.refl\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrlx : α\nrlr : Ordnode α\nhr : Balanced (node' (node rls nil rlx rlr) rx nil)\nsr : Sized (node rs (node rls nil rlx rlr) rx nil)\nthis : size nil = 0 ∧ size rlr = 0\n⊢ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx) =\n    if 0 + (rls + 1) ≤ 1 then node' nil x (node' (node rls nil rlx rlr) rx nil)\n    else\n      if rls + 1 > 0 then rotateL nil x (node' (node rls nil rlx rlr) rx nil)\n      else\n        if 0 > delta * (rls + 1) then rotateR nil x (node' (node rls nil rlx rlr) rx nil)\n        else node' nil x (node' (node rls nil rlx rlr) rx nil)\n[PROOFSTEP]\ncases sr.2.1.2.2.size_eq_zero.1 this.2\n[GOAL]\ncase nil.node.node.nil.refl.refl\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrlx : α\nhr : Balanced (node' (node rls nil rlx nil) rx nil)\nsr : Sized (node rs (node rls nil rlx nil) rx nil)\nthis : size nil = 0 ∧ size nil = 0\n⊢ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx) =\n    if 0 + (rls + 1) ≤ 1 then node' nil x (node' (node rls nil rlx nil) rx nil)\n    else\n      if rls + 1 > 0 then rotateL nil x (node' (node rls nil rlx nil) rx nil)\n      else\n        if 0 > delta * (rls + 1) then rotateR nil x (node' (node rls nil rlx nil) rx nil)\n        else node' nil x (node' (node rls nil rlx nil) rx nil)\n[PROOFSTEP]\nobtain rfl : rls = 1 := sr.2.1.1\n[GOAL]\ncase nil.node.node.nil.refl.refl\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rlx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' (node 1 nil rlx nil) rx nil)\nsr : Sized (node rs (node 1 nil rlx nil) rx nil)\n⊢ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx) =\n    if 0 + (1 + 1) ≤ 1 then node' nil x (node' (node 1 nil rlx nil) rx nil)\n    else\n      if 1 + 1 > 0 then rotateL nil x (node' (node 1 nil rlx nil) rx nil)\n      else\n        if 0 > delta * (1 + 1) then rotateR nil x (node' (node 1 nil rlx nil) rx nil)\n        else node' nil x (node' (node 1 nil rlx nil) rx nil)\n[PROOFSTEP]\nrw [if_neg, if_pos, rotateL, if_neg]\n[GOAL]\ncase nil.node.node.nil.refl.refl\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rlx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' (node 1 nil rlx nil) rx nil)\nsr : Sized (node rs (node 1 nil rlx nil) rx nil)\n⊢ node 3 (Ordnode.singleton x) rlx (Ordnode.singleton rx) = node4L nil x (node 1 nil rlx nil) rx nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase nil.node.node.nil.refl.refl.hnc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rlx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' (node 1 nil rlx nil) rx nil)\nsr : Sized (node rs (node 1 nil rlx nil) rx nil)\n⊢ ¬size (node 1 nil rlx nil) < ratio * size nil\ncase nil.node.node.nil.refl.refl.hc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rlx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' (node 1 nil rlx nil) rx nil)\nsr : Sized (node rs (node 1 nil rlx nil) rx nil)\n⊢ 1 + 1 > 0\ncase nil.node.node.nil.refl.refl.hnc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rlx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' (node 1 nil rlx nil) rx nil)\nsr : Sized (node rs (node 1 nil rlx nil) rx nil)\n⊢ ¬0 + (1 + 1) ≤ 1\n[PROOFSTEP]\nall_goals dsimp only [size]; decide\n[GOAL]\ncase nil.node.node.nil.refl.refl.hnc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rlx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' (node 1 nil rlx nil) rx nil)\nsr : Sized (node rs (node 1 nil rlx nil) rx nil)\n⊢ ¬size (node 1 nil rlx nil) < ratio * size nil\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase nil.node.node.nil.refl.refl.hnc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rlx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' (node 1 nil rlx nil) rx nil)\nsr : Sized (node rs (node 1 nil rlx nil) rx nil)\n⊢ ¬1 < ratio * 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase nil.node.node.nil.refl.refl.hc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rlx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' (node 1 nil rlx nil) rx nil)\nsr : Sized (node rs (node 1 nil rlx nil) rx nil)\n⊢ 1 + 1 > 0\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase nil.node.node.nil.refl.refl.hc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rlx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' (node 1 nil rlx nil) rx nil)\nsr : Sized (node rs (node 1 nil rlx nil) rx nil)\n⊢ 1 + 1 > 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase nil.node.node.nil.refl.refl.hnc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rlx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' (node 1 nil rlx nil) rx nil)\nsr : Sized (node rs (node 1 nil rlx nil) rx nil)\n⊢ ¬0 + (1 + 1) ≤ 1\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase nil.node.node.nil.refl.refl.hnc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx rlx : α\nthis : size nil = 0 ∧ size nil = 0\nhr : Balanced (node' (node 1 nil rlx nil) rx nil)\nsr : Sized (node rs (node 1 nil rlx nil) rx nil)\n⊢ ¬0 + (1 + 1) ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase nil.node.node.node\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n⊢ (if rls < ratio * rrs then\n      node (rls + rrs + 1 + 1) (node (rls + 1) nil x (node rls rll rlx rlr)) rx (node rrs rrl rrx rrr)\n    else\n      node (rls + rrs + 1 + 1) (node (size rll + 1) nil x rll) rlx\n        (node (size rlr + rrs + 1) rlr rx (node rrs rrl rrx rrr))) =\n    if 0 + (rls + rrs + 1) ≤ 1 then node' nil x (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n    else\n      if rls + rrs + 1 > 0 then rotateL nil x (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n      else\n        if 0 > delta * (rls + rrs + 1) then rotateR nil x (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n        else node' nil x (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n[PROOFSTEP]\nsymm\n[GOAL]\ncase nil.node.node.node\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n⊢ (if 0 + (rls + rrs + 1) ≤ 1 then node' nil x (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n    else\n      if rls + rrs + 1 > 0 then rotateL nil x (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n      else\n        if 0 > delta * (rls + rrs + 1) then rotateR nil x (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n        else node' nil x (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))) =\n    if rls < ratio * rrs then\n      node (rls + rrs + 1 + 1) (node (rls + 1) nil x (node rls rll rlx rlr)) rx (node rrs rrl rrx rrr)\n    else\n      node (rls + rrs + 1 + 1) (node (size rll + 1) nil x rll) rlx\n        (node (size rlr + rrs + 1) rlr rx (node rrs rrl rrx rrr))\n[PROOFSTEP]\nrw [zero_add, if_neg, if_pos, rotateL]\n[GOAL]\ncase nil.node.node.node\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n⊢ (if size (node rls rll rlx rlr) < ratio * size (node rrs rrl rrx rrr) then\n      node3L nil x (node rls rll rlx rlr) rx (node rrs rrl rrx rrr)\n    else node4L nil x (node rls rll rlx rlr) rx (node rrs rrl rrx rrr)) =\n    if rls < ratio * rrs then\n      node (rls + rrs + 1 + 1) (node (rls + 1) nil x (node rls rll rlx rlr)) rx (node rrs rrl rrx rrr)\n    else\n      node (rls + rrs + 1 + 1) (node (size rll + 1) nil x rll) rlx\n        (node (size rlr + rrs + 1) rlr rx (node rrs rrl rrx rrr))\n[PROOFSTEP]\ndsimp only [size_node]\n[GOAL]\ncase nil.node.node.node\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n⊢ (if rls < ratio * rrs then node3L nil x (node rls rll rlx rlr) rx (node rrs rrl rrx rrr)\n    else node4L nil x (node rls rll rlx rlr) rx (node rrs rrl rrx rrr)) =\n    if rls < ratio * rrs then\n      node (rls + rrs + 1 + 1) (node (rls + 1) nil x (node rls rll rlx rlr)) rx (node rrs rrl rrx rrr)\n    else\n      node (rls + rrs + 1 + 1) (node (size rll + 1) nil x rll) rlx\n        (node (size rlr + rrs + 1) rlr rx (node rrs rrl rrx rrr))\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nh✝ : rls < ratio * rrs\n⊢ node3L nil x (node rls rll rlx rlr) rx (node rrs rrl rrx rrr) =\n    node (rls + rrs + 1 + 1) (node (rls + 1) nil x (node rls rll rlx rlr)) rx (node rrs rrl rrx rrr)\n[PROOFSTEP]\nsimp [node3L, node']\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nh✝ : rls < ratio * rrs\n⊢ rls + 1 + rrs = rls + rrs + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nh✝ : rls < ratio * rrs\n⊢ rls + 1 + rrs = rls + rrs + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nh✝ : ¬rls < ratio * rrs\n⊢ node4L nil x (node rls rll rlx rlr) rx (node rrs rrl rrx rrr) =\n    node (rls + rrs + 1 + 1) (node (size rll + 1) nil x rll) rlx\n      (node (size rlr + rrs + 1) rlr rx (node rrs rrl rrx rrr))\n[PROOFSTEP]\nsimp [node4L, node', sr.2.1.1]\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nh✝ : ¬rls < ratio * rrs\n⊢ size rll + 1 + (size rlr + rrs + 1) = size rll + size rlr + 1 + rrs + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nh✝ : ¬rls < ratio * rrs\n⊢ size rll + 1 + (size rlr + rrs + 1) = size rll + size rlr + 1 + rrs + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase nil.node.node.node.hc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n⊢ rls + rrs + 1 > 0\n[PROOFSTEP]\napply Nat.zero_lt_succ\n[GOAL]\ncase nil.node.node.node.hnc\nα : Type u_1\nx : α\nhl : Balanced nil\nsl : Sized nil\nrs : ℕ\nrx : α\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node' (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\n⊢ ¬rls + rrs + 1 ≤ 1\n[PROOFSTEP]\nexact not_le_of_gt (Nat.succ_lt_succ (add_pos sr.2.1.pos sr.2.2.pos))\n[GOAL]\ncase node\nα : Type u_1\nx : α\nr : Ordnode α\nhr : Balanced r\nsr : Sized r\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\n⊢ balance (node ls ll lx lr) x r = balance' (node ls ll lx lr) x r\n[PROOFSTEP]\ncases' r with rs rl rx rr\n[GOAL]\ncase node.nil\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nhr : Balanced nil\nsr : Sized nil\n⊢ balance (node ls ll lx lr) x nil = balance' (node ls ll lx lr) x nil\n[PROOFSTEP]\nrw [sl.eq_node'] at hl ⊢\n[GOAL]\ncase node.nil\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node' ll lx lr)\nsl : Sized (node ls ll lx lr)\nhr : Balanced nil\nsr : Sized nil\n⊢ balance (node' ll lx lr) x nil = balance' (node' ll lx lr) x nil\n[PROOFSTEP]\ncases' ll with lls lll llx llr\n[GOAL]\ncase node.nil.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlr : Ordnode α\nhr : Balanced nil\nsr : Sized nil\nhl : Balanced (node' nil lx lr)\nsl : Sized (node ls nil lx lr)\n⊢ balance (node' nil lx lr) x nil = balance' (node' nil lx lr) x nil\n[PROOFSTEP]\ncases' lr with lrs lrl lrx lrr\n[GOAL]\ncase node.nil.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlr : Ordnode α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx lr)\nsl : Sized (node ls (node lls lll llx llr) lx lr)\n⊢ balance (node' (node lls lll llx llr) lx lr) x nil = balance' (node' (node lls lll llx llr) lx lr) x nil\n[PROOFSTEP]\ncases' lr with lrs lrl lrx lrr\n[GOAL]\ncase node.nil.nil.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nhl : Balanced (node' nil lx nil)\nsl : Sized (node ls nil lx nil)\n⊢ balance (node' nil lx nil) x nil = balance' (node' nil lx nil) x nil\n[PROOFSTEP]\ndsimp [balance, balance']\n[GOAL]\ncase node.nil.nil.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' nil lx (node lrs lrl lrx lrr))\nsl : Sized (node ls nil lx (node lrs lrl lrx lrr))\n⊢ balance (node' nil lx (node lrs lrl lrx lrr)) x nil = balance' (node' nil lx (node lrs lrl lrx lrr)) x nil\n[PROOFSTEP]\ndsimp [balance, balance']\n[GOAL]\ncase node.nil.node.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx nil)\nsl : Sized (node ls (node lls lll llx llr) lx nil)\n⊢ balance (node' (node lls lll llx llr) lx nil) x nil = balance' (node' (node lls lll llx llr) lx nil) x nil\n[PROOFSTEP]\ndsimp [balance, balance']\n[GOAL]\ncase node.nil.node.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\n⊢ balance (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x nil =\n    balance' (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x nil\n[PROOFSTEP]\ndsimp [balance, balance']\n[GOAL]\ncase node.nil.nil.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nhl : Balanced (node' nil lx nil)\nsl : Sized (node ls nil lx nil)\n⊢ node 2 (node' nil lx nil) x nil =\n    if 1 ≤ 1 then node' (node' nil lx nil) x nil\n    else\n      if 0 > delta * (0 + 1) then rotateL (node' nil lx nil) x nil\n      else if 0 + 1 > 0 then rotateR (node' nil lx nil) x nil else node' (node' nil lx nil) x nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase node.nil.nil.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' nil lx (node lrs lrl lrx lrr))\nsl : Sized (node ls nil lx (node lrs lrl lrx lrr))\n⊢ node 3 (Ordnode.singleton lx) lrx (Ordnode.singleton x) =\n    if 0 + lrs + 1 ≤ 1 then node' (node' nil lx (node lrs lrl lrx lrr)) x nil\n    else\n      if 0 > delta * (0 + lrs + 1) then rotateL (node' nil lx (node lrs lrl lrx lrr)) x nil\n      else\n        if 0 + lrs + 1 > 0 then rotateR (node' nil lx (node lrs lrl lrx lrr)) x nil\n        else node' (node' nil lx (node lrs lrl lrx lrr)) x nil\n[PROOFSTEP]\nhave : size lrl = 0 ∧ size lrr = 0 := by\n  have := balancedSz_zero.1 hl.1.symm\n  rwa [size, sl.2.2.1, Nat.succ_le_succ_iff, le_zero_iff, add_eq_zero_iff] at this \n[GOAL]\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' nil lx (node lrs lrl lrx lrr))\nsl : Sized (node ls nil lx (node lrs lrl lrx lrr))\n⊢ size lrl = 0 ∧ size lrr = 0\n[PROOFSTEP]\nhave := balancedSz_zero.1 hl.1.symm\n[GOAL]\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' nil lx (node lrs lrl lrx lrr))\nsl : Sized (node ls nil lx (node lrs lrl lrx lrr))\nthis : size (node lrs lrl lrx lrr) ≤ 1\n⊢ size lrl = 0 ∧ size lrr = 0\n[PROOFSTEP]\nrwa [size, sl.2.2.1, Nat.succ_le_succ_iff, le_zero_iff, add_eq_zero_iff] at this \n[GOAL]\ncase node.nil.nil.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' nil lx (node lrs lrl lrx lrr))\nsl : Sized (node ls nil lx (node lrs lrl lrx lrr))\nthis : size lrl = 0 ∧ size lrr = 0\n⊢ node 3 (Ordnode.singleton lx) lrx (Ordnode.singleton x) =\n    if 0 + lrs + 1 ≤ 1 then node' (node' nil lx (node lrs lrl lrx lrr)) x nil\n    else\n      if 0 > delta * (0 + lrs + 1) then rotateL (node' nil lx (node lrs lrl lrx lrr)) x nil\n      else\n        if 0 + lrs + 1 > 0 then rotateR (node' nil lx (node lrs lrl lrx lrr)) x nil\n        else node' (node' nil lx (node lrs lrl lrx lrr)) x nil\n[PROOFSTEP]\ncases sl.2.2.2.1.size_eq_zero.1 this.1\n[GOAL]\ncase node.nil.nil.node.refl\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrs : ℕ\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' nil lx (node lrs nil lrx lrr))\nsl : Sized (node ls nil lx (node lrs nil lrx lrr))\nthis : size nil = 0 ∧ size lrr = 0\n⊢ node 3 (Ordnode.singleton lx) lrx (Ordnode.singleton x) =\n    if 0 + lrs + 1 ≤ 1 then node' (node' nil lx (node lrs nil lrx lrr)) x nil\n    else\n      if 0 > delta * (0 + lrs + 1) then rotateL (node' nil lx (node lrs nil lrx lrr)) x nil\n      else\n        if 0 + lrs + 1 > 0 then rotateR (node' nil lx (node lrs nil lrx lrr)) x nil\n        else node' (node' nil lx (node lrs nil lrx lrr)) x nil\n[PROOFSTEP]\ncases sl.2.2.2.2.size_eq_zero.1 this.2\n[GOAL]\ncase node.nil.nil.node.refl.refl\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrs : ℕ\nlrx : α\nhl : Balanced (node' nil lx (node lrs nil lrx nil))\nsl : Sized (node ls nil lx (node lrs nil lrx nil))\nthis : size nil = 0 ∧ size nil = 0\n⊢ node 3 (Ordnode.singleton lx) lrx (Ordnode.singleton x) =\n    if 0 + lrs + 1 ≤ 1 then node' (node' nil lx (node lrs nil lrx nil)) x nil\n    else\n      if 0 > delta * (0 + lrs + 1) then rotateL (node' nil lx (node lrs nil lrx nil)) x nil\n      else\n        if 0 + lrs + 1 > 0 then rotateR (node' nil lx (node lrs nil lrx nil)) x nil\n        else node' (node' nil lx (node lrs nil lrx nil)) x nil\n[PROOFSTEP]\nobtain rfl : lrs = 1 := sl.2.2.1\n[GOAL]\ncase node.nil.nil.node.refl.refl\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ node 3 (Ordnode.singleton lx) lrx (Ordnode.singleton x) =\n    if 0 + 1 + 1 ≤ 1 then node' (node' nil lx (node 1 nil lrx nil)) x nil\n    else\n      if 0 > delta * (0 + 1 + 1) then rotateL (node' nil lx (node 1 nil lrx nil)) x nil\n      else\n        if 0 + 1 + 1 > 0 then rotateR (node' nil lx (node 1 nil lrx nil)) x nil\n        else node' (node' nil lx (node 1 nil lrx nil)) x nil\n[PROOFSTEP]\nrw [if_neg, if_neg, if_pos, rotateR, if_neg]\n[GOAL]\ncase node.nil.nil.node.refl.refl\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ node 3 (Ordnode.singleton lx) lrx (Ordnode.singleton x) = node4R nil lx (node 1 nil lrx nil) x nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase node.nil.nil.node.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ ¬size (node 1 nil lrx nil) < ratio * size nil\ncase node.nil.nil.node.refl.refl.hc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ 0 + 1 + 1 > 0\ncase node.nil.nil.node.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ ¬0 > delta * (0 + 1 + 1)\ncase node.nil.nil.node.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ ¬0 + 1 + 1 ≤ 1\n[PROOFSTEP]\nall_goals dsimp only [size]; decide\n[GOAL]\ncase node.nil.nil.node.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ ¬size (node 1 nil lrx nil) < ratio * size nil\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase node.nil.nil.node.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ ¬1 < ratio * 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase node.nil.nil.node.refl.refl.hc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ 0 + 1 + 1 > 0\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase node.nil.nil.node.refl.refl.hc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ 0 + 1 + 1 > 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase node.nil.nil.node.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ ¬0 > delta * (0 + 1 + 1)\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase node.nil.nil.node.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ ¬0 > delta * (0 + 1 + 1)\n[PROOFSTEP]\ndecide\n[GOAL]\ncase node.nil.nil.node.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ ¬0 + 1 + 1 ≤ 1\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase node.nil.nil.node.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlrx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' nil lx (node 1 nil lrx nil))\nsl : Sized (node ls nil lx (node 1 nil lrx nil))\n⊢ ¬0 + 1 + 1 ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase node.nil.node.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx nil)\nsl : Sized (node ls (node lls lll llx llr) lx nil)\n⊢ node 3 (node lls lll llx llr) lx (Ordnode.singleton x) =\n    if lls + 1 ≤ 1 then node' (node' (node lls lll llx llr) lx nil) x nil\n    else\n      if 0 > delta * (lls + 1) then rotateL (node' (node lls lll llx llr) lx nil) x nil\n      else\n        if lls + 1 > 0 then rotateR (node' (node lls lll llx llr) lx nil) x nil\n        else node' (node' (node lls lll llx llr) lx nil) x nil\n[PROOFSTEP]\nhave : size lll = 0 ∧ size llr = 0 := by\n  have := balancedSz_zero.1 hl.1\n  rwa [size, sl.2.1.1, Nat.succ_le_succ_iff, le_zero_iff, add_eq_zero_iff] at this \n[GOAL]\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx nil)\nsl : Sized (node ls (node lls lll llx llr) lx nil)\n⊢ size lll = 0 ∧ size llr = 0\n[PROOFSTEP]\nhave := balancedSz_zero.1 hl.1\n[GOAL]\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx nil)\nsl : Sized (node ls (node lls lll llx llr) lx nil)\nthis : size (node lls lll llx llr) ≤ 1\n⊢ size lll = 0 ∧ size llr = 0\n[PROOFSTEP]\nrwa [size, sl.2.1.1, Nat.succ_le_succ_iff, le_zero_iff, add_eq_zero_iff] at this \n[GOAL]\ncase node.nil.node.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx nil)\nsl : Sized (node ls (node lls lll llx llr) lx nil)\nthis : size lll = 0 ∧ size llr = 0\n⊢ node 3 (node lls lll llx llr) lx (Ordnode.singleton x) =\n    if lls + 1 ≤ 1 then node' (node' (node lls lll llx llr) lx nil) x nil\n    else\n      if 0 > delta * (lls + 1) then rotateL (node' (node lls lll llx llr) lx nil) x nil\n      else\n        if lls + 1 > 0 then rotateR (node' (node lls lll llx llr) lx nil) x nil\n        else node' (node' (node lls lll llx llr) lx nil) x nil\n[PROOFSTEP]\ncases sl.2.1.2.1.size_eq_zero.1 this.1\n[GOAL]\ncase node.nil.node.nil.refl\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nllx : α\nllr : Ordnode α\nhl : Balanced (node' (node lls nil llx llr) lx nil)\nsl : Sized (node ls (node lls nil llx llr) lx nil)\nthis : size nil = 0 ∧ size llr = 0\n⊢ node 3 (node lls nil llx llr) lx (Ordnode.singleton x) =\n    if lls + 1 ≤ 1 then node' (node' (node lls nil llx llr) lx nil) x nil\n    else\n      if 0 > delta * (lls + 1) then rotateL (node' (node lls nil llx llr) lx nil) x nil\n      else\n        if lls + 1 > 0 then rotateR (node' (node lls nil llx llr) lx nil) x nil\n        else node' (node' (node lls nil llx llr) lx nil) x nil\n[PROOFSTEP]\ncases sl.2.1.2.2.size_eq_zero.1 this.2\n[GOAL]\ncase node.nil.node.nil.refl.refl\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nllx : α\nhl : Balanced (node' (node lls nil llx nil) lx nil)\nsl : Sized (node ls (node lls nil llx nil) lx nil)\nthis : size nil = 0 ∧ size nil = 0\n⊢ node 3 (node lls nil llx nil) lx (Ordnode.singleton x) =\n    if lls + 1 ≤ 1 then node' (node' (node lls nil llx nil) lx nil) x nil\n    else\n      if 0 > delta * (lls + 1) then rotateL (node' (node lls nil llx nil) lx nil) x nil\n      else\n        if lls + 1 > 0 then rotateR (node' (node lls nil llx nil) lx nil) x nil\n        else node' (node' (node lls nil llx nil) lx nil) x nil\n[PROOFSTEP]\nobtain rfl : lls = 1 := sl.2.1.1\n[GOAL]\ncase node.nil.node.nil.refl.refl\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ node 3 (node 1 nil llx nil) lx (Ordnode.singleton x) =\n    if 1 + 1 ≤ 1 then node' (node' (node 1 nil llx nil) lx nil) x nil\n    else\n      if 0 > delta * (1 + 1) then rotateL (node' (node 1 nil llx nil) lx nil) x nil\n      else\n        if 1 + 1 > 0 then rotateR (node' (node 1 nil llx nil) lx nil) x nil\n        else node' (node' (node 1 nil llx nil) lx nil) x nil\n[PROOFSTEP]\nrw [if_neg, if_neg, if_pos, rotateR, if_pos]\n[GOAL]\ncase node.nil.node.nil.refl.refl\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ node 3 (node 1 nil llx nil) lx (Ordnode.singleton x) = node3R (node 1 nil llx nil) lx nil x nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase node.nil.node.nil.refl.refl.hc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ size nil < ratio * size (node 1 nil llx nil)\ncase node.nil.node.nil.refl.refl.hc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ 1 + 1 > 0\ncase node.nil.node.nil.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ ¬0 > delta * (1 + 1)\ncase node.nil.node.nil.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ ¬1 + 1 ≤ 1\n[PROOFSTEP]\nall_goals dsimp only [size]; decide\n[GOAL]\ncase node.nil.node.nil.refl.refl.hc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ size nil < ratio * size (node 1 nil llx nil)\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase node.nil.node.nil.refl.refl.hc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ 0 < ratio * 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase node.nil.node.nil.refl.refl.hc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ 1 + 1 > 0\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase node.nil.node.nil.refl.refl.hc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ 1 + 1 > 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase node.nil.node.nil.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ ¬0 > delta * (1 + 1)\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase node.nil.node.nil.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ ¬0 > delta * (1 + 1)\n[PROOFSTEP]\ndecide\n[GOAL]\ncase node.nil.node.nil.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ ¬1 + 1 ≤ 1\n[PROOFSTEP]\ndsimp only [size]\n[GOAL]\ncase node.nil.node.nil.refl.refl.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nllx : α\nthis : size nil = 0 ∧ size nil = 0\nhl : Balanced (node' (node 1 nil llx nil) lx nil)\nsl : Sized (node ls (node 1 nil llx nil) lx nil)\n⊢ ¬1 + 1 ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase node.nil.node.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\n⊢ (if lrs < ratio * lls then\n      node (lls + lrs + 1 + 1) (node lls lll llx llr) lx (node (lrs + 1) (node lrs lrl lrx lrr) x nil)\n    else\n      node (lls + lrs + 1 + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx\n        (node (size lrr + 1) lrr x nil)) =\n    if lls + lrs + 1 ≤ 1 then node' (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x nil\n    else\n      if 0 > delta * (lls + lrs + 1) then rotateL (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x nil\n      else\n        if lls + lrs + 1 > 0 then rotateR (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x nil\n        else node' (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x nil\n[PROOFSTEP]\nsymm\n[GOAL]\ncase node.nil.node.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\n⊢ (if lls + lrs + 1 ≤ 1 then node' (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x nil\n    else\n      if 0 > delta * (lls + lrs + 1) then rotateL (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x nil\n      else\n        if lls + lrs + 1 > 0 then rotateR (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x nil\n        else node' (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x nil) =\n    if lrs < ratio * lls then\n      node (lls + lrs + 1 + 1) (node lls lll llx llr) lx (node (lrs + 1) (node lrs lrl lrx lrr) x nil)\n    else\n      node (lls + lrs + 1 + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx\n        (node (size lrr + 1) lrr x nil)\n[PROOFSTEP]\nrw [if_neg, if_neg, if_pos, rotateR]\n[GOAL]\ncase node.nil.node.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\n⊢ (if size (node lrs lrl lrx lrr) < ratio * size (node lls lll llx llr) then\n      node3R (node lls lll llx llr) lx (node lrs lrl lrx lrr) x nil\n    else node4R (node lls lll llx llr) lx (node lrs lrl lrx lrr) x nil) =\n    if lrs < ratio * lls then\n      node (lls + lrs + 1 + 1) (node lls lll llx llr) lx (node (lrs + 1) (node lrs lrl lrx lrr) x nil)\n    else\n      node (lls + lrs + 1 + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx\n        (node (size lrr + 1) lrr x nil)\n[PROOFSTEP]\ndsimp only [size_node]\n[GOAL]\ncase node.nil.node.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\n⊢ (if lrs < ratio * lls then node3R (node lls lll llx llr) lx (node lrs lrl lrx lrr) x nil\n    else node4R (node lls lll llx llr) lx (node lrs lrl lrx lrr) x nil) =\n    if lrs < ratio * lls then\n      node (lls + lrs + 1 + 1) (node lls lll llx llr) lx (node (lrs + 1) (node lrs lrl lrx lrr) x nil)\n    else\n      node (lls + lrs + 1 + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx\n        (node (size lrr + 1) lrr x nil)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nh✝ : lrs < ratio * lls\n⊢ node3R (node lls lll llx llr) lx (node lrs lrl lrx lrr) x nil =\n    node (lls + lrs + 1 + 1) (node lls lll llx llr) lx (node (lrs + 1) (node lrs lrl lrx lrr) x nil)\n[PROOFSTEP]\nsimp [node3R, node']\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nh✝ : lrs < ratio * lls\n⊢ lls + (lrs + 1) = lls + lrs + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nh✝ : lrs < ratio * lls\n⊢ lls + (lrs + 1) = lls + lrs + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nh✝ : ¬lrs < ratio * lls\n⊢ node4R (node lls lll llx llr) lx (node lrs lrl lrx lrr) x nil =\n    node (lls + lrs + 1 + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx\n      (node (size lrr + 1) lrr x nil)\n[PROOFSTEP]\nsimp [node4R, node', sl.2.2.1]\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nh✝ : ¬lrs < ratio * lls\n⊢ lls + size lrl + 1 + (size lrr + 1) = lls + (size lrl + size lrr + 1) + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nh✝ : ¬lrs < ratio * lls\n⊢ lls + size lrl + 1 + (size lrr + 1) = lls + (size lrl + size lrr + 1) + 1\n[PROOFSTEP]\nabel\n[GOAL]\ncase node.nil.node.node.hc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\n⊢ lls + lrs + 1 > 0\n[PROOFSTEP]\napply Nat.zero_lt_succ\n[GOAL]\ncase node.nil.node.node.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\n⊢ ¬0 > delta * (lls + lrs + 1)\n[PROOFSTEP]\napply Nat.not_lt_zero\n[GOAL]\ncase node.nil.node.node.hnc\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nhr : Balanced nil\nsr : Sized nil\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node' (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\n⊢ ¬lls + lrs + 1 ≤ 1\n[PROOFSTEP]\nexact not_le_of_gt (Nat.succ_lt_succ (add_pos sl.2.1.pos sl.2.2.pos))\n[GOAL]\ncase node.node\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\n⊢ balance (node ls ll lx lr) x (node rs rl rx rr) = balance' (node ls ll lx lr) x (node rs rl rx rr)\n[PROOFSTEP]\nsimp [balance, balance']\n[GOAL]\ncase node.node\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\n⊢ (if delta * ls < rs then\n      rec (motive := fun t => rl = t → Ordnode α) (fun h => nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          rec (motive := fun t => rr = t → Ordnode α) (fun h => nil)\n            (fun size_1 l_1 x_2 r_1 l_ih r_ih h =>\n              if size < ratio * size_1 then node (ls + rs + 1) (node (ls + size + 1) (node ls ll lx lr) x rl) rx rr\n              else\n                node (ls + rs + 1) (node (ls + Ordnode.size l + 1) (node ls ll lx lr) x l) x_1\n                  (node (Ordnode.size r + size_1 + 1) r rx rr))\n            rr (_ : id rr = id rr))\n        rl (_ : id rl = id rl)\n    else\n      if delta * rs < ls then\n        rec (motive := fun t => ll = t → Ordnode α) (fun h => nil)\n          (fun size l x_1 r l_ih r_ih h =>\n            rec (motive := fun t => lr = t → Ordnode α) (fun h => nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                if size_1 < ratio * size then node (ls + rs + 1) ll lx (node (size_1 + rs + 1) lr x (node rs rl rx rr))\n                else\n                  node (ls + rs + 1) (node (size + Ordnode.size l + 1) ll lx l) x_2\n                    (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              lr (_ : id lr = id lr))\n          ll (_ : id ll = id ll)\n      else node (ls + rs + 1) (node ls ll lx lr) x (node rs rl rx rr)) =\n    if ls + rs ≤ 1 then node' (node ls ll lx lr) x (node rs rl rx rr)\n    else\n      if delta * ls < rs then rotateL (node ls ll lx lr) x (node rs rl rx rr)\n      else\n        if delta * rs < ls then rotateR (node ls ll lx lr) x (node rs rl rx rr)\n        else node' (node ls ll lx lr) x (node rs rl rx rr)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase node.node\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\n⊢ (if ls + rs ≤ 1 then node' (node ls ll lx lr) x (node rs rl rx rr)\n    else\n      if delta * ls < rs then rotateL (node ls ll lx lr) x (node rs rl rx rr)\n      else\n        if delta * rs < ls then rotateR (node ls ll lx lr) x (node rs rl rx rr)\n        else node' (node ls ll lx lr) x (node rs rl rx rr)) =\n    if delta * ls < rs then\n      rec (motive := fun t => rl = t → Ordnode α) (fun h => nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          rec (motive := fun t => rr = t → Ordnode α) (fun h => nil)\n            (fun size_1 l_1 x_2 r_1 l_ih r_ih h =>\n              if size < ratio * size_1 then node (ls + rs + 1) (node (ls + size + 1) (node ls ll lx lr) x rl) rx rr\n              else\n                node (ls + rs + 1) (node (ls + Ordnode.size l + 1) (node ls ll lx lr) x l) x_1\n                  (node (Ordnode.size r + size_1 + 1) r rx rr))\n            rr (_ : id rr = id rr))\n        rl (_ : id rl = id rl)\n    else\n      if delta * rs < ls then\n        rec (motive := fun t => ll = t → Ordnode α) (fun h => nil)\n          (fun size l x_1 r l_ih r_ih h =>\n            rec (motive := fun t => lr = t → Ordnode α) (fun h => nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                if size_1 < ratio * size then node (ls + rs + 1) ll lx (node (size_1 + rs + 1) lr x (node rs rl rx rr))\n                else\n                  node (ls + rs + 1) (node (size + Ordnode.size l + 1) ll lx l) x_2\n                    (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              lr (_ : id lr = id lr))\n          ll (_ : id ll = id ll)\n      else node (ls + rs + 1) (node ls ll lx lr) x (node rs rl rx rr)\n[PROOFSTEP]\nrw [if_neg]\n[GOAL]\ncase node.node\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\n⊢ (if delta * ls < rs then rotateL (node ls ll lx lr) x (node rs rl rx rr)\n    else\n      if delta * rs < ls then rotateR (node ls ll lx lr) x (node rs rl rx rr)\n      else node' (node ls ll lx lr) x (node rs rl rx rr)) =\n    if delta * ls < rs then\n      rec (motive := fun t => rl = t → Ordnode α) (fun h => nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          rec (motive := fun t => rr = t → Ordnode α) (fun h => nil)\n            (fun size_1 l_1 x_2 r_1 l_ih r_ih h =>\n              if size < ratio * size_1 then node (ls + rs + 1) (node (ls + size + 1) (node ls ll lx lr) x rl) rx rr\n              else\n                node (ls + rs + 1) (node (ls + Ordnode.size l + 1) (node ls ll lx lr) x l) x_1\n                  (node (Ordnode.size r + size_1 + 1) r rx rr))\n            rr (_ : id rr = id rr))\n        rl (_ : id rl = id rl)\n    else\n      if delta * rs < ls then\n        rec (motive := fun t => ll = t → Ordnode α) (fun h => nil)\n          (fun size l x_1 r l_ih r_ih h =>\n            rec (motive := fun t => lr = t → Ordnode α) (fun h => nil)\n              (fun size_1 l x_2 r l_ih r_ih h =>\n                if size_1 < ratio * size then node (ls + rs + 1) ll lx (node (size_1 + rs + 1) lr x (node rs rl rx rr))\n                else\n                  node (ls + rs + 1) (node (size + Ordnode.size l + 1) ll lx l) x_2\n                    (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n              lr (_ : id lr = id lr))\n          ll (_ : id ll = id ll)\n      else node (ls + rs + 1) (node ls ll lx lr) x (node rs rl rx rr)\n[PROOFSTEP]\nsplit_ifs with h h_1\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : delta * ls < rs\n⊢ rotateL (node ls ll lx lr) x (node rs rl rx rr) =\n    rec (motive := fun t => rl = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => rr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l_1 x_2 r_1 l_ih r_ih h =>\n            if size < ratio * size_1 then node (ls + rs + 1) (node (ls + size + 1) (node ls ll lx lr) x rl) rx rr\n            else\n              node (ls + rs + 1) (node (ls + Ordnode.size l + 1) (node ls ll lx lr) x l) x_1\n                (node (Ordnode.size r + size_1 + 1) r rx rr))\n          rr (_ : id rr = id rr))\n      rl (_ : id rl = id rl)\n[PROOFSTEP]\nhave rd : delta ≤ size rl + size rr :=\n  by\n  have := lt_of_le_of_lt (Nat.mul_le_mul_left _ sl.pos) h\n  rwa [sr.1, Nat.lt_succ_iff] at this \n[GOAL]\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : delta * ls < rs\n⊢ delta ≤ size rl + size rr\n[PROOFSTEP]\nhave := lt_of_le_of_lt (Nat.mul_le_mul_left _ sl.pos) h\n[GOAL]\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : delta * ls < rs\nthis : delta * Nat.succ 0 < rs\n⊢ delta ≤ size rl + size rr\n[PROOFSTEP]\nrwa [sr.1, Nat.lt_succ_iff] at this \n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : delta * ls < rs\nrd : delta ≤ size rl + size rr\n⊢ rotateL (node ls ll lx lr) x (node rs rl rx rr) =\n    rec (motive := fun t => rl = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => rr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l_1 x_2 r_1 l_ih r_ih h =>\n            if size < ratio * size_1 then node (ls + rs + 1) (node (ls + size + 1) (node ls ll lx lr) x rl) rx rr\n            else\n              node (ls + rs + 1) (node (ls + Ordnode.size l + 1) (node ls ll lx lr) x l) x_1\n                (node (Ordnode.size r + size_1 + 1) r rx rr))\n          rr (_ : id rr = id rr))\n      rl (_ : id rl = id rl)\n[PROOFSTEP]\ncases' rl with rls rll rlx rlr\n[GOAL]\ncase pos.nil\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nrr : Ordnode α\nh : delta * ls < rs\nhr : Balanced (node rs nil rx rr)\nsr : Sized (node rs nil rx rr)\nrd : delta ≤ size nil + size rr\n⊢ rotateL (node ls ll lx lr) x (node rs nil rx rr) =\n    rec (motive := fun t => nil = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => rr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l_1 x_2 r_1 l_ih r_ih h =>\n            if size < ratio * size_1 then node (ls + rs + 1) (node (ls + size + 1) (node ls ll lx lr) x nil) rx rr\n            else\n              node (ls + rs + 1) (node (ls + Ordnode.size l + 1) (node ls ll lx lr) x l) x_1\n                (node (Ordnode.size r + size_1 + 1) r rx rr))\n          rr (_ : id rr = id rr))\n      nil (_ : id nil = id nil)\n[PROOFSTEP]\nrw [size, zero_add] at rd \n[GOAL]\ncase pos.nil\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nrr : Ordnode α\nh : delta * ls < rs\nhr : Balanced (node rs nil rx rr)\nsr : Sized (node rs nil rx rr)\nrd : delta ≤ size rr\n⊢ rotateL (node ls ll lx lr) x (node rs nil rx rr) =\n    rec (motive := fun t => nil = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => rr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l_1 x_2 r_1 l_ih r_ih h =>\n            if size < ratio * size_1 then node (ls + rs + 1) (node (ls + size + 1) (node ls ll lx lr) x nil) rx rr\n            else\n              node (ls + rs + 1) (node (ls + Ordnode.size l + 1) (node ls ll lx lr) x l) x_1\n                (node (Ordnode.size r + size_1 + 1) r rx rr))\n          rr (_ : id rr = id rr))\n      nil (_ : id nil = id nil)\n[PROOFSTEP]\nexact absurd (le_trans rd (balancedSz_zero.1 hr.1.symm)) (by decide)\n[GOAL]\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nrr : Ordnode α\nh : delta * ls < rs\nhr : Balanced (node rs nil rx rr)\nsr : Sized (node rs nil rx rr)\nrd : delta ≤ size rr\n⊢ ¬delta ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos.node\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nrr : Ordnode α\nh : delta * ls < rs\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nhr : Balanced (node rs (node rls rll rlx rlr) rx rr)\nsr : Sized (node rs (node rls rll rlx rlr) rx rr)\nrd : delta ≤ size (node rls rll rlx rlr) + size rr\n⊢ rotateL (node ls ll lx lr) x (node rs (node rls rll rlx rlr) rx rr) =\n    rec (motive := fun t => node rls rll rlx rlr = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => rr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l_1 x_2 r_1 l_ih r_ih h =>\n            if size < ratio * size_1 then\n              node (ls + rs + 1) (node (ls + size + 1) (node ls ll lx lr) x (node rls rll rlx rlr)) rx rr\n            else\n              node (ls + rs + 1) (node (ls + Ordnode.size l + 1) (node ls ll lx lr) x l) x_1\n                (node (Ordnode.size r + size_1 + 1) r rx rr))\n          rr (_ : id rr = id rr))\n      (node rls rll rlx rlr) (_ : id (node rls rll rlx rlr) = id (node rls rll rlx rlr))\n[PROOFSTEP]\ncases' rr with rrs rrl rrx rrr\n[GOAL]\ncase pos.node.nil\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nh : delta * ls < rs\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nhr : Balanced (node rs (node rls rll rlx rlr) rx nil)\nsr : Sized (node rs (node rls rll rlx rlr) rx nil)\nrd : delta ≤ size (node rls rll rlx rlr) + size nil\n⊢ rotateL (node ls ll lx lr) x (node rs (node rls rll rlx rlr) rx nil) =\n    rec (motive := fun t => node rls rll rlx rlr = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => nil = t → Ordnode α) (fun h => nil)\n          (fun size_1 l_1 x_2 r_1 l_ih r_ih h =>\n            if size < ratio * size_1 then\n              node (ls + rs + 1) (node (ls + size + 1) (node ls ll lx lr) x (node rls rll rlx rlr)) rx nil\n            else\n              node (ls + rs + 1) (node (ls + Ordnode.size l + 1) (node ls ll lx lr) x l) x_1\n                (node (Ordnode.size r + size_1 + 1) r rx nil))\n          nil (_ : id nil = id nil))\n      (node rls rll rlx rlr) (_ : id (node rls rll rlx rlr) = id (node rls rll rlx rlr))\n[PROOFSTEP]\nexact absurd (le_trans rd (balancedSz_zero.1 hr.1)) (by decide)\n[GOAL]\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nh : delta * ls < rs\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nhr : Balanced (node rs (node rls rll rlx rlr) rx nil)\nsr : Sized (node rs (node rls rll rlx rlr) rx nil)\nrd : delta ≤ size (node rls rll rlx rlr) + size nil\n⊢ ¬delta ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos.node.node\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nh : delta * ls < rs\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nrd : delta ≤ size (node rls rll rlx rlr) + size (node rrs rrl rrx rrr)\n⊢ rotateL (node ls ll lx lr) x (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr)) =\n    rec (motive := fun t => node rls rll rlx rlr = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => node rrs rrl rrx rrr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l_1 x_2 r_1 l_ih r_ih h =>\n            if size < ratio * size_1 then\n              node (ls + rs + 1) (node (ls + size + 1) (node ls ll lx lr) x (node rls rll rlx rlr)) rx\n                (node rrs rrl rrx rrr)\n            else\n              node (ls + rs + 1) (node (ls + Ordnode.size l + 1) (node ls ll lx lr) x l) x_1\n                (node (Ordnode.size r + size_1 + 1) r rx (node rrs rrl rrx rrr)))\n          (node rrs rrl rrx rrr) (_ : id (node rrs rrl rrx rrr) = id (node rrs rrl rrx rrr)))\n      (node rls rll rlx rlr) (_ : id (node rls rll rlx rlr) = id (node rls rll rlx rlr))\n[PROOFSTEP]\ndsimp [rotateL]\n[GOAL]\ncase pos.node.node\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nh : delta * ls < rs\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nrd : delta ≤ size (node rls rll rlx rlr) + size (node rrs rrl rrx rrr)\n⊢ (if rls < ratio * rrs then node3L (node ls ll lx lr) x (node rls rll rlx rlr) rx (node rrs rrl rrx rrr)\n    else node4L (node ls ll lx lr) x (node rls rll rlx rlr) rx (node rrs rrl rrx rrr)) =\n    if rls < ratio * rrs then\n      node (ls + rs + 1) (node (ls + rls + 1) (node ls ll lx lr) x (node rls rll rlx rlr)) rx (node rrs rrl rrx rrr)\n    else\n      node (ls + rs + 1) (node (ls + size rll + 1) (node ls ll lx lr) x rll) rlx\n        (node (size rlr + rrs + 1) rlr rx (node rrs rrl rrx rrr))\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nh : delta * ls < rs\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nrd : delta ≤ size (node rls rll rlx rlr) + size (node rrs rrl rrx rrr)\nh✝ : rls < ratio * rrs\n⊢ node3L (node ls ll lx lr) x (node rls rll rlx rlr) rx (node rrs rrl rrx rrr) =\n    node (ls + rs + 1) (node (ls + rls + 1) (node ls ll lx lr) x (node rls rll rlx rlr)) rx (node rrs rrl rrx rrr)\n[PROOFSTEP]\nsimp [node3L, node', sr.1]\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nh : delta * ls < rs\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nrd : delta ≤ size (node rls rll rlx rlr) + size (node rrs rrl rrx rrr)\nh✝ : rls < ratio * rrs\n⊢ ls + rls + 1 + rrs = ls + (rls + rrs + 1)\n[PROOFSTEP]\nabel\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nh : delta * ls < rs\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nrd : delta ≤ size (node rls rll rlx rlr) + size (node rrs rrl rrx rrr)\nh✝ : rls < ratio * rrs\n⊢ ls + rls + 1 + rrs = ls + (rls + rrs + 1)\n[PROOFSTEP]\nabel\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nh : delta * ls < rs\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nrd : delta ≤ size (node rls rll rlx rlr) + size (node rrs rrl rrx rrr)\nh✝ : ¬rls < ratio * rrs\n⊢ node4L (node ls ll lx lr) x (node rls rll rlx rlr) rx (node rrs rrl rrx rrr) =\n    node (ls + rs + 1) (node (ls + size rll + 1) (node ls ll lx lr) x rll) rlx\n      (node (size rlr + rrs + 1) rlr rx (node rrs rrl rrx rrr))\n[PROOFSTEP]\nsimp [node4L, node', sr.1, sr.2.1.1]\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nh : delta * ls < rs\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nrd : delta ≤ size (node rls rll rlx rlr) + size (node rrs rrl rrx rrr)\nh✝ : ¬rls < ratio * rrs\n⊢ ls + size rll + 1 + (size rlr + rrs + 1) = ls + (size rll + size rlr + 1 + rrs + 1)\n[PROOFSTEP]\nabel\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrx : α\nh : delta * ls < rs\nrls : ℕ\nrll : Ordnode α\nrlx : α\nrlr : Ordnode α\nrrs : ℕ\nrrl : Ordnode α\nrrx : α\nrrr : Ordnode α\nhr : Balanced (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nsr : Sized (node rs (node rls rll rlx rlr) rx (node rrs rrl rrx rrr))\nrd : delta ≤ size (node rls rll rlx rlr) + size (node rrs rrl rrx rrr)\nh✝ : ¬rls < ratio * rrs\n⊢ ls + size rll + 1 + (size rlr + rrs + 1) = ls + (size rll + size rlr + 1 + rrs + 1)\n[PROOFSTEP]\nabel\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\n⊢ rotateR (node ls ll lx lr) x (node rs rl rx rr) =\n    rec (motive := fun t => ll = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => lr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l x_2 r l_ih r_ih h =>\n            if size_1 < ratio * size then node (ls + rs + 1) ll lx (node (size_1 + rs + 1) lr x (node rs rl rx rr))\n            else\n              node (ls + rs + 1) (node (size + Ordnode.size l + 1) ll lx l) x_2\n                (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n          lr (_ : id lr = id lr))\n      ll (_ : id ll = id ll)\n[PROOFSTEP]\nhave ld : delta ≤ size ll + size lr :=\n  by\n  have := lt_of_le_of_lt (Nat.mul_le_mul_left _ sr.pos) h_1\n  rwa [sl.1, Nat.lt_succ_iff] at this \n[GOAL]\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\n⊢ delta ≤ size ll + size lr\n[PROOFSTEP]\nhave := lt_of_le_of_lt (Nat.mul_le_mul_left _ sr.pos) h_1\n[GOAL]\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nthis : delta * Nat.succ 0 < ls\n⊢ delta ≤ size ll + size lr\n[PROOFSTEP]\nrwa [sl.1, Nat.lt_succ_iff] at this \n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nld : delta ≤ size ll + size lr\n⊢ rotateR (node ls ll lx lr) x (node rs rl rx rr) =\n    rec (motive := fun t => ll = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => lr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l x_2 r l_ih r_ih h =>\n            if size_1 < ratio * size then node (ls + rs + 1) ll lx (node (size_1 + rs + 1) lr x (node rs rl rx rr))\n            else\n              node (ls + rs + 1) (node (size + Ordnode.size l + 1) ll lx l) x_2\n                (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n          lr (_ : id lr = id lr))\n      ll (_ : id ll = id ll)\n[PROOFSTEP]\ncases' ll with lls lll llx llr\n[GOAL]\ncase pos.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nhl : Balanced (node ls nil lx lr)\nsl : Sized (node ls nil lx lr)\nld : delta ≤ size nil + size lr\n⊢ rotateR (node ls nil lx lr) x (node rs rl rx rr) =\n    rec (motive := fun t => nil = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => lr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l x_2 r l_ih r_ih h =>\n            if size_1 < ratio * size then node (ls + rs + 1) nil lx (node (size_1 + rs + 1) lr x (node rs rl rx rr))\n            else\n              node (ls + rs + 1) (node (size + Ordnode.size l + 1) nil lx l) x_2\n                (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n          lr (_ : id lr = id lr))\n      nil (_ : id nil = id nil)\n[PROOFSTEP]\nrw [size, zero_add] at ld \n[GOAL]\ncase pos.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nhl : Balanced (node ls nil lx lr)\nsl : Sized (node ls nil lx lr)\nld : delta ≤ size lr\n⊢ rotateR (node ls nil lx lr) x (node rs rl rx rr) =\n    rec (motive := fun t => nil = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => lr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l x_2 r l_ih r_ih h =>\n            if size_1 < ratio * size then node (ls + rs + 1) nil lx (node (size_1 + rs + 1) lr x (node rs rl rx rr))\n            else\n              node (ls + rs + 1) (node (size + Ordnode.size l + 1) nil lx l) x_2\n                (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n          lr (_ : id lr = id lr))\n      nil (_ : id nil = id nil)\n[PROOFSTEP]\nexact absurd (le_trans ld (balancedSz_zero.1 hl.1.symm)) (by decide)\n[GOAL]\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nhl : Balanced (node ls nil lx lr)\nsl : Sized (node ls nil lx lr)\nld : delta ≤ size lr\n⊢ ¬delta ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nhl : Balanced (node ls (node lls lll llx llr) lx lr)\nsl : Sized (node ls (node lls lll llx llr) lx lr)\nld : delta ≤ size (node lls lll llx llr) + size lr\n⊢ rotateR (node ls (node lls lll llx llr) lx lr) x (node rs rl rx rr) =\n    rec (motive := fun t => node lls lll llx llr = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => lr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l x_2 r l_ih r_ih h =>\n            if size_1 < ratio * size then\n              node (ls + rs + 1) (node lls lll llx llr) lx (node (size_1 + rs + 1) lr x (node rs rl rx rr))\n            else\n              node (ls + rs + 1) (node (size + Ordnode.size l + 1) (node lls lll llx llr) lx l) x_2\n                (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n          lr (_ : id lr = id lr))\n      (node lls lll llx llr) (_ : id (node lls lll llx llr) = id (node lls lll llx llr))\n[PROOFSTEP]\ncases' lr with lrs lrl lrx lrr\n[GOAL]\ncase pos.node.nil\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nhl : Balanced (node ls (node lls lll llx llr) lx nil)\nsl : Sized (node ls (node lls lll llx llr) lx nil)\nld : delta ≤ size (node lls lll llx llr) + size nil\n⊢ rotateR (node ls (node lls lll llx llr) lx nil) x (node rs rl rx rr) =\n    rec (motive := fun t => node lls lll llx llr = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => nil = t → Ordnode α) (fun h => nil)\n          (fun size_1 l x_2 r l_ih r_ih h =>\n            if size_1 < ratio * size then\n              node (ls + rs + 1) (node lls lll llx llr) lx (node (size_1 + rs + 1) nil x (node rs rl rx rr))\n            else\n              node (ls + rs + 1) (node (size + Ordnode.size l + 1) (node lls lll llx llr) lx l) x_2\n                (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n          nil (_ : id nil = id nil))\n      (node lls lll llx llr) (_ : id (node lls lll llx llr) = id (node lls lll llx llr))\n[PROOFSTEP]\nexact absurd (le_trans ld (balancedSz_zero.1 hl.1)) (by decide)\n[GOAL]\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nhl : Balanced (node ls (node lls lll llx llr) lx nil)\nsl : Sized (node ls (node lls lll llx llr) lx nil)\nld : delta ≤ size (node lls lll llx llr) + size nil\n⊢ ¬delta ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos.node.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nld : delta ≤ size (node lls lll llx llr) + size (node lrs lrl lrx lrr)\n⊢ rotateR (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr)) x (node rs rl rx rr) =\n    rec (motive := fun t => node lls lll llx llr = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => node lrs lrl lrx lrr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l x_2 r l_ih r_ih h =>\n            if size_1 < ratio * size then\n              node (ls + rs + 1) (node lls lll llx llr) lx\n                (node (size_1 + rs + 1) (node lrs lrl lrx lrr) x (node rs rl rx rr))\n            else\n              node (ls + rs + 1) (node (size + Ordnode.size l + 1) (node lls lll llx llr) lx l) x_2\n                (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n          (node lrs lrl lrx lrr) (_ : id (node lrs lrl lrx lrr) = id (node lrs lrl lrx lrr)))\n      (node lls lll llx llr) (_ : id (node lls lll llx llr) = id (node lls lll llx llr))\n[PROOFSTEP]\ndsimp [rotateR]\n[GOAL]\ncase pos.node.node\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nld : delta ≤ size (node lls lll llx llr) + size (node lrs lrl lrx lrr)\n⊢ (if lrs < ratio * lls then node3R (node lls lll llx llr) lx (node lrs lrl lrx lrr) x (node rs rl rx rr)\n    else node4R (node lls lll llx llr) lx (node lrs lrl lrx lrr) x (node rs rl rx rr)) =\n    if lrs < ratio * lls then\n      node (ls + rs + 1) (node lls lll llx llr) lx (node (lrs + rs + 1) (node lrs lrl lrx lrr) x (node rs rl rx rr))\n    else\n      node (ls + rs + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx\n        (node (size lrr + rs + 1) lrr x (node rs rl rx rr))\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nld : delta ≤ size (node lls lll llx llr) + size (node lrs lrl lrx lrr)\nh✝ : lrs < ratio * lls\n⊢ node3R (node lls lll llx llr) lx (node lrs lrl lrx lrr) x (node rs rl rx rr) =\n    node (ls + rs + 1) (node lls lll llx llr) lx (node (lrs + rs + 1) (node lrs lrl lrx lrr) x (node rs rl rx rr))\n[PROOFSTEP]\nsimp [node3R, node', sl.1]\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nld : delta ≤ size (node lls lll llx llr) + size (node lrs lrl lrx lrr)\nh✝ : lrs < ratio * lls\n⊢ lls + (lrs + rs + 1) = lls + lrs + 1 + rs\n[PROOFSTEP]\nabel\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nld : delta ≤ size (node lls lll llx llr) + size (node lrs lrl lrx lrr)\nh✝ : lrs < ratio * lls\n⊢ lls + (lrs + rs + 1) = lls + lrs + 1 + rs\n[PROOFSTEP]\nabel\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nld : delta ≤ size (node lls lll llx llr) + size (node lrs lrl lrx lrr)\nh✝ : ¬lrs < ratio * lls\n⊢ node4R (node lls lll llx llr) lx (node lrs lrl lrx lrr) x (node rs rl rx rr) =\n    node (ls + rs + 1) (node (lls + size lrl + 1) (node lls lll llx llr) lx lrl) lrx\n      (node (size lrr + rs + 1) lrr x (node rs rl rx rr))\n[PROOFSTEP]\nsimp [node4R, node', sl.1, sl.2.2.1]\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nld : delta ≤ size (node lls lll llx llr) + size (node lrs lrl lrx lrr)\nh✝ : ¬lrs < ratio * lls\n⊢ lls + size lrl + 1 + (size lrr + rs + 1) = lls + (size lrl + size lrr + 1) + 1 + rs\n[PROOFSTEP]\nabel\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nls : ℕ\nlx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nlls : ℕ\nlll : Ordnode α\nllx : α\nllr : Ordnode α\nlrs : ℕ\nlrl : Ordnode α\nlrx : α\nlrr : Ordnode α\nhl : Balanced (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nsl : Sized (node ls (node lls lll llx llr) lx (node lrs lrl lrx lrr))\nld : delta ≤ size (node lls lll llx llr) + size (node lrs lrl lrx lrr)\nh✝ : ¬lrs < ratio * lls\n⊢ lls + size lrl + 1 + (size lrr + rs + 1) = lls + (size lrl + size lrr + 1) + 1 + rs\n[PROOFSTEP]\nabel\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\nh : ¬delta * ls < rs\nh_1 : ¬delta * rs < ls\n⊢ node' (node ls ll lx lr) x (node rs rl rx rr) = node (ls + rs + 1) (node ls ll lx lr) x (node rs rl rx rr)\n[PROOFSTEP]\nsimp [node']\n[GOAL]\ncase node.node.hnc\nα : Type u_1\nx : α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Balanced (node ls ll lx lr)\nsl : Sized (node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Balanced (node rs rl rx rr)\nsr : Sized (node rs rl rx rr)\n⊢ ¬ls + rs ≤ 1\n[PROOFSTEP]\nexact not_le_of_gt (add_le_add (Nat.succ_le_of_lt sl.pos) (Nat.succ_le_of_lt sr.pos))\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nsl : Sized l\nsr : Sized r\nH1 : size l = 0 → size r ≤ 1\nH2 : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l\n⊢ balanceL l x r = balance l x r\n[PROOFSTEP]\ncases' r with rs rl rx rr\n[GOAL]\ncase nil\nα : Type u_1\nl : Ordnode α\nx : α\nsl : Sized l\nsr : Sized nil\nH1 : size l = 0 → size nil ≤ 1\nH2 : 1 ≤ size l → 1 ≤ size nil → size nil ≤ delta * size l\n⊢ balanceL l x nil = balance l x nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase node\nα : Type u_1\nl : Ordnode α\nx : α\nsl : Sized l\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nsr : Sized (node rs rl rx rr)\nH1 : size l = 0 → size (node rs rl rx rr) ≤ 1\nH2 : 1 ≤ size l → 1 ≤ size (node rs rl rx rr) → size (node rs rl rx rr) ≤ delta * size l\n⊢ balanceL l x (node rs rl rx rr) = balance l x (node rs rl rx rr)\n[PROOFSTEP]\ncases' l with ls ll lx lr\n[GOAL]\ncase node.nil\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nsr : Sized (node rs rl rx rr)\nsl : Sized nil\nH1 : size nil = 0 → size (node rs rl rx rr) ≤ 1\nH2 : 1 ≤ size nil → 1 ≤ size (node rs rl rx rr) → size (node rs rl rx rr) ≤ delta * size nil\n⊢ balanceL nil x (node rs rl rx rr) = balance nil x (node rs rl rx rr)\n[PROOFSTEP]\nhave : size rl = 0 ∧ size rr = 0 := by\n  have := H1 rfl\n  rwa [size, sr.1, Nat.succ_le_succ_iff, le_zero_iff, add_eq_zero_iff] at this \n[GOAL]\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nsr : Sized (node rs rl rx rr)\nsl : Sized nil\nH1 : size nil = 0 → size (node rs rl rx rr) ≤ 1\nH2 : 1 ≤ size nil → 1 ≤ size (node rs rl rx rr) → size (node rs rl rx rr) ≤ delta * size nil\n⊢ size rl = 0 ∧ size rr = 0\n[PROOFSTEP]\nhave := H1 rfl\n[GOAL]\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nsr : Sized (node rs rl rx rr)\nsl : Sized nil\nH1 : size nil = 0 → size (node rs rl rx rr) ≤ 1\nH2 : 1 ≤ size nil → 1 ≤ size (node rs rl rx rr) → size (node rs rl rx rr) ≤ delta * size nil\nthis : size (node rs rl rx rr) ≤ 1\n⊢ size rl = 0 ∧ size rr = 0\n[PROOFSTEP]\nrwa [size, sr.1, Nat.succ_le_succ_iff, le_zero_iff, add_eq_zero_iff] at this \n[GOAL]\ncase node.nil\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nsr : Sized (node rs rl rx rr)\nsl : Sized nil\nH1 : size nil = 0 → size (node rs rl rx rr) ≤ 1\nH2 : 1 ≤ size nil → 1 ≤ size (node rs rl rx rr) → size (node rs rl rx rr) ≤ delta * size nil\nthis : size rl = 0 ∧ size rr = 0\n⊢ balanceL nil x (node rs rl rx rr) = balance nil x (node rs rl rx rr)\n[PROOFSTEP]\ncases sr.2.1.size_eq_zero.1 this.1\n[GOAL]\ncase node.nil.refl\nα : Type u_1\nx : α\nrs : ℕ\nrx : α\nrr : Ordnode α\nsl : Sized nil\nsr : Sized (node rs nil rx rr)\nH1 : size nil = 0 → size (node rs nil rx rr) ≤ 1\nH2 : 1 ≤ size nil → 1 ≤ size (node rs nil rx rr) → size (node rs nil rx rr) ≤ delta * size nil\nthis : size nil = 0 ∧ size rr = 0\n⊢ balanceL nil x (node rs nil rx rr) = balance nil x (node rs nil rx rr)\n[PROOFSTEP]\ncases sr.2.2.size_eq_zero.1 this.2\n[GOAL]\ncase node.nil.refl.refl\nα : Type u_1\nx : α\nrs : ℕ\nrx : α\nsl : Sized nil\nsr : Sized (node rs nil rx nil)\nH1 : size nil = 0 → size (node rs nil rx nil) ≤ 1\nH2 : 1 ≤ size nil → 1 ≤ size (node rs nil rx nil) → size (node rs nil rx nil) ≤ delta * size nil\nthis : size nil = 0 ∧ size nil = 0\n⊢ balanceL nil x (node rs nil rx nil) = balance nil x (node rs nil rx nil)\n[PROOFSTEP]\nrw [sr.eq_node']\n[GOAL]\ncase node.nil.refl.refl\nα : Type u_1\nx : α\nrs : ℕ\nrx : α\nsl : Sized nil\nsr : Sized (node rs nil rx nil)\nH1 : size nil = 0 → size (node rs nil rx nil) ≤ 1\nH2 : 1 ≤ size nil → 1 ≤ size (node rs nil rx nil) → size (node rs nil rx nil) ≤ delta * size nil\nthis : size nil = 0 ∧ size nil = 0\n⊢ balanceL nil x (node' nil rx nil) = balance nil x (node' nil rx nil)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase node.node\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nsr : Sized (node rs rl rx rr)\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nsl : Sized (node ls ll lx lr)\nH1 : size (node ls ll lx lr) = 0 → size (node rs rl rx rr) ≤ 1\nH2 :\n  1 ≤ size (node ls ll lx lr) → 1 ≤ size (node rs rl rx rr) → size (node rs rl rx rr) ≤ delta * size (node ls ll lx lr)\n⊢ balanceL (node ls ll lx lr) x (node rs rl rx rr) = balance (node ls ll lx lr) x (node rs rl rx rr)\n[PROOFSTEP]\nreplace H2 : ¬rs > delta * ls := not_lt_of_le (H2 sl.pos sr.pos)\n[GOAL]\ncase node.node\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nsr : Sized (node rs rl rx rr)\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nsl : Sized (node ls ll lx lr)\nH1 : size (node ls ll lx lr) = 0 → size (node rs rl rx rr) ≤ 1\nH2 : ¬rs > delta * ls\n⊢ balanceL (node ls ll lx lr) x (node rs rl rx rr) = balance (node ls ll lx lr) x (node rs rl rx rr)\n[PROOFSTEP]\nsimp [balanceL, balance, H2]\n[GOAL]\ncase node.node\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nsr : Sized (node rs rl rx rr)\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nsl : Sized (node ls ll lx lr)\nH1 : size (node ls ll lx lr) = 0 → size (node rs rl rx rr) ≤ 1\nH2 : ¬rs > delta * ls\n⊢ (if delta * rs < ls then\n      rec (motive := fun t => ll = t → Ordnode α) (fun h => nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          rec (motive := fun t => lr = t → Ordnode α) (fun h => nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              if size_1 < ratio * size then node (ls + rs + 1) ll lx (node (rs + size_1 + 1) lr x (node rs rl rx rr))\n              else\n                node (ls + rs + 1) (node (size + Ordnode.size l + 1) ll lx l) x_2\n                  (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n            lr (_ : id lr = id lr))\n        ll (_ : id ll = id ll)\n    else node (ls + rs + 1) (node ls ll lx lr) x (node rs rl rx rr)) =\n    if delta * rs < ls then\n      rec (motive := fun t => ll = t → Ordnode α) (fun h => nil)\n        (fun size l x_1 r l_ih r_ih h =>\n          rec (motive := fun t => lr = t → Ordnode α) (fun h => nil)\n            (fun size_1 l x_2 r l_ih r_ih h =>\n              if size_1 < ratio * size then node (ls + rs + 1) ll lx (node (size_1 + rs + 1) lr x (node rs rl rx rr))\n              else\n                node (ls + rs + 1) (node (size + Ordnode.size l + 1) ll lx l) x_2\n                  (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n            lr (_ : id lr = id lr))\n        ll (_ : id ll = id ll)\n    else node (ls + rs + 1) (node ls ll lx lr) x (node rs rl rx rr)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nsr : Sized (node rs rl rx rr)\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nsl : Sized (node ls ll lx lr)\nH1 : size (node ls ll lx lr) = 0 → size (node rs rl rx rr) ≤ 1\nH2 : ¬rs > delta * ls\nh✝ : delta * rs < ls\n⊢ rec (motive := fun t => ll = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => lr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l x_2 r l_ih r_ih h =>\n            if size_1 < ratio * size then node (ls + rs + 1) ll lx (node (rs + size_1 + 1) lr x (node rs rl rx rr))\n            else\n              node (ls + rs + 1) (node (size + Ordnode.size l + 1) ll lx l) x_2\n                (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n          lr (_ : id lr = id lr))\n      ll (_ : id ll = id ll) =\n    rec (motive := fun t => ll = t → Ordnode α) (fun h => nil)\n      (fun size l x_1 r l_ih r_ih h =>\n        rec (motive := fun t => lr = t → Ordnode α) (fun h => nil)\n          (fun size_1 l x_2 r l_ih r_ih h =>\n            if size_1 < ratio * size then node (ls + rs + 1) ll lx (node (size_1 + rs + 1) lr x (node rs rl rx rr))\n            else\n              node (ls + rs + 1) (node (size + Ordnode.size l + 1) ll lx l) x_2\n                (node (Ordnode.size r + rs + 1) r x (node rs rl rx rr)))\n          lr (_ : id lr = id lr))\n      ll (_ : id ll = id ll)\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\ncase neg\nα : Type u_1\nx : α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nsr : Sized (node rs rl rx rr)\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nsl : Sized (node ls ll lx lr)\nH1 : size (node ls ll lx lr) = 0 → size (node rs rl rx rr) ≤ 1\nH2 : ¬rs > delta * ls\nh✝ : ¬delta * rs < ls\n⊢ node (ls + rs + 1) (node ls ll lx lr) x (node rs rl rx rr) =\n    node (ls + rs + 1) (node ls ll lx lr) x (node rs rl rx rr)\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\nα : Type u_1\nn m : ℕ\n⊢ Raised n m ↔ n ≤ m ∧ m ≤ n + 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nn m : ℕ\n⊢ Raised n m → n ≤ m ∧ m ≤ n + 1\ncase mpr α : Type u_1 n m : ℕ ⊢ n ≤ m ∧ m ≤ n + 1 → Raised n m\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase mp.inl\nα : Type u_1\nm : ℕ\n⊢ m ≤ m ∧ m ≤ m + 1\n[PROOFSTEP]\nexact ⟨le_rfl, Nat.le_succ _⟩\n[GOAL]\ncase mp.inr\nα : Type u_1\nn : ℕ\n⊢ n ≤ n + 1 ∧ n + 1 ≤ n + 1\n[PROOFSTEP]\nexact ⟨Nat.le_succ _, le_rfl⟩\n[GOAL]\ncase mpr\nα : Type u_1\nn m : ℕ\n⊢ n ≤ m ∧ m ≤ n + 1 → Raised n m\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase mpr.intro\nα : Type u_1\nn m : ℕ\nh₁ : n ≤ m\nh₂ : m ≤ n + 1\n⊢ Raised n m\n[PROOFSTEP]\nrcases eq_or_lt_of_le h₁ with (rfl | h₁)\n[GOAL]\ncase mpr.intro.inl\nα : Type u_1\nn : ℕ\nh₁ : n ≤ n\nh₂ : n ≤ n + 1\n⊢ Raised n n\n[PROOFSTEP]\nexact Or.inl rfl\n[GOAL]\ncase mpr.intro.inr\nα : Type u_1\nn m : ℕ\nh₁✝ : n ≤ m\nh₂ : m ≤ n + 1\nh₁ : n < m\n⊢ Raised n m\n[PROOFSTEP]\nexact Or.inr (le_antisymm h₂ h₁)\n[GOAL]\nα : Type u_1\nn m : ℕ\nH : Raised n m\n⊢ Nat.dist n m ≤ 1\n[PROOFSTEP]\ncases' raised_iff.1 H with H1 H2\n[GOAL]\ncase intro\nα : Type u_1\nn m : ℕ\nH : Raised n m\nH1 : n ≤ m\nH2 : m ≤ n + 1\n⊢ Nat.dist n m ≤ 1\n[PROOFSTEP]\nrwa [Nat.dist_eq_sub_of_le H1, tsub_le_iff_left]\n[GOAL]\nα : Type u_1\nn m : ℕ\nH : Raised n m\n⊢ Nat.dist m n ≤ 1\n[PROOFSTEP]\nrw [Nat.dist_comm]\n[GOAL]\nα : Type u_1\nn m : ℕ\nH : Raised n m\n⊢ Nat.dist n m ≤ 1\n[PROOFSTEP]\nexact H.dist_le\n[GOAL]\nα : Type u_1\nk n m : ℕ\nH : Raised n m\n⊢ Raised (k + n) (k + m)\n[PROOFSTEP]\nrcases H with (rfl | rfl)\n[GOAL]\ncase inl\nα : Type u_1\nk m : ℕ\n⊢ Raised (k + m) (k + m)\n[PROOFSTEP]\nexact Or.inl rfl\n[GOAL]\ncase inr\nα : Type u_1\nk n : ℕ\n⊢ Raised (k + n) (k + (n + 1))\n[PROOFSTEP]\nexact Or.inr rfl\n[GOAL]\nα : Type u_1\nk n m : ℕ\nH : Raised n m\n⊢ Raised (n + k) (m + k)\n[PROOFSTEP]\nrw [add_comm, add_comm m]\n[GOAL]\nα : Type u_1\nk n m : ℕ\nH : Raised n m\n⊢ Raised (k + n) (k + m)\n[PROOFSTEP]\nexact H.add_left _\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx₁ x₂ : α\nr₁ r₂ : Ordnode α\nH : Raised (size r₁) (size r₂)\n⊢ Raised (size (node' l x₁ r₁)) (size (node' l x₂ r₂))\n[PROOFSTEP]\nrw [node', size, size]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx₁ x₂ : α\nr₁ r₂ : Ordnode α\nH : Raised (size r₁) (size r₂)\n⊢ Raised (size l + size r₁ + 1) (size l + size r₂ + 1)\n[PROOFSTEP]\ngeneralize size r₂ = m at H ⊢\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx₁ x₂ : α\nr₁ r₂ : Ordnode α\nm : ℕ\nH : Raised (size r₁) m\n⊢ Raised (size l + size r₁ + 1) (size l + m + 1)\n[PROOFSTEP]\nrcases H with (rfl | rfl)\n[GOAL]\ncase inl\nα : Type u_1\nl : Ordnode α\nx₁ x₂ : α\nr₁ r₂ : Ordnode α\n⊢ Raised (size l + size r₁ + 1) (size l + size r₁ + 1)\n[PROOFSTEP]\nexact Or.inl rfl\n[GOAL]\ncase inr\nα : Type u_1\nl : Ordnode α\nx₁ x₂ : α\nr₁ r₂ : Ordnode α\n⊢ Raised (size l + size r₁ + 1) (size l + (size r₁ + 1) + 1)\n[PROOFSTEP]\nexact Or.inr rfl\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nH : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r'\n⊢ balanceL l x r = balance' l x r\n[PROOFSTEP]\nrw [← balance_eq_balance' hl hr sl sr, balanceL_eq_balance sl sr]\n[GOAL]\ncase H1\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nH : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r'\n⊢ size l = 0 → size r ≤ 1\n[PROOFSTEP]\nintro l0\n[GOAL]\ncase H1\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nH : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r'\nl0 : size l = 0\n⊢ size r ≤ 1\n[PROOFSTEP]\nrw [l0] at H \n[GOAL]\ncase H1\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nH : (∃ l', Raised l' 0 ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised (size r) r' ∧ BalancedSz 0 r'\nl0 : size l = 0\n⊢ size r ≤ 1\n[PROOFSTEP]\nrcases H with (⟨_, ⟨⟨⟩⟩ | ⟨⟨⟩⟩, H⟩ | ⟨r', e, H⟩)\n[GOAL]\ncase H1.inl.intro.intro.inl.refl\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nl0 : size l = 0\nH : BalancedSz 0 (size r)\n⊢ size r ≤ 1\n[PROOFSTEP]\nexact balancedSz_zero.1 H.symm\n[GOAL]\ncase H1.inr.intro.intro\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nl0 : size l = 0\nr' : ℕ\ne : Raised (size r) r'\nH : BalancedSz 0 r'\n⊢ size r ≤ 1\n[PROOFSTEP]\nexact le_trans (raised_iff.1 e).1 (balancedSz_zero.1 H.symm)\n[GOAL]\ncase H2\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nH : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r'\n⊢ 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l\n[PROOFSTEP]\nintro l1 _\n[GOAL]\ncase H2\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nH : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r'\nl1 : 1 ≤ size l\na✝ : 1 ≤ size r\n⊢ size r ≤ delta * size l\n[PROOFSTEP]\nrcases H with (⟨l', e, H | ⟨_, H₂⟩⟩ | ⟨r', e, H | ⟨_, H₂⟩⟩)\n[GOAL]\ncase H2.inl.intro.intro.inl\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nl1 : 1 ≤ size l\na✝ : 1 ≤ size r\nl' : ℕ\ne : Raised l' (size l)\nH : l' + size r ≤ 1\n⊢ size r ≤ delta * size l\n[PROOFSTEP]\nexact le_trans (le_trans (Nat.le_add_left _ _) H) (mul_pos (by decide) l1 : (0 : ℕ) < _)\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nl1 : 1 ≤ size l\na✝ : 1 ≤ size r\nl' : ℕ\ne : Raised l' (size l)\nH : l' + size r ≤ 1\n⊢ 0 < delta\n[PROOFSTEP]\ndecide\n[GOAL]\ncase H2.inl.intro.intro.inr.intro\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nl1 : 1 ≤ size l\na✝ : 1 ≤ size r\nl' : ℕ\ne : Raised l' (size l)\nleft✝ : l' ≤ delta * size r\nH₂ : size r ≤ delta * l'\n⊢ size r ≤ delta * size l\n[PROOFSTEP]\nexact le_trans H₂ (Nat.mul_le_mul_left _ (raised_iff.1 e).1)\n[GOAL]\ncase H2.inr.intro.intro.inl\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nl1 : 1 ≤ size l\na✝ : 1 ≤ size r\nr' : ℕ\ne : Raised (size r) r'\nH : size l + r' ≤ 1\n⊢ size r ≤ delta * size l\n[PROOFSTEP]\ncases raised_iff.1 e\n[GOAL]\ncase H2.inr.intro.intro.inl.intro\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nl1 : 1 ≤ size l\na✝ : 1 ≤ size r\nr' : ℕ\ne : Raised (size r) r'\nH : size l + r' ≤ 1\nleft✝ : size r ≤ r'\nright✝ : r' ≤ size r + 1\n⊢ size r ≤ delta * size l\n[PROOFSTEP]\nunfold delta\n[GOAL]\ncase H2.inr.intro.intro.inl.intro\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nl1 : 1 ≤ size l\na✝ : 1 ≤ size r\nr' : ℕ\ne : Raised (size r) r'\nH : size l + r' ≤ 1\nleft✝ : size r ≤ r'\nright✝ : r' ≤ size r + 1\n⊢ size r ≤ 3 * size l\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase H2.inr.intro.intro.inr.intro\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nl1 : 1 ≤ size l\na✝ : 1 ≤ size r\nr' : ℕ\ne : Raised (size r) r'\nleft✝ : size l ≤ delta * r'\nH₂ : r' ≤ delta * size l\n⊢ size r ≤ delta * size l\n[PROOFSTEP]\nexact le_trans (raised_iff.1 e).1 H₂\n[GOAL]\nα : Type u_1\nl r : Ordnode α\nH : (∃ l', Raised (size l) l' ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r'\n⊢ (∃ l', Raised l' (size (dual r)) ∧ BalancedSz l' (size (dual l))) ∨\n    ∃ r', Raised (size (dual l)) r' ∧ BalancedSz (size (dual r)) r'\n[PROOFSTEP]\nrw [size_dual, size_dual]\n[GOAL]\nα : Type u_1\nl r : Ordnode α\nH : (∃ l', Raised (size l) l' ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r'\n⊢ (∃ l', Raised l' (size r) ∧ BalancedSz l' (size l)) ∨ ∃ r', Raised (size l) r' ∧ BalancedSz (size r) r'\n[PROOFSTEP]\nexact H.symm.imp (Exists.imp fun _ => And.imp_right BalancedSz.symm) (Exists.imp fun _ => And.imp_right BalancedSz.symm)\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nH : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r'\n⊢ size (balanceL l x r) = size l + size r + 1\n[PROOFSTEP]\nrw [balanceL_eq_balance' hl hr sl sr H, size_balance' sl sr]\n[GOAL]\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nH : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r'\n⊢ All P (balanceL l x r) ↔ All P l ∧ P x ∧ All P r\n[PROOFSTEP]\nrw [balanceL_eq_balance' hl hr sl sr H, all_balance']\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nH : (∃ l', Raised (size l) l' ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r'\n⊢ balanceR l x r = balance' l x r\n[PROOFSTEP]\nrw [← dual_dual (balanceR l x r), dual_balanceR,\n  balanceL_eq_balance' hr.dual hl.dual sr.dual sl.dual (balance_sz_dual H), ← dual_balance', dual_dual]\n[GOAL]\nα : Type u_1\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nH : (∃ l', Raised (size l) l' ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r'\n⊢ size (balanceR l x r) = size l + size r + 1\n[PROOFSTEP]\nrw [balanceR_eq_balance' hl hr sl sr H, size_balance' sl sr]\n[GOAL]\nα : Type u_1\nP : α → Prop\nl : Ordnode α\nx : α\nr : Ordnode α\nhl : Balanced l\nhr : Balanced r\nsl : Sized l\nsr : Sized r\nH : (∃ l', Raised (size l) l' ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r'\n⊢ All P (balanceR l x r) ↔ All P l ∧ P x ∧ All P r\n[PROOFSTEP]\nrw [balanceR_eq_balance' hl hr sl sr H, all_balance']\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nh : Bounded nil o₁ o₂\n⊢ Bounded (Ordnode.dual nil) o₂ o₁\n[PROOFSTEP]\ncases o₁\n[GOAL]\ncase none\nα : Type u_1\ninst✝ : Preorder α\no₂ : WithTop α\nh : Bounded nil none o₂\n⊢ Bounded (Ordnode.dual nil) o₂ none\n[PROOFSTEP]\ncases o₂\n[GOAL]\ncase some\nα : Type u_1\ninst✝ : Preorder α\no₂ : WithTop α\nval✝ : α\nh : Bounded nil (some val✝) o₂\n⊢ Bounded (Ordnode.dual nil) o₂ (some val✝)\n[PROOFSTEP]\ncases o₂\n[GOAL]\ncase none.none\nα : Type u_1\ninst✝ : Preorder α\nh : Bounded nil none none\n⊢ Bounded (Ordnode.dual nil) none none\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase none.some\nα : Type u_1\ninst✝ : Preorder α\nval✝ : α\nh : Bounded nil none (some val✝)\n⊢ Bounded (Ordnode.dual nil) (some val✝) none\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝ : Preorder α\nval✝ : α\nh : Bounded nil (some val✝) none\n⊢ Bounded (Ordnode.dual nil) none (some val✝)\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝ : Preorder α\nval✝¹ val✝ : α\nh : Bounded nil (some val✝¹) (some val✝)\n⊢ Bounded (Ordnode.dual nil) (some val✝) (some val✝¹)\n[PROOFSTEP]\ntrivial\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nt : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Bounded (Ordnode.dual t) o₂ o₁\n⊢ Bounded t o₁ o₂\n[PROOFSTEP]\nhave := Bounded.dual h\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nt : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Bounded (Ordnode.dual t) o₂ o₁\nthis : Bounded (Ordnode.dual (Ordnode.dual t)) o₁ o₂\n⊢ Bounded t o₁ o₂\n[PROOFSTEP]\nrwa [dual_dual, OrderDual.Preorder.dual_dual] at this \n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nh : Bounded nil o₁ o₂\n⊢ Bounded nil ⊥ o₂\n[PROOFSTEP]\ncases o₂\n[GOAL]\ncase none\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\nh : Bounded nil o₁ none\n⊢ Bounded nil ⊥ none\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase some\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\nval✝ : α\nh : Bounded nil o₁ (some val✝)\n⊢ Bounded nil ⊥ (some val✝)\n[PROOFSTEP]\ntrivial\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nh : Bounded nil o₁ o₂\n⊢ Bounded nil o₁ ⊤\n[PROOFSTEP]\ncases o₁\n[GOAL]\ncase none\nα : Type u_1\ninst✝ : Preorder α\no₂ : WithTop α\nh : Bounded nil none o₂\n⊢ Bounded nil none ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase some\nα : Type u_1\ninst✝ : Preorder α\no₂ : WithTop α\nval✝ : α\nh : Bounded nil (some val✝) o₂\n⊢ Bounded nil (some val✝) ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nt₁ t₂ : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nx : α\nh₁ : Bounded t₁ o₁ ↑x\nh₂ : Bounded t₂ (↑x) o₂\n⊢ All (fun y => All (fun z => y < z) t₂) t₁\n[PROOFSTEP]\nrefine h₁.mem_lt.imp fun y yx => ?_\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nt₁ t₂ : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nx : α\nh₁ : Bounded t₁ o₁ ↑x\nh₂ : Bounded t₂ (↑x) o₂\ny : α\nyx : y < x\n⊢ All (fun z => y < z) t₂\n[PROOFSTEP]\nexact h₂.mem_gt.imp fun z xz => lt_trans yx xz\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nol : Bounded l o₁ ↑x\nOr : Bounded r (↑x) o₂\nsl : Sized l\nsr : Sized r\nb : BalancedSz (size l) (size r)\nbl : Balanced l\nbr : Balanced r\nol' : Bounded (Ordnode.dual l) (↑x) o₁\nsl' : Sized (Ordnode.dual l)\nbl' : Balanced (Ordnode.dual l)\nor' : Bounded (Ordnode.dual r) o₂ ↑x\nsr' : Sized (Ordnode.dual r)\nbr' : Balanced (Ordnode.dual r)\n⊢ size l + size r + 1 = size (Ordnode.dual r) + size (Ordnode.dual l) + 1\n[PROOFSTEP]\nsimp [size_dual, add_comm]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nol : Bounded l o₁ ↑x\nOr : Bounded r (↑x) o₂\nsl : Sized l\nsr : Sized r\nb : BalancedSz (size l) (size r)\nbl : Balanced l\nbr : Balanced r\nol' : Bounded (Ordnode.dual l) (↑x) o₁\nsl' : Sized (Ordnode.dual l)\nbl' : Balanced (Ordnode.dual l)\nor' : Bounded (Ordnode.dual r) o₂ ↑x\nsr' : Sized (Ordnode.dual r)\nbr' : Balanced (Ordnode.dual r)\n⊢ BalancedSz (size (Ordnode.dual r)) (size (Ordnode.dual l))\n[PROOFSTEP]\nrw [size_dual, size_dual]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nol : Bounded l o₁ ↑x\nOr : Bounded r (↑x) o₂\nsl : Sized l\nsr : Sized r\nb : BalancedSz (size l) (size r)\nbl : Balanced l\nbr : Balanced r\nol' : Bounded (Ordnode.dual l) (↑x) o₁\nsl' : Sized (Ordnode.dual l)\nbl' : Balanced (Ordnode.dual l)\nor' : Bounded (Ordnode.dual r) o₂ ↑x\nsr' : Sized (Ordnode.dual r)\nbr' : Balanced (Ordnode.dual r)\n⊢ BalancedSz (size r) (size l)\n[PROOFSTEP]\nexact b.symm\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nt : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₂ (Ordnode.dual t) o₁\n⊢ Valid' o₁ t o₂\n[PROOFSTEP]\nhave := Valid'.dual h\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nt : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₂ (Ordnode.dual t) o₁\nthis : Valid' o₁ (Ordnode.dual (Ordnode.dual t)) o₂\n⊢ Valid' o₁ t o₂\n[PROOFSTEP]\nrwa [dual_dual, OrderDual.Preorder.dual_dual] at this \n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\na b c d : ℕ\nlr₂ : 3 * (b + c + 1 + d) ≤ 16 * a + 9\nmr₂ : b + c + 1 ≤ 3 * d\nmm₁ : b ≤ 3 * c\n⊢ b < 3 * a + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nb c d : ℕ\nmr₂ : b + c + 1 ≤ 3 * d\n⊢ c ≤ 3 * d\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nb c d : ℕ\nmr₁ : 2 * d ≤ b + c + 1\nmm₁ : b ≤ 3 * c\n⊢ d ≤ 3 * c\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\na b c d : ℕ\nlr₁ : 3 * a ≤ b + c + 1 + d\nmr₂ : b + c + 1 ≤ 3 * d\nmm₁ : b ≤ 3 * c\n⊢ a + b + 1 ≤ 3 * (c + d + 1)\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\na b c d : ℕ\nlr₂ : 3 * (b + c + 1 + d) ≤ 16 * a + 9\nmr₁ : 2 * d ≤ b + c + 1\nmm₂ : c ≤ 3 * b\n⊢ c + d + 1 ≤ 3 * (a + b + 1)\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nm : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhm : Valid' (↑x) m ↑y\nhr : Valid' (↑y) r o₂\nHm : 0 < size m\nH :\n  size l = 0 ∧ size m = 1 ∧ size r ≤ 1 ∨\n    0 < size l ∧\n      ratio * size r ≤ size m ∧\n        delta * size l ≤ size m + size r ∧ 3 * (size m + size r) ≤ 16 * size l + 9 ∧ size m ≤ delta * size r\n⊢ Valid' o₁ (Ordnode.node4L l x m y r) o₂\n[PROOFSTEP]\ncases' m with s ml z mr\n[GOAL]\ncase nil\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\nhm : Valid' (↑x) nil ↑y\nHm : 0 < size nil\nH :\n  size l = 0 ∧ size nil = 1 ∧ size r ≤ 1 ∨\n    0 < size l ∧\n      ratio * size r ≤ size nil ∧\n        delta * size l ≤ size nil + size r ∧ 3 * (size nil + size r) ≤ 16 * size l + 9 ∧ size nil ≤ delta * size r\n⊢ Valid' o₁ (Ordnode.node4L l x nil y r) o₂\n[PROOFSTEP]\ncases Hm\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nH :\n  size l = 0 ∧ size (Ordnode.node s ml z mr) = 1 ∧ size r ≤ 1 ∨\n    0 < size l ∧\n      ratio * size r ≤ size (Ordnode.node s ml z mr) ∧\n        delta * size l ≤ size (Ordnode.node s ml z mr) + size r ∧\n          3 * (size (Ordnode.node s ml z mr) + size r) ≤ 16 * size l + 9 ∧\n            size (Ordnode.node s ml z mr) ≤ delta * size r\n⊢ Valid' o₁ (Ordnode.node4L l x (Ordnode.node s ml z mr) y r) o₂\n[PROOFSTEP]\nsuffices :\n  BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nH :\n  size l = 0 ∧ size (Ordnode.node s ml z mr) = 1 ∧ size r ≤ 1 ∨\n    0 < size l ∧\n      ratio * size r ≤ size (Ordnode.node s ml z mr) ∧\n        delta * size l ≤ size (Ordnode.node s ml z mr) + size r ∧\n          3 * (size (Ordnode.node s ml z mr) + size r) ≤ 16 * size l + 9 ∧\n            size (Ordnode.node s ml z mr) ≤ delta * size r\nthis :\n  BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n⊢ Valid' o₁ (Ordnode.node4L l x (Ordnode.node s ml z mr) y r) o₂\ncase this\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nH :\n  size l = 0 ∧ size (Ordnode.node s ml z mr) = 1 ∧ size r ≤ 1 ∨\n    0 < size l ∧\n      ratio * size r ≤ size (Ordnode.node s ml z mr) ∧\n        delta * size l ≤ size (Ordnode.node s ml z mr) + size r ∧\n          3 * (size (Ordnode.node s ml z mr) + size r) ≤ 16 * size l + 9 ∧\n            size (Ordnode.node s ml z mr) ≤ delta * size r\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nexact Valid'.node' (hl.node' hm.left this.1) (hm.right.node' hr this.2.1) this.2.2\n[GOAL]\ncase this\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nH :\n  size l = 0 ∧ size (Ordnode.node s ml z mr) = 1 ∧ size r ≤ 1 ∨\n    0 < size l ∧\n      ratio * size r ≤ size (Ordnode.node s ml z mr) ∧\n        delta * size l ≤ size (Ordnode.node s ml z mr) + size r ∧\n          3 * (size (Ordnode.node s ml z mr) + size r) ≤ 16 * size l + 9 ∧\n            size (Ordnode.node s ml z mr) ≤ delta * size r\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nrcases H with (⟨l0, m1, r0⟩ | ⟨l0, mr₁, lr₁, lr₂, mr₂⟩)\n[GOAL]\ncase this.inl.intro.intro\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : size l = 0\nm1 : size (Ordnode.node s ml z mr) = 1\nr0 : size r ≤ 1\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nrw [hm.2.size_eq, Nat.succ_inj', add_eq_zero_iff] at m1 \n[GOAL]\ncase this.inl.intro.intro\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : size l = 0\nm1 : size ml = 0 ∧ size mr = 0\nr0 : size r ≤ 1\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nrw [l0, m1.1, m1.2]\n[GOAL]\ncase this.inl.intro.intro\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : size l = 0\nm1 : size ml = 0 ∧ size mr = 0\nr0 : size r ≤ 1\n⊢ BalancedSz 0 0 ∧ BalancedSz 0 (size r) ∧ BalancedSz (0 + 0 + 1) (0 + size r + 1)\n[PROOFSTEP]\nrevert r0\n[GOAL]\ncase this.inl.intro.intro\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : size l = 0\nm1 : size ml = 0 ∧ size mr = 0\n⊢ size r ≤ 1 → BalancedSz 0 0 ∧ BalancedSz 0 (size r) ∧ BalancedSz (0 + 0 + 1) (0 + size r + 1)\n[PROOFSTEP]\nrcases size r with (_ | _ | _) <;> [decide; decide; (intro r0; unfold BalancedSz delta; linarith)]\n[GOAL]\ncase this.inl.intro.intro\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : size l = 0\nm1 : size ml = 0 ∧ size mr = 0\n⊢ size r ≤ 1 → BalancedSz 0 0 ∧ BalancedSz 0 (size r) ∧ BalancedSz (0 + 0 + 1) (0 + size r + 1)\n[PROOFSTEP]\nrcases size r with (_ | _ | _)\n[GOAL]\ncase this.inl.intro.intro.zero\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : size l = 0\nm1 : size ml = 0 ∧ size mr = 0\n⊢ Nat.zero ≤ 1 → BalancedSz 0 0 ∧ BalancedSz 0 Nat.zero ∧ BalancedSz (0 + 0 + 1) (0 + Nat.zero + 1)\n[PROOFSTEP]\ndecide\n[GOAL]\ncase this.inl.intro.intro.succ.zero\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : size l = 0\nm1 : size ml = 0 ∧ size mr = 0\n⊢ Nat.succ Nat.zero ≤ 1 →\n    BalancedSz 0 0 ∧ BalancedSz 0 (Nat.succ Nat.zero) ∧ BalancedSz (0 + 0 + 1) (0 + Nat.succ Nat.zero + 1)\n[PROOFSTEP]\ndecide\n[GOAL]\ncase this.inl.intro.intro.succ.succ\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : size l = 0\nm1 : size ml = 0 ∧ size mr = 0\nn✝ : ℕ\n⊢ Nat.succ (Nat.succ n✝) ≤ 1 →\n    BalancedSz 0 0 ∧ BalancedSz 0 (Nat.succ (Nat.succ n✝)) ∧ BalancedSz (0 + 0 + 1) (0 + Nat.succ (Nat.succ n✝) + 1)\n[PROOFSTEP]\nintro r0\n[GOAL]\ncase this.inl.intro.intro.succ.succ\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : size l = 0\nm1 : size ml = 0 ∧ size mr = 0\nn✝ : ℕ\nr0 : Nat.succ (Nat.succ n✝) ≤ 1\n⊢ BalancedSz 0 0 ∧ BalancedSz 0 (Nat.succ (Nat.succ n✝)) ∧ BalancedSz (0 + 0 + 1) (0 + Nat.succ (Nat.succ n✝) + 1)\n[PROOFSTEP]\nunfold BalancedSz delta\n[GOAL]\ncase this.inl.intro.intro.succ.succ\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : size l = 0\nm1 : size ml = 0 ∧ size mr = 0\nn✝ : ℕ\nr0 : Nat.succ (Nat.succ n✝) ≤ 1\n⊢ (0 + 0 ≤ 1 ∨ 0 ≤ 3 * 0 ∧ 0 ≤ 3 * 0) ∧\n    (0 + Nat.succ (Nat.succ n✝) ≤ 1 ∨ 0 ≤ 3 * Nat.succ (Nat.succ n✝) ∧ Nat.succ (Nat.succ n✝) ≤ 3 * 0) ∧\n      (0 + 0 + 1 + (0 + Nat.succ (Nat.succ n✝) + 1) ≤ 1 ∨\n        0 + 0 + 1 ≤ 3 * (0 + Nat.succ (Nat.succ n✝) + 1) ∧ 0 + Nat.succ (Nat.succ n✝) + 1 ≤ 3 * (0 + 0 + 1))\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase this.inr.intro.intro.intro.intro\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size (Ordnode.node s ml z mr)\nlr₁ : delta * size l ≤ size (Ordnode.node s ml z mr) + size r\nlr₂ : 3 * (size (Ordnode.node s ml z mr) + size r) ≤ 16 * size l + 9\nmr₂ : size (Ordnode.node s ml z mr) ≤ delta * size r\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\ncases' Nat.eq_zero_or_pos (size r) with r0 r0\n[GOAL]\ncase this.inr.intro.intro.intro.intro.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size (Ordnode.node s ml z mr)\nlr₁ : delta * size l ≤ size (Ordnode.node s ml z mr) + size r\nlr₂ : 3 * (size (Ordnode.node s ml z mr) + size r) ≤ 16 * size l + 9\nmr₂ : size (Ordnode.node s ml z mr) ≤ delta * size r\nr0 : size r = 0\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nrw [r0] at mr₂ \n[GOAL]\ncase this.inr.intro.intro.intro.intro.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size (Ordnode.node s ml z mr)\nlr₁ : delta * size l ≤ size (Ordnode.node s ml z mr) + size r\nlr₂ : 3 * (size (Ordnode.node s ml z mr) + size r) ≤ 16 * size l + 9\nmr₂ : size (Ordnode.node s ml z mr) ≤ delta * 0\nr0 : size r = 0\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\ncases not_le_of_lt Hm mr₂\n[GOAL]\ncase this.inr.intro.intro.intro.intro.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size (Ordnode.node s ml z mr)\nlr₁ : delta * size l ≤ size (Ordnode.node s ml z mr) + size r\nlr₂ : 3 * (size (Ordnode.node s ml z mr) + size r) ≤ 16 * size l + 9\nmr₂ : size (Ordnode.node s ml z mr) ≤ delta * size r\nr0 : size r > 0\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nrw [hm.2.size_eq] at lr₁ lr₂ mr₁ mr₂ \n[GOAL]\ncase this.inr.intro.intro.intro.intro.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nby_cases mm : size ml + size mr ≤ 1\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : size ml + size mr ≤ 1\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nhave r1 := le_antisymm ((mul_le_mul_left (by decide)).1 (le_trans mr₁ (Nat.succ_le_succ mm) : _ ≤ ratio * 1)) r0\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : size ml + size mr ≤ 1\n⊢ 0 < ratio\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : size ml + size mr ≤ 1\nr1 : size r = 1\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nrw [r1, add_assoc] at lr₁ \n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : size ml + size mr ≤ 1\nr1 : size r = 1\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nhave l1 := le_antisymm ((mul_le_mul_left (by decide)).1 (le_trans lr₁ (add_le_add_right mm 2) : _ ≤ delta * 1)) l0\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : size ml + size mr ≤ 1\nr1 : size r = 1\n⊢ 0 < delta\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : size ml + size mr ≤ 1\nr1 : size r = 1\nl1 : size l = 1\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nrw [l1, r1]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : size ml + size mr ≤ 1\nr1 : size r = 1\nl1 : size l = 1\n⊢ BalancedSz 1 (size ml) ∧ BalancedSz (size mr) 1 ∧ BalancedSz (1 + size ml + 1) (size mr + 1 + 1)\n[PROOFSTEP]\nrevert mm\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\n⊢ size ml + size mr ≤ 1 →\n    BalancedSz 1 (size ml) ∧ BalancedSz (size mr) 1 ∧ BalancedSz (1 + size ml + 1) (size mr + 1 + 1)\n[PROOFSTEP]\ncases size ml\n[GOAL]\ncase pos.zero\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\n⊢ Nat.zero + size mr ≤ 1 →\n    BalancedSz 1 Nat.zero ∧ BalancedSz (size mr) 1 ∧ BalancedSz (1 + Nat.zero + 1) (size mr + 1 + 1)\n[PROOFSTEP]\ncases size mr\n[GOAL]\ncase pos.succ\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\nn✝ : ℕ\n⊢ Nat.succ n✝ + size mr ≤ 1 →\n    BalancedSz 1 (Nat.succ n✝) ∧ BalancedSz (size mr) 1 ∧ BalancedSz (1 + Nat.succ n✝ + 1) (size mr + 1 + 1)\n[PROOFSTEP]\ncases size mr\n[GOAL]\ncase pos.zero.zero\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\n⊢ Nat.zero + Nat.zero ≤ 1 →\n    BalancedSz 1 Nat.zero ∧ BalancedSz Nat.zero 1 ∧ BalancedSz (1 + Nat.zero + 1) (Nat.zero + 1 + 1)\n[PROOFSTEP]\nintro mm\n[GOAL]\ncase pos.zero.succ\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\nn✝ : ℕ\n⊢ Nat.zero + Nat.succ n✝ ≤ 1 →\n    BalancedSz 1 Nat.zero ∧ BalancedSz (Nat.succ n✝) 1 ∧ BalancedSz (1 + Nat.zero + 1) (Nat.succ n✝ + 1 + 1)\n[PROOFSTEP]\nintro mm\n[GOAL]\ncase pos.succ.zero\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\nn✝ : ℕ\n⊢ Nat.succ n✝ + Nat.zero ≤ 1 →\n    BalancedSz 1 (Nat.succ n✝) ∧ BalancedSz Nat.zero 1 ∧ BalancedSz (1 + Nat.succ n✝ + 1) (Nat.zero + 1 + 1)\n[PROOFSTEP]\nintro mm\n[GOAL]\ncase pos.succ.succ\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\nn✝¹ n✝ : ℕ\n⊢ Nat.succ n✝¹ + Nat.succ n✝ ≤ 1 →\n    BalancedSz 1 (Nat.succ n✝¹) ∧ BalancedSz (Nat.succ n✝) 1 ∧ BalancedSz (1 + Nat.succ n✝¹ + 1) (Nat.succ n✝ + 1 + 1)\n[PROOFSTEP]\nintro mm\n[GOAL]\ncase pos.zero.zero\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\nmm : Nat.zero + Nat.zero ≤ 1\n⊢ BalancedSz 1 Nat.zero ∧ BalancedSz Nat.zero 1 ∧ BalancedSz (1 + Nat.zero + 1) (Nat.zero + 1 + 1)\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos.zero.succ\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\nn✝ : ℕ\nmm : Nat.zero + Nat.succ n✝ ≤ 1\n⊢ BalancedSz 1 Nat.zero ∧ BalancedSz (Nat.succ n✝) 1 ∧ BalancedSz (1 + Nat.zero + 1) (Nat.succ n✝ + 1 + 1)\n[PROOFSTEP]\nrw [Nat.zero_eq, zero_add] at mm \n[GOAL]\ncase pos.zero.succ\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\nn✝ : ℕ\nmm : Nat.succ n✝ ≤ 1\n⊢ BalancedSz 1 Nat.zero ∧ BalancedSz (Nat.succ n✝) 1 ∧ BalancedSz (1 + Nat.zero + 1) (Nat.succ n✝ + 1 + 1)\n[PROOFSTEP]\nrcases mm with (_ | ⟨⟨⟩⟩)\n[GOAL]\ncase pos.zero.succ.refl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\n⊢ BalancedSz 1 Nat.zero ∧ BalancedSz (Nat.succ 0) 1 ∧ BalancedSz (1 + Nat.zero + 1) (Nat.succ 0 + 1 + 1)\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos.succ.zero\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\nn✝ : ℕ\nmm : Nat.succ n✝ + Nat.zero ≤ 1\n⊢ BalancedSz 1 (Nat.succ n✝) ∧ BalancedSz Nat.zero 1 ∧ BalancedSz (1 + Nat.succ n✝ + 1) (Nat.zero + 1 + 1)\n[PROOFSTEP]\nrcases mm with (_ | ⟨⟨⟩⟩)\n[GOAL]\ncase pos.succ.zero.refl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\n⊢ BalancedSz 1 (Nat.succ 0) ∧ BalancedSz Nat.zero 1 ∧ BalancedSz (1 + Nat.succ 0 + 1) (Nat.zero + 1 + 1)\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos.succ.succ\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\nn✝¹ n✝ : ℕ\nmm : Nat.succ n✝¹ + Nat.succ n✝ ≤ 1\n⊢ BalancedSz 1 (Nat.succ n✝¹) ∧ BalancedSz (Nat.succ n✝) 1 ∧ BalancedSz (1 + Nat.succ n✝¹ + 1) (Nat.succ n✝ + 1 + 1)\n[PROOFSTEP]\nrw [Nat.succ_add] at mm \n[GOAL]\ncase pos.succ.succ\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + (1 + 1)\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nr1 : size r = 1\nl1 : size l = 1\nn✝¹ n✝ : ℕ\nmm : Nat.succ (n✝¹ + Nat.succ n✝) ≤ 1\n⊢ BalancedSz 1 (Nat.succ n✝¹) ∧ BalancedSz (Nat.succ n✝) 1 ∧ BalancedSz (1 + Nat.succ n✝¹ + 1) (Nat.succ n✝ + 1 + 1)\n[PROOFSTEP]\nrcases mm with (_ | ⟨⟨⟩⟩)\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nrcases hm.3.1.resolve_left mm with ⟨mm₁, mm₂⟩\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\ncases' Nat.eq_zero_or_pos (size ml) with ml0 ml0\n[GOAL]\ncase neg.intro.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml = 0\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nrw [ml0, mul_zero, le_zero_iff] at mm₂ \n[GOAL]\ncase neg.intro.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr = 0\nml0 : size ml = 0\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nrw [ml0, mm₂] at mm \n[GOAL]\ncase neg.intro.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬0 + 0 ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr = 0\nml0 : size ml = 0\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\ncases mm (by decide)\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬0 + 0 ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr = 0\nml0 : size ml = 0\n⊢ 0 + 0 ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase neg.intro.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nhave : 2 * size l ≤ size ml + size mr + 1 :=\n  by\n  have := Nat.mul_le_mul_left ratio lr₁\n  rw [mul_left_comm, mul_add] at this \n  have := le_trans this (add_le_add_left mr₁ _)\n  rw [← Nat.succ_mul] at this \n  exact (mul_le_mul_left (by decide)).1 this\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\n⊢ 2 * size l ≤ size ml + size mr + 1\n[PROOFSTEP]\nhave := Nat.mul_le_mul_left ratio lr₁\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : ratio * (delta * size l) ≤ ratio * (size ml + size mr + 1 + size r)\n⊢ 2 * size l ≤ size ml + size mr + 1\n[PROOFSTEP]\nrw [mul_left_comm, mul_add] at this \n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : delta * (ratio * size l) ≤ ratio * (size ml + size mr + 1) + ratio * size r\n⊢ 2 * size l ≤ size ml + size mr + 1\n[PROOFSTEP]\nhave := le_trans this (add_le_add_left mr₁ _)\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis✝ : delta * (ratio * size l) ≤ ratio * (size ml + size mr + 1) + ratio * size r\nthis : delta * (ratio * size l) ≤ ratio * (size ml + size mr + 1) + (size ml + size mr + 1)\n⊢ 2 * size l ≤ size ml + size mr + 1\n[PROOFSTEP]\nrw [← Nat.succ_mul] at this \n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis✝ : delta * (ratio * size l) ≤ ratio * (size ml + size mr + 1) + ratio * size r\nthis : delta * (ratio * size l) ≤ Nat.succ ratio * (size ml + size mr + 1)\n⊢ 2 * size l ≤ size ml + size mr + 1\n[PROOFSTEP]\nexact (mul_le_mul_left (by decide)).1 this\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis✝ : delta * (ratio * size l) ≤ ratio * (size ml + size mr + 1) + ratio * size r\nthis : delta * (ratio * size l) ≤ Nat.succ ratio * (size ml + size mr + 1)\n⊢ 0 < delta\n[PROOFSTEP]\ndecide\n[GOAL]\ncase neg.intro.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : 2 * size l ≤ size ml + size mr + 1\n⊢ BalancedSz (size l) (size ml) ∧\n    BalancedSz (size mr) (size r) ∧ BalancedSz (size l + size ml + 1) (size mr + size r + 1)\n[PROOFSTEP]\nrefine' ⟨Or.inr ⟨_, _⟩, Or.inr ⟨_, _⟩, Or.inr ⟨_, _⟩⟩\n[GOAL]\ncase neg.intro.inr.refine'_1\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : 2 * size l ≤ size ml + size mr + 1\n⊢ size l ≤ delta * size ml\n[PROOFSTEP]\nrefine' (mul_le_mul_left (by decide)).1 (le_trans this _)\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : 2 * size l ≤ size ml + size mr + 1\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\ncase neg.intro.inr.refine'_1\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : 2 * size l ≤ size ml + size mr + 1\n⊢ size ml + size mr + 1 ≤ 2 * (delta * size ml)\n[PROOFSTEP]\nrw [two_mul, Nat.succ_le_iff]\n[GOAL]\ncase neg.intro.inr.refine'_1\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : 2 * size l ≤ size ml + size mr + 1\n⊢ size ml + size mr < delta * size ml + delta * size ml\n[PROOFSTEP]\nrefine' add_lt_add_of_lt_of_le _ mm₂\n[GOAL]\ncase neg.intro.inr.refine'_1\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : 2 * size l ≤ size ml + size mr + 1\n⊢ size ml < delta * size ml\n[PROOFSTEP]\nsimpa using (mul_lt_mul_right ml0).2 (by decide : 1 < 3)\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : 2 * size l ≤ size ml + size mr + 1\n⊢ 1 < 3\n[PROOFSTEP]\ndecide\n[GOAL]\ncase neg.intro.inr.refine'_2\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : 2 * size l ≤ size ml + size mr + 1\n⊢ size ml ≤ delta * size l\n[PROOFSTEP]\nexact Nat.le_of_lt_succ (Valid'.node4L_lemma₁ lr₂ mr₂ mm₁)\n[GOAL]\ncase neg.intro.inr.refine'_3\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : 2 * size l ≤ size ml + size mr + 1\n⊢ size mr ≤ delta * size r\n[PROOFSTEP]\nexact Valid'.node4L_lemma₂ mr₂\n[GOAL]\ncase neg.intro.inr.refine'_4\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : 2 * size l ≤ size ml + size mr + 1\n⊢ size r ≤ delta * size mr\n[PROOFSTEP]\nexact Valid'.node4L_lemma₃ mr₁ mm₁\n[GOAL]\ncase neg.intro.inr.refine'_5\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : 2 * size l ≤ size ml + size mr + 1\n⊢ size l + size ml + 1 ≤ delta * (size mr + size r + 1)\n[PROOFSTEP]\nexact Valid'.node4L_lemma₄ lr₁ mr₂ mm₁\n[GOAL]\ncase neg.intro.inr.refine'_6\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx y : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑y) r o₂\ns : ℕ\nml : Ordnode α\nz : α\nmr : Ordnode α\nhm : Valid' (↑x) (Ordnode.node s ml z mr) ↑y\nHm : 0 < size (Ordnode.node s ml z mr)\nl0 : 0 < size l\nmr₁ : ratio * size r ≤ size ml + size mr + 1\nlr₁ : delta * size l ≤ size ml + size mr + 1 + size r\nlr₂ : 3 * (size ml + size mr + 1 + size r) ≤ 16 * size l + 9\nmr₂ : size ml + size mr + 1 ≤ delta * size r\nr0 : size r > 0\nmm : ¬size ml + size mr ≤ 1\nmm₁ : size ml ≤ delta * size mr\nmm₂ : size mr ≤ delta * size ml\nml0 : size ml > 0\nthis : 2 * size l ≤ size ml + size mr + 1\n⊢ size mr + size r + 1 ≤ delta * (size l + size ml + 1)\n[PROOFSTEP]\nexact Valid'.node4L_lemma₅ lr₂ mr₁ mm₂\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\na b c : ℕ\nH2 : 3 * a ≤ b + c\nhb₂ : c ≤ 3 * b\n⊢ a ≤ 3 * b\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\na b c : ℕ\nH3 : 2 * (b + c) ≤ 9 * a + 3\nh : b < 2 * c\n⊢ b < 3 * a + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\na b c : ℕ\nH2 : 3 * a ≤ b + c\nh : b < 2 * c\n⊢ a + b < 3 * c\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\na b : ℕ\nH3 : 2 * b ≤ 9 * a + 3\n⊢ 3 * b ≤ 16 * a + 9\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH1 : ¬size l + size r ≤ 1\nH2 : delta * size l < size r\nH3 : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\n⊢ Valid' o₁ (Ordnode.rotateL l x r) o₂\n[PROOFSTEP]\ncases' r with rs rl rx rr\n[GOAL]\ncase nil\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) nil o₂\nH1 : ¬size l + size nil ≤ 1\nH2 : delta * size l < size nil\nH3 : 2 * size nil ≤ 9 * size l + 5 ∨ size nil ≤ 3\n⊢ Valid' o₁ (Ordnode.rotateL l x nil) o₂\n[PROOFSTEP]\ncases H2\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l < size (Ordnode.node rs rl rx rr)\nH3 : 2 * size (Ordnode.node rs rl rx rr) ≤ 9 * size l + 5 ∨ size (Ordnode.node rs rl rx rr) ≤ 3\n⊢ Valid' o₁ (Ordnode.rotateL l x (Ordnode.node rs rl rx rr)) o₂\n[PROOFSTEP]\nrw [hr.2.size_eq, Nat.lt_succ_iff] at H2 \n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * size (Ordnode.node rs rl rx rr) ≤ 9 * size l + 5 ∨ size (Ordnode.node rs rl rx rr) ≤ 3\n⊢ Valid' o₁ (Ordnode.rotateL l x (Ordnode.node rs rl rx rr)) o₂\n[PROOFSTEP]\nrw [hr.2.size_eq] at H3 \n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr + 1) ≤ 9 * size l + 5 ∨ size rl + size rr + 1 ≤ 3\n⊢ Valid' o₁ (Ordnode.rotateL l x (Ordnode.node rs rl rx rr)) o₂\n[PROOFSTEP]\nreplace H3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2 :=\n  H3.imp (@Nat.le_of_add_le_add_right _ 2 _) Nat.le_of_succ_le_succ\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\n⊢ Valid' o₁ (Ordnode.rotateL l x (Ordnode.node rs rl rx rr)) o₂\n[PROOFSTEP]\nhave H3_0 : size l = 0 → size rl + size rr ≤ 2 := by\n  intro l0; rw [l0] at H3 \n  exact (or_iff_right_of_imp fun h => (mul_le_mul_left (by decide)).1 (le_trans h (by decide))).1 H3\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\n⊢ size l = 0 → size rl + size rr ≤ 2\n[PROOFSTEP]\nintro l0\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nl0 : size l = 0\n⊢ size rl + size rr ≤ 2\n[PROOFSTEP]\nrw [l0] at H3 \n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * 0 + 3 ∨ size rl + size rr ≤ 2\nl0 : size l = 0\n⊢ size rl + size rr ≤ 2\n[PROOFSTEP]\nexact (or_iff_right_of_imp fun h => (mul_le_mul_left (by decide)).1 (le_trans h (by decide))).1 H3\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * 0 + 3 ∨ size rl + size rr ≤ 2\nl0 : size l = 0\nh : 2 * (size rl + size rr) ≤ 9 * 0 + 3\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * 0 + 3 ∨ size rl + size rr ≤ 2\nl0 : size l = 0\nh : 2 * (size rl + size rr) ≤ 9 * 0 + 3\n⊢ 9 * 0 + 3 ≤ 2 * 2\n[PROOFSTEP]\ndecide\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\n⊢ Valid' o₁ (Ordnode.rotateL l x (Ordnode.node rs rl rx rr)) o₂\n[PROOFSTEP]\nhave H3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3 := fun l0 : 1 ≤ size l =>\n  (or_iff_left_of_imp <| by intro; linarith).1 H3\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nl0 : 1 ≤ size l\n⊢ size rl + size rr ≤ 2 → 2 * (size rl + size rr) ≤ 9 * size l + 3\n[PROOFSTEP]\nintro\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nl0 : 1 ≤ size l\na✝ : size rl + size rr ≤ 2\n⊢ 2 * (size rl + size rr) ≤ 9 * size l + 3\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\n⊢ Valid' o₁ (Ordnode.rotateL l x (Ordnode.node rs rl rx rr)) o₂\n[PROOFSTEP]\nhave ablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1 := by intros; linarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\n⊢ ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\na✝² b✝ : ℕ\na✝¹ : 1 ≤ a✝²\na✝ : a✝² + b✝ ≤ 2\n⊢ b✝ ≤ 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\n⊢ Valid' o₁ (Ordnode.rotateL l x (Ordnode.node rs rl rx rr)) o₂\n[PROOFSTEP]\nhave hlp : size l > 0 → ¬size rl + size rr ≤ 1 := fun l0 hb =>\n  absurd (le_trans (le_trans (Nat.mul_le_mul_left _ l0) H2) hb) (by decide)\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nl0 : size l > 0\nhb : size rl + size rr ≤ 1\n⊢ ¬delta * Nat.succ 0 ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\n⊢ Valid' o₁ (Ordnode.rotateL l x (Ordnode.node rs rl rx rr)) o₂\n[PROOFSTEP]\nrw [rotateL]\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\n⊢ Valid' o₁ (if size rl < ratio * size rr then Ordnode.node3L l x rl rx rr else Ordnode.node4L l x rl rx rr) o₂\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\n⊢ Valid' o₁ (Ordnode.node3L l x rl rx rr) o₂\n[PROOFSTEP]\nhave rr0 : size rr > 0 := (mul_lt_mul_left (by decide)).1 (lt_of_le_of_lt (Nat.zero_le _) h : ratio * 0 < _)\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\n⊢ 0 < ratio\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\n⊢ Valid' o₁ (Ordnode.node3L l x rl rx rr) o₂\n[PROOFSTEP]\nsuffices BalancedSz (size l) (size rl) ∧ BalancedSz (size l + size rl + 1) (size rr) by\n  exact hl.node3L hr.left hr.right this.1 this.2\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nthis : BalancedSz (size l) (size rl) ∧ BalancedSz (size l + size rl + 1) (size rr)\n⊢ Valid' o₁ (Ordnode.node3L l x rl rx rr) o₂\n[PROOFSTEP]\nexact hl.node3L hr.left hr.right this.1 this.2\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\n⊢ BalancedSz (size l) (size rl) ∧ BalancedSz (size l + size rl + 1) (size rr)\n[PROOFSTEP]\ncases' Nat.eq_zero_or_pos (size l) with l0 l0\n[GOAL]\ncase pos.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l = 0\n⊢ BalancedSz (size l) (size rl) ∧ BalancedSz (size l + size rl + 1) (size rr)\n[PROOFSTEP]\nrw [l0]\n[GOAL]\ncase pos.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l = 0\n⊢ BalancedSz 0 (size rl) ∧ BalancedSz (0 + size rl + 1) (size rr)\n[PROOFSTEP]\nreplace H3 := H3_0 l0\n[GOAL]\ncase pos.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\n⊢ BalancedSz 0 (size rl) ∧ BalancedSz (0 + size rl + 1) (size rr)\n[PROOFSTEP]\nhave := hr.3.1\n[GOAL]\ncase pos.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\nthis : BalancedSz (size rl) (size rr)\n⊢ BalancedSz 0 (size rl) ∧ BalancedSz (0 + size rl + 1) (size rr)\n[PROOFSTEP]\ncases' Nat.eq_zero_or_pos (size rl) with rl0 rl0\n[GOAL]\ncase pos.inl.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\nthis : BalancedSz (size rl) (size rr)\nrl0 : size rl = 0\n⊢ BalancedSz 0 (size rl) ∧ BalancedSz (0 + size rl + 1) (size rr)\n[PROOFSTEP]\nrw [rl0] at this ⊢\n[GOAL]\ncase pos.inl.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\nthis : BalancedSz 0 (size rr)\nrl0 : size rl = 0\n⊢ BalancedSz 0 0 ∧ BalancedSz (0 + 0 + 1) (size rr)\n[PROOFSTEP]\nrw [le_antisymm (balancedSz_zero.1 this.symm) rr0]\n[GOAL]\ncase pos.inl.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\nthis : BalancedSz 0 (size rr)\nrl0 : size rl = 0\n⊢ BalancedSz 0 0 ∧ BalancedSz (0 + 0 + 1) 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos.inl.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\nthis : BalancedSz (size rl) (size rr)\nrl0 : size rl > 0\n⊢ BalancedSz 0 (size rl) ∧ BalancedSz (0 + size rl + 1) (size rr)\n[PROOFSTEP]\nhave rr1 : size rr = 1 := le_antisymm (ablem rl0 H3) rr0\n[GOAL]\ncase pos.inl.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\nthis : BalancedSz (size rl) (size rr)\nrl0 : size rl > 0\nrr1 : size rr = 1\n⊢ BalancedSz 0 (size rl) ∧ BalancedSz (0 + size rl + 1) (size rr)\n[PROOFSTEP]\nrw [add_comm] at H3 \n[GOAL]\ncase pos.inl.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l = 0\nH3 : size rr + size rl ≤ 2\nthis : BalancedSz (size rl) (size rr)\nrl0 : size rl > 0\nrr1 : size rr = 1\n⊢ BalancedSz 0 (size rl) ∧ BalancedSz (0 + size rl + 1) (size rr)\n[PROOFSTEP]\nrw [rr1, show size rl = 1 from le_antisymm (ablem rr0 H3) rl0]\n[GOAL]\ncase pos.inl.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l = 0\nH3 : size rr + size rl ≤ 2\nthis : BalancedSz (size rl) (size rr)\nrl0 : size rl > 0\nrr1 : size rr = 1\n⊢ BalancedSz 0 1 ∧ BalancedSz (0 + 1 + 1) 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase pos.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l > 0\n⊢ BalancedSz (size l) (size rl) ∧ BalancedSz (size l + size rl + 1) (size rr)\n[PROOFSTEP]\nreplace H3 := H3p l0\n[GOAL]\ncase pos.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l > 0\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3\n⊢ BalancedSz (size l) (size rl) ∧ BalancedSz (size l + size rl + 1) (size rr)\n[PROOFSTEP]\nrcases hr.3.1.resolve_left (hlp l0) with ⟨_, hb₂⟩\n[GOAL]\ncase pos.inr.intro\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l > 0\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3\nleft✝ : size rl ≤ delta * size rr\nhb₂ : size rr ≤ delta * size rl\n⊢ BalancedSz (size l) (size rl) ∧ BalancedSz (size l + size rl + 1) (size rr)\n[PROOFSTEP]\nrefine' ⟨Or.inr ⟨_, _⟩, Or.inr ⟨_, _⟩⟩\n[GOAL]\ncase pos.inr.intro.refine'_1\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l > 0\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3\nleft✝ : size rl ≤ delta * size rr\nhb₂ : size rr ≤ delta * size rl\n⊢ size l ≤ delta * size rl\n[PROOFSTEP]\nexact Valid'.rotateL_lemma₁ H2 hb₂\n[GOAL]\ncase pos.inr.intro.refine'_2\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l > 0\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3\nleft✝ : size rl ≤ delta * size rr\nhb₂ : size rr ≤ delta * size rl\n⊢ size rl ≤ delta * size l\n[PROOFSTEP]\nexact Nat.le_of_lt_succ (Valid'.rotateL_lemma₂ H3 h)\n[GOAL]\ncase pos.inr.intro.refine'_3\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l > 0\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3\nleft✝ : size rl ≤ delta * size rr\nhb₂ : size rr ≤ delta * size rl\n⊢ size l + size rl + 1 ≤ delta * size rr\n[PROOFSTEP]\nexact Valid'.rotateL_lemma₃ H2 h\n[GOAL]\ncase pos.inr.intro.refine'_4\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : size rl < ratio * size rr\nrr0 : size rr > 0\nl0 : size l > 0\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3\nleft✝ : size rl ≤ delta * size rr\nhb₂ : size rr ≤ delta * size rl\n⊢ size rr ≤ delta * (size l + size rl + 1)\n[PROOFSTEP]\nexact le_trans hb₂ (Nat.mul_le_mul_left _ <| le_trans (Nat.le_add_left _ _) (Nat.le_add_right _ _))\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ¬size rl < ratio * size rr\n⊢ Valid' o₁ (Ordnode.node4L l x rl rx rr) o₂\n[PROOFSTEP]\ncases' Nat.eq_zero_or_pos (size rl) with rl0 rl0\n[GOAL]\ncase neg.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ¬size rl < ratio * size rr\nrl0 : size rl = 0\n⊢ Valid' o₁ (Ordnode.node4L l x rl rx rr) o₂\n[PROOFSTEP]\nrw [rl0, not_lt, le_zero_iff, Nat.mul_eq_zero] at h \n[GOAL]\ncase neg.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ratio = 0 ∨ size rr = 0\nrl0 : size rl = 0\n⊢ Valid' o₁ (Ordnode.node4L l x rl rx rr) o₂\n[PROOFSTEP]\nreplace h := h.resolve_left (by decide)\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ratio = 0 ∨ size rr = 0\nrl0 : size rl = 0\n⊢ ¬ratio = 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase neg.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nrl0 : size rl = 0\nh : size rr = 0\n⊢ Valid' o₁ (Ordnode.node4L l x rl rx rr) o₂\n[PROOFSTEP]\nerw [rl0, h, le_zero_iff, Nat.mul_eq_zero] at H2 \n[GOAL]\ncase neg.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta = 0 ∨ size l = 0\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nrl0 : size rl = 0\nh : size rr = 0\n⊢ Valid' o₁ (Ordnode.node4L l x rl rx rr) o₂\n[PROOFSTEP]\nrw [hr.2.size_eq, rl0, h, H2.resolve_left (by decide)] at H1 \n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + (0 + 0 + 1) ≤ 1\nH2 : delta = 0 ∨ size l = 0\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nrl0 : size rl = 0\nh : size rr = 0\n⊢ ¬delta = 0\n[PROOFSTEP]\ndecide\n[GOAL]\ncase neg.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬0 + (0 + 0 + 1) ≤ 1\nH2 : delta = 0 ∨ size l = 0\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nrl0 : size rl = 0\nh : size rr = 0\n⊢ Valid' o₁ (Ordnode.node4L l x rl rx rr) o₂\n[PROOFSTEP]\ncases H1 (by decide)\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬0 + (0 + 0 + 1) ≤ 1\nH2 : delta = 0 ∨ size l = 0\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nrl0 : size rl = 0\nh : size rr = 0\n⊢ 0 + (0 + 0 + 1) ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\ncase neg.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ¬size rl < ratio * size rr\nrl0 : size rl > 0\n⊢ Valid' o₁ (Ordnode.node4L l x rl rx rr) o₂\n[PROOFSTEP]\nrefine' hl.node4L hr.left hr.right rl0 _\n[GOAL]\ncase neg.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ¬size rl < ratio * size rr\nrl0 : size rl > 0\n⊢ size l = 0 ∧ size rl = 1 ∧ size rr ≤ 1 ∨\n    0 < size l ∧\n      ratio * size rr ≤ size rl ∧\n        delta * size l ≤ size rl + size rr ∧ 3 * (size rl + size rr) ≤ 16 * size l + 9 ∧ size rl ≤ delta * size rr\n[PROOFSTEP]\ncases' Nat.eq_zero_or_pos (size l) with l0 l0\n[GOAL]\ncase neg.inr.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ¬size rl < ratio * size rr\nrl0 : size rl > 0\nl0 : size l = 0\n⊢ size l = 0 ∧ size rl = 1 ∧ size rr ≤ 1 ∨\n    0 < size l ∧\n      ratio * size rr ≤ size rl ∧\n        delta * size l ≤ size rl + size rr ∧ 3 * (size rl + size rr) ≤ 16 * size l + 9 ∧ size rl ≤ delta * size rr\n[PROOFSTEP]\nreplace H3 := H3_0 l0\n[GOAL]\ncase neg.inr.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ¬size rl < ratio * size rr\nrl0 : size rl > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\n⊢ size l = 0 ∧ size rl = 1 ∧ size rr ≤ 1 ∨\n    0 < size l ∧\n      ratio * size rr ≤ size rl ∧\n        delta * size l ≤ size rl + size rr ∧ 3 * (size rl + size rr) ≤ 16 * size l + 9 ∧ size rl ≤ delta * size rr\n[PROOFSTEP]\ncases' Nat.eq_zero_or_pos (size rr) with rr0 rr0\n[GOAL]\ncase neg.inr.inl.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ¬size rl < ratio * size rr\nrl0 : size rl > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\nrr0 : size rr = 0\n⊢ size l = 0 ∧ size rl = 1 ∧ size rr ≤ 1 ∨\n    0 < size l ∧\n      ratio * size rr ≤ size rl ∧\n        delta * size l ≤ size rl + size rr ∧ 3 * (size rl + size rr) ≤ 16 * size l + 9 ∧ size rl ≤ delta * size rr\n[PROOFSTEP]\nhave := hr.3.1\n[GOAL]\ncase neg.inr.inl.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ¬size rl < ratio * size rr\nrl0 : size rl > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\nrr0 : size rr = 0\nthis : BalancedSz (size rl) (size rr)\n⊢ size l = 0 ∧ size rl = 1 ∧ size rr ≤ 1 ∨\n    0 < size l ∧\n      ratio * size rr ≤ size rl ∧\n        delta * size l ≤ size rl + size rr ∧ 3 * (size rl + size rr) ≤ 16 * size l + 9 ∧ size rl ≤ delta * size rr\n[PROOFSTEP]\nrw [rr0] at this \n[GOAL]\ncase neg.inr.inl.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ¬size rl < ratio * size rr\nrl0 : size rl > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\nrr0 : size rr = 0\nthis : BalancedSz (size rl) 0\n⊢ size l = 0 ∧ size rl = 1 ∧ size rr ≤ 1 ∨\n    0 < size l ∧\n      ratio * size rr ≤ size rl ∧\n        delta * size l ≤ size rl + size rr ∧ 3 * (size rl + size rr) ≤ 16 * size l + 9 ∧ size rl ≤ delta * size rr\n[PROOFSTEP]\nexact Or.inl ⟨l0, le_antisymm (balancedSz_zero.1 this) rl0, rr0.symm ▸ zero_le_one⟩\n[GOAL]\ncase neg.inr.inl.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ¬size rl < ratio * size rr\nrl0 : size rl > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\nrr0 : size rr > 0\n⊢ size l = 0 ∧ size rl = 1 ∧ size rr ≤ 1 ∨\n    0 < size l ∧\n      ratio * size rr ≤ size rl ∧\n        delta * size l ≤ size rl + size rr ∧ 3 * (size rl + size rr) ≤ 16 * size l + 9 ∧ size rl ≤ delta * size rr\n[PROOFSTEP]\nexact Or.inl ⟨l0, le_antisymm (ablem rr0 <| by rwa [add_comm]) rl0, ablem rl0 H3⟩\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ¬size rl < ratio * size rr\nrl0 : size rl > 0\nl0 : size l = 0\nH3 : size rl + size rr ≤ 2\nrr0 : size rr > 0\n⊢ size rr + size rl ≤ 2\n[PROOFSTEP]\nrwa [add_comm]\n[GOAL]\ncase neg.inr.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' (↑x) (Ordnode.node rs rl rx rr) o₂\nH1 : ¬size l + size (Ordnode.node rs rl rx rr) ≤ 1\nH2 : delta * size l ≤ size rl + size rr\nH3 : 2 * (size rl + size rr) ≤ 9 * size l + 3 ∨ size rl + size rr ≤ 2\nH3_0 : size l = 0 → size rl + size rr ≤ 2\nH3p : size l > 0 → 2 * (size rl + size rr) ≤ 9 * size l + 3\nablem : ∀ {a b : ℕ}, 1 ≤ a → a + b ≤ 2 → b ≤ 1\nhlp : size l > 0 → ¬size rl + size rr ≤ 1\nh : ¬size rl < ratio * size rr\nrl0 : size rl > 0\nl0 : size l > 0\n⊢ size l = 0 ∧ size rl = 1 ∧ size rr ≤ 1 ∨\n    0 < size l ∧\n      ratio * size rr ≤ size rl ∧\n        delta * size l ≤ size rl + size rr ∧ 3 * (size rl + size rr) ≤ 16 * size l + 9 ∧ size rl ≤ delta * size rr\n[PROOFSTEP]\nexact Or.inr ⟨l0, not_lt.1 h, H2, Valid'.rotateL_lemma₄ (H3p l0), (hr.3.1.resolve_left (hlp l0)).1⟩\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH1 : ¬size l + size r ≤ 1\nH2 : delta * size r < size l\nH3 : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\n⊢ Valid' o₁ (Ordnode.rotateR l x r) o₂\n[PROOFSTEP]\nrefine' Valid'.dual_iff.2 _\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH1 : ¬size l + size r ≤ 1\nH2 : delta * size r < size l\nH3 : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\n⊢ Valid' o₂ (Ordnode.dual (Ordnode.rotateR l x r)) o₁\n[PROOFSTEP]\nrw [dual_rotateR]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH1 : ¬size l + size r ≤ 1\nH2 : delta * size r < size l\nH3 : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\n⊢ Valid' o₂ (Ordnode.rotateL (Ordnode.dual r) x (Ordnode.dual l)) o₁\n[PROOFSTEP]\nrefine' hr.dual.rotateL hl.dual _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH1 : ¬size l + size r ≤ 1\nH2 : delta * size r < size l\nH3 : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\n⊢ ¬size (Ordnode.dual r) + size (Ordnode.dual l) ≤ 1\n[PROOFSTEP]\nrwa [size_dual, size_dual, add_comm]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH1 : ¬size l + size r ≤ 1\nH2 : delta * size r < size l\nH3 : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\n⊢ delta * size (Ordnode.dual r) < size (Ordnode.dual l)\n[PROOFSTEP]\nrwa [size_dual, size_dual]\n[GOAL]\ncase refine'_3\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH1 : ¬size l + size r ≤ 1\nH2 : delta * size r < size l\nH3 : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\n⊢ 2 * size (Ordnode.dual l) ≤ 9 * size (Ordnode.dual r) + 5 ∨ size (Ordnode.dual l) ≤ 3\n[PROOFSTEP]\nrwa [size_dual, size_dual]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\nH₂ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\n⊢ Valid' o₁ (balance' l x r) o₂\n[PROOFSTEP]\nrw [balance']\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\nH₂ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\n⊢ Valid' o₁\n    (if size l + size r ≤ 1 then Ordnode.node' l x r\n    else\n      if size r > delta * size l then Ordnode.rotateL l x r\n      else if size l > delta * size r then Ordnode.rotateR l x r else Ordnode.node' l x r)\n    o₂\n[PROOFSTEP]\nsplit_ifs with h h_1 h_2\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\nH₂ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\nh : size l + size r ≤ 1\n⊢ Valid' o₁ (Ordnode.node' l x r) o₂\n[PROOFSTEP]\nexact hl.node' hr (Or.inl h)\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\nH₂ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\nh : ¬size l + size r ≤ 1\nh_1 : size r > delta * size l\n⊢ Valid' o₁ (Ordnode.rotateL l x r) o₂\n[PROOFSTEP]\nexact hl.rotateL hr h h_1 H₁\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\nH₂ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\nh : ¬size l + size r ≤ 1\nh_1 : ¬size r > delta * size l\nh_2 : size l > delta * size r\n⊢ Valid' o₁ (Ordnode.rotateR l x r) o₂\n[PROOFSTEP]\nexact hl.rotateR hr h h_2 H₂\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\nH₂ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\nh : ¬size l + size r ≤ 1\nh_1 : ¬size r > delta * size l\nh_2 : ¬size l > delta * size r\n⊢ Valid' o₁ (Ordnode.node' l x r) o₂\n[PROOFSTEP]\nexact hl.node' hr (Or.inr ⟨not_lt.1 h_2, not_lt.1 h_1⟩)\n[GOAL]\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl : Ordnode α\nl' : ℕ\nr : Ordnode α\nr' : ℕ\nH1 : BalancedSz l' r'\nH2 : Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l'\n⊢ 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\n[PROOFSTEP]\nsuffices @size α r ≤ 3 * (size l + 1)\n  by\n  cases' Nat.eq_zero_or_pos (size l) with l0 l0\n  · apply Or.inr; rwa [l0] at this \n  change 1 ≤ _ at l0 ; apply Or.inl; linarith\n[GOAL]\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl : Ordnode α\nl' : ℕ\nr : Ordnode α\nr' : ℕ\nH1 : BalancedSz l' r'\nH2 : Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l'\nthis : size r ≤ 3 * (size l + 1)\n⊢ 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\n[PROOFSTEP]\ncases' Nat.eq_zero_or_pos (size l) with l0 l0\n[GOAL]\ncase inl\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl : Ordnode α\nl' : ℕ\nr : Ordnode α\nr' : ℕ\nH1 : BalancedSz l' r'\nH2 : Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l'\nthis : size r ≤ 3 * (size l + 1)\nl0 : size l = 0\n⊢ 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\n[PROOFSTEP]\napply Or.inr\n[GOAL]\ncase inl.h\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl : Ordnode α\nl' : ℕ\nr : Ordnode α\nr' : ℕ\nH1 : BalancedSz l' r'\nH2 : Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l'\nthis : size r ≤ 3 * (size l + 1)\nl0 : size l = 0\n⊢ size r ≤ 3\n[PROOFSTEP]\nrwa [l0] at this \n[GOAL]\ncase inr\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl : Ordnode α\nl' : ℕ\nr : Ordnode α\nr' : ℕ\nH1 : BalancedSz l' r'\nH2 : Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l'\nthis : size r ≤ 3 * (size l + 1)\nl0 : size l > 0\n⊢ 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\n[PROOFSTEP]\nchange 1 ≤ _ at l0 \n[GOAL]\ncase inr\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl : Ordnode α\nl' : ℕ\nr : Ordnode α\nr' : ℕ\nH1 : BalancedSz l' r'\nH2 : Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l'\nthis : size r ≤ 3 * (size l + 1)\nl0 : 1 ≤ size l\n⊢ 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\n[PROOFSTEP]\napply Or.inl\n[GOAL]\ncase inr.h\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl : Ordnode α\nl' : ℕ\nr : Ordnode α\nr' : ℕ\nH1 : BalancedSz l' r'\nH2 : Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l'\nthis : size r ≤ 3 * (size l + 1)\nl0 : 1 ≤ size l\n⊢ 2 * size r ≤ 9 * size l + 5\n[PROOFSTEP]\nlinarith\n[GOAL]\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl : Ordnode α\nl' : ℕ\nr : Ordnode α\nr' : ℕ\nH1 : BalancedSz l' r'\nH2 : Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l'\n⊢ size r ≤ 3 * (size l + 1)\n[PROOFSTEP]\nrcases H2 with (⟨hl, rfl⟩ | ⟨hr, rfl⟩)\n[GOAL]\ncase inl.intro\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl : Ordnode α\nl' : ℕ\nr : Ordnode α\nhl : Nat.dist (size l) l' ≤ 1\nH1 : BalancedSz l' (size r)\n⊢ size r ≤ 3 * (size l + 1)\n[PROOFSTEP]\nrcases H1 with (h | ⟨_, h₂⟩)\n[GOAL]\ncase inr.intro\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl r : Ordnode α\nr' : ℕ\nhr : Nat.dist (size r) r' ≤ 1\nH1 : BalancedSz (size l) r'\n⊢ size r ≤ 3 * (size l + 1)\n[PROOFSTEP]\nrcases H1 with (h | ⟨_, h₂⟩)\n[GOAL]\ncase inl.intro.inl\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl : Ordnode α\nl' : ℕ\nr : Ordnode α\nhl : Nat.dist (size l) l' ≤ 1\nh : l' + size r ≤ 1\n⊢ size r ≤ 3 * (size l + 1)\n[PROOFSTEP]\nexact le_trans (Nat.le_add_left _ _) (le_trans h (Nat.le_add_left _ _))\n[GOAL]\ncase inl.intro.inr.intro\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl : Ordnode α\nl' : ℕ\nr : Ordnode α\nhl : Nat.dist (size l) l' ≤ 1\nleft✝ : l' ≤ delta * size r\nh₂ : size r ≤ delta * l'\n⊢ size r ≤ 3 * (size l + 1)\n[PROOFSTEP]\nexact le_trans h₂ (Nat.mul_le_mul_left _ <| le_trans (Nat.dist_tri_right _ _) (Nat.add_le_add_left hl _))\n[GOAL]\ncase inr.intro.inl\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl r : Ordnode α\nr' : ℕ\nhr : Nat.dist (size r) r' ≤ 1\nh : size l + r' ≤ 1\n⊢ size r ≤ 3 * (size l + 1)\n[PROOFSTEP]\nexact le_trans (Nat.dist_tri_left' _ _) (le_trans (add_le_add hr (le_trans (Nat.le_add_left _ _) h)) (by linarith))\n[GOAL]\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl r : Ordnode α\nr' : ℕ\nhr : Nat.dist (size r) r' ≤ 1\nh : size l + r' ≤ 1\n⊢ 1 + 1 ≤ 3 * (size l + 1)\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase inr.intro.inr.intro\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl r : Ordnode α\nr' : ℕ\nhr : Nat.dist (size r) r' ≤ 1\nleft✝ : size l ≤ delta * r'\nh₂ : r' ≤ delta * size l\n⊢ size r ≤ 3 * (size l + 1)\n[PROOFSTEP]\nrw [Nat.mul_succ]\n[GOAL]\ncase inr.intro.inr.intro\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl r : Ordnode α\nr' : ℕ\nhr : Nat.dist (size r) r' ≤ 1\nleft✝ : size l ≤ delta * r'\nh₂ : r' ≤ delta * size l\n⊢ size r ≤ 3 * size l + 3\n[PROOFSTEP]\nexact le_trans (Nat.dist_tri_right' _ _) (add_le_add h₂ (le_trans hr (by decide)))\n[GOAL]\nα✝ : Type u_1\ninst✝ : Preorder α✝\nα : Type u_2\nl r : Ordnode α\nr' : ℕ\nhr : Nat.dist (size r) r' ≤ 1\nleft✝ : size l ≤ delta * r'\nh₂ : r' ≤ delta * size l\n⊢ 1 ≤ 3\n[PROOFSTEP]\ndecide\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH : ∃ l' r', BalancedSz l' r' ∧ (Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l')\n⊢ Valid' o₁ (Ordnode.balance l x r) o₂\n[PROOFSTEP]\nrw [balance_eq_balance' hl.3 hr.3 hl.2 hr.2]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH : ∃ l' r', BalancedSz l' r' ∧ (Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l')\n⊢ Valid' o₁ (Ordnode.balance' l x r) o₂\n[PROOFSTEP]\nexact hl.balance' hr H\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size l = 0 → size r ≤ 1\nH₂ : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l\nH₃ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\n⊢ Valid' o₁ (balanceL l x r) o₂\n[PROOFSTEP]\nrw [balanceL_eq_balance hl.2 hr.2 H₁ H₂, balance_eq_balance' hl.3 hr.3 hl.2 hr.2]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size l = 0 → size r ≤ 1\nH₂ : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l\nH₃ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\n⊢ Valid' o₁ (Ordnode.balance' l x r) o₂\n[PROOFSTEP]\nrefine' hl.balance'_aux hr (Or.inl _) H₃\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size l = 0 → size r ≤ 1\nH₂ : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l\nH₃ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\n⊢ 2 * size r ≤ 9 * size l + 5\n[PROOFSTEP]\ncases' Nat.eq_zero_or_pos (size r) with r0 r0\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size l = 0 → size r ≤ 1\nH₂ : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l\nH₃ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\nr0 : size r = 0\n⊢ 2 * size r ≤ 9 * size l + 5\n[PROOFSTEP]\nrw [r0]\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size l = 0 → size r ≤ 1\nH₂ : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l\nH₃ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\nr0 : size r = 0\n⊢ 2 * 0 ≤ 9 * size l + 5\n[PROOFSTEP]\nexact Nat.zero_le _\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size l = 0 → size r ≤ 1\nH₂ : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l\nH₃ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\nr0 : size r > 0\n⊢ 2 * size r ≤ 9 * size l + 5\n[PROOFSTEP]\ncases' Nat.eq_zero_or_pos (size l) with l0 l0\n[GOAL]\ncase inr.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size l = 0 → size r ≤ 1\nH₂ : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l\nH₃ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\nr0 : size r > 0\nl0 : size l = 0\n⊢ 2 * size r ≤ 9 * size l + 5\n[PROOFSTEP]\nrw [l0]\n[GOAL]\ncase inr.inl\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size l = 0 → size r ≤ 1\nH₂ : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l\nH₃ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\nr0 : size r > 0\nl0 : size l = 0\n⊢ 2 * size r ≤ 9 * 0 + 5\n[PROOFSTEP]\nexact le_trans (Nat.mul_le_mul_left _ (H₁ l0)) (by decide)\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size l = 0 → size r ≤ 1\nH₂ : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l\nH₃ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\nr0 : size r > 0\nl0 : size l = 0\n⊢ 2 * 1 ≤ 9 * 0 + 5\n[PROOFSTEP]\ndecide\n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size l = 0 → size r ≤ 1\nH₂ : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l\nH₃ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\nr0 : size r > 0\nl0 : size l > 0\n⊢ 2 * size r ≤ 9 * size l + 5\n[PROOFSTEP]\nreplace H₂ : _ ≤ 3 * _ := H₂ l0 r0\n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size l = 0 → size r ≤ 1\nH₃ : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3\nr0 : size r > 0\nl0 : size l > 0\nH₂ : size r ≤ 3 * size l\n⊢ 2 * size r ≤ 9 * size l + 5\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r'\n⊢ Valid' o₁ (Ordnode.balanceL l x r) o₂\n[PROOFSTEP]\nrw [balanceL_eq_balance' hl.3 hr.3 hl.2 hr.2 H]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r'\n⊢ Valid' o₁ (Ordnode.balance' l x r) o₂\n[PROOFSTEP]\nrefine' hl.balance' hr _\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r'\n⊢ ∃ l' r', BalancedSz l' r' ∧ (Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l')\n[PROOFSTEP]\nrcases H with (⟨l', e, H⟩ | ⟨r', e, H⟩)\n[GOAL]\ncase inl.intro.intro\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nl' : ℕ\ne : Raised l' (size l)\nH : BalancedSz l' (size r)\n⊢ ∃ l' r', BalancedSz l' r' ∧ (Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l')\n[PROOFSTEP]\nexact ⟨_, _, H, Or.inl ⟨e.dist_le', rfl⟩⟩\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nr' : ℕ\ne : Raised (size r) r'\nH : BalancedSz (size l) r'\n⊢ ∃ l' r', BalancedSz l' r' ∧ (Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l')\n[PROOFSTEP]\nexact ⟨_, _, H, Or.inr ⟨e.dist_le, rfl⟩⟩\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size r = 0 → size l ≤ 1\nH₂ : 1 ≤ size r → 1 ≤ size l → size l ≤ delta * size r\nH₃ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\n⊢ Valid' o₁ (balanceR l x r) o₂\n[PROOFSTEP]\nrw [Valid'.dual_iff, dual_balanceR]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size r = 0 → size l ≤ 1\nH₂ : 1 ≤ size r → 1 ≤ size l → size l ≤ delta * size r\nH₃ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\n⊢ Valid' o₂ (Ordnode.balanceL (Ordnode.dual r) x (Ordnode.dual l)) o₁\n[PROOFSTEP]\nhave := hr.dual.balanceL_aux hl.dual\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size r = 0 → size l ≤ 1\nH₂ : 1 ≤ size r → 1 ≤ size l → size l ≤ delta * size r\nH₃ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\nthis :\n  (size (Ordnode.dual r) = 0 → size (Ordnode.dual l) ≤ 1) →\n    (1 ≤ size (Ordnode.dual r) → 1 ≤ size (Ordnode.dual l) → size (Ordnode.dual l) ≤ delta * size (Ordnode.dual r)) →\n      2 * size (Ordnode.dual r) ≤ 9 * size (Ordnode.dual l) + 5 ∨ size (Ordnode.dual r) ≤ 3 →\n        Valid' o₂ (Ordnode.balanceL (Ordnode.dual r) x (Ordnode.dual l)) o₁\n⊢ Valid' o₂ (Ordnode.balanceL (Ordnode.dual r) x (Ordnode.dual l)) o₁\n[PROOFSTEP]\nrw [size_dual, size_dual] at this \n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH₁ : size r = 0 → size l ≤ 1\nH₂ : 1 ≤ size r → 1 ≤ size l → size l ≤ delta * size r\nH₃ : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3\nthis :\n  (size r = 0 → size l ≤ 1) →\n    (1 ≤ size r → 1 ≤ size l → size l ≤ delta * size r) →\n      2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3 → Valid' o₂ (Ordnode.balanceL (Ordnode.dual r) x (Ordnode.dual l)) o₁\n⊢ Valid' o₂ (Ordnode.balanceL (Ordnode.dual r) x (Ordnode.dual l)) o₁\n[PROOFSTEP]\nexact this H₁ H₂ H₃\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH : (∃ l', Raised (size l) l' ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r'\n⊢ Valid' o₁ (Ordnode.balanceR l x r) o₂\n[PROOFSTEP]\nrw [Valid'.dual_iff, dual_balanceR]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l ↑x\nhr : Valid' (↑x) r o₂\nH : (∃ l', Raised (size l) l' ∧ BalancedSz l' (size r)) ∨ ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r'\n⊢ Valid' o₂ (Ordnode.balanceL (Ordnode.dual r) x (Ordnode.dual l)) o₁\n[PROOFSTEP]\nexact hr.dual.balanceL hl.dual (balance_sz_dual H)\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nH : Valid' o₁ (Ordnode.node s l x r) o₂\n⊢ Valid' o₁ (eraseMax (Ordnode.node' l x r)) ↑(findMax' x r) ∧\n    size (Ordnode.node' l x r) = size (eraseMax (Ordnode.node' l x r)) + 1\n[PROOFSTEP]\nhave := H.2.eq_node'\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nH : Valid' o₁ (Ordnode.node s l x r) o₂\nthis : Ordnode.node s l x r = Ordnode.node' l x r\n⊢ Valid' o₁ (eraseMax (Ordnode.node' l x r)) ↑(findMax' x r) ∧\n    size (Ordnode.node' l x r) = size (eraseMax (Ordnode.node' l x r)) + 1\n[PROOFSTEP]\nrw [this] at H \n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nH : Valid' o₁ (Ordnode.node' l x r) o₂\nthis : Ordnode.node s l x r = Ordnode.node' l x r\n⊢ Valid' o₁ (eraseMax (Ordnode.node' l x r)) ↑(findMax' x r) ∧\n    size (Ordnode.node' l x r) = size (eraseMax (Ordnode.node' l x r)) + 1\n[PROOFSTEP]\nclear this\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nH : Valid' o₁ (Ordnode.node' l x r) o₂\n⊢ Valid' o₁ (eraseMax (Ordnode.node' l x r)) ↑(findMax' x r) ∧\n    size (Ordnode.node' l x r) = size (eraseMax (Ordnode.node' l x r)) + 1\n[PROOFSTEP]\ninduction' r with rs rl rx rr _ IHrr generalizing l x o₁\n[GOAL]\ncase nil\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl✝ : Ordnode α\nx✝ : α\nr : Ordnode α\no₁✝ : WithBot α\no₂ : WithTop α\nH✝ : Valid' o₁✝ (Ordnode.node' l✝ x✝ r) o₂\nl : Ordnode α\nx : α\no₁ : WithBot α\nH : Valid' o₁ (Ordnode.node' l x nil) o₂\n⊢ Valid' o₁ (eraseMax (Ordnode.node' l x nil)) ↑(findMax' x nil) ∧\n    size (Ordnode.node' l x nil) = size (eraseMax (Ordnode.node' l x nil)) + 1\n[PROOFSTEP]\nexact ⟨H.left, rfl⟩\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl✝ : Ordnode α\nx✝ : α\nr : Ordnode α\no₁✝ : WithBot α\no₂ : WithTop α\nH✝ : Valid' o₁✝ (Ordnode.node' l✝ x✝ r) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nl_ih✝ :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rl) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rl)) ↑(findMax' x rl) ∧\n        size (Ordnode.node' l x rl) = size (eraseMax (Ordnode.node' l x rl)) + 1\nIHrr :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rr) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rr)) ↑(findMax' x rr) ∧\n        size (Ordnode.node' l x rr) = size (eraseMax (Ordnode.node' l x rr)) + 1\nl : Ordnode α\nx : α\no₁ : WithBot α\nH : Valid' o₁ (Ordnode.node' l x (Ordnode.node rs rl rx rr)) o₂\n⊢ Valid' o₁ (eraseMax (Ordnode.node' l x (Ordnode.node rs rl rx rr))) ↑(findMax' x (Ordnode.node rs rl rx rr)) ∧\n    size (Ordnode.node' l x (Ordnode.node rs rl rx rr)) =\n      size (eraseMax (Ordnode.node' l x (Ordnode.node rs rl rx rr))) + 1\n[PROOFSTEP]\nhave := H.2.2.2.eq_node'\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl✝ : Ordnode α\nx✝ : α\nr : Ordnode α\no₁✝ : WithBot α\no₂ : WithTop α\nH✝ : Valid' o₁✝ (Ordnode.node' l✝ x✝ r) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nl_ih✝ :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rl) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rl)) ↑(findMax' x rl) ∧\n        size (Ordnode.node' l x rl) = size (eraseMax (Ordnode.node' l x rl)) + 1\nIHrr :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rr) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rr)) ↑(findMax' x rr) ∧\n        size (Ordnode.node' l x rr) = size (eraseMax (Ordnode.node' l x rr)) + 1\nl : Ordnode α\nx : α\no₁ : WithBot α\nH : Valid' o₁ (Ordnode.node' l x (Ordnode.node rs rl rx rr)) o₂\nthis : Ordnode.node rs rl rx rr = Ordnode.node' rl rx rr\n⊢ Valid' o₁ (eraseMax (Ordnode.node' l x (Ordnode.node rs rl rx rr))) ↑(findMax' x (Ordnode.node rs rl rx rr)) ∧\n    size (Ordnode.node' l x (Ordnode.node rs rl rx rr)) =\n      size (eraseMax (Ordnode.node' l x (Ordnode.node rs rl rx rr))) + 1\n[PROOFSTEP]\nrw [this] at H ⊢\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl✝ : Ordnode α\nx✝ : α\nr : Ordnode α\no₁✝ : WithBot α\no₂ : WithTop α\nH✝ : Valid' o₁✝ (Ordnode.node' l✝ x✝ r) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nl_ih✝ :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rl) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rl)) ↑(findMax' x rl) ∧\n        size (Ordnode.node' l x rl) = size (eraseMax (Ordnode.node' l x rl)) + 1\nIHrr :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rr) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rr)) ↑(findMax' x rr) ∧\n        size (Ordnode.node' l x rr) = size (eraseMax (Ordnode.node' l x rr)) + 1\nl : Ordnode α\nx : α\no₁ : WithBot α\nH : Valid' o₁ (Ordnode.node' l x (Ordnode.node' rl rx rr)) o₂\nthis : Ordnode.node rs rl rx rr = Ordnode.node' rl rx rr\n⊢ Valid' o₁ (eraseMax (Ordnode.node' l x (Ordnode.node' rl rx rr))) ↑(findMax' x (Ordnode.node' rl rx rr)) ∧\n    size (Ordnode.node' l x (Ordnode.node' rl rx rr)) = size (eraseMax (Ordnode.node' l x (Ordnode.node' rl rx rr))) + 1\n[PROOFSTEP]\nrcases IHrr H.right with ⟨h, e⟩\n[GOAL]\ncase node.intro\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl✝ : Ordnode α\nx✝ : α\nr : Ordnode α\no₁✝ : WithBot α\no₂ : WithTop α\nH✝ : Valid' o₁✝ (Ordnode.node' l✝ x✝ r) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nl_ih✝ :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rl) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rl)) ↑(findMax' x rl) ∧\n        size (Ordnode.node' l x rl) = size (eraseMax (Ordnode.node' l x rl)) + 1\nIHrr :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rr) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rr)) ↑(findMax' x rr) ∧\n        size (Ordnode.node' l x rr) = size (eraseMax (Ordnode.node' l x rr)) + 1\nl : Ordnode α\nx : α\no₁ : WithBot α\nH : Valid' o₁ (Ordnode.node' l x (Ordnode.node' rl rx rr)) o₂\nthis : Ordnode.node rs rl rx rr = Ordnode.node' rl rx rr\nh : Valid' (↑x) (eraseMax (Ordnode.node' rl rx rr)) ↑(findMax' rx rr)\ne : size (Ordnode.node' rl rx rr) = size (eraseMax (Ordnode.node' rl rx rr)) + 1\n⊢ Valid' o₁ (eraseMax (Ordnode.node' l x (Ordnode.node' rl rx rr))) ↑(findMax' x (Ordnode.node' rl rx rr)) ∧\n    size (Ordnode.node' l x (Ordnode.node' rl rx rr)) = size (eraseMax (Ordnode.node' l x (Ordnode.node' rl rx rr))) + 1\n[PROOFSTEP]\nrefine' ⟨Valid'.balanceL H.left h (Or.inr ⟨_, Or.inr e, H.3.1⟩), _⟩\n[GOAL]\ncase node.intro\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl✝ : Ordnode α\nx✝ : α\nr : Ordnode α\no₁✝ : WithBot α\no₂ : WithTop α\nH✝ : Valid' o₁✝ (Ordnode.node' l✝ x✝ r) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nl_ih✝ :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rl) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rl)) ↑(findMax' x rl) ∧\n        size (Ordnode.node' l x rl) = size (eraseMax (Ordnode.node' l x rl)) + 1\nIHrr :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rr) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rr)) ↑(findMax' x rr) ∧\n        size (Ordnode.node' l x rr) = size (eraseMax (Ordnode.node' l x rr)) + 1\nl : Ordnode α\nx : α\no₁ : WithBot α\nH : Valid' o₁ (Ordnode.node' l x (Ordnode.node' rl rx rr)) o₂\nthis : Ordnode.node rs rl rx rr = Ordnode.node' rl rx rr\nh : Valid' (↑x) (eraseMax (Ordnode.node' rl rx rr)) ↑(findMax' rx rr)\ne : size (Ordnode.node' rl rx rr) = size (eraseMax (Ordnode.node' rl rx rr)) + 1\n⊢ size (Ordnode.node' l x (Ordnode.node' rl rx rr)) = size (eraseMax (Ordnode.node' l x (Ordnode.node' rl rx rr))) + 1\n[PROOFSTEP]\nrw [eraseMax, size_balanceL H.3.2.1 h.3 H.2.2.1 h.2 (Or.inr ⟨_, Or.inr e, H.3.1⟩)]\n[GOAL]\ncase node.intro\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl✝ : Ordnode α\nx✝ : α\nr : Ordnode α\no₁✝ : WithBot α\no₂ : WithTop α\nH✝ : Valid' o₁✝ (Ordnode.node' l✝ x✝ r) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nl_ih✝ :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rl) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rl)) ↑(findMax' x rl) ∧\n        size (Ordnode.node' l x rl) = size (eraseMax (Ordnode.node' l x rl)) + 1\nIHrr :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rr) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rr)) ↑(findMax' x rr) ∧\n        size (Ordnode.node' l x rr) = size (eraseMax (Ordnode.node' l x rr)) + 1\nl : Ordnode α\nx : α\no₁ : WithBot α\nH : Valid' o₁ (Ordnode.node' l x (Ordnode.node' rl rx rr)) o₂\nthis : Ordnode.node rs rl rx rr = Ordnode.node' rl rx rr\nh : Valid' (↑x) (eraseMax (Ordnode.node' rl rx rr)) ↑(findMax' rx rr)\ne : size (Ordnode.node' rl rx rr) = size (eraseMax (Ordnode.node' rl rx rr)) + 1\n⊢ size (Ordnode.node' l x (Ordnode.node' rl rx rr)) = size l + size (eraseMax (Ordnode.node' rl rx rr)) + 1 + 1\n[PROOFSTEP]\nrw [size, e]\n[GOAL]\ncase node.intro\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl✝ : Ordnode α\nx✝ : α\nr : Ordnode α\no₁✝ : WithBot α\no₂ : WithTop α\nH✝ : Valid' o₁✝ (Ordnode.node' l✝ x✝ r) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nl_ih✝ :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rl) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rl)) ↑(findMax' x rl) ∧\n        size (Ordnode.node' l x rl) = size (eraseMax (Ordnode.node' l x rl)) + 1\nIHrr :\n  ∀ {l : Ordnode α} {x : α} {o₁ : WithBot α},\n    Valid' o₁ (Ordnode.node' l x rr) o₂ →\n      Valid' o₁ (eraseMax (Ordnode.node' l x rr)) ↑(findMax' x rr) ∧\n        size (Ordnode.node' l x rr) = size (eraseMax (Ordnode.node' l x rr)) + 1\nl : Ordnode α\nx : α\no₁ : WithBot α\nH : Valid' o₁ (Ordnode.node' l x (Ordnode.node' rl rx rr)) o₂\nthis : Ordnode.node rs rl rx rr = Ordnode.node' rl rx rr\nh : Valid' (↑x) (eraseMax (Ordnode.node' rl rx rr)) ↑(findMax' rx rr)\ne : size (Ordnode.node' rl rx rr) = size (eraseMax (Ordnode.node' rl rx rr)) + 1\n⊢ size l + (size (eraseMax (Ordnode.node' rl rx rr)) + 1) + 1 =\n    size l + size (eraseMax (Ordnode.node' rl rx rr)) + 1 + 1\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nH : Valid' o₁ (Ordnode.node s l x r) o₂\n⊢ Valid' (↑(findMin' l x)) (eraseMin (Ordnode.node' l x r)) o₂ ∧\n    size (Ordnode.node' l x r) = size (eraseMin (Ordnode.node' l x r)) + 1\n[PROOFSTEP]\nhave := H.dual.eraseMax_aux\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\ns : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nH : Valid' o₁ (Ordnode.node s l x r) o₂\nthis :\n  Valid' o₂ (eraseMax (Ordnode.node' (Ordnode.dual r) x (Ordnode.dual l))) ↑(findMax' x (Ordnode.dual l)) ∧\n    size (Ordnode.node' (Ordnode.dual r) x (Ordnode.dual l)) =\n      size (eraseMax (Ordnode.node' (Ordnode.dual r) x (Ordnode.dual l))) + 1\n⊢ Valid' (↑(findMin' l x)) (eraseMin (Ordnode.node' l x r)) o₂ ∧\n    size (Ordnode.node' l x r) = size (eraseMin (Ordnode.node' l x r)) + 1\n[PROOFSTEP]\nrwa [← dual_node', size_dual, ← dual_eraseMin, size_dual, ← Valid'.dual_iff, findMax'_dual] at this \n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nsize✝ : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\nh : Valid (node size✝ l x r)\n⊢ Valid (eraseMin (node size✝ l x r))\n[PROOFSTEP]\nrw [h.2.eq_node']\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nsize✝ : ℕ\nl : Ordnode α\nx : α\nr : Ordnode α\nh : Valid (node size✝ l x r)\n⊢ Valid (eraseMin (node' l x r))\n[PROOFSTEP]\nexact h.eraseMin_aux.1.valid\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nt : Ordnode α\nh : Valid t\n⊢ Valid (eraseMax t)\n[PROOFSTEP]\nrw [Valid.dual_iff, dual_eraseMax]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nt : Ordnode α\nh : Valid t\n⊢ Valid (eraseMin (dual t))\n[PROOFSTEP]\nexact eraseMin.valid h.dual\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl r : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l o₂\nhr : Valid' o₁ r o₂\nsep : All (fun x => All (fun y => x < y) r) l\nbal : BalancedSz (size l) (size r)\n⊢ Valid' o₁ (glue l r) o₂ ∧ size (glue l r) = size l + size r\n[PROOFSTEP]\ncases' l with ls ll lx lr\n[GOAL]\ncase nil\nα : Type u_1\ninst✝ : Preorder α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhr : Valid' o₁ r o₂\nhl : Valid' o₁ nil o₂\nsep : All (fun x => All (fun y => x < y) r) nil\nbal : BalancedSz (size nil) (size r)\n⊢ Valid' o₁ (glue nil r) o₂ ∧ size (glue nil r) = size nil + size r\n[PROOFSTEP]\nexact ⟨hr, (zero_add _).symm⟩\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhr : Valid' o₁ r o₂\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nsep : All (fun x => All (fun y => x < y) r) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size r)\n⊢ Valid' o₁ (glue (Ordnode.node ls ll lx lr) r) o₂ ∧\n    size (glue (Ordnode.node ls ll lx lr) r) = size (Ordnode.node ls ll lx lr) + size r\n[PROOFSTEP]\ncases' r with rs rl rx rr\n[GOAL]\ncase node.nil\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ nil o₂\nsep : All (fun x => All (fun y => x < y) nil) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size nil)\n⊢ Valid' o₁ (glue (Ordnode.node ls ll lx lr) nil) o₂ ∧\n    size (glue (Ordnode.node ls ll lx lr) nil) = size (Ordnode.node ls ll lx lr) + size nil\n[PROOFSTEP]\nexact ⟨hl, rfl⟩\n[GOAL]\ncase node.node\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\n⊢ Valid' o₁ (glue (Ordnode.node ls ll lx lr) (Ordnode.node rs rl rx rr)) o₂ ∧\n    size (glue (Ordnode.node ls ll lx lr) (Ordnode.node rs rl rx rr)) =\n      size (Ordnode.node ls ll lx lr) + size (Ordnode.node rs rl rx rr)\n[PROOFSTEP]\ndsimp [glue]\n[GOAL]\ncase node.node\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\n⊢ Valid' o₁\n      (if ls > rs then Ordnode.balanceR (splitMax' ll lx lr).fst (splitMax' ll lx lr).snd (Ordnode.node rs rl rx rr)\n      else Ordnode.balanceL (Ordnode.node ls ll lx lr) (splitMin' rl rx rr).fst (splitMin' rl rx rr).snd)\n      o₂ ∧\n    size\n        (if ls > rs then Ordnode.balanceR (splitMax' ll lx lr).fst (splitMax' ll lx lr).snd (Ordnode.node rs rl rx rr)\n        else Ordnode.balanceL (Ordnode.node ls ll lx lr) (splitMin' rl rx rr).fst (splitMin' rl rx rr).snd) =\n      ls + rs\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\n⊢ Valid' o₁ (Ordnode.balanceR (splitMax' ll lx lr).fst (splitMax' ll lx lr).snd (Ordnode.node rs rl rx rr)) o₂ ∧\n    size (Ordnode.balanceR (splitMax' ll lx lr).fst (splitMax' ll lx lr).snd (Ordnode.node rs rl rx rr)) = ls + rs\n[PROOFSTEP]\nrw [splitMax_eq]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\n⊢ Valid' o₁\n      (Ordnode.balanceR (eraseMax (Ordnode.node ?pos.s✝ ll lx lr), findMax' lx lr).fst\n        (eraseMax (Ordnode.node ?pos.s✝ ll lx lr), findMax' lx lr).snd (Ordnode.node rs rl rx rr))\n      o₂ ∧\n    size\n        (Ordnode.balanceR (eraseMax (Ordnode.node ?pos.s✝ ll lx lr), findMax' lx lr).fst\n          (eraseMax (Ordnode.node ?pos.s✝ ll lx lr), findMax' lx lr).snd (Ordnode.node rs rl rx rr)) =\n      ls + rs\ncase pos.s\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\n⊢ ℕ\n[PROOFSTEP]\ncases' Valid'.eraseMax_aux hl with v e\n[GOAL]\ncase pos.intro\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\nv : Valid' o₁ (eraseMax (Ordnode.node' ll lx lr)) ↑(findMax' lx lr)\ne : size (Ordnode.node' ll lx lr) = size (eraseMax (Ordnode.node' ll lx lr)) + 1\n⊢ Valid' o₁\n      (Ordnode.balanceR (eraseMax (Ordnode.node ?pos.s✝ ll lx lr), findMax' lx lr).fst\n        (eraseMax (Ordnode.node ?pos.s✝ ll lx lr), findMax' lx lr).snd (Ordnode.node rs rl rx rr))\n      o₂ ∧\n    size\n        (Ordnode.balanceR (eraseMax (Ordnode.node ?pos.s✝ ll lx lr), findMax' lx lr).fst\n          (eraseMax (Ordnode.node ?pos.s✝ ll lx lr), findMax' lx lr).snd (Ordnode.node rs rl rx rr)) =\n      ls + rs\ncase pos.s\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\n⊢ ℕ\n[PROOFSTEP]\nsuffices H\n[GOAL]\ncase pos.intro\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\nv : Valid' o₁ (eraseMax (Ordnode.node' ll lx lr)) ↑(findMax' lx lr)\ne : size (Ordnode.node' ll lx lr) = size (eraseMax (Ordnode.node' ll lx lr)) + 1\nH : ?m.354852\n⊢ Valid' o₁\n      (Ordnode.balanceR (eraseMax (Ordnode.node ?pos.s✝ ll lx lr), findMax' lx lr).fst\n        (eraseMax (Ordnode.node ?pos.s✝ ll lx lr), findMax' lx lr).snd (Ordnode.node rs rl rx rr))\n      o₂ ∧\n    size\n        (Ordnode.balanceR (eraseMax (Ordnode.node ?pos.s✝ ll lx lr), findMax' lx lr).fst\n          (eraseMax (Ordnode.node ?pos.s✝ ll lx lr), findMax' lx lr).snd (Ordnode.node rs rl rx rr)) =\n      ls + rs\ncase H\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\nv : Valid' o₁ (eraseMax (Ordnode.node' ll lx lr)) ↑(findMax' lx lr)\ne : size (Ordnode.node' ll lx lr) = size (eraseMax (Ordnode.node' ll lx lr)) + 1\n⊢ ?m.354852\ncase pos.s\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\n⊢ ℕ\n[PROOFSTEP]\nrefine' ⟨Valid'.balanceR v (hr.of_gt _ _) H, _⟩\n[GOAL]\ncase pos.intro.refine'_1\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\nv : Valid' o₁ (eraseMax (Ordnode.node' ll lx lr)) ↑(findMax' lx lr)\ne : size (Ordnode.node' ll lx lr) = size (eraseMax (Ordnode.node' ll lx lr)) + 1\nH :\n  (∃ l',\n      Raised (size (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst) l' ∧\n        BalancedSz l' (size (Ordnode.node rs rl rx rr))) ∨\n    ∃ r',\n      Raised r' (size (Ordnode.node rs rl rx rr)) ∧\n        BalancedSz (size (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst) r'\n⊢ Bounded nil (↑(eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).snd) o₂\n[PROOFSTEP]\nrefine' findMax'_all (P := fun a : α => Bounded nil (a : WithTop α) o₂) lx lr hl.1.2.to_nil (sep.2.2.imp _)\n[GOAL]\ncase pos.intro.refine'_1\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\nv : Valid' o₁ (eraseMax (Ordnode.node' ll lx lr)) ↑(findMax' lx lr)\ne : size (Ordnode.node' ll lx lr) = size (eraseMax (Ordnode.node' ll lx lr)) + 1\nH :\n  (∃ l',\n      Raised (size (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst) l' ∧\n        BalancedSz l' (size (Ordnode.node rs rl rx rr))) ∨\n    ∃ r',\n      Raised r' (size (Ordnode.node rs rl rx rr)) ∧\n        BalancedSz (size (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst) r'\n⊢ ∀ (a : α), All (fun y => a < y) (Ordnode.node rs rl rx rr) → Bounded nil (↑a) o₂\n[PROOFSTEP]\nexact fun x h => hr.1.2.to_nil.mono_left (le_of_lt h.2.1)\n[GOAL]\ncase pos.intro.refine'_2\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\nv : Valid' o₁ (eraseMax (Ordnode.node' ll lx lr)) ↑(findMax' lx lr)\ne : size (Ordnode.node' ll lx lr) = size (eraseMax (Ordnode.node' ll lx lr)) + 1\nH :\n  (∃ l',\n      Raised (size (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst) l' ∧\n        BalancedSz l' (size (Ordnode.node rs rl rx rr))) ∨\n    ∃ r',\n      Raised r' (size (Ordnode.node rs rl rx rr)) ∧\n        BalancedSz (size (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst) r'\n⊢ All (fun x => x > (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).snd)\n    (Ordnode.node rs rl rx rr)\n[PROOFSTEP]\nexact @findMax'_all _ (fun a => All (· > a) (.node rs rl rx rr)) lx lr sep.2.1 sep.2.2\n[GOAL]\ncase pos.intro.refine'_3\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\nv : Valid' o₁ (eraseMax (Ordnode.node' ll lx lr)) ↑(findMax' lx lr)\ne : size (Ordnode.node' ll lx lr) = size (eraseMax (Ordnode.node' ll lx lr)) + 1\nH :\n  (∃ l',\n      Raised (size (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst) l' ∧\n        BalancedSz l' (size (Ordnode.node rs rl rx rr))) ∨\n    ∃ r',\n      Raised r' (size (Ordnode.node rs rl rx rr)) ∧\n        BalancedSz (size (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst) r'\n⊢ size\n      (Ordnode.balanceR (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst\n        (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).snd (Ordnode.node rs rl rx rr)) =\n    ls + rs\n[PROOFSTEP]\nrw [size_balanceR v.3 hr.3 v.2 hr.2 H, add_right_comm, ← e, hl.2.1]\n[GOAL]\ncase pos.intro.refine'_3\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\nv : Valid' o₁ (eraseMax (Ordnode.node' ll lx lr)) ↑(findMax' lx lr)\ne : size (Ordnode.node' ll lx lr) = size (eraseMax (Ordnode.node' ll lx lr)) + 1\nH :\n  (∃ l',\n      Raised (size (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst) l' ∧\n        BalancedSz l' (size (Ordnode.node rs rl rx rr))) ∨\n    ∃ r',\n      Raised r' (size (Ordnode.node rs rl rx rr)) ∧\n        BalancedSz (size (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst) r'\n⊢ size (Ordnode.node' ll lx lr) + size (Ordnode.node rs rl rx rr) = size ll + size lr + 1 + rs\n[PROOFSTEP]\nrfl\n[GOAL]\ncase H\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\nv : Valid' o₁ (eraseMax (Ordnode.node' ll lx lr)) ↑(findMax' lx lr)\ne : size (Ordnode.node' ll lx lr) = size (eraseMax (Ordnode.node' ll lx lr)) + 1\n⊢ (∃ l',\n      Raised (size (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst) l' ∧\n        BalancedSz l' (size (Ordnode.node rs rl rx rr))) ∨\n    ∃ r',\n      Raised r' (size (Ordnode.node rs rl rx rr)) ∧\n        BalancedSz (size (eraseMax (Ordnode.node (size ll + size lr + 1) ll lx lr), findMax' lx lr).fst) r'\n[PROOFSTEP]\nrefine' Or.inl ⟨_, Or.inr e, _⟩\n[GOAL]\ncase H\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ls > rs\nv : Valid' o₁ (eraseMax (Ordnode.node' ll lx lr)) ↑(findMax' lx lr)\ne : size (Ordnode.node' ll lx lr) = size (eraseMax (Ordnode.node' ll lx lr)) + 1\n⊢ BalancedSz (size (Ordnode.node' ll lx lr)) (size (Ordnode.node rs rl rx rr))\n[PROOFSTEP]\nrwa [hl.2.eq_node'] at bal \n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\n⊢ Valid' o₁ (Ordnode.balanceL (Ordnode.node ls ll lx lr) (splitMin' rl rx rr).fst (splitMin' rl rx rr).snd) o₂ ∧\n    size (Ordnode.balanceL (Ordnode.node ls ll lx lr) (splitMin' rl rx rr).fst (splitMin' rl rx rr).snd) = ls + rs\n[PROOFSTEP]\nrw [splitMin_eq]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\n⊢ Valid' o₁\n      (Ordnode.balanceL (Ordnode.node ls ll lx lr) (findMin' rl rx, eraseMin (Ordnode.node ?neg.s✝ rl rx rr)).fst\n        (findMin' rl rx, eraseMin (Ordnode.node ?neg.s✝ rl rx rr)).snd)\n      o₂ ∧\n    size\n        (Ordnode.balanceL (Ordnode.node ls ll lx lr) (findMin' rl rx, eraseMin (Ordnode.node ?neg.s✝ rl rx rr)).fst\n          (findMin' rl rx, eraseMin (Ordnode.node ?neg.s✝ rl rx rr)).snd) =\n      ls + rs\ncase neg.s\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\n⊢ ℕ\n[PROOFSTEP]\ncases' Valid'.eraseMin_aux hr with v e\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\nv : Valid' (↑(findMin' rl rx)) (eraseMin (Ordnode.node' rl rx rr)) o₂\ne : size (Ordnode.node' rl rx rr) = size (eraseMin (Ordnode.node' rl rx rr)) + 1\n⊢ Valid' o₁\n      (Ordnode.balanceL (Ordnode.node ls ll lx lr) (findMin' rl rx, eraseMin (Ordnode.node ?neg.s✝ rl rx rr)).fst\n        (findMin' rl rx, eraseMin (Ordnode.node ?neg.s✝ rl rx rr)).snd)\n      o₂ ∧\n    size\n        (Ordnode.balanceL (Ordnode.node ls ll lx lr) (findMin' rl rx, eraseMin (Ordnode.node ?neg.s✝ rl rx rr)).fst\n          (findMin' rl rx, eraseMin (Ordnode.node ?neg.s✝ rl rx rr)).snd) =\n      ls + rs\ncase neg.s\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\n⊢ ℕ\n[PROOFSTEP]\nsuffices H\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\nv : Valid' (↑(findMin' rl rx)) (eraseMin (Ordnode.node' rl rx rr)) o₂\ne : size (Ordnode.node' rl rx rr) = size (eraseMin (Ordnode.node' rl rx rr)) + 1\nH : ?m.355955\n⊢ Valid' o₁\n      (Ordnode.balanceL (Ordnode.node ls ll lx lr) (findMin' rl rx, eraseMin (Ordnode.node ?neg.s✝ rl rx rr)).fst\n        (findMin' rl rx, eraseMin (Ordnode.node ?neg.s✝ rl rx rr)).snd)\n      o₂ ∧\n    size\n        (Ordnode.balanceL (Ordnode.node ls ll lx lr) (findMin' rl rx, eraseMin (Ordnode.node ?neg.s✝ rl rx rr)).fst\n          (findMin' rl rx, eraseMin (Ordnode.node ?neg.s✝ rl rx rr)).snd) =\n      ls + rs\ncase H\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\nv : Valid' (↑(findMin' rl rx)) (eraseMin (Ordnode.node' rl rx rr)) o₂\ne : size (Ordnode.node' rl rx rr) = size (eraseMin (Ordnode.node' rl rx rr)) + 1\n⊢ ?m.355955\ncase neg.s\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\n⊢ ℕ\n[PROOFSTEP]\nrefine' ⟨Valid'.balanceL (hl.of_lt _ _) v H, _⟩\n[GOAL]\ncase neg.intro.refine'_1\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\nv : Valid' (↑(findMin' rl rx)) (eraseMin (Ordnode.node' rl rx rr)) o₂\ne : size (Ordnode.node' rl rx rr) = size (eraseMin (Ordnode.node' rl rx rr)) + 1\nH :\n  (∃ l',\n      Raised l' (size (Ordnode.node ls ll lx lr)) ∧\n        BalancedSz l' (size (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd)) ∨\n    ∃ r',\n      Raised (size (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd) r' ∧\n        BalancedSz (size (Ordnode.node ls ll lx lr)) r'\n⊢ Bounded nil o₁ ↑(findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).fst\n[PROOFSTEP]\nrefine' @findMin'_all (P := fun a : α => Bounded nil o₁ (a : WithBot α)) rl rx (sep.2.1.1.imp _) hr.1.1.to_nil\n[GOAL]\ncase neg.intro.refine'_1\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\nv : Valid' (↑(findMin' rl rx)) (eraseMin (Ordnode.node' rl rx rr)) o₂\ne : size (Ordnode.node' rl rx rr) = size (eraseMin (Ordnode.node' rl rx rr)) + 1\nH :\n  (∃ l',\n      Raised l' (size (Ordnode.node ls ll lx lr)) ∧\n        BalancedSz l' (size (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd)) ∨\n    ∃ r',\n      Raised (size (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd) r' ∧\n        BalancedSz (size (Ordnode.node ls ll lx lr)) r'\n⊢ ∀ (a : α), lx < a → Bounded nil o₁ ↑a\n[PROOFSTEP]\nexact fun y h => hl.1.1.to_nil.mono_right (le_of_lt h)\n[GOAL]\ncase neg.intro.refine'_2\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\nv : Valid' (↑(findMin' rl rx)) (eraseMin (Ordnode.node' rl rx rr)) o₂\ne : size (Ordnode.node' rl rx rr) = size (eraseMin (Ordnode.node' rl rx rr)) + 1\nH :\n  (∃ l',\n      Raised l' (size (Ordnode.node ls ll lx lr)) ∧\n        BalancedSz l' (size (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd)) ∨\n    ∃ r',\n      Raised (size (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd) r' ∧\n        BalancedSz (size (Ordnode.node ls ll lx lr)) r'\n⊢ All (fun x => x < (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).fst)\n    (Ordnode.node ls ll lx lr)\n[PROOFSTEP]\nexact\n  @findMin'_all _ (fun a => All (· < a) (.node ls ll lx lr)) rl rx\n    (all_iff_forall.2 fun x hx => sep.imp fun y hy => all_iff_forall.1 hy.1 _ hx) (sep.imp fun y hy => hy.2.1)\n[GOAL]\ncase neg.intro.refine'_3\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\nv : Valid' (↑(findMin' rl rx)) (eraseMin (Ordnode.node' rl rx rr)) o₂\ne : size (Ordnode.node' rl rx rr) = size (eraseMin (Ordnode.node' rl rx rr)) + 1\nH :\n  (∃ l',\n      Raised l' (size (Ordnode.node ls ll lx lr)) ∧\n        BalancedSz l' (size (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd)) ∨\n    ∃ r',\n      Raised (size (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd) r' ∧\n        BalancedSz (size (Ordnode.node ls ll lx lr)) r'\n⊢ size\n      (Ordnode.balanceL (Ordnode.node ls ll lx lr)\n        (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).fst\n        (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd) =\n    ls + rs\n[PROOFSTEP]\nrw [size_balanceL hl.3 v.3 hl.2 v.2 H, add_assoc, ← e, hr.2.1]\n[GOAL]\ncase neg.intro.refine'_3\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\nv : Valid' (↑(findMin' rl rx)) (eraseMin (Ordnode.node' rl rx rr)) o₂\ne : size (Ordnode.node' rl rx rr) = size (eraseMin (Ordnode.node' rl rx rr)) + 1\nH :\n  (∃ l',\n      Raised l' (size (Ordnode.node ls ll lx lr)) ∧\n        BalancedSz l' (size (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd)) ∨\n    ∃ r',\n      Raised (size (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd) r' ∧\n        BalancedSz (size (Ordnode.node ls ll lx lr)) r'\n⊢ size (Ordnode.node ls ll lx lr) + size (Ordnode.node' rl rx rr) = ls + (size rl + size rr + 1)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase H\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\nv : Valid' (↑(findMin' rl rx)) (eraseMin (Ordnode.node' rl rx rr)) o₂\ne : size (Ordnode.node' rl rx rr) = size (eraseMin (Ordnode.node' rl rx rr)) + 1\n⊢ (∃ l',\n      Raised l' (size (Ordnode.node ls ll lx lr)) ∧\n        BalancedSz l' (size (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd)) ∨\n    ∃ r',\n      Raised (size (findMin' rl rx, eraseMin (Ordnode.node (size rl + size rr + 1) rl rx rr)).snd) r' ∧\n        BalancedSz (size (Ordnode.node ls ll lx lr)) r'\n[PROOFSTEP]\nrefine' Or.inr ⟨_, Or.inr e, _⟩\n[GOAL]\ncase H\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nbal : BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node rs rl rx rr))\nh✝ : ¬ls > rs\nv : Valid' (↑(findMin' rl rx)) (eraseMin (Ordnode.node' rl rx rr)) o₂\ne : size (Ordnode.node' rl rx rr) = size (eraseMin (Ordnode.node' rl rx rr)) + 1\n⊢ BalancedSz (size (Ordnode.node ls ll lx lr)) (size (Ordnode.node' rl rx rr))\n[PROOFSTEP]\nrwa [hr.2.eq_node'] at bal \n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\na b c : ℕ\nh₁ : 3 * a < b + c + 1\nh₂ : b ≤ 3 * c\n⊢ 2 * (a + b) ≤ 9 * c + 5\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : delta * ls < rs\nv : Valid' o₁ t ↑rx\ne : size t = ls + size rl\n⊢ Valid' o₁ (Ordnode.balanceL t rx rr) o₂ ∧ size (Ordnode.balanceL t rx rr) = ls + rs\n[PROOFSTEP]\nrw [hl.2.1] at e \n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : delta * ls < rs\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\n⊢ Valid' o₁ (Ordnode.balanceL t rx rr) o₂ ∧ size (Ordnode.balanceL t rx rr) = ls + rs\n[PROOFSTEP]\nrw [hl.2.1, hr.2.1, delta] at h \n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\n⊢ Valid' o₁ (Ordnode.balanceL t rx rr) o₂ ∧ size (Ordnode.balanceL t rx rr) = ls + rs\n[PROOFSTEP]\nrcases hr.3.1 with (H | ⟨hr₁, hr₂⟩)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nH : size rl + size rr ≤ 1\n⊢ Valid' o₁ (Ordnode.balanceL t rx rr) o₂ ∧ size (Ordnode.balanceL t rx rr) = ls + rs\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\n⊢ Valid' o₁ (Ordnode.balanceL t rx rr) o₂ ∧ size (Ordnode.balanceL t rx rr) = ls + rs\n[PROOFSTEP]\nsuffices H₂\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\nH₂ : ?m.365245\n⊢ Valid' o₁ (Ordnode.balanceL t rx rr) o₂ ∧ size (Ordnode.balanceL t rx rr) = ls + rs\ncase H₂\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\n⊢ ?m.365245\n[PROOFSTEP]\nsuffices H₁\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\nH₂ : ?m.365245\nH₁ : ?m.365252\n⊢ Valid' o₁ (Ordnode.balanceL t rx rr) o₂ ∧ size (Ordnode.balanceL t rx rr) = ls + rs\ncase H₁\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\nH₂ : ?m.365245\n⊢ ?m.365252\ncase H₂\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\n⊢ ?m.365245\n[PROOFSTEP]\nrefine' ⟨Valid'.balanceL_aux v hr.right H₁ H₂ _, _⟩\n[GOAL]\ncase inr.intro.refine'_1\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\nH₂ : 1 ≤ size t → 1 ≤ size rr → size rr ≤ delta * size t\nH₁ : size t = 0 → size rr ≤ 1\n⊢ 2 * size t ≤ 9 * size rr + 5 ∨ size t ≤ 3\n[PROOFSTEP]\nrw [e]\n[GOAL]\ncase inr.intro.refine'_1\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\nH₂ : 1 ≤ size t → 1 ≤ size rr → size rr ≤ delta * size t\nH₁ : size t = 0 → size rr ≤ 1\n⊢ 2 * (size ll + size lr + 1 + size rl) ≤ 9 * size rr + 5 ∨ size ll + size lr + 1 + size rl ≤ 3\n[PROOFSTEP]\nexact Or.inl (Valid'.merge_lemma h hr₁)\n[GOAL]\ncase inr.intro.refine'_2\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\nH₂ : 1 ≤ size t → 1 ≤ size rr → size rr ≤ delta * size t\nH₁ : size t = 0 → size rr ≤ 1\n⊢ size (Ordnode.balanceL t rx rr) = ls + rs\n[PROOFSTEP]\nrw [balanceL_eq_balance v.2 hr.2.2.2 H₁ H₂, balance_eq_balance' v.3 hr.3.2.2 v.2 hr.2.2.2, size_balance' v.2 hr.2.2.2,\n  e, hl.2.1, hr.2.1]\n[GOAL]\ncase inr.intro.refine'_2\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\nH₂ : 1 ≤ size t → 1 ≤ size rr → size rr ≤ delta * size t\nH₁ : size t = 0 → size rr ≤ 1\n⊢ size ll + size lr + 1 + size rl + size rr + 1 = size ll + size lr + 1 + (size rl + size rr + 1)\n[PROOFSTEP]\nabel\n[GOAL]\ncase inr.intro.refine'_2\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\nH₂ : 1 ≤ size t → 1 ≤ size rr → size rr ≤ delta * size t\nH₁ : size t = 0 → size rr ≤ 1\n⊢ size ll + size lr + 1 + size rl + size rr + 1 = size ll + size lr + 1 + (size rl + size rr + 1)\n[PROOFSTEP]\nabel\n[GOAL]\ncase H₁\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\nH₂ : 1 ≤ size t → 1 ≤ size rr → size rr ≤ delta * size t\n⊢ size t = 0 → size rr ≤ 1\n[PROOFSTEP]\nrw [e, add_right_comm]\n[GOAL]\ncase H₁\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\nH₂ : 1 ≤ size t → 1 ≤ size rr → size rr ≤ delta * size t\n⊢ size ll + size lr + size rl + 1 = 0 → size rr ≤ 1\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase H₂\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\n⊢ 1 ≤ size t → 1 ≤ size rr → size rr ≤ delta * size t\n[PROOFSTEP]\nintro _ _\n[GOAL]\ncase H₂\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\na✝¹ : 1 ≤ size t\na✝ : 1 ≤ size rr\n⊢ size rr ≤ delta * size t\n[PROOFSTEP]\nrw [e]\n[GOAL]\ncase H₂\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ delta * size rl\na✝¹ : 1 ≤ size t\na✝ : 1 ≤ size rr\n⊢ size rr ≤ delta * (size ll + size lr + 1 + size rl)\n[PROOFSTEP]\nunfold delta at hr₂ ⊢\n[GOAL]\ncase H₂\nα : Type u_1\ninst✝ : Preorder α\no₁ : WithBot α\no₂ : WithTop α\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr t : Ordnode α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nh : 3 * (size ll + size lr + 1) < size rl + size rr + 1\nv : Valid' o₁ t ↑rx\ne : size t = size ll + size lr + 1 + size rl\nhr₁ : size rl ≤ delta * size rr\nhr₂ : size rr ≤ 3 * size rl\na✝¹ : 1 ≤ size t\na✝ : 1 ≤ size rr\n⊢ size rr ≤ 3 * (size ll + size lr + 1 + size rl)\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nl r : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ l o₂\nhr : Valid' o₁ r o₂\nsep : All (fun x => All (fun y => x < y) r) l\n⊢ Valid' o₁ (merge l r) o₂ ∧ size (merge l r) = size l + size r\n[PROOFSTEP]\ninduction' l with ls ll lx lr _ IHlr generalizing o₁ o₂ r\n[GOAL]\ncase nil\nα : Type u_1\ninst✝ : Preorder α\nl r✝ : Ordnode α\no₁✝ : WithBot α\no₂✝ : WithTop α\nhl✝ : Valid' o₁✝ l o₂✝\nhr✝ : Valid' o₁✝ r✝ o₂✝\nsep✝ : All (fun x => All (fun y => x < y) r✝) l\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ nil o₂\nhr : Valid' o₁ r o₂\nsep : All (fun x => All (fun y => x < y) r) nil\n⊢ Valid' o₁ (merge nil r) o₂ ∧ size (merge nil r) = size nil + size r\n[PROOFSTEP]\nexact ⟨hr, (zero_add _).symm⟩\n[GOAL]\ncase node\nα : Type u_1\ninst✝ : Preorder α\nl r✝ : Ordnode α\no₁✝ : WithBot α\no₂✝ : WithTop α\nhl✝ : Valid' o₁✝ l o₂✝\nhr✝ : Valid' o₁✝ r✝ o₂✝\nsep✝ : All (fun x => All (fun y => x < y) r✝) l\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nl_ih✝ :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ ll o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) ll → Valid' o₁ (merge ll r) o₂ ∧ size (merge ll r) = size ll + size r\nIHlr :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ lr o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) lr → Valid' o₁ (merge lr r) o₂ ∧ size (merge lr r) = size lr + size r\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ r o₂\nsep : All (fun x => All (fun y => x < y) r) (Ordnode.node ls ll lx lr)\n⊢ Valid' o₁ (merge (Ordnode.node ls ll lx lr) r) o₂ ∧\n    size (merge (Ordnode.node ls ll lx lr) r) = size (Ordnode.node ls ll lx lr) + size r\n[PROOFSTEP]\ninduction' r with rs rl rx rr IHrl _ generalizing o₁ o₂\n[GOAL]\ncase node.nil\nα : Type u_1\ninst✝ : Preorder α\nl r✝ : Ordnode α\no₁✝¹ : WithBot α\no₂✝¹ : WithTop α\nhl✝¹ : Valid' o₁✝¹ l o₂✝¹\nhr✝¹ : Valid' o₁✝¹ r✝ o₂✝¹\nsep✝¹ : All (fun x => All (fun y => x < y) r✝) l\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nl_ih✝ :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ ll o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) ll → Valid' o₁ (merge ll r) o₂ ∧ size (merge ll r) = size ll + size r\nIHlr :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ lr o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) lr → Valid' o₁ (merge lr r) o₂ ∧ size (merge lr r) = size lr + size r\nr : Ordnode α\no₁✝ : WithBot α\no₂✝ : WithTop α\nhl✝ : Valid' o₁✝ (Ordnode.node ls ll lx lr) o₂✝\nhr✝ : Valid' o₁✝ r o₂✝\nsep✝ : All (fun x => All (fun y => x < y) r) (Ordnode.node ls ll lx lr)\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ nil o₂\nsep : All (fun x => All (fun y => x < y) nil) (Ordnode.node ls ll lx lr)\n⊢ Valid' o₁ (merge (Ordnode.node ls ll lx lr) nil) o₂ ∧\n    size (merge (Ordnode.node ls ll lx lr) nil) = size (Ordnode.node ls ll lx lr) + size nil\n[PROOFSTEP]\nexact ⟨hl, rfl⟩\n[GOAL]\ncase node.node\nα : Type u_1\ninst✝ : Preorder α\nl r✝ : Ordnode α\no₁✝¹ : WithBot α\no₂✝¹ : WithTop α\nhl✝¹ : Valid' o₁✝¹ l o₂✝¹\nhr✝¹ : Valid' o₁✝¹ r✝ o₂✝¹\nsep✝¹ : All (fun x => All (fun y => x < y) r✝) l\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nl_ih✝ :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ ll o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) ll → Valid' o₁ (merge ll r) o₂ ∧ size (merge ll r) = size ll + size r\nIHlr :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ lr o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) lr → Valid' o₁ (merge lr r) o₂ ∧ size (merge lr r) = size lr + size r\nr : Ordnode α\no₁✝ : WithBot α\no₂✝ : WithTop α\nhl✝ : Valid' o₁✝ (Ordnode.node ls ll lx lr) o₂✝\nhr✝ : Valid' o₁✝ r o₂✝\nsep✝ : All (fun x => All (fun y => x < y) r) (Ordnode.node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nIHrl :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rl o₂ →\n        All (fun x => All (fun y => x < y) rl) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rl) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rl) = size (Ordnode.node ls ll lx lr) + size rl\nr_ih✝ :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rr o₂ →\n        All (fun x => All (fun y => x < y) rr) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rr) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rr) = size (Ordnode.node ls ll lx lr) + size rr\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\n⊢ Valid' o₁ (merge (Ordnode.node ls ll lx lr) (Ordnode.node rs rl rx rr)) o₂ ∧\n    size (merge (Ordnode.node ls ll lx lr) (Ordnode.node rs rl rx rr)) =\n      size (Ordnode.node ls ll lx lr) + size (Ordnode.node rs rl rx rr)\n[PROOFSTEP]\nrw [merge_node]\n[GOAL]\ncase node.node\nα : Type u_1\ninst✝ : Preorder α\nl r✝ : Ordnode α\no₁✝¹ : WithBot α\no₂✝¹ : WithTop α\nhl✝¹ : Valid' o₁✝¹ l o₂✝¹\nhr✝¹ : Valid' o₁✝¹ r✝ o₂✝¹\nsep✝¹ : All (fun x => All (fun y => x < y) r✝) l\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nl_ih✝ :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ ll o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) ll → Valid' o₁ (merge ll r) o₂ ∧ size (merge ll r) = size ll + size r\nIHlr :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ lr o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) lr → Valid' o₁ (merge lr r) o₂ ∧ size (merge lr r) = size lr + size r\nr : Ordnode α\no₁✝ : WithBot α\no₂✝ : WithTop α\nhl✝ : Valid' o₁✝ (Ordnode.node ls ll lx lr) o₂✝\nhr✝ : Valid' o₁✝ r o₂✝\nsep✝ : All (fun x => All (fun y => x < y) r) (Ordnode.node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nIHrl :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rl o₂ →\n        All (fun x => All (fun y => x < y) rl) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rl) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rl) = size (Ordnode.node ls ll lx lr) + size rl\nr_ih✝ :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rr o₂ →\n        All (fun x => All (fun y => x < y) rr) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rr) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rr) = size (Ordnode.node ls ll lx lr) + size rr\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\n⊢ Valid' o₁\n      (if delta * ls < rs then Ordnode.balanceL (merge (Ordnode.node ls ll lx lr) rl) rx rr\n      else\n        if delta * rs < ls then Ordnode.balanceR ll lx (merge lr (Ordnode.node rs rl rx rr))\n        else Ordnode.glue (Ordnode.node ls ll lx lr) (Ordnode.node rs rl rx rr))\n      o₂ ∧\n    size\n        (if delta * ls < rs then Ordnode.balanceL (merge (Ordnode.node ls ll lx lr) rl) rx rr\n        else\n          if delta * rs < ls then Ordnode.balanceR ll lx (merge lr (Ordnode.node rs rl rx rr))\n          else Ordnode.glue (Ordnode.node ls ll lx lr) (Ordnode.node rs rl rx rr)) =\n      size (Ordnode.node ls ll lx lr) + size (Ordnode.node rs rl rx rr)\n[PROOFSTEP]\nsplit_ifs with h h_1\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl r✝ : Ordnode α\no₁✝¹ : WithBot α\no₂✝¹ : WithTop α\nhl✝¹ : Valid' o₁✝¹ l o₂✝¹\nhr✝¹ : Valid' o₁✝¹ r✝ o₂✝¹\nsep✝¹ : All (fun x => All (fun y => x < y) r✝) l\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nl_ih✝ :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ ll o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) ll → Valid' o₁ (merge ll r) o₂ ∧ size (merge ll r) = size ll + size r\nIHlr :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ lr o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) lr → Valid' o₁ (merge lr r) o₂ ∧ size (merge lr r) = size lr + size r\nr : Ordnode α\no₁✝ : WithBot α\no₂✝ : WithTop α\nhl✝ : Valid' o₁✝ (Ordnode.node ls ll lx lr) o₂✝\nhr✝ : Valid' o₁✝ r o₂✝\nsep✝ : All (fun x => All (fun y => x < y) r) (Ordnode.node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nIHrl :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rl o₂ →\n        All (fun x => All (fun y => x < y) rl) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rl) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rl) = size (Ordnode.node ls ll lx lr) + size rl\nr_ih✝ :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rr o₂ →\n        All (fun x => All (fun y => x < y) rr) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rr) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rr) = size (Ordnode.node ls ll lx lr) + size rr\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nh : delta * ls < rs\n⊢ Valid' o₁ (Ordnode.balanceL (merge (Ordnode.node ls ll lx lr) rl) rx rr) o₂ ∧\n    size (Ordnode.balanceL (merge (Ordnode.node ls ll lx lr) rl) rx rr) =\n      size (Ordnode.node ls ll lx lr) + size (Ordnode.node rs rl rx rr)\n[PROOFSTEP]\ncases' IHrl (hl.of_lt hr.1.1.to_nil <| sep.imp fun x h => h.2.1) hr.left (sep.imp fun x h => h.1) with v e\n[GOAL]\ncase pos.intro\nα : Type u_1\ninst✝ : Preorder α\nl r✝ : Ordnode α\no₁✝¹ : WithBot α\no₂✝¹ : WithTop α\nhl✝¹ : Valid' o₁✝¹ l o₂✝¹\nhr✝¹ : Valid' o₁✝¹ r✝ o₂✝¹\nsep✝¹ : All (fun x => All (fun y => x < y) r✝) l\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nl_ih✝ :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ ll o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) ll → Valid' o₁ (merge ll r) o₂ ∧ size (merge ll r) = size ll + size r\nIHlr :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ lr o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) lr → Valid' o₁ (merge lr r) o₂ ∧ size (merge lr r) = size lr + size r\nr : Ordnode α\no₁✝ : WithBot α\no₂✝ : WithTop α\nhl✝ : Valid' o₁✝ (Ordnode.node ls ll lx lr) o₂✝\nhr✝ : Valid' o₁✝ r o₂✝\nsep✝ : All (fun x => All (fun y => x < y) r) (Ordnode.node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nIHrl :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rl o₂ →\n        All (fun x => All (fun y => x < y) rl) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rl) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rl) = size (Ordnode.node ls ll lx lr) + size rl\nr_ih✝ :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rr o₂ →\n        All (fun x => All (fun y => x < y) rr) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rr) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rr) = size (Ordnode.node ls ll lx lr) + size rr\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nh : delta * ls < rs\nv : Valid' o₁ (merge (Ordnode.node ls ll lx lr) rl) ↑rx\ne : size (merge (Ordnode.node ls ll lx lr) rl) = size (Ordnode.node ls ll lx lr) + size rl\n⊢ Valid' o₁ (Ordnode.balanceL (merge (Ordnode.node ls ll lx lr) rl) rx rr) o₂ ∧\n    size (Ordnode.balanceL (merge (Ordnode.node ls ll lx lr) rl) rx rr) =\n      size (Ordnode.node ls ll lx lr) + size (Ordnode.node rs rl rx rr)\n[PROOFSTEP]\nexact Valid'.merge_aux₁ hl hr h v e\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : Preorder α\nl r✝ : Ordnode α\no₁✝¹ : WithBot α\no₂✝¹ : WithTop α\nhl✝¹ : Valid' o₁✝¹ l o₂✝¹\nhr✝¹ : Valid' o₁✝¹ r✝ o₂✝¹\nsep✝¹ : All (fun x => All (fun y => x < y) r✝) l\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nl_ih✝ :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ ll o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) ll → Valid' o₁ (merge ll r) o₂ ∧ size (merge ll r) = size ll + size r\nIHlr :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ lr o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) lr → Valid' o₁ (merge lr r) o₂ ∧ size (merge lr r) = size lr + size r\nr : Ordnode α\no₁✝ : WithBot α\no₂✝ : WithTop α\nhl✝ : Valid' o₁✝ (Ordnode.node ls ll lx lr) o₂✝\nhr✝ : Valid' o₁✝ r o₂✝\nsep✝ : All (fun x => All (fun y => x < y) r) (Ordnode.node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nIHrl :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rl o₂ →\n        All (fun x => All (fun y => x < y) rl) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rl) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rl) = size (Ordnode.node ls ll lx lr) + size rl\nr_ih✝ :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rr o₂ →\n        All (fun x => All (fun y => x < y) rr) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rr) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rr) = size (Ordnode.node ls ll lx lr) + size rr\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\n⊢ Valid' o₁ (Ordnode.balanceR ll lx (merge lr (Ordnode.node rs rl rx rr))) o₂ ∧\n    size (Ordnode.balanceR ll lx (merge lr (Ordnode.node rs rl rx rr))) =\n      size (Ordnode.node ls ll lx lr) + size (Ordnode.node rs rl rx rr)\n[PROOFSTEP]\ncases' IHlr hl.right (hr.of_gt hl.1.2.to_nil sep.2.1) sep.2.2 with v e\n[GOAL]\ncase pos.intro\nα : Type u_1\ninst✝ : Preorder α\nl r✝ : Ordnode α\no₁✝¹ : WithBot α\no₂✝¹ : WithTop α\nhl✝¹ : Valid' o₁✝¹ l o₂✝¹\nhr✝¹ : Valid' o₁✝¹ r✝ o₂✝¹\nsep✝¹ : All (fun x => All (fun y => x < y) r✝) l\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nl_ih✝ :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ ll o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) ll → Valid' o₁ (merge ll r) o₂ ∧ size (merge ll r) = size ll + size r\nIHlr :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ lr o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) lr → Valid' o₁ (merge lr r) o₂ ∧ size (merge lr r) = size lr + size r\nr : Ordnode α\no₁✝ : WithBot α\no₂✝ : WithTop α\nhl✝ : Valid' o₁✝ (Ordnode.node ls ll lx lr) o₂✝\nhr✝ : Valid' o₁✝ r o₂✝\nsep✝ : All (fun x => All (fun y => x < y) r) (Ordnode.node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nIHrl :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rl o₂ →\n        All (fun x => All (fun y => x < y) rl) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rl) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rl) = size (Ordnode.node ls ll lx lr) + size rl\nr_ih✝ :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rr o₂ →\n        All (fun x => All (fun y => x < y) rr) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rr) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rr) = size (Ordnode.node ls ll lx lr) + size rr\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nv : Valid' (↑lx) (merge lr (Ordnode.node rs rl rx rr)) o₂\ne : size (merge lr (Ordnode.node rs rl rx rr)) = size lr + size (Ordnode.node rs rl rx rr)\n⊢ Valid' o₁ (Ordnode.balanceR ll lx (merge lr (Ordnode.node rs rl rx rr))) o₂ ∧\n    size (Ordnode.balanceR ll lx (merge lr (Ordnode.node rs rl rx rr))) =\n      size (Ordnode.node ls ll lx lr) + size (Ordnode.node rs rl rx rr)\n[PROOFSTEP]\nhave := Valid'.merge_aux₁ hr.dual hl.dual h_1 v.dual\n[GOAL]\ncase pos.intro\nα : Type u_1\ninst✝ : Preorder α\nl r✝ : Ordnode α\no₁✝¹ : WithBot α\no₂✝¹ : WithTop α\nhl✝¹ : Valid' o₁✝¹ l o₂✝¹\nhr✝¹ : Valid' o₁✝¹ r✝ o₂✝¹\nsep✝¹ : All (fun x => All (fun y => x < y) r✝) l\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nl_ih✝ :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ ll o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) ll → Valid' o₁ (merge ll r) o₂ ∧ size (merge ll r) = size ll + size r\nIHlr :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ lr o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) lr → Valid' o₁ (merge lr r) o₂ ∧ size (merge lr r) = size lr + size r\nr : Ordnode α\no₁✝ : WithBot α\no₂✝ : WithTop α\nhl✝ : Valid' o₁✝ (Ordnode.node ls ll lx lr) o₂✝\nhr✝ : Valid' o₁✝ r o₂✝\nsep✝ : All (fun x => All (fun y => x < y) r) (Ordnode.node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nIHrl :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rl o₂ →\n        All (fun x => All (fun y => x < y) rl) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rl) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rl) = size (Ordnode.node ls ll lx lr) + size rl\nr_ih✝ :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rr o₂ →\n        All (fun x => All (fun y => x < y) rr) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rr) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rr) = size (Ordnode.node ls ll lx lr) + size rr\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nv : Valid' (↑lx) (merge lr (Ordnode.node rs rl rx rr)) o₂\ne : size (merge lr (Ordnode.node rs rl rx rr)) = size lr + size (Ordnode.node rs rl rx rr)\nthis :\n  size (Ordnode.dual (merge lr (Ordnode.node rs rl rx rr))) = rs + size (Ordnode.dual lr) →\n    Valid' o₂ (Ordnode.balanceL (Ordnode.dual (merge lr (Ordnode.node rs rl rx rr))) lx (Ordnode.dual ll)) o₁ ∧\n      size (Ordnode.balanceL (Ordnode.dual (merge lr (Ordnode.node rs rl rx rr))) lx (Ordnode.dual ll)) = rs + ls\n⊢ Valid' o₁ (Ordnode.balanceR ll lx (merge lr (Ordnode.node rs rl rx rr))) o₂ ∧\n    size (Ordnode.balanceR ll lx (merge lr (Ordnode.node rs rl rx rr))) =\n      size (Ordnode.node ls ll lx lr) + size (Ordnode.node rs rl rx rr)\n[PROOFSTEP]\nrw [size_dual, add_comm, size_dual, ← dual_balanceR, ← Valid'.dual_iff, size_dual, add_comm rs] at this \n[GOAL]\ncase pos.intro\nα : Type u_1\ninst✝ : Preorder α\nl r✝ : Ordnode α\no₁✝¹ : WithBot α\no₂✝¹ : WithTop α\nhl✝¹ : Valid' o₁✝¹ l o₂✝¹\nhr✝¹ : Valid' o₁✝¹ r✝ o₂✝¹\nsep✝¹ : All (fun x => All (fun y => x < y) r✝) l\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nl_ih✝ :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ ll o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) ll → Valid' o₁ (merge ll r) o₂ ∧ size (merge ll r) = size ll + size r\nIHlr :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ lr o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) lr → Valid' o₁ (merge lr r) o₂ ∧ size (merge lr r) = size lr + size r\nr : Ordnode α\no₁✝ : WithBot α\no₂✝ : WithTop α\nhl✝ : Valid' o₁✝ (Ordnode.node ls ll lx lr) o₂✝\nhr✝ : Valid' o₁✝ r o₂✝\nsep✝ : All (fun x => All (fun y => x < y) r) (Ordnode.node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nIHrl :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rl o₂ →\n        All (fun x => All (fun y => x < y) rl) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rl) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rl) = size (Ordnode.node ls ll lx lr) + size rl\nr_ih✝ :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rr o₂ →\n        All (fun x => All (fun y => x < y) rr) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rr) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rr) = size (Ordnode.node ls ll lx lr) + size rr\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nh : ¬delta * ls < rs\nh_1 : delta * rs < ls\nv : Valid' (↑lx) (merge lr (Ordnode.node rs rl rx rr)) o₂\ne : size (merge lr (Ordnode.node rs rl rx rr)) = size lr + size (Ordnode.node rs rl rx rr)\nthis :\n  size (merge lr (Ordnode.node rs rl rx rr)) = size lr + rs →\n    Valid' o₁ (Ordnode.balanceR ll lx (merge lr (Ordnode.node rs rl rx rr))) o₂ ∧\n      size (Ordnode.balanceR ll lx (merge lr (Ordnode.node rs rl rx rr))) = ls + rs\n⊢ Valid' o₁ (Ordnode.balanceR ll lx (merge lr (Ordnode.node rs rl rx rr))) o₂ ∧\n    size (Ordnode.balanceR ll lx (merge lr (Ordnode.node rs rl rx rr))) =\n      size (Ordnode.node ls ll lx lr) + size (Ordnode.node rs rl rx rr)\n[PROOFSTEP]\nexact this e\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : Preorder α\nl r✝ : Ordnode α\no₁✝¹ : WithBot α\no₂✝¹ : WithTop α\nhl✝¹ : Valid' o₁✝¹ l o₂✝¹\nhr✝¹ : Valid' o₁✝¹ r✝ o₂✝¹\nsep✝¹ : All (fun x => All (fun y => x < y) r✝) l\nls : ℕ\nll : Ordnode α\nlx : α\nlr : Ordnode α\nl_ih✝ :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ ll o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) ll → Valid' o₁ (merge ll r) o₂ ∧ size (merge ll r) = size ll + size r\nIHlr :\n  ∀ {r : Ordnode α} {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ lr o₂ →\n      Valid' o₁ r o₂ →\n        All (fun x => All (fun y => x < y) r) lr → Valid' o₁ (merge lr r) o₂ ∧ size (merge lr r) = size lr + size r\nr : Ordnode α\no₁✝ : WithBot α\no₂✝ : WithTop α\nhl✝ : Valid' o₁✝ (Ordnode.node ls ll lx lr) o₂✝\nhr✝ : Valid' o₁✝ r o₂✝\nsep✝ : All (fun x => All (fun y => x < y) r) (Ordnode.node ls ll lx lr)\nrs : ℕ\nrl : Ordnode α\nrx : α\nrr : Ordnode α\nIHrl :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rl o₂ →\n        All (fun x => All (fun y => x < y) rl) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rl) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rl) = size (Ordnode.node ls ll lx lr) + size rl\nr_ih✝ :\n  ∀ {o₁ : WithBot α} {o₂ : WithTop α},\n    Valid' o₁ (Ordnode.node ls ll lx lr) o₂ →\n      Valid' o₁ rr o₂ →\n        All (fun x => All (fun y => x < y) rr) (Ordnode.node ls ll lx lr) →\n          Valid' o₁ (merge (Ordnode.node ls ll lx lr) rr) o₂ ∧\n            size (merge (Ordnode.node ls ll lx lr) rr) = size (Ordnode.node ls ll lx lr) + size rr\no₁ : WithBot α\no₂ : WithTop α\nhl : Valid' o₁ (Ordnode.node ls ll lx lr) o₂\nhr : Valid' o₁ (Ordnode.node rs rl rx rr) o₂\nsep : All (fun x => All (fun y => x < y) (Ordnode.node rs rl rx rr)) (Ordnode.node ls ll lx lr)\nh : ¬delta * ls < rs\nh_1 : ¬delta * rs < ls\n⊢ Valid' o₁ (Ordnode.glue (Ordnode.node ls ll lx lr) (Ordnode.node rs rl rx rr)) o₂ ∧\n    size (Ordnode.glue (Ordnode.node ls ll lx lr) (Ordnode.node rs rl rx rr)) =\n      size (Ordnode.node ls ll lx lr) + size (Ordnode.node rs rl rx rr)\n[PROOFSTEP]\nrefine' Valid'.glue_aux hl hr sep (Or.inr ⟨not_lt.1 h_1, not_lt.1 h⟩)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\n⊢ Valid' o₁ (insertWith f x (node sz l y r)) o₂ ∧ Raised (size (node sz l y r)) (size (insertWith f x (node sz l y r)))\n[PROOFSTEP]\nrw [insertWith, cmpLE]\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\n⊢ Valid' o₁\n      (match if x ≤ y then if y ≤ x then Ordering.eq else Ordering.lt else Ordering.gt with\n      | Ordering.lt => balanceL (insertWith f x l) y r\n      | Ordering.eq => node sz l (f y) r\n      | Ordering.gt => balanceR l y (insertWith f x r))\n      o₂ ∧\n    Raised (size (node sz l y r))\n      (size\n        (match if x ≤ y then if y ≤ x then Ordering.eq else Ordering.lt else Ordering.gt with\n        | Ordering.lt => balanceL (insertWith f x l) y r\n        | Ordering.eq => node sz l (f y) r\n        | Ordering.gt => balanceR l y (insertWith f x r)))\n[PROOFSTEP]\nsplit_ifs with h_1 h_2\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : x ≤ y\nh_2 : y ≤ x\n⊢ Valid' o₁\n      (match Ordering.eq with\n      | Ordering.lt => balanceL (insertWith f x l) y r\n      | Ordering.eq => node sz l (f y) r\n      | Ordering.gt => balanceR l y (insertWith f x r))\n      o₂ ∧\n    Raised (size (node sz l y r))\n      (size\n        (match Ordering.eq with\n        | Ordering.lt => balanceL (insertWith f x l) y r\n        | Ordering.eq => node sz l (f y) r\n        | Ordering.gt => balanceR l y (insertWith f x r)))\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : x ≤ y\nh_2 : ¬y ≤ x\n⊢ Valid' o₁\n      (match Ordering.lt with\n      | Ordering.lt => balanceL (insertWith f x l) y r\n      | Ordering.eq => node sz l (f y) r\n      | Ordering.gt => balanceR l y (insertWith f x r))\n      o₂ ∧\n    Raised (size (node sz l y r))\n      (size\n        (match Ordering.lt with\n        | Ordering.lt => balanceL (insertWith f x l) y r\n        | Ordering.eq => node sz l (f y) r\n        | Ordering.gt => balanceR l y (insertWith f x r)))\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : ¬x ≤ y\n⊢ Valid' o₁\n      (match Ordering.gt with\n      | Ordering.lt => balanceL (insertWith f x l) y r\n      | Ordering.eq => node sz l (f y) r\n      | Ordering.gt => balanceR l y (insertWith f x r))\n      o₂ ∧\n    Raised (size (node sz l y r))\n      (size\n        (match Ordering.gt with\n        | Ordering.lt => balanceL (insertWith f x l) y r\n        | Ordering.eq => node sz l (f y) r\n        | Ordering.gt => balanceR l y (insertWith f x r)))\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : x ≤ y\nh_2 : y ≤ x\n⊢ Valid' o₁ (node sz l (f y) r) o₂ ∧ Raised (size (node sz l y r)) (size (node sz l (f y) r))\n[PROOFSTEP]\nrcases h with ⟨⟨lx, xr⟩, hs, hb⟩\n[GOAL]\ncase pos.mk.intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : x ≤ y\nh_2 : y ≤ x\nhs : Sized (node sz l y r)\nhb : Balanced (node sz l y r)\nlx : Bounded l o₁ ↑y\nxr : Bounded r (↑y) o₂\n⊢ Valid' o₁ (node sz l (f y) r) o₂ ∧ Raised (size (node sz l y r)) (size (node sz l (f y) r))\n[PROOFSTEP]\nrcases hf _ ⟨h_1, h_2⟩ with ⟨xf, fx⟩\n[GOAL]\ncase pos.mk.intro.intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : x ≤ y\nh_2 : y ≤ x\nhs : Sized (node sz l y r)\nhb : Balanced (node sz l y r)\nlx : Bounded l o₁ ↑y\nxr : Bounded r (↑y) o₂\nxf : x ≤ f y\nfx : f y ≤ x\n⊢ Valid' o₁ (node sz l (f y) r) o₂ ∧ Raised (size (node sz l y r)) (size (node sz l (f y) r))\n[PROOFSTEP]\nrefine' ⟨⟨⟨lx.mono_right (le_trans h_2 xf), xr.mono_left (le_trans fx h_1)⟩, hs, hb⟩, Or.inl rfl⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : x ≤ y\nh_2 : ¬y ≤ x\n⊢ Valid' o₁ (balanceL (insertWith f x l) y r) o₂ ∧\n    Raised (size (node sz l y r)) (size (balanceL (insertWith f x l) y r))\n[PROOFSTEP]\nrcases insertWith.valid_aux f x hf h.left bl (lt_of_le_not_le h_1 h_2) with ⟨vl, e⟩\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : x ≤ y\nh_2 : ¬y ≤ x\nvl : Valid' o₁ (insertWith f x l) ↑y\ne : Raised (size l) (size (insertWith f x l))\n⊢ Valid' o₁ (balanceL (insertWith f x l) y r) o₂ ∧\n    Raised (size (node sz l y r)) (size (balanceL (insertWith f x l) y r))\n[PROOFSTEP]\nsuffices H\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : x ≤ y\nh_2 : ¬y ≤ x\nvl : Valid' o₁ (insertWith f x l) ↑y\ne : Raised (size l) (size (insertWith f x l))\nH : ?m.378189\n⊢ Valid' o₁ (balanceL (insertWith f x l) y r) o₂ ∧\n    Raised (size (node sz l y r)) (size (balanceL (insertWith f x l) y r))\n[PROOFSTEP]\nrefine' ⟨vl.balanceL h.right H, _⟩\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : x ≤ y\nh_2 : ¬y ≤ x\nvl : Valid' o₁ (insertWith f x l) ↑y\ne : Raised (size l) (size (insertWith f x l))\nH :\n  (∃ l', Raised l' (size (insertWith f x l)) ∧ BalancedSz l' (size r)) ∨\n    ∃ r', Raised (size r) r' ∧ BalancedSz (size (insertWith f x l)) r'\n⊢ Raised (size (node sz l y r)) (size (balanceL (insertWith f x l) y r))\n[PROOFSTEP]\nrw [size_balanceL vl.3 h.3.2.2 vl.2 h.2.2.2 H, h.2.size_eq]\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : x ≤ y\nh_2 : ¬y ≤ x\nvl : Valid' o₁ (insertWith f x l) ↑y\ne : Raised (size l) (size (insertWith f x l))\nH :\n  (∃ l', Raised l' (size (insertWith f x l)) ∧ BalancedSz l' (size r)) ∨\n    ∃ r', Raised (size r) r' ∧ BalancedSz (size (insertWith f x l)) r'\n⊢ Raised (size l + size r + 1) (size (insertWith f x l) + size r + 1)\n[PROOFSTEP]\nrefine' (e.add_right _).add_right _\n[GOAL]\ncase H\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : x ≤ y\nh_2 : ¬y ≤ x\nvl : Valid' o₁ (insertWith f x l) ↑y\ne : Raised (size l) (size (insertWith f x l))\n⊢ (∃ l', Raised l' (size (insertWith f x l)) ∧ BalancedSz l' (size r)) ∨\n    ∃ r', Raised (size r) r' ∧ BalancedSz (size (insertWith f x l)) r'\n[PROOFSTEP]\nexact Or.inl ⟨_, e, h.3.1⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : ¬x ≤ y\n⊢ Valid' o₁ (balanceR l y (insertWith f x r)) o₂ ∧\n    Raised (size (node sz l y r)) (size (balanceR l y (insertWith f x r)))\n[PROOFSTEP]\nhave : y < x := lt_of_le_not_le ((total_of (· ≤ ·) _ _).resolve_left h_1) h_1\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : ¬x ≤ y\nthis : y < x\n⊢ Valid' o₁ (balanceR l y (insertWith f x r)) o₂ ∧\n    Raised (size (node sz l y r)) (size (balanceR l y (insertWith f x r)))\n[PROOFSTEP]\nrcases insertWith.valid_aux f x hf h.right this br with ⟨vr, e⟩\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : ¬x ≤ y\nthis : y < x\nvr : Valid' (↑y) (insertWith f x r) o₂\ne : Raised (size r) (size (insertWith f x r))\n⊢ Valid' o₁ (balanceR l y (insertWith f x r)) o₂ ∧\n    Raised (size (node sz l y r)) (size (balanceR l y (insertWith f x r)))\n[PROOFSTEP]\nsuffices H\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : ¬x ≤ y\nthis : y < x\nvr : Valid' (↑y) (insertWith f x r) o₂\ne : Raised (size r) (size (insertWith f x r))\nH : ?m.378711\n⊢ Valid' o₁ (balanceR l y (insertWith f x r)) o₂ ∧\n    Raised (size (node sz l y r)) (size (balanceR l y (insertWith f x r)))\n[PROOFSTEP]\nrefine' ⟨h.left.balanceR vr H, _⟩\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : ¬x ≤ y\nthis : y < x\nvr : Valid' (↑y) (insertWith f x r) o₂\ne : Raised (size r) (size (insertWith f x r))\nH :\n  (∃ l', Raised (size l) l' ∧ BalancedSz l' (size (insertWith f x r))) ∨\n    ∃ r', Raised r' (size (insertWith f x r)) ∧ BalancedSz (size l) r'\n⊢ Raised (size (node sz l y r)) (size (balanceR l y (insertWith f x r)))\n[PROOFSTEP]\nrw [size_balanceR h.3.2.1 vr.3 h.2.2.1 vr.2 H, h.2.size_eq]\n[GOAL]\ncase neg.intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : ¬x ≤ y\nthis : y < x\nvr : Valid' (↑y) (insertWith f x r) o₂\ne : Raised (size r) (size (insertWith f x r))\nH :\n  (∃ l', Raised (size l) l' ∧ BalancedSz l' (size (insertWith f x r))) ∨\n    ∃ r', Raised r' (size (insertWith f x r)) ∧ BalancedSz (size l) r'\n⊢ Raised (size l + size r + 1) (size l + size (insertWith f x r) + 1)\n[PROOFSTEP]\nrefine' (e.add_left _).add_right _\n[GOAL]\ncase H\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nf : α → α\nx : α\nhf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x\nsz : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\no₁ : WithBot α\no₂ : WithTop α\nh : Valid' o₁ (node sz l y r) o₂\nbl : Bounded nil o₁ ↑x\nbr : Bounded nil (↑x) o₂\nh_1 : ¬x ≤ y\nthis : y < x\nvr : Valid' (↑y) (insertWith f x r) o₂\ne : Raised (size r) (size (insertWith f x r))\n⊢ (∃ l', Raised (size l) l' ∧ BalancedSz l' (size (insertWith f x r))) ∨\n    ∃ r', Raised r' (size (insertWith f x r)) ∧ BalancedSz (size l) r'\n[PROOFSTEP]\nexact Or.inr ⟨_, e, h.3.1⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\n⊢ Ordnode.insert x (node size✝ l y r) = insertWith (fun x_1 => x) x (node size✝ l y r)\n[PROOFSTEP]\nunfold Ordnode.insert insertWith\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\n⊢ (match cmpLE x y with\n    | Ordering.lt => balanceL (Ordnode.insert x l) y r\n    | Ordering.eq => node size✝ l x r\n    | Ordering.gt => balanceR l y (Ordnode.insert x r)) =\n    match cmpLE x y with\n    | Ordering.lt => balanceL (insertWith (fun x_1 => x) x l) y r\n    | Ordering.eq => node size✝ l x r\n    | Ordering.gt => balanceR l y (insertWith (fun x_1 => x) x r)\n[PROOFSTEP]\ncases cmpLE x y\n[GOAL]\ncase lt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\n⊢ (match Ordering.lt with\n    | Ordering.lt => balanceL (Ordnode.insert x l) y r\n    | Ordering.eq => node size✝ l x r\n    | Ordering.gt => balanceR l y (Ordnode.insert x r)) =\n    match Ordering.lt with\n    | Ordering.lt => balanceL (insertWith (fun x_1 => x) x l) y r\n    | Ordering.eq => node size✝ l x r\n    | Ordering.gt => balanceR l y (insertWith (fun x_1 => x) x r)\n[PROOFSTEP]\nsimp [insert_eq_insertWith]\n[GOAL]\ncase eq\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\n⊢ (match Ordering.eq with\n    | Ordering.lt => balanceL (Ordnode.insert x l) y r\n    | Ordering.eq => node size✝ l x r\n    | Ordering.gt => balanceR l y (Ordnode.insert x r)) =\n    match Ordering.eq with\n    | Ordering.lt => balanceL (insertWith (fun x_1 => x) x l) y r\n    | Ordering.eq => node size✝ l x r\n    | Ordering.gt => balanceR l y (insertWith (fun x_1 => x) x r)\n[PROOFSTEP]\nsimp [insert_eq_insertWith]\n[GOAL]\ncase gt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\n⊢ (match Ordering.gt with\n    | Ordering.lt => balanceL (Ordnode.insert x l) y r\n    | Ordering.eq => node size✝ l x r\n    | Ordering.gt => balanceR l y (Ordnode.insert x r)) =\n    match Ordering.gt with\n    | Ordering.lt => balanceL (insertWith (fun x_1 => x) x l) y r\n    | Ordering.eq => node size✝ l x r\n    | Ordering.gt => balanceR l y (insertWith (fun x_1 => x) x r)\n[PROOFSTEP]\nsimp [insert_eq_insertWith]\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nt : Ordnode α\nh : Valid t\n⊢ Valid (Ordnode.insert x t)\n[PROOFSTEP]\nrw [insert_eq_insertWith]\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nt : Ordnode α\nh : Valid t\n⊢ Valid (insertWith (fun x_1 => x) x t)\n[PROOFSTEP]\nexact insertWith.valid _ _ (fun _ _ => ⟨le_rfl, le_rfl⟩) h\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\n⊢ insert' x (node size✝ l y r) = insertWith id x (node size✝ l y r)\n[PROOFSTEP]\nunfold insert' insertWith\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\n⊢ (match cmpLE x y with\n    | Ordering.lt => balanceL (insert' x l) y r\n    | Ordering.eq => node size✝ l y r\n    | Ordering.gt => balanceR l y (insert' x r)) =\n    match cmpLE x y with\n    | Ordering.lt => balanceL (insertWith id x l) y r\n    | Ordering.eq => node size✝ l (id y) r\n    | Ordering.gt => balanceR l y (insertWith id x r)\n[PROOFSTEP]\ncases cmpLE x y\n[GOAL]\ncase lt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\n⊢ (match Ordering.lt with\n    | Ordering.lt => balanceL (insert' x l) y r\n    | Ordering.eq => node size✝ l y r\n    | Ordering.gt => balanceR l y (insert' x r)) =\n    match Ordering.lt with\n    | Ordering.lt => balanceL (insertWith id x l) y r\n    | Ordering.eq => node size✝ l (id y) r\n    | Ordering.gt => balanceR l y (insertWith id x r)\n[PROOFSTEP]\nsimp [insert'_eq_insertWith]\n[GOAL]\ncase eq\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\n⊢ (match Ordering.eq with\n    | Ordering.lt => balanceL (insert' x l) y r\n    | Ordering.eq => node size✝ l y r\n    | Ordering.gt => balanceR l y (insert' x r)) =\n    match Ordering.eq with\n    | Ordering.lt => balanceL (insertWith id x l) y r\n    | Ordering.eq => node size✝ l (id y) r\n    | Ordering.gt => balanceR l y (insertWith id x r)\n[PROOFSTEP]\nsimp [insert'_eq_insertWith]\n[GOAL]\ncase gt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nl : Ordnode α\ny : α\nr : Ordnode α\n⊢ (match Ordering.gt with\n    | Ordering.lt => balanceL (insert' x l) y r\n    | Ordering.eq => node size✝ l y r\n    | Ordering.gt => balanceR l y (insert' x r)) =\n    match Ordering.gt with\n    | Ordering.lt => balanceL (insertWith id x l) y r\n    | Ordering.eq => node size✝ l (id y) r\n    | Ordering.gt => balanceR l y (insertWith id x r)\n[PROOFSTEP]\nsimp [insert'_eq_insertWith]\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nt : Ordnode α\nh : Valid t\n⊢ Valid (insert' x t)\n[PROOFSTEP]\nrw [insert'_eq_insertWith]\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : IsTotal α fun x x_1 => x ≤ x_1\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nt : Ordnode α\nh : Valid t\n⊢ Valid (insertWith id x t)\n[PROOFSTEP]\nexact insertWith.valid _ _ (fun _ => id) h\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nt : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ t a₂\n⊢ Valid' (Option.map f a₁) (map f t) (Option.map f a₂) ∧ size (map f t) = size t\n[PROOFSTEP]\ninduction t generalizing a₁ a₂ with\n| nil =>\n  simp [map]; apply valid'_nil\n  cases a₁; · trivial\n  cases a₂; · trivial\n  simp [Bounded]\n  exact f_strict_mono h.ord\n| node _ _ _ _ t_ih_l t_ih_r =>\n  have t_ih_l' := t_ih_l h.left\n  have t_ih_r' := t_ih_r h.right\n  clear t_ih_l t_ih_r\n  cases' t_ih_l' with t_l_valid t_l_size\n  cases' t_ih_r' with t_r_valid t_r_size\n  simp [map]\n  constructor\n  · exact And.intro t_l_valid.ord t_r_valid.ord\n  · constructor\n    · rw [t_l_size, t_r_size]; exact h.sz.1\n    · constructor\n      · exact t_l_valid.sz\n      · exact t_r_valid.sz\n  · constructor\n    · rw [t_l_size, t_r_size]; exact h.bal.1\n    · constructor\n      · exact t_l_valid.bal\n      · exact t_r_valid.bal\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nt : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ t a₂\n⊢ Valid' (Option.map f a₁) (map f t) (Option.map f a₂) ∧ size (map f t) = size t\n[PROOFSTEP]\ninduction t generalizing a₁ a₂ with\n| nil =>\n  simp [map]; apply valid'_nil\n  cases a₁; · trivial\n  cases a₂; · trivial\n  simp [Bounded]\n  exact f_strict_mono h.ord\n| node _ _ _ _ t_ih_l t_ih_r =>\n  have t_ih_l' := t_ih_l h.left\n  have t_ih_r' := t_ih_r h.right\n  clear t_ih_l t_ih_r\n  cases' t_ih_l' with t_l_valid t_l_size\n  cases' t_ih_r' with t_r_valid t_r_size\n  simp [map]\n  constructor\n  · exact And.intro t_l_valid.ord t_r_valid.ord\n  · constructor\n    · rw [t_l_size, t_r_size]; exact h.sz.1\n    · constructor\n      · exact t_l_valid.sz\n      · exact t_r_valid.sz\n  · constructor\n    · rw [t_l_size, t_r_size]; exact h.bal.1\n    · constructor\n      · exact t_l_valid.bal\n      · exact t_r_valid.bal\n[GOAL]\ncase nil\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ nil a₂\n⊢ Valid' (Option.map f a₁) (map f nil) (Option.map f a₂) ∧ size (map f nil) = size nil\n[PROOFSTEP]\n\n| nil =>\n  simp [map]; apply valid'_nil\n  cases a₁; · trivial\n  cases a₂; · trivial\n  simp [Bounded]\n  exact f_strict_mono h.ord\n[GOAL]\ncase nil\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ nil a₂\n⊢ Valid' (Option.map f a₁) (map f nil) (Option.map f a₂) ∧ size (map f nil) = size nil\n[PROOFSTEP]\nsimp [map]\n[GOAL]\ncase nil\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ nil a₂\n⊢ Valid' (Option.map f a₁) nil (Option.map f a₂)\n[PROOFSTEP]\napply valid'_nil\n[GOAL]\ncase nil.h\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ nil a₂\n⊢ Bounded nil (Option.map f a₁) (Option.map f a₂)\n[PROOFSTEP]\ncases a₁\n[GOAL]\ncase nil.h.none\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\na₂ : WithTop α\nh : Valid' none nil a₂\n⊢ Bounded nil (Option.map f none) (Option.map f a₂)\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase nil.h.some\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\na₂ : WithTop α\nval✝ : α\nh : Valid' (some val✝) nil a₂\n⊢ Bounded nil (Option.map f (some val✝)) (Option.map f a₂)\n[PROOFSTEP]\ncases a₂\n[GOAL]\ncase nil.h.some.none\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nval✝ : α\nh : Valid' (some val✝) nil none\n⊢ Bounded nil (Option.map f (some val✝)) (Option.map f none)\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase nil.h.some.some\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nval✝¹ val✝ : α\nh : Valid' (some val✝¹) nil (some val✝)\n⊢ Bounded nil (Option.map f (some val✝¹)) (Option.map f (some val✝))\n[PROOFSTEP]\nsimp [Bounded]\n[GOAL]\ncase nil.h.some.some\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nval✝¹ val✝ : α\nh : Valid' (some val✝¹) nil (some val✝)\n⊢ f val✝¹ < f val✝\n[PROOFSTEP]\nexact f_strict_mono h.ord\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nt_ih_l :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ l✝ a₂ → Valid' (Option.map f a₁) (map f l✝) (Option.map f a₂) ∧ size (map f l✝) = size l✝\nt_ih_r :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ r✝ a₂ → Valid' (Option.map f a₁) (map f r✝) (Option.map f a₂) ∧ size (map f r✝) = size r✝\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\n⊢ Valid' (Option.map f a₁) (map f (Ordnode.node size✝ l✝ x✝ r✝)) (Option.map f a₂) ∧\n    size (map f (Ordnode.node size✝ l✝ x✝ r✝)) = size (Ordnode.node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\n\n| node _ _ _ _ t_ih_l t_ih_r =>\n  have t_ih_l' := t_ih_l h.left\n  have t_ih_r' := t_ih_r h.right\n  clear t_ih_l t_ih_r\n  cases' t_ih_l' with t_l_valid t_l_size\n  cases' t_ih_r' with t_r_valid t_r_size\n  simp [map]\n  constructor\n  · exact And.intro t_l_valid.ord t_r_valid.ord\n  · constructor\n    · rw [t_l_size, t_r_size]; exact h.sz.1\n    · constructor\n      · exact t_l_valid.sz\n      · exact t_r_valid.sz\n  · constructor\n    · rw [t_l_size, t_r_size]; exact h.bal.1\n    · constructor\n      · exact t_l_valid.bal\n      · exact t_r_valid.bal\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nt_ih_l :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ l✝ a₂ → Valid' (Option.map f a₁) (map f l✝) (Option.map f a₂) ∧ size (map f l✝) = size l✝\nt_ih_r :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ r✝ a₂ → Valid' (Option.map f a₁) (map f r✝) (Option.map f a₂) ∧ size (map f r✝) = size r✝\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\n⊢ Valid' (Option.map f a₁) (map f (Ordnode.node size✝ l✝ x✝ r✝)) (Option.map f a₂) ∧\n    size (map f (Ordnode.node size✝ l✝ x✝ r✝)) = size (Ordnode.node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\nhave t_ih_l' := t_ih_l h.left\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nt_ih_l :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ l✝ a₂ → Valid' (Option.map f a₁) (map f l✝) (Option.map f a₂) ∧ size (map f l✝) = size l✝\nt_ih_r :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ r✝ a₂ → Valid' (Option.map f a₁) (map f r✝) (Option.map f a₂) ∧ size (map f r✝) = size r✝\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_ih_l' : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝) ∧ size (map f l✝) = size l✝\n⊢ Valid' (Option.map f a₁) (map f (Ordnode.node size✝ l✝ x✝ r✝)) (Option.map f a₂) ∧\n    size (map f (Ordnode.node size✝ l✝ x✝ r✝)) = size (Ordnode.node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\nhave t_ih_r' := t_ih_r h.right\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nt_ih_l :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ l✝ a₂ → Valid' (Option.map f a₁) (map f l✝) (Option.map f a₂) ∧ size (map f l✝) = size l✝\nt_ih_r :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ r✝ a₂ → Valid' (Option.map f a₁) (map f r✝) (Option.map f a₂) ∧ size (map f r✝) = size r✝\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_ih_l' : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝) ∧ size (map f l✝) = size l✝\nt_ih_r' : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂) ∧ size (map f r✝) = size r✝\n⊢ Valid' (Option.map f a₁) (map f (Ordnode.node size✝ l✝ x✝ r✝)) (Option.map f a₂) ∧\n    size (map f (Ordnode.node size✝ l✝ x✝ r✝)) = size (Ordnode.node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\nclear t_ih_l t_ih_r\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_ih_l' : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝) ∧ size (map f l✝) = size l✝\nt_ih_r' : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂) ∧ size (map f r✝) = size r✝\n⊢ Valid' (Option.map f a₁) (map f (Ordnode.node size✝ l✝ x✝ r✝)) (Option.map f a₂) ∧\n    size (map f (Ordnode.node size✝ l✝ x✝ r✝)) = size (Ordnode.node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\ncases' t_ih_l' with t_l_valid t_l_size\n[GOAL]\ncase node.intro\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_ih_r' : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂) ∧ size (map f r✝) = size r✝\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\n⊢ Valid' (Option.map f a₁) (map f (Ordnode.node size✝ l✝ x✝ r✝)) (Option.map f a₂) ∧\n    size (map f (Ordnode.node size✝ l✝ x✝ r✝)) = size (Ordnode.node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\ncases' t_ih_r' with t_r_valid t_r_size\n[GOAL]\ncase node.intro.intro\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ Valid' (Option.map f a₁) (map f (Ordnode.node size✝ l✝ x✝ r✝)) (Option.map f a₂) ∧\n    size (map f (Ordnode.node size✝ l✝ x✝ r✝)) = size (Ordnode.node size✝ l✝ x✝ r✝)\n[PROOFSTEP]\nsimp [map]\n[GOAL]\ncase node.intro.intro\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ Valid' (Option.map f a₁) (Ordnode.node size✝ (map f l✝) (f x✝) (map f r✝)) (Option.map f a₂)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase node.intro.intro.ord\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ Bounded (Ordnode.node size✝ (map f l✝) (f x✝) (map f r✝)) (Option.map f a₁) (Option.map f a₂)\n[PROOFSTEP]\nexact And.intro t_l_valid.ord t_r_valid.ord\n[GOAL]\ncase node.intro.intro.sz\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ Sized (Ordnode.node size✝ (map f l✝) (f x✝) (map f r✝))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase node.intro.intro.sz.left\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ size✝ = size (map f l✝) + size (map f r✝) + 1\n[PROOFSTEP]\nrw [t_l_size, t_r_size]\n[GOAL]\ncase node.intro.intro.sz.left\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ size✝ = size l✝ + size r✝ + 1\n[PROOFSTEP]\nexact h.sz.1\n[GOAL]\ncase node.intro.intro.sz.right\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ Sized (map f l✝) ∧ Sized (map f r✝)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase node.intro.intro.sz.right.left\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ Sized (map f l✝)\n[PROOFSTEP]\nexact t_l_valid.sz\n[GOAL]\ncase node.intro.intro.sz.right.right\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ Sized (map f r✝)\n[PROOFSTEP]\nexact t_r_valid.sz\n[GOAL]\ncase node.intro.intro.bal\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ Balanced (Ordnode.node size✝ (map f l✝) (f x✝) (map f r✝))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase node.intro.intro.bal.left\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ BalancedSz (size (map f l✝)) (size (map f r✝))\n[PROOFSTEP]\nrw [t_l_size, t_r_size]\n[GOAL]\ncase node.intro.intro.bal.left\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ BalancedSz (size l✝) (size r✝)\n[PROOFSTEP]\nexact h.bal.1\n[GOAL]\ncase node.intro.intro.bal.right\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ Balanced (map f l✝) ∧ Balanced (map f r✝)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase node.intro.intro.bal.right.left\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ Balanced (map f l✝)\n[PROOFSTEP]\nexact t_l_valid.bal\n[GOAL]\ncase node.intro.intro.bal.right.right\nα : Type u_1\ninst✝¹ : Preorder α\nβ : Type u_2\ninst✝ : Preorder β\nf : α → β\nf_strict_mono : StrictMono f\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ l✝ x✝ r✝) a₂\nt_l_valid : Valid' (Option.map f a₁) (map f l✝) (Option.map f ↑x✝)\nt_l_size : size (map f l✝) = size l✝\nt_r_valid : Valid' (Option.map f ↑x✝) (map f r✝) (Option.map f a₂)\nt_r_size : size (map f r✝) = size r✝\n⊢ Balanced (map f r✝)\n[PROOFSTEP]\nexact t_r_valid.bal\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nt : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ t a₂\n⊢ Valid' a₁ (erase x t) a₂ ∧ Raised (size (erase x t)) (size t)\n[PROOFSTEP]\ninduction t generalizing a₁ a₂ with\n| nil => simp [erase, Raised]; exact h\n| node _ t_l t_x t_r t_ih_l t_ih_r =>\n  simp [erase]\n  have t_ih_l' := t_ih_l h.left\n  have t_ih_r' := t_ih_r h.right\n  clear t_ih_l t_ih_r\n  cases' t_ih_l' with t_l_valid t_l_size\n  cases' t_ih_r' with t_r_valid t_r_size\n  cases cmpLE x t_x <;> rw [h.sz.1]\n  · suffices h_balanceable\n    constructor\n    · exact Valid'.balanceR t_l_valid h.right h_balanceable\n    · rw [size_balanceR t_l_valid.bal h.right.bal t_l_valid.sz h.right.sz h_balanceable]\n      repeat apply Raised.add_right\n      exact t_l_size\n    · left; exists t_l.size; exact And.intro t_l_size h.bal.1\n  · have h_glue := Valid'.glue h.left h.right h.bal.1\n    cases' h_glue with h_glue_valid h_glue_sized\n    constructor\n    · exact h_glue_valid\n    · right; rw [h_glue_sized]\n  · suffices h_balanceable\n    constructor\n    · exact Valid'.balanceL h.left t_r_valid h_balanceable\n    · rw [size_balanceL h.left.bal t_r_valid.bal h.left.sz t_r_valid.sz h_balanceable]\n      apply Raised.add_right\n      apply Raised.add_left\n      exact t_r_size\n    · right; exists t_r.size; exact And.intro t_r_size h.bal.1\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nt : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ t a₂\n⊢ Valid' a₁ (erase x t) a₂ ∧ Raised (size (erase x t)) (size t)\n[PROOFSTEP]\ninduction t generalizing a₁ a₂ with\n| nil => simp [erase, Raised]; exact h\n| node _ t_l t_x t_r t_ih_l t_ih_r =>\n  simp [erase]\n  have t_ih_l' := t_ih_l h.left\n  have t_ih_r' := t_ih_r h.right\n  clear t_ih_l t_ih_r\n  cases' t_ih_l' with t_l_valid t_l_size\n  cases' t_ih_r' with t_r_valid t_r_size\n  cases cmpLE x t_x <;> rw [h.sz.1]\n  · suffices h_balanceable\n    constructor\n    · exact Valid'.balanceR t_l_valid h.right h_balanceable\n    · rw [size_balanceR t_l_valid.bal h.right.bal t_l_valid.sz h.right.sz h_balanceable]\n      repeat apply Raised.add_right\n      exact t_l_size\n    · left; exists t_l.size; exact And.intro t_l_size h.bal.1\n  · have h_glue := Valid'.glue h.left h.right h.bal.1\n    cases' h_glue with h_glue_valid h_glue_sized\n    constructor\n    · exact h_glue_valid\n    · right; rw [h_glue_sized]\n  · suffices h_balanceable\n    constructor\n    · exact Valid'.balanceL h.left t_r_valid h_balanceable\n    · rw [size_balanceL h.left.bal t_r_valid.bal h.left.sz t_r_valid.sz h_balanceable]\n      apply Raised.add_right\n      apply Raised.add_left\n      exact t_r_size\n    · right; exists t_r.size; exact And.intro t_r_size h.bal.1\n[GOAL]\ncase nil\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ nil a₂\n⊢ Valid' a₁ (erase x nil) a₂ ∧ Raised (size (erase x nil)) (size nil)\n[PROOFSTEP]\n\n| nil => simp [erase, Raised]; exact h\n[GOAL]\ncase nil\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ nil a₂\n⊢ Valid' a₁ (erase x nil) a₂ ∧ Raised (size (erase x nil)) (size nil)\n[PROOFSTEP]\nsimp [erase, Raised]\n[GOAL]\ncase nil\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ nil a₂\n⊢ Valid' a₁ nil a₂\n[PROOFSTEP]\nexact h\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\nt_ih_l :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ t_l a₂ → Valid' a₁ (erase x t_l) a₂ ∧ Raised (size (erase x t_l)) (size t_l)\nt_ih_r :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ t_r a₂ → Valid' a₁ (erase x t_r) a₂ ∧ Raised (size (erase x t_r)) (size t_r)\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\n⊢ Valid' a₁ (erase x (Ordnode.node size✝ t_l t_x t_r)) a₂ ∧\n    Raised (size (erase x (Ordnode.node size✝ t_l t_x t_r))) (size (Ordnode.node size✝ t_l t_x t_r))\n[PROOFSTEP]\n\n| node _ t_l t_x t_r t_ih_l t_ih_r =>\n  simp [erase]\n  have t_ih_l' := t_ih_l h.left\n  have t_ih_r' := t_ih_r h.right\n  clear t_ih_l t_ih_r\n  cases' t_ih_l' with t_l_valid t_l_size\n  cases' t_ih_r' with t_r_valid t_r_size\n  cases cmpLE x t_x <;> rw [h.sz.1]\n  · suffices h_balanceable\n    constructor\n    · exact Valid'.balanceR t_l_valid h.right h_balanceable\n    · rw [size_balanceR t_l_valid.bal h.right.bal t_l_valid.sz h.right.sz h_balanceable]\n      repeat apply Raised.add_right\n      exact t_l_size\n    · left; exists t_l.size; exact And.intro t_l_size h.bal.1\n  · have h_glue := Valid'.glue h.left h.right h.bal.1\n    cases' h_glue with h_glue_valid h_glue_sized\n    constructor\n    · exact h_glue_valid\n    · right; rw [h_glue_sized]\n  · suffices h_balanceable\n    constructor\n    · exact Valid'.balanceL h.left t_r_valid h_balanceable\n    · rw [size_balanceL h.left.bal t_r_valid.bal h.left.sz t_r_valid.sz h_balanceable]\n      apply Raised.add_right\n      apply Raised.add_left\n      exact t_r_size\n    · right; exists t_r.size; exact And.intro t_r_size h.bal.1\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\nt_ih_l :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ t_l a₂ → Valid' a₁ (erase x t_l) a₂ ∧ Raised (size (erase x t_l)) (size t_l)\nt_ih_r :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ t_r a₂ → Valid' a₁ (erase x t_r) a₂ ∧ Raised (size (erase x t_r)) (size t_r)\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\n⊢ Valid' a₁ (erase x (Ordnode.node size✝ t_l t_x t_r)) a₂ ∧\n    Raised (size (erase x (Ordnode.node size✝ t_l t_x t_r))) (size (Ordnode.node size✝ t_l t_x t_r))\n[PROOFSTEP]\nsimp [erase]\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\nt_ih_l :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ t_l a₂ → Valid' a₁ (erase x t_l) a₂ ∧ Raised (size (erase x t_l)) (size t_l)\nt_ih_r :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ t_r a₂ → Valid' a₁ (erase x t_r) a₂ ∧ Raised (size (erase x t_r)) (size t_r)\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\n⊢ Valid' a₁\n      (match cmpLE x t_x with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match cmpLE x t_x with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      size✝\n[PROOFSTEP]\nhave t_ih_l' := t_ih_l h.left\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\nt_ih_l :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ t_l a₂ → Valid' a₁ (erase x t_l) a₂ ∧ Raised (size (erase x t_l)) (size t_l)\nt_ih_r :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ t_r a₂ → Valid' a₁ (erase x t_r) a₂ ∧ Raised (size (erase x t_r)) (size t_r)\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_ih_l' : Valid' a₁ (erase x t_l) ↑t_x ∧ Raised (size (erase x t_l)) (size t_l)\n⊢ Valid' a₁\n      (match cmpLE x t_x with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match cmpLE x t_x with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      size✝\n[PROOFSTEP]\nhave t_ih_r' := t_ih_r h.right\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\nt_ih_l :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ t_l a₂ → Valid' a₁ (erase x t_l) a₂ ∧ Raised (size (erase x t_l)) (size t_l)\nt_ih_r :\n  ∀ {a₁ : WithBot α} {a₂ : WithTop α},\n    Valid' a₁ t_r a₂ → Valid' a₁ (erase x t_r) a₂ ∧ Raised (size (erase x t_r)) (size t_r)\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_ih_l' : Valid' a₁ (erase x t_l) ↑t_x ∧ Raised (size (erase x t_l)) (size t_l)\nt_ih_r' : Valid' (↑t_x) (erase x t_r) a₂ ∧ Raised (size (erase x t_r)) (size t_r)\n⊢ Valid' a₁\n      (match cmpLE x t_x with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match cmpLE x t_x with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      size✝\n[PROOFSTEP]\nclear t_ih_l t_ih_r\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_ih_l' : Valid' a₁ (erase x t_l) ↑t_x ∧ Raised (size (erase x t_l)) (size t_l)\nt_ih_r' : Valid' (↑t_x) (erase x t_r) a₂ ∧ Raised (size (erase x t_r)) (size t_r)\n⊢ Valid' a₁\n      (match cmpLE x t_x with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match cmpLE x t_x with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      size✝\n[PROOFSTEP]\ncases' t_ih_l' with t_l_valid t_l_size\n[GOAL]\ncase node.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_ih_r' : Valid' (↑t_x) (erase x t_r) a₂ ∧ Raised (size (erase x t_r)) (size t_r)\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\n⊢ Valid' a₁\n      (match cmpLE x t_x with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match cmpLE x t_x with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      size✝\n[PROOFSTEP]\ncases' t_ih_r' with t_r_valid t_r_size\n[GOAL]\ncase node.intro.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ Valid' a₁\n      (match cmpLE x t_x with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match cmpLE x t_x with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      size✝\n[PROOFSTEP]\ncases cmpLE x t_x\n[GOAL]\ncase node.intro.intro.lt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ Valid' a₁\n      (match Ordering.lt with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match Ordering.lt with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      size✝\n[PROOFSTEP]\nrw [h.sz.1]\n[GOAL]\ncase node.intro.intro.eq\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ Valid' a₁\n      (match Ordering.eq with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match Ordering.eq with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      size✝\n[PROOFSTEP]\nrw [h.sz.1]\n[GOAL]\ncase node.intro.intro.gt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ Valid' a₁\n      (match Ordering.gt with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match Ordering.gt with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      size✝\n[PROOFSTEP]\nrw [h.sz.1]\n[GOAL]\ncase node.intro.intro.lt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ Valid' a₁\n      (match Ordering.lt with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match Ordering.lt with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      (size t_l + size t_r + 1)\n[PROOFSTEP]\nsuffices h_balanceable\n[GOAL]\ncase node.intro.intro.lt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable : ?m.391248\n⊢ Valid' a₁\n      (match Ordering.lt with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match Ordering.lt with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      (size t_l + size t_r + 1)\ncase h_balanceable\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ ?m.391248\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase node.intro.intro.lt.left\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable : ?m.391248\n⊢ Valid' a₁\n    (match Ordering.lt with\n    | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n    | Ordering.eq => Ordnode.glue t_l t_r\n    | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n    a₂\n[PROOFSTEP]\nexact Valid'.balanceR t_l_valid h.right h_balanceable\n[GOAL]\ncase node.intro.intro.lt.right\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable :\n  (∃ l', Raised (size (erase x t_l)) l' ∧ BalancedSz l' (size t_r)) ∨\n    ∃ r', Raised r' (size t_r) ∧ BalancedSz (size (erase x t_l)) r'\n⊢ Raised\n    (size\n      (match Ordering.lt with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n    (size t_l + size t_r + 1)\n[PROOFSTEP]\nrw [size_balanceR t_l_valid.bal h.right.bal t_l_valid.sz h.right.sz h_balanceable]\n[GOAL]\ncase node.intro.intro.lt.right\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable :\n  (∃ l', Raised (size (erase x t_l)) l' ∧ BalancedSz l' (size t_r)) ∨\n    ∃ r', Raised r' (size t_r) ∧ BalancedSz (size (erase x t_l)) r'\n⊢ Raised (size (erase x t_l) + size t_r + 1) (size t_l + size t_r + 1)\n[PROOFSTEP]\nrepeat apply Raised.add_right\n[GOAL]\ncase node.intro.intro.lt.right\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable :\n  (∃ l', Raised (size (erase x t_l)) l' ∧ BalancedSz l' (size t_r)) ∨\n    ∃ r', Raised r' (size t_r) ∧ BalancedSz (size (erase x t_l)) r'\n⊢ Raised (size (erase x t_l) + size t_r + 1) (size t_l + size t_r + 1)\n[PROOFSTEP]\napply Raised.add_right\n[GOAL]\ncase node.intro.intro.lt.right.H\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable :\n  (∃ l', Raised (size (erase x t_l)) l' ∧ BalancedSz l' (size t_r)) ∨\n    ∃ r', Raised r' (size t_r) ∧ BalancedSz (size (erase x t_l)) r'\n⊢ Raised (size (erase x t_l) + size t_r) (size t_l + size t_r)\n[PROOFSTEP]\napply Raised.add_right\n[GOAL]\ncase node.intro.intro.lt.right.H.H\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable :\n  (∃ l', Raised (size (erase x t_l)) l' ∧ BalancedSz l' (size t_r)) ∨\n    ∃ r', Raised r' (size t_r) ∧ BalancedSz (size (erase x t_l)) r'\n⊢ Raised (size (erase x t_l)) (size t_l)\n[PROOFSTEP]\napply Raised.add_right\n[GOAL]\ncase node.intro.intro.lt.right.H.H\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable :\n  (∃ l', Raised (size (erase x t_l)) l' ∧ BalancedSz l' (size t_r)) ∨\n    ∃ r', Raised r' (size t_r) ∧ BalancedSz (size (erase x t_l)) r'\n⊢ Raised (size (erase x t_l)) (size t_l)\n[PROOFSTEP]\nexact t_l_size\n[GOAL]\ncase h_balanceable\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ (∃ l', Raised (size (erase x t_l)) l' ∧ BalancedSz l' (size t_r)) ∨\n    ∃ r', Raised r' (size t_r) ∧ BalancedSz (size (erase x t_l)) r'\n[PROOFSTEP]\nleft\n[GOAL]\ncase h_balanceable.h\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ ∃ l', Raised (size (erase x t_l)) l' ∧ BalancedSz l' (size t_r)\n[PROOFSTEP]\nexists t_l.size\n[GOAL]\ncase h_balanceable.h\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ Raised (size (erase x t_l)) (size t_l) ∧ BalancedSz (size t_l) (size t_r)\n[PROOFSTEP]\nexact And.intro t_l_size h.bal.1\n[GOAL]\ncase node.intro.intro.eq\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ Valid' a₁\n      (match Ordering.eq with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match Ordering.eq with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      (size t_l + size t_r + 1)\n[PROOFSTEP]\nhave h_glue := Valid'.glue h.left h.right h.bal.1\n[GOAL]\ncase node.intro.intro.eq\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_glue : Valid' a₁ (Ordnode.glue t_l t_r) a₂ ∧ size (Ordnode.glue t_l t_r) = size t_l + size t_r\n⊢ Valid' a₁\n      (match Ordering.eq with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match Ordering.eq with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      (size t_l + size t_r + 1)\n[PROOFSTEP]\ncases' h_glue with h_glue_valid h_glue_sized\n[GOAL]\ncase node.intro.intro.eq.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_glue_valid : Valid' a₁ (Ordnode.glue t_l t_r) a₂\nh_glue_sized : size (Ordnode.glue t_l t_r) = size t_l + size t_r\n⊢ Valid' a₁\n      (match Ordering.eq with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match Ordering.eq with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      (size t_l + size t_r + 1)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase node.intro.intro.eq.intro.left\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_glue_valid : Valid' a₁ (Ordnode.glue t_l t_r) a₂\nh_glue_sized : size (Ordnode.glue t_l t_r) = size t_l + size t_r\n⊢ Valid' a₁\n    (match Ordering.eq with\n    | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n    | Ordering.eq => Ordnode.glue t_l t_r\n    | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n    a₂\n[PROOFSTEP]\nexact h_glue_valid\n[GOAL]\ncase node.intro.intro.eq.intro.right\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_glue_valid : Valid' a₁ (Ordnode.glue t_l t_r) a₂\nh_glue_sized : size (Ordnode.glue t_l t_r) = size t_l + size t_r\n⊢ Raised\n    (size\n      (match Ordering.eq with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n    (size t_l + size t_r + 1)\n[PROOFSTEP]\nright\n[GOAL]\ncase node.intro.intro.eq.intro.right.h\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_glue_valid : Valid' a₁ (Ordnode.glue t_l t_r) a₂\nh_glue_sized : size (Ordnode.glue t_l t_r) = size t_l + size t_r\n⊢ size t_l + size t_r + 1 =\n    size\n        (match Ordering.eq with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)) +\n      1\n[PROOFSTEP]\nrw [h_glue_sized]\n[GOAL]\ncase node.intro.intro.gt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ Valid' a₁\n      (match Ordering.gt with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match Ordering.gt with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      (size t_l + size t_r + 1)\n[PROOFSTEP]\nsuffices h_balanceable\n[GOAL]\ncase node.intro.intro.gt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable : ?m.391865\n⊢ Valid' a₁\n      (match Ordering.gt with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n      a₂ ∧\n    Raised\n      (size\n        (match Ordering.gt with\n        | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => Ordnode.glue t_l t_r\n        | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n      (size t_l + size t_r + 1)\ncase h_balanceable\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ ?m.391865\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase node.intro.intro.gt.left\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable : ?m.391865\n⊢ Valid' a₁\n    (match Ordering.gt with\n    | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n    | Ordering.eq => Ordnode.glue t_l t_r\n    | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r))\n    a₂\n[PROOFSTEP]\nexact Valid'.balanceL h.left t_r_valid h_balanceable\n[GOAL]\ncase node.intro.intro.gt.right\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable :\n  (∃ l', Raised l' (size t_l) ∧ BalancedSz l' (size (erase x t_r))) ∨\n    ∃ r', Raised (size (erase x t_r)) r' ∧ BalancedSz (size t_l) r'\n⊢ Raised\n    (size\n      (match Ordering.gt with\n      | Ordering.lt => Ordnode.balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => Ordnode.glue t_l t_r\n      | Ordering.gt => Ordnode.balanceL t_l t_x (erase x t_r)))\n    (size t_l + size t_r + 1)\n[PROOFSTEP]\nrw [size_balanceL h.left.bal t_r_valid.bal h.left.sz t_r_valid.sz h_balanceable]\n[GOAL]\ncase node.intro.intro.gt.right\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable :\n  (∃ l', Raised l' (size t_l) ∧ BalancedSz l' (size (erase x t_r))) ∨\n    ∃ r', Raised (size (erase x t_r)) r' ∧ BalancedSz (size t_l) r'\n⊢ Raised (size t_l + size (erase x t_r) + 1) (size t_l + size t_r + 1)\n[PROOFSTEP]\napply Raised.add_right\n[GOAL]\ncase node.intro.intro.gt.right.H\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable :\n  (∃ l', Raised l' (size t_l) ∧ BalancedSz l' (size (erase x t_r))) ∨\n    ∃ r', Raised (size (erase x t_r)) r' ∧ BalancedSz (size t_l) r'\n⊢ Raised (size t_l + size (erase x t_r)) (size t_l + size t_r)\n[PROOFSTEP]\napply Raised.add_left\n[GOAL]\ncase node.intro.intro.gt.right.H.H\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_balanceable :\n  (∃ l', Raised l' (size t_l) ∧ BalancedSz l' (size (erase x t_r))) ∨\n    ∃ r', Raised (size (erase x t_r)) r' ∧ BalancedSz (size t_l) r'\n⊢ Raised (size (erase x t_r)) (size t_r)\n[PROOFSTEP]\nexact t_r_size\n[GOAL]\ncase h_balanceable\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ (∃ l', Raised l' (size t_l) ∧ BalancedSz l' (size (erase x t_r))) ∨\n    ∃ r', Raised (size (erase x t_r)) r' ∧ BalancedSz (size t_l) r'\n[PROOFSTEP]\nright\n[GOAL]\ncase h_balanceable.h\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ ∃ r', Raised (size (erase x t_r)) r' ∧ BalancedSz (size t_l) r'\n[PROOFSTEP]\nexists t_r.size\n[GOAL]\ncase h_balanceable.h\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (Ordnode.node size✝ t_l t_x t_r) a₂\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ Raised (size (erase x t_r)) (size t_r) ∧ BalancedSz (size t_l) (size t_r)\n[PROOFSTEP]\nexact And.intro t_r_size h.bal.1\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nt : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ t a₂\nh_mem : x ∈ t\n⊢ size (erase x t) = size t - 1\n[PROOFSTEP]\ninduction t generalizing a₁ a₂ with\n| nil => contradiction\n| node _ t_l t_x t_r t_ih_l t_ih_r =>\n  have t_ih_l' := t_ih_l h.left\n  have t_ih_r' := t_ih_r h.right\n  clear t_ih_l t_ih_r\n  dsimp only [Membership.mem, mem] at h_mem \n  unfold erase\n  revert h_mem; cases cmpLE x t_x <;> intro h_mem <;> dsimp only at h_mem ⊢\n  · have t_ih_l := t_ih_l' h_mem\n    clear t_ih_l' t_ih_r'\n    have t_l_h := Valid'.erase_aux x h.left\n    cases' t_l_h with t_l_valid t_l_size\n    rw [size_balanceR t_l_valid.bal h.right.bal t_l_valid.sz h.right.sz\n        (Or.inl (Exists.intro t_l.size (And.intro t_l_size h.bal.1)))]\n    rw [t_ih_l, h.sz.1]\n    have h_pos_t_l_size := pos_size_of_mem h.left.sz h_mem\n    revert h_pos_t_l_size; cases' t_l.size with t_l_size <;> intro h_pos_t_l_size\n    · cases h_pos_t_l_size\n    · simp [Nat.succ_add]\n  · rw [(Valid'.glue h.left h.right h.bal.1).2, h.sz.1]; rfl\n  · have t_ih_r := t_ih_r' h_mem\n    clear t_ih_l' t_ih_r'\n    have t_r_h := Valid'.erase_aux x h.right\n    cases' t_r_h with t_r_valid t_r_size\n    rw [size_balanceL h.left.bal t_r_valid.bal h.left.sz t_r_valid.sz\n        (Or.inr (Exists.intro t_r.size (And.intro t_r_size h.bal.1)))]\n    rw [t_ih_r, h.sz.1]\n    have h_pos_t_r_size := pos_size_of_mem h.right.sz h_mem\n    revert h_pos_t_r_size; cases' t_r.size with t_r_size <;> intro h_pos_t_r_size\n    · cases h_pos_t_r_size\n    · simp [Nat.succ_add, Nat.add_succ]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nt : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ t a₂\nh_mem : x ∈ t\n⊢ size (erase x t) = size t - 1\n[PROOFSTEP]\ninduction t generalizing a₁ a₂ with\n| nil => contradiction\n| node _ t_l t_x t_r t_ih_l t_ih_r =>\n  have t_ih_l' := t_ih_l h.left\n  have t_ih_r' := t_ih_r h.right\n  clear t_ih_l t_ih_r\n  dsimp only [Membership.mem, mem] at h_mem \n  unfold erase\n  revert h_mem; cases cmpLE x t_x <;> intro h_mem <;> dsimp only at h_mem ⊢\n  · have t_ih_l := t_ih_l' h_mem\n    clear t_ih_l' t_ih_r'\n    have t_l_h := Valid'.erase_aux x h.left\n    cases' t_l_h with t_l_valid t_l_size\n    rw [size_balanceR t_l_valid.bal h.right.bal t_l_valid.sz h.right.sz\n        (Or.inl (Exists.intro t_l.size (And.intro t_l_size h.bal.1)))]\n    rw [t_ih_l, h.sz.1]\n    have h_pos_t_l_size := pos_size_of_mem h.left.sz h_mem\n    revert h_pos_t_l_size; cases' t_l.size with t_l_size <;> intro h_pos_t_l_size\n    · cases h_pos_t_l_size\n    · simp [Nat.succ_add]\n  · rw [(Valid'.glue h.left h.right h.bal.1).2, h.sz.1]; rfl\n  · have t_ih_r := t_ih_r' h_mem\n    clear t_ih_l' t_ih_r'\n    have t_r_h := Valid'.erase_aux x h.right\n    cases' t_r_h with t_r_valid t_r_size\n    rw [size_balanceL h.left.bal t_r_valid.bal h.left.sz t_r_valid.sz\n        (Or.inr (Exists.intro t_r.size (And.intro t_r_size h.bal.1)))]\n    rw [t_ih_r, h.sz.1]\n    have h_pos_t_r_size := pos_size_of_mem h.right.sz h_mem\n    revert h_pos_t_r_size; cases' t_r.size with t_r_size <;> intro h_pos_t_r_size\n    · cases h_pos_t_r_size\n    · simp [Nat.succ_add, Nat.add_succ]\n[GOAL]\ncase nil\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ nil a₂\nh_mem : x ∈ nil\n⊢ size (erase x nil) = size nil - 1\n[PROOFSTEP]\n\n| nil => contradiction\n[GOAL]\ncase nil\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ nil a₂\nh_mem : x ∈ nil\n⊢ size (erase x nil) = size nil - 1\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\nt_ih_l : ∀ {a₁ : WithBot α} {a₂ : WithTop α}, Valid' a₁ t_l a₂ → x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r : ∀ {a₁ : WithBot α} {a₂ : WithTop α}, Valid' a₁ t_r a₂ → x ∈ t_r → size (erase x t_r) = size t_r - 1\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : x ∈ node size✝ t_l t_x t_r\n⊢ size (erase x (node size✝ t_l t_x t_r)) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\n\n| node _ t_l t_x t_r t_ih_l t_ih_r =>\n  have t_ih_l' := t_ih_l h.left\n  have t_ih_r' := t_ih_r h.right\n  clear t_ih_l t_ih_r\n  dsimp only [Membership.mem, mem] at h_mem \n  unfold erase\n  revert h_mem; cases cmpLE x t_x <;> intro h_mem <;> dsimp only at h_mem ⊢\n  · have t_ih_l := t_ih_l' h_mem\n    clear t_ih_l' t_ih_r'\n    have t_l_h := Valid'.erase_aux x h.left\n    cases' t_l_h with t_l_valid t_l_size\n    rw [size_balanceR t_l_valid.bal h.right.bal t_l_valid.sz h.right.sz\n        (Or.inl (Exists.intro t_l.size (And.intro t_l_size h.bal.1)))]\n    rw [t_ih_l, h.sz.1]\n    have h_pos_t_l_size := pos_size_of_mem h.left.sz h_mem\n    revert h_pos_t_l_size; cases' t_l.size with t_l_size <;> intro h_pos_t_l_size\n    · cases h_pos_t_l_size\n    · simp [Nat.succ_add]\n  · rw [(Valid'.glue h.left h.right h.bal.1).2, h.sz.1]; rfl\n  · have t_ih_r := t_ih_r' h_mem\n    clear t_ih_l' t_ih_r'\n    have t_r_h := Valid'.erase_aux x h.right\n    cases' t_r_h with t_r_valid t_r_size\n    rw [size_balanceL h.left.bal t_r_valid.bal h.left.sz t_r_valid.sz\n        (Or.inr (Exists.intro t_r.size (And.intro t_r_size h.bal.1)))]\n    rw [t_ih_r, h.sz.1]\n    have h_pos_t_r_size := pos_size_of_mem h.right.sz h_mem\n    revert h_pos_t_r_size; cases' t_r.size with t_r_size <;> intro h_pos_t_r_size\n    · cases h_pos_t_r_size\n    · simp [Nat.succ_add, Nat.add_succ]\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\nt_ih_l : ∀ {a₁ : WithBot α} {a₂ : WithTop α}, Valid' a₁ t_l a₂ → x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r : ∀ {a₁ : WithBot α} {a₂ : WithTop α}, Valid' a₁ t_r a₂ → x ∈ t_r → size (erase x t_r) = size t_r - 1\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : x ∈ node size✝ t_l t_x t_r\n⊢ size (erase x (node size✝ t_l t_x t_r)) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nhave t_ih_l' := t_ih_l h.left\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\nt_ih_l : ∀ {a₁ : WithBot α} {a₂ : WithTop α}, Valid' a₁ t_l a₂ → x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r : ∀ {a₁ : WithBot α} {a₂ : WithTop α}, Valid' a₁ t_r a₂ → x ∈ t_r → size (erase x t_r) = size t_r - 1\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : x ∈ node size✝ t_l t_x t_r\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\n⊢ size (erase x (node size✝ t_l t_x t_r)) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nhave t_ih_r' := t_ih_r h.right\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\nt_ih_l : ∀ {a₁ : WithBot α} {a₂ : WithTop α}, Valid' a₁ t_l a₂ → x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r : ∀ {a₁ : WithBot α} {a₂ : WithTop α}, Valid' a₁ t_r a₂ → x ∈ t_r → size (erase x t_r) = size t_r - 1\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : x ∈ node size✝ t_l t_x t_r\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\n⊢ size (erase x (node size✝ t_l t_x t_r)) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nclear t_ih_l t_ih_r\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : x ∈ node size✝ t_l t_x t_r\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\n⊢ size (erase x (node size✝ t_l t_x t_r)) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\ndsimp only [Membership.mem, mem] at h_mem \n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem :\n  (match cmpLE x t_x with\n    | Ordering.lt => mem x t_l\n    | Ordering.eq => true\n    | Ordering.gt => mem x t_r) =\n    true\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\n⊢ size (erase x (node size✝ t_l t_x t_r)) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nunfold erase\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem :\n  (match cmpLE x t_x with\n    | Ordering.lt => mem x t_l\n    | Ordering.eq => true\n    | Ordering.gt => mem x t_r) =\n    true\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\n⊢ size\n      (match cmpLE x t_x with\n      | Ordering.lt => balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => glue t_l t_r\n      | Ordering.gt => balanceL t_l t_x (erase x t_r)) =\n    size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nrevert h_mem\n[GOAL]\ncase node\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\n⊢ (match cmpLE x t_x with\n      | Ordering.lt => mem x t_l\n      | Ordering.eq => true\n      | Ordering.gt => mem x t_r) =\n      true →\n    size\n        (match cmpLE x t_x with\n        | Ordering.lt => balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => glue t_l t_r\n        | Ordering.gt => balanceL t_l t_x (erase x t_r)) =\n      size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\ncases cmpLE x t_x\n[GOAL]\ncase node.lt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\n⊢ (match Ordering.lt with\n      | Ordering.lt => mem x t_l\n      | Ordering.eq => true\n      | Ordering.gt => mem x t_r) =\n      true →\n    size\n        (match Ordering.lt with\n        | Ordering.lt => balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => glue t_l t_r\n        | Ordering.gt => balanceL t_l t_x (erase x t_r)) =\n      size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nintro h_mem\n[GOAL]\ncase node.eq\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\n⊢ (match Ordering.eq with\n      | Ordering.lt => mem x t_l\n      | Ordering.eq => true\n      | Ordering.gt => mem x t_r) =\n      true →\n    size\n        (match Ordering.eq with\n        | Ordering.lt => balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => glue t_l t_r\n        | Ordering.gt => balanceL t_l t_x (erase x t_r)) =\n      size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nintro h_mem\n[GOAL]\ncase node.gt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\n⊢ (match Ordering.gt with\n      | Ordering.lt => mem x t_l\n      | Ordering.eq => true\n      | Ordering.gt => mem x t_r) =\n      true →\n    size\n        (match Ordering.gt with\n        | Ordering.lt => balanceR (erase x t_l) t_x t_r\n        | Ordering.eq => glue t_l t_r\n        | Ordering.gt => balanceL t_l t_x (erase x t_r)) =\n      size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nintro h_mem\n[GOAL]\ncase node.lt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\nh_mem :\n  (match Ordering.lt with\n    | Ordering.lt => mem x t_l\n    | Ordering.eq => true\n    | Ordering.gt => mem x t_r) =\n    true\n⊢ size\n      (match Ordering.lt with\n      | Ordering.lt => balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => glue t_l t_r\n      | Ordering.gt => balanceL t_l t_x (erase x t_r)) =\n    size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\ndsimp only at h_mem ⊢\n[GOAL]\ncase node.eq\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\nh_mem :\n  (match Ordering.eq with\n    | Ordering.lt => mem x t_l\n    | Ordering.eq => true\n    | Ordering.gt => mem x t_r) =\n    true\n⊢ size\n      (match Ordering.eq with\n      | Ordering.lt => balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => glue t_l t_r\n      | Ordering.gt => balanceL t_l t_x (erase x t_r)) =\n    size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\ndsimp only at h_mem ⊢\n[GOAL]\ncase node.gt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\nh_mem :\n  (match Ordering.gt with\n    | Ordering.lt => mem x t_l\n    | Ordering.eq => true\n    | Ordering.gt => mem x t_r) =\n    true\n⊢ size\n      (match Ordering.gt with\n      | Ordering.lt => balanceR (erase x t_l) t_x t_r\n      | Ordering.eq => glue t_l t_r\n      | Ordering.gt => balanceL t_l t_x (erase x t_r)) =\n    size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\ndsimp only at h_mem ⊢\n[GOAL]\ncase node.lt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\nh_mem : mem x t_l = true\n⊢ size (balanceR (erase x t_l) t_x t_r) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nhave t_ih_l := t_ih_l' h_mem\n[GOAL]\ncase node.lt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\nh_mem : mem x t_l = true\nt_ih_l : size (erase x t_l) = size t_l - 1\n⊢ size (balanceR (erase x t_l) t_x t_r) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nclear t_ih_l' t_ih_r'\n[GOAL]\ncase node.lt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_l = true\nt_ih_l : size (erase x t_l) = size t_l - 1\n⊢ size (balanceR (erase x t_l) t_x t_r) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nhave t_l_h := Valid'.erase_aux x h.left\n[GOAL]\ncase node.lt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_l = true\nt_ih_l : size (erase x t_l) = size t_l - 1\nt_l_h : Valid' a₁ (erase x t_l) ↑t_x ∧ Raised (size (erase x t_l)) (size t_l)\n⊢ size (balanceR (erase x t_l) t_x t_r) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\ncases' t_l_h with t_l_valid t_l_size\n[GOAL]\ncase node.lt.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_l = true\nt_ih_l : size (erase x t_l) = size t_l - 1\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\n⊢ size (balanceR (erase x t_l) t_x t_r) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nrw [size_balanceR t_l_valid.bal h.right.bal t_l_valid.sz h.right.sz\n    (Or.inl (Exists.intro t_l.size (And.intro t_l_size h.bal.1)))]\n[GOAL]\ncase node.lt.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_l = true\nt_ih_l : size (erase x t_l) = size t_l - 1\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\n⊢ size (erase x t_l) + size t_r + 1 = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nrw [t_ih_l, h.sz.1]\n[GOAL]\ncase node.lt.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_l = true\nt_ih_l : size (erase x t_l) = size t_l - 1\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\n⊢ size t_l - 1 + size t_r + 1 = size (node (size t_l + size t_r + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\nhave h_pos_t_l_size := pos_size_of_mem h.left.sz h_mem\n[GOAL]\ncase node.lt.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_l = true\nt_ih_l : size (erase x t_l) = size t_l - 1\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nh_pos_t_l_size : 0 < size t_l\n⊢ size t_l - 1 + size t_r + 1 = size (node (size t_l + size t_r + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\nrevert h_pos_t_l_size\n[GOAL]\ncase node.lt.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_l = true\nt_ih_l : size (erase x t_l) = size t_l - 1\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\n⊢ 0 < size t_l → size t_l - 1 + size t_r + 1 = size (node (size t_l + size t_r + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\ncases' t_l.size with t_l_size\n[GOAL]\ncase node.lt.intro.zero\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_l = true\nt_ih_l : size (erase x t_l) = size t_l - 1\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\n⊢ 0 < Nat.zero → Nat.zero - 1 + size t_r + 1 = size (node (Nat.zero + size t_r + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\nintro h_pos_t_l_size\n[GOAL]\ncase node.lt.intro.succ\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_l = true\nt_ih_l : size (erase x t_l) = size t_l - 1\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size✝ : Raised (size (erase x t_l)) (size t_l)\nt_l_size : ℕ\n⊢ 0 < Nat.succ t_l_size →\n    Nat.succ t_l_size - 1 + size t_r + 1 = size (node (Nat.succ t_l_size + size t_r + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\nintro h_pos_t_l_size\n[GOAL]\ncase node.lt.intro.zero\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_l = true\nt_ih_l : size (erase x t_l) = size t_l - 1\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size : Raised (size (erase x t_l)) (size t_l)\nh_pos_t_l_size : 0 < Nat.zero\n⊢ Nat.zero - 1 + size t_r + 1 = size (node (Nat.zero + size t_r + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\ncases h_pos_t_l_size\n[GOAL]\ncase node.lt.intro.succ\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_l = true\nt_ih_l : size (erase x t_l) = size t_l - 1\nt_l_valid : Valid' a₁ (erase x t_l) ↑t_x\nt_l_size✝ : Raised (size (erase x t_l)) (size t_l)\nt_l_size : ℕ\nh_pos_t_l_size : 0 < Nat.succ t_l_size\n⊢ Nat.succ t_l_size - 1 + size t_r + 1 = size (node (Nat.succ t_l_size + size t_r + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\nsimp [Nat.succ_add]\n[GOAL]\ncase node.eq\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\nh_mem : true = true\n⊢ size (glue t_l t_r) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nrw [(Valid'.glue h.left h.right h.bal.1).2, h.sz.1]\n[GOAL]\ncase node.eq\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\nh_mem : true = true\n⊢ size t_l + size t_r = size (node (size t_l + size t_r + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase node.gt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\nh_mem : mem x t_r = true\n⊢ size (balanceL t_l t_x (erase x t_r)) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nhave t_ih_r := t_ih_r' h_mem\n[GOAL]\ncase node.gt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nt_ih_l' : x ∈ t_l → size (erase x t_l) = size t_l - 1\nt_ih_r' : x ∈ t_r → size (erase x t_r) = size t_r - 1\nh_mem : mem x t_r = true\nt_ih_r : size (erase x t_r) = size t_r - 1\n⊢ size (balanceL t_l t_x (erase x t_r)) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nclear t_ih_l' t_ih_r'\n[GOAL]\ncase node.gt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_r = true\nt_ih_r : size (erase x t_r) = size t_r - 1\n⊢ size (balanceL t_l t_x (erase x t_r)) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nhave t_r_h := Valid'.erase_aux x h.right\n[GOAL]\ncase node.gt\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_r = true\nt_ih_r : size (erase x t_r) = size t_r - 1\nt_r_h : Valid' (↑t_x) (erase x t_r) a₂ ∧ Raised (size (erase x t_r)) (size t_r)\n⊢ size (balanceL t_l t_x (erase x t_r)) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\ncases' t_r_h with t_r_valid t_r_size\n[GOAL]\ncase node.gt.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_r = true\nt_ih_r : size (erase x t_r) = size t_r - 1\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ size (balanceL t_l t_x (erase x t_r)) = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nrw [size_balanceL h.left.bal t_r_valid.bal h.left.sz t_r_valid.sz\n    (Or.inr (Exists.intro t_r.size (And.intro t_r_size h.bal.1)))]\n[GOAL]\ncase node.gt.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_r = true\nt_ih_r : size (erase x t_r) = size t_r - 1\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ size t_l + size (erase x t_r) + 1 = size (node size✝ t_l t_x t_r) - 1\n[PROOFSTEP]\nrw [t_ih_r, h.sz.1]\n[GOAL]\ncase node.gt.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_r = true\nt_ih_r : size (erase x t_r) = size t_r - 1\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ size t_l + (size t_r - 1) + 1 = size (node (size t_l + size t_r + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\nhave h_pos_t_r_size := pos_size_of_mem h.right.sz h_mem\n[GOAL]\ncase node.gt.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_r = true\nt_ih_r : size (erase x t_r) = size t_r - 1\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_pos_t_r_size : 0 < size t_r\n⊢ size t_l + (size t_r - 1) + 1 = size (node (size t_l + size t_r + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\nrevert h_pos_t_r_size\n[GOAL]\ncase node.gt.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_r = true\nt_ih_r : size (erase x t_r) = size t_r - 1\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ 0 < size t_r → size t_l + (size t_r - 1) + 1 = size (node (size t_l + size t_r + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\ncases' t_r.size with t_r_size\n[GOAL]\ncase node.gt.intro.zero\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_r = true\nt_ih_r : size (erase x t_r) = size t_r - 1\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\n⊢ 0 < Nat.zero → size t_l + (Nat.zero - 1) + 1 = size (node (size t_l + Nat.zero + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\nintro h_pos_t_r_size\n[GOAL]\ncase node.gt.intro.succ\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_r = true\nt_ih_r : size (erase x t_r) = size t_r - 1\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size✝ : Raised (size (erase x t_r)) (size t_r)\nt_r_size : ℕ\n⊢ 0 < Nat.succ t_r_size →\n    size t_l + (Nat.succ t_r_size - 1) + 1 = size (node (size t_l + Nat.succ t_r_size + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\nintro h_pos_t_r_size\n[GOAL]\ncase node.gt.intro.zero\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_r = true\nt_ih_r : size (erase x t_r) = size t_r - 1\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size : Raised (size (erase x t_r)) (size t_r)\nh_pos_t_r_size : 0 < Nat.zero\n⊢ size t_l + (Nat.zero - 1) + 1 = size (node (size t_l + Nat.zero + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\ncases h_pos_t_r_size\n[GOAL]\ncase node.gt.intro.succ\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nsize✝ : ℕ\nt_l : Ordnode α\nt_x : α\nt_r : Ordnode α\na₁ : WithBot α\na₂ : WithTop α\nh : Valid' a₁ (node size✝ t_l t_x t_r) a₂\nh_mem : mem x t_r = true\nt_ih_r : size (erase x t_r) = size t_r - 1\nt_r_valid : Valid' (↑t_x) (erase x t_r) a₂\nt_r_size✝ : Raised (size (erase x t_r)) (size t_r)\nt_r_size : ℕ\nh_pos_t_r_size : 0 < Nat.succ t_r_size\n⊢ size t_l + (Nat.succ t_r_size - 1) + 1 = size (node (size t_l + Nat.succ t_r_size + 1) t_l t_x t_r) - 1\n[PROOFSTEP]\nsimp [Nat.succ_add, Nat.add_succ]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\ns : Ordset α\nh : s = ∅\n⊢ empty ↑s = true\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nα : Type u_1\ninst✝ : Preorder α\n⊢ empty ↑∅ = true\n[PROOFSTEP]\nexact rfl\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\ns : Ordset α\nh : empty ↑s = true\n⊢ s = ∅\n[PROOFSTEP]\ncases s with\n| mk s_val _ => cases s_val <;> [rfl; cases h]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\ns : Ordset α\nh : empty ↑s = true\n⊢ s = ∅\n[PROOFSTEP]\ncases s with\n| mk s_val _ => cases s_val <;> [rfl; cases h]\n[GOAL]\ncase mk\nα : Type u_1\ninst✝ : Preorder α\ns_val : Ordnode α\nproperty✝ : Valid s_val\nh : empty ↑{ val := s_val, property := property✝ } = true\n⊢ { val := s_val, property := property✝ } = ∅\n[PROOFSTEP]\n\n| mk s_val _ => cases s_val <;> [rfl; cases h]\n[GOAL]\ncase mk\nα : Type u_1\ninst✝ : Preorder α\ns_val : Ordnode α\nproperty✝ : Valid s_val\nh : empty ↑{ val := s_val, property := property✝ } = true\n⊢ { val := s_val, property := property✝ } = ∅\n[PROOFSTEP]\ncases s_val <;> [rfl; cases h]\n[GOAL]\ncase mk\nα : Type u_1\ninst✝ : Preorder α\ns_val : Ordnode α\nproperty✝ : Valid s_val\nh : empty ↑{ val := s_val, property := property✝ } = true\n⊢ { val := s_val, property := property✝ } = ∅\n[PROOFSTEP]\ncases s_val\n[GOAL]\ncase mk.nil\nα : Type u_1\ninst✝ : Preorder α\nproperty✝ : Valid Ordnode.nil\nh : empty ↑{ val := Ordnode.nil, property := property✝ } = true\n⊢ { val := Ordnode.nil, property := property✝ } = ∅\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.node\nα : Type u_1\ninst✝ : Preorder α\nsize✝ : ℕ\nl✝ : Ordnode α\nx✝ : α\nr✝ : Ordnode α\nproperty✝ : Valid (node size✝ l✝ x✝ r✝)\nh : empty ↑{ val := node size✝ l✝ x✝ r✝, property := property✝ } = true\n⊢ { val := node size✝ l✝ x✝ r✝, property := property✝ } = ∅\n[PROOFSTEP]\ncases h\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nt : Ordset α\nh_mem : x ∈ t\n⊢ 0 < size t\n[PROOFSTEP]\nsimp [Membership.mem, mem] at h_mem \n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x ≤ x_1\nx : α\nt : Ordset α\nh_mem : Ordnode.mem x ↑t = true\n⊢ 0 < size t\n[PROOFSTEP]\napply Ordnode.pos_size_of_mem t.property.sz h_mem\n", "meta": {"mathlib_filename": "Mathlib.Data.Ordmap.Ordset", "llama_tokens": 270678, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6187804196836383, "lm_q2_score": 0.5698526514141571, "lm_q1q2_score": 0.35261366279988615}}
{"text": "[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nx : PFunctor.M (last P)\ni : Fin2 n\ninst✝ : Inhabited (B (drop P) (PFunctor.M.head x) i)\na : (last P).A := PFunctor.M.head x\nf : PFunctor.B (last P) (PFunctor.M.head x) → PFunctor.M (last P) := PFunctor.M.children x\n⊢ ∀ (a_1 : (last P).A) (f_1 : PFunctor.B (last P) a_1 → PFunctor.M (last P)),\n    (fun x_1 => PFunctor.M.dest x = { fst := a, snd := f }) (PFunctor.M.mk { fst := a_1, snd := f_1 })\n[PROOFSTEP]\nintros\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nx : PFunctor.M (last P)\ni : Fin2 n\ninst✝ : Inhabited (B (drop P) (PFunctor.M.head x) i)\na : (last P).A := PFunctor.M.head x\nf : PFunctor.B (last P) (PFunctor.M.head x) → PFunctor.M (last P) := PFunctor.M.children x\na✝ : (last P).A\nf✝ : PFunctor.B (last P) a✝ → PFunctor.M (last P)\n⊢ PFunctor.M.dest x = { fst := a, snd := f }\n[PROOFSTEP]\nsimp [PFunctor.M.dest_mk, PFunctor.M.children_mk]\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nx : PFunctor.M (last P)\ni : Fin2 n\ninst✝ : Inhabited (B (drop P) (PFunctor.M.head x) i)\na : (last P).A := PFunctor.M.head x\nf : PFunctor.B (last P) (PFunctor.M.head x) → PFunctor.M (last P) := PFunctor.M.children x\na✝ : (last P).A\nf✝ : PFunctor.B (last P) a✝ → PFunctor.M (last P)\n⊢ PFunctor.M.dest x = { fst := PFunctor.M.head x, snd := PFunctor.M.children x }\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\n⊢ MvFunctor (M P)\n[PROOFSTEP]\ndelta M\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\n⊢ MvFunctor fun α => Obj (mp P) α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng₀ : β → P.A\ng₁ : (b : β) → B (drop P) (g₀ b) ⟹ α\ng₂ : (b : β) → PFunctor.B (last P) (g₀ b) → β\nx✝ : PFunctor.M (last P)\nb : β\nx : PFunctor.M (last P)\ni : Fin2 n\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\nc : B (drop P) a i\nh : x = corecShape P g₀ g₂ b\n⊢ a = g₀ b\n[PROOFSTEP]\nrw [h, M.corecShape, PFunctor.M.dest_corec] at h' \n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng₀ : β → P.A\ng₁ : (b : β) → B (drop P) (g₀ b) ⟹ α\ng₂ : (b : β) → PFunctor.B (last P) (g₀ b) → β\nx✝ : PFunctor.M (last P)\nb : β\nx : PFunctor.M (last P)\ni : Fin2 n\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : (PFunctor.M.corec fun b => { fst := g₀ b, snd := g₂ b }) <$> { fst := g₀ b, snd := g₂ b } = { fst := a, snd := f }\nc : B (drop P) a i\nh : x = corecShape P g₀ g₂ b\n⊢ a = g₀ b\n[PROOFSTEP]\ncases h'\n[GOAL]\ncase refl\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng₀ : β → P.A\ng₁ : (b : β) → B (drop P) (g₀ b) ⟹ α\ng₂ : (b : β) → PFunctor.B (last P) (g₀ b) → β\nx✝ : PFunctor.M (last P)\nb : β\nx : PFunctor.M (last P)\ni : Fin2 n\nh : x = corecShape P g₀ g₂ b\nc : B (drop P) (g₀ b) i\n⊢ g₀ b = g₀ b\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng₀ : β → P.A\ng₁ : (b : β) → B (drop P) (g₀ b) ⟹ α\ng₂ : (b : β) → PFunctor.B (last P) (g₀ b) → β\nx✝ : PFunctor.M (last P)\nb : β\nx : PFunctor.M (last P)\ni : Fin2 n\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\nj : PFunctor.B (last P) a\nc : Path P (f j) i\nh : x = corecShape P g₀ g₂ b\n⊢ a = g₀ b\n[PROOFSTEP]\nrw [h, M.corecShape, PFunctor.M.dest_corec] at h' \n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng₀ : β → P.A\ng₁ : (b : β) → B (drop P) (g₀ b) ⟹ α\ng₂ : (b : β) → PFunctor.B (last P) (g₀ b) → β\nx✝ : PFunctor.M (last P)\nb : β\nx : PFunctor.M (last P)\ni : Fin2 n\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : (PFunctor.M.corec fun b => { fst := g₀ b, snd := g₂ b }) <$> { fst := g₀ b, snd := g₂ b } = { fst := a, snd := f }\nj : PFunctor.B (last P) a\nc : Path P (f j) i\nh : x = corecShape P g₀ g₂ b\n⊢ a = g₀ b\n[PROOFSTEP]\ncases h'\n[GOAL]\ncase refl\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng₀ : β → P.A\ng₁ : (b : β) → B (drop P) (g₀ b) ⟹ α\ng₂ : (b : β) → PFunctor.B (last P) (g₀ b) → β\nx✝ : PFunctor.M (last P)\nb : β\nx : PFunctor.M (last P)\ni : Fin2 n\nh : x = corecShape P g₀ g₂ b\nj : PFunctor.B (last P) (g₀ b)\nc : Path P (((PFunctor.M.corec fun b => { fst := g₀ b, snd := g₂ b }) ∘ g₂ b) j) i\n⊢ g₀ b = g₀ b\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng₀ : β → P.A\ng₁ : (b : β) → B (drop P) (g₀ b) ⟹ α\ng₂ : (b : β) → PFunctor.B (last P) (g₀ b) → β\nx✝ : PFunctor.M (last P)\nb : β\nx : PFunctor.M (last P)\ni : Fin2 n\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\nj : PFunctor.B (last P) a\nc : Path P (f j) i\nh : x = corecShape P g₀ g₂ b\nh₀ : a = g₀ b\n⊢ f j = corecShape P g₀ g₂ (g₂ b (castLastB P h₀ j))\n[PROOFSTEP]\nrw [h, M.corecShape, PFunctor.M.dest_corec] at h' \n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng₀ : β → P.A\ng₁ : (b : β) → B (drop P) (g₀ b) ⟹ α\ng₂ : (b : β) → PFunctor.B (last P) (g₀ b) → β\nx✝ : PFunctor.M (last P)\nb : β\nx : PFunctor.M (last P)\ni : Fin2 n\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : (PFunctor.M.corec fun b => { fst := g₀ b, snd := g₂ b }) <$> { fst := g₀ b, snd := g₂ b } = { fst := a, snd := f }\nj : PFunctor.B (last P) a\nc : Path P (f j) i\nh : x = corecShape P g₀ g₂ b\nh₀ : a = g₀ b\n⊢ f j = corecShape P g₀ g₂ (g₂ b (castLastB P h₀ j))\n[PROOFSTEP]\ncases h'\n[GOAL]\ncase refl\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng₀ : β → P.A\ng₁ : (b : β) → B (drop P) (g₀ b) ⟹ α\ng₂ : (b : β) → PFunctor.B (last P) (g₀ b) → β\nx✝ : PFunctor.M (last P)\nb : β\nx : PFunctor.M (last P)\ni : Fin2 n\nh : x = corecShape P g₀ g₂ b\nj : PFunctor.B (last P) (g₀ b)\nh₀ : g₀ b = g₀ b\nc : Path P (((PFunctor.M.corec fun b => { fst := g₀ b, snd := g₂ b }) ∘ g₂ b) j) i\n⊢ ((PFunctor.M.corec fun b => { fst := g₀ b, snd := g₂ b }) ∘ g₂ b) j = corecShape P g₀ g₂ (g₂ b (castLastB P h₀ j))\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nx : PFunctor.M (last P)\na₁ : P.A\nf₁ : PFunctor.B (last P) a₁ → PFunctor.M (last P)\nh₁ : PFunctor.M.dest x = { fst := a₁, snd := f₁ }\na₂ : P.A\nf₂ : PFunctor.B (last P) a₂ → PFunctor.M (last P)\nh₂ : PFunctor.M.dest x = { fst := a₂, snd := f₂ }\nf' : Path P x ⟹ α\n⊢ dest' P h₁ f' = dest' P h₂ f'\n[PROOFSTEP]\ncases h₁.symm.trans h₂\n[GOAL]\ncase refl\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nx : PFunctor.M (last P)\na₁ : P.A\nf₁ : PFunctor.B (last P) a₁ → PFunctor.M (last P)\nh₁ : PFunctor.M.dest x = { fst := a₁, snd := f₁ }\nf' : Path P x ⟹ α\nh₂ : PFunctor.M.dest x = { fst := a₁, snd := f₁ }\n⊢ dest' P h₁ f' = dest' P h₂ f'\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng : β → Obj P (α ::: β)\nx : β\n⊢ dest P (corec P g x) = (TypeVec.id ::: corec P g) <$$> g x\n[PROOFSTEP]\ntrans\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng : β → Obj P (α ::: β)\nx : β\n⊢ dest P (corec P g x) = ?m.39771\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng : β → Obj P (α ::: β)\nx : β\n⊢ ?m.39771 = (TypeVec.id ::: corec P g) <$$> g x\nn : ℕ P : MvPFunctor (n + 1) α : TypeVec n β : Type u g : β → Obj P (α ::: β) x : β ⊢ Obj P (α ::: M P α)\n[PROOFSTEP]\napply M.dest_corec'\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng : β → Obj P (α ::: β)\nx : β\n⊢ { fst := (g x).fst,\n      snd :=\n        splitFun (dropFun (g x).snd)\n          ((corec' P (fun b => (g b).fst) (fun b => dropFun (g b).snd) fun b => lastFun (g b).snd) ∘\n            lastFun (g x).snd) } =\n    (TypeVec.id ::: corec P g) <$$> g x\n[PROOFSTEP]\ncases' g x with a f\n[GOAL]\ncase mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng : β → Obj P (α ::: β)\nx : β\na : P.A\nf : B P a ⟹ α ::: β\n⊢ { fst := { fst := a, snd := f }.fst,\n      snd :=\n        splitFun (dropFun { fst := a, snd := f }.snd)\n          ((corec' P (fun b => (g b).fst) (fun b => dropFun (g b).snd) fun b => lastFun (g b).snd) ∘\n            lastFun { fst := a, snd := f }.snd) } =\n    (TypeVec.id ::: corec P g) <$$> { fst := a, snd := f }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng : β → Obj P (α ::: β)\nx : β\na : P.A\nf : B P a ⟹ α ::: β\n⊢ { fst := a,\n      snd :=\n        splitFun (dropFun f)\n          ((corec' P (fun b => (g b).fst) (fun b => dropFun (g b).snd) fun b => lastFun (g b).snd) ∘ lastFun f) } =\n    (TypeVec.id ::: corec P g) <$$> { fst := a, snd := f }\n[PROOFSTEP]\nrw [MvPFunctor.map_eq]\n[GOAL]\ncase mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng : β → Obj P (α ::: β)\nx : β\na : P.A\nf : B P a ⟹ α ::: β\n⊢ { fst := a,\n      snd :=\n        splitFun (dropFun f)\n          ((corec' P (fun b => (g b).fst) (fun b => dropFun (g b).snd) fun b => lastFun (g b).snd) ∘ lastFun f) } =\n    { fst := a, snd := (TypeVec.id ::: corec P g) ⊚ f }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.e_snd\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng : β → Obj P (α ::: β)\nx : β\na : P.A\nf : B P a ⟹ α ::: β\n⊢ splitFun (dropFun f)\n      ((corec' P (fun b => (g b).fst) (fun b => dropFun (g b).snd) fun b => lastFun (g b).snd) ∘ lastFun f) =\n    (TypeVec.id ::: corec P g) ⊚ f\n[PROOFSTEP]\nconv =>\n  rhs\n  rw [← split_dropFun_lastFun f, appendFun_comp_splitFun]\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng : β → Obj P (α ::: β)\nx : β\na : P.A\nf : B P a ⟹ α ::: β\n| splitFun (dropFun f)\n      ((corec' P (fun b => (g b).fst) (fun b => dropFun (g b).snd) fun b => lastFun (g b).snd) ∘ lastFun f) =\n    (TypeVec.id ::: corec P g) ⊚ f\n[PROOFSTEP]\n  rhs\n  rw [← split_dropFun_lastFun f, appendFun_comp_splitFun]\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng : β → Obj P (α ::: β)\nx : β\na : P.A\nf : B P a ⟹ α ::: β\n| splitFun (dropFun f)\n      ((corec' P (fun b => (g b).fst) (fun b => dropFun (g b).snd) fun b => lastFun (g b).snd) ∘ lastFun f) =\n    (TypeVec.id ::: corec P g) ⊚ f\n[PROOFSTEP]\n  rhs\n  rw [← split_dropFun_lastFun f, appendFun_comp_splitFun]\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng : β → Obj P (α ::: β)\nx : β\na : P.A\nf : B P a ⟹ α ::: β\n| splitFun (dropFun f)\n      ((corec' P (fun b => (g b).fst) (fun b => dropFun (g b).snd) fun b => lastFun (g b).snd) ∘ lastFun f) =\n    (TypeVec.id ::: corec P g) ⊚ f\n[PROOFSTEP]\nrhs\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nβ : Type u\ng : β → Obj P (α ::: β)\nx : β\na : P.A\nf : B P a ⟹ α ::: β\n| (TypeVec.id ::: corec P g) ⊚ f\n[PROOFSTEP]\nrw [← split_dropFun_lastFun f, appendFun_comp_splitFun]\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na' : P.A\nf' : TypeVec.drop (B P a') ⟹ α\nf₁' : TypeVec.last (B P a') → M P α\ne₁ : dest P { fst := a₁, snd := f₁ } = { fst := a', snd := splitFun f' f₁' }\n⊢ ∃ g₁' e₁', f' = pathDestLeft P e₁' f₁ ∧ f₁' = fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x }\n[PROOFSTEP]\ngeneralize ef : @splitFun n _ (append1 α (M P α)) f' f₁' = ff at e₁ \n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na' : P.A\nf' : TypeVec.drop (B P a') ⟹ α\nf₁' : TypeVec.last (B P a') → M P α\nff : B P a' ⟹ α ::: M P α\nef : splitFun f' f₁' = ff\ne₁ : dest P { fst := a₁, snd := f₁ } = { fst := a', snd := ff }\n⊢ ∃ g₁' e₁', f' = pathDestLeft P e₁' f₁ ∧ f₁' = fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x }\n[PROOFSTEP]\nlet he₁' := PFunctor.M.dest a₁\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na' : P.A\nf' : TypeVec.drop (B P a') ⟹ α\nf₁' : TypeVec.last (B P a') → M P α\nff : B P a' ⟹ α ::: M P α\nef : splitFun f' f₁' = ff\ne₁ : dest P { fst := a₁, snd := f₁ } = { fst := a', snd := ff }\nhe₁' : PFunctor.Obj (last P) (PFunctor.M (last P)) := PFunctor.M.dest a₁\n⊢ ∃ g₁' e₁', f' = pathDestLeft P e₁' f₁ ∧ f₁' = fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x }\n[PROOFSTEP]\nrcases e₁' : he₁' with ⟨a₁', g₁'⟩\n[GOAL]\ncase mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na' : P.A\nf' : TypeVec.drop (B P a') ⟹ α\nf₁' : TypeVec.last (B P a') → M P α\nff : B P a' ⟹ α ::: M P α\nef : splitFun f' f₁' = ff\ne₁ : dest P { fst := a₁, snd := f₁ } = { fst := a', snd := ff }\nhe₁' : PFunctor.Obj (last P) (PFunctor.M (last P)) := PFunctor.M.dest a₁\na₁' : (last P).A\ng₁' : PFunctor.B (last P) a₁' → PFunctor.M (last P)\ne₁' : he₁' = { fst := a₁', snd := g₁' }\n⊢ ∃ g₁' e₁', f' = pathDestLeft P e₁' f₁ ∧ f₁' = fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x }\n[PROOFSTEP]\nrw [M.dest_eq_dest' _ e₁'] at e₁ \n[GOAL]\ncase mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na' : P.A\nf' : TypeVec.drop (B P a') ⟹ α\nf₁' : TypeVec.last (B P a') → M P α\nff : B P a' ⟹ α ::: M P α\nef : splitFun f' f₁' = ff\nhe₁' : PFunctor.Obj (last P) (PFunctor.M (last P)) := PFunctor.M.dest a₁\na₁' : (last P).A\ng₁' : PFunctor.B (last P) a₁' → PFunctor.M (last P)\ne₁' : he₁' = { fst := a₁', snd := g₁' }\ne₁ : dest' P e₁' f₁ = { fst := a', snd := ff }\n⊢ ∃ g₁' e₁', f' = pathDestLeft P e₁' f₁ ∧ f₁' = fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x }\n[PROOFSTEP]\ncases e₁\n[GOAL]\ncase mk.refl\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na' : P.A\nf' : TypeVec.drop (B P a') ⟹ α\nf₁' : TypeVec.last (B P a') → M P α\nhe₁' : PFunctor.Obj (last P) (PFunctor.M (last P)) := PFunctor.M.dest a₁\ng₁' : PFunctor.B (last P) a' → PFunctor.M (last P)\ne₁' : he₁' = { fst := a', snd := g₁' }\nef : splitFun f' f₁' = splitFun (pathDestLeft P e₁' f₁) fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x }\n⊢ ∃ g₁' e₁', f' = pathDestLeft P e₁' f₁ ∧ f₁' = fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x }\n[PROOFSTEP]\nexact ⟨_, e₁', splitFun_inj ef⟩\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\nx y : M P α\nr : R x y\n⊢ x = y\n[PROOFSTEP]\ncases' x with a₁ f₁\n[GOAL]\ncase mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\ny : M P α\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\nr : R { fst := a₁, snd := f₁ } y\n⊢ { fst := a₁, snd := f₁ } = y\n[PROOFSTEP]\ncases' y with a₂ f₂\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na₂ : (mp P).A\nf₂ : B (mp P) a₂ ⟹ α\nr : R { fst := a₁, snd := f₁ } { fst := a₂, snd := f₂ }\n⊢ { fst := a₁, snd := f₁ } = { fst := a₂, snd := f₂ }\n[PROOFSTEP]\ndsimp [mp] at *\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na₂ : (mp P).A\nf₂ : B (mp P) a₂ ⟹ α\nr : R { fst := a₁, snd := f₁ } { fst := a₂, snd := f₂ }\n⊢ { fst := a₁, snd := f₁ } = { fst := a₂, snd := f₂ }\n[PROOFSTEP]\nhave : a₁ = a₂ :=\n  by\n  refine' PFunctor.M.bisim (fun a₁ a₂ => ∃ x y, R x y ∧ x.1 = a₁ ∧ y.1 = a₂) _ _ _ ⟨⟨a₁, f₁⟩, ⟨a₂, f₂⟩, r, rfl, rfl⟩\n  rintro _ _ ⟨⟨a₁, f₁⟩, ⟨a₂, f₂⟩, r, rfl, rfl⟩\n  rcases h _ _ r with ⟨a', f', f₁', f₂', e₁, e₂, h'⟩\n  rcases M.bisim_lemma P e₁ with ⟨g₁', e₁', rfl, rfl⟩\n  rcases M.bisim_lemma P e₂ with ⟨g₂', e₂', _, rfl⟩\n  rw [e₁', e₂']\n  exact ⟨_, _, _, rfl, rfl, fun b => ⟨_, _, h' b, rfl, rfl⟩⟩\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na₂ : (mp P).A\nf₂ : B (mp P) a₂ ⟹ α\nr : R { fst := a₁, snd := f₁ } { fst := a₂, snd := f₂ }\n⊢ a₁ = a₂\n[PROOFSTEP]\nrefine' PFunctor.M.bisim (fun a₁ a₂ => ∃ x y, R x y ∧ x.1 = a₁ ∧ y.1 = a₂) _ _ _ ⟨⟨a₁, f₁⟩, ⟨a₂, f₂⟩, r, rfl, rfl⟩\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na₂ : (mp P).A\nf₂ : B (mp P) a₂ ⟹ α\nr : R { fst := a₁, snd := f₁ } { fst := a₂, snd := f₂ }\n⊢ ∀ (x y : PFunctor.M (last P)),\n    (fun a₁ a₂ => ∃ x y, R x y ∧ x.fst = a₁ ∧ y.fst = a₂) x y →\n      ∃ a f f',\n        PFunctor.M.dest x = { fst := a, snd := f } ∧\n          PFunctor.M.dest y = { fst := a, snd := f' } ∧\n            ∀ (i : PFunctor.B (last P) a), (fun a₁ a₂ => ∃ x y, R x y ∧ x.fst = a₁ ∧ y.fst = a₂) (f i) (f' i)\n[PROOFSTEP]\nrintro _ _ ⟨⟨a₁, f₁⟩, ⟨a₂, f₂⟩, r, rfl, rfl⟩\n[GOAL]\ncase intro.mk.intro.mk.intro.intro\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁✝ : (mp P).A\nf₁✝ : B (mp P) a₁✝ ⟹ α\na₂✝ : (mp P).A\nf₂✝ : B (mp P) a₂✝ ⟹ α\nr✝ : R { fst := a₁✝, snd := f₁✝ } { fst := a₂✝, snd := f₂✝ }\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na₂ : (mp P).A\nf₂ : B (mp P) a₂ ⟹ α\nr : R { fst := a₁, snd := f₁ } { fst := a₂, snd := f₂ }\n⊢ ∃ a f f',\n    PFunctor.M.dest { fst := a₁, snd := f₁ }.fst = { fst := a, snd := f } ∧\n      PFunctor.M.dest { fst := a₂, snd := f₂ }.fst = { fst := a, snd := f' } ∧\n        ∀ (i : PFunctor.B (last P) a), (fun a₁ a₂ => ∃ x y, R x y ∧ x.fst = a₁ ∧ y.fst = a₂) (f i) (f' i)\n[PROOFSTEP]\nrcases h _ _ r with ⟨a', f', f₁', f₂', e₁, e₂, h'⟩\n[GOAL]\ncase intro.mk.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁✝ : (mp P).A\nf₁✝ : B (mp P) a₁✝ ⟹ α\na₂✝ : (mp P).A\nf₂✝ : B (mp P) a₂✝ ⟹ α\nr✝ : R { fst := a₁✝, snd := f₁✝ } { fst := a₂✝, snd := f₂✝ }\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na₂ : (mp P).A\nf₂ : B (mp P) a₂ ⟹ α\nr : R { fst := a₁, snd := f₁ } { fst := a₂, snd := f₂ }\na' : P.A\nf' : TypeVec.drop (B P a') ⟹ TypeVec.drop (α ::: M P α)\nf₁' f₂' : TypeVec.last (B P a') → TypeVec.last (α ::: M P α)\ne₁ : dest P { fst := a₁, snd := f₁ } = { fst := a', snd := splitFun f' f₁' }\ne₂ : dest P { fst := a₂, snd := f₂ } = { fst := a', snd := splitFun f' f₂' }\nh' : ∀ (i : TypeVec.last (B P a')), R (f₁' i) (f₂' i)\n⊢ ∃ a f f',\n    PFunctor.M.dest { fst := a₁, snd := f₁ }.fst = { fst := a, snd := f } ∧\n      PFunctor.M.dest { fst := a₂, snd := f₂ }.fst = { fst := a, snd := f' } ∧\n        ∀ (i : PFunctor.B (last P) a), (fun a₁ a₂ => ∃ x y, R x y ∧ x.fst = a₁ ∧ y.fst = a₂) (f i) (f' i)\n[PROOFSTEP]\nrcases M.bisim_lemma P e₁ with ⟨g₁', e₁', rfl, rfl⟩\n[GOAL]\ncase intro.mk.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁✝ : (mp P).A\nf₁✝ : B (mp P) a₁✝ ⟹ α\na₂✝ : (mp P).A\nf₂✝ : B (mp P) a₂✝ ⟹ α\nr✝ : R { fst := a₁✝, snd := f₁✝ } { fst := a₂✝, snd := f₂✝ }\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na₂ : (mp P).A\nf₂ : B (mp P) a₂ ⟹ α\nr : R { fst := a₁, snd := f₁ } { fst := a₂, snd := f₂ }\na' : P.A\nf₂' : TypeVec.last (B P a') → TypeVec.last (α ::: M P α)\ng₁' : PFunctor.B (last P) a' → PFunctor.M (last P)\ne₁' : PFunctor.M.dest a₁ = { fst := a', snd := g₁' }\ne₂ : dest P { fst := a₂, snd := f₂ } = { fst := a', snd := splitFun (pathDestLeft P e₁' f₁) f₂' }\nh' : ∀ (i : TypeVec.last (B P a')), R ((fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x }) i) (f₂' i)\ne₁ :\n  dest P { fst := a₁, snd := f₁ } =\n    { fst := a', snd := splitFun (pathDestLeft P e₁' f₁) fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x } }\n⊢ ∃ a f f',\n    PFunctor.M.dest { fst := a₁, snd := f₁ }.fst = { fst := a, snd := f } ∧\n      PFunctor.M.dest { fst := a₂, snd := f₂ }.fst = { fst := a, snd := f' } ∧\n        ∀ (i : PFunctor.B (last P) a), (fun a₁ a₂ => ∃ x y, R x y ∧ x.fst = a₁ ∧ y.fst = a₂) (f i) (f' i)\n[PROOFSTEP]\nrcases M.bisim_lemma P e₂ with ⟨g₂', e₂', _, rfl⟩\n[GOAL]\ncase intro.mk.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁✝ : (mp P).A\nf₁✝ : B (mp P) a₁✝ ⟹ α\na₂✝ : (mp P).A\nf₂✝ : B (mp P) a₂✝ ⟹ α\nr✝ : R { fst := a₁✝, snd := f₁✝ } { fst := a₂✝, snd := f₂✝ }\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na₂ : (mp P).A\nf₂ : B (mp P) a₂ ⟹ α\nr : R { fst := a₁, snd := f₁ } { fst := a₂, snd := f₂ }\na' : P.A\ng₁' : PFunctor.B (last P) a' → PFunctor.M (last P)\ne₁' : PFunctor.M.dest a₁ = { fst := a', snd := g₁' }\ne₁ :\n  dest P { fst := a₁, snd := f₁ } =\n    { fst := a', snd := splitFun (pathDestLeft P e₁' f₁) fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x } }\ng₂' : PFunctor.B (last P) a' → PFunctor.M (last P)\ne₂' : PFunctor.M.dest a₂ = { fst := a', snd := g₂' }\nleft✝ : pathDestLeft P e₁' f₁ = pathDestLeft P e₂' f₂\ne₂ :\n  dest P { fst := a₂, snd := f₂ } =\n    { fst := a', snd := splitFun (pathDestLeft P e₁' f₁) fun x => { fst := g₂' x, snd := pathDestRight P e₂' f₂ x } }\nh' :\n  ∀ (i : TypeVec.last (B P a')),\n    R ((fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x }) i)\n      ((fun x => { fst := g₂' x, snd := pathDestRight P e₂' f₂ x }) i)\n⊢ ∃ a f f',\n    PFunctor.M.dest { fst := a₁, snd := f₁ }.fst = { fst := a, snd := f } ∧\n      PFunctor.M.dest { fst := a₂, snd := f₂ }.fst = { fst := a, snd := f' } ∧\n        ∀ (i : PFunctor.B (last P) a), (fun a₁ a₂ => ∃ x y, R x y ∧ x.fst = a₁ ∧ y.fst = a₂) (f i) (f' i)\n[PROOFSTEP]\nrw [e₁', e₂']\n[GOAL]\ncase intro.mk.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁✝ : (mp P).A\nf₁✝ : B (mp P) a₁✝ ⟹ α\na₂✝ : (mp P).A\nf₂✝ : B (mp P) a₂✝ ⟹ α\nr✝ : R { fst := a₁✝, snd := f₁✝ } { fst := a₂✝, snd := f₂✝ }\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na₂ : (mp P).A\nf₂ : B (mp P) a₂ ⟹ α\nr : R { fst := a₁, snd := f₁ } { fst := a₂, snd := f₂ }\na' : P.A\ng₁' : PFunctor.B (last P) a' → PFunctor.M (last P)\ne₁' : PFunctor.M.dest a₁ = { fst := a', snd := g₁' }\ne₁ :\n  dest P { fst := a₁, snd := f₁ } =\n    { fst := a', snd := splitFun (pathDestLeft P e₁' f₁) fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x } }\ng₂' : PFunctor.B (last P) a' → PFunctor.M (last P)\ne₂' : PFunctor.M.dest a₂ = { fst := a', snd := g₂' }\nleft✝ : pathDestLeft P e₁' f₁ = pathDestLeft P e₂' f₂\ne₂ :\n  dest P { fst := a₂, snd := f₂ } =\n    { fst := a', snd := splitFun (pathDestLeft P e₁' f₁) fun x => { fst := g₂' x, snd := pathDestRight P e₂' f₂ x } }\nh' :\n  ∀ (i : TypeVec.last (B P a')),\n    R ((fun x => { fst := g₁' x, snd := pathDestRight P e₁' f₁ x }) i)\n      ((fun x => { fst := g₂' x, snd := pathDestRight P e₂' f₂ x }) i)\n⊢ ∃ a f f',\n    { fst := a', snd := g₁' } = { fst := a, snd := f } ∧\n      { fst := a', snd := g₂' } = { fst := a, snd := f' } ∧\n        ∀ (i : PFunctor.B (last P) a), (fun a₁ a₂ => ∃ x y, R x y ∧ x.fst = a₁ ∧ y.fst = a₂) (f i) (f' i)\n[PROOFSTEP]\nexact ⟨_, _, _, rfl, rfl, fun b => ⟨_, _, h' b, rfl, rfl⟩⟩\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁ : B (mp P) a₁ ⟹ α\na₂ : (mp P).A\nf₂ : B (mp P) a₂ ⟹ α\nr : R { fst := a₁, snd := f₁ } { fst := a₂, snd := f₂ }\nthis : a₁ = a₂\n⊢ { fst := a₁, snd := f₁ } = { fst := a₂, snd := f₂ }\n[PROOFSTEP]\nsubst this\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁ f₂ : B (mp P) a₁ ⟹ α\nr : R { fst := a₁, snd := f₁ } { fst := a₁, snd := f₂ }\n⊢ { fst := a₁, snd := f₁ } = { fst := a₁, snd := f₂ }\n[PROOFSTEP]\ncongr with (i p)\n[GOAL]\ncase mk.mk.e_snd.a.h\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁ f₂ : B (mp P) a₁ ⟹ α\nr : R { fst := a₁, snd := f₁ } { fst := a₁, snd := f₂ }\ni : Fin2 n\np : B (mp P) a₁ i\n⊢ f₁ i p = f₂ i p\n[PROOFSTEP]\ninduction' p with x a f h' i c x a f h' i c p IH\n[GOAL]\ncase mk.mk.e_snd.a.h.root\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : Fin2 n\nc : B (drop P) a i\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\n⊢ f₁ i (Path.root x a f h' i c) = f₂ i (Path.root x a f h' i c)\n[PROOFSTEP]\ntry\n  rcases h _ _ r with ⟨a', f', f₁', f₂', e₁, e₂, h''⟩\n  rcases M.bisim_lemma P e₁ with ⟨g₁', e₁', rfl, rfl⟩\n  rcases M.bisim_lemma P e₂ with ⟨g₂', e₂', e₃, rfl⟩\n  cases h'.symm.trans e₁'\n  cases h'.symm.trans e₂'\n[GOAL]\ncase mk.mk.e_snd.a.h.root\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : Fin2 n\nc : B (drop P) a i\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\n⊢ f₁ i (Path.root x a f h' i c) = f₂ i (Path.root x a f h' i c)\n[PROOFSTEP]\nrcases h _ _ r with ⟨a', f', f₁', f₂', e₁, e₂, h''⟩\n[GOAL]\ncase mk.mk.e_snd.a.h.root.intro.intro.intro.intro.intro.intro\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : Fin2 n\nc : B (drop P) a i\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\na' : P.A\nf' : TypeVec.drop (B P a') ⟹ TypeVec.drop (α ::: M P α)\nf₁' f₂' : TypeVec.last (B P a') → TypeVec.last (α ::: M P α)\ne₁ : dest P { fst := x, snd := f₁ } = { fst := a', snd := splitFun f' f₁' }\ne₂ : dest P { fst := x, snd := f₂ } = { fst := a', snd := splitFun f' f₂' }\nh'' : ∀ (i : TypeVec.last (B P a')), R (f₁' i) (f₂' i)\n⊢ f₁ i (Path.root x a f h' i c) = f₂ i (Path.root x a f h' i c)\n[PROOFSTEP]\nrcases M.bisim_lemma P e₁ with ⟨g₁', e₁', rfl, rfl⟩\n[GOAL]\ncase mk.mk.e_snd.a.h.root.intro.intro.intro.intro.intro.intro.intro.intro.intro\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : Fin2 n\nc : B (drop P) a i\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\na' : P.A\nf₂' : TypeVec.last (B P a') → TypeVec.last (α ::: M P α)\ng₁' : PFunctor.B (last P) a' → PFunctor.M (last P)\ne₁' : PFunctor.M.dest x = { fst := a', snd := g₁' }\ne₂ : dest P { fst := x, snd := f₂ } = { fst := a', snd := splitFun (pathDestLeft P e₁' f₁) f₂' }\nh'' : ∀ (i : TypeVec.last (B P a')), R ((fun x_1 => { fst := g₁' x_1, snd := pathDestRight P e₁' f₁ x_1 }) i) (f₂' i)\ne₁ :\n  dest P { fst := x, snd := f₁ } =\n    { fst := a',\n      snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := g₁' x_1, snd := pathDestRight P e₁' f₁ x_1 } }\n⊢ f₁ i (Path.root x a f h' i c) = f₂ i (Path.root x a f h' i c)\n[PROOFSTEP]\nrcases M.bisim_lemma P e₂ with ⟨g₂', e₂', e₃, rfl⟩\n[GOAL]\ncase mk.mk.e_snd.a.h.root.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : Fin2 n\nc : B (drop P) a i\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\na' : P.A\ng₁' : PFunctor.B (last P) a' → PFunctor.M (last P)\ne₁' : PFunctor.M.dest x = { fst := a', snd := g₁' }\ne₁ :\n  dest P { fst := x, snd := f₁ } =\n    { fst := a',\n      snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := g₁' x_1, snd := pathDestRight P e₁' f₁ x_1 } }\ng₂' : PFunctor.B (last P) a' → PFunctor.M (last P)\ne₂' : PFunctor.M.dest x = { fst := a', snd := g₂' }\ne₃ : pathDestLeft P e₁' f₁ = pathDestLeft P e₂' f₂\ne₂ :\n  dest P { fst := x, snd := f₂ } =\n    { fst := a',\n      snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := g₂' x_1, snd := pathDestRight P e₂' f₂ x_1 } }\nh'' :\n  ∀ (i : TypeVec.last (B P a')),\n    R ((fun x_1 => { fst := g₁' x_1, snd := pathDestRight P e₁' f₁ x_1 }) i)\n      ((fun x_1 => { fst := g₂' x_1, snd := pathDestRight P e₂' f₂ x_1 }) i)\n⊢ f₁ i (Path.root x a f h' i c) = f₂ i (Path.root x a f h' i c)\n[PROOFSTEP]\ncases h'.symm.trans e₁'\n[GOAL]\ncase mk.mk.e_snd.a.h.root.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refl\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : Fin2 n\nc : B (drop P) a i\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\ng₂' : PFunctor.B (last P) a → PFunctor.M (last P)\ne₂' : PFunctor.M.dest x = { fst := a, snd := g₂' }\ne₁' : PFunctor.M.dest x = { fst := a, snd := f }\ne₁ :\n  dest P { fst := x, snd := f₁ } =\n    { fst := a, snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := f x_1, snd := pathDestRight P e₁' f₁ x_1 } }\ne₃ : pathDestLeft P e₁' f₁ = pathDestLeft P e₂' f₂\ne₂ :\n  dest P { fst := x, snd := f₂ } =\n    { fst := a,\n      snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := g₂' x_1, snd := pathDestRight P e₂' f₂ x_1 } }\nh'' :\n  ∀ (i : TypeVec.last (B P a)),\n    R ((fun x_1 => { fst := f x_1, snd := pathDestRight P e₁' f₁ x_1 }) i)\n      ((fun x_1 => { fst := g₂' x_1, snd := pathDestRight P e₂' f₂ x_1 }) i)\n⊢ f₁ i (Path.root x a f h' i c) = f₂ i (Path.root x a f h' i c)\n[PROOFSTEP]\ncases h'.symm.trans e₂'\n[GOAL]\ncase mk.mk.e_snd.a.h.child\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : PFunctor.B (last P) a\nc : Fin2 n\np : Path P (f i) c\nIH : ∀ (f₁ f₂ : B (mp P) (f i) ⟹ α), R { fst := f i, snd := f₁ } { fst := f i, snd := f₂ } → f₁ c p = f₂ c p\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\n⊢ f₁ c (Path.child x a f h' i c p) = f₂ c (Path.child x a f h' i c p)\n[PROOFSTEP]\ntry\n  rcases h _ _ r with ⟨a', f', f₁', f₂', e₁, e₂, h''⟩\n  rcases M.bisim_lemma P e₁ with ⟨g₁', e₁', rfl, rfl⟩\n  rcases M.bisim_lemma P e₂ with ⟨g₂', e₂', e₃, rfl⟩\n  cases h'.symm.trans e₁'\n  cases h'.symm.trans e₂'\n[GOAL]\ncase mk.mk.e_snd.a.h.child\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : PFunctor.B (last P) a\nc : Fin2 n\np : Path P (f i) c\nIH : ∀ (f₁ f₂ : B (mp P) (f i) ⟹ α), R { fst := f i, snd := f₁ } { fst := f i, snd := f₂ } → f₁ c p = f₂ c p\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\n⊢ f₁ c (Path.child x a f h' i c p) = f₂ c (Path.child x a f h' i c p)\n[PROOFSTEP]\nrcases h _ _ r with ⟨a', f', f₁', f₂', e₁, e₂, h''⟩\n[GOAL]\ncase mk.mk.e_snd.a.h.child.intro.intro.intro.intro.intro.intro\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : PFunctor.B (last P) a\nc : Fin2 n\np : Path P (f i) c\nIH : ∀ (f₁ f₂ : B (mp P) (f i) ⟹ α), R { fst := f i, snd := f₁ } { fst := f i, snd := f₂ } → f₁ c p = f₂ c p\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\na' : P.A\nf' : TypeVec.drop (B P a') ⟹ TypeVec.drop (α ::: M P α)\nf₁' f₂' : TypeVec.last (B P a') → TypeVec.last (α ::: M P α)\ne₁ : dest P { fst := x, snd := f₁ } = { fst := a', snd := splitFun f' f₁' }\ne₂ : dest P { fst := x, snd := f₂ } = { fst := a', snd := splitFun f' f₂' }\nh'' : ∀ (i : TypeVec.last (B P a')), R (f₁' i) (f₂' i)\n⊢ f₁ c (Path.child x a f h' i c p) = f₂ c (Path.child x a f h' i c p)\n[PROOFSTEP]\nrcases M.bisim_lemma P e₁ with ⟨g₁', e₁', rfl, rfl⟩\n[GOAL]\ncase mk.mk.e_snd.a.h.child.intro.intro.intro.intro.intro.intro.intro.intro.intro\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : PFunctor.B (last P) a\nc : Fin2 n\np : Path P (f i) c\nIH : ∀ (f₁ f₂ : B (mp P) (f i) ⟹ α), R { fst := f i, snd := f₁ } { fst := f i, snd := f₂ } → f₁ c p = f₂ c p\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\na' : P.A\nf₂' : TypeVec.last (B P a') → TypeVec.last (α ::: M P α)\ng₁' : PFunctor.B (last P) a' → PFunctor.M (last P)\ne₁' : PFunctor.M.dest x = { fst := a', snd := g₁' }\ne₂ : dest P { fst := x, snd := f₂ } = { fst := a', snd := splitFun (pathDestLeft P e₁' f₁) f₂' }\nh'' : ∀ (i : TypeVec.last (B P a')), R ((fun x_1 => { fst := g₁' x_1, snd := pathDestRight P e₁' f₁ x_1 }) i) (f₂' i)\ne₁ :\n  dest P { fst := x, snd := f₁ } =\n    { fst := a',\n      snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := g₁' x_1, snd := pathDestRight P e₁' f₁ x_1 } }\n⊢ f₁ c (Path.child x a f h' i c p) = f₂ c (Path.child x a f h' i c p)\n[PROOFSTEP]\nrcases M.bisim_lemma P e₂ with ⟨g₂', e₂', e₃, rfl⟩\n[GOAL]\ncase mk.mk.e_snd.a.h.child.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : PFunctor.B (last P) a\nc : Fin2 n\np : Path P (f i) c\nIH : ∀ (f₁ f₂ : B (mp P) (f i) ⟹ α), R { fst := f i, snd := f₁ } { fst := f i, snd := f₂ } → f₁ c p = f₂ c p\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\na' : P.A\ng₁' : PFunctor.B (last P) a' → PFunctor.M (last P)\ne₁' : PFunctor.M.dest x = { fst := a', snd := g₁' }\ne₁ :\n  dest P { fst := x, snd := f₁ } =\n    { fst := a',\n      snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := g₁' x_1, snd := pathDestRight P e₁' f₁ x_1 } }\ng₂' : PFunctor.B (last P) a' → PFunctor.M (last P)\ne₂' : PFunctor.M.dest x = { fst := a', snd := g₂' }\ne₃ : pathDestLeft P e₁' f₁ = pathDestLeft P e₂' f₂\ne₂ :\n  dest P { fst := x, snd := f₂ } =\n    { fst := a',\n      snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := g₂' x_1, snd := pathDestRight P e₂' f₂ x_1 } }\nh'' :\n  ∀ (i : TypeVec.last (B P a')),\n    R ((fun x_1 => { fst := g₁' x_1, snd := pathDestRight P e₁' f₁ x_1 }) i)\n      ((fun x_1 => { fst := g₂' x_1, snd := pathDestRight P e₂' f₂ x_1 }) i)\n⊢ f₁ c (Path.child x a f h' i c p) = f₂ c (Path.child x a f h' i c p)\n[PROOFSTEP]\ncases h'.symm.trans e₁'\n[GOAL]\ncase mk.mk.e_snd.a.h.child.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refl\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : PFunctor.B (last P) a\nc : Fin2 n\np : Path P (f i) c\nIH : ∀ (f₁ f₂ : B (mp P) (f i) ⟹ α), R { fst := f i, snd := f₁ } { fst := f i, snd := f₂ } → f₁ c p = f₂ c p\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\ng₂' : PFunctor.B (last P) a → PFunctor.M (last P)\ne₂' : PFunctor.M.dest x = { fst := a, snd := g₂' }\ne₁' : PFunctor.M.dest x = { fst := a, snd := f }\ne₁ :\n  dest P { fst := x, snd := f₁ } =\n    { fst := a, snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := f x_1, snd := pathDestRight P e₁' f₁ x_1 } }\ne₃ : pathDestLeft P e₁' f₁ = pathDestLeft P e₂' f₂\ne₂ :\n  dest P { fst := x, snd := f₂ } =\n    { fst := a,\n      snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := g₂' x_1, snd := pathDestRight P e₂' f₂ x_1 } }\nh'' :\n  ∀ (i : TypeVec.last (B P a)),\n    R ((fun x_1 => { fst := f x_1, snd := pathDestRight P e₁' f₁ x_1 }) i)\n      ((fun x_1 => { fst := g₂' x_1, snd := pathDestRight P e₂' f₂ x_1 }) i)\n⊢ f₁ c (Path.child x a f h' i c p) = f₂ c (Path.child x a f h' i c p)\n[PROOFSTEP]\ncases h'.symm.trans e₂'\n[GOAL]\ncase mk.mk.e_snd.a.h.root.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refl.refl\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : Fin2 n\nc : B (drop P) a i\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\ne₁' : PFunctor.M.dest x = { fst := a, snd := f }\ne₁ :\n  dest P { fst := x, snd := f₁ } =\n    { fst := a, snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := f x_1, snd := pathDestRight P e₁' f₁ x_1 } }\ne₂' : PFunctor.M.dest x = { fst := a, snd := f }\ne₃ : pathDestLeft P e₁' f₁ = pathDestLeft P e₂' f₂\ne₂ :\n  dest P { fst := x, snd := f₂ } =\n    { fst := a, snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := f x_1, snd := pathDestRight P e₂' f₂ x_1 } }\nh'' :\n  ∀ (i : TypeVec.last (B P a)),\n    R ((fun x_1 => { fst := f x_1, snd := pathDestRight P e₁' f₁ x_1 }) i)\n      ((fun x_1 => { fst := f x_1, snd := pathDestRight P e₂' f₂ x_1 }) i)\n⊢ f₁ i (Path.root x a f h' i c) = f₂ i (Path.root x a f h' i c)\n[PROOFSTEP]\nexact (congr_fun (congr_fun e₃ i) c : _)\n[GOAL]\ncase mk.mk.e_snd.a.h.child.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refl.refl\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh :\n  ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\na₁ : (mp P).A\nf₁✝ f₂✝ : B (mp P) a₁ ⟹ α\nr✝ : R { fst := a₁, snd := f₁✝ } { fst := a₁, snd := f₂✝ }\ni✝ : Fin2 n\nx : PFunctor.M (last P)\na : P.A\nf : PFunctor.B (last P) a → PFunctor.M (last P)\nh' : PFunctor.M.dest x = { fst := a, snd := f }\ni : PFunctor.B (last P) a\nc : Fin2 n\np : Path P (f i) c\nIH : ∀ (f₁ f₂ : B (mp P) (f i) ⟹ α), R { fst := f i, snd := f₁ } { fst := f i, snd := f₂ } → f₁ c p = f₂ c p\nf₁ f₂ : B (mp P) x ⟹ α\nr : R { fst := x, snd := f₁ } { fst := x, snd := f₂ }\ne₁' : PFunctor.M.dest x = { fst := a, snd := f }\ne₁ :\n  dest P { fst := x, snd := f₁ } =\n    { fst := a, snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := f x_1, snd := pathDestRight P e₁' f₁ x_1 } }\ne₂' : PFunctor.M.dest x = { fst := a, snd := f }\ne₃ : pathDestLeft P e₁' f₁ = pathDestLeft P e₂' f₂\ne₂ :\n  dest P { fst := x, snd := f₂ } =\n    { fst := a, snd := splitFun (pathDestLeft P e₁' f₁) fun x_1 => { fst := f x_1, snd := pathDestRight P e₂' f₂ x_1 } }\nh'' :\n  ∀ (i : TypeVec.last (B P a)),\n    R ((fun x_1 => { fst := f x_1, snd := pathDestRight P e₁' f₁ x_1 }) i)\n      ((fun x_1 => { fst := f x_1, snd := pathDestRight P e₂' f₂ x_1 }) i)\n⊢ f₁ c (Path.child x a f h' i c p) = f₂ c (Path.child x a f h' i c p)\n[PROOFSTEP]\nexact IH _ _ (h'' _)\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nr : R x y\n⊢ x = y\n[PROOFSTEP]\napply M.bisim P R _ _ _ r\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nr : R x y\n⊢ ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nclear r x y\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\n⊢ ∀ (x y : M P α),\n    R x y →\n      ∃ a f f₁ f₂,\n        dest P x = { fst := a, snd := splitFun f f₁ } ∧\n          dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nintrov Hr\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nHr : R x y\n⊢ ∃ a f f₁ f₂,\n    dest P x = { fst := a, snd := splitFun f f₁ } ∧\n      dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nspecialize h _ _ Hr\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nHr : R x y\nh : (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\n⊢ ∃ a f f₁ f₂,\n    dest P x = { fst := a, snd := splitFun f f₁ } ∧\n      dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nclear Hr\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nh : (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\n⊢ ∃ a f f₁ f₂,\n    dest P x = { fst := a, snd := splitFun f f₁ } ∧\n      dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nrevert h\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\n⊢ (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y →\n    ∃ a f f₁ f₂,\n      dest P x = { fst := a, snd := splitFun f f₁ } ∧\n        dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nrcases M.dest P x with ⟨ax, fx⟩\n[GOAL]\ncase mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx : B P ax ⟹ α ::: M P α\n⊢ (TypeVec.id ::: Quot.mk R) <$$> { fst := ax, snd := fx } = (TypeVec.id ::: Quot.mk R) <$$> dest P y →\n    ∃ a f f₁ f₂,\n      { fst := ax, snd := fx } = { fst := a, snd := splitFun f f₁ } ∧\n        dest P y = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nrcases M.dest P y with ⟨ay, fy⟩\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx : B P ax ⟹ α ::: M P α\nay : P.A\nfy : B P ay ⟹ α ::: M P α\n⊢ (TypeVec.id ::: Quot.mk R) <$$> { fst := ax, snd := fx } = (TypeVec.id ::: Quot.mk R) <$$> { fst := ay, snd := fy } →\n    ∃ a f f₁ f₂,\n      { fst := ax, snd := fx } = { fst := a, snd := splitFun f f₁ } ∧\n        { fst := ay, snd := fy } = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx : B P ax ⟹ α ::: M P α\nay : P.A\nfy : B P ay ⟹ α ::: M P α\nh : (TypeVec.id ::: Quot.mk R) <$$> { fst := ax, snd := fx } = (TypeVec.id ::: Quot.mk R) <$$> { fst := ay, snd := fy }\n⊢ ∃ a f f₁ f₂,\n    { fst := ax, snd := fx } = { fst := a, snd := splitFun f f₁ } ∧\n      { fst := ay, snd := fy } = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nrw [map_eq, map_eq] at h \n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx : B P ax ⟹ α ::: M P α\nay : P.A\nfy : B P ay ⟹ α ::: M P α\nh : { fst := ax, snd := (TypeVec.id ::: Quot.mk R) ⊚ fx } = { fst := ay, snd := (TypeVec.id ::: Quot.mk R) ⊚ fy }\n⊢ ∃ a f f₁ f₂,\n    { fst := ax, snd := fx } = { fst := a, snd := splitFun f f₁ } ∧\n      { fst := ay, snd := fy } = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\ninjection h with h₀ h₁\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀✝ : Equivalence R\nx y : M P α\nax : P.A\nfx : B P ax ⟹ α ::: M P α\nay : P.A\nfy : B P ay ⟹ α ::: M P α\nh₀ : ax = ay\nh₁ : HEq ((TypeVec.id ::: Quot.mk R) ⊚ fx) ((TypeVec.id ::: Quot.mk R) ⊚ fy)\n⊢ ∃ a f f₁ f₂,\n    { fst := ax, snd := fx } = { fst := a, snd := splitFun f f₁ } ∧\n      { fst := ay, snd := fy } = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nsubst ay\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nh₁ : HEq ((TypeVec.id ::: Quot.mk R) ⊚ fx) ((TypeVec.id ::: Quot.mk R) ⊚ fy)\n⊢ ∃ a f f₁ f₂,\n    { fst := ax, snd := fx } = { fst := a, snd := splitFun f f₁ } ∧\n      { fst := ax, snd := fy } = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nsimp at h₁ \n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nh₁ : (TypeVec.id ::: Quot.mk R) ⊚ fx = (TypeVec.id ::: Quot.mk R) ⊚ fy\n⊢ ∃ a f f₁ f₂,\n    { fst := ax, snd := fx } = { fst := a, snd := splitFun f f₁ } ∧\n      { fst := ax, snd := fy } = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nhave Hdrop : dropFun fx = dropFun fy := by\n  replace h₁ := congr_arg dropFun h₁\n  simpa using h₁\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nh₁ : (TypeVec.id ::: Quot.mk R) ⊚ fx = (TypeVec.id ::: Quot.mk R) ⊚ fy\n⊢ dropFun fx = dropFun fy\n[PROOFSTEP]\nreplace h₁ := congr_arg dropFun h₁\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nh₁ : dropFun ((TypeVec.id ::: Quot.mk R) ⊚ fx) = dropFun ((TypeVec.id ::: Quot.mk R) ⊚ fy)\n⊢ dropFun fx = dropFun fy\n[PROOFSTEP]\nsimpa using h₁\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nh₁ : (TypeVec.id ::: Quot.mk R) ⊚ fx = (TypeVec.id ::: Quot.mk R) ⊚ fy\nHdrop : dropFun fx = dropFun fy\n⊢ ∃ a f f₁ f₂,\n    { fst := ax, snd := fx } = { fst := a, snd := splitFun f f₁ } ∧\n      { fst := ax, snd := fy } = { fst := a, snd := splitFun f f₂ } ∧ ∀ (i : TypeVec.last (B P a)), R (f₁ i) (f₂ i)\n[PROOFSTEP]\nexists ax, dropFun fx, lastFun fx, lastFun fy\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nh₁ : (TypeVec.id ::: Quot.mk R) ⊚ fx = (TypeVec.id ::: Quot.mk R) ⊚ fy\nHdrop : dropFun fx = dropFun fy\n⊢ { fst := ax, snd := fx } = { fst := ax, snd := splitFun (dropFun fx) (lastFun fx) } ∧\n    { fst := ax, snd := fy } = { fst := ax, snd := splitFun (dropFun fx) (lastFun fy) } ∧\n      ∀ (i : TypeVec.last (B P ax)), R (lastFun fx i) (lastFun fy i)\n[PROOFSTEP]\nrw [split_dropFun_lastFun, Hdrop, split_dropFun_lastFun]\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nh₁ : (TypeVec.id ::: Quot.mk R) ⊚ fx = (TypeVec.id ::: Quot.mk R) ⊚ fy\nHdrop : dropFun fx = dropFun fy\n⊢ { fst := ax, snd := fx } = { fst := ax, snd := fx } ∧\n    { fst := ax, snd := fy } = { fst := ax, snd := fy } ∧ ∀ (i : TypeVec.last (B P ax)), R (lastFun fx i) (lastFun fy i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nh₁ : (TypeVec.id ::: Quot.mk R) ⊚ fx = (TypeVec.id ::: Quot.mk R) ⊚ fy\nHdrop : dropFun fx = dropFun fy\n⊢ ∀ (i : TypeVec.last (B P ax)), R (lastFun fx i) (lastFun fy i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nh₁ : (TypeVec.id ::: Quot.mk R) ⊚ fx = (TypeVec.id ::: Quot.mk R) ⊚ fy\nHdrop : dropFun fx = dropFun fy\ni : TypeVec.last (B P ax)\n⊢ R (lastFun fx i) (lastFun fy i)\n[PROOFSTEP]\nreplace h₁ := congr_fun (congr_fun h₁ Fin2.fz) i\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nHdrop : dropFun fx = dropFun fy\ni : TypeVec.last (B P ax)\nh₁ : ((TypeVec.id ::: Quot.mk R) ⊚ fx) Fin2.fz i = ((TypeVec.id ::: Quot.mk R) ⊚ fy) Fin2.fz i\n⊢ R (lastFun fx i) (lastFun fy i)\n[PROOFSTEP]\nsimp [(· ⊚ ·), appendFun, splitFun] at h₁ \n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nHdrop : dropFun fx = dropFun fy\ni : TypeVec.last (B P ax)\nh₁ : Quot.mk R (fx Fin2.fz i) = Quot.mk R (fy Fin2.fz i)\n⊢ R (lastFun fx i) (lastFun fy i)\n[PROOFSTEP]\nreplace h₁ := Quot.exact _ h₁\n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nHdrop : dropFun fx = dropFun fy\ni : TypeVec.last (B P ax)\nh₁ : EqvGen R (fx Fin2.fz i) (fy Fin2.fz i)\n⊢ R (lastFun fx i) (lastFun fy i)\n[PROOFSTEP]\nrw [h₀.eqvGen_iff] at h₁ \n[GOAL]\ncase mk.mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh₀ : Equivalence R\nx y : M P α\nax : P.A\nfx fy : B P ax ⟹ α ::: M P α\nHdrop : dropFun fx = dropFun fy\ni : TypeVec.last (B P ax)\nh₁ : R (fx Fin2.fz i) (fy Fin2.fz i)\n⊢ R (lastFun fx i) (lastFun fy i)\n[PROOFSTEP]\nexact h₁\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nr : R x y\n⊢ x = y\n[PROOFSTEP]\nhave := M.bisim₀ P (EqvGen R) ?_ ?_\n[GOAL]\ncase refine_3\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nr : R x y\nthis : ∀ (x y : M P α), EqvGen R x y → x = y\n⊢ x = y\n[PROOFSTEP]\nsolve_by_elim [EqvGen.rel]\n[GOAL]\ncase refine_1\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nr : R x y\n⊢ Equivalence (EqvGen R)\n[PROOFSTEP]\napply EqvGen.is_equivalence\n[GOAL]\ncase refine_2\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nr : R x y\n⊢ ∀ (x y : M P α),\n    EqvGen R x y → (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y\n[PROOFSTEP]\nclear r x y\n[GOAL]\ncase refine_2\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\n⊢ ∀ (x y : M P α),\n    EqvGen R x y → (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y\n[PROOFSTEP]\nintrov Hr\n[GOAL]\ncase refine_2\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nHr : EqvGen R x y\n⊢ (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y\n[PROOFSTEP]\nhave : ∀ x y, R x y → EqvGen R x y := @EqvGen.rel _ R\n[GOAL]\ncase refine_2\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nHr : EqvGen R x y\nthis : ∀ (x y : M P α), R x y → EqvGen R x y\n⊢ (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y\n[PROOFSTEP]\ninduction Hr\n[GOAL]\ncase refine_2.rel\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nthis : ∀ (x y : M P α), R x y → EqvGen R x y\nx✝ y✝ : M P α\na✝ : R x✝ y✝\n⊢ (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y✝\n[PROOFSTEP]\nrw [← Quot.factor_mk_eq R (EqvGen R) this]\n[GOAL]\ncase refine_2.rel\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nthis : ∀ (x y : M P α), R x y → EqvGen R x y\nx✝ y✝ : M P α\na✝ : R x✝ y✝\n⊢ (TypeVec.id ::: Quot.factor R (EqvGen R) this ∘ Quot.mk R) <$$> dest P x✝ =\n    (TypeVec.id ::: Quot.factor R (EqvGen R) this ∘ Quot.mk R) <$$> dest P y✝\n[PROOFSTEP]\nrwa [appendFun_comp_id, ← MvFunctor.map_map, ← MvFunctor.map_map, h]\n  -- porting note: `cc` was replaced with `aesop`, maybe there is a more light-weight solution?\n[GOAL]\ncase refine_2.refl\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nthis : ∀ (x y : M P α), R x y → EqvGen R x y\nx✝ : M P α\n⊢ (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝\ncase refine_2.symm\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nthis : ∀ (x y : M P α), R x y → EqvGen R x y\nx✝ y✝ : M P α\na✝ : EqvGen R x✝ y✝\na_ih✝ : (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y✝\n⊢ (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝\ncase refine_2.trans\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nthis : ∀ (x y : M P α), R x y → EqvGen R x y\nx✝ y✝ z✝ : M P α\na✝¹ : EqvGen R x✝ y✝\na✝ : EqvGen R y✝ z✝\na_ih✝¹ : (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y✝\na_ih✝ : (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P z✝\n⊢ (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P z✝\n[PROOFSTEP]\nall_goals aesop\n[GOAL]\ncase refine_2.refl\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nthis : ∀ (x y : M P α), R x y → EqvGen R x y\nx✝ : M P α\n⊢ (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝\n[PROOFSTEP]\naesop\n[GOAL]\ncase refine_2.symm\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nthis : ∀ (x y : M P α), R x y → EqvGen R x y\nx✝ y✝ : M P α\na✝ : EqvGen R x✝ y✝\na_ih✝ : (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y✝\n⊢ (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝\n[PROOFSTEP]\naesop\n[GOAL]\ncase refine_2.trans\nn : ℕ\nP : MvPFunctor (n + 1)\nα : TypeVec n\nR : M P α → M P α → Prop\nh : ∀ (x y : M P α), R x y → (TypeVec.id ::: Quot.mk R) <$$> dest P x = (TypeVec.id ::: Quot.mk R) <$$> dest P y\nx y : M P α\nthis : ∀ (x y : M P α), R x y → EqvGen R x y\nx✝ y✝ z✝ : M P α\na✝¹ : EqvGen R x✝ y✝\na✝ : EqvGen R y✝ z✝\na_ih✝¹ : (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y✝\na_ih✝ : (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P y✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P z✝\n⊢ (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P x✝ = (TypeVec.id ::: Quot.mk (EqvGen R)) <$$> dest P z✝\n[PROOFSTEP]\naesop\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ⟹ β\nx : M P α\n⊢ dest P (g <$$> x) = (g ::: fun x => g <$$> x) <$$> dest P x\n[PROOFSTEP]\ncases' x with a f\n[GOAL]\ncase mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ⟹ β\na : (mp P).A\nf : B (mp P) a ⟹ α\n⊢ dest P (g <$$> { fst := a, snd := f }) = (g ::: fun x => g <$$> x) <$$> dest P { fst := a, snd := f }\n[PROOFSTEP]\nrw [map_eq]\n[GOAL]\ncase mk\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ⟹ β\na : (mp P).A\nf : B (mp P) a ⟹ α\n⊢ dest P { fst := a, snd := g ⊚ f } = (g ::: fun x => g <$$> x) <$$> dest P { fst := a, snd := f }\n[PROOFSTEP]\nconv =>\n  rhs\n  rw [M.dest, M.dest', map_eq, appendFun_comp_splitFun]\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ⟹ β\na : (mp P).A\nf : B (mp P) a ⟹ α\n| dest P { fst := a, snd := g ⊚ f } = (g ::: fun x => g <$$> x) <$$> dest P { fst := a, snd := f }\n[PROOFSTEP]\n  rhs\n  rw [M.dest, M.dest', map_eq, appendFun_comp_splitFun]\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ⟹ β\na : (mp P).A\nf : B (mp P) a ⟹ α\n| dest P { fst := a, snd := g ⊚ f } = (g ::: fun x => g <$$> x) <$$> dest P { fst := a, snd := f }\n[PROOFSTEP]\n  rhs\n  rw [M.dest, M.dest', map_eq, appendFun_comp_splitFun]\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ⟹ β\na : (mp P).A\nf : B (mp P) a ⟹ α\n| dest P { fst := a, snd := g ⊚ f } = (g ::: fun x => g <$$> x) <$$> dest P { fst := a, snd := f }\n[PROOFSTEP]\nrhs\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ⟹ β\na : (mp P).A\nf : B (mp P) a ⟹ α\n| (g ::: fun x => g <$$> x) <$$> dest P { fst := a, snd := f }\n[PROOFSTEP]\nrw [M.dest, M.dest', map_eq, appendFun_comp_splitFun]\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ::: M P α ⟹ β ::: M P β\nx : M P α\nh : ∀ (x : M P α), lastFun g x = dropFun g <$$> x\n⊢ g <$$> dest P x = dest P (dropFun g <$$> x)\n[PROOFSTEP]\nrw [M.dest_map]\n[GOAL]\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ::: M P α ⟹ β ::: M P β\nx : M P α\nh : ∀ (x : M P α), lastFun g x = dropFun g <$$> x\n⊢ g <$$> dest P x = (dropFun g ::: fun x => dropFun g <$$> x) <$$> dest P x\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ::: M P α ⟹ β ::: M P β\nx : M P α\nh : ∀ (x : M P α), lastFun g x = dropFun g <$$> x\n⊢ g = (dropFun g ::: fun x => dropFun g <$$> x)\n[PROOFSTEP]\napply eq_of_drop_last_eq\n[GOAL]\ncase e_a.h₀\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ::: M P α ⟹ β ::: M P β\nx : M P α\nh : ∀ (x : M P α), lastFun g x = dropFun g <$$> x\n⊢ dropFun g = dropFun (dropFun g ::: fun x => dropFun g <$$> x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_a.h₁\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ::: M P α ⟹ β ::: M P β\nx : M P α\nh : ∀ (x : M P α), lastFun g x = dropFun g <$$> x\n⊢ lastFun g = lastFun (dropFun g ::: fun x => dropFun g <$$> x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_a.h₁\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ::: M P α ⟹ β ::: M P β\nx : M P α\nh : ∀ (x : M P α), lastFun g x = dropFun g <$$> x\n⊢ lastFun g = fun x => dropFun g <$$> x\n[PROOFSTEP]\next1\n[GOAL]\ncase e_a.h₁.h\nn : ℕ\nP : MvPFunctor (n + 1)\nα β : TypeVec n\ng : α ::: M P α ⟹ β ::: M P β\nx : M P α\nh : ∀ (x : M P α), lastFun g x = dropFun g <$$> x\nx✝ : TypeVec.last (α ::: M P α)\n⊢ lastFun g x✝ = dropFun g <$$> x✝\n[PROOFSTEP]\napply h\n", "meta": {"mathlib_filename": "Mathlib.Data.PFunctor.Multivariate.M", "llama_tokens": 34576, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.752012562644147, "lm_q2_score": 0.46879062662624377, "lm_q1q2_score": 0.35253644047275706}}
{"text": "[GOAL]\no : Ordinal.{u_1}\n⊢ let_fun this := (_ : IsWellOrder (Quotient.out o).α fun x x_1 => x < x_1);\n  toPGame o = mk (Quotient.out o).α PEmpty (fun x => toPGame (typein (fun x x_1 => x < x_1) x)) PEmpty.elim\n[PROOFSTEP]\nrw [toPGame]\n[GOAL]\no : Ordinal.{u_1}\n⊢ LeftMoves (toPGame o) = (Quotient.out o).α\n[PROOFSTEP]\nrw [toPGame, LeftMoves]\n[GOAL]\no : Ordinal.{u_1}\n⊢ RightMoves (toPGame o) = PEmpty\n[PROOFSTEP]\nrw [toPGame, RightMoves]\n[GOAL]\n⊢ IsEmpty (LeftMoves (toPGame 0))\n[PROOFSTEP]\nrw [toPGame_leftMoves]\n[GOAL]\n⊢ IsEmpty (Quotient.out 0).α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\no : Ordinal.{?u.8904}\n⊢ IsEmpty (RightMoves (toPGame o))\n[PROOFSTEP]\nrw [toPGame_rightMoves]\n[GOAL]\no : Ordinal.{?u.8904}\n⊢ IsEmpty PEmpty\n[PROOFSTEP]\ninfer_instance\n[GOAL]\no : Ordinal.{u_1}\n⊢ let_fun this := (_ : IsWellOrder (Quotient.out o).α fun x x_1 => x < x_1);\n  HEq (moveLeft (toPGame o)) fun x => toPGame (typein (fun x x_1 => x < x_1) x)\n[PROOFSTEP]\nrw [toPGame]\n[GOAL]\no : Ordinal.{u_1}\n⊢ let_fun this := (_ : IsWellOrder (Quotient.out o).α fun x x_1 => x < x_1);\n  HEq\n    (moveLeft\n      ((fun this =>\n          mk (Quotient.out o).α PEmpty\n            (fun x =>\n              let_fun this_1 := (_ : typein (fun x x_1 => x < x_1) x < o);\n              toPGame (typein (fun x x_1 => x < x_1) x))\n            PEmpty.elim)\n        (_ : IsWellOrder (Quotient.out o).α fun x x_1 => x < x_1)))\n    fun x => toPGame (typein (fun x x_1 => x < x_1) x)\n[PROOFSTEP]\nrfl\n[GOAL]\no : Ordinal.{u_1}\ni : ↑(Set.Iio o)\n⊢ moveLeft (toPGame o) (↑toLeftMovesToPGame i) = toPGame ↑i\n[PROOFSTEP]\nsimp\n[GOAL]\ni : LeftMoves (toPGame 1)\n⊢ ↑toLeftMovesToPGame.symm i = { val := 0, property := (_ : 0 ∈ Set.Iio 1) }\n[PROOFSTEP]\nsimp\n[GOAL]\nx : LeftMoves (toPGame 1)\n⊢ moveLeft (toPGame 1) x = toPGame 0\n[PROOFSTEP]\nsimp\n[GOAL]\ni : LeftMoves (toPGame 1)\n⊢ moveLeft (toPGame 1) i ≡r moveLeft 1 (↑(Equiv.equivOfUnique (LeftMoves (toPGame 1)) (LeftMoves 1)) i)\n[PROOFSTEP]\nsimpa using zeroToPgameRelabelling\n[GOAL]\na b : Ordinal.{u_1}\nh : a < b\n⊢ toPGame a ⧏ toPGame b\n[PROOFSTEP]\nconvert moveLeft_lf (toLeftMovesToPGame ⟨a, h⟩)\n[GOAL]\ncase h.e'_1\na b : Ordinal.{u_1}\nh : a < b\n⊢ toPGame a = moveLeft (toPGame b) (↑toLeftMovesToPGame { val := a, property := h })\n[PROOFSTEP]\nrw [toPGame_moveLeft]\n[GOAL]\na b : Ordinal.{u_1}\nh : a ≤ b\n⊢ toPGame a ≤ toPGame b\n[PROOFSTEP]\nrefine' le_iff_forall_lf.2 ⟨fun i => _, isEmptyElim⟩\n[GOAL]\na b : Ordinal.{u_1}\nh : a ≤ b\ni : LeftMoves (toPGame a)\n⊢ moveLeft (toPGame a) i ⧏ toPGame b\n[PROOFSTEP]\nrw [toPGame_moveLeft']\n[GOAL]\na b : Ordinal.{u_1}\nh : a ≤ b\ni : LeftMoves (toPGame a)\n⊢ toPGame ↑(↑toLeftMovesToPGame.symm i) ⧏ toPGame b\n[PROOFSTEP]\nexact toPGame_lf ((toLeftMovesToPGame_symm_lt i).trans_le h)\n[GOAL]\na b : Ordinal.{u_1}\n⊢ toPGame a ⧏ toPGame b → a < b\n[PROOFSTEP]\ncontrapose\n[GOAL]\na b : Ordinal.{u_1}\n⊢ ¬a < b → ¬toPGame a ⧏ toPGame b\n[PROOFSTEP]\nrw [not_lt, not_lf]\n[GOAL]\na b : Ordinal.{u_1}\n⊢ b ≤ a → toPGame b ≤ toPGame a\n[PROOFSTEP]\nexact toPGame_le\n[GOAL]\na b : Ordinal.{u_1}\n⊢ toPGame a ≤ toPGame b → a ≤ b\n[PROOFSTEP]\ncontrapose\n[GOAL]\na b : Ordinal.{u_1}\n⊢ ¬a ≤ b → ¬toPGame a ≤ toPGame b\n[PROOFSTEP]\nrw [not_le, PGame.not_le]\n[GOAL]\na b : Ordinal.{u_1}\n⊢ b < a → toPGame b ⧏ toPGame a\n[PROOFSTEP]\nexact toPGame_lf\n[GOAL]\na b : Ordinal.{u_1}\n⊢ toPGame a < toPGame b → a < b\n[PROOFSTEP]\ncontrapose\n[GOAL]\na b : Ordinal.{u_1}\n⊢ ¬a < b → ¬toPGame a < toPGame b\n[PROOFSTEP]\nrw [not_lt]\n[GOAL]\na b : Ordinal.{u_1}\n⊢ b ≤ a → ¬toPGame a < toPGame b\n[PROOFSTEP]\nexact fun h => not_lt_of_le (toPGame_le h)\n[GOAL]\na b : Ordinal.{u_1}\n⊢ toPGame a ≈ toPGame b ↔ a = b\n[PROOFSTEP]\nchange _ ≤ _ ∧ _ ≤ _ ↔ _\n[GOAL]\na b : Ordinal.{u_1}\n⊢ toPGame a ≤ toPGame b ∧ toPGame b ≤ toPGame a ↔ a = b\n[PROOFSTEP]\nrw [le_antisymm_iff, toPGame_le_iff, toPGame_le_iff]\n[GOAL]\na b : Ordinal.{u}\n⊢ toPGame a + toPGame b ≈ toPGame (a ♯ b)\n[PROOFSTEP]\nrefine' ⟨le_of_forall_lf (fun i => _) isEmptyElim, le_of_forall_lf (fun i => _) isEmptyElim⟩\n[GOAL]\ncase refine'_1\na b : Ordinal.{u}\ni : LeftMoves (toPGame a + toPGame b)\n⊢ moveLeft (toPGame a + toPGame b) i ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\napply leftMoves_add_cases i\n[GOAL]\ncase refine'_1.hl\na b : Ordinal.{u}\ni : LeftMoves (toPGame a + toPGame b)\n⊢ ∀ (i : LeftMoves (toPGame a)), moveLeft (toPGame a + toPGame b) (↑toLeftMovesAdd (Sum.inl i)) ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_1.hr\na b : Ordinal.{u}\ni : LeftMoves (toPGame a + toPGame b)\n⊢ ∀ (i : LeftMoves (toPGame b)), moveLeft (toPGame a + toPGame b) (↑toLeftMovesAdd (Sum.inr i)) ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_1.hl\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame a)\n⊢ moveLeft (toPGame a + toPGame b) (↑toLeftMovesAdd (Sum.inl i)) ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\nlet wf := toLeftMovesToPGame_symm_lt i\n[GOAL]\ncase refine'_1.hr\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame b)\n⊢ moveLeft (toPGame a + toPGame b) (↑toLeftMovesAdd (Sum.inr i)) ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\nlet wf := toLeftMovesToPGame_symm_lt i\n[GOAL]\ncase refine'_1.hl\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame a)\nwf : ↑(↑toLeftMovesToPGame.symm i) < a := toLeftMovesToPGame_symm_lt i\n⊢ moveLeft (toPGame a + toPGame b) (↑toLeftMovesAdd (Sum.inl i)) ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\ntry rw [add_moveLeft_inl]\n[GOAL]\ncase refine'_1.hl\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame a)\nwf : ↑(↑toLeftMovesToPGame.symm i) < a := toLeftMovesToPGame_symm_lt i\n⊢ moveLeft (toPGame a + toPGame b) (↑toLeftMovesAdd (Sum.inl i)) ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\nrw [add_moveLeft_inl]\n[GOAL]\ncase refine'_1.hr\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame b)\nwf : ↑(↑toLeftMovesToPGame.symm i) < b := toLeftMovesToPGame_symm_lt i\n⊢ moveLeft (toPGame a + toPGame b) (↑toLeftMovesAdd (Sum.inr i)) ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\ntry rw [add_moveLeft_inl]\n[GOAL]\ncase refine'_1.hr\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame b)\nwf : ↑(↑toLeftMovesToPGame.symm i) < b := toLeftMovesToPGame_symm_lt i\n⊢ moveLeft (toPGame a + toPGame b) (↑toLeftMovesAdd (Sum.inr i)) ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\nrw [add_moveLeft_inl]\n[GOAL]\ncase refine'_1.hl\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame a)\nwf : ↑(↑toLeftMovesToPGame.symm i) < a := toLeftMovesToPGame_symm_lt i\n⊢ moveLeft (toPGame a) i + toPGame b ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\ntry rw [add_moveLeft_inr]\n[GOAL]\ncase refine'_1.hl\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame a)\nwf : ↑(↑toLeftMovesToPGame.symm i) < a := toLeftMovesToPGame_symm_lt i\n⊢ moveLeft (toPGame a) i + toPGame b ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\nrw [add_moveLeft_inr]\n[GOAL]\ncase refine'_1.hr\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame b)\nwf : ↑(↑toLeftMovesToPGame.symm i) < b := toLeftMovesToPGame_symm_lt i\n⊢ moveLeft (toPGame a + toPGame b) (↑toLeftMovesAdd (Sum.inr i)) ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\ntry rw [add_moveLeft_inr]\n[GOAL]\ncase refine'_1.hr\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame b)\nwf : ↑(↑toLeftMovesToPGame.symm i) < b := toLeftMovesToPGame_symm_lt i\n⊢ moveLeft (toPGame a + toPGame b) (↑toLeftMovesAdd (Sum.inr i)) ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\nrw [add_moveLeft_inr]\n[GOAL]\ncase refine'_1.hl\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame a)\nwf : ↑(↑toLeftMovesToPGame.symm i) < a := toLeftMovesToPGame_symm_lt i\n⊢ moveLeft (toPGame a) i + toPGame b ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\nrw [toPGame_moveLeft', lf_congr_left (toPGame_add _ _), toPGame_lf_iff]\n[GOAL]\ncase refine'_1.hr\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame b)\nwf : ↑(↑toLeftMovesToPGame.symm i) < b := toLeftMovesToPGame_symm_lt i\n⊢ toPGame a + moveLeft (toPGame b) i ⧏ toPGame (a ♯ b)\n[PROOFSTEP]\nrw [toPGame_moveLeft', lf_congr_left (toPGame_add _ _), toPGame_lf_iff]\n[GOAL]\ncase refine'_1.hl\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame a)\nwf : ↑(↑toLeftMovesToPGame.symm i) < a := toLeftMovesToPGame_symm_lt i\n⊢ ↑(↑toLeftMovesToPGame.symm i) ♯ b < a ♯ b\n[PROOFSTEP]\nexact nadd_lt_nadd_right wf _\n[GOAL]\ncase refine'_1.hr\na b : Ordinal.{u}\ni✝ : LeftMoves (toPGame a + toPGame b)\ni : LeftMoves (toPGame b)\nwf : ↑(↑toLeftMovesToPGame.symm i) < b := toLeftMovesToPGame_symm_lt i\n⊢ a ♯ ↑(↑toLeftMovesToPGame.symm i) < a ♯ b\n[PROOFSTEP]\nexact nadd_lt_nadd_left wf _\n[GOAL]\ncase refine'_2\na b : Ordinal.{u}\ni : LeftMoves (toPGame (a ♯ b))\n⊢ moveLeft (toPGame (a ♯ b)) i ⧏ toPGame a + toPGame b\n[PROOFSTEP]\nrw [toPGame_moveLeft']\n[GOAL]\ncase refine'_2\na b : Ordinal.{u}\ni : LeftMoves (toPGame (a ♯ b))\n⊢ toPGame ↑(↑toLeftMovesToPGame.symm i) ⧏ toPGame a + toPGame b\n[PROOFSTEP]\nrcases lt_nadd_iff.1 (toLeftMovesToPGame_symm_lt i) with (⟨c, hc, hc'⟩ | ⟨c, hc, hc'⟩)\n[GOAL]\ncase refine'_2.inl.intro.intro\na b : Ordinal.{u}\ni : LeftMoves (toPGame (a ♯ b))\nc : Ordinal.{u}\nhc : c < a\nhc' : ↑(↑toLeftMovesToPGame.symm i) ≤ c ♯ b\n⊢ toPGame ↑(↑toLeftMovesToPGame.symm i) ⧏ toPGame a + toPGame b\n[PROOFSTEP]\nrw [← toPGame_le_iff, ← le_congr_right (toPGame_add _ _)] at hc' \n[GOAL]\ncase refine'_2.inr.intro.intro\na b : Ordinal.{u}\ni : LeftMoves (toPGame (a ♯ b))\nc : Ordinal.{u}\nhc : c < b\nhc' : ↑(↑toLeftMovesToPGame.symm i) ≤ a ♯ c\n⊢ toPGame ↑(↑toLeftMovesToPGame.symm i) ⧏ toPGame a + toPGame b\n[PROOFSTEP]\nrw [← toPGame_le_iff, ← le_congr_right (toPGame_add _ _)] at hc' \n[GOAL]\ncase refine'_2.inl.intro.intro\na b : Ordinal.{u}\ni : LeftMoves (toPGame (a ♯ b))\nc : Ordinal.{u}\nhc : c < a\nhc' : toPGame ↑(↑toLeftMovesToPGame.symm i) ≤ toPGame c + toPGame b\n⊢ toPGame ↑(↑toLeftMovesToPGame.symm i) ⧏ toPGame a + toPGame b\n[PROOFSTEP]\napply lf_of_le_of_lf hc'\n[GOAL]\ncase refine'_2.inr.intro.intro\na b : Ordinal.{u}\ni : LeftMoves (toPGame (a ♯ b))\nc : Ordinal.{u}\nhc : c < b\nhc' : toPGame ↑(↑toLeftMovesToPGame.symm i) ≤ toPGame a + toPGame c\n⊢ toPGame ↑(↑toLeftMovesToPGame.symm i) ⧏ toPGame a + toPGame b\n[PROOFSTEP]\napply lf_of_le_of_lf hc'\n[GOAL]\ncase refine'_2.inl.intro.intro\na b : Ordinal.{u}\ni : LeftMoves (toPGame (a ♯ b))\nc : Ordinal.{u}\nhc : c < a\nhc' : toPGame ↑(↑toLeftMovesToPGame.symm i) ≤ toPGame c + toPGame b\n⊢ toPGame c + toPGame b ⧏ toPGame a + toPGame b\n[PROOFSTEP]\napply add_lf_add_right\n[GOAL]\ncase refine'_2.inl.intro.intro.h\na b : Ordinal.{u}\ni : LeftMoves (toPGame (a ♯ b))\nc : Ordinal.{u}\nhc : c < a\nhc' : toPGame ↑(↑toLeftMovesToPGame.symm i) ≤ toPGame c + toPGame b\n⊢ toPGame c ⧏ toPGame a\n[PROOFSTEP]\nrwa [toPGame_lf_iff]\n[GOAL]\ncase refine'_2.inr.intro.intro\na b : Ordinal.{u}\ni : LeftMoves (toPGame (a ♯ b))\nc : Ordinal.{u}\nhc : c < b\nhc' : toPGame ↑(↑toLeftMovesToPGame.symm i) ≤ toPGame a + toPGame c\n⊢ toPGame a + toPGame c ⧏ toPGame a + toPGame b\n[PROOFSTEP]\napply add_lf_add_left\n[GOAL]\ncase refine'_2.inr.intro.intro.h\na b : Ordinal.{u}\ni : LeftMoves (toPGame (a ♯ b))\nc : Ordinal.{u}\nhc : c < b\nhc' : toPGame ↑(↑toLeftMovesToPGame.symm i) ≤ toPGame a + toPGame c\n⊢ toPGame c ⧏ toPGame b\n[PROOFSTEP]\nrwa [toPGame_lf_iff]\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Game.Ordinal", "llama_tokens": 5840, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6224593312018545, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.35232351886601865}}
{"text": "[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroObject C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasEqualizers C\ninst✝ : HasImages C\nZ : C\nI : InjectiveResolution Z\nn : ℕ\n⊢ HomologicalComplex.Hom.f I.ι (n + 1) = 0\n[PROOFSTEP]\napply zero_of_source_iso_zero\n[GOAL]\ncase i\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroObject C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasEqualizers C\ninst✝ : HasImages C\nZ : C\nI : InjectiveResolution Z\nn : ℕ\n⊢ HomologicalComplex.X ((CochainComplex.single₀ C).obj Z) (n + 1) ≅ 0\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroObject C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasEqualizers C\ninst✝ : HasImages C\nZ : C\nI : InjectiveResolution Z\nn : ℕ\n⊢ Mono (HomologicalComplex.Hom.f I.ι n)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroObject C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasEqualizers C\ninst✝ : HasImages C\nZ : C\nI : InjectiveResolution Z\n⊢ Mono (HomologicalComplex.Hom.f I.ι Nat.zero)\n[PROOFSTEP]\napply I.mono\n[GOAL]\ncase succ\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroObject C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasEqualizers C\ninst✝ : HasImages C\nZ : C\nI : InjectiveResolution Z\nn✝ : ℕ\n⊢ Mono (HomologicalComplex.Hom.f I.ι (Nat.succ n✝))\n[PROOFSTEP]\nrw [ι_f_succ]\n[GOAL]\ncase succ\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroObject C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasEqualizers C\ninst✝ : HasImages C\nZ : C\nI : InjectiveResolution Z\nn✝ : ℕ\n⊢ Mono 0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : HasZeroObject C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nZ : C\ninst✝ : Injective Z\nn : ℕ\n⊢ Injective (HomologicalComplex.X ((CochainComplex.single₀ C).obj Z) n)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : HasZeroObject C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nZ : C\ninst✝ : Injective Z\n⊢ Injective (HomologicalComplex.X ((CochainComplex.single₀ C).obj Z) Nat.zero)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase zero\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : HasZeroObject C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nZ : C\ninst✝ : Injective Z\n⊢ Injective Z\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase succ\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : HasZeroObject C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nZ : C\ninst✝ : Injective Z\nn✝ : ℕ\n⊢ Injective (HomologicalComplex.X ((CochainComplex.single₀ C).obj Z) (Nat.succ n✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase succ\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : HasZeroObject C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nZ : C\ninst✝ : Injective Z\nn✝ : ℕ\n⊢ Injective 0\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : HasZeroObject C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nZ : C\ninst✝ : Injective Z\n⊢ Exact (HomologicalComplex.Hom.f (𝟙 ((CochainComplex.single₀ C).obj Z)) 0)\n    (HomologicalComplex.d ((CochainComplex.single₀ C).obj Z) 0 1)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : HasZeroObject C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nZ : C\ninst✝ : Injective Z\n⊢ Exact (𝟙 Z) 0\n[PROOFSTEP]\nexact exact_epi_zero _\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : HasZeroObject C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nZ : C\ninst✝ : Injective Z\nn : ℕ\n⊢ Exact (HomologicalComplex.d ((CochainComplex.single₀ C).obj Z) n (n + 1))\n    (HomologicalComplex.d ((CochainComplex.single₀ C).obj Z) (n + 1) (n + 2))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : HasZeroObject C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nZ : C\ninst✝ : Injective Z\nn : ℕ\n⊢ Exact 0 0\n[PROOFSTEP]\nexact exact_of_zero _ _\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : HasZeroObject C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nZ : C\ninst✝ : Injective Z\n⊢ Mono (HomologicalComplex.Hom.f (𝟙 ((CochainComplex.single₀ C).obj Z)) 0)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\ninst✝⁴ : HasZeroObject C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nZ : C\ninst✝ : Injective Z\n⊢ Mono (𝟙 Z)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Preadditive.InjectiveResolution", "llama_tokens": 2122, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6261241772283033, "lm_q2_score": 0.5621765008857981, "lm_q1q2_score": 0.3519922990742068}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Balanced C\nX✝ Y✝ : Cᵒᵖ\nf : X✝ ⟶ Y✝\nfmono : Mono f\nfepi : Epi f\n⊢ IsIso f\n[PROOFSTEP]\nrw [← Quiver.Hom.op_unop f]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Balanced C\nX✝ Y✝ : Cᵒᵖ\nf : X✝ ⟶ Y✝\nfmono : Mono f\nfepi : Epi f\n⊢ IsIso f.unop.op\n[PROOFSTEP]\nexact isIso_of_op _\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Balanced", "llama_tokens": 215, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.6477982315512489, "lm_q2_score": 0.5428632831725052, "lm_q1q2_score": 0.35166587481325373}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhst : s =ᵐ[μ] t\n⊢ ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in t, f x ∂μ\n[PROOFSTEP]\nrw [Measure.restrict_congr_set hst]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhst : AEDisjoint μ s t\nht : NullMeasurableSet t\nhfs : IntegrableOn f s\nhft : IntegrableOn f t\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ + ∫ (x : α) in t, f x ∂μ\n[PROOFSTEP]\nsimp only [IntegrableOn, Measure.restrict_union₀ hst ht, integral_add_measure hfs hft]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : MeasurableSet t\nhfs : IntegrableOn f s\nhts : t ⊆ s\n⊢ ∫ (x : α) in s \\ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ - ∫ (x : α) in t, f x ∂μ\n[PROOFSTEP]\nrw [eq_sub_iff_add_eq, ← integral_union, diff_union_of_subset hts]\n[GOAL]\ncase hst\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : MeasurableSet t\nhfs : IntegrableOn f s\nhts : t ⊆ s\n⊢ Disjoint (s \\ t) t\ncase ht\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : MeasurableSet t\nhfs : IntegrableOn f s\nhts : t ⊆ s\n⊢ MeasurableSet t\ncase hfs\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : MeasurableSet t\nhfs : IntegrableOn f s\nhts : t ⊆ s\n⊢ IntegrableOn (fun x => f x) (s \\ t)\ncase hft\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : MeasurableSet t\nhfs : IntegrableOn f s\nhts : t ⊆ s\n⊢ IntegrableOn (fun x => f x) t\n[PROOFSTEP]\nexacts [disjoint_sdiff_self_left, ht, hfs.mono_set (diff_subset _ _), hfs.mono_set hts]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhfs : IntegrableOn f s\n⊢ ∫ (x : α) in s ∩ t, f x ∂μ + ∫ (x : α) in s \\ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nrw [← Measure.restrict_inter_add_diff₀ s ht, integral_add_measure]\n[GOAL]\ncase hμ\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhfs : IntegrableOn f s\n⊢ Integrable fun x => f x\n[PROOFSTEP]\nexact Integrable.mono_measure hfs (Measure.restrict_mono (inter_subset_left _ _) le_rfl)\n[GOAL]\ncase hν\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhfs : IntegrableOn f s\n⊢ Integrable fun x => f x\n[PROOFSTEP]\nexact Integrable.mono_measure hfs (Measure.restrict_mono (diff_subset _ _) le_rfl)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t✝ : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nι : Type u_5\nt : Finset ι\ns : ι → Set α\nhs : ∀ (i : ι), i ∈ t → MeasurableSet (s i)\nh's : Set.Pairwise (↑t) (Disjoint on s)\nhf : ∀ (i : ι), i ∈ t → IntegrableOn f (s i)\n⊢ ∫ (x : α) in ⋃ (i : ι) (_ : i ∈ t), s i, f x ∂μ = ∑ i in t, ∫ (x : α) in s i, f x ∂μ\n[PROOFSTEP]\ninduction' t using Finset.induction_on with a t hat IH hs h's\n[GOAL]\ncase empty\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t✝ : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nι : Type u_5\nt : Finset ι\ns : ι → Set α\nhs✝ : ∀ (i : ι), i ∈ t → MeasurableSet (s i)\nh's✝ : Set.Pairwise (↑t) (Disjoint on s)\nhf✝ : ∀ (i : ι), i ∈ t → IntegrableOn f (s i)\nhs : ∀ (i : ι), i ∈ ∅ → MeasurableSet (s i)\nh's : Set.Pairwise (↑∅) (Disjoint on s)\nhf : ∀ (i : ι), i ∈ ∅ → IntegrableOn f (s i)\n⊢ ∫ (x : α) in ⋃ (i : ι) (_ : i ∈ ∅), s i, f x ∂μ = ∑ i in ∅, ∫ (x : α) in s i, f x ∂μ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t✝¹ : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nι : Type u_5\nt✝ : Finset ι\ns : ι → Set α\nhs✝ : ∀ (i : ι), i ∈ t✝ → MeasurableSet (s i)\nh's✝ : Set.Pairwise (↑t✝) (Disjoint on s)\nhf✝ : ∀ (i : ι), i ∈ t✝ → IntegrableOn f (s i)\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nIH :\n  (∀ (i : ι), i ∈ t → MeasurableSet (s i)) →\n    Set.Pairwise (↑t) (Disjoint on s) →\n      (∀ (i : ι), i ∈ t → IntegrableOn f (s i)) →\n        ∫ (x : α) in ⋃ (i : ι) (_ : i ∈ t), s i, f x ∂μ = ∑ i in t, ∫ (x : α) in s i, f x ∂μ\nhs : ∀ (i : ι), i ∈ insert a t → MeasurableSet (s i)\nh's : Set.Pairwise (↑(insert a t)) (Disjoint on s)\nhf : ∀ (i : ι), i ∈ insert a t → IntegrableOn f (s i)\n⊢ ∫ (x : α) in ⋃ (i : ι) (_ : i ∈ insert a t), s i, f x ∂μ = ∑ i in insert a t, ∫ (x : α) in s i, f x ∂μ\n[PROOFSTEP]\nsimp only [Finset.coe_insert, Finset.forall_mem_insert, Set.pairwise_insert, Finset.set_biUnion_insert] at hs hf h's ⊢\n[GOAL]\ncase insert\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t✝¹ : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nι : Type u_5\nt✝ : Finset ι\ns : ι → Set α\nhs✝ : ∀ (i : ι), i ∈ t✝ → MeasurableSet (s i)\nh's✝ : Set.Pairwise (↑t✝) (Disjoint on s)\nhf✝ : ∀ (i : ι), i ∈ t✝ → IntegrableOn f (s i)\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nIH :\n  (∀ (i : ι), i ∈ t → MeasurableSet (s i)) →\n    Set.Pairwise (↑t) (Disjoint on s) →\n      (∀ (i : ι), i ∈ t → IntegrableOn f (s i)) →\n        ∫ (x : α) in ⋃ (i : ι) (_ : i ∈ t), s i, f x ∂μ = ∑ i in t, ∫ (x : α) in s i, f x ∂μ\nhs : MeasurableSet (s a) ∧ ∀ (x : ι), x ∈ t → MeasurableSet (s x)\nhf : IntegrableOn f (s a) ∧ ∀ (x : ι), x ∈ t → IntegrableOn f (s x)\nh's : Set.Pairwise (↑t) (Disjoint on s) ∧ ∀ (b : ι), b ∈ ↑t → a ≠ b → (Disjoint on s) a b ∧ (Disjoint on s) b a\n⊢ ∫ (x : α) in s a ∪ ⋃ (x : ι) (_ : x ∈ t), s x, f x ∂μ = ∑ i in insert a t, ∫ (x : α) in s i, f x ∂μ\n[PROOFSTEP]\nrw [integral_union _ _ hf.1 (integrableOn_finset_iUnion.2 hf.2)]\n[GOAL]\ncase insert\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t✝¹ : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nι : Type u_5\nt✝ : Finset ι\ns : ι → Set α\nhs✝ : ∀ (i : ι), i ∈ t✝ → MeasurableSet (s i)\nh's✝ : Set.Pairwise (↑t✝) (Disjoint on s)\nhf✝ : ∀ (i : ι), i ∈ t✝ → IntegrableOn f (s i)\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nIH :\n  (∀ (i : ι), i ∈ t → MeasurableSet (s i)) →\n    Set.Pairwise (↑t) (Disjoint on s) →\n      (∀ (i : ι), i ∈ t → IntegrableOn f (s i)) →\n        ∫ (x : α) in ⋃ (i : ι) (_ : i ∈ t), s i, f x ∂μ = ∑ i in t, ∫ (x : α) in s i, f x ∂μ\nhs : MeasurableSet (s a) ∧ ∀ (x : ι), x ∈ t → MeasurableSet (s x)\nhf : IntegrableOn f (s a) ∧ ∀ (x : ι), x ∈ t → IntegrableOn f (s x)\nh's : Set.Pairwise (↑t) (Disjoint on s) ∧ ∀ (b : ι), b ∈ ↑t → a ≠ b → (Disjoint on s) a b ∧ (Disjoint on s) b a\n⊢ ∫ (x : α) in s a, f x ∂μ + ∫ (x : α) in ⋃ (i : ι) (_ : i ∈ t), s i, f x ∂μ =\n    ∑ i in insert a t, ∫ (x : α) in s i, f x ∂μ\n[PROOFSTEP]\nrw [Finset.sum_insert hat, IH hs.2 h's.1 hf.2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t✝¹ : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nι : Type u_5\nt✝ : Finset ι\ns : ι → Set α\nhs✝ : ∀ (i : ι), i ∈ t✝ → MeasurableSet (s i)\nh's✝ : Set.Pairwise (↑t✝) (Disjoint on s)\nhf✝ : ∀ (i : ι), i ∈ t✝ → IntegrableOn f (s i)\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nIH :\n  (∀ (i : ι), i ∈ t → MeasurableSet (s i)) →\n    Set.Pairwise (↑t) (Disjoint on s) →\n      (∀ (i : ι), i ∈ t → IntegrableOn f (s i)) →\n        ∫ (x : α) in ⋃ (i : ι) (_ : i ∈ t), s i, f x ∂μ = ∑ i in t, ∫ (x : α) in s i, f x ∂μ\nhs : MeasurableSet (s a) ∧ ∀ (x : ι), x ∈ t → MeasurableSet (s x)\nhf : IntegrableOn f (s a) ∧ ∀ (x : ι), x ∈ t → IntegrableOn f (s x)\nh's : Set.Pairwise (↑t) (Disjoint on s) ∧ ∀ (b : ι), b ∈ ↑t → a ≠ b → (Disjoint on s) a b ∧ (Disjoint on s) b a\n⊢ Disjoint (s a) (⋃ (i : ι) (_ : i ∈ t), s i)\n[PROOFSTEP]\nsimp only [disjoint_iUnion_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t✝¹ : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nι : Type u_5\nt✝ : Finset ι\ns : ι → Set α\nhs✝ : ∀ (i : ι), i ∈ t✝ → MeasurableSet (s i)\nh's✝ : Set.Pairwise (↑t✝) (Disjoint on s)\nhf✝ : ∀ (i : ι), i ∈ t✝ → IntegrableOn f (s i)\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nIH :\n  (∀ (i : ι), i ∈ t → MeasurableSet (s i)) →\n    Set.Pairwise (↑t) (Disjoint on s) →\n      (∀ (i : ι), i ∈ t → IntegrableOn f (s i)) →\n        ∫ (x : α) in ⋃ (i : ι) (_ : i ∈ t), s i, f x ∂μ = ∑ i in t, ∫ (x : α) in s i, f x ∂μ\nhs : MeasurableSet (s a) ∧ ∀ (x : ι), x ∈ t → MeasurableSet (s x)\nhf : IntegrableOn f (s a) ∧ ∀ (x : ι), x ∈ t → IntegrableOn f (s x)\nh's : Set.Pairwise (↑t) (Disjoint on s) ∧ ∀ (b : ι), b ∈ ↑t → a ≠ b → (Disjoint on s) a b ∧ (Disjoint on s) b a\n⊢ ∀ (i : ι), i ∈ t → Disjoint (s a) (s i)\n[PROOFSTEP]\nexact fun i hi => (h's.2 i hi (ne_of_mem_of_not_mem hi hat).symm).1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns✝ t✝¹ : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nι : Type u_5\nt✝ : Finset ι\ns : ι → Set α\nhs✝ : ∀ (i : ι), i ∈ t✝ → MeasurableSet (s i)\nh's✝ : Set.Pairwise (↑t✝) (Disjoint on s)\nhf✝ : ∀ (i : ι), i ∈ t✝ → IntegrableOn f (s i)\na : ι\nt : Finset ι\nhat : ¬a ∈ t\nIH :\n  (∀ (i : ι), i ∈ t → MeasurableSet (s i)) →\n    Set.Pairwise (↑t) (Disjoint on s) →\n      (∀ (i : ι), i ∈ t → IntegrableOn f (s i)) →\n        ∫ (x : α) in ⋃ (i : ι) (_ : i ∈ t), s i, f x ∂μ = ∑ i in t, ∫ (x : α) in s i, f x ∂μ\nhs : MeasurableSet (s a) ∧ ∀ (x : ι), x ∈ t → MeasurableSet (s x)\nhf : IntegrableOn f (s a) ∧ ∀ (x : ι), x ∈ t → IntegrableOn f (s x)\nh's : Set.Pairwise (↑t) (Disjoint on s) ∧ ∀ (b : ι), b ∈ ↑t → a ≠ b → (Disjoint on s) a b ∧ (Disjoint on s) b a\n⊢ MeasurableSet (⋃ (i : ι) (_ : i ∈ t), s i)\n[PROOFSTEP]\nexact Finset.measurableSet_biUnion _ hs.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\nι : Type u_5\ninst✝ : Fintype ι\ns : ι → Set α\nhs : ∀ (i : ι), MeasurableSet (s i)\nh's : Pairwise (Disjoint on s)\nhf : ∀ (i : ι), IntegrableOn f (s i)\n⊢ ∫ (x : α) in ⋃ (i : ι), s i, f x ∂μ = ∑ i : ι, ∫ (x : α) in s i, f x ∂μ\n[PROOFSTEP]\nconvert integral_finset_biUnion Finset.univ (fun i _ => hs i) _ fun i _ => hf i\n[GOAL]\ncase h.e'_2.h.e'_6.h.e'_4.h.e'_3.h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\nι : Type u_5\ninst✝ : Fintype ι\ns : ι → Set α\nhs : ∀ (i : ι), MeasurableSet (s i)\nh's : Pairwise (Disjoint on s)\nhf : ∀ (i : ι), IntegrableOn f (s i)\nx✝ : ι\n⊢ s x✝ = ⋃ (_ : x✝ ∈ Finset.univ), s x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\nι : Type u_5\ninst✝ : Fintype ι\ns : ι → Set α\nhs : ∀ (i : ι), MeasurableSet (s i)\nh's : Pairwise (Disjoint on s)\nhf : ∀ (i : ι), IntegrableOn f (s i)\n⊢ Set.Pairwise (↑Finset.univ) (Disjoint on fun i => s i)\n[PROOFSTEP]\nsimp [pairwise_univ, h's]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\n⊢ ∫ (x : α) in ∅, f x ∂μ = 0\n[PROOFSTEP]\nrw [Measure.restrict_empty, integral_zero_measure]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\n⊢ ∫ (x : α) in univ, f x ∂μ = ∫ (x : α), f x ∂μ\n[PROOFSTEP]\nrw [Measure.restrict_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhs : NullMeasurableSet s\nhfi : Integrable f\n⊢ ∫ (x : α) in s, f x ∂μ + ∫ (x : α) in sᶜ, f x ∂μ = ∫ (x : α), f x ∂μ\n[PROOFSTEP]\nrw [← integral_union_ae (@disjoint_compl_right (Set α) _ _).aedisjoint hs.compl hfi.integrableOn hfi.integrableOn,\n  union_compl_self, integral_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhs : MeasurableSet s\n⊢ ∫ (x : α), indicator s f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nby_cases hfi : IntegrableOn f s μ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhs : MeasurableSet s\nhfi : IntegrableOn f s\n⊢ ∫ (x : α), indicator s f x ∂μ = ∫ (x : α) in s, f x ∂μ\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhs : MeasurableSet s\nhfi : ¬IntegrableOn f s\n⊢ ∫ (x : α), indicator s f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhs : MeasurableSet s\nhfi : ¬IntegrableOn f s\n⊢ ∫ (x : α), indicator s f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nrwa [integral_undef, integral_undef]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhs : MeasurableSet s\nhfi : ¬IntegrableOn f s\n⊢ ¬Integrable fun x => indicator s f x\n[PROOFSTEP]\nrwa [integrable_indicator_iff hs]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhs : MeasurableSet s\nhfi : IntegrableOn f s\n⊢ ∫ (x : α), indicator s f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\ncalc\n  ∫ x, indicator s f x ∂μ = (∫ x in s, indicator s f x ∂μ) + ∫ x in sᶜ, indicator s f x ∂μ :=\n    (integral_add_compl hs (hfi.integrable_indicator hs)).symm\n  _ = (∫ x in s, f x ∂μ) + ∫ x in sᶜ, 0 ∂μ :=\n    (congr_arg₂ (· + ·) (integral_congr_ae (indicator_ae_eq_restrict hs))\n      (integral_congr_ae (indicator_ae_eq_restrict_compl hs)))\n  _ = ∫ x in s, f x ∂μ := by simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhs : MeasurableSet s\nhfi : IntegrableOn f s\n⊢ ∫ (x : α) in s, f x ∂μ + ∫ (x : α) in sᶜ, 0 ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : MeasurableSet t\n⊢ ∫ (x : α) in s, indicator t f x ∂μ = ∫ (x : α) in s ∩ t, f x ∂μ\n[PROOFSTEP]\nrw [integral_indicator ht, Measure.restrict_restrict ht, Set.inter_comm]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α✝\ninst✝¹ : NormedAddCommGroup E\nf g : α✝ → E\ns✝ t : Set α✝\nμ✝ ν : Measure α✝\nl l' : Filter α✝\ninst✝ : NormedSpace ℝ E\nα : Type u_5\nm : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : ↑↑μ s ≠ ⊤\n⊢ ENNReal.ofReal (∫ (x : α) in s, 1 ∂μ) = ENNReal.ofReal (∫ (x : α) in s, ‖1‖ ∂μ)\n[PROOFSTEP]\nsimp only [norm_one]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α✝\ninst✝¹ : NormedAddCommGroup E\nf g : α✝ → E\ns✝ t : Set α✝\nμ✝ ν : Measure α✝\nl l' : Filter α✝\ninst✝ : NormedSpace ℝ E\nα : Type u_5\nm : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : ↑↑μ s ≠ ⊤\n⊢ ENNReal.ofReal (∫ (x : α) in s, ‖1‖ ∂μ) = ∫⁻ (x : α) in s, 1 ∂μ\n[PROOFSTEP]\nrw [ofReal_integral_norm_eq_lintegral_nnnorm (integrableOn_const.2 (Or.inr hs.lt_top))]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α✝\ninst✝¹ : NormedAddCommGroup E\nf g : α✝ → E\ns✝ t : Set α✝\nμ✝ ν : Measure α✝\nl l' : Filter α✝\ninst✝ : NormedSpace ℝ E\nα : Type u_5\nm : MeasurableSpace α\nμ : Measure α\ns : Set α\nhs : ↑↑μ s ≠ ⊤\n⊢ ∫⁻ (x : α) in s, ↑‖1‖₊ ∂μ = ∫⁻ (x : α) in s, 1 ∂μ\n[PROOFSTEP]\nsimp only [nnnorm_one, ENNReal.coe_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : DecidablePred fun x => x ∈ s\nhs : MeasurableSet s\nhf : IntegrableOn f s\nhg : IntegrableOn g sᶜ\n⊢ ∫ (x : α), piecewise s f g x ∂μ = ∫ (x : α) in s, f x ∂μ + ∫ (x : α) in sᶜ, g x ∂μ\n[PROOFSTEP]\nrw [← Set.indicator_add_compl_eq_piecewise,\n  integral_add' (hf.integrable_indicator hs) (hg.integrable_indicator hs.compl), integral_indicator hs,\n  integral_indicator hs.compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nhfi : IntegrableOn f (⋃ (n : ι), s n)\n⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in ⋃ (n : ι), s n, f a ∂μ))\n[PROOFSTEP]\nhave hfi' : (∫⁻ x in ⋃ n, s n, ‖f x‖₊ ∂μ) < ∞ := hfi.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nhfi : IntegrableOn f (⋃ (n : ι), s n)\nhfi' : ∫⁻ (x : α) in ⋃ (n : ι), s n, ↑‖f x‖₊ ∂μ < ⊤\n⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in ⋃ (n : ι), s n, f a ∂μ))\n[PROOFSTEP]\nset S := ⋃ i, s i\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhfi' : ∫⁻ (x : α) in S, ↑‖f x‖₊ ∂μ < ⊤\n⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in S, f a ∂μ))\n[PROOFSTEP]\nhave hSm : MeasurableSet S := MeasurableSet.iUnion hsm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhfi' : ∫⁻ (x : α) in S, ↑‖f x‖₊ ∂μ < ⊤\nhSm : MeasurableSet S\n⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in S, f a ∂μ))\n[PROOFSTEP]\nhave hsub : ∀ {i}, s i ⊆ S := @(subset_iUnion s)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhfi' : ∫⁻ (x : α) in S, ↑‖f x‖₊ ∂μ < ⊤\nhSm : MeasurableSet S\nhsub : ∀ {i : ι}, s i ⊆ S\n⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in S, f a ∂μ))\n[PROOFSTEP]\nrw [← withDensity_apply _ hSm] at hfi' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhfi' : ↑↑(Measure.withDensity μ fun x => ↑‖f x‖₊) S < ⊤\nhSm : MeasurableSet S\nhsub : ∀ {i : ι}, s i ⊆ S\n⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in S, f a ∂μ))\n[PROOFSTEP]\nset ν := μ.withDensity fun x => ‖f x‖₊ with hν\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν✝ : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhSm : MeasurableSet S\nhsub : ∀ {i : ι}, s i ⊆ S\nν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊\nhfi' : ↑↑ν S < ⊤\nhν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊\n⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in S, f a ∂μ))\n[PROOFSTEP]\nrefine' Metric.nhds_basis_closedBall.tendsto_right_iff.2 fun ε ε0 => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν✝ : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhSm : MeasurableSet S\nhsub : ∀ {i : ι}, s i ⊆ S\nν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊\nhfi' : ↑↑ν S < ⊤\nhν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊\nε : ℝ\nε0 : 0 < ε\n⊢ ∀ᶠ (x : ι) in atTop, ∫ (a : α) in s x, f a ∂μ ∈ Metric.closedBall (∫ (a : α) in S, f a ∂μ) ε\n[PROOFSTEP]\nlift ε to ℝ≥0 using ε0.le\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν✝ : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhSm : MeasurableSet S\nhsub : ∀ {i : ι}, s i ⊆ S\nν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊\nhfi' : ↑↑ν S < ⊤\nhν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊\nε : ℝ≥0\nε0 : 0 < ↑ε\n⊢ ∀ᶠ (x : ι) in atTop, ∫ (a : α) in s x, f a ∂μ ∈ Metric.closedBall (∫ (a : α) in S, f a ∂μ) ↑ε\n[PROOFSTEP]\nhave : ∀ᶠ i in atTop, ν (s i) ∈ Icc (ν S - ε) (ν S + ε) :=\n  tendsto_measure_iUnion h_mono (ENNReal.Icc_mem_nhds hfi'.ne (ENNReal.coe_pos.2 ε0).ne')\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν✝ : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhSm : MeasurableSet S\nhsub : ∀ {i : ι}, s i ⊆ S\nν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊\nhfi' : ↑↑ν S < ⊤\nhν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊\nε : ℝ≥0\nε0 : 0 < ↑ε\nthis : ∀ᶠ (i : ι) in atTop, ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)\n⊢ ∀ᶠ (x : ι) in atTop, ∫ (a : α) in s x, f a ∂μ ∈ Metric.closedBall (∫ (a : α) in S, f a ∂μ) ↑ε\n[PROOFSTEP]\nrefine' this.mono fun i hi => _\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν✝ : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhSm : MeasurableSet S\nhsub : ∀ {i : ι}, s i ⊆ S\nν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊\nhfi' : ↑↑ν S < ⊤\nhν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊\nε : ℝ≥0\nε0 : 0 < ↑ε\nthis : ∀ᶠ (i : ι) in atTop, ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)\ni : ι\nhi : ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)\n⊢ ∫ (a : α) in s i, f a ∂μ ∈ Metric.closedBall (∫ (a : α) in S, f a ∂μ) ↑ε\n[PROOFSTEP]\nrw [mem_closedBall_iff_norm', ← integral_diff (hsm i) hfi hsub, ← coe_nnnorm, NNReal.coe_le_coe, ← ENNReal.coe_le_coe]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν✝ : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhSm : MeasurableSet S\nhsub : ∀ {i : ι}, s i ⊆ S\nν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊\nhfi' : ↑↑ν S < ⊤\nhν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊\nε : ℝ≥0\nε0 : 0 < ↑ε\nthis : ∀ᶠ (i : ι) in atTop, ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)\ni : ι\nhi : ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)\n⊢ ↑‖∫ (x : α) in S \\ s i, f x ∂μ‖₊ ≤ ↑ε\n[PROOFSTEP]\nrefine' (ennnorm_integral_le_lintegral_ennnorm _).trans _\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν✝ : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhSm : MeasurableSet S\nhsub : ∀ {i : ι}, s i ⊆ S\nν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊\nhfi' : ↑↑ν S < ⊤\nhν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊\nε : ℝ≥0\nε0 : 0 < ↑ε\nthis : ∀ᶠ (i : ι) in atTop, ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)\ni : ι\nhi : ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)\n⊢ ∫⁻ (a : α) in S \\ s i, ↑‖f a‖₊ ∂μ ≤ ↑ε\n[PROOFSTEP]\nrw [← withDensity_apply _ (hSm.diff (hsm _)), ← hν, measure_diff hsub (hsm _)]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν✝ : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhSm : MeasurableSet S\nhsub : ∀ {i : ι}, s i ⊆ S\nν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊\nhfi' : ↑↑ν S < ⊤\nhν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊\nε : ℝ≥0\nε0 : 0 < ↑ε\nthis : ∀ᶠ (i : ι) in atTop, ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)\ni : ι\nhi : ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)\n⊢ ↑↑ν S - ↑↑ν (s i) ≤ ↑ε\ncase intro\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν✝ : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\nι : Type u_5\ninst✝¹ : Countable ι\ninst✝ : SemilatticeSup ι\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nh_mono : Monotone s\nS : Set α := ⋃ (i : ι), s i\nhfi : IntegrableOn f S\nhSm : MeasurableSet S\nhsub : ∀ {i : ι}, s i ⊆ S\nν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊\nhfi' : ↑↑ν S < ⊤\nhν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊\nε : ℝ≥0\nε0 : 0 < ↑ε\nthis : ∀ᶠ (i : ι) in atTop, ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)\ni : ι\nhi : ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)\n⊢ ↑↑ν (s i) ≠ ⊤\n[PROOFSTEP]\nexacts [tsub_le_iff_tsub_le.mp hi.1, (hi.2.trans_lt <| ENNReal.add_lt_top.2 ⟨hfi', ENNReal.coe_lt_top⟩).ne]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\nι : Type u_5\ninst✝ : Countable ι\ns : ι → Set α\nhm : ∀ (i : ι), NullMeasurableSet (s i)\nhd : Pairwise (AEDisjoint μ on s)\nhfi : IntegrableOn f (⋃ (i : ι), s i)\n⊢ HasSum (fun n => ∫ (a : α) in s n, f a ∂μ) (∫ (a : α) in ⋃ (n : ι), s n, f a ∂μ)\n[PROOFSTEP]\nsimp only [IntegrableOn, Measure.restrict_iUnion_ae hd hm] at hfi ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\nι : Type u_5\ninst✝ : Countable ι\ns : ι → Set α\nhm : ∀ (i : ι), NullMeasurableSet (s i)\nhd : Pairwise (AEDisjoint μ on s)\nhfi : Integrable f\n⊢ HasSum (fun n => ∫ (a : α) in s n, f a ∂μ) (∫ (a : α), f a ∂Measure.sum fun i => Measure.restrict μ (s i))\n[PROOFSTEP]\nexact hasSum_integral_measure hfi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\n⊢ ∫ (x : α) in t, f x ∂μ = 0\n[PROOFSTEP]\nby_cases hf : AEStronglyMeasurable f (μ.restrict t)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : AEStronglyMeasurable f (Measure.restrict μ t)\n⊢ ∫ (x : α) in t, f x ∂μ = 0\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : ¬AEStronglyMeasurable f (Measure.restrict μ t)\n⊢ ∫ (x : α) in t, f x ∂μ = 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : ¬AEStronglyMeasurable f (Measure.restrict μ t)\n⊢ ∫ (x : α) in t, f x ∂μ = 0\n[PROOFSTEP]\nrw [integral_undef]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : ¬AEStronglyMeasurable f (Measure.restrict μ t)\n⊢ ¬Integrable fun x => f x\n[PROOFSTEP]\ncontrapose! hf\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : Integrable fun x => f x\n⊢ AEStronglyMeasurable f (Measure.restrict μ t)\n[PROOFSTEP]\nexact hf.1\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : AEStronglyMeasurable f (Measure.restrict μ t)\n⊢ ∫ (x : α) in t, f x ∂μ = 0\n[PROOFSTEP]\nhave : ∫ x in t, hf.mk f x ∂μ = 0 := by\n  refine' integral_eq_zero_of_ae _\n  rw [EventuallyEq, ae_restrict_iff (hf.stronglyMeasurable_mk.measurableSet_eq_fun stronglyMeasurable_zero)]\n  filter_upwards [ae_imp_of_ae_restrict hf.ae_eq_mk, ht_eq] with x hx h'x h''x\n  rw [← hx h''x]\n  exact h'x h''x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : AEStronglyMeasurable f (Measure.restrict μ t)\n⊢ ∫ (x : α) in t, AEStronglyMeasurable.mk f hf x ∂μ = 0\n[PROOFSTEP]\nrefine' integral_eq_zero_of_ae _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : AEStronglyMeasurable f (Measure.restrict μ t)\n⊢ (fun x => AEStronglyMeasurable.mk f hf x) =ᵐ[Measure.restrict μ t] 0\n[PROOFSTEP]\nrw [EventuallyEq, ae_restrict_iff (hf.stronglyMeasurable_mk.measurableSet_eq_fun stronglyMeasurable_zero)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : AEStronglyMeasurable f (Measure.restrict μ t)\n⊢ ∀ᵐ (x : α) ∂μ, x ∈ t → AEStronglyMeasurable.mk f hf x = OfNat.ofNat 0 x\n[PROOFSTEP]\nfilter_upwards [ae_imp_of_ae_restrict hf.ae_eq_mk, ht_eq] with x hx h'x h''x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : AEStronglyMeasurable f (Measure.restrict μ t)\nx : α\nhx : x ∈ t → f x = AEStronglyMeasurable.mk f hf x\nh'x : x ∈ t → f x = 0\nh''x : x ∈ t\n⊢ AEStronglyMeasurable.mk f hf x = OfNat.ofNat 0 x\n[PROOFSTEP]\nrw [← hx h''x]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : AEStronglyMeasurable f (Measure.restrict μ t)\nx : α\nhx : x ∈ t → f x = AEStronglyMeasurable.mk f hf x\nh'x : x ∈ t → f x = 0\nh''x : x ∈ t\n⊢ f x = OfNat.ofNat 0 x\n[PROOFSTEP]\nexact h'x h''x\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : AEStronglyMeasurable f (Measure.restrict μ t)\nthis : ∫ (x : α) in t, AEStronglyMeasurable.mk f hf x ∂μ = 0\n⊢ ∫ (x : α) in t, f x ∂μ = 0\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂μ, x ∈ t → f x = 0\nhf : AEStronglyMeasurable f (Measure.restrict μ t)\nthis : ∫ (x : α) in t, AEStronglyMeasurable.mk f hf x ∂μ = 0\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in t, AEStronglyMeasurable.mk f hf x ∂μ\n[PROOFSTEP]\nexact integral_congr_ae hf.ae_eq_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nhaux : StronglyMeasurable f\nH : IntegrableOn f (s ∪ t)\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nlet k := f ⁻¹' {0}\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nhaux : StronglyMeasurable f\nH : IntegrableOn f (s ∪ t)\nk : Set α := f ⁻¹' {0}\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nhave hk : MeasurableSet k := by borelize E; exact haux.measurable (measurableSet_singleton _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nhaux : StronglyMeasurable f\nH : IntegrableOn f (s ∪ t)\nk : Set α := f ⁻¹' {0}\n⊢ MeasurableSet k\n[PROOFSTEP]\nborelize E\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nhaux : StronglyMeasurable f\nH : IntegrableOn f (s ∪ t)\nk : Set α := f ⁻¹' {0}\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ MeasurableSet k\n[PROOFSTEP]\nexact haux.measurable (measurableSet_singleton _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nhaux : StronglyMeasurable f\nH : IntegrableOn f (s ∪ t)\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nhave h's : IntegrableOn f s μ := H.mono (subset_union_left _ _) le_rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nhaux : StronglyMeasurable f\nH : IntegrableOn f (s ∪ t)\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nh's : IntegrableOn f s\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nhave A : ∀ u : Set α, ∫ x in u ∩ k, f x ∂μ = 0 := fun u => set_integral_eq_zero_of_forall_eq_zero fun x hx => hx.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nhaux : StronglyMeasurable f\nH : IntegrableOn f (s ∪ t)\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nh's : IntegrableOn f s\nA : ∀ (u : Set α), ∫ (x : α) in u ∩ k, f x ∂μ = 0\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nrw [← integral_inter_add_diff hk h's, ← integral_inter_add_diff hk H, A, A, zero_add, zero_add, union_diff_distrib,\n  union_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nhaux : StronglyMeasurable f\nH : IntegrableOn f (s ∪ t)\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nh's : IntegrableOn f s\nA : ∀ (u : Set α), ∫ (x : α) in u ∩ k, f x ∂μ = 0\n⊢ ∫ (x : α) in t \\ k ∪ s \\ k, f x ∂μ = ∫ (x : α) in s \\ k, f x ∂μ\n[PROOFSTEP]\napply set_integral_congr_set_ae\n[GOAL]\ncase hst\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nhaux : StronglyMeasurable f\nH : IntegrableOn f (s ∪ t)\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nh's : IntegrableOn f s\nA : ∀ (u : Set α), ∫ (x : α) in u ∩ k, f x ∂μ = 0\n⊢ t \\ k ∪ s \\ k =ᵐ[μ] s \\ k\n[PROOFSTEP]\nrw [union_ae_eq_right]\n[GOAL]\ncase hst\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nhaux : StronglyMeasurable f\nH : IntegrableOn f (s ∪ t)\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nh's : IntegrableOn f s\nA : ∀ (u : Set α), ∫ (x : α) in u ∩ k, f x ∂μ = 0\n⊢ ↑↑μ ((t \\ k) \\ (s \\ k)) = 0\n[PROOFSTEP]\napply measure_mono_null (diff_subset _ _)\n[GOAL]\ncase hst\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nhaux : StronglyMeasurable f\nH : IntegrableOn f (s ∪ t)\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nh's : IntegrableOn f s\nA : ∀ (u : Set α), ∫ (x : α) in u ∩ k, f x ∂μ = 0\n⊢ ↑↑μ (t \\ k) = 0\n[PROOFSTEP]\nrw [measure_zero_iff_ae_nmem]\n[GOAL]\ncase hst\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nhaux : StronglyMeasurable f\nH : IntegrableOn f (s ∪ t)\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nh's : IntegrableOn f s\nA : ∀ (u : Set α), ∫ (x : α) in u ∩ k, f x ∂μ = 0\n⊢ ∀ᵐ (a : α) ∂μ, ¬a ∈ t \\ k\n[PROOFSTEP]\nfilter_upwards [ae_imp_of_ae_restrict ht_eq] with x hx h'x using h'x.2 (hx h'x.1)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nhave ht : IntegrableOn f t μ := by apply integrableOn_zero.congr_fun_ae; symm; exact ht_eq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\n⊢ IntegrableOn f t\n[PROOFSTEP]\napply integrableOn_zero.congr_fun_ae\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\n⊢ (fun x => 0) =ᵐ[Measure.restrict μ t] f\n[PROOFSTEP]\nsymm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\n⊢ f =ᵐ[Measure.restrict μ t] fun x => 0\n[PROOFSTEP]\nexact ht_eq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nht : IntegrableOn f t\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nby_cases H : IntegrableOn f (s ∪ t) μ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nht : IntegrableOn f t\nH : IntegrableOn f (s ∪ t)\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nht : IntegrableOn f t\nH : ¬IntegrableOn f (s ∪ t)\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nht : IntegrableOn f t\nH : ¬IntegrableOn f (s ∪ t)\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nrw [integral_undef H, integral_undef]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nht : IntegrableOn f t\nH : ¬IntegrableOn f (s ∪ t)\n⊢ ¬Integrable fun x => f x\n[PROOFSTEP]\nsimpa [integrableOn_union, ht] using H\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nht : IntegrableOn f t\nH : IntegrableOn f (s ∪ t)\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nlet f' := H.1.mk f\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nht : IntegrableOn f t\nH : IntegrableOn f (s ∪ t)\nf' : α → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ (s ∪ t)))\n⊢ ∫ (x : α) in s ∪ t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\ncalc\n  ∫ x : α in s ∪ t, f x ∂μ = ∫ x : α in s ∪ t, f' x ∂μ := integral_congr_ae H.1.ae_eq_mk\n  _ = ∫ x in s, f' x ∂μ :=\n    by\n    apply integral_union_eq_left_of_ae_aux _ H.1.stronglyMeasurable_mk (H.congr_fun_ae H.1.ae_eq_mk)\n    filter_upwards [ht_eq, ae_mono (Measure.restrict_mono (subset_union_right s t) le_rfl) H.1.ae_eq_mk] with x hx h'x\n    rw [← h'x, hx]\n  _ = ∫ x in s, f x ∂μ :=\n    integral_congr_ae (ae_mono (Measure.restrict_mono (subset_union_left s t) le_rfl) H.1.ae_eq_mk.symm)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nht : IntegrableOn f t\nH : IntegrableOn f (s ∪ t)\nf' : α → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ (s ∪ t)))\n⊢ ∫ (x : α) in s ∪ t, f' x ∂μ = ∫ (x : α) in s, f' x ∂μ\n[PROOFSTEP]\napply integral_union_eq_left_of_ae_aux _ H.1.stronglyMeasurable_mk (H.congr_fun_ae H.1.ae_eq_mk)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nht : IntegrableOn f t\nH : IntegrableOn f (s ∪ t)\nf' : α → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ (s ∪ t)))\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ t,\n    AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ (s ∪ t))) x = 0\n[PROOFSTEP]\nfilter_upwards [ht_eq, ae_mono (Measure.restrict_mono (subset_union_right s t) le_rfl) H.1.ae_eq_mk] with x hx h'x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht_eq : ∀ᵐ (x : α) ∂Measure.restrict μ t, f x = 0\nht : IntegrableOn f t\nH : IntegrableOn f (s ∪ t)\nf' : α → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ (s ∪ t)))\nx : α\nhx : f x = 0\nh'x : f x = AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ (s ∪ t))) x\n⊢ AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ (s ∪ t))) x = 0\n[PROOFSTEP]\nrw [← h'x, hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nlet k := f ⁻¹' {0}\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nhave hk : MeasurableSet k := by borelize E; exact haux.measurable (measurableSet_singleton _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\n⊢ MeasurableSet k\n[PROOFSTEP]\nborelize E\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ MeasurableSet k\n[PROOFSTEP]\nexact haux.measurable (measurableSet_singleton _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\ncalc\n  ∫ x in t, f x ∂μ = (∫ x in t ∩ k, f x ∂μ) + ∫ x in t \\ k, f x ∂μ := by rw [integral_inter_add_diff hk h'aux]\n  _ = ∫ x in t \\ k, f x ∂μ := by rw [set_integral_eq_zero_of_forall_eq_zero fun x hx => ?_, zero_add]; exact hx.2\n  _ = ∫ x in s \\ k, f x ∂μ := by\n    apply set_integral_congr_set_ae\n    filter_upwards [h't] with x hx\n    change (x ∈ t \\ k) = (x ∈ s \\ k)\n    simp only [mem_preimage, mem_singleton_iff, eq_iff_iff, and_congr_left_iff, mem_diff]\n    intro h'x\n    by_cases xs : x ∈ s\n    · simp only [xs, hts xs]\n    · simp only [xs, iff_false_iff]\n      intro xt\n      exact h'x (hx ⟨xt, xs⟩)\n  _ = (∫ x in s ∩ k, f x ∂μ) + ∫ x in s \\ k, f x ∂μ :=\n    by\n    have : ∀ x ∈ s ∩ k, f x = 0 := fun x hx => hx.2\n    rw [set_integral_eq_zero_of_forall_eq_zero this, zero_add]\n  _ = ∫ x in s, f x ∂μ := by rw [integral_inter_add_diff hk (h'aux.mono hts le_rfl)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in t ∩ k, f x ∂μ + ∫ (x : α) in t \\ k, f x ∂μ\n[PROOFSTEP]\nrw [integral_inter_add_diff hk h'aux]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\n⊢ ∫ (x : α) in t ∩ k, f x ∂μ + ∫ (x : α) in t \\ k, f x ∂μ = ∫ (x : α) in t \\ k, f x ∂μ\n[PROOFSTEP]\nrw [set_integral_eq_zero_of_forall_eq_zero fun x hx => ?_, zero_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nx : α\nhx : x ∈ t ∩ k\n⊢ f x = 0\n[PROOFSTEP]\nexact hx.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\n⊢ ∫ (x : α) in t \\ k, f x ∂μ = ∫ (x : α) in s \\ k, f x ∂μ\n[PROOFSTEP]\napply set_integral_congr_set_ae\n[GOAL]\ncase hst\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\n⊢ t \\ k =ᵐ[μ] s \\ k\n[PROOFSTEP]\nfilter_upwards [h't] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nx : α\nhx : x ∈ t \\ s → f x = 0\n⊢ (t \\ f ⁻¹' {0}) x = (s \\ f ⁻¹' {0}) x\n[PROOFSTEP]\nchange (x ∈ t \\ k) = (x ∈ s \\ k)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nx : α\nhx : x ∈ t \\ s → f x = 0\n⊢ (x ∈ t \\ k) = (x ∈ s \\ k)\n[PROOFSTEP]\nsimp only [mem_preimage, mem_singleton_iff, eq_iff_iff, and_congr_left_iff, mem_diff]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nx : α\nhx : x ∈ t \\ s → f x = 0\n⊢ ¬f x = 0 → (x ∈ t ↔ x ∈ s)\n[PROOFSTEP]\nintro h'x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nx : α\nhx : x ∈ t \\ s → f x = 0\nh'x : ¬f x = 0\n⊢ x ∈ t ↔ x ∈ s\n[PROOFSTEP]\nby_cases xs : x ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nx : α\nhx : x ∈ t \\ s → f x = 0\nh'x : ¬f x = 0\nxs : x ∈ s\n⊢ x ∈ t ↔ x ∈ s\n[PROOFSTEP]\nsimp only [xs, hts xs]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nx : α\nhx : x ∈ t \\ s → f x = 0\nh'x : ¬f x = 0\nxs : ¬x ∈ s\n⊢ x ∈ t ↔ x ∈ s\n[PROOFSTEP]\nsimp only [xs, iff_false_iff]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nx : α\nhx : x ∈ t \\ s → f x = 0\nh'x : ¬f x = 0\nxs : ¬x ∈ s\n⊢ ¬x ∈ t\n[PROOFSTEP]\nintro xt\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nx : α\nhx : x ∈ t \\ s → f x = 0\nh'x : ¬f x = 0\nxs : ¬x ∈ s\nxt : x ∈ t\n⊢ False\n[PROOFSTEP]\nexact h'x (hx ⟨xt, xs⟩)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\n⊢ ∫ (x : α) in s \\ k, f x ∂μ = ∫ (x : α) in s ∩ k, f x ∂μ + ∫ (x : α) in s \\ k, f x ∂μ\n[PROOFSTEP]\nhave : ∀ x ∈ s ∩ k, f x = 0 := fun x hx => hx.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\nthis : ∀ (x : α), x ∈ s ∩ k → f x = 0\n⊢ ∫ (x : α) in s \\ k, f x ∂μ = ∫ (x : α) in s ∩ k, f x ∂μ + ∫ (x : α) in s \\ k, f x ∂μ\n[PROOFSTEP]\nrw [set_integral_eq_zero_of_forall_eq_zero this, zero_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nhaux : StronglyMeasurable f\nh'aux : IntegrableOn f t\nk : Set α := f ⁻¹' {0}\nhk : MeasurableSet k\n⊢ ∫ (x : α) in s ∩ k, f x ∂μ + ∫ (x : α) in s \\ k, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nrw [integral_inter_add_diff hk (h'aux.mono hts le_rfl)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nby_cases h : IntegrableOn f t μ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nh : IntegrableOn f t\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nh : ¬IntegrableOn f t\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nh : ¬IntegrableOn f t\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nhave : ¬IntegrableOn f s μ := fun H => h (H.of_ae_diff_eq_zero ht h't)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nh : ¬IntegrableOn f t\nthis : ¬IntegrableOn f s\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nrw [integral_undef h, integral_undef this]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nh : IntegrableOn f t\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nlet f' := h.1.mk f\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nh : IntegrableOn f t\nf' : α → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ t))\n⊢ ∫ (x : α) in t, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\ncalc\n  ∫ x in t, f x ∂μ = ∫ x in t, f' x ∂μ := integral_congr_ae h.1.ae_eq_mk\n  _ = ∫ x in s, f' x ∂μ :=\n    by\n    apply set_integral_eq_of_subset_of_ae_diff_eq_zero_aux hts _ h.1.stronglyMeasurable_mk (h.congr h.1.ae_eq_mk)\n    filter_upwards [h't, ae_imp_of_ae_restrict h.1.ae_eq_mk] with x hx h'x h''x\n    rw [← h'x h''x.1, hx h''x]\n  _ = ∫ x in s, f x ∂μ := by\n    apply integral_congr_ae\n    apply ae_restrict_of_ae_restrict_of_subset hts\n    exact h.1.ae_eq_mk.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nh : IntegrableOn f t\nf' : α → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ t))\n⊢ ∫ (x : α) in t, f' x ∂μ = ∫ (x : α) in s, f' x ∂μ\n[PROOFSTEP]\napply set_integral_eq_of_subset_of_ae_diff_eq_zero_aux hts _ h.1.stronglyMeasurable_mk (h.congr h.1.ae_eq_mk)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nh : IntegrableOn f t\nf' : α → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ t))\n⊢ ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ t)) x = 0\n[PROOFSTEP]\nfilter_upwards [h't, ae_imp_of_ae_restrict h.1.ae_eq_mk] with x hx h'x h''x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nh : IntegrableOn f t\nf' : α → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ t))\nx : α\nhx : x ∈ t \\ s → f x = 0\nh'x : x ∈ t → f x = AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ t)) x\nh''x : x ∈ t \\ s\n⊢ AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ t)) x = 0\n[PROOFSTEP]\nrw [← h'x h''x.1, hx h''x]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nh : IntegrableOn f t\nf' : α → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ t))\n⊢ ∫ (x : α) in s, f' x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\napply integral_congr_ae\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nh : IntegrableOn f t\nf' : α → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ t))\n⊢ (fun a => f' a) =ᵐ[Measure.restrict μ s] fun a => f a\n[PROOFSTEP]\napply ae_restrict_of_ae_restrict_of_subset hts\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nht : NullMeasurableSet t\nhts : s ⊆ t\nh't : ∀ᵐ (x : α) ∂μ, x ∈ t \\ s → f x = 0\nh : IntegrableOn f t\nf' : α → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f (Measure.restrict μ t))\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ t, (fun a => f' a) x = (fun a => f a) x\n[PROOFSTEP]\nexact h.1.ae_eq_mk.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nh : ∀ᵐ (x : α) ∂μ, ¬x ∈ s → f x = 0\n⊢ ∫ (x : α) in s, f x ∂μ = ∫ (x : α), f x ∂μ\n[PROOFSTEP]\nsymm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nh : ∀ᵐ (x : α) ∂μ, ¬x ∈ s → f x = 0\n⊢ ∫ (x : α), f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nnth_rw 1 [← integral_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nh : ∀ᵐ (x : α) ∂μ, ¬x ∈ s → f x = 0\n⊢ ∫ (x : α) in univ, f x ∂μ = ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\napply set_integral_eq_of_subset_of_ae_diff_eq_zero nullMeasurableSet_univ (subset_univ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nh : ∀ᵐ (x : α) ∂μ, ¬x ∈ s → f x = 0\n⊢ ∀ᵐ (x : α) ∂μ, x ∈ univ \\ s → f x = 0\n[PROOFSTEP]\nfilter_upwards [h] with x hx h'x using hx h'x.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : LinearOrder E\nf : α → E\nhf : AEStronglyMeasurable f μ\n⊢ ∫ (x : α) in {x | f x < 0}, f x ∂μ = ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ\n[PROOFSTEP]\nhave h_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0} := by ext; simp_rw [Set.mem_union, Set.mem_setOf_eq];\n  exact le_iff_lt_or_eq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : LinearOrder E\nf : α → E\nhf : AEStronglyMeasurable f μ\n⊢ {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : LinearOrder E\nf : α → E\nhf : AEStronglyMeasurable f μ\nx✝ : α\n⊢ x✝ ∈ {x | f x ≤ 0} ↔ x✝ ∈ {x | f x < 0} ∪ {x | f x = 0}\n[PROOFSTEP]\nsimp_rw [Set.mem_union, Set.mem_setOf_eq]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : LinearOrder E\nf : α → E\nhf : AEStronglyMeasurable f μ\nx✝ : α\n⊢ f x✝ ≤ 0 ↔ f x✝ < 0 ∨ f x✝ = 0\n[PROOFSTEP]\nexact le_iff_lt_or_eq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : LinearOrder E\nf : α → E\nhf : AEStronglyMeasurable f μ\nh_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}\n⊢ ∫ (x : α) in {x | f x < 0}, f x ∂μ = ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ\n[PROOFSTEP]\nrw [h_union]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : LinearOrder E\nf : α → E\nhf : AEStronglyMeasurable f μ\nh_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}\n⊢ ∫ (x : α) in {x | f x < 0}, f x ∂μ = ∫ (x : α) in {x | f x < 0} ∪ {x | f x = 0}, f x ∂μ\n[PROOFSTEP]\nhave B : NullMeasurableSet {x | f x = 0} μ := hf.nullMeasurableSet_eq_fun aestronglyMeasurable_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : LinearOrder E\nf : α → E\nhf : AEStronglyMeasurable f μ\nh_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}\nB : NullMeasurableSet {x | f x = 0}\n⊢ ∫ (x : α) in {x | f x < 0}, f x ∂μ = ∫ (x : α) in {x | f x < 0} ∪ {x | f x = 0}, f x ∂μ\n[PROOFSTEP]\nsymm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : LinearOrder E\nf : α → E\nhf : AEStronglyMeasurable f μ\nh_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}\nB : NullMeasurableSet {x | f x = 0}\n⊢ ∫ (x : α) in {x | f x < 0} ∪ {x | f x = 0}, f x ∂μ = ∫ (x : α) in {x | f x < 0}, f x ∂μ\n[PROOFSTEP]\nrefine' integral_union_eq_left_of_ae _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : LinearOrder E\nf : α → E\nhf : AEStronglyMeasurable f μ\nh_union : {x | f x ≤ 0} = {x | f x < 0} ∪ {x | f x = 0}\nB : NullMeasurableSet {x | f x = 0}\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ {x | f x = 0}, f x = 0\n[PROOFSTEP]\nfilter_upwards [ae_restrict_mem₀ B] with x hx using hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\n⊢ ∫ (x : α), ‖f x‖ ∂μ = ∫ (x : α) in {x | 0 ≤ f x}, ‖f x‖ ∂μ + ∫ (x : α) in {x | 0 ≤ f x}ᶜ, ‖f x‖ ∂μ\n[PROOFSTEP]\nrw [← integral_add_compl₀ h_meas hfi.norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\n⊢ ∫ (x : α) in {x | 0 ≤ f x}, ‖f x‖ ∂μ + ∫ (x : α) in {x | 0 ≤ f x}ᶜ, ‖f x‖ ∂μ =\n    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ + ∫ (x : α) in {x | 0 ≤ f x}ᶜ, ‖f x‖ ∂μ\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\n⊢ ∫ (x : α) in {x | 0 ≤ f x}, ‖f x‖ ∂μ = ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ\n[PROOFSTEP]\nrefine' set_integral_congr₀ h_meas fun x hx => _\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\nx : α\nhx : x ∈ {x | 0 ≤ f x}\n⊢ ‖f x‖ = f x\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\nx : α\nhx : x ∈ {x | 0 ≤ f x}\n⊢ ‖f x‖ = f x\n[PROOFSTEP]\nrw [Real.norm_eq_abs, abs_eq_self.mpr _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\nx : α\nhx : x ∈ {x | 0 ≤ f x}\n⊢ 0 ≤ f x\n[PROOFSTEP]\nexact hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\n⊢ ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ + ∫ (x : α) in {x | 0 ≤ f x}ᶜ, ‖f x‖ ∂μ =\n    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ - ∫ (x : α) in {x | 0 ≤ f x}ᶜ, f x ∂μ\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\n⊢ ∫ (x : α) in {x | 0 ≤ f x}ᶜ, ‖f x‖ ∂μ = -∫ (x : α) in {x | 0 ≤ f x}ᶜ, f x ∂μ\n[PROOFSTEP]\nrw [← integral_neg]\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\n⊢ ∫ (x : α) in {x | 0 ≤ f x}ᶜ, ‖f x‖ ∂μ = ∫ (a : α) in {x | 0 ≤ f x}ᶜ, -f a ∂μ\n[PROOFSTEP]\nrefine' set_integral_congr₀ h_meas.compl fun x hx => _\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\nx : α\nhx : x ∈ {x | 0 ≤ f x}ᶜ\n⊢ ‖f x‖ = -f x\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\nx : α\nhx : x ∈ {x | 0 ≤ f x}ᶜ\n⊢ ‖f x‖ = -f x\n[PROOFSTEP]\nrw [Real.norm_eq_abs, abs_eq_neg_self.mpr _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\nx : α\nhx : x ∈ {x | 0 ≤ f x}ᶜ\n⊢ f x ≤ 0\n[PROOFSTEP]\nrw [Set.mem_compl_iff, Set.nmem_setOf_iff] at hx \n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\nx : α\nhx : ¬0 ≤ f x\n⊢ f x ≤ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\n⊢ ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ - ∫ (x : α) in {x | 0 ≤ f x}ᶜ, f x ∂μ =\n    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ - ∫ (x : α) in {x | f x ≤ 0}, f x ∂μ\n[PROOFSTEP]\nrw [← set_integral_neg_eq_set_integral_nonpos hfi.1]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\n⊢ ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ - ∫ (x : α) in {x | 0 ≤ f x}ᶜ, f x ∂μ =\n    ∫ (x : α) in {x | 0 ≤ f x}, f x ∂μ - ∫ (x : α) in {x | f x < 0}, f x ∂μ\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_μ.e_s\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\n⊢ {x | 0 ≤ f x}ᶜ = {x | f x < 0}\n[PROOFSTEP]\next1 x\n[GOAL]\ncase e_a.e_μ.e_s.h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhfi : Integrable f\nh_meas : NullMeasurableSet {x | 0 ≤ f x}\nx : α\n⊢ x ∈ {x | 0 ≤ f x}ᶜ ↔ x ∈ {x | f x < 0}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nc : E\n⊢ ∫ (x : α) in s, c ∂μ = ENNReal.toReal (↑↑μ s) • c\n[PROOFSTEP]\nrw [integral_const, Measure.restrict_apply_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf g : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\ne : E\ns : Set α\ns_meas : MeasurableSet s\n⊢ ∫ (a : α), indicator s (fun x => e) a ∂μ = ENNReal.toReal (↑↑μ s) • e\n[PROOFSTEP]\nrw [integral_indicator s_meas, ← set_integral_const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\np : ℝ≥0∞\nhs : MeasurableSet s\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nx : E\n⊢ ∫ (a : α) in s, ↑↑(indicatorConstLp p ht hμt x) a ∂μ = ∫ (a : α) in s, indicator t (fun x_1 => x) a ∂μ\n[PROOFSTEP]\nrw [set_integral_congr_ae hs (indicatorConstLp_coeFn.mono fun x hx _ => hx)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\np : ℝ≥0∞\nhs : MeasurableSet s\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nx : E\n⊢ ∫ (a : α) in s, indicator t (fun x_1 => x) a ∂μ = ENNReal.toReal (↑↑μ (t ∩ s)) • x\n[PROOFSTEP]\nrw [integral_indicator_const _ ht, Measure.restrict_apply ht]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\np : ℝ≥0∞\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nx : E\n⊢ ∫ (a : α), ↑↑(indicatorConstLp p ht hμt x) a ∂μ = ∫ (a : α) in univ, ↑↑(indicatorConstLp p ht hμt x) a ∂μ\n[PROOFSTEP]\nrw [integral_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\np : ℝ≥0∞\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nx : E\n⊢ ENNReal.toReal (↑↑μ (t ∩ univ)) • x = ENNReal.toReal (↑↑μ t) • x\n[PROOFSTEP]\nrw [inter_univ]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf✝ g✝ : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\nβ : Type u_5\ninst✝ : MeasurableSpace β\ng : α → β\nf : β → E\ns : Set β\nhs : MeasurableSet s\nhf : AEStronglyMeasurable f (Measure.map g μ)\nhg : AEMeasurable g\n⊢ ∫ (y : β) in s, f y ∂Measure.map g μ = ∫ (x : α) in g ⁻¹' s, f (g x) ∂μ\n[PROOFSTEP]\nrw [Measure.restrict_map_of_aemeasurable hg hs,\n  integral_map (hg.mono_measure Measure.restrict_le_self) (hf.mono_measure _)]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\nf✝ g✝ : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝¹ : NormedSpace ℝ E\nβ : Type u_5\ninst✝ : MeasurableSpace β\ng : α → β\nf : β → E\ns : Set β\nhs : MeasurableSet s\nhf : AEStronglyMeasurable f (Measure.map g μ)\nhg : AEMeasurable g\n⊢ Measure.map g (Measure.restrict μ (g ⁻¹' s)) ≤ Measure.map g μ\n[PROOFSTEP]\nexact Measure.map_mono_of_aemeasurable Measure.restrict_le_self hg\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g✝ : α → E\ns✝ t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nβ : Type u_5\nx✝ : MeasurableSpace β\nf : α → β\nhf : MeasurableEmbedding f\ng : β → E\ns : Set β\n⊢ ∫ (y : β) in s, g y ∂Measure.map f μ = ∫ (x : α) in f ⁻¹' s, g (f x) ∂μ\n[PROOFSTEP]\nrw [hf.restrict_map, hf.integral_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nC : ℝ\nhs : ↑↑μ s < ⊤\nhC : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ C\n⊢ ‖∫ (x : α) in s, f x ∂μ‖ ≤ C * ENNReal.toReal (↑↑μ s)\n[PROOFSTEP]\nrw [← Measure.restrict_apply_univ] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nC : ℝ\nhs : ↑↑(Measure.restrict μ s) univ < ⊤\nhC : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ C\n⊢ ‖∫ (x : α) in s, f x ∂μ‖ ≤ C * ENNReal.toReal (↑↑(Measure.restrict μ s) univ)\n[PROOFSTEP]\nhaveI : IsFiniteMeasure (μ.restrict s) := ⟨‹_›⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nC : ℝ\nhs : ↑↑(Measure.restrict μ s) univ < ⊤\nhC : ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ C\nthis : IsFiniteMeasure (Measure.restrict μ s)\n⊢ ‖∫ (x : α) in s, f x ∂μ‖ ≤ C * ENNReal.toReal (↑↑(Measure.restrict μ s) univ)\n[PROOFSTEP]\nexact norm_integral_le_of_norm_le_const hC\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nC : ℝ\nhs : ↑↑μ s < ⊤\nhC : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖f x‖ ≤ C\nhfm : AEStronglyMeasurable f (Measure.restrict μ s)\n⊢ ‖∫ (x : α) in s, f x ∂μ‖ ≤ C * ENNReal.toReal (↑↑μ s)\n[PROOFSTEP]\napply norm_set_integral_le_of_norm_le_const_ae hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nC : ℝ\nhs : ↑↑μ s < ⊤\nhC : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖f x‖ ≤ C\nhfm : AEStronglyMeasurable f (Measure.restrict μ s)\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ C\n[PROOFSTEP]\nhave A : ∀ᵐ x : α ∂μ, x ∈ s → ‖AEStronglyMeasurable.mk f hfm x‖ ≤ C :=\n  by\n  filter_upwards [hC, hfm.ae_mem_imp_eq_mk] with _ h1 h2 h3\n  rw [← h2 h3]\n  exact h1 h3\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nC : ℝ\nhs : ↑↑μ s < ⊤\nhC : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖f x‖ ≤ C\nhfm : AEStronglyMeasurable f (Measure.restrict μ s)\n⊢ ∀ᵐ (x : α) ∂μ, x ∈ s → ‖AEStronglyMeasurable.mk f hfm x‖ ≤ C\n[PROOFSTEP]\nfilter_upwards [hC, hfm.ae_mem_imp_eq_mk] with _ h1 h2 h3\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nC : ℝ\nhs : ↑↑μ s < ⊤\nhC : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖f x‖ ≤ C\nhfm : AEStronglyMeasurable f (Measure.restrict μ s)\na✝ : α\nh1 : a✝ ∈ s → ‖f a✝‖ ≤ C\nh2 : a✝ ∈ s → f a✝ = AEStronglyMeasurable.mk f hfm a✝\nh3 : a✝ ∈ s\n⊢ ‖AEStronglyMeasurable.mk f hfm a✝‖ ≤ C\n[PROOFSTEP]\nrw [← h2 h3]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nC : ℝ\nhs : ↑↑μ s < ⊤\nhC : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖f x‖ ≤ C\nhfm : AEStronglyMeasurable f (Measure.restrict μ s)\na✝ : α\nh1 : a✝ ∈ s → ‖f a✝‖ ≤ C\nh2 : a✝ ∈ s → f a✝ = AEStronglyMeasurable.mk f hfm a✝\nh3 : a✝ ∈ s\n⊢ ‖f a✝‖ ≤ C\n[PROOFSTEP]\nexact h1 h3\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nC : ℝ\nhs : ↑↑μ s < ⊤\nhC : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖f x‖ ≤ C\nhfm : AEStronglyMeasurable f (Measure.restrict μ s)\nA : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖AEStronglyMeasurable.mk f hfm x‖ ≤ C\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ C\n[PROOFSTEP]\nhave B : MeasurableSet {x | ‖(hfm.mk f) x‖ ≤ C} := hfm.stronglyMeasurable_mk.norm.measurable measurableSet_Iic\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nC : ℝ\nhs : ↑↑μ s < ⊤\nhC : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖f x‖ ≤ C\nhfm : AEStronglyMeasurable f (Measure.restrict μ s)\nA : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖AEStronglyMeasurable.mk f hfm x‖ ≤ C\nB : MeasurableSet {x | ‖AEStronglyMeasurable.mk f hfm x‖ ≤ C}\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ C\n[PROOFSTEP]\nfilter_upwards [hfm.ae_eq_mk, (ae_restrict_iff B).2 A] with _ h1 _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nC : ℝ\nhs : ↑↑μ s < ⊤\nhC : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖f x‖ ≤ C\nhfm : AEStronglyMeasurable f (Measure.restrict μ s)\nA : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖AEStronglyMeasurable.mk f hfm x‖ ≤ C\nB : MeasurableSet {x | ‖AEStronglyMeasurable.mk f hfm x‖ ≤ C}\na✝¹ : α\nh1 : f a✝¹ = AEStronglyMeasurable.mk f hfm a✝¹\na✝ : ‖AEStronglyMeasurable.mk f hfm a✝¹‖ ≤ C\n⊢ ‖f a✝¹‖ ≤ C\n[PROOFSTEP]\nrwa [h1]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nC : ℝ\nhs : ↑↑μ s < ⊤\nhsm : MeasurableSet s\nhC : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖f x‖ ≤ C\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, ‖f x‖ ≤ C\n[PROOFSTEP]\nrwa [ae_restrict_eq hsm, eventually_inf_principal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ s] f\nhfi : IntegrableOn f s\n⊢ 0 < ∫ (x : α) in s, f x ∂μ ↔ 0 < ↑↑μ (support f ∩ s)\n[PROOFSTEP]\nrw [integral_pos_iff_support_of_nonneg_ae hf hfi, Measure.restrict_apply₀]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ s] f\nhfi : IntegrableOn f s\n⊢ NullMeasurableSet (support f)\n[PROOFSTEP]\nrw [support_eq_preimage]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nf : α → ℝ\nhf : 0 ≤ᵐ[Measure.restrict μ s] f\nhfi : IntegrableOn f s\n⊢ NullMeasurableSet (f ⁻¹' {0}ᶜ)\n[PROOFSTEP]\nexact hfi.aestronglyMeasurable.aemeasurable.nullMeasurable (measurableSet_singleton 0).compl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\n⊢ ENNReal.toReal (↑↑μ {x | R < f x}) * R < ∫ (x : α) in {x | R < f x}, f x ∂μ\n[PROOFSTEP]\nhave : IntegrableOn (fun _ => R) {x | ↑R < f x} μ :=\n  by\n  refine' ⟨aestronglyMeasurable_const, lt_of_le_of_lt _ hfint.2⟩\n  refine' set_lintegral_mono (Measurable.nnnorm _).coe_nnreal_ennreal hfm.nnnorm.coe_nnreal_ennreal fun x hx => _\n  · exact measurable_const\n  · simp only [ENNReal.coe_le_coe, Real.nnnorm_of_nonneg hR, Real.nnnorm_of_nonneg (hR.trans <| le_of_lt hx),\n      Subtype.mk_le_mk]\n    exact le_of_lt hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\n⊢ IntegrableOn (fun x => R) {x | R < f x}\n[PROOFSTEP]\nrefine' ⟨aestronglyMeasurable_const, lt_of_le_of_lt _ hfint.2⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\n⊢ ∫⁻ (a : α) in {x | R < f x}, ↑‖(fun x => R) a‖₊ ∂μ ≤ ∫⁻ (a : α) in {x | R < f x}, ↑‖f a‖₊ ∂μ\n[PROOFSTEP]\nrefine' set_lintegral_mono (Measurable.nnnorm _).coe_nnreal_ennreal hfm.nnnorm.coe_nnreal_ennreal fun x hx => _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\n⊢ Measurable fun a => (fun x => R) a\n[PROOFSTEP]\nexact measurable_const\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\nx : α\nhx : x ∈ {x | R < f x}\n⊢ ↑‖(fun x => R) x‖₊ ≤ ↑‖f x‖₊\n[PROOFSTEP]\nsimp only [ENNReal.coe_le_coe, Real.nnnorm_of_nonneg hR, Real.nnnorm_of_nonneg (hR.trans <| le_of_lt hx),\n  Subtype.mk_le_mk]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\nx : α\nhx : x ∈ {x | R < f x}\n⊢ { val := R, property := hR } ≤ { val := f x, property := (_ : 0 ≤ f x) }\n[PROOFSTEP]\nexact le_of_lt hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\nthis : IntegrableOn (fun x => R) {x | R < f x}\n⊢ ENNReal.toReal (↑↑μ {x | R < f x}) * R < ∫ (x : α) in {x | R < f x}, f x ∂μ\n[PROOFSTEP]\nrw [← sub_pos, ← smul_eq_mul, ← set_integral_const, ← integral_sub hfint this,\n  set_integral_pos_iff_support_of_nonneg_ae]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\nthis : IntegrableOn (fun x => R) {x | R < f x}\n⊢ 0 < ↑↑μ ((support fun a => f a - R) ∩ {x | R < f x})\n[PROOFSTEP]\nrw [← zero_lt_iff] at hμ \n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : 0 < ↑↑μ {x | R < f x}\nthis : IntegrableOn (fun x => R) {x | R < f x}\n⊢ 0 < ↑↑μ ((support fun a => f a - R) ∩ {x | R < f x})\n[PROOFSTEP]\nrwa [Set.inter_eq_self_of_subset_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : 0 < ↑↑μ {x | R < f x}\nthis : IntegrableOn (fun x => R) {x | R < f x}\n⊢ {x | R < f x} ⊆ support fun a => f a - R\n[PROOFSTEP]\nexact fun x hx => Ne.symm (ne_of_lt <| sub_pos.2 hx)\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\nthis : IntegrableOn (fun x => R) {x | R < f x}\n⊢ 0 ≤ᵐ[Measure.restrict μ {x | R < f x}] fun a => f a - R\n[PROOFSTEP]\nchange ∀ᵐ x ∂μ.restrict _, _\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\nthis : IntegrableOn (fun x => R) {x | R < f x}\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ {x | R < f x}, OfNat.ofNat 0 x ≤ (fun a => f a - R) x\n[PROOFSTEP]\nrw [ae_restrict_iff]\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\nthis : IntegrableOn (fun x => R) {x | R < f x}\n⊢ ∀ᵐ (x : α) ∂μ, x ∈ {x | R < f x} → OfNat.ofNat 0 x ≤ (fun a => f a - R) x\n[PROOFSTEP]\nexact eventually_of_forall fun x hx => sub_nonneg.2 <| le_of_lt hx\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\nthis : IntegrableOn (fun x => R) {x | R < f x}\n⊢ MeasurableSet {x | OfNat.ofNat 0 x ≤ (fun a => f a - R) x}\n[PROOFSTEP]\nexact measurableSet_le measurable_zero (hfm.sub measurable_const)\n[GOAL]\ncase hfi\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝ : NormedSpace ℝ E\nR : ℝ\nf : α → ℝ\nhR : 0 ≤ R\nhfm : Measurable f\nhfint : IntegrableOn f {x | R < f x}\nhμ : ↑↑μ {x | R < f x} ≠ 0\nthis : IntegrableOn (fun x => R) {x | R < f x}\n⊢ IntegrableOn (fun a => f a - R) {x | R < f x}\n[PROOFSTEP]\nexact Integrable.sub hfint this\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α✝\ninst✝¹ : NormedAddCommGroup E\nf✝ g : α✝ → E\ns✝ t : Set α✝\nμ✝ ν : Measure α✝\nl l' : Filter α✝\ninst✝ : NormedSpace ℝ E\nα : Type u_5\nm m0 : MeasurableSpace α\nμ : Measure α\nhm : m ≤ m0\nf : α → E\nhf_meas : StronglyMeasurable f\ns : Set α\nhs : MeasurableSet s\n⊢ ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, f x ∂Measure.trim μ hm\n[PROOFSTEP]\nrwa [integral_trim hm hf_meas, restrict_trim hm μ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\nf g : α → E\ns t : Set α\nμ ν : Measure α\nl l' : Filter α\ninst✝² : NormedSpace ℝ E\ninst✝¹ : PartialOrder α\na b : α\ninst✝ : NoAtoms μ\n⊢ ∫ (t : α) in Icc a b, f t ∂μ = ∫ (t : α) in Ico a b, f t ∂μ\n[PROOFSTEP]\nrw [integral_Icc_eq_integral_Ico, integral_Ico_eq_integral_Ioo]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns t : Set α\nhf : IntegrableOn f s\nhg : IntegrableOn g s\nhs : MeasurableSet s\nh : ∀ (x : α), x ∈ s → f x ≤ g x\n⊢ (fun a => f a) ≤ᵐ[Measure.restrict μ s] fun a => g a\n[PROOFSTEP]\nsimp [hs, EventuallyLE, eventually_inf_principal, ae_of_all _ h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns t : Set α\nhf : IntegrableOn f s\nhg : IntegrableOn g s\nhs : MeasurableSet s\nh : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ g x\n⊢ ∫ (a : α) in s, f a ∂μ ≤ ∫ (a : α) in s, g a ∂μ\n[PROOFSTEP]\nrefine' set_integral_mono_ae_restrict hf hg _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns t : Set α\nhf : IntegrableOn f s\nhg : IntegrableOn g s\nhs : MeasurableSet s\nh : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ g x\n⊢ (fun a => f a) ≤ᵐ[Measure.restrict μ s] fun a => g a\n[PROOFSTEP]\nrwa [EventuallyLE, ae_restrict_iff' hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns t : Set α\nhf✝ : IntegrableOn f s\nhg : IntegrableOn g s\nc : ℝ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nhf : ∀ (x : α), x ∈ s → c ≤ f x\nhfint : IntegrableOn (fun x => f x) s\n⊢ c * ENNReal.toReal (↑↑μ s) ≤ ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nrw [mul_comm, ← smul_eq_mul, ← set_integral_const c]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns t : Set α\nhf✝ : IntegrableOn f s\nhg : IntegrableOn g s\nc : ℝ\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nhf : ∀ (x : α), x ∈ s → c ≤ f x\nhfint : IntegrableOn (fun x => f x) s\n⊢ ∫ (x : α) in s, c ∂μ ≤ ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nexact set_integral_mono_on (integrableOn_const.2 (Or.inr hμs.lt_top)) hfint hs hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝ : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\ns : Set α\nhs : MeasurableSet s\nhf : ∀ᵐ (a : α) ∂μ, a ∈ s → 0 ≤ f a\n⊢ 0 ≤ᵐ[Measure.restrict μ s] fun a => f a\n[PROOFSTEP]\nrwa [EventuallyLE, ae_restrict_iff' hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝ : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\ns✝ s : Set α\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhfi : Integrable f\n⊢ ∫ (x : α) in s, f x ∂μ ≤ ∫ (x : α) in {y | 0 ≤ f y}, f x ∂μ\n[PROOFSTEP]\nrw [← integral_indicator hs, ← integral_indicator (stronglyMeasurable_const.measurableSet_le hf)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝ : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\ns✝ s : Set α\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhfi : Integrable f\n⊢ ∫ (x : α), indicator s (fun x => f x) x ∂μ ≤ ∫ (x : α), indicator {a | 0 ≤ f a} (fun x => f x) x ∂μ\n[PROOFSTEP]\nexact\n  integral_mono (hfi.indicator hs) (hfi.indicator (stronglyMeasurable_const.measurableSet_le hf))\n    (indicator_le_indicator_nonneg s f)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝ : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\ns : Set α\nhs : MeasurableSet s\nhf : ∀ᵐ (a : α) ∂μ, a ∈ s → f a ≤ 0\n⊢ (fun a => f a) ≤ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nrwa [EventuallyLE, ae_restrict_iff' hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝ : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\ns✝ s : Set α\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhfi : Integrable f\n⊢ ∫ (x : α) in {y | f y ≤ 0}, f x ∂μ ≤ ∫ (x : α) in s, f x ∂μ\n[PROOFSTEP]\nrw [← integral_indicator hs, ← integral_indicator (hf.measurableSet_le stronglyMeasurable_const)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝ : MeasurableSpace α\nμ : Measure α\nf : α → ℝ\ns✝ s : Set α\nhs : MeasurableSet s\nhf : StronglyMeasurable f\nhfi : Integrable f\n⊢ ∫ (x : α), indicator {a | f a ≤ 0} (fun x => f x) x ∂μ ≤ ∫ (x : α), indicator s (fun x => f x) x ∂μ\n[PROOFSTEP]\nexact\n  integral_mono (hfi.indicator (hf.measurableSet_le stronglyMeasurable_const)) (hfi.indicator hs)\n    (indicator_nonpos_le_indicator s f)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : Countable β\nf : α → E\ns : β → Set α\nhs : ∀ (b : β), MeasurableSet (s b)\nhi : ∀ (b : β), IntegrableOn f (s b)\nh : Summable fun b => ∫ (a : α) in s b, ‖f a‖ ∂μ\n⊢ IntegrableOn f (iUnion s)\n[PROOFSTEP]\nrefine' ⟨AEStronglyMeasurable.iUnion fun i => (hi i).1, (lintegral_iUnion_le _ _).trans_lt _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : Countable β\nf : α → E\ns : β → Set α\nhs : ∀ (b : β), MeasurableSet (s b)\nhi : ∀ (b : β), IntegrableOn f (s b)\nh : Summable fun b => ∫ (a : α) in s b, ‖f a‖ ∂μ\n⊢ ∑' (i : β), ∫⁻ (a : α) in s i, ↑‖f a‖₊ ∂μ < ⊤\n[PROOFSTEP]\nhave B := fun b : β => lintegral_coe_eq_integral (fun a : α => ‖f a‖₊) (hi b).norm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : Countable β\nf : α → E\ns : β → Set α\nhs : ∀ (b : β), MeasurableSet (s b)\nhi : ∀ (b : β), IntegrableOn f (s b)\nh : Summable fun b => ∫ (a : α) in s b, ‖f a‖ ∂μ\nB : ∀ (b : β), ∫⁻ (a : α) in s b, ↑‖f a‖₊ ∂μ = ENNReal.ofReal (∫ (a : α) in s b, ↑‖f a‖₊ ∂μ)\n⊢ ∑' (i : β), ∫⁻ (a : α) in s i, ↑‖f a‖₊ ∂μ < ⊤\n[PROOFSTEP]\nrw [tsum_congr B]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : Countable β\nf : α → E\ns : β → Set α\nhs : ∀ (b : β), MeasurableSet (s b)\nhi : ∀ (b : β), IntegrableOn f (s b)\nh : Summable fun b => ∫ (a : α) in s b, ‖f a‖ ∂μ\nB : ∀ (b : β), ∫⁻ (a : α) in s b, ↑‖f a‖₊ ∂μ = ENNReal.ofReal (∫ (a : α) in s b, ↑‖f a‖₊ ∂μ)\n⊢ ∑' (b : β), ENNReal.ofReal (∫ (a : α) in s b, ↑‖f a‖₊ ∂μ) < ⊤\n[PROOFSTEP]\nhave S' :\n  Summable fun b : β =>\n    (⟨∫ a : α in s b, ‖f a‖₊ ∂μ, set_integral_nonneg (hs b) fun a _ => NNReal.coe_nonneg _⟩ : NNReal) :=\n  by rw [← NNReal.summable_coe]; exact h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : Countable β\nf : α → E\ns : β → Set α\nhs : ∀ (b : β), MeasurableSet (s b)\nhi : ∀ (b : β), IntegrableOn f (s b)\nh : Summable fun b => ∫ (a : α) in s b, ‖f a‖ ∂μ\nB : ∀ (b : β), ∫⁻ (a : α) in s b, ↑‖f a‖₊ ∂μ = ENNReal.ofReal (∫ (a : α) in s b, ↑‖f a‖₊ ∂μ)\n⊢ Summable fun b => { val := ∫ (a : α) in s b, ↑‖f a‖₊ ∂μ, property := (_ : 0 ≤ ∫ (a : α) in s b, ↑‖f a‖₊ ∂μ) }\n[PROOFSTEP]\nrw [← NNReal.summable_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : Countable β\nf : α → E\ns : β → Set α\nhs : ∀ (b : β), MeasurableSet (s b)\nhi : ∀ (b : β), IntegrableOn f (s b)\nh : Summable fun b => ∫ (a : α) in s b, ‖f a‖ ∂μ\nB : ∀ (b : β), ∫⁻ (a : α) in s b, ↑‖f a‖₊ ∂μ = ENNReal.ofReal (∫ (a : α) in s b, ↑‖f a‖₊ ∂μ)\n⊢ Summable fun a => ↑{ val := ∫ (a : α) in s a, ↑‖f a‖₊ ∂μ, property := (_ : 0 ≤ ∫ (a : α) in s a, ↑‖f a‖₊ ∂μ) }\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : Countable β\nf : α → E\ns : β → Set α\nhs : ∀ (b : β), MeasurableSet (s b)\nhi : ∀ (b : β), IntegrableOn f (s b)\nh : Summable fun b => ∫ (a : α) in s b, ‖f a‖ ∂μ\nB : ∀ (b : β), ∫⁻ (a : α) in s b, ↑‖f a‖₊ ∂μ = ENNReal.ofReal (∫ (a : α) in s b, ↑‖f a‖₊ ∂μ)\nS' : Summable fun b => { val := ∫ (a : α) in s b, ↑‖f a‖₊ ∂μ, property := (_ : 0 ≤ ∫ (a : α) in s b, ↑‖f a‖₊ ∂μ) }\n⊢ ∑' (b : β), ENNReal.ofReal (∫ (a : α) in s b, ↑‖f a‖₊ ∂μ) < ⊤\n[PROOFSTEP]\nhave S'' := ENNReal.tsum_coe_eq S'.hasSum\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : Countable β\nf : α → E\ns : β → Set α\nhs : ∀ (b : β), MeasurableSet (s b)\nhi : ∀ (b : β), IntegrableOn f (s b)\nh : Summable fun b => ∫ (a : α) in s b, ‖f a‖ ∂μ\nB : ∀ (b : β), ∫⁻ (a : α) in s b, ↑‖f a‖₊ ∂μ = ENNReal.ofReal (∫ (a : α) in s b, ↑‖f a‖₊ ∂μ)\nS' : Summable fun b => { val := ∫ (a : α) in s b, ↑‖f a‖₊ ∂μ, property := (_ : 0 ≤ ∫ (a : α) in s b, ↑‖f a‖₊ ∂μ) }\nS'' :\n  ∑' (a : β), ↑{ val := ∫ (a : α) in s a, ↑‖f a‖₊ ∂μ, property := (_ : 0 ≤ ∫ (a : α) in s a, ↑‖f a‖₊ ∂μ) } =\n    ↑(∑' (b : β), { val := ∫ (a : α) in s b, ↑‖f a‖₊ ∂μ, property := (_ : 0 ≤ ∫ (a : α) in s b, ↑‖f a‖₊ ∂μ) })\n⊢ ∑' (b : β), ENNReal.ofReal (∫ (a : α) in s b, ↑‖f a‖₊ ∂μ) < ⊤\n[PROOFSTEP]\nsimp_rw [ENNReal.coe_nnreal_eq, NNReal.coe_mk, coe_nnnorm] at S'' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nμ : Measure α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : Countable β\nf : α → E\ns : β → Set α\nhs : ∀ (b : β), MeasurableSet (s b)\nhi : ∀ (b : β), IntegrableOn f (s b)\nh : Summable fun b => ∫ (a : α) in s b, ‖f a‖ ∂μ\nB : ∀ (b : β), ∫⁻ (a : α) in s b, ↑‖f a‖₊ ∂μ = ENNReal.ofReal (∫ (a : α) in s b, ↑‖f a‖₊ ∂μ)\nS' : Summable fun b => { val := ∫ (a : α) in s b, ↑‖f a‖₊ ∂μ, property := (_ : 0 ≤ ∫ (a : α) in s b, ↑‖f a‖₊ ∂μ) }\nS'' :\n  ∑' (a : β), ENNReal.ofReal (∫ (a : α) in s a, ‖f a‖ ∂μ) =\n    ENNReal.ofReal\n      ↑(∑' (b : β),\n          { val := ∫ (a : α) in s b, ‖f a‖ ∂μ, property := (_ : (fun r => 0 ≤ r) (∫ (a : α) in s b, ‖f a‖ ∂μ)) })\n⊢ ∑' (b : β), ENNReal.ofReal (∫ (a : α) in s b, ↑‖f a‖₊ ∂μ) < ⊤\n[PROOFSTEP]\nconvert ENNReal.ofReal_lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\nμ : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : Countable β\ninst✝³ : TopologicalSpace α\ninst✝² : BorelSpace α\ninst✝¹ : MetrizableSpace α\ninst✝ : IsLocallyFiniteMeasure μ\nf : C(α, E)\ns : β → Compacts α\nhf : Summable fun i => ‖ContinuousMap.restrict (↑(s i)) f‖ * ENNReal.toReal (↑↑μ ↑(s i))\n⊢ IntegrableOn (↑f) (⋃ (i : β), ↑(s i))\n[PROOFSTEP]\nrefine'\n  integrableOn_iUnion_of_summable_integral_norm (fun i => (s i).isCompact.isClosed.measurableSet)\n    (fun i => (map_continuous f).continuousOn.integrableOn_compact (s i).isCompact)\n    (summable_of_nonneg_of_le (fun ι => integral_nonneg fun x => norm_nonneg _) (fun i => _) hf)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\nμ : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : Countable β\ninst✝³ : TopologicalSpace α\ninst✝² : BorelSpace α\ninst✝¹ : MetrizableSpace α\ninst✝ : IsLocallyFiniteMeasure μ\nf : C(α, E)\ns : β → Compacts α\nhf : Summable fun i => ‖ContinuousMap.restrict (↑(s i)) f‖ * ENNReal.toReal (↑↑μ ↑(s i))\ni : β\n⊢ ∫ (a : α) in ↑(s i), ‖↑f a‖ ∂μ ≤ ‖ContinuousMap.restrict (↑(s i)) f‖ * ENNReal.toReal (↑↑μ ↑(s i))\n[PROOFSTEP]\nrw [← (Real.norm_of_nonneg (integral_nonneg fun a => norm_nonneg _) : ‖_‖ = ∫ x in s i, ‖f x‖ ∂μ)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\nμ : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : Countable β\ninst✝³ : TopologicalSpace α\ninst✝² : BorelSpace α\ninst✝¹ : MetrizableSpace α\ninst✝ : IsLocallyFiniteMeasure μ\nf : C(α, E)\ns : β → Compacts α\nhf : Summable fun i => ‖ContinuousMap.restrict (↑(s i)) f‖ * ENNReal.toReal (↑↑μ ↑(s i))\ni : β\n⊢ ‖∫ (x : α) in ↑(s i), ‖↑f x‖ ∂μ‖ ≤ ‖ContinuousMap.restrict (↑(s i)) f‖ * ENNReal.toReal (↑↑μ ↑(s i))\n[PROOFSTEP]\nexact\n  norm_set_integral_le_of_norm_le_const' (s i).isCompact.measure_lt_top (s i).isCompact.isClosed.measurableSet\n    fun x hx => (norm_norm (f x)).symm ▸ (f.restrict (s i : Set α)).norm_coe_le_norm ⟨x, hx⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁶ : MeasurableSpace α\nμ : Measure α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : Countable β\ninst✝³ : TopologicalSpace α\ninst✝² : BorelSpace α\ninst✝¹ : MetrizableSpace α\ninst✝ : IsLocallyFiniteMeasure μ\nf : C(α, E)\ns : β → Compacts α\nhf : Summable fun i => ‖ContinuousMap.restrict (↑(s i)) f‖ * ENNReal.toReal (↑↑μ ↑(s i))\nhs : ⋃ (i : β), ↑(s i) = univ\n⊢ Integrable ↑f\n[PROOFSTEP]\nsimpa only [hs, integrableOn_univ] using integrableOn_iUnion_of_summable_norm_restrict hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\n⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in ⋂ (n : ℕ), s n, f a ∂μ))\n[PROOFSTEP]\nlet bound : α → ℝ := indicator (s 0) fun a => ‖f a‖\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\n⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in ⋂ (n : ℕ), s n, f a ∂μ))\n[PROOFSTEP]\nhave h_int_eq : (fun i => ∫ a in s i, f a ∂μ) = fun i => ∫ a, (s i).indicator f a ∂μ :=\n  funext fun i => (integral_indicator (hsm i)).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\nh_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ\n⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in ⋂ (n : ℕ), s n, f a ∂μ))\n[PROOFSTEP]\nrw [h_int_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\nh_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ\n⊢ Tendsto (fun i => ∫ (a : α), indicator (s i) f a ∂μ) atTop (𝓝 (∫ (a : α) in ⋂ (n : ℕ), s n, f a ∂μ))\n[PROOFSTEP]\nrw [← integral_indicator (MeasurableSet.iInter hsm)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\nh_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ\n⊢ Tendsto (fun i => ∫ (a : α), indicator (s i) f a ∂μ) atTop\n    (𝓝 (∫ (x : α), indicator (⋂ (b : ℕ), s b) (fun a => f a) x ∂μ))\n[PROOFSTEP]\nrefine' tendsto_integral_of_dominated_convergence bound _ _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\nh_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ\n⊢ ∀ (n : ℕ), AEStronglyMeasurable (fun a => indicator (s n) f a) μ\n[PROOFSTEP]\nintro n\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\nh_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ\nn : ℕ\n⊢ AEStronglyMeasurable (fun a => indicator (s n) f a) μ\n[PROOFSTEP]\nrw [aestronglyMeasurable_indicator_iff (hsm n)]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\nh_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ\nn : ℕ\n⊢ AEStronglyMeasurable f (Measure.restrict μ (s n))\n[PROOFSTEP]\nexact (IntegrableOn.mono_set hfi (h_anti (zero_le n))).1\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\nh_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ\n⊢ Integrable bound\n[PROOFSTEP]\nrw [integrable_indicator_iff (hsm 0)]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\nh_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ\n⊢ IntegrableOn (fun a => ‖f a‖) (s 0)\n[PROOFSTEP]\nexact hfi.norm\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\nh_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ\n⊢ ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖indicator (s n) f a‖ ≤ bound a\n[PROOFSTEP]\nsimp_rw [norm_indicator_eq_indicator_norm]\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\nh_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ\n⊢ ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, indicator (s n) (fun a => ‖f a‖) a ≤ indicator (s 0) (fun a => ‖f a‖) a\n[PROOFSTEP]\nrefine' fun n => eventually_of_forall fun x => _\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\nh_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ\nn : ℕ\nx : α\n⊢ indicator (s n) (fun a => ‖f a‖) x ≤ indicator (s 0) (fun a => ‖f a‖) x\n[PROOFSTEP]\nexact indicator_le_indicator_of_subset (h_anti (zero_le n)) (fun a => norm_nonneg _) _\n[GOAL]\ncase refine'_4\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\ns : ℕ → Set α\nf : α → E\nhsm : ∀ (i : ℕ), MeasurableSet (s i)\nh_anti : Antitone s\nhfi : IntegrableOn f (s 0)\nbound : α → ℝ := indicator (s 0) fun a => ‖f a‖\nh_int_eq : (fun i => ∫ (a : α) in s i, f a ∂μ) = fun i => ∫ (a : α), indicator (s i) f a ∂μ\n⊢ ∀ᵐ (a : α) ∂μ, Tendsto (fun n => indicator (s n) f a) atTop (𝓝 (indicator (⋂ (b : ℕ), s b) (fun a => f a) a))\n[PROOFSTEP]\nfilter_upwards [] with a using le_trans (h_anti.tendsto_indicator _ _ _) (pure_le_nhds _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ Lp E p }\ns : Set α\n⊢ Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p) =\n    Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ Lp E p }\ns : Set α\n⊢ ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) =ᵐ[Measure.restrict μ s]\n    ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p))\n[PROOFSTEP]\nrefine' (ae_restrict_of_ae (Lp.coeFn_add f g)).mp _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ Lp E p }\ns : Set α\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,\n    ↑↑(f + g) x = (↑↑f + ↑↑g) x →\n      ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) x =\n        ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x\n[PROOFSTEP]\nrefine' (Lp.coeFn_add (Memℒp.toLp f ((Lp.memℒp f).restrict s)) (Memℒp.toLp g ((Lp.memℒp g).restrict s))).mp _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ Lp E p }\ns : Set α\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,\n    ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x =\n        (↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) + ↑↑(Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p))) x →\n      ↑↑(f + g) x = (↑↑f + ↑↑g) x →\n        ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) x =\n          ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x\n[PROOFSTEP]\nrefine' (Memℒp.coeFn_toLp ((Lp.memℒp f).restrict s)).mp _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ Lp E p }\ns : Set α\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,\n    ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = ↑↑f x →\n      ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x =\n          (↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) + ↑↑(Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p))) x →\n        ↑↑(f + g) x = (↑↑f + ↑↑g) x →\n          ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) x =\n            ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x\n[PROOFSTEP]\nrefine' (Memℒp.coeFn_toLp ((Lp.memℒp g).restrict s)).mp _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ Lp E p }\ns : Set α\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,\n    ↑↑(Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x = ↑↑g x →\n      ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = ↑↑f x →\n        ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x =\n            (↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) + ↑↑(Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p))) x →\n          ↑↑(f + g) x = (↑↑f + ↑↑g) x →\n            ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) x =\n              ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x\n[PROOFSTEP]\nrefine' (Memℒp.coeFn_toLp ((Lp.memℒp (f + g)).restrict s)).mono fun x hx1 hx2 hx3 hx4 hx5 => _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ Lp E p }\ns : Set α\nx : α\nhx1 : ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) x = ↑↑(f + g) x\nhx2 : ↑↑(Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x = ↑↑g x\nhx3 : ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = ↑↑f x\nhx4 :\n  ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x =\n    (↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) + ↑↑(Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p))) x\nhx5 : ↑↑(f + g) x = (↑↑f + ↑↑g) x\n⊢ ↑↑(Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p)) x =\n    ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) x\n[PROOFSTEP]\nrw [hx4, hx1, Pi.add_apply, hx2, hx3, hx5, Pi.add_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nc : 𝕜\nf : { x // x ∈ Lp F p }\ns : Set α\n⊢ Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p) = c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nc : 𝕜\nf : { x // x ∈ Lp F p }\ns : Set α\n⊢ ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) =ᵐ[Measure.restrict μ s] ↑↑(c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p))\n[PROOFSTEP]\nrefine' (ae_restrict_of_ae (Lp.coeFn_smul c f)).mp _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nc : 𝕜\nf : { x // x ∈ Lp F p }\ns : Set α\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,\n    ↑↑(c • f) x = (c • ↑↑f) x →\n      ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) x = ↑↑(c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x\n[PROOFSTEP]\nrefine' (Memℒp.coeFn_toLp ((Lp.memℒp f).restrict s)).mp _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nc : 𝕜\nf : { x // x ∈ Lp F p }\ns : Set α\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,\n    ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = ↑↑f x →\n      ↑↑(c • f) x = (c • ↑↑f) x →\n        ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) x = ↑↑(c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x\n[PROOFSTEP]\nrefine' (Memℒp.coeFn_toLp ((Lp.memℒp (c • f)).restrict s)).mp _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nc : 𝕜\nf : { x // x ∈ Lp F p }\ns : Set α\n⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s,\n    ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) x = ↑↑(c • f) x →\n      ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = ↑↑f x →\n        ↑↑(c • f) x = (c • ↑↑f) x →\n          ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) x = ↑↑(c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x\n[PROOFSTEP]\nrefine' (Lp.coeFn_smul c (Memℒp.toLp f ((Lp.memℒp f).restrict s))).mono fun x hx1 hx2 hx3 hx4 => _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\nc : 𝕜\nf : { x // x ∈ Lp F p }\ns : Set α\nx : α\nhx1 : ↑↑(c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = (c • ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p))) x\nhx2 : ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) x = ↑↑(c • f) x\nhx3 : ↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x = ↑↑f x\nhx4 : ↑↑(c • f) x = (c • ↑↑f) x\n⊢ ↑↑(Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p)) x = ↑↑(c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) x\n[PROOFSTEP]\nrw [hx2, hx1, Pi.smul_apply, hx3, hx4, Pi.smul_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\ns : Set α\nf : { x // x ∈ Lp E p }\n⊢ ‖Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)‖ ≤ ‖f‖\n[PROOFSTEP]\nrw [Lp.norm_def, Lp.norm_def, ENNReal.toReal_le_toReal (Lp.snorm_ne_top _) (Lp.snorm_ne_top _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\ns : Set α\nf : { x // x ∈ Lp E p }\n⊢ snorm (↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p))) p (Measure.restrict μ s) ≤ snorm (↑↑f) p μ\n[PROOFSTEP]\nrefine' (le_of_eq _).trans (snorm_mono_measure _ Measure.restrict_le_self)\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\ns : Set α\nf : { x // x ∈ Lp E p }\n⊢ snorm (↑↑(Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p))) p (Measure.restrict μ s) =\n    snorm (↑↑f) p (Measure.restrict μ ?refine'_2)\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\ns : Set α\nf : { x // x ∈ Lp E p }\n⊢ Set α\n[PROOFSTEP]\nexact snorm_congr_ae (Memℒp.coeFn_toLp _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np✝ : ℝ≥0∞\nμ✝ μ : Measure α\np : ℝ≥0∞\nhp : Fact (1 ≤ p)\ns : Set α\n⊢ ∀ (x : { x // x ∈ Lp F p }),\n    ‖↑{\n              toAddHom :=\n                { toFun := fun f => Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p),\n                  map_add' :=\n                    (_ :\n                      ∀ (f g : { x // x ∈ Lp F p }),\n                        Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p) =\n                          Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) },\n              map_smul' :=\n                (_ :\n                  ∀ (c : 𝕜) (f : { x // x ∈ Lp F p }),\n                    Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p) = c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) }\n          x‖ ≤\n      1 * ‖x‖\n[PROOFSTEP]\nintro f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np✝ : ℝ≥0∞\nμ✝ μ : Measure α\np : ℝ≥0∞\nhp : Fact (1 ≤ p)\ns : Set α\nf : { x // x ∈ Lp F p }\n⊢ ‖↑{\n            toAddHom :=\n              { toFun := fun f => Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p),\n                map_add' :=\n                  (_ :\n                    ∀ (f g : { x // x ∈ Lp F p }),\n                      Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p) =\n                        Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) },\n            map_smul' :=\n              (_ :\n                ∀ (c : 𝕜) (f : { x // x ∈ Lp F p }),\n                  Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p) = c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) }\n        f‖ ≤\n    1 * ‖f‖\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\ninst✝³ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np✝ : ℝ≥0∞\nμ✝ μ : Measure α\np : ℝ≥0∞\nhp : Fact (1 ≤ p)\ns : Set α\nf : { x // x ∈ Lp F p }\n⊢ ‖↑{\n            toAddHom :=\n              { toFun := fun f => Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p),\n                map_add' :=\n                  (_ :\n                    ∀ (f g : { x // x ∈ Lp F p }),\n                      Memℒp.toLp ↑↑(f + g) (_ : Memℒp (↑↑(f + g)) p) =\n                        Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p) + Memℒp.toLp ↑↑g (_ : Memℒp (↑↑g) p)) },\n            map_smul' :=\n              (_ :\n                ∀ (c : 𝕜) (f : { x // x ∈ Lp F p }),\n                  Memℒp.toLp ↑↑(c • f) (_ : Memℒp (↑↑(c • f)) p) = c • Memℒp.toLp ↑↑f (_ : Memℒp (↑↑f) p)) }\n        f‖ ≤\n    ‖f‖\n[PROOFSTEP]\nexact norm_Lp_toLp_restrict_le s f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝³ : NormedField 𝕜\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : NormedSpace ℝ E\ns : Set α\n⊢ Continuous fun f => ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nhaveI : Fact ((1 : ℝ≥0∞) ≤ 1) := ⟨le_rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝³ : NormedField 𝕜\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : NormedSpace ℝ E\ns : Set α\nthis : Fact (1 ≤ 1)\n⊢ Continuous fun f => ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nhave h_comp :\n  (fun f : α →₁[μ] E => ∫ x in s, f x ∂μ) = integral (μ.restrict s) ∘ fun f => LpToLpRestrictCLM α E ℝ μ 1 s f :=\n  by\n  ext1 f\n  rw [Function.comp_apply, integral_congr_ae (LpToLpRestrictCLM_coeFn ℝ s f)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝³ : NormedField 𝕜\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : NormedSpace ℝ E\ns : Set α\nthis : Fact (1 ≤ 1)\n⊢ (fun f => ∫ (x : α) in s, ↑↑f x ∂μ) =\n    integral (Measure.restrict μ s) ∘ fun f => ↑↑(↑(LpToLpRestrictCLM α E ℝ μ 1 s) f)\n[PROOFSTEP]\next1 f\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝³ : NormedField 𝕜\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : NormedSpace ℝ E\ns : Set α\nthis : Fact (1 ≤ 1)\nf : { x // x ∈ Lp E 1 }\n⊢ ∫ (x : α) in s, ↑↑f x ∂μ = (integral (Measure.restrict μ s) ∘ fun f => ↑↑(↑(LpToLpRestrictCLM α E ℝ μ 1 s) f)) f\n[PROOFSTEP]\nrw [Function.comp_apply, integral_congr_ae (LpToLpRestrictCLM_coeFn ℝ s f)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝³ : NormedField 𝕜\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : NormedSpace ℝ E\ns : Set α\nthis : Fact (1 ≤ 1)\nh_comp :\n  (fun f => ∫ (x : α) in s, ↑↑f x ∂μ) =\n    integral (Measure.restrict μ s) ∘ fun f => ↑↑(↑(LpToLpRestrictCLM α E ℝ μ 1 s) f)\n⊢ Continuous fun f => ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nrw [h_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\n𝕜 : Type u_5\ninst✝³ : NormedField 𝕜\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : NormedSpace ℝ E\ns : Set α\nthis : Fact (1 ≤ 1)\nh_comp :\n  (fun f => ∫ (x : α) in s, ↑↑f x ∂μ) =\n    integral (Measure.restrict μ s) ∘ fun f => ↑↑(↑(LpToLpRestrictCLM α E ℝ μ 1 s) f)\n⊢ Continuous (integral (Measure.restrict μ s) ∘ fun f => ↑↑(↑(LpToLpRestrictCLM α E ℝ μ 1 s) f))\n[PROOFSTEP]\nexact continuous_integral.comp (LpToLpRestrictCLM α E ℝ μ 1 s).continuous\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\nι : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nl : Filter α\ninst✝ : IsMeasurablyGenerated l\nf : α → E\nb : E\nh : Tendsto f (l ⊓ Measure.ae μ) (𝓝 b)\nhfm : StronglyMeasurableAtFilter f l\nhμ : Measure.FiniteAtFilter μ l\ns : ι → Set α\nli : Filter ι\nhs : Tendsto s li (smallSets l)\nm : optParam (ι → ℝ) fun i => ENNReal.toReal (↑↑μ (s i))\nhsμ : autoParam ((fun i => ENNReal.toReal (↑↑μ (s i))) =ᶠ[li] m) _auto✝\n⊢ (fun i => ∫ (x : α) in s i, f x ∂μ - m i • b) =o[li] m\n[PROOFSTEP]\nsuffices : (fun s => (∫ x in s, f x ∂μ) - (μ s).toReal • b) =o[l.smallSets] fun s => (μ s).toReal\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\nι : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nl : Filter α\ninst✝ : IsMeasurablyGenerated l\nf : α → E\nb : E\nh : Tendsto f (l ⊓ Measure.ae μ) (𝓝 b)\nhfm : StronglyMeasurableAtFilter f l\nhμ : Measure.FiniteAtFilter μ l\ns : ι → Set α\nli : Filter ι\nhs : Tendsto s li (smallSets l)\nm : optParam (ι → ℝ) fun i => ENNReal.toReal (↑↑μ (s i))\nhsμ : autoParam ((fun i => ENNReal.toReal (↑↑μ (s i))) =ᶠ[li] m) _auto✝\nthis : (fun s => ∫ (x : α) in s, f x ∂μ - ENNReal.toReal (↑↑μ s) • b) =o[smallSets l] fun s => ENNReal.toReal (↑↑μ s)\n⊢ (fun i => ∫ (x : α) in s i, f x ∂μ - m i • b) =o[li] m\ncase this\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\nι : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nl : Filter α\ninst✝ : IsMeasurablyGenerated l\nf : α → E\nb : E\nh : Tendsto f (l ⊓ Measure.ae μ) (𝓝 b)\nhfm : StronglyMeasurableAtFilter f l\nhμ : Measure.FiniteAtFilter μ l\ns : ι → Set α\nli : Filter ι\nhs : Tendsto s li (smallSets l)\nm : optParam (ι → ℝ) fun i => ENNReal.toReal (↑↑μ (s i))\nhsμ : autoParam ((fun i => ENNReal.toReal (↑↑μ (s i))) =ᶠ[li] m) _auto✝\n⊢ (fun s => ∫ (x : α) in s, f x ∂μ - ENNReal.toReal (↑↑μ s) • b) =o[smallSets l] fun s => ENNReal.toReal (↑↑μ s)\n[PROOFSTEP]\nexact (this.comp_tendsto hs).congr' (hsμ.mono fun a ha => by dsimp only [Function.comp_apply] at ha ⊢; rw [ha]) hsμ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\nι : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nl : Filter α\ninst✝ : IsMeasurablyGenerated l\nf : α → E\nb : E\nh : Tendsto f (l ⊓ Measure.ae μ) (𝓝 b)\nhfm : StronglyMeasurableAtFilter f l\nhμ : Measure.FiniteAtFilter μ l\ns : ι → Set α\nli : Filter ι\nhs : Tendsto s li (smallSets l)\nm : optParam (ι → ℝ) fun i => ENNReal.toReal (↑↑μ (s i))\nhsμ : autoParam ((fun i => ENNReal.toReal (↑↑μ (s i))) =ᶠ[li] m) _auto✝\nthis : (fun s => ∫ (x : α) in s, f x ∂μ - ENNReal.toReal (↑↑μ s) • b) =o[smallSets l] fun s => ENNReal.toReal (↑↑μ s)\na : ι\nha : (fun i => ENNReal.toReal (↑↑μ (s i))) a = m a\n⊢ ((fun s => ∫ (x : α) in s, f x ∂μ - ENNReal.toReal (↑↑μ s) • b) ∘ s) a =\n    (fun i => ∫ (x : α) in s i, f x ∂μ - m i • b) a\n[PROOFSTEP]\ndsimp only [Function.comp_apply] at ha ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\nι : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nl : Filter α\ninst✝ : IsMeasurablyGenerated l\nf : α → E\nb : E\nh : Tendsto f (l ⊓ Measure.ae μ) (𝓝 b)\nhfm : StronglyMeasurableAtFilter f l\nhμ : Measure.FiniteAtFilter μ l\ns : ι → Set α\nli : Filter ι\nhs : Tendsto s li (smallSets l)\nm : optParam (ι → ℝ) fun i => ENNReal.toReal (↑↑μ (s i))\nhsμ : autoParam ((fun i => ENNReal.toReal (↑↑μ (s i))) =ᶠ[li] m) _auto✝\nthis : (fun s => ∫ (x : α) in s, f x ∂μ - ENNReal.toReal (↑↑μ s) • b) =o[smallSets l] fun s => ENNReal.toReal (↑↑μ s)\na : ι\nha : ENNReal.toReal (↑↑μ (s a)) = m a\n⊢ ∫ (x : α) in s a, f x ∂μ - ENNReal.toReal (↑↑μ (s a)) • b = ∫ (x : α) in s a, f x ∂μ - m a • b\n[PROOFSTEP]\nrw [ha]\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\nι : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nl : Filter α\ninst✝ : IsMeasurablyGenerated l\nf : α → E\nb : E\nh : Tendsto f (l ⊓ Measure.ae μ) (𝓝 b)\nhfm : StronglyMeasurableAtFilter f l\nhμ : Measure.FiniteAtFilter μ l\ns : ι → Set α\nli : Filter ι\nhs : Tendsto s li (smallSets l)\nm : optParam (ι → ℝ) fun i => ENNReal.toReal (↑↑μ (s i))\nhsμ : autoParam ((fun i => ENNReal.toReal (↑↑μ (s i))) =ᶠ[li] m) _auto✝\n⊢ (fun s => ∫ (x : α) in s, f x ∂μ - ENNReal.toReal (↑↑μ s) • b) =o[smallSets l] fun s => ENNReal.toReal (↑↑μ s)\n[PROOFSTEP]\nrefine' isLittleO_iff.2 fun ε ε₀ => _\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\nι : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nl : Filter α\ninst✝ : IsMeasurablyGenerated l\nf : α → E\nb : E\nh : Tendsto f (l ⊓ Measure.ae μ) (𝓝 b)\nhfm : StronglyMeasurableAtFilter f l\nhμ : Measure.FiniteAtFilter μ l\ns : ι → Set α\nli : Filter ι\nhs : Tendsto s li (smallSets l)\nm : optParam (ι → ℝ) fun i => ENNReal.toReal (↑↑μ (s i))\nhsμ : autoParam ((fun i => ENNReal.toReal (↑↑μ (s i))) =ᶠ[li] m) _auto✝\nε : ℝ\nε₀ : 0 < ε\n⊢ ∀ᶠ (x : Set α) in smallSets l, ‖∫ (x : α) in x, f x ∂μ - ENNReal.toReal (↑↑μ x) • b‖ ≤ ε * ‖ENNReal.toReal (↑↑μ x)‖\n[PROOFSTEP]\nhave : ∀ᶠ s in l.smallSets, ∀ᶠ x in μ.ae, x ∈ s → f x ∈ closedBall b ε :=\n  eventually_smallSets_eventually.2 (h.eventually <| closedBall_mem_nhds _ ε₀)\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\nι : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nl : Filter α\ninst✝ : IsMeasurablyGenerated l\nf : α → E\nb : E\nh : Tendsto f (l ⊓ Measure.ae μ) (𝓝 b)\nhfm : StronglyMeasurableAtFilter f l\nhμ : Measure.FiniteAtFilter μ l\ns : ι → Set α\nli : Filter ι\nhs : Tendsto s li (smallSets l)\nm : optParam (ι → ℝ) fun i => ENNReal.toReal (↑↑μ (s i))\nhsμ : autoParam ((fun i => ENNReal.toReal (↑↑μ (s i))) =ᶠ[li] m) _auto✝\nε : ℝ\nε₀ : 0 < ε\nthis : ∀ᶠ (s : Set α) in smallSets l, ∀ᵐ (x : α) ∂μ, x ∈ s → f x ∈ closedBall b ε\n⊢ ∀ᶠ (x : Set α) in smallSets l, ‖∫ (x : α) in x, f x ∂μ - ENNReal.toReal (↑↑μ x) • b‖ ≤ ε * ‖ENNReal.toReal (↑↑μ x)‖\n[PROOFSTEP]\nfilter_upwards [hμ.eventually, (hμ.integrableAtFilter_of_tendsto_ae hfm h).eventually, hfm.eventually, this]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\nι : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nl : Filter α\ninst✝ : IsMeasurablyGenerated l\nf : α → E\nb : E\nh : Tendsto f (l ⊓ Measure.ae μ) (𝓝 b)\nhfm : StronglyMeasurableAtFilter f l\nhμ : Measure.FiniteAtFilter μ l\ns : ι → Set α\nli : Filter ι\nhs : Tendsto s li (smallSets l)\nm : optParam (ι → ℝ) fun i => ENNReal.toReal (↑↑μ (s i))\nhsμ : autoParam ((fun i => ENNReal.toReal (↑↑μ (s i))) =ᶠ[li] m) _auto✝\nε : ℝ\nε₀ : 0 < ε\nthis : ∀ᶠ (s : Set α) in smallSets l, ∀ᵐ (x : α) ∂μ, x ∈ s → f x ∈ closedBall b ε\n⊢ ∀ (a : Set α),\n    ↑↑μ a < ⊤ →\n      IntegrableOn f a →\n        AEStronglyMeasurable f (Measure.restrict μ a) →\n          (∀ᵐ (x : α) ∂μ, x ∈ a → f x ∈ closedBall b ε) →\n            ‖∫ (x : α) in a, f x ∂μ - ENNReal.toReal (↑↑μ a) • b‖ ≤ ε * ‖ENNReal.toReal (↑↑μ a)‖\n[PROOFSTEP]\nsimp only [mem_closedBall, dist_eq_norm]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\nι : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nl : Filter α\ninst✝ : IsMeasurablyGenerated l\nf : α → E\nb : E\nh : Tendsto f (l ⊓ Measure.ae μ) (𝓝 b)\nhfm : StronglyMeasurableAtFilter f l\nhμ : Measure.FiniteAtFilter μ l\ns : ι → Set α\nli : Filter ι\nhs : Tendsto s li (smallSets l)\nm : optParam (ι → ℝ) fun i => ENNReal.toReal (↑↑μ (s i))\nhsμ : autoParam ((fun i => ENNReal.toReal (↑↑μ (s i))) =ᶠ[li] m) _auto✝\nε : ℝ\nε₀ : 0 < ε\nthis : ∀ᶠ (s : Set α) in smallSets l, ∀ᵐ (x : α) ∂μ, x ∈ s → f x ∈ closedBall b ε\n⊢ ∀ (a : Set α),\n    ↑↑μ a < ⊤ →\n      IntegrableOn f a →\n        AEStronglyMeasurable f (Measure.restrict μ a) →\n          (∀ᵐ (x : α) ∂μ, x ∈ a → ‖f x - b‖ ≤ ε) →\n            ‖∫ (x : α) in a, f x ∂μ - ENNReal.toReal (↑↑μ a) • b‖ ≤ ε * ‖ENNReal.toReal (↑↑μ a)‖\n[PROOFSTEP]\nintro s hμs h_integrable hfm h_norm\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\nι : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nl : Filter α\ninst✝ : IsMeasurablyGenerated l\nf : α → E\nb : E\nh : Tendsto f (l ⊓ Measure.ae μ) (𝓝 b)\nhfm✝ : StronglyMeasurableAtFilter f l\nhμ : Measure.FiniteAtFilter μ l\ns✝ : ι → Set α\nli : Filter ι\nhs : Tendsto s✝ li (smallSets l)\nm : optParam (ι → ℝ) fun i => ENNReal.toReal (↑↑μ (s✝ i))\nhsμ : autoParam ((fun i => ENNReal.toReal (↑↑μ (s✝ i))) =ᶠ[li] m) _auto✝\nε : ℝ\nε₀ : 0 < ε\nthis : ∀ᶠ (s : Set α) in smallSets l, ∀ᵐ (x : α) ∂μ, x ∈ s → f x ∈ closedBall b ε\ns : Set α\nhμs : ↑↑μ s < ⊤\nh_integrable : IntegrableOn f s\nhfm : AEStronglyMeasurable f (Measure.restrict μ s)\nh_norm : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖f x - b‖ ≤ ε\n⊢ ‖∫ (x : α) in s, f x ∂μ - ENNReal.toReal (↑↑μ s) • b‖ ≤ ε * ‖ENNReal.toReal (↑↑μ s)‖\n[PROOFSTEP]\nrw [← set_integral_const, ← integral_sub h_integrable (integrableOn_const.2 <| Or.inr hμs), Real.norm_eq_abs,\n  abs_of_nonneg ENNReal.toReal_nonneg]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁴ : MeasurableSpace α\nι : Type u_5\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nμ : Measure α\nl : Filter α\ninst✝ : IsMeasurablyGenerated l\nf : α → E\nb : E\nh : Tendsto f (l ⊓ Measure.ae μ) (𝓝 b)\nhfm✝ : StronglyMeasurableAtFilter f l\nhμ : Measure.FiniteAtFilter μ l\ns✝ : ι → Set α\nli : Filter ι\nhs : Tendsto s✝ li (smallSets l)\nm : optParam (ι → ℝ) fun i => ENNReal.toReal (↑↑μ (s✝ i))\nhsμ : autoParam ((fun i => ENNReal.toReal (↑↑μ (s✝ i))) =ᶠ[li] m) _auto✝\nε : ℝ\nε₀ : 0 < ε\nthis : ∀ᶠ (s : Set α) in smallSets l, ∀ᵐ (x : α) ∂μ, x ∈ s → f x ∈ closedBall b ε\ns : Set α\nhμs : ↑↑μ s < ⊤\nh_integrable : IntegrableOn f s\nhfm : AEStronglyMeasurable f (Measure.restrict μ s)\nh_norm : ∀ᵐ (x : α) ∂μ, x ∈ s → ‖f x - b‖ ≤ ε\n⊢ ‖∫ (a : α) in s, f a - b ∂μ‖ ≤ ε * ENNReal.toReal (↑↑μ s)\n[PROOFSTEP]\nexact norm_set_integral_le_of_norm_le_const_ae' hμs h_norm (hfm.sub aestronglyMeasurable_const)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁷ : MeasurableSpace α\nι : Type u_5\ninst✝⁶ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nL : E →L[𝕜] F\n⊢ Continuous fun φ => ∫ (a : α), ↑L (↑↑φ a) ∂μ\n[PROOFSTEP]\nrw [← funext L.integral_compLp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁷ : MeasurableSpace α\nι : Type u_5\ninst✝⁶ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nL : E →L[𝕜] F\n⊢ Continuous fun x => ∫ (a : α), ↑↑(compLp L x) a ∂μ\n[PROOFSTEP]\nexact continuous_integral.comp (L.compLpL 1 μ).continuous\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\n⊢ ∫ (a : α), ↑L (φ a) ∂μ = ↑L (∫ (a : α), φ a ∂μ)\n[PROOFSTEP]\napply Integrable.induction (P := fun φ => (∫ a, L (φ a) ∂μ) = L (∫ a, φ a ∂μ))\n[GOAL]\ncase h_ind\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\n⊢ ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s →\n      ↑↑?m.376460 s < ⊤ → ∫ (a : α), ↑L (indicator s (fun x => c) a) ∂μ = ↑L (∫ (a : α), indicator s (fun x => c) a ∂μ)\n[PROOFSTEP]\nintro e s s_meas _\n[GOAL]\ncase h_ind\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\ne : E\ns : Set α\ns_meas : MeasurableSet s\na✝ : ↑↑?m.376460 s < ⊤\n⊢ ∫ (a : α), ↑L (indicator s (fun x => e) a) ∂μ = ↑L (∫ (a : α), indicator s (fun x => e) a ∂μ)\n[PROOFSTEP]\nrw [integral_indicator_const e s_meas, ← @smul_one_smul E ℝ 𝕜 _ _ _ _ _ (μ s).toReal e, ContinuousLinearMap.map_smul,\n  @smul_one_smul F ℝ 𝕜 _ _ _ _ _ (μ s).toReal (L e), ← integral_indicator_const (L e) s_meas]\n[GOAL]\ncase h_ind\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\ne : E\ns : Set α\ns_meas : MeasurableSet s\na✝ : ↑↑?m.376460 s < ⊤\n⊢ ∫ (a : α), ↑L (indicator s (fun x => e) a) ∂μ = ∫ (a : α), indicator s (fun x => ↑L e) a ∂μ\n[PROOFSTEP]\ncongr 1 with a\n[GOAL]\ncase h_ind.e_f.h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\ne : E\ns : Set α\ns_meas : MeasurableSet s\na✝ : ↑↑?m.376460 s < ⊤\na : α\n⊢ ↑L (indicator s (fun x => e) a) = indicator s (fun x => ↑L e) a\n[PROOFSTEP]\nerw [Set.indicator_comp_of_zero L.map_zero]\n[GOAL]\ncase h_ind.e_f.h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\ne : E\ns : Set α\ns_meas : MeasurableSet s\na✝ : ↑↑?m.376460 s < ⊤\na : α\n⊢ ↑L (indicator s (fun x => e) a) = (↑L ∘ indicator s fun x => e) a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_add\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\n⊢ ∀ ⦃f g : α → E⦄,\n    Disjoint (support f) (support g) →\n      Integrable f →\n        Integrable g →\n          ∫ (a : α), ↑L (f a) ∂μ = ↑L (∫ (a : α), f a ∂μ) →\n            ∫ (a : α), ↑L (g a) ∂μ = ↑L (∫ (a : α), g a ∂μ) →\n              ∫ (a : α), ↑L ((f + g) a) ∂μ = ↑L (∫ (a : α), (f + g) a ∂μ)\n[PROOFSTEP]\nintro f g _ f_int g_int hf hg\n[GOAL]\ncase h_add\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\nf g : α → E\na✝ : Disjoint (support f) (support g)\nf_int : Integrable f\ng_int : Integrable g\nhf : ∫ (a : α), ↑L (f a) ∂μ = ↑L (∫ (a : α), f a ∂μ)\nhg : ∫ (a : α), ↑L (g a) ∂μ = ↑L (∫ (a : α), g a ∂μ)\n⊢ ∫ (a : α), ↑L ((f + g) a) ∂μ = ↑L (∫ (a : α), (f + g) a ∂μ)\n[PROOFSTEP]\nsimp [L.map_add, integral_add (μ := μ) f_int g_int,\n  integral_add (μ := μ) (L.integrable_comp f_int) (L.integrable_comp g_int), hf, hg]\n[GOAL]\ncase h_closed\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\n⊢ IsClosed {f | ∫ (a : α), ↑L (↑↑f a) ∂μ = ↑L (∫ (a : α), ↑↑f a ∂μ)}\n[PROOFSTEP]\nexact isClosed_eq L.continuous_integral_comp_L1 (L.continuous.comp continuous_integral)\n[GOAL]\ncase h_ae\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\n⊢ ∀ ⦃f g : α → E⦄,\n    f =ᵐ[μ] g →\n      Integrable f → ∫ (a : α), ↑L (f a) ∂μ = ↑L (∫ (a : α), f a ∂μ) → ∫ (a : α), ↑L (g a) ∂μ = ↑L (∫ (a : α), g a ∂μ)\n[PROOFSTEP]\nintro f g hfg _ hf\n[GOAL]\ncase h_ae\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\nf g : α → E\nhfg : f =ᵐ[μ] g\na✝ : Integrable f\nhf : ∫ (a : α), ↑L (f a) ∂μ = ↑L (∫ (a : α), f a ∂μ)\n⊢ ∫ (a : α), ↑L (g a) ∂μ = ↑L (∫ (a : α), g a ∂μ)\n[PROOFSTEP]\nconvert hf using 1\n[GOAL]\ncase h.e'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\nf g : α → E\nhfg : f =ᵐ[μ] g\na✝ : Integrable f\nhf : ∫ (a : α), ↑L (f a) ∂μ = ↑L (∫ (a : α), f a ∂μ)\n⊢ ∫ (a : α), ↑L (g a) ∂μ = ∫ (a : α), ↑L (f a) ∂μ\n[PROOFSTEP]\nclear hf\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\nf g : α → E\nhfg : f =ᵐ[μ] g\na✝ : Integrable f\nhf : ∫ (a : α), ↑L (f a) ∂μ = ↑L (∫ (a : α), f a ∂μ)\n⊢ ↑L (∫ (a : α), g a ∂μ) = ↑L (∫ (a : α), f a ∂μ)\n[PROOFSTEP]\nclear hf\n[GOAL]\ncase h.e'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\nf g : α → E\nhfg : f =ᵐ[μ] g\na✝ : Integrable f\n⊢ ∫ (a : α), ↑L (g a) ∂μ = ∫ (a : α), ↑L (f a) ∂μ\n[PROOFSTEP]\nexact integral_congr_ae (hfg.fun_comp L).symm\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\nf g : α → E\nhfg : f =ᵐ[μ] g\na✝ : Integrable f\n⊢ ↑L (∫ (a : α), g a ∂μ) = ↑L (∫ (a : α), f a ∂μ)\n[PROOFSTEP]\nrw [integral_congr_ae hfg.symm]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\n⊢ Integrable fun a => φ a\n[PROOFSTEP]\nall_goals assumption\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nφ : α → E\nφ_int : Integrable φ\n⊢ Integrable fun a => φ a\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nK : ℝ≥0\nhL : AntilipschitzWith K ↑L\nφ : α → E\n⊢ ∫ (a : α), ↑L (φ a) ∂μ = ↑L (∫ (a : α), φ a ∂μ)\n[PROOFSTEP]\nby_cases h : Integrable φ μ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nK : ℝ≥0\nhL : AntilipschitzWith K ↑L\nφ : α → E\nh : Integrable φ\n⊢ ∫ (a : α), ↑L (φ a) ∂μ = ↑L (∫ (a : α), φ a ∂μ)\n[PROOFSTEP]\nexact integral_comp_comm L h\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nK : ℝ≥0\nhL : AntilipschitzWith K ↑L\nφ : α → E\nh : ¬Integrable φ\n⊢ ∫ (a : α), ↑L (φ a) ∂μ = ↑L (∫ (a : α), φ a ∂μ)\n[PROOFSTEP]\nhave : ¬Integrable (fun a => L (φ a)) μ :=\n  by\n  erw [LipschitzWith.integrable_comp_iff_of_antilipschitz L.lipschitz hL L.map_zero]\n  assumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nK : ℝ≥0\nhL : AntilipschitzWith K ↑L\nφ : α → E\nh : ¬Integrable φ\n⊢ ¬Integrable fun a => ↑L (φ a)\n[PROOFSTEP]\nerw [LipschitzWith.integrable_comp_iff_of_antilipschitz L.lipschitz hL L.map_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nK : ℝ≥0\nhL : AntilipschitzWith K ↑L\nφ : α → E\nh : ¬Integrable φ\n⊢ ¬Integrable fun a => φ a\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace E\ninst✝ : NormedSpace ℝ E\nL : E →L[𝕜] F\nK : ℝ≥0\nhL : AntilipschitzWith K ↑L\nφ : α → E\nh : ¬Integrable φ\nthis : ¬Integrable fun a => ↑L (φ a)\n⊢ ∫ (a : α), ↑L (φ a) ∂μ = ↑L (∫ (a : α), φ a ∂μ)\n[PROOFSTEP]\nsimp [integral_undef, h, this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → 𝕜\nhf : Integrable f\n⊢ ∫ (x : α), ↑(↑IsROrC.re (f x)) ∂μ + (∫ (x : α), ↑(↑IsROrC.im (f x)) ∂μ) * IsROrC.I = ∫ (x : α), f x ∂μ\n[PROOFSTEP]\nrw [mul_comm, ← smul_eq_mul, ← integral_smul, ← integral_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → 𝕜\nhf : Integrable f\n⊢ ∫ (a : α), ↑(↑IsROrC.re (f a)) + IsROrC.I • ↑(↑IsROrC.im (f a)) ∂μ = ∫ (x : α), f x ∂μ\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → 𝕜\nhf : Integrable f\n⊢ (fun a => ↑(↑IsROrC.re (f a)) + IsROrC.I • ↑(↑IsROrC.im (f a))) = fun x => f x\n[PROOFSTEP]\next1 x\n[GOAL]\ncase e_f.h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → 𝕜\nhf : Integrable f\nx : α\n⊢ ↑(↑IsROrC.re (f x)) + IsROrC.I • ↑(↑IsROrC.im (f x)) = f x\n[PROOFSTEP]\nrw [smul_eq_mul, mul_comm, IsROrC.re_add_im]\n[GOAL]\ncase hf\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → 𝕜\nhf : Integrable f\n⊢ Integrable fun x => ↑(↑IsROrC.re (f x))\n[PROOFSTEP]\nexact hf.re.ofReal\n[GOAL]\ncase hg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → 𝕜\nhf : Integrable f\n⊢ Integrable fun a => IsROrC.I • ↑(↑IsROrC.im (f a))\n[PROOFSTEP]\nexact hf.im.ofReal.smul (𝕜 := 𝕜) (β := 𝕜) IsROrC.I\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → 𝕜\nhf : Integrable f\n⊢ ↑(∫ (x : α), ↑IsROrC.re (f x) ∂μ) + ↑(∫ (x : α), ↑IsROrC.im (f x) ∂μ) * IsROrC.I = ∫ (x : α), f x ∂μ\n[PROOFSTEP]\nrw [← integral_ofReal, ← integral_ofReal, integral_coe_re_add_coe_im hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹¹ : MeasurableSpace α\nι : Type u_5\ninst✝¹⁰ : NormedAddCommGroup E\nμ : Measure α\n𝕜✝ : Type u_6\ninst✝⁹ : IsROrC 𝕜✝\ninst✝⁸ : NormedSpace 𝕜✝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜✝ F\np : ℝ≥0∞\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\n𝕜 : Type u_7\ninst✝¹ : IsROrC 𝕜\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\n⊢ ∫ (x : α), f x • c ∂μ = (∫ (x : α), f x ∂μ) • c\n[PROOFSTEP]\nby_cases hf : Integrable f μ\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹¹ : MeasurableSpace α\nι : Type u_5\ninst✝¹⁰ : NormedAddCommGroup E\nμ : Measure α\n𝕜✝ : Type u_6\ninst✝⁹ : IsROrC 𝕜✝\ninst✝⁸ : NormedSpace 𝕜✝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜✝ F\np : ℝ≥0∞\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\n𝕜 : Type u_7\ninst✝¹ : IsROrC 𝕜\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\nhf : Integrable f\n⊢ ∫ (x : α), f x • c ∂μ = (∫ (x : α), f x ∂μ) • c\n[PROOFSTEP]\nexact ((1 : 𝕜 →L[𝕜] 𝕜).smulRight c).integral_comp_comm hf\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹¹ : MeasurableSpace α\nι : Type u_5\ninst✝¹⁰ : NormedAddCommGroup E\nμ : Measure α\n𝕜✝ : Type u_6\ninst✝⁹ : IsROrC 𝕜✝\ninst✝⁸ : NormedSpace 𝕜✝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜✝ F\np : ℝ≥0∞\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\n𝕜 : Type u_7\ninst✝¹ : IsROrC 𝕜\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\nhf : ¬Integrable f\n⊢ ∫ (x : α), f x • c ∂μ = (∫ (x : α), f x ∂μ) • c\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹¹ : MeasurableSpace α\nι : Type u_5\ninst✝¹⁰ : NormedAddCommGroup E\nμ : Measure α\n𝕜✝ : Type u_6\ninst✝⁹ : IsROrC 𝕜✝\ninst✝⁸ : NormedSpace 𝕜✝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜✝ F\np : ℝ≥0∞\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\n𝕜 : Type u_7\ninst✝¹ : IsROrC 𝕜\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\nhf : ¬Integrable f\nhc : c = 0\n⊢ ∫ (x : α), f x • c ∂μ = (∫ (x : α), f x ∂μ) • c\n[PROOFSTEP]\nsimp only [hc, integral_zero, smul_zero]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹¹ : MeasurableSpace α\nι : Type u_5\ninst✝¹⁰ : NormedAddCommGroup E\nμ : Measure α\n𝕜✝ : Type u_6\ninst✝⁹ : IsROrC 𝕜✝\ninst✝⁸ : NormedSpace 𝕜✝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜✝ F\np : ℝ≥0∞\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\n𝕜 : Type u_7\ninst✝¹ : IsROrC 𝕜\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\nhf : ¬Integrable f\nhc : ¬c = 0\n⊢ ∫ (x : α), f x • c ∂μ = (∫ (x : α), f x ∂μ) • c\n[PROOFSTEP]\nrw [integral_undef hf, integral_undef, zero_smul]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹¹ : MeasurableSpace α\nι : Type u_5\ninst✝¹⁰ : NormedAddCommGroup E\nμ : Measure α\n𝕜✝ : Type u_6\ninst✝⁹ : IsROrC 𝕜✝\ninst✝⁸ : NormedSpace 𝕜✝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜✝ F\np : ℝ≥0∞\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\n𝕜 : Type u_7\ninst✝¹ : IsROrC 𝕜\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\nhf : ¬Integrable f\nhc : ¬c = 0\n⊢ ¬Integrable fun x => f x • c\n[PROOFSTEP]\nrw [integrable_smul_const hc]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹¹ : MeasurableSpace α\nι : Type u_5\ninst✝¹⁰ : NormedAddCommGroup E\nμ : Measure α\n𝕜✝ : Type u_6\ninst✝⁹ : IsROrC 𝕜✝\ninst✝⁸ : NormedSpace 𝕜✝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜✝ F\np : ℝ≥0∞\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : CompleteSpace F\ninst✝² : NormedSpace ℝ F\n𝕜 : Type u_7\ninst✝¹ : IsROrC 𝕜\ninst✝ : NormedSpace 𝕜 E\nf : α → 𝕜\nc : E\nhf : ¬Integrable f\nhc : ¬c = 0\n⊢ ¬Integrable fun x => f x\n[PROOFSTEP]\nsimp_rw [hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\n⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ\n[PROOFSTEP]\nby_cases hg : Integrable g (μ.withDensity fun x => f x)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\n⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : ¬Integrable g\n⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : ¬Integrable g\n⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ\n[PROOFSTEP]\nrw [integral_undef hg, integral_undef]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : ¬Integrable g\n⊢ ¬Integrable fun a => f a • g a\n[PROOFSTEP]\nrwa [← integrable_withDensity_iff_integrable_smul f_meas]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\n⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ\n[PROOFSTEP]\nrefine' Integrable.induction (P := fun g => ∫ a, g a ∂μ.withDensity (fun x => f x) = ∫ a, f a • g a ∂μ) _ _ _ _ hg\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\n⊢ ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s →\n      ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤ →\n        (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ)\n          (indicator s fun x => c)\n[PROOFSTEP]\nintro c s s_meas hs\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nc : E\ns : Set α\ns_meas : MeasurableSet s\nhs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤\n⊢ (∫ (a : α), indicator s (fun x => c) a ∂Measure.withDensity μ fun x => ↑(f x)) =\n    ∫ (a : α), f a • indicator s (fun x => c) a ∂μ\n[PROOFSTEP]\nrw [integral_indicator s_meas]\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nc : E\ns : Set α\ns_meas : MeasurableSet s\nhs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤\n⊢ (∫ (x : α) in s, c ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • indicator s (fun x => c) a ∂μ\n[PROOFSTEP]\nsimp_rw [← indicator_smul_apply, integral_indicator s_meas]\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nc : E\ns : Set α\ns_meas : MeasurableSet s\nhs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤\n⊢ (∫ (x : α) in s, c ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (x : α) in s, f x • c ∂μ\n[PROOFSTEP]\nsimp only [s_meas, integral_const, Measure.restrict_apply', univ_inter, withDensity_apply]\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nc : E\ns : Set α\ns_meas : MeasurableSet s\nhs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤\n⊢ ENNReal.toReal (∫⁻ (x : α) in s, ↑(f x) ∂μ) • c = ∫ (x : α) in s, f x • c ∂μ\n[PROOFSTEP]\nrw [lintegral_coe_eq_integral, ENNReal.toReal_ofReal, ← integral_smul_const]\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nc : E\ns : Set α\ns_meas : MeasurableSet s\nhs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤\n⊢ ∫ (x : α) in s, ↑(f x) • c ∂μ = ∫ (x : α) in s, f x • c ∂μ\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos.refine'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nc : E\ns : Set α\ns_meas : MeasurableSet s\nhs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤\n⊢ 0 ≤ ∫ (a : α) in s, ↑(f a) ∂μ\n[PROOFSTEP]\nexact integral_nonneg fun x => NNReal.coe_nonneg _\n[GOAL]\ncase pos.refine'_1.hfi\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nc : E\ns : Set α\ns_meas : MeasurableSet s\nhs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤\n⊢ Integrable fun x => ↑(f x)\n[PROOFSTEP]\nrefine' ⟨f_meas.coe_nnreal_real.aemeasurable.aestronglyMeasurable, _⟩\n[GOAL]\ncase pos.refine'_1.hfi\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nc : E\ns : Set α\ns_meas : MeasurableSet s\nhs : ↑↑(Measure.withDensity μ fun x => ↑(f x)) s < ⊤\n⊢ HasFiniteIntegral fun x => ↑(f x)\n[PROOFSTEP]\nrw [withDensity_apply _ s_meas] at hs \n[GOAL]\ncase pos.refine'_1.hfi\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nc : E\ns : Set α\ns_meas : MeasurableSet s\nhs : ∫⁻ (a : α) in s, ↑(f a) ∂μ < ⊤\n⊢ HasFiniteIntegral fun x => ↑(f x)\n[PROOFSTEP]\nrw [HasFiniteIntegral]\n[GOAL]\ncase pos.refine'_1.hfi\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nc : E\ns : Set α\ns_meas : MeasurableSet s\nhs : ∫⁻ (a : α) in s, ↑(f a) ∂μ < ⊤\n⊢ ∫⁻ (a : α) in s, ↑‖↑(f a)‖₊ ∂μ < ⊤\n[PROOFSTEP]\nconvert hs with x\n[GOAL]\ncase h.e'_3.h.e'_4.h.h.e'_1\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nc : E\ns : Set α\ns_meas : MeasurableSet s\nhs : ∫⁻ (a : α) in s, ↑(f a) ∂μ < ⊤\nx : α\n⊢ ‖↑(f x)‖₊ = f x\n[PROOFSTEP]\nsimp only [NNReal.nnnorm_eq]\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\n⊢ ∀ ⦃f_1 g : α → E⦄,\n    Disjoint (support f_1) (support g) →\n      Integrable f_1 →\n        Integrable g →\n          (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) f_1 →\n            (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) g →\n              (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) (f_1 + g)\n[PROOFSTEP]\nintro u u' _ u_int u'_int h h'\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nu u' : α → E\na✝ : Disjoint (support u) (support u')\nu_int : Integrable u\nu'_int : Integrable u'\nh : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ\nh' : (∫ (a : α), u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u' a ∂μ\n⊢ (∫ (a : α), (u + u') a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • (u + u') a ∂μ\n[PROOFSTEP]\nchange (∫ a : α, u a + u' a ∂μ.withDensity fun x : α => ↑(f x)) = ∫ a : α, f a • (u a + u' a) ∂μ\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nu u' : α → E\na✝ : Disjoint (support u) (support u')\nu_int : Integrable u\nu'_int : Integrable u'\nh : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ\nh' : (∫ (a : α), u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u' a ∂μ\n⊢ (∫ (a : α), u a + u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • (u a + u' a) ∂μ\n[PROOFSTEP]\nsimp_rw [smul_add]\n[GOAL]\ncase pos.refine'_2\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nu u' : α → E\na✝ : Disjoint (support u) (support u')\nu_int : Integrable u\nu'_int : Integrable u'\nh : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ\nh' : (∫ (a : α), u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u' a ∂μ\n⊢ (∫ (a : α), u a + u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a + f a • u' a ∂μ\n[PROOFSTEP]\nrw [integral_add u_int u'_int, h, h', integral_add]\n[GOAL]\ncase pos.refine'_2.hf\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nu u' : α → E\na✝ : Disjoint (support u) (support u')\nu_int : Integrable u\nu'_int : Integrable u'\nh : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ\nh' : (∫ (a : α), u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u' a ∂μ\n⊢ Integrable fun a => f a • u a\n[PROOFSTEP]\nexact (integrable_withDensity_iff_integrable_smul f_meas).1 u_int\n[GOAL]\ncase pos.refine'_2.hg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nu u' : α → E\na✝ : Disjoint (support u) (support u')\nu_int : Integrable u\nu'_int : Integrable u'\nh : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ\nh' : (∫ (a : α), u' a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u' a ∂μ\n⊢ Integrable fun a => f a • u' a\n[PROOFSTEP]\nexact (integrable_withDensity_iff_integrable_smul f_meas).1 u'_int\n[GOAL]\ncase pos.refine'_3\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\n⊢ IsClosed {f_1 | (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) ↑↑f_1}\n[PROOFSTEP]\nhave C1 : Continuous fun u : Lp E 1 (μ.withDensity fun x => f x) => ∫ x, u x ∂μ.withDensity fun x => f x :=\n  continuous_integral\n[GOAL]\ncase pos.refine'_3\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nC1 : Continuous fun u => ∫ (x : α), ↑↑u x ∂Measure.withDensity μ fun x => ↑(f x)\n⊢ IsClosed {f_1 | (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) ↑↑f_1}\n[PROOFSTEP]\nhave C2 : Continuous fun u : Lp E 1 (μ.withDensity fun x => f x) => ∫ x, f x • u x ∂μ :=\n  by\n  have : Continuous ((fun u : Lp E 1 μ => ∫ x, u x ∂μ) ∘ withDensitySMulLI (E := E) μ f_meas) :=\n    continuous_integral.comp (withDensitySMulLI (E := E) μ f_meas).continuous\n  convert this with u\n  simp only [Function.comp_apply, withDensitySMulLI_apply]\n  exact integral_congr_ae (memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nC1 : Continuous fun u => ∫ (x : α), ↑↑u x ∂Measure.withDensity μ fun x => ↑(f x)\n⊢ Continuous fun u => ∫ (x : α), f x • ↑↑u x ∂μ\n[PROOFSTEP]\nhave : Continuous ((fun u : Lp E 1 μ => ∫ x, u x ∂μ) ∘ withDensitySMulLI (E := E) μ f_meas) :=\n  continuous_integral.comp (withDensitySMulLI (E := E) μ f_meas).continuous\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nC1 : Continuous fun u => ∫ (x : α), ↑↑u x ∂Measure.withDensity μ fun x => ↑(f x)\nthis : Continuous ((fun u => ∫ (x : α), ↑↑u x ∂μ) ∘ ↑(withDensitySMulLI μ f_meas))\n⊢ Continuous fun u => ∫ (x : α), f x • ↑↑u x ∂μ\n[PROOFSTEP]\nconvert this with u\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nC1 : Continuous fun u => ∫ (x : α), ↑↑u x ∂Measure.withDensity μ fun x => ↑(f x)\nthis : Continuous ((fun u => ∫ (x : α), ↑↑u x ∂μ) ∘ ↑(withDensitySMulLI μ f_meas))\nu : { x // x ∈ Lp E 1 }\n⊢ ∫ (x : α), f x • ↑↑u x ∂μ = ((fun u => ∫ (x : α), ↑↑u x ∂μ) ∘ ↑(withDensitySMulLI μ f_meas)) u\n[PROOFSTEP]\nsimp only [Function.comp_apply, withDensitySMulLI_apply]\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nC1 : Continuous fun u => ∫ (x : α), ↑↑u x ∂Measure.withDensity μ fun x => ↑(f x)\nthis : Continuous ((fun u => ∫ (x : α), ↑↑u x ∂μ) ∘ ↑(withDensitySMulLI μ f_meas))\nu : { x // x ∈ Lp E 1 }\n⊢ ∫ (x : α), f x • ↑↑u x ∂μ = ∫ (x : α), ↑↑(Memℒp.toLp (fun x => f x • ↑↑u x) (_ : Memℒp (fun x => f x • ↑↑u x) 1)) x ∂μ\n[PROOFSTEP]\nexact integral_congr_ae (memℒ1_smul_of_L1_withDensity f_meas u).coeFn_toLp.symm\n[GOAL]\ncase pos.refine'_3\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nC1 : Continuous fun u => ∫ (x : α), ↑↑u x ∂Measure.withDensity μ fun x => ↑(f x)\nC2 : Continuous fun u => ∫ (x : α), f x • ↑↑u x ∂μ\n⊢ IsClosed {f_1 | (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) ↑↑f_1}\n[PROOFSTEP]\nexact isClosed_eq C1 C2\n[GOAL]\ncase pos.refine'_4\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\n⊢ ∀ ⦃f_1 g : α → E⦄,\n    f_1 =ᵐ[Measure.withDensity μ fun x => ↑(f x)] g →\n      Integrable f_1 →\n        (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) f_1 →\n          (fun g => (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ) g\n[PROOFSTEP]\nintro u v huv _ hu\n[GOAL]\ncase pos.refine'_4\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nu v : α → E\nhuv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v\na✝ : Integrable u\nhu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ\n⊢ (∫ (a : α), v a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • v a ∂μ\n[PROOFSTEP]\nrw [← integral_congr_ae huv, hu]\n[GOAL]\ncase pos.refine'_4\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nu v : α → E\nhuv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v\na✝ : Integrable u\nhu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ\n⊢ ∫ (a : α), f a • u a ∂μ = ∫ (a : α), f a • v a ∂μ\n[PROOFSTEP]\napply integral_congr_ae\n[GOAL]\ncase pos.refine'_4.h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nu v : α → E\nhuv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v\na✝ : Integrable u\nhu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ\n⊢ (fun a => f a • u a) =ᵐ[μ] fun a => f a • v a\n[PROOFSTEP]\nfilter_upwards [(ae_withDensity_iff f_meas.coe_nnreal_ennreal).1 huv] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nu v : α → E\nhuv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v\na✝ : Integrable u\nhu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ\nx : α\nhx : ↑(f x) ≠ 0 → u x = v x\n⊢ f x • u x = f x • v x\n[PROOFSTEP]\nrcases eq_or_ne (f x) 0 with (h'x | h'x)\n[GOAL]\ncase h.inl\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nu v : α → E\nhuv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v\na✝ : Integrable u\nhu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ\nx : α\nhx : ↑(f x) ≠ 0 → u x = v x\nh'x : f x = 0\n⊢ f x • u x = f x • v x\n[PROOFSTEP]\nsimp only [h'x, zero_smul]\n[GOAL]\ncase h.inr\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nu v : α → E\nhuv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v\na✝ : Integrable u\nhu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ\nx : α\nhx : ↑(f x) ≠ 0 → u x = v x\nh'x : f x ≠ 0\n⊢ f x • u x = f x • v x\n[PROOFSTEP]\nrw [hx _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\nhg : Integrable g\nu v : α → E\nhuv : u =ᵐ[Measure.withDensity μ fun x => ↑(f x)] v\na✝ : Integrable u\nhu : (∫ (a : α), u a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • u a ∂μ\nx : α\nhx : ↑(f x) ≠ 0 → u x = v x\nh'x : f x ≠ 0\n⊢ ↑(f x) ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, ENNReal.coe_eq_zero] using h'x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\n⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ\n[PROOFSTEP]\nlet f' := hf.mk _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\nf' : α → ℝ≥0 := AEMeasurable.mk f hf\n⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), f a • g a ∂μ\n[PROOFSTEP]\ncalc\n  ∫ a, g a ∂μ.withDensity (fun x => f x) = ∫ a, g a ∂μ.withDensity fun x => f' x :=\n    by\n    congr 1\n    apply withDensity_congr_ae\n    filter_upwards [hf.ae_eq_mk] with x hx\n    rw [hx]\n  _ = ∫ a, f' a • g a ∂μ := (integral_withDensity_eq_integral_smul hf.measurable_mk _)\n  _ = ∫ a, f a • g a ∂μ := by\n    apply integral_congr_ae\n    filter_upwards [hf.ae_eq_mk] with x hx\n    rw [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\nf' : α → ℝ≥0 := AEMeasurable.mk f hf\n⊢ (∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α), g a ∂Measure.withDensity μ fun x => ↑(f' x)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_μ\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\nf' : α → ℝ≥0 := AEMeasurable.mk f hf\n⊢ (Measure.withDensity μ fun x => ↑(f x)) = Measure.withDensity μ fun x => ↑(f' x)\n[PROOFSTEP]\napply withDensity_congr_ae\n[GOAL]\ncase e_μ.h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\nf' : α → ℝ≥0 := AEMeasurable.mk f hf\n⊢ (fun x => ↑(f x)) =ᵐ[μ] fun x => ↑(f' x)\n[PROOFSTEP]\nfilter_upwards [hf.ae_eq_mk] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\nf' : α → ℝ≥0 := AEMeasurable.mk f hf\nx : α\nhx : f x = AEMeasurable.mk f hf x\n⊢ ↑(f x) = ↑(AEMeasurable.mk f hf x)\n[PROOFSTEP]\nrw [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\nf' : α → ℝ≥0 := AEMeasurable.mk f hf\n⊢ ∫ (a : α), f' a • g a ∂μ = ∫ (a : α), f a • g a ∂μ\n[PROOFSTEP]\napply integral_congr_ae\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\nf' : α → ℝ≥0 := AEMeasurable.mk f hf\n⊢ (fun a => f' a • g a) =ᵐ[μ] fun a => f a • g a\n[PROOFSTEP]\nfilter_upwards [hf.ae_eq_mk] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nhf : AEMeasurable f\ng : α → E\nf' : α → ℝ≥0 := AEMeasurable.mk f hf\nx : α\nhx : f x = AEMeasurable.mk f hf x\n⊢ AEMeasurable.mk f hf x • g x = f x • g x\n[PROOFSTEP]\nrw [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\nf_meas : Measurable f\ng : α → E\ns : Set α\nhs : MeasurableSet s\n⊢ (∫ (a : α) in s, g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α) in s, f a • g a ∂μ\n[PROOFSTEP]\nrw [restrict_withDensity hs, integral_withDensity_eq_integral_smul f_meas]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁹ : MeasurableSpace α\nι : Type u_5\ninst✝⁸ : NormedAddCommGroup E\nμ : Measure α\n𝕜 : Type u_6\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\np : ℝ≥0∞\ninst✝³ : CompleteSpace E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace F\ninst✝ : NormedSpace ℝ F\nf : α → ℝ≥0\ns : Set α\nhf : AEMeasurable f\ng : α → E\nhs : MeasurableSet s\n⊢ (∫ (a : α) in s, g a ∂Measure.withDensity μ fun x => ↑(f x)) = ∫ (a : α) in s, f a • g a ∂μ\n[PROOFSTEP]\nrw [restrict_withDensity hs, integral_withDensity_eq_integral_smul₀ hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nι : Type u_5\ninst✝¹ : NormedAddCommGroup E✝\ninst✝ : PseudoEMetricSpace α\nμ : Measure α\nE : Set α\nE_mble : MeasurableSet E\nδ : ℝ\n⊢ ↑↑μ E ≤ ∫⁻ (a : α), thickenedIndicatorAux δ E a ∂μ\n[PROOFSTEP]\nconvert_to lintegral μ (E.indicator fun _ => (1 : ℝ≥0∞)) ≤ lintegral μ (thickenedIndicatorAux δ E)\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nι : Type u_5\ninst✝¹ : NormedAddCommGroup E✝\ninst✝ : PseudoEMetricSpace α\nμ : Measure α\nE : Set α\nE_mble : MeasurableSet E\nδ : ℝ\n⊢ ↑↑μ E = lintegral μ (indicator E fun x => 1)\n[PROOFSTEP]\nrw [lintegral_indicator _ E_mble]\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nι : Type u_5\ninst✝¹ : NormedAddCommGroup E✝\ninst✝ : PseudoEMetricSpace α\nμ : Measure α\nE : Set α\nE_mble : MeasurableSet E\nδ : ℝ\n⊢ ↑↑μ E = ∫⁻ (a : α) in E, 1 ∂μ\n[PROOFSTEP]\nsimp only [lintegral_one, Measure.restrict_apply, MeasurableSet.univ, univ_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nι : Type u_5\ninst✝¹ : NormedAddCommGroup E✝\ninst✝ : PseudoEMetricSpace α\nμ : Measure α\nE : Set α\nE_mble : MeasurableSet E\nδ : ℝ\n⊢ lintegral μ (indicator E fun x => 1) ≤ lintegral μ (thickenedIndicatorAux δ E)\n[PROOFSTEP]\napply lintegral_mono\n[GOAL]\ncase hfg\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nι : Type u_5\ninst✝¹ : NormedAddCommGroup E✝\ninst✝ : PseudoEMetricSpace α\nμ : Measure α\nE : Set α\nE_mble : MeasurableSet E\nδ : ℝ\n⊢ (fun a => indicator E (fun x => 1) a) ≤ fun a => thickenedIndicatorAux δ E a\n[PROOFSTEP]\napply indicator_le_thickenedIndicatorAux\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nι : Type u_5\ninst✝¹ : NormedAddCommGroup E✝\ninst✝ : PseudoEMetricSpace α\nμ : Measure α\nE : Set α\nE_mble : MeasurableSet E\nδ : ℝ\nδ_pos : 0 < δ\n⊢ ↑↑μ E ≤ ∫⁻ (a : α), ↑(↑(thickenedIndicator δ_pos E) a) ∂μ\n[PROOFSTEP]\nconvert measure_le_lintegral_thickenedIndicatorAux μ E_mble δ\n[GOAL]\ncase h.e'_4.h.e'_4.h\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nι : Type u_5\ninst✝¹ : NormedAddCommGroup E✝\ninst✝ : PseudoEMetricSpace α\nμ : Measure α\nE : Set α\nE_mble : MeasurableSet E\nδ : ℝ\nδ_pos : 0 < δ\nx✝ : α\n⊢ ↑(↑(thickenedIndicator δ_pos E) x✝) = thickenedIndicatorAux δ E x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_4.h.e'_4.h\nα : Type u_1\nβ : Type u_2\nE✝ : Type u_3\nF : Type u_4\ninst✝² : MeasurableSpace α\nι : Type u_5\ninst✝¹ : NormedAddCommGroup E✝\ninst✝ : PseudoEMetricSpace α\nμ : Measure α\nE : Set α\nE_mble : MeasurableSet E\nδ : ℝ\nδ_pos : 0 < δ\nx✝ : α\n⊢ ↑(ENNReal.toNNReal (thickenedIndicatorAux δ E x✝)) = thickenedIndicatorAux δ E x✝\n[PROOFSTEP]\nsimp only [thickenedIndicatorAux_lt_top.ne, ENNReal.coe_toNNReal, Ne.def, not_false_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\nι : Type u_5\ninst✝ : NormedAddCommGroup E\nf : β → ℝ\nm m0 : MeasurableSpace β\nμ : Measure β\ng : SimpleFunc β ℝ\nhf : Integrable f\n⊢ Integrable (↑g * f)\n[PROOFSTEP]\nrefine'\n  SimpleFunc.induction (fun c s hs => _)\n    (fun g₁ g₂ _ h_int₁ h_int₂ => (h_int₁.add h_int₂).congr (by rw [SimpleFunc.coe_add, add_mul])) g\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\nι : Type u_5\ninst✝ : NormedAddCommGroup E\nf : β → ℝ\nm m0 : MeasurableSpace β\nμ : Measure β\ng : SimpleFunc β ℝ\nhf : Integrable f\ng₁ g₂ : SimpleFunc β ℝ\nx✝ : Disjoint (support ↑g₁) (support ↑g₂)\nh_int₁ : Integrable (↑g₁ * f)\nh_int₂ : Integrable (↑g₂ * f)\n⊢ ↑g₁ * f + ↑g₂ * f =ᵐ[μ] ↑(g₁ + g₂) * f\n[PROOFSTEP]\nrw [SimpleFunc.coe_add, add_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\nι : Type u_5\ninst✝ : NormedAddCommGroup E\nf : β → ℝ\nm m0 : MeasurableSpace β\nμ : Measure β\ng : SimpleFunc β ℝ\nhf : Integrable f\nc : ℝ\ns : Set β\nhs : MeasurableSet s\n⊢ Integrable (↑(SimpleFunc.piecewise s hs (SimpleFunc.const β c) (SimpleFunc.const β 0)) * f)\n[PROOFSTEP]\nsimp only [SimpleFunc.const_zero, SimpleFunc.coe_piecewise, SimpleFunc.coe_const, SimpleFunc.coe_zero,\n  Set.piecewise_eq_indicator]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\nι : Type u_5\ninst✝ : NormedAddCommGroup E\nf : β → ℝ\nm m0 : MeasurableSpace β\nμ : Measure β\ng : SimpleFunc β ℝ\nhf : Integrable f\nc : ℝ\ns : Set β\nhs : MeasurableSet s\n⊢ Integrable (Set.indicator s (const β c) * f)\n[PROOFSTEP]\nhave : Set.indicator s (Function.const β c) * f = s.indicator (c • f) :=\n  by\n  ext1 x\n  by_cases hx : x ∈ s\n  · simp only [hx, Pi.mul_apply, Set.indicator_of_mem, Pi.smul_apply, Algebra.id.smul_eq_mul, ← Function.const_def]\n  · simp only [hx, Pi.mul_apply, Set.indicator_of_not_mem, not_false_iff, zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\nι : Type u_5\ninst✝ : NormedAddCommGroup E\nf : β → ℝ\nm m0 : MeasurableSpace β\nμ : Measure β\ng : SimpleFunc β ℝ\nhf : Integrable f\nc : ℝ\ns : Set β\nhs : MeasurableSet s\n⊢ Set.indicator s (const β c) * f = Set.indicator s (c • f)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\nι : Type u_5\ninst✝ : NormedAddCommGroup E\nf : β → ℝ\nm m0 : MeasurableSpace β\nμ : Measure β\ng : SimpleFunc β ℝ\nhf : Integrable f\nc : ℝ\ns : Set β\nhs : MeasurableSet s\nx : β\n⊢ (Set.indicator s (const β c) * f) x = Set.indicator s (c • f) x\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\nι : Type u_5\ninst✝ : NormedAddCommGroup E\nf : β → ℝ\nm m0 : MeasurableSpace β\nμ : Measure β\ng : SimpleFunc β ℝ\nhf : Integrable f\nc : ℝ\ns : Set β\nhs : MeasurableSet s\nx : β\nhx : x ∈ s\n⊢ (Set.indicator s (const β c) * f) x = Set.indicator s (c • f) x\n[PROOFSTEP]\nsimp only [hx, Pi.mul_apply, Set.indicator_of_mem, Pi.smul_apply, Algebra.id.smul_eq_mul, ← Function.const_def]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\nι : Type u_5\ninst✝ : NormedAddCommGroup E\nf : β → ℝ\nm m0 : MeasurableSpace β\nμ : Measure β\ng : SimpleFunc β ℝ\nhf : Integrable f\nc : ℝ\ns : Set β\nhs : MeasurableSet s\nx : β\nhx : ¬x ∈ s\n⊢ (Set.indicator s (const β c) * f) x = Set.indicator s (c • f) x\n[PROOFSTEP]\nsimp only [hx, Pi.mul_apply, Set.indicator_of_not_mem, not_false_iff, zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\nι : Type u_5\ninst✝ : NormedAddCommGroup E\nf : β → ℝ\nm m0 : MeasurableSpace β\nμ : Measure β\ng : SimpleFunc β ℝ\nhf : Integrable f\nc : ℝ\ns : Set β\nhs : MeasurableSet s\nthis : Set.indicator s (const β c) * f = Set.indicator s (c • f)\n⊢ Integrable (Set.indicator s (const β c) * f)\n[PROOFSTEP]\nrw [this, integrable_indicator_iff hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\nι : Type u_5\ninst✝ : NormedAddCommGroup E\nf : β → ℝ\nm m0 : MeasurableSpace β\nμ : Measure β\ng : SimpleFunc β ℝ\nhf : Integrable f\nc : ℝ\ns : Set β\nhs : MeasurableSet s\nthis : Set.indicator s (const β c) * f = Set.indicator s (c • f)\n⊢ IntegrableOn (c • f) s\n[PROOFSTEP]\nexact (hf.smul c).integrableOn\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\nι : Type u_5\ninst✝ : NormedAddCommGroup E\nf : β → ℝ\nm m0 : MeasurableSpace β\nμ : Measure β\nhm : m ≤ m0\ng : SimpleFunc β ℝ\nhf : Integrable f\n⊢ Integrable (↑g * f)\n[PROOFSTEP]\nrw [← SimpleFunc.coe_toLargerSpace_eq hm g]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝¹ : MeasurableSpace α\nι : Type u_5\ninst✝ : NormedAddCommGroup E\nf : β → ℝ\nm m0 : MeasurableSpace β\nμ : Measure β\nhm : m ≤ m0\ng : SimpleFunc β ℝ\nhf : Integrable f\n⊢ Integrable (↑(SimpleFunc.toLargerSpace hm g) * f)\n[PROOFSTEP]\nexact hf.simpleFunc_mul (g.toLargerSpace hm)\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Integral.SetIntegral", "llama_tokens": 109686, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6619228758499941, "lm_q2_score": 0.5312093733737563, "lm_q1q2_score": 0.35161963610203006}}
{"text": "[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' f g : MultilinearMap R M₁ M₂\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' g : MultilinearMap R M₁ M₂\ntoFun✝ : ((i : ι) → M₁ i) → M₂\nmap_add'✝ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n    toFun✝ (update m i (x + y)) = toFun✝ (update m i x) + toFun✝ (update m i y)\nmap_smul'✝ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n    toFun✝ (update m i (c • x)) = c • toFun✝ (update m i x)\nh : (fun f => f.toFun) { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ } = (fun f => f.toFun) g\n⊢ { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ntoFun✝¹ : ((i : ι) → M₁ i) → M₂\nmap_add'✝¹ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n    toFun✝¹ (update m i (x + y)) = toFun✝¹ (update m i x) + toFun✝¹ (update m i y)\nmap_smul'✝¹ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n    toFun✝¹ (update m i (c • x)) = c • toFun✝¹ (update m i x)\ntoFun✝ : ((i : ι) → M₁ i) → M₂\nmap_add'✝ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n    toFun✝ (update m i (x + y)) = toFun✝ (update m i x) + toFun✝ (update m i y)\nmap_smul'✝ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n    toFun✝ (update m i (c • x)) = c • toFun✝ (update m i x)\nh :\n  (fun f => f.toFun) { toFun := toFun✝¹, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\n    (fun f => f.toFun) { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ }\n⊢ { toFun := toFun✝¹, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\n    { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ }\n[PROOFSTEP]\ncases h\n[GOAL]\ncase mk.mk.refl\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ntoFun✝ : ((i : ι) → M₁ i) → M₂\nmap_add'✝¹ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n    toFun✝ (update m i (x + y)) = toFun✝ (update m i x) + toFun✝ (update m i y)\nmap_smul'✝¹ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n    toFun✝ (update m i (c • x)) = c • toFun✝ (update m i x)\nmap_add'✝ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n    toFun✝ (update m i (x + y)) = toFun✝ (update m i x) + toFun✝ (update m i y)\nmap_smul'✝ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n    toFun✝ (update m i (c • x)) = c • toFun✝ (update m i x)\n⊢ { toFun := toFun✝, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\n    { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\n⊢ Injective FunLike.coe\n[PROOFSTEP]\nintro f g h\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' f g : MultilinearMap R M₁ M₂\nh : ↑f = ↑g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' g : MultilinearMap R M₁ M₂\ntoFun✝ : ((i : ι) → M₁ i) → M₂\nmap_add'✝ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n    toFun✝ (update m i (x + y)) = toFun✝ (update m i x) + toFun✝ (update m i y)\nmap_smul'✝ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n    toFun✝ (update m i (c • x)) = c • toFun✝ (update m i x)\nh : ↑{ toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ } = ↑g\n⊢ { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ntoFun✝¹ : ((i : ι) → M₁ i) → M₂\nmap_add'✝¹ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n    toFun✝¹ (update m i (x + y)) = toFun✝¹ (update m i x) + toFun✝¹ (update m i y)\nmap_smul'✝¹ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n    toFun✝¹ (update m i (c • x)) = c • toFun✝¹ (update m i x)\ntoFun✝ : ((i : ι) → M₁ i) → M₂\nmap_add'✝ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n    toFun✝ (update m i (x + y)) = toFun✝ (update m i x) + toFun✝ (update m i y)\nmap_smul'✝ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n    toFun✝ (update m i (c • x)) = c • toFun✝ (update m i x)\nh :\n  ↑{ toFun := toFun✝¹, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\n    ↑{ toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ }\n⊢ { toFun := toFun✝¹, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\n    { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ }\n[PROOFSTEP]\ncases h\n[GOAL]\ncase mk.mk.refl\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ntoFun✝ : ((i : ι) → M₁ i) → M₂\nmap_add'✝¹ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n    toFun✝ (update m i (x + y)) = toFun✝ (update m i x) + toFun✝ (update m i y)\nmap_smul'✝¹ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n    toFun✝ (update m i (c • x)) = c • toFun✝ (update m i x)\nmap_add'✝ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n    toFun✝ (update m i (x + y)) = toFun✝ (update m i x) + toFun✝ (update m i y)\nmap_smul'✝ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n    toFun✝ (update m i (c • x)) = c • toFun✝ (update m i x)\n⊢ { toFun := toFun✝, map_add' := map_add'✝¹, map_smul' := map_smul'✝¹ } =\n    { toFun := toFun✝, map_add' := map_add'✝, map_smul' := map_smul'✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' f : MultilinearMap R M₁ M₂\nh₁ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n    ↑f (update m i (x + y)) = ↑f (update m i x) + ↑f (update m i y)\nh₂ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n    ↑f (update m i (c • x)) = c • ↑f (update m i x)\n⊢ { toFun := ↑f, map_add' := h₁, map_smul' := h₂ } = f\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' f : MultilinearMap R M₁ M₂\nh₁ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n    ↑f (update m i (x + y)) = ↑f (update m i x) + ↑f (update m i y)\nh₂ :\n  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n    ↑f (update m i (c • x)) = c • ↑f (update m i x)\nx✝ : (i : ι) → M₁ i\n⊢ ↑{ toFun := ↑f, map_add' := h₁, map_smul' := h₂ } x✝ = ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nm : (i : ι) → M₁ i\ni : ι\nh : m i = 0\n⊢ ↑f m = 0\n[PROOFSTEP]\nclassical\nhave : (0 : R) • (0 : M₁ i) = 0 := by simp\nrw [← update_eq_self i m, h, ← this, f.map_smul, zero_smul R (M := M₂)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nm : (i : ι) → M₁ i\ni : ι\nh : m i = 0\n⊢ ↑f m = 0\n[PROOFSTEP]\nhave : (0 : R) • (0 : M₁ i) = 0 := by simp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nm : (i : ι) → M₁ i\ni : ι\nh : m i = 0\n⊢ 0 • 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nm : (i : ι) → M₁ i\ni : ι\nh : m i = 0\nthis : 0 • 0 = 0\n⊢ ↑f m = 0\n[PROOFSTEP]\nrw [← update_eq_self i m, h, ← this, f.map_smul, zero_smul R (M := M₂)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Nonempty ι\n⊢ ↑f 0 = 0\n[PROOFSTEP]\nobtain ⟨i, _⟩ : ∃ i : ι, i ∈ Set.univ := Set.exists_mem_of_nonempty ι\n[GOAL]\ncase intro\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Nonempty ι\ni : ι\nh✝ : i ∈ univ\n⊢ ↑f 0 = 0\n[PROOFSTEP]\nexact map_coord_zero f i rfl\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf✝ f'✝ f f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\n⊢ (fun x => ↑f x + ↑f' x) (update m i (x + y)) =\n    (fun x => ↑f x + ↑f' x) (update m i x) + (fun x => ↑f x + ↑f' x) (update m i y)\n[PROOFSTEP]\nsimp [add_left_comm, add_assoc]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf✝ f'✝ f f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nx : M₁ i\n⊢ (fun x => ↑f x + ↑f' x) (update m i (c • x)) = c • (fun x => ↑f x + ↑f' x) (update m i x)\n[PROOFSTEP]\nsimp [smul_add]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nx✝² : (i : ι) → M₁ i\ni : ι\nx✝¹ x✝ : M₁ i\n⊢ (fun x => 0) (update x✝² i (x✝¹ + x✝)) = (fun x => 0) (update x✝² i x✝¹) + (fun x => 0) (update x✝² i x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nx✝¹ : (i : ι) → M₁ i\ni : ι\nc : R\nx✝ : M₁ i\n⊢ (fun x => 0) (update x✝¹ i (c • x✝)) = c • (fun x => 0) (update x✝¹ i x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁵ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M'\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\ninst✝⁸ : Module R M₃\ninst✝⁷ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁶ : Monoid R'\ninst✝⁵ : Semiring A\ninst✝⁴ : (i : ι) → Module A (M₁ i)\ninst✝³ : DistribMulAction R' M₂\ninst✝² : Module A M₂\ninst✝¹ : SMulCommClass A R' M₂\nc : R'\nf : MultilinearMap A M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\n⊢ (fun m => c • ↑f m) (update m i (x + y)) = (fun m => c • ↑f m) (update m i x) + (fun m => c • ↑f m) (update m i y)\n[PROOFSTEP]\nsimp [smul_add]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁵ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M'\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\ninst✝⁸ : Module R M₃\ninst✝⁷ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁶ : Monoid R'\ninst✝⁵ : Semiring A\ninst✝⁴ : (i : ι) → Module A (M₁ i)\ninst✝³ : DistribMulAction R' M₂\ninst✝² : Module A M₂\ninst✝¹ : SMulCommClass A R' M₂\nc : R'\nf : MultilinearMap A M₁ M₂\ninst✝ : DecidableEq ι\nl : (i : ι) → M₁ i\ni : ι\nx : A\nd : M₁ i\n⊢ (fun m => c • ↑f m) (update l i (x • d)) = x • (fun m => c • ↑f m) (update l i d)\n[PROOFSTEP]\nsimp [← smul_comm x c (_ : M₂)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nα : Type u_1\nf : α → MultilinearMap R M₁ M₂\nm : (i : ι) → M₁ i\n⊢ ∀ {s : Finset α}, ↑(∑ a in s, f a) m = ∑ a in s, ↑(f a) m\n[PROOFSTEP]\nclassical\napply Finset.induction\n· rw [Finset.sum_empty]\n  simp\n· intro a s has H\n  rw [Finset.sum_insert has]\n  simp [H, has]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nα : Type u_1\nf : α → MultilinearMap R M₁ M₂\nm : (i : ι) → M₁ i\n⊢ ∀ {s : Finset α}, ↑(∑ a in s, f a) m = ∑ a in s, ↑(f a) m\n[PROOFSTEP]\napply Finset.induction\n[GOAL]\ncase empty\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nα : Type u_1\nf : α → MultilinearMap R M₁ M₂\nm : (i : ι) → M₁ i\n⊢ ↑(∑ a in ∅, f a) m = ∑ a in ∅, ↑(f a) m\n[PROOFSTEP]\nrw [Finset.sum_empty]\n[GOAL]\ncase empty\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nα : Type u_1\nf : α → MultilinearMap R M₁ M₂\nm : (i : ι) → M₁ i\n⊢ ↑0 m = ∑ a in ∅, ↑(f a) m\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nα : Type u_1\nf : α → MultilinearMap R M₁ M₂\nm : (i : ι) → M₁ i\n⊢ ∀ ⦃a : α⦄ {s : Finset α},\n    ¬a ∈ s → ↑(∑ a in s, f a) m = ∑ a in s, ↑(f a) m → ↑(∑ a in insert a s, f a) m = ∑ a in insert a s, ↑(f a) m\n[PROOFSTEP]\nintro a s has H\n[GOAL]\ncase insert\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nα : Type u_1\nf : α → MultilinearMap R M₁ M₂\nm : (i : ι) → M₁ i\na : α\ns : Finset α\nhas : ¬a ∈ s\nH : ↑(∑ a in s, f a) m = ∑ a in s, ↑(f a) m\n⊢ ↑(∑ a in insert a s, f a) m = ∑ a in insert a s, ↑(f a) m\n[PROOFSTEP]\nrw [Finset.sum_insert has]\n[GOAL]\ncase insert\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nα : Type u_1\nf : α → MultilinearMap R M₁ M₂\nm : (i : ι) → M₁ i\na : α\ns : Finset α\nhas : ¬a ∈ s\nH : ↑(∑ a in s, f a) m = ∑ a in s, ↑(f a) m\n⊢ ↑(f a + ∑ x in s, f x) m = ∑ a in insert a s, ↑(f a) m\n[PROOFSTEP]\nsimp [H, has]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\n⊢ (fun x => ↑f (update m i x)) (x + y) = (fun x => ↑f (update m i x)) x + (fun x => ↑f (update m i x)) y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nx : M₁ i\n⊢ AddHom.toFun\n      { toFun := fun x => ↑f (update m i x),\n        map_add' := (_ : ∀ (x y : M₁ i), ↑f (update m i (x + y)) = ↑f (update m i x) + ↑f (update m i y)) }\n      (c • x) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := fun x => ↑f (update m i x),\n          map_add' := (_ : ∀ (x y : M₁ i), ↑f (update m i (x + y)) = ↑f (update m i x) + ↑f (update m i y)) }\n        x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf✝ f' f : MultilinearMap R M₁ M₂\ng : MultilinearMap R M₁ M₃\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\n⊢ (fun m => (↑f m, ↑g m)) (update m i (x + y)) =\n    (fun m => (↑f m, ↑g m)) (update m i x) + (fun m => (↑f m, ↑g m)) (update m i y)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf✝ f' f : MultilinearMap R M₁ M₂\ng : MultilinearMap R M₁ M₃\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nx : M₁ i\n⊢ (fun m => (↑f m, ↑g m)) (update m i (c • x)) = c • (fun m => (↑f m, ↑g m)) (update m i x)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝¹ : Subsingleton ι\ni' : ι\ninst✝ : DecidableEq ι\nm : ι → M₂\ni : ι\nx y : M₂\n⊢ eval i' (update m i (x + y)) = eval i' (update m i x) + eval i' (update m i y)\n[PROOFSTEP]\nrw [Subsingleton.elim i i']\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝¹ : Subsingleton ι\ni' : ι\ninst✝ : DecidableEq ι\nm : ι → M₂\ni : ι\nx y : M₂\n⊢ eval i' (update m i' (x + y)) = eval i' (update m i' x) + eval i' (update m i' y)\n[PROOFSTEP]\nsimp only [Function.eval, Function.update_same]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝¹ : Subsingleton ι\ni' : ι\ninst✝ : DecidableEq ι\nm : ι → M₂\ni : ι\nr : R\nx : M₂\n⊢ eval i' (update m i (r • x)) = r • eval i' (update m i x)\n[PROOFSTEP]\nrw [Subsingleton.elim i i']\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝¹ : Subsingleton ι\ni' : ι\ninst✝ : DecidableEq ι\nm : ι → M₂\ni : ι\nr : R\nx : M₂\n⊢ eval i' (update m i' (r • x)) = r • eval i' (update m i' x)\n[PROOFSTEP]\nsimp only [Function.eval, Function.update_same]\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nk n : ℕ\nf : MultilinearMap R (fun x => M') M₂\ns : Finset (Fin n)\nhk : Finset.card s = k\nz : M'\ninst✝ : DecidableEq (Fin k)\nv : Fin k → M'\ni : Fin k\nx y : M'\n⊢ (fun v =>\n        ↑f fun j =>\n          if h : j ∈ s then v (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)\n      (update v i (x + y)) =\n    (fun v =>\n          ↑f fun j =>\n            if h : j ∈ s then v (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)\n        (update v i x) +\n      (fun v =>\n          ↑f fun j =>\n            if h : j ∈ s then v (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)\n        (update v i y)\n[PROOFSTEP]\nhave : FunLike.coe (s.orderIsoOfFin hk).symm = (s.orderIsoOfFin hk).toEquiv.symm := rfl\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nk n : ℕ\nf : MultilinearMap R (fun x => M') M₂\ns : Finset (Fin n)\nhk : Finset.card s = k\nz : M'\ninst✝ : DecidableEq (Fin k)\nv : Fin k → M'\ni : Fin k\nx y : M'\nthis : ↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) = ↑(Finset.orderIsoOfFin s hk).symm\n⊢ (fun v =>\n        ↑f fun j =>\n          if h : j ∈ s then v (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)\n      (update v i (x + y)) =\n    (fun v =>\n          ↑f fun j =>\n            if h : j ∈ s then v (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)\n        (update v i x) +\n      (fun v =>\n          ↑f fun j =>\n            if h : j ∈ s then v (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)\n        (update v i y)\n[PROOFSTEP]\nsimp only [this]\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nk n : ℕ\nf : MultilinearMap R (fun x => M') M₂\ns : Finset (Fin n)\nhk : Finset.card s = k\nz : M'\ninst✝ : DecidableEq (Fin k)\nv : Fin k → M'\ni : Fin k\nx y : M'\nthis : ↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) = ↑(Finset.orderIsoOfFin s hk).symm\n⊢ (↑f fun j =>\n      if h : j ∈ s then update v i (x + y) (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h })\n      else z) =\n    (↑f fun j =>\n        if h : j ∈ s then update v i x (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h })\n        else z) +\n      ↑f fun j =>\n        if h : j ∈ s then update v i y (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z\n[PROOFSTEP]\nerw [dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv, dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv,\n  dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv]\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nk n : ℕ\nf : MultilinearMap R (fun x => M') M₂\ns : Finset (Fin n)\nhk : Finset.card s = k\nz : M'\ninst✝ : DecidableEq (Fin k)\nv : Fin k → M'\ni : Fin k\nx y : M'\nthis : ↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) = ↑(Finset.orderIsoOfFin s hk).symm\n⊢ ↑f\n      (update (fun i => if h : i ∈ s then v (↑(Finset.orderIsoOfFin s hk).symm { val := i, property := h }) else z)\n        (↑(↑(Finset.orderIsoOfFin s hk).toEquiv i)) (x + y)) =\n    ↑f\n        (update (fun i => if h : i ∈ s then v (↑(Finset.orderIsoOfFin s hk).symm { val := i, property := h }) else z)\n          (↑(↑(Finset.orderIsoOfFin s hk).toEquiv i)) x) +\n      ↑f\n        (update (fun i => if h : i ∈ s then v (↑(Finset.orderIsoOfFin s hk).symm { val := i, property := h }) else z)\n          (↑(↑(Finset.orderIsoOfFin s hk).toEquiv i)) y)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nk n : ℕ\nf : MultilinearMap R (fun x => M') M₂\ns : Finset (Fin n)\nhk : Finset.card s = k\nz : M'\ninst✝ : DecidableEq (Fin k)\nv : Fin k → M'\ni : Fin k\nc : R\nx : M'\n⊢ (fun v =>\n        ↑f fun j =>\n          if h : j ∈ s then v (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)\n      (update v i (c • x)) =\n    c •\n      (fun v =>\n          ↑f fun j =>\n            if h : j ∈ s then v (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)\n        (update v i x)\n[PROOFSTEP]\nhave : FunLike.coe (s.orderIsoOfFin hk).symm = (s.orderIsoOfFin hk).toEquiv.symm := rfl\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nk n : ℕ\nf : MultilinearMap R (fun x => M') M₂\ns : Finset (Fin n)\nhk : Finset.card s = k\nz : M'\ninst✝ : DecidableEq (Fin k)\nv : Fin k → M'\ni : Fin k\nc : R\nx : M'\nthis : ↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) = ↑(Finset.orderIsoOfFin s hk).symm\n⊢ (fun v =>\n        ↑f fun j =>\n          if h : j ∈ s then v (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)\n      (update v i (c • x)) =\n    c •\n      (fun v =>\n          ↑f fun j =>\n            if h : j ∈ s then v (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)\n        (update v i x)\n[PROOFSTEP]\nsimp only [this]\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nk n : ℕ\nf : MultilinearMap R (fun x => M') M₂\ns : Finset (Fin n)\nhk : Finset.card s = k\nz : M'\ninst✝ : DecidableEq (Fin k)\nv : Fin k → M'\ni : Fin k\nc : R\nx : M'\nthis : ↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) = ↑(Finset.orderIsoOfFin s hk).symm\n⊢ (↑f fun j =>\n      if h : j ∈ s then update v i (c • x) (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h })\n      else z) =\n    c •\n      ↑f fun j =>\n        if h : j ∈ s then update v i x (↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z\n[PROOFSTEP]\nerw [dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv, dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv]\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nk n : ℕ\nf : MultilinearMap R (fun x => M') M₂\ns : Finset (Fin n)\nhk : Finset.card s = k\nz : M'\ninst✝ : DecidableEq (Fin k)\nv : Fin k → M'\ni : Fin k\nc : R\nx : M'\nthis : ↑(OrderIso.symm (Finset.orderIsoOfFin s hk)) = ↑(Finset.orderIsoOfFin s hk).symm\n⊢ ↑f\n      (update (fun i => if h : i ∈ s then v (↑(Finset.orderIsoOfFin s hk).symm { val := i, property := h }) else z)\n        (↑(↑(Finset.orderIsoOfFin s hk).toEquiv i)) (c • x)) =\n    c •\n      ↑f\n        (update (fun i => if h : i ∈ s then v (↑(Finset.orderIsoOfFin s hk).symm { val := i, property := h }) else z)\n          (↑(↑(Finset.orderIsoOfFin s hk).toEquiv i)) x)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (succ i)\nx y : M 0\n⊢ ↑f (cons (x + y) m) = ↑f (cons x m) + ↑f (cons y m)\n[PROOFSTEP]\nsimp_rw [← update_cons_zero x m (x + y), f.map_add, update_cons_zero]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (succ i)\nc : R\nx : M 0\n⊢ ↑f (cons (c • x) m) = c • ↑f (cons x m)\n[PROOFSTEP]\nsimp_rw [← update_cons_zero x m (c • x), f.map_smul, update_cons_zero]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (castSucc i)\nx y : M (last n)\n⊢ ↑f (snoc m (x + y)) = ↑f (snoc m x) + ↑f (snoc m y)\n[PROOFSTEP]\nsimp_rw [← update_snoc_last x m (x + y), f.map_add, update_snoc_last]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (castSucc i)\nc : R\nx : M (last n)\n⊢ ↑f (snoc m (c • x)) = c • ↑f (snoc m x)\n[PROOFSTEP]\nsimp_rw [← update_snoc_last x m (c • x), f.map_smul, update_snoc_last]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M'\ninst✝⁹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁸ : (i : ι) → Module R (M₁ i)\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\ninst✝⁵ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nM₁' : ι → Type u_1\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝³ : (i : ι) → Module R (M₁' i)\nM₁'' : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (M₁'' i)\ninst✝¹ : (i : ι) → Module R (M₁'' i)\ng : MultilinearMap R M₁' M₂\nf : (i : ι) → M₁ i →ₗ[R] M₁' i\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\n⊢ (fun m => ↑g fun i => ↑(f i) (m i)) (update m i (x + y)) =\n    (fun m => ↑g fun i => ↑(f i) (m i)) (update m i x) + (fun m => ↑g fun i => ↑(f i) (m i)) (update m i y)\n[PROOFSTEP]\nhave : ∀ j z, f j (update m i z j) = update (fun k => f k (m k)) i (f i z) j := fun j z =>\n  Function.apply_update (fun k => f k) _ _ _ _\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M'\ninst✝⁹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁸ : (i : ι) → Module R (M₁ i)\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\ninst✝⁵ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nM₁' : ι → Type u_1\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝³ : (i : ι) → Module R (M₁' i)\nM₁'' : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (M₁'' i)\ninst✝¹ : (i : ι) → Module R (M₁'' i)\ng : MultilinearMap R M₁' M₂\nf : (i : ι) → M₁ i →ₗ[R] M₁' i\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\nthis : ∀ (j : ι) (z : M₁ i), ↑(f j) (update m i z j) = update (fun k => ↑(f k) (m k)) i (↑(f i) z) j\n⊢ (fun m => ↑g fun i => ↑(f i) (m i)) (update m i (x + y)) =\n    (fun m => ↑g fun i => ↑(f i) (m i)) (update m i x) + (fun m => ↑g fun i => ↑(f i) (m i)) (update m i y)\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M'\ninst✝⁹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁸ : (i : ι) → Module R (M₁ i)\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\ninst✝⁵ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nM₁' : ι → Type u_1\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝³ : (i : ι) → Module R (M₁' i)\nM₁'' : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (M₁'' i)\ninst✝¹ : (i : ι) → Module R (M₁'' i)\ng : MultilinearMap R M₁' M₂\nf : (i : ι) → M₁ i →ₗ[R] M₁' i\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nx : M₁ i\n⊢ (fun m => ↑g fun i => ↑(f i) (m i)) (update m i (c • x)) = c • (fun m => ↑g fun i => ↑(f i) (m i)) (update m i x)\n[PROOFSTEP]\nhave : ∀ j z, f j (update m i z j) = update (fun k => f k (m k)) i (f i z) j := fun j z =>\n  Function.apply_update (fun k => f k) _ _ _ _\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M'\ninst✝⁹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁸ : (i : ι) → Module R (M₁ i)\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\ninst✝⁵ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nM₁' : ι → Type u_1\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝³ : (i : ι) → Module R (M₁' i)\nM₁'' : ι → Type u_2\ninst✝² : (i : ι) → AddCommMonoid (M₁'' i)\ninst✝¹ : (i : ι) → Module R (M₁'' i)\ng : MultilinearMap R M₁' M₂\nf : (i : ι) → M₁ i →ₗ[R] M₁' i\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nx : M₁ i\nthis : ∀ (j : ι) (z : M₁ i), ↑(f j) (update m i z j) = update (fun k => ↑(f k) (m k)) i (↑(f i) z) j\n⊢ (fun m => ↑g fun i => ↑(f i) (m i)) (update m i (c • x)) = c • (fun m => ↑g fun i => ↑(f i) (m i)) (update m i x)\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : Semiring R\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M'\ninst✝⁸ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁷ : (i : ι) → Module R (M₁ i)\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nM₁' : ι → Type u_1\ninst✝³ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝² : (i : ι) → Module R (M₁' i)\nM₁'' : ι → Type u_2\ninst✝¹ : (i : ι) → AddCommMonoid (M₁'' i)\ninst✝ : (i : ι) → Module R (M₁'' i)\nf : (i : ι) → M₁ i →ₗ[R] M₁' i\nhf : ∀ (i : ι), Surjective ↑(f i)\ng₁ g₂ : MultilinearMap R M₁' M₂\nh : (fun g => compLinearMap g f) g₁ = (fun g => compLinearMap g f) g₂\nx : (i : ι) → M₁' i\n⊢ ↑g₁ x = ↑g₂ x\n[PROOFSTEP]\nsimpa [fun i => surjInv_eq (hf i)] using ext_iff.mp h fun i => surjInv (hf i) (x i)\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : Semiring R\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M'\ninst✝⁸ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁷ : (i : ι) → Module R (M₁ i)\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Module R M'\nf✝ f' : MultilinearMap R M₁ M₂\nM₁' : ι → Type u_1\ninst✝³ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝² : (i : ι) → Module R (M₁' i)\nM₁'' : ι → Type u_2\ninst✝¹ : (i : ι) → AddCommMonoid (M₁'' i)\ninst✝ : (i : ι) → Module R (M₁'' i)\ng : MultilinearMap R M₁' M₂\nf : (i : ι) → M₁ i ≃ₗ[R] M₁' i\n⊢ (compLinearMap g fun i => ↑(f i)) = 0 ↔ g = 0\n[PROOFSTEP]\nset f' := fun i => (f i : M₁ i →ₗ[R] M₁' i)\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : Semiring R\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M'\ninst✝⁸ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁷ : (i : ι) → Module R (M₁ i)\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Module R M'\nf✝ f'✝ : MultilinearMap R M₁ M₂\nM₁' : ι → Type u_1\ninst✝³ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝² : (i : ι) → Module R (M₁' i)\nM₁'' : ι → Type u_2\ninst✝¹ : (i : ι) → AddCommMonoid (M₁'' i)\ninst✝ : (i : ι) → Module R (M₁'' i)\ng : MultilinearMap R M₁' M₂\nf : (i : ι) → M₁ i ≃ₗ[R] M₁' i\nf' : (i : ι) → M₁ i →ₗ[R] M₁' i := fun i => ↑(f i)\n⊢ compLinearMap g f' = 0 ↔ g = 0\n[PROOFSTEP]\nrw [← zero_compLinearMap f', compLinearMap_inj f' fun i => (f i).surjective]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm m' : (i : ι) → M₁ i\nt : Finset ι\n⊢ ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\n[PROOFSTEP]\nrevert m'\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt : Finset ι\n⊢ ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\n[PROOFSTEP]\nrefine' Finset.induction_on t (by simp) _\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt : Finset ι\n⊢ ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise ∅ (m + m') m') = ∑ s in Finset.powerset ∅, ↑f (Finset.piecewise s m m')\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt : Finset ι\n⊢ ∀ ⦃a : ι⦄ {s : Finset ι},\n    ¬a ∈ s →\n      (∀ (m' : (i : ι) → M₁ i),\n          ↑f (Finset.piecewise s (m + m') m') = ∑ s in Finset.powerset s, ↑f (Finset.piecewise s m m')) →\n        ∀ (m' : (i : ι) → M₁ i),\n          ↑f (Finset.piecewise (insert a s) (m + m') m') =\n            ∑ s in Finset.powerset (insert a s), ↑f (Finset.piecewise s m m')\n[PROOFSTEP]\nintro i t hit Hrec m'\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\n⊢ ↑f (Finset.piecewise (insert i t) (m + m') m') = ∑ s in Finset.powerset (insert i t), ↑f (Finset.piecewise s m m')\n[PROOFSTEP]\nhave A : (insert i t).piecewise (m + m') m' = update (t.piecewise (m + m') m') i (m i + m' i) :=\n  t.piecewise_insert _ _ _\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\n⊢ ↑f (Finset.piecewise (insert i t) (m + m') m') = ∑ s in Finset.powerset (insert i t), ↑f (Finset.piecewise s m m')\n[PROOFSTEP]\nhave B : update (t.piecewise (m + m') m') i (m' i) = t.piecewise (m + m') m' :=\n  by\n  ext j\n  by_cases h : j = i\n  · rw [h]\n    simp [hit]\n  · simp [h]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\n⊢ update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nj : ι\n⊢ update (Finset.piecewise t (m + m') m') i (m' i) j = Finset.piecewise t (m + m') m' j\n[PROOFSTEP]\nby_cases h : j = i\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nj : ι\nh : j = i\n⊢ update (Finset.piecewise t (m + m') m') i (m' i) j = Finset.piecewise t (m + m') m' j\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nj : ι\nh : j = i\n⊢ update (Finset.piecewise t (m + m') m') i (m' i) i = Finset.piecewise t (m + m') m' i\n[PROOFSTEP]\nsimp [hit]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nj : ι\nh : ¬j = i\n⊢ update (Finset.piecewise t (m + m') m') i (m' i) j = Finset.piecewise t (m + m') m' j\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\n⊢ ↑f (Finset.piecewise (insert i t) (m + m') m') = ∑ s in Finset.powerset (insert i t), ↑f (Finset.piecewise s m m')\n[PROOFSTEP]\nlet m'' := update m' i (m i)\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\n⊢ ↑f (Finset.piecewise (insert i t) (m + m') m') = ∑ s in Finset.powerset (insert i t), ↑f (Finset.piecewise s m m')\n[PROOFSTEP]\nhave C : update (t.piecewise (m + m') m') i (m i) = t.piecewise (m + m'') m'' :=\n  by\n  ext j\n  by_cases h : j = i\n  · rw [h]\n    simp [hit]\n  · by_cases h' : j ∈ t <;> simp [h, hit, h']\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\n⊢ update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nj : ι\n⊢ update (Finset.piecewise t (m + m') m') i (m i) j = Finset.piecewise t (m + m'') m'' j\n[PROOFSTEP]\nby_cases h : j = i\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nj : ι\nh : j = i\n⊢ update (Finset.piecewise t (m + m') m') i (m i) j = Finset.piecewise t (m + m'') m'' j\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nj : ι\nh : j = i\n⊢ update (Finset.piecewise t (m + m') m') i (m i) i = Finset.piecewise t (m + m'') m'' i\n[PROOFSTEP]\nsimp [hit]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nj : ι\nh : ¬j = i\n⊢ update (Finset.piecewise t (m + m') m') i (m i) j = Finset.piecewise t (m + m'') m'' j\n[PROOFSTEP]\nby_cases h' : j ∈ t\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nj : ι\nh : ¬j = i\nh' : j ∈ t\n⊢ update (Finset.piecewise t (m + m') m') i (m i) j = Finset.piecewise t (m + m'') m'' j\n[PROOFSTEP]\nsimp [h, hit, h']\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nj : ι\nh : ¬j = i\nh' : ¬j ∈ t\n⊢ update (Finset.piecewise t (m + m') m') i (m i) j = Finset.piecewise t (m + m'') m'' j\n[PROOFSTEP]\nsimp [h, hit, h']\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nC : update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\n⊢ ↑f (Finset.piecewise (insert i t) (m + m') m') = ∑ s in Finset.powerset (insert i t), ↑f (Finset.piecewise s m m')\n[PROOFSTEP]\nrw [A, f.map_add, B, C, Finset.sum_powerset_insert hit, Hrec, Hrec, add_comm (_ : M₂)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nC : update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\n⊢ ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m') + ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m'') =\n    ∑ a in Finset.powerset t, ↑f (Finset.piecewise a m m') +\n      ∑ t in Finset.powerset t, ↑f (Finset.piecewise (insert i t) m m')\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nC : update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\n⊢ ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m'') =\n    ∑ t in Finset.powerset t, ↑f (Finset.piecewise (insert i t) m m')\n[PROOFSTEP]\nrefine Finset.sum_congr rfl fun s hs => ?_\n[GOAL]\ncase e_a\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nC : update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\ns : Finset ι\nhs : s ∈ Finset.powerset t\n⊢ ↑f (Finset.piecewise s m m'') = ↑f (Finset.piecewise (insert i s) m m')\n[PROOFSTEP]\nhave : (insert i s).piecewise m m' = s.piecewise m m'' :=\n  by\n  ext j\n  by_cases h : j = i\n  · rw [h]\n    simp [Finset.not_mem_of_mem_powerset_of_not_mem hs hit]\n  · by_cases h' : j ∈ s <;> simp [h, h']\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nC : update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\ns : Finset ι\nhs : s ∈ Finset.powerset t\n⊢ Finset.piecewise (insert i s) m m' = Finset.piecewise s m m''\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nC : update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\ns : Finset ι\nhs : s ∈ Finset.powerset t\nj : ι\n⊢ Finset.piecewise (insert i s) m m' j = Finset.piecewise s m m'' j\n[PROOFSTEP]\nby_cases h : j = i\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nC : update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\ns : Finset ι\nhs : s ∈ Finset.powerset t\nj : ι\nh : j = i\n⊢ Finset.piecewise (insert i s) m m' j = Finset.piecewise s m m'' j\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nC : update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\ns : Finset ι\nhs : s ∈ Finset.powerset t\nj : ι\nh : j = i\n⊢ Finset.piecewise (insert i s) m m' i = Finset.piecewise s m m'' i\n[PROOFSTEP]\nsimp [Finset.not_mem_of_mem_powerset_of_not_mem hs hit]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nC : update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\ns : Finset ι\nhs : s ∈ Finset.powerset t\nj : ι\nh : ¬j = i\n⊢ Finset.piecewise (insert i s) m m' j = Finset.piecewise s m m'' j\n[PROOFSTEP]\nby_cases h' : j ∈ s\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nC : update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\ns : Finset ι\nhs : s ∈ Finset.powerset t\nj : ι\nh : ¬j = i\nh' : j ∈ s\n⊢ Finset.piecewise (insert i s) m m' j = Finset.piecewise s m m'' j\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nC : update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\ns : Finset ι\nhs : s ∈ Finset.powerset t\nj : ι\nh : ¬j = i\nh' : ¬j ∈ s\n⊢ Finset.piecewise (insert i s) m m' j = Finset.piecewise s m m'' j\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\ncase e_a\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\nt✝ : Finset ι\ni : ι\nt : Finset ι\nhit : ¬i ∈ t\nHrec :\n  ∀ (m' : (i : ι) → M₁ i), ↑f (Finset.piecewise t (m + m') m') = ∑ s in Finset.powerset t, ↑f (Finset.piecewise s m m')\nm' : (i : ι) → M₁ i\nA : Finset.piecewise (insert i t) (m + m') m' = update (Finset.piecewise t (m + m') m') i (m i + m' i)\nB : update (Finset.piecewise t (m + m') m') i (m' i) = Finset.piecewise t (m + m') m'\nm'' : (a : ι) → M₁ a := update m' i (m i)\nC : update (Finset.piecewise t (m + m') m') i (m i) = Finset.piecewise t (m + m'') m''\ns : Finset ι\nhs : s ∈ Finset.powerset t\nthis : Finset.piecewise (insert i s) m m' = Finset.piecewise s m m''\n⊢ ↑f (Finset.piecewise s m m'') = ↑f (Finset.piecewise (insert i s) m m')\n[PROOFSTEP]\nrw [this]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nm m' : (i : ι) → M₁ i\n⊢ ↑f (m + m') = ∑ s : Finset ι, ↑f (Finset.piecewise s m m')\n[PROOFSTEP]\nsimpa using f.map_piecewise_add m m' Finset.univ\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn : ℕ\nh : ∑ i : ι, Finset.card (A i) = n\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nletI := fun i => Classical.decEq (α i)\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn : ℕ\nh : ∑ i : ι, Finset.card (A i) = n\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\ninduction' n using Nat.strong_induction_on with n IH generalizing A\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nby_cases Ai_empty : ∃ i, A i = ∅\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∃ i, A i = ∅\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nrcases Ai_empty with ⟨i, hi⟩\n[GOAL]\ncase pos.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\ni : ι\nhi : A i = ∅\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave : ∑ j in A i, g i j = 0 := by rw [hi, Finset.sum_empty]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\ni : ι\nhi : A i = ∅\n⊢ ∑ j in A i, g i j = 0\n[PROOFSTEP]\nrw [hi, Finset.sum_empty]\n[GOAL]\ncase pos.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\ni : ι\nhi : A i = ∅\nthis : ∑ j in A i, g i j = 0\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nrw [f.map_coord_zero i this]\n[GOAL]\ncase pos.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\ni : ι\nhi : A i = ∅\nthis : ∑ j in A i, g i j = 0\n⊢ 0 = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave : piFinset A = ∅ := by\n  refine Finset.eq_empty_of_forall_not_mem fun r hr => ?_\n  have : r i ∈ A i := mem_piFinset.mp hr i\n  simp [hi] at this \n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\ni : ι\nhi : A i = ∅\nthis : ∑ j in A i, g i j = 0\n⊢ piFinset A = ∅\n[PROOFSTEP]\nrefine Finset.eq_empty_of_forall_not_mem fun r hr => ?_\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\ni : ι\nhi : A i = ∅\nthis : ∑ j in A i, g i j = 0\nr : (a : ι) → α a\nhr : r ∈ piFinset A\n⊢ False\n[PROOFSTEP]\nhave : r i ∈ A i := mem_piFinset.mp hr i\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝¹ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\ni : ι\nhi : A i = ∅\nthis✝ : ∑ j in A i, g i j = 0\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nthis : r i ∈ A i\n⊢ False\n[PROOFSTEP]\nsimp [hi] at this \n[GOAL]\ncase pos.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝¹ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\ni : ι\nhi : A i = ∅\nthis✝ : ∑ j in A i, g i j = 0\nthis : piFinset A = ∅\n⊢ 0 = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nrw [this, Finset.sum_empty]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ¬∃ i, A i = ∅\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\npush_neg at Ai_empty \n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nby_cases Ai_singleton : ∀ i, (A i).card ≤ 1\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave Ai_card : ∀ i, (A i).card = 1 := by\n  intro i\n  have pos : Finset.card (A i) ≠ 0 := by simp [Finset.card_eq_zero, Ai_empty i]\n  have : Finset.card (A i) ≤ 1 := Ai_singleton i\n  exact le_antisymm this (Nat.succ_le_of_lt (_root_.pos_iff_ne_zero.mpr pos))\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\n⊢ ∀ (i : ι), Finset.card (A i) = 1\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\ni : ι\n⊢ Finset.card (A i) = 1\n[PROOFSTEP]\nhave pos : Finset.card (A i) ≠ 0 := by simp [Finset.card_eq_zero, Ai_empty i]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\ni : ι\n⊢ Finset.card (A i) ≠ 0\n[PROOFSTEP]\nsimp [Finset.card_eq_zero, Ai_empty i]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\ni : ι\npos : Finset.card (A i) ≠ 0\n⊢ Finset.card (A i) = 1\n[PROOFSTEP]\nhave : Finset.card (A i) ≤ 1 := Ai_singleton i\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\ni : ι\npos : Finset.card (A i) ≠ 0\nthis : Finset.card (A i) ≤ 1\n⊢ Finset.card (A i) = 1\n[PROOFSTEP]\nexact le_antisymm this (Nat.succ_le_of_lt (_root_.pos_iff_ne_zero.mpr pos))\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\nAi_card : ∀ (i : ι), Finset.card (A i) = 1\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave : ∀ r : ∀ i, α i, r ∈ piFinset A → (f fun i => g i (r i)) = f fun i => ∑ j in A i, g i j :=\n  by\n  intro r hr\n  congr with i\n  have : ∀ j ∈ A i, g i j = g i (r i) := by\n    intro j hj\n    congr\n    apply Finset.card_le_one_iff.1 (Ai_singleton i) hj\n    exact mem_piFinset.mp hr i\n  simp only [Finset.sum_congr rfl this, Finset.mem_univ, Finset.sum_const, Ai_card i, one_nsmul]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\nAi_card : ∀ (i : ι), Finset.card (A i) = 1\n⊢ ∀ (r : (i : ι) → α i), r ∈ piFinset A → (↑f fun i => g i (r i)) = ↑f fun i => ∑ j in A i, g i j\n[PROOFSTEP]\nintro r hr\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\nAi_card : ∀ (i : ι), Finset.card (A i) = 1\nr : (i : ι) → α i\nhr : r ∈ piFinset A\n⊢ (↑f fun i => g i (r i)) = ↑f fun i => ∑ j in A i, g i j\n[PROOFSTEP]\ncongr with i\n[GOAL]\ncase h.e_6.h.h\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\nAi_card : ∀ (i : ι), Finset.card (A i) = 1\nr : (i : ι) → α i\nhr : r ∈ piFinset A\ni : ι\n⊢ g i (r i) = ∑ j in A i, g i j\n[PROOFSTEP]\nhave : ∀ j ∈ A i, g i j = g i (r i) := by\n  intro j hj\n  congr\n  apply Finset.card_le_one_iff.1 (Ai_singleton i) hj\n  exact mem_piFinset.mp hr i\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\nAi_card : ∀ (i : ι), Finset.card (A i) = 1\nr : (i : ι) → α i\nhr : r ∈ piFinset A\ni : ι\n⊢ ∀ (j : α i), j ∈ A i → g i j = g i (r i)\n[PROOFSTEP]\nintro j hj\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\nAi_card : ∀ (i : ι), Finset.card (A i) = 1\nr : (i : ι) → α i\nhr : r ∈ piFinset A\ni : ι\nj : α i\nhj : j ∈ A i\n⊢ g i j = g i (r i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\nAi_card : ∀ (i : ι), Finset.card (A i) = 1\nr : (i : ι) → α i\nhr : r ∈ piFinset A\ni : ι\nj : α i\nhj : j ∈ A i\n⊢ j = r i\n[PROOFSTEP]\napply Finset.card_le_one_iff.1 (Ai_singleton i) hj\n[GOAL]\ncase e_a\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\nAi_card : ∀ (i : ι), Finset.card (A i) = 1\nr : (i : ι) → α i\nhr : r ∈ piFinset A\ni : ι\nj : α i\nhj : j ∈ A i\n⊢ r i ∈ A i\n[PROOFSTEP]\nexact mem_piFinset.mp hr i\n[GOAL]\ncase h.e_6.h.h\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\nAi_card : ∀ (i : ι), Finset.card (A i) = 1\nr : (i : ι) → α i\nhr : r ∈ piFinset A\ni : ι\nthis : ∀ (j : α i), j ∈ A i → g i j = g i (r i)\n⊢ g i (r i) = ∑ j in A i, g i j\n[PROOFSTEP]\nsimp only [Finset.sum_congr rfl this, Finset.mem_univ, Finset.sum_const, Ai_card i, one_nsmul]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∀ (i : ι), Finset.card (A i) ≤ 1\nAi_card : ∀ (i : ι), Finset.card (A i) = 1\nthis : ∀ (r : (i : ι) → α i), r ∈ piFinset A → (↑f fun i => g i (r i)) = ↑f fun i => ∑ j in A i, g i j\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nsimp only [Finset.sum_congr rfl this, Ai_card, card_piFinset, prod_const_one, one_nsmul, Finset.sum_const]\n  -- Remains the interesting case where one of the `A i`, say `A i₀`, has cardinality at least 2.\n    -- We will split into two parts `B i₀` and `C i₀` of smaller cardinality, let `B i = C i = A i`\n    -- for `i ≠ i₀`, apply the inductive assumption to `B` and `C`, and add up the corresponding\n    -- parts to get the sum for `A`.\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ¬∀ (i : ι), Finset.card (A i) ≤ 1\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\npush_neg at Ai_singleton \n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\nAi_singleton : ∃ i, 1 < Finset.card (A i)\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nobtain ⟨i₀, hi₀⟩ : ∃ i, 1 < (A i).card := Ai_singleton\n[GOAL]\ncase neg.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nobtain ⟨j₁, j₂, _, hj₂, _⟩ : ∃ j₁ j₂, j₁ ∈ A i₀ ∧ j₂ ∈ A i₀ ∧ j₁ ≠ j₂ := Finset.one_lt_card_iff.1 hi₀\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nlet B := Function.update A i₀ (A i₀ \\ { j₂ })\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nlet C := Function.update A i₀ { j₂ }\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave B_subset_A : ∀ i, B i ⊆ A i := by\n  intro i\n  by_cases hi : i = i₀\n  · rw [hi]\n    simp only [sdiff_subset, update_same]\n  · simp only [hi, update_noteq, Ne.def, not_false_iff, Finset.Subset.refl]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\n⊢ ∀ (i : ι), B i ⊆ A i\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\ni : ι\n⊢ B i ⊆ A i\n[PROOFSTEP]\nby_cases hi : i = i₀\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\ni : ι\nhi : i = i₀\n⊢ B i ⊆ A i\n[PROOFSTEP]\nrw [hi]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\ni : ι\nhi : i = i₀\n⊢ B i₀ ⊆ A i₀\n[PROOFSTEP]\nsimp only [sdiff_subset, update_same]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\ni : ι\nhi : ¬i = i₀\n⊢ B i ⊆ A i\n[PROOFSTEP]\nsimp only [hi, update_noteq, Ne.def, not_false_iff, Finset.Subset.refl]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave C_subset_A : ∀ i, C i ⊆ A i := by\n  intro i\n  by_cases hi : i = i₀\n  · rw [hi]\n    simp only [hj₂, Finset.singleton_subset_iff, update_same]\n  ·\n    simp only [hi, update_noteq, Ne.def, not_false_iff, Finset.Subset.refl]\n      -- split the sum at `i₀` as the sum over `B i₀` plus the sum over `C i₀`, to use additivity.\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\n⊢ ∀ (i : ι), C i ⊆ A i\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\ni : ι\n⊢ C i ⊆ A i\n[PROOFSTEP]\nby_cases hi : i = i₀\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\ni : ι\nhi : i = i₀\n⊢ C i ⊆ A i\n[PROOFSTEP]\nrw [hi]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\ni : ι\nhi : i = i₀\n⊢ C i₀ ⊆ A i₀\n[PROOFSTEP]\nsimp only [hj₂, Finset.singleton_subset_iff, update_same]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\ni : ι\nhi : ¬i = i₀\n⊢ C i ⊆ A i\n[PROOFSTEP]\nsimp only [hi, update_noteq, Ne.def, not_false_iff, Finset.Subset.refl]\n  -- split the sum at `i₀` as the sum over `B i₀` plus the sum over `C i₀`, to use additivity.\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave A_eq_BC :\n  (fun i => ∑ j in A i, g i j) =\n    Function.update (fun i => ∑ j in A i, g i j) i₀ ((∑ j in B i₀, g i₀ j) + ∑ j in C i₀, g i₀ j) :=\n  by\n  ext i\n  by_cases hi : i = i₀\n  · rw [hi, update_same]\n    have : A i₀ = B i₀ ∪ C i₀ :=\n      by\n      simp only [Function.update_same, Finset.sdiff_union_self_eq_union]\n      symm\n      simp only [hj₂, Finset.singleton_subset_iff, Finset.union_eq_left_iff_subset]\n    rw [this]\n    refine Finset.sum_union <| Finset.disjoint_right.2 fun j hj => ?_\n    have : j = j₂ := by simpa using hj\n    rw [this]\n    simp only [mem_sdiff, eq_self_iff_true, not_true, not_false_iff, Finset.mem_singleton, update_same, and_false_iff]\n  · simp [hi]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\n⊢ (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\n⊢ ∑ j in A i, g i j = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j) i\n[PROOFSTEP]\nby_cases hi : i = i₀\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\nhi : i = i₀\n⊢ ∑ j in A i, g i j = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j) i\n[PROOFSTEP]\nrw [hi, update_same]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\nhi : i = i₀\n⊢ ∑ j in A i₀, g i₀ j = ∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j\n[PROOFSTEP]\nhave : A i₀ = B i₀ ∪ C i₀ :=\n  by\n  simp only [Function.update_same, Finset.sdiff_union_self_eq_union]\n  symm\n  simp only [hj₂, Finset.singleton_subset_iff, Finset.union_eq_left_iff_subset]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\nhi : i = i₀\n⊢ A i₀ = B i₀ ∪ C i₀\n[PROOFSTEP]\nsimp only [Function.update_same, Finset.sdiff_union_self_eq_union]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\nhi : i = i₀\n⊢ A i₀ = A i₀ ∪ {j₂}\n[PROOFSTEP]\nsymm\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\nhi : i = i₀\n⊢ A i₀ ∪ {j₂} = A i₀\n[PROOFSTEP]\nsimp only [hj₂, Finset.singleton_subset_iff, Finset.union_eq_left_iff_subset]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\nhi : i = i₀\nthis : A i₀ = B i₀ ∪ C i₀\n⊢ ∑ j in A i₀, g i₀ j = ∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\nhi : i = i₀\nthis : A i₀ = B i₀ ∪ C i₀\n⊢ ∑ j in B i₀ ∪ C i₀, g i₀ j = ∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j\n[PROOFSTEP]\nrefine Finset.sum_union <| Finset.disjoint_right.2 fun j hj => ?_\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\nhi : i = i₀\nthis : A i₀ = B i₀ ∪ C i₀\nj : α i₀\nhj : j ∈ C i₀\n⊢ ¬j ∈ B i₀\n[PROOFSTEP]\nhave : j = j₂ := by simpa using hj\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\nhi : i = i₀\nthis : A i₀ = B i₀ ∪ C i₀\nj : α i₀\nhj : j ∈ C i₀\n⊢ j = j₂\n[PROOFSTEP]\nsimpa using hj\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝¹ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\nhi : i = i₀\nthis✝ : A i₀ = B i₀ ∪ C i₀\nj : α i₀\nhj : j ∈ C i₀\nthis : j = j₂\n⊢ ¬j ∈ B i₀\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝¹ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\nhi : i = i₀\nthis✝ : A i₀ = B i₀ ∪ C i₀\nj : α i₀\nhj : j ∈ C i₀\nthis : j = j₂\n⊢ ¬j₂ ∈ B i₀\n[PROOFSTEP]\nsimp only [mem_sdiff, eq_self_iff_true, not_true, not_false_iff, Finset.mem_singleton, update_same, and_false_iff]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\ni : ι\nhi : ¬i = i₀\n⊢ ∑ j in A i, g i j = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j) i\n[PROOFSTEP]\nsimp [hi]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave Beq : Function.update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j :=\n  by\n  ext i\n  by_cases hi : i = i₀\n  · rw [hi]\n    simp only [update_same]\n  · simp only [hi, update_noteq, Ne.def, not_false_iff]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\n⊢ update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\ni : ι\n⊢ update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) i = ∑ j in B i, g i j\n[PROOFSTEP]\nby_cases hi : i = i₀\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\ni : ι\nhi : i = i₀\n⊢ update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) i = ∑ j in B i, g i j\n[PROOFSTEP]\nrw [hi]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\ni : ι\nhi : i = i₀\n⊢ update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) i₀ = ∑ j in B i₀, g i₀ j\n[PROOFSTEP]\nsimp only [update_same]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\ni : ι\nhi : ¬i = i₀\n⊢ update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) i = ∑ j in B i, g i j\n[PROOFSTEP]\nsimp only [hi, update_noteq, Ne.def, not_false_iff]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave Ceq : Function.update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j :=\n  by\n  ext i\n  by_cases hi : i = i₀\n  · rw [hi]\n    simp only [update_same]\n  ·\n    simp only [hi, update_noteq, Ne.def, not_false_iff]\n      -- Express the inductive assumption for `B`\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\n⊢ update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\ni : ι\n⊢ update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) i = ∑ j in C i, g i j\n[PROOFSTEP]\nby_cases hi : i = i₀\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\ni : ι\nhi : i = i₀\n⊢ update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) i = ∑ j in C i, g i j\n[PROOFSTEP]\nrw [hi]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\ni : ι\nhi : i = i₀\n⊢ update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) i₀ = ∑ j in C i₀, g i₀ j\n[PROOFSTEP]\nsimp only [update_same]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\ni : ι\nhi : ¬i = i₀\n⊢ update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) i = ∑ j in C i, g i j\n[PROOFSTEP]\nsimp only [hi, update_noteq, Ne.def, not_false_iff]\n  -- Express the inductive assumption for `B`\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave Brec : (f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, f fun i => g i (r i) :=\n  by\n  have : (∑ i, Finset.card (B i)) < ∑ i, Finset.card (A i) :=\n    by\n    refine' Finset.sum_lt_sum (fun i _ => Finset.card_le_of_subset (B_subset_A i)) ⟨i₀, Finset.mem_univ _, _⟩\n    have : { j₂ } ⊆ A i₀ := by simp [hj₂]\n    simp only [Finset.card_sdiff this, Function.update_same, Finset.card_singleton]\n    exact Nat.pred_lt (ne_of_gt (lt_trans Nat.zero_lt_one hi₀))\n  rw [h] at this \n  exact IH _ this B rfl\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\n⊢ (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave : (∑ i, Finset.card (B i)) < ∑ i, Finset.card (A i) :=\n  by\n  refine' Finset.sum_lt_sum (fun i _ => Finset.card_le_of_subset (B_subset_A i)) ⟨i₀, Finset.mem_univ _, _⟩\n  have : { j₂ } ⊆ A i₀ := by simp [hj₂]\n  simp only [Finset.card_sdiff this, Function.update_same, Finset.card_singleton]\n  exact Nat.pred_lt (ne_of_gt (lt_trans Nat.zero_lt_one hi₀))\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\n⊢ ∑ i : ι, Finset.card (B i) < ∑ i : ι, Finset.card (A i)\n[PROOFSTEP]\nrefine' Finset.sum_lt_sum (fun i _ => Finset.card_le_of_subset (B_subset_A i)) ⟨i₀, Finset.mem_univ _, _⟩\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\n⊢ Finset.card (B i₀) < Finset.card (A i₀)\n[PROOFSTEP]\nhave : { j₂ } ⊆ A i₀ := by simp [hj₂]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\n⊢ {j₂} ⊆ A i₀\n[PROOFSTEP]\nsimp [hj₂]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nthis : {j₂} ⊆ A i₀\n⊢ Finset.card (B i₀) < Finset.card (A i₀)\n[PROOFSTEP]\nsimp only [Finset.card_sdiff this, Function.update_same, Finset.card_singleton]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nthis : {j₂} ⊆ A i₀\n⊢ Finset.card (A i₀) - 1 < Finset.card (A i₀)\n[PROOFSTEP]\nexact Nat.pred_lt (ne_of_gt (lt_trans Nat.zero_lt_one hi₀))\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nthis : ∑ i : ι, Finset.card (B i) < ∑ i : ι, Finset.card (A i)\n⊢ (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\n[PROOFSTEP]\nrw [h] at this \n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nthis : ∑ i : ι, Finset.card (B i) < n\n⊢ (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\n[PROOFSTEP]\nexact IH _ this B rfl\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave Crec : (f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, f fun i => g i (r i) :=\n  by\n  have : (∑ i, Finset.card (C i)) < ∑ i, Finset.card (A i) :=\n    Finset.sum_lt_sum (fun i _ => Finset.card_le_of_subset (C_subset_A i)) ⟨i₀, Finset.mem_univ _, by simp [hi₀]⟩\n  rw [h] at this \n  exact IH _ this C rfl\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\n⊢ (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave : (∑ i, Finset.card (C i)) < ∑ i, Finset.card (A i) :=\n  Finset.sum_lt_sum (fun i _ => Finset.card_le_of_subset (C_subset_A i)) ⟨i₀, Finset.mem_univ _, by simp [hi₀]⟩\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\n⊢ Finset.card (C i₀) < Finset.card (A i₀)\n[PROOFSTEP]\nsimp [hi₀]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nthis : ∑ i : ι, Finset.card (C i) < ∑ i : ι, Finset.card (A i)\n⊢ (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\n[PROOFSTEP]\nrw [h] at this \n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nthis : ∑ i : ι, Finset.card (C i) < n\n⊢ (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\n[PROOFSTEP]\nexact IH _ this C rfl\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave D : Disjoint (piFinset B) (piFinset C) :=\n  haveI : Disjoint (B i₀) (C i₀) := by simp\n  piFinset_disjoint_of_disjoint B C this\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\n⊢ Disjoint (B i₀) (C i₀)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nhave pi_BC : piFinset A = piFinset B ∪ piFinset C :=\n  by\n  apply Finset.Subset.antisymm\n  · intro r hr\n    by_cases hri₀ : r i₀ = j₂\n    · apply Finset.mem_union_right\n      refine mem_piFinset.2 fun i => ?_\n      by_cases hi : i = i₀\n      · have : r i₀ ∈ C i₀ := by simp [hri₀]\n        rwa [hi]\n      · simp [hi, mem_piFinset.1 hr i]\n    · apply Finset.mem_union_left\n      refine mem_piFinset.2 fun i => ?_\n      by_cases hi : i = i₀\n      · have : r i₀ ∈ B i₀ := by simp [hri₀, mem_piFinset.1 hr i₀]\n        rwa [hi]\n      · simp [hi, mem_piFinset.1 hr i]\n  · exact Finset.union_subset (piFinset_subset _ _ fun i => B_subset_A i) (piFinset_subset _ _ fun i => C_subset_A i)\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\n⊢ piFinset A = piFinset B ∪ piFinset C\n[PROOFSTEP]\napply Finset.Subset.antisymm\n[GOAL]\ncase H₁\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\n⊢ piFinset A ⊆ piFinset B ∪ piFinset C\n[PROOFSTEP]\nintro r hr\n[GOAL]\ncase H₁\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\n⊢ r ∈ piFinset B ∪ piFinset C\n[PROOFSTEP]\nby_cases hri₀ : r i₀ = j₂\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : r i₀ = j₂\n⊢ r ∈ piFinset B ∪ piFinset C\n[PROOFSTEP]\napply Finset.mem_union_right\n[GOAL]\ncase pos.h\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : r i₀ = j₂\n⊢ r ∈ piFinset C\n[PROOFSTEP]\nrefine mem_piFinset.2 fun i => ?_\n[GOAL]\ncase pos.h\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : r i₀ = j₂\ni : ι\n⊢ r i ∈ C i\n[PROOFSTEP]\nby_cases hi : i = i₀\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : r i₀ = j₂\ni : ι\nhi : i = i₀\n⊢ r i ∈ C i\n[PROOFSTEP]\nhave : r i₀ ∈ C i₀ := by simp [hri₀]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : r i₀ = j₂\ni : ι\nhi : i = i₀\n⊢ r i₀ ∈ C i₀\n[PROOFSTEP]\nsimp [hri₀]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : r i₀ = j₂\ni : ι\nhi : i = i₀\nthis : r i₀ ∈ C i₀\n⊢ r i ∈ C i\n[PROOFSTEP]\nrwa [hi]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : r i₀ = j₂\ni : ι\nhi : ¬i = i₀\n⊢ r i ∈ C i\n[PROOFSTEP]\nsimp [hi, mem_piFinset.1 hr i]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : ¬r i₀ = j₂\n⊢ r ∈ piFinset B ∪ piFinset C\n[PROOFSTEP]\napply Finset.mem_union_left\n[GOAL]\ncase neg.h\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : ¬r i₀ = j₂\n⊢ r ∈ piFinset B\n[PROOFSTEP]\nrefine mem_piFinset.2 fun i => ?_\n[GOAL]\ncase neg.h\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : ¬r i₀ = j₂\ni : ι\n⊢ r i ∈ B i\n[PROOFSTEP]\nby_cases hi : i = i₀\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : ¬r i₀ = j₂\ni : ι\nhi : i = i₀\n⊢ r i ∈ B i\n[PROOFSTEP]\nhave : r i₀ ∈ B i₀ := by simp [hri₀, mem_piFinset.1 hr i₀]\n[GOAL]\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : ¬r i₀ = j₂\ni : ι\nhi : i = i₀\n⊢ r i₀ ∈ B i₀\n[PROOFSTEP]\nsimp [hri₀, mem_piFinset.1 hr i₀]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis✝ : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : ¬r i₀ = j₂\ni : ι\nhi : i = i₀\nthis : r i₀ ∈ B i₀\n⊢ r i ∈ B i\n[PROOFSTEP]\nrwa [hi]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\nr : (a : ι) → α a\nhr : r ∈ piFinset A\nhri₀ : ¬r i₀ = j₂\ni : ι\nhi : ¬i = i₀\n⊢ r i ∈ B i\n[PROOFSTEP]\nsimp [hi, mem_piFinset.1 hr i]\n[GOAL]\ncase H₂\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\n⊢ piFinset B ∪ piFinset C ⊆ piFinset A\n[PROOFSTEP]\nexact Finset.union_subset (piFinset_subset _ _ fun i => B_subset_A i) (piFinset_subset _ _ fun i => C_subset_A i)\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\npi_BC : piFinset A = piFinset B ∪ piFinset C\n⊢ (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nrw [A_eq_BC]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\npi_BC : piFinset A = piFinset B ∪ piFinset C\n⊢ ↑f (update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)) =\n    ∑ r in piFinset A, ↑f fun i => g i (r i)\n[PROOFSTEP]\nsimp only [MultilinearMap.map_add, Beq, Ceq, Brec, Crec, pi_BC]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR : Type u\nι : Type u'\nn✝¹ : ℕ\nM : Fin (Nat.succ n✝¹) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹² : Semiring R\ninst✝¹¹ : (i : Fin (Nat.succ n✝¹)) → AddCommMonoid (M i)\ninst✝¹⁰ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : (i : Fin (Nat.succ n✝¹)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα : ι → Type u_1\ng : (i : ι) → α i → M₁ i\nA✝ : (i : ι) → Finset (α i)\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nn✝ : ℕ\nh✝ : ∑ i : ι, Finset.card (A✝ i) = n✝\nthis : (i : ι) → DecidableEq (α i) := fun i => Classical.decEq (α i)\nn : ℕ\nIH :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ (A : (i : ι) → Finset (α i)),\n        ∑ i : ι, Finset.card (A i) = m → (↑f fun i => ∑ j in A i, g i j) = ∑ r in piFinset A, ↑f fun i => g i (r i)\nA : (i : ι) → Finset (α i)\nh : ∑ i : ι, Finset.card (A i) = n\nAi_empty : ∀ (i : ι), A i ≠ ∅\ni₀ : ι\nhi₀ : 1 < Finset.card (A i₀)\nj₁ j₂ : α i₀\nleft✝ : j₁ ∈ A i₀\nhj₂ : j₂ ∈ A i₀\nright✝ : j₁ ≠ j₂\nB : (a : ι) → Finset (α a) := update A i₀ (A i₀ \\ {j₂})\nC : (a : ι) → Finset (α a) := update A i₀ {j₂}\nB_subset_A : ∀ (i : ι), B i ⊆ A i\nC_subset_A : ∀ (i : ι), C i ⊆ A i\nA_eq_BC :\n  (fun i => ∑ j in A i, g i j) = update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j + ∑ j in C i₀, g i₀ j)\nBeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in B i₀, g i₀ j) = fun i => ∑ j in B i, g i j\nCeq : update (fun i => ∑ j in A i, g i j) i₀ (∑ j in C i₀, g i₀ j) = fun i => ∑ j in C i, g i j\nBrec : (↑f fun i => ∑ j in B i, g i j) = ∑ r in piFinset B, ↑f fun i => g i (r i)\nCrec : (↑f fun i => ∑ j in C i, g i j) = ∑ r in piFinset C, ↑f fun i => g i (r i)\nD : Disjoint (piFinset B) (piFinset C)\npi_BC : piFinset A = piFinset B ∪ piFinset C\n⊢ ((∑ x in piFinset (update A i₀ (A i₀ \\ {j₂})), ↑f fun i => g i (x i)) +\n      ∑ x in piFinset (update A i₀ {j₂}), ↑f fun i => g i (x i)) =\n    ∑ x in piFinset (update A i₀ (A i₀ \\ {j₂})) ∪ piFinset (update A i₀ {j₂}), ↑f fun i => g i (x i)\n[PROOFSTEP]\nrw [← Finset.sum_union D]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα✝ : ι → Type u_1\ng✝ : (i : ι) → α✝ i → M₁ i\nA : (i : ι) → Finset (α✝ i)\nα : Type u_2\ninst✝ : DecidableEq ι\nt : Finset α\ni : ι\ng : α → M₁ i\nm : (i : ι) → M₁ i\n⊢ ↑f (update m i (∑ a in t, g a)) = ∑ a in t, ↑f (update m i (g a))\n[PROOFSTEP]\nclassical\ninduction' t using Finset.induction with a t has ih h\n· simp\n· simp [Finset.sum_insert has, ih]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα✝ : ι → Type u_1\ng✝ : (i : ι) → α✝ i → M₁ i\nA : (i : ι) → Finset (α✝ i)\nα : Type u_2\ninst✝ : DecidableEq ι\nt : Finset α\ni : ι\ng : α → M₁ i\nm : (i : ι) → M₁ i\n⊢ ↑f (update m i (∑ a in t, g a)) = ∑ a in t, ↑f (update m i (g a))\n[PROOFSTEP]\ninduction' t using Finset.induction with a t has ih h\n[GOAL]\ncase empty\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα✝ : ι → Type u_1\ng✝ : (i : ι) → α✝ i → M₁ i\nA : (i : ι) → Finset (α✝ i)\nα : Type u_2\ninst✝ : DecidableEq ι\ni : ι\ng : α → M₁ i\nm : (i : ι) → M₁ i\n⊢ ↑f (update m i (∑ a in ∅, g a)) = ∑ a in ∅, ↑f (update m i (g a))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nα✝ : ι → Type u_1\ng✝ : (i : ι) → α✝ i → M₁ i\nA : (i : ι) → Finset (α✝ i)\nα : Type u_2\ninst✝ : DecidableEq ι\ni : ι\ng : α → M₁ i\nm : (i : ι) → M₁ i\na : α\nt : Finset α\nhas : ¬a ∈ t\nih : ↑f (update m i (∑ a in t, g a)) = ∑ a in t, ↑f (update m i (g a))\n⊢ ↑f (update m i (∑ a in insert a t, g a)) = ∑ a in insert a t, ↑f (update m i (g a))\n[PROOFSTEP]\nsimp [Finset.sum_insert has, ih]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nι₁ : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nσ : ι₁ ≃ ι₂\nm : MultilinearMap R (fun x => M₂) M₃\ninst✝ : DecidableEq ι₂\nv : ι₂ → M₂\ni : ι₂\na b : M₂\n⊢ (fun v => ↑m fun i => v (↑σ i)) (update v i (a + b)) =\n    (fun v => ↑m fun i => v (↑σ i)) (update v i a) + (fun v => ↑m fun i => v (↑σ i)) (update v i b)\n[PROOFSTEP]\nletI := σ.injective.decidableEq\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nι₁ : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nσ : ι₁ ≃ ι₂\nm : MultilinearMap R (fun x => M₂) M₃\ninst✝ : DecidableEq ι₂\nv : ι₂ → M₂\ni : ι₂\na b : M₂\nthis : DecidableEq ι₁ := Injective.decidableEq (_ : Injective ↑σ)\n⊢ (fun v => ↑m fun i => v (↑σ i)) (update v i (a + b)) =\n    (fun v => ↑m fun i => v (↑σ i)) (update v i a) + (fun v => ↑m fun i => v (↑σ i)) (update v i b)\n[PROOFSTEP]\nsimp_rw [Function.update_apply_equiv_apply v]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nι₁ : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nσ : ι₁ ≃ ι₂\nm : MultilinearMap R (fun x => M₂) M₃\ninst✝ : DecidableEq ι₂\nv : ι₂ → M₂\ni : ι₂\na b : M₂\nthis : DecidableEq ι₁ := Injective.decidableEq (_ : Injective ↑σ)\n⊢ (↑m fun i_1 => update (v ∘ ↑σ) (↑σ.symm i) (a + b) i_1) =\n    (↑m fun i_1 => update (v ∘ ↑σ) (↑σ.symm i) a i_1) + ↑m fun i_1 => update (v ∘ ↑σ) (↑σ.symm i) b i_1\n[PROOFSTEP]\nrw [m.map_add]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nι₁ : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nσ : ι₁ ≃ ι₂\nm : MultilinearMap R (fun x => M₂) M₃\ninst✝ : DecidableEq ι₂\nv : ι₂ → M₂\ni : ι₂\na : R\nb : M₂\n⊢ (fun v => ↑m fun i => v (↑σ i)) (update v i (a • b)) = a • (fun v => ↑m fun i => v (↑σ i)) (update v i b)\n[PROOFSTEP]\nletI := σ.injective.decidableEq\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nι₁ : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nσ : ι₁ ≃ ι₂\nm : MultilinearMap R (fun x => M₂) M₃\ninst✝ : DecidableEq ι₂\nv : ι₂ → M₂\ni : ι₂\na : R\nb : M₂\nthis : DecidableEq ι₁ := Injective.decidableEq (_ : Injective ↑σ)\n⊢ (fun v => ↑m fun i => v (↑σ i)) (update v i (a • b)) = a • (fun v => ↑m fun i => v (↑σ i)) (update v i b)\n[PROOFSTEP]\nsimp_rw [Function.update_apply_equiv_apply v]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nι₁ : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nσ : ι₁ ≃ ι₂\nm : MultilinearMap R (fun x => M₂) M₃\ninst✝ : DecidableEq ι₂\nv : ι₂ → M₂\ni : ι₂\na : R\nb : M₂\nthis : DecidableEq ι₁ := Injective.decidableEq (_ : Injective ↑σ)\n⊢ (↑m fun i_1 => update (v ∘ ↑σ) (↑σ.symm i) (a • b) i_1) = a • ↑m fun i_1 => update (v ∘ ↑σ) (↑σ.symm i) b i_1\n[PROOFSTEP]\nrw [m.map_smul]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nι₁ : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nσ : ι₁ ≃ ι₂\nm : MultilinearMap R (fun x => M₂) M₃\n⊢ domDomCongr σ.symm (domDomCongr σ m) = m\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nι₁ : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nσ : ι₁ ≃ ι₂\nm : MultilinearMap R (fun x => M₂) M₃\nx✝ : ι₁ → M₂\n⊢ ↑(domDomCongr σ.symm (domDomCongr σ m)) x✝ = ↑m x✝\n[PROOFSTEP]\nsimp [domDomCongr]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nι₁ : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nσ : ι₁ ≃ ι₂\nm : MultilinearMap R (fun x => M₂) M₃\n⊢ domDomCongr σ (domDomCongr σ.symm m) = m\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nι₁ : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nσ : ι₁ ≃ ι₂\nm : MultilinearMap R (fun x => M₂) M₃\nx✝ : ι₂ → M₂\n⊢ ↑(domDomCongr σ (domDomCongr σ.symm m)) x✝ = ↑m x✝\n[PROOFSTEP]\nsimp [domDomCongr]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nι₁ : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nσ : ι₁ ≃ ι₂\na b : MultilinearMap R (fun x => M₂) M₃\n⊢ Equiv.toFun\n      { toFun := domDomCongr σ, invFun := domDomCongr σ.symm,\n        left_inv := (_ : ∀ (m : MultilinearMap R (fun x => M₂) M₃), domDomCongr σ.symm (domDomCongr σ m) = m),\n        right_inv := (_ : ∀ (m : MultilinearMap R (fun x => M₂) M₃), domDomCongr σ (domDomCongr σ.symm m) = m) }\n      (a + b) =\n    Equiv.toFun\n        { toFun := domDomCongr σ, invFun := domDomCongr σ.symm,\n          left_inv := (_ : ∀ (m : MultilinearMap R (fun x => M₂) M₃), domDomCongr σ.symm (domDomCongr σ m) = m),\n          right_inv := (_ : ∀ (m : MultilinearMap R (fun x => M₂) M₃), domDomCongr σ (domDomCongr σ.symm m) = m) }\n        a +\n      Equiv.toFun\n        { toFun := domDomCongr σ, invFun := domDomCongr σ.symm,\n          left_inv := (_ : ∀ (m : MultilinearMap R (fun x => M₂) M₃), domDomCongr σ.symm (domDomCongr σ m) = m),\n          right_inv := (_ : ∀ (m : MultilinearMap R (fun x => M₂) M₃), domDomCongr σ (domDomCongr σ.symm m) = m) }\n        b\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : Semiring R\ninst✝⁹ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nf f' : MultilinearMap R M₁ M₂\nι₁ : Type u_1\nι₂ : Type u_2\nι₃ : Type u_3\nσ : ι₁ ≃ ι₂\na b : MultilinearMap R (fun x => M₂) M₃\nx✝ : ι₂ → M₂\n⊢ ↑(Equiv.toFun\n          { toFun := domDomCongr σ, invFun := domDomCongr σ.symm,\n            left_inv := (_ : ∀ (m : MultilinearMap R (fun x => M₂) M₃), domDomCongr σ.symm (domDomCongr σ m) = m),\n            right_inv := (_ : ∀ (m : MultilinearMap R (fun x => M₂) M₃), domDomCongr σ (domDomCongr σ.symm m) = m) }\n          (a + b))\n      x✝ =\n    ↑(Equiv.toFun\n            { toFun := domDomCongr σ, invFun := domDomCongr σ.symm,\n              left_inv := (_ : ∀ (m : MultilinearMap R (fun x => M₂) M₃), domDomCongr σ.symm (domDomCongr σ m) = m),\n              right_inv := (_ : ∀ (m : MultilinearMap R (fun x => M₂) M₃), domDomCongr σ (domDomCongr σ.symm m) = m) }\n            a +\n          Equiv.toFun\n            { toFun := domDomCongr σ, invFun := domDomCongr σ.symm,\n              left_inv := (_ : ∀ (m : MultilinearMap R (fun x => M₂) M₃), domDomCongr σ.symm (domDomCongr σ m) = m),\n              right_inv := (_ : ∀ (m : MultilinearMap R (fun x => M₂) M₃), domDomCongr σ (domDomCongr σ.symm m) = m) }\n            b)\n      x✝\n[PROOFSTEP]\nsimp [domDomCongr]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁹ : Semiring R\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\ng : M₂ →ₗ[R] M₃\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\n⊢ (↑g ∘ ↑f) (update m i (x + y)) = (↑g ∘ ↑f) (update m i x) + (↑g ∘ ↑f) (update m i y)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁹ : Semiring R\ninst✝⁸ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : (i : ι) → Module R (M₁ i)\ninst✝³ : Module R M₂\ninst✝² : Module R M₃\ninst✝¹ : Module R M'\ng : M₂ →ₗ[R] M₃\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nx : M₁ i\n⊢ (↑g ∘ ↑f) (update m i (c • x)) = c • (↑g ∘ ↑f) (update m i x)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : Semiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nι₁ : Type u_1\nι₂ : Type u_2\nσ : ι₁ ≃ ι₂\ng : M₂ →ₗ[R] M₃\nf : MultilinearMap R (fun x => M') M₂\n⊢ MultilinearMap.domDomCongr σ (compMultilinearMap g f) = compMultilinearMap g (MultilinearMap.domDomCongr σ f)\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : Semiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M'\nι₁ : Type u_1\nι₂ : Type u_2\nσ : ι₁ ≃ ι₂\ng : M₂ →ₗ[R] M₃\nf : MultilinearMap R (fun x => M') M₂\nx✝ : ι₂ → M'\n⊢ ↑(MultilinearMap.domDomCongr σ (compMultilinearMap g f)) x✝ =\n    ↑(compMultilinearMap g (MultilinearMap.domDomCongr σ f)) x✝\n[PROOFSTEP]\nsimp [MultilinearMap.domDomCongr]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nc : ι → R\nm : (i : ι) → M₁ i\ns : Finset ι\n⊢ ↑f (Finset.piecewise s (fun i => c i • m i) m) = (∏ i in s, c i) • ↑f m\n[PROOFSTEP]\nrefine' s.induction_on (by simp) _\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nc : ι → R\nm : (i : ι) → M₁ i\ns : Finset ι\n⊢ ↑f (Finset.piecewise ∅ (fun i => c i • m i) m) = (∏ i in ∅, c i) • ↑f m\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nc : ι → R\nm : (i : ι) → M₁ i\ns : Finset ι\n⊢ ∀ ⦃a : ι⦄ {s : Finset ι},\n    ¬a ∈ s →\n      ↑f (Finset.piecewise s (fun i => c i • m i) m) = (∏ i in s, c i) • ↑f m →\n        ↑f (Finset.piecewise (insert a s) (fun i => c i • m i) m) = (∏ i in insert a s, c i) • ↑f m\n[PROOFSTEP]\nintro j s j_not_mem_s Hrec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nc : ι → R\nm : (i : ι) → M₁ i\ns✝ : Finset ι\nj : ι\ns : Finset ι\nj_not_mem_s : ¬j ∈ s\nHrec : ↑f (Finset.piecewise s (fun i => c i • m i) m) = (∏ i in s, c i) • ↑f m\n⊢ ↑f (Finset.piecewise (insert j s) (fun i => c i • m i) m) = (∏ i in insert j s, c i) • ↑f m\n[PROOFSTEP]\nhave A : Function.update (s.piecewise (fun i => c i • m i) m) j (m j) = s.piecewise (fun i => c i • m i) m :=\n  by\n  ext i\n  by_cases h : i = j\n  · rw [h]\n    simp [j_not_mem_s]\n  · simp [h]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nc : ι → R\nm : (i : ι) → M₁ i\ns✝ : Finset ι\nj : ι\ns : Finset ι\nj_not_mem_s : ¬j ∈ s\nHrec : ↑f (Finset.piecewise s (fun i => c i • m i) m) = (∏ i in s, c i) • ↑f m\n⊢ update (Finset.piecewise s (fun i => c i • m i) m) j (m j) = Finset.piecewise s (fun i => c i • m i) m\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nc : ι → R\nm : (i : ι) → M₁ i\ns✝ : Finset ι\nj : ι\ns : Finset ι\nj_not_mem_s : ¬j ∈ s\nHrec : ↑f (Finset.piecewise s (fun i => c i • m i) m) = (∏ i in s, c i) • ↑f m\ni : ι\n⊢ update (Finset.piecewise s (fun i => c i • m i) m) j (m j) i = Finset.piecewise s (fun i => c i • m i) m i\n[PROOFSTEP]\nby_cases h : i = j\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nc : ι → R\nm : (i : ι) → M₁ i\ns✝ : Finset ι\nj : ι\ns : Finset ι\nj_not_mem_s : ¬j ∈ s\nHrec : ↑f (Finset.piecewise s (fun i => c i • m i) m) = (∏ i in s, c i) • ↑f m\ni : ι\nh : i = j\n⊢ update (Finset.piecewise s (fun i => c i • m i) m) j (m j) i = Finset.piecewise s (fun i => c i • m i) m i\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nc : ι → R\nm : (i : ι) → M₁ i\ns✝ : Finset ι\nj : ι\ns : Finset ι\nj_not_mem_s : ¬j ∈ s\nHrec : ↑f (Finset.piecewise s (fun i => c i • m i) m) = (∏ i in s, c i) • ↑f m\ni : ι\nh : i = j\n⊢ update (Finset.piecewise s (fun i => c i • m i) m) j (m j) j = Finset.piecewise s (fun i => c i • m i) m j\n[PROOFSTEP]\nsimp [j_not_mem_s]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nc : ι → R\nm : (i : ι) → M₁ i\ns✝ : Finset ι\nj : ι\ns : Finset ι\nj_not_mem_s : ¬j ∈ s\nHrec : ↑f (Finset.piecewise s (fun i => c i • m i) m) = (∏ i in s, c i) • ↑f m\ni : ι\nh : ¬i = j\n⊢ update (Finset.piecewise s (fun i => c i • m i) m) j (m j) i = Finset.piecewise s (fun i => c i • m i) m i\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nc : ι → R\nm : (i : ι) → M₁ i\ns✝ : Finset ι\nj : ι\ns : Finset ι\nj_not_mem_s : ¬j ∈ s\nHrec : ↑f (Finset.piecewise s (fun i => c i • m i) m) = (∏ i in s, c i) • ↑f m\nA : update (Finset.piecewise s (fun i => c i • m i) m) j (m j) = Finset.piecewise s (fun i => c i • m i) m\n⊢ ↑f (Finset.piecewise (insert j s) (fun i => c i • m i) m) = (∏ i in insert j s, c i) • ↑f m\n[PROOFSTEP]\nrw [s.piecewise_insert, f.map_smul, A, Hrec]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nc : ι → R\nm : (i : ι) → M₁ i\ns✝ : Finset ι\nj : ι\ns : Finset ι\nj_not_mem_s : ¬j ∈ s\nHrec : ↑f (Finset.piecewise s (fun i => c i • m i) m) = (∏ i in s, c i) • ↑f m\nA : update (Finset.piecewise s (fun i => c i • m i) m) j (m j) = Finset.piecewise s (fun i => c i • m i) m\n⊢ c j • (∏ i in s, c i) • ↑f m = (∏ i in insert j s, c i) • ↑f m\n[PROOFSTEP]\nsimp [j_not_mem_s, mul_smul]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nc : ι → R\nm : (i : ι) → M₁ i\n⊢ (↑f fun i => c i • m i) = (∏ i : ι, c i) • ↑f m\n[PROOFSTEP]\nclassical simpa using map_piecewise_smul f c m Finset.univ\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nc : ι → R\nm : (i : ι) → M₁ i\n⊢ (↑f fun i => c i • m i) = (∏ i : ι, c i) • ↑f m\n[PROOFSTEP]\nsimpa using map_piecewise_smul f c m Finset.univ\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nx : M₁ i\n⊢ ↑f (update (c • m) i x) = c ^ (Fintype.card ι - 1) • ↑f (update m i x)\n[PROOFSTEP]\nhave :\n  f ((Finset.univ.erase i).piecewise (c • update m i x) (update m i x)) =\n    (∏ _i in Finset.univ.erase i, c) • f (update m i x) :=\n  map_piecewise_smul f _ _ _\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nx : M₁ i\nthis :\n  ↑f (Finset.piecewise (Finset.erase Finset.univ i) (c • update m i x) (update m i x)) =\n    (∏ _i in Finset.erase Finset.univ i, c) • ↑f (update m i x)\n⊢ ↑f (update (c • m) i x) = c ^ (Fintype.card ι - 1) • ↑f (update m i x)\n[PROOFSTEP]\nsimpa [← Function.update_smul c m] using this\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : CommSemiring R\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁹ : (i : ι) → Module R (M₁ i)\ninst✝⁸ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁷ : Semiring R'\ninst✝⁶ : Semiring A\ninst✝⁵ : (i : ι) → Module A (M₁ i)\ninst✝⁴ : Module A M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R' M₃\ninst✝¹ : Module A M₃\ninst✝ : SMulCommClass A R' M₃\nι₁ : Type ?u.427401\nι₂ : Type ?u.427507\nσ : ι₁ ≃ ι₂\nsrc✝ : MultilinearMap A (fun x => M₂) M₃ ≃+ MultilinearMap A (fun x => M₂) M₃ := domDomCongrEquiv σ\nc : R'\nf : MultilinearMap A (fun x => M₂) M₃\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ :\n            ∀ (x y : MultilinearMap A (fun x => M₂) M₃),\n              Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n      (c • f) =\n    ↑(RingHom.id R') c •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : MultilinearMap A (fun x => M₂) M₃),\n                Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n        f\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : CommSemiring R\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁹ : (i : ι) → Module R (M₁ i)\ninst✝⁸ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁷ : Semiring R'\ninst✝⁶ : Semiring A\ninst✝⁵ : (i : ι) → Module A (M₁ i)\ninst✝⁴ : Module A M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R' M₃\ninst✝¹ : Module A M₃\ninst✝ : SMulCommClass A R' M₃\nι₁ : Type ?u.427401\nι₂ : Type ?u.427507\nσ : ι₁ ≃ ι₂\nsrc✝ : MultilinearMap A (fun x => M₂) M₃ ≃+ MultilinearMap A (fun x => M₂) M₃ := domDomCongrEquiv σ\nc : R'\nf : MultilinearMap A (fun x => M₂) M₃\nx✝ : ι₂ → M₂\n⊢ ↑(AddHom.toFun\n          { toFun := src✝.toFun,\n            map_add' :=\n              (_ :\n                ∀ (x y : MultilinearMap A (fun x => M₂) M₃),\n                  Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n          (c • f))\n      x✝ =\n    ↑(↑(RingHom.id R') c •\n          AddHom.toFun\n            { toFun := src✝.toFun,\n              map_add' :=\n                (_ :\n                  ∀ (x y : MultilinearMap A (fun x => M₂) M₃),\n                    Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n            f)\n      x✝\n[PROOFSTEP]\nsimp [MultilinearMap.domDomCongr]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι'\nm : (i : ι') → M₁ (↑σ.symm i)\ni : ι'\n⊢ ∀ (x y : M₁ (↑σ.symm i)),\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) + (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)\n[PROOFSTEP]\nletI := σ.decidableEq\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι'\nm : (i : ι') → M₁ (↑σ.symm i)\ni : ι'\nthis : DecidableEq ι := Equiv.decidableEq σ\n⊢ ∀ (x y : M₁ (↑σ.symm i)),\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) + (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)\n[PROOFSTEP]\nrw [← σ.apply_symm_apply i]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι'\nm : (i : ι') → M₁ (↑σ.symm i)\ni : ι'\nthis : DecidableEq ι := Equiv.decidableEq σ\n⊢ ∀ (x y : M₁ (↑σ.symm (↑σ (↑σ.symm i)))),\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m (↑σ (↑σ.symm i)) (x + y)) =\n      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m (↑σ (↑σ.symm i)) x) +\n        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m (↑σ (↑σ.symm i)) y)\n[PROOFSTEP]\nintro x y\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι'\nm : (i : ι') → M₁ (↑σ.symm i)\ni : ι'\nthis : DecidableEq ι := Equiv.decidableEq σ\nx y : M₁ (↑σ.symm (↑σ (↑σ.symm i)))\n⊢ (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m (↑σ (↑σ.symm i)) (x + y)) =\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m (↑σ (↑σ.symm i)) x) +\n      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m (↑σ (↑σ.symm i)) y)\n[PROOFSTEP]\nsimp only [comp_apply, piCongrLeft'_symm_update, f.map_add]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι'\nm : (i : ι') → M₁ (↑σ.symm i)\ni : ι'\nc : R\n⊢ ∀ (x : M₁ (↑σ.symm i)),\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)\n[PROOFSTEP]\nletI := σ.decidableEq\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι'\nm : (i : ι') → M₁ (↑σ.symm i)\ni : ι'\nc : R\nthis : DecidableEq ι := Equiv.decidableEq σ\n⊢ ∀ (x : M₁ (↑σ.symm i)),\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)\n[PROOFSTEP]\nrw [← σ.apply_symm_apply i]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι'\nm : (i : ι') → M₁ (↑σ.symm i)\ni : ι'\nc : R\nthis : DecidableEq ι := Equiv.decidableEq σ\n⊢ ∀ (x : M₁ (↑σ.symm (↑σ (↑σ.symm i)))),\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m (↑σ (↑σ.symm i)) (c • x)) =\n      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m (↑σ (↑σ.symm i)) x)\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι'\nm : (i : ι') → M₁ (↑σ.symm i)\ni : ι'\nc : R\nthis : DecidableEq ι := Equiv.decidableEq σ\nx : M₁ (↑σ.symm (↑σ (↑σ.symm i)))\n⊢ (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m (↑σ (↑σ.symm i)) (c • x)) =\n    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m (↑σ (↑σ.symm i)) x)\n[PROOFSTEP]\nsimp only [Function.comp, piCongrLeft'_symm_update, f.map_smul]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : CommSemiring R\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁹ : (i : ι) → Module R (M₁ i)\ninst✝⁸ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁷ : Semiring R'\ninst✝⁶ : Semiring A\ninst✝⁵ : (i : ι) → Module A (M₁ i)\ninst✝⁴ : Module A M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R' M₃\ninst✝¹ : Module A M₃\ninst✝ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf₁ f₂ : MultilinearMap R M₁ M₂\n⊢ (fun f =>\n        { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n          map_add' :=\n            (_ :\n              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n          map_smul' :=\n            (_ :\n              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R) (x : M₁ (↑σ.symm i)),\n                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                  c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n      (f₁ + f₂) =\n    (fun f =>\n          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n            map_add' :=\n              (_ :\n                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n            map_smul' :=\n              (_ :\n                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R) (x : M₁ (↑σ.symm i)),\n                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n        f₁ +\n      (fun f =>\n          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n            map_add' :=\n              (_ :\n                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n            map_smul' :=\n              (_ :\n                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R) (x : M₁ (↑σ.symm i)),\n                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n        f₂\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : CommSemiring R\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁹ : (i : ι) → Module R (M₁ i)\ninst✝⁸ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁷ : Semiring R'\ninst✝⁶ : Semiring A\ninst✝⁵ : (i : ι) → Module A (M₁ i)\ninst✝⁴ : Module A M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R' M₃\ninst✝¹ : Module A M₃\ninst✝ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf₁ f₂ : MultilinearMap R M₁ M₂\nx✝ : (i : ι') → M₁ (↑σ.symm i)\n⊢ ↑((fun f =>\n            { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n              map_add' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n              map_smul' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R) (x : M₁ (↑σ.symm i)),\n                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n          (f₁ + f₂))\n      x✝ =\n    ↑((fun f =>\n              { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                map_add' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                map_smul' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R) (x : M₁ (↑σ.symm i)),\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                        c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n            f₁ +\n          (fun f =>\n              { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                map_add' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                map_smul' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R) (x : M₁ (↑σ.symm i)),\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                        c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n            f₂)\n      x✝\n[PROOFSTEP]\nsimp only [Function.comp, coe_mk, add_apply]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : CommSemiring R\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁹ : (i : ι) → Module R (M₁ i)\ninst✝⁸ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁷ : Semiring R'\ninst✝⁶ : Semiring A\ninst✝⁵ : (i : ι) → Module A (M₁ i)\ninst✝⁴ : Module A M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R' M₃\ninst✝¹ : Module A M₃\ninst✝ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nc : R\nf : MultilinearMap R M₁ M₂\n⊢ AddHom.toFun\n      {\n        toFun := fun f =>\n          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n            map_add' :=\n              (_ :\n                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n            map_smul' :=\n              (_ :\n                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R) (x : M₁ (↑σ.symm i)),\n                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n        map_add' :=\n          (_ :\n            ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n              (fun f =>\n                    { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                      map_add' :=\n                        (_ :\n                          ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                      map_smul' :=\n                        (_ :\n                          ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                            (x : M₁ (↑σ.symm i)),\n                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                              c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                  (f₁ + f₂) =\n                (fun f =>\n                      { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                        map_add' :=\n                          (_ :\n                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                        map_smul' :=\n                          (_ :\n                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                              (x : M₁ (↑σ.symm i)),\n                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                    f₁ +\n                  (fun f =>\n                      { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                        map_add' :=\n                          (_ :\n                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                        map_smul' :=\n                          (_ :\n                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                              (x : M₁ (↑σ.symm i)),\n                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                    f₂) }\n      (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        {\n          toFun := fun f =>\n            { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n              map_add' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n              map_smul' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R) (x : M₁ (↑σ.symm i)),\n                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n          map_add' :=\n            (_ :\n              ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                (fun f =>\n                      { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                        map_add' :=\n                          (_ :\n                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                        map_smul' :=\n                          (_ :\n                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                              (x : M₁ (↑σ.symm i)),\n                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                    (f₁ + f₂) =\n                  (fun f =>\n                        { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                          map_add' :=\n                            (_ :\n                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                          map_smul' :=\n                            (_ :\n                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                (x : M₁ (↑σ.symm i)),\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                  c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                      f₁ +\n                    (fun f =>\n                        { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                          map_add' :=\n                            (_ :\n                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                          map_smul' :=\n                            (_ :\n                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                (x : M₁ (↑σ.symm i)),\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                  c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                      f₂) }\n        f\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : CommSemiring R\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁹ : (i : ι) → Module R (M₁ i)\ninst✝⁸ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁷ : Semiring R'\ninst✝⁶ : Semiring A\ninst✝⁵ : (i : ι) → Module A (M₁ i)\ninst✝⁴ : Module A M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R' M₃\ninst✝¹ : Module A M₃\ninst✝ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nc : R\nf : MultilinearMap R M₁ M₂\nx✝ : (i : ι') → M₁ (↑σ.symm i)\n⊢ ↑(AddHom.toFun\n          {\n            toFun := fun f =>\n              { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                map_add' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                map_smul' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R) (x : M₁ (↑σ.symm i)),\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                        c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n            map_add' :=\n              (_ :\n                ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                  (fun f =>\n                        { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                          map_add' :=\n                            (_ :\n                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                          map_smul' :=\n                            (_ :\n                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                (x : M₁ (↑σ.symm i)),\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                  c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                      (f₁ + f₂) =\n                    (fun f =>\n                          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                            map_add' :=\n                              (_ :\n                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                  (x y : M₁ (↑σ.symm i)),\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                            map_smul' :=\n                              (_ :\n                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                  (x : M₁ (↑σ.symm i)),\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                        f₁ +\n                      (fun f =>\n                          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                            map_add' :=\n                              (_ :\n                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                  (x y : M₁ (↑σ.symm i)),\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                            map_smul' :=\n                              (_ :\n                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                  (x : M₁ (↑σ.symm i)),\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                        f₂) }\n          (c • f))\n      x✝ =\n    ↑(↑(RingHom.id R) c •\n          AddHom.toFun\n            {\n              toFun := fun f =>\n                { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                  map_add' :=\n                    (_ :\n                      ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                  map_smul' :=\n                    (_ :\n                      ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R) (x : M₁ (↑σ.symm i)),\n                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                          c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n              map_add' :=\n                (_ :\n                  ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                    (fun f =>\n                          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                            map_add' :=\n                              (_ :\n                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                  (x y : M₁ (↑σ.symm i)),\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                            map_smul' :=\n                              (_ :\n                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                  (x : M₁ (↑σ.symm i)),\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                        (f₁ + f₂) =\n                      (fun f =>\n                            { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                              map_add' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                    (x y : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                              map_smul' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                    (x : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                          f₁ +\n                        (fun f =>\n                            { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                              map_add' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                    (x y : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                              map_smul' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                    (x : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                          f₂) }\n            f)\n      x✝\n[PROOFSTEP]\nsimp only [Function.comp, coe_mk, smul_apply, RingHom.id_apply]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R (fun i => M₁ (↑σ.symm i)) M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\n⊢ ∀ (x y : M₁ i),\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i (x + y)) =\n      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i x) + (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i y)\n[PROOFSTEP]\nletI := σ.symm.decidableEq\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R (fun i => M₁ (↑σ.symm i)) M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nthis : DecidableEq ι' := Equiv.decidableEq σ.symm\n⊢ ∀ (x y : M₁ i),\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i (x + y)) =\n      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i x) + (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i y)\n[PROOFSTEP]\nrw [← σ.symm_apply_apply i]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R (fun i => M₁ (↑σ.symm i)) M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nthis : DecidableEq ι' := Equiv.decidableEq σ.symm\n⊢ ∀ (x y : M₁ (↑σ.symm (↑σ i))),\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m (↑σ.symm (↑σ i)) (x + y)) =\n      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m (↑σ.symm (↑σ i)) x) +\n        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m (↑σ.symm (↑σ i)) y)\n[PROOFSTEP]\nintro x y\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R (fun i => M₁ (↑σ.symm i)) M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nthis : DecidableEq ι' := Equiv.decidableEq σ.symm\nx y : M₁ (↑σ.symm (↑σ i))\n⊢ (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m (↑σ.symm (↑σ i)) (x + y)) =\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m (↑σ.symm (↑σ i)) x) +\n      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m (↑σ.symm (↑σ i)) y)\n[PROOFSTEP]\nsimp only [comp_apply, piCongrLeft'_update, f.map_add]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R (fun i => M₁ (↑σ.symm i)) M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\n⊢ ∀ (x : M₁ i),\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i (c • x)) = c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i x)\n[PROOFSTEP]\nletI := σ.symm.decidableEq\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R (fun i => M₁ (↑σ.symm i)) M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nthis : DecidableEq ι' := Equiv.decidableEq σ.symm\n⊢ ∀ (x : M₁ i),\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i (c • x)) = c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i x)\n[PROOFSTEP]\nrw [← σ.symm_apply_apply i]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R (fun i => M₁ (↑σ.symm i)) M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nthis : DecidableEq ι' := Equiv.decidableEq σ.symm\n⊢ ∀ (x : M₁ (↑σ.symm (↑σ i))),\n    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m (↑σ.symm (↑σ i)) (c • x)) =\n      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m (↑σ.symm (↑σ i)) x)\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁵ : CommSemiring R\ninst✝¹⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹³ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁸ : Semiring R'\ninst✝⁷ : Semiring A\ninst✝⁶ : (i : ι) → Module A (M₁ i)\ninst✝⁵ : Module A M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R' M₃\ninst✝² : Module A M₃\ninst✝¹ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R (fun i => M₁ (↑σ.symm i)) M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nthis : DecidableEq ι' := Equiv.decidableEq σ.symm\nx : M₁ (↑σ.symm (↑σ i))\n⊢ (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m (↑σ.symm (↑σ i)) (c • x)) =\n    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m (↑σ.symm (↑σ i)) x)\n[PROOFSTEP]\nsimp only [Function.comp, piCongrLeft'_update, f.map_smul]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : CommSemiring R\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁹ : (i : ι) → Module R (M₁ i)\ninst✝⁸ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁷ : Semiring R'\ninst✝⁶ : Semiring A\ninst✝⁵ : (i : ι) → Module A (M₁ i)\ninst✝⁴ : Module A M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R' M₃\ninst✝¹ : Module A M₃\ninst✝ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R M₁ M₂\n⊢ (fun f =>\n        { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ),\n          map_add' :=\n            (_ :\n              ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i (x + y)) =\n                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i x) + (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i y)),\n          map_smul' :=\n            (_ :\n              ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i (c • x)) =\n                  c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i x)) })\n      (AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun f =>\n                  { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                    map_add' :=\n                      (_ :\n                        ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                    map_smul' :=\n                      (_ :\n                        ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R) (x : M₁ (↑σ.symm i)),\n                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                            c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n                map_add' :=\n                  (_ :\n                    ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                      (fun f =>\n                            { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                              map_add' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                    (x y : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                              map_smul' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                    (x : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                          (f₁ + f₂) =\n                        (fun f =>\n                              { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                map_add' :=\n                                  (_ :\n                                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                      (x y : M₁ (↑σ.symm i)),\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                map_smul' :=\n                                  (_ :\n                                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                      (x : M₁ (↑σ.symm i)),\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                        c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                            f₁ +\n                          (fun f =>\n                              { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                map_add' :=\n                                  (_ :\n                                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                      (x y : M₁ (↑σ.symm i)),\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                map_smul' :=\n                                  (_ :\n                                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                      (x : M₁ (↑σ.symm i)),\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                        c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                            f₂) },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (f : MultilinearMap R M₁ M₂),\n                  AddHom.toFun\n                      {\n                        toFun := fun f =>\n                          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                            map_add' :=\n                              (_ :\n                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                  (x y : M₁ (↑σ.symm i)),\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                            map_smul' :=\n                              (_ :\n                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                  (x : M₁ (↑σ.symm i)),\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n                        map_add' :=\n                          (_ :\n                            ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                              (fun f =>\n                                    { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                            (x y : M₁ (↑σ.symm i)),\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                            (x : M₁ (↑σ.symm i)),\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                              c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                  (f₁ + f₂) =\n                                (fun f =>\n                                      { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                              (x y : M₁ (↑σ.symm i)),\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                              (x : M₁ (↑σ.symm i)),\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                    f₁ +\n                                  (fun f =>\n                                      { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                              (x y : M₁ (↑σ.symm i)),\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                              (x : M₁ (↑σ.symm i)),\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                    f₂) }\n                      (c • f) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        {\n                          toFun := fun f =>\n                            { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                              map_add' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                    (x y : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                              map_smul' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                    (x : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n                          map_add' :=\n                            (_ :\n                              ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                                (fun f =>\n                                      { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                              (x y : M₁ (↑σ.symm i)),\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                              (x : M₁ (↑σ.symm i)),\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                    (f₁ + f₂) =\n                                  (fun f =>\n                                        { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                (x y : M₁ (↑σ.symm i)),\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                                (x : M₁ (↑σ.symm i)),\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                  c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                      f₁ +\n                                    (fun f =>\n                                        { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                (x y : M₁ (↑σ.symm i)),\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                                (x : M₁ (↑σ.symm i)),\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                  c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                      f₂) }\n                        f) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : CommSemiring R\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁹ : (i : ι) → Module R (M₁ i)\ninst✝⁸ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁷ : Semiring R'\ninst✝⁶ : Semiring A\ninst✝⁵ : (i : ι) → Module A (M₁ i)\ninst✝⁴ : Module A M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R' M₃\ninst✝¹ : Module A M₃\ninst✝ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R M₁ M₂\nx✝ : (i : ι) → M₁ i\n⊢ ↑((fun f =>\n            { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ),\n              map_add' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i (x + y)) =\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i x) +\n                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i y)),\n              map_smul' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i (c • x)) =\n                      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i x)) })\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  {\n                    toFun := fun f =>\n                      { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                        map_add' :=\n                          (_ :\n                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                        map_smul' :=\n                          (_ :\n                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                              (x : M₁ (↑σ.symm i)),\n                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n                    map_add' :=\n                      (_ :\n                        ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                          (fun f =>\n                                { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                        (x y : M₁ (↑σ.symm i)),\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                        (x : M₁ (↑σ.symm i)),\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                          c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                              (f₁ + f₂) =\n                            (fun f =>\n                                  { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                    map_add' :=\n                                      (_ :\n                                        ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                          (x y : M₁ (↑σ.symm i)),\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                          (x : M₁ (↑σ.symm i)),\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                            c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                f₁ +\n                              (fun f =>\n                                  { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                    map_add' :=\n                                      (_ :\n                                        ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                          (x y : M₁ (↑σ.symm i)),\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                          (x : M₁ (↑σ.symm i)),\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                            c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                f₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (c : R) (f : MultilinearMap R M₁ M₂),\n                      AddHom.toFun\n                          {\n                            toFun := fun f =>\n                              { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                map_add' :=\n                                  (_ :\n                                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                      (x y : M₁ (↑σ.symm i)),\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                map_smul' :=\n                                  (_ :\n                                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                      (x : M₁ (↑σ.symm i)),\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                        c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n                            map_add' :=\n                              (_ :\n                                ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                                  (fun f =>\n                                        { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                (x y : M₁ (↑σ.symm i)),\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                                (x : M₁ (↑σ.symm i)),\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                  c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                      (f₁ + f₂) =\n                                    (fun f =>\n                                          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                  (x y : M₁ (↑σ.symm i)),\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                  (c : R) (x : M₁ (↑σ.symm i)),\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                        f₁ +\n                                      (fun f =>\n                                          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                  (x y : M₁ (↑σ.symm i)),\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                  (c : R) (x : M₁ (↑σ.symm i)),\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                        f₂) }\n                          (c • f) =\n                        ↑(RingHom.id R) c •\n                          AddHom.toFun\n                            {\n                              toFun := fun f =>\n                                { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                        (x y : M₁ (↑σ.symm i)),\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                        (x : M₁ (↑σ.symm i)),\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                          c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                                    (fun f =>\n                                          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                  (x y : M₁ (↑σ.symm i)),\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                  (c : R) (x : M₁ (↑σ.symm i)),\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                        (f₁ + f₂) =\n                                      (fun f =>\n                                            { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                    (x y : M₁ (↑σ.symm i)),\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                    (c : R) (x : M₁ (↑σ.symm i)),\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                          f₁ +\n                                        (fun f =>\n                                            { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                    (x y : M₁ (↑σ.symm i)),\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                    (c : R) (x : M₁ (↑σ.symm i)),\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                          f₂) }\n                            f) }.toAddHom\n            f))\n      x✝ =\n    ↑f x✝\n[PROOFSTEP]\nsimp only [coe_mk, comp_apply, Equiv.symm_apply_apply]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : CommSemiring R\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁹ : (i : ι) → Module R (M₁ i)\ninst✝⁸ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁷ : Semiring R'\ninst✝⁶ : Semiring A\ninst✝⁵ : (i : ι) → Module A (M₁ i)\ninst✝⁴ : Module A M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R' M₃\ninst✝¹ : Module A M₃\ninst✝ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R (fun i => M₁ (↑σ.symm i)) M₂\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            {\n              toFun := fun f =>\n                { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                  map_add' :=\n                    (_ :\n                      ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                  map_smul' :=\n                    (_ :\n                      ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R) (x : M₁ (↑σ.symm i)),\n                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                          c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n              map_add' :=\n                (_ :\n                  ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                    (fun f =>\n                          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                            map_add' :=\n                              (_ :\n                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                  (x y : M₁ (↑σ.symm i)),\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                            map_smul' :=\n                              (_ :\n                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                  (x : M₁ (↑σ.symm i)),\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                        (f₁ + f₂) =\n                      (fun f =>\n                            { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                              map_add' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                    (x y : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                              map_smul' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                    (x : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                          f₁ +\n                        (fun f =>\n                            { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                              map_add' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                    (x y : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                              map_smul' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                    (x : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                          f₂) },\n          map_smul' :=\n            (_ :\n              ∀ (c : R) (f : MultilinearMap R M₁ M₂),\n                AddHom.toFun\n                    {\n                      toFun := fun f =>\n                        { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                          map_add' :=\n                            (_ :\n                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                          map_smul' :=\n                            (_ :\n                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                (x : M₁ (↑σ.symm i)),\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                  c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n                      map_add' :=\n                        (_ :\n                          ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                            (fun f =>\n                                  { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                    map_add' :=\n                                      (_ :\n                                        ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                          (x y : M₁ (↑σ.symm i)),\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                          (x : M₁ (↑σ.symm i)),\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                            c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                (f₁ + f₂) =\n                              (fun f =>\n                                    { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                            (x y : M₁ (↑σ.symm i)),\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                            (x : M₁ (↑σ.symm i)),\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                              c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                  f₁ +\n                                (fun f =>\n                                    { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                            (x y : M₁ (↑σ.symm i)),\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                            (x : M₁ (↑σ.symm i)),\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                              c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                  f₂) }\n                    (c • f) =\n                  ↑(RingHom.id R) c •\n                    AddHom.toFun\n                      {\n                        toFun := fun f =>\n                          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                            map_add' :=\n                              (_ :\n                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                  (x y : M₁ (↑σ.symm i)),\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                            map_smul' :=\n                              (_ :\n                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                  (x : M₁ (↑σ.symm i)),\n                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n                        map_add' :=\n                          (_ :\n                            ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                              (fun f =>\n                                    { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                            (x y : M₁ (↑σ.symm i)),\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                            (x : M₁ (↑σ.symm i)),\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                              c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                  (f₁ + f₂) =\n                                (fun f =>\n                                      { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                              (x y : M₁ (↑σ.symm i)),\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                              (x : M₁ (↑σ.symm i)),\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                    f₁ +\n                                  (fun f =>\n                                      { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                              (x y : M₁ (↑σ.symm i)),\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                              (x : M₁ (↑σ.symm i)),\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                    f₂) }\n                      f) }.toAddHom\n      ((fun f =>\n          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ),\n            map_add' :=\n              (_ :\n                ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i (x + y)) =\n                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i x) +\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i y)),\n            map_smul' :=\n              (_ :\n                ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i (c • x)) =\n                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i x)) })\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁴ : CommSemiring R\ninst✝¹³ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹² : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁹ : (i : ι) → Module R (M₁ i)\ninst✝⁸ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\nR' : Type u_1\nA : Type u_2\ninst✝⁷ : Semiring R'\ninst✝⁶ : Semiring A\ninst✝⁵ : (i : ι) → Module A (M₁ i)\ninst✝⁴ : Module A M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R' M₃\ninst✝¹ : Module A M₃\ninst✝ : SMulCommClass A R' M₃\nι' : Type u_3\nσ : ι ≃ ι'\nf : MultilinearMap R (fun i => M₁ (↑σ.symm i)) M₂\nx✝ : (i : ι') → M₁ (↑σ.symm i)\n⊢ ↑(AddHom.toFun\n          {\n              toAddHom :=\n                {\n                  toFun := fun f =>\n                    { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                      map_add' :=\n                        (_ :\n                          ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (x y : M₁ (↑σ.symm i)),\n                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                      map_smul' :=\n                        (_ :\n                          ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                            (x : M₁ (↑σ.symm i)),\n                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                              c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n                  map_add' :=\n                    (_ :\n                      ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                        (fun f =>\n                              { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                map_add' :=\n                                  (_ :\n                                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                      (x y : M₁ (↑σ.symm i)),\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                map_smul' :=\n                                  (_ :\n                                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                      (x : M₁ (↑σ.symm i)),\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                        c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                            (f₁ + f₂) =\n                          (fun f =>\n                                { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                        (x y : M₁ (↑σ.symm i)),\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                        (x : M₁ (↑σ.symm i)),\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                          c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                              f₁ +\n                            (fun f =>\n                                { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                        (x y : M₁ (↑σ.symm i)),\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                            (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                        (x : M₁ (↑σ.symm i)),\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                          c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                              f₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (c : R) (f : MultilinearMap R M₁ M₂),\n                    AddHom.toFun\n                        {\n                          toFun := fun f =>\n                            { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                              map_add' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                    (x y : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                              map_smul' :=\n                                (_ :\n                                  ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                    (x : M₁ (↑σ.symm i)),\n                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                      c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n                          map_add' :=\n                            (_ :\n                              ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                                (fun f =>\n                                      { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                              (x y : M₁ (↑σ.symm i)),\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                              (x : M₁ (↑σ.symm i)),\n                                              (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                    (f₁ + f₂) =\n                                  (fun f =>\n                                        { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                (x y : M₁ (↑σ.symm i)),\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                                (x : M₁ (↑σ.symm i)),\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                  c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                      f₁ +\n                                    (fun f =>\n                                        { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                (x y : M₁ (↑σ.symm i)),\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                                (x : M₁ (↑σ.symm i)),\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                  c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                      f₂) }\n                        (c • f) =\n                      ↑(RingHom.id R) c •\n                        AddHom.toFun\n                          {\n                            toFun := fun f =>\n                              { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                map_add' :=\n                                  (_ :\n                                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                      (x y : M₁ (↑σ.symm i)),\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                map_smul' :=\n                                  (_ :\n                                    ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                      (x : M₁ (↑σ.symm i)),\n                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                        c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) },\n                            map_add' :=\n                              (_ :\n                                ∀ (f₁ f₂ : MultilinearMap R M₁ M₂),\n                                  (fun f =>\n                                        { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                (x y : M₁ (↑σ.symm i)),\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι') (c : R)\n                                                (x : M₁ (↑σ.symm i)),\n                                                (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                  c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                      (f₁ + f₂) =\n                                    (fun f =>\n                                          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                  (x y : M₁ (↑σ.symm i)),\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                  (c : R) (x : M₁ (↑σ.symm i)),\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                        f₁ +\n                                      (fun f =>\n                                          { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                  (x y : M₁ (↑σ.symm i)),\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (x + y)) =\n                                                    (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x) +\n                                                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i y)),\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ [inst : DecidableEq ι'] (m : (i : ι') → M₁ (↑σ.symm i)) (i : ι')\n                                                  (c : R) (x : M₁ (↑σ.symm i)),\n                                                  (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i (c • x)) =\n                                                    c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ).symm) (update m i x)) })\n                                        f₂) }\n                          f) }.toAddHom\n          ((fun f =>\n              { toFun := ↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ),\n                map_add' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i (x + y)) =\n                        (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i x) +\n                          (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i y)),\n                map_smul' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),\n                      (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i (c • x)) =\n                        c • (↑f ∘ ↑(Equiv.piCongrLeft' M₁ σ)) (update m i x)) })\n            f))\n      x✝ =\n    ↑f x✝\n[PROOFSTEP]\nsimp only [coe_mk, comp_apply, Equiv.apply_symm_apply]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nm : ι → A\ni : ι\nx y : A\n⊢ (fun m => ∏ i : ι, m i) (update m i (x + y)) =\n    (fun m => ∏ i : ι, m i) (update m i x) + (fun m => ∏ i : ι, m i) (update m i y)\n[PROOFSTEP]\nsimp [Finset.prod_update_of_mem, add_mul]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁸ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝⁵ : (i : ι) → Module R (M₁ i)\ninst✝⁴ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝³ : CommSemiring A\ninst✝² : Algebra R A\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nm : ι → A\ni : ι\nc : R\nx : A\n⊢ (fun m => ∏ i : ι, m i) (update m i (c • x)) = c • (fun m => ∏ i : ι, m i) (update m i x)\n[PROOFSTEP]\nsimp [Finset.prod_update_of_mem]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ndec : DecidableEq (Fin n)\nm : Fin n → A\ni : Fin n\nx y : A\n⊢ (fun m => List.prod (List.ofFn m)) (update m i (x + y)) =\n    (fun m => List.prod (List.ofFn m)) (update m i x) + (fun m => List.prod (List.ofFn m)) (update m i y)\n[PROOFSTEP]\nrw [Subsingleton.elim dec (by infer_instance)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ndec : DecidableEq (Fin n)\nm : Fin n → A\ni : Fin n\nx y : A\n⊢ DecidableEq (Fin n)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ndec : DecidableEq (Fin n)\nm : Fin n → A\ni : Fin n\nx y : A\n⊢ (fun m => List.prod (List.ofFn m)) (update m i (x + y)) =\n    (fun m => List.prod (List.ofFn m)) (update m i x) + (fun m => List.prod (List.ofFn m)) (update m i y)\n[PROOFSTEP]\nhave : (List.finRange n).indexOf i < n := by simpa using List.indexOf_lt_length.2 (List.mem_finRange i)\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ndec : DecidableEq (Fin n)\nm : Fin n → A\ni : Fin n\nx y : A\n⊢ List.indexOf i (List.finRange n) < n\n[PROOFSTEP]\nsimpa using List.indexOf_lt_length.2 (List.mem_finRange i)\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ndec : DecidableEq (Fin n)\nm : Fin n → A\ni : Fin n\nx y : A\nthis : List.indexOf i (List.finRange n) < n\n⊢ (fun m => List.prod (List.ofFn m)) (update m i (x + y)) =\n    (fun m => List.prod (List.ofFn m)) (update m i x) + (fun m => List.prod (List.ofFn m)) (update m i y)\n[PROOFSTEP]\nsimp [List.ofFn_eq_map, (List.nodup_finRange n).map_update, List.prod_set, add_mul, this, mul_add, add_mul]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ndec : DecidableEq (Fin n)\nm : Fin n → A\ni : Fin n\nc : R\nx : A\n⊢ (fun m => List.prod (List.ofFn m)) (update m i (c • x)) = c • (fun m => List.prod (List.ofFn m)) (update m i x)\n[PROOFSTEP]\nrw [Subsingleton.elim dec (by infer_instance)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ndec : DecidableEq (Fin n)\nm : Fin n → A\ni : Fin n\nc : R\nx : A\n⊢ DecidableEq (Fin n)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ndec : DecidableEq (Fin n)\nm : Fin n → A\ni : Fin n\nc : R\nx : A\n⊢ (fun m => List.prod (List.ofFn m)) (update m i (c • x)) = c • (fun m => List.prod (List.ofFn m)) (update m i x)\n[PROOFSTEP]\nhave : (List.finRange n).indexOf i < n := by simpa using List.indexOf_lt_length.2 (List.mem_finRange i)\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ndec : DecidableEq (Fin n)\nm : Fin n → A\ni : Fin n\nc : R\nx : A\n⊢ List.indexOf i (List.finRange n) < n\n[PROOFSTEP]\nsimpa using List.indexOf_lt_length.2 (List.mem_finRange i)\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\ndec : DecidableEq (Fin n)\nm : Fin n → A\ni : Fin n\nc : R\nx : A\nthis : List.indexOf i (List.finRange n) < n\n⊢ (fun m => List.prod (List.ofFn m)) (update m i (c • x)) = c • (fun m => List.prod (List.ofFn m)) (update m i x)\n[PROOFSTEP]\nsimp [List.ofFn_eq_map, (List.nodup_finRange n).map_update, List.prod_set, this]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁸ : CommSemiring R\ninst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M₂\nf f' : MultilinearMap R M₁ M₂\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ (↑(MultilinearMap.mkPiAlgebraFin R n A) fun x => a) = a ^ n\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nf : MultilinearMap R (fun x => R) M₂\n⊢ MultilinearMap.mkPiRing R ι (↑f fun x => 1) = f\n[PROOFSTEP]\next m\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nf : MultilinearMap R (fun x => R) M₂\nm : ι → R\n⊢ ↑(MultilinearMap.mkPiRing R ι (↑f fun x => 1)) m = ↑f m\n[PROOFSTEP]\nhave : m = fun i => m i • (1 : R) := by\n  ext j\n  simp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nf : MultilinearMap R (fun x => R) M₂\nm : ι → R\n⊢ m = fun i => m i • 1\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nf : MultilinearMap R (fun x => R) M₂\nm : ι → R\nj : ι\n⊢ m j = m j • 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nf : MultilinearMap R (fun x => R) M₂\nm : ι → R\nthis : m = fun i => m i • 1\n⊢ ↑(MultilinearMap.mkPiRing R ι (↑f fun x => 1)) m = ↑f m\n[PROOFSTEP]\nconv_rhs => rw [this, f.map_smul_univ]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nf : MultilinearMap R (fun x => R) M₂\nm : ι → R\nthis : m = fun i => m i • 1\n| ↑f m\n[PROOFSTEP]\nrw [this, f.map_smul_univ]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nf : MultilinearMap R (fun x => R) M₂\nm : ι → R\nthis : m = fun i => m i • 1\n| ↑f m\n[PROOFSTEP]\nrw [this, f.map_smul_univ]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nf : MultilinearMap R (fun x => R) M₂\nm : ι → R\nthis : m = fun i => m i • 1\n| ↑f m\n[PROOFSTEP]\nrw [this, f.map_smul_univ]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nz₁ z₂ : M₂\n⊢ MultilinearMap.mkPiRing R ι z₁ = MultilinearMap.mkPiRing R ι z₂ ↔ z₁ = z₂\n[PROOFSTEP]\nsimp_rw [MultilinearMap.ext_iff, mkPiRing_apply]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nz₁ z₂ : M₂\n⊢ (∀ (x : ι → R), (∏ i : ι, x i) • z₁ = (∏ i : ι, x i) • z₂) ↔ z₁ = z₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nz₁ z₂ : M₂\n⊢ (∀ (x : ι → R), (∏ i : ι, x i) • z₁ = (∏ i : ι, x i) • z₂) → z₁ = z₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nz₁ z₂ : M₂\n⊢ z₁ = z₂ → ∀ (x : ι → R), (∏ i : ι, x i) • z₁ = (∏ i : ι, x i) • z₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nz₁ z₂ : M₂\nh : ∀ (x : ι → R), (∏ i : ι, x i) • z₁ = (∏ i : ι, x i) • z₂\n⊢ z₁ = z₂\n[PROOFSTEP]\nsimpa using h fun _ => 1\n[GOAL]\ncase mpr\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nz₁ z₂ : M₂\nh : z₁ = z₂\n⊢ ∀ (x : ι → R), (∏ i : ι, x i) • z₁ = (∏ i : ι, x i) • z₂\n[PROOFSTEP]\nintro x\n[GOAL]\ncase mpr\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nz₁ z₂ : M₂\nh : z₁ = z₂\nx : ι → R\n⊢ (∏ i : ι, x i) • z₁ = (∏ i : ι, x i) • z₂\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\n⊢ MultilinearMap.mkPiRing R ι 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nx✝ : ι → R\n⊢ ↑(MultilinearMap.mkPiRing R ι 0) x✝ = ↑0 x✝\n[PROOFSTEP]\nrw [mkPiRing_apply, smul_zero, MultilinearMap.zero_apply]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf f' : MultilinearMap R M₁ M₂\ninst✝ : Fintype ι\nz : M₂\n⊢ MultilinearMap.mkPiRing R ι z = 0 ↔ z = 0\n[PROOFSTEP]\nrw [← mkPiRing_zero, mkPiRing_eq_iff]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : Semiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommGroup M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ g f : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\n⊢ (fun m => -↑f m) (update m i (x + y)) = (fun m => -↑f m) (update m i x) + (fun m => -↑f m) (update m i y)\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : Semiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommGroup M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ g f : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nx : M₁ i\n⊢ (fun m => -↑f m) (update m i (c • x)) = c • (fun m => -↑f m) (update m i x)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : Semiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommGroup M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ g✝ f g : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\n⊢ (fun m => ↑f m - ↑g m) (update m i (x + y)) =\n    (fun m => ↑f m - ↑g m) (update m i x) + (fun m => ↑f m - ↑g m) (update m i y)\n[PROOFSTEP]\nsimp only [MultilinearMap.map_add, sub_eq_add_neg, neg_add]\n  -- Porting note: used to be `cc`\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : Semiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommGroup M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ g✝ f g : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\n⊢ ↑f (update m i x) + ↑f (update m i y) + (-↑g (update m i x) + -↑g (update m i y)) =\n    ↑f (update m i x) + -↑g (update m i x) + (↑f (update m i y) + -↑g (update m i y))\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : Semiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommGroup M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ g✝ f g : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\n⊢ ↑f (update m i x) + ↑f (update m i y) + (-↑g (update m i x) + -↑g (update m i y)) =\n    ↑f (update m i x) + -↑g (update m i x) + (↑f (update m i y) + -↑g (update m i y))\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : Semiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommGroup M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ g✝ f g : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nc : R\nx : M₁ i\n⊢ (fun m => ↑f m - ↑g m) (update m i (c • x)) = c • (fun m => ↑f m - ↑g m) (update m i x)\n[PROOFSTEP]\nsimp only [MultilinearMap.map_smul, smul_sub]\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : Semiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommGroup M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ g : MultilinearMap R M₁ M₂\nsrc✝ : AddCommMonoid (MultilinearMap R M₁ M₂) := addCommMonoid\nn : ℤ\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\n⊢ (fun m => n • ↑f m) (update m i (x + y)) = (fun m => n • ↑f m) (update m i x) + (fun m => n • ↑f m) (update m i y)\n[PROOFSTEP]\nsimp [smul_add]\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : Semiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommGroup M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf✝ g : MultilinearMap R M₁ M₂\nsrc✝ : AddCommMonoid (MultilinearMap R M₁ M₂) := addCommMonoid\nn : ℤ\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nl : (i : ι) → M₁ i\ni : ι\nx : R\nd : M₁ i\n⊢ (fun m => n • ↑f m) (update l i (x • d)) = x • (fun m => n • ↑f m) (update l i d)\n[PROOFSTEP]\nsimp [← smul_comm x n (_ : M₂)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : Semiring R\ninst✝⁴ : (i : ι) → AddCommGroup (M₁ i)\ninst✝³ : AddCommGroup M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx : M₁ i\n⊢ ↑f (update m i (-x)) + ↑f (update m i x) = 0\n[PROOFSTEP]\nrw [← MultilinearMap.map_add, add_left_neg, f.map_coord_zero i (update_same i 0 m)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : Semiring R\ninst✝⁴ : (i : ι) → AddCommGroup (M₁ i)\ninst✝³ : AddCommGroup M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\nf : MultilinearMap R M₁ M₂\ninst✝ : DecidableEq ι\nm : (i : ι) → M₁ i\ni : ι\nx y : M₁ i\n⊢ ↑f (update m i (x - y)) = ↑f (update m i x) - ↑f (update m i y)\n[PROOFSTEP]\nrw [sub_eq_add_neg, sub_eq_add_neg, MultilinearMap.map_add, map_neg]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : CommSemiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\ninst✝ : Fintype ι\nz z' : M₂\n⊢ (fun z => MultilinearMap.mkPiRing R ι z) (z + z') =\n    (fun z => MultilinearMap.mkPiRing R ι z) z + (fun z => MultilinearMap.mkPiRing R ι z) z'\n[PROOFSTEP]\next m\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : CommSemiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\ninst✝ : Fintype ι\nz z' : M₂\nm : ι → R\n⊢ ↑((fun z => MultilinearMap.mkPiRing R ι z) (z + z')) m =\n    ↑((fun z => MultilinearMap.mkPiRing R ι z) z + (fun z => MultilinearMap.mkPiRing R ι z) z') m\n[PROOFSTEP]\nsimp [smul_add]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : CommSemiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\ninst✝ : Fintype ι\nc : R\nz : M₂\n⊢ AddHom.toFun\n      { toFun := fun z => MultilinearMap.mkPiRing R ι z,\n        map_add' :=\n          (_ :\n            ∀ (z z' : M₂),\n              (fun z => MultilinearMap.mkPiRing R ι z) (z + z') =\n                (fun z => MultilinearMap.mkPiRing R ι z) z + (fun z => MultilinearMap.mkPiRing R ι z) z') }\n      (c • z) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := fun z => MultilinearMap.mkPiRing R ι z,\n          map_add' :=\n            (_ :\n              ∀ (z z' : M₂),\n                (fun z => MultilinearMap.mkPiRing R ι z) (z + z') =\n                  (fun z => MultilinearMap.mkPiRing R ι z) z + (fun z => MultilinearMap.mkPiRing R ι z) z') }\n        z\n[PROOFSTEP]\next m\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : CommSemiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\ninst✝ : Fintype ι\nc : R\nz : M₂\nm : ι → R\n⊢ ↑(AddHom.toFun\n          { toFun := fun z => MultilinearMap.mkPiRing R ι z,\n            map_add' :=\n              (_ :\n                ∀ (z z' : M₂),\n                  (fun z => MultilinearMap.mkPiRing R ι z) (z + z') =\n                    (fun z => MultilinearMap.mkPiRing R ι z) z + (fun z => MultilinearMap.mkPiRing R ι z) z') }\n          (c • z))\n      m =\n    ↑(↑(RingHom.id R) c •\n          AddHom.toFun\n            { toFun := fun z => MultilinearMap.mkPiRing R ι z,\n              map_add' :=\n                (_ :\n                  ∀ (z z' : M₂),\n                    (fun z => MultilinearMap.mkPiRing R ι z) (z + z') =\n                      (fun z => MultilinearMap.mkPiRing R ι z) z + (fun z => MultilinearMap.mkPiRing R ι z) z') }\n            z)\n      m\n[PROOFSTEP]\nsimp [smul_smul, mul_comm]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁵ : CommSemiring R\ninst✝⁴ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : ι) → Module R (M₁ i)\ninst✝¹ : Module R M₂\ninst✝ : Fintype ι\nz : M₂\n⊢ (fun f => ↑f fun x => 1)\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun z => MultilinearMap.mkPiRing R ι z,\n                map_add' :=\n                  (_ :\n                    ∀ (z z' : M₂),\n                      (fun z => MultilinearMap.mkPiRing R ι z) (z + z') =\n                        (fun z => MultilinearMap.mkPiRing R ι z) z + (fun z => MultilinearMap.mkPiRing R ι z) z') },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (z : M₂),\n                  AddHom.toFun\n                      { toFun := fun z => MultilinearMap.mkPiRing R ι z,\n                        map_add' :=\n                          (_ :\n                            ∀ (z z' : M₂),\n                              (fun z => MultilinearMap.mkPiRing R ι z) (z + z') =\n                                (fun z => MultilinearMap.mkPiRing R ι z) z +\n                                  (fun z => MultilinearMap.mkPiRing R ι z) z') }\n                      (c • z) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        { toFun := fun z => MultilinearMap.mkPiRing R ι z,\n                          map_add' :=\n                            (_ :\n                              ∀ (z z' : M₂),\n                                (fun z => MultilinearMap.mkPiRing R ι z) (z + z') =\n                                  (fun z => MultilinearMap.mkPiRing R ι z) z +\n                                    (fun z => MultilinearMap.mkPiRing R ι z) z') }\n                        z) }.toAddHom\n        z) =\n    z\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\ndec : DecidableEq (Fin (Nat.succ n))\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\n⊢ (fun m => ↑(↑f (m 0)) (tail m)) (update m i (x + y)) =\n    (fun m => ↑(↑f (m 0)) (tail m)) (update m i x) + (fun m => ↑(↑f (m 0)) (tail m)) (update m i y)\n[PROOFSTEP]\nrw [Subsingleton.elim dec (by clear dec; infer_instance)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\ndec : DecidableEq (Fin (Nat.succ n))\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\n⊢ DecidableEq (Fin (Nat.succ n))\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\n⊢ DecidableEq (Fin (Nat.succ n))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\ndec : DecidableEq (Fin (Nat.succ n))\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\n⊢ (fun m => ↑(↑f (m 0)) (tail m)) (update m i (x + y)) =\n    (fun m => ↑(↑f (m 0)) (tail m)) (update m i x) + (fun m => ↑(↑f (m 0)) (tail m)) (update m i y)\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\n⊢ (fun m => ↑(↑f (m 0)) (tail m)) (update m i (x + y)) =\n    (fun m => ↑(↑f (m 0)) (tail m)) (update m i x) + (fun m => ↑(↑f (m 0)) (tail m)) (update m i y)\n[PROOFSTEP]\nby_cases h : i = 0\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\nh : i = 0\n⊢ (fun m => ↑(↑f (m 0)) (tail m)) (update m i (x + y)) =\n    (fun m => ↑(↑f (m 0)) (tail m)) (update m i x) + (fun m => ↑(↑f (m 0)) (tail m)) (update m i y)\n[PROOFSTEP]\nsubst i\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\nx y : M 0\n⊢ (fun m => ↑(↑f (m 0)) (tail m)) (update m 0 (x + y)) =\n    (fun m => ↑(↑f (m 0)) (tail m)) (update m 0 x) + (fun m => ↑(↑f (m 0)) (tail m)) (update m 0 y)\n[PROOFSTEP]\nsimp only [update_same, map_add, tail_update_zero, MultilinearMap.add_apply]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\nh : ¬i = 0\n⊢ (fun m => ↑(↑f (m 0)) (tail m)) (update m i (x + y)) =\n    (fun m => ↑(↑f (m 0)) (tail m)) (update m i x) + (fun m => ↑(↑f (m 0)) (tail m)) (update m i y)\n[PROOFSTEP]\nsimp_rw [update_noteq (Ne.symm h)]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\nh : ¬i = 0\n⊢ ↑(↑f (m 0)) (tail (update m i (x + y))) = ↑(↑f (m 0)) (tail (update m i x)) + ↑(↑f (m 0)) (tail (update m i y))\n[PROOFSTEP]\nrevert x y\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nh : ¬i = 0\n⊢ ∀ (x y : M i),\n    ↑(↑f (m 0)) (tail (update m i (x + y))) = ↑(↑f (m 0)) (tail (update m i x)) + ↑(↑f (m 0)) (tail (update m i y))\n[PROOFSTEP]\nrw [← succ_pred i h]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nh : ¬i = 0\n⊢ ∀ (x y : M (succ (pred i h))),\n    ↑(↑f (m 0)) (tail (update m (succ (pred i h)) (x + y))) =\n      ↑(↑f (m 0)) (tail (update m (succ (pred i h)) x)) + ↑(↑f (m 0)) (tail (update m (succ (pred i h)) y))\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nh : ¬i = 0\nx y : M (succ (pred i h))\n⊢ ↑(↑f (m 0)) (tail (update m (succ (pred i h)) (x + y))) =\n    ↑(↑f (m 0)) (tail (update m (succ (pred i h)) x)) + ↑(↑f (m 0)) (tail (update m (succ (pred i h)) y))\n[PROOFSTEP]\nrw [tail_update_succ, MultilinearMap.map_add, tail_update_succ, tail_update_succ]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\ndec : DecidableEq (Fin (Nat.succ n))\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\n⊢ (fun m => ↑(↑f (m 0)) (tail m)) (update m i (c • x)) = c • (fun m => ↑(↑f (m 0)) (tail m)) (update m i x)\n[PROOFSTEP]\nrw [Subsingleton.elim dec (by clear dec; infer_instance)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\ndec : DecidableEq (Fin (Nat.succ n))\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\n⊢ DecidableEq (Fin (Nat.succ n))\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\n⊢ DecidableEq (Fin (Nat.succ n))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\ndec : DecidableEq (Fin (Nat.succ n))\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\n⊢ (fun m => ↑(↑f (m 0)) (tail m)) (update m i (c • x)) = c • (fun m => ↑(↑f (m 0)) (tail m)) (update m i x)\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\n⊢ (fun m => ↑(↑f (m 0)) (tail m)) (update m i (c • x)) = c • (fun m => ↑(↑f (m 0)) (tail m)) (update m i x)\n[PROOFSTEP]\nby_cases h : i = 0\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\nh : i = 0\n⊢ (fun m => ↑(↑f (m 0)) (tail m)) (update m i (c • x)) = c • (fun m => ↑(↑f (m 0)) (tail m)) (update m i x)\n[PROOFSTEP]\nsubst i\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\nc : R\nx : M 0\n⊢ (fun m => ↑(↑f (m 0)) (tail m)) (update m 0 (c • x)) = c • (fun m => ↑(↑f (m 0)) (tail m)) (update m 0 x)\n[PROOFSTEP]\nsimp only [update_same, map_smul, tail_update_zero, MultilinearMap.smul_apply]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\nh : ¬i = 0\n⊢ (fun m => ↑(↑f (m 0)) (tail m)) (update m i (c • x)) = c • (fun m => ↑(↑f (m 0)) (tail m)) (update m i x)\n[PROOFSTEP]\nsimp_rw [update_noteq (Ne.symm h)]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\nh : ¬i = 0\n⊢ ↑(↑f (m 0)) (tail (update m i (c • x))) = c • ↑(↑f (m 0)) (tail (update m i x))\n[PROOFSTEP]\nrevert x\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nh : ¬i = 0\n⊢ ∀ (x : M i), ↑(↑f (m 0)) (tail (update m i (c • x))) = c • ↑(↑f (m 0)) (tail (update m i x))\n[PROOFSTEP]\nrw [← succ_pred i h]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nh : ¬i = 0\n⊢ ∀ (x : M (succ (pred i h))),\n    ↑(↑f (m 0)) (tail (update m (succ (pred i h)) (c • x))) = c • ↑(↑f (m 0)) (tail (update m (succ (pred i h)) x))\n[PROOFSTEP]\nintro x\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nh : ¬i = 0\nx : M (succ (pred i h))\n⊢ ↑(↑f (m 0)) (tail (update m (succ (pred i h)) (c • x))) = c • ↑(↑f (m 0)) (tail (update m (succ (pred i h)) x))\n[PROOFSTEP]\nrw [tail_update_succ, tail_update_succ, MultilinearMap.map_smul]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nx : M 0\ndec : DecidableEq (Fin n)\nm : (i : Fin n) → M (succ i)\ni : Fin n\ny y' : M (succ i)\n⊢ (fun m => ↑f (cons x m)) (update m i (y + y')) =\n    (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')\n[PROOFSTEP]\nrw [Subsingleton.elim dec (by clear dec; infer_instance)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nx : M 0\ndec : DecidableEq (Fin n)\nm : (i : Fin n) → M (succ i)\ni : Fin n\ny y' : M (succ i)\n⊢ DecidableEq (Fin n)\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nx : M 0\nm : (i : Fin n) → M (succ i)\ni : Fin n\ny y' : M (succ i)\n⊢ DecidableEq (Fin n)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nx : M 0\ndec : DecidableEq (Fin n)\nm : (i : Fin n) → M (succ i)\ni : Fin n\ny y' : M (succ i)\n⊢ (fun m => ↑f (cons x m)) (update m i (y + y')) =\n    (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nx : M 0\ndec : DecidableEq (Fin n)\nm : (i : Fin n) → M (succ i)\ni : Fin n\ny : R\nc : M (succ i)\n⊢ (fun m => ↑f (cons x m)) (update m i (y • c)) = y • (fun m => ↑f (cons x m)) (update m i c)\n[PROOFSTEP]\nrw [Subsingleton.elim dec (by clear dec; infer_instance)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nx : M 0\ndec : DecidableEq (Fin n)\nm : (i : Fin n) → M (succ i)\ni : Fin n\ny : R\nc : M (succ i)\n⊢ DecidableEq (Fin n)\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nx : M 0\nm : (i : Fin n) → M (succ i)\ni : Fin n\ny : R\nc : M (succ i)\n⊢ DecidableEq (Fin n)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nx : M 0\ndec : DecidableEq (Fin n)\nm : (i : Fin n) → M (succ i)\ni : Fin n\ny : R\nc : M (succ i)\n⊢ (fun m => ↑f (cons x m)) (update m i (y • c)) = y • (fun m => ↑f (cons x m)) (update m i c)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nx y : M 0\n⊢ (fun x =>\n        { toFun := fun m => ↑f (cons x m),\n          map_add' :=\n            (_ :\n              ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y y' : M (succ i)),\n                (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                  (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n          map_smul' :=\n            (_ :\n              ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R) (c : M (succ i)),\n                (fun m => ↑f (cons x m)) (update m i (y • c)) = y • (fun m => ↑f (cons x m)) (update m i c)) })\n      (x + y) =\n    (fun x =>\n          { toFun := fun m => ↑f (cons x m),\n            map_add' :=\n              (_ :\n                ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y y' : M (succ i)),\n                  (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                    (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n            map_smul' :=\n              (_ :\n                ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R) (c : M (succ i)),\n                  (fun m => ↑f (cons x m)) (update m i (y • c)) = y • (fun m => ↑f (cons x m)) (update m i c)) })\n        x +\n      (fun x =>\n          { toFun := fun m => ↑f (cons x m),\n            map_add' :=\n              (_ :\n                ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y y' : M (succ i)),\n                  (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                    (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n            map_smul' :=\n              (_ :\n                ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R) (c : M (succ i)),\n                  (fun m => ↑f (cons x m)) (update m i (y • c)) = y • (fun m => ↑f (cons x m)) (update m i c)) })\n        y\n[PROOFSTEP]\next m\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nx y : M 0\nm : (i : Fin n) → M (succ i)\n⊢ ↑((fun x =>\n            { toFun := fun m => ↑f (cons x m),\n              map_add' :=\n                (_ :\n                  ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y y' : M (succ i)),\n                    (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                      (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n              map_smul' :=\n                (_ :\n                  ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R) (c : M (succ i)),\n                    (fun m => ↑f (cons x m)) (update m i (y • c)) = y • (fun m => ↑f (cons x m)) (update m i c)) })\n          (x + y))\n      m =\n    ↑((fun x =>\n              { toFun := fun m => ↑f (cons x m),\n                map_add' :=\n                  (_ :\n                    ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y y' : M (succ i)),\n                      (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                        (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                map_smul' :=\n                  (_ :\n                    ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R) (c : M (succ i)),\n                      (fun m => ↑f (cons x m)) (update m i (y • c)) = y • (fun m => ↑f (cons x m)) (update m i c)) })\n            x +\n          (fun x =>\n              { toFun := fun m => ↑f (cons x m),\n                map_add' :=\n                  (_ :\n                    ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y y' : M (succ i)),\n                      (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                        (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                map_smul' :=\n                  (_ :\n                    ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R) (c : M (succ i)),\n                      (fun m => ↑f (cons x m)) (update m i (y • c)) = y • (fun m => ↑f (cons x m)) (update m i c)) })\n            y)\n      m\n[PROOFSTEP]\nexact cons_add f m x y\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nc : R\nx : M 0\n⊢ AddHom.toFun\n      {\n        toFun := fun x =>\n          { toFun := fun m => ↑f (cons x m),\n            map_add' :=\n              (_ :\n                ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y y' : M (succ i)),\n                  (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                    (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n            map_smul' :=\n              (_ :\n                ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R) (c : M (succ i)),\n                  (fun m => ↑f (cons x m)) (update m i (y • c)) = y • (fun m => ↑f (cons x m)) (update m i c)) },\n        map_add' :=\n          (_ :\n            ∀ (x y : M 0),\n              (fun x =>\n                    { toFun := fun m => ↑f (cons x m),\n                      map_add' :=\n                        (_ :\n                          ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y y' : M (succ i)),\n                            (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                              (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                      map_smul' :=\n                        (_ :\n                          ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R)\n                            (c : M (succ i)),\n                            (fun m => ↑f (cons x m)) (update m i (y • c)) =\n                              y • (fun m => ↑f (cons x m)) (update m i c)) })\n                  (x + y) =\n                (fun x =>\n                      { toFun := fun m => ↑f (cons x m),\n                        map_add' :=\n                          (_ :\n                            ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n)\n                              (y y' : M (succ i)),\n                              (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                                (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                        map_smul' :=\n                          (_ :\n                            ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R)\n                              (c : M (succ i)),\n                              (fun m => ↑f (cons x m)) (update m i (y • c)) =\n                                y • (fun m => ↑f (cons x m)) (update m i c)) })\n                    x +\n                  (fun x =>\n                      { toFun := fun m => ↑f (cons x m),\n                        map_add' :=\n                          (_ :\n                            ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n)\n                              (y y' : M (succ i)),\n                              (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                                (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                        map_smul' :=\n                          (_ :\n                            ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R)\n                              (c : M (succ i)),\n                              (fun m => ↑f (cons x m)) (update m i (y • c)) =\n                                y • (fun m => ↑f (cons x m)) (update m i c)) })\n                    y) }\n      (c • x) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        {\n          toFun := fun x =>\n            { toFun := fun m => ↑f (cons x m),\n              map_add' :=\n                (_ :\n                  ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y y' : M (succ i)),\n                    (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                      (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n              map_smul' :=\n                (_ :\n                  ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R) (c : M (succ i)),\n                    (fun m => ↑f (cons x m)) (update m i (y • c)) = y • (fun m => ↑f (cons x m)) (update m i c)) },\n          map_add' :=\n            (_ :\n              ∀ (x y : M 0),\n                (fun x =>\n                      { toFun := fun m => ↑f (cons x m),\n                        map_add' :=\n                          (_ :\n                            ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n)\n                              (y y' : M (succ i)),\n                              (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                                (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                        map_smul' :=\n                          (_ :\n                            ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R)\n                              (c : M (succ i)),\n                              (fun m => ↑f (cons x m)) (update m i (y • c)) =\n                                y • (fun m => ↑f (cons x m)) (update m i c)) })\n                    (x + y) =\n                  (fun x =>\n                        { toFun := fun m => ↑f (cons x m),\n                          map_add' :=\n                            (_ :\n                              ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n)\n                                (y y' : M (succ i)),\n                                (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                                  (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                          map_smul' :=\n                            (_ :\n                              ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R)\n                                (c : M (succ i)),\n                                (fun m => ↑f (cons x m)) (update m i (y • c)) =\n                                  y • (fun m => ↑f (cons x m)) (update m i c)) })\n                      x +\n                    (fun x =>\n                        { toFun := fun m => ↑f (cons x m),\n                          map_add' :=\n                            (_ :\n                              ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n)\n                                (y y' : M (succ i)),\n                                (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                                  (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                          map_smul' :=\n                            (_ :\n                              ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R)\n                                (c : M (succ i)),\n                                (fun m => ↑f (cons x m)) (update m i (y • c)) =\n                                  y • (fun m => ↑f (cons x m)) (update m i c)) })\n                      y) }\n        x\n[PROOFSTEP]\next m\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nc : R\nx : M 0\nm : (i : Fin n) → M (succ i)\n⊢ ↑(AddHom.toFun\n          {\n            toFun := fun x =>\n              { toFun := fun m => ↑f (cons x m),\n                map_add' :=\n                  (_ :\n                    ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y y' : M (succ i)),\n                      (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                        (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                map_smul' :=\n                  (_ :\n                    ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R) (c : M (succ i)),\n                      (fun m => ↑f (cons x m)) (update m i (y • c)) = y • (fun m => ↑f (cons x m)) (update m i c)) },\n            map_add' :=\n              (_ :\n                ∀ (x y : M 0),\n                  (fun x =>\n                        { toFun := fun m => ↑f (cons x m),\n                          map_add' :=\n                            (_ :\n                              ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n)\n                                (y y' : M (succ i)),\n                                (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                                  (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                          map_smul' :=\n                            (_ :\n                              ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R)\n                                (c : M (succ i)),\n                                (fun m => ↑f (cons x m)) (update m i (y • c)) =\n                                  y • (fun m => ↑f (cons x m)) (update m i c)) })\n                      (x + y) =\n                    (fun x =>\n                          { toFun := fun m => ↑f (cons x m),\n                            map_add' :=\n                              (_ :\n                                ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n)\n                                  (y y' : M (succ i)),\n                                  (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                                    (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                            map_smul' :=\n                              (_ :\n                                ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R)\n                                  (c : M (succ i)),\n                                  (fun m => ↑f (cons x m)) (update m i (y • c)) =\n                                    y • (fun m => ↑f (cons x m)) (update m i c)) })\n                        x +\n                      (fun x =>\n                          { toFun := fun m => ↑f (cons x m),\n                            map_add' :=\n                              (_ :\n                                ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n)\n                                  (y y' : M (succ i)),\n                                  (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                                    (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                            map_smul' :=\n                              (_ :\n                                ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R)\n                                  (c : M (succ i)),\n                                  (fun m => ↑f (cons x m)) (update m i (y • c)) =\n                                    y • (fun m => ↑f (cons x m)) (update m i c)) })\n                        y) }\n          (c • x))\n      m =\n    ↑(↑(RingHom.id R) c •\n          AddHom.toFun\n            {\n              toFun := fun x =>\n                { toFun := fun m => ↑f (cons x m),\n                  map_add' :=\n                    (_ :\n                      ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y y' : M (succ i)),\n                        (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                          (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                  map_smul' :=\n                    (_ :\n                      ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R) (c : M (succ i)),\n                        (fun m => ↑f (cons x m)) (update m i (y • c)) = y • (fun m => ↑f (cons x m)) (update m i c)) },\n              map_add' :=\n                (_ :\n                  ∀ (x y : M 0),\n                    (fun x =>\n                          { toFun := fun m => ↑f (cons x m),\n                            map_add' :=\n                              (_ :\n                                ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n)\n                                  (y y' : M (succ i)),\n                                  (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                                    (fun m => ↑f (cons x m)) (update m i y) + (fun m => ↑f (cons x m)) (update m i y')),\n                            map_smul' :=\n                              (_ :\n                                ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R)\n                                  (c : M (succ i)),\n                                  (fun m => ↑f (cons x m)) (update m i (y • c)) =\n                                    y • (fun m => ↑f (cons x m)) (update m i c)) })\n                        (x + y) =\n                      (fun x =>\n                            { toFun := fun m => ↑f (cons x m),\n                              map_add' :=\n                                (_ :\n                                  ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n)\n                                    (y y' : M (succ i)),\n                                    (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                                      (fun m => ↑f (cons x m)) (update m i y) +\n                                        (fun m => ↑f (cons x m)) (update m i y')),\n                              map_smul' :=\n                                (_ :\n                                  ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R)\n                                    (c : M (succ i)),\n                                    (fun m => ↑f (cons x m)) (update m i (y • c)) =\n                                      y • (fun m => ↑f (cons x m)) (update m i c)) })\n                          x +\n                        (fun x =>\n                            { toFun := fun m => ↑f (cons x m),\n                              map_add' :=\n                                (_ :\n                                  ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n)\n                                    (y y' : M (succ i)),\n                                    (fun m => ↑f (cons x m)) (update m i (y + y')) =\n                                      (fun m => ↑f (cons x m)) (update m i y) +\n                                        (fun m => ↑f (cons x m)) (update m i y')),\n                              map_smul' :=\n                                (_ :\n                                  ∀ (dec : DecidableEq (Fin n)) (m : (i : Fin n) → M (succ i)) (i : Fin n) (y : R)\n                                    (c : M (succ i)),\n                                    (fun m => ↑f (cons x m)) (update m i (y • c)) =\n                                      y • (fun m => ↑f (cons x m)) (update m i c)) })\n                          y) }\n            x)\n      m\n[PROOFSTEP]\nexact cons_smul f m c x\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\n⊢ curryLeft (uncurryLeft f) = f\n[PROOFSTEP]\next m x\n[GOAL]\ncase h.H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : M 0\nx : (i : Fin n) → M (succ i)\n⊢ ↑(↑(curryLeft (uncurryLeft f)) m) x = ↑(↑f m) x\n[PROOFSTEP]\nsimp only [tail_cons, LinearMap.uncurryLeft_apply, MultilinearMap.curryLeft_apply]\n[GOAL]\ncase h.H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : M 0\nx : (i : Fin n) → M (succ i)\n⊢ ↑(↑f (cons m x 0)) x = ↑(↑f m) x\n[PROOFSTEP]\nrw [cons_zero]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\n⊢ LinearMap.uncurryLeft (curryLeft f) = f\n[PROOFSTEP]\next m\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nm : (i : Fin (Nat.succ n)) → M i\n⊢ ↑(LinearMap.uncurryLeft (curryLeft f)) m = ↑f m\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf₁ f₂ : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\n⊢ LinearMap.uncurryLeft (f₁ + f₂) = LinearMap.uncurryLeft f₁ + LinearMap.uncurryLeft f₂\n[PROOFSTEP]\next m\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf₁ f₂ : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\n⊢ ↑(LinearMap.uncurryLeft (f₁ + f₂)) m = ↑(LinearMap.uncurryLeft f₁ + LinearMap.uncurryLeft f₂) m\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nc : R\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\n⊢ AddHom.toFun\n      { toFun := LinearMap.uncurryLeft,\n        map_add' :=\n          (_ :\n            ∀ (f₁ f₂ : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂),\n              LinearMap.uncurryLeft (f₁ + f₂) = LinearMap.uncurryLeft f₁ + LinearMap.uncurryLeft f₂) }\n      (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := LinearMap.uncurryLeft,\n          map_add' :=\n            (_ :\n              ∀ (f₁ f₂ : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂),\n                LinearMap.uncurryLeft (f₁ + f₂) = LinearMap.uncurryLeft f₁ + LinearMap.uncurryLeft f₂) }\n        f\n[PROOFSTEP]\next m\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nc : R\nf : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂\nm : (i : Fin (Nat.succ n)) → M i\n⊢ ↑(AddHom.toFun\n          { toFun := LinearMap.uncurryLeft,\n            map_add' :=\n              (_ :\n                ∀ (f₁ f₂ : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂),\n                  LinearMap.uncurryLeft (f₁ + f₂) = LinearMap.uncurryLeft f₁ + LinearMap.uncurryLeft f₂) }\n          (c • f))\n      m =\n    ↑(↑(RingHom.id R) c •\n          AddHom.toFun\n            { toFun := LinearMap.uncurryLeft,\n              map_add' :=\n                (_ :\n                  ∀ (f₁ f₂ : M 0 →ₗ[R] MultilinearMap R (fun i => M (succ i)) M₂),\n                    LinearMap.uncurryLeft (f₁ + f₂) = LinearMap.uncurryLeft f₁ + LinearMap.uncurryLeft f₂) }\n            f)\n      m\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\ndec : DecidableEq (Fin (Nat.succ n))\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m i (x + y)) =\n    (fun m => ↑(↑f (init m)) (m (last n))) (update m i x) + (fun m => ↑(↑f (init m)) (m (last n))) (update m i y)\n[PROOFSTEP]\nrw [Subsingleton.elim dec (by clear dec; infer_instance)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\ndec : DecidableEq (Fin (Nat.succ n))\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\n⊢ DecidableEq (Fin (Nat.succ n))\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\n⊢ DecidableEq (Fin (Nat.succ n))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\ndec : DecidableEq (Fin (Nat.succ n))\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m i (x + y)) =\n    (fun m => ↑(↑f (init m)) (m (last n))) (update m i x) + (fun m => ↑(↑f (init m)) (m (last n))) (update m i y)\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m i (x + y)) =\n    (fun m => ↑(↑f (init m)) (m (last n))) (update m i x) + (fun m => ↑(↑f (init m)) (m (last n))) (update m i y)\n[PROOFSTEP]\nby_cases h : i.val < n\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\nh : ↑i < n\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m i (x + y)) =\n    (fun m => ↑(↑f (init m)) (m (last n))) (update m i x) + (fun m => ↑(↑f (init m)) (m (last n))) (update m i y)\n[PROOFSTEP]\nhave : last n ≠ i := Ne.symm (ne_of_lt h)\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\nh : ↑i < n\nthis : last n ≠ i\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m i (x + y)) =\n    (fun m => ↑(↑f (init m)) (m (last n))) (update m i x) + (fun m => ↑(↑f (init m)) (m (last n))) (update m i y)\n[PROOFSTEP]\nsimp_rw [update_noteq this]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\nh : ↑i < n\nthis : last n ≠ i\n⊢ ↑(↑f (init (update m i (x + y)))) (m (last n)) =\n    ↑(↑f (init (update m i x))) (m (last n)) + ↑(↑f (init (update m i y))) (m (last n))\n[PROOFSTEP]\nrevert x y\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nh : ↑i < n\nthis : last n ≠ i\n⊢ ∀ (x y : M i),\n    ↑(↑f (init (update m i (x + y)))) (m (last n)) =\n      ↑(↑f (init (update m i x))) (m (last n)) + ↑(↑f (init (update m i y))) (m (last n))\n[PROOFSTEP]\nrw [(castSucc_castLT i h).symm]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nh : ↑i < n\nthis : last n ≠ i\n⊢ ∀ (x y : M (castSucc (castLT i h))),\n    ↑(↑f (init (update m (castSucc (castLT i h)) (x + y)))) (m (last n)) =\n      ↑(↑f (init (update m (castSucc (castLT i h)) x))) (m (last n)) +\n        ↑(↑f (init (update m (castSucc (castLT i h)) y))) (m (last n))\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nh : ↑i < n\nthis : last n ≠ i\nx y : M (castSucc (castLT i h))\n⊢ ↑(↑f (init (update m (castSucc (castLT i h)) (x + y)))) (m (last n)) =\n    ↑(↑f (init (update m (castSucc (castLT i h)) x))) (m (last n)) +\n      ↑(↑f (init (update m (castSucc (castLT i h)) y))) (m (last n))\n[PROOFSTEP]\nrw [init_update_castSucc, MultilinearMap.map_add, init_update_castSucc, init_update_castSucc, LinearMap.add_apply]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nx y : M i\nh : ¬↑i < n\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m i (x + y)) =\n    (fun m => ↑(↑f (init m)) (m (last n))) (update m i x) + (fun m => ↑(↑f (init m)) (m (last n))) (update m i y)\n[PROOFSTEP]\nrevert x y\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nh : ¬↑i < n\n⊢ ∀ (x y : M i),\n    (fun m => ↑(↑f (init m)) (m (last n))) (update m i (x + y)) =\n      (fun m => ↑(↑f (init m)) (m (last n))) (update m i x) + (fun m => ↑(↑f (init m)) (m (last n))) (update m i y)\n[PROOFSTEP]\nrw [eq_last_of_not_lt h]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nh : ¬↑i < n\n⊢ ∀ (x y : M (last n)),\n    (fun m => ↑(↑f (init m)) (m (last n))) (update m (last n) (x + y)) =\n      (fun m => ↑(↑f (init m)) (m (last n))) (update m (last n) x) +\n        (fun m => ↑(↑f (init m)) (m (last n))) (update m (last n) y)\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nh : ¬↑i < n\nx y : M (last n)\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m (last n) (x + y)) =\n    (fun m => ↑(↑f (init m)) (m (last n))) (update m (last n) x) +\n      (fun m => ↑(↑f (init m)) (m (last n))) (update m (last n) y)\n[PROOFSTEP]\nsimp_rw [init_update_last, update_same, LinearMap.map_add]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\ndec : DecidableEq (Fin (Nat.succ n))\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m i (c • x)) =\n    c • (fun m => ↑(↑f (init m)) (m (last n))) (update m i x)\n[PROOFSTEP]\nrw [Subsingleton.elim dec (by clear dec; infer_instance)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\ndec : DecidableEq (Fin (Nat.succ n))\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\n⊢ DecidableEq (Fin (Nat.succ n))\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\n⊢ DecidableEq (Fin (Nat.succ n))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\ndec : DecidableEq (Fin (Nat.succ n))\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m i (c • x)) =\n    c • (fun m => ↑(↑f (init m)) (m (last n))) (update m i x)\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m i (c • x)) =\n    c • (fun m => ↑(↑f (init m)) (m (last n))) (update m i x)\n[PROOFSTEP]\nby_cases h : i.val < n\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\nh : ↑i < n\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m i (c • x)) =\n    c • (fun m => ↑(↑f (init m)) (m (last n))) (update m i x)\n[PROOFSTEP]\nhave : last n ≠ i := Ne.symm (ne_of_lt h)\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\nh : ↑i < n\nthis : last n ≠ i\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m i (c • x)) =\n    c • (fun m => ↑(↑f (init m)) (m (last n))) (update m i x)\n[PROOFSTEP]\nsimp_rw [update_noteq this]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\nh : ↑i < n\nthis : last n ≠ i\n⊢ ↑(↑f (init (update m i (c • x)))) (m (last n)) = c • ↑(↑f (init (update m i x))) (m (last n))\n[PROOFSTEP]\nrevert x\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nh : ↑i < n\nthis : last n ≠ i\n⊢ ∀ (x : M i), ↑(↑f (init (update m i (c • x)))) (m (last n)) = c • ↑(↑f (init (update m i x))) (m (last n))\n[PROOFSTEP]\nrw [(castSucc_castLT i h).symm]\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nh : ↑i < n\nthis : last n ≠ i\n⊢ ∀ (x : M (castSucc (castLT i h))),\n    ↑(↑f (init (update m (castSucc (castLT i h)) (c • x)))) (m (last n)) =\n      c • ↑(↑f (init (update m (castSucc (castLT i h)) x))) (m (last n))\n[PROOFSTEP]\nintro x\n[GOAL]\ncase pos\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nh : ↑i < n\nthis : last n ≠ i\nx : M (castSucc (castLT i h))\n⊢ ↑(↑f (init (update m (castSucc (castLT i h)) (c • x)))) (m (last n)) =\n    c • ↑(↑f (init (update m (castSucc (castLT i h)) x))) (m (last n))\n[PROOFSTEP]\nrw [init_update_castSucc, init_update_castSucc, MultilinearMap.map_smul, LinearMap.smul_apply]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nx : M i\nh : ¬↑i < n\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m i (c • x)) =\n    c • (fun m => ↑(↑f (init m)) (m (last n))) (update m i x)\n[PROOFSTEP]\nrevert x\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nh : ¬↑i < n\n⊢ ∀ (x : M i),\n    (fun m => ↑(↑f (init m)) (m (last n))) (update m i (c • x)) =\n      c • (fun m => ↑(↑f (init m)) (m (last n))) (update m i x)\n[PROOFSTEP]\nrw [eq_last_of_not_lt h]\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nh : ¬↑i < n\n⊢ ∀ (x : M (last n)),\n    (fun m => ↑(↑f (init m)) (m (last n))) (update m (last n) (c • x)) =\n      c • (fun m => ↑(↑f (init m)) (m (last n))) (update m (last n) x)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase neg\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\ni : Fin (Nat.succ n)\nc : R\nh : ¬↑i < n\nx : M (last n)\n⊢ (fun m => ↑(↑f (init m)) (m (last n))) (update m (last n) (c • x)) =\n    c • (fun m => ↑(↑f (init m)) (m (last n))) (update m (last n) x)\n[PROOFSTEP]\nsimp_rw [update_same, init_update_last, map_smul]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (castSucc i)\nx y : M (last n)\n⊢ (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y\n[PROOFSTEP]\nsimp_rw [f.snoc_add]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (castSucc i)\nc : R\nx : M (last n)\n⊢ AddHom.toFun\n      { toFun := fun x => ↑f (snoc m x),\n        map_add' :=\n          (_ :\n            ∀ (x y : M (last n)),\n              (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) }\n      (c • x) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := fun x => ↑f (snoc m x),\n          map_add' :=\n            (_ :\n              ∀ (x y : M (last n)),\n                (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) }\n        x\n[PROOFSTEP]\nsimp only [f.snoc_smul, RingHom.id_apply]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\ndec : DecidableEq (Fin n)\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nx y : M (castSucc i)\n⊢ (fun m =>\n        {\n          toAddHom :=\n            { toFun := fun x => ↑f (snoc m x),\n              map_add' :=\n                (_ :\n                  ∀ (x y : M (last n)),\n                    (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n          map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n      (update m i (x + y)) =\n    (fun m =>\n          {\n            toAddHom :=\n              { toFun := fun x => ↑f (snoc m x),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : M (last n)),\n                      (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n            map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n        (update m i x) +\n      (fun m =>\n          {\n            toAddHom :=\n              { toFun := fun x => ↑f (snoc m x),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : M (last n)),\n                      (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n            map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n        (update m i y)\n[PROOFSTEP]\nrw [Subsingleton.elim dec (by clear dec; infer_instance)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\ndec : DecidableEq (Fin n)\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nx y : M (castSucc i)\n⊢ DecidableEq (Fin n)\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nx y : M (castSucc i)\n⊢ DecidableEq (Fin n)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\ndec : DecidableEq (Fin n)\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nx y : M (castSucc i)\n⊢ (fun m =>\n        {\n          toAddHom :=\n            { toFun := fun x => ↑f (snoc m x),\n              map_add' :=\n                (_ :\n                  ∀ (x y : M (last n)),\n                    (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n          map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n      (update m i (x + y)) =\n    (fun m =>\n          {\n            toAddHom :=\n              { toFun := fun x => ↑f (snoc m x),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : M (last n)),\n                      (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n            map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n        (update m i x) +\n      (fun m =>\n          {\n            toAddHom :=\n              { toFun := fun x => ↑f (snoc m x),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : M (last n)),\n                      (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n            map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n        (update m i y)\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nx y : M (castSucc i)\n⊢ (fun m =>\n        {\n          toAddHom :=\n            { toFun := fun x => ↑f (snoc m x),\n              map_add' :=\n                (_ :\n                  ∀ (x y : M (last n)),\n                    (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n          map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n      (update m i (x + y)) =\n    (fun m =>\n          {\n            toAddHom :=\n              { toFun := fun x => ↑f (snoc m x),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : M (last n)),\n                      (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n            map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n        (update m i x) +\n      (fun m =>\n          {\n            toAddHom :=\n              { toFun := fun x => ↑f (snoc m x),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : M (last n)),\n                      (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n            map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n        (update m i y)\n[PROOFSTEP]\next z\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nx y : M (castSucc i)\nz : M (last n)\n⊢ ↑((fun m =>\n            {\n              toAddHom :=\n                { toFun := fun x => ↑f (snoc m x),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : M (last n)),\n                        (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n              map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n          (update m i (x + y)))\n      z =\n    ↑((fun m =>\n              {\n                toAddHom :=\n                  { toFun := fun x => ↑f (snoc m x),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : M (last n)),\n                          (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n                map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n            (update m i x) +\n          (fun m =>\n              {\n                toAddHom :=\n                  { toFun := fun x => ↑f (snoc m x),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : M (last n)),\n                          (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n                map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n            (update m i y))\n      z\n[PROOFSTEP]\nchange f (snoc (update m i (x + y)) z) = f (snoc (update m i x) z) + f (snoc (update m i y) z)\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nx y : M (castSucc i)\nz : M (last n)\n⊢ ↑f (snoc (update m i (x + y)) z) = ↑f (snoc (update m i x) z) + ↑f (snoc (update m i y) z)\n[PROOFSTEP]\nrw [snoc_update, snoc_update, snoc_update, f.map_add]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\ndec : DecidableEq (Fin n)\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nc : R\nx : M (castSucc i)\n⊢ (fun m =>\n        {\n          toAddHom :=\n            { toFun := fun x => ↑f (snoc m x),\n              map_add' :=\n                (_ :\n                  ∀ (x y : M (last n)),\n                    (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n          map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n      (update m i (c • x)) =\n    c •\n      (fun m =>\n          {\n            toAddHom :=\n              { toFun := fun x => ↑f (snoc m x),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : M (last n)),\n                      (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n            map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n        (update m i x)\n[PROOFSTEP]\nrw [Subsingleton.elim dec (by clear dec; infer_instance)]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\ndec : DecidableEq (Fin n)\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nc : R\nx : M (castSucc i)\n⊢ DecidableEq (Fin n)\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nc : R\nx : M (castSucc i)\n⊢ DecidableEq (Fin n)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\ndec : DecidableEq (Fin n)\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nc : R\nx : M (castSucc i)\n⊢ (fun m =>\n        {\n          toAddHom :=\n            { toFun := fun x => ↑f (snoc m x),\n              map_add' :=\n                (_ :\n                  ∀ (x y : M (last n)),\n                    (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n          map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n      (update m i (c • x)) =\n    c •\n      (fun m =>\n          {\n            toAddHom :=\n              { toFun := fun x => ↑f (snoc m x),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : M (last n)),\n                      (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n            map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n        (update m i x)\n[PROOFSTEP]\nclear dec\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nc : R\nx : M (castSucc i)\n⊢ (fun m =>\n        {\n          toAddHom :=\n            { toFun := fun x => ↑f (snoc m x),\n              map_add' :=\n                (_ :\n                  ∀ (x y : M (last n)),\n                    (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n          map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n      (update m i (c • x)) =\n    c •\n      (fun m =>\n          {\n            toAddHom :=\n              { toFun := fun x => ↑f (snoc m x),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : M (last n)),\n                      (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n            map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n        (update m i x)\n[PROOFSTEP]\next z\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nc : R\nx : M (castSucc i)\nz : M (last n)\n⊢ ↑((fun m =>\n            {\n              toAddHom :=\n                { toFun := fun x => ↑f (snoc m x),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : M (last n)),\n                        (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n              map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n          (update m i (c • x)))\n      z =\n    ↑(c •\n          (fun m =>\n              {\n                toAddHom :=\n                  { toFun := fun x => ↑f (snoc m x),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : M (last n)),\n                          (fun x => ↑f (snoc m x)) (x + y) = (fun x => ↑f (snoc m x)) x + (fun x => ↑f (snoc m x)) y) },\n                map_smul' := (_ : ∀ (c : R) (x : M (last n)), ↑f (snoc m (c • x)) = c • ↑f (snoc m x)) })\n            (update m i x))\n      z\n[PROOFSTEP]\nchange f (snoc (update m i (c • x)) z) = c • f (snoc (update m i x) z)\n[GOAL]\ncase h\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nm : (i : Fin n) → M (castSucc i)\ni : Fin n\nc : R\nx : M (castSucc i)\nz : M (last n)\n⊢ ↑f (snoc (update m i (c • x)) z) = c • ↑f (snoc (update m i x) z)\n[PROOFSTEP]\nrw [snoc_update, snoc_update, f.map_smul]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\n⊢ curryRight (uncurryRight f) = f\n[PROOFSTEP]\next m x\n[GOAL]\ncase H.h\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin n) → M (castSucc i)\nx : M (last n)\n⊢ ↑(↑(curryRight (uncurryRight f)) m) x = ↑(↑f m) x\n[PROOFSTEP]\nsimp only [snoc_last, MultilinearMap.curryRight_apply, MultilinearMap.uncurryRight_apply]\n[GOAL]\ncase H.h\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin n) → M (castSucc i)\nx : M (last n)\n⊢ ↑(↑f (init (snoc m x))) x = ↑(↑f m) x\n[PROOFSTEP]\nrw [init_snoc]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\n⊢ uncurryRight (curryRight f) = f\n[PROOFSTEP]\next m\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf : MultilinearMap R M M₂\nm : (i : Fin (Nat.succ n)) → M i\n⊢ ↑(uncurryRight (curryRight f)) m = ↑f m\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf₁ f₂ : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\n⊢ uncurryRight (f₁ + f₂) = uncurryRight f₁ + uncurryRight f₂\n[PROOFSTEP]\next m\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nf₁ f₂ : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\n⊢ ↑(uncurryRight (f₁ + f₂)) m = ↑(uncurryRight f₁ + uncurryRight f₂) m\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nc : R\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\n⊢ AddHom.toFun\n      { toFun := uncurryRight,\n        map_add' :=\n          (_ :\n            ∀ (f₁ f₂ : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)),\n              uncurryRight (f₁ + f₂) = uncurryRight f₁ + uncurryRight f₂) }\n      (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := uncurryRight,\n          map_add' :=\n            (_ :\n              ∀ (f₁ f₂ : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)),\n                uncurryRight (f₁ + f₂) = uncurryRight f₁ + uncurryRight f₂) }\n        f\n[PROOFSTEP]\next m\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nc : R\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\n⊢ ↑(AddHom.toFun\n          { toFun := uncurryRight,\n            map_add' :=\n              (_ :\n                ∀ (f₁ f₂ : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)),\n                  uncurryRight (f₁ + f₂) = uncurryRight f₁ + uncurryRight f₂) }\n          (c • f))\n      m =\n    ↑(↑(RingHom.id R) c •\n          AddHom.toFun\n            { toFun := uncurryRight,\n              map_add' :=\n                (_ :\n                  ∀ (f₁ f₂ : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)),\n                    uncurryRight (f₁ + f₂) = uncurryRight f₁ + uncurryRight f₂) }\n            f)\n      m\n[PROOFSTEP]\nrw [smul_apply]\n[GOAL]\ncase H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nc : R\nf : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)\nm : (i : Fin (Nat.succ n)) → M i\n⊢ ↑(AddHom.toFun\n          { toFun := uncurryRight,\n            map_add' :=\n              (_ :\n                ∀ (f₁ f₂ : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)),\n                  uncurryRight (f₁ + f₂) = uncurryRight f₁ + uncurryRight f₂) }\n          (c • f))\n      m =\n    ↑(RingHom.id R) c •\n      ↑(AddHom.toFun\n            { toFun := uncurryRight,\n              map_add' :=\n                (_ :\n                  ∀ (f₁ f₂ : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)),\n                    uncurryRight (f₁ + f₂) = uncurryRight f₁ + uncurryRight f₂) }\n            f)\n        m\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') M₂\nu : ι → M'\ninst✝ : DecidableEq ι'\nv : ι' → M'\ni : ι'\nx y : M'\n⊢ (fun v => ↑f (Sum.elim u v)) (update v i (x + y)) =\n    (fun v => ↑f (Sum.elim u v)) (update v i x) + (fun v => ↑f (Sum.elim u v)) (update v i y)\n[PROOFSTEP]\nletI := Classical.decEq ι\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') M₂\nu : ι → M'\ninst✝ : DecidableEq ι'\nv : ι' → M'\ni : ι'\nx y : M'\nthis : DecidableEq ι := Classical.decEq ι\n⊢ (fun v => ↑f (Sum.elim u v)) (update v i (x + y)) =\n    (fun v => ↑f (Sum.elim u v)) (update v i x) + (fun v => ↑f (Sum.elim u v)) (update v i y)\n[PROOFSTEP]\nsimp only [← Sum.update_elim_inr, f.map_add]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') M₂\nu : ι → M'\ninst✝ : DecidableEq ι'\nv : ι' → M'\ni : ι'\nc : R\nx : M'\n⊢ (fun v => ↑f (Sum.elim u v)) (update v i (c • x)) = c • (fun v => ↑f (Sum.elim u v)) (update v i x)\n[PROOFSTEP]\nletI := Classical.decEq ι\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') M₂\nu : ι → M'\ninst✝ : DecidableEq ι'\nv : ι' → M'\ni : ι'\nc : R\nx : M'\nthis : DecidableEq ι := Classical.decEq ι\n⊢ (fun v => ↑f (Sum.elim u v)) (update v i (c • x)) = c • (fun v => ↑f (Sum.elim u v)) (update v i x)\n[PROOFSTEP]\nsimp only [← Sum.update_elim_inr, f.map_smul]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') M₂\ninst✝ : DecidableEq ι\nu : ι → M'\ni : ι\nx y : M'\nv : ι' → M'\n⊢ ↑((fun u =>\n            { toFun := fun v => ↑f (Sum.elim u v),\n              map_add' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),\n                    ↑f (Sum.elim u (update v i (x + y))) =\n                      ↑f (Sum.elim u (update v i x)) + ↑f (Sum.elim u (update v i y))),\n              map_smul' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),\n                    ↑f (Sum.elim u (update v i (c • x))) = c • ↑f (Sum.elim u (update v i x))) })\n          (update u i (x + y)))\n      v =\n    ↑((fun u =>\n              { toFun := fun v => ↑f (Sum.elim u v),\n                map_add' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),\n                      ↑f (Sum.elim u (update v i (x + y))) =\n                        ↑f (Sum.elim u (update v i x)) + ↑f (Sum.elim u (update v i y))),\n                map_smul' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),\n                      ↑f (Sum.elim u (update v i (c • x))) = c • ↑f (Sum.elim u (update v i x))) })\n            (update u i x) +\n          (fun u =>\n              { toFun := fun v => ↑f (Sum.elim u v),\n                map_add' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),\n                      ↑f (Sum.elim u (update v i (x + y))) =\n                        ↑f (Sum.elim u (update v i x)) + ↑f (Sum.elim u (update v i y))),\n                map_smul' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),\n                      ↑f (Sum.elim u (update v i (c • x))) = c • ↑f (Sum.elim u (update v i x))) })\n            (update u i y))\n      v\n[PROOFSTEP]\nletI := Classical.decEq ι'\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') M₂\ninst✝ : DecidableEq ι\nu : ι → M'\ni : ι\nx y : M'\nv : ι' → M'\nthis : DecidableEq ι' := Classical.decEq ι'\n⊢ ↑((fun u =>\n            { toFun := fun v => ↑f (Sum.elim u v),\n              map_add' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),\n                    ↑f (Sum.elim u (update v i (x + y))) =\n                      ↑f (Sum.elim u (update v i x)) + ↑f (Sum.elim u (update v i y))),\n              map_smul' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),\n                    ↑f (Sum.elim u (update v i (c • x))) = c • ↑f (Sum.elim u (update v i x))) })\n          (update u i (x + y)))\n      v =\n    ↑((fun u =>\n              { toFun := fun v => ↑f (Sum.elim u v),\n                map_add' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),\n                      ↑f (Sum.elim u (update v i (x + y))) =\n                        ↑f (Sum.elim u (update v i x)) + ↑f (Sum.elim u (update v i y))),\n                map_smul' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),\n                      ↑f (Sum.elim u (update v i (c • x))) = c • ↑f (Sum.elim u (update v i x))) })\n            (update u i x) +\n          (fun u =>\n              { toFun := fun v => ↑f (Sum.elim u v),\n                map_add' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),\n                      ↑f (Sum.elim u (update v i (x + y))) =\n                        ↑f (Sum.elim u (update v i x)) + ↑f (Sum.elim u (update v i y))),\n                map_smul' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),\n                      ↑f (Sum.elim u (update v i (c • x))) = c • ↑f (Sum.elim u (update v i x))) })\n            (update u i y))\n      v\n[PROOFSTEP]\nsimp only [MultilinearMap.coe_mk, add_apply, ← Sum.update_elim_inl, f.map_add]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') M₂\ninst✝ : DecidableEq ι\nu : ι → M'\ni : ι\nc : R\nx : M'\nv : ι' → M'\n⊢ ↑((fun u =>\n            { toFun := fun v => ↑f (Sum.elim u v),\n              map_add' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),\n                    ↑f (Sum.elim u (update v i (x + y))) =\n                      ↑f (Sum.elim u (update v i x)) + ↑f (Sum.elim u (update v i y))),\n              map_smul' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),\n                    ↑f (Sum.elim u (update v i (c • x))) = c • ↑f (Sum.elim u (update v i x))) })\n          (update u i (c • x)))\n      v =\n    ↑(c •\n          (fun u =>\n              { toFun := fun v => ↑f (Sum.elim u v),\n                map_add' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),\n                      ↑f (Sum.elim u (update v i (x + y))) =\n                        ↑f (Sum.elim u (update v i x)) + ↑f (Sum.elim u (update v i y))),\n                map_smul' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),\n                      ↑f (Sum.elim u (update v i (c • x))) = c • ↑f (Sum.elim u (update v i x))) })\n            (update u i x))\n      v\n[PROOFSTEP]\nletI := Classical.decEq ι'\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') M₂\ninst✝ : DecidableEq ι\nu : ι → M'\ni : ι\nc : R\nx : M'\nv : ι' → M'\nthis : DecidableEq ι' := Classical.decEq ι'\n⊢ ↑((fun u =>\n            { toFun := fun v => ↑f (Sum.elim u v),\n              map_add' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),\n                    ↑f (Sum.elim u (update v i (x + y))) =\n                      ↑f (Sum.elim u (update v i x)) + ↑f (Sum.elim u (update v i y))),\n              map_smul' :=\n                (_ :\n                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),\n                    ↑f (Sum.elim u (update v i (c • x))) = c • ↑f (Sum.elim u (update v i x))) })\n          (update u i (c • x)))\n      v =\n    ↑(c •\n          (fun u =>\n              { toFun := fun v => ↑f (Sum.elim u v),\n                map_add' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),\n                      ↑f (Sum.elim u (update v i (x + y))) =\n                        ↑f (Sum.elim u (update v i x)) + ↑f (Sum.elim u (update v i y))),\n                map_smul' :=\n                  (_ :\n                    ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),\n                      ↑f (Sum.elim u (update v i (c • x))) = c • ↑f (Sum.elim u (update v i x))) })\n            (update u i x))\n      v\n[PROOFSTEP]\nsimp only [MultilinearMap.coe_mk, smul_apply, ← Sum.update_elim_inl, f.map_smul]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\ninst✝ : DecidableEq (ι ⊕ ι')\nu : ι ⊕ ι' → M'\ni : ι ⊕ ι'\nx y : M'\n⊢ (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i (x + y)) =\n    (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i x) +\n      (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i y)\n[PROOFSTEP]\nletI := (@Sum.inl_injective ι ι').decidableEq\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\ninst✝ : DecidableEq (ι ⊕ ι')\nu : ι ⊕ ι' → M'\ni : ι ⊕ ι'\nx y : M'\nthis : DecidableEq ι := Injective.decidableEq (_ : Injective Sum.inl)\n⊢ (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i (x + y)) =\n    (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i x) +\n      (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i y)\n[PROOFSTEP]\nletI := (@Sum.inr_injective ι ι').decidableEq\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\ninst✝ : DecidableEq (ι ⊕ ι')\nu : ι ⊕ ι' → M'\ni : ι ⊕ ι'\nx y : M'\nthis✝ : DecidableEq ι := Injective.decidableEq (_ : Injective Sum.inl)\nthis : DecidableEq ι' := Injective.decidableEq (_ : Injective Sum.inr)\n⊢ (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i (x + y)) =\n    (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i x) +\n      (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i y)\n[PROOFSTEP]\ncases i\n[GOAL]\ncase inl\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\ninst✝ : DecidableEq (ι ⊕ ι')\nu : ι ⊕ ι' → M'\nx y : M'\nthis✝ : DecidableEq ι := Injective.decidableEq (_ : Injective Sum.inl)\nthis : DecidableEq ι' := Injective.decidableEq (_ : Injective Sum.inr)\nval✝ : ι\n⊢ (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inl val✝) (x + y)) =\n    (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inl val✝) x) +\n      (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inl val✝) y)\n[PROOFSTEP]\nsimp only [MultilinearMap.map_add, add_apply, Sum.update_inl_comp_inl, Sum.update_inl_comp_inr, Sum.update_inr_comp_inl,\n  Sum.update_inr_comp_inr]\n[GOAL]\ncase inr\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\ninst✝ : DecidableEq (ι ⊕ ι')\nu : ι ⊕ ι' → M'\nx y : M'\nthis✝ : DecidableEq ι := Injective.decidableEq (_ : Injective Sum.inl)\nthis : DecidableEq ι' := Injective.decidableEq (_ : Injective Sum.inr)\nval✝ : ι'\n⊢ (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inr val✝) (x + y)) =\n    (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inr val✝) x) +\n      (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inr val✝) y)\n[PROOFSTEP]\nsimp only [MultilinearMap.map_add, add_apply, Sum.update_inl_comp_inl, Sum.update_inl_comp_inr, Sum.update_inr_comp_inl,\n  Sum.update_inr_comp_inr]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\ninst✝ : DecidableEq (ι ⊕ ι')\nu : ι ⊕ ι' → M'\ni : ι ⊕ ι'\nc : R\nx : M'\n⊢ (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i (c • x)) =\n    c • (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i x)\n[PROOFSTEP]\nletI := (@Sum.inl_injective ι ι').decidableEq\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\ninst✝ : DecidableEq (ι ⊕ ι')\nu : ι ⊕ ι' → M'\ni : ι ⊕ ι'\nc : R\nx : M'\nthis : DecidableEq ι := Injective.decidableEq (_ : Injective Sum.inl)\n⊢ (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i (c • x)) =\n    c • (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i x)\n[PROOFSTEP]\nletI := (@Sum.inr_injective ι ι').decidableEq\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\ninst✝ : DecidableEq (ι ⊕ ι')\nu : ι ⊕ ι' → M'\ni : ι ⊕ ι'\nc : R\nx : M'\nthis✝ : DecidableEq ι := Injective.decidableEq (_ : Injective Sum.inl)\nthis : DecidableEq ι' := Injective.decidableEq (_ : Injective Sum.inr)\n⊢ (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i (c • x)) =\n    c • (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i x)\n[PROOFSTEP]\ncases i\n[GOAL]\ncase inl\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\ninst✝ : DecidableEq (ι ⊕ ι')\nu : ι ⊕ ι' → M'\nc : R\nx : M'\nthis✝ : DecidableEq ι := Injective.decidableEq (_ : Injective Sum.inl)\nthis : DecidableEq ι' := Injective.decidableEq (_ : Injective Sum.inr)\nval✝ : ι\n⊢ (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inl val✝) (c • x)) =\n    c • (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inl val✝) x)\n[PROOFSTEP]\nsimp only [MultilinearMap.map_smul, smul_apply, Sum.update_inl_comp_inl, Sum.update_inl_comp_inr,\n  Sum.update_inr_comp_inl, Sum.update_inr_comp_inr]\n[GOAL]\ncase inr\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : CommSemiring R\ninst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\ninst✝ : DecidableEq (ι ⊕ ι')\nu : ι ⊕ ι' → M'\nc : R\nx : M'\nthis✝ : DecidableEq ι := Injective.decidableEq (_ : Injective Sum.inl)\nthis : DecidableEq ι' := Injective.decidableEq (_ : Injective Sum.inr)\nval✝ : ι'\n⊢ (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inr val✝) (c • x)) =\n    c • (fun u => ↑(↑f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inr val✝) x)\n[PROOFSTEP]\nsimp only [MultilinearMap.map_smul, smul_apply, Sum.update_inl_comp_inl, Sum.update_inl_comp_inr,\n  Sum.update_inr_comp_inl, Sum.update_inr_comp_inr]\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nf g : MultilinearMap R (fun x => M') M₂\n⊢ currySum (f + g) = currySum f + currySum g\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nf g : MultilinearMap R (fun x => M') M₂\nx✝¹ : ι → M'\nx✝ : ι' → M'\n⊢ ↑(↑(currySum (f + g)) x✝¹) x✝ = ↑(↑(currySum f + currySum g) x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nc : R\nf : MultilinearMap R (fun x => M') M₂\n⊢ AddHom.toFun\n      { toFun := currySum,\n        map_add' := (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }\n      (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := currySum,\n          map_add' := (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }\n        f\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nc : R\nf : MultilinearMap R (fun x => M') M₂\nx✝¹ : ι → M'\nx✝ : ι' → M'\n⊢ ↑(↑(AddHom.toFun\n              { toFun := currySum,\n                map_add' :=\n                  (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }\n              (c • f))\n          x✝¹)\n      x✝ =\n    ↑(↑(↑(RingHom.id R) c •\n              AddHom.toFun\n                { toFun := currySum,\n                  map_add' :=\n                    (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }\n                f)\n          x✝¹)\n      x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') M₂\nu : ι ⊕ ι' → M'\n⊢ ↑(uncurrySum\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := currySum,\n                    map_add' :=\n                      (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) },\n                map_smul' :=\n                  (_ :\n                    ∀ (c : R) (f : MultilinearMap R (fun x => M') M₂),\n                      AddHom.toFun\n                          { toFun := currySum,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : MultilinearMap R (fun x => M') M₂),\n                                  currySum (f + g) = currySum f + currySum g) }\n                          (c • f) =\n                        ↑(RingHom.id R) c •\n                          AddHom.toFun\n                            { toFun := currySum,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : MultilinearMap R (fun x => M') M₂),\n                                    currySum (f + g) = currySum f + currySum g) }\n                            f) }.toAddHom\n            f))\n      u =\n    ↑f u\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := currySum,\n              map_add' :=\n                (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) },\n          map_smul' :=\n            (_ :\n              ∀ (c : R) (f : MultilinearMap R (fun x => M') M₂),\n                AddHom.toFun\n                    { toFun := currySum,\n                      map_add' :=\n                        (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }\n                    (c • f) =\n                  ↑(RingHom.id R) c •\n                    AddHom.toFun\n                      { toFun := currySum,\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }\n                      f) }.toAddHom\n      (uncurrySum f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\nx✝¹ : ι → M'\nx✝ : ι' → M'\n⊢ ↑(↑(AddHom.toFun\n              {\n                  toAddHom :=\n                    { toFun := currySum,\n                      map_add' :=\n                        (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (c : R) (f : MultilinearMap R (fun x => M') M₂),\n                        AddHom.toFun\n                            { toFun := currySum,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : MultilinearMap R (fun x => M') M₂),\n                                    currySum (f + g) = currySum f + currySum g) }\n                            (c • f) =\n                          ↑(RingHom.id R) c •\n                            AddHom.toFun\n                              { toFun := currySum,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (f g : MultilinearMap R (fun x => M') M₂),\n                                      currySum (f + g) = currySum f + currySum g) }\n                              f) }.toAddHom\n              (uncurrySum f))\n          x✝¹)\n      x✝ =\n    ↑(↑f x✝¹) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\nx y : M'\n⊢ ↑(↑(LinearEquiv.symm (curryFinFinset R M₂ M' hk hl)) f) (Finset.piecewise s (fun x_1 => x) fun x => y) =\n    ↑(↑f fun x_1 => x) fun x => y\n[PROOFSTEP]\nrw [curryFinFinset_symm_apply]\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\nx y : M'\n⊢ (↑(↑f fun i => Finset.piecewise s (fun x_1 => x) (fun x => y) (↑(finSumEquivOfFinset hk hl) (Sum.inl i))) fun i =>\n      Finset.piecewise s (fun x_1 => x) (fun x => y) (↑(finSumEquivOfFinset hk hl) (Sum.inr i))) =\n    ↑(↑f fun x_1 => x) fun x => y\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_5.h.h.e_6.h\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\nx y : M'\n⊢ (fun i => Finset.piecewise s (fun x_1 => x) (fun x => y) (↑(finSumEquivOfFinset hk hl) (Sum.inl i))) = fun x_1 => x\n[PROOFSTEP]\next\n[GOAL]\ncase h.e_5.h.h.e_6.h.h\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\nx y : M'\nx✝ : Fin k\n⊢ Finset.piecewise s (fun x_1 => x) (fun x => y) (↑(finSumEquivOfFinset hk hl) (Sum.inl x✝)) = x\n[PROOFSTEP]\nrw [finSumEquivOfFinset_inl, Finset.piecewise_eq_of_mem]\n[GOAL]\ncase h.e_5.h.h.e_6.h.h.hi\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\nx y : M'\nx✝ : Fin k\n⊢ ↑(Finset.orderEmbOfFin s hk) x✝ ∈ s\n[PROOFSTEP]\napply Finset.orderEmbOfFin_mem\n[GOAL]\ncase h.e_6.h\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\nx y : M'\n⊢ (fun i => Finset.piecewise s (fun x_1 => x) (fun x => y) (↑(finSumEquivOfFinset hk hl) (Sum.inr i))) = fun x => y\n[PROOFSTEP]\next\n[GOAL]\ncase h.e_6.h.h\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\nx y : M'\nx✝ : Fin l\n⊢ Finset.piecewise s (fun x_1 => x) (fun x => y) (↑(finSumEquivOfFinset hk hl) (Sum.inr x✝)) = y\n[PROOFSTEP]\nrw [finSumEquivOfFinset_inr, Finset.piecewise_eq_of_not_mem]\n[GOAL]\ncase h.e_6.h.h.hi\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\nx y : M'\nx✝ : Fin l\n⊢ ¬↑(Finset.orderEmbOfFin sᶜ hl) x✝ ∈ s\n[PROOFSTEP]\nexact Finset.mem_compl.1 (Finset.orderEmbOfFin_mem _ _ _)\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\nx y : M'\n⊢ (↑(↑f fun x_1 => x) fun i =>\n      Finset.piecewise s (fun x_1 => x) (fun x => y) (↑(finSumEquivOfFinset hk hl) (Sum.inr i))) =\n    ↑(↑f fun x_1 => x) fun x => y\n[PROOFSTEP]\nhave := curryFinFinset_symm_apply_piecewise_const hk hl f x y\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\nx y : M'\nthis :\n  ↑(↑(LinearEquiv.symm (curryFinFinset R M₂ M' hk hl)) f) (Finset.piecewise s (fun x_1 => x) fun x => y) =\n    ↑(↑f fun x_1 => x) fun x => y\n⊢ (↑(↑f fun x_1 => x) fun i =>\n      Finset.piecewise s (fun x_1 => x) (fun x => y) (↑(finSumEquivOfFinset hk hl) (Sum.inr i))) =\n    ↑(↑f fun x_1 => x) fun x => y\n[PROOFSTEP]\nsimp only [curryFinFinset_symm_apply, finSumEquivOfFinset_inl, Finset.orderEmbOfFin_mem, Finset.piecewise_eq_of_mem,\n  finSumEquivOfFinset_inr] at this \n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)\nx y : M'\nthis :\n  (↑(↑f fun i => x) fun i =>\n      Finset.piecewise s (fun x_1 => x) (fun x => y) (↑(finSumEquivOfFinset hk hl) (Sum.inr i))) =\n    ↑(↑f fun i => x) fun x => y\n⊢ (↑(↑f fun x_1 => x) fun i =>\n      Finset.piecewise s (fun x_1 => x) (fun x => y) (↑(finSumEquivOfFinset hk hl) (Sum.inr i))) =\n    ↑(↑f fun x_1 => x) fun x => y\n[PROOFSTEP]\nexact this\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') M₂\nx y : M'\n⊢ (↑(↑(↑(curryFinFinset R M₂ M' hk hl) f) fun x_1 => x) fun x => y) = ↑f (Finset.piecewise s (fun x_1 => x) fun x => y)\n[PROOFSTEP]\nrefine'\n  (curryFinFinset_symm_apply_piecewise_const hk hl _ _ _).symm.trans\n    _\n      -- `rw` fails\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') M₂\nx y : M'\n⊢ ↑(↑(LinearEquiv.symm (curryFinFinset R M₂ M' hk hl)) (↑(curryFinFinset R M₂ M' hk hl) f))\n      (Finset.piecewise s (fun x_1 => x) fun x => y) =\n    ↑f (Finset.piecewise s (fun x_1 => x) fun x => y)\n[PROOFSTEP]\nrw [LinearEquiv.symm_apply_apply]\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') M₂\nx y : M'\n⊢ (↑f fun i => Sum.elim (fun x_1 => x) (fun x => y) (↑(finSumEquivOfFinset hk hl).symm i)) =\n    ↑f (Finset.piecewise s (fun x_1 => x) fun x => y)\n[PROOFSTEP]\nrw [← curryFinFinset_apply]\n[GOAL]\nR : Type u\nι : Type u'\nn✝ : ℕ\nM : Fin (Nat.succ n✝) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁶ : CommSemiring R\ninst✝⁵ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M₂\ninst✝² : (i : Fin (Nat.succ n✝)) → Module R (M i)\ninst✝¹ : Module R M'\ninst✝ : Module R M₂\nι' : Type u_1\nk l n : ℕ\ns : Finset (Fin n)\nhk : Finset.card s = k\nhl : Finset.card sᶜ = l\nf : MultilinearMap R (fun x => M') M₂\nx y : M'\n⊢ (↑(↑(↑(curryFinFinset R M₂ M' hk hl) f) fun x_1 => x) fun x => y) = ↑f (Finset.piecewise s (fun x_1 => x) fun x => y)\n[PROOFSTEP]\napply curryFinFinset_apply_const\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : Ring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\ninst✝ : Nonempty ι\nf : MultilinearMap R M₁ M₂\np : (i : ι) → Submodule R (M₁ i)\nc : R\nx✝¹ : M₂\nx✝ : x✝¹ ∈ ↑f '' {v | ∀ (i : ι), v i ∈ p i}\nx : (i : ι) → M₁ i\nhx : x ∈ {v | ∀ (i : ι), v i ∈ p i}\nhf : ↑f x = x✝¹\n⊢ c • x✝¹ ∈ ↑f '' {v | ∀ (i : ι), v i ∈ p i}\n[PROOFSTEP]\nlet ⟨i⟩ := ‹Nonempty ι›\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : Ring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\ninst✝ : Nonempty ι\nf : MultilinearMap R M₁ M₂\np : (i : ι) → Submodule R (M₁ i)\nc : R\nx✝¹ : M₂\nx✝ : x✝¹ ∈ ↑f '' {v | ∀ (i : ι), v i ∈ p i}\nx : (i : ι) → M₁ i\nhx : x ∈ {v | ∀ (i : ι), v i ∈ p i}\nhf : ↑f x = x✝¹\ni : ι\n⊢ c • x✝¹ ∈ ↑f '' {v | ∀ (i : ι), v i ∈ p i}\n[PROOFSTEP]\nletI := Classical.decEq ι\n[GOAL]\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : Ring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\ninst✝ : Nonempty ι\nf : MultilinearMap R M₁ M₂\np : (i : ι) → Submodule R (M₁ i)\nc : R\nx✝¹ : M₂\nx✝ : x✝¹ ∈ ↑f '' {v | ∀ (i : ι), v i ∈ p i}\nx : (i : ι) → M₁ i\nhx : x ∈ {v | ∀ (i : ι), v i ∈ p i}\nhf : ↑f x = x✝¹\ni : ι\nthis : DecidableEq ι := Classical.decEq ι\n⊢ c • x✝¹ ∈ ↑f '' {v | ∀ (i : ι), v i ∈ p i}\n[PROOFSTEP]\nrefine' ⟨update x i (c • x i), fun j => if hij : j = i then _ else _, hf ▸ _⟩\n[GOAL]\ncase refine'_1\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : Ring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\ninst✝ : Nonempty ι\nf : MultilinearMap R M₁ M₂\np : (i : ι) → Submodule R (M₁ i)\nc : R\nx✝¹ : M₂\nx✝ : x✝¹ ∈ ↑f '' {v | ∀ (i : ι), v i ∈ p i}\nx : (i : ι) → M₁ i\nhx : x ∈ {v | ∀ (i : ι), v i ∈ p i}\nhf : ↑f x = x✝¹\ni : ι\nthis : DecidableEq ι := Classical.decEq ι\nj : ι\nhij : j = i\n⊢ update x i (c • x i) j ∈ p j\n[PROOFSTEP]\nrw [hij, update_same]\n[GOAL]\ncase refine'_1\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : Ring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\ninst✝ : Nonempty ι\nf : MultilinearMap R M₁ M₂\np : (i : ι) → Submodule R (M₁ i)\nc : R\nx✝¹ : M₂\nx✝ : x✝¹ ∈ ↑f '' {v | ∀ (i : ι), v i ∈ p i}\nx : (i : ι) → M₁ i\nhx : x ∈ {v | ∀ (i : ι), v i ∈ p i}\nhf : ↑f x = x✝¹\ni : ι\nthis : DecidableEq ι := Classical.decEq ι\nj : ι\nhij : j = i\n⊢ c • x i ∈ p i\n[PROOFSTEP]\nexact (p i).smul_mem _ (hx i)\n[GOAL]\ncase refine'_2\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : Ring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\ninst✝ : Nonempty ι\nf : MultilinearMap R M₁ M₂\np : (i : ι) → Submodule R (M₁ i)\nc : R\nx✝¹ : M₂\nx✝ : x✝¹ ∈ ↑f '' {v | ∀ (i : ι), v i ∈ p i}\nx : (i : ι) → M₁ i\nhx : x ∈ {v | ∀ (i : ι), v i ∈ p i}\nhf : ↑f x = x✝¹\ni : ι\nthis : DecidableEq ι := Classical.decEq ι\nj : ι\nhij : ¬j = i\n⊢ update x i (c • x i) j ∈ p j\n[PROOFSTEP]\nrw [update_noteq hij]\n[GOAL]\ncase refine'_2\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : Ring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\ninst✝ : Nonempty ι\nf : MultilinearMap R M₁ M₂\np : (i : ι) → Submodule R (M₁ i)\nc : R\nx✝¹ : M₂\nx✝ : x✝¹ ∈ ↑f '' {v | ∀ (i : ι), v i ∈ p i}\nx : (i : ι) → M₁ i\nhx : x ∈ {v | ∀ (i : ι), v i ∈ p i}\nhf : ↑f x = x✝¹\ni : ι\nthis : DecidableEq ι := Classical.decEq ι\nj : ι\nhij : ¬j = i\n⊢ x j ∈ p j\n[PROOFSTEP]\nexact hx j\n[GOAL]\ncase refine'_3\nR : Type u\nι : Type u'\nn : ℕ\nM : Fin (Nat.succ n) → Type v\nM₁ : ι → Type v₁\nM₂ : Type v₂\nM₃ : Type v₃\nM' : Type v'\ninst✝⁷ : Ring R\ninst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : (i : ι) → Module R (M₁ i)\ninst✝² : Module R M'\ninst✝¹ : Module R M₂\ninst✝ : Nonempty ι\nf : MultilinearMap R M₁ M₂\np : (i : ι) → Submodule R (M₁ i)\nc : R\nx✝¹ : M₂\nx✝ : x✝¹ ∈ ↑f '' {v | ∀ (i : ι), v i ∈ p i}\nx : (i : ι) → M₁ i\nhx : x ∈ {v | ∀ (i : ι), v i ∈ p i}\nhf : ↑f x = x✝¹\ni : ι\nthis : DecidableEq ι := Classical.decEq ι\n⊢ ↑f (update x i (c • x i)) = c • ↑f x\n[PROOFSTEP]\nrw [f.map_smul, update_eq_self]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Multilinear.Basic", "llama_tokens": 279751, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7690802370707283, "lm_q2_score": 0.4571367168274948, "lm_q1q2_score": 0.3515748145514241}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁶ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁵ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁴ : TopologicalSpace N\ninst✝¹³ : ChartedSpace H N\nE'' : Type u_7\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝¹⁰ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁹ : TopologicalSpace N'\ninst✝⁸ : ChartedSpace H'' N'\nG' : Type u_10\ninst✝⁷ : Monoid G'\ninst✝⁶ : TopologicalSpace G'\ninst✝⁵ : ChartedSpace H' G'\ninst✝⁴ : SmoothMul I' G'\nG'' : Type u_11\ninst✝³ : Monoid G''\ninst✝² : TopologicalSpace G''\ninst✝¹ : ChartedSpace H'' G''\ninst✝ : SmoothMul I'' G''\nφ : G' →* G''\nhφ : Smooth I' I'' ↑φ\n⊢ (fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) }) 1 = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁶ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁵ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁴ : TopologicalSpace N\ninst✝¹³ : ChartedSpace H N\nE'' : Type u_7\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝¹⁰ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁹ : TopologicalSpace N'\ninst✝⁸ : ChartedSpace H'' N'\nG' : Type u_10\ninst✝⁷ : Monoid G'\ninst✝⁶ : TopologicalSpace G'\ninst✝⁵ : ChartedSpace H' G'\ninst✝⁴ : SmoothMul I' G'\nG'' : Type u_11\ninst✝³ : Monoid G''\ninst✝² : TopologicalSpace G''\ninst✝¹ : ChartedSpace H'' G''\ninst✝ : SmoothMul I'' G''\nφ : G' →* G''\nhφ : Smooth I' I'' ↑φ\nx✝ : N\n⊢ ↑((fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) }) 1) x✝ = ↑1 x✝\n[PROOFSTEP]\nshow φ 1 = 1\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁶ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁵ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁴ : TopologicalSpace N\ninst✝¹³ : ChartedSpace H N\nE'' : Type u_7\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝¹⁰ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁹ : TopologicalSpace N'\ninst✝⁸ : ChartedSpace H'' N'\nG' : Type u_10\ninst✝⁷ : Monoid G'\ninst✝⁶ : TopologicalSpace G'\ninst✝⁵ : ChartedSpace H' G'\ninst✝⁴ : SmoothMul I' G'\nG'' : Type u_11\ninst✝³ : Monoid G''\ninst✝² : TopologicalSpace G''\ninst✝¹ : ChartedSpace H'' G''\ninst✝ : SmoothMul I'' G''\nφ : G' →* G''\nhφ : Smooth I' I'' ↑φ\nx✝ : N\n⊢ ↑φ 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁶ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁵ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁴ : TopologicalSpace N\ninst✝¹³ : ChartedSpace H N\nE'' : Type u_7\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝¹⁰ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁹ : TopologicalSpace N'\ninst✝⁸ : ChartedSpace H'' N'\nG' : Type u_10\ninst✝⁷ : Monoid G'\ninst✝⁶ : TopologicalSpace G'\ninst✝⁵ : ChartedSpace H' G'\ninst✝⁴ : SmoothMul I' G'\nG'' : Type u_11\ninst✝³ : Monoid G''\ninst✝² : TopologicalSpace G''\ninst✝¹ : ChartedSpace H'' G''\ninst✝ : SmoothMul I'' G''\nφ : G' →* G''\nhφ : Smooth I' I'' ↑φ\nf g : C^⊤⟮I, N; I', G'⟯\n⊢ OneHom.toFun\n      { toFun := fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) },\n        map_one' :=\n          (_ : (fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) }) 1 = 1) }\n      (f * g) =\n    OneHom.toFun\n        { toFun := fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) },\n          map_one' :=\n            (_ : (fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) }) 1 = 1) }\n        f *\n      OneHom.toFun\n        { toFun := fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) },\n          map_one' :=\n            (_ : (fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) }) 1 = 1) }\n        g\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁶ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁵ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁴ : TopologicalSpace N\ninst✝¹³ : ChartedSpace H N\nE'' : Type u_7\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝¹⁰ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁹ : TopologicalSpace N'\ninst✝⁸ : ChartedSpace H'' N'\nG' : Type u_10\ninst✝⁷ : Monoid G'\ninst✝⁶ : TopologicalSpace G'\ninst✝⁵ : ChartedSpace H' G'\ninst✝⁴ : SmoothMul I' G'\nG'' : Type u_11\ninst✝³ : Monoid G''\ninst✝² : TopologicalSpace G''\ninst✝¹ : ChartedSpace H'' G''\ninst✝ : SmoothMul I'' G''\nφ : G' →* G''\nhφ : Smooth I' I'' ↑φ\nf g : C^⊤⟮I, N; I', G'⟯\nx : N\n⊢ ↑(OneHom.toFun\n          { toFun := fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) },\n            map_one' :=\n              (_ : (fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) }) 1 = 1) }\n          (f * g))\n      x =\n    ↑(OneHom.toFun\n            { toFun := fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) },\n              map_one' :=\n                (_ :\n                  (fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) }) 1 = 1) }\n            f *\n          OneHom.toFun\n            { toFun := fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) },\n              map_one' :=\n                (_ :\n                  (fun f => { val := ↑φ ∘ ↑f, property := (_ : ∀ (x : N), ContMDiffAt I I'' ⊤ (↑φ ∘ ↑f) x) }) 1 = 1) }\n            g)\n      x\n[PROOFSTEP]\nshow φ (f x * g x) = φ (f x) * φ (g x)\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁶ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁵ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁴ : TopologicalSpace N\ninst✝¹³ : ChartedSpace H N\nE'' : Type u_7\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝¹⁰ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁹ : TopologicalSpace N'\ninst✝⁸ : ChartedSpace H'' N'\nG' : Type u_10\ninst✝⁷ : Monoid G'\ninst✝⁶ : TopologicalSpace G'\ninst✝⁵ : ChartedSpace H' G'\ninst✝⁴ : SmoothMul I' G'\nG'' : Type u_11\ninst✝³ : Monoid G''\ninst✝² : TopologicalSpace G''\ninst✝¹ : ChartedSpace H'' G''\ninst✝ : SmoothMul I'' G''\nφ : G' →* G''\nhφ : Smooth I' I'' ↑φ\nf g : C^⊤⟮I, N; I', G'⟯\nx : N\n⊢ ↑φ (↑f x * ↑g x) = ↑φ (↑f x) * ↑φ (↑g x)\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁰ : TopologicalSpace N\ninst✝⁹ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁶ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁵ : TopologicalSpace N'\ninst✝⁴ : ChartedSpace H'' N'\nG : Type u_10\ninst✝³ : Group G\ninst✝² : TopologicalSpace G\ninst✝¹ : ChartedSpace H' G\ninst✝ : LieGroup I' G\nsrc✝ : Monoid C^⊤⟮I, N; I', G⟯ := monoid\nf g : C^⊤⟮I, N; I', G⟯\n⊢ f / g = f * g⁻¹\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁰ : TopologicalSpace N\ninst✝⁹ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁶ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁵ : TopologicalSpace N'\ninst✝⁴ : ChartedSpace H'' N'\nG : Type u_10\ninst✝³ : Group G\ninst✝² : TopologicalSpace G\ninst✝¹ : ChartedSpace H' G\ninst✝ : LieGroup I' G\nsrc✝ : Monoid C^⊤⟮I, N; I', G⟯ := monoid\nf g : C^⊤⟮I, N; I', G⟯\nx✝ : N\n⊢ ↑(f / g) x✝ = ↑(f * g⁻¹) x✝\n[PROOFSTEP]\nexact div_eq_mul_inv _ _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁰ : TopologicalSpace N\ninst✝⁹ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁶ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁵ : TopologicalSpace N'\ninst✝⁴ : ChartedSpace H'' N'\nG : Type u_10\ninst✝³ : Group G\ninst✝² : TopologicalSpace G\ninst✝¹ : ChartedSpace H' G\ninst✝ : LieGroup I' G\nsrc✝ : Monoid C^⊤⟮I, N; I', G⟯ := monoid\na : C^⊤⟮I, N; I', G⟯\n⊢ a⁻¹ * a = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁰ : TopologicalSpace N\ninst✝⁹ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁶ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁵ : TopologicalSpace N'\ninst✝⁴ : ChartedSpace H'' N'\nG : Type u_10\ninst✝³ : Group G\ninst✝² : TopologicalSpace G\ninst✝¹ : ChartedSpace H' G\ninst✝ : LieGroup I' G\nsrc✝ : Monoid C^⊤⟮I, N; I', G⟯ := monoid\na : C^⊤⟮I, N; I', G⟯\nx✝ : N\n⊢ ↑(a⁻¹ * a) x✝ = ↑1 x✝\n[PROOFSTEP]\nexact mul_left_inv _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁰ : TopologicalSpace N\ninst✝⁹ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁶ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁵ : TopologicalSpace N'\ninst✝⁴ : ChartedSpace H'' N'\nR : Type u_10\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : ChartedSpace H' R\ninst✝ : SmoothRing I' R\nsrc✝¹ : AddCommMonoid C^⊤⟮I, N; I', R⟯ := addCommMonoid\nsrc✝ : Monoid C^⊤⟮I, N; I', R⟯ := monoid\na b c : C^⊤⟮I, N; I', R⟯\n⊢ a * (b + c) = a * b + a * c\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁰ : TopologicalSpace N\ninst✝⁹ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁶ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁵ : TopologicalSpace N'\ninst✝⁴ : ChartedSpace H'' N'\nR : Type u_10\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : ChartedSpace H' R\ninst✝ : SmoothRing I' R\nsrc✝¹ : AddCommMonoid C^⊤⟮I, N; I', R⟯ := addCommMonoid\nsrc✝ : Monoid C^⊤⟮I, N; I', R⟯ := monoid\na b c : C^⊤⟮I, N; I', R⟯\nx✝ : N\n⊢ ↑(a * (b + c)) x✝ = ↑(a * b + a * c) x✝\n[PROOFSTEP]\nexact left_distrib _ _ _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁰ : TopologicalSpace N\ninst✝⁹ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁶ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁵ : TopologicalSpace N'\ninst✝⁴ : ChartedSpace H'' N'\nR : Type u_10\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : ChartedSpace H' R\ninst✝ : SmoothRing I' R\nsrc✝¹ : AddCommMonoid C^⊤⟮I, N; I', R⟯ := addCommMonoid\nsrc✝ : Monoid C^⊤⟮I, N; I', R⟯ := monoid\na b c : C^⊤⟮I, N; I', R⟯\n⊢ (a + b) * c = a * c + b * c\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁰ : TopologicalSpace N\ninst✝⁹ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁶ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁵ : TopologicalSpace N'\ninst✝⁴ : ChartedSpace H'' N'\nR : Type u_10\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : ChartedSpace H' R\ninst✝ : SmoothRing I' R\nsrc✝¹ : AddCommMonoid C^⊤⟮I, N; I', R⟯ := addCommMonoid\nsrc✝ : Monoid C^⊤⟮I, N; I', R⟯ := monoid\na b c : C^⊤⟮I, N; I', R⟯\nx✝ : N\n⊢ ↑((a + b) * c) x✝ = ↑(a * c + b * c) x✝\n[PROOFSTEP]\nexact right_distrib _ _ _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁰ : TopologicalSpace N\ninst✝⁹ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁶ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁵ : TopologicalSpace N'\ninst✝⁴ : ChartedSpace H'' N'\nR : Type u_10\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : ChartedSpace H' R\ninst✝ : SmoothRing I' R\nsrc✝¹ : AddCommMonoid C^⊤⟮I, N; I', R⟯ := addCommMonoid\nsrc✝ : Monoid C^⊤⟮I, N; I', R⟯ := monoid\na : C^⊤⟮I, N; I', R⟯\n⊢ 0 * a = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁰ : TopologicalSpace N\ninst✝⁹ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁶ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁵ : TopologicalSpace N'\ninst✝⁴ : ChartedSpace H'' N'\nR : Type u_10\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : ChartedSpace H' R\ninst✝ : SmoothRing I' R\nsrc✝¹ : AddCommMonoid C^⊤⟮I, N; I', R⟯ := addCommMonoid\nsrc✝ : Monoid C^⊤⟮I, N; I', R⟯ := monoid\na : C^⊤⟮I, N; I', R⟯\nx✝ : N\n⊢ ↑(0 * a) x✝ = ↑0 x✝\n[PROOFSTEP]\nexact zero_mul _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁰ : TopologicalSpace N\ninst✝⁹ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁶ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁵ : TopologicalSpace N'\ninst✝⁴ : ChartedSpace H'' N'\nR : Type u_10\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : ChartedSpace H' R\ninst✝ : SmoothRing I' R\nsrc✝¹ : AddCommMonoid C^⊤⟮I, N; I', R⟯ := addCommMonoid\nsrc✝ : Monoid C^⊤⟮I, N; I', R⟯ := monoid\na : C^⊤⟮I, N; I', R⟯\n⊢ a * 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝¹⁰ : TopologicalSpace N\ninst✝⁹ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁶ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁵ : TopologicalSpace N'\ninst✝⁴ : ChartedSpace H'' N'\nR : Type u_10\ninst✝³ : Semiring R\ninst✝² : TopologicalSpace R\ninst✝¹ : ChartedSpace H' R\ninst✝ : SmoothRing I' R\nsrc✝¹ : AddCommMonoid C^⊤⟮I, N; I', R⟯ := addCommMonoid\nsrc✝ : Monoid C^⊤⟮I, N; I', R⟯ := monoid\na : C^⊤⟮I, N; I', R⟯\nx✝ : N\n⊢ ↑(a * 0) x✝ = ↑0 x✝\n[PROOFSTEP]\nexact mul_zero _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹¹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁹ : TopologicalSpace N\ninst✝⁸ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁴ : TopologicalSpace N'\ninst✝³ : ChartedSpace H'' N'\nA : Type u_10\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : SmoothRing 𝓘(𝕜, A) A\n⊢ (fun c => { val := fun x => ↑(algebraMap 𝕜 A) c, property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n      1 =\n    1\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹¹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁹ : TopologicalSpace N\ninst✝⁸ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁴ : TopologicalSpace N'\ninst✝³ : ChartedSpace H'' N'\nA : Type u_10\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : SmoothRing 𝓘(𝕜, A) A\nx✝ : N\n⊢ ↑((fun c => { val := fun x => ↑(algebraMap 𝕜 A) c, property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n          1)\n      x✝ =\n    ↑1 x✝\n[PROOFSTEP]\nexact (algebraMap 𝕜 A).map_one\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹¹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁹ : TopologicalSpace N\ninst✝⁸ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁴ : TopologicalSpace N'\ninst✝³ : ChartedSpace H'' N'\nA : Type u_10\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : SmoothRing 𝓘(𝕜, A) A\nc₁ c₂ : 𝕜\n⊢ OneHom.toFun\n      {\n        toFun := fun c =>\n          { val := fun x => ↑(algebraMap 𝕜 A) c, property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n        map_one' :=\n          (_ :\n            (fun c =>\n                  { val := fun x => ↑(algebraMap 𝕜 A) c,\n                    property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                1 =\n              1) }\n      (c₁ * c₂) =\n    OneHom.toFun\n        {\n          toFun := fun c =>\n            { val := fun x => ↑(algebraMap 𝕜 A) c, property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n          map_one' :=\n            (_ :\n              (fun c =>\n                    { val := fun x => ↑(algebraMap 𝕜 A) c,\n                      property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                  1 =\n                1) }\n        c₁ *\n      OneHom.toFun\n        {\n          toFun := fun c =>\n            { val := fun x => ↑(algebraMap 𝕜 A) c, property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n          map_one' :=\n            (_ :\n              (fun c =>\n                    { val := fun x => ↑(algebraMap 𝕜 A) c,\n                      property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                  1 =\n                1) }\n        c₂\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹¹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁹ : TopologicalSpace N\ninst✝⁸ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁴ : TopologicalSpace N'\ninst✝³ : ChartedSpace H'' N'\nA : Type u_10\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : SmoothRing 𝓘(𝕜, A) A\nc₁ c₂ : 𝕜\nx✝ : N\n⊢ ↑(OneHom.toFun\n          {\n            toFun := fun c =>\n              { val := fun x => ↑(algebraMap 𝕜 A) c, property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n            map_one' :=\n              (_ :\n                (fun c =>\n                      { val := fun x => ↑(algebraMap 𝕜 A) c,\n                        property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                    1 =\n                  1) }\n          (c₁ * c₂))\n      x✝ =\n    ↑(OneHom.toFun\n            {\n              toFun := fun c =>\n                { val := fun x => ↑(algebraMap 𝕜 A) c,\n                  property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n              map_one' :=\n                (_ :\n                  (fun c =>\n                        { val := fun x => ↑(algebraMap 𝕜 A) c,\n                          property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                      1 =\n                    1) }\n            c₁ *\n          OneHom.toFun\n            {\n              toFun := fun c =>\n                { val := fun x => ↑(algebraMap 𝕜 A) c,\n                  property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n              map_one' :=\n                (_ :\n                  (fun c =>\n                        { val := fun x => ↑(algebraMap 𝕜 A) c,\n                          property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                      1 =\n                    1) }\n            c₂)\n      x✝\n[PROOFSTEP]\nexact (algebraMap 𝕜 A).map_mul _ _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹¹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁹ : TopologicalSpace N\ninst✝⁸ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁴ : TopologicalSpace N'\ninst✝³ : ChartedSpace H'' N'\nA : Type u_10\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : SmoothRing 𝓘(𝕜, A) A\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            {\n              toFun := fun c =>\n                { val := fun x => ↑(algebraMap 𝕜 A) c,\n                  property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n              map_one' :=\n                (_ :\n                  (fun c =>\n                        { val := fun x => ↑(algebraMap 𝕜 A) c,\n                          property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                      1 =\n                    1) },\n          map_mul' :=\n            (_ :\n              ∀ (c₁ c₂ : 𝕜),\n                OneHom.toFun\n                    {\n                      toFun := fun c =>\n                        { val := fun x => ↑(algebraMap 𝕜 A) c,\n                          property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                      map_one' :=\n                        (_ :\n                          (fun c =>\n                                { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                  property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                              1 =\n                            1) }\n                    (c₁ * c₂) =\n                  OneHom.toFun\n                      {\n                        toFun := fun c =>\n                          { val := fun x => ↑(algebraMap 𝕜 A) c,\n                            property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                        map_one' :=\n                          (_ :\n                            (fun c =>\n                                  { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                    property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                1 =\n                              1) }\n                      c₁ *\n                    OneHom.toFun\n                      {\n                        toFun := fun c =>\n                          { val := fun x => ↑(algebraMap 𝕜 A) c,\n                            property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                        map_one' :=\n                          (_ :\n                            (fun c =>\n                                  { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                    property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                1 =\n                              1) }\n                      c₂) })\n      0 =\n    0\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹¹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁹ : TopologicalSpace N\ninst✝⁸ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁴ : TopologicalSpace N'\ninst✝³ : ChartedSpace H'' N'\nA : Type u_10\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : SmoothRing 𝓘(𝕜, A) A\nx✝ : N\n⊢ ↑(OneHom.toFun\n          (↑{\n              toOneHom :=\n                {\n                  toFun := fun c =>\n                    { val := fun x => ↑(algebraMap 𝕜 A) c,\n                      property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                  map_one' :=\n                    (_ :\n                      (fun c =>\n                            { val := fun x => ↑(algebraMap 𝕜 A) c,\n                              property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                          1 =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (c₁ c₂ : 𝕜),\n                    OneHom.toFun\n                        {\n                          toFun := fun c =>\n                            { val := fun x => ↑(algebraMap 𝕜 A) c,\n                              property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                          map_one' :=\n                            (_ :\n                              (fun c =>\n                                    { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                      property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                  1 =\n                                1) }\n                        (c₁ * c₂) =\n                      OneHom.toFun\n                          {\n                            toFun := fun c =>\n                              { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                            map_one' :=\n                              (_ :\n                                (fun c =>\n                                      { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                        property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                    1 =\n                                  1) }\n                          c₁ *\n                        OneHom.toFun\n                          {\n                            toFun := fun c =>\n                              { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                            map_one' :=\n                              (_ :\n                                (fun c =>\n                                      { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                        property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                    1 =\n                                  1) }\n                          c₂) })\n          0)\n      x✝ =\n    ↑0 x✝\n[PROOFSTEP]\nexact (algebraMap 𝕜 A).map_zero\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹¹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁹ : TopologicalSpace N\ninst✝⁸ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁴ : TopologicalSpace N'\ninst✝³ : ChartedSpace H'' N'\nA : Type u_10\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : SmoothRing 𝓘(𝕜, A) A\nc₁ c₂ : 𝕜\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            {\n              toFun := fun c =>\n                { val := fun x => ↑(algebraMap 𝕜 A) c,\n                  property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n              map_one' :=\n                (_ :\n                  (fun c =>\n                        { val := fun x => ↑(algebraMap 𝕜 A) c,\n                          property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                      1 =\n                    1) },\n          map_mul' :=\n            (_ :\n              ∀ (c₁ c₂ : 𝕜),\n                OneHom.toFun\n                    {\n                      toFun := fun c =>\n                        { val := fun x => ↑(algebraMap 𝕜 A) c,\n                          property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                      map_one' :=\n                        (_ :\n                          (fun c =>\n                                { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                  property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                              1 =\n                            1) }\n                    (c₁ * c₂) =\n                  OneHom.toFun\n                      {\n                        toFun := fun c =>\n                          { val := fun x => ↑(algebraMap 𝕜 A) c,\n                            property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                        map_one' :=\n                          (_ :\n                            (fun c =>\n                                  { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                    property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                1 =\n                              1) }\n                      c₁ *\n                    OneHom.toFun\n                      {\n                        toFun := fun c =>\n                          { val := fun x => ↑(algebraMap 𝕜 A) c,\n                            property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                        map_one' :=\n                          (_ :\n                            (fun c =>\n                                  { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                    property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                1 =\n                              1) }\n                      c₂) })\n      (c₁ + c₂) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              {\n                toFun := fun c =>\n                  { val := fun x => ↑(algebraMap 𝕜 A) c,\n                    property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                map_one' :=\n                  (_ :\n                    (fun c =>\n                          { val := fun x => ↑(algebraMap 𝕜 A) c,\n                            property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                        1 =\n                      1) },\n            map_mul' :=\n              (_ :\n                ∀ (c₁ c₂ : 𝕜),\n                  OneHom.toFun\n                      {\n                        toFun := fun c =>\n                          { val := fun x => ↑(algebraMap 𝕜 A) c,\n                            property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                        map_one' :=\n                          (_ :\n                            (fun c =>\n                                  { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                    property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                1 =\n                              1) }\n                      (c₁ * c₂) =\n                    OneHom.toFun\n                        {\n                          toFun := fun c =>\n                            { val := fun x => ↑(algebraMap 𝕜 A) c,\n                              property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                          map_one' :=\n                            (_ :\n                              (fun c =>\n                                    { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                      property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                  1 =\n                                1) }\n                        c₁ *\n                      OneHom.toFun\n                        {\n                          toFun := fun c =>\n                            { val := fun x => ↑(algebraMap 𝕜 A) c,\n                              property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                          map_one' :=\n                            (_ :\n                              (fun c =>\n                                    { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                      property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                  1 =\n                                1) }\n                        c₂) })\n        c₁ +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              {\n                toFun := fun c =>\n                  { val := fun x => ↑(algebraMap 𝕜 A) c,\n                    property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                map_one' :=\n                  (_ :\n                    (fun c =>\n                          { val := fun x => ↑(algebraMap 𝕜 A) c,\n                            property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                        1 =\n                      1) },\n            map_mul' :=\n              (_ :\n                ∀ (c₁ c₂ : 𝕜),\n                  OneHom.toFun\n                      {\n                        toFun := fun c =>\n                          { val := fun x => ↑(algebraMap 𝕜 A) c,\n                            property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                        map_one' :=\n                          (_ :\n                            (fun c =>\n                                  { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                    property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                1 =\n                              1) }\n                      (c₁ * c₂) =\n                    OneHom.toFun\n                        {\n                          toFun := fun c =>\n                            { val := fun x => ↑(algebraMap 𝕜 A) c,\n                              property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                          map_one' :=\n                            (_ :\n                              (fun c =>\n                                    { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                      property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                  1 =\n                                1) }\n                        c₁ *\n                      OneHom.toFun\n                        {\n                          toFun := fun c =>\n                            { val := fun x => ↑(algebraMap 𝕜 A) c,\n                              property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                          map_one' :=\n                            (_ :\n                              (fun c =>\n                                    { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                      property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                  1 =\n                                1) }\n                        c₂) })\n        c₂\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹¹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁹ : TopologicalSpace N\ninst✝⁸ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁴ : TopologicalSpace N'\ninst✝³ : ChartedSpace H'' N'\nA : Type u_10\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : SmoothRing 𝓘(𝕜, A) A\nc₁ c₂ : 𝕜\nx✝ : N\n⊢ ↑(OneHom.toFun\n          (↑{\n              toOneHom :=\n                {\n                  toFun := fun c =>\n                    { val := fun x => ↑(algebraMap 𝕜 A) c,\n                      property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                  map_one' :=\n                    (_ :\n                      (fun c =>\n                            { val := fun x => ↑(algebraMap 𝕜 A) c,\n                              property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                          1 =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (c₁ c₂ : 𝕜),\n                    OneHom.toFun\n                        {\n                          toFun := fun c =>\n                            { val := fun x => ↑(algebraMap 𝕜 A) c,\n                              property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                          map_one' :=\n                            (_ :\n                              (fun c =>\n                                    { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                      property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                  1 =\n                                1) }\n                        (c₁ * c₂) =\n                      OneHom.toFun\n                          {\n                            toFun := fun c =>\n                              { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                            map_one' :=\n                              (_ :\n                                (fun c =>\n                                      { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                        property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                    1 =\n                                  1) }\n                          c₁ *\n                        OneHom.toFun\n                          {\n                            toFun := fun c =>\n                              { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                            map_one' :=\n                              (_ :\n                                (fun c =>\n                                      { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                        property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                    1 =\n                                  1) }\n                          c₂) })\n          (c₁ + c₂))\n      x✝ =\n    ↑(OneHom.toFun\n            (↑{\n                toOneHom :=\n                  {\n                    toFun := fun c =>\n                      { val := fun x => ↑(algebraMap 𝕜 A) c,\n                        property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                    map_one' :=\n                      (_ :\n                        (fun c =>\n                              { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                            1 =\n                          1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (c₁ c₂ : 𝕜),\n                      OneHom.toFun\n                          {\n                            toFun := fun c =>\n                              { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                            map_one' :=\n                              (_ :\n                                (fun c =>\n                                      { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                        property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                    1 =\n                                  1) }\n                          (c₁ * c₂) =\n                        OneHom.toFun\n                            {\n                              toFun := fun c =>\n                                { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                  property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                              map_one' :=\n                                (_ :\n                                  (fun c =>\n                                        { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                          property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                      1 =\n                                    1) }\n                            c₁ *\n                          OneHom.toFun\n                            {\n                              toFun := fun c =>\n                                { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                  property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                              map_one' :=\n                                (_ :\n                                  (fun c =>\n                                        { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                          property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                      1 =\n                                    1) }\n                            c₂) })\n            c₁ +\n          OneHom.toFun\n            (↑{\n                toOneHom :=\n                  {\n                    toFun := fun c =>\n                      { val := fun x => ↑(algebraMap 𝕜 A) c,\n                        property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                    map_one' :=\n                      (_ :\n                        (fun c =>\n                              { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                            1 =\n                          1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (c₁ c₂ : 𝕜),\n                      OneHom.toFun\n                          {\n                            toFun := fun c =>\n                              { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                            map_one' :=\n                              (_ :\n                                (fun c =>\n                                      { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                        property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                    1 =\n                                  1) }\n                          (c₁ * c₂) =\n                        OneHom.toFun\n                            {\n                              toFun := fun c =>\n                                { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                  property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                              map_one' :=\n                                (_ :\n                                  (fun c =>\n                                        { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                          property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                      1 =\n                                    1) }\n                            c₁ *\n                          OneHom.toFun\n                            {\n                              toFun := fun c =>\n                                { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                  property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) },\n                              map_one' :=\n                                (_ :\n                                  (fun c =>\n                                        { val := fun x => ↑(algebraMap 𝕜 A) c,\n                                          property := (_ : Smooth I 𝓘(𝕜, A) fun x => ↑(algebraMap 𝕜 A) c) })\n                                      1 =\n                                    1) }\n                            c₂) })\n            c₂)\n      x✝\n[PROOFSTEP]\nexact (algebraMap 𝕜 A).map_add _ _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹¹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁹ : TopologicalSpace N\ninst✝⁸ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁴ : TopologicalSpace N'\ninst✝³ : ChartedSpace H'' N'\nA : Type u_10\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : SmoothRing 𝓘(𝕜, A) A\nc : 𝕜\nf : (fun x => C^⊤⟮I, N; 𝓘(𝕜, A), A⟯) c\n⊢ ↑C c * f = f * ↑C c\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹¹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁹ : TopologicalSpace N\ninst✝⁸ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁴ : TopologicalSpace N'\ninst✝³ : ChartedSpace H'' N'\nA : Type u_10\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : SmoothRing 𝓘(𝕜, A) A\nc : 𝕜\nf : (fun x => C^⊤⟮I, N; 𝓘(𝕜, A), A⟯) c\nx : N\n⊢ ↑(↑C c * f) x = ↑(f * ↑C c) x\n[PROOFSTEP]\nexact Algebra.commutes' _ _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹¹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁹ : TopologicalSpace N\ninst✝⁸ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁴ : TopologicalSpace N'\ninst✝³ : ChartedSpace H'' N'\nA : Type u_10\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : SmoothRing 𝓘(𝕜, A) A\nc : 𝕜\nf : (fun x => C^⊤⟮I, N; 𝓘(𝕜, A), A⟯) c\n⊢ c • f = ↑C c * f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹¹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁹ : TopologicalSpace N\ninst✝⁸ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝⁴ : TopologicalSpace N'\ninst✝³ : ChartedSpace H'' N'\nA : Type u_10\ninst✝² : NormedRing A\ninst✝¹ : NormedAlgebra 𝕜 A\ninst✝ : SmoothRing 𝓘(𝕜, A) A\nc : 𝕜\nf : (fun x => C^⊤⟮I, N; 𝓘(𝕜, A), A⟯) c\nx : N\n⊢ ↑(c • f) x = ↑(↑C c * f) x\n[PROOFSTEP]\nexact Algebra.smul_def' _ _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁰ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁸ : TopologicalSpace N\ninst✝⁷ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁴ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝³ : TopologicalSpace N'\ninst✝² : ChartedSpace H'' N'\nV : Type u_10\ninst✝¹ : NormedAddCommGroup V\ninst✝ : NormedSpace 𝕜 V\nf : C^⊤⟮I, N; 𝓘(𝕜, V), V⟯\n⊢ 1 • f = f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁰ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁸ : TopologicalSpace N\ninst✝⁷ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁴ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝³ : TopologicalSpace N'\ninst✝² : ChartedSpace H'' N'\nV : Type u_10\ninst✝¹ : NormedAddCommGroup V\ninst✝ : NormedSpace 𝕜 V\nf : C^⊤⟮I, N; 𝓘(𝕜, V), V⟯\nx : N\n⊢ ↑(1 • f) x = ↑f x\n[PROOFSTEP]\nexact one_smul 𝕜 (f x)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁰ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁸ : TopologicalSpace N\ninst✝⁷ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁴ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝³ : TopologicalSpace N'\ninst✝² : ChartedSpace H'' N'\nV : Type u_10\ninst✝¹ : NormedAddCommGroup V\ninst✝ : NormedSpace 𝕜 V\nc₁ c₂ : C^⊤⟮I, N; 𝓘(𝕜, 𝕜), 𝕜⟯\nf : C^⊤⟮I, N; 𝓘(𝕜, V), V⟯\n⊢ (c₁ * c₂) • f = c₁ • c₂ • f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁰ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁸ : TopologicalSpace N\ninst✝⁷ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁴ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝³ : TopologicalSpace N'\ninst✝² : ChartedSpace H'' N'\nV : Type u_10\ninst✝¹ : NormedAddCommGroup V\ninst✝ : NormedSpace 𝕜 V\nc₁ c₂ : C^⊤⟮I, N; 𝓘(𝕜, 𝕜), 𝕜⟯\nf : C^⊤⟮I, N; 𝓘(𝕜, V), V⟯\nx : N\n⊢ ↑((c₁ * c₂) • f) x = ↑(c₁ • c₂ • f) x\n[PROOFSTEP]\nexact mul_smul (c₁ x) (c₂ x) (f x)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁰ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁸ : TopologicalSpace N\ninst✝⁷ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁴ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝³ : TopologicalSpace N'\ninst✝² : ChartedSpace H'' N'\nV : Type u_10\ninst✝¹ : NormedAddCommGroup V\ninst✝ : NormedSpace 𝕜 V\nr : C^⊤⟮I, N; 𝓘(𝕜, 𝕜), 𝕜⟯\n⊢ r • 0 = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁰ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁸ : TopologicalSpace N\ninst✝⁷ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁴ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝³ : TopologicalSpace N'\ninst✝² : ChartedSpace H'' N'\nV : Type u_10\ninst✝¹ : NormedAddCommGroup V\ninst✝ : NormedSpace 𝕜 V\nr : C^⊤⟮I, N; 𝓘(𝕜, 𝕜), 𝕜⟯\nx : N\n⊢ ↑(r • 0) x = ↑0 x\n[PROOFSTEP]\nexact smul_zero _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁰ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁸ : TopologicalSpace N\ninst✝⁷ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁴ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝³ : TopologicalSpace N'\ninst✝² : ChartedSpace H'' N'\nV : Type u_10\ninst✝¹ : NormedAddCommGroup V\ninst✝ : NormedSpace 𝕜 V\nc : C^⊤⟮I, N; 𝓘(𝕜, 𝕜), 𝕜⟯\nf g : C^⊤⟮I, N; 𝓘(𝕜, V), V⟯\n⊢ c • (f + g) = c • f + c • g\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁰ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁸ : TopologicalSpace N\ninst✝⁷ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁴ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝³ : TopologicalSpace N'\ninst✝² : ChartedSpace H'' N'\nV : Type u_10\ninst✝¹ : NormedAddCommGroup V\ninst✝ : NormedSpace 𝕜 V\nc : C^⊤⟮I, N; 𝓘(𝕜, 𝕜), 𝕜⟯\nf g : C^⊤⟮I, N; 𝓘(𝕜, V), V⟯\nx : N\n⊢ ↑(c • (f + g)) x = ↑(c • f + c • g) x\n[PROOFSTEP]\nexact smul_add (c x) (f x) (g x)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁰ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁸ : TopologicalSpace N\ninst✝⁷ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁴ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝³ : TopologicalSpace N'\ninst✝² : ChartedSpace H'' N'\nV : Type u_10\ninst✝¹ : NormedAddCommGroup V\ninst✝ : NormedSpace 𝕜 V\nc₁ c₂ : C^⊤⟮I, N; 𝓘(𝕜, 𝕜), 𝕜⟯\nf : C^⊤⟮I, N; 𝓘(𝕜, V), V⟯\n⊢ (c₁ + c₂) • f = c₁ • f + c₂ • f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁰ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁸ : TopologicalSpace N\ninst✝⁷ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁴ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝³ : TopologicalSpace N'\ninst✝² : ChartedSpace H'' N'\nV : Type u_10\ninst✝¹ : NormedAddCommGroup V\ninst✝ : NormedSpace 𝕜 V\nc₁ c₂ : C^⊤⟮I, N; 𝓘(𝕜, 𝕜), 𝕜⟯\nf : C^⊤⟮I, N; 𝓘(𝕜, V), V⟯\nx : N\n⊢ ↑((c₁ + c₂) • f) x = ↑(c₁ • f + c₂ • f) x\n[PROOFSTEP]\nexact add_smul (c₁ x) (c₂ x) (f x)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁰ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁸ : TopologicalSpace N\ninst✝⁷ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁴ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝³ : TopologicalSpace N'\ninst✝² : ChartedSpace H'' N'\nV : Type u_10\ninst✝¹ : NormedAddCommGroup V\ninst✝ : NormedSpace 𝕜 V\nf : C^⊤⟮I, N; 𝓘(𝕜, V), V⟯\n⊢ 0 • f = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH : Type u_4\ninst✝¹⁰ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nH' : Type u_5\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nN : Type u_6\ninst✝⁸ : TopologicalSpace N\ninst✝⁷ : ChartedSpace H N\nE'' : Type u_7\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedSpace 𝕜 E''\nH'' : Type u_8\ninst✝⁴ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nN' : Type u_9\ninst✝³ : TopologicalSpace N'\ninst✝² : ChartedSpace H'' N'\nV : Type u_10\ninst✝¹ : NormedAddCommGroup V\ninst✝ : NormedSpace 𝕜 V\nf : C^⊤⟮I, N; 𝓘(𝕜, V), V⟯\nx : N\n⊢ ↑(0 • f) x = ↑0 x\n[PROOFSTEP]\nexact zero_smul _ _\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Manifold.Algebra.SmoothFunctions", "llama_tokens": 26181, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7431680199891789, "lm_q2_score": 0.47268347662043286, "lm_q1q2_score": 0.35128324340160844}}
{"text": "[GOAL]\nB : Type u₁\ninst✝¹ : Bicategory B\nC : Type u₂\ninst✝ : Bicategory C\nF G H I : OplaxFunctor B C\nη : F ⟶ G\nθ ι : G ⟶ H\nΓ : θ ⟶ ι\na b : B\nf : a ⟶ b\n⊢ (↑F.toPrelaxFunctor).map f ◁ (fun a => η.app a ◁ Γ.app a) b ≫ naturality (η ≫ ι) f =\n    naturality (η ≫ θ) f ≫ (fun a => η.app a ◁ Γ.app a) a ▷ (↑H.toPrelaxFunctor).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝¹ : Bicategory B\nC : Type u₂\ninst✝ : Bicategory C\nF G H I : OplaxFunctor B C\nη : F ⟶ G\nθ ι : G ⟶ H\nΓ : θ ⟶ ι\na b : B\nf : a ⟶ b\n⊢ (↑F.toPrelaxFunctor).map f ◁ η.app b ◁ Γ.app b ≫\n      (α_ ((↑F.toPrelaxFunctor).map f) (η.app b) (ι.app b)).inv ≫\n        naturality η f ▷ ι.app b ≫\n          (α_ (η.app a) ((↑G.toPrelaxFunctor).map f) (ι.app b)).hom ≫\n            η.app a ◁ naturality ι f ≫ (α_ (η.app a) (ι.app a) ((↑H.toPrelaxFunctor).map f)).inv =\n    ((α_ ((↑F.toPrelaxFunctor).map f) (η.app b) (θ.app b)).inv ≫\n        naturality η f ▷ θ.app b ≫\n          (α_ (η.app a) ((↑G.toPrelaxFunctor).map f) (θ.app b)).hom ≫\n            η.app a ◁ naturality θ f ≫ (α_ (η.app a) (θ.app a) ((↑H.toPrelaxFunctor).map f)).inv) ≫\n      (η.app a ◁ Γ.app a) ▷ (↑H.toPrelaxFunctor).map f\n[PROOFSTEP]\nrw [associator_inv_naturality_right_assoc, whisker_exchange_assoc]\n[GOAL]\nB : Type u₁\ninst✝¹ : Bicategory B\nC : Type u₂\ninst✝ : Bicategory C\nF G H I : OplaxFunctor B C\nη : F ⟶ G\nθ ι : G ⟶ H\nΓ : θ ⟶ ι\na b : B\nf : a ⟶ b\n⊢ (α_ ((↑F.toPrelaxFunctor).map f) (η.app b) (θ.app b)).inv ≫\n      naturality η f ▷ θ.app b ≫\n        (η.app a ≫ (↑G.toPrelaxFunctor).map f) ◁ Γ.app b ≫\n          (α_ (η.app a) ((↑G.toPrelaxFunctor).map f) (ι.app b)).hom ≫\n            η.app a ◁ naturality ι f ≫ (α_ (η.app a) (ι.app a) ((↑H.toPrelaxFunctor).map f)).inv =\n    ((α_ ((↑F.toPrelaxFunctor).map f) (η.app b) (θ.app b)).inv ≫\n        naturality η f ▷ θ.app b ≫\n          (α_ (η.app a) ((↑G.toPrelaxFunctor).map f) (θ.app b)).hom ≫\n            η.app a ◁ naturality θ f ≫ (α_ (η.app a) (θ.app a) ((↑H.toPrelaxFunctor).map f)).inv) ≫\n      (η.app a ◁ Γ.app a) ▷ (↑H.toPrelaxFunctor).map f\n[PROOFSTEP]\nsimp\n[GOAL]\nB : Type u₁\ninst✝¹ : Bicategory B\nC : Type u₂\ninst✝ : Bicategory C\nF G H I : OplaxFunctor B C\nη θ : F ⟶ G\nΓ : η ⟶ θ\nι : G ⟶ H\na b : B\nf : a ⟶ b\n⊢ (↑F.toPrelaxFunctor).map f ◁ (fun a => Γ.app a ▷ ι.app a) b ≫ naturality (θ ≫ ι) f =\n    naturality (η ≫ ι) f ≫ (fun a => Γ.app a ▷ ι.app a) a ▷ (↑H.toPrelaxFunctor).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝¹ : Bicategory B\nC : Type u₂\ninst✝ : Bicategory C\nF G H I : OplaxFunctor B C\nη θ : F ⟶ G\nΓ : η ⟶ θ\nι : G ⟶ H\na b : B\nf : a ⟶ b\n⊢ (↑F.toPrelaxFunctor).map f ◁ Γ.app b ▷ ι.app b ≫\n      (α_ ((↑F.toPrelaxFunctor).map f) (θ.app b) (ι.app b)).inv ≫\n        naturality θ f ▷ ι.app b ≫\n          (α_ (θ.app a) ((↑G.toPrelaxFunctor).map f) (ι.app b)).hom ≫\n            θ.app a ◁ naturality ι f ≫ (α_ (θ.app a) (ι.app a) ((↑H.toPrelaxFunctor).map f)).inv =\n    ((α_ ((↑F.toPrelaxFunctor).map f) (η.app b) (ι.app b)).inv ≫\n        naturality η f ▷ ι.app b ≫\n          (α_ (η.app a) ((↑G.toPrelaxFunctor).map f) (ι.app b)).hom ≫\n            η.app a ◁ naturality ι f ≫ (α_ (η.app a) (ι.app a) ((↑H.toPrelaxFunctor).map f)).inv) ≫\n      Γ.app a ▷ ι.app a ▷ (↑H.toPrelaxFunctor).map f\n[PROOFSTEP]\nsimp_rw [assoc, ← associator_inv_naturality_left, whisker_exchange_assoc]\n[GOAL]\nB : Type u₁\ninst✝¹ : Bicategory B\nC : Type u₂\ninst✝ : Bicategory C\nF G H I : OplaxFunctor B C\nη θ : F ⟶ G\nΓ : η ⟶ θ\nι : G ⟶ H\na b : B\nf : a ⟶ b\n⊢ (↑F.toPrelaxFunctor).map f ◁ Γ.app b ▷ ι.app b ≫\n      (α_ ((↑F.toPrelaxFunctor).map f) (θ.app b) (ι.app b)).inv ≫\n        naturality θ f ▷ ι.app b ≫\n          (α_ (θ.app a) ((↑G.toPrelaxFunctor).map f) (ι.app b)).hom ≫\n            θ.app a ◁ naturality ι f ≫ (α_ (θ.app a) (ι.app a) ((↑H.toPrelaxFunctor).map f)).inv =\n    (α_ ((↑F.toPrelaxFunctor).map f) (η.app b) (ι.app b)).inv ≫\n      naturality η f ▷ ι.app b ≫\n        (α_ (η.app a) ((↑G.toPrelaxFunctor).map f) (ι.app b)).hom ≫\n          Γ.app a ▷ ((↑G.toPrelaxFunctor).map f ≫ ι.app b) ≫\n            θ.app a ◁ naturality ι f ≫ (α_ (θ.app a) (ι.app a) ((↑H.toPrelaxFunctor).map f)).inv\n[PROOFSTEP]\nsimp\n[GOAL]\nB : Type u₁\ninst✝¹ : Bicategory B\nC : Type u₂\ninst✝ : Bicategory C\nF G H I : OplaxFunctor B C\nη : F ⟶ G\nθ : G ⟶ H\nι : H ⟶ I\n⊢ ∀ {a b : B} (f : a ⟶ b),\n    (↑F.toPrelaxFunctor).map f ◁ ((fun a => α_ (η.app a) (θ.app a) (ι.app a)) b).hom ≫ naturality (η ≫ θ ≫ ι) f =\n      naturality ((η ≫ θ) ≫ ι) f ≫ ((fun a => α_ (η.app a) (θ.app a) (ι.app a)) a).hom ▷ (↑I.toPrelaxFunctor).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nB : Type u₁\ninst✝¹ : Bicategory B\nC : Type u₂\ninst✝ : Bicategory C\nF G H I : OplaxFunctor B C\nη : F ⟶ G\n⊢ ∀ {a b : B} (f : a ⟶ b),\n    (↑F.toPrelaxFunctor).map f ◁ ((fun a => λ_ (η.app a)) b).hom ≫ naturality η f =\n      naturality (𝟙 F ≫ η) f ≫ ((fun a => λ_ (η.app a)) a).hom ▷ (↑G.toPrelaxFunctor).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nB : Type u₁\ninst✝¹ : Bicategory B\nC : Type u₂\ninst✝ : Bicategory C\nF G H I : OplaxFunctor B C\nη : F ⟶ G\n⊢ ∀ {a b : B} (f : a ⟶ b),\n    (↑F.toPrelaxFunctor).map f ◁ ((fun a => ρ_ (η.app a)) b).hom ≫ naturality η f =\n      naturality (η ≫ 𝟙 G) f ≫ ((fun a => ρ_ (η.app a)) a).hom ▷ (↑G.toPrelaxFunctor).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nB : Type u₁\ninst✝¹ : Bicategory B\nC : Type u₂\ninst✝ : Bicategory C\nF G H I a b c : OplaxFunctor B C\nf g : a ⟶ b\nh i : b ⟶ c\nη : f ⟶ g\nθ : h ⟶ i\n⊢ (fun {F G H} η x x_1 Γ => OplaxNatTrans.whiskerLeft η Γ) f h i θ ≫\n      (fun {F G H} x x_1 Γ η => OplaxNatTrans.whiskerRight Γ η) f g η i =\n    (fun {F G H} x x_1 Γ η => OplaxNatTrans.whiskerRight Γ η) f g η h ≫\n      (fun {F G H} η x x_1 Γ => OplaxNatTrans.whiskerLeft η Γ) g h i θ\n[PROOFSTEP]\next\n[GOAL]\ncase w\nB : Type u₁\ninst✝¹ : Bicategory B\nC : Type u₂\ninst✝ : Bicategory C\nF G H I a b c : OplaxFunctor B C\nf g : a ⟶ b\nh i : b ⟶ c\nη : f ⟶ g\nθ : h ⟶ i\nb✝ : B\n⊢ ((fun {F G H} η x x_1 Γ => OplaxNatTrans.whiskerLeft η Γ) f h i θ ≫\n          (fun {F G H} x x_1 Γ η => OplaxNatTrans.whiskerRight Γ η) f g η i).app\n      b✝ =\n    ((fun {F G H} x x_1 Γ η => OplaxNatTrans.whiskerRight Γ η) f g η h ≫\n          (fun {F G H} η x x_1 Γ => OplaxNatTrans.whiskerLeft η Γ) g h i θ).app\n      b✝\n[PROOFSTEP]\nexact whisker_exchange _ _\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Bicategory.FunctorBicategory", "llama_tokens": 3260, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7025300573952052, "lm_q2_score": 0.5, "lm_q1q2_score": 0.3512650286976026}}
{"text": "[GOAL]\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : (i : ι) → Module R (M₁' i)\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)\ninst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)\ninst✝³ : (i : ι) → TopologicalSpace (M₁' i)\ninst✝² : TopologicalSpace M₂\ninst✝¹ : TopologicalSpace M₃\ninst✝ : TopologicalSpace M₄\nf✝ f' : ContinuousMultilinearMap R M₁ M₂\nf : MultilinearMap R M₁ M₂\nhf : Continuous f.toFun\ng : MultilinearMap R M₁ M₂\nhg : Continuous g.toFun\nh : { toMultilinearMap := f, cont := hf }.toMultilinearMap = { toMultilinearMap := g, cont := hg }.toMultilinearMap\n⊢ { toMultilinearMap := f, cont := hf } = { toMultilinearMap := g, cont := hg }\n[PROOFSTEP]\nsubst h\n[GOAL]\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : (i : ι) → Module R (M₁' i)\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)\ninst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)\ninst✝³ : (i : ι) → TopologicalSpace (M₁' i)\ninst✝² : TopologicalSpace M₂\ninst✝¹ : TopologicalSpace M₃\ninst✝ : TopologicalSpace M₄\nf✝ f' : ContinuousMultilinearMap R M₁ M₂\nf : MultilinearMap R M₁ M₂\nhf : Continuous f.toFun\nhg : Continuous { toMultilinearMap := f, cont := hf }.toMultilinearMap.toFun\n⊢ { toMultilinearMap := f, cont := hf } =\n    { toMultilinearMap := { toMultilinearMap := f, cont := hf }.toMultilinearMap, cont := hg }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : (i : ι) → Module R (M₁' i)\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)\ninst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)\ninst✝³ : (i : ι) → TopologicalSpace (M₁' i)\ninst✝² : TopologicalSpace M₂\ninst✝¹ : TopologicalSpace M₃\ninst✝ : TopologicalSpace M₄\nf✝ f'✝ f f' : ContinuousMultilinearMap R M₁ M₂\n⊢ f = f' ↔ ∀ (x : (i : ι) → M₁ i), ↑f x = ↑f' x\n[PROOFSTEP]\nrw [← toMultilinearMap_injective.eq_iff, MultilinearMap.ext_iff]\n[GOAL]\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : (i : ι) → Module R (M₁' i)\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)\ninst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)\ninst✝³ : (i : ι) → TopologicalSpace (M₁' i)\ninst✝² : TopologicalSpace M₂\ninst✝¹ : TopologicalSpace M₃\ninst✝ : TopologicalSpace M₄\nf✝ f'✝ f f' : ContinuousMultilinearMap R M₁ M₂\n⊢ (∀ (x : (i : ι) → M₁ i), ↑f.toMultilinearMap x = ↑f'.toMultilinearMap x) ↔ ∀ (x : (i : ι) → M₁ i), ↑f x = ↑f' x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : (i : ι) → Module R (M₁' i)\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)\ninst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)\ninst✝³ : (i : ι) → TopologicalSpace (M₁' i)\ninst✝² : TopologicalSpace M₂\ninst✝¹ : TopologicalSpace M₃\ninst✝ : TopologicalSpace M₄\nf✝ f' : ContinuousMultilinearMap R M₁ M₂\ng : M₂ →L[R] M₃\nf : ContinuousMultilinearMap R M₁ M₂\n⊢ ↑(ContinuousLinearMap.compContinuousMultilinearMap g f) = ↑g ∘ ↑f\n[PROOFSTEP]\next m\n[GOAL]\ncase h\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : (i : ι) → Module R (M₁' i)\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)\ninst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)\ninst✝³ : (i : ι) → TopologicalSpace (M₁' i)\ninst✝² : TopologicalSpace M₂\ninst✝¹ : TopologicalSpace M₃\ninst✝ : TopologicalSpace M₄\nf✝ f' : ContinuousMultilinearMap R M₁ M₂\ng : M₂ →L[R] M₃\nf : ContinuousMultilinearMap R M₁ M₂\nm : (i : ι) → M₁ i\n⊢ ↑(ContinuousLinearMap.compContinuousMultilinearMap g f) m = (↑g ∘ ↑f) m\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\ninst✝²¹ : Semiring R\ninst✝²⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁸ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : AddCommMonoid M₃\ninst✝¹⁵ : AddCommMonoid M₄\ninst✝¹⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹³ : (i : ι) → Module R (M₁ i)\ninst✝¹² : (i : ι) → Module R (M₁' i)\ninst✝¹¹ : Module R M₂\ninst✝¹⁰ : Module R M₃\ninst✝⁹ : Module R M₄\ninst✝⁸ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)\ninst✝⁷ : (i : ι) → TopologicalSpace (M₁ i)\ninst✝⁶ : (i : ι) → TopologicalSpace (M₁' i)\ninst✝⁵ : TopologicalSpace M₂\ninst✝⁴ : TopologicalSpace M₃\ninst✝³ : TopologicalSpace M₄\nf✝ f' : ContinuousMultilinearMap R M₁ M₂\nι' : Type u_1\nM' : ι' → Type u_2\ninst✝² : (i : ι') → AddCommMonoid (M' i)\ninst✝¹ : (i : ι') → TopologicalSpace (M' i)\ninst✝ : (i : ι') → Module R (M' i)\nf : (i : ι') → ContinuousMultilinearMap R M₁ (M' i)\n⊢ (fun f i => ContinuousLinearMap.compContinuousMultilinearMap (ContinuousLinearMap.proj i) f) (pi f) = f\n[PROOFSTEP]\next\n[GOAL]\ncase h.H\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\ninst✝²¹ : Semiring R\ninst✝²⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁸ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : AddCommMonoid M₃\ninst✝¹⁵ : AddCommMonoid M₄\ninst✝¹⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹³ : (i : ι) → Module R (M₁ i)\ninst✝¹² : (i : ι) → Module R (M₁' i)\ninst✝¹¹ : Module R M₂\ninst✝¹⁰ : Module R M₃\ninst✝⁹ : Module R M₄\ninst✝⁸ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)\ninst✝⁷ : (i : ι) → TopologicalSpace (M₁ i)\ninst✝⁶ : (i : ι) → TopologicalSpace (M₁' i)\ninst✝⁵ : TopologicalSpace M₂\ninst✝⁴ : TopologicalSpace M₃\ninst✝³ : TopologicalSpace M₄\nf✝ f' : ContinuousMultilinearMap R M₁ M₂\nι' : Type u_1\nM' : ι' → Type u_2\ninst✝² : (i : ι') → AddCommMonoid (M' i)\ninst✝¹ : (i : ι') → TopologicalSpace (M' i)\ninst✝ : (i : ι') → Module R (M' i)\nf : (i : ι') → ContinuousMultilinearMap R M₁ (M' i)\nx✝¹ : ι'\nx✝ : (i : ι) → M₁ i\n⊢ ↑((fun f i => ContinuousLinearMap.compContinuousMultilinearMap (ContinuousLinearMap.proj i) f) (pi f) x✝¹) x✝ =\n    ↑(f x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\ninst✝²¹ : Semiring R\ninst✝²⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁸ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : AddCommMonoid M₃\ninst✝¹⁵ : AddCommMonoid M₄\ninst✝¹⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹³ : (i : ι) → Module R (M₁ i)\ninst✝¹² : (i : ι) → Module R (M₁' i)\ninst✝¹¹ : Module R M₂\ninst✝¹⁰ : Module R M₃\ninst✝⁹ : Module R M₄\ninst✝⁸ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)\ninst✝⁷ : (i : ι) → TopologicalSpace (M₁ i)\ninst✝⁶ : (i : ι) → TopologicalSpace (M₁' i)\ninst✝⁵ : TopologicalSpace M₂\ninst✝⁴ : TopologicalSpace M₃\ninst✝³ : TopologicalSpace M₄\nf✝ f' : ContinuousMultilinearMap R M₁ M₂\nι' : Type u_1\nM' : ι' → Type u_2\ninst✝² : (i : ι') → AddCommMonoid (M' i)\ninst✝¹ : (i : ι') → TopologicalSpace (M' i)\ninst✝ : (i : ι') → Module R (M' i)\nf : ContinuousMultilinearMap R M₁ ((i : ι') → M' i)\n⊢ pi ((fun f i => ContinuousLinearMap.compContinuousMultilinearMap (ContinuousLinearMap.proj i) f) f) = f\n[PROOFSTEP]\next\n[GOAL]\ncase H.h\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\ninst✝²¹ : Semiring R\ninst✝²⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁹ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁸ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝¹⁷ : AddCommMonoid M₂\ninst✝¹⁶ : AddCommMonoid M₃\ninst✝¹⁵ : AddCommMonoid M₄\ninst✝¹⁴ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹³ : (i : ι) → Module R (M₁ i)\ninst✝¹² : (i : ι) → Module R (M₁' i)\ninst✝¹¹ : Module R M₂\ninst✝¹⁰ : Module R M₃\ninst✝⁹ : Module R M₄\ninst✝⁸ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)\ninst✝⁷ : (i : ι) → TopologicalSpace (M₁ i)\ninst✝⁶ : (i : ι) → TopologicalSpace (M₁' i)\ninst✝⁵ : TopologicalSpace M₂\ninst✝⁴ : TopologicalSpace M₃\ninst✝³ : TopologicalSpace M₄\nf✝ f' : ContinuousMultilinearMap R M₁ M₂\nι' : Type u_1\nM' : ι' → Type u_2\ninst✝² : (i : ι') → AddCommMonoid (M' i)\ninst✝¹ : (i : ι') → TopologicalSpace (M' i)\ninst✝ : (i : ι') → Module R (M' i)\nf : ContinuousMultilinearMap R M₁ ((i : ι') → M' i)\nx✝¹ : (i : ι) → M₁ i\nx✝ : ι'\n⊢ ↑(pi ((fun f i => ContinuousLinearMap.compContinuousMultilinearMap (ContinuousLinearMap.proj i) f) f)) x✝¹ x✝ =\n    ↑f x✝¹ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : (i : ι) → Module R (M₁' i)\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)\ninst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)\ninst✝³ : (i : ι) → TopologicalSpace (M₁' i)\ninst✝² : TopologicalSpace M₂\ninst✝¹ : TopologicalSpace M₃\ninst✝ : TopologicalSpace M₄\nf f' : ContinuousMultilinearMap R M₁ M₂\nι' : Type u_1\ne : ι ≃ ι'\nx✝¹ : ContinuousMultilinearMap R (fun x => M₂) M₃\nx✝ : ι → M₂\n⊢ ↑(domDomCongr e.symm (domDomCongr e x✝¹)) x✝ = ↑x✝¹ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)\ninst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)\ninst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)\ninst✝¹⁰ : (i : ι) → Module R (M₁ i)\ninst✝⁹ : (i : ι) → Module R (M₁' i)\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)\ninst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)\ninst✝³ : (i : ι) → TopologicalSpace (M₁' i)\ninst✝² : TopologicalSpace M₂\ninst✝¹ : TopologicalSpace M₃\ninst✝ : TopologicalSpace M₄\nf f' : ContinuousMultilinearMap R M₁ M₂\nι' : Type u_1\ne : ι ≃ ι'\nx✝¹ : ContinuousMultilinearMap R (fun x => M₂) M₃\nx✝ : ι' → M₂\n⊢ ↑(domDomCongr e (domDomCongr e.symm x✝¹)) x✝ = ↑x✝¹ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\nA : Type u_1\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : TopologicalSpace A\ninst✝ : ContinuousMul A\n⊢ Continuous (MultilinearMap.mkPiAlgebraFin R n A).toFun\n[PROOFSTEP]\nchange Continuous fun m => (List.ofFn m).prod\n[GOAL]\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\nA : Type u_1\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : TopologicalSpace A\ninst✝ : ContinuousMul A\n⊢ Continuous fun m => List.prod (List.ofFn m)\n[PROOFSTEP]\nsimp_rw [List.ofFn_eq_map]\n[GOAL]\nR : Type u\nι : Type v\nn : ℕ\nM : Fin (Nat.succ n) → Type w\nM₁ : ι → Type w₁\nM₁' : ι → Type w₁'\nM₂ : Type w₂\nM₃ : Type w₃\nM₄ : Type w₄\nA : Type u_1\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : TopologicalSpace A\ninst✝ : ContinuousMul A\n⊢ Continuous fun m => List.prod (List.map m (List.finRange n))\n[PROOFSTEP]\nexact continuous_list_prod _ fun i _ => continuous_apply _\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Module.Multilinear", "llama_tokens": 7474, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7310585786300048, "lm_q2_score": 0.480478678047907, "lm_q1q2_score": 0.3512580594357266}}
{"text": "[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns : Set σ\n⊢ supported R s = AlgHom.range (rename Subtype.val)\n[PROOFSTEP]\nrw [supported, Set.image_eq_range, adjoin_range_eq_range_aeval, rename]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns : Set σ\n⊢ AlgHom.range (aeval fun x => X ↑x) = AlgHom.range (aeval (X ∘ Subtype.val))\n[PROOFSTEP]\ncongr\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns : Set σ\nx : R\n⊢ ↑(AlgEquiv.symm (supportedEquivMvPolynomial s)) (↑C x) = ↑(algebraMap R { x // x ∈ supported R s }) x\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns : Set σ\nx : R\n⊢ ↑(↑(AlgEquiv.symm (supportedEquivMvPolynomial s)) (↑C x)) = ↑(↑(algebraMap R { x // x ∈ supported R s }) x)\n[PROOFSTEP]\nsimp [supportedEquivMvPolynomial, MvPolynomial.algebraMap_eq]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns : Set σ\ni : ↑s\n⊢ ↑(↑(AlgEquiv.symm (supportedEquivMvPolynomial s)) (X i)) = X ↑i\n[PROOFSTEP]\nsimp [supportedEquivMvPolynomial]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\n⊢ p ∈ supported R s ↔ ↑(vars p) ⊆ s\n[PROOFSTEP]\nclassical\nrw [supported_eq_range_rename, AlgHom.mem_range]\nconstructor\n· rintro ⟨p, rfl⟩\n  refine' _root_.trans (Finset.coe_subset.2 (vars_rename _ _)) _\n  simp\n· intro hs\n  exact exists_rename_eq_of_vars_subset_range p ((↑) : s → σ) Subtype.val_injective (by simpa)\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\n⊢ p ∈ supported R s ↔ ↑(vars p) ⊆ s\n[PROOFSTEP]\nrw [supported_eq_range_rename, AlgHom.mem_range]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\n⊢ (∃ x, ↑(rename Subtype.val) x = p) ↔ ↑(vars p) ⊆ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\n⊢ (∃ x, ↑(rename Subtype.val) x = p) → ↑(vars p) ⊆ s\n[PROOFSTEP]\nrintro ⟨p, rfl⟩\n[GOAL]\ncase mp.intro\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\nq : MvPolynomial σ R\ns t : Set σ\np : MvPolynomial { x // x ∈ s } R\n⊢ ↑(vars (↑(rename Subtype.val) p)) ⊆ s\n[PROOFSTEP]\nrefine' _root_.trans (Finset.coe_subset.2 (vars_rename _ _)) _\n[GOAL]\ncase mp.intro\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\nq : MvPolynomial σ R\ns t : Set σ\np : MvPolynomial { x // x ∈ s } R\n⊢ ↑(Finset.image Subtype.val (vars p)) ⊆ s\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\n⊢ ↑(vars p) ⊆ s → ∃ x, ↑(rename Subtype.val) x = p\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase mpr\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\nhs : ↑(vars p) ⊆ s\n⊢ ∃ x, ↑(rename Subtype.val) x = p\n[PROOFSTEP]\nexact exists_rename_eq_of_vars_subset_range p ((↑) : s → σ) Subtype.val_injective (by simpa)\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\nhs : ↑(vars p) ⊆ s\n⊢ ↑(vars p) ⊆ Set.range Subtype.val\n[PROOFSTEP]\nsimpa\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np✝ q : MvPolynomial σ R\ns t : Set σ\np : MvPolynomial σ R\n⊢ p ∈ supported R ↑(vars p)\n[PROOFSTEP]\nrw [mem_supported]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\n⊢ supported R Set.univ = ⊤\n[PROOFSTEP]\nsimp [Algebra.eq_top_iff, mem_supported]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\n⊢ supported R ∅ = ⊥\n[PROOFSTEP]\nsimp [supported_eq_adjoin_X]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝¹ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\ninst✝ : Nontrivial R\ni : σ\n⊢ X i ∈ supported R s ↔ i ∈ s\n[PROOFSTEP]\nsimp [mem_supported]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝¹ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\ninst✝ : Nontrivial R\n⊢ supported R s ≤ supported R t ↔ s ⊆ t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝¹ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\ninst✝ : Nontrivial R\n⊢ supported R s ≤ supported R t → s ⊆ t\n[PROOFSTEP]\nintro h i\n[GOAL]\ncase mp\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝¹ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\ninst✝ : Nontrivial R\nh : supported R s ≤ supported R t\ni : σ\n⊢ i ∈ s → i ∈ t\n[PROOFSTEP]\nsimpa using @h (X i)\n[GOAL]\ncase mpr\nσ : Type u_1\nτ : Type u_2\nR : Type u\nS : Type v\nr : R\ne : ℕ\nn m : σ\ninst✝¹ : CommSemiring R\np q : MvPolynomial σ R\ns t : Set σ\ninst✝ : Nontrivial R\n⊢ s ⊆ t → supported R s ≤ supported R t\n[PROOFSTEP]\nexact supported_mono\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR✝ : Type u\nS : Type v\nr : R✝\ne : ℕ\nn m : σ\ninst✝¹ : CommSemiring R✝\np q : MvPolynomial σ R✝\ns t : Set σ\nR : Type u_3\ninst✝ : CommRing R\nF : MvPolynomial σ ℤ\nhF : ↑(vars F) ⊆ s\n⊢ ∃ f, ∀ (x : σ → R), f (x ∘ Subtype.val) = ↑(aeval x) F\n[PROOFSTEP]\nrw [← mem_supported, supported_eq_range_rename, AlgHom.mem_range] at hF \n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR✝ : Type u\nS : Type v\nr : R✝\ne : ℕ\nn m : σ\ninst✝¹ : CommSemiring R✝\np q : MvPolynomial σ R✝\ns t : Set σ\nR : Type u_3\ninst✝ : CommRing R\nF : MvPolynomial σ ℤ\nhF : ∃ x, ↑(rename Subtype.val) x = F\n⊢ ∃ f, ∀ (x : σ → R), f (x ∘ Subtype.val) = ↑(aeval x) F\n[PROOFSTEP]\ncases' hF with F' hF'\n[GOAL]\ncase intro\nσ : Type u_1\nτ : Type u_2\nR✝ : Type u\nS : Type v\nr : R✝\ne : ℕ\nn m : σ\ninst✝¹ : CommSemiring R✝\np q : MvPolynomial σ R✝\ns t : Set σ\nR : Type u_3\ninst✝ : CommRing R\nF : MvPolynomial σ ℤ\nF' : MvPolynomial { x // x ∈ s } ℤ\nhF' : ↑(rename Subtype.val) F' = F\n⊢ ∃ f, ∀ (x : σ → R), f (x ∘ Subtype.val) = ↑(aeval x) F\n[PROOFSTEP]\nuse fun z ↦ aeval z F'\n[GOAL]\ncase h\nσ : Type u_1\nτ : Type u_2\nR✝ : Type u\nS : Type v\nr : R✝\ne : ℕ\nn m : σ\ninst✝¹ : CommSemiring R✝\np q : MvPolynomial σ R✝\ns t : Set σ\nR : Type u_3\ninst✝ : CommRing R\nF : MvPolynomial σ ℤ\nF' : MvPolynomial { x // x ∈ s } ℤ\nhF' : ↑(rename Subtype.val) F' = F\n⊢ ∀ (x : σ → R), ↑(aeval (x ∘ Subtype.val)) F' = ↑(aeval x) F\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nσ : Type u_1\nτ : Type u_2\nR✝ : Type u\nS : Type v\nr : R✝\ne : ℕ\nn m : σ\ninst✝¹ : CommSemiring R✝\np q : MvPolynomial σ R✝\ns t : Set σ\nR : Type u_3\ninst✝ : CommRing R\nF : MvPolynomial σ ℤ\nF' : MvPolynomial { x // x ∈ s } ℤ\nhF' : ↑(rename Subtype.val) F' = F\nx : σ → R\n⊢ ↑(aeval (x ∘ Subtype.val)) F' = ↑(aeval x) F\n[PROOFSTEP]\nsimp only [← hF', aeval_rename]\n", "meta": {"mathlib_filename": "Mathlib.Data.MvPolynomial.Supported", "llama_tokens": 3756, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6334102636778401, "lm_q2_score": 0.5544704649604273, "lm_q1q2_score": 0.3512072834121589}}
{"text": "[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R M₁\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nQ₃ : QuadraticForm R M₃\nf g : IsometryEquiv Q₁ Q₂\n⊢ (fun f => ↑f.toLinearEquiv) f = (fun f => ↑f.toLinearEquiv) g →\n    (fun f => ↑(LinearEquiv.symm f.toLinearEquiv)) f = (fun f => ↑(LinearEquiv.symm f.toLinearEquiv)) g → f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R M₁\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nQ₃ : QuadraticForm R M₃\ng : IsometryEquiv Q₁ Q₂\ntoLinearEquiv✝ : M₁ ≃ₗ[R] M₂\nmap_app'✝ : ∀ (m : M₁), ↑Q₂ (AddHom.toFun toLinearEquiv✝.toAddHom m) = ↑Q₁ m\n⊢ (fun f => ↑f.toLinearEquiv) { toLinearEquiv := toLinearEquiv✝, map_app' := map_app'✝ } =\n      (fun f => ↑f.toLinearEquiv) g →\n    (fun f => ↑(LinearEquiv.symm f.toLinearEquiv)) { toLinearEquiv := toLinearEquiv✝, map_app' := map_app'✝ } =\n        (fun f => ↑(LinearEquiv.symm f.toLinearEquiv)) g →\n      { toLinearEquiv := toLinearEquiv✝, map_app' := map_app'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R M₁\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nQ₃ : QuadraticForm R M₃\ntoLinearEquiv✝¹ : M₁ ≃ₗ[R] M₂\nmap_app'✝¹ : ∀ (m : M₁), ↑Q₂ (AddHom.toFun toLinearEquiv✝¹.toAddHom m) = ↑Q₁ m\ntoLinearEquiv✝ : M₁ ≃ₗ[R] M₂\nmap_app'✝ : ∀ (m : M₁), ↑Q₂ (AddHom.toFun toLinearEquiv✝.toAddHom m) = ↑Q₁ m\n⊢ (fun f => ↑f.toLinearEquiv) { toLinearEquiv := toLinearEquiv✝¹, map_app' := map_app'✝¹ } =\n      (fun f => ↑f.toLinearEquiv) { toLinearEquiv := toLinearEquiv✝, map_app' := map_app'✝ } →\n    (fun f => ↑(LinearEquiv.symm f.toLinearEquiv)) { toLinearEquiv := toLinearEquiv✝¹, map_app' := map_app'✝¹ } =\n        (fun f => ↑(LinearEquiv.symm f.toLinearEquiv)) { toLinearEquiv := toLinearEquiv✝, map_app' := map_app'✝ } →\n      { toLinearEquiv := toLinearEquiv✝¹, map_app' := map_app'✝¹ } =\n        { toLinearEquiv := toLinearEquiv✝, map_app' := map_app'✝ }\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R M₁\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nQ₃ : QuadraticForm R M₃\nf : IsometryEquiv Q₁ Q₂\nsrc✝ : M₂ ≃ₗ[R] M₁ := LinearEquiv.symm f.toLinearEquiv\n⊢ ∀ (m : M₂),\n    ↑Q₁\n        (AddHom.toFun\n          (↑{ toLinearMap := ↑src✝, invFun := src✝.invFun,\n                left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n                right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }).toAddHom\n          m) =\n      ↑Q₂ m\n[PROOFSTEP]\nintro m\n[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R M₁\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nQ₃ : QuadraticForm R M₃\nf : IsometryEquiv Q₁ Q₂\nsrc✝ : M₂ ≃ₗ[R] M₁ := LinearEquiv.symm f.toLinearEquiv\nm : M₂\n⊢ ↑Q₁\n      (AddHom.toFun\n        (↑{ toLinearMap := ↑src✝, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n              right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }).toAddHom\n        m) =\n    ↑Q₂ m\n[PROOFSTEP]\nrw [← f.map_app]\n[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R M₁\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nQ₃ : QuadraticForm R M₃\nf : IsometryEquiv Q₁ Q₂\nsrc✝ : M₂ ≃ₗ[R] M₁ := LinearEquiv.symm f.toLinearEquiv\nm : M₂\n⊢ ↑Q₂\n      (↑f\n        (AddHom.toFun\n          (↑{ toLinearMap := ↑src✝, invFun := src✝.invFun,\n                left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n                right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }).toAddHom\n          m)) =\n    ↑Q₂ m\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_6.h\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R M₁\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nQ₃ : QuadraticForm R M₃\nf : IsometryEquiv Q₁ Q₂\nsrc✝ : M₂ ≃ₗ[R] M₁ := LinearEquiv.symm f.toLinearEquiv\nm : M₂\n⊢ ↑f\n      (AddHom.toFun\n        (↑{ toLinearMap := ↑src✝, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n              right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }).toAddHom\n        m) =\n    m\n[PROOFSTEP]\nexact f.toLinearEquiv.apply_symm_apply m\n[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R M₁\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nQ₃ : QuadraticForm R M₃\nf : IsometryEquiv Q₁ Q₂\ng : IsometryEquiv Q₂ Q₃\nsrc✝ : M₁ ≃ₗ[R] M₃ := LinearEquiv.trans f.toLinearEquiv g.toLinearEquiv\n⊢ ∀ (m : M₁),\n    ↑Q₃\n        (AddHom.toFun\n          (↑{ toLinearMap := ↑src✝, invFun := src✝.invFun,\n                left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n                right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }).toAddHom\n          m) =\n      ↑Q₁ m\n[PROOFSTEP]\nintro m\n[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R M₁\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nQ₃ : QuadraticForm R M₃\nf : IsometryEquiv Q₁ Q₂\ng : IsometryEquiv Q₂ Q₃\nsrc✝ : M₁ ≃ₗ[R] M₃ := LinearEquiv.trans f.toLinearEquiv g.toLinearEquiv\nm : M₁\n⊢ ↑Q₃\n      (AddHom.toFun\n        (↑{ toLinearMap := ↑src✝, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n              right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }).toAddHom\n        m) =\n    ↑Q₁ m\n[PROOFSTEP]\nrw [← f.map_app, ← g.map_app]\n[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R M₁\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nQ₁ : QuadraticForm R M₁\nQ₂ : QuadraticForm R M₂\nQ₃ : QuadraticForm R M₃\nf : IsometryEquiv Q₁ Q₂\ng : IsometryEquiv Q₂ Q₃\nsrc✝ : M₁ ≃ₗ[R] M₃ := LinearEquiv.trans f.toLinearEquiv g.toLinearEquiv\nm : M₁\n⊢ ↑Q₃\n      (AddHom.toFun\n        (↑{ toLinearMap := ↑src✝, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n              right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }).toAddHom\n        m) =\n    ↑Q₃ (↑g (↑f m))\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Fintype ι\nv : Basis ι R M\nQ : QuadraticForm R M\nf : M₁ ≃ₗ[R] M\nsrc✝ : M ≃ₗ[R] M₁ := LinearEquiv.symm f\n⊢ ∀ (m : M),\n    ↑(comp Q ↑f)\n        (AddHom.toFun\n          (↑{ toLinearMap := ↑src✝, invFun := src✝.invFun,\n                left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n                right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }).toAddHom\n          m) =\n      ↑Q m\n[PROOFSTEP]\nintro\n[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝⁹ : Semiring R\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Fintype ι\nv : Basis ι R M\nQ : QuadraticForm R M\nf : M₁ ≃ₗ[R] M\nsrc✝ : M ≃ₗ[R] M₁ := LinearEquiv.symm f\nm✝ : M\n⊢ ↑(comp Q ↑f)\n      (AddHom.toFun\n        (↑{ toLinearMap := ↑src✝, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n              right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }).toAddHom\n        m✝) =\n    ↑Q m✝\n[PROOFSTEP]\nsimp only [comp_apply, LinearEquiv.coe_coe, LinearEquiv.toFun_eq_coe, LinearEquiv.apply_symm_apply, f.apply_symm_apply]\n[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝¹³ : Semiring R\ninst✝¹² : AddCommMonoid M\ninst✝¹¹ : AddCommMonoid M₁\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Fintype ι\nv✝ : Basis ι R M\ninst✝³ : Field K\ninst✝² : Invertible 2\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nQ : QuadraticForm K V\nv : Basis (Fin (FiniteDimensional.finrank K V)) K V\nhv₁ : BilinForm.iIsOrtho (↑associated Q) ↑v\n⊢ IsometryEquiv Q (weightedSumSquares K fun i => ↑Q (↑v i))\n[PROOFSTEP]\nlet iso := Q.isometryEquivBasisRepr v\n[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝¹³ : Semiring R\ninst✝¹² : AddCommMonoid M\ninst✝¹¹ : AddCommMonoid M₁\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Fintype ι\nv✝ : Basis ι R M\ninst✝³ : Field K\ninst✝² : Invertible 2\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nQ : QuadraticForm K V\nv : Basis (Fin (FiniteDimensional.finrank K V)) K V\nhv₁ : BilinForm.iIsOrtho (↑associated Q) ↑v\niso : IsometryEquiv Q (basisRepr Q v) := isometryEquivBasisRepr Q v\n⊢ IsometryEquiv Q (weightedSumSquares K fun i => ↑Q (↑v i))\n[PROOFSTEP]\nrefine' ⟨iso, fun m => _⟩\n[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝¹³ : Semiring R\ninst✝¹² : AddCommMonoid M\ninst✝¹¹ : AddCommMonoid M₁\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Fintype ι\nv✝ : Basis ι R M\ninst✝³ : Field K\ninst✝² : Invertible 2\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nQ : QuadraticForm K V\nv : Basis (Fin (FiniteDimensional.finrank K V)) K V\nhv₁ : BilinForm.iIsOrtho (↑associated Q) ↑v\niso : IsometryEquiv Q (basisRepr Q v) := isometryEquivBasisRepr Q v\nm : V\n⊢ ↑(weightedSumSquares K fun i => ↑Q (↑v i)) (AddHom.toFun iso.toAddHom m) = ↑Q m\n[PROOFSTEP]\nconvert iso.map_app m\n[GOAL]\ncase h.e'_2.h.e'_5\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝¹³ : Semiring R\ninst✝¹² : AddCommMonoid M\ninst✝¹¹ : AddCommMonoid M₁\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Fintype ι\nv✝ : Basis ι R M\ninst✝³ : Field K\ninst✝² : Invertible 2\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nQ : QuadraticForm K V\nv : Basis (Fin (FiniteDimensional.finrank K V)) K V\nhv₁ : BilinForm.iIsOrtho (↑associated Q) ↑v\niso : IsometryEquiv Q (basisRepr Q v) := isometryEquivBasisRepr Q v\nm : V\n⊢ (weightedSumSquares K fun i => ↑Q (↑v i)) = basisRepr Q v\n[PROOFSTEP]\nrw [basisRepr_eq_of_iIsOrtho _ _ hv₁]\n[GOAL]\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₁\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\ninst✝⁵ : Fintype ι\nv : Basis ι R M\ninst✝⁴ : Field K\ninst✝³ : Invertible 2\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nQ : QuadraticForm K V\nhQ : Nondegenerate (↑associated Q)\n⊢ ∃ w, Equivalent Q (weightedSumSquares K w)\n[PROOFSTEP]\nobtain ⟨v, hv₁⟩ := exists_orthogonal_basis (associated_isSymm K Q)\n[GOAL]\ncase intro\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₁\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\ninst✝⁵ : Fintype ι\nv✝ : Basis ι R M\ninst✝⁴ : Field K\ninst✝³ : Invertible 2\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nQ : QuadraticForm K V\nhQ : Nondegenerate (↑associated Q)\nv : Basis (Fin (FiniteDimensional.finrank K V)) K V\nhv₁ : iIsOrtho (↑(associatedHom K) Q) ↑v\n⊢ ∃ w, Equivalent Q (weightedSumSquares K w)\n[PROOFSTEP]\nhave hv₂ := hv₁.not_isOrtho_basis_self_of_nondegenerate hQ\n[GOAL]\ncase intro\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₁\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\ninst✝⁵ : Fintype ι\nv✝ : Basis ι R M\ninst✝⁴ : Field K\ninst✝³ : Invertible 2\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nQ : QuadraticForm K V\nhQ : Nondegenerate (↑associated Q)\nv : Basis (Fin (FiniteDimensional.finrank K V)) K V\nhv₁ : iIsOrtho (↑(associatedHom K) Q) ↑v\nhv₂ : ∀ (i : Fin (FiniteDimensional.finrank K V)), ¬IsOrtho (↑(associatedHom K) Q) (↑v i) (↑v i)\n⊢ ∃ w, Equivalent Q (weightedSumSquares K w)\n[PROOFSTEP]\nsimp_rw [IsOrtho, associated_eq_self_apply] at hv₂ \n[GOAL]\ncase intro\nι : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nV : Type u_8\ninst✝¹⁴ : Semiring R\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₁\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\ninst✝⁵ : Fintype ι\nv✝ : Basis ι R M\ninst✝⁴ : Field K\ninst✝³ : Invertible 2\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nQ : QuadraticForm K V\nhQ : Nondegenerate (↑associated Q)\nv : Basis (Fin (FiniteDimensional.finrank K V)) K V\nhv₁ : iIsOrtho (↑(associatedHom K) Q) ↑v\nhv₂ : ∀ (i : Fin (FiniteDimensional.finrank K V)), ¬↑Q (↑v i) = 0\n⊢ ∃ w, Equivalent Q (weightedSumSquares K w)\n[PROOFSTEP]\nexact ⟨fun i => Units.mk0 _ (hv₂ i), ⟨Q.isometryEquivWeightedSumSquares v hv₁⟩⟩\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv", "llama_tokens": 7896, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7248702761768248, "lm_q2_score": 0.48438008427698437, "lm_q1q2_score": 0.3511127254644113}}
{"text": "[GOAL]\nR : Type u\ninst✝² : Ring R\nP : Type (max u v)\ninst✝¹ : AddCommGroup P\ninst✝ : Module R P\n⊢ Module.Projective R P ↔ Projective (of R P)\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝² : Ring R\nP : Type (max u v)\ninst✝¹ : AddCommGroup P\ninst✝ : Module R P\nh : Module.Projective R P\n⊢ Projective (of R P)\n[PROOFSTEP]\nletI : Module.Projective R (ModuleCat.of R P) := h\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝² : Ring R\nP : Type (max u v)\ninst✝¹ : AddCommGroup P\ninst✝ : Module R P\nh : Module.Projective R P\nthis : Module.Projective R ↑(of R P) := h\n⊢ Projective (of R P)\n[PROOFSTEP]\nexact ⟨fun E X epi => Module.projective_lifting_property _ _ ((ModuleCat.epi_iff_surjective _).mp epi)⟩\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝² : Ring R\nP : Type (max u v)\ninst✝¹ : AddCommGroup P\ninst✝ : Module R P\nh : Projective (of R P)\n⊢ Module.Projective R P\n[PROOFSTEP]\nrefine' Module.Projective.of_lifting_property.{u, v} _\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝² : Ring R\nP : Type (max u v)\ninst✝¹ : AddCommGroup P\ninst✝ : Module R P\nh : Projective (of R P)\n⊢ ∀ {M : Type (max v u)} {N : Type (max u v)} [inst : AddCommGroup M] [inst_1 : AddCommGroup N] [inst_2 : Module R M]\n    [inst_3 : Module R N] (f : M →ₗ[R] N) (g : P →ₗ[R] N), Function.Surjective ↑f → ∃ h, comp f h = g\n[PROOFSTEP]\nintro E X mE mX sE sX f g s\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝² : Ring R\nP : Type (max u v)\ninst✝¹ : AddCommGroup P\ninst✝ : Module R P\nh : Projective (of R P)\nE : Type (max v u)\nX : Type (max u v)\nmE : AddCommGroup E\nmX : AddCommGroup X\nsE : Module R E\nsX : Module R X\nf : E →ₗ[R] X\ng : P →ₗ[R] X\ns : Function.Surjective ↑f\n⊢ ∃ h, comp f h = g\n[PROOFSTEP]\nhaveI : Epi (↟f) := (ModuleCat.epi_iff_surjective (↟f)).mpr s\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝² : Ring R\nP : Type (max u v)\ninst✝¹ : AddCommGroup P\ninst✝ : Module R P\nh : Projective (of R P)\nE : Type (max v u)\nX : Type (max u v)\nmE : AddCommGroup E\nmX : AddCommGroup X\nsE : Module R E\nsX : Module R X\nf : E →ₗ[R] X\ng : P →ₗ[R] X\ns : Function.Surjective ↑f\nthis : Epi (↟f)\n⊢ ∃ h, comp f h = g\n[PROOFSTEP]\nletI : Projective (ModuleCat.of R P) := h\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝² : Ring R\nP : Type (max u v)\ninst✝¹ : AddCommGroup P\ninst✝ : Module R P\nh : Projective (of R P)\nE : Type (max v u)\nX : Type (max u v)\nmE : AddCommGroup E\nmX : AddCommGroup X\nsE : Module R E\nsX : Module R X\nf : E →ₗ[R] X\ng : P →ₗ[R] X\ns : Function.Surjective ↑f\nthis✝ : Epi (↟f)\nthis : Projective (of R P) := h\n⊢ ∃ h, comp f h = g\n[PROOFSTEP]\nexact ⟨Projective.factorThru (↟g) (↟f), Projective.factorThru_comp (↟g) (↟f)⟩\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM✝ M : ModuleCat R\nm : ↑M\n⊢ ↑(↑(Basis.constr Finsupp.basisSingleOne ℕ) _root_.id) (Finsupp.single m 1) = m\n[PROOFSTEP]\ndsimp [Basis.constr]\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM✝ M : ModuleCat R\nm : ↑M\n⊢ ↑(comp (Finsupp.total (↑M) (↑M) R _root_.id) (comp (Finsupp.lmapDomain R R _root_.id) LinearMap.id))\n      (Finsupp.single m 1) =\n    m\n[PROOFSTEP]\nsimp only [Finsupp.lmapDomain_id, comp_id]\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM✝ M : ModuleCat R\nm : ↑M\n⊢ ↑(Finsupp.total (↑M) (↑M) R _root_.id) (Finsupp.single m 1) = m\n[PROOFSTEP]\nrw [Finsupp.total_single, one_smul]\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM✝ M : ModuleCat R\nm : ↑M\n⊢ _root_.id m = m\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.ModuleCat.Projective", "llama_tokens": 1577, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6513548646660543, "lm_q2_score": 0.5389832206876841, "lm_q1q2_score": 0.35106934276830054}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹⁰ : Ring 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : AddCommGroup F\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module 𝕜 F\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalSpace F\ninst✝³ : TopologicalAddGroup E\ninst✝² : TopologicalAddGroup F\ninst✝¹ : ContinuousConstSMul 𝕜 E\ninst✝ : ContinuousConstSMul 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ Continuous (partialSum p n)\n[PROOFSTEP]\nunfold partialSum\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝¹⁰ : Ring 𝕜\ninst✝⁹ : AddCommGroup E\ninst✝⁸ : AddCommGroup F\ninst✝⁷ : Module 𝕜 E\ninst✝⁶ : Module 𝕜 F\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalSpace F\ninst✝³ : TopologicalAddGroup E\ninst✝² : TopologicalAddGroup F\ninst✝¹ : ContinuousConstSMul 𝕜 E\ninst✝ : ContinuousConstSMul 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\nn : ℕ\n⊢ Continuous fun x => ∑ k in Finset.range n, ↑(p k) fun x_1 => x\n[PROOFSTEP]\ncontinuity\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr✝ C r : ℝ≥0\nh : ∀ (n : ℕ), ‖p n‖₊ * r ^ n ≤ C\nn : ℕ\n⊢ ‖p n‖ * ↑r ^ n ≤ ↑C\n[PROOFSTEP]\nexact_mod_cast h n\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nC : ℝ\nh : ∀ᶠ (n : ℕ) in atTop, ‖p n‖ * ↑r ^ n ≤ C\nn : ℕ\nhn : ‖p n‖ * ↑r ^ n ≤ C\n⊢ ‖‖p n‖ * ↑r ^ n‖ ≤ C * ‖1‖\n[PROOFSTEP]\nsimpa\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : Summable fun n => ‖p n‖ * ↑r ^ n\n⊢ Summable fun n => ‖p n‖₊ * r ^ n\n[PROOFSTEP]\nsimp only [← coe_nnnorm] at h \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : Summable fun n => ↑‖p n‖₊ * ↑r ^ n\n⊢ Summable fun n => ‖p n‖₊ * r ^ n\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\nh : ∀ᶠ (n : ℕ) in atTop, p n = 0\nr : ℝ≥0\nn : ℕ\nhn : p n = 0\n⊢ (fun _x => 0) n = (fun n => ‖p n‖ * ↑r ^ n) n\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nv : F\n⊢ ∀ (m : ℕ), constFormalMultilinearSeries 𝕜 E v (m + 1) = 0\n[PROOFSTEP]\nsimp [constFormalMultilinearSeries]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : ↑r < radius p\n⊢ ∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x\n[PROOFSTEP]\nhave := (TFAE_exists_lt_isLittleO_pow (fun n => ‖p n‖ * (r : ℝ) ^ n) 1).out 1 4\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : ↑r < radius p\nthis :\n  (∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x) ↔\n    ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n⊢ ∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x\n[PROOFSTEP]\nrw [this]\n  -- Porting note: was\n    -- rw [(TFAE_exists_lt_isLittleO_pow (fun n => ‖p n‖ * (r : ℝ) ^ n) 1).out 1 4]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : ↑r < radius p\nthis :\n  (∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x) ↔\n    ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n⊢ ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n[PROOFSTEP]\nsimp only [radius, lt_iSup_iff] at h \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nthis :\n  (∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x) ↔\n    ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nh : ∃ i i_1 i_2, ↑r < ↑i\n⊢ ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n[PROOFSTEP]\nrcases h with ⟨t, C, hC, rt⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nthis :\n  (∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x) ↔\n    ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nt : ℝ≥0\nC : ℝ\nhC : ∀ (n : ℕ), ‖p n‖ * ↑t ^ n ≤ C\nrt : ↑r < ↑t\n⊢ ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n[PROOFSTEP]\nrw [ENNReal.coe_lt_coe, ← NNReal.coe_lt_coe] at rt \n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nthis :\n  (∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x) ↔\n    ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nt : ℝ≥0\nC : ℝ\nhC : ∀ (n : ℕ), ‖p n‖ * ↑t ^ n ≤ C\nrt : ↑r < ↑t\n⊢ ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n[PROOFSTEP]\nhave : 0 < (t : ℝ) := r.coe_nonneg.trans_lt rt\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nthis✝ :\n  (∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x) ↔\n    ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nt : ℝ≥0\nC : ℝ\nhC : ∀ (n : ℕ), ‖p n‖ * ↑t ^ n ≤ C\nrt : ↑r < ↑t\nthis : 0 < ↑t\n⊢ ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n[PROOFSTEP]\nrw [← div_lt_one this] at rt \n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nthis✝ :\n  (∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x) ↔\n    ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nt : ℝ≥0\nC : ℝ\nhC : ∀ (n : ℕ), ‖p n‖ * ↑t ^ n ≤ C\nrt : ↑r / ↑t < 1\nthis : 0 < ↑t\n⊢ ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n[PROOFSTEP]\nrefine' ⟨_, rt, C, Or.inr zero_lt_one, fun n => _⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nthis✝ :\n  (∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x) ↔\n    ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nt : ℝ≥0\nC : ℝ\nhC : ∀ (n : ℕ), ‖p n‖ * ↑t ^ n ≤ C\nrt : ↑r / ↑t < 1\nthis : 0 < ↑t\nn : ℕ\n⊢ |‖p n‖ * ↑r ^ n| ≤ C * (↑r / ↑t) ^ n\n[PROOFSTEP]\ncalc\n  |‖p n‖ * (r : ℝ) ^ n| = ‖p n‖ * (t : ℝ) ^ n * (r / t : ℝ) ^ n := by field_simp [mul_right_comm, abs_mul, this.ne']\n  _ ≤ C * (r / t : ℝ) ^ n := by gcongr; apply hC\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nthis✝ :\n  (∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x) ↔\n    ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nt : ℝ≥0\nC : ℝ\nhC : ∀ (n : ℕ), ‖p n‖ * ↑t ^ n ≤ C\nrt : ↑r / ↑t < 1\nthis : 0 < ↑t\nn : ℕ\n⊢ |‖p n‖ * ↑r ^ n| = ‖p n‖ * ↑t ^ n * (↑r / ↑t) ^ n\n[PROOFSTEP]\nfield_simp [mul_right_comm, abs_mul, this.ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nthis✝ :\n  (∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x) ↔\n    ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nt : ℝ≥0\nC : ℝ\nhC : ∀ (n : ℕ), ‖p n‖ * ↑t ^ n ≤ C\nrt : ↑r / ↑t < 1\nthis : 0 < ↑t\nn : ℕ\n⊢ ‖p n‖ * ↑t ^ n * (↑r / ↑t) ^ n ≤ C * (↑r / ↑t) ^ n\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nthis✝ :\n  (∃ a, a ∈ Ioo 0 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =o[atTop] fun x => a ^ x) ↔\n    ∃ a, a < 1 ∧ ∃ C x, ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nt : ℝ≥0\nC : ℝ\nhC : ∀ (n : ℕ), ‖p n‖ * ↑t ^ n ≤ C\nrt : ↑r / ↑t < 1\nthis : 0 < ↑t\nn : ℕ\n⊢ ‖p n‖ * ↑t ^ n ≤ C\n[PROOFSTEP]\napply hC\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : ↑r < radius p\n⊢ ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), ‖p n‖ * ↑r ^ n ≤ C * a ^ n\n[PROOFSTEP]\nhave := ((TFAE_exists_lt_isLittleO_pow (fun n => ‖p n‖ * (r : ℝ) ^ n) 1).out 1 5).mp (p.isLittleO_of_lt_radius h)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : ↑r < radius p\nthis : ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n⊢ ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), ‖p n‖ * ↑r ^ n ≤ C * a ^ n\n[PROOFSTEP]\nrcases this with ⟨a, ha, C, hC, H⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : ↑r < radius p\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nH : ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n⊢ ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), ‖p n‖ * ↑r ^ n ≤ C * a ^ n\n[PROOFSTEP]\nexact ⟨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh₀ : r ≠ 0\na : ℝ\nha : a ∈ Ioo (-1) 1\nhp : (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a ^ x\n⊢ ↑r < radius p\n[PROOFSTEP]\nhave := ((TFAE_exists_lt_isLittleO_pow (fun n => ‖p n‖ * (r : ℝ) ^ n) 1).out 2 5)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh₀ : r ≠ 0\na : ℝ\nha : a ∈ Ioo (-1) 1\nhp : (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a ^ x\nthis :\n  (∃ a, a ∈ Ioo (-1) 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a ^ x) ↔\n    ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n⊢ ↑r < radius p\n[PROOFSTEP]\nrcases this.mp ⟨a, ha, hp⟩ with ⟨a, ha, C, hC, hp⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh₀ : r ≠ 0\na✝ : ℝ\nha✝ : a✝ ∈ Ioo (-1) 1\nhp✝ : (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a✝ ^ x\nthis :\n  (∃ a, a ∈ Ioo (-1) 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a ^ x) ↔\n    ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n⊢ ↑r < radius p\n[PROOFSTEP]\nrw [← pos_iff_ne_zero, ← NNReal.coe_pos] at h₀ \n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh₀ : 0 < ↑r\na✝ : ℝ\nha✝ : a✝ ∈ Ioo (-1) 1\nhp✝ : (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a✝ ^ x\nthis :\n  (∃ a, a ∈ Ioo (-1) 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a ^ x) ↔\n    ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\n⊢ ↑r < radius p\n[PROOFSTEP]\nlift a to ℝ≥0 using ha.1.le\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh₀ : 0 < ↑r\na✝ : ℝ\nha✝ : a✝ ∈ Ioo (-1) 1\nhp✝ : (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a✝ ^ x\nthis :\n  (∃ a, a ∈ Ioo (-1) 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a ^ x) ↔\n    ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nC : ℝ\nhC : C > 0\na : ℝ≥0\nha : ↑a ∈ Ioo 0 1\nhp : ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * ↑a ^ n\n⊢ ↑r < radius p\n[PROOFSTEP]\nhave : (r : ℝ) < r / a := by simpa only [div_one] using (div_lt_div_left h₀ zero_lt_one ha.1).2 ha.2\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh₀ : 0 < ↑r\na✝ : ℝ\nha✝ : a✝ ∈ Ioo (-1) 1\nhp✝ : (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a✝ ^ x\nthis :\n  (∃ a, a ∈ Ioo (-1) 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a ^ x) ↔\n    ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nC : ℝ\nhC : C > 0\na : ℝ≥0\nha : ↑a ∈ Ioo 0 1\nhp : ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * ↑a ^ n\n⊢ ↑r < ↑r / ↑a\n[PROOFSTEP]\nsimpa only [div_one] using (div_lt_div_left h₀ zero_lt_one ha.1).2 ha.2\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh₀ : 0 < ↑r\na✝ : ℝ\nha✝ : a✝ ∈ Ioo (-1) 1\nhp✝ : (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a✝ ^ x\nthis✝ :\n  (∃ a, a ∈ Ioo (-1) 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a ^ x) ↔\n    ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nC : ℝ\nhC : C > 0\na : ℝ≥0\nha : ↑a ∈ Ioo 0 1\nhp : ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * ↑a ^ n\nthis : ↑r < ↑r / ↑a\n⊢ ↑r < radius p\n[PROOFSTEP]\nnorm_cast at this \n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh₀ : 0 < ↑r\na✝ : ℝ\nha✝ : a✝ ∈ Ioo (-1) 1\nhp✝ : (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a✝ ^ x\nthis✝ :\n  (∃ a, a ∈ Ioo (-1) 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a ^ x) ↔\n    ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nC : ℝ\nhC : C > 0\na : ℝ≥0\nha : ↑a ∈ Ioo 0 1\nhp : ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * ↑a ^ n\nthis : r < r / a\n⊢ ↑r < radius p\n[PROOFSTEP]\nrw [← ENNReal.coe_lt_coe] at this \n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh₀ : 0 < ↑r\na✝ : ℝ\nha✝ : a✝ ∈ Ioo (-1) 1\nhp✝ : (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a✝ ^ x\nthis✝ :\n  (∃ a, a ∈ Ioo (-1) 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a ^ x) ↔\n    ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nC : ℝ\nhC : C > 0\na : ℝ≥0\nha : ↑a ∈ Ioo 0 1\nhp : ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * ↑a ^ n\nthis : ↑r < ↑(r / a)\n⊢ ↑r < radius p\n[PROOFSTEP]\nrefine' this.trans_le (p.le_radius_of_bound C fun n => _)\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh₀ : 0 < ↑r\na✝ : ℝ\nha✝ : a✝ ∈ Ioo (-1) 1\nhp✝ : (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a✝ ^ x\nthis✝ :\n  (∃ a, a ∈ Ioo (-1) 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a ^ x) ↔\n    ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nC : ℝ\nhC : C > 0\na : ℝ≥0\nha : ↑a ∈ Ioo 0 1\nhp : ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * ↑a ^ n\nthis : ↑r < ↑(r / a)\nn : ℕ\n⊢ ‖p n‖ * ↑(r / a) ^ n ≤ C\n[PROOFSTEP]\nrw [NNReal.coe_div, div_pow, ← mul_div_assoc, div_le_iff (pow_pos ha.1 n)]\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh₀ : 0 < ↑r\na✝ : ℝ\nha✝ : a✝ ∈ Ioo (-1) 1\nhp✝ : (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a✝ ^ x\nthis✝ :\n  (∃ a, a ∈ Ioo (-1) 1 ∧ (fun n => ‖p n‖ * ↑r ^ n) =O[atTop] fun x => a ^ x) ↔\n    ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * a ^ n\nC : ℝ\nhC : C > 0\na : ℝ≥0\nha : ↑a ∈ Ioo 0 1\nhp : ∀ (n : ℕ), |‖p n‖ * ↑r ^ n| ≤ C * ↑a ^ n\nthis : ↑r < ↑(r / a)\nn : ℕ\n⊢ ‖p n‖ * ↑r ^ n ≤ C * ↑a ^ n\n[PROOFSTEP]\nexact (le_abs_self _).trans (hp n)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : ↑r < radius p\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r ^ n ≤ C\n⊢ ∀ (n : ℕ), ‖p n‖₊ * r ^ n ≤ { val := C, property := (_ : 0 ≤ C) }\n[PROOFSTEP]\nexact_mod_cast hp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : ↑r < radius p\n⊢ Summable fun n => ‖p n‖ * ↑r ^ n\n[PROOFSTEP]\nobtain ⟨a, ha : a ∈ Ioo (0 : ℝ) 1, C, - : 0 < C, hp⟩ := p.norm_mul_pow_le_mul_pow_of_lt_radius h\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : ↑r < radius p\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r ^ n ≤ C * a ^ n\n⊢ Summable fun n => ‖p n‖ * ↑r ^ n\n[PROOFSTEP]\nexact\n  summable_of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _)) hp\n    ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nx : E\nhx : x ∈ EMetric.ball 0 (radius p)\n⊢ Summable fun n => ‖↑(p n) fun x_1 => x‖\n[PROOFSTEP]\nrw [mem_emetric_ball_zero_iff] at hx \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nx : E\nhx : ↑‖x‖₊ < radius p\n⊢ Summable fun n => ‖↑(p n) fun x_1 => x‖\n[PROOFSTEP]\nrefine'\n  summable_of_nonneg_of_le (fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _)\n    (p.summable_norm_mul_pow hx)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nx : E\nhx : ↑‖x‖₊ < radius p\nn : ℕ\n⊢ ‖p n‖ * ∏ i : Fin n, ‖x‖ = ‖p n‖ * ↑‖x‖₊ ^ n\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : ↑r < radius p\n⊢ Summable fun n => ‖p n‖₊ * r ^ n\n[PROOFSTEP]\nrw [← NNReal.summable_coe]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : ↑r < radius p\n⊢ Summable fun a => ↑(‖p a‖₊ * r ^ a)\n[PROOFSTEP]\npush_cast\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nh : ↑r < radius p\n⊢ Summable fun a => ‖p a‖ * ↑r ^ a\n[PROOFSTEP]\nexact p.summable_norm_mul_pow h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\n⊢ radius p = ⊤ ↔ ∀ (r : ℝ≥0), Summable fun n => ‖p n‖ * ↑r ^ n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\n⊢ radius p = ⊤ → ∀ (r : ℝ≥0), Summable fun n => ‖p n‖ * ↑r ^ n\n[PROOFSTEP]\nintro h r\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nh : radius p = ⊤\nr : ℝ≥0\n⊢ Summable fun n => ‖p n‖ * ↑r ^ n\n[PROOFSTEP]\nobtain ⟨a, ha : a ∈ Ioo (0 : ℝ) 1, C, - : 0 < C, hp⟩ :=\n  p.norm_mul_pow_le_mul_pow_of_lt_radius (show (r : ℝ≥0∞) < p.radius from h.symm ▸ ENNReal.coe_lt_top)\n[GOAL]\ncase mp.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nh : radius p = ⊤\nr : ℝ≥0\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r ^ n ≤ C * a ^ n\n⊢ Summable fun n => ‖p n‖ * ↑r ^ n\n[PROOFSTEP]\nrefine'\n  summable_of_norm_bounded (fun n => (C : ℝ) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _\n[GOAL]\ncase mp.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nh : radius p = ⊤\nr : ℝ≥0\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r ^ n ≤ C * a ^ n\nn : ℕ\n⊢ ‖‖p n‖ * ↑r ^ n‖ ≤ (fun n => C * a ^ n) n\n[PROOFSTEP]\nspecialize hp n\n[GOAL]\ncase mp.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nh : radius p = ⊤\nr : ℝ≥0\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nn : ℕ\nhp : ‖p n‖ * ↑r ^ n ≤ C * a ^ n\n⊢ ‖‖p n‖ * ↑r ^ n‖ ≤ (fun n => C * a ^ n) n\n[PROOFSTEP]\nrwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\n⊢ (∀ (r : ℝ≥0), Summable fun n => ‖p n‖ * ↑r ^ n) → radius p = ⊤\n[PROOFSTEP]\nexact p.radius_eq_top_of_summable_norm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nh : 0 < radius p\n⊢ ∃ C r hC hr, ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\n[PROOFSTEP]\nrcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with ⟨r, r0, rlt⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nh : 0 < radius p\nr : ℝ≥0\nr0 : 0 < ↑r\nrlt : ↑r < radius p\n⊢ ∃ C r hC hr, ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\n[PROOFSTEP]\nhave rpos : 0 < (r : ℝ) := by simp [ENNReal.coe_pos.1 r0]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nh : 0 < radius p\nr : ℝ≥0\nr0 : 0 < ↑r\nrlt : ↑r < radius p\n⊢ 0 < ↑r\n[PROOFSTEP]\nsimp [ENNReal.coe_pos.1 r0]\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nh : 0 < radius p\nr : ℝ≥0\nr0 : 0 < ↑r\nrlt : ↑r < radius p\nrpos : 0 < ↑r\n⊢ ∃ C r hC hr, ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\n[PROOFSTEP]\nrcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with ⟨C, Cpos, hCp⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nh : 0 < radius p\nr : ℝ≥0\nr0 : 0 < ↑r\nrlt : ↑r < radius p\nrpos : 0 < ↑r\nC : ℝ\nCpos : C > 0\nhCp : ∀ (n : ℕ), ‖p n‖ ≤ C / ↑r ^ n\n⊢ ∃ C r hC hr, ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\n[PROOFSTEP]\nrefine'\n  ⟨C, r⁻¹, Cpos, by simp only [inv_pos, rpos], fun n => _⟩\n    -- Porting note: was `convert`\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nh : 0 < radius p\nr : ℝ≥0\nr0 : 0 < ↑r\nrlt : ↑r < radius p\nrpos : 0 < ↑r\nC : ℝ\nCpos : C > 0\nhCp : ∀ (n : ℕ), ‖p n‖ ≤ C / ↑r ^ n\n⊢ 0 < (↑r)⁻¹\n[PROOFSTEP]\nsimp only [inv_pos, rpos]\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nh : 0 < radius p\nr : ℝ≥0\nr0 : 0 < ↑r\nrlt : ↑r < radius p\nrpos : 0 < ↑r\nC : ℝ\nCpos : C > 0\nhCp : ∀ (n : ℕ), ‖p n‖ ≤ C / ↑r ^ n\nn : ℕ\n⊢ ‖p n‖ ≤ C * (↑r)⁻¹ ^ n\n[PROOFSTEP]\nrw [inv_pow, ← div_eq_mul_inv]\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nh : 0 < radius p\nr : ℝ≥0\nr0 : 0 < ↑r\nrlt : ↑r < radius p\nrpos : 0 < ↑r\nC : ℝ\nCpos : C > 0\nhCp : ∀ (n : ℕ), ‖p n‖ ≤ C / ↑r ^ n\nn : ℕ\n⊢ ‖p n‖ ≤ C / ↑r ^ n\n[PROOFSTEP]\nexact hCp n\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\np q : FormalMultilinearSeries 𝕜 E F\n⊢ min (radius p) (radius q) ≤ radius (p + q)\n[PROOFSTEP]\nrefine' ENNReal.le_of_forall_nnreal_lt fun r hr => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np q : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nhr : ↑r < min (radius p) (radius q)\n⊢ ↑r ≤ radius (p + q)\n[PROOFSTEP]\nrw [lt_min_iff] at hr \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np q : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nhr : ↑r < radius p ∧ ↑r < radius q\n⊢ ↑r ≤ radius (p + q)\n[PROOFSTEP]\nhave := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np q : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nhr : ↑r < radius p ∧ ↑r < radius q\nthis : (fun x => ‖p x‖ * ↑r ^ x + ‖q x‖ * ↑r ^ x) =O[atTop] fun x => 1\n⊢ ↑r ≤ radius (p + q)\n[PROOFSTEP]\nrefine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np q : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nhr : ↑r < radius p ∧ ↑r < radius q\nthis : (fun x => ‖p x‖ * ↑r ^ x + ‖q x‖ * ↑r ^ x) =O[atTop] fun x => 1\nn : ℕ\n⊢ ‖‖(p + q) n‖ * ↑r ^ n‖ ≤ ‖‖p n‖ * ↑r ^ n + ‖q n‖ * ↑r ^ n‖\n[PROOFSTEP]\nrw [← add_mul, norm_mul, norm_mul, norm_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np q : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\nhr : ↑r < radius p ∧ ↑r < radius q\nthis : (fun x => ‖p x‖ * ↑r ^ x + ‖q x‖ * ↑r ^ x) =O[atTop] fun x => 1\nn : ℕ\n⊢ ‖(p + q) n‖ * ‖↑r ^ n‖ ≤ ‖‖p n‖ + ‖q n‖‖ * ‖↑r ^ n‖\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\n⊢ radius (-p) = radius p\n[PROOFSTEP]\nsimp only [radius, neg_apply, norm_neg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nf : F →L[𝕜] G\n⊢ radius p ≤ radius (ContinuousLinearMap.compFormalMultilinearSeries f p)\n[PROOFSTEP]\nrefine' ENNReal.le_of_forall_nnreal_lt fun r hr => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nf : F →L[𝕜] G\nr : ℝ≥0\nhr : ↑r < radius p\n⊢ ↑r ≤ radius (ContinuousLinearMap.compFormalMultilinearSeries f p)\n[PROOFSTEP]\napply le_radius_of_isBigO\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nf : F →L[𝕜] G\nr : ℝ≥0\nhr : ↑r < radius p\n⊢ (fun n => ‖ContinuousLinearMap.compFormalMultilinearSeries f p n‖ * ↑r ^ n) =O[atTop] fun x => 1\n[PROOFSTEP]\napply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nf : F →L[𝕜] G\nr : ℝ≥0\nhr : ↑r < radius p\n⊢ (fun n => ‖ContinuousLinearMap.compFormalMultilinearSeries f p n‖ * ↑r ^ n) =O[atTop] fun n => ‖p n‖ * ↑r ^ n\n[PROOFSTEP]\nrefine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ ‖f‖ _ _ _ _) (isBigO_refl _ _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nf : F →L[𝕜] G\nr : ℝ≥0\nhr : ↑r < radius p\n⊢ IsBigOWith ‖f‖ atTop (fun n => ‖ContinuousLinearMap.compFormalMultilinearSeries f p n‖) fun n => ‖p n‖\n[PROOFSTEP]\nrefine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np✝ : FormalMultilinearSeries 𝕜 E F\nr✝ : ℝ≥0\np : FormalMultilinearSeries 𝕜 E F\nf : F →L[𝕜] G\nr : ℝ≥0\nhr : ↑r < radius p\nn : ℕ\n⊢ ‖‖ContinuousLinearMap.compFormalMultilinearSeries f p n‖‖ ≤ ‖f‖ * ‖‖p n‖‖\n[PROOFSTEP]\nsimpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nhg : EqOn f g (EMetric.ball x r)\ny : E\nhy : y ∈ EMetric.ball 0 r\n⊢ HasSum (fun n => ↑(p n) fun x => y) (g (x + y))\n[PROOFSTEP]\nconvert hf.hasSum hy using 1\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nhg : EqOn f g (EMetric.ball x r)\ny : E\nhy : y ∈ EMetric.ball 0 r\n⊢ g (x + y) = f (x + y)\n[PROOFSTEP]\napply hg.symm\n[GOAL]\ncase h.e'_6.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nhg : EqOn f g (EMetric.ball x r)\ny : E\nhy : y ∈ EMetric.ball 0 r\n⊢ x + y ∈ EMetric.ball x r\n[PROOFSTEP]\nsimpa [edist_eq_coe_nnnorm_sub] using hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\ny z : E\nhz : z ∈ EMetric.ball 0 r\n⊢ HasSum (fun n => ↑(p n) fun x => z) (f (x + y + z - y))\n[PROOFSTEP]\nconvert hf.hasSum hz using 2\n[GOAL]\ncase h.e'_6.h.e'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\ny z : E\nhz : z ∈ EMetric.ball 0 r\n⊢ x + y + z - y = x + z\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_6.h.e'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\ny z : E\nhz : z ∈ EMetric.ball 0 r\n⊢ x + y + z - y = x + z\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\ny : E\nhy : y ∈ EMetric.ball x r\n⊢ HasSum (fun n => ↑(p n) fun x_1 => y - x) (f y)\n[PROOFSTEP]\nhave : y - x ∈ EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\ny : E\nhy : y ∈ EMetric.ball x r\n⊢ y - x ∈ EMetric.ball 0 r\n[PROOFSTEP]\nsimpa [edist_eq_coe_nnnorm_sub] using hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\ny : E\nhy : y ∈ EMetric.ball x r\nthis : y - x ∈ EMetric.ball 0 r\n⊢ HasSum (fun n => ↑(p n) fun x_1 => y - x) (f y)\n[PROOFSTEP]\nsimpa only [add_sub_cancel'_right] using hf.hasSum this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesAt f p x\nhg : f =ᶠ[𝓝 x] g\n⊢ HasFPowerSeriesAt g p x\n[PROOFSTEP]\nrcases hf with ⟨r₁, h₁⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhg : f =ᶠ[𝓝 x] g\nr₁ : ℝ≥0∞\nh₁ : HasFPowerSeriesOnBall f p x r₁\n⊢ HasFPowerSeriesAt g p x\n[PROOFSTEP]\nrcases EMetric.mem_nhds_iff.mp hg with ⟨r₂, h₂pos, h₂⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhg : f =ᶠ[𝓝 x] g\nr₁ : ℝ≥0∞\nh₁ : HasFPowerSeriesOnBall f p x r₁\nr₂ : ℝ≥0∞\nh₂pos : r₂ > 0\nh₂ : EMetric.ball x r₂ ⊆ {x | (fun x => f x = g x) x}\n⊢ HasFPowerSeriesAt g p x\n[PROOFSTEP]\nexact\n  ⟨min r₁ r₂,\n    (h₁.mono (lt_min h₁.r_pos h₂pos) inf_le_left).congr fun y hy => h₂ (EMetric.ball_subset_ball inf_le_right hy)⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\n⊢ ∀ᶠ (y : E) in 𝓝 0, HasSum (fun n => ↑(p n) fun x => y) (f (x + y))\n[PROOFSTEP]\nfilter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\n⊢ ∀ᶠ (y : E) in 𝓝 x, HasSum (fun n => ↑(p n) fun x_1 => y - x) (f y)\n[PROOFSTEP]\nfilter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f 0 x r\n⊢ ∀ᶠ (z : E) in 𝓝 x, f z = 0\n[PROOFSTEP]\nfilter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nc : F\ne : E\n⊢ HasFPowerSeriesOnBall (fun x => c) (constFormalMultilinearSeries 𝕜 E c) e ⊤\n[PROOFSTEP]\nrefine' ⟨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nc : F\ne : E\n⊢ ⊤ ≤ FormalMultilinearSeries.radius (constFormalMultilinearSeries 𝕜 E c)\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nc : F\ne y✝ : E\nx✝ : y✝ ∈ EMetric.ball 0 ⊤\nn : ℕ\nhn : n ≠ 0\n⊢ (↑(constFormalMultilinearSeries 𝕜 E c n) fun x => y✝) = 0\n[PROOFSTEP]\nsimp [constFormalMultilinearSeries_apply hn]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesAt f pf x\nhg : HasFPowerSeriesAt g pg x\n⊢ HasFPowerSeriesAt (f + g) (pf + pg) x\n[PROOFSTEP]\nrcases(hf.eventually.and hg.eventually).exists with ⟨r, hr⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr✝ r' : ℝ≥0∞\nhf : HasFPowerSeriesAt f pf x\nhg : HasFPowerSeriesAt g pg x\nr : ℝ≥0∞\nhr : HasFPowerSeriesOnBall f pf x r ∧ HasFPowerSeriesOnBall g pg x r\n⊢ HasFPowerSeriesAt (f + g) (pf + pg) x\n[PROOFSTEP]\nexact ⟨r, hr.1.add hr.2⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f pf x r\n⊢ r ≤ FormalMultilinearSeries.radius (-pf)\n[PROOFSTEP]\nrw [pf.radius_neg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f pf x r\n⊢ r ≤ FormalMultilinearSeries.radius pf\n[PROOFSTEP]\nexact hf.r_le\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f pf x r\nhg : HasFPowerSeriesOnBall g pg x r\n⊢ HasFPowerSeriesOnBall (f - g) (pf - pg) x r\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesAt f pf x\nhg : HasFPowerSeriesAt g pg x\n⊢ HasFPowerSeriesAt (f - g) (pf - pg) x\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : AnalyticAt 𝕜 f x\nhg : AnalyticAt 𝕜 g x\n⊢ AnalyticAt 𝕜 (f - g) x\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f pf x r\nv : Fin 0 → E\n⊢ ↑(pf 0) v = f x\n[PROOFSTEP]\nhave v_eq : v = fun i => 0 := Subsingleton.elim _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f pf x r\nv : Fin 0 → E\nv_eq : v = fun i => 0\n⊢ ↑(pf 0) v = f x\n[PROOFSTEP]\nhave zero_mem : (0 : E) ∈ EMetric.ball (0 : E) r := by simp [hf.r_pos]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f pf x r\nv : Fin 0 → E\nv_eq : v = fun i => 0\n⊢ 0 ∈ EMetric.ball 0 r\n[PROOFSTEP]\nsimp [hf.r_pos]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f pf x r\nv : Fin 0 → E\nv_eq : v = fun i => 0\nzero_mem : 0 ∈ EMetric.ball 0 r\n⊢ ↑(pf 0) v = f x\n[PROOFSTEP]\nhave : ∀ (i) (_ : i ≠ 0), (pf i fun j => 0) = 0 := by\n  intro i hi\n  have : 0 < i := pos_iff_ne_zero.2 hi\n  exact ContinuousMultilinearMap.map_coord_zero _ (⟨0, this⟩ : Fin i) rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f pf x r\nv : Fin 0 → E\nv_eq : v = fun i => 0\nzero_mem : 0 ∈ EMetric.ball 0 r\n⊢ ∀ (i : ℕ), i ≠ 0 → (↑(pf i) fun j => 0) = 0\n[PROOFSTEP]\nintro i hi\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f pf x r\nv : Fin 0 → E\nv_eq : v = fun i => 0\nzero_mem : 0 ∈ EMetric.ball 0 r\ni : ℕ\nhi : i ≠ 0\n⊢ (↑(pf i) fun j => 0) = 0\n[PROOFSTEP]\nhave : 0 < i := pos_iff_ne_zero.2 hi\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f pf x r\nv : Fin 0 → E\nv_eq : v = fun i => 0\nzero_mem : 0 ∈ EMetric.ball 0 r\ni : ℕ\nhi : i ≠ 0\nthis : 0 < i\n⊢ (↑(pf i) fun j => 0) = 0\n[PROOFSTEP]\nexact ContinuousMultilinearMap.map_coord_zero _ (⟨0, this⟩ : Fin i) rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f pf x r\nv : Fin 0 → E\nv_eq : v = fun i => 0\nzero_mem : 0 ∈ EMetric.ball 0 r\nthis : ∀ (i : ℕ), i ≠ 0 → (↑(pf i) fun j => 0) = 0\n⊢ ↑(pf 0) v = f x\n[PROOFSTEP]\nhave A := (hf.hasSum zero_mem).unique (hasSum_single _ this)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f pf x r\nv : Fin 0 → E\nv_eq : v = fun i => 0\nzero_mem : 0 ∈ EMetric.ball 0 r\nthis : ∀ (i : ℕ), i ≠ 0 → (↑(pf i) fun j => 0) = 0\nA : f (x + 0) = ↑(pf 0) fun x => 0\n⊢ ↑(pf 0) v = f x\n[PROOFSTEP]\nsimpa [v_eq] using A.symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\ng : F →L[𝕜] G\nh : HasFPowerSeriesOnBall f p x r\ny✝ : E\nhy : y✝ ∈ EMetric.ball 0 r\n⊢ HasSum (fun n => ↑(compFormalMultilinearSeries g p n) fun x => y✝) ((↑g ∘ f) (x + y✝))\n[PROOFSTEP]\nsimpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply, ContinuousLinearMap.compContinuousMultilinearMap_coe,\n  Function.comp_apply] using g.hasSum (h.hasSum hy)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\ns : Set E\ng : F →L[𝕜] G\nh : AnalyticOn 𝕜 f s\n⊢ AnalyticOn 𝕜 (↑g ∘ f) s\n[PROOFSTEP]\nrintro x hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx✝ : E\nr r' : ℝ≥0∞\ns : Set E\ng : F →L[𝕜] G\nh : AnalyticOn 𝕜 f s\nx : E\nhx : x ∈ s\n⊢ AnalyticAt 𝕜 (↑g ∘ f) x\n[PROOFSTEP]\nrcases h x hx with ⟨p, r, hp⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → F\np✝ pf pg : FormalMultilinearSeries 𝕜 E F\nx✝ : E\nr✝ r' : ℝ≥0∞\ns : Set E\ng : F →L[𝕜] G\nh : AnalyticOn 𝕜 f s\nx : E\nhx : x ∈ s\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\n⊢ AnalyticAt 𝕜 (↑g ∘ f) x\n[PROOFSTEP]\nexact ⟨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hp⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\n⊢ ∃ a,\n    a ∈ Ioo 0 1 ∧\n      ∃ C,\n        C > 0 ∧\n          ∀ (y : E),\n            y ∈ Metric.ball 0 ↑r' →\n              ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\n[PROOFSTEP]\nobtain ⟨a, ha, C, hC, hp⟩ : ∃ a ∈ Ioo (0 : ℝ) 1, ∃ C > 0, ∀ n, ‖p n‖ * (r' : ℝ) ^ n ≤ C * a ^ n :=\n  p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\n⊢ ∃ a,\n    a ∈ Ioo 0 1 ∧\n      ∃ C,\n        C > 0 ∧\n          ∀ (y : E),\n            y ∈ Metric.ball 0 ↑r' →\n              ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\n[PROOFSTEP]\nrefine' ⟨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\n⊢ ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C / (1 - a) * (a * (‖y‖ / ↑r')) ^ n\n[PROOFSTEP]\nhave yr' : ‖y‖ < r' := by\n  rw [ball_zero_eq] at hy \n  exact hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\n⊢ ‖y‖ < ↑r'\n[PROOFSTEP]\nrw [ball_zero_eq] at hy \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ {x | ‖x‖ < ↑r'}\nn : ℕ\n⊢ ‖y‖ < ↑r'\n[PROOFSTEP]\nexact hy\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\n⊢ ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C / (1 - a) * (a * (‖y‖ / ↑r')) ^ n\n[PROOFSTEP]\nhave hr'0 : 0 < (r' : ℝ) := (norm_nonneg _).trans_lt yr'\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\n⊢ ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C / (1 - a) * (a * (‖y‖ / ↑r')) ^ n\n[PROOFSTEP]\nhave : y ∈ EMetric.ball (0 : E) r :=\n  by\n  refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)\n  exact_mod_cast yr'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\n⊢ y ∈ EMetric.ball 0 r\n[PROOFSTEP]\nrefine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\n⊢ ↑‖y‖₊ < ↑r'\n[PROOFSTEP]\nexact_mod_cast yr'\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis : y ∈ EMetric.ball 0 r\n⊢ ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C / (1 - a) * (a * (‖y‖ / ↑r')) ^ n\n[PROOFSTEP]\nrw [norm_sub_rev, ← mul_div_right_comm]\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis : y ∈ EMetric.ball 0 r\n⊢ ‖FormalMultilinearSeries.partialSum p n y - f (x + y)‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n / (1 - a)\n[PROOFSTEP]\nhave ya : a * (‖y‖ / ↑r') ≤ a := mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis : y ∈ EMetric.ball 0 r\nya : a * (‖y‖ / ↑r') ≤ a\n⊢ ‖FormalMultilinearSeries.partialSum p n y - f (x + y)‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n / (1 - a)\n[PROOFSTEP]\nsuffices ‖p.partialSum n y - f (x + y)‖ ≤ C * (a * (‖y‖ / r')) ^ n / (1 - a * (‖y‖ / r'))\n  by\n  refine' this.trans _\n  have : 0 < a := ha.1\n  gcongr\n  apply_rules [sub_pos.2, ha.2]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis✝ : y ∈ EMetric.ball 0 r\nya : a * (‖y‖ / ↑r') ≤ a\nthis : ‖FormalMultilinearSeries.partialSum p n y - f (x + y)‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n / (1 - a * (‖y‖ / ↑r'))\n⊢ ‖FormalMultilinearSeries.partialSum p n y - f (x + y)‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n / (1 - a)\n[PROOFSTEP]\nrefine' this.trans _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis✝ : y ∈ EMetric.ball 0 r\nya : a * (‖y‖ / ↑r') ≤ a\nthis : ‖FormalMultilinearSeries.partialSum p n y - f (x + y)‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n / (1 - a * (‖y‖ / ↑r'))\n⊢ C * (a * (‖y‖ / ↑r')) ^ n / (1 - a * (‖y‖ / ↑r')) ≤ C * (a * (‖y‖ / ↑r')) ^ n / (1 - a)\n[PROOFSTEP]\nhave : 0 < a := ha.1\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis✝¹ : y ∈ EMetric.ball 0 r\nya : a * (‖y‖ / ↑r') ≤ a\nthis✝ : ‖FormalMultilinearSeries.partialSum p n y - f (x + y)‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n / (1 - a * (‖y‖ / ↑r'))\nthis : 0 < a\n⊢ C * (a * (‖y‖ / ↑r')) ^ n / (1 - a * (‖y‖ / ↑r')) ≤ C * (a * (‖y‖ / ↑r')) ^ n / (1 - a)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase hc\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis✝¹ : y ∈ EMetric.ball 0 r\nya : a * (‖y‖ / ↑r') ≤ a\nthis✝ : ‖FormalMultilinearSeries.partialSum p n y - f (x + y)‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n / (1 - a * (‖y‖ / ↑r'))\nthis : 0 < a\n⊢ 0 < 1 - a\n[PROOFSTEP]\napply_rules [sub_pos.2, ha.2]\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis : y ∈ EMetric.ball 0 r\nya : a * (‖y‖ / ↑r') ≤ a\n⊢ ‖FormalMultilinearSeries.partialSum p n y - f (x + y)‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n / (1 - a * (‖y‖ / ↑r'))\n[PROOFSTEP]\napply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis : y ∈ EMetric.ball 0 r\nya : a * (‖y‖ / ↑r') ≤ a\n⊢ ∀ (n : ℕ), ‖↑(p n) fun x => y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn✝ : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis : y ∈ EMetric.ball 0 r\nya : a * (‖y‖ / ↑r') ≤ a\nn : ℕ\n⊢ ‖↑(p n) fun x => y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\n[PROOFSTEP]\ncalc\n  ‖(p n) fun _ : Fin n => y‖\n  _ ≤ ‖p n‖ * ∏ _i : Fin n, ‖y‖ := (ContinuousMultilinearMap.le_op_norm _ _)\n  _ = ‖p n‖ * (r' : ℝ) ^ n * (‖y‖ / r') ^ n := by field_simp [hr'0.ne', mul_right_comm]\n  _ ≤ C * a ^ n * (‖y‖ / r') ^ n := by gcongr ?_ * _; apply hp\n  _ ≤ C * (a * (‖y‖ / r')) ^ n := by rw [mul_pow, mul_assoc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn✝ : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis : y ∈ EMetric.ball 0 r\nya : a * (‖y‖ / ↑r') ≤ a\nn : ℕ\n⊢ ‖p n‖ * ∏ _i : Fin n, ‖y‖ = ‖p n‖ * ↑r' ^ n * (‖y‖ / ↑r') ^ n\n[PROOFSTEP]\nfield_simp [hr'0.ne', mul_right_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn✝ : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis : y ∈ EMetric.ball 0 r\nya : a * (‖y‖ / ↑r') ≤ a\nn : ℕ\n⊢ ‖p n‖ * ↑r' ^ n * (‖y‖ / ↑r') ^ n ≤ C * a ^ n * (‖y‖ / ↑r') ^ n\n[PROOFSTEP]\ngcongr ?_ * _\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn✝ : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis : y ∈ EMetric.ball 0 r\nya : a * (‖y‖ / ↑r') ≤ a\nn : ℕ\n⊢ ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\n[PROOFSTEP]\napply hp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn✝ : ℕ\nyr' : ‖y‖ < ↑r'\nhr'0 : 0 < ↑r'\nthis : y ∈ EMetric.ball 0 r\nya : a * (‖y‖ / ↑r') ≤ a\nn : ℕ\n⊢ C * a ^ n * (‖y‖ / ↑r') ^ n ≤ C * (a * (‖y‖ / ↑r')) ^ n\n[PROOFSTEP]\nrw [mul_pow, mul_assoc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\n⊢ ∃ a,\n    a ∈ Ioo 0 1 ∧\n      ∃ C,\n        C > 0 ∧\n          ∀ (y : E),\n            y ∈ Metric.ball 0 ↑r' → ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * a ^ n\n[PROOFSTEP]\nobtain ⟨a, ha, C, hC, hp⟩ :\n  ∃ a ∈ Ioo (0 : ℝ) 1,\n    ∃ C > 0, ∀ y ∈ Metric.ball (0 : E) r', ∀ n, ‖f (x + y) - p.partialSum n y‖ ≤ C * (a * (‖y‖ / r')) ^ n :=\n  hf.uniform_geometric_approx' h\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp :\n  ∀ (y : E),\n    y ∈ Metric.ball 0 ↑r' →\n      ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\n⊢ ∃ a,\n    a ∈ Ioo 0 1 ∧\n      ∃ C,\n        C > 0 ∧\n          ∀ (y : E),\n            y ∈ Metric.ball 0 ↑r' → ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * a ^ n\n[PROOFSTEP]\nrefine' ⟨a, ha, C, hC, fun y hy n => (hp y hy n).trans _⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp :\n  ∀ (y : E),\n    y ∈ Metric.ball 0 ↑r' →\n      ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\n⊢ C * (a * (‖y‖ / ↑r')) ^ n ≤ C * a ^ n\n[PROOFSTEP]\nhave yr' : ‖y‖ < r' := by rwa [ball_zero_eq] at hy \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp :\n  ∀ (y : E),\n    y ∈ Metric.ball 0 ↑r' →\n      ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\n⊢ ‖y‖ < ↑r'\n[PROOFSTEP]\nrwa [ball_zero_eq] at hy \n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp :\n  ∀ (y : E),\n    y ∈ Metric.ball 0 ↑r' →\n      ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\n⊢ C * (a * (‖y‖ / ↑r')) ^ n ≤ C * a ^ n\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase intro.intro.intro.intro.h.ha\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp :\n  ∀ (y : E),\n    y ∈ Metric.ball 0 ↑r' →\n      ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\n⊢ 0 ≤ a * (‖y‖ / ↑r')\ncase intro.intro.intro.intro.h.hab\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : C > 0\nhp :\n  ∀ (y : E),\n    y ∈ Metric.ball 0 ↑r' →\n      ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\nn : ℕ\nyr' : ‖y‖ < ↑r'\n⊢ a * (‖y‖ / ↑r') ≤ a\n[PROOFSTEP]\nexacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),\n  mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesAt f p x\nn : ℕ\n⊢ (fun y => f (x + y) - FormalMultilinearSeries.partialSum p n y) =O[𝓝 0] fun y => ‖y‖ ^ n\n[PROOFSTEP]\nrcases hf with ⟨r, hf⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr✝ r' : ℝ≥0∞\nn : ℕ\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\n⊢ (fun y => f (x + y) - FormalMultilinearSeries.partialSum p n y) =O[𝓝 0] fun y => ‖y‖ ^ n\n[PROOFSTEP]\nrcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with ⟨r', r'0, h⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr✝ r'✝ : ℝ≥0∞\nn : ℕ\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nr'0 : 0 < ↑r'\nh : ↑r' < r\n⊢ (fun y => f (x + y) - FormalMultilinearSeries.partialSum p n y) =O[𝓝 0] fun y => ‖y‖ ^ n\n[PROOFSTEP]\nobtain ⟨a, -, C, -, hp⟩ :\n  ∃ a ∈ Ioo (0 : ℝ) 1,\n    ∃ C > 0, ∀ y ∈ Metric.ball (0 : E) r', ∀ n, ‖f (x + y) - p.partialSum n y‖ ≤ C * (a * (‖y‖ / r')) ^ n :=\n  hf.uniform_geometric_approx' h\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr✝ r'✝ : ℝ≥0∞\nn : ℕ\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nr'0 : 0 < ↑r'\nh : ↑r' < r\na C : ℝ\nhp :\n  ∀ (y : E),\n    y ∈ Metric.ball 0 ↑r' →\n      ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\n⊢ (fun y => f (x + y) - FormalMultilinearSeries.partialSum p n y) =O[𝓝 0] fun y => ‖y‖ ^ n\n[PROOFSTEP]\nrefine' isBigO_iff.2 ⟨C * (a / r') ^ n, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr✝ r'✝ : ℝ≥0∞\nn : ℕ\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nr'0 : 0 < ↑r'\nh : ↑r' < r\na C : ℝ\nhp :\n  ∀ (y : E),\n    y ∈ Metric.ball 0 ↑r' →\n      ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\n⊢ ∀ᶠ (x_1 : E) in 𝓝 0, ‖f (x + x_1) - FormalMultilinearSeries.partialSum p n x_1‖ ≤ C * (a / ↑r') ^ n * ‖‖x_1‖ ^ n‖\n[PROOFSTEP]\nreplace r'0 : 0 < (r' : ℝ)\n[GOAL]\ncase r'0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr✝ r'✝ : ℝ≥0∞\nn : ℕ\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nr'0 : 0 < ↑r'\nh : ↑r' < r\na C : ℝ\nhp :\n  ∀ (y : E),\n    y ∈ Metric.ball 0 ↑r' →\n      ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\n⊢ 0 < ↑r'\n[PROOFSTEP]\nexact_mod_cast r'0\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr✝ r'✝ : ℝ≥0∞\nn : ℕ\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nh : ↑r' < r\na C : ℝ\nhp :\n  ∀ (y : E),\n    y ∈ Metric.ball 0 ↑r' →\n      ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\nr'0 : 0 < ↑r'\n⊢ ∀ᶠ (x_1 : E) in 𝓝 0, ‖f (x + x_1) - FormalMultilinearSeries.partialSum p n x_1‖ ≤ C * (a / ↑r') ^ n * ‖‖x_1‖ ^ n‖\n[PROOFSTEP]\nfilter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr✝ r'✝ : ℝ≥0∞\nn : ℕ\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nh : ↑r' < r\na C : ℝ\nhp :\n  ∀ (y : E),\n    y ∈ Metric.ball 0 ↑r' →\n      ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n\nr'0 : 0 < ↑r'\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\n⊢ ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * (a / ↑r') ^ n * ‖‖y‖ ^ n‖\n[PROOFSTEP]\nsimpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nhr : r' < r\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓟 (EMetric.ball (x, x) r')] fun y =>\n    ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nlift r' to ℝ≥0 using ne_top_of_lt hr\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓟 (EMetric.ball (x, x) ↑r')] fun y =>\n    ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nrcases(zero_le r').eq_or_lt with (rfl | hr'0)\n[GOAL]\ncase intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nhr : ↑0 < r\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓟 (EMetric.ball (x, x) ↑0)] fun y =>\n    ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nsimp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]\n[GOAL]\ncase intro.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓟 (EMetric.ball (x, x) ↑r')] fun y =>\n    ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nobtain ⟨a, ha, C, hC : 0 < C, hp⟩ : ∃ a ∈ Ioo (0 : ℝ) 1, ∃ C > 0, ∀ n : ℕ, ‖p n‖ * (r' : ℝ) ^ n ≤ C * a ^ n\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\n⊢ ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\ncase intro.inr.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓟 (EMetric.ball (x, x) ↑r')] fun y =>\n    ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nexact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)\n[GOAL]\ncase intro.inr.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ * ↑r' ^ n ≤ C * a ^ n\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓟 (EMetric.ball (x, x) ↑r')] fun y =>\n    ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nsimp only [← le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp \n[GOAL]\ncase intro.inr.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓟 (EMetric.ball (x, x) ↑r')] fun y =>\n    ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nset L : E × E → ℝ := fun y => C * (a / r') ^ 2 * (‖y - (x, x)‖ * ‖y.1 - y.2‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\n[GOAL]\ncase intro.inr.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓟 (EMetric.ball (x, x) ↑r')] fun y =>\n    ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nhave hL : ∀ y ∈ EMetric.ball (x, x) r', ‖f y.1 - f y.2 - p 1 fun _ => y.1 - y.2‖ ≤ L y :=\n  by\n  intro y hy'\n  have hy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r :=\n    by\n    rw [EMetric.ball_prod_same]\n    exact EMetric.ball_subset_ball hr.le hy'\n  set A : ℕ → F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x\n  have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) :=\n    by\n    convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1\n    rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self, zero_add, ←\n      Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single, ← Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x),\n      Pi.single, ← (p 1).map_sub, ← Pi.single, Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]\n  rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy' \n  set B : ℕ → ℝ := fun n => C * (a / r') ^ 2 * (‖y - (x, x)‖ * ‖y.1 - y.2‖) * ((n + 2) * a ^ n)\n  have hAB : ∀ n, ‖A (n + 2)‖ ≤ B n := fun n =>\n    calc\n      ‖A (n + 2)‖ ≤ ‖p (n + 2)‖ * ↑(n + 2) * ‖y - (x, x)‖ ^ (n + 1) * ‖y.1 - y.2‖ := by\n        -- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`simpa only [Fintype.card_fin, pi_norm_const,\n          Prod.norm_def, Pi.sub_def, Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using\n          (p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x\n      _ = ‖p (n + 2)‖ * ‖y - (x, x)‖ ^ n * (↑(n + 2) * ‖y - (x, x)‖ * ‖y.1 - y.2‖) :=\n        by\n        rw [pow_succ ‖y - (x, x)‖]\n        ring\n          -- porting note: the two `↑` in `↑r'` are new, without them, Lean fails to synthesize\n                  -- instances `HDiv ℝ ℝ≥0 ?m` or `HMul ℝ ℝ≥0 ?m`\n      _ ≤ C * a ^ (n + 2) / ↑r' ^ (n + 2) * ↑r' ^ n * (↑(n + 2) * ‖y - (x, x)‖ * ‖y.1 - y.2‖) :=\n        by\n        have : 0 < a := ha.1\n        gcongr\n        · apply hp\n        · apply hy'.le\n      _ = B n := by\n        -- porting note: in the original, `B` was in the `field_simp`, but now Lean does not\n                  -- accept it. The current proof works in Lean 4, but does not in Lean 3.\n        field_simp [pow_succ, hr'0.ne']\n        simp only [mul_assoc, mul_comm, mul_left_comm]\n  have hBL : HasSum B (L y) := by\n    apply HasSum.mul_left\n    simp only [add_mul]\n    have : ‖a‖ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]\n    rw [div_eq_mul_inv, div_eq_mul_inv]\n    exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add ((hasSum_geometric_of_norm_lt_1 this).mul_left 2)\n  exact hA.norm_le_of_bounded hBL hAB\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\n⊢ ∀ (y : E × E), y ∈ EMetric.ball (x, x) ↑r' → ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\n[PROOFSTEP]\nintro y hy'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : y ∈ EMetric.ball (x, x) ↑r'\n⊢ ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\n[PROOFSTEP]\nhave hy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r :=\n  by\n  rw [EMetric.ball_prod_same]\n  exact EMetric.ball_subset_ball hr.le hy'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : y ∈ EMetric.ball (x, x) ↑r'\n⊢ y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\n[PROOFSTEP]\nrw [EMetric.ball_prod_same]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : y ∈ EMetric.ball (x, x) ↑r'\n⊢ y ∈ EMetric.ball (x, x) r\n[PROOFSTEP]\nexact EMetric.ball_subset_ball hr.le hy'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : y ∈ EMetric.ball (x, x) ↑r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\n⊢ ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\n[PROOFSTEP]\nset A : ℕ → F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : y ∈ EMetric.ball (x, x) ↑r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\n⊢ ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\n[PROOFSTEP]\nhave hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) :=\n  by\n  convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1\n  rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self, zero_add, ←\n    Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single, ← Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x),\n    Pi.single, ← (p 1).map_sub, ← Pi.single, Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : y ∈ EMetric.ball (x, x) ↑r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\n⊢ HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\n[PROOFSTEP]\nconvert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : y ∈ EMetric.ball (x, x) ↑r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\n⊢ (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =\n    f y.fst - f y.snd - ∑ i in Finset.range 2, ((↑(p i) fun x_1 => y.fst - x) - ↑(p i) fun x_1 => y.snd - x)\n[PROOFSTEP]\nrw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self, zero_add, ←\n  Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single, ← Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x),\n  Pi.single, ← (p 1).map_sub, ← Pi.single, Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : y ∈ EMetric.ball (x, x) ↑r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\n⊢ ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\n[PROOFSTEP]\nrw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy' \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\n⊢ ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\n[PROOFSTEP]\nset B : ℕ → ℝ := fun n => C * (a / r') ^ 2 * (‖y - (x, x)‖ * ‖y.1 - y.2‖) * ((n + 2) * a ^ n)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\n⊢ ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\n[PROOFSTEP]\nhave hAB : ∀ n, ‖A (n + 2)‖ ≤ B n := fun n =>\n  calc\n    ‖A (n + 2)‖ ≤ ‖p (n + 2)‖ * ↑(n + 2) * ‖y - (x, x)‖ ^ (n + 1) * ‖y.1 - y.2‖ := by\n      -- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`simpa only [Fintype.card_fin, pi_norm_const,\n        Prod.norm_def, Pi.sub_def, Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using\n        (p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x\n    _ = ‖p (n + 2)‖ * ‖y - (x, x)‖ ^ n * (↑(n + 2) * ‖y - (x, x)‖ * ‖y.1 - y.2‖) :=\n      by\n      rw [pow_succ ‖y - (x, x)‖]\n      ring\n        -- porting note: the two `↑` in `↑r'` are new, without them, Lean fails to synthesize\n                -- instances `HDiv ℝ ℝ≥0 ?m` or `HMul ℝ ℝ≥0 ?m`\n    _ ≤ C * a ^ (n + 2) / ↑r' ^ (n + 2) * ↑r' ^ n * (↑(n + 2) * ‖y - (x, x)‖ * ‖y.1 - y.2‖) :=\n      by\n      have : 0 < a := ha.1\n      gcongr\n      · apply hp\n      · apply hy'.le\n    _ = B n := by\n      -- porting note: in the original, `B` was in the `field_simp`, but now Lean does not\n                -- accept it. The current proof works in Lean 4, but does not in Lean 3.\n      field_simp [pow_succ, hr'0.ne']\n      simp only [mul_assoc, mul_comm, mul_left_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nn : ℕ\n⊢ ‖A (n + 2)‖ ≤ ‖p (n + 2)‖ * ↑(n + 2) * ‖y - (x, x)‖ ^ (n + 1) * ‖y.fst - y.snd‖\n[PROOFSTEP]\nsimpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def, Prod.fst_sub, Prod.snd_sub,\n  sub_sub_sub_cancel_right] using (p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nn : ℕ\n⊢ ‖p (n + 2)‖ * ↑(n + 2) * ‖y - (x, x)‖ ^ (n + 1) * ‖y.fst - y.snd‖ =\n    ‖p (n + 2)‖ * ‖y - (x, x)‖ ^ n * (↑(n + 2) * ‖y - (x, x)‖ * ‖y.fst - y.snd‖)\n[PROOFSTEP]\nrw [pow_succ ‖y - (x, x)‖]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nn : ℕ\n⊢ ‖p (n + 2)‖ * ↑(n + 2) * (‖y - (x, x)‖ * ‖y - (x, x)‖ ^ n) * ‖y.fst - y.snd‖ =\n    ‖p (n + 2)‖ * ‖y - (x, x)‖ ^ n * (↑(n + 2) * ‖y - (x, x)‖ * ‖y.fst - y.snd‖)\n[PROOFSTEP]\nring\n  -- porting note: the two `↑` in `↑r'` are new, without them, Lean fails to synthesize\n          -- instances `HDiv ℝ ℝ≥0 ?m` or `HMul ℝ ℝ≥0 ?m`\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nn : ℕ\n⊢ ‖p (n + 2)‖ * ‖y - (x, x)‖ ^ n * (↑(n + 2) * ‖y - (x, x)‖ * ‖y.fst - y.snd‖) ≤\n    C * a ^ (n + 2) / ↑r' ^ (n + 2) * ↑r' ^ n * (↑(n + 2) * ‖y - (x, x)‖ * ‖y.fst - y.snd‖)\n[PROOFSTEP]\nhave : 0 < a := ha.1\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nn : ℕ\nthis : 0 < a\n⊢ ‖p (n + 2)‖ * ‖y - (x, x)‖ ^ n * (↑(n + 2) * ‖y - (x, x)‖ * ‖y.fst - y.snd‖) ≤\n    C * a ^ (n + 2) / ↑r' ^ (n + 2) * ↑r' ^ n * (↑(n + 2) * ‖y - (x, x)‖ * ‖y.fst - y.snd‖)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.h₁\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nn : ℕ\nthis : 0 < a\n⊢ ‖p (n + 2)‖ ≤ C * a ^ (n + 2) / ↑r' ^ (n + 2)\n[PROOFSTEP]\napply hp\n[GOAL]\ncase h.h₂.hab\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nn : ℕ\nthis : 0 < a\n⊢ ‖y - (x, x)‖ ≤ ↑r'\n[PROOFSTEP]\napply hy'.le\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nn : ℕ\n⊢ C * a ^ (n + 2) / ↑r' ^ (n + 2) * ↑r' ^ n * (↑(n + 2) * ‖y - (x, x)‖ * ‖y.fst - y.snd‖) = B n\n[PROOFSTEP]\nfield_simp [pow_succ, hr'0.ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nn : ℕ\n⊢ C * (a * (a * a ^ n)) * ↑r' ^ n * ((↑n + 2) * ‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (↑r' * ↑r') =\n    C * (a * a) * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n) * (↑r' * (↑r' * ↑r' ^ n))\n[PROOFSTEP]\nsimp only [mul_assoc, mul_comm, mul_left_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nhAB : ∀ (n : ℕ), ‖A (n + 2)‖ ≤ B n\n⊢ ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\n[PROOFSTEP]\nhave hBL : HasSum B (L y) := by\n  apply HasSum.mul_left\n  simp only [add_mul]\n  have : ‖a‖ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]\n  rw [div_eq_mul_inv, div_eq_mul_inv]\n  exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add ((hasSum_geometric_of_norm_lt_1 this).mul_left 2)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nhAB : ∀ (n : ℕ), ‖A (n + 2)‖ ≤ B n\n⊢ HasSum B (L y)\n[PROOFSTEP]\napply HasSum.mul_left\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nhAB : ∀ (n : ℕ), ‖A (n + 2)‖ ≤ B n\n⊢ HasSum (fun i => (↑i + 2) * a ^ i) (a / (1 - a) ^ 2 + 2 / (1 - a))\n[PROOFSTEP]\nsimp only [add_mul]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nhAB : ∀ (n : ℕ), ‖A (n + 2)‖ ≤ B n\n⊢ HasSum (fun i => ↑i * a ^ i + 2 * a ^ i) (a / (1 - a) ^ 2 + 2 / (1 - a))\n[PROOFSTEP]\nhave : ‖a‖ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nhAB : ∀ (n : ℕ), ‖A (n + 2)‖ ≤ B n\n⊢ ‖a‖ < 1\n[PROOFSTEP]\nsimp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nhAB : ∀ (n : ℕ), ‖A (n + 2)‖ ≤ B n\nthis : ‖a‖ < 1\n⊢ HasSum (fun i => ↑i * a ^ i + 2 * a ^ i) (a / (1 - a) ^ 2 + 2 / (1 - a))\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nhAB : ∀ (n : ℕ), ‖A (n + 2)‖ ≤ B n\nthis : ‖a‖ < 1\n⊢ HasSum (fun i => ↑i * a ^ i + 2 * a ^ i) (a * ((1 - a) ^ 2)⁻¹ + 2 * (1 - a)⁻¹)\n[PROOFSTEP]\nexact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add ((hasSum_geometric_of_norm_lt_1 this).mul_left 2)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\ny : E × E\nhy' : ‖y - (x, x)‖₊ < r'\nhy : y ∈ EMetric.ball x r ×ˢ EMetric.ball x r\nA : ℕ → F := fun n => (↑(p n) fun x_1 => y.fst - x) - ↑(p n) fun x_1 => y.snd - x\nhA : HasSum (fun n => A (n + 2)) (f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd)\nB : ℕ → ℝ := fun n => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * ((↑n + 2) * a ^ n)\nhAB : ∀ (n : ℕ), ‖A (n + 2)‖ ≤ B n\nhBL : HasSum B (L y)\n⊢ ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\n[PROOFSTEP]\nexact hA.norm_le_of_bounded hBL hAB\n[GOAL]\ncase intro.inr.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\nhL : ∀ (y : E × E), y ∈ EMetric.ball (x, x) ↑r' → ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓟 (EMetric.ball (x, x) ↑r')] fun y =>\n    ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nsuffices L =O[𝓟 (EMetric.ball (x, x) r')] fun y => ‖y - (x, x)‖ * ‖y.1 - y.2‖\n  by\n  refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this\n  rw [one_mul]\n  exact (hL y hy).trans (le_abs_self _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\nhL : ∀ (y : E × E), y ∈ EMetric.ball (x, x) ↑r' → ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\nthis : L =O[𝓟 (EMetric.ball (x, x) ↑r')] fun y => ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓟 (EMetric.ball (x, x) ↑r')] fun y =>\n    ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nrefine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\nhL : ∀ (y : E × E), y ∈ EMetric.ball (x, x) ↑r' → ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\nthis : L =O[𝓟 (EMetric.ball (x, x) ↑r')] fun y => ‖y - (x, x)‖ * ‖y.fst - y.snd‖\ny : E × E\nhy : y ∈ EMetric.ball (x, x) ↑r'\n⊢ ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ 1 * ‖L y‖\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\nhL : ∀ (y : E × E), y ∈ EMetric.ball (x, x) ↑r' → ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\nthis : L =O[𝓟 (EMetric.ball (x, x) ↑r')] fun y => ‖y - (x, x)‖ * ‖y.fst - y.snd‖\ny : E × E\nhy : y ∈ EMetric.ball (x, x) ↑r'\n⊢ ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ ‖L y‖\n[PROOFSTEP]\nexact (hL y hy).trans (le_abs_self _)\n[GOAL]\ncase intro.inr.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\nhL : ∀ (y : E × E), y ∈ EMetric.ball (x, x) ↑r' → ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\n⊢ L =O[𝓟 (EMetric.ball (x, x) ↑r')] fun y => ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nsimp_rw [mul_right_comm _ (_ * _)]\n  -- porting note: there was an `L` inside the `simp_rw`.\n[GOAL]\ncase intro.inr.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nhr : ↑r' < r\nhr'0 : 0 < r'\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhC : 0 < C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * a ^ n / ↑r' ^ n\nL : E × E → ℝ := fun y => C * (a / ↑r') ^ 2 * (‖y - (x, x)‖ * ‖y.fst - y.snd‖) * (a / (1 - a) ^ 2 + 2 / (1 - a))\nhL : ∀ (y : E × E), y ∈ EMetric.ball (x, x) ↑r' → ‖f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd‖ ≤ L y\n⊢ (fun y =>\n      C * (a / ↑r') ^ 2 * (a / (1 - a) ^ 2 + 2 / (1 - a)) *\n        (‖y - (x, x)‖ * ‖y.fst - y.snd‖)) =O[𝓟 (EMetric.ball (x, x) ↑r')]\n    fun y => ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nexact (isBigO_refl _ _).const_mul_left _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nhr : r' < r\n⊢ ∃ C,\n    ∀ (y : E),\n      y ∈ EMetric.ball x r' →\n        ∀ (z : E), z ∈ EMetric.ball x r' → ‖f y - f z - ↑(p 1) fun x => y - z‖ ≤ C * max ‖y - x‖ ‖z - x‖ * ‖y - z‖\n[PROOFSTEP]\nsimpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball, Prod.edist_eq, max_lt_iff,\n  and_imp, @forall_swap (_ < _) E] using hf.isBigO_image_sub_image_sub_deriv_principal hr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesAt f p x\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓝 (x, x)] fun y => ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nrcases hf with ⟨r, hf⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr✝ r' r : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓝 (x, x)] fun y => ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nrcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with ⟨r', r'0, h⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr✝ r'✝ r : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nr'0 : 0 < ↑r'\nh : ↑r' < r\n⊢ (fun y => f y.fst - f y.snd - ↑(p 1) fun x => y.fst - y.snd) =O[𝓝 (x, x)] fun y => ‖y - (x, x)‖ * ‖y.fst - y.snd‖\n[PROOFSTEP]\nrefine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr✝ r'✝ r : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nr' : ℝ≥0\nr'0 : 0 < ↑r'\nh : ↑r' < r\n⊢ 𝓝 (x, x) ≤ 𝓟 (EMetric.ball (x, x) ↑r')\n[PROOFSTEP]\nexact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\n⊢ TendstoUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n y) (fun y => f (x + y)) atTop\n    (Metric.ball 0 ↑r')\n[PROOFSTEP]\nobtain ⟨a, ha, C, -, hp⟩ :\n  ∃ a ∈ Ioo (0 : ℝ) 1, ∃ C > 0, ∀ y ∈ Metric.ball (0 : E) r', ∀ n, ‖f (x + y) - p.partialSum n y‖ ≤ C * a ^ n\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\n⊢ ∃ a,\n    a ∈ Ioo 0 1 ∧\n      ∃ C,\n        C > 0 ∧\n          ∀ (y : E),\n            y ∈ Metric.ball 0 ↑r' → ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * a ^ n\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhp : ∀ (y : E), y ∈ Metric.ball 0 ↑r' → ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * a ^ n\n⊢ TendstoUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n y) (fun y => f (x + y)) atTop\n    (Metric.ball 0 ↑r')\n[PROOFSTEP]\nexact hf.uniform_geometric_approx h\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhp : ∀ (y : E), y ∈ Metric.ball 0 ↑r' → ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * a ^ n\n⊢ TendstoUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n y) (fun y => f (x + y)) atTop\n    (Metric.ball 0 ↑r')\n[PROOFSTEP]\nrefine' Metric.tendstoUniformlyOn_iff.2 fun ε εpos => _\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhp : ∀ (y : E), y ∈ Metric.ball 0 ↑r' → ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * a ^ n\nε : ℝ\nεpos : ε > 0\n⊢ ∀ᶠ (n : ℕ) in atTop,\n    ∀ (x_1 : E), x_1 ∈ Metric.ball 0 ↑r' → dist (f (x + x_1)) (FormalMultilinearSeries.partialSum p n x_1) < ε\n[PROOFSTEP]\nhave L : Tendsto (fun n => (C : ℝ) * a ^ n) atTop (𝓝 ((C : ℝ) * 0)) :=\n  tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhp : ∀ (y : E), y ∈ Metric.ball 0 ↑r' → ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * a ^ n\nε : ℝ\nεpos : ε > 0\nL : Tendsto (fun n => C * a ^ n) atTop (𝓝 (C * 0))\n⊢ ∀ᶠ (n : ℕ) in atTop,\n    ∀ (x_1 : E), x_1 ∈ Metric.ball 0 ↑r' → dist (f (x + x_1)) (FormalMultilinearSeries.partialSum p n x_1) < ε\n[PROOFSTEP]\nrw [mul_zero] at L \n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhp : ∀ (y : E), y ∈ Metric.ball 0 ↑r' → ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * a ^ n\nε : ℝ\nεpos : ε > 0\nL : Tendsto (fun n => C * a ^ n) atTop (𝓝 0)\n⊢ ∀ᶠ (n : ℕ) in atTop,\n    ∀ (x_1 : E), x_1 ∈ Metric.ball 0 ↑r' → dist (f (x + x_1)) (FormalMultilinearSeries.partialSum p n x_1) < ε\n[PROOFSTEP]\nrefine' (L.eventually (gt_mem_nhds εpos)).mono fun n hn y hy => _\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhp : ∀ (y : E), y ∈ Metric.ball 0 ↑r' → ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * a ^ n\nε : ℝ\nεpos : ε > 0\nL : Tendsto (fun n => C * a ^ n) atTop (𝓝 0)\nn : ℕ\nhn : C * a ^ n < ε\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\n⊢ dist (f (x + y)) (FormalMultilinearSeries.partialSum p n y) < ε\n[PROOFSTEP]\nrw [dist_eq_norm]\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\na : ℝ\nha : a ∈ Ioo 0 1\nC : ℝ\nhp : ∀ (y : E), y ∈ Metric.ball 0 ↑r' → ∀ (n : ℕ), ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ ≤ C * a ^ n\nε : ℝ\nεpos : ε > 0\nL : Tendsto (fun n => C * a ^ n) atTop (𝓝 0)\nn : ℕ\nhn : C * a ^ n < ε\ny : E\nhy : y ∈ Metric.ball 0 ↑r'\n⊢ ‖f (x + y) - FormalMultilinearSeries.partialSum p n y‖ < ε\n[PROOFSTEP]\nexact (hp y hy n).trans_lt hn\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\n⊢ TendstoLocallyUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n y) (fun y => f (x + y)) atTop\n    (EMetric.ball 0 r)\n[PROOFSTEP]\nintro u hu x hx\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx✝ : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x✝ r\nu : Set (F × F)\nhu : u ∈ uniformity F\nx : E\nhx : x ∈ EMetric.ball 0 r\n⊢ ∃ t,\n    t ∈ 𝓝[EMetric.ball 0 r] x ∧\n      ∀ᶠ (n : ℕ) in atTop,\n        ∀ (y : E), y ∈ t → ((fun y => f (x✝ + y)) y, (fun n y => FormalMultilinearSeries.partialSum p n y) n y) ∈ u\n[PROOFSTEP]\nrcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with ⟨r', xr', hr'⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx✝ : E\nr r'✝ : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x✝ r\nu : Set (F × F)\nhu : u ∈ uniformity F\nx : E\nhx : x ∈ EMetric.ball 0 r\nr' : ℝ≥0\nxr' : edist x 0 < ↑r'\nhr' : ↑r' < r\n⊢ ∃ t,\n    t ∈ 𝓝[EMetric.ball 0 r] x ∧\n      ∀ᶠ (n : ℕ) in atTop,\n        ∀ (y : E), y ∈ t → ((fun y => f (x✝ + y)) y, (fun n y => FormalMultilinearSeries.partialSum p n y) n y) ∈ u\n[PROOFSTEP]\nhave : EMetric.ball (0 : E) r' ∈ 𝓝 x := IsOpen.mem_nhds EMetric.isOpen_ball xr'\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx✝ : E\nr r'✝ : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x✝ r\nu : Set (F × F)\nhu : u ∈ uniformity F\nx : E\nhx : x ∈ EMetric.ball 0 r\nr' : ℝ≥0\nxr' : edist x 0 < ↑r'\nhr' : ↑r' < r\nthis : EMetric.ball 0 ↑r' ∈ 𝓝 x\n⊢ ∃ t,\n    t ∈ 𝓝[EMetric.ball 0 r] x ∧\n      ∀ᶠ (n : ℕ) in atTop,\n        ∀ (y : E), y ∈ t → ((fun y => f (x✝ + y)) y, (fun n y => FormalMultilinearSeries.partialSum p n y) n y) ∈ u\n[PROOFSTEP]\nrefine' ⟨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx✝ : E\nr r'✝ : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x✝ r\nu : Set (F × F)\nhu : u ∈ uniformity F\nx : E\nhx : x ∈ EMetric.ball 0 r\nr' : ℝ≥0\nxr' : edist x 0 < ↑r'\nhr' : ↑r' < r\nthis : EMetric.ball 0 ↑r' ∈ 𝓝 x\n⊢ ∀ᶠ (n : ℕ) in atTop,\n    ∀ (y : E),\n      y ∈ EMetric.ball 0 ↑r' → ((fun y => f (x✝ + y)) y, (fun n y => FormalMultilinearSeries.partialSum p n y) n y) ∈ u\n[PROOFSTEP]\nsimpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\n⊢ TendstoUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n (y - x)) f atTop (Metric.ball x ↑r')\n[PROOFSTEP]\nconvert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\n⊢ f = (fun y => f (x + y)) ∘ fun y => y - x\n[PROOFSTEP]\nsimp [(· ∘ ·)]\n[GOAL]\ncase h.e'_8\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\n⊢ Metric.ball x ↑r' = (fun y => y - x) ⁻¹' Metric.ball 0 ↑r'\n[PROOFSTEP]\next z\n[GOAL]\ncase h.e'_8.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r'✝ : ℝ≥0∞\nr' : ℝ≥0\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑r' < r\nz : E\n⊢ z ∈ Metric.ball x ↑r' ↔ z ∈ (fun y => y - x) ⁻¹' Metric.ball 0 ↑r'\n[PROOFSTEP]\nsimp [dist_eq_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\n⊢ TendstoLocallyUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n (y - x)) f atTop (EMetric.ball x r)\n[PROOFSTEP]\nhave A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) := (continuous_id.sub continuous_const).continuousOn\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nA : ContinuousOn (fun y => y - x) (EMetric.ball x r)\n⊢ TendstoLocallyUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n (y - x)) f atTop (EMetric.ball x r)\n[PROOFSTEP]\nconvert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1\n[GOAL]\ncase h.e'_7\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nA : ContinuousOn (fun y => y - x) (EMetric.ball x r)\n⊢ f = (fun y => f (x + y)) ∘ fun y => y - x\n[PROOFSTEP]\next z\n[GOAL]\ncase h.e'_7.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nA : ContinuousOn (fun y => y - x) (EMetric.ball x r)\nz : E\n⊢ f z = ((fun y => f (x + y)) ∘ fun y => y - x) z\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nA : ContinuousOn (fun y => y - x) (EMetric.ball x r)\n⊢ MapsTo (fun y => y - x) (EMetric.ball x r) (EMetric.ball 0 r)\n[PROOFSTEP]\nintro z\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nA : ContinuousOn (fun y => y - x) (EMetric.ball x r)\nz : E\n⊢ z ∈ EMetric.ball x r → (fun y => y - x) z ∈ EMetric.ball 0 r\n[PROOFSTEP]\nsimp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nf g : E → F\np✝ pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nh : 0 < radius p\ny✝ : E\nhy : y✝ ∈ EMetric.ball 0 (radius p)\n⊢ HasSum (fun n => ↑(p n) fun x => y✝) (FormalMultilinearSeries.sum p (0 + y✝))\n[PROOFSTEP]\nrw [zero_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nf g : E → F\np✝ pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nh : 0 < radius p\ny✝ : E\nhy : y✝ ∈ EMetric.ball 0 (radius p)\n⊢ HasSum (fun n => ↑(p n) fun x => y✝) (FormalMultilinearSeries.sum p y✝)\n[PROOFSTEP]\nexact p.hasSum hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\ninst✝ : CompleteSpace F\n⊢ ContinuousOn (FormalMultilinearSeries.sum p) (EMetric.ball 0 (radius p))\n[PROOFSTEP]\ncases' (zero_le p.radius).eq_or_lt with h h\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\ninst✝ : CompleteSpace F\nh : 0 = radius p\n⊢ ContinuousOn (FormalMultilinearSeries.sum p) (EMetric.ball 0 (radius p))\n[PROOFSTEP]\nsimp [← h, continuousOn_empty]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\nf g : E → F\np pf pg : FormalMultilinearSeries 𝕜 E F\nx : E\nr r' : ℝ≥0∞\ninst✝ : CompleteSpace F\nh : 0 < radius p\n⊢ ContinuousOn (FormalMultilinearSeries.sum p) (EMetric.ball 0 (radius p))\n[PROOFSTEP]\nexact (p.hasFPowerSeriesOnBall h).continuousOn\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nh : (fun y => ↑p fun x => y) =O[𝓝 0] fun y => ‖y‖ ^ (n + 1)\ny : E\n⊢ (↑p fun x => y) = 0\n[PROOFSTEP]\nobtain ⟨c, c_pos, hc⟩ := h.exists_pos\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nh : (fun y => ↑p fun x => y) =O[𝓝 0] fun y => ‖y‖ ^ (n + 1)\ny : E\nc : ℝ\nc_pos : 0 < c\nhc : IsBigOWith c (𝓝 0) (fun y => ↑p fun x => y) fun y => ‖y‖ ^ (n + 1)\n⊢ (↑p fun x => y) = 0\n[PROOFSTEP]\nobtain ⟨t, ht, t_open, z_mem⟩ := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nh : (fun y => ↑p fun x => y) =O[𝓝 0] fun y => ‖y‖ ^ (n + 1)\ny : E\nc : ℝ\nc_pos : 0 < c\nhc : IsBigOWith c (𝓝 0) (fun y => ↑p fun x => y) fun y => ‖y‖ ^ (n + 1)\nt : Set E\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (n + 1)‖\nt_open : IsOpen t\nz_mem : 0 ∈ t\n⊢ (↑p fun x => y) = 0\n[PROOFSTEP]\nobtain ⟨δ, δ_pos, δε⟩ := (Metric.isOpen_iff.mp t_open) 0 z_mem\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nh : (fun y => ↑p fun x => y) =O[𝓝 0] fun y => ‖y‖ ^ (n + 1)\ny : E\nc : ℝ\nc_pos : 0 < c\nhc : IsBigOWith c (𝓝 0) (fun y => ↑p fun x => y) fun y => ‖y‖ ^ (n + 1)\nt : Set E\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (n + 1)‖\nt_open : IsOpen t\nz_mem : 0 ∈ t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\n⊢ (↑p fun x => y) = 0\n[PROOFSTEP]\nclear h hc z_mem\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (n + 1)‖\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\n⊢ (↑p fun x => y) = 0\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.zero\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.zero + 1)‖\n⊢ (↑p fun x => y) = 0\n[PROOFSTEP]\nexact\n  norm_eq_zero.mp\n    (by\n      -- porting note: the symmetric difference of the `simpa only` sets:\n            -- added `Nat.zero_eq, zero_add, pow_one`\n            -- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`simpa only [Nat.zero_eq, fin0_apply_norm,\n        norm_eq_zero, norm_zero, zero_add, pow_one, mul_zero, norm_le_zero_iff] using\n        ht 0 (δε (Metric.mem_ball_self δ_pos)))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.zero + 1)‖\n⊢ ‖↑p fun x => y‖ = 0\n[PROOFSTEP]\nsimpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one, mul_zero, norm_le_zero_iff] using\n  ht 0 (δε (Metric.mem_ball_self δ_pos))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\n⊢ (↑p fun x => y) = 0\n[PROOFSTEP]\nrefine' Or.elim (Classical.em (y = 0)) (fun hy => by simpa only [hy] using p.map_zero) fun hy => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : y = 0\n⊢ (↑p fun x => y) = 0\n[PROOFSTEP]\nsimpa only [hy] using p.map_zero\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : ¬y = 0\n⊢ (↑p fun x => y) = 0\n[PROOFSTEP]\nreplace hy := norm_pos_iff.mpr hy\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\n⊢ (↑p fun x => y) = 0\n[PROOFSTEP]\nrefine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun ε ε_pos => _) (norm_nonneg _))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\n⊢ ‖↑p fun x => y‖ ≤ 0 + ε\n[PROOFSTEP]\nhave h₀ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\n⊢ ‖↑p fun x => y‖ ≤ 0 + ε\n[PROOFSTEP]\nobtain ⟨k, k_pos, k_norm⟩ :=\n  NormedField.exists_norm_lt 𝕜 (lt_min (mul_pos δ_pos (inv_pos.mpr hy)) (mul_pos ε_pos (inv_pos.mpr h₀)))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.succ.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\n⊢ ‖↑p fun x => y‖ ≤ 0 + ε\n[PROOFSTEP]\nhave h₁ : ‖k • y‖ < δ := by\n  rw [norm_smul]\n  exact inv_mul_cancel_right₀ hy.ne.symm δ ▸ mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\n⊢ ‖k • y‖ < δ\n[PROOFSTEP]\nrw [norm_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\n⊢ ‖k‖ * ‖y‖ < δ\n[PROOFSTEP]\nexact inv_mul_cancel_right₀ hy.ne.symm δ ▸ mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.succ.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\nh₁ : ‖k • y‖ < δ\n⊢ ‖↑p fun x => y‖ ≤ 0 + ε\n[PROOFSTEP]\nhave h₂ :=\n  calc\n    ‖p fun _ => k • y‖ ≤ c * ‖k • y‖ ^ (n.succ + 1) := by\n      -- porting note: now Lean wants `_root_.`simpa only [norm_pow, _root_.norm_norm] using\n        ht (k • y)\n          (δε (mem_ball_zero_iff.mpr h₁))\n            --simpa only [norm_pow, norm_norm] using ht (k • y) (δε (mem_ball_zero_iff.mpr h₁))\n    _ = ‖k‖ ^ n.succ * (‖k‖ * (c * ‖y‖ ^ (n.succ + 1))) := by\n      -- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.\n      simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]\n        -- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.\n      ring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\nh₁ : ‖k • y‖ < δ\n⊢ ‖↑p fun x => k • y‖ ≤ c * ‖k • y‖ ^ (Nat.succ n + 1)\n[PROOFSTEP]\nsimpa only [norm_pow, _root_.norm_norm] using\n  ht (k • y)\n    (δε (mem_ball_zero_iff.mpr h₁))\n      --simpa only [norm_pow, norm_norm] using ht (k • y) (δε (mem_ball_zero_iff.mpr h₁))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\nh₁ : ‖k • y‖ < δ\n⊢ c * ‖k • y‖ ^ (Nat.succ n + 1) = ‖k‖ ^ Nat.succ n * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)))\n[PROOFSTEP]\nsimp only [norm_smul, mul_pow, Nat.succ_eq_add_one]\n  -- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\nh₁ : ‖k • y‖ < δ\n⊢ c * (‖k‖ ^ (n + 1 + 1) * ‖y‖ ^ (n + 1 + 1)) = ‖k‖ ^ (n + 1) * (‖k‖ * (c * ‖y‖ ^ (n + 1 + 1)))\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.succ.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\nh₁ : ‖k • y‖ < δ\nh₂ : ‖↑p fun x => k • y‖ ≤ ‖k‖ ^ Nat.succ n * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)))\n⊢ ‖↑p fun x => y‖ ≤ 0 + ε\n[PROOFSTEP]\nhave h₃ : ‖k‖ * (c * ‖y‖ ^ (n.succ + 1)) < ε :=\n  inv_mul_cancel_right₀ h₀.ne.symm ε ▸ mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) h₀\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.succ.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\nh₁ : ‖k • y‖ < δ\nh₂ : ‖↑p fun x => k • y‖ ≤ ‖k‖ ^ Nat.succ n * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)))\nh₃ : ‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)) < ε\n⊢ ‖↑p fun x => y‖ ≤ 0 + ε\n[PROOFSTEP]\ncalc\n  ‖p fun _ => y‖ = ‖k⁻¹ ^ n.succ‖ * ‖p fun _ => k • y‖ := by\n    simpa only [inv_smul_smul₀ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const, Finset.card_fin] using\n      congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => k⁻¹) fun _ : Fin n.succ => k • y)\n  _ ≤ ‖k⁻¹ ^ n.succ‖ * (‖k‖ ^ n.succ * (‖k‖ * (c * ‖y‖ ^ (n.succ + 1)))) := by gcongr\n  _ = ‖(k⁻¹ * k) ^ n.succ‖ * (‖k‖ * (c * ‖y‖ ^ (n.succ + 1))) :=\n    by\n    rw [← mul_assoc]\n    simp [norm_mul, mul_pow]\n  _ ≤ 0 + ε := by\n    rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]\n    simpa using h₃.le\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\nh₁ : ‖k • y‖ < δ\nh₂ : ‖↑p fun x => k • y‖ ≤ ‖k‖ ^ Nat.succ n * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)))\nh₃ : ‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)) < ε\n⊢ ‖↑p fun x => y‖ = ‖k⁻¹ ^ Nat.succ n‖ * ‖↑p fun x => k • y‖\n[PROOFSTEP]\nsimpa only [inv_smul_smul₀ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const, Finset.card_fin] using\n  congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => k⁻¹) fun _ : Fin n.succ => k • y)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\nh₁ : ‖k • y‖ < δ\nh₂ : ‖↑p fun x => k • y‖ ≤ ‖k‖ ^ Nat.succ n * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)))\nh₃ : ‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)) < ε\n⊢ ‖k⁻¹ ^ Nat.succ n‖ * ‖↑p fun x => k • y‖ ≤\n    ‖k⁻¹ ^ Nat.succ n‖ * (‖k‖ ^ Nat.succ n * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1))))\n[PROOFSTEP]\ngcongr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\nh₁ : ‖k • y‖ < δ\nh₂ : ‖↑p fun x => k • y‖ ≤ ‖k‖ ^ Nat.succ n * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)))\nh₃ : ‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)) < ε\n⊢ ‖k⁻¹ ^ Nat.succ n‖ * (‖k‖ ^ Nat.succ n * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)))) =\n    ‖(k⁻¹ * k) ^ Nat.succ n‖ * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)))\n[PROOFSTEP]\nrw [← mul_assoc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\nh₁ : ‖k • y‖ < δ\nh₂ : ‖↑p fun x => k • y‖ ≤ ‖k‖ ^ Nat.succ n * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)))\nh₃ : ‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)) < ε\n⊢ ‖k⁻¹ ^ Nat.succ n‖ * ‖k‖ ^ Nat.succ n * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1))) =\n    ‖(k⁻¹ * k) ^ Nat.succ n‖ * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)))\n[PROOFSTEP]\nsimp [norm_mul, mul_pow]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\nh₁ : ‖k • y‖ < δ\nh₂ : ‖↑p fun x => k • y‖ ≤ ‖k‖ ^ Nat.succ n * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)))\nh₃ : ‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)) < ε\n⊢ ‖(k⁻¹ * k) ^ Nat.succ n‖ * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1))) ≤ 0 + ε\n[PROOFSTEP]\nrw [inv_mul_cancel (norm_pos_iff.mp k_pos)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\ny : E\nc : ℝ\nc_pos : 0 < c\nt : Set E\nt_open : IsOpen t\nδ : ℝ\nδ_pos : δ > 0\nδε : Metric.ball 0 δ ⊆ t\nn : ℕ\np : ContinuousMultilinearMap 𝕜 (fun i => E) F\nht : ∀ (x : E), x ∈ t → ‖↑p fun x_1 => x‖ ≤ c * ‖‖x‖ ^ (Nat.succ n + 1)‖\nhy : 0 < ‖y‖\nε : ℝ\nε_pos : 0 < ε\nh₀ : 0 < c * ‖y‖ ^ (Nat.succ n + 1)\nk : 𝕜\nk_pos : 0 < ‖k‖\nk_norm : ‖k‖ < min (δ * ‖y‖⁻¹) (ε * (c * ‖y‖ ^ (Nat.succ n + 1))⁻¹)\nh₁ : ‖k • y‖ < δ\nh₂ : ‖↑p fun x => k • y‖ ≤ ‖k‖ ^ Nat.succ n * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)))\nh₃ : ‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1)) < ε\n⊢ ‖1 ^ Nat.succ n‖ * (‖k‖ * (c * ‖y‖ ^ (Nat.succ n + 1))) ≤ 0 + ε\n[PROOFSTEP]\nsimpa using h₃.le\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nh : HasFPowerSeriesAt 0 p x\nn : ℕ\n⊢ ∀ (y : E), (↑(p n) fun x => y) = 0\n[PROOFSTEP]\nrefine' Nat.strong_induction_on n fun k hk => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nh : HasFPowerSeriesAt 0 p x\nn k : ℕ\nhk : ∀ (m : ℕ), m < k → ∀ (y : E), (↑(p m) fun x => y) = 0\n⊢ ∀ (y : E), (↑(p k) fun x => y) = 0\n[PROOFSTEP]\nhave psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y :=\n  by\n  funext z\n  refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _\n  · have := Finset.mem_range_succ_iff.mp hb\n    simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]\n  · exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nh : HasFPowerSeriesAt 0 p x\nn k : ℕ\nhk : ∀ (m : ℕ), m < k → ∀ (y : E), (↑(p m) fun x => y) = 0\n⊢ FormalMultilinearSeries.partialSum p (k + 1) = fun y => ↑(p k) fun x => y\n[PROOFSTEP]\nfunext z\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nh : HasFPowerSeriesAt 0 p x\nn k : ℕ\nhk : ∀ (m : ℕ), m < k → ∀ (y : E), (↑(p m) fun x => y) = 0\nz : E\n⊢ FormalMultilinearSeries.partialSum p (k + 1) z = ↑(p k) fun x => z\n[PROOFSTEP]\nrefine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _\n[GOAL]\ncase h.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nh : HasFPowerSeriesAt 0 p x\nn k : ℕ\nhk : ∀ (m : ℕ), m < k → ∀ (y : E), (↑(p m) fun x => y) = 0\nz : E\nb : ℕ\nhb : b ∈ Finset.range (k + 1)\nhnb : b ≠ k\n⊢ (↑(p b) fun x => z) = 0\n[PROOFSTEP]\nhave := Finset.mem_range_succ_iff.mp hb\n[GOAL]\ncase h.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nh : HasFPowerSeriesAt 0 p x\nn k : ℕ\nhk : ∀ (m : ℕ), m < k → ∀ (y : E), (↑(p m) fun x => y) = 0\nz : E\nb : ℕ\nhb : b ∈ Finset.range (k + 1)\nhnb : b ≠ k\nthis : b ≤ k\n⊢ (↑(p b) fun x => z) = 0\n[PROOFSTEP]\nsimp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]\n[GOAL]\ncase h.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nh : HasFPowerSeriesAt 0 p x\nn k : ℕ\nhk : ∀ (m : ℕ), m < k → ∀ (y : E), (↑(p m) fun x => y) = 0\nz : E\nhn : ¬k ∈ Finset.range (k + 1)\n⊢ (↑(p k) fun x => z) = 0\n[PROOFSTEP]\nexact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nh : HasFPowerSeriesAt 0 p x\nn k : ℕ\nhk : ∀ (m : ℕ), m < k → ∀ (y : E), (↑(p m) fun x => y) = 0\npsum_eq : FormalMultilinearSeries.partialSum p (k + 1) = fun y => ↑(p k) fun x => y\n⊢ ∀ (y : E), (↑(p k) fun x => y) = 0\n[PROOFSTEP]\nreplace h := h.isBigO_sub_partialSum_pow k.succ\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nn k : ℕ\nhk : ∀ (m : ℕ), m < k → ∀ (y : E), (↑(p m) fun x => y) = 0\npsum_eq : FormalMultilinearSeries.partialSum p (k + 1) = fun y => ↑(p k) fun x => y\nh :\n  (fun y => OfNat.ofNat 0 (x + y) - FormalMultilinearSeries.partialSum p (Nat.succ k) y) =O[𝓝 0] fun y =>\n    ‖y‖ ^ Nat.succ k\n⊢ ∀ (y : E), (↑(p k) fun x => y) = 0\n[PROOFSTEP]\nsimp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx : E\nn k : ℕ\nhk : ∀ (m : ℕ), m < k → ∀ (y : E), (↑(p m) fun x => y) = 0\npsum_eq : FormalMultilinearSeries.partialSum p (k + 1) = fun y => ↑(p k) fun x => y\nh : (fun x => ↑(p k) fun x_1 => x) =O[𝓝 0] fun y => ‖y‖ ^ Nat.succ k\n⊢ ∀ (y : E), (↑(p k) fun x => y) = 0\n[PROOFSTEP]\nexact h.continuousMultilinearMap_apply_eq_zero\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nx : 𝕜\nh : HasFPowerSeriesAt 0 p x\n⊢ p = 0\n[PROOFSTEP]\nfunext n\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nx : 𝕜\nh : HasFPowerSeriesAt 0 p x\nn : ℕ\n⊢ p n = OfNat.ofNat 0 n\n[PROOFSTEP]\next x\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nx✝ : 𝕜\nh : HasFPowerSeriesAt 0 p x✝\nn : ℕ\nx : Fin n → 𝕜\n⊢ ↑(p n) x = ↑(OfNat.ofNat 0 n) x\n[PROOFSTEP]\nrw [← mkPiField_apply_one_eq_self (p n)]\n  -- porting note: nasty hack, was `simp [h.apply_eq_zero n 1]`\n[GOAL]\ncase h.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nx✝ : 𝕜\nh : HasFPowerSeriesAt 0 p x✝\nn : ℕ\nx : Fin n → 𝕜\n⊢ ↑(ContinuousMultilinearMap.mkPiField 𝕜 (Fin n) (↑(p n) fun x => 1)) x = ↑(OfNat.ofNat 0 n) x\n[PROOFSTEP]\nhave := Or.intro_right ?_ (h.apply_eq_zero n 1)\n[GOAL]\ncase h.H.refine_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nx✝ : 𝕜\nh : HasFPowerSeriesAt 0 p x✝\nn : ℕ\nx : Fin n → 𝕜\nthis : ?h.H.refine_1 ∨ (↑(p n) fun x => 1) = 0\n⊢ ↑(ContinuousMultilinearMap.mkPiField 𝕜 (Fin n) (↑(p n) fun x => 1)) x = ↑(OfNat.ofNat 0 n) x\ncase h.H.refine_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nx✝ : 𝕜\nh : HasFPowerSeriesAt 0 p x✝\nn : ℕ\nx : Fin n → 𝕜\n⊢ Prop\n[PROOFSTEP]\nsimpa using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np₁ p₂ : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nx : 𝕜\nh₁ : HasFPowerSeriesAt f p₁ x\nh₂ : HasFPowerSeriesAt f p₂ x\n⊢ HasFPowerSeriesAt 0 (p₁ - p₂) (?m.1079515 h₁ h₂)\n[PROOFSTEP]\nsimpa only [sub_self] using h₁.sub h₂\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\n⊢ ContinuousMultilinearMap 𝕜 (fun i => E) (ContinuousMultilinearMap 𝕜 (fun i => E) F)\n[PROOFSTEP]\nlet a :=\n  ContinuousMultilinearMap.curryFinFinset 𝕜 E F hs\n    (by erw [Finset.card_compl, Fintype.card_fin, hs, add_tsub_cancel_right])\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\n⊢ Finset.card sᶜ = ?m.1109107\n[PROOFSTEP]\nerw [Finset.card_compl, Fintype.card_fin, hs, add_tsub_cancel_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\na : ContinuousMultilinearMap 𝕜 (fun i => E) F ≃ₗᵢ[𝕜]\n  ContinuousMultilinearMap 𝕜 (fun i => E) (ContinuousMultilinearMap 𝕜 (fun i => E) F) :=\n  ContinuousMultilinearMap.curryFinFinset 𝕜 E F hs (_ : Finset.card sᶜ = k)\n⊢ ContinuousMultilinearMap 𝕜 (fun i => E) (ContinuousMultilinearMap 𝕜 (fun i => E) F)\n[PROOFSTEP]\nexact a (p (k + l))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\n⊢ ‖changeOriginSeriesTerm p k l s hs‖ = ‖p (k + l)‖\n[PROOFSTEP]\nsimp only [changeOriginSeriesTerm, LinearIsometryEquiv.norm_map]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\n⊢ ‖changeOriginSeriesTerm p k l s hs‖₊ = ‖p (k + l)‖₊\n[PROOFSTEP]\nsimp only [changeOriginSeriesTerm, LinearIsometryEquiv.nnnorm_map]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx✝ y✝ : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\nx y : E\n⊢ ‖↑(↑(changeOriginSeriesTerm p k l s hs) fun x_1 => x) fun x => y‖₊ ≤ ‖p (k + l)‖₊ * ‖x‖₊ ^ l * ‖y‖₊ ^ k\n[PROOFSTEP]\nrw [← p.nnnorm_changeOriginSeriesTerm k l s hs, ← Fin.prod_const, ← Fin.prod_const]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx✝ y✝ : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\nx y : E\n⊢ ‖↑(↑(changeOriginSeriesTerm p k l s hs) fun x_1 => x) fun x => y‖₊ ≤\n    (‖changeOriginSeriesTerm p k l s hs‖₊ * ∏ _i : Fin l, ‖x‖₊) * ∏ _i : Fin k, ‖y‖₊\n[PROOFSTEP]\napply ContinuousMultilinearMap.le_of_op_nnnorm_le\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx✝ y✝ : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\nx y : E\n⊢ ‖↑(changeOriginSeriesTerm p k l s hs) fun x_1 => x‖₊ ≤ ‖changeOriginSeriesTerm p k l s hs‖₊ * ∏ _i : Fin l, ‖x‖₊\n[PROOFSTEP]\napply ContinuousMultilinearMap.le_op_nnnorm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk l : ℕ\n⊢ ∑ a : { s // Finset.card s = l }, ‖changeOriginSeriesTerm p k l ↑a (_ : Finset.card ↑a = l)‖₊ =\n    ∑' (x : { s // Finset.card s = l }), ‖p (k + l)‖₊\n[PROOFSTEP]\nsimp_rw [tsum_fintype, nnnorm_changeOriginSeriesTerm (p := p) (k := k) (l := l)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx✝ y : E\nr R : ℝ≥0\nk l : ℕ\nx : E\n⊢ ‖↑(changeOriginSeries p k l) fun x_1 => x‖₊ ≤ ∑' (x_1 : { s // Finset.card s = l }), ‖p (k + l)‖₊ * ‖x‖₊ ^ l\n[PROOFSTEP]\nrw [NNReal.tsum_mul_right, ← Fin.prod_const]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx✝ y : E\nr R : ℝ≥0\nk l : ℕ\nx : E\n⊢ ‖↑(changeOriginSeries p k l) fun x_1 => x‖₊ ≤ (∑' (x : { s // Finset.card s = l }), ‖p (k + l)‖₊) * ∏ _i : Fin l, ‖x‖₊\n[PROOFSTEP]\nexact (p.changeOriginSeries k l).le_of_op_nnnorm_le _ (p.nnnorm_changeOriginSeries_le_tsum _ _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\n⊢ Function.LeftInverse\n    (fun s =>\n      { fst := s.fst - Finset.card s.snd,\n        snd :=\n          { fst := Finset.card s.snd,\n            snd :=\n              {\n                val :=\n                  Finset.map\n                    (Equiv.toEmbedding\n                      (Fin.castIso (_ : s.fst = s.fst - Finset.card s.snd + Finset.card s.snd)).toEquiv)\n                    s.snd,\n                property :=\n                  (_ :\n                    Finset.card\n                        (Finset.map\n                          (Equiv.toEmbedding\n                            (Fin.castIso (_ : s.fst = s.fst - Finset.card s.snd + Finset.card s.snd)).toEquiv)\n                          s.snd) =\n                      Finset.card s.snd) } } })\n    fun s => { fst := s.fst + s.snd.fst, snd := ↑s.snd.snd }\n[PROOFSTEP]\nrintro ⟨k, l, ⟨s : Finset (Fin <| k + l), hs : s.card = l⟩⟩\n[GOAL]\ncase mk.mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\n⊢ (fun s =>\n        { fst := s.fst - Finset.card s.snd,\n          snd :=\n            { fst := Finset.card s.snd,\n              snd :=\n                {\n                  val :=\n                    Finset.map\n                      (Equiv.toEmbedding\n                        (Fin.castIso (_ : s.fst = s.fst - Finset.card s.snd + Finset.card s.snd)).toEquiv)\n                      s.snd,\n                  property :=\n                    (_ :\n                      Finset.card\n                          (Finset.map\n                            (Equiv.toEmbedding\n                              (Fin.castIso (_ : s.fst = s.fst - Finset.card s.snd + Finset.card s.snd)).toEquiv)\n                            s.snd) =\n                        Finset.card s.snd) } } })\n      ((fun s => { fst := s.fst + s.snd.fst, snd := ↑s.snd.snd })\n        { fst := k, snd := { fst := l, snd := { val := s, property := hs } } }) =\n    { fst := k, snd := { fst := l, snd := { val := s, property := hs } } }\n[PROOFSTEP]\ndsimp only [Subtype.coe_mk]\n  -- Lean can't automatically generalize `k' = k + l - s.card`, `l' = s.card`, so we explicitly\n      -- formulate the generalized goal\n[GOAL]\ncase mk.mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\n⊢ { fst := k + l - Finset.card s,\n      snd :=\n        { fst := Finset.card s,\n          snd :=\n            {\n              val :=\n                Finset.map (Equiv.toEmbedding (Fin.castIso (_ : k + l = k + l - Finset.card s + Finset.card s)).toEquiv)\n                  s,\n              property :=\n                (_ :\n                  Finset.card\n                      (Finset.map\n                        (Equiv.toEmbedding (Fin.castIso (_ : k + l = k + l - Finset.card s + Finset.card s)).toEquiv)\n                        s) =\n                    Finset.card s) } } } =\n    { fst := k, snd := { fst := l, snd := { val := s, property := hs } } }\n[PROOFSTEP]\nsuffices\n  ∀ k' l',\n    k' = k →\n      l' = l →\n        ∀ (hkl : k + l = k' + l') (hs'),\n          (⟨k', l', ⟨Finset.map (Fin.castIso hkl).toEquiv.toEmbedding s, hs'⟩⟩ :\n              Σ k l : ℕ, { s : Finset (Fin (k + l)) // s.card = l }) =\n            ⟨k, l, ⟨s, hs⟩⟩\n  by apply this <;> simp only [hs, add_tsub_cancel_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\nthis :\n  ∀ (k' l' : ℕ),\n    k' = k →\n      l' = l →\n        ∀ (hkl : k + l = k' + l') (hs' : Finset.card (Finset.map (Equiv.toEmbedding (Fin.castIso hkl).toEquiv) s) = l'),\n          { fst := k',\n              snd :=\n                { fst := l',\n                  snd := { val := Finset.map (Equiv.toEmbedding (Fin.castIso hkl).toEquiv) s, property := hs' } } } =\n            { fst := k, snd := { fst := l, snd := { val := s, property := hs } } }\n⊢ { fst := k + l - Finset.card s,\n      snd :=\n        { fst := Finset.card s,\n          snd :=\n            {\n              val :=\n                Finset.map (Equiv.toEmbedding (Fin.castIso (_ : k + l = k + l - Finset.card s + Finset.card s)).toEquiv)\n                  s,\n              property :=\n                (_ :\n                  Finset.card\n                      (Finset.map\n                        (Equiv.toEmbedding (Fin.castIso (_ : k + l = k + l - Finset.card s + Finset.card s)).toEquiv)\n                        s) =\n                    Finset.card s) } } } =\n    { fst := k, snd := { fst := l, snd := { val := s, property := hs } } }\n[PROOFSTEP]\napply this\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\nthis :\n  ∀ (k' l' : ℕ),\n    k' = k →\n      l' = l →\n        ∀ (hkl : k + l = k' + l') (hs' : Finset.card (Finset.map (Equiv.toEmbedding (Fin.castIso hkl).toEquiv) s) = l'),\n          { fst := k',\n              snd :=\n                { fst := l',\n                  snd := { val := Finset.map (Equiv.toEmbedding (Fin.castIso hkl).toEquiv) s, property := hs' } } } =\n            { fst := k, snd := { fst := l, snd := { val := s, property := hs } } }\n⊢ k + l - Finset.card s = k\n[PROOFSTEP]\nsimp only [hs, add_tsub_cancel_right]\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\nthis :\n  ∀ (k' l' : ℕ),\n    k' = k →\n      l' = l →\n        ∀ (hkl : k + l = k' + l') (hs' : Finset.card (Finset.map (Equiv.toEmbedding (Fin.castIso hkl).toEquiv) s) = l'),\n          { fst := k',\n              snd :=\n                { fst := l',\n                  snd := { val := Finset.map (Equiv.toEmbedding (Fin.castIso hkl).toEquiv) s, property := hs' } } } =\n            { fst := k, snd := { fst := l, snd := { val := s, property := hs } } }\n⊢ Finset.card s = l\n[PROOFSTEP]\nsimp only [hs, add_tsub_cancel_right]\n[GOAL]\ncase mk.mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\n⊢ ∀ (k' l' : ℕ),\n    k' = k →\n      l' = l →\n        ∀ (hkl : k + l = k' + l') (hs' : Finset.card (Finset.map (Equiv.toEmbedding (Fin.castIso hkl).toEquiv) s) = l'),\n          { fst := k',\n              snd :=\n                { fst := l',\n                  snd := { val := Finset.map (Equiv.toEmbedding (Fin.castIso hkl).toEquiv) s, property := hs' } } } =\n            { fst := k, snd := { fst := l, snd := { val := s, property := hs } } }\n[PROOFSTEP]\nrintro _ _ rfl rfl hkl hs'\n[GOAL]\ncase mk.mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk'✝ l'✝ : ℕ\ns : Finset (Fin (k'✝ + l'✝))\nhs : Finset.card s = l'✝\nhkl : k'✝ + l'✝ = k'✝ + l'✝\nhs' : Finset.card (Finset.map (Equiv.toEmbedding (Fin.castIso hkl).toEquiv) s) = l'✝\n⊢ { fst := k'✝,\n      snd :=\n        { fst := l'✝,\n          snd := { val := Finset.map (Equiv.toEmbedding (Fin.castIso hkl).toEquiv) s, property := hs' } } } =\n    { fst := k'✝, snd := { fst := l'✝, snd := { val := s, property := hs } } }\n[PROOFSTEP]\nsimp only [Equiv.refl_toEmbedding, Fin.castIso_refl, Finset.map_refl, eq_self_iff_true, OrderIso.refl_toEquiv,\n  and_self_iff, heq_iff_eq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\n⊢ Function.RightInverse\n    (fun s =>\n      { fst := s.fst - Finset.card s.snd,\n        snd :=\n          { fst := Finset.card s.snd,\n            snd :=\n              {\n                val :=\n                  Finset.map\n                    (Equiv.toEmbedding\n                      (Fin.castIso (_ : s.fst = s.fst - Finset.card s.snd + Finset.card s.snd)).toEquiv)\n                    s.snd,\n                property :=\n                  (_ :\n                    Finset.card\n                        (Finset.map\n                          (Equiv.toEmbedding\n                            (Fin.castIso (_ : s.fst = s.fst - Finset.card s.snd + Finset.card s.snd)).toEquiv)\n                          s.snd) =\n                      Finset.card s.snd) } } })\n    fun s => { fst := s.fst + s.snd.fst, snd := ↑s.snd.snd }\n[PROOFSTEP]\nrintro ⟨n, s⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nn : ℕ\ns : Finset (Fin n)\n⊢ (fun s => { fst := s.fst + s.snd.fst, snd := ↑s.snd.snd })\n      ((fun s =>\n          { fst := s.fst - Finset.card s.snd,\n            snd :=\n              { fst := Finset.card s.snd,\n                snd :=\n                  {\n                    val :=\n                      Finset.map\n                        (Equiv.toEmbedding\n                          (Fin.castIso (_ : s.fst = s.fst - Finset.card s.snd + Finset.card s.snd)).toEquiv)\n                        s.snd,\n                    property :=\n                      (_ :\n                        Finset.card\n                            (Finset.map\n                              (Equiv.toEmbedding\n                                (Fin.castIso (_ : s.fst = s.fst - Finset.card s.snd + Finset.card s.snd)).toEquiv)\n                              s.snd) =\n                          Finset.card s.snd) } } })\n        { fst := n, snd := s }) =\n    { fst := n, snd := s }\n[PROOFSTEP]\nsimp [tsub_add_cancel_of_le (card_finset_fin_le s), Fin.castIso_to_equiv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r r' : ℝ≥0\nhr : ↑r + ↑r' < radius p\n⊢ Summable fun s => ‖p (s.fst + s.snd.fst)‖₊ * r ^ s.snd.fst * r' ^ s.fst\n[PROOFSTEP]\nrw [← changeOriginIndexEquiv.symm.summable_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r r' : ℝ≥0\nhr : ↑r + ↑r' < radius p\n⊢ Summable ((fun s => ‖p (s.fst + s.snd.fst)‖₊ * r ^ s.snd.fst * r' ^ s.fst) ∘ ↑changeOriginIndexEquiv.symm)\n[PROOFSTEP]\ndsimp only [(· ∘ ·), changeOriginIndexEquiv_symm_apply_fst, changeOriginIndexEquiv_symm_apply_snd_fst]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r r' : ℝ≥0\nhr : ↑r + ↑r' < radius p\n⊢ Summable fun x =>\n    ‖p (x.fst - Finset.card x.snd + Finset.card x.snd)‖₊ * r ^ Finset.card x.snd * r' ^ (x.fst - Finset.card x.snd)\n[PROOFSTEP]\nhave :\n  ∀ n : ℕ,\n    HasSum (fun s : Finset (Fin n) => ‖p (n - s.card + s.card)‖₊ * r ^ s.card * r' ^ (n - s.card))\n      (‖p n‖₊ * (r + r') ^ n) :=\n  by\n  intro n\n  convert_to HasSum (fun s : Finset (Fin n) => ‖p n‖₊ * (r ^ s.card * r' ^ (n - s.card))) _\n  · ext1 s\n    rw [tsub_add_cancel_of_le (card_finset_fin_le _), mul_assoc]\n  rw [← Fin.sum_pow_mul_eq_add_pow]\n  exact (hasSum_fintype _).mul_left _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r r' : ℝ≥0\nhr : ↑r + ↑r' < radius p\n⊢ ∀ (n : ℕ),\n    HasSum (fun s => ‖p (n - Finset.card s + Finset.card s)‖₊ * r ^ Finset.card s * r' ^ (n - Finset.card s))\n      (‖p n‖₊ * (r + r') ^ n)\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r r' : ℝ≥0\nhr : ↑r + ↑r' < radius p\nn : ℕ\n⊢ HasSum (fun s => ‖p (n - Finset.card s + Finset.card s)‖₊ * r ^ Finset.card s * r' ^ (n - Finset.card s))\n    (‖p n‖₊ * (r + r') ^ n)\n[PROOFSTEP]\nconvert_to HasSum (fun s : Finset (Fin n) => ‖p n‖₊ * (r ^ s.card * r' ^ (n - s.card))) _\n[GOAL]\ncase h.e'_5\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r r' : ℝ≥0\nhr : ↑r + ↑r' < radius p\nn : ℕ\n⊢ (fun s => ‖p (n - Finset.card s + Finset.card s)‖₊ * r ^ Finset.card s * r' ^ (n - Finset.card s)) = fun s =>\n    ‖p n‖₊ * (r ^ Finset.card s * r' ^ (n - Finset.card s))\n[PROOFSTEP]\next1 s\n[GOAL]\ncase h.e'_5.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r r' : ℝ≥0\nhr : ↑r + ↑r' < radius p\nn : ℕ\ns : Finset (Fin n)\n⊢ ‖p (n - Finset.card s + Finset.card s)‖₊ * r ^ Finset.card s * r' ^ (n - Finset.card s) =\n    ‖p n‖₊ * (r ^ Finset.card s * r' ^ (n - Finset.card s))\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le (card_finset_fin_le _), mul_assoc]\n[GOAL]\ncase convert_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r r' : ℝ≥0\nhr : ↑r + ↑r' < radius p\nn : ℕ\n⊢ HasSum (fun s => ‖p n‖₊ * (r ^ Finset.card s * r' ^ (n - Finset.card s))) (‖p n‖₊ * (r + r') ^ n)\n[PROOFSTEP]\nrw [← Fin.sum_pow_mul_eq_add_pow]\n[GOAL]\ncase convert_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r r' : ℝ≥0\nhr : ↑r + ↑r' < radius p\nn : ℕ\n⊢ HasSum (fun s => ‖p n‖₊ * (r ^ Finset.card s * r' ^ (n - Finset.card s)))\n    (‖p n‖₊ * ∑ s : Finset (Fin n), r ^ Finset.card s * r' ^ (n - Finset.card s))\n[PROOFSTEP]\nexact (hasSum_fintype _).mul_left _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r r' : ℝ≥0\nhr : ↑r + ↑r' < radius p\nthis :\n  ∀ (n : ℕ),\n    HasSum (fun s => ‖p (n - Finset.card s + Finset.card s)‖₊ * r ^ Finset.card s * r' ^ (n - Finset.card s))\n      (‖p n‖₊ * (r + r') ^ n)\n⊢ Summable fun x =>\n    ‖p (x.fst - Finset.card x.snd + Finset.card x.snd)‖₊ * r ^ Finset.card x.snd * r' ^ (x.fst - Finset.card x.snd)\n[PROOFSTEP]\nrefine' NNReal.summable_sigma.2 ⟨fun n => (this n).summable, _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r r' : ℝ≥0\nhr : ↑r + ↑r' < radius p\nthis :\n  ∀ (n : ℕ),\n    HasSum (fun s => ‖p (n - Finset.card s + Finset.card s)‖₊ * r ^ Finset.card s * r' ^ (n - Finset.card s))\n      (‖p n‖₊ * (r + r') ^ n)\n⊢ Summable fun x =>\n    ∑' (y : Finset (Fin x)),\n      ‖p\n              ({ fst := x, snd := y }.fst - Finset.card { fst := x, snd := y }.snd +\n                Finset.card { fst := x, snd := y }.snd)‖₊ *\n          r ^ Finset.card { fst := x, snd := y }.snd *\n        r' ^ ({ fst := x, snd := y }.fst - Finset.card { fst := x, snd := y }.snd)\n[PROOFSTEP]\nsimp only [(this _).tsum_eq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r r' : ℝ≥0\nhr : ↑r + ↑r' < radius p\nthis :\n  ∀ (n : ℕ),\n    HasSum (fun s => ‖p (n - Finset.card s + Finset.card s)‖₊ * r ^ Finset.card s * r' ^ (n - Finset.card s))\n      (‖p n‖₊ * (r + r') ^ n)\n⊢ Summable fun x => ‖p x‖₊ * (r + r') ^ x\n[PROOFSTEP]\nexact p.summable_nnnorm_mul_pow hr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nhr : ↑r < radius p\nk : ℕ\n⊢ Summable fun s => ‖p (k + s.fst)‖₊ * r ^ s.fst\n[PROOFSTEP]\nrcases ENNReal.lt_iff_exists_add_pos_lt.1 hr with ⟨r', h0, hr'⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nhr : ↑r < radius p\nk : ℕ\nr' : ℝ≥0\nh0 : 0 < r'\nhr' : ↑r + ↑r' < radius p\n⊢ Summable fun s => ‖p (k + s.fst)‖₊ * r ^ s.fst\n[PROOFSTEP]\nsimpa only [mul_inv_cancel_right₀ (pow_pos h0 _).ne'] using\n  ((NNReal.summable_sigma.1 (p.changeOriginSeries_summable_aux₁ hr')).1 k).mul_right (r' ^ k)⁻¹\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r : ℝ≥0\nhr : ↑r < radius p\nk : ℕ\n⊢ Summable fun l => ‖changeOriginSeries p k l‖₊ * r ^ l\n[PROOFSTEP]\nrefine' NNReal.summable_of_le (fun n => _) (NNReal.summable_sigma.1 <| p.changeOriginSeries_summable_aux₂ hr k).2\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r : ℝ≥0\nhr : ↑r < radius p\nk n : ℕ\n⊢ ‖changeOriginSeries p k n‖₊ * r ^ n ≤\n    ∑' (y : { s // Finset.card s = n }), ‖p (k + { fst := n, snd := y }.fst)‖₊ * r ^ { fst := n, snd := y }.fst\n[PROOFSTEP]\nsimp only [NNReal.tsum_mul_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r : ℝ≥0\nhr : ↑r < radius p\nk n : ℕ\n⊢ ‖changeOriginSeries p k n‖₊ * r ^ n ≤ (∑' (x : { s // Finset.card s = n }), ‖p (k + n)‖₊) * r ^ n\n[PROOFSTEP]\nexact mul_le_mul' (p.nnnorm_changeOriginSeries_le_tsum _ _) le_rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk : ℕ\nh : ↑‖x‖₊ < radius p\n⊢ ‖changeOrigin p x k‖₊ ≤ ∑' (s : (l : ℕ) × { s // Finset.card s = l }), ‖p (k + s.fst)‖₊ * ‖x‖₊ ^ s.fst\n[PROOFSTEP]\nrefine' tsum_of_nnnorm_bounded _ fun l => p.nnnorm_changeOriginSeries_apply_le_tsum k l x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk : ℕ\nh : ↑‖x‖₊ < radius p\n⊢ HasSum (fun l => ∑' (x_1 : { s // Finset.card s = l }), ‖p (k + l)‖₊ * ‖x‖₊ ^ l)\n    (∑' (s : (l : ℕ) × { s // Finset.card s = l }), ‖p (k + s.fst)‖₊ * ‖x‖₊ ^ s.fst)\n[PROOFSTEP]\nhave := p.changeOriginSeries_summable_aux₂ h k\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk : ℕ\nh : ↑‖x‖₊ < radius p\nthis : Summable fun s => ‖p (k + s.fst)‖₊ * ‖x‖₊ ^ s.fst\n⊢ HasSum (fun l => ∑' (x_1 : { s // Finset.card s = l }), ‖p (k + l)‖₊ * ‖x‖₊ ^ l)\n    (∑' (s : (l : ℕ) × { s // Finset.card s = l }), ‖p (k + s.fst)‖₊ * ‖x‖₊ ^ s.fst)\n[PROOFSTEP]\nrefine' HasSum.sigma this.hasSum fun l => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nk : ℕ\nh : ↑‖x‖₊ < radius p\nthis : Summable fun s => ‖p (k + s.fst)‖₊ * ‖x‖₊ ^ s.fst\nl : ℕ\n⊢ HasSum (fun c => ‖p (k + { fst := l, snd := c }.fst)‖₊ * ‖x‖₊ ^ { fst := l, snd := c }.fst)\n    (∑' (x_1 : { s // Finset.card s = l }), ‖p (k + l)‖₊ * ‖x‖₊ ^ l)\n[PROOFSTEP]\nexact ((NNReal.summable_sigma.1 this).1 l).hasSum\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\n⊢ radius p - ↑‖x‖₊ ≤ radius (changeOrigin p x)\n[PROOFSTEP]\nrefine' ENNReal.le_of_forall_pos_nnreal_lt fun r _h0 hr => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r : ℝ≥0\n_h0 : 0 < r\nhr : ↑r < radius p - ↑‖x‖₊\n⊢ ↑r ≤ radius (changeOrigin p x)\n[PROOFSTEP]\nrw [lt_tsub_iff_right, add_comm] at hr \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r : ℝ≥0\n_h0 : 0 < r\nhr✝ : ↑r < radius p - ↑‖x‖₊\nhr : ↑‖x‖₊ + ↑r < radius p\n⊢ ↑r ≤ radius (changeOrigin p x)\n[PROOFSTEP]\nhave hr' : (‖x‖₊ : ℝ≥0∞) < p.radius := (le_add_right le_rfl).trans_lt hr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r : ℝ≥0\n_h0 : 0 < r\nhr✝ : ↑r < radius p - ↑‖x‖₊\nhr : ↑‖x‖₊ + ↑r < radius p\nhr' : ↑‖x‖₊ < radius p\n⊢ ↑r ≤ radius (changeOrigin p x)\n[PROOFSTEP]\napply le_radius_of_summable_nnnorm\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r : ℝ≥0\n_h0 : 0 < r\nhr✝ : ↑r < radius p - ↑‖x‖₊\nhr : ↑‖x‖₊ + ↑r < radius p\nhr' : ↑‖x‖₊ < radius p\n⊢ Summable fun n => ‖changeOrigin p x n‖₊ * r ^ n\n[PROOFSTEP]\nhave :\n  ∀ k : ℕ,\n    ‖p.changeOrigin x k‖₊ * r ^ k ≤\n      (∑' s : Σ l : ℕ, { s : Finset (Fin (k + l)) // s.card = l }, ‖p (k + s.1)‖₊ * ‖x‖₊ ^ s.1) * r ^ k :=\n  fun k => mul_le_mul_right' (p.nnnorm_changeOrigin_le k hr') (r ^ k)\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r : ℝ≥0\n_h0 : 0 < r\nhr✝ : ↑r < radius p - ↑‖x‖₊\nhr : ↑‖x‖₊ + ↑r < radius p\nhr' : ↑‖x‖₊ < radius p\nthis :\n  ∀ (k : ℕ),\n    ‖changeOrigin p x k‖₊ * r ^ k ≤\n      (∑' (s : (l : ℕ) × { s // Finset.card s = l }), ‖p (k + s.fst)‖₊ * ‖x‖₊ ^ s.fst) * r ^ k\n⊢ Summable fun n => ‖changeOrigin p x n‖₊ * r ^ n\n[PROOFSTEP]\nrefine' NNReal.summable_of_le this _\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr✝ R r : ℝ≥0\n_h0 : 0 < r\nhr✝ : ↑r < radius p - ↑‖x‖₊\nhr : ↑‖x‖₊ + ↑r < radius p\nhr' : ↑‖x‖₊ < radius p\nthis :\n  ∀ (k : ℕ),\n    ‖changeOrigin p x k‖₊ * r ^ k ≤\n      (∑' (s : (l : ℕ) × { s // Finset.card s = l }), ‖p (k + s.fst)‖₊ * ‖x‖₊ ^ s.fst) * r ^ k\n⊢ Summable fun b => (∑' (s : (l : ℕ) × { s // Finset.card s = l }), ‖p (b + s.fst)‖₊ * ‖x‖₊ ^ s.fst) * r ^ b\n[PROOFSTEP]\nsimpa only [← NNReal.tsum_mul_right] using (NNReal.summable_sigma.1 (p.changeOriginSeries_summable_aux₁ hr)).2\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\n⊢ FormalMultilinearSeries.sum (changeOrigin p x) y = FormalMultilinearSeries.sum p (x + y)\n[PROOFSTEP]\nhave radius_pos : 0 < p.radius := lt_of_le_of_lt (zero_le _) h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\n⊢ FormalMultilinearSeries.sum (changeOrigin p x) y = FormalMultilinearSeries.sum p (x + y)\n[PROOFSTEP]\nhave x_mem_ball : x ∈ EMetric.ball (0 : E) p.radius := mem_emetric_ball_zero_iff.2 ((le_add_right le_rfl).trans_lt h)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\n⊢ FormalMultilinearSeries.sum (changeOrigin p x) y = FormalMultilinearSeries.sum p (x + y)\n[PROOFSTEP]\nhave y_mem_ball : y ∈ EMetric.ball (0 : E) (p.changeOrigin x).radius :=\n  by\n  refine' mem_emetric_ball_zero_iff.2 (lt_of_lt_of_le _ p.changeOrigin_radius)\n  rwa [lt_tsub_iff_right, add_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\n⊢ y ∈ EMetric.ball 0 (radius (changeOrigin p x))\n[PROOFSTEP]\nrefine' mem_emetric_ball_zero_iff.2 (lt_of_lt_of_le _ p.changeOrigin_radius)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\n⊢ ↑‖y‖₊ < radius p - ↑‖x‖₊\n[PROOFSTEP]\nrwa [lt_tsub_iff_right, add_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\n⊢ FormalMultilinearSeries.sum (changeOrigin p x) y = FormalMultilinearSeries.sum p (x + y)\n[PROOFSTEP]\nhave x_add_y_mem_ball : x + y ∈ EMetric.ball (0 : E) p.radius :=\n  by\n  refine' mem_emetric_ball_zero_iff.2 (lt_of_le_of_lt _ h)\n  exact_mod_cast nnnorm_add_le x y\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\n⊢ x + y ∈ EMetric.ball 0 (radius p)\n[PROOFSTEP]\nrefine' mem_emetric_ball_zero_iff.2 (lt_of_le_of_lt _ h)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\n⊢ ↑‖x + y‖₊ ≤ ↑‖x‖₊ + ↑‖y‖₊\n[PROOFSTEP]\nexact_mod_cast nnnorm_add_le x y\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\n⊢ FormalMultilinearSeries.sum (changeOrigin p x) y = FormalMultilinearSeries.sum p (x + y)\n[PROOFSTEP]\nset f : (Σ k l : ℕ, { s : Finset (Fin (k + l)) // s.card = l }) → F := fun s =>\n  p.changeOriginSeriesTerm s.1 s.2.1 s.2.2 s.2.2.2 (fun _ => x) fun _ => y\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\n⊢ FormalMultilinearSeries.sum (changeOrigin p x) y = FormalMultilinearSeries.sum p (x + y)\n[PROOFSTEP]\nhave hsf : Summable f :=\n  by\n  refine' summable_of_nnnorm_bounded _ (p.changeOriginSeries_summable_aux₁ h) _\n  rintro ⟨k, l, s, hs⟩\n  dsimp only [Subtype.coe_mk]\n  exact p.nnnorm_changeOriginSeriesTerm_apply_le _ _ _ _ _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\n⊢ Summable f\n[PROOFSTEP]\nrefine' summable_of_nnnorm_bounded _ (p.changeOriginSeries_summable_aux₁ h) _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\n⊢ ∀ (i : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l }),\n    ‖f i‖₊ ≤ ‖p (i.fst + i.snd.fst)‖₊ * ‖x‖₊ ^ i.snd.fst * ‖y‖₊ ^ i.fst\n[PROOFSTEP]\nrintro ⟨k, l, s, hs⟩\n[GOAL]\ncase mk.mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\n⊢ ‖f { fst := k, snd := { fst := l, snd := { val := s, property := hs } } }‖₊ ≤\n    ‖p\n            ({ fst := k, snd := { fst := l, snd := { val := s, property := hs } } }.fst +\n              { fst := k, snd := { fst := l, snd := { val := s, property := hs } } }.snd.fst)‖₊ *\n        ‖x‖₊ ^ { fst := k, snd := { fst := l, snd := { val := s, property := hs } } }.snd.fst *\n      ‖y‖₊ ^ { fst := k, snd := { fst := l, snd := { val := s, property := hs } } }.fst\n[PROOFSTEP]\ndsimp only [Subtype.coe_mk]\n[GOAL]\ncase mk.mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nk l : ℕ\ns : Finset (Fin (k + l))\nhs : Finset.card s = l\n⊢ ‖↑(↑(changeOriginSeriesTerm p k l s hs) fun x_1 => x) fun x => y‖₊ ≤ ‖p (k + l)‖₊ * ‖x‖₊ ^ l * ‖y‖₊ ^ k\n[PROOFSTEP]\nexact p.nnnorm_changeOriginSeriesTerm_apply_le _ _ _ _ _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\n⊢ FormalMultilinearSeries.sum (changeOrigin p x) y = FormalMultilinearSeries.sum p (x + y)\n[PROOFSTEP]\nhave hf : HasSum f ((p.changeOrigin x).sum y) :=\n  by\n  refine' HasSum.sigma_of_hasSum ((p.changeOrigin x).summable y_mem_ball).hasSum (fun k => _) hsf\n  · dsimp only\n    refine' ContinuousMultilinearMap.hasSum_eval _ _\n    have := (p.hasFPowerSeriesOnBall_changeOrigin k radius_pos).hasSum x_mem_ball\n    rw [zero_add] at this \n    refine' HasSum.sigma_of_hasSum this (fun l => _) _\n    · simp only [changeOriginSeries, ContinuousMultilinearMap.sum_apply]\n      apply hasSum_fintype\n    · refine'\n        summable_of_nnnorm_bounded _ (p.changeOriginSeries_summable_aux₂ (mem_emetric_ball_zero_iff.1 x_mem_ball) k)\n          fun s => _\n      refine' (ContinuousMultilinearMap.le_op_nnnorm _ _).trans_eq _\n      simp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\n⊢ HasSum f (FormalMultilinearSeries.sum (changeOrigin p x) y)\n[PROOFSTEP]\nrefine' HasSum.sigma_of_hasSum ((p.changeOrigin x).summable y_mem_ball).hasSum (fun k => _) hsf\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nk : ℕ\n⊢ HasSum (fun c => f { fst := k, snd := c }) (↑(changeOrigin p x k) fun x => y)\n[PROOFSTEP]\ndsimp only\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nk : ℕ\n⊢ HasSum\n    (fun c => ↑(↑(changeOriginSeriesTerm p k c.fst ↑c.snd (_ : Finset.card ↑c.snd = c.fst)) fun x_1 => x) fun x => y)\n    (↑(changeOrigin p x k) fun x => y)\n[PROOFSTEP]\nrefine' ContinuousMultilinearMap.hasSum_eval _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nk : ℕ\n⊢ HasSum (fun c => ↑(changeOriginSeriesTerm p k c.fst ↑c.snd (_ : Finset.card ↑c.snd = c.fst)) fun x_1 => x)\n    (changeOrigin p x k)\n[PROOFSTEP]\nhave := (p.hasFPowerSeriesOnBall_changeOrigin k radius_pos).hasSum x_mem_ball\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nk : ℕ\nthis : HasSum (fun n => ↑(changeOriginSeries p k n) fun x_1 => x) (changeOrigin p (0 + x) k)\n⊢ HasSum (fun c => ↑(changeOriginSeriesTerm p k c.fst ↑c.snd (_ : Finset.card ↑c.snd = c.fst)) fun x_1 => x)\n    (changeOrigin p x k)\n[PROOFSTEP]\nrw [zero_add] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nk : ℕ\nthis : HasSum (fun n => ↑(changeOriginSeries p k n) fun x_1 => x) (changeOrigin p x k)\n⊢ HasSum (fun c => ↑(changeOriginSeriesTerm p k c.fst ↑c.snd (_ : Finset.card ↑c.snd = c.fst)) fun x_1 => x)\n    (changeOrigin p x k)\n[PROOFSTEP]\nrefine' HasSum.sigma_of_hasSum this (fun l => _) _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nk : ℕ\nthis : HasSum (fun n => ↑(changeOriginSeries p k n) fun x_1 => x) (changeOrigin p x k)\nl : ℕ\n⊢ HasSum\n    (fun c =>\n      ↑(changeOriginSeriesTerm p k { fst := l, snd := c }.fst ↑{ fst := l, snd := c }.snd\n            (_ : Finset.card ↑{ fst := l, snd := c }.snd = { fst := l, snd := c }.fst))\n        fun x_1 => x)\n    (↑(changeOriginSeries p k l) fun x_1 => x)\n[PROOFSTEP]\nsimp only [changeOriginSeries, ContinuousMultilinearMap.sum_apply]\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nk : ℕ\nthis : HasSum (fun n => ↑(changeOriginSeries p k n) fun x_1 => x) (changeOrigin p x k)\nl : ℕ\n⊢ HasSum\n    (fun c =>\n      ↑(changeOriginSeriesTerm p k { fst := l, snd := c }.fst ↑c\n            (_ : Finset.card ↑{ fst := l, snd := c }.snd = { fst := l, snd := c }.fst))\n        fun x_1 => x)\n    (∑ x_1 : { s // Finset.card s = l }, ↑(changeOriginSeriesTerm p k l ↑x_1 (_ : Finset.card ↑x_1 = l)) fun x_2 => x)\n[PROOFSTEP]\napply hasSum_fintype\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nk : ℕ\nthis : HasSum (fun n => ↑(changeOriginSeries p k n) fun x_1 => x) (changeOrigin p x k)\n⊢ Summable fun c => ↑(changeOriginSeriesTerm p k c.fst ↑c.snd (_ : Finset.card ↑c.snd = c.fst)) fun x_1 => x\n[PROOFSTEP]\nrefine'\n  summable_of_nnnorm_bounded _ (p.changeOriginSeries_summable_aux₂ (mem_emetric_ball_zero_iff.1 x_mem_ball) k) fun s =>\n    _\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nk : ℕ\nthis : HasSum (fun n => ↑(changeOriginSeries p k n) fun x_1 => x) (changeOrigin p x k)\ns : (b : ℕ) × { s // Finset.card s = b }\n⊢ ‖↑(changeOriginSeriesTerm p k s.fst ↑s.snd (_ : Finset.card ↑s.snd = s.fst)) fun x_1 => x‖₊ ≤\n    ‖p (k + s.fst)‖₊ * ‖x‖₊ ^ s.fst\n[PROOFSTEP]\nrefine' (ContinuousMultilinearMap.le_op_nnnorm _ _).trans_eq _\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nk : ℕ\nthis : HasSum (fun n => ↑(changeOriginSeries p k n) fun x_1 => x) (changeOrigin p x k)\ns : (b : ℕ) × { s // Finset.card s = b }\n⊢ ‖changeOriginSeriesTerm p k s.fst ↑s.snd (_ : Finset.card ↑s.snd = s.fst)‖₊ * ∏ i : Fin s.fst, ‖x‖₊ =\n    ‖p (k + s.fst)‖₊ * ‖x‖₊ ^ s.fst\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nhf : HasSum f (FormalMultilinearSeries.sum (changeOrigin p x) y)\n⊢ FormalMultilinearSeries.sum (changeOrigin p x) y = FormalMultilinearSeries.sum p (x + y)\n[PROOFSTEP]\nrefine' hf.unique (changeOriginIndexEquiv.symm.hasSum_iff.1 _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nhf : HasSum f (FormalMultilinearSeries.sum (changeOrigin p x) y)\n⊢ HasSum (f ∘ ↑changeOriginIndexEquiv.symm) (FormalMultilinearSeries.sum p (x + y))\n[PROOFSTEP]\nrefine' HasSum.sigma_of_hasSum (p.hasSum x_add_y_mem_ball) (fun n => _) (changeOriginIndexEquiv.symm.summable_iff.2 hsf)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nhf : HasSum f (FormalMultilinearSeries.sum (changeOrigin p x) y)\nn : ℕ\n⊢ HasSum (fun c => (f ∘ ↑changeOriginIndexEquiv.symm) { fst := n, snd := c }) (↑(p n) fun x_1 => x + y)\n[PROOFSTEP]\nerw [(p n).map_add_univ (fun _ => x) fun _ => y]\n  -- porting note: added explicit function\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nhf : HasSum f (FormalMultilinearSeries.sum (changeOrigin p x) y)\nn : ℕ\n⊢ HasSum (fun c => (f ∘ ↑changeOriginIndexEquiv.symm) { fst := n, snd := c })\n    (∑ s : Finset (Fin n), ↑(p n) (Finset.piecewise s (fun x_1 => x) fun x => y))\n[PROOFSTEP]\nconvert hasSum_fintype (fun c : Finset (Fin n) => f (changeOriginIndexEquiv.symm ⟨n, c⟩))\n[GOAL]\ncase h.e'_6.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nhf : HasSum f (FormalMultilinearSeries.sum (changeOrigin p x) y)\nn : ℕ\nx✝ : Finset (Fin n)\na✝ : x✝ ∈ Finset.univ\n⊢ ↑(p n) (Finset.piecewise x✝ (fun x_1 => x) fun x => y) = f (↑changeOriginIndexEquiv.symm { fst := n, snd := x✝ })\n[PROOFSTEP]\nrename_i s _\n[GOAL]\ncase h.e'_6.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nhf : HasSum f (FormalMultilinearSeries.sum (changeOrigin p x) y)\nn : ℕ\ns : Finset (Fin n)\na✝ : s ∈ Finset.univ\n⊢ ↑(p n) (Finset.piecewise s (fun x_1 => x) fun x => y) = f (↑changeOriginIndexEquiv.symm { fst := n, snd := s })\n[PROOFSTEP]\ndsimp only [changeOriginSeriesTerm, (· ∘ ·), changeOriginIndexEquiv_symm_apply_fst,\n  changeOriginIndexEquiv_symm_apply_snd_fst, changeOriginIndexEquiv_symm_apply_snd_snd_coe]\n[GOAL]\ncase h.e'_6.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nhf : HasSum f (FormalMultilinearSeries.sum (changeOrigin p x) y)\nn : ℕ\ns : Finset (Fin n)\na✝ : s ∈ Finset.univ\n⊢ ↑(p n) (Finset.piecewise s (fun x_1 => x) fun x => y) =\n    ↑(↑(↑(ContinuousMultilinearMap.curryFinFinset 𝕜 E F\n                  (_ : Finset.card ↑(↑changeOriginIndexEquiv.symm { fst := n, snd := s }).snd.snd = Finset.card s)\n                  (_ :\n                    Finset.card\n                        (Finset.map\n                            (Equiv.toEmbedding\n                              (Fin.castIso\n                                  (_ :\n                                    { fst := n, snd := s }.fst =\n                                      { fst := n, snd := s }.fst - Finset.card { fst := n, snd := s }.snd +\n                                        Finset.card { fst := n, snd := s }.snd)).toEquiv)\n                            s)ᶜ =\n                      n - Finset.card s))\n              (p (n - Finset.card s + Finset.card s)))\n          fun x_1 => x)\n      fun x => y\n[PROOFSTEP]\nrw [ContinuousMultilinearMap.curryFinFinset_apply_const]\n[GOAL]\ncase h.e'_6.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nhf : HasSum f (FormalMultilinearSeries.sum (changeOrigin p x) y)\nn : ℕ\ns : Finset (Fin n)\na✝ : s ∈ Finset.univ\n⊢ ↑(p n) (Finset.piecewise s (fun x_1 => x) fun x => y) =\n    ↑(p (n - Finset.card s + Finset.card s))\n      (Finset.piecewise\n        (Finset.map\n          (Equiv.toEmbedding\n            (Fin.castIso\n                (_ :\n                  { fst := n, snd := s }.fst =\n                    { fst := n, snd := s }.fst - Finset.card { fst := n, snd := s }.snd +\n                      Finset.card { fst := n, snd := s }.snd)).toEquiv)\n          s)\n        (fun x_1 => x) fun x => y)\n[PROOFSTEP]\nhave :\n  ∀ (m) (hm : n = m),\n    p n (s.piecewise (fun _ => x) fun _ => y) =\n      p m ((s.map (Fin.castIso hm).toEquiv.toEmbedding).piecewise (fun _ => x) fun _ => y) :=\n  by\n  rintro m rfl\n  simp [Finset.piecewise]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nhf : HasSum f (FormalMultilinearSeries.sum (changeOrigin p x) y)\nn : ℕ\ns : Finset (Fin n)\na✝ : s ∈ Finset.univ\n⊢ ∀ (m : ℕ) (hm : n = m),\n    ↑(p n) (Finset.piecewise s (fun x_1 => x) fun x => y) =\n      ↑(p m) (Finset.piecewise (Finset.map (Equiv.toEmbedding (Fin.castIso hm).toEquiv) s) (fun x_1 => x) fun x => y)\n[PROOFSTEP]\nrintro m rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nhf : HasSum f (FormalMultilinearSeries.sum (changeOrigin p x) y)\nn : ℕ\ns : Finset (Fin n)\na✝ : s ∈ Finset.univ\n⊢ ↑(p n) (Finset.piecewise s (fun x_1 => x) fun x => y) =\n    ↑(p n)\n      (Finset.piecewise (Finset.map (Equiv.toEmbedding (Fin.castIso (_ : n = n)).toEquiv) s) (fun x_1 => x) fun x => y)\n[PROOFSTEP]\nsimp [Finset.piecewise]\n[GOAL]\ncase h.e'_6.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr R : ℝ≥0\nh : ↑‖x‖₊ + ↑‖y‖₊ < radius p\nradius_pos : 0 < radius p\nx_mem_ball : x ∈ EMetric.ball 0 (radius p)\ny_mem_ball : y ∈ EMetric.ball 0 (radius (changeOrigin p x))\nx_add_y_mem_ball : x + y ∈ EMetric.ball 0 (radius p)\nf : (k : ℕ) × (l : ℕ) × { s // Finset.card s = l } → F :=\n  fun s =>\n    ↑(↑(changeOriginSeriesTerm p s.fst s.snd.fst ↑s.snd.snd (_ : Finset.card ↑s.snd.snd = s.snd.fst)) fun x_1 => x)\n      fun x => y\nhsf : Summable f\nhf : HasSum f (FormalMultilinearSeries.sum (changeOrigin p x) y)\nn : ℕ\ns : Finset (Fin n)\na✝ : s ∈ Finset.univ\nthis :\n  ∀ (m : ℕ) (hm : n = m),\n    ↑(p n) (Finset.piecewise s (fun x_1 => x) fun x => y) =\n      ↑(p m) (Finset.piecewise (Finset.map (Equiv.toEmbedding (Fin.castIso hm).toEquiv) s) (fun x_1 => x) fun x => y)\n⊢ ↑(p n) (Finset.piecewise s (fun x_1 => x) fun x => y) =\n    ↑(p (n - Finset.card s + Finset.card s))\n      (Finset.piecewise\n        (Finset.map\n          (Equiv.toEmbedding\n            (Fin.castIso\n                (_ :\n                  { fst := n, snd := s }.fst =\n                    { fst := n, snd := s }.fst - Finset.card { fst := n, snd := s }.snd +\n                      Finset.card { fst := n, snd := s }.snd)).toEquiv)\n          s)\n        (fun x_1 => x) fun x => y)\n[PROOFSTEP]\napply this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑‖y‖₊ < r\n⊢ r - ↑‖y‖₊ ≤ FormalMultilinearSeries.radius (FormalMultilinearSeries.changeOrigin p y)\n[PROOFSTEP]\napply le_trans _ p.changeOrigin_radius\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑‖y‖₊ < r\n⊢ r - ↑‖y‖₊ ≤ FormalMultilinearSeries.radius p - ↑‖y‖₊\n[PROOFSTEP]\nexact tsub_le_tsub hf.r_le le_rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑‖y‖₊ < r\n⊢ 0 < r - ↑‖y‖₊\n[PROOFSTEP]\nsimp [h]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑‖y‖₊ < r\nz : E\nhz : z ∈ EMetric.ball 0 (r - ↑‖y‖₊)\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.changeOrigin p y n) fun x => z) (f (x + y + z))\n[PROOFSTEP]\nhave : f (x + y + z) = FormalMultilinearSeries.sum (FormalMultilinearSeries.changeOrigin p y) z :=\n  by\n  rw [mem_emetric_ball_zero_iff, lt_tsub_iff_right, add_comm] at hz \n  rw [p.changeOrigin_eval (hz.trans_le hf.r_le), add_assoc, hf.sum]\n  refine' mem_emetric_ball_zero_iff.2 (lt_of_le_of_lt _ hz)\n  exact_mod_cast nnnorm_add_le y z\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑‖y‖₊ < r\nz : E\nhz : z ∈ EMetric.ball 0 (r - ↑‖y‖₊)\n⊢ f (x + y + z) = FormalMultilinearSeries.sum (FormalMultilinearSeries.changeOrigin p y) z\n[PROOFSTEP]\nrw [mem_emetric_ball_zero_iff, lt_tsub_iff_right, add_comm] at hz \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑‖y‖₊ < r\nz : E\nhz✝ : ↑‖z‖₊ < r - ↑‖y‖₊\nhz : ↑‖y‖₊ + ↑‖z‖₊ < r\n⊢ f (x + y + z) = FormalMultilinearSeries.sum (FormalMultilinearSeries.changeOrigin p y) z\n[PROOFSTEP]\nrw [p.changeOrigin_eval (hz.trans_le hf.r_le), add_assoc, hf.sum]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑‖y‖₊ < r\nz : E\nhz✝ : ↑‖z‖₊ < r - ↑‖y‖₊\nhz : ↑‖y‖₊ + ↑‖z‖₊ < r\n⊢ y + z ∈ EMetric.ball 0 r\n[PROOFSTEP]\nrefine' mem_emetric_ball_zero_iff.2 (lt_of_le_of_lt _ hz)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑‖y‖₊ < r\nz : E\nhz✝ : ↑‖z‖₊ < r - ↑‖y‖₊\nhz : ↑‖y‖₊ + ↑‖z‖₊ < r\n⊢ ↑‖y + z‖₊ ≤ ↑‖y‖₊ + ↑‖z‖₊\n[PROOFSTEP]\nexact_mod_cast nnnorm_add_le y z\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑‖y‖₊ < r\nz : E\nhz : z ∈ EMetric.ball 0 (r - ↑‖y‖₊)\nthis : f (x + y + z) = FormalMultilinearSeries.sum (FormalMultilinearSeries.changeOrigin p y) z\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.changeOrigin p y n) fun x => z) (f (x + y + z))\n[PROOFSTEP]\nrw [this]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑‖y‖₊ < r\nz : E\nhz : z ∈ EMetric.ball 0 (r - ↑‖y‖₊)\nthis : f (x + y + z) = FormalMultilinearSeries.sum (FormalMultilinearSeries.changeOrigin p y) z\n⊢ HasSum (fun n => ↑(FormalMultilinearSeries.changeOrigin p y n) fun x => z)\n    (FormalMultilinearSeries.sum (FormalMultilinearSeries.changeOrigin p y) z)\n[PROOFSTEP]\napply (p.changeOrigin y).hasSum\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑‖y‖₊ < r\nz : E\nhz : z ∈ EMetric.ball 0 (r - ↑‖y‖₊)\nthis : f (x + y + z) = FormalMultilinearSeries.sum (FormalMultilinearSeries.changeOrigin p y) z\n⊢ z ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (FormalMultilinearSeries.changeOrigin p y))\n[PROOFSTEP]\nrefine' EMetric.ball_subset_ball (le_trans _ p.changeOrigin_radius) hz\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : ↑‖y‖₊ < r\nz : E\nhz : z ∈ EMetric.ball 0 (r - ↑‖y‖₊)\nthis : f (x + y + z) = FormalMultilinearSeries.sum (FormalMultilinearSeries.changeOrigin p y) z\n⊢ r - ↑‖y‖₊ ≤ FormalMultilinearSeries.radius p - ↑‖y‖₊\n[PROOFSTEP]\nexact tsub_le_tsub hf.r_le le_rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : y ∈ EMetric.ball x r\n⊢ AnalyticAt 𝕜 f y\n[PROOFSTEP]\nhave : (‖y - x‖₊ : ℝ≥0∞) < r := by simpa [edist_eq_coe_nnnorm_sub] using h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : y ∈ EMetric.ball x r\n⊢ ↑‖y - x‖₊ < r\n[PROOFSTEP]\nsimpa [edist_eq_coe_nnnorm_sub] using h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : y ∈ EMetric.ball x r\nthis : ↑‖y - x‖₊ < r\n⊢ AnalyticAt 𝕜 f y\n[PROOFSTEP]\nhave := hf.changeOrigin this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : y ∈ EMetric.ball x r\nthis✝ : ↑‖y - x‖₊ < r\nthis : HasFPowerSeriesOnBall f (FormalMultilinearSeries.changeOrigin p (y - x)) (x + (y - x)) (r - ↑‖y - x‖₊)\n⊢ AnalyticAt 𝕜 f y\n[PROOFSTEP]\nrw [add_sub_cancel'_right] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\nhf : HasFPowerSeriesOnBall f p x r\nh : y ∈ EMetric.ball x r\nthis✝ : ↑‖y - x‖₊ < r\nthis : HasFPowerSeriesOnBall f (FormalMultilinearSeries.changeOrigin p (y - x)) y (r - ↑‖y - x‖₊)\n⊢ AnalyticAt 𝕜 f y\n[PROOFSTEP]\nexact this.analyticAt\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\n⊢ IsOpen {x | AnalyticAt 𝕜 f x}\n[PROOFSTEP]\nrw [isOpen_iff_mem_nhds]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np : FormalMultilinearSeries 𝕜 E F\nx y : E\nr : ℝ≥0∞\n⊢ ∀ (a : E), a ∈ {x | AnalyticAt 𝕜 f x} → {x | AnalyticAt 𝕜 f x} ∈ 𝓝 a\n[PROOFSTEP]\nrintro x ⟨p, r, hr⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁷ : NontriviallyNormedField 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : CompleteSpace F\nf : E → F\np✝ : FormalMultilinearSeries 𝕜 E F\nx✝ y : E\nr✝ : ℝ≥0∞\nx : E\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhr : HasFPowerSeriesOnBall f p x r\n⊢ {x | AnalyticAt 𝕜 f x} ∈ 𝓝 x\n[PROOFSTEP]\nexact mem_of_superset (EMetric.ball_mem_nhds _ hr.r_pos) fun y hy => hr.analyticAt_of_mem hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\n⊢ HasFPowerSeriesAt f p z₀ ↔ ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\n[PROOFSTEP]\nrefine' ⟨fun ⟨r, _, r_pos, h⟩ => eventually_of_mem (EMetric.ball_mem_nhds 0 r_pos) fun _ => by simpa using h, _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nx✝¹ : HasFPowerSeriesAt f p z₀\nr : ℝ≥0∞\nr_le✝ : r ≤ radius p\nr_pos : 0 < r\nh : ∀ {y : 𝕜}, y ∈ EMetric.ball 0 r → HasSum (fun n => ↑(p n) fun x => y) (f (z₀ + y))\nx✝ : 𝕜\n⊢ x✝ ∈ EMetric.ball 0 r → HasSum (fun n => x✝ ^ n • coeff p n) (f (z₀ + x✝))\n[PROOFSTEP]\nsimpa using h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\n⊢ (∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))) → HasFPowerSeriesAt f p z₀\n[PROOFSTEP]\nsimp only [Metric.eventually_nhds_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\n⊢ (∃ ε, ε > 0 ∧ ∀ ⦃y : 𝕜⦄, dist y 0 < ε → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))) → HasFPowerSeriesAt f p z₀\n[PROOFSTEP]\nrintro ⟨r, r_pos, h⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nh : ∀ ⦃y : 𝕜⦄, dist y 0 < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\n⊢ HasFPowerSeriesAt f p z₀\n[PROOFSTEP]\nrefine' ⟨p.radius ⊓ r.toNNReal, by simp, _, _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nh : ∀ ⦃y : 𝕜⦄, dist y 0 < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\n⊢ radius p ⊓ ↑(Real.toNNReal r) ≤ radius p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nh : ∀ ⦃y : 𝕜⦄, dist y 0 < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\n⊢ 0 < radius p ⊓ ↑(Real.toNNReal r)\n[PROOFSTEP]\nsimp only [r_pos.lt, lt_inf_iff, ENNReal.coe_pos, Real.toNNReal_pos, and_true_iff]\n[GOAL]\ncase intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nh : ∀ ⦃y : 𝕜⦄, dist y 0 < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\n⊢ 0 < radius p\n[PROOFSTEP]\nobtain ⟨z, z_pos, le_z⟩ := NormedField.exists_norm_lt 𝕜 r_pos.lt\n[GOAL]\ncase intro.intro.refine'_1.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nh : ∀ ⦃y : 𝕜⦄, dist y 0 < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\nz : 𝕜\nz_pos : 0 < ‖z‖\nle_z : ‖z‖ < r\n⊢ 0 < radius p\n[PROOFSTEP]\nhave : (‖z‖₊ : ENNReal) ≤ p.radius := by\n  simp only [dist_zero_right] at h \n  apply FormalMultilinearSeries.le_radius_of_tendsto\n  convert tendsto_norm.comp (h le_z).summable.tendsto_atTop_zero\n  funext\n  simp [norm_smul, mul_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nh : ∀ ⦃y : 𝕜⦄, dist y 0 < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\nz : 𝕜\nz_pos : 0 < ‖z‖\nle_z : ‖z‖ < r\n⊢ ↑‖z‖₊ ≤ radius p\n[PROOFSTEP]\nsimp only [dist_zero_right] at h \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nz : 𝕜\nz_pos : 0 < ‖z‖\nle_z : ‖z‖ < r\nh : ∀ ⦃y : 𝕜⦄, ‖y‖ < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\n⊢ ↑‖z‖₊ ≤ radius p\n[PROOFSTEP]\napply FormalMultilinearSeries.le_radius_of_tendsto\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nz : 𝕜\nz_pos : 0 < ‖z‖\nle_z : ‖z‖ < r\nh : ∀ ⦃y : 𝕜⦄, ‖y‖ < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\n⊢ Tendsto (fun n => ‖p n‖ * ↑‖z‖₊ ^ n) atTop (𝓝 ?l)\ncase l\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nz : 𝕜\nz_pos : 0 < ‖z‖\nle_z : ‖z‖ < r\nh : ∀ ⦃y : 𝕜⦄, ‖y‖ < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\n⊢ ℝ\n[PROOFSTEP]\nconvert tendsto_norm.comp (h le_z).summable.tendsto_atTop_zero\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nz : 𝕜\nz_pos : 0 < ‖z‖\nle_z : ‖z‖ < r\nh : ∀ ⦃y : 𝕜⦄, ‖y‖ < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\nx✝ : ℕ\n⊢ ‖p x✝‖ * ↑‖z‖₊ ^ x✝ = ((fun a => ‖a‖) ∘ fun n => z ^ n • coeff p n) x✝\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nz : 𝕜\nz_pos : 0 < ‖z‖\nle_z : ‖z‖ < r\nh : ∀ ⦃y : 𝕜⦄, ‖y‖ < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\nx✝ : ℕ\n⊢ ‖p x✝‖ * ↑‖z‖₊ ^ x✝ = ((fun a => ‖a‖) ∘ fun n => z ^ n • coeff p n) x✝\n[PROOFSTEP]\nsimp [norm_smul, mul_comm]\n[GOAL]\ncase intro.intro.refine'_1.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nh : ∀ ⦃y : 𝕜⦄, dist y 0 < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\nz : 𝕜\nz_pos : 0 < ‖z‖\nle_z : ‖z‖ < r\nthis : ↑‖z‖₊ ≤ radius p\n⊢ 0 < radius p\n[PROOFSTEP]\nrefine' lt_of_lt_of_le _ this\n[GOAL]\ncase intro.intro.refine'_1.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nh : ∀ ⦃y : 𝕜⦄, dist y 0 < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\nz : 𝕜\nz_pos : 0 < ‖z‖\nle_z : ‖z‖ < r\nthis : ↑‖z‖₊ ≤ radius p\n⊢ 0 < ↑‖z‖₊\n[PROOFSTEP]\nsimp only [ENNReal.coe_pos]\n[GOAL]\ncase intro.intro.refine'_1.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nh : ∀ ⦃y : 𝕜⦄, dist y 0 < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\nz : 𝕜\nz_pos : 0 < ‖z‖\nle_z : ‖z‖ < r\nthis : ↑‖z‖₊ ≤ radius p\n⊢ 0 < ‖z‖₊\n[PROOFSTEP]\nexact zero_lt_iff.mpr (nnnorm_ne_zero_iff.mpr (norm_pos_iff.mp z_pos))\n[GOAL]\ncase intro.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nh : ∀ ⦃y : 𝕜⦄, dist y 0 < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\n⊢ ∀ {y : 𝕜}, y ∈ EMetric.ball 0 (radius p ⊓ ↑(Real.toNNReal r)) → HasSum (fun n => ↑(p n) fun x => y) (f (z₀ + y))\n[PROOFSTEP]\nsimp only [EMetric.mem_ball, lt_inf_iff, edist_lt_coe, apply_eq_pow_smul_coeff, and_imp, dist_zero_right] at h ⊢\n[GOAL]\ncase intro.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nh : ∀ ⦃y : 𝕜⦄, ‖y‖ < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\n⊢ ∀ {y : 𝕜}, edist y 0 < radius p → nndist y 0 < Real.toNNReal r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\n[PROOFSTEP]\nrefine' fun {y} _ hyr => h _\n[GOAL]\ncase intro.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\nr : ℝ\nr_pos : r > 0\nh : ∀ ⦃y : 𝕜⦄, ‖y‖ < r → HasSum (fun n => y ^ n • coeff p n) (f (z₀ + y))\ny : 𝕜\nx✝ : edist y 0 < radius p\nhyr : nndist y 0 < Real.toNNReal r\n⊢ ‖y‖ < r\n[PROOFSTEP]\nsimpa [nndist_eq_nnnorm, Real.lt_toNNReal_iff_coe_lt] using hyr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\n⊢ HasFPowerSeriesAt f p z₀ ↔ ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • coeff p n) (f z)\n[PROOFSTEP]\nrw [← map_add_left_nhds_zero, eventually_map, hasFPowerSeriesAt_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nz₀ : 𝕜\n⊢ (∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))) ↔\n    ∀ᶠ (a : 𝕜) in 𝓝 0,\n      HasSum (fun n => ((fun x x_1 => x + x_1) z₀ a - z₀) ^ n • coeff p n) (f ((fun x x_1 => x + x_1) z₀ a))\n[PROOFSTEP]\nsimp_rw [add_sub_cancel']\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Analytic.Basic", "llama_tokens": 147444, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.78793120560257, "lm_q2_score": 0.44552953503957277, "lm_q1q2_score": 0.35104662367528305}}
{"text": "[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝ : Preorder α\n⊢ Function.Injective fun c => ↑c.toOrderHom\n[PROOFSTEP]\nrintro ⟨⟩ ⟨⟩ h\n[GOAL]\ncase mk.mk\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝ : Preorder α\ntoOrderHom✝¹ : α →o α\nle_closure'✝¹ : ∀ (x : α), x ≤ OrderHom.toFun toOrderHom✝¹ x\nidempotent'✝¹ : ∀ (x : α), OrderHom.toFun toOrderHom✝¹ (OrderHom.toFun toOrderHom✝¹ x) = OrderHom.toFun toOrderHom✝¹ x\ntoOrderHom✝ : α →o α\nle_closure'✝ : ∀ (x : α), x ≤ OrderHom.toFun toOrderHom✝ x\nidempotent'✝ : ∀ (x : α), OrderHom.toFun toOrderHom✝ (OrderHom.toFun toOrderHom✝ x) = OrderHom.toFun toOrderHom✝ x\nh :\n  (fun c => ↑c.toOrderHom) { toOrderHom := toOrderHom✝¹, le_closure' := le_closure'✝¹, idempotent' := idempotent'✝¹ } =\n    (fun c => ↑c.toOrderHom) { toOrderHom := toOrderHom✝, le_closure' := le_closure'✝, idempotent' := idempotent'✝ }\n⊢ { toOrderHom := toOrderHom✝¹, le_closure' := le_closure'✝¹, idempotent' := idempotent'✝¹ } =\n    { toOrderHom := toOrderHom✝, le_closure' := le_closure'✝, idempotent' := idempotent'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_toOrderHom\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝ : Preorder α\ntoOrderHom✝¹ : α →o α\nle_closure'✝¹ : ∀ (x : α), x ≤ OrderHom.toFun toOrderHom✝¹ x\nidempotent'✝¹ : ∀ (x : α), OrderHom.toFun toOrderHom✝¹ (OrderHom.toFun toOrderHom✝¹ x) = OrderHom.toFun toOrderHom✝¹ x\ntoOrderHom✝ : α →o α\nle_closure'✝ : ∀ (x : α), x ≤ OrderHom.toFun toOrderHom✝ x\nidempotent'✝ : ∀ (x : α), OrderHom.toFun toOrderHom✝ (OrderHom.toFun toOrderHom✝ x) = OrderHom.toFun toOrderHom✝ x\nh :\n  (fun c => ↑c.toOrderHom) { toOrderHom := toOrderHom✝¹, le_closure' := le_closure'✝¹, idempotent' := idempotent'✝¹ } =\n    (fun c => ↑c.toOrderHom) { toOrderHom := toOrderHom✝, le_closure' := le_closure'✝, idempotent' := idempotent'✝ }\n⊢ toOrderHom✝¹ = toOrderHom✝\n[PROOFSTEP]\nexact FunLike.ext' h\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝¹ inst✝ : PartialOrder α\nc : ClosureOperator α\nc₁ : α → α\nmonotone'✝¹ : Monotone c₁\nle_closure'✝¹ : ∀ (x : α), x ≤ OrderHom.toFun { toFun := c₁, monotone' := monotone'✝¹ } x\nidempotent'✝¹ :\n  ∀ (x : α),\n    OrderHom.toFun { toFun := c₁, monotone' := monotone'✝¹ }\n        (OrderHom.toFun { toFun := c₁, monotone' := monotone'✝¹ } x) =\n      OrderHom.toFun { toFun := c₁, monotone' := monotone'✝¹ } x\nc₂ : α → α\nmonotone'✝ : Monotone c₂\nle_closure'✝ : ∀ (x : α), x ≤ OrderHom.toFun { toFun := c₂, monotone' := monotone'✝ } x\nidempotent'✝ :\n  ∀ (x : α),\n    OrderHom.toFun { toFun := c₂, monotone' := monotone'✝ }\n        (OrderHom.toFun { toFun := c₂, monotone' := monotone'✝ } x) =\n      OrderHom.toFun { toFun := c₂, monotone' := monotone'✝ } x\nh :\n  ↑{ toOrderHom := { toFun := c₁, monotone' := monotone'✝¹ }, le_closure' := le_closure'✝¹,\n        idempotent' := idempotent'✝¹ } =\n    ↑{ toOrderHom := { toFun := c₂, monotone' := monotone'✝ }, le_closure' := le_closure'✝,\n        idempotent' := idempotent'✝ }\n⊢ { toOrderHom := { toFun := c₁, monotone' := monotone'✝¹ }, le_closure' := le_closure'✝¹,\n      idempotent' := idempotent'✝¹ } =\n    { toOrderHom := { toFun := c₂, monotone' := monotone'✝ }, le_closure' := le_closure'✝, idempotent' := idempotent'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝¹ inst✝ : PartialOrder α\nc : ClosureOperator α\nx : α\n⊢ x ∈ Set.range ↑c → x ∈ closed c\n[PROOFSTEP]\nrintro ⟨y, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝¹ inst✝ : PartialOrder α\nc : ClosureOperator α\ny : α\n⊢ ↑c y ∈ closed c\n[PROOFSTEP]\napply c.idempotent\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝¹ inst✝ : PartialOrder α\nc : ClosureOperator α\nx y : α\nhy : closed c y\n⊢ ↑c x ≤ y ↔ x ≤ y\n[PROOFSTEP]\nrw [← c.closure_eq_self_of_mem_closed hy, ← le_closure_iff]\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝¹ inst✝ : PartialOrder α\nc✝ c : ClosureOperator α\n⊢ c =\n    mk₃ (↑c) (closed c) (_ : ∀ (x : α), x ≤ ↑c x) (_ : ∀ (x : α), ↑c x ∈ closed c)\n      (_ : ∀ (x y : α), x ≤ y → closed c y → ↑c x ≤ y)\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝¹ inst✝ : PartialOrder α\nc✝ c : ClosureOperator α\nx✝ : α\n⊢ ↑c x✝ =\n    ↑(mk₃ (↑c) (closed c) (_ : ∀ (x : α), x ≤ ↑c x) (_ : ∀ (x : α), ↑c x ∈ closed c)\n          (_ : ∀ (x y : α), x ≤ y → closed c y → ↑c x ≤ y))\n      x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝ : SemilatticeSup α\nc : ClosureOperator α\nx y : α\n⊢ ↑c (x ⊔ ↑c y) = ↑c (x ⊔ y)\n[PROOFSTEP]\nrw [sup_comm, closure_sup_closure_left, sup_comm (a := x)]\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\ninst✝ : SemilatticeSup α\nc : ClosureOperator α\nx y : α\n⊢ ↑c (↑c x ⊔ ↑c y) = ↑c (x ⊔ y)\n[PROOFSTEP]\nrw [closure_sup_closure_left, closure_sup_closure_right]\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\nβ : Type u_4\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nu : β → α\nl : LowerAdjoint u\nl₁ : α → β\ngc'✝¹ : GaloisConnection l₁ u\nl₂ : α → β\ngc'✝ : GaloisConnection l₂ u\nh : { toFun := l₁, gc' := gc'✝¹ }.toFun = { toFun := l₂, gc' := gc'✝ }.toFun\n⊢ { toFun := l₁, gc' := gc'✝¹ } = { toFun := l₂, gc' := gc'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\nβ : Type u_4\ninst✝ : SetLike α β\nl : LowerAdjoint SetLike.coe\ns : Set β\nx : β\n⊢ x ∈ toFun l s ↔ ∀ (S : α), s ⊆ ↑S → x ∈ S\n[PROOFSTEP]\nsimp_rw [← SetLike.mem_coe, ← Set.singleton_subset_iff, ← l.le_iff_subset]\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\nβ : Type u_4\ninst✝ : SetLike α β\nl : LowerAdjoint SetLike.coe\ns : Set β\nx : β\n⊢ toFun l {x} ≤ toFun l s ↔ ∀ (S : α), toFun l s ≤ S → toFun l {x} ≤ S\n[PROOFSTEP]\nexact ⟨fun h S => h.trans, fun h => h _ le_rfl⟩\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\nβ : Type u_4\ninst✝ : SetLike α β\nl : LowerAdjoint SetLike.coe\nx y : α\n⊢ toFun l (↑(toFun l ↑x) ∪ ↑(toFun l ↑y)) = toFun l (↑x ∪ ↑y)\n[PROOFSTEP]\nrw [closure_union_closure_right, closure_union_closure_left]\n[GOAL]\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\nβ : Type u_4\ninst✝ : PartialOrder α\nc : ClosureOperator α\n⊢ GaloisConnection.closureOperator (_ : GaloisConnection (ClosureOperator.toClosed c) Subtype.val) = c\n[PROOFSTEP]\next x\n[GOAL]\ncase a.h\nα : Type u_1\nι : Sort u_2\nκ : ι → Sort u_3\nβ : Type u_4\ninst✝ : PartialOrder α\nc : ClosureOperator α\nx : α\n⊢ ↑(GaloisConnection.closureOperator (_ : GaloisConnection (ClosureOperator.toClosed c) Subtype.val)) x = ↑c x\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Order.Closure", "llama_tokens": 3203, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6859494550081926, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.35101172611546494}}
{"text": "[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\np : FractionalIdeal S P\ns : Set P\nhs : s = ↑p\n⊢ IsFractional S (Submodule.copy (↑p) s hs)\n[PROOFSTEP]\nconvert p.isFractional\n[GOAL]\ncase h.e'_7\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\np : FractionalIdeal S P\ns : Set P\nhs : s = ↑p\n⊢ Submodule.copy (↑p) s hs = ↑p\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_7.h\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\np : FractionalIdeal S P\ns : Set P\nhs : s = ↑p\nx✝ : P\n⊢ x✝ ∈ Submodule.copy (↑p) s hs ↔ x✝ ∈ ↑p\n[PROOFSTEP]\nsimp only [hs]\n[GOAL]\ncase h.e'_7.h\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\np : FractionalIdeal S P\ns : Set P\nhs : s = ↑p\nx✝ : P\n⊢ x✝ ∈ Submodule.copy ↑p ↑p (_ : ↑p = ↑↑p) ↔ x✝ ∈ ↑p\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nh : I ≤ 1\n⊢ IsFractional S I\n[PROOFSTEP]\nuse 1, S.one_mem\n[GOAL]\ncase right\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nh : I ≤ 1\n⊢ ∀ (b : P), b ∈ I → IsInteger R (1 • b)\n[PROOFSTEP]\nintro b hb\n[GOAL]\ncase right\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nh : I ≤ 1\nb : P\nhb : b ∈ I\n⊢ IsInteger R (1 • b)\n[PROOFSTEP]\nrw [one_smul]\n[GOAL]\ncase right\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nh : I ≤ 1\nb : P\nhb : b ∈ I\n⊢ IsInteger R b\n[PROOFSTEP]\nobtain ⟨b', b'_mem, rfl⟩ := h hb\n[GOAL]\ncase right.intro.refl\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nh : I ≤ 1\nb' : R\nhb : ↑(Algebra.linearMap R P) b' ∈ I\n⊢ IsInteger R (↑(Algebra.linearMap R P) b')\n[PROOFSTEP]\nexact Set.mem_range_self b'\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nJ : FractionalIdeal S P\nhIJ : I ≤ ↑J\n⊢ IsFractional S I\n[PROOFSTEP]\nobtain ⟨a, a_mem, ha⟩ := J.isFractional\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nJ : FractionalIdeal S P\nhIJ : I ≤ ↑J\na : R\na_mem : a ∈ S\nha : ∀ (b : P), b ∈ ↑J → IsInteger R (a • b)\n⊢ IsFractional S I\n[PROOFSTEP]\nuse a, a_mem\n[GOAL]\ncase right\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nJ : FractionalIdeal S P\nhIJ : I ≤ ↑J\na : R\na_mem : a ∈ S\nha : ∀ (b : P), b ∈ ↑J → IsInteger R (a • b)\n⊢ ∀ (b : P), b ∈ I → IsInteger R (a • b)\n[PROOFSTEP]\nintro b b_mem\n[GOAL]\ncase right\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nJ : FractionalIdeal S P\nhIJ : I ≤ ↑J\na : R\na_mem : a ∈ S\nha : ∀ (b : P), b ∈ ↑J → IsInteger R (a • b)\nb : P\nb_mem : b ∈ I\n⊢ IsInteger R (a • b)\n[PROOFSTEP]\nexact ha b (hIJ b_mem)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Ideal R\n⊢ coeSubmodule P I ≤ 1\n[PROOFSTEP]\nsimpa using coeSubmodule_mono P (le_top : I ≤ ⊤)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nx : P\nx✝ : x ∈ 0\nx' : R\nx'_mem_zero : x' ∈ ↑0\nx'_eq_x : ↑(Algebra.linearMap R P) x' = x\n⊢ x = 0\n[PROOFSTEP]\nhave x'_eq_zero : x' = 0 := x'_mem_zero\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nx : P\nx✝ : x ∈ 0\nx' : R\nx'_mem_zero : x' ∈ ↑0\nx'_eq_x : ↑(Algebra.linearMap R P) x' = x\nx'_eq_zero : x' = 0\n⊢ x = 0\n[PROOFSTEP]\nsimp [x'_eq_x.symm, x'_eq_zero]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nx : P\nhx : x = 0\n⊢ ↑(Algebra.linearMap R P) 0 = x\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\nh : ↑I = ⊥\n⊢ (fun I => ↑I) I = (fun I => ↑I) 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\nh : I = 0\n⊢ ↑I = ⊥\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\n⊢ ↑1 = 1\n[PROOFSTEP]\nrw [coe_one_eq_coeSubmodule_top, coeSubmodule_top]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\n⊢ 0 ≤ I\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\nx : P\nhx : x ∈ 0\n⊢ x ∈ I\n[PROOFSTEP]\nrw [(mem_zero_iff _).mp hx]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\nx : P\nhx : x ∈ 0\n⊢ 0 ∈ I\n[PROOFSTEP]\nexact zero_mem (I : Submodule R P)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\nh : I = 0\nx : P\nhx : x ∈ I\n⊢ x = 0\n[PROOFSTEP]\nsimpa [h, mem_zero_iff] using hx\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nb : P\nhb : b ∈ I ⊔ J\n⊢ IsInteger R ((aI * aJ) • b)\n[PROOFSTEP]\nrcases mem_sup.mp hb with ⟨bI, hbI, bJ, hbJ, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nbI : P\nhbI : bI ∈ I\nbJ : P\nhbJ : bJ ∈ J\nhb : bI + bJ ∈ I ⊔ J\n⊢ IsInteger R ((aI * aJ) • (bI + bJ))\n[PROOFSTEP]\nrw [smul_add]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nbI : P\nhbI : bI ∈ I\nbJ : P\nhbJ : bJ ∈ J\nhb : bI + bJ ∈ I ⊔ J\n⊢ IsInteger R ((aI * aJ) • bI + (aI * aJ) • bJ)\n[PROOFSTEP]\napply isInteger_add\n[GOAL]\ncase intro.intro.intro.intro.ha\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nbI : P\nhbI : bI ∈ I\nbJ : P\nhbJ : bJ ∈ J\nhb : bI + bJ ∈ I ⊔ J\n⊢ IsInteger R ((aI * aJ) • bI)\n[PROOFSTEP]\nrw [mul_smul, smul_comm]\n[GOAL]\ncase intro.intro.intro.intro.ha\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nbI : P\nhbI : bI ∈ I\nbJ : P\nhbJ : bJ ∈ J\nhb : bI + bJ ∈ I ⊔ J\n⊢ IsInteger R (aJ • aI • bI)\n[PROOFSTEP]\nexact isInteger_smul (hI bI hbI)\n[GOAL]\ncase intro.intro.intro.intro.hb\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nbI : P\nhbI : bI ∈ I\nbJ : P\nhbJ : bJ ∈ J\nhb : bI + bJ ∈ I ⊔ J\n⊢ IsInteger R ((aI * aJ) • bJ)\n[PROOFSTEP]\nrw [mul_smul]\n[GOAL]\ncase intro.intro.intro.intro.hb\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nbI : P\nhbI : bI ∈ I\nbJ : P\nhbJ : bJ ∈ J\nhb : bI + bJ ∈ I ⊔ J\n⊢ IsInteger R (aI • aJ • bJ)\n[PROOFSTEP]\nexact isInteger_smul (hJ bJ hbJ)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\nJ : Submodule R P\nb : P\nhb : b ∈ I ⊓ J\n⊢ IsInteger R (aI • b)\n[PROOFSTEP]\nrcases mem_inf.mp hb with ⟨hbI, _⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\nJ : Submodule R P\nb : P\nhb : b ∈ I ⊓ J\nhbI : b ∈ I\nright✝ : b ∈ J\n⊢ IsInteger R (aI • b)\n[PROOFSTEP]\nexact hI b hbI\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nx✝ : IsFractional S I\n⊢ IsFractional S (0 • I)\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nx✝ : IsFractional S I\n⊢ IsFractional S 0\n[PROOFSTEP]\nconvert ((0 : Ideal R) : FractionalIdeal S P).isFractional\n[GOAL]\ncase h.e'_7\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nx✝ : IsFractional S I\n⊢ 0 = ↑↑0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nn : ℕ\nh : IsFractional S I\n⊢ IsFractional S ((n + 1) • I)\n[PROOFSTEP]\nrw [succ_nsmul]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : Submodule R P\nn : ℕ\nh : IsFractional S I\n⊢ IsFractional S (I + n • I)\n[PROOFSTEP]\nexact h.sup (IsFractional.nsmul n h)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nb : P\nhb : b ∈ I * J\n⊢ IsInteger R ((aI * aJ) • b)\n[PROOFSTEP]\nrefine Submodule.mul_induction_on hb ?_ ?_\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nb : P\nhb : b ∈ I * J\n⊢ ∀ (m : P), m ∈ I → ∀ (n : P), n ∈ J → IsInteger R ((aI * aJ) • (m * n))\n[PROOFSTEP]\nintro m hm n hn\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nb : P\nhb : b ∈ I * J\nm : P\nhm : m ∈ I\nn : P\nhn : n ∈ J\n⊢ IsInteger R ((aI * aJ) • (m * n))\n[PROOFSTEP]\nobtain ⟨n', hn'⟩ := hJ n hn\n[GOAL]\ncase refine_1.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nb : P\nhb : b ∈ I * J\nm : P\nhm : m ∈ I\nn : P\nhn : n ∈ J\nn' : R\nhn' : ↑(algebraMap R P) n' = aJ • n\n⊢ IsInteger R ((aI * aJ) • (m * n))\n[PROOFSTEP]\nrw [mul_smul, mul_comm m, ← smul_mul_assoc, ← hn', ← Algebra.smul_def]\n[GOAL]\ncase refine_1.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nb : P\nhb : b ∈ I * J\nm : P\nhm : m ∈ I\nn : P\nhn : n ∈ J\nn' : R\nhn' : ↑(algebraMap R P) n' = aJ • n\n⊢ IsInteger R (aI • n' • m)\n[PROOFSTEP]\napply hI\n[GOAL]\ncase refine_1.intro.a\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nb : P\nhb : b ∈ I * J\nm : P\nhm : m ∈ I\nn : P\nhn : n ∈ J\nn' : R\nhn' : ↑(algebraMap R P) n' = aJ • n\n⊢ n' • m ∈ I\n[PROOFSTEP]\nexact Submodule.smul_mem _ _ hm\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nb : P\nhb : b ∈ I * J\n⊢ ∀ (x y : P), IsInteger R ((aI * aJ) • x) → IsInteger R ((aI * aJ) • y) → IsInteger R ((aI * aJ) • (x + y))\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nb : P\nhb : b ∈ I * J\nx y : P\nhx : IsInteger R ((aI * aJ) • x)\nhy : IsInteger R ((aI * aJ) • y)\n⊢ IsInteger R ((aI * aJ) • (x + y))\n[PROOFSTEP]\nrw [smul_add]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Submodule R P\naI : R\nhaI : aI ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (aI • b)\naJ : R\nhaJ : aJ ∈ S\nhJ : ∀ (b : P), b ∈ J → IsInteger R (aJ • b)\nb : P\nhb : b ∈ I * J\nx y : P\nhx : IsInteger R ((aI * aJ) • x)\nhy : IsInteger R ((aI * aJ) • y)\n⊢ IsInteger R ((aI * aJ) • x + (aI * aJ) • y)\n[PROOFSTEP]\napply isInteger_add hx hy\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : FractionalIdeal S P\n⊢ I * J = { val := ↑I * ↑J, property := (_ : IsFractional S (↑I * ↑J)) }\n[PROOFSTEP]\nsimp only [← mul_eq_mul, mul]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : FractionalIdeal S P\n⊢ ↑(I * J) = ↑I * ↑J\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : FractionalIdeal S P\n⊢ ↑{ val := ↑I * ↑J, property := (_ : IsFractional S (↑I * ↑J)) } = ↑I * ↑J\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Ideal R\n⊢ ↑(I * J) = ↑I * ↑J\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : Ideal R\n⊢ ↑(I * J) = { val := ↑↑I * ↑↑J, property := (_ : IsFractional S (↑↑I * ↑↑J)) }\n[PROOFSTEP]\nexact coeToSubmodule_injective (coeSubmodule_mul _ _ _)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\n⊢ Monotone ((fun x x_1 => x * x_1) I)\n[PROOFSTEP]\nintro J J' h\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J J' : FractionalIdeal S P\nh : J ≤ J'\n⊢ (fun x x_1 => x * x_1) I J ≤ (fun x x_1 => x * x_1) I J'\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J J' : FractionalIdeal S P\nh : J ≤ J'\n⊢ { val := ↑I * ↑J, property := (_ : IsFractional S (↑I * ↑J)) } ≤\n    { val := ↑I * ↑J', property := (_ : IsFractional S (↑I * ↑J')) }\n[PROOFSTEP]\nexact mul_le.mpr fun x hx y hy => mul_mem_mul hx (h hy)\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\n⊢ Monotone fun J => J * I\n[PROOFSTEP]\nintro J J' h\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J J' : FractionalIdeal S P\nh : J ≤ J'\n⊢ (fun J => J * I) J ≤ (fun J => J * I) J'\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J J' : FractionalIdeal S P\nh : J ≤ J'\n⊢ { val := ↑J * ↑I, property := (_ : IsFractional S (↑J * ↑I)) } ≤\n    { val := ↑J' * ↑I, property := (_ : IsFractional S (↑J' * ↑I)) }\n[PROOFSTEP]\nexact mul_le.mpr fun x hx y hy => mul_mem_mul (h hx) hy\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : FractionalIdeal S P\ni j : P\nhi : i ∈ I\nhj : j ∈ J\n⊢ i * j ∈ I * J\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : FractionalIdeal S P\ni j : P\nhi : i ∈ I\nhj : j ∈ J\n⊢ i * j ∈ { val := ↑I * ↑J, property := (_ : IsFractional S (↑I * ↑J)) }\n[PROOFSTEP]\nexact Submodule.mul_mem_mul hi hj\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J K : FractionalIdeal S P\n⊢ I * J ≤ K ↔ ∀ (i : P), i ∈ I → ∀ (j : P), j ∈ J → i * j ∈ K\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J K : FractionalIdeal S P\n⊢ { val := ↑I * ↑J, property := (_ : IsFractional S (↑I * ↑J)) } ≤ K ↔ ∀ (i : P), i ∈ I → ∀ (j : P), j ∈ J → i * j ∈ K\n[PROOFSTEP]\nexact Submodule.mul_le\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : FractionalIdeal S P\nC : P → Prop\nr : P\nhr : r ∈ I * J\nhm : ∀ (i : P), i ∈ I → ∀ (j : P), j ∈ J → C (i * j)\nha : ∀ (x y : P), C x → C y → C (x + y)\n⊢ C r\n[PROOFSTEP]\nsimp only [mul_def] at hr \n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI J : FractionalIdeal S P\nC : P → Prop\nr : P\nhm : ∀ (i : P), i ∈ I → ∀ (j : P), j ∈ J → C (i * j)\nha : ∀ (x y : P), C x → C y → C (x + y)\nhr : r ∈ { val := ↑I * ↑J, property := (_ : IsFractional S (↑I * ↑J)) }\n⊢ C r\n[PROOFSTEP]\nexact Submodule.mul_induction_on hr hm ha\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nn : ℕ\n⊢ ↑(Nat.unaryCast n) = ↑n\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\n⊢ ↑(Nat.unaryCast Nat.zero) = ↑Nat.zero\n[PROOFSTEP]\nsimp [*, Nat.unaryCast]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nn✝ : ℕ\nn_ih✝ : ↑(Nat.unaryCast n✝) = ↑n✝\n⊢ ↑(Nat.unaryCast (Nat.succ n✝)) = ↑(Nat.succ n✝)\n[PROOFSTEP]\nsimp [*, Nat.unaryCast]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\nhI : 1 ≤ I\n⊢ I ≤ I * I\n[PROOFSTEP]\nconvert mul_left_mono I hI\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\nhI : 1 ≤ I\n⊢ I = (fun x x_1 => x * x_1) I 1\n[PROOFSTEP]\nexact (mul_one I).symm\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\nhI : I ≤ 1\n⊢ I * I ≤ I\n[PROOFSTEP]\nconvert mul_left_mono I hI\n[GOAL]\ncase h.e'_4\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\nhI : I ≤ 1\n⊢ I = (fun x x_1 => x * x_1) I 1\n[PROOFSTEP]\nexact (mul_one I).symm\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\n⊢ J ≤ 1 ↔ ∃ I, ↑I = J\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\n⊢ J ≤ 1 → ∃ I, ↑I = J\n[PROOFSTEP]\nintro hJ\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\n⊢ ∃ I, ↑I = J\n[PROOFSTEP]\nrefine' ⟨⟨⟨⟨{x : R | algebraMap R P x ∈ J}, _⟩, _⟩, _⟩, _⟩\n[GOAL]\ncase mp.refine'_1\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\n⊢ ∀ {a b : R},\n    a ∈ {x | ↑(algebraMap R P) x ∈ J} → b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}\n[PROOFSTEP]\nintro a b ha hb\n[GOAL]\ncase mp.refine'_1\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\na b : R\nha : a ∈ {x | ↑(algebraMap R P) x ∈ J}\nhb : b ∈ {x | ↑(algebraMap R P) x ∈ J}\n⊢ a + b ∈ {x | ↑(algebraMap R P) x ∈ J}\n[PROOFSTEP]\nrw [mem_setOf, RingHom.map_add]\n[GOAL]\ncase mp.refine'_1\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\na b : R\nha : a ∈ {x | ↑(algebraMap R P) x ∈ J}\nhb : b ∈ {x | ↑(algebraMap R P) x ∈ J}\n⊢ ↑(algebraMap R P) a + ↑(algebraMap R P) b ∈ J\n[PROOFSTEP]\nexact J.val.add_mem ha hb\n[GOAL]\ncase mp.refine'_2\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\n⊢ 0 ∈\n    { carrier := {x | ↑(algebraMap R P) x ∈ J},\n        add_mem' :=\n          (_ :\n            ∀ {a b : R},\n              a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier\n[PROOFSTEP]\nrw [mem_setOf, RingHom.map_zero]\n[GOAL]\ncase mp.refine'_2\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\n⊢ 0 ∈ J\n[PROOFSTEP]\nexact J.val.zero_mem\n[GOAL]\ncase mp.refine'_3\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\n⊢ ∀ (c : R) {x : R},\n    x ∈\n        {\n              toAddSubsemigroup :=\n                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                  add_mem' :=\n                    (_ :\n                      ∀ {a b : R},\n                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                          b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n              zero_mem' :=\n                (_ :\n                  0 ∈\n                    { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                        add_mem' :=\n                          (_ :\n                            ∀ {a b : R},\n                              a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                  a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier →\n      c • x ∈\n        {\n              toAddSubsemigroup :=\n                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                  add_mem' :=\n                    (_ :\n                      ∀ {a b : R},\n                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                          b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n              zero_mem' :=\n                (_ :\n                  0 ∈\n                    { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                        add_mem' :=\n                          (_ :\n                            ∀ {a b : R},\n                              a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                  a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nintro c x hx\n[GOAL]\ncase mp.refine'_3\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\nc x : R\nhx :\n  x ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {x | ↑(algebraMap R P) x ∈ J},\n              add_mem' :=\n                (_ :\n                  ∀ {a b : R},\n                    a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                      b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n          zero_mem' :=\n            (_ :\n              0 ∈\n                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                    add_mem' :=\n                      (_ :\n                        ∀ {a b : R},\n                          a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                            b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                              a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier\n⊢ c • x ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {x | ↑(algebraMap R P) x ∈ J},\n              add_mem' :=\n                (_ :\n                  ∀ {a b : R},\n                    a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                      b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n          zero_mem' :=\n            (_ :\n              0 ∈\n                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                    add_mem' :=\n                      (_ :\n                        ∀ {a b : R},\n                          a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                            b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                              a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrw [smul_eq_mul, mem_setOf, RingHom.map_mul, ← Algebra.smul_def]\n[GOAL]\ncase mp.refine'_3\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\nc x : R\nhx :\n  x ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {x | ↑(algebraMap R P) x ∈ J},\n              add_mem' :=\n                (_ :\n                  ∀ {a b : R},\n                    a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                      b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n          zero_mem' :=\n            (_ :\n              0 ∈\n                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                    add_mem' :=\n                      (_ :\n                        ∀ {a b : R},\n                          a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                            b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                              a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier\n⊢ c • ↑(algebraMap R P) x ∈ J\n[PROOFSTEP]\nexact J.val.smul_mem c hx\n[GOAL]\ncase mp.refine'_4\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\n⊢ ↑{\n        toAddSubmonoid :=\n          {\n            toAddSubsemigroup :=\n              { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                add_mem' :=\n                  (_ :\n                    ∀ {a b : R},\n                      a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                        b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n            zero_mem' :=\n              (_ :\n                0 ∈\n                  { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                      add_mem' :=\n                        (_ :\n                          ∀ {a b : R},\n                            a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                              b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier) },\n        smul_mem' :=\n          (_ :\n            ∀ (c : R) {x : R},\n              x ∈\n                  {\n                        toAddSubsemigroup :=\n                          { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                            add_mem' :=\n                              (_ :\n                                ∀ {a b : R},\n                                  a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                    b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                        zero_mem' :=\n                          (_ :\n                            0 ∈\n                              { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                  add_mem' :=\n                                    (_ :\n                                      ∀ {a b : R},\n                                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                          b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            a + b ∈\n                                              {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier →\n                c • x ∈\n                  {\n                        toAddSubsemigroup :=\n                          { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                            add_mem' :=\n                              (_ :\n                                ∀ {a b : R},\n                                  a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                    b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                        zero_mem' :=\n                          (_ :\n                            0 ∈\n                              { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                  add_mem' :=\n                                    (_ :\n                                      ∀ {a b : R},\n                                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                          b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            a + b ∈\n                                              {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier) } =\n    J\n[PROOFSTEP]\next x\n[GOAL]\ncase mp.refine'_4.a\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\nx : P\n⊢ x ∈\n      ↑{\n          toAddSubmonoid :=\n            {\n              toAddSubsemigroup :=\n                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                  add_mem' :=\n                    (_ :\n                      ∀ {a b : R},\n                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                          b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n              zero_mem' :=\n                (_ :\n                  0 ∈\n                    { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                        add_mem' :=\n                          (_ :\n                            ∀ {a b : R},\n                              a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier) },\n          smul_mem' :=\n            (_ :\n              ∀ (c : R) {x : R},\n                x ∈\n                    {\n                          toAddSubsemigroup :=\n                            { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                              add_mem' :=\n                                (_ :\n                                  ∀ {a b : R},\n                                    a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                      b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                          zero_mem' :=\n                            (_ :\n                              0 ∈\n                                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                    add_mem' :=\n                                      (_ :\n                                        ∀ {a b : R},\n                                          a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                              a + b ∈\n                                                {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier →\n                  c • x ∈\n                    {\n                          toAddSubsemigroup :=\n                            { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                              add_mem' :=\n                                (_ :\n                                  ∀ {a b : R},\n                                    a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                      b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                          zero_mem' :=\n                            (_ :\n                              0 ∈\n                                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                    add_mem' :=\n                                      (_ :\n                                        ∀ {a b : R},\n                                          a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                              a + b ∈\n                                                {x |\n                                                  ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier) } ↔\n    x ∈ J\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.refine'_4.a.mp\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\nx : P\n⊢ x ∈\n      ↑{\n          toAddSubmonoid :=\n            {\n              toAddSubsemigroup :=\n                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                  add_mem' :=\n                    (_ :\n                      ∀ {a b : R},\n                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                          b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n              zero_mem' :=\n                (_ :\n                  0 ∈\n                    { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                        add_mem' :=\n                          (_ :\n                            ∀ {a b : R},\n                              a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier) },\n          smul_mem' :=\n            (_ :\n              ∀ (c : R) {x : R},\n                x ∈\n                    {\n                          toAddSubsemigroup :=\n                            { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                              add_mem' :=\n                                (_ :\n                                  ∀ {a b : R},\n                                    a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                      b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                          zero_mem' :=\n                            (_ :\n                              0 ∈\n                                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                    add_mem' :=\n                                      (_ :\n                                        ∀ {a b : R},\n                                          a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                              a + b ∈\n                                                {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier →\n                  c • x ∈\n                    {\n                          toAddSubsemigroup :=\n                            { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                              add_mem' :=\n                                (_ :\n                                  ∀ {a b : R},\n                                    a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                      b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                          zero_mem' :=\n                            (_ :\n                              0 ∈\n                                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                    add_mem' :=\n                                      (_ :\n                                        ∀ {a b : R},\n                                          a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                              a + b ∈\n                                                {x |\n                                                  ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier) } →\n    x ∈ J\n[PROOFSTEP]\nrintro ⟨y, hy, eq_y⟩\n[GOAL]\ncase mp.refine'_4.a.mp.intro.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\nx : P\ny : R\nhy :\n  y ∈\n    ↑{\n        toAddSubmonoid :=\n          {\n            toAddSubsemigroup :=\n              { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                add_mem' :=\n                  (_ :\n                    ∀ {a b : R},\n                      a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                        b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n            zero_mem' :=\n              (_ :\n                0 ∈\n                  { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                      add_mem' :=\n                        (_ :\n                          ∀ {a b : R},\n                            a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                              b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier) },\n        smul_mem' :=\n          (_ :\n            ∀ (c : R) {x : R},\n              x ∈\n                  {\n                        toAddSubsemigroup :=\n                          { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                            add_mem' :=\n                              (_ :\n                                ∀ {a b : R},\n                                  a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                    b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                        zero_mem' :=\n                          (_ :\n                            0 ∈\n                              { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                  add_mem' :=\n                                    (_ :\n                                      ∀ {a b : R},\n                                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                          b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            a + b ∈\n                                              {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier →\n                c • x ∈\n                  {\n                        toAddSubsemigroup :=\n                          { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                            add_mem' :=\n                              (_ :\n                                ∀ {a b : R},\n                                  a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                    b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                        zero_mem' :=\n                          (_ :\n                            0 ∈\n                              { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                  add_mem' :=\n                                    (_ :\n                                      ∀ {a b : R},\n                                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                          b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            a + b ∈\n                                              {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier) }\neq_y : ↑(Algebra.linearMap R P) y = x\n⊢ x ∈ J\n[PROOFSTEP]\nrwa [← eq_y]\n[GOAL]\ncase mp.refine'_4.a.mpr\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\nx : P\n⊢ x ∈ J →\n    x ∈\n      ↑{\n          toAddSubmonoid :=\n            {\n              toAddSubsemigroup :=\n                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                  add_mem' :=\n                    (_ :\n                      ∀ {a b : R},\n                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                          b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n              zero_mem' :=\n                (_ :\n                  0 ∈\n                    { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                        add_mem' :=\n                          (_ :\n                            ∀ {a b : R},\n                              a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier) },\n          smul_mem' :=\n            (_ :\n              ∀ (c : R) {x : R},\n                x ∈\n                    {\n                          toAddSubsemigroup :=\n                            { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                              add_mem' :=\n                                (_ :\n                                  ∀ {a b : R},\n                                    a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                      b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                          zero_mem' :=\n                            (_ :\n                              0 ∈\n                                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                    add_mem' :=\n                                      (_ :\n                                        ∀ {a b : R},\n                                          a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                              a + b ∈\n                                                {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier →\n                  c • x ∈\n                    {\n                          toAddSubsemigroup :=\n                            { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                              add_mem' :=\n                                (_ :\n                                  ∀ {a b : R},\n                                    a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                      b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                          zero_mem' :=\n                            (_ :\n                              0 ∈\n                                { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                    add_mem' :=\n                                      (_ :\n                                        ∀ {a b : R},\n                                          a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                              a + b ∈\n                                                {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier) }\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase mp.refine'_4.a.mpr\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\nx : P\nhx : x ∈ J\n⊢ x ∈\n    ↑{\n        toAddSubmonoid :=\n          {\n            toAddSubsemigroup :=\n              { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                add_mem' :=\n                  (_ :\n                    ∀ {a b : R},\n                      a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                        b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n            zero_mem' :=\n              (_ :\n                0 ∈\n                  { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                      add_mem' :=\n                        (_ :\n                          ∀ {a b : R},\n                            a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                              b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier) },\n        smul_mem' :=\n          (_ :\n            ∀ (c : R) {x : R},\n              x ∈\n                  {\n                        toAddSubsemigroup :=\n                          { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                            add_mem' :=\n                              (_ :\n                                ∀ {a b : R},\n                                  a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                    b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                        zero_mem' :=\n                          (_ :\n                            0 ∈\n                              { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                  add_mem' :=\n                                    (_ :\n                                      ∀ {a b : R},\n                                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                          b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            a + b ∈\n                                              {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier →\n                c • x ∈\n                  {\n                        toAddSubsemigroup :=\n                          { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                            add_mem' :=\n                              (_ :\n                                ∀ {a b : R},\n                                  a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                    b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                        zero_mem' :=\n                          (_ :\n                            0 ∈\n                              { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                  add_mem' :=\n                                    (_ :\n                                      ∀ {a b : R},\n                                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                          b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            a + b ∈\n                                              {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier) }\n[PROOFSTEP]\nobtain ⟨y, rfl⟩ := (mem_one_iff S).mp (hJ hx)\n[GOAL]\ncase mp.refine'_4.a.mpr.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nhJ : J ≤ 1\ny : R\nhx : ↑(algebraMap R P) y ∈ J\n⊢ ↑(algebraMap R P) y ∈\n    ↑{\n        toAddSubmonoid :=\n          {\n            toAddSubsemigroup :=\n              { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                add_mem' :=\n                  (_ :\n                    ∀ {a b : R},\n                      a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                        b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n            zero_mem' :=\n              (_ :\n                0 ∈\n                  { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                      add_mem' :=\n                        (_ :\n                          ∀ {a b : R},\n                            a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                              b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) }.carrier) },\n        smul_mem' :=\n          (_ :\n            ∀ (c : R) {x : R},\n              x ∈\n                  {\n                        toAddSubsemigroup :=\n                          { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                            add_mem' :=\n                              (_ :\n                                ∀ {a b : R},\n                                  a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                    b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                        zero_mem' :=\n                          (_ :\n                            0 ∈\n                              { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                  add_mem' :=\n                                    (_ :\n                                      ∀ {a b : R},\n                                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                          b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            a + b ∈\n                                              {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier →\n                c • x ∈\n                  {\n                        toAddSubsemigroup :=\n                          { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                            add_mem' :=\n                              (_ :\n                                ∀ {a b : R},\n                                  a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                    b ∈ {x | ↑(algebraMap R P) x ∈ J} → a + b ∈ {x | ↑(algebraMap R P) x ∈ J}) },\n                        zero_mem' :=\n                          (_ :\n                            0 ∈\n                              { carrier := {x | ↑(algebraMap R P) x ∈ J},\n                                  add_mem' :=\n                                    (_ :\n                                      ∀ {a b : R},\n                                        a ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                          b ∈ {x | ↑(algebraMap R P) x ∈ J} →\n                                            a + b ∈\n                                              {x | ↑(algebraMap R P) x ∈ J}) }.carrier) }.toAddSubsemigroup.carrier) }\n[PROOFSTEP]\nexact mem_setOf.mpr ⟨y, hx, rfl⟩\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\n⊢ (∃ I, ↑I = J) → J ≤ 1\n[PROOFSTEP]\nrintro ⟨I, hI⟩\n[GOAL]\ncase mpr.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nI : Ideal R\nhI : ↑I = J\n⊢ J ≤ 1\n[PROOFSTEP]\nrw [← hI]\n[GOAL]\ncase mpr.intro\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nJ : FractionalIdeal S P\nI : Ideal R\nhI : ↑I = J\n⊢ ↑I ≤ 1\n[PROOFSTEP]\napply coeIdeal_le_one\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\nI : FractionalIdeal S P\n⊢ 1 ≤ I ↔ 1 ∈ I\n[PROOFSTEP]\nrw [← coe_le_coe, coe_one, Submodule.one_le, mem_coe]\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝¹ : CommRing P\ninst✝ : Algebra R P\nloc : IsLocalization S P\n⊢ ↑1 = 1\n[PROOFSTEP]\nrw [Ideal.one_eq_top, coeIdeal_top]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\ng : P →ₐ[R] P'\nI : Submodule R P\na : R\na_nonzero : a ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (a • b)\nb : P'\nhb : b ∈ Submodule.map (AlgHom.toLinearMap g) I\n⊢ IsInteger R (a • b)\n[PROOFSTEP]\nobtain ⟨b', b'_mem, hb'⟩ := Submodule.mem_map.mp hb\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\ng : P →ₐ[R] P'\nI : Submodule R P\na : R\na_nonzero : a ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (a • b)\nb : P'\nhb : b ∈ Submodule.map (AlgHom.toLinearMap g) I\nb' : P\nb'_mem : b' ∈ I\nhb' : ↑(AlgHom.toLinearMap g) b' = b\n⊢ IsInteger R (a • b)\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := hI b' b'_mem\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\ng : P →ₐ[R] P'\nI : Submodule R P\na : R\na_nonzero : a ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (a • b)\nb : P'\nhb : b ∈ Submodule.map (AlgHom.toLinearMap g) I\nb' : P\nb'_mem : b' ∈ I\nhb' : ↑(AlgHom.toLinearMap g) b' = b\nx : R\nhx : ↑(algebraMap R P) x = a • b'\n⊢ IsInteger R (a • b)\n[PROOFSTEP]\nuse x\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\ng : P →ₐ[R] P'\nI : Submodule R P\na : R\na_nonzero : a ∈ S\nhI : ∀ (b : P), b ∈ I → IsInteger R (a • b)\nb : P'\nhb : b ∈ Submodule.map (AlgHom.toLinearMap g) I\nb' : P\nb'_mem : b' ∈ I\nhb' : ↑(AlgHom.toLinearMap g) b' = b\nx : R\nhx : ↑(algebraMap R P) x = a • b'\n⊢ ↑(algebraMap R P') x = a • b\n[PROOFSTEP]\nerw [← g.commutes, hx, g.map_smul, hb']\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Ideal R\n⊢ map g ↑I = ↑I\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Ideal R\nx : P'\n⊢ x ∈ map g ↑I ↔ x ∈ ↑I\n[PROOFSTEP]\nsimp only [mem_coeIdeal]\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Ideal R\nx : P'\n⊢ x ∈ map g ↑I ↔ ∃ x', x' ∈ I ∧ ↑(algebraMap R P') x' = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Ideal R\nx : P'\n⊢ x ∈ map g ↑I → ∃ x', x' ∈ I ∧ ↑(algebraMap R P') x' = x\n[PROOFSTEP]\nrintro ⟨_, ⟨y, hy, rfl⟩, rfl⟩\n[GOAL]\ncase a.mp.intro.intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Ideal R\ny : R\nhy : y ∈ ↑I\n⊢ ∃ x', x' ∈ I ∧ ↑(algebraMap R P') x' = ↑(AlgHom.toLinearMap g) (↑(Algebra.linearMap R P) y)\n[PROOFSTEP]\nexact ⟨y, hy, (g.commutes y).symm⟩\n[GOAL]\ncase a.mpr\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Ideal R\nx : P'\n⊢ (∃ x', x' ∈ I ∧ ↑(algebraMap R P') x' = x) → x ∈ map g ↑I\n[PROOFSTEP]\nrintro ⟨y, hy, rfl⟩\n[GOAL]\ncase a.mpr.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Ideal R\ny : R\nhy : y ∈ I\n⊢ ↑(algebraMap R P') y ∈ map g ↑I\n[PROOFSTEP]\nexact ⟨_, ⟨y, hy, rfl⟩, g.commutes y⟩\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\n⊢ map g (I * J) = map g I * map g J\n[PROOFSTEP]\nsimp only [mul_def]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\n⊢ map g { val := ↑I * ↑J, property := (_ : IsFractional S (↑I * ↑J)) } =\n    { val := ↑(map g I) * ↑(map g J), property := (_ : IsFractional S (↑(map g I) * ↑(map g J))) }\n[PROOFSTEP]\nexact coeToSubmodule_injective (Submodule.map_mul _ _ _)\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng✝ : P →ₐ[R] P'\ng : P ≃ₐ[R] P'\n⊢ map (↑(AlgEquiv.symm g)) (map (↑g) I) = I\n[PROOFSTEP]\nrw [← map_comp, g.symm_comp, map_id]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng✝ : P →ₐ[R] P'\nI : FractionalIdeal S P'\ng : P ≃ₐ[R] P'\n⊢ map (↑g) (map (↑(AlgEquiv.symm g)) I) = I\n[PROOFSTEP]\nrw [← map_comp, g.comp_symm, map_id]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng✝ : P →ₐ[R] P'\ng : P ≃ₐ[R] P'\nI : FractionalIdeal S P\n⊢ map (↑(AlgEquiv.symm g)) (map (↑g) I) = I\n[PROOFSTEP]\nrw [← map_comp, AlgEquiv.symm_comp, map_id]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng✝ : P →ₐ[R] P'\ng : P ≃ₐ[R] P'\nI : FractionalIdeal S P'\n⊢ map (↑g) (map (↑(AlgEquiv.symm g)) I) = I\n[PROOFSTEP]\nrw [← map_comp, AlgEquiv.comp_symm, map_id]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\nx : FractionalIdeal S P\n⊢ ↑(mapEquiv AlgEquiv.refl) x = ↑(RingEquiv.refl (FractionalIdeal S P)) x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\ns : Set P\nx✝ : ∃ a, a ∈ S ∧ ∀ (b : P), b ∈ s → IsInteger R (a • b)\na : R\na_mem : a ∈ S\nh : ∀ (b : P), b ∈ s → IsInteger R (a • b)\nb : P\nhb : b ∈ span R s\n⊢ IsInteger R (a • 0)\n[PROOFSTEP]\nrw [smul_zero]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\ns : Set P\nx✝ : ∃ a, a ∈ S ∧ ∀ (b : P), b ∈ s → IsInteger R (a • b)\na : R\na_mem : a ∈ S\nh : ∀ (b : P), b ∈ s → IsInteger R (a • b)\nb : P\nhb : b ∈ span R s\n⊢ IsInteger R 0\n[PROOFSTEP]\nexact isInteger_zero\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\ns : Set P\nx✝ : ∃ a, a ∈ S ∧ ∀ (b : P), b ∈ s → IsInteger R (a • b)\na : R\na_mem : a ∈ S\nh : ∀ (b : P), b ∈ s → IsInteger R (a • b)\nb : P\nhb : b ∈ span R s\nx y : P\nhx : IsInteger R (a • x)\nhy : IsInteger R (a • y)\n⊢ IsInteger R (a • (x + y))\n[PROOFSTEP]\nrw [smul_add]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\ns : Set P\nx✝ : ∃ a, a ∈ S ∧ ∀ (b : P), b ∈ s → IsInteger R (a • b)\na : R\na_mem : a ∈ S\nh : ∀ (b : P), b ∈ s → IsInteger R (a • b)\nb : P\nhb : b ∈ span R s\nx y : P\nhx : IsInteger R (a • x)\nhy : IsInteger R (a • y)\n⊢ IsInteger R (a • x + a • y)\n[PROOFSTEP]\nexact isInteger_add hx hy\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\ns✝ : Set P\nx✝ : ∃ a, a ∈ S ∧ ∀ (b : P), b ∈ s✝ → IsInteger R (a • b)\na : R\na_mem : a ∈ S\nh : ∀ (b : P), b ∈ s✝ → IsInteger R (a • b)\nb : P\nhb : b ∈ span R s✝\ns : R\nx : P\nhx : IsInteger R (a • x)\n⊢ IsInteger R (a • s • x)\n[PROOFSTEP]\nrw [smul_comm]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\ns✝ : Set P\nx✝ : ∃ a, a ∈ S ∧ ∀ (b : P), b ∈ s✝ → IsInteger R (a • b)\na : R\na_mem : a ∈ S\nh : ∀ (b : P), b ∈ s✝ → IsInteger R (a • b)\nb : P\nhb : b ∈ span R s✝\ns : R\nx : P\nhx : IsInteger R (a • x)\n⊢ IsInteger R (s • a • x)\n[PROOFSTEP]\nexact isInteger_smul hx\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Submodule R P\nhI : FG I\n⊢ IsFractional S I\n[PROOFSTEP]\nrcases hI with ⟨I, rfl⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Finset P\n⊢ IsFractional S (span R ↑I)\n[PROOFSTEP]\nrcases exist_integer_multiples_of_finset S I with ⟨⟨s, hs1⟩, hs⟩\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Finset P\ns : R\nhs1 : s ∈ S\nhs : ∀ (a : P), a ∈ I → IsInteger R (↑{ val := s, property := hs1 } • a)\n⊢ IsFractional S (span R ↑I)\n[PROOFSTEP]\nrw [isFractional_span_iff]\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Finset P\ns : R\nhs1 : s ∈ S\nhs : ∀ (a : P), a ∈ I → IsInteger R (↑{ val := s, property := hs1 } • a)\n⊢ ∃ a, a ∈ S ∧ ∀ (b : P), b ∈ ↑I → IsInteger R (a • b)\n[PROOFSTEP]\nexact ⟨s, hs1, hs⟩\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J✝ : FractionalIdeal S P\ng : P →ₐ[R] P'\nI J : FractionalIdeal S P\nx : P\nhx : x ∈ I * J\n⊢ x ∈ ↑I * ↑J\n[PROOFSTEP]\nsimpa using mem_coe.mpr hx\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\ninj : Function.Injective ↑(algebraMap R P)\nI : Ideal R\nh : IsUnit ↑I\n⊢ Ideal.FG I\n[PROOFSTEP]\nrw [← coeIdeal_fg S inj I]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\ninj : Function.Injective ↑(algebraMap R P)\nI : Ideal R\nh : IsUnit ↑I\n⊢ FG ↑↑I\n[PROOFSTEP]\nexact FractionalIdeal.fg_of_isUnit I h\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\n⊢ Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S\n[PROOFSTEP]\nrw [RingEquiv.toMonoidHom_refl, Submonoid.map_id]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : FractionalIdeal S P\nx : P'\n⊢ x ∈ ↑(canonicalEquiv S P P') I ↔\n    ∃ y, y ∈ I ∧ ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) y = x\n[PROOFSTEP]\nrw [canonicalEquiv, mapEquiv_apply, mem_map]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : FractionalIdeal S P\nx : P'\n⊢ (∃ x_1,\n      x_1 ∈ I ∧\n        ↑↑(let src :=\n                  ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                    (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S);\n                { toEquiv := src.toEquiv,\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : P),\n                        Equiv.toFun\n                            (ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S)).toEquiv\n                            (x * y) =\n                          Equiv.toFun\n                              (ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                  (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S)).toEquiv\n                              x *\n                            Equiv.toFun\n                              (ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                  (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S)).toEquiv\n                              y),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : P),\n                        Equiv.toFun\n                            (ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S)).toEquiv\n                            (x + y) =\n                          Equiv.toFun\n                              (ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                  (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S)).toEquiv\n                              x +\n                            Equiv.toFun\n                              (ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                  (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S)).toEquiv\n                              y),\n                  commutes' :=\n                    (_ :\n                      ∀ (r : R),\n                        ↑(ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S))\n                            (↑(algebraMap R P) r) =\n                          ↑(algebraMap R P') (↑(RingEquiv.refl R) r)) })\n            x_1 =\n          x) ↔\n    ∃ y, y ∈ I ∧ ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) y = x\n[PROOFSTEP]\nexact ⟨fun ⟨y, mem, Eq⟩ => ⟨y, mem, Eq⟩, fun ⟨y, mem, Eq⟩ => ⟨y, mem, Eq⟩⟩\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : FractionalIdeal S P'\nx : P\n⊢ x ∈ ↑(RingEquiv.symm (canonicalEquiv S P P')) I ↔ x ∈ ↑(canonicalEquiv S P' P) I\n[PROOFSTEP]\nrw [mem_canonicalEquiv_apply, canonicalEquiv, mapEquiv_symm, mapEquiv_apply, mem_map]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : FractionalIdeal S P'\nx : P\n⊢ (∃ x_1,\n      x_1 ∈ I ∧\n        ↑↑(AlgEquiv.symm\n                  (let src :=\n                    ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                      (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S);\n                  { toEquiv := src.toEquiv,\n                    map_mul' :=\n                      (_ :\n                        ∀ (x y : P),\n                          Equiv.toFun\n                              (ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                  (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S)).toEquiv\n                              (x * y) =\n                            Equiv.toFun\n                                (ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                    (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S)).toEquiv\n                                x *\n                              Equiv.toFun\n                                (ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                    (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S)).toEquiv\n                                y),\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : P),\n                          Equiv.toFun\n                              (ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                  (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S)).toEquiv\n                              (x + y) =\n                            Equiv.toFun\n                                (ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                    (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S)).toEquiv\n                                x +\n                              Equiv.toFun\n                                (ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                    (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S)).toEquiv\n                                y),\n                    commutes' :=\n                      (_ :\n                        ∀ (r : R),\n                          ↑(ringEquivOfRingEquiv P P' (RingEquiv.refl R)\n                                  (_ : Submonoid.map (RingEquiv.toMonoidHom (RingEquiv.refl R)) S = S))\n                              (↑(algebraMap R P) r) =\n                            ↑(algebraMap R P') (↑(RingEquiv.refl R) r)) }))\n            x_1 =\n          x) ↔\n    ∃ y, y ∈ I ∧ ↑(IsLocalization.map P (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) y = x\n[PROOFSTEP]\nexact ⟨fun ⟨y, mem, Eq⟩ => ⟨y, mem, Eq⟩, fun ⟨y, mem, Eq⟩ => ⟨y, mem, Eq⟩⟩\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : FractionalIdeal S P'\n⊢ ↑(canonicalEquiv S P P') (↑(canonicalEquiv S P' P) I) = I\n[PROOFSTEP]\nrw [← canonicalEquiv_symm, RingEquiv.apply_symm_apply]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝⁶ : CommRing P'\ninst✝⁵ : Algebra R P'\nloc' : IsLocalization S P'\nP''✝ : Type u_4\ninst✝⁴ : CommRing P''✝\ninst✝³ : Algebra R P''✝\nloc'' : IsLocalization S P''✝\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nP'' : Type u_5\ninst✝² : CommRing P''\ninst✝¹ : Algebra R P''\ninst✝ : IsLocalization S P''\nI : FractionalIdeal S P\n⊢ ↑(canonicalEquiv S P' P'') (↑(canonicalEquiv S P P') I) = ↑(canonicalEquiv S P P'') I\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝⁶ : CommRing P'\ninst✝⁵ : Algebra R P'\nloc' : IsLocalization S P'\nP''✝ : Type u_4\ninst✝⁴ : CommRing P''✝\ninst✝³ : Algebra R P''✝\nloc'' : IsLocalization S P''✝\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nP'' : Type u_5\ninst✝² : CommRing P''\ninst✝¹ : Algebra R P''\ninst✝ : IsLocalization S P''\nI : FractionalIdeal S P\nx✝ : P''\n⊢ x✝ ∈ ↑(canonicalEquiv S P' P'') (↑(canonicalEquiv S P P') I) ↔ x✝ ∈ ↑(canonicalEquiv S P P'') I\n[PROOFSTEP]\nsimp only [IsLocalization.map_map, RingHomInvPair.comp_eq₂, mem_canonicalEquiv_apply, exists_prop,\n  exists_exists_and_eq_and]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Ideal R\n⊢ ↑(canonicalEquiv S P P') ↑I = ↑I\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI✝ J : FractionalIdeal S P\ng : P →ₐ[R] P'\nI : Ideal R\nx✝ : P'\n⊢ x✝ ∈ ↑(canonicalEquiv S P P') ↑I ↔ x✝ ∈ ↑I\n[PROOFSTEP]\nsimp [IsLocalization.map_eq]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\n⊢ canonicalEquiv S P P = RingEquiv.refl (FractionalIdeal S P)\n[PROOFSTEP]\nrw [← canonicalEquiv_trans_canonicalEquiv S P P]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\n⊢ RingEquiv.trans (canonicalEquiv S P P) (canonicalEquiv S P P) = RingEquiv.refl (FractionalIdeal S P)\n[PROOFSTEP]\nconvert (canonicalEquiv S P P).symm_trans_self\n[GOAL]\ncase h.e'_2.h.e'_10\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nP' : Type u_3\ninst✝³ : CommRing P'\ninst✝² : Algebra R P'\nloc' : IsLocalization S P'\nP'' : Type u_4\ninst✝¹ : CommRing P''\ninst✝ : Algebra R P''\nloc'' : IsLocalization S P''\nI J : FractionalIdeal S P\ng : P →ₐ[R] P'\n⊢ canonicalEquiv S P P = RingEquiv.symm (canonicalEquiv S P P)\n[PROOFSTEP]\nexact (canonicalEquiv_symm S P P).symm\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\n⊢ ∃ x x_1, ↑(algebraMap R K) x ∈ I\n[PROOFSTEP]\nobtain ⟨y : K, y_mem, y_not_mem⟩ := SetLike.exists_of_lt (by simpa only using bot_lt_iff_ne_bot.mpr hI)\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\n⊢ ?m.1106912 < ?m.1106913\n[PROOFSTEP]\nsimpa only using bot_lt_iff_ne_bot.mpr hI\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\ny : K\ny_mem : y ∈ I\ny_not_mem : ¬y ∈ ⊥\n⊢ ∃ x x_1, ↑(algebraMap R K) x ∈ I\n[PROOFSTEP]\nhave y_ne_zero : y ≠ 0 := by simpa using y_not_mem\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\ny : K\ny_mem : y ∈ I\ny_not_mem : ¬y ∈ ⊥\n⊢ y ≠ 0\n[PROOFSTEP]\nsimpa using y_not_mem\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\ny : K\ny_mem : y ∈ I\ny_not_mem : ¬y ∈ ⊥\ny_ne_zero : y ≠ 0\n⊢ ∃ x x_1, ↑(algebraMap R K) x ∈ I\n[PROOFSTEP]\nobtain ⟨z, ⟨x, hx⟩⟩ := exists_integer_multiple R⁰ y\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\ny : K\ny_mem : y ∈ I\ny_not_mem : ¬y ∈ ⊥\ny_ne_zero : y ≠ 0\nz : { x // x ∈ R⁰ }\nx : R\nhx : ↑(algebraMap R K) x = ↑z • y\n⊢ ∃ x x_1, ↑(algebraMap R K) x ∈ I\n[PROOFSTEP]\nrefine' ⟨x, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\ny : K\ny_mem : y ∈ I\ny_not_mem : ¬y ∈ ⊥\ny_ne_zero : y ≠ 0\nz : { x // x ∈ R⁰ }\nx : R\nhx : ↑(algebraMap R K) x = ↑z • y\n⊢ x ≠ 0\n[PROOFSTEP]\nrw [Ne.def, ← @IsFractionRing.to_map_eq_zero_iff R _ K, hx, Algebra.smul_def]\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\ny : K\ny_mem : y ∈ I\ny_not_mem : ¬y ∈ ⊥\ny_ne_zero : y ≠ 0\nz : { x // x ∈ R⁰ }\nx : R\nhx : ↑(algebraMap R K) x = ↑z • y\n⊢ ¬↑(algebraMap R K) ↑z * y = 0\n[PROOFSTEP]\nexact mul_ne_zero (IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors z.2) y_ne_zero\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\ny : K\ny_mem : y ∈ I\ny_not_mem : ¬y ∈ ⊥\ny_ne_zero : y ≠ 0\nz : { x // x ∈ R⁰ }\nx : R\nhx : ↑(algebraMap R K) x = ↑z • y\n⊢ ↑(algebraMap R K) x ∈ I\n[PROOFSTEP]\nrw [hx]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\ny : K\ny_mem : y ∈ I\ny_not_mem : ¬y ∈ ⊥\ny_ne_zero : y ≠ 0\nz : { x // x ∈ R⁰ }\nx : R\nhx : ↑(algebraMap R K) x = ↑z • y\n⊢ ↑z • y ∈ I\n[PROOFSTEP]\nexact smul_mem _ _ y_mem\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\n⊢ map h I ≠ 0\n[PROOFSTEP]\nobtain ⟨x, x_ne_zero, hx⟩ := exists_ne_zero_mem_isInteger hI\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\nx : R\nx_ne_zero : x ≠ 0\nhx : ↑(algebraMap R K) x ∈ I\n⊢ map h I ≠ 0\n[PROOFSTEP]\ncontrapose! x_ne_zero with map_eq_zero\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\nx : R\nhx : ↑(algebraMap R K) x ∈ I\nmap_eq_zero : map h I = 0\n⊢ x = 0\n[PROOFSTEP]\nrefine' IsFractionRing.to_map_eq_zero_iff.mp (eq_zero_iff.mp map_eq_zero _ (mem_map.mpr _))\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁶ : Field K\ninst✝⁵ : Field K'\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : Algebra R K'\ninst✝¹ : IsFractionRing R K'\nI J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\ninst✝ : Nontrivial R\nhI : I ≠ 0\nx : R\nhx : ↑(algebraMap R K) x ∈ I\nmap_eq_zero : map h I = 0\n⊢ ∃ x_1, x_1 ∈ I ∧ ↑h x_1 = ↑(algebraMap R K') x\n[PROOFSTEP]\nexact ⟨algebraMap R K x, hx, h.commutes x⟩\n[GOAL]\nR : Type u_1\ninst✝⁸ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁷ : CommRing P\ninst✝⁶ : Algebra R P\nloc : IsLocalization S P\nK : Type u_3\nK' : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Field K'\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : Algebra R K'\ninst✝ : IsFractionRing R K'\nI✝ J : FractionalIdeal R⁰ K\nh : K →ₐ[R] K'\nI : Ideal R\n⊢ ↑I = 1 ↔ I = 1\n[PROOFSTEP]\nsimpa only [Ideal.one_eq_top] using coeIdeal_inj\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁴ : CommRing P\ninst✝³ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝² : CommRing R₁\nK : Type u_4\ninst✝¹ : Field K\ninst✝ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\nh : 0 = 1\n⊢ 1 ∈ 0\n[PROOFSTEP]\nrw [← (algebraMap R₁ K).map_one]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁴ : CommRing P\ninst✝³ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝² : CommRing R₁\nK : Type u_4\ninst✝¹ : Field K\ninst✝ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\nh : 0 = 1\n⊢ ↑(algebraMap R₁ K) 1 ∈ 0\n[PROOFSTEP]\nsimpa only [h] using coe_mem_one R₁⁰ 1\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁴ : CommRing P\ninst✝³ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝² : CommRing R₁\nK : Type u_4\ninst✝¹ : Field K\ninst✝ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\nI J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I = 0\n⊢ 0 = 1\n[PROOFSTEP]\nconvert h\n[GOAL]\ncase h.e'_2\nR : Type u_1\ninst✝⁵ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁴ : CommRing P\ninst✝³ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝² : CommRing R₁\nK : Type u_4\ninst✝¹ : Field K\ninst✝ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\nI J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I = 0\n⊢ 0 = I * J\n[PROOFSTEP]\nsimp [hI]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\n⊢ IsFractional R₁⁰ (I / J)\n[PROOFSTEP]\nobtain ⟨y, mem_J, not_mem_zero⟩ := SetLike.exists_of_lt (show 0 < J by simpa only using bot_lt_iff_ne_bot.mpr h)\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\n⊢ 0 < J\n[PROOFSTEP]\nsimpa only using bot_lt_iff_ne_bot.mpr h\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\n⊢ IsFractional R₁⁰ (I / J)\n[PROOFSTEP]\nobtain ⟨y', hy'⟩ := hJ y mem_J\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\ny' : R₁\nhy' : ↑(algebraMap R₁ K) y' = aJ • y\n⊢ IsFractional R₁⁰ (I / J)\n[PROOFSTEP]\nuse aI * y'\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\ny' : R₁\nhy' : ↑(algebraMap R₁ K) y' = aJ • y\n⊢ aI * y' ∈ R₁⁰ ∧ ∀ (b : K), b ∈ I / J → IsInteger R₁ ((aI * y') • b)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\ny' : R₁\nhy' : ↑(algebraMap R₁ K) y' = aJ • y\n⊢ aI * y' ∈ R₁⁰\n[PROOFSTEP]\napply (nonZeroDivisors R₁).mul_mem haI (mem_nonZeroDivisors_iff_ne_zero.mpr _)\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\ny' : R₁\nhy' : ↑(algebraMap R₁ K) y' = aJ • y\n⊢ y' ≠ 0\n[PROOFSTEP]\nintro y'_eq_zero\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\ny' : R₁\nhy' : ↑(algebraMap R₁ K) y' = aJ • y\ny'_eq_zero : y' = 0\n⊢ False\n[PROOFSTEP]\nhave : algebraMap R₁ K aJ * y = 0 := by rw [← Algebra.smul_def, ← hy', y'_eq_zero, RingHom.map_zero]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\ny' : R₁\nhy' : ↑(algebraMap R₁ K) y' = aJ • y\ny'_eq_zero : y' = 0\n⊢ ↑(algebraMap R₁ K) aJ * y = 0\n[PROOFSTEP]\nrw [← Algebra.smul_def, ← hy', y'_eq_zero, RingHom.map_zero]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\ny' : R₁\nhy' : ↑(algebraMap R₁ K) y' = aJ • y\ny'_eq_zero : y' = 0\nthis : ↑(algebraMap R₁ K) aJ * y = 0\n⊢ False\n[PROOFSTEP]\nhave y_zero :=\n  (mul_eq_zero.mp this).resolve_left\n    (mt ((injective_iff_map_eq_zero (algebraMap R₁ K)).1 (IsFractionRing.injective _ _) _)\n      (mem_nonZeroDivisors_iff_ne_zero.mp haJ))\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\ny' : R₁\nhy' : ↑(algebraMap R₁ K) y' = aJ • y\ny'_eq_zero : y' = 0\nthis : ↑(algebraMap R₁ K) aJ * y = 0\ny_zero : y = 0\n⊢ False\n[PROOFSTEP]\napply not_mem_zero\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\ny' : R₁\nhy' : ↑(algebraMap R₁ K) y' = aJ • y\ny'_eq_zero : y' = 0\nthis : ↑(algebraMap R₁ K) aJ * y = 0\ny_zero : y = 0\n⊢ y ∈ 0\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase h.right\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\ny' : R₁\nhy' : ↑(algebraMap R₁ K) y' = aJ • y\n⊢ ∀ (b : K), b ∈ I / J → IsInteger R₁ ((aI * y') • b)\n[PROOFSTEP]\nintro b hb\n[GOAL]\ncase h.right\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\ny' : R₁\nhy' : ↑(algebraMap R₁ K) y' = aJ • y\nb : K\nhb : b ∈ I / J\n⊢ IsInteger R₁ ((aI * y') • b)\n[PROOFSTEP]\nconvert hI _ (hb _ (Submodule.smul_mem _ aJ mem_J)) using 1\n[GOAL]\ncase h.e'_6\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI J : Submodule R₁ K\naI : R₁\nhaI : aI ∈ R₁⁰\nhI : ∀ (b : K), b ∈ I → IsInteger R₁ (aI • b)\naJ : R₁\nhaJ : aJ ∈ R₁⁰\nhJ : ∀ (b : K), b ∈ J → IsInteger R₁ (aJ • b)\nh : J ≠ 0\ny : K\nmem_J : y ∈ J\nnot_mem_zero : ¬y ∈ 0\ny' : R₁\nhy' : ↑(algebraMap R₁ K) y' = aJ • y\nb : K\nhb : b ∈ I / J\n⊢ (aI * y') • b = aI • (b * aJ • y)\n[PROOFSTEP]\nrw [← hy', mul_comm b, ← Algebra.smul_def, mul_smul]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : J ≠ 0\nx : K\n⊢ x ∈ I / J ↔ ∀ (y : K), y ∈ J → x * y ∈ I\n[PROOFSTEP]\nrw [div_nonzero h]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : J ≠ 0\nx : K\n⊢ x ∈ { val := ↑I / ↑J, property := (_ : IsFractional R₁⁰ (↑I / ↑J)) } ↔ ∀ (y : K), y ∈ J → x * y ∈ I\n[PROOFSTEP]\nexact Submodule.mem_div_iff_forall_mul_mem\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\n⊢ I * (1 / I) ≤ 1\n[PROOFSTEP]\nby_cases hI : I = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nhI : I = 0\n⊢ I * (1 / I) ≤ 1\n[PROOFSTEP]\nrw [hI, div_zero, mul_zero]\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nhI : I = 0\n⊢ 0 ≤ 1\n[PROOFSTEP]\nexact zero_le 1\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nhI : ¬I = 0\n⊢ I * (1 / I) ≤ 1\n[PROOFSTEP]\nrw [← coe_le_coe, coe_mul, coe_div hI, coe_one]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nhI : ¬I = 0\n⊢ ↑I * (1 / ↑I) ≤ 1\n[PROOFSTEP]\napply Submodule.mul_one_div_le_one\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nhI : I ≤ 1\n⊢ I ≤ I * (1 / I)\n[PROOFSTEP]\nby_cases hI_nz : I = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nhI : I ≤ 1\nhI_nz : I = 0\n⊢ I ≤ I * (1 / I)\n[PROOFSTEP]\nrw [hI_nz, div_zero, mul_zero]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nhI : I ≤ 1\nhI_nz : ¬I = 0\n⊢ I ≤ I * (1 / I)\n[PROOFSTEP]\nrw [← coe_le_coe, coe_mul, coe_div hI_nz, coe_one]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nhI : I ≤ 1\nhI_nz : ¬I = 0\n⊢ ↑I ≤ ↑I * (1 / ↑I)\n[PROOFSTEP]\nrw [← coe_le_coe, coe_one] at hI \n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nhI : ↑I ≤ 1\nhI_nz : ¬I = 0\n⊢ ↑I ≤ ↑I * (1 / ↑I)\n[PROOFSTEP]\nexact Submodule.le_self_mul_one_div hI\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J J' : FractionalIdeal R₁⁰ K\nhJ' : J' ≠ 0\n⊢ I ≤ J / J' ↔ I * J' ≤ J\n[PROOFSTEP]\nrw [div_nonzero hJ']\n  -- Porting note: this used to be { convert; rw }, flipped the order.\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J J' : FractionalIdeal R₁⁰ K\nhJ' : J' ≠ 0\n⊢ I ≤ { val := ↑J / ↑J', property := (_ : IsFractional R₁⁰ (↑J / ↑J')) } ↔ I * J' ≤ J\n[PROOFSTEP]\nrw [← coe_le_coe (I := I * J') (J := J), coe_mul]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J J' : FractionalIdeal R₁⁰ K\nhJ' : J' ≠ 0\n⊢ I ≤ { val := ↑J / ↑J', property := (_ : IsFractional R₁⁰ (↑J / ↑J')) } ↔ ↑I * ↑J' ≤ ↑J\n[PROOFSTEP]\nexact Submodule.le_div_iff_mul_le\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\n⊢ I / 1 = I\n[PROOFSTEP]\nrw [div_nonzero (one_ne_zero' (FractionalIdeal R₁⁰ K))]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\n⊢ { val := ↑I / ↑1, property := (_ : IsFractional R₁⁰ (↑I / ↑1)) } = I\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nx✝ : K\n⊢ x✝ ∈ { val := ↑I / ↑1, property := (_ : IsFractional R₁⁰ (↑I / ↑1)) } ↔ x✝ ∈ I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nx✝ : K\n⊢ x✝ ∈ { val := ↑I / ↑1, property := (_ : IsFractional R₁⁰ (↑I / ↑1)) } → x✝ ∈ I\n[PROOFSTEP]\nintro h\n[GOAL]\ncase a.mpr\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nx✝ : K\n⊢ x✝ ∈ I → x✝ ∈ { val := ↑I / ↑1, property := (_ : IsFractional R₁⁰ (↑I / ↑1)) }\n[PROOFSTEP]\nintro h\n[GOAL]\ncase a.mp\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nx✝ : K\nh : x✝ ∈ { val := ↑I / ↑1, property := (_ : IsFractional R₁⁰ (↑I / ↑1)) }\n⊢ x✝ ∈ I\n[PROOFSTEP]\nsimpa using mem_div_iff_forall_mul_mem.mp h 1 ((algebraMap R₁ K).map_one ▸ coe_mem_one R₁⁰ 1)\n[GOAL]\ncase a.mpr\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nx✝ : K\nh : x✝ ∈ I\n⊢ x✝ ∈ { val := ↑I / ↑1, property := (_ : IsFractional R₁⁰ (↑I / ↑1)) }\n[PROOFSTEP]\napply mem_div_iff_forall_mul_mem.mpr\n[GOAL]\ncase a.mpr\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nx✝ : K\nh : x✝ ∈ I\n⊢ ∀ (y : K), y ∈ ↑1 → x✝ * y ∈ ↑I\n[PROOFSTEP]\nrintro y\n  ⟨y', _, rfl⟩\n      -- Porting note: this used to be { convert; rw }, flipped the order.\n[GOAL]\ncase a.mpr.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nx✝ : K\nh : x✝ ∈ I\ny' : R₁\nleft✝ : y' ∈ ↑⊤\n⊢ x✝ * ↑(Algebra.linearMap R₁ K) y' ∈ ↑I\n[PROOFSTEP]\nrw [mul_comm, Algebra.linearMap_apply, ← Algebra.smul_def]\n[GOAL]\ncase a.mpr.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J I : FractionalIdeal R₁⁰ K\nx✝ : K\nh : x✝ ∈ I\ny' : R₁\nleft✝ : y' ∈ ↑⊤\n⊢ y' • x✝ ∈ ↑I\n[PROOFSTEP]\nexact Submodule.smul_mem _ y' h\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\n⊢ J = 1 / I\n[PROOFSTEP]\nhave hI : I ≠ 0 := ne_zero_of_mul_eq_one I J h\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ J = 1 / I\n[PROOFSTEP]\nsuffices h' : I * (1 / I) = 1\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\nh' : I * (1 / I) = 1\n⊢ J = 1 / I\n[PROOFSTEP]\nexact congr_arg Units.inv <| @Units.ext _ _ (Units.mkOfMulEqOne _ _ h) (Units.mkOfMulEqOne _ _ h') rfl\n[GOAL]\ncase h'\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ I * (1 / I) = 1\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase h'.a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ I * (1 / I) ≤ 1\n[PROOFSTEP]\napply mul_le.mpr _\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ ∀ (i : K), i ∈ I → ∀ (j : K), j ∈ 1 / I → i * j ∈ 1\n[PROOFSTEP]\nintro x hx y hy\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\nx : K\nhx : x ∈ I\ny : K\nhy : y ∈ 1 / I\n⊢ x * y ∈ 1\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\nx : K\nhx : x ∈ I\ny : K\nhy : y ∈ 1 / I\n⊢ y * x ∈ 1\n[PROOFSTEP]\nexact (mem_div_iff_of_nonzero hI).mp hy x hx\n[GOAL]\ncase h'.a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ 1 ≤ I * (1 / I)\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase h'.a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ I * J ≤ I * (I * J / I)\n[PROOFSTEP]\napply mul_left_mono I\n[GOAL]\ncase h'.a.a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ J ≤ I * J / I\n[PROOFSTEP]\napply (le_div_iff_of_nonzero hI).mpr _\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\n⊢ ∀ (x : K), x ∈ J → ∀ (y : K), y ∈ I → x * y ∈ I * J\n[PROOFSTEP]\nintro y hy x hx\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\ny : K\nhy : y ∈ J\nx : K\nhx : x ∈ I\n⊢ y * x ∈ I * J\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I J : FractionalIdeal R₁⁰ K\nh : I * J = 1\nhI : I ≠ 0\ny : K\nhy : y ∈ J\nx : K\nhx : x ∈ I\n⊢ x * y ∈ I * J\n[PROOFSTEP]\nexact mul_mem_mul hx hy\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI✝ J✝ I : FractionalIdeal R₁⁰ K\nx✝ : ∃ J, I * J = 1\nJ : FractionalIdeal R₁⁰ K\nhJ : I * J = 1\n⊢ I * (1 / I) = 1\n[PROOFSTEP]\nrwa [← eq_one_div_of_mul_eq_one_right I J hJ]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝³ : IsDomain R₁\nI✝ J✝ : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nI J : FractionalIdeal R₁⁰ K\nh : K ≃ₐ[R₁] K'\n⊢ map (↑h) (I / J) = map (↑h) I / map (↑h) J\n[PROOFSTEP]\nby_cases H : J = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝³ : IsDomain R₁\nI✝ J✝ : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nI J : FractionalIdeal R₁⁰ K\nh : K ≃ₐ[R₁] K'\nH : J = 0\n⊢ map (↑h) (I / J) = map (↑h) I / map (↑h) J\n[PROOFSTEP]\nrw [H, div_zero, map_zero, div_zero]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝³ : IsDomain R₁\nI✝ J✝ : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nI J : FractionalIdeal R₁⁰ K\nh : K ≃ₐ[R₁] K'\nH : ¬J = 0\n⊢ map (↑h) (I / J) = map (↑h) I / map (↑h) J\n[PROOFSTEP]\nrw [← coeToSubmodule_inj, div_nonzero H, div_nonzero (map_ne_zero _ H)]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝³ : IsDomain R₁\nI✝ J✝ : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nI J : FractionalIdeal R₁⁰ K\nh : K ≃ₐ[R₁] K'\nH : ¬J = 0\n⊢ ↑(map ↑h { val := ↑I / ↑J, property := (_ : IsFractional R₁⁰ (↑I / ↑J)) }) =\n    ↑{ val := ↑(map (↑h) I) / ↑(map (↑h) J), property := (_ : IsFractional R₁⁰ (↑(map (↑h) I) / ↑(map (↑h) J))) }\n[PROOFSTEP]\nsimp [Submodule.map_div]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝³ : IsDomain R₁\nI✝ J : FractionalIdeal R₁⁰ K\nK' : Type u_5\ninst✝² : Field K'\ninst✝¹ : Algebra R₁ K'\ninst✝ : IsFractionRing R₁ K'\nI : FractionalIdeal R₁⁰ K\nh : K ≃ₐ[R₁] K'\n⊢ map (↑h) (1 / I) = 1 / map (↑h) I\n[PROOFSTEP]\nrw [map_div, map_one]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\n⊢ I = 0 ∨ I = 1\n[PROOFSTEP]\nrw [or_iff_not_imp_left]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\n⊢ ¬I = 0 → I = 1\n[PROOFSTEP]\nintro hI\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\nhI : ¬I = 0\n⊢ I = 1\n[PROOFSTEP]\nsimp_rw [@SetLike.ext_iff _ _ _ I 1, mem_one_iff]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\nhI : ¬I = 0\n⊢ ∀ (x : L), x ∈ I ↔ ∃ x', ↑(algebraMap K L) x' = x\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\nhI : ¬I = 0\nx : L\n⊢ x ∈ I ↔ ∃ x', ↑(algebraMap K L) x' = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\nhI : ¬I = 0\nx : L\n⊢ x ∈ I → ∃ x', ↑(algebraMap K L) x' = x\n[PROOFSTEP]\nintro x_mem\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\nhI : ¬I = 0\nx : L\nx_mem : x ∈ I\n⊢ ∃ x', ↑(algebraMap K L) x' = x\n[PROOFSTEP]\nobtain ⟨n, d, rfl⟩ := IsLocalization.mk'_surjective K⁰ x\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\nhI : ¬I = 0\nn : K\nd : { x // x ∈ K⁰ }\nx_mem : mk' L n d ∈ I\n⊢ ∃ x', ↑(algebraMap K L) x' = mk' L n d\n[PROOFSTEP]\nrefine' ⟨n / d, _⟩\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\nhI : ¬I = 0\nn : K\nd : { x // x ∈ K⁰ }\nx_mem : mk' L n d ∈ I\n⊢ ↑(algebraMap K L) (n / ↑d) = mk' L n d\n[PROOFSTEP]\nrw [map_div₀, IsFractionRing.mk'_eq_div]\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\nhI : ¬I = 0\nx : L\n⊢ (∃ x', ↑(algebraMap K L) x' = x) → x ∈ I\n[PROOFSTEP]\nrintro ⟨x, rfl⟩\n[GOAL]\ncase mpr.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\nhI : ¬I = 0\nx : K\n⊢ ↑(algebraMap K L) x ∈ I\n[PROOFSTEP]\nobtain ⟨y, y_ne, y_mem⟩ := exists_ne_zero_mem_isInteger hI\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\nhI : ¬I = 0\nx y : K\ny_ne : y ≠ 0\ny_mem : ↑(algebraMap K L) y ∈ I\n⊢ ↑(algebraMap K L) x ∈ I\n[PROOFSTEP]\nrw [← div_mul_cancel x y_ne, RingHom.map_mul, ← Algebra.smul_def]\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\nK : Type u_4\nL : Type u_5\ninst✝⁶ : CommRing R₁\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Algebra R₁ K\ninst✝² : IsFractionRing R₁ K\ninst✝¹ : Algebra K L\ninst✝ : IsFractionRing K L\nI : FractionalIdeal K⁰ L\nhI : ¬I = 0\nx y : K\ny_ne : y ≠ 0\ny_mem : ↑(algebraMap K L) y ∈ I\n⊢ (x / y) • ↑(algebraMap K L) y ∈ I\n[PROOFSTEP]\nexact smul_mem (M := L) I (x / y) y_mem\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\n⊢ IsFractional R₁⁰ (span R₁ (f '' ↑s))\n[PROOFSTEP]\nobtain ⟨a', ha'⟩ := IsLocalization.exist_integer_multiples R₁⁰ s f\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\na' : { x // x ∈ R₁⁰ }\nha' : ∀ (i : ι), i ∈ s → IsInteger R₁ (↑a' • f i)\n⊢ IsFractional R₁⁰ (span R₁ (f '' ↑s))\n[PROOFSTEP]\nrefine' ⟨a', a'.2, fun x hx => Submodule.span_induction hx _ _ _ _⟩\n[GOAL]\ncase intro.refine'_1\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\na' : { x // x ∈ R₁⁰ }\nha' : ∀ (i : ι), i ∈ s → IsInteger R₁ (↑a' • f i)\nx : K\nhx : x ∈ span R₁ (f '' ↑s)\n⊢ ∀ (x : K), x ∈ f '' ↑s → IsInteger R₁ (↑a' • x)\n[PROOFSTEP]\nrintro _ ⟨i, hi, rfl⟩\n[GOAL]\ncase intro.refine'_1.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\na' : { x // x ∈ R₁⁰ }\nha' : ∀ (i : ι), i ∈ s → IsInteger R₁ (↑a' • f i)\nx : K\nhx : x ∈ span R₁ (f '' ↑s)\ni : ι\nhi : i ∈ ↑s\n⊢ IsInteger R₁ (↑a' • f i)\n[PROOFSTEP]\nexact ha' i hi\n[GOAL]\ncase intro.refine'_2\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\na' : { x // x ∈ R₁⁰ }\nha' : ∀ (i : ι), i ∈ s → IsInteger R₁ (↑a' • f i)\nx : K\nhx : x ∈ span R₁ (f '' ↑s)\n⊢ IsInteger R₁ (↑a' • 0)\n[PROOFSTEP]\nrw [smul_zero]\n[GOAL]\ncase intro.refine'_2\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\na' : { x // x ∈ R₁⁰ }\nha' : ∀ (i : ι), i ∈ s → IsInteger R₁ (↑a' • f i)\nx : K\nhx : x ∈ span R₁ (f '' ↑s)\n⊢ IsInteger R₁ 0\n[PROOFSTEP]\nexact IsLocalization.isInteger_zero\n[GOAL]\ncase intro.refine'_3\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\na' : { x // x ∈ R₁⁰ }\nha' : ∀ (i : ι), i ∈ s → IsInteger R₁ (↑a' • f i)\nx : K\nhx : x ∈ span R₁ (f '' ↑s)\n⊢ ∀ (x y : K), IsInteger R₁ (↑a' • x) → IsInteger R₁ (↑a' • y) → IsInteger R₁ (↑a' • (x + y))\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase intro.refine'_3\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\na' : { x // x ∈ R₁⁰ }\nha' : ∀ (i : ι), i ∈ s → IsInteger R₁ (↑a' • f i)\nx✝ : K\nhx✝ : x✝ ∈ span R₁ (f '' ↑s)\nx y : K\nhx : IsInteger R₁ (↑a' • x)\nhy : IsInteger R₁ (↑a' • y)\n⊢ IsInteger R₁ (↑a' • (x + y))\n[PROOFSTEP]\nrw [smul_add]\n[GOAL]\ncase intro.refine'_3\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\na' : { x // x ∈ R₁⁰ }\nha' : ∀ (i : ι), i ∈ s → IsInteger R₁ (↑a' • f i)\nx✝ : K\nhx✝ : x✝ ∈ span R₁ (f '' ↑s)\nx y : K\nhx : IsInteger R₁ (↑a' • x)\nhy : IsInteger R₁ (↑a' • y)\n⊢ IsInteger R₁ (↑a' • x + ↑a' • y)\n[PROOFSTEP]\nexact IsLocalization.isInteger_add hx hy\n[GOAL]\ncase intro.refine'_4\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\na' : { x // x ∈ R₁⁰ }\nha' : ∀ (i : ι), i ∈ s → IsInteger R₁ (↑a' • f i)\nx : K\nhx : x ∈ span R₁ (f '' ↑s)\n⊢ ∀ (a : R₁) (x : K), IsInteger R₁ (↑a' • x) → IsInteger R₁ (↑a' • a • x)\n[PROOFSTEP]\nintro c x hx\n[GOAL]\ncase intro.refine'_4\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\na' : { x // x ∈ R₁⁰ }\nha' : ∀ (i : ι), i ∈ s → IsInteger R₁ (↑a' • f i)\nx✝ : K\nhx✝ : x✝ ∈ span R₁ (f '' ↑s)\nc : R₁\nx : K\nhx : IsInteger R₁ (↑a' • x)\n⊢ IsInteger R₁ (↑a' • c • x)\n[PROOFSTEP]\nrw [smul_comm]\n[GOAL]\ncase intro.refine'_4\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\na' : { x // x ∈ R₁⁰ }\nha' : ∀ (i : ι), i ∈ s → IsInteger R₁ (↑a' • f i)\nx✝ : K\nhx✝ : x✝ ∈ span R₁ (f '' ↑s)\nc : R₁\nx : K\nhx : IsInteger R₁ (↑a' • x)\n⊢ IsInteger R₁ (c • ↑a' • x)\n[PROOFSTEP]\nexact IsLocalization.isInteger_smul hx\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\n⊢ spanFinset R₁ s f = 0 ↔ ∀ (j : ι), j ∈ s → f j = 0\n[PROOFSTEP]\nsimp only [← coeToSubmodule_inj, spanFinset_coe, coe_zero, Submodule.span_eq_bot, Set.mem_image, Finset.mem_coe,\n  forall_exists_index, and_imp, forall_apply_eq_imp_iff₂]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nι : Type u_5\ns : Finset ι\nf : ι → K\n⊢ spanFinset R₁ s f ≠ 0 ↔ ∃ j, j ∈ s ∧ f j ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx : P\n⊢ ↑(spanSingleton S x) = span R {x}\n[PROOFSTEP]\nrw [spanSingleton]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx : P\n⊢ ↑{ val := span R {x}, property := (_ : IsFractional S (span R {x})) } = span R {x}\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\n⊢ x ∈ spanSingleton S y ↔ ∃ z, z • y = x\n[PROOFSTEP]\nrw [spanSingleton]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\n⊢ x ∈ { val := span R {y}, property := (_ : IsFractional S (span R {y})) } ↔ ∃ z, z • y = x\n[PROOFSTEP]\nexact Submodule.mem_span_singleton\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx : P\nI : FractionalIdeal S P\n⊢ spanSingleton S x ≤ I ↔ x ∈ I\n[PROOFSTEP]\nrw [← coe_le_coe, coe_spanSingleton, Submodule.span_singleton_le_iff_mem, mem_coe]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : NoZeroSMulDivisors R P\nx y : P\n⊢ spanSingleton S x = spanSingleton S y ↔ ∃ z, z • x = y\n[PROOFSTEP]\nrw [← Submodule.span_singleton_eq_span_singleton, spanSingleton, spanSingleton]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : NoZeroSMulDivisors R P\nx y : P\n⊢ { val := span R {x}, property := (_ : IsFractional S (span R {x})) } =\n      { val := span R {y}, property := (_ : IsFractional S (span R {y})) } ↔\n    span R {x} = span R {y}\n[PROOFSTEP]\nexact Subtype.mk_eq_mk\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\nI : FractionalIdeal S P\ninst✝ : IsPrincipal ↑I\n⊢ I = spanSingleton S (generator ↑I)\n[PROOFSTEP]\nrw [spanSingleton, ← coeToSubmodule_inj, coe_mk, span_singleton_generator]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\n⊢ spanSingleton S 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx✝ : P\n⊢ x✝ ∈ spanSingleton S 0 ↔ x✝ ∈ 0\n[PROOFSTEP]\nsimp [Submodule.mem_span_singleton, eq_comm]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\ny : P\nh : spanSingleton S y = 0\n⊢ span R {y} = ⊥\n[PROOFSTEP]\nsimpa using congr_arg Subtype.val h\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\ny : P\nh : y = 0\n⊢ spanSingleton S y = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\n⊢ spanSingleton S 1 = 1\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx✝ : P\n⊢ x✝ ∈ spanSingleton S 1 ↔ x✝ ∈ 1\n[PROOFSTEP]\nrefine' (mem_spanSingleton S).trans ((exists_congr _).trans (mem_one_iff S).symm)\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx✝ : P\n⊢ ∀ (a : R), a • 1 = x✝ ↔ ↑(algebraMap R P) a = x✝\n[PROOFSTEP]\nintro x'\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx✝ : P\nx' : R\n⊢ x' • 1 = x✝ ↔ ↑(algebraMap R P) x' = x✝\n[PROOFSTEP]\nrw [Algebra.smul_def, mul_one]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\n⊢ spanSingleton S x * spanSingleton S y = spanSingleton S (x * y)\n[PROOFSTEP]\napply coeToSubmodule_injective\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\n⊢ (fun I => ↑I) (spanSingleton S x * spanSingleton S y) = (fun I => ↑I) (spanSingleton S (x * y))\n[PROOFSTEP]\nsimp only [coe_mul, coe_spanSingleton, span_mul_span, singleton_mul_singleton]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx : P\nn : ℕ\n⊢ spanSingleton S x ^ n = spanSingleton S (x ^ n)\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx : P\n⊢ spanSingleton S x ^ Nat.zero = spanSingleton S (x ^ Nat.zero)\n[PROOFSTEP]\nrw [pow_zero, pow_zero, spanSingleton_one]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx : P\nn : ℕ\nhn : spanSingleton S x ^ n = spanSingleton S (x ^ n)\n⊢ spanSingleton S x ^ Nat.succ n = spanSingleton S (x ^ Nat.succ n)\n[PROOFSTEP]\nrw [pow_succ, hn, spanSingleton_mul_spanSingleton, pow_succ]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx : R\n⊢ ↑(Ideal.span {x}) = spanSingleton S (↑(algebraMap R P) x)\n[PROOFSTEP]\next y\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx : R\ny : P\n⊢ y ∈ ↑(Ideal.span {x}) ↔ y ∈ spanSingleton S (↑(algebraMap R P) x)\n[PROOFSTEP]\nrefine' (mem_coeIdeal S).trans (Iff.trans _ (mem_spanSingleton S).symm)\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx : R\ny : P\n⊢ (∃ x', x' ∈ Ideal.span {x} ∧ ↑(algebraMap R P) x' = y) ↔ ∃ z, z • ↑(algebraMap R P) x = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx : R\ny : P\n⊢ (∃ x', x' ∈ Ideal.span {x} ∧ ↑(algebraMap R P) x' = y) → ∃ z, z • ↑(algebraMap R P) x = y\n[PROOFSTEP]\nrintro ⟨y', hy', rfl⟩\n[GOAL]\ncase a.mp.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y' : R\nhy' : y' ∈ Ideal.span {x}\n⊢ ∃ z, z • ↑(algebraMap R P) x = ↑(algebraMap R P) y'\n[PROOFSTEP]\nobtain ⟨x', rfl⟩ := Submodule.mem_span_singleton.mp hy'\n[GOAL]\ncase a.mp.intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx x' : R\nhy' : x' • x ∈ Ideal.span {x}\n⊢ ∃ z, z • ↑(algebraMap R P) x = ↑(algebraMap R P) (x' • x)\n[PROOFSTEP]\nuse x'\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx x' : R\nhy' : x' • x ∈ Ideal.span {x}\n⊢ x' • ↑(algebraMap R P) x = ↑(algebraMap R P) (x' • x)\n[PROOFSTEP]\nrw [smul_eq_mul, RingHom.map_mul, Algebra.smul_def]\n[GOAL]\ncase a.mpr\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx : R\ny : P\n⊢ (∃ z, z • ↑(algebraMap R P) x = y) → ∃ x', x' ∈ Ideal.span {x} ∧ ↑(algebraMap R P) x' = y\n[PROOFSTEP]\nrintro ⟨y', rfl⟩\n[GOAL]\ncase a.mpr.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y' : R\n⊢ ∃ x', x' ∈ Ideal.span {x} ∧ ↑(algebraMap R P) x' = y' • ↑(algebraMap R P) x\n[PROOFSTEP]\nrefine' ⟨y' * x, Submodule.mem_span_singleton.mpr ⟨y', rfl⟩, _⟩\n[GOAL]\ncase a.mpr.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y' : R\n⊢ ↑(algebraMap R P) (y' * x) = y' • ↑(algebraMap R P) x\n[PROOFSTEP]\nrw [RingHom.map_mul, Algebra.smul_def]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\n⊢ ↑(canonicalEquiv S P P') (spanSingleton S x) =\n    spanSingleton S (↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x)\n[PROOFSTEP]\napply SetLike.ext_iff.mpr\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\n⊢ ∀ (x_1 : P'),\n    x_1 ∈ ↑(canonicalEquiv S P P') (spanSingleton S x) ↔\n      x_1 ∈ spanSingleton S (↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x)\n[PROOFSTEP]\nintro y\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\ny : P'\n⊢ y ∈ ↑(canonicalEquiv S P P') (spanSingleton S x) ↔\n    y ∈ spanSingleton S (↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\ny : P'\n⊢ y ∈ ↑(canonicalEquiv S P P') (spanSingleton S x) →\n    y ∈ spanSingleton S (↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\ny : P'\n⊢ y ∈ spanSingleton S (↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x) →\n    y ∈ ↑(canonicalEquiv S P P') (spanSingleton S x)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\ny : P'\nh : y ∈ ↑(canonicalEquiv S P P') (spanSingleton S x)\n⊢ y ∈ spanSingleton S (↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x)\n[PROOFSTEP]\nrw [mem_spanSingleton]\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\ny : P'\nh : y ∈ ↑(canonicalEquiv S P P') (spanSingleton S x)\n⊢ ∃ z, z • ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x = y\n[PROOFSTEP]\nobtain ⟨x', hx', rfl⟩ := (mem_canonicalEquiv_apply _ _ _).mp h\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx x' : P\nhx' : x' ∈ spanSingleton S x\nh :\n  ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x' ∈\n    ↑(canonicalEquiv S P P') (spanSingleton S x)\n⊢ ∃ z,\n    z • ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x =\n      ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x'\n[PROOFSTEP]\nobtain ⟨z, rfl⟩ := (mem_spanSingleton _).mp hx'\n[GOAL]\ncase mp.intro.intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\nz : R\nhx' : z • x ∈ spanSingleton S x\nh :\n  ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) (z • x) ∈\n    ↑(canonicalEquiv S P P') (spanSingleton S x)\n⊢ ∃ z_1,\n    z_1 • ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x =\n      ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) (z • x)\n[PROOFSTEP]\nuse z\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\nz : R\nhx' : z • x ∈ spanSingleton S x\nh :\n  ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) (z • x) ∈\n    ↑(canonicalEquiv S P P') (spanSingleton S x)\n⊢ z • ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x =\n    ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) (z • x)\n[PROOFSTEP]\nrw [IsLocalization.map_smul]\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\nz : R\nhx' : z • x ∈ spanSingleton S x\nh :\n  ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) (z • x) ∈\n    ↑(canonicalEquiv S P P') (spanSingleton S x)\n⊢ z • ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x =\n    ↑(RingHom.id R) z • ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\ny : P'\nh : y ∈ spanSingleton S (↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x)\n⊢ y ∈ ↑(canonicalEquiv S P P') (spanSingleton S x)\n[PROOFSTEP]\nrw [mem_canonicalEquiv_apply]\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\ny : P'\nh : y ∈ spanSingleton S (↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x)\n⊢ ∃ y_1,\n    y_1 ∈ spanSingleton S x ∧\n      ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) y_1 = y\n[PROOFSTEP]\nobtain ⟨z, rfl⟩ := (mem_spanSingleton _).mp h\n[GOAL]\ncase mpr.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\nz : R\nh :\n  z • ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x ∈\n    spanSingleton S (↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x)\n⊢ ∃ y,\n    y ∈ spanSingleton S x ∧\n      ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) y =\n        z • ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x\n[PROOFSTEP]\nuse z • x\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\nz : R\nh :\n  z • ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x ∈\n    spanSingleton S (↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x)\n⊢ z • x ∈ spanSingleton S x ∧\n    ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) (z • x) =\n      z • ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x\n[PROOFSTEP]\nuse(mem_spanSingleton _).mpr ⟨z, rfl⟩\n[GOAL]\ncase right\nR : Type u_1\ninst✝⁹ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁸ : CommRing P\ninst✝⁷ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁶ : CommRing R₁\nK : Type u_4\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R₁ K\ninst✝³ : IsFractionRing R₁ K\nP' : Type u_5\ninst✝² : CommRing P'\ninst✝¹ : Algebra R P'\ninst✝ : IsLocalization S P'\nx : P\nz : R\nh :\n  z • ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x ∈\n    spanSingleton S (↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x)\n⊢ ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) (z • x) =\n    z • ↑(IsLocalization.map P' (RingHom.id R) (_ : ∀ (y : R), y ∈ S → ↑(RingHom.id R) y ∈ S)) x\n[PROOFSTEP]\nsimp [IsLocalization.map_smul]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\nI : FractionalIdeal S P\n⊢ y ∈ spanSingleton S x * I ↔ ∃ y', y' ∈ I ∧ y = x * y'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\nI : FractionalIdeal S P\n⊢ y ∈ spanSingleton S x * I → ∃ y', y' ∈ I ∧ y = x * y'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\nI : FractionalIdeal S P\nh : y ∈ spanSingleton S x * I\n⊢ ∃ y', y' ∈ I ∧ y = x * y'\n[PROOFSTEP]\nrefine FractionalIdeal.mul_induction_on h ?_ ?_\n[GOAL]\ncase mp.refine_1\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\nI : FractionalIdeal S P\nh : y ∈ spanSingleton S x * I\n⊢ ∀ (i : P), i ∈ spanSingleton S x → ∀ (j : P), j ∈ I → ∃ y', y' ∈ I ∧ i * j = x * y'\n[PROOFSTEP]\nintro x' hx' y' hy'\n[GOAL]\ncase mp.refine_1\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\nI : FractionalIdeal S P\nh : y ∈ spanSingleton S x * I\nx' : P\nhx' : x' ∈ spanSingleton S x\ny' : P\nhy' : y' ∈ I\n⊢ ∃ y'_1, y'_1 ∈ I ∧ x' * y' = x * y'_1\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := (mem_spanSingleton S).mp hx'\n[GOAL]\ncase mp.refine_1.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\nI : FractionalIdeal S P\nh : y ∈ spanSingleton S x * I\nx' : P\nhx' : x' ∈ spanSingleton S x\ny' : P\nhy' : y' ∈ I\na : R\nha : a • x = x'\n⊢ ∃ y'_1, y'_1 ∈ I ∧ x' * y' = x * y'_1\n[PROOFSTEP]\nuse a • y', Submodule.smul_mem (I : Submodule R P) a hy'\n[GOAL]\ncase right\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\nI : FractionalIdeal S P\nh : y ∈ spanSingleton S x * I\nx' : P\nhx' : x' ∈ spanSingleton S x\ny' : P\nhy' : y' ∈ I\na : R\nha : a • x = x'\n⊢ x' * y' = x * a • y'\n[PROOFSTEP]\nrw [← ha, Algebra.mul_smul_comm, Algebra.smul_mul_assoc]\n[GOAL]\ncase mp.refine_2\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\nI : FractionalIdeal S P\nh : y ∈ spanSingleton S x * I\n⊢ ∀ (x_1 y : P), (∃ y', y' ∈ I ∧ x_1 = x * y') → (∃ y', y' ∈ I ∧ y = x * y') → ∃ y', y' ∈ I ∧ x_1 + y = x * y'\n[PROOFSTEP]\nrintro _ _ ⟨y, hy, rfl⟩ ⟨y', hy', rfl⟩\n[GOAL]\ncase mp.refine_2.intro.intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y✝ : P\nI : FractionalIdeal S P\nh : y✝ ∈ spanSingleton S x * I\ny : P\nhy : y ∈ I\ny' : P\nhy' : y' ∈ I\n⊢ ∃ y'_1, y'_1 ∈ I ∧ x * y + x * y' = x * y'_1\n[PROOFSTEP]\nexact ⟨y + y', Submodule.add_mem (I : Submodule R P) hy hy', (mul_add _ _ _).symm⟩\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx y : P\nI : FractionalIdeal S P\n⊢ (∃ y', y' ∈ I ∧ y = x * y') → y ∈ spanSingleton S x * I\n[PROOFSTEP]\nrintro ⟨y', hy', rfl⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nx : P\nI : FractionalIdeal S P\ny' : P\nhy' : y' ∈ I\n⊢ x * y' ∈ spanSingleton S x * I\n[PROOFSTEP]\nexact mul_mem_mul ((mem_spanSingleton S).mpr ⟨1, one_smul _ _⟩) hy'\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J : Ideal R₁\nx y : R₁\nhy : y ∈ R₁⁰\n⊢ spanSingleton R₁⁰ (mk' K x { val := y, property := hy }) * ↑I = ↑J ↔ Ideal.span {x} * I = Ideal.span {y} * J\n[PROOFSTEP]\nhave : spanSingleton R₁⁰ (IsLocalization.mk' _ (1 : R₁) ⟨y, hy⟩) * spanSingleton R₁⁰ (algebraMap R₁ K y) = 1 := by\n  rw [spanSingleton_mul_spanSingleton, mul_comm, ← IsLocalization.mk'_eq_mul_mk'_one, IsLocalization.mk'_self,\n    spanSingleton_one]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J : Ideal R₁\nx y : R₁\nhy : y ∈ R₁⁰\n⊢ spanSingleton R₁⁰ (mk' ((fun x => K) y) 1 { val := y, property := hy }) * spanSingleton R₁⁰ (↑(algebraMap R₁ K) y) = 1\n[PROOFSTEP]\nrw [spanSingleton_mul_spanSingleton, mul_comm, ← IsLocalization.mk'_eq_mul_mk'_one, IsLocalization.mk'_self,\n  spanSingleton_one]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J : Ideal R₁\nx y : R₁\nhy : y ∈ R₁⁰\nthis :\n  spanSingleton R₁⁰ (mk' ((fun x => K) y) 1 { val := y, property := hy }) * spanSingleton R₁⁰ (↑(algebraMap R₁ K) y) = 1\n⊢ spanSingleton R₁⁰ (mk' K x { val := y, property := hy }) * ↑I = ↑J ↔ Ideal.span {x} * I = Ideal.span {y} * J\n[PROOFSTEP]\nlet y' : (FractionalIdeal R₁⁰ K)ˣ := Units.mkOfMulEqOne _ _ this\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J : Ideal R₁\nx y : R₁\nhy : y ∈ R₁⁰\nthis :\n  spanSingleton R₁⁰ (mk' ((fun x => K) y) 1 { val := y, property := hy }) * spanSingleton R₁⁰ (↑(algebraMap R₁ K) y) = 1\ny' : (FractionalIdeal R₁⁰ K)ˣ :=\n  Units.mkOfMulEqOne (spanSingleton R₁⁰ (mk' ((fun x => K) y) 1 { val := y, property := hy }))\n    (spanSingleton R₁⁰ (↑(algebraMap R₁ K) y)) this\n⊢ spanSingleton R₁⁰ (mk' K x { val := y, property := hy }) * ↑I = ↑J ↔ Ideal.span {x} * I = Ideal.span {y} * J\n[PROOFSTEP]\nhave coe_y' : ↑y' = spanSingleton R₁⁰ (IsLocalization.mk' K (1 : R₁) ⟨y, hy⟩) := rfl\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J : Ideal R₁\nx y : R₁\nhy : y ∈ R₁⁰\nthis :\n  spanSingleton R₁⁰ (mk' ((fun x => K) y) 1 { val := y, property := hy }) * spanSingleton R₁⁰ (↑(algebraMap R₁ K) y) = 1\ny' : (FractionalIdeal R₁⁰ K)ˣ :=\n  Units.mkOfMulEqOne (spanSingleton R₁⁰ (mk' ((fun x => K) y) 1 { val := y, property := hy }))\n    (spanSingleton R₁⁰ (↑(algebraMap R₁ K) y)) this\ncoe_y' : ↑y' = spanSingleton R₁⁰ (mk' K 1 { val := y, property := hy })\n⊢ spanSingleton R₁⁰ (mk' K x { val := y, property := hy }) * ↑I = ↑J ↔ Ideal.span {x} * I = Ideal.span {y} * J\n[PROOFSTEP]\nrefine' Iff.trans _ (y'.mul_right_inj.trans coeIdeal_inj)\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J : Ideal R₁\nx y : R₁\nhy : y ∈ R₁⁰\nthis :\n  spanSingleton R₁⁰ (mk' ((fun x => K) y) 1 { val := y, property := hy }) * spanSingleton R₁⁰ (↑(algebraMap R₁ K) y) = 1\ny' : (FractionalIdeal R₁⁰ K)ˣ :=\n  Units.mkOfMulEqOne (spanSingleton R₁⁰ (mk' ((fun x => K) y) 1 { val := y, property := hy }))\n    (spanSingleton R₁⁰ (↑(algebraMap R₁ K) y)) this\ncoe_y' : ↑y' = spanSingleton R₁⁰ (mk' K 1 { val := y, property := hy })\n⊢ spanSingleton R₁⁰ (mk' K x { val := y, property := hy }) * ↑I = ↑J ↔\n    ↑y' * ↑(Ideal.span {x} * I) = ↑y' * ↑(Ideal.span {y} * J)\n[PROOFSTEP]\nrw [coe_y', coeIdeal_mul, coeIdeal_span_singleton, coeIdeal_mul, coeIdeal_span_singleton, ← mul_assoc,\n  spanSingleton_mul_spanSingleton, ← mul_assoc, spanSingleton_mul_spanSingleton, mul_comm (mk' _ _ _), ←\n  IsLocalization.mk'_eq_mul_mk'_one, mul_comm (mk' _ _ _), ← IsLocalization.mk'_eq_mul_mk'_one, IsLocalization.mk'_self,\n  spanSingleton_one, one_mul]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\ninst✝ : IsFractionRing R₁ K\nI J : Ideal R₁\nz : K\n⊢ spanSingleton R₁⁰ z * ↑I = ↑J ↔ Ideal.span {(sec R₁⁰ z).fst} * I = Ideal.span {↑(sec R₁⁰ z).snd} * J\n[PROOFSTEP]\nerw [← mk'_mul_coeIdeal_eq_coeIdeal K (IsLocalization.sec R₁⁰ z).2.prop, IsLocalization.mk'_sec K z]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : K\nh : x = 0\n⊢ 1 / spanSingleton R₁⁰ x = spanSingleton R₁⁰ x⁻¹\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : K\nh : ¬x = 0\n⊢ spanSingleton R₁⁰ x * spanSingleton R₁⁰ x⁻¹ = 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\n⊢ J / spanSingleton R₁⁰ d = spanSingleton R₁⁰ d⁻¹ * J\n[PROOFSTEP]\nrw [← one_div_spanSingleton]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\n⊢ J / spanSingleton R₁⁰ d = 1 / spanSingleton R₁⁰ d * J\n[PROOFSTEP]\nby_cases hd : d = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\nhd : d = 0\n⊢ J / spanSingleton R₁⁰ d = 1 / spanSingleton R₁⁰ d * J\n[PROOFSTEP]\nsimp only [hd, spanSingleton_zero, div_zero, zero_mul]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\nhd : ¬d = 0\n⊢ J / spanSingleton R₁⁰ d = 1 / spanSingleton R₁⁰ d * J\n[PROOFSTEP]\nhave h_spand : spanSingleton R₁⁰ d ≠ 0 := mt spanSingleton_eq_zero_iff.mp hd\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\nhd : ¬d = 0\nh_spand : spanSingleton R₁⁰ d ≠ 0\n⊢ J / spanSingleton R₁⁰ d = 1 / spanSingleton R₁⁰ d * J\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase neg.a\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\nhd : ¬d = 0\nh_spand : spanSingleton R₁⁰ d ≠ 0\n⊢ J / spanSingleton R₁⁰ d ≤ 1 / spanSingleton R₁⁰ d * J\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase neg.a\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\nhd : ¬d = 0\nh_spand : spanSingleton R₁⁰ d ≠ 0\nx : K\nhx : x ∈ (fun a => ↑a) (J / spanSingleton R₁⁰ d)\n⊢ x ∈ (fun a => ↑a) (1 / spanSingleton R₁⁰ d * J)\n[PROOFSTEP]\ndsimp only [val_eq_coe] at hx ⊢\n  -- Porting note: get rid of the partially applied `coe`s\n[GOAL]\ncase neg.a\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\nhd : ¬d = 0\nh_spand : spanSingleton R₁⁰ d ≠ 0\nx : K\nhx : x ∈ ↑(J / spanSingleton R₁⁰ d)\n⊢ x ∈ ↑(1 / spanSingleton R₁⁰ d * J)\n[PROOFSTEP]\nrw [coe_div h_spand, Submodule.mem_div_iff_forall_mul_mem] at hx \n[GOAL]\ncase neg.a\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\nhd : ¬d = 0\nh_spand : spanSingleton R₁⁰ d ≠ 0\nx : K\nhx : ∀ (y : K), y ∈ ↑(spanSingleton R₁⁰ d) → x * y ∈ ↑J\n⊢ x ∈ ↑(1 / spanSingleton R₁⁰ d * J)\n[PROOFSTEP]\nspecialize hx d (mem_spanSingleton_self R₁⁰ d)\n[GOAL]\ncase neg.a\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\nhd : ¬d = 0\nh_spand : spanSingleton R₁⁰ d ≠ 0\nx : K\nhx : x * d ∈ ↑J\n⊢ x ∈ ↑(1 / spanSingleton R₁⁰ d * J)\n[PROOFSTEP]\nhave h_xd : x = d⁻¹ * (x * d) := by field_simp\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\nhd : ¬d = 0\nh_spand : spanSingleton R₁⁰ d ≠ 0\nx : K\nhx : x * d ∈ ↑J\n⊢ x = d⁻¹ * (x * d)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase neg.a\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\nhd : ¬d = 0\nh_spand : spanSingleton R₁⁰ d ≠ 0\nx : K\nhx : x * d ∈ ↑J\nh_xd : x = d⁻¹ * (x * d)\n⊢ x ∈ ↑(1 / spanSingleton R₁⁰ d * J)\n[PROOFSTEP]\nrw [coe_mul, one_div_spanSingleton, h_xd]\n[GOAL]\ncase neg.a\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\nhd : ¬d = 0\nh_spand : spanSingleton R₁⁰ d ≠ 0\nx : K\nhx : x * d ∈ ↑J\nh_xd : x = d⁻¹ * (x * d)\n⊢ d⁻¹ * (x * d) ∈ ↑(spanSingleton R₁⁰ d⁻¹) * ↑J\n[PROOFSTEP]\nexact Submodule.mul_mem_mul (mem_spanSingleton_self R₁⁰ _) hx\n[GOAL]\ncase neg.a\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nJ : FractionalIdeal R₁⁰ K\nd : K\nhd : ¬d = 0\nh_spand : spanSingleton R₁⁰ d ≠ 0\n⊢ 1 / spanSingleton R₁⁰ d * J ≤ J / spanSingleton R₁⁰ d\n[PROOFSTEP]\nrw [le_div_iff_mul_le h_spand, mul_assoc, mul_left_comm, one_div_spanSingleton, spanSingleton_mul_spanSingleton,\n  inv_mul_cancel hd, spanSingleton_one, mul_one]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\n⊢ ∃ a aI, a ≠ 0 ∧ I = spanSingleton R₁⁰ (↑(algebraMap R₁ K) a)⁻¹ * ↑aI\n[PROOFSTEP]\nobtain ⟨a_inv, nonzero, ha⟩ := I.isFractional\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\n⊢ ∃ a aI, a ≠ 0 ∧ I = spanSingleton R₁⁰ (↑(algebraMap R₁ K) a)⁻¹ * ↑aI\n[PROOFSTEP]\nhave nonzero := mem_nonZeroDivisors_iff_ne_zero.mp nonzero\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\n⊢ ∃ a aI, a ≠ 0 ∧ I = spanSingleton R₁⁰ (↑(algebraMap R₁ K) a)⁻¹ * ↑aI\n[PROOFSTEP]\nhave map_a_nonzero : algebraMap R₁ K a_inv ≠ 0 := mt IsFractionRing.to_map_eq_zero_iff.mp nonzero\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\nmap_a_nonzero : ↑(algebraMap R₁ K) a_inv ≠ 0\n⊢ ∃ a aI, a ≠ 0 ∧ I = spanSingleton R₁⁰ (↑(algebraMap R₁ K) a)⁻¹ * ↑aI\n[PROOFSTEP]\nrefine'\n  ⟨a_inv, Submodule.comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (algebraMap R₁ K a_inv) * I), nonzero,\n    ext fun x => Iff.trans ⟨_, _⟩ mem_singleton_mul.symm⟩\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\nmap_a_nonzero : ↑(algebraMap R₁ K) a_inv ≠ 0\nx : K\n⊢ x ∈ I →\n    ∃ y',\n      y' ∈ ↑(comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) a_inv) * I)) ∧\n        x = (↑(algebraMap R₁ K) a_inv)⁻¹ * y'\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\nmap_a_nonzero : ↑(algebraMap R₁ K) a_inv ≠ 0\nx : K\nhx : x ∈ I\n⊢ ∃ y',\n    y' ∈ ↑(comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) a_inv) * I)) ∧\n      x = (↑(algebraMap R₁ K) a_inv)⁻¹ * y'\n[PROOFSTEP]\nobtain ⟨x', hx'⟩ := ha x hx\n[GOAL]\ncase intro.intro.refine'_1.intro\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\nmap_a_nonzero : ↑(algebraMap R₁ K) a_inv ≠ 0\nx : K\nhx : x ∈ I\nx' : R₁\nhx' : ↑(algebraMap R₁ K) x' = a_inv • x\n⊢ ∃ y',\n    y' ∈ ↑(comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) a_inv) * I)) ∧\n      x = (↑(algebraMap R₁ K) a_inv)⁻¹ * y'\n[PROOFSTEP]\nrw [Algebra.smul_def] at hx' \n[GOAL]\ncase intro.intro.refine'_1.intro\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\nmap_a_nonzero : ↑(algebraMap R₁ K) a_inv ≠ 0\nx : K\nhx : x ∈ I\nx' : R₁\nhx' : ↑(algebraMap R₁ K) x' = ↑(algebraMap R₁ K) a_inv * x\n⊢ ∃ y',\n    y' ∈ ↑(comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) a_inv) * I)) ∧\n      x = (↑(algebraMap R₁ K) a_inv)⁻¹ * y'\n[PROOFSTEP]\nrefine' ⟨algebraMap R₁ K x', (mem_coeIdeal _).mpr ⟨x', mem_singleton_mul.mpr _, rfl⟩, _⟩\n[GOAL]\ncase intro.intro.refine'_1.intro.refine'_1\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\nmap_a_nonzero : ↑(algebraMap R₁ K) a_inv ≠ 0\nx : K\nhx : x ∈ I\nx' : R₁\nhx' : ↑(algebraMap R₁ K) x' = ↑(algebraMap R₁ K) a_inv * x\n⊢ ∃ y', y' ∈ I ∧ ↑(Algebra.linearMap R₁ K) x' = ↑(algebraMap R₁ K) a_inv * y'\n[PROOFSTEP]\nexact ⟨x, hx, hx'⟩\n[GOAL]\ncase intro.intro.refine'_1.intro.refine'_2\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\nmap_a_nonzero : ↑(algebraMap R₁ K) a_inv ≠ 0\nx : K\nhx : x ∈ I\nx' : R₁\nhx' : ↑(algebraMap R₁ K) x' = ↑(algebraMap R₁ K) a_inv * x\n⊢ x = (↑(algebraMap R₁ K) a_inv)⁻¹ * ↑(algebraMap R₁ K) x'\n[PROOFSTEP]\nrw [hx', ← mul_assoc, inv_mul_cancel map_a_nonzero, one_mul]\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\nmap_a_nonzero : ↑(algebraMap R₁ K) a_inv ≠ 0\nx : K\n⊢ (∃ y',\n      y' ∈ ↑(comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) a_inv) * I)) ∧\n        x = (↑(algebraMap R₁ K) a_inv)⁻¹ * y') →\n    x ∈ I\n[PROOFSTEP]\nrintro ⟨y, hy, rfl⟩\n[GOAL]\ncase intro.intro.refine'_2.intro.intro\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\nmap_a_nonzero : ↑(algebraMap R₁ K) a_inv ≠ 0\ny : K\nhy : y ∈ ↑(comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) a_inv) * I))\n⊢ (↑(algebraMap R₁ K) a_inv)⁻¹ * y ∈ I\n[PROOFSTEP]\nobtain ⟨x', hx', rfl⟩ := (mem_coeIdeal _).mp hy\n[GOAL]\ncase intro.intro.refine'_2.intro.intro.intro.intro\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\nmap_a_nonzero : ↑(algebraMap R₁ K) a_inv ≠ 0\nx' : R₁\nhx' : x' ∈ comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) a_inv) * I)\nhy : ↑(algebraMap R₁ K) x' ∈ ↑(comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) a_inv) * I))\n⊢ (↑(algebraMap R₁ K) a_inv)⁻¹ * ↑(algebraMap R₁ K) x' ∈ I\n[PROOFSTEP]\nobtain ⟨y', hy', hx'⟩ := mem_singleton_mul.mp hx'\n[GOAL]\ncase intro.intro.refine'_2.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\nmap_a_nonzero : ↑(algebraMap R₁ K) a_inv ≠ 0\nx' : R₁\nhx'✝ : x' ∈ comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) a_inv) * I)\nhy : ↑(algebraMap R₁ K) x' ∈ ↑(comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) a_inv) * I))\ny' : K\nhy' : y' ∈ I\nhx' : ↑(Algebra.linearMap R₁ K) x' = ↑(algebraMap R₁ K) a_inv * y'\n⊢ (↑(algebraMap R₁ K) a_inv)⁻¹ * ↑(algebraMap R₁ K) x' ∈ I\n[PROOFSTEP]\nrw [Algebra.linearMap_apply] at hx' \n[GOAL]\ncase intro.intro.refine'_2.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nI : FractionalIdeal R₁⁰ K\na_inv : R₁\nnonzero✝ : a_inv ∈ R₁⁰\nha : ∀ (b : K), b ∈ ↑I → IsInteger R₁ (a_inv • b)\nnonzero : a_inv ≠ 0\nmap_a_nonzero : ↑(algebraMap R₁ K) a_inv ≠ 0\nx' : R₁\nhx'✝ : x' ∈ comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) a_inv) * I)\nhy : ↑(algebraMap R₁ K) x' ∈ ↑(comap (Algebra.linearMap R₁ K) ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) a_inv) * I))\ny' : K\nhy' : y' ∈ I\nhx' : ↑(algebraMap R₁ K) x' = ↑(algebraMap R₁ K) a_inv * y'\n⊢ (↑(algebraMap R₁ K) a_inv)⁻¹ * ↑(algebraMap R₁ K) x' ∈ I\n[PROOFSTEP]\nrwa [hx', ← mul_assoc, inv_mul_cancel map_a_nonzero, one_mul]\n[GOAL]\nR✝ : Type u_1\ninst✝¹² : CommRing R✝\nS : Submonoid R✝\nP : Type u_2\ninst✝¹¹ : CommRing P\ninst✝¹⁰ : Algebra R✝ P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁹ : CommRing R₁\nK : Type u_4\ninst✝⁸ : Field K\ninst✝⁷ : Algebra R₁ K\ninst✝⁶ : IsFractionRing R₁ K\ninst✝⁵ : IsDomain R₁\nR : Type ?u.1660245\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nI : FractionalIdeal R⁰ K\n⊢ IsPrincipal ↑I\n[PROOFSTEP]\nobtain ⟨a, aI, -, ha⟩ := exists_eq_spanSingleton_mul I\n[GOAL]\ncase intro.intro.intro\nR✝ : Type u_1\ninst✝¹² : CommRing R✝\nS : Submonoid R✝\nP : Type u_2\ninst✝¹¹ : CommRing P\ninst✝¹⁰ : Algebra R✝ P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁹ : CommRing R₁\nK : Type u_4\ninst✝⁸ : Field K\ninst✝⁷ : Algebra R₁ K\ninst✝⁶ : IsFractionRing R₁ K\ninst✝⁵ : IsDomain R₁\nR : Type ?u.1660245\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nI : FractionalIdeal R⁰ K\na : R\naI : Ideal R\nha : I = spanSingleton R⁰ (↑(algebraMap R K) a)⁻¹ * ↑aI\n⊢ IsPrincipal ↑I\n[PROOFSTEP]\nuse(algebraMap R K a)⁻¹ * algebraMap R K (generator aI)\n[GOAL]\ncase h\nR✝ : Type u_1\ninst✝¹² : CommRing R✝\nS : Submonoid R✝\nP : Type u_2\ninst✝¹¹ : CommRing P\ninst✝¹⁰ : Algebra R✝ P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁹ : CommRing R₁\nK : Type u_4\ninst✝⁸ : Field K\ninst✝⁷ : Algebra R₁ K\ninst✝⁶ : IsFractionRing R₁ K\ninst✝⁵ : IsDomain R₁\nR : Type ?u.1660245\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nI : FractionalIdeal R⁰ K\na : R\naI : Ideal R\nha : I = spanSingleton R⁰ (↑(algebraMap R K) a)⁻¹ * ↑aI\n⊢ ↑I = span R {(↑(algebraMap R K) a)⁻¹ * ↑(algebraMap R K) (generator aI)}\n[PROOFSTEP]\nsuffices I = spanSingleton R⁰ ((algebraMap R K a)⁻¹ * algebraMap R K (generator aI))\n  by\n  rw [spanSingleton] at this \n  exact congr_arg Subtype.val this\n[GOAL]\nR✝ : Type u_1\ninst✝¹² : CommRing R✝\nS : Submonoid R✝\nP : Type u_2\ninst✝¹¹ : CommRing P\ninst✝¹⁰ : Algebra R✝ P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁹ : CommRing R₁\nK : Type u_4\ninst✝⁸ : Field K\ninst✝⁷ : Algebra R₁ K\ninst✝⁶ : IsFractionRing R₁ K\ninst✝⁵ : IsDomain R₁\nR : Type ?u.1660245\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nI : FractionalIdeal R⁰ K\na : R\naI : Ideal R\nha : I = spanSingleton R⁰ (↑(algebraMap R K) a)⁻¹ * ↑aI\nthis : I = spanSingleton R⁰ ((↑(algebraMap R K) a)⁻¹ * ↑(algebraMap R K) (generator aI))\n⊢ ↑I = span R {(↑(algebraMap R K) a)⁻¹ * ↑(algebraMap R K) (generator aI)}\n[PROOFSTEP]\nrw [spanSingleton] at this \n[GOAL]\nR✝ : Type u_1\ninst✝¹² : CommRing R✝\nS : Submonoid R✝\nP : Type u_2\ninst✝¹¹ : CommRing P\ninst✝¹⁰ : Algebra R✝ P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁹ : CommRing R₁\nK : Type u_4\ninst✝⁸ : Field K\ninst✝⁷ : Algebra R₁ K\ninst✝⁶ : IsFractionRing R₁ K\ninst✝⁵ : IsDomain R₁\nR : Type ?u.1660245\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nI : FractionalIdeal R⁰ K\na : R\naI : Ideal R\nha : I = spanSingleton R⁰ (↑(algebraMap R K) a)⁻¹ * ↑aI\nthis :\n  I =\n    { val := span R {(↑(algebraMap R K) a)⁻¹ * ↑(algebraMap R K) (generator aI)},\n      property := (_ : IsFractional R⁰ (span R {(↑(algebraMap R K) a)⁻¹ * ↑(algebraMap R K) (generator aI)})) }\n⊢ ↑I = span R {(↑(algebraMap R K) a)⁻¹ * ↑(algebraMap R K) (generator aI)}\n[PROOFSTEP]\nexact congr_arg Subtype.val this\n[GOAL]\ncase h\nR✝ : Type u_1\ninst✝¹² : CommRing R✝\nS : Submonoid R✝\nP : Type u_2\ninst✝¹¹ : CommRing P\ninst✝¹⁰ : Algebra R✝ P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁹ : CommRing R₁\nK : Type u_4\ninst✝⁸ : Field K\ninst✝⁷ : Algebra R₁ K\ninst✝⁶ : IsFractionRing R₁ K\ninst✝⁵ : IsDomain R₁\nR : Type ?u.1660245\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nI : FractionalIdeal R⁰ K\na : R\naI : Ideal R\nha : I = spanSingleton R⁰ (↑(algebraMap R K) a)⁻¹ * ↑aI\n⊢ I = spanSingleton R⁰ ((↑(algebraMap R K) a)⁻¹ * ↑(algebraMap R K) (generator aI))\n[PROOFSTEP]\nconv_lhs => rw [ha, ← span_singleton_generator aI]\n[GOAL]\nR✝ : Type u_1\ninst✝¹² : CommRing R✝\nS : Submonoid R✝\nP : Type u_2\ninst✝¹¹ : CommRing P\ninst✝¹⁰ : Algebra R✝ P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁹ : CommRing R₁\nK : Type u_4\ninst✝⁸ : Field K\ninst✝⁷ : Algebra R₁ K\ninst✝⁶ : IsFractionRing R₁ K\ninst✝⁵ : IsDomain R₁\nR : Type ?u.1660245\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nI : FractionalIdeal R⁰ K\na : R\naI : Ideal R\nha : I = spanSingleton R⁰ (↑(algebraMap R K) a)⁻¹ * ↑aI\n| I\n[PROOFSTEP]\nrw [ha, ← span_singleton_generator aI]\n[GOAL]\nR✝ : Type u_1\ninst✝¹² : CommRing R✝\nS : Submonoid R✝\nP : Type u_2\ninst✝¹¹ : CommRing P\ninst✝¹⁰ : Algebra R✝ P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁹ : CommRing R₁\nK : Type u_4\ninst✝⁸ : Field K\ninst✝⁷ : Algebra R₁ K\ninst✝⁶ : IsFractionRing R₁ K\ninst✝⁵ : IsDomain R₁\nR : Type ?u.1660245\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nI : FractionalIdeal R⁰ K\na : R\naI : Ideal R\nha : I = spanSingleton R⁰ (↑(algebraMap R K) a)⁻¹ * ↑aI\n| I\n[PROOFSTEP]\nrw [ha, ← span_singleton_generator aI]\n[GOAL]\nR✝ : Type u_1\ninst✝¹² : CommRing R✝\nS : Submonoid R✝\nP : Type u_2\ninst✝¹¹ : CommRing P\ninst✝¹⁰ : Algebra R✝ P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁹ : CommRing R₁\nK : Type u_4\ninst✝⁸ : Field K\ninst✝⁷ : Algebra R₁ K\ninst✝⁶ : IsFractionRing R₁ K\ninst✝⁵ : IsDomain R₁\nR : Type ?u.1660245\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nI : FractionalIdeal R⁰ K\na : R\naI : Ideal R\nha : I = spanSingleton R⁰ (↑(algebraMap R K) a)⁻¹ * ↑aI\n| I\n[PROOFSTEP]\nrw [ha, ← span_singleton_generator aI]\n[GOAL]\ncase h\nR✝ : Type u_1\ninst✝¹² : CommRing R✝\nS : Submonoid R✝\nP : Type u_2\ninst✝¹¹ : CommRing P\ninst✝¹⁰ : Algebra R✝ P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁹ : CommRing R₁\nK : Type u_4\ninst✝⁸ : Field K\ninst✝⁷ : Algebra R₁ K\ninst✝⁶ : IsFractionRing R₁ K\ninst✝⁵ : IsDomain R₁\nR : Type ?u.1660245\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nI : FractionalIdeal R⁰ K\na : R\naI : Ideal R\nha : I = spanSingleton R⁰ (↑(algebraMap R K) a)⁻¹ * ↑aI\n⊢ spanSingleton R⁰ (↑(algebraMap R K) a)⁻¹ * ↑(span R {generator aI}) =\n    spanSingleton R⁰ ((↑(algebraMap R K) a)⁻¹ * ↑(algebraMap R K) (generator aI))\n[PROOFSTEP]\nrw [Ideal.submodule_span_eq, coeIdeal_span_singleton (generator aI), spanSingleton_mul_spanSingleton]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : P\nI J : FractionalIdeal S P\n⊢ (∀ {zI : P}, zI ∈ I → zI ∈ spanSingleton S x * J) ↔ ∀ (zI : P), zI ∈ I → ∃ zJ, zJ ∈ J ∧ x * zJ = zI\n[PROOFSTEP]\nsimp only [mem_singleton_mul, eq_comm]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : P\nI J : FractionalIdeal S P\n⊢ spanSingleton S x * I ≤ J ↔ ∀ (z : P), z ∈ I → x * z ∈ J\n[PROOFSTEP]\nsimp only [mul_le, mem_singleton_mul, mem_spanSingleton]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : P\nI J : FractionalIdeal S P\n⊢ (∀ (i : P), (∃ z, z • x = i) → ∀ (j : P), j ∈ I → i * j ∈ J) ↔ ∀ (z : P), z ∈ I → x * z ∈ J\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : P\nI J : FractionalIdeal S P\n⊢ (∀ (i : P), (∃ z, z • x = i) → ∀ (j : P), j ∈ I → i * j ∈ J) → ∀ (z : P), z ∈ I → x * z ∈ J\n[PROOFSTEP]\nintro h zI hzI\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : P\nI J : FractionalIdeal S P\nh : ∀ (i : P), (∃ z, z • x = i) → ∀ (j : P), j ∈ I → i * j ∈ J\nzI : P\nhzI : zI ∈ I\n⊢ x * zI ∈ J\n[PROOFSTEP]\nexact h x ⟨1, one_smul _ _⟩ zI hzI\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : P\nI J : FractionalIdeal S P\n⊢ (∀ (z : P), z ∈ I → x * z ∈ J) → ∀ (i : P), (∃ z, z • x = i) → ∀ (j : P), j ∈ I → i * j ∈ J\n[PROOFSTEP]\nrintro h _ ⟨z, rfl⟩ zI hzI\n[GOAL]\ncase mpr.intro\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : P\nI J : FractionalIdeal S P\nh : ∀ (z : P), z ∈ I → x * z ∈ J\nz : R\nzI : P\nhzI : zI ∈ I\n⊢ z • x * zI ∈ J\n[PROOFSTEP]\nrw [Algebra.smul_mul_assoc]\n[GOAL]\ncase mpr.intro\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : P\nI J : FractionalIdeal S P\nh : ∀ (z : P), z ∈ I → x * z ∈ J\nz : R\nzI : P\nhzI : zI ∈ I\n⊢ z • (x * zI) ∈ J\n[PROOFSTEP]\nexact Submodule.smul_mem J.1 _ (h zI hzI)\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\ninst✝¹ : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : P\nI J : FractionalIdeal S P\n⊢ I = spanSingleton S x * J ↔ (∀ (zI : P), zI ∈ I → ∃ zJ, zJ ∈ J ∧ x * zJ = zI) ∧ ∀ (z : P), z ∈ J → x * z ∈ I\n[PROOFSTEP]\nsimp only [le_antisymm_iff, le_spanSingleton_mul_iff, spanSingleton_mul_le_iff]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁴ : CommRing P\ninst✝³ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝² : CommRing R₁\nK : Type u_4\ninst✝¹ : Field K\ninst✝ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\nI : Submodule R₁ K\nhI : I ≤ ↑0\n⊢ FG I\n[PROOFSTEP]\nrw [coe_zero] at hI \n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁴ : CommRing P\ninst✝³ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝² : CommRing R₁\nK : Type u_4\ninst✝¹ : Field K\ninst✝ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\nI : Submodule R₁ K\nhI : I ≤ ⊥\n⊢ FG I\n[PROOFSTEP]\nrw [le_bot_iff.mp hI]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁴ : CommRing P\ninst✝³ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝² : CommRing R₁\nK : Type u_4\ninst✝¹ : Field K\ninst✝ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\nI : Submodule R₁ K\nhI : I ≤ ⊥\n⊢ FG ⊥\n[PROOFSTEP]\nexact fg_bot\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsNoetherianRing R₁\nI : Ideal R₁\n⊢ IsNoetherian R₁ { x // x ∈ ↑↑I }\n[PROOFSTEP]\nrw [isNoetherian_iff]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsNoetherianRing R₁\nI : Ideal R₁\n⊢ ∀ (J : FractionalIdeal R₁⁰ K), J ≤ ↑I → FG ↑J\n[PROOFSTEP]\nintro J hJ\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsNoetherianRing R₁\nI : Ideal R₁\nJ : FractionalIdeal R₁⁰ K\nhJ : J ≤ ↑I\n⊢ FG ↑J\n[PROOFSTEP]\nobtain ⟨J, rfl⟩ := le_one_iff_exists_coeIdeal.mp (le_trans hJ coeIdeal_le_one)\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsNoetherianRing R₁\nI J : Ideal R₁\nhJ : ↑J ≤ ↑I\n⊢ FG ↑↑J\n[PROOFSTEP]\nexact (IsNoetherian.noetherian J).map _\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : R₁\nI : FractionalIdeal R₁⁰ K\nhI : IsNoetherian R₁ { x // x ∈ ↑I }\n⊢ IsNoetherian R₁ { x_1 // x_1 ∈ ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) x)⁻¹ * I) }\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : R₁\nI : FractionalIdeal R₁⁰ K\nhI : IsNoetherian R₁ { x // x ∈ ↑I }\nhx : x = 0\n⊢ IsNoetherian R₁ { x_1 // x_1 ∈ ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) x)⁻¹ * I) }\n[PROOFSTEP]\nrw [hx, RingHom.map_zero, inv_zero, spanSingleton_zero, zero_mul]\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : R₁\nI : FractionalIdeal R₁⁰ K\nhI : IsNoetherian R₁ { x // x ∈ ↑I }\nhx : x = 0\n⊢ IsNoetherian R₁ { x // x ∈ ↑0 }\n[PROOFSTEP]\nexact isNoetherian_zero\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : R₁\nI : FractionalIdeal R₁⁰ K\nhI : IsNoetherian R₁ { x // x ∈ ↑I }\nhx : ¬x = 0\n⊢ IsNoetherian R₁ { x_1 // x_1 ∈ ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) x)⁻¹ * I) }\n[PROOFSTEP]\nhave h_gx : algebraMap R₁ K x ≠ 0 :=\n  mt ((injective_iff_map_eq_zero (algebraMap R₁ K)).mp (IsFractionRing.injective _ _) x) hx\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : R₁\nI : FractionalIdeal R₁⁰ K\nhI : IsNoetherian R₁ { x // x ∈ ↑I }\nhx : ¬x = 0\nh_gx : ↑(algebraMap R₁ K) x ≠ 0\n⊢ IsNoetherian R₁ { x_1 // x_1 ∈ ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) x)⁻¹ * I) }\n[PROOFSTEP]\nhave h_spanx : spanSingleton R₁⁰ (algebraMap R₁ K x) ≠ 0 := spanSingleton_ne_zero_iff.mpr h_gx\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : R₁\nI : FractionalIdeal R₁⁰ K\nhI : IsNoetherian R₁ { x // x ∈ ↑I }\nhx : ¬x = 0\nh_gx : ↑(algebraMap R₁ K) x ≠ 0\nh_spanx : spanSingleton R₁⁰ (↑(algebraMap R₁ K) x) ≠ 0\n⊢ IsNoetherian R₁ { x_1 // x_1 ∈ ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) x)⁻¹ * I) }\n[PROOFSTEP]\nrw [isNoetherian_iff] at hI ⊢\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : R₁\nI : FractionalIdeal R₁⁰ K\nhI : ∀ (J : FractionalIdeal R₁⁰ K), J ≤ I → FG ↑J\nhx : ¬x = 0\nh_gx : ↑(algebraMap R₁ K) x ≠ 0\nh_spanx : spanSingleton R₁⁰ (↑(algebraMap R₁ K) x) ≠ 0\n⊢ ∀ (J : FractionalIdeal R₁⁰ ((fun x => K) x)), J ≤ spanSingleton R₁⁰ (↑(algebraMap R₁ K) x)⁻¹ * I → FG ↑J\n[PROOFSTEP]\nintro J hJ\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : R₁\nI : FractionalIdeal R₁⁰ K\nhI : ∀ (J : FractionalIdeal R₁⁰ K), J ≤ I → FG ↑J\nhx : ¬x = 0\nh_gx : ↑(algebraMap R₁ K) x ≠ 0\nh_spanx : spanSingleton R₁⁰ (↑(algebraMap R₁ K) x) ≠ 0\nJ : FractionalIdeal R₁⁰ ((fun x => K) x)\nhJ : J ≤ spanSingleton R₁⁰ (↑(algebraMap R₁ K) x)⁻¹ * I\n⊢ FG ↑J\n[PROOFSTEP]\nrw [← div_spanSingleton, le_div_iff_mul_le h_spanx] at hJ \n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : R₁\nI : FractionalIdeal R₁⁰ K\nhI : ∀ (J : FractionalIdeal R₁⁰ K), J ≤ I → FG ↑J\nhx : ¬x = 0\nh_gx : ↑(algebraMap R₁ K) x ≠ 0\nh_spanx : spanSingleton R₁⁰ (↑(algebraMap R₁ K) x) ≠ 0\nJ : FractionalIdeal R₁⁰ ((fun x => K) x)\nhJ✝ : J ≤ spanSingleton R₁⁰ (↑(algebraMap R₁ K) x)⁻¹ * I\nhJ : J * spanSingleton R₁⁰ (↑(algebraMap R₁ K) x) ≤ I\n⊢ FG ↑J\n[PROOFSTEP]\nobtain ⟨s, hs⟩ := hI _ hJ\n[GOAL]\ncase neg.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : R₁\nI : FractionalIdeal R₁⁰ K\nhI : ∀ (J : FractionalIdeal R₁⁰ K), J ≤ I → FG ↑J\nhx : ¬x = 0\nh_gx : ↑(algebraMap R₁ K) x ≠ 0\nh_spanx : spanSingleton R₁⁰ (↑(algebraMap R₁ K) x) ≠ 0\nJ : FractionalIdeal R₁⁰ ((fun x => K) x)\nhJ✝ : J ≤ spanSingleton R₁⁰ (↑(algebraMap R₁ K) x)⁻¹ * I\nhJ : J * spanSingleton R₁⁰ (↑(algebraMap R₁ K) x) ≤ I\ns : Finset K\nhs : span R₁ ↑s = ↑(J * spanSingleton R₁⁰ (↑(algebraMap R₁ K) x))\n⊢ FG ↑J\n[PROOFSTEP]\nuse s * {(algebraMap R₁ K x)⁻¹}\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁵ : CommRing P\ninst✝⁴ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝³ : CommRing R₁\nK : Type u_4\ninst✝² : Field K\ninst✝¹ : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝ : IsDomain R₁\nx : R₁\nI : FractionalIdeal R₁⁰ K\nhI : ∀ (J : FractionalIdeal R₁⁰ K), J ≤ I → FG ↑J\nhx : ¬x = 0\nh_gx : ↑(algebraMap R₁ K) x ≠ 0\nh_spanx : spanSingleton R₁⁰ (↑(algebraMap R₁ K) x) ≠ 0\nJ : FractionalIdeal R₁⁰ ((fun x => K) x)\nhJ✝ : J ≤ spanSingleton R₁⁰ (↑(algebraMap R₁ K) x)⁻¹ * I\nhJ : J * spanSingleton R₁⁰ (↑(algebraMap R₁ K) x) ≤ I\ns : Finset K\nhs : span R₁ ↑s = ↑(J * spanSingleton R₁⁰ (↑(algebraMap R₁ K) x))\n⊢ span R₁ ↑(s * {(↑(algebraMap R₁ K) x)⁻¹}) = ↑J\n[PROOFSTEP]\nrw [Finset.coe_mul, Finset.coe_singleton, ← span_mul_span, hs, ← coe_spanSingleton R₁⁰, ← coe_mul, mul_assoc,\n  spanSingleton_mul_spanSingleton, mul_inv_cancel h_gx, spanSingleton_one, mul_one]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝¹ : IsDomain R₁\ninst✝ : IsNoetherianRing R₁\nI : FractionalIdeal R₁⁰ K\n⊢ IsNoetherian R₁ { x // x ∈ ↑I }\n[PROOFSTEP]\nobtain ⟨d, J, _, rfl⟩ := exists_eq_spanSingleton_mul I\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝¹ : IsDomain R₁\ninst✝ : IsNoetherianRing R₁\nd : R₁\nJ : Ideal R₁\nleft✝ : d ≠ 0\n⊢ IsNoetherian R₁ { x // x ∈ ↑(spanSingleton R₁⁰ (↑(algebraMap R₁ K) d)⁻¹ * ↑J) }\n[PROOFSTEP]\napply isNoetherian_spanSingleton_inv_to_map_mul\n[GOAL]\ncase intro.intro.intro.hI\nR : Type u_1\ninst✝⁷ : CommRing R\nS : Submonoid R\nP : Type u_2\ninst✝⁶ : CommRing P\ninst✝⁵ : Algebra R P\nloc : IsLocalization S P\nR₁ : Type u_3\ninst✝⁴ : CommRing R₁\nK : Type u_4\ninst✝³ : Field K\ninst✝² : Algebra R₁ K\nfrac : IsFractionRing R₁ K\ninst✝¹ : IsDomain R₁\ninst✝ : IsNoetherianRing R₁\nd : R₁\nJ : Ideal R₁\nleft✝ : d ≠ 0\n⊢ IsNoetherian R₁ { x // x ∈ ↑↑J }\n[PROOFSTEP]\napply isNoetherian_coeIdeal\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.FractionalIdeal", "llama_tokens": 100242, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6076631698328916, "lm_q2_score": 0.5774953651858117, "lm_q1q2_score": 0.35092266417261364}}
{"text": "[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\n[PROOFSTEP]\nhave obj_eq :\n  ∀ (j : Pairwise ι),\n    (Pairwise.diagram U ⋙ Opens.map f).obj j = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).obj j\n[GOAL]\ncase obj_eq\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ ∀ (j : CategoryTheory.Pairwise ι),\n    (Pairwise.diagram U ⋙ Opens.map f).obj j = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).obj j\n[PROOFSTEP]\nrintro ⟨i⟩\n[GOAL]\ncase obj_eq.single\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\ni : ι\n⊢ (Pairwise.diagram U ⋙ Opens.map f).obj (Pairwise.single i) =\n    (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).obj (Pairwise.single i)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase obj_eq.pair\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\na✝¹ a✝ : ι\n⊢ (Pairwise.diagram U ⋙ Opens.map f).obj (Pairwise.pair a✝¹ a✝) =\n    (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).obj (Pairwise.pair a✝¹ a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\nobj_eq :\n  ∀ (j : CategoryTheory.Pairwise ι),\n    (Pairwise.diagram U ⋙ Opens.map f).obj j = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).obj j\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\n[PROOFSTEP]\nrefine Functor.hext obj_eq ?_\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\nobj_eq :\n  ∀ (j : CategoryTheory.Pairwise ι),\n    (Pairwise.diagram U ⋙ Opens.map f).obj j = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).obj j\n⊢ ∀ (X_1 Y_1 : CategoryTheory.Pairwise ι) (f_1 : X_1 ⟶ Y_1),\n    HEq ((Pairwise.diagram U ⋙ Opens.map f).map f_1) ((Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).map f_1)\n[PROOFSTEP]\nintro i j g\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\nobj_eq :\n  ∀ (j : CategoryTheory.Pairwise ι),\n    (Pairwise.diagram U ⋙ Opens.map f).obj j = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).obj j\ni j : CategoryTheory.Pairwise ι\ng : i ⟶ j\n⊢ HEq ((Pairwise.diagram U ⋙ Opens.map f).map g) ((Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).map g)\n[PROOFSTEP]\napply Subsingleton.helim\n[GOAL]\ncase h₂\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\nobj_eq :\n  ∀ (j : CategoryTheory.Pairwise ι),\n    (Pairwise.diagram U ⋙ Opens.map f).obj j = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).obj j\ni j : CategoryTheory.Pairwise ι\ng : i ⟶ j\n⊢ ((Pairwise.diagram U ⋙ Opens.map f).obj i ⟶ (Pairwise.diagram U ⋙ Opens.map f).obj j) =\n    ((Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).obj i ⟶\n      (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).obj j)\n[PROOFSTEP]\nrw [obj_eq, obj_eq]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq ((Opens.map f).mapCocone (Pairwise.cocone U)) (Pairwise.cocone ((Opens.map f).toPrefunctor.obj ∘ U))\n[PROOFSTEP]\nunfold Functor.mapCocone Cocones.functoriality\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq\n    ((CategoryTheory.Functor.mk\n          {\n            obj := fun A =>\n              { pt := (Opens.map f).obj A.pt, ι := NatTrans.mk fun j => (Opens.map f).map (NatTrans.app A.ι j) },\n            map := fun {X_1 Y_1} f_1 => CoconeMorphism.mk ((Opens.map f).map f_1.Hom) }).obj\n      (Pairwise.cocone U))\n    (Pairwise.cocone ((Opens.map f).toPrefunctor.obj ∘ U))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq { pt := (Opens.map f).obj (iSup U), ι := NatTrans.mk fun j => (Opens.map f).map (Pairwise.coconeιApp U j) }\n    (Pairwise.cocone ((Opens.map f).toPrefunctor.obj ∘ U))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_5.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_6.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ (Opens.map f).obj (iSup U) = iSup ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_7.e_5.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_7.e_6.h.e_a\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ (Opens.map f).obj (iSup U) = iSup ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_7.e_7\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq (fun j => (Opens.map f).map (Pairwise.coconeιApp U j)) (Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U))\ncase e_7.e_8\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram U ⋙ Opens.map f).map f_1 ≫\n            (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) Y_1 =\n          (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) X_1 ≫\n            ((Functor.const (CategoryTheory.Pairwise ι)).obj ((Opens.map f).obj (Pairwise.cocone U).pt)).map f_1)\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).map f_1 ≫\n            Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) Y_1 =\n          Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) X_1 ≫ 𝟙 (iSup ((Opens.map f).toPrefunctor.obj ∘ U)))\n[PROOFSTEP]\niterate 2 rw [map_diagram]; rw [Opens.map_iSup]\n[GOAL]\ncase e_5.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_6.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ (Opens.map f).obj (iSup U) = iSup ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_7.e_5.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_7.e_6.h.e_a\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ (Opens.map f).obj (iSup U) = iSup ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_7.e_7\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq (fun j => (Opens.map f).map (Pairwise.coconeιApp U j)) (Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U))\ncase e_7.e_8\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram U ⋙ Opens.map f).map f_1 ≫\n            (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) Y_1 =\n          (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) X_1 ≫\n            ((Functor.const (CategoryTheory.Pairwise ι)).obj ((Opens.map f).obj (Pairwise.cocone U).pt)).map f_1)\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).map f_1 ≫\n            Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) Y_1 =\n          Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) X_1 ≫ 𝟙 (iSup ((Opens.map f).toPrefunctor.obj ∘ U)))\n[PROOFSTEP]\nrw [map_diagram]\n[GOAL]\ncase e_6.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ (Opens.map f).obj (iSup U) = iSup ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_7.e_5.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_7.e_6.h.e_a\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ (Opens.map f).obj (iSup U) = iSup ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_7.e_7\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq (fun j => (Opens.map f).map (Pairwise.coconeιApp U j)) (Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U))\ncase e_7.e_8\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram U ⋙ Opens.map f).map f_1 ≫\n            (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) Y_1 =\n          (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) X_1 ≫\n            ((Functor.const (CategoryTheory.Pairwise ι)).obj ((Opens.map f).obj (Pairwise.cocone U).pt)).map f_1)\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).map f_1 ≫\n            Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) Y_1 =\n          Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) X_1 ≫ 𝟙 (iSup ((Opens.map f).toPrefunctor.obj ∘ U)))\n[PROOFSTEP]\nrw [Opens.map_iSup]\n[GOAL]\ncase e_7.e_5.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_7.e_6.h.e_a\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ (Opens.map f).obj (iSup U) = iSup ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_7.e_7\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq (fun j => (Opens.map f).map (Pairwise.coconeιApp U j)) (Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U))\ncase e_7.e_8\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram U ⋙ Opens.map f).map f_1 ≫\n            (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) Y_1 =\n          (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) X_1 ≫\n            ((Functor.const (CategoryTheory.Pairwise ι)).obj ((Opens.map f).obj (Pairwise.cocone U).pt)).map f_1)\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).map f_1 ≫\n            Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) Y_1 =\n          Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) X_1 ≫ 𝟙 (iSup ((Opens.map f).toPrefunctor.obj ∘ U)))\n[PROOFSTEP]\nrw [map_diagram]\n[GOAL]\ncase e_7.e_6.h.e_a\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ (Opens.map f).obj (iSup U) = iSup ((Opens.map f).toPrefunctor.obj ∘ U)\ncase e_7.e_7\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq (fun j => (Opens.map f).map (Pairwise.coconeιApp U j)) (Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U))\ncase e_7.e_8\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram U ⋙ Opens.map f).map f_1 ≫\n            (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) Y_1 =\n          (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) X_1 ≫\n            ((Functor.const (CategoryTheory.Pairwise ι)).obj ((Opens.map f).obj (Pairwise.cocone U).pt)).map f_1)\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).map f_1 ≫\n            Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) Y_1 =\n          Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) X_1 ≫ 𝟙 (iSup ((Opens.map f).toPrefunctor.obj ∘ U)))\n[PROOFSTEP]\nrw [Opens.map_iSup]\n[GOAL]\ncase e_7.e_7\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq (fun j => (Opens.map f).map (Pairwise.coconeιApp U j)) (Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U))\ncase e_7.e_8\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram U ⋙ Opens.map f).map f_1 ≫\n            (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) Y_1 =\n          (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) X_1 ≫\n            ((Functor.const (CategoryTheory.Pairwise ι)).obj ((Opens.map f).obj (Pairwise.cocone U).pt)).map f_1)\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).map f_1 ≫\n            Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) Y_1 =\n          Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) X_1 ≫ 𝟙 (iSup ((Opens.map f).toPrefunctor.obj ∘ U)))\n[PROOFSTEP]\napply Subsingleton.helim\n[GOAL]\ncase e_7.e_7.h₂\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ ((X_1 : CategoryTheory.Pairwise ι) →\n      (Pairwise.diagram U ⋙ Opens.map f).obj X_1 ⟶\n        ((Functor.const (CategoryTheory.Pairwise ι)).obj ((Opens.map f).obj (iSup U))).obj X_1) =\n    ((X_1 : CategoryTheory.Pairwise ι) →\n      (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).obj X_1 ⟶\n        ((Functor.const (CategoryTheory.Pairwise ι)).obj (iSup ((Opens.map f).toPrefunctor.obj ∘ U))).obj X_1)\ncase e_7.e_8\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram U ⋙ Opens.map f).map f_1 ≫\n            (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) Y_1 =\n          (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) X_1 ≫\n            ((Functor.const (CategoryTheory.Pairwise ι)).obj ((Opens.map f).obj (Pairwise.cocone U).pt)).map f_1)\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).map f_1 ≫\n            Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) Y_1 =\n          Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) X_1 ≫ 𝟙 (iSup ((Opens.map f).toPrefunctor.obj ∘ U)))\n[PROOFSTEP]\nrw [map_diagram, Opens.map_iSup]\n[GOAL]\ncase e_7.e_8\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\n⊢ HEq\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram U ⋙ Opens.map f).map f_1 ≫\n            (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) Y_1 =\n          (fun j => (Opens.map f).map (NatTrans.app (Pairwise.cocone U).ι j)) X_1 ≫\n            ((Functor.const (CategoryTheory.Pairwise ι)).obj ((Opens.map f).obj (Pairwise.cocone U).pt)).map f_1)\n    (_ :\n      ∀ ⦃X_1 Y_1 : CategoryTheory.Pairwise ι⦄ (f_1 : X_1 ⟶ Y_1),\n        (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).map f_1 ≫\n            Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) Y_1 =\n          Pairwise.coconeιApp ((Opens.map f).toPrefunctor.obj ∘ U) X_1 ≫ 𝟙 (iSup ((Opens.map f).toPrefunctor.obj ∘ U)))\n[PROOFSTEP]\napply proof_irrel_heq\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\n⊢ Nonempty (IsLimit ((f _* F).mapCone (Cocone.op (Pairwise.cocone U))))\n[PROOFSTEP]\nconvert h ((Opens.map f).obj ∘ U) using 2\n[GOAL]\ncase h.e'_1.h.e'_5\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\n⊢ (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\ncase h.e'_1.h.e'_6\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ HEq ((f _* F).mapCone (Cocone.op (Pairwise.cocone U)))\n    (F.mapCone (Cocone.op (Pairwise.cocone ((Opens.map f).toPrefunctor.obj ∘ U))))\n[PROOFSTEP]\nrw [← map_diagram]\n[GOAL]\ncase h.e'_1.h.e'_5\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\n⊢ (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram U ⋙ Opens.map f).op ⋙ F\ncase h.e'_1.h.e'_6\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ HEq ((f _* F).mapCone (Cocone.op (Pairwise.cocone U)))\n    (F.mapCone (Cocone.op (Pairwise.cocone ((Opens.map f).toPrefunctor.obj ∘ U))))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_1.h.e'_6\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ HEq ((f _* F).mapCone (Cocone.op (Pairwise.cocone U)))\n    (F.mapCone (Cocone.op (Pairwise.cocone ((Opens.map f).toPrefunctor.obj ∘ U))))\n[PROOFSTEP]\nchange HEq (Functor.mapCone F ((Opens.map f).mapCocone (Pairwise.cocone U)).op) _\n[GOAL]\ncase h.e'_1.h.e'_6\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ HEq (F.mapCone (Cocone.op ((Opens.map f).mapCocone (Pairwise.cocone U))))\n    (F.mapCone (Cocone.op (Pairwise.cocone ((Opens.map f).toPrefunctor.obj ∘ U))))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_1.h.e'_6.e_8.h.e_F\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\ncase h.e'_1.h.e'_6.e_9.e_5.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\ncase h.e'_1.h.e'_6.e_9.e_6\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ HEq ((Opens.map f).mapCocone (Pairwise.cocone U)) (Pairwise.cocone ((Opens.map f).toPrefunctor.obj ∘ U))\n[PROOFSTEP]\niterate 2 rw [map_diagram]\n[GOAL]\ncase h.e'_1.h.e'_6.e_8.h.e_F\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\ncase h.e'_1.h.e'_6.e_9.e_5.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\ncase h.e'_1.h.e'_6.e_9.e_6\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ HEq ((Opens.map f).mapCocone (Pairwise.cocone U)) (Pairwise.cocone ((Opens.map f).toPrefunctor.obj ∘ U))\n[PROOFSTEP]\nrw [map_diagram]\n[GOAL]\ncase h.e'_1.h.e'_6.e_9.e_5.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ Pairwise.diagram U ⋙ Opens.map f = Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)\ncase h.e'_1.h.e'_6.e_9.e_6\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ HEq ((Opens.map f).mapCocone (Pairwise.cocone U)) (Pairwise.cocone ((Opens.map f).toPrefunctor.obj ∘ U))\n[PROOFSTEP]\nrw [map_diagram]\n[GOAL]\ncase h.e'_1.h.e'_6.e_9.e_6\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι✝ : Type w\nU✝ : ι✝ → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\nι : Type w\nU : ι → Opens ↑Y\ne_5✝ : (Pairwise.diagram U).op ⋙ f _* F = (Pairwise.diagram ((Opens.map f).toPrefunctor.obj ∘ U)).op ⋙ F\n⊢ HEq ((Opens.map f).mapCocone (Pairwise.cocone U)) (Pairwise.cocone ((Opens.map f).toPrefunctor.obj ∘ U))\n[PROOFSTEP]\napply mapCocone\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\nF : Presheaf C X\nh : Presheaf.IsSheaf F\n⊢ Presheaf.IsSheaf (f _* F)\n[PROOFSTEP]\nrw [isSheaf_iff_isSheafPairwiseIntersections] at h ⊢\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : TopCat\nf : X ⟶ Y\nι : Type w\nU : ι → Opens ↑Y\nF : Presheaf C X\nh : IsSheafPairwiseIntersections F\n⊢ IsSheafPairwiseIntersections (f _* F)\n[PROOFSTEP]\nexact SheafConditionPairwiseIntersections.pushforward_sheaf_of_sheaf f h\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sheaves.Functors", "llama_tokens": 11489, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6654105720171531, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.3508819894560943}}
{"text": "[GOAL]\nn m : ℕ\nα : Sort u_1\nk l : ℕ\nh : k = l\nf : Fin k → α\ng : Fin l → α\n⊢ HEq f g ↔ ∀ (i : Fin k), f i = g { val := ↑i, isLt := (_ : ↑i < l) }\n[PROOFSTEP]\nsubst h\n[GOAL]\nn m : ℕ\nα : Sort u_1\nk : ℕ\nf g : Fin k → α\n⊢ HEq f g ↔ ∀ (i : Fin k), f i = g { val := ↑i, isLt := (_ : ↑i < k) }\n[PROOFSTEP]\nsimp [Function.funext_iff]\n[GOAL]\nn m : ℕ\nα : Sort u_1\nk l k' l' : ℕ\nh : k = l\nh' : k' = l'\nf : Fin k → Fin k' → α\ng : Fin l → Fin l' → α\n⊢ HEq f g ↔\n    ∀ (i : Fin k) (j : Fin k'), f i j = g { val := ↑i, isLt := (_ : ↑i < l) } { val := ↑j, isLt := (_ : ↑j < l') }\n[PROOFSTEP]\nsubst h\n[GOAL]\nn m : ℕ\nα : Sort u_1\nk k' l' : ℕ\nh' : k' = l'\nf : Fin k → Fin k' → α\ng : Fin k → Fin l' → α\n⊢ HEq f g ↔\n    ∀ (i : Fin k) (j : Fin k'), f i j = g { val := ↑i, isLt := (_ : ↑i < k) } { val := ↑j, isLt := (_ : ↑j < l') }\n[PROOFSTEP]\nsubst h'\n[GOAL]\nn m : ℕ\nα : Sort u_1\nk k' : ℕ\nf g : Fin k → Fin k' → α\n⊢ HEq f g ↔\n    ∀ (i : Fin k) (j : Fin k'), f i j = g { val := ↑i, isLt := (_ : ↑i < k) } { val := ↑j, isLt := (_ : ↑j < k') }\n[PROOFSTEP]\nsimp [Function.funext_iff]\n[GOAL]\nn m k l : ℕ\nh : k = l\ni : Fin k\nj : Fin l\n⊢ HEq i j ↔ ↑i = ↑j\n[PROOFSTEP]\nsubst h\n[GOAL]\nn m k : ℕ\ni j : Fin k\n⊢ HEq i j ↔ ↑i = ↑j\n[PROOFSTEP]\nsimp [val_eq_val]\n[GOAL]\nn m : ℕ\na : Fin n\n⊢ min (↑a) n = ↑a\n[PROOFSTEP]\nsimp\n[GOAL]\nn m : ℕ\na : Fin n\n⊢ max (↑a) n = n\n[PROOFSTEP]\nsimp\n[GOAL]\nn✝ m n : ℕ\n⊢ PartialOrder (Fin n)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nn m : ℕ\n⊢ Monotone ↑equivSubtype\n[PROOFSTEP]\nsimp [Monotone]\n[GOAL]\nn m : ℕ\n⊢ Monotone ↑equivSubtype.symm\n[PROOFSTEP]\nsimp [Monotone]\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\na : Fin n\n⊢ 0 < a ↔ a ≠ 0\n[PROOFSTEP]\nrw [← val_fin_lt, val_zero', _root_.pos_iff_ne_zero, Ne.def, Ne.def, ext_iff, val_zero']\n[GOAL]\nn m : ℕ\ni : Fin n\n⊢ ↑((fun i => { val := n - (↑i + 1), isLt := (_ : n - (↑i + 1) < n) })\n        ((fun i => { val := n - (↑i + 1), isLt := (_ : n - (↑i + 1) < n) }) i)) =\n    ↑i\n[PROOFSTEP]\ndsimp only\n[GOAL]\nn m : ℕ\ni : Fin n\n⊢ n - (n - (↑i + 1) + 1) = ↑i\n[PROOFSTEP]\nrw [← tsub_tsub, tsub_tsub_cancel_of_le (Nat.add_one_le_iff.2 i.is_lt), add_tsub_cancel_right]\n[GOAL]\nn✝ m n a : ℕ\ni : Fin (n + 1)\nh : n = a + ↑i\n⊢ ↑revPerm i = { val := a, isLt := (_ : a < Nat.succ n) }\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn✝ m n a : ℕ\ni : Fin (n + 1)\nh : n = a + ↑i\n⊢ ↑(↑revPerm i) = ↑{ val := a, isLt := (_ : a < Nat.succ n) }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nn✝ m n a : ℕ\ni : Fin (n + 1)\nh : n = a + ↑i\n⊢ n + 1 - (↑i + 1) = a\n[PROOFSTEP]\nconv_lhs =>\n  congr\n  rw [h]\n[GOAL]\nn✝ m n a : ℕ\ni : Fin (n + 1)\nh : n = a + ↑i\n| n + 1 - (↑i + 1)\n[PROOFSTEP]\n  congr\n  rw [h]\n[GOAL]\nn✝ m n a : ℕ\ni : Fin (n + 1)\nh : n = a + ↑i\n| n + 1 - (↑i + 1)\n[PROOFSTEP]\n  congr\n  rw [h]\n[GOAL]\nn✝ m n a : ℕ\ni : Fin (n + 1)\nh : n = a + ↑i\n| n + 1 - (↑i + 1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nn✝ m n a : ℕ\ni : Fin (n + 1)\nh : n = a + ↑i\n| n + 1\ncase a n✝ m n a : ℕ i : Fin (n + 1) h : n = a + ↑i | ↑i + 1\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\nn✝ m n a : ℕ\ni : Fin (n + 1)\nh : n = a + ↑i\n⊢ a + ↑i + 1 - (↑i + 1) = a\n[PROOFSTEP]\nrw [add_assoc, add_tsub_cancel_right]\n[GOAL]\nn m : ℕ\ni j : Fin n\n⊢ ↑revPerm i ≤ ↑revPerm j ↔ j ≤ i\n[PROOFSTEP]\nsimp only [le_iff_val_le_val, val_revPerm, tsub_le_tsub_iff_left (Nat.add_one_le_iff.2 j.is_lt), add_le_add_iff_right,\n  iff_self]\n[GOAL]\nn m : ℕ\nα : Type u_1\ninst✝ : Preorder α\ne : Fin n ≃o Fin m\ni : Fin n\n⊢ ↑(↑e i) = ↑i\n[PROOFSTEP]\nrcases i with ⟨i, hi⟩\n[GOAL]\ncase mk\nn m : ℕ\nα : Type u_1\ninst✝ : Preorder α\ne : Fin n ≃o Fin m\ni : ℕ\nhi : i < n\n⊢ ↑(↑e { val := i, isLt := hi }) = ↑{ val := i, isLt := hi }\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk\nn m : ℕ\nα : Type u_1\ninst✝ : Preorder α\ne : Fin n ≃o Fin m\ni : ℕ\nhi : i < n\n⊢ ↑(↑e { val := i, isLt := hi }) = i\n[PROOFSTEP]\ninduction' i using Nat.strong_induction_on with i h\n[GOAL]\ncase mk.h\nn m : ℕ\nα : Type u_1\ninst✝ : Preorder α\ne : Fin n ≃o Fin m\ni✝ : ℕ\nhi✝ : i✝ < n\ni : ℕ\nh : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1\nhi : i < n\n⊢ ↑(↑e { val := i, isLt := hi }) = i\n[PROOFSTEP]\nrefine' le_antisymm (forall_lt_iff_le.1 fun j hj => _) (forall_lt_iff_le.1 fun j hj => _)\n[GOAL]\ncase mk.h.refine'_1\nn m : ℕ\nα : Type u_1\ninst✝ : Preorder α\ne : Fin n ≃o Fin m\ni✝ : ℕ\nhi✝ : i✝ < n\ni : ℕ\nh : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1\nhi : i < n\nj : ℕ\nhj : j < ↑(↑e { val := i, isLt := hi })\n⊢ j < i\n[PROOFSTEP]\nhave := e.symm.lt_iff_lt.2 (mk_lt_of_lt_val hj)\n[GOAL]\ncase mk.h.refine'_1\nn m : ℕ\nα : Type u_1\ninst✝ : Preorder α\ne : Fin n ≃o Fin m\ni✝ : ℕ\nhi✝ : i✝ < n\ni : ℕ\nh : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1\nhi : i < n\nj : ℕ\nhj : j < ↑(↑e { val := i, isLt := hi })\nthis : ↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) } < ↑(OrderIso.symm e) (↑e { val := i, isLt := hi })\n⊢ j < i\n[PROOFSTEP]\nrw [e.symm_apply_apply] at this \n[GOAL]\ncase mk.h.refine'_1\nn m : ℕ\nα : Type u_1\ninst✝ : Preorder α\ne : Fin n ≃o Fin m\ni✝ : ℕ\nhi✝ : i✝ < n\ni : ℕ\nh : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1\nhi : i < n\nj : ℕ\nhj : j < ↑(↑e { val := i, isLt := hi })\nthis : ↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) } < { val := i, isLt := hi }\n⊢ j < i\n[PROOFSTEP]\nhave : _ < i := this\n[GOAL]\ncase mk.h.refine'_1\nn m : ℕ\nα : Type u_1\ninst✝ : Preorder α\ne : Fin n ≃o Fin m\ni✝ : ℕ\nhi✝ : i✝ < n\ni : ℕ\nh : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1\nhi : i < n\nj : ℕ\nhj : j < ↑(↑e { val := i, isLt := hi })\nthis✝ : ↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) } < { val := i, isLt := hi }\nthis : ↑(↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) }) < i\n⊢ j < i\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_3\nn m : ℕ\nα : Type u_1\ninst✝ : Preorder α\ne : Fin n ≃o Fin m\ni✝ : ℕ\nhi✝ : i✝ < n\ni : ℕ\nh : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1\nhi : i < n\nj : ℕ\nhj : j < ↑(↑e { val := i, isLt := hi })\nthis✝ : ↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) } < { val := i, isLt := hi }\nthis : ↑(↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) }) < i\n⊢ j = ↑(↑(OrderIso.symm e) { val := j, isLt := (_ : j < m) })\n[PROOFSTEP]\nsimpa using h _ this (e.symm _).is_lt\n[GOAL]\ncase mk.h.refine'_2\nn m : ℕ\nα : Type u_1\ninst✝ : Preorder α\ne : Fin n ≃o Fin m\ni✝ : ℕ\nhi✝ : i✝ < n\ni : ℕ\nh : ∀ (m_1 : ℕ), m_1 < i → ∀ (hi : m_1 < n), ↑(↑e { val := m_1, isLt := hi }) = m_1\nhi : i < n\nj : ℕ\nhj : j < i\n⊢ j < ↑(↑e { val := i, isLt := hi })\n[PROOFSTEP]\nrwa [← h j hj (hj.trans hi), ← lt_iff_val_lt_val, e.lt_iff_lt]\n[GOAL]\nn m : ℕ\nα : Type u_1\ninst✝ : Preorder α\ne e' : Fin n ≃o α\n⊢ e = e'\n[PROOFSTEP]\next i\n[GOAL]\ncase h.h\nn m : ℕ\nα : Type u_1\ninst✝ : Preorder α\ne e' : Fin n ≃o α\ni : Fin n\n⊢ ↑e i = ↑e' i\n[PROOFSTEP]\nrw [← e.symm.apply_eq_iff_eq, e.symm_apply_apply, ← e'.trans_apply, ext_iff, coe_orderIso_apply]\n[GOAL]\nn✝ m n : ℕ\n⊢ ↑0 ≠ ↑1\n[PROOFSTEP]\nsimp only [val_one, val_zero]\n[GOAL]\nn m : ℕ\n⊢ Nontrivial (Fin n) ↔ 2 ≤ n\n[PROOFSTEP]\nrcases n with (_ | _ | n)\n[GOAL]\ncase zero\nm : ℕ\n⊢ Nontrivial (Fin zero) ↔ 2 ≤ zero\n[PROOFSTEP]\nsimp [← Nat.one_eq_succ_zero, Fin.nontrivial, not_nontrivial, Nat.succ_le_iff]\n  -- porting note: here and in the next lemma, had to use `←Nat.one_eq_succ_zero`.\n[GOAL]\ncase succ.zero\nm : ℕ\n⊢ Nontrivial (Fin (Nat.succ zero)) ↔ 2 ≤ Nat.succ zero\n[PROOFSTEP]\nsimp [← Nat.one_eq_succ_zero, Fin.nontrivial, not_nontrivial, Nat.succ_le_iff]\n  -- porting note: here and in the next lemma, had to use `←Nat.one_eq_succ_zero`.\n[GOAL]\ncase succ.succ\nm n : ℕ\n⊢ Nontrivial (Fin (Nat.succ (Nat.succ n))) ↔ 2 ≤ Nat.succ (Nat.succ n)\n[PROOFSTEP]\nsimp [← Nat.one_eq_succ_zero, Fin.nontrivial, not_nontrivial, Nat.succ_le_iff]\n  -- porting note: here and in the next lemma, had to use `←Nat.one_eq_succ_zero`.\n[GOAL]\nn✝ m n : ℕ\n⊢ ∀ (a b c : Fin n), a + b + c = a + (b + c)\n[PROOFSTEP]\nsimp [eq_iff_veq, add_def, add_assoc]\n[GOAL]\nn✝ m n : ℕ\n⊢ ∀ (a b : Fin n), a + b = b + a\n[PROOFSTEP]\nsimp [eq_iff_veq, add_def, add_comm]\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\nk : Fin n\n⊢ k + 0 = k\n[PROOFSTEP]\nsimp only [add_def, val_zero', add_zero, mod_eq_of_lt (is_lt k)]\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\nk : Fin n\n⊢ 0 + k = k\n[PROOFSTEP]\nsimp [eq_iff_veq, add_def, mod_eq_of_lt (is_lt k)]\n[GOAL]\nn✝ m n : ℕ\n⊢ ∀ (a b c : Fin n), a + b + c = a + (b + c)\n[PROOFSTEP]\nsimp [eq_iff_veq, add_def, add_assoc]\n[GOAL]\nn✝ m n : ℕ\n⊢ ∀ (a b : Fin n), a + b = b + a\n[PROOFSTEP]\nsimp [eq_iff_veq, add_def, add_comm]\n[GOAL]\nn✝ m n : ℕ\na b : Fin n\n⊢ ↑(a + b) = if n ≤ ↑a + ↑b then ↑a + ↑b - n else ↑a + ↑b\n[PROOFSTEP]\nrw [Fin.val_add, Nat.add_mod_eq_ite, Nat.mod_eq_of_lt (show ↑a < n from a.2), Nat.mod_eq_of_lt (show ↑b < n from b.2)]\n[GOAL]\nn✝ m n : ℕ\nk : Fin n\n⊢ ↑(bit0 k) = bit0 ↑k % n\n[PROOFSTEP]\ncases k\n[GOAL]\ncase mk\nn✝ m n val✝ : ℕ\nisLt✝ : val✝ < n\n⊢ ↑(bit0 { val := val✝, isLt := isLt✝ }) = bit0 ↑{ val := val✝, isLt := isLt✝ } % n\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\nk : Fin n\n⊢ ↑(bit1 k) = bit1 ↑k % n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nn m : ℕ\ninst✝ : NeZero zero\nk : Fin zero\n⊢ ↑(bit1 k) = bit1 ↑k % zero\n[PROOFSTEP]\ncases' k with k h\n[GOAL]\ncase zero.mk\nn m : ℕ\ninst✝ : NeZero zero\nk : ℕ\nh : k < zero\n⊢ ↑(bit1 { val := k, isLt := h }) = bit1 ↑{ val := k, isLt := h } % zero\n[PROOFSTEP]\ncases k\n[GOAL]\ncase zero.mk.zero\nn m : ℕ\ninst✝ : NeZero zero\nh : zero < zero\n⊢ ↑(bit1 { val := zero, isLt := h }) = bit1 ↑{ val := zero, isLt := h } % zero\n[PROOFSTEP]\nshow _ % _ = _\n[GOAL]\ncase zero.mk.zero\nn m : ℕ\ninst✝ : NeZero zero\nh : zero < zero\n⊢ ((zero + zero) % zero + 1 % zero) % zero = bit1 ↑{ val := zero, isLt := h } % zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase zero.mk.succ\nn m : ℕ\ninst✝ : NeZero zero\nn✝ : ℕ\nh : Nat.succ n✝ < zero\n⊢ ↑(bit1 { val := Nat.succ n✝, isLt := h }) = bit1 ↑{ val := Nat.succ n✝, isLt := h } % zero\n[PROOFSTEP]\ncases' h with _ h\n[GOAL]\ncase succ\nn m n✝ : ℕ\ninst✝ : NeZero (Nat.succ n✝)\nk : Fin (Nat.succ n✝)\n⊢ ↑(bit1 k) = bit1 ↑k % Nat.succ n✝\n[PROOFSTEP]\nsimp [bit1, Fin.val_bit0, Fin.val_add, Fin.val_one]\n[GOAL]\nn✝ m✝ m n : ℕ\ninst✝ : NeZero n\nh : bit1 m < n\n⊢ { val := bit1 m, isLt := h } = bit1 { val := m, isLt := (_ : m < n) }\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn✝ m✝ m n : ℕ\ninst✝ : NeZero n\nh : bit1 m < n\n⊢ ↑{ val := bit1 m, isLt := h } = ↑(bit1 { val := m, isLt := (_ : m < n) })\n[PROOFSTEP]\nsimp only [bit1, bit0] at h \n[GOAL]\ncase h\nn✝ m✝ m n : ℕ\ninst✝ : NeZero n\nh : m + m + 1 < n\n⊢ ↑{ val := bit1 m, isLt := h } = ↑(bit1 { val := m, isLt := (_ : m < n) })\n[PROOFSTEP]\nsimp only [bit1, bit0, val_add, val_one', ← Nat.add_mod, Nat.mod_eq_of_lt h]\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\na : ℕ\nh : a < n\n⊢ ↑↑a = a\n[PROOFSTEP]\nrw [← ofNat_eq_val]\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\na : ℕ\nh : a < n\n⊢ ↑(ofNat'' a) = a\n[PROOFSTEP]\nexact Nat.mod_eq_of_lt h\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\na : Fin n\n⊢ ↑↑a = a\n[PROOFSTEP]\nrw [Fin.eq_iff_veq]\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\na : Fin n\n⊢ ↑↑↑a = ↑a\n[PROOFSTEP]\nexact val_cast_of_lt a.isLt\n[GOAL]\nn✝ m n : ℕ\n⊢ ↑n = last n\n[PROOFSTEP]\nrw [← Fin.ofNat_eq_val, Fin.ofNat'', Fin.last]\n[GOAL]\nn✝ m n : ℕ\n⊢ { val := n % (n + 1), isLt := (_ : n % (n + 1) < n + 1) } = { val := n, isLt := (_ : n < Nat.succ n) }\n[PROOFSTEP]\nsimp only [Nat.mod_eq_of_lt n.lt_succ_self]\n[GOAL]\nn m : ℕ\ni : Fin (n + 1)\n⊢ i ≤ ↑n\n[PROOFSTEP]\nrw [Fin.cast_nat_eq_last]\n[GOAL]\nn m : ℕ\ni : Fin (n + 1)\n⊢ i ≤ last n\n[PROOFSTEP]\nexact Fin.le_last i\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\n⊢ 0 = 1 ↔ n = 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn m : ℕ\ninst✝ : NeZero n\n⊢ 0 = 1 → n = 1\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nn m : ℕ\ninst✝ : NeZero n\nh : 0 = 1\n⊢ n = 1\n[PROOFSTEP]\nhave := congr_arg ((↑) : Fin n → ℕ) h\n[GOAL]\ncase mp\nn m : ℕ\ninst✝ : NeZero n\nh : 0 = 1\nthis : ↑0 = ↑1\n⊢ n = 1\n[PROOFSTEP]\nsimp only [val_zero', val_one', @eq_comm _ 0, ← Nat.dvd_iff_mod_eq_zero] at this \n[GOAL]\ncase mp\nn m : ℕ\ninst✝ : NeZero n\nh : 0 = 1\nthis : n ∣ 1\n⊢ n = 1\n[PROOFSTEP]\nexact eq_one_of_dvd_one this\n[GOAL]\ncase mpr\nn m : ℕ\ninst✝ : NeZero n\n⊢ n = 1 → 0 = 1\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nm : ℕ\ninst✝ : NeZero 1\n⊢ 0 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\n⊢ 1 = 0 ↔ n = 1\n[PROOFSTEP]\nrw [eq_comm, zero_eq_one_iff]\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\n⊢ succ 0 = 1\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nm : ℕ\ninst✝ : NeZero zero\n⊢ succ 0 = 1\n[PROOFSTEP]\nexact (NeZero.ne 0 rfl).elim\n[GOAL]\ncase succ\nm n✝ : ℕ\ninst✝ : NeZero (Nat.succ n✝)\n⊢ succ 0 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\n⊢ succ 1 = 2\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nm : ℕ\ninst✝ : NeZero zero\n⊢ succ 1 = 2\n[PROOFSTEP]\nexact (NeZero.ne 0 rfl).elim\n[GOAL]\ncase succ\nm n✝ : ℕ\ninst✝ : NeZero (Nat.succ n✝)\n⊢ succ 1 = 2\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\nk : Fin n\nh : k ≤ 0\n⊢ ↑k = ↑0\n[PROOFSTEP]\nrw [Nat.eq_zero_of_le_zero h]\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\nk : Fin n\nh : k ≤ 0\n⊢ 0 = ↑0\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\nk : Fin n\n⊢ k = 0 → k ≤ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\n⊢ 0 ≤ 0\n[PROOFSTEP]\nexact le_refl _\n[GOAL]\nn✝ m n k : ℕ\nh : n ≤ k\ni : Fin k\nhi : i ∈ Set.range ↑(castLEEmb h)\n⊢ ↑(↑(Equiv.ofInjective ↑(castLEEmb h) (_ : Injective ↑(castLEEmb h))).symm { val := i, property := hi }) = ↑i\n[PROOFSTEP]\nrw [← coe_castLE h]\n[GOAL]\nn✝ m n k : ℕ\nh : n ≤ k\ni : Fin k\nhi : i ∈ Set.range ↑(castLEEmb h)\n⊢ ↑(castLE h (↑(Equiv.ofInjective ↑(castLEEmb h) (_ : Injective ↑(castLEEmb h))).symm { val := i, property := hi })) =\n    ↑i\n[PROOFSTEP]\nexact congr_arg Fin.val (Equiv.apply_ofInjective_symm _ _)\n[GOAL]\nn m : ℕ\nh : n = m\n⊢ OrderIso.symm (castIso h) = castIso (_ : m = n)\n[PROOFSTEP]\nsimp\n[GOAL]\nn m : ℕ\nh : n = m\ni : Fin n\n⊢ ↑(↑(castIso h) i) = ↑i\n[PROOFSTEP]\nsimp\n[GOAL]\nn m n' : ℕ\ninst✝ : NeZero n\nh : n = n'\n⊢ Fin n'\n[PROOFSTEP]\n{haveI : NeZero n' := by {rw [← h]; infer_instance\n  };\n  exact 0\n}\n[GOAL]\nn m n' : ℕ\ninst✝ : NeZero n\nh : n = n'\n⊢ Fin n'\n[PROOFSTEP]\nhaveI : NeZero n' := by {rw [← h]; infer_instance\n}\n[GOAL]\nn m n' : ℕ\ninst✝ : NeZero n\nh : n = n'\n⊢ NeZero n'\n[PROOFSTEP]\n{rw [← h]; infer_instance\n}\n[GOAL]\nn m n' : ℕ\ninst✝ : NeZero n\nh : n = n'\n⊢ NeZero n'\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nn m n' : ℕ\ninst✝ : NeZero n\nh : n = n'\n⊢ NeZero n\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nn m n' : ℕ\ninst✝ : NeZero n\nh : n = n'\nthis : NeZero n'\n⊢ Fin n'\n[PROOFSTEP]\nexact 0\n[GOAL]\nn m n' : ℕ\nh : n + 1 = n' + 1\n⊢ ↑(↑(castIso h) (last n)) = ↑(last n')\n[PROOFSTEP]\nrw [coe_castIso, val_last, val_last, Nat.succ_injective h]\n[GOAL]\nn m : ℕ\nh : n = m\ni : ℕ\nhn : i < n\n⊢ ↑(castIso h) { val := i, isLt := hn } = { val := i, isLt := (_ : i < m) }\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn m : ℕ\nh : n = m\ni : ℕ\nhn : i < n\n⊢ ↑(↑(castIso h) { val := i, isLt := hn }) = ↑{ val := i, isLt := (_ : i < m) }\n[PROOFSTEP]\nsimp\n[GOAL]\nn m k : ℕ\nh : n = m\nh' : m = k\ni : Fin n\n⊢ ↑(castIso h') (↑(castIso h) i) = ↑(castIso (_ : n = k)) i\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn m k : ℕ\nh : n = m\nh' : m = k\ni : Fin n\n⊢ ↑(↑(castIso h') (↑(castIso h) i)) = ↑(↑(castIso (_ : n = k)) i)\n[PROOFSTEP]\nsimp\n[GOAL]\nn m : ℕ\nh : optParam (n = n) (_ : n = n)\n⊢ castIso h = OrderIso.refl (Fin n)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.h\nn m : ℕ\nh : optParam (n = n) (_ : n = n)\nx✝ : Fin n\n⊢ ↑(↑(castIso h) x✝) = ↑(↑(OrderIso.refl (Fin n)) x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nn m : ℕ\nh : n = m\n⊢ (castIso h).toEquiv = Equiv.cast (_ : Fin n = Fin m)\n[PROOFSTEP]\nsubst h\n[GOAL]\nn : ℕ\n⊢ (castIso (_ : n = n)).toEquiv = Equiv.cast (_ : Fin n = Fin n)\n[PROOFSTEP]\nsimp\n[GOAL]\nn✝ m✝ n n' m : ℕ\ni : Fin n'\nh : n' + m = n + m\n⊢ ↑(castIso h) (castAdd m i) = castAdd m (↑(castIso (_ : n' = n)) i)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn✝ m✝ n n' m : ℕ\ni : Fin n'\nh : n' + m = n + m\n⊢ ↑(↑(castIso h) (castAdd m i)) = ↑(castAdd m (↑(castIso (_ : n' = n)) i))\n[PROOFSTEP]\nsimp\n[GOAL]\nn✝ m✝ n m m' : ℕ\ni : Fin n\nh : n + m' = n + m\n⊢ ↑(castIso h) (castAdd m' i) = castAdd m i\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn✝ m✝ n m m' : ℕ\ni : Fin n\nh : n + m' = n + m\n⊢ ↑(↑(castIso h) (castAdd m' i)) = ↑(castAdd m i)\n[PROOFSTEP]\nsimp\n[GOAL]\nn m n' : ℕ\ni : Fin n\nh : Nat.succ n = Nat.succ n'\n⊢ ↑(↑(castIso h) (succ i)) = ↑(succ (↑(castIso (_ : n = n')) i))\n[PROOFSTEP]\nsimp\n[GOAL]\nn m n' : ℕ\ni : Fin n\nh : n = n'\n⊢ Nat.succ n = Nat.succ n'\n[PROOFSTEP]\nrw [h]\n[GOAL]\nn m n' : ℕ\ni : Fin n\nh : n = n'\n⊢ ↑(succ (↑(castIso h) i)) = ↑(↑(castIso (_ : Nat.succ n = Nat.succ n')) (succ i))\n[PROOFSTEP]\nsimp\n[GOAL]\nn m n' : ℕ\nh : n + 1 = n' + 1\ni : Fin n\n⊢ ↑(castIso h) (castSucc i) = castSucc (↑(castIso (_ : n = n')) i)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn m n' : ℕ\nh : n + 1 = n' + 1\ni : Fin n\n⊢ ↑(↑(castIso h) (castSucc i)) = ↑(castSucc (↑(castIso (_ : n = n')) i))\n[PROOFSTEP]\nsimp only [coe_castIso, coe_castSucc]\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\ni : Fin n\nh : 0 < i\n⊢ 0 < castSucc i\n[PROOFSTEP]\nsimpa [lt_iff_val_lt_val] using h\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\na : Fin n\n⊢ ↑a = ↑0 ↔ ↑(castSucc a) = ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\nn m : ℕ\na : Fin n\n⊢ ↑↑a = castSucc a\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn m : ℕ\na : Fin n\n⊢ ↑↑↑a = ↑(castSucc a)\n[PROOFSTEP]\nexact val_cast_of_lt (Nat.lt.step a.is_lt)\n[GOAL]\nn✝ m n : ℕ\ni : Fin (Nat.succ n)\nhi : i ∈ Set.range castSucc\n⊢ ↑(↑(Equiv.ofInjective castSucc (_ : Injective castSucc)).symm { val := i, property := hi }) = ↑i\n[PROOFSTEP]\nrw [← coe_castSucc]\n[GOAL]\nn✝ m n : ℕ\ni : Fin (Nat.succ n)\nhi : i ∈ Set.range castSucc\n⊢ ↑(castSucc (↑(Equiv.ofInjective castSucc (_ : Injective castSucc)).symm { val := i, property := hi })) = ↑i\n[PROOFSTEP]\nexact congr_arg val (Equiv.apply_ofInjective_symm _ _)\n[GOAL]\nn✝ m✝ n n' m : ℕ\ni : Fin n'\nh : n' + m = n + m\n⊢ ↑(castIso h) (addNat i m) = addNat (↑(castIso (_ : n' = n)) i) m\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn✝ m✝ n n' m : ℕ\ni : Fin n'\nh : n' + m = n + m\n⊢ ↑(↑(castIso h) (addNat i m)) = ↑(addNat (↑(castIso (_ : n' = n)) i) m)\n[PROOFSTEP]\nsimp\n[GOAL]\nn✝ m✝ n n' m : ℕ\ni : Fin n'\nh : n' = n\n⊢ natAdd m (↑(castIso h) i) = ↑(castIso (_ : m + n' = m + n)) (natAdd m i)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn✝ m✝ n n' m : ℕ\ni : Fin n'\nh : n' = n\n⊢ ↑(natAdd m (↑(castIso h) i)) = ↑(↑(castIso (_ : m + n' = m + n)) (natAdd m i))\n[PROOFSTEP]\nsimp\n[GOAL]\nn✝ m✝ n n' m : ℕ\ni : Fin n'\nh : m + n' = m + n\n⊢ ↑(castIso h) (natAdd m i) = natAdd m (↑(castIso (_ : n' = n)) i)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn✝ m✝ n n' m : ℕ\ni : Fin n'\nh : m + n' = m + n\n⊢ ↑(↑(castIso h) (natAdd m i)) = ↑(natAdd m (↑(castIso (_ : n' = n)) i))\n[PROOFSTEP]\nsimp\n[GOAL]\nn m : ℕ\ni : Fin (n + m)\nh : n ≤ ↑i\n⊢ natAdd n (subNat n (↑(castIso (_ : n + m = m + n)) i) h) = i\n[PROOFSTEP]\nsimp [← castIso_addNat]\n[GOAL]\nn m : ℕ\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsTrans α r\nf : Fin (n + 1) → α\n⊢ ((fun x x_1 => x < x_1) ⇒ r) f f ↔ ∀ (i : Fin n), r (f (castSucc i)) (f (succ i))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn m : ℕ\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsTrans α r\nf : Fin (n + 1) → α\n⊢ ((fun x x_1 => x < x_1) ⇒ r) f f → ∀ (i : Fin n), r (f (castSucc i)) (f (succ i))\n[PROOFSTEP]\nintro H i\n[GOAL]\ncase mp\nn m : ℕ\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsTrans α r\nf : Fin (n + 1) → α\nH : ((fun x x_1 => x < x_1) ⇒ r) f f\ni : Fin n\n⊢ r (f (castSucc i)) (f (succ i))\n[PROOFSTEP]\nexact H i.castSucc_lt_succ\n[GOAL]\ncase mpr\nn m : ℕ\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsTrans α r\nf : Fin (n + 1) → α\n⊢ (∀ (i : Fin n), r (f (castSucc i)) (f (succ i))) → ((fun x x_1 => x < x_1) ⇒ r) f f\n[PROOFSTEP]\nrefine' fun H i => Fin.induction _ _\n[GOAL]\ncase mpr.refine'_1\nn m : ℕ\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsTrans α r\nf : Fin (n + 1) → α\nH : ∀ (i : Fin n), r (f (castSucc i)) (f (succ i))\ni : Fin (n + 1)\n⊢ (fun x x_1 => x < x_1) i 0 → r (f i) (f 0)\n[PROOFSTEP]\nexact fun h => (h.not_le (zero_le i)).elim\n[GOAL]\ncase mpr.refine'_2\nn m : ℕ\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsTrans α r\nf : Fin (n + 1) → α\nH : ∀ (i : Fin n), r (f (castSucc i)) (f (succ i))\ni : Fin (n + 1)\n⊢ ∀ (i_1 : Fin n),\n    ((fun x x_1 => x < x_1) i (castSucc i_1) → r (f i) (f (castSucc i_1))) →\n      (fun x x_1 => x < x_1) i (succ i_1) → r (f i) (f (succ i_1))\n[PROOFSTEP]\nintro j ihj hij\n[GOAL]\ncase mpr.refine'_2\nn m : ℕ\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsTrans α r\nf : Fin (n + 1) → α\nH : ∀ (i : Fin n), r (f (castSucc i)) (f (succ i))\ni : Fin (n + 1)\nj : Fin n\nihj : (fun x x_1 => x < x_1) i (castSucc j) → r (f i) (f (castSucc j))\nhij : i < succ j\n⊢ r (f i) (f (succ j))\n[PROOFSTEP]\nrw [← le_castSucc_iff] at hij \n[GOAL]\ncase mpr.refine'_2\nn m : ℕ\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsTrans α r\nf : Fin (n + 1) → α\nH : ∀ (i : Fin n), r (f (castSucc i)) (f (succ i))\ni : Fin (n + 1)\nj : Fin n\nihj : (fun x x_1 => x < x_1) i (castSucc j) → r (f i) (f (castSucc j))\nhij : i ≤ castSucc j\n⊢ r (f i) (f (succ j))\n[PROOFSTEP]\nrcases hij.eq_or_lt with (rfl | hlt)\n[GOAL]\ncase mpr.refine'_2.inl\nn m : ℕ\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsTrans α r\nf : Fin (n + 1) → α\nH : ∀ (i : Fin n), r (f (castSucc i)) (f (succ i))\nj : Fin n\nihj : (fun x x_1 => x < x_1) (castSucc j) (castSucc j) → r (f (castSucc j)) (f (castSucc j))\nhij : castSucc j ≤ castSucc j\n⊢ r (f (castSucc j)) (f (succ j))\ncase mpr.refine'_2.inr\nn m : ℕ\nα : Type u_1\nr : α → α → Prop\ninst✝ : IsTrans α r\nf : Fin (n + 1) → α\nH : ∀ (i : Fin n), r (f (castSucc i)) (f (succ i))\ni : Fin (n + 1)\nj : Fin n\nihj : (fun x x_1 => x < x_1) i (castSucc j) → r (f i) (f (castSucc j))\nhij : i ≤ castSucc j\nhlt : i < castSucc j\n⊢ r (f i) (f (succ j))\n[PROOFSTEP]\nexacts [H j, _root_.trans (ihj hlt) (H j)]\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\nsrc✝¹ : AddCommMonoid (Fin n) := addCommMonoid n\nsrc✝ : Neg (Fin n) := neg n\nx✝¹ x✝ : Fin n\na : ℕ\nha : a < n\nb : ℕ\nhb : b < n\n⊢ (a + (n - b)) % n = (a + (n - b) % n) % n\n[PROOFSTEP]\nsimp\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\nsrc✝¹ : AddCommMonoid (Fin n) := addCommMonoid n\nsrc✝ : Neg (Fin n) := neg n\nx✝ : Fin n\na : ℕ\nha : a < n\n⊢ (n - ↑{ val := a, isLt := ha } + a) % n = ↑0\n[PROOFSTEP]\nrw [Fin.val_zero', tsub_add_cancel_of_le, Nat.mod_self]\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\nsrc✝¹ : AddCommMonoid (Fin n) := addCommMonoid n\nsrc✝ : Neg (Fin n) := neg n\nx✝ : Fin n\na : ℕ\nha : a < n\n⊢ ↑{ val := a, isLt := ha } ≤ n\n[PROOFSTEP]\nexact le_of_lt ha\n[GOAL]\nn m : ℕ\na b : Fin n\n⊢ ↑(a - b) = (↑a + (n - ↑b)) % n\n[PROOFSTEP]\ncases a\n[GOAL]\ncase mk\nn m : ℕ\nb : Fin n\nval✝ : ℕ\nisLt✝ : val✝ < n\n⊢ ↑({ val := val✝, isLt := isLt✝ } - b) = (↑{ val := val✝, isLt := isLt✝ } + (n - ↑b)) % n\n[PROOFSTEP]\ncases b\n[GOAL]\ncase mk.mk\nn m val✝¹ : ℕ\nisLt✝¹ : val✝¹ < n\nval✝ : ℕ\nisLt✝ : val✝ < n\n⊢ ↑({ val := val✝¹, isLt := isLt✝¹ } - { val := val✝, isLt := isLt✝ }) =\n    (↑{ val := val✝¹, isLt := isLt✝¹ } + (n - ↑{ val := val✝, isLt := isLt✝ })) % n\n[PROOFSTEP]\nrfl\n[GOAL]\nn m : ℕ\na : Fin 1\n⊢ ↑a = 0\n[PROOFSTEP]\nsimp [Subsingleton.elim a 0]\n[GOAL]\nn m : ℕ\n⊢ ↑(-1) = n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nm : ℕ\n⊢ ↑(-1) = zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nm n✝ : ℕ\n⊢ ↑(-1) = Nat.succ n✝\n[PROOFSTEP]\nrw [Fin.coe_neg, Fin.val_one, Nat.succ_sub_one, Nat.mod_eq_of_lt]\n[GOAL]\ncase succ\nm n✝ : ℕ\n⊢ n✝ + 1 < Nat.succ n✝ + 1\n[PROOFSTEP]\nconstructor\n[GOAL]\nn✝ m n : ℕ\na : Fin (n + 1)\n⊢ ↑(a - 1) = if a = 0 then n else ↑a - 1\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nn m : ℕ\na : Fin (zero + 1)\n⊢ ↑(a - 1) = if a = 0 then zero else ↑a - 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn m n✝ : ℕ\na : Fin (Nat.succ n✝ + 1)\n⊢ ↑(a - 1) = if a = 0 then Nat.succ n✝ else ↑a - 1\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nn m n✝ : ℕ\na : Fin (Nat.succ n✝ + 1)\nh : a = 0\n⊢ ↑(a - 1) = Nat.succ n✝\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nn m n✝ : ℕ\na : Fin (Nat.succ n✝ + 1)\nh : ¬a = 0\n⊢ ↑(a - 1) = ↑a - 1\n[PROOFSTEP]\nrw [sub_eq_add_neg, val_add_eq_ite, coe_neg_one, if_pos, add_comm, add_tsub_add_eq_tsub_left]\n[GOAL]\ncase neg.hc\nn m n✝ : ℕ\na : Fin (Nat.succ n✝ + 1)\nh : ¬a = 0\n⊢ Nat.succ n✝ + 1 ≤ ↑a + (n✝ + 1)\n[PROOFSTEP]\nconv_rhs => rw [add_comm]\n[GOAL]\nn m n✝ : ℕ\na : Fin (Nat.succ n✝ + 1)\nh : ¬a = 0\n| ↑a + (n✝ + 1)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nn m n✝ : ℕ\na : Fin (Nat.succ n✝ + 1)\nh : ¬a = 0\n| ↑a + (n✝ + 1)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nn m n✝ : ℕ\na : Fin (Nat.succ n✝ + 1)\nh : ¬a = 0\n| ↑a + (n✝ + 1)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\ncase neg.hc\nn m n✝ : ℕ\na : Fin (Nat.succ n✝ + 1)\nh : ¬a = 0\n⊢ Nat.succ n✝ + 1 ≤ n✝ + 1 + ↑a\n[PROOFSTEP]\nrw [add_le_add_iff_left, Nat.one_le_iff_ne_zero]\n[GOAL]\ncase neg.hc\nn m n✝ : ℕ\na : Fin (Nat.succ n✝ + 1)\nh : ¬a = 0\n⊢ ↑a ≠ 0\n[PROOFSTEP]\nrwa [Fin.ext_iff] at h \n[GOAL]\nn✝ m n : ℕ\na b : Fin n\n⊢ ↑(a - b) = ↑a - ↑b ↔ b ≤ a\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nn m : ℕ\na b : Fin zero\n⊢ ↑(a - b) = ↑a - ↑b ↔ b ≤ a\n[PROOFSTEP]\nexact @finZeroElim (fun _ => _) a\n[GOAL]\ncase succ\nn m n✝ : ℕ\na b : Fin (Nat.succ n✝)\n⊢ ↑(a - b) = ↑a - ↑b ↔ b ≤ a\n[PROOFSTEP]\nrw [le_iff_val_le_val, Fin.coe_sub, ← add_tsub_assoc_of_le b.is_lt.le a]\n[GOAL]\ncase succ\nn m n✝ : ℕ\na b : Fin (Nat.succ n✝)\n⊢ (↑a + Nat.succ n✝ - ↑b) % Nat.succ n✝ = ↑a - ↑b ↔ ↑b ≤ ↑a\n[PROOFSTEP]\ncases' le_or_lt (b : ℕ) a with h h\n[GOAL]\ncase succ.inl\nn m n✝ : ℕ\na b : Fin (Nat.succ n✝)\nh : ↑b ≤ ↑a\n⊢ (↑a + Nat.succ n✝ - ↑b) % Nat.succ n✝ = ↑a - ↑b ↔ ↑b ≤ ↑a\n[PROOFSTEP]\nsimp [← tsub_add_eq_add_tsub h, val_fin_le.mp h, Nat.mod_eq_of_lt ((Nat.sub_le _ _).trans_lt a.is_lt)]\n[GOAL]\ncase succ.inr\nn m n✝ : ℕ\na b : Fin (Nat.succ n✝)\nh : ↑a < ↑b\n⊢ (↑a + Nat.succ n✝ - ↑b) % Nat.succ n✝ = ↑a - ↑b ↔ ↑b ≤ ↑a\n[PROOFSTEP]\nrw [Nat.mod_eq_of_lt, tsub_eq_zero_of_le h.le, tsub_eq_zero_iff_le, ← not_iff_not]\n[GOAL]\ncase succ.inr\nn m n✝ : ℕ\na b : Fin (Nat.succ n✝)\nh : ↑a < ↑b\n⊢ ¬↑a + Nat.succ n✝ ≤ ↑b ↔ ¬↑b ≤ ↑a\n[PROOFSTEP]\nsimpa [b.is_lt.trans_le le_add_self] using h\n[GOAL]\ncase succ.inr\nn m n✝ : ℕ\na b : Fin (Nat.succ n✝)\nh : ↑a < ↑b\n⊢ ↑a + Nat.succ n✝ - ↑b < Nat.succ n✝\n[PROOFSTEP]\nrwa [tsub_lt_iff_left (b.is_lt.le.trans le_add_self), add_lt_add_iff_right]\n[GOAL]\nn✝ m n : ℕ\na b : Fin n\n⊢ ↑(a - b) = n + ↑a - ↑b ↔ a < b\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nn m : ℕ\na b : Fin zero\n⊢ ↑(a - b) = zero + ↑a - ↑b ↔ a < b\n[PROOFSTEP]\nexact @finZeroElim (fun _ => _) a\n[GOAL]\ncase succ\nn✝ m n : ℕ\na b : Fin (Nat.succ n)\n⊢ ↑(a - b) = Nat.succ n + ↑a - ↑b ↔ a < b\n[PROOFSTEP]\nrw [lt_iff_val_lt_val, Fin.coe_sub, add_comm]\n[GOAL]\ncase succ\nn✝ m n : ℕ\na b : Fin (Nat.succ n)\n⊢ (Nat.succ n - ↑b + ↑a) % Nat.succ n = Nat.succ n + ↑a - ↑b ↔ ↑a < ↑b\n[PROOFSTEP]\ncases' le_or_lt (b : ℕ) a with h h\n[GOAL]\ncase succ.inl\nn✝ m n : ℕ\na b : Fin (Nat.succ n)\nh : ↑b ≤ ↑a\n⊢ (Nat.succ n - ↑b + ↑a) % Nat.succ n = Nat.succ n + ↑a - ↑b ↔ ↑a < ↑b\n[PROOFSTEP]\nrefine iff_of_false ?_ (not_lt_of_le h)\n[GOAL]\ncase succ.inl\nn✝ m n : ℕ\na b : Fin (Nat.succ n)\nh : ↑b ≤ ↑a\n⊢ ¬(Nat.succ n - ↑b + ↑a) % Nat.succ n = Nat.succ n + ↑a - ↑b\n[PROOFSTEP]\nsimpa [add_tsub_assoc_of_le h] using ((Nat.mod_lt _ (Nat.succ_pos _)).trans_le le_self_add).ne\n[GOAL]\ncase succ.inr\nn✝ m n : ℕ\na b : Fin (Nat.succ n)\nh : ↑a < ↑b\n⊢ (Nat.succ n - ↑b + ↑a) % Nat.succ n = Nat.succ n + ↑a - ↑b ↔ ↑a < ↑b\n[PROOFSTEP]\nsimp [← tsub_tsub_assoc b.is_lt.le h.le, ← tsub_add_eq_add_tsub b.is_lt.le,\n  Nat.mod_eq_of_lt (tsub_lt_self (Nat.succ_pos _) (tsub_pos_of_lt h)), val_fin_le.mp _]\n[GOAL]\ncase succ.inr\nn✝ m n : ℕ\na b : Fin (Nat.succ n)\nh : ↑a < ↑b\n⊢ a < b\n[PROOFSTEP]\nexact h\n[GOAL]\nn✝ m n : ℕ\nk : Fin (n + 2)\n⊢ k < k - 1 ↔ k = 0\n[PROOFSTEP]\nrcases k with ⟨_ | k, hk⟩\n[GOAL]\ncase mk.zero\nn✝ m n : ℕ\nhk : zero < n + 2\n⊢ { val := zero, isLt := hk } < { val := zero, isLt := hk } - 1 ↔ { val := zero, isLt := hk } = 0\ncase mk.succ\nn✝ m n k : ℕ\nhk : Nat.succ k < n + 2\n⊢ { val := Nat.succ k, isLt := hk } < { val := Nat.succ k, isLt := hk } - 1 ↔ { val := Nat.succ k, isLt := hk } = 0\n[PROOFSTEP]\nsimp [lt_iff_val_lt_val]\n[GOAL]\ncase mk.succ\nn✝ m n k : ℕ\nhk : Nat.succ k < n + 2\n⊢ { val := Nat.succ k, isLt := hk } < { val := Nat.succ k, isLt := hk } - 1 ↔ { val := Nat.succ k, isLt := hk } = 0\n[PROOFSTEP]\nhave : (k + 1 + (n + 1)) % (n + 2) = k % (n + 2) := by rw [add_right_comm, add_assoc, add_mod_right]\n[GOAL]\nn✝ m n k : ℕ\nhk : Nat.succ k < n + 2\n⊢ (k + 1 + (n + 1)) % (n + 2) = k % (n + 2)\n[PROOFSTEP]\nrw [add_right_comm, add_assoc, add_mod_right]\n[GOAL]\ncase mk.succ\nn✝ m n k : ℕ\nhk : Nat.succ k < n + 2\nthis : (k + 1 + (n + 1)) % (n + 2) = k % (n + 2)\n⊢ { val := Nat.succ k, isLt := hk } < { val := Nat.succ k, isLt := hk } - 1 ↔ { val := Nat.succ k, isLt := hk } = 0\n[PROOFSTEP]\nsimp [lt_iff_val_lt_val, ext_iff, Fin.coe_sub, succ_eq_add_one, this, mod_eq_of_lt ((lt_succ_self _).trans hk)]\n[GOAL]\nn✝ m n : ℕ\nk : Fin (n + 1)\n⊢ k ≤ k - 1 ↔ k = 0\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nn m : ℕ\nk : Fin (zero + 1)\n⊢ k ≤ k - 1 ↔ k = 0\n[PROOFSTEP]\nsimp [fin_one_eq_zero k]\n[GOAL]\ncase succ\nn m n✝ : ℕ\nk : Fin (Nat.succ n✝ + 1)\n⊢ k ≤ k - 1 ↔ k = 0\n[PROOFSTEP]\nrw [← lt_sub_one_iff, le_iff_lt_or_eq, lt_sub_one_iff, or_iff_left_iff_imp, eq_comm, sub_eq_iff_eq_add]\n[GOAL]\ncase succ\nn m n✝ : ℕ\nk : Fin (Nat.succ n✝ + 1)\n⊢ k = k + 1 → k = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nn✝ m n : ℕ\nk : Fin (n + 1)\n⊢ ¬k - 1 < k ↔ ¬0 < k\n[PROOFSTEP]\nsimp only [not_lt, le_sub_one_iff, le_zero_iff]\n[GOAL]\nn m : ℕ\ni : Fin (n + 1)\n⊢ ↑(last n - i) = ↑(↑revPerm i)\n[PROOFSTEP]\nrw [coe_sub_iff_le.2 i.le_last, val_last, val_revPerm, Nat.succ_sub_succ_eq_sub]\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\na : Fin (n + 1)\nha : a ≠ 0\n⊢ succAbove a 0 = 0\n[PROOFSTEP]\nrw [Fin.succAbove_below]\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\na : Fin (n + 1)\nha : a ≠ 0\n⊢ castSucc 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nn m : ℕ\ninst✝ : NeZero n\na : Fin (n + 1)\nha : a ≠ 0\n⊢ castSucc 0 < a\n[PROOFSTEP]\nexact bot_lt_iff_ne_bot.mpr ha\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\na : Fin (n + 1)\nb : Fin n\nha : a ≠ 0\n⊢ succAbove a b = 0 ↔ b = 0\n[PROOFSTEP]\nsimp only [← succAbove_ne_zero_zero ha, ← succAboveEmb_apply, OrderEmbedding.eq_iff_eq, iff_self]\n[GOAL]\nn m : ℕ\n⊢ succAbove (last n) = castSucc\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nn m : ℕ\nx✝ : Fin n\n⊢ ↑(succAbove (last n) x✝) = ↑(castSucc x✝)\n[PROOFSTEP]\nsimp only [succAbove_below, castSucc_lt_last]\n[GOAL]\nn m : ℕ\ni : Fin n\n⊢ succAbove (last n) i = castSucc i\n[PROOFSTEP]\nrw [succAbove_last]\n[GOAL]\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : p ≤ castSucc i\n⊢ succAbove p i = succ i\n[PROOFSTEP]\nsimp [le_iff_val_le_val] at h \n[GOAL]\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : ↑p ≤ ↑i\n⊢ succAbove p i = succ i\n[PROOFSTEP]\nsimp [succAbove, h.not_lt]\n[GOAL]\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\n⊢ succAbove p i < p ↔ castSucc i < p\n[PROOFSTEP]\nrefine' Iff.intro _ _\n[GOAL]\ncase refine'_1\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\n⊢ succAbove p i < p → castSucc i < p\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_1\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : succAbove p i < p\n⊢ castSucc i < p\n[PROOFSTEP]\ncases' succAbove_lt_ge p i with H H\n[GOAL]\ncase refine'_1.inl\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : succAbove p i < p\nH : castSucc i < p\n⊢ castSucc i < p\n[PROOFSTEP]\nexact H\n[GOAL]\ncase refine'_1.inr\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : succAbove p i < p\nH : p ≤ castSucc i\n⊢ castSucc i < p\n[PROOFSTEP]\nrw [succAbove_above _ _ H] at h \n[GOAL]\ncase refine'_1.inr\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : succ i < p\nH : p ≤ castSucc i\n⊢ castSucc i < p\n[PROOFSTEP]\nexact lt_trans (castSucc_lt_succ i) h\n[GOAL]\ncase refine'_2\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\n⊢ castSucc i < p → succAbove p i < p\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_2\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : castSucc i < p\n⊢ succAbove p i < p\n[PROOFSTEP]\nrw [succAbove_below _ _ h]\n[GOAL]\ncase refine'_2\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : castSucc i < p\n⊢ castSucc i < p\n[PROOFSTEP]\nexact h\n[GOAL]\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\n⊢ p < succAbove p i ↔ p ≤ castSucc i\n[PROOFSTEP]\nrefine' Iff.intro _ _\n[GOAL]\ncase refine'_1\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\n⊢ p < succAbove p i → p ≤ castSucc i\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_1\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : p < succAbove p i\n⊢ p ≤ castSucc i\n[PROOFSTEP]\ncases' succAbove_lt_ge p i with H H\n[GOAL]\ncase refine'_1.inl\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : p < succAbove p i\nH : castSucc i < p\n⊢ p ≤ castSucc i\n[PROOFSTEP]\nrw [succAbove_below _ _ H] at h \n[GOAL]\ncase refine'_1.inl\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : p < castSucc i\nH : castSucc i < p\n⊢ p ≤ castSucc i\n[PROOFSTEP]\nexact le_of_lt h\n[GOAL]\ncase refine'_1.inr\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : p < succAbove p i\nH : p ≤ castSucc i\n⊢ p ≤ castSucc i\n[PROOFSTEP]\nexact H\n[GOAL]\ncase refine'_2\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\n⊢ p ≤ castSucc i → p < succAbove p i\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_2\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : p ≤ castSucc i\n⊢ p < succAbove p i\n[PROOFSTEP]\nrw [succAbove_above _ _ h]\n[GOAL]\ncase refine'_2\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\nh : p ≤ castSucc i\n⊢ p < succ i\n[PROOFSTEP]\nexact lt_of_le_of_lt h (castSucc_lt_succ i)\n[GOAL]\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\n⊢ succAbove p i ≠ p\n[PROOFSTEP]\nintro eq\n[GOAL]\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\neq : succAbove p i = p\n⊢ False\n[PROOFSTEP]\nby_cases H : castSucc i < p\n[GOAL]\ncase pos\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\neq : succAbove p i = p\nH : castSucc i < p\n⊢ False\n[PROOFSTEP]\nsimp [lt_irrefl, ← succAbove_below _ _ H, eq] at H \n[GOAL]\ncase neg\nn m : ℕ\np : Fin (n + 1)\ni : Fin n\neq : succAbove p i = p\nH : ¬castSucc i < p\n⊢ False\n[PROOFSTEP]\nsimpa [← succAbove_above _ _ (le_of_not_lt H), eq, H] using castSucc_lt_succ i\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\np : Fin (n + 1)\ni : Fin n\nh : 0 < i\n⊢ 0 < succAbove p i\n[PROOFSTEP]\nby_cases H : castSucc i < p\n[GOAL]\ncase pos\nn m : ℕ\ninst✝ : NeZero n\np : Fin (n + 1)\ni : Fin n\nh : 0 < i\nH : castSucc i < p\n⊢ 0 < succAbove p i\n[PROOFSTEP]\nsimpa [succAbove_below _ _ H] using castSucc_pos' h\n[GOAL]\ncase neg\nn m : ℕ\ninst✝ : NeZero n\np : Fin (n + 1)\ni : Fin n\nh : 0 < i\nH : ¬castSucc i < p\n⊢ 0 < succAbove p i\n[PROOFSTEP]\nsimp [succAbove_above _ _ (le_of_not_lt H)]\n[GOAL]\nn m : ℕ\nx y : Fin (n + 1)\nh : x < y\nhx : optParam (↑x < n) (_ : ↑x < n)\n⊢ succAbove y (castLT x hx) = x\n[PROOFSTEP]\nrw [succAbove_below, castSucc_castLT]\n[GOAL]\ncase h\nn m : ℕ\nx y : Fin (n + 1)\nh : x < y\nhx : optParam (↑x < n) (_ : ↑x < n)\n⊢ castSucc (castLT x hx) < y\n[PROOFSTEP]\nexact h\n[GOAL]\nn m : ℕ\nx y : Fin (n + 1)\nh : x < y\nhy : optParam (y ≠ 0) (_ : y ≠ 0)\n⊢ succAbove x (pred y hy) = y\n[PROOFSTEP]\nrw [succAbove_above, succ_pred]\n[GOAL]\ncase h\nn m : ℕ\nx y : Fin (n + 1)\nh : x < y\nhy : optParam (y ≠ 0) (_ : y ≠ 0)\n⊢ x ≤ castSucc (pred y hy)\n[PROOFSTEP]\nsimpa [le_iff_val_le_val] using Nat.le_pred_of_lt h\n[GOAL]\nn m : ℕ\nx : Fin n\ny : Fin (n + 1)\nh : castSucc x < y\nh' : optParam (↑(succAbove y x) < n) (_ : ↑(succAbove y x) < n)\n⊢ castLT (succAbove y x) h' = x\n[PROOFSTEP]\nsimp only [succAbove_below _ _ h, castLT_castSucc]\n[GOAL]\nn m : ℕ\nx : Fin n\ny : Fin (n + 1)\nh : y ≤ castSucc x\nh' : optParam (succAbove y x ≠ 0) (_ : succAbove y x ≠ 0)\n⊢ pred (succAbove y x) h' = x\n[PROOFSTEP]\nsimp only [succAbove_above _ _ h, pred_succ]\n[GOAL]\nn m : ℕ\nx y : Fin (n + 1)\nh : x ≠ y\n⊢ ∃ z, succAbove y z = x\n[PROOFSTEP]\ncases' h.lt_or_lt with hlt hlt\n[GOAL]\ncase inl\nn m : ℕ\nx y : Fin (n + 1)\nh : x ≠ y\nhlt : x < y\n⊢ ∃ z, succAbove y z = x\ncase inr n m : ℕ x y : Fin (n + 1) h : x ≠ y hlt : y < x ⊢ ∃ z, succAbove y z = x\n[PROOFSTEP]\nexacts [⟨_, succAbove_castLT hlt⟩, ⟨_, succAbove_pred hlt⟩]\n[GOAL]\nn m : ℕ\nx y : Fin (n + 1)\n⊢ (∃ z, succAbove x z = y) ↔ y ≠ x\n[PROOFSTEP]\nrefine' ⟨_, exists_succAbove_eq⟩\n[GOAL]\nn m : ℕ\nx y : Fin (n + 1)\n⊢ (∃ z, succAbove x z = y) → y ≠ x\n[PROOFSTEP]\nrintro ⟨y, rfl⟩\n[GOAL]\ncase intro\nn m : ℕ\nx : Fin (n + 1)\ny : Fin n\n⊢ succAbove x y ≠ x\n[PROOFSTEP]\nexact succAbove_ne _ _\n[GOAL]\nn✝ m n : ℕ\n⊢ Set.range succ = {0}ᶜ\n[PROOFSTEP]\nrw [← succAbove_zero]\n[GOAL]\nn✝ m n : ℕ\n⊢ Set.range (succAbove 0) = {0}ᶜ\n[PROOFSTEP]\nexact range_succAbove (0 : Fin (n + 1))\n[GOAL]\nn m : ℕ\nx : Fin (n + 1)\n⊢ (∃ y, succ y = x) ↔ x ≠ 0\n[PROOFSTEP]\nconvert @exists_succAbove_eq_iff n 0 x\n[GOAL]\nn m : ℕ\nx✝¹ x✝ : Fin (n + 1)\nh : succAbove x✝¹ = succAbove x✝\n⊢ x✝¹ = x✝\n[PROOFSTEP]\nsimpa [range_succAbove] using congr_arg (fun f : Fin n → Fin (n + 1) => (Set.range f)ᶜ) h\n[GOAL]\nn✝ m n : ℕ\ni : Fin n\n⊢ succAbove 0 i = succ i\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\ni : Fin n\n⊢ castSucc 0 < succ i\n[PROOFSTEP]\nsimp only [castSucc_zero', succ_pos]\n[GOAL]\nn✝ m n : ℕ\ni : Fin (n + 1)\nj : Fin n\nh : castSucc j < i\n⊢ succAbove (succ i) (succ j) = succ (succAbove i j)\n[PROOFSTEP]\nhave h' : castSucc j.succ < i.succ := by simpa [lt_iff_val_lt_val] using h\n[GOAL]\nn✝ m n : ℕ\ni : Fin (n + 1)\nj : Fin n\nh : castSucc j < i\n⊢ castSucc (succ j) < succ i\n[PROOFSTEP]\nsimpa [lt_iff_val_lt_val] using h\n[GOAL]\nn✝ m n : ℕ\ni : Fin (n + 1)\nj : Fin n\nh : castSucc j < i\nh' : castSucc (succ j) < succ i\n⊢ succAbove (succ i) (succ j) = succ (succAbove i j)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn✝ m n : ℕ\ni : Fin (n + 1)\nj : Fin n\nh : castSucc j < i\nh' : castSucc (succ j) < succ i\n⊢ ↑(succAbove (succ i) (succ j)) = ↑(succ (succAbove i j))\n[PROOFSTEP]\nsimp [succAbove_below _ _ h, succAbove_below _ _ h']\n[GOAL]\nn✝ m n : ℕ\ni : Fin (n + 1)\nj : Fin n\nh : castSucc j ≥ i\n⊢ succAbove (succ i) (succ j) = succ (succAbove i j)\n[PROOFSTEP]\nhave h' : i.succ ≤ castSucc j.succ := by simpa [le_iff_val_le_val] using h\n[GOAL]\nn✝ m n : ℕ\ni : Fin (n + 1)\nj : Fin n\nh : castSucc j ≥ i\n⊢ succ i ≤ castSucc (succ j)\n[PROOFSTEP]\nsimpa [le_iff_val_le_val] using h\n[GOAL]\nn✝ m n : ℕ\ni : Fin (n + 1)\nj : Fin n\nh : castSucc j ≥ i\nh' : succ i ≤ castSucc (succ j)\n⊢ succAbove (succ i) (succ j) = succ (succAbove i j)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn✝ m n : ℕ\ni : Fin (n + 1)\nj : Fin n\nh : castSucc j ≥ i\nh' : succ i ≤ castSucc (succ j)\n⊢ ↑(succAbove (succ i) (succ j)) = ↑(succ (succAbove i j))\n[PROOFSTEP]\nsimp [succAbove_above _ _ h, succAbove_above _ _ h']\n[GOAL]\nn✝ m n : ℕ\n⊢ succAbove 1 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\ni : Fin (n + 1)\n⊢ succAbove (succ i) 1 = succ (succAbove i 0)\n[PROOFSTEP]\nrw [← succ_zero_eq_one']\n[GOAL]\nn✝ m n : ℕ\ninst✝ : NeZero n\ni : Fin (n + 1)\n⊢ succAbove (succ i) (succ 0) = succ (succAbove i 0)\n[PROOFSTEP]\nconvert succ_succAbove_succ i 0\n[GOAL]\nn✝ m n : ℕ\nj : Fin n\n⊢ succAbove 1 (succ j) = succ (succ j)\n[PROOFSTEP]\nhave := succ_succAbove_succ 0 j\n[GOAL]\nn✝ m n : ℕ\nj : Fin n\nthis : succAbove (succ 0) (succ j) = succ (succAbove 0 j)\n⊢ succAbove 1 (succ j) = succ (succ j)\n[PROOFSTEP]\nrwa [succ_zero_eq_one, zero_succAbove] at this \n[GOAL]\nn✝ m n : ℕ\n⊢ succAbove 1 1 = 2\n[PROOFSTEP]\nhave := succ_succAbove_succ (0 : Fin (n + 2)) (0 : Fin (n + 2))\n[GOAL]\nn✝ m n : ℕ\nthis : succAbove (succ 0) (succ ↑↑0) = succ (succAbove 0 ↑↑0)\n⊢ succAbove 1 1 = 2\n[PROOFSTEP]\nsimp only [succ_zero_eq_one, val_zero, Nat.cast_zero, zero_succAbove, succ_one_eq_two] at this \n[GOAL]\nn✝ m n : ℕ\nthis : succAbove 1 1 = 2\n⊢ succAbove 1 1 = 2\n[PROOFSTEP]\nexact this\n[GOAL]\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\n⊢ predAbove p a ≤ predAbove p b\n[PROOFSTEP]\ndsimp [predAbove]\n[GOAL]\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\n⊢ (if h : castSucc p < a then pred a (_ : a ≠ 0) else castLT a (_ : ↑a < n)) ≤\n    if h : castSucc p < b then pred b (_ : b ≠ 0) else castLT b (_ : ↑b < n)\n[PROOFSTEP]\nsplit_ifs with ha hb hb\n[GOAL]\ncase pos\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha : castSucc p < a\nhb : castSucc p < b\n⊢ pred a (_ : a ≠ 0) ≤ pred b (_ : b ≠ 0)\ncase neg\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha : castSucc p < a\nhb : ¬castSucc p < b\n⊢ pred a (_ : a ≠ 0) ≤ castLT b (_ : ↑b < n)\ncase pos\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha : ¬castSucc p < a\nhb : castSucc p < b\n⊢ castLT a (_ : ↑a < n) ≤ pred b (_ : b ≠ 0)\ncase neg\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha : ¬castSucc p < a\nhb : ¬castSucc p < b\n⊢ castLT a (_ : ↑a < n) ≤ castLT b (_ : ↑b < n)\n[PROOFSTEP]\nall_goals simp only [le_iff_val_le_val, coe_pred]\n[GOAL]\ncase pos\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha : castSucc p < a\nhb : castSucc p < b\n⊢ pred a (_ : a ≠ 0) ≤ pred b (_ : b ≠ 0)\n[PROOFSTEP]\nsimp only [le_iff_val_le_val, coe_pred]\n[GOAL]\ncase neg\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha : castSucc p < a\nhb : ¬castSucc p < b\n⊢ pred a (_ : a ≠ 0) ≤ castLT b (_ : ↑b < n)\n[PROOFSTEP]\nsimp only [le_iff_val_le_val, coe_pred]\n[GOAL]\ncase pos\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha : ¬castSucc p < a\nhb : castSucc p < b\n⊢ castLT a (_ : ↑a < n) ≤ pred b (_ : b ≠ 0)\n[PROOFSTEP]\nsimp only [le_iff_val_le_val, coe_pred]\n[GOAL]\ncase neg\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha : ¬castSucc p < a\nhb : ¬castSucc p < b\n⊢ castLT a (_ : ↑a < n) ≤ castLT b (_ : ↑b < n)\n[PROOFSTEP]\nsimp only [le_iff_val_le_val, coe_pred]\n[GOAL]\ncase pos\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha : castSucc p < a\nhb : castSucc p < b\n⊢ ↑a - 1 ≤ ↑b - 1\n[PROOFSTEP]\nexact pred_le_pred H\n[GOAL]\ncase neg\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha : castSucc p < a\nhb : ¬castSucc p < b\n⊢ ↑a - 1 ≤ ↑(castLT b (_ : ↑b < n))\n[PROOFSTEP]\ncalc\n  _ ≤ _ := Nat.pred_le _\n  _ ≤ _ := H\n[GOAL]\ncase pos\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha : ¬castSucc p < a\nhb : castSucc p < b\n⊢ ↑(castLT a (_ : ↑a < n)) ≤ ↑b - 1\n[PROOFSTEP]\nsimp at ha \n[GOAL]\ncase pos\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha✝ : ¬castSucc p < a\nhb : castSucc p < b\nha : a ≤ castSucc p\n⊢ ↑(castLT a (_ : ↑a < n)) ≤ ↑b - 1\n[PROOFSTEP]\nexact le_pred_of_lt (lt_of_le_of_lt ha hb)\n[GOAL]\ncase neg\nn m : ℕ\np : Fin n\na b : Fin (n + 1)\nH : a ≤ b\nha : ¬castSucc p < a\nhb : ¬castSucc p < b\n⊢ ↑(castLT a (_ : ↑a < n)) ≤ ↑(castLT b (_ : ↑b < n))\n[PROOFSTEP]\nexact H\n[GOAL]\nn m : ℕ\ni : Fin (n + 1)\na b : Fin n\nH : a ≤ b\n⊢ (fun p => predAbove p i) a ≤ (fun p => predAbove p i) b\n[PROOFSTEP]\ndsimp [predAbove]\n[GOAL]\nn m : ℕ\ni : Fin (n + 1)\na b : Fin n\nH : a ≤ b\n⊢ (if h : castSucc a < i then pred i (_ : i ≠ 0) else castLT i (_ : ↑i < n)) ≤\n    if h : castSucc b < i then pred i (_ : i ≠ 0) else castLT i (_ : ↑i < n)\n[PROOFSTEP]\nsplit_ifs with ha hb hb\n[GOAL]\ncase pos\nn m : ℕ\ni : Fin (n + 1)\na b : Fin n\nH : a ≤ b\nha : castSucc a < i\nhb : castSucc b < i\n⊢ pred i (_ : i ≠ 0) ≤ pred i (_ : i ≠ 0)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nn m : ℕ\ni : Fin (n + 1)\na b : Fin n\nH : a ≤ b\nha : castSucc a < i\nhb : ¬castSucc b < i\n⊢ pred i (_ : i ≠ 0) ≤ castLT i (_ : ↑i < n)\n[PROOFSTEP]\nexact pred_le _\n[GOAL]\ncase pos\nn m : ℕ\ni : Fin (n + 1)\na b : Fin n\nH : a ≤ b\nha : ¬castSucc a < i\nhb : castSucc b < i\n⊢ castLT i (_ : ↑i < n) ≤ pred i (_ : i ≠ 0)\n[PROOFSTEP]\nhave : b < a := castSucc_lt_castSucc_iff.mpr (hb.trans_le (le_of_not_gt ha))\n[GOAL]\ncase pos\nn m : ℕ\ni : Fin (n + 1)\na b : Fin n\nH : a ≤ b\nha : ¬castSucc a < i\nhb : castSucc b < i\nthis : b < a\n⊢ castLT i (_ : ↑i < n) ≤ pred i (_ : i ≠ 0)\n[PROOFSTEP]\nexact absurd H this.not_le\n[GOAL]\ncase neg\nn m : ℕ\ni : Fin (n + 1)\na b : Fin n\nH : a ≤ b\nha : ¬castSucc a < i\nhb : ¬castSucc b < i\n⊢ castLT i (_ : ↑i < n) ≤ castLT i (_ : ↑i < n)\n[PROOFSTEP]\nrfl\n[GOAL]\nn m : ℕ\n⊢ castPred 1 = 1\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nm : ℕ\n⊢ castPred 1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nm n✝ : ℕ\n⊢ castPred 1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nn m : ℕ\ni : Fin (n + 2)\nhi : i ≠ 0\n⊢ predAbove 0 i = pred i hi\n[PROOFSTEP]\ndsimp [predAbove]\n[GOAL]\nn m : ℕ\ni : Fin (n + 2)\nhi : i ≠ 0\n⊢ (if h : 0 < i then pred i (_ : i ≠ 0) else castLT i (_ : ↑i < n + 1)) = pred i hi\n[PROOFSTEP]\nrw [dif_pos]\n[GOAL]\ncase hc\nn m : ℕ\ni : Fin (n + 2)\nhi : i ≠ 0\n⊢ 0 < i\n[PROOFSTEP]\nexact pos_iff_ne_zero.mpr hi\n[GOAL]\nn m : ℕ\n⊢ ↑(castPred (last (n + 1))) = ↑(last n)\n[PROOFSTEP]\nsimp [castPred, predAbove, castSucc_lt_last]\n[GOAL]\nn✝ m n i : ℕ\nh : i < n + 1\n⊢ castPred { val := i, isLt := (_ : i < Nat.succ (n + 1)) } = { val := i, isLt := h }\n[PROOFSTEP]\nhave : ¬castSucc (last n) < ⟨i, lt_succ_of_lt h⟩ := by simpa [lt_iff_val_lt_val] using le_of_lt_succ h\n[GOAL]\nn✝ m n i : ℕ\nh : i < n + 1\n⊢ ¬castSucc (last n) < { val := i, isLt := (_ : i < Nat.succ (n + 1)) }\n[PROOFSTEP]\nsimpa [lt_iff_val_lt_val] using le_of_lt_succ h\n[GOAL]\nn✝ m n i : ℕ\nh : i < n + 1\nthis : ¬castSucc (last n) < { val := i, isLt := (_ : i < Nat.succ (n + 1)) }\n⊢ castPred { val := i, isLt := (_ : i < Nat.succ (n + 1)) } = { val := i, isLt := h }\n[PROOFSTEP]\nsimp [castPred, predAbove, this]\n[GOAL]\nn✝ m n : ℕ\na : Fin (n + 2)\nhx : a < last (n + 1)\n⊢ ↑(castPred a) = ↑a\n[PROOFSTEP]\nrcases a with ⟨a, ha⟩\n[GOAL]\ncase mk\nn✝ m n a : ℕ\nha : a < n + 2\nhx : { val := a, isLt := ha } < last (n + 1)\n⊢ ↑(castPred { val := a, isLt := ha }) = ↑{ val := a, isLt := ha }\n[PROOFSTEP]\nrw [castPred_mk]\n[GOAL]\ncase mk.h\nn✝ m n a : ℕ\nha : a < n + 2\nhx : { val := a, isLt := ha } < last (n + 1)\n⊢ a < n + 1\n[PROOFSTEP]\nexact hx\n[GOAL]\nn m : ℕ\np : Fin (n + 1)\ni : Fin (n + 2)\nh : i ≤ castSucc p\n⊢ predAbove p i = castPred i\n[PROOFSTEP]\nhave : i ≤ castSucc (last n) := h.trans p.le_last\n[GOAL]\nn m : ℕ\np : Fin (n + 1)\ni : Fin (n + 2)\nh : i ≤ castSucc p\nthis : i ≤ castSucc (last n)\n⊢ predAbove p i = castPred i\n[PROOFSTEP]\nsimp [predAbove, castPred, h.not_lt, this.not_lt]\n[GOAL]\nn m : ℕ\ni : Fin n\n⊢ predAbove (last n) ↑↑i = castPred ↑↑i\n[PROOFSTEP]\nrw [predAbove_last]\n[GOAL]\nn m : ℕ\np : Fin n\ni : Fin (n + 1)\nh : castSucc p < i\n⊢ predAbove p i = pred i (_ : i ≠ 0)\n[PROOFSTEP]\nsimp [predAbove, h]\n[GOAL]\nn m : ℕ\np : Fin n\ni : Fin (n + 1)\nh : i ≠ castSucc p\n⊢ succAbove (castSucc p) (predAbove p i) = i\n[PROOFSTEP]\ndsimp [predAbove, succAbove]\n[GOAL]\nn m : ℕ\np : Fin n\ni : Fin (n + 1)\nh : i ≠ castSucc p\n⊢ (if ↑(if h : castSucc p < i then pred i (_ : i ≠ 0) else castLT i (_ : ↑i < n)) < ↑p then\n      castSucc (if h : castSucc p < i then pred i (_ : i ≠ 0) else castLT i (_ : ↑i < n))\n    else succ (if h : castSucc p < i then pred i (_ : i ≠ 0) else castLT i (_ : ↑i < n))) =\n    i\n[PROOFSTEP]\nrcases p with ⟨p, _⟩\n[GOAL]\ncase mk\nn m : ℕ\ni : Fin (n + 1)\np : ℕ\nisLt✝ : p < n\nh : i ≠ castSucc { val := p, isLt := isLt✝ }\n⊢ (if\n        ↑(if h : castSucc { val := p, isLt := isLt✝ } < i then pred i (_ : i ≠ 0) else castLT i (_ : ↑i < n)) <\n          ↑{ val := p, isLt := isLt✝ } then\n      castSucc (if h : castSucc { val := p, isLt := isLt✝ } < i then pred i (_ : i ≠ 0) else castLT i (_ : ↑i < n))\n    else succ (if h : castSucc { val := p, isLt := isLt✝ } < i then pred i (_ : i ≠ 0) else castLT i (_ : ↑i < n))) =\n    i\n[PROOFSTEP]\nrcases i with ⟨i, _⟩\n[GOAL]\ncase mk.mk\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\n⊢ (if\n        ↑(if h : castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ } then\n              pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0)\n            else castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n)) <\n          ↑{ val := p, isLt := isLt✝¹ } then\n      castSucc\n        (if h : castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ } then\n          pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0)\n        else castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n))\n    else\n      succ\n        (if h : castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ } then\n          pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0)\n        else castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n))) =\n    { val := i, isLt := isLt✝ }\n[PROOFSTEP]\ncases' lt_or_le i p with H H\n[GOAL]\ncase mk.mk.inl\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ (if\n        ↑(if h : castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ } then\n              pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0)\n            else castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n)) <\n          ↑{ val := p, isLt := isLt✝¹ } then\n      castSucc\n        (if h : castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ } then\n          pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0)\n        else castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n))\n    else\n      succ\n        (if h : castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ } then\n          pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0)\n        else castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n))) =\n    { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nrw [dif_neg]\n[GOAL]\ncase mk.mk.inl\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ (if ↑(castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n)) < ↑{ val := p, isLt := isLt✝¹ } then\n      castSucc (castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n))\n    else succ (castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n))) =\n    { val := i, isLt := isLt✝ }\ncase mk.mk.inl.hnc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ ¬castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nrw [if_pos]\n[GOAL]\ncase mk.mk.inl\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ castSucc (castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n)) = { val := i, isLt := isLt✝ }\ncase mk.mk.inl.hc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ ↑(castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n)) < ↑{ val := p, isLt := isLt✝¹ }\ncase mk.mk.inl.hnc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ ¬castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ }\ncase mk.mk.inl.hnc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ ¬castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.mk.inl.hc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ ↑(castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n)) < ↑{ val := p, isLt := isLt✝¹ }\ncase mk.mk.inl.hnc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ ¬castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ }\ncase mk.mk.inl.hnc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ ¬castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nexact H\n[GOAL]\ncase mk.mk.inl.hnc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ ¬castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ }\ncase mk.mk.inl.hnc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ ¬castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.inl.hnc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : i < p\n⊢ i ≤ p\n[PROOFSTEP]\napply le_of_lt H\n[GOAL]\ncase mk.mk.inr\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : p ≤ i\n⊢ (if\n        ↑(if h : castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ } then\n              pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0)\n            else castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n)) <\n          ↑{ val := p, isLt := isLt✝¹ } then\n      castSucc\n        (if h : castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ } then\n          pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0)\n        else castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n))\n    else\n      succ\n        (if h : castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ } then\n          pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0)\n        else castLT { val := i, isLt := isLt✝ } (_ : ↑{ val := i, isLt := isLt✝ } < n))) =\n    { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nrw [dif_pos]\n[GOAL]\ncase mk.mk.inr\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : p ≤ i\n⊢ (if ↑(pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0)) < ↑{ val := p, isLt := isLt✝¹ } then\n      castSucc (pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0))\n    else succ (pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0))) =\n    { val := i, isLt := isLt✝ }\ncase mk.mk.inr.hc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : p ≤ i\n⊢ castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nrw [if_neg]\n[GOAL]\ncase mk.mk.inr\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : p ≤ i\n⊢ succ (pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0)) = { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.inr.hnc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : p ≤ i\n⊢ ¬↑(pred { val := i, isLt := isLt✝ } (_ : { val := i, isLt := isLt✝ } ≠ 0)) < ↑{ val := p, isLt := isLt✝¹ }\n[PROOFSTEP]\nsimp only [pred, Fin.mk_lt_mk, not_lt]\n[GOAL]\ncase mk.mk.inr.hnc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : p ≤ i\n⊢ p ≤ ↑(subNat 1 { val := i, isLt := isLt✝ } (_ : 0 < ↑{ val := i, isLt := isLt✝ }))\n[PROOFSTEP]\nexact Nat.le_pred_of_lt (h.symm.lt_of_le H)\n[GOAL]\ncase mk.mk.inr.hc\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n + 1\nh : { val := i, isLt := isLt✝ } ≠ castSucc { val := p, isLt := isLt✝¹ }\nH : p ≤ i\n⊢ castSucc { val := p, isLt := isLt✝¹ } < { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nexact lt_of_le_of_ne H h.symm\n[GOAL]\nn m : ℕ\np i : Fin n\n⊢ predAbove p (succAbove (castSucc p) i) = i\n[PROOFSTEP]\ndsimp [predAbove, succAbove]\n[GOAL]\nn m : ℕ\np i : Fin n\n⊢ (if h : castSucc p < if ↑i < ↑p then castSucc i else succ i then\n      pred (if ↑i < ↑p then castSucc i else succ i) (_ : (if ↑i < ↑p then castSucc i else succ i) ≠ 0)\n    else castLT (if ↑i < ↑p then castSucc i else succ i) (_ : ↑(if ↑i < ↑p then castSucc i else succ i) < n)) =\n    i\n[PROOFSTEP]\nrcases p with ⟨p, _⟩\n[GOAL]\ncase mk\nn m : ℕ\ni : Fin n\np : ℕ\nisLt✝ : p < n\n⊢ (if h : castSucc { val := p, isLt := isLt✝ } < if ↑i < ↑{ val := p, isLt := isLt✝ } then castSucc i else succ i then\n      pred (if ↑i < ↑{ val := p, isLt := isLt✝ } then castSucc i else succ i)\n        (_ : (if ↑i < ↑{ val := p, isLt := isLt✝ } then castSucc i else succ i) ≠ 0)\n    else\n      castLT (if ↑i < ↑{ val := p, isLt := isLt✝ } then castSucc i else succ i)\n        (_ : ↑(if ↑i < ↑{ val := p, isLt := isLt✝ } then castSucc i else succ i) < n)) =\n    i\n[PROOFSTEP]\nrcases i with ⟨i, _⟩\n[GOAL]\ncase mk.mk\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n\n⊢ (if h :\n        castSucc { val := p, isLt := isLt✝¹ } <\n          if ↑{ val := i, isLt := isLt✝ } < ↑{ val := p, isLt := isLt✝¹ } then castSucc { val := i, isLt := isLt✝ }\n          else succ { val := i, isLt := isLt✝ } then\n      pred\n        (if ↑{ val := i, isLt := isLt✝ } < ↑{ val := p, isLt := isLt✝¹ } then castSucc { val := i, isLt := isLt✝ }\n        else succ { val := i, isLt := isLt✝ })\n        (_ :\n          (if ↑{ val := i, isLt := isLt✝ } < ↑{ val := p, isLt := isLt✝¹ } then castSucc { val := i, isLt := isLt✝ }\n            else succ { val := i, isLt := isLt✝ }) ≠\n            0)\n    else\n      castLT\n        (if ↑{ val := i, isLt := isLt✝ } < ↑{ val := p, isLt := isLt✝¹ } then castSucc { val := i, isLt := isLt✝ }\n        else succ { val := i, isLt := isLt✝ })\n        (_ :\n          ↑(if ↑{ val := i, isLt := isLt✝ } < ↑{ val := p, isLt := isLt✝¹ } then castSucc { val := i, isLt := isLt✝ }\n              else succ { val := i, isLt := isLt✝ }) <\n            n)) =\n    { val := i, isLt := isLt✝ }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.mk\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n\n⊢ (if h :\n        { val := p, isLt := (_ : p < Nat.succ n) } <\n          if i < p then { val := i, isLt := (_ : i < Nat.succ n) }\n          else { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } then\n      pred\n        (if i < p then { val := i, isLt := (_ : i < Nat.succ n) }\n        else { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) })\n        (_ :\n          (if i < p then { val := i, isLt := (_ : i < Nat.succ n) }\n            else { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) }) ≠\n            0)\n    else\n      castLT\n        (if i < p then { val := i, isLt := (_ : i < Nat.succ n) }\n        else { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) })\n        (_ :\n          ↑(if i < p then { val := i, isLt := (_ : i < Nat.succ n) }\n              else { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) }) <\n            n)) =\n    { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nsplit_ifs with h₁ h₂ h₃\n[GOAL]\ncase pos\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n\nh₁ : i < p\nh₂ : { val := p, isLt := (_ : p < Nat.succ n) } < { val := i, isLt := (_ : i < Nat.succ n) }\n⊢ pred { val := i, isLt := (_ : i < Nat.succ n) } (_ : { val := i, isLt := (_ : i < Nat.succ n) } ≠ 0) =\n    { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nsimp only [← val_fin_lt, not_lt] at h₁ h₂ \n[GOAL]\ncase pos\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n\nh₁ : i < p\nh₂✝ : { val := p, isLt := (_ : p < Nat.succ n) } < { val := i, isLt := (_ : i < Nat.succ n) }\nh₂ : p < i\n⊢ pred { val := i, isLt := (_ : i < Nat.succ n) } (_ : { val := i, isLt := (_ : i < Nat.succ n) } ≠ 0) =\n    { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nexact (lt_le_antisymm h₁ (le_of_lt h₂)).elim\n[GOAL]\ncase neg\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n\nh₁ : i < p\nh₂ : ¬{ val := p, isLt := (_ : p < Nat.succ n) } < { val := i, isLt := (_ : i < Nat.succ n) }\n⊢ castLT { val := i, isLt := (_ : i < Nat.succ n) } (_ : ↑{ val := i, isLt := (_ : i < Nat.succ n) } < n) =\n    { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n\nh₁ : ¬i < p\nh₃ : { val := p, isLt := (_ : p < Nat.succ n) } < { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) }\n⊢ pred { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) }\n      (_ : { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } ≠ 0) =\n    { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n\nh₁ : ¬i < p\nh₃ : ¬{ val := p, isLt := (_ : p < Nat.succ n) } < { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) }\n⊢ castLT { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) }\n      (_ : ↑{ val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } < n) =\n    { val := i, isLt := isLt✝ }\n[PROOFSTEP]\nsimp only [← val_fin_lt, not_lt] at h₁ h₃ \n[GOAL]\ncase neg\nn m p : ℕ\nisLt✝¹ : p < n\ni : ℕ\nisLt✝ : i < n\nh₁✝ : ¬i < p\nh₃✝ : ¬{ val := p, isLt := (_ : p < Nat.succ n) } < { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) }\nh₁ : p ≤ i\nh₃ : i + 1 ≤ p\n⊢ castLT { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) }\n      (_ : ↑{ val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } < n) =\n    { val := i, isLt := isLt✝ }\n[PROOFSTEP]\ncontradiction\n[GOAL]\nn m : ℕ\na : Fin (n + 1)\nha : a ≠ 0\nha' : optParam (castSucc a ≠ 0) (_ : castSucc a ≠ 0)\n⊢ castSucc (pred a ha) = pred (castSucc a) ha'\n[PROOFSTEP]\ncases a\n[GOAL]\ncase mk\nn m val✝ : ℕ\nisLt✝ : val✝ < n + 1\nha : { val := val✝, isLt := isLt✝ } ≠ 0\nha' : optParam (castSucc { val := val✝, isLt := isLt✝ } ≠ 0) (_ : castSucc { val := val✝, isLt := isLt✝ } ≠ 0)\n⊢ castSucc (pred { val := val✝, isLt := isLt✝ } ha) = pred (castSucc { val := val✝, isLt := isLt✝ }) ha'\n[PROOFSTEP]\nrfl\n[GOAL]\nn m : ℕ\na : Fin (n + 2)\nb : Fin (n + 1)\nha : a ≠ 0\nhb : b ≠ 0\nhk : optParam (succAbove a b ≠ 0) (_ : succAbove a b ≠ 0)\n⊢ succAbove (pred a ha) (pred b hb) = pred (succAbove a b) hk\n[PROOFSTEP]\nobtain hbelow | habove := lt_or_le (castSucc b) a\n[GOAL]\ncase inl\nn m : ℕ\na : Fin (n + 2)\nb : Fin (n + 1)\nha : a ≠ 0\nhb : b ≠ 0\nhk : optParam (succAbove a b ≠ 0) (_ : succAbove a b ≠ 0)\nhbelow : castSucc b < a\n⊢ succAbove (pred a ha) (pred b hb) = pred (succAbove a b) hk\n[PROOFSTEP]\nrw [Fin.succAbove_below]\n[GOAL]\ncase inl\nn m : ℕ\na : Fin (n + 2)\nb : Fin (n + 1)\nha : a ≠ 0\nhb : b ≠ 0\nhk : optParam (succAbove a b ≠ 0) (_ : succAbove a b ≠ 0)\nhbelow : castSucc b < a\n⊢ castSucc (pred b hb) = pred (succAbove a b) hk\n[PROOFSTEP]\nrwa [castSucc_pred_eq_pred_castSucc, Fin.pred_inj, Fin.succAbove_below]\n[GOAL]\ncase inl.h\nn m : ℕ\na : Fin (n + 2)\nb : Fin (n + 1)\nha : a ≠ 0\nhb : b ≠ 0\nhk : optParam (succAbove a b ≠ 0) (_ : succAbove a b ≠ 0)\nhbelow : castSucc b < a\n⊢ castSucc (pred b hb) < pred a ha\n[PROOFSTEP]\nrwa [castSucc_pred_eq_pred_castSucc, pred_lt_pred_iff]\n[GOAL]\ncase inr\nn m : ℕ\na : Fin (n + 2)\nb : Fin (n + 1)\nha : a ≠ 0\nhb : b ≠ 0\nhk : optParam (succAbove a b ≠ 0) (_ : succAbove a b ≠ 0)\nhabove : a ≤ castSucc b\n⊢ succAbove (pred a ha) (pred b hb) = pred (succAbove a b) hk\n[PROOFSTEP]\nrw [Fin.succAbove_above]\n[GOAL]\ncase inr\nn m : ℕ\na : Fin (n + 2)\nb : Fin (n + 1)\nha : a ≠ 0\nhb : b ≠ 0\nhk : optParam (succAbove a b ≠ 0) (_ : succAbove a b ≠ 0)\nhabove : a ≤ castSucc b\n⊢ succ (pred b hb) = pred (succAbove a b) hk\ncase inr.h\nn m : ℕ\na : Fin (n + 2)\nb : Fin (n + 1)\nha : a ≠ 0\nhb : b ≠ 0\nhk : optParam (succAbove a b ≠ 0) (_ : succAbove a b ≠ 0)\nhabove : a ≤ castSucc b\n⊢ pred a ha ≤ castSucc (pred b hb)\n[PROOFSTEP]\nhave : (b.pred hb).succ = b.succ.pred (succ_ne_zero _) := by rw [succ_pred, pred_succ]\n[GOAL]\nn m : ℕ\na : Fin (n + 2)\nb : Fin (n + 1)\nha : a ≠ 0\nhb : b ≠ 0\nhk : optParam (succAbove a b ≠ 0) (_ : succAbove a b ≠ 0)\nhabove : a ≤ castSucc b\n⊢ succ (pred b hb) = pred (succ b) (_ : succ b ≠ 0)\n[PROOFSTEP]\nrw [succ_pred, pred_succ]\n[GOAL]\ncase inr\nn m : ℕ\na : Fin (n + 2)\nb : Fin (n + 1)\nha : a ≠ 0\nhb : b ≠ 0\nhk : optParam (succAbove a b ≠ 0) (_ : succAbove a b ≠ 0)\nhabove : a ≤ castSucc b\nthis : succ (pred b hb) = pred (succ b) (_ : succ b ≠ 0)\n⊢ succ (pred b hb) = pred (succAbove a b) hk\n[PROOFSTEP]\nrwa [this, Fin.pred_inj, Fin.succAbove_above]\n[GOAL]\ncase inr.h\nn m : ℕ\na : Fin (n + 2)\nb : Fin (n + 1)\nha : a ≠ 0\nhb : b ≠ 0\nhk : optParam (succAbove a b ≠ 0) (_ : succAbove a b ≠ 0)\nhabove : a ≤ castSucc b\n⊢ pred a ha ≤ castSucc (pred b hb)\n[PROOFSTEP]\nrwa [castSucc_pred_eq_pred_castSucc, Fin.pred_le_pred_iff]\n[GOAL]\nn✝ m n : ℕ\na : Fin n\nb : Fin (n + 1)\n⊢ predAbove (succ a) (succ b) = succ (predAbove a b)\n[PROOFSTEP]\nobtain h₁ | h₂ := lt_or_le (castSucc a) b\n[GOAL]\ncase inl\nn✝ m n : ℕ\na : Fin n\nb : Fin (n + 1)\nh₁ : castSucc a < b\n⊢ predAbove (succ a) (succ b) = succ (predAbove a b)\n[PROOFSTEP]\nrw [Fin.predAbove_above _ _ h₁, Fin.succ_pred, Fin.predAbove_above, Fin.pred_succ]\n[GOAL]\ncase inl.h\nn✝ m n : ℕ\na : Fin n\nb : Fin (n + 1)\nh₁ : castSucc a < b\n⊢ castSucc (succ a) < succ b\ncase inl.h n✝ m n : ℕ a : Fin n b : Fin (n + 1) h₁ : castSucc a < b ⊢ castSucc (succ a) < succ b\n[PROOFSTEP]\nsimpa only [lt_iff_val_lt_val, coe_castSucc, val_succ, add_lt_add_iff_right] using h₁\n[GOAL]\ncase inr\nn✝ m n : ℕ\na : Fin n\nb : Fin (n + 1)\nh₂ : b ≤ castSucc a\n⊢ predAbove (succ a) (succ b) = succ (predAbove a b)\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase inr.zero\nn m : ℕ\na : Fin zero\nb : Fin (zero + 1)\nh₂ : b ≤ castSucc a\n⊢ predAbove (succ a) (succ b) = succ (predAbove a b)\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase inr.zero.h\nn m : ℕ\na : Fin zero\nb : Fin (zero + 1)\nh₂ : b ≤ castSucc a\n⊢ False\n[PROOFSTEP]\nexact not_lt_zero' a.is_lt\n[GOAL]\ncase inr.succ\nn✝ m n : ℕ\na : Fin (Nat.succ n)\nb : Fin (Nat.succ n + 1)\nh₂ : b ≤ castSucc a\n⊢ predAbove (succ a) (succ b) = succ (predAbove a b)\n[PROOFSTEP]\nrw [Fin.predAbove_below a b h₂,\n  Fin.predAbove_below a.succ b.succ\n    (by simpa only [le_iff_val_le_val, val_succ, coe_castSucc, add_le_add_iff_right] using h₂)]\n[GOAL]\nn✝ m n : ℕ\na : Fin (Nat.succ n)\nb : Fin (Nat.succ n + 1)\nh₂ : b ≤ castSucc a\n⊢ succ b ≤ castSucc (succ a)\n[PROOFSTEP]\nsimpa only [le_iff_val_le_val, val_succ, coe_castSucc, add_le_add_iff_right] using h₂\n[GOAL]\ncase inr.succ\nn✝ m n : ℕ\na : Fin (Nat.succ n)\nb : Fin (Nat.succ n + 1)\nh₂ : b ≤ castSucc a\n⊢ castPred (succ b) = succ (castPred b)\n[PROOFSTEP]\next\n[GOAL]\ncase inr.succ.h\nn✝ m n : ℕ\na : Fin (Nat.succ n)\nb : Fin (Nat.succ n + 1)\nh₂ : b ≤ castSucc a\n⊢ ↑(castPred (succ b)) = ↑(succ (castPred b))\n[PROOFSTEP]\nhave h₀ : (b : ℕ) < n + 1 := by\n  simp only [le_iff_val_le_val, coe_castSucc] at h₂ \n  simpa only [lt_succ_iff] using h₂.trans a.is_le\n[GOAL]\nn✝ m n : ℕ\na : Fin (Nat.succ n)\nb : Fin (Nat.succ n + 1)\nh₂ : b ≤ castSucc a\n⊢ ↑b < n + 1\n[PROOFSTEP]\nsimp only [le_iff_val_le_val, coe_castSucc] at h₂ \n[GOAL]\nn✝ m n : ℕ\na : Fin (Nat.succ n)\nb : Fin (Nat.succ n + 1)\nh₂ : ↑b ≤ ↑a\n⊢ ↑b < n + 1\n[PROOFSTEP]\nsimpa only [lt_succ_iff] using h₂.trans a.is_le\n[GOAL]\ncase inr.succ.h\nn✝ m n : ℕ\na : Fin (Nat.succ n)\nb : Fin (Nat.succ n + 1)\nh₂ : b ≤ castSucc a\nh₀ : ↑b < n + 1\n⊢ ↑(castPred (succ b)) = ↑(succ (castPred b))\n[PROOFSTEP]\nhave h₁ : (b.succ : ℕ) < n + 2 := by\n  rw [← Nat.succ_lt_succ_iff] at h₀ \n  simpa only [val_succ] using h₀\n[GOAL]\nn✝ m n : ℕ\na : Fin (Nat.succ n)\nb : Fin (Nat.succ n + 1)\nh₂ : b ≤ castSucc a\nh₀ : ↑b < n + 1\n⊢ ↑(succ b) < n + 2\n[PROOFSTEP]\nrw [← Nat.succ_lt_succ_iff] at h₀ \n[GOAL]\nn✝ m n : ℕ\na : Fin (Nat.succ n)\nb : Fin (Nat.succ n + 1)\nh₂ : b ≤ castSucc a\nh₀ : Nat.succ ↑b < Nat.succ (n + 1)\n⊢ ↑(succ b) < n + 2\n[PROOFSTEP]\nsimpa only [val_succ] using h₀\n[GOAL]\ncase inr.succ.h\nn✝ m n : ℕ\na : Fin (Nat.succ n)\nb : Fin (Nat.succ n + 1)\nh₂ : b ≤ castSucc a\nh₀ : ↑b < n + 1\nh₁ : ↑(succ b) < n + 2\n⊢ ↑(castPred (succ b)) = ↑(succ (castPred b))\n[PROOFSTEP]\nsimp only [coe_castPred b h₀, coe_castPred b.succ h₁, val_succ]\n[GOAL]\nn m : ℕ\ni : Fin (n + 1)\n⊢ castPred (castSucc i) = i\n[PROOFSTEP]\nsimp [castPred, predAbove, not_lt.mpr (le_last i)]\n[GOAL]\nn m : ℕ\ni : Fin (n + 2)\nh : i < last (n + 1)\n⊢ castSucc (castPred i) = i\n[PROOFSTEP]\nrw [castPred, predAbove, dif_neg]\n[GOAL]\nn m : ℕ\ni : Fin (n + 2)\nh : i < last (n + 1)\n⊢ castSucc (castLT i (_ : ↑i < n + 1)) = i\n[PROOFSTEP]\nsimp [Fin.eq_iff_veq]\n[GOAL]\ncase hnc\nn m : ℕ\ni : Fin (n + 2)\nh : i < last (n + 1)\n⊢ ¬castSucc (last n) < i\n[PROOFSTEP]\nexact h.not_le\n[GOAL]\nn m : ℕ\ni : Fin (n + 2)\n⊢ ↑(castPred i) ≤ ↑i\n[PROOFSTEP]\nrcases i.le_last.eq_or_lt with (rfl | h)\n[GOAL]\ncase inl\nn m : ℕ\n⊢ ↑(castPred (last (n + 1))) ≤ ↑(last (n + 1))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn m : ℕ\ni : Fin (n + 2)\nh : i < last (n + 1)\n⊢ ↑(castPred i) ≤ ↑i\n[PROOFSTEP]\nrw [castPred, predAbove, dif_neg]\n[GOAL]\ncase inr\nn m : ℕ\ni : Fin (n + 2)\nh : i < last (n + 1)\n⊢ ↑(castLT i (_ : ↑i < n + 1)) ≤ ↑i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.hnc\nn m : ℕ\ni : Fin (n + 2)\nh : i < last (n + 1)\n⊢ ¬castSucc (last n) < i\n[PROOFSTEP]\nsimpa [lt_iff_val_lt_val, le_iff_val_le_val, lt_succ_iff] using h\n[GOAL]\nn m : ℕ\ni : Fin (n + 2)\n⊢ ↑(castPred i) < ↑i ↔ i = last (n + 1)\n[PROOFSTEP]\nrcases i.le_last.eq_or_lt with (rfl | H)\n[GOAL]\ncase inl\nn m : ℕ\n⊢ ↑(castPred (last (n + 1))) < ↑(last (n + 1)) ↔ last (n + 1) = last (n + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn m : ℕ\ni : Fin (n + 2)\nH : i < last (n + 1)\n⊢ ↑(castPred i) < ↑i ↔ i = last (n + 1)\n[PROOFSTEP]\nsimp only [_root_.ne_of_lt H]\n[GOAL]\ncase inr\nn m : ℕ\ni : Fin (n + 2)\nH : i < last (n + 1)\n⊢ ↑(castPred i) < ↑i ↔ False\n[PROOFSTEP]\nrw [← castSucc_castPred H]\n[GOAL]\ncase inr\nn m : ℕ\ni : Fin (n + 2)\nH : i < last (n + 1)\n⊢ ↑(castPred (castSucc (castPred i))) < ↑(castSucc (castPred i)) ↔ False\n[PROOFSTEP]\nsimp\n[GOAL]\nn m : ℕ\ni : Fin (n + 2)\n⊢ i < last (n + 1) ↔ ↑(castPred i) = ↑i\n[PROOFSTEP]\nrcases i.le_last.eq_or_lt with (rfl | H)\n[GOAL]\ncase inl\nn m : ℕ\n⊢ last (n + 1) < last (n + 1) ↔ ↑(castPred (last (n + 1))) = ↑(last (n + 1))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn m : ℕ\ni : Fin (n + 2)\nH : i < last (n + 1)\n⊢ i < last (n + 1) ↔ ↑(castPred i) = ↑i\n[PROOFSTEP]\nsimp only [H]\n[GOAL]\ncase inr\nn m : ℕ\ni : Fin (n + 2)\nH : i < last (n + 1)\n⊢ True ↔ ↑(castPred i) = ↑i\n[PROOFSTEP]\nrw [← castSucc_castPred H]\n[GOAL]\ncase inr\nn m : ℕ\ni : Fin (n + 2)\nH : i < last (n + 1)\n⊢ True ↔ ↑(castPred (castSucc (castPred i))) = ↑(castSucc (castPred i))\n[PROOFSTEP]\nsimp\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\nk : Fin n\n⊢ k * 1 = k\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nm : ℕ\ninst✝ : NeZero zero\nk : Fin zero\n⊢ k * 1 = k\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nm n : ℕ\ninst✝ : NeZero (Nat.succ n)\nk : Fin (Nat.succ n)\n⊢ k * 1 = k\n[PROOFSTEP]\ncases n\n[GOAL]\ncase succ.zero\nm : ℕ\ninst✝ : NeZero (Nat.succ zero)\nk : Fin (Nat.succ zero)\n⊢ k * 1 = k\n[PROOFSTEP]\nsimp [fin_one_eq_zero]\n[GOAL]\ncase succ.succ\nm n✝ : ℕ\ninst✝ : NeZero (Nat.succ (Nat.succ n✝))\nk : Fin (Nat.succ (Nat.succ n✝))\n⊢ k * 1 = k\n[PROOFSTEP]\nsimp [eq_iff_veq, mul_def, mod_eq_of_lt (is_lt k)]\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\nk : Fin n\n⊢ 1 * k = k\n[PROOFSTEP]\nrw [Fin.mul_comm, Fin.mul_one']\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\nk : Fin n\n⊢ k * 0 = 0\n[PROOFSTEP]\nsimp [eq_iff_veq, mul_def]\n[GOAL]\nn m : ℕ\ninst✝ : NeZero n\nk : Fin n\n⊢ 0 * k = 0\n[PROOFSTEP]\nsimp [eq_iff_veq, mul_def]\n[GOAL]\nn✝ m n k : ℕ\ni✝ : Fin (k + 1)\ni : Q(ℕ)\nthis : «$n» =Q «$k» + 1\n⊢ Q(NeZero «$n»)\n[PROOFSTEP]\nexact q(NeZero.succ)\n", "meta": {"mathlib_filename": "Mathlib.Data.Fin.Basic", "llama_tokens": 38426, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.665410572017153, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.3508819894560942}}
{"text": "[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.611, u_1} C\ninst✝ : Precoherent C\n⊢ ∀ ⦃X Y : C⦄ (f : Y ⟶ X) (S : Presieve X),\n    S ∈ (fun B => {S | ∃ α x X π, S = Presieve.ofArrows X π ∧ EffectiveEpiFamily X π}) X →\n      ∃ T,\n        T ∈ (fun B => {S | ∃ α x X π, S = Presieve.ofArrows X π ∧ EffectiveEpiFamily X π}) Y ∧\n          Presieve.FactorsThruAlong T S f\n[PROOFSTEP]\nrintro B₁ B₂ f S ⟨α, _, X₁, π₁, rfl, hS⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nC : Type u_1\ninst✝¹ : Category.{?u.611, u_1} C\ninst✝ : Precoherent C\nB₁ B₂ : C\nf : B₂ ⟶ B₁\nα : Type\nw✝ : Fintype α\nX₁ : α → C\nπ₁ : (a : α) → X₁ a ⟶ B₁\nhS : EffectiveEpiFamily X₁ π₁\n⊢ ∃ T,\n    T ∈ (fun B => {S | ∃ α x X π, S = Presieve.ofArrows X π ∧ EffectiveEpiFamily X π}) B₂ ∧\n      Presieve.FactorsThruAlong T (Presieve.ofArrows X₁ π₁) f\n[PROOFSTEP]\nobtain ⟨β, _, X₂, π₂, h, i, ι, hh⟩ := Precoherent.pullback f α X₁ π₁ hS\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nC : Type u_1\ninst✝¹ : Category.{?u.611, u_1} C\ninst✝ : Precoherent C\nB₁ B₂ : C\nf : B₂ ⟶ B₁\nα : Type\nw✝¹ : Fintype α\nX₁ : α → C\nπ₁ : (a : α) → X₁ a ⟶ B₁\nhS : EffectiveEpiFamily X₁ π₁\nβ : Type\nw✝ : Fintype β\nX₂ : β → C\nπ₂ : (b : β) → X₂ b ⟶ B₂\nh : EffectiveEpiFamily X₂ π₂\ni : β → α\nι : (b : β) → X₂ b ⟶ X₁ (i b)\nhh : ∀ (b : β), ι b ≫ π₁ (i b) = π₂ b ≫ f\n⊢ ∃ T,\n    T ∈ (fun B => {S | ∃ α x X π, S = Presieve.ofArrows X π ∧ EffectiveEpiFamily X π}) B₂ ∧\n      Presieve.FactorsThruAlong T (Presieve.ofArrows X₁ π₁) f\n[PROOFSTEP]\nrefine ⟨Presieve.ofArrows X₂ π₂, ⟨β, inferInstance, X₂, π₂, rfl, h⟩, ?_⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nC : Type u_1\ninst✝¹ : Category.{?u.611, u_1} C\ninst✝ : Precoherent C\nB₁ B₂ : C\nf : B₂ ⟶ B₁\nα : Type\nw✝¹ : Fintype α\nX₁ : α → C\nπ₁ : (a : α) → X₁ a ⟶ B₁\nhS : EffectiveEpiFamily X₁ π₁\nβ : Type\nw✝ : Fintype β\nX₂ : β → C\nπ₂ : (b : β) → X₂ b ⟶ B₂\nh : EffectiveEpiFamily X₂ π₂\ni : β → α\nι : (b : β) → X₂ b ⟶ X₁ (i b)\nhh : ∀ (b : β), ι b ≫ π₁ (i b) = π₂ b ≫ f\n⊢ Presieve.FactorsThruAlong (Presieve.ofArrows X₂ π₂) (Presieve.ofArrows X₁ π₁) f\n[PROOFSTEP]\nrintro _ _ ⟨b⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk\nC : Type u_1\ninst✝¹ : Category.{?u.611, u_1} C\ninst✝ : Precoherent C\nB₁ B₂ : C\nf : B₂ ⟶ B₁\nα : Type\nw✝¹ : Fintype α\nX₁ : α → C\nπ₁ : (a : α) → X₁ a ⟶ B₁\nhS : EffectiveEpiFamily X₁ π₁\nβ : Type\nw✝ : Fintype β\nX₂ : β → C\nπ₂ : (b : β) → X₂ b ⟶ B₂\nh : EffectiveEpiFamily X₂ π₂\ni : β → α\nι : (b : β) → X₂ b ⟶ X₁ (i b)\nhh : ∀ (b : β), ι b ≫ π₁ (i b) = π₂ b ≫ f\nY : C\nb : β\n⊢ ∃ W i e, Presieve.ofArrows X₁ π₁ e ∧ i ≫ e = π₂ b ≫ f\n[PROOFSTEP]\nrefine ⟨(X₁ (i b)), ι _, π₁ _, ⟨_⟩, hh _⟩\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Precoherent C\nP : Cᵒᵖ ⥤ Type w\n⊢ Presieve.IsSheaf (coherentTopology C) P ↔\n    ∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),\n      EffectiveEpiFamily X π → Presieve.IsSheafFor P (Presieve.ofArrows X π)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Precoherent C\nP : Cᵒᵖ ⥤ Type w\n⊢ Presieve.IsSheaf (coherentTopology C) P →\n    ∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),\n      EffectiveEpiFamily X π → Presieve.IsSheafFor P (Presieve.ofArrows X π)\n[PROOFSTEP]\nintro hP B α _ X π h\n[GOAL]\ncase mp\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Precoherent C\nP : Cᵒᵖ ⥤ Type w\nhP : Presieve.IsSheaf (coherentTopology C) P\nB : C\nα : Type\ninst✝ : Fintype α\nX : α → C\nπ : (a : α) → X a ⟶ B\nh : EffectiveEpiFamily X π\n⊢ Presieve.IsSheafFor P (Presieve.ofArrows X π)\n[PROOFSTEP]\nsimp only [coherentTopology, Presieve.isSheaf_coverage] at hP \n[GOAL]\ncase mp\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Precoherent C\nP : Cᵒᵖ ⥤ Type w\nB : C\nα : Type\ninst✝ : Fintype α\nX : α → C\nπ : (a : α) → X a ⟶ B\nh : EffectiveEpiFamily X π\nhP : ∀ {X : C} (R : Presieve X), R ∈ Coverage.covering (coherentCoverage C) X → Presieve.IsSheafFor P R\n⊢ Presieve.IsSheafFor P (Presieve.ofArrows X π)\n[PROOFSTEP]\napply hP\n[GOAL]\ncase mp.a\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Precoherent C\nP : Cᵒᵖ ⥤ Type w\nB : C\nα : Type\ninst✝ : Fintype α\nX : α → C\nπ : (a : α) → X a ⟶ B\nh : EffectiveEpiFamily X π\nhP : ∀ {X : C} (R : Presieve X), R ∈ Coverage.covering (coherentCoverage C) X → Presieve.IsSheafFor P R\n⊢ Presieve.ofArrows X π ∈ Coverage.covering (coherentCoverage C) B\n[PROOFSTEP]\nrefine ⟨α, inferInstance, X, π, rfl, h⟩\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Precoherent C\nP : Cᵒᵖ ⥤ Type w\n⊢ (∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),\n      EffectiveEpiFamily X π → Presieve.IsSheafFor P (Presieve.ofArrows X π)) →\n    Presieve.IsSheaf (coherentTopology C) P\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Precoherent C\nP : Cᵒᵖ ⥤ Type w\nh :\n  ∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),\n    EffectiveEpiFamily X π → Presieve.IsSheafFor P (Presieve.ofArrows X π)\n⊢ Presieve.IsSheaf (coherentTopology C) P\n[PROOFSTEP]\nsimp only [coherentTopology, Presieve.isSheaf_coverage]\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Precoherent C\nP : Cᵒᵖ ⥤ Type w\nh :\n  ∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),\n    EffectiveEpiFamily X π → Presieve.IsSheafFor P (Presieve.ofArrows X π)\n⊢ ∀ {X : C} (R : Presieve X), R ∈ Coverage.covering (coherentCoverage C) X → Presieve.IsSheafFor P R\n[PROOFSTEP]\nrintro B S ⟨α, _, X, π, rfl, hS⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Precoherent C\nP : Cᵒᵖ ⥤ Type w\nh :\n  ∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),\n    EffectiveEpiFamily X π → Presieve.IsSheafFor P (Presieve.ofArrows X π)\nB : C\nα : Type\nw✝ : Fintype α\nX : α → C\nπ : (a : α) → X a ⟶ B\nhS : EffectiveEpiFamily X π\n⊢ Presieve.IsSheafFor P (Presieve.ofArrows X π)\n[PROOFSTEP]\nexact h _ _ _ _ hS\n[GOAL]\nC✝ : Type u_1\ninst✝² : Category.{?u.3154, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\n⊢ (∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)) →\n    S ∈ GrothendieckTopology.sieves (coherentTopology C) X\n[PROOFSTEP]\nrintro ⟨α, ⟨h, ⟨Y, ⟨π, hπ⟩⟩⟩⟩\n[GOAL]\ncase intro.intro.intro.intro\nC✝ : Type u_1\ninst✝² : Category.{?u.3154, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nα : Type\nh : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nhπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)\n⊢ S ∈ GrothendieckTopology.sieves (coherentTopology C) X\n[PROOFSTEP]\nhave h_le : Sieve.generate (Presieve.ofArrows _ π) ≤ S :=\n  by\n  rw [Sieve.sets_iff_generate (Presieve.ofArrows _ π) S]\n  apply Presieve.le_of_factorsThru_sieve (Presieve.ofArrows (fun i => Y i) π) S _\n  intro W g f\n  use W, 𝟙 W\n  rcases f with ⟨i⟩\n  exact ⟨π i, ⟨hπ.2 i, Category.id_comp (π i)⟩⟩\n[GOAL]\nC✝ : Type u_1\ninst✝² : Category.{?u.3154, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nα : Type\nh : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nhπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)\n⊢ Sieve.generate (Presieve.ofArrows (fun i => Y i) π) ≤ S\n[PROOFSTEP]\nrw [Sieve.sets_iff_generate (Presieve.ofArrows _ π) S]\n[GOAL]\nC✝ : Type u_1\ninst✝² : Category.{?u.3154, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nα : Type\nh : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nhπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)\n⊢ Presieve.ofArrows (fun i => Y i) π ≤ S.arrows\n[PROOFSTEP]\napply Presieve.le_of_factorsThru_sieve (Presieve.ofArrows (fun i => Y i) π) S _\n[GOAL]\nC✝ : Type u_1\ninst✝² : Category.{?u.3154, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nα : Type\nh : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nhπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)\n⊢ Presieve.FactorsThru (Presieve.ofArrows (fun i => Y i) π) S.arrows\n[PROOFSTEP]\nintro W g f\n[GOAL]\nC✝ : Type u_1\ninst✝² : Category.{?u.3154, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nα : Type\nh : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nhπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)\nW : C\ng : W ⟶ X\nf : Presieve.ofArrows (fun i => Y i) π g\n⊢ ∃ W_1 i e, S.arrows e ∧ i ≫ e = g\n[PROOFSTEP]\nuse W, 𝟙 W\n[GOAL]\ncase h\nC✝ : Type u_1\ninst✝² : Category.{?u.3154, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nα : Type\nh : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nhπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)\nW : C\ng : W ⟶ X\nf : Presieve.ofArrows (fun i => Y i) π g\n⊢ ∃ e, S.arrows e ∧ 𝟙 W ≫ e = g\n[PROOFSTEP]\nrcases f with ⟨i⟩\n[GOAL]\ncase h.mk\nC✝ : Type u_1\ninst✝² : Category.{?u.3154, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nα : Type\nh : Fintype α\nY✝ : α → C\nπ : (a : α) → Y✝ a ⟶ X\nhπ : EffectiveEpiFamily Y✝ π ∧ ∀ (a : α), S.arrows (π a)\nY : C\ni : α\n⊢ ∃ e, S.arrows e ∧ 𝟙 (Y✝ i) ≫ e = π i\n[PROOFSTEP]\nexact ⟨π i, ⟨hπ.2 i, Category.id_comp (π i)⟩⟩\n[GOAL]\ncase intro.intro.intro.intro\nC✝ : Type u_1\ninst✝² : Category.{?u.3154, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nα : Type\nh : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nhπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)\nh_le : Sieve.generate (Presieve.ofArrows (fun i => Y i) π) ≤ S\n⊢ S ∈ GrothendieckTopology.sieves (coherentTopology C) X\n[PROOFSTEP]\napply Coverage.saturate_of_superset (coherentCoverage C) h_le\n[GOAL]\ncase intro.intro.intro.intro\nC✝ : Type u_1\ninst✝² : Category.{?u.3154, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nα : Type\nh : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nhπ : EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)\nh_le : Sieve.generate (Presieve.ofArrows (fun i => Y i) π) ≤ S\n⊢ Coverage.saturate (coherentCoverage C) X (Sieve.generate (Presieve.ofArrows (fun i => Y i) π))\n[PROOFSTEP]\nexact Coverage.saturate.of X _ ⟨α, inferInstance, Y, π, ⟨rfl, hπ.1⟩⟩\n[GOAL]\nC✝ : Type u_1\ninst✝² : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX W : C\n⊢ Presieve.IsSheaf (coherentTopology C) (yoneda.obj W)\n[PROOFSTEP]\nrw [isSheaf_coherent]\n[GOAL]\nC✝ : Type u_1\ninst✝² : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX W : C\n⊢ ∀ (B : C) (α : Type) [inst : Fintype α] (X : α → C) (π : (a : α) → X a ⟶ B),\n    EffectiveEpiFamily X π → Presieve.IsSheafFor (yoneda.obj W) (Presieve.ofArrows X π)\n[PROOFSTEP]\nintro X α _ Y π H\n[GOAL]\nC✝ : Type u_1\ninst✝³ : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝² : Category.{u_3, u_2} C\ninst✝¹ : Precoherent C\nX✝ W X : C\nα : Type\ninst✝ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nH : EffectiveEpiFamily Y π\n⊢ Presieve.IsSheafFor (yoneda.obj W) (Presieve.ofArrows Y π)\n[PROOFSTEP]\nhave h_colim := isColimitOfEffectiveEpiFamilyStruct Y π H.effectiveEpiFamily.some\n[GOAL]\nC✝ : Type u_1\ninst✝³ : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝² : Category.{u_3, u_2} C\ninst✝¹ : Precoherent C\nX✝ W X : C\nα : Type\ninst✝ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nH : EffectiveEpiFamily Y π\nh_colim : IsColimit (Presieve.cocone (Sieve.generateFamily Y π).arrows)\n⊢ Presieve.IsSheafFor (yoneda.obj W) (Presieve.ofArrows Y π)\n[PROOFSTEP]\nrw [← Sieve.generateFamily_eq] at h_colim \n[GOAL]\nC✝ : Type u_1\ninst✝³ : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝² : Category.{u_3, u_2} C\ninst✝¹ : Precoherent C\nX✝ W X : C\nα : Type\ninst✝ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nH : EffectiveEpiFamily Y π\nh_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)\n⊢ Presieve.IsSheafFor (yoneda.obj W) (Presieve.ofArrows Y π)\n[PROOFSTEP]\nintro x hx\n[GOAL]\nC✝ : Type u_1\ninst✝³ : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝² : Category.{u_3, u_2} C\ninst✝¹ : Precoherent C\nX✝ W X : C\nα : Type\ninst✝ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nH : EffectiveEpiFamily Y π\nh_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)\nx : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)\nhx : Presieve.FamilyOfElements.Compatible x\n⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t\n[PROOFSTEP]\nlet x_ext := Presieve.FamilyOfElements.sieveExtend x\n[GOAL]\nC✝ : Type u_1\ninst✝³ : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝² : Category.{u_3, u_2} C\ninst✝¹ : Precoherent C\nX✝ W X : C\nα : Type\ninst✝ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nH : EffectiveEpiFamily Y π\nh_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)\nx : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)\nhx : Presieve.FamilyOfElements.Compatible x\nx_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=\n  Presieve.FamilyOfElements.sieveExtend x\n⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t\n[PROOFSTEP]\nhave hx_ext := Presieve.FamilyOfElements.Compatible.sieveExtend hx\n[GOAL]\nC✝ : Type u_1\ninst✝³ : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝² : Category.{u_3, u_2} C\ninst✝¹ : Precoherent C\nX✝ W X : C\nα : Type\ninst✝ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nH : EffectiveEpiFamily Y π\nh_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)\nx : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)\nhx : Presieve.FamilyOfElements.Compatible x\nx_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=\n  Presieve.FamilyOfElements.sieveExtend x\nhx_ext : Presieve.FamilyOfElements.Compatible (Presieve.FamilyOfElements.sieveExtend x)\n⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t\n[PROOFSTEP]\nlet S := Sieve.generate (Presieve.ofArrows Y π)\n[GOAL]\nC✝ : Type u_1\ninst✝³ : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝² : Category.{u_3, u_2} C\ninst✝¹ : Precoherent C\nX✝ W X : C\nα : Type\ninst✝ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nH : EffectiveEpiFamily Y π\nh_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)\nx : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)\nhx : Presieve.FamilyOfElements.Compatible x\nx_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=\n  Presieve.FamilyOfElements.sieveExtend x\nhx_ext : Presieve.FamilyOfElements.Compatible (Presieve.FamilyOfElements.sieveExtend x)\nS : Sieve X := Sieve.generate (Presieve.ofArrows Y π)\n⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t\n[PROOFSTEP]\nobtain ⟨t, t_amalg, t_uniq⟩ : ∃! t, x_ext.IsAmalgamation t :=\n  (Sieve.forallYonedaIsSheaf_iff_colimit S).mpr ⟨h_colim⟩ W x_ext hx_ext\n[GOAL]\ncase intro.intro\nC✝ : Type u_1\ninst✝³ : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝² : Category.{u_3, u_2} C\ninst✝¹ : Precoherent C\nX✝ W X : C\nα : Type\ninst✝ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nH : EffectiveEpiFamily Y π\nh_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)\nx : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)\nhx : Presieve.FamilyOfElements.Compatible x\nx_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=\n  Presieve.FamilyOfElements.sieveExtend x\nhx_ext : Presieve.FamilyOfElements.Compatible (Presieve.FamilyOfElements.sieveExtend x)\nS : Sieve X := Sieve.generate (Presieve.ofArrows Y π)\nt : (yoneda.obj W).obj (Opposite.op X)\nt_amalg : Presieve.FamilyOfElements.IsAmalgamation x_ext t\nt_uniq :\n  ∀ (y : (yoneda.obj W).obj (Opposite.op X)), (fun t => Presieve.FamilyOfElements.IsAmalgamation x_ext t) y → y = t\n⊢ ∃! t, Presieve.FamilyOfElements.IsAmalgamation x t\n[PROOFSTEP]\nrefine ⟨t, ?_, ?_⟩\n[GOAL]\ncase intro.intro.refine_1\nC✝ : Type u_1\ninst✝³ : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝² : Category.{u_3, u_2} C\ninst✝¹ : Precoherent C\nX✝ W X : C\nα : Type\ninst✝ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nH : EffectiveEpiFamily Y π\nh_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)\nx : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)\nhx : Presieve.FamilyOfElements.Compatible x\nx_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=\n  Presieve.FamilyOfElements.sieveExtend x\nhx_ext : Presieve.FamilyOfElements.Compatible (Presieve.FamilyOfElements.sieveExtend x)\nS : Sieve X := Sieve.generate (Presieve.ofArrows Y π)\nt : (yoneda.obj W).obj (Opposite.op X)\nt_amalg : Presieve.FamilyOfElements.IsAmalgamation x_ext t\nt_uniq :\n  ∀ (y : (yoneda.obj W).obj (Opposite.op X)), (fun t => Presieve.FamilyOfElements.IsAmalgamation x_ext t) y → y = t\n⊢ (fun t => Presieve.FamilyOfElements.IsAmalgamation x t) t\n[PROOFSTEP]\nconvert Presieve.isAmalgamation_restrict (Sieve.le_generate (Presieve.ofArrows Y π)) _ _ t_amalg\n[GOAL]\ncase h.e.h.e'_6.h.h.h\nC✝ : Type u_1\ninst✝³ : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝² : Category.{u_3, u_2} C\ninst✝¹ : Precoherent C\nX✝ W X : C\nα : Type\ninst✝ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nH : EffectiveEpiFamily Y π\nh_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)\nx : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)\nhx : Presieve.FamilyOfElements.Compatible x\nx_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=\n  Presieve.FamilyOfElements.sieveExtend x\nhx_ext : Presieve.FamilyOfElements.Compatible (Presieve.FamilyOfElements.sieveExtend x)\nS : Sieve X := Sieve.generate (Presieve.ofArrows Y π)\nt : (yoneda.obj W).obj (Opposite.op X)\nt_amalg : Presieve.FamilyOfElements.IsAmalgamation x_ext t\nt_uniq :\n  ∀ (y : (yoneda.obj W).obj (Opposite.op X)), (fun t => Presieve.FamilyOfElements.IsAmalgamation x_ext t) y → y = t\n⊢ x =\n    Presieve.FamilyOfElements.restrict (_ : Presieve.ofArrows Y π ≤ (Sieve.generate (Presieve.ofArrows Y π)).arrows)\n      x_ext\n[PROOFSTEP]\nexact (Presieve.restrict_extend hx).symm\n[GOAL]\ncase intro.intro.refine_2\nC✝ : Type u_1\ninst✝³ : Category.{?u.4892, u_1} C✝\nC : Type u_2\ninst✝² : Category.{u_3, u_2} C\ninst✝¹ : Precoherent C\nX✝ W X : C\nα : Type\ninst✝ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nH : EffectiveEpiFamily Y π\nh_colim : IsColimit (Presieve.cocone (Sieve.generate (Presieve.ofArrows Y π)).arrows)\nx : Presieve.FamilyOfElements (yoneda.obj W) (Presieve.ofArrows Y π)\nhx : Presieve.FamilyOfElements.Compatible x\nx_ext : Presieve.FamilyOfElements (yoneda.obj W) (Sieve.generate (Presieve.ofArrows Y π)).arrows :=\n  Presieve.FamilyOfElements.sieveExtend x\nhx_ext : Presieve.FamilyOfElements.Compatible (Presieve.FamilyOfElements.sieveExtend x)\nS : Sieve X := Sieve.generate (Presieve.ofArrows Y π)\nt : (yoneda.obj W).obj (Opposite.op X)\nt_amalg : Presieve.FamilyOfElements.IsAmalgamation x_ext t\nt_uniq :\n  ∀ (y : (yoneda.obj W).obj (Opposite.op X)), (fun t => Presieve.FamilyOfElements.IsAmalgamation x_ext t) y → y = t\n⊢ ∀ (y : (yoneda.obj W).obj (Opposite.op X)), (fun t => Presieve.FamilyOfElements.IsAmalgamation x t) y → y = t\n[PROOFSTEP]\nexact fun y hy ↦ t_uniq y <| Presieve.isAmalgamation_sieveExtend x y hy\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\n⊢ EffectiveEpiFamily (fun c => Y_n c.fst c.snd) fun c => π_n c.fst c.snd ≫ π c.fst\n[PROOFSTEP]\nrw [← Sieve.effectiveEpimorphic_family]\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\n⊢ Presieve.EffectiveEpimorphic (Presieve.ofArrows (fun c => Y_n c.fst c.snd) fun c => π_n c.fst c.snd ≫ π c.fst)\n[PROOFSTEP]\nsuffices h₂ :\n  (Sieve.generate (Presieve.ofArrows (fun (⟨a, b⟩ : Σ _, β _) => Y_n a b) (fun ⟨a, b⟩ => π_n a b ≫ π a))) ∈\n    GrothendieckTopology.sieves (coherentTopology C) X\n  by\n  change Nonempty _\n  rw [← Sieve.forallYonedaIsSheaf_iff_colimit]\n  exact fun W => coherentTopology.isSheaf_yoneda_obj W _ h₂\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh₂ :\n  Sieve.generate\n      (Presieve.ofArrows\n        (fun x =>\n          match x with\n          | { fst := a, snd := b } => Y_n a b)\n        fun x =>\n        match x with\n        | { fst := a, snd := b } => π_n a b ≫ π a) ∈\n    GrothendieckTopology.sieves (coherentTopology C) X\n⊢ Presieve.EffectiveEpimorphic (Presieve.ofArrows (fun c => Y_n c.fst c.snd) fun c => π_n c.fst c.snd ≫ π c.fst)\n[PROOFSTEP]\nchange Nonempty _\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh₂ :\n  Sieve.generate\n      (Presieve.ofArrows\n        (fun x =>\n          match x with\n          | { fst := a, snd := b } => Y_n a b)\n        fun x =>\n        match x with\n        | { fst := a, snd := b } => π_n a b ≫ π a) ∈\n    GrothendieckTopology.sieves (coherentTopology C) X\n⊢ Nonempty\n    (IsColimit\n      (Presieve.cocone\n        (Sieve.generate (Presieve.ofArrows (fun c => Y_n c.fst c.snd) fun c => π_n c.fst c.snd ≫ π c.fst)).arrows))\n[PROOFSTEP]\nrw [← Sieve.forallYonedaIsSheaf_iff_colimit]\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh₂ :\n  Sieve.generate\n      (Presieve.ofArrows\n        (fun x =>\n          match x with\n          | { fst := a, snd := b } => Y_n a b)\n        fun x =>\n        match x with\n        | { fst := a, snd := b } => π_n a b ≫ π a) ∈\n    GrothendieckTopology.sieves (coherentTopology C) X\n⊢ ∀ (W : C),\n    Presieve.IsSheafFor (yoneda.obj W)\n      (Sieve.generate (Presieve.ofArrows (fun c => Y_n c.fst c.snd) fun c => π_n c.fst c.snd ≫ π c.fst)).arrows\n[PROOFSTEP]\nexact fun W => coherentTopology.isSheaf_yoneda_obj W _ h₂\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\n⊢ Sieve.generate\n      (Presieve.ofArrows\n        (fun x =>\n          match x with\n          | { fst := a, snd := b } => Y_n a b)\n        fun x =>\n        match x with\n        | { fst := a, snd := b } => π_n a b ≫ π a) ∈\n    GrothendieckTopology.sieves (coherentTopology C) X\n[PROOFSTEP]\nlet h' := h\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : EffectiveEpiFamily Y π := h\n⊢ Sieve.generate\n      (Presieve.ofArrows\n        (fun x =>\n          match x with\n          | { fst := a, snd := b } => Y_n a b)\n        fun x =>\n        match x with\n        | { fst := a, snd := b } => π_n a b ≫ π a) ∈\n    GrothendieckTopology.sieves (coherentTopology C) X\n[PROOFSTEP]\nrw [← Sieve.effectiveEpimorphic_family] at h' \n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\n⊢ Sieve.generate\n      (Presieve.ofArrows\n        (fun x =>\n          match x with\n          | { fst := a, snd := b } => Y_n a b)\n        fun x =>\n        match x with\n        | { fst := a, snd := b } => π_n a b ≫ π a) ∈\n    GrothendieckTopology.sieves (coherentTopology C) X\n[PROOFSTEP]\nlet H' := H\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) := H\n⊢ Sieve.generate\n      (Presieve.ofArrows\n        (fun x =>\n          match x with\n          | { fst := a, snd := b } => Y_n a b)\n        fun x =>\n        match x with\n        | { fst := a, snd := b } => π_n a b ≫ π a) ∈\n    GrothendieckTopology.sieves (coherentTopology C) X\n[PROOFSTEP]\nconv at H' =>\n  intro a\n  rw [← Sieve.effectiveEpimorphic_family]\n    -- Show that a covering sieve is a colimit, which implies the original set of arrows is regular\n      -- epimorphic. We use the transitivity property of saturation\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) := H\n| ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\n[PROOFSTEP]\n  intro a\n  rw [← Sieve.effectiveEpimorphic_family]\n    -- Show that a covering sieve is a colimit, which implies the original set of arrows is regular\n      -- epimorphic. We use the transitivity property of saturation\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) := H\n| ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\n[PROOFSTEP]\n  intro a\n  rw [← Sieve.effectiveEpimorphic_family]\n    -- Show that a covering sieve is a colimit, which implies the original set of arrows is regular\n      -- epimorphic. We use the transitivity property of saturation\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) := H\n| ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\n[PROOFSTEP]\nintro a\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) := H\na : α\n| EffectiveEpiFamily (Y_n a) (π_n a)\n[PROOFSTEP]\nrw [← Sieve.effectiveEpimorphic_family]\n  -- Show that a covering sieve is a colimit, which implies the original set of arrows is regular\n    -- epimorphic. We use the transitivity property of saturation\n[GOAL]\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))\n⊢ Sieve.generate\n      (Presieve.ofArrows\n        (fun x =>\n          match x with\n          | { fst := a, snd := b } => Y_n a b)\n        fun x =>\n        match x with\n        | { fst := a, snd := b } => π_n a b ≫ π a) ∈\n    GrothendieckTopology.sieves (coherentTopology C) X\n[PROOFSTEP]\napply Coverage.saturate.transitive X (Sieve.generate (Presieve.ofArrows Y π))\n[GOAL]\ncase a\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))\n⊢ Coverage.saturate (coherentCoverage C) X (Sieve.generate (Presieve.ofArrows Y π))\n[PROOFSTEP]\napply Coverage.saturate.of\n[GOAL]\ncase a.hS\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))\n⊢ Presieve.ofArrows Y π ∈ Coverage.covering (coherentCoverage C) X\n[PROOFSTEP]\nuse α, inferInstance, Y, π\n[GOAL]\ncase a\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))\n⊢ ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ X⦄,\n    (Sieve.generate (Presieve.ofArrows Y π)).arrows f →\n      Coverage.saturate (coherentCoverage C) Y_1\n        (Sieve.pullback f\n          (Sieve.generate\n            (Presieve.ofArrows\n              (fun x =>\n                match x with\n                | { fst := a, snd := b } => Y_n a b)\n              fun x =>\n              match x with\n              | { fst := a, snd := b } => π_n a b ≫ π a)))\n[PROOFSTEP]\nintro V f ⟨Y₁, h, g, ⟨hY, hf⟩⟩\n[GOAL]\ncase a\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh✝ : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))\nV : C\nf : V ⟶ X\nY₁ : C\nh : V ⟶ Y₁\ng : Y₁ ⟶ X\nhY : Presieve.ofArrows Y π g\nhf : h ≫ g = f\n⊢ Coverage.saturate (coherentCoverage C) V\n    (Sieve.pullback f\n      (Sieve.generate\n        (Presieve.ofArrows\n          (fun x =>\n            match x with\n            | { fst := a, snd := b } => Y_n a b)\n          fun x =>\n          match x with\n          | { fst := a, snd := b } => π_n a b ≫ π a)))\n[PROOFSTEP]\nrw [← hf, Sieve.pullback_comp]\n[GOAL]\ncase a\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh✝ : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))\nV : C\nf : V ⟶ X\nY₁ : C\nh : V ⟶ Y₁\ng : Y₁ ⟶ X\nhY : Presieve.ofArrows Y π g\nhf : h ≫ g = f\n⊢ Coverage.saturate (coherentCoverage C) V\n    (Sieve.pullback h\n      (Sieve.pullback g\n        (Sieve.generate\n          (Presieve.ofArrows\n            (fun x =>\n              match x with\n              | { fst := a, snd := b } => Y_n a b)\n            fun x =>\n            match x with\n            | { fst := a, snd := b } => π_n a b ≫ π a))))\n[PROOFSTEP]\napply (coherentTopology C).pullback_stable'\n[GOAL]\ncase a.a\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh✝ : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))\nV : C\nf : V ⟶ X\nY₁ : C\nh : V ⟶ Y₁\ng : Y₁ ⟶ X\nhY : Presieve.ofArrows Y π g\nhf : h ≫ g = f\n⊢ Sieve.pullback g\n      (Sieve.generate\n        (Presieve.ofArrows\n          (fun x =>\n            match x with\n            | { fst := a, snd := b } => Y_n a b)\n          fun x =>\n          match x with\n          | { fst := a, snd := b } => π_n a b ≫ π a)) ∈\n    GrothendieckTopology.sieves (coherentTopology C) Y₁\n[PROOFSTEP]\napply coherentTopology.mem_sieves_of_hasEffectiveEpiFamily\n[GOAL]\ncase a.a.a\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY : α → C\nπ : (a : α) → Y a ⟶ X\nh✝ : EffectiveEpiFamily Y π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y π)\nH' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))\nV : C\nf : V ⟶ X\nY₁ : C\nh : V ⟶ Y₁\ng : Y₁ ⟶ X\nhY : Presieve.ofArrows Y π g\nhf : h ≫ g = f\n⊢ ∃ α_1 x Y_1 π_1,\n    EffectiveEpiFamily Y_1 π_1 ∧\n      ∀ (a : α_1),\n        (Sieve.pullback g\n              (Sieve.generate\n                (Presieve.ofArrows\n                  (fun x =>\n                    match x with\n                    | { fst := a, snd := b } => Y_n a b)\n                  fun x =>\n                  match x with\n                  | { fst := a, snd := b } => π_n a b ≫ π a))).arrows\n          (π_1 a)\n[PROOFSTEP]\nrcases hY with ⟨i⟩\n[GOAL]\ncase a.a.a.mk\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY✝ : α → C\nπ : (a : α) → Y✝ a ⟶ X\nh✝ : EffectiveEpiFamily Y✝ π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y✝ a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y✝ π)\nH' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))\nV : C\nf : V ⟶ X\nY : C\ni : α\nh : V ⟶ Y✝ i\nhf : h ≫ π i = f\n⊢ ∃ α_1 x Y π_1,\n    EffectiveEpiFamily Y π_1 ∧\n      ∀ (a : α_1),\n        (Sieve.pullback (π i)\n              (Sieve.generate\n                (Presieve.ofArrows\n                  (fun x =>\n                    match x with\n                    | { fst := a, snd := b } => Y_n a b)\n                  fun x =>\n                  match x with\n                  | { fst := a, snd := b } => π_n a b ≫ π a))).arrows\n          (π_1 a)\n[PROOFSTEP]\nuse β i, inferInstance, Y_n i, π_n i, H i\n[GOAL]\ncase right\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY✝ : α → C\nπ : (a : α) → Y✝ a ⟶ X\nh✝ : EffectiveEpiFamily Y✝ π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y✝ a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y✝ π)\nH' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))\nV : C\nf : V ⟶ X\nY : C\ni : α\nh : V ⟶ Y✝ i\nhf : h ≫ π i = f\n⊢ ∀ (a : β i),\n    (Sieve.pullback (π i)\n          (Sieve.generate\n            (Presieve.ofArrows\n              (fun x =>\n                match x with\n                | { fst := a, snd := b } => Y_n a b)\n              fun x =>\n              match x with\n              | { fst := a, snd := b } => π_n a b ≫ π a))).arrows\n      (π_n i a)\n[PROOFSTEP]\nintro b\n[GOAL]\ncase right\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY✝ : α → C\nπ : (a : α) → Y✝ a ⟶ X\nh✝ : EffectiveEpiFamily Y✝ π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y✝ a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y✝ π)\nH' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))\nV : C\nf : V ⟶ X\nY : C\ni : α\nh : V ⟶ Y✝ i\nhf : h ≫ π i = f\nb : β i\n⊢ (Sieve.pullback (π i)\n        (Sieve.generate\n          (Presieve.ofArrows\n            (fun x =>\n              match x with\n              | { fst := a, snd := b } => Y_n a b)\n            fun x =>\n            match x with\n            | { fst := a, snd := b } => π_n a b ≫ π a))).arrows\n    (π_n i b)\n[PROOFSTEP]\nuse Y_n i b, (𝟙 _), π_n i b ≫ π i, ⟨(⟨i, b⟩ : Σ (i : α), β i)⟩\n[GOAL]\ncase right\nC✝ : Type u_1\ninst✝⁴ : Category.{?u.13158, u_1} C✝\nC : Type u_2\ninst✝³ : Category.{u_3, u_2} C\ninst✝² : Precoherent C\nX : C\nα : Type\ninst✝¹ : Fintype α\nY✝ : α → C\nπ : (a : α) → Y✝ a ⟶ X\nh✝ : EffectiveEpiFamily Y✝ π\nβ : α → Type\ninst✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (b : β a) → Y_n a b ⟶ Y✝ a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a)\nh' : Presieve.EffectiveEpimorphic (Presieve.ofArrows Y✝ π)\nH' : ∀ (a : α), Presieve.EffectiveEpimorphic (Presieve.ofArrows (Y_n a) (π_n a))\nV : C\nf : V ⟶ X\nY : C\ni : α\nh : V ⟶ Y✝ i\nhf : h ≫ π i = f\nb : β i\n⊢ 𝟙 (Y_n i b) ≫ π_n i b ≫ π i = π_n i b ≫ π i\n[PROOFSTEP]\nexact Category.id_comp (π_n i b ≫ π i)\n[GOAL]\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\n⊢ S ∈ GrothendieckTopology.sieves (coherentTopology C) X ↔ ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\n⊢ S ∈ GrothendieckTopology.sieves (coherentTopology C) X → ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nh : S ∈ GrothendieckTopology.sieves (coherentTopology C) X\n⊢ ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)\n[PROOFSTEP]\ninduction' h with Y T hS Y Y R S _ _ a b\n[GOAL]\ncase mp.of\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nY : C\nT : Presieve Y\nhS : T ∈ Coverage.covering (coherentCoverage C) Y\n⊢ ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), (Sieve.generate T).arrows (π a)\n[PROOFSTEP]\nrcases hS with ⟨a, h, Y', π, h'⟩\n[GOAL]\ncase mp.of.intro.intro.intro.intro\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nY : C\nT : Presieve Y\na : Type\nh : Fintype a\nY' : a → C\nπ : (a : a) → Y' a ⟶ Y\nh' : T = Presieve.ofArrows Y' π ∧ EffectiveEpiFamily Y' π\n⊢ ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), (Sieve.generate T).arrows (π a)\n[PROOFSTEP]\nuse a, h, Y', π, by tauto\n[GOAL]\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nY : C\nT : Presieve Y\na : Type\nh : Fintype a\nY' : a → C\nπ : (a : a) → Y' a ⟶ Y\nh' : T = Presieve.ofArrows Y' π ∧ EffectiveEpiFamily Y' π\n⊢ EffectiveEpiFamily Y' π\n[PROOFSTEP]\ntauto\n[GOAL]\ncase right\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nY : C\nT : Presieve Y\na : Type\nh : Fintype a\nY' : a → C\nπ : (a : a) → Y' a ⟶ Y\nh' : T = Presieve.ofArrows Y' π ∧ EffectiveEpiFamily Y' π\n⊢ ∀ (a : a), (Sieve.generate T).arrows (π a)\n[PROOFSTEP]\nintro a'\n[GOAL]\ncase right\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nY : C\nT : Presieve Y\na : Type\nh : Fintype a\nY' : a → C\nπ : (a : a) → Y' a ⟶ Y\nh' : T = Presieve.ofArrows Y' π ∧ EffectiveEpiFamily Y' π\na' : a\n⊢ (Sieve.generate T).arrows (π a')\n[PROOFSTEP]\nrcases h' with ⟨rfl, _⟩\n[GOAL]\ncase right.intro\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nY : C\na : Type\nh : Fintype a\nY' : a → C\nπ : (a : a) → Y' a ⟶ Y\na' : a\nright✝ : EffectiveEpiFamily Y' π\n⊢ (Sieve.generate (Presieve.ofArrows Y' π)).arrows (π a')\n[PROOFSTEP]\nsimp only [Sieve.generate_apply]\n[GOAL]\ncase right.intro\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nY : C\na : Type\nh : Fintype a\nY' : a → C\nπ : (a : a) → Y' a ⟶ Y\na' : a\nright✝ : EffectiveEpiFamily Y' π\n⊢ ∃ Y_1 h g, Presieve.ofArrows Y' π g ∧ h ≫ g = π a'\n[PROOFSTEP]\nuse Y' a', 𝟙 Y' a', π a', Presieve.ofArrows.mk a'\n[GOAL]\ncase right\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nY : C\na : Type\nh : Fintype a\nY' : a → C\nπ : (a : a) → Y' a ⟶ Y\na' : a\nright✝ : EffectiveEpiFamily Y' π\n⊢ 𝟙 Y' a' ≫ π a' = π a'\n[PROOFSTEP]\napply Category.id_comp\n[GOAL]\ncase mp.top\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nY : C\n⊢ ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), ⊤.arrows (π a)\n[PROOFSTEP]\nuse Unit, Unit.fintype, fun _ => Y, fun _ => (𝟙 Y)\n[GOAL]\ncase h\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\nY : C\n⊢ (EffectiveEpiFamily (fun x => Y) fun x => 𝟙 Y) ∧ (Unit → ⊤.arrows (𝟙 Y))\n[PROOFSTEP]\ncases' S with arrows downward_closed\n[GOAL]\ncase h.mk\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX Y : C\narrows : Presieve X\ndownward_closed : ∀ {Y Z : C} {f : Y ⟶ X}, arrows f → ∀ (g : Z ⟶ Y), arrows (g ≫ f)\n⊢ (EffectiveEpiFamily (fun x => Y) fun x => 𝟙 Y) ∧ ∀ (a : Unit), ⊤.arrows ((fun x => 𝟙 Y) a)\n[PROOFSTEP]\nexact ⟨inferInstance, by simp only [Sieve.top_apply, forall_const]⟩\n[GOAL]\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX Y : C\narrows : Presieve X\ndownward_closed : ∀ {Y Z : C} {f : Y ⟶ X}, arrows f → ∀ (g : Z ⟶ Y), arrows (g ≫ f)\n⊢ ∀ (a : Unit), ⊤.arrows ((fun x => 𝟙 Y) a)\n[PROOFSTEP]\nsimp only [Sieve.top_apply, forall_const]\n[GOAL]\ncase mp.transitive\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS✝ : Sieve X\nY : C\nR S : Sieve Y\na✝¹ : Coverage.saturate (coherentCoverage C) Y R\na✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → Coverage.saturate (coherentCoverage C) Y_1 (Sieve.pullback f S)\na : ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), R.arrows (π a)\nb :\n  ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,\n    R.arrows f → ∃ α x Y_2 π, EffectiveEpiFamily Y_2 π ∧ ∀ (a : α), (Sieve.pullback f S).arrows (π a)\n⊢ ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), S.arrows (π a)\n[PROOFSTEP]\nrcases a with ⟨α, w, Y₁, π, ⟨h₁, h₂⟩⟩\n[GOAL]\ncase mp.transitive.intro.intro.intro.intro.intro\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS✝ : Sieve X\nY : C\nR S : Sieve Y\na✝¹ : Coverage.saturate (coherentCoverage C) Y R\na✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → Coverage.saturate (coherentCoverage C) Y_1 (Sieve.pullback f S)\nb :\n  ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,\n    R.arrows f → ∃ α x Y_2 π, EffectiveEpiFamily Y_2 π ∧ ∀ (a : α), (Sieve.pullback f S).arrows (π a)\nα : Type\nw : Fintype α\nY₁ : α → C\nπ : (a : α) → Y₁ a ⟶ Y\nh₁ : EffectiveEpiFamily Y₁ π\nh₂ : ∀ (a : α), R.arrows (π a)\n⊢ ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), S.arrows (π a)\n[PROOFSTEP]\nchoose β _ Y_n π_n H using fun a => b (h₂ a)\n[GOAL]\ncase mp.transitive.intro.intro.intro.intro.intro\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS✝ : Sieve X\nY : C\nR S : Sieve Y\na✝¹ : Coverage.saturate (coherentCoverage C) Y R\na✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → Coverage.saturate (coherentCoverage C) Y_1 (Sieve.pullback f S)\nb :\n  ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,\n    R.arrows f → ∃ α x Y_2 π, EffectiveEpiFamily Y_2 π ∧ ∀ (a : α), (Sieve.pullback f S).arrows (π a)\nα : Type\nw : Fintype α\nY₁ : α → C\nπ : (a : α) → Y₁ a ⟶ Y\nh₁ : EffectiveEpiFamily Y₁ π\nh₂ : ∀ (a : α), R.arrows (π a)\nβ : α → Type\nx✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (a_1 : β a) → Y_n a a_1 ⟶ Y₁ a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) ∧ ∀ (a_1 : β a), (Sieve.pullback (π a) S).arrows (π_n a a_1)\n⊢ ∃ α x Y_1 π, EffectiveEpiFamily Y_1 π ∧ ∀ (a : α), S.arrows (π a)\n[PROOFSTEP]\nuse(Σ a, β a), inferInstance, fun ⟨a, b⟩ => Y_n a b, fun ⟨a, b⟩ => (π_n a b) ≫ (π a)\n[GOAL]\ncase h\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS✝ : Sieve X\nY : C\nR S : Sieve Y\na✝¹ : Coverage.saturate (coherentCoverage C) Y R\na✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → Coverage.saturate (coherentCoverage C) Y_1 (Sieve.pullback f S)\nb :\n  ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,\n    R.arrows f → ∃ α x Y_2 π, EffectiveEpiFamily Y_2 π ∧ ∀ (a : α), (Sieve.pullback f S).arrows (π a)\nα : Type\nw : Fintype α\nY₁ : α → C\nπ : (a : α) → Y₁ a ⟶ Y\nh₁ : EffectiveEpiFamily Y₁ π\nh₂ : ∀ (a : α), R.arrows (π a)\nβ : α → Type\nx✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (a_1 : β a) → Y_n a a_1 ⟶ Y₁ a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) ∧ ∀ (a_1 : β a), (Sieve.pullback (π a) S).arrows (π_n a a_1)\n⊢ (EffectiveEpiFamily\n      (fun x =>\n        match x with\n        | { fst := a, snd := b } => Y_n a b)\n      fun x =>\n      match x with\n      | { fst := a, snd := b } => π_n a b ≫ π a) ∧\n    ∀ (a : (a : α) × β a),\n      S.arrows\n        (match a with\n        | { fst := a, snd := b } => π_n a b ≫ π a)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS✝ : Sieve X\nY : C\nR S : Sieve Y\na✝¹ : Coverage.saturate (coherentCoverage C) Y R\na✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → Coverage.saturate (coherentCoverage C) Y_1 (Sieve.pullback f S)\nb :\n  ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,\n    R.arrows f → ∃ α x Y_2 π, EffectiveEpiFamily Y_2 π ∧ ∀ (a : α), (Sieve.pullback f S).arrows (π a)\nα : Type\nw : Fintype α\nY₁ : α → C\nπ : (a : α) → Y₁ a ⟶ Y\nh₁ : EffectiveEpiFamily Y₁ π\nh₂ : ∀ (a : α), R.arrows (π a)\nβ : α → Type\nx✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (a_1 : β a) → Y_n a a_1 ⟶ Y₁ a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) ∧ ∀ (a_1 : β a), (Sieve.pullback (π a) S).arrows (π_n a a_1)\n⊢ EffectiveEpiFamily\n    (fun x =>\n      match x with\n      | { fst := a, snd := b } => Y_n a b)\n    fun x =>\n    match x with\n    | { fst := a, snd := b } => π_n a b ≫ π a\n[PROOFSTEP]\nexact EffectiveEpiFamily.transitive_of_finite _ h₁ _ (fun a => (H a).1)\n[GOAL]\ncase h.right\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS✝ : Sieve X\nY : C\nR S : Sieve Y\na✝¹ : Coverage.saturate (coherentCoverage C) Y R\na✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → Coverage.saturate (coherentCoverage C) Y_1 (Sieve.pullback f S)\nb :\n  ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄,\n    R.arrows f → ∃ α x Y_2 π, EffectiveEpiFamily Y_2 π ∧ ∀ (a : α), (Sieve.pullback f S).arrows (π a)\nα : Type\nw : Fintype α\nY₁ : α → C\nπ : (a : α) → Y₁ a ⟶ Y\nh₁ : EffectiveEpiFamily Y₁ π\nh₂ : ∀ (a : α), R.arrows (π a)\nβ : α → Type\nx✝ : (a : α) → Fintype (β a)\nY_n : (a : α) → β a → C\nπ_n : (a : α) → (a_1 : β a) → Y_n a a_1 ⟶ Y₁ a\nH : ∀ (a : α), EffectiveEpiFamily (Y_n a) (π_n a) ∧ ∀ (a_1 : β a), (Sieve.pullback (π a) S).arrows (π_n a a_1)\n⊢ ∀ (a : (a : α) × β a),\n    S.arrows\n      (match a with\n      | { fst := a, snd := b } => π_n a b ≫ π a)\n[PROOFSTEP]\nexact fun c => (H c.fst).2 c.snd\n[GOAL]\ncase mpr\nC✝ : Type u_1\ninst✝² : Category.{?u.18072, u_1} C✝\nC : Type u_2\ninst✝¹ : Category.{u_3, u_2} C\ninst✝ : Precoherent C\nX : C\nS : Sieve X\n⊢ (∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)) →\n    S ∈ GrothendieckTopology.sieves (coherentTopology C) X\n[PROOFSTEP]\nexact coherentTopology.mem_sieves_of_hasEffectiveEpiFamily S\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sites.Coherent", "llama_tokens": 26556, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7122321720225278, "lm_q2_score": 0.49218813572079556, "lm_q1q2_score": 0.3505522249481409}}
{"text": "[GOAL]\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nf : C(X, Mˣ)\n⊢ (fun f =>\n        mk fun x =>\n          { val := ↑↑f x, inv := ↑↑f⁻¹ x, val_inv := (_ : ↑(↑f * ↑f⁻¹) x = ↑1 x),\n            inv_val := (_ : ↑(↑f⁻¹ * ↑f) x = ↑1 x) })\n      ((fun f =>\n          { val := mk fun x => ↑(↑f x), inv := mk fun x => ↑(↑f x)⁻¹,\n            val_inv := (_ : ((mk fun x => ↑(↑f x)) * mk fun x => ↑(↑f x)⁻¹) = 1),\n            inv_val := (_ : ((mk fun x => ↑(↑f x)⁻¹) * mk fun x => ↑(↑f x)) = 1) })\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nf : C(X, Mˣ)\na✝ : X\n⊢ ↑(↑((fun f =>\n              mk fun x =>\n                { val := ↑↑f x, inv := ↑↑f⁻¹ x, val_inv := (_ : ↑(↑f * ↑f⁻¹) x = ↑1 x),\n                  inv_val := (_ : ↑(↑f⁻¹ * ↑f) x = ↑1 x) })\n            ((fun f =>\n                { val := mk fun x => ↑(↑f x), inv := mk fun x => ↑(↑f x)⁻¹,\n                  val_inv := (_ : ((mk fun x => ↑(↑f x)) * mk fun x => ↑(↑f x)⁻¹) = 1),\n                  inv_val := (_ : ((mk fun x => ↑(↑f x)⁻¹) * mk fun x => ↑(↑f x)) = 1) })\n              f))\n        a✝) =\n    ↑(↑f a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nf : C(X, M)ˣ\n⊢ (fun f =>\n        { val := mk fun x => ↑(↑f x), inv := mk fun x => ↑(↑f x)⁻¹,\n          val_inv := (_ : ((mk fun x => ↑(↑f x)) * mk fun x => ↑(↑f x)⁻¹) = 1),\n          inv_val := (_ : ((mk fun x => ↑(↑f x)⁻¹) * mk fun x => ↑(↑f x)) = 1) })\n      ((fun f =>\n          mk fun x =>\n            { val := ↑↑f x, inv := ↑↑f⁻¹ x, val_inv := (_ : ↑(↑f * ↑f⁻¹) x = ↑1 x),\n              inv_val := (_ : ↑(↑f⁻¹ * ↑f) x = ↑1 x) })\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nf : C(X, M)ˣ\na✝ : X\n⊢ ↑↑((fun f =>\n              { val := mk fun x => ↑(↑f x), inv := mk fun x => ↑(↑f x)⁻¹,\n                val_inv := (_ : ((mk fun x => ↑(↑f x)) * mk fun x => ↑(↑f x)⁻¹) = 1),\n                inv_val := (_ : ((mk fun x => ↑(↑f x)⁻¹) * mk fun x => ↑(↑f x)) = 1) })\n            ((fun f =>\n                mk fun x =>\n                  { val := ↑↑f x, inv := ↑↑f⁻¹ x, val_inv := (_ : ↑(↑f * ↑f⁻¹) x = ↑1 x),\n                    inv_val := (_ : ↑(↑f⁻¹ * ↑f) x = ↑1 x) })\n              f))\n      a✝ =\n    ↑↑f a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : Monoid M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\nf : C(X, M)ˣ\nx : X\n⊢ ↑(↑(↑unitsLift.symm f) x)⁻¹ = ↑↑f⁻¹ x\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nf : C(X, R)\nh : ∀ (x : X), IsUnit (↑f x)\n⊢ Continuous fun x => IsUnit.unit (_ : IsUnit (↑f x))\n[PROOFSTEP]\nrefine'\n  continuous_induced_rng.2\n    (Continuous.prod_mk f.continuous (MulOpposite.continuous_op.comp (continuous_iff_continuousAt.mpr fun x => _)))\n[GOAL]\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nf : C(X, R)\nh : ∀ (x : X), IsUnit (↑f x)\nx : X\n⊢ ContinuousAt (fun x => ↑((fun x => IsUnit.unit (_ : IsUnit (↑f x))) x)⁻¹) x\n[PROOFSTEP]\nhave := NormedRing.inverse_continuousAt (h x).unit\n[GOAL]\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nf : C(X, R)\nh : ∀ (x : X), IsUnit (↑f x)\nx : X\nthis : ContinuousAt Ring.inverse ↑(IsUnit.unit (_ : IsUnit (↑f x)))\n⊢ ContinuousAt (fun x => ↑((fun x => IsUnit.unit (_ : IsUnit (↑f x))) x)⁻¹) x\n[PROOFSTEP]\nsimp only\n[GOAL]\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nf : C(X, R)\nh : ∀ (x : X), IsUnit (↑f x)\nx : X\nthis : ContinuousAt Ring.inverse ↑(IsUnit.unit (_ : IsUnit (↑f x)))\n⊢ ContinuousAt (fun x => ↑(IsUnit.unit (_ : IsUnit (↑f x)))⁻¹) x\n[PROOFSTEP]\nsimp only [← Ring.inverse_unit, IsUnit.unit_spec] at this ⊢\n[GOAL]\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nf : C(X, R)\nh : ∀ (x : X), IsUnit (↑f x)\nx : X\nthis : ContinuousAt Ring.inverse (↑f x)\n⊢ ContinuousAt (fun x => Ring.inverse (↑f x)) x\n[PROOFSTEP]\nexact this.comp (f.continuousAt x)\n[GOAL]\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nf : C(X, R)\nh : ∀ (x : X), IsUnit (↑f x)\n⊢ (mk fun x => ↑(↑(unitsOfForallIsUnit h) x)) = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nf : C(X, R)\nh : ∀ (x : X), IsUnit (↑f x)\na✝ : X\n⊢ ↑(mk fun x => ↑(↑(unitsOfForallIsUnit h) x)) a✝ = ↑f a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nf : C(X, R)\nh : ∀ (x : X), IsUnit (↑f x)\n⊢ ↑(↑unitsLift (unitsOfForallIsUnit h)) = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : NormedRing R\ninst✝ : CompleteSpace R\nf : C(X, R)\nh : ∀ (x : X), IsUnit (↑f x)\na✝ : X\n⊢ ↑↑(↑unitsLift (unitsOfForallIsUnit h)) a✝ = ↑f a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nf : C(X, 𝕜)\n⊢ IsUnit f ↔ ∀ (x : X), ↑f x ≠ 0\n[PROOFSTEP]\nsimp_rw [f.isUnit_iff_forall_isUnit, isUnit_iff_ne_zero]\n[GOAL]\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nf : C(X, 𝕜)\n⊢ spectrum 𝕜 f = Set.range ↑f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nX : Type u_1\nM : Type u_2\nR : Type u_3\n𝕜 : Type u_4\ninst✝² : TopologicalSpace X\ninst✝¹ : NormedField 𝕜\ninst✝ : CompleteSpace 𝕜\nf : C(X, 𝕜)\nx : 𝕜\n⊢ x ∈ spectrum 𝕜 f ↔ x ∈ Set.range ↑f\n[PROOFSTEP]\nsimp only [spectrum.mem_iff, isUnit_iff_forall_ne_zero, not_forall, coe_sub, Pi.sub_apply, algebraMap_apply,\n  Algebra.id.smul_eq_mul, mul_one, Classical.not_not, Set.mem_range, sub_eq_zero, @eq_comm _ x _]\n", "meta": {"mathlib_filename": "Mathlib.Topology.ContinuousFunction.Units", "llama_tokens": 3231, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.640635854839898, "lm_q2_score": 0.5467381519846138, "lm_q1q2_score": 0.3502600633702492}}
{"text": "[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRoot S f\nx : R\n⊢ ↑(algebraMap R S) x = ↑h.map (↑C x)\n[PROOFSTEP]\nrw [h.algebraMap_eq, RingHom.comp_apply]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRoot S f\np : R[X]\n⊢ p ∈ RingHom.ker h.map ↔ f ∣ p\n[PROOFSTEP]\nrw [h.ker_map, Ideal.mem_span_singleton]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRoot S f\np : R[X]\n⊢ ↑h.map p = 0 ↔ f ∣ p\n[PROOFSTEP]\nrw [← h.mem_ker_map, RingHom.mem_ker]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRoot S f\np : R[X]\nx : R\n⊢ ↑(aeval (root h)) (↑C x) = ↑h.map (↑C x)\n[PROOFSTEP]\nrw [aeval_C, h.algebraMap_apply]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRoot S f\np✝ p q : R[X]\nihp : ↑(aeval (root h)) p = ↑h.map p\nihq : ↑(aeval (root h)) q = ↑h.map q\n⊢ ↑(aeval (root h)) (p + q) = ↑h.map (p + q)\n[PROOFSTEP]\nrw [AlgHom.map_add, RingHom.map_add, ihp, ihq]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRoot S f\np : R[X]\nn : ℕ\nx : R\nx✝ : ↑(aeval (root h)) (↑C x * X ^ n) = ↑h.map (↑C x * X ^ n)\n⊢ ↑(aeval (root h)) (↑C x * X ^ (n + 1)) = ↑h.map (↑C x * X ^ (n + 1))\n[PROOFSTEP]\nrw [AlgHom.map_mul, aeval_C, AlgHom.map_pow, aeval_X, RingHom.map_mul, ← h.algebraMap_apply, RingHom.map_pow, map_X]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRoot S f\n⊢ ↑(aeval (root h)) f = 0\n[PROOFSTEP]\nrw [aeval_eq, map_self]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRoot S f\n⊢ repr h 0 ∈ Ideal.span {f}\n[PROOFSTEP]\nrw [← h.ker_map, RingHom.mem_ker, h.map_repr]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRoot S f\nx y : S\n⊢ repr h (x + y) - (repr h x + repr h y) ∈ Ideal.span {f}\n[PROOFSTEP]\nrw [← h.ker_map, RingHom.mem_ker, map_sub, h.map_repr, map_add, h.map_repr, h.map_repr, sub_self]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh h' : IsAdjoinRoot S f\neq : ∀ (x : R[X]), ↑h.map x = ↑h'.map x\n⊢ h = h'\n[PROOFSTEP]\ncases h\n[GOAL]\ncase mk\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh' : IsAdjoinRoot S f\nmap✝ : R[X] →+* S\nmap_surjective✝ : Function.Surjective ↑map✝\nker_map✝ : RingHom.ker map✝ = Ideal.span {f}\nalgebraMap_eq✝ : algebraMap R S = RingHom.comp map✝ C\neq :\n  ∀ (x : R[X]),\n    ↑{ map := map✝, map_surjective := map_surjective✝, ker_map := ker_map✝, algebraMap_eq := algebraMap_eq✝ }.map x =\n      ↑h'.map x\n⊢ { map := map✝, map_surjective := map_surjective✝, ker_map := ker_map✝, algebraMap_eq := algebraMap_eq✝ } = h'\n[PROOFSTEP]\ncases h'\n[GOAL]\ncase mk.mk\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nmap✝¹ : R[X] →+* S\nmap_surjective✝¹ : Function.Surjective ↑map✝¹\nker_map✝¹ : RingHom.ker map✝¹ = Ideal.span {f}\nalgebraMap_eq✝¹ : algebraMap R S = RingHom.comp map✝¹ C\nmap✝ : R[X] →+* S\nmap_surjective✝ : Function.Surjective ↑map✝\nker_map✝ : RingHom.ker map✝ = Ideal.span {f}\nalgebraMap_eq✝ : algebraMap R S = RingHom.comp map✝ C\neq :\n  ∀ (x : R[X]),\n    ↑{ map := map✝¹, map_surjective := map_surjective✝¹, ker_map := ker_map✝¹, algebraMap_eq := algebraMap_eq✝¹ }.map\n        x =\n      ↑{ map := map✝, map_surjective := map_surjective✝, ker_map := ker_map✝, algebraMap_eq := algebraMap_eq✝ }.map x\n⊢ { map := map✝¹, map_surjective := map_surjective✝¹, ker_map := ker_map✝¹, algebraMap_eq := algebraMap_eq✝¹ } =\n    { map := map✝, map_surjective := map_surjective✝, ker_map := ker_map✝, algebraMap_eq := algebraMap_eq✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_map\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nmap✝¹ : R[X] →+* S\nmap_surjective✝¹ : Function.Surjective ↑map✝¹\nker_map✝¹ : RingHom.ker map✝¹ = Ideal.span {f}\nalgebraMap_eq✝¹ : algebraMap R S = RingHom.comp map✝¹ C\nmap✝ : R[X] →+* S\nmap_surjective✝ : Function.Surjective ↑map✝\nker_map✝ : RingHom.ker map✝ = Ideal.span {f}\nalgebraMap_eq✝ : algebraMap R S = RingHom.comp map✝ C\neq :\n  ∀ (x : R[X]),\n    ↑{ map := map✝¹, map_surjective := map_surjective✝¹, ker_map := ker_map✝¹, algebraMap_eq := algebraMap_eq✝¹ }.map\n        x =\n      ↑{ map := map✝, map_surjective := map_surjective✝, ker_map := ker_map✝, algebraMap_eq := algebraMap_eq✝ }.map x\n⊢ map✝¹ = map✝\n[PROOFSTEP]\nexact RingHom.ext eq\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh h' : IsAdjoinRoot S f\neq : root h = root h'\nx : R[X]\n⊢ ↑h.map x = ↑h'.map x\n[PROOFSTEP]\nrw [← h.aeval_eq, ← h'.aeval_eq, eq]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\nz : S\nw : R[X]\nhzw : ↑h.map w = z\n⊢ eval₂ i x (repr h z) = eval₂ i x w\n[PROOFSTEP]\nrw [eq_comm, ← sub_eq_zero, ← h.map_repr z, ← map_sub, h.map_eq_zero_iff] at hzw \n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\nz : S\nw : R[X]\nhzw✝ : z = ↑h.map w\nhzw : f ∣ repr h z - w\n⊢ eval₂ i x (repr h z) = eval₂ i x w\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := hzw\n[GOAL]\ncase intro\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\nz : S\nw : R[X]\nhzw : z = ↑h.map w\ny : R[X]\nhy : repr h z - w = f * y\n⊢ eval₂ i x (repr h z) = eval₂ i x w\n[PROOFSTEP]\nrw [← sub_eq_zero, ← eval₂_sub, hy, eval₂_mul, hx, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\n⊢ (fun z => eval₂ i x (repr h z)) 1 = 1\n[PROOFSTEP]\ndsimp only\n  -- Porting note: added\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\n⊢ eval₂ i x (repr h 1) = 1\n[PROOFSTEP]\nrw [h.eval₂_repr_eq_eval₂_of_map_eq hx _ _ (map_one _), eval₂_one]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\nz w : S\n⊢ OneHom.toFun { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n      (z * w) =\n    OneHom.toFun { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) } z *\n      OneHom.toFun { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) } w\n[PROOFSTEP]\ndsimp only\n  -- Porting note: added\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\nz w : S\n⊢ eval₂ i x (repr h (z * w)) = eval₂ i x (repr h z) * eval₂ i x (repr h w)\n[PROOFSTEP]\nrw [h.eval₂_repr_eq_eval₂_of_map_eq hx _ (h.repr z * h.repr w), eval₂_mul]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\nz w : S\n⊢ ↑h.map (repr h z * repr h w) = z * w\n[PROOFSTEP]\nrw [map_mul, map_repr, map_repr]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (z w : S),\n                OneHom.toFun\n                    { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                    (z * w) =\n                  OneHom.toFun\n                      { toFun := fun z => eval₂ i x (repr h z),\n                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                      z *\n                    OneHom.toFun\n                      { toFun := fun z => eval₂ i x (repr h z),\n                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                      w) })\n      0 =\n    0\n[PROOFSTEP]\ndsimp only\n  -- Porting note: added\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\n⊢ eval₂ i x (repr h 0) = 0\n[PROOFSTEP]\nrw [h.eval₂_repr_eq_eval₂_of_map_eq hx _ _ (map_zero _), eval₂_zero]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\nz w : S\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (z w : S),\n                OneHom.toFun\n                    { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                    (z * w) =\n                  OneHom.toFun\n                      { toFun := fun z => eval₂ i x (repr h z),\n                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                      z *\n                    OneHom.toFun\n                      { toFun := fun z => eval₂ i x (repr h z),\n                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                      w) })\n      (z + w) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (z w : S),\n                  OneHom.toFun\n                      { toFun := fun z => eval₂ i x (repr h z),\n                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                      (z * w) =\n                    OneHom.toFun\n                        { toFun := fun z => eval₂ i x (repr h z),\n                          map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                        z *\n                      OneHom.toFun\n                        { toFun := fun z => eval₂ i x (repr h z),\n                          map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                        w) })\n        z +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (z w : S),\n                  OneHom.toFun\n                      { toFun := fun z => eval₂ i x (repr h z),\n                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                      (z * w) =\n                    OneHom.toFun\n                        { toFun := fun z => eval₂ i x (repr h z),\n                          map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                        z *\n                      OneHom.toFun\n                        { toFun := fun z => eval₂ i x (repr h z),\n                          map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                        w) })\n        w\n[PROOFSTEP]\ndsimp only\n  -- Porting note: added\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\nz w : S\n⊢ eval₂ i x (repr h (z + w)) = eval₂ i x (repr h z) + eval₂ i x (repr h w)\n[PROOFSTEP]\nrw [h.eval₂_repr_eq_eval₂_of_map_eq hx _ (h.repr z + h.repr w), eval₂_add]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\nz w : S\n⊢ ↑h.map (repr h z + repr h w) = z + w\n[PROOFSTEP]\nrw [map_add, map_repr, map_repr]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\nz : R[X]\n⊢ ↑(lift i x hx h) (↑h.map z) = eval₂ i x z\n[PROOFSTEP]\nrw [lift, RingHom.coe_mk]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\nz : R[X]\n⊢ ↑{\n          toMonoidHom :=\n            {\n              toOneHom :=\n                { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (z w : S),\n                    OneHom.toFun\n                        { toFun := fun z => eval₂ i x (repr h z),\n                          map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                        (z * w) =\n                      OneHom.toFun\n                          { toFun := fun z => eval₂ i x (repr h z),\n                            map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                          z *\n                        OneHom.toFun\n                          { toFun := fun z => eval₂ i x (repr h z),\n                            map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                          w) },\n          map_zero' :=\n            (_ :\n              OneHom.toFun\n                  (↑{\n                      toOneHom :=\n                        { toFun := fun z => eval₂ i x (repr h z),\n                          map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) },\n                      map_mul' :=\n                        (_ :\n                          ∀ (z w : S),\n                            OneHom.toFun\n                                { toFun := fun z => eval₂ i x (repr h z),\n                                  map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                                (z * w) =\n                              OneHom.toFun\n                                  { toFun := fun z => eval₂ i x (repr h z),\n                                    map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                                  z *\n                                OneHom.toFun\n                                  { toFun := fun z => eval₂ i x (repr h z),\n                                    map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                                  w) })\n                  0 =\n                0),\n          map_add' :=\n            (_ :\n              ∀ (z w : S),\n                OneHom.toFun\n                    (↑{\n                        toOneHom :=\n                          { toFun := fun z => eval₂ i x (repr h z),\n                            map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (z w : S),\n                              OneHom.toFun\n                                  { toFun := fun z => eval₂ i x (repr h z),\n                                    map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                                  (z * w) =\n                                OneHom.toFun\n                                    { toFun := fun z => eval₂ i x (repr h z),\n                                      map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                                    z *\n                                  OneHom.toFun\n                                    { toFun := fun z => eval₂ i x (repr h z),\n                                      map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                                    w) })\n                    (z + w) =\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun z => eval₂ i x (repr h z),\n                              map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (z w : S),\n                                OneHom.toFun\n                                    { toFun := fun z => eval₂ i x (repr h z),\n                                      map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                                    (z * w) =\n                                  OneHom.toFun\n                                      { toFun := fun z => eval₂ i x (repr h z),\n                                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                                      z *\n                                    OneHom.toFun\n                                      { toFun := fun z => eval₂ i x (repr h z),\n                                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                                      w) })\n                      z +\n                    OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun z => eval₂ i x (repr h z),\n                              map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (z w : S),\n                                OneHom.toFun\n                                    { toFun := fun z => eval₂ i x (repr h z),\n                                      map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                                    (z * w) =\n                                  OneHom.toFun\n                                      { toFun := fun z => eval₂ i x (repr h z),\n                                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                                      z *\n                                    OneHom.toFun\n                                      { toFun := fun z => eval₂ i x (repr h z),\n                                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }\n                                      w) })\n                      w) }\n      (↑↑h.1 z) =\n    eval₂ i x z\n[PROOFSTEP]\ndsimp\n  -- Porting note: added\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\nz : R[X]\n⊢ eval₂ i x (repr h (↑h.1 z)) = eval₂ i x z\n[PROOFSTEP]\nrw [h.eval₂_repr_eq_eval₂_of_map_eq hx _ _ rfl]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\n⊢ ↑(lift i x hx h) (root h) = x\n[PROOFSTEP]\nrw [← h.map_X, lift_map, eval₂_X]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\na : R\n⊢ ↑(lift i x hx h) (↑(algebraMap R S) a) = ↑i a\n[PROOFSTEP]\nrw [h.algebraMap_apply, lift_map, eval₂_C]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\ng : S →+* T\nhmap : ∀ (a : R), ↑g (↑(algebraMap R S) a) = ↑i a\nhroot : ↑g (root h) = x\na : S\n⊢ ↑g a = ↑(lift i x hx h) a\n[PROOFSTEP]\nrw [← h.map_repr a, Polynomial.as_sum_range_C_mul_X_pow (h.repr a)]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\nT : Type u_1\ninst✝ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\nh : IsAdjoinRoot S f\ng : S →+* T\nhmap : ∀ (a : R), ↑g (↑(algebraMap R S) a) = ↑i a\nhroot : ↑g (root h) = x\na : S\n⊢ ↑g (↑h.map (Finset.sum (Finset.range (natDegree (repr h a) + 1)) fun i => ↑C (coeff (repr h a) i) * X ^ i)) =\n    ↑(lift i x hx h)\n      (↑h.map (Finset.sum (Finset.range (natDegree (repr h a) + 1)) fun i => ↑C (coeff (repr h a) i) * X ^ i))\n[PROOFSTEP]\nsimp only [map_sum, map_mul, map_pow, h.map_X, hroot, ← h.algebraMap_apply, hmap, lift_root, lift_algebraMap]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\nf : R[X]\ninst✝² : Algebra R S\nT : Type u_1\ninst✝¹ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\ninst✝ : Algebra R T\nhx' : ↑(aeval x) f = 0\nh : IsAdjoinRoot S f\nz : R[X]\n⊢ ↑(liftHom x hx' h) (↑h.map z) = ↑(aeval x) z\n[PROOFSTEP]\nrw [← lift_algebraMap_apply, lift_map, aeval_def]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\nf : R[X]\ninst✝² : Algebra R S\nT : Type u_1\ninst✝¹ : CommRing T\ni : R →+* T\nx : T\nhx : eval₂ i x f = 0\ninst✝ : Algebra R T\nhx' : ↑(aeval x) f = 0\nh : IsAdjoinRoot S f\n⊢ ↑(liftHom x hx' h) (root h) = x\n[PROOFSTEP]\nrw [← lift_algebraMap_apply, lift_root]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\n⊢ RingHom.ker (mk f) = Ideal.span {f}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nx✝ : R[X]\n⊢ x✝ ∈ RingHom.ker (mk f) ↔ x✝ ∈ Ideal.span {f}\n[PROOFSTEP]\nrw [RingHom.mem_ker, ← @AdjoinRoot.mk_self _ _ f, AdjoinRoot.mk_eq_mk, Ideal.mem_span_singleton, ←\n  dvd_add_left (dvd_refl f), sub_add_cancel]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\n⊢ IsAdjoinRoot.root (AdjoinRoot.isAdjoinRoot f) = root f\n[PROOFSTEP]\nsimp only [IsAdjoinRoot.root, AdjoinRoot.root, AdjoinRoot.isAdjoinRoot_map_eq_mk]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nhf : Monic f\n⊢ IsAdjoinRoot.root (AdjoinRoot.isAdjoinRootMonic f hf).toIsAdjoinRoot = root f\n[PROOFSTEP]\nsimp only [IsAdjoinRoot.root, AdjoinRoot.root, AdjoinRoot.isAdjoinRootMonic_map_eq_mk]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : R[X]\n⊢ ↑h.map (g %ₘ f) = ↑h.map g\n[PROOFSTEP]\nrw [← RingHom.sub_mem_ker_iff, mem_ker_map, modByMonic_eq_sub_mul_div _ h.Monic, sub_right_comm, sub_self, zero_sub,\n  dvd_neg]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : R[X]\n⊢ f ∣ f * (g /ₘ f)\n[PROOFSTEP]\nexact ⟨_, rfl⟩\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : R[X]\n⊢ f ∣ IsAdjoinRoot.repr h.toIsAdjoinRoot (↑h.map g) - g\n[PROOFSTEP]\nrw [← h.mem_ker_map, RingHom.sub_mem_ker_iff, map_repr]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx y : S\n⊢ (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y) =\n    (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) x + (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) y\n[PROOFSTEP]\nconv_lhs =>\n  rw [← h.map_repr x, ← h.map_repr y, ← map_add]\n  dsimp only\n    -- Porting note: added\n  rw [h.modByMonic_repr_map, add_modByMonic]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx y : S\n| (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y)\n[PROOFSTEP]\n  rw [← h.map_repr x, ← h.map_repr y, ← map_add]\n  dsimp only\n    -- Porting note: added\n  rw [h.modByMonic_repr_map, add_modByMonic]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx y : S\n| (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y)\n[PROOFSTEP]\n  rw [← h.map_repr x, ← h.map_repr y, ← map_add]\n  dsimp only\n    -- Porting note: added\n  rw [h.modByMonic_repr_map, add_modByMonic]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx y : S\n| (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y)\n[PROOFSTEP]\nrw [← h.map_repr x, ← h.map_repr y, ← map_add]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx y : S\n| (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f)\n    (↑h.map (IsAdjoinRoot.repr h.toIsAdjoinRoot x + IsAdjoinRoot.repr h.toIsAdjoinRoot y))\n[PROOFSTEP]\ndsimp only\n  -- Porting note: added\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx y : S\n| IsAdjoinRoot.repr h.toIsAdjoinRoot\n      (↑h.map (IsAdjoinRoot.repr h.toIsAdjoinRoot x + IsAdjoinRoot.repr h.toIsAdjoinRoot y)) %ₘ\n    f\n[PROOFSTEP]\nrw [h.modByMonic_repr_map, add_modByMonic]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nc : R\nx : S\n⊢ AddHom.toFun\n      { toFun := fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f,\n        map_add' :=\n          (_ :\n            ∀ (x y : S),\n              (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y) =\n                (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) x +\n                  (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) y) }\n      (c • x) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f,\n          map_add' :=\n            (_ :\n              ∀ (x y : S),\n                (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y) =\n                  (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) x +\n                    (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) y) }\n        x\n[PROOFSTEP]\nrw [RingHom.id_apply, ← h.map_repr x, Algebra.smul_def, h.algebraMap_apply, ← map_mul]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nc : R\nx : S\n⊢ AddHom.toFun\n      { toFun := fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f,\n        map_add' :=\n          (_ :\n            ∀ (x y : S),\n              (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y) =\n                (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) x +\n                  (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) y) }\n      (↑h.map (↑C c * IsAdjoinRoot.repr h.toIsAdjoinRoot x)) =\n    c •\n      AddHom.toFun\n        { toFun := fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f,\n          map_add' :=\n            (_ :\n              ∀ (x y : S),\n                (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y) =\n                  (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) x +\n                    (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) y) }\n        (↑h.map (IsAdjoinRoot.repr h.toIsAdjoinRoot x))\n[PROOFSTEP]\ndsimp only\n  -- Porting note: added\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nc : R\nx : S\n⊢ IsAdjoinRoot.repr h.toIsAdjoinRoot (↑h.map (↑C c * IsAdjoinRoot.repr h.toIsAdjoinRoot x)) %ₘ f =\n    c • (IsAdjoinRoot.repr h.toIsAdjoinRoot (↑h.map (IsAdjoinRoot.repr h.toIsAdjoinRoot x)) %ₘ f)\n[PROOFSTEP]\nrw [h.modByMonic_repr_map, ← smul_eq_C_mul, smul_modByMonic, h.map_repr]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\n⊢ ↑h.map (↑(modByMonicHom h) x) = x\n[PROOFSTEP]\nrw [modByMonicHom, LinearMap.coe_mk]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\n⊢ ↑h.map\n      (↑{ toFun := fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f,\n            map_add' :=\n              (_ :\n                ∀ (x y : S),\n                  (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y) =\n                    (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) x +\n                      (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) y) }\n        x) =\n    x\n[PROOFSTEP]\ndsimp\n  -- Porting note: added\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\n⊢ ↑h.map (IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) = x\n[PROOFSTEP]\nrw [map_modByMonic, map_repr]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\nhdeg : n < natDegree f\n⊢ ↑(modByMonicHom h) (root h.toIsAdjoinRoot ^ n) = X ^ n\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\nhdeg : n < natDegree f\n✝ : Nontrivial R\n⊢ ↑(modByMonicHom h) (root h.toIsAdjoinRoot ^ n) = X ^ n\n[PROOFSTEP]\nrw [← h.map_X, ← map_pow, modByMonicHom_map, modByMonic_eq_self_iff h.Monic, degree_X_pow]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\nhdeg : n < natDegree f\n✝ : Nontrivial R\n⊢ ↑n < degree f\n[PROOFSTEP]\ncontrapose! hdeg\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\n✝ : Nontrivial R\nhdeg : degree f ≤ ↑n\n⊢ natDegree f ≤ n\n[PROOFSTEP]\nsimpa [natDegree_le_iff_degree_le] using hdeg\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nhdeg : 1 < natDegree f\n⊢ ↑(modByMonicHom h) (root h.toIsAdjoinRoot) = X\n[PROOFSTEP]\nsimpa using modByMonicHom_root_pow h hdeg\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx y : S\n⊢ (fun x =>\n        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n          (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n      (x + y) =\n    (fun x =>\n          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n            (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n        x +\n      (fun x =>\n          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n            (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n        y\n[PROOFSTEP]\ndsimp only\n  -- Porting note: added\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx y : S\n⊢ Finsupp.comapDomain Fin.val (↑(modByMonicHom h) (x + y)).toFinsupp\n      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) (x + y)).toFinsupp.support)) =\n    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)) +\n      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) y).toFinsupp\n        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) y).toFinsupp.support))\n[PROOFSTEP]\nrw [map_add, toFinsupp_add, Finsupp.comapDomain_add_of_injective Fin.val_injective]\n  -- Porting note: the original simp proof with the same lemmas does not work\n        -- See https://github.com/leanprover-community/mathlib4/issues/5026\n        -- simp only [map_add, Finsupp.comapDomain_add_of_injective Fin.val_injective, toFinsupp_add]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nc : R\nx : S\n⊢ AddHom.toFun\n      {\n        toFun := fun x =>\n          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n            (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n        map_add' :=\n          (_ :\n            ∀ (x y : S),\n              (fun x =>\n                    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                  (x + y) =\n                (fun x =>\n                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                    x +\n                  (fun x =>\n                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                    y) }\n      (c • x) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        {\n          toFun := fun x =>\n            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n          map_add' :=\n            (_ :\n              ∀ (x y : S),\n                (fun x =>\n                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                    (x + y) =\n                  (fun x =>\n                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                          (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                      x +\n                    (fun x =>\n                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                          (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                      y) }\n        x\n[PROOFSTEP]\ndsimp only\n  -- Porting note: added\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nc : R\nx : S\n⊢ Finsupp.comapDomain Fin.val (↑(modByMonicHom h) (c • x)).toFinsupp\n      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) (c • x)).toFinsupp.support)) =\n    ↑(RingHom.id R) c •\n      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support))\n[PROOFSTEP]\nrw [map_smul, toFinsupp_smul, Finsupp.comapDomain_smul_of_injective Fin.val_injective, RingHom.id_apply]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\n⊢ (fun g => ↑h.map { toFinsupp := Finsupp.mapDomain (?m.1376551 h g) g })\n      (AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun x =>\n                  Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                    (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : S),\n                      (fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                          (x + y) =\n                        (fun x =>\n                              Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                            x +\n                          (fun x =>\n                              Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                            y) },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (x : S),\n                  AddHom.toFun\n                      {\n                        toFun := fun x =>\n                          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                            (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : S),\n                              (fun x =>\n                                    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                  (x + y) =\n                                (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    x +\n                                  (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    y) }\n                      (c • x) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        {\n                          toFun := fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : S),\n                                (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    (x + y) =\n                                  (fun x =>\n                                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                          (_ :\n                                            Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                      x +\n                                    (fun x =>\n                                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                          (_ :\n                                            Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                      y) }\n                        x) }.toAddHom\n        x) =\n    x\n[PROOFSTEP]\ncases subsingleton_or_nontrivial R\n[GOAL]\ncase inl\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Subsingleton R\n⊢ (fun g => ↑h.map { toFinsupp := Finsupp.mapDomain (?m.1376551 h g) g })\n      (AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun x =>\n                  Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                    (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : S),\n                      (fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                          (x + y) =\n                        (fun x =>\n                              Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                            x +\n                          (fun x =>\n                              Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                            y) },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (x : S),\n                  AddHom.toFun\n                      {\n                        toFun := fun x =>\n                          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                            (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : S),\n                              (fun x =>\n                                    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                  (x + y) =\n                                (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    x +\n                                  (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    y) }\n                      (c • x) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        {\n                          toFun := fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : S),\n                                (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    (x + y) =\n                                  (fun x =>\n                                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                          (_ :\n                                            Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                      x +\n                                    (fun x =>\n                                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                          (_ :\n                                            Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                      y) }\n                        x) }.toAddHom\n        x) =\n    x\n[PROOFSTEP]\nhaveI := h.subsingleton\n[GOAL]\ncase inl\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Subsingleton R\nthis : Subsingleton S\n⊢ (fun g => ↑h.map { toFinsupp := Finsupp.mapDomain (?m.1376551 h g) g })\n      (AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun x =>\n                  Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                    (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : S),\n                      (fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                          (x + y) =\n                        (fun x =>\n                              Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                            x +\n                          (fun x =>\n                              Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                            y) },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (x : S),\n                  AddHom.toFun\n                      {\n                        toFun := fun x =>\n                          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                            (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : S),\n                              (fun x =>\n                                    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                  (x + y) =\n                                (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    x +\n                                  (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    y) }\n                      (c • x) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        {\n                          toFun := fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : S),\n                                (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    (x + y) =\n                                  (fun x =>\n                                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                          (_ :\n                                            Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                      x +\n                                    (fun x =>\n                                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                          (_ :\n                                            Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                      y) }\n                        x) }.toAddHom\n        x) =\n    x\n[PROOFSTEP]\nexact Subsingleton.elim _ _\n[GOAL]\ncase inr\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\n⊢ (fun g => ↑h.map { toFinsupp := Finsupp.mapDomain (?m.1376551 h g) g })\n      (AddHom.toFun\n        {\n            toAddHom :=\n              {\n                toFun := fun x =>\n                  Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                    (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : S),\n                      (fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                          (x + y) =\n                        (fun x =>\n                              Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                            x +\n                          (fun x =>\n                              Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                            y) },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (x : S),\n                  AddHom.toFun\n                      {\n                        toFun := fun x =>\n                          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                            (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : S),\n                              (fun x =>\n                                    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                  (x + y) =\n                                (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    x +\n                                  (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    y) }\n                      (c • x) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        {\n                          toFun := fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : S),\n                                (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    (x + y) =\n                                  (fun x =>\n                                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                          (_ :\n                                            Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                      x +\n                                    (fun x =>\n                                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                          (_ :\n                                            Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                      y) }\n                        x) }.toAddHom\n        x) =\n    x\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase inr\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\n⊢ ↑h.map\n      {\n        toFinsupp :=\n          Finsupp.mapDomain\n            (?m.1376551 h\n              (Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support))))\n            (Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support))) } =\n    x\n[PROOFSTEP]\nrw [Finsupp.mapDomain_comapDomain, Polynomial.eta, h.map_modByMonicHom x]\n[GOAL]\ncase inr.hf\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\n⊢ Function.Injective Fin.val\n[PROOFSTEP]\nexact Fin.val_injective\n[GOAL]\ncase inr.hl\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\n⊢ ↑(↑(modByMonicHom h) x).toFinsupp.support ⊆ Set.range Fin.val\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase inr.hl\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\ni : ℕ\nhi : i ∈ ↑(↑(modByMonicHom h) x).toFinsupp.support\n⊢ i ∈ Set.range Fin.val\n[PROOFSTEP]\nrefine Set.mem_range.mpr ⟨⟨i, ?_⟩, rfl⟩\n[GOAL]\ncase inr.hl\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\ni : ℕ\nhi : i ∈ ↑(↑(modByMonicHom h) x).toFinsupp.support\n⊢ i < natDegree f\n[PROOFSTEP]\ncontrapose! hi\n[GOAL]\ncase inr.hl\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\ni : ℕ\nhi : natDegree f ≤ i\n⊢ ¬i ∈ ↑(↑(modByMonicHom h) x).toFinsupp.support\n[PROOFSTEP]\nsimp only [Polynomial.toFinsupp_apply, Classical.not_not, Finsupp.mem_support_iff, Ne.def, modByMonicHom,\n  LinearMap.coe_mk, Finset.mem_coe]\n[GOAL]\ncase inr.hl\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\ni : ℕ\nhi : natDegree f ≤ i\n⊢ coeff\n      (↑{ toFun := fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f,\n            map_add' :=\n              (_ :\n                ∀ (x y : S),\n                  (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y) =\n                    (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) x +\n                      (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) y) }\n        x)\n      i =\n    0\n[PROOFSTEP]\nby_cases hx : h.toIsAdjoinRoot.repr x %ₘ f = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\ni : ℕ\nhi : natDegree f ≤ i\nhx : IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f = 0\n⊢ coeff\n      (↑{ toFun := fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f,\n            map_add' :=\n              (_ :\n                ∀ (x y : S),\n                  (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y) =\n                    (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) x +\n                      (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) y) }\n        x)\n      i =\n    0\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\ni : ℕ\nhi : natDegree f ≤ i\nhx : ¬IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f = 0\n⊢ coeff\n      (↑{ toFun := fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f,\n            map_add' :=\n              (_ :\n                ∀ (x y : S),\n                  (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y) =\n                    (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) x +\n                      (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) y) }\n        x)\n      i =\n    0\n[PROOFSTEP]\nrefine coeff_eq_zero_of_natDegree_lt (lt_of_lt_of_le ?_ hi)\n[GOAL]\ncase neg\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\ni : ℕ\nhi : natDegree f ≤ i\nhx : ¬IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f = 0\n⊢ natDegree\n      (↑{ toFun := fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f,\n            map_add' :=\n              (_ :\n                ∀ (x y : S),\n                  (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) (x + y) =\n                    (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) x +\n                      (fun x => IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) y) }\n        x) <\n    natDegree f\n[PROOFSTEP]\ndsimp\n  -- Porting note: added\n[GOAL]\ncase neg\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\ni : ℕ\nhi : natDegree f ≤ i\nhx : ¬IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f = 0\n⊢ natDegree (IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) < natDegree f\n[PROOFSTEP]\nrw [natDegree_lt_natDegree_iff hx]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\nh✝ : Nontrivial R\ni : ℕ\nhi : natDegree f ≤ i\nhx : ¬IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f = 0\n⊢ degree (IsAdjoinRoot.repr h.toIsAdjoinRoot x %ₘ f) < degree f\n[PROOFSTEP]\nexact degree_modByMonic_lt _ h.Monic\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            {\n              toFun := fun x =>\n                Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                  (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n              map_add' :=\n                (_ :\n                  ∀ (x y : S),\n                    (fun x =>\n                          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                            (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                        (x + y) =\n                      (fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                          x +\n                        (fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                          y) },\n          map_smul' :=\n            (_ :\n              ∀ (c : R) (x : S),\n                AddHom.toFun\n                    {\n                      toFun := fun x =>\n                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                          (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : S),\n                            (fun x =>\n                                  Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                    (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                (x + y) =\n                              (fun x =>\n                                    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                  x +\n                                (fun x =>\n                                    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                  y) }\n                    (c • x) =\n                  ↑(RingHom.id R) c •\n                    AddHom.toFun\n                      {\n                        toFun := fun x =>\n                          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                            (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : S),\n                              (fun x =>\n                                    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                  (x + y) =\n                                (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    x +\n                                  (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    y) }\n                      x) }.toAddHom\n      ((fun g => ↑h.map { toFinsupp := Finsupp.mapDomain Fin.val g }) g) =\n    g\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            {\n              toFun := fun x =>\n                Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                  (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n              map_add' :=\n                (_ :\n                  ∀ (x y : S),\n                    (fun x =>\n                          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                            (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                        (x + y) =\n                      (fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                          x +\n                        (fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                          y) },\n          map_smul' :=\n            (_ :\n              ∀ (c : R) (x : S),\n                AddHom.toFun\n                    {\n                      toFun := fun x =>\n                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                          (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : S),\n                            (fun x =>\n                                  Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                    (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                (x + y) =\n                              (fun x =>\n                                    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                  x +\n                                (fun x =>\n                                    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                  y) }\n                    (c • x) =\n                  ↑(RingHom.id R) c •\n                    AddHom.toFun\n                      {\n                        toFun := fun x =>\n                          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                            (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : S),\n                              (fun x =>\n                                    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                  (x + y) =\n                                (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    x +\n                                  (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    y) }\n                      x) }.toAddHom\n      ((fun g => ↑h.map { toFinsupp := Finsupp.mapDomain Fin.val g }) g) =\n    g\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\n⊢ ↑(AddHom.toFun\n          {\n              toAddHom :=\n                {\n                  toFun := fun x =>\n                    Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : S),\n                        (fun x =>\n                              Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                            (x + y) =\n                          (fun x =>\n                                Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                  (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                              x +\n                            (fun x =>\n                                Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                  (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                              y) },\n              map_smul' :=\n                (_ :\n                  ∀ (c : R) (x : S),\n                    AddHom.toFun\n                        {\n                          toFun := fun x =>\n                            Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                              (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : S),\n                                (fun x =>\n                                      Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                        (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                    (x + y) =\n                                  (fun x =>\n                                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                          (_ :\n                                            Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                      x +\n                                    (fun x =>\n                                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                          (_ :\n                                            Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                      y) }\n                        (c • x) =\n                      ↑(RingHom.id R) c •\n                        AddHom.toFun\n                          {\n                            toFun := fun x =>\n                              Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)),\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : S),\n                                  (fun x =>\n                                        Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                          (_ :\n                                            Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                      (x + y) =\n                                    (fun x =>\n                                          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                            (_ :\n                                              Set.InjOn Fin.val\n                                                (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                        x +\n                                      (fun x =>\n                                          Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n                                            (_ :\n                                              Set.InjOn Fin.val\n                                                (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n                                        y) }\n                          x) }.toAddHom\n          ((fun g => ↑h.map { toFinsupp := Finsupp.mapDomain Fin.val g }) g))\n      i =\n    ↑g i\n[PROOFSTEP]\nsimp only [h.modByMonicHom_map, Finsupp.comapDomain_apply, Polynomial.toFinsupp_apply]\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\n⊢ coeff ({ toFinsupp := Finsupp.mapDomain Fin.val g } %ₘ f) ↑i = ↑g i\n[PROOFSTEP]\nrw [(Polynomial.modByMonic_eq_self_iff h.Monic).mpr, Polynomial.coeff]\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\n⊢ (match (motive := R[X] → ℕ → R) { toFinsupp := Finsupp.mapDomain Fin.val g } with\n      | { toFinsupp := p } => ↑p)\n      ↑i =\n    ↑g i\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\n⊢ degree { toFinsupp := Finsupp.mapDomain Fin.val g } < degree f\n[PROOFSTEP]\ndsimp only\n  -- Porting note: added\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\n⊢ ↑(Finsupp.mapDomain Fin.val g) ↑i = ↑g i\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\n⊢ degree { toFinsupp := Finsupp.mapDomain Fin.val g } < degree f\n[PROOFSTEP]\nrw [Finsupp.mapDomain_apply Fin.val_injective]\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\n⊢ degree { toFinsupp := Finsupp.mapDomain Fin.val g } < degree f\n[PROOFSTEP]\nrw [degree_eq_natDegree h.Monic.ne_zero, degree_lt_iff_coeff_zero]\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\n⊢ ∀ (m : ℕ), natDegree f ≤ m → coeff { toFinsupp := Finsupp.mapDomain Fin.val g } m = 0\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\nm : ℕ\nhm : natDegree f ≤ m\n⊢ coeff { toFinsupp := Finsupp.mapDomain Fin.val g } m = 0\n[PROOFSTEP]\nrw [Polynomial.coeff]\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\nm : ℕ\nhm : natDegree f ≤ m\n⊢ (match (motive := R[X] → ℕ → R) { toFinsupp := Finsupp.mapDomain Fin.val g } with\n      | { toFinsupp := p } => ↑p)\n      m =\n    0\n[PROOFSTEP]\ndsimp only\n  -- Porting note: added\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\nm : ℕ\nhm : natDegree f ≤ m\n⊢ ↑(Finsupp.mapDomain Fin.val g) m = 0\n[PROOFSTEP]\nrw [Finsupp.mapDomain_notin_range]\n[GOAL]\ncase h.h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\nm : ℕ\nhm : natDegree f ≤ m\n⊢ ¬m ∈ Set.range Fin.val\n[PROOFSTEP]\nrw [Set.mem_range, not_exists]\n[GOAL]\ncase h.h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni : Fin (natDegree f)\nm : ℕ\nhm : natDegree f ≤ m\n⊢ ∀ (x : Fin (natDegree f)), ¬↑x = m\n[PROOFSTEP]\nrintro i rfl\n[GOAL]\ncase h.h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ng : Fin (natDegree f) →₀ R\n✝ : Nontrivial R\ni✝ i : Fin (natDegree f)\nhm : natDegree f ≤ ↑i\n⊢ False\n[PROOFSTEP]\nexact i.prop.not_le hm\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ni : Fin (natDegree f)\n⊢ Finsupp.comapDomain Fin.val (↑(modByMonicHom h) (root h.toIsAdjoinRoot ^ ↑i)).toFinsupp\n      (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) (root h.toIsAdjoinRoot ^ ↑i)).toFinsupp.support)) =\n    Finsupp.single i 1\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ni j : Fin (natDegree f)\n⊢ ↑(Finsupp.comapDomain Fin.val (↑(modByMonicHom h) (root h.toIsAdjoinRoot ^ ↑i)).toFinsupp\n          (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) (root h.toIsAdjoinRoot ^ ↑i)).toFinsupp.support)))\n      j =\n    ↑(Finsupp.single i 1) j\n[PROOFSTEP]\nrw [Finsupp.comapDomain_apply, modByMonicHom_root_pow]\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ni j : Fin (natDegree f)\n⊢ ↑(X ^ ↑i).toFinsupp ↑j = ↑(Finsupp.single i 1) j\n[PROOFSTEP]\nrw [X_pow_eq_monomial, toFinsupp_monomial, Finsupp.single_apply_left Fin.val_injective]\n[GOAL]\ncase h.hdeg\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ni j : Fin (natDegree f)\n⊢ ↑i < natDegree f\n[PROOFSTEP]\nexact i.is_lt\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\ninst✝ : Nontrivial S\nh : IsAdjoinRootMonic S f\n⊢ 0 < natDegree f\n[PROOFSTEP]\nrcases h.basis.index_nonempty with ⟨⟨i, hi⟩⟩\n[GOAL]\ncase intro.mk\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\ninst✝ : Nontrivial S\nh : IsAdjoinRootMonic S f\ni : ℕ\nhi : i < natDegree f\n⊢ 0 < natDegree f\n[PROOFSTEP]\nexact (Nat.zero_le _).trans_lt hi\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\ni : Fin (natDegree f)\n⊢ ↑(↑(basis h).repr x) i = coeff (↑(modByMonicHom h) x) ↑i\n[PROOFSTEP]\nchange (h.modByMonicHom x).toFinsupp.comapDomain _ (Fin.val_injective.injOn _) i = _\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx : S\ni : Fin (natDegree f)\n⊢ ↑(Finsupp.comapDomain Fin.val (↑(modByMonicHom h) x).toFinsupp\n          (_ : Set.InjOn Fin.val (Fin.val ⁻¹' ↑(↑(modByMonicHom h) x).toFinsupp.support)))\n      i =\n    coeff (↑(modByMonicHom h) x) ↑i\n[PROOFSTEP]\nrw [Finsupp.comapDomain_apply, Polynomial.toFinsupp_apply]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nhdeg : 1 < natDegree f\n⊢ ↑(basis h) { val := 1, isLt := hdeg } = root h.toIsAdjoinRoot\n[PROOFSTEP]\nrw [h.basis_apply, Fin.val_mk, pow_one]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nz : S\ni : ℕ\nhi : i < natDegree f\n⊢ ↑(coeff h) z i = ↑(↑(basis h).repr z) { val := i, isLt := hi }\n[PROOFSTEP]\nsimp only [coeff, LinearMap.comp_apply, Finsupp.lcoeFun_apply, Finsupp.lmapDomain_apply, LinearEquiv.coe_coe,\n  liftPolyₗ_apply, LinearMap.coe_mk, h.basis_repr]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nz : S\ni : ℕ\nhi : i < natDegree f\n⊢ ↑{ toFun := Polynomial.coeff,\n          map_add' := (_ : ∀ (p q : R[X]), Polynomial.coeff (p + q) = Polynomial.coeff p + Polynomial.coeff q) }\n      (↑(modByMonicHom h) z) i =\n    Polynomial.coeff (↑(modByMonicHom h) z) i\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nz : S\ni : ℕ\nhi : natDegree f ≤ i\n⊢ ↑(coeff h) z i = 0\n[PROOFSTEP]\nsimp only [coeff, LinearMap.comp_apply, Finsupp.lcoeFun_apply, Finsupp.lmapDomain_apply, LinearEquiv.coe_coe,\n  liftPolyₗ_apply, LinearMap.coe_mk, h.basis_repr]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nz : S\ni : ℕ\nhi : natDegree f ≤ i\n⊢ ↑{ toFun := Polynomial.coeff,\n          map_add' := (_ : ∀ (p q : R[X]), Polynomial.coeff (p + q) = Polynomial.coeff p + Polynomial.coeff q) }\n      (↑(modByMonicHom h) z) i =\n    0\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nz : S\ni : ℕ\nhi : natDegree f ≤ i\n✝ : Nontrivial R\n⊢ ↑{ toFun := Polynomial.coeff,\n          map_add' := (_ : ∀ (p q : R[X]), Polynomial.coeff (p + q) = Polynomial.coeff p + Polynomial.coeff q) }\n      (↑(modByMonicHom h) z) i =\n    0\n[PROOFSTEP]\nexact\n  Polynomial.coeff_eq_zero_of_degree_lt\n    ((degree_modByMonic_lt _ h.Monic).trans_le (Polynomial.degree_le_of_natDegree_le hi))\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nz : S\ni : ℕ\n⊢ ↑(coeff h) z i = if hi : i < natDegree f then ↑(↑(basis h).repr z) { val := i, isLt := hi } else 0\n[PROOFSTEP]\nsplit_ifs with hi\n[GOAL]\ncase pos\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nz : S\ni : ℕ\nhi : i < natDegree f\n⊢ ↑(coeff h) z i = ↑(↑(basis h).repr z) { val := i, isLt := hi }\n[PROOFSTEP]\nexact h.coeff_apply_lt z i hi\n[GOAL]\ncase neg\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nz : S\ni : ℕ\nhi : ¬i < natDegree f\n⊢ ↑(coeff h) z i = 0\n[PROOFSTEP]\nexact h.coeff_apply_le z i (le_of_not_lt hi)\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\nhn : n < natDegree f\n⊢ ↑(coeff h) (root h.toIsAdjoinRoot ^ n) = Pi.single n 1\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\nhn : n < natDegree f\ni : ℕ\n⊢ ↑(coeff h) (root h.toIsAdjoinRoot ^ n) i = Pi.single n 1 i\n[PROOFSTEP]\nrw [coeff_apply]\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\nhn : n < natDegree f\ni : ℕ\n⊢ (if hi : i < natDegree f then ↑(↑(basis h).repr (root h.toIsAdjoinRoot ^ n)) { val := i, isLt := hi } else 0) =\n    Pi.single n 1 i\n[PROOFSTEP]\nsplit_ifs with hi\n[GOAL]\ncase pos\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\nhn : n < natDegree f\ni : ℕ\nhi : i < natDegree f\n⊢ ↑(↑(basis h).repr (root h.toIsAdjoinRoot ^ n)) { val := i, isLt := hi } = Pi.single n 1 i\n[PROOFSTEP]\ncalc\n  h.basis.repr (h.root ^ n) ⟨i, _⟩ = h.basis.repr (h.basis ⟨n, hn⟩) ⟨i, hi⟩ := by rw [h.basis_apply, Fin.val_mk]\n  _ = Pi.single (f := fun _ => R) ((⟨n, hn⟩ : Fin _) : ℕ) (1 : (fun _ => R) n) ↑(⟨i, _⟩ : Fin _) := by\n    rw [h.basis.repr_self, ← Finsupp.single_eq_pi_single, Finsupp.single_apply_left Fin.val_injective]\n  _ = Pi.single (f := fun _ => R) n 1 i := by rw [Fin.val_mk, Fin.val_mk]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\nhn : n < natDegree f\ni : ℕ\nhi : i < natDegree f\n⊢ ↑(↑(basis h).repr (root h.toIsAdjoinRoot ^ n)) { val := i, isLt := hi } =\n    ↑(↑(basis h).repr (↑(basis h) { val := n, isLt := hn })) { val := i, isLt := hi }\n[PROOFSTEP]\nrw [h.basis_apply, Fin.val_mk]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\nhn : n < natDegree f\ni : ℕ\nhi : i < natDegree f\n⊢ ↑(↑(basis h).repr (↑(basis h) { val := n, isLt := hn })) { val := i, isLt := hi } =\n    Pi.single (↑{ val := n, isLt := hn }) 1 ↑{ val := i, isLt := ?m.1551980 }\n[PROOFSTEP]\nrw [h.basis.repr_self, ← Finsupp.single_eq_pi_single, Finsupp.single_apply_left Fin.val_injective]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\nhn : n < natDegree f\ni : ℕ\nhi : i < natDegree f\n⊢ Pi.single (↑{ val := n, isLt := hn }) 1 ↑{ val := i, isLt := hi } = Pi.single n 1 i\n[PROOFSTEP]\nrw [Fin.val_mk, Fin.val_mk]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\nhn : n < natDegree f\ni : ℕ\nhi : ¬i < natDegree f\n⊢ 0 = Pi.single n 1 i\n[PROOFSTEP]\nrefine (Pi.single_eq_of_ne (f := fun _ => R) ?_ (1 : (fun _ => R) n)).symm\n[GOAL]\ncase neg\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nn : ℕ\nhn : n < natDegree f\ni : ℕ\nhi : ¬i < natDegree f\n⊢ i ≠ n\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase neg\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\ni : ℕ\nhi : ¬i < natDegree f\nhn : i < natDegree f\n⊢ False\n[PROOFSTEP]\nsimp [hi] at hn \n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\ninst✝ : Nontrivial S\nh : IsAdjoinRootMonic S f\n⊢ ↑(coeff h) 1 = Pi.single 0 1\n[PROOFSTEP]\nrw [← h.coeff_root_pow h.deg_pos, pow_zero]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nhdeg : 1 < natDegree f\n⊢ ↑(coeff h) (root h.toIsAdjoinRoot) = Pi.single 1 1\n[PROOFSTEP]\nrw [← h.coeff_root_pow hdeg, pow_one]\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\ninst✝ : Nontrivial S\nh : IsAdjoinRootMonic S f\nx : R\n⊢ ↑(coeff h) (↑(algebraMap R S) x) = Pi.single 0 x\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\ninst✝ : Nontrivial S\nh : IsAdjoinRootMonic S f\nx : R\ni : ℕ\n⊢ ↑(coeff h) (↑(algebraMap R S) x) i = Pi.single 0 x i\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one, map_smul, coeff_one, Pi.smul_apply, smul_eq_mul]\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\ninst✝ : Nontrivial S\nh : IsAdjoinRootMonic S f\nx : R\ni : ℕ\n⊢ x * Pi.single 0 1 i = Pi.single 0 x i\n[PROOFSTEP]\nrefine' (Pi.apply_single (fun _ y => x * y) _ 0 1 i).trans (by simp)\n[GOAL]\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\ninst✝ : Nontrivial S\nh : IsAdjoinRootMonic S f\nx : R\ni : ℕ\n⊢ Pi.single 0 (x * 1) i = Pi.single 0 x i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\ninst✝ : Nontrivial S\nh : IsAdjoinRootMonic S f\nx : R\ni : ℕ\n⊢ ∀ (i : ℕ), (fun x_1 y => x * y) i 0 = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝³ : CommRing R\ninst✝² : Ring S\nf : R[X]\ninst✝¹ : Algebra R S\ninst✝ : Nontrivial S\nh : IsAdjoinRootMonic S f\nx : R\ni i✝ : ℕ\n⊢ (fun x_1 y => x * y) i✝ 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring S\nf : R[X]\ninst✝ : Algebra R S\nh : IsAdjoinRootMonic S f\nx y : S\nhxy : ∀ (i : ℕ), i < natDegree f → ↑(coeff h) x i = ↑(coeff h) y i\ni : Fin (natDegree f)\n⊢ ↑(Basis.equivFun (basis h)) x i = ↑(Basis.equivFun (basis h)) y i\n[PROOFSTEP]\nrw [Basis.equivFun_apply, ← h.coeff_apply_coe, Basis.equivFun_apply, ← h.coeff_apply_coe, hxy i i.prop]\n[GOAL]\nR : Type u\nS : Type v\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nf : R[X]\nh : IsAdjoinRoot S f\nx : S\n⊢ ↑(lift (algebraMap R S) (root h) (_ : ↑(aeval (root h)) f = 0) h) x = x\n[PROOFSTEP]\nrw [← h.map_repr x, lift_map, ← aeval_def, h.aeval_eq]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝¹ : CommRing T\ninst✝ : Algebra R T\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot T f\nsrc✝ : S →ₐ[R] T := liftHom (root h') (_ : ↑(aeval (root h')) f = 0) h\nx : S\n⊢ ↑(liftHom (root h) (_ : ↑(aeval (root h)) f = 0) h') (↑(liftHom (root h') (_ : ↑(aeval (root h')) f = 0) h) x) = x\n[PROOFSTEP]\nrw [← h.map_repr x, liftHom_map, aeval_eq, liftHom_map, aeval_eq]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝¹ : CommRing T\ninst✝ : Algebra R T\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot T f\nsrc✝ : S →ₐ[R] T := liftHom (root h') (_ : ↑(aeval (root h')) f = 0) h\nx : T\n⊢ ↑(liftHom (root h') (_ : ↑(aeval (root h')) f = 0) h) (↑(liftHom (root h) (_ : ↑(aeval (root h)) f = 0) h') x) = x\n[PROOFSTEP]\nrw [← h'.map_repr x, liftHom_map, aeval_eq, liftHom_map, aeval_eq]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝¹ : CommRing T\ninst✝ : Algebra R T\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot T f\nz : R[X]\n⊢ ↑(aequiv h h') (↑h.map z) = ↑h'.map z\n[PROOFSTEP]\nrw [aequiv, AlgEquiv.coe_mk, liftHom_map, aeval_eq]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝¹ : CommRing T\ninst✝ : Algebra R T\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot T f\n⊢ ↑(aequiv h h') (root h) = root h'\n[PROOFSTEP]\nrw [aequiv, AlgEquiv.coe_mk, liftHom_root]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝¹ : CommRing T\ninst✝ : Algebra R T\nh : IsAdjoinRoot S f\n⊢ aequiv h h = AlgEquiv.refl\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝¹ : CommRing T\ninst✝ : Algebra R T\nh : IsAdjoinRoot S f\na : S\n⊢ ↑(aequiv h h) a = ↑AlgEquiv.refl a\n[PROOFSTEP]\nexact h.lift_self_apply a\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝¹ : CommRing T\ninst✝ : Algebra R T\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot T f\n⊢ AlgEquiv.symm (aequiv h h') = aequiv h' h\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝¹ : CommRing T\ninst✝ : Algebra R T\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot T f\na✝ : T\n⊢ ↑(AlgEquiv.symm (aequiv h h')) a✝ = ↑(aequiv h' h) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝² : CommRing T\ninst✝¹ : Algebra R T\nU : Type u_2\ninst✝ : CommRing U\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot T f\ni : R →+* U\nx : U\nhx : eval₂ i x f = 0\nz : S\n⊢ ↑(lift i x hx h') (↑(aequiv h h') z) = ↑(lift i x hx h) z\n[PROOFSTEP]\nrw [← h.map_repr z, aequiv_map, lift_map, lift_map]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝³ : CommRing T\ninst✝² : Algebra R T\nU : Type u_2\ninst✝¹ : CommRing U\ninst✝ : Algebra R U\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot T f\nh'' : IsAdjoinRoot U f\n⊢ AlgEquiv.trans (aequiv h h') (aequiv h' h'') = aequiv h h''\n[PROOFSTEP]\next z\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝³ : CommRing T\ninst✝² : Algebra R T\nU : Type u_2\ninst✝¹ : CommRing U\ninst✝ : Algebra R U\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot T f\nh'' : IsAdjoinRoot U f\nz : S\n⊢ ↑(AlgEquiv.trans (aequiv h h') (aequiv h' h'')) z = ↑(aequiv h h'') z\n[PROOFSTEP]\nexact h.aequiv_aequiv h' h'' z\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝¹ : CommRing T\ninst✝ : Algebra R T\nh : IsAdjoinRoot S f\ne : S ≃ₐ[R] T\n⊢ RingHom.ker (RingHom.comp (↑↑e) h.map) = Ideal.span {f}\n[PROOFSTEP]\nrw [← RingHom.comap_ker, RingHom.ker_coe_equiv, ← RingHom.ker_eq_comap_bot, h.ker_map]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝¹ : CommRing T\ninst✝ : Algebra R T\nh : IsAdjoinRoot S f\ne : S ≃ₐ[R] T\n⊢ algebraMap R T = RingHom.comp (RingHom.comp (↑↑e) h.map) C\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u\nS : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝¹ : CommRing T\ninst✝ : Algebra R T\nh : IsAdjoinRoot S f\ne : S ≃ₐ[R] T\nx✝ : R\n⊢ ↑(algebraMap R T) x✝ = ↑(RingHom.comp (RingHom.comp (↑↑e) h.map) C) x✝\n[PROOFSTEP]\nsimp only [AlgEquiv.commutes, RingHom.comp_apply, AlgEquiv.coe_ringEquiv, RingEquiv.coe_toRingHom, ← h.algebraMap_apply]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝³ : CommRing T\ninst✝² : Algebra R T\nU : Type u_2\ninst✝¹ : CommRing U\ninst✝ : Algebra R U\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot T f\ne : T ≃ₐ[R] U\n⊢ aequiv h (ofEquiv h' e) = AlgEquiv.trans (aequiv h h') e\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝³ : CommRing T\ninst✝² : Algebra R T\nU : Type u_2\ninst✝¹ : CommRing U\ninst✝ : Algebra R U\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot T f\ne : T ≃ₐ[R] U\na : S\n⊢ ↑(aequiv h (ofEquiv h' e)) a = ↑(AlgEquiv.trans (aequiv h h') e) a\n[PROOFSTEP]\nrw [← h.map_repr a, aequiv_map, AlgEquiv.trans_apply, aequiv_map, ofEquiv_map_apply]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝³ : CommRing T\ninst✝² : Algebra R T\nU : Type u_2\ninst✝¹ : CommRing U\ninst✝ : Algebra R U\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot U f\ne : S ≃ₐ[R] T\n⊢ aequiv (ofEquiv h e) h' = AlgEquiv.trans (AlgEquiv.symm e) (aequiv h h')\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nf : R[X]\nT : Type u_1\ninst✝³ : CommRing T\ninst✝² : Algebra R T\nU : Type u_2\ninst✝¹ : CommRing U\ninst✝ : Algebra R U\nh : IsAdjoinRoot S f\nh' : IsAdjoinRoot U f\ne : S ≃ₐ[R] T\na : T\n⊢ ↑(aequiv (ofEquiv h e) h') a = ↑(AlgEquiv.trans (AlgEquiv.symm e) (aequiv h h')) a\n[PROOFSTEP]\nrw [← (h.ofEquiv e).map_repr a, aequiv_map, AlgEquiv.trans_apply, ofEquiv_map_apply, e.symm_apply_apply, aequiv_map]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nf : R[X]\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : NoZeroSMulDivisors R S\ninst✝ : IsIntegrallyClosed R\nh : IsAdjoinRootMonic S f\nhirr : Irreducible f\nq : R[X]\nhq : f = minpoly R (IsAdjoinRoot.root h.toIsAdjoinRoot) * q\n⊢ Associated f (minpoly R (IsAdjoinRoot.root h.toIsAdjoinRoot))\n[PROOFSTEP]\nconvert\n  Associated.mul_left (minpoly R h.root) <|\n    associated_one_iff_isUnit.2 <| (hirr.isUnit_or_isUnit hq).resolve_left <| minpoly.not_isUnit R h.root\n[GOAL]\ncase h.e'_4\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nf : R[X]\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : NoZeroSMulDivisors R S\ninst✝ : IsIntegrallyClosed R\nh : IsAdjoinRootMonic S f\nhirr : Irreducible f\nq : R[X]\nhq : f = minpoly R (IsAdjoinRoot.root h.toIsAdjoinRoot) * q\n⊢ minpoly R (IsAdjoinRoot.root h.toIsAdjoinRoot) = minpoly R (IsAdjoinRoot.root h.toIsAdjoinRoot) * 1\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nf : R[X]\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : NoZeroSMulDivisors R S\ninst✝ : IsIntegrallyClosed R\nx : S\nhx' : IsIntegral R x\n⊢ minpoly R x = minpoly R (powerBasis' hx').gen\n[PROOFSTEP]\nhaveI := isDomain_of_prime (prime_of_isIntegrallyClosed hx')\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nf : R[X]\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : NoZeroSMulDivisors R S\ninst✝ : IsIntegrallyClosed R\nx : S\nhx' : IsIntegral R x\nthis : IsDomain (AdjoinRoot (minpoly R x))\n⊢ minpoly R x = minpoly R (powerBasis' hx').gen\n[PROOFSTEP]\nhaveI :=\n  noZeroSMulDivisors_of_prime_of_degree_ne_zero (prime_of_isIntegrallyClosed hx') (ne_of_lt (degree_pos hx')).symm\n[GOAL]\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nf : R[X]\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : NoZeroSMulDivisors R S\ninst✝ : IsIntegrallyClosed R\nx : S\nhx' : IsIntegral R x\nthis✝ : IsDomain (AdjoinRoot (minpoly R x))\nthis : NoZeroSMulDivisors R (AdjoinRoot (minpoly R x))\n⊢ minpoly R x = minpoly R (powerBasis' hx').gen\n[PROOFSTEP]\nrw [← minpolyGen_eq, adjoin.powerBasis', minpolyGen_map, minpolyGen_eq, AdjoinRoot.powerBasis'_gen, ←\n  isAdjoinRootMonic_root_eq_root _ (monic hx'), minpoly_eq]\n[GOAL]\ncase hirr\nR : Type u\nS : Type v\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\nf : R[X]\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : NoZeroSMulDivisors R S\ninst✝ : IsIntegrallyClosed R\nx : S\nhx' : IsIntegral R x\nthis✝ : IsDomain (AdjoinRoot (minpoly R x))\nthis : NoZeroSMulDivisors R (AdjoinRoot (minpoly R x))\n⊢ Irreducible (minpoly R x)\n[PROOFSTEP]\nexact irreducible hx'\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.IsAdjoinRoot", "llama_tokens": 39720, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6187804337438502, "lm_q2_score": 0.5660185351961015, "lm_q1q2_score": 0.35024119471570236}}
{"text": "[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\n⊢ ↑(TensorAlgebra.ι R) m ∈ LinearMap.range (TensorAlgebra.ι R) ^ 1\n[PROOFSTEP]\nsimpa only [pow_one] using LinearMap.mem_range_self _ m\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\n⊢ ↑(TensorAlgebra.ι R) m ∈ LinearMap.range (TensorAlgebra.ι R) ^ 1\n[PROOFSTEP]\nsimpa only [pow_one] using LinearMap.mem_range_self _ m\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ AlgHom.comp (DirectSum.coeAlgHom fun x => LinearMap.range (ι R) ^ x) (↑(lift R) (GradedAlgebra.ι R M)) =\n    AlgHom.id R (TensorAlgebra R M)\n[PROOFSTEP]\next m\n[GOAL]\ncase w.h\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\n⊢ ↑(LinearMap.comp\n          (AlgHom.toLinearMap\n            (AlgHom.comp (DirectSum.coeAlgHom fun x => LinearMap.range (ι R) ^ x) (↑(lift R) (GradedAlgebra.ι R M))))\n          (ι R))\n      m =\n    ↑(LinearMap.comp (AlgHom.toLinearMap (AlgHom.id R (TensorAlgebra R M))) (ι R)) m\n[PROOFSTEP]\ndsimp only [LinearMap.comp_apply, AlgHom.toLinearMap_apply, AlgHom.comp_apply, AlgHom.id_apply]\n[GOAL]\ncase w.h\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\n⊢ ↑(DirectSum.coeAlgHom fun x => LinearMap.range (ι R) ^ x) (↑(↑(lift R) (GradedAlgebra.ι R M)) (↑(ι R) m)) = ↑(ι R) m\n[PROOFSTEP]\nrw [lift_ι_apply, GradedAlgebra.ι_apply R M, DirectSum.coeAlgHom_of, Subtype.coe_mk]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni : ℕ\nx : { x // x ∈ LinearMap.range (ι R) ^ i }\n⊢ ↑(↑(lift R) (GradedAlgebra.ι R M)) ↑x = ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) x\n[PROOFSTEP]\ncases' x with x hx\n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni : ℕ\nx : TensorAlgebra R M\nhx : x ∈ LinearMap.range (ι R) ^ i\n⊢ ↑(↑(lift R) (GradedAlgebra.ι R M)) ↑{ val := x, property := hx } =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := x, property := hx }\n[PROOFSTEP]\ndsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]\n  -- porting note: use new `induction using` support that failed in Lean 3\n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni : ℕ\nx : TensorAlgebra R M\nhx : x ∈ LinearMap.range (ι R) ^ i\n⊢ ↑(↑(lift R) (GradedAlgebra.ι R M)) x =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := x, property := hx }\n[PROOFSTEP]\ninduction hx using Submodule.pow_induction_on_left' with\n| hr r => rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl\n| hadd x y i hx hy ihx ihy => rw [AlgHom.map_add, ihx, ihy, ← map_add]; rfl\n| hmul m hm i x hx ih =>\n  obtain ⟨_, rfl⟩ := hm\n  rw [AlgHom.map_mul, ih, lift_ι_apply, GradedAlgebra.ι_apply R M, DirectSum.of_mul_of]\n  exact DirectSum.of_eq_of_gradedMonoid_eq (Sigma.subtype_ext (add_comm _ _) rfl)\n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni : ℕ\nx : TensorAlgebra R M\nhx : x ∈ LinearMap.range (ι R) ^ i\n⊢ ↑(↑(lift R) (GradedAlgebra.ι R M)) x =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := x, property := hx }\n[PROOFSTEP]\ninduction hx using Submodule.pow_induction_on_left' with\n| hr r => rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl\n| hadd x y i hx hy ihx ihy => rw [AlgHom.map_add, ihx, ihy, ← map_add]; rfl\n| hmul m hm i x hx ih =>\n  obtain ⟨_, rfl⟩ := hm\n  rw [AlgHom.map_mul, ih, lift_ι_apply, GradedAlgebra.ι_apply R M, DirectSum.of_mul_of]\n  exact DirectSum.of_eq_of_gradedMonoid_eq (Sigma.subtype_ext (add_comm _ _) rfl)\n[GOAL]\ncase mk.hr\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni : ℕ\nx : TensorAlgebra R M\nr : R\n⊢ ↑(↑(lift R) (GradedAlgebra.ι R M)) (↑(algebraMap R (TensorAlgebra R M)) r) =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) 0)\n      { val := ↑(algebraMap R (TensorAlgebra R M)) r, property := (_ : ↑(algebraMap R (TensorAlgebra R M)) r ∈ 1) }\n[PROOFSTEP]\n\n| hr r => rw [AlgHom.commutes, DirectSum.algebraMap_apply]; rfl\n[GOAL]\ncase mk.hr\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni : ℕ\nx : TensorAlgebra R M\nr : R\n⊢ ↑(↑(lift R) (GradedAlgebra.ι R M)) (↑(algebraMap R (TensorAlgebra R M)) r) =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) 0)\n      { val := ↑(algebraMap R (TensorAlgebra R M)) r, property := (_ : ↑(algebraMap R (TensorAlgebra R M)) r ∈ 1) }\n[PROOFSTEP]\nrw [AlgHom.commutes, DirectSum.algebraMap_apply]\n[GOAL]\ncase mk.hr\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni : ℕ\nx : TensorAlgebra R M\nr : R\n⊢ ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) 0) (↑DirectSum.GAlgebra.toFun r) =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) 0)\n      { val := ↑(algebraMap R (TensorAlgebra R M)) r, property := (_ : ↑(algebraMap R (TensorAlgebra R M)) r ∈ 1) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.hadd\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni✝ : ℕ\nx✝ x y : TensorAlgebra R M\ni : ℕ\nhx : x ∈ LinearMap.range (ι R) ^ i\nhy : y ∈ LinearMap.range (ι R) ^ i\nihx :\n  ↑(↑(lift R) (GradedAlgebra.ι R M)) x =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := x, property := hx }\nihy :\n  ↑(↑(lift R) (GradedAlgebra.ι R M)) y =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := y, property := hy }\n⊢ ↑(↑(lift R) (GradedAlgebra.ι R M)) (x + y) =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i)\n      { val := x + y, property := (_ : x + y ∈ LinearMap.range (ι R) ^ i) }\n[PROOFSTEP]\n\n| hadd x y i hx hy ihx ihy => rw [AlgHom.map_add, ihx, ihy, ← map_add]; rfl\n[GOAL]\ncase mk.hadd\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni✝ : ℕ\nx✝ x y : TensorAlgebra R M\ni : ℕ\nhx : x ∈ LinearMap.range (ι R) ^ i\nhy : y ∈ LinearMap.range (ι R) ^ i\nihx :\n  ↑(↑(lift R) (GradedAlgebra.ι R M)) x =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := x, property := hx }\nihy :\n  ↑(↑(lift R) (GradedAlgebra.ι R M)) y =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := y, property := hy }\n⊢ ↑(↑(lift R) (GradedAlgebra.ι R M)) (x + y) =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i)\n      { val := x + y, property := (_ : x + y ∈ LinearMap.range (ι R) ^ i) }\n[PROOFSTEP]\nrw [AlgHom.map_add, ihx, ihy, ← map_add]\n[GOAL]\ncase mk.hadd\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni✝ : ℕ\nx✝ x y : TensorAlgebra R M\ni : ℕ\nhx : x ∈ LinearMap.range (ι R) ^ i\nhy : y ∈ LinearMap.range (ι R) ^ i\nihx :\n  ↑(↑(lift R) (GradedAlgebra.ι R M)) x =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := x, property := hx }\nihy :\n  ↑(↑(lift R) (GradedAlgebra.ι R M)) y =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := y, property := hy }\n⊢ ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i)\n      ({ val := x, property := hx } + { val := y, property := hy }) =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i)\n      { val := x + y, property := (_ : x + y ∈ LinearMap.range (ι R) ^ i) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.hmul\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni✝ : ℕ\nx✝ m : TensorAlgebra R M\nhm : m ∈ LinearMap.range (ι R)\ni : ℕ\nx : TensorAlgebra R M\nhx : x ∈ LinearMap.range (ι R) ^ i\nih :\n  ↑(↑(lift R) (GradedAlgebra.ι R M)) x =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := x, property := hx }\n⊢ ↑(↑(lift R) (GradedAlgebra.ι R M)) (m * x) =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) (Nat.succ i))\n      { val := m * x, property := (_ : m * x ∈ LinearMap.range (ι R) * npowRec i (LinearMap.range (ι R))) }\n[PROOFSTEP]\n\n| hmul m hm i x hx ih =>\n  obtain ⟨_, rfl⟩ := hm\n  rw [AlgHom.map_mul, ih, lift_ι_apply, GradedAlgebra.ι_apply R M, DirectSum.of_mul_of]\n  exact DirectSum.of_eq_of_gradedMonoid_eq (Sigma.subtype_ext (add_comm _ _) rfl)\n[GOAL]\ncase mk.hmul\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni✝ : ℕ\nx✝ m : TensorAlgebra R M\nhm : m ∈ LinearMap.range (ι R)\ni : ℕ\nx : TensorAlgebra R M\nhx : x ∈ LinearMap.range (ι R) ^ i\nih :\n  ↑(↑(lift R) (GradedAlgebra.ι R M)) x =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := x, property := hx }\n⊢ ↑(↑(lift R) (GradedAlgebra.ι R M)) (m * x) =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) (Nat.succ i))\n      { val := m * x, property := (_ : m * x ∈ LinearMap.range (ι R) * npowRec i (LinearMap.range (ι R))) }\n[PROOFSTEP]\nobtain ⟨_, rfl⟩ := hm\n[GOAL]\ncase mk.hmul.intro\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni✝ : ℕ\nx✝ : TensorAlgebra R M\ni : ℕ\nx : TensorAlgebra R M\nhx : x ∈ LinearMap.range (ι R) ^ i\nih :\n  ↑(↑(lift R) (GradedAlgebra.ι R M)) x =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := x, property := hx }\nw✝ : M\n⊢ ↑(↑(lift R) (GradedAlgebra.ι R M)) (↑(ι R) w✝ * x) =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) (Nat.succ i))\n      { val := ↑(ι R) w✝ * x,\n        property := (_ : ↑(ι R) w✝ * x ∈ LinearMap.range (ι R) * npowRec i (LinearMap.range (ι R))) }\n[PROOFSTEP]\nrw [AlgHom.map_mul, ih, lift_ι_apply, GradedAlgebra.ι_apply R M, DirectSum.of_mul_of]\n[GOAL]\ncase mk.hmul.intro\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ni✝ : ℕ\nx✝ : TensorAlgebra R M\ni : ℕ\nx : TensorAlgebra R M\nhx : x ∈ LinearMap.range (ι R) ^ i\nih :\n  ↑(↑(lift R) (GradedAlgebra.ι R M)) x =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) i) { val := x, property := hx }\nw✝ : M\n⊢ ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) (1 + i))\n      (GradedMonoid.GMul.mul { val := ↑(ι R) w✝, property := (_ : ↑(ι R) w✝ ∈ LinearMap.range (ι R) ^ 1) }\n        { val := x, property := hx }) =\n    ↑(DirectSum.of (fun i => { x // x ∈ LinearMap.range (ι R) ^ i }) (Nat.succ i))\n      { val := ↑(ι R) w✝ * x,\n        property := (_ : ↑(ι R) w✝ * x ∈ LinearMap.range (ι R) * npowRec i (LinearMap.range (ι R))) }\n[PROOFSTEP]\nexact DirectSum.of_eq_of_gradedMonoid_eq (Sigma.subtype_ext (add_comm _ _) rfl)\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.TensorAlgebra.Grading", "llama_tokens": 5057, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.668880247169804, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.3501055323702335}}
